From d605d3e9978928d111b3e2b5a10c70810b44a10d Mon Sep 17 00:00:00 2001 From: Cameron DeCoster Date: Thu, 9 Apr 2026 10:07:04 -0600 Subject: [PATCH 1/2] chore: Update plotly.js to v3.5.0 --- codegen/resources/plot-schema.json | 21 +- js/package-lock.json | 8 +- js/package.json | 2 +- plotly/graph_objs/_bar.py | 2 +- plotly/graph_objs/_box.py | 2 +- plotly/graph_objs/_candlestick.py | 2 +- plotly/graph_objs/_carpet.py | 2 +- plotly/graph_objs/_choropleth.py | 12 +- plotly/graph_objs/_contour.py | 4 +- plotly/graph_objs/_contourcarpet.py | 4 +- plotly/graph_objs/_figure.py | 8 +- plotly/graph_objs/_figurewidget.py | 8 +- plotly/graph_objs/_funnel.py | 2 +- plotly/graph_objs/_heatmap.py | 2 +- plotly/graph_objs/_histogram.py | 6 +- plotly/graph_objs/_histogram2d.py | 4 +- plotly/graph_objs/_histogram2dcontour.py | 6 +- plotly/graph_objs/_icicle.py | 2 +- plotly/graph_objs/_image.py | 2 +- plotly/graph_objs/_layout.py | 82 +- plotly/graph_objs/_ohlc.py | 2 +- plotly/graph_objs/_scatter.py | 2 +- plotly/graph_objs/_scattercarpet.py | 2 +- plotly/graph_objs/_scattergeo.py | 12 +- plotly/graph_objs/_streamtube.py | 2 +- plotly/graph_objs/_sunburst.py | 2 +- plotly/graph_objs/_treemap.py | 2 +- plotly/graph_objs/_violin.py | 2 +- plotly/graph_objs/_waterfall.py | 2 +- plotly/graph_objs/bar/_error_x.py | 4 +- plotly/graph_objs/bar/_error_y.py | 4 +- plotly/graph_objs/bar/_hoverlabel.py | 2 +- plotly/graph_objs/bar/_insidetextfont.py | 2 +- plotly/graph_objs/bar/_outsidetextfont.py | 2 +- plotly/graph_objs/bar/_textfont.py | 2 +- plotly/graph_objs/bar/hoverlabel/_font.py | 2 +- .../graph_objs/bar/legendgrouptitle/_font.py | 2 +- plotly/graph_objs/bar/marker/_colorbar.py | 4 +- .../bar/marker/colorbar/_tickfont.py | 2 +- .../bar/marker/colorbar/title/_font.py | 2 +- plotly/graph_objs/barpolar/_hoverlabel.py | 2 +- .../graph_objs/barpolar/hoverlabel/_font.py | 2 +- .../barpolar/legendgrouptitle/_font.py | 2 +- .../graph_objs/barpolar/marker/_colorbar.py | 4 +- .../barpolar/marker/colorbar/_tickfont.py | 2 +- .../barpolar/marker/colorbar/title/_font.py | 2 +- plotly/graph_objs/box/_hoverlabel.py | 2 +- plotly/graph_objs/box/hoverlabel/_font.py | 2 +- .../graph_objs/box/legendgrouptitle/_font.py | 2 +- plotly/graph_objs/candlestick/_hoverlabel.py | 2 +- .../candlestick/hoverlabel/_font.py | 2 +- .../candlestick/legendgrouptitle/_font.py | 2 +- plotly/graph_objs/carpet/_aaxis.py | 10 +- plotly/graph_objs/carpet/_baxis.py | 10 +- plotly/graph_objs/carpet/_font.py | 2 +- plotly/graph_objs/carpet/aaxis/_tickfont.py | 2 +- plotly/graph_objs/carpet/aaxis/title/_font.py | 2 +- plotly/graph_objs/carpet/baxis/_tickfont.py | 2 +- plotly/graph_objs/carpet/baxis/title/_font.py | 2 +- .../carpet/legendgrouptitle/_font.py | 2 +- plotly/graph_objs/choropleth/_colorbar.py | 4 +- plotly/graph_objs/choropleth/_hoverlabel.py | 2 +- .../choropleth/colorbar/_tickfont.py | 2 +- .../choropleth/colorbar/title/_font.py | 2 +- .../graph_objs/choropleth/hoverlabel/_font.py | 2 +- .../choropleth/legendgrouptitle/_font.py | 2 +- plotly/graph_objs/choroplethmap/_colorbar.py | 4 +- .../graph_objs/choroplethmap/_hoverlabel.py | 2 +- .../choroplethmap/colorbar/_tickfont.py | 2 +- .../choroplethmap/colorbar/title/_font.py | 2 +- .../choroplethmap/hoverlabel/_font.py | 2 +- .../choroplethmap/legendgrouptitle/_font.py | 2 +- .../graph_objs/choroplethmapbox/_colorbar.py | 4 +- .../choroplethmapbox/_hoverlabel.py | 2 +- .../choroplethmapbox/colorbar/_tickfont.py | 2 +- .../choroplethmapbox/colorbar/title/_font.py | 2 +- .../choroplethmapbox/hoverlabel/_font.py | 2 +- .../legendgrouptitle/_font.py | 2 +- plotly/graph_objs/cone/_colorbar.py | 4 +- plotly/graph_objs/cone/_hoverlabel.py | 2 +- plotly/graph_objs/cone/colorbar/_tickfont.py | 2 +- .../graph_objs/cone/colorbar/title/_font.py | 2 +- plotly/graph_objs/cone/hoverlabel/_font.py | 2 +- .../graph_objs/cone/legendgrouptitle/_font.py | 2 +- plotly/graph_objs/contour/_colorbar.py | 4 +- plotly/graph_objs/contour/_hoverlabel.py | 2 +- plotly/graph_objs/contour/_textfont.py | 2 +- .../graph_objs/contour/colorbar/_tickfont.py | 2 +- .../contour/colorbar/title/_font.py | 2 +- .../graph_objs/contour/contours/_labelfont.py | 2 +- plotly/graph_objs/contour/hoverlabel/_font.py | 2 +- .../contour/legendgrouptitle/_font.py | 2 +- plotly/graph_objs/contourcarpet/_colorbar.py | 4 +- .../contourcarpet/colorbar/_tickfont.py | 2 +- .../contourcarpet/colorbar/title/_font.py | 2 +- .../contourcarpet/contours/_labelfont.py | 2 +- .../contourcarpet/legendgrouptitle/_font.py | 2 +- plotly/graph_objs/densitymap/_colorbar.py | 4 +- plotly/graph_objs/densitymap/_hoverlabel.py | 2 +- .../densitymap/colorbar/_tickfont.py | 2 +- .../densitymap/colorbar/title/_font.py | 2 +- .../graph_objs/densitymap/hoverlabel/_font.py | 2 +- .../densitymap/legendgrouptitle/_font.py | 2 +- plotly/graph_objs/densitymapbox/_colorbar.py | 4 +- .../graph_objs/densitymapbox/_hoverlabel.py | 2 +- .../densitymapbox/colorbar/_tickfont.py | 2 +- .../densitymapbox/colorbar/title/_font.py | 2 +- .../densitymapbox/hoverlabel/_font.py | 2 +- .../densitymapbox/legendgrouptitle/_font.py | 2 +- plotly/graph_objs/funnel/_hoverlabel.py | 2 +- plotly/graph_objs/funnel/_insidetextfont.py | 2 +- plotly/graph_objs/funnel/_outsidetextfont.py | 2 +- plotly/graph_objs/funnel/_textfont.py | 2 +- plotly/graph_objs/funnel/hoverlabel/_font.py | 2 +- .../funnel/legendgrouptitle/_font.py | 2 +- plotly/graph_objs/funnel/marker/_colorbar.py | 4 +- .../funnel/marker/colorbar/_tickfont.py | 2 +- .../funnel/marker/colorbar/title/_font.py | 2 +- plotly/graph_objs/funnelarea/_domain.py | 4 +- plotly/graph_objs/funnelarea/_hoverlabel.py | 2 +- .../graph_objs/funnelarea/_insidetextfont.py | 2 +- plotly/graph_objs/funnelarea/_textfont.py | 2 +- .../graph_objs/funnelarea/hoverlabel/_font.py | 2 +- .../funnelarea/legendgrouptitle/_font.py | 2 +- plotly/graph_objs/funnelarea/title/_font.py | 2 +- plotly/graph_objs/heatmap/_colorbar.py | 4 +- plotly/graph_objs/heatmap/_hoverlabel.py | 2 +- plotly/graph_objs/heatmap/_textfont.py | 2 +- .../graph_objs/heatmap/colorbar/_tickfont.py | 2 +- .../heatmap/colorbar/title/_font.py | 2 +- plotly/graph_objs/heatmap/hoverlabel/_font.py | 2 +- .../heatmap/legendgrouptitle/_font.py | 2 +- plotly/graph_objs/histogram/_error_x.py | 4 +- plotly/graph_objs/histogram/_error_y.py | 4 +- plotly/graph_objs/histogram/_hoverlabel.py | 2 +- .../graph_objs/histogram/_insidetextfont.py | 2 +- .../graph_objs/histogram/_outsidetextfont.py | 2 +- plotly/graph_objs/histogram/_textfont.py | 2 +- .../graph_objs/histogram/hoverlabel/_font.py | 2 +- .../histogram/legendgrouptitle/_font.py | 2 +- .../graph_objs/histogram/marker/_colorbar.py | 4 +- .../histogram/marker/colorbar/_tickfont.py | 2 +- .../histogram/marker/colorbar/title/_font.py | 2 +- plotly/graph_objs/histogram2d/_colorbar.py | 4 +- plotly/graph_objs/histogram2d/_hoverlabel.py | 2 +- plotly/graph_objs/histogram2d/_textfont.py | 2 +- .../histogram2d/colorbar/_tickfont.py | 2 +- .../histogram2d/colorbar/title/_font.py | 2 +- .../histogram2d/hoverlabel/_font.py | 2 +- .../histogram2d/legendgrouptitle/_font.py | 2 +- .../histogram2dcontour/_colorbar.py | 4 +- .../histogram2dcontour/_hoverlabel.py | 2 +- .../histogram2dcontour/_textfont.py | 2 +- .../histogram2dcontour/colorbar/_tickfont.py | 2 +- .../colorbar/title/_font.py | 2 +- .../histogram2dcontour/contours/_labelfont.py | 2 +- .../histogram2dcontour/hoverlabel/_font.py | 2 +- .../legendgrouptitle/_font.py | 2 +- plotly/graph_objs/icicle/_domain.py | 4 +- plotly/graph_objs/icicle/_hoverlabel.py | 2 +- plotly/graph_objs/icicle/_insidetextfont.py | 2 +- plotly/graph_objs/icicle/_outsidetextfont.py | 2 +- plotly/graph_objs/icicle/_textfont.py | 2 +- plotly/graph_objs/icicle/hoverlabel/_font.py | 2 +- .../icicle/legendgrouptitle/_font.py | 2 +- plotly/graph_objs/icicle/marker/_colorbar.py | 4 +- .../icicle/marker/colorbar/_tickfont.py | 2 +- .../icicle/marker/colorbar/title/_font.py | 2 +- plotly/graph_objs/icicle/pathbar/_textfont.py | 2 +- plotly/graph_objs/image/_hoverlabel.py | 2 +- plotly/graph_objs/image/hoverlabel/_font.py | 2 +- .../image/legendgrouptitle/_font.py | 2 +- plotly/graph_objs/indicator/_domain.py | 4 +- plotly/graph_objs/indicator/delta/_font.py | 2 +- plotly/graph_objs/indicator/gauge/_axis.py | 4 +- .../indicator/gauge/axis/_tickfont.py | 2 +- .../indicator/legendgrouptitle/_font.py | 2 +- plotly/graph_objs/indicator/number/_font.py | 2 +- plotly/graph_objs/indicator/title/_font.py | 2 +- plotly/graph_objs/isosurface/_colorbar.py | 4 +- plotly/graph_objs/isosurface/_hoverlabel.py | 2 +- plotly/graph_objs/isosurface/_surface.py | 2 +- .../isosurface/colorbar/_tickfont.py | 2 +- .../isosurface/colorbar/title/_font.py | 2 +- .../graph_objs/isosurface/hoverlabel/_font.py | 2 +- .../isosurface/legendgrouptitle/_font.py | 2 +- plotly/graph_objs/layout/_annotation.py | 4 +- plotly/graph_objs/layout/_font.py | 2 +- plotly/graph_objs/layout/_grid.py | 4 +- plotly/graph_objs/layout/_hoverlabel.py | 2 +- plotly/graph_objs/layout/_updatemenu.py | 2 +- plotly/graph_objs/layout/_xaxis.py | 10 +- plotly/graph_objs/layout/_yaxis.py | 10 +- plotly/graph_objs/layout/annotation/_font.py | 2 +- .../layout/annotation/hoverlabel/_font.py | 2 +- .../graph_objs/layout/coloraxis/_colorbar.py | 4 +- .../layout/coloraxis/colorbar/_tickfont.py | 2 +- .../layout/coloraxis/colorbar/title/_font.py | 2 +- plotly/graph_objs/layout/geo/_domain.py | 4 +- plotly/graph_objs/layout/hoverlabel/_font.py | 2 +- .../layout/hoverlabel/_grouptitlefont.py | 2 +- plotly/graph_objs/layout/legend/_font.py | 2 +- .../layout/legend/_grouptitlefont.py | 2 +- .../graph_objs/layout/legend/title/_font.py | 2 +- plotly/graph_objs/layout/map/_domain.py | 4 +- .../layout/map/layer/symbol/_textfont.py | 2 +- plotly/graph_objs/layout/mapbox/_domain.py | 4 +- .../layout/mapbox/layer/symbol/_textfont.py | 2 +- .../graph_objs/layout/newshape/label/_font.py | 2 +- .../layout/newshape/legendgrouptitle/_font.py | 2 +- .../graph_objs/layout/polar/_angularaxis.py | 4 +- plotly/graph_objs/layout/polar/_domain.py | 4 +- plotly/graph_objs/layout/polar/_radialaxis.py | 4 +- .../layout/polar/angularaxis/_tickfont.py | 2 +- .../layout/polar/radialaxis/_tickfont.py | 2 +- .../layout/polar/radialaxis/title/_font.py | 2 +- plotly/graph_objs/layout/scene/_annotation.py | 4 +- plotly/graph_objs/layout/scene/_domain.py | 4 +- plotly/graph_objs/layout/scene/_xaxis.py | 2 +- plotly/graph_objs/layout/scene/_yaxis.py | 2 +- plotly/graph_objs/layout/scene/_zaxis.py | 2 +- .../layout/scene/annotation/_font.py | 2 +- .../scene/annotation/hoverlabel/_font.py | 2 +- .../layout/scene/xaxis/_tickfont.py | 2 +- .../layout/scene/xaxis/title/_font.py | 2 +- .../layout/scene/yaxis/_tickfont.py | 2 +- .../layout/scene/yaxis/title/_font.py | 2 +- .../layout/scene/zaxis/_tickfont.py | 2 +- .../layout/scene/zaxis/title/_font.py | 2 +- plotly/graph_objs/layout/shape/label/_font.py | 2 +- .../layout/shape/legendgrouptitle/_font.py | 2 +- plotly/graph_objs/layout/slider/_font.py | 2 +- .../layout/slider/currentvalue/_font.py | 2 +- plotly/graph_objs/layout/smith/_domain.py | 4 +- .../layout/smith/imaginaryaxis/_tickfont.py | 2 +- .../layout/smith/realaxis/_tickfont.py | 2 +- plotly/graph_objs/layout/ternary/_aaxis.py | 4 +- plotly/graph_objs/layout/ternary/_baxis.py | 4 +- plotly/graph_objs/layout/ternary/_caxis.py | 4 +- plotly/graph_objs/layout/ternary/_domain.py | 4 +- .../layout/ternary/aaxis/_tickfont.py | 2 +- .../layout/ternary/aaxis/title/_font.py | 2 +- .../layout/ternary/baxis/_tickfont.py | 2 +- .../layout/ternary/baxis/title/_font.py | 2 +- .../layout/ternary/caxis/_tickfont.py | 2 +- .../layout/ternary/caxis/title/_font.py | 2 +- plotly/graph_objs/layout/title/_font.py | 2 +- .../graph_objs/layout/title/subtitle/_font.py | 2 +- plotly/graph_objs/layout/updatemenu/_font.py | 2 +- plotly/graph_objs/layout/xaxis/_minor.py | 2 +- .../graph_objs/layout/xaxis/_rangeslider.py | 2 +- plotly/graph_objs/layout/xaxis/_tickfont.py | 2 +- .../layout/xaxis/rangeselector/_font.py | 2 +- plotly/graph_objs/layout/xaxis/title/_font.py | 2 +- plotly/graph_objs/layout/yaxis/_minor.py | 2 +- plotly/graph_objs/layout/yaxis/_tickfont.py | 2 +- plotly/graph_objs/layout/yaxis/title/_font.py | 2 +- plotly/graph_objs/mesh3d/_colorbar.py | 4 +- plotly/graph_objs/mesh3d/_hoverlabel.py | 2 +- .../graph_objs/mesh3d/colorbar/_tickfont.py | 2 +- .../graph_objs/mesh3d/colorbar/title/_font.py | 2 +- plotly/graph_objs/mesh3d/hoverlabel/_font.py | 2 +- .../mesh3d/legendgrouptitle/_font.py | 2 +- plotly/graph_objs/ohlc/_hoverlabel.py | 2 +- plotly/graph_objs/ohlc/hoverlabel/_font.py | 2 +- .../graph_objs/ohlc/legendgrouptitle/_font.py | 2 +- plotly/graph_objs/parcats/_dimension.py | 2 +- plotly/graph_objs/parcats/_domain.py | 4 +- plotly/graph_objs/parcats/_labelfont.py | 2 +- plotly/graph_objs/parcats/_tickfont.py | 2 +- .../parcats/legendgrouptitle/_font.py | 2 +- plotly/graph_objs/parcats/line/_colorbar.py | 4 +- .../parcats/line/colorbar/_tickfont.py | 2 +- .../parcats/line/colorbar/title/_font.py | 2 +- plotly/graph_objs/parcoords/_domain.py | 4 +- plotly/graph_objs/parcoords/_labelfont.py | 2 +- plotly/graph_objs/parcoords/_rangefont.py | 2 +- plotly/graph_objs/parcoords/_tickfont.py | 2 +- .../parcoords/legendgrouptitle/_font.py | 2 +- plotly/graph_objs/parcoords/line/_colorbar.py | 4 +- .../parcoords/line/colorbar/_tickfont.py | 2 +- .../parcoords/line/colorbar/title/_font.py | 2 +- plotly/graph_objs/pie/_domain.py | 4 +- plotly/graph_objs/pie/_hoverlabel.py | 2 +- plotly/graph_objs/pie/_insidetextfont.py | 2 +- plotly/graph_objs/pie/_outsidetextfont.py | 2 +- plotly/graph_objs/pie/_textfont.py | 2 +- plotly/graph_objs/pie/hoverlabel/_font.py | 2 +- .../graph_objs/pie/legendgrouptitle/_font.py | 2 +- plotly/graph_objs/pie/title/_font.py | 2 +- plotly/graph_objs/sankey/_domain.py | 4 +- plotly/graph_objs/sankey/_hoverlabel.py | 2 +- plotly/graph_objs/sankey/_textfont.py | 2 +- plotly/graph_objs/sankey/hoverlabel/_font.py | 2 +- .../sankey/legendgrouptitle/_font.py | 2 +- plotly/graph_objs/sankey/link/_hoverlabel.py | 2 +- .../sankey/link/hoverlabel/_font.py | 2 +- plotly/graph_objs/sankey/node/_hoverlabel.py | 2 +- .../sankey/node/hoverlabel/_font.py | 2 +- plotly/graph_objs/scatter/_error_x.py | 4 +- plotly/graph_objs/scatter/_error_y.py | 4 +- plotly/graph_objs/scatter/_hoverlabel.py | 2 +- plotly/graph_objs/scatter/_textfont.py | 2 +- plotly/graph_objs/scatter/hoverlabel/_font.py | 2 +- .../scatter/legendgrouptitle/_font.py | 2 +- plotly/graph_objs/scatter/marker/_colorbar.py | 4 +- .../scatter/marker/colorbar/_tickfont.py | 2 +- .../scatter/marker/colorbar/title/_font.py | 2 +- plotly/graph_objs/scatter3d/_error_x.py | 4 +- plotly/graph_objs/scatter3d/_error_y.py | 4 +- plotly/graph_objs/scatter3d/_error_z.py | 4 +- plotly/graph_objs/scatter3d/_hoverlabel.py | 2 +- plotly/graph_objs/scatter3d/_textfont.py | 2 +- .../graph_objs/scatter3d/hoverlabel/_font.py | 2 +- .../scatter3d/legendgrouptitle/_font.py | 2 +- plotly/graph_objs/scatter3d/line/_colorbar.py | 4 +- .../scatter3d/line/colorbar/_tickfont.py | 2 +- .../scatter3d/line/colorbar/title/_font.py | 2 +- .../graph_objs/scatter3d/marker/_colorbar.py | 4 +- .../scatter3d/marker/colorbar/_tickfont.py | 2 +- .../scatter3d/marker/colorbar/title/_font.py | 2 +- .../graph_objs/scattercarpet/_hoverlabel.py | 2 +- plotly/graph_objs/scattercarpet/_textfont.py | 2 +- .../scattercarpet/hoverlabel/_font.py | 2 +- .../scattercarpet/legendgrouptitle/_font.py | 2 +- .../scattercarpet/marker/_colorbar.py | 4 +- .../marker/colorbar/_tickfont.py | 2 +- .../marker/colorbar/title/_font.py | 2 +- plotly/graph_objs/scattergeo/_hoverlabel.py | 2 +- plotly/graph_objs/scattergeo/_textfont.py | 2 +- .../graph_objs/scattergeo/hoverlabel/_font.py | 2 +- .../scattergeo/legendgrouptitle/_font.py | 2 +- .../graph_objs/scattergeo/marker/_colorbar.py | 4 +- .../scattergeo/marker/colorbar/_tickfont.py | 2 +- .../scattergeo/marker/colorbar/title/_font.py | 2 +- plotly/graph_objs/scattergl/_error_x.py | 4 +- plotly/graph_objs/scattergl/_error_y.py | 4 +- plotly/graph_objs/scattergl/_hoverlabel.py | 2 +- .../graph_objs/scattergl/hoverlabel/_font.py | 2 +- .../scattergl/legendgrouptitle/_font.py | 2 +- .../graph_objs/scattergl/marker/_colorbar.py | 4 +- .../scattergl/marker/colorbar/_tickfont.py | 2 +- .../scattergl/marker/colorbar/title/_font.py | 2 +- plotly/graph_objs/scattermap/_hoverlabel.py | 2 +- plotly/graph_objs/scattermap/_textfont.py | 2 +- .../graph_objs/scattermap/hoverlabel/_font.py | 2 +- .../scattermap/legendgrouptitle/_font.py | 2 +- .../graph_objs/scattermap/marker/_colorbar.py | 4 +- .../scattermap/marker/colorbar/_tickfont.py | 2 +- .../scattermap/marker/colorbar/title/_font.py | 2 +- .../graph_objs/scattermapbox/_hoverlabel.py | 2 +- plotly/graph_objs/scattermapbox/_textfont.py | 2 +- .../scattermapbox/hoverlabel/_font.py | 2 +- .../scattermapbox/legendgrouptitle/_font.py | 2 +- .../scattermapbox/marker/_colorbar.py | 4 +- .../marker/colorbar/_tickfont.py | 2 +- .../marker/colorbar/title/_font.py | 2 +- plotly/graph_objs/scatterpolar/_hoverlabel.py | 2 +- plotly/graph_objs/scatterpolar/_textfont.py | 2 +- .../scatterpolar/hoverlabel/_font.py | 2 +- .../scatterpolar/legendgrouptitle/_font.py | 2 +- .../scatterpolar/marker/_colorbar.py | 4 +- .../scatterpolar/marker/colorbar/_tickfont.py | 2 +- .../marker/colorbar/title/_font.py | 2 +- .../graph_objs/scatterpolargl/_hoverlabel.py | 2 +- .../scatterpolargl/hoverlabel/_font.py | 2 +- .../scatterpolargl/legendgrouptitle/_font.py | 2 +- .../scatterpolargl/marker/_colorbar.py | 4 +- .../marker/colorbar/_tickfont.py | 2 +- .../marker/colorbar/title/_font.py | 2 +- plotly/graph_objs/scattersmith/_hoverlabel.py | 2 +- plotly/graph_objs/scattersmith/_textfont.py | 2 +- .../scattersmith/hoverlabel/_font.py | 2 +- .../scattersmith/legendgrouptitle/_font.py | 2 +- .../scattersmith/marker/_colorbar.py | 4 +- .../scattersmith/marker/colorbar/_tickfont.py | 2 +- .../marker/colorbar/title/_font.py | 2 +- .../graph_objs/scatterternary/_hoverlabel.py | 2 +- plotly/graph_objs/scatterternary/_textfont.py | 2 +- .../scatterternary/hoverlabel/_font.py | 2 +- .../scatterternary/legendgrouptitle/_font.py | 2 +- .../scatterternary/marker/_colorbar.py | 4 +- .../marker/colorbar/_tickfont.py | 2 +- .../marker/colorbar/title/_font.py | 2 +- plotly/graph_objs/splom/_hoverlabel.py | 2 +- plotly/graph_objs/splom/hoverlabel/_font.py | 2 +- .../splom/legendgrouptitle/_font.py | 2 +- plotly/graph_objs/splom/marker/_colorbar.py | 4 +- .../splom/marker/colorbar/_tickfont.py | 2 +- .../splom/marker/colorbar/title/_font.py | 2 +- plotly/graph_objs/streamtube/_colorbar.py | 4 +- plotly/graph_objs/streamtube/_hoverlabel.py | 2 +- .../streamtube/colorbar/_tickfont.py | 2 +- .../streamtube/colorbar/title/_font.py | 2 +- .../graph_objs/streamtube/hoverlabel/_font.py | 2 +- .../streamtube/legendgrouptitle/_font.py | 2 +- plotly/graph_objs/sunburst/_domain.py | 4 +- plotly/graph_objs/sunburst/_hoverlabel.py | 2 +- plotly/graph_objs/sunburst/_insidetextfont.py | 2 +- .../graph_objs/sunburst/_outsidetextfont.py | 2 +- plotly/graph_objs/sunburst/_textfont.py | 2 +- .../graph_objs/sunburst/hoverlabel/_font.py | 2 +- .../sunburst/legendgrouptitle/_font.py | 2 +- .../graph_objs/sunburst/marker/_colorbar.py | 4 +- .../sunburst/marker/colorbar/_tickfont.py | 2 +- .../sunburst/marker/colorbar/title/_font.py | 2 +- plotly/graph_objs/surface/_colorbar.py | 4 +- plotly/graph_objs/surface/_hoverlabel.py | 2 +- .../graph_objs/surface/colorbar/_tickfont.py | 2 +- .../surface/colorbar/title/_font.py | 2 +- plotly/graph_objs/surface/hoverlabel/_font.py | 2 +- .../surface/legendgrouptitle/_font.py | 2 +- plotly/graph_objs/table/_domain.py | 4 +- plotly/graph_objs/table/_hoverlabel.py | 2 +- plotly/graph_objs/table/cells/_font.py | 2 +- plotly/graph_objs/table/header/_font.py | 2 +- plotly/graph_objs/table/hoverlabel/_font.py | 2 +- .../table/legendgrouptitle/_font.py | 2 +- plotly/graph_objs/treemap/_domain.py | 4 +- plotly/graph_objs/treemap/_hoverlabel.py | 2 +- plotly/graph_objs/treemap/_insidetextfont.py | 2 +- plotly/graph_objs/treemap/_outsidetextfont.py | 2 +- plotly/graph_objs/treemap/_textfont.py | 2 +- plotly/graph_objs/treemap/hoverlabel/_font.py | 2 +- .../treemap/legendgrouptitle/_font.py | 2 +- plotly/graph_objs/treemap/marker/_colorbar.py | 4 +- .../treemap/marker/colorbar/_tickfont.py | 2 +- .../treemap/marker/colorbar/title/_font.py | 2 +- .../graph_objs/treemap/pathbar/_textfont.py | 2 +- plotly/graph_objs/violin/_hoverlabel.py | 2 +- plotly/graph_objs/violin/hoverlabel/_font.py | 2 +- .../violin/legendgrouptitle/_font.py | 2 +- plotly/graph_objs/volume/_colorbar.py | 4 +- plotly/graph_objs/volume/_hoverlabel.py | 2 +- plotly/graph_objs/volume/_surface.py | 2 +- .../graph_objs/volume/colorbar/_tickfont.py | 2 +- .../graph_objs/volume/colorbar/title/_font.py | 2 +- plotly/graph_objs/volume/hoverlabel/_font.py | 2 +- .../volume/legendgrouptitle/_font.py | 2 +- plotly/graph_objs/waterfall/_hoverlabel.py | 2 +- .../graph_objs/waterfall/_insidetextfont.py | 2 +- .../graph_objs/waterfall/_outsidetextfont.py | 2 +- plotly/graph_objs/waterfall/_textfont.py | 2 +- .../graph_objs/waterfall/hoverlabel/_font.py | 2 +- .../waterfall/legendgrouptitle/_font.py | 2 +- plotly/offline/_plotlyjs_version.py | 2 +- plotly/package_data/plotly.min.js | 1544 ++++++++--------- plotly/validators/_validators.json | 16 + 448 files changed, 1459 insertions(+), 1328 deletions(-) diff --git a/codegen/resources/plot-schema.json b/codegen/resources/plot-schema.json index 9e6c6299dad..51624cf2322 100644 --- a/codegen/resources/plot-schema.json +++ b/codegen/resources/plot-schema.json @@ -124,6 +124,11 @@ false ] }, + "displayNotifier": { + "description": "Determines whether or not notifier is displayed.", + "dflt": true, + "valType": "boolean" + }, "doubleClick": { "description": "Sets the double click interaction mode. Has an effect only in cartesian plots. If *false*, double click is disable. If *reset*, double click resets the axis ranges to their initial values. If *autosize*, double click set the axis ranges to their autorange values. If *reset+autosize*, the odd double clicks resets the axis ranges to their initial values and even double clicks set the axis ranges to their autorange values.", "dflt": "reset+autosize", @@ -1166,6 +1171,12 @@ "ummalqura" ] }, + "clickanywhere": { + "description": "If true, `plotly_click` events will fire for any click position within the plot area, not just over traces. When clicking where there is no trace data, the event will have an empty `points` array but will include `xvals` and `yvals` with click coordinates in data space.", + "dflt": false, + "editType": "none", + "valType": "boolean" + }, "clickmode": { "description": "Determines the mode of single click interactions. *event* is the default value and emits the `plotly_click` event. In addition this mode emits the `plotly_selected` event in drag modes *lasso* and *select*, but with no event data attached (kept for compatibility reasons). The *select* flag enables selecting single data points via click. This mode also supports persistent selections, meaning that pressing Shift while clicking, adds to / subtracts from an existing selection. *select* with `hovermode`: *x* can be confusing, consider explicitly setting `hovermode`: *closest* when using this feature. Selection events are sent accordingly as long as *event* flag is set as well. When the *event* flag is missing, `plotly_click` and `plotly_selected` events are not fired.", "dflt": "event", @@ -2807,6 +2818,12 @@ "editType": "plot", "valType": "boolean" }, + "hoveranywhere": { + "description": "If true, `plotly_hover` events will fire for any cursor position within the plot area, not just over traces. When the cursor is not over a trace, the event will have an empty `points` array but will include `xvals` and `yvals` with cursor coordinates in data space.", + "dflt": false, + "editType": "none", + "valType": "boolean" + }, "hoverdistance": { "description": "Sets the default distance (in pixels) to look for data to add hover labels (-1 means no cutoff, 0 means no looking for data). This is only a real distance for hovering on point-like objects, like scatter points. For area-like objects (bars, scatter fills, etc) hovering is on inside the area and off outside, but these objects will not supersede hover on point-like objects in case of conflict.", "dflt": 20, @@ -25447,7 +25464,7 @@ "valType": "number" }, "locationmode": { - "description": "The library used by the *country names* `locationmode` option is changing in an upcoming version. Country names in existing plots may not work in the new version. Determines the set of locations used to match entries in `locations` to regions on the map. Values *ISO-3*, *USA-states*, *country names* correspond to features on the base map and value *geojson-id* corresponds to features from a custom GeoJSON linked to the `geojson` attribute.", + "description": "The library used by the *country names* `locationmode` option is changing in an upcoming version. Country names in existing plots may not work in the new version. Determines the set of locations used to match entries in `locations` to regions on the map. Values *ISO-3*, *USA-states*, *country names* correspond to features on the base map and value *geojson-id* corresponds to features from a custom GeoJSON linked to the `geojson` attribute. *USA-states* accepts both two-letter abbreviations (e.g. *CA*) and full state names (e.g. *California*).", "dflt": "ISO-3", "editType": "calc", "valType": "enumerated", @@ -67366,7 +67383,7 @@ } }, "locationmode": { - "description": "The library used by the *country names* `locationmode` option is changing in an upcoming version. Country names in existing plots may not work in the new version. Determines the set of locations used to match entries in `locations` to regions on the map. Values *ISO-3*, *USA-states*, *country names* correspond to features on the base map and value *geojson-id* corresponds to features from a custom GeoJSON linked to the `geojson` attribute.", + "description": "The library used by the *country names* `locationmode` option is changing in an upcoming version. Country names in existing plots may not work in the new version. Determines the set of locations used to match entries in `locations` to regions on the map. Values *ISO-3*, *USA-states*, *country names* correspond to features on the base map and value *geojson-id* corresponds to features from a custom GeoJSON linked to the `geojson` attribute. *USA-states* accepts both two-letter abbreviations (e.g. *CA*) and full state names (e.g. *California*).", "dflt": "ISO-3", "editType": "calc", "valType": "enumerated", diff --git a/js/package-lock.json b/js/package-lock.json index 6d91863c845..eee5cc6b236 100644 --- a/js/package-lock.json +++ b/js/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@lumino/widgets": "~2.4.0", "lodash-es": "^4.17.21", - "plotly.js": "3.4.0" + "plotly.js": "3.5.0" }, "devDependencies": { "@jupyterlab/builder": "^4.3.6 || ^3.6.8", @@ -3619,9 +3619,9 @@ } }, "node_modules/plotly.js": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/plotly.js/-/plotly.js-3.4.0.tgz", - "integrity": "sha512-jdWfHLB8AxlGUmVhqJTGEKdwjCKGn9Yi8yg16067/JyqseuSado7F6IOM1XPZspdZyO/cf8IPuy7ROlVhqZZNw==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/plotly.js/-/plotly.js-3.5.0.tgz", + "integrity": "sha512-a3AYQIMG7OdZmrJ/fJ65HSt3g1l5qDeludKqjjafU1dh5E+fwqDhsEBndW7VCYwjlducCfN6KtPdWdiWFcoBWw==", "license": "MIT", "dependencies": { "@plotly/d3": "3.8.2", diff --git a/js/package.json b/js/package.json index e5b9ebdf7ac..3ef7393682b 100644 --- a/js/package.json +++ b/js/package.json @@ -19,7 +19,7 @@ }, "dependencies": { "lodash-es": "^4.17.21", - "plotly.js": "3.4.0", + "plotly.js": "3.5.0", "@lumino/widgets": "~2.4.0" }, "devDependencies": { diff --git a/plotly/graph_objs/_bar.py b/plotly/graph_objs/_bar.py index e2cd24617f7..e4dbc5ae657 100644 --- a/plotly/graph_objs/_bar.py +++ b/plotly/graph_objs/_bar.py @@ -1682,7 +1682,7 @@ def zorder(self): other SVG traces on the same subplot. SVG traces with higher `zorder` appear in front of those with lower `zorder`. - The 'zorder' property is a integer and may be specified as: + The 'zorder' property is an integer and may be specified as: - An int (or float that will be cast to an int) Returns diff --git a/plotly/graph_objs/_box.py b/plotly/graph_objs/_box.py index 0309be1a405..21b8a8a2da8 100644 --- a/plotly/graph_objs/_box.py +++ b/plotly/graph_objs/_box.py @@ -1921,7 +1921,7 @@ def zorder(self): other SVG traces on the same subplot. SVG traces with higher `zorder` appear in front of those with lower `zorder`. - The 'zorder' property is a integer and may be specified as: + The 'zorder' property is an integer and may be specified as: - An int (or float that will be cast to an int) Returns diff --git a/plotly/graph_objs/_candlestick.py b/plotly/graph_objs/_candlestick.py index 67131d8fa0b..4bba645d347 100644 --- a/plotly/graph_objs/_candlestick.py +++ b/plotly/graph_objs/_candlestick.py @@ -1142,7 +1142,7 @@ def zorder(self): other SVG traces on the same subplot. SVG traces with higher `zorder` appear in front of those with lower `zorder`. - The 'zorder' property is a integer and may be specified as: + The 'zorder' property is an integer and may be specified as: - An int (or float that will be cast to an int) Returns diff --git a/plotly/graph_objs/_carpet.py b/plotly/graph_objs/_carpet.py index 26e6a7a75f4..d3016872c6c 100644 --- a/plotly/graph_objs/_carpet.py +++ b/plotly/graph_objs/_carpet.py @@ -785,7 +785,7 @@ def zorder(self): other SVG traces on the same subplot. SVG traces with higher `zorder` appear in front of those with lower `zorder`. - The 'zorder' property is a integer and may be specified as: + The 'zorder' property is an integer and may be specified as: - An int (or float that will be cast to an int) Returns diff --git a/plotly/graph_objs/_choropleth.py b/plotly/graph_objs/_choropleth.py index d4be517e4d3..47b408052a9 100644 --- a/plotly/graph_objs/_choropleth.py +++ b/plotly/graph_objs/_choropleth.py @@ -627,7 +627,9 @@ def locationmode(self): the map. Values "ISO-3", "USA-states", *country names* correspond to features on the base map and value "geojson-id" corresponds to features from a custom GeoJSON linked to the - `geojson` attribute. + `geojson` attribute. "USA-states" accepts both two-letter + abbreviations (e.g. "CA") and full state names (e.g. + "California"). The 'locationmode' property is an enumeration that may be specified as: - One of the following enumeration values: @@ -1289,7 +1291,9 @@ def _prop_descriptions(self): "ISO-3", "USA-states", *country names* correspond to features on the base map and value "geojson-id" corresponds to features from a custom GeoJSON linked to - the `geojson` attribute. + the `geojson` attribute. "USA-states" accepts both two- + letter abbreviations (e.g. "CA") and full state names + (e.g. "California"). locations Sets the coordinates via location IDs or names. See `locationmode` for more info. @@ -1623,7 +1627,9 @@ def __init__( "ISO-3", "USA-states", *country names* correspond to features on the base map and value "geojson-id" corresponds to features from a custom GeoJSON linked to - the `geojson` attribute. + the `geojson` attribute. "USA-states" accepts both two- + letter abbreviations (e.g. "CA") and full state names + (e.g. "California"). locations Sets the coordinates via location IDs or names. See `locationmode` for more info. diff --git a/plotly/graph_objs/_contour.py b/plotly/graph_objs/_contour.py index c2c9f0dcc00..11579162293 100644 --- a/plotly/graph_objs/_contour.py +++ b/plotly/graph_objs/_contour.py @@ -806,7 +806,7 @@ def ncontours(self): to the value of `ncontours`. Has an effect only if `autocontour` is True or if `contours.size` is missing. - The 'ncontours' property is a integer and may be specified as: + The 'ncontours' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] @@ -1670,7 +1670,7 @@ def zorder(self): other SVG traces on the same subplot. SVG traces with higher `zorder` appear in front of those with lower `zorder`. - The 'zorder' property is a integer and may be specified as: + The 'zorder' property is an integer and may be specified as: - An int (or float that will be cast to an int) Returns diff --git a/plotly/graph_objs/_contourcarpet.py b/plotly/graph_objs/_contourcarpet.py index 837b6d9a72c..3d2eebada21 100644 --- a/plotly/graph_objs/_contourcarpet.py +++ b/plotly/graph_objs/_contourcarpet.py @@ -773,7 +773,7 @@ def ncontours(self): to the value of `ncontours`. Has an effect only if `autocontour` is True or if `contours.size` is missing. - The 'ncontours' property is a integer and may be specified as: + The 'ncontours' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] @@ -1158,7 +1158,7 @@ def zorder(self): other SVG traces on the same subplot. SVG traces with higher `zorder` appear in front of those with lower `zorder`. - The 'zorder' property is a integer and may be specified as: + The 'zorder' property is an integer and may be specified as: - An int (or float that will be cast to an int) Returns diff --git a/plotly/graph_objs/_figure.py b/plotly/graph_objs/_figure.py index 7346d979050..2d134776109 100644 --- a/plotly/graph_objs/_figure.py +++ b/plotly/graph_objs/_figure.py @@ -3233,7 +3233,9 @@ def add_choropleth( "ISO-3", "USA-states", *country names* correspond to features on the base map and value "geojson-id" corresponds to features from a custom GeoJSON linked to - the `geojson` attribute. + the `geojson` attribute. "USA-states" accepts both two- + letter abbreviations (e.g. "CA") and full state names + (e.g. "California"). locations Sets the coordinates via location IDs or names. See `locationmode` for more info. @@ -15070,7 +15072,9 @@ def add_scattergeo( "ISO-3", "USA-states", *country names* correspond to features on the base map and value "geojson-id" corresponds to features from a custom GeoJSON linked to - the `geojson` attribute. + the `geojson` attribute. "USA-states" accepts both two- + letter abbreviations (e.g. "CA") and full state names + (e.g. "California"). locations Sets the coordinates via location IDs or names. Coordinates correspond to the centroid of each location diff --git a/plotly/graph_objs/_figurewidget.py b/plotly/graph_objs/_figurewidget.py index 8f0ab719e01..1cd94abef0a 100644 --- a/plotly/graph_objs/_figurewidget.py +++ b/plotly/graph_objs/_figurewidget.py @@ -3235,7 +3235,9 @@ def add_choropleth( "ISO-3", "USA-states", *country names* correspond to features on the base map and value "geojson-id" corresponds to features from a custom GeoJSON linked to - the `geojson` attribute. + the `geojson` attribute. "USA-states" accepts both two- + letter abbreviations (e.g. "CA") and full state names + (e.g. "California"). locations Sets the coordinates via location IDs or names. See `locationmode` for more info. @@ -15072,7 +15074,9 @@ def add_scattergeo( "ISO-3", "USA-states", *country names* correspond to features on the base map and value "geojson-id" corresponds to features from a custom GeoJSON linked to - the `geojson` attribute. + the `geojson` attribute. "USA-states" accepts both two- + letter abbreviations (e.g. "CA") and full state names + (e.g. "California"). locations Sets the coordinates via location IDs or names. Coordinates correspond to the centroid of each location diff --git a/plotly/graph_objs/_funnel.py b/plotly/graph_objs/_funnel.py index 244c2861bbd..6fdd11b7d44 100644 --- a/plotly/graph_objs/_funnel.py +++ b/plotly/graph_objs/_funnel.py @@ -1527,7 +1527,7 @@ def zorder(self): other SVG traces on the same subplot. SVG traces with higher `zorder` appear in front of those with lower `zorder`. - The 'zorder' property is a integer and may be specified as: + The 'zorder' property is an integer and may be specified as: - An int (or float that will be cast to an int) Returns diff --git a/plotly/graph_objs/_heatmap.py b/plotly/graph_objs/_heatmap.py index 69d10f2a18a..8007a4bf739 100644 --- a/plotly/graph_objs/_heatmap.py +++ b/plotly/graph_objs/_heatmap.py @@ -1596,7 +1596,7 @@ def zorder(self): other SVG traces on the same subplot. SVG traces with higher `zorder` appear in front of those with lower `zorder`. - The 'zorder' property is a integer and may be specified as: + The 'zorder' property is an integer and may be specified as: - An int (or float that will be cast to an int) Returns diff --git a/plotly/graph_objs/_histogram.py b/plotly/graph_objs/_histogram.py index f642f05be87..922238c292f 100644 --- a/plotly/graph_objs/_histogram.py +++ b/plotly/graph_objs/_histogram.py @@ -826,7 +826,7 @@ def nbinsx(self): such that the histogram best visualizes the distribution of the data. Ignored if `xbins.size` is provided. - The 'nbinsx' property is a integer and may be specified as: + The 'nbinsx' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -848,7 +848,7 @@ def nbinsy(self): such that the histogram best visualizes the distribution of the data. Ignored if `ybins.size` is provided. - The 'nbinsy' property is a integer and may be specified as: + The 'nbinsy' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -1543,7 +1543,7 @@ def zorder(self): other SVG traces on the same subplot. SVG traces with higher `zorder` appear in front of those with lower `zorder`. - The 'zorder' property is a integer and may be specified as: + The 'zorder' property is an integer and may be specified as: - An int (or float that will be cast to an int) Returns diff --git a/plotly/graph_objs/_histogram2d.py b/plotly/graph_objs/_histogram2d.py index 67a70a6db6a..531fae8677a 100644 --- a/plotly/graph_objs/_histogram2d.py +++ b/plotly/graph_objs/_histogram2d.py @@ -738,7 +738,7 @@ def nbinsx(self): such that the histogram best visualizes the distribution of the data. Ignored if `xbins.size` is provided. - The 'nbinsx' property is a integer and may be specified as: + The 'nbinsx' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -760,7 +760,7 @@ def nbinsy(self): such that the histogram best visualizes the distribution of the data. Ignored if `ybins.size` is provided. - The 'nbinsy' property is a integer and may be specified as: + The 'nbinsy' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/_histogram2dcontour.py b/plotly/graph_objs/_histogram2dcontour.py index c36c7078033..461e8fd50e6 100644 --- a/plotly/graph_objs/_histogram2dcontour.py +++ b/plotly/graph_objs/_histogram2dcontour.py @@ -798,7 +798,7 @@ def nbinsx(self): such that the histogram best visualizes the distribution of the data. Ignored if `xbins.size` is provided. - The 'nbinsx' property is a integer and may be specified as: + The 'nbinsx' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -820,7 +820,7 @@ def nbinsy(self): such that the histogram best visualizes the distribution of the data. Ignored if `ybins.size` is provided. - The 'nbinsy' property is a integer and may be specified as: + The 'nbinsy' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -842,7 +842,7 @@ def ncontours(self): to the value of `ncontours`. Has an effect only if `autocontour` is True or if `contours.size` is missing. - The 'ncontours' property is a integer and may be specified as: + The 'ncontours' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/_icicle.py b/plotly/graph_objs/_icicle.py index c1909cbe7e0..ea4f0a79c37 100644 --- a/plotly/graph_objs/_icicle.py +++ b/plotly/graph_objs/_icicle.py @@ -605,7 +605,7 @@ def maxdepth(self): Sets the number of rendered sectors from any given `level`. Set `maxdepth` to "-1" to render all the levels in the hierarchy. - The 'maxdepth' property is a integer and may be specified as: + The 'maxdepth' property is an integer and may be specified as: - An int (or float that will be cast to an int) Returns diff --git a/plotly/graph_objs/_image.py b/plotly/graph_objs/_image.py index e1ebdbe36fe..ec8d8add22e 100644 --- a/plotly/graph_objs/_image.py +++ b/plotly/graph_objs/_image.py @@ -867,7 +867,7 @@ def zorder(self): other SVG traces on the same subplot. SVG traces with higher `zorder` appear in front of those with lower `zorder`. - The 'zorder' property is a integer and may be specified as: + The 'zorder' property is an integer and may be specified as: - An int (or float that will be cast to an int) Returns diff --git a/plotly/graph_objs/_layout.py b/plotly/graph_objs/_layout.py index 5917d7d574c..a6280a15a3d 100644 --- a/plotly/graph_objs/_layout.py +++ b/plotly/graph_objs/_layout.py @@ -70,6 +70,7 @@ def _subplot_re_match(self, prop): "boxgroupgap", "boxmode", "calendar", + "clickanywhere", "clickmode", "coloraxis", "colorscale", @@ -94,6 +95,7 @@ def _subplot_re_match(self, prop): "hiddenlabels", "hiddenlabelssrc", "hidesources", + "hoveranywhere", "hoverdistance", "hoverlabel", "hovermode", @@ -468,6 +470,28 @@ def calendar(self): def calendar(self, val): self["calendar"] = val + @property + def clickanywhere(self): + """ + If true, `plotly_click` events will fire for any click position + within the plot area, not just over traces. When clicking where + there is no trace data, the event will have an empty `points` + array but will include `xvals` and `yvals` with click + coordinates in data space. + + The 'clickanywhere' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["clickanywhere"] + + @clickanywhere.setter + def clickanywhere(self, val): + self["clickanywhere"] = val + @property def clickmode(self): """ @@ -989,6 +1013,28 @@ def hidesources(self): def hidesources(self, val): self["hidesources"] = val + @property + def hoveranywhere(self): + """ + If true, `plotly_hover` events will fire for any cursor + position within the plot area, not just over traces. When the + cursor is not over a trace, the event will have an empty + `points` array but will include `xvals` and `yvals` with cursor + coordinates in data space. + + The 'hoveranywhere' property is a boolean and must be specified as: + - A boolean value: True or False + + Returns + ------- + bool + """ + return self["hoveranywhere"] + + @hoveranywhere.setter + def hoveranywhere(self, val): + self["hoveranywhere"] = val + @property def hoverdistance(self): """ @@ -1000,7 +1046,7 @@ def hoverdistance(self): outside, but these objects will not supersede hover on point- like objects in case of conflict. - The 'hoverdistance' property is a integer and may be specified as: + The 'hoverdistance' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] @@ -1751,7 +1797,7 @@ def spikedistance(self): like objects. In addition, some objects can be hovered on but will not generate spikelines, such as scatter fills. - The 'spikedistance' property is a integer and may be specified as: + The 'spikedistance' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] @@ -2268,6 +2314,13 @@ def _prop_descriptions(self): calendar Sets the default calendar system to use for interpreting and displaying dates throughout the plot. + clickanywhere + If true, `plotly_click` events will fire for any click + position within the plot area, not just over traces. + When clicking where there is no trace data, the event + will have an empty `points` array but will include + `xvals` and `yvals` with click coordinates in data + space. clickmode Determines the mode of single click interactions. "event" is the default value and emits the @@ -2405,6 +2458,12 @@ def _prop_descriptions(self): been generated via forked graphs from the Chart Studio Cloud (at https://chart-studio.plotly.com or on- premise). + hoveranywhere + If true, `plotly_hover` events will fire for any cursor + position within the plot area, not just over traces. + When the cursor is not over a trace, the event will + have an empty `points` array but will include `xvals` + and `yvals` with cursor coordinates in data space. hoverdistance Sets the default distance (in pixels) to look for data to add hover labels (-1 means no cutoff, 0 means no @@ -2705,6 +2764,7 @@ def __init__( boxgroupgap=None, boxmode=None, calendar=None, + clickanywhere=None, clickmode=None, coloraxis=None, colorscale=None, @@ -2729,6 +2789,7 @@ def __init__( hiddenlabels=None, hiddenlabelssrc=None, hidesources=None, + hoveranywhere=None, hoverdistance=None, hoverlabel=None, hovermode=None, @@ -2868,6 +2929,13 @@ def __init__( calendar Sets the default calendar system to use for interpreting and displaying dates throughout the plot. + clickanywhere + If true, `plotly_click` events will fire for any click + position within the plot area, not just over traces. + When clicking where there is no trace data, the event + will have an empty `points` array but will include + `xvals` and `yvals` with click coordinates in data + space. clickmode Determines the mode of single click interactions. "event" is the default value and emits the @@ -3005,6 +3073,12 @@ def __init__( been generated via forked graphs from the Chart Studio Cloud (at https://chart-studio.plotly.com or on- premise). + hoveranywhere + If true, `plotly_hover` events will fire for any cursor + position within the plot area, not just over traces. + When the cursor is not over a trace, the event will + have an empty `points` array but will include `xvals` + and `yvals` with cursor coordinates in data space. hoverdistance Sets the default distance (in pixels) to look for data to add hover labels (-1 means no cutoff, 0 means no @@ -3311,6 +3385,7 @@ def __init__( "boxgroupgap", "boxmode", "calendar", + "clickanywhere", "clickmode", "coloraxis", "colorscale", @@ -3335,6 +3410,7 @@ def __init__( "hiddenlabels", "hiddenlabelssrc", "hidesources", + "hoveranywhere", "hoverdistance", "hoverlabel", "hovermode", @@ -3423,6 +3499,7 @@ def __init__( self._set_property("boxgroupgap", arg, boxgroupgap) self._set_property("boxmode", arg, boxmode) self._set_property("calendar", arg, calendar) + self._set_property("clickanywhere", arg, clickanywhere) self._set_property("clickmode", arg, clickmode) self._set_property("coloraxis", arg, coloraxis) self._set_property("colorscale", arg, colorscale) @@ -3447,6 +3524,7 @@ def __init__( self._set_property("hiddenlabels", arg, hiddenlabels) self._set_property("hiddenlabelssrc", arg, hiddenlabelssrc) self._set_property("hidesources", arg, hidesources) + self._set_property("hoveranywhere", arg, hoveranywhere) self._set_property("hoverdistance", arg, hoverdistance) self._set_property("hoverlabel", arg, hoverlabel) self._set_property("hovermode", arg, hovermode) diff --git a/plotly/graph_objs/_ohlc.py b/plotly/graph_objs/_ohlc.py index d8376e8aae6..ea91e9c352e 100644 --- a/plotly/graph_objs/_ohlc.py +++ b/plotly/graph_objs/_ohlc.py @@ -1142,7 +1142,7 @@ def zorder(self): other SVG traces on the same subplot. SVG traces with higher `zorder` appear in front of those with lower `zorder`. - The 'zorder' property is a integer and may be specified as: + The 'zorder' property is an integer and may be specified as: - An int (or float that will be cast to an int) Returns diff --git a/plotly/graph_objs/_scatter.py b/plotly/graph_objs/_scatter.py index ad5ab6b624f..0babb5ebb36 100644 --- a/plotly/graph_objs/_scatter.py +++ b/plotly/graph_objs/_scatter.py @@ -1740,7 +1740,7 @@ def zorder(self): other SVG traces on the same subplot. SVG traces with higher `zorder` appear in front of those with lower `zorder`. - The 'zorder' property is a integer and may be specified as: + The 'zorder' property is an integer and may be specified as: - An int (or float that will be cast to an int) Returns diff --git a/plotly/graph_objs/_scattercarpet.py b/plotly/graph_objs/_scattercarpet.py index 769556f1fb2..9c225d1f570 100644 --- a/plotly/graph_objs/_scattercarpet.py +++ b/plotly/graph_objs/_scattercarpet.py @@ -1175,7 +1175,7 @@ def zorder(self): other SVG traces on the same subplot. SVG traces with higher `zorder` appear in front of those with lower `zorder`. - The 'zorder' property is a integer and may be specified as: + The 'zorder' property is an integer and may be specified as: - An int (or float that will be cast to an int) Returns diff --git a/plotly/graph_objs/_scattergeo.py b/plotly/graph_objs/_scattergeo.py index dc45749a6ec..2c62519f0ed 100644 --- a/plotly/graph_objs/_scattergeo.py +++ b/plotly/graph_objs/_scattergeo.py @@ -638,7 +638,9 @@ def locationmode(self): the map. Values "ISO-3", "USA-states", *country names* correspond to features on the base map and value "geojson-id" corresponds to features from a custom GeoJSON linked to the - `geojson` attribute. + `geojson` attribute. "USA-states" accepts both two-letter + abbreviations (e.g. "CA") and full state names (e.g. + "California"). The 'locationmode' property is an enumeration that may be specified as: - One of the following enumeration values: @@ -1368,7 +1370,9 @@ def _prop_descriptions(self): "ISO-3", "USA-states", *country names* correspond to features on the base map and value "geojson-id" corresponds to features from a custom GeoJSON linked to - the `geojson` attribute. + the `geojson` attribute. "USA-states" accepts both two- + letter abbreviations (e.g. "CA") and full state names + (e.g. "California"). locations Sets the coordinates via location IDs or names. Coordinates correspond to the centroid of each location @@ -1734,7 +1738,9 @@ def __init__( "ISO-3", "USA-states", *country names* correspond to features on the base map and value "geojson-id" corresponds to features from a custom GeoJSON linked to - the `geojson` attribute. + the `geojson` attribute. "USA-states" accepts both two- + letter abbreviations (e.g. "CA") and full state names + (e.g. "California"). locations Sets the coordinates via location IDs or names. Coordinates correspond to the centroid of each location diff --git a/plotly/graph_objs/_streamtube.py b/plotly/graph_objs/_streamtube.py index fe6bd78ffd7..c19a753910d 100644 --- a/plotly/graph_objs/_streamtube.py +++ b/plotly/graph_objs/_streamtube.py @@ -668,7 +668,7 @@ def maxdisplayed(self): """ The maximum number of displayed segments in a streamtube. - The 'maxdisplayed' property is a integer and may be specified as: + The 'maxdisplayed' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/_sunburst.py b/plotly/graph_objs/_sunburst.py index b7df56bfa01..db02fbc1db8 100644 --- a/plotly/graph_objs/_sunburst.py +++ b/plotly/graph_objs/_sunburst.py @@ -630,7 +630,7 @@ def maxdepth(self): Sets the number of rendered sectors from any given `level`. Set `maxdepth` to "-1" to render all the levels in the hierarchy. - The 'maxdepth' property is a integer and may be specified as: + The 'maxdepth' property is an integer and may be specified as: - An int (or float that will be cast to an int) Returns diff --git a/plotly/graph_objs/_treemap.py b/plotly/graph_objs/_treemap.py index 4cced036174..daf4db605c1 100644 --- a/plotly/graph_objs/_treemap.py +++ b/plotly/graph_objs/_treemap.py @@ -585,7 +585,7 @@ def maxdepth(self): Sets the number of rendered sectors from any given `level`. Set `maxdepth` to "-1" to render all the levels in the hierarchy. - The 'maxdepth' property is a integer and may be specified as: + The 'maxdepth' property is an integer and may be specified as: - An int (or float that will be cast to an int) Returns diff --git a/plotly/graph_objs/_violin.py b/plotly/graph_objs/_violin.py index ca03026d675..bc20c2cee89 100644 --- a/plotly/graph_objs/_violin.py +++ b/plotly/graph_objs/_violin.py @@ -1407,7 +1407,7 @@ def zorder(self): other SVG traces on the same subplot. SVG traces with higher `zorder` appear in front of those with lower `zorder`. - The 'zorder' property is a integer and may be specified as: + The 'zorder' property is an integer and may be specified as: - An int (or float that will be cast to an int) Returns diff --git a/plotly/graph_objs/_waterfall.py b/plotly/graph_objs/_waterfall.py index ad71ced9652..2e085b60cdd 100644 --- a/plotly/graph_objs/_waterfall.py +++ b/plotly/graph_objs/_waterfall.py @@ -1662,7 +1662,7 @@ def zorder(self): other SVG traces on the same subplot. SVG traces with higher `zorder` appear in front of those with lower `zorder`. - The 'zorder' property is a integer and may be specified as: + The 'zorder' property is an integer and may be specified as: - An int (or float that will be cast to an int) Returns diff --git a/plotly/graph_objs/bar/_error_x.py b/plotly/graph_objs/bar/_error_x.py index 6c2537e68b3..43a21e51d1b 100644 --- a/plotly/graph_objs/bar/_error_x.py +++ b/plotly/graph_objs/bar/_error_x.py @@ -181,7 +181,7 @@ def thickness(self, val): @property def traceref(self): """ - The 'traceref' property is a integer and may be specified as: + The 'traceref' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -198,7 +198,7 @@ def traceref(self, val): @property def tracerefminus(self): """ - The 'tracerefminus' property is a integer and may be specified as: + The 'tracerefminus' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/bar/_error_y.py b/plotly/graph_objs/bar/_error_y.py index 3d99cd85f2d..4a3713ca562 100644 --- a/plotly/graph_objs/bar/_error_y.py +++ b/plotly/graph_objs/bar/_error_y.py @@ -164,7 +164,7 @@ def thickness(self, val): @property def traceref(self): """ - The 'traceref' property is a integer and may be specified as: + The 'traceref' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -181,7 +181,7 @@ def traceref(self, val): @property def tracerefminus(self): """ - The 'tracerefminus' property is a integer and may be specified as: + The 'tracerefminus' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/bar/_hoverlabel.py b/plotly/graph_objs/bar/_hoverlabel.py index 652f3069e91..ac799319088 100644 --- a/plotly/graph_objs/bar/_hoverlabel.py +++ b/plotly/graph_objs/bar/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/bar/_insidetextfont.py b/plotly/graph_objs/bar/_insidetextfont.py index f1c48dad8ab..f6c2d04b4ff 100644 --- a/plotly/graph_objs/bar/_insidetextfont.py +++ b/plotly/graph_objs/bar/_insidetextfont.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/bar/_outsidetextfont.py b/plotly/graph_objs/bar/_outsidetextfont.py index 2e2a8a3929a..b809d7604af 100644 --- a/plotly/graph_objs/bar/_outsidetextfont.py +++ b/plotly/graph_objs/bar/_outsidetextfont.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/bar/_textfont.py b/plotly/graph_objs/bar/_textfont.py index f63c5c45538..f62d23e24f7 100644 --- a/plotly/graph_objs/bar/_textfont.py +++ b/plotly/graph_objs/bar/_textfont.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/bar/hoverlabel/_font.py b/plotly/graph_objs/bar/hoverlabel/_font.py index 485d5a7be56..860b5fb3b07 100644 --- a/plotly/graph_objs/bar/hoverlabel/_font.py +++ b/plotly/graph_objs/bar/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/bar/legendgrouptitle/_font.py b/plotly/graph_objs/bar/legendgrouptitle/_font.py index 9c134c3fd6c..a87dfbf625a 100644 --- a/plotly/graph_objs/bar/legendgrouptitle/_font.py +++ b/plotly/graph_objs/bar/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/bar/marker/_colorbar.py b/plotly/graph_objs/bar/marker/_colorbar.py index f00a4bdce6e..7ee5476ee7d 100644 --- a/plotly/graph_objs/bar/marker/_colorbar.py +++ b/plotly/graph_objs/bar/marker/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -706,7 +706,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/bar/marker/colorbar/_tickfont.py b/plotly/graph_objs/bar/marker/colorbar/_tickfont.py index 5cfa677df31..428a2114d2c 100644 --- a/plotly/graph_objs/bar/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/bar/marker/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/bar/marker/colorbar/title/_font.py b/plotly/graph_objs/bar/marker/colorbar/title/_font.py index a3c50a3f67c..dbdd39017df 100644 --- a/plotly/graph_objs/bar/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/bar/marker/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/barpolar/_hoverlabel.py b/plotly/graph_objs/barpolar/_hoverlabel.py index b528ce3f800..249aa0de4a4 100644 --- a/plotly/graph_objs/barpolar/_hoverlabel.py +++ b/plotly/graph_objs/barpolar/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/barpolar/hoverlabel/_font.py b/plotly/graph_objs/barpolar/hoverlabel/_font.py index fd59e9a887f..dfa7d25a97a 100644 --- a/plotly/graph_objs/barpolar/hoverlabel/_font.py +++ b/plotly/graph_objs/barpolar/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/barpolar/legendgrouptitle/_font.py b/plotly/graph_objs/barpolar/legendgrouptitle/_font.py index 5c097a19a8e..5e30cb44ff9 100644 --- a/plotly/graph_objs/barpolar/legendgrouptitle/_font.py +++ b/plotly/graph_objs/barpolar/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/barpolar/marker/_colorbar.py b/plotly/graph_objs/barpolar/marker/_colorbar.py index c95f81224bb..096a6550b12 100644 --- a/plotly/graph_objs/barpolar/marker/_colorbar.py +++ b/plotly/graph_objs/barpolar/marker/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/barpolar/marker/colorbar/_tickfont.py b/plotly/graph_objs/barpolar/marker/colorbar/_tickfont.py index 3f1bdc9d24b..6645391d78c 100644 --- a/plotly/graph_objs/barpolar/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/barpolar/marker/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/barpolar/marker/colorbar/title/_font.py b/plotly/graph_objs/barpolar/marker/colorbar/title/_font.py index fac5ba93a11..9752acaa45d 100644 --- a/plotly/graph_objs/barpolar/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/barpolar/marker/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/box/_hoverlabel.py b/plotly/graph_objs/box/_hoverlabel.py index 6955298406e..732f4e220e7 100644 --- a/plotly/graph_objs/box/_hoverlabel.py +++ b/plotly/graph_objs/box/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/box/hoverlabel/_font.py b/plotly/graph_objs/box/hoverlabel/_font.py index f4ab0af7113..35c05e4fe5c 100644 --- a/plotly/graph_objs/box/hoverlabel/_font.py +++ b/plotly/graph_objs/box/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/box/legendgrouptitle/_font.py b/plotly/graph_objs/box/legendgrouptitle/_font.py index aa42e3d9f10..1e0120f6182 100644 --- a/plotly/graph_objs/box/legendgrouptitle/_font.py +++ b/plotly/graph_objs/box/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/candlestick/_hoverlabel.py b/plotly/graph_objs/candlestick/_hoverlabel.py index 6208c5d8596..76c515d85f9 100644 --- a/plotly/graph_objs/candlestick/_hoverlabel.py +++ b/plotly/graph_objs/candlestick/_hoverlabel.py @@ -176,7 +176,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/candlestick/hoverlabel/_font.py b/plotly/graph_objs/candlestick/hoverlabel/_font.py index 86e1b5ad71b..24e77fafed3 100644 --- a/plotly/graph_objs/candlestick/hoverlabel/_font.py +++ b/plotly/graph_objs/candlestick/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/candlestick/legendgrouptitle/_font.py b/plotly/graph_objs/candlestick/legendgrouptitle/_font.py index 3026f85f528..c91106b91b3 100644 --- a/plotly/graph_objs/candlestick/legendgrouptitle/_font.py +++ b/plotly/graph_objs/candlestick/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/carpet/_aaxis.py b/plotly/graph_objs/carpet/_aaxis.py index 978ff2da310..e05bfa851dd 100644 --- a/plotly/graph_objs/carpet/_aaxis.py +++ b/plotly/graph_objs/carpet/_aaxis.py @@ -74,7 +74,7 @@ def arraydtick(self): """ The stride between grid lines along the axis - The 'arraydtick' property is a integer and may be specified as: + The 'arraydtick' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] @@ -93,7 +93,7 @@ def arraytick0(self): """ The starting index of grid lines along the axis - The 'arraytick0' property is a integer and may be specified as: + The 'arraytick0' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -475,7 +475,7 @@ def labelpadding(self): """ Extra padding between label and the axis - The 'labelpadding' property is a integer and may be specified as: + The 'labelpadding' property is an integer and may be specified as: - An int (or float that will be cast to an int) Returns @@ -611,7 +611,7 @@ def minorgridcount(self): """ Sets the number of minor grid ticks per major grid tick - The 'minorgridcount' property is a integer and may be specified as: + The 'minorgridcount' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -675,7 +675,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/carpet/_baxis.py b/plotly/graph_objs/carpet/_baxis.py index 4b193f8b9cc..7da6623392a 100644 --- a/plotly/graph_objs/carpet/_baxis.py +++ b/plotly/graph_objs/carpet/_baxis.py @@ -74,7 +74,7 @@ def arraydtick(self): """ The stride between grid lines along the axis - The 'arraydtick' property is a integer and may be specified as: + The 'arraydtick' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] @@ -93,7 +93,7 @@ def arraytick0(self): """ The starting index of grid lines along the axis - The 'arraytick0' property is a integer and may be specified as: + The 'arraytick0' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -475,7 +475,7 @@ def labelpadding(self): """ Extra padding between label and the axis - The 'labelpadding' property is a integer and may be specified as: + The 'labelpadding' property is an integer and may be specified as: - An int (or float that will be cast to an int) Returns @@ -611,7 +611,7 @@ def minorgridcount(self): """ Sets the number of minor grid ticks per major grid tick - The 'minorgridcount' property is a integer and may be specified as: + The 'minorgridcount' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -675,7 +675,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/carpet/_font.py b/plotly/graph_objs/carpet/_font.py index d41425cc7f6..46339843660 100644 --- a/plotly/graph_objs/carpet/_font.py +++ b/plotly/graph_objs/carpet/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/carpet/aaxis/_tickfont.py b/plotly/graph_objs/carpet/aaxis/_tickfont.py index 32256e97f47..8f552c6a883 100644 --- a/plotly/graph_objs/carpet/aaxis/_tickfont.py +++ b/plotly/graph_objs/carpet/aaxis/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/carpet/aaxis/title/_font.py b/plotly/graph_objs/carpet/aaxis/title/_font.py index 398ca780a89..36a79d9cf65 100644 --- a/plotly/graph_objs/carpet/aaxis/title/_font.py +++ b/plotly/graph_objs/carpet/aaxis/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/carpet/baxis/_tickfont.py b/plotly/graph_objs/carpet/baxis/_tickfont.py index 0085dc56018..9d57ff46582 100644 --- a/plotly/graph_objs/carpet/baxis/_tickfont.py +++ b/plotly/graph_objs/carpet/baxis/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/carpet/baxis/title/_font.py b/plotly/graph_objs/carpet/baxis/title/_font.py index 58b35959d5e..e22e6052532 100644 --- a/plotly/graph_objs/carpet/baxis/title/_font.py +++ b/plotly/graph_objs/carpet/baxis/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/carpet/legendgrouptitle/_font.py b/plotly/graph_objs/carpet/legendgrouptitle/_font.py index d8f6eb1859d..081343cad12 100644 --- a/plotly/graph_objs/carpet/legendgrouptitle/_font.py +++ b/plotly/graph_objs/carpet/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/choropleth/_colorbar.py b/plotly/graph_objs/choropleth/_colorbar.py index 40aa56437a4..7ff7c25b367 100644 --- a/plotly/graph_objs/choropleth/_colorbar.py +++ b/plotly/graph_objs/choropleth/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -706,7 +706,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/choropleth/_hoverlabel.py b/plotly/graph_objs/choropleth/_hoverlabel.py index 0c7a22282ed..cdc8f9d37ec 100644 --- a/plotly/graph_objs/choropleth/_hoverlabel.py +++ b/plotly/graph_objs/choropleth/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/choropleth/colorbar/_tickfont.py b/plotly/graph_objs/choropleth/colorbar/_tickfont.py index 48096423fb8..7eddb6ab073 100644 --- a/plotly/graph_objs/choropleth/colorbar/_tickfont.py +++ b/plotly/graph_objs/choropleth/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/choropleth/colorbar/title/_font.py b/plotly/graph_objs/choropleth/colorbar/title/_font.py index 69df048aa6c..e0a79ab0086 100644 --- a/plotly/graph_objs/choropleth/colorbar/title/_font.py +++ b/plotly/graph_objs/choropleth/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/choropleth/hoverlabel/_font.py b/plotly/graph_objs/choropleth/hoverlabel/_font.py index 5892c809ed0..7c7dbcf3bb1 100644 --- a/plotly/graph_objs/choropleth/hoverlabel/_font.py +++ b/plotly/graph_objs/choropleth/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/choropleth/legendgrouptitle/_font.py b/plotly/graph_objs/choropleth/legendgrouptitle/_font.py index 79c05c7d4dd..77718109bef 100644 --- a/plotly/graph_objs/choropleth/legendgrouptitle/_font.py +++ b/plotly/graph_objs/choropleth/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/choroplethmap/_colorbar.py b/plotly/graph_objs/choroplethmap/_colorbar.py index a09c2a27148..b1dfb0ea518 100644 --- a/plotly/graph_objs/choroplethmap/_colorbar.py +++ b/plotly/graph_objs/choroplethmap/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/choroplethmap/_hoverlabel.py b/plotly/graph_objs/choroplethmap/_hoverlabel.py index c1d92e41695..9a0b9532582 100644 --- a/plotly/graph_objs/choroplethmap/_hoverlabel.py +++ b/plotly/graph_objs/choroplethmap/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/choroplethmap/colorbar/_tickfont.py b/plotly/graph_objs/choroplethmap/colorbar/_tickfont.py index b20f689e109..3848b907839 100644 --- a/plotly/graph_objs/choroplethmap/colorbar/_tickfont.py +++ b/plotly/graph_objs/choroplethmap/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/choroplethmap/colorbar/title/_font.py b/plotly/graph_objs/choroplethmap/colorbar/title/_font.py index ff94542fafb..ab8ff46b1ae 100644 --- a/plotly/graph_objs/choroplethmap/colorbar/title/_font.py +++ b/plotly/graph_objs/choroplethmap/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/choroplethmap/hoverlabel/_font.py b/plotly/graph_objs/choroplethmap/hoverlabel/_font.py index dda15f31cc6..cf449e177f1 100644 --- a/plotly/graph_objs/choroplethmap/hoverlabel/_font.py +++ b/plotly/graph_objs/choroplethmap/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/choroplethmap/legendgrouptitle/_font.py b/plotly/graph_objs/choroplethmap/legendgrouptitle/_font.py index 4d2b65b6151..727bfcb660d 100644 --- a/plotly/graph_objs/choroplethmap/legendgrouptitle/_font.py +++ b/plotly/graph_objs/choroplethmap/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/choroplethmapbox/_colorbar.py b/plotly/graph_objs/choroplethmapbox/_colorbar.py index b5df84e382f..bd4371c8dcf 100644 --- a/plotly/graph_objs/choroplethmapbox/_colorbar.py +++ b/plotly/graph_objs/choroplethmapbox/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/choroplethmapbox/_hoverlabel.py b/plotly/graph_objs/choroplethmapbox/_hoverlabel.py index 80cd197708b..38871a7f7df 100644 --- a/plotly/graph_objs/choroplethmapbox/_hoverlabel.py +++ b/plotly/graph_objs/choroplethmapbox/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/choroplethmapbox/colorbar/_tickfont.py b/plotly/graph_objs/choroplethmapbox/colorbar/_tickfont.py index b44c18a7cf3..02e8616983d 100644 --- a/plotly/graph_objs/choroplethmapbox/colorbar/_tickfont.py +++ b/plotly/graph_objs/choroplethmapbox/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/choroplethmapbox/colorbar/title/_font.py b/plotly/graph_objs/choroplethmapbox/colorbar/title/_font.py index 1fd1fc233ad..66740f0432f 100644 --- a/plotly/graph_objs/choroplethmapbox/colorbar/title/_font.py +++ b/plotly/graph_objs/choroplethmapbox/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/choroplethmapbox/hoverlabel/_font.py b/plotly/graph_objs/choroplethmapbox/hoverlabel/_font.py index 20d0759f789..7c70a534fbf 100644 --- a/plotly/graph_objs/choroplethmapbox/hoverlabel/_font.py +++ b/plotly/graph_objs/choroplethmapbox/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/choroplethmapbox/legendgrouptitle/_font.py b/plotly/graph_objs/choroplethmapbox/legendgrouptitle/_font.py index 21b889a3b8d..e6a72dbb488 100644 --- a/plotly/graph_objs/choroplethmapbox/legendgrouptitle/_font.py +++ b/plotly/graph_objs/choroplethmapbox/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/cone/_colorbar.py b/plotly/graph_objs/cone/_colorbar.py index 5433bc9def6..a6809f96651 100644 --- a/plotly/graph_objs/cone/_colorbar.py +++ b/plotly/graph_objs/cone/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/cone/_hoverlabel.py b/plotly/graph_objs/cone/_hoverlabel.py index efc8c36cae1..cb23f67494a 100644 --- a/plotly/graph_objs/cone/_hoverlabel.py +++ b/plotly/graph_objs/cone/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/cone/colorbar/_tickfont.py b/plotly/graph_objs/cone/colorbar/_tickfont.py index 4b287303a6b..bdf5646e838 100644 --- a/plotly/graph_objs/cone/colorbar/_tickfont.py +++ b/plotly/graph_objs/cone/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/cone/colorbar/title/_font.py b/plotly/graph_objs/cone/colorbar/title/_font.py index 08e5f3c8f94..523d1e93ebb 100644 --- a/plotly/graph_objs/cone/colorbar/title/_font.py +++ b/plotly/graph_objs/cone/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/cone/hoverlabel/_font.py b/plotly/graph_objs/cone/hoverlabel/_font.py index b24ef2034ef..b74670be1e3 100644 --- a/plotly/graph_objs/cone/hoverlabel/_font.py +++ b/plotly/graph_objs/cone/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/cone/legendgrouptitle/_font.py b/plotly/graph_objs/cone/legendgrouptitle/_font.py index 90b723a1c2a..2499ed4af48 100644 --- a/plotly/graph_objs/cone/legendgrouptitle/_font.py +++ b/plotly/graph_objs/cone/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/contour/_colorbar.py b/plotly/graph_objs/contour/_colorbar.py index f51584db162..8f59b945705 100644 --- a/plotly/graph_objs/contour/_colorbar.py +++ b/plotly/graph_objs/contour/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/contour/_hoverlabel.py b/plotly/graph_objs/contour/_hoverlabel.py index 7a5d88b7b6c..b1208941b31 100644 --- a/plotly/graph_objs/contour/_hoverlabel.py +++ b/plotly/graph_objs/contour/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/contour/_textfont.py b/plotly/graph_objs/contour/_textfont.py index 281f19b23f1..cc2b34834f5 100644 --- a/plotly/graph_objs/contour/_textfont.py +++ b/plotly/graph_objs/contour/_textfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/contour/colorbar/_tickfont.py b/plotly/graph_objs/contour/colorbar/_tickfont.py index 5d83a6417b1..ad9ad3f7c31 100644 --- a/plotly/graph_objs/contour/colorbar/_tickfont.py +++ b/plotly/graph_objs/contour/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/contour/colorbar/title/_font.py b/plotly/graph_objs/contour/colorbar/title/_font.py index 4d09b4e494e..03a0b3c2ed8 100644 --- a/plotly/graph_objs/contour/colorbar/title/_font.py +++ b/plotly/graph_objs/contour/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/contour/contours/_labelfont.py b/plotly/graph_objs/contour/contours/_labelfont.py index da4331751d1..a8ddf0921aa 100644 --- a/plotly/graph_objs/contour/contours/_labelfont.py +++ b/plotly/graph_objs/contour/contours/_labelfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/contour/hoverlabel/_font.py b/plotly/graph_objs/contour/hoverlabel/_font.py index 6da93a51f8b..cb2e5b2ea83 100644 --- a/plotly/graph_objs/contour/hoverlabel/_font.py +++ b/plotly/graph_objs/contour/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/contour/legendgrouptitle/_font.py b/plotly/graph_objs/contour/legendgrouptitle/_font.py index 71f970064c2..e941552d25f 100644 --- a/plotly/graph_objs/contour/legendgrouptitle/_font.py +++ b/plotly/graph_objs/contour/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/contourcarpet/_colorbar.py b/plotly/graph_objs/contourcarpet/_colorbar.py index 5c18bab1647..aeea1b3d195 100644 --- a/plotly/graph_objs/contourcarpet/_colorbar.py +++ b/plotly/graph_objs/contourcarpet/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/contourcarpet/colorbar/_tickfont.py b/plotly/graph_objs/contourcarpet/colorbar/_tickfont.py index 184293eee45..895eed26b5e 100644 --- a/plotly/graph_objs/contourcarpet/colorbar/_tickfont.py +++ b/plotly/graph_objs/contourcarpet/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/contourcarpet/colorbar/title/_font.py b/plotly/graph_objs/contourcarpet/colorbar/title/_font.py index 673f011f804..a2920f2ce2f 100644 --- a/plotly/graph_objs/contourcarpet/colorbar/title/_font.py +++ b/plotly/graph_objs/contourcarpet/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/contourcarpet/contours/_labelfont.py b/plotly/graph_objs/contourcarpet/contours/_labelfont.py index d880ceb590d..3922c96ad5a 100644 --- a/plotly/graph_objs/contourcarpet/contours/_labelfont.py +++ b/plotly/graph_objs/contourcarpet/contours/_labelfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/contourcarpet/legendgrouptitle/_font.py b/plotly/graph_objs/contourcarpet/legendgrouptitle/_font.py index cf6e1318006..7e6851d5502 100644 --- a/plotly/graph_objs/contourcarpet/legendgrouptitle/_font.py +++ b/plotly/graph_objs/contourcarpet/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/densitymap/_colorbar.py b/plotly/graph_objs/densitymap/_colorbar.py index a50be1e8af4..361eeb8e638 100644 --- a/plotly/graph_objs/densitymap/_colorbar.py +++ b/plotly/graph_objs/densitymap/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -706,7 +706,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/densitymap/_hoverlabel.py b/plotly/graph_objs/densitymap/_hoverlabel.py index a24156ea3ef..d47197b759b 100644 --- a/plotly/graph_objs/densitymap/_hoverlabel.py +++ b/plotly/graph_objs/densitymap/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/densitymap/colorbar/_tickfont.py b/plotly/graph_objs/densitymap/colorbar/_tickfont.py index 26b4695b647..fa755de61e2 100644 --- a/plotly/graph_objs/densitymap/colorbar/_tickfont.py +++ b/plotly/graph_objs/densitymap/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/densitymap/colorbar/title/_font.py b/plotly/graph_objs/densitymap/colorbar/title/_font.py index 903a5466e3d..858505c3dbf 100644 --- a/plotly/graph_objs/densitymap/colorbar/title/_font.py +++ b/plotly/graph_objs/densitymap/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/densitymap/hoverlabel/_font.py b/plotly/graph_objs/densitymap/hoverlabel/_font.py index 6ce680847ec..45584a7f107 100644 --- a/plotly/graph_objs/densitymap/hoverlabel/_font.py +++ b/plotly/graph_objs/densitymap/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/densitymap/legendgrouptitle/_font.py b/plotly/graph_objs/densitymap/legendgrouptitle/_font.py index 3aed80b8ef6..35cc9d85c4b 100644 --- a/plotly/graph_objs/densitymap/legendgrouptitle/_font.py +++ b/plotly/graph_objs/densitymap/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/densitymapbox/_colorbar.py b/plotly/graph_objs/densitymapbox/_colorbar.py index d1a2f791c93..90ebc99d354 100644 --- a/plotly/graph_objs/densitymapbox/_colorbar.py +++ b/plotly/graph_objs/densitymapbox/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/densitymapbox/_hoverlabel.py b/plotly/graph_objs/densitymapbox/_hoverlabel.py index c026e0bf01f..57c094b7188 100644 --- a/plotly/graph_objs/densitymapbox/_hoverlabel.py +++ b/plotly/graph_objs/densitymapbox/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/densitymapbox/colorbar/_tickfont.py b/plotly/graph_objs/densitymapbox/colorbar/_tickfont.py index 046dc4fc269..26fbfb9c656 100644 --- a/plotly/graph_objs/densitymapbox/colorbar/_tickfont.py +++ b/plotly/graph_objs/densitymapbox/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/densitymapbox/colorbar/title/_font.py b/plotly/graph_objs/densitymapbox/colorbar/title/_font.py index f3d719ef9b6..b5c6c9a596d 100644 --- a/plotly/graph_objs/densitymapbox/colorbar/title/_font.py +++ b/plotly/graph_objs/densitymapbox/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/densitymapbox/hoverlabel/_font.py b/plotly/graph_objs/densitymapbox/hoverlabel/_font.py index 84548e8490c..5ddcdc549f8 100644 --- a/plotly/graph_objs/densitymapbox/hoverlabel/_font.py +++ b/plotly/graph_objs/densitymapbox/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/densitymapbox/legendgrouptitle/_font.py b/plotly/graph_objs/densitymapbox/legendgrouptitle/_font.py index 70b46b792ec..49e1851be4d 100644 --- a/plotly/graph_objs/densitymapbox/legendgrouptitle/_font.py +++ b/plotly/graph_objs/densitymapbox/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/funnel/_hoverlabel.py b/plotly/graph_objs/funnel/_hoverlabel.py index 1ae4dadae04..4fb5507fc6a 100644 --- a/plotly/graph_objs/funnel/_hoverlabel.py +++ b/plotly/graph_objs/funnel/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/funnel/_insidetextfont.py b/plotly/graph_objs/funnel/_insidetextfont.py index 1ab68aa40cf..29c8db44f63 100644 --- a/plotly/graph_objs/funnel/_insidetextfont.py +++ b/plotly/graph_objs/funnel/_insidetextfont.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/funnel/_outsidetextfont.py b/plotly/graph_objs/funnel/_outsidetextfont.py index a413cf4b750..0b30278990b 100644 --- a/plotly/graph_objs/funnel/_outsidetextfont.py +++ b/plotly/graph_objs/funnel/_outsidetextfont.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/funnel/_textfont.py b/plotly/graph_objs/funnel/_textfont.py index c7f91d3dca6..8ecb9045683 100644 --- a/plotly/graph_objs/funnel/_textfont.py +++ b/plotly/graph_objs/funnel/_textfont.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/funnel/hoverlabel/_font.py b/plotly/graph_objs/funnel/hoverlabel/_font.py index fda32537eae..d0e99ebc0c0 100644 --- a/plotly/graph_objs/funnel/hoverlabel/_font.py +++ b/plotly/graph_objs/funnel/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/funnel/legendgrouptitle/_font.py b/plotly/graph_objs/funnel/legendgrouptitle/_font.py index de2957ba1c5..ca0aef1833e 100644 --- a/plotly/graph_objs/funnel/legendgrouptitle/_font.py +++ b/plotly/graph_objs/funnel/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/funnel/marker/_colorbar.py b/plotly/graph_objs/funnel/marker/_colorbar.py index 3a5d33c3883..6951c578a2a 100644 --- a/plotly/graph_objs/funnel/marker/_colorbar.py +++ b/plotly/graph_objs/funnel/marker/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/funnel/marker/colorbar/_tickfont.py b/plotly/graph_objs/funnel/marker/colorbar/_tickfont.py index 57aa294a208..34167b371c7 100644 --- a/plotly/graph_objs/funnel/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/funnel/marker/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/funnel/marker/colorbar/title/_font.py b/plotly/graph_objs/funnel/marker/colorbar/title/_font.py index b107d09e188..21667bdf98d 100644 --- a/plotly/graph_objs/funnel/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/funnel/marker/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/funnelarea/_domain.py b/plotly/graph_objs/funnelarea/_domain.py index e83dc2da30a..1da78250beb 100644 --- a/plotly/graph_objs/funnelarea/_domain.py +++ b/plotly/graph_objs/funnelarea/_domain.py @@ -16,7 +16,7 @@ def column(self): If there is a layout grid, use the domain for this column in the grid for this funnelarea trace . - The 'column' property is a integer and may be specified as: + The 'column' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -36,7 +36,7 @@ def row(self): If there is a layout grid, use the domain for this row in the grid for this funnelarea trace . - The 'row' property is a integer and may be specified as: + The 'row' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/funnelarea/_hoverlabel.py b/plotly/graph_objs/funnelarea/_hoverlabel.py index f43eefaac06..5b32097e33e 100644 --- a/plotly/graph_objs/funnelarea/_hoverlabel.py +++ b/plotly/graph_objs/funnelarea/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/funnelarea/_insidetextfont.py b/plotly/graph_objs/funnelarea/_insidetextfont.py index 0aa7f8f687e..b94dc2b88c6 100644 --- a/plotly/graph_objs/funnelarea/_insidetextfont.py +++ b/plotly/graph_objs/funnelarea/_insidetextfont.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/funnelarea/_textfont.py b/plotly/graph_objs/funnelarea/_textfont.py index 7b61d3398eb..b6141fba899 100644 --- a/plotly/graph_objs/funnelarea/_textfont.py +++ b/plotly/graph_objs/funnelarea/_textfont.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/funnelarea/hoverlabel/_font.py b/plotly/graph_objs/funnelarea/hoverlabel/_font.py index 63dcb4f8493..0170e819672 100644 --- a/plotly/graph_objs/funnelarea/hoverlabel/_font.py +++ b/plotly/graph_objs/funnelarea/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/funnelarea/legendgrouptitle/_font.py b/plotly/graph_objs/funnelarea/legendgrouptitle/_font.py index 5b01415fc80..db9bd08d577 100644 --- a/plotly/graph_objs/funnelarea/legendgrouptitle/_font.py +++ b/plotly/graph_objs/funnelarea/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/funnelarea/title/_font.py b/plotly/graph_objs/funnelarea/title/_font.py index 0b90b88965d..880a746aec9 100644 --- a/plotly/graph_objs/funnelarea/title/_font.py +++ b/plotly/graph_objs/funnelarea/title/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/heatmap/_colorbar.py b/plotly/graph_objs/heatmap/_colorbar.py index aca204d457c..6ad91b72442 100644 --- a/plotly/graph_objs/heatmap/_colorbar.py +++ b/plotly/graph_objs/heatmap/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/heatmap/_hoverlabel.py b/plotly/graph_objs/heatmap/_hoverlabel.py index 9e12a018237..1a5392a23e6 100644 --- a/plotly/graph_objs/heatmap/_hoverlabel.py +++ b/plotly/graph_objs/heatmap/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/heatmap/_textfont.py b/plotly/graph_objs/heatmap/_textfont.py index b09281c0993..6135299fb8b 100644 --- a/plotly/graph_objs/heatmap/_textfont.py +++ b/plotly/graph_objs/heatmap/_textfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/heatmap/colorbar/_tickfont.py b/plotly/graph_objs/heatmap/colorbar/_tickfont.py index 807c1e205a0..acf331e3e7f 100644 --- a/plotly/graph_objs/heatmap/colorbar/_tickfont.py +++ b/plotly/graph_objs/heatmap/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/heatmap/colorbar/title/_font.py b/plotly/graph_objs/heatmap/colorbar/title/_font.py index cd5653f77c6..a2bc99361a4 100644 --- a/plotly/graph_objs/heatmap/colorbar/title/_font.py +++ b/plotly/graph_objs/heatmap/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/heatmap/hoverlabel/_font.py b/plotly/graph_objs/heatmap/hoverlabel/_font.py index 7885449e206..23ada6d8b04 100644 --- a/plotly/graph_objs/heatmap/hoverlabel/_font.py +++ b/plotly/graph_objs/heatmap/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/heatmap/legendgrouptitle/_font.py b/plotly/graph_objs/heatmap/legendgrouptitle/_font.py index 681209c2299..7ec0ed0870f 100644 --- a/plotly/graph_objs/heatmap/legendgrouptitle/_font.py +++ b/plotly/graph_objs/heatmap/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/histogram/_error_x.py b/plotly/graph_objs/histogram/_error_x.py index d9d418e3b03..69e0b16e8dc 100644 --- a/plotly/graph_objs/histogram/_error_x.py +++ b/plotly/graph_objs/histogram/_error_x.py @@ -181,7 +181,7 @@ def thickness(self, val): @property def traceref(self): """ - The 'traceref' property is a integer and may be specified as: + The 'traceref' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -198,7 +198,7 @@ def traceref(self, val): @property def tracerefminus(self): """ - The 'tracerefminus' property is a integer and may be specified as: + The 'tracerefminus' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/histogram/_error_y.py b/plotly/graph_objs/histogram/_error_y.py index e37b0d95cac..0d23105ca8c 100644 --- a/plotly/graph_objs/histogram/_error_y.py +++ b/plotly/graph_objs/histogram/_error_y.py @@ -164,7 +164,7 @@ def thickness(self, val): @property def traceref(self): """ - The 'traceref' property is a integer and may be specified as: + The 'traceref' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -181,7 +181,7 @@ def traceref(self, val): @property def tracerefminus(self): """ - The 'tracerefminus' property is a integer and may be specified as: + The 'tracerefminus' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/histogram/_hoverlabel.py b/plotly/graph_objs/histogram/_hoverlabel.py index 181b86c82e8..a457d91415d 100644 --- a/plotly/graph_objs/histogram/_hoverlabel.py +++ b/plotly/graph_objs/histogram/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/histogram/_insidetextfont.py b/plotly/graph_objs/histogram/_insidetextfont.py index f7d9c8374ac..33be8708db6 100644 --- a/plotly/graph_objs/histogram/_insidetextfont.py +++ b/plotly/graph_objs/histogram/_insidetextfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/histogram/_outsidetextfont.py b/plotly/graph_objs/histogram/_outsidetextfont.py index ae088ec2dbe..f38ec9f240d 100644 --- a/plotly/graph_objs/histogram/_outsidetextfont.py +++ b/plotly/graph_objs/histogram/_outsidetextfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/histogram/_textfont.py b/plotly/graph_objs/histogram/_textfont.py index dcacc29c1b8..e122e486a91 100644 --- a/plotly/graph_objs/histogram/_textfont.py +++ b/plotly/graph_objs/histogram/_textfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/histogram/hoverlabel/_font.py b/plotly/graph_objs/histogram/hoverlabel/_font.py index 0e6c08b423c..af8f7eb1194 100644 --- a/plotly/graph_objs/histogram/hoverlabel/_font.py +++ b/plotly/graph_objs/histogram/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/histogram/legendgrouptitle/_font.py b/plotly/graph_objs/histogram/legendgrouptitle/_font.py index 20e04524300..4c897f84f25 100644 --- a/plotly/graph_objs/histogram/legendgrouptitle/_font.py +++ b/plotly/graph_objs/histogram/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/histogram/marker/_colorbar.py b/plotly/graph_objs/histogram/marker/_colorbar.py index 736ad46764b..ad6d5eedaf0 100644 --- a/plotly/graph_objs/histogram/marker/_colorbar.py +++ b/plotly/graph_objs/histogram/marker/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/histogram/marker/colorbar/_tickfont.py b/plotly/graph_objs/histogram/marker/colorbar/_tickfont.py index 8d282ee38b9..881deedbe2f 100644 --- a/plotly/graph_objs/histogram/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/histogram/marker/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/histogram/marker/colorbar/title/_font.py b/plotly/graph_objs/histogram/marker/colorbar/title/_font.py index aaa57f41679..62c52e7da42 100644 --- a/plotly/graph_objs/histogram/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/histogram/marker/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/histogram2d/_colorbar.py b/plotly/graph_objs/histogram2d/_colorbar.py index 2d154c94ef4..e3806ecc4a5 100644 --- a/plotly/graph_objs/histogram2d/_colorbar.py +++ b/plotly/graph_objs/histogram2d/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/histogram2d/_hoverlabel.py b/plotly/graph_objs/histogram2d/_hoverlabel.py index 1992a00d2d7..bb2b0a21b2e 100644 --- a/plotly/graph_objs/histogram2d/_hoverlabel.py +++ b/plotly/graph_objs/histogram2d/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/histogram2d/_textfont.py b/plotly/graph_objs/histogram2d/_textfont.py index 047d5b0f1fe..17990f39742 100644 --- a/plotly/graph_objs/histogram2d/_textfont.py +++ b/plotly/graph_objs/histogram2d/_textfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/histogram2d/colorbar/_tickfont.py b/plotly/graph_objs/histogram2d/colorbar/_tickfont.py index 5e74d76bcae..e29c6990de1 100644 --- a/plotly/graph_objs/histogram2d/colorbar/_tickfont.py +++ b/plotly/graph_objs/histogram2d/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/histogram2d/colorbar/title/_font.py b/plotly/graph_objs/histogram2d/colorbar/title/_font.py index 2e0dd20e832..05738279bf7 100644 --- a/plotly/graph_objs/histogram2d/colorbar/title/_font.py +++ b/plotly/graph_objs/histogram2d/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/histogram2d/hoverlabel/_font.py b/plotly/graph_objs/histogram2d/hoverlabel/_font.py index 0aded409b07..1977f6f1c70 100644 --- a/plotly/graph_objs/histogram2d/hoverlabel/_font.py +++ b/plotly/graph_objs/histogram2d/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/histogram2d/legendgrouptitle/_font.py b/plotly/graph_objs/histogram2d/legendgrouptitle/_font.py index e1eda6945a6..3c0fc24066c 100644 --- a/plotly/graph_objs/histogram2d/legendgrouptitle/_font.py +++ b/plotly/graph_objs/histogram2d/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/histogram2dcontour/_colorbar.py b/plotly/graph_objs/histogram2dcontour/_colorbar.py index 8f286c2f921..d120ed8e5e7 100644 --- a/plotly/graph_objs/histogram2dcontour/_colorbar.py +++ b/plotly/graph_objs/histogram2dcontour/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/histogram2dcontour/_hoverlabel.py b/plotly/graph_objs/histogram2dcontour/_hoverlabel.py index 907db44d7d9..1b7b86e5608 100644 --- a/plotly/graph_objs/histogram2dcontour/_hoverlabel.py +++ b/plotly/graph_objs/histogram2dcontour/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/histogram2dcontour/_textfont.py b/plotly/graph_objs/histogram2dcontour/_textfont.py index 36f7542b158..197a8a96ba2 100644 --- a/plotly/graph_objs/histogram2dcontour/_textfont.py +++ b/plotly/graph_objs/histogram2dcontour/_textfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/histogram2dcontour/colorbar/_tickfont.py b/plotly/graph_objs/histogram2dcontour/colorbar/_tickfont.py index 164e6ba240d..7bf73efe313 100644 --- a/plotly/graph_objs/histogram2dcontour/colorbar/_tickfont.py +++ b/plotly/graph_objs/histogram2dcontour/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/histogram2dcontour/colorbar/title/_font.py b/plotly/graph_objs/histogram2dcontour/colorbar/title/_font.py index 8c9e8185fd8..ec7f1446e6d 100644 --- a/plotly/graph_objs/histogram2dcontour/colorbar/title/_font.py +++ b/plotly/graph_objs/histogram2dcontour/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/histogram2dcontour/contours/_labelfont.py b/plotly/graph_objs/histogram2dcontour/contours/_labelfont.py index 96bc43bd587..fca22a3c2a3 100644 --- a/plotly/graph_objs/histogram2dcontour/contours/_labelfont.py +++ b/plotly/graph_objs/histogram2dcontour/contours/_labelfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/histogram2dcontour/hoverlabel/_font.py b/plotly/graph_objs/histogram2dcontour/hoverlabel/_font.py index 3697c6bb9eb..30babef2a17 100644 --- a/plotly/graph_objs/histogram2dcontour/hoverlabel/_font.py +++ b/plotly/graph_objs/histogram2dcontour/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/histogram2dcontour/legendgrouptitle/_font.py b/plotly/graph_objs/histogram2dcontour/legendgrouptitle/_font.py index 79fa0f4ed1c..1adaa2be16d 100644 --- a/plotly/graph_objs/histogram2dcontour/legendgrouptitle/_font.py +++ b/plotly/graph_objs/histogram2dcontour/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/icicle/_domain.py b/plotly/graph_objs/icicle/_domain.py index 82640ceeb87..b6136f2b9f5 100644 --- a/plotly/graph_objs/icicle/_domain.py +++ b/plotly/graph_objs/icicle/_domain.py @@ -16,7 +16,7 @@ def column(self): If there is a layout grid, use the domain for this column in the grid for this icicle trace . - The 'column' property is a integer and may be specified as: + The 'column' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -36,7 +36,7 @@ def row(self): If there is a layout grid, use the domain for this row in the grid for this icicle trace . - The 'row' property is a integer and may be specified as: + The 'row' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/icicle/_hoverlabel.py b/plotly/graph_objs/icicle/_hoverlabel.py index 0fadea6a887..b306ad6feec 100644 --- a/plotly/graph_objs/icicle/_hoverlabel.py +++ b/plotly/graph_objs/icicle/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/icicle/_insidetextfont.py b/plotly/graph_objs/icicle/_insidetextfont.py index 6be98515d4c..419dd4de3d3 100644 --- a/plotly/graph_objs/icicle/_insidetextfont.py +++ b/plotly/graph_objs/icicle/_insidetextfont.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/icicle/_outsidetextfont.py b/plotly/graph_objs/icicle/_outsidetextfont.py index 2e226d09aa4..eb70680dbe3 100644 --- a/plotly/graph_objs/icicle/_outsidetextfont.py +++ b/plotly/graph_objs/icicle/_outsidetextfont.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/icicle/_textfont.py b/plotly/graph_objs/icicle/_textfont.py index 5818410ead8..3c3655263c6 100644 --- a/plotly/graph_objs/icicle/_textfont.py +++ b/plotly/graph_objs/icicle/_textfont.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/icicle/hoverlabel/_font.py b/plotly/graph_objs/icicle/hoverlabel/_font.py index c4253a2bfdb..3da46e745b2 100644 --- a/plotly/graph_objs/icicle/hoverlabel/_font.py +++ b/plotly/graph_objs/icicle/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/icicle/legendgrouptitle/_font.py b/plotly/graph_objs/icicle/legendgrouptitle/_font.py index cbeb577b506..58269a03a47 100644 --- a/plotly/graph_objs/icicle/legendgrouptitle/_font.py +++ b/plotly/graph_objs/icicle/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/icicle/marker/_colorbar.py b/plotly/graph_objs/icicle/marker/_colorbar.py index 5ea9b15a76d..34c5cb63ec0 100644 --- a/plotly/graph_objs/icicle/marker/_colorbar.py +++ b/plotly/graph_objs/icicle/marker/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/icicle/marker/colorbar/_tickfont.py b/plotly/graph_objs/icicle/marker/colorbar/_tickfont.py index 03caedc631d..6ca094dfd94 100644 --- a/plotly/graph_objs/icicle/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/icicle/marker/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/icicle/marker/colorbar/title/_font.py b/plotly/graph_objs/icicle/marker/colorbar/title/_font.py index 8d4fec62b14..4bdf389d810 100644 --- a/plotly/graph_objs/icicle/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/icicle/marker/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/icicle/pathbar/_textfont.py b/plotly/graph_objs/icicle/pathbar/_textfont.py index 8df72ddfbce..fe6aefdd078 100644 --- a/plotly/graph_objs/icicle/pathbar/_textfont.py +++ b/plotly/graph_objs/icicle/pathbar/_textfont.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/image/_hoverlabel.py b/plotly/graph_objs/image/_hoverlabel.py index 0dc3ec89268..dea1227cade 100644 --- a/plotly/graph_objs/image/_hoverlabel.py +++ b/plotly/graph_objs/image/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/image/hoverlabel/_font.py b/plotly/graph_objs/image/hoverlabel/_font.py index 1eb363feb63..2fd6ef82b05 100644 --- a/plotly/graph_objs/image/hoverlabel/_font.py +++ b/plotly/graph_objs/image/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/image/legendgrouptitle/_font.py b/plotly/graph_objs/image/legendgrouptitle/_font.py index c3a46b36fd4..27359b6017e 100644 --- a/plotly/graph_objs/image/legendgrouptitle/_font.py +++ b/plotly/graph_objs/image/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/indicator/_domain.py b/plotly/graph_objs/indicator/_domain.py index 1aaf4e66a6f..00b9ae77850 100644 --- a/plotly/graph_objs/indicator/_domain.py +++ b/plotly/graph_objs/indicator/_domain.py @@ -16,7 +16,7 @@ def column(self): If there is a layout grid, use the domain for this column in the grid for this indicator trace . - The 'column' property is a integer and may be specified as: + The 'column' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -36,7 +36,7 @@ def row(self): If there is a layout grid, use the domain for this row in the grid for this indicator trace . - The 'row' property is a integer and may be specified as: + The 'row' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/indicator/delta/_font.py b/plotly/graph_objs/indicator/delta/_font.py index a30bb94a028..d24c0b1cdbd 100644 --- a/plotly/graph_objs/indicator/delta/_font.py +++ b/plotly/graph_objs/indicator/delta/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/indicator/gauge/_axis.py b/plotly/graph_objs/indicator/gauge/_axis.py index 118be6f7b36..391b299f996 100644 --- a/plotly/graph_objs/indicator/gauge/_axis.py +++ b/plotly/graph_objs/indicator/gauge/_axis.py @@ -157,7 +157,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -464,7 +464,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/indicator/gauge/axis/_tickfont.py b/plotly/graph_objs/indicator/gauge/axis/_tickfont.py index 22ed5464c84..93f26eb07f7 100644 --- a/plotly/graph_objs/indicator/gauge/axis/_tickfont.py +++ b/plotly/graph_objs/indicator/gauge/axis/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/indicator/legendgrouptitle/_font.py b/plotly/graph_objs/indicator/legendgrouptitle/_font.py index 6cd1574605b..f8045ff90aa 100644 --- a/plotly/graph_objs/indicator/legendgrouptitle/_font.py +++ b/plotly/graph_objs/indicator/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/indicator/number/_font.py b/plotly/graph_objs/indicator/number/_font.py index 48dedbdd946..57ca3baa043 100644 --- a/plotly/graph_objs/indicator/number/_font.py +++ b/plotly/graph_objs/indicator/number/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/indicator/title/_font.py b/plotly/graph_objs/indicator/title/_font.py index 4407ab238f3..5e91d6bcc4a 100644 --- a/plotly/graph_objs/indicator/title/_font.py +++ b/plotly/graph_objs/indicator/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/isosurface/_colorbar.py b/plotly/graph_objs/isosurface/_colorbar.py index 9faba4c3cd3..a9fe84b7e01 100644 --- a/plotly/graph_objs/isosurface/_colorbar.py +++ b/plotly/graph_objs/isosurface/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -706,7 +706,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/isosurface/_hoverlabel.py b/plotly/graph_objs/isosurface/_hoverlabel.py index 7328d3be35b..f8dc0cb3473 100644 --- a/plotly/graph_objs/isosurface/_hoverlabel.py +++ b/plotly/graph_objs/isosurface/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/isosurface/_surface.py b/plotly/graph_objs/isosurface/_surface.py index 9f28e9a2976..4d26cfca6ad 100644 --- a/plotly/graph_objs/isosurface/_surface.py +++ b/plotly/graph_objs/isosurface/_surface.py @@ -17,7 +17,7 @@ def count(self): iso-values. By default this value is 2 meaning that only minimum and maximum surfaces would be drawn. - The 'count' property is a integer and may be specified as: + The 'count' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/isosurface/colorbar/_tickfont.py b/plotly/graph_objs/isosurface/colorbar/_tickfont.py index 16009fe9a69..8997fb153c9 100644 --- a/plotly/graph_objs/isosurface/colorbar/_tickfont.py +++ b/plotly/graph_objs/isosurface/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/isosurface/colorbar/title/_font.py b/plotly/graph_objs/isosurface/colorbar/title/_font.py index 1ee65dfbabc..de9ed018b38 100644 --- a/plotly/graph_objs/isosurface/colorbar/title/_font.py +++ b/plotly/graph_objs/isosurface/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/isosurface/hoverlabel/_font.py b/plotly/graph_objs/isosurface/hoverlabel/_font.py index a5ca3526aa9..26f995a422b 100644 --- a/plotly/graph_objs/isosurface/hoverlabel/_font.py +++ b/plotly/graph_objs/isosurface/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/isosurface/legendgrouptitle/_font.py b/plotly/graph_objs/isosurface/legendgrouptitle/_font.py index 229756707b8..b6294188f2e 100644 --- a/plotly/graph_objs/isosurface/legendgrouptitle/_font.py +++ b/plotly/graph_objs/isosurface/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/_annotation.py b/plotly/graph_objs/layout/_annotation.py index 981373d9f53..655336c5ad6 100644 --- a/plotly/graph_objs/layout/_annotation.py +++ b/plotly/graph_objs/layout/_annotation.py @@ -103,7 +103,7 @@ def arrowhead(self): """ Sets the end annotation arrow head style. - The 'arrowhead' property is a integer and may be specified as: + The 'arrowhead' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 8] @@ -604,7 +604,7 @@ def startarrowhead(self): """ Sets the start annotation arrow head style. - The 'startarrowhead' property is a integer and may be specified as: + The 'startarrowhead' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 8] diff --git a/plotly/graph_objs/layout/_font.py b/plotly/graph_objs/layout/_font.py index c691e7018c7..6b30b57bc87 100644 --- a/plotly/graph_objs/layout/_font.py +++ b/plotly/graph_objs/layout/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/_grid.py b/plotly/graph_objs/layout/_grid.py index 8788027b3a4..459c27901e9 100644 --- a/plotly/graph_objs/layout/_grid.py +++ b/plotly/graph_objs/layout/_grid.py @@ -33,7 +33,7 @@ def columns(self): if you want to leave a row at the end for non-cartesian subplots. - The 'columns' property is a integer and may be specified as: + The 'columns' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] @@ -118,7 +118,7 @@ def rows(self): But it's also possible to have a different length, if you want to leave a row at the end for non-cartesian subplots. - The 'rows' property is a integer and may be specified as: + The 'rows' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/layout/_hoverlabel.py b/plotly/graph_objs/layout/_hoverlabel.py index 644ed5469b4..25dfa4c8741 100644 --- a/plotly/graph_objs/layout/_hoverlabel.py +++ b/plotly/graph_objs/layout/_hoverlabel.py @@ -137,7 +137,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] diff --git a/plotly/graph_objs/layout/_updatemenu.py b/plotly/graph_objs/layout/_updatemenu.py index fe5abd7960e..2adb4566be8 100644 --- a/plotly/graph_objs/layout/_updatemenu.py +++ b/plotly/graph_objs/layout/_updatemenu.py @@ -35,7 +35,7 @@ def active(self): Determines which button (by index starting from 0) is considered active. - The 'active' property is a integer and may be specified as: + The 'active' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] diff --git a/plotly/graph_objs/layout/_xaxis.py b/plotly/graph_objs/layout/_xaxis.py index a146cb6898a..e04ba73306e 100644 --- a/plotly/graph_objs/layout/_xaxis.py +++ b/plotly/graph_objs/layout/_xaxis.py @@ -951,7 +951,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -1688,7 +1688,7 @@ def ticklabelindex(self): ends with each major tick instead of the period that begins there. - The 'ticklabelindex' property is a integer and may be specified as: + The 'ticklabelindex' property is an integer and may be specified as: - An int (or float that will be cast to an int) - A tuple, list, or one-dimensional numpy array of the above @@ -1802,7 +1802,7 @@ def ticklabelshift(self): parallel to the axis. Positive values move the labels in the positive direction of the axis. - The 'ticklabelshift' property is a integer and may be specified as: + The 'ticklabelshift' property is an integer and may be specified as: - An int (or float that will be cast to an int) Returns @@ -1828,7 +1828,7 @@ def ticklabelstandoff(self): the outside. If the negative value is large enough, inside ticks can even end up outside and vice versa. - The 'ticklabelstandoff' property is a integer and may be specified as: + The 'ticklabelstandoff' property is an integer and may be specified as: - An int (or float that will be cast to an int) Returns @@ -1851,7 +1851,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/layout/_yaxis.py b/plotly/graph_objs/layout/_yaxis.py index 4e81f347a4e..2d2a094ad2e 100644 --- a/plotly/graph_objs/layout/_yaxis.py +++ b/plotly/graph_objs/layout/_yaxis.py @@ -973,7 +973,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -1696,7 +1696,7 @@ def ticklabelindex(self): ends with each major tick instead of the period that begins there. - The 'ticklabelindex' property is a integer and may be specified as: + The 'ticklabelindex' property is an integer and may be specified as: - An int (or float that will be cast to an int) - A tuple, list, or one-dimensional numpy array of the above @@ -1810,7 +1810,7 @@ def ticklabelshift(self): parallel to the axis. Positive values move the labels in the positive direction of the axis. - The 'ticklabelshift' property is a integer and may be specified as: + The 'ticklabelshift' property is an integer and may be specified as: - An int (or float that will be cast to an int) Returns @@ -1836,7 +1836,7 @@ def ticklabelstandoff(self): the outside. If the negative value is large enough, inside ticks can even end up outside and vice versa. - The 'ticklabelstandoff' property is a integer and may be specified as: + The 'ticklabelstandoff' property is an integer and may be specified as: - An int (or float that will be cast to an int) Returns @@ -1859,7 +1859,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/layout/annotation/_font.py b/plotly/graph_objs/layout/annotation/_font.py index 736edb1bfb0..bda1706c7ba 100644 --- a/plotly/graph_objs/layout/annotation/_font.py +++ b/plotly/graph_objs/layout/annotation/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/annotation/hoverlabel/_font.py b/plotly/graph_objs/layout/annotation/hoverlabel/_font.py index b3a561eb679..6874277e3b6 100644 --- a/plotly/graph_objs/layout/annotation/hoverlabel/_font.py +++ b/plotly/graph_objs/layout/annotation/hoverlabel/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/coloraxis/_colorbar.py b/plotly/graph_objs/layout/coloraxis/_colorbar.py index bbab216a7ef..bda8c40be85 100644 --- a/plotly/graph_objs/layout/coloraxis/_colorbar.py +++ b/plotly/graph_objs/layout/coloraxis/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/layout/coloraxis/colorbar/_tickfont.py b/plotly/graph_objs/layout/coloraxis/colorbar/_tickfont.py index 146bfec8bd7..9d37ed2d997 100644 --- a/plotly/graph_objs/layout/coloraxis/colorbar/_tickfont.py +++ b/plotly/graph_objs/layout/coloraxis/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/coloraxis/colorbar/title/_font.py b/plotly/graph_objs/layout/coloraxis/colorbar/title/_font.py index d151ff393b2..c69838cee4a 100644 --- a/plotly/graph_objs/layout/coloraxis/colorbar/title/_font.py +++ b/plotly/graph_objs/layout/coloraxis/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/geo/_domain.py b/plotly/graph_objs/layout/geo/_domain.py index 1869b41f12f..baafe790617 100644 --- a/plotly/graph_objs/layout/geo/_domain.py +++ b/plotly/graph_objs/layout/geo/_domain.py @@ -19,7 +19,7 @@ def column(self): set to 1. a map will fit either its x or y domain, but not both. - The 'column' property is a integer and may be specified as: + The 'column' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -42,7 +42,7 @@ def row(self): set to 1. a map will fit either its x or y domain, but not both. - The 'row' property is a integer and may be specified as: + The 'row' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/layout/hoverlabel/_font.py b/plotly/graph_objs/layout/hoverlabel/_font.py index afaef5d4a2e..9da73a7cf04 100644 --- a/plotly/graph_objs/layout/hoverlabel/_font.py +++ b/plotly/graph_objs/layout/hoverlabel/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/hoverlabel/_grouptitlefont.py b/plotly/graph_objs/layout/hoverlabel/_grouptitlefont.py index f1aae36ca2b..b90e974f83b 100644 --- a/plotly/graph_objs/layout/hoverlabel/_grouptitlefont.py +++ b/plotly/graph_objs/layout/hoverlabel/_grouptitlefont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/legend/_font.py b/plotly/graph_objs/layout/legend/_font.py index 5b1eedf3214..5cfb85e00f4 100644 --- a/plotly/graph_objs/layout/legend/_font.py +++ b/plotly/graph_objs/layout/legend/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/legend/_grouptitlefont.py b/plotly/graph_objs/layout/legend/_grouptitlefont.py index 1dc128570fe..cc784c42fe0 100644 --- a/plotly/graph_objs/layout/legend/_grouptitlefont.py +++ b/plotly/graph_objs/layout/legend/_grouptitlefont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/legend/title/_font.py b/plotly/graph_objs/layout/legend/title/_font.py index 1deec6aa4d9..988ffc8c0f2 100644 --- a/plotly/graph_objs/layout/legend/title/_font.py +++ b/plotly/graph_objs/layout/legend/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/map/_domain.py b/plotly/graph_objs/layout/map/_domain.py index 9baf6eaad13..085d7153a33 100644 --- a/plotly/graph_objs/layout/map/_domain.py +++ b/plotly/graph_objs/layout/map/_domain.py @@ -16,7 +16,7 @@ def column(self): If there is a layout grid, use the domain for this column in the grid for this map subplot . - The 'column' property is a integer and may be specified as: + The 'column' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -36,7 +36,7 @@ def row(self): If there is a layout grid, use the domain for this row in the grid for this map subplot . - The 'row' property is a integer and may be specified as: + The 'row' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/layout/map/layer/symbol/_textfont.py b/plotly/graph_objs/layout/map/layer/symbol/_textfont.py index 911cbcd757b..07456ea4a38 100644 --- a/plotly/graph_objs/layout/map/layer/symbol/_textfont.py +++ b/plotly/graph_objs/layout/map/layer/symbol/_textfont.py @@ -93,7 +93,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/mapbox/_domain.py b/plotly/graph_objs/layout/mapbox/_domain.py index 371af697c7b..48119def202 100644 --- a/plotly/graph_objs/layout/mapbox/_domain.py +++ b/plotly/graph_objs/layout/mapbox/_domain.py @@ -16,7 +16,7 @@ def column(self): If there is a layout grid, use the domain for this column in the grid for this mapbox subplot . - The 'column' property is a integer and may be specified as: + The 'column' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -36,7 +36,7 @@ def row(self): If there is a layout grid, use the domain for this row in the grid for this mapbox subplot . - The 'row' property is a integer and may be specified as: + The 'row' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/layout/mapbox/layer/symbol/_textfont.py b/plotly/graph_objs/layout/mapbox/layer/symbol/_textfont.py index 473535eba75..d2ae719c6d7 100644 --- a/plotly/graph_objs/layout/mapbox/layer/symbol/_textfont.py +++ b/plotly/graph_objs/layout/mapbox/layer/symbol/_textfont.py @@ -93,7 +93,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/newshape/label/_font.py b/plotly/graph_objs/layout/newshape/label/_font.py index 91e49defa33..9b2ee7eb7c1 100644 --- a/plotly/graph_objs/layout/newshape/label/_font.py +++ b/plotly/graph_objs/layout/newshape/label/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/newshape/legendgrouptitle/_font.py b/plotly/graph_objs/layout/newshape/legendgrouptitle/_font.py index 879c619b704..7d7e4842434 100644 --- a/plotly/graph_objs/layout/newshape/legendgrouptitle/_font.py +++ b/plotly/graph_objs/layout/newshape/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/polar/_angularaxis.py b/plotly/graph_objs/layout/polar/_angularaxis.py index d63eba9731d..8515457e2fe 100644 --- a/plotly/graph_objs/layout/polar/_angularaxis.py +++ b/plotly/graph_objs/layout/polar/_angularaxis.py @@ -499,7 +499,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -883,7 +883,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/layout/polar/_domain.py b/plotly/graph_objs/layout/polar/_domain.py index 0fd15cf2575..2f2499d03fb 100644 --- a/plotly/graph_objs/layout/polar/_domain.py +++ b/plotly/graph_objs/layout/polar/_domain.py @@ -16,7 +16,7 @@ def column(self): If there is a layout grid, use the domain for this column in the grid for this polar subplot . - The 'column' property is a integer and may be specified as: + The 'column' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -36,7 +36,7 @@ def row(self): If there is a layout grid, use the domain for this row in the grid for this polar subplot . - The 'row' property is a integer and may be specified as: + The 'row' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/layout/polar/_radialaxis.py b/plotly/graph_objs/layout/polar/_radialaxis.py index 4c7d4e8ee4e..e7a12d5fa7e 100644 --- a/plotly/graph_objs/layout/polar/_radialaxis.py +++ b/plotly/graph_objs/layout/polar/_radialaxis.py @@ -642,7 +642,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -1035,7 +1035,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/layout/polar/angularaxis/_tickfont.py b/plotly/graph_objs/layout/polar/angularaxis/_tickfont.py index d0a6e745100..d2e075c14af 100644 --- a/plotly/graph_objs/layout/polar/angularaxis/_tickfont.py +++ b/plotly/graph_objs/layout/polar/angularaxis/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/polar/radialaxis/_tickfont.py b/plotly/graph_objs/layout/polar/radialaxis/_tickfont.py index 6be3feb71c9..2e7310d55e0 100644 --- a/plotly/graph_objs/layout/polar/radialaxis/_tickfont.py +++ b/plotly/graph_objs/layout/polar/radialaxis/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/polar/radialaxis/title/_font.py b/plotly/graph_objs/layout/polar/radialaxis/title/_font.py index 8a6981fc44e..e4b6db357f3 100644 --- a/plotly/graph_objs/layout/polar/radialaxis/title/_font.py +++ b/plotly/graph_objs/layout/polar/radialaxis/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/scene/_annotation.py b/plotly/graph_objs/layout/scene/_annotation.py index a4e9043ecc6..315bb85c572 100644 --- a/plotly/graph_objs/layout/scene/_annotation.py +++ b/plotly/graph_objs/layout/scene/_annotation.py @@ -97,7 +97,7 @@ def arrowhead(self): """ Sets the end annotation arrow head style. - The 'arrowhead' property is a integer and may be specified as: + The 'arrowhead' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 8] @@ -482,7 +482,7 @@ def startarrowhead(self): """ Sets the start annotation arrow head style. - The 'startarrowhead' property is a integer and may be specified as: + The 'startarrowhead' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 8] diff --git a/plotly/graph_objs/layout/scene/_domain.py b/plotly/graph_objs/layout/scene/_domain.py index ef03c3826ad..9b12872d62b 100644 --- a/plotly/graph_objs/layout/scene/_domain.py +++ b/plotly/graph_objs/layout/scene/_domain.py @@ -16,7 +16,7 @@ def column(self): If there is a layout grid, use the domain for this column in the grid for this scene subplot . - The 'column' property is a integer and may be specified as: + The 'column' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -36,7 +36,7 @@ def row(self): If there is a layout grid, use the domain for this row in the grid for this scene subplot . - The 'row' property is a integer and may be specified as: + The 'row' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/layout/scene/_xaxis.py b/plotly/graph_objs/layout/scene/_xaxis.py index 7d914f4645f..4978f08c8b8 100644 --- a/plotly/graph_objs/layout/scene/_xaxis.py +++ b/plotly/graph_objs/layout/scene/_xaxis.py @@ -573,7 +573,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/layout/scene/_yaxis.py b/plotly/graph_objs/layout/scene/_yaxis.py index b7d95480c99..d4eb81a8c3c 100644 --- a/plotly/graph_objs/layout/scene/_yaxis.py +++ b/plotly/graph_objs/layout/scene/_yaxis.py @@ -573,7 +573,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/layout/scene/_zaxis.py b/plotly/graph_objs/layout/scene/_zaxis.py index db30a14f286..935c41554e5 100644 --- a/plotly/graph_objs/layout/scene/_zaxis.py +++ b/plotly/graph_objs/layout/scene/_zaxis.py @@ -573,7 +573,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/layout/scene/annotation/_font.py b/plotly/graph_objs/layout/scene/annotation/_font.py index d4a686ad427..e64d205994f 100644 --- a/plotly/graph_objs/layout/scene/annotation/_font.py +++ b/plotly/graph_objs/layout/scene/annotation/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/scene/annotation/hoverlabel/_font.py b/plotly/graph_objs/layout/scene/annotation/hoverlabel/_font.py index 04b66f2ff88..f7baf19f207 100644 --- a/plotly/graph_objs/layout/scene/annotation/hoverlabel/_font.py +++ b/plotly/graph_objs/layout/scene/annotation/hoverlabel/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/scene/xaxis/_tickfont.py b/plotly/graph_objs/layout/scene/xaxis/_tickfont.py index d9d2628958b..2646213c633 100644 --- a/plotly/graph_objs/layout/scene/xaxis/_tickfont.py +++ b/plotly/graph_objs/layout/scene/xaxis/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/scene/xaxis/title/_font.py b/plotly/graph_objs/layout/scene/xaxis/title/_font.py index 46dc7b43b6d..d5f28f48c2c 100644 --- a/plotly/graph_objs/layout/scene/xaxis/title/_font.py +++ b/plotly/graph_objs/layout/scene/xaxis/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/scene/yaxis/_tickfont.py b/plotly/graph_objs/layout/scene/yaxis/_tickfont.py index ff12147d624..7639b1122f0 100644 --- a/plotly/graph_objs/layout/scene/yaxis/_tickfont.py +++ b/plotly/graph_objs/layout/scene/yaxis/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/scene/yaxis/title/_font.py b/plotly/graph_objs/layout/scene/yaxis/title/_font.py index 81c436c3b77..4f33dc20305 100644 --- a/plotly/graph_objs/layout/scene/yaxis/title/_font.py +++ b/plotly/graph_objs/layout/scene/yaxis/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/scene/zaxis/_tickfont.py b/plotly/graph_objs/layout/scene/zaxis/_tickfont.py index 7146405e80d..9082eb10ce3 100644 --- a/plotly/graph_objs/layout/scene/zaxis/_tickfont.py +++ b/plotly/graph_objs/layout/scene/zaxis/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/scene/zaxis/title/_font.py b/plotly/graph_objs/layout/scene/zaxis/title/_font.py index 54972c0f18d..e64e822d383 100644 --- a/plotly/graph_objs/layout/scene/zaxis/title/_font.py +++ b/plotly/graph_objs/layout/scene/zaxis/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/shape/label/_font.py b/plotly/graph_objs/layout/shape/label/_font.py index d80142dec71..dc226dec9a8 100644 --- a/plotly/graph_objs/layout/shape/label/_font.py +++ b/plotly/graph_objs/layout/shape/label/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/shape/legendgrouptitle/_font.py b/plotly/graph_objs/layout/shape/legendgrouptitle/_font.py index c547c64f4a3..7a6fee899c9 100644 --- a/plotly/graph_objs/layout/shape/legendgrouptitle/_font.py +++ b/plotly/graph_objs/layout/shape/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/slider/_font.py b/plotly/graph_objs/layout/slider/_font.py index 41412107938..34b75a52c03 100644 --- a/plotly/graph_objs/layout/slider/_font.py +++ b/plotly/graph_objs/layout/slider/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/slider/currentvalue/_font.py b/plotly/graph_objs/layout/slider/currentvalue/_font.py index 60743f469af..c091874f59b 100644 --- a/plotly/graph_objs/layout/slider/currentvalue/_font.py +++ b/plotly/graph_objs/layout/slider/currentvalue/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/smith/_domain.py b/plotly/graph_objs/layout/smith/_domain.py index bbfd6109516..5ce5f308eea 100644 --- a/plotly/graph_objs/layout/smith/_domain.py +++ b/plotly/graph_objs/layout/smith/_domain.py @@ -16,7 +16,7 @@ def column(self): If there is a layout grid, use the domain for this column in the grid for this smith subplot . - The 'column' property is a integer and may be specified as: + The 'column' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -36,7 +36,7 @@ def row(self): If there is a layout grid, use the domain for this row in the grid for this smith subplot . - The 'row' property is a integer and may be specified as: + The 'row' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/layout/smith/imaginaryaxis/_tickfont.py b/plotly/graph_objs/layout/smith/imaginaryaxis/_tickfont.py index 6ecb5527b74..c5228bc734c 100644 --- a/plotly/graph_objs/layout/smith/imaginaryaxis/_tickfont.py +++ b/plotly/graph_objs/layout/smith/imaginaryaxis/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/smith/realaxis/_tickfont.py b/plotly/graph_objs/layout/smith/realaxis/_tickfont.py index 63d87135873..bbb5a9de6e6 100644 --- a/plotly/graph_objs/layout/smith/realaxis/_tickfont.py +++ b/plotly/graph_objs/layout/smith/realaxis/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/ternary/_aaxis.py b/plotly/graph_objs/layout/ternary/_aaxis.py index 0915f543b7a..6396dee6424 100644 --- a/plotly/graph_objs/layout/ternary/_aaxis.py +++ b/plotly/graph_objs/layout/ternary/_aaxis.py @@ -369,7 +369,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] @@ -690,7 +690,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/layout/ternary/_baxis.py b/plotly/graph_objs/layout/ternary/_baxis.py index 300c45df413..d5d55bde7fa 100644 --- a/plotly/graph_objs/layout/ternary/_baxis.py +++ b/plotly/graph_objs/layout/ternary/_baxis.py @@ -369,7 +369,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] @@ -690,7 +690,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/layout/ternary/_caxis.py b/plotly/graph_objs/layout/ternary/_caxis.py index 54905b7fb18..d68b5cc2291 100644 --- a/plotly/graph_objs/layout/ternary/_caxis.py +++ b/plotly/graph_objs/layout/ternary/_caxis.py @@ -369,7 +369,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] @@ -690,7 +690,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/layout/ternary/_domain.py b/plotly/graph_objs/layout/ternary/_domain.py index ce72c0dfe63..73347e7ecf2 100644 --- a/plotly/graph_objs/layout/ternary/_domain.py +++ b/plotly/graph_objs/layout/ternary/_domain.py @@ -16,7 +16,7 @@ def column(self): If there is a layout grid, use the domain for this column in the grid for this ternary subplot . - The 'column' property is a integer and may be specified as: + The 'column' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -36,7 +36,7 @@ def row(self): If there is a layout grid, use the domain for this row in the grid for this ternary subplot . - The 'row' property is a integer and may be specified as: + The 'row' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/layout/ternary/aaxis/_tickfont.py b/plotly/graph_objs/layout/ternary/aaxis/_tickfont.py index 2da6f8aaef5..3a39496b438 100644 --- a/plotly/graph_objs/layout/ternary/aaxis/_tickfont.py +++ b/plotly/graph_objs/layout/ternary/aaxis/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/ternary/aaxis/title/_font.py b/plotly/graph_objs/layout/ternary/aaxis/title/_font.py index 2f486ce4b79..aaac0bc4903 100644 --- a/plotly/graph_objs/layout/ternary/aaxis/title/_font.py +++ b/plotly/graph_objs/layout/ternary/aaxis/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/ternary/baxis/_tickfont.py b/plotly/graph_objs/layout/ternary/baxis/_tickfont.py index 33d4488e8dc..3be0a6333b9 100644 --- a/plotly/graph_objs/layout/ternary/baxis/_tickfont.py +++ b/plotly/graph_objs/layout/ternary/baxis/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/ternary/baxis/title/_font.py b/plotly/graph_objs/layout/ternary/baxis/title/_font.py index 596e1c7156b..0f64e5df54c 100644 --- a/plotly/graph_objs/layout/ternary/baxis/title/_font.py +++ b/plotly/graph_objs/layout/ternary/baxis/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/ternary/caxis/_tickfont.py b/plotly/graph_objs/layout/ternary/caxis/_tickfont.py index 9e5adbaf595..765f43866a3 100644 --- a/plotly/graph_objs/layout/ternary/caxis/_tickfont.py +++ b/plotly/graph_objs/layout/ternary/caxis/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/ternary/caxis/title/_font.py b/plotly/graph_objs/layout/ternary/caxis/title/_font.py index c4868a72b71..8a1b6fd7100 100644 --- a/plotly/graph_objs/layout/ternary/caxis/title/_font.py +++ b/plotly/graph_objs/layout/ternary/caxis/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/title/_font.py b/plotly/graph_objs/layout/title/_font.py index 969f70e2ff9..21efdd6c895 100644 --- a/plotly/graph_objs/layout/title/_font.py +++ b/plotly/graph_objs/layout/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/title/subtitle/_font.py b/plotly/graph_objs/layout/title/subtitle/_font.py index 7e3781adfac..c381ca715e4 100644 --- a/plotly/graph_objs/layout/title/subtitle/_font.py +++ b/plotly/graph_objs/layout/title/subtitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/updatemenu/_font.py b/plotly/graph_objs/layout/updatemenu/_font.py index cbab80e20f4..58cabad7e4c 100644 --- a/plotly/graph_objs/layout/updatemenu/_font.py +++ b/plotly/graph_objs/layout/updatemenu/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/xaxis/_minor.py b/plotly/graph_objs/layout/xaxis/_minor.py index 8a1a5aac789..e52618df741 100644 --- a/plotly/graph_objs/layout/xaxis/_minor.py +++ b/plotly/graph_objs/layout/xaxis/_minor.py @@ -133,7 +133,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/layout/xaxis/_rangeslider.py b/plotly/graph_objs/layout/xaxis/_rangeslider.py index 1c9e637dfec..ec1e353ea26 100644 --- a/plotly/graph_objs/layout/xaxis/_rangeslider.py +++ b/plotly/graph_objs/layout/xaxis/_rangeslider.py @@ -88,7 +88,7 @@ def borderwidth(self): """ Sets the border width of the range slider. - The 'borderwidth' property is a integer and may be specified as: + The 'borderwidth' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/layout/xaxis/_tickfont.py b/plotly/graph_objs/layout/xaxis/_tickfont.py index 3df643ef781..3347daea9f1 100644 --- a/plotly/graph_objs/layout/xaxis/_tickfont.py +++ b/plotly/graph_objs/layout/xaxis/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/xaxis/rangeselector/_font.py b/plotly/graph_objs/layout/xaxis/rangeselector/_font.py index b594067052c..ee3830536f8 100644 --- a/plotly/graph_objs/layout/xaxis/rangeselector/_font.py +++ b/plotly/graph_objs/layout/xaxis/rangeselector/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/xaxis/title/_font.py b/plotly/graph_objs/layout/xaxis/title/_font.py index b94335107f2..d812203e3f3 100644 --- a/plotly/graph_objs/layout/xaxis/title/_font.py +++ b/plotly/graph_objs/layout/xaxis/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/yaxis/_minor.py b/plotly/graph_objs/layout/yaxis/_minor.py index 73ced5ce933..808260db711 100644 --- a/plotly/graph_objs/layout/yaxis/_minor.py +++ b/plotly/graph_objs/layout/yaxis/_minor.py @@ -133,7 +133,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/layout/yaxis/_tickfont.py b/plotly/graph_objs/layout/yaxis/_tickfont.py index 7a573843b34..2add93d012f 100644 --- a/plotly/graph_objs/layout/yaxis/_tickfont.py +++ b/plotly/graph_objs/layout/yaxis/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/layout/yaxis/title/_font.py b/plotly/graph_objs/layout/yaxis/title/_font.py index b04cd984b1c..1bb2a037da0 100644 --- a/plotly/graph_objs/layout/yaxis/title/_font.py +++ b/plotly/graph_objs/layout/yaxis/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/mesh3d/_colorbar.py b/plotly/graph_objs/mesh3d/_colorbar.py index 8803871da67..fc1ebb01147 100644 --- a/plotly/graph_objs/mesh3d/_colorbar.py +++ b/plotly/graph_objs/mesh3d/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/mesh3d/_hoverlabel.py b/plotly/graph_objs/mesh3d/_hoverlabel.py index 7cad9294c39..a5d1a015720 100644 --- a/plotly/graph_objs/mesh3d/_hoverlabel.py +++ b/plotly/graph_objs/mesh3d/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/mesh3d/colorbar/_tickfont.py b/plotly/graph_objs/mesh3d/colorbar/_tickfont.py index 7aaacd1e8a8..118ea838d8d 100644 --- a/plotly/graph_objs/mesh3d/colorbar/_tickfont.py +++ b/plotly/graph_objs/mesh3d/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/mesh3d/colorbar/title/_font.py b/plotly/graph_objs/mesh3d/colorbar/title/_font.py index f4dd6a9b434..50b134d545c 100644 --- a/plotly/graph_objs/mesh3d/colorbar/title/_font.py +++ b/plotly/graph_objs/mesh3d/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/mesh3d/hoverlabel/_font.py b/plotly/graph_objs/mesh3d/hoverlabel/_font.py index 09288337fd1..915686f878e 100644 --- a/plotly/graph_objs/mesh3d/hoverlabel/_font.py +++ b/plotly/graph_objs/mesh3d/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/mesh3d/legendgrouptitle/_font.py b/plotly/graph_objs/mesh3d/legendgrouptitle/_font.py index 266ef98611a..319ec9de034 100644 --- a/plotly/graph_objs/mesh3d/legendgrouptitle/_font.py +++ b/plotly/graph_objs/mesh3d/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/ohlc/_hoverlabel.py b/plotly/graph_objs/ohlc/_hoverlabel.py index c91cfbbd189..5fdfaf33c40 100644 --- a/plotly/graph_objs/ohlc/_hoverlabel.py +++ b/plotly/graph_objs/ohlc/_hoverlabel.py @@ -176,7 +176,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/ohlc/hoverlabel/_font.py b/plotly/graph_objs/ohlc/hoverlabel/_font.py index de3f8707711..f2c5c5fb511 100644 --- a/plotly/graph_objs/ohlc/hoverlabel/_font.py +++ b/plotly/graph_objs/ohlc/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/ohlc/legendgrouptitle/_font.py b/plotly/graph_objs/ohlc/legendgrouptitle/_font.py index 7d1cc80288c..fa2f50eb8c0 100644 --- a/plotly/graph_objs/ohlc/legendgrouptitle/_font.py +++ b/plotly/graph_objs/ohlc/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/parcats/_dimension.py b/plotly/graph_objs/parcats/_dimension.py index e2bdcb60ba8..673ae153d1b 100644 --- a/plotly/graph_objs/parcats/_dimension.py +++ b/plotly/graph_objs/parcats/_dimension.py @@ -96,7 +96,7 @@ def displayindex(self): The display index of dimension, from left to right, zero indexed, defaults to dimension index. - The 'displayindex' property is a integer and may be specified as: + The 'displayindex' property is an integer and may be specified as: - An int (or float that will be cast to an int) Returns diff --git a/plotly/graph_objs/parcats/_domain.py b/plotly/graph_objs/parcats/_domain.py index 6699f7bb108..20827f30679 100644 --- a/plotly/graph_objs/parcats/_domain.py +++ b/plotly/graph_objs/parcats/_domain.py @@ -16,7 +16,7 @@ def column(self): If there is a layout grid, use the domain for this column in the grid for this parcats trace . - The 'column' property is a integer and may be specified as: + The 'column' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -36,7 +36,7 @@ def row(self): If there is a layout grid, use the domain for this row in the grid for this parcats trace . - The 'row' property is a integer and may be specified as: + The 'row' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/parcats/_labelfont.py b/plotly/graph_objs/parcats/_labelfont.py index 8f3bd58e3ac..deb487f1310 100644 --- a/plotly/graph_objs/parcats/_labelfont.py +++ b/plotly/graph_objs/parcats/_labelfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/parcats/_tickfont.py b/plotly/graph_objs/parcats/_tickfont.py index 630d6dc72c9..136f026e7d0 100644 --- a/plotly/graph_objs/parcats/_tickfont.py +++ b/plotly/graph_objs/parcats/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/parcats/legendgrouptitle/_font.py b/plotly/graph_objs/parcats/legendgrouptitle/_font.py index 1f0135986ea..bdee87396b9 100644 --- a/plotly/graph_objs/parcats/legendgrouptitle/_font.py +++ b/plotly/graph_objs/parcats/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/parcats/line/_colorbar.py b/plotly/graph_objs/parcats/line/_colorbar.py index a5204df743b..b9f55a0e249 100644 --- a/plotly/graph_objs/parcats/line/_colorbar.py +++ b/plotly/graph_objs/parcats/line/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/parcats/line/colorbar/_tickfont.py b/plotly/graph_objs/parcats/line/colorbar/_tickfont.py index 4f92e44d6d5..1022c88f984 100644 --- a/plotly/graph_objs/parcats/line/colorbar/_tickfont.py +++ b/plotly/graph_objs/parcats/line/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/parcats/line/colorbar/title/_font.py b/plotly/graph_objs/parcats/line/colorbar/title/_font.py index 37698b17c3f..465ad95736b 100644 --- a/plotly/graph_objs/parcats/line/colorbar/title/_font.py +++ b/plotly/graph_objs/parcats/line/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/parcoords/_domain.py b/plotly/graph_objs/parcoords/_domain.py index a1b3f57bcd5..af095e7c0c8 100644 --- a/plotly/graph_objs/parcoords/_domain.py +++ b/plotly/graph_objs/parcoords/_domain.py @@ -16,7 +16,7 @@ def column(self): If there is a layout grid, use the domain for this column in the grid for this parcoords trace . - The 'column' property is a integer and may be specified as: + The 'column' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -36,7 +36,7 @@ def row(self): If there is a layout grid, use the domain for this row in the grid for this parcoords trace . - The 'row' property is a integer and may be specified as: + The 'row' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/parcoords/_labelfont.py b/plotly/graph_objs/parcoords/_labelfont.py index b73fe482fb1..1219b9ba2da 100644 --- a/plotly/graph_objs/parcoords/_labelfont.py +++ b/plotly/graph_objs/parcoords/_labelfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/parcoords/_rangefont.py b/plotly/graph_objs/parcoords/_rangefont.py index 1e19ceff70f..9c8c061a7cd 100644 --- a/plotly/graph_objs/parcoords/_rangefont.py +++ b/plotly/graph_objs/parcoords/_rangefont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/parcoords/_tickfont.py b/plotly/graph_objs/parcoords/_tickfont.py index 676f0ada3fb..a37709c556d 100644 --- a/plotly/graph_objs/parcoords/_tickfont.py +++ b/plotly/graph_objs/parcoords/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/parcoords/legendgrouptitle/_font.py b/plotly/graph_objs/parcoords/legendgrouptitle/_font.py index 32fda37d17b..5db0c50c4be 100644 --- a/plotly/graph_objs/parcoords/legendgrouptitle/_font.py +++ b/plotly/graph_objs/parcoords/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/parcoords/line/_colorbar.py b/plotly/graph_objs/parcoords/line/_colorbar.py index 3ee4f8df995..fad941627e4 100644 --- a/plotly/graph_objs/parcoords/line/_colorbar.py +++ b/plotly/graph_objs/parcoords/line/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/parcoords/line/colorbar/_tickfont.py b/plotly/graph_objs/parcoords/line/colorbar/_tickfont.py index 8737a56ecea..3b4f2d394d4 100644 --- a/plotly/graph_objs/parcoords/line/colorbar/_tickfont.py +++ b/plotly/graph_objs/parcoords/line/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/parcoords/line/colorbar/title/_font.py b/plotly/graph_objs/parcoords/line/colorbar/title/_font.py index d09e6f7d7c2..35f319952a3 100644 --- a/plotly/graph_objs/parcoords/line/colorbar/title/_font.py +++ b/plotly/graph_objs/parcoords/line/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/pie/_domain.py b/plotly/graph_objs/pie/_domain.py index fd3dee6a066..8f964987251 100644 --- a/plotly/graph_objs/pie/_domain.py +++ b/plotly/graph_objs/pie/_domain.py @@ -16,7 +16,7 @@ def column(self): If there is a layout grid, use the domain for this column in the grid for this pie trace . - The 'column' property is a integer and may be specified as: + The 'column' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -36,7 +36,7 @@ def row(self): If there is a layout grid, use the domain for this row in the grid for this pie trace . - The 'row' property is a integer and may be specified as: + The 'row' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/pie/_hoverlabel.py b/plotly/graph_objs/pie/_hoverlabel.py index 74bdb7891a2..feb3e810716 100644 --- a/plotly/graph_objs/pie/_hoverlabel.py +++ b/plotly/graph_objs/pie/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/pie/_insidetextfont.py b/plotly/graph_objs/pie/_insidetextfont.py index cf59dbe01c7..b8ef543dec0 100644 --- a/plotly/graph_objs/pie/_insidetextfont.py +++ b/plotly/graph_objs/pie/_insidetextfont.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/pie/_outsidetextfont.py b/plotly/graph_objs/pie/_outsidetextfont.py index dac483e3e76..ff52b272b2c 100644 --- a/plotly/graph_objs/pie/_outsidetextfont.py +++ b/plotly/graph_objs/pie/_outsidetextfont.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/pie/_textfont.py b/plotly/graph_objs/pie/_textfont.py index 3ad5c97e6c5..b02780755fa 100644 --- a/plotly/graph_objs/pie/_textfont.py +++ b/plotly/graph_objs/pie/_textfont.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/pie/hoverlabel/_font.py b/plotly/graph_objs/pie/hoverlabel/_font.py index 556bfc2a818..61070cced84 100644 --- a/plotly/graph_objs/pie/hoverlabel/_font.py +++ b/plotly/graph_objs/pie/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/pie/legendgrouptitle/_font.py b/plotly/graph_objs/pie/legendgrouptitle/_font.py index fff0d0d8993..4191b4e896a 100644 --- a/plotly/graph_objs/pie/legendgrouptitle/_font.py +++ b/plotly/graph_objs/pie/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/pie/title/_font.py b/plotly/graph_objs/pie/title/_font.py index abe938653cb..a99135220dc 100644 --- a/plotly/graph_objs/pie/title/_font.py +++ b/plotly/graph_objs/pie/title/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/sankey/_domain.py b/plotly/graph_objs/sankey/_domain.py index c86377e3b21..c4b9d910a33 100644 --- a/plotly/graph_objs/sankey/_domain.py +++ b/plotly/graph_objs/sankey/_domain.py @@ -16,7 +16,7 @@ def column(self): If there is a layout grid, use the domain for this column in the grid for this sankey trace . - The 'column' property is a integer and may be specified as: + The 'column' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -36,7 +36,7 @@ def row(self): If there is a layout grid, use the domain for this row in the grid for this sankey trace . - The 'row' property is a integer and may be specified as: + The 'row' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/sankey/_hoverlabel.py b/plotly/graph_objs/sankey/_hoverlabel.py index 1050307088c..3bfba032341 100644 --- a/plotly/graph_objs/sankey/_hoverlabel.py +++ b/plotly/graph_objs/sankey/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/sankey/_textfont.py b/plotly/graph_objs/sankey/_textfont.py index d052501252e..e70ef1f3074 100644 --- a/plotly/graph_objs/sankey/_textfont.py +++ b/plotly/graph_objs/sankey/_textfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/sankey/hoverlabel/_font.py b/plotly/graph_objs/sankey/hoverlabel/_font.py index 3d9d60ff5fd..ceea018fd22 100644 --- a/plotly/graph_objs/sankey/hoverlabel/_font.py +++ b/plotly/graph_objs/sankey/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/sankey/legendgrouptitle/_font.py b/plotly/graph_objs/sankey/legendgrouptitle/_font.py index 28879581709..f7da2befb76 100644 --- a/plotly/graph_objs/sankey/legendgrouptitle/_font.py +++ b/plotly/graph_objs/sankey/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/sankey/link/_hoverlabel.py b/plotly/graph_objs/sankey/link/_hoverlabel.py index 6cf3432e27b..10a5f31d35b 100644 --- a/plotly/graph_objs/sankey/link/_hoverlabel.py +++ b/plotly/graph_objs/sankey/link/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/sankey/link/hoverlabel/_font.py b/plotly/graph_objs/sankey/link/hoverlabel/_font.py index e96c178add3..88bc5bacbb0 100644 --- a/plotly/graph_objs/sankey/link/hoverlabel/_font.py +++ b/plotly/graph_objs/sankey/link/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/sankey/node/_hoverlabel.py b/plotly/graph_objs/sankey/node/_hoverlabel.py index 796199bb962..99d1a7f5f83 100644 --- a/plotly/graph_objs/sankey/node/_hoverlabel.py +++ b/plotly/graph_objs/sankey/node/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/sankey/node/hoverlabel/_font.py b/plotly/graph_objs/sankey/node/hoverlabel/_font.py index 545db572858..8ba27133892 100644 --- a/plotly/graph_objs/sankey/node/hoverlabel/_font.py +++ b/plotly/graph_objs/sankey/node/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scatter/_error_x.py b/plotly/graph_objs/scatter/_error_x.py index 1b6a774eb8f..88b61752b60 100644 --- a/plotly/graph_objs/scatter/_error_x.py +++ b/plotly/graph_objs/scatter/_error_x.py @@ -181,7 +181,7 @@ def thickness(self, val): @property def traceref(self): """ - The 'traceref' property is a integer and may be specified as: + The 'traceref' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -198,7 +198,7 @@ def traceref(self, val): @property def tracerefminus(self): """ - The 'tracerefminus' property is a integer and may be specified as: + The 'tracerefminus' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/scatter/_error_y.py b/plotly/graph_objs/scatter/_error_y.py index c36245dd2d3..6dfbaa6e7e2 100644 --- a/plotly/graph_objs/scatter/_error_y.py +++ b/plotly/graph_objs/scatter/_error_y.py @@ -164,7 +164,7 @@ def thickness(self, val): @property def traceref(self): """ - The 'traceref' property is a integer and may be specified as: + The 'traceref' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -181,7 +181,7 @@ def traceref(self, val): @property def tracerefminus(self): """ - The 'tracerefminus' property is a integer and may be specified as: + The 'tracerefminus' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/scatter/_hoverlabel.py b/plotly/graph_objs/scatter/_hoverlabel.py index 9789db1a0e7..38c3bda85c2 100644 --- a/plotly/graph_objs/scatter/_hoverlabel.py +++ b/plotly/graph_objs/scatter/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/scatter/_textfont.py b/plotly/graph_objs/scatter/_textfont.py index 79576294342..5f7f5308f02 100644 --- a/plotly/graph_objs/scatter/_textfont.py +++ b/plotly/graph_objs/scatter/_textfont.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scatter/hoverlabel/_font.py b/plotly/graph_objs/scatter/hoverlabel/_font.py index 1abdf82e9fb..a38d674f98f 100644 --- a/plotly/graph_objs/scatter/hoverlabel/_font.py +++ b/plotly/graph_objs/scatter/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scatter/legendgrouptitle/_font.py b/plotly/graph_objs/scatter/legendgrouptitle/_font.py index fbc6a1ad98e..fd5fde9d7f4 100644 --- a/plotly/graph_objs/scatter/legendgrouptitle/_font.py +++ b/plotly/graph_objs/scatter/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scatter/marker/_colorbar.py b/plotly/graph_objs/scatter/marker/_colorbar.py index ee209e4fe4f..f31dc0869f2 100644 --- a/plotly/graph_objs/scatter/marker/_colorbar.py +++ b/plotly/graph_objs/scatter/marker/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/scatter/marker/colorbar/_tickfont.py b/plotly/graph_objs/scatter/marker/colorbar/_tickfont.py index 979d2b738a2..9148b750025 100644 --- a/plotly/graph_objs/scatter/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/scatter/marker/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scatter/marker/colorbar/title/_font.py b/plotly/graph_objs/scatter/marker/colorbar/title/_font.py index 6d202535da4..91fe7749e58 100644 --- a/plotly/graph_objs/scatter/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/scatter/marker/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scatter3d/_error_x.py b/plotly/graph_objs/scatter3d/_error_x.py index ed735d629c2..9a0a22ac515 100644 --- a/plotly/graph_objs/scatter3d/_error_x.py +++ b/plotly/graph_objs/scatter3d/_error_x.py @@ -181,7 +181,7 @@ def thickness(self, val): @property def traceref(self): """ - The 'traceref' property is a integer and may be specified as: + The 'traceref' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -198,7 +198,7 @@ def traceref(self, val): @property def tracerefminus(self): """ - The 'tracerefminus' property is a integer and may be specified as: + The 'tracerefminus' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/scatter3d/_error_y.py b/plotly/graph_objs/scatter3d/_error_y.py index c62ab3a17a4..261cfa80520 100644 --- a/plotly/graph_objs/scatter3d/_error_y.py +++ b/plotly/graph_objs/scatter3d/_error_y.py @@ -181,7 +181,7 @@ def thickness(self, val): @property def traceref(self): """ - The 'traceref' property is a integer and may be specified as: + The 'traceref' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -198,7 +198,7 @@ def traceref(self, val): @property def tracerefminus(self): """ - The 'tracerefminus' property is a integer and may be specified as: + The 'tracerefminus' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/scatter3d/_error_z.py b/plotly/graph_objs/scatter3d/_error_z.py index 1fe50cd0981..006dbcc4f04 100644 --- a/plotly/graph_objs/scatter3d/_error_z.py +++ b/plotly/graph_objs/scatter3d/_error_z.py @@ -164,7 +164,7 @@ def thickness(self, val): @property def traceref(self): """ - The 'traceref' property is a integer and may be specified as: + The 'traceref' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -181,7 +181,7 @@ def traceref(self, val): @property def tracerefminus(self): """ - The 'tracerefminus' property is a integer and may be specified as: + The 'tracerefminus' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/scatter3d/_hoverlabel.py b/plotly/graph_objs/scatter3d/_hoverlabel.py index 2f9bba3b0e3..81421671701 100644 --- a/plotly/graph_objs/scatter3d/_hoverlabel.py +++ b/plotly/graph_objs/scatter3d/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/scatter3d/_textfont.py b/plotly/graph_objs/scatter3d/_textfont.py index 6d365232c9c..5e50fa11c89 100644 --- a/plotly/graph_objs/scatter3d/_textfont.py +++ b/plotly/graph_objs/scatter3d/_textfont.py @@ -220,7 +220,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scatter3d/hoverlabel/_font.py b/plotly/graph_objs/scatter3d/hoverlabel/_font.py index 3edf8ede05f..8a94a4e1a3c 100644 --- a/plotly/graph_objs/scatter3d/hoverlabel/_font.py +++ b/plotly/graph_objs/scatter3d/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scatter3d/legendgrouptitle/_font.py b/plotly/graph_objs/scatter3d/legendgrouptitle/_font.py index 95c7ad1edf8..080965830bf 100644 --- a/plotly/graph_objs/scatter3d/legendgrouptitle/_font.py +++ b/plotly/graph_objs/scatter3d/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scatter3d/line/_colorbar.py b/plotly/graph_objs/scatter3d/line/_colorbar.py index d1407503689..759d614a318 100644 --- a/plotly/graph_objs/scatter3d/line/_colorbar.py +++ b/plotly/graph_objs/scatter3d/line/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/scatter3d/line/colorbar/_tickfont.py b/plotly/graph_objs/scatter3d/line/colorbar/_tickfont.py index 2d5833c877c..2930d385ce5 100644 --- a/plotly/graph_objs/scatter3d/line/colorbar/_tickfont.py +++ b/plotly/graph_objs/scatter3d/line/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scatter3d/line/colorbar/title/_font.py b/plotly/graph_objs/scatter3d/line/colorbar/title/_font.py index 603e087e373..6fbb5089830 100644 --- a/plotly/graph_objs/scatter3d/line/colorbar/title/_font.py +++ b/plotly/graph_objs/scatter3d/line/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scatter3d/marker/_colorbar.py b/plotly/graph_objs/scatter3d/marker/_colorbar.py index 640e5ffc931..5f126d2e344 100644 --- a/plotly/graph_objs/scatter3d/marker/_colorbar.py +++ b/plotly/graph_objs/scatter3d/marker/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/scatter3d/marker/colorbar/_tickfont.py b/plotly/graph_objs/scatter3d/marker/colorbar/_tickfont.py index 78612661cc0..bf0a03c7098 100644 --- a/plotly/graph_objs/scatter3d/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/scatter3d/marker/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scatter3d/marker/colorbar/title/_font.py b/plotly/graph_objs/scatter3d/marker/colorbar/title/_font.py index 53344ff1a79..1aa12007141 100644 --- a/plotly/graph_objs/scatter3d/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/scatter3d/marker/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scattercarpet/_hoverlabel.py b/plotly/graph_objs/scattercarpet/_hoverlabel.py index dfb16b81521..db471ef68f9 100644 --- a/plotly/graph_objs/scattercarpet/_hoverlabel.py +++ b/plotly/graph_objs/scattercarpet/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/scattercarpet/_textfont.py b/plotly/graph_objs/scattercarpet/_textfont.py index 3deda0f4e97..3e93f237b76 100644 --- a/plotly/graph_objs/scattercarpet/_textfont.py +++ b/plotly/graph_objs/scattercarpet/_textfont.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scattercarpet/hoverlabel/_font.py b/plotly/graph_objs/scattercarpet/hoverlabel/_font.py index 232ffa768ed..f8688fdf7bd 100644 --- a/plotly/graph_objs/scattercarpet/hoverlabel/_font.py +++ b/plotly/graph_objs/scattercarpet/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scattercarpet/legendgrouptitle/_font.py b/plotly/graph_objs/scattercarpet/legendgrouptitle/_font.py index 083f9ecc562..d20e971f7aa 100644 --- a/plotly/graph_objs/scattercarpet/legendgrouptitle/_font.py +++ b/plotly/graph_objs/scattercarpet/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scattercarpet/marker/_colorbar.py b/plotly/graph_objs/scattercarpet/marker/_colorbar.py index dfbfe570bb1..71cb7f90a13 100644 --- a/plotly/graph_objs/scattercarpet/marker/_colorbar.py +++ b/plotly/graph_objs/scattercarpet/marker/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/scattercarpet/marker/colorbar/_tickfont.py b/plotly/graph_objs/scattercarpet/marker/colorbar/_tickfont.py index b831738c576..5adcfe55cbb 100644 --- a/plotly/graph_objs/scattercarpet/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/scattercarpet/marker/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scattercarpet/marker/colorbar/title/_font.py b/plotly/graph_objs/scattercarpet/marker/colorbar/title/_font.py index 33b501ca9d6..5a31ba47587 100644 --- a/plotly/graph_objs/scattercarpet/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/scattercarpet/marker/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scattergeo/_hoverlabel.py b/plotly/graph_objs/scattergeo/_hoverlabel.py index 55ee903b004..ff4413d3e7e 100644 --- a/plotly/graph_objs/scattergeo/_hoverlabel.py +++ b/plotly/graph_objs/scattergeo/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/scattergeo/_textfont.py b/plotly/graph_objs/scattergeo/_textfont.py index 8a56df5ca13..38ad264b343 100644 --- a/plotly/graph_objs/scattergeo/_textfont.py +++ b/plotly/graph_objs/scattergeo/_textfont.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scattergeo/hoverlabel/_font.py b/plotly/graph_objs/scattergeo/hoverlabel/_font.py index 730d1d49fb5..6bd8188e1e1 100644 --- a/plotly/graph_objs/scattergeo/hoverlabel/_font.py +++ b/plotly/graph_objs/scattergeo/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scattergeo/legendgrouptitle/_font.py b/plotly/graph_objs/scattergeo/legendgrouptitle/_font.py index 4dfd8a01f42..b66cef3cd99 100644 --- a/plotly/graph_objs/scattergeo/legendgrouptitle/_font.py +++ b/plotly/graph_objs/scattergeo/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scattergeo/marker/_colorbar.py b/plotly/graph_objs/scattergeo/marker/_colorbar.py index e5da382e134..7fe47265e88 100644 --- a/plotly/graph_objs/scattergeo/marker/_colorbar.py +++ b/plotly/graph_objs/scattergeo/marker/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/scattergeo/marker/colorbar/_tickfont.py b/plotly/graph_objs/scattergeo/marker/colorbar/_tickfont.py index 81b1718f4bc..979cf4efb76 100644 --- a/plotly/graph_objs/scattergeo/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/scattergeo/marker/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scattergeo/marker/colorbar/title/_font.py b/plotly/graph_objs/scattergeo/marker/colorbar/title/_font.py index ace978f2cc8..6e8aa06fd3e 100644 --- a/plotly/graph_objs/scattergeo/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/scattergeo/marker/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scattergl/_error_x.py b/plotly/graph_objs/scattergl/_error_x.py index 2cb27d7b8a5..77693af4576 100644 --- a/plotly/graph_objs/scattergl/_error_x.py +++ b/plotly/graph_objs/scattergl/_error_x.py @@ -181,7 +181,7 @@ def thickness(self, val): @property def traceref(self): """ - The 'traceref' property is a integer and may be specified as: + The 'traceref' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -198,7 +198,7 @@ def traceref(self, val): @property def tracerefminus(self): """ - The 'tracerefminus' property is a integer and may be specified as: + The 'tracerefminus' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/scattergl/_error_y.py b/plotly/graph_objs/scattergl/_error_y.py index b750644bb53..4ca452222e8 100644 --- a/plotly/graph_objs/scattergl/_error_y.py +++ b/plotly/graph_objs/scattergl/_error_y.py @@ -164,7 +164,7 @@ def thickness(self, val): @property def traceref(self): """ - The 'traceref' property is a integer and may be specified as: + The 'traceref' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -181,7 +181,7 @@ def traceref(self, val): @property def tracerefminus(self): """ - The 'tracerefminus' property is a integer and may be specified as: + The 'tracerefminus' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/scattergl/_hoverlabel.py b/plotly/graph_objs/scattergl/_hoverlabel.py index 95fcf655f2d..7bf3c86bcb0 100644 --- a/plotly/graph_objs/scattergl/_hoverlabel.py +++ b/plotly/graph_objs/scattergl/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/scattergl/hoverlabel/_font.py b/plotly/graph_objs/scattergl/hoverlabel/_font.py index 9481a5144d5..217d4b20809 100644 --- a/plotly/graph_objs/scattergl/hoverlabel/_font.py +++ b/plotly/graph_objs/scattergl/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scattergl/legendgrouptitle/_font.py b/plotly/graph_objs/scattergl/legendgrouptitle/_font.py index fa358d7ab01..71850608458 100644 --- a/plotly/graph_objs/scattergl/legendgrouptitle/_font.py +++ b/plotly/graph_objs/scattergl/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scattergl/marker/_colorbar.py b/plotly/graph_objs/scattergl/marker/_colorbar.py index 553b18a49dd..56ec049de24 100644 --- a/plotly/graph_objs/scattergl/marker/_colorbar.py +++ b/plotly/graph_objs/scattergl/marker/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/scattergl/marker/colorbar/_tickfont.py b/plotly/graph_objs/scattergl/marker/colorbar/_tickfont.py index c4aadedec7c..c10f0d3c3b7 100644 --- a/plotly/graph_objs/scattergl/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/scattergl/marker/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scattergl/marker/colorbar/title/_font.py b/plotly/graph_objs/scattergl/marker/colorbar/title/_font.py index 359d09ec33b..920f340a81f 100644 --- a/plotly/graph_objs/scattergl/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/scattergl/marker/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scattermap/_hoverlabel.py b/plotly/graph_objs/scattermap/_hoverlabel.py index 66cbe4592fb..4f2cc2780b5 100644 --- a/plotly/graph_objs/scattermap/_hoverlabel.py +++ b/plotly/graph_objs/scattermap/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/scattermap/_textfont.py b/plotly/graph_objs/scattermap/_textfont.py index fda40ac9cdb..4c7b09a9cf2 100644 --- a/plotly/graph_objs/scattermap/_textfont.py +++ b/plotly/graph_objs/scattermap/_textfont.py @@ -93,7 +93,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scattermap/hoverlabel/_font.py b/plotly/graph_objs/scattermap/hoverlabel/_font.py index a6fe4953e57..587704caa10 100644 --- a/plotly/graph_objs/scattermap/hoverlabel/_font.py +++ b/plotly/graph_objs/scattermap/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scattermap/legendgrouptitle/_font.py b/plotly/graph_objs/scattermap/legendgrouptitle/_font.py index ea1fc048161..4e8b157a585 100644 --- a/plotly/graph_objs/scattermap/legendgrouptitle/_font.py +++ b/plotly/graph_objs/scattermap/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scattermap/marker/_colorbar.py b/plotly/graph_objs/scattermap/marker/_colorbar.py index 1e5d8893a0c..73d2b31e4bd 100644 --- a/plotly/graph_objs/scattermap/marker/_colorbar.py +++ b/plotly/graph_objs/scattermap/marker/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/scattermap/marker/colorbar/_tickfont.py b/plotly/graph_objs/scattermap/marker/colorbar/_tickfont.py index 77304fcb60e..c5366ac4267 100644 --- a/plotly/graph_objs/scattermap/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/scattermap/marker/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scattermap/marker/colorbar/title/_font.py b/plotly/graph_objs/scattermap/marker/colorbar/title/_font.py index 5fbf794be85..dfc0291a5e4 100644 --- a/plotly/graph_objs/scattermap/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/scattermap/marker/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scattermapbox/_hoverlabel.py b/plotly/graph_objs/scattermapbox/_hoverlabel.py index c7dee08e2a0..fde9deb0ebf 100644 --- a/plotly/graph_objs/scattermapbox/_hoverlabel.py +++ b/plotly/graph_objs/scattermapbox/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/scattermapbox/_textfont.py b/plotly/graph_objs/scattermapbox/_textfont.py index 7e99b01646e..2a4bf688cdb 100644 --- a/plotly/graph_objs/scattermapbox/_textfont.py +++ b/plotly/graph_objs/scattermapbox/_textfont.py @@ -93,7 +93,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scattermapbox/hoverlabel/_font.py b/plotly/graph_objs/scattermapbox/hoverlabel/_font.py index c62d8e2549e..b31000d1484 100644 --- a/plotly/graph_objs/scattermapbox/hoverlabel/_font.py +++ b/plotly/graph_objs/scattermapbox/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scattermapbox/legendgrouptitle/_font.py b/plotly/graph_objs/scattermapbox/legendgrouptitle/_font.py index 344b8253d2c..897ccc16ce5 100644 --- a/plotly/graph_objs/scattermapbox/legendgrouptitle/_font.py +++ b/plotly/graph_objs/scattermapbox/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scattermapbox/marker/_colorbar.py b/plotly/graph_objs/scattermapbox/marker/_colorbar.py index 2fd4120791a..c2e4859f270 100644 --- a/plotly/graph_objs/scattermapbox/marker/_colorbar.py +++ b/plotly/graph_objs/scattermapbox/marker/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/scattermapbox/marker/colorbar/_tickfont.py b/plotly/graph_objs/scattermapbox/marker/colorbar/_tickfont.py index 98b197cbcfa..d8c58cbbd71 100644 --- a/plotly/graph_objs/scattermapbox/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/scattermapbox/marker/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scattermapbox/marker/colorbar/title/_font.py b/plotly/graph_objs/scattermapbox/marker/colorbar/title/_font.py index c287c6e293e..7e328d9f3bb 100644 --- a/plotly/graph_objs/scattermapbox/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/scattermapbox/marker/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scatterpolar/_hoverlabel.py b/plotly/graph_objs/scatterpolar/_hoverlabel.py index 7e2153e988d..3f6cd712bd6 100644 --- a/plotly/graph_objs/scatterpolar/_hoverlabel.py +++ b/plotly/graph_objs/scatterpolar/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/scatterpolar/_textfont.py b/plotly/graph_objs/scatterpolar/_textfont.py index 7e2874964b5..5661944187b 100644 --- a/plotly/graph_objs/scatterpolar/_textfont.py +++ b/plotly/graph_objs/scatterpolar/_textfont.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scatterpolar/hoverlabel/_font.py b/plotly/graph_objs/scatterpolar/hoverlabel/_font.py index d178804d3f7..843c3f6e6f5 100644 --- a/plotly/graph_objs/scatterpolar/hoverlabel/_font.py +++ b/plotly/graph_objs/scatterpolar/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scatterpolar/legendgrouptitle/_font.py b/plotly/graph_objs/scatterpolar/legendgrouptitle/_font.py index f64a5f7e63e..f41e7dff106 100644 --- a/plotly/graph_objs/scatterpolar/legendgrouptitle/_font.py +++ b/plotly/graph_objs/scatterpolar/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scatterpolar/marker/_colorbar.py b/plotly/graph_objs/scatterpolar/marker/_colorbar.py index c030d486faa..44366c981d4 100644 --- a/plotly/graph_objs/scatterpolar/marker/_colorbar.py +++ b/plotly/graph_objs/scatterpolar/marker/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/scatterpolar/marker/colorbar/_tickfont.py b/plotly/graph_objs/scatterpolar/marker/colorbar/_tickfont.py index 6933852d7f2..3ba0759a5e3 100644 --- a/plotly/graph_objs/scatterpolar/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/scatterpolar/marker/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scatterpolar/marker/colorbar/title/_font.py b/plotly/graph_objs/scatterpolar/marker/colorbar/title/_font.py index 3768be6c3b4..bdb74c4d87e 100644 --- a/plotly/graph_objs/scatterpolar/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/scatterpolar/marker/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scatterpolargl/_hoverlabel.py b/plotly/graph_objs/scatterpolargl/_hoverlabel.py index 991fb4cc259..6a9ceae3c1e 100644 --- a/plotly/graph_objs/scatterpolargl/_hoverlabel.py +++ b/plotly/graph_objs/scatterpolargl/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/scatterpolargl/hoverlabel/_font.py b/plotly/graph_objs/scatterpolargl/hoverlabel/_font.py index d55cff89211..800008a9d89 100644 --- a/plotly/graph_objs/scatterpolargl/hoverlabel/_font.py +++ b/plotly/graph_objs/scatterpolargl/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scatterpolargl/legendgrouptitle/_font.py b/plotly/graph_objs/scatterpolargl/legendgrouptitle/_font.py index 2f256febd0a..76b0314c10e 100644 --- a/plotly/graph_objs/scatterpolargl/legendgrouptitle/_font.py +++ b/plotly/graph_objs/scatterpolargl/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scatterpolargl/marker/_colorbar.py b/plotly/graph_objs/scatterpolargl/marker/_colorbar.py index 402023d3d17..0132c9ab402 100644 --- a/plotly/graph_objs/scatterpolargl/marker/_colorbar.py +++ b/plotly/graph_objs/scatterpolargl/marker/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/scatterpolargl/marker/colorbar/_tickfont.py b/plotly/graph_objs/scatterpolargl/marker/colorbar/_tickfont.py index 713228d2411..3bc7c85867a 100644 --- a/plotly/graph_objs/scatterpolargl/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/scatterpolargl/marker/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scatterpolargl/marker/colorbar/title/_font.py b/plotly/graph_objs/scatterpolargl/marker/colorbar/title/_font.py index 555ee29a7e6..097bc8201d2 100644 --- a/plotly/graph_objs/scatterpolargl/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/scatterpolargl/marker/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scattersmith/_hoverlabel.py b/plotly/graph_objs/scattersmith/_hoverlabel.py index a24e3c637a5..20a67ec768d 100644 --- a/plotly/graph_objs/scattersmith/_hoverlabel.py +++ b/plotly/graph_objs/scattersmith/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/scattersmith/_textfont.py b/plotly/graph_objs/scattersmith/_textfont.py index cbc481ae947..24cf86f5883 100644 --- a/plotly/graph_objs/scattersmith/_textfont.py +++ b/plotly/graph_objs/scattersmith/_textfont.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scattersmith/hoverlabel/_font.py b/plotly/graph_objs/scattersmith/hoverlabel/_font.py index a342e776ca4..82074b1face 100644 --- a/plotly/graph_objs/scattersmith/hoverlabel/_font.py +++ b/plotly/graph_objs/scattersmith/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scattersmith/legendgrouptitle/_font.py b/plotly/graph_objs/scattersmith/legendgrouptitle/_font.py index 1341c3b760a..8f980b117b1 100644 --- a/plotly/graph_objs/scattersmith/legendgrouptitle/_font.py +++ b/plotly/graph_objs/scattersmith/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scattersmith/marker/_colorbar.py b/plotly/graph_objs/scattersmith/marker/_colorbar.py index 38711e90780..8a95dfe4a89 100644 --- a/plotly/graph_objs/scattersmith/marker/_colorbar.py +++ b/plotly/graph_objs/scattersmith/marker/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/scattersmith/marker/colorbar/_tickfont.py b/plotly/graph_objs/scattersmith/marker/colorbar/_tickfont.py index 47e244a44fa..4876a27142d 100644 --- a/plotly/graph_objs/scattersmith/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/scattersmith/marker/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scattersmith/marker/colorbar/title/_font.py b/plotly/graph_objs/scattersmith/marker/colorbar/title/_font.py index 2853b195c6d..90b3bf0ad81 100644 --- a/plotly/graph_objs/scattersmith/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/scattersmith/marker/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scatterternary/_hoverlabel.py b/plotly/graph_objs/scatterternary/_hoverlabel.py index 8af023fd886..c361c5b3d3b 100644 --- a/plotly/graph_objs/scatterternary/_hoverlabel.py +++ b/plotly/graph_objs/scatterternary/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/scatterternary/_textfont.py b/plotly/graph_objs/scatterternary/_textfont.py index 6a41c4858a0..9ea28bb1584 100644 --- a/plotly/graph_objs/scatterternary/_textfont.py +++ b/plotly/graph_objs/scatterternary/_textfont.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scatterternary/hoverlabel/_font.py b/plotly/graph_objs/scatterternary/hoverlabel/_font.py index e642d4aa963..bec5931f24b 100644 --- a/plotly/graph_objs/scatterternary/hoverlabel/_font.py +++ b/plotly/graph_objs/scatterternary/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scatterternary/legendgrouptitle/_font.py b/plotly/graph_objs/scatterternary/legendgrouptitle/_font.py index a261155bc37..af8ed20f190 100644 --- a/plotly/graph_objs/scatterternary/legendgrouptitle/_font.py +++ b/plotly/graph_objs/scatterternary/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scatterternary/marker/_colorbar.py b/plotly/graph_objs/scatterternary/marker/_colorbar.py index 90a07f4b493..cd69d0221b3 100644 --- a/plotly/graph_objs/scatterternary/marker/_colorbar.py +++ b/plotly/graph_objs/scatterternary/marker/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/scatterternary/marker/colorbar/_tickfont.py b/plotly/graph_objs/scatterternary/marker/colorbar/_tickfont.py index f35a4c58581..232323acb88 100644 --- a/plotly/graph_objs/scatterternary/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/scatterternary/marker/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/scatterternary/marker/colorbar/title/_font.py b/plotly/graph_objs/scatterternary/marker/colorbar/title/_font.py index e6ea459e2b5..3a1916a7be4 100644 --- a/plotly/graph_objs/scatterternary/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/scatterternary/marker/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/splom/_hoverlabel.py b/plotly/graph_objs/splom/_hoverlabel.py index 36b2c5eeb4a..3966a6b1253 100644 --- a/plotly/graph_objs/splom/_hoverlabel.py +++ b/plotly/graph_objs/splom/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/splom/hoverlabel/_font.py b/plotly/graph_objs/splom/hoverlabel/_font.py index 64f7bec4556..71bbf738004 100644 --- a/plotly/graph_objs/splom/hoverlabel/_font.py +++ b/plotly/graph_objs/splom/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/splom/legendgrouptitle/_font.py b/plotly/graph_objs/splom/legendgrouptitle/_font.py index c1fa90d8536..15f2e7c6a6f 100644 --- a/plotly/graph_objs/splom/legendgrouptitle/_font.py +++ b/plotly/graph_objs/splom/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/splom/marker/_colorbar.py b/plotly/graph_objs/splom/marker/_colorbar.py index 8ac128aec69..e94feb4362b 100644 --- a/plotly/graph_objs/splom/marker/_colorbar.py +++ b/plotly/graph_objs/splom/marker/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/splom/marker/colorbar/_tickfont.py b/plotly/graph_objs/splom/marker/colorbar/_tickfont.py index 955183f0a3d..1e1a2025005 100644 --- a/plotly/graph_objs/splom/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/splom/marker/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/splom/marker/colorbar/title/_font.py b/plotly/graph_objs/splom/marker/colorbar/title/_font.py index 4bfb809c873..af874e45b75 100644 --- a/plotly/graph_objs/splom/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/splom/marker/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/streamtube/_colorbar.py b/plotly/graph_objs/streamtube/_colorbar.py index 50ec9e8ea39..c5f99dbf04e 100644 --- a/plotly/graph_objs/streamtube/_colorbar.py +++ b/plotly/graph_objs/streamtube/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -706,7 +706,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/streamtube/_hoverlabel.py b/plotly/graph_objs/streamtube/_hoverlabel.py index cadef33fa6c..a52bf2676ba 100644 --- a/plotly/graph_objs/streamtube/_hoverlabel.py +++ b/plotly/graph_objs/streamtube/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/streamtube/colorbar/_tickfont.py b/plotly/graph_objs/streamtube/colorbar/_tickfont.py index b9ae28e5b88..904fd2fa1f6 100644 --- a/plotly/graph_objs/streamtube/colorbar/_tickfont.py +++ b/plotly/graph_objs/streamtube/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/streamtube/colorbar/title/_font.py b/plotly/graph_objs/streamtube/colorbar/title/_font.py index a1869a526a6..066aa300197 100644 --- a/plotly/graph_objs/streamtube/colorbar/title/_font.py +++ b/plotly/graph_objs/streamtube/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/streamtube/hoverlabel/_font.py b/plotly/graph_objs/streamtube/hoverlabel/_font.py index d8d34b5758a..7d27a7734d3 100644 --- a/plotly/graph_objs/streamtube/hoverlabel/_font.py +++ b/plotly/graph_objs/streamtube/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/streamtube/legendgrouptitle/_font.py b/plotly/graph_objs/streamtube/legendgrouptitle/_font.py index 3bf085de314..73dea99b965 100644 --- a/plotly/graph_objs/streamtube/legendgrouptitle/_font.py +++ b/plotly/graph_objs/streamtube/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/sunburst/_domain.py b/plotly/graph_objs/sunburst/_domain.py index 5e50ff149c1..df01486841a 100644 --- a/plotly/graph_objs/sunburst/_domain.py +++ b/plotly/graph_objs/sunburst/_domain.py @@ -16,7 +16,7 @@ def column(self): If there is a layout grid, use the domain for this column in the grid for this sunburst trace . - The 'column' property is a integer and may be specified as: + The 'column' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -36,7 +36,7 @@ def row(self): If there is a layout grid, use the domain for this row in the grid for this sunburst trace . - The 'row' property is a integer and may be specified as: + The 'row' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/sunburst/_hoverlabel.py b/plotly/graph_objs/sunburst/_hoverlabel.py index 5286153f634..1e75e90dcae 100644 --- a/plotly/graph_objs/sunburst/_hoverlabel.py +++ b/plotly/graph_objs/sunburst/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/sunburst/_insidetextfont.py b/plotly/graph_objs/sunburst/_insidetextfont.py index 48d370363cd..641ab2fc23c 100644 --- a/plotly/graph_objs/sunburst/_insidetextfont.py +++ b/plotly/graph_objs/sunburst/_insidetextfont.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/sunburst/_outsidetextfont.py b/plotly/graph_objs/sunburst/_outsidetextfont.py index 07709e4bfe8..46c3f9e3402 100644 --- a/plotly/graph_objs/sunburst/_outsidetextfont.py +++ b/plotly/graph_objs/sunburst/_outsidetextfont.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/sunburst/_textfont.py b/plotly/graph_objs/sunburst/_textfont.py index 6dcabc18404..a4ba94bd20b 100644 --- a/plotly/graph_objs/sunburst/_textfont.py +++ b/plotly/graph_objs/sunburst/_textfont.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/sunburst/hoverlabel/_font.py b/plotly/graph_objs/sunburst/hoverlabel/_font.py index 33c7f2b74b8..c2330c686a4 100644 --- a/plotly/graph_objs/sunburst/hoverlabel/_font.py +++ b/plotly/graph_objs/sunburst/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/sunburst/legendgrouptitle/_font.py b/plotly/graph_objs/sunburst/legendgrouptitle/_font.py index 5b753a2d9a6..f58868d6728 100644 --- a/plotly/graph_objs/sunburst/legendgrouptitle/_font.py +++ b/plotly/graph_objs/sunburst/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/sunburst/marker/_colorbar.py b/plotly/graph_objs/sunburst/marker/_colorbar.py index d09ff1552b0..b054e3e7cba 100644 --- a/plotly/graph_objs/sunburst/marker/_colorbar.py +++ b/plotly/graph_objs/sunburst/marker/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/sunburst/marker/colorbar/_tickfont.py b/plotly/graph_objs/sunburst/marker/colorbar/_tickfont.py index 04da8811c9c..a6128929db6 100644 --- a/plotly/graph_objs/sunburst/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/sunburst/marker/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/sunburst/marker/colorbar/title/_font.py b/plotly/graph_objs/sunburst/marker/colorbar/title/_font.py index ba4e0c77cea..9e681aaff0b 100644 --- a/plotly/graph_objs/sunburst/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/sunburst/marker/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/surface/_colorbar.py b/plotly/graph_objs/surface/_colorbar.py index 1473bf94dbf..c0966cb1dc0 100644 --- a/plotly/graph_objs/surface/_colorbar.py +++ b/plotly/graph_objs/surface/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/surface/_hoverlabel.py b/plotly/graph_objs/surface/_hoverlabel.py index 5411df78a85..b6febd42e5c 100644 --- a/plotly/graph_objs/surface/_hoverlabel.py +++ b/plotly/graph_objs/surface/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/surface/colorbar/_tickfont.py b/plotly/graph_objs/surface/colorbar/_tickfont.py index b8736fc74be..8eab7185b72 100644 --- a/plotly/graph_objs/surface/colorbar/_tickfont.py +++ b/plotly/graph_objs/surface/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/surface/colorbar/title/_font.py b/plotly/graph_objs/surface/colorbar/title/_font.py index a5d1736e75a..dad3b729125 100644 --- a/plotly/graph_objs/surface/colorbar/title/_font.py +++ b/plotly/graph_objs/surface/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/surface/hoverlabel/_font.py b/plotly/graph_objs/surface/hoverlabel/_font.py index 32d05eaad33..77c1512323f 100644 --- a/plotly/graph_objs/surface/hoverlabel/_font.py +++ b/plotly/graph_objs/surface/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/surface/legendgrouptitle/_font.py b/plotly/graph_objs/surface/legendgrouptitle/_font.py index 37ecb290bb2..ef438211efd 100644 --- a/plotly/graph_objs/surface/legendgrouptitle/_font.py +++ b/plotly/graph_objs/surface/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/table/_domain.py b/plotly/graph_objs/table/_domain.py index 5cc3241f953..d92b8885724 100644 --- a/plotly/graph_objs/table/_domain.py +++ b/plotly/graph_objs/table/_domain.py @@ -16,7 +16,7 @@ def column(self): If there is a layout grid, use the domain for this column in the grid for this table trace . - The 'column' property is a integer and may be specified as: + The 'column' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -36,7 +36,7 @@ def row(self): If there is a layout grid, use the domain for this row in the grid for this table trace . - The 'row' property is a integer and may be specified as: + The 'row' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/table/_hoverlabel.py b/plotly/graph_objs/table/_hoverlabel.py index c4ab5a1c506..8b519cfc7ac 100644 --- a/plotly/graph_objs/table/_hoverlabel.py +++ b/plotly/graph_objs/table/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/table/cells/_font.py b/plotly/graph_objs/table/cells/_font.py index c0f59ea950a..d6344fc14af 100644 --- a/plotly/graph_objs/table/cells/_font.py +++ b/plotly/graph_objs/table/cells/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/table/header/_font.py b/plotly/graph_objs/table/header/_font.py index 7b39fc08bb2..ef70ce781f3 100644 --- a/plotly/graph_objs/table/header/_font.py +++ b/plotly/graph_objs/table/header/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/table/hoverlabel/_font.py b/plotly/graph_objs/table/hoverlabel/_font.py index d43a1e298de..0e0ad4b34a3 100644 --- a/plotly/graph_objs/table/hoverlabel/_font.py +++ b/plotly/graph_objs/table/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/table/legendgrouptitle/_font.py b/plotly/graph_objs/table/legendgrouptitle/_font.py index 8111db02db6..939abcfd6d1 100644 --- a/plotly/graph_objs/table/legendgrouptitle/_font.py +++ b/plotly/graph_objs/table/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/treemap/_domain.py b/plotly/graph_objs/treemap/_domain.py index 21b63ad7a2c..4fea2804dd9 100644 --- a/plotly/graph_objs/treemap/_domain.py +++ b/plotly/graph_objs/treemap/_domain.py @@ -16,7 +16,7 @@ def column(self): If there is a layout grid, use the domain for this column in the grid for this treemap trace . - The 'column' property is a integer and may be specified as: + The 'column' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -36,7 +36,7 @@ def row(self): If there is a layout grid, use the domain for this row in the grid for this treemap trace . - The 'row' property is a integer and may be specified as: + The 'row' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] diff --git a/plotly/graph_objs/treemap/_hoverlabel.py b/plotly/graph_objs/treemap/_hoverlabel.py index c79ecd3c173..7626c0b34da 100644 --- a/plotly/graph_objs/treemap/_hoverlabel.py +++ b/plotly/graph_objs/treemap/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/treemap/_insidetextfont.py b/plotly/graph_objs/treemap/_insidetextfont.py index 2587366adfc..96bd430a6f6 100644 --- a/plotly/graph_objs/treemap/_insidetextfont.py +++ b/plotly/graph_objs/treemap/_insidetextfont.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/treemap/_outsidetextfont.py b/plotly/graph_objs/treemap/_outsidetextfont.py index 2bbe923c54d..4fc50d14b49 100644 --- a/plotly/graph_objs/treemap/_outsidetextfont.py +++ b/plotly/graph_objs/treemap/_outsidetextfont.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/treemap/_textfont.py b/plotly/graph_objs/treemap/_textfont.py index 16f5ef0ecae..90b5d4b4e31 100644 --- a/plotly/graph_objs/treemap/_textfont.py +++ b/plotly/graph_objs/treemap/_textfont.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/treemap/hoverlabel/_font.py b/plotly/graph_objs/treemap/hoverlabel/_font.py index 106b281e517..78a32e5e73a 100644 --- a/plotly/graph_objs/treemap/hoverlabel/_font.py +++ b/plotly/graph_objs/treemap/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/treemap/legendgrouptitle/_font.py b/plotly/graph_objs/treemap/legendgrouptitle/_font.py index d0cda3da4f9..f647b835c7a 100644 --- a/plotly/graph_objs/treemap/legendgrouptitle/_font.py +++ b/plotly/graph_objs/treemap/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/treemap/marker/_colorbar.py b/plotly/graph_objs/treemap/marker/_colorbar.py index c156fb8119e..293312ece80 100644 --- a/plotly/graph_objs/treemap/marker/_colorbar.py +++ b/plotly/graph_objs/treemap/marker/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/treemap/marker/colorbar/_tickfont.py b/plotly/graph_objs/treemap/marker/colorbar/_tickfont.py index 54b017321cf..a23b0cb6b43 100644 --- a/plotly/graph_objs/treemap/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/treemap/marker/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/treemap/marker/colorbar/title/_font.py b/plotly/graph_objs/treemap/marker/colorbar/title/_font.py index 556b314359f..bf8f62e24e3 100644 --- a/plotly/graph_objs/treemap/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/treemap/marker/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/treemap/pathbar/_textfont.py b/plotly/graph_objs/treemap/pathbar/_textfont.py index 0475771404a..b07821f5f05 100644 --- a/plotly/graph_objs/treemap/pathbar/_textfont.py +++ b/plotly/graph_objs/treemap/pathbar/_textfont.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/violin/_hoverlabel.py b/plotly/graph_objs/violin/_hoverlabel.py index b52dde907cf..5e9f7d965db 100644 --- a/plotly/graph_objs/violin/_hoverlabel.py +++ b/plotly/graph_objs/violin/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/violin/hoverlabel/_font.py b/plotly/graph_objs/violin/hoverlabel/_font.py index 190b7e00741..21cbe22b75c 100644 --- a/plotly/graph_objs/violin/hoverlabel/_font.py +++ b/plotly/graph_objs/violin/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/violin/legendgrouptitle/_font.py b/plotly/graph_objs/violin/legendgrouptitle/_font.py index d9bd7adab22..cb257d25b01 100644 --- a/plotly/graph_objs/violin/legendgrouptitle/_font.py +++ b/plotly/graph_objs/violin/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/volume/_colorbar.py b/plotly/graph_objs/volume/_colorbar.py index ab97f844882..d740b7b00a5 100644 --- a/plotly/graph_objs/volume/_colorbar.py +++ b/plotly/graph_objs/volume/_colorbar.py @@ -279,7 +279,7 @@ def nticks(self): less than or equal to `nticks`. Has an effect only if `tickmode` is set to "auto". - The 'nticks' property is a integer and may be specified as: + The 'nticks' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [0, 9223372036854775807] @@ -707,7 +707,7 @@ def ticklabelstep(self): which labels are shown. Not implemented for axes with `type` "log" or "multicategory", or when `tickmode` is "array". - The 'ticklabelstep' property is a integer and may be specified as: + The 'ticklabelstep' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/volume/_hoverlabel.py b/plotly/graph_objs/volume/_hoverlabel.py index 880b0c9c25a..9dd7ef8d5ae 100644 --- a/plotly/graph_objs/volume/_hoverlabel.py +++ b/plotly/graph_objs/volume/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/volume/_surface.py b/plotly/graph_objs/volume/_surface.py index 7aa95512e6f..f2e0703110a 100644 --- a/plotly/graph_objs/volume/_surface.py +++ b/plotly/graph_objs/volume/_surface.py @@ -17,7 +17,7 @@ def count(self): iso-values. By default this value is 2 meaning that only minimum and maximum surfaces would be drawn. - The 'count' property is a integer and may be specified as: + The 'count' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 9223372036854775807] diff --git a/plotly/graph_objs/volume/colorbar/_tickfont.py b/plotly/graph_objs/volume/colorbar/_tickfont.py index ad46aa79331..8dbecc1e268 100644 --- a/plotly/graph_objs/volume/colorbar/_tickfont.py +++ b/plotly/graph_objs/volume/colorbar/_tickfont.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/volume/colorbar/title/_font.py b/plotly/graph_objs/volume/colorbar/title/_font.py index cf0cb0de68e..beb2666022e 100644 --- a/plotly/graph_objs/volume/colorbar/title/_font.py +++ b/plotly/graph_objs/volume/colorbar/title/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/volume/hoverlabel/_font.py b/plotly/graph_objs/volume/hoverlabel/_font.py index 43ab7f3915b..3bc57d5b68a 100644 --- a/plotly/graph_objs/volume/hoverlabel/_font.py +++ b/plotly/graph_objs/volume/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/volume/legendgrouptitle/_font.py b/plotly/graph_objs/volume/legendgrouptitle/_font.py index 59553af6eff..1147f2b7475 100644 --- a/plotly/graph_objs/volume/legendgrouptitle/_font.py +++ b/plotly/graph_objs/volume/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/waterfall/_hoverlabel.py b/plotly/graph_objs/waterfall/_hoverlabel.py index 784e0db27d6..ae38a89d2d3 100644 --- a/plotly/graph_objs/waterfall/_hoverlabel.py +++ b/plotly/graph_objs/waterfall/_hoverlabel.py @@ -175,7 +175,7 @@ def namelength(self): that many characters, but if it is longer, will truncate to `namelength - 3` characters and add an ellipsis. - The 'namelength' property is a integer and may be specified as: + The 'namelength' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [-1, 9223372036854775807] - A tuple, list, or one-dimensional numpy array of the above diff --git a/plotly/graph_objs/waterfall/_insidetextfont.py b/plotly/graph_objs/waterfall/_insidetextfont.py index a316c5ff6a5..3a5678b9f88 100644 --- a/plotly/graph_objs/waterfall/_insidetextfont.py +++ b/plotly/graph_objs/waterfall/_insidetextfont.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/waterfall/_outsidetextfont.py b/plotly/graph_objs/waterfall/_outsidetextfont.py index 8e1371b9277..e4c0ec0ba71 100644 --- a/plotly/graph_objs/waterfall/_outsidetextfont.py +++ b/plotly/graph_objs/waterfall/_outsidetextfont.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/waterfall/_textfont.py b/plotly/graph_objs/waterfall/_textfont.py index 5f6640e5f99..8115036747c 100644 --- a/plotly/graph_objs/waterfall/_textfont.py +++ b/plotly/graph_objs/waterfall/_textfont.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/waterfall/hoverlabel/_font.py b/plotly/graph_objs/waterfall/hoverlabel/_font.py index 025c5dc5352..5b4d6eb9cf3 100644 --- a/plotly/graph_objs/waterfall/hoverlabel/_font.py +++ b/plotly/graph_objs/waterfall/hoverlabel/_font.py @@ -351,7 +351,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/graph_objs/waterfall/legendgrouptitle/_font.py b/plotly/graph_objs/waterfall/legendgrouptitle/_font.py index 6e8055cee8a..e69cb92c5d0 100644 --- a/plotly/graph_objs/waterfall/legendgrouptitle/_font.py +++ b/plotly/graph_objs/waterfall/legendgrouptitle/_font.py @@ -189,7 +189,7 @@ def weight(self): """ Sets the weight (or boldness) of the font. - The 'weight' property is a integer and may be specified as: + The 'weight' property is an integer and may be specified as: - An int (or float that will be cast to an int) in the interval [1, 1000] OR exactly one of ['normal', 'bold'] (e.g. 'bold') diff --git a/plotly/offline/_plotlyjs_version.py b/plotly/offline/_plotlyjs_version.py index 0d91c0d4165..7ce30f1d23b 100644 --- a/plotly/offline/_plotlyjs_version.py +++ b/plotly/offline/_plotlyjs_version.py @@ -1,3 +1,3 @@ # DO NOT EDIT # This file is generated by the updatebundle commands.py command -__plotlyjs_version__ = "3.4.0" +__plotlyjs_version__ = "3.5.0" diff --git a/plotly/package_data/plotly.min.js b/plotly/package_data/plotly.min.js index 27f0de03d46..7ccc5bfe52e 100644 --- a/plotly/package_data/plotly.min.js +++ b/plotly/package_data/plotly.min.js @@ -1,5 +1,5 @@ /** -* plotly.js v3.4.0 +* plotly.js v3.5.0 * Copyright 2012-2026, Plotly, Inc. * All rights reserved. * Licensed under the MIT license @@ -12,92 +12,309 @@ root.moduleName = factory(); } } (typeof self !== "undefined" ? self : this, () => { -"use strict";var Plotly=(()=>{var ytt=Object.create;var DS=Object.defineProperty,_tt=Object.defineProperties,xtt=Object.getOwnPropertyDescriptor,btt=Object.getOwnPropertyDescriptors,wtt=Object.getOwnPropertyNames,p6=Object.getOwnPropertySymbols,Ttt=Object.getPrototypeOf,AO=Object.prototype.hasOwnProperty,pee=Object.prototype.propertyIsEnumerable;var vee=(e,t,r)=>t in e?DS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_g=(e,t)=>{for(var r in t||(t={}))AO.call(t,r)&&vee(e,r,t[r]);if(p6)for(var r of p6(t))pee.call(t,r)&&vee(e,r,t[r]);return e},j1=(e,t)=>_tt(e,btt(t));var gee=(e,t)=>{var r={};for(var n in e)AO.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&p6)for(var n of p6(e))t.indexOf(n)<0&&pee.call(e,n)&&(r[n]=e[n]);return r};var gu=(e,t)=>()=>(e&&(t=e(e=0)),t);var ye=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),mee=(e,t)=>{for(var r in t)DS(e,r,{get:t[r],enumerable:!0})},yee=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of wtt(t))!AO.call(e,i)&&i!==r&&DS(e,i,{get:()=>t[i],enumerable:!(n=xtt(t,i))||n.enumerable});return e};var Att=(e,t,r)=>(r=e!=null?ytt(Ttt(e)):{},yee(t||!e||!e.__esModule?DS(r,"default",{value:e,enumerable:!0}):r,e)),pb=e=>yee(DS({},"__esModule",{value:!0}),e);var g6=ye(_ee=>{"use strict";_ee.version="3.4.0"});var bee=ye((xee,m6)=>{(function(t,r,n){r[t]=r[t]||n(),typeof m6!="undefined"&&m6.exports&&(m6.exports=r[t])})("Promise",typeof window!="undefined"?window:xee,function(){"use strict";var t,r,n,i=Object.prototype.toString,a=typeof setImmediate!="undefined"?function(k){return setImmediate(k)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(k,E,T,L){return Object.defineProperty(k,E,{value:T,writable:!0,configurable:L!==!1})}}catch(p){t=function(E,T,L){return E[T]=L,E}}n=function(){var k,E,T;function L(x,C){this.fn=x,this.self=C,this.next=void 0}return{add:function(C,M){T=new L(C,M),E?E.next=T:k=T,E=T,T=void 0},drain:function(){var C=k;for(k=E=r=void 0;C;)C.fn.call(C.self),C=C.next}}}();function o(p,k){n.add(p,k),r||(r=a(n.drain))}function s(p){var k,E=typeof p;return p!=null&&(E=="object"||E=="function")&&(k=p.then),typeof k=="function"?k:!1}function l(){for(var p=0;p0&&o(l,E))}catch(T){f.call(new d(E),T)}}}function f(p){var k=this;k.triggered||(k.triggered=!0,k.def&&(k=k.def),k.msg=p,k.state=2,k.chain.length>0&&o(l,k))}function h(p,k,E,T){for(var L=0;L{(function(){var e={version:"3.8.2"},t=[].slice,r=function(X){return t.call(X)},n=self.document;function i(X){return X&&(X.ownerDocument||X.document||X).documentElement}function a(X){return X&&(X.ownerDocument&&X.ownerDocument.defaultView||X.document&&X||X.defaultView)}if(n)try{r(n.documentElement.childNodes)[0].nodeType}catch(X){r=function(se){for(var Te=se.length,Ne=new Array(Te);Te--;)Ne[Te]=se[Te];return Ne}}if(Date.now||(Date.now=function(){return+new Date}),n)try{n.createElement("DIV").style.setProperty("opacity",0,"")}catch(X){var o=this.Element.prototype,s=o.setAttribute,l=o.setAttributeNS,u=this.CSSStyleDeclaration.prototype,c=u.setProperty;o.setAttribute=function(se,Te){s.call(this,se,Te+"")},o.setAttributeNS=function(se,Te,Ne){l.call(this,se,Te,Ne+"")},u.setProperty=function(se,Te,Ne){c.call(this,se,Te+"",Ne)}}e.ascending=f;function f(X,se){return Xse?1:X>=se?0:NaN}e.descending=function(X,se){return seX?1:se>=X?0:NaN},e.min=function(X,se){var Te=-1,Ne=X.length,He,Ye;if(arguments.length===1){for(;++Te=Ye){He=Ye;break}for(;++TeYe&&(He=Ye)}else{for(;++Te=Ye){He=Ye;break}for(;++TeYe&&(He=Ye)}return He},e.max=function(X,se){var Te=-1,Ne=X.length,He,Ye;if(arguments.length===1){for(;++Te=Ye){He=Ye;break}for(;++TeHe&&(He=Ye)}else{for(;++Te=Ye){He=Ye;break}for(;++TeHe&&(He=Ye)}return He},e.extent=function(X,se){var Te=-1,Ne=X.length,He,Ye,kt;if(arguments.length===1){for(;++Te=Ye){He=kt=Ye;break}for(;++TeYe&&(He=Ye),kt=Ye){He=kt=Ye;break}for(;++TeYe&&(He=Ye),kt1)return kt/(jt-1)},e.deviation=function(){var X=e.variance.apply(this,arguments);return X&&Math.sqrt(X)};function v(X){return{left:function(se,Te,Ne,He){for(arguments.length<3&&(Ne=0),arguments.length<4&&(He=se.length);Ne>>1;X(se[Ye],Te)<0?Ne=Ye+1:He=Ye}return Ne},right:function(se,Te,Ne,He){for(arguments.length<3&&(Ne=0),arguments.length<4&&(He=se.length);Ne>>1;X(se[Ye],Te)>0?He=Ye:Ne=Ye+1}return Ne}}}var _=v(f);e.bisectLeft=_.left,e.bisect=e.bisectRight=_.right,e.bisector=function(X){return v(X.length===1?function(se,Te){return f(X(se),Te)}:X)},e.shuffle=function(X,se,Te){(Ne=arguments.length)<3&&(Te=X.length,Ne<2&&(se=0));for(var Ne=Te-se,He,Ye;Ne;)Ye=Math.random()*Ne--|0,He=X[Ne+se],X[Ne+se]=X[Ye+se],X[Ye+se]=He;return X},e.permute=function(X,se){for(var Te=se.length,Ne=new Array(Te);Te--;)Ne[Te]=X[se[Te]];return Ne},e.pairs=function(X){for(var se=0,Te=X.length-1,Ne,He=X[0],Ye=new Array(Te<0?0:Te);se=0;)for(kt=X[se],Te=kt.length;--Te>=0;)Ye[--He]=kt[Te];return Ye};var p=Math.abs;e.range=function(X,se,Te){if(arguments.length<3&&(Te=1,arguments.length<2&&(se=X,X=0)),(se-X)/Te===1/0)throw new Error("infinite range");var Ne=[],He=k(p(Te)),Ye=-1,kt;if(X*=He,se*=He,Te*=He,Te<0)for(;(kt=X+Te*++Ye)>se;)Ne.push(kt/He);else for(;(kt=X+Te*++Ye)=se.length)return He?He.call(X,jt):Ne?jt.sort(Ne):jt;for(var yr=-1,Hr=jt.length,qr=se[gr++],_i,bi,Zr,ai=new T,gi;++yr=se.length)return nt;var gr=[],yr=Te[jt++];return nt.forEach(function(Hr,qr){gr.push({key:Hr,values:kt(qr,jt)})}),yr?gr.sort(function(Hr,qr){return yr(Hr.key,qr.key)}):gr}return X.map=function(nt,jt){return Ye(jt,nt,0)},X.entries=function(nt){return kt(Ye(e.map,nt,0),0)},X.key=function(nt){return se.push(nt),X},X.sortKeys=function(nt){return Te[se.length-1]=nt,X},X.sortValues=function(nt){return Ne=nt,X},X.rollup=function(nt){return He=nt,X},X},e.set=function(X){var se=new U;if(X)for(var Te=0,Ne=X.length;Te=0&&(Ne=X.slice(Te+1),X=X.slice(0,Te)),X)return arguments.length<2?this[X].on(Ne):this[X].on(Ne,se);if(arguments.length===2){if(se==null)for(X in this)this.hasOwnProperty(X)&&this[X].on(Ne,null);return this}};function oe(X){var se=[],Te=new T;function Ne(){for(var He=se,Ye=-1,kt=He.length,nt;++Ye=0&&(Te=X.slice(0,se))!=="xmlns"&&(X=X.slice(se+1)),je.hasOwnProperty(Te)?{space:je[Te],local:X}:X}},Pe.attr=function(X,se){if(arguments.length<2){if(typeof X=="string"){var Te=this.node();return X=e.ns.qualify(X),X.local?Te.getAttributeNS(X.space,X.local):Te.getAttribute(X)}for(se in X)this.each(lt(se,X[se]));return this}return this.each(lt(X,se))};function lt(X,se){X=e.ns.qualify(X);function Te(){this.removeAttribute(X)}function Ne(){this.removeAttributeNS(X.space,X.local)}function He(){this.setAttribute(X,se)}function Ye(){this.setAttributeNS(X.space,X.local,se)}function kt(){var jt=se.apply(this,arguments);jt==null?this.removeAttribute(X):this.setAttribute(X,jt)}function nt(){var jt=se.apply(this,arguments);jt==null?this.removeAttributeNS(X.space,X.local):this.setAttributeNS(X.space,X.local,jt)}return se==null?X.local?Ne:Te:typeof se=="function"?X.local?nt:kt:X.local?Ye:He}function pt(X){return X.trim().replace(/\s+/g," ")}Pe.classed=function(X,se){if(arguments.length<2){if(typeof X=="string"){var Te=this.node(),Ne=(X=ot(X)).length,He=-1;if(se=Te.classList){for(;++He=0;)(Ye=Te[Ne])&&(He&&He!==Ye.nextSibling&&He.parentNode.insertBefore(Ye,He),He=Ye);return this},Pe.sort=function(X){X=St.apply(this,arguments);for(var se=-1,Te=this.length;++se=se&&(se=He+1);!(jt=kt[se])&&++se0&&(X=X.slice(0,He));var kt=er.get(X);kt&&(X=kt,Ye=wr);function nt(){var yr=this[Ne];yr&&(this.removeEventListener(X,yr,yr.$),delete this[Ne])}function jt(){var yr=Ye(se,r(arguments));nt.call(this),this.addEventListener(X,this[Ne]=yr,yr.$=Te),yr._=se}function gr(){var yr=new RegExp("^__on([^.]+)"+e.requote(X)+"$"),Hr;for(var qr in this)if(Hr=qr.match(yr)){var _i=this[qr];this.removeEventListener(Hr[1],_i,_i.$),delete this[qr]}}return He?se?jt:nt:se?H:gr}var er=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});n&&er.forEach(function(X){"on"+X in n&&er.remove(X)});function lr(X,se){return function(Te){var Ne=e.event;e.event=Te,se[0]=this.__data__;try{X.apply(this,se)}finally{e.event=Ne}}}function wr(X,se){var Te=lr(X,se);return function(Ne){var He=this,Ye=Ne.relatedTarget;(!Ye||Ye!==He&&!(Ye.compareDocumentPosition(He)&8))&&Te.call(He,Ne)}}var Lr,ti=0;function Br(X){var se=".dragsuppress-"+ ++ti,Te="click"+se,Ne=e.select(a(X)).on("touchmove"+se,_e).on("dragstart"+se,_e).on("selectstart"+se,_e);if(Lr==null&&(Lr="onselectstart"in X?!1:j(X.style,"userSelect")),Lr){var He=i(X).style,Ye=He[Lr];He[Lr]="none"}return function(kt){if(Ne.on(se,null),Lr&&(He[Lr]=Ye),kt){var nt=function(){Ne.on(Te,null)};Ne.on(Te,function(){_e(),nt()},!0),setTimeout(nt,0)}}}e.mouse=function(X){return dt(X,Ce())};var Vr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function dt(X,se){se.changedTouches&&(se=se.changedTouches[0]);var Te=X.ownerSVGElement||X;if(Te.createSVGPoint){var Ne=Te.createSVGPoint();if(Vr<0){var He=a(X);if(He.scrollX||He.scrollY){Te=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Ye=Te[0][0].getScreenCTM();Vr=!(Ye.f||Ye.e),Te.remove()}}return Vr?(Ne.x=se.pageX,Ne.y=se.pageY):(Ne.x=se.clientX,Ne.y=se.clientY),Ne=Ne.matrixTransform(X.getScreenCTM().inverse()),[Ne.x,Ne.y]}var kt=X.getBoundingClientRect();return[se.clientX-kt.left-X.clientLeft,se.clientY-kt.top-X.clientTop]}e.touch=function(X,se,Te){if(arguments.length<3&&(Te=se,se=Ce().changedTouches),se){for(var Ne=0,He=se.length,Ye;Ne0?1:X<0?-1:0}function ar(X,se,Te){return(se[0]-X[0])*(Te[1]-X[1])-(se[1]-X[1])*(Te[0]-X[0])}function vr(X){return X>1?0:X<-1?tt:Math.acos(X)}function ii(X){return X>1?xe:X<-1?-xe:Math.asin(X)}function pi(X){return((X=Math.exp(X))-1/X)/2}function $r(X){return((X=Math.exp(X))+1/X)/2}function di(X){return((X=Math.exp(2*X))-1)/(X+1)}function ji(X){return(X=Math.sin(X/2))*X}var In=Math.SQRT2,wi=2,On=4;e.interpolateZoom=function(X,se){var Te=X[0],Ne=X[1],He=X[2],Ye=se[0],kt=se[1],nt=se[2],jt=Ye-Te,gr=kt-Ne,yr=jt*jt+gr*gr,Hr,qr;if(yr0&&(Gn=Gn.transition().duration(kt)),Gn.call(Si.event)}function Ea(){ai&&ai.domain(Zr.range().map(function(Gn){return(Gn-X.x)/X.k}).map(Zr.invert)),Ii&&Ii.domain(gi.range().map(function(Gn){return(Gn-X.y)/X.k}).map(gi.invert))}function Ia(Gn){nt++||Gn({type:"zoomstart"})}function yo(Gn){Ea(),Gn({type:"zoom",scale:X.k,translate:[X.x,X.y]})}function Da(Gn){--nt||(Gn({type:"zoomend"}),Te=null)}function go(){var Gn=this,ja=bi.of(Gn,arguments),Fo=0,Uo=e.select(a(Gn)).on(gr,bu).on(yr,dl),$s=ei(e.mouse(Gn)),Sl=Br(Gn);fa.call(Gn),Ia(ja);function bu(){Fo=1,Un(e.mouse(Gn),$s),yo(ja)}function dl(){Uo.on(gr,null).on(yr,null),Sl(Fo),Da(ja)}}function Is(){var Gn=this,ja=bi.of(Gn,arguments),Fo={},Uo=0,$s,Sl=".zoom-"+e.event.changedTouches[0].identifier,bu="touchmove"+Sl,dl="touchend"+Sl,Sc=[],Me=e.select(Gn),bt=Br(Gn);Rr(),Ia(ja),Me.on(jt,null).on(qr,Rr);function zt(){var Gr=e.touches(Gn);return $s=X.k,Gr.forEach(function(mi){mi.identifier in Fo&&(Fo[mi.identifier]=ei(mi))}),Gr}function Rr(){var Gr=e.event.target;e.select(Gr).on(bu,jr).on(dl,Nr),Sc.push(Gr);for(var mi=e.event.changedTouches,Ui=0,qi=mi.length;Ui1){var en=Ei[0],Wi=Ei[1],si=en[0]-Wi[0],Mr=en[1]-Wi[1];Uo=si*si+Mr*Mr}}function jr(){var Gr=e.touches(Gn),mi,Ui,qi,Ei;fa.call(Gn);for(var Hn=0,en=Gr.length;Hn1?1:se,Te=Te<0?0:Te>1?1:Te,He=Te<=.5?Te*(1+se):Te+se-Te*se,Ne=2*Te-He;function Ye(nt){return nt>360?nt-=360:nt<0&&(nt+=360),nt<60?Ne+(He-Ne)*nt/60:nt<180?He:nt<240?Ne+(He-Ne)*(240-nt)/60:Ne}function kt(nt){return Math.round(Ye(nt)*255)}return new Wa(kt(X+120),kt(X),kt(X-120))}e.hcl=nr;function nr(X,se,Te){return this instanceof nr?(this.h=+X,this.c=+se,void(this.l=+Te)):arguments.length<2?X instanceof nr?new nr(X.h,X.c,X.l):X instanceof ri?Sn(X.l,X.a,X.b):Sn((X=jn((X=e.rgb(X)).r,X.g,X.b)).l,X.a,X.b):new nr(X,se,Te)}var Er=nr.prototype=new la;Er.brighter=function(X){return new nr(this.h,this.c,Math.min(100,this.l+Qr*(arguments.length?X:1)))},Er.darker=function(X){return new nr(this.h,this.c,Math.max(0,this.l-Qr*(arguments.length?X:1)))},Er.rgb=function(){return Xr(this.h,this.c,this.l).rgb()};function Xr(X,se,Te){return isNaN(X)&&(X=0),isNaN(se)&&(se=0),new ri(Te,Math.cos(X*=ke)*se,Math.sin(X)*se)}e.lab=ri;function ri(X,se,Te){return this instanceof ri?(this.l=+X,this.a=+se,void(this.b=+Te)):arguments.length<2?X instanceof ri?new ri(X.l,X.a,X.b):X instanceof nr?Xr(X.h,X.c,X.l):jn((X=Wa(X)).r,X.g,X.b):new ri(X,se,Te)}var Qr=18,Oi=.95047,$i=1,tn=1.08883,fn=ri.prototype=new la;fn.brighter=function(X){return new ri(Math.min(100,this.l+Qr*(arguments.length?X:1)),this.a,this.b)},fn.darker=function(X){return new ri(Math.max(0,this.l-Qr*(arguments.length?X:1)),this.a,this.b)},fn.rgb=function(){return yn(this.l,this.a,this.b)};function yn(X,se,Te){var Ne=(X+16)/116,He=Ne+se/500,Ye=Ne-Te/200;return He=Ba(He)*Oi,Ne=Ba(Ne)*$i,Ye=Ba(Ye)*tn,new Wa(ma(3.2404542*He-1.5371385*Ne-.4985314*Ye),ma(-.969266*He+1.8760108*Ne+.041556*Ye),ma(.0556434*He-.2040259*Ne+1.0572252*Ye))}function Sn(X,se,Te){return X>0?new nr(Math.atan2(Te,se)*vt,Math.sqrt(se*se+Te*Te),X):new nr(NaN,NaN,X)}function Ba(X){return X>.206893034?X*X*X:(X-4/29)/7.787037}function ua(X){return X>.008856?Math.pow(X,1/3):7.787037*X+4/29}function ma(X){return Math.round(255*(X<=.00304?12.92*X:1.055*Math.pow(X,1/2.4)-.055))}e.rgb=Wa;function Wa(X,se,Te){return this instanceof Wa?(this.r=~~X,this.g=~~se,void(this.b=~~Te)):arguments.length<2?X instanceof Wa?new Wa(X.r,X.g,X.b):Ha(""+X,Wa,rr):new Wa(X,se,Te)}function Fa(X){return new Wa(X>>16,X>>8&255,X&255)}function Xo(X){return Fa(X)+""}var da=Wa.prototype=new la;da.brighter=function(X){X=Math.pow(.7,arguments.length?X:1);var se=this.r,Te=this.g,Ne=this.b,He=30;return!se&&!Te&&!Ne?new Wa(He,He,He):(se&&se>4,Ne=Ne>>4|Ne,He=jt&240,He=He>>4|He,Ye=jt&15,Ye=Ye<<4|Ye):X.length===7&&(Ne=(jt&16711680)>>16,He=(jt&65280)>>8,Ye=jt&255)),se(Ne,He,Ye))}function vo(X,se,Te){var Ne=Math.min(X/=255,se/=255,Te/=255),He=Math.max(X,se,Te),Ye=He-Ne,kt,nt,jt=(He+Ne)/2;return Ye?(nt=jt<.5?Ye/(He+Ne):Ye/(2-He-Ne),X==He?kt=(se-Te)/Ye+(se0&&jt<1?0:kt),new Ut(kt,nt,jt)}function jn(X,se,Te){X=Mt(X),se=Mt(se),Te=Mt(Te);var Ne=ua((.4124564*X+.3575761*se+.1804375*Te)/Oi),He=ua((.2126729*X+.7151522*se+.072175*Te)/$i),Ye=ua((.0193339*X+.119192*se+.9503041*Te)/tn);return ri(116*He-16,500*(Ne-He),200*(He-Ye))}function Mt(X){return(X/=255)<=.04045?X/12.92:Math.pow((X+.055)/1.055,2.4)}function kr(X){var se=parseFloat(X);return X.charAt(X.length-1)==="%"?Math.round(se*2.55):se}var Jr=e.map({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});Jr.forEach(function(X,se){Jr.set(X,Fa(se))});function vi(X){return typeof X=="function"?X:function(){return X}}e.functor=vi,e.xhr=hn(G);function hn(X){return function(se,Te,Ne){return arguments.length===2&&typeof Te=="function"&&(Ne=Te,Te=null),An(se,Te,X,Ne)}}function An(X,se,Te,Ne){var He={},Ye=e.dispatch("beforesend","progress","load","error"),kt={},nt=new XMLHttpRequest,jt=null;self.XDomainRequest&&!("withCredentials"in nt)&&/^(http(s)?:)?\/\//.test(X)&&(nt=new XDomainRequest),"onload"in nt?nt.onload=nt.onerror=gr:nt.onreadystatechange=function(){nt.readyState>3&&gr()};function gr(){var yr=nt.status,Hr;if(!yr&&Li(nt)||yr>=200&&yr<300||yr===304){try{Hr=Te.call(He,nt)}catch(qr){Ye.error.call(He,qr);return}Ye.load.call(He,Hr)}else Ye.error.call(He,nt)}return nt.onprogress=function(yr){var Hr=e.event;e.event=yr;try{Ye.progress.call(He,nt)}finally{e.event=Hr}},He.header=function(yr,Hr){return yr=(yr+"").toLowerCase(),arguments.length<2?kt[yr]:(Hr==null?delete kt[yr]:kt[yr]=Hr+"",He)},He.mimeType=function(yr){return arguments.length?(se=yr==null?null:yr+"",He):se},He.responseType=function(yr){return arguments.length?(jt=yr,He):jt},He.response=function(yr){return Te=yr,He},["get","post"].forEach(function(yr){He[yr]=function(){return He.send.apply(He,[yr].concat(r(arguments)))}}),He.send=function(yr,Hr,qr){if(arguments.length===2&&typeof Hr=="function"&&(qr=Hr,Hr=null),nt.open(yr,X,!0),se!=null&&!("accept"in kt)&&(kt.accept=se+",*/*"),nt.setRequestHeader)for(var _i in kt)nt.setRequestHeader(_i,kt[_i]);return se!=null&&nt.overrideMimeType&&nt.overrideMimeType(se),jt!=null&&(nt.responseType=jt),qr!=null&&He.on("error",qr).on("load",function(bi){qr(null,bi)}),Ye.beforesend.call(He,nt),nt.send(Hr==null?null:Hr),He},He.abort=function(){return nt.abort(),He},e.rebind(He,Ye,"on"),Ne==null?He:He.get(Mn(Ne))}function Mn(X){return X.length===1?function(se,Te){X(se==null?Te:null)}:X}function Li(X){var se=X.responseType;return se&&se!=="text"?X.response:X.responseText}e.dsv=function(X,se){var Te=new RegExp('["'+X+` -]`),Ne=X.charCodeAt(0);function He(gr,yr,Hr){arguments.length<3&&(Hr=yr,yr=null);var qr=An(gr,se,yr==null?Ye:kt(yr),Hr);return qr.row=function(_i){return arguments.length?qr.response((yr=_i)==null?Ye:kt(_i)):yr},qr}function Ye(gr){return He.parse(gr.responseText)}function kt(gr){return function(yr){return He.parse(yr.responseText,gr)}}He.parse=function(gr,yr){var Hr;return He.parseRows(gr,function(qr,_i){if(Hr)return Hr(qr,_i-1);var bi=function(Zr){for(var ai={},gi=qr.length,Ii=0;Ii=bi)return qr;if(Ii)return Ii=!1,Hr;var Ln=Zr;if(gr.charCodeAt(Ln)===34){for(var En=Ln;En++24?(isFinite(se)&&(clearTimeout(Ma),Ma=setTimeout(po,se)),$n=0):($n=1,_o(po))}e.timer.flush=function(){Lo(),ko()};function Lo(){for(var X=Date.now(),se=_n;se;)X>=se.t&&se.c(X-se.t)&&(se.c=null),se=se.n;return X}function ko(){for(var X,se=_n,Te=1/0;se;)se.c?(se.t=0;--nt)Zr.push(He[gr[Hr[nt]][2]]);for(nt=+_i;nt1&&ar(X[Te[Ne-2]],X[Te[Ne-1]],X[He])<=0;)--Ne;Te[Ne++]=He}return Te.slice(0,Ne)}function ul(X,se){return X[0]-se[0]||X[1]-se[1]}e.geom.polygon=function(X){return ie(X,zl),X};var zl=e.geom.polygon.prototype=[];zl.area=function(){for(var X=-1,se=this.length,Te,Ne=this[se-1],He=0;++XJe)nt=nt.L;else if(kt=se-xo(nt,Te),kt>Je){if(!nt.R){Ne=nt;break}nt=nt.R}else{Ye>-Je?(Ne=nt.P,He=nt):kt>-Je?(Ne=nt,He=nt.N):Ne=He=nt;break}var jt=bs(X);if(zs.insert(Ne,jt),!(!Ne&&!He)){if(Ne===He){Oo(Ne),He=bs(Ne.site),zs.insert(jt,He),jt.edge=He.edge=rf(Ne.site,jt.site),aa(Ne),aa(He);return}if(!He){jt.edge=rf(Ne.site,jt.site);return}Oo(Ne),Oo(He);var gr=Ne.site,yr=gr.x,Hr=gr.y,qr=X.x-yr,_i=X.y-Hr,bi=He.site,Zr=bi.x-yr,ai=bi.y-Hr,gi=2*(qr*ai-_i*Zr),Ii=qr*qr+_i*_i,Si=Zr*Zr+ai*ai,ei={x:(ai*Ii-_i*Si)/gi+yr,y:(qr*Si-Zr*Ii)/gi+Hr};pl(He.edge,gr,bi,ei),jt.edge=rf(gr,X,null,ei),He.edge=rf(X,bi,null,ei),aa(Ne),aa(He)}}function Ol(X,se){var Te=X.site,Ne=Te.x,He=Te.y,Ye=He-se;if(!Ye)return Ne;var kt=X.P;if(!kt)return-1/0;Te=kt.site;var nt=Te.x,jt=Te.y,gr=jt-se;if(!gr)return nt;var yr=nt-Ne,Hr=1/Ye-1/gr,qr=yr/gr;return Hr?(-qr+Math.sqrt(qr*qr-2*Hr*(yr*yr/(-2*gr)-jt+gr/2+He-Ye/2)))/Hr+Ne:(Ne+nt)/2}function xo(X,se){var Te=X.N;if(Te)return Ol(Te,se);var Ne=X.site;return Ne.y===se?Ne.x:1/0}function Kl(X){this.site=X,this.edges=[]}Kl.prototype.prepare=function(){for(var X=this.edges,se=X.length,Te;se--;)Te=X[se].edge,(!Te.b||!Te.a)&&X.splice(se,1);return X.sort(Hl),X.length};function Ns(X){for(var se=X[0][0],Te=X[1][0],Ne=X[0][1],He=X[1][1],Ye,kt,nt,jt,gr=Ks,yr=gr.length,Hr,qr,_i,bi,Zr,ai;yr--;)if(Hr=gr[yr],!(!Hr||!Hr.prepare()))for(_i=Hr.edges,bi=_i.length,qr=0;qrJe||p(jt-kt)>Je)&&(_i.splice(qr,0,new Zc(Vf(Hr.site,ai,p(nt-se)Je?{x:se,y:p(Ye-se)Je?{x:p(kt-He)Je?{x:Te,y:p(Ye-Te)Je?{x:p(kt-Ne)=-We)){var qr=jt*jt+gr*gr,_i=yr*yr+ai*ai,bi=(ai*qr-gr*_i)/Hr,Zr=(jt*_i-yr*qr)/Hr,ai=Zr+nt,gi=Su.pop()||new ac;gi.arc=X,gi.site=He,gi.x=bi+kt,gi.y=ai+Math.sqrt(bi*bi+Zr*Zr),gi.cy=ai,X.circle=gi;for(var Ii=null,Si=Yl._;Si;)if(gi.y0)){if(Zr/=_i,_i<0){if(Zr0){if(Zr>qr)return;Zr>Hr&&(Hr=Zr)}if(Zr=Te-nt,!(!_i&&Zr<0)){if(Zr/=_i,_i<0){if(Zr>qr)return;Zr>Hr&&(Hr=Zr)}else if(_i>0){if(Zr0)){if(Zr/=bi,bi<0){if(Zr0){if(Zr>qr)return;Zr>Hr&&(Hr=Zr)}if(Zr=Ne-jt,!(!bi&&Zr<0)){if(Zr/=bi,bi<0){if(Zr>qr)return;Zr>Hr&&(Hr=Zr)}else if(bi>0){if(Zr0&&(He.a={x:nt+Hr*_i,y:jt+Hr*bi}),qr<1&&(He.b={x:nt+qr*_i,y:jt+qr*bi}),He}}}}}}function ql(X){for(var se=cl,Te=qo(X[0][0],X[0][1],X[1][0],X[1][1]),Ne=se.length,He;Ne--;)He=se[Ne],(!Pc(He,X)||!Te(He)||p(He.a.x-He.b.x)=Ye)return;if(yr>qr){if(!Ne)Ne={x:bi,y:kt};else if(Ne.y>=nt)return;Te={x:bi,y:nt}}else{if(!Ne)Ne={x:bi,y:nt};else if(Ne.y1)if(yr>qr){if(!Ne)Ne={x:(kt-gi)/ai,y:kt};else if(Ne.y>=nt)return;Te={x:(nt-gi)/ai,y:nt}}else{if(!Ne)Ne={x:(nt-gi)/ai,y:nt};else if(Ne.y=Ye)return;Te={x:Ye,y:ai*Ye+gi}}else{if(!Ne)Ne={x:Ye,y:ai*Ye+gi};else if(Ne.x=yr&&gi.x<=qr&&gi.y>=Hr&&gi.y<=_i?[[yr,_i],[qr,_i],[qr,Hr],[yr,Hr]]:[];Ii.point=jt[Zr]}),gr}function nt(jt){return jt.map(function(gr,yr){return{x:Math.round(Ne(gr,yr)/Je)*Je,y:Math.round(He(gr,yr)/Je)*Je,i:yr}})}return kt.links=function(jt){return sc(nt(jt)).edges.filter(function(gr){return gr.l&&gr.r}).map(function(gr){return{source:jt[gr.l.i],target:jt[gr.r.i]}})},kt.triangles=function(jt){var gr=[];return sc(nt(jt)).cells.forEach(function(yr,Hr){for(var qr=yr.site,_i=yr.edges.sort(Hl),bi=-1,Zr=_i.length,ai,gi,Ii=_i[Zr-1].edge,Si=Ii.l===qr?Ii.r:Ii.l;++biSi&&(Si=yr.x),yr.y>ei&&(ei=yr.y),_i.push(yr.x),bi.push(yr.y);else for(Zr=0;ZrSi&&(Si=Ln),En>ei&&(ei=En),_i.push(Ln),bi.push(En)}var Un=Si-gi,ia=ei-Ii;Un>ia?ei=Ii+Un:Si=gi+ia;function Ea(Da,go,Is,Ms,Xs,Gn,ja,Fo){if(!(isNaN(Is)||isNaN(Ms)))if(Da.leaf){var Uo=Da.x,$s=Da.y;if(Uo!=null)if(p(Uo-Is)+p($s-Ms)<.01)Ia(Da,go,Is,Ms,Xs,Gn,ja,Fo);else{var Sl=Da.point;Da.x=Da.y=Da.point=null,Ia(Da,Sl,Uo,$s,Xs,Gn,ja,Fo),Ia(Da,go,Is,Ms,Xs,Gn,ja,Fo)}else Da.x=Is,Da.y=Ms,Da.point=go}else Ia(Da,go,Is,Ms,Xs,Gn,ja,Fo)}function Ia(Da,go,Is,Ms,Xs,Gn,ja,Fo){var Uo=(Xs+ja)*.5,$s=(Gn+Fo)*.5,Sl=Is>=Uo,bu=Ms>=$s,dl=bu<<1|Sl;Da.leaf=!1,Da=Da.nodes[dl]||(Da.nodes[dl]=$l()),Sl?Xs=Uo:ja=Uo,bu?Gn=$s:Fo=$s,Ea(Da,go,Is,Ms,Xs,Gn,ja,Fo)}var yo=$l();if(yo.add=function(Da){Ea(yo,Da,+Hr(Da,++Zr),+qr(Da,Zr),gi,Ii,Si,ei)},yo.visit=function(Da){fl(Da,yo,gi,Ii,Si,ei)},yo.find=function(Da){return lc(yo,Da[0],Da[1],gi,Ii,Si,ei)},Zr=-1,se==null){for(;++ZrYe||qr>kt||_i=Ln,ia=Te>=En,Ea=ia<<1|Un,Ia=Ea+4;EaTe&&(Ye=se.slice(Te,Ye),nt[kt]?nt[kt]+=Ye:nt[++kt]=Ye),(Ne=Ne[0])===(He=He[0])?nt[kt]?nt[kt]+=He:nt[++kt]=He:(nt[++kt]=null,jt.push({i:kt,x:Hs(Ne,He)})),Te=uc.lastIndex;return Te=0&&!(Ne=e.interpolators[Te](X,se)););return Ne}e.interpolators=[function(X,se){var Te=typeof se;return(Te==="string"?Jr.has(se.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(se)?Fu:Go:se instanceof la?Fu:Array.isArray(se)?Gu:Te==="object"&&isNaN(se)?Es:Hs)(X,se)}],e.interpolateArray=Gu;function Gu(X,se){var Te=[],Ne=[],He=X.length,Ye=se.length,kt=Math.min(X.length,se.length),nt;for(nt=0;nt=0?X.slice(0,se):X,Ne=se>=0?X.slice(se+1):"in";return Te=od.get(Te)||qs,Ne=Po.get(Ne)||G,sd(Ne(Te.apply(null,t.call(arguments,1))))};function sd(X){return function(se){return se<=0?0:se>=1?1:X(se)}}function Ko(X){return function(se){return 1-X(1-se)}}function Pa(X){return function(se){return .5*(se<.5?X(2*se):2-X(2-2*se))}}function af(X){return X*X}function Hu(X){return X*X*X}function bl(X){if(X<=0)return 0;if(X>=1)return 1;var se=X*X,Te=se*X;return 4*(X<.5?Te:3*(X-se)+Te-.75)}function Hf(X){return function(se){return Math.pow(se,X)}}function Ic(X){return 1-Math.cos(X*xe)}function yf(X){return Math.pow(2,10*(X-1))}function Bl(X){return 1-Math.sqrt(1-X*X)}function Ah(X,se){var Te;return arguments.length<2&&(se=.45),arguments.length?Te=se/xt*Math.asin(1/X):(X=1,Te=se/4),function(Ne){return 1+X*Math.pow(2,-10*Ne)*Math.sin((Ne-Te)*xt/se)}}function Qf(X){return X||(X=1.70158),function(se){return se*se*((X+1)*se-X)}}function _f(X){return X<1/2.75?7.5625*X*X:X<2/2.75?7.5625*(X-=1.5/2.75)*X+.75:X<2.5/2.75?7.5625*(X-=2.25/2.75)*X+.9375:7.5625*(X-=2.625/2.75)*X+.984375}e.interpolateHcl=Yc;function Yc(X,se){X=e.hcl(X),se=e.hcl(se);var Te=X.h,Ne=X.c,He=X.l,Ye=se.h-Te,kt=se.c-Ne,nt=se.l-He;return isNaN(kt)&&(kt=0,Ne=isNaN(Ne)?se.c:Ne),isNaN(Ye)?(Ye=0,Te=isNaN(Te)?se.h:Te):Ye>180?Ye-=360:Ye<-180&&(Ye+=360),function(jt){return Xr(Te+Ye*jt,Ne+kt*jt,He+nt*jt)+""}}e.interpolateHsl=eh;function eh(X,se){X=e.hsl(X),se=e.hsl(se);var Te=X.h,Ne=X.s,He=X.l,Ye=se.h-Te,kt=se.s-Ne,nt=se.l-He;return isNaN(kt)&&(kt=0,Ne=isNaN(Ne)?se.s:Ne),isNaN(Ye)?(Ye=0,Te=isNaN(Te)?se.h:Te):Ye>180?Ye-=360:Ye<-180&&(Ye+=360),function(jt){return rr(Te+Ye*jt,Ne+kt*jt,He+nt*jt)+""}}e.interpolateLab=th;function th(X,se){X=e.lab(X),se=e.lab(se);var Te=X.l,Ne=X.a,He=X.b,Ye=se.l-Te,kt=se.a-Ne,nt=se.b-He;return function(jt){return yn(Te+Ye*jt,Ne+kt*jt,He+nt*jt)+""}}e.interpolateRound=ju;function ju(X,se){return se-=X,function(Te){return Math.round(X+se*Te)}}e.transform=function(X){var se=n.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(Te){if(Te!=null){se.setAttribute("transform",Te);var Ne=se.transform.baseVal.consolidate()}return new jf(Ne?Ne.matrix:Kc)})(X)};function jf(X){var se=[X.a,X.b],Te=[X.c,X.d],Ne=of(se),He=cc(se,Te),Ye=of(Nl(Te,se,-He))||0;se[0]*Te[1]180?se+=360:se-X>180&&(X+=360),Ne.push({i:Te.push(Rc(Te)+"rotate(",null,")")-2,x:Hs(X,se)})):se&&Te.push(Rc(Te)+"rotate("+se+")")}function Wh(X,se,Te,Ne){X!==se?Ne.push({i:Te.push(Rc(Te)+"skewX(",null,")")-2,x:Hs(X,se)}):se&&Te.push(Rc(Te)+"skewX("+se+")")}function rh(X,se,Te,Ne){if(X[0]!==se[0]||X[1]!==se[1]){var He=Te.push(Rc(Te)+"scale(",null,",",null,")");Ne.push({i:He-4,x:Hs(X[0],se[0])},{i:He-2,x:Hs(X[1],se[1])})}else(se[0]!==1||se[1]!==1)&&Te.push(Rc(Te)+"scale("+se+")")}function sf(X,se){var Te=[],Ne=[];return X=e.transform(X),se=e.transform(se),gs(X.translate,se.translate,Te,Ne),Wf(X.rotate,se.rotate,Te,Ne),Wh(X.skew,se.skew,Te,Ne),rh(X.scale,se.scale,Te,Ne),X=se=null,function(He){for(var Ye=-1,kt=Ne.length,nt;++Ye0?Ye=ei:(Te.c=null,Te.t=NaN,Te=null,se.end({type:"end",alpha:Ye=0})):ei>0&&(se.start({type:"start",alpha:Ye=ei}),Te=No(X.tick)),X):Ye},X.start=function(){var ei,Ln=_i.length,En=bi.length,Un=Ne[0],ia=Ne[1],Ea,Ia;for(ei=0;ei=0;)Ye.push(yr=gr[jt]),yr.parent=nt,yr.depth=nt.depth+1;Te&&(nt.value=0),nt.children=gr}else Te&&(nt.value=+Te.call(Ne,nt,nt.depth)||0),delete nt.children;return wc(He,function(Hr){var qr,_i;X&&(qr=Hr.children)&&qr.sort(X),Te&&(_i=Hr.parent)&&(_i.value+=Hr.value)}),kt}return Ne.sort=function(He){return arguments.length?(X=He,Ne):X},Ne.children=function(He){return arguments.length?(se=He,Ne):se},Ne.value=function(He){return arguments.length?(Te=He,Ne):Te},Ne.revalue=function(He){return Te&&(Fc(He,function(Ye){Ye.children&&(Ye.value=0)}),wc(He,function(Ye){var kt;Ye.children||(Ye.value=+Te.call(Ne,Ye,Ye.depth)||0),(kt=Ye.parent)&&(kt.value+=Ye.value)})),He},Ne};function zu(X,se){return e.rebind(X,se,"sort","children","value"),X.nodes=X,X.links=Ou,X}function Fc(X,se){for(var Te=[X];(X=Te.pop())!=null;)if(se(X),(He=X.children)&&(Ne=He.length))for(var Ne,He;--Ne>=0;)Te.push(He[Ne])}function wc(X,se){for(var Te=[X],Ne=[];(X=Te.pop())!=null;)if(Ne.push(X),(kt=X.children)&&(Ye=kt.length))for(var He=-1,Ye,kt;++HeHe&&(He=nt),Ne.push(nt)}for(kt=0;ktNe&&(Te=se,Ne=He);return Te}function Us(X){return X.reduce(wf,0)}function wf(X,se){return X+se[1]}e.layout.histogram=function(){var X=!0,se=Number,Te=Rf,Ne=zc;function He(Ye,qr){for(var nt=[],jt=Ye.map(se,this),gr=Te.call(this,jt,qr),yr=Ne.call(this,gr,jt,qr),Hr,qr=-1,_i=jt.length,bi=yr.length-1,Zr=X?1:1/_i,ai;++qr0)for(qr=-1;++qr<_i;)ai=jt[qr],ai>=gr[0]&&ai<=gr[1]&&(Hr=nt[e.bisect(yr,ai,1,bi)-1],Hr.y+=Zr,Hr.push(Ye[qr]));return nt}return He.value=function(Ye){return arguments.length?(se=Ye,He):se},He.range=function(Ye){return arguments.length?(Te=vi(Ye),He):Te},He.bins=function(Ye){return arguments.length?(Ne=typeof Ye=="number"?function(kt){return Wu(kt,Ye)}:vi(Ye),He):Ne},He.frequency=function(Ye){return arguments.length?(X=!!Ye,He):X},He};function zc(X,se){return Wu(X,Math.ceil(Math.log(se.length)/Math.LN2+1))}function Wu(X,se){for(var Te=-1,Ne=+X[0],He=(X[1]-Ne)/se,Ye=[];++Te<=se;)Ye[Te]=He*Te+Ne;return Ye}function Rf(X){return[e.min(X),e.max(X)]}e.layout.pack=function(){var X=e.layout.hierarchy().sort(Xu),se=0,Te=[1,1],Ne;function He(Ye,kt){var nt=X.call(this,Ye,kt),jt=nt[0],gr=Te[0],yr=Te[1],Hr=Ne==null?Math.sqrt:typeof Ne=="function"?Ne:function(){return Ne};if(jt.x=jt.y=0,wc(jt,function(_i){_i.r=+Hr(_i.value)}),wc(jt,ah),se){var qr=se*(Ne?1:Math.max(2*jt.r/gr,2*jt.r/yr))/2;wc(jt,function(_i){_i.r+=qr}),wc(jt,ah),wc(jt,function(_i){_i.r-=qr})}return Tc(jt,gr/2,yr/2,Ne?1:1/Math.max(2*jt.r/gr,2*jt.r/yr)),nt}return He.size=function(Ye){return arguments.length?(Te=Ye,He):Te},He.radius=function(Ye){return arguments.length?(Ne=Ye==null||typeof Ye=="function"?Ye:+Ye,He):Ne},He.padding=function(Ye){return arguments.length?(se=+Ye,He):se},zu(He,X)};function Xu(X,se){return X.value-se.value}function uf(X,se){var Te=X._pack_next;X._pack_next=se,se._pack_prev=X,se._pack_next=Te,Te._pack_prev=se}function Zf(X,se){X._pack_next=se,se._pack_prev=X}function Wl(X,se){var Te=se.x-X.x,Ne=se.y-X.y,He=X.r+se.r;return .999*He*He>Te*Te+Ne*Ne}function ah(X){if(!(se=X.children)||!(qr=se.length))return;var se,Te=1/0,Ne=-1/0,He=1/0,Ye=-1/0,kt,nt,jt,gr,yr,Hr,qr;function _i(ei){Te=Math.min(ei.x-ei.r,Te),Ne=Math.max(ei.x+ei.r,Ne),He=Math.min(ei.y-ei.r,He),Ye=Math.max(ei.y+ei.r,Ye)}if(se.forEach(Zu),kt=se[0],kt.x=-kt.r,kt.y=0,_i(kt),qr>1&&(nt=se[1],nt.x=nt.r,nt.y=0,_i(nt),qr>2))for(jt=se[2],wl(kt,nt,jt),_i(jt),uf(kt,jt),kt._pack_prev=jt,uf(jt,nt),nt=kt._pack_next,gr=3;grai.x&&(ai=Ln),Ln.depth>gi.depth&&(gi=Ln)});var Ii=se(Zr,ai)/2-Zr.x,Si=Te[0]/(ai.x+se(ai,Zr)/2+Ii),ei=Te[1]/(gi.depth||1);Fc(_i,function(Ln){Ln.x=(Ln.x+Ii)*Si,Ln.y=Ln.depth*ei})}return qr}function Ye(yr){for(var Hr={A:null,children:[yr]},qr=[Hr],_i;(_i=qr.pop())!=null;)for(var bi=_i.children,Zr,ai=0,gi=bi.length;ai0&&(fc(At(Zr,yr,qr),yr,Ln),gi+=Ln,Ii+=Ln),Si+=Zr.m,gi+=_i.m,ei+=ai.m,Ii+=bi.m;Zr&&!cf(bi)&&(bi.t=Zr,bi.m+=Si-Ii),_i&&!qc(ai)&&(ai.t=_i,ai.m+=gi-ei,qr=yr)}return qr}function gr(yr){yr.x*=Te[0],yr.y=yr.depth*Te[1]}return He.separation=function(yr){return arguments.length?(se=yr,He):se},He.size=function(yr){return arguments.length?(Ne=(Te=yr)==null?gr:null,He):Ne?null:Te},He.nodeSize=function(yr){return arguments.length?(Ne=(Te=yr)==null?null:gr,He):Ne?Te:null},zu(He,X)};function vu(X,se){return X.parent==se.parent?1:2}function qc(X){var se=X.children;return se.length?se[0]:X.t}function cf(X){var se=X.children,Te;return(Te=se.length)?se[Te-1]:X.t}function fc(X,se,Te){var Ne=Te/(se.i-X.i);se.c-=Ne,se.s+=Te,X.c+=Ne,se.z+=Te,se.m+=Te}function Bc(X){for(var se=0,Te=0,Ne=X.children,He=Ne.length,Ye;--He>=0;)Ye=Ne[He],Ye.z+=se,Ye.m+=se,se+=Ye.s+(Te+=Ye.c)}function At(X,se,Te){return X.a.parent===se.parent?X.a:Te}e.layout.cluster=function(){var X=e.layout.hierarchy().sort(null).value(null),se=vu,Te=[1,1],Ne=!1;function He(Ye,kt){var nt=X.call(this,Ye,kt),jt=nt[0],gr,yr=0;wc(jt,function(Zr){var ai=Zr.children;ai&&ai.length?(Zr.x=Cr(ai),Zr.y=Xt(ai)):(Zr.x=gr?yr+=se(Zr,gr):0,Zr.y=0,gr=Zr)});var Hr=Ar(jt),qr=Kr(jt),_i=Hr.x-se(Hr,qr)/2,bi=qr.x+se(qr,Hr)/2;return wc(jt,Ne?function(Zr){Zr.x=(Zr.x-jt.x)*Te[0],Zr.y=(jt.y-Zr.y)*Te[1]}:function(Zr){Zr.x=(Zr.x-_i)/(bi-_i)*Te[0],Zr.y=(1-(jt.y?Zr.y/jt.y:1))*Te[1]}),nt}return He.separation=function(Ye){return arguments.length?(se=Ye,He):se},He.size=function(Ye){return arguments.length?(Ne=(Te=Ye)==null,He):Ne?null:Te},He.nodeSize=function(Ye){return arguments.length?(Ne=(Te=Ye)!=null,He):Ne?Te:null},zu(He,X)};function Xt(X){return 1+e.max(X,function(se){return se.y})}function Cr(X){return X.reduce(function(se,Te){return se+Te.x},0)/X.length}function Ar(X){var se=X.children;return se&&se.length?Ar(se[0]):X}function Kr(X){var se=X.children,Te;return se&&(Te=se.length)?Kr(se[Te-1]):X}e.layout.treemap=function(){var X=e.layout.hierarchy(),se=Math.round,Te=[1,1],Ne=null,He=ki,Ye=!1,kt,nt="squarify",jt=.5*(1+Math.sqrt(5));function gr(Zr,ai){for(var gi=-1,Ii=Zr.length,Si,ei;++gi0;)Ii.push(ei=Si[ia-1]),Ii.area+=ei.area,nt!=="squarify"||(En=qr(Ii,Un))<=Ln?(Si.pop(),Ln=En):(Ii.area-=Ii.pop().area,_i(Ii,Un,gi,!1),Un=Math.min(gi.dx,gi.dy),Ii.length=Ii.area=0,Ln=1/0);Ii.length&&(_i(Ii,Un,gi,!0),Ii.length=Ii.area=0),ai.forEach(yr)}}function Hr(Zr){var ai=Zr.children;if(ai&&ai.length){var gi=He(Zr),Ii=ai.slice(),Si,ei=[];for(gr(Ii,gi.dx*gi.dy/Zr.value),ei.area=0;Si=Ii.pop();)ei.push(Si),ei.area+=Si.area,Si.z!=null&&(_i(ei,Si.z?gi.dx:gi.dy,gi,!Ii.length),ei.length=ei.area=0);ai.forEach(Hr)}}function qr(Zr,ai){for(var gi=Zr.area,Ii,Si=0,ei=1/0,Ln=-1,En=Zr.length;++LnSi&&(Si=Ii));return gi*=gi,ai*=ai,gi?Math.max(ai*Si*jt/gi,gi/(ai*ei*jt)):1/0}function _i(Zr,ai,gi,Ii){var Si=-1,ei=Zr.length,Ln=gi.x,En=gi.y,Un=ai?se(Zr.area/ai):0,ia;if(ai==gi.dx){for((Ii||Un>gi.dy)&&(Un=gi.dy);++Sigi.dx)&&(Un=gi.dx);++Si1);return X+se*Ne*Math.sqrt(-2*Math.log(Ye)/Ye)}},logNormal:function(){var X=e.random.normal.apply(e,arguments);return function(){return Math.exp(X())}},bates:function(X){var se=e.random.irwinHall(X);return function(){return se()/X}},irwinHall:function(X){return function(){for(var se=0,Te=0;Te2?Fi:Nn,gr=Ne?Mu:Sh;return He=jt(X,se,gr,Te),Ye=jt(se,X,gr,xl),nt}function nt(jt){return He(jt)}return nt.invert=function(jt){return Ye(jt)},nt.domain=function(jt){return arguments.length?(X=jt.map(Number),kt()):X},nt.range=function(jt){return arguments.length?(se=jt,kt()):se},nt.rangeRound=function(jt){return nt.range(jt).interpolate(ju)},nt.clamp=function(jt){return arguments.length?(Ne=jt,kt()):Ne},nt.interpolate=function(jt){return arguments.length?(Te=jt,kt()):Te},nt.ticks=function(jt){return Na(X,jt)},nt.tickFormat=function(jt,gr){return d3_scale_linearTickFormat(X,jt,gr)},nt.nice=function(jt){return Ra(X,jt),kt()},nt.copy=function(){return Qn(X,se,Te,Ne)},kt()}function Ca(X,se){return e.rebind(X,se,"range","rangeRound","interpolate","clamp")}function Ra(X,se){return Yi(X,Qi(La(X,se)[2])),Yi(X,Qi(La(X,se)[2])),X}function La(X,se){se==null&&(se=10);var Te=dn(X),Ne=Te[1]-Te[0],He=Math.pow(10,Math.floor(Math.log(Ne/se)/Math.LN10)),Ye=se/Ne*He;return Ye<=.15?He*=10:Ye<=.35?He*=5:Ye<=.75&&(He*=2),Te[0]=Math.ceil(Te[0]/He)*He,Te[1]=Math.floor(Te[1]/He)*He+He*.5,Te[2]=He,Te}function Na(X,se){return e.range.apply(e,La(X,se))}var Yn={s:1,g:1,p:1,r:1,e:1};function Dn(X){return-Math.floor(Math.log(X)/Math.LN10+.01)}function Ka(X,se){var Te=Dn(se[2]);return X in Yn?Math.abs(Te-Dn(Math.max(p(se[0]),p(se[1]))))+ +(X!=="e"):Te-(X==="%")*2}e.scale.log=function(){return bo(e.scale.linear().domain([0,1]),10,!0,[1,10])};function bo(X,se,Te,Ne){function He(nt){return(Te?Math.log(nt<0?0:nt):-Math.log(nt>0?0:-nt))/Math.log(se)}function Ye(nt){return Te?Math.pow(se,nt):-Math.pow(se,-nt)}function kt(nt){return X(He(nt))}return kt.invert=function(nt){return Ye(X.invert(nt))},kt.domain=function(nt){return arguments.length?(Te=nt[0]>=0,X.domain((Ne=nt.map(Number)).map(He)),kt):Ne},kt.base=function(nt){return arguments.length?(se=+nt,X.domain(Ne.map(He)),kt):se},kt.nice=function(){var nt=Yi(Ne.map(He),Te?Math:Zo);return X.domain(nt),Ne=nt.map(Ye),kt},kt.ticks=function(){var nt=dn(Ne),jt=[],gr=nt[0],yr=nt[1],Hr=Math.floor(He(gr)),qr=Math.ceil(He(yr)),_i=se%1?2:se;if(isFinite(qr-Hr)){if(Te){for(;Hr0;bi--)jt.push(Ye(Hr)*bi);for(Hr=0;jt[Hr]yr;qr--);jt=jt.slice(Hr,qr)}return jt},kt.copy=function(){return bo(X.copy(),se,Te,Ne)},Ca(kt,X)}var Zo={floor:function(X){return-Math.ceil(-X)},ceil:function(X){return-Math.floor(-X)}};e.scale.pow=function(){return Ss(e.scale.linear(),1,[0,1])};function Ss(X,se,Te){var Ne=as(se),He=as(1/se);function Ye(kt){return X(Ne(kt))}return Ye.invert=function(kt){return He(X.invert(kt))},Ye.domain=function(kt){return arguments.length?(X.domain((Te=kt.map(Number)).map(Ne)),Ye):Te},Ye.ticks=function(kt){return Na(Te,kt)},Ye.tickFormat=function(kt,nt){return d3_scale_linearTickFormat(Te,kt,nt)},Ye.nice=function(kt){return Ye.domain(Ra(Te,kt))},Ye.exponent=function(kt){return arguments.length?(Ne=as(se=kt),He=as(1/se),X.domain(Te.map(Ne)),Ye):se},Ye.copy=function(){return Ss(X.copy(),se,Te)},Ca(Ye,X)}function as(X){return function(se){return se<0?-Math.pow(-se,X):Math.pow(se,X)}}e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return ws([],{t:"range",a:[[]]})};function ws(X,se){var Te,Ne,He;function Ye(nt){return Ne[((Te.get(nt)||(se.t==="range"?Te.set(nt,X.push(nt)):NaN))-1)%Ne.length]}function kt(nt,jt){return e.range(X.length).map(function(gr){return nt+jt*gr})}return Ye.domain=function(nt){if(!arguments.length)return X;X=[],Te=new T;for(var jt=-1,gr=nt.length,yr;++jt0?Te[Ye-1]:X[0],Yeqr?0:1;if(yr=Ie)return jt(yr,bi)+(gr?jt(gr,1-bi):"")+"Z";var Zr,ai,gi,Ii,Si=0,ei=0,Ln,En,Un,ia,Ea,Ia,yo,Da,go=[];if((Ii=(+kt.apply(this,arguments)||0)/2)&&(gi=Ne===Cu?Math.sqrt(gr*gr+yr*yr):+Ne.apply(this,arguments),bi||(ei*=-1),yr&&(ei=ii(gi/yr*Math.sin(Ii))),gr&&(Si=ii(gi/gr*Math.sin(Ii)))),yr){Ln=yr*Math.cos(Hr+ei),En=yr*Math.sin(Hr+ei),Un=yr*Math.cos(qr-ei),ia=yr*Math.sin(qr-ei);var Is=Math.abs(qr-Hr-2*ei)<=tt?0:1;if(ei&&Ac(Ln,En,Un,ia)===bi^Is){var Ms=(Hr+qr)/2;Ln=yr*Math.cos(Ms),En=yr*Math.sin(Ms),Un=ia=null}}else Ln=En=0;if(gr){Ea=gr*Math.cos(qr-Si),Ia=gr*Math.sin(qr-Si),yo=gr*Math.cos(Hr+Si),Da=gr*Math.sin(Hr+Si);var Xs=Math.abs(Hr-qr+2*Si)<=tt?0:1;if(Si&&Ac(Ea,Ia,yo,Da)===1-bi^Xs){var Gn=(Hr+qr)/2;Ea=gr*Math.cos(Gn),Ia=gr*Math.sin(Gn),yo=Da=null}}else Ea=Ia=0;if(_i>Je&&(Zr=Math.min(Math.abs(yr-gr)/2,+Te.apply(this,arguments)))>.001){ai=gr0?0:1}function Ua(X,se,Te,Ne,He){var Ye=X[0]-se[0],kt=X[1]-se[1],nt=(He?Ne:-Ne)/Math.sqrt(Ye*Ye+kt*kt),jt=nt*kt,gr=-nt*Ye,yr=X[0]+jt,Hr=X[1]+gr,qr=se[0]+jt,_i=se[1]+gr,bi=(yr+qr)/2,Zr=(Hr+_i)/2,ai=qr-yr,gi=_i-Hr,Ii=ai*ai+gi*gi,Si=Te-Ne,ei=yr*_i-qr*Hr,Ln=(gi<0?-1:1)*Math.sqrt(Math.max(0,Si*Si*Ii-ei*ei)),En=(ei*gi-ai*Ln)/Ii,Un=(-ei*ai-gi*Ln)/Ii,ia=(ei*gi+ai*Ln)/Ii,Ea=(-ei*ai+gi*Ln)/Ii,Ia=En-bi,yo=Un-Zr,Da=ia-bi,go=Ea-Zr;return Ia*Ia+yo*yo>Da*Da+go*go&&(En=ia,Un=Ea),[[En-jt,Un-gr],[En*Te/Si,Un*Te/Si]]}function oo(){return!0}function Vc(X){var se=Ds,Te=Fs,Ne=oo,He=Ku,Ye=He.key,kt=.7;function nt(jt){var gr=[],yr=[],Hr=-1,qr=jt.length,_i,bi=vi(se),Zr=vi(Te);function ai(){gr.push("M",He(X(yr),kt))}for(;++Hr1?X.join("L"):X+"Z"}function ue(X){return X.join("L")+"Z"}function w(X){for(var se=0,Te=X.length,Ne=X[0],He=[Ne[0],",",Ne[1]];++se1&&He.push("H",Ne[0]),He.join("")}function B(X){for(var se=0,Te=X.length,Ne=X[0],He=[Ne[0],",",Ne[1]];++se1){nt=se[1],Ye=X[jt],jt++,Ne+="C"+(He[0]+kt[0])+","+(He[1]+kt[1])+","+(Ye[0]-nt[0])+","+(Ye[1]-nt[1])+","+Ye[0]+","+Ye[1];for(var gr=2;gr9&&(Ye=Te*3/Math.sqrt(Ye),kt[nt]=Ye*Ne,kt[nt+1]=Ye*He));for(nt=-1;++nt<=jt;)Ye=(X[Math.min(jt,nt+1)][0]-X[Math.max(0,nt-1)][0])/(6*(1+kt[nt]*kt[nt])),se.push([Ye||0,kt[nt]*Ye||0]);return se}function Ft(X){return X.length<3?Ku(X):X[0]+Ze(X,it(X))}e.svg.line.radial=function(){var X=Vc(Ht);return X.radius=X.x,delete X.x,X.angle=X.y,delete X.y,X};function Ht(X){for(var se,Te=-1,Ne=X.length,He,Ye;++Tett)+",1 "+Hr}function gr(yr,Hr,qr,_i){return"Q 0,0 "+_i}return Ye.radius=function(yr){return arguments.length?(Te=vi(yr),Ye):Te},Ye.source=function(yr){return arguments.length?(X=vi(yr),Ye):X},Ye.target=function(yr){return arguments.length?(se=vi(yr),Ye):se},Ye.startAngle=function(yr){return arguments.length?(Ne=vi(yr),Ye):Ne},Ye.endAngle=function(yr){return arguments.length?(He=vi(yr),Ye):He},Ye};function Or(X){return X.radius}e.svg.diagonal=function(){var X=dr,se=Sr,Te=Wr;function Ne(He,Ye){var kt=X.call(this,He,Ye),nt=se.call(this,He,Ye),jt=(kt.y+nt.y)/2,gr=[kt,{x:kt.x,y:jt},{x:nt.x,y:jt},nt];return gr=gr.map(Te),"M"+gr[0]+"C"+gr[1]+" "+gr[2]+" "+gr[3]}return Ne.source=function(He){return arguments.length?(X=vi(He),Ne):X},Ne.target=function(He){return arguments.length?(se=vi(He),Ne):se},Ne.projection=function(He){return arguments.length?(Te=He,Ne):Te},Ne};function Wr(X){return[X.x,X.y]}e.svg.diagonal.radial=function(){var X=e.svg.diagonal(),se=Wr,Te=X.projection;return X.projection=function(Ne){return arguments.length?Te(ni(se=Ne)):se},X};function ni(X){return function(){var se=X.apply(this,arguments),Te=se[0],Ne=se[1]-xe;return[Te*Math.cos(Ne),Te*Math.sin(Ne)]}}e.svg.symbol=function(){var X=cn,se=Pi;function Te(Ne,He){return(Cn.get(X.call(this,Ne,He))||ln)(se.call(this,Ne,He))}return Te.type=function(Ne){return arguments.length?(X=vi(Ne),Te):X},Te.size=function(Ne){return arguments.length?(se=vi(Ne),Te):se},Te};function Pi(){return 64}function cn(){return"circle"}function ln(X){var se=Math.sqrt(X/tt);return"M0,"+se+"A"+se+","+se+" 0 1,1 0,"+-se+"A"+se+","+se+" 0 1,1 0,"+se+"Z"}var Cn=e.map({circle:ln,cross:function(X){var se=Math.sqrt(X/5)/2;return"M"+-3*se+","+-se+"H"+-se+"V"+-3*se+"H"+se+"V"+-se+"H"+3*se+"V"+se+"H"+se+"V"+3*se+"H"+-se+"V"+se+"H"+-3*se+"Z"},diamond:function(X){var se=Math.sqrt(X/(2*Aa)),Te=se*Aa;return"M0,"+-se+"L"+Te+",0 0,"+se+" "+-Te+",0Z"},square:function(X){var se=Math.sqrt(X)/2;return"M"+-se+","+-se+"L"+se+","+-se+" "+se+","+se+" "+-se+","+se+"Z"},"triangle-down":function(X){var se=Math.sqrt(X/Kn),Te=se*Kn/2;return"M0,"+Te+"L"+se+","+-Te+" "+-se+","+-Te+"Z"},"triangle-up":function(X){var se=Math.sqrt(X/Kn),Te=se*Kn/2;return"M0,"+-Te+"L"+se+","+Te+" "+-se+","+Te+"Z"}});e.svg.symbolTypes=Cn.keys();var Kn=Math.sqrt(3),Aa=Math.tan(30*ke);Pe.transition=function(X){for(var se=Bo||++mo,Te=To(X),Ne=[],He,Ye,kt=Ps||{time:Date.now(),ease:bl,delay:0,duration:250},nt=-1,jt=this.length;++nt0;)Hr[--Ii].call(X,gi);if(ai>=1)return kt.event&&kt.event.end.call(X,X.__data__,se),--Ye.count?delete Ye[Ne]:delete X[Te],1}kt||(nt=He.time,jt=No(qr,0,nt),kt=Ye[Ne]={tween:new T,time:nt,timer:jt,delay:He.delay,duration:He.duration,ease:He.ease,index:se},He=null,++Ye.count)}e.svg.axis=function(){var X=e.scale.linear(),se=Ul,Te=6,Ne=6,He=3,Ye=[10],kt=null,nt;function jt(gr){gr.each(function(){var yr=e.select(this),Hr=this.__chart__||X,qr=this.__chart__=X.copy(),_i=kt==null?qr.ticks?qr.ticks.apply(qr,Ye):qr.domain():kt,bi=nt==null?qr.tickFormat?qr.tickFormat.apply(qr,Ye):G:nt,Zr=yr.selectAll(".tick").data(_i,qr),ai=Zr.enter().insert("g",".domain").attr("class","tick").style("opacity",Je),gi=e.transition(Zr.exit()).style("opacity",Je).remove(),Ii=e.transition(Zr.order()).style("opacity",1),Si=Math.max(Te,0)+He,ei,Ln=wn(qr),En=yr.selectAll(".domain").data([0]),Un=(En.enter().append("path").attr("class","domain"),e.transition(En));ai.append("line"),ai.append("text");var ia=ai.select("line"),Ea=Ii.select("line"),Ia=Zr.select("text").text(bi),yo=ai.select("text"),Da=Ii.select("text"),go=se==="top"||se==="left"?-1:1,Is,Ms,Xs,Gn;if(se==="bottom"||se==="top"?(ei=au,Is="x",Xs="y",Ms="x2",Gn="y2",Ia.attr("dy",go<0?"0em":".71em").style("text-anchor","middle"),Un.attr("d","M"+Ln[0]+","+go*Ne+"V0H"+Ln[1]+"V"+go*Ne)):(ei=Js,Is="y",Xs="x",Ms="y2",Gn="x2",Ia.attr("dy",".32em").style("text-anchor",go<0?"end":"start"),Un.attr("d","M"+go*Ne+","+Ln[0]+"H0V"+Ln[1]+"H"+go*Ne)),ia.attr(Gn,go*Te),yo.attr(Xs,go*Si),Ea.attr(Ms,0).attr(Gn,go*Te),Da.attr(Is,0).attr(Xs,go*Si),qr.rangeBand){var ja=qr,Fo=ja.rangeBand()/2;Hr=qr=function(Uo){return ja(Uo)+Fo}}else Hr.rangeBand?Hr=qr:gi.call(ei,qr,Hr);ai.call(ei,Hr,qr),Ii.call(ei,qr,qr)})}return jt.scale=function(gr){return arguments.length?(X=gr,jt):X},jt.orient=function(gr){return arguments.length?(se=gr in Lu?gr+"":Ul,jt):se},jt.ticks=function(){return arguments.length?(Ye=r(arguments),jt):Ye},jt.tickValues=function(gr){return arguments.length?(kt=gr,jt):kt},jt.tickFormat=function(gr){return arguments.length?(nt=gr,jt):nt},jt.tickSize=function(gr){var yr=arguments.length;return yr?(Te=+gr,Ne=+arguments[yr-1],jt):Te},jt.innerTickSize=function(gr){return arguments.length?(Te=+gr,jt):Te},jt.outerTickSize=function(gr){return arguments.length?(Ne=+gr,jt):Ne},jt.tickPadding=function(gr){return arguments.length?(He=+gr,jt):He},jt.tickSubdivide=function(){return arguments.length&&jt},jt};var Ul="bottom",Lu={top:1,right:1,bottom:1,left:1};function au(X,se,Te){X.attr("transform",function(Ne){var He=se(Ne);return"translate("+(isFinite(He)?He:Te(Ne))+",0)"})}function Js(X,se,Te){X.attr("transform",function(Ne){var He=se(Ne);return"translate(0,"+(isFinite(He)?He:Te(Ne))+")"})}e.svg.brush=function(){var X=Le(yr,"brushstart","brush","brushend"),se=null,Te=null,Ne=[0,0],He=[0,0],Ye,kt,nt=!0,jt=!0,gr=dc[0];function yr(Zr){Zr.each(function(){var ai=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",bi).on("touchstart.brush",bi),gi=ai.selectAll(".background").data([0]);gi.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),ai.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Ii=ai.selectAll(".resize").data(gr,G);Ii.exit().remove(),Ii.enter().append("g").attr("class",function(En){return"resize "+En}).style("cursor",function(En){return eu[En]}).append("rect").attr("x",function(En){return/[ew]$/.test(En)?-3:null}).attr("y",function(En){return/^[ns]/.test(En)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Ii.style("display",yr.empty()?"none":null);var Si=e.transition(ai),ei=e.transition(gi),Ln;se&&(Ln=wn(se),ei.attr("x",Ln[0]).attr("width",Ln[1]-Ln[0]),qr(Si)),Te&&(Ln=wn(Te),ei.attr("y",Ln[0]).attr("height",Ln[1]-Ln[0]),_i(Si)),Hr(Si)})}yr.event=function(Zr){Zr.each(function(){var ai=X.of(this,arguments),gi={x:Ne,y:He,i:Ye,j:kt},Ii=this.__chart__||gi;this.__chart__=gi,Bo?e.select(this).transition().each("start.brush",function(){Ye=Ii.i,kt=Ii.j,Ne=Ii.x,He=Ii.y,ai({type:"brushstart"})}).tween("brush:brush",function(){var Si=Gu(Ne,gi.x),ei=Gu(He,gi.y);return Ye=kt=null,function(Ln){Ne=gi.x=Si(Ln),He=gi.y=ei(Ln),ai({type:"brush",mode:"resize"})}}).each("end.brush",function(){Ye=gi.i,kt=gi.j,ai({type:"brush",mode:"resize"}),ai({type:"brushend"})}):(ai({type:"brushstart"}),ai({type:"brush",mode:"resize"}),ai({type:"brushend"}))})};function Hr(Zr){Zr.selectAll(".resize").attr("transform",function(ai){return"translate("+Ne[+/e$/.test(ai)]+","+He[+/^s/.test(ai)]+")"})}function qr(Zr){Zr.select(".extent").attr("x",Ne[0]),Zr.selectAll(".extent,.n>rect,.s>rect").attr("width",Ne[1]-Ne[0])}function _i(Zr){Zr.select(".extent").attr("y",He[0]),Zr.selectAll(".extent,.e>rect,.w>rect").attr("height",He[1]-He[0])}function bi(){var Zr=this,ai=e.select(e.event.target),gi=X.of(Zr,arguments),Ii=e.select(Zr),Si=ai.datum(),ei=!/^(n|s)$/.test(Si)&&se,Ln=!/^(e|w)$/.test(Si)&&Te,En=ai.classed("extent"),Un=Br(Zr),ia,Ea=e.mouse(Zr),Ia,yo=e.select(a(Zr)).on("keydown.brush",Is).on("keyup.brush",Ms);if(e.event.changedTouches?yo.on("touchmove.brush",Xs).on("touchend.brush",ja):yo.on("mousemove.brush",Xs).on("mouseup.brush",ja),Ii.interrupt().selectAll("*").interrupt(),En)Ea[0]=Ne[0]-Ea[0],Ea[1]=He[0]-Ea[1];else if(Si){var Da=+/w$/.test(Si),go=+/^n/.test(Si);Ia=[Ne[1-Da]-Ea[0],He[1-go]-Ea[1]],Ea[0]=Ne[Da],Ea[1]=He[go]}else e.event.altKey&&(ia=Ea.slice());Ii.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",ai.style("cursor")),gi({type:"brushstart"}),Xs();function Is(){e.event.keyCode==32&&(En||(ia=null,Ea[0]-=Ne[1],Ea[1]-=He[1],En=2),_e())}function Ms(){e.event.keyCode==32&&En==2&&(Ea[0]+=Ne[1],Ea[1]+=He[1],En=0,_e())}function Xs(){var Fo=e.mouse(Zr),Uo=!1;Ia&&(Fo[0]+=Ia[0],Fo[1]+=Ia[1]),En||(e.event.altKey?(ia||(ia=[(Ne[0]+Ne[1])/2,(He[0]+He[1])/2]),Ea[0]=Ne[+(Fo[0]{(function(e,t){typeof _6=="object"&&typeof wee!="undefined"?t(_6):(e=e||self,t(e.d3=e.d3||{}))})(_6,function(e){"use strict";var t=new Date,r=new Date;function n($e,St,Qt,Gt){function _t(It){return $e(It=arguments.length===0?new Date:new Date(+It)),It}return _t.floor=function(It){return $e(It=new Date(+It)),It},_t.ceil=function(It){return $e(It=new Date(It-1)),St(It,1),$e(It),It},_t.round=function(It){var mt=_t(It),er=_t.ceil(It);return It-mt0))return lr;do lr.push(wr=new Date(+It)),St(It,er),$e(It);while(wr=mt)for(;$e(mt),!It(mt);)mt.setTime(mt-1)},function(mt,er){if(mt>=mt)if(er<0)for(;++er<=0;)for(;St(mt,-1),!It(mt););else for(;--er>=0;)for(;St(mt,1),!It(mt););})},Qt&&(_t.count=function(It,mt){return t.setTime(+It),r.setTime(+mt),$e(t),$e(r),Math.floor(Qt(t,r))},_t.every=function(It){return It=Math.floor(It),!isFinite(It)||!(It>0)?null:It>1?_t.filter(Gt?function(mt){return Gt(mt)%It===0}:function(mt){return _t.count(0,mt)%It===0}):_t}),_t}var i=n(function(){},function($e,St){$e.setTime(+$e+St)},function($e,St){return St-$e});i.every=function($e){return $e=Math.floor($e),!isFinite($e)||!($e>0)?null:$e>1?n(function(St){St.setTime(Math.floor(St/$e)*$e)},function(St,Qt){St.setTime(+St+Qt*$e)},function(St,Qt){return(Qt-St)/$e}):i};var a=i.range,o=1e3,s=6e4,l=36e5,u=864e5,c=6048e5,f=n(function($e){$e.setTime($e-$e.getMilliseconds())},function($e,St){$e.setTime(+$e+St*o)},function($e,St){return(St-$e)/o},function($e){return $e.getUTCSeconds()}),h=f.range,d=n(function($e){$e.setTime($e-$e.getMilliseconds()-$e.getSeconds()*o)},function($e,St){$e.setTime(+$e+St*s)},function($e,St){return(St-$e)/s},function($e){return $e.getMinutes()}),v=d.range,_=n(function($e){$e.setTime($e-$e.getMilliseconds()-$e.getSeconds()*o-$e.getMinutes()*s)},function($e,St){$e.setTime(+$e+St*l)},function($e,St){return(St-$e)/l},function($e){return $e.getHours()}),b=_.range,p=n(function($e){$e.setHours(0,0,0,0)},function($e,St){$e.setDate($e.getDate()+St)},function($e,St){return(St-$e-(St.getTimezoneOffset()-$e.getTimezoneOffset())*s)/u},function($e){return $e.getDate()-1}),k=p.range;function E($e){return n(function(St){St.setDate(St.getDate()-(St.getDay()+7-$e)%7),St.setHours(0,0,0,0)},function(St,Qt){St.setDate(St.getDate()+Qt*7)},function(St,Qt){return(Qt-St-(Qt.getTimezoneOffset()-St.getTimezoneOffset())*s)/c})}var T=E(0),L=E(1),x=E(2),C=E(3),M=E(4),g=E(5),P=E(6),A=T.range,z=L.range,O=x.range,U=C.range,G=M.range,Z=g.range,j=P.range,N=n(function($e){$e.setDate(1),$e.setHours(0,0,0,0)},function($e,St){$e.setMonth($e.getMonth()+St)},function($e,St){return St.getMonth()-$e.getMonth()+(St.getFullYear()-$e.getFullYear())*12},function($e){return $e.getMonth()}),H=N.range,re=n(function($e){$e.setMonth(0,1),$e.setHours(0,0,0,0)},function($e,St){$e.setFullYear($e.getFullYear()+St)},function($e,St){return St.getFullYear()-$e.getFullYear()},function($e){return $e.getFullYear()});re.every=function($e){return!isFinite($e=Math.floor($e))||!($e>0)?null:n(function(St){St.setFullYear(Math.floor(St.getFullYear()/$e)*$e),St.setMonth(0,1),St.setHours(0,0,0,0)},function(St,Qt){St.setFullYear(St.getFullYear()+Qt*$e)})};var oe=re.range,_e=n(function($e){$e.setUTCSeconds(0,0)},function($e,St){$e.setTime(+$e+St*s)},function($e,St){return(St-$e)/s},function($e){return $e.getUTCMinutes()}),Ce=_e.range,Le=n(function($e){$e.setUTCMinutes(0,0,0)},function($e,St){$e.setTime(+$e+St*l)},function($e,St){return(St-$e)/l},function($e){return $e.getUTCHours()}),ge=Le.range,ie=n(function($e){$e.setUTCHours(0,0,0,0)},function($e,St){$e.setUTCDate($e.getUTCDate()+St)},function($e,St){return(St-$e)/u},function($e){return $e.getUTCDate()-1}),Se=ie.range;function Ee($e){return n(function(St){St.setUTCDate(St.getUTCDate()-(St.getUTCDay()+7-$e)%7),St.setUTCHours(0,0,0,0)},function(St,Qt){St.setUTCDate(St.getUTCDate()+Qt*7)},function(St,Qt){return(Qt-St)/c})}var Ae=Ee(0),Be=Ee(1),Pe=Ee(2),me=Ee(3),De=Ee(4),ce=Ee(5),je=Ee(6),lt=Ae.range,pt=Be.range,Vt=Pe.range,ot=me.range,ut=De.range,Wt=ce.range,Nt=je.range,$t=n(function($e){$e.setUTCDate(1),$e.setUTCHours(0,0,0,0)},function($e,St){$e.setUTCMonth($e.getUTCMonth()+St)},function($e,St){return St.getUTCMonth()-$e.getUTCMonth()+(St.getUTCFullYear()-$e.getUTCFullYear())*12},function($e){return $e.getUTCMonth()}),sr=$t.range,Tr=n(function($e){$e.setUTCMonth(0,1),$e.setUTCHours(0,0,0,0)},function($e,St){$e.setUTCFullYear($e.getUTCFullYear()+St)},function($e,St){return St.getUTCFullYear()-$e.getUTCFullYear()},function($e){return $e.getUTCFullYear()});Tr.every=function($e){return!isFinite($e=Math.floor($e))||!($e>0)?null:n(function(St){St.setUTCFullYear(Math.floor(St.getUTCFullYear()/$e)*$e),St.setUTCMonth(0,1),St.setUTCHours(0,0,0,0)},function(St,Qt){St.setUTCFullYear(St.getUTCFullYear()+Qt*$e)})};var fr=Tr.range;e.timeDay=p,e.timeDays=k,e.timeFriday=g,e.timeFridays=Z,e.timeHour=_,e.timeHours=b,e.timeInterval=n,e.timeMillisecond=i,e.timeMilliseconds=a,e.timeMinute=d,e.timeMinutes=v,e.timeMonday=L,e.timeMondays=z,e.timeMonth=N,e.timeMonths=H,e.timeSaturday=P,e.timeSaturdays=j,e.timeSecond=f,e.timeSeconds=h,e.timeSunday=T,e.timeSundays=A,e.timeThursday=M,e.timeThursdays=G,e.timeTuesday=x,e.timeTuesdays=O,e.timeWednesday=C,e.timeWednesdays=U,e.timeWeek=T,e.timeWeeks=A,e.timeYear=re,e.timeYears=oe,e.utcDay=ie,e.utcDays=Se,e.utcFriday=ce,e.utcFridays=Wt,e.utcHour=Le,e.utcHours=ge,e.utcMillisecond=i,e.utcMilliseconds=a,e.utcMinute=_e,e.utcMinutes=Ce,e.utcMonday=Be,e.utcMondays=pt,e.utcMonth=$t,e.utcMonths=sr,e.utcSaturday=je,e.utcSaturdays=Nt,e.utcSecond=f,e.utcSeconds=h,e.utcSunday=Ae,e.utcSundays=lt,e.utcThursday=De,e.utcThursdays=ut,e.utcTuesday=Pe,e.utcTuesdays=Vt,e.utcWednesday=me,e.utcWednesdays=ot,e.utcWeek=Ae,e.utcWeeks=lt,e.utcYear=Tr,e.utcYears=fr,Object.defineProperty(e,"__esModule",{value:!0})})});var f3=ye((x6,Tee)=>{(function(e,t){typeof x6=="object"&&typeof Tee!="undefined"?t(x6,SO()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(x6,function(e,t){"use strict";function r(Ge){if(0<=Ge.y&&Ge.y<100){var Je=new Date(-1,Ge.m,Ge.d,Ge.H,Ge.M,Ge.S,Ge.L);return Je.setFullYear(Ge.y),Je}return new Date(Ge.y,Ge.m,Ge.d,Ge.H,Ge.M,Ge.S,Ge.L)}function n(Ge){if(0<=Ge.y&&Ge.y<100){var Je=new Date(Date.UTC(-1,Ge.m,Ge.d,Ge.H,Ge.M,Ge.S,Ge.L));return Je.setUTCFullYear(Ge.y),Je}return new Date(Date.UTC(Ge.y,Ge.m,Ge.d,Ge.H,Ge.M,Ge.S,Ge.L))}function i(Ge,Je,We){return{y:Ge,m:Je,d:We,H:0,M:0,S:0,L:0}}function a(Ge){var Je=Ge.dateTime,We=Ge.date,tt=Ge.time,xt=Ge.periods,Ie=Ge.days,xe=Ge.shortDays,ke=Ge.months,vt=Ge.shortMonths,ir=h(xt),ar=d(xt),vr=h(Ie),ii=d(Ie),pi=h(xe),$r=d(xe),di=h(ke),ji=d(ke),In=h(vt),wi=d(vt),On={a:$i,A:tn,b:fn,B:yn,c:null,d:N,e:N,f:Ce,H,I:re,j:oe,L:_e,m:Le,M:ge,p:Sn,q:Ba,Q:mt,s:er,S:ie,u:Se,U:Ee,V:Ae,w:Be,W:Pe,x:null,X:null,y:me,Y:De,Z:ce,"%":It},qn={a:ua,A:ma,b:Wa,B:Fa,c:null,d:je,e:je,f:ut,H:lt,I:pt,j:Vt,L:ot,m:Wt,M:Nt,p:Xo,q:da,Q:mt,s:er,S:$t,u:sr,U:Tr,V:fr,w:$e,W:St,x:null,X:null,y:Qt,Y:Gt,Z:_t,"%":It},Fn={a:rr,A:nr,b:Er,B:Xr,c:ri,d:M,e:M,f:U,H:P,I:P,j:g,L:O,m:C,M:A,p:wt,q:x,Q:Z,s:j,S:z,u:_,U:b,V:p,w:v,W:k,x:Qr,X:Oi,y:T,Y:E,Z:L,"%":G};On.x=ra(We,On),On.X=ra(tt,On),On.c=ra(Je,On),qn.x=ra(We,qn),qn.X=ra(tt,qn),qn.c=ra(Je,qn);function ra(Wn,Ha){return function(vo){var jn=[],Mt=-1,kr=0,Jr=Wn.length,vi,hn,An;for(vo instanceof Date||(vo=new Date(+vo));++Mt53)return null;"w"in jn||(jn.w=1),"Z"in jn?(kr=n(i(jn.y,0,1)),Jr=kr.getUTCDay(),kr=Jr>4||Jr===0?t.utcMonday.ceil(kr):t.utcMonday(kr),kr=t.utcDay.offset(kr,(jn.V-1)*7),jn.y=kr.getUTCFullYear(),jn.m=kr.getUTCMonth(),jn.d=kr.getUTCDate()+(jn.w+6)%7):(kr=r(i(jn.y,0,1)),Jr=kr.getDay(),kr=Jr>4||Jr===0?t.timeMonday.ceil(kr):t.timeMonday(kr),kr=t.timeDay.offset(kr,(jn.V-1)*7),jn.y=kr.getFullYear(),jn.m=kr.getMonth(),jn.d=kr.getDate()+(jn.w+6)%7)}else("W"in jn||"U"in jn)&&("w"in jn||(jn.w="u"in jn?jn.u%7:"W"in jn?1:0),Jr="Z"in jn?n(i(jn.y,0,1)).getUTCDay():r(i(jn.y,0,1)).getDay(),jn.m=0,jn.d="W"in jn?(jn.w+6)%7+jn.W*7-(Jr+5)%7:jn.w+jn.U*7-(Jr+6)%7);return"Z"in jn?(jn.H+=jn.Z/100|0,jn.M+=jn.Z%100,n(jn)):r(jn)}}function Ut(Wn,Ha,vo,jn){for(var Mt=0,kr=Ha.length,Jr=vo.length,vi,hn;Mt=Jr)return-1;if(vi=Ha.charCodeAt(Mt++),vi===37){if(vi=Ha.charAt(Mt++),hn=Fn[vi in o?Ha.charAt(Mt++):vi],!hn||(jn=hn(Wn,vo,jn))<0)return-1}else if(vi!=vo.charCodeAt(jn++))return-1}return jn}function wt(Wn,Ha,vo){var jn=ir.exec(Ha.slice(vo));return jn?(Wn.p=ar[jn[0].toLowerCase()],vo+jn[0].length):-1}function rr(Wn,Ha,vo){var jn=pi.exec(Ha.slice(vo));return jn?(Wn.w=$r[jn[0].toLowerCase()],vo+jn[0].length):-1}function nr(Wn,Ha,vo){var jn=vr.exec(Ha.slice(vo));return jn?(Wn.w=ii[jn[0].toLowerCase()],vo+jn[0].length):-1}function Er(Wn,Ha,vo){var jn=In.exec(Ha.slice(vo));return jn?(Wn.m=wi[jn[0].toLowerCase()],vo+jn[0].length):-1}function Xr(Wn,Ha,vo){var jn=di.exec(Ha.slice(vo));return jn?(Wn.m=ji[jn[0].toLowerCase()],vo+jn[0].length):-1}function ri(Wn,Ha,vo){return Ut(Wn,Je,Ha,vo)}function Qr(Wn,Ha,vo){return Ut(Wn,We,Ha,vo)}function Oi(Wn,Ha,vo){return Ut(Wn,tt,Ha,vo)}function $i(Wn){return xe[Wn.getDay()]}function tn(Wn){return Ie[Wn.getDay()]}function fn(Wn){return vt[Wn.getMonth()]}function yn(Wn){return ke[Wn.getMonth()]}function Sn(Wn){return xt[+(Wn.getHours()>=12)]}function Ba(Wn){return 1+~~(Wn.getMonth()/3)}function ua(Wn){return xe[Wn.getUTCDay()]}function ma(Wn){return Ie[Wn.getUTCDay()]}function Wa(Wn){return vt[Wn.getUTCMonth()]}function Fa(Wn){return ke[Wn.getUTCMonth()]}function Xo(Wn){return xt[+(Wn.getUTCHours()>=12)]}function da(Wn){return 1+~~(Wn.getUTCMonth()/3)}return{format:function(Wn){var Ha=ra(Wn+="",On);return Ha.toString=function(){return Wn},Ha},parse:function(Wn){var Ha=la(Wn+="",!1);return Ha.toString=function(){return Wn},Ha},utcFormat:function(Wn){var Ha=ra(Wn+="",qn);return Ha.toString=function(){return Wn},Ha},utcParse:function(Wn){var Ha=la(Wn+="",!0);return Ha.toString=function(){return Wn},Ha}}}var o={"-":"",_:" ",0:"0"},s=/^\s*\d+/,l=/^%/,u=/[\\^$*+?|[\]().{}]/g;function c(Ge,Je,We){var tt=Ge<0?"-":"",xt=(tt?-Ge:Ge)+"",Ie=xt.length;return tt+(Ie68?1900:2e3),We+tt[0].length):-1}function L(Ge,Je,We){var tt=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Je.slice(We,We+6));return tt?(Ge.Z=tt[1]?0:-(tt[2]+(tt[3]||"00")),We+tt[0].length):-1}function x(Ge,Je,We){var tt=s.exec(Je.slice(We,We+1));return tt?(Ge.q=tt[0]*3-3,We+tt[0].length):-1}function C(Ge,Je,We){var tt=s.exec(Je.slice(We,We+2));return tt?(Ge.m=tt[0]-1,We+tt[0].length):-1}function M(Ge,Je,We){var tt=s.exec(Je.slice(We,We+2));return tt?(Ge.d=+tt[0],We+tt[0].length):-1}function g(Ge,Je,We){var tt=s.exec(Je.slice(We,We+3));return tt?(Ge.m=0,Ge.d=+tt[0],We+tt[0].length):-1}function P(Ge,Je,We){var tt=s.exec(Je.slice(We,We+2));return tt?(Ge.H=+tt[0],We+tt[0].length):-1}function A(Ge,Je,We){var tt=s.exec(Je.slice(We,We+2));return tt?(Ge.M=+tt[0],We+tt[0].length):-1}function z(Ge,Je,We){var tt=s.exec(Je.slice(We,We+2));return tt?(Ge.S=+tt[0],We+tt[0].length):-1}function O(Ge,Je,We){var tt=s.exec(Je.slice(We,We+3));return tt?(Ge.L=+tt[0],We+tt[0].length):-1}function U(Ge,Je,We){var tt=s.exec(Je.slice(We,We+6));return tt?(Ge.L=Math.floor(tt[0]/1e3),We+tt[0].length):-1}function G(Ge,Je,We){var tt=l.exec(Je.slice(We,We+1));return tt?We+tt[0].length:-1}function Z(Ge,Je,We){var tt=s.exec(Je.slice(We));return tt?(Ge.Q=+tt[0],We+tt[0].length):-1}function j(Ge,Je,We){var tt=s.exec(Je.slice(We));return tt?(Ge.s=+tt[0],We+tt[0].length):-1}function N(Ge,Je){return c(Ge.getDate(),Je,2)}function H(Ge,Je){return c(Ge.getHours(),Je,2)}function re(Ge,Je){return c(Ge.getHours()%12||12,Je,2)}function oe(Ge,Je){return c(1+t.timeDay.count(t.timeYear(Ge),Ge),Je,3)}function _e(Ge,Je){return c(Ge.getMilliseconds(),Je,3)}function Ce(Ge,Je){return _e(Ge,Je)+"000"}function Le(Ge,Je){return c(Ge.getMonth()+1,Je,2)}function ge(Ge,Je){return c(Ge.getMinutes(),Je,2)}function ie(Ge,Je){return c(Ge.getSeconds(),Je,2)}function Se(Ge){var Je=Ge.getDay();return Je===0?7:Je}function Ee(Ge,Je){return c(t.timeSunday.count(t.timeYear(Ge)-1,Ge),Je,2)}function Ae(Ge,Je){var We=Ge.getDay();return Ge=We>=4||We===0?t.timeThursday(Ge):t.timeThursday.ceil(Ge),c(t.timeThursday.count(t.timeYear(Ge),Ge)+(t.timeYear(Ge).getDay()===4),Je,2)}function Be(Ge){return Ge.getDay()}function Pe(Ge,Je){return c(t.timeMonday.count(t.timeYear(Ge)-1,Ge),Je,2)}function me(Ge,Je){return c(Ge.getFullYear()%100,Je,2)}function De(Ge,Je){return c(Ge.getFullYear()%1e4,Je,4)}function ce(Ge){var Je=Ge.getTimezoneOffset();return(Je>0?"-":(Je*=-1,"+"))+c(Je/60|0,"0",2)+c(Je%60,"0",2)}function je(Ge,Je){return c(Ge.getUTCDate(),Je,2)}function lt(Ge,Je){return c(Ge.getUTCHours(),Je,2)}function pt(Ge,Je){return c(Ge.getUTCHours()%12||12,Je,2)}function Vt(Ge,Je){return c(1+t.utcDay.count(t.utcYear(Ge),Ge),Je,3)}function ot(Ge,Je){return c(Ge.getUTCMilliseconds(),Je,3)}function ut(Ge,Je){return ot(Ge,Je)+"000"}function Wt(Ge,Je){return c(Ge.getUTCMonth()+1,Je,2)}function Nt(Ge,Je){return c(Ge.getUTCMinutes(),Je,2)}function $t(Ge,Je){return c(Ge.getUTCSeconds(),Je,2)}function sr(Ge){var Je=Ge.getUTCDay();return Je===0?7:Je}function Tr(Ge,Je){return c(t.utcSunday.count(t.utcYear(Ge)-1,Ge),Je,2)}function fr(Ge,Je){var We=Ge.getUTCDay();return Ge=We>=4||We===0?t.utcThursday(Ge):t.utcThursday.ceil(Ge),c(t.utcThursday.count(t.utcYear(Ge),Ge)+(t.utcYear(Ge).getUTCDay()===4),Je,2)}function $e(Ge){return Ge.getUTCDay()}function St(Ge,Je){return c(t.utcMonday.count(t.utcYear(Ge)-1,Ge),Je,2)}function Qt(Ge,Je){return c(Ge.getUTCFullYear()%100,Je,2)}function Gt(Ge,Je){return c(Ge.getUTCFullYear()%1e4,Je,4)}function _t(){return"+0000"}function It(){return"%"}function mt(Ge){return+Ge}function er(Ge){return Math.floor(+Ge/1e3)}var lr;wr({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function wr(Ge){return lr=a(Ge),e.timeFormat=lr.format,e.timeParse=lr.parse,e.utcFormat=lr.utcFormat,e.utcParse=lr.utcParse,lr}var Lr="%Y-%m-%dT%H:%M:%S.%LZ";function ti(Ge){return Ge.toISOString()}var Br=Date.prototype.toISOString?ti:e.utcFormat(Lr);function Vr(Ge){var Je=new Date(Ge);return isNaN(Je)?null:Je}var dt=+new Date("2000-01-01T00:00:00.000Z")?Vr:e.utcParse(Lr);e.isoFormat=Br,e.isoParse=dt,e.timeFormatDefaultLocale=wr,e.timeFormatLocale=a,Object.defineProperty(e,"__esModule",{value:!0})})});var MO=ye((b6,Aee)=>{(function(e,t){typeof b6=="object"&&typeof Aee!="undefined"?t(b6):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e.d3=e.d3||{}))})(b6,function(e){"use strict";function t(C){return Math.abs(C=Math.round(C))>=1e21?C.toLocaleString("en").replace(/,/g,""):C.toString(10)}function r(C,M){if((g=(C=M?C.toExponential(M-1):C.toExponential()).indexOf("e"))<0)return null;var g,P=C.slice(0,g);return[P.length>1?P[0]+P.slice(2):P,+C.slice(g+1)]}function n(C){return C=r(Math.abs(C)),C?C[1]:NaN}function i(C,M){return function(g,P){for(var A=g.length,z=[],O=0,U=C[0],G=0;A>0&&U>0&&(G+U+1>P&&(U=Math.max(1,P-G)),z.push(g.substring(A-=U,A+U)),!((G+=U+1)>P));)U=C[O=(O+1)%C.length];return z.reverse().join(M)}}function a(C){return function(M){return M.replace(/[0-9]/g,function(g){return C[+g]})}}var o=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function s(C){if(!(M=o.exec(C)))throw new Error("invalid format: "+C);var M;return new l({fill:M[1],align:M[2],sign:M[3],symbol:M[4],zero:M[5],width:M[6],comma:M[7],precision:M[8]&&M[8].slice(1),trim:M[9],type:M[10]})}s.prototype=l.prototype;function l(C){this.fill=C.fill===void 0?" ":C.fill+"",this.align=C.align===void 0?">":C.align+"",this.sign=C.sign===void 0?"-":C.sign+"",this.symbol=C.symbol===void 0?"":C.symbol+"",this.zero=!!C.zero,this.width=C.width===void 0?void 0:+C.width,this.comma=!!C.comma,this.precision=C.precision===void 0?void 0:+C.precision,this.trim=!!C.trim,this.type=C.type===void 0?"":C.type+""}l.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function u(C){e:for(var M=C.length,g=1,P=-1,A;g0&&(P=0);break}return P>0?C.slice(0,P)+C.slice(A+1):C}var c;function f(C,M){var g=r(C,M);if(!g)return C+"";var P=g[0],A=g[1],z=A-(c=Math.max(-8,Math.min(8,Math.floor(A/3)))*3)+1,O=P.length;return z===O?P:z>O?P+new Array(z-O+1).join("0"):z>0?P.slice(0,z)+"."+P.slice(z):"0."+new Array(1-z).join("0")+r(C,Math.max(0,M+z-1))[0]}function h(C,M){var g=r(C,M);if(!g)return C+"";var P=g[0],A=g[1];return A<0?"0."+new Array(-A).join("0")+P:P.length>A+1?P.slice(0,A+1)+"."+P.slice(A+1):P+new Array(A-P.length+2).join("0")}var d={"%":function(C,M){return(C*100).toFixed(M)},b:function(C){return Math.round(C).toString(2)},c:function(C){return C+""},d:t,e:function(C,M){return C.toExponential(M)},f:function(C,M){return C.toFixed(M)},g:function(C,M){return C.toPrecision(M)},o:function(C){return Math.round(C).toString(8)},p:function(C,M){return h(C*100,M)},r:h,s:f,X:function(C){return Math.round(C).toString(16).toUpperCase()},x:function(C){return Math.round(C).toString(16)}};function v(C){return C}var _=Array.prototype.map,b=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function p(C){var M=C.grouping===void 0||C.thousands===void 0?v:i(_.call(C.grouping,Number),C.thousands+""),g=C.currency===void 0?"":C.currency[0]+"",P=C.currency===void 0?"":C.currency[1]+"",A=C.decimal===void 0?".":C.decimal+"",z=C.numerals===void 0?v:a(_.call(C.numerals,String)),O=C.percent===void 0?"%":C.percent+"",U=C.minus===void 0?"-":C.minus+"",G=C.nan===void 0?"NaN":C.nan+"";function Z(N){N=s(N);var H=N.fill,re=N.align,oe=N.sign,_e=N.symbol,Ce=N.zero,Le=N.width,ge=N.comma,ie=N.precision,Se=N.trim,Ee=N.type;Ee==="n"?(ge=!0,Ee="g"):d[Ee]||(ie===void 0&&(ie=12),Se=!0,Ee="g"),(Ce||H==="0"&&re==="=")&&(Ce=!0,H="0",re="=");var Ae=_e==="$"?g:_e==="#"&&/[boxX]/.test(Ee)?"0"+Ee.toLowerCase():"",Be=_e==="$"?P:/[%p]/.test(Ee)?O:"",Pe=d[Ee],me=/[defgprs%]/.test(Ee);ie=ie===void 0?6:/[gprs]/.test(Ee)?Math.max(1,Math.min(21,ie)):Math.max(0,Math.min(20,ie));function De(ce){var je=Ae,lt=Be,pt,Vt,ot;if(Ee==="c")lt=Pe(ce)+lt,ce="";else{ce=+ce;var ut=ce<0||1/ce<0;if(ce=isNaN(ce)?G:Pe(Math.abs(ce),ie),Se&&(ce=u(ce)),ut&&+ce==0&&oe!=="+"&&(ut=!1),je=(ut?oe==="("?oe:U:oe==="-"||oe==="("?"":oe)+je,lt=(Ee==="s"?b[8+c/3]:"")+lt+(ut&&oe==="("?")":""),me){for(pt=-1,Vt=ce.length;++ptot||ot>57){lt=(ot===46?A+ce.slice(pt+1):ce.slice(pt))+lt,ce=ce.slice(0,pt);break}}}ge&&!Ce&&(ce=M(ce,1/0));var Wt=je.length+ce.length+lt.length,Nt=Wt>1)+je+ce+lt+Nt.slice(Wt);break;default:ce=Nt+je+ce+lt;break}return z(ce)}return De.toString=function(){return N+""},De}function j(N,H){var re=Z((N=s(N),N.type="f",N)),oe=Math.max(-8,Math.min(8,Math.floor(n(H)/3)))*3,_e=Math.pow(10,-oe),Ce=b[8+oe/3];return function(Le){return re(_e*Le)+Ce}}return{format:Z,formatPrefix:j}}var k;E({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function E(C){return k=p(C),e.format=k.format,e.formatPrefix=k.formatPrefix,k}function T(C){return Math.max(0,-n(Math.abs(C)))}function L(C,M){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(n(M)/3)))*3-n(Math.abs(C)))}function x(C,M){return C=Math.abs(C),M=Math.abs(M)-C,Math.max(0,n(M)-n(C))+1}e.FormatSpecifier=l,e.formatDefaultLocale=E,e.formatLocale=p,e.formatSpecifier=s,e.precisionFixed=T,e.precisionPrefix=L,e.precisionRound=x,Object.defineProperty(e,"__esModule",{value:!0})})});var Mee=ye((grr,See)=>{"use strict";See.exports=function(e){for(var t=e.length,r,n=0;n13)&&r!==32&&r!==133&&r!==160&&r!==5760&&r!==6158&&(r<8192||r>8205)&&r!==8232&&r!==8233&&r!==8239&&r!==8287&&r!==8288&&r!==12288&&r!==65279)return!1;return!0}});var Eo=ye((mrr,Eee)=>{"use strict";var Stt=Mee();Eee.exports=function(e){var t=typeof e;if(t==="string"){var r=e;if(e=+e,e===0&&Stt(r))return!1}else if(t!=="number")return!1;return e-e<1}});var fs=ye((yrr,kee)=>{"use strict";kee.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"\u2212"}});var EO=ye((w6,Cee)=>{(function(e,t){typeof w6=="object"&&typeof Cee!="undefined"?t(w6):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e["base64-arraybuffer"]={}))})(w6,function(e){"use strict";for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),n=0;n>2],c+=t[(s[l]&3)<<4|s[l+1]>>4],c+=t[(s[l+1]&15)<<2|s[l+2]>>6],c+=t[s[l+2]&63];return u%3===2?c=c.substring(0,c.length-1)+"=":u%3===1&&(c=c.substring(0,c.length-2)+"=="),c},a=function(o){var s=o.length*.75,l=o.length,u,c=0,f,h,d,v;o[o.length-1]==="="&&(s--,o[o.length-2]==="="&&s--);var _=new ArrayBuffer(s),b=new Uint8Array(_);for(u=0;u>4,b[c++]=(h&15)<<4|d>>2,b[c++]=(d&3)<<6|v&63;return _};e.decode=a,e.encode=i,Object.defineProperty(e,"__esModule",{value:!0})})});var Ty=ye((_rr,Lee)=>{"use strict";Lee.exports=function(t){return window&&window.process&&window.process.versions?Object.prototype.toString.call(t)==="[object Object]":Object.prototype.toString.call(t)==="[object Object]"&&Object.getPrototypeOf(t).hasOwnProperty("hasOwnProperty")}});var vv=ye(xg=>{"use strict";var Mtt=EO().decode,Ett=Ty(),kO=Array.isArray,ktt=ArrayBuffer,Ctt=DataView;function Pee(e){return ktt.isView(e)&&!(e instanceof Ctt)}xg.isTypedArray=Pee;function T6(e){return kO(e)||Pee(e)}xg.isArrayOrTypedArray=T6;function Ltt(e){return!T6(e[0])}xg.isArray1D=Ltt;xg.ensureArray=function(e,t){return kO(e)||(e=[]),e.length=t,e};var Ld={u1c:typeof Uint8ClampedArray=="undefined"?void 0:Uint8ClampedArray,i1:typeof Int8Array=="undefined"?void 0:Int8Array,u1:typeof Uint8Array=="undefined"?void 0:Uint8Array,i2:typeof Int16Array=="undefined"?void 0:Int16Array,u2:typeof Uint16Array=="undefined"?void 0:Uint16Array,i4:typeof Int32Array=="undefined"?void 0:Int32Array,u4:typeof Uint32Array=="undefined"?void 0:Uint32Array,f4:typeof Float32Array=="undefined"?void 0:Float32Array,f8:typeof Float64Array=="undefined"?void 0:Float64Array};Ld.uint8c=Ld.u1c;Ld.uint8=Ld.u1;Ld.int8=Ld.i1;Ld.uint16=Ld.u2;Ld.int16=Ld.i2;Ld.uint32=Ld.u4;Ld.int32=Ld.i4;Ld.float32=Ld.f4;Ld.float64=Ld.f8;function CO(e){return e.constructor===ArrayBuffer}xg.isArrayBuffer=CO;xg.decodeTypedArraySpec=function(e){var t=[],r=Ptt(e),n=r.dtype,i=Ld[n];if(!i)throw new Error('Error in dtype: "'+n+'"');var a=i.BYTES_PER_ELEMENT,o=r.bdata;CO(o)||(o=Mtt(o));var s=r.shape===void 0?[o.byteLength/a]:(""+r.shape).split(",");s.reverse();var l=s.length,u,c,f=+s[0],h=a*f,d=0;if(l===1)t=new i(o);else if(l===2)for(u=+s[1],c=0;c{"use strict";var Ree=Eo(),PO=vv().isArrayOrTypedArray;Oee.exports=function(t,r){if(Ree(r))r=String(r);else if(typeof r!="string"||r.slice(-4)==="[-1]")throw"bad property string";var n=r.split("."),i,a,o,s;for(s=0;s{"use strict";var h3=FS(),ztt=/^\w*$/,Ott=0,qee=1,A6=2,Bee=3,gb=4;Nee.exports=function(t,r,n,i){n=n||"name",i=i||"value";var a,o,s,l={};r&&r.length?(s=h3(t,r),o=s.get()):o=t,r=r||"";var u={};if(o)for(a=0;a2)return l[d]=l[d]|A6,f.set(h,null);if(c){for(a=d;a{"use strict";var qtt=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,Btt=/^[^\.\[\]]+$/;Vee.exports=function(e,t){for(;t;){var r=e.match(qtt);if(r)e=r[1];else if(e.match(Btt))e="";else throw new Error("bad relativeAttr call:"+[e,t]);if(t.charAt(0)==="^")t=t.slice(1);else break}return e&&t.charAt(0)!=="["?e+"."+t:e+t}});var S6=ye((Arr,Hee)=>{"use strict";var Ntt=Eo();Hee.exports=function(t,r){if(t>0)return Math.log(t)/Math.LN10;var n=Math.log(Math.min(r[0],r[1]))/Math.LN10;return Ntt(n)||(n=Math.log(Math.max(r[0],r[1]))/Math.LN10-6),n}});var Xee=ye((Srr,Wee)=>{"use strict";var jee=vv().isArrayOrTypedArray,zS=Ty();Wee.exports=function e(t,r){for(var n in r){var i=r[n],a=t[n];if(a!==i)if(n.charAt(0)==="_"||typeof i=="function"){if(n in t)continue;t[n]=i}else if(jee(i)&&jee(a)&&zS(i[0])){if(n==="customdata"||n==="ids")continue;for(var o=Math.min(i.length,a.length),s=0;s{"use strict";function Utt(e,t){var r=e%t;return r<0?r+t:r}function Vtt(e,t){return Math.abs(e)>t/2?e-Math.round(e/t)*t:e}Zee.exports={mod:Utt,modHalf:Vtt}});var fd=ye((Err,M6)=>{(function(e){var t=/^\s+/,r=/\s+$/,n=0,i=e.round,a=e.min,o=e.max,s=e.random;function l(me,De){if(me=me||"",De=De||{},me instanceof l)return me;if(!(this instanceof l))return new l(me,De);var ce=u(me);this._originalInput=me,this._r=ce.r,this._g=ce.g,this._b=ce.b,this._a=ce.a,this._roundA=i(100*this._a)/100,this._format=De.format||ce.format,this._gradientType=De.gradientType,this._r<1&&(this._r=i(this._r)),this._g<1&&(this._g=i(this._g)),this._b<1&&(this._b=i(this._b)),this._ok=ce.ok,this._tc_id=n++}l.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var me=this.toRgb();return(me.r*299+me.g*587+me.b*114)/1e3},getLuminance:function(){var me=this.toRgb(),De,ce,je,lt,pt,Vt;return De=me.r/255,ce=me.g/255,je=me.b/255,De<=.03928?lt=De/12.92:lt=e.pow((De+.055)/1.055,2.4),ce<=.03928?pt=ce/12.92:pt=e.pow((ce+.055)/1.055,2.4),je<=.03928?Vt=je/12.92:Vt=e.pow((je+.055)/1.055,2.4),.2126*lt+.7152*pt+.0722*Vt},setAlpha:function(me){return this._a=N(me),this._roundA=i(100*this._a)/100,this},toHsv:function(){var me=d(this._r,this._g,this._b);return{h:me.h*360,s:me.s,v:me.v,a:this._a}},toHsvString:function(){var me=d(this._r,this._g,this._b),De=i(me.h*360),ce=i(me.s*100),je=i(me.v*100);return this._a==1?"hsv("+De+", "+ce+"%, "+je+"%)":"hsva("+De+", "+ce+"%, "+je+"%, "+this._roundA+")"},toHsl:function(){var me=f(this._r,this._g,this._b);return{h:me.h*360,s:me.s,l:me.l,a:this._a}},toHslString:function(){var me=f(this._r,this._g,this._b),De=i(me.h*360),ce=i(me.s*100),je=i(me.l*100);return this._a==1?"hsl("+De+", "+ce+"%, "+je+"%)":"hsla("+De+", "+ce+"%, "+je+"%, "+this._roundA+")"},toHex:function(me){return _(this._r,this._g,this._b,me)},toHexString:function(me){return"#"+this.toHex(me)},toHex8:function(me){return b(this._r,this._g,this._b,this._a,me)},toHex8String:function(me){return"#"+this.toHex8(me)},toRgb:function(){return{r:i(this._r),g:i(this._g),b:i(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+i(this._r)+", "+i(this._g)+", "+i(this._b)+")":"rgba("+i(this._r)+", "+i(this._g)+", "+i(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:i(H(this._r,255)*100)+"%",g:i(H(this._g,255)*100)+"%",b:i(H(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+i(H(this._r,255)*100)+"%, "+i(H(this._g,255)*100)+"%, "+i(H(this._b,255)*100)+"%)":"rgba("+i(H(this._r,255)*100)+"%, "+i(H(this._g,255)*100)+"%, "+i(H(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Z[_(this._r,this._g,this._b,!0)]||!1},toFilter:function(me){var De="#"+p(this._r,this._g,this._b,this._a),ce=De,je=this._gradientType?"GradientType = 1, ":"";if(me){var lt=l(me);ce="#"+p(lt._r,lt._g,lt._b,lt._a)}return"progid:DXImageTransform.Microsoft.gradient("+je+"startColorstr="+De+",endColorstr="+ce+")"},toString:function(me){var De=!!me;me=me||this._format;var ce=!1,je=this._a<1&&this._a>=0,lt=!De&&je&&(me==="hex"||me==="hex6"||me==="hex3"||me==="hex4"||me==="hex8"||me==="name");return lt?me==="name"&&this._a===0?this.toName():this.toRgbString():(me==="rgb"&&(ce=this.toRgbString()),me==="prgb"&&(ce=this.toPercentageRgbString()),(me==="hex"||me==="hex6")&&(ce=this.toHexString()),me==="hex3"&&(ce=this.toHexString(!0)),me==="hex4"&&(ce=this.toHex8String(!0)),me==="hex8"&&(ce=this.toHex8String()),me==="name"&&(ce=this.toName()),me==="hsl"&&(ce=this.toHslString()),me==="hsv"&&(ce=this.toHsvString()),ce||this.toHexString())},clone:function(){return l(this.toString())},_applyModification:function(me,De){var ce=me.apply(null,[this].concat([].slice.call(De)));return this._r=ce._r,this._g=ce._g,this._b=ce._b,this.setAlpha(ce._a),this},lighten:function(){return this._applyModification(L,arguments)},brighten:function(){return this._applyModification(x,arguments)},darken:function(){return this._applyModification(C,arguments)},desaturate:function(){return this._applyModification(k,arguments)},saturate:function(){return this._applyModification(E,arguments)},greyscale:function(){return this._applyModification(T,arguments)},spin:function(){return this._applyModification(M,arguments)},_applyCombination:function(me,De){return me.apply(null,[this].concat([].slice.call(De)))},analogous:function(){return this._applyCombination(O,arguments)},complement:function(){return this._applyCombination(g,arguments)},monochromatic:function(){return this._applyCombination(U,arguments)},splitcomplement:function(){return this._applyCombination(z,arguments)},triad:function(){return this._applyCombination(P,arguments)},tetrad:function(){return this._applyCombination(A,arguments)}},l.fromRatio=function(me,De){if(typeof me=="object"){var ce={};for(var je in me)me.hasOwnProperty(je)&&(je==="a"?ce[je]=me[je]:ce[je]=ge(me[je]));me=ce}return l(me,De)};function u(me){var De={r:0,g:0,b:0},ce=1,je=null,lt=null,pt=null,Vt=!1,ot=!1;return typeof me=="string"&&(me=Be(me)),typeof me=="object"&&(Ae(me.r)&&Ae(me.g)&&Ae(me.b)?(De=c(me.r,me.g,me.b),Vt=!0,ot=String(me.r).substr(-1)==="%"?"prgb":"rgb"):Ae(me.h)&&Ae(me.s)&&Ae(me.v)?(je=ge(me.s),lt=ge(me.v),De=v(me.h,je,lt),Vt=!0,ot="hsv"):Ae(me.h)&&Ae(me.s)&&Ae(me.l)&&(je=ge(me.s),pt=ge(me.l),De=h(me.h,je,pt),Vt=!0,ot="hsl"),me.hasOwnProperty("a")&&(ce=me.a)),ce=N(ce),{ok:Vt,format:me.format||ot,r:a(255,o(De.r,0)),g:a(255,o(De.g,0)),b:a(255,o(De.b,0)),a:ce}}function c(me,De,ce){return{r:H(me,255)*255,g:H(De,255)*255,b:H(ce,255)*255}}function f(me,De,ce){me=H(me,255),De=H(De,255),ce=H(ce,255);var je=o(me,De,ce),lt=a(me,De,ce),pt,Vt,ot=(je+lt)/2;if(je==lt)pt=Vt=0;else{var ut=je-lt;switch(Vt=ot>.5?ut/(2-je-lt):ut/(je+lt),je){case me:pt=(De-ce)/ut+(De1&&($t-=1),$t<1/6?Wt+(Nt-Wt)*6*$t:$t<1/2?Nt:$t<2/3?Wt+(Nt-Wt)*(2/3-$t)*6:Wt}if(De===0)je=lt=pt=ce;else{var ot=ce<.5?ce*(1+De):ce+De-ce*De,ut=2*ce-ot;je=Vt(ut,ot,me+1/3),lt=Vt(ut,ot,me),pt=Vt(ut,ot,me-1/3)}return{r:je*255,g:lt*255,b:pt*255}}function d(me,De,ce){me=H(me,255),De=H(De,255),ce=H(ce,255);var je=o(me,De,ce),lt=a(me,De,ce),pt,Vt,ot=je,ut=je-lt;if(Vt=je===0?0:ut/je,je==lt)pt=0;else{switch(je){case me:pt=(De-ce)/ut+(De>1)+720)%360;--De;)je.h=(je.h+lt)%360,pt.push(l(je));return pt}function U(me,De){De=De||6;for(var ce=l(me).toHsv(),je=ce.h,lt=ce.s,pt=ce.v,Vt=[],ot=1/De;De--;)Vt.push(l({h:je,s:lt,v:pt})),pt=(pt+ot)%1;return Vt}l.mix=function(me,De,ce){ce=ce===0?0:ce||50;var je=l(me).toRgb(),lt=l(De).toRgb(),pt=ce/100,Vt={r:(lt.r-je.r)*pt+je.r,g:(lt.g-je.g)*pt+je.g,b:(lt.b-je.b)*pt+je.b,a:(lt.a-je.a)*pt+je.a};return l(Vt)},l.readability=function(me,De){var ce=l(me),je=l(De);return(e.max(ce.getLuminance(),je.getLuminance())+.05)/(e.min(ce.getLuminance(),je.getLuminance())+.05)},l.isReadable=function(me,De,ce){var je=l.readability(me,De),lt,pt;switch(pt=!1,lt=Pe(ce),lt.level+lt.size){case"AAsmall":case"AAAlarge":pt=je>=4.5;break;case"AAlarge":pt=je>=3;break;case"AAAsmall":pt=je>=7;break}return pt},l.mostReadable=function(me,De,ce){var je=null,lt=0,pt,Vt,ot,ut;ce=ce||{},Vt=ce.includeFallbackColors,ot=ce.level,ut=ce.size;for(var Wt=0;Wtlt&&(lt=pt,je=l(De[Wt]));return l.isReadable(me,je,{level:ot,size:ut})||!Vt?je:(ce.includeFallbackColors=!1,l.mostReadable(me,["#fff","#000"],ce))};var G=l.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Z=l.hexNames=j(G);function j(me){var De={};for(var ce in me)me.hasOwnProperty(ce)&&(De[me[ce]]=ce);return De}function N(me){return me=parseFloat(me),(isNaN(me)||me<0||me>1)&&(me=1),me}function H(me,De){_e(me)&&(me="100%");var ce=Ce(me);return me=a(De,o(0,parseFloat(me))),ce&&(me=parseInt(me*De,10)/100),e.abs(me-De)<1e-6?1:me%De/parseFloat(De)}function re(me){return a(1,o(0,me))}function oe(me){return parseInt(me,16)}function _e(me){return typeof me=="string"&&me.indexOf(".")!=-1&&parseFloat(me)===1}function Ce(me){return typeof me=="string"&&me.indexOf("%")!=-1}function Le(me){return me.length==1?"0"+me:""+me}function ge(me){return me<=1&&(me=me*100+"%"),me}function ie(me){return e.round(parseFloat(me)*255).toString(16)}function Se(me){return oe(me)/255}var Ee=function(){var me="[-\\+]?\\d+%?",De="[-\\+]?\\d*\\.\\d+%?",ce="(?:"+De+")|(?:"+me+")",je="[\\s|\\(]+("+ce+")[,|\\s]+("+ce+")[,|\\s]+("+ce+")\\s*\\)?",lt="[\\s|\\(]+("+ce+")[,|\\s]+("+ce+")[,|\\s]+("+ce+")[,|\\s]+("+ce+")\\s*\\)?";return{CSS_UNIT:new RegExp(ce),rgb:new RegExp("rgb"+je),rgba:new RegExp("rgba"+lt),hsl:new RegExp("hsl"+je),hsla:new RegExp("hsla"+lt),hsv:new RegExp("hsv"+je),hsva:new RegExp("hsva"+lt),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Ae(me){return!!Ee.CSS_UNIT.exec(me)}function Be(me){me=me.replace(t,"").replace(r,"").toLowerCase();var De=!1;if(G[me])me=G[me],De=!0;else if(me=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ce;return(ce=Ee.rgb.exec(me))?{r:ce[1],g:ce[2],b:ce[3]}:(ce=Ee.rgba.exec(me))?{r:ce[1],g:ce[2],b:ce[3],a:ce[4]}:(ce=Ee.hsl.exec(me))?{h:ce[1],s:ce[2],l:ce[3]}:(ce=Ee.hsla.exec(me))?{h:ce[1],s:ce[2],l:ce[3],a:ce[4]}:(ce=Ee.hsv.exec(me))?{h:ce[1],s:ce[2],v:ce[3]}:(ce=Ee.hsva.exec(me))?{h:ce[1],s:ce[2],v:ce[3],a:ce[4]}:(ce=Ee.hex8.exec(me))?{r:oe(ce[1]),g:oe(ce[2]),b:oe(ce[3]),a:Se(ce[4]),format:De?"name":"hex8"}:(ce=Ee.hex6.exec(me))?{r:oe(ce[1]),g:oe(ce[2]),b:oe(ce[3]),format:De?"name":"hex"}:(ce=Ee.hex4.exec(me))?{r:oe(ce[1]+""+ce[1]),g:oe(ce[2]+""+ce[2]),b:oe(ce[3]+""+ce[3]),a:Se(ce[4]+""+ce[4]),format:De?"name":"hex8"}:(ce=Ee.hex3.exec(me))?{r:oe(ce[1]+""+ce[1]),g:oe(ce[2]+""+ce[2]),b:oe(ce[3]+""+ce[3]),format:De?"name":"hex"}:!1}function Pe(me){var De,ce;return me=me||{level:"AA",size:"small"},De=(me.level||"AA").toUpperCase(),ce=(me.size||"small").toLowerCase(),De!=="AA"&&De!=="AAA"&&(De="AA"),ce!=="small"&&ce!=="large"&&(ce="small"),{level:De,size:ce}}typeof M6!="undefined"&&M6.exports?M6.exports=l:window.tinycolor=l})(Math)});var Ao=ye(BS=>{"use strict";var Yee=Ty(),OS=Array.isArray;function Gtt(e,t){var r,n;for(r=0;r{"use strict";Kee.exports=function(e){var t=e.variantValues,r=e.editType,n=e.colorEditType;n===void 0&&(n=r);var i={editType:r,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};e.noNumericWeightValues&&(i.valType="enumerated",i.values=i.extras,i.extras=void 0,i.min=void 0,i.max=void 0);var a={family:{valType:"string",noBlank:!0,strict:!0,editType:r},size:{valType:"number",min:1,editType:r},color:{valType:"color",editType:n},weight:i,style:{editType:r,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:e.noFontVariant?void 0:{editType:r,valType:"enumerated",values:t||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:e.noFontTextcase?void 0:{editType:r,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:e.noFontLineposition?void 0:{editType:r,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:e.noFontShadow?void 0:{editType:r,valType:"string",dflt:e.autoShadowDflt?"auto":"none"},editType:r};return e.autoSize&&(a.size.dflt="auto"),e.autoColor&&(a.color.dflt="auto"),e.arrayOk&&(a.family.arrayOk=!0,a.weight.arrayOk=!0,a.style.arrayOk=!0,e.noFontVariant||(a.variant.arrayOk=!0),e.noFontTextcase||(a.textcase.arrayOk=!0),e.noFontLineposition||(a.lineposition.arrayOk=!0),e.noFontShadow||(a.shadow.arrayOk=!0),a.size.arrayOk=!0,a.color.arrayOk=!0),a}});var NS=ye((Lrr,Jee)=>{"use strict";Jee.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}});var W1=ye((Prr,ete)=>{"use strict";var $ee=NS(),Qee=ec(),IO=Qee({editType:"none"});IO.family.dflt=$ee.HOVERFONT;IO.size.dflt=$ee.HOVERFONTSIZE;ete.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:IO,grouptitlefont:Qee({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},showarrow:{valType:"boolean",dflt:!0,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}});var v3=ye((Irr,tte)=>{"use strict";var Htt=ec(),US=W1().hoverlabel,VS=Ao().extendFlat;tte.exports={hoverlabel:{bgcolor:VS({},US.bgcolor,{arrayOk:!0}),bordercolor:VS({},US.bordercolor,{arrayOk:!0}),font:Htt({arrayOk:!0,editType:"none"}),align:VS({},US.align,{arrayOk:!0}),namelength:VS({},US.namelength,{arrayOk:!0}),showarrow:VS({},US.showarrow),editType:"none"}}});var Gl=ye((Rrr,rte)=>{"use strict";var jtt=ec(),Wtt=v3();rte.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc"},showlegend:{valType:"boolean",dflt:!0,editType:"style"},legend:{valType:"subplotid",dflt:"legend",editType:"style"},legendgroup:{valType:"string",dflt:"",editType:"style"},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style"},font:jtt({editType:"style"}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style"},legendwidth:{valType:"number",min:0,editType:"style"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style"},name:{valType:"string",editType:"style"},uid:{valType:"string",editType:"plot",anim:!0},ids:{valType:"data_array",editType:"calc",anim:!0},customdata:{valType:"data_array",editType:"calc"},meta:{valType:"any",arrayOk:!0,editType:"plot"},selectedpoints:{valType:"any",editType:"calc"},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none"},hoverlabel:Wtt.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc"},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc"},editType:"calc"},uirevision:{valType:"any",editType:"none"}}});var mb=ye((Drr,ate)=>{"use strict";var Xtt=fd(),E6={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},ite=E6.RdBu;function Ztt(e,t){if(t||(t=ite),!e)return t;function r(){try{e=E6[e]||JSON.parse(e)}catch(n){e=t}}return typeof e=="string"&&(r(),typeof e=="string"&&r()),nte(e)?e:t}function nte(e){var t=0;if(!Array.isArray(e)||e.length<2||!e[0]||!e[e.length-1]||+e[0][0]!=0||+e[e.length-1][0]!=1)return!1;for(var r=0;r{"use strict";yb.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];yb.defaultLine="#444";yb.lightLine="#eee";yb.background="#fff";yb.borderLine="#BEC8D9";yb.lightFraction=100*10/11});var ka=ye((zrr,ote)=>{"use strict";var wp=fd(),Ktt=Eo(),Jtt=vv().isTypedArray,hd=ote.exports={},k6=Ih();hd.defaults=k6.defaults;var $tt=hd.defaultLine=k6.defaultLine;hd.lightLine=k6.lightLine;var DO=hd.background=k6.background;hd.tinyRGB=function(e){var t=e.toRgb();return"rgb("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+")"};hd.rgb=function(e){return hd.tinyRGB(wp(e))};hd.opacity=function(e){return e?wp(e).getAlpha():0};hd.addOpacity=function(e,t){var r=wp(e).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+t+")"};hd.combine=function(e,t){var r=wp(e).toRgb();if(r.a===1)return wp(e).toRgbString();var n=wp(t||DO).toRgb(),i=n.a===1?n:{r:255*(1-n.a)+n.r*n.a,g:255*(1-n.a)+n.g*n.a,b:255*(1-n.a)+n.b*n.a},a={r:i.r*(1-r.a)+r.r*r.a,g:i.g*(1-r.a)+r.g*r.a,b:i.b*(1-r.a)+r.b*r.a};return wp(a).toRgbString()};hd.interpolate=function(e,t,r){var n=wp(e).toRgb(),i=wp(t).toRgb(),a={r:r*n.r+(1-r)*i.r,g:r*n.g+(1-r)*i.g,b:r*n.b+(1-r)*i.b};return wp(a).toRgbString()};hd.contrast=function(e,t,r){var n=wp(e);n.getAlpha()!==1&&(n=wp(hd.combine(e,DO)));var i=n.isDark()?t?n.lighten(t):DO:r?n.darken(r):$tt;return i.toString()};hd.stroke=function(e,t){var r=wp(t);e.style({stroke:hd.tinyRGB(r),"stroke-opacity":r.getAlpha()})};hd.fill=function(e,t){var r=wp(t);e.style({fill:hd.tinyRGB(r),"fill-opacity":r.getAlpha()})};hd.clean=function(e){if(!(!e||typeof e!="object")){var t=Object.keys(e),r,n,i,a;for(r=0;r=0)))return e;if(a===3)n[a]>1&&(n[a]=1);else if(n[a]>=1)return e}var o=Math.round(n[0]*255)+", "+Math.round(n[1]*255)+", "+Math.round(n[2]*255);return i?"rgba("+o+", "+n[3]+")":"rgb("+o+")"}});var X1=ye((Orr,ste)=>{"use strict";ste.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}});var p3=ye(lte=>{"use strict";lte.counter=function(e,t,r,n){var i=(t||"")+(r?"":"$"),a=n===!1?"":"^";return e==="xy"?new RegExp(a+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+i):new RegExp(a+e+"([2-9]|[1-9][0-9]+)?"+i)}});var hte=ye(Tp=>{"use strict";var FO=Eo(),ute=fd(),cte=Ao().extendFlat,Qtt=Gl(),ert=mb(),trt=ka(),rrt=X1().DESELECTDIM,g3=FS(),fte=p3().counter,irt=d3().modHalf,bg=vv().isArrayOrTypedArray,Z1=vv().isTypedArraySpec,Y1=vv().decodeTypedArraySpec;Tp.valObjectMeta={data_array:{coerceFunction:function(e,t,r){t.set(bg(e)?e:Z1(e)?Y1(e):r)}},enumerated:{coerceFunction:function(e,t,r,n){n.coerceNumber&&(e=+e),n.values.indexOf(e)===-1?t.set(r):t.set(e)},validateFunction:function(e,t){t.coerceNumber&&(e=+e);for(var r=t.values,n=0;na===!0||a===!1;i(e)||n.arrayOk&&Array.isArray(e)&&e.length>0&&e.every(i)?t.set(e):t.set(r)}},number:{coerceFunction:function(e,t,r,n){Z1(e)&&(e=Y1(e)),!FO(e)||n.min!==void 0&&en.max?t.set(r):t.set(+e)}},integer:{coerceFunction:function(e,t,r,n){if((n.extras||[]).indexOf(e)!==-1){t.set(e);return}Z1(e)&&(e=Y1(e)),e%1||!FO(e)||n.min!==void 0&&en.max?t.set(r):t.set(+e)}},string:{coerceFunction:function(e,t,r,n){if(typeof e!="string"){var i=typeof e=="number";n.strict===!0||!i?t.set(r):t.set(String(e))}else n.noBlank&&!e?t.set(r):t.set(e)}},color:{coerceFunction:function(e,t,r){Z1(e)&&(e=Y1(e)),ute(e).isValid()?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){function n(i){return ute(i).isValid()}!Array.isArray(e)||!e.length?t.set(r):e.every(n)?t.set(e):t.set(r)}},colorscale:{coerceFunction:function(e,t,r){t.set(ert.get(e,r))}},angle:{coerceFunction:function(e,t,r){Z1(e)&&(e=Y1(e)),e==="auto"?t.set("auto"):FO(e)?t.set(irt(+e,360)):t.set(r)}},subplotid:{coerceFunction:function(e,t,r,n){var i=n.regex||fte(r);let a=o=>typeof o=="string"&&i.test(o);a(e)||n.arrayOk&&bg(e)&&e.length>0&&e.every(a)?t.set(e):t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r?!0:typeof e!="string"?!1:!!fte(r).test(e)}},flaglist:{coerceFunction:function(e,t,r,n){if((n.extras||[]).indexOf(e)!==-1){t.set(e);return}if(typeof e!="string"){t.set(r);return}for(var i=e.split("+"),a=0;a{"use strict";var dte={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:""},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},showLink:{valType:"boolean",dflt:!1},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0},sendData:{valType:"boolean",dflt:!0},showSources:{valType:"any",dflt:!1},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!1},showEditInChartStudio:{valType:"boolean",dflt:!1},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/un/"},mapboxAccessToken:{valType:"string",dflt:null},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},vte={};function pte(e,t){for(var r in e){var n=e[r];n.valType?t[r]=n.dflt:(t[r]||(t[r]={}),pte(n,t[r]))}}pte(dte,vte);gte.exports={configAttributes:dte,dfltConfig:vte}});var OO=ye((Urr,mte)=>{"use strict";var zO=Oa(),nrt=Eo(),GS=[];mte.exports=function(e,t){if(GS.indexOf(e)!==-1)return;GS.push(e);var r=1e3;nrt(t)?r=t:t==="long"&&(r=3e3);var n=zO.select("body").selectAll(".plotly-notifier").data([0]);n.enter().append("div").classed("plotly-notifier",!0);var i=n.selectAll(".notifier-note").data(GS);function a(o){o.duration(700).style("opacity",0).each("end",function(s){var l=GS.indexOf(s);l!==-1&&GS.splice(l,1),zO.select(this).remove()})}i.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(o){var s=zO.select(this);s.append("button").classed("notifier-close",!0).html("×").on("click",function(){s.transition().call(a)});for(var l=s.append("p"),u=o.split(//g),c=0;c{"use strict";var m3=_b().dfltConfig,qO=OO(),BO=yte.exports={};BO.log=function(){var e;if(m3.logging>1){var t=["LOG:"];for(e=0;e1){var r=[];for(e=0;e"),"long")}};BO.warn=function(){var e;if(m3.logging>0){var t=["WARN:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}};BO.error=function(){var e;if(m3.logging>0){var t=["ERROR:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}}});var L6=ye((Grr,_te)=>{"use strict";_te.exports=function(){}});var NO=ye((Hrr,xte)=>{"use strict";xte.exports=function(t,r){if(r instanceof RegExp){for(var n=r.toString(),i=0;i{bte.exports=art;function art(){var e=new Float32Array(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Ate=ye((Wrr,Tte)=>{Tte.exports=ort;function ort(e){var t=new Float32Array(16);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}});var Mte=ye((Xrr,Ste)=>{Ste.exports=srt;function srt(e,t){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}});var UO=ye((Zrr,Ete)=>{Ete.exports=lrt;function lrt(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Cte=ye((Yrr,kte)=>{kte.exports=urt;function urt(e,t){if(e===t){var r=t[1],n=t[2],i=t[3],a=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=a,e[11]=t[14],e[12]=i,e[13]=o,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}});var Pte=ye((Krr,Lte)=>{Lte.exports=crt;function crt(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],h=t[10],d=t[11],v=t[12],_=t[13],b=t[14],p=t[15],k=r*s-n*o,E=r*l-i*o,T=r*u-a*o,L=n*l-i*s,x=n*u-a*s,C=i*u-a*l,M=c*_-f*v,g=c*b-h*v,P=c*p-d*v,A=f*b-h*_,z=f*p-d*_,O=h*p-d*b,U=k*O-E*z+T*A+L*P-x*g+C*M;return U?(U=1/U,e[0]=(s*O-l*z+u*A)*U,e[1]=(i*z-n*O-a*A)*U,e[2]=(_*C-b*x+p*L)*U,e[3]=(h*x-f*C-d*L)*U,e[4]=(l*P-o*O-u*g)*U,e[5]=(r*O-i*P+a*g)*U,e[6]=(b*T-v*C-p*E)*U,e[7]=(c*C-h*T+d*E)*U,e[8]=(o*z-s*P+u*M)*U,e[9]=(n*P-r*z-a*M)*U,e[10]=(v*x-_*T+p*k)*U,e[11]=(f*T-c*x-d*k)*U,e[12]=(s*g-o*A-l*M)*U,e[13]=(r*A-n*g+i*M)*U,e[14]=(_*E-v*L-b*k)*U,e[15]=(c*L-f*E+h*k)*U,e):null}});var Rte=ye((Jrr,Ite)=>{Ite.exports=frt;function frt(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],h=t[10],d=t[11],v=t[12],_=t[13],b=t[14],p=t[15];return e[0]=s*(h*p-d*b)-f*(l*p-u*b)+_*(l*d-u*h),e[1]=-(n*(h*p-d*b)-f*(i*p-a*b)+_*(i*d-a*h)),e[2]=n*(l*p-u*b)-s*(i*p-a*b)+_*(i*u-a*l),e[3]=-(n*(l*d-u*h)-s*(i*d-a*h)+f*(i*u-a*l)),e[4]=-(o*(h*p-d*b)-c*(l*p-u*b)+v*(l*d-u*h)),e[5]=r*(h*p-d*b)-c*(i*p-a*b)+v*(i*d-a*h),e[6]=-(r*(l*p-u*b)-o*(i*p-a*b)+v*(i*u-a*l)),e[7]=r*(l*d-u*h)-o*(i*d-a*h)+c*(i*u-a*l),e[8]=o*(f*p-d*_)-c*(s*p-u*_)+v*(s*d-u*f),e[9]=-(r*(f*p-d*_)-c*(n*p-a*_)+v*(n*d-a*f)),e[10]=r*(s*p-u*_)-o*(n*p-a*_)+v*(n*u-a*s),e[11]=-(r*(s*d-u*f)-o*(n*d-a*f)+c*(n*u-a*s)),e[12]=-(o*(f*b-h*_)-c*(s*b-l*_)+v*(s*h-l*f)),e[13]=r*(f*b-h*_)-c*(n*b-i*_)+v*(n*h-i*f),e[14]=-(r*(s*b-l*_)-o*(n*b-i*_)+v*(n*l-i*s)),e[15]=r*(s*h-l*f)-o*(n*h-i*f)+c*(n*l-i*s),e}});var Fte=ye(($rr,Dte)=>{Dte.exports=hrt;function hrt(e){var t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],u=e[8],c=e[9],f=e[10],h=e[11],d=e[12],v=e[13],_=e[14],b=e[15],p=t*o-r*a,k=t*s-n*a,E=t*l-i*a,T=r*s-n*o,L=r*l-i*o,x=n*l-i*s,C=u*v-c*d,M=u*_-f*d,g=u*b-h*d,P=c*_-f*v,A=c*b-h*v,z=f*b-h*_;return p*z-k*A+E*P+T*g-L*M+x*C}});var Ote=ye((Qrr,zte)=>{zte.exports=drt;function drt(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],f=t[8],h=t[9],d=t[10],v=t[11],_=t[12],b=t[13],p=t[14],k=t[15],E=r[0],T=r[1],L=r[2],x=r[3];return e[0]=E*n+T*s+L*f+x*_,e[1]=E*i+T*l+L*h+x*b,e[2]=E*a+T*u+L*d+x*p,e[3]=E*o+T*c+L*v+x*k,E=r[4],T=r[5],L=r[6],x=r[7],e[4]=E*n+T*s+L*f+x*_,e[5]=E*i+T*l+L*h+x*b,e[6]=E*a+T*u+L*d+x*p,e[7]=E*o+T*c+L*v+x*k,E=r[8],T=r[9],L=r[10],x=r[11],e[8]=E*n+T*s+L*f+x*_,e[9]=E*i+T*l+L*h+x*b,e[10]=E*a+T*u+L*d+x*p,e[11]=E*o+T*c+L*v+x*k,E=r[12],T=r[13],L=r[14],x=r[15],e[12]=E*n+T*s+L*f+x*_,e[13]=E*i+T*l+L*h+x*b,e[14]=E*a+T*u+L*d+x*p,e[15]=E*o+T*c+L*v+x*k,e}});var Bte=ye((eir,qte)=>{qte.exports=vrt;function vrt(e,t,r){var n=r[0],i=r[1],a=r[2],o,s,l,u,c,f,h,d,v,_,b,p;return t===e?(e[12]=t[0]*n+t[4]*i+t[8]*a+t[12],e[13]=t[1]*n+t[5]*i+t[9]*a+t[13],e[14]=t[2]*n+t[6]*i+t[10]*a+t[14],e[15]=t[3]*n+t[7]*i+t[11]*a+t[15]):(o=t[0],s=t[1],l=t[2],u=t[3],c=t[4],f=t[5],h=t[6],d=t[7],v=t[8],_=t[9],b=t[10],p=t[11],e[0]=o,e[1]=s,e[2]=l,e[3]=u,e[4]=c,e[5]=f,e[6]=h,e[7]=d,e[8]=v,e[9]=_,e[10]=b,e[11]=p,e[12]=o*n+c*i+v*a+t[12],e[13]=s*n+f*i+_*a+t[13],e[14]=l*n+h*i+b*a+t[14],e[15]=u*n+d*i+p*a+t[15]),e}});var Ute=ye((tir,Nte)=>{Nte.exports=prt;function prt(e,t,r){var n=r[0],i=r[1],a=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}});var Gte=ye((rir,Vte)=>{Vte.exports=grt;function grt(e,t,r,n){var i=n[0],a=n[1],o=n[2],s=Math.sqrt(i*i+a*a+o*o),l,u,c,f,h,d,v,_,b,p,k,E,T,L,x,C,M,g,P,A,z,O,U,G;return Math.abs(s)<1e-6?null:(s=1/s,i*=s,a*=s,o*=s,l=Math.sin(r),u=Math.cos(r),c=1-u,f=t[0],h=t[1],d=t[2],v=t[3],_=t[4],b=t[5],p=t[6],k=t[7],E=t[8],T=t[9],L=t[10],x=t[11],C=i*i*c+u,M=a*i*c+o*l,g=o*i*c-a*l,P=i*a*c-o*l,A=a*a*c+u,z=o*a*c+i*l,O=i*o*c+a*l,U=a*o*c-i*l,G=o*o*c+u,e[0]=f*C+_*M+E*g,e[1]=h*C+b*M+T*g,e[2]=d*C+p*M+L*g,e[3]=v*C+k*M+x*g,e[4]=f*P+_*A+E*z,e[5]=h*P+b*A+T*z,e[6]=d*P+p*A+L*z,e[7]=v*P+k*A+x*z,e[8]=f*O+_*U+E*G,e[9]=h*O+b*U+T*G,e[10]=d*O+p*U+L*G,e[11]=v*O+k*U+x*G,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}});var jte=ye((iir,Hte)=>{Hte.exports=mrt;function mrt(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[4],o=t[5],s=t[6],l=t[7],u=t[8],c=t[9],f=t[10],h=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*i+u*n,e[5]=o*i+c*n,e[6]=s*i+f*n,e[7]=l*i+h*n,e[8]=u*i-a*n,e[9]=c*i-o*n,e[10]=f*i-s*n,e[11]=h*i-l*n,e}});var Xte=ye((nir,Wte)=>{Wte.exports=yrt;function yrt(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],u=t[8],c=t[9],f=t[10],h=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i-u*n,e[1]=o*i-c*n,e[2]=s*i-f*n,e[3]=l*i-h*n,e[8]=a*n+u*i,e[9]=o*n+c*i,e[10]=s*n+f*i,e[11]=l*n+h*i,e}});var Yte=ye((air,Zte)=>{Zte.exports=_rt;function _rt(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],u=t[4],c=t[5],f=t[6],h=t[7];return t!==e&&(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[0]=a*i+u*n,e[1]=o*i+c*n,e[2]=s*i+f*n,e[3]=l*i+h*n,e[4]=u*i-a*n,e[5]=c*i-o*n,e[6]=f*i-s*n,e[7]=h*i-l*n,e}});var Jte=ye((oir,Kte)=>{Kte.exports=xrt;function xrt(e,t,r){var n,i,a,o=r[0],s=r[1],l=r[2],u=Math.sqrt(o*o+s*s+l*l);return Math.abs(u)<1e-6?null:(u=1/u,o*=u,s*=u,l*=u,n=Math.sin(t),i=Math.cos(t),a=1-i,e[0]=o*o*a+i,e[1]=s*o*a+l*n,e[2]=l*o*a-s*n,e[3]=0,e[4]=o*s*a-l*n,e[5]=s*s*a+i,e[6]=l*s*a+o*n,e[7]=0,e[8]=o*l*a+s*n,e[9]=s*l*a-o*n,e[10]=l*l*a+i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}});var Qte=ye((sir,$te)=>{$te.exports=brt;function brt(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=n+n,l=i+i,u=a+a,c=n*s,f=n*l,h=n*u,d=i*l,v=i*u,_=a*u,b=o*s,p=o*l,k=o*u;return e[0]=1-(d+_),e[1]=f+k,e[2]=h-p,e[3]=0,e[4]=f-k,e[5]=1-(c+_),e[6]=v+b,e[7]=0,e[8]=h+p,e[9]=v-b,e[10]=1-(c+d),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}});var tre=ye((lir,ere)=>{ere.exports=wrt;function wrt(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var ire=ye((uir,rre)=>{rre.exports=Trt;function Trt(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}});var are=ye((cir,nre)=>{nre.exports=Art;function Art(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var sre=ye((fir,ore)=>{ore.exports=Srt;function Srt(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var ure=ye((hir,lre)=>{lre.exports=Mrt;function Mrt(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var fre=ye((dir,cre)=>{cre.exports=Ert;function Ert(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r+r,s=n+n,l=i+i,u=r*o,c=n*o,f=n*s,h=i*o,d=i*s,v=i*l,_=a*o,b=a*s,p=a*l;return e[0]=1-f-v,e[1]=c+p,e[2]=h-b,e[3]=0,e[4]=c-p,e[5]=1-u-v,e[6]=d+_,e[7]=0,e[8]=h+b,e[9]=d-_,e[10]=1-u-f,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var dre=ye((vir,hre)=>{hre.exports=krt;function krt(e,t,r,n,i,a,o){var s=1/(r-t),l=1/(i-n),u=1/(a-o);return e[0]=a*2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a*2*l,e[6]=0,e[7]=0,e[8]=(r+t)*s,e[9]=(i+n)*l,e[10]=(o+a)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*a*2*u,e[15]=0,e}});var pre=ye((pir,vre)=>{vre.exports=Crt;function Crt(e,t,r,n,i){var a=1/Math.tan(t/2),o=1/(n-i);return e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(i+n)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*i*n*o,e[15]=0,e}});var mre=ye((gir,gre)=>{gre.exports=Lrt;function Lrt(e,t,r,n){var i=Math.tan(t.upDegrees*Math.PI/180),a=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(o+s),u=2/(i+a);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-((o-s)*l*.5),e[9]=(i-a)*u*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e}});var _re=ye((mir,yre)=>{yre.exports=Prt;function Prt(e,t,r,n,i,a,o){var s=1/(t-r),l=1/(n-i),u=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*s,e[13]=(i+n)*l,e[14]=(o+a)*u,e[15]=1,e}});var bre=ye((yir,xre)=>{var Irt=UO();xre.exports=Rrt;function Rrt(e,t,r,n){var i,a,o,s,l,u,c,f,h,d,v=t[0],_=t[1],b=t[2],p=n[0],k=n[1],E=n[2],T=r[0],L=r[1],x=r[2];return Math.abs(v-T)<1e-6&&Math.abs(_-L)<1e-6&&Math.abs(b-x)<1e-6?Irt(e):(c=v-T,f=_-L,h=b-x,d=1/Math.sqrt(c*c+f*f+h*h),c*=d,f*=d,h*=d,i=k*h-E*f,a=E*c-p*h,o=p*f-k*c,d=Math.sqrt(i*i+a*a+o*o),d?(d=1/d,i*=d,a*=d,o*=d):(i=0,a=0,o=0),s=f*o-h*a,l=h*i-c*o,u=c*a-f*i,d=Math.sqrt(s*s+l*l+u*u),d?(d=1/d,s*=d,l*=d,u*=d):(s=0,l=0,u=0),e[0]=i,e[1]=s,e[2]=c,e[3]=0,e[4]=a,e[5]=l,e[6]=f,e[7]=0,e[8]=o,e[9]=u,e[10]=h,e[11]=0,e[12]=-(i*v+a*_+o*b),e[13]=-(s*v+l*_+u*b),e[14]=-(c*v+f*_+h*b),e[15]=1,e)}});var Tre=ye((_ir,wre)=>{wre.exports=Drt;function Drt(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}});var VO=ye((xir,Are)=>{Are.exports={create:wte(),clone:Ate(),copy:Mte(),identity:UO(),transpose:Cte(),invert:Pte(),adjoint:Rte(),determinant:Fte(),multiply:Ote(),translate:Bte(),scale:Ute(),rotate:Gte(),rotateX:jte(),rotateY:Xte(),rotateZ:Yte(),fromRotation:Jte(),fromRotationTranslation:Qte(),fromScaling:tre(),fromTranslation:ire(),fromXRotation:are(),fromYRotation:sre(),fromZRotation:ure(),fromQuat:fre(),frustum:dre(),perspective:pre(),perspectiveFromFieldOfView:mre(),ortho:_re(),lookAt:bre(),str:Tre()}});var P6=ye(fh=>{"use strict";var Frt=VO();fh.init2dArray=function(e,t){for(var r=new Array(e),n=0;n{"use strict";var zrt=Oa(),Sre=K1(),Ort=P6(),qrt=VO();function Brt(e){var t;if(typeof e=="string"){if(t=document.getElementById(e),t===null)throw new Error("No DOM element with id '"+e+"' exists on the page.");return t}else if(e==null)throw new Error("DOM element provided is null or undefined");return e}function Nrt(e){var t=zrt.select(e);return t.node()instanceof HTMLElement&&t.size()&&t.classed("js-plotly-plot")}function Mre(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function Urt(e,t){Ere("global",e,t)}function Ere(e,t,r){var n="plotly.js-style-"+e,i=document.getElementById(n);if(!(i&&i.matches(".no-inline-styles"))){i||(i=document.createElement("style"),i.setAttribute("id",n),i.appendChild(document.createTextNode("")),document.head.appendChild(i));var a=i.sheet;a?a.insertRule?a.insertRule(t+"{"+r+"}",0):a.addRule?a.addRule(t,r,0):Sre.warn("addStyleRule failed"):Sre.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function Vrt(e){var t="plotly.js-style-"+e,r=document.getElementById(t);r&&Mre(r)}function Grt(e,t,r,n,i,a){var o=n.split(":"),s=i.split(":"),l="data-btn-style-event-added";a||(a=document),a.querySelectorAll(e).forEach(function(u){u.getAttribute(l)||(u.addEventListener("mouseenter",function(){var c=this.querySelector(r);c&&(c.style[o[0]]=o[1])}),u.addEventListener("mouseleave",function(){var c=this.querySelector(r);c&&(t&&this.matches(t)?c.style[o[0]]=o[1]:c.style[s[0]]=s[1])}),u.setAttribute(l,!0))})}function Hrt(e){var t=Cre(e),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return t.forEach(function(n){var i=kre(n);if(i){var a=Ort.convertCssMatrix(i);r=qrt.multiply(r,r,a)}}),r}function kre(e){var t=window.getComputedStyle(e,null),r=t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform")||t.getPropertyValue("transform");return r==="none"?null:r.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(n){return+n})}function Cre(e){for(var t=[];jrt(e);)t.push(e),e=e.parentNode,typeof ShadowRoot=="function"&&e instanceof ShadowRoot&&(e=e.host);return t}function jrt(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function Wrt(e,t){return e&&t&&e.top===t.top&&e.left===t.left&&e.right===t.right&&e.bottom===t.bottom}Lre.exports={getGraphDiv:Brt,isPlotDiv:Nrt,removeElement:Mre,addStyleRule:Urt,addRelatedStyleRule:Ere,deleteRelatedStyleRule:Vrt,setStyleOnHover:Grt,getFullTransformMatrix:Hrt,getElementTransformMatrix:kre,getElementAndAncestors:Cre,equalDomRects:Wrt}});var jS=ye((Tir,Pre)=>{"use strict";Pre.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"]},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward"},fromcurrent:{valType:"boolean",dflt:!1},frame:{duration:{valType:"number",min:0,dflt:500},redraw:{valType:"boolean",dflt:!0}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none"},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none"}}}});var mc=ye((Air,qre)=>{"use strict";var Rre=Ao().extendFlat,Xrt=Ty(),Dre={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},Fre={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},Zrt=Dre.flags.slice().concat(["fullReplot"]),Yrt=Fre.flags.slice().concat("layoutReplot");qre.exports={traces:Dre,layout:Fre,traceFlags:function(){return Ire(Zrt)},layoutFlags:function(){return Ire(Yrt)},update:function(e,t){var r=t.editType;if(r&&r!=="none")for(var n=r.split("+"),i=0;i{"use strict";GO.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"};GO.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},path:{valType:"string",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}});var HO=ye((Mir,Bre)=>{"use strict";Bre.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}});var Ll=ye(y3=>{"use strict";var{DATE_FORMAT_LINK:Krt,FORMAT_LINK:Jrt}=HO(),$rt=["Variables that can't be found will be replaced with the specifier.",'For example, a template of "data: %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 and y is missing.',"Variables with an undefined value will be replaced with the fallback value."].join(" ");function Qrt({supportOther:e}={}){return["Variables are inserted using %{variable},",'for example "y: %{y}"'+(e?" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown.":"."),`Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}".`,Jrt,"for details on the formatting syntax.",`Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}".`,Krt,"for details on the date formatting syntax.",$rt].join(" ")}y3.templateFormatStringDescription=Qrt;y3.hovertemplateAttrs=({editType:e="none",arrayOk:t}={},r={})=>_g({valType:"string",dflt:"",editType:e},t!==!1?{arrayOk:!0}:{});y3.texttemplateAttrs=({editType:e="calc",arrayOk:t}={},r={})=>_g({valType:"string",dflt:"",editType:e},t!==!1?{arrayOk:!0}:{});y3.shapeTexttemplateAttrs=({editType:e="arraydraw",newshape:t}={},r={})=>({valType:"string",dflt:"",editType:e});y3.templatefallbackAttrs=({editType:e="none"}={})=>({valType:"any",dflt:"-",editType:e})});var D6=ye((Cir,jre)=>{"use strict";function J1(e,t){return t?t.d2l(e):e}function Nre(e,t){return t?t.l2d(e):e}function eit(e){return e.x0}function tit(e){return e.x1}function rit(e){return e.y0}function iit(e){return e.y1}function Ure(e){return e.x0shift||0}function Vre(e){return e.x1shift||0}function Gre(e){return e.y0shift||0}function Hre(e){return e.y1shift||0}function I6(e,t){return J1(e.x1,t)+Vre(e)-J1(e.x0,t)-Ure(e)}function R6(e,t,r){return J1(e.y1,r)+Hre(e)-J1(e.y0,r)-Gre(e)}function nit(e,t){return Math.abs(I6(e,t))}function ait(e,t,r){return Math.abs(R6(e,t,r))}function oit(e,t,r){return e.type!=="line"?void 0:Math.sqrt(Math.pow(I6(e,t),2)+Math.pow(R6(e,t,r),2))}function sit(e,t){return Nre((J1(e.x1,t)+Vre(e)+J1(e.x0,t)+Ure(e))/2,t)}function lit(e,t,r){return Nre((J1(e.y1,r)+Hre(e)+J1(e.y0,r)+Gre(e))/2,r)}function uit(e,t,r){return e.type!=="line"?void 0:R6(e,t,r)/I6(e,t)}var cit=["x0","x1","y0","y1","dy","height","ycenter"],fit=["x0","x1","y0","y1","dx","width","xcenter"];jre.exports={x0:eit,x1:tit,y0:rit,y1:iit,slope:uit,dx:I6,dy:R6,width:nit,height:ait,length:oit,xcenter:sit,ycenter:lit,simpleXVariables:cit,simpleYVariables:fit}});var Zre=ye((Lir,Xre)=>{"use strict";var hit=mc().overrideAll,xb=Gl(),Wre=ec(),dit=Pd().dash,$1=Ao().extendFlat,{shapeTexttemplateAttrs:vit,templatefallbackAttrs:pit}=Ll(),git=D6();Xre.exports=hit({newshape:{visible:$1({},xb.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:$1({},xb.legend,{}),legendgroup:$1({},xb.legendgroup,{}),legendgrouptitle:{text:$1({},xb.legendgrouptitle.text,{}),font:Wre({})},legendrank:$1({},xb.legendrank,{}),legendwidth:$1({},xb.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:$1({},dit,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:$1({},xb.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:vit({newshape:!0},{keys:Object.keys(git)}),texttemplatefallback:pit({editType:"arraydraw"}),font:Wre({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")});var Kre=ye((Pir,Yre)=>{"use strict";var mit=Pd().dash,yit=Ao().extendFlat;Yre.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:yit({},mit,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}});var F6=ye((Iir,Jre)=>{"use strict";Jre.exports=function(e){var t=e.editType;return{t:{valType:"number",dflt:0,editType:t},r:{valType:"number",dflt:0,editType:t},b:{valType:"number",dflt:0,editType:t},l:{valType:"number",dflt:0,editType:t},editType:t}}});var _3=ye((Rir,tie)=>{"use strict";var jO=ec(),_it=jS(),z6=Ih(),$re=Zre(),Qre=Kre(),xit=F6(),eie=Ao().extendFlat,O6=jO({editType:"calc"});O6.family.dflt='"Open Sans", verdana, arial, sans-serif';O6.size.dflt=12;O6.color.dflt=z6.defaultLine;tie.exports={font:O6,title:{text:{valType:"string",editType:"layoutstyle"},font:jO({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:jO({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:eie(xit({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:z6.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:z6.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},hidesources:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:z6.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:$re.newshape,activeshape:$re.activeshape,newselection:Qre.newselection,activeselection:Qre.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:eie({},_it.transition,{editType:"none"})}});var rie=ye(()=>{(function(){if(!document.getElementById("a75c73da1cd7a97e8992659f6aed556255838daadea9ca0c9fc3af7f1ddf63c0")){var e=document.createElement("style");e.id="a75c73da1cd7a97e8992659f6aed556255838daadea9ca0c9fc3af7f1ddf63c0",e.textContent=`.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,document.head.appendChild(e)}})()});var qa=ye(el=>{"use strict";var x3=K1(),iie=L6(),nie=NO(),bit=Ty(),wit=HS().addStyleRule,aie=Ao(),Tit=Gl(),Ait=_3(),Sit=aie.extendFlat,WO=aie.extendDeepAll;el.modules={};el.allCategories={};el.allTypes=[];el.subplotsRegistry={};el.componentsRegistry={};el.layoutArrayContainers=[];el.layoutArrayRegexes=[];el.traceLayoutAttributes={};el.localeRegistry={};el.apiMethodRegistry={};el.collectableSubplotTypes=null;el.register=function(t){if(el.collectableSubplotTypes=null,t)t&&!Array.isArray(t)&&(t=[t]);else throw new Error("No argument passed to Plotly.register.");for(var r=0;r{"use strict";var Pit=f3().timeFormat,gie=Eo(),XO=K1(),e_=d3().mod,T3=fs(),_0=T3.BADNUM,Ap=T3.ONEDAY,WS=T3.ONEHOUR,Q1=T3.ONEMIN,w3=T3.ONESEC,XS=T3.EPOCHJD,Ay=qa(),cie=f3().utcFormat,Iit=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,Rit=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,fie=new Date().getFullYear()-70;function Sy(e){return e&&Ay.componentsRegistry.calendars&&typeof e=="string"&&e!=="gregorian"}hh.dateTick0=function(e,t){var r=Dit(e,!!t);if(t<2)return r;var n=hh.dateTime2ms(r,e);return n+=Ap*(t-1),hh.ms2DateTime(n,0,e)};function Dit(e,t){return Sy(e)?t?Ay.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:Ay.getComponentMethod("calendars","CANONICAL_TICK")[e]:t?"2000-01-02":"2000-01-01"}hh.dfltRange=function(e){return Sy(e)?Ay.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]};hh.isJSDate=function(e){return typeof e=="object"&&e!==null&&typeof e.getTime=="function"};var B6,N6;hh.dateTime2ms=function(e,t){if(hh.isJSDate(e)){var r=e.getTimezoneOffset()*Q1,n=(e.getUTCMinutes()-e.getMinutes())*Q1+(e.getUTCSeconds()-e.getSeconds())*w3+(e.getUTCMilliseconds()-e.getMilliseconds());if(n){var i=3*Q1;r=r-i/2+e_(n-r+i/2,i)}return e=Number(e)-r,e>=B6&&e<=N6?e:_0}if(typeof e!="string"&&typeof e!="number")return _0;e=String(e);var a=Sy(t),o=e.charAt(0);a&&(o==="G"||o==="g")&&(e=e.slice(1),t="");var s=a&&t.slice(0,7)==="chinese",l=e.match(s?Rit:Iit);if(!l)return _0;var u=l[1],c=l[3]||"1",f=Number(l[5]||1),h=Number(l[7]||0),d=Number(l[9]||0),v=Number(l[11]||0);if(a){if(u.length===2)return _0;u=Number(u);var _;try{var b=Ay.getComponentMethod("calendars","getCal")(t);if(s){var p=c.charAt(c.length-1)==="i";c=parseInt(c,10),_=b.newDate(u,b.toMonthIndex(u,c,p),f)}else _=b.newDate(u,Number(c),f)}catch(E){return _0}return _?(_.toJD()-XS)*Ap+h*WS+d*Q1+v*w3:_0}u.length===2?u=(Number(u)+2e3-fie)%100+fie:u=Number(u),c-=1;var k=new Date(Date.UTC(2e3,c,f,h,d));return k.setUTCFullYear(u),k.getUTCMonth()!==c||k.getUTCDate()!==f?_0:k.getTime()+v*w3};B6=hh.MIN_MS=hh.dateTime2ms("-9999");N6=hh.MAX_MS=hh.dateTime2ms("9999-12-31 23:59:59.9999");hh.isDateTime=function(e,t){return hh.dateTime2ms(e,t)!==_0};function b3(e,t){return String(e+Math.pow(10,t)).slice(1)}var q6=90*Ap,hie=3*WS,die=5*Q1;hh.ms2DateTime=function(e,t,r){if(typeof e!="number"||!(e>=B6&&e<=N6))return _0;t||(t=0);var n=Math.floor(e_(e+.05,1)*10),i=Math.round(e-n/10),a,o,s,l,u,c;if(Sy(r)){var f=Math.floor(i/Ap)+XS,h=Math.floor(e_(e,Ap));try{a=Ay.getComponentMethod("calendars","getCal")(r).fromJD(f).formatDate("yyyy-mm-dd")}catch(d){a=cie("G%Y-%m-%d")(new Date(i))}if(a.charAt(0)==="-")for(;a.length<11;)a="-0"+a.slice(1);else for(;a.length<10;)a="0"+a;o=t=B6+Ap&&e<=N6-Ap))return _0;var t=Math.floor(e_(e+.05,1)*10),r=new Date(Math.round(e-t/10)),n=Pit("%Y-%m-%d")(r),i=r.getHours(),a=r.getMinutes(),o=r.getSeconds(),s=r.getUTCMilliseconds()*10+t;return mie(n,i,a,o,s)};function mie(e,t,r,n,i){if((t||r||n||i)&&(e+=" "+b3(t,2)+":"+b3(r,2),(n||i)&&(e+=":"+b3(n,2),i))){for(var a=4;i%10===0;)a-=1,i/=10;e+="."+b3(i,a)}return e}hh.cleanDate=function(e,t,r){if(e===_0)return t;if(hh.isJSDate(e)||typeof e=="number"&&isFinite(e)){if(Sy(r))return XO.error("JS Dates and milliseconds are incompatible with world calendars",e),t;if(e=hh.ms2DateTimeLocal(+e),!e&&t!==void 0)return t}else if(!hh.isDateTime(e,r))return XO.error("unrecognized date",e),t;return e};var Fit=/%\d?f/g,zit=/%h/g,Oit={1:"1",2:"1",3:"2",4:"2"};function vie(e,t,r,n){e=e.replace(Fit,function(a){var o=Math.min(+a.charAt(1)||6,6),s=(t/1e3%1+2).toFixed(o).slice(2).replace(/0+$/,"")||"0";return s});var i=new Date(Math.floor(t+.05));if(e=e.replace(zit,function(){return Oit[r("%q")(i)]}),Sy(n))try{e=Ay.getComponentMethod("calendars","worldCalFmt")(e,t,n)}catch(a){return"Invalid"}return r(e)(i)}var qit=[59,59.9,59.99,59.999,59.9999];function Bit(e,t){var r=e_(e+.05,Ap),n=b3(Math.floor(r/WS),2)+":"+b3(e_(Math.floor(r/Q1),60),2);if(t!=="M"){gie(t)||(t=0);var i=Math.min(e_(e/w3,60),qit[t]),a=(100+i).toFixed(t).slice(1);t>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+a}return n}hh.formatDate=function(e,t,r,n,i,a){if(i=Sy(i)&&i,!t)if(r==="y")t=a.year;else if(r==="m")t=a.month;else if(r==="d")t=a.dayMonth+` -`+a.year;else return Bit(e,r)+` -`+vie(a.dayMonthYear,e,n,i);return vie(t,e,n,i)};var pie=3*Ap;hh.incrementMonth=function(e,t,r){r=Sy(r)&&r;var n=e_(e,Ap);if(e=Math.round(e-n),r)try{var i=Math.round(e/Ap)+XS,a=Ay.getComponentMethod("calendars","getCal")(r),o=a.fromJD(i);return t%12?a.add(o,t,"m"):a.add(o,t/12,"y"),(o.toJD()-XS)*Ap+n}catch(l){XO.error("invalid ms "+e+" in calendar "+r)}var s=new Date(e+pie);return s.setUTCMonth(s.getUTCMonth()+t)+n-pie};hh.findExactDates=function(e,t){for(var r=0,n=0,i=0,a=0,o,s,l=Sy(t)&&Ay.getComponentMethod("calendars","getCal")(t),u=0;u{"use strict";_ie.exports=function(t){return t}});var U6=ye(My=>{"use strict";var Nit=Eo(),Uit=K1(),Vit=ZS(),Git=fs().BADNUM,ZO=1e-9;My.findBin=function(e,t,r){if(Nit(t.start))return r?Math.ceil((e-t.start)/t.size-ZO)-1:Math.floor((e-t.start)/t.size+ZO);var n=0,i=t.length,a=0,o=i>1?(t[i-1]-t[0])/(i-1):1,s,l;for(o>=0?l=r?Hit:jit:l=r?Xit:Wit,e+=o*ZO*(r?-1:1)*(o>=0?1:-1);n90&&Uit.log("Long binary search..."),n-1};function Hit(e,t){return et}function Xit(e,t){return e>=t}My.sorterAsc=function(e,t){return e-t};My.sorterDes=function(e,t){return t-e};My.distinctVals=function(e){var t=e.slice();t.sort(My.sorterAsc);var r;for(r=t.length-1;r>-1&&t[r]===Git;r--);for(var n=t[r]-t[0]||1,i=n/(r||1)/1e4,a=[],o,s=0;s<=r;s++){var l=t[s],u=l-o;o===void 0?(a.push(l),o=l):u>i&&(n=Math.min(n,u),a.push(l),o=l)}return{vals:a,minDiff:n}};My.roundUp=function(e,t,r){for(var n=0,i=t.length-1,a,o=0,s=r?0:1,l=r?1:0,u=r?Math.ceil:Math.floor;n0&&(n=1),r&&n)return e.sort(t)}return n?e:e.reverse()};My.findIndexOfMin=function(e,t){t=t||Vit;for(var r=1/0,n,i=0;i{"use strict";xie.exports=function(t){return Object.keys(t).sort()}});var bie=ye(dh=>{"use strict";var YS=Eo(),Zit=vv().isArrayOrTypedArray;dh.aggNums=function(e,t,r,n){var i,a;if((!n||n>r.length)&&(n=r.length),YS(t)||(t=!1),Zit(r[0])){for(a=new Array(n),i=0;ie.length-1)return e[e.length-1];var r=t%1;return r*e[Math.ceil(t)]+(1-r)*e[Math.floor(t)]}});var Mie=ye((Vir,Sie)=>{"use strict";var wie=d3(),YO=wie.mod,Yit=wie.modHalf,KS=Math.PI,r_=2*KS;function Kit(e){return e/180*KS}function Jit(e){return e/KS*180}function KO(e){return Math.abs(e[1]-e[0])>r_-1e-14}function Tie(e,t){return Yit(t-e,r_)}function $it(e,t){return Math.abs(Tie(e,t))}function Aie(e,t){if(KO(t))return!0;var r,n;t[0]n&&(n+=r_);var i=YO(e,r_),a=i+r_;return i>=r&&i<=n||a>=r&&a<=n}function Qit(e,t,r,n){if(!Aie(t,n))return!1;var i,a;return r[0]=i&&e<=a}function JO(e,t,r,n,i,a,o){i=i||0,a=a||0;var s=KO([r,n]),l,u,c,f,h;s?(l=0,u=KS,c=r_):r{"use strict";bb.isLeftAnchor=function(t){return t.xanchor==="left"||t.xanchor==="auto"&&t.x<=1/3};bb.isCenterAnchor=function(t){return t.xanchor==="center"||t.xanchor==="auto"&&t.x>1/3&&t.x<2/3};bb.isRightAnchor=function(t){return t.xanchor==="right"||t.xanchor==="auto"&&t.x>=2/3};bb.isTopAnchor=function(t){return t.yanchor==="top"||t.yanchor==="auto"&&t.y>=2/3};bb.isMiddleAnchor=function(t){return t.yanchor==="middle"||t.yanchor==="auto"&&t.y>1/3&&t.y<2/3};bb.isBottomAnchor=function(t){return t.yanchor==="bottom"||t.yanchor==="auto"&&t.y<=1/3}});var Lie=ye(wb=>{"use strict";var $O=d3().mod;wb.segmentsIntersect=Cie;function Cie(e,t,r,n,i,a,o,s){var l=r-e,u=i-e,c=o-i,f=n-t,h=a-t,d=s-a,v=l*d-c*f;if(v===0)return null;var _=(u*d-c*h)/v,b=(u*f-l*h)/v;return b<0||b>1||_<0||_>1?null:{x:e+l*_,y:t+f*_}}wb.segmentDistance=function(t,r,n,i,a,o,s,l){if(Cie(t,r,n,i,a,o,s,l))return 0;var u=n-t,c=i-r,f=s-a,h=l-o,d=u*u+c*c,v=f*f+h*h,_=Math.min(V6(u,c,d,a-t,o-r),V6(u,c,d,s-t,l-r),V6(f,h,v,t-a,r-o),V6(f,h,v,n-a,i-o));return Math.sqrt(_)};function V6(e,t,r,n,i){var a=n*e+i*t;if(a<0)return n*n+i*i;if(a>r){var o=n-e,s=i-t;return o*o+s*s}else{var l=n*t-i*e;return l*l/r}}var G6,QO,kie;wb.getTextLocation=function(t,r,n,i){if((t!==QO||i!==kie)&&(G6={},QO=t,kie=i),G6[n])return G6[n];var a=t.getPointAtLength($O(n-i/2,r)),o=t.getPointAtLength($O(n+i/2,r)),s=Math.atan((o.y-a.y)/(o.x-a.x)),l=t.getPointAtLength($O(n,r)),u=(l.x*4+a.x+o.x)/6,c=(l.y*4+a.y+o.y)/6,f={x:u,y:c,theta:s};return G6[n]=f,f};wb.clearLocationCache=function(){QO=null};wb.getVisibleSegment=function(t,r,n){var i=r.left,a=r.right,o=r.top,s=r.bottom,l=0,u=t.getTotalLength(),c=u,f,h;function d(_){var b=t.getPointAtLength(_);_===0?f=b:_===u&&(h=b);var p=b.xa?b.x-a:0,k=b.ys?b.y-s:0;return Math.sqrt(p*p+k*k)}for(var v=d(l);v;){if(l+=v+n,l>c)return;v=d(l)}for(v=d(c);v;){if(c-=v+n,l>c)return;v=d(c)}return{min:l,max:c,len:c-l,total:u,isClosed:l===0&&c===u&&Math.abs(f.x-h.x)<.1&&Math.abs(f.y-h.y)<.1}};wb.findPointOnPath=function(t,r,n,i){i=i||{};for(var a=i.pathLength||t.getTotalLength(),o=i.tolerance||.001,s=i.iterationLimit||30,l=t.getPointAtLength(0)[n]>t.getPointAtLength(a)[n]?-1:1,u=0,c=0,f=a,h,d,v;u0?f=h:c=h,u++}return d}});var H6=ye(JS=>{"use strict";var Ey={};JS.throttle=function(t,r,n){var i=Ey[t],a=Date.now();if(!i){for(var o in Ey)Ey[o].tsi.ts+r){s();return}i.timer=setTimeout(function(){s(),i.timer=null},r)};JS.done=function(e){var t=Ey[e];return!t||!t.timer?Promise.resolve():new Promise(function(r){var n=t.onDone;t.onDone=function(){n&&n(),r(),t.onDone=null}})};JS.clear=function(e){if(e)Pie(Ey[e]),delete Ey[e];else for(var t in Ey)JS.clear(t)};function Pie(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var Rie=ye((Wir,Iie)=>{"use strict";Iie.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener("resize",t._responsiveChartHandler),delete t._responsiveChartHandler)}});var Die=ye((Xir,j6)=>{"use strict";j6.exports=eq;j6.exports.isMobile=eq;j6.exports.default=eq;var int=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,nnt=/CrOS/,ant=/android|ipad|playbook|silk/i;function eq(e){e||(e={});let t=e.ua;if(!t&&typeof navigator!="undefined"&&(t=navigator.userAgent),t&&t.headers&&typeof t.headers["user-agent"]=="string"&&(t=t.headers["user-agent"]),typeof t!="string")return!1;let r=int.test(t)&&!nnt.test(t)||!!e.tablet&&ant.test(t);return!r&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf("Macintosh")!==-1&&t.indexOf("Safari")!==-1&&(r=!0),r}});var zie=ye((Zir,Fie)=>{"use strict";var ont=Eo(),snt=Die();Fie.exports=function(t){var r;if(t&&t.hasOwnProperty("userAgent")?r=t.userAgent:r=lnt(),typeof r!="string")return!0;var n=snt({ua:{headers:{"user-agent":r}},tablet:!0,featureDetect:!1});if(!n)for(var i=r.split(" "),a=1;a-1;s--){var l=i[s];if(l.slice(0,8)==="Version/"){var u=l.slice(8).split(".")[0];if(ont(u)&&(u=+u),u>=13)return!0}}}return n};function lnt(){var e;return typeof navigator!="undefined"&&(e=navigator.userAgent),e&&e.headers&&typeof e.headers["user-agent"]=="string"&&(e=e.headers["user-agent"]),e}});var qie=ye((Yir,Oie)=>{"use strict";var unt=Oa();Oie.exports=function(t,r,n){var i=t.selectAll("g."+n.replace(/\s/g,".")).data(r,function(o){return o[0].trace.uid});i.exit().remove(),i.enter().append("g").attr("class",n),i.order();var a=t.classed("rangeplot")?"nodeRangePlot3":"node3";return i.each(function(o){o[0][a]=unt.select(this)}),i}});var Nie=ye((Kir,Bie)=>{"use strict";var cnt=qa();Bie.exports=function(t,r){for(var n=t._context.locale,i=0;i<2;i++){for(var a=t._context.locales,o=0;o<2;o++){var s=(a[n]||{}).dictionary;if(s){var l=s[r];if(l)return l}a=cnt.localeRegistry}var u=n.split("-")[0];if(u===n)break;n=u}return r}});var tq=ye((Jir,Uie)=>{"use strict";Uie.exports=function(t){for(var r={},n=[],i=0,a=0;a{"use strict";Vie.exports=function(t){for(var r=dnt(t)?hnt:fnt,n=[],i=0;i{"use strict";Hie.exports=function(t,r){if(!r)return t;var n=1/Math.abs(r),i=n>1?(n*t+n*r)/n:t+r,a=String(i).length;if(a>16){var o=String(r).length,s=String(t).length;if(a>=s+o){var l=parseFloat(i).toPrecision(12);l.indexOf("e+")===-1&&(i=+l)}}return i}});var Xie=ye((enr,Wie)=>{"use strict";var vnt=Eo(),pnt=fs().BADNUM,gnt=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;Wie.exports=function(t){return typeof t=="string"&&(t=t.replace(gnt,"")),vnt(t)?Number(t):pnt}});var Dr=ye((tnr,one)=>{"use strict";var $S=Oa(),mnt=f3().utcFormat,ynt=MO().format,Qie=Eo(),ene=fs(),tne=ene.FP_SAFE,_nt=-tne,Zie=ene.BADNUM,Mi=one.exports={};Mi.adjustFormat=function(t){return!t||/^\d[.]\df/.test(t)||/[.]\d%/.test(t)?t:t==="0.f"?"~f":/^\d%/.test(t)?"~%":/^\ds/.test(t)?"~s":!/^[~,.0$]/.test(t)&&/[&fps]/.test(t)?"~"+t:t};var Yie={};Mi.warnBadFormat=function(e){var t=String(e);Yie[t]||(Yie[t]=1,Mi.warn('encountered bad format: "'+t+'"'))};Mi.noFormat=function(e){return String(e)};Mi.numberFormat=function(e){var t;try{t=ynt(Mi.adjustFormat(e))}catch(r){return Mi.warnBadFormat(e),Mi.noFormat}return t};Mi.nestedProperty=FS();Mi.keyedContainer=Uee();Mi.relativeAttr=Gee();Mi.isPlainObject=Ty();Mi.toLogRange=S6();Mi.relinkPrivateKeys=Xee();var i_=vv();Mi.isArrayBuffer=i_.isArrayBuffer;Mi.isTypedArray=i_.isTypedArray;Mi.isArrayOrTypedArray=i_.isArrayOrTypedArray;Mi.isArray1D=i_.isArray1D;Mi.ensureArray=i_.ensureArray;Mi.concat=i_.concat;Mi.maxRowLength=i_.maxRowLength;Mi.minRowLength=i_.minRowLength;var rne=d3();Mi.mod=rne.mod;Mi.modHalf=rne.modHalf;var n_=hte();Mi.valObjectMeta=n_.valObjectMeta;Mi.coerce=n_.coerce;Mi.coerce2=n_.coerce2;Mi.coerceFont=n_.coerceFont;Mi.coercePattern=n_.coercePattern;Mi.coerceHoverinfo=n_.coerceHoverinfo;Mi.coerceSelectionMarkerOpacity=n_.coerceSelectionMarkerOpacity;Mi.validate=n_.validate;var jp=yie();Mi.dateTime2ms=jp.dateTime2ms;Mi.isDateTime=jp.isDateTime;Mi.ms2DateTime=jp.ms2DateTime;Mi.ms2DateTimeLocal=jp.ms2DateTimeLocal;Mi.cleanDate=jp.cleanDate;Mi.isJSDate=jp.isJSDate;Mi.formatDate=jp.formatDate;Mi.incrementMonth=jp.incrementMonth;Mi.dateTick0=jp.dateTick0;Mi.dfltRange=jp.dfltRange;Mi.findExactDates=jp.findExactDates;Mi.MIN_MS=jp.MIN_MS;Mi.MAX_MS=jp.MAX_MS;var Tb=U6();Mi.findBin=Tb.findBin;Mi.sorterAsc=Tb.sorterAsc;Mi.sorterDes=Tb.sorterDes;Mi.distinctVals=Tb.distinctVals;Mi.roundUp=Tb.roundUp;Mi.sort=Tb.sort;Mi.findIndexOfMin=Tb.findIndexOfMin;Mi.sortObjectKeys=t_();var ky=bie();Mi.aggNums=ky.aggNums;Mi.len=ky.len;Mi.mean=ky.mean;Mi.geometricMean=ky.geometricMean;Mi.median=ky.median;Mi.midRange=ky.midRange;Mi.variance=ky.variance;Mi.stdev=ky.stdev;Mi.interp=ky.interp;var wg=P6();Mi.init2dArray=wg.init2dArray;Mi.transposeRagged=wg.transposeRagged;Mi.dot=wg.dot;Mi.translationMatrix=wg.translationMatrix;Mi.rotationMatrix=wg.rotationMatrix;Mi.rotationXYMatrix=wg.rotationXYMatrix;Mi.apply3DTransform=wg.apply3DTransform;Mi.apply2DTransform=wg.apply2DTransform;Mi.apply2DTransform2=wg.apply2DTransform2;Mi.convertCssMatrix=wg.convertCssMatrix;Mi.inverseTransformMatrix=wg.inverseTransformMatrix;var gm=Mie();Mi.deg2rad=gm.deg2rad;Mi.rad2deg=gm.rad2deg;Mi.angleDelta=gm.angleDelta;Mi.angleDist=gm.angleDist;Mi.isFullCircle=gm.isFullCircle;Mi.isAngleInsideSector=gm.isAngleInsideSector;Mi.isPtInsideSector=gm.isPtInsideSector;Mi.pathArc=gm.pathArc;Mi.pathSector=gm.pathSector;Mi.pathAnnulus=gm.pathAnnulus;var S3=Eie();Mi.isLeftAnchor=S3.isLeftAnchor;Mi.isCenterAnchor=S3.isCenterAnchor;Mi.isRightAnchor=S3.isRightAnchor;Mi.isTopAnchor=S3.isTopAnchor;Mi.isMiddleAnchor=S3.isMiddleAnchor;Mi.isBottomAnchor=S3.isBottomAnchor;var M3=Lie();Mi.segmentsIntersect=M3.segmentsIntersect;Mi.segmentDistance=M3.segmentDistance;Mi.getTextLocation=M3.getTextLocation;Mi.clearLocationCache=M3.clearLocationCache;Mi.getVisibleSegment=M3.getVisibleSegment;Mi.findPointOnPath=M3.findPointOnPath;var Z6=Ao();Mi.extendFlat=Z6.extendFlat;Mi.extendDeep=Z6.extendDeep;Mi.extendDeepAll=Z6.extendDeepAll;Mi.extendDeepNoArrays=Z6.extendDeepNoArrays;var rq=K1();Mi.log=rq.log;Mi.warn=rq.warn;Mi.error=rq.error;var xnt=p3();Mi.counterRegex=xnt.counter;var iq=H6();Mi.throttle=iq.throttle;Mi.throttleDone=iq.done;Mi.clearThrottle=iq.clear;var Tg=HS();Mi.getGraphDiv=Tg.getGraphDiv;Mi.isPlotDiv=Tg.isPlotDiv;Mi.removeElement=Tg.removeElement;Mi.addStyleRule=Tg.addStyleRule;Mi.addRelatedStyleRule=Tg.addRelatedStyleRule;Mi.deleteRelatedStyleRule=Tg.deleteRelatedStyleRule;Mi.setStyleOnHover=Tg.setStyleOnHover;Mi.getFullTransformMatrix=Tg.getFullTransformMatrix;Mi.getElementTransformMatrix=Tg.getElementTransformMatrix;Mi.getElementAndAncestors=Tg.getElementAndAncestors;Mi.equalDomRects=Tg.equalDomRects;Mi.clearResponsive=Rie();Mi.preserveDrawingBuffer=zie();Mi.makeTraceGroups=qie();Mi._=Nie();Mi.notifier=OO();Mi.filterUnique=tq();Mi.filterVisible=Gie();Mi.pushUnique=NO();Mi.increment=jie();Mi.cleanNumber=Xie();Mi.ensureNumber=function(t){return Qie(t)?(t=Number(t),t>tne||t<_nt?Zie:t):Zie};Mi.isIndex=function(e,t){return t!==void 0&&e>=t?!1:Qie(e)&&e>=0&&e%1===0};Mi.noop=L6();Mi.identity=ZS();Mi.repeat=function(e,t){for(var r=new Array(t),n=0;nr?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))};Mi.bBoxIntersect=function(e,t,r){return r=r||0,e.left<=t.right+r&&t.left<=e.right+r&&e.top<=t.bottom+r&&t.top<=e.bottom+r};Mi.simpleMap=function(e,t,r,n,i){for(var a=e.length,o=new Array(a),s=0;s=Math.pow(2,r)?i>10?(Mi.warn("randstr failed uniqueness"),o):e(t,r,n,(i||0)+1):o};Mi.OptionControl=function(e,t){e||(e={}),t||(t="opt");var r={};return r.optionList=[],r._newoption=function(n){n[t]=e,r[n.name]=n,r.optionList.push(n)},r["_"+t]=e,r};Mi.smooth=function(e,t){if(t=Math.round(t)||0,t<2)return e;var r=e.length,n=2*r,i=2*t-1,a=new Array(i),o=new Array(r),s,l,u,c;for(s=0;s=n&&(u-=n*Math.floor(u/n)),u<0?u=-1-u:u>=r&&(u=n-1-u),c+=e[u]*a[l];o[s]=c}return o};Mi.syncOrAsync=function(e,t,r){var n,i;function a(){return Mi.syncOrAsync(e,t,r)}for(;e.length;)if(i=e.splice(0,1)[0],n=i(t),n&&n.then)return n.then(a);return r&&r(t)};Mi.stripTrailingSlash=function(e){return e.slice(-1)==="/"?e.slice(0,-1):e};Mi.noneOrAll=function(e,t,r){if(e){var n=!1,i=!0,a,o;for(a=0;a0?i:0})};Mi.fillArray=function(e,t,r,n){if(n=n||Mi.identity,Mi.isArrayOrTypedArray(e))for(var i=0;iTnt.test(window.navigator.userAgent);var Ant=/Firefox\/(\d+)\.\d+/;Mi.getFirefoxVersion=function(){var e=Ant.exec(window.navigator.userAgent);if(e&&e.length===2){var t=parseInt(e[1]);if(!isNaN(t))return t}return null};Mi.isD3Selection=function(e){return e instanceof $S.selection};Mi.ensureSingle=function(e,t,r,n){var i=e.select(t+(r?"."+r:""));if(i.size())return i;var a=e.append(t);return r&&a.classed(r,!0),n&&a.call(n),a};Mi.ensureSingleById=function(e,t,r,n){var i=e.select(t+"#"+r);if(i.size())return i;var a=e.append(t).attr("id",r);return n&&a.call(n),a};Mi.objectFromPath=function(e,t){for(var r=e.split("."),n,i=n={},a=0;a1?i+o[1]:"";if(a&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+a+"$2");return s+l};Mi.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var ane=/^\w*$/;Mi.templateString=function(e,t){var r={};return e.replace(Mi.TEMPLATE_STRING_REGEX,function(n,i){var a;return ane.test(i)?a=t[i]:(r[i]=r[i]||Mi.nestedProperty(t,i).get,a=r[i](!0)),a!==void 0?a:""})};var Ent={max:10,count:0,name:"hovertemplate"};Mi.hovertemplateString=e=>nq(j1(_g({},e),{opts:Ent}));var knt={max:10,count:0,name:"texttemplate"};Mi.texttemplateString=e=>nq(j1(_g({},e),{opts:knt}));var Cnt=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function Lnt(e){var t=e.match(Cnt);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}var Pnt={max:10,count:0,name:"texttemplate",parseMultDiv:!0};Mi.texttemplateStringForShapes=e=>nq(j1(_g({},e),{opts:Pnt}));var Kie=/^[:|\|]/;function nq({data:e=[],locale:t,fallback:r,labels:n={},opts:i,template:a}){return a.replace(Mi.TEMPLATE_STRING_REGEX,(o,s,l)=>{let u=["xother","yother"].includes(s),c=["_xother","_yother"].includes(s),f=["_xother_","_yother_"].includes(s),h=["xother_","yother_"].includes(s),d=u||c||h||f;(c||f)&&(s=s.substring(1)),(h||f)&&(s=s.substring(0,s.length-1));let v=null,_=null;if(i.parseMultDiv){var b=Lnt(s);s=b.key,v=b.op,_=b.number}let p;if(d){if(n[s]===void 0)return"";p=n[s]}else for(let L of e)if(L){if(L.hasOwnProperty(s)){p=L[s];break}if(ane.test(s)||(p=Mi.nestedProperty(L,s).get(!0)),p!==void 0)break}if(p===void 0){let{count:L,max:x,name:C}=i,M=r===!1?o:r;return L=X6&&o<=Jie,u=s>=X6&&s<=Jie;if(l&&(n=10*n+o-X6),u&&(i=10*i+s-X6),!l||!u){if(n!==i)return n-i;if(o!==s)return o-s}}return i-n};var A3=2e9;Mi.seedPseudoRandom=function(){A3=2e9};Mi.pseudoRandom=function(){var e=A3;return A3=(69069*A3+1)%4294967296,Math.abs(A3-e)<429496729?Mi.pseudoRandom():A3/4294967296};Mi.fillText=function(e,t,r){var n=Array.isArray(r)?function(o){r.push(o)}:function(o){r.text=o},i=Mi.extractOption(e,t,"htx","hovertext");if(Mi.isValidTextValue(i))return n(i);var a=Mi.extractOption(e,t,"tx","text");if(Mi.isValidTextValue(a))return n(a)};Mi.isValidTextValue=function(e){return e||e===0};Mi.formatPercent=function(e,t){t=t||0;for(var r=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+"%",n=0;n1&&(u=1):u=0,Mi.strTranslate(i-u*(r+o),a-u*(n+s))+Mi.strScale(u)+(l?"rotate("+l+(t?"":" "+r+" "+n)+")":"")};Mi.setTransormAndDisplay=function(e,t){e.attr("transform",Mi.getTextTransform(t)),e.style("display",t.scale?null:"none")};Mi.ensureUniformFontSize=function(e,t){var r=Mi.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r};Mi.join2=function(e,t,r){var n=e.length;return n>1?e.slice(0,-1).join(t)+r+e[n-1]:e.join(t)};Mi.bigFont=function(e){return Math.round(1.2*e)};var $ie=Mi.getFirefoxVersion(),Int=$ie!==null&&$ie<86;Mi.getPositionFromD3Event=function(){return Int?[$S.event.layerX,$S.event.layerY]:[$S.event.offsetX,$S.event.offsetY]}});var une=ye(()=>{"use strict";var Rnt=Dr(),sne={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;border:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(aq in sne)lne=aq.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),Rnt.addStyleRule(lne,sne[aq]);var lne,aq});var oq=ye((anr,cne)=>{cne.exports=!0});var lq=ye((onr,fne)=>{"use strict";var Dnt=oq(),sq;typeof window.matchMedia=="function"?sq=!window.matchMedia("(hover: none)").matches:sq=Dnt;fne.exports=sq});var Ab=ye((snr,uq)=>{"use strict";var E3=typeof Reflect=="object"?Reflect:null,hne=E3&&typeof E3.apply=="function"?E3.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},Y6;E3&&typeof E3.ownKeys=="function"?Y6=E3.ownKeys:Object.getOwnPropertySymbols?Y6=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Y6=function(t){return Object.getOwnPropertyNames(t)};function Fnt(e){console&&console.warn&&console.warn(e)}var vne=Number.isNaN||function(t){return t!==t};function Jc(){Jc.init.call(this)}uq.exports=Jc;uq.exports.once=Bnt;Jc.EventEmitter=Jc;Jc.prototype._events=void 0;Jc.prototype._eventsCount=0;Jc.prototype._maxListeners=void 0;var dne=10;function K6(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Jc,"defaultMaxListeners",{enumerable:!0,get:function(){return dne},set:function(e){if(typeof e!="number"||e<0||vne(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");dne=e}});Jc.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};Jc.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||vne(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function pne(e){return e._maxListeners===void 0?Jc.defaultMaxListeners:e._maxListeners}Jc.prototype.getMaxListeners=function(){return pne(this)};Jc.prototype.emit=function(t){for(var r=[],n=1;n0&&(o=r[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=a[t];if(l===void 0)return!1;if(typeof l=="function")hne(l,this,r);else for(var u=l.length,c=xne(l,u),n=0;n0&&o.length>i&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,Fnt(s)}return e}Jc.prototype.addListener=function(t,r){return gne(this,t,r,!1)};Jc.prototype.on=Jc.prototype.addListener;Jc.prototype.prependListener=function(t,r){return gne(this,t,r,!0)};function znt(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function mne(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=znt.bind(n);return i.listener=r,n.wrapFn=i,i}Jc.prototype.once=function(t,r){return K6(r),this.on(t,mne(this,t,r)),this};Jc.prototype.prependOnceListener=function(t,r){return K6(r),this.prependListener(t,mne(this,t,r)),this};Jc.prototype.removeListener=function(t,r){var n,i,a,o,s;if(K6(r),i=this._events,i===void 0)return this;if(n=i[t],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,n.listener||r));else if(typeof n!="function"){for(a=-1,o=n.length-1;o>=0;o--)if(n[o]===r||n[o].listener===r){s=n[o].listener,a=o;break}if(a<0)return this;a===0?n.shift():Ont(n,a),n.length===1&&(i[t]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this};Jc.prototype.off=Jc.prototype.removeListener;Jc.prototype.removeAllListeners=function(t){var r,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var a=Object.keys(n),o;for(i=0;i=0;i--)this.removeListener(t,r[i]);return this};function yne(e,t,r){var n=e._events;if(n===void 0)return[];var i=n[t];return i===void 0?[]:typeof i=="function"?r?[i.listener||i]:[i]:r?qnt(i):xne(i,i.length)}Jc.prototype.listeners=function(t){return yne(this,t,!0)};Jc.prototype.rawListeners=function(t){return yne(this,t,!1)};Jc.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):_ne.call(e,t)};Jc.prototype.listenerCount=_ne;function _ne(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}Jc.prototype.eventNames=function(){return this._eventsCount>0?Y6(this._events):[]};function xne(e,t){for(var r=new Array(t),n=0;n{"use strict";var cq=Ab().EventEmitter,Unt={init:function(e){if(e._ev instanceof cq)return e;var t=new cq,r=new cq;return e._ev=t,e._internalEv=r,e.on=t.on.bind(t),e.once=t.once.bind(t),e.removeListener=t.removeListener.bind(t),e.removeAllListeners=t.removeAllListeners.bind(t),e._internalOn=r.on.bind(r),e._internalOnce=r.once.bind(r),e._removeInternalListener=r.removeListener.bind(r),e._removeAllInternalListeners=r.removeAllListeners.bind(r),e.emit=function(n,i){t.emit(n,i),r.emit(n,i)},typeof e.addEventListener=="function"&&e.addEventListener("wheel",()=>{},{passive:!0}),e},triggerHandler:function(e,t,r){var n,i=e._ev;if(!i)return;var a=i._events[t];if(!a)return;function o(l){if(l.listener){if(i.removeListener(t,l.listener),!l.fired)return l.fired=!0,l.listener.apply(i,[r])}else return l.apply(i,[r])}a=Array.isArray(a)?a:[a];var s;for(s=0;s{"use strict";var Tne=Dr(),Vnt=_b().dfltConfig;function Gnt(e,t){for(var r=[],n,i=0;iVnt.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};Cy.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};Cy.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};Cy.undo=function(t){var r,n;if(!(t.undoQueue===void 0||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,n=0;n=t.undoQueue.queue.length)){for(r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,n=0;n{"use strict";Mne.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}});var P3=ye(ed=>{"use strict";var x0=qa(),QS=Dr(),$6=Gl(),hq=_3(),Hnt=fq(),jnt=jS(),Wnt=_b().configAttributes,Ene=mc(),Ag=QS.extendDeepAll,C3=QS.isPlainObject,Xnt=QS.isArrayOrTypedArray,Q6=QS.nestedProperty,Znt=QS.valObjectMeta,dq="_isSubplotObj",eL="_isLinkedToArray",Ynt="_arrayAttrRegexps",Cne="_deprecated",vq=[dq,eL,Ynt,Cne];ed.IS_SUBPLOT_OBJ=dq;ed.IS_LINKED_TO_ARRAY=eL;ed.DEPRECATED=Cne;ed.UNDERSCORE_ATTRS=vq;ed.get=function(){var e={};return x0.allTypes.forEach(function(t){e[t]=Jnt(t)}),{defs:{valObjects:Znt,metaKeys:vq.concat(["description","role","editType","impliedEdits"]),editType:{traces:Ene.traces,layout:Ene.layout},impliedEdits:{}},traces:e,layout:$nt(),frames:Qnt(),animation:L3(jnt),config:L3(Wnt)}};ed.crawl=function(e,t,r,n){var i=r||0;n=n||"",Object.keys(e).forEach(function(a){var o=e[a];if(vq.indexOf(a)===-1){var s=(n?n+".":"")+a;t(o,a,e,i,s),!ed.isValObject(o)&&C3(o)&&a!=="impliedEdits"&&ed.crawl(o,t,i+1,s)}})};ed.isValObject=function(e){return e&&e.valType!==void 0};ed.findArrayAttributes=function(e){var t=[],r=[],n=[],i,a;function o(l,u,c,f){r=r.slice(0,f).concat([u]),n=n.slice(0,f).concat([l&&l._isLinkedToArray]);var h=l&&(l.valType==="data_array"||l.arrayOk===!0)&&!(r[f-1]==="colorbar"&&(u==="ticktext"||u==="tickvals"));h&&s(i,0,"")}function s(l,u,c){var f=l[r[u]],h=c+r[u];if(u===r.length-1)Xnt(f)&&t.push(a+h);else if(n[u]){if(Array.isArray(f))for(var d=0;d=a.length)return!1;if(e.dimensions===2){if(r++,t.length===r)return e;var o=t[r];if(!J6(o))return!1;e=a[i][o]}else e=a[i]}else e=a}}return e}function J6(e){return e===Math.round(e)&&e>=0}function Jnt(e){var t,r;t=x0.modules[e]._module,r=t.basePlotModule;var n={};n.type=null;var i=Ag({},$6),a=Ag({},t.attributes);ed.crawl(a,function(l,u,c,f,h){Q6(i,h).set(void 0),l===void 0&&Q6(a,h).set(void 0)}),Ag(n,i),x0.traceIs(e,"noOpacity")&&delete n.opacity,x0.traceIs(e,"showLegend")||(delete n.showlegend,delete n.legendgroup),x0.traceIs(e,"noHover")&&(delete n.hoverinfo,delete n.hoverlabel),t.selectPoints||delete n.selectedpoints,Ag(n,a),r.attributes&&Ag(n,r.attributes),n.type=e;var o={meta:t.meta||{},categories:t.categories||{},animatable:!!t.animatable,type:e,attributes:L3(n)};if(t.layoutAttributes){var s={};Ag(s,t.layoutAttributes),o.layoutAttributes=L3(s)}return t.animatable||ed.crawl(o,function(l){ed.isValObject(l)&&"anim"in l&&delete l.anim}),o}function $nt(){var e={},t,r;Ag(e,hq);for(t in x0.subplotsRegistry)if(r=x0.subplotsRegistry[t],!!r.layoutAttributes)if(Array.isArray(r.attr))for(var n=0;n{"use strict";var I3=Dr(),nat=Gl(),a_="templateitemname",pq={name:{valType:"string",editType:"none"}};pq[a_]={valType:"string",editType:"calc"};Sb.templatedArray=function(e,t){return t._isLinkedToArray=e,t.name=pq.name,t[a_]=pq[a_],t};Sb.traceTemplater=function(e){var t={},r,n;for(r in e)n=e[r],Array.isArray(n)&&n.length&&(t[r]=0);function i(a){r=I3.coerce(a,{},nat,"type");var o={type:r,_template:null};if(r in t){n=e[r];var s=t[r]%n.length;t[r]++,o._template=n[s]}return o}return{newTrace:i}};Sb.newContainer=function(e,t,r){var n=e._template,i=n&&(n[t]||r&&n[r]);I3.isPlainObject(i)||(i=null);var a=e[t]={_template:i};return a};Sb.arrayTemplater=function(e,t,r){var n=e._template,i=n&&n[Ine(t)],a=n&&n[t];(!Array.isArray(a)||!a.length)&&(a=[]);var o={};function s(u){var c={name:u.name,_input:u},f=c[a_]=u[a_];if(!Pne(f))return c._template=i,c;for(var h=0;h=n&&(r._input||{})._templateitemname;a&&(i=n);var o=t+"["+i+"]",s;function l(){s={},a&&(s[o]={},s[o][a_]=a)}l();function u(d,v){s[d]=v}function c(d,v){a?I3.nestedProperty(s[o],d).set(v):s[o+"."+d]=v}function f(){var d=s;return l(),d}function h(d,v){d&&c(d,v);var _=f();for(var b in _)I3.nestedProperty(e,b).set(_[b])}return{modifyBase:u,modifyItem:c,getUpdateObj:f,applyUpdate:h}}});var Rh=ye((dnr,Rne)=>{"use strict";var eM=p3().counter;Rne.exports={idRegex:{x:eM("x","( domain)?"),y:eM("y","( domain)?")},attrRegex:eM("[xy]axis"),xAxisMatch:eM("xaxis"),yAxisMatch:eM("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"},zindexSeparator:"z"}});var hf=ye(Sp=>{"use strict";var aat=qa(),gq=Rh();Sp.id2name=function(t){if(!(typeof t!="string"||!t.match(gq.AX_ID_PATTERN))){var r=t.split(" ")[0].slice(1);return r==="1"&&(r=""),t.charAt(0)+"axis"+r}};Sp.name2id=function(t){if(t.match(gq.AX_NAME_PATTERN)){var r=t.slice(5);return r==="1"&&(r=""),t.charAt(0)+r}};Sp.cleanId=function(t,r,n){var i=/( domain)$/.test(t);if(!(typeof t!="string"||!t.match(gq.AX_ID_PATTERN))&&!(r&&t.charAt(0)!==r)&&!(i&&!n)){var a=t.split(" ")[0].slice(1).replace(/^0+/,"");return a==="1"&&(a=""),t.charAt(0)+a+(i&&n?" domain":"")}};Sp.list=function(e,t,r){var n=e._fullLayout;if(!n)return[];var i=Sp.listIds(e,t),a=new Array(i.length),o;for(o=0;on?1:-1:+(e.slice(1)||1)-+(t.slice(1)||1)};Sp.ref2id=function(e){return/^[xyz]/.test(e)?e.split(" ")[0]:!1};function Dne(e,t){if(t&&t.length){for(var r=0;r{"use strict";function oat(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()}function sat(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}Fne.exports={clearOutlineControllers:oat,clearOutline:sat}});var tL=ye((gnr,zne)=>{"use strict";zne.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}});var Id=ye(iL=>{"use strict";var rL=qa(),mnr=Rh().SUBPLOT_PATTERN;iL.getSubplotCalcData=function(e,t,r){var n=rL.subplotsRegistry[t];if(!n)return[];for(var i=n.attr,a=[],o=0;o{"use strict";var lat=qa(),R3=Dr();Mb.manageCommandObserver=function(e,t,r,n){var i={},a=!0;t&&t._commandObserver&&(i=t._commandObserver),i.cache||(i.cache={}),i.lookupTable={};var o=Mb.hasSimpleAPICommandBindings(e,r,i.lookupTable);if(t&&t._commandObserver){if(o)return i;if(t._commandObserver.remove)return t._commandObserver.remove(),t._commandObserver=null,i}if(o){One(e,o,i.cache),i.check=function(){if(a){var c=One(e,o,i.cache);return c.changed&&n&&i.lookupTable[c.value]!==void 0&&(i.disable(),Promise.resolve(n({value:c.value,type:o.type,prop:o.prop,traces:o.traces,index:i.lookupTable[c.value]})).then(i.enable,i.enable)),c.changed}};for(var s=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],l=0;l0?".":"")+i;R3.isPlainObject(a)?mq(a,t,o,n+1):t(o,i,a)}})}});var Mc=ye((xnr,eae)=>{"use strict";var Xne=Oa(),cat=f3().timeFormatLocale,fat=MO().formatLocale,tM=Eo(),hat=EO(),Xl=qa(),Zne=P3(),dat=vl(),Ga=Dr(),Yne=ka(),Une=fs().BADNUM,Mp=hf(),vat=o_().clearOutline,pat=tL(),yq=jS(),gat=fq(),mat=Id().getModuleCalcData,Vne=Ga.relinkPrivateKeys,Eb=Ga._,xa=eae.exports={};Ga.extendFlat(xa,Xl);xa.attributes=Gl();xa.attributes.type.values=xa.allTypes;xa.fontAttrs=ec();xa.layoutAttributes=_3();var aL=Nne();xa.executeAPICommand=aL.executeAPICommand;xa.computeAPICommandBindings=aL.computeAPICommandBindings;xa.manageCommandObserver=aL.manageCommandObserver;xa.hasSimpleAPICommandBindings=aL.hasSimpleAPICommandBindings;xa.redrawText=function(e){return e=Ga.getGraphDiv(e),new Promise(function(t){setTimeout(function(){e._fullLayout&&(Xl.getComponentMethod("annotations","draw")(e),Xl.getComponentMethod("legend","draw")(e),Xl.getComponentMethod("colorbar","draw")(e),t(xa.previousPromises(e)))},300)})};xa.resize=function(e){e=Ga.getGraphDiv(e);var t,r=new Promise(function(n,i){(!e||Ga.isHidden(e))&&i(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(t=e._resolveResize),e._resolveResize=n,e._redrawTimer=setTimeout(function(){if(!e.layout||e.layout.width&&e.layout.height||Ga.isHidden(e)){n(e);return}delete e.layout.width,delete e.layout.height;var a=e.changed;e.autoplay=!0,Xl.call("relayout",e,{autosize:!0}).then(function(){e.changed=a,e._resolveResize===n&&(delete e._resolveResize,n(e))})},100)});return t&&t(r),r};xa.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};xa.addLinks=function(e){if(!(!e._context.showLink&&!e._context.showSources)){var t=e._fullLayout,r=Ga.ensureSingle(t._paper,"text","js-plot-link-container",function(l){l.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:Yne.defaultLine,"pointer-events":"all"}).each(function(){var u=Xne.select(this);u.append("tspan").classed("js-link-to-tool",!0),u.append("tspan").classed("js-link-spacer",!0),u.append("tspan").classed("js-sourcelinks",!0)})}),n=r.node(),i={y:t._paper.attr("height")-9};document.body.contains(n)&&n.getComputedTextLength()>=t.width-20?(i["text-anchor"]="start",i.x=5):(i["text-anchor"]="end",i.x=t._paper.attr("width")-7),r.attr(i);var a=r.select(".js-link-to-tool"),o=r.select(".js-link-spacer"),s=r.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&yat(e,a),o.text(a.text()&&s.text()?" - ":"")}};function yat(e,t){t.text("");var r=t.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" \xBB");if(e._context.sendData)r.on("click",function(){xa.sendDataToCloud(e)});else{var n=window.location.pathname.split("/"),i=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+i})}}xa.sendDataToCloud=function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(t){e.emit("plotly_beforeexport");var r=Xne.select(e).append("div").attr("id","hiddenform").style("display","none"),n=r.append("form").attr({action:t+"/external",method:"post",target:"_blank"}),i=n.append("input").attr({type:"text",name:"data"});return i.node().value=xa.graphJson(e,!1,"keepdata"),n.node().submit(),r.remove(),e.emit("plotly_afterexport"),!1}};var _at=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],xat=["year","month","dayMonth","dayMonthYear"];xa.supplyDefaults=function(e,t){var r=t&&t.skipUpdateCalc,n=e._fullLayout||{};if(n._skipDefaults){delete n._skipDefaults;return}var i=e._fullLayout={},a=e.layout||{},o=e._fullData||[],s=e._fullData=[],l=e.data||[],u=e.calcdata||[],c=e._context||{},f;e._transitionData||xa.createTransitionData(e),i._dfltTitle={plot:Eb(e,"Click to enter Plot title"),subtitle:Eb(e,"Click to enter Plot subtitle"),x:Eb(e,"Click to enter X axis title"),y:Eb(e,"Click to enter Y axis title"),colorbar:Eb(e,"Click to enter Colorscale title"),annotation:Eb(e,"new text")},i._traceWord=Eb(e,"trace");var h=Gne(e,_at);if(i._mapboxAccessToken=c.mapboxAccessToken,n._initialAutoSizeIsDone){var d=n.width,v=n.height;xa.supplyLayoutGlobalDefaults(a,i,h),a.width||(i.width=d),a.height||(i.height=v),xa.sanitizeMargins(i)}else{xa.supplyLayoutGlobalDefaults(a,i,h);var _=!a.width||!a.height,b=i.autosize,p=c.autosizable,k=_&&(b||p);k?xa.plotAutoSize(e,a,i):_&&xa.sanitizeMargins(i),!b&&_&&(a.width=i.width,a.height=i.height)}i._d3locale=Tat(h,i.separators),i._extraFormat=Gne(e,xat),i._initialAutoSizeIsDone=!0,i._dataLength=l.length,i._modules=[],i._visibleModules=[],i._basePlotModules=[];var E=i._subplots=wat(),T=i._splomAxes={x:{},y:{}},L=i._splomSubplots={};i._splomGridDflt={},i._scatterStackOpts={},i._firstScatter={},i._alignmentOpts={},i._colorAxes={},i._requestRangeslider={},i._traceUids=bat(o,l),xa.supplyDataDefaults(l,s,a,i);var x=Object.keys(T.x),C=Object.keys(T.y);if(x.length>1&&C.length>1){for(Xl.getComponentMethod("grid","sizeDefaults")(a,i),f=0;f15&&C.length>15&&i.shapes.length===0&&i.images.length===0,xa.linkSubplots(s,i,o,n),xa.cleanPlot(s,i,o,n);var z=!!(n._has&&n._has("cartesian")),O=!!(i._has&&i._has("cartesian")),U=z,G=O;U&&!G?n._bgLayer.remove():G&&!U&&(i._shouldCreateBgLayer=!0),n._zoomlayer&&!e._dragging&&vat({_fullLayout:n}),Aat(s,i),Vne(i,n),Xl.getComponentMethod("colorscale","crossTraceDefaults")(s,i),i._preGUI||(i._preGUI={}),i._tracePreGUI||(i._tracePreGUI={});var Z=i._tracePreGUI,j={},N;for(N in Z)j[N]="old";for(f=0;f0){var c=1-2*a;o=Math.round(c*o),s=Math.round(c*s)}}var f=xa.layoutAttributes.width.min,h=xa.layoutAttributes.height.min;o1,v=!r.height&&Math.abs(n.height-s)>1;(v||d)&&(d&&(n.width=o),v&&(n.height=s)),t._initialAutoSize||(t._initialAutoSize={width:o,height:s}),xa.sanitizeMargins(n)};xa.supplyLayoutModuleDefaults=function(e,t,r,n){var i=Xl.componentsRegistry,a=t._basePlotModules,o,s,l,u=Xl.subplotsRegistry.cartesian;for(o in i)l=i[o],l.includeBasePlot&&l.includeBasePlot(e,t);a.length||a.push(u),t._has("cartesian")&&(Xl.getComponentMethod("grid","contentDefaults")(e,t),u.finalizeSubplots(e,t));for(var c in t._subplots)t._subplots[c].sort(Ga.subplotSort);for(s=0;s1&&(r.l/=b,r.r/=b)}if(h){var p=(r.t+r.b)/h;p>1&&(r.t/=p,r.b/=p)}var k=r.xl!==void 0?r.xl:r.x,E=r.xr!==void 0?r.xr:r.x,T=r.yt!==void 0?r.yt:r.y,L=r.yb!==void 0?r.yb:r.y;d[t]={l:{val:k,size:r.l+_},r:{val:E,size:r.r+_},b:{val:L,size:r.b+_},t:{val:T,size:r.t+_}},v[t]=1}if(!n._replotting)return xa.doAutoMargin(e)}};function Mat(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=Mp.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}xa.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,n=t.height;t._size||(t._size={}),Kne(t);var i=t._size,a=t.margin,o={t:0,b:0,l:0,r:0},s=Ga.extendFlat({},i),l=a.l,u=a.r,c=a.t,f=a.b,h=t._pushmargin,d=t._pushmarginIds,v=t.minreducedwidth,_=t.minreducedheight;if(a.autoexpand!==!1){for(var b in h)d[b]||delete h[b];var p=e._fullLayout._reservedMargin;for(var k in p)for(var E in p[k]){var T=p[k][E];o[E]=Math.max(o[E],T)}h.base={l:{val:0,size:l},r:{val:1,size:u},t:{val:1,size:c},b:{val:0,size:f}};for(var L in o){var x=0;for(var C in h)C!=="base"&&tM(h[C][L].size)&&(x=h[C][L].size>x?h[C][L].size:x);var M=Math.max(0,a[L]-x);o[L]=Math.max(0,o[L]-M)}for(var g in h){var P=h[g].l||{},A=h[g].b||{},z=P.val,O=P.size,U=A.val,G=A.size,Z=r-o.r-o.l,j=n-o.t-o.b;for(var N in h){if(tM(O)&&h[N].r){var H=h[N].r.val,re=h[N].r.size;if(H>z){var oe=(O*H+(re-Z)*z)/(H-z),_e=(re*(1-z)+(O-Z)*(1-H))/(H-z);oe+_e>l+u&&(l=oe,u=_e)}}if(tM(G)&&h[N].t){var Ce=h[N].t.val,Le=h[N].t.size;if(Ce>U){var ge=(G*Ce+(Le-j)*U)/(Ce-U),ie=(Le*(1-U)+(G-j)*(1-Ce))/(Ce-U);ge+ie>f+c&&(f=ge,c=ie)}}}}}var Se=Ga.constrain(r-a.l-a.r,Jne,v),Ee=Ga.constrain(n-a.t-a.b,$ne,_),Ae=Math.max(0,r-Se),Be=Math.max(0,n-Ee);if(Ae){var Pe=(l+u)/Ae;Pe>1&&(l/=Pe,u/=Pe)}if(Be){var me=(f+c)/Be;me>1&&(f/=me,c/=me)}if(i.l=Math.round(l)+o.l,i.r=Math.round(u)+o.r,i.t=Math.round(c)+o.t,i.b=Math.round(f)+o.b,i.p=Math.round(a.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!t._replotting&&(xa.didMarginChange(s,i)||Mat(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var De=3*(1+Object.keys(d).length);if(t._redrawFromAutoMarginCount1)return!0}return!1};xa.graphJson=function(e,t,r,n,i,a){(i&&t&&!e._fullData||i&&!t&&!e._fullLayout)&&xa.supplyDefaults(e);var o=i?e._fullData:e.data,s=i?e._fullLayout:e.layout,l=(e._transitionData||{})._frames;function u(h,d){if(typeof h=="function")return d?"_function_":null;if(Ga.isPlainObject(h)){var v={},_;return Object.keys(h).sort().forEach(function(E){if(["_","["].indexOf(E.charAt(0))===-1){if(typeof h[E]=="function"){d&&(v[E]="_function");return}if(r==="keepdata"){if(E.slice(-3)==="src")return}else if(r==="keepstream"){if(_=h[E+"src"],typeof _=="string"&&_.indexOf(":")>0&&!Ga.isPlainObject(h.stream))return}else if(r!=="keepall"&&(_=h[E+"src"],typeof _=="string"&&_.indexOf(":")>0))return;v[E]=u(h[E],d)}}),v}var b=Array.isArray(h),p=Ga.isTypedArray(h);if((b||p)&&h.dtype&&h.shape){var k=h.bdata;return u({dtype:h.dtype,shape:h.shape,bdata:Ga.isArrayBuffer(k)?hat.encode(k):k},d)}return b?h.map(function(E){return u(E,d)}):p?Ga.simpleMap(h,Ga.identity):Ga.isJSDate(h)?Ga.ms2DateTimeLocal(+h):h}var c={data:(o||[]).map(function(h){var d=u(h);return t&&delete d.fit,d})};if(!t&&(c.layout=u(s),i)){var f=s._size;c.layout.computed={margin:{b:f.b,l:f.l,r:f.r,t:f.t}}}return l&&(c.frames=u(l)),a&&(c.config=u(e._context,!0)),n==="object"?c:JSON.stringify(c)};xa.modifyFrames=function(e,t){var r,n,i,a=e._transitionData._frames,o=e._transitionData._frameHash;for(r=0;r0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){n=!0}),r.redraw&&e._transitionData._interruptCallbacks.push(function(){return Xl.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var h=0,d=0;function v(){return h++,function(){d++,!n&&d===h&&s(f)}}r.runFn(v),setTimeout(v())})}function s(f){if(e._transitionData)return a(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return Xl.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(f)}function l(){if(e._transitionData)return e._transitioning=!1,i(e._transitionData._interruptCallbacks)}var u=[xa.previousPromises,l,r.prepareFn,xa.rehover,xa.reselect,o],c=Ga.syncOrAsync(u,e);return(!c||!c.then)&&(c=Promise.resolve()),c.then(function(){return e})}xa.doCalcdata=function(e,t){var r=Mp.list(e),n=e._fullData,i=e._fullLayout,a,o,s,l,u=new Array(n.length),c=(e.calcdata||[]).slice();for(e.calcdata=u,i._numBoxes=0,i._numViolins=0,i._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,i._piecolormap={},i._sunburstcolormap={},i._treemapcolormap={},i._iciclecolormap={},i._funnelareacolormap={},s=0;s=0;l--)if(L[l].enabled){a._indexToPoints=L[l]._indexToPoints;break}o&&o.calc&&(T=o.calc(e,a))}(!Array.isArray(T)||!T[0])&&(T=[{x:Une,y:Une}]),T[0].t||(T[0].t={}),T[0].trace=a,u[k]=T}}for(jne(r,n,i),s=0;s{"use strict";kb.xmlns="http://www.w3.org/2000/xmlns/";kb.svg="http://www.w3.org/2000/svg";kb.xlink="http://www.w3.org/1999/xlink";kb.svgAttrs={xmlns:kb.svg,"xmlns:xlink":kb.xlink}});var Dh=ye((wnr,tae)=>{"use strict";tae.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}});var Zl=ye(b0=>{"use strict";var Fh=Oa(),Ly=Dr(),Lat=Ly.strTranslate,_q=Wp(),Pat=Dh().LINE_SPACING,Iat=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;b0.convertToTspans=function(e,t,r){var n=e.text(),i=!e.attr("data-notex")&&t&&t._context.typesetMath&&typeof MathJax!="undefined"&&n.match(Iat),a=Fh.select(e.node().parentNode);if(a.empty())return;var o=e.attr("class")?e.attr("class").split(" ")[0]:"text";o+="-math",a.selectAll("svg."+o).remove(),a.selectAll("g."+o+"-group").remove(),e.style("display",null).attr({"data-unformatted":n,"data-math":"N"});function s(){a.empty()||(o=e.attr("class")+"-math",a.select("svg."+o).remove()),e.text("").style("white-space","pre");var l=jat(e.node(),n);l&&e.style("pointer-events","all"),b0.positionText(e),r&&r.call(e)}return i?(t&&t._promises||[]).push(new Promise(function(l){e.style("display","none");var u=parseInt(e.node().style.fontSize,10),c={fontSize:u};zat(i[2],c,function(f,h,d){a.selectAll("svg."+o).remove(),a.selectAll("g."+o+"-group").remove();var v=f&&f.select("svg");if(!v||!v.node()){s(),l();return}var _=a.append("g").classed(o+"-group",!0).attr({"pointer-events":"none","data-unformatted":n,"data-math":"Y"});_.node().appendChild(v.node()),h&&h.node()&&v.node().insertBefore(h.node().cloneNode(!0),v.node().firstChild);var b=d.width,p=d.height;v.attr({class:o,height:p,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var k=e.node().style.fill||"black",E=v.select("g");E.attr({fill:k,stroke:k});var T=E.node().getBoundingClientRect(),L=T.width,x=T.height;(L>b||x>p)&&(v.style("overflow","hidden"),T=v.node().getBoundingClientRect(),L=T.width,x=T.height);var C=+e.attr("x"),M=+e.attr("y"),g=u||e.node().getBoundingClientRect().height,P=-g/4;if(o[0]==="y")_.attr({transform:"rotate("+[-90,C,M]+")"+Lat(-L/2,P-x/2)});else if(o[0]==="l")M=P-x/2;else if(o[0]==="a"&&o.indexOf("atitle")!==0)C=0,M=P;else{var A=e.attr("text-anchor");C=C-L*(A==="middle"?.5:A==="end"?1:0),M=M+P-x/2}v.attr({x:C,y:M}),r&&r.call(e,_),l(_)})})):s(),e};var Rat=/(<|<|<)/g,Dat=/(>|>|>)/g;function Fat(e){return e.replace(Rat,"\\lt ").replace(Dat,"\\gt ")}var rae=[["$","$"],["\\(","\\)"]];function zat(e,t,r){var n=parseInt((MathJax.version||"").split(".")[0]);if(n!==2&&n!==3){Ly.warn("No MathJax version:",MathJax.version);return}var i,a,o,s,l=function(){return a=Ly.extendDeepAll({},MathJax.Hub.config),o=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:rae},displayAlign:"left"})},u=function(){a=Ly.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=rae},c=function(){if(i=MathJax.Hub.config.menuSettings.renderer,i!=="SVG")return MathJax.Hub.setRenderer("SVG")},f=function(){i=MathJax.config.startup.output,i!=="svg"&&(MathJax.config.startup.output="svg")},h=function(){var k="math-output-"+Ly.randstr({},64);s=Fh.select("body").append("div").attr({id:k}).style({visibility:"hidden",position:"absolute","font-size":t.fontSize+"px"}).text(Fat(e));var E=s.node();return n===2?MathJax.Hub.Typeset(E):MathJax.typeset([E])},d=function(){var k=s.select(n===2?".MathJax_SVG":".MathJax"),E=!k.empty()&&s.select("svg").node();if(!E)Ly.log("There was an error in the tex syntax.",e),r();else{var T=E.getBoundingClientRect(),L;n===2?L=Fh.select("body").select("#MathJax_SVG_glyphs"):L=k.select("defs"),r(k,L,T)}s.remove()},v=function(){if(i!=="SVG")return MathJax.Hub.setRenderer(i)},_=function(){i!=="svg"&&(MathJax.config.startup.output=i)},b=function(){return o!==void 0&&(MathJax.Hub.processSectionDelay=o),MathJax.Hub.Config(a)},p=function(){MathJax.config=a};n===2?MathJax.Hub.Queue(l,c,h,d,v,b):n===3&&(u(),f(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){h(),d(),_(),p()}))}var oae={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},Oat={sub:"0.3em",sup:"-0.6em"},qat={sub:"-0.21em",sup:"0.42em"},iae="\u200B",nae=["http:","https:","mailto:","",void 0,":"],sae=b0.NEWLINES=/(\r\n?|\n)/g,bq=/(<[^<>]*>)/,wq=/<(\/?)([^ >]*)(\s+(.*))?>/i,Bat=//i;b0.BR_TAG_ALL=//gi;var lae=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,uae=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,cae=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,Nat=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function Cb(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&oL(n)}var Uat=/(^|;)\s*color:/;b0.plainText=function(e,t){t=t||{};for(var r=t.len!==void 0&&t.len!==-1?t.len:1/0,n=t.allowedTags!==void 0?t.allowedTags:["br"],i="...",a=i.length,o=e.split(bq),s=[],l="",u=0,c=0;ca?s.push(f.slice(0,Math.max(0,_-a))+i):s.push(f.slice(0,_));break}l=""}}return s.join("")};var Vat={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},Gat=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function oL(e){return e.replace(Gat,function(t,r){var n;return r.charAt(0)==="#"?n=Hat(r.charAt(1)==="x"?parseInt(r.slice(2),16):parseInt(r.slice(1),10)):n=Vat[r],n||t})}b0.convertEntities=oL;function Hat(e){if(!(e>1114111)){var t=String.fromCodePoint;if(t)return t(e);var r=String.fromCharCode;return e<=65535?r(e):r((e>>10)+55232,e%1024+56320)}}function jat(e,t){t=t.replace(sae," ");var r=!1,n=[],i,a=-1;function o(){a++;var x=document.createElementNS(_q.svg,"tspan");Fh.select(x).attr({class:"line",dy:a*Pat+"em"}),e.appendChild(x),i=x;var C=n;if(n=[{node:x}],C.length>1)for(var M=1;M.",t);return}var C=n.pop();x!==C.type&&Ly.log("Start tag <"+C.type+"> doesnt match end tag <"+x+">. Pretending it did match.",t),i=n[n.length-1].node}var c=Bat.test(t);c?o():(i=e,n=[{node:e}]);for(var f=t.split(bq),h=0;h{"use strict";var Wat=Oa(),lL=fd(),iM=Eo(),sL=Dr(),hae=ka(),Xat=mb().isValid;function Zat(e,t,r){var n=t?sL.nestedProperty(e,t).get()||{}:e,i=n[r||"color"];i&&i._inputArray&&(i=i._inputArray);var a=!1;if(sL.isArrayOrTypedArray(i)){for(var o=0;o=0;n--,i++){var a=e[n];r[i]=[1-a[0],a[1]]}return r}function yae(e,t){t=t||{};for(var r=e.domain,n=e.range,i=n.length,a=new Array(i),o=0;o{"use strict";var xae=HO(),Kat=xae.FORMAT_LINK,Jat=xae.DATE_FORMAT_LINK;function $at(e,t){return{valType:"string",dflt:"",editType:"none",description:(t?Tq:bae)("hover text",e)+["By default the values are formatted using "+(t?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}}function Tq(e,t){return["Sets the "+e+" formatting rule"+(t?"for `"+t+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+Kat+"."].join(" ")}function bae(e,t){return Tq(e,t)+[" And for dates see: "+Jat+".","We add two items to d3's date formatter:","*%h* for half of the year as a decimal number as well as","*%{n}f* for fractional seconds","with n digits. For example, *2016-10-13 09:15:23.456* with tickformat","*%H~%M~%S.%2f* would display *09~15~23.46*"].join(" ")}wae.exports={axisHoverFormat:$at,descriptionOnlyNumbers:Tq,descriptionWithDates:bae}});var Rd=ye((Enr,Bae)=>{"use strict";var Tae=ec(),D3=Ih(),qae=Pd().dash,Sq=Ao().extendFlat,Aae=vl().templatedArray,Mnr=Ll().templateFormatStringDescription,Sae=df().descriptionWithDates,Qat=fs().ONEDAY,mm=Rh(),eot=mm.HOUR_PATTERN,tot=mm.WEEKDAY_PATTERN,Aq={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},rot=Sq({},Aq,{values:Aq.values.slice().concat(["sync"])});function Mae(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var Eae={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},kae={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},Cae={valType:"data_array",editType:"ticks"},Lae={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function Pae(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=5),t}function Iae(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var Rae={valType:"color",dflt:D3.defaultLine,editType:"ticks"},Dae={valType:"color",dflt:D3.lightLine,editType:"ticks"};function Fae(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var zae=Sq({},qae,{editType:"ticks"}),Oae={valType:"boolean",editType:"ticks"};Bae.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:D3.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:Tae({editType:"ticks"}),standoff:{valType:"number",min:0,editType:"ticks"},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot"},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},modebardisable:{valType:"flaglist",flags:["autoscale","zoominout"],extras:["none"],dflt:"none",editType:"modebar"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[mm.idRegex.x.toString(),mm.idRegex.y.toString(),!1],editType:"plot"},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot"},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot"},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot"},matches:{valType:"enumerated",values:[mm.idRegex.x.toString(),mm.idRegex.y.toString()],editType:"calc"},rangebreaks:Aae("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc"},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},pattern:{valType:"enumerated",values:[tot,eot,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:Qat},editType:"calc"}),tickmode:rot,nticks:Mae(),tick0:Eae,dtick:kae,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:Cae,ticktext:{valType:"data_array",editType:"ticks"},ticks:Lae,tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks"},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks"},ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",editType:"calc"},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc"},ticklabelshift:{valType:"integer",dflt:0,editType:"ticks"},ticklabelstandoff:{valType:"integer",dflt:0,editType:"ticks"},ticklabelindex:{valType:"integer",arrayOk:!0,editType:"calc"},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle"},ticklen:Pae(),tickwidth:Iae(),tickcolor:Rae,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks"},labelalias:{valType:"any",dflt:!1,editType:"ticks"},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks"},showspikes:{valType:"boolean",dflt:!1,editType:"modebar"},spikecolor:{valType:"color",dflt:null,editType:"none"},spikethickness:{valType:"number",dflt:3,editType:"none"},spikedash:Sq({},qae,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none"},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none"},tickfont:Tae({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B","SI extended"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:Sae("tick label")},tickformatstops:Aae("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks"},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks"},value:{valType:"string",dflt:"",editType:"ticks"},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:Sae("hover text")},unifiedhovertitle:{text:{valType:"string",dflt:"",editType:"none"},editType:"none"},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:D3.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:Oae,gridcolor:Dae,gridwidth:Fae(),griddash:zae,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:D3.defaultLine,editType:"ticks"},zerolinelayer:{valType:"enumerated",values:["above traces","below traces"],dflt:"below traces",editType:"plot"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:D3.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",mm.idRegex.x.toString(),mm.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",mm.idRegex.x.toString(),mm.idRegex.y.toString()],editType:"plot"},minor:{tickmode:Aq,nticks:Mae("minor"),tick0:Eae,dtick:kae,tickvals:Cae,ticks:Lae,ticklen:Pae("minor"),tickwidth:Iae("minor"),tickcolor:Rae,gridcolor:Dae,gridwidth:Fae("minor"),griddash:zae,showgrid:Oae,editType:"ticks"},minorloglabels:{valType:"enumerated",values:["small digits","complete","none"],dflt:"small digits",editType:"calc"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot"},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot"},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},autoshift:{valType:"boolean",dflt:!1,editType:"plot"},shift:{valType:"number",editType:"plot"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","geometric mean ascending","geometric mean descending","median ascending","median descending"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},uirevision:{valType:"any",editType:"none"},editType:"calc"}});var uL=ye((knr,Vae)=>{"use strict";var $c=Rd(),Nae=ec(),Uae=Ao().extendFlat,iot=mc().overrideAll;Vae.exports=iot({orientation:{valType:"enumerated",values:["h","v"],dflt:"v"},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels"},thickness:{valType:"number",min:0,dflt:30},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["left","center","right"]},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},ypad:{valType:"number",min:0,dflt:10},outlinecolor:$c.linecolor,outlinewidth:$c.linewidth,bordercolor:$c.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:$c.minor.tickmode,nticks:$c.nticks,tick0:$c.tick0,dtick:$c.dtick,tickvals:$c.tickvals,ticktext:$c.ticktext,ticks:Uae({},$c.ticks,{dflt:""}),ticklabeloverflow:Uae({},$c.ticklabeloverflow,{}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside"},ticklen:$c.ticklen,tickwidth:$c.tickwidth,tickcolor:$c.tickcolor,ticklabelstep:$c.ticklabelstep,showticklabels:$c.showticklabels,labelalias:$c.labelalias,tickfont:Nae({}),tickangle:$c.tickangle,tickformat:$c.tickformat,tickformatstops:$c.tickformatstops,tickprefix:$c.tickprefix,showtickprefix:$c.showtickprefix,ticksuffix:$c.ticksuffix,showticksuffix:$c.showticksuffix,separatethousands:$c.separatethousands,exponentformat:$c.exponentformat,minexponent:$c.minexponent,showexponent:$c.showexponent,title:{text:{valType:"string"},font:Nae({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")});var Tu=ye((Lnr,Hae)=>{"use strict";var not=uL(),aot=p3().counter,oot=t_(),Gae=mb().scales,Cnr=oot(Gae);function cL(e){return"`"+e+"`"}Hae.exports=function(t,r){t=t||"",r=r||{};var n=r.cLetter||"c",i="onlyIfNumerical"in r?r.onlyIfNumerical:!!t,a="noScale"in r?r.noScale:t==="marker.line",o="showScaleDflt"in r?r.showScaleDflt:n==="z",s=typeof r.colorscaleDflt=="string"?Gae[r.colorscaleDflt]:null,l=r.editTypeOverride||"",u=t?t+".":"",c,f;"colorAttr"in r?(c=r.colorAttr,f=r.colorAttr):(c={z:"z",c:"color"}[n],f="in "+cL(u+c));var h=i?" Has an effect only if "+f+" is set to a numerical array.":"",d=n+"auto",v=n+"min",_=n+"max",b=n+"mid",p=cL(u+d),k=cL(u+v),E=cL(u+_),T=k+" and "+E,L={};L[v]=L[_]=void 0;var x={};x[d]=!1;var C={};return c==="color"&&(C.color={valType:"color",arrayOk:!0,editType:l||"style"},r.anim&&(C.color.anim=!0)),C[d]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:L},C[v]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:x},C[_]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:x},C[b]={valType:"number",dflt:null,editType:"calc",impliedEdits:L},C.colorscale={valType:"colorscale",editType:"calc",dflt:s,impliedEdits:{autocolorscale:!1}},C.autocolorscale={valType:"boolean",dflt:r.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},C.reversescale={valType:"boolean",dflt:!1,editType:"plot"},a||(C.showscale={valType:"boolean",dflt:o,editType:"calc"},C.colorbar=not),r.noColorAxis||(C.coloraxis={valType:"subplotid",regex:aot("coloraxis"),dflt:null,editType:"calc"}),C}});var Eq=ye((Pnr,jae)=>{"use strict";var sot=Ao().extendFlat,lot=Tu(),Mq=mb().scales;jae.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:Mq.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:Mq.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:Mq.RdBu,editType:"calc"}},coloraxis:sot({_isSubplotObj:!0,editType:"calc"},lot("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}});var kq=ye((Inr,Wae)=>{"use strict";var uot=Dr();Wae.exports=function(t){return uot.isPlainObject(t.colorbar)}});var Pq=ye(Lq=>{"use strict";var Cq=Eo(),Xae=Dr(),Zae=fs(),cot=Zae.ONEDAY,fot=Zae.ONEWEEK;Lq.dtick=function(e,t){var r=t==="log",n=t==="date",i=t==="category",a=n?cot:1;if(!e)return a;if(Cq(e))return e=Number(e),e<=0?a:i?Math.max(1,Math.round(e)):n?Math.max(.1,e):e;if(typeof e!="string"||!(n||r))return a;var o=e.charAt(0),s=e.slice(1);return s=Cq(s)?Number(s):0,s<=0||!(n&&o==="M"&&s===Math.round(s)||r&&o==="L"||r&&o==="D"&&(s===1||s===2))?a:e};Lq.tick0=function(e,t,r,n){if(t==="date")return Xae.cleanDate(e,Xae.dateTick0(r,n%fot===0?1:0));if(!(n==="D1"||n==="D2"))return Cq(e)?Number(e):0}});var Lb=ye((Dnr,Kae)=>{"use strict";var Yae=Pq(),hot=Dr().isArrayOrTypedArray,dot=vv().isTypedArraySpec,vot=vv().decodeTypedArraySpec;Kae.exports=function(t,r,n,i,a){a||(a={});var o=a.isMinor,s=o?t.minor||{}:t,l=o?r.minor:r,u=o?"minor.":"";function c(k){var E=s[k];return dot(E)&&(E=vot(E)),E!==void 0?E:(l._template||{})[k]}var f=c("tick0"),h=c("dtick"),d=c("tickvals"),v=hot(d)?"array":h?"linear":"auto",_=n(u+"tickmode",v);if(_==="auto"||_==="sync")n(u+"nticks");else if(_==="linear"){var b=l.dtick=Yae.dtick(h,i);l.tick0=Yae.tick0(f,i,r.calendar,b)}else if(i!=="multicategory"){var p=n(u+"tickvals");p===void 0?l.tickmode="auto":o||n("ticktext")}}});var F3=ye((Fnr,$ae)=>{"use strict";var Iq=Dr(),Jae=Rd();$ae.exports=function(t,r,n,i){var a=i.isMinor,o=a?t.minor||{}:t,s=a?r.minor:r,l=a?Jae.minor:Jae,u=a?"minor.":"",c=Iq.coerce2(o,s,l,"ticklen",a?(r.ticklen||5)*.6:void 0),f=Iq.coerce2(o,s,l,"tickwidth",a?r.tickwidth||1:void 0),h=Iq.coerce2(o,s,l,"tickcolor",(a?r.tickcolor:void 0)||s.color),d=n(u+"ticks",!a&&i.outerTicks||c||f||h?"outside":"");d||(delete s.ticklen,delete s.tickwidth,delete s.tickcolor)}});var Rq=ye((znr,Qae)=>{"use strict";Qae.exports=function(t){var r=["showexponent","showtickprefix","showticksuffix"],n=r.filter(function(a){return t[a]!==void 0}),i=function(a){return t[a]===t[n[0]]};if(n.every(i)||n.length===1)return t[n[0]]}});var Zd=ye((Onr,eoe)=>{"use strict";var fL=Dr(),pot=vl();eoe.exports=function(t,r,n){var i=n.name,a=n.inclusionAttr||"visible",o=r[i],s=fL.isArrayOrTypedArray(t[i])?t[i]:[],l=r[i]=[],u=pot.arrayTemplater(r,i,a),c,f;for(c=0;c{"use strict";var Dq=Dr(),got=ka().contrast,toe=Rd(),mot=Rq(),yot=Zd();roe.exports=function(t,r,n,i,a){a||(a={});var o=n("labelalias");Dq.isPlainObject(o)||delete r.labelalias;var s=mot(t),l=n("showticklabels");if(l){a.noTicklabelshift||n("ticklabelshift"),a.noTicklabelstandoff||n("ticklabelstandoff");var u=a.font||{},c=r.color,f=r.ticklabelposition||"",h=f.indexOf("inside")!==-1?got(a.bgColor):c&&c!==toe.color.dflt?c:u.color;if(Dq.coerceFont(n,"tickfont",u,{overrideDflt:{color:h}}),!a.noTicklabelstep&&i!=="multicategory"&&i!=="log"&&n("ticklabelstep"),!a.noAng){var d=n("tickangle");!a.noAutotickangles&&d==="auto"&&n("autotickangles")}if(i!=="category"){var v=n("tickformat");yot(t,r,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:_ot}),r.tickformatstops.length||delete r.tickformatstops,!a.noExp&&!v&&i!=="date"&&(n("showexponent",s),n("exponentformat"),n("minexponent"),n("separatethousands"))}!a.noMinorloglabels&&i==="log"&&n("minorloglabels")}};function _ot(e,t){function r(i,a){return Dq.coerce(e,t,toe.tickformatstops,i,a)}var n=r("enabled");n&&(r("dtickrange"),r("value"))}});var l_=ye((Bnr,ioe)=>{"use strict";var xot=Rq();ioe.exports=function(t,r,n,i,a){a||(a={});var o=a.tickSuffixDflt,s=xot(t),l=n("tickprefix");l&&n("showtickprefix",s);var u=n("ticksuffix",o);u&&n("showticksuffix",s)}});var Fq=ye((Nnr,noe)=>{"use strict";var u_=Dr(),bot=vl(),wot=Lb(),Tot=F3(),Aot=s_(),Sot=l_(),Mot=uL();noe.exports=function(t,r,n){var i=bot.newContainer(r,"colorbar"),a=t.colorbar||{};function o(A,z){return u_.coerce(a,i,Mot,A,z)}var s=n.margin||{t:0,b:0,l:0,r:0},l=n.width-s.l-s.r,u=n.height-s.t-s.b,c=o("orientation"),f=c==="v",h=o("thicknessmode");o("thickness",h==="fraction"?30/(f?l:u):30);var d=o("lenmode");o("len",d==="fraction"?1:f?u:l);var v=o("yref"),_=o("xref"),b=v==="paper",p=_==="paper",k,E,T,L="left";f?(T="middle",L=p?"left":"right",k=p?1.02:1,E=.5):(T=b?"bottom":"top",L="center",k=.5,E=b?1.02:1),u_.coerce(a,i,{x:{valType:"number",min:p?-2:0,max:p?3:1,dflt:k}},"x"),u_.coerce(a,i,{y:{valType:"number",min:b?-2:0,max:b?3:1,dflt:E}},"y"),o("xanchor",L),o("xpad"),o("yanchor",T),o("ypad"),u_.noneOrAll(a,i,["x","y"]),o("outlinecolor"),o("outlinewidth"),o("bordercolor"),o("borderwidth"),o("bgcolor");var x=u_.coerce(a,i,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:f?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");o("ticklabeloverflow",x.indexOf("inside")!==-1?"hide past domain":"hide past div"),wot(a,i,o,"linear");var C=n.font,M={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:C};x.indexOf("inside")!==-1&&(M.bgColor="black"),Sot(a,i,o,"linear",M),Aot(a,i,o,"linear",M),Tot(a,i,o,"linear",M),o("title.text",n._dfltTitle.colorbar);var g=i.showticklabels?i.tickfont:C,P=u_.extendFlat({},C,{family:g.family,size:u_.bigFont(g.size)});u_.coerceFont(o,"title.font",P),o("title.side",f?"top":"right")}});var td=ye((Unr,soe)=>{"use strict";var aoe=Eo(),Oq=Dr(),Eot=kq(),kot=Fq(),ooe=mb().isValid,Cot=qa().traceIs;function zq(e,t){var r=t.slice(0,t.length-1);return t?Oq.nestedProperty(e,r).get()||{}:e}soe.exports=function e(t,r,n,i,a){var o=a.prefix,s=a.cLetter,l="_module"in r,u=zq(t,o),c=zq(r,o),f=zq(r._template||{},o)||{},h=function(){return delete t.coloraxis,delete r.coloraxis,e(t,r,n,i,a)};if(l){var d=n._colorAxes||{},v=i(o+"coloraxis");if(v){var _=Cot(r,"contour")&&Oq.nestedProperty(r,"contours.coloring").get()||"heatmap",b=d[v];b?(b[2].push(h),b[0]!==_&&(b[0]=!1,Oq.warn(["Ignoring coloraxis:",v,"setting","as it is linked to incompatible colorscales."].join(" ")))):d[v]=[_,r,[h]];return}}var p=u[s+"min"],k=u[s+"max"],E=aoe(p)&&aoe(k)&&p{"use strict";var loe=Dr(),Lot=vl(),uoe=Eq(),Pot=td();coe.exports=function(t,r){function n(f,h){return loe.coerce(t,r,uoe,f,h)}n("colorscale.sequential"),n("colorscale.sequentialminus"),n("colorscale.diverging");var i=r._colorAxes,a,o;function s(f,h){return loe.coerce(a,o,uoe.coloraxis,f,h)}for(var l in i){var u=i[l];if(u[0])a=t[l]||{},o=Lot.newContainer(r,l,"coloraxis"),o._name=l,Pot(a,o,r,s,{prefix:"",cLetter:"c"});else{for(var c=0;c{"use strict";var Iot=Dr(),Rot=pv().hasColorscale,Dot=pv().extractOpts;hoe.exports=function(t,r){function n(c,f){var h=c["_"+f];h!==void 0&&(c[f]=h)}function i(c,f){var h=f.container?Iot.nestedProperty(c,f.container).get():c;if(h)if(h.coloraxis)h._colorAx=r[h.coloraxis];else{var d=Dot(h),v=d.auto;(v||d.min===void 0)&&n(h,f.min),(v||d.max===void 0)&&n(h,f.max),d.autocolorscale&&n(h,"colorscale")}}for(var a=0;a{"use strict";var voe=Eo(),qq=Dr(),Fot=pv().extractOpts;poe.exports=function(t,r,n){var i=t._fullLayout,a=n.vals,o=n.containerStr,s=o?qq.nestedProperty(r,o).get():r,l=Fot(s),u=l.auto!==!1,c=l.min,f=l.max,h=l.mid,d=function(){return qq.aggNums(Math.min,null,a)},v=function(){return qq.aggNums(Math.max,null,a)};if(c===void 0?c=d():u&&(s._colorAx&&voe(c)?c=Math.min(c,d()):c=d()),f===void 0?f=v():u&&(s._colorAx&&voe(f)?f=Math.max(f,v()):f=v()),u&&h!==void 0&&(f-h>h-c?c=h-(f-h):f-h=0?_=i.colorscale.sequential:_=i.colorscale.sequentialminus,l._sync("colorscale",_)}}});var tc=ye((jnr,goe)=>{"use strict";var hL=mb(),z3=pv();goe.exports={moduleType:"component",name:"colorscale",attributes:Tu(),layoutAttributes:Eq(),supplyLayoutDefaults:foe(),handleDefaults:td(),crossTraceDefaults:doe(),calc:gv(),scales:hL.scales,defaultScale:hL.defaultScale,getScale:hL.get,isValidScale:hL.isValid,hasColorscale:z3.hasColorscale,extractOpts:z3.extractOpts,extractScale:z3.extractScale,flipScale:z3.flipScale,makeColorScaleFunc:z3.makeColorScaleFunc,makeColorScaleFuncFromTrace:z3.makeColorScaleFuncFromTrace}});var Ru=ye((Wnr,yoe)=>{"use strict";var moe=Dr(),zot=vv().isTypedArraySpec;yoe.exports={hasLines:function(e){return e.visible&&e.mode&&e.mode.indexOf("lines")!==-1},hasMarkers:function(e){return e.visible&&(e.mode&&e.mode.indexOf("markers")!==-1||e.type==="splom")},hasText:function(e){return e.visible&&e.mode&&e.mode.indexOf("text")!==-1},isBubble:function(e){var t=e.marker;return moe.isPlainObject(t)&&(moe.isArrayOrTypedArray(t.size)||zot(t.size))}}});var O3=ye((Xnr,_oe)=>{"use strict";var Oot=Eo();_oe.exports=function(t,r){r||(r=2);var n=t.marker,i=n.sizeref||1,a=n.sizemin||0,o=n.sizemode==="area"?function(s){return Math.sqrt(s/i)}:function(s){return s/i};return function(s){var l=o(s/r);return Oot(l)&&l>0?Math.max(l,a):0}}});var ip=ye(mv=>{"use strict";var dL=Dr();mv.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};mv.isTraceInSubplots=function(e,t){if(e.type==="splom"){for(var r=e.xaxes||[],n=e.yaxes||[],i=0;i=0&&r.index{woe.exports=Vot;var Bq={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},Uot=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function Vot(e){var t=[];return e.replace(Uot,function(r,n,i){var a=n.toLowerCase();for(i=Hot(i),a=="m"&&i.length>2&&(t.push([n].concat(i.splice(0,2))),a="l",n=n=="m"?"l":"L");;){if(i.length==Bq[a])return i.unshift(n),t.push(i);if(i.length{"use strict";var jot=nM(),ca=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},hs="M0,0Z",Toe=Math.sqrt(2),c_=Math.sqrt(3),Nq=Math.PI,Uq=Math.cos,Vq=Math.sin;koe.exports={circle:{n:0,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i="M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z";return r?vs(t,r,i):i}},square:{n:1,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")}},diamond:{n:2,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.3,2);return vs(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"Z")}},cross:{n:3,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.4,2),i=ca(e*1.2,2);return vs(t,r,"M"+i+","+n+"H"+n+"V"+i+"H-"+n+"V"+n+"H-"+i+"V-"+n+"H-"+n+"V-"+i+"H"+n+"V-"+n+"H"+i+"Z")}},x:{n:4,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.8/Toe,2),i="l"+n+","+n,a="l"+n+",-"+n,o="l-"+n+",-"+n,s="l-"+n+","+n;return vs(t,r,"M0,"+n+i+a+o+a+o+s+o+s+i+s+i+"Z")}},"triangle-up":{n:5,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2/c_,2),i=ca(e/2,2),a=ca(e,2);return vs(t,r,"M-"+n+","+i+"H"+n+"L0,-"+a+"Z")}},"triangle-down":{n:6,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2/c_,2),i=ca(e/2,2),a=ca(e,2);return vs(t,r,"M-"+n+",-"+i+"H"+n+"L0,"+a+"Z")}},"triangle-left":{n:7,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2/c_,2),i=ca(e/2,2),a=ca(e,2);return vs(t,r,"M"+i+",-"+n+"V"+n+"L-"+a+",0Z")}},"triangle-right":{n:8,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2/c_,2),i=ca(e/2,2),a=ca(e,2);return vs(t,r,"M-"+i+",-"+n+"V"+n+"L"+a+",0Z")}},"triangle-ne":{n:9,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.6,2),i=ca(e*1.2,2);return vs(t,r,"M-"+i+",-"+n+"H"+n+"V"+i+"Z")}},"triangle-se":{n:10,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.6,2),i=ca(e*1.2,2);return vs(t,r,"M"+n+",-"+i+"V"+n+"H-"+i+"Z")}},"triangle-sw":{n:11,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.6,2),i=ca(e*1.2,2);return vs(t,r,"M"+i+","+n+"H-"+n+"V-"+i+"Z")}},"triangle-nw":{n:12,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.6,2),i=ca(e*1.2,2);return vs(t,r,"M-"+n+","+i+"V-"+n+"H"+i+"Z")}},pentagon:{n:13,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.951,2),i=ca(e*.588,2),a=ca(-e,2),o=ca(e*-.309,2),s=ca(e*.809,2);return vs(t,r,"M"+n+","+o+"L"+i+","+s+"H-"+i+"L-"+n+","+o+"L0,"+a+"Z")}},hexagon:{n:14,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e/2,2),a=ca(e*c_/2,2);return vs(t,r,"M"+a+",-"+i+"V"+i+"L0,"+n+"L-"+a+","+i+"V-"+i+"L0,-"+n+"Z")}},hexagon2:{n:15,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e/2,2),a=ca(e*c_/2,2);return vs(t,r,"M-"+i+","+a+"H"+i+"L"+n+",0L"+i+",-"+a+"H-"+i+"L-"+n+",0Z")}},octagon:{n:16,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.924,2),i=ca(e*.383,2);return vs(t,r,"M-"+i+",-"+n+"H"+i+"L"+n+",-"+i+"V"+i+"L"+i+","+n+"H-"+i+"L-"+n+","+i+"V-"+i+"Z")}},star:{n:17,f:function(e,t,r){if(ds(t))return hs;var n=e*1.4,i=ca(n*.225,2),a=ca(n*.951,2),o=ca(n*.363,2),s=ca(n*.588,2),l=ca(-n,2),u=ca(n*-.309,2),c=ca(n*.118,2),f=ca(n*.809,2),h=ca(n*.382,2);return vs(t,r,"M"+i+","+u+"H"+a+"L"+o+","+c+"L"+s+","+f+"L0,"+h+"L-"+s+","+f+"L-"+o+","+c+"L-"+a+","+u+"H-"+i+"L0,"+l+"Z")}},hexagram:{n:18,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.66,2),i=ca(e*.38,2),a=ca(e*.76,2);return vs(t,r,"M-"+a+",0l-"+i+",-"+n+"h"+a+"l"+i+",-"+n+"l"+i+","+n+"h"+a+"l-"+i+","+n+"l"+i+","+n+"h-"+a+"l-"+i+","+n+"l-"+i+",-"+n+"h-"+a+"Z")}},"star-triangle-up":{n:19,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*c_*.8,2),i=ca(e*.8,2),a=ca(e*1.6,2),o=ca(e*4,2),s="A "+o+","+o+" 0 0 1 ";return vs(t,r,"M-"+n+","+i+s+n+","+i+s+"0,-"+a+s+"-"+n+","+i+"Z")}},"star-triangle-down":{n:20,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*c_*.8,2),i=ca(e*.8,2),a=ca(e*1.6,2),o=ca(e*4,2),s="A "+o+","+o+" 0 0 1 ";return vs(t,r,"M"+n+",-"+i+s+"-"+n+",-"+i+s+"0,"+a+s+n+",-"+i+"Z")}},"star-square":{n:21,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.1,2),i=ca(e*2,2),a="A "+i+","+i+" 0 0 1 ";return vs(t,r,"M-"+n+",-"+n+a+"-"+n+","+n+a+n+","+n+a+n+",-"+n+a+"-"+n+",-"+n+"Z")}},"star-diamond":{n:22,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.4,2),i=ca(e*1.9,2),a="A "+i+","+i+" 0 0 1 ";return vs(t,r,"M-"+n+",0"+a+"0,"+n+a+n+",0"+a+"0,-"+n+a+"-"+n+",0Z")}},"diamond-tall":{n:23,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.7,2),i=ca(e*1.4,2);return vs(t,r,"M0,"+i+"L"+n+",0L0,-"+i+"L-"+n+",0Z")}},"diamond-wide":{n:24,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.4,2),i=ca(e*.7,2);return vs(t,r,"M0,"+i+"L"+n+",0L0,-"+i+"L-"+n+",0Z")}},hourglass:{n:25,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+","+n+"H-"+n+"L"+n+",-"+n+"H-"+n+"Z")},noDot:!0},bowtie:{n:26,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+","+n+"V-"+n+"L-"+n+","+n+"V-"+n+"Z")},noDot:!0},"circle-cross":{n:27,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e/Toe,2);return vs(t,r,"M"+i+","+i+"L-"+i+",-"+i+"M"+i+",-"+i+"L-"+i+","+i+"M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.3,2);return vs(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM0,-"+n+"V"+n+"M-"+n+",0H"+n)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.3,2),i=ca(e*.65,2);return vs(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM-"+i+",-"+i+"L"+i+","+i+"M-"+i+","+i+"L"+i+",-"+i)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.4,2);return vs(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.2,2),i=ca(e*.85,2);return vs(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+i+","+i+"L-"+i+",-"+i+"M"+i+",-"+i+"L-"+i+","+i)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e,t,r){if(ds(t))return hs;var n=ca(e/2,2),i=ca(e,2);return vs(t,r,"M"+n+","+i+"V-"+i+"M"+(n-i)+",-"+i+"V"+i+"M"+i+","+n+"H-"+i+"M-"+i+","+(n-i)+"H"+i)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.2,2),i=ca(e*1.6,2),a=ca(e*.8,2);return vs(t,r,"M-"+n+","+a+"L0,0M"+n+","+a+"L0,0M0,-"+i+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.2,2),i=ca(e*1.6,2),a=ca(e*.8,2);return vs(t,r,"M-"+n+",-"+a+"L0,0M"+n+",-"+a+"L0,0M0,"+i+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.2,2),i=ca(e*1.6,2),a=ca(e*.8,2);return vs(t,r,"M"+a+","+n+"L0,0M"+a+",-"+n+"L0,0M-"+i+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.2,2),i=ca(e*1.6,2),a=ca(e*.8,2);return vs(t,r,"M-"+a+","+n+"L0,0M-"+a+",-"+n+"L0,0M"+i+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.4,2);return vs(t,r,"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.4,2);return vs(t,r,"M0,"+n+"V-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+","+n+"L-"+n+",-"+n)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e*2,2);return vs(t,r,"M0,0L-"+n+","+i+"H"+n+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e*2,2);return vs(t,r,"M0,0L-"+n+",-"+i+"H"+n+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2,2),i=ca(e,2);return vs(t,r,"M0,0L"+n+",-"+i+"V"+i+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2,2),i=ca(e,2);return vs(t,r,"M0,0L-"+n+",-"+i+"V"+i+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e*2,2);return vs(t,r,"M-"+n+",0H"+n+"M0,0L-"+n+","+i+"H"+n+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e*2,2);return vs(t,r,"M-"+n+",0H"+n+"M0,0L-"+n+",-"+i+"H"+n+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2,2),i=ca(e,2);return vs(t,r,"M0,-"+i+"V"+i+"M0,0L"+n+",-"+i+"V"+i+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2,2),i=ca(e,2);return vs(t,r,"M0,-"+i+"V"+i+"M0,0L-"+n+",-"+i+"V"+i+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(e,t,r){if(ds(t))return hs;var n=Nq/2.5,i=2*e*Uq(n),a=2*e*Vq(n);return vs(t,r,"M0,0L"+-i+","+a+"L"+i+","+a+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,t,r){if(ds(t))return hs;var n=Nq/4,i=2*e*Uq(n),a=2*e*Vq(n);return vs(t,r,"M0,0L"+-i+","+a+"A "+2*e+","+2*e+" 0 0 1 "+i+","+a+"Z")},backoff:.4,noDot:!0}};function ds(e){return e===null}var Aoe,Soe,Moe,Eoe;function vs(e,t,r){if((!e||e%360===0)&&!t)return r;if(Moe===e&&Eoe===t&&Aoe===r)return Soe;Moe=e,Eoe=t,Aoe=r;function n(b,p){var k=Uq(b),E=Vq(b),T=p[0],L=p[1]+(t||0);return[T*k-L*E,T*E+L*k]}for(var i=e/180*Nq,a=0,o=0,s=jot(r),l="",u=0;u{"use strict";var dd=Oa(),Du=Dr(),Wot=Du.numberFormat,Db=Eo(),Zq=fd(),pL=qa(),Yd=ka(),Xot=tc(),oM=Du.strTranslate,gL=Zl(),Zot=Wp(),Yot=Dh(),Kot=Yot.LINE_SPACING,Boe=X1().DESELECTDIM,Jot=Ru(),$ot=O3(),Qot=ip().appendArrayPointValue,Ta=Yoe.exports={};Ta.font=function(e,t){var r=t.variant,n=t.style,i=t.weight,a=t.color,o=t.size,s=t.family,l=t.shadow,u=t.lineposition,c=t.textcase;s&&e.style("font-family",s),o+1&&e.style("font-size",o+"px"),a&&e.call(Yd.fill,a),i&&e.style("font-weight",i),n&&e.style("font-style",n),r&&e.style("font-variant",r),c&&e.style("text-transform",Gq(tst(c))),l&&e.style("text-shadow",l==="auto"?gL.makeTextShadow(Yd.contrast(a)):Gq(l)),u&&e.style("text-decoration-line",Gq(rst(u)))};function Gq(e){return e==="none"?void 0:e}var est={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function tst(e){return est[e]}function rst(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}Ta.setPosition=function(e,t,r){e.attr("x",t).attr("y",r)};Ta.setSize=function(e,t,r){e.attr("width",t).attr("height",r)};Ta.setRect=function(e,t,r,n,i){e.call(Ta.setPosition,t,r).call(Ta.setSize,n,i)};Ta.translatePoint=function(e,t,r,n){var i=r.c2p(e.x),a=n.c2p(e.y);if(Db(i)&&Db(a)&&t.node())t.node().nodeName==="text"?t.attr("x",i).attr("y",a):t.attr("transform",oM(i,a));else return!1;return!0};Ta.translatePoints=function(e,t,r){e.each(function(n){var i=dd.select(this);Ta.translatePoint(n,i,t,r)})};Ta.hideOutsideRangePoint=function(e,t,r,n,i,a){t.attr("display",r.isPtWithinRange(e,i)&&n.isPtWithinRange(e,a)?null:"none")};Ta.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var r=t.xaxis,n=t.yaxis;e.each(function(i){var a=i[0].trace,o=a.xcalendar,s=a.ycalendar,l=pL.traceIs(a,"bar-like")?".bartext":".point,.textpoint";e.selectAll(l).each(function(u){Ta.hideOutsideRangePoint(u,dd.select(this),r,n,o,s)})})}};Ta.crispRound=function(e,t,r){return!t||!Db(t)?r||0:e._context.staticPlot?t:t<1?1:Math.round(t)};Ta.singleLineStyle=function(e,t,r,n,i){t.style("fill","none");var a=(((e||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,s=i||a.dash||"";Yd.stroke(t,n||a.color),Ta.dashLine(t,s,o)};Ta.lineGroupStyle=function(e,t,r,n){e.style("fill","none").each(function(i){var a=(((i||[])[0]||{}).trace||{}).line||{},o=t||a.width||0,s=n||a.dash||"";dd.select(this).call(Yd.stroke,r||a.color).call(Ta.dashLine,s,o)})};Ta.dashLine=function(e,t,r){r=+r||0,t=Ta.dashStyle(t,r),e.style({"stroke-dasharray":t,"stroke-width":r+"px"})};Ta.dashStyle=function(e,t){t=+t||1;var r=Math.max(t,3);return e==="solid"?e="":e==="dot"?e=r+"px,"+r+"px":e==="dash"?e=3*r+"px,"+3*r+"px":e==="longdash"?e=5*r+"px,"+5*r+"px":e==="dashdot"?e=3*r+"px,"+r+"px,"+r+"px,"+r+"px":e==="longdashdot"&&(e=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),e};function Noe(e,t,r,n){var i=t.fillpattern,a=t.fillgradient,o=Ta.getPatternAttr,s=i&&(o(i.shape,0,"")||o(i.path,0,""));if(s){var l=o(i.bgcolor,0,null),u=o(i.fgcolor,0,null),c=i.fgopacity,f=o(i.size,0,8),h=o(i.solidity,0,.3),d=t.uid;Ta.pattern(e,"point",r,d,s,f,h,void 0,i.fillmode,l,u,c)}else if(a&&a.type!=="none"){var v=a.type,_="scatterfill-"+t.uid;if(n&&(_="legendfill-"+t.uid),!n&&(a.start!==void 0||a.stop!==void 0)){var b,p;v==="horizontal"?(b={x:a.start,y:0},p={x:a.stop,y:0}):v==="vertical"&&(b={x:0,y:a.start},p={x:0,y:a.stop}),b.x=t._xA.c2p(b.x===void 0?t._extremes.x.min[0].val:b.x,!0),b.y=t._yA.c2p(b.y===void 0?t._extremes.y.min[0].val:b.y,!0),p.x=t._xA.c2p(p.x===void 0?t._extremes.x.max[0].val:p.x,!0),p.y=t._yA.c2p(p.y===void 0?t._extremes.y.max[0].val:p.y,!0),e.call(Goe,r,_,"linear",a.colorscale,"fill",b,p,!0,!1)}else v==="horizontal"&&(v=v+"reversed"),e.call(Ta.gradient,r,_,v,a.colorscale,"fill")}else t.fillcolor&&e.call(Yd.fill,t.fillcolor)}Ta.singleFillStyle=function(e,t){var r=dd.select(e.node()),n=r.data(),i=((n[0]||[])[0]||{}).trace||{};Noe(e,i,t,!1)};Ta.fillGroupStyle=function(e,t,r){e.style("stroke-width",0).each(function(n){var i=dd.select(this);n[0].trace&&Noe(i,n[0].trace,t,r)})};var Loe=Coe();Ta.symbolNames=[];Ta.symbolFuncs=[];Ta.symbolBackOffs=[];Ta.symbolNeedLines={};Ta.symbolNoDot={};Ta.symbolNoFill={};Ta.symbolList=[];Object.keys(Loe).forEach(function(e){var t=Loe[e],r=t.n;Ta.symbolList.push(r,String(r),e,r+100,String(r+100),e+"-open"),Ta.symbolNames[r]=e,Ta.symbolFuncs[r]=t.f,Ta.symbolBackOffs[r]=t.backoff||0,t.needLine&&(Ta.symbolNeedLines[r]=!0),t.noDot?Ta.symbolNoDot[r]=!0:Ta.symbolList.push(r+200,String(r+200),e+"-dot",r+300,String(r+300),e+"-open-dot"),t.noFill&&(Ta.symbolNoFill[r]=!0)});var ist=Ta.symbolNames.length,nst="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";Ta.symbolNumber=function(e){if(Db(e))e=+e;else if(typeof e=="string"){var t=0;e.indexOf("-open")>0&&(t=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(t+=200,e=e.replace("-dot","")),e=Ta.symbolNames.indexOf(e),e>=0&&(e+=t)}return e%100>=ist||e>=400?0:Math.floor(Math.max(e,0))};function Uoe(e,t,r,n){var i=e%100;return Ta.symbolFuncs[i](t,r,n)+(e>=200?nst:"")}var Poe=Wot("~f"),Voe={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};Ta.gradient=function(e,t,r,n,i,a){var o=Voe[n];return Goe(e,t,r,o.type,i,a,o.start,o.stop,!1,o.reversed)};function Goe(e,t,r,n,i,a,o,s,l,u){var c=i.length,f;n==="linear"?f={node:"linearGradient",attrs:{x1:o.x,y1:o.y,x2:s.x,y2:s.y,gradientUnits:l?"userSpaceOnUse":"objectBoundingBox"},reversed:u}:n==="radial"&&(f={node:"radialGradient",reversed:u});for(var h=new Array(c),d=0;d=0&&e.i===void 0&&(e.i=a.i),t.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(e):e.mo===void 0?o.opacity:e.mo),n.ms2mrc){var l;e.ms==="various"||o.size==="various"?l=3:l=n.ms2mrc(e.ms),e.mrc=l,n.selectedSizeFn&&(l=e.mrc=n.selectedSizeFn(e));var u=Ta.symbolNumber(e.mx||o.symbol)||0;e.om=u%200>=100;var c=Jq(e,r),f=Kq(e,r);t.attr("d",Uoe(u,l,c,f))}var h=!1,d,v,_;if(e.so)_=s.outlierwidth,v=s.outliercolor,d=o.outliercolor;else{var b=(s||{}).width;_=(e.mlw+1||b+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in e?v=e.mlcc=n.lineScale(e.mlc):Du.isArrayOrTypedArray(s.color)?v=Yd.defaultLine:v=s.color,Du.isArrayOrTypedArray(o.color)&&(d=Yd.defaultLine,h=!0),"mc"in e?d=e.mcc=n.markerScale(e.mc):d=o.color||o.colors||"rgba(0,0,0,0)",n.selectedColorFn&&(d=n.selectedColorFn(e))}let p=e.mld||(s||{}).dash;if(p&&Ta.dashLine(t,p,_),e.om)t.call(Yd.stroke,d).style({"stroke-width":(_||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:_)+"px");var k=o.gradient,E=e.mgt;E?h=!0:E=k&&k.type,Du.isArrayOrTypedArray(E)&&(E=E[0],Voe[E]||(E=0));var T=o.pattern,L=Ta.getPatternAttr,x=T&&(L(T.shape,e.i,"")||L(T.path,e.i,""));if(E&&E!=="none"){var C=e.mgc;C?h=!0:C=k.color;var M=r.uid;h&&(M+="-"+e.i),Ta.gradient(t,i,M,E,[[0,C],[1,d]],"fill")}else if(x){var g=!1,P=T.fgcolor;!P&&a&&a.color&&(P=a.color,g=!0);var A=L(P,e.i,a&&a.color||null),z=L(T.bgcolor,e.i,null),O=T.fgopacity,U=L(T.size,e.i,8),G=L(T.solidity,e.i,.3);g=g||e.mcc||Du.isArrayOrTypedArray(T.shape)||Du.isArrayOrTypedArray(T.path)||Du.isArrayOrTypedArray(T.bgcolor)||Du.isArrayOrTypedArray(T.fgcolor)||Du.isArrayOrTypedArray(T.size)||Du.isArrayOrTypedArray(T.solidity);var Z=r.uid;g&&(Z+="-"+e.i),Ta.pattern(t,"point",i,Z,x,U,G,e.mcc,T.fillmode,z,A,O)}else Du.isArrayOrTypedArray(d)?Yd.fill(t,d[e.i]):Yd.fill(t,d);_&&Yd.stroke(t,v)}};Ta.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=Ta.tryColorscale(r,""),t.lineScale=Ta.tryColorscale(r,"line"),pL.traceIs(e,"symbols")&&(t.ms2mrc=Jot.isBubble(e)?$ot(e):function(){return(r.size||6)/2}),e.selectedpoints&&Du.extendFlat(t,Ta.makeSelectedPointStyleFns(e)),t};Ta.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},i=e.marker||{},a=r.marker||{},o=n.marker||{},s=i.opacity,l=a.opacity,u=o.opacity,c=l!==void 0,f=u!==void 0;(Du.isArrayOrTypedArray(s)||c||f)&&(t.selectedOpacityFn=function(T){var L=T.mo===void 0?i.opacity:T.mo;return T.selected?c?l:L:f?u:Boe*L});var h=i.color,d=a.color,v=o.color;(d||v)&&(t.selectedColorFn=function(T){var L=T.mcc||h;return T.selected?d||L:v||L});var _=i.size,b=a.size,p=o.size,k=b!==void 0,E=p!==void 0;return pL.traceIs(e,"symbols")&&(k||E)&&(t.selectedSizeFn=function(T){var L=T.mrc||_/2;return T.selected?k?b/2:L:E?p/2:L}),t};Ta.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},i=e.textfont||{},a=r.textfont||{},o=n.textfont||{},s=i.color,l=a.color,u=o.color;return t.selectedTextColorFn=function(c){var f=c.tc||s;return c.selected?l||f:u||(l?f:Yd.addOpacity(f,Boe))},t};Ta.selectedPointStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=Ta.makeSelectedPointStyleFns(t),n=t.marker||{},i=[];r.selectedOpacityFn&&i.push(function(a,o){a.style("opacity",r.selectedOpacityFn(o))}),r.selectedColorFn&&i.push(function(a,o){Yd.fill(a,r.selectedColorFn(o))}),r.selectedSizeFn&&i.push(function(a,o){var s=o.mx||n.symbol||0,l=r.selectedSizeFn(o);a.attr("d",Uoe(Ta.symbolNumber(s),l,Jq(o,t),Kq(o,t))),o.mrc2=l}),i.length&&e.each(function(a){for(var o=dd.select(this),s=0;s0?r:0}Ta.textPointStyle=function(e,t,r){if(e.size()){var n;if(t.selectedpoints){var i=Ta.makeSelectedTextStyleFns(t);n=i.selectedTextColorFn}var a=t.texttemplate,o=r._fullLayout;e.each(function(s){var l=dd.select(this),u=a?Du.extractOption(s,t,"txt","texttemplate"):Du.extractOption(s,t,"tx","text");if(!u&&u!==0){l.remove();return}if(a){var c=t._module.formatLabels,f=c?c(s,t,o):{},h={};Qot(h,t,s.i),u=Du.texttemplateString({data:[h,s,t._meta],fallback:t.texttemplatefallback,labels:f,locale:o._d3locale,template:u})}var d=s.tp||t.textposition,v=joe(s,t),_=n?n(s):s.tc||t.textfont.color;l.call(Ta.font,{family:s.tf||t.textfont.family,weight:s.tw||t.textfont.weight,style:s.ty||t.textfont.style,variant:s.tv||t.textfont.variant,textcase:s.tC||t.textfont.textcase,lineposition:s.tE||t.textfont.lineposition,shadow:s.tS||t.textfont.shadow,size:v,color:_}).text(u).call(gL.convertToTspans,r).call(Hoe,d,v,s.mrc)})}};Ta.selectedTextStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=Ta.makeSelectedTextStyleFns(t);e.each(function(n){var i=dd.select(this),a=r.selectedTextColorFn(n),o=n.tp||t.textposition,s=joe(n,t);Yd.fill(i,a);var l=pL.traceIs(t,"bar-like");Hoe(i,o,s,n.mrc2||n.mrc,l)})}};var Ioe=.5;Ta.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r="M"+e[0],n=[],i;for(i=1;i=l||T>=c&&T<=l)&&(L<=f&&L>=u||L>=f&&L<=u)&&(e=[T,L])}return e}Ta.applyBackoff=Zoe;Ta.makeTester=function(){var e=Du.ensureSingleById(dd.select("body"),"svg","js-plotly-tester",function(r){r.attr(Zot.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),t=Du.ensureSingle(e,"path","js-reference-point",function(r){r.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});Ta.tester=e,Ta.testref=t};Ta.savedBBoxes={};var jq=0,sst=1e4;Ta.bBox=function(e,t,r){r||(r=Roe(e));var n;if(r){if(n=Ta.savedBBoxes[r],n)return Du.extendFlat({},n)}else if(e.childNodes.length===1){var i=e.childNodes[0];if(r=Roe(i),r){var a=+i.getAttribute("x")||0,o=+i.getAttribute("y")||0,s=i.getAttribute("transform");if(!s){var l=Ta.bBox(i,!1,r);return a&&(l.left+=a,l.right+=a),o&&(l.top+=o,l.bottom+=o),l}if(r+="~"+a+"~"+o+"~"+s,n=Ta.savedBBoxes[r],n)return Du.extendFlat({},n)}}var u,c;t?u=e:(c=Ta.tester.node(),u=e.cloneNode(!0),c.appendChild(u)),dd.select(u).attr("transform",null).call(gL.positionText,0,0);var f=u.getBoundingClientRect(),h=Ta.testref.node().getBoundingClientRect();t||c.removeChild(u);var d={height:f.height,width:f.width,left:f.left-h.left,top:f.top-h.top,right:f.right-h.left,bottom:f.bottom-h.top};return jq>=sst&&(Ta.savedBBoxes={},jq=0),r&&(Ta.savedBBoxes[r]=d),jq++,Du.extendFlat({},d)};function Roe(e){var t=e.getAttribute("data-unformatted");if(t!==null)return t+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}Ta.setClipUrl=function(e,t,r){e.attr("clip-path",Yq(t,r))};function Yq(e,t){if(!e)return null;var r=t._context,n=r._exportedPlot?"":r._baseUrl||"";return n?"url('"+n+"#"+e+"')":"url(#"+e+")"}Ta.getTranslate=function(e){var t=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,r=e.attr?"attr":"getAttribute",n=e[r]("transform")||"",i=n.replace(t,function(a,o,s){return[o,s].join(" ")}).split(" ");return{x:+i[0]||0,y:+i[1]||0}};Ta.setTranslate=function(e,t,r){var n=/(\btranslate\(.*?\);?)/,i=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",o=e[i]("transform")||"";return t=t||0,r=r||0,o=o.replace(n,"").trim(),o+=oM(t,r),o=o.trim(),e[a]("transform",o),o};Ta.getScale=function(e){var t=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,r=e.attr?"attr":"getAttribute",n=e[r]("transform")||"",i=n.replace(t,function(a,o,s){return[o,s].join(" ")}).split(" ");return{x:+i[0]||1,y:+i[1]||1}};Ta.setScale=function(e,t,r){var n=/(\bscale\(.*?\);?)/,i=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",o=e[i]("transform")||"";return t=t||1,r=r||1,o=o.replace(n,"").trim(),o+="scale("+t+","+r+")",o=o.trim(),e[a]("transform",o),o};var lst=/\s*sc.*/;Ta.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,!!e){var n=t===1&&r===1?"":"scale("+t+","+r+")";e.each(function(){var i=(this.getAttribute("transform")||"").replace(lst,"");i+=n,i=i.trim(),this.setAttribute("transform",i)})}};var ust=/translate\([^)]*\)\s*$/;Ta.setTextPointsScale=function(e,t,r){e&&e.each(function(){var n,i=dd.select(this),a=i.select("text");if(a.node()){var o=parseFloat(a.attr("x")||0),s=parseFloat(a.attr("y")||0),l=(i.attr("transform")||"").match(ust);t===1&&r===1?n=[]:n=[oM(o,s),"scale("+t+","+r+")",oM(-o,-s)],l&&n.push(l),i.attr("transform",n.join(""))}})};function Kq(e,t){var r;return e&&(r=e.mf),r===void 0&&(r=t.marker&&t.marker.standoff||0),!t._geo&&!t._xA?-r:r}Ta.getMarkerStandoff=Kq;var aM=Math.atan2,Pb=Math.cos,B3=Math.sin;function Doe(e,t){var r=t[0],n=t[1];return[r*Pb(e)-n*B3(e),r*B3(e)+n*Pb(e)]}var Foe,zoe,Ooe,qoe,Wq,Xq;function Jq(e,t){var r=e.ma;r===void 0&&(r=t.marker.angle,(!r||Du.isArrayOrTypedArray(r))&&(r=0));var n,i,a=t.marker.angleref;if(a==="previous"||a==="north"){if(t._geo){var o=t._geo.project(e.lonlat);n=o[0],i=o[1]}else{var s=t._xA,l=t._yA;if(s&&l)n=s.c2p(e.x),i=l.c2p(e.y);else return 90}if(t._geo){var u=e.lonlat[0],c=e.lonlat[1],f=t._geo.project([u,c+1e-5]),h=t._geo.project([u+1e-5,c]),d=aM(h[1]-i,h[0]-n),v=aM(f[1]-i,f[0]-n),_;if(a==="north")_=r/180*Math.PI;else if(a==="previous"){var b=u/180*Math.PI,p=c/180*Math.PI,k=Foe/180*Math.PI,E=zoe/180*Math.PI,T=k-b,L=Pb(E)*B3(T),x=B3(E)*Pb(p)-Pb(E)*B3(p)*Pb(T);_=-aM(L,x)-Math.PI,Foe=u,zoe=c}var C=Doe(d,[Pb(_),0]),M=Doe(v,[B3(_),0]);r=aM(C[1]+M[1],C[0]+M[0])/Math.PI*180,a==="previous"&&!(Xq===t.uid&&e.i===Wq+1)&&(r=null)}if(a==="previous"&&!t._geo)if(Xq===t.uid&&e.i===Wq+1&&Db(n)&&Db(i)){var g=n-Ooe,P=i-qoe,A=t.line&&t.line.shape||"",z=A.slice(A.length-1);z==="h"&&(P=0),z==="v"&&(g=0),r+=aM(P,g)/Math.PI*180+90}else r=null}return Ooe=n,qoe=i,Wq=e.i,Xq=t.uid,r}Ta.getMarkerAngle=Jq});var zb=ye(($nr,Qoe)=>{"use strict";var N3=Oa(),cst=Eo(),fst=Mc(),$q=qa(),Fb=Dr(),Koe=Fb.strTranslate,mL=So(),yL=ka(),U3=Zl(),Joe=X1(),hst=Dh().OPPOSITE_SIDE,$oe=/ [XY][0-9]* /,Qq=1.6,eB=1.6;function dst(e,t,r){var n=e._fullLayout,i=r.propContainer,a=r.propName,o=r.placeholder,s=r.traceIndex,l=r.avoid||{},u=r.attributes,c=r.transform,f=r.containerGroup,h=1,d=i.title,v=(d&&d.text?d.text:"").trim(),_=!1,b=d&&d.font?d.font:{},p=b.family,k=b.size,E=b.color,T=b.weight,L=b.style,x=b.variant,C=b.textcase,M=b.lineposition,g=b.shadow,P=r.subtitlePropName,A=!!P,z=r.subtitlePlaceholder,O=(i.title||{}).subtitle||{text:"",font:{}},U=(O.text||"").trim(),G=!1,Z=1,j=O.font,N=j.family,H=j.size,re=j.color,oe=j.weight,_e=j.style,Ce=j.variant,Le=j.textcase,ge=j.lineposition,ie=j.shadow,Se;a==="title.text"?Se="titleText":a.indexOf("axis")!==-1?Se="axisTitleText":a.indexOf("colorbar")!==-1&&(Se="colorbarTitleText");var Ee=e._context.edits[Se];function Ae(Nt,$t){return Nt===void 0||$t===void 0?!1:Nt.replace($oe," % ")===$t.replace($oe," % ")}v===""?h=0:Ae(v,o)&&(Ee||(v=""),h=.2,_=!0),A&&(U===""?Z=0:Ae(U,z)&&(Ee||(U=""),Z=.2,G=!0)),r._meta?v=Fb.templateString(v,r._meta):n._meta&&(v=Fb.templateString(v,n._meta));var Be=v||U||Ee,Pe;f||(f=Fb.ensureSingle(n._infolayer,"g","g-"+t),Pe=n._hColorbarMoveTitle);var me=f.selectAll("text."+t).data(Be?[0]:[]);me.enter().append("text"),me.text(v).attr("class",t),me.exit().remove();var De=null,ce=t+"-subtitle",je=U||Ee;if(A&&(De=f.selectAll("text."+ce).data(je?[0]:[]),De.enter().append("text"),De.text(U).attr("class",ce),De.exit().remove()),!Be)return f;function lt(Nt,$t){Fb.syncOrAsync([pt,Vt],{title:Nt,subtitle:$t})}function pt(Nt){var $t=Nt.title,sr=Nt.subtitle,Tr;!c&&Pe&&(c={}),c?(Tr="",c.rotate&&(Tr+="rotate("+[c.rotate,u.x,u.y]+")"),(c.offset||Pe)&&(Tr+=Koe(0,(c.offset||0)-(Pe||0)))):Tr=null,$t.attr("transform",Tr);function fr(It){if(It){var mt=N3.select(It.node().parentNode).select("."+ce);if(!mt.empty()){var er=It.node().getBBox();if(er.height){var lr=er.y+er.height+Qq*H;mt.attr("y",lr)}}}}if($t.style("opacity",h*yL.opacity(E)).call(mL.font,{color:yL.rgb(E),size:N3.round(k,2),family:p,weight:T,style:L,variant:x,textcase:C,shadow:g,lineposition:M}).attr(u).call(U3.convertToTspans,e,fr),sr&&!sr.empty()){var $e=f.select("."+t+"-math-group"),St=$t.node().getBBox(),Qt=$e.node()?$e.node().getBBox():void 0,Gt=Qt?Qt.y+Qt.height+Qq*H:St.y+St.height+eB*H,_t=Fb.extendFlat({},u,{y:Gt});sr.attr("transform",Tr),sr.style("opacity",Z*yL.opacity(re)).call(mL.font,{color:yL.rgb(re),size:N3.round(H,2),family:N,weight:oe,style:_e,variant:Ce,textcase:Le,shadow:ie,lineposition:ge}).attr(_t).call(U3.convertToTspans,e)}return fst.previousPromises(e)}function Vt(Nt){var $t=Nt.title,sr=N3.select($t.node().parentNode);if(l&&l.selection&&l.side&&v){sr.attr("transform",null);var Tr=hst[l.side],fr=l.side==="left"||l.side==="top"?-1:1,$e=cst(l.pad)?l.pad:2,St=mL.bBox(sr.node()),Qt={t:0,b:0,l:0,r:0},Gt=e._fullLayout._reservedMargin;for(var _t in Gt)for(var It in Gt[_t]){var mt=Gt[_t][It];Qt[It]=Math.max(Qt[It],mt)}var er={left:Qt.l,top:Qt.t,right:n.width-Qt.r,bottom:n.height-Qt.b},lr=l.maxShift||fr*(er[l.side]-St[l.side]),wr=0;if(lr<0)wr=lr;else{var Lr=l.offsetLeft||0,ti=l.offsetTop||0;St.left-=Lr,St.right-=Lr,St.top-=ti,St.bottom-=ti,l.selection.each(function(){var Vr=mL.bBox(this);Fb.bBoxIntersect(St,Vr,$e)&&(wr=Math.max(wr,fr*(Vr[l.side]-St[Tr])+$e))}),wr=Math.min(lr,wr),i._titleScoot=Math.abs(wr)}if(wr>0||lr<0){var Br={left:[-wr,0],right:[wr,0],top:[0,-wr],bottom:[0,wr]}[l.side];sr.attr("transform",Koe(Br[0],Br[1]))}}}me.call(lt,De);function ot(Nt,$t){Nt.text($t).on("mouseover.opacity",function(){N3.select(this).transition().duration(Joe.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){N3.select(this).transition().duration(Joe.HIDE_PLACEHOLDER).style("opacity",0)})}if(Ee&&(v?me.on(".opacity",null):(ot(me,o),_=!0),me.call(U3.makeEditable,{gd:e}).on("edit",function(Nt){s!==void 0?$q.call("_guiRestyle",e,a,Nt,s):$q.call("_guiRelayout",e,a,Nt)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(lt)}).on("input",function(Nt){this.text(Nt||" ").call(U3.positionText,u.x,u.y)}),A)){if(A&&!v){var ut=me.node().getBBox(),Wt=ut.y+ut.height+eB*H;De.attr("y",Wt)}U?De.on(".opacity",null):(ot(De,z),G=!0),De.call(U3.makeEditable,{gd:e}).on("edit",function(Nt){$q.call("_guiRelayout",e,"title.subtitle.text",Nt)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(lt)}).on("input",function(Nt){this.text(Nt||" ").call(U3.positionText,De.attr("x"),De.attr("y"))})}return me.classed("js-placeholder",_),De&&!De.empty()&&De.classed("js-placeholder",G),f}Qoe.exports={draw:dst,SUBTITLE_PADDING_EM:eB,SUBTITLE_PADDING_MATHJAX_EM:Qq}});var xm=ye((Qnr,nse)=>{"use strict";var vst=Oa(),pst=f3().utcFormat,yc=Dr(),gst=yc.numberFormat,ym=Eo(),f_=yc.cleanNumber,mst=yc.ms2DateTime,ese=yc.dateTime2ms,_m=yc.ensureNumber,tse=yc.isArrayOrTypedArray,h_=fs(),_L=h_.FP_SAFE,Sg=h_.BADNUM,yst=h_.LOG_CLIP,_st=h_.ONEWEEK,xL=h_.ONEDAY,bL=h_.ONEHOUR,rse=h_.ONEMIN,ise=h_.ONESEC,wL=hf(),SL=Rh(),TL=SL.HOUR_PATTERN,AL=SL.WEEKDAY_PATTERN;function sM(e){return Math.pow(10,e)}function tB(e){return e!=null}nse.exports=function(t,r){r=r||{};var n=t._id||"x",i=n.charAt(0);function a(T,L){if(T>0)return Math.log(T)/Math.LN10;if(T<=0&&L&&t.range&&t.range.length===2){var x=t.range[0],C=t.range[1];return .5*(x+C-2*yst*Math.abs(x-C))}else return Sg}function o(T,L,x,C){if((C||{}).msUTC&&ym(T))return+T;var M=ese(T,x||t.calendar);if(M===Sg)if(ym(T)){T=+T;var g=Math.floor(yc.mod(T+.05,1)*10),P=Math.round(T-g/10);M=ese(new Date(P))+g/10}else return Sg;return M}function s(T,L,x){return mst(T,L,x||t.calendar)}function l(T){return t._categories[Math.round(T)]}function u(T){if(tB(T)){if(t._categoriesMap===void 0&&(t._categoriesMap={}),t._categoriesMap[T]!==void 0)return t._categoriesMap[T];t._categories.push(typeof T=="number"?String(T):T);var L=t._categories.length-1;return t._categoriesMap[T]=L,L}return Sg}function c(T,L){for(var x=new Array(L),C=0;Ct.range[1]&&(x=!x);for(var C=x?-1:1,M=C*T,g=0,P=0;Pz)g=P+1;else{g=M<(A+z)/2?P:P+1;break}}var O=t._B[g]||0;return isFinite(O)?v(T,t._m2,O):0},p=function(T){var L=t._rangebreaks.length;if(!L)return _(T,t._m,t._b);for(var x=0,C=0;Ct._rangebreaks[C].pmax&&(x=C+1);return _(T,t._m2,t._B[x])}}t.c2l=t.type==="log"?a:_m,t.l2c=t.type==="log"?sM:_m,t.l2p=b,t.p2l=p,t.c2p=t.type==="log"?function(T,L){return b(a(T,L))}:b,t.p2c=t.type==="log"?function(T){return sM(p(T))}:p,["linear","-"].indexOf(t.type)!==-1?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=f_,t.c2d=t.c2r=t.l2d=t.l2r=_m,t.d2p=t.r2p=function(T){return t.l2p(f_(T))},t.p2d=t.p2r=p,t.cleanPos=_m):t.type==="log"?(t.d2r=t.d2l=function(T,L){return a(f_(T),L)},t.r2d=t.r2c=function(T){return sM(f_(T))},t.d2c=t.r2l=f_,t.c2d=t.l2r=_m,t.c2r=a,t.l2d=sM,t.d2p=function(T,L){return t.l2p(t.d2r(T,L))},t.p2d=function(T){return sM(p(T))},t.r2p=function(T){return t.l2p(f_(T))},t.p2r=p,t.cleanPos=_m):t.type==="date"?(t.d2r=t.r2d=yc.identity,t.d2c=t.r2c=t.d2l=t.r2l=o,t.c2d=t.c2r=t.l2d=t.l2r=s,t.d2p=t.r2p=function(T,L,x){return t.l2p(o(T,0,x))},t.p2d=t.p2r=function(T,L,x){return s(p(T),L,x)},t.cleanPos=function(T){return yc.cleanDate(T,Sg,t.calendar)}):t.type==="category"?(t.d2c=t.d2l=u,t.r2d=t.c2d=t.l2d=l,t.d2r=t.d2l_noadd=h,t.r2c=function(T){var L=d(T);return L!==void 0?L:t.fraction2r(.5)},t.l2r=t.c2r=_m,t.r2l=d,t.d2p=function(T){return t.l2p(t.r2c(T))},t.p2d=function(T){return l(p(T))},t.r2p=t.d2p,t.p2r=p,t.cleanPos=function(T){return typeof T=="string"&&T!==""?T:_m(T)}):t.type==="multicategory"&&(t.r2d=t.c2d=t.l2d=l,t.d2r=t.d2l_noadd=h,t.r2c=function(T){var L=h(T);return L!==void 0?L:t.fraction2r(.5)},t.r2c_just_indices=f,t.l2r=t.c2r=_m,t.r2l=h,t.d2p=function(T){return t.l2p(t.r2c(T))},t.p2d=function(T){return l(p(T))},t.r2p=t.d2p,t.p2r=p,t.cleanPos=function(T){return Array.isArray(T)||typeof T=="string"&&T!==""?T:_m(T)},t.setupMultiCategory=function(T){var L=t._traceIndices,x,C,M=t._matchGroup;if(M&&t._categories.length===0){for(var g in M)if(g!==n){var P=r[wL.id2name(g)];L=L.concat(P._traceIndices)}}var A=[[0,{}],[0,{}]],z=[];for(x=0;xP[1]&&(C[g?0:1]=x),C[0]===C[1]){var A=t.l2r(L),z=t.l2r(x);if(L!==void 0){var O=A+1;x!==void 0&&(O=Math.min(O,z)),C[g?1:0]=O}if(x!==void 0){var U=z+1;L!==void 0&&(U=Math.max(U,A)),C[g?0:1]=U}}}},t.cleanRange=function(T,L){t._cleanRange(T,L),t.limitRange(T)},t._cleanRange=function(T,L){L||(L={}),T||(T="range");var x=yc.nestedProperty(t,T).get(),C,M;if(t.type==="date"?M=yc.dfltRange(t.calendar):i==="y"?M=SL.DFLTRANGEY:t._name==="realaxis"?M=[0,1]:M=L.dfltRange||SL.DFLTRANGEX,M=M.slice(),(t.rangemode==="tozero"||t.rangemode==="nonnegative")&&(M[0]=0),!x||x.length!==2){yc.nestedProperty(t,T).set(M);return}var g=x[0]===null,P=x[1]===null;for(t.type==="date"&&!t.autorange&&(x[0]=yc.cleanDate(x[0],Sg,t.calendar),x[1]=yc.cleanDate(x[1],Sg,t.calendar)),C=0;C<2;C++)if(t.type==="date"){if(!yc.isDateTime(x[C],t.calendar)){t[T]=M;break}if(t.r2l(x[0])===t.r2l(x[1])){var A=yc.constrain(t.r2l(x[0]),yc.MIN_MS+1e3,yc.MAX_MS-1e3);x[0]=t.l2r(A-1e3),x[1]=t.l2r(A+1e3);break}}else{if(!ym(x[C]))if(!(g||P)&&ym(x[1-C]))x[C]=x[1-C]*(C?10:.1);else{t[T]=M;break}if(x[C]<-_L?x[C]=-_L:x[C]>_L&&(x[C]=_L),x[0]===x[1]){var z=Math.max(1,Math.abs(x[0]*1e-6));x[0]-=z,x[1]+=z}}},t.setScale=function(T){var L=r._size;if(t.overlaying){var x=wL.getFromId({_fullLayout:r},t.overlaying);t.domain=x.domain}var C=T&&t._r?"_r":"range",M=t.calendar;t.cleanRange(C);var g=t.r2l(t[C][0],M),P=t.r2l(t[C][1],M),A=i==="y";if(A?(t._offset=L.t+(1-t.domain[1])*L.h,t._length=L.h*(t.domain[1]-t.domain[0]),t._m=t._length/(g-P),t._b=-t._m*P):(t._offset=L.l+t.domain[0]*L.w,t._length=L.w*(t.domain[1]-t.domain[0]),t._m=t._length/(P-g),t._b=-t._m*g),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks){var z,O;if(t._rangebreaks=t.locateBreaks(Math.min(g,P),Math.max(g,P)),t._rangebreaks.length){for(z=0;zP&&(U=!U),U&&t._rangebreaks.reverse();var G=U?-1:1;for(t._m2=G*t._length/(Math.abs(P-g)-t._lBreaks),t._B.push(-t._m2*(A?P:g)),z=0;zM&&(M+=7,gM&&(M+=24,g=C&&g=C&&T=ie.min&&(_eie.max&&(ie.max=Ce),Le=!1)}Le&&P.push({min:_e,max:Ce})}};for(x=0;x{"use strict";var ase=Eo(),rB=Dr(),xst=fs().BADNUM,ML=rB.isArrayOrTypedArray,bst=rB.isDateTime,wst=rB.cleanNumber,ose=Math.round;lse.exports=function(t,r,n){var i=t,a=n.noMultiCategory;if(ML(i)&&!i.length)return"-";if(!a&&Est(i))return"multicategory";if(a&&Array.isArray(i[0])){for(var o=[],s=0;sa*2}function sse(e){return Math.max(1,(e-1)/1e3)}function Mst(e,t){for(var r=e.length,n=sse(r),i=0,a=0,o={},s=0;si*2}function Est(e){return ML(e[0])&&ML(e[1])}});var Mg=ye((tar,gse)=>{"use strict";var kst=Oa(),hse=Eo(),d_=Dr(),EL=fs().FP_SAFE,Cst=qa(),Lst=So(),dse=hf(),Pst=dse.getFromId,Ist=dse.isLinked;gse.exports={applyAutorangeOptions:pse,getAutoRange:iB,makePadFn:nB,doAutoRange:Dst,findExtremes:Fst,concatExtremes:sB};function iB(e,t){var r,n,i=[],a=e._fullLayout,o=nB(a,t,0),s=nB(a,t,1),l=sB(e,t),u=l.min,c=l.max;if(u.length===0||c.length===0)return d_.simpleMap(t.range,t.r2l);var f=u[0].val,h=c[0].val;for(r=1;r0&&(P=E-o(x)-s(C),P>T?A/P>L&&(M=x,g=C,L=A/P):A/E>L&&(M={val:x.val,nopad:1},g={val:C.val,nopad:1},L=A/E));function z(j,N){return Math.max(j,s(N))}if(f===h){var O=f-1,U=f+1;if(p)if(f===0)i=[0,1];else{var G=(f>0?c:u).reduce(z,0),Z=f/(1-Math.min(.5,G/E));i=f>0?[0,Z]:[Z,0]}else k?i=[Math.max(0,O),Math.max(1,U)]:i=[O,U]}else p?(M.val>=0&&(M={val:0,nopad:1}),g.val<=0&&(g={val:0,nopad:1})):k&&(M.val-L*o(M)<0&&(M={val:0,nopad:1}),g.val<=0&&(g={val:1,nopad:1})),L=(g.val-M.val-use(t,x.val,C.val))/(E-o(M)-s(g)),i=[M.val-L*o(M),g.val+L*s(g)];return i=pse(i,t),t.limitRange&&t.limitRange(),v&&i.reverse(),d_.simpleMap(i,t.l2r||Number)}function use(e,t,r){var n=0;if(e.rangebreaks)for(var i=e.locateBreaks(t,r),a=0;a0?r.ppadplus:r.ppadminus)||r.ppad||0),x=T((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),C=T(r.vpadplus||r.vpad),M=T(r.vpadminus||r.vpad);if(!u){if(k=1/0,E=-1/0,l)for(f=0;f0&&(k=h),h>E&&h-EL&&(k=h),h>E&&h=A;f--)P(f);return{min:n,max:i,opts:r}}function aB(e,t,r,n){vse(e,t,r,n,zst)}function oB(e,t,r,n){vse(e,t,r,n,Ost)}function vse(e,t,r,n,i){for(var a=n.tozero,o=n.extrapad,s=!0,l=0;l=r&&(u.extrapad||!o)){s=!1;break}else i(t,u.val)&&u.pad<=r&&(o||!u.extrapad)&&(e.splice(l,1),l--)}if(s){var c=a&&t===0;e.push({val:t,pad:c?0:r,extrapad:c?!1:o})}}function fse(e){return hse(e)&&Math.abs(e)=t}function qst(e,t){var r=t.autorangeoptions;return r&&r.minallowed!==void 0&&kL(t,r.minallowed,r.maxallowed)?r.minallowed:r&&r.clipmin!==void 0&&kL(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}function Bst(e,t){var r=t.autorangeoptions;return r&&r.maxallowed!==void 0&&kL(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&r.clipmax!==void 0&&kL(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}function kL(e,t,r){return t!==void 0&&r!==void 0?(t=e.d2l(t),r=e.d2l(r),t=l&&(a=l,r=l),o<=l&&(o=l,n=l)}}return r=qst(r,t),n=Bst(n,t),[r,n]}});var ho=ye((iar,Bse)=>{"use strict";var w0=Oa(),zh=Eo(),G3=Mc(),uM=qa(),Wo=Dr(),H3=Wo.strTranslate,Ob=Zl(),Nst=zb(),cM=ka(),Xp=So(),Ust=Rd(),mse=Pq(),rar=Rh(),Kd=fs(),Vst=Kd.ONEMAXYEAR,PL=Kd.ONEAVGYEAR,IL=Kd.ONEMINYEAR,Gst=Kd.ONEMAXQUARTER,fB=Kd.ONEAVGQUARTER,RL=Kd.ONEMINQUARTER,Hst=Kd.ONEMAXMONTH,j3=Kd.ONEAVGMONTH,DL=Kd.ONEMINMONTH,Zp=Kd.ONEWEEK,Ov=Kd.ONEDAY,v_=Ov/2,wm=Kd.ONEHOUR,fM=Kd.ONEMIN,FL=Kd.ONESEC,jst=Kd.ONEMILLI,Wst=Kd.ONEMICROSEC,qb=Kd.MINUS_SIGN,OL=Kd.BADNUM,hB={K:"zeroline"},dB={K:"gridline",L:"path"},vB={K:"minor-gridline",L:"path"},kse={K:"tick",L:"path"},yse={K:"tick",L:"text"},_se={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},qL=Dh(),lM=qL.MID_SHIFT,Bb=qL.CAP_SHIFT,hM=qL.LINE_SPACING,Xst=qL.OPPOSITE_SIDE,zL=3,Jn=Bse.exports={};Jn.setConvert=xm();var Zst=V3(),Tm=hf(),Yst=Tm.idSort,Kst=Tm.isLinked;Jn.id2name=Tm.id2name;Jn.name2id=Tm.name2id;Jn.cleanId=Tm.cleanId;Jn.list=Tm.list;Jn.listIds=Tm.listIds;Jn.getFromId=Tm.getFromId;Jn.getFromTrace=Tm.getFromTrace;var Cse=Mg();Jn.getAutoRange=Cse.getAutoRange;Jn.findExtremes=Cse.findExtremes;var Jst=1e-4;function yB(e){var t=(e[1]-e[0])*Jst;return[e[0]-t,e[1]+t]}Jn.coerceRef=function(e,t,r,n,i,a){var o=n.charAt(n.length-1),s=r._fullLayout._subplots[o+"axis"],l=n+"ref",u={};return i||(i=s[0]||(typeof a=="string"?a:a[0])),a||(a=i),s=s.concat(s.map(function(c){return c+" domain"})),u[l]={valType:"enumerated",values:s.concat(a?typeof a=="string"?[a]:a:[]),dflt:i},Wo.coerce(e,t,u,l)};Jn.coerceRefArray=function(e,t,r,n,i,a,o){let s=n.charAt(n.length-1);var l=r._fullLayout._subplots[s+"axis"];let u=n+"ref";var c=e[u];i||(i=l[0]||(typeof a=="string"?a:a[0])),l=l.concat(l.map(h=>h+" domain")),l=l.concat(a||[]),c.length>o?(Wo.warn("Array attribute "+u+" has more entries than expected, truncating to "+o),c=c.slice(0,o)):c.length2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0))};Jn.saveRangeInitial=function(e,t){for(var r=Jn.list(e,"",!0),n=!1,i=0;if*.3||u(n)||u(i))){var h=r.dtick/2;e+=e+ho){var s=Number(r.slice(1));a.exactYears>o&&s%12===0?e=Jn.tickIncrement(e,"M6","reverse")+Ov*1.5:a.exactMonths>o?e=Jn.tickIncrement(e,"M1","reverse")+Ov*15.5:e-=v_;var l=Jn.tickIncrement(e,r);if(l<=n)return l}return e}Jn.prepMinorTicks=function(e,t,r){if(!t.minor.dtick){delete e.dtick;var n=t.dtick&&zh(t._tmin),i;if(n){var a=Jn.tickIncrement(t._tmin,t.dtick,!0);i=[t._tmin,a*.99+t._tmin*.01]}else{var o=Wo.simpleMap(t.range,t.r2l);i=[o[0],.8*o[0]+.2*o[1]]}if(e.range=Wo.simpleMap(i,t.l2r),e._isMinor=!0,Jn.prepTicks(e,r),n){var s=zh(t.dtick),l=zh(e.dtick),u=s?t.dtick:+t.dtick.substring(1),c=l?e.dtick:+e.dtick.substring(1);s&&l?lB(u,c)?u===2*Zp&&c===2*Ov&&(e.dtick=Zp):u===2*Zp&&c===3*Ov?e.dtick=Zp:u===Zp&&!(t._input.minor||{}).nticks?e.dtick=Ov:wse(u/c,2.5)?e.dtick=u/2:e.dtick=u:String(t.dtick).charAt(0)==="M"?l?e.dtick="M1":lB(u,c)?u>=12&&c===2&&(e.dtick="M3"):e.dtick=t.dtick:String(e.dtick).charAt(0)==="L"?String(t.dtick).charAt(0)==="L"?lB(u,c)||(e.dtick=wse(u/c,2.5)?t.dtick/2:t.dtick):e.dtick="D1":e.dtick==="D2"&&+t.dtick>1&&(e.dtick=1)}e.range=t.range}t.minor._tick0Init===void 0&&(e.tick0=t.tick0)};function lB(e,t){return Math.abs((e/t+.5)%1-.5)<.001}function wse(e,t){return Math.abs(e/t-1)<.001}Jn.prepTicks=function(e,t){var r=Wo.simpleMap(e.range,e.r2l,void 0,void 0,t);if(e.tickmode==="auto"||!e.dtick){var n=e.nticks,i;n||(e.type==="category"||e.type==="multicategory"?(i=e.tickfont?Wo.bigFont(e.tickfont.size||12):15,n=e._length/i):(i=e._id.charAt(0)==="y"?40:80,n=Wo.constrain(e._length/i,4,9)+1),e._name==="radialaxis"&&(n*=2)),e.minor&&e.minor.tickmode!=="array"||e.tickmode==="array"&&(n*=100),e._roughDTick=Math.abs(r[1]-r[0])/n,Jn.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick0?(a=n-1,o=n):(a=n,o=n);var s=e[a].value,l=e[o].value,u=Math.abs(l-s),c=r||u,f=0;c>=IL?u>=IL&&u<=Vst?f=u:f=PL:r===fB&&c>=RL?u>=RL&&u<=Gst?f=u:f=fB:c>=DL?u>=DL&&u<=Hst?f=u:f=j3:r===Zp&&c>=Zp?f=Zp:c>=Ov?f=Ov:r===v_&&c>=v_?f=v_:r===wm&&c>=wm&&(f=wm);var h;f>=u&&(f=u,h=!0);var d=i+f;if(t.rangebreaks&&f>0){for(var v=84,_=0,b=0;bZp&&(f=u)}(f>0||n===0)&&(e[n].periodX=i+f/2)}}Jn.calcTicks=function(t,r){for(var n=t.type,i=t.calendar,a=t.ticklabelstep,o=t.ticklabelmode==="period",s=t.range[0]>t.range[1],l=!t.ticklabelindex||Wo.isArrayOrTypedArray(t.ticklabelindex)?t.ticklabelindex:[t.ticklabelindex],u=Wo.simpleMap(t.range,t.r2l,void 0,void 0,r),c=u[1]=(E?0:1);T--){var L=!T;T?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var x=T?t:Wo.extendFlat({},t,t.minor);if(L?Jn.prepMinorTicks(x,t,r):Jn.prepTicks(x,r),x.tickmode==="array"){T?(b=[],v=Tse(t,!L)):(p=[],_=Tse(t,!L));continue}if(x.tickmode==="sync"){b=[],v=ilt(t);continue}var C=yB(u),M=C[0],g=C[1],P=zh(x.dtick),A=n==="log"&&!(P||x.dtick.charAt(0)==="L"),z=Jn.tickFirst(x,r);if(T){if(t._tmin=z,z=g:U<=g;U=Jn.tickIncrement(U,j,c,i)){if(T&&G++,x.rangebreaks&&!c){if(U=h)break}if(b.length>d||U===O)break;O=U;var N={value:U};T?(A&&U!==(U|0)&&(N.simpleLabel=!0),a>1&&G%a&&(N.skipLabel=!0),b.push(N)):(N.minor=!0,p.push(N))}}if(!p||p.length<2)l=!1;else{var H=(p[1].value-p[0].value)*(s?-1:1);klt(H,t.tickformat)||(l=!1)}if(!l)k=b;else{var re=b.concat(p);o&&b.length&&(re=re.slice(1)),re=re.sort(function(Wt,Nt){return Wt.value-Nt.value}).filter(function(Wt,Nt,$t){return Nt===0||Wt.value!==$t[Nt-1].value});var oe=re.map(function(Wt,Nt){return Wt.minor===void 0&&!Wt.skipLabel?Nt:null}).filter(function(Wt){return Wt!==null});oe.forEach(function(Wt){l.map(function(Nt){var $t=Wt+Nt;$t>=0&&$t-1;Be--){if(b[Be].drop){b.splice(Be,1);continue}b[Be].value=cB(b[Be].value,t);var ce=t.c2p(b[Be].value);(Pe?De>ce-me:Deh||srh&&($t.periodX=h),sri&&hPL)t/=PL,n=i(10),e.dtick="M"+12*bm(t,n,CL);else if(a>j3)t/=j3,e.dtick="M"+bm(t,1,Ase);else if(a>Ov){if(e.dtick=bm(t,Ov,e._hasDayOfWeekBreaks?[1,2,7,14]:nlt),!r){var o=Jn.getTickFormat(e),s=e.ticklabelmode==="period";s&&(e._rawTick0=e.tick0),/%[uVW]/.test(o)?e.tick0=Wo.dateTick0(e.calendar,2):e.tick0=Wo.dateTick0(e.calendar,1),s&&(e._dowTick0=e.tick0)}}else a>wm?e.dtick=bm(t,wm,Ase):a>fM?e.dtick=bm(t,fM,Sse):a>FL?e.dtick=bm(t,FL,Sse):(n=i(10),e.dtick=bm(t,n,CL))}else if(e.type==="log"){e.tick0=0;var l=Wo.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(l[1]-l[0])<1){var u=1.5*Math.abs((l[1]-l[0])/t);t=Math.abs(Math.pow(10,l[1])-Math.pow(10,l[0]))/u,n=i(10),e.dtick="L"+bm(t,n,CL)}else e.dtick=t>.3?"D2":"D1"}else e.type==="category"||e.type==="multicategory"?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):wB(e)?(e.tick0=0,n=1,e.dtick=bm(t,n,alt)):(e.tick0=0,n=i(10),e.dtick=bm(t,n,CL));if(e.dtick===0&&(e.dtick=1),!zh(e.dtick)&&typeof e.dtick!="string"){var c=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(c)}};function Rse(e){var t=e.dtick;if(e._tickexponent=0,!zh(t)&&typeof t!="string"&&(t=1),(e.type==="category"||e.type==="multicategory")&&(e._tickround=null),e.type==="date"){var r=e.r2l(e.tick0),n=e.l2r(r).replace(/(^-|i)/g,""),i=n.length;if(String(t).charAt(0)==="M")i>10||n.slice(5)!=="01-01"?e._tickround="d":e._tickround=+t.slice(1)%12===0?"y":"m";else if(t>=Ov&&i<=10||t>=Ov*15)e._tickround="d";else if(t>=fM&&i<=16||t>=wm)e._tickround="M";else if(t>=FL&&i<=19||t>=fM)e._tickround="S";else{var a=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(i,a)-20,e._tickround<0&&(e._tickround=4)}}else if(zh(t)||t.charAt(0)==="L"){var o=e.range.map(e.r2d||Number);zh(t)||(t=Number(t.slice(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var s=Math.max(Math.abs(o[0]),Math.abs(o[1])),l=Math.floor(Math.log(s)/Math.LN10+.01),u=e.minexponent===void 0?3:e.minexponent;Math.abs(l)>u&&(W3(e.exponentformat)&&e.exponentformat!=="SI extended"&&!_B(l)||W3(e.exponentformat)&&e.exponentformat==="SI extended"&&!xB(l)?e._tickexponent=3*Math.round((l-1)/3):e._tickexponent=l)}else e._tickround=null}Jn.tickIncrement=function(e,t,r,n){var i=r?-1:1;if(zh(t))return Wo.increment(e,i*t);var a=t.charAt(0),o=i*Number(t.slice(1));if(a==="M")return Wo.incrementMonth(e,o,n);if(a==="L")return Math.log(Math.pow(10,e)+o)/Math.LN10;if(a==="D"){var s=t==="D2"?Ise:Pse,l=e+i*.01,u=Wo.roundUp(Wo.mod(l,1),s,r);return Math.floor(l)+Math.log(w0.round(Math.pow(10,u),1))/Math.LN10}throw"unrecognized dtick "+String(t)};Jn.tickFirst=function(e,t){var r=e.r2l||Number,n=Wo.simpleMap(e.range,r,void 0,void 0,t),i=n[1]=0&&p<=e._length?b:null};if(a&&Wo.isArrayOrTypedArray(e.ticktext)){var f=Wo.simpleMap(e.range,e.r2l),h=(Math.abs(f[1]-f[0])-(e._lBreaks||0))/1e4;for(u=0;u"+s;else{var u=vM(e),c=e._trueSide||e.side;(!u&&c==="top"||u&&c==="bottom")&&(o+="
")}t.text=o}function slt(e,t,r,n,i){var a=e.dtick,o=t.x,s=e.tickformat,l=typeof a=="string"&&a.charAt(0);if(i==="never"&&(i=""),n&&l!=="L"&&(a="L3",l="L"),s||l==="L")t.text=dM(Math.pow(10,o),e,i,n);else if(zh(a)||l==="D"&&(e.minorloglabels==="complete"||Wo.mod(o+.01,1)<.1)){var u;e.minorloglabels==="complete"&&!(Wo.mod(o+.01,1)<.1)&&(u=!0,t.fontSize*=.75);var c=Math.pow(10,o).toExponential(0),f=c.split("e"),h=+f[1],d=Math.abs(h),v=e.exponentformat;v==="power"||W3(v)&&v!=="SI extended"&&_B(h)||W3(v)&&v==="SI extended"&&xB(h)?(t.text=f[0],d>0&&(t.text+="x10"),t.text==="1x10"&&(t.text="10"),h!==0&&h!==1&&(t.text+=""+(h>0?"":qb)+d+""),t.fontSize*=1.25):(v==="e"||v==="E")&&d>2?t.text=f[0]+v+(h>0?"+":qb)+d:(t.text=dM(Math.pow(10,o),e,"","fakehover"),a==="D1"&&e._id.charAt(0)==="y"&&(t.dy-=t.fontSize/6))}else if(l==="D")t.text=e.minorloglabels==="none"?"":String(Math.round(Math.pow(10,Wo.mod(o,1)))),t.fontSize*=.75;else throw"unrecognized dtick "+String(a);if(e.dtick==="D1"){var _=String(t.text).charAt(0);(_==="0"||_==="1")&&(e._id.charAt(0)==="y"?t.dx-=t.fontSize/4:(t.dy+=t.fontSize/2,t.dx+=(e.range[1]>e.range[0]?1:-1)*t.fontSize*(o<0?.5:.25)))}}function llt(e,t){var r=e._categories[Math.round(t.x)];r===void 0&&(r=""),t.text=String(r)}function ult(e,t,r){var n=Math.round(t.x),i=e._categories[n]||[],a=i[1]===void 0?"":String(i[1]),o=i[0]===void 0?"":String(i[0]);r?t.text=o+" - "+a:(t.text=a,t.text2=o)}function clt(e,t,r,n,i){i==="never"?i="":e.showexponent==="all"&&Math.abs(t.x/e.dtick)<1e-6&&(i="hide"),t.text=dM(t.x,e,i,n)}function flt(e,t,r,n,i){if(e.thetaunit==="radians"&&!r){var a=t.x/180;if(a===0)t.text="0";else{var o=hlt(a);if(o[1]>=100)t.text=dM(Wo.deg2rad(t.x),e,i,n);else{var s=t.x<0;o[1]===1?o[0]===1?t.text="\u03C0":t.text=o[0]+"\u03C0":t.text=["",o[0],"","\u2044","",o[1],"","\u03C0"].join(""),s&&(t.text=qb+t.text)}}}else t.text=dM(t.x,e,i,n)}function hlt(e){function t(s,l){return Math.abs(s-l)<=1e-6}function r(s,l){return t(l,0)?s:r(l,s%l)}function n(s){for(var l=1;!t(Math.round(s*l)/l,s);)l*=10;return l}var i=n(e),a=e*i,o=Math.abs(r(a,i));return[Math.round(a/o),Math.round(i/o)]}var Fse=["f","p","n","\u03BC","m","","k","M","G","T"],dlt=["q","r","y","z","a",...Fse,"P","E","Z","Y","R","Q"],W3=e=>["SI","SI extended","B"].includes(e);function _B(e){return e>14||e<-15}function xB(e){return e>32||e<-30}function vlt(e,t){return W3(t)?!!(t==="SI extended"&&xB(e)||t!=="SI extended"&&_B(e)):!1}function dM(e,t,r,n){var i=e<0,a=t._tickround,o=r||t.exponentformat||"B",s=t._tickexponent,l=Jn.getTickFormat(t),u=t.separatethousands;if(n){var c={exponentformat:o,minexponent:t.minexponent,dtick:t.showexponent==="none"?t.dtick:zh(e)&&Math.abs(e)||1,range:t.showexponent==="none"?t.range.map(t.r2d):[0,e||1]};Rse(c),a=(Number(c._tickround)||0)+4,s=c._tickexponent,t.hoverformat&&(l=t.hoverformat)}if(l)return t._numFormat(l)(e).replace(/-/g,qb);var f=Math.pow(10,-a)/2;if(o==="none"&&(s=0),e=Math.abs(e),e"+v+"":o==="B"&&s===9?e+="B":W3(o)&&(e+=o==="SI extended"?dlt[s/3+10]:Fse[s/3+5])}return i?qb+e:e}Jn.getTickFormat=function(e){var t;function r(l){return typeof l!="string"?l:Number(l.replace("M",""))*j3}function n(l,u){var c=["L","D"];if(typeof l==typeof u){if(typeof l=="number")return l-u;var f=c.indexOf(l.charAt(0)),h=c.indexOf(u.charAt(0));return f===h?Number(l.replace(/(L|D)/g,""))-Number(u.replace(/(L|D)/g,"")):f-h}else return typeof l=="number"?1:-1}function i(l,u,c){var f=c||function(v){return v},h=u[0],d=u[1];return(!h&&typeof h!="number"||f(h)<=f(l))&&(!d&&typeof d!="number"||f(d)>=f(l))}function a(l,u){var c=u[0]===null,f=u[1]===null,h=n(l,u[0])>=0,d=n(l,u[1])<=0;return(c||h)&&(f||d)}var o,s;if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":{for(t=0;t=0&&i.unshift(i.splice(c,1).shift())}});var s={false:{left:0,right:0}};return Wo.syncOrAsync(i.map(function(l){return function(){if(l){var u=Jn.getFromId(e,l);r||(r={}),r.axShifts=s,r.overlayingShiftedAx=o;var c=Jn.drawOne(e,u,r);return u._shiftPusher&&mB(u,u._fullDepth||0,s,!0),u._r=u.range.slice(),u._rl=Wo.simpleMap(u._r,u.r2l),c}}}))};Jn.drawOne=function(e,t,r){r=r||{};var n=r.axShifts||{},i=r.overlayingShiftedAx||[],a,o,s;t.setScale();var l=e._fullLayout,u=t._id,c=u.charAt(0),f=Jn.counterLetter(u),h=l._plots[t._mainSubplot],d=t.zerolinelayer==="above traces";if(!h)return;if(t._shiftPusher=t.autoshift||i.indexOf(t._id)!==-1||i.indexOf(t.overlaying)!==-1,t._shiftPusher&t.anchor==="free"){var v=t.linewidth/2||0;t.ticks==="inside"&&(v+=t.ticklen),mB(t,v,n,!0),mB(t,t.shift||0,n,!1)}(r.skipTitle!==!0||t._shift===void 0)&&(t._shift=Elt(t,n));var _=h[c+"axislayer"],b=t._mainLinePosition,p=b+=t._shift,k=t._mainMirrorPosition,E=t._vals=Jn.calcTicks(t),T=[t.mirror,p,k].join("_");for(a=0;a0?sr.bottom-Nt:0,$t))));var St=0,Qt=0;if(t._shiftPusher&&(St=Math.max($t,sr.height>0?ut==="l"?Nt-sr.left:sr.right-Nt:0),t.title.text!==l._dfltTitle[c]&&(Qt=(t._titleStandoff||0)+(t._titleScoot||0),ut==="l"&&(Qt+=Ese(t))),t._fullDepth=Math.max(St,Qt)),t.automargin){Tr={x:0,y:0,r:0,l:0,t:0,b:0};var Gt=[0,1],_t=typeof t._shift=="number"?t._shift:0;if(c==="x"){if(ut==="b"?Tr[ut]=t._depth:(Tr[ut]=t._depth=Math.max(sr.width>0?Nt-sr.top:0,$t),Gt.reverse()),sr.width>0){var It=sr.right-(t._offset+t._length);It>0&&(Tr.xr=1,Tr.r=It);var mt=t._offset-sr.left;mt>0&&(Tr.xl=0,Tr.l=mt)}}else if(ut==="l"?(t._depth=Math.max(sr.height>0?Nt-sr.left:0,$t),Tr[ut]=t._depth-_t):(t._depth=Math.max(sr.height>0?sr.right-Nt:0,$t),Tr[ut]=t._depth+_t,Gt.reverse()),sr.height>0){var er=sr.bottom-(t._offset+t._length);er>0&&(Tr.yb=0,Tr.b=er);var lr=t._offset-sr.top;lr>0&&(Tr.yt=1,Tr.t=lr)}Tr[f]=t.anchor==="free"?t.position:t._anchorAxis.domain[Gt[0]],t.title.text!==l._dfltTitle[c]&&(Tr[ut]+=Ese(t)+(t.title.standoff||0)),t.mirror&&t.anchor!=="free"&&(fr={x:0,y:0,r:0,l:0,t:0,b:0},fr[Wt]=t.linewidth,t.mirror&&t.mirror!==!0&&(fr[Wt]+=$t),t.mirror===!0||t.mirror==="ticks"?fr[f]=t._anchorAxis.domain[Gt[1]]:(t.mirror==="all"||t.mirror==="allticks")&&(fr[f]=[t._counterDomainMin,t._counterDomainMax][Gt[1]]))}ot&&($e=uM.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),typeof t.automargin=="string"&&(Mse(Tr,t.automargin),Mse(fr,t.automargin)),G3.autoMargin(e,bB(t),Tr),G3.autoMargin(e,Ose(t),fr),G3.autoMargin(e,qse(t),$e)}),Wo.syncOrAsync(pt)}};function Mse(e,t){if(e){var r=Object.keys(_se).reduce(function(n,i){return t.indexOf(i)!==-1&&_se[i].forEach(function(a){n[a]=1}),n},{});Object.keys(e).forEach(function(n){r[n]||(n.length===1?e[n]=0:delete e[n])})}}function plt(e,t){var r=[],n,i=function(a,o){var s=a.xbnd[o];s!==null&&r.push(Wo.extendFlat({},a,{x:s}))};if(t.length){for(n=0;ne.range[1],s=e.ticklabelposition&&e.ticklabelposition.indexOf("inside")!==-1,l=!s;if(r){var u=o?-1:1;r=r*u}if(n){var c=e.side,f=s&&(c==="top"||c==="left")||l&&(c==="bottom"||c==="right")?1:-1;n=n*f}return e._id.charAt(0)==="x"?function(h){return H3(i+e._offset+e.l2p(pB(h))+r,a+n)}:function(h){return H3(a+n,i+e._offset+e.l2p(pB(h))+r)}};function pB(e){return e.periodX!==void 0?e.periodX:e.x}function _lt(e){var t=e.ticklabelposition||"",r=e.tickson||"",n=function(v){return t.indexOf(v)!==-1},i=n("top"),a=n("left"),o=n("right"),s=n("bottom"),l=n("inside"),u=r!=="boundaries"&&(s||a||i||o);if(!u&&!l)return[0,0];var c=e.side,f=u?(e.tickwidth||0)/2:0,h=zL,d=e.tickfont?e.tickfont.size:12;return(s||i)&&(f+=d*Bb,h+=(e.linewidth||0)/2),(a||o)&&(f+=(e.linewidth||0)/2,h+=zL),l&&c==="top"&&(h-=d*(1-Bb)),(a||i)&&(f=-f),(c==="bottom"||c==="right")&&(h=-h),[u?f:0,l?h:0]}Jn.makeTickPath=function(e,t,r,n){n||(n={});var i=n.minor;if(i&&!e.minor)return"";var a=n.len!==void 0?n.len:i?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),s=(e.linewidth||1)/2;return o==="x"?"M0,"+(t+s*r)+"v"+a*r:"M"+(t+s*r)+",0h"+a*r};Jn.makeLabelFns=function(e,t,r){var n=e.ticklabelposition||"",i=e.tickson||"",a=function(O){return n.indexOf(O)!==-1},o=a("top"),s=a("left"),l=a("right"),u=a("bottom"),c=i!=="boundaries"&&(u||s||o||l),f=a("inside"),h=n==="inside"&&e.ticks==="inside"||!f&&e.ticks==="outside"&&i!=="boundaries",d=0,v=0,_=h?e.ticklen:0;if(f?_*=-1:c&&(_=0),h&&(d+=_,r)){var b=Wo.deg2rad(r);d=_*Math.cos(b)+1,v=_*Math.sin(b)}e.showticklabels&&(h||e.showline)&&(d+=.2*e.tickfont.size),d+=(e.linewidth||1)/2*(f?-1:1);var p={labelStandoff:d,labelShift:v},k,E,T,L,x=0,C=e.side,M=e._id.charAt(0),g=e.tickangle,P;if(M==="x")P=!f&&C==="bottom"||f&&C==="top",L=P?1:-1,f&&(L*=-1),k=v*L,E=t+d*L,T=P?1:-.2,Math.abs(g)===90&&(f?T+=lM:g===-90&&C==="bottom"?T=Bb:g===90&&C==="top"?T=lM:T=.5,x=lM/2*(g/90)),p.xFn=function(O){return O.dx+k+x*O.fontSize},p.yFn=function(O){return O.dy+E+O.fontSize*T},p.anchorFn=function(O,U){if(c){if(s)return"end";if(l)return"start"}return!zh(U)||U===0||U===180?"middle":U*L<0!==f?"end":"start"},p.heightFn=function(O,U,G){return U<-60||U>60?-.5*G:e.side==="top"!==f?-G:0};else if(M==="y"){if(P=!f&&C==="left"||f&&C==="right",L=P?1:-1,f&&(L*=-1),k=d,E=v*L,T=0,!f&&Math.abs(g)===90&&(g===-90&&C==="left"||g===90&&C==="right"?T=Bb:T=.5),f){var A=zh(g)?+g:0;if(A!==0){var z=Wo.deg2rad(A);x=Math.abs(Math.sin(z))*Bb*L,T=0}}p.xFn=function(O){return O.dx+t-(k+O.fontSize*T)*L+x*O.fontSize},p.yFn=function(O){return O.dy+E+O.fontSize*lM},p.anchorFn=function(O,U){return zh(U)&&Math.abs(U)===90?"middle":P?"end":"start"},p.heightFn=function(O,U,G){return e.side==="right"&&(U*=-1),U<-30?-G:U<30?-.5*G:0}}return p};function BL(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}Jn.drawTicks=function(e,t,r){r=r||{};var n=t._id+"tick",i=[].concat(t.minor&&t.minor.ticks?r.vals.filter(function(o){return o.minor&&!o.noTick}):[]).concat(t.ticks?r.vals.filter(function(o){return!o.minor&&!o.noTick}):[]),a=r.layer.selectAll("path."+n).data(i,BL);a.exit().remove(),a.enter().append("path").classed(n,1).classed("ticks",1).classed("crisp",r.crisp!==!1).each(function(o){return cM.stroke(w0.select(this),o.minor?t.minor.tickcolor:t.tickcolor)}).style("stroke-width",function(o){return Xp.crispRound(e,o.minor?t.minor.tickwidth:t.tickwidth,1)+"px"}).attr("d",r.path).style("display",null),NL(t,[kse]),a.attr("transform",r.transFn)};Jn.drawGrid=function(e,t,r){if(r=r||{},t.tickmode!=="sync"){var n=t._id+"grid",i=t.minor&&t.minor.showgrid,a=i?r.vals.filter(function(p){return p.minor}):[],o=t.showgrid?r.vals.filter(function(p){return!p.minor}):[],s=r.counterAxis;if(s&&Jn.shouldShowZeroLine(e,t,s))for(var l=t.tickmode==="array",u=0;u=0;v--){var _=v?h:d;if(_){var b=_.selectAll("path."+n).data(v?o:a,BL);b.exit().remove(),b.enter().append("path").classed(n,1).classed("crisp",r.crisp!==!1),b.attr("transform",r.transFn).attr("d",r.path).each(function(p){return cM.stroke(w0.select(this),p.minor?t.minor.gridcolor:t.gridcolor||"#ddd")}).style("stroke-dasharray",function(p){return Xp.dashStyle(p.minor?t.minor.griddash:t.griddash,p.minor?t.minor.gridwidth:t.gridwidth)}).style("stroke-width",function(p){return(p.minor?f:t._gw)+"px"}).style("display",null),typeof r.path=="function"&&b.attr("d",r.path)}}NL(t,[dB,vB])}};Jn.drawZeroLine=function(e,t,r){r=r||r;var n=t._id+"zl",i=Jn.shouldShowZeroLine(e,t,r.counterAxis),a=r.layer.selectAll("path."+n).data(i?[{x:0,id:t._id}]:[]);a.exit().remove(),a.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",r.crisp!==!1).each(function(){r.layer.selectAll("path").sort(function(o,s){return Yst(o.id,s.id)})}),a.attr("transform",r.transFn).attr("d",r.path).call(cM.stroke,t.zerolinecolor||cM.defaultLine).style("stroke-width",Xp.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),NL(t,[hB])};Jn.drawLabels=function(e,t,r){r=r||{};var n=e._fullLayout,i=t._id,a=t.zerolinelayer==="above traces",o=r.cls||i+"tick",s=r.vals.filter(function(H){return H.text}),l=r.labelFns,u=r.secondary?0:t.tickangle,c=(t._prevTickAngles||{})[o],f=r.layer.selectAll("g."+o).data(t.showticklabels?s:[],BL),h=[];f.enter().append("g").classed(o,1).append("text").attr("text-anchor","middle").each(function(H){var re=w0.select(this),oe=e._promises.length;re.call(Ob.positionText,l.xFn(H),l.yFn(H)).call(Xp.font,{family:H.font,size:H.fontSize,color:H.fontColor,weight:H.fontWeight,style:H.fontStyle,variant:H.fontVariant,textcase:H.fontTextcase,lineposition:H.fontLineposition,shadow:H.fontShadow}).text(H.text).call(Ob.convertToTspans,e),e._promises[oe]?h.push(e._promises.pop().then(function(){d(re,u)})):d(re,u)}),NL(t,[yse]),f.exit().remove(),r.repositionOnUpdate&&f.each(function(H){w0.select(this).select("text").call(Ob.positionText,l.xFn(H),l.yFn(H))});function d(H,re){H.each(function(oe){var _e=w0.select(this),Ce=_e.select(".text-math-group"),Le=l.anchorFn(oe,re),ge=r.transFn.call(_e.node(),oe)+(zh(re)&&+re!=0?" rotate("+re+","+l.xFn(oe)+","+(l.yFn(oe)-oe.fontSize/2)+")":""),ie=Ob.lineCount(_e),Se=hM*oe.fontSize,Ee=l.heightFn(oe,zh(re)?+re:0,(ie-1)*Se);if(Ee&&(ge+=H3(0,Ee)),Ce.empty()){var Ae=_e.select("text");Ae.attr({transform:ge,"text-anchor":Le}),Ae.style("display",null),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var Be=Xp.bBox(Ce.node()).width,Pe=Be*{end:-.5,start:.5}[Le];Ce.attr("transform",ge+H3(Pe,0))}})}t._adjustTickLabelsOverflow=function(){var H=t.ticklabeloverflow;if(!(!H||H==="allow")){var re=H.indexOf("hide")!==-1,oe=t._id.charAt(0)==="x",_e=0,Ce=oe?e._fullLayout.width:e._fullLayout.height;if(H.indexOf("domain")!==-1){var Le=Wo.simpleMap(t.range,t.r2l);_e=t.l2p(Le[0])+t._offset,Ce=t.l2p(Le[1])+t._offset}var ge=Math.min(_e,Ce),ie=Math.max(_e,Ce),Se=t.side,Ee=1/0,Ae=-1/0;f.each(function(De){var ce=w0.select(this),je=ce.select(".text-math-group");if(je.empty()){var lt=Xp.bBox(ce.node()),pt=0;oe?(lt.right>ie||lt.leftie||lt.top+(t.tickangle?0:De.fontSize/4)t["_visibleLabelMin_"+Le._id]?ce.style("display","none"):ie.K==="tick"&&!ge&&ce.node().style.display!=="none"&&ce.style("display",null)})})})})},d(f,c+1?c:u);function v(){return h.length&&Promise.all(h)}var _=null;function b(){if(d(f,u),s.length&&t.autotickangles&&(t.type!=="log"||String(t.dtick).charAt(0)!=="D")){_=t.autotickangles[0];var H=0,re=[],oe,_e=1;f.each(function(Tr){H=Math.max(H,Tr.fontSize);var fr=t.l2p(Tr.x),$e=gB(this),St=Xp.bBox($e.node());_e=Math.max(_e,Ob.lineCount($e)),re.push({top:0,bottom:10,height:10,left:fr-St.width/2,right:fr+St.width/2+2,width:St.width+2})});var Ce=(t.tickson==="boundaries"||t.showdividers)&&!r.secondary,Le=s.length,ge=Math.abs((s[Le-1].x-s[0].x)*t._m)/(Le-1),ie=Ce?ge/2:ge,Se=Ce?t.ticklen:H*1.25*_e,Ee=Math.sqrt(Math.pow(ie,2)+Math.pow(Se,2)),Ae=ie/Ee,Be=t.autotickangles.map(function(Tr){return Tr*Math.PI/180}),Pe=Be.find(function(Tr){return Math.abs(Math.cos(Tr))<=Ae});Pe===void 0&&(Pe=Be.reduce(function(Tr,fr){return Math.abs(Math.cos(Tr))Z*G&&(z=G,g[M]=P[M]=O[M])}var j=Math.abs(z-A);j-L>0?(j-=L,L*=1+L/j):L=0,t._id.charAt(0)!=="y"&&(L=-L),g[C]=E.p2r(E.r2p(P[C])+x*L),E.autorange==="min"||E.autorange==="max reversed"?(g[0]=null,E._rangeInitial0=void 0,E._rangeInitial1=void 0):(E.autorange==="max"||E.autorange==="min reversed")&&(g[1]=null,E._rangeInitial0=void 0,E._rangeInitial1=void 0),n._insideTickLabelsUpdaterange[E._name+".range"]=g}var N=Wo.syncOrAsync(p);return N&&N.then&&e._promises.push(N),N};function xlt(e,t,r){var n=t._id+"divider",i=r.vals,a=r.layer.selectAll("path."+n).data(i,BL);a.exit().remove(),a.enter().insert("path",":first-child").classed(n,1).classed("crisp",1).call(cM.stroke,t.dividercolor).style("stroke-width",Xp.crispRound(e,t.dividerwidth,1)+"px"),a.attr("transform",r.transFn).attr("d",r.path)}Jn.getPxPosition=function(e,t){var r=e._fullLayout._size,n=t._id.charAt(0),i=t.side,a;if(t.anchor!=="free"?a=t._anchorAxis:n==="x"?a={_offset:r.t+(1-(t.position||0))*r.h,_length:0}:n==="y"&&(a={_offset:r.l+(t.position||0)*r.w+t._shift,_length:0}),i==="top"||i==="left")return a._offset;if(i==="bottom"||i==="right")return a._offset+a._length};function Ese(e){var t=e.title.font.size,r=(e.title.text.match(Ob.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?t*(Bb+r*hM):r?t*(r+1)*hM:t}function blt(e,t){var r=e._fullLayout,n=t._id,i=n.charAt(0),a=t.title.font.size,o,s=(t.title.text.match(Ob.BR_TAG_ALL)||[]).length;if(t.title.hasOwnProperty("standoff"))t.side==="bottom"||t.side==="right"?o=t._depth+t.title.standoff+a*Bb:(t.side==="top"||t.side==="left")&&(o=t._depth+t.title.standoff+a*(lM+s*hM));else{var l=vM(t);if(t.type==="multicategory")o=t._depth;else{var u=1.5*a;l&&(u=.5*a,t.ticks==="outside"&&(u+=t.ticklen)),o=10+u+(t.linewidth?t.linewidth-1:0)}l||(i==="x"?o+=t.side==="top"?a*(t.showticklabels?1:0):a*(t.showticklabels?1.5:.5):o+=t.side==="right"?a*(t.showticklabels?1:.5):a*(t.showticklabels?.5:0))}var c=Jn.getPxPosition(e,t),f,h,d;i==="x"?(h=t._offset+t._length/2,d=t.side==="top"?c-o:c+o):(d=t._offset+t._length/2,h=t.side==="right"?c+o:c-o,f={rotate:"-90",offset:0});var v;if(t.type!=="multicategory"){var _=t._selections[t._id+"tick"];if(v={selection:_,side:t.side},_&&_.node()&&_.node().parentNode){var b=Xp.getTranslate(_.node().parentNode);v.offsetLeft=b.x,v.offsetTop=b.y}t.title.hasOwnProperty("standoff")&&(v.pad=0)}return t._titleStandoff=o,Nst.draw(e,n+"title",{propContainer:t,propName:t._name+".title.text",placeholder:r._dfltTitle[i],avoid:v,transform:f,attributes:{x:h,y:d,"text-anchor":"middle"}})}Jn.shouldShowZeroLine=function(e,t,r){var n=Wo.simpleMap(t.range,t.r2l);return n[0]*n[1]<=0&&t.zeroline&&(t.type==="linear"||t.type==="-")&&!(t.rangebreaks&&t.maskBreaks(0)===OL)&&(zse(t,0)||!wlt(e,t,r,n)||Tlt(e,t))};Jn.clipEnds=function(e,t){return t.filter(function(r){return zse(e,r.x)})};function zse(e,t){var r=e.l2p(t);return r>1&&r1)for(i=1;i=i.min&&e=Wst:/%L/.test(t)?e>=jst:/%[SX]/.test(t)?e>=FL:/%M/.test(t)?e>=fM:/%[HI]/.test(t)?e>=wm:/%p/.test(t)?e>=v_:/%[Aadejuwx]/.test(t)?e>=Ov:/%[UVW]/.test(t)?e>=Zp:/%[Bbm]/.test(t)?e>=DL:/%[q]/.test(t)?e>=RL:/%[Yy]/.test(t)?e>=IL:!0}});var TB=ye((nar,Nse)=>{"use strict";Nse.exports=function(t,r,n){var i,a;if(n){var o=r==="reversed"||r==="min reversed"||r==="max reversed";i=n[o?1:0],a=n[o?0:1]}var s=t("autorangeoptions.minallowed",a===null?i:void 0),l=t("autorangeoptions.maxallowed",i===null?a:void 0);s===void 0&&t("autorangeoptions.clipmin"),l===void 0&&t("autorangeoptions.clipmax"),t("autorangeoptions.include")}});var AB=ye((aar,Use)=>{"use strict";var Clt=TB();Use.exports=function(t,r,n,i){var a=r._template||{},o=r.type||a.type||"-";n("minallowed"),n("maxallowed");var s=n("range");if(!s){var l;!i.noInsiderange&&o!=="log"&&(l=n("insiderange"),l&&(l[0]===null||l[1]===null)&&(r.insiderange=!1,l=void 0),l&&(s=n("range",l)))}var u=r.getAutorangeDflt(s,i),c=n("autorange",u),f;s&&(s[0]===null&&s[1]===null||(s[0]===null||s[1]===null)&&(c==="reversed"||c===!0)||s[0]!==null&&(c==="min"||c==="max reversed")||s[1]!==null&&(c==="max"||c==="min reversed"))&&(s=void 0,delete r.range,r.autorange=!0,f=!0),f||(u=r.getAutorangeDflt(s,i),c=n("autorange",u)),c&&(Clt(n,c,s),(o==="linear"||o==="-")&&n("rangemode")),r.cleanRange()}});var Gse=ye((oar,Vse)=>{var Llt={left:0,top:0};Vse.exports=Plt;function Plt(e,t,r){t=t||e.currentTarget||e.srcElement,Array.isArray(r)||(r=[0,0]);var n=e.clientX||0,i=e.clientY||0,a=Ilt(t);return r[0]=n-a.left,r[1]=i-a.top,r}function Ilt(e){return e===window||e===document||e===document.body?Llt:e.getBoundingClientRect()}});var UL=ye((sar,Hse)=>{"use strict";var Rlt=oq();function Dlt(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(r){e=!1}return e}Hse.exports=Rlt&&Dlt()});var Wse=ye((lar,jse)=>{"use strict";jse.exports=function(t,r,n,i,a){var o=(t-n)/(i-n),s=o+r/(i-n),l=(o+s)/2;return a==="left"||a==="bottom"?o:a==="center"||a==="middle"?l:a==="right"||a==="top"?s:o<2/3-l?o:s>4/3-l?s:l}});var Yse=ye((uar,Zse)=>{"use strict";var Xse=Dr(),Flt=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];Zse.exports=function(t,r,n,i){return n==="left"?t=0:n==="center"?t=1:n==="right"?t=2:t=Xse.constrain(Math.floor(t*3),0,2),i==="bottom"?r=0:i==="middle"?r=1:i==="top"?r=2:r=Xse.constrain(Math.floor(r*3),0,2),Flt[r][t]}});var Jse=ye((car,Kse)=>{"use strict";var zlt=k3(),Olt=H6(),qlt=HS().getGraphDiv,Blt=NS(),SB=Kse.exports={};SB.wrapped=function(e,t,r){e=qlt(e),e._fullLayout&&Olt.clear(e._fullLayout._uid+Blt.HOVERID),SB.raw(e,t,r)};SB.raw=function(t,r){var n=t._fullLayout,i=t._hoverdata;r||(r={}),!(r.target&&!t._dragged&&zlt.triggerHandler(t,"plotly_beforehover",r)===!1)&&(n._hoverlayer.selectAll("g").remove(),n._hoverlayer.selectAll("line").remove(),n._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,r.target&&i&&t.emit("plotly_unhover",{event:r,points:i}))}});var yv=ye((far,tle)=>{"use strict";var Nlt=Gse(),MB=lq(),Ult=UL(),Vlt=Dr().removeElement,Glt=Rh(),Nb=tle.exports={};Nb.align=Wse();Nb.getCursor=Yse();var Qse=Jse();Nb.unhover=Qse.wrapped;Nb.unhoverRaw=Qse.raw;Nb.init=function(t){var r=t.gd,n=1,i=r._context.doubleClickDelay,a=t.element,o,s,l,u,c,f,h,d;r._mouseDownTime||(r._mouseDownTime=0),a.style.pointerEvents="all",a.onmousedown=b,Ult?(a._ontouchstart&&a.removeEventListener("touchstart",a._ontouchstart),a._ontouchstart=b,a.addEventListener("touchstart",b,{passive:!1})):a.ontouchstart=b;function v(E,T,L){return Math.abs(E)i&&(n=Math.max(n-1,1)),r._dragged)t.doneFn&&t.doneFn();else{var T;f.target===h?T=f:(T={target:h,srcElement:h,toElement:h},Object.keys(f).concat(Object.keys(f.__proto__)).forEach(L=>{var x=f[L];!T[L]&&typeof x!="function"&&(T[L]=x)})),t.clickFn&&t.clickFn(n,T),d||h.dispatchEvent(new MouseEvent("click",E))}r._dragging=!1,r._dragged=!1}};function ele(){var e=document.createElement("div");e.className="dragcover";var t=e.style;return t.position="fixed",t.left=0,t.right=0,t.top=0,t.bottom=0,t.zIndex=999999999,t.background="none",document.body.appendChild(e),e}Nb.coverSlip=ele;function $se(e){return Nlt(e.changedTouches?e.changedTouches[0]:e,document.body)}});var Eg=ye((har,rle)=>{"use strict";rle.exports=function(t,r){(t.attr("class")||"").split(" ").forEach(function(n){n.indexOf("cursor-")===0&&t.classed(n,!1)}),r&&t.classed("cursor-"+r,!0)}});var ale=ye((dar,nle)=>{"use strict";var EB=Eg(),pM="data-savedcursor",ile="!!";nle.exports=function(t,r){var n=t.attr(pM);if(r){if(!n){for(var i=(t.attr("class")||"").split(" "),a=0;a{"use strict";var kB=ec(),Hlt=Ih();ole.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:Hlt.defaultLine,editType:"legend"},maxheight:{valType:"number",min:0,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:kB({editType:"legend"}),grouptitlefont:kB({editType:"legend"}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend"},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend"},entrywidth:{valType:"number",min:0,editType:"legend"},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend"},indentation:{valType:"number",min:-15,dflt:0,editType:"legend"},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend"},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend"},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend"},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend"},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend"},titleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],editType:"legend"},titledoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],editType:"legend"},x:{valType:"number",editType:"legend"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend"},y:{valType:"number",editType:"legend"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend"},uirevision:{valType:"any",editType:"none"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend"},title:{text:{valType:"string",dflt:"",editType:"legend"},font:kB({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}});var mM=ye(gM=>{"use strict";gM.isGrouped=function(t){return(t.traceorder||"").indexOf("grouped")!==-1};gM.isVertical=function(t){return t.orientation!=="h"};gM.isReversed=function(t){return(t.traceorder||"").indexOf("reversed")!==-1};gM.getId=function(t){return t._id||"legend"}});var PB=ye((mar,sle)=>{"use strict";var VL=qa(),Yp=Dr(),jlt=vl(),Wlt=Gl(),Xlt=CB(),Zlt=_3(),LB=mM();function Ylt(e,t,r,n,i){var a=t[e]||{},o=jlt.newContainer(r,e);function s(H,re){return Yp.coerce(a,o,Xlt,H,re)}var l=Yp.coerceFont(s,"font",r.font);s("bgcolor",r.paper_bgcolor),s("bordercolor");var u=s("visible");if(!u)return;var c,f=function(H,re){var oe=c._input,_e=c;return Yp.coerce(oe,_e,Wlt,H,re)},h=r.font||{},d=Yp.coerceFont(s,"grouptitlefont",h,{overrideDflt:{size:Math.round(h.size*1.1)}}),v=0,_=!1,b="normal",p=(r.shapes||[]).filter(function(H){return H.showlegend});function k(H){return VL.traceIs(H,"pie-like")&&H._length!=null&&(Array.isArray(H.legend)||Array.isArray(H.showlegend))}n.filter(k).forEach(function(H){H.visible&&v++;for(var re=0;reH.legend.length)for(var _e=H.legend.length;_e(e==="legend"?1:0));if(x===!1&&(r[e]=void 0),!(x===!1&&!a.uirevision)&&(s("uirevision",r.uirevision),x!==!1)){s("borderwidth");var C=s("orientation"),M=s("yref"),g=s("xref"),P=C==="h",A=M==="paper",z=g==="paper",O,U,G,Z="left";P?(O=0,VL.getComponentMethod("rangeslider","isVisible")(t.xaxis)?A?(U=1.1,G="bottom"):(U=1,G="top"):A?(U=-.1,G="top"):(U=0,G="bottom")):(U=1,G="auto",z?O=1.02:(O=1,Z="right")),Yp.coerce(a,o,{x:{valType:"number",editType:"legend",min:z?-2:0,max:z?3:1,dflt:O}},"x"),Yp.coerce(a,o,{y:{valType:"number",editType:"legend",min:A?-2:0,max:A?3:1,dflt:U}},"y"),s("traceorder",b),LB.isGrouped(r[e])&&s("tracegroupgap"),s("entrywidth"),s("entrywidthmode"),s("indentation"),s("itemsizing"),s("itemwidth"),s("itemclick"),s("itemdoubleclick"),s("groupclick"),s("xanchor",Z),s("yanchor",G),s("maxheight"),s("valign"),Yp.noneOrAll(a,o,["x","y"]);var j=s("title.text");if(j){s("title.side",P?"left":"top");var N=Yp.extendFlat({},l,{size:Yp.bigFont(l.size)});Yp.coerceFont(s,"title.font",N);let H=i>1;s("titleclick",H?"toggle":!1),s("titledoubleclick",H?"toggleothers":!1)}}}sle.exports=function(t,r,n){var i,a=n.slice(),o=r.shapes;if(o)for(i=0;i{"use strict";var p_=qa(),IB=Dr(),Klt=IB.pushUnique,Jlt=mM(),lle=!0;RB.handleItemClick=function(t,r,n,i){var a=r._fullLayout;if(r._dragged||r._editing)return;var o=t.data()[0][0];if(o.groupTitle&&o.noClick)return;var s=n.groupclick;i==="toggle"&&n.itemdoubleclick==="toggleothers"&&lle&&r.data&&r._context.showTips&&(IB.notifier(IB._(r,"Double-click on legend to isolate one trace"),"long"),lle=!1);var l=s==="togglegroup",u=a.hiddenlabels?a.hiddenlabels.slice():[],c=r._fullData,f=(a.shapes||[]).filter(function(ot){return ot.showlegend}),h=c.concat(f),d=o.trace;d._isShape&&(d=d._fullInput);var v=d.legendgroup,_,b,p,k,E,T,L={},x=[],C=[],M=[];function g(ot,ut){var Wt=x.indexOf(ot),Nt=L.visible;return Nt||(Nt=L.visible=[]),x.indexOf(ot)===-1&&(x.push(ot),Wt=x.length-1),Nt[Wt]=ut,Wt}var P=(a.shapes||[]).map(function(ot){return ot._input}),A=!1;function z(ot,ut){P[ot].visible=ut,A=!0}function O(ot,ut){if(!(o.groupTitle&&!l)){var Wt=ot._fullInput||ot,Nt=Wt._isShape,$t=Wt.index;$t===void 0&&($t=Wt._index);var sr=Wt.visible===!1?!1:ut;Nt?z($t,sr):g($t,sr)}}var U=d.legend,G=d._fullInput,Z=G&&G._isShape;if(!Z&&p_.traceIs(d,"pie-like")){var j=o.label,N=u.indexOf(j);if(i==="toggle")N===-1?u.push(j):u.splice(N,1);else if(i==="toggleothers"){var H=N!==-1,re=[];for(_=0;_{"use strict";ule.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}});var hle=ye((xar,fle)=>{"use strict";var cle=qa(),zB=mM();fle.exports=function(t,r,n){var i=r._inHover,a=zB.isGrouped(r),o=zB.isReversed(r),s={},l=[],u=!1,c={},f=0,h=0,d,v;function _(H,re,oe){if(r.visible!==!1&&!(n&&H!==r._id))if(re===""||!zB.isGrouped(r)){var _e="~~i"+f;l.push(_e),s[_e]=[oe],f++}else l.indexOf(re)===-1?(l.push(re),u=!0,s[re]=[oe]):s[re].push(oe)}for(d=0;dz&&(A=z)}g[d][0]._groupMinRank=A,g[d][0]._preGroupSort=d}var O=function(H,re){return H[0]._groupMinRank-re[0]._groupMinRank||H[0]._preGroupSort-re[0]._preGroupSort},U=function(H,re){return H.trace.legendrank-re.trace.legendrank||H._preSort-re._preSort};for(g.forEach(function(H,re){H[0]._preGroupSort=re}),g.sort(O),d=0;d{"use strict";var GL=Dr();function dle(e){return e.indexOf("e")!==-1?e.replace(/[.]?0+e/,"e"):e.indexOf(".")!==-1?e.replace(/[.]?0+$/,""):e}Ub.formatPiePercent=function(t,r){var n=dle((t*100).toPrecision(3));return GL.numSeparate(n,r)+"%"};Ub.formatPieValue=function(t,r){var n=dle(t.toPrecision(10));return GL.numSeparate(n,r)};Ub.getFirstFilled=function(t,r){if(GL.isArrayOrTypedArray(t))for(var n=0;n{"use strict";var $lt=So(),Qlt=ka();vle.exports=function(t,r,n,i){var a=n.marker.pattern;a&&a.shape?$lt.pointStyle(t,n,i,r):Qlt.fill(t,r.color)}});var X3=ye((Tar,yle)=>{"use strict";var gle=ka(),mle=g_().castOption,eut=ple();yle.exports=function(t,r,n,i){var a=n.marker.line,o=mle(a.color,r.pts)||gle.defaultLine,s=mle(a.width,r.pts)||0;t.call(eut,r,n,i).style("stroke-width",s).call(gle.stroke,o)}});var NB=ye((Aar,Ale)=>{"use strict";var qv=Oa(),OB=qa(),_v=Dr(),_le=_v.strTranslate,Kp=So(),T0=ka(),qB=pv().extractOpts,HL=Ru(),tut=X3(),rut=g_().castOption,iut=FB(),xle=12,ble=5,Vb=2,nut=10,Z3=5;Ale.exports=function(t,r,n){var i=r._fullLayout;n||(n=i.legend);var a=n.itemsizing==="constant",o=n.itemwidth,s=(o+iut.itemGap*2)/2,l=_le(s,0),u=function(C,M,g,P){var A;if(C+1)A=C;else if(M&&M.width>0)A=M.width;else return 0;return a?P:Math.min(A,g)};t.each(function(C){var M=qv.select(this),g=_v.ensureSingle(M,"g","layers");g.style("opacity",C[0].trace.opacity);var P=n.indentation,A=n.valign,z=C[0].lineHeight,O=C[0].height;if(A==="middle"&&P===0||!z||!O)g.attr("transform",null);else{var U={top:1,bottom:-1}[A],G=U*(.5*(z-O+3))||0,Z=n.indentation;g.attr("transform",_le(Z,G))}var j=g.selectAll("g.legendfill").data([C]);j.enter().append("g").classed("legendfill",!0);var N=g.selectAll("g.legendlines").data([C]);N.enter().append("g").classed("legendlines",!0);var H=g.selectAll("g.legendsymbols").data([C]);H.enter().append("g").classed("legendsymbols",!0),H.selectAll("g.legendpoints").data([C]).enter().append("g").classed("legendpoints",!0)}).each(x).each(h).each(v).each(d).each(b).each(T).each(E).each(c).each(f).each(p).each(k);function c(C){var M=wle(C),g=M.showFill,P=M.showLine,A=M.showGradientLine,z=M.showGradientFill,O=M.anyFill,U=M.anyLine,G=C[0],Z=G.trace,j,N,H=qB(Z),re=H.colorscale,oe=H.reversescale,_e=function(Ae){if(Ae.size())if(g)Kp.fillGroupStyle(Ae,r,!0);else{var Be="legendfill-"+Z.uid;Kp.gradient(Ae,r,Be,BB(oe),re,"fill")}},Ce=function(Ae){if(Ae.size()){var Be="legendline-"+Z.uid;Kp.lineGroupStyle(Ae),Kp.gradient(Ae,r,Be,BB(oe),re,"stroke")}},Le=HL.hasMarkers(Z)||!O?"M5,0":U?"M5,-2":"M5,-3",ge=qv.select(this),ie=ge.select(".legendfill").selectAll("path").data(g||z?[C]:[]);if(ie.enter().append("path").classed("js-fill",!0),ie.exit().remove(),ie.attr("d",Le+"h"+o+"v6h-"+o+"z").call(_e),P||A){var Se=u(void 0,Z.line,nut,ble);N=_v.minExtend(Z,{line:{width:Se}}),j=[_v.minExtend(G,{trace:N})]}var Ee=ge.select(".legendlines").selectAll("path").data(P||A?[j]:[]);Ee.enter().append("path").classed("js-line",!0),Ee.exit().remove(),Ee.attr("d",Le+(A?"l"+o+",0.0001":"h"+o)).call(P?Kp.lineGroupStyle:Ce)}function f(C){var M=wle(C),g=M.anyFill,P=M.anyLine,A=M.showLine,z=M.showMarker,O=C[0],U=O.trace,G=!z&&!P&&!g&&HL.hasText(U),Z,j;function N(ie,Se,Ee,Ae){var Be=_v.nestedProperty(U,ie).get(),Pe=_v.isArrayOrTypedArray(Be)&&Se?Se(Be):Be;if(a&&Pe&&Ae!==void 0&&(Pe=Ae),Ee){if(PeEe[1])return Ee[1]}return Pe}function H(ie){return O._distinct&&O.index&&ie[O.index]?ie[O.index]:ie[0]}if(z||G||A){var re={},oe={};if(z){re.mc=N("marker.color",H),re.mx=N("marker.symbol",H),re.mo=N("marker.opacity",_v.mean,[.2,1]),re.mlc=N("marker.line.color",H),re.mlw=N("marker.line.width",_v.mean,[0,5],Vb),re.mld=U._isShape?"solid":N("marker.line.dash",H),oe.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var _e=N("marker.size",_v.mean,[2,16],xle);re.ms=_e,oe.marker.size=_e}A&&(oe.line={width:N("line.width",H,[0,10],ble)}),G&&(re.tx="Aa",re.tp=N("textposition",H),re.ts=10,re.tc=N("textfont.color",H),re.tf=N("textfont.family",H),re.tw=N("textfont.weight",H),re.ty=N("textfont.style",H),re.tv=N("textfont.variant",H),re.tC=N("textfont.textcase",H),re.tE=N("textfont.lineposition",H),re.tS=N("textfont.shadow",H)),Z=[_v.minExtend(O,re)],j=_v.minExtend(U,oe),j.selectedpoints=null,j.texttemplate=null}var Ce=qv.select(this).select("g.legendpoints"),Le=Ce.selectAll("path.scatterpts").data(z?Z:[]);Le.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",l),Le.exit().remove(),Le.call(Kp.pointStyle,j,r),z&&(Z[0].mrc=3);var ge=Ce.selectAll("g.pointtext").data(G?Z:[]);ge.enter().append("g").classed("pointtext",!0).append("text").attr("transform",l),ge.exit().remove(),ge.selectAll("text").call(Kp.textPointStyle,j,r)}function h(C){var M=C[0].trace,g=M.type==="waterfall";if(C[0]._distinct&&g){var P=C[0].trace[C[0].dir].marker;return C[0].mc=P.color,C[0].mlw=P.line.width,C[0].mlc=P.line.color,_(C,this,"waterfall")}var A=[];M.visible&&g&&(A=C[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var z=qv.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(A);z.enter().append("path").classed("legendwaterfall",!0).attr("transform",l).style("stroke-miterlimit",1),z.exit().remove(),z.each(function(O){var U=qv.select(this),G=M[O[0]].marker,Z=u(void 0,G.line,Z3,Vb);U.attr("d",O[1]).style("stroke-width",Z+"px").call(T0.fill,G.color),Z&&U.call(T0.stroke,G.line.color)})}function d(C){_(C,this)}function v(C){_(C,this,"funnel")}function _(C,M,g){var P=C[0].trace,A=P.marker||{},z=A.line||{},O=A.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",U=g?P.visible&&P.type===g:OB.traceIs(P,"bar"),G=qv.select(M).select("g.legendpoints").selectAll("path.legend"+g).data(U?[C]:[]);G.enter().append("path").classed("legend"+g,!0).attr("d",O).attr("transform",l),G.exit().remove(),G.each(function(Z){var j=qv.select(this),N=Z[0],H=u(N.mlw,A.line,Z3,Vb);j.style("stroke-width",H+"px");var re=N.mcc;if(!n._inHover&&"mc"in N){var oe=qB(A),_e=oe.mid;_e===void 0&&(_e=(oe.max+oe.min)/2),re=Kp.tryColorscale(A,"")(_e)}var Ce=re||N.mc||A.color,Le=A.pattern,ge=Kp.getPatternAttr,ie=Le&&(ge(Le.shape,0,"")||ge(Le.path,0,""));if(ie){var Se=ge(Le.bgcolor,0,null),Ee=ge(Le.fgcolor,0,null),Ae=Le.fgopacity,Be=Tle(Le.size,8,10),Pe=Tle(Le.solidity,.5,1),me="legend-"+P.uid;j.call(Kp.pattern,"legend",r,me,ie,Be,Pe,re,Le.fillmode,Se,Ee,Ae)}else j.call(T0.fill,Ce);H&&T0.stroke(j,N.mlc||z.color)})}function b(C){var M=C[0].trace,g=qv.select(this).select("g.legendpoints").selectAll("path.legendbox").data(M.visible&&OB.traceIs(M,"box-violin")?[C]:[]);g.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",l),g.exit().remove(),g.each(function(){var P=qv.select(this);if((M.boxpoints==="all"||M.points==="all")&&T0.opacity(M.fillcolor)===0&&T0.opacity((M.line||{}).color)===0){var A=_v.minExtend(M,{marker:{size:a?xle:_v.constrain(M.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});g.call(Kp.pointStyle,A,r)}else{var z=u(void 0,M.line,Z3,Vb);P.style("stroke-width",z+"px").call(T0.fill,M.fillcolor),z&&T0.stroke(P,M.line.color)}})}function p(C){var M=C[0].trace,g=qv.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(M.visible&&M.type==="candlestick"?[C,C]:[]);g.enter().append("path").classed("legendcandle",!0).attr("d",function(P,A){return A?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",l).style("stroke-miterlimit",1),g.exit().remove(),g.each(function(P,A){var z=qv.select(this),O=M[A?"increasing":"decreasing"],U=u(void 0,O.line,Z3,Vb);z.style("stroke-width",U+"px").call(T0.fill,O.fillcolor),U&&T0.stroke(z,O.line.color)})}function k(C){var M=C[0].trace,g=qv.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(M.visible&&M.type==="ohlc"?[C,C]:[]);g.enter().append("path").classed("legendohlc",!0).attr("d",function(P,A){return A?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",l).style("stroke-miterlimit",1),g.exit().remove(),g.each(function(P,A){var z=qv.select(this),O=M[A?"increasing":"decreasing"],U=u(void 0,O.line,Z3,Vb);z.style("fill","none").call(Kp.dashLine,O.line.dash,U),U&&T0.stroke(z,O.line.color)})}function E(C){L(C,this,"pie")}function T(C){L(C,this,"funnelarea")}function L(C,M,g){var P=C[0],A=P.trace,z=g?A.visible&&A.type===g:OB.traceIs(A,g),O=qv.select(M).select("g.legendpoints").selectAll("path.legend"+g).data(z?[C]:[]);if(O.enter().append("path").classed("legend"+g,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",l),O.exit().remove(),O.size()){var U=A.marker||{},G=u(rut(U.line.width,P.pts),U.line,Z3,Vb),Z="pieLike",j=_v.minExtend(A,{marker:{line:{width:G}}},Z),N=_v.minExtend(P,{trace:j},Z);tut(O,N,j,r)}}function x(C){var M=C[0].trace,g,P=[];if(M.visible)switch(M.type){case"histogram2d":case"heatmap":P=[["M-15,-2V4H15V-2Z"]],g=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":P=[["M-6,-6V6H6V-6Z"]],g=!0;break;case"densitymapbox":case"densitymap":P=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],g="radial";break;case"cone":P=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],g=!1;break;case"streamtube":P=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],g=!1;break;case"surface":P=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],g=!0;break;case"mesh3d":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],g=!1;break;case"volume":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],g=!0;break;case"isosurface":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],g=!1;break}var A=qv.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(P);A.enter().append("path").classed("legend3dandfriends",!0).attr("transform",l).style("stroke-miterlimit",1),A.exit().remove(),A.each(function(z,O){var U=qv.select(this),G=qB(M),Z=G.colorscale,j=G.reversescale,N=function(_e){if(_e.size()){var Ce="legendfill-"+M.uid;Kp.gradient(_e,r,Ce,BB(j,g==="radial"),Z,"fill")}},H;if(Z){if(!g){var oe=Z.length;H=O===0?Z[j?oe-1:0][1]:O===1?Z[j?0:oe-1][1]:Z[Math.floor((oe-1)/2)][1]}}else{var re=M.vertexcolor||M.facecolor||M.color;H=_v.isArrayOrTypedArray(re)?re[O]||re[0]:re}U.attr("d",z[0]),H?U.call(T0.fill,H):U.call(N)})}};function BB(e,t){var r=t?"radial":"horizontal";return r+(e?"":"reversed")}function wle(e){var t=e[0].trace,r=t.contours,n=HL.hasLines(t),i=HL.hasMarkers(t),a=t.visible&&t.fill&&t.fill!=="none",o=!1,s=!1;if(r){var l=r.coloring;l==="lines"?o=!0:n=l==="none"||l==="heatmap"||r.showlines,r.type==="constraint"?a=r._operation!=="=":(l==="fill"||l==="heatmap")&&(s=!0)}return{showMarker:i,showLine:n,showFill:a,showGradientLine:o,showGradientFill:s,anyLine:n||o,anyFill:a||s}}function Tle(e,t,r){return e&&_v.isArrayOrTypedArray(e)?t:e>r?r:e}});var HB=ye((Sar,Rle)=>{"use strict";var np=Oa(),vh=Dr(),VB=Mc(),Gb=qa(),XL=k3(),UB=yv(),ph=So(),yM=ka(),Hb=Zl(),Sle=DB().handleItemClick,Mle=DB().handleTitleClick,Oh=FB(),GB=Dh(),Ple=GB.LINE_SPACING,K3=GB.FROM_TL,Ele=GB.FROM_BR,kle=hle(),aut=NB(),J3=mM(),Y3=1,out=/^legend[0-9]*$/;Rle.exports=function(t,r){if(r)Cle(t,r);else{var n=t._fullLayout,i=n._legends,a=n._infolayer.selectAll('[class^="legend"]');a.each(function(){var u=np.select(this),c=u.attr("class"),f=c.split(" ")[0];f.match(out)&&i.indexOf(f)===-1&&u.remove()});for(var o=0;o1)}var v=n.hiddenlabels||[];if(!s&&(!n.showlegend||!l.length))return o.selectAll("."+i).remove(),n._topdefs.select("#"+a).remove(),VB.autoMargin(e,i);var _=vh.ensureSingle(o,"g",i,function(M){s||M.attr("pointer-events","all")}),b=vh.ensureSingleById(n._topdefs,"clipPath",a,function(M){M.append("rect")}),p=vh.ensureSingle(_,"rect","bg",function(M){M.attr("shape-rendering","crispEdges")});p.call(yM.stroke,r.bordercolor).call(yM.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px");var k=vh.ensureSingle(_,"g","scrollbox"),E=r.title;r._titleWidth=0,r._titleHeight=0;var T;E.text?(T=vh.ensureSingle(k,"text",i+"titletext"),T.attr("text-anchor","start").call(ph.font,E.font).text(E.text),WL(T,k,e,r,Y3),!s&&(r.titleclick||r.titledoubleclick)&&cut(k,e,r,i)):(k.selectAll("."+i+"titletext").remove(),k.selectAll("."+i+"titletoggle").remove());var L=vh.ensureSingle(_,"rect","scrollbar",function(M){M.attr(Oh.scrollBarEnterAttrs).call(yM.fill,Oh.scrollBarColor)}),x=k.selectAll("g.groups").data(l);x.enter().append("g").attr("class","groups"),x.exit().remove();var C=x.selectAll("g.traces").data(vh.identity);C.enter().append("g").attr("class","traces"),C.exit().remove(),C.style("opacity",function(M){let g=M[0],P=g.trace;if(g.groupTitle){let A=P.legendgroup,z=(n.shapes||[]).filter(function(U){return U.showlegend});return e._fullData.concat(z).some(function(U){return U.legendgroup===A&&(U.legend||"legend")===i&&U.visible===!0})?1:.5}return Gb.traceIs(P,"pie-like")?v.indexOf(M[0].label)!==-1?.5:1:P.visible==="legendonly"?.5:1}).each(function(){np.select(this).call(lut,e,r)}).call(aut,e,r).each(function(M){s||M[0].groupTitle&&r.groupclick==="toggleitem"||np.select(this).call(uut,e,i)}),vh.syncOrAsync([VB.previousPromises,function(){return dut(e,x,C,r,k)},function(){var M=n._size,g=r.borderwidth,P=r.xref==="paper",A=r.yref==="paper";if(E.text){let je=(n.shapes||[]).filter(function(pt){return pt.showlegend}),lt=e._fullData.concat(je).some(function(pt){let Vt=pt.legend||"legend";var ot=Array.isArray(Vt)?Vt.includes(i):Vt===i;return ot&&pt.visible===!0});T.style("opacity",lt?1:.5)}if(!s){var z,O;P?z=M.l+M.w*r.x-K3[ZL(r)]*r._width:z=n.width*r.x-K3[ZL(r)]*r._width,A?O=M.t+M.h*(1-r.y)-K3[YL(r)]*r._effHeight:O=n.height*(1-r.y)-K3[YL(r)]*r._effHeight;var U=vut(e,i,z,O);if(U)return;if(n.margin.autoexpand){var G=z,Z=O;z=P?vh.constrain(z,0,n.width-r._width):G,O=A?vh.constrain(O,0,n.height-r._effHeight):Z,z!==G&&vh.log("Constrain "+i+".x to make legend fit inside graph"),O!==Z&&vh.log("Constrain "+i+".y to make legend fit inside graph")}ph.setTranslate(_,z,O)}if(L.on(".drag",null),_.on("wheel",null),s||r._height<=r._maxHeight||e._context.staticPlot){var j=r._effHeight;s&&(j=r._height),p.attr({width:r._width-g,height:j-g,x:g/2,y:g/2}),ph.setTranslate(k,0,0),b.select("rect").attr({width:r._width-2*g,height:j-2*g,x:g,y:g}),ph.setClipUrl(k,a,e),ph.setRect(L,0,0,0,0),delete r._scrollY}else{var N=Math.max(Oh.scrollBarMinHeight,r._effHeight*r._effHeight/r._height),H=r._effHeight-N-2*Oh.scrollBarMargin,re=r._height-r._effHeight,oe=H/re,_e=Math.min(r._scrollY||0,re);p.attr({width:r._width-2*g+Oh.scrollBarWidth+Oh.scrollBarMargin,height:r._effHeight-g,x:g/2,y:g/2}),b.select("rect").attr({width:r._width-2*g+Oh.scrollBarWidth+Oh.scrollBarMargin,height:r._effHeight-2*g,x:g,y:g+_e}),ph.setClipUrl(k,a,e),Be(_e,N,oe),_.on("wheel",function(){_e=vh.constrain(r._scrollY+np.event.deltaY/re*H,0,re),Be(_e,N,oe),_e!==0&&_e!==re&&np.event.preventDefault()});var Ce,Le,ge,ie=function(je,lt,pt){var Vt=(pt-lt)/oe+je;return vh.constrain(Vt,0,re)},Se=function(je,lt,pt){var Vt=(lt-pt)/oe+je;return vh.constrain(Vt,0,re)},Ee=np.behavior.drag().on("dragstart",function(){var je=np.event.sourceEvent;je.type==="touchstart"?Ce=je.changedTouches[0].clientY:Ce=je.clientY,ge=_e}).on("drag",function(){var je=np.event.sourceEvent;je.buttons===2||je.ctrlKey||(je.type==="touchmove"?Le=je.changedTouches[0].clientY:Le=je.clientY,_e=ie(ge,Ce,Le),Be(_e,N,oe))});L.call(Ee);var Ae=np.behavior.drag().on("dragstart",function(){var je=np.event.sourceEvent;je.type==="touchstart"&&(Ce=je.changedTouches[0].clientY,ge=_e)}).on("drag",function(){var je=np.event.sourceEvent;je.type==="touchmove"&&(Le=je.changedTouches[0].clientY,_e=Se(ge,Ce,Le),Be(_e,N,oe))});k.call(Ae)}function Be(je,lt,pt){r._scrollY=e._fullLayout[i]._scrollY=je,ph.setTranslate(k,0,-je),ph.setRect(L,r._width,Oh.scrollBarMargin+je*pt,Oh.scrollBarWidth,lt),b.select("rect").attr("y",g+je)}if(e._context.edits.legendPosition){var Pe,me,De,ce;_.classed("cursor-move",!0),UB.init({element:_.node(),gd:e,prepFn:function(je){if(je.target!==L.node()){var lt=ph.getTranslate(_);De=lt.x,ce=lt.y}},moveFn:function(je,lt){if(De!==void 0&&ce!==void 0){var pt=De+je,Vt=ce+lt;ph.setTranslate(_,pt,Vt),Pe=UB.align(pt,r._width,M.l,M.l+M.w,r.xanchor),me=UB.align(Vt+r._height,-r._height,M.t+M.h,M.t,r.yanchor)}},doneFn:function(){if(Pe!==void 0&&me!==void 0){var je={};je[i+".x"]=Pe,je[i+".y"]=me,Gb.call("_guiRelayout",e,je)}},clickFn:function(je,lt){var pt=o.selectAll("g.traces").filter(function(){var Vt=this.getBoundingClientRect();return lt.clientX>=Vt.left&<.clientX<=Vt.right&<.clientY>=Vt.top&<.clientY<=Vt.bottom});pt.size()>0&&Ile(e,r,pt,je,lt)}})}}],e)}}function jL(e,t,r){var n=e[0],i=n.width,a=t.entrywidthmode,o=n.trace.legendwidth||t.entrywidth;return a==="fraction"?t._maxWidth*o:r+(o||i)}function Ile(e,t,r,n,i){var a=e._fullLayout,o=r.data()[0][0].trace,s=t.itemclick,l=t.itemdoubleclick,u={event:i,node:r.node(),curveNumber:o.index,expandedIndex:o.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:a};o._group&&(u.group=o._group),Gb.traceIs(o,"pie-like")&&(u.label=r.datum()[0].label);var c=XL.triggerHandler(e,"plotly_legendclick",u);if(n===1){if(c===!1)return;t._clickTimeout=setTimeout(function(){e._fullLayout&&s&&Sle(r,e,t,s)},e._context.doubleClickDelay)}else if(n===2){t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0;var f=XL.triggerHandler(e,"plotly_legenddoubleclick",u);f!==!1&&c!==!1&&l&&Sle(r,e,t,l)}}function lut(e,t,r){var n=J3.getId(r),i=e.data()[0][0],a=i.trace,o=Gb.traceIs(a,"pie-like"),s=!r._inHover&&t._context.edits.legendText&&!o,l=r._maxNameLength,u,c;i.groupTitle?(u=i.groupTitle.text,c=i.groupTitle.font):(c=r.font,r.entries?u=i.text:(u=o?i.label:a.name,a._meta&&(u=vh.templateString(u,a._meta))));var f=vh.ensureSingle(e,"text",n+"text");f.attr("text-anchor","start").call(ph.font,c).text(s?Lle(u,l):u);var h=r.indentation+r.itemwidth+Oh.itemGap*2;Hb.positionText(f,h,0),s?f.call(Hb.makeEditable,{gd:t,text:u}).call(WL,e,t,r).on("edit",function(d){this.text(Lle(d,l)).call(WL,e,t,r);var v=i.trace._fullInput||{},_={};return _.name=d,v._isShape?Gb.call("_guiRelayout",t,"shapes["+a.index+"].name",_.name):Gb.call("_guiRestyle",t,_,a.index)}):WL(f,e,t,r)}function Lle(e,t){var r=Math.max(4,t);if(e&&e.trim().length>=r/2)return e;e=e||"";for(var n=r-e.length;n>0;n--)e+=" ";return e}function uut(e,t,r){var n=t._context.doubleClickDelay,i,a=1,o=vh.ensureSingle(e,"rect",r+"toggle",function(s){t._context.staticPlot||s.style("cursor","pointer").attr("pointer-events","all"),s.call(yM.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(o.on("mousedown",function(){i=new Date().getTime(),i-t._legendMouseDownTimen&&(a=Math.max(a-1,1)),Ile(t,s,e,a,np.event)}}))}function cut(e,t,r,n){if(t._fullData.some(function(u){let c=u.legend||"legend";return(Array.isArray(c)?c.includes(n):c===n)&&Gb.traceIs(u,"pie-like")}))return;let a=t._context.doubleClickDelay;var o,s=1;let l=vh.ensureSingle(e,"rect",n+"titletoggle",function(u){t._context.staticPlot||u.style("cursor","pointer").attr("pointer-events","all"),u.call(yM.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(l.on("mousedown",function(){o=new Date().getTime(),o-t._legendMouseDownTimea&&(s=Math.max(s-1,1));let u={event:np.event,legendId:n,data:t.data,layout:t.layout,fullData:t._fullData,fullLayout:t._fullLayout};if(s===1&&r.titleclick){if(XL.triggerHandler(t,"plotly_legendtitleclick",u)===!1)return;r._titleClickTimeout=setTimeout(function(){t._fullLayout&&Mle(t,r,r.titleclick)},a)}else s===2&&(r._titleClickTimeout&&clearTimeout(r._titleClickTimeout),t._legendMouseDownTime=0,XL.triggerHandler(t,"plotly_legendtitledoubleclick",u)!==!1&&r.titledoubleclick&&Mle(t,r,r.titledoubleclick))}))}function WL(e,t,r,n,i){n._inHover&&e.attr("data-notex",!0),Hb.convertToTspans(e,r,function(){fut(t,r,n,i)})}function fut(e,t,r,n){var i=e.data()[0][0],a=i&&i.trace.showlegend;if(Array.isArray(a)&&(a=a[i.i]!==!1),!r._inHover&&i&&!a){e.remove();return}var o=e.select("g[class*=math-group]"),s=o.node(),l=J3.getId(r);r||(r=t._fullLayout[l]);var u=r.borderwidth,c;n===Y3?c=r.title.font:i.groupTitle?c=i.groupTitle.font:c=r.font;var f=c.size*Ple,h,d;if(s){var v=ph.bBox(s);h=v.height,d=v.width,n===Y3?ph.setTranslate(o,u,u+h*.75):ph.setTranslate(o,0,h*.25)}else{var _="."+l+(n===Y3?"title":"")+"text",b=e.select(_),p=Hb.lineCount(b),k=b.node();if(h=f*p,d=k?ph.bBox(k).width:0,n===Y3)r.title.side==="left"&&(d+=Oh.itemGap*2),Hb.positionText(b,u+Oh.titlePad,u+f);else{var E=Oh.itemGap*2+r.indentation+r.itemwidth;i.groupTitle&&(E=Oh.itemGap,d-=r.indentation+r.itemwidth),Hb.positionText(b,E,-f*((p-1)/2-.3))}}n===Y3?(r._titleWidth=d,r._titleHeight=h):(i.lineHeight=f,i.height=Math.max(h,16)+3,i.width=d)}function hut(e){var t=0,r=0,n=e.title.side;return n&&(n.indexOf("left")!==-1&&(t=e._titleWidth),n.indexOf("top")!==-1&&(r=e._titleHeight)),[t,r]}function dut(e,t,r,n,i){var a=e._fullLayout,o=J3.getId(n);n||(n=a[o]);var s=a._size,l=J3.isVertical(n),u=J3.isGrouped(n),c=n.entrywidthmode==="fraction",f=n.borderwidth,h=2*f,d=Oh.itemGap,v=n.indentation+n.itemwidth+d*2,_=2*(f+d),b=YL(n),p=n.y<0||n.y===0&&b==="top",k=n.y>1||n.y===1&&b==="bottom",E=n.tracegroupgap,T={};let{orientation:L,yref:x}=n,{maxheight:C}=n,M=p||k||L!=="v"||x!=="paper";C||(C=M?.5:1);let g=M?a.height:s.h;n._maxHeight=Math.max(C>1?C:C*g,30);var P=0;n._width=0,n._height=0;var A=hut(n);if(l)r.each(function(je){var lt=je[0].height;ph.setTranslate(this,f+A[0],f+A[1]+n._height+lt/2+d),n._height+=lt,n._width=Math.max(n._width,je[0].width)}),P=v+n._width,n._width+=d+v+h,n._height+=_,u&&(t.each(function(je,lt){ph.setTranslate(this,0,lt*n.tracegroupgap)}),n._height+=(n._lgroupsLength-1)*n.tracegroupgap);else{var z=ZL(n),O=n.x<0||n.x===0&&z==="right",U=n.x>1||n.x===1&&z==="left",G=k||p,Z=a.width/2;n._maxWidth=Math.max(O?G&&z==="left"?s.l+s.w:Z:U?G&&z==="right"?s.r+s.w:Z:s.w,2*v);var j=0,N=0;r.each(function(je){var lt=jL(je,n,v);j=Math.max(j,lt),N+=lt}),P=null;var H=0;if(u){var re=0,oe=0,_e=0;t.each(function(){var je=0,lt=0;np.select(this).selectAll("g.traces").each(function(Vt){var ot=jL(Vt,n,v),ut=Vt[0].height;ph.setTranslate(this,A[0],A[1]+f+d+ut/2+lt),lt+=ut,je=Math.max(je,ot),T[Vt[0].trace.legendgroup]=je});var pt=je+d;oe>0&&pt+f+oe>n._maxWidth?(H=Math.max(H,oe),oe=0,_e+=re+E,re=lt):re=Math.max(re,lt),ph.setTranslate(this,oe,_e),oe+=pt}),n._width=Math.max(H,oe)+f,n._height=_e+re+_}else{var Ce=r.size(),Le=N+h+(Ce-1)*d=n._maxWidth&&(H=Math.max(H,Ee),ie=0,Se+=ge,n._height+=ge,ge=0),ph.setTranslate(this,A[0]+f+ie,A[1]+f+Se+lt/2+d),Ee=ie+pt+d,ie+=Vt,ge=Math.max(ge,lt)}),Le?(n._width=ie+h,n._height=ge+_):(n._width=Math.max(H,Ee)+h,n._height+=ge+_)}}n._width=Math.ceil(Math.max(n._width+A[0],n._titleWidth+2*(f+Oh.titlePad))),n._height=Math.ceil(Math.max(n._height+A[1],n._titleHeight+2*(f+Oh.itemGap))),n._effHeight=Math.min(n._height,n._maxHeight);var Ae=e._context.edits,Be=Ae.legendText||Ae.legendPosition;r.each(function(je){var lt=np.select(this).select("."+o+"toggle"),pt=je[0].height,Vt=je[0].trace.legendgroup,ot=jL(je,n,v);u&&Vt!==""&&(ot=T[Vt]);var ut=Be?v:P||ot;!l&&!c&&(ut+=d/2),ph.setRect(lt,0,-pt/2,ut,pt)});var Pe=i.select("."+o+"titletext");Pe.node()&&sut(Pe,n,f);var me=i.select("."+o+"titletoggle");if(me.size()&&Pe.node()){var De=Pe.attr("x")||0,ce=Oh.titlePad;ph.setRect(me,De-ce,f,n._titleWidth+2*ce,n._titleHeight+2*ce)}}function vut(e,t,r,n){var i=e._fullLayout,a=i[t],o=ZL(a),s=YL(a),l=a.xref==="paper",u=a.yref==="paper";e._fullLayout._reservedMargin[t]={};var c=a.y<.5?"b":"t",f=a.x<.5?"l":"r",h={r:i.width-r,l:r+a._width,b:i.height-n,t:n+a._effHeight};if(l&&u)return VB.autoMargin(e,t,{x:a.x,y:a.y,l:a._width*K3[o],r:a._width*Ele[o],b:a._effHeight*Ele[s],t:a._effHeight*K3[s]});l?e._fullLayout._reservedMargin[t][c]=h[c]:u||a.orientation==="v"?e._fullLayout._reservedMargin[t][f]=h[f]:e._fullLayout._reservedMargin[t][c]=h[c]}function ZL(e){return vh.isRightAnchor(e)?"right":vh.isCenterAnchor(e)?"center":"left"}function YL(e){return vh.isBottomAnchor(e)?"bottom":vh.isMiddleAnchor(e)?"middle":"top"}});var ZB=ye(XB=>{"use strict";var jb=Oa(),Py=Eo(),Dle=fd(),zf=Dr(),put=zf.pushUnique,jB=zf.strTranslate,gut=zf.strRotate,mut=k3(),A0=Zl(),yut=ale(),Am=So(),vd=ka(),KL=yv(),Sm=ho(),_ut=Rh().zindexSeparator,Q3=qa(),kg=ip(),Wb=NS(),xut=PB(),but=HB(),Vle=Wb.YANGLE,WB=Math.PI*Vle/180,wut=1/Math.sin(WB),Tut=Math.cos(WB),Aut=Math.sin(WB),Qc=Wb.HOVERARROWSIZE,sl=Wb.HOVERTEXTPAD,Fle={box:!0,ohlc:!0,violin:!0,candlestick:!0},Sut={scatter:!0,scattergl:!0,splom:!0};function zle(e,t){return e.distance-t.distance}XB.hover=function(t,r,n,i){t=zf.getGraphDiv(t);var a=r.target;zf.throttle(t._fullLayout._uid+Wb.HOVERID,Wb.HOVERMINTIME,function(){Mut(t,r,n,i,a)})};XB.loneHover=function(t,r){var n=!0;Array.isArray(t)||(n=!1,t=[t]);var i=r.gd,a=Xle(i),o=Zle(i),s=t.map(function(b){var p=b._x0||b.x0||b.x||0,k=b._x1||b.x1||b.x||0,E=b._y0||b.y0||b.y||0,T=b._y1||b.y1||b.y||0,L=b.eventData;if(L){var x=Math.min(p,k),C=Math.max(p,k),M=Math.min(E,T),g=Math.max(E,T),P=b.trace;if(Q3.traceIs(P,"gl3d")){var A=i._fullLayout[P.scene]._scene.container,z=A.offsetLeft,O=A.offsetTop;x+=z,C+=z,M+=O,g+=O}L.bbox={x0:x+o,x1:C+o,y0:M+a,y1:g+a},r.inOut_bbox&&r.inOut_bbox.push(L.bbox)}else L=!1;return{color:b.color||vd.defaultLine,x0:b.x0||b.x||0,x1:b.x1||b.x||0,y0:b.y0||b.y||0,y1:b.y1||b.y||0,xLabel:b.xLabel,yLabel:b.yLabel,zLabel:b.zLabel,text:b.text,name:b.name,idealAlign:b.idealAlign,borderColor:b.borderColor,fontFamily:b.fontFamily,fontSize:b.fontSize,fontColor:b.fontColor,fontWeight:b.fontWeight,fontStyle:b.fontStyle,fontVariant:b.fontVariant,nameLength:b.nameLength,textAlign:b.textAlign,trace:b.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:b.hovertemplate||!1,hovertemplateLabels:b.hovertemplateLabels||!1,eventData:L}}),l=!1,u=Hle(s,{gd:i,hovermode:"closest",rotateLabels:l,bgColor:r.bgColor||vd.background,container:jb.select(r.container),outerContainer:r.outerContainer||r.container}),c=u.hoverLabels,f=5,h=0,d=0;c.sort(function(b,p){return b.y0-p.y0}).each(function(b,p){var k=b.y0-b.by/2;k-fC[0]._length||ce<0||ce>M[0]._length)return KL.unhoverRaw(e,t)}if(t.pointerX=De+C[0]._offset,t.pointerY=ce+M[0]._offset,"xval"in t?Z=kg.flat(a,t.xval):Z=kg.p2c(C,De),"yval"in t?j=kg.flat(a,t.yval):j=kg.p2c(M,ce),!Py(Z[0])||!Py(j[0]))return zf.warn("Fx.hover failed",t,e),KL.unhoverRaw(e,t)}var pt=1/0;function Vt(wi,On){for(H=0;HEe&&(U.splice(0,Ee),pt=U[0].distance),f&&O!==0&&U.length===0){Se.distance=O,Se.index=!1;var Ut=oe._module.hoverPoints(Se,ge,ie,"closest",{hoverLayer:s._hoverlayer});if(Ut&&(Ut=Ut.filter(function(ri){return ri.spikeDistance<=O})),Ut&&Ut.length){var wt,rr=Ut.filter(function(ri){return ri.xa.showspikes&&ri.xa.spikesnap!=="hovered data"});if(rr.length){var nr=rr[0];Py(nr.x0)&&Py(nr.y0)&&(wt=ut(nr),(!Ae.vLinePoint||Ae.vLinePoint.spikeDistance>wt.spikeDistance)&&(Ae.vLinePoint=wt))}var Er=Ut.filter(function(ri){return ri.ya.showspikes&&ri.ya.spikesnap!=="hovered data"});if(Er.length){var Xr=Er[0];Py(Xr.x0)&&Py(Xr.y0)&&(wt=ut(Xr),(!Ae.hLinePoint||Ae.hLinePoint.spikeDistance>wt.spikeDistance)&&(Ae.hLinePoint=wt))}}}}}Vt();function ot(wi,On,qn){for(var Fn=null,ra=1/0,la,Ut=0;Utwi.trace.index===It.trace.index):U=[It];var mt=U.length,er=Ule("x",It,s),lr=Ule("y",It,s);Vt(er,lr);var wr=[],Lr={},ti=0,Br=function(wi){var On=Fle[wi.trace.type]?Gle(wi):wi.trace.index;if(!Lr[On])ti++,Lr[On]=ti,wr.push(wi);else{var qn=Lr[On]-1,Fn=wr[qn];qn>0&&Math.abs(wi.distance)mt-1;Vr--)Br(U[Vr]);U=wr,sr()}var dt=e._hoverdata,Ge=[],Je=Xle(e),We=Zle(e);for(let wi of U){var tt=kg.makeEventData(wi,wi.trace,wi.cd);if(wi.hovertemplate!==!1){var xt=!1;wi.cd[wi.index]&&wi.cd[wi.index].ht&&(xt=wi.cd[wi.index].ht),wi.hovertemplate=xt||wi.trace.hovertemplate||!1}if(wi.xa&&wi.ya){var Ie=wi.x0+wi.xa._offset,xe=wi.x1+wi.xa._offset,ke=wi.y0+wi.ya._offset,vt=wi.y1+wi.ya._offset,ir=Math.min(Ie,xe),ar=Math.max(Ie,xe),vr=Math.min(ke,vt),ii=Math.max(ke,vt);tt.bbox={x0:ir+We,x1:ar+We,y0:vr+Je,y1:ii+Je}}wi.eventData=[tt],Ge.push(tt)}e._hoverdata=Ge;var pi=h==="y"&&(G.length>1||U.length>1)||h==="closest"&&Be&&U.length>1,$r=vd.combine(s.plot_bgcolor||vd.background,s.paper_bgcolor),di=Hle(U,{gd:e,hovermode:h,rotateLabels:pi,bgColor:$r,container:s._hoverlayer,outerContainer:s._paper.node(),commonLabelOpts:s.hoverlabel,hoverdistance:s.hoverdistance}),ji=di.hoverLabels;if(kg.isUnifiedHover(h)||(kut(ji,pi,s,di.commonLabelBoundingBox),Wle(ji,pi,s._invScaleX,s._invScaleY)),i&&i.tagName){var In=Q3.getComponentMethod("annotations","hasClickToShow")(e,Ge);yut(jb.select(i),In?"pointer":"")}!i||n||!Put(e,t,dt)||(dt&&e.emit("plotly_unhover",{event:t,points:dt}),e.emit("plotly_hover",{event:t,points:e._hoverdata,xaxes:C,yaxes:M,xvals:Z,yvals:j}))}function Gle(e){return[e.trace.index,e.index,e.x0,e.y0,e.name,e.attr,e.xa?e.xa._id:"",e.ya?e.ya._id:""].join(",")}var Eut=/([\s\S]*)<\/extra>/;function Hle(e,t){var r=t.gd,n=r._fullLayout,i=t.hovermode,a=t.rotateLabels,o=t.bgColor,s=t.container,l=t.outerContainer,u=t.commonLabelOpts||{};if(e.length===0)return[[]];var c=t.fontFamily||Wb.HOVERFONT,f=t.fontSize||Wb.HOVERFONTSIZE,h=t.fontWeight||n.font.weight,d=t.fontStyle||n.font.style,v=t.fontVariant||n.font.variant,_=t.fontTextcase||n.font.textcase,b=t.fontLineposition||n.font.lineposition,p=t.fontShadow||n.font.shadow,k=e[0],E=k.xa,T=k.ya,L=i.charAt(0),x=L+"Label",C=k[x];if(C===void 0&&E.type==="multicategory")for(var M=0;Mn.width-Je&&(We=n.width-Je),It.attr("d","M"+(Vr-We)+",0L"+(Vr-We+Qc)+","+Ge+Qc+"H"+Je+"v"+Ge+(sl*2+Br.height)+"H"+-Je+"V"+Ge+Qc+"H"+(Vr-We-Qc)+"Z"),Vr=We,H.minX=Vr-Je,H.maxX=Vr+Je,E.side==="top"?(H.minY=dt-(sl*2+Br.height),H.maxY=dt-sl):(H.minY=dt+sl,H.maxY=dt+(sl*2+Br.height))}else{var tt,xt,Ie;T.side==="right"?(tt="start",xt=1,Ie="",Vr=E._offset+E._length):(tt="end",xt=-1,Ie="-",Vr=E._offset),dt=T._offset+(k.y0+k.y1)/2,mt.attr("text-anchor",tt),It.attr("d","M0,0L"+Ie+Qc+","+Qc+"V"+(sl+Br.height/2)+"h"+Ie+(sl*2+Br.width)+"V-"+(sl+Br.height/2)+"H"+Ie+Qc+"V-"+Qc+"Z"),H.minY=dt-(sl+Br.height/2),H.maxY=dt+(sl+Br.height/2),T.side==="right"?(H.minX=Vr+Qc,H.maxX=Vr+Qc+(sl*2+Br.width)):(H.minX=Vr-Qc-(sl*2+Br.width),H.maxX=Vr-Qc);var xe=Br.height/2,ke=P-Br.top-xe,vt="clip"+n._uid+"commonlabel"+T._id,ir;if(VrIt.hoverinfo!=="none");if(_t.length===0)return[];var re=n.hoverlabel,oe=re.font,_e=_t[0],Ce=((i==="x unified"?_e.xa:_e.ya).unifiedhovertitle||{}).text,Le=Ce?zf.hovertemplateString({data:i==="x unified"?[{xa:_e.xa,x:_e.xVal}]:[{ya:_e.ya,y:_e.yVal}],fallback:_e.trace.hovertemplatefallback,locale:n._d3locale,template:Ce}):C,ge={showlegend:!0,legend:{title:{text:Le,font:oe},font:oe,bgcolor:re.bgcolor,bordercolor:re.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:n.legend?n.legend.traceorder:void 0,orientation:"v"}},ie={font:oe};xut(ge,ie,r._fullData);var Se=ie.legend;Se.entries=[];for(var Ee=0;Ee<_t.length;Ee++){var Ae=_t[Ee];if(Ae.hoverinfo!=="none"){var Be=Ole(Ae,!0,i,n,C),Pe=Be[0],me=Be[1];Ae.name=me,me!==""?Ae.text=me+" : "+Pe:Ae.text=Pe;var De=Ae.cd[Ae.index];De&&(De.mc&&(Ae.mc=De.mc),De.mcc&&(Ae.mc=De.mcc),De.mlc&&(Ae.mlc=De.mlc),De.mlcc&&(Ae.mlc=De.mlcc),De.mlw&&(Ae.mlw=De.mlw),De.mrc&&(Ae.mrc=De.mrc),De.dir&&(Ae.dir=De.dir)),Ae._distinct=!0,Se.entries.push([Ae])}}Se.entries.sort(function(It,mt){return It[0].trace.index-mt[0].trace.index}),Se.layer=s,Se._inHover=!0,Se._groupTitleFont=re.grouptitlefont,but(r,Se);var ce=s.select("g.legend"),je=$3(r,ce.node()),lt=je.width+2*sl,pt=je.height+2*sl,Vt=_t[0],ot=(Vt.x0+Vt.x1)/2,ut=(Vt.y0+Vt.y1)/2,Wt=!(Q3.traceIs(Vt.trace,"bar-like")||Q3.traceIs(Vt.trace,"box-violin")),Nt,$t;L==="y"?Wt?($t=ut-sl,Nt=ut+sl):($t=Math.min.apply(null,_t.map(function(It){return Math.min(It.y0,It.y1)})),Nt=Math.max.apply(null,_t.map(function(It){return Math.max(It.y0,It.y1)}))):$t=Nt=zf.mean(_t.map(function(It){return(It.y0+It.y1)/2}))-pt/2;var sr,Tr;L==="x"?Wt?(sr=ot+sl,Tr=ot-sl):(sr=Math.max.apply(null,_t.map(function(It){return Math.max(It.x0,It.x1)})),Tr=Math.min.apply(null,_t.map(function(It){return Math.min(It.x0,It.x1)}))):sr=Tr=zf.mean(_t.map(function(It){return(It.x0+It.x1)/2}))-lt/2;var fr=E._offset,$e=T._offset;Nt+=$e,sr+=fr,Tr+=fr-lt,$t+=$e-pt;var St,Qt;return sr+lt=0?St=sr:Tr+lt=0?St=Tr:fr+lt=0?Qt=Nt:$t+pt=0?Qt=$t:$e+pt=0,(_t.idealAlign==="top"||!ii)&&pi?(Ie-=ke/2,_t.anchor="end"):ii?(Ie+=ke/2,_t.anchor="start"):_t.anchor="middle",_t.crossPos=Ie;else{if(_t.pos=Ie,ii=xt+xe/2+vr<=A,pi=xt-xe/2-vr>=0,(_t.idealAlign==="left"||!ii)&&pi)xt-=xe/2,_t.anchor="end";else if(ii)xt+=xe/2,_t.anchor="start";else{_t.anchor="middle";var $r=vr/2,di=xt+$r-A,ji=xt-$r;di>0&&(xt-=di),ji<0&&(xt+=-ji)}_t.crossPos=xt}dt.attr("text-anchor",_t.anchor),Je&&Ge.attr("text-anchor",_t.anchor),It.attr("transform",jB(xt,Ie)+(a?gut(Vle):""))}),{hoverLabels:Gt,commonLabelBoundingBox:H}}function Ole(e,t,r,n,i,a){var f,h;var o="",s="";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=zf.templateString(e.name,e.trace._meta)),o=Nle(e.name,e.nameLength));var l=r.charAt(0),u=l==="x"?"y":"x";e.zLabel!==void 0?(e.xLabel!==void 0&&(s+="x: "+e.xLabel+"
"),e.yLabel!==void 0&&(s+="y: "+e.yLabel+"
"),e.trace.type!=="choropleth"&&e.trace.type!=="choroplethmapbox"&&e.trace.type!=="choroplethmap"&&(s+=(s?"z: ":"")+e.zLabel)):t&&e[l+"Label"]===i?s=e[u+"Label"]||"":e.xLabel===void 0?e.yLabel!==void 0&&e.trace.type!=="scattercarpet"&&(s=e.yLabel):e.yLabel===void 0?s=e.xLabel:s="("+e.xLabel+", "+e.yLabel+")",(e.text||e.text===0)&&!Array.isArray(e.text)&&(s+=(s?"
":"")+e.text),e.extraText!==void 0&&(s+=(s?"
":"")+e.extraText),a&&s===""&&!e.hovertemplate&&(o===""&&a.remove(),s=o),(h=(f=e.trace)==null?void 0:f.hoverlabel)!=null&&h.split&&(e.hovertemplate="");let{hovertemplate:c=!1}=e;if(c){let d=e.hovertemplateLabels||e;e[l+"Label"]!==i&&(d[l+"other"]=d[l+"Val"],d[l+"otherLabel"]=d[l+"Label"]),s=zf.hovertemplateString({data:[e.eventData[0]||{},e.trace._meta],fallback:e.trace.hovertemplatefallback,labels:d,locale:n._d3locale,template:c}),s=s.replace(Eut,(v,_)=>(o=Nle(_,e.nameLength),""))}return[s,o]}function kut(e,t,r,n){var i=t?"xa":"ya",a=t?"ya":"xa",o=0,s=1,l=e.size(),u=new Array(l),c=0,f=n.minX,h=n.maxX,d=n.minY,v=n.maxY,_=function(Z){return Z*r._invScaleX},b=function(Z){return Z*r._invScaleY};e.each(function(Z){var j=Z[i],N=Z[a],H=j._id.charAt(0)==="x",re=j.range;c===0&&re&&re[0]>re[1]!==H&&(s=-1);var oe=0,_e=H?r.width:r.height;if(r.hovermode==="x"||r.hovermode==="y"){var Ce=jle(Z,t),Le=Z.anchor,ge=Le==="end"?-1:1,ie,Se;if(Le==="middle")ie=Z.crossPos+(H?b(Ce.y-Z.by/2):_(Z.bx/2+Z.tx2width/2)),Se=ie+(H?b(Z.by):_(Z.bx));else if(H)ie=Z.crossPos+b(Qc+Ce.y)-b(Z.by/2-Qc),Se=ie+b(Z.by);else{var Ee=_(ge*Qc+Ce.x),Ae=Ee+_(ge*Z.bx);ie=Z.crossPos+Math.min(Ee,Ae),Se=Z.crossPos+Math.max(Ee,Ae)}H?d!==void 0&&v!==void 0&&Math.min(Se,v)-Math.max(ie,d)>1&&(N.side==="left"?(oe=N._mainLinePosition,_e=r.width):_e=N._mainLinePosition):f!==void 0&&h!==void 0&&Math.min(Se,h)-Math.max(ie,f)>1&&(N.side==="top"?(oe=N._mainLinePosition,_e=r.height):_e=N._mainLinePosition)}u[c++]=[{datum:Z,traceIndex:Z.trace.index,dp:0,pos:Z.pos,posref:Z.posref,size:Z.by*(H?wut:1)/2,pmin:oe,pmax:_e}]}),u.sort(function(Z,j){return Z[0].posref-j[0].posref||s*(j[0].traceIndex-Z[0].traceIndex)});var p,k,E,T,L,x,C;function M(Z){var j=Z[0],N=Z[Z.length-1];if(k=j.pmin-j.pos-j.dp+j.size,E=N.pos+N.dp+N.size-j.pmax,k>.01){for(L=Z.length-1;L>=0;L--)Z[L].dp+=k;p=!1}if(!(E<.01)){if(k<-.01){for(L=Z.length-1;L>=0;L--)Z[L].dp-=E;p=!1}if(p){var H=0;for(T=0;Tj.pmax&&H++;for(T=Z.length-1;T>=0&&!(H<=0);T--)x=Z[T],x.pos>j.pmax-1&&(x.del=!0,H--);for(T=0;T=0;L--)Z[L].dp-=E;for(T=Z.length-1;T>=0&&!(H<=0);T--)x=Z[T],x.pos+x.dp+x.size>j.pmax&&(x.del=!0,H--)}}}for(;!p&&o<=l;){for(o++,p=!0,T=0;T.01){for(L=P.length-1;L>=0;L--)P[L].dp+=k;for(g.push.apply(g,P),u.splice(T+1,1),C=0,L=g.length-1;L>=0;L--)C+=g[L].dp;for(E=C/g.length,L=g.length-1;L>=0;L--)g[L].dp-=E;p=!1}else T++}u.forEach(M)}for(T=u.length-1;T>=0;T--){var O=u[T];for(L=O.length-1;L>=0;L--){var U=O[L],G=U.datum;G.offset=U.dp,G.del=U.del}}}function jle(e,t){var r=0,n=e.offset;return t&&(n*=-Aut,r=e.offset*Tut),{x:r,y:n}}function Cut(e){var t={start:1,end:-1,middle:0}[e.anchor],r=t*(Qc+sl),n=r+t*(e.txwidth+sl),i=e.anchor==="middle";return i&&(r-=e.tx2width/2,n+=e.txwidth/2+sl),{alignShift:t,textShiftX:r,text2ShiftX:n}}function Wle(e,t,r,n){var i=function(o){return o*r},a=function(o){return o*n};e.each(function(o){var s=jb.select(this);if(o.del)return s.remove();var l=s.select("text.nums"),u=o.anchor,c=u==="end"?-1:1,f=Cut(o),h=jle(o,t),d=h.x,v=h.y,_=u==="middle",b="hoverlabel"in o.trace?o.trace.hoverlabel.showarrow:!0,p;_?p="M-"+i(o.bx/2+o.tx2width/2)+","+a(v-o.by/2)+"h"+i(o.bx)+"v"+a(o.by)+"h-"+i(o.bx)+"Z":b?p="M0,0L"+i(c*Qc+d)+","+a(Qc+v)+"v"+a(o.by/2-Qc)+"h"+i(c*o.bx)+"v-"+a(o.by)+"H"+i(c*Qc+d)+"V"+a(v-Qc)+"Z":p="M"+i(c*Qc+d)+","+a(v-o.by/2)+"h"+i(c*o.bx)+"v"+a(o.by)+"h"+i(-c*o.bx)+"Z",s.select("path").attr("d",p);var k=d+f.textShiftX,E=v+o.ty0-o.by/2+sl,T=o.textAlign||"auto";T!=="auto"&&(T==="left"&&u!=="start"?(l.attr("text-anchor","start"),k=_?-o.bx/2-o.tx2width/2+sl:-o.bx-sl):T==="right"&&u!=="end"&&(l.attr("text-anchor","end"),k=_?o.bx/2-o.tx2width/2-sl:o.bx+sl)),l.call(A0.positionText,i(k),a(E)),o.tx2width&&(s.select("text.name").call(A0.positionText,i(f.text2ShiftX+f.alignShift*sl+d),a(v+o.ty0-o.by/2+sl)),s.select("rect").call(Am.setRect,i(f.text2ShiftX+(f.alignShift-1)*o.tx2width/2+d),a(v-o.by/2-1),i(o.tx2width),a(o.by+2)))})}function Lut(e,t){var r=e.index,n=e.trace||{},i=e.cd[0],a=e.cd[r]||{};function o(h){return h||Py(h)&&h===0}var s=Array.isArray(r)?function(h,d){var v=zf.castOption(i,r,h);return o(v)?v:zf.extractOption({},n,"",d)}:function(h,d){return zf.extractOption(a,n,h,d)};function l(h,d,v){var _=s(d,v);o(_)&&(e[h]=_)}if(l("hoverinfo","hi","hoverinfo"),l("bgcolor","hbg","hoverlabel.bgcolor"),l("borderColor","hbc","hoverlabel.bordercolor"),l("fontFamily","htf","hoverlabel.font.family"),l("fontSize","hts","hoverlabel.font.size"),l("fontColor","htc","hoverlabel.font.color"),l("fontWeight","htw","hoverlabel.font.weight"),l("fontStyle","hty","hoverlabel.font.style"),l("fontVariant","htv","hoverlabel.font.variant"),l("nameLength","hnl","hoverlabel.namelength"),l("textAlign","hta","hoverlabel.align"),e.posref=t==="y"||t==="closest"&&n.orientation==="h"?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=zf.constrain(e.x0,0,e.xa._length),e.x1=zf.constrain(e.x1,0,e.xa._length),e.y0=zf.constrain(e.y0,0,e.ya._length),e.y1=zf.constrain(e.y1,0,e.ya._length),e.xLabelVal!==void 0&&(e.xLabel="xLabel"in e?e.xLabel:Sm.hoverLabelText(e.xa,e.xLabelVal,n.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),e.yLabelVal!==void 0&&(e.yLabel="yLabel"in e?e.yLabel:Sm.hoverLabelText(e.ya,e.yLabelVal,n.yhoverformat),e.yVal=e.ya.c2d(e.yLabelVal)),e.zLabelVal!==void 0&&e.zLabel===void 0&&(e.zLabel=String(e.zLabelVal)),!isNaN(e.xerr)&&!(e.xa.type==="log"&&e.xerr<=0)){var u=Sm.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;e.xerrneg!==void 0?e.xLabel+=" +"+u+" / -"+Sm.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xB1 "+u,t==="x"&&(e.distance+=1)}if(!isNaN(e.yerr)&&!(e.ya.type==="log"&&e.yerr<=0)){var c=Sm.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;e.yerrneg!==void 0?e.yLabel+=" +"+c+" / -"+Sm.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xB1 "+c,t==="y"&&(e.distance+=1)}var f=e.hoverinfo||e.trace.hoverinfo;return f&&f!=="all"&&(f=Array.isArray(f)?f:f.split("+"),f.indexOf("x")===-1&&(e.xLabel=void 0),f.indexOf("y")===-1&&(e.yLabel=void 0),f.indexOf("z")===-1&&(e.zLabel=void 0),f.indexOf("text")===-1&&(e.text=void 0),f.indexOf("name")===-1&&(e.name=void 0)),e}function qle(e,t,r){var n=r.container,i=r.fullLayout,a=i._size,o=r.event,s=!!t.hLinePoint,l=!!t.vLinePoint,u,c;if(n.selectAll(".spikeline").remove(),!!(l||s)){var f=vd.combine(i.plot_bgcolor,i.paper_bgcolor);if(s){var h=t.hLinePoint,d,v;u=h&&h.xa,c=h&&h.ya;var _=c.spikesnap;_==="cursor"?(d=o.pointerX,v=o.pointerY):(d=u._offset+h.x,v=c._offset+h.y);var b=Dle.readability(h.color,f)<1.5?vd.contrast(f):h.color,p=c.spikemode,k=c.spikethickness,E=c.spikecolor||b,T=Sm.getPxPosition(e,c),L,x;if(p.indexOf("toaxis")!==-1||p.indexOf("across")!==-1){if(p.indexOf("toaxis")!==-1&&(L=T,x=d),p.indexOf("across")!==-1){var C=c._counterDomainMin,M=c._counterDomainMax;c.anchor==="free"&&(C=Math.min(C,c.position),M=Math.max(M,c.position)),L=a.l+C*a.w,x=a.l+M*a.w}n.insert("line",":first-child").attr({x1:L,x2:x,y1:v,y2:v,"stroke-width":k,stroke:E,"stroke-dasharray":Am.dashStyle(c.spikedash,k)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:L,x2:x,y1:v,y2:v,"stroke-width":k+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}p.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:T+(c.side!=="right"?k:-k),cy:v,r:k,fill:E}).classed("spikeline",!0)}if(l){var g=t.vLinePoint,P,A;u=g&&g.xa,c=g&&g.ya;var z=u.spikesnap;z==="cursor"?(P=o.pointerX,A=o.pointerY):(P=u._offset+g.x,A=c._offset+g.y);var O=Dle.readability(g.color,f)<1.5?vd.contrast(f):g.color,U=u.spikemode,G=u.spikethickness,Z=u.spikecolor||O,j=Sm.getPxPosition(e,u),N,H;if(U.indexOf("toaxis")!==-1||U.indexOf("across")!==-1){if(U.indexOf("toaxis")!==-1&&(N=j,H=A),U.indexOf("across")!==-1){var re=u._counterDomainMin,oe=u._counterDomainMax;u.anchor==="free"&&(re=Math.min(re,u.position),oe=Math.max(oe,u.position)),N=a.t+(1-oe)*a.h,H=a.t+(1-re)*a.h}n.insert("line",":first-child").attr({x1:P,x2:P,y1:N,y2:H,"stroke-width":G,stroke:Z,"stroke-dasharray":Am.dashStyle(u.spikedash,G)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:P,x2:P,y1:N,y2:H,"stroke-width":G+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}U.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:P,cy:j-(u.side!=="top"?G:-G),r:G,fill:Z}).classed("spikeline",!0)}}}function Put(e,t,r){if(!r||r.length!==e._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],a=e._hoverdata[n];if(i.curveNumber!==a.curveNumber||String(i.pointNumber)!==String(a.pointNumber)||String(i.pointNumbers)!==String(a.pointNumbers)||i.binNumber!==a.binNumber)return!0}return!1}function Ble(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function Nle(e,t){return A0.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function Iut(e,t){for(var r=t.charAt(0),n=[],i=[],a=[],o=0;oe.offsetTop+e.clientTop,Zle=e=>e.offsetLeft+e.clientLeft;function $3(e,t){var r=e._fullLayout,n=t.getBoundingClientRect(),i=n.left,a=n.top,o=i+n.width,s=a+n.height,l=zf.apply3DTransform(r._invTransform)(i,a),u=zf.apply3DTransform(r._invTransform)(o,s),c=l[0],f=l[1],h=u[0],d=u[1];return{x:c,y:f,width:h-c,height:d-f,top:Math.min(f,d),left:Math.min(c,h),right:Math.max(c,h),bottom:Math.max(f,d)}}});var _M=ye((Ear,Yle)=>{"use strict";var Rut=Dr(),Dut=ka(),Fut=ip().isUnifiedHover;Yle.exports=function(t,r,n,i){i=i||{};var a=r.legend;function o(s){i.font[s]||(i.font[s]=a?r.legend.font[s]:r.font[s])}r&&Fut(r.hovermode)&&(i.font||(i.font={}),o("size"),o("family"),o("color"),o("weight"),o("style"),o("variant"),a?(i.bgcolor||(i.bgcolor=Dut.combine(r.legend.bgcolor,r.paper_bgcolor)),i.bordercolor||(i.bordercolor=r.legend.bordercolor)):i.bgcolor||(i.bgcolor=r.paper_bgcolor)),n("hoverlabel.bgcolor",i.bgcolor),n("hoverlabel.bordercolor",i.bordercolor),n("hoverlabel.namelength",i.namelength),n("hoverlabel.showarrow",i.showarrow),Rut.coerceFont(n,"hoverlabel.font",i.font),n("hoverlabel.align",i.align)}});var Jle=ye((kar,Kle)=>{"use strict";var zut=Dr(),Out=_M(),qut=W1();Kle.exports=function(t,r){function n(i,a){return zut.coerce(t,r,qut,i,a)}Out(t,r,n)}});var eue=ye((Car,Qle)=>{"use strict";var $le=Dr(),But=v3(),Nut=_M();Qle.exports=function(t,r,n,i){function a(s,l){return $le.coerce(t,r,But,s,l)}var o=$le.extendFlat({},i.hoverlabel);r.hovertemplate&&(o.namelength=-1),Nut(t,r,a,o)}});var YB=ye((Lar,tue)=>{"use strict";var Uut=Dr(),Vut=W1();tue.exports=function(t,r){function n(i,a){return r[i]!==void 0?r[i]:Uut.coerce(t,r,Vut,i,a)}return n("clickmode"),n("hoversubplots"),n("hovermode")}});var nue=ye((Par,iue)=>{"use strict";var rue=Dr(),Gut=W1(),Hut=YB(),jut=_M();iue.exports=function(t,r){function n(c,f){return rue.coerce(t,r,Gut,c,f)}var i=Hut(t,r);i&&(n("hoverdistance"),n("spikedistance"));var a=n("dragmode");a==="select"&&n("selectdirection");var o=r._has("mapbox"),s=r._has("map"),l=r._has("geo"),u=r._basePlotModules.length;r.dragmode==="zoom"&&((o||s||l)&&u===1||(o||s)&&l&&u===2)&&(r.dragmode="pan"),jut(t,r,n),rue.coerceFont(n,"hoverlabel.grouptitlefont",r.hoverlabel.font)}});var sue=ye((Iar,oue)=>{"use strict";var KB=Dr(),aue=qa();oue.exports=function(t){var r=t.calcdata,n=t._fullLayout;function i(u){return function(c){return KB.coerceHoverinfo({hoverinfo:c},{_module:u._module},n)}}for(var a=0;a{"use strict";var Xut=qa(),Zut=ZB().hover;lue.exports=function(t,r,n){var i=Xut.getComponentMethod("annotations","onClick")(t,t._hoverdata);n!==void 0&&Zut(t,r,n,!0);function a(){t.emit("plotly_click",{points:t._hoverdata,event:r})}t._hoverdata&&r&&r.target&&(i&&i.then?i.then(a):a(),r.stopImmediatePropagation&&r.stopImmediatePropagation())}});var vf=ye((Dar,hue)=>{"use strict";var Yut=Oa(),JL=Dr(),Kut=yv(),xM=ip(),cue=W1(),fue=ZB();hue.exports={moduleType:"component",name:"fx",constants:NS(),schema:{layout:cue},attributes:v3(),layoutAttributes:cue,supplyLayoutGlobalDefaults:Jle(),supplyDefaults:eue(),supplyLayoutDefaults:nue(),calc:sue(),getDistanceFunction:xM.getDistanceFunction,getClosest:xM.getClosest,inbox:xM.inbox,quadrature:xM.quadrature,appendArrayPointValue:xM.appendArrayPointValue,castHoverOption:$ut,castHoverinfo:Qut,hover:fue.hover,unhover:Kut.unhover,loneHover:fue.loneHover,loneUnhover:Jut,click:uue()};function Jut(e){var t=JL.isD3Selection(e)?e:Yut.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()}function $ut(e,t,r){return JL.castOption(e,t,"hoverlabel."+r)}function Qut(e,t,r){function n(i){return JL.coerceHoverinfo({hoverinfo:i},{_module:e._module},t)}return JL.castOption(e,r,"hoverinfo",n)}});var Cg=ye(Iy=>{"use strict";Iy.selectMode=function(e){return e==="lasso"||e==="select"};Iy.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"};Iy.openMode=function(e){return e==="drawline"||e==="drawopenpath"};Iy.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"};Iy.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"};Iy.selectingOrDrawing=function(e){return Iy.freeMode(e)||Iy.rectMode(e)}});var bM=ye((zar,due)=>{"use strict";due.exports=function(t){var r=t._fullLayout;r._glcanvas&&r._glcanvas.size()&&r._glcanvas.each(function(n){n.regl&&n.regl.clear({color:!0,depth:!0})})}});var $L=ye((Oar,vue)=>{"use strict";vue.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:[""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}});var eP=ye((qar,pue)=>{"use strict";var QL=32;pue.exports={CIRCLE_SIDES:QL,i000:0,i090:QL/4,i180:QL/2,i270:QL/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}});var tP=ye((Bar,mue)=>{"use strict";var ect=Dr().strTranslate;function gue(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}function tct(e,t){switch(e.type){case"log":return e.d2p(t);case"date":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}}function rct(e){var t=e._id.charAt(0)==="y"?1:0;return function(r){return gue(e,r[t])}}function ict(e){return ect(e.xaxis._offset,e.yaxis._offset)}mue.exports={p2r:gue,r2p:tct,axValue:rct,getTransform:ict}});var m_=ye(Ry=>{"use strict";var nct=nM(),xue=eP(),eT=xue.CIRCLE_SIDES,JB=xue.SQRT2,bue=tP(),yue=bue.p2r,_ue=bue.r2p,act=[0,3,4,5,6,1,2],oct=[0,3,4,1,2];Ry.writePaths=function(e){var t=e.length;if(!t)return"M0,0Z";for(var r="",n=0;n0&&l{"use strict";var wue=hf(),Eue=Cg(),sct=Eue.drawMode,lct=Eue.openMode,tT=eP(),Tue=tT.i000,Aue=tT.i090,Sue=tT.i180,Mue=tT.i270,uct=tT.cos45,cct=tT.sin45,kue=tP(),iP=kue.p2r,y_=kue.r2p,fct=o_(),hct=fct.clearOutline,nP=m_(),dct=nP.readPaths,vct=nP.writePaths,pct=nP.ellipseOver,gct=nP.fixDatesForPaths;function mct(e,t){if(e.length){var r=e[0][0];if(r){var n=t.gd,i=t.isActiveShape,a=t.dragmode,o=(n.layout||{}).shapes||[];if(!sct(a)&&i!==void 0){var s=n._fullLayout._activeShapeIndex;if(s{"use strict";var yct=Cg(),_ct=yct.selectMode,xct=o_(),bct=xct.clearOutline,$B=m_(),wct=$B.readPaths,Tct=$B.writePaths,Act=$B.fixDatesForPaths;Pue.exports=function(t,r){if(t.length){var n=t[0][0];if(n){var i=n.getAttribute("d"),a=r.gd,o=a._fullLayout.newselection,s=r.plotinfo,l=s.xaxis,u=s.yaxis,c=r.isActiveSelection,f=r.dragmode,h=(a.layout||{}).selections||[];if(!_ct(f)&&c!==void 0){var d=a._fullLayout._activeSelectionIndex;if(d{"use strict";Iue.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:3},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}});var x_=ye(Jd=>{"use strict";var Mm=TM(),Rue=Dr(),__=ho();Jd.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(t){return t}};Jd.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(t){return t}};Jd.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace("_"," ")),e(t)}};Jd.encodeDate=function(e){return function(t){return e(t).replace(" ","_")}};Jd.extractPathCoords=function(e,t,r){var n=[],i=e.match(Mm.segmentRE);return i.forEach(function(a){var o=t[a.charAt(0)].drawn;if(o!==void 0){var s=a.slice(1).match(Mm.paramRE);if(!(!s||s.length{let s=o.charAt(0),l=i[s].drawn!==void 0;return a+(l?1:0)},0)};Jd.getDataToPixel=function(e,t,r,n,i){var a=e._fullLayout._size,o;if(t)if(i==="domain")o=function(l){return t._length*(n?1-l:l)+t._offset};else{var s=Jd.shapePositionToRange(t);o=function(l){var u=Dy(t,r);return t._offset+t.r2p(s(l,!0))+u},t.type==="date"&&(o=Jd.decodeDate(o))}else n?o=function(l){return a.t+a.h*(1-l)}:o=function(l){return a.l+a.w*l};return o};Jd.getPixelToData=function(e,t,r,n){var i=e._fullLayout._size,a;if(t)if(n==="domain")a=function(s){var l=(s-t._offset)/t._length;return r?1-l:l};else{var o=Jd.rangeToShapePosition(t);a=function(s){return o(t.p2r(s-t._offset))}}else r?a=function(s){return 1-(s-i.t)/i.h}:a=function(s){return(s-i.l)/i.w};return a};Jd.roundPositionForSharpStrokeRendering=function(e,t){var r=Math.round(t%2)===1,n=Math.round(e);return r?n+.5:n};Jd.makeShapesOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.shapes[t]||{},n=e._fullLayout._plots[r.xref+r.yref],i=!!n;return i?n._hadPlotinfo=!0:(n={},r.xref&&r.xref!=="paper"&&(n.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&r.yref!=="paper"&&(n.yaxis=e._fullLayout[r.yref+"axis"])),n.xsizemode=r.xsizemode,n.ysizemode=r.ysizemode,n.xanchor=r.xanchor,n.yanchor=r.yanchor,{options:r,plotinfo:n}};Jd.makeSelectionsOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.selections[t]||{},n=e._fullLayout._plots[r.xref+r.yref],i=!!n;return i?n._hadPlotinfo=!0:(n={},r.xref&&(n.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&(n.yaxis=e._fullLayout[r.yref+"axis"])),{options:r,plotinfo:n}};Jd.getPathString=function(e,t){let r=t.type,n=__.getRefType(t.xref),i=__.getRefType(t.yref),a=e._fullLayout._size;var o,s,l,u,c,f,h,d,v,_,b,p;function k(P,A,z,O){var U;if(P)if(A==="domain")O?U=function(G){return P._offset+P._length*(1-G)}:U=function(G){return P._offset+P._length*G};else{let G=Jd.shapePositionToRange(P);U=function(Z){return P._offset+P.r2p(G(Z,!0))},z==="path"&&P.type==="date"&&(U=Jd.decodeDate(U))}else O?U=function(G){return a.t+a.h*(1-G)}:U=function(G){return a.l+a.w*G};return U}if(n==="array"?(h=[],o=t.xref.map(function(P){return __.getFromId(e,P)}),h=t.xref.map(function(P,A){return k(o[A],__.getRefType(P),r,!1)})):(o=__.getFromId(e,t.xref),h=k(o,n,r,!1)),i==="array"?(d=[],s=t.yref.map(function(P){return __.getFromId(e,P)}),d=t.yref.map(function(P,A){return k(s[A],__.getRefType(P),r,!0)})):(s=__.getFromId(e,t.yref),d=k(s,i,r,!0)),r==="path")return Sct(t,h,d);if(n==="array")l=Dy(o[0],t.x0shift),u=Dy(o[1],t.x1shift),v=h[0](t.x0)+l,_=h[1](t.x1)+u;else if(l=Dy(o,t.x0shift),u=Dy(o,t.x1shift),t.xsizemode==="pixel"){let P=h(t.xanchor);v=P+t.x0+l,_=P+t.x1+u}else v=h(t.x0)+l,_=h(t.x1)+u;if(i==="array")c=Dy(s[0],t.y0shift),f=Dy(s[1],t.y1shift),b=d[0](t.y0)+c,p=d[1](t.y1)+f;else if(c=Dy(s,t.y0shift),f=Dy(s,t.y1shift),t.ysizemode==="pixel"){let P=d(t.yanchor);b=P-t.y0+c,p=P-t.y1+f}else b=d(t.y0)+c,p=d(t.y1)+f;if(r==="line")return"M"+v+","+b+"L"+_+","+p;if(r==="rect")return"M"+v+","+b+"H"+_+"V"+p+"H"+v+"Z";var E=(v+_)/2,T=(b+p)/2,L=Math.abs(E-v),x=Math.abs(T-b),C="A"+L+","+x,M=E+L+","+T,g=E+","+(T-x);return"M"+M+C+" 0 1,1 "+g+C+" 0 0,1 "+M+"Z"};function Sct(e,t,r){let n=e.path,i=e.xsizemode,a=e.ysizemode,o=e.xanchor,s=e.yanchor,l=Array.isArray(e.xref),u=Array.isArray(e.yref);var c=0,f=0;return n.replace(Mm.segmentRE,function(h){var d=0,v=h.charAt(0),_=Mm.paramIsX[v],b=Mm.paramIsY[v],p=Mm.numParams[v];let k=_.drawn!==void 0,E=b.drawn!==void 0,T=l?t[c]:t,L=u?r[f]:r;var x=h.slice(1).replace(Mm.paramRE,function(C){return _[d]?i==="pixel"?C=T(o)+Number(C):C=T(C):b[d]&&(a==="pixel"?C=L(s)-Number(C):C=L(C)),d++,d>p&&(C="X"),C});return d>p&&(x=x.replace(/[\s,]*X.*/,""),Rue.log("Ignoring extra params in segment "+h)),k&&c++,E&&f++,v+x})}function Dy(e,t){t=t||0;var r=0;return t&&e&&(e.type==="category"||e.type==="multicategory")&&(r=(e.r2p(1)-e.r2p(0))*t),r}});var tN=ye((jar,zue)=>{"use strict";var Mct=Dr(),Em=ho(),Due=Zl(),Fue=So(),Ect=m_().readPaths,eN=x_(),kct=eN.getPathString,AM=D6(),Cct=Dh().FROM_TL;zue.exports=function(t,r,n,i){if(i.selectAll(".shape-label").remove(),!!(n.label.text||n.label.texttemplate)){var a;if(n.label.texttemplate){var o={};if(n.type!=="path"){var s=Em.getFromId(t,n.xref),l=Em.getFromId(t,n.yref);let oe=Array.isArray(n.xref),_e=Array.isArray(n.yref);for(var u in AM){var c=typeof AM[u]=="function",f=!oe||AM.simpleXVariables.includes(u),h=!_e||AM.simpleYVariables.includes(u);if(c&&f&&h){var d=AM[u](n,s,l);d!==void 0&&(o[u]=d)}}}a=Mct.texttemplateStringForShapes({data:[o],fallback:n.label.texttemplatefallback,locale:t._fullLayout._d3locale,template:n.label.texttemplate})}else a=n.label.text;var v={"data-index":r},_=n.label.font,b={"data-notex":1},p=i.append("g").attr(v).classed("shape-label",!0),k=p.append("text").attr(b).classed("shape-label-text",!0).text(a),E,T,L,x;if(n.path){var C=kct(t,n),M=Ect(C,t);E=1/0,L=1/0,T=-1/0,x=-1/0;for(var g=0;g=e?i=t-n:i=n-t,-180/Math.PI*Math.atan2(i,a)}function Pct(e,t,r,n,i,a,o){var s=i.label.textposition,l=i.label.textangle,u=i.label.padding,c=i.type,f=Math.PI/180*a,h=Math.sin(f),d=Math.cos(f),v=i.label.xanchor,_=i.label.yanchor,b,p,k,E;if(c==="line"){s==="start"?(b=e,p=t):s==="end"?(b=r,p=n):(b=(e+r)/2,p=(t+n)/2),v==="auto"&&(s==="start"?l==="auto"?r>e?v="left":re?v="right":re?v="right":re?v="left":r{"use strict";var Ict=Dr(),Rct=Ict.strTranslate,Oue=yv(),Nue=Cg(),Dct=Nue.drawMode,Uue=Nue.selectMode,Vue=qa(),que=ka(),sP=eP(),Fct=sP.i000,zct=sP.i090,Oct=sP.i180,qct=sP.i270,Bct=o_(),Gue=Bct.clearOutlineControllers,iN=m_(),oP=iN.pointsOnRectangle,rN=iN.pointsOnEllipse,Nct=iN.writePaths,Uct=aP().newShapes,Vct=aP().createShapeObj,Gct=QB(),Hct=tN();Hue.exports=function e(t,r,n,i){i||(i=0);var a=n.gd;function o(){e(t,r,n,i++),(rN(t[0])||n.hasText)&&s({redrawing:!0})}function s(j){var N={};n.isActiveShape!==void 0&&(n.isActiveShape=!1,N=Uct(r,n)),n.isActiveSelection!==void 0&&(n.isActiveSelection=!1,N=Gct(r,n),a._fullLayout._reselect=!0),Object.keys(N).length&&Vue.call((j||{}).redrawing?"relayout":"_guiRelayout",a,N)}var l=a._fullLayout,u=l._zoomlayer,c=n.dragmode,f=Dct(c),h=Uue(c);(f||h)&&(a._fullLayout._outlining=!0),Gue(a),r.attr("d",Nct(t));var d,v,_,b,p;if(!i&&(n.isActiveShape||n.isActiveSelection)){p=jct([],t);var k=u.append("g").attr("class","outline-controllers");P(k),Z()}if(f&&n.hasText){var E=u.select(".label-temp"),T=Vct(r,n,n.dragmode);Hct(a,"label-temp",T,E)}function L(j){_=+j.srcElement.getAttribute("data-i"),b=+j.srcElement.getAttribute("data-j"),d[_][b].moveFn=x}function x(j,N){if(t.length){var H=p[_][b][1],re=p[_][b][2],oe=t[_],_e=oe.length;if(oP(oe)){var Ce=j,Le=N;if(n.isActiveSelection){var ge=Bue(oe,b);ge[1]===oe[b][1]?Le=0:Ce=0}for(var ie=0;ie<_e;ie++)if(ie!==b){var Se=oe[ie];Se[1]===oe[b][1]&&(Se[1]=H+Ce),Se[2]===oe[b][2]&&(Se[2]=re+Le)}if(oe[b][1]=H+Ce,oe[b][2]=re+Le,!oP(oe))for(var Ee=0;Ee<_e;Ee++)for(var Ae=0;Ae1&&!(j.length===2&&j[1][0]==="Z")&&(b===0&&(j[0][0]="M"),t[_]=j,o(),s())}}function g(j,N){if(j===2){_=+N.srcElement.getAttribute("data-i"),b=+N.srcElement.getAttribute("data-j");var H=t[_];!oP(H)&&!rN(H)&&M()}}function P(j){d=[];for(var N=0;N{"use strict";var Xct=Oa(),Yue=qa(),aN=Dr(),Xb=ho(),Zct=m_().readPaths,Yct=lP(),cP=tN(),Kue=o_().clearOutlineControllers,nN=ka(),fP=So(),Kct=vl().arrayEditor,jue=yv(),Wue=Eg(),Zb=TM(),Ep=x_(),oN=Ep.getPathString;Que.exports={draw:sN,drawOne:Jue,eraseActiveShape:eft,drawLabel:cP};function sN(e){var t=e._fullLayout;t._shapeUpperLayer.selectAll("path").remove(),t._shapeLowerLayer.selectAll("path").remove(),t._shapeUpperLayer.selectAll("text").remove(),t._shapeLowerLayer.selectAll("text").remove();for(var r in t._plots){var n=t._plots[r].shapelayer;n&&(n.selectAll("path").remove(),n.selectAll("text").remove())}for(var i=0;iXb.getFromId(e,h)).filter(Boolean);if(!u.length)return l?[n.t,n.t+n.h]:[n.l,n.l+n.w];let c=u.map(function(h){return h._offset}),f=u.map(function(h){return h._offset+h._length});return[Math.min(...c),Math.max(...f)]}let a=i(t,!1),o=i(r,!0);return{x:a[0],y:o[0],width:a[1]-a[0],height:o[1]-o[0]}}function $ct(e,t,r,n,i,a){var o=10,s=10,l=r.xsizemode==="pixel",u=r.ysizemode==="pixel",c=r.type==="line",f=r.type==="path",h=a.modifyItem,d,v,_,b,p,k,E,T,L,x,C,M,g,P,A,z=Xct.select(t.node().parentNode),O=Xb.getFromId(e,r.xref),U=Xb.getRefType(r.xref),G=Xb.getFromId(e,r.yref),Z=Xb.getRefType(r.yref),j=r.x0shift,N=r.x1shift,H=r.y0shift,re=r.y1shift,oe=function(ot,ut){var Wt=Ep.getDataToPixel(e,O,ut,!1,U);return Wt(ot)},_e=function(ot,ut){var Wt=Ep.getDataToPixel(e,G,ut,!0,Z);return Wt(ot)},Ce=Ep.getPixelToData(e,O,!1,U),Le=Ep.getPixelToData(e,G,!0,Z),ge=Ee(),ie={element:ge.node(),gd:e,prepFn:Pe,doneFn:me,clickFn:De},Se;jue.init(ie),ge.node().onmousemove=Be;function Ee(){return c?Ae():t}function Ae(){var ot=10,ut=Math.max(r.line.width,ot),Wt=i.append("g").attr("data-index",n).attr("drag-helper",!0);Wt.append("path").attr("d",t.attr("d")).style({cursor:"move","stroke-width":ut,"stroke-opacity":"0"});var Nt={"fill-opacity":"0"},$t=Math.max(ut/2,ot);return Wt.append("circle").attr({"data-line-point":"start-point",cx:l?oe(r.xanchor)+r.x0:oe(r.x0,j),cy:u?_e(r.yanchor)-r.y0:_e(r.y0,H),r:$t}).style(Nt).classed("cursor-grab",!0),Wt.append("circle").attr({"data-line-point":"end-point",cx:l?oe(r.xanchor)+r.x1:oe(r.x1,N),cy:u?_e(r.yanchor)-r.y1:_e(r.y1,re),r:$t}).style(Nt).classed("cursor-grab",!0),Wt}function Be(ot){if(uP(e)){Se=null;return}if(c)ot.target.tagName==="path"?Se="move":Se=ot.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var ut=ie.element.getBoundingClientRect(),Wt=ut.right-ut.left,Nt=ut.bottom-ut.top,$t=ot.clientX-ut.left,sr=ot.clientY-ut.top,Tr=!f&&Wt>o&&Nt>s&&!ot.shiftKey?jue.getCursor($t/Wt,1-sr/Nt):"move";Wue(t,Tr),Se=Tr.split("-")[0]}}function Pe(ot){uP(e)||(l&&(p=oe(r.xanchor)),u&&(k=_e(r.yanchor)),r.type==="path"?A=r.path:(d=l?r.x0:oe(r.x0),v=u?r.y0:_e(r.y0),_=l?r.x1:oe(r.x1),b=u?r.y1:_e(r.y1)),d<_?(L=d,g="x0",x=_,P="x1"):(L=_,g="x1",x=d,P="x0"),!u&&vb?(E=v,C="y0",T=b,M="y1"):(E=b,C="y1",T=v,M="y0"),Be(ot),lt(i,r),Vt(t,r,e),ie.moveFn=Se==="move"?ce:je,ie.altKey=ot.altKey)}function me(){uP(e)||(Wue(t),pt(i),$ue(t,e,r),Yue.call("_guiRelayout",e,a.getUpdateObj()))}function De(){uP(e)||pt(i)}function ce(ot,ut){if(r.type==="path"){var Wt=function(sr){return sr},Nt=Wt,$t=Wt;l?h("xanchor",r.xanchor=Ce(p+ot)):(Nt=function(Tr){return Ce(oe(Tr)+ot)},O&&O.type==="date"&&(Nt=Ep.encodeDate(Nt))),u?h("yanchor",r.yanchor=Le(k+ut)):($t=function(Tr){return Le(_e(Tr)+ut)},G&&G.type==="date"&&($t=Ep.encodeDate($t))),h("path",r.path=Xue(A,Nt,$t))}else l?h("xanchor",r.xanchor=Ce(p+ot)):(h("x0",r.x0=Ce(d+ot)),h("x1",r.x1=Ce(_+ot))),u?h("yanchor",r.yanchor=Le(k+ut)):(h("y0",r.y0=Le(v+ut)),h("y1",r.y1=Le(b+ut)));t.attr("d",oN(e,r)),lt(i,r),cP(e,n,r,z)}function je(ot,ut){if(f){var Wt=function(Lr){return Lr},Nt=Wt,$t=Wt;l?h("xanchor",r.xanchor=Ce(p+ot)):(Nt=function(ti){return Ce(oe(ti)+ot)},O&&O.type==="date"&&(Nt=Ep.encodeDate(Nt))),u?h("yanchor",r.yanchor=Le(k+ut)):($t=function(ti){return Le(_e(ti)+ut)},G&&G.type==="date"&&($t=Ep.encodeDate($t))),h("path",r.path=Xue(A,Nt,$t))}else if(c){if(Se==="resize-over-start-point"){var sr=d+ot,Tr=u?v-ut:v+ut;h("x0",r.x0=l?sr:Ce(sr)),h("y0",r.y0=u?Tr:Le(Tr))}else if(Se==="resize-over-end-point"){var fr=_+ot,$e=u?b-ut:b+ut;h("x1",r.x1=l?fr:Ce(fr)),h("y1",r.y1=u?$e:Le($e))}}else{var St=function(Lr){return Se.indexOf(Lr)!==-1},Qt=St("n"),Gt=St("s"),_t=St("w"),It=St("e"),mt=Qt?E+ut:E,er=Gt?T+ut:T,lr=_t?L+ot:L,wr=It?x+ot:x;u&&(Qt&&(mt=E-ut),Gt&&(er=T-ut)),(!u&&er-mt>s||u&&mt-er>s)&&(h(C,r[C]=u?mt:Le(mt)),h(M,r[M]=u?er:Le(er))),wr-lr>o&&(h(g,r[g]=l?lr:Ce(lr)),h(P,r[P]=l?wr:Ce(wr)))}t.attr("d",oN(e,r)),lt(i,r),cP(e,n,r,z)}function lt(ot,ut){(l||u)&&Wt();function Wt(){var Nt=ut.type!=="path",$t=ot.selectAll(".visual-cue").data([0]),sr=1;$t.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":sr}).classed("visual-cue",!0);var Tr=oe(l?ut.xanchor:aN.midRange(Nt?[ut.x0,ut.x1]:Ep.extractPathCoords(ut.path,Zb.paramIsX))),fr=_e(u?ut.yanchor:aN.midRange(Nt?[ut.y0,ut.y1]:Ep.extractPathCoords(ut.path,Zb.paramIsY)));if(Tr=Ep.roundPositionForSharpStrokeRendering(Tr,sr),fr=Ep.roundPositionForSharpStrokeRendering(fr,sr),l&&u){var $e="M"+(Tr-1-sr)+","+(fr-1-sr)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";$t.attr("d",$e)}else if(l){var St="M"+(Tr-1-sr)+","+(fr-9-sr)+"v18 h2 v-18 Z";$t.attr("d",St)}else{var Qt="M"+(Tr-9-sr)+","+(fr-1-sr)+"h18 v2 h-18 Z";$t.attr("d",Qt)}}}function pt(ot){ot.selectAll(".visual-cue").remove()}function Vt(ot,ut,Wt){var Nt=ut.xref,$t=ut.yref,sr=Xb.getFromId(Wt,Nt),Tr=Xb.getFromId(Wt,$t),fr="";Nt!=="paper"&&!sr.autorange&&(fr+=Nt),$t!=="paper"&&!Tr.autorange&&(fr+=$t),fP.setClipUrl(ot,fr?"clip"+Wt._fullLayout._uid+fr:null,Wt)}}function Xue(e,t,r){return e.replace(Zb.segmentRE,function(n){var i=0,a=n.charAt(0),o=Zb.paramIsX[a],s=Zb.paramIsY[a],l=Zb.numParams[a],u=n.slice(1).replace(Zb.paramRE,function(c){return i>=l||(o[i]?c=t(c):s[i]&&(c=r(c)),i++),c});return a+u})}function Qct(e,t){if(hP(e)){var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeShapeIndex){Zue(e);return}e._fullLayout._activeShapeIndex=n,e._fullLayout._deactivateShape=Zue,sN(e)}}}function Zue(e){if(hP(e)){var t=e._fullLayout._activeShapeIndex;t>=0&&(Kue(e),delete e._fullLayout._activeShapeIndex,sN(e))}}function eft(e){if(hP(e)){Kue(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t{"use strict";var S0=qa(),ece=Mc(),tce=hf(),Pl=$L(),tft=dP().eraseActiveShape,vP=Dr(),tl=vP._,Il=lce.exports={};Il.toImage={name:"toImage",title:function(e){var t=e._context.toImageButtonOptions||{},r=t.format||"png";return r==="png"?tl(e,"Download plot as a PNG"):tl(e,"Download plot")},icon:Pl.camera,click:function(e){var t=e._context.toImageButtonOptions,r={format:t.format||"png"};vP.notifier(tl(e,"Taking snapshot - this may take a few seconds"),"long"),["filename","width","height","scale"].forEach(function(n){n in t&&(r[n]=t[n])}),S0.call("downloadImage",e,r).then(function(n){vP.notifier(tl(e,"Snapshot succeeded")+" - "+n,"long")}).catch(function(){vP.notifier(tl(e,"Sorry, there was a problem downloading your snapshot!"),"long")})}};Il.sendDataToCloud={name:"sendDataToCloud",title:function(e){return tl(e,"Edit in Chart Studio")},icon:Pl.disk,click:function(e){ece.sendDataToCloud(e)}};Il.editInChartStudio={name:"editInChartStudio",title:function(e){return tl(e,"Edit in Chart Studio")},icon:Pl.pencil,click:function(e){ece.sendDataToCloud(e)}};Il.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return tl(e,"Zoom")},attr:"dragmode",val:"zoom",icon:Pl.zoombox,click:Bv};Il.pan2d={name:"pan2d",_cat:"pan",title:function(e){return tl(e,"Pan")},attr:"dragmode",val:"pan",icon:Pl.pan,click:Bv};Il.select2d={name:"select2d",_cat:"select",title:function(e){return tl(e,"Box Select")},attr:"dragmode",val:"select",icon:Pl.selectbox,click:Bv};Il.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return tl(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:Pl.lasso,click:Bv};Il.drawclosedpath={name:"drawclosedpath",title:function(e){return tl(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:Pl.drawclosedpath,click:Bv};Il.drawopenpath={name:"drawopenpath",title:function(e){return tl(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:Pl.drawopenpath,click:Bv};Il.drawline={name:"drawline",title:function(e){return tl(e,"Draw line")},attr:"dragmode",val:"drawline",icon:Pl.drawline,click:Bv};Il.drawrect={name:"drawrect",title:function(e){return tl(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:Pl.drawrect,click:Bv};Il.drawcircle={name:"drawcircle",title:function(e){return tl(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:Pl.drawcircle,click:Bv};Il.eraseshape={name:"eraseshape",title:function(e){return tl(e,"Erase active shape")},icon:Pl.eraseshape,click:tft};Il.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return tl(e,"Zoom in")},attr:"zoom",val:"in",icon:Pl.zoom_plus,click:Bv};Il.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return tl(e,"Zoom out")},attr:"zoom",val:"out",icon:Pl.zoom_minus,click:Bv};Il.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return tl(e,"Autoscale")},attr:"zoom",val:"auto",icon:Pl.autoscale,click:Bv};Il.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return tl(e,"Reset axes")},attr:"zoom",val:"reset",icon:Pl.home,click:Bv};Il.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return tl(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:Pl.tooltip_basic,gravity:"ne",click:Bv};Il.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return tl(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:Pl.tooltip_compare,gravity:"ne",click:Bv};function Bv(e,t){var r=t.currentTarget,n=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,a=e._fullLayout,o={},s=tce.list(e,null,!0),l=a._cartesianSpikesEnabled,u,c;if(n==="zoom"){var f=i==="in"?.5:2,h=(1+f)/2,d=(1-f)/2,v,_;for(c=0;c{"use strict";var uce=cN(),nft=Object.keys(uce),cce=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],fce=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(cce),iT=[],aft=function(e){if(fce.indexOf(e._cat||e.name)===-1){var t=e.name,r=(e._cat||e.name).toLowerCase();iT.indexOf(t)===-1&&iT.push(t),iT.indexOf(r)===-1&&iT.push(r)}};nft.forEach(function(e){aft(uce[e])});iT.sort();hce.exports={DRAW_MODES:cce,backButtons:fce,foreButtons:iT}});var hN=ye((Jar,dce)=>{"use strict";var Kar=fN();dce.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}});var pce=ye(($ar,vce)=>{"use strict";var oft=Dr(),SM=ka(),sft=vl(),lft=hN();vce.exports=function(t,r){var n=t.modebar||{},i=sft.newContainer(r,"modebar");function a(s,l){return oft.coerce(n,i,lft,s,l)}a("orientation"),a("bgcolor",SM.addOpacity(r.paper_bgcolor,.5));var o=SM.contrast(SM.rgb(r.modebar.bgcolor));a("color",SM.addOpacity(o,.3)),a("activecolor",SM.addOpacity(o,.7)),a("uirevision",r.uirevision),a("add"),a("remove")}});var _ce=ye((Qar,yce)=>{"use strict";var dN=Oa(),uft=Eo(),gP=Dr(),gce=$L(),cft=g6().version,fft=new DOMParser;function mce(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var km=mce.prototype;km.update=function(e,t){this.graphInfo=e;var r=this.graphInfo._context,n=this.graphInfo._fullLayout,i="modebar-"+n._uid;this.element.setAttribute("id",i),this.element.setAttribute("role","toolbar"),this._uid=i,this.element.className="modebar modebar--custom",r.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),n.modebar.orientation==="v"&&(this.element.className+=" vertical",t=t.reverse());var a=n.modebar,o="#"+i+" .modebar-group";document.querySelectorAll(o).forEach(function(f){f.style.backgroundColor=a.bgcolor});var s=!this.hasButtons(t),l=this.hasLogo!==r.displaylogo,u=this.locale!==r.locale;if(this.locale=r.locale,(s||l||u)&&(this.removeAllButtons(),this.updateButtons(t),r.watermark||r.displaylogo)){var c=this.getLogo();r.watermark&&(c.className=c.className+" watermark"),n.modebar.orientation==="v"?this.element.insertBefore(c,this.element.childNodes[0]):this.element.appendChild(c),this.hasLogo=!0}this.updateActiveButton(),gP.setStyleOnHover("#"+i+" .modebar-btn",".active",".icon path","fill: "+a.activecolor,"fill: "+a.color,this.element)};km.updateButtons=function(e){var t=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(r){var n=t.createGroup();r.forEach(function(i){var a=i.name;if(!a)throw new Error("must provide button 'name' in button config");if(t.buttonsNames.indexOf(a)!==-1)throw new Error("button name '"+a+"' is taken");t.buttonsNames.push(a);var o=t.createButton(i);t.buttonElements.push(o),n.appendChild(o)}),t.element.appendChild(n)})};km.createGroup=function(){var e=document.createElement("div");e.className="modebar-group";var t=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=t.bgcolor,e};km.createButton=function(e){var t=this,r=document.createElement("button");r.setAttribute("type","button"),r.setAttribute("rel","tooltip"),r.className="modebar-btn";var n=e.title;n===void 0?n=e.name:typeof n=="function"&&(n=n(this.graphInfo)),(n||n===0)&&(r.setAttribute("data-title",n),r.setAttribute("aria-label",n)),e.attr!==void 0&&r.setAttribute("data-attr",e.attr);var i=e.val;i!==void 0&&(typeof i=="function"&&(i=i(this.graphInfo)),r.setAttribute("data-val",i));var a=e.click;if(typeof a!="function")throw new Error("must provide button 'click' function in button config");r.addEventListener("click",function(s){e.click(t.graphInfo,s),t.updateActiveButton(s.currentTarget)}),r.setAttribute("data-toggle",e.toggle||!1),e.toggle&&dN.select(r).classed("active",!0);var o=e.icon;return typeof o=="function"?r.appendChild(o()):r.appendChild(this.createIcon(o||gce.question)),r.setAttribute("data-gravity",e.gravity||"n"),r};km.createIcon=function(e){var t=uft(e.height)?Number(e.height):e.ascent-e.descent,r="http://www.w3.org/2000/svg",n;if(e.path){n=document.createElementNS(r,"svg"),n.setAttribute("viewBox",[0,0,e.width,t].join(" ")),n.setAttribute("class","icon");var i=document.createElementNS(r,"path");i.setAttribute("d",e.path),e.transform?i.setAttribute("transform",e.transform):e.ascent!==void 0&&i.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),n.appendChild(i)}if(e.svg){var a=fft.parseFromString(e.svg,"application/xml");n=a.childNodes[0]}return n.setAttribute("height","1em"),n.setAttribute("width","1em"),n};km.updateActiveButton=function(e){var t=this.graphInfo._fullLayout,r=e!==void 0?e.getAttribute("data-attr"):null;this.buttonElements.forEach(function(n){var i=n.getAttribute("data-val")||!0,a=n.getAttribute("data-attr"),o=n.getAttribute("data-toggle")==="true",s=dN.select(n),l=function(f,h){var d=t.modebar,v=f.querySelector(".icon path");v&&(h||f.matches(":hover")?v.style.fill=d.activecolor:v.style.fill=d.color)};if(o){if(a===r){var u=!s.classed("active");s.classed("active",u),l(n,u)}}else{var c=a===null?a:gP.nestedProperty(t,a).get();s.classed("active",c===i),l(n,c===i)}})};km.hasButtons=function(e){var t=this.buttons;if(!t||e.length!==t.length)return!1;for(var r=0;r{"use strict";var vft=hf(),xce=Ru(),vN=qa(),pft=ip().isUnifiedHover,gft=_ce(),mP=cN(),mft=fN().DRAW_MODES,yft=Dr().extendDeep;bce.exports=function(t){var r=t._fullLayout,n=t._context,i=r._modeBar;if(!n.displayModeBar&&!n.watermark){i&&(i.destroy(),delete r._modeBar);return}if(!Array.isArray(n.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(n.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var a=n.modeBarButtons,o;Array.isArray(a)&&a.length?o=Aft(a):!n.displayModeBar&&n.watermark?o=[]:o=_ft(t),i?i.update(t,o):r._modeBar=gft(t,o)};function _ft(e){var t=e._fullLayout,r=e._fullData,n=e._context;function i(N,H){if(typeof H=="string"){if(H.toLowerCase()===N.toLowerCase())return!0}else{var re=H.name,oe=H._cat||H.name;if(re===N||oe===N.toLowerCase())return!0}return!1}var a=t.modebar.add;typeof a=="string"&&(a=[a]);var o=t.modebar.remove;typeof o=="string"&&(o=[o]);var s=n.modeBarButtonsToAdd.concat(a.filter(function(N){for(var H=0;H1?(P=["toggleHover"],A=["resetViews"]):f?(g=["zoomInGeo","zoomOutGeo"],P=["hoverClosestGeo"],A=["resetGeo"]):c?(P=["hoverClosest3d"],A=["resetCameraDefault3d","resetCameraLastSave3d"]):_?(g=["zoomInMapbox","zoomOutMapbox"],P=["toggleHover"],A=["resetViewMapbox"]):b?(g=["zoomInMap","zoomOutMap"],P=["toggleHover"],A=["resetViewMap"]):h?P=["hoverClosestPie"]:E?(P=["hoverClosestCartesian","hoverCompareCartesian"],A=["resetViewSankey"]):P=["toggleHover"],u&&P.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(wft(r)||L)&&(P=[]),u&&!T&&(g=["zoomIn2d","zoomOut2d","autoScale2d"],A[0]!=="resetViews"&&(A=["resetScale2d"])),c?z=["zoom3d","pan3d","orbitRotation","tableRotation"]:u&&!T||v?z=["zoom2d","pan2d"]:_||b||f?z=["pan2d"]:p&&(z=["zoom2d"]),bft(r)&&z.push("select2d","lasso2d");var O=[],U=function(N){O.indexOf(N)===-1&&P.indexOf(N)!==-1&&O.push(N)};if(Array.isArray(s)){for(var G=[],Z=0;Z{"use strict";Tce.exports={moduleType:"component",name:"modebar",layoutAttributes:hN(),supplyLayoutDefaults:pce(),manage:wce()}});var gN=ye((ror,Ace)=>{"use strict";var Sft=Dh().FROM_BL;Ace.exports=function(t,r,n){n===void 0&&(n=Sft[t.constraintoward||"center"]);var i=[t.r2l(t.range[0]),t.r2l(t.range[1])],a=i[0]+(i[1]-i[0])*n;t.range=t._input.range=[t.l2r(a+(i[0]-a)*r),t.l2r(a+(i[1]-a)*r)],t.setScale()}});var Kb=ye(MM=>{"use strict";var Yb=Dr(),mN=Mg(),Lg=hf().id2name,Mft=Rd(),Sce=gN(),Eft=xm(),kft=fs().ALMOST_EQUAL,Cft=Dh().FROM_BL;MM.handleDefaults=function(e,t,r){var n=r.axIds,i=r.axHasImage,a=t._axisConstraintGroups=[],o=t._axisMatchGroups=[],s,l,u,c,f,h,d,v;for(s=0;sa?r.slice(a):n.slice(i))+o}function Pft(e,t){for(var r=t._size,n=r.h/r.w,i={},a=Object.keys(e),o=0;okft*v&&!k)){for(a=0;az&&reP&&(P=re);var _e=(P-g)/(2*A);f/=_e,g=l.l2r(g),P=l.l2r(P),l.range=l._input.range=x{"use strict";var _P=Oa(),Nv=qa(),Jp=Mc(),M0=Dr(),xN=Zl(),bN=bM(),EM=ka(),nT=So(),Cce=zb(),Dce=pN(),kM=ho(),Fy=Dh(),Fce=Kb(),Ift=Fce.enforce,Rft=Fce.clean,Lce=Mg().doAutoRange,zce="start",Dft="middle",Oce="end",Fft=Rh().zindexSeparator;pd.layoutStyles=function(e){return M0.syncOrAsync([Jp.doAutoMargin,Oft],e)};function zft(e,t,r){for(var n=0;n=e[1]||i[1]<=e[0])&&a[0]t[0])return!0}return!1}function Oft(e){var t=e._fullLayout,r=t._size,n=r.p,i=kM.list(e,"",!0),a,o,s,l,u,c;if(t._paperdiv.style({width:e._context.responsive&&t.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":t.width+"px",height:e._context.responsive&&t.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":t.height+"px"}).selectAll(".main-svg").call(nT.setSize,t.width,t.height),e._context.setBackground(e,t.paper_bgcolor),pd.drawMainTitle(e),Dce.manage(e),!t._has("cartesian"))return Jp.previousPromises(e);function f(Pe,me,De){var ce=Pe._lw/2;if(Pe._id.charAt(0)==="x"){if(me){if(De==="top")return me._offset-n-ce}else return r.t+r.h*(1-(Pe.position||0))+ce%1;return me._offset+me._length+n+ce}if(me){if(De==="right")return me._offset+me._length+n+ce}else return r.l+r.w*(Pe.position||0)+ce%1;return me._offset-n-ce}for(a=0;a0){Uft(e,a,u,l),s.attr({x:o,y:a,"text-anchor":n,dy:Rce(t.yanchor)}).call(xN.positionText,o,a);var c=(t.text.match(xN.BR_TAG_ALL)||[]).length;if(c){var f=Fy.LINE_SPACING*c+Fy.MID_SHIFT;t.y===0&&(f=-f),s.selectAll(".line").each(function(){var b=+this.getAttribute("dy").slice(0,-2)-f+"em";this.setAttribute("dy",b)})}var h=_P.select(e).selectAll(".gtitle-subtitle");if(h.node()){var d=s.node().getBBox(),v=d.y+d.height,_=v+Cce.SUBTITLE_PADDING_EM*t.subtitle.font.size;h.attr({x:o,y:_,"text-anchor":n,dy:Rce(t.yanchor)}).call(xN.positionText,o,_)}}}};function qft(e,t,r,n,i){var a=t.yref==="paper"?e._fullLayout._size.h:e._fullLayout.height,o=M0.isTopAnchor(t)?n:n-i,s=r==="b"?a-o:o;return M0.isTopAnchor(t)&&r==="t"||M0.isBottomAnchor(t)&&r==="b"?!1:s.5?"t":"b",o=e._fullLayout.margin[a],s=0;return t.yref==="paper"?s=r+t.pad.t+t.pad.b:t.yref==="container"&&(s=Bft(a,n,i,e._fullLayout.height,r)+t.pad.t+t.pad.b),s>o?s:0}function Uft(e,t,r,n){var i="title.automargin",a=e._fullLayout.title,o=a.y>.5?"t":"b",s={x:a.x,y:a.y,t:0,b:0},l={};a.yref==="paper"&&qft(e,a,o,t,n)?s[o]=r:a.yref==="container"&&(l[o]=r,e._fullLayout._reservedMargin[i]=l),Jp.allowAutoMargin(e,i),Jp.autoMargin(e,i,s)}function Vft(e,t){var r=e.title,n=e._size,i=0;switch(t===zce?i=r.pad.l:t===Oce&&(i=-r.pad.r),r.xref){case"paper":return n.l+n.w*r.x+i;case"container":default:return e.width*r.x+i}}function Gft(e,t){var r=e.title,n=e._size,i=0;if(t==="0em"||!t?i=-r.pad.b:t===Fy.CAP_SHIFT+"em"&&(i=r.pad.t),r.y==="auto")return n.t/2;switch(r.yref){case"paper":return n.t+n.h-n.h*r.y+i;case"container":default:return e.height-e.height*r.y+i}}function Rce(e){return e==="top"?Fy.CAP_SHIFT+.3+"em":e==="bottom"?"-0.3em":Fy.MID_SHIFT+"em"}function Hft(e){var t=e.title,r=Dft;return M0.isRightAnchor(t)?r=Oce:M0.isLeftAnchor(t)&&(r=zce),r}function jft(e){var t=e.title,r="0em";return M0.isTopAnchor(t)?r=Fy.CAP_SHIFT+"em":M0.isMiddleAnchor(t)&&(r=Fy.MID_SHIFT+"em"),r}pd.doTraceStyle=function(e){var t=e.calcdata,r=[],n;for(n=0;n{"use strict";var Wft=m_().readPaths,Xft=lP(),qce=o_().clearOutlineControllers,wN=ka(),Bce=So(),Zft=vl().arrayEditor,Nce=x_(),Yft=Nce.getPathString;Vce.exports={draw:xP,drawOne:Uce,activateLastSelection:$ft};function xP(e){var t=e._fullLayout;qce(e),t._selectionLayer.selectAll("path").remove();for(var r in t._plots){var n=t._plots[r].selectionLayer;n&&n.selectAll("path").remove()}for(var i=0;i=0;b--){var p=o.append("path").attr(l).style("opacity",b?.1:u).call(wN.stroke,f).call(wN.fill,c).call(Bce.dashLine,b?"solid":d,b?4+h:h);if(Kft(p,e,n),v){var k=Zft(e.layout,"selections",n);p.style({cursor:"move"});var E={element:p.node(),plotinfo:i,gd:e,editHelpers:k,isActiveSelection:!0},T=Wft(s,e);Xft(T,p,E)}else p.style("pointer-events",b?"all":"none");_[b]=p}var L=_[0],x=_[1];x.node().addEventListener("click",function(){return Jft(e,L)})}}function Kft(e,t,r){var n=r.xref+r.yref;Bce.setClipUrl(e,"clip"+t._fullLayout._uid+n,t)}function Jft(e,t){if(bP(e)){var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeSelectionIndex){TN(e);return}e._fullLayout._activeSelectionIndex=n,e._fullLayout._deactivateSelection=TN,xP(e)}}}function $ft(e){if(bP(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=TN,xP(e)}}function TN(e){if(bP(e)){var t=e._fullLayout._activeSelectionIndex;t>=0&&(qce(e),delete e._fullLayout._activeSelectionIndex,xP(e))}}});var Hce=ye((oor,Gce)=>{function Qft(){var e,t=0,r=!1;function n(i,a){return e.list.push({type:i,data:a?JSON.parse(JSON.stringify(a)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(i,a){return n("check",{seg1:i,seg2:a})},segmentChop:function(i,a){return n("div_seg",{seg:i,pt:a}),n("chop",{seg:i,pt:a})},statusRemove:function(i){return n("pop_seg",{seg:i})},segmentUpdate:function(i){return n("seg_update",{seg:i})},segmentNew:function(i,a){return n("new_seg",{seg:i,primary:a})},segmentRemove:function(i){return n("rem_seg",{seg:i})},tempStatus:function(i,a,o){return n("temp_status",{seg:i,above:a,below:o})},rewind:function(i){return n("rewind",{seg:i})},status:function(i,a,o){return n("status",{seg:i,above:a,below:o})},vert:function(i){return i===r?e:(r=i,n("vert",{x:i}))},log:function(i){return typeof i!="string"&&(i=JSON.stringify(i,!1," ")),n("log",{txt:i})},reset:function(){return n("reset")},selected:function(i){return n("selected",{segs:i})},chainStart:function(i){return n("chain_start",{seg:i})},chainRemoveHead:function(i,a){return n("chain_rem_head",{index:i,pt:a})},chainRemoveTail:function(i,a){return n("chain_rem_tail",{index:i,pt:a})},chainNew:function(i,a){return n("chain_new",{pt1:i,pt2:a})},chainMatch:function(i){return n("chain_match",{index:i})},chainClose:function(i){return n("chain_close",{index:i})},chainAddHead:function(i,a){return n("chain_add_head",{index:i,pt:a})},chainAddTail:function(i,a){return n("chain_add_tail",{index:i,pt:a})},chainConnect:function(i,a){return n("chain_con",{index1:i,index2:a})},chainReverse:function(i){return n("chain_rev",{index:i})},chainJoin:function(i,a){return n("chain_join",{index1:i,index2:a})},done:function(){return n("done")}},e}Gce.exports=Qft});var Wce=ye((sor,jce)=>{function eht(e){typeof e!="number"&&(e=1e-10);var t={epsilon:function(r){return typeof r=="number"&&(e=r),e},pointAboveOrOnLine:function(r,n,i){var a=n[0],o=n[1],s=i[0],l=i[1],u=r[0],c=r[1];return(s-a)*(c-o)-(l-o)*(u-a)>=-e},pointBetween:function(r,n,i){var a=r[1]-n[1],o=i[0]-n[0],s=r[0]-n[0],l=i[1]-n[1],u=s*o+a*l;if(u-e)},pointsSameX:function(r,n){return Math.abs(r[0]-n[0])e!=s-a>e&&(o-c)*(a-f)/(s-f)+c-i>e&&(l=!l),o=c,s=f}return l}};return t}jce.exports=eht});var Zce=ye((lor,Xce)=>{var tht={create:function(){var e={root:{root:!0,next:null},exists:function(t){return!(t===null||t===e.root)},isEmpty:function(){return e.root.next===null},getHead:function(){return e.root.next},insertBefore:function(t,r){for(var n=e.root,i=e.root.next;i!==null;){if(r(i)){t.prev=i.prev,t.next=i,i.prev.next=t,i.prev=t;return}n=i,i=i.next}n.next=t,t.prev=n,t.next=null},findTransition:function(t){for(var r=e.root,n=e.root.next;n!==null&&!t(n);)r=n,n=n.next;return{before:r===e.root?null:r,after:n,insert:function(i){return i.prev=r,i.next=n,r.next=i,n!==null&&(n.prev=i),i}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}};Xce.exports=tht});var Kce=ye((uor,Yce)=>{var LM=Zce();function rht(e,t,r){function n(v,_){return{id:r?r.segmentId():-1,start:v,end:_,myFill:{above:null,below:null},otherFill:null}}function i(v,_,b){return{id:r?r.segmentId():-1,start:v,end:_,myFill:{above:b.myFill.above,below:b.myFill.below},otherFill:null}}var a=LM.create();function o(v,_,b,p,k,E){var T=t.pointsCompare(_,k);return T!==0?T:t.pointsSame(b,E)?0:v!==p?v?1:-1:t.pointAboveOrOnLine(b,p?k:E,p?E:k)?1:-1}function s(v,_){a.insertBefore(v,function(b){var p=o(v.isStart,v.pt,_,b.isStart,b.pt,b.other.pt);return p<0})}function l(v,_){var b=LM.node({isStart:!0,pt:v.start,seg:v,primary:_,other:null,status:null});return s(b,v.end),b}function u(v,_,b){var p=LM.node({isStart:!1,pt:_.end,seg:_,primary:b,other:v,status:null});v.other=p,s(p,v.pt)}function c(v,_){var b=l(v,_);return u(b,v,_),b}function f(v,_){r&&r.segmentChop(v.seg,_),v.other.remove(),v.seg.end=_,v.other.pt=_,s(v.other,v.pt)}function h(v,_){var b=i(_,v.seg.end,v.seg);return f(v,_),c(b,v.primary)}function d(v,_){var b=LM.create();function p(G,Z){var j=G.seg.start,N=G.seg.end,H=Z.seg.start,re=Z.seg.end;return t.pointsCollinear(j,H,re)?t.pointsCollinear(N,H,re)||t.pointAboveOrOnLine(N,H,re)?1:-1:t.pointAboveOrOnLine(j,H,re)?1:-1}function k(G){return b.findTransition(function(Z){var j=p(G,Z.ev);return j>0})}function E(G,Z){var j=G.seg,N=Z.seg,H=j.start,re=j.end,oe=N.start,_e=N.end;r&&r.checkIntersection(j,N);var Ce=t.linesIntersect(H,re,oe,_e);if(Ce===!1){if(!t.pointsCollinear(H,re,oe)||t.pointsSame(H,_e)||t.pointsSame(re,oe))return!1;var Le=t.pointsSame(H,oe),ge=t.pointsSame(re,_e);if(Le&&ge)return Z;var ie=!Le&&t.pointBetween(H,oe,_e),Se=!ge&&t.pointBetween(re,oe,_e);if(Le)return Se?h(Z,re):h(G,_e),Z;ie&&(ge||(Se?h(Z,re):h(G,_e)),h(Z,H))}else Ce.alongA===0&&(Ce.alongB===-1?h(G,oe):Ce.alongB===0?h(G,Ce.pt):Ce.alongB===1&&h(G,_e)),Ce.alongB===0&&(Ce.alongA===-1?h(Z,H):Ce.alongA===0?h(Z,Ce.pt):Ce.alongA===1&&h(Z,re));return!1}for(var T=[];!a.isEmpty();){var L=a.getHead();if(r&&r.vert(L.pt[0]),L.isStart){let G=function(){if(C){var Z=E(L,C);if(Z)return Z}return M?E(L,M):!1};var U=G;r&&r.segmentNew(L.seg,L.primary);var x=k(L),C=x.before?x.before.ev:null,M=x.after?x.after.ev:null;r&&r.tempStatus(L.seg,C?C.seg:!1,M?M.seg:!1);var g=G();if(g){if(e){var P;L.seg.myFill.below===null?P=!0:P=L.seg.myFill.above!==L.seg.myFill.below,P&&(g.seg.myFill.above=!g.seg.myFill.above)}else g.seg.otherFill=L.seg.myFill;r&&r.segmentUpdate(g.seg),L.other.remove(),L.remove()}if(a.getHead()!==L){r&&r.rewind(L.seg);continue}if(e){var P;L.seg.myFill.below===null?P=!0:P=L.seg.myFill.above!==L.seg.myFill.below,M?L.seg.myFill.below=M.seg.myFill.above:L.seg.myFill.below=v,P?L.seg.myFill.above=!L.seg.myFill.below:L.seg.myFill.above=L.seg.myFill.below}else if(L.seg.otherFill===null){var A;M?L.primary===M.primary?A=M.seg.otherFill.above:A=M.seg.myFill.above:A=L.primary?_:v,L.seg.otherFill={above:A,below:A}}r&&r.status(L.seg,C?C.seg:!1,M?M.seg:!1),L.other.status=x.insert(LM.node({ev:L}))}else{var z=L.status;if(z===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(b.exists(z.prev)&&b.exists(z.next)&&E(z.prev.ev,z.next.ev),r&&r.statusRemove(z.ev.seg),z.remove(),!L.primary){var O=L.seg.myFill;L.seg.myFill=L.seg.otherFill,L.seg.otherFill=O}T.push(L.seg)}a.getHead().remove()}return r&&r.done(),T}return e?{addRegion:function(v){for(var _,b=v[v.length-1],p=0;p{function iht(e,t,r){var n=[],i=[];return e.forEach(function(a){var o=a.start,s=a.end;if(t.pointsSame(o,s)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}r&&r.chainStart(a);var l={index:0,matches_head:!1,matches_pt1:!1},u={index:0,matches_head:!1,matches_pt1:!1},c=l;function f(U,G,Z){return c.index=U,c.matches_head=G,c.matches_pt1=Z,c===l?(c=u,!1):(c=null,!0)}for(var h=0;h{function PM(e,t,r){var n=[];return e.forEach(function(i){var a=(i.myFill.above?8:0)+(i.myFill.below?4:0)+(i.otherFill&&i.otherFill.above?2:0)+(i.otherFill&&i.otherFill.below?1:0);t[a]!==0&&n.push({id:r?r.segmentId():-1,start:i.start,end:i.end,myFill:{above:t[a]===1,below:t[a]===2},otherFill:null})}),r&&r.selected(n),n}var nht={union:function(e,t){return PM(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],t)},intersect:function(e,t){return PM(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],t)},difference:function(e,t){return PM(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],t)},differenceRev:function(e,t){return PM(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],t)},xor:function(e,t){return PM(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],t)}};Qce.exports=nht});var rfe=ye((dor,tfe)=>{var aht={toPolygon:function(e,t){function r(a){if(a.length<=0)return e.segments({inverted:!1,regions:[]});function o(u){var c=u.slice(0,u.length-1);return e.segments({inverted:!1,regions:[c]})}for(var s=o(a[0]),l=1;l{var oht=Hce(),sht=Wce(),ife=Kce(),lht=$ce(),IM=efe(),nfe=rfe(),E0=!1,RM=sht(),kp;kp={buildLog:function(e){return e===!0?E0=oht():e===!1&&(E0=!1),E0===!1?!1:E0.list},epsilon:function(e){return RM.epsilon(e)},segments:function(e){var t=ife(!0,RM,E0);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){var r=ife(!1,RM,E0);return{combined:r.calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:IM.union(e.combined,E0),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:IM.intersect(e.combined,E0),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:IM.difference(e.combined,E0),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:IM.differenceRev(e.combined,E0),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:IM.xor(e.combined,E0),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:lht(e.segments,RM,E0),inverted:e.inverted}},polygonFromGeoJSON:function(e){return nfe.toPolygon(kp,e)},polygonToGeoJSON:function(e){return nfe.fromPolygon(kp,RM,e)},union:function(e,t){return DM(e,t,kp.selectUnion)},intersect:function(e,t){return DM(e,t,kp.selectIntersect)},difference:function(e,t){return DM(e,t,kp.selectDifference)},differenceRev:function(e,t){return DM(e,t,kp.selectDifferenceRev)},xor:function(e,t){return DM(e,t,kp.selectXor)}};function DM(e,t,r){var n=kp.segments(e),i=kp.segments(t),a=kp.combine(n,i),o=r(a);return kp.polygon(o)}typeof window=="object"&&(window.PolyBool=kp);afe.exports=kp});var lfe=ye((por,sfe)=>{sfe.exports=function(t,r,n,i){var a=t[0],o=t[1],s=!1;n===void 0&&(n=0),i===void 0&&(i=r.length);for(var l=i-n,u=0,c=l-1;uo!=v>o&&a<(d-f)*(o-h)/(v-h)+f;_&&(s=!s)}return s}});var FM=ye((gor,ufe)=>{"use strict";var SN=P6().dot,wP=fs().BADNUM,TP=ufe.exports={};TP.tester=function(t){var r=t.slice(),n=r[0][0],i=n,a=r[0][1],o=a,s;for((r[r.length-1][0]!==r[0][0]||r[r.length-1][1]!==r[0][1])&&r.push(r[0]),s=1;si||p===wP||po||_&&u(v))}function f(v,_){var b=v[0],p=v[1];if(b===wP||bi||p===wP||po)return!1;var k=r.length,E=r[0][0],T=r[0][1],L=0,x,C,M,g,P;for(x=1;xMath.max(C,E)||p>Math.max(M,T)))if(ps||Math.abs(SN(f,u))>i)return!0;return!1};TP.filter=function(t,r){var n=[t[0]],i=0,a=0;function o(l){t.push(l);var u=n.length,c=i;n.splice(a+1);for(var f=c+1;f1){var s=t.pop();o(s)}return{addPt:o,raw:t,filtered:n}}});var ffe=ye((mor,cfe)=>{"use strict";cfe.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}});var Rfe=ye((yor,Ife)=>{"use strict";var hfe=ofe(),uht=lfe(),qM=qa(),cht=So().dashStyle,zM=ka(),fht=vf(),hht=ip().makeEventData,GM=Cg(),dht=GM.freeMode,vht=GM.rectMode,BM=GM.drawMode,CN=GM.openMode,LN=GM.selectMode,dfe=x_(),vfe=TM(),_fe=lP(),xfe=o_().clearOutline,bfe=m_(),MN=bfe.handleEllipse,pht=bfe.readPaths,ght=aP().newShapes,mht=QB(),yht=AN().activateLastSelection,SP=Dr(),_ht=SP.sorterAsc,wfe=FM(),OM=H6(),k0=hf().getFromId,xht=bM(),bht=CM().redrawReglTraces,MP=ffe(),Cm=MP.MINSELECT,wht=wfe.filter,PN=wfe.tester,IN=tP(),pfe=IN.p2r,Tht=IN.axValue,Aht=IN.getTransform;function RN(e){return e.subplot!==void 0}function Sht(e,t,r,n,i){var a=!RN(n),o=dht(i),s=vht(i),l=CN(i),u=BM(i),c=LN(i),f=i==="drawline",h=i==="drawcircle",d=f||h,v=n.gd,_=v._fullLayout,b=c&&_.newselection.mode==="immediate"&&a,p=_._zoomlayer,k=n.element.getBoundingClientRect(),E=n.plotinfo,T=Aht(E),L=t-k.left,x=r-k.top;_._calcInverseTransform(v);var C=SP.apply3DTransform(_._invTransform)(L,x);L=C[0],x=C[1];var M=_._invScaleX,g=_._invScaleY,P=L,A=x,z="M"+L+","+x,O=n.xaxes[0],U=n.yaxes[0],G=O._length,Z=U._length,j=e.altKey&&!(BM(i)&&l),N,H,re,oe,_e,Ce,Le;Afe(e,v,n),o&&(N=wht([[L,x]],MP.BENDPX));var ge=p.selectAll("path.select-outline-"+E.id).data([1]),ie=u?_.newshape:_.newselection;u&&(n.hasText=ie.label.text||ie.label.texttemplate);var Se=u&&!l?ie.fillcolor:"rgba(0,0,0,0)",Ee=ie.line.color||(a?zM.contrast(v._fullLayout.plot_bgcolor):"#7f7f7f");ge.enter().append("path").attr("class","select-outline select-outline-"+E.id).style({opacity:u?ie.opacity/2:1,"stroke-dasharray":cht(ie.line.dash,ie.line.width),"stroke-width":ie.line.width+"px","shape-rendering":"crispEdges"}).call(zM.stroke,Ee).call(zM.fill,Se).attr("fill-rule","evenodd").classed("cursor-move",!!u).attr("transform",T).attr("d",z+"Z");var Ae=p.append("path").attr("class","zoombox-corners").style({fill:zM.background,stroke:zM.defaultLine,"stroke-width":1}).attr("transform",T).attr("d","M0,0Z");if(u&&n.hasText){var Be=p.select(".label-temp");Be.empty()&&(Be=p.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Pe=_._uid+MP.SELECTID,me=[],De=EP(v,n.xaxes,n.yaxes,n.subplot);b&&!e.shiftKey&&(n._clearSubplotSelections=function(){if(a){var je=O._id,lt=U._id;Cfe(v,je,lt,De);for(var pt=(v.layout||{}).selections||[],Vt=[],ot=!1,ut=0;ut=0){v._fullLayout._deactivateShape(v);return}if(!u){var pt=_.clickmode;OM.done(Pe).then(function(){if(OM.clear(Pe),je===2){for(ge.remove(),_e=0;_e-1&&Tfe(lt,v,n.xaxes,n.yaxes,n.subplot,n,ge),pt==="event"&&VM(v,void 0);fht.click(v,lt,E.id)}).catch(SP.error)}},n.doneFn=function(){Ae.remove(),OM.done(Pe).then(function(){OM.clear(Pe),!b&&oe&&n.selectionDefs&&(oe.subtract=j,n.selectionDefs.push(oe),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,re)),(b||u)&&NM(n,b),n.doneFnCompleted&&n.doneFnCompleted(me),c&&VM(v,Le)}).catch(SP.error)}}function Tfe(e,t,r,n,i,a,o){var s=t._hoverdata,l=t._fullLayout,u=l.clickmode,c=u.indexOf("event")>-1,f=[],h,d,v,_,b,p,k,E,T,L;if(Lht(s)){Afe(e,t,a),h=EP(t,r,n,i);var x=Pht(s,h),C=x.pointNumbers.length>0;if(C?Iht(h,x):Rht(h)&&(k=mfe(x))){for(o&&o.remove(),L=0;L=0}function Cht(e){return e._fullLayout._activeSelectionIndex>=0}function NM(e,t){var r=e.dragmode,n=e.plotinfo,i=e.gd;kht(i)&&i._fullLayout._deactivateShape(i),Cht(i)&&i._fullLayout._deactivateSelection(i);var a=i._fullLayout,o=a._zoomlayer,s=BM(r),l=LN(r);if(s||l){var u=o.selectAll(".select-outline-"+n.id);if(u&&i._fullLayout._outlining){var c;s&&(c=ght(u,e)),c&&qM.call("_guiRelayout",i,{shapes:c});var f;l&&!RN(e)&&(f=mht(u,e)),f&&(i._fullLayout._noEmitSelectedAtStart=!0,qM.call("_guiRelayout",i,{selections:f}).then(function(){t&&yht(i)})),i._fullLayout._outlining=!1}}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function gfe(e){return e._id}function EP(e,t,r,n){if(!e.calcdata)return[];var i=[],a=t.map(gfe),o=r.map(gfe),s,l,u;for(u=0;u0,a=i?n[0]:r;return t.selectedpoints?t.selectedpoints.indexOf(a)>-1:!1}function Iht(e,t){var r=[],n,i,a,o;for(o=0;o0&&r.push(n);if(r.length===1&&(a=r[0]===t.searchInfo,a&&(i=t.searchInfo.cd[0].trace,i.selectedpoints.length===t.pointNumbers.length))){for(o=0;o1||(t+=n.selectedpoints.length,t>1)))return!1;return t===1}function UM(e,t,r){var n;for(n=0;n-1&&t;if(!o&&t){var je=yfe(e,!0);if(je.length){var lt=je[0].xref,pt=je[0].yref;if(lt&&pt){var Vt=Lfe(je),ot=Pfe([k0(e,lt,"x"),k0(e,pt,"y")]);ot(me,Vt)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:ce&&VM(e,me),h._reselect=!1}if(!o&&h._deselect){var ut=h._deselect;s=ut.xref,l=ut.yref,zht(s,l,c)||Cfe(e,s,l,n),ce&&(me.points.length?VM(e,me):zN(e)),h._deselect=!1}return{eventData:me,selectionTesters:r}}function Fht(e){var t=e.calcdata;if(t)for(var r=0;r{"use strict";Dfe.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]});var HM=ye((xor,Ffe)=>{"use strict";Ffe.exports={axisRefDescription:function(e,t,r){return["If set to a",e,"axis id (e.g. *"+e+"* or","*"+e+"2*), the `"+e+"` position refers to a",e,"coordinate. If set to *paper*, the `"+e+"`","position refers to the distance from the",t,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",t,"("+r+"). If set to a",e,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",t,"of the domain of that axis: e.g.,","*"+e+"2 domain* refers to the domain of the second",e," axis and a",e,"position of 0.5 refers to the","point between the",t,"and the",r,"of the domain of the","second",e,"axis."].join(" ")}}});var Jb=ye((wor,qfe)=>{"use strict";var zfe=ON(),Ofe=ec(),kP=Rh(),Uht=vl().templatedArray,bor=HM();qfe.exports=Uht("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:Ofe({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:zfe.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:zfe.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",kP.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",kP.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",kP.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",kP.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:Ofe({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})});var Lm=ye((Tor,Bfe)=>{"use strict";Bfe.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}});var Pg=ye((Aor,Nfe)=>{"use strict";Nfe.exports=function(t){return{valType:"color",editType:"style",anim:!0}}});var pf=ye((Sor,Zfe)=>{"use strict";var Ufe=df().axisHoverFormat,{hovertemplateAttrs:Vht,texttemplateAttrs:Ght,templatefallbackAttrs:Vfe}=Ll(),Gfe=Tu(),Hht=ec(),Hfe=Pd().dash,jht=Pd().pattern,Wht=So(),Xht=Lm(),jM=Ao().extendFlat,Zht=Pg();function jfe(e){return{valType:"any",dflt:0,editType:"calc"}}function Wfe(e){return{valType:"any",editType:"calc"}}function Xfe(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}Zfe.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dx:{valType:"number",dflt:1,editType:"calc",anim:!0},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dy:{valType:"number",dflt:1,editType:"calc",anim:!0},xperiod:jfe("x"),yperiod:jfe("y"),xperiod0:Wfe("x0"),yperiod0:Wfe("y0"),xperiodalignment:Xfe("x"),yperiodalignment:Xfe("y"),xhoverformat:Ufe("x"),yhoverformat:Ufe("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc"},alignmentgroup:{valType:"string",dflt:"",editType:"calc"},stackgroup:{valType:"string",dflt:"",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc"},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},texttemplate:Ght(),texttemplatefallback:Vfe({editType:"calc"}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc"},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style"},hovertemplate:Vht({},{keys:Xht.eventDataKeys}),hovertemplatefallback:Vfe(),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:jM({},Hfe,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot"},simplify:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot"},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc"},fillcolor:Zht(!0),fillgradient:jM({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc"},start:{valType:"number",editType:"calc"},stop:{valType:"number",editType:"calc"},colorscale:{valType:"colorscale",editType:"style"},editType:"calc"}),fillpattern:jht,marker:jM({symbol:{valType:"enumerated",values:Wht.symbolList,dflt:"circle",arrayOk:!0,editType:"style"},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot"},sizeref:{valType:"number",dflt:1,editType:"calc"},sizemin:{valType:"number",min:0,dflt:0,editType:"calc"},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc"},line:jM({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},dash:jM({},Hfe,{arrayOk:!0}),editType:"calc"},Gfe("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc"},color:{valType:"color",arrayOk:!0,editType:"calc"},editType:"calc"},editType:"calc"},Gfe("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc"},textfont:Hht({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}});var qN=ye((Eor,Jfe)=>{"use strict";var Yfe=Jb(),Kfe=pf().line,Yht=Pd().dash,CP=Ao().extendFlat,Kht=mc().overrideAll,Jht=vl().templatedArray,Mor=HM();Jfe.exports=Kht(Jht("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:CP({},Yfe.xref,{}),yref:CP({},Yfe.yref,{}),x0:{valType:"any"},x1:{valType:"any"},y0:{valType:"any"},y1:{valType:"any"},path:{valType:"string",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw"},line:{color:Kfe.color,width:CP({},Kfe.width,{min:1,dflt:1}),dash:CP({},Yht,{dflt:"dot"})}}),"arraydraw","from-root")});var the=ye((kor,ehe)=>{"use strict";var $fe=Dr(),LP=ho(),$ht=Zd(),Qht=qN(),Qfe=x_();ehe.exports=function(t,r){$ht(t,r,{name:"selections",handleItemDefaults:edt});for(var n=r.selections,i=0;i{"use strict";rhe.exports=function(t,r,n){n("newselection.mode");var i=n("newselection.line.width");i&&(n("newselection.line.color"),n("newselection.line.dash")),n("activeselection.fillcolor"),n("activeselection.opacity")}});var WM=ye((Lor,ohe)=>{"use strict";var tdt=qa(),nhe=Dr(),ahe=hf();ohe.exports=function(t){return function(n,i){var a=n[t];if(Array.isArray(a))for(var o=tdt.subplotsRegistry.cartesian,s=o.idRegex,l=i._subplots,u=l.xaxis,c=l.yaxis,f=l.cartesian,h=i._has("cartesian"),d=0;d{"use strict";var she=AN(),XM=Rfe();lhe.exports={moduleType:"component",name:"selections",layoutAttributes:qN(),supplyLayoutDefaults:the(),supplyDrawNewSelectionDefaults:ihe(),includeBasePlot:WM()("selections"),draw:she.draw,drawOne:she.drawOne,reselect:XM.reselect,prepSelect:XM.prepSelect,clearOutline:XM.clearOutline,clearSelectionsCache:XM.clearSelectionsCache,selectOnClick:XM.selectOnClick}});var jN=ye((Ior,khe)=>{"use strict";var GN=Oa(),C0=Dr(),uhe=C0.numberFormat,rdt=fd(),idt=UL(),PP=qa(),yhe=C0.strTranslate,ndt=Zl(),che=ka(),w_=So(),adt=vf(),fhe=ho(),odt=Eg(),sdt=yv(),_he=Cg(),IP=_he.selectingOrDrawing,ldt=_he.freeMode,udt=Dh().FROM_TL,cdt=bM(),fdt=CM().redrawReglTraces,hdt=Mc(),NN=hf().getFromId,ddt=Of().prepSelect,vdt=Of().clearOutline,pdt=Of().selectOnClick,BN=gN(),HN=Rh(),hhe=HN.MINDRAG,ap=HN.MINZOOM,dhe=!0;function gdt(e,t,r,n,i,a,o,s){var l=e._fullLayout._zoomlayer,u=o+s==="nsew",c=(o+s).length===1,f,h,d,v,_,b,p,k,E,T,L,x,C,M,g,P,A,z,O,U,G,Z,j;r+=t.yaxis._shift;function N(){if(f=t.xaxis,h=t.yaxis,E=f._length,T=h._length,p=f._offset,k=h._offset,d={},d[f._id]=f,v={},v[h._id]=h,o&&s)for(var It=t.overlays,mt=0;mt=0){er._fullLayout._deactivateShape(er);return}var lr=er._fullLayout.clickmode;if(VN(er),It===2&&!c&&fr(),u)lr.indexOf("select")>-1&&pdt(mt,er,_,b,t.id,oe),lr.indexOf("event")>-1&&adt.click(er,mt,t.id);else if(It===1&&c){var wr=o?h:f,Lr=o==="s"||s==="w"?0:1,ti=wr._name+".range["+Lr+"]",Br=mdt(wr,Lr),Vr="left",dt="middle";if(wr.fixedrange)return;o?(dt=o==="n"?"top":"bottom",wr.side==="right"&&(Vr="right")):s==="e"&&(Vr="right"),er._context.showAxisRangeEntryBoxes&&GN.select(re).call(ndt.makeEditable,{gd:er,immediate:!0,background:er._fullLayout.paper_bgcolor,text:String(Br),fill:wr.tickfont?wr.tickfont.color:"#444",horizontalAlign:Vr,verticalAlign:dt}).on("edit",function(Ge){var Je=wr.d2r(Ge);Je!==void 0&&PP.call("_guiRelayout",er,ti,Je)})}}sdt.init(oe);var Le,ge,ie,Se,Ee,Ae,Be,Pe,me,De;function ce(It,mt,er){var lr=re.getBoundingClientRect();Le=mt-lr.left,ge=er-lr.top,e._fullLayout._calcInverseTransform(e);var wr=C0.apply3DTransform(e._fullLayout._invTransform)(Le,ge);Le=wr[0],ge=wr[1],ie={l:Le,r:Le,w:0,t:ge,b:ge,h:0},Se=e._hmpixcount?e._hmlumcount/e._hmpixcount:rdt(e._fullLayout.plot_bgcolor).getLuminance(),Ee="M0,0H"+E+"V"+T+"H0V0",Ae=!1,Be="xy",De=!1,Pe=whe(l,Se,p,k,Ee),me=The(l,p,k)}function je(It,mt){if(e._transitioningWithDuration)return!1;var er=Math.max(0,Math.min(E,Z*It+Le)),lr=Math.max(0,Math.min(T,j*mt+ge)),wr=Math.abs(er-Le),Lr=Math.abs(lr-ge);ie.l=Math.min(Le,er),ie.r=Math.max(Le,er),ie.t=Math.min(ge,lr),ie.b=Math.max(ge,lr);function ti(){Be="",ie.r=ie.l,ie.t=ie.b,me.attr("d","M0,0Z")}if(L.isSubplotConstrained)wr>ap||Lr>ap?(Be="xy",wr/E>Lr/T?(Lr=wr*T/E,ge>lr?ie.t=ge-Lr:ie.b=ge+Lr):(wr=Lr*E/T,Le>er?ie.l=Le-wr:ie.r=Le+wr),me.attr("d",RP(ie))):ti();else if(x.isSubplotConstrained)if(wr>ap||Lr>ap){Be="xy";var Br=Math.min(ie.l/E,(T-ie.b)/T),Vr=Math.max(ie.r/E,(T-ie.t)/T);ie.l=Br*E,ie.r=Vr*E,ie.b=(1-Br)*T,ie.t=(1-Vr)*T,me.attr("d",RP(ie))}else ti();else!M||Lr0){var Ge;if(x.isSubplotConstrained||!C&&M.length===1){for(Ge=0;Ge<_.length;Ge++)_[Ge].range=_[Ge]._r.slice(),BN(_[Ge],1-mt/T);It=mt*E/T,Vr=It/2}if(x.isSubplotConstrained||!M&&C.length===1){for(Ge=0;Ge1&&(ti.maxallowed!==void 0&&P===(ti.range[0]1&&(Br.maxallowed!==void 0&&A===(Br.range[0]=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function _dt(e,t,r){return e?e==="nsew"?r?"":t==="pan"?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}function whe(e,t,r,n,i){return e.append("path").attr("class","zoombox").style({fill:t>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",yhe(r,n)).attr("d",i+"Z")}function The(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:che.background,stroke:che.defaultLine,"stroke-width":1,opacity:0}).attr("transform",yhe(t,r)).attr("d","M0,0Z")}function Ahe(e,t,r,n,i,a){e.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),She(e,t,i,a)}function She(e,t,r,n){r||(e.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function VN(e){GN.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function Mhe(e){dhe&&e.data&&e._context.showTips&&(C0.notifier(C0._(e,"Double-click to zoom back out"),"long"),dhe=!1)}function xdt(e,t){return"M"+(e.l-.5)+","+(t-ap-.5)+"h-3v"+(2*ap+1)+"h3ZM"+(e.r+.5)+","+(t-ap-.5)+"h3v"+(2*ap+1)+"h-3Z"}function bdt(e,t){return"M"+(t-ap-.5)+","+(e.t-.5)+"v-3h"+(2*ap+1)+"v3ZM"+(t-ap-.5)+","+(e.b+.5)+"v3h"+(2*ap+1)+"v-3Z"}function RP(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,ap)/2);return"M"+(e.l-3.5)+","+(e.t-.5+t)+"h3v"+-t+"h"+t+"v-3h-"+(t+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+t)+"h-3v"+-t+"h"+-t+"v-3h"+(t+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-t)+"h-3v"+t+"h"+-t+"v3h"+(t+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-t)+"h3v"+t+"h"+t+"v3h-"+(t+3)+"Z"}function ghe(e,t,r,n,i){for(var a=!1,o={},s={},l,u,c,f,h=(i||{}).xaHash,d=(i||{}).yaHash,v=0;v{"use strict";var wdt=Oa(),DP=vf(),Tdt=yv(),Adt=Eg(),Ig=jN().makeDragBox,gd=Rh().DRAGGERSIZE;FP.initInteractions=function(t){var r=t._fullLayout;if(t._context.staticPlot){wdt.select(t).selectAll(".drag").remove();return}if(!(!r._has("cartesian")&&!r._has("splom"))){var n=Object.keys(r._plots||{}).sort(function(a,o){if((r._plots[a].mainplot&&!0)===(r._plots[o].mainplot&&!0)){var s=a.split("y"),l=o.split("y");return s[0]===l[0]?Number(s[1]||1)-Number(l[1]||1):Number(s[0]||1)-Number(l[0]||1)}return r._plots[a].mainplot?1:-1});n.forEach(function(a){var o=r._plots[a],s=o.xaxis,l=o.yaxis;if(!o.mainplot){var u=Ig(t,o,s._offset,l._offset,s._length,l._length,"ns","ew");u.onmousemove=function(h){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===a&&t._fullLayout._plots[a]&&DP.hover(t,h,a)},DP.hover(t,h,a),t._fullLayout._lasthover=u,t._fullLayout._hoversubplot=a},u.onmouseout=function(h){t._dragging||(t._fullLayout._hoversubplot=null,Tdt.unhover(t,h))},t._context.showAxisDragHandles&&(Ig(t,o,s._offset-gd,l._offset-gd,gd,gd,"n","w"),Ig(t,o,s._offset+s._length,l._offset-gd,gd,gd,"n","e"),Ig(t,o,s._offset-gd,l._offset+l._length,gd,gd,"s","w"),Ig(t,o,s._offset+s._length,l._offset+l._length,gd,gd,"s","e"))}if(t._context.showAxisDragHandles){if(a===s._mainSubplot){var c=s._mainLinePosition;s.side==="top"&&(c-=gd),Ig(t,o,s._offset+s._length*.1,c,s._length*.8,gd,"","ew"),Ig(t,o,s._offset,c,s._length*.1,gd,"","w"),Ig(t,o,s._offset+s._length*.9,c,s._length*.1,gd,"","e")}if(a===l._mainSubplot){var f=l._mainLinePosition;l.side!=="right"&&(f-=gd),Ig(t,o,f,l._offset+l._length*.1,gd,l._length*.8,"ns",""),Ig(t,o,f,l._offset+l._length*.9,gd,l._length*.1,"s",""),Ig(t,o,f,l._offset,gd,l._length*.1,"n","")}}});var i=r._hoverlayer.node();i.onmousemove=function(a){a.target=t._fullLayout._lasthover,DP.hover(t,a,r._hoversubplot)},i.onclick=function(a){a.target=t._fullLayout._lasthover,DP.click(t,a)},i.onmousedown=function(a){t._fullLayout._lasthover.onmousedown(a)},FP.updateFx(t)}};FP.updateFx=function(e){var t=e._fullLayout,r=t.dragmode==="pan"?"move":"crosshair";Adt(t._draggers,r)}});var Phe=ye((Dor,Lhe)=>{"use strict";var Che=qa();Lhe.exports=function(t){for(var r=Che.layoutArrayContainers,n=Che.layoutArrayRegexes,i=t.split("[")[0],a,o,s=0;s{"use strict";var Sdt=Ty(),XN=L6(),ZM=K1(),Mdt=U6().sorterAsc,ZN=qa();YM.containerArrayMatch=Phe();var Edt=YM.isAddVal=function(t){return t==="add"||Sdt(t)},Ihe=YM.isRemoveVal=function(t){return t===null||t==="remove"};YM.applyContainerArrayChanges=function(t,r,n,i,a){var o=r.astr,s=ZN.getComponentMethod(o,"supplyLayoutDefaults"),l=ZN.getComponentMethod(o,"draw"),u=ZN.getComponentMethod(o,"drawOne"),c=i.replot||i.recalc||s===XN||l===XN,f=t.layout,h=t._fullLayout;if(n[""]){Object.keys(n).length>1&&ZM.warn("Full array edits are incompatible with other edits",o);var d=n[""][""];if(Ihe(d))r.set(null);else if(Array.isArray(d))r.set(d);else return ZM.warn("Unrecognized full array edit value",o,d),!0;return c?!1:(s(f,h),l(t),!0)}var v=Object.keys(n).map(Number).sort(Mdt),_=r.get(),b=_||[],p=a(h,o).get(),k=[],E=-1,T=b.length,L,x,C,M,g,P,A,z;for(L=0;Lb.length-(A?0:1)){ZM.warn("index out of range",o,C);continue}if(P!==void 0)g.length>1&&ZM.warn("Insertion & removal are incompatible with edits to the same index.",o,C),Ihe(P)?k.push(C):A?(P==="add"&&(P={}),b.splice(C,0,P),p&&p.splice(C,0,{})):ZM.warn("Unrecognized full object edit value",o,C,P),E===-1&&(E=C);else for(x=0;x=0;L--)b.splice(k[L],1),p&&p.splice(k[L],1);if(b.length?_||r.set(b):r.set(null),c)return!1;if(s(f,h),u!==XN){var O;if(E===-1)O=v;else{for(T=Math.max(b.length,T),O=[],L=0;L=E));L++)O.push(C);for(L=E;L{"use strict";var Ohe=Eo(),qhe=qa(),Uv=Dr(),KM=Mc(),Bhe=hf(),Nhe=ka(),JM=Bhe.cleanId,kdt=Bhe.getFromTrace,YN=qhe.traceIs,Cdt=["x","y","z"];L0.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&Uv.log("Clearing previous rejected promises from queue."),e._promises=[]};L0.cleanLayout=function(e){var t,r;e||(e={}),e.xaxis1&&(e.xaxis||(e.xaxis=e.xaxis1),delete e.xaxis1),e.yaxis1&&(e.yaxis||(e.yaxis=e.yaxis1),delete e.yaxis1),e.scene1&&(e.scene||(e.scene=e.scene1),delete e.scene1);var n=(KM.subplotsRegistry.cartesian||{}).attrRegex,i=(KM.subplotsRegistry.polar||{}).attrRegex,a=(KM.subplotsRegistry.ternary||{}).attrRegex,o=(KM.subplotsRegistry.gl3d||{}).attrRegex,s=Object.keys(e);for(t=0;t3?(b.x=1.02,b.xanchor="left"):b.x<-2&&(b.x=-.02,b.xanchor="right"),b.y>3?(b.y=1.02,b.yanchor="bottom"):b.y<-2&&(b.y=-.02,b.yanchor="top")),e.dragmode==="rotate"&&(e.dragmode="orbit"),Nhe.clean(e),e.template&&e.template.layout&&L0.cleanLayout(e.template.layout),e};function aT(e,t,r=!1){var n=e[t],i=t.charAt(0);r&&Array.isArray(n)||n&&n!=="paper"&&(e[t]=JM(n,i,!0))}L0.cleanData=function(e){for(var t=0;t0)return e.slice(0,t)}L0.hasParent=function(e,t){for(var r=zhe(t);r;){if(r in e)return!0;r=zhe(r)}return!1};L0.clearAxisTypes=function(e,t,r){for(var n=0;n{let r=(...n)=>n.every(i=>Uv.isPlainObject(i))||n.every(i=>Array.isArray(i));if([e,t].every(n=>Array.isArray(n))){if(e.length!==t.length)return!1;for(let n=0;nUv.isPlainObject(n))){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e){if(n.startsWith("_"))continue;let i=e[n],a=t[n];if(i!==a&&!(r(i,a)?KN(i,a):!1))return!1}return!0}return!1};L0.collectionsAreEqual=KN});var ZP=ye(_l=>{"use strict";var BP=Oa(),Idt=Eo(),Rdt=lq(),Sa=Dr(),Ec=Sa.nestedProperty,QN=k3(),op=Sne(),P0=qa(),WP=P3(),Qo=Mc(),Vv=ho(),Ddt=AB(),Fdt=Rd(),JN=So(),zdt=ka(),Odt=WN().initInteractions,qdt=Wp(),Bdt=Of().clearOutline,Whe=_b().dfltConfig,OP=Rhe(),gh=Uhe(),Au=CM(),T_=mc(),Ndt=Rh().AX_NAME_PATTERN,$N=0,Vhe=5;function Udt(e,t,r,n){var i;if(e=Sa.getGraphDiv(e),QN.init(e),Sa.isPlainObject(t)){var a=t;t=a.data,r=a.layout,n=a.config,i=a.frames}var o=QN.triggerHandler(e,"plotly_beforeplot",[t,r,n]);if(o===!1)return Promise.reject();!t&&!r&&!Sa.isPlotDiv(e)&&Sa.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",e);function s(){if(i)return _l.addFrames(e,i)}Zhe(e,n),r||(r={}),BP.select(e).classed("js-plotly-plot",!0),JN.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var l=(e.data||[]).length===0&&Array.isArray(t);Array.isArray(t)&&(gh.cleanData(t),l?e.data=t:e.data.push.apply(e.data,t),e.empty=!1),(!e.layout||l)&&(e.layout=gh.cleanLayout(r)),Qo.supplyDefaults(e);var u=e._fullLayout,c=u._has("cartesian");u._replotting=!0,(l||u._shouldCreateBgLayer)&&(cvt(e),u._shouldCreateBgLayer&&delete u._shouldCreateBgLayer),JN.initGradients(e),JN.initPatterns(e),l&&Vv.saveShowSpikeInitial(e);var f=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;f&&Qo.doCalcdata(e);for(var h=0;h=e.data.length||i<-e.data.length)throw new Error(r+" must be valid indices for gd.data.");if(t.indexOf(i,n+1)>-1||i>=0&&t.indexOf(-e.data.length+i)>-1||i<0&&t.indexOf(e.data.length+i)>-1)throw new Error("each index in "+r+" must be unique.")}}function Yhe(e,t,r){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof t=="undefined")throw new Error("currentIndices is a required argument.");if(Array.isArray(t)||(t=[t]),UP(e,t,"currentIndices"),typeof r!="undefined"&&!Array.isArray(r)&&(r=[r]),typeof r!="undefined"&&UP(e,r,"newIndices"),typeof r!="undefined"&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function Wdt(e,t,r){var n,i;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof t=="undefined")throw new Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),n=0;n=0&&c=0&&c0&&typeof M.parts[A]!="string";)A--;var z=M.parts[A],O=M.parts[A-1]+"."+z,U=M.parts.slice(0,A).join("."),G=Ec(e.layout,U).get(),Z=Ec(n,U).get(),j=M.get();if(g!==void 0){p[C]=g,k[C]=z==="reverse"?g:zy(j);var N=WP.getLayoutValObject(n,M.parts);if(N&&N.impliedEdits&&g!==null)for(var H in N.impliedEdits)E(Sa.relativeAttr(C,H),N.impliedEdits[H]);if(["width","height"].indexOf(C)!==-1)if(g){E("autosize",null);var re=C==="height"?"width":"height";E(re,n[re])}else n[C]=e._initialAutoSize[C];else if(C==="autosize")E("width",g?null:n.width),E("height",g?null:n.height);else if(O.match(nde))x(O),Ec(n,U+"._inputRange").set(null);else if(O.match(ade)){x(O),Ec(n,U+"._inputRange").set(null);var oe=Ec(n,U).get();oe._inputDomain&&(oe._input.domain=oe._inputDomain.slice())}else O.match(Kdt)&&Ec(n,U+"._inputDomain").set(null);if(z==="type"){L=G;var _e=Z.type==="linear"&&g==="log",Ce=Z.type==="log"&&g==="linear";if(_e||Ce){if(!L||!L.range)E(U+".autorange",!0);else if(Z.autorange)_e&&(L.range=L.range[1]>L.range[0]?[1,2]:[2,1]);else{var Le=L.range[0],ge=L.range[1];_e?(Le<=0&&ge<=0&&E(U+".autorange",!0),Le<=0?Le=ge/1e6:ge<=0&&(ge=Le/1e6),E(U+".range[0]",Math.log(Le)/Math.LN10),E(U+".range[1]",Math.log(ge)/Math.LN10)):(E(U+".range[0]",Math.pow(10,Le)),E(U+".range[1]",Math.pow(10,ge)))}Array.isArray(n._subplots.polar)&&n._subplots.polar.length&&n[M.parts[0]]&&M.parts[1]==="radialaxis"&&delete n[M.parts[0]]._subplot.viewInitial["radialaxis.range"],P0.getComponentMethod("annotations","convertCoords")(e,Z,g,E),P0.getComponentMethod("images","convertCoords")(e,Z,g,E)}else E(U+".autorange",!0),E(U+".range",null);Ec(n,U+"._inputRange").set(null)}else if(z.match(Ndt)){var ie=Ec(n,C).get(),Se=(g||{}).type;(!Se||Se==="-")&&(Se="linear"),P0.getComponentMethod("annotations","convertCoords")(e,ie,Se,E),P0.getComponentMethod("images","convertCoords")(e,ie,Se,E)}var Ee=OP.containerArrayMatch(C);if(Ee){c=Ee.array,f=Ee.index;var Ae=Ee.property,Be=N||{editType:"calc"};f!==""&&Ae===""&&(OP.isAddVal(g)?k[C]=null:OP.isRemoveVal(g)?k[C]=(Ec(r,c).get()||[])[f]:Sa.warn("unrecognized full object value",t)),T_.update(b,Be),u[c]||(u[c]={});var Pe=u[c][f];Pe||(Pe=u[c][f]={}),Pe[Ae]=g,delete t[C]}else z==="reverse"?(G.range?G.range.reverse():(E(U+".autorange",!0),G.range=[1,0]),Z.autorange?b.calc=!0:b.plot=!0):(C==="dragmode"&&(g===!1&&j!==!1||g!==!1&&j===!1)||n._has("scatter-like")&&n._has("regl")&&C==="dragmode"&&(g==="lasso"||g==="select")&&!(j==="lasso"||j==="select")?b.plot=!0:N?T_.update(b,N):b.calc=!0,M.set(g))}}for(c in u){var me=OP.applyContainerArrayChanges(e,a(r,c),u[c],b,a);me||(b.plot=!0)}for(var De in T){L=Vv.getFromId(e,De);var ce=L&&L._constraintGroup;if(ce){b.calc=!0;for(var je in ce)T[je]||(Vv.getFromId(e,je)._constraintShrinkable=!0)}}(sde(e)||t.height||t.width)&&(b.plot=!0);var lt=n.shapes;for(f=0;f1;)if(n.pop(),r=Ec(t,n.join(".")+".uirevision").get(),r!==void 0)return r;return t.uirevision}function Qdt(e,t){for(var r=0;r[U,e._ev.listeners(U)]);a=_l.newPlot(e,t,r,n).then(()=>{for(let[U,G]of O)G.forEach(Z=>e.on(U,Z));return _l.react(e,t,r,n)})}else{e.data=t||[],gh.cleanData(e.data),e.layout=r||{},gh.cleanLayout(e.layout),tvt(e.data,e.layout,s,l),Qo.supplyDefaults(e,{skipUpdateCalc:!0});var f=e._fullData,h=e._fullLayout,d=h.datarevision===void 0,v=h.transition,_=nvt(e,l,h,d,v),b=_.newDataRevision,p=ivt(e,s,f,d,v,b);if(sde(e)&&(_.layoutReplot=!0),p.calc||_.calc){e.calcdata=void 0;for(var k=Object.getOwnPropertyNames(h),E=0;E(c||e.emit("plotly_react",{config:n,data:t,layout:r}),e))}function ivt(e,t,r,n,i,a){var o=t.length===r.length;if(!i&&!o)return{fullReplot:!0,calc:!0};var s=T_.traceFlags();s.arrays={},s.nChanges=0,s.nChangesAnim=0;var l,u;function c(d){var v=WP.getTraceValObject(u,d);return!u._module.animatable&&v.anim&&(v.anim=!1),v}var f={getValObject:c,flags:s,immutable:n,transition:i,newDataRevision:a,gd:e},h={};for(l=0;l=i.length?i[0]:i[u]:i}function s(u){return Array.isArray(a)?u>=a.length?a[0]:a[u]:a}function l(u,c){var f=0;return function(){if(u&&++f===c)return u()}}return new Promise(function(u,c){function f(){if(n._frameQueue.length!==0){for(;n._frameQueue.length;){var z=n._frameQueue.pop();z.onInterrupt&&z.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}function h(z){if(z.length!==0){for(var O=0;On._timeToNext&&v()};z()}var b=0;function p(z){return Array.isArray(i)?b>=i.length?z.transitionOpts=i[b]:z.transitionOpts=i[0]:z.transitionOpts=i,b++,z}var k,E,T=[],L=t==null,x=Array.isArray(t),C=!L&&!x&&Sa.isPlainObject(t);if(C)T.push({type:"object",data:p(Sa.extendFlat({},t))});else if(L||["string","number"].indexOf(typeof t)!==-1)for(k=0;k0&&PP)&&A.push(E);T=A}}T.length>0?h(T):(e.emit("plotly_animated"),u())})}function ovt(e,t,r){if(e=Sa.getGraphDiv(e),t==null)return Promise.resolve();if(!Sa.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var n,i,a,o,s=e._transitionData._frames,l=e._transitionData._frameHash;if(!Array.isArray(t))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+t);var u=s.length+t.length*2,c=[],f={};for(n=t.length-1;n>=0;n--)if(Sa.isPlainObject(t[n])){var h=t[n].name,d=(l[h]||f[h]||{}).name,v=t[n].name,_=l[d]||f[d];d&&v&&typeof v=="number"&&_&&$NM.index?-1:C.index=0;n--){if(i=c[n].frame,typeof i.name=="number"&&Sa.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!i.name)for(;l[i.name="frame "+e._transitionData._counter++];);if(l[i.name]){for(a=0;a=0;r--)n=t[r],a.push({type:"delete",index:n}),o.unshift({type:"insert",index:n,value:i[n]});var s=Qo.modifyFrames,l=Qo.modifyFrames,u=[e,o],c=[e,a];return op&&op.add(e,s,u,l,c),Qo.modifyFrames(e,a)}function lvt(e){e=Sa.getGraphDiv(e);var t=e._fullLayout||{},r=e._fullData||[];return Qo.cleanPlot([],{},r,t),Qo.purge(e),QN.purge(e),t._container&&t._container.remove(),delete e._context,e}function uvt(e){var t=e._fullLayout,r=e.getBoundingClientRect();if(!Sa.equalDomRects(r,t._lastBBox)){var n=t._invTransform=Sa.inverseTransformMatrix(Sa.getFullTransformMatrix(e));t._invScaleX=Math.sqrt(n[0][0]*n[0][0]+n[0][1]*n[0][1]+n[0][2]*n[0][2]),t._invScaleY=Math.sqrt(n[1][0]*n[1][0]+n[1][1]*n[1][1]+n[1][2]*n[1][2]),t._lastBBox=r}}function cvt(e){var t=BP.select(e),r=e._fullLayout;if(r._calcInverseTransform=uvt,r._calcInverseTransform(e),r._container=t.selectAll(".plot-container").data([0]),r._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),r._paperdiv=r._container.selectAll(".svg-container").data([0]),r._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),r._glcontainer=r._paperdiv.selectAll(".gl-container").data([{}]),r._glcontainer.enter().append("div").classed("gl-container",!0),r._paperdiv.selectAll(".main-svg").remove(),r._paperdiv.select(".modebar-container").remove(),r._paper=r._paperdiv.insert("svg",":first-child").classed("main-svg",!0),r._toppaper=r._paperdiv.append("svg").classed("main-svg",!0),r._modebardiv=r._paperdiv.append("div"),delete r._modeBar,r._hoverpaper=r._paperdiv.append("svg").classed("main-svg",!0),!r._uid){var n={};BP.selectAll("defs").each(function(){this.id&&(n[this.id.split("-")[1]]=1)}),r._uid=Sa.randstr(n)}r._paperdiv.selectAll(".main-svg").attr(qdt.svgAttrs),r._defs=r._paper.append("defs").attr("id","defs-"+r._uid),r._clips=r._defs.append("g").classed("clips",!0),r._topdefs=r._toppaper.append("defs").attr("id","topdefs-"+r._uid),r._topclips=r._topdefs.append("g").classed("clips",!0),r._bgLayer=r._paper.append("g").classed("bglayer",!0),r._draggers=r._paper.append("g").classed("draglayer",!0);var i=r._paper.append("g").classed("layer-below",!0);r._imageLowerLayer=i.append("g").classed("imagelayer",!0),r._shapeLowerLayer=i.append("g").classed("shapelayer",!0),r._cartesianlayer=r._paper.append("g").classed("cartesianlayer",!0),r._polarlayer=r._paper.append("g").classed("polarlayer",!0),r._smithlayer=r._paper.append("g").classed("smithlayer",!0),r._ternarylayer=r._paper.append("g").classed("ternarylayer",!0),r._geolayer=r._paper.append("g").classed("geolayer",!0),r._funnelarealayer=r._paper.append("g").classed("funnelarealayer",!0),r._pielayer=r._paper.append("g").classed("pielayer",!0),r._iciclelayer=r._paper.append("g").classed("iciclelayer",!0),r._treemaplayer=r._paper.append("g").classed("treemaplayer",!0),r._sunburstlayer=r._paper.append("g").classed("sunburstlayer",!0),r._indicatorlayer=r._toppaper.append("g").classed("indicatorlayer",!0),r._glimages=r._paper.append("g").classed("glimages",!0);var a=r._toppaper.append("g").classed("layer-above",!0);r._imageUpperLayer=a.append("g").classed("imagelayer",!0),r._shapeUpperLayer=a.append("g").classed("shapelayer",!0),r._selectionLayer=r._toppaper.append("g").classed("selectionlayer",!0),r._infolayer=r._toppaper.append("g").classed("infolayer",!0),r._menulayer=r._toppaper.append("g").classed("menulayer",!0),r._zoomlayer=r._toppaper.append("g").classed("zoomlayer",!0),r._hoverlayer=r._hoverpaper.append("g").classed("hoverlayer",!0),r._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),e.emit("plotly_framework")}_l.animate=avt;_l.addFrames=ovt;_l.deleteFrames=svt;_l.addTraces=ede;_l.deleteTraces=tde;_l.extendTraces=$he;_l.moveTraces=eU;_l.prependTraces=Qhe;_l.newPlot=jdt;_l._doPlot=Udt;_l.purge=lvt;_l.react=rvt;_l.redraw=Hdt;_l.relayout=$M;_l.restyle=VP;_l.setPlotConfig=Vdt;_l.update=HP;_l._guiRelayout=tU($M);_l._guiRestyle=tU(VP);_l._guiUpdate=tU(HP);_l._storeDirectGUIEdit=Ydt});var Oy=ye(Pm=>{"use strict";var fvt=qa();Pm.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("mapbox")||e._has("map"))?500:0};Pm.getRedrawFunc=function(e){return function(){fvt.getComponentMethod("colorbar","draw")(e)}};Pm.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)};Pm.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var lde=window.URL||window.webkitURL;Pm.createObjectURL=function(e){return lde.createObjectURL(e)};Pm.revokeObjectURL=function(e){return lde.revokeObjectURL(e)};Pm.createBlob=function(e,t){if(t==="svg")return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if(t==="full-json")return new window.Blob([e],{type:"application/json;charset=utf-8"});var r=hvt(window.atob(e));return new window.Blob([r],{type:"image/"+t})};Pm.octetStream=function(e){document.location.href="data:application/octet-stream"+e};function hvt(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),i=0;i{"use strict";var iU=Oa(),Bor=Dr(),dvt=So(),vvt=ka(),Nor=Wp(),rU=/"/g,e4="TOBESTRIPPED",pvt=new RegExp('("'+e4+")|("+e4+'")',"g");function gvt(e){var t=iU.select("body").append("div").style({display:"none"}).html(""),r=e.replace(/(&[^;]*;)/gi,function(n){return n==="<"?"<":n==="&rt;"?">":n.indexOf("<")!==-1||n.indexOf(">")!==-1?"":t.html(n).text()});return t.remove(),r}function mvt(e){return e.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}ude.exports=function(t,r,n){var i=t._fullLayout,a=i._paper,o=i._toppaper,s=i.width,l=i.height,u;a.insert("rect",":first-child").call(dvt.setRect,0,0,s,l).call(vvt.fill,i.paper_bgcolor);var c=i._basePlotModules||[];for(u=0;u{"use strict";var yvt=Dr(),_vt=Ab().EventEmitter,t4=Oy();function xvt(e){var t=e.emitter||new _vt,r=new Promise(function(n,i){var a=window.Image,o=e.svg,s=e.format||"png",l=e.canvas,u=e.scale||1,c=e.width||300,f=e.height||150,h=u*c,d=u*f,v=l.getContext("2d",{willReadFrequently:!0}),_=new a,b,p;s==="svg"||yvt.isSafari()?p=t4.encodeSVG(o):(b=t4.createBlob(o,"svg"),p=t4.createObjectURL(b)),l.width=h,l.height=d,_.onload=function(){var k;switch(b=null,t4.revokeObjectURL(p),s!=="svg"&&v.drawImage(_,0,0,h,d),s){case"jpeg":k=l.toDataURL("image/jpeg");break;case"png":k=l.toDataURL("image/png");break;case"webp":k=l.toDataURL("image/webp");break;case"svg":k=p;break;default:var E="Image format is not jpeg, png, svg or webp.";if(i(new Error(E)),!e.promise)return t.emit("error",E)}n(k),e.promise||t.emit("success",k)},_.onerror=function(k){if(b=null,t4.revokeObjectURL(p),i(k),!e.promise)return t.emit("error",k)},_.src=p});return e.promise?r:t}cde.exports=xvt});var aU=ye((Gor,dde)=>{"use strict";var fde=Eo(),hde=ZP(),bvt=Mc(),Im=Dr(),r4=Oy(),wvt=YP(),Tvt=KP(),Avt=g6().version,nU={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};function Svt(e,t){t=t||{};var r,n,i,a;Im.isPlainObject(e)?(r=e.data||[],n=e.layout||{},i=e.config||{},a={}):(e=Im.getGraphDiv(e),r=Im.extendDeep([],e.data),n=Im.extendDeep({},e.layout),i=e._context,a=e._fullLayout||{});function o(x){return!(x in t)||Im.validate(t[x],nU[x])}if(!o("width")&&t.width!==null||!o("height")&&t.height!==null)throw new Error("Height and width should be pixel values.");if(!o("format"))throw new Error("Export format is not "+Im.join2(nU.format.values,", "," or ")+".");var s={};function l(x,C){return Im.coerce(t,s,nU,x,C)}var u=l("format"),c=l("width"),f=l("height"),h=l("scale"),d=l("setBackground"),v=l("imageDataOnly"),_=document.createElement("div");_.style.position="absolute",_.style.left="-5000px",document.body.appendChild(_);var b=Im.extendFlat({},n);c?b.width=c:t.width===null&&fde(a.width)&&(b.width=a.width),f?b.height=f:t.height===null&&fde(a.height)&&(b.height=a.height);var p=Im.extendFlat({},i,{_exportedPlot:!0,staticPlot:!0,setBackground:d}),k=r4.getRedrawFunc(_);function E(){return new Promise(function(x){setTimeout(x,r4.getDelay(_._fullLayout))})}function T(){return new Promise(function(x,C){var M=wvt(_,u,h),g=_._fullLayout.width,P=_._fullLayout.height;function A(){hde.purge(_),document.body.removeChild(_)}if(u==="full-json"){var z=bvt.graphJson(_,!1,"keepdata","object",!0,!0);return z.version=Avt,z=JSON.stringify(z),A(),x(v?z:r4.encodeJSON(z))}if(A(),u==="svg")return x(v?M:r4.encodeSVG(M));var O=document.createElement("canvas");O.id=Im.randstr(),Tvt({format:u,width:g,height:P,scale:h,canvas:O,svg:M,promise:!0}).then(x).catch(C)})}function L(x){return v?x.replace(r4.IMAGE_URL_PREFIX,""):x}return new Promise(function(x,C){hde.newPlot(_,r,b,p).then(k).then(E).then(T).then(function(M){x(L(M))}).catch(function(M){C(M)})})}dde.exports=Svt});var gde=ye((Hor,pde)=>{"use strict";var I0=Dr(),Mvt=Mc(),Evt=P3(),kvt=_b().dfltConfig,Rg=I0.isPlainObject,Qb=Array.isArray,oU=I0.isArrayOrTypedArray;pde.exports=function(t,r){t===void 0&&(t=[]),r===void 0&&(r={});var n=Evt.get(),i=[],a={_context:I0.extendFlat({},kvt)},o,s;Qb(t)?(a.data=I0.extendDeep([],t),o=t):(a.data=[],o=[],i.push(md("array","data"))),Rg(r)?(a.layout=I0.extendDeep({},r),s=r):(a.layout={},s={},arguments.length>1&&i.push(md("object","layout"))),Mvt.supplyDefaults(a);for(var l=a._fullData,u=o.length,c=0;cf.length&&n.push(md("unused",i,u.concat(f.length)));var p=f.length,k=Array.isArray(b);k&&(p=Math.min(p,b.length));var E,T,L,x,C;if(h.dimensions===2)for(T=0;Tf[T].length&&n.push(md("unused",i,u.concat(T,f[T].length)));var M=f[T].length;for(E=0;E<(k?Math.min(M,b[T].length):M);E++)L=k?b[T][E]:b,x=c[T][E],C=f[T][E],I0.validate(x,L)?C!==x&&C!==+x&&n.push(md("dynamic",i,u.concat(T,E),x,C)):n.push(md("value",i,u.concat(T,E),x))}else n.push(md("array",i,u.concat(T),c[T]));else for(T=0;T{"use strict";var Fvt=Dr(),$P=Oy();function zvt(e,t,r){var n=document.createElement("a"),i="download"in n,a=new Promise(function(o,s){var l,u;if(i)return l=$P.createBlob(e,r),u=$P.createObjectURL(l),n.href=u,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),$P.revokeObjectURL(u),l=null,o(t);if(Fvt.isSafari()){var c=r==="svg"?",":";base64,";return $P.octetStream(c+encodeURIComponent(e)),o(t)}s(new Error("download error"))});return a}mde.exports=zvt});var sU=ye((Xor,xde)=>{"use strict";var _de=Dr(),Ovt=aU(),qvt=yde(),Wor=Oy();function Bvt(e,t){var r;return _de.isPlainObject(e)||(r=_de.getGraphDiv(e)),t=t||{},t.format=t.format||"png",t.width=t.width||null,t.height=t.height||null,t.imageDataOnly=!0,new Promise(function(n,i){r&&r._snapshotInProgress&&i(new Error("Snapshotting already in progress.")),r&&(r._snapshotInProgress=!0);var a=Ovt(e,t),o=t.filename||e.fn||"newplot";o+="."+t.format.replace("-","."),a.then(function(s){return r&&(r._snapshotInProgress=!1),qvt(s,o,t.format)}).then(function(s){n(s)}).catch(function(s){r&&(r._snapshotInProgress=!1),i(s)})})}xde.exports=Bvt});var Sde=ye(lU=>{"use strict";var Cp=Dr(),Lp=Cp.isPlainObject,bde=P3(),wde=Mc(),Nvt=Gl(),Tde=vl(),Ade=_b().dfltConfig;lU.makeTemplate=function(e){e=Cp.isPlainObject(e)?e:Cp.getGraphDiv(e),e=Cp.extendDeep({_context:Ade},{data:e.data,layout:e.layout}),wde.supplyDefaults(e);var t=e.data||[],r=e.layout||{};r._basePlotModules=e._fullLayout._basePlotModules,r._modules=e._fullLayout._modules;var n={data:{},layout:{}};t.forEach(function(d){var v={};i4(d,v,Vvt.bind(null,d));var _=Cp.coerce(d,{},Nvt,"type"),b=n.data[_];b||(b=n.data[_]=[]),b.push(v)}),i4(r,n.layout,Uvt.bind(null,r)),delete n.layout.template;var i=r.template;if(Lp(i)){var a=i.layout,o,s,l,u,c,f;Lp(a)&&QP(a,n.layout);var h=i.data;if(Lp(h)){for(s in n.data)if(l=h[s],Array.isArray(l)){for(c=n.data[s],f=c.length,u=l.length,o=0;op?o.push({code:"unused",traceType:d,templateCount:b,dataCount:p}):p>b&&o.push({code:"reused",traceType:d,templateCount:b,dataCount:p})}}function k(E,T){for(var L in E)if(L.charAt(0)!=="_"){var x=E[L],C=R0(E,L,T);Lp(x)?(Array.isArray(E)&&x._template===!1&&x.templateitemname&&o.push({code:"missing",path:C,templateitemname:x.templateitemname}),k(x,C)):Array.isArray(x)&&Gvt(x)&&k(x,C)}}if(k({data:l,layout:s},""),o.length)return o.map(Hvt)};function Gvt(e){for(var t=0;t{"use strict";var rd=ZP();ef._doPlot=rd._doPlot;ef.newPlot=rd.newPlot;ef.restyle=rd.restyle;ef.relayout=rd.relayout;ef.redraw=rd.redraw;ef.update=rd.update;ef._guiRestyle=rd._guiRestyle;ef._guiRelayout=rd._guiRelayout;ef._guiUpdate=rd._guiUpdate;ef._storeDirectGUIEdit=rd._storeDirectGUIEdit;ef.react=rd.react;ef.extendTraces=rd.extendTraces;ef.prependTraces=rd.prependTraces;ef.addTraces=rd.addTraces;ef.deleteTraces=rd.deleteTraces;ef.moveTraces=rd.moveTraces;ef.purge=rd.purge;ef.addFrames=rd.addFrames;ef.deleteFrames=rd.deleteFrames;ef.animate=rd.animate;ef.setPlotConfig=rd.setPlotConfig;var jvt=HS().getGraphDiv,Wvt=dP().eraseActiveShape;ef.deleteActiveShape=function(e){return Wvt(jvt(e))};ef.toImage=aU();ef.validate=gde();ef.downloadImage=sU();var Mde=Sde();ef.makeTemplate=Mde.makeTemplate;ef.validateTemplate=Mde.validateTemplate});var oT=ye((Kor,kde)=>{"use strict";var uU=Dr(),Xvt=qa();kde.exports=function(t,r,n,i){var a=i("x"),o=i("y"),s,l=Xvt.getComponentMethod("calendars","handleTraceDefaults");if(l(t,r,["x","y"],n),a){var u=uU.minRowLength(a);o?s=Math.min(u,uU.minRowLength(o)):(s=u,i("y0"),i("dy"))}else{if(!o)return 0;s=uU.minRowLength(o),i("x0"),i("dx")}return r._length=s,s}});var Dg=ye((Jor,Pde)=>{"use strict";var Cde=Dr().dateTick0,Zvt=fs(),Yvt=Zvt.ONEWEEK;function Lde(e,t){return e%Yvt===0?Cde(t,1):Cde(t,0)}Pde.exports=function(t,r,n,i,a){if(a||(a={x:!0,y:!0}),a.x){var o=i("xperiod");o&&(i("xperiod0",Lde(o,r.xcalendar)),i("xperiodalignment"))}if(a.y){var s=i("yperiod");s&&(i("yperiod0",Lde(s,r.ycalendar)),i("yperiodalignment"))}}});var Dde=ye(($or,Rde)=>{"use strict";var Ide=["orientation","groupnorm","stackgaps"];Rde.exports=function(t,r,n,i){var a=n._scatterStackOpts,o=i("stackgroup");if(o){var s=r.xaxis+r.yaxis,l=a[s];l||(l=a[s]={});var u=l[o],c=!1;u?u.traces.push(r):(u=l[o]={traceIndices:[],traces:[r]},c=!0);for(var f={orientation:r.x&&!r.y?"h":"v"},h=0;h{"use strict";var Fde=ka(),zde=pv().hasColorscale,Ode=td(),Kvt=Ru();qde.exports=function(t,r,n,i,a,o={}){var s=Kvt.isBubble(t),l=(t.line||{}).color,u;if(l&&(n=l),a("marker.symbol"),a("marker.opacity",s?.7:1),a("marker.size"),o.noAngle||(a("marker.angle"),o.noAngleRef||a("marker.angleref"),o.noStandOff||a("marker.standoff")),a("marker.color",n),zde(t,"marker")&&Ode(t,r,i,a,{prefix:"marker.",cLetter:"c"}),o.noSelect||(a("selected.marker.color"),a("unselected.marker.color"),a("selected.marker.size"),a("unselected.marker.size")),o.noLine||(l&&!Array.isArray(l)&&r.marker.color!==l?u=l:s?u=Fde.background:u=Fde.defaultLine,a("marker.line.color",u),zde(t,"marker.line")&&Ode(t,r,i,a,{prefix:"marker.line.",cLetter:"c"}),a("marker.line.width",s?1:0),o.noLineDash||a("marker.line.dash")),s&&(a("marker.sizeref"),a("marker.sizemin"),a("marker.sizemode")),o.gradient){var c=a("marker.gradient.type");c!=="none"&&a("marker.gradient.color")}}});var D0=ye((esr,Bde)=>{"use strict";var Jvt=Dr().isArrayOrTypedArray,$vt=pv().hasColorscale,Qvt=td();Bde.exports=function(t,r,n,i,a,o){o||(o={});var s=(t.marker||{}).color;if(s&&s._inputArray&&(s=s._inputArray),a("line.color",n),$vt(t,"line"))Qvt(t,r,i,a,{prefix:"line.",cLetter:"c"});else{var l=(Jvt(s)?!1:s)||n;a("line.color",l)}a("line.width"),o.noDash||a("line.dash"),o.backoff&&a("line.backoff")}});var sT=ye((tsr,Nde)=>{"use strict";Nde.exports=function(t,r,n){var i=n("line.shape");i==="spline"&&n("line.smoothing")}});var F0=ye((rsr,Ude)=>{"use strict";var ept=Dr();Ude.exports=function(e,t,r,n,i){i=i||{},n("textposition"),ept.coerceFont(n,"textfont",i.font||r.font,i),i.noSelect||(n("selected.textfont.color"),n("unselected.textfont.color"))}});var Fg=ye((isr,Gde)=>{"use strict";var tI=ka(),Vde=Dr().isArrayOrTypedArray;function tpt(e){for(var t=tI.interpolate(e[0][1],e[1][1],.5),r=2;r{"use strict";var Hde=Dr(),rpt=qa(),ipt=pf(),npt=Lm(),lT=Ru(),apt=oT(),opt=Dg(),spt=Dde(),lpt=$p(),upt=D0(),jde=sT(),cpt=F0(),fpt=Fg(),hpt=Dr().coercePattern;Wde.exports=function(t,r,n,i){function a(d,v){return Hde.coerce(t,r,ipt,d,v)}var o=apt(t,r,i,a);if(o||(r.visible=!1),!!r.visible){opt(t,r,i,a),a("xhoverformat"),a("yhoverformat"),a("zorder");var s=spt(t,r,i,a);i.scattermode==="group"&&r.orientation===void 0&&a("orientation","v");var l=!s&&o{"use strict";var dpt=Kb().getAxisGroup;Zde.exports=function(t,r,n,i,a){var o=r.orientation,s=r[{v:"x",h:"y"}[o]+"axis"],l=dpt(n,s)+o,u=n._alignmentOpts||{},c=i("alignmentgroup"),f=u[l];f||(f=u[l]={});var h=f[c];h?h.traces.push(r):h=f[c]={traces:[r],alignmentIndex:Object.keys(f).length,offsetGroups:{}};var d=i("offsetgroup")||"",v=h.offsetGroups,_=v[d];r._offsetIndex=0,(a!=="group"||d)&&(_||(_=v[d]={offsetIndex:Object.keys(v).length}),r._offsetIndex=_.offsetIndex)}});var cU=ye((osr,Yde)=>{"use strict";var vpt=Dr(),ppt=e2(),gpt=pf();Yde.exports=function(t,r){var n,i,a,o=r.scattermode;function s(h){return vpt.coerce(i._input,i,gpt,h)}if(r.scattermode==="group")for(a=0;a=0;c--){var f=t[c];if(f.type==="scatter"&&f.xaxis===l.xaxis&&f.yaxis===l.yaxis){f.opacity=void 0;break}}}}}});var Jde=ye((ssr,Kde)=>{"use strict";var mpt=Dr(),ypt=tL();Kde.exports=function(e,t){function r(i,a){return mpt.coerce(e,t,ypt,i,a)}var n=t.barmode==="group";t.scattermode==="group"&&r("scattergap",n?t.bargap:.2)}});var zg=ye((lsr,Qde)=>{"use strict";var _pt=Eo(),$de=Dr(),xpt=$de.dateTime2ms,rI=$de.incrementMonth,bpt=fs(),wpt=bpt.ONEAVGMONTH;Qde.exports=function(t,r,n,i){if(r.type!=="date")return{vals:i};var a=t[n+"periodalignment"];if(!a)return{vals:i};var o=t[n+"period"],s;if(_pt(o)){if(o=+o,o<=0)return{vals:i}}else if(typeof o=="string"&&o.charAt(0)==="M"){var l=+o.substring(1);if(l>0&&Math.round(l)===l)s=l;else return{vals:i}}for(var u=r.calendar,c=a==="start",f=a==="end",h=t[n+"period0"],d=xpt(h,u)||0,v=[],_=[],b=[],p=i.length,k=0;kE;)x=rI(x,-s,u);for(;x<=E;)x=rI(x,s,u);L=rI(x,-s,u)}else{for(T=Math.round((E-d)/o),x=d+T*o;x>E;)x-=o;for(;x<=E;)x+=o;L=x-o}v[k]=c?L:f?x:(L+x)/2,_[k]=L,b[k]=x}return{vals:v,starts:_,ends:b}}});var z0=ye((usr,tve)=>{"use strict";var fU=pv().hasColorscale,hU=gv(),eve=Ru();tve.exports=function(t,r){eve.hasLines(r)&&fU(r,"line")&&hU(t,r,{vals:r.line.color,containerStr:"line",cLetter:"c"}),eve.hasMarkers(r)&&(fU(r,"marker")&&hU(t,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),fU(r,"marker.line")&&hU(t,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}});var Rm=ye((csr,rve)=>{"use strict";var qf=Dr();rve.exports=function(t,r){for(var n=0;n{"use strict";var ive=Dr();nve.exports=function(t,r){ive.isArrayOrTypedArray(r.selectedpoints)&&ive.tagSelected(t,r)}});var q0=ye((hsr,fve)=>{"use strict";var ave=Eo(),vU=Dr(),n4=ho(),ove=zg(),dU=fs().BADNUM,pU=Ru(),Tpt=z0(),Apt=Rm(),Spt=O0();function Mpt(e,t){var r=e._fullLayout,n=t._xA=n4.getFromId(e,t.xaxis||"x","x"),i=t._yA=n4.getFromId(e,t.yaxis||"y","y"),a=n.makeCalcdata(t,"x"),o=i.makeCalcdata(t,"y"),s=ove(t,n,"x",a),l=ove(t,i,"y",o),u=s.vals,c=l.vals,f=t._length,h=new Array(f),d=t.ids,v=gU(t,r,n,i),_=!1,b,p,k,E,T,L;uve(r,t);var x="x",C="y",M;if(v)vU.pushUnique(v.traceIndices,t.index),b=v.orientation==="v",b?(C="s",M="x"):(x="s",M="y"),T=v.stackgaps==="interpolate";else{var g=lve(t,f);sve(e,t,n,i,u,c,g)}var P=!!t.xperiodalignment,A=!!t.yperiodalignment;for(p=0;pp&&h[E].gap;)E--;for(L=h[E].s,k=h.length-1;k>E;k--)h[k].s=L;for(;p{"use strict";hve.exports=iI;var Ept=Dr().distinctVals;function iI(e,t){this.traces=e,this.sepNegVal=t.sepNegVal,this.overlapNoMerge=t.overlapNoMerge;for(var r=1/0,n=t.posAxis._id.charAt(0),i=[],a=0;a{"use strict";vve.exports={TEXTPAD:3,eventDataKeys:["value","label"]}});var t2=ye((psr,yve)=>{"use strict";var B0=Eo(),{isArrayOrTypedArray:qy}=Dr(),{BADNUM:uT}=fs(),kpt=qa(),a4=ho(),{getAxisGroup:Cpt}=Kb(),nI=dve(),{TEXTPAD:Lpt}=A_(),{LINE_SPACING:Ppt}=Dh(),{BR_TAG_ALL:Ipt}=Zl();function Rpt(e,t){for(var r=t.xaxis,n=t.yaxis,i=e._fullLayout,a=e._fullData,o=e.calcdata,s=[],l=[],u=0;ul+o||!B0(s))}for(var c=0;cn(a))):n(e.text);let i=e.outsidetextfont.size*Ppt*r+Lpt;return{ppadplus:t.some(a=>a.s<0)?i:0,ppadminus:t.some(a=>a.s>=0)?i:0}}return{ppadplus:void 0,ppadminus:void 0}}function Gpt(e,t,r,n){for(var i=cT(n),a=0;a{"use strict";var _ve=q0(),xve=t2().setGroupPositions;function jpt(e,t){for(var r=t.xaxis,n=t.yaxis,i=e._fullLayout,a=e._fullData,o=e.calcdata,s=[],l=[],u=0;ug[c]&&c{"use strict";var Xpt=So(),Mve=fs(),o4=Mve.BADNUM,Eve=Mve.LOG_CLIP,Tve=Eve+.5,Ave=Eve-.5,aI=Dr(),Zpt=aI.segmentsIntersect,Sve=aI.constrain,TU=Lm();kve.exports=function(t,r){var n=r.trace||{},i=r.xaxis,a=r.yaxis,o=i.type==="log",s=a.type==="log",l=i._length,u=a._length,c=r.backoff,f=n.marker,h=r.connectGaps,d=r.baseTolerance,v=r.shape,_=v==="linear",b=n.fill&&n.fill!=="none",p=[],k=TU.minTolerance,E=t.length,T=new Array(E),L=0,x,C,M,g,P,A,z,O,U,G,Z,j,N,H,re,oe;function _e(dt){var Ge=t[dt];if(!Ge)return!1;var Je=r.linearized?i.l2p(Ge.x):i.c2p(Ge.x),We=r.linearized?a.l2p(Ge.y):a.c2p(Ge.y);if(Je===o4){if(o&&(Je=i.c2p(Ge.x,!0)),Je===o4)return!1;s&&We===o4&&(Je*=Math.abs(i._m*u*(i._m>0?Tve:Ave)/(a._m*l*(a._m>0?Tve:Ave)))),Je*=1e3}if(We===o4){if(s&&(We=a.c2p(Ge.y,!0)),We===o4)return!1;We*=1e3}return[Je,We]}function Ce(dt,Ge,Je,We){var tt=Je-dt,xt=We-Ge,Ie=.5-dt,xe=.5-Ge,ke=tt*tt+xt*xt,vt=tt*Ie+xt*xe;if(vt>0&&vt1||Math.abs(Ie.y-Je[0][1])>1)&&(Ie=[Ie.x,Ie.y],We&&Se(Ie,dt)Be||dt[1]me)return[Sve(dt[0],Ae,Be),Sve(dt[1],Pe,me)]}function Nt(dt,Ge){if(dt[0]===Ge[0]&&(dt[0]===Ae||dt[0]===Be)||dt[1]===Ge[1]&&(dt[1]===Pe||dt[1]===me))return!0}function $t(dt,Ge){var Je=[],We=Wt(dt),tt=Wt(Ge);return We&&tt&&Nt(We,tt)||(We&&Je.push(We),tt&&Je.push(tt)),Je}function sr(dt,Ge,Je){return function(We,tt){var xt=Wt(We),Ie=Wt(tt),xe=[];if(xt&&Ie&&Nt(xt,Ie))return xe;xt&&xe.push(xt),Ie&&xe.push(Ie);var ke=2*aI.constrain((We[dt]+tt[dt])/2,Ge,Je)-((xt||We)[dt]+(Ie||tt)[dt]);if(ke){var vt;xt&&Ie?vt=ke>0==xt[dt]>Ie[dt]?xt:Ie:vt=xt||Ie,vt[dt]+=ke}return xe}}var Tr;v==="linear"||v==="spline"?Tr=ut:v==="hv"||v==="vh"?Tr=$t:v==="hvh"?Tr=sr(0,Ae,Be):v==="vhv"&&(Tr=sr(1,Pe,me));function fr(dt,Ge){var Je=Ge[0]-dt[0],We=(Ge[1]-dt[1])/Je,tt=(dt[1]*Ge[0]-Ge[1]*dt[0])/Je;return tt>0?[We>0?Ae:Be,me]:[We>0?Be:Ae,Pe]}function $e(dt){var Ge=dt[0],Je=dt[1],We=Ge===T[L-1][0],tt=Je===T[L-1][1];if(!(We&&tt))if(L>1){var xt=Ge===T[L-2][0],Ie=Je===T[L-2][1];We&&(Ge===Ae||Ge===Be)&&xt?Ie?L--:T[L-1]=dt:tt&&(Je===Pe||Je===me)&&Ie?xt?L--:T[L-1]=dt:T[L++]=dt}else T[L++]=dt}function St(dt){T[L-1][0]!==dt[0]&&T[L-1][1]!==dt[1]&&$e([lt,pt]),$e(dt),Vt=null,lt=pt=0}var Qt=aI.isArrayOrTypedArray(f);function Gt(dt){if(dt&&c&&(dt.i=x,dt.d=t,dt.trace=n,dt.marker=Qt?f[dt.i]:f,dt.backoff=c),Le=dt[0]/l,ge=dt[1]/u,ce=dt[0]Be?Be:0,je=dt[1]me?me:0,ce||je){if(!L)T[L++]=[ce||dt[0],je||dt[1]];else if(Vt){var Ge=Tr(Vt,dt);Ge.length>1&&(St(Ge[0]),T[L++]=Ge[1])}else ot=Tr(T[L-1],dt)[0],T[L++]=ot;var Je=T[L-1];ce&&je&&(Je[0]!==ce||Je[1]!==je)?(Vt&&(lt!==ce&&pt!==je?$e(lt&&pt?fr(Vt,dt):[lt||ce,pt||je]):lt&&pt&&$e([lt,pt])),$e([ce,je])):lt-ce&&pt-je&&$e([ce||lt,je||pt]),Vt=dt,lt=ce,pt=je}else Vt&&St(Tr(Vt,dt)[0]),T[L++]=dt}for(x=0;xie(A,_t))break;M=A,N=U[0]*O[0]+U[1]*O[1],N>Z?(Z=N,g=A,z=!1):N=t.length||!A)break;Gt(A),C=A}}Vt&&$e([lt||Vt[0],pt||Vt[1]]),p.push(T.slice(0,L))}var It=v.slice(v.length-1);if(c&&It!=="h"&&It!=="v"){for(var mt=!1,er=-1,lr=[],wr=0;wr{"use strict";var Cve={tonextx:1,tonexty:1,tonext:1};Lve.exports=function(t,r,n){var i,a,o,s,l,u={},c=!1,f=-1,h=0,d=-1;for(a=0;a=0?l=d:(l=d=h,h++),l{"use strict";var Og=Oa(),Ypt=qa(),s4=Dr(),fT=s4.ensureSingle,Ive=s4.identity,Kf=So(),hT=Ru(),Kpt=AU(),Jpt=SU(),oI=FM().tester;Rve.exports=function(t,r,n,i,a,o){var s,l,u=!a,c=!!a&&a.duration>0,f=Jpt(t,r,n);if(s=i.selectAll("g.trace").data(f,function(d){return d[0].trace.uid}),s.enter().append("g").attr("class",function(d){return"trace scatter trace"+d[0].trace.uid}).style("stroke-miterlimit",2),s.order(),$pt(t,s,r),c){o&&(l=o());var h=Og.transition().duration(a.duration).ease(a.easing).each("end",function(){l&&l()}).each("interrupt",function(){l&&l()});h.each(function(){i.selectAll("g.trace").each(function(d,v){Pve(t,v,r,d,f,this,a)})})}else s.each(function(d,v){Pve(t,v,r,d,f,this,a)});u&&s.exit().remove(),i.selectAll("path:not([d])").remove()};function $pt(e,t,r){t.each(function(n){var i=fT(Og.select(this),"g","fills");Kf.setClipUrl(i,r.layerClipId,e);var a=n[0].trace;a._ownFill=null,a._nextFill=null;var o=[];a._ownfill&&o.push("_ownFill"),a._nexttrace&&o.push("_nextFill");var s=i.selectAll("g").data(o,Ive);s.enter().append("g"),s.exit().remove(),s.order().each(function(l){a[l]=fT(Og.select(this),"path","js-fill")})})}function Pve(e,t,r,n,i,a,o){var s=e._context.staticPlot,l;Qpt(e,t,r,n,i);var u=!!o&&o.duration>0;function c(sr){return u?sr.transition():sr}var f=r.xaxis,h=r.yaxis,d=n[0].trace,v=d.line,_=Og.select(a),b=fT(_,"g","errorbars"),p=fT(_,"g","lines"),k=fT(_,"g","points"),E=fT(_,"g","text");if(Ypt.getComponentMethod("errorbars","plot")(e,b,r,o),d.visible!==!0)return;c(_).style("opacity",d.opacity);var T,L,x=d.fill.charAt(d.fill.length-1);x!=="x"&&x!=="y"&&(x="");var C,M;x==="y"?(C=1,M=h.c2p(0,!0)):x==="x"&&(C=0,M=f.c2p(0,!0)),n[0][r.isRangePlot?"nodeRangePlot3":"node3"]=_;var g="",P=[],A=d._prevtrace,z=null,O=null;A&&(g=A._prevRevpath||"",L=A._nextFill,P=A._ownPolygons,z=A._fillsegments,O=A._fillElement);var U,G,Z="",j="",N,H,re,oe,_e,Ce,Le=[];d._polygons=[];var ge=[],ie=[],Se=s4.noop;if(T=d._ownFill,hT.hasLines(d)||d.fill!=="none"){L&&L.datum(n),["hv","vh","hvh","vhv"].indexOf(v.shape)!==-1?(N=Kf.steps(v.shape),H=Kf.steps(v.shape.split("").reverse().join(""))):v.shape==="spline"?N=H=function(sr){var Tr=sr[sr.length-1];return sr.length>1&&sr[0][0]===Tr[0]&&sr[0][1]===Tr[1]?Kf.smoothclosed(sr.slice(1),v.smoothing):Kf.smoothopen(sr,v.smoothing)}:N=H=function(sr){return"M"+sr.join("L")},re=function(sr){return H(sr.reverse())},ie=Kpt(n,{xaxis:f,yaxis:h,trace:d,connectGaps:d.connectgaps,baseTolerance:Math.max(v.width||1,3)/4,shape:v.shape,backoff:v.backoff,simplify:v.simplify,fill:d.fill}),ge=new Array(ie.length);var Ee=0;for(l=0;l=s[0]&&_.x<=s[1]&&_.y>=l[0]&&_.y<=l[1]}),h=Math.ceil(f.length/c),d=0;i.forEach(function(_,b){var p=_[0].trace;hT.hasMarkers(p)&&p.marker.maxdisplayed>0&&b{"use strict";Dve.exports={container:"marker",min:"cmin",max:"cmax"}});var lI=ye((bsr,Fve)=>{"use strict";var sI=ho();Fve.exports=function(t,r,n){var i={},a={_fullLayout:n},o=sI.getFromTrace(a,r,"x"),s=sI.getFromTrace(a,r,"y"),l=t.orig_x;l===void 0&&(l=t.x);var u=t.orig_y;return u===void 0&&(u=t.y),i.xLabel=sI.tickText(o,o.c2l(l),!0).text,i.yLabel=sI.tickText(s,s.c2l(u),!0).text,i}});var sp=ye((wsr,zve)=>{"use strict";var MU=Oa(),vT=So(),e0t=qa();function t0t(e){var t=MU.select(e).selectAll("g.trace.scatter");t.style("opacity",function(r){return r[0].trace.opacity}),t.selectAll("g.points").each(function(r){var n=MU.select(this),i=r.trace||r[0].trace;EU(n,i,e)}),t.selectAll("g.text").each(function(r){var n=MU.select(this),i=r.trace||r[0].trace;kU(n,i,e)}),t.selectAll("g.trace path.js-line").call(vT.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(vT.fillGroupStyle,e,!1),e0t.getComponentMethod("errorbars","style")(t)}function EU(e,t,r){vT.pointStyle(e.selectAll("path.point"),t,r)}function kU(e,t,r){vT.textPointStyle(e.selectAll("text"),t,r)}function r0t(e,t,r){var n=t[0].trace;n.selectedpoints?(vT.selectedPointStyle(r.selectAll("path.point"),n),vT.selectedTextStyle(r.selectAll("text"),n)):(EU(r,n,e),kU(r,n,e))}zve.exports={style:t0t,stylePoints:EU,styleText:kU,styleOnSelect:r0t}});var gT=ye((Tsr,Ove)=>{"use strict";var pT=ka(),i0t=Ru();Ove.exports=function(t,r){var n,i;if(t.mode==="lines")return n=t.line.color,n&&pT.opacity(n)?n:t.fillcolor;if(t.mode==="none")return t.fill?t.fillcolor:"";var a=r.mcc||(t.marker||{}).color,o=r.mlcc||((t.marker||{}).line||{}).color;return i=a&&pT.opacity(a)?a:o&&pT.opacity(o)&&(r.mlw||((t.marker||{}).line||{}).width)?o:"",i?pT.opacity(i)<.3?pT.addOpacity(i,.3):i:(n=(t.line||{}).color,n&&pT.opacity(n)&&i0t.hasLines(t)&&t.line.width?n:t.fillcolor)}});var mT=ye((Asr,Bve)=>{"use strict";var uI=Dr(),qve=vf(),n0t=qa(),a0t=gT(),CU=ka(),o0t=uI.fillText;Bve.exports=function(t,r,n,i){var a=t.cd,o=a[0].trace,s=t.xa,l=t.ya,u=s.c2p(r),c=l.c2p(n),f=[u,c],h=o.hoveron||"",d=o.mode.indexOf("markers")!==-1?3:.5,v=!!o.xperiodalignment,_=!!o.yperiodalignment;if(h.indexOf("points")!==-1){var b=function(j){if(v){var N=s.c2p(j.xStart),H=s.c2p(j.xEnd);return u>=Math.min(N,H)&&u<=Math.max(N,H)?0:1/0}var re=Math.max(3,j.mrc||0),oe=1-1/re,_e=Math.abs(s.c2p(j.x)-u);return _e=Math.min(N,H)&&c<=Math.max(N,H)?0:1/0}var re=Math.max(3,j.mrc||0),oe=1-1/re,_e=Math.abs(l.c2p(j.y)-c);return _eLe!=me>=Le&&(Ae=Se[ie-1][0],Be=Se[ie][0],me-Pe&&(Ee=Ae+(Be-Ae)*(Le-Pe)/(me-Pe),re=Math.min(re,Ee),oe=Math.max(oe,Ee)));return re=Math.max(re,0),oe=Math.min(oe,s._length),{x0:re,x1:oe,y0:Le,y1:Le}}if(h.indexOf("fills")!==-1&&o._fillElement){var U=z(o._fillElement)&&!z(o._fillExclusionElement);if(U){var G=O(o._polygons);G===null&&(G={x0:f[0],x1:f[0],y0:f[1],y1:f[1]});var Z=CU.defaultLine;return CU.opacity(o.fillcolor)?Z=o.fillcolor:CU.opacity((o.line||{}).color)&&(Z=o.line.color),uI.extendFlat(t,{distance:t.maxHoverDistance,x0:G.x0,x1:G.x1,y0:G.y0,y1:G.y1,color:Z,hovertemplate:!1}),delete t.index,o.text&&!uI.isArrayOrTypedArray(o.text)?t.text=String(o.text):t.text=o.name,[t]}}}});var yT=ye((Ssr,Uve)=>{"use strict";var Nve=Ru();Uve.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l,u,c,f,h=!Nve.hasMarkers(s)&&!Nve.hasText(s);if(h)return[];if(r===!1)for(l=0;l{"use strict";Vve.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}});var PU=ye((Esr,Wve)=>{"use strict";var l4=qa().traceIs,LU=V3();Wve.exports=function(t,r,n,i){n("autotypenumbers",i.autotypenumbersDflt);var a=n("type",(i.splomStash||{}).type);a==="-"&&(s0t(r,i.data),r.type==="-"?r.type="linear":t.type=r.type)};function s0t(e,t){if(e.type==="-"){var r=e._id,n=r.charAt(0),i;r.indexOf("scene")!==-1&&(r=n);var a=l0t(t,r,n);if(a){if(a.type==="histogram"&&n==={v:"y",h:"x"}[a.orientation||"v"]){e.type="linear";return}var o=n+"calendar",s=a[o],l={noMultiCategory:!l4(a,"cartesian")||l4(a,"noMultiCategory")};if(a.type==="box"&&a._hasPreCompStats&&n==={h:"x",v:"y"}[a.orientation||"v"]&&(l.noMultiCategory=!0),l.autotypenumbers=e.autotypenumbers,jve(a,n)){var u=Hve(a),c=[];for(i=0;i0&&(i["_"+r+"axes"]||{})[t])return i;if((i[r+"axis"]||r)===t){if(jve(i,r))return i;if((i[r]||[]).length||i[r+"0"])return i}}}function Hve(e){return{v:"x",h:"y"}[e.orientation||"v"]}function jve(e,t){var r=Hve(e),n=l4(e,"box-violin"),i=l4(e._fullInput||{},"candlestick");return n&&!i&&t===r&&e[r]===void 0&&e[r+"0"]===void 0}});var cI=ye((ksr,Xve)=>{"use strict";var u0t=vv().isTypedArraySpec;function c0t(e,t){var r=t.dataAttr||e._id.charAt(0),n={},i,a,o;if(t.axData)i=t.axData;else for(i=[],a=0;a0||u0t(a),s;o&&(s="array");var l=n("categoryorder",s),u;l==="array"&&(u=n("categoryarray")),!o&&l==="array"&&(l=r.categoryorder="trace"),l==="trace"?r._initialCategories=[]:l==="array"?r._initialCategories=u.slice():(u=c0t(r,i).sort(),l==="category ascending"?r._initialCategories=u:l==="category descending"&&(r._initialCategories=u.reverse()))}}});var u4=ye((Csr,Yve)=>{"use strict";var Zve=fd().mix,f0t=Ih(),h0t=Dr();Yve.exports=function(t,r,n,i){i=i||{};var a=i.dfltColor;function o(M,g){return h0t.coerce2(t,r,i.attributes,M,g)}var s=o("linecolor",a),l=o("linewidth"),u=n("showline",i.showLine||!!s||!!l);u||(delete r.linecolor,delete r.linewidth);var c=Zve(a,i.bgColor,i.blend||f0t.lightFraction).toRgbString(),f=o("gridcolor",c),h=o("gridwidth"),d=o("griddash"),v=n("showgrid",i.showGrid||!!f||!!h||!!d);if(v||(delete r.gridcolor,delete r.gridwidth,delete r.griddash),i.hasMinor){var _=Zve(r.gridcolor,i.bgColor,67).toRgbString(),b=o("minor.gridcolor",_),p=o("minor.gridwidth",r.gridwidth||1),k=o("minor.griddash",r.griddash||"solid"),E=n("minor.showgrid",!!b||!!p||!!k);E||(delete r.minor.gridcolor,delete r.minor.gridwidth,delete r.minor.griddash)}if(!i.noZeroLine){var T=o("zerolinelayer"),L=o("zerolinecolor",a),x=o("zerolinewidth"),C=n("zeroline",i.showGrid||!!L||!!x);C||(delete r.zerolinelayer,delete r.zerolinecolor,delete r.zerolinewidth)}}});var f4=ye((Lsr,tpe)=>{"use strict";var Kve=Eo(),d0t=qa(),c4=Dr(),v0t=vl(),p0t=Zd(),IU=Rd(),Jve=Lb(),$ve=F3(),g0t=s_(),m0t=l_(),y0t=cI(),_0t=u4(),x0t=AB(),Qve=xm(),fI=Rh().WEEKDAY_PATTERN,b0t=Rh().HOUR_PATTERN;tpe.exports=function(t,r,n,i,a){var o=i.letter,s=i.font||{},l=i.splomStash||{},u=n("visible",!i.visibleDflt),c=r._template||{},f=r.type||c.type||"-",h;if(f==="date"){var d=d0t.getComponentMethod("calendars","handleDefaults");d(t,r,"calendar",i.calendar),i.noTicklabelmode||(h=n("ticklabelmode"))}!i.noTicklabelindex&&(f==="date"||f==="linear")&&n("ticklabelindex");var v="";(!i.noTicklabelposition||f==="multicategory")&&(v=c4.coerce(t,r,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:h==="period"?["outside","inside"]:o==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),i.noTicklabeloverflow||n("ticklabeloverflow",v.indexOf("inside")!==-1?"hide past domain":f==="category"||f==="multicategory"?"allow":"hide past div"),Qve(r,a),x0t(t,r,n,i),y0t(t,r,n,i),i.noHover||(f!=="category"&&n("hoverformat"),i.noUnifiedhovertitle||n("unifiedhovertitle.text"));var _=n("color"),b=_!==IU.color.dflt?_:s.color,p=l.label||a._dfltTitle[o];if(m0t(t,r,n,f,i),!u)return r;n("title.text",p),c4.coerceFont(n,"title.font",s,{overrideDflt:{size:c4.bigFont(s.size),color:b}}),Jve(t,r,n,f);var k=i.hasMinor;if(k&&(v0t.newContainer(r,"minor"),Jve(t,r,n,f,{isMinor:!0})),g0t(t,r,n,f,i),$ve(t,r,n,i),k){var E=i.isMinor;i.isMinor=!0,$ve(t,r,n,i),i.isMinor=E}_0t(t,r,n,{dfltColor:_,bgColor:i.bgColor,showGrid:i.showGrid,hasMinor:k,attributes:IU}),k&&!r.minor.ticks&&!r.minor.showgrid&&delete r.minor,(r.showline||r.ticks)&&n("mirror");var T=f==="multicategory";if(!i.noTickson&&(f==="category"||T)&&(r.ticks||r.showgrid)&&(T?(n("tickson","boundaries"),delete r.ticklabelposition):n("tickson")),T){var L=n("showdividers");L&&(n("dividercolor"),n("dividerwidth"))}if(f==="date")if(p0t(t,r,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:w0t}),!r.rangebreaks.length)delete r.rangebreaks;else{for(var x=0;x=2){var o="",s,l;if(a.length===2){for(s=0;s<2;s++)if(l=epe(a[s]),l){o=fI;break}}var u=n("pattern",o);if(u===fI)for(s=0;s<2;s++)l=epe(a[s]),l&&(t.bounds[s]=a[s]=l-1);if(u)for(s=0;s<2;s++)switch(l=a[s],u){case fI:if(!Kve(l)){t.enabled=!1;return}if(l=+l,l!==Math.floor(l)||l<0||l>=7){t.enabled=!1;return}t.bounds[s]=a[s]=l;break;case b0t:if(!Kve(l)){t.enabled=!1;return}if(l=+l,l<0||l>24){t.enabled=!1;return}t.bounds[s]=a[s]=l;break}if(r.autorange===!1){var c=r.range;if(c[0]c[1]){t.enabled=!1;return}}else if(a[0]>c[0]&&a[1]{"use strict";var A0t=Eo(),hI=Dr();rpe.exports=function(t,r,n,i){var a=i.counterAxes||[],o=i.overlayableAxes||[],s=i.letter,l=i.grid,u=i.overlayingDomain,c,f,h,d,v,_;l&&(f=l._domains[s][l._axisMap[r._id]],c=l._anchors[r._id],f&&(h=l[s+"side"].split(" ")[0],d=l.domain[s][h==="right"||h==="top"?1:0])),f=f||[0,1],c=c||(A0t(t.position)?"free":a[0]||"free"),h=h||(s==="x"?"bottom":"left"),d=d||0,v=0,_=!1;var b=hI.coerce(t,r,{anchor:{valType:"enumerated",values:["free"].concat(a),dflt:c}},"anchor"),p=hI.coerce(t,r,{side:{valType:"enumerated",values:s==="x"?["bottom","top"]:["left","right"],dflt:h}},"side");if(b==="free"){if(s==="y"){var k=n("autoshift");k&&(d=p==="left"?u[0]:u[1],_=r.automargin?r.automargin:!0,v=p==="left"?-3:3),n("shift",v)}n("position",d)}n("automargin",_);var E=!1;if(o.length&&(E=hI.coerce(t,r,{overlaying:{valType:"enumerated",values:[!1].concat(o),dflt:!1}},"overlaying")),!E){var T=n("domain",f);T[0]>T[1]-1/4096&&(r.domain=f),hI.noneOrAll(t.domain,r.domain,f),r.tickmode==="sync"&&(r.tickmode="auto")}return n("layer"),r}});var fpe=ye((Isr,cpe)=>{"use strict";var r2=Dr(),ipe=ka(),S0t=ip().isUnifiedHover,M0t=YB(),npe=vl(),E0t=_3(),ape=Rd(),k0t=PU(),ope=f4(),C0t=Kb(),spe=dI(),DU=hf(),Dm=DU.id2name,lpe=DU.name2id,L0t=Rh().AX_ID_PATTERN,upe=qa(),vI=upe.traceIs,RU=upe.getComponentMethod;function pI(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}cpe.exports=function(t,r,n){var i=r.autotypenumbers,a={},o={},s={},l={},u={},c={},f={},h={},d={},v={},_,b;for(_=0;_{"use strict";var P0t=Oa(),hpe=qa(),gI=Dr(),Qp=So(),mI=ho();dpe.exports=function(t,r,n,i){var a=t._fullLayout;if(r.length===0){mI.redrawComponents(t);return}function o(b){var p=b.xaxis,k=b.yaxis;a._defs.select("#"+b.clipId+"> rect").call(Qp.setTranslate,0,0).call(Qp.setScale,1,1),b.plot.call(Qp.setTranslate,p._offset,k._offset).call(Qp.setScale,1,1);var E=b.plot.selectAll(".scatterlayer .trace");E.selectAll(".point").call(Qp.setPointGroupScale,1,1),E.selectAll(".textpoint").call(Qp.setTextPointsScale,1,1),E.call(Qp.hideOutsideRangePoints,b)}function s(b,p){var k=b.plotinfo,E=k.xaxis,T=k.yaxis,L=E._length,x=T._length,C=!!b.xr1,M=!!b.yr1,g=[];if(C){var P=gI.simpleMap(b.xr0,E.r2l),A=gI.simpleMap(b.xr1,E.r2l),z=P[1]-P[0],O=A[1]-A[0];g[0]=(P[0]*(1-p)+p*A[0]-P[0])/(P[1]-P[0])*L,g[2]=L*(1-p+p*O/z),E.range[0]=E.l2r(P[0]*(1-p)+p*A[0]),E.range[1]=E.l2r(P[1]*(1-p)+p*A[1])}else g[0]=0,g[2]=L;if(M){var U=gI.simpleMap(b.yr0,T.r2l),G=gI.simpleMap(b.yr1,T.r2l),Z=U[1]-U[0],j=G[1]-G[0];g[1]=(U[1]*(1-p)+p*G[1]-U[1])/(U[0]-U[1])*x,g[3]=x*(1-p+p*j/Z),T.range[0]=E.l2r(U[0]*(1-p)+p*G[0]),T.range[1]=T.l2r(U[1]*(1-p)+p*G[1])}else g[1]=0,g[3]=x;mI.drawOne(t,E,{skipTitle:!0}),mI.drawOne(t,T,{skipTitle:!0}),mI.redrawComponents(t,[E._id,T._id]);var N=C?L/g[2]:1,H=M?x/g[3]:1,re=C?g[0]:0,oe=M?g[1]:0,_e=C?g[0]/g[2]*L:0,Ce=M?g[1]/g[3]*x:0,Le=E._offset-_e,ge=T._offset-Ce;k.clipRect.call(Qp.setTranslate,re,oe).call(Qp.setScale,1/N,1/H),k.plot.call(Qp.setTranslate,Le,ge).call(Qp.setScale,N,H),Qp.setPointGroupScale(k.zoomScalePts,1/N,1/H),Qp.setTextPointsScale(k.zoomScaleTxt,1/N,1/H)}var l;i&&(l=i());function u(){for(var b={},p=0;pn.duration?(u(),d=window.cancelAnimationFrame(_)):d=window.requestAnimationFrame(_)}return f=Date.now(),d=window.requestAnimationFrame(_),Promise.resolve()}});var mh=ye(xv=>{"use strict";var _I=Oa(),ppe=qa(),i2=Dr(),I0t=Mc(),R0t=So(),gpe=Id().getModuleCalcData,S_=hf(),qg=Rh(),D0t=Wp(),iu=i2.ensureSingle;function yI(e,t,r){return i2.ensureSingle(e,t,r,function(n){n.datum(r)})}var n2=qg.zindexSeparator;xv.name="cartesian";xv.attr=["xaxis","yaxis"];xv.idRoot=["x","y"];xv.idRegex=qg.idRegex;xv.attrRegex=qg.attrRegex;xv.attributes=Gve();xv.layoutAttributes=Rd();xv.supplyLayoutDefaults=fpe();xv.transitionAxes=vpe();xv.finalizeSubplots=function(e,t){var r=t._subplots,n=r.xaxis,i=r.yaxis,a=r.cartesian,o=a,s={},l={},u,c,f;for(u=0;u0){var d=h.id;if(d.indexOf(n2)!==-1)continue;d+=n2+(u+1),h=i2.extendFlat({},h,{id:d,plot:i._cartesianlayer.selectAll(".subplot").select("."+d)})}for(var v=[],_,b=0;b1&&(L+=n2+T),E.push(s+L),o=0;o1,f=t.mainplotinfo;if(!t.mainplot||c)if(u)t.xlines=iu(n,"path","xlines-above"),t.ylines=iu(n,"path","ylines-above"),t.xaxislayer=iu(n,"g","xaxislayer-above"),t.yaxislayer=iu(n,"g","yaxislayer-above");else{if(!o){var h=iu(n,"g","layer-subplot");t.shapelayer=iu(h,"g","shapelayer"),t.imagelayer=iu(h,"g","imagelayer"),f&&c?(t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer):(t.minorGridlayer=iu(n,"g","minor-gridlayer"),t.gridlayer=iu(n,"g","gridlayer"),t.zerolinelayer=iu(n,"g","zerolinelayer"));var d=iu(n,"g","layer-between");t.shapelayerBetween=iu(d,"g","shapelayer"),t.imagelayerBetween=iu(d,"g","imagelayer"),iu(n,"path","xlines-below"),iu(n,"path","ylines-below"),t.overlinesBelow=iu(n,"g","overlines-below"),iu(n,"g","xaxislayer-below"),iu(n,"g","yaxislayer-below"),t.overaxesBelow=iu(n,"g","overaxes-below")}t.overplot=iu(n,"g","overplot"),t.plot=iu(t.overplot,"g",i),f&&c?t.zerolinelayerAbove=f.zerolinelayerAbove:t.zerolinelayerAbove=iu(n,"g","zerolinelayer-above"),o||(t.xlines=iu(n,"path","xlines-above"),t.ylines=iu(n,"path","ylines-above"),t.overlinesAbove=iu(n,"g","overlines-above"),iu(n,"g","xaxislayer-above"),iu(n,"g","yaxislayer-above"),t.overaxesAbove=iu(n,"g","overaxes-above"),t.xlines=n.select(".xlines-"+s),t.ylines=n.select(".ylines-"+l),t.xaxislayer=n.select(".xaxislayer-"+s),t.yaxislayer=n.select(".yaxislayer-"+l))}else{var v=f.plotgroup,_=i+"-x",b=i+"-y";t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer,t.zerolinelayerAbove=f.zerolinelayerAbove,iu(f.overlinesBelow,"path",_),iu(f.overlinesBelow,"path",b),iu(f.overaxesBelow,"g",_),iu(f.overaxesBelow,"g",b),t.plot=iu(f.overplot,"g",i),iu(f.overlinesAbove,"path",_),iu(f.overlinesAbove,"path",b),iu(f.overaxesAbove,"g",_),iu(f.overaxesAbove,"g",b),t.xlines=v.select(".overlines-"+s).select("."+_),t.ylines=v.select(".overlines-"+l).select("."+b),t.xaxislayer=v.select(".overaxes-"+s).select("."+_),t.yaxislayer=v.select(".overaxes-"+l).select("."+b)}o||(u||(yI(t.minorGridlayer,"g",t.xaxis._id),yI(t.minorGridlayer,"g",t.yaxis._id),t.minorGridlayer.selectAll("g").map(function(p){return p[0]}).sort(S_.idSort),yI(t.gridlayer,"g",t.xaxis._id),yI(t.gridlayer,"g",t.yaxis._id),t.gridlayer.selectAll("g").map(function(p){return p[0]}).sort(S_.idSort)),t.xlines.style("fill","none").classed("crisp",!0),t.ylines.style("fill","none").classed("crisp",!0))}function _pe(e,t){if(e){var r={};e.each(function(l){var u=l[0],c=_I.select(this);c.remove(),xpe(u,t),r[u]=!0});for(var n in t._plots)for(var i=t._plots[n],a=i.overlays||[],o=0;o{"use strict";var xI=Ru();bpe.exports={hasLines:xI.hasLines,hasMarkers:xI.hasMarkers,hasText:xI.hasText,isBubble:xI.isBubble,attributes:pf(),layoutAttributes:tL(),supplyDefaults:Xde(),crossTraceDefaults:cU(),supplyLayoutDefaults:Jde(),calc:q0().calc,crossTraceCalc:wve(),arraysToCalcdata:Rm(),plot:dT(),colorbar:$d(),formatLabels:lI(),style:sp().style,styleOnSelect:sp().styleOnSelect,hoverPoints:mT(),selectPoints:yT(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:mh(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}});var Spe=ye((zsr,Ape)=>{"use strict";var z0t=Oa(),O0t=ka(),Tpe=ON(),FU=Dr(),q0t=FU.strScale,B0t=FU.strRotate,N0t=FU.strTranslate;Ape.exports=function(t,r,n){var i=t.node(),a=Tpe[n.arrowhead||0],o=Tpe[n.startarrowhead||0],s=(n.arrowwidth||1)*(n.arrowsize||1),l=(n.arrowwidth||1)*(n.startarrowsize||1),u=r.indexOf("start")>=0,c=r.indexOf("end")>=0,f=a.backoff*s+n.standoff,h=o.backoff*l+n.startstandoff,d,v,_,b;if(i.nodeName==="line"){d={x:+t.attr("x1"),y:+t.attr("y1")},v={x:+t.attr("x2"),y:+t.attr("y2")};var p=d.x-v.x,k=d.y-v.y;if(_=Math.atan2(k,p),b=_+Math.PI,f&&h&&f+h>Math.sqrt(p*p+k*k)){U();return}if(f){if(f*f>p*p+k*k){U();return}var E=f*Math.cos(_),T=f*Math.sin(_);v.x+=E,v.y+=T,t.attr({x2:v.x,y2:v.y})}if(h){if(h*h>p*p+k*k){U();return}var L=h*Math.cos(_),x=h*Math.sin(_);d.x-=L,d.y-=x,t.attr({x1:d.x,y1:d.y})}}else if(i.nodeName==="path"){var C=i.getTotalLength(),M="";if(C{"use strict";var Mpe=Oa(),zU=qa(),U0t=Mc(),E_=Dr(),OU=E_.strTranslate,d4=ho(),a2=ka(),By=So(),Epe=vf(),qU=Zl(),BU=Eg(),h4=yv(),V0t=vl().arrayEditor,G0t=Spe();Lpe.exports={draw:H0t,drawOne:kpe,drawRaw:Cpe};function H0t(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r2/3?tt="right":tt="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[tt]}for(var Pe=!1,me=["x","y"],De=0;De1)&&(lt===je?(_t=pt.r2fraction(t["a"+ce]),(_t<0||_t>1)&&(Pe=!0)):Pe=!0),Tr=pt._offset+pt.r2p(t[ce]),St=.5}else{var It=Gt==="domain";ce==="x"?($e=t[ce],Tr=It?pt._offset+pt._length*$e:Tr=s.l+s.w*$e):($e=1-t[ce],Tr=It?pt._offset+pt._length*$e:Tr=s.t+s.h*$e),St=t.showarrow?.5:$e}if(t.showarrow){sr.head=Tr;var mt=t["a"+ce];if(Qt=ot*Be(.5,t.xanchor)-ut*Be(.5,t.yanchor),lt===je){var er=d4.getRefType(lt);er==="domain"?(ce==="y"&&(mt=1-mt),sr.tail=pt._offset+pt._length*mt):er==="paper"?ce==="y"?(mt=1-mt,sr.tail=s.t+s.h*mt):sr.tail=s.l+s.w*mt:sr.tail=pt._offset+pt.r2p(mt),fr=Qt}else sr.tail=Tr+mt,fr=Qt+mt;sr.text=sr.tail+Qt;var lr=o[ce==="x"?"width":"height"];if(je==="paper"&&(sr.head=E_.constrain(sr.head,1,lr-1)),lt==="pixel"){var wr=-Math.max(sr.tail-3,sr.text),Lr=Math.min(sr.tail+3,sr.text)-lr;wr>0?(sr.tail+=wr,sr.text+=wr):Lr>0&&(sr.tail-=Lr,sr.text-=Lr)}sr.tail+=$t,sr.head+=$t}else Qt=Wt*Be(St,Nt),fr=Qt,sr.text=Tr+Qt;sr.text+=$t,Qt+=$t,fr+=$t,t["_"+ce+"padplus"]=Wt/2+fr,t["_"+ce+"padminus"]=Wt/2-fr,t["_"+ce+"size"]=Wt,t["_"+ce+"shift"]=Qt}if(Pe){C.remove();return}var ti=0,Br=0;if(t.align!=="left"&&(ti=(ie-Le)*(t.align==="center"?.5:1)),t.valign!=="top"&&(Br=(Se-ge)*(t.valign==="middle"?.5:1)),_e)oe.select("svg").attr({x:P+ti-1,y:P+Br}).call(By.setClipUrl,z?_:null,e);else{var Vr=P+Br-Ce.top,dt=P+ti-Ce.left;Z.call(qU.positionText,dt,Vr).call(By.setClipUrl,z?_:null,e)}O.select("rect").call(By.setRect,P,P,ie,Se),A.call(By.setRect,M/2,M/2,Ee-M,Ae-M),C.call(By.setTranslate,Math.round(b.x.text-Ee/2),Math.round(b.y.text-Ae/2)),E.attr({transform:"rotate("+p+","+b.x.text+","+b.y.text+")"});var Ge=function(We,tt){k.selectAll(".annotation-arrow-g").remove();var xt=b.x.head,Ie=b.y.head,xe=b.x.tail+We,ke=b.y.tail+tt,vt=b.x.text+We,ir=b.y.text+tt,ar=E_.rotationXYMatrix(p,vt,ir),vr=E_.apply2DTransform(ar),ii=E_.apply2DTransform2(ar),pi=+A.attr("width"),$r=+A.attr("height"),di=vt-.5*pi,ji=di+pi,In=ir-.5*$r,wi=In+$r,On=[[di,In,di,wi],[di,wi,ji,wi],[ji,wi,ji,In],[ji,In,di,In]].map(ii);if(!On.reduce(function(Qr,Oi){return Qr^!!E_.segmentsIntersect(xt,Ie,xt+1e6,Ie+1e6,Oi[0],Oi[1],Oi[2],Oi[3])},!1)){On.forEach(function(Qr){var Oi=E_.segmentsIntersect(xe,ke,xt,Ie,Qr[0],Qr[1],Qr[2],Qr[3]);Oi&&(xe=Oi.x,ke=Oi.y)});var qn=t.arrowwidth,Fn=t.arrowcolor,ra=t.arrowside,la=k.append("g").style({opacity:a2.opacity(Fn)}).classed("annotation-arrow-g",!0),Ut=la.append("path").attr("d","M"+xe+","+ke+"L"+xt+","+Ie).style("stroke-width",qn+"px").call(a2.stroke,a2.rgb(Fn));if(G0t(Ut,ra,t),l.annotationPosition&&Ut.node().parentNode&&!n){var wt=xt,rr=Ie;if(t.standoff){var nr=Math.sqrt(Math.pow(xt-xe,2)+Math.pow(Ie-ke,2));wt+=t.standoff*(xe-xt)/nr,rr+=t.standoff*(ke-Ie)/nr}var Er=la.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(xe-wt)+","+(ke-rr),transform:OU(wt,rr)}).style("stroke-width",qn+6+"px").call(a2.stroke,"rgba(0,0,0,0)").call(a2.fill,"rgba(0,0,0,0)"),Xr,ri;h4.init({element:Er.node(),gd:e,prepFn:function(){var Qr=By.getTranslate(C);Xr=Qr.x,ri=Qr.y,i&&i.autorange&&h(i._name+".autorange",!0),a&&a.autorange&&h(a._name+".autorange",!0)},moveFn:function(Qr,Oi){var $i=vr(Xr,ri),tn=$i[0]+Qr,fn=$i[1]+Oi;C.call(By.setTranslate,tn,fn),d("x",M_(i,Qr,"x",s,t)),d("y",M_(a,Oi,"y",s,t)),t.axref===t.xref&&d("ax",M_(i,Qr,"ax",s,t)),t.ayref===t.yref&&d("ay",M_(a,Oi,"ay",s,t)),la.attr("transform",OU(Qr,Oi)),E.attr({transform:"rotate("+p+","+tn+","+fn+")"})},doneFn:function(){zU.call("_guiRelayout",e,v());var Qr=document.querySelector(".js-notes-box-panel");Qr&&Qr.redraw(Qr.selectedObj)}})}}};if(t.showarrow&&Ge(0,0),T){var Je;h4.init({element:C.node(),gd:e,prepFn:function(){Je=E.attr("transform")},moveFn:function(We,tt){var xt="pointer";if(t.showarrow)t.axref===t.xref?d("ax",M_(i,We,"ax",s,t)):d("ax",t.ax+We),t.ayref===t.yref?d("ay",M_(a,tt,"ay",s.w,t)):d("ay",t.ay+tt),Ge(We,tt);else{if(n)return;var Ie,xe;if(i)Ie=M_(i,We,"x",s,t);else{var ke=t._xsize/s.w,vt=t.x+(t._xshift-t.xshift)/s.w-ke/2;Ie=h4.align(vt+We/s.w,ke,0,1,t.xanchor)}if(a)xe=M_(a,tt,"y",s,t);else{var ir=t._ysize/s.h,ar=t.y-(t._yshift+t.yshift)/s.h-ir/2;xe=h4.align(ar-tt/s.h,ir,0,1,t.yanchor)}d("x",Ie),d("y",xe),(!i||!a)&&(xt=h4.getCursor(i?.5:Ie,a?.5:xe,t.xanchor,t.yanchor))}E.attr({transform:OU(We,tt)+Je}),BU(C,xt)},clickFn:function(We,tt){t.captureevents&&e.emit("plotly_clickannotation",x(tt))},doneFn:function(){BU(C),zU.call("_guiRelayout",e,v());var We=document.querySelector(".js-notes-box-panel");We&&We.redraw(We.selectedObj)}})}}l.annotationText?Z.call(qU.makeEditable,{delegate:C,gd:e}).call(j).on("edit",function(H){t.text=H,this.call(j),d("text",H),i&&i.autorange&&h(i._name+".autorange",!0),a&&a.autorange&&h(a._name+".autorange",!0),zU.call("_guiRelayout",e,v())}):Z.call(j)}});var zpe=ye((qsr,Fpe)=>{"use strict";var Ppe=Dr(),j0t=qa(),Ipe=vl().arrayEditor;Fpe.exports={hasClickToShow:W0t,onClick:X0t};function W0t(e,t){var r=Dpe(e,t);return r.on.length>0||r.explicitOff.length>0}function X0t(e,t){var r=Dpe(e,t),n=r.on,i=r.off.concat(r.explicitOff),a={},o=e._fullLayout.annotations,s,l;if(n.length||i.length){for(s=0;s{"use strict";var NU=Dr(),_T=ka();Ope.exports=function(t,r,n,i){i("opacity");var a=i("bgcolor"),o=i("bordercolor"),s=_T.opacity(o);i("borderpad");var l=i("borderwidth"),u=i("showarrow");i("text",u?" ":n._dfltTitle.annotation),i("textangle"),NU.coerceFont(i,"font",n.font),i("width"),i("align");var c=i("height");if(c&&i("valign"),u){var f=i("arrowside"),h,d;f.indexOf("end")!==-1&&(h=i("arrowhead"),d=i("arrowsize")),f.indexOf("start")!==-1&&(i("startarrowhead",h),i("startarrowsize",d)),i("arrowcolor",s?r.bordercolor:_T.defaultLine),i("arrowwidth",(s&&l||1)*2),i("standoff"),i("startstandoff")}var v=i("hovertext"),_=n.hoverlabel||{};if(v){var b=i("hoverlabel.bgcolor",_.bgcolor||(_T.opacity(a)?_T.rgb(a):_T.defaultLine)),p=i("hoverlabel.bordercolor",_.bordercolor||_T.contrast(b)),k=NU.extendFlat({},_.font);k.color||(k.color=p),NU.coerceFont(i,"hoverlabel.font",k)}i("captureevents",!!v)}});var Bpe=ye((Nsr,qpe)=>{"use strict";var VU=Dr(),o2=ho(),Z0t=Zd(),Y0t=UU(),K0t=Jb();qpe.exports=function(t,r){Z0t(t,r,{name:"annotations",handleItemDefaults:J0t})};function J0t(e,t,r){function n(E,T){return VU.coerce(e,t,K0t,E,T)}var i=n("visible"),a=n("clicktoshow");if(i||a){Y0t(e,t,r,n);for(var o=t.showarrow,s=["x","y"],l=[-10,-30],u={_fullLayout:r},c=0;c<2;c++){var f=s[c],h=o2.coerceRef(e,t,u,f,"","paper");if(h!=="paper"){var d=o2.getFromId(u,h);d._annIndices.push(t._index)}if(o2.coercePosition(t,u,n,h,f,.5),o){var v="a"+f,_=o2.coerceRef(e,t,u,v,"pixel",["pixel","paper"]);_!=="pixel"&&_!==h&&(_=t[v]="pixel");var b=_==="pixel"?l[c]:.4;o2.coercePosition(t,u,n,_,v,b)}n(f+"anchor"),n(f+"shift")}if(VU.noneOrAll(e,t,["x","y"]),o&&VU.noneOrAll(e,t,["ax","ay"]),a){var p=n("xclick"),k=n("yclick");t._xclick=p===void 0?t.x:o2.cleanPosition(p,u,t.xref),t._yclick=k===void 0?t.y:o2.cleanPosition(k,u,t.yref)}}}});var Vpe=ye((Usr,Upe)=>{"use strict";var GU=Dr(),s2=ho(),$0t=bI().draw;Upe.exports=function(t){var r=t._fullLayout,n=GU.filterVisible(r.annotations);if(n.length&&t._fullData.length)return GU.syncOrAsync([$0t,Q0t],t)};function Q0t(e){var t=e._fullLayout;GU.filterVisible(t.annotations).forEach(function(r){var n=s2.getFromId(e,r.xref),i=s2.getFromId(e,r.yref),a=s2.getRefType(r.xref),o=s2.getRefType(r.yref);r._extremes={},a==="range"&&Npe(r,n),o==="range"&&Npe(r,i)})}function Npe(e,t){var r=t._id,n=r.charAt(0),i=e[n],a=e["a"+n],o=e[n+"ref"],s=e["a"+n+"ref"],l=e["_"+n+"padplus"],u=e["_"+n+"padminus"],c={x:1,y:-1}[n]*e[n+"shift"],f=3*e.arrowsize*e.arrowwidth||0,h=f+c,d=f-c,v=3*e.startarrowsize*e.arrowwidth||0,_=v+c,b=v-c,p;if(s===o){var k=s2.findExtremes(t,[t.r2c(i)],{ppadplus:h,ppadminus:d}),E=s2.findExtremes(t,[t.r2c(a)],{ppadplus:Math.max(l,_),ppadminus:Math.max(u,b)});p={min:[k.min[0],E.min[0]],max:[k.max[0],E.max[0]]}}else _=a?_+a:_,b=a?b-a:b,p=s2.findExtremes(t,[t.r2c(i)],{ppadplus:Math.max(l,h,_),ppadminus:Math.max(u,d,b)});e._extremes[r]=p}});var Hpe=ye((Vsr,Gpe)=>{"use strict";var egt=Eo(),tgt=S6();Gpe.exports=function(t,r,n,i){r=r||{};var a=n==="log"&&r.type==="linear",o=n==="linear"&&r.type==="log";if(!(a||o))return;var s=t._fullLayout.annotations,l=r._id.charAt(0),u,c;function f(d){var v=u[d],_=null;a?_=tgt(v,r.range):_=Math.pow(10,v),egt(_)||(_=null),i(c+d,_)}for(var h=0;h{"use strict";var HU=bI(),jpe=zpe();Wpe.exports={moduleType:"component",name:"annotations",layoutAttributes:Jb(),supplyLayoutDefaults:Bpe(),includeBasePlot:WM()("annotations"),calcAutorange:Vpe(),draw:HU.draw,drawOne:HU.drawOne,drawRaw:HU.drawRaw,hasClickToShow:jpe.hasClickToShow,onClick:jpe.onClick,convertCoords:Hpe()}});var wI=ye((Hsr,Zpe)=>{"use strict";var kc=Jb(),rgt=mc().overrideAll,igt=vl().templatedArray;Zpe.exports=rgt(igt("annotation",{visible:kc.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:kc.xanchor,xshift:kc.xshift,yanchor:kc.yanchor,yshift:kc.yshift,text:kc.text,textangle:kc.textangle,font:kc.font,width:kc.width,height:kc.height,opacity:kc.opacity,align:kc.align,valign:kc.valign,bgcolor:kc.bgcolor,bordercolor:kc.bordercolor,borderpad:kc.borderpad,borderwidth:kc.borderwidth,showarrow:kc.showarrow,arrowcolor:kc.arrowcolor,arrowhead:kc.arrowhead,startarrowhead:kc.startarrowhead,arrowside:kc.arrowside,arrowsize:kc.arrowsize,startarrowsize:kc.startarrowsize,arrowwidth:kc.arrowwidth,standoff:kc.standoff,startstandoff:kc.startstandoff,hovertext:kc.hovertext,hoverlabel:kc.hoverlabel,captureevents:kc.captureevents}),"calc","from-root")});var Kpe=ye((jsr,Ype)=>{"use strict";var jU=Dr(),ngt=ho(),agt=Zd(),ogt=UU(),sgt=wI();Ype.exports=function(t,r,n){agt(t,r,{name:"annotations",handleItemDefaults:lgt,fullLayout:n.fullLayout})};function lgt(e,t,r,n){function i(s,l){return jU.coerce(e,t,sgt,s,l)}function a(s){var l=s+"axis",u={_fullLayout:{}};return u._fullLayout[l]=r[l],ngt.coercePosition(t,u,i,s,s,.5)}var o=i("visible");o&&(ogt(e,t,n.fullLayout,i),a("x"),a("y"),a("z"),jU.noneOrAll(e,t,["x","y","z"]),t.xref="x",t.yref="y",t.zref="z",i("xanchor"),i("yanchor"),i("xshift"),i("yshift"),t.showarrow&&(t.axref="pixel",t.ayref="pixel",i("ax",-10),i("ay",-30),jU.noneOrAll(e,t,["ax","ay"])))}});var e0e=ye((Wsr,Qpe)=>{"use strict";var Jpe=Dr(),$pe=ho();Qpe.exports=function(t){for(var r=t.fullSceneLayout,n=r.annotations,i=0;i{"use strict";function WU(e,t){var r=[0,0,0,0],n,i;for(n=0;n<4;++n)for(i=0;i<4;++i)r[i]+=e[4*n+i]*t[n];return r}function cgt(e,t){var r=WU(e.projection,WU(e.view,WU(e.model,[t[0],t[1],t[2],1])));return r}t0e.exports=cgt});var i0e=ye((Zsr,r0e)=>{"use strict";var fgt=bI().drawRaw,hgt=XU(),dgt=["x","y","z"];r0e.exports=function(t){for(var r=t.fullSceneLayout,n=t.dataScale,i=r.annotations,a=0;a1){s=!0;break}}s?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+a+'"]').remove():(o._pdata=hgt(t.glplot.cameraParams,[r.xaxis.r2l(o.x)*n[0],r.yaxis.r2l(o.y)*n[1],r.zaxis.r2l(o.z)*n[2]]),fgt(t.graphDiv,o,a,t.id,o._xa,o._ya))}}});var o0e=ye((Ysr,a0e)=>{"use strict";var vgt=qa(),n0e=Dr();a0e.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:wI()}}},layoutAttributes:wI(),handleDefaults:Kpe(),includeBasePlot:pgt,convert:e0e(),draw:i0e()};function pgt(e,t){var r=vgt.subplotsRegistry.gl3d;if(r)for(var n=r.attrRegex,i=Object.keys(e),a=0;a{"use strict";var Ksr=Rh(),s0e=ec(),l0e=pf().line,ggt=Pd().dash,Bg=Ao().extendFlat,mgt=vl().templatedArray,Jsr=HM(),xT=Gl(),u0e=Jb(),{shapeTexttemplateAttrs:ygt,templatefallbackAttrs:_gt}=Ll(),xgt=D6();c0e.exports=mgt("shape",{visible:Bg({},xT.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:Bg({},xT.legend,{editType:"calc+arraydraw"}),legendgroup:Bg({},xT.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:Bg({},xT.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:s0e({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:Bg({},xT.legendrank,{editType:"calc+arraydraw"}),legendwidth:Bg({},xT.legendwidth,{editType:"calc+arraydraw"}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",editType:"arraydraw"},xref:Bg({},u0e.xref,{arrayOk:!0}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},x0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},x1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},yref:Bg({},u0e.yref,{arrayOk:!0}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},y0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},y1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:Bg({},l0e.color,{editType:"arraydraw"}),width:Bg({},l0e.width,{editType:"calc+arraydraw"}),dash:Bg({},ggt,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},label:{text:{valType:"string",dflt:"",editType:"arraydraw"},texttemplate:ygt({},{keys:Object.keys(xgt)}),texttemplatefallback:_gt({editType:"arraydraw"}),font:s0e({editType:"calc+arraydraw",colorEditType:"arraydraw"}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})});var h0e=ye((Qsr,f0e)=>{"use strict";var bT=Dr(),e0=ho(),bgt=Zd(),wgt=ZU(),v4=x_();f0e.exports=function(t,r){bgt(t,r,{name:"shapes",handleItemDefaults:Agt})};function Tgt(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}function Agt(e,t,r){function n(E,T){return bT.coerce(e,t,wgt,E,T)}t._isShape=!0;var i=n("visible");if(!i)return;var a=n("showlegend");a&&(n("legend"),n("legendwidth"),n("legendgroup"),n("legendgrouptitle.text"),bT.coerceFont(n,"legendgrouptitle.font"),n("legendrank"));var o=n("path"),s=o?"path":"rect",l=n("type",s),u=l!=="path";u&&delete t.path,n("editable"),n("layer"),n("opacity"),n("fillcolor"),n("fillrule");var c=n("line.width");c&&(n("line.color"),n("line.dash"));var f=n("xsizemode"),h=n("ysizemode");let d=[.25,.75],v=[0,10];["x","y"].forEach(E=>{var T=E+"anchor",L=E==="x"?f:h,x={_fullLayout:r},C,M,g,P;let A=E+"ref",z=e[A];if(Array.isArray(z)&&z.length>0){let O=v4.countDefiningCoords(l,o,E);P=e0.coerceRefArray(e,t,x,E,void 0,"paper",O),t["_"+E+"refArray"]=!0}else P=e0.coerceRef(e,t,x,E,void 0,"paper");if(Array.isArray(P))P.forEach(function(O){e0.getRefType(O)==="range"&&(C=e0.getFromId(x,O),C&&C._shapeIndices.indexOf(t._index)===-1&&C._shapeIndices.push(t._index))}),u&&[0,1].forEach(function(O){let U=P[O];e0.getRefType(U)==="range"?(C=e0.getFromId(x,U),M=v4.shapePositionToRange(C),g=v4.rangeToShapePosition(C),(C.type==="category"||C.type==="multicategory")&&n(E+O+"shift")):M=g=bT.identity;let Z=E+O,j=e[Z];if(e[Z]=M(e[Z],!0),L==="pixel"?n(Z,v[O]):e0.coercePosition(t,x,n,U,Z,d[O]),t[Z]=g(t[Z]),e[Z]=j,O===0&&L==="pixel"){let N=e[T];e[T]=M(e[T],!0),e0.coercePosition(t,x,n,U,T,.25),t[T]=g(t[T]),e[T]=N}});else{if(e0.getRefType(P)==="range"?(C=e0.getFromId(x,P),C._shapeIndices.push(t._index),g=v4.rangeToShapePosition(C),M=v4.shapePositionToRange(C),u&&(C.type==="category"||C.type==="multicategory")&&(n(E+"0shift"),n(E+"1shift"))):M=g=bT.identity,u){let U=E+"0",G=E+"1",Z=e[U],j=e[G];e[U]=M(e[U],!0),e[G]=M(e[G],!0),L==="pixel"?(n(U,v[0]),n(G,v[1])):(e0.coercePosition(t,x,n,P,U,d[0]),e0.coercePosition(t,x,n,P,G,d[1])),t[U]=g(t[U]),t[G]=g(t[G]),e[U]=Z,e[G]=j}if(L==="pixel"){let U=e[T];e[T]=M(e[T],!0),e0.coercePosition(t,x,n,P,T,.25),t[T]=g(t[T]),e[T]=U}}}),u&&bT.noneOrAll(e,t,["x0","x1","y0","y1"]);var _=l==="line",b,p;if(u&&(b=n("label.texttemplate"),n("label.texttemplatefallback")),b||(p=n("label.text")),p||b){n("label.textangle");var k=n("label.textposition",_?"middle":"middle center");n("label.xanchor"),n("label.yanchor",Tgt(_,k)),n("label.padding"),bT.coerceFont(n,"label.font",r.font)}}});var p0e=ye((elr,v0e)=>{"use strict";var Sgt=ka(),d0e=Dr();function Mgt(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}v0e.exports=function(t,r,n){n("newshape.visible"),n("newshape.name"),n("newshape.showlegend"),n("newshape.legend"),n("newshape.legendwidth"),n("newshape.legendgroup"),n("newshape.legendgrouptitle.text"),d0e.coerceFont(n,"newshape.legendgrouptitle.font"),n("newshape.legendrank"),n("newshape.drawdirection"),n("newshape.layer"),n("newshape.fillcolor"),n("newshape.fillrule"),n("newshape.opacity");var i=n("newshape.line.width");if(i){var a=(t||{}).plot_bgcolor||"#FFF";n("newshape.line.color",Sgt.contrast(a)),n("newshape.line.dash")}var o=t.dragmode==="drawline",s=n("newshape.label.text"),l=n("newshape.label.texttemplate");if(n("newshape.label.texttemplatefallback"),s||l){n("newshape.label.textangle");var u=n("newshape.label.textposition",o?"middle":"middle center");n("newshape.label.xanchor"),n("newshape.label.yanchor",Mgt(o,u)),n("newshape.label.padding"),d0e.coerceFont(n,"newshape.label.font",r.font)}n("activeshape.fillcolor"),n("activeshape.opacity")}});var w0e=ye((tlr,b0e)=>{"use strict";var YU=Dr(),N0=ho(),Fm=TM(),KU=x_();b0e.exports=function(t){var r=t._fullLayout,n=YU.filterVisible(r.shapes);if(!(!n.length||!t._fullData.length))for(var i=0;i{o=N0.getFromId(t,f),a._extremes[o._id]=N0.findExtremes(o,h,m0e(a))})}else a.xref!=="paper"&&l!=="domain"&&(o=N0.getFromId(t,a.xref),s=_0e(o,a,Fm.paramIsX),s&&(a._extremes[o._id]=N0.findExtremes(o,s,m0e(a))));if(u==="array"){let c=g0e(t,a,"y");Object.entries(c).forEach(([f,h])=>{o=N0.getFromId(t,f),a._extremes[o._id]=N0.findExtremes(o,h,y0e(a))})}else a.yref!=="paper"&&u!=="domain"&&(o=N0.getFromId(t,a.yref),s=_0e(o,a,Fm.paramIsY),s&&(a._extremes[o._id]=N0.findExtremes(o,s,y0e(a))))}};function g0e(e,t,r){let n=t[r+"ref"],i=r==="x"?Fm.paramIsX:Fm.paramIsY;function a(f,h){f==="paper"||N0.getRefType(f)==="domain"||(o[f]||(o[f]=[]),o[f].push(h))}let o={};if(t.type==="path"&&t.path){let f=t.path.match(Fm.segmentRE)||[];for(var s=0,l=0;lv&&(a(n[s],_[v]),s++)}}else a(n[0],t[r+"0"]),a(n[1],t[r+"1"]);let u={};for(let f in o){let h=N0.getFromId(e,f);if(h){var c=h.type==="category"||h.type==="multicategory"?h.r2c:h.d2c;h.type==="date"&&(c=KU.decodeDate(c)),u[h._id]=o[f].map(c)}}return u}function m0e(e){return x0e(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function y0e(e){return x0e(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function x0e(e,t,r,n,i,a){var o=e/2,s=a;if(t==="pixel"){var l=i?KU.extractPathCoords(i,a?Fm.paramIsY:Fm.paramIsX):[r,n],u=YU.aggNums(Math.max,null,l),c=YU.aggNums(Math.min,null,l),f=c<0?Math.abs(c)+o:o,h=u>0?u+o:o;return{ppad:o,ppadplus:s?f:h,ppadminus:s?h:f}}else return{ppad:o}}function _0e(e,t,r){var n=e._id.charAt(0)==="x"?"x":"y",i=e.type==="category"||e.type==="multicategory",a,o,s=0,l=0,u=i?e.r2c:e.d2c,c=t[n+"sizemode"]==="scaled";if(c?(a=t[n+"0"],o=t[n+"1"],i&&(s=t[n+"0shift"],l=t[n+"1shift"])):(a=t[n+"anchor"],o=t[n+"anchor"]),a!==void 0)return[u(a)+s,u(o)+l];if(t.path){var f=1/0,h=-1/0,d=t.path.match(Fm.segmentRE),v,_,b,p,k;for(e.type==="date"&&(u=KU.decodeDate(u)),v=0;vh&&(h=k)));if(h>=f)return[f,h]}}});var S0e=ye((rlr,A0e)=>{"use strict";var T0e=dP();A0e.exports={moduleType:"component",name:"shapes",layoutAttributes:ZU(),supplyLayoutDefaults:h0e(),supplyDrawNewShapeDefaults:p0e(),includeBasePlot:WM()("shapes"),calcAutorange:w0e(),draw:T0e.draw,drawOne:T0e.drawOne}});var JU=ye((nlr,E0e)=>{"use strict";var M0e=Rh(),Egt=vl().templatedArray,ilr=HM();E0e.exports=Egt("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",M0e.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",M0e.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})});var C0e=ye((alr,k0e)=>{"use strict";var kgt=Dr(),$U=ho(),Cgt=Zd(),Lgt=JU(),Pgt="images";k0e.exports=function(t,r){var n={name:Pgt,handleItemDefaults:Igt};Cgt(t,r,n)};function Igt(e,t,r){function n(h,d){return kgt.coerce(e,t,Lgt,h,d)}var i=n("source"),a=n("visible",!!i);if(!a)return t;n("layer"),n("xanchor"),n("yanchor"),n("sizex"),n("sizey"),n("sizing"),n("opacity");for(var o={_fullLayout:r},s=["x","y"],l=0;l<2;l++){var u=s[l],c=$U.coerceRef(e,t,o,u,"paper",void 0);if(c!=="paper"){var f=$U.getFromId(o,c);f._imgIndices.push(t._index)}$U.coercePosition(t,o,n,c,u,0)}return t}});var R0e=ye((olr,I0e)=>{"use strict";var L0e=Oa(),Rgt=So(),wT=ho(),P0e=hf(),Dgt=Wp();I0e.exports=function(t){var r=t._fullLayout,n=[],i={},a=[],o,s;for(s=0;s{"use strict";var D0e=Eo(),Fgt=S6();F0e.exports=function(t,r,n,i){r=r||{};var a=n==="log"&&r.type==="linear",o=n==="linear"&&r.type==="log";if(a||o){for(var s=t._fullLayout.images,l=r._id.charAt(0),u,c,f=0;f{"use strict";O0e.exports={moduleType:"component",name:"images",layoutAttributes:JU(),supplyLayoutDefaults:C0e(),includeBasePlot:WM()("images"),draw:R0e(),convertCoords:z0e()}});var TI=ye((ulr,B0e)=>{"use strict";B0e.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"\u25C4",right:"\u25BA",up:"\u25B2",down:"\u25BC"}}});var QU=ye((clr,U0e)=>{"use strict";var zgt=ec(),Ogt=Ih(),qgt=Ao().extendFlat,Bgt=mc().overrideAll,Ngt=F6(),N0e=vl().templatedArray,Ugt=N0e("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});U0e.exports=Bgt(N0e("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:Ugt,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:qgt(Ngt({editType:"arraydraw"}),{}),font:zgt({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:Ogt.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")});var j0e=ye((flr,H0e)=>{"use strict";var AI=Dr(),V0e=Zd(),G0e=QU(),Vgt=TI(),Ggt=Vgt.name,Hgt=G0e.buttons;H0e.exports=function(t,r){var n={name:Ggt,handleItemDefaults:jgt};V0e(t,r,n)};function jgt(e,t,r){function n(o,s){return AI.coerce(e,t,G0e,o,s)}var i=V0e(e,t,{name:"buttons",handleItemDefaults:Wgt}),a=n("visible",i.length>0);a&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),AI.noneOrAll(e,t,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),AI.coerceFont(n,"font",r.font),n("bgcolor",r.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function Wgt(e,t){function r(i,a){return AI.coerce(e,t,Hgt,i,a)}var n=r("visible",e.method==="skip"||Array.isArray(e.args));n&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}});var Z0e=ye((hlr,X0e)=>{"use strict";X0e.exports=Mf;var Ng=Oa(),W0e=ka(),TT=So(),SI=Dr();function Mf(e,t,r){this.gd=e,this.container=t,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}Mf.barWidth=2;Mf.barLength=20;Mf.barRadius=2;Mf.barPad=1;Mf.barColor="#808BA4";Mf.prototype.enable=function(t,r,n){var i=this.gd._fullLayout,a=i.width,o=i.height;this.position=t;var s=this.position.l,l=this.position.w,u=this.position.t,c=this.position.h,f=this.position.direction,h=f==="down",d=f==="left",v=f==="right",_=f==="up",b=l,p=c,k,E,T,L;!h&&!d&&!v&&!_&&(this.position.direction="down",h=!0);var x=h||_;x?(k=s,E=k+b,h?(T=u,L=Math.min(T+p,o),p=L-T):(L=u+p,T=Math.max(L-p,0),p=L-T)):(T=u,L=T+p,d?(E=s+b,k=Math.max(E-b,0),b=E-k):(k=s,E=Math.min(k+b,a),b=E-k)),this._box={l:k,t:T,w:b,h:p};var C=l>b,M=Mf.barLength+2*Mf.barPad,g=Mf.barWidth+2*Mf.barPad,P=s,A=u+c;A+g>o&&(A=o-g);var z=this.container.selectAll("rect.scrollbar-horizontal").data(C?[0]:[]);z.exit().on(".drag",null).remove(),z.enter().append("rect").classed("scrollbar-horizontal",!0).call(W0e.fill,Mf.barColor),C?(this.hbar=z.attr({rx:Mf.barRadius,ry:Mf.barRadius,x:P,y:A,width:M,height:g}),this._hbarXMin=P+M/2,this._hbarTranslateMax=b-M):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var O=c>p,U=Mf.barWidth+2*Mf.barPad,G=Mf.barLength+2*Mf.barPad,Z=s+l,j=u;Z+U>a&&(Z=a-U);var N=this.container.selectAll("rect.scrollbar-vertical").data(O?[0]:[]);N.exit().on(".drag",null).remove(),N.enter().append("rect").classed("scrollbar-vertical",!0).call(W0e.fill,Mf.barColor),O?(this.vbar=N.attr({rx:Mf.barRadius,ry:Mf.barRadius,x:Z,y:j,width:U,height:G}),this._vbarYMin=j+G/2,this._vbarTranslateMax=p-G):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var H=this.id,re=k-.5,oe=O?E+U+.5:E+.5,_e=T-.5,Ce=C?L+g+.5:L+.5,Le=i._topdefs.selectAll("#"+H).data(C||O?[0]:[]);if(Le.exit().remove(),Le.enter().append("clipPath").attr("id",H).append("rect"),C||O?(this._clipRect=Le.select("rect").attr({x:Math.floor(re),y:Math.floor(_e),width:Math.ceil(oe)-Math.floor(re),height:Math.ceil(Ce)-Math.floor(_e)}),this.container.call(TT.setClipUrl,H,this.gd),this.bg.attr({x:s,y:u,width:l,height:c})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(TT.setClipUrl,null),delete this._clipRect),C||O){var ge=Ng.behavior.drag().on("dragstart",function(){Ng.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(ge);var ie=Ng.behavior.drag().on("dragstart",function(){Ng.event.sourceEvent.preventDefault(),Ng.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));C&&this.hbar.on(".drag",null).call(ie),O&&this.vbar.on(".drag",null).call(ie)}this.setTranslate(r,n)};Mf.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(TT.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)};Mf.prototype._onBoxDrag=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t-=Ng.event.dx),this.vbar&&(r-=Ng.event.dy),this.setTranslate(t,r)};Mf.prototype._onBoxWheel=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t+=Ng.event.deltaY),this.vbar&&(r+=Ng.event.deltaY),this.setTranslate(t,r)};Mf.prototype._onBarDrag=function(){var t=this.translateX,r=this.translateY;if(this.hbar){var n=t+this._hbarXMin,i=n+this._hbarTranslateMax,a=SI.constrain(Ng.event.x,n,i),o=(a-n)/(i-n),s=this.position.w-this._box.w;t=o*s}if(this.vbar){var l=r+this._vbarYMin,u=l+this._vbarTranslateMax,c=SI.constrain(Ng.event.y,l,u),f=(c-l)/(u-l),h=this.position.h-this._box.h;r=f*h}this.setTranslate(t,r)};Mf.prototype.setTranslate=function(t,r){var n=this.position.w-this._box.w,i=this.position.h-this._box.h;if(t=SI.constrain(t||0,0,n),r=SI.constrain(r||0,0,i),this.translateX=t,this.translateY=r,this.container.call(TT.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-r),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+r-.5)}),this.hbar){var a=t/n;this.hbar.call(TT.setTranslate,t+a*this._hbarTranslateMax,r)}if(this.vbar){var o=r/i;this.vbar.call(TT.setTranslate,t,r+o*this._vbarTranslateMax)}}});var nge=ye((dlr,ige)=>{"use strict";var AT=Oa(),p4=Mc(),g4=ka(),ST=So(),t0=Dr(),MI=Zl(),Xgt=vl().arrayEditor,K0e=Dh().LINE_SPACING,es=TI(),Zgt=Z0e();ige.exports=function(t){var r=t._fullLayout,n=t0.filterVisible(r[es.name]);function i(h){p4.autoMargin(t,tge(h))}var a=r._menulayer.selectAll("g."+es.containerClassName).data(n.length>0?[0]:[]);if(a.enter().append("g").classed(es.containerClassName,!0).style("cursor","pointer"),a.exit().each(function(){AT.select(this).selectAll("g."+es.headerGroupClassName).each(i)}).remove(),n.length!==0){var o=a.selectAll("g."+es.headerGroupClassName).data(n,Ygt);o.enter().append("g").classed(es.headerGroupClassName,!0);for(var s=t0.ensureSingle(a,"g",es.dropdownButtonGroupClassName,function(h){h.style("pointer-events","all")}),l=0;l{"use strict";var rmt=TI();age.exports={moduleType:"component",name:rmt.name,layoutAttributes:QU(),supplyLayoutDefaults:j0e(),draw:nge()}});var y4=ye((plr,sge)=>{"use strict";sge.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}});var iV=ye((glr,cge)=>{"use strict";var lge=ec(),imt=F6(),nmt=Ao().extendDeepAll,amt=mc().overrideAll,omt=jS(),uge=vl().templatedArray,l2=y4(),smt=uge("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});cge.exports=amt(uge("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:smt,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:nmt(imt({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:omt.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:lge({})},font:lge({}),activebgcolor:{valType:"color",dflt:l2.gripBgActiveColor},bgcolor:{valType:"color",dflt:l2.railBgColor},bordercolor:{valType:"color",dflt:l2.railBorderColor},borderwidth:{valType:"number",min:0,dflt:l2.railBorderWidth},ticklen:{valType:"number",min:0,dflt:l2.tickLength},tickcolor:{valType:"color",dflt:l2.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:l2.minorTickLength}}),"arraydraw","from-root")});var vge=ye((mlr,dge)=>{"use strict";var MT=Dr(),fge=Zd(),hge=iV(),lmt=y4(),umt=lmt.name,cmt=hge.steps;dge.exports=function(t,r){fge(t,r,{name:umt,handleItemDefaults:fmt})};function fmt(e,t,r){function n(f,h){return MT.coerce(e,t,hge,f,h)}for(var i=fge(e,t,{name:"steps",handleItemDefaults:hmt}),a=0,o=0;o{"use strict";var Ug=Oa(),EI=Mc(),k_=ka(),Vg=So(),r0=Dr(),dmt=r0.strTranslate,_4=Zl(),vmt=vl().arrayEditor,Rs=y4(),oV=Dh(),mge=oV.LINE_SPACING,nV=oV.FROM_TL,aV=oV.FROM_BR;Tge.exports=function(t){var r=t._context.staticPlot,n=t._fullLayout,i=pmt(n,t),a=n._infolayer.selectAll("g."+Rs.containerClassName).data(i.length>0?[0]:[]);a.enter().append("g").classed(Rs.containerClassName,!0).style("cursor",r?null:"ew-resize");function o(c){c._commandObserver&&(c._commandObserver.remove(),delete c._commandObserver),EI.autoMargin(t,yge(c))}if(a.exit().each(function(){Ug.select(this).selectAll("g."+Rs.groupClassName).each(o)}).remove(),i.length!==0){var s=a.selectAll("g."+Rs.groupClassName).data(i,gmt);s.enter().append("g").classed(Rs.groupClassName,!0),s.exit().each(o).remove();for(var l=0;l0&&(s=s.transition().duration(t.transition.duration).ease(t.transition.easing)),s.attr("transform",dmt(o-Rs.gripWidth*.5,t._dims.currentValueTotalHeight))}}function sV(e,t){var r=e._dims;return r.inputAreaStart+Rs.stepInset+(r.inputAreaLength-2*Rs.stepInset)*Math.min(1,Math.max(0,t))}function gge(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-Rs.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*Rs.stepInset-2*r.inputAreaStart)))}function Tmt(e,t,r){var n=r._dims,i=r0.ensureSingle(e,"rect",Rs.railTouchRectClass,function(a){a.call(bge,t,e,r).style("pointer-events","all")});i.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,Rs.tickOffset+r.ticklen+n.labelHeight)}).call(k_.fill,r.bgcolor).attr("opacity",0),Vg.setTranslate(i,0,n.currentValueTotalHeight)}function Amt(e,t){var r=t._dims,n=r.inputAreaLength-Rs.railInset*2,i=r0.ensureSingle(e,"rect",Rs.railRectClass);i.attr({width:n,height:Rs.railWidth,rx:Rs.railRadius,ry:Rs.railRadius,"shape-rendering":"crispEdges"}).call(k_.stroke,t.bordercolor).call(k_.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),Vg.setTranslate(i,Rs.railInset,(r.inputAreaWidth-Rs.railWidth)*.5+r.currentValueTotalHeight)}});var Mge=ye((_lr,Sge)=>{"use strict";var Smt=y4();Sge.exports={moduleType:"component",name:Smt.name,layoutAttributes:iV(),supplyLayoutDefaults:vge(),draw:Age()}});var CI=ye((xlr,kge)=>{"use strict";var Ege=Ih();kge.exports={bgcolor:{valType:"color",dflt:Ege.background,editType:"plot"},bordercolor:{valType:"color",dflt:Ege.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}});var lV=ye((blr,Cge)=>{"use strict";Cge.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}});var LI=ye((wlr,Lge)=>{"use strict";Lge.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}});var Rge=ye(II=>{"use strict";var Mmt=hf(),Emt=Zl(),Pge=LI(),kmt=Dh().LINE_SPACING,PI=Pge.name;function Ige(e){var t=e&&e[PI];return t&&t.visible}II.isVisible=Ige;II.makeData=function(e){for(var t=Mmt.list({_fullLayout:e},"x",!0),r=e.margin,n=[],i=0;i{"use strict";var RI=Dr(),Dge=vl(),Fge=hf(),Cmt=CI(),Lmt=lV();zge.exports=function(t,r,n){var i=t[n],a=r[n];if(!(i.rangeslider||r._requestRangeslider[a._id]))return;RI.isPlainObject(i.rangeslider)||(i.rangeslider={});var o=i.rangeslider,s=Dge.newContainer(a,"rangeslider");function l(L,x){return RI.coerce(o,s,Cmt,L,x)}var u,c;function f(L,x){return RI.coerce(u,c,Lmt,L,x)}var h=l("visible");if(h){l("bgcolor",r.plot_bgcolor),l("bordercolor"),l("borderwidth"),l("thickness"),l("autorange",!a.isValidRange(o.range)),l("range");var d=r._subplots;if(d)for(var v=d.cartesian.filter(function(L){return L.slice(0,Math.max(0,L.indexOf("y")))===Fge.name2id(n)}).map(function(L){return L.slice(L.indexOf("y"),L.length)}),_=RI.simpleMap(v,Fge.id2name),b=0;b<_.length;b++){var p=_[b];u=o[p]||{},c=Dge.newContainer(s,p,"yaxis");var k=r[p],E;u.range&&k.isValidRange(u.range)&&(E="fixed");var T=f("rangemode",E);T!=="match"&&f("range",k.range.slice())}s._input=o}}});var Bge=ye((Slr,qge)=>{"use strict";var Pmt=hf().list,Imt=Mg().getAutoRange,Rmt=LI();qge.exports=function(t){for(var r=Pmt(t,"x",!0),n=0;n{"use strict";var DI=Oa(),Dmt=qa(),Fmt=Mc(),Jf=Dr(),FI=Jf.strTranslate,Uge=So(),C_=ka(),zmt=zb(),Omt=mh(),uV=hf(),qmt=yv(),Bmt=Eg(),rl=LI();Vge.exports=function(e){for(var t=e._fullLayout,r=t._rangeSliderData,n=0;n=N.max)Z=A[j+1];else if(G=N.pmax)Z=A[j+1];else if(G0?e.touches[0].clientX:0}function Nmt(e,t,r,n){if(t._context.staticPlot)return;var i=e.select("rect."+rl.slideBoxClassName).node(),a=e.select("rect."+rl.grabAreaMinClassName).node(),o=e.select("rect."+rl.grabAreaMaxClassName).node();function s(){var l=DI.event,u=l.target,c=Nge(l),f=c-e.node().getBoundingClientRect().left,h=n.d2p(r._rl[0]),d=n.d2p(r._rl[1]),v=qmt.coverSlip();this.addEventListener("touchmove",_),this.addEventListener("touchend",b),v.addEventListener("mousemove",_),v.addEventListener("mouseup",b);function _(p){var k=Nge(p),E=+k-c,T,L,x;switch(u){case i:if(x="ew-resize",h+E>r._length||d+E<0)return;T=h+E,L=d+E;break;case a:if(x="col-resize",h+E>r._length)return;T=h+E,L=d;break;case o:if(x="col-resize",d+E<0)return;T=h,L=d+E;break;default:x="ew-resize",T=f,L=f+E;break}if(L{"use strict";var Kmt=Dr(),Jmt=CI(),$mt=lV(),cV=Rge();Hge.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:Kmt.extendFlat({},Jmt,{yaxis:$mt})}}},layoutAttributes:CI(),handleDefaults:Oge(),calcAutorange:Bge(),draw:Gge(),isVisible:cV.isVisible,makeData:cV.makeData,autoMarginOpts:cV.autoMarginOpts}});var zI=ye((klr,Xge)=>{"use strict";var Qmt=ec(),Wge=Ih(),eyt=vl().templatedArray,tyt=eyt("button",{visible:{valType:"boolean",dflt:!0,editType:"plot"},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot"},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot"},count:{valType:"number",min:0,dflt:1,editType:"plot"},label:{valType:"string",editType:"plot"},editType:"plot"});Xge.exports={visible:{valType:"boolean",editType:"plot"},buttons:tyt,x:{valType:"number",min:-2,max:3,editType:"plot"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot"},y:{valType:"number",min:-2,max:3,editType:"plot"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot"},font:Qmt({editType:"plot"}),bgcolor:{valType:"color",dflt:Wge.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:Wge.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}});var fV=ye((Clr,Zge)=>{"use strict";Zge.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}});var Jge=ye((Llr,Kge)=>{"use strict";var OI=Dr(),ryt=ka(),iyt=vl(),nyt=Zd(),Yge=zI(),hV=fV();Kge.exports=function(t,r,n,i,a){var o=t.rangeselector||{},s=iyt.newContainer(r,"rangeselector");function l(d,v){return OI.coerce(o,s,Yge,d,v)}var u=nyt(o,s,{name:"buttons",handleItemDefaults:ayt,calendar:a}),c=l("visible",u.length>0);if(c){var f=oyt(r,n,i);l("x",f[0]),l("y",f[1]),OI.noneOrAll(t,r,["x","y"]),l("xanchor"),l("yanchor"),OI.coerceFont(l,"font",n.font);var h=l("bgcolor");l("activecolor",ryt.contrast(h,hV.lightAmount,hV.darkAmount)),l("bordercolor"),l("borderwidth")}};function ayt(e,t,r,n){var i=n.calendar;function a(l,u){return OI.coerce(e,t,Yge.buttons,l,u)}var o=a("visible");if(o){var s=a("step");s!=="all"&&(i&&i!=="gregorian"&&(s==="month"||s==="year")?t.stepmode="backward":a("stepmode"),a("count")),a("label")}}function oyt(e,t,r){for(var n=r.filter(function(s){return t[s].anchor===e._id}),i=0,a=0;a{"use strict";var syt=SO(),lyt=Dr().titleCase;$ge.exports=function(t,r){var n=t._name,i={};if(r.step==="all")i[n+".autorange"]=!0;else{var a=uyt(t,r);i[n+".range[0]"]=a[0],i[n+".range[1]"]=a[1]}return i};function uyt(e,t){var r=e.range,n=new Date(e.r2l(r[1])),i=t.step,a=syt["utc"+lyt(i)],o=t.count,s;switch(t.stepmode){case"backward":s=e.l2r(+a.offset(n,-o));break;case"todate":var l=a.offset(n,-o);s=e.l2r(+a.ceil(l));break}var u=r[1];return[s,u]}});var sme=ye((Ilr,ome)=>{"use strict";var BI=Oa(),cyt=qa(),fyt=Mc(),eme=ka(),ame=So(),Ny=Dr(),tme=Ny.strTranslate,qI=Zl(),hyt=hf(),pV=Dh(),rme=pV.LINE_SPACING,ime=pV.FROM_TL,nme=pV.FROM_BR,vV=fV(),dyt=Qge();ome.exports=function(t){var r=t._fullLayout,n=r._infolayer.selectAll(".rangeselector").data(vyt(t),pyt);n.enter().append("g").classed("rangeselector",!0),n.exit().remove(),n.style({cursor:"pointer","pointer-events":"all"}),n.each(function(i){var a=BI.select(this),o=i,s=o.rangeselector,l=a.selectAll("g.button").data(Ny.filterVisible(s.buttons));l.enter().append("g").classed("button",!0),l.exit().remove(),l.each(function(u){var c=BI.select(this),f=dyt(o,u);u._isActive=gyt(o,u,f),c.call(dV,s,u),c.call(yyt,s,u,t),c.on("click",function(){t._dragged||cyt.call("_guiRelayout",t,f)}),c.on("mouseover",function(){u._isHovered=!0,c.call(dV,s,u)}),c.on("mouseout",function(){u._isHovered=!1,c.call(dV,s,u)})}),xyt(t,l,s,o._name,a)})};function vyt(e){for(var t=hyt.list(e,"x",!0),r=[],n=0;n{"use strict";lme.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:zI()}}},layoutAttributes:zI(),handleDefaults:Jge(),draw:sme()}});var Cc=ye(gV=>{"use strict";var cme=Ao().extendFlat;gV.attributes=function(e,t){e=e||{},t=t||{};var r={valType:"info_array",editType:e.editType,items:[{valType:"number",min:0,max:1,editType:e.editType},{valType:"number",min:0,max:1,editType:e.editType}],dflt:[0,1]},n=e.name?e.name+" ":"",i=e.trace?"trace ":"subplot ",a=t.description?" "+t.description:"",o={x:cme({},r,{}),y:cme({},r,{}),editType:e.editType};return e.noGridCell||(o.row={valType:"integer",min:0,dflt:0,editType:e.editType},o.column={valType:"integer",min:0,dflt:0,editType:e.editType}),o};gV.defaults=function(e,t,r,n){var i=n&&n.x||[0,1],a=n&&n.y||[0,1],o=t.grid;if(o){var s=r("domain.column");s!==void 0&&(s{"use strict";var byt=Dr(),wyt=p3().counter,Tyt=Cc().attributes,fme=Rh().idRegex,Ayt=vl(),mV={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[wyt("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[fme.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[fme.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:Tyt({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function NI(e,t,r){var n=t[r+"axes"],i=Object.keys((e._splomAxes||{})[r]||{});if(Array.isArray(n))return n;if(i.length)return i}function Syt(e,t){var r=e.grid||{},n=NI(t,r,"x"),i=NI(t,r,"y");if(!e.grid&&!n&&!i)return;var a=Array.isArray(r.subplots)&&Array.isArray(r.subplots[0]),o=Array.isArray(n),s=Array.isArray(i),l=o&&n!==r.xaxes&&s&&i!==r.yaxes,u,c;a?(u=r.subplots.length,c=r.subplots[0].length):(s&&(u=i.length),o&&(c=n.length));var f=Ayt.newContainer(t,"grid");function h(x,C){return byt.coerce(r,f,mV,x,C)}var d=h("rows",u),v=h("columns",c);if(!(d*v>1)){delete t.grid;return}if(!a&&!o&&!s){var _=h("pattern")==="independent";_&&(a=!0)}f._hasSubplotGrid=a;var b=h("roworder"),p=b==="top to bottom",k=a?.2:.1,E=a?.3:.1,T,L;l&&t._splomGridDflt&&(T=t._splomGridDflt.xside,L=t._splomGridDflt.yside),f._domains={x:hme("x",h,k,T,v),y:hme("y",h,E,L,d,p)}}function hme(e,t,r,n,i,a){var o=t(e+"gap",r),s=t("domain."+e);t(e+"side",n);for(var l=new Array(i),u=s[0],c=(s[1]-u)/(i-o),f=c*(1-o),h=0;h{"use strict";pme.exports={visible:{valType:"boolean",editType:"calc"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc"},symmetric:{valType:"boolean",editType:"calc"},array:{valType:"data_array",editType:"calc"},arrayminus:{valType:"data_array",editType:"calc"},value:{valType:"number",min:0,dflt:10,editType:"calc"},valueminus:{valType:"number",min:0,dflt:10,editType:"calc"},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style"},thickness:{valType:"number",min:0,dflt:2,editType:"style"},width:{valType:"number",min:0,editType:"plot"},editType:"calc"}});var yme=ye((Olr,mme)=>{"use strict";var gme=Eo(),Eyt=qa(),kyt=Dr(),Cyt=vl(),Lyt=_V();mme.exports=function(e,t,r,n){var i="error_"+n.axis,a=Cyt.newContainer(t,i),o=e[i]||{};function s(v,_){return kyt.coerce(o,a,Lyt,v,_)}var l=o.array!==void 0||o.value!==void 0||o.type==="sqrt",u=s("visible",l);if(u!==!1){var c=s("type","array"in o?"data":"percent"),f=!0;c!=="sqrt"&&(f=s("symmetric",!((c==="data"?"arrayminus":"valueminus")in o))),c==="data"?(s("array"),s("traceref"),f||(s("arrayminus"),s("tracerefminus"))):(c==="percent"||c==="constant")&&(s("value"),f||s("valueminus"));var h="copy_"+n.inherit+"style";if(n.inherit){var d=t["error_"+n.inherit];(d||{}).visible&&s(h,!(o.color||gme(o.thickness)||gme(o.width)))}(!n.inherit||!a[h])&&(s("color",r),s("thickness"),s("width",Eyt.traceIs(t,"gl3d")?0:4))}}});var xV=ye((qlr,xme)=>{"use strict";xme.exports=function(t){var r=t.type,n=t.symmetric;if(r==="data"){var i=t.array||[];if(n)return function(u,c){var f=+i[c];return[f,f]};var a=t.arrayminus||[];return function(u,c){var f=+i[c],h=+a[c];return!isNaN(f)||!isNaN(h)?[h||0,f||0]:[NaN,NaN]}}else{var o=_me(r,t.value),s=_me(r,t.valueminus);return n||t.valueminus===void 0?function(u){var c=o(u);return[c,c]}:function(u){return[s(u),o(u)]}}};function _me(e,t){if(e==="percent")return function(r){return Math.abs(r*t/100)};if(e==="constant")return function(){return Math.abs(t)};if(e==="sqrt")return function(r){return Math.sqrt(Math.abs(r))}}});var Tme=ye((Blr,wme)=>{"use strict";var bV=Eo(),Pyt=qa(),wV=ho(),Iyt=Dr(),Ryt=xV();wme.exports=function(t){for(var r=t.calcdata,n=0;n{"use strict";var Ame=Oa(),L_=Eo(),Dyt=So(),Fyt=Ru();Sme.exports=function(t,r,n,i){var a,o=n.xaxis,s=n.yaxis,l=i&&i.duration>0,u=t._context.staticPlot;r.each(function(c){var f=c[0].trace,h=f.error_x||{},d=f.error_y||{},v;f.ids&&(v=function(k){return k.id});var _=Fyt.hasMarkers(f)&&f.marker.maxdisplayed>0;!d.visible&&!h.visible&&(c=[]);var b=Ame.select(this).selectAll("g.errorbar").data(c,v);if(b.exit().remove(),!!c.length){h.visible||b.selectAll("path.xerror").remove(),d.visible||b.selectAll("path.yerror").remove(),b.style("opacity",1);var p=b.enter().append("g").classed("errorbar",!0);l&&p.style("opacity",0).transition().duration(i.duration).style("opacity",1),Dyt.setClipUrl(b,n.layerClipId,t),b.each(function(k){var E=Ame.select(this),T=zyt(k,o,s);if(!(_&&!k.vis)){var L,x=E.select("path.yerror");if(d.visible&&L_(T.x)&&L_(T.yh)&&L_(T.ys)){var C=d.width;L="M"+(T.x-C)+","+T.yh+"h"+2*C+"m-"+C+",0V"+T.ys,T.noYS||(L+="m-"+C+",0h"+2*C),a=!x.size(),a?x=E.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("yerror",!0):l&&(x=x.transition().duration(i.duration).ease(i.easing)),x.attr("d",L)}else x.remove();var M=E.select("path.xerror");if(h.visible&&L_(T.y)&&L_(T.xh)&&L_(T.xs)){var g=(h.copy_ystyle?d:h).width;L="M"+T.xh+","+(T.y-g)+"v"+2*g+"m0,-"+g+"H"+T.xs,T.noXS||(L+="m0,-"+g+"v"+2*g),a=!M.size(),a?M=E.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("xerror",!0):l&&(M=M.transition().duration(i.duration).ease(i.easing)),M.attr("d",L)}else M.remove()}})}})};function zyt(e,t,r){var n={x:t.c2p(e.x),y:r.c2p(e.y)};return e.yh!==void 0&&(n.yh=r.c2p(e.yh),n.ys=r.c2p(e.ys),L_(n.ys)||(n.noYS=!0,n.ys=r.c2p(e.ys,!0))),e.xh!==void 0&&(n.xh=t.c2p(e.xh),n.xs=t.c2p(e.xs),L_(n.xs)||(n.noXS=!0,n.xs=t.c2p(e.xs,!0))),n}});var Cme=ye((Ulr,kme)=>{"use strict";var Oyt=Oa(),Eme=ka();kme.exports=function(t){t.each(function(r){var n=r[0].trace,i=n.error_y||{},a=n.error_x||{},o=Oyt.select(this);o.selectAll("path.yerror").style("stroke-width",i.thickness+"px").call(Eme.stroke,i.color),a.copy_ystyle&&(a=i),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(Eme.stroke,a.color)})}});var Ime=ye((Vlr,Pme)=>{"use strict";var x4=Dr(),Lme=mc().overrideAll,b4=_V(),u2={error_x:x4.extendFlat({},b4),error_y:x4.extendFlat({},b4)};delete u2.error_x.copy_zstyle;delete u2.error_y.copy_zstyle;delete u2.error_y.copy_ystyle;var w4={error_x:x4.extendFlat({},b4),error_y:x4.extendFlat({},b4),error_z:x4.extendFlat({},b4)};delete w4.error_x.copy_ystyle;delete w4.error_y.copy_ystyle;delete w4.error_z.copy_ystyle;delete w4.error_z.copy_zstyle;Pme.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:u2,bar:u2,histogram:u2,scatter3d:Lme(w4,"calc","nested"),scattergl:Lme(u2,"calc","nested")}},supplyDefaults:yme(),calc:Tme(),makeComputeError:xV(),plot:Mme(),style:Cme(),hoverInfo:qyt};function qyt(e,t,r){(t.error_y||{}).visible&&(r.yerr=e.yh-e.y,t.error_y.symmetric||(r.yerrneg=e.y-e.ys)),(t.error_x||{}).visible&&(r.xerr=e.xh-e.x,t.error_x.symmetric||(r.xerrneg=e.x-e.xs))}});var Dme=ye((Glr,Rme)=>{"use strict";Rme.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}});var Ume=ye((Hlr,Nme)=>{"use strict";var P_=Oa(),TV=fd(),VI=Mc(),Fme=qa(),Uy=ho(),UI=yv(),U0=Dr(),Hg=U0.strTranslate,Bme=Ao().extendFlat,AV=Eg(),Gg=So(),SV=ka(),Byt=zb(),Nyt=Zl(),Uyt=pv().flipScale,Vyt=f4(),Gyt=dI(),Hyt=Rd(),MV=Dh(),zme=MV.LINE_SPACING,Ome=MV.FROM_TL,qme=MV.FROM_BR,gf=Dme().cn;function jyt(e){var t=e._fullLayout,r=t._infolayer.selectAll("g."+gf.colorbar).data(Wyt(e),function(n){return n._id});r.enter().append("g").attr("class",function(n){return n._id}).classed(gf.colorbar,!0),r.each(function(n){var i=P_.select(this);U0.ensureSingle(i,"rect",gf.cbbg),U0.ensureSingle(i,"g",gf.cbfills),U0.ensureSingle(i,"g",gf.cblines),U0.ensureSingle(i,"g",gf.cbaxis,function(o){o.classed(gf.crisp,!0)}),U0.ensureSingle(i,"g",gf.cbtitleunshift,function(o){o.append("g").classed(gf.cbtitle,!0)}),U0.ensureSingle(i,"rect",gf.cboutline);var a=Xyt(i,n,e);a&&a.then&&(e._promises||[]).push(a),e._context.edits.colorbarPosition&&Zyt(i,n,e)}),r.exit().each(function(n){VI.autoMargin(e,n._id)}).remove(),r.order()}function Wyt(e){var t=e._fullLayout,r=e.calcdata,n=[],i,a,o,s;function l(E){return Bme(E,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function u(){typeof s.calc=="function"?s.calc(e,o,i):(i._fillgradient=a.reversescale?Uyt(a.colorscale):a.colorscale,i._zrange=[a[s.min],a[s.max]])}for(var c=0;c1){var De=Math.pow(10,Math.floor(Math.log(me)/Math.LN10));Be*=De*U0.roundUp(me/De,[2,5,10]),(Math.abs(z.start)/z.size+1e-6)%1<2e-6&&(Ee.tick0=0)}Ee.dtick=Be}Ee.domain=n?[ie+v/T.h,ie+H-v/T.h]:[ie+d/T.w,ie+H-d/T.w],Ee.setScale(),e.attr("transform",Hg(Math.round(T.l),Math.round(T.t)));var ce=e.select("."+gf.cbtitleunshift).attr("transform",Hg(-Math.round(T.l),-Math.round(T.t))),je=Ee.ticklabelposition,lt=Ee.title.font.size,pt=e.select("."+gf.cbaxis),Vt,ot=0,ut=0;function Wt(fr,$e){var St={propContainer:Ee,propName:t._propPrefix+"title.text",traceIndex:t._traceIndex,_meta:t._meta,placeholder:E._dfltTitle.colorbar,containerGroup:e.select("."+gf.cbtitle)},Qt=fr.charAt(0)==="h"?fr.slice(1):"h"+fr;e.selectAll("."+Qt+",."+Qt+"-math-group").remove(),Byt.draw(r,fr,Bme(St,$e||{}))}function Nt(){if(n&&Ae||!n&&!Ae){var fr,$e;M==="top"&&(fr=d+T.l+re*_,$e=v+T.t+oe*(1-ie-H)+3+lt*.75),M==="bottom"&&(fr=d+T.l+re*_,$e=v+T.t+oe*(1-ie)-3-lt*.25),M==="right"&&($e=v+T.t+oe*b+3+lt*.75,fr=d+T.l+re*ie),Wt(Ee._id+"title",{attributes:{x:fr,y:$e,"text-anchor":n?"start":"middle"}})}}function $t(){if(n&&!Ae||!n&&Ae){var fr=Ee.position||0,$e=Ee._offset+Ee._length/2,St,Qt;if(M==="right")Qt=$e,St=T.l+re*fr+10+lt*(Ee.showticklabels?1:.5);else if(St=$e,M==="bottom"&&(Qt=T.t+oe*fr+10+(je.indexOf("inside")===-1?Ee.tickfont.size:0)+(Ee.ticks!=="inside"&&t.ticklen||0)),M==="top"){var Gt=C.text.split("
").length;Qt=T.t+oe*fr+10-Z-zme*lt*Gt}Wt((n?"h":"v")+Ee._id+"title",{avoid:{selection:P_.select(r).selectAll("g."+Ee._id+"tick"),side:M,offsetTop:n?0:T.t,offsetLeft:n?T.l:0,maxShift:n?E.width:E.height},attributes:{x:St,y:Qt,"text-anchor":"middle"},transform:{rotate:n?-90:0,offset:0}})}}function sr(){if(!n&&!Ae||n&&Ae){var fr=e.select("."+gf.cbtitle),$e=fr.select("text"),St=[-l/2,l/2],Qt=fr.select(".h"+Ee._id+"title-math-group").node(),Gt=15.6;$e.node()&&(Gt=parseInt($e.node().style.fontSize,10)*zme);var _t;if(Qt?(_t=Gg.bBox(Qt),ut=_t.width,ot=_t.height,ot>Gt&&(St[1]-=(ot-Gt)/2)):$e.node()&&!$e.classed(gf.jsPlaceholder)&&(_t=Gg.bBox($e.node()),ut=_t.width,ot=_t.height),n){if(ot){if(ot+=5,M==="top")Ee.domain[1]-=ot/T.h,St[1]*=-1;else{Ee.domain[0]+=ot/T.h;var It=Nyt.lineCount($e);St[1]+=(1-It)*Gt}fr.attr("transform",Hg(St[0],St[1])),Ee.setScale()}}else ut&&(M==="right"&&(Ee.domain[0]+=(ut+lt/2)/T.w),fr.attr("transform",Hg(St[0],St[1])),Ee.setScale())}e.selectAll("."+gf.cbfills+",."+gf.cblines).attr("transform",n?Hg(0,Math.round(T.h*(1-Ee.domain[1]))):Hg(Math.round(T.w*Ee.domain[0]),0)),pt.attr("transform",n?Hg(0,Math.round(-T.t)):Hg(Math.round(-T.l),0));var mt=e.select("."+gf.cbfills).selectAll("rect."+gf.cbfill).attr("style","").data(U);mt.enter().append("rect").classed(gf.cbfill,!0).attr("style",""),mt.exit().remove();var er=g.map(Ee.c2p).map(Math.round).sort(function(Br,Vr){return Br-Vr});mt.each(function(Br,Vr){var dt=[Vr===0?g[0]:(U[Vr]+U[Vr-1])/2,Vr===U.length-1?g[1]:(U[Vr]+U[Vr+1])/2].map(Ee.c2p).map(Math.round);n&&(dt[1]=U0.constrain(dt[1]+(dt[1]>dt[0])?1:-1,er[0],er[1]));var Ge=P_.select(this).attr(n?"x":"y",_e).attr(n?"y":"x",P_.min(dt)).attr(n?"width":"height",Math.max(Z,2)).attr(n?"height":"width",Math.max(P_.max(dt)-P_.min(dt),2));if(t._fillgradient)Gg.gradient(Ge,r,t._id,n?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var Je=A(Br).replace("e-","");Ge.attr("fill",TV(Je).toHexString())}});var lr=e.select("."+gf.cblines).selectAll("path."+gf.cbline).data(x.color&&x.width?G:[]);lr.enter().append("path").classed(gf.cbline,!0),lr.exit().remove(),lr.each(function(Br){var Vr=_e,dt=Math.round(Ee.c2p(Br))+x.width/2%1;P_.select(this).attr("d","M"+(n?Vr+","+dt:dt+","+Vr)+(n?"h":"v")+Z).call(Gg.lineGroupStyle,x.width,P(Br),x.dash)}),pt.selectAll("g."+Ee._id+"tick,path").remove();var wr=_e+Z+(l||0)/2-(t.ticks==="outside"?1:0),Lr=Uy.calcTicks(Ee),ti=Uy.getTickSigns(Ee)[2];return Uy.drawTicks(r,Ee,{vals:Ee.ticks==="inside"?Uy.clipEnds(Ee,Lr):Lr,layer:pt,path:Uy.makeTickPath(Ee,wr,ti),transFn:Uy.makeTransTickFn(Ee)}),Uy.drawLabels(r,Ee,{vals:Lr,layer:pt,transFn:Uy.makeTransTickLabelFn(Ee),labelFns:Uy.makeLabelFns(Ee,wr)})}function Tr(){var fr,$e=Z+l/2;je.indexOf("inside")===-1&&(fr=Gg.bBox(pt.node()),$e+=n?fr.width:fr.height),Vt=ce.select("text");var St=0,Qt=n&&M==="top",Gt=!n&&M==="right",_t=0;if(Vt.node()&&!Vt.classed(gf.jsPlaceholder)){var It,mt=ce.select(".h"+Ee._id+"title-math-group").node();mt&&(n&&Ae||!n&&!Ae)?(fr=Gg.bBox(mt),St=fr.width,It=fr.height):(fr=Gg.bBox(ce.node()),St=fr.right-T.l-(n?_e:Se),It=fr.bottom-T.t-(n?Se:_e),!n&&M==="top"&&($e+=fr.height,_t=fr.height)),Gt&&(Vt.attr("transform",Hg(St/2+lt/2,0)),St*=2),$e=Math.max($e,n?St:It)}var er=(n?d:v)*2+$e+u+l/2,lr=0;!n&&C.text&&h==="bottom"&&b<=0&&(lr=er/2,er+=lr,_t+=lr),E._hColorbarMoveTitle=lr,E._hColorbarMoveCBTitle=_t;var wr=u+l,Lr=(n?_e:Se)-wr/2-(n?d:0),ti=(n?Se:_e)-(n?N:v+_t-lr);e.select("."+gf.cbbg).attr("x",Lr).attr("y",ti).attr(n?"width":"height",Math.max(er-lr,2)).attr(n?"height":"width",Math.max(N+wr,2)).call(SV.fill,c).call(SV.stroke,t.bordercolor).style("stroke-width",u);var Br=Gt?Math.max(St-10,0):0;e.selectAll("."+gf.cboutline).attr("x",(n?_e:Se+d)+Br).attr("y",(n?Se+v-N:_e)+(Qt?ot:0)).attr(n?"width":"height",Math.max(Z,2)).attr(n?"height":"width",Math.max(N-(n?2*v+ot:2*d+Br),2)).call(SV.stroke,t.outlinecolor).style({fill:"none","stroke-width":l});var Vr=n?Ce*er:0,dt=n?0:(1-Le)*er-_t;if(Vr=k?T.l-Vr:-Vr,dt=p?T.t-dt:-dt,e.attr("transform",Hg(Vr,dt)),!n&&(u||TV(c).getAlpha()&&!TV.equals(E.paper_bgcolor,c))){var Ge=pt.selectAll("text"),Je=Ge[0].length,We=e.select("."+gf.cbbg).node(),tt=Gg.bBox(We),xt=Gg.getTranslate(e),Ie=2;Ge.each(function(di,ji){var In=0,wi=Je-1;if(ji===In||ji===wi){var On=Gg.bBox(this),qn=Gg.getTranslate(this),Fn;if(ji===wi){var ra=On.right+qn.x,la=tt.right+xt.x+Se-u-Ie+_;Fn=la-ra,Fn>0&&(Fn=0)}else if(ji===In){var Ut=On.left+qn.x,wt=tt.left+xt.x+Se+u+Ie;Fn=wt-Ut,Fn<0&&(Fn=0)}Fn&&(Je<3?this.setAttribute("transform","translate("+Fn+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var xe={},ke=Ome[f],vt=qme[f],ir=Ome[h],ar=qme[h],vr=er-Z;n?(a==="pixels"?(xe.y=b,xe.t=N*ir,xe.b=N*ar):(xe.t=xe.b=0,xe.yt=b+i*ir,xe.yb=b-i*ar),s==="pixels"?(xe.x=_,xe.l=er*ke,xe.r=er*vt):(xe.l=vr*ke,xe.r=vr*vt,xe.xl=_-o*ke,xe.xr=_+o*vt)):(a==="pixels"?(xe.x=_,xe.l=N*ke,xe.r=N*vt):(xe.l=xe.r=0,xe.xl=_+i*ke,xe.xr=_-i*vt),s==="pixels"?(xe.y=1-b,xe.t=er*ir,xe.b=er*ar):(xe.t=vr*ir,xe.b=vr*ar,xe.yt=b-o*ir,xe.yb=b+o*ar));var ii=t.y<.5?"b":"t",pi=t.x<.5?"l":"r";r._fullLayout._reservedMargin[t._id]={};var $r={r:E.width-Lr-Vr,l:Lr+xe.r,b:E.height-ti-dt,t:ti+xe.b};k&&p?VI.autoMargin(r,t._id,xe):k?r._fullLayout._reservedMargin[t._id][ii]=$r[ii]:p||n?r._fullLayout._reservedMargin[t._id][pi]=$r[pi]:r._fullLayout._reservedMargin[t._id][ii]=$r[ii]}return U0.syncOrAsync([VI.previousPromises,Nt,sr,$t,VI.previousPromises,Tr],r)}function Zyt(e,t,r){var n=t.orientation==="v",i=r._fullLayout,a=i._size,o,s,l;UI.init({element:e.node(),gd:r,prepFn:function(){o=e.attr("transform"),AV(e)},moveFn:function(u,c){e.attr("transform",o+Hg(u,c)),s=UI.align((n?t._uFrac:t._vFrac)+u/a.w,n?t._thickFrac:t._lenFrac,0,1,t.xanchor),l=UI.align((n?t._vFrac:1-t._uFrac)-c/a.h,n?t._lenFrac:t._thickFrac,0,1,t.yanchor);var f=UI.getCursor(s,l,t.xanchor,t.yanchor);AV(e,f)},doneFn:function(){if(AV(e),s!==void 0&&l!==void 0){var u={};u[t._propPrefix+"x"]=s,u[t._propPrefix+"y"]=l,t._traceIndex!==void 0?Fme.call("_guiRestyle",r,u,t._traceIndex):Fme.call("_guiRelayout",r,u)}}})}function Yyt(e,t,r){var n=t._levels,i=[],a=[],o,s,l=n.end+n.size/100,u=n.size,c=1.001*r[0]-.001*r[1],f=1.001*r[1]-.001*r[0];for(s=0;s<1e5&&(o=n.start+s*u,!(u>0?o>=l:o<=l));s++)o>c&&o0?o>=l:o<=l));s++)o>r[0]&&o{"use strict";Vme.exports={moduleType:"component",name:"colorbar",attributes:uL(),supplyDefaults:Fq(),draw:Ume().draw,hasColorbar:kq()}});var jme=ye((Wlr,Hme)=>{"use strict";Hme.exports={moduleType:"component",name:"legend",layoutAttributes:CB(),supplyLayoutDefaults:PB(),draw:HB(),style:NB()}});var Xme=ye((Xlr,Wme)=>{"use strict";Wme.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}});var Yme=ye((Zlr,Zme)=>{"use strict";Zme.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}});var kV=ye((Ylr,Qme)=>{"use strict";var Jyt=qa(),$me=Dr(),EV=$me.extendFlat,Kme=$me.extendDeep;function Jme(e){var t;switch(e){case"themes__thumb":t={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":t={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:t={}}return t}function $yt(e){var t=["xaxis","yaxis","zaxis"];return t.indexOf(e.slice(0,5))>-1}Qme.exports=function(t,r){var n,i=t.data,a=t.layout,o=Kme([],i),s=Kme({},a,Jme(r.tileClass)),l=t._context||{};if(r.width&&(s.width=r.width),r.height&&(s.height=r.height),r.tileClass==="thumbnail"||r.tileClass==="themes__thumb"){s.annotations=[];var u=Object.keys(s);for(n=0;n{"use strict";var Qyt=Ab().EventEmitter,e1t=qa(),t1t=Dr(),eye=Oy(),r1t=kV(),i1t=YP(),n1t=KP();function a1t(e,t){var r=new Qyt,n=r1t(e,{format:"png"}),i=n.gd;i.style.position="absolute",i.style.left="-5000px",document.body.appendChild(i);function a(){var s=eye.getDelay(i._fullLayout);setTimeout(function(){var l=i1t(i),u=document.createElement("canvas");u.id=t1t.randstr(),r=n1t({format:t.format,width:i._fullLayout.width,height:i._fullLayout.height,canvas:u,emitter:r,svg:l}),r.clean=function(){i&&document.body.removeChild(i)}},s)}var o=eye.getRedrawFunc(i);return e1t.call("_doPlot",i,n.data,n.layout,n.config).then(o).then(a).catch(function(s){r.emit("error",s)}),r}tye.exports=a1t});var aye=ye((Jlr,nye)=>{"use strict";var iye=Oy(),o1t={getDelay:iye.getDelay,getRedrawFunc:iye.getRedrawFunc,clone:kV(),toSVG:YP(),svgToImg:KP(),toImage:rye(),downloadImage:sU()};nye.exports=o1t});var sye=ye(Vy=>{"use strict";Vy.version=g6().version;bee();une();var s1t=qa(),T4=Vy.register=s1t.register,LV=Ede(),oye=Object.keys(LV);for(GI=0;GI{"use strict";lye.exports=sye()});var zm=ye((eur,vye)=>{"use strict";var Bf=pf(),cye=df().axisHoverFormat,{hovertemplateAttrs:l1t,texttemplateAttrs:u1t,templatefallbackAttrs:fye}=Ll(),dye=Tu(),c1t=ec(),hye=A_(),f1t=Pd().pattern,c2=Ao().extendFlat,PV=c1t({editType:"calc",arrayOk:!0,colorEditType:"style"}),h1t=Bf.marker,d1t=h1t.line,v1t=c2({},d1t.width,{dflt:0}),p1t=c2({width:v1t,editType:"calc"},dye("marker.line")),g1t=c2({line:p1t,editType:"calc"},dye("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:f1t,cornerradius:{valType:"any",editType:"calc"}});vye.exports={x:Bf.x,x0:Bf.x0,dx:Bf.dx,y:Bf.y,y0:Bf.y0,dy:Bf.dy,xperiod:Bf.xperiod,yperiod:Bf.yperiod,xperiod0:Bf.xperiod0,yperiod0:Bf.yperiod0,xperiodalignment:Bf.xperiodalignment,yperiodalignment:Bf.yperiodalignment,xhoverformat:cye("x"),yhoverformat:cye("y"),text:Bf.text,texttemplate:u1t({editType:"plot"},{keys:hye.eventDataKeys}),texttemplatefallback:fye({editType:"plot"}),hovertext:Bf.hovertext,hovertemplate:l1t({},{keys:hye.eventDataKeys}),hovertemplatefallback:fye(),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:c2({},PV,{}),insidetextfont:c2({},PV,{}),outsidetextfont:c2({},PV,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:c2({},Bf.cliponaxis,{}),orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},base:{valType:"any",dflt:null,arrayOk:!0,editType:"calc"},offset:{valType:"number",dflt:null,arrayOk:!0,editType:"calc"},width:{valType:"number",dflt:null,min:0,arrayOk:!0,editType:"calc"},marker:g1t,offsetgroup:Bf.offsetgroup,alignmentgroup:Bf.alignmentgroup,selected:{marker:{opacity:Bf.selected.marker.opacity,color:Bf.selected.marker.color,editType:"style"},textfont:Bf.selected.textfont,editType:"style"},unselected:{marker:{opacity:Bf.unselected.marker.opacity,color:Bf.unselected.marker.color,editType:"style"},textfont:Bf.unselected.textfont,editType:"style"},zorder:Bf.zorder}});var jI=ye((tur,pye)=>{"use strict";pye.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},barcornerradius:{valType:"any",editType:"calc"}}});var WI=ye((rur,yye)=>{"use strict";var m1t=ka(),gye=pv().hasColorscale,mye=td(),y1t=Dr().coercePattern;yye.exports=function(t,r,n,i,a){var o=n("marker.color",i),s=gye(t,"marker");s&&mye(t,r,a,n,{prefix:"marker.",cLetter:"c"}),n("marker.line.color",m1t.defaultLine),gye(t,"marker.line")&&mye(t,r,a,n,{prefix:"marker.line.",cLetter:"c"}),n("marker.line.width"),n("marker.opacity"),y1t(n,"marker.pattern",o,s),n("selected.marker.color"),n("unselected.marker.color")}});var i0=ye((iur,Aye)=>{"use strict";var _ye=Eo(),kT=Dr(),xye=ka(),_1t=qa(),x1t=oT(),b1t=Dg(),w1t=WI(),T1t=e2(),bye=zm(),XI=kT.coerceFont;function A1t(e,t,r,n){function i(u,c){return kT.coerce(e,t,bye,u,c)}var a=x1t(e,t,n,i);if(!a){t.visible=!1;return}b1t(e,t,n,i),i("xhoverformat"),i("yhoverformat"),i("zorder"),i("orientation",t.x&&!t.y?"h":"v"),i("base"),i("offset"),i("width"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var o=i("textposition");Tye(e,t,n,i,o,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),w1t(e,t,i,r,n);var s=(t.marker.line||{}).color,l=_1t.getComponentMethod("errorbars","supplyDefaults");l(e,t,s||xye.defaultLine,{axis:"y"}),l(e,t,s||xye.defaultLine,{axis:"x",inherit:"y"}),kT.coerceSelectionMarkerOpacity(t,i)}function S1t(e,t){var r,n;function i(s,l){return kT.coerce(n._input,n,bye,s,l)}for(var a=0;a=0)return e}else if(typeof e=="string"&&(e=e.trim(),e.slice(-1)==="%"&&_ye(e.slice(0,-1))&&(e=+e.slice(0,-1),e>=0)))return e+"%"}function Tye(e,t,r,n,i,a){a=a||{};var o=a.moduleHasSelected!==!1,s=a.moduleHasUnselected!==!1,l=a.moduleHasConstrain!==!1,u=a.moduleHasCliponaxis!==!1,c=a.moduleHasTextangle!==!1,f=a.moduleHasInsideanchor!==!1,h=!!a.hasPathbar,d=Array.isArray(i)||i==="auto",v=d||i==="inside",_=d||i==="outside";if(v||_){var b=XI(n,"textfont",r.font),p=kT.extendFlat({},b),k=e.textfont&&e.textfont.color,E=!k;if(E&&delete p.color,XI(n,"insidetextfont",p),h){var T=kT.extendFlat({},b);E&&delete T.color,XI(n,"pathbar.textfont",T)}_&&XI(n,"outsidetextfont",b),o&&n("selected.textfont.color"),s&&n("unselected.textfont.color"),l&&n("constraintext"),u&&n("cliponaxis"),c&&n("textangle"),n("texttemplate"),n("texttemplatefallback")}v&&f&&n("insidetextanchor")}Aye.exports={supplyDefaults:A1t,crossTraceDefaults:S1t,handleText:Tye,validateCornerradius:wye}});var IV=ye((nur,Sye)=>{"use strict";var M1t=qa(),E1t=ho(),k1t=Dr(),C1t=jI(),L1t=i0().validateCornerradius;Sye.exports=function(e,t,r){function n(_,b){return k1t.coerce(e,t,C1t,_,b)}for(var i=!1,a=!1,o=!1,s={},l=n("barmode"),u=l==="group",c=0;c0&&!s[h]&&(o=!0),s[h]=!0),f.visible&&f.type==="histogram"){var d=E1t.getFromId({_fullLayout:t},f[f.orientation==="v"?"xaxis":"yaxis"]);d.type!=="category"&&(a=!0)}}if(!i){delete t.barmode;return}l!=="overlay"&&n("barnorm"),n("bargap",a&&!o?0:.2),n("bargroupgap");var v=n("barcornerradius");t.barcornerradius=L1t(v)}});var A4=ye((aur,Mye)=>{"use strict";var CT=Dr();Mye.exports=function(t,r){for(var n=0;n{"use strict";var Eye=ho(),kye=zg(),Cye=pv().hasColorscale,Lye=gv(),P1t=A4(),I1t=O0();Pye.exports=function(t,r){var n=Eye.getFromId(t,r.xaxis||"x"),i=Eye.getFromId(t,r.yaxis||"y"),a,o,s,l,u,c,f={msUTC:!!(r.base||r.base===0)};r.orientation==="h"?(a=n.makeCalcdata(r,"x",f),s=i.makeCalcdata(r,"y"),l=kye(r,i,"y",s),u=!!r.yperiodalignment,c="y"):(a=i.makeCalcdata(r,"y",f),s=n.makeCalcdata(r,"x"),l=kye(r,n,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;for(var h=Math.min(o.length,a.length),d=new Array(h),v=0;v{"use strict";var R1t=Oa(),D1t=Dr();function F1t(e,t,r){var n=e._fullLayout,i=n["_"+r+"Text_minsize"];if(i){var a=n.uniformtext.mode==="hide",o;switch(r){case"funnelarea":case"pie":case"sunburst":o="g.slice";break;case"treemap":case"icicle":o="g.slice, g.pathbar";break;default:o="g.points > g.point"}t.selectAll(o).each(function(s){var l=s.transform;if(l){l.scale=a&&l.hide?0:i/l.fontSize;var u=R1t.select(this).select("text");D1t.setTransormAndDisplay(u,l)}})}}function z1t(e,t,r){if(r.uniformtext.mode){var n=Rye(e),i=r.uniformtext.minsize,a=t.scale*t.fontSize;t.hide=a{"use strict";var q1t=Eo(),B1t=fd(),Fye=Dr().isArrayOrTypedArray;f2.coerceString=function(e,t,r){if(typeof t=="string"){if(t||!e.noBlank)return t}else if((typeof t=="number"||t===!0)&&!e.strict)return String(t);return r!==void 0?r:e.dflt};f2.coerceNumber=function(e,t,r){if(q1t(t)){t=+t;var n=e.min,i=e.max,a=n!==void 0&&ti;if(!a)return t}return r!==void 0?r:e.dflt};f2.coerceColor=function(e,t,r){return B1t(t).isValid()?t:r!==void 0?r:e.dflt};f2.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),e.values.indexOf(t)!==-1?t:r!==void 0?r:e.dflt};f2.getValue=function(e,t){var r;return Fye(e)?t{"use strict";var S4=Oa(),N1t=ka(),M4=So(),zye=Dr(),Oye=qa(),qye=bv().resizeText,RV=zm(),U1t=RV.textfont,V1t=RV.insidetextfont,G1t=RV.outsidetextfont,Qd=ZI();function H1t(e){var t=S4.select(e).selectAll('g[class^="barlayer"]').selectAll("g.trace");qye(e,t,"bar");var r=t.size(),n=e._fullLayout;t.style("opacity",function(i){return i[0].trace.opacity}).each(function(i){(n.barmode==="stack"&&r>1||n.bargap===0&&n.bargroupgap===0&&!i[0].trace.marker.line.width)&&S4.select(this).attr("shape-rendering","crispEdges")}),t.selectAll("g.points").each(function(i){var a=S4.select(this),o=i[0].trace;Bye(a,o,e)}),Oye.getComponentMethod("errorbars","style")(t)}function Bye(e,t,r){M4.pointStyle(e.selectAll("path"),t,r),Nye(e,t,r)}function Nye(e,t,r){e.selectAll("text").each(function(n){var i=S4.select(this),a=zye.ensureUniformFontSize(r,Uye(i,n,t,r));M4.font(i,a)})}function j1t(e,t,r){var n=t[0].trace;n.selectedpoints?W1t(r,n,e):(Bye(r,n,e),Oye.getComponentMethod("errorbars","style")(r))}function W1t(e,t,r){M4.selectedPointStyle(e.selectAll("path"),t),X1t(e.selectAll("text"),t,r)}function X1t(e,t,r){e.each(function(n){var i=S4.select(this),a;if(n.selected){a=zye.ensureUniformFontSize(r,Uye(i,n,t,r));var o=t.selected.textfont&&t.selected.textfont.color;o&&(a.color=o),M4.font(i,a)}else M4.selectedTextStyle(i,t)})}function Uye(e,t,r,n){var i=n._fullLayout.font,a=r.textfont;if(e.classed("bartext-inside")){var o=jye(t,r);a=Gye(r,t.i,i,o)}else e.classed("bartext-outside")&&(a=Hye(r,t.i,i));return a}function Vye(e,t,r){return DV(U1t,e.textfont,t,r)}function Gye(e,t,r,n){var i=Vye(e,t,r),a=e._input.textfont===void 0||e._input.textfont.color===void 0||Array.isArray(e.textfont.color)&&e.textfont.color[t]===void 0;return a&&(i={color:N1t.contrast(n),family:i.family,size:i.size,weight:i.weight,style:i.style,variant:i.variant,textcase:i.textcase,lineposition:i.lineposition,shadow:i.shadow}),DV(V1t,e.insidetextfont,t,i)}function Hye(e,t,r){var n=Vye(e,t,r);return DV(G1t,e.outsidetextfont,t,n)}function DV(e,t,r,n){t=t||{};var i=Qd.getValue(t.family,r),a=Qd.getValue(t.size,r),o=Qd.getValue(t.color,r),s=Qd.getValue(t.weight,r),l=Qd.getValue(t.style,r),u=Qd.getValue(t.variant,r),c=Qd.getValue(t.textcase,r),f=Qd.getValue(t.lineposition,r),h=Qd.getValue(t.shadow,r);return{family:Qd.coerceString(e.family,i,n.family),size:Qd.coerceNumber(e.size,a,n.size),color:Qd.coerceColor(e.color,o,n.color),weight:Qd.coerceString(e.weight,s,n.weight),style:Qd.coerceString(e.style,l,n.style),variant:Qd.coerceString(e.variant,u,n.variant),textcase:Qd.coerceString(e.variant,c,n.textcase),lineposition:Qd.coerceString(e.variant,f,n.lineposition),shadow:Qd.coerceString(e.variant,h,n.shadow)}}function jye(e,t){return t.type==="waterfall"?t[e.dir].marker.color:e.mcc||e.mc||t.marker.color}Wye.exports={style:H1t,styleTextPoints:Nye,styleOnSelect:j1t,getInsideTextFont:Gye,getOutsideTextFont:Hye,getBarColor:jye,resizeText:qye}});var d2=ye((cur,e1e)=>{"use strict";var YI=Oa(),KI=Eo(),Dd=Dr(),Z1t=Zl(),Y1t=ka(),I_=So(),K1t=qa(),JI=ho().tickText,Xye=bv(),J1t=Xye.recordMinTextSize,$1t=Xye.clearMinTextSize,FV=V0(),LT=ZI(),Q1t=A_(),Zye=zm(),e_t=Zye.text,t_t=Zye.textposition,r_t=ip().appendArrayPointValue,Gv=Q1t.TEXTPAD;function i_t(e){return e.id}function n_t(e){if(e.ids)return i_t}function zV(e){return(e>0)-(e<0)}function Om(e,t){return e0}function o_t(e,t,r,n,i,a){var o=t.xaxis,s=t.yaxis,l=e._fullLayout,u=e._context.staticPlot;i||(i={mode:l.barmode,norm:l.barmode,gap:l.bargap,groupgap:l.bargroupgap},$1t("bar",l));var c=Dd.makeTraceGroups(n,r,"trace bars").each(function(f){var h=YI.select(this),d=f[0].trace,v=f[0].t,_=d.type==="waterfall",b=d.type==="funnel",p=d.type==="histogram",k=d.type==="bar",E=k||b,T=0;_&&d.connector.visible&&d.connector.mode==="between"&&(T=d.connector.line.width/2);var L=d.orientation==="h",x=Kye(i),C=Dd.ensureSingle(h,"g","points"),M=n_t(d),g=C.selectAll("g.point").data(Dd.identity,M);g.enter().append("g").classed("point",!0),g.exit().remove(),g.each(function(A,z){var O=YI.select(this),U=a_t(A,o,s,L),G=U[0][0],Z=U[0][1],j=U[1][0],N=U[1][1],H=(L?Z-G:N-j)===0;H&&E&<.getLineWidth(d,A)&&(H=!1),H||(H=!KI(G)||!KI(Z)||!KI(j)||!KI(N)),A.isBlank=H,H&&(L?Z=G:N=j),T&&!H&&(L?(G-=Om(G,Z)*T,Z+=Om(G,Z)*T):(j-=Om(j,N)*T,N+=Om(j,N)*T));var re,oe;if(d.type==="waterfall"){if(!H){var _e=d[A.dir].marker;re=_e.line.width,oe=_e.color}}else re=LT.getLineWidth(d,A),oe=A.mc||d.marker.color;function Ce($e){var St=YI.round(re/2%1,2);return i.gap===0&&i.groupgap===0?YI.round(Math.round($e)-St,2):$e}function Le($e,St,Qt){return Qt&&$e===St?$e:Math.abs($e-St)>=2?Ce($e):$e>St?Math.ceil($e):Math.floor($e)}var ge=Y1t.opacity(oe),ie=ge<1||re>.01?Ce:Le;e._context.staticPlot||(G=ie(G,Z,L),Z=ie(Z,G,L),j=ie(j,N,!L),N=ie(N,j,!L));var Se=L?o.c2p:s.c2p,Ee;A.s0>0?Ee=A._sMax:A.s0<0?Ee=A._sMin:Ee=A.s1>0?A._sMax:A._sMin;function Ae($e,St){if(!$e)return 0;var Qt=Math.abs(L?N-j:Z-G),Gt=Math.abs(L?Z-G:N-j),_t=ie(Math.abs(Se(Ee,!0)-Se(0,!0))),It=A.hasB?Math.min(Qt/2,Gt/2):Math.min(Qt/2,_t),mt;if(St==="%"){var er=Math.min(50,$e);mt=Qt*(er/100)}else mt=$e;return ie(Math.max(Math.min(mt,It),0))}var Be=k||p?Ae(v.cornerradiusvalue,v.cornerradiusform):0,Pe,me,De="M"+G+","+j+"V"+N+"H"+Z+"V"+j+"Z",ce=0;if(Be&&A.s){var je=zV(A.s0)===0||zV(A.s)===zV(A.s0)?A.s1:A.s0;if(ce=ie(A.hasB?0:Math.abs(Se(Ee,!0)-Se(je,!0))),ce0?Math.sqrt(ce*(2*Be-ce)):0,Wt=lt>0?Math.max:Math.min;Pe="M"+G+","+j+"V"+(N-ot*pt)+"H"+Wt(Z-(Be-ce)*lt,G)+"A "+Be+","+Be+" 0 0 "+Vt+" "+Z+","+(N-Be*pt-ut)+"V"+(j+Be*pt+ut)+"A "+Be+","+Be+" 0 0 "+Vt+" "+Wt(Z-(Be-ce)*lt,G)+","+(j+ot*pt)+"Z"}else if(A.hasB)Pe="M"+(G+Be*lt)+","+j+"A "+Be+","+Be+" 0 0 "+Vt+" "+G+","+(j+Be*pt)+"V"+(N-Be*pt)+"A "+Be+","+Be+" 0 0 "+Vt+" "+(G+Be*lt)+","+N+"H"+(Z-Be*lt)+"A "+Be+","+Be+" 0 0 "+Vt+" "+Z+","+(N-Be*pt)+"V"+(j+Be*pt)+"A "+Be+","+Be+" 0 0 "+Vt+" "+(Z-Be*lt)+","+j+"Z";else{me=Math.abs(N-j)+ce;var Nt=me0?Math.sqrt(ce*(2*Be-ce)):0,sr=pt>0?Math.max:Math.min;Pe="M"+(G+Nt*lt)+","+j+"V"+sr(N-(Be-ce)*pt,j)+"A "+Be+","+Be+" 0 0 "+Vt+" "+(G+Be*lt-$t)+","+N+"H"+(Z-Be*lt+$t)+"A "+Be+","+Be+" 0 0 "+Vt+" "+(Z-Nt*lt)+","+sr(N-(Be-ce)*pt,j)+"V"+j+"Z"}}else Pe=De}else Pe=De;var Tr=Yye(Dd.ensureSingle(O,"path"),l,i,a);if(Tr.style("vector-effect",u?"none":"non-scaling-stroke").attr("d",isNaN((Z-G)*(N-j))||H&&e._context.staticPlot?"M0,0Z":Pe).call(I_.setClipUrl,t.layerClipId,e),!l.uniformtext.mode&&x){var fr=I_.makePointStyleFns(d);I_.singlePointStyle(A,Tr,d,fr,e)}s_t(e,t,O,f,z,G,Z,j,N,Be,ce,i,a),t.layerClipId&&I_.hideOutsideRangePoint(A,O.select("text"),o,s,d.xcalendar,d.ycalendar)});var P=d.cliponaxis===!1;I_.setClipUrl(h,P?null:t.layerClipId,e)});K1t.getComponentMethod("errorbars","plot")(e,c,t,i)}function s_t(e,t,r,n,i,a,o,s,l,u,c,f,h){var d=t.xaxis,v=t.yaxis,_=e._fullLayout,b;function p(me,De,ce){var je=Dd.ensureSingle(me,"text").text(De).attr({class:"bartext bartext-"+b,"text-anchor":"middle","data-notex":1}).call(I_.font,ce).call(Z1t.convertToTspans,e);return je}var k=n[0].trace,E=k.orientation==="h",T=c_t(_,n,i,d,v);b=f_t(k,i);var L=f.mode==="stack"||f.mode==="relative",x=n[i],C=!L||x._outmost,M=x.hasB,g=u&&u-c>Gv;if(!T||b==="none"||(x.isBlank||a===o||s===l)&&(b==="auto"||b==="inside")){r.select("text").remove();return}var P=_.font,A=FV.getBarColor(n[i],k),z=FV.getInsideTextFont(k,i,P,A),O=FV.getOutsideTextFont(k,i,P),U=k.insidetextanchor||"end",G=r.datum();E?d.type==="log"&&G.s0<=0&&(d.range[0]0&&Ce>0,ie;g?M?ie=h2(N-2*u,H,_e,Ce,E)||h2(N,H-2*u,_e,Ce,E):E?ie=h2(N-(u-c),H,_e,Ce,E)||h2(N,H-2*(u-c),_e,Ce,E):ie=h2(N,H-(u-c),_e,Ce,E)||h2(N-2*(u-c),H,_e,Ce,E):ie=h2(N,H,_e,Ce,E),ge&&ie?b="inside":(b="outside",re.remove(),re=null)}else b="inside";if(!re){Le=Dd.ensureUniformFontSize(e,b==="outside"?O:z),re=p(r,T,Le);var Se=re.attr("transform");if(re.attr("transform",""),oe=I_.bBox(re.node()),_e=oe.width,Ce=oe.height,re.attr("transform",Se),_e<=0||Ce<=0){re.remove();return}}var Ee=k.textangle,Ae,Be;b==="outside"?(Be=k.constraintext==="both"||k.constraintext==="outside",Ae=u_t(a,o,s,l,oe,{isHorizontal:E,constrained:Be,angle:Ee})):(Be=k.constraintext==="both"||k.constraintext==="inside",Ae=Qye(a,o,s,l,oe,{isHorizontal:E,constrained:Be,angle:Ee,anchor:U,hasB:M,r:u,overhead:c})),Ae.fontSize=Le.size,J1t(k.type==="histogram"?"bar":k.type,Ae,_),x.transform=Ae;var Pe=Yye(re,_,f,h);Dd.setTransormAndDisplay(Pe,Ae)}function h2(e,t,r,n,i){if(e<0||t<0)return!1;var a=r<=e&&n<=t,o=r<=t&&n<=e,s=i?e>=r*(t/n):t>=n*(e/r);return a||o||s}function Jye(e){return e==="auto"?0:e}function $ye(e,t){var r=Math.PI/180*t,n=Math.abs(Math.sin(r)),i=Math.abs(Math.cos(r));return{x:e.width*i+e.height*n,y:e.width*n+e.height*i}}function Qye(e,t,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,u=a.anchor,c=u==="end",f=u==="start",h=a.leftToRight||0,d=(h+1)/2,v=1-d,_=a.hasB,b=a.r,p=a.overhead,k=i.width,E=i.height,T=Math.abs(t-e),L=Math.abs(n-r),x=T>2*Gv&&L>2*Gv?Gv:0;T-=2*x,L-=2*x;var C=Jye(l);l==="auto"&&!(k<=T&&E<=L)&&(k>T||E>L)&&(!(k>L||E>T)||kGv){var A=l_t(e,t,r,n,M,b,p,o,_);g=A.scale,P=A.pad}else g=1,s&&(g=Math.min(1,T/M.x,L/M.y)),P=0;var z=i.left*v+i.right*d,O=(i.top+i.bottom)/2,U=(e+Gv)*v+(t-Gv)*d,G=(r+n)/2,Z=0,j=0;if(f||c){var N=(o?M.x:M.y)/2;b&&(c||_)&&(x+=P);var H=o?Om(e,t):Om(r,n);o?f?(U=e+H*x,Z=-H*N):(U=t-H*x,Z=H*N):f?(G=r+H*x,j=-H*N):(G=n-H*x,j=H*N)}return{textX:z,textY:O,targetX:U,targetY:G,anchorX:Z,anchorY:j,scale:g,rotate:C}}function l_t(e,t,r,n,i,a,o,s,l){var u=Math.max(0,Math.abs(t-e)-2*Gv),c=Math.max(0,Math.abs(n-r)-2*Gv),f=a-Gv,h=o?f-Math.sqrt(f*f-(f-o)*(f-o)):f,d=l?f*2:s?f-o:2*h,v=l?f*2:s?2*h:f-o,_,b,p,k,E;return i.y/i.x>=c/(u-d)?k=c/i.y:i.y/i.x<=(c-v)/u?k=u/i.x:!l&&s?(_=i.x*i.x+i.y*i.y/4,b=-2*i.x*(u-f)-i.y*(c/2-f),p=(u-f)*(u-f)+(c/2-f)*(c/2-f)-f*f,k=(-b+Math.sqrt(b*b-4*_*p))/(2*_)):l?(_=(i.x*i.x+i.y*i.y)/4,b=-i.x*(u/2-f)-i.y*(c/2-f),p=(u/2-f)*(u/2-f)+(c/2-f)*(c/2-f)-f*f,k=(-b+Math.sqrt(b*b-4*_*p))/(2*_)):(_=i.x*i.x/4+i.y*i.y,b=-i.x*(u/2-f)-2*i.y*(c-f),p=(u/2-f)*(u/2-f)+(c-f)*(c-f)-f*f,k=(-b+Math.sqrt(b*b-4*_*p))/(2*_)),k=Math.min(1,k),s?E=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(c-i.y*k)/2)*(f-(c-i.y*k)/2)))-o):E=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(u-i.x*k)/2)*(f-(u-i.x*k)/2)))-o),{scale:k,pad:E}}function u_t(e,t,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,u=i.width,c=i.height,f=Math.abs(t-e),h=Math.abs(n-r),d;o?d=h>2*Gv?Gv:0:d=f>2*Gv?Gv:0;var v=1;s&&(v=o?Math.min(1,h/c):Math.min(1,f/u));var _=Jye(l),b=$ye(i,_),p=(o?b.x:b.y)/2,k=(i.left+i.right)/2,E=(i.top+i.bottom)/2,T=(e+t)/2,L=(r+n)/2,x=0,C=0,M=o?Om(t,e):Om(r,n);return o?(T=t-M*d,x=M*p):(L=n+M*d,C=-M*p),{textX:k,textY:E,targetX:T,targetY:L,anchorX:x,anchorY:C,scale:v,rotate:_}}function c_t(e,t,r,n,i){var a=t[0].trace,o=a.texttemplate,s;return o?s=h_t(e,t,r,n,i):a.textinfo?s=d_t(t,r,n,i):s=LT.getValue(a.text,r),LT.coerceString(e_t,s)}function f_t(e,t){var r=LT.getValue(e.textposition,t);return LT.coerceEnumerated(t_t,r)}function h_t(e,t,r,n,i){var a=t[0].trace,o=Dd.castOption(a,r,"texttemplate");if(!o)return"";var s=a.type==="histogram",l=a.type==="waterfall",u=a.type==="funnel",c=a.orientation==="h",f,h,d,v;c?(f="y",h=i,d="x",v=n):(f="x",h=n,d="y",v=i);function _(x){return JI(h,h.c2l(x),!0).text}function b(x){return JI(v,v.c2l(x),!0).text}var p=t[r],k={};k.label=p.p,k.labelLabel=k[f+"Label"]=_(p.p);var E=Dd.castOption(a,p.i,"text");(E===0||E)&&(k.text=E),k.value=p.s,k.valueLabel=k[d+"Label"]=b(p.s);var T={};r_t(T,a,p.i),(s||T.x===void 0)&&(T.x=c?k.value:k.label),(s||T.y===void 0)&&(T.y=c?k.label:k.value),(s||T.xLabel===void 0)&&(T.xLabel=c?k.valueLabel:k.labelLabel),(s||T.yLabel===void 0)&&(T.yLabel=c?k.labelLabel:k.valueLabel),l&&(k.delta=+p.rawS||p.s,k.deltaLabel=b(k.delta),k.final=p.v,k.finalLabel=b(k.final),k.initial=k.final-k.delta,k.initialLabel=b(k.initial)),u&&(k.value=p.s,k.valueLabel=b(k.value),k.percentInitial=p.begR,k.percentInitialLabel=Dd.formatPercent(p.begR),k.percentPrevious=p.difR,k.percentPreviousLabel=Dd.formatPercent(p.difR),k.percentTotal=p.sumR,k.percenTotalLabel=Dd.formatPercent(p.sumR));var L=Dd.castOption(a,p.i,"customdata");return L&&(k.customdata=L),Dd.texttemplateString({data:[T,k,a._meta],fallback:a.texttemplatefallback,labels:k,locale:e._d3locale,template:o})}function d_t(e,t,r,n){var i=e[0].trace,a=i.orientation==="h",o=i.type==="waterfall",s=i.type==="funnel";function l(L){var x=a?n:r;return JI(x,L,!0).text}function u(L){var x=a?r:n;return JI(x,+L,!0).text}var c=i.textinfo,f=e[t],h=c.split("+"),d=[],v,_=function(L){return h.indexOf(L)!==-1};if(_("label")&&d.push(l(e[t].p)),_("text")&&(v=Dd.castOption(i,f.i,"text"),(v===0||v)&&d.push(v)),o){var b=+f.rawS||f.s,p=f.v,k=p-b;_("initial")&&d.push(u(k)),_("delta")&&d.push(u(b)),_("final")&&d.push(u(p))}if(s){_("value")&&d.push(u(f.s));var E=0;_("percent initial")&&E++,_("percent previous")&&E++,_("percent total")&&E++;var T=E>1;_("percent initial")&&(v=Dd.formatPercent(f.begR),T&&(v+=" of initial"),d.push(v)),_("percent previous")&&(v=Dd.formatPercent(f.difR),T&&(v+=" of previous"),d.push(v)),_("percent total")&&(v=Dd.formatPercent(f.sumR),T&&(v+=" of total"),d.push(v))}return d.join("
")}e1e.exports={plot:o_t,toMoveInsideBar:Qye}});var PT=ye((fur,n1e)=>{"use strict";var E4=vf(),v_t=qa(),t1e=ka(),p_t=Dr().fillText,g_t=ZI().getLineWidth,OV=ho().hoverLabelText,m_t=fs().BADNUM;function y_t(e,t,r,n,i){var a=r1e(e,t,r,n,i);if(a){var o=a.cd,s=o[0].trace,l=o[a.index];return a.color=i1e(s,l),v_t.getComponentMethod("errorbars","hoverInfo")(l,s,a),[a]}}function r1e(e,t,r,n,i){var a=e.cd,o=a[0].trace,s=a[0].t,l=n==="closest",u=o.type==="waterfall",c=e.maxHoverDistance,f=e.maxSpikeDistance,h,d,v,_,b,p,k;o.orientation==="h"?(h=r,d=t,v="y",_="x",b=G,p=z):(h=t,d=r,v="x",_="y",p=G,b=z);var E=o[v+"period"],T=l||E;function L(ie){return C(ie,-1)}function x(ie){return C(ie,1)}function C(ie,Se){var Ee=ie.w;return ie[v]+Se*Ee/2}function M(ie){return ie[v+"End"]-ie[v+"Start"]}var g=l?L:E?function(ie){return ie.p-M(ie)/2}:function(ie){return Math.min(L(ie),ie.p-s.bardelta/2)},P=l?x:E?function(ie){return ie.p+M(ie)/2}:function(ie){return Math.max(x(ie),ie.p+s.bardelta/2)};function A(ie,Se,Ee){return i.finiteRange&&(Ee=0),E4.inbox(ie-h,Se-h,Ee+Math.min(1,Math.abs(Se-ie)/k)-1)}function z(ie){return A(g(ie),P(ie),c)}function O(ie){return A(L(ie),x(ie),f)}function U(ie){var Se=ie[_];if(u){var Ee=Math.abs(ie.rawS)||0;d>0?Se+=Ee:d<0&&(Se-=Ee)}return Se}function G(ie){var Se=d,Ee=ie.b,Ae=U(ie);return E4.inbox(Ee-Se,Ae-Se,c+(Ae-Se)/(Ae-Ee)-1)}function Z(ie){var Se=d,Ee=ie.b,Ae=U(ie);return E4.inbox(Ee-Se,Ae-Se,f+(Ae-Se)/(Ae-Ee)-1)}var j=e[v+"a"],N=e[_+"a"];k=Math.abs(j.r2c(j.range[1])-j.r2c(j.range[0]));function H(ie){return(b(ie)+p(ie))/2}var re=E4.getDistanceFunction(n,b,p,H);if(E4.getClosest(a,re,e),e.index!==!1&&a[e.index].p!==m_t){T||(g=function(ie){return Math.min(L(ie),ie.p-s.bargroupwidth/2)},P=function(ie){return Math.max(x(ie),ie.p+s.bargroupwidth/2)});var oe=e.index,_e=a[oe],Ce=o.base?_e.b+_e.s:_e.s;e[_+"0"]=e[_+"1"]=N.c2p(_e[_],!0),e[_+"LabelVal"]=Ce;var Le=s.extents[s.extents.round(_e.p)];e[v+"0"]=j.c2p(l?g(_e):Le[0],!0),e[v+"1"]=j.c2p(l?P(_e):Le[1],!0);var ge=_e.orig_p!==void 0;return e[v+"LabelVal"]=ge?_e.orig_p:_e.p,e.labelLabel=OV(j,e[v+"LabelVal"],o[v+"hoverformat"]),e.valueLabel=OV(N,e[_+"LabelVal"],o[_+"hoverformat"]),e.baseLabel=OV(N,_e.b,o[_+"hoverformat"]),e.spikeDistance=(Z(_e)+O(_e))/2,e[v+"Spike"]=j.c2p(_e.p,!0),p_t(_e,o,e),e.hovertemplate=o.hovertemplate,e}}function i1e(e,t){var r=t.mcc||e.marker.color,n=t.mlcc||e.marker.line.color,i=g_t(e,t);if(t1e.opacity(r))return r;if(t1e.opacity(n)&&i)return n}n1e.exports={hoverPoints:y_t,hoverOnBars:r1e,getTraceColor:i1e}});var o1e=ye((hur,a1e)=>{"use strict";a1e.exports=function(t,r,n){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),n.orientation==="h"?(t.label=t.y,t.value=t.x):(t.label=t.x,t.value=t.y),t}});var IT=ye((dur,s1e)=>{"use strict";s1e.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=n[0].trace,s=o.type==="funnel",l=o.orientation==="h",u=[],c;if(r===!1)for(c=0;c{"use strict";l1e.exports={attributes:zm(),layoutAttributes:jI(),supplyDefaults:i0().supplyDefaults,crossTraceDefaults:i0().crossTraceDefaults,supplyLayoutDefaults:IV(),calc:Iye(),crossTraceCalc:t2().crossTraceCalc,colorbar:$d(),arraysToCalcdata:A4(),plot:d2().plot,style:V0().style,styleOnSelect:V0().styleOnSelect,hoverPoints:PT().hoverPoints,eventData:o1e(),selectPoints:IT(),moduleType:"trace",name:"bar",basePlotModule:mh(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}});var f1e=ye((pur,c1e)=>{"use strict";c1e.exports=u1e()});var k4=ye((gur,p1e)=>{"use strict";var x_t=Pg(),G0=pf(),h1e=zm(),b_t=Ih(),d1e=df().axisHoverFormat,{hovertemplateAttrs:w_t,templatefallbackAttrs:T_t}=Ll(),Gy=Ao().extendFlat,RT=G0.marker,v1e=RT.line;p1e.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},xperiod:G0.xperiod,yperiod:G0.yperiod,xperiod0:G0.xperiod0,yperiod0:G0.yperiod0,xperiodalignment:G0.xperiodalignment,yperiodalignment:G0.yperiodalignment,xhoverformat:d1e("x"),yhoverformat:d1e("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},sdmultiple:{valType:"number",min:0,editType:"calc",dflt:1},sizemode:{valType:"enumerated",values:["quartiles","sd"],editType:"calc",dflt:"quartiles"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:Gy({},RT.symbol,{arrayOk:!1,editType:"plot"}),opacity:Gy({},RT.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:Gy({},RT.angle,{arrayOk:!1,editType:"calc"}),size:Gy({},RT.size,{arrayOk:!1,editType:"calc"}),color:Gy({},RT.color,{arrayOk:!1,editType:"style"}),line:{color:Gy({},v1e.color,{arrayOk:!1,dflt:b_t.defaultLine,editType:"style"}),width:Gy({},v1e.width,{arrayOk:!1,dflt:0,editType:"style"}),outliercolor:{valType:"color",editType:"style"},outlierwidth:{valType:"number",min:0,dflt:1,editType:"style"},editType:"style"},editType:"plot"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:x_t(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:h1e.offsetgroup,alignmentgroup:h1e.alignmentgroup,selected:{marker:G0.selected.marker,editType:"style"},unselected:{marker:G0.unselected.marker,editType:"style"},text:Gy({},G0.text,{}),hovertext:Gy({},G0.hovertext,{}),hovertemplate:w_t({}),hovertemplatefallback:T_t(),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:G0.zorder}});var C4=ye((mur,g1e)=>{"use strict";g1e.exports={boxmode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},boxgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"},boxgroupgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"}}});var P4=ye((yur,x1e)=>{"use strict";var H0=Dr(),A_t=qa(),S_t=ka(),M_t=Dg(),E_t=e2(),m1e=V3(),L4=k4();function k_t(e,t,r,n){function i(v,_){return H0.coerce(e,t,L4,v,_)}if(y1e(e,t,i,n),t.visible!==!1){M_t(e,t,n,i),i("xhoverformat"),i("yhoverformat");var a=t._hasPreCompStats;a&&(i("lowerfence"),i("upperfence")),i("line.color",(e.marker||{}).color||r),i("line.width"),i("fillcolor",S_t.addOpacity(t.line.color,.5));var o=!1;if(a){var s=i("mean"),l=i("sd");s&&s.length&&(o=!0,l&&l.length&&(o="sd"))}i("whiskerwidth");var u=i("sizemode"),c;u==="quartiles"&&(c=i("boxmean",o)),i("showwhiskers",u==="quartiles"),(u==="sd"||c==="sd")&&i("sdmultiple"),i("width"),i("quartilemethod");var f=!1;if(a){var h=i("notchspan");h&&h.length&&(f=!0)}else H0.validate(e.notchwidth,L4.notchwidth)&&(f=!0);var d=i("notched",f);d&&i("notchwidth"),_1e(e,t,i,{prefix:"box"}),i("zorder")}}function y1e(e,t,r,n){function i(P){var A=0;return P&&P.length&&(A+=1,H0.isArrayOrTypedArray(P[0])&&P[0].length&&(A+=1)),A}function a(P){return H0.validate(e[P],L4[P])}var o=r("y"),s=r("x"),l;if(t.type==="box"){var u=r("q1"),c=r("median"),f=r("q3");t._hasPreCompStats=u&&u.length&&c&&c.length&&f&&f.length,l=Math.min(H0.minRowLength(u),H0.minRowLength(c),H0.minRowLength(f))}var h=i(o),d=i(s),v=h&&H0.minRowLength(o),_=d&&H0.minRowLength(s),b=n.calendar,p={autotypenumbers:n.autotypenumbers},k,E;if(t._hasPreCompStats)switch(String(d)+String(h)){case"00":var T=a("x0")||a("dx"),L=a("y0")||a("dy");L&&!T?k="h":k="v",E=l;break;case"10":k="v",E=Math.min(l,_);break;case"20":k="h",E=Math.min(l,s.length);break;case"01":k="h",E=Math.min(l,v);break;case"02":k="v",E=Math.min(l,o.length);break;case"12":k="v",E=Math.min(l,_,o.length);break;case"21":k="h",E=Math.min(l,s.length,v);break;case"11":E=0;break;case"22":var x=!1,C;for(C=0;C0?(k="v",d>0?E=Math.min(_,v):E=Math.min(v)):d>0?(k="h",E=Math.min(_)):E=0;if(!E){t.visible=!1;return}t._length=E;var M=r("orientation",k);t._hasPreCompStats?M==="v"&&d===0?(r("x0",0),r("dx",1)):M==="h"&&h===0&&(r("y0",0),r("dy",1)):M==="v"&&d===0?r("x0"):M==="h"&&h===0&&r("y0");var g=A_t.getComponentMethod("calendars","handleTraceDefaults");g(e,t,["x","y"],n)}function _1e(e,t,r,n){var i=n.prefix,a=H0.coerce2(e,t,L4,"marker.outliercolor"),o=r("marker.line.outliercolor"),s="outliers";t._hasPreCompStats?s="all":(a||o)&&(s="suspectedoutliers");var l=r(i+"points",s);l?(r("jitter",l==="all"?.3:0),r("pointpos",l==="all"?-1.5:0),r("marker.symbol"),r("marker.opacity"),r("marker.size"),r("marker.angle"),r("marker.color",t.line.color),r("marker.line.color"),r("marker.line.width"),l==="suspectedoutliers"&&(r("marker.line.outliercolor",t.marker.color),r("marker.line.outlierwidth")),r("selected.marker.color"),r("unselected.marker.color"),r("selected.marker.size"),r("unselected.marker.size"),r("text"),r("hovertext")):delete t.marker;var u=r("hoveron");(u==="all"||u.indexOf("points")!==-1)&&(r("hovertemplate"),r("hovertemplatefallback")),H0.coerceSelectionMarkerOpacity(t,r)}function C_t(e,t){var r,n;function i(l){return H0.coerce(n._input,n,L4,l)}for(var a=0;a{"use strict";var L_t=qa(),P_t=Dr(),I_t=C4();function b1e(e,t,r,n,i){for(var a=i+"Layout",o=!1,s=0;s{"use strict";var BV=Eo(),QI=ho(),D_t=zg(),yh=Dr(),n0=fs().BADNUM,Hy=yh._;P1e.exports=function(t,r){var n=t._fullLayout,i=QI.getFromId(t,r.xaxis||"x"),a=QI.getFromId(t,r.yaxis||"y"),o=[],s=r.type==="violin"?"_numViolins":"_numBoxes",l,u,c,f,h,d,v;r.orientation==="h"?(c=i,f="x",h=a,d="y",v=!!r.yperiodalignment):(c=a,f="y",h=i,d="x",v=!!r.xperiodalignment);var _=F_t(r,d,h,n[s]),b=_[0],p=_[1],k=yh.distinctVals(b,h),E=k.vals,T=k.minDiff/2,L,x,C,M,g,P,A=(r.boxpoints||r.points)==="all"?yh.identity:function(Vt){return Vt.vL.uf};if(r._hasPreCompStats){var z=r[f],O=function(Vt){return c.d2c((r[Vt]||[])[l])},U=1/0,G=-1/0;for(l=0;l=L.q1&&L.q3>=L.med){var j=O("lowerfence");L.lf=j!==n0&&j<=L.q1?j:M1e(L,C,M);var N=O("upperfence");L.uf=N!==n0&&N>=L.q3?N:E1e(L,C,M);var H=O("mean");L.mean=H!==n0?H:M?yh.mean(C,M):(L.q1+L.q3)/2;var re=O("sd");L.sd=H!==n0&&re>=0?re:M?yh.stdev(C,M,L.mean):L.q3-L.q1,L.lo=k1e(L),L.uo=C1e(L);var oe=O("notchspan");oe=oe!==n0&&oe>0?oe:L1e(L,M),L.ln=L.med-oe,L.un=L.med+oe;var _e=L.lf,Ce=L.uf;r.boxpoints&&C.length&&(_e=Math.min(_e,C[0]),Ce=Math.max(Ce,C[M-1])),r.notched&&(_e=Math.min(_e,L.ln),Ce=Math.max(Ce,L.un)),L.min=_e,L.max=Ce}else{yh.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+L.q1,"median = "+L.med,"q3 = "+L.q3].join(` -`));var Le;L.med!==n0?Le=L.med:L.q1!==n0?L.q3!==n0?Le=(L.q1+L.q3)/2:Le=L.q1:L.q3!==n0?Le=L.q3:Le=0,L.med=Le,L.q1=L.q3=Le,L.lf=L.uf=Le,L.mean=L.sd=Le,L.ln=L.un=Le,L.min=L.max=Le}U=Math.min(U,L.min),G=Math.max(G,L.max),L.pts2=x.filter(A),o.push(L)}}r._extremes[c._id]=QI.findExtremes(c,[U,G],{padded:!0})}else{var ge=c.makeCalcdata(r,f),ie=z_t(E,T),Se=E.length,Ee=O_t(Se);for(l=0;l=0&&Ae0){if(L={},L.pos=L[d]=E[l],x=L.pts=Ee[l].sort(A1e),C=L[f]=x.map(S1e),M=C.length,L.min=C[0],L.max=C[M-1],L.mean=yh.mean(C,M),L.sd=yh.stdev(C,M,L.mean)*r.sdmultiple,L.med=yh.interp(C,.5),M%2&&(De||ce)){var je,lt;De?(je=C.slice(0,M/2),lt=C.slice(M/2+1)):ce&&(je=C.slice(0,M/2+1),lt=C.slice(M/2)),L.q1=yh.interp(je,.5),L.q3=yh.interp(lt,.5)}else L.q1=yh.interp(C,.25),L.q3=yh.interp(C,.75);L.lf=M1e(L,C,M),L.uf=E1e(L,C,M),L.lo=k1e(L),L.uo=C1e(L);var pt=L1e(L,M);L.ln=L.med-pt,L.un=L.med+pt,Be=Math.min(Be,L.ln),Pe=Math.max(Pe,L.un),L.pts2=x.filter(A),o.push(L)}r.notched&&yh.isTypedArray(ge)&&(ge=Array.from(ge)),r._extremes[c._id]=QI.findExtremes(c,r.notched?ge.concat([Be,Pe]):ge,{padded:!0})}return q_t(o,r),o.length>0?(o[0].t={num:n[s],dPos:T,posLetter:d,valLetter:f,labels:{med:Hy(t,"median:"),min:Hy(t,"min:"),q1:Hy(t,"q1:"),q3:Hy(t,"q3:"),max:Hy(t,"max:"),mean:r.boxmean==="sd"||r.sizemode==="sd"?Hy(t,"mean \xB1 \u03C3:").replace("\u03C3",r.sdmultiple===1?"\u03C3":r.sdmultiple+"\u03C3"):Hy(t,"mean:"),lf:Hy(t,"lower fence:"),uf:Hy(t,"upper fence:")}},n[s]++,o):[{t:{empty:!0}}]};function F_t(e,t,r,n){var i=t in e,a=t+"0"in e,o="d"+t in e;if(i||a&&o){var s=r.makeCalcdata(e,t),l=D_t(e,r,t,s).vals;return[l,s]}var u;a?u=e[t+"0"]:"name"in e&&(r.type==="category"||BV(e.name)&&["linear","log"].indexOf(r.type)!==-1||yh.isDateTime(e.name)&&r.type==="date")?u=e.name:u=n;for(var c=r.type==="multicategory"?r.r2c_just_indices(u):r.d2c(u,0,e[t+"calendar"]),f=e._length,h=new Array(f),d=0;d{"use strict";var I1e=ho(),B_t=Dr(),N_t=Kb().getAxisGroup,R1e=["v","h"];function U_t(e,t){for(var r=e.calcdata,n=t.xaxis,i=t.yaxis,a=0;a1,k=1-a[e+"gap"],E=1-a[e+"groupgap"];for(l=0;l0;if(C==="positive"?(N=M*(x?1:.5),oe=re,H=oe=P):C==="negative"?(N=oe=P,H=M*(x?1:.5),_e=re):(N=H=M,oe=_e=re),Ee){var Ae=T.pointpos,Be=T.jitter,Pe=T.marker.size/2,me=0;Ae+Be>=0&&(me=re*(Ae+Be),me>N?(Se=!0,ge=Pe,Ce=me):me>oe&&(ge=Pe,Ce=N)),me<=N&&(Ce=N);var De=0;Ae-Be<=0&&(De=-re*(Ae-Be),De>H?(Se=!0,ie=Pe,Le=De):De>_e&&(ie=Pe,Le=H)),De<=H&&(Le=H)}else Ce=N,Le=H;var ce=new Array(c.length);for(u=0;u{"use strict";var DT=Oa(),v2=Dr(),V_t=So(),z1e=5,G_t=.01;function H_t(e,t,r,n){var i=e._context.staticPlot,a=t.xaxis,o=t.yaxis;v2.makeTraceGroups(n,r,"trace boxes").each(function(s){var l=DT.select(this),u=s[0],c=u.t,f=u.trace;if(c.wdPos=c.bdPos*f.whiskerwidth,f.visible!==!0||c.empty){l.remove();return}var h,d;f.orientation==="h"?(h=o,d=a):(h=a,d=o),O1e(l,{pos:h,val:d},f,c,i),q1e(l,{x:a,y:o},f,c),B1e(l,{pos:h,val:d},f,c)})}function O1e(e,t,r,n,i){var a=r.orientation==="h",o=t.val,s=t.pos,l=!!s.rangebreaks,u=n.bPos,c=n.wdPos||0,f=n.bPosPxOffset||0,h=r.whiskerwidth||0,d=r.showwhiskers!==!1,v=r.notched||!1,_=v?1-2*r.notchwidth:1,b,p;Array.isArray(n.bdPos)?(b=n.bdPos[0],p=n.bdPos[1]):(b=n.bdPos,p=n.bdPos);var k=e.selectAll("path.box").data(r.type!=="violin"||r.box.visible?v2.identity:[]);k.enter().append("path").style("vector-effect",i?"none":"non-scaling-stroke").attr("class","box"),k.exit().remove(),k.each(function(E){if(E.empty)return DT.select(this).attr("d","M0,0Z");var T=s.c2l(E.pos+u,!0),L=s.l2p(T-b)+f,x=s.l2p(T+p)+f,C=l?(L+x)/2:s.l2p(T)+f,M=r.whiskerwidth,g=l?L*M+(1-M)*C:s.l2p(T-c)+f,P=l?x*M+(1-M)*C:s.l2p(T+c)+f,A=s.l2p(T-b*_)+f,z=s.l2p(T+p*_)+f,O=r.sizemode==="sd",U=o.c2p(O?E.mean-E.sd:E.q1,!0),G=O?o.c2p(E.mean+E.sd,!0):o.c2p(E.q3,!0),Z=v2.constrain(O?o.c2p(E.mean,!0):o.c2p(E.med,!0),Math.min(U,G)+1,Math.max(U,G)-1),j=E.lf===void 0||r.boxpoints===!1||O,N=o.c2p(j?E.min:E.lf,!0),H=o.c2p(j?E.max:E.uf,!0),re=o.c2p(E.ln,!0),oe=o.c2p(E.un,!0);a?DT.select(this).attr("d","M"+Z+","+A+"V"+z+"M"+U+","+L+"V"+x+(v?"H"+re+"L"+Z+","+z+"L"+oe+","+x:"")+"H"+G+"V"+L+(v?"H"+oe+"L"+Z+","+A+"L"+re+","+L:"")+"Z"+(d?"M"+U+","+C+"H"+N+"M"+G+","+C+"H"+H+(h===0?"":"M"+N+","+g+"V"+P+"M"+H+","+g+"V"+P):"")):DT.select(this).attr("d","M"+A+","+Z+"H"+z+"M"+L+","+U+"H"+x+(v?"V"+re+"L"+z+","+Z+"L"+x+","+oe:"")+"V"+G+"H"+L+(v?"V"+oe+"L"+A+","+Z+"L"+L+","+re:"")+"Z"+(d?"M"+C+","+U+"V"+N+"M"+C+","+G+"V"+H+(h===0?"":"M"+g+","+N+"H"+P+"M"+g+","+H+"H"+P):""))})}function q1e(e,t,r,n){var i=t.x,a=t.y,o=n.bdPos,s=n.bPos,l=r.boxpoints||r.points;v2.seedPseudoRandom();var u=function(h){return h.forEach(function(d){d.t=n,d.trace=r}),h},c=e.selectAll("g.points").data(l?u:[]);c.enter().append("g").attr("class","points"),c.exit().remove();var f=c.selectAll("path").data(function(h){var d,v=h.pts2,_=Math.max((h.max-h.min)/10,h.q3-h.q1),b=_*1e-9,p=_*G_t,k=[],E=0,T;if(r.jitter){if(_===0)for(E=1,k=new Array(v.length),d=0;dh.lo&&(P.so=!0)}return v});f.enter().append("path").classed("point",!0),f.exit().remove(),f.call(V_t.translatePoints,i,a)}function B1e(e,t,r,n){var i=t.val,a=t.pos,o=!!a.rangebreaks,s=n.bPos,l=n.bPosPxOffset||0,u=r.boxmean||(r.meanline||{}).visible,c,f;Array.isArray(n.bdPos)?(c=n.bdPos[0],f=n.bdPos[1]):(c=n.bdPos,f=n.bdPos);var h=e.selectAll("path.mean").data(r.type==="box"&&r.boxmean||r.type==="violin"&&r.box.visible&&r.meanline.visible?v2.identity:[]);h.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),h.exit().remove(),h.each(function(d){var v=a.c2l(d.pos+s,!0),_=a.l2p(v-c)+l,b=a.l2p(v+f)+l,p=o?(_+b)/2:a.l2p(v)+l,k=i.c2p(d.mean,!0),E=i.c2p(d.mean-d.sd,!0),T=i.c2p(d.mean+d.sd,!0);r.orientation==="h"?DT.select(this).attr("d","M"+k+","+_+"V"+b+(u==="sd"?"m0,0L"+E+","+p+"L"+k+","+_+"L"+T+","+p+"Z":"")):DT.select(this).attr("d","M"+_+","+k+"H"+b+(u==="sd"?"m0,0L"+p+","+E+"L"+_+","+k+"L"+p+","+T+"Z":""))})}N1e.exports={plot:H_t,plotBoxAndWhiskers:O1e,plotPoints:q1e,plotBoxMean:B1e}});var r8=ye((Tur,U1e)=>{"use strict";var UV=Oa(),VV=ka(),GV=So();function j_t(e,t,r){var n=r||UV.select(e).selectAll("g.trace.boxes");n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var a=UV.select(this),o=i[0].trace,s=o.line.width;function l(f,h,d,v){f.style("stroke-width",h+"px").call(VV.stroke,d).call(VV.fill,v)}var u=a.selectAll("path.box");if(o.type==="candlestick")u.each(function(f){if(!f.empty){var h=UV.select(this),d=o[f.dir];l(h,d.line.width,d.line.color,d.fillcolor),h.style("opacity",o.selectedpoints&&!f.selected?.3:1)}});else{l(u,s,o.line.color,o.fillcolor),a.selectAll("path.mean").style({"stroke-width":s,"stroke-dasharray":2*s+"px,"+s+"px"}).call(VV.stroke,o.line.color);var c=a.selectAll("path.point");GV.pointStyle(c,o,e)}})}function W_t(e,t,r){var n=t[0].trace,i=r.selectAll("path.point");n.selectedpoints?GV.selectedPointStyle(i,n):GV.pointStyle(i,n,e)}U1e.exports={style:j_t,styleOnSelect:W_t}});var jV=ye((Aur,j1e)=>{"use strict";var X_t=ho(),HV=Dr(),R_=vf(),V1e=ka(),Z_t=HV.fillText;function Y_t(e,t,r,n){var i=e.cd,a=i[0].trace,o=a.hoveron,s=[],l;return o.indexOf("boxes")!==-1&&(s=s.concat(G1e(e,t,r,n))),o.indexOf("points")!==-1&&(l=H1e(e,t,r)),n==="closest"?l?[l]:s:(l&&s.push(l),s)}function G1e(e,t,r,n){var i=e.cd,a=e.xa,o=e.ya,s=i[0].trace,l=i[0].t,u=s.type==="violin",c,f,h,d,v,_,b,p,k,E,T,L=l.bdPos,x,C,M=l.wHover,g=function(Pe){return h.c2l(Pe.pos)+l.bPos-h.c2l(_)};u&&s.side!=="both"?(s.side==="positive"&&(k=function(Pe){var me=g(Pe);return R_.inbox(me,me+M,E)},x=L,C=0),s.side==="negative"&&(k=function(Pe){var me=g(Pe);return R_.inbox(me-M,me,E)},x=0,C=L)):(k=function(Pe){var me=g(Pe);return R_.inbox(me-M,me+M,E)},x=C=L);var P;u?P=function(Pe){return R_.inbox(Pe.span[0]-v,Pe.span[1]-v,E)}:P=function(Pe){return R_.inbox(Pe.min-v,Pe.max-v,E)},s.orientation==="h"?(v=t,_=r,b=P,p=k,c="y",h=o,f="x",d=a):(v=r,_=t,b=k,p=P,c="x",h=a,f="y",d=o);var A=Math.min(1,L/Math.abs(h.r2c(h.range[1])-h.r2c(h.range[0])));E=e.maxHoverDistance-A,T=e.maxSpikeDistance-A;function z(Pe){return(b(Pe)+p(Pe))/2}var O=R_.getDistanceFunction(n,b,p,z);if(R_.getClosest(i,O,e),e.index===!1)return[];var U=i[e.index],G=s.line.color,Z=(s.marker||{}).color;V1e.opacity(G)&&s.line.width?e.color=G:V1e.opacity(Z)&&s.boxpoints?e.color=Z:e.color=s.fillcolor,e[c+"0"]=h.c2p(U.pos+l.bPos-C,!0),e[c+"1"]=h.c2p(U.pos+l.bPos+x,!0),e[c+"LabelVal"]=U.orig_p!==void 0?U.orig_p:U.pos;var j=c+"Spike";e.spikeDistance=z(U)*T/E,e[j]=h.c2p(U.pos,!0);var N=s.boxmean||s.sizemode==="sd"||(s.meanline||{}).visible,H=s.boxpoints||s.points,re=H&&N?["max","uf","q3","med","mean","q1","lf","min"]:H&&!N?["max","uf","q3","med","q1","lf","min"]:!H&&N?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],oe=d.range[1]{"use strict";W1e.exports=function(t,r){return r.hoverOnBox&&(t.hoverOnBox=r.hoverOnBox),"xVal"in r&&(t.x=r.xVal),"yVal"in r&&(t.y=r.yVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var WV=ye((Mur,Z1e)=>{"use strict";Z1e.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s,l;if(r===!1)for(s=0;s{"use strict";Y1e.exports={attributes:k4(),layoutAttributes:C4(),supplyDefaults:P4().supplyDefaults,crossTraceDefaults:P4().crossTraceDefaults,supplyLayoutDefaults:$I().supplyLayoutDefaults,calc:NV(),crossTraceCalc:e8().crossTraceCalc,plot:t8().plot,style:r8().style,styleOnSelect:r8().styleOnSelect,hoverPoints:jV().hoverPoints,eventData:X1e(),selectPoints:WV(),moduleType:"trace",name:"box",basePlotModule:mh(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}});var $1e=ye((kur,J1e)=>{"use strict";J1e.exports=K1e()});var FT=ye((Cur,e_e)=>{"use strict";var K_t=Tu(),{extendFlat:Pp}=Ao(),J_t=Gl(),{axisHoverFormat:XV}=df(),$_t=ec(),{hovertemplateAttrs:Q_t,templatefallbackAttrs:Q1e,texttemplateAttrs:ext}=Ll(),a0=pf();e_e.exports=Pp({z:{valType:"data_array",editType:"calc"},x:Pp({},a0.x,{impliedEdits:{xtype:"array"}}),x0:Pp({},a0.x0,{impliedEdits:{xtype:"scaled"}}),dx:Pp({},a0.dx,{impliedEdits:{xtype:"scaled"}}),y:Pp({},a0.y,{impliedEdits:{ytype:"array"}}),y0:Pp({},a0.y0,{impliedEdits:{ytype:"scaled"}}),dy:Pp({},a0.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:Pp({},a0.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:Pp({},a0.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:Pp({},a0.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:Pp({},a0.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:Pp({},a0.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:Pp({},a0.yperiodalignment,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},hovertext:{valType:"data_array",editType:"calc"},transpose:{valType:"boolean",dflt:!1,editType:"calc"},xtype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},ytype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},zsmooth:{valType:"enumerated",values:["fast","best",!1],dflt:!1,editType:"calc"},hoverongaps:{valType:"boolean",dflt:!0,editType:"none"},connectgaps:{valType:"boolean",editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},xhoverformat:XV("x"),yhoverformat:XV("y"),zhoverformat:XV("z",1),hovertemplate:Q_t(),hovertemplatefallback:Q1e(),texttemplate:ext({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),texttemplatefallback:Q1e({editType:"plot"}),textfont:$_t({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:Pp({},J_t.showlegend,{dflt:!1}),zorder:a0.zorder},K_t("",{cLetter:"z",autoColorDflt:!1}))});var n8=ye((Lur,r_e)=>{"use strict";var txt=Eo(),i8=Dr(),rxt=qa();r_e.exports=function(t,r,n,i,a,o){var s=n("z");a=a||"x",o=o||"y";var l,u;if(s===void 0||!s.length)return 0;if(i8.isArray1D(s)){l=n(a),u=n(o);var c=i8.minRowLength(l),f=i8.minRowLength(u);if(c===0||f===0)return 0;r._length=Math.min(c,f,s.length)}else{if(l=t_e(a,n),u=t_e(o,n),!ixt(s))return 0;n("transpose"),r._length=null}var h=rxt.getComponentMethod("calendars","handleTraceDefaults");return h(t,r,[a,o],i),!0};function t_e(e,t){var r=t(e),n=r?t(e+"type","array"):"scaled";return n==="scaled"&&(t(e+"0"),t("d"+e)),r}function ixt(e){for(var t=!0,r=!1,n=!1,i,a=0;a0&&(r=!0);for(var o=0;o{"use strict";var i_e=Dr();n_e.exports=function(t,r){t("texttemplate"),t("texttemplatefallback");var n=i_e.extendFlat({},r.font,{color:"auto",size:"auto"});i_e.coerceFont(t,"textfont",n)}});var ZV=ye((Iur,a_e)=>{"use strict";a_e.exports=function(t,r,n){var i=n("zsmooth");i===!1&&(n("xgap"),n("ygap")),n("zhoverformat")}});var l_e=ye((Rur,s_e)=>{"use strict";var o_e=Dr(),nxt=n8(),axt=I4(),oxt=Dg(),sxt=ZV(),lxt=td(),uxt=FT();s_e.exports=function(t,r,n,i){function a(s,l){return o_e.coerce(t,r,uxt,s,l)}var o=nxt(t,r,a,i);if(!o){r.visible=!1;return}oxt(t,r,i,a),a("xhoverformat"),a("yhoverformat"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),axt(a,i),sxt(t,r,a,i),a("hoverongaps"),a("connectgaps",o_e.isArray1D(r.z)&&r.zsmooth!==!1),lxt(t,r,i,a,{prefix:"",cLetter:"z"}),a("zorder")}});var YV=ye((Dur,u_e)=>{"use strict";var zT=Eo();u_e.exports={count:function(e,t,r){return r[e]++,1},sum:function(e,t,r,n){var i=n[t];return zT(i)?(i=Number(i),r[e]+=i,i):0},avg:function(e,t,r,n,i){var a=n[t];return zT(a)&&(a=Number(a),r[e]+=a,i[e]++),0},min:function(e,t,r,n){var i=n[t];if(zT(i))if(i=Number(i),zT(r[e])){if(r[e]>i){var a=i-r[e];return r[e]=i,a}}else return r[e]=i,i;return 0},max:function(e,t,r,n){var i=n[t];if(zT(i))if(i=Number(i),zT(r[e])){if(r[e]{"use strict";c_e.exports={percent:function(e,t){for(var r=e.length,n=100/t,i=0;i{"use strict";f_e.exports=function(t,r){for(var n=t.length,i=0,a=0;a{"use strict";var OT=fs(),p2=OT.ONEAVGYEAR,h_e=OT.ONEAVGMONTH,o8=OT.ONEDAY,d_e=OT.ONEHOUR,v_e=OT.ONEMIN,p_e=OT.ONESEC,g_e=ho().tickIncrement;__e.exports=function(t,r,n,i,a){var o=-1.1*r,s=-.1*r,l=t-s,u=n[0],c=n[1],f=Math.min(a8(u+s,u+l,i,a),a8(c+s,c+l,i,a)),h=Math.min(a8(u+o,u+s,i,a),a8(c+o,c+s,i,a)),d,v;if(f>h&&ho8){var _=d===p2?1:6,b=d===p2?"M12":"M1";return function(p,k){var E=i.c2d(p,p2,a),T=E.indexOf("-",_);T>0&&(E=E.slice(0,T));var L=i.d2c(E,0,a);if(Lp_e?e>o8?e>p2*1.1?p2:e>h_e*1.1?h_e:o8:e>d_e?d_e:e>v_e?v_e:p_e:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function cxt(e,t,r,n,i,a){if(n&&e>o8){var o=y_e(t,i,a),s=y_e(r,i,a),l=e===p2?0:1;return o[l]!==s[l]}return Math.floor(r/e)-Math.floor(t/e)>.1}function y_e(e,t,r){var n=t.c2d(e,p2,r).split("-");return n[0]===""&&(n.unshift(),n[0]="-"+n[0]),n}});var tG=ye((qur,A_e)=>{"use strict";var QV=Eo(),Hv=Dr(),x_e=qa(),j0=ho(),{hasColorscale:b_e}=pv(),w_e=gv(),fxt=A4(),T_e=YV(),hxt=KV(),dxt=JV(),vxt=$V();function pxt(e,t){var r=[],n=[],i=t.orientation==="h",a=j0.getFromId(e,i?t.yaxis:t.xaxis),o=i?"y":"x",s={x:"y",y:"x"}[o],l=t[o+"calendar"],u=t.cumulative,c,f=eG(e,t,a,o),h=f[0],d=f[1],v=typeof h.size=="string",_=[],b=v?_:h,p=[],k=[],E=[],T=0,L=t.histnorm,x=t.histfunc,C=L.indexOf("density")!==-1,M,g,P;u.enabled&&C&&(L=L.replace(/ ?density$/,""),C=!1);var A=x==="max"||x==="min",z=A?null:0,O=T_e.count,U=hxt[L],G=!1,Z=function(me){return a.r2c(me,0,l)},j;for(Hv.isArrayOrTypedArray(t[s])&&x!=="count"&&(j=t[s],G=x==="avg",O=T_e[x]),c=Z(h.start),g=Z(h.end)+(c-j0.tickIncrement(c,h.size,!1,l))/1e6;c=0&&P=Ae;c--)if(n[c]){Be=c;break}for(c=Ae;c<=Be;c++)if(QV(r[c])&&QV(n[c])){var Pe={p:r[c],s:n[c],b:0};u.enabled||(Pe.pts=E[c],oe?Pe.ph0=Pe.ph1=E[c].length?d[E[c][0]]:r[c]:(t._computePh=!0,Pe.ph0=ie(_[c]),Pe.ph1=ie(_[c+1],!0))),Ee.push(Pe)}return Ee.length===1&&(Ee[0].width1=j0.tickIncrement(Ee[0].p,h.size,!1,l)-Ee[0].p),b_e(t,"marker")&&w_e(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),b_e(t,"marker.line")&&w_e(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}),fxt(Ee,t),Hv.isArrayOrTypedArray(t.selectedpoints)&&Hv.tagSelected(Ee,t,Le),Ee}function eG(e,t,r,n,i){var a=n+"bins",o=e._fullLayout,s=t["_"+n+"bingroup"],l=o._histogramBinOpts[s],u=o.barmode==="overlay",c,f,h,d,v,_,b,p=function(ge){return r.r2c(ge,0,d)},k=function(ge){return r.c2r(ge,0,d)},E=r.type==="date"?function(ge){return ge||ge===0?Hv.cleanDate(ge,null,d):null}:function(ge){return QV(ge)?Number(ge):null};function T(ge,ie,Se){ie[ge+"Found"]?(ie[ge]=E(ie[ge]),ie[ge]===null&&(ie[ge]=Se[ge])):(_[ge]=ie[ge]=Se[ge],Hv.nestedProperty(f[0],a+"."+ge).set(Se[ge]))}if(t["_"+n+"autoBinFinished"])delete t["_"+n+"autoBinFinished"];else{f=l.traces;var L=[],x=!0,C=!1,M=!1;for(c=0;cr.r2l(j)&&(H=j0.tickIncrement(H,l.size,!0,d)),O.start=r.l2r(H),Z||Hv.nestedProperty(t,a+".start").set(O.start)}var re=l.end,oe=r.r2l(z.end),_e=oe!==void 0;if((l.endFound||_e)&&oe!==r.r2l(re)){var Ce=_e?oe:Hv.aggNums(Math.max,null,v);O.end=r.l2r(Ce),_e||Hv.nestedProperty(t,a+".start").set(O.end)}var Le="autobin"+n;return t._input[Le]===!1&&(t._input[a]=Hv.extendFlat({},t[a]||{}),delete t._input[Le],delete t[Le]),[O,v]}function gxt(e,t,r,n,i){var a=e._fullLayout,o=mxt(e,t),s=!1,l=1/0,u=[t],c,f,h;for(c=0;c=0;n--)s(n);else if(t==="increasing"){for(n=1;n=0;n--)e[n]+=e[n+1];r==="exclude"&&(e.push(0),e.shift())}}A_e.exports={calc:pxt,calcAllAutoBins:eG}});var I_e=ye((Bur,P_e)=>{"use strict";var S_e=Dr(),qT=ho(),M_e=YV(),_xt=KV(),xxt=JV(),bxt=$V(),E_e=tG().calcAllAutoBins;P_e.exports=function(t,r){var n=qT.getFromId(t,r.xaxis),i=qT.getFromId(t,r.yaxis),a=r.xcalendar,o=r.ycalendar,s=function(It){return n.r2c(It,0,a)},l=function(It){return i.r2c(It,0,o)},u=function(It){return n.c2r(It,0,a)},c=function(It){return i.c2r(It,0,o)},f,h,d,v,_=E_e(t,r,n,"x"),b=_[0],p=_[1],k=E_e(t,r,i,"y"),E=k[0],T=k[1],L=r._length;p.length>L&&p.splice(L,p.length-L),T.length>L&&T.splice(L,T.length-L);var x=[],C=[],M=[],g=typeof b.size=="string",P=typeof E.size=="string",A=[],z=[],O=g?A:b,U=P?z:E,G=0,Z=[],j=[],N=r.histnorm,H=r.histfunc,re=N.indexOf("density")!==-1,oe=H==="max"||H==="min",_e=oe?null:0,Ce=M_e.count,Le=_xt[N],ge=!1,ie=[],Se=[],Ee="z"in r?r.z:"marker"in r&&Array.isArray(r.marker.color)?r.marker.color:"";Ee&&H!=="count"&&(ge=H==="avg",Ce=M_e[H]);var Ae=b.size,Be=s(b.start),Pe=s(b.end)+(Be-qT.tickIncrement(Be,Ae,!1,a))/1e6;for(f=Be;f=0&&d=0&&v{"use strict";var qm=Dr(),R_e=fs().BADNUM,D_e=zg();F_e.exports=function(t,r,n,i,a,o){var s=t._length,l=r.makeCalcdata(t,i),u=n.makeCalcdata(t,a);l=D_e(t,r,i,l).vals,u=D_e(t,n,a,u).vals;var c=t.text,f=c!==void 0&&qm.isArray1D(c),h=t.hovertext,d=h!==void 0&&qm.isArray1D(h),v,_,b=qm.distinctVals(l),p=b.vals,k=qm.distinctVals(u),E=k.vals,T=[],L,x,C=E.length,M=p.length;for(v=0;v{"use strict";var wxt=Eo(),Txt=Dr(),l8=fs().BADNUM;z_e.exports=function(t,r,n,i){var a,o,s,l,u,c;function f(p){if(wxt(p))return+p}if(r&&r.transpose){for(a=0,u=0;u{"use strict";var Axt=Dr(),O_e=.01,Sxt=[[-1,0],[1,0],[0,-1],[0,1]];function Mxt(e){return .5-.25*Math.min(1,e*.5)}B_e.exports=function(t,r){var n=1,i;for(q_e(t,r),i=0;iO_e;i++)n=q_e(t,r,Mxt(n));return n>O_e&&Axt.log("interp2d didn't converge quickly",n),t};function q_e(e,t,r){var n=0,i,a,o,s,l,u,c,f,h,d,v,_,b;for(s=0;s_&&(n=Math.max(n,Math.abs(e[a][o]-v)/(b-_))))}return n}});var f8=ye((Gur,N_e)=>{"use strict";var Ext=Dr().maxRowLength;N_e.exports=function(t){var r=[],n={},i=[],a=t[0],o=[],s=[0,0,0],l=Ext(t),u,c,f,h,d,v,_,b;for(c=0;c=0;d--)h=i[d],c=h[0],f=h[1],v=((n[[c-1,f]]||s)[2]+(n[[c+1,f]]||s)[2]+(n[[c,f-1]]||s)[2]+(n[[c,f+1]]||s)[2])/20,v&&(_[h]=[c,f,v],i.splice(d,1),b=!0);if(!b)throw"findEmpties iterated with no new neighbors";for(h in _)n[h]=_[h],r.push(_[h])}return r.sort(function(p,k){return k[2]-p[2]})}});var rG=ye((Hur,G_e)=>{"use strict";var U_e=qa(),V_e=Dr().isArrayOrTypedArray;G_e.exports=function(t,r,n,i,a,o){var s=[],l=U_e.traceIs(t,"contour"),u=U_e.traceIs(t,"histogram"),c,f,h,d=V_e(r)&&r.length>1;if(d&&!u&&o.type!=="category"){var v=r.length;if(v<=a){if(l)s=Array.from(r).slice(0,a);else if(a===1)o.type==="log"?s=[.5*r[0],2*r[0]]:s=[r[0]-.5,r[0]+.5];else if(o.type==="log"){for(s=[Math.pow(r[0],1.5)/Math.pow(r[1],.5)],h=1;h{"use strict";var H_e=qa(),iG=Dr(),h8=ho(),j_e=zg(),kxt=I_e(),Cxt=gv(),Lxt=s8(),Pxt=u8(),Ixt=c8(),Rxt=f8(),d8=rG(),nG=fs().BADNUM;X_e.exports=function(t,r){var n=h8.getFromId(t,r.xaxis||"x"),i=h8.getFromId(t,r.yaxis||"y"),a=H_e.traceIs(r,"contour"),o=H_e.traceIs(r,"histogram"),s=a?"best":r.zsmooth,l,u,c,f,h,d,v,_,b,p,k;if(n._minDtick=0,i._minDtick=0,o)k=kxt(t,r),f=k.orig_x,l=k.x,u=k.x0,c=k.dx,_=k.orig_y,h=k.y,d=k.y0,v=k.dy,b=k.z;else{var E=r.z;iG.isArray1D(E)?(Lxt(r,n,i,"x","y",["z"]),l=r._x,h=r._y,E=r._z):(f=r.x?n.makeCalcdata(r,"x"):[],_=r.y?i.makeCalcdata(r,"y"):[],l=j_e(r,n,"x",f).vals,h=j_e(r,i,"y",_).vals,r._x=l,r._y=h),u=r.x0,c=r.dx,d=r.y0,v=r.dy,b=Pxt(E,r,n,i)}(n.rangebreaks||i.rangebreaks)&&(b=Dxt(l,h,b),o||(l=W_e(l),h=W_e(h),r._x=l,r._y=h)),!o&&(a||r.connectgaps)&&(r._emptypoints=Rxt(b),Ixt(b,r._emptypoints));function T(O){s=r._input.zsmooth=r.zsmooth=!1,iG.warn('cannot use zsmooth: "fast": '+O)}function L(O){if(O.length>1){var U=(O[O.length-1]-O[0])/(O.length-1),G=Math.abs(U/100);for(p=0;pG)return!1}return!0}r._islinear=!1,n.type==="log"||i.type==="log"?s==="fast"&&T("log axis found"):L(l)?L(h)?r._islinear=!0:s==="fast"&&T("y scale is not linear"):s==="fast"&&T("x scale is not linear");var x=iG.maxRowLength(b),C=r.xtype==="scaled"?"":l,M=d8(r,C,u,c,x,n),g=r.ytype==="scaled"?"":h,P=d8(r,g,d,v,b.length,i);r._extremes[n._id]=h8.findExtremes(n,M),r._extremes[i._id]=h8.findExtremes(i,P);var A={x:M,y:P,z:b,text:r._text||r.text,hovertext:r._hovertext||r.hovertext};if(r.xperiodalignment&&f&&(A.orig_x=f),r.yperiodalignment&&_&&(A.orig_y=_),C&&C.length===M.length-1&&(A.xCenter=C),g&&g.length===P.length-1&&(A.yCenter=g),o&&(A.xRanges=k.xRanges,A.yRanges=k.yRanges,A.pts=k.pts),a||Cxt(t,r,{vals:b,cLetter:"z"}),a&&r.contours&&r.contours.coloring==="heatmap"){var z={type:r.type==="contour"?"heatmap":"histogram2d",xcalendar:r.xcalendar,ycalendar:r.ycalendar};A.xfill=d8(z,C,u,c,x,n),A.yfill=d8(z,g,d,v,b.length,i)}return[A]};function W_e(e){for(var t=[],r=e.length,n=0;n{"use strict";p8.CSS_DECLARATIONS=[["image-rendering","optimizeSpeed"],["image-rendering","-moz-crisp-edges"],["image-rendering","-o-crisp-edges"],["image-rendering","-webkit-optimize-contrast"],["image-rendering","optimize-contrast"],["image-rendering","crisp-edges"],["image-rendering","pixelated"]];p8.STYLE=p8.CSS_DECLARATIONS.map(function(e){return e.join(": ")+"; "}).join("")});var oG=ye((Xur,Y_e)=>{"use strict";var Z_e=g8(),Fxt=So(),aG=Dr(),BT=null;function zxt(){if(BT!==null)return BT;BT=!1;var e=aG.isSafari()||aG.isMacWKWebView()||aG.isIOS();if(window.navigator.userAgent&&!e){var t=Array.from(Z_e.CSS_DECLARATIONS).reverse(),r=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof r=="function")BT=t.some(function(o){return r.apply(null,o)});else{var n=Fxt.tester.append("image").attr("style",Z_e.STYLE),i=window.getComputedStyle(n.node()),a=i.imageRendering;BT=t.some(function(o){var s=o[1];return a===s||a===s.toLowerCase()}),n.remove()}}return BT}Y_e.exports=zxt});var m8=ye((Zur,nxe)=>{"use strict";var K_e=Oa(),Oxt=fd(),qxt=qa(),Bxt=So(),Nxt=ho(),W0=Dr(),J_e=Zl(),Uxt=lI(),Vxt=ka(),Gxt=tc().extractOpts,Hxt=tc().makeColorScaleFuncFromTrace,jxt=Wp(),Wxt=Dh(),sG=Wxt.LINE_SPACING,Xxt=oG(),Zxt=g8().STYLE,rxe="heatmap-label";function ixe(e){return e.selectAll("g."+rxe)}function $_e(e){ixe(e).remove()}nxe.exports=function(e,t,r,n){var i=t.xaxis,a=t.yaxis;W0.makeTraceGroups(n,r,"hm").each(function(o){var s=K_e.select(this),l=o[0],u=l.trace,c=u.xgap||0,f=u.ygap||0,h=l.z,d=l.x,v=l.y,_=l.xCenter,b=l.yCenter,p=qxt.traceIs(u,"contour"),k=p?"best":u.zsmooth,E=h.length,T=W0.maxRowLength(h),L=!1,x=!1,C,M,g,P,A,z,O,U;for(z=0;C===void 0&&z0;)M=i.c2p(d[z]),z--;for(M0;)A=a.c2p(v[z]),z--;A=i._length||M<=0||P>=a._length||A<=0;if(H){var re=s.selectAll("image").data([]);re.exit().remove(),$_e(s);return}var oe,_e;G==="fast"?(oe=T,_e=E):(oe=j,_e=N);var Ce=document.createElement("canvas");Ce.width=oe,Ce.height=_e;var Le=Ce.getContext("2d",{willReadFrequently:!0}),ge=Hxt(u,{noNumericCheck:!0,returnArray:!0}),ie,Se;G==="fast"?(ie=L?function(fn){return T-1-fn}:W0.identity,Se=x?function(fn){return E-1-fn}:W0.identity):(ie=function(fn){return W0.constrain(Math.round(i.c2p(d[fn])-C),0,j)},Se=function(fn){return W0.constrain(Math.round(a.c2p(v[fn])-P),0,N)});var Ee=Se(0),Ae=[Ee,Ee],Be=L?0:1,Pe=x?0:1,me=0,De=0,ce=0,je=0,lt,pt,Vt,ot,ut;function Wt(fn,yn){if(fn!==void 0){var Sn=ge(fn);return Sn[0]=Math.round(Sn[0]),Sn[1]=Math.round(Sn[1]),Sn[2]=Math.round(Sn[2]),me+=yn,De+=Sn[0]*yn,ce+=Sn[1]*yn,je+=Sn[2]*yn,Sn}return[0,0,0,0]}function Nt(fn,yn,Sn,Ba){var ua=fn[Sn.bin0];if(ua===void 0)return Wt(void 0,1);var ma=fn[Sn.bin1],Wa=yn[Sn.bin0],Fa=yn[Sn.bin1],Xo=ma-ua||0,da=Wa-ua||0,Wn;return ma===void 0?Fa===void 0?Wn=0:Wa===void 0?Wn=2*(Fa-ua):Wn=(2*Fa-Wa-ua)*2/3:Fa===void 0?Wa===void 0?Wn=0:Wn=(2*ua-ma-Wa)*2/3:Wa===void 0?Wn=(2*Fa-ma-ua)*2/3:Wn=Fa+ua-ma-Wa,Wt(ua+Sn.frac*Xo+Ba.frac*(da+Sn.frac*Wn))}if(G!=="default"){var $t=0,sr;try{sr=new Uint8Array(oe*_e*4)}catch(fn){sr=new Array(oe*_e*4)}if(G==="smooth"){var Tr=_||d,fr=b||v,$e=new Array(Tr.length),St=new Array(fr.length),Qt=new Array(j),Gt=_?exe:Q_e,_t=b?exe:Q_e,It,mt,er;for(z=0;zvr||vr>a._length))for(O=ke;Opi||pi>i._length)){var $r=Uxt({x:ii,y:ar},u,e._fullLayout);$r.x=ii,$r.y=ar;var di=l.z[z][O];di===void 0?($r.z="",$r.zLabel=""):($r.z=di,$r.zLabel=Nxt.tickText(We,di,"hover").text);var ji=l.text&&l.text[z]&&l.text[z][O];(ji===void 0||ji===!1)&&(ji=""),$r.text=ji;var In=W0.texttemplateString({data:[$r,u._meta],fallback:u.texttemplatefallback,labels:$r,locale:e._fullLayout._d3locale,template:Ge});if(In){var wi=In.split("
"),On=wi.length,qn=0;for(U=0;U{"use strict";axe.exports={min:"zmin",max:"zmax"}});var y8=ye((Kur,oxe)=>{"use strict";var Yxt=Oa();oxe.exports=function(t){Yxt.select(t).selectAll(".hm image").style("opacity",function(r){return r.trace.opacity})}});var x8=ye((Jur,lxe)=>{"use strict";var sxe=vf(),R4=Dr(),_8=R4.isArrayOrTypedArray,Kxt=ho(),Jxt=tc().extractOpts;lxe.exports=function(t,r,n,i,a){a||(a={});var o=a.isContour,s=t.cd[0],l=s.trace,u=t.xa,c=t.ya,f=s.x,h=s.y,d=s.z,v=s.xCenter,_=s.yCenter,b=s.zmask,p=l.zhoverformat,k=f,E=h,T,L,x,C;if(t.index!==!1){try{x=Math.round(t.index[1]),C=Math.round(t.index[0])}catch(re){R4.error("Error hovering on heatmap, pointNumber must be [row,col], found:",t.index);return}if(x<0||x>=d[0].length||C<0||C>d.length)return}else{if(sxe.inbox(r-f[0],r-f[f.length-1],0)>0||sxe.inbox(n-h[0],n-h[h.length-1],0)>0)return;if(o){var M;for(k=[2*f[0]-f[1]],M=1;M{"use strict";uxe.exports={attributes:FT(),supplyDefaults:l_e(),calc:v8(),plot:m8(),colorbar:D_(),style:y8(),hoverPoints:x8(),moduleType:"trace",name:"heatmap",basePlotModule:mh(),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}});var hxe=ye((Qur,fxe)=>{"use strict";fxe.exports=cxe()});var lG=ye((ecr,dxe)=>{"use strict";dxe.exports=function(t,r){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}});var pxe=ye((tcr,vxe)=>{"use strict";vxe.exports={eventDataKeys:["binNumber"]}});var b8=ye((rcr,_xe)=>{"use strict";var Ip=zm(),gxe=df().axisHoverFormat,{hovertemplateAttrs:$xt,texttemplateAttrs:Qxt,templatefallbackAttrs:mxe}=Ll(),uG=ec(),yxe=lG(),ebt=pxe(),cG=Ao().extendFlat;_xe.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:gxe("x"),yhoverformat:gxe("y"),text:cG({},Ip.text,{}),hovertext:cG({},Ip.hovertext,{}),orientation:Ip.orientation,histfunc:{valType:"enumerated",values:["count","sum","avg","min","max"],dflt:"count",editType:"calc"},histnorm:{valType:"enumerated",values:["","percent","probability","density","probability density"],dflt:"",editType:"calc"},cumulative:{enabled:{valType:"boolean",dflt:!1,editType:"calc"},direction:{valType:"enumerated",values:["increasing","decreasing"],dflt:"increasing",editType:"calc"},currentbin:{valType:"enumerated",values:["include","exclude","half"],dflt:"include",editType:"calc"},editType:"calc"},nbinsx:{valType:"integer",min:0,dflt:0,editType:"calc"},xbins:yxe("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:yxe("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:$xt({},{keys:ebt.eventDataKeys}),hovertemplatefallback:mxe(),texttemplate:Qxt({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),texttemplatefallback:mxe({editType:"plot"}),textposition:cG({},Ip.textposition,{arrayOk:!1}),textfont:uG({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:uG({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:uG({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:Ip.insidetextanchor,textangle:Ip.textangle,cliponaxis:Ip.cliponaxis,constraintext:Ip.constraintext,marker:Ip.marker,offsetgroup:Ip.offsetgroup,alignmentgroup:Ip.alignmentgroup,selected:Ip.selected,unselected:Ip.unselected,zorder:Ip.zorder}});var Txe=ye((icr,wxe)=>{"use strict";var xxe=qa(),D4=Dr(),bxe=ka(),tbt=i0().handleText,rbt=WI(),ibt=b8();wxe.exports=function(t,r,n,i){function a(k,E){return D4.coerce(t,r,ibt,k,E)}var o=a("x"),s=a("y"),l=a("cumulative.enabled");l&&(a("cumulative.direction"),a("cumulative.currentbin")),a("text");var u=a("textposition");tbt(t,r,i,a,u,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat");var c=a("orientation",s&&!o?"h":"v"),f=c==="v"?"x":"y",h=c==="v"?"y":"x",d=o&&s?Math.min(D4.minRowLength(o)&&D4.minRowLength(s)):D4.minRowLength(r[f]||[]);if(!d){r.visible=!1;return}r._length=d;var v=xxe.getComponentMethod("calendars","handleTraceDefaults");v(t,r,["x","y"],i);var _=r[h];_&&a("histfunc"),a("histnorm"),a("autobin"+f),rbt(t,r,a,n,i),D4.coerceSelectionMarkerOpacity(r,a);var b=(r.marker.line||{}).color,p=xxe.getComponentMethod("errorbars","supplyDefaults");p(t,r,b||bxe.defaultLine,{axis:"y"}),p(t,r,b||bxe.defaultLine,{axis:"x",inherit:"y"}),a("zorder")}});var T8=ye((ncr,Mxe)=>{"use strict";var F4=Dr(),nbt=hf(),w8=qa().traceIs,abt=e2(),obt=i0().validateCornerradius,Axe=F4.nestedProperty,fG=Kb().getAxisGroup,Sxe=[{aStr:{x:"xbins.start",y:"ybins.start"},name:"start"},{aStr:{x:"xbins.end",y:"ybins.end"},name:"end"},{aStr:{x:"xbins.size",y:"ybins.size"},name:"size"},{aStr:{x:"nbinsx",y:"nbinsy"},name:"nbins"}],sbt=["x","y"];Mxe.exports=function(t,r){var n=r._histogramBinOpts={},i=[],a={},o=[],s,l,u,c,f,h,d;function v(G,Z){return F4.coerce(s._input,s,s._module.attributes,G,Z)}function _(G){return G.orientation==="v"?"x":"y"}function b(G,Z){var j=nbt.getFromTrace({_fullLayout:r},G,Z);return j.type}function p(G,Z,j){var N=G.uid+"__"+j;Z||(Z=N);var H=b(G,j),re=G[j+"calendar"]||"",oe=n[Z],_e=!0;oe&&(H===oe.axType&&re===oe.calendar?(_e=!1,oe.traces.push(G),oe.dirs.push(j)):(Z=N,H!==oe.axType&&F4.warn(["Attempted to group the bins of trace",G.index,"set on a","type:"+H,"axis","with bins on","type:"+oe.axType,"axis."].join(" ")),re!==oe.calendar&&F4.warn(["Attempted to group the bins of trace",G.index,"set with a",re,"calendar","with bins",oe.calendar?"on a "+oe.calendar+" calendar":"w/o a set calendar"].join(" ")))),_e&&(n[Z]={traces:[G],dirs:[j],axType:H,calendar:G[j+"calendar"]||""}),G["_"+j+"bingroup"]=Z}for(f=0;f{"use strict";var lbt=PT().hoverPoints,ubt=ho().hoverLabelText;Exe.exports=function(t,r,n,i,a){var o=lbt(t,r,n,i,a);if(o){t=o[0];var s=t.cd[t.index],l=t.cd[0].trace;if(!l.cumulative.enabled){var u=l.orientation==="h"?"y":"x";t[u+"Label"]=ubt(t[u+"a"],[s.ph0,s.ph1],l[u+"hoverformat"])}return o}}});var hG=ye((ocr,Cxe)=>{"use strict";Cxe.exports=function(t,r,n,i,a){if(t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"zLabelVal"in r&&(t.z=r.zLabelVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),!(n.cumulative||{}).enabled){var o=Array.isArray(a)?i[0].pts[a[0]][a[1]]:i[a].pts;t.pointNumbers=o,t.binNumber=t.pointNumber,delete t.pointNumber,delete t.pointIndex;var s;if(n._indexToPoints){s=[];for(var l=0;l{"use strict";Lxe.exports={attributes:b8(),layoutAttributes:jI(),supplyDefaults:Txe(),crossTraceDefaults:T8(),supplyLayoutDefaults:IV(),calc:tG().calc,crossTraceCalc:t2().crossTraceCalc,plot:d2().plot,layerName:"barlayer",style:V0().style,styleOnSelect:V0().styleOnSelect,colorbar:$d(),hoverPoints:kxe(),selectPoints:IT(),eventData:hG(),moduleType:"trace",name:"histogram",basePlotModule:mh(),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}});var Rxe=ye((lcr,Ixe)=>{"use strict";Ixe.exports=Pxe()});var S8=ye((ucr,zxe)=>{"use strict";var jg=b8(),Dxe=lG(),A8=FT(),cbt=Gl(),dG=df().axisHoverFormat,{hovertemplateAttrs:fbt,texttemplateAttrs:hbt,templatefallbackAttrs:Fxe}=Ll(),dbt=Tu(),z4=Ao().extendFlat;zxe.exports=z4({x:jg.x,y:jg.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:jg.histnorm,histfunc:jg.histfunc,nbinsx:jg.nbinsx,xbins:Dxe("x"),nbinsy:jg.nbinsy,ybins:Dxe("y"),autobinx:jg.autobinx,autobiny:jg.autobiny,bingroup:z4({},jg.bingroup,{}),xbingroup:z4({},jg.bingroup,{}),ybingroup:z4({},jg.bingroup,{}),xgap:A8.xgap,ygap:A8.ygap,zsmooth:A8.zsmooth,xhoverformat:dG("x"),yhoverformat:dG("y"),zhoverformat:dG("z",1),hovertemplate:fbt({},{keys:["z"]}),hovertemplatefallback:Fxe(),texttemplate:hbt({arrayOk:!1,editType:"plot"},{keys:["z"]}),texttemplatefallback:Fxe({editType:"plot"}),textfont:A8.textfont,showlegend:z4({},cbt.showlegend,{dflt:!1})},dbt("",{cLetter:"z",autoColorDflt:!1}))});var vG=ye((ccr,qxe)=>{"use strict";var vbt=qa(),Oxe=Dr();qxe.exports=function(t,r,n,i){var a=n("x"),o=n("y"),s=Oxe.minRowLength(a),l=Oxe.minRowLength(o);if(!s||!l){r.visible=!1;return}r._length=Math.min(s,l);var u=vbt.getComponentMethod("calendars","handleTraceDefaults");u(t,r,["x","y"],i);var c=n("z")||n("marker.color");c&&n("histfunc"),n("histnorm"),n("autobinx"),n("autobiny")}});var Nxe=ye((fcr,Bxe)=>{"use strict";var pbt=Dr(),gbt=vG(),mbt=ZV(),ybt=td(),_bt=I4(),xbt=S8();Bxe.exports=function(t,r,n,i){function a(o,s){return pbt.coerce(t,r,xbt,o,s)}gbt(t,r,a,i),r.visible!==!1&&(mbt(t,r,a,i),ybt(t,r,i,a,{prefix:"",cLetter:"z"}),a("hovertemplate"),a("hovertemplatefallback"),_bt(a,i),a("xhoverformat"),a("yhoverformat"))}});var Gxe=ye((hcr,Vxe)=>{"use strict";var bbt=x8(),Uxe=ho().hoverLabelText;Vxe.exports=function(t,r,n,i,a){var o=bbt(t,r,n,i,a);if(o){t=o[0];var s=t.index,l=s[0],u=s[1],c=t.cd[0],f=c.trace,h=c.xRanges[u],d=c.yRanges[l];return t.xLabel=Uxe(t.xa,[h[0],h[1]],f.xhoverformat),t.yLabel=Uxe(t.ya,[d[0],d[1]],f.yhoverformat),o}}});var jxe=ye((dcr,Hxe)=>{"use strict";Hxe.exports={attributes:S8(),supplyDefaults:Nxe(),crossTraceDefaults:T8(),calc:v8(),plot:m8(),layerName:"heatmaplayer",colorbar:D_(),style:y8(),hoverPoints:Gxe(),eventData:hG(),moduleType:"trace",name:"histogram2d",basePlotModule:mh(),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}});var Xxe=ye((vcr,Wxe)=>{"use strict";Wxe.exports=jxe()});var M8=ye((pcr,Zxe)=>{"use strict";Zxe.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}});var O4=ye((gcr,$xe)=>{"use strict";var _h=FT(),E8=pf(),Kxe=df(),pG=Kxe.axisHoverFormat,wbt=Kxe.descriptionOnlyNumbers,Tbt=Tu(),Abt=Pd().dash,Sbt=ec(),NT=Ao().extendFlat,Jxe=M8(),Mbt=Jxe.COMPARISON_OPS2,Ebt=Jxe.INTERVAL_OPS,Yxe=E8.line;$xe.exports=NT({z:_h.z,x:_h.x,x0:_h.x0,dx:_h.dx,y:_h.y,y0:_h.y0,dy:_h.dy,xperiod:_h.xperiod,yperiod:_h.yperiod,xperiod0:E8.xperiod0,yperiod0:E8.yperiod0,xperiodalignment:_h.xperiodalignment,yperiodalignment:_h.yperiodalignment,text:_h.text,hovertext:_h.hovertext,transpose:_h.transpose,xtype:_h.xtype,ytype:_h.ytype,xhoverformat:pG("x"),yhoverformat:pG("y"),zhoverformat:pG("z",1),hovertemplate:_h.hovertemplate,hovertemplatefallback:_h.hovertemplatefallback,texttemplate:NT({},_h.texttemplate,{}),texttemplatefallback:_h.texttemplatefallback,textfont:NT({},_h.textfont,{}),hoverongaps:_h.hoverongaps,connectgaps:NT({},_h.connectgaps,{}),fillcolor:{valType:"color",editType:"calc"},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0}},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc"},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc"},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1}},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc"},showlines:{valType:"boolean",dflt:!0,editType:"plot"},showlabels:{valType:"boolean",dflt:!1,editType:"plot"},labelfont:Sbt({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:wbt("contour label")},operation:{valType:"enumerated",values:[].concat(Mbt).concat(Ebt),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:NT({},Yxe.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:Abt,smoothing:NT({},Yxe.smoothing,{}),editType:"plot"},zorder:E8.zorder},Tbt("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))});var mG=ye((mcr,ebe)=>{"use strict";var wv=S8(),Bm=O4(),kbt=Tu(),gG=df().axisHoverFormat,Qxe=Ao().extendFlat;ebe.exports=Qxe({x:wv.x,y:wv.y,z:wv.z,marker:wv.marker,histnorm:wv.histnorm,histfunc:wv.histfunc,nbinsx:wv.nbinsx,xbins:wv.xbins,nbinsy:wv.nbinsy,ybins:wv.ybins,autobinx:wv.autobinx,autobiny:wv.autobiny,bingroup:wv.bingroup,xbingroup:wv.xbingroup,ybingroup:wv.ybingroup,autocontour:Bm.autocontour,ncontours:Bm.ncontours,contours:Bm.contours,line:{color:Bm.line.color,width:Qxe({},Bm.line.width,{dflt:.5}),dash:Bm.line.dash,smoothing:Bm.line.smoothing,editType:"plot"},xhoverformat:gG("x"),yhoverformat:gG("y"),zhoverformat:gG("z",1),hovertemplate:wv.hovertemplate,hovertemplatefallback:wv.hovertemplatefallback,texttemplate:Bm.texttemplate,texttemplatefallback:Bm.texttemplatefallback,textfont:Bm.textfont},kbt("",{cLetter:"z",editTypeOverride:"calc"}))});var k8=ye((ycr,tbe)=>{"use strict";tbe.exports=function(t,r,n,i){var a=i("contours.start"),o=i("contours.end"),s=a===!1||o===!1,l=n("contours.size"),u;s?u=r.autocontour=!0:u=n("autocontour",!1),(u||!l)&&n("ncontours")}});var yG=ye((_cr,rbe)=>{"use strict";var Cbt=Dr();rbe.exports=function(t,r,n,i){i||(i={});var a=t("contours.showlabels");if(a){var o=r.font;Cbt.coerceFont(t,"contours.labelfont",o,{overrideDflt:{color:n}}),t("contours.labelformat")}i.hasHover!==!1&&t("zhoverformat")}});var C8=ye((xcr,ibe)=>{"use strict";var Lbt=td(),Pbt=yG();ibe.exports=function(t,r,n,i,a){var o=n("contours.coloring"),s,l="";o==="fill"&&(s=n("contours.showlines")),s!==!1&&(o!=="lines"&&(l=n("line.color","#000")),n("line.width",.5),n("line.dash")),o!=="none"&&(t.showlegend!==!0&&(r.showlegend=!1),r._dfltShowLegend=!1,Lbt(t,r,i,n,{prefix:"",cLetter:"z"})),n("line.smoothing"),Pbt(n,i,l,a)}});var sbe=ye((bcr,obe)=>{"use strict";var nbe=Dr(),Ibt=vG(),Rbt=k8(),Dbt=C8(),Fbt=I4(),abe=mG();obe.exports=function(t,r,n,i){function a(s,l){return nbe.coerce(t,r,abe,s,l)}function o(s){return nbe.coerce2(t,r,abe,s)}Ibt(t,r,a,i),r.visible!==!1&&(Rbt(t,r,a,o),Dbt(t,r,a,i),a("xhoverformat"),a("yhoverformat"),a("hovertemplate"),a("hovertemplatefallback"),r.contours&&r.contours.coloring==="heatmap"&&Fbt(a,i))}});var bG=ye((wcr,ube)=>{"use strict";var xG=ho(),_G=Dr();ube.exports=function(t,r){var n=t.contours;if(t.autocontour){var i=t.zmin,a=t.zmax;(t.zauto||i===void 0)&&(i=_G.aggNums(Math.min,null,r)),(t.zauto||a===void 0)&&(a=_G.aggNums(Math.max,null,r));var o=lbe(i,a,t.ncontours);n.size=o.dtick,n.start=xG.tickFirst(o),o.range.reverse(),n.end=xG.tickFirst(o),n.start===i&&(n.start+=n.size),n.end===a&&(n.end-=n.size),n.start>n.end&&(n.start=n.end=(n.start+n.end)/2),t._input.contours||(t._input.contours={}),_G.extendFlat(t._input.contours,{start:n.start,end:n.end,size:n.size}),t._input.autocontour=!0}else if(n.type!=="constraint"){var s=n.start,l=n.end,u=t._input.contours;if(s>l&&(n.start=u.start=l,l=n.end=u.end=s,s=n.start),!(n.size>0)){var c;s===l?c=1:c=lbe(s,l,t.ncontours).dtick,u.size=n.size=c}}};function lbe(e,t,r){var n={type:"linear",range:[e,t]};return xG.autoTicks(n,(t-e)/(r||15)),n}});var q4=ye((Tcr,cbe)=>{"use strict";cbe.exports=function(t){return t.end+t.size/1e6}});var wG=ye((Acr,hbe)=>{"use strict";var fbe=tc(),zbt=v8(),Obt=bG(),qbt=q4();hbe.exports=function(t,r){var n=zbt(t,r),i=n[0].z;Obt(r,i);var a=r.contours,o=fbe.extractOpts(r),s;if(a.coloring==="heatmap"&&o.auto&&r.autocontour===!1){var l=a.start,u=qbt(a),c=a.size||1,f=Math.floor((u-l)/c)+1;isFinite(c)||(c=1,f=1);var h=l-c/2,d=h+f*c;s=[h,d]}else s=i;return fbe.calc(t,r,{vals:s,cLetter:"z"}),n}});var B4=ye((Scr,dbe)=>{"use strict";dbe.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}});var TG=ye((Mcr,vbe)=>{"use strict";var L8=B4();vbe.exports=function(t){var r=t[0].z,n=r.length,i=r[0].length,a=n===2||i===2,o,s,l,u,c,f,h,d,v;for(s=0;se?0:1)+(t[0][1]>e?0:2)+(t[1][1]>e?0:4)+(t[1][0]>e?0:8);if(r===5||r===10){var n=(t[0][0]+t[0][1]+t[1][0]+t[1][1])/4;return e>n?r===5?713:1114:r===5?104:208}return r===15?0:r}});var AG=ye((Ecr,mbe)=>{"use strict";var P8=Dr(),UT=B4();mbe.exports=function(t,r,n){var i,a,o,s,l;for(r=r||.01,n=n||.01,o=0;o20?(o=UT.CHOOSESADDLE[o][(s[0]||s[1])<0?0:1],e.crossings[a]=UT.SADDLEREMAINDER[o]):delete e.crossings[a],s=UT.NEWDELTA[o],!s){P8.log("Found bad marching index:",o,t,e.level);break}l.push(gbe(e,t,s)),t[0]+=s[0],t[1]+=s[1],a=t.join(","),N4(l[l.length-1],l[l.length-2],n,i)&&l.pop();var v=s[0]&&(t[0]<0||t[0]>c-2)||s[1]&&(t[1]<0||t[1]>u-2),_=t[0]===f[0]&&t[1]===f[1]&&s[0]===h[0]&&s[1]===h[1];if(_||r&&v)break;o=e.crossings[a]}d===1e4&&P8.log("Infinite loop in contour?");var b=N4(l[0],l[l.length-1],n,i),p=0,k=.2*e.smoothing,E=[],T=0,L,x,C,M,g,P,A,z,O,U,G;for(d=1;d=T;d--)if(L=E[d],L=T&&L+E[x]z&&O--,e.edgepaths[O]=G.concat(l,U));break}H||(e.edgepaths[z]=l.concat(U))}for(z=0;z20&&t?e===208||e===1114?n=r[0]===0?1:-1:i=r[1]===0?1:-1:UT.BOTTOMSTART.indexOf(e)!==-1?i=1:UT.LEFTSTART.indexOf(e)!==-1?n=1:UT.TOPSTART.indexOf(e)!==-1?i=-1:n=-1,[n,i]}function gbe(e,t,r){var n=t[0]+Math.max(r[0],0),i=t[1]+Math.max(r[1],0),a=e.z[i][n],o=e.xaxis,s=e.yaxis;if(r[1]){var l=(e.level-a)/(e.z[i][n+1]-a),u=(l!==1?(1-l)*o.c2l(e.x[n]):0)+(l!==0?l*o.c2l(e.x[n+1]):0);return[o.c2p(o.l2c(u),!0),s.c2p(e.y[i],!0),n+l,i]}else{var c=(e.level-a)/(e.z[i+1][n]-a),f=(c!==1?(1-c)*s.c2l(e.y[i]):0)+(c!==0?c*s.c2l(e.y[i+1]):0);return[o.c2p(e.x[n],!0),s.c2p(s.l2c(f),!0),n,i+c]}}});var bbe=ye((kcr,xbe)=>{"use strict";var SG=M8(),Vbt=Eo();xbe.exports={"[]":ybe("[]"),"][":ybe("]["),">":MG(">"),"<":MG("<"),"=":MG("=")};function _be(e,t){var r=Array.isArray(t),n;function i(a){return Vbt(a)?+a:null}return SG.COMPARISON_OPS2.indexOf(e)!==-1?n=i(r?t[0]:t):SG.INTERVAL_OPS.indexOf(e)!==-1?n=r?[i(t[0]),i(t[1])]:[i(t),i(t)]:SG.SET_OPS.indexOf(e)!==-1&&(n=r?t.map(i):[i(t)]),n}function ybe(e){return function(t){t=_be(e,t);var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]);return{start:r,end:n,size:n-r}}}function MG(e){return function(t){return t=_be(e,t),{start:t,end:1/0,size:1/0}}}});var EG=ye((Ccr,Tbe)=>{"use strict";var wbe=Dr(),Gbt=bbe(),Hbt=q4();Tbe.exports=function(t,r,n){for(var i=t.type==="constraint"?Gbt[t._operation](t.value):t,a=i.size,o=[],s=Hbt(i),l=n.trace._carpetTrace,u=l?{xaxis:l.aaxis,yaxis:l.baxis,x:n.a,y:n.b}:{xaxis:r.xaxis,yaxis:r.yaxis,x:n.x,y:n.y},c=i.start;c1e3){wbe.warn("Too many contours, clipping at 1000",t);break}return o}});var kG=ye((Lcr,Sbe)=>{"use strict";var VT=Dr();Sbe.exports=function(e,t){var r,n,i,a=function(l){return l.reverse()},o=function(l){return l};switch(t){case"=":case"<":return e;case">":for(e.length!==1&&VT.warn("Contour data invalid for the specified inequality operation."),n=e[0],r=0;r{"use strict";Mbe.exports=function(e,t){var r=e[0],n=r.z,i;switch(t.type){case"levels":var a=Math.min(n[0][0],n[0][1]);for(i=0;io.level||o.starts.length&&a===o.level)}break;case"constraint":if(r.prefixBoundary=!1,r.edgepaths.length)return;var s=r.x.length,l=r.y.length,u=-1/0,c=1/0;for(i=0;i":f>u&&(r.prefixBoundary=!0);break;case"<":(fu||r.starts.length&&d===c)&&(r.prefixBoundary=!0);break;case"][":h=Math.min(f[0],f[1]),d=Math.max(f[0],f[1]),hu&&(r.prefixBoundary=!0);break}break}}});var I8=ye(jv=>{"use strict";var V4=Oa(),Fd=Dr(),jy=So(),jbt=tc(),Cbe=Zl(),Ebe=ho(),kbe=xm(),Wbt=m8(),Lbe=TG(),Pbe=AG(),Xbt=EG(),Zbt=kG(),Ibe=CG(),U4=B4(),Nm=U4.LABELOPTIMIZER;jv.plot=function(t,r,n,i){var a=r.xaxis,o=r.yaxis;Fd.makeTraceGroups(i,n,"contour").each(function(s){var l=V4.select(this),u=s[0],c=u.trace,f=u.x,h=u.y,d=c.contours,v=Xbt(d,r,u),_=Fd.ensureSingle(l,"g","heatmapcoloring"),b=[];d.coloring==="heatmap"&&(b=[s]),Wbt(t,r,b,_),Lbe(v),Pbe(v);var p=a.c2p(f[0],!0),k=a.c2p(f[f.length-1],!0),E=o.c2p(h[0],!0),T=o.c2p(h[h.length-1],!0),L=[[p,T],[k,T],[k,E],[p,E]],x=v;d.type==="constraint"&&(x=Zbt(v,d._operation)),Ybt(l,L,d),Kbt(l,x,L,d),Jbt(l,v,t,u,d),Qbt(l,r,t,u,L)})};function Ybt(e,t,r){var n=Fd.ensureSingle(e,"g","contourbg"),i=n.selectAll("path").data(r.coloring==="fill"?[0]:[]);i.enter().append("path"),i.exit().remove(),i.attr("d","M"+t.join("L")+"Z").style("stroke","none")}function Kbt(e,t,r,n){var i=n.coloring==="fill"||n.type==="constraint"&&n._operation!=="=",a="M"+r.join("L")+"Z";i&&Ibe(t,n);var o=Fd.ensureSingle(e,"g","contourfill"),s=o.selectAll("path").data(i?t:[]);s.enter().append("path"),s.exit().remove(),s.each(function(l){var u=(l.prefixBoundary?a:"")+Rbe(l,r);u?V4.select(this).attr("d",u).style("stroke","none"):V4.select(this).remove()})}function Rbe(e,t){var r="",n=0,i=e.edgepaths.map(function(p,k){return k}),a=!0,o,s,l,u,c,f;function h(p){return Math.abs(p[1]-t[0][1])<.01}function d(p){return Math.abs(p[1]-t[2][1])<.01}function v(p){return Math.abs(p[0]-t[0][0])<.01}function _(p){return Math.abs(p[0]-t[2][0])<.01}for(;i.length;){for(f=jy.smoothopen(e.edgepaths[n],e.smoothing),r+=a?f:f.replace(/^M/,"L"),i.splice(i.indexOf(n),1),o=e.edgepaths[n][e.edgepaths[n].length-1],u=-1,l=0;l<4;l++){if(!o){Fd.log("Missing end?",n,e);break}for(h(o)&&!_(o)?s=t[1]:v(o)?s=t[0]:d(o)?s=t[3]:_(o)&&(s=t[2]),c=0;c=0&&(s=b,u=c):Math.abs(o[1]-s[1])<.01?Math.abs(o[1]-b[1])<.01&&(b[0]-o[0])*(s[0]-b[0])>=0&&(s=b,u=c):Fd.log("endpt to newendpt is not vert. or horz.",o,s,b)}if(o=s,u>=0)break;r+="L"+s}if(u===e.edgepaths.length){Fd.log("unclosed perimeter path");break}n=u,a=i.indexOf(n)===-1,a&&(n=i[0],r+="Z")}for(n=0;nNm.MAXCOST*2)break;h&&(s/=2),o=u-s/2,l=o+s*1.5}if(f<=Nm.MAXCOST)return c};function $bt(e,t,r,n){var i=t.width/2,a=t.height/2,o=e.x,s=e.y,l=e.theta,u=Math.cos(l)*i,c=Math.sin(l)*i,f=(o>n.center?n.right-o:o-n.left)/(u+Math.abs(Math.sin(l)*a)),h=(s>n.middle?n.bottom-s:s-n.top)/(Math.abs(c)+Math.cos(l)*a);if(f<1||h<1)return 1/0;var d=Nm.EDGECOST*(1/(f-1)+1/(h-1));d+=Nm.ANGLECOST*l*l;for(var v=o-u,_=s-c,b=o+u,p=s+c,k=0;k{"use strict";var t2t=Oa(),LG=tc(),r2t=q4();Dbe.exports=function(t){var r=t.contours,n=r.start,i=r2t(r),a=r.size||1,o=Math.floor((i-n)/a)+1,s=r.coloring==="lines"?0:1,l=LG.extractOpts(t);isFinite(a)||(a=1,o=1);var u=l.reversescale?LG.flipScale(l.colorscale):l.colorscale,c=u.length,f=new Array(c),h=new Array(c),d,v,_=l.min,b=l.max;if(r.coloring==="heatmap"){for(v=0;v=b)&&(n<=_&&(n=_),i>=b&&(i=b),o=Math.floor((i-n)/a)+1,s=0),v=0;v_&&(f.unshift(_),h.unshift(h[0])),f[f.length-1]{"use strict";var R8=Oa(),Fbe=So(),i2t=y8(),n2t=PG();zbe.exports=function(t){var r=R8.select(t).selectAll("g.contour");r.style("opacity",function(n){return n[0].trace.opacity}),r.each(function(n){var i=R8.select(this),a=n[0].trace,o=a.contours,s=a.line,l=o.size||1,u=o.start,c=o.type==="constraint",f=!c&&o.coloring==="lines",h=!c&&o.coloring==="fill",d=f||h?n2t(a):null;i.selectAll("g.contourlevel").each(function(b){R8.select(this).selectAll("path").call(Fbe.lineGroupStyle,s.width,f?d(b.level):s.color,s.dash)});var v=o.labelfont;if(i.selectAll("g.contourlabels text").each(function(b){Fbe.font(R8.select(this),{weight:v.weight,style:v.style,variant:v.variant,textcase:v.textcase,lineposition:v.lineposition,shadow:v.shadow,family:v.family,size:v.size,color:v.color||(f?d(b.level):s.color)})}),c)i.selectAll("g.contourfill path").style("fill",a.fillcolor);else if(h){var _;i.selectAll("g.contourfill path").style("fill",function(b){return _===void 0&&(_=b.level),d(b.level+.5*l)}),_===void 0&&(_=u),i.selectAll("g.contourbg path").style("fill",d(_-.5*l))}}),i2t(t)}});var F8=ye((Fcr,qbe)=>{"use strict";var Obe=tc(),a2t=PG(),o2t=q4();function s2t(e,t,r){var n=t.contours,i=t.line,a=n.size||1,o=n.coloring,s=a2t(t,{isColorbar:!0});if(o==="heatmap"){var l=Obe.extractOpts(t);r._fillgradient=l.reversescale?Obe.flipScale(l.colorscale):l.colorscale,r._zrange=[l.min,l.max]}else o==="fill"&&(r._fillcolor=s);r._line={color:o==="lines"?s:i.color,width:n.showlines!==!1?i.width:0,dash:i.dash},r._levels={start:n.start,end:o2t(n),size:a}}qbe.exports={min:"zmin",max:"zmax",calc:s2t}});var IG=ye((zcr,Bbe)=>{"use strict";var z8=ka(),l2t=x8();Bbe.exports=function(t,r,n,i,a){a||(a={}),a.isContour=!0;var o=l2t(t,r,n,i,a);return o&&o.forEach(function(s){var l=s.trace;l.contours.type==="constraint"&&(l.fillcolor&&z8.opacity(l.fillcolor)?s.color=z8.addOpacity(l.fillcolor,1):l.contours.showlines&&z8.opacity(l.line.color)&&(s.color=z8.addOpacity(l.line.color,1)))}),o}});var Ube=ye((Ocr,Nbe)=>{"use strict";Nbe.exports={attributes:mG(),supplyDefaults:sbe(),crossTraceDefaults:T8(),calc:wG(),plot:I8().plot,layerName:"contourlayer",style:D8(),colorbar:F8(),hoverPoints:IG(),moduleType:"trace",name:"histogram2dcontour",basePlotModule:mh(),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}});var Gbe=ye((qcr,Vbe)=>{"use strict";Vbe.exports=Ube()});var RG=ye((Bcr,Ybe)=>{"use strict";var Hbe=Eo(),u2t=yG(),Xbe=ka(),jbe=Xbe.addOpacity,c2t=Xbe.opacity,Zbe=M8(),Wbe=Dr().isArrayOrTypedArray,f2t=Zbe.CONSTRAINT_REDUCTION,h2t=Zbe.COMPARISON_OPS2;Ybe.exports=function(t,r,n,i,a,o){var s=r.contours,l,u,c,f=n("contours.operation");if(s._operation=f2t[f],d2t(n,s),f==="="?l=s.showlines=!0:(l=n("contours.showlines"),c=n("fillcolor",jbe((t.line||{}).color||a,.5))),l){var h=c&&c2t(c)?jbe(r.fillcolor,1):a;u=n("line.color",h),n("line.width",2),n("line.dash")}n("line.smoothing"),u2t(n,i,u,o)};function d2t(e,t){var r;h2t.indexOf(t.operation)===-1?(e("contours.value",[0,1]),Wbe(t.value)?t.value.length>2?t.value=t.value.slice(2):t.length===0?t.value=[0,1]:t.length<2?(r=parseFloat(t.value[0]),t.value=[r,r+1]):t.value=[parseFloat(t.value[0]),parseFloat(t.value[1])]:Hbe(t.value)&&(r=parseFloat(t.value),t.value=[r,r+1])):(e("contours.value",0),Hbe(t.value)||(Wbe(t.value)?t.value=parseFloat(t.value[0]):t.value=0))}});var $be=ye((Ncr,Jbe)=>{"use strict";var DG=Dr(),v2t=n8(),p2t=Dg(),g2t=RG(),m2t=k8(),y2t=C8(),_2t=I4(),Kbe=O4();Jbe.exports=function(t,r,n,i){function a(u,c){return DG.coerce(t,r,Kbe,u,c)}function o(u){return DG.coerce2(t,r,Kbe,u)}var s=v2t(t,r,a,i);if(!s){r.visible=!1;return}p2t(t,r,i,a),a("xhoverformat"),a("yhoverformat"),a("text"),a("hovertext"),a("hoverongaps"),a("hovertemplate"),a("hovertemplatefallback");var l=a("contours.type")==="constraint";a("connectgaps",DG.isArray1D(r.z)),l?g2t(t,r,a,i,n):(m2t(t,r,a,o),y2t(t,r,a,i)),r.contours&&r.contours.coloring==="heatmap"&&_2t(a,i),a("zorder")}});var e2e=ye((Ucr,Qbe)=>{"use strict";Qbe.exports={attributes:O4(),supplyDefaults:$be(),calc:wG(),plot:I8().plot,style:D8(),colorbar:F8(),hoverPoints:IG(),moduleType:"trace",name:"contour",basePlotModule:mh(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}});var r2e=ye((Vcr,t2e)=>{"use strict";t2e.exports=e2e()});var FG=ye((Gcr,o2e)=>{"use strict";var{hovertemplateAttrs:x2t,texttemplateAttrs:b2t,templatefallbackAttrs:i2e}=Ll(),w2t=Pg(),o0=pf(),T2t=Gl(),n2e=Tu(),A2t=Pd().dash,F_=Ao().extendFlat,X0=o0.marker,G4=o0.line,a2e=X0.line;o2e.exports={a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},c:{valType:"data_array",editType:"calc"},sum:{valType:"number",dflt:0,min:0,editType:"calc"},mode:F_({},o0.mode,{dflt:"markers"}),text:F_({},o0.text,{}),texttemplate:b2t({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:i2e({editType:"plot"}),hovertext:F_({},o0.hovertext,{}),line:{color:G4.color,width:G4.width,dash:A2t,backoff:G4.backoff,shape:F_({},G4.shape,{values:["linear","spline"]}),smoothing:G4.smoothing,editType:"calc"},connectgaps:o0.connectgaps,cliponaxis:o0.cliponaxis,fill:F_({},o0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:w2t(),marker:F_({symbol:X0.symbol,opacity:X0.opacity,angle:X0.angle,angleref:X0.angleref,standoff:X0.standoff,maxdisplayed:X0.maxdisplayed,size:X0.size,sizeref:X0.sizeref,sizemin:X0.sizemin,sizemode:X0.sizemode,line:F_({width:a2e.width,dash:a2e.dash,editType:"calc"},n2e("marker.line")),gradient:X0.gradient,editType:"calc"},n2e("marker")),textfont:o0.textfont,textposition:o0.textposition,selected:o0.selected,unselected:o0.unselected,hoverinfo:F_({},T2t.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:o0.hoveron,hovertemplate:x2t(),hovertemplatefallback:i2e()}});var c2e=ye((Hcr,u2e)=>{"use strict";var s2e=Dr(),S2t=Lm(),GT=Ru(),M2t=$p(),E2t=D0(),l2e=sT(),k2t=F0(),C2t=Fg(),L2t=FG();u2e.exports=function(t,r,n,i){function a(h,d){return s2e.coerce(t,r,L2t,h,d)}var o=a("a"),s=a("b"),l=a("c"),u;if(o?(u=o.length,s?(u=Math.min(u,s.length),l&&(u=Math.min(u,l.length))):l?u=Math.min(u,l.length):u=0):s&&l&&(u=Math.min(s.length,l.length)),!u){r.visible=!1;return}r._length=u,a("sum"),a("text"),a("hovertext"),r.hoveron!=="fills"&&(a("hovertemplate"),a("hovertemplatefallback"));var c=u{"use strict";var zG=ho();f2e.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot;return i.aLabel=zG.tickText(a.aaxis,t.a,!0).text,i.bLabel=zG.tickText(a.baxis,t.b,!0).text,i.cLabel=zG.tickText(a.caxis,t.c,!0).text,i}});var g2e=ye((Wcr,p2e)=>{"use strict";var OG=Eo(),P2t=z0(),I2t=Rm(),R2t=O0(),D2t=q0().calcMarkerSize,d2e=["a","b","c"],v2e={a:["b","c"],b:["a","c"],c:["a","b"]};p2e.exports=function(t,r){var n=t._fullLayout[r.subplot],i=n.sum,a=r.sum||i,o={a:r.a,b:r.b,c:r.c},s=r.ids,l,u,c,f,h,d;for(l=0;l{"use strict";var F2t=dT();m2e.exports=function(t,r,n){var i=r.plotContainer;i.select(".scatterlayer").selectAll("*").remove();for(var a=r.xaxis,o=r.yaxis,s={xaxis:a,yaxis:o,plot:i,layerClipId:r._hasClipOnAxisFalse?r.clipIdRelative:null},l=r.layers.frontplot.select("g.scatterlayer"),u=0;u{"use strict";var z2t=mT();_2e.exports=function(t,r,n,i){var a=z2t(t,r,n,i);if(!a||a[0].index===!1)return;var o=a[0];if(o.index===void 0){var s=1-o.y0/t.ya._length,l=t.xa._length,u=l*s/2,c=l-u;return o.x0=Math.max(Math.min(o.x0,c),u),o.x1=Math.max(Math.min(o.x1,c),u),a}var f=o.cd[o.index],h=o.trace,d=o.subplot;o.a=f.a,o.b=f.b,o.c=f.c,o.xLabelVal=void 0,o.yLabelVal=void 0;var v={};v[h.subplot]={_subplot:d};var _=h._module.formatLabels(f,h,v);o.aLabel=_.aLabel,o.bLabel=_.bLabel,o.cLabel=_.cLabel;var b=f.hi||h.hoverinfo,p=[];function k(T,L){p.push(T._hovertitle+": "+L)}if(!h.hovertemplate){var E=b.split("+");E.indexOf("all")!==-1&&(E=["a","b","c"]),E.indexOf("a")!==-1&&k(d.aaxis,o.aLabel),E.indexOf("b")!==-1&&k(d.baxis,o.bLabel),E.indexOf("c")!==-1&&k(d.caxis,o.cLabel)}return o.extraText=p.join("
"),o.hovertemplate=h.hovertemplate,a}});var w2e=ye((Ycr,b2e)=>{"use strict";b2e.exports=function(t,r,n,i,a){if(r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),i[a]){var o=i[a];t.a=o.a,t.b=o.b,t.c=o.c}else t.a=r.a,t.b=r.b,t.c=r.c;return t}});var R2e=ye((Kcr,I2e)=>{"use strict";var k2e=Oa(),O2t=fd(),qG=qa(),Wy=Dr(),Um=Wy.strTranslate,O8=Wy._,jT=ka(),q8=So(),H4=xm(),BG=Ao().extendFlat,q2t=Mc(),z_=ho(),T2e=yv(),A2e=vf(),C2e=Cg(),S2e=C2e.freeMode,B2t=C2e.rectMode,NG=zb(),N2t=Of().prepSelect,U2t=Of().selectOnClick,V2t=Of().clearOutline,G2t=Of().clearSelectionsCache,L2e=Rh();function P2e(e,t){this.id=e.id,this.graphDiv=e.graphDiv,this.init(t),this.makeFramework(t),this.updateFx(t),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}I2e.exports=P2e;var Vm=P2e.prototype;Vm.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}};Vm.plot=function(e,t){var r=this,n=t[r.id],i=t._size;r._hasClipOnAxisFalse=!1;for(var a=0;aHT*u?(p=u,b=p*HT):(b=l,p=b/HT),k=o*b/l,E=s*p/u,v=t.l+t.w*i-b/2,_=t.t+t.h*(1-a)-p/2,r.x0=v,r.y0=_,r.w=b,r.h=p,r.sum=c,r.xaxis={type:"linear",range:[f+2*d-c,c-f-2*h],domain:[i-k/2,i+k/2],_id:"x"},H4(r.xaxis,r.graphDiv._fullLayout),r.xaxis.setScale(),r.xaxis.isPtWithinRange=function(U){return U.a>=r.aaxis.range[0]&&U.a<=r.aaxis.range[1]&&U.b>=r.baxis.range[1]&&U.b<=r.baxis.range[0]&&U.c>=r.caxis.range[1]&&U.c<=r.caxis.range[0]},r.yaxis={type:"linear",range:[f,c-h-d],domain:[a-E/2,a+E/2],_id:"y"},H4(r.yaxis,r.graphDiv._fullLayout),r.yaxis.setScale(),r.yaxis.isPtWithinRange=function(){return!0};var T=r.yaxis.domain[0],L=r.aaxis=BG({},e.aaxis,{range:[f,c-h-d],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[T,T+E*HT],anchor:"free",position:0,_id:"y",_length:b});H4(L,r.graphDiv._fullLayout),L.setScale();var x=r.baxis=BG({},e.baxis,{range:[c-f-d,h],side:"bottom",domain:r.xaxis.domain,anchor:"free",position:0,_id:"x",_length:b});H4(x,r.graphDiv._fullLayout),x.setScale();var C=r.caxis=BG({},e.caxis,{range:[c-f-h,d],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[T,T+E*HT],anchor:"free",position:0,_id:"y",_length:b});H4(C,r.graphDiv._fullLayout),C.setScale();var M="M"+v+","+(_+p)+"h"+b+"l-"+b/2+",-"+p+"Z";r.clipDef.select("path").attr("d",M),r.layers.plotbg.select("path").attr("d",M);var g="M0,"+p+"h"+b+"l-"+b/2+",-"+p+"Z";r.clipDefRelative.select("path").attr("d",g);var P=Um(v,_);r.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",P),r.clipDefRelative.select("path").attr("transform",null);var A=Um(v-x._offset,_+p);r.layers.baxis.attr("transform",A),r.layers.bgrid.attr("transform",A);var z=Um(v+b/2,_)+"rotate(30)"+Um(0,-L._offset);r.layers.aaxis.attr("transform",z),r.layers.agrid.attr("transform",z);var O=Um(v+b/2,_)+"rotate(-30)"+Um(0,-C._offset);r.layers.caxis.attr("transform",O),r.layers.cgrid.attr("transform",O),r.drawAxes(!0),r.layers.aline.select("path").attr("d",L.showline?"M"+v+","+(_+p)+"l"+b/2+",-"+p:"M0,0").call(jT.stroke,L.linecolor||"#000").style("stroke-width",(L.linewidth||0)+"px"),r.layers.bline.select("path").attr("d",x.showline?"M"+v+","+(_+p)+"h"+b:"M0,0").call(jT.stroke,x.linecolor||"#000").style("stroke-width",(x.linewidth||0)+"px"),r.layers.cline.select("path").attr("d",C.showline?"M"+(v+b/2)+","+_+"l"+b/2+","+p:"M0,0").call(jT.stroke,C.linecolor||"#000").style("stroke-width",(C.linewidth||0)+"px"),r.graphDiv._context.staticPlot||r.initInteractions(),q8.setClipUrl(r.layers.frontplot,r._hasClipOnAxisFalse?null:r.clipId,r.graphDiv)};Vm.drawAxes=function(e){var t=this,r=t.graphDiv,n=t.id.slice(7)+"title",i=t.layers,a=t.aaxis,o=t.baxis,s=t.caxis;if(t.drawAx(a),t.drawAx(o),t.drawAx(s),e){var l=Math.max(a.showticklabels?a.tickfont.size/2:0,(s.showticklabels?s.tickfont.size*.75:0)+(s.ticks==="outside"?s.ticklen*.87:0)),u=(o.showticklabels?o.tickfont.size:0)+(o.ticks==="outside"?o.ticklen:0)+3;i["a-title"]=NG.draw(r,"a"+n,{propContainer:a,propName:t.id+".aaxis.title.text",placeholder:O8(r,"Click to enter Component A title"),attributes:{x:t.x0+t.w/2,y:t.y0-a.title.font.size/3-l,"text-anchor":"middle"}}),i["b-title"]=NG.draw(r,"b"+n,{propContainer:o,propName:t.id+".baxis.title.text",placeholder:O8(r,"Click to enter Component B title"),attributes:{x:t.x0-u,y:t.y0+t.h+o.title.font.size*.83+u,"text-anchor":"middle"}}),i["c-title"]=NG.draw(r,"c"+n,{propContainer:s,propName:t.id+".caxis.title.text",placeholder:O8(r,"Click to enter Component C title"),attributes:{x:t.x0+t.w+u,y:t.y0+t.h+s.title.font.size*.83+u,"text-anchor":"middle"}})}};Vm.drawAx=function(e){var t=this,r=t.graphDiv,n=e._name,i=n.charAt(0),a=e._id,o=t.layers[n],s=30,l=i+"tickLayout",u=H2t(e);t[l]!==u&&(o.selectAll("."+a+"tick").remove(),t[l]=u),e.setScale();var c=z_.calcTicks(e),f=z_.clipEnds(e,c),h=z_.makeTransTickFn(e),d=z_.getTickSigns(e)[2],v=Wy.deg2rad(s),_=d*(e.linewidth||1)/2,b=d*e.ticklen,p=t.w,k=t.h,E=i==="b"?"M0,"+_+"l"+Math.sin(v)*b+","+Math.cos(v)*b:"M"+_+",0l"+Math.cos(v)*b+","+-Math.sin(v)*b,T={a:"M0,0l"+k+",-"+p/2,b:"M0,0l-"+p/2+",-"+k,c:"M0,0l-"+k+","+p/2}[i];z_.drawTicks(r,e,{vals:e.ticks==="inside"?f:c,layer:o,path:E,transFn:h,crisp:!1}),z_.drawGrid(r,e,{vals:f,layer:t.layers[i+"grid"],path:T,transFn:h,crisp:!1}),z_.drawLabels(r,e,{vals:c,layer:o,transFn:h,labelFns:z_.makeLabelFns(e,0,s)})};function H2t(e){return e.ticks+String(e.ticklen)+String(e.showticklabels)}var yd=L2e.MINZOOM/2+.87,j2t="m-0.87,.5h"+yd+"v3h-"+(yd+5.2)+"l"+(yd/2+2.6)+",-"+(yd*.87+4.5)+"l2.6,1.5l-"+yd/2+","+yd*.87+"Z",W2t="m0.87,.5h-"+yd+"v3h"+(yd+5.2)+"l-"+(yd/2+2.6)+",-"+(yd*.87+4.5)+"l-2.6,1.5l"+yd/2+","+yd*.87+"Z",X2t="m0,1l"+yd/2+","+yd*.87+"l2.6,-1.5l-"+(yd/2+2.6)+",-"+(yd*.87+4.5)+"l-"+(yd/2+2.6)+","+(yd*.87+4.5)+"l2.6,1.5l"+yd/2+",-"+yd*.87+"Z",Z2t="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",M2e=!0;Vm.clearOutline=function(){G2t(this.dragOptions),V2t(this.dragOptions.gd)};Vm.initInteractions=function(){var e=this,t=e.layers.plotbg.select("path").node(),r=e.graphDiv,n=r._fullLayout._zoomlayer,i,a;this.dragOptions={element:t,gd:r,plotinfo:{id:e.id,domain:r._fullLayout[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis},subplot:e.id,prepFn:function(A,z,O){e.dragOptions.xaxes=[e.xaxis],e.dragOptions.yaxes=[e.yaxis],i=r._fullLayout._invScaleX,a=r._fullLayout._invScaleY;var U=e.dragOptions.dragmode=r._fullLayout.dragmode;S2e(U)?e.dragOptions.minDrag=1:e.dragOptions.minDrag=void 0,U==="zoom"?(e.dragOptions.moveFn=x,e.dragOptions.clickFn=p,e.dragOptions.doneFn=C,k(A,z,O)):U==="pan"?(e.dragOptions.moveFn=g,e.dragOptions.clickFn=p,e.dragOptions.doneFn=P,M(),e.clearOutline(r)):(B2t(U)||S2e(U))&&N2t(A,z,O,e.dragOptions,U)}};var o,s,l,u,c,f,h,d,v,_;function b(A){var z={};return z[e.id+".aaxis.min"]=A.a,z[e.id+".baxis.min"]=A.b,z[e.id+".caxis.min"]=A.c,z}function p(A,z){var O=r._fullLayout.clickmode;E2e(r),A===2&&(r.emit("plotly_doubleclick",null),qG.call("_guiRelayout",r,b({a:0,b:0,c:0}))),O.indexOf("select")>-1&&A===1&&U2t(z,r,[e.xaxis],[e.yaxis],e.id,e.dragOptions),O.indexOf("event")>-1&&A2e.click(r,z,e.id)}function k(A,z,O){var U=t.getBoundingClientRect();o=z-U.left,s=O-U.top,r._fullLayout._calcInverseTransform(r);var G=r._fullLayout._invTransform,Z=Wy.apply3DTransform(G)(o,s);o=Z[0],s=Z[1],l={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},c=l,u=e.aaxis.range[1]-l.a,f=O2t(e.graphDiv._fullLayout[e.id].bgcolor).getLuminance(),h="M0,"+e.h+"L"+e.w/2+", 0L"+e.w+","+e.h+"Z",d=!1,v=n.append("path").attr("class","zoombox").attr("transform",Um(e.x0,e.y0)).style({fill:f>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",h),_=n.append("path").attr("class","zoombox-corners").attr("transform",Um(e.x0,e.y0)).style({fill:jT.background,stroke:jT.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),e.clearOutline(r)}function E(A,z){return 1-z/e.h}function T(A,z){return 1-(A+(e.h-z)/Math.sqrt(3))/e.w}function L(A,z){return(A-(e.h-z)/Math.sqrt(3))/e.w}function x(A,z){var O=o+A*i,U=s+z*a,G=Math.max(0,Math.min(1,E(o,s),E(O,U))),Z=Math.max(0,Math.min(1,T(o,s),T(O,U))),j=Math.max(0,Math.min(1,L(o,s),L(O,U))),N=(G/2+j)*e.w,H=(1-G/2-Z)*e.w,re=(N+H)/2,oe=H-N,_e=(1-G)*e.h,Ce=_e-oe/HT;oe.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),_.transition().style("opacity",1).duration(200),d=!0),r.emit("plotly_relayouting",b(c))}function C(){E2e(r),c!==l&&(qG.call("_guiRelayout",r,b(c)),M2e&&r.data&&r._context.showTips&&(Wy.notifier(O8(r,"Double-click to zoom back out"),"long"),M2e=!1))}function M(){l={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},c=l}function g(A,z){var O=A/e.xaxis._m,U=z/e.yaxis._m;c={a:l.a-U,b:l.b+(O+U)/2,c:l.c-(O-U)/2};var G=[c.a,c.b,c.c].sort(Wy.sorterAsc),Z={a:G.indexOf(c.a),b:G.indexOf(c.b),c:G.indexOf(c.c)};G[0]<0&&(G[1]+G[0]/2<0?(G[2]+=G[0]+G[1],G[0]=G[1]=0):(G[2]+=G[0]/2,G[1]+=G[0]/2,G[0]=0),c={a:G[Z.a],b:G[Z.b],c:G[Z.c]},z=(l.a-c.a)*e.yaxis._m,A=(l.c-c.c-l.b+c.b)*e.xaxis._m);var j=Um(e.x0+A,e.y0+z);e.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",j);var N=Um(-A,-z);e.clipDefRelative.select("path").attr("transform",N),e.aaxis.range=[c.a,e.sum-c.b-c.c],e.baxis.range=[e.sum-c.a-c.c,c.b],e.caxis.range=[e.sum-c.a-c.b,c.c],e.drawAxes(!1),e._hasClipOnAxisFalse&&e.plotContainer.select(".scatterlayer").selectAll(".trace").call(q8.hideOutsideRangePoints,e),r.emit("plotly_relayouting",b(c))}function P(){qG.call("_guiRelayout",r,b(c))}t.onmousemove=function(A){A2e.hover(r,A,e.id),r._fullLayout._lasthover=t,r._fullLayout._hoversubplot=e.id},t.onmouseout=function(A){r._dragging||T2e.unhover(r,A)},T2e.init(this.dragOptions)};function E2e(e){k2e.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}});var GG=ye((Jcr,D2e)=>{"use strict";var Y2t=Ih(),K2t=Cc().attributes,su=Rd(),J2t=mc().overrideAll,UG=Ao().extendFlat,VG={title:{text:su.title.text,font:su.title.font},color:su.color,tickmode:su.minor.tickmode,nticks:UG({},su.nticks,{dflt:6,min:1}),tick0:su.tick0,dtick:su.dtick,tickvals:su.tickvals,ticktext:su.ticktext,ticks:su.ticks,ticklen:su.ticklen,tickwidth:su.tickwidth,tickcolor:su.tickcolor,ticklabelstep:su.ticklabelstep,showticklabels:su.showticklabels,labelalias:su.labelalias,showtickprefix:su.showtickprefix,tickprefix:su.tickprefix,showticksuffix:su.showticksuffix,ticksuffix:su.ticksuffix,showexponent:su.showexponent,exponentformat:su.exponentformat,minexponent:su.minexponent,separatethousands:su.separatethousands,tickfont:su.tickfont,tickangle:su.tickangle,tickformat:su.tickformat,tickformatstops:su.tickformatstops,hoverformat:su.hoverformat,showline:UG({},su.showline,{dflt:!0}),linecolor:su.linecolor,linewidth:su.linewidth,showgrid:UG({},su.showgrid,{dflt:!0}),gridcolor:su.gridcolor,gridwidth:su.gridwidth,griddash:su.griddash,layer:su.layer,min:{valType:"number",dflt:0,min:0}},B8=D2e.exports=J2t({domain:K2t({name:"ternary"}),bgcolor:{valType:"color",dflt:Y2t.background},sum:{valType:"number",dflt:1,min:0},aaxis:VG,baxis:VG,caxis:VG},"plot","from-root");B8.uirevision={valType:"any",editType:"none"};B8.aaxis.uirevision=B8.baxis.uirevision=B8.caxis.uirevision={valType:"any",editType:"none"}});var O_=ye(($cr,F2e)=>{"use strict";var $2t=Dr(),Q2t=vl(),ewt=Cc().defaults;F2e.exports=function(t,r,n,i){var a=i.type,o=i.attributes,s=i.handleDefaults,l=i.partition||"x",u=r._subplots[a],c=u.length,f=c&&u[0].replace(/\d+$/,""),h,d;function v(k,E){return $2t.coerce(h,d,o,k,E)}for(var _=0;_{"use strict";var twt=ka(),rwt=vl(),N8=Dr(),iwt=O_(),nwt=s_(),awt=l_(),owt=F3(),swt=Lb(),lwt=u4(),O2e=GG(),z2e=["aaxis","baxis","caxis"];q2e.exports=function(t,r,n){iwt(t,r,n,{type:"ternary",attributes:O2e,handleDefaults:uwt,font:r.font,paper_bgcolor:r.paper_bgcolor})};function uwt(e,t,r,n){var i=r("bgcolor"),a=r("sum");n.bgColor=twt.combine(i,n.paper_bgcolor);for(var o,s,l,u=0;u=a&&(c.min=0,f.min=0,h.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}function cwt(e,t,r,n){var i=O2e[t._name];function a(d,v){return N8.coerce(e,t,i,d,v)}a("uirevision",n.uirevision),t.type="linear";var o=a("color"),s=o!==i.color.dflt?o:r.font.color,l=t._name,u=l.charAt(0).toUpperCase(),c="Component "+u,f=a("title.text",c);t._hovertitle=f===c?f:u,N8.coerceFont(a,"title.font",r.font,{overrideDflt:{size:N8.bigFont(r.font.size),color:s}}),a("min"),swt(e,t,a,"linear"),awt(e,t,a,"linear"),nwt(e,t,a,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),owt(e,t,a,{outerTicks:!0});var h=a("showticklabels");h&&(N8.coerceFont(a,"tickfont",r.font,{overrideDflt:{color:s}}),a("tickangle"),a("tickformat")),lwt(e,t,a,{dfltColor:o,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),a("hoverformat"),a("layer")}});var N2e=ye(Z0=>{"use strict";var fwt=R2e(),hwt=Id().getSubplotCalcData,dwt=Dr().counterRegex,WT="ternary";Z0.name=WT;var vwt=Z0.attr="subplot";Z0.idRoot=WT;Z0.idRegex=Z0.attrRegex=dwt(WT);var pwt=Z0.attributes={};pwt[vwt]={valType:"subplotid",dflt:"ternary",editType:"calc"};Z0.layoutAttributes=GG();Z0.supplyLayoutDefaults=B2e();Z0.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,i=r._subplots[WT],a=0;a{"use strict";U2e.exports={attributes:FG(),supplyDefaults:c2e(),colorbar:$d(),formatLabels:h2e(),calc:g2e(),plot:y2e(),style:sp().style,styleOnSelect:sp().styleOnSelect,hoverPoints:x2e(),selectPoints:yT(),eventData:w2e(),moduleType:"trace",name:"scatterternary",basePlotModule:N2e(),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}});var H2e=ye((rfr,G2e)=>{"use strict";G2e.exports=V2e()});var HG=ye((ifr,W2e)=>{"use strict";var qh=k4(),XT=Ao().extendFlat,j2e=df().axisHoverFormat;W2e.exports={y:qh.y,x:qh.x,x0:qh.x0,y0:qh.y0,xhoverformat:j2e("x"),yhoverformat:j2e("y"),name:XT({},qh.name,{}),orientation:XT({},qh.orientation,{}),bandwidth:{valType:"number",min:0,editType:"calc"},scalegroup:{valType:"string",dflt:"",editType:"calc"},scalemode:{valType:"enumerated",values:["width","count"],dflt:"width",editType:"calc"},spanmode:{valType:"enumerated",values:["soft","hard","manual"],dflt:"soft",editType:"calc"},span:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:qh.fillcolor,points:XT({},qh.boxpoints,{}),jitter:XT({},qh.jitter,{}),pointpos:XT({},qh.pointpos,{}),width:XT({},qh.width,{}),marker:qh.marker,text:qh.text,hovertext:qh.hovertext,hovertemplate:qh.hovertemplate,hovertemplatefallback:qh.hovertemplatefallback,quartilemethod:qh.quartilemethod,box:{visible:{valType:"boolean",dflt:!1,editType:"plot"},width:{valType:"number",min:0,max:1,dflt:.25,editType:"plot"},fillcolor:{valType:"color",editType:"style"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"plot"},meanline:{visible:{valType:"boolean",dflt:!1,editType:"plot"},color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"plot"},side:{valType:"enumerated",values:["both","positive","negative"],dflt:"both",editType:"calc"},offsetgroup:qh.offsetgroup,alignmentgroup:qh.alignmentgroup,selected:qh.selected,unselected:qh.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"},zorder:qh.zorder}});var XG=ye((nfr,X2e)=>{"use strict";var jG=C4(),WG=Dr().extendFlat;X2e.exports={violinmode:WG({},jG.boxmode,{}),violingap:WG({},jG.boxgap,{}),violingroupgap:WG({},jG.boxgroupgap,{})}});var $2e=ye((afr,J2e)=>{"use strict";var Z2e=Dr(),gwt=ka(),Y2e=P4(),K2e=HG();J2e.exports=function(t,r,n,i){function a(L,x){return Z2e.coerce(t,r,K2e,L,x)}function o(L,x){return Z2e.coerce2(t,r,K2e,L,x)}if(Y2e.handleSampleDefaults(t,r,a,i),r.visible!==!1){a("bandwidth"),a("side");var s=a("width");s||(a("scalegroup",r.name),a("scalemode"));var l=a("span"),u;Array.isArray(l)&&(u="manual"),a("spanmode",u);var c=a("line.color",(t.marker||{}).color||n),f=a("line.width"),h=a("fillcolor",gwt.addOpacity(r.line.color,.5));Y2e.handlePointsDefaults(t,r,a,{prefix:""});var d=o("box.width"),v=o("box.fillcolor",h),_=o("box.line.color",c),b=o("box.line.width",f),p=a("box.visible",!!(d||v||_||b));p||(r.box={visible:!1});var k=o("meanline.color",c),E=o("meanline.width",f),T=a("meanline.visible",!!(k||E));T||(r.meanline={visible:!1}),a("quartilemethod"),a("zorder")}}});var ewe=ye((ofr,Q2e)=>{"use strict";var mwt=Dr(),ywt=XG(),_wt=$I();Q2e.exports=function(t,r,n){function i(a,o){return mwt.coerce(t,r,ywt,a,o)}_wt._supply(t,r,n,i,"violin")}});var U8=ye(g2=>{"use strict";var xwt=Dr(),bwt={gaussian:function(e){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*e*e)}};g2.makeKDE=function(e,t,r){var n=r.length,i=bwt.gaussian,a=e.bandwidth,o=1/(n*a);return function(s){for(var l=0,u=0;u{"use strict";var ZG=Dr(),YG=ho(),wwt=NV(),twe=U8(),Twt=fs().BADNUM;rwe.exports=function(t,r){var n=wwt(t,r);if(n[0].t.empty)return n;for(var i=t._fullLayout,a=YG.getFromId(t,r[r.orientation==="h"?"xaxis":"yaxis"]),o=1/0,s=-1/0,l=0,u=0,c=0;c{"use strict";var Ewt=e8().setPositionOffset,nwe=["v","h"];awe.exports=function(t,r){for(var n=t.calcdata,i=r.xaxis,a=r.yaxis,o=0;o{"use strict";var KG=Oa(),JG=Dr(),kwt=So(),$G=t8(),Cwt=AU(),Lwt=U8();swe.exports=function(t,r,n,i){var a=t._context.staticPlot,o=t._fullLayout,s=r.xaxis,l=r.yaxis;function u(c,f){var h=Cwt(c,{xaxis:s,yaxis:l,trace:f,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return kwt.smoothopen(h[0],1)}JG.makeTraceGroups(i,n,"trace violins").each(function(c){var f=KG.select(this),h=c[0],d=h.t,v=h.trace;if(v.visible!==!0||d.empty){f.remove();return}var _=d.bPos,b=d.bdPos,p=r[d.valLetter+"axis"],k=r[d.posLetter+"axis"],E=v.side==="both",T=E||v.side==="positive",L=E||v.side==="negative",x=f.selectAll("path.violin").data(JG.identity);x.enter().append("path").style("vector-effect",a?"none":"non-scaling-stroke").attr("class","violin"),x.exit().remove(),x.each(function(U){var G=KG.select(this),Z=U.density,j=Z.length,N=k.c2l(U.pos+_,!0),H=k.l2p(N),re;if(v.width)re=d.maxKDE/b;else{var oe=o._violinScaleGroupStats[v.scalegroup];re=v.scalemode==="count"?oe.maxKDE/b*(oe.maxCount/U.pts.length):oe.maxKDE/b}var _e,Ce,Le,ge,ie,Se,Ee;if(T){for(Se=new Array(j),ge=0;ge{"use strict";var uwe=Oa(),ZT=ka(),Pwt=sp().stylePoints;cwe.exports=function(t){var r=uwe.select(t).selectAll("g.trace.violins");r.style("opacity",function(n){return n[0].trace.opacity}),r.each(function(n){var i=n[0].trace,a=uwe.select(this),o=i.box||{},s=o.line||{},l=i.meanline||{},u=l.width;a.selectAll("path.violin").style("stroke-width",i.line.width+"px").call(ZT.stroke,i.line.color).call(ZT.fill,i.fillcolor),a.selectAll("path.box").style("stroke-width",s.width+"px").call(ZT.stroke,s.color).call(ZT.fill,o.fillcolor);var c={"stroke-width":u+"px","stroke-dasharray":2*u+"px,"+u+"px"};a.selectAll("path.mean").style(c).call(ZT.stroke,l.color),a.selectAll("path.meanline").style(c).call(ZT.stroke,l.color),Pwt(a,i,t)})}});var pwe=ye((hfr,vwe)=>{"use strict";var Iwt=ka(),QG=Dr(),Rwt=ho(),hwe=jV(),dwe=U8();vwe.exports=function(t,r,n,i,a){a||(a={});var o=a.hoverLayer,s=t.cd,l=s[0].trace,u=l.hoveron,c=u.indexOf("violins")!==-1,f=u.indexOf("kde")!==-1,h=[],d,v;if(c||f){var _=hwe.hoverOnBoxes(t,r,n,i);if(f&&_.length>0){var b=t.xa,p=t.ya,k,E,T,L,x;l.orientation==="h"?(x=r,k="y",T=p,E="x",L=b):(x=n,k="x",T=b,E="y",L=p);var C=s[t.index];if(x>=C.span[0]&&x<=C.span[1]){var M=QG.extendFlat({},t),g=L.c2p(x,!0),P=dwe.getKdeValue(C,l,x),A=dwe.getPositionOnKdePath(C,l,g),z=T._offset,O=T._length;M[k+"0"]=A[0],M[k+"1"]=A[1],M[E+"0"]=M[E+"1"]=g,M[E+"Label"]=E+": "+Rwt.hoverLabelText(L,x,l[E+"hoverformat"])+", "+s[0].t.labels.kde+" "+P.toFixed(3);for(var U=0,G=0;G<_.length;G++)if(_[G].attr==="med"){U=G;break}M.spikeDistance=_[U].spikeDistance;var Z=k+"Spike";M[Z]=_[U][Z],_[U].spikeDistance=void 0,_[U][Z]=void 0,M.hovertemplate=!1,h.push(M),v={},v[k+"1"]=QG.constrain(z+A[0],z,z+O),v[k+"2"]=QG.constrain(z+A[1],z,z+O),v[E+"1"]=v[E+"2"]=L._offset+g}}c&&(h=h.concat(_))}u.indexOf("points")!==-1&&(d=hwe.hoverOnPoints(t,r,n));var j=o.selectAll(".violinline-"+l.uid).data(v?[0]:[]);return j.enter().append("line").classed("violinline-"+l.uid,!0).attr("stroke-width",1.5),j.exit().remove(),j.attr(v).call(Iwt.stroke,t.color),i==="closest"?d?[d]:h:(d&&h.push(d),h)}});var mwe=ye((dfr,gwe)=>{"use strict";gwe.exports={attributes:HG(),layoutAttributes:XG(),supplyDefaults:$2e(),crossTraceDefaults:P4().crossTraceDefaults,supplyLayoutDefaults:ewe(),calc:iwe(),crossTraceCalc:owe(),plot:lwe(),style:fwe(),styleOnSelect:sp().styleOnSelect,hoverPoints:pwe(),selectPoints:WV(),moduleType:"trace",name:"violin",basePlotModule:mh(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}});var _we=ye((vfr,ywe)=>{"use strict";ywe.exports=mwe()});var bwe=ye((pfr,xwe)=>{"use strict";xwe.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}});var tH=ye((gfr,Swe)=>{"use strict";var jc=zm(),eH=pf().line,Dwt=Gl(),wwe=df().axisHoverFormat,{hovertemplateAttrs:Fwt,texttemplateAttrs:zwt,templatefallbackAttrs:Twe}=Ll(),Awe=bwe(),Xy=Ao().extendFlat,Owt=ka();Swe.exports={x:jc.x,x0:jc.x0,dx:jc.dx,y:jc.y,y0:jc.y0,dy:jc.dy,xperiod:jc.xperiod,yperiod:jc.yperiod,xperiod0:jc.xperiod0,yperiod0:jc.yperiod0,xperiodalignment:jc.xperiodalignment,yperiodalignment:jc.yperiodalignment,xhoverformat:wwe("x"),yhoverformat:wwe("y"),hovertext:jc.hovertext,hovertemplate:Fwt({},{keys:Awe.eventDataKeys}),hovertemplatefallback:Twe(),hoverinfo:Xy({},Dwt.hoverinfo,{flags:["name","x","y","text","percent initial","percent previous","percent total"]}),textinfo:{valType:"flaglist",flags:["label","text","percent initial","percent previous","percent total","value"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:zwt({editType:"plot"},{keys:Awe.eventDataKeys.concat(["label","value"])}),texttemplatefallback:Twe({editType:"plot"}),text:jc.text,textposition:jc.textposition,insidetextanchor:Xy({},jc.insidetextanchor,{dflt:"middle"}),textangle:Xy({},jc.textangle,{dflt:0}),textfont:jc.textfont,insidetextfont:jc.insidetextfont,outsidetextfont:jc.outsidetextfont,constraintext:jc.constraintext,cliponaxis:jc.cliponaxis,orientation:Xy({},jc.orientation,{}),offset:Xy({},jc.offset,{arrayOk:!1}),width:Xy({},jc.width,{arrayOk:!1}),marker:qwt(),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:Xy({},eH.color,{dflt:Owt.defaultLine}),width:Xy({},eH.width,{dflt:0,editType:"plot"}),dash:eH.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:jc.offsetgroup,alignmentgroup:jc.alignmentgroup,zorder:jc.zorder};function qwt(){var e=Xy({},jc.marker);return delete e.pattern,delete e.cornerradius,e}});var rH=ye((mfr,Mwe)=>{"use strict";Mwe.exports={funnelmode:{valType:"enumerated",values:["stack","group","overlay"],dflt:"stack",editType:"calc"},funnelgap:{valType:"number",min:0,max:1,editType:"calc"},funnelgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}});var nH=ye((yfr,kwe)=>{"use strict";var V8=Dr(),Bwt=e2(),Nwt=i0().handleText,Uwt=oT(),Vwt=Dg(),Ewe=tH(),iH=ka();function Gwt(e,t,r,n){function i(f,h){return V8.coerce(e,t,Ewe,f,h)}var a=Uwt(e,t,n,i);if(!a){t.visible=!1;return}Vwt(e,t,n,i),i("xhoverformat"),i("yhoverformat"),i("orientation",t.y&&!t.x?"v":"h"),i("offset"),i("width");var o=i("text");i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var s=i("textposition");Nwt(e,t,n,i,s,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&!t.texttemplate&&i("textinfo",V8.isArrayOrTypedArray(o)?"text+value":"value");var l=i("marker.color",r);i("marker.line.color",iH.defaultLine),i("marker.line.width");var u=i("connector.visible");if(u){i("connector.fillcolor",Hwt(l));var c=i("connector.line.width");c&&(i("connector.line.color"),i("connector.line.dash"))}i("zorder")}function Hwt(e){var t=V8.isArrayOrTypedArray(e)?"#000":e;return iH.addOpacity(t,.5*iH.opacity(t))}function jwt(e,t){var r,n;function i(o){return V8.coerce(n._input,n,Ewe,o)}for(var a=0;a{"use strict";var Wwt=Dr(),Xwt=rH();Cwe.exports=function(e,t,r){var n=!1;function i(s,l){return Wwt.coerce(e,t,Xwt,s,l)}for(var a=0;a{"use strict";var YT=Dr();Pwe.exports=function(t,r){for(var n=0;n{"use strict";var Rwe=ho(),Dwe=zg(),Zwt=Iwe(),Ywt=O0(),j4=fs().BADNUM;Fwe.exports=function(t,r){var n=Rwe.getFromId(t,r.xaxis||"x"),i=Rwe.getFromId(t,r.yaxis||"y"),a,o,s,l,u,c,f,h;r.orientation==="h"?(a=n.makeCalcdata(r,"x"),s=i.makeCalcdata(r,"y"),l=Dwe(r,i,"y",s),u=!!r.yperiodalignment,c="y"):(a=i.makeCalcdata(r,"y"),s=n.makeCalcdata(r,"x"),l=Dwe(r,n,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;var d=Math.min(o.length,a.length),v=new Array(d);for(r._base=[],f=0;f{"use strict";var Owe=t2().setGroupPositions;qwe.exports=function(t,r){var n=t._fullLayout,i=t._fullData,a=t.calcdata,o=r.xaxis,s=r.yaxis,l=[],u=[],c=[],f,h;for(h=0;h{"use strict";var G8=Oa(),B_=Dr(),Nwe=So(),q_=fs().BADNUM,Kwt=d2(),Jwt=bv().clearMinTextSize;Vwe.exports=function(t,r,n,i){var a=t._fullLayout;Jwt("funnel",a),$wt(t,r,n,i),Qwt(t,r,n,i),Kwt.plot(t,r,n,i,{mode:a.funnelmode,norm:a.funnelmode,gap:a.funnelgap,groupgap:a.funnelgroupgap})};function $wt(e,t,r,n){var i=t.xaxis,a=t.yaxis;B_.makeTraceGroups(n,r,"trace bars").each(function(o){var s=G8.select(this),l=o[0].trace,u=B_.ensureSingle(s,"g","regions");if(!l.connector||!l.connector.visible){u.remove();return}var c=l.orientation==="h",f=u.selectAll("g.region").data(B_.identity);f.enter().append("g").classed("region",!0),f.exit().remove();var h=f.size();f.each(function(d,v){if(!(v!==h-1&&!d.cNext)){var _=Uwe(d,i,a,c),b=_[0],p=_[1],k="";b[0]!==q_&&p[0]!==q_&&b[1]!==q_&&p[1]!==q_&&b[2]!==q_&&p[2]!==q_&&b[3]!==q_&&p[3]!==q_&&(c?k+="M"+b[0]+","+p[1]+"L"+b[2]+","+p[2]+"H"+b[3]+"L"+b[1]+","+p[1]+"Z":k+="M"+b[1]+","+p[1]+"L"+b[2]+","+p[3]+"V"+p[2]+"L"+b[1]+","+p[0]+"Z"),k===""&&(k="M0,0Z"),B_.ensureSingle(G8.select(this),"path").attr("d",k).call(Nwe.setClipUrl,t.layerClipId,e)}})})}function Qwt(e,t,r,n){var i=t.xaxis,a=t.yaxis;B_.makeTraceGroups(n,r,"trace bars").each(function(o){var s=G8.select(this),l=o[0].trace,u=B_.ensureSingle(s,"g","lines");if(!l.connector||!l.connector.visible||!l.connector.line.width){u.remove();return}var c=l.orientation==="h",f=u.selectAll("g.line").data(B_.identity);f.enter().append("g").classed("line",!0),f.exit().remove();var h=f.size();f.each(function(d,v){if(!(v!==h-1&&!d.cNext)){var _=Uwe(d,i,a,c),b=_[0],p=_[1],k="";b[3]!==void 0&&p[3]!==void 0&&(c?(k+="M"+b[0]+","+p[1]+"L"+b[2]+","+p[2],k+="M"+b[1]+","+p[1]+"L"+b[3]+","+p[2]):(k+="M"+b[1]+","+p[1]+"L"+b[2]+","+p[3],k+="M"+b[1]+","+p[0]+"L"+b[2]+","+p[2])),k===""&&(k="M0,0Z"),B_.ensureSingle(G8.select(this),"path").attr("d",k).call(Nwe.setClipUrl,t.layerClipId,e)}})})}function Uwe(e,t,r,n){var i=[],a=[],o=n?t:r,s=n?r:t;return i[0]=o.c2p(e.s0,!0),a[0]=s.c2p(e.p0,!0),i[1]=o.c2p(e.s1,!0),a[1]=s.c2p(e.p1,!0),i[2]=o.c2p(e.nextS0,!0),a[2]=s.c2p(e.nextP0,!0),i[3]=o.c2p(e.nextS1,!0),a[3]=s.c2p(e.nextP1,!0),n?[i,a]:[a,i]}});var Wwe=ye((Afr,jwe)=>{"use strict";var W4=Oa(),Hwe=So(),oH=ka(),e3t=X1().DESELECTDIM,t3t=V0(),r3t=bv().resizeText,i3t=t3t.styleTextPoints;function n3t(e,t,r){var n=r||W4.select(e).selectAll('g[class^="funnellayer"]').selectAll("g.trace");r3t(e,n,"funnel"),n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var a=W4.select(this),o=i[0].trace;a.selectAll(".point > path").each(function(s){if(!s.isBlank){var l=o.marker;W4.select(this).call(oH.fill,s.mc||l.color).call(oH.stroke,s.mlc||l.line.color).call(Hwe.dashLine,l.line.dash,s.mlw||l.line.width).style("opacity",o.selectedpoints&&!s.selected?e3t:1)}}),i3t(a,o,e),a.selectAll(".regions").each(function(){W4.select(this).selectAll("path").style("stroke-width",0).call(oH.fill,o.connector.fillcolor)}),a.selectAll(".lines").each(function(){var s=o.connector.line;Hwe.lineGroupStyle(W4.select(this).selectAll("path"),s.width,s.color,s.dash)})})}jwe.exports={style:n3t}});var Ywe=ye((Sfr,Zwe)=>{"use strict";var Xwe=ka().opacity,a3t=PT().hoverOnBars,sH=Dr().formatPercent;Zwe.exports=function(t,r,n,i,a){var o=a3t(t,r,n,i,a);if(o){var s=o.cd,l=s[0].trace,u=l.orientation==="h",c=o.index,f=s[c],h=u?"x":"y";o[h+"LabelVal"]=f.s,o.percentInitial=f.begR,o.percentInitialLabel=sH(f.begR,1),o.percentPrevious=f.difR,o.percentPreviousLabel=sH(f.difR,1),o.percentTotal=f.sumR,o.percentTotalLabel=sH(f.sumR,1);var d=f.hi||l.hoverinfo,v=[];if(d&&d!=="none"&&d!=="skip"){var _=d==="all",b=d.split("+"),p=function(k){return _||b.indexOf(k)!==-1};p("percent initial")&&v.push(o.percentInitialLabel+" of initial"),p("percent previous")&&v.push(o.percentPreviousLabel+" of previous"),p("percent total")&&v.push(o.percentTotalLabel+" of total")}return o.extraText=v.join("
"),o.color=o3t(l,f),[o]}};function o3t(e,t){var r=e.marker,n=t.mc||r.color,i=t.mlc||r.line.color,a=t.mlw||r.line.width;if(Xwe(n))return n;if(Xwe(i)&&a)return i}});var Jwe=ye((Mfr,Kwe)=>{"use strict";Kwe.exports=function(t,r){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"percentInitial"in r&&(t.percentInitial=r.percentInitial),"percentPrevious"in r&&(t.percentPrevious=r.percentPrevious),"percentTotal"in r&&(t.percentTotal=r.percentTotal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var Qwe=ye((Efr,$we)=>{"use strict";$we.exports={attributes:tH(),layoutAttributes:rH(),supplyDefaults:nH().supplyDefaults,crossTraceDefaults:nH().crossTraceDefaults,supplyLayoutDefaults:Lwe(),calc:zwe(),crossTraceCalc:Bwe(),plot:Gwe(),style:Wwe().style,hoverPoints:Ywe(),eventData:Jwe(),selectPoints:IT(),moduleType:"trace",name:"funnel",basePlotModule:mh(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var t3e=ye((kfr,e3e)=>{"use strict";e3e.exports=Qwe()});var i3e=ye((Cfr,r3e)=>{"use strict";r3e.exports={eventDataKeys:["initial","delta","final"]}});var cH=ye((Lfr,s3e)=>{"use strict";var _c=zm(),lH=pf().line,s3t=Gl(),n3e=df().axisHoverFormat,{hovertemplateAttrs:l3t,texttemplateAttrs:u3t,templatefallbackAttrs:a3e}=Ll(),o3e=i3e(),KT=Ao().extendFlat,c3t=ka();function uH(e){return{marker:{color:KT({},_c.marker.color,{arrayOk:!1,editType:"style"}),line:{color:KT({},_c.marker.line.color,{arrayOk:!1,editType:"style"}),width:KT({},_c.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}s3e.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:_c.x,x0:_c.x0,dx:_c.dx,y:_c.y,y0:_c.y0,dy:_c.dy,xperiod:_c.xperiod,yperiod:_c.yperiod,xperiod0:_c.xperiod0,yperiod0:_c.yperiod0,xperiodalignment:_c.xperiodalignment,yperiodalignment:_c.yperiodalignment,xhoverformat:n3e("x"),yhoverformat:n3e("y"),hovertext:_c.hovertext,hovertemplate:l3t({},{keys:o3e.eventDataKeys}),hovertemplatefallback:a3e(),hoverinfo:KT({},s3t.hoverinfo,{flags:["name","x","y","text","initial","delta","final"]}),textinfo:{valType:"flaglist",flags:["label","text","initial","delta","final"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:u3t({editType:"plot"},{keys:o3e.eventDataKeys.concat(["label"])}),texttemplatefallback:a3e({editType:"plot"}),text:_c.text,textposition:_c.textposition,insidetextanchor:_c.insidetextanchor,textangle:_c.textangle,textfont:_c.textfont,insidetextfont:_c.insidetextfont,outsidetextfont:_c.outsidetextfont,constraintext:_c.constraintext,cliponaxis:_c.cliponaxis,orientation:_c.orientation,offset:_c.offset,width:_c.width,increasing:uH("increasing"),decreasing:uH("decreasing"),totals:uH("intermediate sums and total"),connector:{line:{color:KT({},lH.color,{dflt:c3t.defaultLine}),width:KT({},lH.width,{editType:"plot"}),dash:lH.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:_c.offsetgroup,alignmentgroup:_c.alignmentgroup,zorder:_c.zorder}});var fH=ye((Pfr,l3e)=>{"use strict";l3e.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc"},waterfallgap:{valType:"number",min:0,max:1,editType:"calc"},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}});var JT=ye((Ifr,u3e)=>{"use strict";u3e.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}});var dH=ye((Rfr,d3e)=>{"use strict";var c3e=Dr(),f3t=e2(),h3t=i0().handleText,d3t=oT(),v3t=Dg(),f3e=cH(),p3t=ka(),h3e=JT(),g3t=h3e.INCREASING.COLOR,m3t=h3e.DECREASING.COLOR,y3t="#4499FF";function hH(e,t,r){e(t+".marker.color",r),e(t+".marker.line.color",p3t.defaultLine),e(t+".marker.line.width")}function _3t(e,t,r,n){function i(u,c){return c3e.coerce(e,t,f3e,u,c)}var a=d3t(e,t,n,i);if(!a){t.visible=!1;return}v3t(e,t,n,i),i("xhoverformat"),i("yhoverformat"),i("measure"),i("orientation",t.x&&!t.y?"h":"v"),i("base"),i("offset"),i("width"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var o=i("textposition");h3t(e,t,n,i,o,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&(i("texttemplate"),i("texttemplatefallback"),t.texttemplate||i("textinfo")),hH(i,"increasing",g3t),hH(i,"decreasing",m3t),hH(i,"totals",y3t);var s=i("connector.visible");if(s){i("connector.mode");var l=i("connector.line.width");l&&(i("connector.line.color"),i("connector.line.dash"))}i("zorder")}function x3t(e,t){var r,n;function i(o){return c3e.coerce(n._input,n,f3e,o)}if(t.waterfallmode==="group")for(var a=0;a{"use strict";var b3t=Dr(),w3t=fH();v3e.exports=function(e,t,r){var n=!1;function i(s,l){return b3t.coerce(e,t,w3t,s,l)}for(var a=0;a{"use strict";var g3e=ho(),m3e=zg(),y3e=Dr().mergeArray,T3t=O0(),_3e=fs().BADNUM;function vH(e){return e==="a"||e==="absolute"}function pH(e){return e==="t"||e==="total"}x3e.exports=function(t,r){var n=g3e.getFromId(t,r.xaxis||"x"),i=g3e.getFromId(t,r.yaxis||"y"),a,o,s,l,u,c;r.orientation==="h"?(a=n.makeCalcdata(r,"x"),s=i.makeCalcdata(r,"y"),l=m3e(r,i,"y",s),u=!!r.yperiodalignment,c="y"):(a=i.makeCalcdata(r,"y"),s=n.makeCalcdata(r,"x"),l=m3e(r,n,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;for(var f=Math.min(o.length,a.length),h=new Array(f),d=0,v,_=!1,b=0;b{"use strict";var w3e=t2().setGroupPositions;T3e.exports=function(t,r){var n=t._fullLayout,i=t._fullData,a=t.calcdata,o=r.xaxis,s=r.yaxis,l=[],u=[],c=[],f,h;for(h=0;h{"use strict";var S3e=Oa(),H8=Dr(),A3t=So(),$T=fs().BADNUM,S3t=d2(),M3t=bv().clearMinTextSize;M3e.exports=function(t,r,n,i){var a=t._fullLayout;M3t("waterfall",a),S3t.plot(t,r,n,i,{mode:a.waterfallmode,norm:a.waterfallmode,gap:a.waterfallgap,groupgap:a.waterfallgroupgap}),E3t(t,r,n,i)};function E3t(e,t,r,n){var i=t.xaxis,a=t.yaxis;H8.makeTraceGroups(n,r,"trace bars").each(function(o){var s=S3e.select(this),l=o[0].trace,u=H8.ensureSingle(s,"g","lines");if(!l.connector||!l.connector.visible){u.remove();return}var c=l.orientation==="h",f=l.connector.mode,h=u.selectAll("g.line").data(H8.identity);h.enter().append("g").classed("line",!0),h.exit().remove();var d=h.size();h.each(function(v,_){if(!(_!==d-1&&!v.cNext)){var b=k3t(v,i,a,c),p=b[0],k=b[1],E="";p[0]!==$T&&k[0]!==$T&&p[1]!==$T&&k[1]!==$T&&(f==="spanning"&&!v.isSum&&_>0&&(c?E+="M"+p[0]+","+k[1]+"V"+k[0]:E+="M"+p[1]+","+k[0]+"H"+p[0]),f!=="between"&&(v.isSum||_{"use strict";var j8=Oa(),k3e=So(),C3e=ka(),C3t=X1().DESELECTDIM,L3t=V0(),P3t=bv().resizeText,I3t=L3t.styleTextPoints;function R3t(e,t,r){var n=r||j8.select(e).selectAll('g[class^="waterfalllayer"]').selectAll("g.trace");P3t(e,n,"waterfall"),n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var a=j8.select(this),o=i[0].trace;a.selectAll(".point > path").each(function(s){if(!s.isBlank){var l=o[s.dir].marker;j8.select(this).call(C3e.fill,l.color).call(C3e.stroke,l.line.color).call(k3e.dashLine,l.line.dash,l.line.width).style("opacity",o.selectedpoints&&!s.selected?C3t:1)}}),I3t(a,o,e),a.selectAll(".lines").each(function(){var s=o.connector.line;k3e.lineGroupStyle(j8.select(this).selectAll("path"),s.width,s.color,s.dash)})})}L3e.exports={style:R3t}});var z3e=ye((Bfr,F3e)=>{"use strict";var D3t=ho().hoverLabelText,I3e=ka().opacity,F3t=PT().hoverOnBars,R3e=JT(),D3e={increasing:R3e.INCREASING.SYMBOL,decreasing:R3e.DECREASING.SYMBOL};F3e.exports=function(t,r,n,i,a){var o=F3t(t,r,n,i,a);if(!o)return;var s=o.cd,l=s[0].trace,u=l.orientation==="h",c=u?"x":"y",f=u?t.xa:t.ya;function h(x){return D3t(f,x,l[c+"hoverformat"])}var d=o.index,v=s[d],_=v.isSum?v.b+v.s:v.rawS;o.initial=v.b+v.s-_,o.delta=_,o.final=o.initial+o.delta;var b=h(Math.abs(o.delta));o.deltaLabel=_<0?"("+b+")":b,o.finalLabel=h(o.final),o.initialLabel=h(o.initial);var p=v.hi||l.hoverinfo,k=[];if(p&&p!=="none"&&p!=="skip"){var E=p==="all",T=p.split("+"),L=function(x){return E||T.indexOf(x)!==-1};v.isSum||(L("final")&&(u?!L("x"):!L("y"))&&k.push(o.finalLabel),L("delta")&&(_<0?k.push(o.deltaLabel+" "+D3e.decreasing):k.push(o.deltaLabel+" "+D3e.increasing)),L("initial")&&k.push("Initial: "+o.initialLabel))}return k.length&&(o.extraText=k.join("
")),o.color=z3t(l,v),[o]};function z3t(e,t){var r=e[t.dir].marker,n=r.color,i=r.line.color,a=r.line.width;if(I3e(n))return n;if(I3e(i)&&a)return i}});var q3e=ye((Nfr,O3e)=>{"use strict";O3e.exports=function(t,r){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"initial"in r&&(t.initial=r.initial),"delta"in r&&(t.delta=r.delta),"final"in r&&(t.final=r.final),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var N3e=ye((Ufr,B3e)=>{"use strict";B3e.exports={attributes:cH(),layoutAttributes:fH(),supplyDefaults:dH().supplyDefaults,crossTraceDefaults:dH().crossTraceDefaults,supplyLayoutDefaults:p3e(),calc:b3e(),crossTraceCalc:A3e(),plot:E3e(),style:P3e().style,hoverPoints:z3e(),eventData:q3e(),selectPoints:IT(),moduleType:"trace",name:"waterfall",basePlotModule:mh(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var V3e=ye((Vfr,U3e)=>{"use strict";U3e.exports=N3e()});var QT=ye((Gfr,G3e)=>{"use strict";G3e.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(e){return e.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:["","","",""]},rgba256:{colormodel:"rgba",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(e){var t=e.slice(0,3);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(e){var t=e.slice(0,4);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xB0","%","%",""]}}}});var gH=ye((Hfr,j3e)=>{"use strict";var O3t=Gl(),q3t=pf().zorder,{hovertemplateAttrs:B3t,templatefallbackAttrs:N3t}=Ll(),H3e=Ao().extendFlat,U3t=QT().colormodel,Z4=["rgb","rgba","rgba256","hsl","hsla"],V3t=[],G3t=[];for(eA=0;eA{"use strict";var H3t=Dr(),j3t=gH(),W3e=QT(),W3t=Oy().IMAGE_URL_PREFIX;X3e.exports=function(t,r){function n(o,s){return H3t.coerce(t,r,j3t,o,s)}n("source"),r.source&&!r.source.match(W3t)&&delete r.source,r._hasSource=!!r.source;var i=n("z");if(r._hasZ=!(i===void 0||!i.length||!i[0]||!i[0].length),!r._hasZ&&!r._hasSource){r.visible=!1;return}n("x0"),n("y0"),n("dx"),n("dy");var a;r._hasZ?(n("colormodel","rgb"),a=W3e.colormodel[r.colormodel],n("zmin",a.zminDflt||a.min),n("zmax",a.zmaxDflt||a.max)):r._hasSource&&(r.colormodel="rgba256",a=W3e.colormodel[r.colormodel],r.zmin=a.zminDflt,r.zmax=a.zmaxDflt),n("zsmooth"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),r._length=null,n("zorder")}});var Zy=ye((Wfr,mH)=>{typeof Object.create=="function"?mH.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:mH.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}});var yH=ye((Xfr,Y3e)=>{Y3e.exports=Ab().EventEmitter});var $3e=ye(W8=>{"use strict";W8.byteLength=Z3t;W8.toByteArray=K3t;W8.fromByteArray=Q3t;var Gm=[],Y0=[],X3t=typeof Uint8Array!="undefined"?Uint8Array:Array,_H="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(m2=0,K3e=_H.length;m20)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function Z3t(e){var t=J3e(e),r=t[0],n=t[1];return(r+n)*3/4-n}function Y3t(e,t,r){return(t+r)*3/4-r}function K3t(e){var t,r=J3e(e),n=r[0],i=r[1],a=new X3t(Y3t(e,n,i)),o=0,s=i>0?n-4:n,l;for(l=0;l>16&255,a[o++]=t>>8&255,a[o++]=t&255;return i===2&&(t=Y0[e.charCodeAt(l)]<<2|Y0[e.charCodeAt(l+1)]>>4,a[o++]=t&255),i===1&&(t=Y0[e.charCodeAt(l)]<<10|Y0[e.charCodeAt(l+1)]<<4|Y0[e.charCodeAt(l+2)]>>2,a[o++]=t>>8&255,a[o++]=t&255),a}function J3t(e){return Gm[e>>18&63]+Gm[e>>12&63]+Gm[e>>6&63]+Gm[e&63]}function $3t(e,t,r){for(var n,i=[],a=t;as?s:o+a));return n===1?(t=e[r-1],i.push(Gm[t>>2]+Gm[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],i.push(Gm[t>>10]+Gm[t>>4&63]+Gm[t<<2&63]+"=")),i.join("")}});var Q3e=ye(xH=>{xH.read=function(e,t,r,n,i){var a,o,s=i*8-n-1,l=(1<>1,c=-7,f=r?i-1:0,h=r?-1:1,d=e[t+f];for(f+=h,a=d&(1<<-c)-1,d>>=-c,c+=s;c>0;a=a*256+e[t+f],f+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=o*256+e[t+f],f+=h,c-=8);if(a===0)a=1-u;else{if(a===l)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,n),a=a-u}return(d?-1:1)*o*Math.pow(2,a-n)};xH.write=function(e,t,r,n,i,a){var o,s,l,u=a*8-i-1,c=(1<>1,h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,v=n?1:-1,_=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+f>=1?t+=h/l:t+=h*Math.pow(2,1-f),t*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*l-1)*Math.pow(2,i),o=o+f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[r+d]=s&255,d+=v,s/=256,i-=8);for(o=o<0;e[r+d]=o&255,d+=v,o/=256,u-=8);e[r+d-v]|=_*128}});var _2=ye(nA=>{"use strict";var bH=$3e(),rA=Q3e(),eTe=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;nA.Buffer=ea;nA.SlowBuffer=aTt;nA.INSPECT_MAX_BYTES=50;var X8=2147483647;nA.kMaxLength=X8;ea.TYPED_ARRAY_SUPPORT=eTt();!ea.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function eTt(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch(e){return!1}}Object.defineProperty(ea.prototype,"parent",{enumerable:!0,get:function(){if(ea.isBuffer(this))return this.buffer}});Object.defineProperty(ea.prototype,"offset",{enumerable:!0,get:function(){if(ea.isBuffer(this))return this.byteOffset}});function Yy(e){if(e>X8)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,ea.prototype),t}function ea(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return SH(e)}return nTe(e,t,r)}ea.poolSize=8192;function nTe(e,t,r){if(typeof e=="string")return rTt(e,t);if(ArrayBuffer.isView(e))return iTt(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Hm(e,ArrayBuffer)||e&&Hm(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(Hm(e,SharedArrayBuffer)||e&&Hm(e.buffer,SharedArrayBuffer)))return TH(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return ea.from(n,t,r);let i=nTt(e);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return ea.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}ea.from=function(e,t,r){return nTe(e,t,r)};Object.setPrototypeOf(ea.prototype,Uint8Array.prototype);Object.setPrototypeOf(ea,Uint8Array);function aTe(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function tTt(e,t,r){return aTe(e),e<=0?Yy(e):t!==void 0?typeof r=="string"?Yy(e).fill(t,r):Yy(e).fill(t):Yy(e)}ea.alloc=function(e,t,r){return tTt(e,t,r)};function SH(e){return aTe(e),Yy(e<0?0:MH(e)|0)}ea.allocUnsafe=function(e){return SH(e)};ea.allocUnsafeSlow=function(e){return SH(e)};function rTt(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!ea.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=oTe(e,t)|0,n=Yy(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function wH(e){let t=e.length<0?0:MH(e.length)|0,r=Yy(t);for(let n=0;n=X8)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+X8.toString(16)+" bytes");return e|0}function aTt(e){return+e!=e&&(e=0),ea.alloc(+e)}ea.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==ea.prototype};ea.compare=function(t,r){if(Hm(t,Uint8Array)&&(t=ea.from(t,t.offset,t.byteLength)),Hm(r,Uint8Array)&&(r=ea.from(r,r.offset,r.byteLength)),!ea.isBuffer(t)||!ea.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;let n=t.length,i=r.length;for(let a=0,o=Math.min(n,i);ai.length?(ea.isBuffer(o)||(o=ea.from(o)),o.copy(i,a)):Uint8Array.prototype.set.call(i,o,a);else if(ea.isBuffer(o))o.copy(i,a);else throw new TypeError('"list" argument must be an Array of Buffers');a+=o.length}return i};function oTe(e,t){if(ea.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Hm(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return AH(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return pTe(e).length;default:if(i)return n?-1:AH(e).length;t=(""+t).toLowerCase(),i=!0}}ea.byteLength=oTe;function oTt(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return gTt(this,t,r);case"utf8":case"utf-8":return lTe(this,t,r);case"ascii":return vTt(this,t,r);case"latin1":case"binary":return pTt(this,t,r);case"base64":return hTt(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return mTt(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}ea.prototype._isBuffer=!0;function y2(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}ea.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;rr&&(t+=" ... "),""};eTe&&(ea.prototype[eTe]=ea.prototype.inspect);ea.prototype.compare=function(t,r,n,i,a){if(Hm(t,Uint8Array)&&(t=ea.from(t,t.offset,t.byteLength)),!ea.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),a===void 0&&(a=this.length),r<0||n>t.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&r>=n)return 0;if(i>=a)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,a>>>=0,this===t)return 0;let o=a-i,s=n-r,l=Math.min(o,s),u=this.slice(i,a),c=t.slice(r,n);for(let f=0;f2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,kH(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=ea.from(t,n)),ea.isBuffer(t))return t.length===0?-1:tTe(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):tTe(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function tTe(e,t,r,n,i){let a=1,o=e.length,s=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;a=2,o/=2,s/=2,r/=2}function l(c,f){return a===1?c[f]:c.readUInt16BE(f*a)}let u;if(i){let c=-1;for(u=r;uo&&(r=o-s),u=r;u>=0;u--){let c=!0;for(let f=0;fi&&(n=i)):n=i;let a=t.length;n>a/2&&(n=a/2);let o;for(o=0;o>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let a=this.length-r;if((n===void 0||n>a)&&(n=a),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let o=!1;for(;;)switch(i){case"hex":return sTt(this,t,r,n);case"utf8":case"utf-8":return lTt(this,t,r,n);case"ascii":case"latin1":case"binary":return uTt(this,t,r,n);case"base64":return cTt(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fTt(this,t,r,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}};ea.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function hTt(e,t,r){return t===0&&r===e.length?bH.fromByteArray(e):bH.fromByteArray(e.slice(t,r))}function lTe(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:a>223?3:a>191?2:1;if(i+s<=r){let l,u,c,f;switch(s){case 1:a<128&&(o=a);break;case 2:l=e[i+1],(l&192)===128&&(f=(a&31)<<6|l&63,f>127&&(o=f));break;case 3:l=e[i+1],u=e[i+2],(l&192)===128&&(u&192)===128&&(f=(a&15)<<12|(l&63)<<6|u&63,f>2047&&(f<55296||f>57343)&&(o=f));break;case 4:l=e[i+1],u=e[i+2],c=e[i+3],(l&192)===128&&(u&192)===128&&(c&192)===128&&(f=(a&15)<<18|(l&63)<<12|(u&63)<<6|c&63,f>65535&&f<1114112&&(o=f))}}o===null?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),i+=s}return dTt(n)}var rTe=4096;function dTt(e){let t=e.length;if(t<=rTe)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let a=t;an&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),rr)throw new RangeError("Trying to access beyond buffer length")}ea.prototype.readUintLE=ea.prototype.readUIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||ev(t,r,this.length);let i=this[t],a=1,o=0;for(;++o>>0,r=r>>>0,n||ev(t,r,this.length);let i=this[t+--r],a=1;for(;r>0&&(a*=256);)i+=this[t+--r]*a;return i};ea.prototype.readUint8=ea.prototype.readUInt8=function(t,r){return t=t>>>0,r||ev(t,1,this.length),this[t]};ea.prototype.readUint16LE=ea.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||ev(t,2,this.length),this[t]|this[t+1]<<8};ea.prototype.readUint16BE=ea.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||ev(t,2,this.length),this[t]<<8|this[t+1]};ea.prototype.readUint32LE=ea.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||ev(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};ea.prototype.readUint32BE=ea.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||ev(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};ea.prototype.readBigUInt64LE=N_(function(t){t=t>>>0,iA(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Y4(t,this.length-8);let i=r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,a=this[++t]+this[++t]*2**8+this[++t]*2**16+n*2**24;return BigInt(i)+(BigInt(a)<>>0,iA(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Y4(t,this.length-8);let i=r*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],a=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n;return(BigInt(i)<>>0,r=r>>>0,n||ev(t,r,this.length);let i=this[t],a=1,o=0;for(;++o=a&&(i-=Math.pow(2,8*r)),i};ea.prototype.readIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||ev(t,r,this.length);let i=r,a=1,o=this[t+--i];for(;i>0&&(a*=256);)o+=this[t+--i]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*r)),o};ea.prototype.readInt8=function(t,r){return t=t>>>0,r||ev(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};ea.prototype.readInt16LE=function(t,r){t=t>>>0,r||ev(t,2,this.length);let n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};ea.prototype.readInt16BE=function(t,r){t=t>>>0,r||ev(t,2,this.length);let n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};ea.prototype.readInt32LE=function(t,r){return t=t>>>0,r||ev(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};ea.prototype.readInt32BE=function(t,r){return t=t>>>0,r||ev(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};ea.prototype.readBigInt64LE=N_(function(t){t=t>>>0,iA(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Y4(t,this.length-8);let i=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(n<<24);return(BigInt(i)<>>0,iA(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Y4(t,this.length-8);let i=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(i)<>>0,r||ev(t,4,this.length),rA.read(this,t,!0,23,4)};ea.prototype.readFloatBE=function(t,r){return t=t>>>0,r||ev(t,4,this.length),rA.read(this,t,!1,23,4)};ea.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||ev(t,8,this.length),rA.read(this,t,!0,52,8)};ea.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||ev(t,8,this.length),rA.read(this,t,!1,52,8)};function Rp(e,t,r,n,i,a){if(!ea.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}ea.prototype.writeUintLE=ea.prototype.writeUIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,n=n>>>0,!i){let s=Math.pow(2,8*n)-1;Rp(this,t,r,n,s,0)}let a=1,o=0;for(this[r]=t&255;++o>>0,n=n>>>0,!i){let s=Math.pow(2,8*n)-1;Rp(this,t,r,n,s,0)}let a=n-1,o=1;for(this[r+a]=t&255;--a>=0&&(o*=256);)this[r+a]=t/o&255;return r+n};ea.prototype.writeUint8=ea.prototype.writeUInt8=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,1,255,0),this[r]=t&255,r+1};ea.prototype.writeUint16LE=ea.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};ea.prototype.writeUint16BE=ea.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};ea.prototype.writeUint32LE=ea.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};ea.prototype.writeUint32BE=ea.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function uTe(e,t,r,n,i){vTe(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,r}function cTe(e,t,r,n,i){vTe(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r+7]=a,a=a>>8,e[r+6]=a,a=a>>8,e[r+5]=a,a=a>>8,e[r+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o=o>>8,e[r+2]=o,o=o>>8,e[r+1]=o,o=o>>8,e[r]=o,r+8}ea.prototype.writeBigUInt64LE=N_(function(t,r=0){return uTe(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});ea.prototype.writeBigUInt64BE=N_(function(t,r=0){return cTe(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});ea.prototype.writeIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let l=Math.pow(2,8*n-1);Rp(this,t,r,n,l-1,-l)}let a=0,o=1,s=0;for(this[r]=t&255;++a>0)-s&255;return r+n};ea.prototype.writeIntBE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let l=Math.pow(2,8*n-1);Rp(this,t,r,n,l-1,-l)}let a=n-1,o=1,s=0;for(this[r+a]=t&255;--a>=0&&(o*=256);)t<0&&s===0&&this[r+a+1]!==0&&(s=1),this[r+a]=(t/o>>0)-s&255;return r+n};ea.prototype.writeInt8=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};ea.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};ea.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};ea.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};ea.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};ea.prototype.writeBigInt64LE=N_(function(t,r=0){return uTe(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});ea.prototype.writeBigInt64BE=N_(function(t,r=0){return cTe(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function fTe(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function hTe(e,t,r,n,i){return t=+t,r=r>>>0,i||fTe(e,t,r,4,34028234663852886e22,-34028234663852886e22),rA.write(e,t,r,n,23,4),r+4}ea.prototype.writeFloatLE=function(t,r,n){return hTe(this,t,r,!0,n)};ea.prototype.writeFloatBE=function(t,r,n){return hTe(this,t,r,!1,n)};function dTe(e,t,r,n,i){return t=+t,r=r>>>0,i||fTe(e,t,r,8,17976931348623157e292,-17976931348623157e292),rA.write(e,t,r,n,52,8),r+8}ea.prototype.writeDoubleLE=function(t,r,n){return dTe(this,t,r,!0,n)};ea.prototype.writeDoubleBE=function(t,r,n){return dTe(this,t,r,!1,n)};ea.prototype.copy=function(t,r,n,i){if(!ea.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-r>>0,n=n===void 0?this.length:n>>>0,t||(t=0);let a;if(typeof t=="number")for(a=r;a2**32?i=iTe(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=iTe(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function iTe(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function yTt(e,t,r){iA(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Y4(t,e.length-(r+1))}function vTe(e,t,r,n,i,a){if(e>r||e3?t===0||t===BigInt(0)?s=`>= 0${o} and < 2${o} ** ${(a+1)*8}${o}`:s=`>= -(2${o} ** ${(a+1)*8-1}${o}) and < 2 ** ${(a+1)*8-1}${o}`:s=`>= ${t}${o} and <= ${r}${o}`,new tA.ERR_OUT_OF_RANGE("value",s,e)}yTt(n,i,a)}function iA(e,t){if(typeof e!="number")throw new tA.ERR_INVALID_ARG_TYPE(t,"number",e)}function Y4(e,t,r){throw Math.floor(e)!==e?(iA(e,r),new tA.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new tA.ERR_BUFFER_OUT_OF_BOUNDS:new tA.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var _Tt=/[^+/0-9A-Za-z-_]/g;function xTt(e){if(e=e.split("=")[0],e=e.trim().replace(_Tt,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function AH(e,t){t=t||1/0;let r,n=e.length,i=null,a=[];for(let o=0;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return a}function bTt(e){let t=[];for(let r=0;r>8,i=r%256,a.push(i),a.push(n);return a}function pTe(e){return bH.toByteArray(xTt(e))}function Z8(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function Hm(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function kH(e){return e!==e}var TTt=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function N_(e){return typeof BigInt=="undefined"?ATt:e}function ATt(){throw new Error("BigInt not supported")}});var Y8=ye(($fr,gTe)=>{"use strict";gTe.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(var a in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,r);if(s.value!==i||s.enumerable!==!0)return!1}return!0}});var K4=ye((Qfr,mTe)=>{"use strict";var STt=Y8();mTe.exports=function(){return STt()&&!!Symbol.toStringTag}});var CH=ye((ehr,yTe)=>{"use strict";yTe.exports=Object});var xTe=ye((thr,_Te)=>{"use strict";_Te.exports=Error});var wTe=ye((rhr,bTe)=>{"use strict";bTe.exports=EvalError});var ATe=ye((ihr,TTe)=>{"use strict";TTe.exports=RangeError});var MTe=ye((nhr,STe)=>{"use strict";STe.exports=ReferenceError});var LH=ye((ahr,ETe)=>{"use strict";ETe.exports=SyntaxError});var aA=ye((ohr,kTe)=>{"use strict";kTe.exports=TypeError});var LTe=ye((shr,CTe)=>{"use strict";CTe.exports=URIError});var ITe=ye((lhr,PTe)=>{"use strict";PTe.exports=Math.abs});var DTe=ye((uhr,RTe)=>{"use strict";RTe.exports=Math.floor});var zTe=ye((chr,FTe)=>{"use strict";FTe.exports=Math.max});var qTe=ye((fhr,OTe)=>{"use strict";OTe.exports=Math.min});var NTe=ye((hhr,BTe)=>{"use strict";BTe.exports=Math.pow});var VTe=ye((dhr,UTe)=>{"use strict";UTe.exports=Math.round});var HTe=ye((vhr,GTe)=>{"use strict";GTe.exports=Number.isNaN||function(t){return t!==t}});var WTe=ye((phr,jTe)=>{"use strict";var MTt=HTe();jTe.exports=function(t){return MTt(t)||t===0?t:t<0?-1:1}});var ZTe=ye((ghr,XTe)=>{"use strict";XTe.exports=Object.getOwnPropertyDescriptor});var x2=ye((mhr,YTe)=>{"use strict";var K8=ZTe();if(K8)try{K8([],"length")}catch(e){K8=null}YTe.exports=K8});var J4=ye((yhr,KTe)=>{"use strict";var J8=Object.defineProperty||!1;if(J8)try{J8({},"a",{value:1})}catch(e){J8=!1}KTe.exports=J8});var QTe=ye((_hr,$Te)=>{"use strict";var JTe=typeof Symbol!="undefined"&&Symbol,ETt=Y8();$Te.exports=function(){return typeof JTe!="function"||typeof Symbol!="function"||typeof JTe("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:ETt()}});var PH=ye((xhr,eAe)=>{"use strict";eAe.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var IH=ye((bhr,tAe)=>{"use strict";var kTt=CH();tAe.exports=kTt.getPrototypeOf||null});var nAe=ye((whr,iAe)=>{"use strict";var CTt="Function.prototype.bind called on incompatible ",LTt=Object.prototype.toString,PTt=Math.max,ITt="[object Function]",rAe=function(t,r){for(var n=[],i=0;i{"use strict";var FTt=nAe();aAe.exports=Function.prototype.bind||FTt});var $8=ye((Ahr,oAe)=>{"use strict";oAe.exports=Function.prototype.call});var RH=ye((Shr,sAe)=>{"use strict";sAe.exports=Function.prototype.apply});var uAe=ye((Mhr,lAe)=>{"use strict";lAe.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var fAe=ye((Ehr,cAe)=>{"use strict";var zTt=oA(),OTt=RH(),qTt=$8(),BTt=uAe();cAe.exports=BTt||zTt.call(qTt,OTt)});var dAe=ye((khr,hAe)=>{"use strict";var NTt=oA(),UTt=aA(),VTt=$8(),GTt=fAe();hAe.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new UTt("a function is required");return GTt(NTt,VTt,t)}});var _Ae=ye((Chr,yAe)=>{"use strict";var HTt=dAe(),vAe=x2(),gAe;try{gAe=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var DH=!!gAe&&vAe&&vAe(Object.prototype,"__proto__"),mAe=Object,pAe=mAe.getPrototypeOf;yAe.exports=DH&&typeof DH.get=="function"?HTt([DH.get]):typeof pAe=="function"?function(t){return pAe(t==null?t:mAe(t))}:!1});var AAe=ye((Lhr,TAe)=>{"use strict";var xAe=PH(),bAe=IH(),wAe=_Ae();TAe.exports=xAe?function(t){return xAe(t)}:bAe?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return bAe(t)}:wAe?function(t){return wAe(t)}:null});var MAe=ye((Phr,SAe)=>{"use strict";var jTt=Function.prototype.call,WTt=Object.prototype.hasOwnProperty,XTt=oA();SAe.exports=XTt.call(jTt,WTt)});var tR=ye((Ihr,IAe)=>{"use strict";var lu,ZTt=CH(),YTt=xTe(),KTt=wTe(),JTt=ATe(),$Tt=MTe(),cA=LH(),uA=aA(),QTt=LTe(),eAt=ITe(),tAt=DTe(),rAt=zTe(),iAt=qTe(),nAt=NTe(),aAt=VTe(),oAt=WTe(),LAe=Function,FH=function(e){try{return LAe('"use strict"; return ('+e+").constructor;")()}catch(t){}},$4=x2(),sAt=J4(),zH=function(){throw new uA},lAt=$4?function(){try{return arguments.callee,zH}catch(e){try{return $4(arguments,"callee").get}catch(t){return zH}}}():zH,sA=QTe()(),tv=AAe(),uAt=IH(),cAt=PH(),PAe=RH(),Q4=$8(),lA={},fAt=typeof Uint8Array=="undefined"||!tv?lu:tv(Uint8Array),b2={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?lu:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?lu:ArrayBuffer,"%ArrayIteratorPrototype%":sA&&tv?tv([][Symbol.iterator]()):lu,"%AsyncFromSyncIteratorPrototype%":lu,"%AsyncFunction%":lA,"%AsyncGenerator%":lA,"%AsyncGeneratorFunction%":lA,"%AsyncIteratorPrototype%":lA,"%Atomics%":typeof Atomics=="undefined"?lu:Atomics,"%BigInt%":typeof BigInt=="undefined"?lu:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?lu:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?lu:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?lu:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":YTt,"%eval%":eval,"%EvalError%":KTt,"%Float16Array%":typeof Float16Array=="undefined"?lu:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?lu:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?lu:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?lu:FinalizationRegistry,"%Function%":LAe,"%GeneratorFunction%":lA,"%Int8Array%":typeof Int8Array=="undefined"?lu:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?lu:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?lu:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":sA&&tv?tv(tv([][Symbol.iterator]())):lu,"%JSON%":typeof JSON=="object"?JSON:lu,"%Map%":typeof Map=="undefined"?lu:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!sA||!tv?lu:tv(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":ZTt,"%Object.getOwnPropertyDescriptor%":$4,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?lu:Promise,"%Proxy%":typeof Proxy=="undefined"?lu:Proxy,"%RangeError%":JTt,"%ReferenceError%":$Tt,"%Reflect%":typeof Reflect=="undefined"?lu:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?lu:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!sA||!tv?lu:tv(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?lu:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":sA&&tv?tv(""[Symbol.iterator]()):lu,"%Symbol%":sA?Symbol:lu,"%SyntaxError%":cA,"%ThrowTypeError%":lAt,"%TypedArray%":fAt,"%TypeError%":uA,"%Uint8Array%":typeof Uint8Array=="undefined"?lu:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?lu:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?lu:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?lu:Uint32Array,"%URIError%":QTt,"%WeakMap%":typeof WeakMap=="undefined"?lu:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?lu:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?lu:WeakSet,"%Function.prototype.call%":Q4,"%Function.prototype.apply%":PAe,"%Object.defineProperty%":sAt,"%Object.getPrototypeOf%":uAt,"%Math.abs%":eAt,"%Math.floor%":tAt,"%Math.max%":rAt,"%Math.min%":iAt,"%Math.pow%":nAt,"%Math.round%":aAt,"%Math.sign%":oAt,"%Reflect.getPrototypeOf%":cAt};if(tv)try{null.error}catch(e){EAe=tv(tv(e)),b2["%Error.prototype%"]=EAe}var EAe,hAt=function e(t){var r;if(t==="%AsyncFunction%")r=FH("async function () {}");else if(t==="%GeneratorFunction%")r=FH("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=FH("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&tv&&(r=tv(i.prototype))}return b2[t]=r,r},kAe={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},eE=oA(),Q8=MAe(),dAt=eE.call(Q4,Array.prototype.concat),vAt=eE.call(PAe,Array.prototype.splice),CAe=eE.call(Q4,String.prototype.replace),eR=eE.call(Q4,String.prototype.slice),pAt=eE.call(Q4,RegExp.prototype.exec),gAt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,mAt=/\\(\\)?/g,yAt=function(t){var r=eR(t,0,1),n=eR(t,-1);if(r==="%"&&n!=="%")throw new cA("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new cA("invalid intrinsic syntax, expected opening `%`");var i=[];return CAe(t,gAt,function(a,o,s,l){i[i.length]=s?CAe(l,mAt,"$1"):o||a}),i},_At=function(t,r){var n=t,i;if(Q8(kAe,n)&&(i=kAe[n],n="%"+i[0]+"%"),Q8(b2,n)){var a=b2[n];if(a===lA&&(a=hAt(n)),typeof a=="undefined"&&!r)throw new uA("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new cA("intrinsic "+t+" does not exist!")};IAe.exports=function(t,r){if(typeof t!="string"||t.length===0)throw new uA("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new uA('"allowMissing" argument must be a boolean');if(pAt(/^%?[^%]*%?$/,t)===null)throw new cA("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=yAt(t),i=n.length>0?n[0]:"",a=_At("%"+i+"%",r),o=a.name,s=a.value,l=!1,u=a.alias;u&&(i=u[0],vAt(n,dAt([0,1],u)));for(var c=1,f=!0;c=n.length){var _=$4(s,h);f=!!_,f&&"get"in _&&!("originalValue"in _.get)?s=_.get:s=s[h]}else f=Q8(s,h),s=s[h];f&&!l&&(b2[o]=s)}}return s}});var zAe=ye((Rhr,FAe)=>{"use strict";var RAe=J4(),xAt=LH(),fA=aA(),DAe=x2();FAe.exports=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new fA("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new fA("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new fA("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new fA("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new fA("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new fA("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,l=!!DAe&&DAe(t,r);if(RAe)RAe(t,r,{configurable:o===null&&l?l.configurable:!o,enumerable:i===null&&l?l.enumerable:!i,value:n,writable:a===null&&l?l.writable:!a});else if(s||!i&&!a&&!o)t[r]=n;else throw new xAt("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var qH=ye((Dhr,qAe)=>{"use strict";var OH=J4(),OAe=function(){return!!OH};OAe.hasArrayLengthDefineBug=function(){if(!OH)return null;try{return OH([],"length",{value:1}).length!==1}catch(t){return!0}};qAe.exports=OAe});var GAe=ye((Fhr,VAe)=>{"use strict";var bAt=tR(),BAe=zAe(),wAt=qH()(),NAe=x2(),UAe=aA(),TAt=bAt("%Math.floor%");VAe.exports=function(t,r){if(typeof t!="function")throw new UAe("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||TAt(r)!==r)throw new UAe("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,a=!0;if("length"in t&&NAe){var o=NAe(t,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(a=!1)}return(i||a||!n)&&(wAt?BAe(t,"length",r,!0,!0):BAe(t,"length",r)),t}});var tE=ye((zhr,rR)=>{"use strict";var BH=oA(),iR=tR(),AAt=GAe(),SAt=aA(),WAe=iR("%Function.prototype.apply%"),XAe=iR("%Function.prototype.call%"),ZAe=iR("%Reflect.apply%",!0)||BH.call(XAe,WAe),HAe=J4(),MAt=iR("%Math.max%");rR.exports=function(t){if(typeof t!="function")throw new SAt("a function is required");var r=ZAe(BH,XAe,arguments);return AAt(r,1+MAt(0,t.length-(arguments.length-1)),!0)};var jAe=function(){return ZAe(BH,WAe,arguments)};HAe?HAe(rR.exports,"apply",{value:jAe}):rR.exports.apply=jAe});var hA=ye((Ohr,JAe)=>{"use strict";var YAe=tR(),KAe=tE(),EAt=KAe(YAe("String.prototype.indexOf"));JAe.exports=function(t,r){var n=YAe(t,!!r);return typeof n=="function"&&EAt(t,".prototype.")>-1?KAe(n):n}});var e5e=ye((qhr,QAe)=>{"use strict";var kAt=K4()(),CAt=hA(),NH=CAt("Object.prototype.toString"),nR=function(t){return kAt&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:NH(t)==="[object Arguments]"},$Ae=function(t){return nR(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&NH(t)!=="[object Array]"&&NH(t.callee)==="[object Function]"},LAt=function(){return nR(arguments)}();nR.isLegacyArguments=$Ae;QAe.exports=LAt?nR:$Ae});var i5e=ye((Bhr,r5e)=>{"use strict";var PAt=Object.prototype.toString,IAt=Function.prototype.toString,RAt=/^\s*(?:function)?\*/,t5e=K4()(),UH=Object.getPrototypeOf,DAt=function(){if(!t5e)return!1;try{return Function("return function*() {}")()}catch(e){}},VH;r5e.exports=function(t){if(typeof t!="function")return!1;if(RAt.test(IAt.call(t)))return!0;if(!t5e){var r=PAt.call(t);return r==="[object GeneratorFunction]"}if(!UH)return!1;if(typeof VH=="undefined"){var n=DAt();VH=n?UH(n):!1}return UH(t)===VH}});var s5e=ye((Nhr,o5e)=>{"use strict";var a5e=Function.prototype.toString,dA=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,HH,aR;if(typeof dA=="function"&&typeof Object.defineProperty=="function")try{HH=Object.defineProperty({},"length",{get:function(){throw aR}}),aR={},dA(function(){throw 42},null,HH)}catch(e){e!==aR&&(dA=null)}else dA=null;var FAt=/^\s*class\b/,jH=function(t){try{var r=a5e.call(t);return FAt.test(r)}catch(n){return!1}},GH=function(t){try{return jH(t)?!1:(a5e.call(t),!0)}catch(r){return!1}},oR=Object.prototype.toString,zAt="[object Object]",OAt="[object Function]",qAt="[object GeneratorFunction]",BAt="[object HTMLAllCollection]",NAt="[object HTML document.all class]",UAt="[object HTMLCollection]",VAt=typeof Symbol=="function"&&!!Symbol.toStringTag,GAt=!(0 in[,]),WH=function(){return!1};typeof document=="object"&&(n5e=document.all,oR.call(n5e)===oR.call(document.all)&&(WH=function(t){if((GAt||!t)&&(typeof t=="undefined"||typeof t=="object"))try{var r=oR.call(t);return(r===BAt||r===NAt||r===UAt||r===zAt)&&t("")==null}catch(n){}return!1}));var n5e;o5e.exports=dA?function(t){if(WH(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{dA(t,null,HH)}catch(r){if(r!==aR)return!1}return!jH(t)&&GH(t)}:function(t){if(WH(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(VAt)return GH(t);if(jH(t))return!1;var r=oR.call(t);return r!==OAt&&r!==qAt&&!/^\[object HTML/.test(r)?!1:GH(t)}});var XH=ye((Uhr,u5e)=>{"use strict";var HAt=s5e(),jAt=Object.prototype.toString,l5e=Object.prototype.hasOwnProperty,WAt=function(t,r,n){for(var i=0,a=t.length;i=3&&(i=n),jAt.call(t)==="[object Array]"?WAt(t,r,i):typeof t=="string"?XAt(t,r,i):ZAt(t,r,i)};u5e.exports=YAt});var YH=ye((Vhr,c5e)=>{"use strict";var ZH=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],KAt=typeof globalThis=="undefined"?window:globalThis;c5e.exports=function(){for(var t=[],r=0;r{"use strict";var lR=XH(),JAt=YH(),f5e=tE(),$H=hA(),sR=x2(),$At=$H("Object.prototype.toString"),d5e=K4()(),h5e=typeof globalThis=="undefined"?window:globalThis,JH=JAt(),QH=$H("String.prototype.slice"),KH=Object.getPrototypeOf,QAt=$H("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n-1?r:r!=="Object"?!1:t5t(t)}return sR?e5t(t):null}});var b5e=ye((Hhr,x5e)=>{"use strict";var g5e=XH(),r5t=YH(),tj=hA(),i5t=tj("Object.prototype.toString"),m5e=K4()(),cR=x2(),n5t=typeof globalThis=="undefined"?window:globalThis,y5e=r5t(),a5t=tj("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n-1}return cR?s5t(t):!1}});var nj=ye(uu=>{"use strict";var l5t=e5e(),u5t=i5e(),Wg=p5e(),w5e=b5e();function vA(e){return e.call.bind(e)}var T5e=typeof BigInt!="undefined",A5e=typeof Symbol!="undefined",K0=vA(Object.prototype.toString),c5t=vA(Number.prototype.valueOf),f5t=vA(String.prototype.valueOf),h5t=vA(Boolean.prototype.valueOf);T5e&&(S5e=vA(BigInt.prototype.valueOf));var S5e;A5e&&(M5e=vA(Symbol.prototype.valueOf));var M5e;function iE(e,t){if(typeof e!="object")return!1;try{return t(e),!0}catch(r){return!1}}uu.isArgumentsObject=l5t;uu.isGeneratorFunction=u5t;uu.isTypedArray=w5e;function d5t(e){return typeof Promise!="undefined"&&e instanceof Promise||e!==null&&typeof e=="object"&&typeof e.then=="function"&&typeof e.catch=="function"}uu.isPromise=d5t;function v5t(e){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(e):w5e(e)||k5e(e)}uu.isArrayBufferView=v5t;function p5t(e){return Wg(e)==="Uint8Array"}uu.isUint8Array=p5t;function g5t(e){return Wg(e)==="Uint8ClampedArray"}uu.isUint8ClampedArray=g5t;function m5t(e){return Wg(e)==="Uint16Array"}uu.isUint16Array=m5t;function y5t(e){return Wg(e)==="Uint32Array"}uu.isUint32Array=y5t;function _5t(e){return Wg(e)==="Int8Array"}uu.isInt8Array=_5t;function x5t(e){return Wg(e)==="Int16Array"}uu.isInt16Array=x5t;function b5t(e){return Wg(e)==="Int32Array"}uu.isInt32Array=b5t;function w5t(e){return Wg(e)==="Float32Array"}uu.isFloat32Array=w5t;function T5t(e){return Wg(e)==="Float64Array"}uu.isFloat64Array=T5t;function A5t(e){return Wg(e)==="BigInt64Array"}uu.isBigInt64Array=A5t;function S5t(e){return Wg(e)==="BigUint64Array"}uu.isBigUint64Array=S5t;function fR(e){return K0(e)==="[object Map]"}fR.working=typeof Map!="undefined"&&fR(new Map);function M5t(e){return typeof Map=="undefined"?!1:fR.working?fR(e):e instanceof Map}uu.isMap=M5t;function hR(e){return K0(e)==="[object Set]"}hR.working=typeof Set!="undefined"&&hR(new Set);function E5t(e){return typeof Set=="undefined"?!1:hR.working?hR(e):e instanceof Set}uu.isSet=E5t;function dR(e){return K0(e)==="[object WeakMap]"}dR.working=typeof WeakMap!="undefined"&&dR(new WeakMap);function k5t(e){return typeof WeakMap=="undefined"?!1:dR.working?dR(e):e instanceof WeakMap}uu.isWeakMap=k5t;function ij(e){return K0(e)==="[object WeakSet]"}ij.working=typeof WeakSet!="undefined"&&ij(new WeakSet);function C5t(e){return ij(e)}uu.isWeakSet=C5t;function vR(e){return K0(e)==="[object ArrayBuffer]"}vR.working=typeof ArrayBuffer!="undefined"&&vR(new ArrayBuffer);function E5e(e){return typeof ArrayBuffer=="undefined"?!1:vR.working?vR(e):e instanceof ArrayBuffer}uu.isArrayBuffer=E5e;function pR(e){return K0(e)==="[object DataView]"}pR.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&pR(new DataView(new ArrayBuffer(1),0,1));function k5e(e){return typeof DataView=="undefined"?!1:pR.working?pR(e):e instanceof DataView}uu.isDataView=k5e;var rj=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function rE(e){return K0(e)==="[object SharedArrayBuffer]"}function C5e(e){return typeof rj=="undefined"?!1:(typeof rE.working=="undefined"&&(rE.working=rE(new rj)),rE.working?rE(e):e instanceof rj)}uu.isSharedArrayBuffer=C5e;function L5t(e){return K0(e)==="[object AsyncFunction]"}uu.isAsyncFunction=L5t;function P5t(e){return K0(e)==="[object Map Iterator]"}uu.isMapIterator=P5t;function I5t(e){return K0(e)==="[object Set Iterator]"}uu.isSetIterator=I5t;function R5t(e){return K0(e)==="[object Generator]"}uu.isGeneratorObject=R5t;function D5t(e){return K0(e)==="[object WebAssembly.Module]"}uu.isWebAssemblyCompiledModule=D5t;function L5e(e){return iE(e,c5t)}uu.isNumberObject=L5e;function P5e(e){return iE(e,f5t)}uu.isStringObject=P5e;function I5e(e){return iE(e,h5t)}uu.isBooleanObject=I5e;function R5e(e){return T5e&&iE(e,S5e)}uu.isBigIntObject=R5e;function D5e(e){return A5e&&iE(e,M5e)}uu.isSymbolObject=D5e;function F5t(e){return L5e(e)||P5e(e)||I5e(e)||R5e(e)||D5e(e)}uu.isBoxedPrimitive=F5t;function z5t(e){return typeof Uint8Array!="undefined"&&(E5e(e)||C5e(e))}uu.isAnyArrayBuffer=z5t;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(uu,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})})});var aj=ye((Whr,F5e)=>{F5e.exports=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}});var fj=ye(cu=>{var z5e=Object.getOwnPropertyDescriptors||function(t){for(var r=Object.keys(t),n={},i=0;i=i)return s;switch(s){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(l){return"[Circular]"}default:return s}}),o=n[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),uj(t)?r.showHidden=t:t&&cu._extend(r,t),T2(r.showHidden)&&(r.showHidden=!1),T2(r.depth)&&(r.depth=2),T2(r.colors)&&(r.colors=!1),T2(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=q5t),_R(r,e,r.depth)}cu.inspect=U_;U_.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};U_.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function q5t(e,t){var r=U_.styles[t];return r?"\x1B["+U_.colors[r][0]+"m"+e+"\x1B["+U_.colors[r][1]+"m":e}function B5t(e,t){return e}function N5t(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function _R(e,t,r){if(e.customInspect&&t&&yR(t.inspect)&&t.inspect!==cu.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return wR(n)||(n=_R(e,n,r)),n}var i=U5t(e,t);if(i)return i;var a=Object.keys(t),o=N5t(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),aE(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return oj(t);if(a.length===0){if(yR(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(nE(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(xR(t))return e.stylize(Date.prototype.toString.call(t),"date");if(aE(t))return oj(t)}var l="",u=!1,c=["{","}"];if(q5e(t)&&(u=!0,c=["[","]"]),yR(t)){var f=t.name?": "+t.name:"";l=" [Function"+f+"]"}if(nE(t)&&(l=" "+RegExp.prototype.toString.call(t)),xR(t)&&(l=" "+Date.prototype.toUTCString.call(t)),aE(t)&&(l=" "+oj(t)),a.length===0&&(!u||t.length==0))return c[0]+l+c[1];if(r<0)return nE(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var h;return u?h=V5t(e,t,r,o,a):h=a.map(function(d){return lj(e,t,r,o,d,u)}),e.seen.pop(),G5t(h,l,c)}function U5t(e,t){if(T2(t))return e.stylize("undefined","undefined");if(wR(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(B5e(t))return e.stylize(""+t,"number");if(uj(t))return e.stylize(""+t,"boolean");if(bR(t))return e.stylize("null","null")}function oj(e){return"["+Error.prototype.toString.call(e)+"]"}function V5t(e,t,r,n,i){for(var a=[],o=0,s=t.length;o{var xtt=Object.create;var DS=Object.defineProperty,btt=Object.defineProperties,wtt=Object.getOwnPropertyDescriptor,Ttt=Object.getOwnPropertyDescriptors,Att=Object.getOwnPropertyNames,p6=Object.getOwnPropertySymbols,Stt=Object.getPrototypeOf,Aq=Object.prototype.hasOwnProperty,pee=Object.prototype.propertyIsEnumerable;var vee=(e,t,r)=>t in e?DS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_g=(e,t)=>{for(var r in t||(t={}))Aq.call(t,r)&&vee(e,r,t[r]);if(p6)for(var r of p6(t))pee.call(t,r)&&vee(e,r,t[r]);return e},j1=(e,t)=>btt(e,Ttt(t));var gee=(e,t)=>{var r={};for(var n in e)Aq.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&p6)for(var n of p6(e))t.indexOf(n)<0&&pee.call(e,n)&&(r[n]=e[n]);return r};var gu=(e,t)=>()=>(e&&(t=e(e=0)),t);var ye=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),mee=(e,t)=>{for(var r in t)DS(e,r,{get:t[r],enumerable:!0})},yee=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Att(t))!Aq.call(e,i)&&i!==r&&DS(e,i,{get:()=>t[i],enumerable:!(n=wtt(t,i))||n.enumerable});return e};var Mtt=(e,t,r)=>(r=e!=null?xtt(Stt(e)):{},yee(t||!e||!e.__esModule?DS(r,"default",{value:e,enumerable:!0}):r,e)),pb=e=>yee(DS({},"__esModule",{value:!0}),e);var g6=ye(_ee=>{"use strict";_ee.version="3.5.0"});var bee=ye((xee,m6)=>{(function(t,r,n){r[t]=r[t]||n(),typeof m6!="undefined"&&m6.exports&&(m6.exports=r[t])})("Promise",typeof window!="undefined"?window:xee,function(){"use strict";var t,r,n,i=Object.prototype.toString,a=typeof setImmediate!="undefined"?function(k){return setImmediate(k)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(k,M,T,L){return Object.defineProperty(k,M,{value:T,writable:!0,configurable:L!==!1})}}catch(p){t=function(M,T,L){return M[T]=L,M}}n=function(){var k,M,T;function L(x,C){this.fn=x,this.self=C,this.next=void 0}return{add:function(C,S){T=new L(C,S),M?M.next=T:k=T,M=T,T=void 0},drain:function(){var C=k;for(k=M=r=void 0;C;)C.fn.call(C.self),C=C.next}}}();function o(p,k){n.add(p,k),r||(r=a(n.drain))}function s(p){var k,M=typeof p;return p!=null&&(M=="object"||M=="function")&&(k=p.then),typeof k=="function"?k:!1}function l(){for(var p=0;p0&&o(l,M))}catch(T){f.call(new d(M),T)}}}function f(p){var k=this;k.triggered||(k.triggered=!0,k.def&&(k=k.def),k.msg=p,k.state=2,k.chain.length>0&&o(l,k))}function h(p,k,M,T){for(var L=0;L{(function(){var e={version:"3.8.2"},t=[].slice,r=function(X){return t.call(X)},n=self.document;function i(X){return X&&(X.ownerDocument||X.document||X).documentElement}function a(X){return X&&(X.ownerDocument&&X.ownerDocument.defaultView||X.document&&X||X.defaultView)}if(n)try{r(n.documentElement.childNodes)[0].nodeType}catch(X){r=function(se){for(var Te=se.length,Oe=new Array(Te);Te--;)Oe[Te]=se[Te];return Oe}}if(Date.now||(Date.now=function(){return+new Date}),n)try{n.createElement("DIV").style.setProperty("opacity",0,"")}catch(X){var o=this.Element.prototype,s=o.setAttribute,l=o.setAttributeNS,u=this.CSSStyleDeclaration.prototype,c=u.setProperty;o.setAttribute=function(se,Te){s.call(this,se,Te+"")},o.setAttributeNS=function(se,Te,Oe){l.call(this,se,Te,Oe+"")},u.setProperty=function(se,Te,Oe){c.call(this,se,Te+"",Oe)}}e.ascending=f;function f(X,se){return Xse?1:X>=se?0:NaN}e.descending=function(X,se){return seX?1:se>=X?0:NaN},e.min=function(X,se){var Te=-1,Oe=X.length,Ve,Ye;if(arguments.length===1){for(;++Te=Ye){Ve=Ye;break}for(;++TeYe&&(Ve=Ye)}else{for(;++Te=Ye){Ve=Ye;break}for(;++TeYe&&(Ve=Ye)}return Ve},e.max=function(X,se){var Te=-1,Oe=X.length,Ve,Ye;if(arguments.length===1){for(;++Te=Ye){Ve=Ye;break}for(;++TeVe&&(Ve=Ye)}else{for(;++Te=Ye){Ve=Ye;break}for(;++TeVe&&(Ve=Ye)}return Ve},e.extent=function(X,se){var Te=-1,Oe=X.length,Ve,Ye,Pt;if(arguments.length===1){for(;++Te=Ye){Ve=Pt=Ye;break}for(;++TeYe&&(Ve=Ye),Pt=Ye){Ve=Pt=Ye;break}for(;++TeYe&&(Ve=Ye),Pt1)return Pt/(Wt-1)},e.deviation=function(){var X=e.variance.apply(this,arguments);return X&&Math.sqrt(X)};function v(X){return{left:function(se,Te,Oe,Ve){for(arguments.length<3&&(Oe=0),arguments.length<4&&(Ve=se.length);Oe>>1;X(se[Ye],Te)<0?Oe=Ye+1:Ve=Ye}return Oe},right:function(se,Te,Oe,Ve){for(arguments.length<3&&(Oe=0),arguments.length<4&&(Ve=se.length);Oe>>1;X(se[Ye],Te)>0?Ve=Ye:Oe=Ye+1}return Oe}}}var m=v(f);e.bisectLeft=m.left,e.bisect=e.bisectRight=m.right,e.bisector=function(X){return v(X.length===1?function(se,Te){return f(X(se),Te)}:X)},e.shuffle=function(X,se,Te){(Oe=arguments.length)<3&&(Te=X.length,Oe<2&&(se=0));for(var Oe=Te-se,Ve,Ye;Oe;)Ye=Math.random()*Oe--|0,Ve=X[Oe+se],X[Oe+se]=X[Ye+se],X[Ye+se]=Ve;return X},e.permute=function(X,se){for(var Te=se.length,Oe=new Array(Te);Te--;)Oe[Te]=X[se[Te]];return Oe},e.pairs=function(X){for(var se=0,Te=X.length-1,Oe,Ve=X[0],Ye=new Array(Te<0?0:Te);se=0;)for(Pt=X[se],Te=Pt.length;--Te>=0;)Ye[--Ve]=Pt[Te];return Ye};var p=Math.abs;e.range=function(X,se,Te){if(arguments.length<3&&(Te=1,arguments.length<2&&(se=X,X=0)),(se-X)/Te===1/0)throw new Error("infinite range");var Oe=[],Ve=k(p(Te)),Ye=-1,Pt;if(X*=Ve,se*=Ve,Te*=Ve,Te<0)for(;(Pt=X+Te*++Ye)>se;)Oe.push(Pt/Ve);else for(;(Pt=X+Te*++Ye)=se.length)return Ve?Ve.call(X,Wt):Oe?Wt.sort(Oe):Wt;for(var pr=-1,Ur=Wt.length,zr=se[dr++],gi,xi,Wr,ii=new T,di;++pr=se.length)return at;var dr=[],pr=Te[Wt++];return at.forEach(function(Ur,zr){dr.push({key:Ur,values:Pt(zr,Wt)})}),pr?dr.sort(function(Ur,zr){return pr(Ur.key,zr.key)}):dr}return X.map=function(at,Wt){return Ye(Wt,at,0)},X.entries=function(at){return Pt(Ye(e.map,at,0),0)},X.key=function(at){return se.push(at),X},X.sortKeys=function(at){return Te[se.length-1]=at,X},X.sortValues=function(at){return Oe=at,X},X.rollup=function(at){return Ve=at,X},X},e.set=function(X){var se=new U;if(X)for(var Te=0,Oe=X.length;Te=0&&(Oe=X.slice(Te+1),X=X.slice(0,Te)),X)return arguments.length<2?this[X].on(Oe):this[X].on(Oe,se);if(arguments.length===2){if(se==null)for(X in this)this.hasOwnProperty(X)&&this[X].on(Oe,null);return this}};function oe(X){var se=[],Te=new T;function Oe(){for(var Ve=se,Ye=-1,Pt=Ve.length,at;++Ye=0&&(Te=X.slice(0,se))!=="xmlns"&&(X=X.slice(se+1)),He.hasOwnProperty(Te)?{space:He[Te],local:X}:X}},Le.attr=function(X,se){if(arguments.length<2){if(typeof X=="string"){var Te=this.node();return X=e.ns.qualify(X),X.local?Te.getAttributeNS(X.space,X.local):Te.getAttribute(X)}for(se in X)this.each(lt(se,X[se]));return this}return this.each(lt(X,se))};function lt(X,se){X=e.ns.qualify(X);function Te(){this.removeAttribute(X)}function Oe(){this.removeAttributeNS(X.space,X.local)}function Ve(){this.setAttribute(X,se)}function Ye(){this.setAttributeNS(X.space,X.local,se)}function Pt(){var Wt=se.apply(this,arguments);Wt==null?this.removeAttribute(X):this.setAttribute(X,Wt)}function at(){var Wt=se.apply(this,arguments);Wt==null?this.removeAttributeNS(X.space,X.local):this.setAttributeNS(X.space,X.local,Wt)}return se==null?X.local?Oe:Te:typeof se=="function"?X.local?at:Pt:X.local?Ye:Ve}function mt(X){return X.trim().replace(/\s+/g," ")}Le.classed=function(X,se){if(arguments.length<2){if(typeof X=="string"){var Te=this.node(),Oe=(X=st(X)).length,Ve=-1;if(se=Te.classList){for(;++Ve=0;)(Ye=Te[Oe])&&(Ve&&Ve!==Ye.nextSibling&&Ve.parentNode.insertBefore(Ye,Ve),Ve=Ye);return this},Le.sort=function(X){X=rt.apply(this,arguments);for(var se=-1,Te=this.length;++se=se&&(se=Ve+1);!(Wt=Pt[se])&&++se0&&(X=X.slice(0,Ve));var Pt=Xt.get(X);Pt&&(X=Pt,Ye=_r);function at(){var pr=this[Oe];pr&&(this.removeEventListener(X,pr,pr.$),delete this[Oe])}function Wt(){var pr=Ye(se,r(arguments));at.call(this),this.addEventListener(X,this[Oe]=pr,pr.$=Te),pr._=se}function dr(){var pr=new RegExp("^__on([^.]+)"+e.requote(X)+"$"),Ur;for(var zr in this)if(Ur=zr.match(pr)){var gi=this[zr];this.removeEventListener(Ur[1],gi,gi.$),delete this[zr]}}return Ve?se?Wt:at:se?H:dr}var Xt=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});n&&Xt.forEach(function(X){"on"+X in n&&Xt.remove(X)});function or(X,se){return function(Te){var Oe=e.event;e.event=Te,se[0]=this.__data__;try{X.apply(this,se)}finally{e.event=Oe}}}function _r(X,se){var Te=or(X,se);return function(Oe){var Ve=this,Ye=Oe.relatedTarget;(!Ye||Ye!==Ve&&!(Ye.compareDocumentPosition(Ve)&8))&&Te.call(Ve,Oe)}}var Er,ei=0;function qr(X){var se=".dragsuppress-"+ ++ei,Te="click"+se,Oe=e.select(a(X)).on("touchmove"+se,_e).on("dragstart"+se,_e).on("selectstart"+se,_e);if(Er==null&&(Er="onselectstart"in X?!1:j(X.style,"userSelect")),Er){var Ve=i(X).style,Ye=Ve[Er];Ve[Er]="none"}return function(Pt){if(Oe.on(se,null),Er&&(Ve[Er]=Ye),Pt){var at=function(){Oe.on(Te,null)};Oe.on(Te,function(){_e(),at()},!0),setTimeout(at,0)}}}e.mouse=function(X){return gt(X,ke())};var jr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function gt(X,se){se.changedTouches&&(se=se.changedTouches[0]);var Te=X.ownerSVGElement||X;if(Te.createSVGPoint){var Oe=Te.createSVGPoint();if(jr<0){var Ve=a(X);if(Ve.scrollX||Ve.scrollY){Te=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Ye=Te[0][0].getScreenCTM();jr=!(Ye.f||Ye.e),Te.remove()}}return jr?(Oe.x=se.pageX,Oe.y=se.pageY):(Oe.x=se.clientX,Oe.y=se.clientY),Oe=Oe.matrixTransform(X.getScreenCTM().inverse()),[Oe.x,Oe.y]}var Pt=X.getBoundingClientRect();return[se.clientX-Pt.left-X.clientLeft,se.clientY-Pt.top-X.clientTop]}e.touch=function(X,se,Te){if(arguments.length<3&&(Te=se,se=ke().changedTouches),se){for(var Oe=0,Ve=se.length,Ye;Oe0?1:X<0?-1:0}function Ir(X,se,Te){return(se[0]-X[0])*(Te[1]-X[1])-(se[1]-X[1])*(Te[0]-X[0])}function Yr(X){return X>1?0:X<-1?et:Math.acos(X)}function _i(X){return X>1?Kt:X<-1?-Kt:Math.asin(X)}function Pi(X){return((X=Math.exp(X))-1/X)/2}function ai(X){return((X=Math.exp(X))+1/X)/2}function mi(X){return((X=Math.exp(2*X))-1)/(X+1)}function un(X){return(X=Math.sin(X/2))*X}var Fn=Math.SQRT2,An=2,Hn=4;e.interpolateZoom=function(X,se){var Te=X[0],Oe=X[1],Ve=X[2],Ye=se[0],Pt=se[1],at=se[2],Wt=Ye-Te,dr=Pt-Oe,pr=Wt*Wt+dr*dr,Ur,zr;if(pr0&&(Un=Un.transition().duration(Pt)),Un.call(Ti.event)}function Ea(){ii&&ii.domain(Wr.range().map(function(Un){return(Un-X.x)/X.k}).map(Wr.invert)),Li&&Li.domain(di.range().map(function(Un){return(Un-X.y)/X.k}).map(di.invert))}function Ia(Un){at++||Un({type:"zoomstart"})}function yo(Un){Ea(),Un({type:"zoom",scale:X.k,translate:[X.x,X.y]})}function Da(Un){--at||(Un({type:"zoomend"}),Te=null)}function go(){var Un=this,ja=xi.of(Un,arguments),Fo=0,Uo=e.select(a(Un)).on(dr,bu).on(pr,dl),$s=Qr(e.mouse(Un)),Sl=qr(Un);fa.call(Un),Ia(ja);function bu(){Fo=1,Bn(e.mouse(Un),$s),yo(ja)}function dl(){Uo.on(dr,null).on(pr,null),Sl(Fo),Da(ja)}}function Is(){var Un=this,ja=xi.of(Un,arguments),Fo={},Uo=0,$s,Sl=".zoom-"+e.event.changedTouches[0].identifier,bu="touchmove"+Sl,dl="touchend"+Sl,Sc=[],Me=e.select(Un),bt=qr(Un);Lr(),Ia(ja),Me.on(Wt,null).on(zr,Lr);function Ot(){var Nr=e.touches(Un);return $s=X.k,Nr.forEach(function(vi){vi.identifier in Fo&&(Fo[vi.identifier]=Qr(vi))}),Nr}function Lr(){var Nr=e.event.target;e.select(Nr).on(bu,Vr).on(dl,Or),Sc.push(Nr);for(var vi=e.event.changedTouches,Ni=0,qi=vi.length;Ni1){var Qi=Si[0],ji=Si[1],oi=Qi[0]-ji[0],Tr=Qi[1]-ji[1];Uo=oi*oi+Tr*Tr}}function Vr(){var Nr=e.touches(Un),vi,Ni,qi,Si;fa.call(Un);for(var Vn=0,Qi=Nr.length;Vn1?1:se,Te=Te<0?0:Te>1?1:Te,Ve=Te<=.5?Te*(1+se):Te+se-Te*se,Oe=2*Te-Ve;function Ye(at){return at>360?at-=360:at<0&&(at+=360),at<60?Oe+(Ve-Oe)*at/60:at<180?Ve:at<240?Oe+(Ve-Oe)*(240-at)/60:Oe}function Pt(at){return Math.round(Ye(at)*255)}return new Wa(Pt(X+120),Pt(X),Pt(X-120))}e.hcl=ir;function ir(X,se,Te){return this instanceof ir?(this.h=+X,this.c=+se,void(this.l=+Te)):arguments.length<2?X instanceof ir?new ir(X.h,X.c,X.l):X instanceof ti?Mn(X.l,X.a,X.b):Mn((X=Gn((X=e.rgb(X)).r,X.g,X.b)).l,X.a,X.b):new ir(X,se,Te)}var wr=ir.prototype=new Jn;wr.brighter=function(X){return new ir(this.h,this.c,Math.min(100,this.l+$r*(arguments.length?X:1)))},wr.darker=function(X){return new ir(this.h,this.c,Math.max(0,this.l-$r*(arguments.length?X:1)))},wr.rgb=function(){return Xr(this.h,this.c,this.l).rgb()};function Xr(X,se,Te){return isNaN(X)&&(X=0),isNaN(se)&&(se=0),new ti(Te,Math.cos(X*=er)*se,Math.sin(X)*se)}e.lab=ti;function ti(X,se,Te){return this instanceof ti?(this.l=+X,this.a=+se,void(this.b=+Te)):arguments.length<2?X instanceof ti?new ti(X.l,X.a,X.b):X instanceof ir?Xr(X.h,X.c,X.l):Gn((X=Wa(X)).r,X.g,X.b):new ti(X,se,Te)}var $r=18,Ri=.95047,Zi=1,en=1.08883,fn=ti.prototype=new Jn;fn.brighter=function(X){return new ti(Math.min(100,this.l+$r*(arguments.length?X:1)),this.a,this.b)},fn.darker=function(X){return new ti(Math.max(0,this.l-$r*(arguments.length?X:1)),this.a,this.b)},fn.rgb=function(){return yn(this.l,this.a,this.b)};function yn(X,se,Te){var Oe=(X+16)/116,Ve=Oe+se/500,Ye=Oe-Te/200;return Ve=Ba(Ve)*Ri,Oe=Ba(Oe)*Zi,Ye=Ba(Ye)*en,new Wa(ma(3.2404542*Ve-1.5371385*Oe-.4985314*Ye),ma(-.969266*Ve+1.8760108*Oe+.041556*Ye),ma(.0556434*Ve-.2040259*Oe+1.0572252*Ye))}function Mn(X,se,Te){return X>0?new ir(Math.atan2(Te,se)*Sr,Math.sqrt(se*se+Te*Te),X):new ir(NaN,NaN,X)}function Ba(X){return X>.206893034?X*X*X:(X-4/29)/7.787037}function ua(X){return X>.008856?Math.pow(X,1/3):7.787037*X+4/29}function ma(X){return Math.round(255*(X<=.00304?12.92*X:1.055*Math.pow(X,1/2.4)-.055))}e.rgb=Wa;function Wa(X,se,Te){return this instanceof Wa?(this.r=~~X,this.g=~~se,void(this.b=~~Te)):arguments.length<2?X instanceof Wa?new Wa(X.r,X.g,X.b):Ha(""+X,Wa,rr):new Wa(X,se,Te)}function Fa(X){return new Wa(X>>16,X>>8&255,X&255)}function Xo(X){return Fa(X)+""}var da=Wa.prototype=new Jn;da.brighter=function(X){X=Math.pow(.7,arguments.length?X:1);var se=this.r,Te=this.g,Oe=this.b,Ve=30;return!se&&!Te&&!Oe?new Wa(Ve,Ve,Ve):(se&&se>4,Oe=Oe>>4|Oe,Ve=Wt&240,Ve=Ve>>4|Ve,Ye=Wt&15,Ye=Ye<<4|Ye):X.length===7&&(Oe=(Wt&16711680)>>16,Ve=(Wt&65280)>>8,Ye=Wt&255)),se(Oe,Ve,Ye))}function vo(X,se,Te){var Oe=Math.min(X/=255,se/=255,Te/=255),Ve=Math.max(X,se,Te),Ye=Ve-Oe,Pt,at,Wt=(Ve+Oe)/2;return Ye?(at=Wt<.5?Ye/(Ve+Oe):Ye/(2-Ve-Oe),X==Ve?Pt=(se-Te)/Ye+(se0&&Wt<1?0:Pt),new Gt(Pt,at,Wt)}function Gn(X,se,Te){X=Ct(X),se=Ct(se),Te=Ct(Te);var Oe=ua((.4124564*X+.3575761*se+.1804375*Te)/Ri),Ve=ua((.2126729*X+.7151522*se+.072175*Te)/Zi),Ye=ua((.0193339*X+.119192*se+.9503041*Te)/en);return ti(116*Ve-16,500*(Oe-Ve),200*(Ve-Ye))}function Ct(X){return(X/=255)<=.04045?X/12.92:Math.pow((X+.055)/1.055,2.4)}function Ar(X){var se=parseFloat(X);return X.charAt(X.length-1)==="%"?Math.round(se*2.55):se}var Jr=e.map({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});Jr.forEach(function(X,se){Jr.set(X,Fa(se))});function hi(X){return typeof X=="function"?X:function(){return X}}e.functor=hi,e.xhr=hn(G);function hn(X){return function(se,Te,Oe){return arguments.length===2&&typeof Te=="function"&&(Oe=Te,Te=null),Sn(se,Te,X,Oe)}}function Sn(X,se,Te,Oe){var Ve={},Ye=e.dispatch("beforesend","progress","load","error"),Pt={},at=new XMLHttpRequest,Wt=null;self.XDomainRequest&&!("withCredentials"in at)&&/^(http(s)?:)?\/\//.test(X)&&(at=new XDomainRequest),"onload"in at?at.onload=at.onerror=dr:at.onreadystatechange=function(){at.readyState>3&&dr()};function dr(){var pr=at.status,Ur;if(!pr&&ki(at)||pr>=200&&pr<300||pr===304){try{Ur=Te.call(Ve,at)}catch(zr){Ye.error.call(Ve,zr);return}Ye.load.call(Ve,Ur)}else Ye.error.call(Ve,at)}return at.onprogress=function(pr){var Ur=e.event;e.event=pr;try{Ye.progress.call(Ve,at)}finally{e.event=Ur}},Ve.header=function(pr,Ur){return pr=(pr+"").toLowerCase(),arguments.length<2?Pt[pr]:(Ur==null?delete Pt[pr]:Pt[pr]=Ur+"",Ve)},Ve.mimeType=function(pr){return arguments.length?(se=pr==null?null:pr+"",Ve):se},Ve.responseType=function(pr){return arguments.length?(Wt=pr,Ve):Wt},Ve.response=function(pr){return Te=pr,Ve},["get","post"].forEach(function(pr){Ve[pr]=function(){return Ve.send.apply(Ve,[pr].concat(r(arguments)))}}),Ve.send=function(pr,Ur,zr){if(arguments.length===2&&typeof Ur=="function"&&(zr=Ur,Ur=null),at.open(pr,X,!0),se!=null&&!("accept"in Pt)&&(Pt.accept=se+",*/*"),at.setRequestHeader)for(var gi in Pt)at.setRequestHeader(gi,Pt[gi]);return se!=null&&at.overrideMimeType&&at.overrideMimeType(se),Wt!=null&&(at.responseType=Wt),zr!=null&&Ve.on("error",zr).on("load",function(xi){zr(null,xi)}),Ye.beforesend.call(Ve,at),at.send(Ur==null?null:Ur),Ve},Ve.abort=function(){return at.abort(),Ve},e.rebind(Ve,Ye,"on"),Oe==null?Ve:Ve.get(En(Oe))}function En(X){return X.length===1?function(se,Te){X(se==null?Te:null)}:X}function ki(X){var se=X.responseType;return se&&se!=="text"?X.response:X.responseText}e.dsv=function(X,se){var Te=new RegExp('["'+X+` +]`),Oe=X.charCodeAt(0);function Ve(dr,pr,Ur){arguments.length<3&&(Ur=pr,pr=null);var zr=Sn(dr,se,pr==null?Ye:Pt(pr),Ur);return zr.row=function(gi){return arguments.length?zr.response((pr=gi)==null?Ye:Pt(gi)):pr},zr}function Ye(dr){return Ve.parse(dr.responseText)}function Pt(dr){return function(pr){return Ve.parse(pr.responseText,dr)}}Ve.parse=function(dr,pr){var Ur;return Ve.parseRows(dr,function(zr,gi){if(Ur)return Ur(zr,gi-1);var xi=function(Wr){for(var ii={},di=zr.length,Li=0;Li=xi)return zr;if(Li)return Li=!1,Ur;var Pn=Wr;if(dr.charCodeAt(Pn)===34){for(var kn=Pn;kn++24?(isFinite(se)&&(clearTimeout(Ma),Ma=setTimeout(po,se)),ea=0):(ea=1,_o(po))}e.timer.flush=function(){Lo(),ko()};function Lo(){for(var X=Date.now(),se=_n;se;)X>=se.t&&se.c(X-se.t)&&(se.c=null),se=se.n;return X}function ko(){for(var X,se=_n,Te=1/0;se;)se.c?(se.t=0;--at)Wr.push(Ve[dr[Ur[at]][2]]);for(at=+gi;at1&&Ir(X[Te[Oe-2]],X[Te[Oe-1]],X[Ve])<=0;)--Oe;Te[Oe++]=Ve}return Te.slice(0,Oe)}function ul(X,se){return X[0]-se[0]||X[1]-se[1]}e.geom.polygon=function(X){return ie(X,zl),X};var zl=e.geom.polygon.prototype=[];zl.area=function(){for(var X=-1,se=this.length,Te,Oe=this[se-1],Ve=0;++XJe)at=at.L;else if(Pt=se-xo(at,Te),Pt>Je){if(!at.R){Oe=at;break}at=at.R}else{Ye>-Je?(Oe=at.P,Ve=at):Pt>-Je?(Oe=at,Ve=at.N):Oe=Ve=at;break}var Wt=bs(X);if(zs.insert(Oe,Wt),!(!Oe&&!Ve)){if(Oe===Ve){qo(Oe),Ve=bs(Oe.site),zs.insert(Wt,Ve),Wt.edge=Ve.edge=rf(Oe.site,Wt.site),oa(Oe),oa(Ve);return}if(!Ve){Wt.edge=rf(Oe.site,Wt.site);return}qo(Oe),qo(Ve);var dr=Oe.site,pr=dr.x,Ur=dr.y,zr=X.x-pr,gi=X.y-Ur,xi=Ve.site,Wr=xi.x-pr,ii=xi.y-Ur,di=2*(zr*ii-gi*Wr),Li=zr*zr+gi*gi,Ti=Wr*Wr+ii*ii,Qr={x:(ii*Li-gi*Ti)/di+pr,y:(zr*Ti-Wr*Li)/di+Ur};pl(Ve.edge,dr,xi,Qr),Wt.edge=rf(dr,X,null,Qr),Ve.edge=rf(X,xi,null,Qr),oa(Oe),oa(Ve)}}function ql(X,se){var Te=X.site,Oe=Te.x,Ve=Te.y,Ye=Ve-se;if(!Ye)return Oe;var Pt=X.P;if(!Pt)return-1/0;Te=Pt.site;var at=Te.x,Wt=Te.y,dr=Wt-se;if(!dr)return at;var pr=at-Oe,Ur=1/Ye-1/dr,zr=pr/dr;return Ur?(-zr+Math.sqrt(zr*zr-2*Ur*(pr*pr/(-2*dr)-Wt+dr/2+Ve-Ye/2)))/Ur+Oe:(Oe+at)/2}function xo(X,se){var Te=X.N;if(Te)return ql(Te,se);var Oe=X.site;return Oe.y===se?Oe.x:1/0}function Kl(X){this.site=X,this.edges=[]}Kl.prototype.prepare=function(){for(var X=this.edges,se=X.length,Te;se--;)Te=X[se].edge,(!Te.b||!Te.a)&&X.splice(se,1);return X.sort(Hl),X.length};function Ns(X){for(var se=X[0][0],Te=X[1][0],Oe=X[0][1],Ve=X[1][1],Ye,Pt,at,Wt,dr=Ks,pr=dr.length,Ur,zr,gi,xi,Wr,ii;pr--;)if(Ur=dr[pr],!(!Ur||!Ur.prepare()))for(gi=Ur.edges,xi=gi.length,zr=0;zrJe||p(Wt-Pt)>Je)&&(gi.splice(zr,0,new Zc(Vf(Ur.site,ii,p(at-se)Je?{x:se,y:p(Ye-se)Je?{x:p(Pt-Ve)Je?{x:Te,y:p(Ye-Te)Je?{x:p(Pt-Oe)=-We)){var zr=Wt*Wt+dr*dr,gi=pr*pr+ii*ii,xi=(ii*zr-dr*gi)/Ur,Wr=(Wt*gi-pr*zr)/Ur,ii=Wr+at,di=Su.pop()||new ac;di.arc=X,di.site=Ve,di.x=xi+Pt,di.y=ii+Math.sqrt(xi*xi+Wr*Wr),di.cy=ii,X.circle=di;for(var Li=null,Ti=Yl._;Ti;)if(di.y0)){if(Wr/=gi,gi<0){if(Wr0){if(Wr>zr)return;Wr>Ur&&(Ur=Wr)}if(Wr=Te-at,!(!gi&&Wr<0)){if(Wr/=gi,gi<0){if(Wr>zr)return;Wr>Ur&&(Ur=Wr)}else if(gi>0){if(Wr0)){if(Wr/=xi,xi<0){if(Wr0){if(Wr>zr)return;Wr>Ur&&(Ur=Wr)}if(Wr=Oe-Wt,!(!xi&&Wr<0)){if(Wr/=xi,xi<0){if(Wr>zr)return;Wr>Ur&&(Ur=Wr)}else if(xi>0){if(Wr0&&(Ve.a={x:at+Ur*gi,y:Wt+Ur*xi}),zr<1&&(Ve.b={x:at+zr*gi,y:Wt+zr*xi}),Ve}}}}}}function Ol(X){for(var se=cl,Te=Oo(X[0][0],X[0][1],X[1][0],X[1][1]),Oe=se.length,Ve;Oe--;)Ve=se[Oe],(!Pc(Ve,X)||!Te(Ve)||p(Ve.a.x-Ve.b.x)=Ye)return;if(pr>zr){if(!Oe)Oe={x:xi,y:Pt};else if(Oe.y>=at)return;Te={x:xi,y:at}}else{if(!Oe)Oe={x:xi,y:at};else if(Oe.y1)if(pr>zr){if(!Oe)Oe={x:(Pt-di)/ii,y:Pt};else if(Oe.y>=at)return;Te={x:(at-di)/ii,y:at}}else{if(!Oe)Oe={x:(at-di)/ii,y:at};else if(Oe.y=Ye)return;Te={x:Ye,y:ii*Ye+di}}else{if(!Oe)Oe={x:Ye,y:ii*Ye+di};else if(Oe.x=pr&&di.x<=zr&&di.y>=Ur&&di.y<=gi?[[pr,gi],[zr,gi],[zr,Ur],[pr,Ur]]:[];Li.point=Wt[Wr]}),dr}function at(Wt){return Wt.map(function(dr,pr){return{x:Math.round(Oe(dr,pr)/Je)*Je,y:Math.round(Ve(dr,pr)/Je)*Je,i:pr}})}return Pt.links=function(Wt){return sc(at(Wt)).edges.filter(function(dr){return dr.l&&dr.r}).map(function(dr){return{source:Wt[dr.l.i],target:Wt[dr.r.i]}})},Pt.triangles=function(Wt){var dr=[];return sc(at(Wt)).cells.forEach(function(pr,Ur){for(var zr=pr.site,gi=pr.edges.sort(Hl),xi=-1,Wr=gi.length,ii,di,Li=gi[Wr-1].edge,Ti=Li.l===zr?Li.r:Li.l;++xiTi&&(Ti=pr.x),pr.y>Qr&&(Qr=pr.y),gi.push(pr.x),xi.push(pr.y);else for(Wr=0;WrTi&&(Ti=Pn),kn>Qr&&(Qr=kn),gi.push(Pn),xi.push(kn)}var Bn=Ti-di,na=Qr-Li;Bn>na?Qr=Li+Bn:Ti=di+na;function Ea(Da,go,Is,Ms,Xs,Un,ja,Fo){if(!(isNaN(Is)||isNaN(Ms)))if(Da.leaf){var Uo=Da.x,$s=Da.y;if(Uo!=null)if(p(Uo-Is)+p($s-Ms)<.01)Ia(Da,go,Is,Ms,Xs,Un,ja,Fo);else{var Sl=Da.point;Da.x=Da.y=Da.point=null,Ia(Da,Sl,Uo,$s,Xs,Un,ja,Fo),Ia(Da,go,Is,Ms,Xs,Un,ja,Fo)}else Da.x=Is,Da.y=Ms,Da.point=go}else Ia(Da,go,Is,Ms,Xs,Un,ja,Fo)}function Ia(Da,go,Is,Ms,Xs,Un,ja,Fo){var Uo=(Xs+ja)*.5,$s=(Un+Fo)*.5,Sl=Is>=Uo,bu=Ms>=$s,dl=bu<<1|Sl;Da.leaf=!1,Da=Da.nodes[dl]||(Da.nodes[dl]=$l()),Sl?Xs=Uo:ja=Uo,bu?Un=$s:Fo=$s,Ea(Da,go,Is,Ms,Xs,Un,ja,Fo)}var yo=$l();if(yo.add=function(Da){Ea(yo,Da,+Ur(Da,++Wr),+zr(Da,Wr),di,Li,Ti,Qr)},yo.visit=function(Da){fl(Da,yo,di,Li,Ti,Qr)},yo.find=function(Da){return lc(yo,Da[0],Da[1],di,Li,Ti,Qr)},Wr=-1,se==null){for(;++WrYe||zr>Pt||gi=Pn,na=Te>=kn,Ea=na<<1|Bn,Ia=Ea+4;EaTe&&(Ye=se.slice(Te,Ye),at[Pt]?at[Pt]+=Ye:at[++Pt]=Ye),(Oe=Oe[0])===(Ve=Ve[0])?at[Pt]?at[Pt]+=Ve:at[++Pt]=Ve:(at[++Pt]=null,Wt.push({i:Pt,x:Hs(Oe,Ve)})),Te=uc.lastIndex;return Te=0&&!(Oe=e.interpolators[Te](X,se)););return Oe}e.interpolators=[function(X,se){var Te=typeof se;return(Te==="string"?Jr.has(se.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(se)?Fu:Go:se instanceof Jn?Fu:Array.isArray(se)?Gu:Te==="object"&&isNaN(se)?Es:Hs)(X,se)}],e.interpolateArray=Gu;function Gu(X,se){var Te=[],Oe=[],Ve=X.length,Ye=se.length,Pt=Math.min(X.length,se.length),at;for(at=0;at=0?X.slice(0,se):X,Oe=se>=0?X.slice(se+1):"in";return Te=od.get(Te)||Os,Oe=Po.get(Oe)||G,sd(Oe(Te.apply(null,t.call(arguments,1))))};function sd(X){return function(se){return se<=0?0:se>=1?1:X(se)}}function Ko(X){return function(se){return 1-X(1-se)}}function Pa(X){return function(se){return .5*(se<.5?X(2*se):2-X(2-2*se))}}function af(X){return X*X}function Hu(X){return X*X*X}function bl(X){if(X<=0)return 0;if(X>=1)return 1;var se=X*X,Te=se*X;return 4*(X<.5?Te:3*(X-se)+Te-.75)}function Hf(X){return function(se){return Math.pow(se,X)}}function Ic(X){return 1-Math.cos(X*Kt)}function yf(X){return Math.pow(2,10*(X-1))}function Bl(X){return 1-Math.sqrt(1-X*X)}function Ah(X,se){var Te;return arguments.length<2&&(se=.45),arguments.length?Te=se/xt*Math.asin(1/X):(X=1,Te=se/4),function(Oe){return 1+X*Math.pow(2,-10*Oe)*Math.sin((Oe-Te)*xt/se)}}function Qf(X){return X||(X=1.70158),function(se){return se*se*((X+1)*se-X)}}function _f(X){return X<1/2.75?7.5625*X*X:X<2/2.75?7.5625*(X-=1.5/2.75)*X+.75:X<2.5/2.75?7.5625*(X-=2.25/2.75)*X+.9375:7.5625*(X-=2.625/2.75)*X+.984375}e.interpolateHcl=Yc;function Yc(X,se){X=e.hcl(X),se=e.hcl(se);var Te=X.h,Oe=X.c,Ve=X.l,Ye=se.h-Te,Pt=se.c-Oe,at=se.l-Ve;return isNaN(Pt)&&(Pt=0,Oe=isNaN(Oe)?se.c:Oe),isNaN(Ye)?(Ye=0,Te=isNaN(Te)?se.h:Te):Ye>180?Ye-=360:Ye<-180&&(Ye+=360),function(Wt){return Xr(Te+Ye*Wt,Oe+Pt*Wt,Ve+at*Wt)+""}}e.interpolateHsl=eh;function eh(X,se){X=e.hsl(X),se=e.hsl(se);var Te=X.h,Oe=X.s,Ve=X.l,Ye=se.h-Te,Pt=se.s-Oe,at=se.l-Ve;return isNaN(Pt)&&(Pt=0,Oe=isNaN(Oe)?se.s:Oe),isNaN(Ye)?(Ye=0,Te=isNaN(Te)?se.h:Te):Ye>180?Ye-=360:Ye<-180&&(Ye+=360),function(Wt){return rr(Te+Ye*Wt,Oe+Pt*Wt,Ve+at*Wt)+""}}e.interpolateLab=th;function th(X,se){X=e.lab(X),se=e.lab(se);var Te=X.l,Oe=X.a,Ve=X.b,Ye=se.l-Te,Pt=se.a-Oe,at=se.b-Ve;return function(Wt){return yn(Te+Ye*Wt,Oe+Pt*Wt,Ve+at*Wt)+""}}e.interpolateRound=ju;function ju(X,se){return se-=X,function(Te){return Math.round(X+se*Te)}}e.transform=function(X){var se=n.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(Te){if(Te!=null){se.setAttribute("transform",Te);var Oe=se.transform.baseVal.consolidate()}return new jf(Oe?Oe.matrix:Kc)})(X)};function jf(X){var se=[X.a,X.b],Te=[X.c,X.d],Oe=of(se),Ve=cc(se,Te),Ye=of(Nl(Te,se,-Ve))||0;se[0]*Te[1]180?se+=360:se-X>180&&(X+=360),Oe.push({i:Te.push(Rc(Te)+"rotate(",null,")")-2,x:Hs(X,se)})):se&&Te.push(Rc(Te)+"rotate("+se+")")}function Wh(X,se,Te,Oe){X!==se?Oe.push({i:Te.push(Rc(Te)+"skewX(",null,")")-2,x:Hs(X,se)}):se&&Te.push(Rc(Te)+"skewX("+se+")")}function rh(X,se,Te,Oe){if(X[0]!==se[0]||X[1]!==se[1]){var Ve=Te.push(Rc(Te)+"scale(",null,",",null,")");Oe.push({i:Ve-4,x:Hs(X[0],se[0])},{i:Ve-2,x:Hs(X[1],se[1])})}else(se[0]!==1||se[1]!==1)&&Te.push(Rc(Te)+"scale("+se+")")}function sf(X,se){var Te=[],Oe=[];return X=e.transform(X),se=e.transform(se),gs(X.translate,se.translate,Te,Oe),Wf(X.rotate,se.rotate,Te,Oe),Wh(X.skew,se.skew,Te,Oe),rh(X.scale,se.scale,Te,Oe),X=se=null,function(Ve){for(var Ye=-1,Pt=Oe.length,at;++Ye0?Ye=Qr:(Te.c=null,Te.t=NaN,Te=null,se.end({type:"end",alpha:Ye=0})):Qr>0&&(se.start({type:"start",alpha:Ye=Qr}),Te=No(X.tick)),X):Ye},X.start=function(){var Qr,Pn=gi.length,kn=xi.length,Bn=Oe[0],na=Oe[1],Ea,Ia;for(Qr=0;Qr=0;)Ye.push(pr=dr[Wt]),pr.parent=at,pr.depth=at.depth+1;Te&&(at.value=0),at.children=dr}else Te&&(at.value=+Te.call(Oe,at,at.depth)||0),delete at.children;return wc(Ve,function(Ur){var zr,gi;X&&(zr=Ur.children)&&zr.sort(X),Te&&(gi=Ur.parent)&&(gi.value+=Ur.value)}),Pt}return Oe.sort=function(Ve){return arguments.length?(X=Ve,Oe):X},Oe.children=function(Ve){return arguments.length?(se=Ve,Oe):se},Oe.value=function(Ve){return arguments.length?(Te=Ve,Oe):Te},Oe.revalue=function(Ve){return Te&&(Fc(Ve,function(Ye){Ye.children&&(Ye.value=0)}),wc(Ve,function(Ye){var Pt;Ye.children||(Ye.value=+Te.call(Oe,Ye,Ye.depth)||0),(Pt=Ye.parent)&&(Pt.value+=Ye.value)})),Ve},Oe};function zu(X,se){return e.rebind(X,se,"sort","children","value"),X.nodes=X,X.links=qu,X}function Fc(X,se){for(var Te=[X];(X=Te.pop())!=null;)if(se(X),(Ve=X.children)&&(Oe=Ve.length))for(var Oe,Ve;--Oe>=0;)Te.push(Ve[Oe])}function wc(X,se){for(var Te=[X],Oe=[];(X=Te.pop())!=null;)if(Oe.push(X),(Pt=X.children)&&(Ye=Pt.length))for(var Ve=-1,Ye,Pt;++VeVe&&(Ve=at),Oe.push(at)}for(Pt=0;PtOe&&(Te=se,Oe=Ve);return Te}function Us(X){return X.reduce(wf,0)}function wf(X,se){return X+se[1]}e.layout.histogram=function(){var X=!0,se=Number,Te=Rf,Oe=zc;function Ve(Ye,zr){for(var at=[],Wt=Ye.map(se,this),dr=Te.call(this,Wt,zr),pr=Oe.call(this,dr,Wt,zr),Ur,zr=-1,gi=Wt.length,xi=pr.length-1,Wr=X?1:1/gi,ii;++zr0)for(zr=-1;++zr=dr[0]&&ii<=dr[1]&&(Ur=at[e.bisect(pr,ii,1,xi)-1],Ur.y+=Wr,Ur.push(Ye[zr]));return at}return Ve.value=function(Ye){return arguments.length?(se=Ye,Ve):se},Ve.range=function(Ye){return arguments.length?(Te=hi(Ye),Ve):Te},Ve.bins=function(Ye){return arguments.length?(Oe=typeof Ye=="number"?function(Pt){return Wu(Pt,Ye)}:hi(Ye),Ve):Oe},Ve.frequency=function(Ye){return arguments.length?(X=!!Ye,Ve):X},Ve};function zc(X,se){return Wu(X,Math.ceil(Math.log(se.length)/Math.LN2+1))}function Wu(X,se){for(var Te=-1,Oe=+X[0],Ve=(X[1]-Oe)/se,Ye=[];++Te<=se;)Ye[Te]=Ve*Te+Oe;return Ye}function Rf(X){return[e.min(X),e.max(X)]}e.layout.pack=function(){var X=e.layout.hierarchy().sort(Xu),se=0,Te=[1,1],Oe;function Ve(Ye,Pt){var at=X.call(this,Ye,Pt),Wt=at[0],dr=Te[0],pr=Te[1],Ur=Oe==null?Math.sqrt:typeof Oe=="function"?Oe:function(){return Oe};if(Wt.x=Wt.y=0,wc(Wt,function(gi){gi.r=+Ur(gi.value)}),wc(Wt,ah),se){var zr=se*(Oe?1:Math.max(2*Wt.r/dr,2*Wt.r/pr))/2;wc(Wt,function(gi){gi.r+=zr}),wc(Wt,ah),wc(Wt,function(gi){gi.r-=zr})}return Tc(Wt,dr/2,pr/2,Oe?1:1/Math.max(2*Wt.r/dr,2*Wt.r/pr)),at}return Ve.size=function(Ye){return arguments.length?(Te=Ye,Ve):Te},Ve.radius=function(Ye){return arguments.length?(Oe=Ye==null||typeof Ye=="function"?Ye:+Ye,Ve):Oe},Ve.padding=function(Ye){return arguments.length?(se=+Ye,Ve):se},zu(Ve,X)};function Xu(X,se){return X.value-se.value}function uf(X,se){var Te=X._pack_next;X._pack_next=se,se._pack_prev=X,se._pack_next=Te,Te._pack_prev=se}function Zf(X,se){X._pack_next=se,se._pack_prev=X}function Wl(X,se){var Te=se.x-X.x,Oe=se.y-X.y,Ve=X.r+se.r;return .999*Ve*Ve>Te*Te+Oe*Oe}function ah(X){if(!(se=X.children)||!(zr=se.length))return;var se,Te=1/0,Oe=-1/0,Ve=1/0,Ye=-1/0,Pt,at,Wt,dr,pr,Ur,zr;function gi(Qr){Te=Math.min(Qr.x-Qr.r,Te),Oe=Math.max(Qr.x+Qr.r,Oe),Ve=Math.min(Qr.y-Qr.r,Ve),Ye=Math.max(Qr.y+Qr.r,Ye)}if(se.forEach(Zu),Pt=se[0],Pt.x=-Pt.r,Pt.y=0,gi(Pt),zr>1&&(at=se[1],at.x=at.r,at.y=0,gi(at),zr>2))for(Wt=se[2],wl(Pt,at,Wt),gi(Wt),uf(Pt,Wt),Pt._pack_prev=Wt,uf(Wt,at),at=Pt._pack_next,dr=3;drii.x&&(ii=Pn),Pn.depth>di.depth&&(di=Pn)});var Li=se(Wr,ii)/2-Wr.x,Ti=Te[0]/(ii.x+se(ii,Wr)/2+Li),Qr=Te[1]/(di.depth||1);Fc(gi,function(Pn){Pn.x=(Pn.x+Li)*Ti,Pn.y=Pn.depth*Qr})}return zr}function Ye(pr){for(var Ur={A:null,children:[pr]},zr=[Ur],gi;(gi=zr.pop())!=null;)for(var xi=gi.children,Wr,ii=0,di=xi.length;ii0&&(fc(kt(Wr,pr,zr),pr,Pn),di+=Pn,Li+=Pn),Ti+=Wr.m,di+=gi.m,Qr+=ii.m,Li+=xi.m;Wr&&!cf(xi)&&(xi.t=Wr,xi.m+=Ti-Li),gi&&!Oc(ii)&&(ii.t=gi,ii.m+=di-Qr,zr=pr)}return zr}function dr(pr){pr.x*=Te[0],pr.y=pr.depth*Te[1]}return Ve.separation=function(pr){return arguments.length?(se=pr,Ve):se},Ve.size=function(pr){return arguments.length?(Oe=(Te=pr)==null?dr:null,Ve):Oe?null:Te},Ve.nodeSize=function(pr){return arguments.length?(Oe=(Te=pr)==null?null:dr,Ve):Oe?Te:null},zu(Ve,X)};function vu(X,se){return X.parent==se.parent?1:2}function Oc(X){var se=X.children;return se.length?se[0]:X.t}function cf(X){var se=X.children,Te;return(Te=se.length)?se[Te-1]:X.t}function fc(X,se,Te){var Oe=Te/(se.i-X.i);se.c-=Oe,se.s+=Te,X.c+=Oe,se.z+=Te,se.m+=Te}function Bc(X){for(var se=0,Te=0,Oe=X.children,Ve=Oe.length,Ye;--Ve>=0;)Ye=Oe[Ve],Ye.z+=se,Ye.m+=se,se+=Ye.s+(Te+=Ye.c)}function kt(X,se,Te){return X.a.parent===se.parent?X.a:Te}e.layout.cluster=function(){var X=e.layout.hierarchy().sort(null).value(null),se=vu,Te=[1,1],Oe=!1;function Ve(Ye,Pt){var at=X.call(this,Ye,Pt),Wt=at[0],dr,pr=0;wc(Wt,function(Wr){var ii=Wr.children;ii&&ii.length?(Wr.x=Mr(ii),Wr.y=Zt(ii)):(Wr.x=dr?pr+=se(Wr,dr):0,Wr.y=0,dr=Wr)});var Ur=xr(Wt),zr=Kr(Wt),gi=Ur.x-se(Ur,zr)/2,xi=zr.x+se(zr,Ur)/2;return wc(Wt,Oe?function(Wr){Wr.x=(Wr.x-Wt.x)*Te[0],Wr.y=(Wt.y-Wr.y)*Te[1]}:function(Wr){Wr.x=(Wr.x-gi)/(xi-gi)*Te[0],Wr.y=(1-(Wt.y?Wr.y/Wt.y:1))*Te[1]}),at}return Ve.separation=function(Ye){return arguments.length?(se=Ye,Ve):se},Ve.size=function(Ye){return arguments.length?(Oe=(Te=Ye)==null,Ve):Oe?null:Te},Ve.nodeSize=function(Ye){return arguments.length?(Oe=(Te=Ye)!=null,Ve):Oe?Te:null},zu(Ve,X)};function Zt(X){return 1+e.max(X,function(se){return se.y})}function Mr(X){return X.reduce(function(se,Te){return se+Te.x},0)/X.length}function xr(X){var se=X.children;return se&&se.length?xr(se[0]):X}function Kr(X){var se=X.children,Te;return se&&(Te=se.length)?Kr(se[Te-1]):X}e.layout.treemap=function(){var X=e.layout.hierarchy(),se=Math.round,Te=[1,1],Oe=null,Ve=Mi,Ye=!1,Pt,at="squarify",Wt=.5*(1+Math.sqrt(5));function dr(Wr,ii){for(var di=-1,Li=Wr.length,Ti,Qr;++di0;)Li.push(Qr=Ti[na-1]),Li.area+=Qr.area,at!=="squarify"||(kn=zr(Li,Bn))<=Pn?(Ti.pop(),Pn=kn):(Li.area-=Li.pop().area,gi(Li,Bn,di,!1),Bn=Math.min(di.dx,di.dy),Li.length=Li.area=0,Pn=1/0);Li.length&&(gi(Li,Bn,di,!0),Li.length=Li.area=0),ii.forEach(pr)}}function Ur(Wr){var ii=Wr.children;if(ii&&ii.length){var di=Ve(Wr),Li=ii.slice(),Ti,Qr=[];for(dr(Li,di.dx*di.dy/Wr.value),Qr.area=0;Ti=Li.pop();)Qr.push(Ti),Qr.area+=Ti.area,Ti.z!=null&&(gi(Qr,Ti.z?di.dx:di.dy,di,!Li.length),Qr.length=Qr.area=0);ii.forEach(Ur)}}function zr(Wr,ii){for(var di=Wr.area,Li,Ti=0,Qr=1/0,Pn=-1,kn=Wr.length;++PnTi&&(Ti=Li));return di*=di,ii*=ii,di?Math.max(ii*Ti*Wt/di,di/(ii*Qr*Wt)):1/0}function gi(Wr,ii,di,Li){var Ti=-1,Qr=Wr.length,Pn=di.x,kn=di.y,Bn=ii?se(Wr.area/ii):0,na;if(ii==di.dx){for((Li||Bn>di.dy)&&(Bn=di.dy);++Tidi.dx)&&(Bn=di.dx);++Ti1);return X+se*Oe*Math.sqrt(-2*Math.log(Ye)/Ye)}},logNormal:function(){var X=e.random.normal.apply(e,arguments);return function(){return Math.exp(X())}},bates:function(X){var se=e.random.irwinHall(X);return function(){return se()/X}},irwinHall:function(X){return function(){for(var se=0,Te=0;Te2?Fi:On,dr=Oe?Mu:Sh;return Ve=Wt(X,se,dr,Te),Ye=Wt(se,X,dr,xl),at}function at(Wt){return Ve(Wt)}return at.invert=function(Wt){return Ye(Wt)},at.domain=function(Wt){return arguments.length?(X=Wt.map(Number),Pt()):X},at.range=function(Wt){return arguments.length?(se=Wt,Pt()):se},at.rangeRound=function(Wt){return at.range(Wt).interpolate(ju)},at.clamp=function(Wt){return arguments.length?(Oe=Wt,Pt()):Oe},at.interpolate=function(Wt){return arguments.length?(Te=Wt,Pt()):Te},at.ticks=function(Wt){return Na(X,Wt)},at.tickFormat=function(Wt,dr){return d3_scale_linearTickFormat(X,Wt,dr)},at.nice=function(Wt){return Ra(X,Wt),Pt()},at.copy=function(){return ta(X,se,Te,Oe)},Pt()}function Ca(X,se){return e.rebind(X,se,"range","rangeRound","interpolate","clamp")}function Ra(X,se){return Yi(X,$i(La(X,se)[2])),Yi(X,$i(La(X,se)[2])),X}function La(X,se){se==null&&(se=10);var Te=dn(X),Oe=Te[1]-Te[0],Ve=Math.pow(10,Math.floor(Math.log(Oe/se)/Math.LN10)),Ye=se/Oe*Ve;return Ye<=.15?Ve*=10:Ye<=.35?Ve*=5:Ye<=.75&&(Ve*=2),Te[0]=Math.ceil(Te[0]/Ve)*Ve,Te[1]=Math.floor(Te[1]/Ve)*Ve+Ve*.5,Te[2]=Ve,Te}function Na(X,se){return e.range.apply(e,La(X,se))}var Zn={s:1,g:1,p:1,r:1,e:1};function Dn(X){return-Math.floor(Math.log(X)/Math.LN10+.01)}function Ka(X,se){var Te=Dn(se[2]);return X in Zn?Math.abs(Te-Dn(Math.max(p(se[0]),p(se[1]))))+ +(X!=="e"):Te-(X==="%")*2}e.scale.log=function(){return bo(e.scale.linear().domain([0,1]),10,!0,[1,10])};function bo(X,se,Te,Oe){function Ve(at){return(Te?Math.log(at<0?0:at):-Math.log(at>0?0:-at))/Math.log(se)}function Ye(at){return Te?Math.pow(se,at):-Math.pow(se,-at)}function Pt(at){return X(Ve(at))}return Pt.invert=function(at){return Ye(X.invert(at))},Pt.domain=function(at){return arguments.length?(Te=at[0]>=0,X.domain((Oe=at.map(Number)).map(Ve)),Pt):Oe},Pt.base=function(at){return arguments.length?(se=+at,X.domain(Oe.map(Ve)),Pt):se},Pt.nice=function(){var at=Yi(Oe.map(Ve),Te?Math:Zo);return X.domain(at),Oe=at.map(Ye),Pt},Pt.ticks=function(){var at=dn(Oe),Wt=[],dr=at[0],pr=at[1],Ur=Math.floor(Ve(dr)),zr=Math.ceil(Ve(pr)),gi=se%1?2:se;if(isFinite(zr-Ur)){if(Te){for(;Ur0;xi--)Wt.push(Ye(Ur)*xi);for(Ur=0;Wt[Ur]pr;zr--);Wt=Wt.slice(Ur,zr)}return Wt},Pt.copy=function(){return bo(X.copy(),se,Te,Oe)},Ca(Pt,X)}var Zo={floor:function(X){return-Math.ceil(-X)},ceil:function(X){return-Math.floor(-X)}};e.scale.pow=function(){return Ss(e.scale.linear(),1,[0,1])};function Ss(X,se,Te){var Oe=as(se),Ve=as(1/se);function Ye(Pt){return X(Oe(Pt))}return Ye.invert=function(Pt){return Ve(X.invert(Pt))},Ye.domain=function(Pt){return arguments.length?(X.domain((Te=Pt.map(Number)).map(Oe)),Ye):Te},Ye.ticks=function(Pt){return Na(Te,Pt)},Ye.tickFormat=function(Pt,at){return d3_scale_linearTickFormat(Te,Pt,at)},Ye.nice=function(Pt){return Ye.domain(Ra(Te,Pt))},Ye.exponent=function(Pt){return arguments.length?(Oe=as(se=Pt),Ve=as(1/se),X.domain(Te.map(Oe)),Ye):se},Ye.copy=function(){return Ss(X.copy(),se,Te)},Ca(Ye,X)}function as(X){return function(se){return se<0?-Math.pow(-se,X):Math.pow(se,X)}}e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return ws([],{t:"range",a:[[]]})};function ws(X,se){var Te,Oe,Ve;function Ye(at){return Oe[((Te.get(at)||(se.t==="range"?Te.set(at,X.push(at)):NaN))-1)%Oe.length]}function Pt(at,Wt){return e.range(X.length).map(function(dr){return at+Wt*dr})}return Ye.domain=function(at){if(!arguments.length)return X;X=[],Te=new T;for(var Wt=-1,dr=at.length,pr;++Wt0?Te[Ye-1]:X[0],Yezr?0:1;if(pr=At)return Wt(pr,xi)+(dr?Wt(dr,1-xi):"")+"Z";var Wr,ii,di,Li,Ti=0,Qr=0,Pn,kn,Bn,na,Ea,Ia,yo,Da,go=[];if((Li=(+Pt.apply(this,arguments)||0)/2)&&(di=Oe===Cu?Math.sqrt(dr*dr+pr*pr):+Oe.apply(this,arguments),xi||(Qr*=-1),pr&&(Qr=_i(di/pr*Math.sin(Li))),dr&&(Ti=_i(di/dr*Math.sin(Li)))),pr){Pn=pr*Math.cos(Ur+Qr),kn=pr*Math.sin(Ur+Qr),Bn=pr*Math.cos(zr-Qr),na=pr*Math.sin(zr-Qr);var Is=Math.abs(zr-Ur-2*Qr)<=et?0:1;if(Qr&&Ac(Pn,kn,Bn,na)===xi^Is){var Ms=(Ur+zr)/2;Pn=pr*Math.cos(Ms),kn=pr*Math.sin(Ms),Bn=na=null}}else Pn=kn=0;if(dr){Ea=dr*Math.cos(zr-Ti),Ia=dr*Math.sin(zr-Ti),yo=dr*Math.cos(Ur+Ti),Da=dr*Math.sin(Ur+Ti);var Xs=Math.abs(Ur-zr+2*Ti)<=et?0:1;if(Ti&&Ac(Ea,Ia,yo,Da)===1-xi^Xs){var Un=(Ur+zr)/2;Ea=dr*Math.cos(Un),Ia=dr*Math.sin(Un),yo=Da=null}}else Ea=Ia=0;if(gi>Je&&(Wr=Math.min(Math.abs(pr-dr)/2,+Te.apply(this,arguments)))>.001){ii=dr0?0:1}function Ua(X,se,Te,Oe,Ve){var Ye=X[0]-se[0],Pt=X[1]-se[1],at=(Ve?Oe:-Oe)/Math.sqrt(Ye*Ye+Pt*Pt),Wt=at*Pt,dr=-at*Ye,pr=X[0]+Wt,Ur=X[1]+dr,zr=se[0]+Wt,gi=se[1]+dr,xi=(pr+zr)/2,Wr=(Ur+gi)/2,ii=zr-pr,di=gi-Ur,Li=ii*ii+di*di,Ti=Te-Oe,Qr=pr*gi-zr*Ur,Pn=(di<0?-1:1)*Math.sqrt(Math.max(0,Ti*Ti*Li-Qr*Qr)),kn=(Qr*di-ii*Pn)/Li,Bn=(-Qr*ii-di*Pn)/Li,na=(Qr*di+ii*Pn)/Li,Ea=(-Qr*ii+di*Pn)/Li,Ia=kn-xi,yo=Bn-Wr,Da=na-xi,go=Ea-Wr;return Ia*Ia+yo*yo>Da*Da+go*go&&(kn=na,Bn=Ea),[[kn-Wt,Bn-dr],[kn*Te/Ti,Bn*Te/Ti]]}function oo(){return!0}function Vc(X){var se=Ds,Te=Fs,Oe=oo,Ve=Ku,Ye=Ve.key,Pt=.7;function at(Wt){var dr=[],pr=[],Ur=-1,zr=Wt.length,gi,xi=hi(se),Wr=hi(Te);function ii(){dr.push("M",Ve(X(pr),Pt))}for(;++Ur1?X.join("L"):X+"Z"}function ue(X){return X.join("L")+"Z"}function w(X){for(var se=0,Te=X.length,Oe=X[0],Ve=[Oe[0],",",Oe[1]];++se1&&Ve.push("H",Oe[0]),Ve.join("")}function B(X){for(var se=0,Te=X.length,Oe=X[0],Ve=[Oe[0],",",Oe[1]];++se1){at=se[1],Ye=X[Wt],Wt++,Oe+="C"+(Ve[0]+Pt[0])+","+(Ve[1]+Pt[1])+","+(Ye[0]-at[0])+","+(Ye[1]-at[1])+","+Ye[0]+","+Ye[1];for(var dr=2;dr9&&(Ye=Te*3/Math.sqrt(Ye),Pt[at]=Ye*Oe,Pt[at+1]=Ye*Ve));for(at=-1;++at<=Wt;)Ye=(X[Math.min(Wt,at+1)][0]-X[Math.max(0,at-1)][0])/(6*(1+Pt[at]*Pt[at])),se.push([Ye||0,Pt[at]*Ye||0]);return se}function qt(X){return X.length<3?Ku(X):X[0]+Ze(X,nt(X))}e.svg.line.radial=function(){var X=Vc(jt);return X.radius=X.x,delete X.x,X.angle=X.y,delete X.y,X};function jt(X){for(var se,Te=-1,Oe=X.length,Ve,Ye;++Teet)+",1 "+Ur}function dr(pr,Ur,zr,gi){return"Q 0,0 "+gi}return Ye.radius=function(pr){return arguments.length?(Te=hi(pr),Ye):Te},Ye.source=function(pr){return arguments.length?(X=hi(pr),Ye):X},Ye.target=function(pr){return arguments.length?(se=hi(pr),Ye):se},Ye.startAngle=function(pr){return arguments.length?(Oe=hi(pr),Ye):Oe},Ye.endAngle=function(pr){return arguments.length?(Ve=hi(pr),Ye):Ve},Ye};function Fr(X){return X.radius}e.svg.diagonal=function(){var X=fr,se=br,Te=Hr;function Oe(Ve,Ye){var Pt=X.call(this,Ve,Ye),at=se.call(this,Ve,Ye),Wt=(Pt.y+at.y)/2,dr=[Pt,{x:Pt.x,y:Wt},{x:at.x,y:Wt},at];return dr=dr.map(Te),"M"+dr[0]+"C"+dr[1]+" "+dr[2]+" "+dr[3]}return Oe.source=function(Ve){return arguments.length?(X=hi(Ve),Oe):X},Oe.target=function(Ve){return arguments.length?(se=hi(Ve),Oe):se},Oe.projection=function(Ve){return arguments.length?(Te=Ve,Oe):Te},Oe};function Hr(X){return[X.x,X.y]}e.svg.diagonal.radial=function(){var X=e.svg.diagonal(),se=Hr,Te=X.projection;return X.projection=function(Oe){return arguments.length?Te(ri(se=Oe)):se},X};function ri(X){return function(){var se=X.apply(this,arguments),Te=se[0],Oe=se[1]-Kt;return[Te*Math.cos(Oe),Te*Math.sin(Oe)]}}e.svg.symbol=function(){var X=cn,se=Ci;function Te(Oe,Ve){return(Ln.get(X.call(this,Oe,Ve))||sn)(se.call(this,Oe,Ve))}return Te.type=function(Oe){return arguments.length?(X=hi(Oe),Te):X},Te.size=function(Oe){return arguments.length?(se=hi(Oe),Te):se},Te};function Ci(){return 64}function cn(){return"circle"}function sn(X){var se=Math.sqrt(X/et);return"M0,"+se+"A"+se+","+se+" 0 1,1 0,"+-se+"A"+se+","+se+" 0 1,1 0,"+se+"Z"}var Ln=e.map({circle:sn,cross:function(X){var se=Math.sqrt(X/5)/2;return"M"+-3*se+","+-se+"H"+-se+"V"+-3*se+"H"+se+"V"+-se+"H"+3*se+"V"+se+"H"+se+"V"+3*se+"H"+-se+"V"+se+"H"+-3*se+"Z"},diamond:function(X){var se=Math.sqrt(X/(2*Aa)),Te=se*Aa;return"M0,"+-se+"L"+Te+",0 0,"+se+" "+-Te+",0Z"},square:function(X){var se=Math.sqrt(X)/2;return"M"+-se+","+-se+"L"+se+","+-se+" "+se+","+se+" "+-se+","+se+"Z"},"triangle-down":function(X){var se=Math.sqrt(X/Yn),Te=se*Yn/2;return"M0,"+Te+"L"+se+","+-Te+" "+-se+","+-Te+"Z"},"triangle-up":function(X){var se=Math.sqrt(X/Yn),Te=se*Yn/2;return"M0,"+-Te+"L"+se+","+Te+" "+-se+","+Te+"Z"}});e.svg.symbolTypes=Ln.keys();var Yn=Math.sqrt(3),Aa=Math.tan(30*er);Le.transition=function(X){for(var se=Bo||++mo,Te=To(X),Oe=[],Ve,Ye,Pt=Ps||{time:Date.now(),ease:bl,delay:0,duration:250},at=-1,Wt=this.length;++at0;)Ur[--Li].call(X,di);if(ii>=1)return Pt.event&&Pt.event.end.call(X,X.__data__,se),--Ye.count?delete Ye[Oe]:delete X[Te],1}Pt||(at=Ve.time,Wt=No(zr,0,at),Pt=Ye[Oe]={tween:new T,time:at,timer:Wt,delay:Ve.delay,duration:Ve.duration,ease:Ve.ease,index:se},Ve=null,++Ye.count)}e.svg.axis=function(){var X=e.scale.linear(),se=Ul,Te=6,Oe=6,Ve=3,Ye=[10],Pt=null,at;function Wt(dr){dr.each(function(){var pr=e.select(this),Ur=this.__chart__||X,zr=this.__chart__=X.copy(),gi=Pt==null?zr.ticks?zr.ticks.apply(zr,Ye):zr.domain():Pt,xi=at==null?zr.tickFormat?zr.tickFormat.apply(zr,Ye):G:at,Wr=pr.selectAll(".tick").data(gi,zr),ii=Wr.enter().insert("g",".domain").attr("class","tick").style("opacity",Je),di=e.transition(Wr.exit()).style("opacity",Je).remove(),Li=e.transition(Wr.order()).style("opacity",1),Ti=Math.max(Te,0)+Ve,Qr,Pn=wn(zr),kn=pr.selectAll(".domain").data([0]),Bn=(kn.enter().append("path").attr("class","domain"),e.transition(kn));ii.append("line"),ii.append("text");var na=ii.select("line"),Ea=Li.select("line"),Ia=Wr.select("text").text(xi),yo=ii.select("text"),Da=Li.select("text"),go=se==="top"||se==="left"?-1:1,Is,Ms,Xs,Un;if(se==="bottom"||se==="top"?(Qr=au,Is="x",Xs="y",Ms="x2",Un="y2",Ia.attr("dy",go<0?"0em":".71em").style("text-anchor","middle"),Bn.attr("d","M"+Pn[0]+","+go*Oe+"V0H"+Pn[1]+"V"+go*Oe)):(Qr=Js,Is="y",Xs="x",Ms="y2",Un="x2",Ia.attr("dy",".32em").style("text-anchor",go<0?"end":"start"),Bn.attr("d","M"+go*Oe+","+Pn[0]+"H0V"+Pn[1]+"H"+go*Oe)),na.attr(Un,go*Te),yo.attr(Xs,go*Ti),Ea.attr(Ms,0).attr(Un,go*Te),Da.attr(Is,0).attr(Xs,go*Ti),zr.rangeBand){var ja=zr,Fo=ja.rangeBand()/2;Ur=zr=function(Uo){return ja(Uo)+Fo}}else Ur.rangeBand?Ur=zr:di.call(Qr,zr,Ur);ii.call(Qr,Ur,zr),Li.call(Qr,zr,zr)})}return Wt.scale=function(dr){return arguments.length?(X=dr,Wt):X},Wt.orient=function(dr){return arguments.length?(se=dr in Lu?dr+"":Ul,Wt):se},Wt.ticks=function(){return arguments.length?(Ye=r(arguments),Wt):Ye},Wt.tickValues=function(dr){return arguments.length?(Pt=dr,Wt):Pt},Wt.tickFormat=function(dr){return arguments.length?(at=dr,Wt):at},Wt.tickSize=function(dr){var pr=arguments.length;return pr?(Te=+dr,Oe=+arguments[pr-1],Wt):Te},Wt.innerTickSize=function(dr){return arguments.length?(Te=+dr,Wt):Te},Wt.outerTickSize=function(dr){return arguments.length?(Oe=+dr,Wt):Oe},Wt.tickPadding=function(dr){return arguments.length?(Ve=+dr,Wt):Ve},Wt.tickSubdivide=function(){return arguments.length&&Wt},Wt};var Ul="bottom",Lu={top:1,right:1,bottom:1,left:1};function au(X,se,Te){X.attr("transform",function(Oe){var Ve=se(Oe);return"translate("+(isFinite(Ve)?Ve:Te(Oe))+",0)"})}function Js(X,se,Te){X.attr("transform",function(Oe){var Ve=se(Oe);return"translate(0,"+(isFinite(Ve)?Ve:Te(Oe))+")"})}e.svg.brush=function(){var X=Ce(pr,"brushstart","brush","brushend"),se=null,Te=null,Oe=[0,0],Ve=[0,0],Ye,Pt,at=!0,Wt=!0,dr=dc[0];function pr(Wr){Wr.each(function(){var ii=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",xi).on("touchstart.brush",xi),di=ii.selectAll(".background").data([0]);di.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),ii.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Li=ii.selectAll(".resize").data(dr,G);Li.exit().remove(),Li.enter().append("g").attr("class",function(kn){return"resize "+kn}).style("cursor",function(kn){return eu[kn]}).append("rect").attr("x",function(kn){return/[ew]$/.test(kn)?-3:null}).attr("y",function(kn){return/^[ns]/.test(kn)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Li.style("display",pr.empty()?"none":null);var Ti=e.transition(ii),Qr=e.transition(di),Pn;se&&(Pn=wn(se),Qr.attr("x",Pn[0]).attr("width",Pn[1]-Pn[0]),zr(Ti)),Te&&(Pn=wn(Te),Qr.attr("y",Pn[0]).attr("height",Pn[1]-Pn[0]),gi(Ti)),Ur(Ti)})}pr.event=function(Wr){Wr.each(function(){var ii=X.of(this,arguments),di={x:Oe,y:Ve,i:Ye,j:Pt},Li=this.__chart__||di;this.__chart__=di,Bo?e.select(this).transition().each("start.brush",function(){Ye=Li.i,Pt=Li.j,Oe=Li.x,Ve=Li.y,ii({type:"brushstart"})}).tween("brush:brush",function(){var Ti=Gu(Oe,di.x),Qr=Gu(Ve,di.y);return Ye=Pt=null,function(Pn){Oe=di.x=Ti(Pn),Ve=di.y=Qr(Pn),ii({type:"brush",mode:"resize"})}}).each("end.brush",function(){Ye=di.i,Pt=di.j,ii({type:"brush",mode:"resize"}),ii({type:"brushend"})}):(ii({type:"brushstart"}),ii({type:"brush",mode:"resize"}),ii({type:"brushend"}))})};function Ur(Wr){Wr.selectAll(".resize").attr("transform",function(ii){return"translate("+Oe[+/e$/.test(ii)]+","+Ve[+/^s/.test(ii)]+")"})}function zr(Wr){Wr.select(".extent").attr("x",Oe[0]),Wr.selectAll(".extent,.n>rect,.s>rect").attr("width",Oe[1]-Oe[0])}function gi(Wr){Wr.select(".extent").attr("y",Ve[0]),Wr.selectAll(".extent,.e>rect,.w>rect").attr("height",Ve[1]-Ve[0])}function xi(){var Wr=this,ii=e.select(e.event.target),di=X.of(Wr,arguments),Li=e.select(Wr),Ti=ii.datum(),Qr=!/^(n|s)$/.test(Ti)&&se,Pn=!/^(e|w)$/.test(Ti)&&Te,kn=ii.classed("extent"),Bn=qr(Wr),na,Ea=e.mouse(Wr),Ia,yo=e.select(a(Wr)).on("keydown.brush",Is).on("keyup.brush",Ms);if(e.event.changedTouches?yo.on("touchmove.brush",Xs).on("touchend.brush",ja):yo.on("mousemove.brush",Xs).on("mouseup.brush",ja),Li.interrupt().selectAll("*").interrupt(),kn)Ea[0]=Oe[0]-Ea[0],Ea[1]=Ve[0]-Ea[1];else if(Ti){var Da=+/w$/.test(Ti),go=+/^n/.test(Ti);Ia=[Oe[1-Da]-Ea[0],Ve[1-go]-Ea[1]],Ea[0]=Oe[Da],Ea[1]=Ve[go]}else e.event.altKey&&(na=Ea.slice());Li.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",ii.style("cursor")),di({type:"brushstart"}),Xs();function Is(){e.event.keyCode==32&&(kn||(na=null,Ea[0]-=Oe[1],Ea[1]-=Ve[1],kn=2),_e())}function Ms(){e.event.keyCode==32&&kn==2&&(Ea[0]+=Oe[1],Ea[1]+=Ve[1],kn=0,_e())}function Xs(){var Fo=e.mouse(Wr),Uo=!1;Ia&&(Fo[0]+=Ia[0],Fo[1]+=Ia[1]),kn||(e.event.altKey?(na||(na=[(Oe[0]+Oe[1])/2,(Ve[0]+Ve[1])/2]),Ea[0]=Oe[+(Fo[0]{(function(e,t){typeof _6=="object"&&typeof wee!="undefined"?t(_6):(e=e||self,t(e.d3=e.d3||{}))})(_6,function(e){"use strict";var t=new Date,r=new Date;function n(Ae,rt,St,Tt){function dt(Et){return Ae(Et=arguments.length===0?new Date:new Date(+Et)),Et}return dt.floor=function(Et){return Ae(Et=new Date(+Et)),Et},dt.ceil=function(Et){return Ae(Et=new Date(Et-1)),rt(Et,1),Ae(Et),Et},dt.round=function(Et){var pt=dt(Et),Xt=dt.ceil(Et);return Et-pt0))return or;do or.push(_r=new Date(+Et)),rt(Et,Xt),Ae(Et);while(_r=pt)for(;Ae(pt),!Et(pt);)pt.setTime(pt-1)},function(pt,Xt){if(pt>=pt)if(Xt<0)for(;++Xt<=0;)for(;rt(pt,-1),!Et(pt););else for(;--Xt>=0;)for(;rt(pt,1),!Et(pt););})},St&&(dt.count=function(Et,pt){return t.setTime(+Et),r.setTime(+pt),Ae(t),Ae(r),Math.floor(St(t,r))},dt.every=function(Et){return Et=Math.floor(Et),!isFinite(Et)||!(Et>0)?null:Et>1?dt.filter(Tt?function(pt){return Tt(pt)%Et===0}:function(pt){return dt.count(0,pt)%Et===0}):dt}),dt}var i=n(function(){},function(Ae,rt){Ae.setTime(+Ae+rt)},function(Ae,rt){return rt-Ae});i.every=function(Ae){return Ae=Math.floor(Ae),!isFinite(Ae)||!(Ae>0)?null:Ae>1?n(function(rt){rt.setTime(Math.floor(rt/Ae)*Ae)},function(rt,St){rt.setTime(+rt+St*Ae)},function(rt,St){return(St-rt)/Ae}):i};var a=i.range,o=1e3,s=6e4,l=36e5,u=864e5,c=6048e5,f=n(function(Ae){Ae.setTime(Ae-Ae.getMilliseconds())},function(Ae,rt){Ae.setTime(+Ae+rt*o)},function(Ae,rt){return(rt-Ae)/o},function(Ae){return Ae.getUTCSeconds()}),h=f.range,d=n(function(Ae){Ae.setTime(Ae-Ae.getMilliseconds()-Ae.getSeconds()*o)},function(Ae,rt){Ae.setTime(+Ae+rt*s)},function(Ae,rt){return(rt-Ae)/s},function(Ae){return Ae.getMinutes()}),v=d.range,m=n(function(Ae){Ae.setTime(Ae-Ae.getMilliseconds()-Ae.getSeconds()*o-Ae.getMinutes()*s)},function(Ae,rt){Ae.setTime(+Ae+rt*l)},function(Ae,rt){return(rt-Ae)/l},function(Ae){return Ae.getHours()}),b=m.range,p=n(function(Ae){Ae.setHours(0,0,0,0)},function(Ae,rt){Ae.setDate(Ae.getDate()+rt)},function(Ae,rt){return(rt-Ae-(rt.getTimezoneOffset()-Ae.getTimezoneOffset())*s)/u},function(Ae){return Ae.getDate()-1}),k=p.range;function M(Ae){return n(function(rt){rt.setDate(rt.getDate()-(rt.getDay()+7-Ae)%7),rt.setHours(0,0,0,0)},function(rt,St){rt.setDate(rt.getDate()+St*7)},function(rt,St){return(St-rt-(St.getTimezoneOffset()-rt.getTimezoneOffset())*s)/c})}var T=M(0),L=M(1),x=M(2),C=M(3),S=M(4),g=M(5),P=M(6),E=T.range,z=L.range,q=x.range,U=C.range,G=S.range,Z=g.range,j=P.range,N=n(function(Ae){Ae.setDate(1),Ae.setHours(0,0,0,0)},function(Ae,rt){Ae.setMonth(Ae.getMonth()+rt)},function(Ae,rt){return rt.getMonth()-Ae.getMonth()+(rt.getFullYear()-Ae.getFullYear())*12},function(Ae){return Ae.getMonth()}),H=N.range,re=n(function(Ae){Ae.setMonth(0,1),Ae.setHours(0,0,0,0)},function(Ae,rt){Ae.setFullYear(Ae.getFullYear()+rt)},function(Ae,rt){return rt.getFullYear()-Ae.getFullYear()},function(Ae){return Ae.getFullYear()});re.every=function(Ae){return!isFinite(Ae=Math.floor(Ae))||!(Ae>0)?null:n(function(rt){rt.setFullYear(Math.floor(rt.getFullYear()/Ae)*Ae),rt.setMonth(0,1),rt.setHours(0,0,0,0)},function(rt,St){rt.setFullYear(rt.getFullYear()+St*Ae)})};var oe=re.range,_e=n(function(Ae){Ae.setUTCSeconds(0,0)},function(Ae,rt){Ae.setTime(+Ae+rt*s)},function(Ae,rt){return(rt-Ae)/s},function(Ae){return Ae.getUTCMinutes()}),ke=_e.range,Ce=n(function(Ae){Ae.setUTCMinutes(0,0,0)},function(Ae,rt){Ae.setTime(+Ae+rt*l)},function(Ae,rt){return(rt-Ae)/l},function(Ae){return Ae.getUTCHours()}),ge=Ce.range,ie=n(function(Ae){Ae.setUTCHours(0,0,0,0)},function(Ae,rt){Ae.setUTCDate(Ae.getUTCDate()+rt)},function(Ae,rt){return(rt-Ae)/u},function(Ae){return Ae.getUTCDate()-1}),Se=ie.range;function Ee(Ae){return n(function(rt){rt.setUTCDate(rt.getUTCDate()-(rt.getUTCDay()+7-Ae)%7),rt.setUTCHours(0,0,0,0)},function(rt,St){rt.setUTCDate(rt.getUTCDate()+St*7)},function(rt,St){return(St-rt)/c})}var we=Ee(0),De=Ee(1),Le=Ee(2),me=Ee(3),Pe=Ee(4),ce=Ee(5),He=Ee(6),lt=we.range,mt=De.range,Vt=Le.range,st=me.range,ct=Pe.range,Qt=ce.range,Ht=He.range,nr=n(function(Ae){Ae.setUTCDate(1),Ae.setUTCHours(0,0,0,0)},function(Ae,rt){Ae.setUTCMonth(Ae.getUTCMonth()+rt)},function(Ae,rt){return rt.getUTCMonth()-Ae.getUTCMonth()+(rt.getUTCFullYear()-Ae.getUTCFullYear())*12},function(Ae){return Ae.getUTCMonth()}),tt=nr.range,je=n(function(Ae){Ae.setUTCMonth(0,1),Ae.setUTCHours(0,0,0,0)},function(Ae,rt){Ae.setUTCFullYear(Ae.getUTCFullYear()+rt)},function(Ae,rt){return rt.getUTCFullYear()-Ae.getUTCFullYear()},function(Ae){return Ae.getUTCFullYear()});je.every=function(Ae){return!isFinite(Ae=Math.floor(Ae))||!(Ae>0)?null:n(function(rt){rt.setUTCFullYear(Math.floor(rt.getUTCFullYear()/Ae)*Ae),rt.setUTCMonth(0,1),rt.setUTCHours(0,0,0,0)},function(rt,St){rt.setUTCFullYear(rt.getUTCFullYear()+St*Ae)})};var Ue=je.range;e.timeDay=p,e.timeDays=k,e.timeFriday=g,e.timeFridays=Z,e.timeHour=m,e.timeHours=b,e.timeInterval=n,e.timeMillisecond=i,e.timeMilliseconds=a,e.timeMinute=d,e.timeMinutes=v,e.timeMonday=L,e.timeMondays=z,e.timeMonth=N,e.timeMonths=H,e.timeSaturday=P,e.timeSaturdays=j,e.timeSecond=f,e.timeSeconds=h,e.timeSunday=T,e.timeSundays=E,e.timeThursday=S,e.timeThursdays=G,e.timeTuesday=x,e.timeTuesdays=q,e.timeWednesday=C,e.timeWednesdays=U,e.timeWeek=T,e.timeWeeks=E,e.timeYear=re,e.timeYears=oe,e.utcDay=ie,e.utcDays=Se,e.utcFriday=ce,e.utcFridays=Qt,e.utcHour=Ce,e.utcHours=ge,e.utcMillisecond=i,e.utcMilliseconds=a,e.utcMinute=_e,e.utcMinutes=ke,e.utcMonday=De,e.utcMondays=mt,e.utcMonth=nr,e.utcMonths=tt,e.utcSaturday=He,e.utcSaturdays=Ht,e.utcSecond=f,e.utcSeconds=h,e.utcSunday=we,e.utcSundays=lt,e.utcThursday=Pe,e.utcThursdays=ct,e.utcTuesday=Le,e.utcTuesdays=Vt,e.utcWednesday=me,e.utcWednesdays=st,e.utcWeek=we,e.utcWeeks=lt,e.utcYear=je,e.utcYears=Ue,Object.defineProperty(e,"__esModule",{value:!0})})});var h3=ye((x6,Tee)=>{(function(e,t){typeof x6=="object"&&typeof Tee!="undefined"?t(x6,Sq()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(x6,function(e,t){"use strict";function r(Ge){if(0<=Ge.y&&Ge.y<100){var Je=new Date(-1,Ge.m,Ge.d,Ge.H,Ge.M,Ge.S,Ge.L);return Je.setFullYear(Ge.y),Je}return new Date(Ge.y,Ge.m,Ge.d,Ge.H,Ge.M,Ge.S,Ge.L)}function n(Ge){if(0<=Ge.y&&Ge.y<100){var Je=new Date(Date.UTC(-1,Ge.m,Ge.d,Ge.H,Ge.M,Ge.S,Ge.L));return Je.setUTCFullYear(Ge.y),Je}return new Date(Date.UTC(Ge.y,Ge.m,Ge.d,Ge.H,Ge.M,Ge.S,Ge.L))}function i(Ge,Je,We){return{y:Ge,m:Je,d:We,H:0,M:0,S:0,L:0}}function a(Ge){var Je=Ge.dateTime,We=Ge.date,et=Ge.time,xt=Ge.periods,At=Ge.days,Kt=Ge.shortDays,er=Ge.months,Sr=Ge.shortMonths,Gr=h(xt),Ir=d(xt),Yr=h(At),_i=d(At),Pi=h(Kt),ai=d(Kt),mi=h(er),un=d(er),Fn=h(Sr),An=d(Sr),Hn={a:Zi,A:en,b:fn,B:yn,c:null,d:N,e:N,f:ke,H,I:re,j:oe,L:_e,m:Ce,M:ge,p:Mn,q:Ba,Q:pt,s:Xt,S:ie,u:Se,U:Ee,V:we,w:De,W:Le,x:null,X:null,y:me,Y:Pe,Z:ce,"%":Et},Qn={a:ua,A:ma,b:Wa,B:Fa,c:null,d:He,e:He,f:ct,H:lt,I:mt,j:Vt,L:st,m:Qt,M:Ht,p:Xo,q:da,Q:pt,s:Xt,S:nr,u:tt,U:je,V:Ue,w:Ae,W:rt,x:null,X:null,y:St,Y:Tt,Z:dt,"%":Et},Vi={a:rr,A:ir,b:wr,B:Xr,c:ti,d:S,e:S,f:U,H:P,I:P,j:g,L:q,m:C,M:E,p:wt,q:x,Q:Z,s:j,S:z,u:m,U:b,V:p,w:v,W:k,x:$r,X:Ri,y:T,Y:M,Z:L,"%":G};Hn.x=Kn(We,Hn),Hn.X=Kn(et,Hn),Hn.c=Kn(Je,Hn),Qn.x=Kn(We,Qn),Qn.X=Kn(et,Qn),Qn.c=Kn(Je,Qn);function Kn(jn,Ha){return function(vo){var Gn=[],Ct=-1,Ar=0,Jr=jn.length,hi,hn,Sn;for(vo instanceof Date||(vo=new Date(+vo));++Ct53)return null;"w"in Gn||(Gn.w=1),"Z"in Gn?(Ar=n(i(Gn.y,0,1)),Jr=Ar.getUTCDay(),Ar=Jr>4||Jr===0?t.utcMonday.ceil(Ar):t.utcMonday(Ar),Ar=t.utcDay.offset(Ar,(Gn.V-1)*7),Gn.y=Ar.getUTCFullYear(),Gn.m=Ar.getUTCMonth(),Gn.d=Ar.getUTCDate()+(Gn.w+6)%7):(Ar=r(i(Gn.y,0,1)),Jr=Ar.getDay(),Ar=Jr>4||Jr===0?t.timeMonday.ceil(Ar):t.timeMonday(Ar),Ar=t.timeDay.offset(Ar,(Gn.V-1)*7),Gn.y=Ar.getFullYear(),Gn.m=Ar.getMonth(),Gn.d=Ar.getDate()+(Gn.w+6)%7)}else("W"in Gn||"U"in Gn)&&("w"in Gn||(Gn.w="u"in Gn?Gn.u%7:"W"in Gn?1:0),Jr="Z"in Gn?n(i(Gn.y,0,1)).getUTCDay():r(i(Gn.y,0,1)).getDay(),Gn.m=0,Gn.d="W"in Gn?(Gn.w+6)%7+Gn.W*7-(Jr+5)%7:Gn.w+Gn.U*7-(Jr+6)%7);return"Z"in Gn?(Gn.H+=Gn.Z/100|0,Gn.M+=Gn.Z%100,n(Gn)):r(Gn)}}function Gt(jn,Ha,vo,Gn){for(var Ct=0,Ar=Ha.length,Jr=vo.length,hi,hn;Ct=Jr)return-1;if(hi=Ha.charCodeAt(Ct++),hi===37){if(hi=Ha.charAt(Ct++),hn=Vi[hi in o?Ha.charAt(Ct++):hi],!hn||(Gn=hn(jn,vo,Gn))<0)return-1}else if(hi!=vo.charCodeAt(Gn++))return-1}return Gn}function wt(jn,Ha,vo){var Gn=Gr.exec(Ha.slice(vo));return Gn?(jn.p=Ir[Gn[0].toLowerCase()],vo+Gn[0].length):-1}function rr(jn,Ha,vo){var Gn=Pi.exec(Ha.slice(vo));return Gn?(jn.w=ai[Gn[0].toLowerCase()],vo+Gn[0].length):-1}function ir(jn,Ha,vo){var Gn=Yr.exec(Ha.slice(vo));return Gn?(jn.w=_i[Gn[0].toLowerCase()],vo+Gn[0].length):-1}function wr(jn,Ha,vo){var Gn=Fn.exec(Ha.slice(vo));return Gn?(jn.m=An[Gn[0].toLowerCase()],vo+Gn[0].length):-1}function Xr(jn,Ha,vo){var Gn=mi.exec(Ha.slice(vo));return Gn?(jn.m=un[Gn[0].toLowerCase()],vo+Gn[0].length):-1}function ti(jn,Ha,vo){return Gt(jn,Je,Ha,vo)}function $r(jn,Ha,vo){return Gt(jn,We,Ha,vo)}function Ri(jn,Ha,vo){return Gt(jn,et,Ha,vo)}function Zi(jn){return Kt[jn.getDay()]}function en(jn){return At[jn.getDay()]}function fn(jn){return Sr[jn.getMonth()]}function yn(jn){return er[jn.getMonth()]}function Mn(jn){return xt[+(jn.getHours()>=12)]}function Ba(jn){return 1+~~(jn.getMonth()/3)}function ua(jn){return Kt[jn.getUTCDay()]}function ma(jn){return At[jn.getUTCDay()]}function Wa(jn){return Sr[jn.getUTCMonth()]}function Fa(jn){return er[jn.getUTCMonth()]}function Xo(jn){return xt[+(jn.getUTCHours()>=12)]}function da(jn){return 1+~~(jn.getUTCMonth()/3)}return{format:function(jn){var Ha=Kn(jn+="",Hn);return Ha.toString=function(){return jn},Ha},parse:function(jn){var Ha=Jn(jn+="",!1);return Ha.toString=function(){return jn},Ha},utcFormat:function(jn){var Ha=Kn(jn+="",Qn);return Ha.toString=function(){return jn},Ha},utcParse:function(jn){var Ha=Jn(jn+="",!0);return Ha.toString=function(){return jn},Ha}}}var o={"-":"",_:" ",0:"0"},s=/^\s*\d+/,l=/^%/,u=/[\\^$*+?|[\]().{}]/g;function c(Ge,Je,We){var et=Ge<0?"-":"",xt=(et?-Ge:Ge)+"",At=xt.length;return et+(At68?1900:2e3),We+et[0].length):-1}function L(Ge,Je,We){var et=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Je.slice(We,We+6));return et?(Ge.Z=et[1]?0:-(et[2]+(et[3]||"00")),We+et[0].length):-1}function x(Ge,Je,We){var et=s.exec(Je.slice(We,We+1));return et?(Ge.q=et[0]*3-3,We+et[0].length):-1}function C(Ge,Je,We){var et=s.exec(Je.slice(We,We+2));return et?(Ge.m=et[0]-1,We+et[0].length):-1}function S(Ge,Je,We){var et=s.exec(Je.slice(We,We+2));return et?(Ge.d=+et[0],We+et[0].length):-1}function g(Ge,Je,We){var et=s.exec(Je.slice(We,We+3));return et?(Ge.m=0,Ge.d=+et[0],We+et[0].length):-1}function P(Ge,Je,We){var et=s.exec(Je.slice(We,We+2));return et?(Ge.H=+et[0],We+et[0].length):-1}function E(Ge,Je,We){var et=s.exec(Je.slice(We,We+2));return et?(Ge.M=+et[0],We+et[0].length):-1}function z(Ge,Je,We){var et=s.exec(Je.slice(We,We+2));return et?(Ge.S=+et[0],We+et[0].length):-1}function q(Ge,Je,We){var et=s.exec(Je.slice(We,We+3));return et?(Ge.L=+et[0],We+et[0].length):-1}function U(Ge,Je,We){var et=s.exec(Je.slice(We,We+6));return et?(Ge.L=Math.floor(et[0]/1e3),We+et[0].length):-1}function G(Ge,Je,We){var et=l.exec(Je.slice(We,We+1));return et?We+et[0].length:-1}function Z(Ge,Je,We){var et=s.exec(Je.slice(We));return et?(Ge.Q=+et[0],We+et[0].length):-1}function j(Ge,Je,We){var et=s.exec(Je.slice(We));return et?(Ge.s=+et[0],We+et[0].length):-1}function N(Ge,Je){return c(Ge.getDate(),Je,2)}function H(Ge,Je){return c(Ge.getHours(),Je,2)}function re(Ge,Je){return c(Ge.getHours()%12||12,Je,2)}function oe(Ge,Je){return c(1+t.timeDay.count(t.timeYear(Ge),Ge),Je,3)}function _e(Ge,Je){return c(Ge.getMilliseconds(),Je,3)}function ke(Ge,Je){return _e(Ge,Je)+"000"}function Ce(Ge,Je){return c(Ge.getMonth()+1,Je,2)}function ge(Ge,Je){return c(Ge.getMinutes(),Je,2)}function ie(Ge,Je){return c(Ge.getSeconds(),Je,2)}function Se(Ge){var Je=Ge.getDay();return Je===0?7:Je}function Ee(Ge,Je){return c(t.timeSunday.count(t.timeYear(Ge)-1,Ge),Je,2)}function we(Ge,Je){var We=Ge.getDay();return Ge=We>=4||We===0?t.timeThursday(Ge):t.timeThursday.ceil(Ge),c(t.timeThursday.count(t.timeYear(Ge),Ge)+(t.timeYear(Ge).getDay()===4),Je,2)}function De(Ge){return Ge.getDay()}function Le(Ge,Je){return c(t.timeMonday.count(t.timeYear(Ge)-1,Ge),Je,2)}function me(Ge,Je){return c(Ge.getFullYear()%100,Je,2)}function Pe(Ge,Je){return c(Ge.getFullYear()%1e4,Je,4)}function ce(Ge){var Je=Ge.getTimezoneOffset();return(Je>0?"-":(Je*=-1,"+"))+c(Je/60|0,"0",2)+c(Je%60,"0",2)}function He(Ge,Je){return c(Ge.getUTCDate(),Je,2)}function lt(Ge,Je){return c(Ge.getUTCHours(),Je,2)}function mt(Ge,Je){return c(Ge.getUTCHours()%12||12,Je,2)}function Vt(Ge,Je){return c(1+t.utcDay.count(t.utcYear(Ge),Ge),Je,3)}function st(Ge,Je){return c(Ge.getUTCMilliseconds(),Je,3)}function ct(Ge,Je){return st(Ge,Je)+"000"}function Qt(Ge,Je){return c(Ge.getUTCMonth()+1,Je,2)}function Ht(Ge,Je){return c(Ge.getUTCMinutes(),Je,2)}function nr(Ge,Je){return c(Ge.getUTCSeconds(),Je,2)}function tt(Ge){var Je=Ge.getUTCDay();return Je===0?7:Je}function je(Ge,Je){return c(t.utcSunday.count(t.utcYear(Ge)-1,Ge),Je,2)}function Ue(Ge,Je){var We=Ge.getUTCDay();return Ge=We>=4||We===0?t.utcThursday(Ge):t.utcThursday.ceil(Ge),c(t.utcThursday.count(t.utcYear(Ge),Ge)+(t.utcYear(Ge).getUTCDay()===4),Je,2)}function Ae(Ge){return Ge.getUTCDay()}function rt(Ge,Je){return c(t.utcMonday.count(t.utcYear(Ge)-1,Ge),Je,2)}function St(Ge,Je){return c(Ge.getUTCFullYear()%100,Je,2)}function Tt(Ge,Je){return c(Ge.getUTCFullYear()%1e4,Je,4)}function dt(){return"+0000"}function Et(){return"%"}function pt(Ge){return+Ge}function Xt(Ge){return Math.floor(+Ge/1e3)}var or;_r({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function _r(Ge){return or=a(Ge),e.timeFormat=or.format,e.timeParse=or.parse,e.utcFormat=or.utcFormat,e.utcParse=or.utcParse,or}var Er="%Y-%m-%dT%H:%M:%S.%LZ";function ei(Ge){return Ge.toISOString()}var qr=Date.prototype.toISOString?ei:e.utcFormat(Er);function jr(Ge){var Je=new Date(Ge);return isNaN(Je)?null:Je}var gt=+new Date("2000-01-01T00:00:00.000Z")?jr:e.utcParse(Er);e.isoFormat=qr,e.isoParse=gt,e.timeFormatDefaultLocale=_r,e.timeFormatLocale=a,Object.defineProperty(e,"__esModule",{value:!0})})});var Mq=ye((b6,Aee)=>{(function(e,t){typeof b6=="object"&&typeof Aee!="undefined"?t(b6):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e.d3=e.d3||{}))})(b6,function(e){"use strict";function t(C){return Math.abs(C=Math.round(C))>=1e21?C.toLocaleString("en").replace(/,/g,""):C.toString(10)}function r(C,S){if((g=(C=S?C.toExponential(S-1):C.toExponential()).indexOf("e"))<0)return null;var g,P=C.slice(0,g);return[P.length>1?P[0]+P.slice(2):P,+C.slice(g+1)]}function n(C){return C=r(Math.abs(C)),C?C[1]:NaN}function i(C,S){return function(g,P){for(var E=g.length,z=[],q=0,U=C[0],G=0;E>0&&U>0&&(G+U+1>P&&(U=Math.max(1,P-G)),z.push(g.substring(E-=U,E+U)),!((G+=U+1)>P));)U=C[q=(q+1)%C.length];return z.reverse().join(S)}}function a(C){return function(S){return S.replace(/[0-9]/g,function(g){return C[+g]})}}var o=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function s(C){if(!(S=o.exec(C)))throw new Error("invalid format: "+C);var S;return new l({fill:S[1],align:S[2],sign:S[3],symbol:S[4],zero:S[5],width:S[6],comma:S[7],precision:S[8]&&S[8].slice(1),trim:S[9],type:S[10]})}s.prototype=l.prototype;function l(C){this.fill=C.fill===void 0?" ":C.fill+"",this.align=C.align===void 0?">":C.align+"",this.sign=C.sign===void 0?"-":C.sign+"",this.symbol=C.symbol===void 0?"":C.symbol+"",this.zero=!!C.zero,this.width=C.width===void 0?void 0:+C.width,this.comma=!!C.comma,this.precision=C.precision===void 0?void 0:+C.precision,this.trim=!!C.trim,this.type=C.type===void 0?"":C.type+""}l.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function u(C){e:for(var S=C.length,g=1,P=-1,E;g0&&(P=0);break}return P>0?C.slice(0,P)+C.slice(E+1):C}var c;function f(C,S){var g=r(C,S);if(!g)return C+"";var P=g[0],E=g[1],z=E-(c=Math.max(-8,Math.min(8,Math.floor(E/3)))*3)+1,q=P.length;return z===q?P:z>q?P+new Array(z-q+1).join("0"):z>0?P.slice(0,z)+"."+P.slice(z):"0."+new Array(1-z).join("0")+r(C,Math.max(0,S+z-1))[0]}function h(C,S){var g=r(C,S);if(!g)return C+"";var P=g[0],E=g[1];return E<0?"0."+new Array(-E).join("0")+P:P.length>E+1?P.slice(0,E+1)+"."+P.slice(E+1):P+new Array(E-P.length+2).join("0")}var d={"%":function(C,S){return(C*100).toFixed(S)},b:function(C){return Math.round(C).toString(2)},c:function(C){return C+""},d:t,e:function(C,S){return C.toExponential(S)},f:function(C,S){return C.toFixed(S)},g:function(C,S){return C.toPrecision(S)},o:function(C){return Math.round(C).toString(8)},p:function(C,S){return h(C*100,S)},r:h,s:f,X:function(C){return Math.round(C).toString(16).toUpperCase()},x:function(C){return Math.round(C).toString(16)}};function v(C){return C}var m=Array.prototype.map,b=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function p(C){var S=C.grouping===void 0||C.thousands===void 0?v:i(m.call(C.grouping,Number),C.thousands+""),g=C.currency===void 0?"":C.currency[0]+"",P=C.currency===void 0?"":C.currency[1]+"",E=C.decimal===void 0?".":C.decimal+"",z=C.numerals===void 0?v:a(m.call(C.numerals,String)),q=C.percent===void 0?"%":C.percent+"",U=C.minus===void 0?"-":C.minus+"",G=C.nan===void 0?"NaN":C.nan+"";function Z(N){N=s(N);var H=N.fill,re=N.align,oe=N.sign,_e=N.symbol,ke=N.zero,Ce=N.width,ge=N.comma,ie=N.precision,Se=N.trim,Ee=N.type;Ee==="n"?(ge=!0,Ee="g"):d[Ee]||(ie===void 0&&(ie=12),Se=!0,Ee="g"),(ke||H==="0"&&re==="=")&&(ke=!0,H="0",re="=");var we=_e==="$"?g:_e==="#"&&/[boxX]/.test(Ee)?"0"+Ee.toLowerCase():"",De=_e==="$"?P:/[%p]/.test(Ee)?q:"",Le=d[Ee],me=/[defgprs%]/.test(Ee);ie=ie===void 0?6:/[gprs]/.test(Ee)?Math.max(1,Math.min(21,ie)):Math.max(0,Math.min(20,ie));function Pe(ce){var He=we,lt=De,mt,Vt,st;if(Ee==="c")lt=Le(ce)+lt,ce="";else{ce=+ce;var ct=ce<0||1/ce<0;if(ce=isNaN(ce)?G:Le(Math.abs(ce),ie),Se&&(ce=u(ce)),ct&&+ce==0&&oe!=="+"&&(ct=!1),He=(ct?oe==="("?oe:U:oe==="-"||oe==="("?"":oe)+He,lt=(Ee==="s"?b[8+c/3]:"")+lt+(ct&&oe==="("?")":""),me){for(mt=-1,Vt=ce.length;++mtst||st>57){lt=(st===46?E+ce.slice(mt+1):ce.slice(mt))+lt,ce=ce.slice(0,mt);break}}}ge&&!ke&&(ce=S(ce,1/0));var Qt=He.length+ce.length+lt.length,Ht=Qt>1)+He+ce+lt+Ht.slice(Qt);break;default:ce=Ht+He+ce+lt;break}return z(ce)}return Pe.toString=function(){return N+""},Pe}function j(N,H){var re=Z((N=s(N),N.type="f",N)),oe=Math.max(-8,Math.min(8,Math.floor(n(H)/3)))*3,_e=Math.pow(10,-oe),ke=b[8+oe/3];return function(Ce){return re(_e*Ce)+ke}}return{format:Z,formatPrefix:j}}var k;M({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function M(C){return k=p(C),e.format=k.format,e.formatPrefix=k.formatPrefix,k}function T(C){return Math.max(0,-n(Math.abs(C)))}function L(C,S){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(n(S)/3)))*3-n(Math.abs(C)))}function x(C,S){return C=Math.abs(C),S=Math.abs(S)-C,Math.max(0,n(S)-n(C))+1}e.FormatSpecifier=l,e.formatDefaultLocale=M,e.formatLocale=p,e.formatSpecifier=s,e.precisionFixed=T,e.precisionPrefix=L,e.precisionRound=x,Object.defineProperty(e,"__esModule",{value:!0})})});var Mee=ye((Trr,See)=>{"use strict";See.exports=function(e){for(var t=e.length,r,n=0;n13)&&r!==32&&r!==133&&r!==160&&r!==5760&&r!==6158&&(r<8192||r>8205)&&r!==8232&&r!==8233&&r!==8239&&r!==8287&&r!==8288&&r!==12288&&r!==65279)return!1;return!0}});var Eo=ye((Arr,Eee)=>{"use strict";var Ett=Mee();Eee.exports=function(e){var t=typeof e;if(t==="string"){var r=e;if(e=+e,e===0&&Ett(r))return!1}else if(t!=="number")return!1;return e-e<1}});var fs=ye((Srr,kee)=>{"use strict";kee.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"\u2212"}});var Eq=ye((w6,Cee)=>{(function(e,t){typeof w6=="object"&&typeof Cee!="undefined"?t(w6):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e["base64-arraybuffer"]={}))})(w6,function(e){"use strict";for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),n=0;n>2],c+=t[(s[l]&3)<<4|s[l+1]>>4],c+=t[(s[l+1]&15)<<2|s[l+2]>>6],c+=t[s[l+2]&63];return u%3===2?c=c.substring(0,c.length-1)+"=":u%3===1&&(c=c.substring(0,c.length-2)+"=="),c},a=function(o){var s=o.length*.75,l=o.length,u,c=0,f,h,d,v;o[o.length-1]==="="&&(s--,o[o.length-2]==="="&&s--);var m=new ArrayBuffer(s),b=new Uint8Array(m);for(u=0;u>4,b[c++]=(h&15)<<4|d>>2,b[c++]=(d&3)<<6|v&63;return m};e.decode=a,e.encode=i,Object.defineProperty(e,"__esModule",{value:!0})})});var Ty=ye((Mrr,Lee)=>{"use strict";Lee.exports=function(t){return window&&window.process&&window.process.versions?Object.prototype.toString.call(t)==="[object Object]":Object.prototype.toString.call(t)==="[object Object]"&&Object.getPrototypeOf(t).hasOwnProperty("hasOwnProperty")}});var vv=ye(xg=>{"use strict";var ktt=Eq().decode,Ctt=Ty(),kq=Array.isArray,Ltt=ArrayBuffer,Ptt=DataView;function Pee(e){return Ltt.isView(e)&&!(e instanceof Ptt)}xg.isTypedArray=Pee;function T6(e){return kq(e)||Pee(e)}xg.isArrayOrTypedArray=T6;function Itt(e){return!T6(e[0])}xg.isArray1D=Itt;xg.ensureArray=function(e,t){return kq(e)||(e=[]),e.length=t,e};var Ld={u1c:typeof Uint8ClampedArray=="undefined"?void 0:Uint8ClampedArray,i1:typeof Int8Array=="undefined"?void 0:Int8Array,u1:typeof Uint8Array=="undefined"?void 0:Uint8Array,i2:typeof Int16Array=="undefined"?void 0:Int16Array,u2:typeof Uint16Array=="undefined"?void 0:Uint16Array,i4:typeof Int32Array=="undefined"?void 0:Int32Array,u4:typeof Uint32Array=="undefined"?void 0:Uint32Array,f4:typeof Float32Array=="undefined"?void 0:Float32Array,f8:typeof Float64Array=="undefined"?void 0:Float64Array};Ld.uint8c=Ld.u1c;Ld.uint8=Ld.u1;Ld.int8=Ld.i1;Ld.uint16=Ld.u2;Ld.int16=Ld.i2;Ld.uint32=Ld.u4;Ld.int32=Ld.i4;Ld.float32=Ld.f4;Ld.float64=Ld.f8;function Cq(e){return e.constructor===ArrayBuffer}xg.isArrayBuffer=Cq;xg.decodeTypedArraySpec=function(e){var t=[],r=Rtt(e),n=r.dtype,i=Ld[n];if(!i)throw new Error('Error in dtype: "'+n+'"');var a=i.BYTES_PER_ELEMENT,o=r.bdata;Cq(o)||(o=ktt(o));var s=r.shape===void 0?[o.byteLength/a]:(""+r.shape).split(",");s.reverse();var l=s.length,u,c,f=+s[0],h=a*f,d=0;if(l===1)t=new i(o);else if(l===2)for(u=+s[1],c=0;c{"use strict";var Ree=Eo(),Pq=vv().isArrayOrTypedArray;qee.exports=function(t,r){if(Ree(r))r=String(r);else if(typeof r!="string"||r.slice(-4)==="[-1]")throw"bad property string";var n=r.split("."),i,a,o,s;for(s=0;s{"use strict";var d3=FS(),Ott=/^\w*$/,Btt=0,Oee=1,A6=2,Bee=3,gb=4;Nee.exports=function(t,r,n,i){n=n||"name",i=i||"value";var a,o,s,l={};r&&r.length?(s=d3(t,r),o=s.get()):o=t,r=r||"";var u={};if(o)for(a=0;a2)return l[d]=l[d]|A6,f.set(h,null);if(c){for(a=d;a{"use strict";var Ntt=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,Utt=/^[^\.\[\]]+$/;Vee.exports=function(e,t){for(;t;){var r=e.match(Ntt);if(r)e=r[1];else if(e.match(Utt))e="";else throw new Error("bad relativeAttr call:"+[e,t]);if(t.charAt(0)==="^")t=t.slice(1);else break}return e&&t.charAt(0)!=="["?e+"."+t:e+t}});var S6=ye((Prr,Hee)=>{"use strict";var Vtt=Eo();Hee.exports=function(t,r){if(t>0)return Math.log(t)/Math.LN10;var n=Math.log(Math.min(r[0],r[1]))/Math.LN10;return Vtt(n)||(n=Math.log(Math.max(r[0],r[1]))/Math.LN10-6),n}});var Xee=ye((Irr,Wee)=>{"use strict";var jee=vv().isArrayOrTypedArray,zS=Ty();Wee.exports=function e(t,r){for(var n in r){var i=r[n],a=t[n];if(a!==i)if(n.charAt(0)==="_"||typeof i=="function"){if(n in t)continue;t[n]=i}else if(jee(i)&&jee(a)&&zS(i[0])){if(n==="customdata"||n==="ids")continue;for(var o=Math.min(i.length,a.length),s=0;s{"use strict";function Gtt(e,t){var r=e%t;return r<0?r+t:r}function Htt(e,t){return Math.abs(e)>t/2?e-Math.round(e/t)*t:e}Zee.exports={mod:Gtt,modHalf:Htt}});var fd=ye((Drr,M6)=>{(function(e){var t=/^\s+/,r=/\s+$/,n=0,i=e.round,a=e.min,o=e.max,s=e.random;function l(me,Pe){if(me=me||"",Pe=Pe||{},me instanceof l)return me;if(!(this instanceof l))return new l(me,Pe);var ce=u(me);this._originalInput=me,this._r=ce.r,this._g=ce.g,this._b=ce.b,this._a=ce.a,this._roundA=i(100*this._a)/100,this._format=Pe.format||ce.format,this._gradientType=Pe.gradientType,this._r<1&&(this._r=i(this._r)),this._g<1&&(this._g=i(this._g)),this._b<1&&(this._b=i(this._b)),this._ok=ce.ok,this._tc_id=n++}l.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var me=this.toRgb();return(me.r*299+me.g*587+me.b*114)/1e3},getLuminance:function(){var me=this.toRgb(),Pe,ce,He,lt,mt,Vt;return Pe=me.r/255,ce=me.g/255,He=me.b/255,Pe<=.03928?lt=Pe/12.92:lt=e.pow((Pe+.055)/1.055,2.4),ce<=.03928?mt=ce/12.92:mt=e.pow((ce+.055)/1.055,2.4),He<=.03928?Vt=He/12.92:Vt=e.pow((He+.055)/1.055,2.4),.2126*lt+.7152*mt+.0722*Vt},setAlpha:function(me){return this._a=N(me),this._roundA=i(100*this._a)/100,this},toHsv:function(){var me=d(this._r,this._g,this._b);return{h:me.h*360,s:me.s,v:me.v,a:this._a}},toHsvString:function(){var me=d(this._r,this._g,this._b),Pe=i(me.h*360),ce=i(me.s*100),He=i(me.v*100);return this._a==1?"hsv("+Pe+", "+ce+"%, "+He+"%)":"hsva("+Pe+", "+ce+"%, "+He+"%, "+this._roundA+")"},toHsl:function(){var me=f(this._r,this._g,this._b);return{h:me.h*360,s:me.s,l:me.l,a:this._a}},toHslString:function(){var me=f(this._r,this._g,this._b),Pe=i(me.h*360),ce=i(me.s*100),He=i(me.l*100);return this._a==1?"hsl("+Pe+", "+ce+"%, "+He+"%)":"hsla("+Pe+", "+ce+"%, "+He+"%, "+this._roundA+")"},toHex:function(me){return m(this._r,this._g,this._b,me)},toHexString:function(me){return"#"+this.toHex(me)},toHex8:function(me){return b(this._r,this._g,this._b,this._a,me)},toHex8String:function(me){return"#"+this.toHex8(me)},toRgb:function(){return{r:i(this._r),g:i(this._g),b:i(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+i(this._r)+", "+i(this._g)+", "+i(this._b)+")":"rgba("+i(this._r)+", "+i(this._g)+", "+i(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:i(H(this._r,255)*100)+"%",g:i(H(this._g,255)*100)+"%",b:i(H(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+i(H(this._r,255)*100)+"%, "+i(H(this._g,255)*100)+"%, "+i(H(this._b,255)*100)+"%)":"rgba("+i(H(this._r,255)*100)+"%, "+i(H(this._g,255)*100)+"%, "+i(H(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Z[m(this._r,this._g,this._b,!0)]||!1},toFilter:function(me){var Pe="#"+p(this._r,this._g,this._b,this._a),ce=Pe,He=this._gradientType?"GradientType = 1, ":"";if(me){var lt=l(me);ce="#"+p(lt._r,lt._g,lt._b,lt._a)}return"progid:DXImageTransform.Microsoft.gradient("+He+"startColorstr="+Pe+",endColorstr="+ce+")"},toString:function(me){var Pe=!!me;me=me||this._format;var ce=!1,He=this._a<1&&this._a>=0,lt=!Pe&&He&&(me==="hex"||me==="hex6"||me==="hex3"||me==="hex4"||me==="hex8"||me==="name");return lt?me==="name"&&this._a===0?this.toName():this.toRgbString():(me==="rgb"&&(ce=this.toRgbString()),me==="prgb"&&(ce=this.toPercentageRgbString()),(me==="hex"||me==="hex6")&&(ce=this.toHexString()),me==="hex3"&&(ce=this.toHexString(!0)),me==="hex4"&&(ce=this.toHex8String(!0)),me==="hex8"&&(ce=this.toHex8String()),me==="name"&&(ce=this.toName()),me==="hsl"&&(ce=this.toHslString()),me==="hsv"&&(ce=this.toHsvString()),ce||this.toHexString())},clone:function(){return l(this.toString())},_applyModification:function(me,Pe){var ce=me.apply(null,[this].concat([].slice.call(Pe)));return this._r=ce._r,this._g=ce._g,this._b=ce._b,this.setAlpha(ce._a),this},lighten:function(){return this._applyModification(L,arguments)},brighten:function(){return this._applyModification(x,arguments)},darken:function(){return this._applyModification(C,arguments)},desaturate:function(){return this._applyModification(k,arguments)},saturate:function(){return this._applyModification(M,arguments)},greyscale:function(){return this._applyModification(T,arguments)},spin:function(){return this._applyModification(S,arguments)},_applyCombination:function(me,Pe){return me.apply(null,[this].concat([].slice.call(Pe)))},analogous:function(){return this._applyCombination(q,arguments)},complement:function(){return this._applyCombination(g,arguments)},monochromatic:function(){return this._applyCombination(U,arguments)},splitcomplement:function(){return this._applyCombination(z,arguments)},triad:function(){return this._applyCombination(P,arguments)},tetrad:function(){return this._applyCombination(E,arguments)}},l.fromRatio=function(me,Pe){if(typeof me=="object"){var ce={};for(var He in me)me.hasOwnProperty(He)&&(He==="a"?ce[He]=me[He]:ce[He]=ge(me[He]));me=ce}return l(me,Pe)};function u(me){var Pe={r:0,g:0,b:0},ce=1,He=null,lt=null,mt=null,Vt=!1,st=!1;return typeof me=="string"&&(me=De(me)),typeof me=="object"&&(we(me.r)&&we(me.g)&&we(me.b)?(Pe=c(me.r,me.g,me.b),Vt=!0,st=String(me.r).substr(-1)==="%"?"prgb":"rgb"):we(me.h)&&we(me.s)&&we(me.v)?(He=ge(me.s),lt=ge(me.v),Pe=v(me.h,He,lt),Vt=!0,st="hsv"):we(me.h)&&we(me.s)&&we(me.l)&&(He=ge(me.s),mt=ge(me.l),Pe=h(me.h,He,mt),Vt=!0,st="hsl"),me.hasOwnProperty("a")&&(ce=me.a)),ce=N(ce),{ok:Vt,format:me.format||st,r:a(255,o(Pe.r,0)),g:a(255,o(Pe.g,0)),b:a(255,o(Pe.b,0)),a:ce}}function c(me,Pe,ce){return{r:H(me,255)*255,g:H(Pe,255)*255,b:H(ce,255)*255}}function f(me,Pe,ce){me=H(me,255),Pe=H(Pe,255),ce=H(ce,255);var He=o(me,Pe,ce),lt=a(me,Pe,ce),mt,Vt,st=(He+lt)/2;if(He==lt)mt=Vt=0;else{var ct=He-lt;switch(Vt=st>.5?ct/(2-He-lt):ct/(He+lt),He){case me:mt=(Pe-ce)/ct+(Pe1&&(nr-=1),nr<1/6?Qt+(Ht-Qt)*6*nr:nr<1/2?Ht:nr<2/3?Qt+(Ht-Qt)*(2/3-nr)*6:Qt}if(Pe===0)He=lt=mt=ce;else{var st=ce<.5?ce*(1+Pe):ce+Pe-ce*Pe,ct=2*ce-st;He=Vt(ct,st,me+1/3),lt=Vt(ct,st,me),mt=Vt(ct,st,me-1/3)}return{r:He*255,g:lt*255,b:mt*255}}function d(me,Pe,ce){me=H(me,255),Pe=H(Pe,255),ce=H(ce,255);var He=o(me,Pe,ce),lt=a(me,Pe,ce),mt,Vt,st=He,ct=He-lt;if(Vt=He===0?0:ct/He,He==lt)mt=0;else{switch(He){case me:mt=(Pe-ce)/ct+(Pe>1)+720)%360;--Pe;)He.h=(He.h+lt)%360,mt.push(l(He));return mt}function U(me,Pe){Pe=Pe||6;for(var ce=l(me).toHsv(),He=ce.h,lt=ce.s,mt=ce.v,Vt=[],st=1/Pe;Pe--;)Vt.push(l({h:He,s:lt,v:mt})),mt=(mt+st)%1;return Vt}l.mix=function(me,Pe,ce){ce=ce===0?0:ce||50;var He=l(me).toRgb(),lt=l(Pe).toRgb(),mt=ce/100,Vt={r:(lt.r-He.r)*mt+He.r,g:(lt.g-He.g)*mt+He.g,b:(lt.b-He.b)*mt+He.b,a:(lt.a-He.a)*mt+He.a};return l(Vt)},l.readability=function(me,Pe){var ce=l(me),He=l(Pe);return(e.max(ce.getLuminance(),He.getLuminance())+.05)/(e.min(ce.getLuminance(),He.getLuminance())+.05)},l.isReadable=function(me,Pe,ce){var He=l.readability(me,Pe),lt,mt;switch(mt=!1,lt=Le(ce),lt.level+lt.size){case"AAsmall":case"AAAlarge":mt=He>=4.5;break;case"AAlarge":mt=He>=3;break;case"AAAsmall":mt=He>=7;break}return mt},l.mostReadable=function(me,Pe,ce){var He=null,lt=0,mt,Vt,st,ct;ce=ce||{},Vt=ce.includeFallbackColors,st=ce.level,ct=ce.size;for(var Qt=0;Qtlt&&(lt=mt,He=l(Pe[Qt]));return l.isReadable(me,He,{level:st,size:ct})||!Vt?He:(ce.includeFallbackColors=!1,l.mostReadable(me,["#fff","#000"],ce))};var G=l.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Z=l.hexNames=j(G);function j(me){var Pe={};for(var ce in me)me.hasOwnProperty(ce)&&(Pe[me[ce]]=ce);return Pe}function N(me){return me=parseFloat(me),(isNaN(me)||me<0||me>1)&&(me=1),me}function H(me,Pe){_e(me)&&(me="100%");var ce=ke(me);return me=a(Pe,o(0,parseFloat(me))),ce&&(me=parseInt(me*Pe,10)/100),e.abs(me-Pe)<1e-6?1:me%Pe/parseFloat(Pe)}function re(me){return a(1,o(0,me))}function oe(me){return parseInt(me,16)}function _e(me){return typeof me=="string"&&me.indexOf(".")!=-1&&parseFloat(me)===1}function ke(me){return typeof me=="string"&&me.indexOf("%")!=-1}function Ce(me){return me.length==1?"0"+me:""+me}function ge(me){return me<=1&&(me=me*100+"%"),me}function ie(me){return e.round(parseFloat(me)*255).toString(16)}function Se(me){return oe(me)/255}var Ee=function(){var me="[-\\+]?\\d+%?",Pe="[-\\+]?\\d*\\.\\d+%?",ce="(?:"+Pe+")|(?:"+me+")",He="[\\s|\\(]+("+ce+")[,|\\s]+("+ce+")[,|\\s]+("+ce+")\\s*\\)?",lt="[\\s|\\(]+("+ce+")[,|\\s]+("+ce+")[,|\\s]+("+ce+")[,|\\s]+("+ce+")\\s*\\)?";return{CSS_UNIT:new RegExp(ce),rgb:new RegExp("rgb"+He),rgba:new RegExp("rgba"+lt),hsl:new RegExp("hsl"+He),hsla:new RegExp("hsla"+lt),hsv:new RegExp("hsv"+He),hsva:new RegExp("hsva"+lt),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function we(me){return!!Ee.CSS_UNIT.exec(me)}function De(me){me=me.replace(t,"").replace(r,"").toLowerCase();var Pe=!1;if(G[me])me=G[me],Pe=!0;else if(me=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ce;return(ce=Ee.rgb.exec(me))?{r:ce[1],g:ce[2],b:ce[3]}:(ce=Ee.rgba.exec(me))?{r:ce[1],g:ce[2],b:ce[3],a:ce[4]}:(ce=Ee.hsl.exec(me))?{h:ce[1],s:ce[2],l:ce[3]}:(ce=Ee.hsla.exec(me))?{h:ce[1],s:ce[2],l:ce[3],a:ce[4]}:(ce=Ee.hsv.exec(me))?{h:ce[1],s:ce[2],v:ce[3]}:(ce=Ee.hsva.exec(me))?{h:ce[1],s:ce[2],v:ce[3],a:ce[4]}:(ce=Ee.hex8.exec(me))?{r:oe(ce[1]),g:oe(ce[2]),b:oe(ce[3]),a:Se(ce[4]),format:Pe?"name":"hex8"}:(ce=Ee.hex6.exec(me))?{r:oe(ce[1]),g:oe(ce[2]),b:oe(ce[3]),format:Pe?"name":"hex"}:(ce=Ee.hex4.exec(me))?{r:oe(ce[1]+""+ce[1]),g:oe(ce[2]+""+ce[2]),b:oe(ce[3]+""+ce[3]),a:Se(ce[4]+""+ce[4]),format:Pe?"name":"hex8"}:(ce=Ee.hex3.exec(me))?{r:oe(ce[1]+""+ce[1]),g:oe(ce[2]+""+ce[2]),b:oe(ce[3]+""+ce[3]),format:Pe?"name":"hex"}:!1}function Le(me){var Pe,ce;return me=me||{level:"AA",size:"small"},Pe=(me.level||"AA").toUpperCase(),ce=(me.size||"small").toLowerCase(),Pe!=="AA"&&Pe!=="AAA"&&(Pe="AA"),ce!=="small"&&ce!=="large"&&(ce="small"),{level:Pe,size:ce}}typeof M6!="undefined"&&M6.exports?M6.exports=l:window.tinycolor=l})(Math)});var Ao=ye(BS=>{"use strict";var Yee=Ty(),qS=Array.isArray;function jtt(e,t){var r,n;for(r=0;r{"use strict";Kee.exports=function(e){var t=e.variantValues,r=e.editType,n=e.colorEditType;n===void 0&&(n=r);var i={editType:r,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};e.noNumericWeightValues&&(i.valType="enumerated",i.values=i.extras,i.extras=void 0,i.min=void 0,i.max=void 0);var a={family:{valType:"string",noBlank:!0,strict:!0,editType:r},size:{valType:"number",min:1,editType:r},color:{valType:"color",editType:n},weight:i,style:{editType:r,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:e.noFontVariant?void 0:{editType:r,valType:"enumerated",values:t||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:e.noFontTextcase?void 0:{editType:r,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:e.noFontLineposition?void 0:{editType:r,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:e.noFontShadow?void 0:{editType:r,valType:"string",dflt:e.autoShadowDflt?"auto":"none"},editType:r};return e.autoSize&&(a.size.dflt="auto"),e.autoColor&&(a.color.dflt="auto"),e.arrayOk&&(a.family.arrayOk=!0,a.weight.arrayOk=!0,a.style.arrayOk=!0,e.noFontVariant||(a.variant.arrayOk=!0),e.noFontTextcase||(a.textcase.arrayOk=!0),e.noFontLineposition||(a.lineposition.arrayOk=!0),e.noFontShadow||(a.shadow.arrayOk=!0),a.size.arrayOk=!0,a.color.arrayOk=!0),a}});var NS=ye((qrr,Jee)=>{"use strict";Jee.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}});var W1=ye((Orr,ete)=>{"use strict";var $ee=NS(),Qee=ec(),Iq=Qee({editType:"none"});Iq.family.dflt=$ee.HOVERFONT;Iq.size.dflt=$ee.HOVERFONTSIZE;ete.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoveranywhere:{valType:"boolean",dflt:!1,editType:"none"},clickanywhere:{valType:"boolean",dflt:!1,editType:"none"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:Iq,grouptitlefont:Qee({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},showarrow:{valType:"boolean",dflt:!0,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}});var p3=ye((Brr,tte)=>{"use strict";var Wtt=ec(),US=W1().hoverlabel,VS=Ao().extendFlat;tte.exports={hoverlabel:{bgcolor:VS({},US.bgcolor,{arrayOk:!0}),bordercolor:VS({},US.bordercolor,{arrayOk:!0}),font:Wtt({arrayOk:!0,editType:"none"}),align:VS({},US.align,{arrayOk:!0}),namelength:VS({},US.namelength,{arrayOk:!0}),showarrow:VS({},US.showarrow),editType:"none"}}});var Gl=ye((Nrr,rte)=>{"use strict";var Xtt=ec(),Ztt=p3();rte.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc"},showlegend:{valType:"boolean",dflt:!0,editType:"style"},legend:{valType:"subplotid",dflt:"legend",editType:"style"},legendgroup:{valType:"string",dflt:"",editType:"style"},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style"},font:Xtt({editType:"style"}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style"},legendwidth:{valType:"number",min:0,editType:"style"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style"},name:{valType:"string",editType:"style"},uid:{valType:"string",editType:"plot",anim:!0},ids:{valType:"data_array",editType:"calc",anim:!0},customdata:{valType:"data_array",editType:"calc"},meta:{valType:"any",arrayOk:!0,editType:"plot"},selectedpoints:{valType:"any",editType:"calc"},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none"},hoverlabel:Ztt.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc"},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc"},editType:"calc"},uirevision:{valType:"any",editType:"none"}}});var mb=ye((Urr,ate)=>{"use strict";var Ytt=fd(),E6={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},ite=E6.RdBu;function Ktt(e,t){if(t||(t=ite),!e)return t;function r(){try{e=E6[e]||JSON.parse(e)}catch(n){e=t}}return typeof e=="string"&&(r(),typeof e=="string"&&r()),nte(e)?e:t}function nte(e){var t=0;if(!Array.isArray(e)||e.length<2||!e[0]||!e[e.length-1]||+e[0][0]!=0||+e[e.length-1][0]!=1)return!1;for(var r=0;r{"use strict";yb.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];yb.defaultLine="#444";yb.lightLine="#eee";yb.background="#fff";yb.borderLine="#BEC8D9";yb.lightFraction=100*10/11});var ka=ye((Grr,ote)=>{"use strict";var wp=fd(),$tt=Eo(),Qtt=vv().isTypedArray,hd=ote.exports={},k6=Ih();hd.defaults=k6.defaults;var ert=hd.defaultLine=k6.defaultLine;hd.lightLine=k6.lightLine;var Dq=hd.background=k6.background;hd.tinyRGB=function(e){var t=e.toRgb();return"rgb("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+")"};hd.rgb=function(e){return hd.tinyRGB(wp(e))};hd.opacity=function(e){return e?wp(e).getAlpha():0};hd.addOpacity=function(e,t){var r=wp(e).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+t+")"};hd.combine=function(e,t){var r=wp(e).toRgb();if(r.a===1)return wp(e).toRgbString();var n=wp(t||Dq).toRgb(),i=n.a===1?n:{r:255*(1-n.a)+n.r*n.a,g:255*(1-n.a)+n.g*n.a,b:255*(1-n.a)+n.b*n.a},a={r:i.r*(1-r.a)+r.r*r.a,g:i.g*(1-r.a)+r.g*r.a,b:i.b*(1-r.a)+r.b*r.a};return wp(a).toRgbString()};hd.interpolate=function(e,t,r){var n=wp(e).toRgb(),i=wp(t).toRgb(),a={r:r*n.r+(1-r)*i.r,g:r*n.g+(1-r)*i.g,b:r*n.b+(1-r)*i.b};return wp(a).toRgbString()};hd.contrast=function(e,t,r){var n=wp(e);n.getAlpha()!==1&&(n=wp(hd.combine(e,Dq)));var i=n.isDark()?t?n.lighten(t):Dq:r?n.darken(r):ert;return i.toString()};hd.stroke=function(e,t){var r=wp(t);e.style({stroke:hd.tinyRGB(r),"stroke-opacity":r.getAlpha()})};hd.fill=function(e,t){var r=wp(t);e.style({fill:hd.tinyRGB(r),"fill-opacity":r.getAlpha()})};hd.clean=function(e){if(!(!e||typeof e!="object")){var t=Object.keys(e),r,n,i,a;for(r=0;r=0)))return e;if(a===3)n[a]>1&&(n[a]=1);else if(n[a]>=1)return e}var o=Math.round(n[0]*255)+", "+Math.round(n[1]*255)+", "+Math.round(n[2]*255);return i?"rgba("+o+", "+n[3]+")":"rgb("+o+")"}});var X1=ye((Hrr,ste)=>{"use strict";ste.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}});var g3=ye(lte=>{"use strict";lte.counter=function(e,t,r,n){var i=(t||"")+(r?"":"$"),a=n===!1?"":"^";return e==="xy"?new RegExp(a+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+i):new RegExp(a+e+"([2-9]|[1-9][0-9]+)?"+i)}});var hte=ye(Tp=>{"use strict";var Fq=Eo(),ute=fd(),cte=Ao().extendFlat,trt=Gl(),rrt=mb(),irt=ka(),nrt=X1().DESELECTDIM,m3=FS(),fte=g3().counter,art=v3().modHalf,bg=vv().isArrayOrTypedArray,Z1=vv().isTypedArraySpec,Y1=vv().decodeTypedArraySpec;Tp.valObjectMeta={data_array:{coerceFunction:function(e,t,r){t.set(bg(e)?e:Z1(e)?Y1(e):r)}},enumerated:{coerceFunction:function(e,t,r,n){n.coerceNumber&&(e=+e),n.values.indexOf(e)===-1?t.set(r):t.set(e)},validateFunction:function(e,t){t.coerceNumber&&(e=+e);for(var r=t.values,n=0;na===!0||a===!1;i(e)||n.arrayOk&&Array.isArray(e)&&e.length>0&&e.every(i)?t.set(e):t.set(r)}},number:{coerceFunction:function(e,t,r,n){Z1(e)&&(e=Y1(e)),!Fq(e)||n.min!==void 0&&en.max?t.set(r):t.set(+e)}},integer:{coerceFunction:function(e,t,r,n){if((n.extras||[]).indexOf(e)!==-1){t.set(e);return}Z1(e)&&(e=Y1(e)),e%1||!Fq(e)||n.min!==void 0&&en.max?t.set(r):t.set(+e)}},string:{coerceFunction:function(e,t,r,n){if(typeof e!="string"){var i=typeof e=="number";n.strict===!0||!i?t.set(r):t.set(String(e))}else n.noBlank&&!e?t.set(r):t.set(e)}},color:{coerceFunction:function(e,t,r){Z1(e)&&(e=Y1(e)),ute(e).isValid()?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){function n(i){return ute(i).isValid()}!Array.isArray(e)||!e.length?t.set(r):e.every(n)?t.set(e):t.set(r)}},colorscale:{coerceFunction:function(e,t,r){t.set(rrt.get(e,r))}},angle:{coerceFunction:function(e,t,r){Z1(e)&&(e=Y1(e)),e==="auto"?t.set("auto"):Fq(e)?t.set(art(+e,360)):t.set(r)}},subplotid:{coerceFunction:function(e,t,r,n){var i=n.regex||fte(r);let a=o=>typeof o=="string"&&i.test(o);a(e)||n.arrayOk&&bg(e)&&e.length>0&&e.every(a)?t.set(e):t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r?!0:typeof e!="string"?!1:!!fte(r).test(e)}},flaglist:{coerceFunction:function(e,t,r,n){if((n.extras||[]).indexOf(e)!==-1){t.set(e);return}if(typeof e!="string"){t.set(r);return}for(var i=e.split("+"),a=0;a{"use strict";var dte={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:""},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},displayNotifier:{valType:"boolean",dflt:!0},showLink:{valType:"boolean",dflt:!1},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0},sendData:{valType:"boolean",dflt:!0},showSources:{valType:"any",dflt:!1},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!1},showEditInChartStudio:{valType:"boolean",dflt:!1},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/un/"},mapboxAccessToken:{valType:"string",dflt:null},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},vte={};function pte(e,t){for(var r in e){var n=e[r];n.valType?t[r]=n.dflt:(t[r]||(t[r]={}),pte(n,t[r]))}}pte(dte,vte);gte.exports={configAttributes:dte,dfltConfig:vte}});var qq=ye((Zrr,mte)=>{"use strict";var zq=qa(),ort=Eo(),GS=[];mte.exports=function(e,t,r){var s;if(((s=r==null?void 0:r._context)==null?void 0:s.displayNotifier)===!1||GS.indexOf(e)!==-1)return;GS.push(e);var n=1e3;ort(t)?n=t:t==="long"&&(n=3e3);var i=zq.select("body").selectAll(".plotly-notifier").data([0]);i.enter().append("div").classed("plotly-notifier",!0);var a=i.selectAll(".notifier-note").data(GS);function o(l){l.duration(700).style("opacity",0).each("end",function(u){var c=GS.indexOf(u);c!==-1&&GS.splice(c,1),zq.select(this).remove()})}a.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(l){var u=zq.select(this);u.append("button").classed("notifier-close",!0).html("×").on("click",function(){u.transition().call(o)});for(var c=u.append("p"),f=l.split(//g),h=0;h{"use strict";var y3=_b().dfltConfig,Oq=qq(),Bq=yte.exports={};Bq.log=function(){var e;if(y3.logging>1){var t=["LOG:"];for(e=0;e1){var r=[];for(e=0;e"),"long")}};Bq.warn=function(){var e;if(y3.logging>0){var t=["WARN:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}};Bq.error=function(){var e;if(y3.logging>0){var t=["ERROR:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}}});var L6=ye((Krr,_te)=>{"use strict";_te.exports=function(){}});var Nq=ye((Jrr,xte)=>{"use strict";xte.exports=function(t,r){if(r instanceof RegExp){for(var n=r.toString(),i=0;i{bte.exports=srt;function srt(){var e=new Float32Array(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Ate=ye((Qrr,Tte)=>{Tte.exports=lrt;function lrt(e){var t=new Float32Array(16);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}});var Mte=ye((eir,Ste)=>{Ste.exports=urt;function urt(e,t){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}});var Uq=ye((tir,Ete)=>{Ete.exports=crt;function crt(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Cte=ye((rir,kte)=>{kte.exports=frt;function frt(e,t){if(e===t){var r=t[1],n=t[2],i=t[3],a=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=a,e[11]=t[14],e[12]=i,e[13]=o,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}});var Pte=ye((iir,Lte)=>{Lte.exports=hrt;function hrt(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],h=t[10],d=t[11],v=t[12],m=t[13],b=t[14],p=t[15],k=r*s-n*o,M=r*l-i*o,T=r*u-a*o,L=n*l-i*s,x=n*u-a*s,C=i*u-a*l,S=c*m-f*v,g=c*b-h*v,P=c*p-d*v,E=f*b-h*m,z=f*p-d*m,q=h*p-d*b,U=k*q-M*z+T*E+L*P-x*g+C*S;return U?(U=1/U,e[0]=(s*q-l*z+u*E)*U,e[1]=(i*z-n*q-a*E)*U,e[2]=(m*C-b*x+p*L)*U,e[3]=(h*x-f*C-d*L)*U,e[4]=(l*P-o*q-u*g)*U,e[5]=(r*q-i*P+a*g)*U,e[6]=(b*T-v*C-p*M)*U,e[7]=(c*C-h*T+d*M)*U,e[8]=(o*z-s*P+u*S)*U,e[9]=(n*P-r*z-a*S)*U,e[10]=(v*x-m*T+p*k)*U,e[11]=(f*T-c*x-d*k)*U,e[12]=(s*g-o*E-l*S)*U,e[13]=(r*E-n*g+i*S)*U,e[14]=(m*M-v*L-b*k)*U,e[15]=(c*L-f*M+h*k)*U,e):null}});var Rte=ye((nir,Ite)=>{Ite.exports=drt;function drt(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],h=t[10],d=t[11],v=t[12],m=t[13],b=t[14],p=t[15];return e[0]=s*(h*p-d*b)-f*(l*p-u*b)+m*(l*d-u*h),e[1]=-(n*(h*p-d*b)-f*(i*p-a*b)+m*(i*d-a*h)),e[2]=n*(l*p-u*b)-s*(i*p-a*b)+m*(i*u-a*l),e[3]=-(n*(l*d-u*h)-s*(i*d-a*h)+f*(i*u-a*l)),e[4]=-(o*(h*p-d*b)-c*(l*p-u*b)+v*(l*d-u*h)),e[5]=r*(h*p-d*b)-c*(i*p-a*b)+v*(i*d-a*h),e[6]=-(r*(l*p-u*b)-o*(i*p-a*b)+v*(i*u-a*l)),e[7]=r*(l*d-u*h)-o*(i*d-a*h)+c*(i*u-a*l),e[8]=o*(f*p-d*m)-c*(s*p-u*m)+v*(s*d-u*f),e[9]=-(r*(f*p-d*m)-c*(n*p-a*m)+v*(n*d-a*f)),e[10]=r*(s*p-u*m)-o*(n*p-a*m)+v*(n*u-a*s),e[11]=-(r*(s*d-u*f)-o*(n*d-a*f)+c*(n*u-a*s)),e[12]=-(o*(f*b-h*m)-c*(s*b-l*m)+v*(s*h-l*f)),e[13]=r*(f*b-h*m)-c*(n*b-i*m)+v*(n*h-i*f),e[14]=-(r*(s*b-l*m)-o*(n*b-i*m)+v*(n*l-i*s)),e[15]=r*(s*h-l*f)-o*(n*h-i*f)+c*(n*l-i*s),e}});var Fte=ye((air,Dte)=>{Dte.exports=vrt;function vrt(e){var t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],u=e[8],c=e[9],f=e[10],h=e[11],d=e[12],v=e[13],m=e[14],b=e[15],p=t*o-r*a,k=t*s-n*a,M=t*l-i*a,T=r*s-n*o,L=r*l-i*o,x=n*l-i*s,C=u*v-c*d,S=u*m-f*d,g=u*b-h*d,P=c*m-f*v,E=c*b-h*v,z=f*b-h*m;return p*z-k*E+M*P+T*g-L*S+x*C}});var qte=ye((oir,zte)=>{zte.exports=prt;function prt(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],f=t[8],h=t[9],d=t[10],v=t[11],m=t[12],b=t[13],p=t[14],k=t[15],M=r[0],T=r[1],L=r[2],x=r[3];return e[0]=M*n+T*s+L*f+x*m,e[1]=M*i+T*l+L*h+x*b,e[2]=M*a+T*u+L*d+x*p,e[3]=M*o+T*c+L*v+x*k,M=r[4],T=r[5],L=r[6],x=r[7],e[4]=M*n+T*s+L*f+x*m,e[5]=M*i+T*l+L*h+x*b,e[6]=M*a+T*u+L*d+x*p,e[7]=M*o+T*c+L*v+x*k,M=r[8],T=r[9],L=r[10],x=r[11],e[8]=M*n+T*s+L*f+x*m,e[9]=M*i+T*l+L*h+x*b,e[10]=M*a+T*u+L*d+x*p,e[11]=M*o+T*c+L*v+x*k,M=r[12],T=r[13],L=r[14],x=r[15],e[12]=M*n+T*s+L*f+x*m,e[13]=M*i+T*l+L*h+x*b,e[14]=M*a+T*u+L*d+x*p,e[15]=M*o+T*c+L*v+x*k,e}});var Bte=ye((sir,Ote)=>{Ote.exports=grt;function grt(e,t,r){var n=r[0],i=r[1],a=r[2],o,s,l,u,c,f,h,d,v,m,b,p;return t===e?(e[12]=t[0]*n+t[4]*i+t[8]*a+t[12],e[13]=t[1]*n+t[5]*i+t[9]*a+t[13],e[14]=t[2]*n+t[6]*i+t[10]*a+t[14],e[15]=t[3]*n+t[7]*i+t[11]*a+t[15]):(o=t[0],s=t[1],l=t[2],u=t[3],c=t[4],f=t[5],h=t[6],d=t[7],v=t[8],m=t[9],b=t[10],p=t[11],e[0]=o,e[1]=s,e[2]=l,e[3]=u,e[4]=c,e[5]=f,e[6]=h,e[7]=d,e[8]=v,e[9]=m,e[10]=b,e[11]=p,e[12]=o*n+c*i+v*a+t[12],e[13]=s*n+f*i+m*a+t[13],e[14]=l*n+h*i+b*a+t[14],e[15]=u*n+d*i+p*a+t[15]),e}});var Ute=ye((lir,Nte)=>{Nte.exports=mrt;function mrt(e,t,r){var n=r[0],i=r[1],a=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}});var Gte=ye((uir,Vte)=>{Vte.exports=yrt;function yrt(e,t,r,n){var i=n[0],a=n[1],o=n[2],s=Math.sqrt(i*i+a*a+o*o),l,u,c,f,h,d,v,m,b,p,k,M,T,L,x,C,S,g,P,E,z,q,U,G;return Math.abs(s)<1e-6?null:(s=1/s,i*=s,a*=s,o*=s,l=Math.sin(r),u=Math.cos(r),c=1-u,f=t[0],h=t[1],d=t[2],v=t[3],m=t[4],b=t[5],p=t[6],k=t[7],M=t[8],T=t[9],L=t[10],x=t[11],C=i*i*c+u,S=a*i*c+o*l,g=o*i*c-a*l,P=i*a*c-o*l,E=a*a*c+u,z=o*a*c+i*l,q=i*o*c+a*l,U=a*o*c-i*l,G=o*o*c+u,e[0]=f*C+m*S+M*g,e[1]=h*C+b*S+T*g,e[2]=d*C+p*S+L*g,e[3]=v*C+k*S+x*g,e[4]=f*P+m*E+M*z,e[5]=h*P+b*E+T*z,e[6]=d*P+p*E+L*z,e[7]=v*P+k*E+x*z,e[8]=f*q+m*U+M*G,e[9]=h*q+b*U+T*G,e[10]=d*q+p*U+L*G,e[11]=v*q+k*U+x*G,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}});var jte=ye((cir,Hte)=>{Hte.exports=_rt;function _rt(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[4],o=t[5],s=t[6],l=t[7],u=t[8],c=t[9],f=t[10],h=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*i+u*n,e[5]=o*i+c*n,e[6]=s*i+f*n,e[7]=l*i+h*n,e[8]=u*i-a*n,e[9]=c*i-o*n,e[10]=f*i-s*n,e[11]=h*i-l*n,e}});var Xte=ye((fir,Wte)=>{Wte.exports=xrt;function xrt(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],u=t[8],c=t[9],f=t[10],h=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i-u*n,e[1]=o*i-c*n,e[2]=s*i-f*n,e[3]=l*i-h*n,e[8]=a*n+u*i,e[9]=o*n+c*i,e[10]=s*n+f*i,e[11]=l*n+h*i,e}});var Yte=ye((hir,Zte)=>{Zte.exports=brt;function brt(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],u=t[4],c=t[5],f=t[6],h=t[7];return t!==e&&(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[0]=a*i+u*n,e[1]=o*i+c*n,e[2]=s*i+f*n,e[3]=l*i+h*n,e[4]=u*i-a*n,e[5]=c*i-o*n,e[6]=f*i-s*n,e[7]=h*i-l*n,e}});var Jte=ye((dir,Kte)=>{Kte.exports=wrt;function wrt(e,t,r){var n,i,a,o=r[0],s=r[1],l=r[2],u=Math.sqrt(o*o+s*s+l*l);return Math.abs(u)<1e-6?null:(u=1/u,o*=u,s*=u,l*=u,n=Math.sin(t),i=Math.cos(t),a=1-i,e[0]=o*o*a+i,e[1]=s*o*a+l*n,e[2]=l*o*a-s*n,e[3]=0,e[4]=o*s*a-l*n,e[5]=s*s*a+i,e[6]=l*s*a+o*n,e[7]=0,e[8]=o*l*a+s*n,e[9]=s*l*a-o*n,e[10]=l*l*a+i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}});var Qte=ye((vir,$te)=>{$te.exports=Trt;function Trt(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=n+n,l=i+i,u=a+a,c=n*s,f=n*l,h=n*u,d=i*l,v=i*u,m=a*u,b=o*s,p=o*l,k=o*u;return e[0]=1-(d+m),e[1]=f+k,e[2]=h-p,e[3]=0,e[4]=f-k,e[5]=1-(c+m),e[6]=v+b,e[7]=0,e[8]=h+p,e[9]=v-b,e[10]=1-(c+d),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}});var tre=ye((pir,ere)=>{ere.exports=Art;function Art(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var ire=ye((gir,rre)=>{rre.exports=Srt;function Srt(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}});var are=ye((mir,nre)=>{nre.exports=Mrt;function Mrt(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var sre=ye((yir,ore)=>{ore.exports=Ert;function Ert(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var ure=ye((_ir,lre)=>{lre.exports=krt;function krt(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var fre=ye((xir,cre)=>{cre.exports=Crt;function Crt(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r+r,s=n+n,l=i+i,u=r*o,c=n*o,f=n*s,h=i*o,d=i*s,v=i*l,m=a*o,b=a*s,p=a*l;return e[0]=1-f-v,e[1]=c+p,e[2]=h-b,e[3]=0,e[4]=c-p,e[5]=1-u-v,e[6]=d+m,e[7]=0,e[8]=h+b,e[9]=d-m,e[10]=1-u-f,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var dre=ye((bir,hre)=>{hre.exports=Lrt;function Lrt(e,t,r,n,i,a,o){var s=1/(r-t),l=1/(i-n),u=1/(a-o);return e[0]=a*2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a*2*l,e[6]=0,e[7]=0,e[8]=(r+t)*s,e[9]=(i+n)*l,e[10]=(o+a)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*a*2*u,e[15]=0,e}});var pre=ye((wir,vre)=>{vre.exports=Prt;function Prt(e,t,r,n,i){var a=1/Math.tan(t/2),o=1/(n-i);return e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(i+n)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*i*n*o,e[15]=0,e}});var mre=ye((Tir,gre)=>{gre.exports=Irt;function Irt(e,t,r,n){var i=Math.tan(t.upDegrees*Math.PI/180),a=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(o+s),u=2/(i+a);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-((o-s)*l*.5),e[9]=(i-a)*u*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e}});var _re=ye((Air,yre)=>{yre.exports=Rrt;function Rrt(e,t,r,n,i,a,o){var s=1/(t-r),l=1/(n-i),u=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*s,e[13]=(i+n)*l,e[14]=(o+a)*u,e[15]=1,e}});var bre=ye((Sir,xre)=>{var Drt=Uq();xre.exports=Frt;function Frt(e,t,r,n){var i,a,o,s,l,u,c,f,h,d,v=t[0],m=t[1],b=t[2],p=n[0],k=n[1],M=n[2],T=r[0],L=r[1],x=r[2];return Math.abs(v-T)<1e-6&&Math.abs(m-L)<1e-6&&Math.abs(b-x)<1e-6?Drt(e):(c=v-T,f=m-L,h=b-x,d=1/Math.sqrt(c*c+f*f+h*h),c*=d,f*=d,h*=d,i=k*h-M*f,a=M*c-p*h,o=p*f-k*c,d=Math.sqrt(i*i+a*a+o*o),d?(d=1/d,i*=d,a*=d,o*=d):(i=0,a=0,o=0),s=f*o-h*a,l=h*i-c*o,u=c*a-f*i,d=Math.sqrt(s*s+l*l+u*u),d?(d=1/d,s*=d,l*=d,u*=d):(s=0,l=0,u=0),e[0]=i,e[1]=s,e[2]=c,e[3]=0,e[4]=a,e[5]=l,e[6]=f,e[7]=0,e[8]=o,e[9]=u,e[10]=h,e[11]=0,e[12]=-(i*v+a*m+o*b),e[13]=-(s*v+l*m+u*b),e[14]=-(c*v+f*m+h*b),e[15]=1,e)}});var Tre=ye((Mir,wre)=>{wre.exports=zrt;function zrt(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}});var Vq=ye((Eir,Are)=>{Are.exports={create:wte(),clone:Ate(),copy:Mte(),identity:Uq(),transpose:Cte(),invert:Pte(),adjoint:Rte(),determinant:Fte(),multiply:qte(),translate:Bte(),scale:Ute(),rotate:Gte(),rotateX:jte(),rotateY:Xte(),rotateZ:Yte(),fromRotation:Jte(),fromRotationTranslation:Qte(),fromScaling:tre(),fromTranslation:ire(),fromXRotation:are(),fromYRotation:sre(),fromZRotation:ure(),fromQuat:fre(),frustum:dre(),perspective:pre(),perspectiveFromFieldOfView:mre(),ortho:_re(),lookAt:bre(),str:Tre()}});var P6=ye(fh=>{"use strict";var qrt=Vq();fh.init2dArray=function(e,t){for(var r=new Array(e),n=0;n{"use strict";var Ort=qa(),Sre=K1(),Brt=P6(),Nrt=Vq();function Urt(e){var t;if(typeof e=="string"){if(t=document.getElementById(e),t===null)throw new Error("No DOM element with id '"+e+"' exists on the page.");return t}else if(e==null)throw new Error("DOM element provided is null or undefined");return e}function Vrt(e){var t=Ort.select(e);return t.node()instanceof HTMLElement&&t.size()&&t.classed("js-plotly-plot")}function Mre(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function Grt(e,t){Ere("global",e,t)}function Ere(e,t,r){var n="plotly.js-style-"+e,i=document.getElementById(n);if(!(i&&i.matches(".no-inline-styles"))){i||(i=document.createElement("style"),i.setAttribute("id",n),i.appendChild(document.createTextNode("")),document.head.appendChild(i));var a=i.sheet;a?a.insertRule?a.insertRule(t+"{"+r+"}",0):a.addRule?a.addRule(t,r,0):Sre.warn("addStyleRule failed"):Sre.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function Hrt(e){var t="plotly.js-style-"+e,r=document.getElementById(t);r&&Mre(r)}function jrt(e,t,r,n,i,a){var o=n.split(":"),s=i.split(":"),l="data-btn-style-event-added";a||(a=document),a.querySelectorAll(e).forEach(function(u){u.getAttribute(l)||(u.addEventListener("mouseenter",function(){var c=this.querySelector(r);c&&(c.style[o[0]]=o[1])}),u.addEventListener("mouseleave",function(){var c=this.querySelector(r);c&&(t&&this.matches(t)?c.style[o[0]]=o[1]:c.style[s[0]]=s[1])}),u.setAttribute(l,!0))})}function Wrt(e){var t=Cre(e),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return t.forEach(function(n){var i=kre(n);if(i){var a=Brt.convertCssMatrix(i);r=Nrt.multiply(r,r,a)}}),r}function kre(e){var t=window.getComputedStyle(e,null),r=t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform")||t.getPropertyValue("transform");return r==="none"?null:r.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(n){return+n})}function Cre(e){for(var t=[];Xrt(e);)t.push(e),e=e.parentNode,typeof ShadowRoot=="function"&&e instanceof ShadowRoot&&(e=e.host);return t}function Xrt(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function Zrt(e,t){return e&&t&&e.top===t.top&&e.left===t.left&&e.right===t.right&&e.bottom===t.bottom}Lre.exports={getGraphDiv:Urt,isPlotDiv:Vrt,removeElement:Mre,addStyleRule:Grt,addRelatedStyleRule:Ere,deleteRelatedStyleRule:Hrt,setStyleOnHover:jrt,getFullTransformMatrix:Wrt,getElementTransformMatrix:kre,getElementAndAncestors:Cre,equalDomRects:Zrt}});var jS=ye((Lir,Pre)=>{"use strict";Pre.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"]},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward"},fromcurrent:{valType:"boolean",dflt:!1},frame:{duration:{valType:"number",min:0,dflt:500},redraw:{valType:"boolean",dflt:!0}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none"},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none"}}}});var mc=ye((Pir,Ore)=>{"use strict";var Rre=Ao().extendFlat,Yrt=Ty(),Dre={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},Fre={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},Krt=Dre.flags.slice().concat(["fullReplot"]),Jrt=Fre.flags.slice().concat("layoutReplot");Ore.exports={traces:Dre,layout:Fre,traceFlags:function(){return Ire(Krt)},layoutFlags:function(){return Ire(Jrt)},update:function(e,t){var r=t.editType;if(r&&r!=="none")for(var n=r.split("+"),i=0;i{"use strict";Gq.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"};Gq.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},path:{valType:"string",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}});var Hq=ye((Rir,Bre)=>{"use strict";Bre.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}});var Ll=ye(_3=>{"use strict";var{DATE_FORMAT_LINK:$rt,FORMAT_LINK:Qrt}=Hq(),eit=["Variables that can't be found will be replaced with the specifier.",'For example, a template of "data: %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 and y is missing.',"Variables with an undefined value will be replaced with the fallback value."].join(" ");function tit({supportOther:e}={}){return["Variables are inserted using %{variable},",'for example "y: %{y}"'+(e?" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown.":"."),`Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}".`,Qrt,"for details on the formatting syntax.",`Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}".`,$rt,"for details on the date formatting syntax.",eit].join(" ")}_3.templateFormatStringDescription=tit;_3.hovertemplateAttrs=({editType:e="none",arrayOk:t}={},r={})=>_g({valType:"string",dflt:"",editType:e},t!==!1?{arrayOk:!0}:{});_3.texttemplateAttrs=({editType:e="calc",arrayOk:t}={},r={})=>_g({valType:"string",dflt:"",editType:e},t!==!1?{arrayOk:!0}:{});_3.shapeTexttemplateAttrs=({editType:e="arraydraw",newshape:t}={},r={})=>({valType:"string",dflt:"",editType:e});_3.templatefallbackAttrs=({editType:e="none"}={})=>({valType:"any",dflt:"-",editType:e})});var D6=ye((zir,jre)=>{"use strict";function J1(e,t){return t?t.d2l(e):e}function Nre(e,t){return t?t.l2d(e):e}function rit(e){return e.x0}function iit(e){return e.x1}function nit(e){return e.y0}function ait(e){return e.y1}function Ure(e){return e.x0shift||0}function Vre(e){return e.x1shift||0}function Gre(e){return e.y0shift||0}function Hre(e){return e.y1shift||0}function I6(e,t){return J1(e.x1,t)+Vre(e)-J1(e.x0,t)-Ure(e)}function R6(e,t,r){return J1(e.y1,r)+Hre(e)-J1(e.y0,r)-Gre(e)}function oit(e,t){return Math.abs(I6(e,t))}function sit(e,t,r){return Math.abs(R6(e,t,r))}function lit(e,t,r){return e.type!=="line"?void 0:Math.sqrt(Math.pow(I6(e,t),2)+Math.pow(R6(e,t,r),2))}function uit(e,t){return Nre((J1(e.x1,t)+Vre(e)+J1(e.x0,t)+Ure(e))/2,t)}function cit(e,t,r){return Nre((J1(e.y1,r)+Hre(e)+J1(e.y0,r)+Gre(e))/2,r)}function fit(e,t,r){return e.type!=="line"?void 0:R6(e,t,r)/I6(e,t)}var hit=["x0","x1","y0","y1","dy","height","ycenter"],dit=["x0","x1","y0","y1","dx","width","xcenter"];jre.exports={x0:rit,x1:iit,y0:nit,y1:ait,slope:fit,dx:I6,dy:R6,width:oit,height:sit,length:lit,xcenter:uit,ycenter:cit,simpleXVariables:hit,simpleYVariables:dit}});var Zre=ye((qir,Xre)=>{"use strict";var vit=mc().overrideAll,xb=Gl(),Wre=ec(),pit=Pd().dash,$1=Ao().extendFlat,{shapeTexttemplateAttrs:git,templatefallbackAttrs:mit}=Ll(),yit=D6();Xre.exports=vit({newshape:{visible:$1({},xb.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:$1({},xb.legend,{}),legendgroup:$1({},xb.legendgroup,{}),legendgrouptitle:{text:$1({},xb.legendgrouptitle.text,{}),font:Wre({})},legendrank:$1({},xb.legendrank,{}),legendwidth:$1({},xb.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:$1({},pit,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:$1({},xb.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:git({newshape:!0},{keys:Object.keys(yit)}),texttemplatefallback:mit({editType:"arraydraw"}),font:Wre({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")});var Kre=ye((Oir,Yre)=>{"use strict";var _it=Pd().dash,xit=Ao().extendFlat;Yre.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:xit({},_it,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}});var F6=ye((Bir,Jre)=>{"use strict";Jre.exports=function(e){var t=e.editType;return{t:{valType:"number",dflt:0,editType:t},r:{valType:"number",dflt:0,editType:t},b:{valType:"number",dflt:0,editType:t},l:{valType:"number",dflt:0,editType:t},editType:t}}});var x3=ye((Nir,tie)=>{"use strict";var jq=ec(),bit=jS(),z6=Ih(),$re=Zre(),Qre=Kre(),wit=F6(),eie=Ao().extendFlat,q6=jq({editType:"calc"});q6.family.dflt='"Open Sans", verdana, arial, sans-serif';q6.size.dflt=12;q6.color.dflt=z6.defaultLine;tie.exports={font:q6,title:{text:{valType:"string",editType:"layoutstyle"},font:jq({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:jq({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:eie(wit({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:z6.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:z6.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},hidesources:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:z6.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:$re.newshape,activeshape:$re.activeshape,newselection:Qre.newselection,activeselection:Qre.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:eie({},bit.transition,{editType:"none"})}});var rie=ye(()=>{(function(){if(!document.getElementById("8431bff7cc77ea8693f8122c6e0981316b936a0a4930625e08b1512d134062bc")){var e=document.createElement("style");e.id="8431bff7cc77ea8693f8122c6e0981316b936a0a4930625e08b1512d134062bc",e.textContent=`.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,document.head.appendChild(e)}})()});var Oa=ye(el=>{"use strict";var b3=K1(),iie=L6(),nie=Nq(),Tit=Ty(),Ait=HS().addStyleRule,aie=Ao(),Sit=Gl(),Mit=x3(),Eit=aie.extendFlat,Wq=aie.extendDeepAll;el.modules={};el.allCategories={};el.allTypes=[];el.subplotsRegistry={};el.componentsRegistry={};el.layoutArrayContainers=[];el.layoutArrayRegexes=[];el.traceLayoutAttributes={};el.localeRegistry={};el.apiMethodRegistry={};el.collectableSubplotTypes=null;el.register=function(t){if(el.collectableSubplotTypes=null,t)t&&!Array.isArray(t)&&(t=[t]);else throw new Error("No argument passed to Plotly.register.");for(var r=0;r{"use strict";var Rit=h3().timeFormat,gie=Eo(),Xq=K1(),e_=v3().mod,A3=fs(),_0=A3.BADNUM,Ap=A3.ONEDAY,WS=A3.ONEHOUR,Q1=A3.ONEMIN,T3=A3.ONESEC,XS=A3.EPOCHJD,Ay=Oa(),cie=h3().utcFormat,Dit=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,Fit=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,fie=new Date().getFullYear()-70;function Sy(e){return e&&Ay.componentsRegistry.calendars&&typeof e=="string"&&e!=="gregorian"}hh.dateTick0=function(e,t){var r=zit(e,!!t);if(t<2)return r;var n=hh.dateTime2ms(r,e);return n+=Ap*(t-1),hh.ms2DateTime(n,0,e)};function zit(e,t){return Sy(e)?t?Ay.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:Ay.getComponentMethod("calendars","CANONICAL_TICK")[e]:t?"2000-01-02":"2000-01-01"}hh.dfltRange=function(e){return Sy(e)?Ay.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]};hh.isJSDate=function(e){return typeof e=="object"&&e!==null&&typeof e.getTime=="function"};var B6,N6;hh.dateTime2ms=function(e,t){if(hh.isJSDate(e)){var r=e.getTimezoneOffset()*Q1,n=(e.getUTCMinutes()-e.getMinutes())*Q1+(e.getUTCSeconds()-e.getSeconds())*T3+(e.getUTCMilliseconds()-e.getMilliseconds());if(n){var i=3*Q1;r=r-i/2+e_(n-r+i/2,i)}return e=Number(e)-r,e>=B6&&e<=N6?e:_0}if(typeof e!="string"&&typeof e!="number")return _0;e=String(e);var a=Sy(t),o=e.charAt(0);a&&(o==="G"||o==="g")&&(e=e.slice(1),t="");var s=a&&t.slice(0,7)==="chinese",l=e.match(s?Fit:Dit);if(!l)return _0;var u=l[1],c=l[3]||"1",f=Number(l[5]||1),h=Number(l[7]||0),d=Number(l[9]||0),v=Number(l[11]||0);if(a){if(u.length===2)return _0;u=Number(u);var m;try{var b=Ay.getComponentMethod("calendars","getCal")(t);if(s){var p=c.charAt(c.length-1)==="i";c=parseInt(c,10),m=b.newDate(u,b.toMonthIndex(u,c,p),f)}else m=b.newDate(u,Number(c),f)}catch(M){return _0}return m?(m.toJD()-XS)*Ap+h*WS+d*Q1+v*T3:_0}u.length===2?u=(Number(u)+2e3-fie)%100+fie:u=Number(u),c-=1;var k=new Date(Date.UTC(2e3,c,f,h,d));return k.setUTCFullYear(u),k.getUTCMonth()!==c||k.getUTCDate()!==f?_0:k.getTime()+v*T3};B6=hh.MIN_MS=hh.dateTime2ms("-9999");N6=hh.MAX_MS=hh.dateTime2ms("9999-12-31 23:59:59.9999");hh.isDateTime=function(e,t){return hh.dateTime2ms(e,t)!==_0};function w3(e,t){return String(e+Math.pow(10,t)).slice(1)}var O6=90*Ap,hie=3*WS,die=5*Q1;hh.ms2DateTime=function(e,t,r){if(typeof e!="number"||!(e>=B6&&e<=N6))return _0;t||(t=0);var n=Math.floor(e_(e+.05,1)*10),i=Math.round(e-n/10),a,o,s,l,u,c;if(Sy(r)){var f=Math.floor(i/Ap)+XS,h=Math.floor(e_(e,Ap));try{a=Ay.getComponentMethod("calendars","getCal")(r).fromJD(f).formatDate("yyyy-mm-dd")}catch(d){a=cie("G%Y-%m-%d")(new Date(i))}if(a.charAt(0)==="-")for(;a.length<11;)a="-0"+a.slice(1);else for(;a.length<10;)a="0"+a;o=t=B6+Ap&&e<=N6-Ap))return _0;var t=Math.floor(e_(e+.05,1)*10),r=new Date(Math.round(e-t/10)),n=Rit("%Y-%m-%d")(r),i=r.getHours(),a=r.getMinutes(),o=r.getSeconds(),s=r.getUTCMilliseconds()*10+t;return mie(n,i,a,o,s)};function mie(e,t,r,n,i){if((t||r||n||i)&&(e+=" "+w3(t,2)+":"+w3(r,2),(n||i)&&(e+=":"+w3(n,2),i))){for(var a=4;i%10===0;)a-=1,i/=10;e+="."+w3(i,a)}return e}hh.cleanDate=function(e,t,r){if(e===_0)return t;if(hh.isJSDate(e)||typeof e=="number"&&isFinite(e)){if(Sy(r))return Xq.error("JS Dates and milliseconds are incompatible with world calendars",e),t;if(e=hh.ms2DateTimeLocal(+e),!e&&t!==void 0)return t}else if(!hh.isDateTime(e,r))return Xq.error("unrecognized date",e),t;return e};var qit=/%\d?f/g,Oit=/%h/g,Bit={1:"1",2:"1",3:"2",4:"2"};function vie(e,t,r,n){e=e.replace(qit,function(a){var o=Math.min(+a.charAt(1)||6,6),s=(t/1e3%1+2).toFixed(o).slice(2).replace(/0+$/,"")||"0";return s});var i=new Date(Math.floor(t+.05));if(e=e.replace(Oit,function(){return Bit[r("%q")(i)]}),Sy(n))try{e=Ay.getComponentMethod("calendars","worldCalFmt")(e,t,n)}catch(a){return"Invalid"}return r(e)(i)}var Nit=[59,59.9,59.99,59.999,59.9999];function Uit(e,t){var r=e_(e+.05,Ap),n=w3(Math.floor(r/WS),2)+":"+w3(e_(Math.floor(r/Q1),60),2);if(t!=="M"){gie(t)||(t=0);var i=Math.min(e_(e/T3,60),Nit[t]),a=(100+i).toFixed(t).slice(1);t>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+a}return n}hh.formatDate=function(e,t,r,n,i,a){if(i=Sy(i)&&i,!t)if(r==="y")t=a.year;else if(r==="m")t=a.month;else if(r==="d")t=a.dayMonth+` +`+a.year;else return Uit(e,r)+` +`+vie(a.dayMonthYear,e,n,i);return vie(t,e,n,i)};var pie=3*Ap;hh.incrementMonth=function(e,t,r){r=Sy(r)&&r;var n=e_(e,Ap);if(e=Math.round(e-n),r)try{var i=Math.round(e/Ap)+XS,a=Ay.getComponentMethod("calendars","getCal")(r),o=a.fromJD(i);return t%12?a.add(o,t,"m"):a.add(o,t/12,"y"),(o.toJD()-XS)*Ap+n}catch(l){Xq.error("invalid ms "+e+" in calendar "+r)}var s=new Date(e+pie);return s.setUTCMonth(s.getUTCMonth()+t)+n-pie};hh.findExactDates=function(e,t){for(var r=0,n=0,i=0,a=0,o,s,l=Sy(t)&&Ay.getComponentMethod("calendars","getCal")(t),u=0;u{"use strict";_ie.exports=function(t){return t}});var U6=ye(My=>{"use strict";var Vit=Eo(),Git=K1(),Hit=ZS(),jit=fs().BADNUM,Zq=1e-9;My.findBin=function(e,t,r){if(Vit(t.start))return r?Math.ceil((e-t.start)/t.size-Zq)-1:Math.floor((e-t.start)/t.size+Zq);var n=0,i=t.length,a=0,o=i>1?(t[i-1]-t[0])/(i-1):1,s,l;for(o>=0?l=r?Wit:Xit:l=r?Yit:Zit,e+=o*Zq*(r?-1:1)*(o>=0?1:-1);n90&&Git.log("Long binary search..."),n-1};function Wit(e,t){return et}function Yit(e,t){return e>=t}My.sorterAsc=function(e,t){return e-t};My.sorterDes=function(e,t){return t-e};My.distinctVals=function(e){var t=e.slice();t.sort(My.sorterAsc);var r;for(r=t.length-1;r>-1&&t[r]===jit;r--);for(var n=t[r]-t[0]||1,i=n/(r||1)/1e4,a=[],o,s=0;s<=r;s++){var l=t[s],u=l-o;o===void 0?(a.push(l),o=l):u>i&&(n=Math.min(n,u),a.push(l),o=l)}return{vals:a,minDiff:n}};My.roundUp=function(e,t,r){for(var n=0,i=t.length-1,a,o=0,s=r?0:1,l=r?1:0,u=r?Math.ceil:Math.floor;n0&&(n=1),r&&n)return e.sort(t)}return n?e:e.reverse()};My.findIndexOfMin=function(e,t){t=t||Hit;for(var r=1/0,n,i=0;i{"use strict";xie.exports=function(t){return Object.keys(t).sort()}});var bie=ye(dh=>{"use strict";var YS=Eo(),Kit=vv().isArrayOrTypedArray;dh.aggNums=function(e,t,r,n){var i,a;if((!n||n>r.length)&&(n=r.length),YS(t)||(t=!1),Kit(r[0])){for(a=new Array(n),i=0;ie.length-1)return e[e.length-1];var r=t%1;return r*e[Math.ceil(t)]+(1-r)*e[Math.floor(t)]}});var Mie=ye((Yir,Sie)=>{"use strict";var wie=v3(),Yq=wie.mod,Jit=wie.modHalf,KS=Math.PI,r_=2*KS;function $it(e){return e/180*KS}function Qit(e){return e/KS*180}function Kq(e){return Math.abs(e[1]-e[0])>r_-1e-14}function Tie(e,t){return Jit(t-e,r_)}function ent(e,t){return Math.abs(Tie(e,t))}function Aie(e,t){if(Kq(t))return!0;var r,n;t[0]n&&(n+=r_);var i=Yq(e,r_),a=i+r_;return i>=r&&i<=n||a>=r&&a<=n}function tnt(e,t,r,n){if(!Aie(t,n))return!1;var i,a;return r[0]=i&&e<=a}function Jq(e,t,r,n,i,a,o){i=i||0,a=a||0;var s=Kq([r,n]),l,u,c,f,h;s?(l=0,u=KS,c=r_):r{"use strict";bb.isLeftAnchor=function(t){return t.xanchor==="left"||t.xanchor==="auto"&&t.x<=1/3};bb.isCenterAnchor=function(t){return t.xanchor==="center"||t.xanchor==="auto"&&t.x>1/3&&t.x<2/3};bb.isRightAnchor=function(t){return t.xanchor==="right"||t.xanchor==="auto"&&t.x>=2/3};bb.isTopAnchor=function(t){return t.yanchor==="top"||t.yanchor==="auto"&&t.y>=2/3};bb.isMiddleAnchor=function(t){return t.yanchor==="middle"||t.yanchor==="auto"&&t.y>1/3&&t.y<2/3};bb.isBottomAnchor=function(t){return t.yanchor==="bottom"||t.yanchor==="auto"&&t.y<=1/3}});var Lie=ye(wb=>{"use strict";var $q=v3().mod;wb.segmentsIntersect=Cie;function Cie(e,t,r,n,i,a,o,s){var l=r-e,u=i-e,c=o-i,f=n-t,h=a-t,d=s-a,v=l*d-c*f;if(v===0)return null;var m=(u*d-c*h)/v,b=(u*f-l*h)/v;return b<0||b>1||m<0||m>1?null:{x:e+l*m,y:t+f*m}}wb.segmentDistance=function(t,r,n,i,a,o,s,l){if(Cie(t,r,n,i,a,o,s,l))return 0;var u=n-t,c=i-r,f=s-a,h=l-o,d=u*u+c*c,v=f*f+h*h,m=Math.min(V6(u,c,d,a-t,o-r),V6(u,c,d,s-t,l-r),V6(f,h,v,t-a,r-o),V6(f,h,v,n-a,i-o));return Math.sqrt(m)};function V6(e,t,r,n,i){var a=n*e+i*t;if(a<0)return n*n+i*i;if(a>r){var o=n-e,s=i-t;return o*o+s*s}else{var l=n*t-i*e;return l*l/r}}var G6,Qq,kie;wb.getTextLocation=function(t,r,n,i){if((t!==Qq||i!==kie)&&(G6={},Qq=t,kie=i),G6[n])return G6[n];var a=t.getPointAtLength($q(n-i/2,r)),o=t.getPointAtLength($q(n+i/2,r)),s=Math.atan((o.y-a.y)/(o.x-a.x)),l=t.getPointAtLength($q(n,r)),u=(l.x*4+a.x+o.x)/6,c=(l.y*4+a.y+o.y)/6,f={x:u,y:c,theta:s};return G6[n]=f,f};wb.clearLocationCache=function(){Qq=null};wb.getVisibleSegment=function(t,r,n){var i=r.left,a=r.right,o=r.top,s=r.bottom,l=0,u=t.getTotalLength(),c=u,f,h;function d(m){var b=t.getPointAtLength(m);m===0?f=b:m===u&&(h=b);var p=b.xa?b.x-a:0,k=b.ys?b.y-s:0;return Math.sqrt(p*p+k*k)}for(var v=d(l);v;){if(l+=v+n,l>c)return;v=d(l)}for(v=d(c);v;){if(c-=v+n,l>c)return;v=d(c)}return{min:l,max:c,len:c-l,total:u,isClosed:l===0&&c===u&&Math.abs(f.x-h.x)<.1&&Math.abs(f.y-h.y)<.1}};wb.findPointOnPath=function(t,r,n,i){i=i||{};for(var a=i.pathLength||t.getTotalLength(),o=i.tolerance||.001,s=i.iterationLimit||30,l=t.getPointAtLength(0)[n]>t.getPointAtLength(a)[n]?-1:1,u=0,c=0,f=a,h,d,v;u0?f=h:c=h,u++}return d}});var H6=ye(JS=>{"use strict";var Ey={};JS.throttle=function(t,r,n){var i=Ey[t],a=Date.now();if(!i){for(var o in Ey)Ey[o].tsi.ts+r){s();return}i.timer=setTimeout(function(){s(),i.timer=null},r)};JS.done=function(e){var t=Ey[e];return!t||!t.timer?Promise.resolve():new Promise(function(r){var n=t.onDone;t.onDone=function(){n&&n(),r(),t.onDone=null}})};JS.clear=function(e){if(e)Pie(Ey[e]),delete Ey[e];else for(var t in Ey)JS.clear(t)};function Pie(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var Rie=ye((Qir,Iie)=>{"use strict";Iie.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener("resize",t._responsiveChartHandler),delete t._responsiveChartHandler)}});var Die=ye((enr,j6)=>{"use strict";j6.exports=eO;j6.exports.isMobile=eO;j6.exports.default=eO;var ant=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,ont=/CrOS/,snt=/android|ipad|playbook|silk/i;function eO(e){e||(e={});let t=e.ua;if(!t&&typeof navigator!="undefined"&&(t=navigator.userAgent),t&&t.headers&&typeof t.headers["user-agent"]=="string"&&(t=t.headers["user-agent"]),typeof t!="string")return!1;let r=ant.test(t)&&!ont.test(t)||!!e.tablet&&snt.test(t);return!r&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf("Macintosh")!==-1&&t.indexOf("Safari")!==-1&&(r=!0),r}});var zie=ye((tnr,Fie)=>{"use strict";var lnt=Eo(),unt=Die();Fie.exports=function(t){var r;if(t&&t.hasOwnProperty("userAgent")?r=t.userAgent:r=cnt(),typeof r!="string")return!0;var n=unt({ua:{headers:{"user-agent":r}},tablet:!0,featureDetect:!1});if(!n)for(var i=r.split(" "),a=1;a-1;s--){var l=i[s];if(l.slice(0,8)==="Version/"){var u=l.slice(8).split(".")[0];if(lnt(u)&&(u=+u),u>=13)return!0}}}return n};function cnt(){var e;return typeof navigator!="undefined"&&(e=navigator.userAgent),e&&e.headers&&typeof e.headers["user-agent"]=="string"&&(e=e.headers["user-agent"]),e}});var Oie=ye((rnr,qie)=>{"use strict";var fnt=qa();qie.exports=function(t,r,n){var i=t.selectAll("g."+n.replace(/\s/g,".")).data(r,function(o){return o[0].trace.uid});i.exit().remove(),i.enter().append("g").attr("class",n),i.order();var a=t.classed("rangeplot")?"nodeRangePlot3":"node3";return i.each(function(o){o[0][a]=fnt.select(this)}),i}});var Nie=ye((inr,Bie)=>{"use strict";var hnt=Oa();Bie.exports=function(t,r){for(var n=t._context.locale,i=0;i<2;i++){for(var a=t._context.locales,o=0;o<2;o++){var s=(a[n]||{}).dictionary;if(s){var l=s[r];if(l)return l}a=hnt.localeRegistry}var u=n.split("-")[0];if(u===n)break;n=u}return r}});var tO=ye((nnr,Uie)=>{"use strict";Uie.exports=function(t){for(var r={},n=[],i=0,a=0;a{"use strict";Vie.exports=function(t){for(var r=pnt(t)?vnt:dnt,n=[],i=0;i{"use strict";Hie.exports=function(t,r){if(!r)return t;var n=1/Math.abs(r),i=n>1?(n*t+n*r)/n:t+r,a=String(i).length;if(a>16){var o=String(r).length,s=String(t).length;if(a>=s+o){var l=parseFloat(i).toPrecision(12);l.indexOf("e+")===-1&&(i=+l)}}return i}});var Xie=ye((snr,Wie)=>{"use strict";var gnt=Eo(),mnt=fs().BADNUM,ynt=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;Wie.exports=function(t){return typeof t=="string"&&(t=t.replace(ynt,"")),gnt(t)?Number(t):mnt}});var Pr=ye((lnr,one)=>{"use strict";var $S=qa(),_nt=h3().utcFormat,xnt=Mq().format,Qie=Eo(),ene=fs(),tne=ene.FP_SAFE,bnt=-tne,Zie=ene.BADNUM,Ai=one.exports={};Ai.adjustFormat=function(t){return!t||/^\d[.]\df/.test(t)||/[.]\d%/.test(t)?t:t==="0.f"?"~f":/^\d%/.test(t)?"~%":/^\ds/.test(t)?"~s":!/^[~,.0$]/.test(t)&&/[&fps]/.test(t)?"~"+t:t};var Yie={};Ai.warnBadFormat=function(e){var t=String(e);Yie[t]||(Yie[t]=1,Ai.warn('encountered bad format: "'+t+'"'))};Ai.noFormat=function(e){return String(e)};Ai.numberFormat=function(e){var t;try{t=xnt(Ai.adjustFormat(e))}catch(r){return Ai.warnBadFormat(e),Ai.noFormat}return t};Ai.nestedProperty=FS();Ai.keyedContainer=Uee();Ai.relativeAttr=Gee();Ai.isPlainObject=Ty();Ai.toLogRange=S6();Ai.relinkPrivateKeys=Xee();var i_=vv();Ai.isArrayBuffer=i_.isArrayBuffer;Ai.isTypedArray=i_.isTypedArray;Ai.isArrayOrTypedArray=i_.isArrayOrTypedArray;Ai.isArray1D=i_.isArray1D;Ai.ensureArray=i_.ensureArray;Ai.concat=i_.concat;Ai.maxRowLength=i_.maxRowLength;Ai.minRowLength=i_.minRowLength;var rne=v3();Ai.mod=rne.mod;Ai.modHalf=rne.modHalf;var n_=hte();Ai.valObjectMeta=n_.valObjectMeta;Ai.coerce=n_.coerce;Ai.coerce2=n_.coerce2;Ai.coerceFont=n_.coerceFont;Ai.coercePattern=n_.coercePattern;Ai.coerceHoverinfo=n_.coerceHoverinfo;Ai.coerceSelectionMarkerOpacity=n_.coerceSelectionMarkerOpacity;Ai.validate=n_.validate;var jp=yie();Ai.dateTime2ms=jp.dateTime2ms;Ai.isDateTime=jp.isDateTime;Ai.ms2DateTime=jp.ms2DateTime;Ai.ms2DateTimeLocal=jp.ms2DateTimeLocal;Ai.cleanDate=jp.cleanDate;Ai.isJSDate=jp.isJSDate;Ai.formatDate=jp.formatDate;Ai.incrementMonth=jp.incrementMonth;Ai.dateTick0=jp.dateTick0;Ai.dfltRange=jp.dfltRange;Ai.findExactDates=jp.findExactDates;Ai.MIN_MS=jp.MIN_MS;Ai.MAX_MS=jp.MAX_MS;var Tb=U6();Ai.findBin=Tb.findBin;Ai.sorterAsc=Tb.sorterAsc;Ai.sorterDes=Tb.sorterDes;Ai.distinctVals=Tb.distinctVals;Ai.roundUp=Tb.roundUp;Ai.sort=Tb.sort;Ai.findIndexOfMin=Tb.findIndexOfMin;Ai.sortObjectKeys=t_();var ky=bie();Ai.aggNums=ky.aggNums;Ai.len=ky.len;Ai.mean=ky.mean;Ai.geometricMean=ky.geometricMean;Ai.median=ky.median;Ai.midRange=ky.midRange;Ai.variance=ky.variance;Ai.stdev=ky.stdev;Ai.interp=ky.interp;var wg=P6();Ai.init2dArray=wg.init2dArray;Ai.transposeRagged=wg.transposeRagged;Ai.dot=wg.dot;Ai.translationMatrix=wg.translationMatrix;Ai.rotationMatrix=wg.rotationMatrix;Ai.rotationXYMatrix=wg.rotationXYMatrix;Ai.apply3DTransform=wg.apply3DTransform;Ai.apply2DTransform=wg.apply2DTransform;Ai.apply2DTransform2=wg.apply2DTransform2;Ai.convertCssMatrix=wg.convertCssMatrix;Ai.inverseTransformMatrix=wg.inverseTransformMatrix;var gm=Mie();Ai.deg2rad=gm.deg2rad;Ai.rad2deg=gm.rad2deg;Ai.angleDelta=gm.angleDelta;Ai.angleDist=gm.angleDist;Ai.isFullCircle=gm.isFullCircle;Ai.isAngleInsideSector=gm.isAngleInsideSector;Ai.isPtInsideSector=gm.isPtInsideSector;Ai.pathArc=gm.pathArc;Ai.pathSector=gm.pathSector;Ai.pathAnnulus=gm.pathAnnulus;var M3=Eie();Ai.isLeftAnchor=M3.isLeftAnchor;Ai.isCenterAnchor=M3.isCenterAnchor;Ai.isRightAnchor=M3.isRightAnchor;Ai.isTopAnchor=M3.isTopAnchor;Ai.isMiddleAnchor=M3.isMiddleAnchor;Ai.isBottomAnchor=M3.isBottomAnchor;var E3=Lie();Ai.segmentsIntersect=E3.segmentsIntersect;Ai.segmentDistance=E3.segmentDistance;Ai.getTextLocation=E3.getTextLocation;Ai.clearLocationCache=E3.clearLocationCache;Ai.getVisibleSegment=E3.getVisibleSegment;Ai.findPointOnPath=E3.findPointOnPath;var Z6=Ao();Ai.extendFlat=Z6.extendFlat;Ai.extendDeep=Z6.extendDeep;Ai.extendDeepAll=Z6.extendDeepAll;Ai.extendDeepNoArrays=Z6.extendDeepNoArrays;var rO=K1();Ai.log=rO.log;Ai.warn=rO.warn;Ai.error=rO.error;var wnt=g3();Ai.counterRegex=wnt.counter;var iO=H6();Ai.throttle=iO.throttle;Ai.throttleDone=iO.done;Ai.clearThrottle=iO.clear;var Tg=HS();Ai.getGraphDiv=Tg.getGraphDiv;Ai.isPlotDiv=Tg.isPlotDiv;Ai.removeElement=Tg.removeElement;Ai.addStyleRule=Tg.addStyleRule;Ai.addRelatedStyleRule=Tg.addRelatedStyleRule;Ai.deleteRelatedStyleRule=Tg.deleteRelatedStyleRule;Ai.setStyleOnHover=Tg.setStyleOnHover;Ai.getFullTransformMatrix=Tg.getFullTransformMatrix;Ai.getElementTransformMatrix=Tg.getElementTransformMatrix;Ai.getElementAndAncestors=Tg.getElementAndAncestors;Ai.equalDomRects=Tg.equalDomRects;Ai.clearResponsive=Rie();Ai.preserveDrawingBuffer=zie();Ai.makeTraceGroups=Oie();Ai._=Nie();Ai.notifier=qq();Ai.filterUnique=tO();Ai.filterVisible=Gie();Ai.pushUnique=Nq();Ai.increment=jie();Ai.cleanNumber=Xie();Ai.ensureNumber=function(t){return Qie(t)?(t=Number(t),t>tne||t=t?!1:Qie(e)&&e>=0&&e%1===0};Ai.noop=L6();Ai.identity=ZS();Ai.repeat=function(e,t){for(var r=new Array(t),n=0;nr?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))};Ai.bBoxIntersect=function(e,t,r){return r=r||0,e.left<=t.right+r&&t.left<=e.right+r&&e.top<=t.bottom+r&&t.top<=e.bottom+r};Ai.simpleMap=function(e,t,r,n,i){for(var a=e.length,o=new Array(a),s=0;s=Math.pow(2,r)?i>10?(Ai.warn("randstr failed uniqueness"),o):e(t,r,n,(i||0)+1):o};Ai.OptionControl=function(e,t){e||(e={}),t||(t="opt");var r={};return r.optionList=[],r._newoption=function(n){n[t]=e,r[n.name]=n,r.optionList.push(n)},r["_"+t]=e,r};Ai.smooth=function(e,t){if(t=Math.round(t)||0,t<2)return e;var r=e.length,n=2*r,i=2*t-1,a=new Array(i),o=new Array(r),s,l,u,c;for(s=0;s=n&&(u-=n*Math.floor(u/n)),u<0?u=-1-u:u>=r&&(u=n-1-u),c+=e[u]*a[l];o[s]=c}return o};Ai.syncOrAsync=function(e,t,r){var n,i;function a(){return Ai.syncOrAsync(e,t,r)}for(;e.length;)if(i=e.splice(0,1)[0],n=i(t),n&&n.then)return n.then(a);return r&&r(t)};Ai.stripTrailingSlash=function(e){return e.slice(-1)==="/"?e.slice(0,-1):e};Ai.noneOrAll=function(e,t,r){if(e){var n=!1,i=!0,a,o;for(a=0;a0?i:0})};Ai.fillArray=function(e,t,r,n){if(n=n||Ai.identity,Ai.isArrayOrTypedArray(e))for(var i=0;iSnt.test(window.navigator.userAgent);var Mnt=/Firefox\/(\d+)\.\d+/;Ai.getFirefoxVersion=function(){var e=Mnt.exec(window.navigator.userAgent);if(e&&e.length===2){var t=parseInt(e[1]);if(!isNaN(t))return t}return null};Ai.isD3Selection=function(e){return e instanceof $S.selection};Ai.ensureSingle=function(e,t,r,n){var i=e.select(t+(r?"."+r:""));if(i.size())return i;var a=e.append(t);return r&&a.classed(r,!0),n&&a.call(n),a};Ai.ensureSingleById=function(e,t,r,n){var i=e.select(t+"#"+r);if(i.size())return i;var a=e.append(t).attr("id",r);return n&&a.call(n),a};Ai.objectFromPath=function(e,t){for(var r=e.split("."),n,i=n={},a=0;a1?i+o[1]:"";if(a&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+a+"$2");return s+l};Ai.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var ane=/^\w*$/;Ai.templateString=function(e,t){var r={};return e.replace(Ai.TEMPLATE_STRING_REGEX,function(n,i){var a;return ane.test(i)?a=t[i]:(r[i]=r[i]||Ai.nestedProperty(t,i).get,a=r[i](!0)),a!==void 0?a:""})};var Cnt={max:10,count:0,name:"hovertemplate"};Ai.hovertemplateString=e=>nO(j1(_g({},e),{opts:Cnt}));var Lnt={max:10,count:0,name:"texttemplate"};Ai.texttemplateString=e=>nO(j1(_g({},e),{opts:Lnt}));var Pnt=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function Int(e){var t=e.match(Pnt);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}var Rnt={max:10,count:0,name:"texttemplate",parseMultDiv:!0};Ai.texttemplateStringForShapes=e=>nO(j1(_g({},e),{opts:Rnt}));var Kie=/^[:|\|]/;function nO({data:e=[],locale:t,fallback:r,labels:n={},opts:i,template:a}){return a.replace(Ai.TEMPLATE_STRING_REGEX,(o,s,l)=>{let u=["xother","yother"].includes(s),c=["_xother","_yother"].includes(s),f=["_xother_","_yother_"].includes(s),h=["xother_","yother_"].includes(s),d=u||c||h||f;(c||f)&&(s=s.substring(1)),(h||f)&&(s=s.substring(0,s.length-1));let v=null,m=null;if(i.parseMultDiv){var b=Int(s);s=b.key,v=b.op,m=b.number}let p;if(d){if(n[s]===void 0)return"";p=n[s]}else for(let L of e)if(L){if(L.hasOwnProperty(s)){p=L[s];break}if(ane.test(s)||(p=Ai.nestedProperty(L,s).get(!0)),p!==void 0)break}if(p===void 0){let{count:L,max:x,name:C}=i,S=r===!1?o:r;return L=X6&&o<=Jie,u=s>=X6&&s<=Jie;if(l&&(n=10*n+o-X6),u&&(i=10*i+s-X6),!l||!u){if(n!==i)return n-i;if(o!==s)return o-s}}return i-n};var S3=2e9;Ai.seedPseudoRandom=function(){S3=2e9};Ai.pseudoRandom=function(){var e=S3;return S3=(69069*S3+1)%4294967296,Math.abs(S3-e)<429496729?Ai.pseudoRandom():S3/4294967296};Ai.fillText=function(e,t,r){var n=Array.isArray(r)?function(o){r.push(o)}:function(o){r.text=o},i=Ai.extractOption(e,t,"htx","hovertext");if(Ai.isValidTextValue(i))return n(i);var a=Ai.extractOption(e,t,"tx","text");if(Ai.isValidTextValue(a))return n(a)};Ai.isValidTextValue=function(e){return e||e===0};Ai.formatPercent=function(e,t){t=t||0;for(var r=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+"%",n=0;n1&&(u=1):u=0,Ai.strTranslate(i-u*(r+o),a-u*(n+s))+Ai.strScale(u)+(l?"rotate("+l+(t?"":" "+r+" "+n)+")":"")};Ai.setTransormAndDisplay=function(e,t){e.attr("transform",Ai.getTextTransform(t)),e.style("display",t.scale?null:"none")};Ai.ensureUniformFontSize=function(e,t){var r=Ai.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r};Ai.join2=function(e,t,r){var n=e.length;return n>1?e.slice(0,-1).join(t)+r+e[n-1]:e.join(t)};Ai.bigFont=function(e){return Math.round(1.2*e)};var $ie=Ai.getFirefoxVersion(),Dnt=$ie!==null&&$ie<86;Ai.getPositionFromD3Event=function(){return Dnt?[$S.event.layerX,$S.event.layerY]:[$S.event.offsetX,$S.event.offsetY]}});var une=ye(()=>{"use strict";var Fnt=Pr(),sne={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;border:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(aO in sne)lne=aO.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),Fnt.addStyleRule(lne,sne[aO]);var lne,aO});var oO=ye((hnr,cne)=>{cne.exports=!0});var lO=ye((dnr,fne)=>{"use strict";var znt=oO(),sO;typeof window.matchMedia=="function"?sO=!window.matchMedia("(hover: none)").matches:sO=znt;fne.exports=sO});var Ab=ye((vnr,uO)=>{"use strict";var k3=typeof Reflect=="object"?Reflect:null,hne=k3&&typeof k3.apply=="function"?k3.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},Y6;k3&&typeof k3.ownKeys=="function"?Y6=k3.ownKeys:Object.getOwnPropertySymbols?Y6=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Y6=function(t){return Object.getOwnPropertyNames(t)};function qnt(e){console&&console.warn&&console.warn(e)}var vne=Number.isNaN||function(t){return t!==t};function Jc(){Jc.init.call(this)}uO.exports=Jc;uO.exports.once=Unt;Jc.EventEmitter=Jc;Jc.prototype._events=void 0;Jc.prototype._eventsCount=0;Jc.prototype._maxListeners=void 0;var dne=10;function K6(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Jc,"defaultMaxListeners",{enumerable:!0,get:function(){return dne},set:function(e){if(typeof e!="number"||e<0||vne(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");dne=e}});Jc.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};Jc.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||vne(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function pne(e){return e._maxListeners===void 0?Jc.defaultMaxListeners:e._maxListeners}Jc.prototype.getMaxListeners=function(){return pne(this)};Jc.prototype.emit=function(t){for(var r=[],n=1;n0&&(o=r[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=a[t];if(l===void 0)return!1;if(typeof l=="function")hne(l,this,r);else for(var u=l.length,c=xne(l,u),n=0;n0&&o.length>i&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,qnt(s)}return e}Jc.prototype.addListener=function(t,r){return gne(this,t,r,!1)};Jc.prototype.on=Jc.prototype.addListener;Jc.prototype.prependListener=function(t,r){return gne(this,t,r,!0)};function Ont(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function mne(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=Ont.bind(n);return i.listener=r,n.wrapFn=i,i}Jc.prototype.once=function(t,r){return K6(r),this.on(t,mne(this,t,r)),this};Jc.prototype.prependOnceListener=function(t,r){return K6(r),this.prependListener(t,mne(this,t,r)),this};Jc.prototype.removeListener=function(t,r){var n,i,a,o,s;if(K6(r),i=this._events,i===void 0)return this;if(n=i[t],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,n.listener||r));else if(typeof n!="function"){for(a=-1,o=n.length-1;o>=0;o--)if(n[o]===r||n[o].listener===r){s=n[o].listener,a=o;break}if(a<0)return this;a===0?n.shift():Bnt(n,a),n.length===1&&(i[t]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this};Jc.prototype.off=Jc.prototype.removeListener;Jc.prototype.removeAllListeners=function(t){var r,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var a=Object.keys(n),o;for(i=0;i=0;i--)this.removeListener(t,r[i]);return this};function yne(e,t,r){var n=e._events;if(n===void 0)return[];var i=n[t];return i===void 0?[]:typeof i=="function"?r?[i.listener||i]:[i]:r?Nnt(i):xne(i,i.length)}Jc.prototype.listeners=function(t){return yne(this,t,!0)};Jc.prototype.rawListeners=function(t){return yne(this,t,!1)};Jc.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):_ne.call(e,t)};Jc.prototype.listenerCount=_ne;function _ne(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}Jc.prototype.eventNames=function(){return this._eventsCount>0?Y6(this._events):[]};function xne(e,t){for(var r=new Array(t),n=0;n{"use strict";var cO=Ab().EventEmitter,Gnt={init:function(e){if(e._ev instanceof cO)return e;var t=new cO,r=new cO;return e._ev=t,e._internalEv=r,e.on=t.on.bind(t),e.once=t.once.bind(t),e.removeListener=t.removeListener.bind(t),e.removeAllListeners=t.removeAllListeners.bind(t),e._internalOn=r.on.bind(r),e._internalOnce=r.once.bind(r),e._removeInternalListener=r.removeListener.bind(r),e._removeAllInternalListeners=r.removeAllListeners.bind(r),e.emit=function(n,i){t.emit(n,i),r.emit(n,i)},typeof e.addEventListener=="function"&&e.addEventListener("wheel",()=>{},{passive:!0}),e},triggerHandler:function(e,t,r){var n,i=e._ev;if(!i)return;var a=i._events[t];if(!a)return;function o(l){if(l.listener){if(i.removeListener(t,l.listener),!l.fired)return l.fired=!0,l.listener.apply(i,[r])}else return l.apply(i,[r])}a=Array.isArray(a)?a:[a];var s;for(s=0;s{"use strict";var Tne=Pr(),Hnt=_b().dfltConfig;function jnt(e,t){for(var r=[],n,i=0;iHnt.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};Cy.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};Cy.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};Cy.undo=function(t){var r,n;if(!(t.undoQueue===void 0||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,n=0;n=t.undoQueue.queue.length)){for(r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,n=0;n{"use strict";Mne.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}});var I3=ye(ed=>{"use strict";var x0=Oa(),QS=Pr(),$6=Gl(),hO=x3(),Wnt=fO(),Xnt=jS(),Znt=_b().configAttributes,Ene=mc(),Ag=QS.extendDeepAll,L3=QS.isPlainObject,Ynt=QS.isArrayOrTypedArray,Q6=QS.nestedProperty,Knt=QS.valObjectMeta,dO="_isSubplotObj",eL="_isLinkedToArray",Jnt="_arrayAttrRegexps",Cne="_deprecated",vO=[dO,eL,Jnt,Cne];ed.IS_SUBPLOT_OBJ=dO;ed.IS_LINKED_TO_ARRAY=eL;ed.DEPRECATED=Cne;ed.UNDERSCORE_ATTRS=vO;ed.get=function(){var e={};return x0.allTypes.forEach(function(t){e[t]=Qnt(t)}),{defs:{valObjects:Knt,metaKeys:vO.concat(["description","role","editType","impliedEdits"]),editType:{traces:Ene.traces,layout:Ene.layout},impliedEdits:{}},traces:e,layout:eat(),frames:tat(),animation:P3(Xnt),config:P3(Znt)}};ed.crawl=function(e,t,r,n){var i=r||0;n=n||"",Object.keys(e).forEach(function(a){var o=e[a];if(vO.indexOf(a)===-1){var s=(n?n+".":"")+a;t(o,a,e,i,s),!ed.isValObject(o)&&L3(o)&&a!=="impliedEdits"&&ed.crawl(o,t,i+1,s)}})};ed.isValObject=function(e){return e&&e.valType!==void 0};ed.findArrayAttributes=function(e){var t=[],r=[],n=[],i,a;function o(l,u,c,f){r=r.slice(0,f).concat([u]),n=n.slice(0,f).concat([l&&l._isLinkedToArray]);var h=l&&(l.valType==="data_array"||l.arrayOk===!0)&&!(r[f-1]==="colorbar"&&(u==="ticktext"||u==="tickvals"));h&&s(i,0,"")}function s(l,u,c){var f=l[r[u]],h=c+r[u];if(u===r.length-1)Ynt(f)&&t.push(a+h);else if(n[u]){if(Array.isArray(f))for(var d=0;d=a.length)return!1;if(e.dimensions===2){if(r++,t.length===r)return e;var o=t[r];if(!J6(o))return!1;e=a[i][o]}else e=a[i]}else e=a}}return e}function J6(e){return e===Math.round(e)&&e>=0}function Qnt(e){var t,r;t=x0.modules[e]._module,r=t.basePlotModule;var n={};n.type=null;var i=Ag({},$6),a=Ag({},t.attributes);ed.crawl(a,function(l,u,c,f,h){Q6(i,h).set(void 0),l===void 0&&Q6(a,h).set(void 0)}),Ag(n,i),x0.traceIs(e,"noOpacity")&&delete n.opacity,x0.traceIs(e,"showLegend")||(delete n.showlegend,delete n.legendgroup),x0.traceIs(e,"noHover")&&(delete n.hoverinfo,delete n.hoverlabel),t.selectPoints||delete n.selectedpoints,Ag(n,a),r.attributes&&Ag(n,r.attributes),n.type=e;var o={meta:t.meta||{},categories:t.categories||{},animatable:!!t.animatable,type:e,attributes:P3(n)};if(t.layoutAttributes){var s={};Ag(s,t.layoutAttributes),o.layoutAttributes=P3(s)}return t.animatable||ed.crawl(o,function(l){ed.isValObject(l)&&"anim"in l&&delete l.anim}),o}function eat(){var e={},t,r;Ag(e,hO);for(t in x0.subplotsRegistry)if(r=x0.subplotsRegistry[t],!!r.layoutAttributes)if(Array.isArray(r.attr))for(var n=0;n{"use strict";var R3=Pr(),oat=Gl(),a_="templateitemname",pO={name:{valType:"string",editType:"none"}};pO[a_]={valType:"string",editType:"calc"};Sb.templatedArray=function(e,t){return t._isLinkedToArray=e,t.name=pO.name,t[a_]=pO[a_],t};Sb.traceTemplater=function(e){var t={},r,n;for(r in e)n=e[r],Array.isArray(n)&&n.length&&(t[r]=0);function i(a){r=R3.coerce(a,{},oat,"type");var o={type:r,_template:null};if(r in t){n=e[r];var s=t[r]%n.length;t[r]++,o._template=n[s]}return o}return{newTrace:i}};Sb.newContainer=function(e,t,r){var n=e._template,i=n&&(n[t]||r&&n[r]);R3.isPlainObject(i)||(i=null);var a=e[t]={_template:i};return a};Sb.arrayTemplater=function(e,t,r){var n=e._template,i=n&&n[Ine(t)],a=n&&n[t];(!Array.isArray(a)||!a.length)&&(a=[]);var o={};function s(u){var c={name:u.name,_input:u},f=c[a_]=u[a_];if(!Pne(f))return c._template=i,c;for(var h=0;h=n&&(r._input||{})._templateitemname;a&&(i=n);var o=t+"["+i+"]",s;function l(){s={},a&&(s[o]={},s[o][a_]=a)}l();function u(d,v){s[d]=v}function c(d,v){a?R3.nestedProperty(s[o],d).set(v):s[o+"."+d]=v}function f(){var d=s;return l(),d}function h(d,v){d&&c(d,v);var m=f();for(var b in m)R3.nestedProperty(e,b).set(m[b])}return{modifyBase:u,modifyItem:c,getUpdateObj:f,applyUpdate:h}}});var Rh=ye((xnr,Rne)=>{"use strict";var eM=g3().counter;Rne.exports={idRegex:{x:eM("x","( domain)?"),y:eM("y","( domain)?")},attrRegex:eM("[xy]axis"),xAxisMatch:eM("xaxis"),yAxisMatch:eM("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"},zindexSeparator:"z"}});var hf=ye(Sp=>{"use strict";var sat=Oa(),gO=Rh();Sp.id2name=function(t){if(!(typeof t!="string"||!t.match(gO.AX_ID_PATTERN))){var r=t.split(" ")[0].slice(1);return r==="1"&&(r=""),t.charAt(0)+"axis"+r}};Sp.name2id=function(t){if(t.match(gO.AX_NAME_PATTERN)){var r=t.slice(5);return r==="1"&&(r=""),t.charAt(0)+r}};Sp.cleanId=function(t,r,n){var i=/( domain)$/.test(t);if(!(typeof t!="string"||!t.match(gO.AX_ID_PATTERN))&&!(r&&t.charAt(0)!==r)&&!(i&&!n)){var a=t.split(" ")[0].slice(1).replace(/^0+/,"");return a==="1"&&(a=""),t.charAt(0)+a+(i&&n?" domain":"")}};Sp.list=function(e,t,r){var n=e._fullLayout;if(!n)return[];var i=Sp.listIds(e,t),a=new Array(i.length),o;for(o=0;on?1:-1:+(e.slice(1)||1)-+(t.slice(1)||1)};Sp.ref2id=function(e){return/^[xyz]/.test(e)?e.split(" ")[0]:!1};function Dne(e,t){if(t&&t.length){for(var r=0;r{"use strict";function lat(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()}function uat(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}Fne.exports={clearOutlineControllers:lat,clearOutline:uat}});var tL=ye((Tnr,zne)=>{"use strict";zne.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}});var Id=ye(iL=>{"use strict";var rL=Oa(),Anr=Rh().SUBPLOT_PATTERN;iL.getSubplotCalcData=function(e,t,r){var n=rL.subplotsRegistry[t];if(!n)return[];for(var i=n.attr,a=[],o=0;o{"use strict";var cat=Oa(),D3=Pr();Mb.manageCommandObserver=function(e,t,r,n){var i={},a=!0;t&&t._commandObserver&&(i=t._commandObserver),i.cache||(i.cache={}),i.lookupTable={};var o=Mb.hasSimpleAPICommandBindings(e,r,i.lookupTable);if(t&&t._commandObserver){if(o)return i;if(t._commandObserver.remove)return t._commandObserver.remove(),t._commandObserver=null,i}if(o){qne(e,o,i.cache),i.check=function(){if(a){var c=qne(e,o,i.cache);return c.changed&&n&&i.lookupTable[c.value]!==void 0&&(i.disable(),Promise.resolve(n({value:c.value,type:o.type,prop:o.prop,traces:o.traces,index:i.lookupTable[c.value]})).then(i.enable,i.enable)),c.changed}};for(var s=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],l=0;l0?".":"")+i;D3.isPlainObject(a)?mO(a,t,o,n+1):t(o,i,a)}})}});var Mc=ye((Enr,eae)=>{"use strict";var Xne=qa(),hat=h3().timeFormatLocale,dat=Mq().formatLocale,tM=Eo(),vat=Eq(),Xl=Oa(),Zne=I3(),pat=vl(),Ga=Pr(),Yne=ka(),Une=fs().BADNUM,Mp=hf(),gat=o_().clearOutline,mat=tL(),yO=jS(),yat=fO(),_at=Id().getModuleCalcData,Vne=Ga.relinkPrivateKeys,Eb=Ga._,xa=eae.exports={};Ga.extendFlat(xa,Xl);xa.attributes=Gl();xa.attributes.type.values=xa.allTypes;xa.fontAttrs=ec();xa.layoutAttributes=x3();var aL=Nne();xa.executeAPICommand=aL.executeAPICommand;xa.computeAPICommandBindings=aL.computeAPICommandBindings;xa.manageCommandObserver=aL.manageCommandObserver;xa.hasSimpleAPICommandBindings=aL.hasSimpleAPICommandBindings;xa.redrawText=function(e){return e=Ga.getGraphDiv(e),new Promise(function(t){setTimeout(function(){e._fullLayout&&(Xl.getComponentMethod("annotations","draw")(e),Xl.getComponentMethod("legend","draw")(e),Xl.getComponentMethod("colorbar","draw")(e),t(xa.previousPromises(e)))},300)})};xa.resize=function(e){e=Ga.getGraphDiv(e);var t,r=new Promise(function(n,i){(!e||Ga.isHidden(e))&&i(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(t=e._resolveResize),e._resolveResize=n,e._redrawTimer=setTimeout(function(){if(!e.layout||e.layout.width&&e.layout.height||Ga.isHidden(e)){n(e);return}delete e.layout.width,delete e.layout.height;var a=e.changed;e.autoplay=!0,Xl.call("relayout",e,{autosize:!0}).then(function(){e.changed=a,e._resolveResize===n&&(delete e._resolveResize,n(e))})},100)});return t&&t(r),r};xa.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};xa.addLinks=function(e){if(!(!e._context.showLink&&!e._context.showSources)){var t=e._fullLayout,r=Ga.ensureSingle(t._paper,"text","js-plot-link-container",function(l){l.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:Yne.defaultLine,"pointer-events":"all"}).each(function(){var u=Xne.select(this);u.append("tspan").classed("js-link-to-tool",!0),u.append("tspan").classed("js-link-spacer",!0),u.append("tspan").classed("js-sourcelinks",!0)})}),n=r.node(),i={y:t._paper.attr("height")-9};document.body.contains(n)&&n.getComputedTextLength()>=t.width-20?(i["text-anchor"]="start",i.x=5):(i["text-anchor"]="end",i.x=t._paper.attr("width")-7),r.attr(i);var a=r.select(".js-link-to-tool"),o=r.select(".js-link-spacer"),s=r.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&xat(e,a),o.text(a.text()&&s.text()?" - ":"")}};function xat(e,t){t.text("");var r=t.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" \xBB");if(e._context.sendData)r.on("click",function(){xa.sendDataToCloud(e)});else{var n=window.location.pathname.split("/"),i=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+i})}}xa.sendDataToCloud=function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(t){e.emit("plotly_beforeexport");var r=Xne.select(e).append("div").attr("id","hiddenform").style("display","none"),n=r.append("form").attr({action:t+"/external",method:"post",target:"_blank"}),i=n.append("input").attr({type:"text",name:"data"});return i.node().value=xa.graphJson(e,!1,"keepdata"),n.node().submit(),r.remove(),e.emit("plotly_afterexport"),!1}};var bat=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],wat=["year","month","dayMonth","dayMonthYear"];xa.supplyDefaults=function(e,t){var r=t&&t.skipUpdateCalc,n=e._fullLayout||{};if(n._skipDefaults){delete n._skipDefaults;return}var i=e._fullLayout={},a=e.layout||{},o=e._fullData||[],s=e._fullData=[],l=e.data||[],u=e.calcdata||[],c=e._context||{},f;e._transitionData||xa.createTransitionData(e),i._dfltTitle={plot:Eb(e,"Click to enter Plot title"),subtitle:Eb(e,"Click to enter Plot subtitle"),x:Eb(e,"Click to enter X axis title"),y:Eb(e,"Click to enter Y axis title"),colorbar:Eb(e,"Click to enter Colorscale title"),annotation:Eb(e,"new text")},i._traceWord=Eb(e,"trace");var h=Gne(e,bat);if(i._mapboxAccessToken=c.mapboxAccessToken,n._initialAutoSizeIsDone){var d=n.width,v=n.height;xa.supplyLayoutGlobalDefaults(a,i,h),a.width||(i.width=d),a.height||(i.height=v),xa.sanitizeMargins(i)}else{xa.supplyLayoutGlobalDefaults(a,i,h);var m=!a.width||!a.height,b=i.autosize,p=c.autosizable,k=m&&(b||p);k?xa.plotAutoSize(e,a,i):m&&xa.sanitizeMargins(i),!b&&m&&(a.width=i.width,a.height=i.height)}i._d3locale=Sat(h,i.separators),i._extraFormat=Gne(e,wat),i._initialAutoSizeIsDone=!0,i._dataLength=l.length,i._modules=[],i._visibleModules=[],i._basePlotModules=[];var M=i._subplots=Aat(),T=i._splomAxes={x:{},y:{}},L=i._splomSubplots={};i._splomGridDflt={},i._scatterStackOpts={},i._firstScatter={},i._alignmentOpts={},i._colorAxes={},i._requestRangeslider={},i._traceUids=Tat(o,l),xa.supplyDataDefaults(l,s,a,i);var x=Object.keys(T.x),C=Object.keys(T.y);if(x.length>1&&C.length>1){for(Xl.getComponentMethod("grid","sizeDefaults")(a,i),f=0;f15&&C.length>15&&i.shapes.length===0&&i.images.length===0,xa.linkSubplots(s,i,o,n),xa.cleanPlot(s,i,o,n);var z=!!(n._has&&n._has("cartesian")),q=!!(i._has&&i._has("cartesian")),U=z,G=q;U&&!G?n._bgLayer.remove():G&&!U&&(i._shouldCreateBgLayer=!0),n._zoomlayer&&!e._dragging&&gat({_fullLayout:n}),Mat(s,i),Vne(i,n),Xl.getComponentMethod("colorscale","crossTraceDefaults")(s,i),i._preGUI||(i._preGUI={}),i._tracePreGUI||(i._tracePreGUI={});var Z=i._tracePreGUI,j={},N;for(N in Z)j[N]="old";for(f=0;f0){var c=1-2*a;o=Math.round(c*o),s=Math.round(c*s)}}var f=xa.layoutAttributes.width.min,h=xa.layoutAttributes.height.min;o1,v=!r.height&&Math.abs(n.height-s)>1;(v||d)&&(d&&(n.width=o),v&&(n.height=s)),t._initialAutoSize||(t._initialAutoSize={width:o,height:s}),xa.sanitizeMargins(n)};xa.supplyLayoutModuleDefaults=function(e,t,r,n){var i=Xl.componentsRegistry,a=t._basePlotModules,o,s,l,u=Xl.subplotsRegistry.cartesian;for(o in i)l=i[o],l.includeBasePlot&&l.includeBasePlot(e,t);a.length||a.push(u),t._has("cartesian")&&(Xl.getComponentMethod("grid","contentDefaults")(e,t),u.finalizeSubplots(e,t));for(var c in t._subplots)t._subplots[c].sort(Ga.subplotSort);for(s=0;s1&&(r.l/=b,r.r/=b)}if(h){var p=(r.t+r.b)/h;p>1&&(r.t/=p,r.b/=p)}var k=r.xl!==void 0?r.xl:r.x,M=r.xr!==void 0?r.xr:r.x,T=r.yt!==void 0?r.yt:r.y,L=r.yb!==void 0?r.yb:r.y;d[t]={l:{val:k,size:r.l+m},r:{val:M,size:r.r+m},b:{val:L,size:r.b+m},t:{val:T,size:r.t+m}},v[t]=1}if(!n._replotting)return xa.doAutoMargin(e)}};function kat(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=Mp.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}xa.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,n=t.height;t._size||(t._size={}),Kne(t);var i=t._size,a=t.margin,o={t:0,b:0,l:0,r:0},s=Ga.extendFlat({},i),l=a.l,u=a.r,c=a.t,f=a.b,h=t._pushmargin,d=t._pushmarginIds,v=t.minreducedwidth,m=t.minreducedheight;if(a.autoexpand!==!1){for(var b in h)d[b]||delete h[b];var p=e._fullLayout._reservedMargin;for(var k in p)for(var M in p[k]){var T=p[k][M];o[M]=Math.max(o[M],T)}h.base={l:{val:0,size:l},r:{val:1,size:u},t:{val:1,size:c},b:{val:0,size:f}};for(var L in o){var x=0;for(var C in h)C!=="base"&&tM(h[C][L].size)&&(x=h[C][L].size>x?h[C][L].size:x);var S=Math.max(0,a[L]-x);o[L]=Math.max(0,o[L]-S)}for(var g in h){var P=h[g].l||{},E=h[g].b||{},z=P.val,q=P.size,U=E.val,G=E.size,Z=r-o.r-o.l,j=n-o.t-o.b;for(var N in h){if(tM(q)&&h[N].r){var H=h[N].r.val,re=h[N].r.size;if(H>z){var oe=(q*H+(re-Z)*z)/(H-z),_e=(re*(1-z)+(q-Z)*(1-H))/(H-z);oe+_e>l+u&&(l=oe,u=_e)}}if(tM(G)&&h[N].t){var ke=h[N].t.val,Ce=h[N].t.size;if(ke>U){var ge=(G*ke+(Ce-j)*U)/(ke-U),ie=(Ce*(1-U)+(G-j)*(1-ke))/(ke-U);ge+ie>f+c&&(f=ge,c=ie)}}}}}var Se=Ga.constrain(r-a.l-a.r,Jne,v),Ee=Ga.constrain(n-a.t-a.b,$ne,m),we=Math.max(0,r-Se),De=Math.max(0,n-Ee);if(we){var Le=(l+u)/we;Le>1&&(l/=Le,u/=Le)}if(De){var me=(f+c)/De;me>1&&(f/=me,c/=me)}if(i.l=Math.round(l)+o.l,i.r=Math.round(u)+o.r,i.t=Math.round(c)+o.t,i.b=Math.round(f)+o.b,i.p=Math.round(a.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!t._replotting&&(xa.didMarginChange(s,i)||kat(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var Pe=3*(1+Object.keys(d).length);if(t._redrawFromAutoMarginCount1)return!0}return!1};xa.graphJson=function(e,t,r,n,i,a){(i&&t&&!e._fullData||i&&!t&&!e._fullLayout)&&xa.supplyDefaults(e);var o=i?e._fullData:e.data,s=i?e._fullLayout:e.layout,l=(e._transitionData||{})._frames;function u(h,d){if(typeof h=="function")return d?"_function_":null;if(Ga.isPlainObject(h)){var v={},m;return Object.keys(h).sort().forEach(function(M){if(["_","["].indexOf(M.charAt(0))===-1){if(typeof h[M]=="function"){d&&(v[M]="_function");return}if(r==="keepdata"){if(M.slice(-3)==="src")return}else if(r==="keepstream"){if(m=h[M+"src"],typeof m=="string"&&m.indexOf(":")>0&&!Ga.isPlainObject(h.stream))return}else if(r!=="keepall"&&(m=h[M+"src"],typeof m=="string"&&m.indexOf(":")>0))return;v[M]=u(h[M],d)}}),v}var b=Array.isArray(h),p=Ga.isTypedArray(h);if((b||p)&&h.dtype&&h.shape){var k=h.bdata;return u({dtype:h.dtype,shape:h.shape,bdata:Ga.isArrayBuffer(k)?vat.encode(k):k},d)}return b?h.map(function(M){return u(M,d)}):p?Ga.simpleMap(h,Ga.identity):Ga.isJSDate(h)?Ga.ms2DateTimeLocal(+h):h}var c={data:(o||[]).map(function(h){var d=u(h);return t&&delete d.fit,d})};if(!t&&(c.layout=u(s),i)){var f=s._size;c.layout.computed={margin:{b:f.b,l:f.l,r:f.r,t:f.t}}}return l&&(c.frames=u(l)),a&&(c.config=u(e._context,!0)),n==="object"?c:JSON.stringify(c)};xa.modifyFrames=function(e,t){var r,n,i,a=e._transitionData._frames,o=e._transitionData._frameHash;for(r=0;r0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){n=!0}),r.redraw&&e._transitionData._interruptCallbacks.push(function(){return Xl.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var h=0,d=0;function v(){return h++,function(){d++,!n&&d===h&&s(f)}}r.runFn(v),setTimeout(v())})}function s(f){if(e._transitionData)return a(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return Xl.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(f)}function l(){if(e._transitionData)return e._transitioning=!1,i(e._transitionData._interruptCallbacks)}var u=[xa.previousPromises,l,r.prepareFn,xa.rehover,xa.reselect,o],c=Ga.syncOrAsync(u,e);return(!c||!c.then)&&(c=Promise.resolve()),c.then(function(){return e})}xa.doCalcdata=function(e,t){var r=Mp.list(e),n=e._fullData,i=e._fullLayout,a,o,s,l,u=new Array(n.length),c=(e.calcdata||[]).slice();for(e.calcdata=u,i._numBoxes=0,i._numViolins=0,i._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,i._piecolormap={},i._sunburstcolormap={},i._treemapcolormap={},i._iciclecolormap={},i._funnelareacolormap={},s=0;s=0;l--)if(L[l].enabled){a._indexToPoints=L[l]._indexToPoints;break}o&&o.calc&&(T=o.calc(e,a))}(!Array.isArray(T)||!T[0])&&(T=[{x:Une,y:Une}]),T[0].t||(T[0].t={}),T[0].trace=a,u[k]=T}}for(jne(r,n,i),s=0;s{"use strict";kb.xmlns="http://www.w3.org/2000/xmlns/";kb.svg="http://www.w3.org/2000/svg";kb.xlink="http://www.w3.org/1999/xlink";kb.svgAttrs={xmlns:kb.svg,"xmlns:xlink":kb.xlink}});var Dh=ye((Cnr,tae)=>{"use strict";tae.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}});var Zl=ye(b0=>{"use strict";var Fh=qa(),Ly=Pr(),Iat=Ly.strTranslate,_O=Wp(),Rat=Dh().LINE_SPACING,Dat=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;b0.convertToTspans=function(e,t,r){var n=e.text(),i=!e.attr("data-notex")&&t&&t._context.typesetMath&&typeof MathJax!="undefined"&&n.match(Dat),a=Fh.select(e.node().parentNode);if(a.empty())return;var o=e.attr("class")?e.attr("class").split(" ")[0]:"text";o+="-math",a.selectAll("svg."+o).remove(),a.selectAll("g."+o+"-group").remove(),e.style("display",null).attr({"data-unformatted":n,"data-math":"N"});function s(){a.empty()||(o=e.attr("class")+"-math",a.select("svg."+o).remove()),e.text("").style("white-space","pre");var l=Xat(e.node(),n);l&&e.style("pointer-events","all"),b0.positionText(e),r&&r.call(e)}return i?(t&&t._promises||[]).push(new Promise(function(l){e.style("display","none");var u=parseInt(e.node().style.fontSize,10),c={fontSize:u};Oat(i[2],c,function(f,h,d){a.selectAll("svg."+o).remove(),a.selectAll("g."+o+"-group").remove();var v=f&&f.select("svg");if(!v||!v.node()){s(),l();return}var m=a.append("g").classed(o+"-group",!0).attr({"pointer-events":"none","data-unformatted":n,"data-math":"Y"});m.node().appendChild(v.node()),h&&h.node()&&v.node().insertBefore(h.node().cloneNode(!0),v.node().firstChild);var b=d.width,p=d.height;v.attr({class:o,height:p,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var k=e.node().style.fill||"black",M=v.select("g");M.attr({fill:k,stroke:k});var T=M.node().getBoundingClientRect(),L=T.width,x=T.height;(L>b||x>p)&&(v.style("overflow","hidden"),T=v.node().getBoundingClientRect(),L=T.width,x=T.height);var C=+e.attr("x"),S=+e.attr("y"),g=u||e.node().getBoundingClientRect().height,P=-g/4;if(o[0]==="y")m.attr({transform:"rotate("+[-90,C,S]+")"+Iat(-L/2,P-x/2)});else if(o[0]==="l")S=P-x/2;else if(o[0]==="a"&&o.indexOf("atitle")!==0)C=0,S=P;else{var E=e.attr("text-anchor");C=C-L*(E==="middle"?.5:E==="end"?1:0),S=S+P-x/2}v.attr({x:C,y:S}),r&&r.call(e,m),l(m)})})):s(),e};var Fat=/(<|<|<)/g,zat=/(>|>|>)/g;function qat(e){return e.replace(Fat,"\\lt ").replace(zat,"\\gt ")}var rae=[["$","$"],["\\(","\\)"]];function Oat(e,t,r){var n=parseInt((MathJax.version||"").split(".")[0]);if(n!==2&&n!==3){Ly.warn("No MathJax version:",MathJax.version);return}var i,a,o,s,l=function(){return a=Ly.extendDeepAll({},MathJax.Hub.config),o=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:rae},displayAlign:"left"})},u=function(){a=Ly.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=rae},c=function(){if(i=MathJax.Hub.config.menuSettings.renderer,i!=="SVG")return MathJax.Hub.setRenderer("SVG")},f=function(){i=MathJax.config.startup.output,i!=="svg"&&(MathJax.config.startup.output="svg")},h=function(){var k="math-output-"+Ly.randstr({},64);s=Fh.select("body").append("div").attr({id:k}).style({visibility:"hidden",position:"absolute","font-size":t.fontSize+"px"}).text(qat(e));var M=s.node();return n===2?MathJax.Hub.Typeset(M):MathJax.typeset([M])},d=function(){var k=s.select(n===2?".MathJax_SVG":".MathJax"),M=!k.empty()&&s.select("svg").node();if(!M)Ly.log("There was an error in the tex syntax.",e),r();else{var T=M.getBoundingClientRect(),L;n===2?L=Fh.select("body").select("#MathJax_SVG_glyphs"):L=k.select("defs"),r(k,L,T)}s.remove()},v=function(){if(i!=="SVG")return MathJax.Hub.setRenderer(i)},m=function(){i!=="svg"&&(MathJax.config.startup.output=i)},b=function(){return o!==void 0&&(MathJax.Hub.processSectionDelay=o),MathJax.Hub.Config(a)},p=function(){MathJax.config=a};n===2?MathJax.Hub.Queue(l,c,h,d,v,b):n===3&&(u(),f(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){h(),d(),m(),p()}))}var oae={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},Bat={sub:"0.3em",sup:"-0.6em"},Nat={sub:"-0.21em",sup:"0.42em"},iae="\u200B",nae=["http:","https:","mailto:","",void 0,":"],sae=b0.NEWLINES=/(\r\n?|\n)/g,bO=/(<[^<>]*>)/,wO=/<(\/?)([^ >]*)(\s+(.*))?>/i,Uat=//i;b0.BR_TAG_ALL=//gi;var lae=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,uae=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,cae=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,Vat=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function Cb(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&oL(n)}var Gat=/(^|;)\s*color:/;b0.plainText=function(e,t){t=t||{};for(var r=t.len!==void 0&&t.len!==-1?t.len:1/0,n=t.allowedTags!==void 0?t.allowedTags:["br"],i="...",a=i.length,o=e.split(bO),s=[],l="",u=0,c=0;ca?s.push(f.slice(0,Math.max(0,m-a))+i):s.push(f.slice(0,m));break}l=""}}return s.join("")};var Hat={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},jat=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function oL(e){return e.replace(jat,function(t,r){var n;return r.charAt(0)==="#"?n=Wat(r.charAt(1)==="x"?parseInt(r.slice(2),16):parseInt(r.slice(1),10)):n=Hat[r],n||t})}b0.convertEntities=oL;function Wat(e){if(!(e>1114111)){var t=String.fromCodePoint;if(t)return t(e);var r=String.fromCharCode;return e<=65535?r(e):r((e>>10)+55232,e%1024+56320)}}function Xat(e,t){t=t.replace(sae," ");var r=!1,n=[],i,a=-1;function o(){a++;var x=document.createElementNS(_O.svg,"tspan");Fh.select(x).attr({class:"line",dy:a*Rat+"em"}),e.appendChild(x),i=x;var C=n;if(n=[{node:x}],C.length>1)for(var S=1;S.",t);return}var C=n.pop();x!==C.type&&Ly.log("Start tag <"+C.type+"> doesnt match end tag <"+x+">. Pretending it did match.",t),i=n[n.length-1].node}var c=Uat.test(t);c?o():(i=e,n=[{node:e}]);for(var f=t.split(bO),h=0;h{"use strict";var Zat=qa(),lL=fd(),iM=Eo(),sL=Pr(),hae=ka(),Yat=mb().isValid;function Kat(e,t,r){var n=t?sL.nestedProperty(e,t).get()||{}:e,i=n[r||"color"];i&&i._inputArray&&(i=i._inputArray);var a=!1;if(sL.isArrayOrTypedArray(i)){for(var o=0;o=0;n--,i++){var a=e[n];r[i]=[1-a[0],a[1]]}return r}function yae(e,t){t=t||{};for(var r=e.domain,n=e.range,i=n.length,a=new Array(i),o=0;o{"use strict";var xae=Hq(),$at=xae.FORMAT_LINK,Qat=xae.DATE_FORMAT_LINK;function eot(e,t){return{valType:"string",dflt:"",editType:"none",description:(t?TO:bae)("hover text",e)+["By default the values are formatted using "+(t?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}}function TO(e,t){return["Sets the "+e+" formatting rule"+(t?"for `"+t+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+$at+"."].join(" ")}function bae(e,t){return TO(e,t)+[" And for dates see: "+Qat+".","We add two items to d3's date formatter:","*%h* for half of the year as a decimal number as well as","*%{n}f* for fractional seconds","with n digits. For example, *2016-10-13 09:15:23.456* with tickformat","*%H~%M~%S.%2f* would display *09~15~23.46*"].join(" ")}wae.exports={axisHoverFormat:eot,descriptionOnlyNumbers:TO,descriptionWithDates:bae}});var Rd=ye((Dnr,Bae)=>{"use strict";var Tae=ec(),F3=Ih(),Oae=Pd().dash,SO=Ao().extendFlat,Aae=vl().templatedArray,Rnr=Ll().templateFormatStringDescription,Sae=df().descriptionWithDates,tot=fs().ONEDAY,mm=Rh(),rot=mm.HOUR_PATTERN,iot=mm.WEEKDAY_PATTERN,AO={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},not=SO({},AO,{values:AO.values.slice().concat(["sync"])});function Mae(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var Eae={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},kae={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},Cae={valType:"data_array",editType:"ticks"},Lae={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function Pae(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=5),t}function Iae(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var Rae={valType:"color",dflt:F3.defaultLine,editType:"ticks"},Dae={valType:"color",dflt:F3.lightLine,editType:"ticks"};function Fae(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var zae=SO({},Oae,{editType:"ticks"}),qae={valType:"boolean",editType:"ticks"};Bae.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:F3.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:Tae({editType:"ticks"}),standoff:{valType:"number",min:0,editType:"ticks"},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot"},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},modebardisable:{valType:"flaglist",flags:["autoscale","zoominout"],extras:["none"],dflt:"none",editType:"modebar"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[mm.idRegex.x.toString(),mm.idRegex.y.toString(),!1],editType:"plot"},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot"},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot"},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot"},matches:{valType:"enumerated",values:[mm.idRegex.x.toString(),mm.idRegex.y.toString()],editType:"calc"},rangebreaks:Aae("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc"},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},pattern:{valType:"enumerated",values:[iot,rot,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:tot},editType:"calc"}),tickmode:not,nticks:Mae(),tick0:Eae,dtick:kae,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:Cae,ticktext:{valType:"data_array",editType:"ticks"},ticks:Lae,tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks"},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks"},ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",editType:"calc"},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc"},ticklabelshift:{valType:"integer",dflt:0,editType:"ticks"},ticklabelstandoff:{valType:"integer",dflt:0,editType:"ticks"},ticklabelindex:{valType:"integer",arrayOk:!0,editType:"calc"},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle"},ticklen:Pae(),tickwidth:Iae(),tickcolor:Rae,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks"},labelalias:{valType:"any",dflt:!1,editType:"ticks"},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks"},showspikes:{valType:"boolean",dflt:!1,editType:"modebar"},spikecolor:{valType:"color",dflt:null,editType:"none"},spikethickness:{valType:"number",dflt:3,editType:"none"},spikedash:SO({},Oae,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none"},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none"},tickfont:Tae({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B","SI extended"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:Sae("tick label")},tickformatstops:Aae("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks"},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks"},value:{valType:"string",dflt:"",editType:"ticks"},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:Sae("hover text")},unifiedhovertitle:{text:{valType:"string",dflt:"",editType:"none"},editType:"none"},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:F3.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:qae,gridcolor:Dae,gridwidth:Fae(),griddash:zae,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:F3.defaultLine,editType:"ticks"},zerolinelayer:{valType:"enumerated",values:["above traces","below traces"],dflt:"below traces",editType:"plot"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:F3.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",mm.idRegex.x.toString(),mm.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",mm.idRegex.x.toString(),mm.idRegex.y.toString()],editType:"plot"},minor:{tickmode:AO,nticks:Mae("minor"),tick0:Eae,dtick:kae,tickvals:Cae,ticks:Lae,ticklen:Pae("minor"),tickwidth:Iae("minor"),tickcolor:Rae,gridcolor:Dae,gridwidth:Fae("minor"),griddash:zae,showgrid:qae,editType:"ticks"},minorloglabels:{valType:"enumerated",values:["small digits","complete","none"],dflt:"small digits",editType:"calc"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot"},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot"},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},autoshift:{valType:"boolean",dflt:!1,editType:"plot"},shift:{valType:"number",editType:"plot"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","geometric mean ascending","geometric mean descending","median ascending","median descending"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},uirevision:{valType:"any",editType:"none"},editType:"calc"}});var uL=ye((Fnr,Vae)=>{"use strict";var $c=Rd(),Nae=ec(),Uae=Ao().extendFlat,aot=mc().overrideAll;Vae.exports=aot({orientation:{valType:"enumerated",values:["h","v"],dflt:"v"},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels"},thickness:{valType:"number",min:0,dflt:30},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["left","center","right"]},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},ypad:{valType:"number",min:0,dflt:10},outlinecolor:$c.linecolor,outlinewidth:$c.linewidth,bordercolor:$c.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:$c.minor.tickmode,nticks:$c.nticks,tick0:$c.tick0,dtick:$c.dtick,tickvals:$c.tickvals,ticktext:$c.ticktext,ticks:Uae({},$c.ticks,{dflt:""}),ticklabeloverflow:Uae({},$c.ticklabeloverflow,{}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside"},ticklen:$c.ticklen,tickwidth:$c.tickwidth,tickcolor:$c.tickcolor,ticklabelstep:$c.ticklabelstep,showticklabels:$c.showticklabels,labelalias:$c.labelalias,tickfont:Nae({}),tickangle:$c.tickangle,tickformat:$c.tickformat,tickformatstops:$c.tickformatstops,tickprefix:$c.tickprefix,showtickprefix:$c.showtickprefix,ticksuffix:$c.ticksuffix,showticksuffix:$c.showticksuffix,separatethousands:$c.separatethousands,exponentformat:$c.exponentformat,minexponent:$c.minexponent,showexponent:$c.showexponent,title:{text:{valType:"string"},font:Nae({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")});var Tu=ye((qnr,Hae)=>{"use strict";var oot=uL(),sot=g3().counter,lot=t_(),Gae=mb().scales,znr=lot(Gae);function cL(e){return"`"+e+"`"}Hae.exports=function(t,r){t=t||"",r=r||{};var n=r.cLetter||"c",i="onlyIfNumerical"in r?r.onlyIfNumerical:!!t,a="noScale"in r?r.noScale:t==="marker.line",o="showScaleDflt"in r?r.showScaleDflt:n==="z",s=typeof r.colorscaleDflt=="string"?Gae[r.colorscaleDflt]:null,l=r.editTypeOverride||"",u=t?t+".":"",c,f;"colorAttr"in r?(c=r.colorAttr,f=r.colorAttr):(c={z:"z",c:"color"}[n],f="in "+cL(u+c));var h=i?" Has an effect only if "+f+" is set to a numerical array.":"",d=n+"auto",v=n+"min",m=n+"max",b=n+"mid",p=cL(u+d),k=cL(u+v),M=cL(u+m),T=k+" and "+M,L={};L[v]=L[m]=void 0;var x={};x[d]=!1;var C={};return c==="color"&&(C.color={valType:"color",arrayOk:!0,editType:l||"style"},r.anim&&(C.color.anim=!0)),C[d]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:L},C[v]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:x},C[m]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:x},C[b]={valType:"number",dflt:null,editType:"calc",impliedEdits:L},C.colorscale={valType:"colorscale",editType:"calc",dflt:s,impliedEdits:{autocolorscale:!1}},C.autocolorscale={valType:"boolean",dflt:r.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},C.reversescale={valType:"boolean",dflt:!1,editType:"plot"},a||(C.showscale={valType:"boolean",dflt:o,editType:"calc"},C.colorbar=oot),r.noColorAxis||(C.coloraxis={valType:"subplotid",regex:sot("coloraxis"),dflt:null,editType:"calc"}),C}});var EO=ye((Onr,jae)=>{"use strict";var uot=Ao().extendFlat,cot=Tu(),MO=mb().scales;jae.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:MO.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:MO.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:MO.RdBu,editType:"calc"}},coloraxis:uot({_isSubplotObj:!0,editType:"calc"},cot("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}});var kO=ye((Bnr,Wae)=>{"use strict";var fot=Pr();Wae.exports=function(t){return fot.isPlainObject(t.colorbar)}});var PO=ye(LO=>{"use strict";var CO=Eo(),Xae=Pr(),Zae=fs(),hot=Zae.ONEDAY,dot=Zae.ONEWEEK;LO.dtick=function(e,t){var r=t==="log",n=t==="date",i=t==="category",a=n?hot:1;if(!e)return a;if(CO(e))return e=Number(e),e<=0?a:i?Math.max(1,Math.round(e)):n?Math.max(.1,e):e;if(typeof e!="string"||!(n||r))return a;var o=e.charAt(0),s=e.slice(1);return s=CO(s)?Number(s):0,s<=0||!(n&&o==="M"&&s===Math.round(s)||r&&o==="L"||r&&o==="D"&&(s===1||s===2))?a:e};LO.tick0=function(e,t,r,n){if(t==="date")return Xae.cleanDate(e,Xae.dateTick0(r,n%dot===0?1:0));if(!(n==="D1"||n==="D2"))return CO(e)?Number(e):0}});var Lb=ye((Unr,Kae)=>{"use strict";var Yae=PO(),vot=Pr().isArrayOrTypedArray,pot=vv().isTypedArraySpec,got=vv().decodeTypedArraySpec;Kae.exports=function(t,r,n,i,a){a||(a={});var o=a.isMinor,s=o?t.minor||{}:t,l=o?r.minor:r,u=o?"minor.":"";function c(k){var M=s[k];return pot(M)&&(M=got(M)),M!==void 0?M:(l._template||{})[k]}var f=c("tick0"),h=c("dtick"),d=c("tickvals"),v=vot(d)?"array":h?"linear":"auto",m=n(u+"tickmode",v);if(m==="auto"||m==="sync")n(u+"nticks");else if(m==="linear"){var b=l.dtick=Yae.dtick(h,i);l.tick0=Yae.tick0(f,i,r.calendar,b)}else if(i!=="multicategory"){var p=n(u+"tickvals");p===void 0?l.tickmode="auto":o||n("ticktext")}}});var z3=ye((Vnr,$ae)=>{"use strict";var IO=Pr(),Jae=Rd();$ae.exports=function(t,r,n,i){var a=i.isMinor,o=a?t.minor||{}:t,s=a?r.minor:r,l=a?Jae.minor:Jae,u=a?"minor.":"",c=IO.coerce2(o,s,l,"ticklen",a?(r.ticklen||5)*.6:void 0),f=IO.coerce2(o,s,l,"tickwidth",a?r.tickwidth||1:void 0),h=IO.coerce2(o,s,l,"tickcolor",(a?r.tickcolor:void 0)||s.color),d=n(u+"ticks",!a&&i.outerTicks||c||f||h?"outside":"");d||(delete s.ticklen,delete s.tickwidth,delete s.tickcolor)}});var RO=ye((Gnr,Qae)=>{"use strict";Qae.exports=function(t){var r=["showexponent","showtickprefix","showticksuffix"],n=r.filter(function(a){return t[a]!==void 0}),i=function(a){return t[a]===t[n[0]]};if(n.every(i)||n.length===1)return t[n[0]]}});var Zd=ye((Hnr,eoe)=>{"use strict";var fL=Pr(),mot=vl();eoe.exports=function(t,r,n){var i=n.name,a=n.inclusionAttr||"visible",o=r[i],s=fL.isArrayOrTypedArray(t[i])?t[i]:[],l=r[i]=[],u=mot.arrayTemplater(r,i,a),c,f;for(c=0;c{"use strict";var DO=Pr(),yot=ka().contrast,toe=Rd(),_ot=RO(),xot=Zd();roe.exports=function(t,r,n,i,a){a||(a={});var o=n("labelalias");DO.isPlainObject(o)||delete r.labelalias;var s=_ot(t),l=n("showticklabels");if(l){a.noTicklabelshift||n("ticklabelshift"),a.noTicklabelstandoff||n("ticklabelstandoff");var u=a.font||{},c=r.color,f=r.ticklabelposition||"",h=f.indexOf("inside")!==-1?yot(a.bgColor):c&&c!==toe.color.dflt?c:u.color;if(DO.coerceFont(n,"tickfont",u,{overrideDflt:{color:h}}),!a.noTicklabelstep&&i!=="multicategory"&&i!=="log"&&n("ticklabelstep"),!a.noAng){var d=n("tickangle");!a.noAutotickangles&&d==="auto"&&n("autotickangles")}if(i!=="category"){var v=n("tickformat");xot(t,r,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:bot}),r.tickformatstops.length||delete r.tickformatstops,!a.noExp&&!v&&i!=="date"&&(n("showexponent",s),n("exponentformat"),n("minexponent"),n("separatethousands"))}!a.noMinorloglabels&&i==="log"&&n("minorloglabels")}};function bot(e,t){function r(i,a){return DO.coerce(e,t,toe.tickformatstops,i,a)}var n=r("enabled");n&&(r("dtickrange"),r("value"))}});var l_=ye((Wnr,ioe)=>{"use strict";var wot=RO();ioe.exports=function(t,r,n,i,a){a||(a={});var o=a.tickSuffixDflt,s=wot(t),l=n("tickprefix");l&&n("showtickprefix",s);var u=n("ticksuffix",o);u&&n("showticksuffix",s)}});var FO=ye((Xnr,noe)=>{"use strict";var u_=Pr(),Tot=vl(),Aot=Lb(),Sot=z3(),Mot=s_(),Eot=l_(),kot=uL();noe.exports=function(t,r,n){var i=Tot.newContainer(r,"colorbar"),a=t.colorbar||{};function o(E,z){return u_.coerce(a,i,kot,E,z)}var s=n.margin||{t:0,b:0,l:0,r:0},l=n.width-s.l-s.r,u=n.height-s.t-s.b,c=o("orientation"),f=c==="v",h=o("thicknessmode");o("thickness",h==="fraction"?30/(f?l:u):30);var d=o("lenmode");o("len",d==="fraction"?1:f?u:l);var v=o("yref"),m=o("xref"),b=v==="paper",p=m==="paper",k,M,T,L="left";f?(T="middle",L=p?"left":"right",k=p?1.02:1,M=.5):(T=b?"bottom":"top",L="center",k=.5,M=b?1.02:1),u_.coerce(a,i,{x:{valType:"number",min:p?-2:0,max:p?3:1,dflt:k}},"x"),u_.coerce(a,i,{y:{valType:"number",min:b?-2:0,max:b?3:1,dflt:M}},"y"),o("xanchor",L),o("xpad"),o("yanchor",T),o("ypad"),u_.noneOrAll(a,i,["x","y"]),o("outlinecolor"),o("outlinewidth"),o("bordercolor"),o("borderwidth"),o("bgcolor");var x=u_.coerce(a,i,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:f?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");o("ticklabeloverflow",x.indexOf("inside")!==-1?"hide past domain":"hide past div"),Aot(a,i,o,"linear");var C=n.font,S={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:C};x.indexOf("inside")!==-1&&(S.bgColor="black"),Eot(a,i,o,"linear",S),Mot(a,i,o,"linear",S),Sot(a,i,o,"linear",S),o("title.text",n._dfltTitle.colorbar);var g=i.showticklabels?i.tickfont:C,P=u_.extendFlat({},C,{family:g.family,size:u_.bigFont(g.size)});u_.coerceFont(o,"title.font",P),o("title.side",f?"top":"right")}});var td=ye((Znr,soe)=>{"use strict";var aoe=Eo(),qO=Pr(),Cot=kO(),Lot=FO(),ooe=mb().isValid,Pot=Oa().traceIs;function zO(e,t){var r=t.slice(0,t.length-1);return t?qO.nestedProperty(e,r).get()||{}:e}soe.exports=function e(t,r,n,i,a){var o=a.prefix,s=a.cLetter,l="_module"in r,u=zO(t,o),c=zO(r,o),f=zO(r._template||{},o)||{},h=function(){return delete t.coloraxis,delete r.coloraxis,e(t,r,n,i,a)};if(l){var d=n._colorAxes||{},v=i(o+"coloraxis");if(v){var m=Pot(r,"contour")&&qO.nestedProperty(r,"contours.coloring").get()||"heatmap",b=d[v];b?(b[2].push(h),b[0]!==m&&(b[0]=!1,qO.warn(["Ignoring coloraxis:",v,"setting","as it is linked to incompatible colorscales."].join(" ")))):d[v]=[m,r,[h]];return}}var p=u[s+"min"],k=u[s+"max"],M=aoe(p)&&aoe(k)&&p{"use strict";var loe=Pr(),Iot=vl(),uoe=EO(),Rot=td();coe.exports=function(t,r){function n(f,h){return loe.coerce(t,r,uoe,f,h)}n("colorscale.sequential"),n("colorscale.sequentialminus"),n("colorscale.diverging");var i=r._colorAxes,a,o;function s(f,h){return loe.coerce(a,o,uoe.coloraxis,f,h)}for(var l in i){var u=i[l];if(u[0])a=t[l]||{},o=Iot.newContainer(r,l,"coloraxis"),o._name=l,Rot(a,o,r,s,{prefix:"",cLetter:"c"});else{for(var c=0;c{"use strict";var Dot=Pr(),Fot=pv().hasColorscale,zot=pv().extractOpts;hoe.exports=function(t,r){function n(c,f){var h=c["_"+f];h!==void 0&&(c[f]=h)}function i(c,f){var h=f.container?Dot.nestedProperty(c,f.container).get():c;if(h)if(h.coloraxis)h._colorAx=r[h.coloraxis];else{var d=zot(h),v=d.auto;(v||d.min===void 0)&&n(h,f.min),(v||d.max===void 0)&&n(h,f.max),d.autocolorscale&&n(h,"colorscale")}}for(var a=0;a{"use strict";var voe=Eo(),OO=Pr(),qot=pv().extractOpts;poe.exports=function(t,r,n){var i=t._fullLayout,a=n.vals,o=n.containerStr,s=o?OO.nestedProperty(r,o).get():r,l=qot(s),u=l.auto!==!1,c=l.min,f=l.max,h=l.mid,d=function(){return OO.aggNums(Math.min,null,a)},v=function(){return OO.aggNums(Math.max,null,a)};if(c===void 0?c=d():u&&(s._colorAx&&voe(c)?c=Math.min(c,d()):c=d()),f===void 0?f=v():u&&(s._colorAx&&voe(f)?f=Math.max(f,v()):f=v()),u&&h!==void 0&&(f-h>h-c?c=h-(f-h):f-h=0?m=i.colorscale.sequential:m=i.colorscale.sequentialminus,l._sync("colorscale",m)}}});var tc=ye(($nr,goe)=>{"use strict";var hL=mb(),q3=pv();goe.exports={moduleType:"component",name:"colorscale",attributes:Tu(),layoutAttributes:EO(),supplyLayoutDefaults:foe(),handleDefaults:td(),crossTraceDefaults:doe(),calc:gv(),scales:hL.scales,defaultScale:hL.defaultScale,getScale:hL.get,isValidScale:hL.isValid,hasColorscale:q3.hasColorscale,extractOpts:q3.extractOpts,extractScale:q3.extractScale,flipScale:q3.flipScale,makeColorScaleFunc:q3.makeColorScaleFunc,makeColorScaleFuncFromTrace:q3.makeColorScaleFuncFromTrace}});var Ru=ye((Qnr,yoe)=>{"use strict";var moe=Pr(),Oot=vv().isTypedArraySpec;yoe.exports={hasLines:function(e){return e.visible&&e.mode&&e.mode.indexOf("lines")!==-1},hasMarkers:function(e){return e.visible&&(e.mode&&e.mode.indexOf("markers")!==-1||e.type==="splom")},hasText:function(e){return e.visible&&e.mode&&e.mode.indexOf("text")!==-1},isBubble:function(e){var t=e.marker;return moe.isPlainObject(t)&&(moe.isArrayOrTypedArray(t.size)||Oot(t.size))}}});var O3=ye((ear,_oe)=>{"use strict";var Bot=Eo();_oe.exports=function(t,r){r||(r=2);var n=t.marker,i=n.sizeref||1,a=n.sizemin||0,o=n.sizemode==="area"?function(s){return Math.sqrt(s/i)}:function(s){return s/i};return function(s){var l=o(s/r);return Bot(l)&&l>0?Math.max(l,a):0}}});var ip=ye(mv=>{"use strict";var dL=Pr();mv.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};mv.isTraceInSubplots=function(e,t){if(e.type==="splom"){for(var r=e.xaxes||[],n=e.yaxes||[],i=0;i=0&&r.index{woe.exports=Hot;var BO={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},Got=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function Hot(e){var t=[];return e.replace(Got,function(r,n,i){var a=n.toLowerCase();for(i=Wot(i),a=="m"&&i.length>2&&(t.push([n].concat(i.splice(0,2))),a="l",n=n=="m"?"l":"L");;){if(i.length==BO[a])return i.unshift(n),t.push(i);if(i.length{"use strict";var Xot=nM(),ca=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},hs="M0,0Z",Toe=Math.sqrt(2),c_=Math.sqrt(3),NO=Math.PI,UO=Math.cos,VO=Math.sin;koe.exports={circle:{n:0,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i="M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z";return r?vs(t,r,i):i}},square:{n:1,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")}},diamond:{n:2,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.3,2);return vs(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"Z")}},cross:{n:3,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.4,2),i=ca(e*1.2,2);return vs(t,r,"M"+i+","+n+"H"+n+"V"+i+"H-"+n+"V"+n+"H-"+i+"V-"+n+"H-"+n+"V-"+i+"H"+n+"V-"+n+"H"+i+"Z")}},x:{n:4,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.8/Toe,2),i="l"+n+","+n,a="l"+n+",-"+n,o="l-"+n+",-"+n,s="l-"+n+","+n;return vs(t,r,"M0,"+n+i+a+o+a+o+s+o+s+i+s+i+"Z")}},"triangle-up":{n:5,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2/c_,2),i=ca(e/2,2),a=ca(e,2);return vs(t,r,"M-"+n+","+i+"H"+n+"L0,-"+a+"Z")}},"triangle-down":{n:6,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2/c_,2),i=ca(e/2,2),a=ca(e,2);return vs(t,r,"M-"+n+",-"+i+"H"+n+"L0,"+a+"Z")}},"triangle-left":{n:7,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2/c_,2),i=ca(e/2,2),a=ca(e,2);return vs(t,r,"M"+i+",-"+n+"V"+n+"L-"+a+",0Z")}},"triangle-right":{n:8,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2/c_,2),i=ca(e/2,2),a=ca(e,2);return vs(t,r,"M-"+i+",-"+n+"V"+n+"L"+a+",0Z")}},"triangle-ne":{n:9,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.6,2),i=ca(e*1.2,2);return vs(t,r,"M-"+i+",-"+n+"H"+n+"V"+i+"Z")}},"triangle-se":{n:10,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.6,2),i=ca(e*1.2,2);return vs(t,r,"M"+n+",-"+i+"V"+n+"H-"+i+"Z")}},"triangle-sw":{n:11,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.6,2),i=ca(e*1.2,2);return vs(t,r,"M"+i+","+n+"H-"+n+"V-"+i+"Z")}},"triangle-nw":{n:12,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.6,2),i=ca(e*1.2,2);return vs(t,r,"M-"+n+","+i+"V-"+n+"H"+i+"Z")}},pentagon:{n:13,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.951,2),i=ca(e*.588,2),a=ca(-e,2),o=ca(e*-.309,2),s=ca(e*.809,2);return vs(t,r,"M"+n+","+o+"L"+i+","+s+"H-"+i+"L-"+n+","+o+"L0,"+a+"Z")}},hexagon:{n:14,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e/2,2),a=ca(e*c_/2,2);return vs(t,r,"M"+a+",-"+i+"V"+i+"L0,"+n+"L-"+a+","+i+"V-"+i+"L0,-"+n+"Z")}},hexagon2:{n:15,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e/2,2),a=ca(e*c_/2,2);return vs(t,r,"M-"+i+","+a+"H"+i+"L"+n+",0L"+i+",-"+a+"H-"+i+"L-"+n+",0Z")}},octagon:{n:16,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.924,2),i=ca(e*.383,2);return vs(t,r,"M-"+i+",-"+n+"H"+i+"L"+n+",-"+i+"V"+i+"L"+i+","+n+"H-"+i+"L-"+n+","+i+"V-"+i+"Z")}},star:{n:17,f:function(e,t,r){if(ds(t))return hs;var n=e*1.4,i=ca(n*.225,2),a=ca(n*.951,2),o=ca(n*.363,2),s=ca(n*.588,2),l=ca(-n,2),u=ca(n*-.309,2),c=ca(n*.118,2),f=ca(n*.809,2),h=ca(n*.382,2);return vs(t,r,"M"+i+","+u+"H"+a+"L"+o+","+c+"L"+s+","+f+"L0,"+h+"L-"+s+","+f+"L-"+o+","+c+"L-"+a+","+u+"H-"+i+"L0,"+l+"Z")}},hexagram:{n:18,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.66,2),i=ca(e*.38,2),a=ca(e*.76,2);return vs(t,r,"M-"+a+",0l-"+i+",-"+n+"h"+a+"l"+i+",-"+n+"l"+i+","+n+"h"+a+"l-"+i+","+n+"l"+i+","+n+"h-"+a+"l-"+i+","+n+"l-"+i+",-"+n+"h-"+a+"Z")}},"star-triangle-up":{n:19,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*c_*.8,2),i=ca(e*.8,2),a=ca(e*1.6,2),o=ca(e*4,2),s="A "+o+","+o+" 0 0 1 ";return vs(t,r,"M-"+n+","+i+s+n+","+i+s+"0,-"+a+s+"-"+n+","+i+"Z")}},"star-triangle-down":{n:20,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*c_*.8,2),i=ca(e*.8,2),a=ca(e*1.6,2),o=ca(e*4,2),s="A "+o+","+o+" 0 0 1 ";return vs(t,r,"M"+n+",-"+i+s+"-"+n+",-"+i+s+"0,"+a+s+n+",-"+i+"Z")}},"star-square":{n:21,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.1,2),i=ca(e*2,2),a="A "+i+","+i+" 0 0 1 ";return vs(t,r,"M-"+n+",-"+n+a+"-"+n+","+n+a+n+","+n+a+n+",-"+n+a+"-"+n+",-"+n+"Z")}},"star-diamond":{n:22,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.4,2),i=ca(e*1.9,2),a="A "+i+","+i+" 0 0 1 ";return vs(t,r,"M-"+n+",0"+a+"0,"+n+a+n+",0"+a+"0,-"+n+a+"-"+n+",0Z")}},"diamond-tall":{n:23,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*.7,2),i=ca(e*1.4,2);return vs(t,r,"M0,"+i+"L"+n+",0L0,-"+i+"L-"+n+",0Z")}},"diamond-wide":{n:24,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.4,2),i=ca(e*.7,2);return vs(t,r,"M0,"+i+"L"+n+",0L0,-"+i+"L-"+n+",0Z")}},hourglass:{n:25,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+","+n+"H-"+n+"L"+n+",-"+n+"H-"+n+"Z")},noDot:!0},bowtie:{n:26,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+","+n+"V-"+n+"L-"+n+","+n+"V-"+n+"Z")},noDot:!0},"circle-cross":{n:27,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e/Toe,2);return vs(t,r,"M"+i+","+i+"L-"+i+",-"+i+"M"+i+",-"+i+"L-"+i+","+i+"M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.3,2);return vs(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM0,-"+n+"V"+n+"M-"+n+",0H"+n)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.3,2),i=ca(e*.65,2);return vs(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM-"+i+",-"+i+"L"+i+","+i+"M-"+i+","+i+"L"+i+",-"+i)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.4,2);return vs(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.2,2),i=ca(e*.85,2);return vs(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+i+","+i+"L-"+i+",-"+i+"M"+i+",-"+i+"L-"+i+","+i)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e,t,r){if(ds(t))return hs;var n=ca(e/2,2),i=ca(e,2);return vs(t,r,"M"+n+","+i+"V-"+i+"M"+(n-i)+",-"+i+"V"+i+"M"+i+","+n+"H-"+i+"M-"+i+","+(n-i)+"H"+i)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.2,2),i=ca(e*1.6,2),a=ca(e*.8,2);return vs(t,r,"M-"+n+","+a+"L0,0M"+n+","+a+"L0,0M0,-"+i+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.2,2),i=ca(e*1.6,2),a=ca(e*.8,2);return vs(t,r,"M-"+n+",-"+a+"L0,0M"+n+",-"+a+"L0,0M0,"+i+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.2,2),i=ca(e*1.6,2),a=ca(e*.8,2);return vs(t,r,"M"+a+","+n+"L0,0M"+a+",-"+n+"L0,0M-"+i+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.2,2),i=ca(e*1.6,2),a=ca(e*.8,2);return vs(t,r,"M-"+a+","+n+"L0,0M-"+a+",-"+n+"L0,0M"+i+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.4,2);return vs(t,r,"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*1.4,2);return vs(t,r,"M0,"+n+"V-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2);return vs(t,r,"M"+n+","+n+"L-"+n+",-"+n)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e*2,2);return vs(t,r,"M0,0L-"+n+","+i+"H"+n+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e*2,2);return vs(t,r,"M0,0L-"+n+",-"+i+"H"+n+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2,2),i=ca(e,2);return vs(t,r,"M0,0L"+n+",-"+i+"V"+i+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2,2),i=ca(e,2);return vs(t,r,"M0,0L-"+n+",-"+i+"V"+i+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e*2,2);return vs(t,r,"M-"+n+",0H"+n+"M0,0L-"+n+","+i+"H"+n+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e,t,r){if(ds(t))return hs;var n=ca(e,2),i=ca(e*2,2);return vs(t,r,"M-"+n+",0H"+n+"M0,0L-"+n+",-"+i+"H"+n+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2,2),i=ca(e,2);return vs(t,r,"M0,-"+i+"V"+i+"M0,0L"+n+",-"+i+"V"+i+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e,t,r){if(ds(t))return hs;var n=ca(e*2,2),i=ca(e,2);return vs(t,r,"M0,-"+i+"V"+i+"M0,0L-"+n+",-"+i+"V"+i+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(e,t,r){if(ds(t))return hs;var n=NO/2.5,i=2*e*UO(n),a=2*e*VO(n);return vs(t,r,"M0,0L"+-i+","+a+"L"+i+","+a+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,t,r){if(ds(t))return hs;var n=NO/4,i=2*e*UO(n),a=2*e*VO(n);return vs(t,r,"M0,0L"+-i+","+a+"A "+2*e+","+2*e+" 0 0 1 "+i+","+a+"Z")},backoff:.4,noDot:!0}};function ds(e){return e===null}var Aoe,Soe,Moe,Eoe;function vs(e,t,r){if((!e||e%360===0)&&!t)return r;if(Moe===e&&Eoe===t&&Aoe===r)return Soe;Moe=e,Eoe=t,Aoe=r;function n(b,p){var k=UO(b),M=VO(b),T=p[0],L=p[1]+(t||0);return[T*k-L*M,T*M+L*k]}for(var i=e/180*NO,a=0,o=0,s=Xot(r),l="",u=0;u{"use strict";var dd=qa(),Du=Pr(),Zot=Du.numberFormat,Db=Eo(),ZO=fd(),pL=Oa(),Yd=ka(),Yot=tc(),oM=Du.strTranslate,gL=Zl(),Kot=Wp(),Jot=Dh(),$ot=Jot.LINE_SPACING,Boe=X1().DESELECTDIM,Qot=Ru(),est=O3(),tst=ip().appendArrayPointValue,Ta=Yoe.exports={};Ta.font=function(e,t){var r=t.variant,n=t.style,i=t.weight,a=t.color,o=t.size,s=t.family,l=t.shadow,u=t.lineposition,c=t.textcase;s&&e.style("font-family",s),o+1&&e.style("font-size",o+"px"),a&&e.call(Yd.fill,a),i&&e.style("font-weight",i),n&&e.style("font-style",n),r&&e.style("font-variant",r),c&&e.style("text-transform",GO(ist(c))),l&&e.style("text-shadow",l==="auto"?gL.makeTextShadow(Yd.contrast(a)):GO(l)),u&&e.style("text-decoration-line",GO(nst(u)))};function GO(e){return e==="none"?void 0:e}var rst={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function ist(e){return rst[e]}function nst(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}Ta.setPosition=function(e,t,r){e.attr("x",t).attr("y",r)};Ta.setSize=function(e,t,r){e.attr("width",t).attr("height",r)};Ta.setRect=function(e,t,r,n,i){e.call(Ta.setPosition,t,r).call(Ta.setSize,n,i)};Ta.translatePoint=function(e,t,r,n){var i=r.c2p(e.x),a=n.c2p(e.y);if(Db(i)&&Db(a)&&t.node())t.node().nodeName==="text"?t.attr("x",i).attr("y",a):t.attr("transform",oM(i,a));else return!1;return!0};Ta.translatePoints=function(e,t,r){e.each(function(n){var i=dd.select(this);Ta.translatePoint(n,i,t,r)})};Ta.hideOutsideRangePoint=function(e,t,r,n,i,a){t.attr("display",r.isPtWithinRange(e,i)&&n.isPtWithinRange(e,a)?null:"none")};Ta.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var r=t.xaxis,n=t.yaxis;e.each(function(i){var a=i[0].trace,o=a.xcalendar,s=a.ycalendar,l=pL.traceIs(a,"bar-like")?".bartext":".point,.textpoint";e.selectAll(l).each(function(u){Ta.hideOutsideRangePoint(u,dd.select(this),r,n,o,s)})})}};Ta.crispRound=function(e,t,r){return!t||!Db(t)?r||0:e._context.staticPlot?t:t<1?1:Math.round(t)};Ta.singleLineStyle=function(e,t,r,n,i){t.style("fill","none");var a=(((e||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,s=i||a.dash||"";Yd.stroke(t,n||a.color),Ta.dashLine(t,s,o)};Ta.lineGroupStyle=function(e,t,r,n){e.style("fill","none").each(function(i){var a=(((i||[])[0]||{}).trace||{}).line||{},o=t||a.width||0,s=n||a.dash||"";dd.select(this).call(Yd.stroke,r||a.color).call(Ta.dashLine,s,o)})};Ta.dashLine=function(e,t,r){r=+r||0,t=Ta.dashStyle(t,r),e.style({"stroke-dasharray":t,"stroke-width":r+"px"})};Ta.dashStyle=function(e,t){t=+t||1;var r=Math.max(t,3);return e==="solid"?e="":e==="dot"?e=r+"px,"+r+"px":e==="dash"?e=3*r+"px,"+3*r+"px":e==="longdash"?e=5*r+"px,"+5*r+"px":e==="dashdot"?e=3*r+"px,"+r+"px,"+r+"px,"+r+"px":e==="longdashdot"&&(e=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),e};function Noe(e,t,r,n){var i=t.fillpattern,a=t.fillgradient,o=Ta.getPatternAttr,s=i&&(o(i.shape,0,"")||o(i.path,0,""));if(s){var l=o(i.bgcolor,0,null),u=o(i.fgcolor,0,null),c=i.fgopacity,f=o(i.size,0,8),h=o(i.solidity,0,.3),d=t.uid;Ta.pattern(e,"point",r,d,s,f,h,void 0,i.fillmode,l,u,c)}else if(a&&a.type!=="none"){var v=a.type,m="scatterfill-"+t.uid;if(n&&(m="legendfill-"+t.uid),!n&&(a.start!==void 0||a.stop!==void 0)){var b,p;v==="horizontal"?(b={x:a.start,y:0},p={x:a.stop,y:0}):v==="vertical"&&(b={x:0,y:a.start},p={x:0,y:a.stop}),b.x=t._xA.c2p(b.x===void 0?t._extremes.x.min[0].val:b.x,!0),b.y=t._yA.c2p(b.y===void 0?t._extremes.y.min[0].val:b.y,!0),p.x=t._xA.c2p(p.x===void 0?t._extremes.x.max[0].val:p.x,!0),p.y=t._yA.c2p(p.y===void 0?t._extremes.y.max[0].val:p.y,!0),e.call(Goe,r,m,"linear",a.colorscale,"fill",b,p,!0,!1)}else v==="horizontal"&&(v=v+"reversed"),e.call(Ta.gradient,r,m,v,a.colorscale,"fill")}else t.fillcolor&&e.call(Yd.fill,t.fillcolor)}Ta.singleFillStyle=function(e,t){var r=dd.select(e.node()),n=r.data(),i=((n[0]||[])[0]||{}).trace||{};Noe(e,i,t,!1)};Ta.fillGroupStyle=function(e,t,r){e.style("stroke-width",0).each(function(n){var i=dd.select(this);n[0].trace&&Noe(i,n[0].trace,t,r)})};var Loe=Coe();Ta.symbolNames=[];Ta.symbolFuncs=[];Ta.symbolBackOffs=[];Ta.symbolNeedLines={};Ta.symbolNoDot={};Ta.symbolNoFill={};Ta.symbolList=[];Object.keys(Loe).forEach(function(e){var t=Loe[e],r=t.n;Ta.symbolList.push(r,String(r),e,r+100,String(r+100),e+"-open"),Ta.symbolNames[r]=e,Ta.symbolFuncs[r]=t.f,Ta.symbolBackOffs[r]=t.backoff||0,t.needLine&&(Ta.symbolNeedLines[r]=!0),t.noDot?Ta.symbolNoDot[r]=!0:Ta.symbolList.push(r+200,String(r+200),e+"-dot",r+300,String(r+300),e+"-open-dot"),t.noFill&&(Ta.symbolNoFill[r]=!0)});var ast=Ta.symbolNames.length,ost="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";Ta.symbolNumber=function(e){if(Db(e))e=+e;else if(typeof e=="string"){var t=0;e.indexOf("-open")>0&&(t=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(t+=200,e=e.replace("-dot","")),e=Ta.symbolNames.indexOf(e),e>=0&&(e+=t)}return e%100>=ast||e>=400?0:Math.floor(Math.max(e,0))};function Uoe(e,t,r,n){var i=e%100;return Ta.symbolFuncs[i](t,r,n)+(e>=200?ost:"")}var Poe=Zot("~f"),Voe={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};Ta.gradient=function(e,t,r,n,i,a){var o=Voe[n];return Goe(e,t,r,o.type,i,a,o.start,o.stop,!1,o.reversed)};function Goe(e,t,r,n,i,a,o,s,l,u){var c=i.length,f;n==="linear"?f={node:"linearGradient",attrs:{x1:o.x,y1:o.y,x2:s.x,y2:s.y,gradientUnits:l?"userSpaceOnUse":"objectBoundingBox"},reversed:u}:n==="radial"&&(f={node:"radialGradient",reversed:u});for(var h=new Array(c),d=0;d=0&&e.i===void 0&&(e.i=a.i),t.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(e):e.mo===void 0?o.opacity:e.mo),n.ms2mrc){var l;e.ms==="various"||o.size==="various"?l=3:l=n.ms2mrc(e.ms),e.mrc=l,n.selectedSizeFn&&(l=e.mrc=n.selectedSizeFn(e));var u=Ta.symbolNumber(e.mx||o.symbol)||0;e.om=u%200>=100;var c=JO(e,r),f=KO(e,r);t.attr("d",Uoe(u,l,c,f))}var h=!1,d,v,m;if(e.so)m=s.outlierwidth,v=s.outliercolor,d=o.outliercolor;else{var b=(s||{}).width;m=(e.mlw+1||b+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in e?v=e.mlcc=n.lineScale(e.mlc):Du.isArrayOrTypedArray(s.color)?v=Yd.defaultLine:v=s.color,Du.isArrayOrTypedArray(o.color)&&(d=Yd.defaultLine,h=!0),"mc"in e?d=e.mcc=n.markerScale(e.mc):d=o.color||o.colors||"rgba(0,0,0,0)",n.selectedColorFn&&(d=n.selectedColorFn(e))}let p=e.mld||(s||{}).dash;if(p&&Ta.dashLine(t,p,m),e.om)t.call(Yd.stroke,d).style({"stroke-width":(m||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:m)+"px");var k=o.gradient,M=e.mgt;M?h=!0:M=k&&k.type,Du.isArrayOrTypedArray(M)&&(M=M[0],Voe[M]||(M=0));var T=o.pattern,L=Ta.getPatternAttr,x=T&&(L(T.shape,e.i,"")||L(T.path,e.i,""));if(M&&M!=="none"){var C=e.mgc;C?h=!0:C=k.color;var S=r.uid;h&&(S+="-"+e.i),Ta.gradient(t,i,S,M,[[0,C],[1,d]],"fill")}else if(x){var g=!1,P=T.fgcolor;!P&&a&&a.color&&(P=a.color,g=!0);var E=L(P,e.i,a&&a.color||null),z=L(T.bgcolor,e.i,null),q=T.fgopacity,U=L(T.size,e.i,8),G=L(T.solidity,e.i,.3);g=g||e.mcc||Du.isArrayOrTypedArray(T.shape)||Du.isArrayOrTypedArray(T.path)||Du.isArrayOrTypedArray(T.bgcolor)||Du.isArrayOrTypedArray(T.fgcolor)||Du.isArrayOrTypedArray(T.size)||Du.isArrayOrTypedArray(T.solidity);var Z=r.uid;g&&(Z+="-"+e.i),Ta.pattern(t,"point",i,Z,x,U,G,e.mcc,T.fillmode,z,E,q)}else Du.isArrayOrTypedArray(d)?Yd.fill(t,d[e.i]):Yd.fill(t,d);m&&Yd.stroke(t,v)}};Ta.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=Ta.tryColorscale(r,""),t.lineScale=Ta.tryColorscale(r,"line"),pL.traceIs(e,"symbols")&&(t.ms2mrc=Qot.isBubble(e)?est(e):function(){return(r.size||6)/2}),e.selectedpoints&&Du.extendFlat(t,Ta.makeSelectedPointStyleFns(e)),t};Ta.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},i=e.marker||{},a=r.marker||{},o=n.marker||{},s=i.opacity,l=a.opacity,u=o.opacity,c=l!==void 0,f=u!==void 0;(Du.isArrayOrTypedArray(s)||c||f)&&(t.selectedOpacityFn=function(T){var L=T.mo===void 0?i.opacity:T.mo;return T.selected?c?l:L:f?u:Boe*L});var h=i.color,d=a.color,v=o.color;(d||v)&&(t.selectedColorFn=function(T){var L=T.mcc||h;return T.selected?d||L:v||L});var m=i.size,b=a.size,p=o.size,k=b!==void 0,M=p!==void 0;return pL.traceIs(e,"symbols")&&(k||M)&&(t.selectedSizeFn=function(T){var L=T.mrc||m/2;return T.selected?k?b/2:L:M?p/2:L}),t};Ta.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},i=e.textfont||{},a=r.textfont||{},o=n.textfont||{},s=i.color,l=a.color,u=o.color;return t.selectedTextColorFn=function(c){var f=c.tc||s;return c.selected?l||f:u||(l?f:Yd.addOpacity(f,Boe))},t};Ta.selectedPointStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=Ta.makeSelectedPointStyleFns(t),n=t.marker||{},i=[];r.selectedOpacityFn&&i.push(function(a,o){a.style("opacity",r.selectedOpacityFn(o))}),r.selectedColorFn&&i.push(function(a,o){Yd.fill(a,r.selectedColorFn(o))}),r.selectedSizeFn&&i.push(function(a,o){var s=o.mx||n.symbol||0,l=r.selectedSizeFn(o);a.attr("d",Uoe(Ta.symbolNumber(s),l,JO(o,t),KO(o,t))),o.mrc2=l}),i.length&&e.each(function(a){for(var o=dd.select(this),s=0;s0?r:0}Ta.textPointStyle=function(e,t,r){if(e.size()){var n;if(t.selectedpoints){var i=Ta.makeSelectedTextStyleFns(t);n=i.selectedTextColorFn}var a=t.texttemplate,o=r._fullLayout;e.each(function(s){var l=dd.select(this),u=a?Du.extractOption(s,t,"txt","texttemplate"):Du.extractOption(s,t,"tx","text");if(!u&&u!==0){l.remove();return}if(a){var c=t._module.formatLabels,f=c?c(s,t,o):{},h={};tst(h,t,s.i),u=Du.texttemplateString({data:[h,s,t._meta],fallback:t.texttemplatefallback,labels:f,locale:o._d3locale,template:u})}var d=s.tp||t.textposition,v=joe(s,t),m=n?n(s):s.tc||t.textfont.color;l.call(Ta.font,{family:s.tf||t.textfont.family,weight:s.tw||t.textfont.weight,style:s.ty||t.textfont.style,variant:s.tv||t.textfont.variant,textcase:s.tC||t.textfont.textcase,lineposition:s.tE||t.textfont.lineposition,shadow:s.tS||t.textfont.shadow,size:v,color:m}).text(u).call(gL.convertToTspans,r).call(Hoe,d,v,s.mrc)})}};Ta.selectedTextStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=Ta.makeSelectedTextStyleFns(t);e.each(function(n){var i=dd.select(this),a=r.selectedTextColorFn(n),o=n.tp||t.textposition,s=joe(n,t);Yd.fill(i,a);var l=pL.traceIs(t,"bar-like");Hoe(i,o,s,n.mrc2||n.mrc,l)})}};var Ioe=.5;Ta.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r="M"+e[0],n=[],i;for(i=1;i=l||T>=c&&T<=l)&&(L<=f&&L>=u||L>=f&&L<=u)&&(e=[T,L])}return e}Ta.applyBackoff=Zoe;Ta.makeTester=function(){var e=Du.ensureSingleById(dd.select("body"),"svg","js-plotly-tester",function(r){r.attr(Kot.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),t=Du.ensureSingle(e,"path","js-reference-point",function(r){r.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});Ta.tester=e,Ta.testref=t};Ta.savedBBoxes={};var jO=0,ust=1e4;Ta.bBox=function(e,t,r){r||(r=Roe(e));var n;if(r){if(n=Ta.savedBBoxes[r],n)return Du.extendFlat({},n)}else if(e.childNodes.length===1){var i=e.childNodes[0];if(r=Roe(i),r){var a=+i.getAttribute("x")||0,o=+i.getAttribute("y")||0,s=i.getAttribute("transform");if(!s){var l=Ta.bBox(i,!1,r);return a&&(l.left+=a,l.right+=a),o&&(l.top+=o,l.bottom+=o),l}if(r+="~"+a+"~"+o+"~"+s,n=Ta.savedBBoxes[r],n)return Du.extendFlat({},n)}}var u,c;t?u=e:(c=Ta.tester.node(),u=e.cloneNode(!0),c.appendChild(u)),dd.select(u).attr("transform",null).call(gL.positionText,0,0);var f=u.getBoundingClientRect(),h=Ta.testref.node().getBoundingClientRect();t||c.removeChild(u);var d={height:f.height,width:f.width,left:f.left-h.left,top:f.top-h.top,right:f.right-h.left,bottom:f.bottom-h.top};return jO>=ust&&(Ta.savedBBoxes={},jO=0),r&&(Ta.savedBBoxes[r]=d),jO++,Du.extendFlat({},d)};function Roe(e){var t=e.getAttribute("data-unformatted");if(t!==null)return t+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}Ta.setClipUrl=function(e,t,r){e.attr("clip-path",YO(t,r))};function YO(e,t){if(!e)return null;var r=t._context,n=r._exportedPlot?"":r._baseUrl||"";return n?"url('"+n+"#"+e+"')":"url(#"+e+")"}Ta.getTranslate=function(e){var t=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,r=e.attr?"attr":"getAttribute",n=e[r]("transform")||"",i=n.replace(t,function(a,o,s){return[o,s].join(" ")}).split(" ");return{x:+i[0]||0,y:+i[1]||0}};Ta.setTranslate=function(e,t,r){var n=/(\btranslate\(.*?\);?)/,i=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",o=e[i]("transform")||"";return t=t||0,r=r||0,o=o.replace(n,"").trim(),o+=oM(t,r),o=o.trim(),e[a]("transform",o),o};Ta.getScale=function(e){var t=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,r=e.attr?"attr":"getAttribute",n=e[r]("transform")||"",i=n.replace(t,function(a,o,s){return[o,s].join(" ")}).split(" ");return{x:+i[0]||1,y:+i[1]||1}};Ta.setScale=function(e,t,r){var n=/(\bscale\(.*?\);?)/,i=e.attr?"attr":"getAttribute",a=e.attr?"attr":"setAttribute",o=e[i]("transform")||"";return t=t||1,r=r||1,o=o.replace(n,"").trim(),o+="scale("+t+","+r+")",o=o.trim(),e[a]("transform",o),o};var cst=/\s*sc.*/;Ta.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,!!e){var n=t===1&&r===1?"":"scale("+t+","+r+")";e.each(function(){var i=(this.getAttribute("transform")||"").replace(cst,"");i+=n,i=i.trim(),this.setAttribute("transform",i)})}};var fst=/translate\([^)]*\)\s*$/;Ta.setTextPointsScale=function(e,t,r){e&&e.each(function(){var n,i=dd.select(this),a=i.select("text");if(a.node()){var o=parseFloat(a.attr("x")||0),s=parseFloat(a.attr("y")||0),l=(i.attr("transform")||"").match(fst);t===1&&r===1?n=[]:n=[oM(o,s),"scale("+t+","+r+")",oM(-o,-s)],l&&n.push(l),i.attr("transform",n.join(""))}})};function KO(e,t){var r;return e&&(r=e.mf),r===void 0&&(r=t.marker&&t.marker.standoff||0),!t._geo&&!t._xA?-r:r}Ta.getMarkerStandoff=KO;var aM=Math.atan2,Pb=Math.cos,N3=Math.sin;function Doe(e,t){var r=t[0],n=t[1];return[r*Pb(e)-n*N3(e),r*N3(e)+n*Pb(e)]}var Foe,zoe,qoe,Ooe,WO,XO;function JO(e,t){var r=e.ma;r===void 0&&(r=t.marker.angle,(!r||Du.isArrayOrTypedArray(r))&&(r=0));var n,i,a=t.marker.angleref;if(a==="previous"||a==="north"){if(t._geo){var o=t._geo.project(e.lonlat);n=o[0],i=o[1]}else{var s=t._xA,l=t._yA;if(s&&l)n=s.c2p(e.x),i=l.c2p(e.y);else return 90}if(t._geo){var u=e.lonlat[0],c=e.lonlat[1],f=t._geo.project([u,c+1e-5]),h=t._geo.project([u+1e-5,c]),d=aM(h[1]-i,h[0]-n),v=aM(f[1]-i,f[0]-n),m;if(a==="north")m=r/180*Math.PI;else if(a==="previous"){var b=u/180*Math.PI,p=c/180*Math.PI,k=Foe/180*Math.PI,M=zoe/180*Math.PI,T=k-b,L=Pb(M)*N3(T),x=N3(M)*Pb(p)-Pb(M)*N3(p)*Pb(T);m=-aM(L,x)-Math.PI,Foe=u,zoe=c}var C=Doe(d,[Pb(m),0]),S=Doe(v,[N3(m),0]);r=aM(C[1]+S[1],C[0]+S[0])/Math.PI*180,a==="previous"&&!(XO===t.uid&&e.i===WO+1)&&(r=null)}if(a==="previous"&&!t._geo)if(XO===t.uid&&e.i===WO+1&&Db(n)&&Db(i)){var g=n-qoe,P=i-Ooe,E=t.line&&t.line.shape||"",z=E.slice(E.length-1);z==="h"&&(P=0),z==="v"&&(g=0),r+=aM(P,g)/Math.PI*180+90}else r=null}return qoe=n,Ooe=i,WO=e.i,XO=t.uid,r}Ta.getMarkerAngle=JO});var zb=ye((aar,Qoe)=>{"use strict";var U3=qa(),hst=Eo(),dst=Mc(),$O=Oa(),Fb=Pr(),Koe=Fb.strTranslate,mL=So(),yL=ka(),V3=Zl(),Joe=X1(),vst=Dh().OPPOSITE_SIDE,$oe=/ [XY][0-9]* /,QO=1.6,eB=1.6;function pst(e,t,r){var n=e._fullLayout,i=r.propContainer,a=r.propName,o=r.placeholder,s=r.traceIndex,l=r.avoid||{},u=r.attributes,c=r.transform,f=r.containerGroup,h=1,d=i.title,v=(d&&d.text?d.text:"").trim(),m=!1,b=d&&d.font?d.font:{},p=b.family,k=b.size,M=b.color,T=b.weight,L=b.style,x=b.variant,C=b.textcase,S=b.lineposition,g=b.shadow,P=r.subtitlePropName,E=!!P,z=r.subtitlePlaceholder,q=(i.title||{}).subtitle||{text:"",font:{}},U=(q.text||"").trim(),G=!1,Z=1,j=q.font,N=j.family,H=j.size,re=j.color,oe=j.weight,_e=j.style,ke=j.variant,Ce=j.textcase,ge=j.lineposition,ie=j.shadow,Se;a==="title.text"?Se="titleText":a.indexOf("axis")!==-1?Se="axisTitleText":a.indexOf("colorbar")!==-1&&(Se="colorbarTitleText");var Ee=e._context.edits[Se];function we(Ht,nr){return Ht===void 0||nr===void 0?!1:Ht.replace($oe," % ")===nr.replace($oe," % ")}v===""?h=0:we(v,o)&&(Ee||(v=""),h=.2,m=!0),E&&(U===""?Z=0:we(U,z)&&(Ee||(U=""),Z=.2,G=!0)),r._meta?v=Fb.templateString(v,r._meta):n._meta&&(v=Fb.templateString(v,n._meta));var De=v||U||Ee,Le;f||(f=Fb.ensureSingle(n._infolayer,"g","g-"+t),Le=n._hColorbarMoveTitle);var me=f.selectAll("text."+t).data(De?[0]:[]);me.enter().append("text"),me.text(v).attr("class",t),me.exit().remove();var Pe=null,ce=t+"-subtitle",He=U||Ee;if(E&&(Pe=f.selectAll("text."+ce).data(He?[0]:[]),Pe.enter().append("text"),Pe.text(U).attr("class",ce),Pe.exit().remove()),!De)return f;function lt(Ht,nr){Fb.syncOrAsync([mt,Vt],{title:Ht,subtitle:nr})}function mt(Ht){var nr=Ht.title,tt=Ht.subtitle,je;!c&&Le&&(c={}),c?(je="",c.rotate&&(je+="rotate("+[c.rotate,u.x,u.y]+")"),(c.offset||Le)&&(je+=Koe(0,(c.offset||0)-(Le||0)))):je=null,nr.attr("transform",je);function Ue(Et){if(Et){var pt=U3.select(Et.node().parentNode).select("."+ce);if(!pt.empty()){var Xt=Et.node().getBBox();if(Xt.height){var or=Xt.y+Xt.height+QO*H;pt.attr("y",or)}}}}if(nr.style("opacity",h*yL.opacity(M)).call(mL.font,{color:yL.rgb(M),size:U3.round(k,2),family:p,weight:T,style:L,variant:x,textcase:C,shadow:g,lineposition:S}).attr(u).call(V3.convertToTspans,e,Ue),tt&&!tt.empty()){var Ae=f.select("."+t+"-math-group"),rt=nr.node().getBBox(),St=Ae.node()?Ae.node().getBBox():void 0,Tt=St?St.y+St.height+QO*H:rt.y+rt.height+eB*H,dt=Fb.extendFlat({},u,{y:Tt});tt.attr("transform",je),tt.style("opacity",Z*yL.opacity(re)).call(mL.font,{color:yL.rgb(re),size:U3.round(H,2),family:N,weight:oe,style:_e,variant:ke,textcase:Ce,shadow:ie,lineposition:ge}).attr(dt).call(V3.convertToTspans,e)}return dst.previousPromises(e)}function Vt(Ht){var nr=Ht.title,tt=U3.select(nr.node().parentNode);if(l&&l.selection&&l.side&&v){tt.attr("transform",null);var je=vst[l.side],Ue=l.side==="left"||l.side==="top"?-1:1,Ae=hst(l.pad)?l.pad:2,rt=mL.bBox(tt.node()),St={t:0,b:0,l:0,r:0},Tt=e._fullLayout._reservedMargin;for(var dt in Tt)for(var Et in Tt[dt]){var pt=Tt[dt][Et];St[Et]=Math.max(St[Et],pt)}var Xt={left:St.l,top:St.t,right:n.width-St.r,bottom:n.height-St.b},or=l.maxShift||Ue*(Xt[l.side]-rt[l.side]),_r=0;if(or<0)_r=or;else{var Er=l.offsetLeft||0,ei=l.offsetTop||0;rt.left-=Er,rt.right-=Er,rt.top-=ei,rt.bottom-=ei,l.selection.each(function(){var jr=mL.bBox(this);Fb.bBoxIntersect(rt,jr,Ae)&&(_r=Math.max(_r,Ue*(jr[l.side]-rt[je])+Ae))}),_r=Math.min(or,_r),i._titleScoot=Math.abs(_r)}if(_r>0||or<0){var qr={left:[-_r,0],right:[_r,0],top:[0,-_r],bottom:[0,_r]}[l.side];tt.attr("transform",Koe(qr[0],qr[1]))}}}me.call(lt,Pe);function st(Ht,nr){Ht.text(nr).on("mouseover.opacity",function(){U3.select(this).transition().duration(Joe.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){U3.select(this).transition().duration(Joe.HIDE_PLACEHOLDER).style("opacity",0)})}if(Ee&&(v?me.on(".opacity",null):(st(me,o),m=!0),me.call(V3.makeEditable,{gd:e}).on("edit",function(Ht){s!==void 0?$O.call("_guiRestyle",e,a,Ht,s):$O.call("_guiRelayout",e,a,Ht)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(lt)}).on("input",function(Ht){this.text(Ht||" ").call(V3.positionText,u.x,u.y)}),E)){if(E&&!v){var ct=me.node().getBBox(),Qt=ct.y+ct.height+eB*H;Pe.attr("y",Qt)}U?Pe.on(".opacity",null):(st(Pe,z),G=!0),Pe.call(V3.makeEditable,{gd:e}).on("edit",function(Ht){$O.call("_guiRelayout",e,"title.subtitle.text",Ht)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(lt)}).on("input",function(Ht){this.text(Ht||" ").call(V3.positionText,Pe.attr("x"),Pe.attr("y"))})}return me.classed("js-placeholder",m),Pe&&!Pe.empty()&&Pe.classed("js-placeholder",G),f}Qoe.exports={draw:pst,SUBTITLE_PADDING_EM:eB,SUBTITLE_PADDING_MATHJAX_EM:QO}});var xm=ye((oar,nse)=>{"use strict";var gst=qa(),mst=h3().utcFormat,yc=Pr(),yst=yc.numberFormat,ym=Eo(),f_=yc.cleanNumber,_st=yc.ms2DateTime,ese=yc.dateTime2ms,_m=yc.ensureNumber,tse=yc.isArrayOrTypedArray,h_=fs(),_L=h_.FP_SAFE,Sg=h_.BADNUM,xst=h_.LOG_CLIP,bst=h_.ONEWEEK,xL=h_.ONEDAY,bL=h_.ONEHOUR,rse=h_.ONEMIN,ise=h_.ONESEC,wL=hf(),SL=Rh(),TL=SL.HOUR_PATTERN,AL=SL.WEEKDAY_PATTERN;function sM(e){return Math.pow(10,e)}function tB(e){return e!=null}nse.exports=function(t,r){r=r||{};var n=t._id||"x",i=n.charAt(0);function a(T,L){if(T>0)return Math.log(T)/Math.LN10;if(T<=0&&L&&t.range&&t.range.length===2){var x=t.range[0],C=t.range[1];return .5*(x+C-2*xst*Math.abs(x-C))}else return Sg}function o(T,L,x,C){if((C||{}).msUTC&&ym(T))return+T;var S=ese(T,x||t.calendar);if(S===Sg)if(ym(T)){T=+T;var g=Math.floor(yc.mod(T+.05,1)*10),P=Math.round(T-g/10);S=ese(new Date(P))+g/10}else return Sg;return S}function s(T,L,x){return _st(T,L,x||t.calendar)}function l(T){return t._categories[Math.round(T)]}function u(T){if(tB(T)){if(t._categoriesMap===void 0&&(t._categoriesMap={}),t._categoriesMap[T]!==void 0)return t._categoriesMap[T];t._categories.push(typeof T=="number"?String(T):T);var L=t._categories.length-1;return t._categoriesMap[T]=L,L}return Sg}function c(T,L){for(var x=new Array(L),C=0;Ct.range[1]&&(x=!x);for(var C=x?-1:1,S=C*T,g=0,P=0;Pz)g=P+1;else{g=S<(E+z)/2?P:P+1;break}}var q=t._B[g]||0;return isFinite(q)?v(T,t._m2,q):0},p=function(T){var L=t._rangebreaks.length;if(!L)return m(T,t._m,t._b);for(var x=0,C=0;Ct._rangebreaks[C].pmax&&(x=C+1);return m(T,t._m2,t._B[x])}}t.c2l=t.type==="log"?a:_m,t.l2c=t.type==="log"?sM:_m,t.l2p=b,t.p2l=p,t.c2p=t.type==="log"?function(T,L){return b(a(T,L))}:b,t.p2c=t.type==="log"?function(T){return sM(p(T))}:p,["linear","-"].indexOf(t.type)!==-1?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=f_,t.c2d=t.c2r=t.l2d=t.l2r=_m,t.d2p=t.r2p=function(T){return t.l2p(f_(T))},t.p2d=t.p2r=p,t.cleanPos=_m):t.type==="log"?(t.d2r=t.d2l=function(T,L){return a(f_(T),L)},t.r2d=t.r2c=function(T){return sM(f_(T))},t.d2c=t.r2l=f_,t.c2d=t.l2r=_m,t.c2r=a,t.l2d=sM,t.d2p=function(T,L){return t.l2p(t.d2r(T,L))},t.p2d=function(T){return sM(p(T))},t.r2p=function(T){return t.l2p(f_(T))},t.p2r=p,t.cleanPos=_m):t.type==="date"?(t.d2r=t.r2d=yc.identity,t.d2c=t.r2c=t.d2l=t.r2l=o,t.c2d=t.c2r=t.l2d=t.l2r=s,t.d2p=t.r2p=function(T,L,x){return t.l2p(o(T,0,x))},t.p2d=t.p2r=function(T,L,x){return s(p(T),L,x)},t.cleanPos=function(T){return yc.cleanDate(T,Sg,t.calendar)}):t.type==="category"?(t.d2c=t.d2l=u,t.r2d=t.c2d=t.l2d=l,t.d2r=t.d2l_noadd=h,t.r2c=function(T){var L=d(T);return L!==void 0?L:t.fraction2r(.5)},t.l2r=t.c2r=_m,t.r2l=d,t.d2p=function(T){return t.l2p(t.r2c(T))},t.p2d=function(T){return l(p(T))},t.r2p=t.d2p,t.p2r=p,t.cleanPos=function(T){return typeof T=="string"&&T!==""?T:_m(T)}):t.type==="multicategory"&&(t.r2d=t.c2d=t.l2d=l,t.d2r=t.d2l_noadd=h,t.r2c=function(T){var L=h(T);return L!==void 0?L:t.fraction2r(.5)},t.r2c_just_indices=f,t.l2r=t.c2r=_m,t.r2l=h,t.d2p=function(T){return t.l2p(t.r2c(T))},t.p2d=function(T){return l(p(T))},t.r2p=t.d2p,t.p2r=p,t.cleanPos=function(T){return Array.isArray(T)||typeof T=="string"&&T!==""?T:_m(T)},t.setupMultiCategory=function(T){var L=t._traceIndices,x,C,S=t._matchGroup;if(S&&t._categories.length===0){for(var g in S)if(g!==n){var P=r[wL.id2name(g)];L=L.concat(P._traceIndices)}}var E=[[0,{}],[0,{}]],z=[];for(x=0;xP[1]&&(C[g?0:1]=x),C[0]===C[1]){var E=t.l2r(L),z=t.l2r(x);if(L!==void 0){var q=E+1;x!==void 0&&(q=Math.min(q,z)),C[g?1:0]=q}if(x!==void 0){var U=z+1;L!==void 0&&(U=Math.max(U,E)),C[g?0:1]=U}}}},t.cleanRange=function(T,L){t._cleanRange(T,L),t.limitRange(T)},t._cleanRange=function(T,L){L||(L={}),T||(T="range");var x=yc.nestedProperty(t,T).get(),C,S;if(t.type==="date"?S=yc.dfltRange(t.calendar):i==="y"?S=SL.DFLTRANGEY:t._name==="realaxis"?S=[0,1]:S=L.dfltRange||SL.DFLTRANGEX,S=S.slice(),(t.rangemode==="tozero"||t.rangemode==="nonnegative")&&(S[0]=0),!x||x.length!==2){yc.nestedProperty(t,T).set(S);return}var g=x[0]===null,P=x[1]===null;for(t.type==="date"&&!t.autorange&&(x[0]=yc.cleanDate(x[0],Sg,t.calendar),x[1]=yc.cleanDate(x[1],Sg,t.calendar)),C=0;C<2;C++)if(t.type==="date"){if(!yc.isDateTime(x[C],t.calendar)){t[T]=S;break}if(t.r2l(x[0])===t.r2l(x[1])){var E=yc.constrain(t.r2l(x[0]),yc.MIN_MS+1e3,yc.MAX_MS-1e3);x[0]=t.l2r(E-1e3),x[1]=t.l2r(E+1e3);break}}else{if(!ym(x[C]))if(!(g||P)&&ym(x[1-C]))x[C]=x[1-C]*(C?10:.1);else{t[T]=S;break}if(x[C]<-_L?x[C]=-_L:x[C]>_L&&(x[C]=_L),x[0]===x[1]){var z=Math.max(1,Math.abs(x[0]*1e-6));x[0]-=z,x[1]+=z}}},t.setScale=function(T){var L=r._size;if(t.overlaying){var x=wL.getFromId({_fullLayout:r},t.overlaying);t.domain=x.domain}var C=T&&t._r?"_r":"range",S=t.calendar;t.cleanRange(C);var g=t.r2l(t[C][0],S),P=t.r2l(t[C][1],S),E=i==="y";if(E?(t._offset=L.t+(1-t.domain[1])*L.h,t._length=L.h*(t.domain[1]-t.domain[0]),t._m=t._length/(g-P),t._b=-t._m*P):(t._offset=L.l+t.domain[0]*L.w,t._length=L.w*(t.domain[1]-t.domain[0]),t._m=t._length/(P-g),t._b=-t._m*g),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks){var z,q;if(t._rangebreaks=t.locateBreaks(Math.min(g,P),Math.max(g,P)),t._rangebreaks.length){for(z=0;zP&&(U=!U),U&&t._rangebreaks.reverse();var G=U?-1:1;for(t._m2=G*t._length/(Math.abs(P-g)-t._lBreaks),t._B.push(-t._m2*(E?P:g)),z=0;zS&&(S+=7,gS&&(S+=24,g=C&&g=C&&T=ie.min&&(_eie.max&&(ie.max=ke),Ce=!1)}Ce&&P.push({min:_e,max:ke})}};for(x=0;x{"use strict";var ase=Eo(),rB=Pr(),wst=fs().BADNUM,ML=rB.isArrayOrTypedArray,Tst=rB.isDateTime,Ast=rB.cleanNumber,ose=Math.round;lse.exports=function(t,r,n){var i=t,a=n.noMultiCategory;if(ML(i)&&!i.length)return"-";if(!a&&Cst(i))return"multicategory";if(a&&Array.isArray(i[0])){for(var o=[],s=0;sa*2}function sse(e){return Math.max(1,(e-1)/1e3)}function kst(e,t){for(var r=e.length,n=sse(r),i=0,a=0,o={},s=0;si*2}function Cst(e){return ML(e[0])&&ML(e[1])}});var Mg=ye((lar,gse)=>{"use strict";var Lst=qa(),hse=Eo(),d_=Pr(),EL=fs().FP_SAFE,Pst=Oa(),Ist=So(),dse=hf(),Rst=dse.getFromId,Dst=dse.isLinked;gse.exports={applyAutorangeOptions:pse,getAutoRange:iB,makePadFn:nB,doAutoRange:zst,findExtremes:qst,concatExtremes:sB};function iB(e,t){var r,n,i=[],a=e._fullLayout,o=nB(a,t,0),s=nB(a,t,1),l=sB(e,t),u=l.min,c=l.max;if(u.length===0||c.length===0)return d_.simpleMap(t.range,t.r2l);var f=u[0].val,h=c[0].val;for(r=1;r0&&(P=M-o(x)-s(C),P>T?E/P>L&&(S=x,g=C,L=E/P):E/M>L&&(S={val:x.val,nopad:1},g={val:C.val,nopad:1},L=E/M));function z(j,N){return Math.max(j,s(N))}if(f===h){var q=f-1,U=f+1;if(p)if(f===0)i=[0,1];else{var G=(f>0?c:u).reduce(z,0),Z=f/(1-Math.min(.5,G/M));i=f>0?[0,Z]:[Z,0]}else k?i=[Math.max(0,q),Math.max(1,U)]:i=[q,U]}else p?(S.val>=0&&(S={val:0,nopad:1}),g.val<=0&&(g={val:0,nopad:1})):k&&(S.val-L*o(S)<0&&(S={val:0,nopad:1}),g.val<=0&&(g={val:1,nopad:1})),L=(g.val-S.val-use(t,x.val,C.val))/(M-o(S)-s(g)),i=[S.val-L*o(S),g.val+L*s(g)];return i=pse(i,t),t.limitRange&&t.limitRange(),v&&i.reverse(),d_.simpleMap(i,t.l2r||Number)}function use(e,t,r){var n=0;if(e.rangebreaks)for(var i=e.locateBreaks(t,r),a=0;a0?r.ppadplus:r.ppadminus)||r.ppad||0),x=T((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),C=T(r.vpadplus||r.vpad),S=T(r.vpadminus||r.vpad);if(!u){if(k=1/0,M=-1/0,l)for(f=0;f0&&(k=h),h>M&&h-EL&&(k=h),h>M&&h=E;f--)P(f);return{min:n,max:i,opts:r}}function aB(e,t,r,n){vse(e,t,r,n,Ost)}function oB(e,t,r,n){vse(e,t,r,n,Bst)}function vse(e,t,r,n,i){for(var a=n.tozero,o=n.extrapad,s=!0,l=0;l=r&&(u.extrapad||!o)){s=!1;break}else i(t,u.val)&&u.pad<=r&&(o||!u.extrapad)&&(e.splice(l,1),l--)}if(s){var c=a&&t===0;e.push({val:t,pad:c?0:r,extrapad:c?!1:o})}}function fse(e){return hse(e)&&Math.abs(e)=t}function Nst(e,t){var r=t.autorangeoptions;return r&&r.minallowed!==void 0&&kL(t,r.minallowed,r.maxallowed)?r.minallowed:r&&r.clipmin!==void 0&&kL(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}function Ust(e,t){var r=t.autorangeoptions;return r&&r.maxallowed!==void 0&&kL(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&r.clipmax!==void 0&&kL(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}function kL(e,t,r){return t!==void 0&&r!==void 0?(t=e.d2l(t),r=e.d2l(r),t=l&&(a=l,r=l),o<=l&&(o=l,n=l)}}return r=Nst(r,t),n=Ust(n,t),[r,n]}});var ho=ye((car,Bse)=>{"use strict";var w0=qa(),zh=Eo(),H3=Mc(),uM=Oa(),Wo=Pr(),j3=Wo.strTranslate,qb=Zl(),Vst=zb(),cM=ka(),Xp=So(),Gst=Rd(),mse=PO(),uar=Rh(),Kd=fs(),Hst=Kd.ONEMAXYEAR,PL=Kd.ONEAVGYEAR,IL=Kd.ONEMINYEAR,jst=Kd.ONEMAXQUARTER,fB=Kd.ONEAVGQUARTER,RL=Kd.ONEMINQUARTER,Wst=Kd.ONEMAXMONTH,W3=Kd.ONEAVGMONTH,DL=Kd.ONEMINMONTH,Zp=Kd.ONEWEEK,qv=Kd.ONEDAY,v_=qv/2,wm=Kd.ONEHOUR,fM=Kd.ONEMIN,FL=Kd.ONESEC,Xst=Kd.ONEMILLI,Zst=Kd.ONEMICROSEC,Ob=Kd.MINUS_SIGN,qL=Kd.BADNUM,hB={K:"zeroline"},dB={K:"gridline",L:"path"},vB={K:"minor-gridline",L:"path"},kse={K:"tick",L:"path"},yse={K:"tick",L:"text"},_se={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},OL=Dh(),lM=OL.MID_SHIFT,Bb=OL.CAP_SHIFT,hM=OL.LINE_SPACING,Yst=OL.OPPOSITE_SIDE,zL=3,$n=Bse.exports={};$n.setConvert=xm();var Kst=G3(),Tm=hf(),Jst=Tm.idSort,$st=Tm.isLinked;$n.id2name=Tm.id2name;$n.name2id=Tm.name2id;$n.cleanId=Tm.cleanId;$n.list=Tm.list;$n.listIds=Tm.listIds;$n.getFromId=Tm.getFromId;$n.getFromTrace=Tm.getFromTrace;var Cse=Mg();$n.getAutoRange=Cse.getAutoRange;$n.findExtremes=Cse.findExtremes;var Qst=1e-4;function yB(e){var t=(e[1]-e[0])*Qst;return[e[0]-t,e[1]+t]}$n.coerceRef=function(e,t,r,n,i,a){var o=n.charAt(n.length-1),s=r._fullLayout._subplots[o+"axis"],l=n+"ref",u={};return i||(i=s[0]||(typeof a=="string"?a:a[0])),a||(a=i),s=s.concat(s.map(function(c){return c+" domain"})),u[l]={valType:"enumerated",values:s.concat(a?typeof a=="string"?[a]:a:[]),dflt:i},Wo.coerce(e,t,u,l)};$n.coerceRefArray=function(e,t,r,n,i,a,o){let s=n.charAt(n.length-1);var l=r._fullLayout._subplots[s+"axis"];let u=n+"ref";var c=e[u];i||(i=l[0]||(typeof a=="string"?a:a[0])),l=l.concat(l.map(h=>h+" domain")),l=l.concat(a||[]),c.length>o?(Wo.warn("Array attribute "+u+" has more entries than expected, truncating to "+o),c=c.slice(0,o)):c.length2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0))};$n.saveRangeInitial=function(e,t){for(var r=$n.list(e,"",!0),n=!1,i=0;if*.3||u(n)||u(i))){var h=r.dtick/2;e+=e+ho){var s=Number(r.slice(1));a.exactYears>o&&s%12===0?e=$n.tickIncrement(e,"M6","reverse")+qv*1.5:a.exactMonths>o?e=$n.tickIncrement(e,"M1","reverse")+qv*15.5:e-=v_;var l=$n.tickIncrement(e,r);if(l<=n)return l}return e}$n.prepMinorTicks=function(e,t,r){if(!t.minor.dtick){delete e.dtick;var n=t.dtick&&zh(t._tmin),i;if(n){var a=$n.tickIncrement(t._tmin,t.dtick,!0);i=[t._tmin,a*.99+t._tmin*.01]}else{var o=Wo.simpleMap(t.range,t.r2l);i=[o[0],.8*o[0]+.2*o[1]]}if(e.range=Wo.simpleMap(i,t.l2r),e._isMinor=!0,$n.prepTicks(e,r),n){var s=zh(t.dtick),l=zh(e.dtick),u=s?t.dtick:+t.dtick.substring(1),c=l?e.dtick:+e.dtick.substring(1);s&&l?lB(u,c)?u===2*Zp&&c===2*qv&&(e.dtick=Zp):u===2*Zp&&c===3*qv?e.dtick=Zp:u===Zp&&!(t._input.minor||{}).nticks?e.dtick=qv:wse(u/c,2.5)?e.dtick=u/2:e.dtick=u:String(t.dtick).charAt(0)==="M"?l?e.dtick="M1":lB(u,c)?u>=12&&c===2&&(e.dtick="M3"):e.dtick=t.dtick:String(e.dtick).charAt(0)==="L"?String(t.dtick).charAt(0)==="L"?lB(u,c)||(e.dtick=wse(u/c,2.5)?t.dtick/2:t.dtick):e.dtick="D1":e.dtick==="D2"&&+t.dtick>1&&(e.dtick=1)}e.range=t.range}t.minor._tick0Init===void 0&&(e.tick0=t.tick0)};function lB(e,t){return Math.abs((e/t+.5)%1-.5)<.001}function wse(e,t){return Math.abs(e/t-1)<.001}$n.prepTicks=function(e,t){var r=Wo.simpleMap(e.range,e.r2l,void 0,void 0,t);if(e.tickmode==="auto"||!e.dtick){var n=e.nticks,i;n||(e.type==="category"||e.type==="multicategory"?(i=e.tickfont?Wo.bigFont(e.tickfont.size||12):15,n=e._length/i):(i=e._id.charAt(0)==="y"?40:80,n=Wo.constrain(e._length/i,4,9)+1),e._name==="radialaxis"&&(n*=2)),e.minor&&e.minor.tickmode!=="array"||e.tickmode==="array"&&(n*=100),e._roughDTick=Math.abs(r[1]-r[0])/n,$n.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick0?(a=n-1,o=n):(a=n,o=n);var s=e[a].value,l=e[o].value,u=Math.abs(l-s),c=r||u,f=0;c>=IL?u>=IL&&u<=Hst?f=u:f=PL:r===fB&&c>=RL?u>=RL&&u<=jst?f=u:f=fB:c>=DL?u>=DL&&u<=Wst?f=u:f=W3:r===Zp&&c>=Zp?f=Zp:c>=qv?f=qv:r===v_&&c>=v_?f=v_:r===wm&&c>=wm&&(f=wm);var h;f>=u&&(f=u,h=!0);var d=i+f;if(t.rangebreaks&&f>0){for(var v=84,m=0,b=0;bZp&&(f=u)}(f>0||n===0)&&(e[n].periodX=i+f/2)}}$n.calcTicks=function(t,r){for(var n=t.type,i=t.calendar,a=t.ticklabelstep,o=t.ticklabelmode==="period",s=t.range[0]>t.range[1],l=!t.ticklabelindex||Wo.isArrayOrTypedArray(t.ticklabelindex)?t.ticklabelindex:[t.ticklabelindex],u=Wo.simpleMap(t.range,t.r2l,void 0,void 0,r),c=u[1]=(M?0:1);T--){var L=!T;T?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var x=T?t:Wo.extendFlat({},t,t.minor);if(L?$n.prepMinorTicks(x,t,r):$n.prepTicks(x,r),x.tickmode==="array"){T?(b=[],v=Tse(t,!L)):(p=[],m=Tse(t,!L));continue}if(x.tickmode==="sync"){b=[],v=alt(t);continue}var C=yB(u),S=C[0],g=C[1],P=zh(x.dtick),E=n==="log"&&!(P||x.dtick.charAt(0)==="L"),z=$n.tickFirst(x,r);if(T){if(t._tmin=z,z=g:U<=g;U=$n.tickIncrement(U,j,c,i)){if(T&&G++,x.rangebreaks&&!c){if(U=h)break}if(b.length>d||U===q)break;q=U;var N={value:U};T?(E&&U!==(U|0)&&(N.simpleLabel=!0),a>1&&G%a&&(N.skipLabel=!0),b.push(N)):(N.minor=!0,p.push(N))}}if(!p||p.length<2)l=!1;else{var H=(p[1].value-p[0].value)*(s?-1:1);Llt(H,t.tickformat)||(l=!1)}if(!l)k=b;else{var re=b.concat(p);o&&b.length&&(re=re.slice(1)),re=re.sort(function(Qt,Ht){return Qt.value-Ht.value}).filter(function(Qt,Ht,nr){return Ht===0||Qt.value!==nr[Ht-1].value});var oe=re.map(function(Qt,Ht){return Qt.minor===void 0&&!Qt.skipLabel?Ht:null}).filter(function(Qt){return Qt!==null});oe.forEach(function(Qt){l.map(function(Ht){var nr=Qt+Ht;nr>=0&&nr-1;De--){if(b[De].drop){b.splice(De,1);continue}b[De].value=cB(b[De].value,t);var ce=t.c2p(b[De].value);(Le?Pe>ce-me:Peh||tth&&(nr.periodX=h),tti&&hPL)t/=PL,n=i(10),e.dtick="M"+12*bm(t,n,CL);else if(a>W3)t/=W3,e.dtick="M"+bm(t,1,Ase);else if(a>qv){if(e.dtick=bm(t,qv,e._hasDayOfWeekBreaks?[1,2,7,14]:olt),!r){var o=$n.getTickFormat(e),s=e.ticklabelmode==="period";s&&(e._rawTick0=e.tick0),/%[uVW]/.test(o)?e.tick0=Wo.dateTick0(e.calendar,2):e.tick0=Wo.dateTick0(e.calendar,1),s&&(e._dowTick0=e.tick0)}}else a>wm?e.dtick=bm(t,wm,Ase):a>fM?e.dtick=bm(t,fM,Sse):a>FL?e.dtick=bm(t,FL,Sse):(n=i(10),e.dtick=bm(t,n,CL))}else if(e.type==="log"){e.tick0=0;var l=Wo.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(l[1]-l[0])<1){var u=1.5*Math.abs((l[1]-l[0])/t);t=Math.abs(Math.pow(10,l[1])-Math.pow(10,l[0]))/u,n=i(10),e.dtick="L"+bm(t,n,CL)}else e.dtick=t>.3?"D2":"D1"}else e.type==="category"||e.type==="multicategory"?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):wB(e)?(e.tick0=0,n=1,e.dtick=bm(t,n,slt)):(e.tick0=0,n=i(10),e.dtick=bm(t,n,CL));if(e.dtick===0&&(e.dtick=1),!zh(e.dtick)&&typeof e.dtick!="string"){var c=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(c)}};function Rse(e){var t=e.dtick;if(e._tickexponent=0,!zh(t)&&typeof t!="string"&&(t=1),(e.type==="category"||e.type==="multicategory")&&(e._tickround=null),e.type==="date"){var r=e.r2l(e.tick0),n=e.l2r(r).replace(/(^-|i)/g,""),i=n.length;if(String(t).charAt(0)==="M")i>10||n.slice(5)!=="01-01"?e._tickround="d":e._tickround=+t.slice(1)%12===0?"y":"m";else if(t>=qv&&i<=10||t>=qv*15)e._tickround="d";else if(t>=fM&&i<=16||t>=wm)e._tickround="M";else if(t>=FL&&i<=19||t>=fM)e._tickround="S";else{var a=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(i,a)-20,e._tickround<0&&(e._tickround=4)}}else if(zh(t)||t.charAt(0)==="L"){var o=e.range.map(e.r2d||Number);zh(t)||(t=Number(t.slice(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var s=Math.max(Math.abs(o[0]),Math.abs(o[1])),l=Math.floor(Math.log(s)/Math.LN10+.01),u=e.minexponent===void 0?3:e.minexponent;Math.abs(l)>u&&(X3(e.exponentformat)&&e.exponentformat!=="SI extended"&&!_B(l)||X3(e.exponentformat)&&e.exponentformat==="SI extended"&&!xB(l)?e._tickexponent=3*Math.round((l-1)/3):e._tickexponent=l)}else e._tickround=null}$n.tickIncrement=function(e,t,r,n){var i=r?-1:1;if(zh(t))return Wo.increment(e,i*t);var a=t.charAt(0),o=i*Number(t.slice(1));if(a==="M")return Wo.incrementMonth(e,o,n);if(a==="L")return Math.log(Math.pow(10,e)+o)/Math.LN10;if(a==="D"){var s=t==="D2"?Ise:Pse,l=e+i*.01,u=Wo.roundUp(Wo.mod(l,1),s,r);return Math.floor(l)+Math.log(w0.round(Math.pow(10,u),1))/Math.LN10}throw"unrecognized dtick "+String(t)};$n.tickFirst=function(e,t){var r=e.r2l||Number,n=Wo.simpleMap(e.range,r,void 0,void 0,t),i=n[1]=0&&p<=e._length?b:null};if(a&&Wo.isArrayOrTypedArray(e.ticktext)){var f=Wo.simpleMap(e.range,e.r2l),h=(Math.abs(f[1]-f[0])-(e._lBreaks||0))/1e4;for(u=0;u"+s;else{var u=vM(e),c=e._trueSide||e.side;(!u&&c==="top"||u&&c==="bottom")&&(o+="
")}t.text=o}function ult(e,t,r,n,i){var a=e.dtick,o=t.x,s=e.tickformat,l=typeof a=="string"&&a.charAt(0);if(i==="never"&&(i=""),n&&l!=="L"&&(a="L3",l="L"),s||l==="L")t.text=dM(Math.pow(10,o),e,i,n);else if(zh(a)||l==="D"&&(e.minorloglabels==="complete"||Wo.mod(o+.01,1)<.1)){var u;e.minorloglabels==="complete"&&!(Wo.mod(o+.01,1)<.1)&&(u=!0,t.fontSize*=.75);var c=Math.pow(10,o).toExponential(0),f=c.split("e"),h=+f[1],d=Math.abs(h),v=e.exponentformat;v==="power"||X3(v)&&v!=="SI extended"&&_B(h)||X3(v)&&v==="SI extended"&&xB(h)?(t.text=f[0],d>0&&(t.text+="x10"),t.text==="1x10"&&(t.text="10"),h!==0&&h!==1&&(t.text+=""+(h>0?"":Ob)+d+""),t.fontSize*=1.25):(v==="e"||v==="E")&&d>2?t.text=f[0]+v+(h>0?"+":Ob)+d:(t.text=dM(Math.pow(10,o),e,"","fakehover"),a==="D1"&&e._id.charAt(0)==="y"&&(t.dy-=t.fontSize/6))}else if(l==="D")t.text=e.minorloglabels==="none"?"":String(Math.round(Math.pow(10,Wo.mod(o,1)))),t.fontSize*=.75;else throw"unrecognized dtick "+String(a);if(e.dtick==="D1"){var m=String(t.text).charAt(0);(m==="0"||m==="1")&&(e._id.charAt(0)==="y"?t.dx-=t.fontSize/4:(t.dy+=t.fontSize/2,t.dx+=(e.range[1]>e.range[0]?1:-1)*t.fontSize*(o<0?.5:.25)))}}function clt(e,t){var r=e._categories[Math.round(t.x)];r===void 0&&(r=""),t.text=String(r)}function flt(e,t,r){var n=Math.round(t.x),i=e._categories[n]||[],a=i[1]===void 0?"":String(i[1]),o=i[0]===void 0?"":String(i[0]);r?t.text=o+" - "+a:(t.text=a,t.text2=o)}function hlt(e,t,r,n,i){i==="never"?i="":e.showexponent==="all"&&Math.abs(t.x/e.dtick)<1e-6&&(i="hide"),t.text=dM(t.x,e,i,n)}function dlt(e,t,r,n,i){if(e.thetaunit==="radians"&&!r){var a=t.x/180;if(a===0)t.text="0";else{var o=vlt(a);if(o[1]>=100)t.text=dM(Wo.deg2rad(t.x),e,i,n);else{var s=t.x<0;o[1]===1?o[0]===1?t.text="\u03C0":t.text=o[0]+"\u03C0":t.text=["",o[0],"","\u2044","",o[1],"","\u03C0"].join(""),s&&(t.text=Ob+t.text)}}}else t.text=dM(t.x,e,i,n)}function vlt(e){function t(s,l){return Math.abs(s-l)<=1e-6}function r(s,l){return t(l,0)?s:r(l,s%l)}function n(s){for(var l=1;!t(Math.round(s*l)/l,s);)l*=10;return l}var i=n(e),a=e*i,o=Math.abs(r(a,i));return[Math.round(a/o),Math.round(i/o)]}var Fse=["f","p","n","\u03BC","m","","k","M","G","T"],plt=["q","r","y","z","a",...Fse,"P","E","Z","Y","R","Q"],X3=e=>["SI","SI extended","B"].includes(e);function _B(e){return e>14||e<-15}function xB(e){return e>32||e<-30}function glt(e,t){return X3(t)?!!(t==="SI extended"&&xB(e)||t!=="SI extended"&&_B(e)):!1}function dM(e,t,r,n){var i=e<0,a=t._tickround,o=r||t.exponentformat||"B",s=t._tickexponent,l=$n.getTickFormat(t),u=t.separatethousands;if(n){var c={exponentformat:o,minexponent:t.minexponent,dtick:t.showexponent==="none"?t.dtick:zh(e)&&Math.abs(e)||1,range:t.showexponent==="none"?t.range.map(t.r2d):[0,e||1]};Rse(c),a=(Number(c._tickround)||0)+4,s=c._tickexponent,t.hoverformat&&(l=t.hoverformat)}if(l)return t._numFormat(l)(e).replace(/-/g,Ob);var f=Math.pow(10,-a)/2;if(o==="none"&&(s=0),e=Math.abs(e),e"+v+"":o==="B"&&s===9?e+="B":X3(o)&&(e+=o==="SI extended"?plt[s/3+10]:Fse[s/3+5])}return i?Ob+e:e}$n.getTickFormat=function(e){var t;function r(l){return typeof l!="string"?l:Number(l.replace("M",""))*W3}function n(l,u){var c=["L","D"];if(typeof l==typeof u){if(typeof l=="number")return l-u;var f=c.indexOf(l.charAt(0)),h=c.indexOf(u.charAt(0));return f===h?Number(l.replace(/(L|D)/g,""))-Number(u.replace(/(L|D)/g,"")):f-h}else return typeof l=="number"?1:-1}function i(l,u,c){var f=c||function(v){return v},h=u[0],d=u[1];return(!h&&typeof h!="number"||f(h)<=f(l))&&(!d&&typeof d!="number"||f(d)>=f(l))}function a(l,u){var c=u[0]===null,f=u[1]===null,h=n(l,u[0])>=0,d=n(l,u[1])<=0;return(c||h)&&(f||d)}var o,s;if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":{for(t=0;t=0&&i.unshift(i.splice(c,1).shift())}});var s={false:{left:0,right:0}};return Wo.syncOrAsync(i.map(function(l){return function(){if(l){var u=$n.getFromId(e,l);r||(r={}),r.axShifts=s,r.overlayingShiftedAx=o;var c=$n.drawOne(e,u,r);return u._shiftPusher&&mB(u,u._fullDepth||0,s,!0),u._r=u.range.slice(),u._rl=Wo.simpleMap(u._r,u.r2l),c}}}))};$n.drawOne=function(e,t,r){r=r||{};var n=r.axShifts||{},i=r.overlayingShiftedAx||[],a,o,s;t.setScale();var l=e._fullLayout,u=t._id,c=u.charAt(0),f=$n.counterLetter(u),h=l._plots[t._mainSubplot],d=t.zerolinelayer==="above traces";if(!h)return;if(t._shiftPusher=t.autoshift||i.indexOf(t._id)!==-1||i.indexOf(t.overlaying)!==-1,t._shiftPusher&t.anchor==="free"){var v=t.linewidth/2||0;t.ticks==="inside"&&(v+=t.ticklen),mB(t,v,n,!0),mB(t,t.shift||0,n,!1)}(r.skipTitle!==!0||t._shift===void 0)&&(t._shift=Clt(t,n));var m=h[c+"axislayer"],b=t._mainLinePosition,p=b+=t._shift,k=t._mainMirrorPosition,M=t._vals=$n.calcTicks(t),T=[t.mirror,p,k].join("_");for(a=0;a0?tt.bottom-Ht:0,nr))));var rt=0,St=0;if(t._shiftPusher&&(rt=Math.max(nr,tt.height>0?ct==="l"?Ht-tt.left:tt.right-Ht:0),t.title.text!==l._dfltTitle[c]&&(St=(t._titleStandoff||0)+(t._titleScoot||0),ct==="l"&&(St+=Ese(t))),t._fullDepth=Math.max(rt,St)),t.automargin){je={x:0,y:0,r:0,l:0,t:0,b:0};var Tt=[0,1],dt=typeof t._shift=="number"?t._shift:0;if(c==="x"){if(ct==="b"?je[ct]=t._depth:(je[ct]=t._depth=Math.max(tt.width>0?Ht-tt.top:0,nr),Tt.reverse()),tt.width>0){var Et=tt.right-(t._offset+t._length);Et>0&&(je.xr=1,je.r=Et);var pt=t._offset-tt.left;pt>0&&(je.xl=0,je.l=pt)}}else if(ct==="l"?(t._depth=Math.max(tt.height>0?Ht-tt.left:0,nr),je[ct]=t._depth-dt):(t._depth=Math.max(tt.height>0?tt.right-Ht:0,nr),je[ct]=t._depth+dt,Tt.reverse()),tt.height>0){var Xt=tt.bottom-(t._offset+t._length);Xt>0&&(je.yb=0,je.b=Xt);var or=t._offset-tt.top;or>0&&(je.yt=1,je.t=or)}je[f]=t.anchor==="free"?t.position:t._anchorAxis.domain[Tt[0]],t.title.text!==l._dfltTitle[c]&&(je[ct]+=Ese(t)+(t.title.standoff||0)),t.mirror&&t.anchor!=="free"&&(Ue={x:0,y:0,r:0,l:0,t:0,b:0},Ue[Qt]=t.linewidth,t.mirror&&t.mirror!==!0&&(Ue[Qt]+=nr),t.mirror===!0||t.mirror==="ticks"?Ue[f]=t._anchorAxis.domain[Tt[1]]:(t.mirror==="all"||t.mirror==="allticks")&&(Ue[f]=[t._counterDomainMin,t._counterDomainMax][Tt[1]]))}st&&(Ae=uM.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),typeof t.automargin=="string"&&(Mse(je,t.automargin),Mse(Ue,t.automargin)),H3.autoMargin(e,bB(t),je),H3.autoMargin(e,qse(t),Ue),H3.autoMargin(e,Ose(t),Ae)}),Wo.syncOrAsync(mt)}};function Mse(e,t){if(e){var r=Object.keys(_se).reduce(function(n,i){return t.indexOf(i)!==-1&&_se[i].forEach(function(a){n[a]=1}),n},{});Object.keys(e).forEach(function(n){r[n]||(n.length===1?e[n]=0:delete e[n])})}}function mlt(e,t){var r=[],n,i=function(a,o){var s=a.xbnd[o];s!==null&&r.push(Wo.extendFlat({},a,{x:s}))};if(t.length){for(n=0;ne.range[1],s=e.ticklabelposition&&e.ticklabelposition.indexOf("inside")!==-1,l=!s;if(r){var u=o?-1:1;r=r*u}if(n){var c=e.side,f=s&&(c==="top"||c==="left")||l&&(c==="bottom"||c==="right")?1:-1;n=n*f}return e._id.charAt(0)==="x"?function(h){return j3(i+e._offset+e.l2p(pB(h))+r,a+n)}:function(h){return j3(a+n,i+e._offset+e.l2p(pB(h))+r)}};function pB(e){return e.periodX!==void 0?e.periodX:e.x}function blt(e){var t=e.ticklabelposition||"",r=e.tickson||"",n=function(v){return t.indexOf(v)!==-1},i=n("top"),a=n("left"),o=n("right"),s=n("bottom"),l=n("inside"),u=r!=="boundaries"&&(s||a||i||o);if(!u&&!l)return[0,0];var c=e.side,f=u?(e.tickwidth||0)/2:0,h=zL,d=e.tickfont?e.tickfont.size:12;return(s||i)&&(f+=d*Bb,h+=(e.linewidth||0)/2),(a||o)&&(f+=(e.linewidth||0)/2,h+=zL),l&&c==="top"&&(h-=d*(1-Bb)),(a||i)&&(f=-f),(c==="bottom"||c==="right")&&(h=-h),[u?f:0,l?h:0]}$n.makeTickPath=function(e,t,r,n){n||(n={});var i=n.minor;if(i&&!e.minor)return"";var a=n.len!==void 0?n.len:i?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),s=(e.linewidth||1)/2;return o==="x"?"M0,"+(t+s*r)+"v"+a*r:"M"+(t+s*r)+",0h"+a*r};$n.makeLabelFns=function(e,t,r){var n=e.ticklabelposition||"",i=e.tickson||"",a=function(q){return n.indexOf(q)!==-1},o=a("top"),s=a("left"),l=a("right"),u=a("bottom"),c=i!=="boundaries"&&(u||s||o||l),f=a("inside"),h=n==="inside"&&e.ticks==="inside"||!f&&e.ticks==="outside"&&i!=="boundaries",d=0,v=0,m=h?e.ticklen:0;if(f?m*=-1:c&&(m=0),h&&(d+=m,r)){var b=Wo.deg2rad(r);d=m*Math.cos(b)+1,v=m*Math.sin(b)}e.showticklabels&&(h||e.showline)&&(d+=.2*e.tickfont.size),d+=(e.linewidth||1)/2*(f?-1:1);var p={labelStandoff:d,labelShift:v},k,M,T,L,x=0,C=e.side,S=e._id.charAt(0),g=e.tickangle,P;if(S==="x")P=!f&&C==="bottom"||f&&C==="top",L=P?1:-1,f&&(L*=-1),k=v*L,M=t+d*L,T=P?1:-.2,Math.abs(g)===90&&(f?T+=lM:g===-90&&C==="bottom"?T=Bb:g===90&&C==="top"?T=lM:T=.5,x=lM/2*(g/90)),p.xFn=function(q){return q.dx+k+x*q.fontSize},p.yFn=function(q){return q.dy+M+q.fontSize*T},p.anchorFn=function(q,U){if(c){if(s)return"end";if(l)return"start"}return!zh(U)||U===0||U===180?"middle":U*L<0!==f?"end":"start"},p.heightFn=function(q,U,G){return U<-60||U>60?-.5*G:e.side==="top"!==f?-G:0};else if(S==="y"){if(P=!f&&C==="left"||f&&C==="right",L=P?1:-1,f&&(L*=-1),k=d,M=v*L,T=0,!f&&Math.abs(g)===90&&(g===-90&&C==="left"||g===90&&C==="right"?T=Bb:T=.5),f){var E=zh(g)?+g:0;if(E!==0){var z=Wo.deg2rad(E);x=Math.abs(Math.sin(z))*Bb*L,T=0}}p.xFn=function(q){return q.dx+t-(k+q.fontSize*T)*L+x*q.fontSize},p.yFn=function(q){return q.dy+M+q.fontSize*lM},p.anchorFn=function(q,U){return zh(U)&&Math.abs(U)===90?"middle":P?"end":"start"},p.heightFn=function(q,U,G){return e.side==="right"&&(U*=-1),U<-30?-G:U<30?-.5*G:0}}return p};function BL(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}$n.drawTicks=function(e,t,r){r=r||{};var n=t._id+"tick",i=[].concat(t.minor&&t.minor.ticks?r.vals.filter(function(o){return o.minor&&!o.noTick}):[]).concat(t.ticks?r.vals.filter(function(o){return!o.minor&&!o.noTick}):[]),a=r.layer.selectAll("path."+n).data(i,BL);a.exit().remove(),a.enter().append("path").classed(n,1).classed("ticks",1).classed("crisp",r.crisp!==!1).each(function(o){return cM.stroke(w0.select(this),o.minor?t.minor.tickcolor:t.tickcolor)}).style("stroke-width",function(o){return Xp.crispRound(e,o.minor?t.minor.tickwidth:t.tickwidth,1)+"px"}).attr("d",r.path).style("display",null),NL(t,[kse]),a.attr("transform",r.transFn)};$n.drawGrid=function(e,t,r){if(r=r||{},t.tickmode!=="sync"){var n=t._id+"grid",i=t.minor&&t.minor.showgrid,a=i?r.vals.filter(function(p){return p.minor}):[],o=t.showgrid?r.vals.filter(function(p){return!p.minor}):[],s=r.counterAxis;if(s&&$n.shouldShowZeroLine(e,t,s))for(var l=t.tickmode==="array",u=0;u=0;v--){var m=v?h:d;if(m){var b=m.selectAll("path."+n).data(v?o:a,BL);b.exit().remove(),b.enter().append("path").classed(n,1).classed("crisp",r.crisp!==!1),b.attr("transform",r.transFn).attr("d",r.path).each(function(p){return cM.stroke(w0.select(this),p.minor?t.minor.gridcolor:t.gridcolor||"#ddd")}).style("stroke-dasharray",function(p){return Xp.dashStyle(p.minor?t.minor.griddash:t.griddash,p.minor?t.minor.gridwidth:t.gridwidth)}).style("stroke-width",function(p){return(p.minor?f:t._gw)+"px"}).style("display",null),typeof r.path=="function"&&b.attr("d",r.path)}}NL(t,[dB,vB])}};$n.drawZeroLine=function(e,t,r){r=r||r;var n=t._id+"zl",i=$n.shouldShowZeroLine(e,t,r.counterAxis),a=r.layer.selectAll("path."+n).data(i?[{x:0,id:t._id}]:[]);a.exit().remove(),a.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",r.crisp!==!1).each(function(){r.layer.selectAll("path").sort(function(o,s){return Jst(o.id,s.id)})}),a.attr("transform",r.transFn).attr("d",r.path).call(cM.stroke,t.zerolinecolor||cM.defaultLine).style("stroke-width",Xp.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),NL(t,[hB])};$n.drawLabels=function(e,t,r){r=r||{};var n=e._fullLayout,i=t._id,a=t.zerolinelayer==="above traces",o=r.cls||i+"tick",s=r.vals.filter(function(H){return H.text}),l=r.labelFns,u=r.secondary?0:t.tickangle,c=(t._prevTickAngles||{})[o],f=r.layer.selectAll("g."+o).data(t.showticklabels?s:[],BL),h=[];f.enter().append("g").classed(o,1).append("text").attr("text-anchor","middle").each(function(H){var re=w0.select(this),oe=e._promises.length;re.call(qb.positionText,l.xFn(H),l.yFn(H)).call(Xp.font,{family:H.font,size:H.fontSize,color:H.fontColor,weight:H.fontWeight,style:H.fontStyle,variant:H.fontVariant,textcase:H.fontTextcase,lineposition:H.fontLineposition,shadow:H.fontShadow}).text(H.text).call(qb.convertToTspans,e),e._promises[oe]?h.push(e._promises.pop().then(function(){d(re,u)})):d(re,u)}),NL(t,[yse]),f.exit().remove(),r.repositionOnUpdate&&f.each(function(H){w0.select(this).select("text").call(qb.positionText,l.xFn(H),l.yFn(H))});function d(H,re){H.each(function(oe){var _e=w0.select(this),ke=_e.select(".text-math-group"),Ce=l.anchorFn(oe,re),ge=r.transFn.call(_e.node(),oe)+(zh(re)&&+re!=0?" rotate("+re+","+l.xFn(oe)+","+(l.yFn(oe)-oe.fontSize/2)+")":""),ie=qb.lineCount(_e),Se=hM*oe.fontSize,Ee=l.heightFn(oe,zh(re)?+re:0,(ie-1)*Se);if(Ee&&(ge+=j3(0,Ee)),ke.empty()){var we=_e.select("text");we.attr({transform:ge,"text-anchor":Ce}),we.style("display",null),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var De=Xp.bBox(ke.node()).width,Le=De*{end:-.5,start:.5}[Ce];ke.attr("transform",ge+j3(Le,0))}})}t._adjustTickLabelsOverflow=function(){var H=t.ticklabeloverflow;if(!(!H||H==="allow")){var re=H.indexOf("hide")!==-1,oe=t._id.charAt(0)==="x",_e=0,ke=oe?e._fullLayout.width:e._fullLayout.height;if(H.indexOf("domain")!==-1){var Ce=Wo.simpleMap(t.range,t.r2l);_e=t.l2p(Ce[0])+t._offset,ke=t.l2p(Ce[1])+t._offset}var ge=Math.min(_e,ke),ie=Math.max(_e,ke),Se=t.side,Ee=1/0,we=-1/0;f.each(function(Pe){var ce=w0.select(this),He=ce.select(".text-math-group");if(He.empty()){var lt=Xp.bBox(ce.node()),mt=0;oe?(lt.right>ie||lt.leftie||lt.top+(t.tickangle?0:Pe.fontSize/4)t["_visibleLabelMin_"+Ce._id]?ce.style("display","none"):ie.K==="tick"&&!ge&&ce.node().style.display!=="none"&&ce.style("display",null)})})})})},d(f,c+1?c:u);function v(){return h.length&&Promise.all(h)}var m=null;function b(){if(d(f,u),s.length&&t.autotickangles&&(t.type!=="log"||String(t.dtick).charAt(0)!=="D")){m=t.autotickangles[0];var H=0,re=[],oe,_e=1;f.each(function(je){H=Math.max(H,je.fontSize);var Ue=t.l2p(je.x),Ae=gB(this),rt=Xp.bBox(Ae.node());_e=Math.max(_e,qb.lineCount(Ae)),re.push({top:0,bottom:10,height:10,left:Ue-rt.width/2,right:Ue+rt.width/2+2,width:rt.width+2})});var ke=(t.tickson==="boundaries"||t.showdividers)&&!r.secondary,Ce=s.length,ge=Math.abs((s[Ce-1].x-s[0].x)*t._m)/(Ce-1),ie=ke?ge/2:ge,Se=ke?t.ticklen:H*1.25*_e,Ee=Math.sqrt(Math.pow(ie,2)+Math.pow(Se,2)),we=ie/Ee,De=t.autotickangles.map(function(je){return je*Math.PI/180}),Le=De.find(function(je){return Math.abs(Math.cos(je))<=we});Le===void 0&&(Le=De.reduce(function(je,Ue){return Math.abs(Math.cos(je))Z*G&&(z=G,g[S]=P[S]=q[S])}var j=Math.abs(z-E);j-L>0?(j-=L,L*=1+L/j):L=0,t._id.charAt(0)!=="y"&&(L=-L),g[C]=M.p2r(M.r2p(P[C])+x*L),M.autorange==="min"||M.autorange==="max reversed"?(g[0]=null,M._rangeInitial0=void 0,M._rangeInitial1=void 0):(M.autorange==="max"||M.autorange==="min reversed")&&(g[1]=null,M._rangeInitial0=void 0,M._rangeInitial1=void 0),n._insideTickLabelsUpdaterange[M._name+".range"]=g}var N=Wo.syncOrAsync(p);return N&&N.then&&e._promises.push(N),N};function wlt(e,t,r){var n=t._id+"divider",i=r.vals,a=r.layer.selectAll("path."+n).data(i,BL);a.exit().remove(),a.enter().insert("path",":first-child").classed(n,1).classed("crisp",1).call(cM.stroke,t.dividercolor).style("stroke-width",Xp.crispRound(e,t.dividerwidth,1)+"px"),a.attr("transform",r.transFn).attr("d",r.path)}$n.getPxPosition=function(e,t){var r=e._fullLayout._size,n=t._id.charAt(0),i=t.side,a;if(t.anchor!=="free"?a=t._anchorAxis:n==="x"?a={_offset:r.t+(1-(t.position||0))*r.h,_length:0}:n==="y"&&(a={_offset:r.l+(t.position||0)*r.w+t._shift,_length:0}),i==="top"||i==="left")return a._offset;if(i==="bottom"||i==="right")return a._offset+a._length};function Ese(e){var t=e.title.font.size,r=(e.title.text.match(qb.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?t*(Bb+r*hM):r?t*(r+1)*hM:t}function Tlt(e,t){var r=e._fullLayout,n=t._id,i=n.charAt(0),a=t.title.font.size,o,s=(t.title.text.match(qb.BR_TAG_ALL)||[]).length;if(t.title.hasOwnProperty("standoff"))t.side==="bottom"||t.side==="right"?o=t._depth+t.title.standoff+a*Bb:(t.side==="top"||t.side==="left")&&(o=t._depth+t.title.standoff+a*(lM+s*hM));else{var l=vM(t);if(t.type==="multicategory")o=t._depth;else{var u=1.5*a;l&&(u=.5*a,t.ticks==="outside"&&(u+=t.ticklen)),o=10+u+(t.linewidth?t.linewidth-1:0)}l||(i==="x"?o+=t.side==="top"?a*(t.showticklabels?1:0):a*(t.showticklabels?1.5:.5):o+=t.side==="right"?a*(t.showticklabels?1:.5):a*(t.showticklabels?.5:0))}var c=$n.getPxPosition(e,t),f,h,d;i==="x"?(h=t._offset+t._length/2,d=t.side==="top"?c-o:c+o):(d=t._offset+t._length/2,h=t.side==="right"?c+o:c-o,f={rotate:"-90",offset:0});var v;if(t.type!=="multicategory"){var m=t._selections[t._id+"tick"];if(v={selection:m,side:t.side},m&&m.node()&&m.node().parentNode){var b=Xp.getTranslate(m.node().parentNode);v.offsetLeft=b.x,v.offsetTop=b.y}t.title.hasOwnProperty("standoff")&&(v.pad=0)}return t._titleStandoff=o,Vst.draw(e,n+"title",{propContainer:t,propName:t._name+".title.text",placeholder:r._dfltTitle[i],avoid:v,transform:f,attributes:{x:h,y:d,"text-anchor":"middle"}})}$n.shouldShowZeroLine=function(e,t,r){var n=Wo.simpleMap(t.range,t.r2l);return n[0]*n[1]<=0&&t.zeroline&&(t.type==="linear"||t.type==="-")&&!(t.rangebreaks&&t.maskBreaks(0)===qL)&&(zse(t,0)||!Alt(e,t,r,n)||Slt(e,t))};$n.clipEnds=function(e,t){return t.filter(function(r){return zse(e,r.x)})};function zse(e,t){var r=e.l2p(t);return r>1&&r1)for(i=1;i=i.min&&e=Zst:/%L/.test(t)?e>=Xst:/%[SX]/.test(t)?e>=FL:/%M/.test(t)?e>=fM:/%[HI]/.test(t)?e>=wm:/%p/.test(t)?e>=v_:/%[Aadejuwx]/.test(t)?e>=qv:/%[UVW]/.test(t)?e>=Zp:/%[Bbm]/.test(t)?e>=DL:/%[q]/.test(t)?e>=RL:/%[Yy]/.test(t)?e>=IL:!0}});var TB=ye((far,Nse)=>{"use strict";Nse.exports=function(t,r,n){var i,a;if(n){var o=r==="reversed"||r==="min reversed"||r==="max reversed";i=n[o?1:0],a=n[o?0:1]}var s=t("autorangeoptions.minallowed",a===null?i:void 0),l=t("autorangeoptions.maxallowed",i===null?a:void 0);s===void 0&&t("autorangeoptions.clipmin"),l===void 0&&t("autorangeoptions.clipmax"),t("autorangeoptions.include")}});var AB=ye((har,Use)=>{"use strict";var Plt=TB();Use.exports=function(t,r,n,i){var a=r._template||{},o=r.type||a.type||"-";n("minallowed"),n("maxallowed");var s=n("range");if(!s){var l;!i.noInsiderange&&o!=="log"&&(l=n("insiderange"),l&&(l[0]===null||l[1]===null)&&(r.insiderange=!1,l=void 0),l&&(s=n("range",l)))}var u=r.getAutorangeDflt(s,i),c=n("autorange",u),f;s&&(s[0]===null&&s[1]===null||(s[0]===null||s[1]===null)&&(c==="reversed"||c===!0)||s[0]!==null&&(c==="min"||c==="max reversed")||s[1]!==null&&(c==="max"||c==="min reversed"))&&(s=void 0,delete r.range,r.autorange=!0,f=!0),f||(u=r.getAutorangeDflt(s,i),c=n("autorange",u)),c&&(Plt(n,c,s),(o==="linear"||o==="-")&&n("rangemode")),r.cleanRange()}});var Gse=ye((dar,Vse)=>{var Ilt={left:0,top:0};Vse.exports=Rlt;function Rlt(e,t,r){t=t||e.currentTarget||e.srcElement,Array.isArray(r)||(r=[0,0]);var n=e.clientX||0,i=e.clientY||0,a=Dlt(t);return r[0]=n-a.left,r[1]=i-a.top,r}function Dlt(e){return e===window||e===document||e===document.body?Ilt:e.getBoundingClientRect()}});var UL=ye((par,Hse)=>{"use strict";var Flt=oO();function zlt(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(r){e=!1}return e}Hse.exports=Flt&&zlt()});var Wse=ye((gar,jse)=>{"use strict";jse.exports=function(t,r,n,i,a){var o=(t-n)/(i-n),s=o+r/(i-n),l=(o+s)/2;return a==="left"||a==="bottom"?o:a==="center"||a==="middle"?l:a==="right"||a==="top"?s:o<2/3-l?o:s>4/3-l?s:l}});var Yse=ye((mar,Zse)=>{"use strict";var Xse=Pr(),qlt=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];Zse.exports=function(t,r,n,i){return n==="left"?t=0:n==="center"?t=1:n==="right"?t=2:t=Xse.constrain(Math.floor(t*3),0,2),i==="bottom"?r=0:i==="middle"?r=1:i==="top"?r=2:r=Xse.constrain(Math.floor(r*3),0,2),qlt[r][t]}});var Jse=ye((yar,Kse)=>{"use strict";var Olt=C3(),Blt=H6(),Nlt=HS().getGraphDiv,Ult=NS(),SB=Kse.exports={};SB.wrapped=function(e,t,r){e=Nlt(e),e._fullLayout&&Blt.clear(e._fullLayout._uid+Ult.HOVERID),SB.raw(e,t,r)};SB.raw=function(t,r){var n=t._fullLayout,i=t._hoverdata;r||(r={}),!(r.target&&!t._dragged&&Olt.triggerHandler(t,"plotly_beforehover",r)===!1)&&(n._hoverlayer.selectAll("g").remove(),n._hoverlayer.selectAll("line").remove(),n._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,r.target&&i&&t.emit("plotly_unhover",{event:r,points:i}))}});var yv=ye((_ar,tle)=>{"use strict";var Vlt=Gse(),MB=lO(),Glt=UL(),Hlt=Pr().removeElement,jlt=Rh(),Nb=tle.exports={};Nb.align=Wse();Nb.getCursor=Yse();var Qse=Jse();Nb.unhover=Qse.wrapped;Nb.unhoverRaw=Qse.raw;Nb.init=function(t){var r=t.gd,n=1,i=r._context.doubleClickDelay,a=t.element,o,s,l,u,c,f,h,d;r._mouseDownTime||(r._mouseDownTime=0),a.style.pointerEvents="all",a.onmousedown=b,Glt?(a._ontouchstart&&a.removeEventListener("touchstart",a._ontouchstart),a._ontouchstart=b,a.addEventListener("touchstart",b,{passive:!1})):a.ontouchstart=b;function v(M,T,L){return Math.abs(M)i&&(n=Math.max(n-1,1)),r._dragged)t.doneFn&&t.doneFn();else{var T;f.target===h?T=f:(T={target:h,srcElement:h,toElement:h},Object.keys(f).concat(Object.keys(f.__proto__)).forEach(L=>{var x=f[L];!T[L]&&typeof x!="function"&&(T[L]=x)})),t.clickFn&&t.clickFn(n,T),d||h.dispatchEvent(new MouseEvent("click",M))}r._dragging=!1,r._dragged=!1}};function ele(){var e=document.createElement("div");e.className="dragcover";var t=e.style;return t.position="fixed",t.left=0,t.right=0,t.top=0,t.bottom=0,t.zIndex=999999999,t.background="none",document.body.appendChild(e),e}Nb.coverSlip=ele;function $se(e){return Vlt(e.changedTouches?e.changedTouches[0]:e,document.body)}});var Eg=ye((xar,rle)=>{"use strict";rle.exports=function(t,r){(t.attr("class")||"").split(" ").forEach(function(n){n.indexOf("cursor-")===0&&t.classed(n,!1)}),r&&t.classed("cursor-"+r,!0)}});var ale=ye((bar,nle)=>{"use strict";var EB=Eg(),pM="data-savedcursor",ile="!!";nle.exports=function(t,r){var n=t.attr(pM);if(r){if(!n){for(var i=(t.attr("class")||"").split(" "),a=0;a{"use strict";var kB=ec(),Wlt=Ih();ole.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:Wlt.defaultLine,editType:"legend"},maxheight:{valType:"number",min:0,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:kB({editType:"legend"}),grouptitlefont:kB({editType:"legend"}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend"},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend"},entrywidth:{valType:"number",min:0,editType:"legend"},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend"},indentation:{valType:"number",min:-15,dflt:0,editType:"legend"},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend"},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend"},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend"},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend"},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend"},titleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],editType:"legend"},titledoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],editType:"legend"},x:{valType:"number",editType:"legend"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend"},y:{valType:"number",editType:"legend"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend"},uirevision:{valType:"any",editType:"none"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend"},title:{text:{valType:"string",dflt:"",editType:"legend"},font:kB({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}});var mM=ye(gM=>{"use strict";gM.isGrouped=function(t){return(t.traceorder||"").indexOf("grouped")!==-1};gM.isVertical=function(t){return t.orientation!=="h"};gM.isReversed=function(t){return(t.traceorder||"").indexOf("reversed")!==-1};gM.getId=function(t){return t._id||"legend"}});var PB=ye((Aar,sle)=>{"use strict";var VL=Oa(),Yp=Pr(),Xlt=vl(),Zlt=Gl(),Ylt=CB(),Klt=x3(),LB=mM();function Jlt(e,t,r,n,i){var a=t[e]||{},o=Xlt.newContainer(r,e);function s(H,re){return Yp.coerce(a,o,Ylt,H,re)}var l=Yp.coerceFont(s,"font",r.font);s("bgcolor",r.paper_bgcolor),s("bordercolor");var u=s("visible");if(!u)return;var c,f=function(H,re){var oe=c._input,_e=c;return Yp.coerce(oe,_e,Zlt,H,re)},h=r.font||{},d=Yp.coerceFont(s,"grouptitlefont",h,{overrideDflt:{size:Math.round(h.size*1.1)}}),v=0,m=!1,b="normal",p=(r.shapes||[]).filter(function(H){return H.showlegend});function k(H){return VL.traceIs(H,"pie-like")&&H._length!=null&&(Array.isArray(H.legend)||Array.isArray(H.showlegend))}n.filter(k).forEach(function(H){H.visible&&v++;for(var re=0;reH.legend.length)for(var _e=H.legend.length;_e(e==="legend"?1:0));if(x===!1&&(r[e]=void 0),!(x===!1&&!a.uirevision)&&(s("uirevision",r.uirevision),x!==!1)){s("borderwidth");var C=s("orientation"),S=s("yref"),g=s("xref"),P=C==="h",E=S==="paper",z=g==="paper",q,U,G,Z="left";P?(q=0,VL.getComponentMethod("rangeslider","isVisible")(t.xaxis)?E?(U=1.1,G="bottom"):(U=1,G="top"):E?(U=-.1,G="top"):(U=0,G="bottom")):(U=1,G="auto",z?q=1.02:(q=1,Z="right")),Yp.coerce(a,o,{x:{valType:"number",editType:"legend",min:z?-2:0,max:z?3:1,dflt:q}},"x"),Yp.coerce(a,o,{y:{valType:"number",editType:"legend",min:E?-2:0,max:E?3:1,dflt:U}},"y"),s("traceorder",b),LB.isGrouped(r[e])&&s("tracegroupgap"),s("entrywidth"),s("entrywidthmode"),s("indentation"),s("itemsizing"),s("itemwidth"),s("itemclick"),s("itemdoubleclick"),s("groupclick"),s("xanchor",Z),s("yanchor",G),s("maxheight"),s("valign"),Yp.noneOrAll(a,o,["x","y"]);var j=s("title.text");if(j){s("title.side",P?"left":"top");var N=Yp.extendFlat({},l,{size:Yp.bigFont(l.size)});Yp.coerceFont(s,"title.font",N);let H=i>1;s("titleclick",H?"toggle":!1),s("titledoubleclick",H?"toggleothers":!1)}}}sle.exports=function(t,r,n){var i,a=n.slice(),o=r.shapes;if(o)for(i=0;i{"use strict";var p_=Oa(),IB=Pr(),$lt=IB.pushUnique,Qlt=mM(),lle=!0;RB.handleItemClick=function(t,r,n,i){var a=r._fullLayout;if(r._dragged||r._editing)return;var o=t.data()[0][0];if(o.groupTitle&&o.noClick)return;var s=n.groupclick;i==="toggle"&&n.itemdoubleclick==="toggleothers"&&lle&&r.data&&r._context.showTips&&(IB.notifier(IB._(r,"Double-click on legend to isolate one trace"),"long",r),lle=!1);var l=s==="togglegroup",u=a.hiddenlabels?a.hiddenlabels.slice():[],c=r._fullData,f=(a.shapes||[]).filter(function(st){return st.showlegend}),h=c.concat(f),d=o.trace;d._isShape&&(d=d._fullInput);var v=d.legendgroup,m,b,p,k,M,T,L={},x=[],C=[],S=[];function g(st,ct){var Qt=x.indexOf(st),Ht=L.visible;return Ht||(Ht=L.visible=[]),x.indexOf(st)===-1&&(x.push(st),Qt=x.length-1),Ht[Qt]=ct,Qt}var P=(a.shapes||[]).map(function(st){return st._input}),E=!1;function z(st,ct){P[st].visible=ct,E=!0}function q(st,ct){if(!(o.groupTitle&&!l)){var Qt=st._fullInput||st,Ht=Qt._isShape,nr=Qt.index;nr===void 0&&(nr=Qt._index);var tt=Qt.visible===!1?!1:ct;Ht?z(nr,tt):g(nr,tt)}}var U=d.legend,G=d._fullInput,Z=G&&G._isShape;if(!Z&&p_.traceIs(d,"pie-like")){var j=o.label,N=u.indexOf(j);if(i==="toggle")N===-1?u.push(j):u.splice(N,1);else if(i==="toggleothers"){var H=N!==-1,re=[];for(m=0;m{"use strict";ule.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}});var hle=ye((Ear,fle)=>{"use strict";var cle=Oa(),zB=mM();fle.exports=function(t,r,n){var i=r._inHover,a=zB.isGrouped(r),o=zB.isReversed(r),s={},l=[],u=!1,c={},f=0,h=0,d,v;function m(H,re,oe){if(r.visible!==!1&&!(n&&H!==r._id))if(re===""||!zB.isGrouped(r)){var _e="~~i"+f;l.push(_e),s[_e]=[oe],f++}else l.indexOf(re)===-1?(l.push(re),u=!0,s[re]=[oe]):s[re].push(oe)}for(d=0;dz&&(E=z)}g[d][0]._groupMinRank=E,g[d][0]._preGroupSort=d}var q=function(H,re){return H[0]._groupMinRank-re[0]._groupMinRank||H[0]._preGroupSort-re[0]._preGroupSort},U=function(H,re){return H.trace.legendrank-re.trace.legendrank||H._preSort-re._preSort};for(g.forEach(function(H,re){H[0]._preGroupSort=re}),g.sort(q),d=0;d{"use strict";var GL=Pr();function dle(e){return e.indexOf("e")!==-1?e.replace(/[.]?0+e/,"e"):e.indexOf(".")!==-1?e.replace(/[.]?0+$/,""):e}Ub.formatPiePercent=function(t,r){var n=dle((t*100).toPrecision(3));return GL.numSeparate(n,r)+"%"};Ub.formatPieValue=function(t,r){var n=dle(t.toPrecision(10));return GL.numSeparate(n,r)};Ub.getFirstFilled=function(t,r){if(GL.isArrayOrTypedArray(t))for(var n=0;n{"use strict";var eut=So(),tut=ka();vle.exports=function(t,r,n,i){var a=n.marker.pattern;a&&a.shape?eut.pointStyle(t,n,i,r):tut.fill(t,r.color)}});var Z3=ye((Lar,yle)=>{"use strict";var gle=ka(),mle=g_().castOption,rut=ple();yle.exports=function(t,r,n,i){var a=n.marker.line,o=mle(a.color,r.pts)||gle.defaultLine,s=mle(a.width,r.pts)||0;t.call(rut,r,n,i).style("stroke-width",s).call(gle.stroke,o)}});var NB=ye((Par,Ale)=>{"use strict";var Ov=qa(),qB=Oa(),_v=Pr(),_le=_v.strTranslate,Kp=So(),T0=ka(),OB=pv().extractOpts,HL=Ru(),iut=Z3(),nut=g_().castOption,aut=FB(),xle=12,ble=5,Vb=2,out=10,Y3=5;Ale.exports=function(t,r,n){var i=r._fullLayout;n||(n=i.legend);var a=n.itemsizing==="constant",o=n.itemwidth,s=(o+aut.itemGap*2)/2,l=_le(s,0),u=function(C,S,g,P){var E;if(C+1)E=C;else if(S&&S.width>0)E=S.width;else return 0;return a?P:Math.min(E,g)};t.each(function(C){var S=Ov.select(this),g=_v.ensureSingle(S,"g","layers");g.style("opacity",C[0].trace.opacity);var P=n.indentation,E=n.valign,z=C[0].lineHeight,q=C[0].height;if(E==="middle"&&P===0||!z||!q)g.attr("transform",null);else{var U={top:1,bottom:-1}[E],G=U*(.5*(z-q+3))||0,Z=n.indentation;g.attr("transform",_le(Z,G))}var j=g.selectAll("g.legendfill").data([C]);j.enter().append("g").classed("legendfill",!0);var N=g.selectAll("g.legendlines").data([C]);N.enter().append("g").classed("legendlines",!0);var H=g.selectAll("g.legendsymbols").data([C]);H.enter().append("g").classed("legendsymbols",!0),H.selectAll("g.legendpoints").data([C]).enter().append("g").classed("legendpoints",!0)}).each(x).each(h).each(v).each(d).each(b).each(T).each(M).each(c).each(f).each(p).each(k);function c(C){var S=wle(C),g=S.showFill,P=S.showLine,E=S.showGradientLine,z=S.showGradientFill,q=S.anyFill,U=S.anyLine,G=C[0],Z=G.trace,j,N,H=OB(Z),re=H.colorscale,oe=H.reversescale,_e=function(we){if(we.size())if(g)Kp.fillGroupStyle(we,r,!0);else{var De="legendfill-"+Z.uid;Kp.gradient(we,r,De,BB(oe),re,"fill")}},ke=function(we){if(we.size()){var De="legendline-"+Z.uid;Kp.lineGroupStyle(we),Kp.gradient(we,r,De,BB(oe),re,"stroke")}},Ce=HL.hasMarkers(Z)||!q?"M5,0":U?"M5,-2":"M5,-3",ge=Ov.select(this),ie=ge.select(".legendfill").selectAll("path").data(g||z?[C]:[]);if(ie.enter().append("path").classed("js-fill",!0),ie.exit().remove(),ie.attr("d",Ce+"h"+o+"v6h-"+o+"z").call(_e),P||E){var Se=u(void 0,Z.line,out,ble);N=_v.minExtend(Z,{line:{width:Se}}),j=[_v.minExtend(G,{trace:N})]}var Ee=ge.select(".legendlines").selectAll("path").data(P||E?[j]:[]);Ee.enter().append("path").classed("js-line",!0),Ee.exit().remove(),Ee.attr("d",Ce+(E?"l"+o+",0.0001":"h"+o)).call(P?Kp.lineGroupStyle:ke)}function f(C){var S=wle(C),g=S.anyFill,P=S.anyLine,E=S.showLine,z=S.showMarker,q=C[0],U=q.trace,G=!z&&!P&&!g&&HL.hasText(U),Z,j;function N(ie,Se,Ee,we){var De=_v.nestedProperty(U,ie).get(),Le=_v.isArrayOrTypedArray(De)&&Se?Se(De):De;if(a&&Le&&we!==void 0&&(Le=we),Ee){if(LeEe[1])return Ee[1]}return Le}function H(ie){return q._distinct&&q.index&&ie[q.index]?ie[q.index]:ie[0]}if(z||G||E){var re={},oe={};if(z){re.mc=N("marker.color",H),re.mx=N("marker.symbol",H),re.mo=N("marker.opacity",_v.mean,[.2,1]),re.mlc=N("marker.line.color",H),re.mlw=N("marker.line.width",_v.mean,[0,5],Vb),re.mld=U._isShape?"solid":N("marker.line.dash",H),oe.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var _e=N("marker.size",_v.mean,[2,16],xle);re.ms=_e,oe.marker.size=_e}E&&(oe.line={width:N("line.width",H,[0,10],ble)}),G&&(re.tx="Aa",re.tp=N("textposition",H),re.ts=10,re.tc=N("textfont.color",H),re.tf=N("textfont.family",H),re.tw=N("textfont.weight",H),re.ty=N("textfont.style",H),re.tv=N("textfont.variant",H),re.tC=N("textfont.textcase",H),re.tE=N("textfont.lineposition",H),re.tS=N("textfont.shadow",H)),Z=[_v.minExtend(q,re)],j=_v.minExtend(U,oe),j.selectedpoints=null,j.texttemplate=null}var ke=Ov.select(this).select("g.legendpoints"),Ce=ke.selectAll("path.scatterpts").data(z?Z:[]);Ce.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",l),Ce.exit().remove(),Ce.call(Kp.pointStyle,j,r),z&&(Z[0].mrc=3);var ge=ke.selectAll("g.pointtext").data(G?Z:[]);ge.enter().append("g").classed("pointtext",!0).append("text").attr("transform",l),ge.exit().remove(),ge.selectAll("text").call(Kp.textPointStyle,j,r)}function h(C){var S=C[0].trace,g=S.type==="waterfall";if(C[0]._distinct&&g){var P=C[0].trace[C[0].dir].marker;return C[0].mc=P.color,C[0].mlw=P.line.width,C[0].mlc=P.line.color,m(C,this,"waterfall")}var E=[];S.visible&&g&&(E=C[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var z=Ov.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(E);z.enter().append("path").classed("legendwaterfall",!0).attr("transform",l).style("stroke-miterlimit",1),z.exit().remove(),z.each(function(q){var U=Ov.select(this),G=S[q[0]].marker,Z=u(void 0,G.line,Y3,Vb);U.attr("d",q[1]).style("stroke-width",Z+"px").call(T0.fill,G.color),Z&&U.call(T0.stroke,G.line.color)})}function d(C){m(C,this)}function v(C){m(C,this,"funnel")}function m(C,S,g){var P=C[0].trace,E=P.marker||{},z=E.line||{},q=E.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",U=g?P.visible&&P.type===g:qB.traceIs(P,"bar"),G=Ov.select(S).select("g.legendpoints").selectAll("path.legend"+g).data(U?[C]:[]);G.enter().append("path").classed("legend"+g,!0).attr("d",q).attr("transform",l),G.exit().remove(),G.each(function(Z){var j=Ov.select(this),N=Z[0],H=u(N.mlw,E.line,Y3,Vb);j.style("stroke-width",H+"px");var re=N.mcc;if(!n._inHover&&"mc"in N){var oe=OB(E),_e=oe.mid;_e===void 0&&(_e=(oe.max+oe.min)/2),re=Kp.tryColorscale(E,"")(_e)}var ke=re||N.mc||E.color,Ce=E.pattern,ge=Kp.getPatternAttr,ie=Ce&&(ge(Ce.shape,0,"")||ge(Ce.path,0,""));if(ie){var Se=ge(Ce.bgcolor,0,null),Ee=ge(Ce.fgcolor,0,null),we=Ce.fgopacity,De=Tle(Ce.size,8,10),Le=Tle(Ce.solidity,.5,1),me="legend-"+P.uid;j.call(Kp.pattern,"legend",r,me,ie,De,Le,re,Ce.fillmode,Se,Ee,we)}else j.call(T0.fill,ke);H&&T0.stroke(j,N.mlc||z.color)})}function b(C){var S=C[0].trace,g=Ov.select(this).select("g.legendpoints").selectAll("path.legendbox").data(S.visible&&qB.traceIs(S,"box-violin")?[C]:[]);g.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",l),g.exit().remove(),g.each(function(){var P=Ov.select(this);if((S.boxpoints==="all"||S.points==="all")&&T0.opacity(S.fillcolor)===0&&T0.opacity((S.line||{}).color)===0){var E=_v.minExtend(S,{marker:{size:a?xle:_v.constrain(S.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});g.call(Kp.pointStyle,E,r)}else{var z=u(void 0,S.line,Y3,Vb);P.style("stroke-width",z+"px").call(T0.fill,S.fillcolor),z&&T0.stroke(P,S.line.color)}})}function p(C){var S=C[0].trace,g=Ov.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(S.visible&&S.type==="candlestick"?[C,C]:[]);g.enter().append("path").classed("legendcandle",!0).attr("d",function(P,E){return E?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",l).style("stroke-miterlimit",1),g.exit().remove(),g.each(function(P,E){var z=Ov.select(this),q=S[E?"increasing":"decreasing"],U=u(void 0,q.line,Y3,Vb);z.style("stroke-width",U+"px").call(T0.fill,q.fillcolor),U&&T0.stroke(z,q.line.color)})}function k(C){var S=C[0].trace,g=Ov.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(S.visible&&S.type==="ohlc"?[C,C]:[]);g.enter().append("path").classed("legendohlc",!0).attr("d",function(P,E){return E?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",l).style("stroke-miterlimit",1),g.exit().remove(),g.each(function(P,E){var z=Ov.select(this),q=S[E?"increasing":"decreasing"],U=u(void 0,q.line,Y3,Vb);z.style("fill","none").call(Kp.dashLine,q.line.dash,U),U&&T0.stroke(z,q.line.color)})}function M(C){L(C,this,"pie")}function T(C){L(C,this,"funnelarea")}function L(C,S,g){var P=C[0],E=P.trace,z=g?E.visible&&E.type===g:qB.traceIs(E,g),q=Ov.select(S).select("g.legendpoints").selectAll("path.legend"+g).data(z?[C]:[]);if(q.enter().append("path").classed("legend"+g,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",l),q.exit().remove(),q.size()){var U=E.marker||{},G=u(nut(U.line.width,P.pts),U.line,Y3,Vb),Z="pieLike",j=_v.minExtend(E,{marker:{line:{width:G}}},Z),N=_v.minExtend(P,{trace:j},Z);iut(q,N,j,r)}}function x(C){var S=C[0].trace,g,P=[];if(S.visible)switch(S.type){case"histogram2d":case"heatmap":P=[["M-15,-2V4H15V-2Z"]],g=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":P=[["M-6,-6V6H6V-6Z"]],g=!0;break;case"densitymapbox":case"densitymap":P=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],g="radial";break;case"cone":P=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],g=!1;break;case"streamtube":P=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],g=!1;break;case"surface":P=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],g=!0;break;case"mesh3d":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],g=!1;break;case"volume":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],g=!0;break;case"isosurface":P=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],g=!1;break}var E=Ov.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(P);E.enter().append("path").classed("legend3dandfriends",!0).attr("transform",l).style("stroke-miterlimit",1),E.exit().remove(),E.each(function(z,q){var U=Ov.select(this),G=OB(S),Z=G.colorscale,j=G.reversescale,N=function(_e){if(_e.size()){var ke="legendfill-"+S.uid;Kp.gradient(_e,r,ke,BB(j,g==="radial"),Z,"fill")}},H;if(Z){if(!g){var oe=Z.length;H=q===0?Z[j?oe-1:0][1]:q===1?Z[j?0:oe-1][1]:Z[Math.floor((oe-1)/2)][1]}}else{var re=S.vertexcolor||S.facecolor||S.color;H=_v.isArrayOrTypedArray(re)?re[q]||re[0]:re}U.attr("d",z[0]),H?U.call(T0.fill,H):U.call(N)})}};function BB(e,t){var r=t?"radial":"horizontal";return r+(e?"":"reversed")}function wle(e){var t=e[0].trace,r=t.contours,n=HL.hasLines(t),i=HL.hasMarkers(t),a=t.visible&&t.fill&&t.fill!=="none",o=!1,s=!1;if(r){var l=r.coloring;l==="lines"?o=!0:n=l==="none"||l==="heatmap"||r.showlines,r.type==="constraint"?a=r._operation!=="=":(l==="fill"||l==="heatmap")&&(s=!0)}return{showMarker:i,showLine:n,showFill:a,showGradientLine:o,showGradientFill:s,anyLine:n||o,anyFill:a||s}}function Tle(e,t,r){return e&&_v.isArrayOrTypedArray(e)?t:e>r?r:e}});var HB=ye((Iar,Rle)=>{"use strict";var np=qa(),vh=Pr(),VB=Mc(),Gb=Oa(),XL=C3(),UB=yv(),ph=So(),yM=ka(),Hb=Zl(),Sle=DB().handleItemClick,Mle=DB().handleTitleClick,qh=FB(),GB=Dh(),Ple=GB.LINE_SPACING,J3=GB.FROM_TL,Ele=GB.FROM_BR,kle=hle(),sut=NB(),$3=mM(),K3=1,lut=/^legend[0-9]*$/;Rle.exports=function(t,r){if(r)Cle(t,r);else{var n=t._fullLayout,i=n._legends,a=n._infolayer.selectAll('[class^="legend"]');a.each(function(){var u=np.select(this),c=u.attr("class"),f=c.split(" ")[0];f.match(lut)&&i.indexOf(f)===-1&&u.remove()});for(var o=0;o1)}var v=n.hiddenlabels||[];if(!s&&(!n.showlegend||!l.length))return o.selectAll("."+i).remove(),n._topdefs.select("#"+a).remove(),VB.autoMargin(e,i);var m=vh.ensureSingle(o,"g",i,function(S){s||S.attr("pointer-events","all")}),b=vh.ensureSingleById(n._topdefs,"clipPath",a,function(S){S.append("rect")}),p=vh.ensureSingle(m,"rect","bg",function(S){S.attr("shape-rendering","crispEdges")});p.call(yM.stroke,r.bordercolor).call(yM.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px");var k=vh.ensureSingle(m,"g","scrollbox"),M=r.title;r._titleWidth=0,r._titleHeight=0;var T;M.text?(T=vh.ensureSingle(k,"text",i+"titletext"),T.attr("text-anchor","start").call(ph.font,M.font).text(M.text),WL(T,k,e,r,K3),!s&&(r.titleclick||r.titledoubleclick)&&hut(k,e,r,i)):(k.selectAll("."+i+"titletext").remove(),k.selectAll("."+i+"titletoggle").remove());var L=vh.ensureSingle(m,"rect","scrollbar",function(S){S.attr(qh.scrollBarEnterAttrs).call(yM.fill,qh.scrollBarColor)}),x=k.selectAll("g.groups").data(l);x.enter().append("g").attr("class","groups"),x.exit().remove();var C=x.selectAll("g.traces").data(vh.identity);C.enter().append("g").attr("class","traces"),C.exit().remove(),C.style("opacity",function(S){let g=S[0],P=g.trace;if(g.groupTitle){let E=P.legendgroup,z=(n.shapes||[]).filter(function(U){return U.showlegend});return e._fullData.concat(z).some(function(U){return U.legendgroup===E&&(U.legend||"legend")===i&&U.visible===!0})?1:.5}return Gb.traceIs(P,"pie-like")?v.indexOf(S[0].label)!==-1?.5:1:P.visible==="legendonly"?.5:1}).each(function(){np.select(this).call(cut,e,r)}).call(sut,e,r).each(function(S){s||S[0].groupTitle&&r.groupclick==="toggleitem"||np.select(this).call(fut,e,i)}),vh.syncOrAsync([VB.previousPromises,function(){return put(e,x,C,r,k)},function(){var S=n._size,g=r.borderwidth,P=r.xref==="paper",E=r.yref==="paper";if(M.text){let He=(n.shapes||[]).filter(function(mt){return mt.showlegend}),lt=e._fullData.concat(He).some(function(mt){let Vt=mt.legend||"legend";var st=Array.isArray(Vt)?Vt.includes(i):Vt===i;return st&&mt.visible===!0});T.style("opacity",lt?1:.5)}if(!s){var z,q;P?z=S.l+S.w*r.x-J3[ZL(r)]*r._width:z=n.width*r.x-J3[ZL(r)]*r._width,E?q=S.t+S.h*(1-r.y)-J3[YL(r)]*r._effHeight:q=n.height*(1-r.y)-J3[YL(r)]*r._effHeight;var U=gut(e,i,z,q);if(U)return;if(n.margin.autoexpand){var G=z,Z=q;z=P?vh.constrain(z,0,n.width-r._width):G,q=E?vh.constrain(q,0,n.height-r._effHeight):Z,z!==G&&vh.log("Constrain "+i+".x to make legend fit inside graph"),q!==Z&&vh.log("Constrain "+i+".y to make legend fit inside graph")}ph.setTranslate(m,z,q)}if(L.on(".drag",null),m.on("wheel",null),s||r._height<=r._maxHeight||e._context.staticPlot){var j=r._effHeight;s&&(j=r._height),p.attr({width:r._width-g,height:j-g,x:g/2,y:g/2}),ph.setTranslate(k,0,0),b.select("rect").attr({width:r._width-2*g,height:j-2*g,x:g,y:g}),ph.setClipUrl(k,a,e),ph.setRect(L,0,0,0,0),delete r._scrollY}else{var N=Math.max(qh.scrollBarMinHeight,r._effHeight*r._effHeight/r._height),H=r._effHeight-N-2*qh.scrollBarMargin,re=r._height-r._effHeight,oe=H/re,_e=Math.min(r._scrollY||0,re);p.attr({width:r._width-2*g+qh.scrollBarWidth+qh.scrollBarMargin,height:r._effHeight-g,x:g/2,y:g/2}),b.select("rect").attr({width:r._width-2*g+qh.scrollBarWidth+qh.scrollBarMargin,height:r._effHeight-2*g,x:g,y:g+_e}),ph.setClipUrl(k,a,e),De(_e,N,oe),m.on("wheel",function(){_e=vh.constrain(r._scrollY+np.event.deltaY/re*H,0,re),De(_e,N,oe),_e!==0&&_e!==re&&np.event.preventDefault()});var ke,Ce,ge,ie=function(He,lt,mt){var Vt=(mt-lt)/oe+He;return vh.constrain(Vt,0,re)},Se=function(He,lt,mt){var Vt=(lt-mt)/oe+He;return vh.constrain(Vt,0,re)},Ee=np.behavior.drag().on("dragstart",function(){var He=np.event.sourceEvent;He.type==="touchstart"?ke=He.changedTouches[0].clientY:ke=He.clientY,ge=_e}).on("drag",function(){var He=np.event.sourceEvent;He.buttons===2||He.ctrlKey||(He.type==="touchmove"?Ce=He.changedTouches[0].clientY:Ce=He.clientY,_e=ie(ge,ke,Ce),De(_e,N,oe))});L.call(Ee);var we=np.behavior.drag().on("dragstart",function(){var He=np.event.sourceEvent;He.type==="touchstart"&&(ke=He.changedTouches[0].clientY,ge=_e)}).on("drag",function(){var He=np.event.sourceEvent;He.type==="touchmove"&&(Ce=He.changedTouches[0].clientY,_e=Se(ge,ke,Ce),De(_e,N,oe))});k.call(we)}function De(He,lt,mt){r._scrollY=e._fullLayout[i]._scrollY=He,ph.setTranslate(k,0,-He),ph.setRect(L,r._width,qh.scrollBarMargin+He*mt,qh.scrollBarWidth,lt),b.select("rect").attr("y",g+He)}if(e._context.edits.legendPosition){var Le,me,Pe,ce;m.classed("cursor-move",!0),UB.init({element:m.node(),gd:e,prepFn:function(He){if(He.target!==L.node()){var lt=ph.getTranslate(m);Pe=lt.x,ce=lt.y}},moveFn:function(He,lt){if(Pe!==void 0&&ce!==void 0){var mt=Pe+He,Vt=ce+lt;ph.setTranslate(m,mt,Vt),Le=UB.align(mt,r._width,S.l,S.l+S.w,r.xanchor),me=UB.align(Vt+r._height,-r._height,S.t+S.h,S.t,r.yanchor)}},doneFn:function(){if(Le!==void 0&&me!==void 0){var He={};He[i+".x"]=Le,He[i+".y"]=me,Gb.call("_guiRelayout",e,He)}},clickFn:function(He,lt){var mt=o.selectAll("g.traces").filter(function(){var Vt=this.getBoundingClientRect();return lt.clientX>=Vt.left&<.clientX<=Vt.right&<.clientY>=Vt.top&<.clientY<=Vt.bottom});mt.size()>0&&Ile(e,r,mt,He,lt)}})}}],e)}}function jL(e,t,r){var n=e[0],i=n.width,a=t.entrywidthmode,o=n.trace.legendwidth||t.entrywidth;return a==="fraction"?t._maxWidth*o:r+(o||i)}function Ile(e,t,r,n,i){var a=e._fullLayout,o=r.data()[0][0].trace,s=t.itemclick,l=t.itemdoubleclick,u={event:i,node:r.node(),curveNumber:o.index,expandedIndex:o.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:a};o._group&&(u.group=o._group),Gb.traceIs(o,"pie-like")&&(u.label=r.datum()[0].label);var c=XL.triggerHandler(e,"plotly_legendclick",u);if(n===1){if(c===!1)return;t._clickTimeout=setTimeout(function(){e._fullLayout&&s&&Sle(r,e,t,s)},e._context.doubleClickDelay)}else if(n===2){t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0;var f=XL.triggerHandler(e,"plotly_legenddoubleclick",u);f!==!1&&c!==!1&&l&&Sle(r,e,t,l)}}function cut(e,t,r){var n=$3.getId(r),i=e.data()[0][0],a=i.trace,o=Gb.traceIs(a,"pie-like"),s=!r._inHover&&t._context.edits.legendText&&!o,l=r._maxNameLength,u,c;i.groupTitle?(u=i.groupTitle.text,c=i.groupTitle.font):(c=r.font,r.entries?u=i.text:(u=o?i.label:a.name,a._meta&&(u=vh.templateString(u,a._meta))));var f=vh.ensureSingle(e,"text",n+"text");f.attr("text-anchor","start").call(ph.font,c).text(s?Lle(u,l):u);var h=r.indentation+r.itemwidth+qh.itemGap*2;Hb.positionText(f,h,0),s?f.call(Hb.makeEditable,{gd:t,text:u}).call(WL,e,t,r).on("edit",function(d){this.text(Lle(d,l)).call(WL,e,t,r);var v=i.trace._fullInput||{},m={};return m.name=d,v._isShape?Gb.call("_guiRelayout",t,"shapes["+a.index+"].name",m.name):Gb.call("_guiRestyle",t,m,a.index)}):WL(f,e,t,r)}function Lle(e,t){var r=Math.max(4,t);if(e&&e.trim().length>=r/2)return e;e=e||"";for(var n=r-e.length;n>0;n--)e+=" ";return e}function fut(e,t,r){var n=t._context.doubleClickDelay,i,a=1,o=vh.ensureSingle(e,"rect",r+"toggle",function(s){t._context.staticPlot||s.style("cursor","pointer").attr("pointer-events","all"),s.call(yM.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(o.on("mousedown",function(){i=new Date().getTime(),i-t._legendMouseDownTimen&&(a=Math.max(a-1,1)),Ile(t,s,e,a,np.event)}}))}function hut(e,t,r,n){if(t._fullData.some(function(u){let c=u.legend||"legend";return(Array.isArray(c)?c.includes(n):c===n)&&Gb.traceIs(u,"pie-like")}))return;let a=t._context.doubleClickDelay;var o,s=1;let l=vh.ensureSingle(e,"rect",n+"titletoggle",function(u){t._context.staticPlot||u.style("cursor","pointer").attr("pointer-events","all"),u.call(yM.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(l.on("mousedown",function(){o=new Date().getTime(),o-t._legendMouseDownTimea&&(s=Math.max(s-1,1));let u={event:np.event,legendId:n,data:t.data,layout:t.layout,fullData:t._fullData,fullLayout:t._fullLayout};if(s===1&&r.titleclick){if(XL.triggerHandler(t,"plotly_legendtitleclick",u)===!1)return;r._titleClickTimeout=setTimeout(function(){t._fullLayout&&Mle(t,r,r.titleclick)},a)}else s===2&&(r._titleClickTimeout&&clearTimeout(r._titleClickTimeout),t._legendMouseDownTime=0,XL.triggerHandler(t,"plotly_legendtitledoubleclick",u)!==!1&&r.titledoubleclick&&Mle(t,r,r.titledoubleclick))}))}function WL(e,t,r,n,i){n._inHover&&e.attr("data-notex",!0),Hb.convertToTspans(e,r,function(){dut(t,r,n,i)})}function dut(e,t,r,n){var i=e.data()[0][0],a=i&&i.trace.showlegend;if(Array.isArray(a)&&(a=a[i.i]!==!1),!r._inHover&&i&&!a){e.remove();return}var o=e.select("g[class*=math-group]"),s=o.node(),l=$3.getId(r);r||(r=t._fullLayout[l]);var u=r.borderwidth,c;n===K3?c=r.title.font:i.groupTitle?c=i.groupTitle.font:c=r.font;var f=c.size*Ple,h,d;if(s){var v=ph.bBox(s);h=v.height,d=v.width,n===K3?ph.setTranslate(o,u,u+h*.75):ph.setTranslate(o,0,h*.25)}else{var m="."+l+(n===K3?"title":"")+"text",b=e.select(m),p=Hb.lineCount(b),k=b.node();if(h=f*p,d=k?ph.bBox(k).width:0,n===K3)r.title.side==="left"&&(d+=qh.itemGap*2),Hb.positionText(b,u+qh.titlePad,u+f);else{var M=qh.itemGap*2+r.indentation+r.itemwidth;i.groupTitle&&(M=qh.itemGap,d-=r.indentation+r.itemwidth),Hb.positionText(b,M,-f*((p-1)/2-.3))}}n===K3?(r._titleWidth=d,r._titleHeight=h):(i.lineHeight=f,i.height=Math.max(h,16)+3,i.width=d)}function vut(e){var t=0,r=0,n=e.title.side;return n&&(n.indexOf("left")!==-1&&(t=e._titleWidth),n.indexOf("top")!==-1&&(r=e._titleHeight)),[t,r]}function put(e,t,r,n,i){var a=e._fullLayout,o=$3.getId(n);n||(n=a[o]);var s=a._size,l=$3.isVertical(n),u=$3.isGrouped(n),c=n.entrywidthmode==="fraction",f=n.borderwidth,h=2*f,d=qh.itemGap,v=n.indentation+n.itemwidth+d*2,m=2*(f+d),b=YL(n),p=n.y<0||n.y===0&&b==="top",k=n.y>1||n.y===1&&b==="bottom",M=n.tracegroupgap,T={};let{orientation:L,yref:x}=n,{maxheight:C}=n,S=p||k||L!=="v"||x!=="paper";C||(C=S?.5:1);let g=S?a.height:s.h;n._maxHeight=Math.max(C>1?C:C*g,30);var P=0;n._width=0,n._height=0;var E=vut(n);if(l)r.each(function(He){var lt=He[0].height;ph.setTranslate(this,f+E[0],f+E[1]+n._height+lt/2+d),n._height+=lt,n._width=Math.max(n._width,He[0].width)}),P=v+n._width,n._width+=d+v+h,n._height+=m,u&&(t.each(function(He,lt){ph.setTranslate(this,0,lt*n.tracegroupgap)}),n._height+=(n._lgroupsLength-1)*n.tracegroupgap);else{var z=ZL(n),q=n.x<0||n.x===0&&z==="right",U=n.x>1||n.x===1&&z==="left",G=k||p,Z=a.width/2;n._maxWidth=Math.max(q?G&&z==="left"?s.l+s.w:Z:U?G&&z==="right"?s.r+s.w:Z:s.w,2*v);var j=0,N=0;r.each(function(He){var lt=jL(He,n,v);j=Math.max(j,lt),N+=lt}),P=null;var H=0;if(u){var re=0,oe=0,_e=0;t.each(function(){var He=0,lt=0;np.select(this).selectAll("g.traces").each(function(Vt){var st=jL(Vt,n,v),ct=Vt[0].height;ph.setTranslate(this,E[0],E[1]+f+d+ct/2+lt),lt+=ct,He=Math.max(He,st),T[Vt[0].trace.legendgroup]=He});var mt=He+d;oe>0&&mt+f+oe>n._maxWidth?(H=Math.max(H,oe),oe=0,_e+=re+M,re=lt):re=Math.max(re,lt),ph.setTranslate(this,oe,_e),oe+=mt}),n._width=Math.max(H,oe)+f,n._height=_e+re+m}else{var ke=r.size(),Ce=N+h+(ke-1)*d=n._maxWidth&&(H=Math.max(H,Ee),ie=0,Se+=ge,n._height+=ge,ge=0),ph.setTranslate(this,E[0]+f+ie,E[1]+f+Se+lt/2+d),Ee=ie+mt+d,ie+=Vt,ge=Math.max(ge,lt)}),Ce?(n._width=ie+h,n._height=ge+m):(n._width=Math.max(H,Ee)+h,n._height+=ge+m)}}n._width=Math.ceil(Math.max(n._width+E[0],n._titleWidth+2*(f+qh.titlePad))),n._height=Math.ceil(Math.max(n._height+E[1],n._titleHeight+2*(f+qh.itemGap))),n._effHeight=Math.min(n._height,n._maxHeight);var we=e._context.edits,De=we.legendText||we.legendPosition;r.each(function(He){var lt=np.select(this).select("."+o+"toggle"),mt=He[0].height,Vt=He[0].trace.legendgroup,st=jL(He,n,v);u&&Vt!==""&&(st=T[Vt]);var ct=De?v:P||st;!l&&!c&&(ct+=d/2),ph.setRect(lt,0,-mt/2,ct,mt)});var Le=i.select("."+o+"titletext");Le.node()&&uut(Le,n,f);var me=i.select("."+o+"titletoggle");if(me.size()&&Le.node()){var Pe=Le.attr("x")||0,ce=qh.titlePad;ph.setRect(me,Pe-ce,f,n._titleWidth+2*ce,n._titleHeight+2*ce)}}function gut(e,t,r,n){var i=e._fullLayout,a=i[t],o=ZL(a),s=YL(a),l=a.xref==="paper",u=a.yref==="paper";e._fullLayout._reservedMargin[t]={};var c=a.y<.5?"b":"t",f=a.x<.5?"l":"r",h={r:i.width-r,l:r+a._width,b:i.height-n,t:n+a._effHeight};if(l&&u)return VB.autoMargin(e,t,{x:a.x,y:a.y,l:a._width*J3[o],r:a._width*Ele[o],b:a._effHeight*Ele[s],t:a._effHeight*J3[s]});l?e._fullLayout._reservedMargin[t][c]=h[c]:u||a.orientation==="v"?e._fullLayout._reservedMargin[t][f]=h[f]:e._fullLayout._reservedMargin[t][c]=h[c]}function ZL(e){return vh.isRightAnchor(e)?"right":vh.isCenterAnchor(e)?"center":"left"}function YL(e){return vh.isBottomAnchor(e)?"bottom":vh.isMiddleAnchor(e)?"middle":"top"}});var ZB=ye(XB=>{"use strict";var jb=qa(),Py=Eo(),Dle=fd(),zf=Pr(),mut=zf.pushUnique,jB=zf.strTranslate,yut=zf.strRotate,_ut=C3(),A0=Zl(),xut=ale(),Am=So(),vd=ka(),KL=yv(),Sm=ho(),but=Rh().zindexSeparator,eT=Oa(),kg=ip(),Wb=NS(),wut=PB(),Tut=HB(),Vle=Wb.YANGLE,WB=Math.PI*Vle/180,Aut=1/Math.sin(WB),Sut=Math.cos(WB),Mut=Math.sin(WB),Qc=Wb.HOVERARROWSIZE,sl=Wb.HOVERTEXTPAD,Fle={box:!0,ohlc:!0,violin:!0,candlestick:!0},Eut={scatter:!0,scattergl:!0,splom:!0};function zle(e,t){return e.distance-t.distance}XB.hover=function(t,r,n,i){t=zf.getGraphDiv(t);var a=r.target;zf.throttle(t._fullLayout._uid+Wb.HOVERID,Wb.HOVERMINTIME,function(){kut(t,r,n,i,a)})};XB.loneHover=function(t,r){var n=!0;Array.isArray(t)||(n=!1,t=[t]);var i=r.gd,a=Xle(i),o=Zle(i),s=t.map(function(b){var p=b._x0||b.x0||b.x||0,k=b._x1||b.x1||b.x||0,M=b._y0||b.y0||b.y||0,T=b._y1||b.y1||b.y||0,L=b.eventData;if(L){var x=Math.min(p,k),C=Math.max(p,k),S=Math.min(M,T),g=Math.max(M,T),P=b.trace;if(eT.traceIs(P,"gl3d")){var E=i._fullLayout[P.scene]._scene.container,z=E.offsetLeft,q=E.offsetTop;x+=z,C+=z,S+=q,g+=q}L.bbox={x0:x+o,x1:C+o,y0:S+a,y1:g+a},L.xPixel=(p+k)/2,L.yPixel=(M+T)/2,r.inOut_bbox&&r.inOut_bbox.push(L.bbox)}else L=!1;return{color:b.color||vd.defaultLine,x0:b.x0||b.x||0,x1:b.x1||b.x||0,y0:b.y0||b.y||0,y1:b.y1||b.y||0,xLabel:b.xLabel,yLabel:b.yLabel,zLabel:b.zLabel,text:b.text,name:b.name,idealAlign:b.idealAlign,borderColor:b.borderColor,fontFamily:b.fontFamily,fontSize:b.fontSize,fontColor:b.fontColor,fontWeight:b.fontWeight,fontStyle:b.fontStyle,fontVariant:b.fontVariant,nameLength:b.nameLength,textAlign:b.textAlign,trace:b.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:b.hovertemplate||!1,hovertemplateLabels:b.hovertemplateLabels||!1,eventData:L}}),l=!1,u=Hle(s,{gd:i,hovermode:"closest",rotateLabels:l,bgColor:r.bgColor||vd.background,container:jb.select(r.container),outerContainer:r.outerContainer||r.container}),c=u.hoverLabels,f=5,h=0,d=0;c.sort(function(b,p){return b.y0-p.y0}).each(function(b,p){var k=b.y0-b.by/2;k-fC[0]._length||ce<0||ce>S[0]._length)return KL.unhoverRaw(e,t)}if(t.pointerX=Pe+C[0]._offset,t.pointerY=ce+S[0]._offset,"xval"in t?Z=kg.flat(a,t.xval):Z=kg.p2c(C,Pe),"yval"in t?j=kg.flat(a,t.yval):j=kg.p2c(S,ce),!Py(Z[0])||!Py(j[0]))return zf.warn("Fx.hover failed",t,e),KL.unhoverRaw(e,t)}s.clickanywhere&&(e._hoverXVals=Z,e._hoverYVals=j,e._hoverXAxes=C,e._hoverYAxes=S);var mt=1/0;function Vt(Vi,Kn){for(H=0;HEe&&(U.splice(0,Ee),mt=U[0].distance),f&&q!==0&&U.length===0){Se.distance=q,Se.index=!1;var ir=oe._module.hoverPoints(Se,ge,ie,"closest",{hoverLayer:s._hoverlayer});if(ir&&(ir=ir.filter(function(Zi){return Zi.spikeDistance<=q})),ir&&ir.length){var wr,Xr=ir.filter(function(Zi){return Zi.xa.showspikes&&Zi.xa.spikesnap!=="hovered data"});if(Xr.length){var ti=Xr[0];Py(ti.x0)&&Py(ti.y0)&&(wr=ct(ti),(!we.vLinePoint||we.vLinePoint.spikeDistance>wr.spikeDistance)&&(we.vLinePoint=wr))}var $r=ir.filter(function(Zi){return Zi.ya.showspikes&&Zi.ya.spikesnap!=="hovered data"});if($r.length){var Ri=$r[0];Py(Ri.x0)&&Py(Ri.y0)&&(wr=ct(Ri),(!we.hLinePoint||we.hLinePoint.spikeDistance>wr.spikeDistance)&&(we.hLinePoint=wr))}}}}}Vt();function st(Vi,Kn,Jn){for(var Gt=null,wt=1/0,rr,ir=0;irVi.trace.index===pt.trace.index):U=[pt];var Xt=U.length,or=Ule("x",pt,s),_r=Ule("y",pt,s);Vt(or,_r);var Er=[],ei={},qr=0,jr=function(Vi){var Kn=Fle[Vi.trace.type]?Gle(Vi):Vi.trace.index;if(!ei[Kn])qr++,ei[Kn]=qr,Er.push(Vi);else{var Jn=ei[Kn]-1,Gt=Er[Jn];Jn>0&&Math.abs(Vi.distance)Xt-1;gt--)jr(U[gt]);U=Er,tt()}var Ge=e._hoverdata,Je=[],We=Xle(e),et=Zle(e);for(let Vi of U){var xt=kg.makeEventData(Vi,Vi.trace,Vi.cd);if(Vi.hovertemplate!==!1){var At=!1;Vi.cd[Vi.index]&&Vi.cd[Vi.index].ht&&(At=Vi.cd[Vi.index].ht),Vi.hovertemplate=At||Vi.trace.hovertemplate||!1}if(Vi.xa&&Vi.ya){var Kt=Vi.x0+Vi.xa._offset,er=Vi.x1+Vi.xa._offset,Sr=Vi.y0+Vi.ya._offset,Gr=Vi.y1+Vi.ya._offset,Ir=Math.min(Kt,er),Yr=Math.max(Kt,er),_i=Math.min(Sr,Gr),Pi=Math.max(Sr,Gr);xt.bbox={x0:Ir+et,x1:Yr+et,y0:_i+We,y1:Pi+We},xt.xPixel=(Kt+er)/2,xt.yPixel=(Sr+Gr)/2}Vi.eventData=[xt],Je.push(xt)}e._hoverdata=Je;var ai=h==="y"&&(G.length>1||U.length>1)||h==="closest"&&De&&U.length>1,mi=vd.combine(s.plot_bgcolor||vd.background,s.paper_bgcolor),un=Hle(U,{gd:e,hovermode:h,rotateLabels:ai,bgColor:mi,container:s._hoverlayer,outerContainer:s._paper.node(),commonLabelOpts:s.hoverlabel,hoverdistance:s.hoverdistance}),Fn=un.hoverLabels;if(kg.isUnifiedHover(h)||(Lut(Fn,ai,s,un.commonLabelBoundingBox),Wle(Fn,ai,s._invScaleX,s._invScaleY)),i&&i.tagName){var An=eT.getComponentMethod("annotations","hasClickToShow")(e,Je);xut(jb.select(i),An?"pointer":"")}var Hn=Rut(e,t,Ge);if(!i||n||!Hn&&!s.hoveranywhere)return;Ge&&Hn&&e.emit("plotly_unhover",{event:t,points:Ge}),Qn(e._hoverdata);function Qn(Vi){e.emit("plotly_hover",{event:t,points:Vi,xaxes:C,yaxes:S,xvals:Z,yvals:j})}}function Gle(e){return[e.trace.index,e.index,e.x0,e.y0,e.name,e.attr,e.xa?e.xa._id:"",e.ya?e.ya._id:""].join(",")}var Cut=/([\s\S]*)<\/extra>/;function Hle(e,t){var r=t.gd,n=r._fullLayout,i=t.hovermode,a=t.rotateLabels,o=t.bgColor,s=t.container,l=t.outerContainer,u=t.commonLabelOpts||{};if(e.length===0)return[[]];var c=t.fontFamily||Wb.HOVERFONT,f=t.fontSize||Wb.HOVERFONTSIZE,h=t.fontWeight||n.font.weight,d=t.fontStyle||n.font.style,v=t.fontVariant||n.font.variant,m=t.fontTextcase||n.font.textcase,b=t.fontLineposition||n.font.lineposition,p=t.fontShadow||n.font.shadow,k=e[0],M=k.xa,T=k.ya,L=i.charAt(0),x=L+"Label",C=k[x];if(C===void 0&&M.type==="multicategory")for(var S=0;Sn.width-Je&&(We=n.width-Je),Et.attr("d","M"+(jr-We)+",0L"+(jr-We+Qc)+","+Ge+Qc+"H"+Je+"v"+Ge+(sl*2+qr.height)+"H"+-Je+"V"+Ge+Qc+"H"+(jr-We-Qc)+"Z"),jr=We,H.minX=jr-Je,H.maxX=jr+Je,M.side==="top"?(H.minY=gt-(sl*2+qr.height),H.maxY=gt-sl):(H.minY=gt+sl,H.maxY=gt+(sl*2+qr.height))}else{var et,xt,At;T.side==="right"?(et="start",xt=1,At="",jr=M._offset+M._length):(et="end",xt=-1,At="-",jr=M._offset),gt=T._offset+(k.y0+k.y1)/2,pt.attr("text-anchor",et),Et.attr("d","M0,0L"+At+Qc+","+Qc+"V"+(sl+qr.height/2)+"h"+At+(sl*2+qr.width)+"V-"+(sl+qr.height/2)+"H"+At+Qc+"V-"+Qc+"Z"),H.minY=gt-(sl+qr.height/2),H.maxY=gt+(sl+qr.height/2),T.side==="right"?(H.minX=jr+Qc,H.maxX=jr+Qc+(sl*2+qr.width)):(H.minX=jr-Qc-(sl*2+qr.width),H.maxX=jr-Qc);var Kt=qr.height/2,er=P-qr.top-Kt,Sr="clip"+n._uid+"commonlabel"+T._id,Gr;if(jrEt.hoverinfo!=="none");if(dt.length===0)return[];var re=n.hoverlabel,oe=re.font,_e=dt[0],ke=((i==="x unified"?_e.xa:_e.ya).unifiedhovertitle||{}).text,Ce=ke?zf.hovertemplateString({data:i==="x unified"?[{xa:_e.xa,x:_e.xVal}]:[{ya:_e.ya,y:_e.yVal}],fallback:_e.trace.hovertemplatefallback,locale:n._d3locale,template:ke}):C,ge={showlegend:!0,legend:{title:{text:Ce,font:oe},font:oe,bgcolor:re.bgcolor,bordercolor:re.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:n.legend?n.legend.traceorder:void 0,orientation:"v"}},ie={font:oe};wut(ge,ie,r._fullData);var Se=ie.legend;Se.entries=[];for(var Ee=0;Ee=0?rt=tt:je+lt=0?rt=je:Ue+lt=0?St=Ht:nr+mt=0?St=nr:Ae+mt=0,(dt.idealAlign==="top"||!_i)&&Pi?(At-=er/2,dt.anchor="end"):_i?(At+=er/2,dt.anchor="start"):dt.anchor="middle",dt.crossPos=At;else{if(dt.pos=At,_i=xt+Kt/2+Yr<=E,Pi=xt-Kt/2-Yr>=0,(dt.idealAlign==="left"||!_i)&&Pi)xt-=Kt/2,dt.anchor="end";else if(_i)xt+=Kt/2,dt.anchor="start";else{dt.anchor="middle";var ai=Yr/2,mi=xt+ai-E,un=xt-ai;mi>0&&(xt-=mi),un<0&&(xt+=-un)}dt.crossPos=xt}gt.attr("text-anchor",dt.anchor),Je&&Ge.attr("text-anchor",dt.anchor),Et.attr("transform",jB(xt,At)+(a?yut(Vle):""))}),{hoverLabels:Tt,commonLabelBoundingBox:H}}function qle(e,t,r,n,i,a){var f,h;var o="",s="";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=zf.templateString(e.name,e.trace._meta)),o=Nle(e.name,e.nameLength));var l=r.charAt(0),u=l==="x"?"y":"x";e.zLabel!==void 0?(e.xLabel!==void 0&&(s+="x: "+e.xLabel+"
"),e.yLabel!==void 0&&(s+="y: "+e.yLabel+"
"),e.trace.type!=="choropleth"&&e.trace.type!=="choroplethmapbox"&&e.trace.type!=="choroplethmap"&&(s+=(s?"z: ":"")+e.zLabel)):t&&e[l+"Label"]===i?s=e[u+"Label"]||"":e.xLabel===void 0?e.yLabel!==void 0&&e.trace.type!=="scattercarpet"&&(s=e.yLabel):e.yLabel===void 0?s=e.xLabel:s="("+e.xLabel+", "+e.yLabel+")",(e.text||e.text===0)&&!Array.isArray(e.text)&&(s+=(s?"
":"")+e.text),e.extraText!==void 0&&(s+=(s?"
":"")+e.extraText),a&&s===""&&!e.hovertemplate&&(o===""&&a.remove(),s=o),(h=(f=e.trace)==null?void 0:f.hoverlabel)!=null&&h.split&&(e.hovertemplate="");let{hovertemplate:c=!1}=e;if(c){let d=e.hovertemplateLabels||e;e[l+"Label"]!==i&&(d[l+"other"]=d[l+"Val"],d[l+"otherLabel"]=d[l+"Label"]),s=zf.hovertemplateString({data:[e.eventData[0]||{},e.trace._meta],fallback:e.trace.hovertemplatefallback,labels:d,locale:n._d3locale,template:c}),s=s.replace(Cut,(v,m)=>(o=Nle(m,e.nameLength),""))}return[s,o]}function Lut(e,t,r,n){var i=t?"xa":"ya",a=t?"ya":"xa",o=0,s=1,l=e.size(),u=new Array(l),c=0,f=n.minX,h=n.maxX,d=n.minY,v=n.maxY,m=function(Z){return Z*r._invScaleX},b=function(Z){return Z*r._invScaleY};e.each(function(Z){var j=Z[i],N=Z[a],H=j._id.charAt(0)==="x",re=j.range;c===0&&re&&re[0]>re[1]!==H&&(s=-1);var oe=0,_e=H?r.width:r.height;if(r.hovermode==="x"||r.hovermode==="y"){var ke=jle(Z,t),Ce=Z.anchor,ge=Ce==="end"?-1:1,ie,Se;if(Ce==="middle")ie=Z.crossPos+(H?b(ke.y-Z.by/2):m(Z.bx/2+Z.tx2width/2)),Se=ie+(H?b(Z.by):m(Z.bx));else if(H)ie=Z.crossPos+b(Qc+ke.y)-b(Z.by/2-Qc),Se=ie+b(Z.by);else{var Ee=m(ge*Qc+ke.x),we=Ee+m(ge*Z.bx);ie=Z.crossPos+Math.min(Ee,we),Se=Z.crossPos+Math.max(Ee,we)}H?d!==void 0&&v!==void 0&&Math.min(Se,v)-Math.max(ie,d)>1&&(N.side==="left"?(oe=N._mainLinePosition,_e=r.width):_e=N._mainLinePosition):f!==void 0&&h!==void 0&&Math.min(Se,h)-Math.max(ie,f)>1&&(N.side==="top"?(oe=N._mainLinePosition,_e=r.height):_e=N._mainLinePosition)}u[c++]=[{datum:Z,traceIndex:Z.trace.index,dp:0,pos:Z.pos,posref:Z.posref,size:Z.by*(H?Aut:1)/2,pmin:oe,pmax:_e}]}),u.sort(function(Z,j){return Z[0].posref-j[0].posref||s*(j[0].traceIndex-Z[0].traceIndex)});var p,k,M,T,L,x,C;function S(Z){var j=Z[0],N=Z[Z.length-1];if(k=j.pmin-j.pos-j.dp+j.size,M=N.pos+N.dp+N.size-j.pmax,k>.01){for(L=Z.length-1;L>=0;L--)Z[L].dp+=k;p=!1}if(!(M<.01)){if(k<-.01){for(L=Z.length-1;L>=0;L--)Z[L].dp-=M;p=!1}if(p){var H=0;for(T=0;Tj.pmax&&H++;for(T=Z.length-1;T>=0&&!(H<=0);T--)x=Z[T],x.pos>j.pmax-1&&(x.del=!0,H--);for(T=0;T=0;L--)Z[L].dp-=M;for(T=Z.length-1;T>=0&&!(H<=0);T--)x=Z[T],x.pos+x.dp+x.size>j.pmax&&(x.del=!0,H--)}}}for(;!p&&o<=l;){for(o++,p=!0,T=0;T.01){for(L=P.length-1;L>=0;L--)P[L].dp+=k;for(g.push.apply(g,P),u.splice(T+1,1),C=0,L=g.length-1;L>=0;L--)C+=g[L].dp;for(M=C/g.length,L=g.length-1;L>=0;L--)g[L].dp-=M;p=!1}else T++}u.forEach(S)}for(T=u.length-1;T>=0;T--){var q=u[T];for(L=q.length-1;L>=0;L--){var U=q[L],G=U.datum;G.offset=U.dp,G.del=U.del}}}function jle(e,t){var r=0,n=e.offset;return t&&(n*=-Mut,r=e.offset*Sut),{x:r,y:n}}function Put(e){var t={start:1,end:-1,middle:0}[e.anchor],r=t*(Qc+sl),n=r+t*(e.txwidth+sl),i=e.anchor==="middle";return i&&(r-=e.tx2width/2,n+=e.txwidth/2+sl),{alignShift:t,textShiftX:r,text2ShiftX:n}}function Wle(e,t,r,n){var i=function(o){return o*r},a=function(o){return o*n};e.each(function(o){var s=jb.select(this);if(o.del)return s.remove();var l=s.select("text.nums"),u=o.anchor,c=u==="end"?-1:1,f=Put(o),h=jle(o,t),d=h.x,v=h.y,m=u==="middle",b="hoverlabel"in o.trace?o.trace.hoverlabel.showarrow:!0,p;m?p="M-"+i(o.bx/2+o.tx2width/2)+","+a(v-o.by/2)+"h"+i(o.bx)+"v"+a(o.by)+"h-"+i(o.bx)+"Z":b?p="M0,0L"+i(c*Qc+d)+","+a(Qc+v)+"v"+a(o.by/2-Qc)+"h"+i(c*o.bx)+"v-"+a(o.by)+"H"+i(c*Qc+d)+"V"+a(v-Qc)+"Z":p="M"+i(c*Qc+d)+","+a(v-o.by/2)+"h"+i(c*o.bx)+"v"+a(o.by)+"h"+i(-c*o.bx)+"Z",s.select("path").attr("d",p);var k=d+f.textShiftX,M=v+o.ty0-o.by/2+sl,T=o.textAlign||"auto";T!=="auto"&&(T==="left"&&u!=="start"?(l.attr("text-anchor","start"),k=m?-o.bx/2-o.tx2width/2+sl:-o.bx-sl):T==="right"&&u!=="end"&&(l.attr("text-anchor","end"),k=m?o.bx/2-o.tx2width/2-sl:o.bx+sl)),l.call(A0.positionText,i(k),a(M)),o.tx2width&&(s.select("text.name").call(A0.positionText,i(f.text2ShiftX+f.alignShift*sl+d),a(v+o.ty0-o.by/2+sl)),s.select("rect").call(Am.setRect,i(f.text2ShiftX+(f.alignShift-1)*o.tx2width/2+d),a(v-o.by/2-1),i(o.tx2width),a(o.by+2)))})}function Iut(e,t){var r=e.index,n=e.trace||{},i=e.cd[0],a=e.cd[r]||{};function o(h){return h||Py(h)&&h===0}var s=Array.isArray(r)?function(h,d){var v=zf.castOption(i,r,h);return o(v)?v:zf.extractOption({},n,"",d)}:function(h,d){return zf.extractOption(a,n,h,d)};function l(h,d,v){var m=s(d,v);o(m)&&(e[h]=m)}if(l("hoverinfo","hi","hoverinfo"),l("bgcolor","hbg","hoverlabel.bgcolor"),l("borderColor","hbc","hoverlabel.bordercolor"),l("fontFamily","htf","hoverlabel.font.family"),l("fontSize","hts","hoverlabel.font.size"),l("fontColor","htc","hoverlabel.font.color"),l("fontWeight","htw","hoverlabel.font.weight"),l("fontStyle","hty","hoverlabel.font.style"),l("fontVariant","htv","hoverlabel.font.variant"),l("nameLength","hnl","hoverlabel.namelength"),l("textAlign","hta","hoverlabel.align"),e.posref=t==="y"||t==="closest"&&n.orientation==="h"?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=zf.constrain(e.x0,0,e.xa._length),e.x1=zf.constrain(e.x1,0,e.xa._length),e.y0=zf.constrain(e.y0,0,e.ya._length),e.y1=zf.constrain(e.y1,0,e.ya._length),e.xLabelVal!==void 0&&(e.xLabel="xLabel"in e?e.xLabel:Sm.hoverLabelText(e.xa,e.xLabelVal,n.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),e.yLabelVal!==void 0&&(e.yLabel="yLabel"in e?e.yLabel:Sm.hoverLabelText(e.ya,e.yLabelVal,n.yhoverformat),e.yVal=e.ya.c2d(e.yLabelVal)),e.zLabelVal!==void 0&&e.zLabel===void 0&&(e.zLabel=String(e.zLabelVal)),!isNaN(e.xerr)&&!(e.xa.type==="log"&&e.xerr<=0)){var u=Sm.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;e.xerrneg!==void 0?e.xLabel+=" +"+u+" / -"+Sm.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xB1 "+u,t==="x"&&(e.distance+=1)}if(!isNaN(e.yerr)&&!(e.ya.type==="log"&&e.yerr<=0)){var c=Sm.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;e.yerrneg!==void 0?e.yLabel+=" +"+c+" / -"+Sm.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xB1 "+c,t==="y"&&(e.distance+=1)}var f=e.hoverinfo||e.trace.hoverinfo;return f&&f!=="all"&&(f=Array.isArray(f)?f:f.split("+"),f.indexOf("x")===-1&&(e.xLabel=void 0),f.indexOf("y")===-1&&(e.yLabel=void 0),f.indexOf("z")===-1&&(e.zLabel=void 0),f.indexOf("text")===-1&&(e.text=void 0),f.indexOf("name")===-1&&(e.name=void 0)),e}function Ole(e,t,r){var n=r.container,i=r.fullLayout,a=i._size,o=r.event,s=!!t.hLinePoint,l=!!t.vLinePoint,u,c;if(n.selectAll(".spikeline").remove(),!!(l||s)){var f=vd.combine(i.plot_bgcolor,i.paper_bgcolor);if(s){var h=t.hLinePoint,d,v;u=h&&h.xa,c=h&&h.ya;var m=c.spikesnap;m==="cursor"?(d=o.pointerX,v=o.pointerY):(d=u._offset+h.x,v=c._offset+h.y);var b=Dle.readability(h.color,f)<1.5?vd.contrast(f):h.color,p=c.spikemode,k=c.spikethickness,M=c.spikecolor||b,T=Sm.getPxPosition(e,c),L,x;if(p.indexOf("toaxis")!==-1||p.indexOf("across")!==-1){if(p.indexOf("toaxis")!==-1&&(L=T,x=d),p.indexOf("across")!==-1){var C=c._counterDomainMin,S=c._counterDomainMax;c.anchor==="free"&&(C=Math.min(C,c.position),S=Math.max(S,c.position)),L=a.l+C*a.w,x=a.l+S*a.w}n.insert("line",":first-child").attr({x1:L,x2:x,y1:v,y2:v,"stroke-width":k,stroke:M,"stroke-dasharray":Am.dashStyle(c.spikedash,k)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:L,x2:x,y1:v,y2:v,"stroke-width":k+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}p.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:T+(c.side!=="right"?k:-k),cy:v,r:k,fill:M}).classed("spikeline",!0)}if(l){var g=t.vLinePoint,P,E;u=g&&g.xa,c=g&&g.ya;var z=u.spikesnap;z==="cursor"?(P=o.pointerX,E=o.pointerY):(P=u._offset+g.x,E=c._offset+g.y);var q=Dle.readability(g.color,f)<1.5?vd.contrast(f):g.color,U=u.spikemode,G=u.spikethickness,Z=u.spikecolor||q,j=Sm.getPxPosition(e,u),N,H;if(U.indexOf("toaxis")!==-1||U.indexOf("across")!==-1){if(U.indexOf("toaxis")!==-1&&(N=j,H=E),U.indexOf("across")!==-1){var re=u._counterDomainMin,oe=u._counterDomainMax;u.anchor==="free"&&(re=Math.min(re,u.position),oe=Math.max(oe,u.position)),N=a.t+(1-oe)*a.h,H=a.t+(1-re)*a.h}n.insert("line",":first-child").attr({x1:P,x2:P,y1:N,y2:H,"stroke-width":G,stroke:Z,"stroke-dasharray":Am.dashStyle(u.spikedash,G)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:P,x2:P,y1:N,y2:H,"stroke-width":G+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}U.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:P,cy:j-(u.side!=="top"?G:-G),r:G,fill:Z}).classed("spikeline",!0)}}}function Rut(e,t,r){if(!r||r.length!==e._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],a=e._hoverdata[n];if(i.curveNumber!==a.curveNumber||String(i.pointNumber)!==String(a.pointNumber)||String(i.pointNumbers)!==String(a.pointNumbers)||i.binNumber!==a.binNumber)return!0}return!1}function Ble(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function Nle(e,t){return A0.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function Dut(e,t){for(var r=t.charAt(0),n=[],i=[],a=[],o=0;oe.offsetTop+e.clientTop,Zle=e=>e.offsetLeft+e.clientLeft;function Q3(e,t){var r=e._fullLayout,n=t.getBoundingClientRect(),i=n.left,a=n.top,o=i+n.width,s=a+n.height,l=zf.apply3DTransform(r._invTransform)(i,a),u=zf.apply3DTransform(r._invTransform)(o,s),c=l[0],f=l[1],h=u[0],d=u[1];return{x:c,y:f,width:h-c,height:d-f,top:Math.min(f,d),left:Math.min(c,h),right:Math.max(c,h),bottom:Math.max(f,d)}}});var _M=ye((Dar,Yle)=>{"use strict";var Fut=Pr(),zut=ka(),qut=ip().isUnifiedHover;Yle.exports=function(t,r,n,i){i=i||{};var a=r.legend;function o(s){i.font[s]||(i.font[s]=a?r.legend.font[s]:r.font[s])}r&&qut(r.hovermode)&&(i.font||(i.font={}),o("size"),o("family"),o("color"),o("weight"),o("style"),o("variant"),a?(i.bgcolor||(i.bgcolor=zut.combine(r.legend.bgcolor,r.paper_bgcolor)),i.bordercolor||(i.bordercolor=r.legend.bordercolor)):i.bgcolor||(i.bgcolor=r.paper_bgcolor)),n("hoverlabel.bgcolor",i.bgcolor),n("hoverlabel.bordercolor",i.bordercolor),n("hoverlabel.namelength",i.namelength),n("hoverlabel.showarrow",i.showarrow),Fut.coerceFont(n,"hoverlabel.font",i.font),n("hoverlabel.align",i.align)}});var Jle=ye((Far,Kle)=>{"use strict";var Out=Pr(),But=_M(),Nut=W1();Kle.exports=function(t,r){function n(i,a){return Out.coerce(t,r,Nut,i,a)}But(t,r,n)}});var eue=ye((zar,Qle)=>{"use strict";var $le=Pr(),Uut=p3(),Vut=_M();Qle.exports=function(t,r,n,i){function a(s,l){return $le.coerce(t,r,Uut,s,l)}var o=$le.extendFlat({},i.hoverlabel);r.hovertemplate&&(o.namelength=-1),Vut(t,r,a,o)}});var YB=ye((qar,tue)=>{"use strict";var Gut=Pr(),Hut=W1();tue.exports=function(t,r){function n(i,a){return r[i]!==void 0?r[i]:Gut.coerce(t,r,Hut,i,a)}return n("clickmode"),n("hoversubplots"),n("hoveranywhere"),n("clickanywhere"),n("hovermode")}});var nue=ye((Oar,iue)=>{"use strict";var rue=Pr(),jut=W1(),Wut=YB(),Xut=_M();iue.exports=function(t,r){function n(c,f){return rue.coerce(t,r,jut,c,f)}var i=Wut(t,r);i&&(n("hoverdistance"),n("spikedistance"));var a=n("dragmode");a==="select"&&n("selectdirection");var o=r._has("mapbox"),s=r._has("map"),l=r._has("geo"),u=r._basePlotModules.length;r.dragmode==="zoom"&&((o||s||l)&&u===1||(o||s)&&l&&u===2)&&(r.dragmode="pan"),Xut(t,r,n),rue.coerceFont(n,"hoverlabel.grouptitlefont",r.hoverlabel.font)}});var sue=ye((Bar,oue)=>{"use strict";var KB=Pr(),aue=Oa();oue.exports=function(t){var r=t.calcdata,n=t._fullLayout;function i(u){return function(c){return KB.coerceHoverinfo({hoverinfo:c},{_module:u._module},n)}}for(var a=0;a{"use strict";var Yut=Oa(),Kut=ZB().hover;lue.exports=function(t,r,n){var i=Yut.getComponentMethod("annotations","onClick")(t,t._hoverdata),a=t._fullLayout;n!==void 0&&Kut(t,r,n,!0);function o(){var l,u,c,f;var s={points:t._hoverdata,event:r};(l=s.xaxes)!=null||(s.xaxes=t._hoverXAxes),(u=s.yaxes)!=null||(s.yaxes=t._hoverYAxes),(c=s.xvals)!=null||(s.xvals=t._hoverXVals),(f=s.yvals)!=null||(s.yvals=t._hoverYVals),t.emit("plotly_click",s)}(t._hoverdata||a.clickanywhere)&&r&&r.target&&(t._hoverdata||(t._hoverdata=[]),i&&i.then?i.then(o):o(),r.stopImmediatePropagation&&r.stopImmediatePropagation())}});var vf=ye((Uar,hue)=>{"use strict";var Jut=qa(),JL=Pr(),$ut=yv(),xM=ip(),cue=W1(),fue=ZB();hue.exports={moduleType:"component",name:"fx",constants:NS(),schema:{layout:cue},attributes:p3(),layoutAttributes:cue,supplyLayoutGlobalDefaults:Jle(),supplyDefaults:eue(),supplyLayoutDefaults:nue(),calc:sue(),getDistanceFunction:xM.getDistanceFunction,getClosest:xM.getClosest,inbox:xM.inbox,quadrature:xM.quadrature,appendArrayPointValue:xM.appendArrayPointValue,castHoverOption:ect,castHoverinfo:tct,hover:fue.hover,unhover:$ut.unhover,loneHover:fue.loneHover,loneUnhover:Qut,click:uue()};function Qut(e){var t=JL.isD3Selection(e)?e:Jut.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()}function ect(e,t,r){return JL.castOption(e,t,"hoverlabel."+r)}function tct(e,t,r){function n(i){return JL.coerceHoverinfo({hoverinfo:i},{_module:e._module},t)}return JL.castOption(e,r,"hoverinfo",n)}});var Cg=ye(Iy=>{"use strict";Iy.selectMode=function(e){return e==="lasso"||e==="select"};Iy.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"};Iy.openMode=function(e){return e==="drawline"||e==="drawopenpath"};Iy.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"};Iy.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"};Iy.selectingOrDrawing=function(e){return Iy.freeMode(e)||Iy.rectMode(e)}});var bM=ye((Gar,due)=>{"use strict";due.exports=function(t){var r=t._fullLayout;r._glcanvas&&r._glcanvas.size()&&r._glcanvas.each(function(n){n.regl&&n.regl.clear({color:!0,depth:!0})})}});var $L=ye((Har,vue)=>{"use strict";vue.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:[""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}});var eP=ye((jar,pue)=>{"use strict";var QL=32;pue.exports={CIRCLE_SIDES:QL,i000:0,i090:QL/4,i180:QL/2,i270:QL/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}});var tP=ye((War,mue)=>{"use strict";var rct=Pr().strTranslate;function gue(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}function ict(e,t){switch(e.type){case"log":return e.d2p(t);case"date":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}}function nct(e){var t=e._id.charAt(0)==="y"?1:0;return function(r){return gue(e,r[t])}}function act(e){return rct(e.xaxis._offset,e.yaxis._offset)}mue.exports={p2r:gue,r2p:ict,axValue:nct,getTransform:act}});var m_=ye(Ry=>{"use strict";var oct=nM(),xue=eP(),tT=xue.CIRCLE_SIDES,JB=xue.SQRT2,bue=tP(),yue=bue.p2r,_ue=bue.r2p,sct=[0,3,4,5,6,1,2],lct=[0,3,4,1,2];Ry.writePaths=function(e){var t=e.length;if(!t)return"M0,0Z";for(var r="",n=0;n0&&l{"use strict";var wue=hf(),Eue=Cg(),uct=Eue.drawMode,cct=Eue.openMode,rT=eP(),Tue=rT.i000,Aue=rT.i090,Sue=rT.i180,Mue=rT.i270,fct=rT.cos45,hct=rT.sin45,kue=tP(),iP=kue.p2r,y_=kue.r2p,dct=o_(),vct=dct.clearOutline,nP=m_(),pct=nP.readPaths,gct=nP.writePaths,mct=nP.ellipseOver,yct=nP.fixDatesForPaths;function _ct(e,t){if(e.length){var r=e[0][0];if(r){var n=t.gd,i=t.isActiveShape,a=t.dragmode,o=(n.layout||{}).shapes||[];if(!uct(a)&&i!==void 0){var s=n._fullLayout._activeShapeIndex;if(s{"use strict";var xct=Cg(),bct=xct.selectMode,wct=o_(),Tct=wct.clearOutline,$B=m_(),Act=$B.readPaths,Sct=$B.writePaths,Mct=$B.fixDatesForPaths;Pue.exports=function(t,r){if(t.length){var n=t[0][0];if(n){var i=n.getAttribute("d"),a=r.gd,o=a._fullLayout.newselection,s=r.plotinfo,l=s.xaxis,u=s.yaxis,c=r.isActiveSelection,f=r.dragmode,h=(a.layout||{}).selections||[];if(!bct(f)&&c!==void 0){var d=a._fullLayout._activeSelectionIndex;if(d{"use strict";Iue.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:3},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}});var x_=ye(Jd=>{"use strict";var Mm=TM(),Rue=Pr(),__=ho();Jd.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(t){return t}};Jd.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(t){return t}};Jd.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace("_"," ")),e(t)}};Jd.encodeDate=function(e){return function(t){return e(t).replace(" ","_")}};Jd.extractPathCoords=function(e,t,r){var n=[],i=e.match(Mm.segmentRE);return i.forEach(function(a){var o=t[a.charAt(0)].drawn;if(o!==void 0){var s=a.slice(1).match(Mm.paramRE);if(!(!s||s.length{let s=o.charAt(0),l=i[s].drawn!==void 0;return a+(l?1:0)},0)};Jd.getDataToPixel=function(e,t,r,n,i){var a=e._fullLayout._size,o;if(t)if(i==="domain")o=function(l){return t._length*(n?1-l:l)+t._offset};else{var s=Jd.shapePositionToRange(t);o=function(l){var u=Dy(t,r);return t._offset+t.r2p(s(l,!0))+u},t.type==="date"&&(o=Jd.decodeDate(o))}else n?o=function(l){return a.t+a.h*(1-l)}:o=function(l){return a.l+a.w*l};return o};Jd.getPixelToData=function(e,t,r,n){var i=e._fullLayout._size,a;if(t)if(n==="domain")a=function(s){var l=(s-t._offset)/t._length;return r?1-l:l};else{var o=Jd.rangeToShapePosition(t);a=function(s){return o(t.p2r(s-t._offset))}}else r?a=function(s){return 1-(s-i.t)/i.h}:a=function(s){return(s-i.l)/i.w};return a};Jd.roundPositionForSharpStrokeRendering=function(e,t){var r=Math.round(t%2)===1,n=Math.round(e);return r?n+.5:n};Jd.makeShapesOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.shapes[t]||{},n=e._fullLayout._plots[r.xref+r.yref],i=!!n;return i?n._hadPlotinfo=!0:(n={},r.xref&&r.xref!=="paper"&&(n.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&r.yref!=="paper"&&(n.yaxis=e._fullLayout[r.yref+"axis"])),n.xsizemode=r.xsizemode,n.ysizemode=r.ysizemode,n.xanchor=r.xanchor,n.yanchor=r.yanchor,{options:r,plotinfo:n}};Jd.makeSelectionsOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.selections[t]||{},n=e._fullLayout._plots[r.xref+r.yref],i=!!n;return i?n._hadPlotinfo=!0:(n={},r.xref&&(n.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&(n.yaxis=e._fullLayout[r.yref+"axis"])),{options:r,plotinfo:n}};Jd.getPathString=function(e,t){let r=t.type,n=__.getRefType(t.xref),i=__.getRefType(t.yref),a=e._fullLayout._size;var o,s,l,u,c,f,h,d,v,m,b,p;function k(P,E,z,q){var U;if(P)if(E==="domain")q?U=function(G){return P._offset+P._length*(1-G)}:U=function(G){return P._offset+P._length*G};else{let G=Jd.shapePositionToRange(P);U=function(Z){return P._offset+P.r2p(G(Z,!0))},z==="path"&&P.type==="date"&&(U=Jd.decodeDate(U))}else q?U=function(G){return a.t+a.h*(1-G)}:U=function(G){return a.l+a.w*G};return U}if(n==="array"?(h=[],o=t.xref.map(function(P){return __.getFromId(e,P)}),h=t.xref.map(function(P,E){return k(o[E],__.getRefType(P),r,!1)})):(o=__.getFromId(e,t.xref),h=k(o,n,r,!1)),i==="array"?(d=[],s=t.yref.map(function(P){return __.getFromId(e,P)}),d=t.yref.map(function(P,E){return k(s[E],__.getRefType(P),r,!0)})):(s=__.getFromId(e,t.yref),d=k(s,i,r,!0)),r==="path")return Ect(t,h,d);if(n==="array")l=Dy(o[0],t.x0shift),u=Dy(o[1],t.x1shift),v=h[0](t.x0)+l,m=h[1](t.x1)+u;else if(l=Dy(o,t.x0shift),u=Dy(o,t.x1shift),t.xsizemode==="pixel"){let P=h(t.xanchor);v=P+t.x0+l,m=P+t.x1+u}else v=h(t.x0)+l,m=h(t.x1)+u;if(i==="array")c=Dy(s[0],t.y0shift),f=Dy(s[1],t.y1shift),b=d[0](t.y0)+c,p=d[1](t.y1)+f;else if(c=Dy(s,t.y0shift),f=Dy(s,t.y1shift),t.ysizemode==="pixel"){let P=d(t.yanchor);b=P-t.y0+c,p=P-t.y1+f}else b=d(t.y0)+c,p=d(t.y1)+f;if(r==="line")return"M"+v+","+b+"L"+m+","+p;if(r==="rect")return"M"+v+","+b+"H"+m+"V"+p+"H"+v+"Z";var M=(v+m)/2,T=(b+p)/2,L=Math.abs(M-v),x=Math.abs(T-b),C="A"+L+","+x,S=M+L+","+T,g=M+","+(T-x);return"M"+S+C+" 0 1,1 "+g+C+" 0 0,1 "+S+"Z"};function Ect(e,t,r){let n=e.path,i=e.xsizemode,a=e.ysizemode,o=e.xanchor,s=e.yanchor,l=Array.isArray(e.xref),u=Array.isArray(e.yref);var c=0,f=0;return n.replace(Mm.segmentRE,function(h){var d=0,v=h.charAt(0),m=Mm.paramIsX[v],b=Mm.paramIsY[v],p=Mm.numParams[v];let k=m.drawn!==void 0,M=b.drawn!==void 0,T=l?t[c]:t,L=u?r[f]:r;var x=h.slice(1).replace(Mm.paramRE,function(C){return m[d]?i==="pixel"?C=T(o)+Number(C):C=T(C):b[d]&&(a==="pixel"?C=L(s)-Number(C):C=L(C)),d++,d>p&&(C="X"),C});return d>p&&(x=x.replace(/[\s,]*X.*/,""),Rue.log("Ignoring extra params in segment "+h)),k&&c++,M&&f++,v+x})}function Dy(e,t){t=t||0;var r=0;return t&&e&&(e.type==="category"||e.type==="multicategory")&&(r=(e.r2p(1)-e.r2p(0))*t),r}});var tN=ye(($ar,zue)=>{"use strict";var kct=Pr(),Em=ho(),Due=Zl(),Fue=So(),Cct=m_().readPaths,eN=x_(),Lct=eN.getPathString,AM=D6(),Pct=Dh().FROM_TL;zue.exports=function(t,r,n,i){if(i.selectAll(".shape-label").remove(),!!(n.label.text||n.label.texttemplate)){var a;if(n.label.texttemplate){var o={};if(n.type!=="path"){var s=Em.getFromId(t,n.xref),l=Em.getFromId(t,n.yref);let oe=Array.isArray(n.xref),_e=Array.isArray(n.yref);for(var u in AM){var c=typeof AM[u]=="function",f=!oe||AM.simpleXVariables.includes(u),h=!_e||AM.simpleYVariables.includes(u);if(c&&f&&h){var d=AM[u](n,s,l);d!==void 0&&(o[u]=d)}}}a=kct.texttemplateStringForShapes({data:[o],fallback:n.label.texttemplatefallback,locale:t._fullLayout._d3locale,template:n.label.texttemplate})}else a=n.label.text;var v={"data-index":r},m=n.label.font,b={"data-notex":1},p=i.append("g").attr(v).classed("shape-label",!0),k=p.append("text").attr(b).classed("shape-label-text",!0).text(a),M,T,L,x;if(n.path){var C=Lct(t,n),S=Cct(C,t);M=1/0,L=1/0,T=-1/0,x=-1/0;for(var g=0;g=e?i=t-n:i=n-t,-180/Math.PI*Math.atan2(i,a)}function Rct(e,t,r,n,i,a,o){var s=i.label.textposition,l=i.label.textangle,u=i.label.padding,c=i.type,f=Math.PI/180*a,h=Math.sin(f),d=Math.cos(f),v=i.label.xanchor,m=i.label.yanchor,b,p,k,M;if(c==="line"){s==="start"?(b=e,p=t):s==="end"?(b=r,p=n):(b=(e+r)/2,p=(t+n)/2),v==="auto"&&(s==="start"?l==="auto"?r>e?v="left":re?v="right":re?v="right":re?v="left":r{"use strict";var Dct=Pr(),Fct=Dct.strTranslate,que=yv(),Nue=Cg(),zct=Nue.drawMode,Uue=Nue.selectMode,Vue=Oa(),Oue=ka(),sP=eP(),qct=sP.i000,Oct=sP.i090,Bct=sP.i180,Nct=sP.i270,Uct=o_(),Gue=Uct.clearOutlineControllers,iN=m_(),oP=iN.pointsOnRectangle,rN=iN.pointsOnEllipse,Vct=iN.writePaths,Gct=aP().newShapes,Hct=aP().createShapeObj,jct=QB(),Wct=tN();Hue.exports=function e(t,r,n,i){i||(i=0);var a=n.gd;function o(){e(t,r,n,i++),(rN(t[0])||n.hasText)&&s({redrawing:!0})}function s(j){var N={};n.isActiveShape!==void 0&&(n.isActiveShape=!1,N=Gct(r,n)),n.isActiveSelection!==void 0&&(n.isActiveSelection=!1,N=jct(r,n),a._fullLayout._reselect=!0),Object.keys(N).length&&Vue.call((j||{}).redrawing?"relayout":"_guiRelayout",a,N)}var l=a._fullLayout,u=l._zoomlayer,c=n.dragmode,f=zct(c),h=Uue(c);(f||h)&&(a._fullLayout._outlining=!0),Gue(a),r.attr("d",Vct(t));var d,v,m,b,p;if(!i&&(n.isActiveShape||n.isActiveSelection)){p=Xct([],t);var k=u.append("g").attr("class","outline-controllers");P(k),Z()}if(f&&n.hasText){var M=u.select(".label-temp"),T=Hct(r,n,n.dragmode);Wct(a,"label-temp",T,M)}function L(j){m=+j.srcElement.getAttribute("data-i"),b=+j.srcElement.getAttribute("data-j"),d[m][b].moveFn=x}function x(j,N){if(t.length){var H=p[m][b][1],re=p[m][b][2],oe=t[m],_e=oe.length;if(oP(oe)){var ke=j,Ce=N;if(n.isActiveSelection){var ge=Bue(oe,b);ge[1]===oe[b][1]?Ce=0:ke=0}for(var ie=0;ie<_e;ie++)if(ie!==b){var Se=oe[ie];Se[1]===oe[b][1]&&(Se[1]=H+ke),Se[2]===oe[b][2]&&(Se[2]=re+Ce)}if(oe[b][1]=H+ke,oe[b][2]=re+Ce,!oP(oe))for(var Ee=0;Ee<_e;Ee++)for(var we=0;we1&&!(j.length===2&&j[1][0]==="Z")&&(b===0&&(j[0][0]="M"),t[m]=j,o(),s())}}function g(j,N){if(j===2){m=+N.srcElement.getAttribute("data-i"),b=+N.srcElement.getAttribute("data-j");var H=t[m];!oP(H)&&!rN(H)&&S()}}function P(j){d=[];for(var N=0;N{"use strict";var Yct=qa(),Yue=Oa(),aN=Pr(),Xb=ho(),Kct=m_().readPaths,Jct=lP(),cP=tN(),Kue=o_().clearOutlineControllers,nN=ka(),fP=So(),$ct=vl().arrayEditor,jue=yv(),Wue=Eg(),Zb=TM(),Ep=x_(),oN=Ep.getPathString;Que.exports={draw:sN,drawOne:Jue,eraseActiveShape:rft,drawLabel:cP};function sN(e){var t=e._fullLayout;t._shapeUpperLayer.selectAll("path").remove(),t._shapeLowerLayer.selectAll("path").remove(),t._shapeUpperLayer.selectAll("text").remove(),t._shapeLowerLayer.selectAll("text").remove();for(var r in t._plots){var n=t._plots[r].shapelayer;n&&(n.selectAll("path").remove(),n.selectAll("text").remove())}for(var i=0;iXb.getFromId(e,h)).filter(Boolean);if(!u.length)return l?[n.t,n.t+n.h]:[n.l,n.l+n.w];let c=u.map(function(h){return h._offset}),f=u.map(function(h){return h._offset+h._length});return[Math.min(...c),Math.max(...f)]}let a=i(t,!1),o=i(r,!0);return{x:a[0],y:o[0],width:a[1]-a[0],height:o[1]-o[0]}}function eft(e,t,r,n,i,a){var o=10,s=10,l=r.xsizemode==="pixel",u=r.ysizemode==="pixel",c=r.type==="line",f=r.type==="path",h=a.modifyItem,d,v,m,b,p,k,M,T,L,x,C,S,g,P,E,z=Yct.select(t.node().parentNode),q=Xb.getFromId(e,r.xref),U=Xb.getRefType(r.xref),G=Xb.getFromId(e,r.yref),Z=Xb.getRefType(r.yref),j=r.x0shift,N=r.x1shift,H=r.y0shift,re=r.y1shift,oe=function(st,ct){var Qt=Ep.getDataToPixel(e,q,ct,!1,U);return Qt(st)},_e=function(st,ct){var Qt=Ep.getDataToPixel(e,G,ct,!0,Z);return Qt(st)},ke=Ep.getPixelToData(e,q,!1,U),Ce=Ep.getPixelToData(e,G,!0,Z),ge=Ee(),ie={element:ge.node(),gd:e,prepFn:Le,doneFn:me,clickFn:Pe},Se;jue.init(ie),ge.node().onmousemove=De;function Ee(){return c?we():t}function we(){var st=10,ct=Math.max(r.line.width,st),Qt=i.append("g").attr("data-index",n).attr("drag-helper",!0);Qt.append("path").attr("d",t.attr("d")).style({cursor:"move","stroke-width":ct,"stroke-opacity":"0"});var Ht={"fill-opacity":"0"},nr=Math.max(ct/2,st);return Qt.append("circle").attr({"data-line-point":"start-point",cx:l?oe(r.xanchor)+r.x0:oe(r.x0,j),cy:u?_e(r.yanchor)-r.y0:_e(r.y0,H),r:nr}).style(Ht).classed("cursor-grab",!0),Qt.append("circle").attr({"data-line-point":"end-point",cx:l?oe(r.xanchor)+r.x1:oe(r.x1,N),cy:u?_e(r.yanchor)-r.y1:_e(r.y1,re),r:nr}).style(Ht).classed("cursor-grab",!0),Qt}function De(st){if(uP(e)){Se=null;return}if(c)st.target.tagName==="path"?Se="move":Se=st.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var ct=ie.element.getBoundingClientRect(),Qt=ct.right-ct.left,Ht=ct.bottom-ct.top,nr=st.clientX-ct.left,tt=st.clientY-ct.top,je=!f&&Qt>o&&Ht>s&&!st.shiftKey?jue.getCursor(nr/Qt,1-tt/Ht):"move";Wue(t,je),Se=je.split("-")[0]}}function Le(st){uP(e)||(l&&(p=oe(r.xanchor)),u&&(k=_e(r.yanchor)),r.type==="path"?E=r.path:(d=l?r.x0:oe(r.x0),v=u?r.y0:_e(r.y0),m=l?r.x1:oe(r.x1),b=u?r.y1:_e(r.y1)),db?(M=v,C="y0",T=b,S="y1"):(M=b,C="y1",T=v,S="y0"),De(st),lt(i,r),Vt(t,r,e),ie.moveFn=Se==="move"?ce:He,ie.altKey=st.altKey)}function me(){uP(e)||(Wue(t),mt(i),$ue(t,e,r),Yue.call("_guiRelayout",e,a.getUpdateObj()))}function Pe(){uP(e)||mt(i)}function ce(st,ct){if(r.type==="path"){var Qt=function(tt){return tt},Ht=Qt,nr=Qt;l?h("xanchor",r.xanchor=ke(p+st)):(Ht=function(je){return ke(oe(je)+st)},q&&q.type==="date"&&(Ht=Ep.encodeDate(Ht))),u?h("yanchor",r.yanchor=Ce(k+ct)):(nr=function(je){return Ce(_e(je)+ct)},G&&G.type==="date"&&(nr=Ep.encodeDate(nr))),h("path",r.path=Xue(E,Ht,nr))}else l?h("xanchor",r.xanchor=ke(p+st)):(h("x0",r.x0=ke(d+st)),h("x1",r.x1=ke(m+st))),u?h("yanchor",r.yanchor=Ce(k+ct)):(h("y0",r.y0=Ce(v+ct)),h("y1",r.y1=Ce(b+ct)));t.attr("d",oN(e,r)),lt(i,r),cP(e,n,r,z)}function He(st,ct){if(f){var Qt=function(Er){return Er},Ht=Qt,nr=Qt;l?h("xanchor",r.xanchor=ke(p+st)):(Ht=function(ei){return ke(oe(ei)+st)},q&&q.type==="date"&&(Ht=Ep.encodeDate(Ht))),u?h("yanchor",r.yanchor=Ce(k+ct)):(nr=function(ei){return Ce(_e(ei)+ct)},G&&G.type==="date"&&(nr=Ep.encodeDate(nr))),h("path",r.path=Xue(E,Ht,nr))}else if(c){if(Se==="resize-over-start-point"){var tt=d+st,je=u?v-ct:v+ct;h("x0",r.x0=l?tt:ke(tt)),h("y0",r.y0=u?je:Ce(je))}else if(Se==="resize-over-end-point"){var Ue=m+st,Ae=u?b-ct:b+ct;h("x1",r.x1=l?Ue:ke(Ue)),h("y1",r.y1=u?Ae:Ce(Ae))}}else{var rt=function(Er){return Se.indexOf(Er)!==-1},St=rt("n"),Tt=rt("s"),dt=rt("w"),Et=rt("e"),pt=St?M+ct:M,Xt=Tt?T+ct:T,or=dt?L+st:L,_r=Et?x+st:x;u&&(St&&(pt=M-ct),Tt&&(Xt=T-ct)),(!u&&Xt-pt>s||u&&pt-Xt>s)&&(h(C,r[C]=u?pt:Ce(pt)),h(S,r[S]=u?Xt:Ce(Xt))),_r-or>o&&(h(g,r[g]=l?or:ke(or)),h(P,r[P]=l?_r:ke(_r)))}t.attr("d",oN(e,r)),lt(i,r),cP(e,n,r,z)}function lt(st,ct){(l||u)&&Qt();function Qt(){var Ht=ct.type!=="path",nr=st.selectAll(".visual-cue").data([0]),tt=1;nr.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":tt}).classed("visual-cue",!0);var je=oe(l?ct.xanchor:aN.midRange(Ht?[ct.x0,ct.x1]:Ep.extractPathCoords(ct.path,Zb.paramIsX))),Ue=_e(u?ct.yanchor:aN.midRange(Ht?[ct.y0,ct.y1]:Ep.extractPathCoords(ct.path,Zb.paramIsY)));if(je=Ep.roundPositionForSharpStrokeRendering(je,tt),Ue=Ep.roundPositionForSharpStrokeRendering(Ue,tt),l&&u){var Ae="M"+(je-1-tt)+","+(Ue-1-tt)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";nr.attr("d",Ae)}else if(l){var rt="M"+(je-1-tt)+","+(Ue-9-tt)+"v18 h2 v-18 Z";nr.attr("d",rt)}else{var St="M"+(je-9-tt)+","+(Ue-1-tt)+"h18 v2 h-18 Z";nr.attr("d",St)}}}function mt(st){st.selectAll(".visual-cue").remove()}function Vt(st,ct,Qt){var Ht=ct.xref,nr=ct.yref,tt=Xb.getFromId(Qt,Ht),je=Xb.getFromId(Qt,nr),Ue="";Ht!=="paper"&&!tt.autorange&&(Ue+=Ht),nr!=="paper"&&!je.autorange&&(Ue+=nr),fP.setClipUrl(st,Ue?"clip"+Qt._fullLayout._uid+Ue:null,Qt)}}function Xue(e,t,r){return e.replace(Zb.segmentRE,function(n){var i=0,a=n.charAt(0),o=Zb.paramIsX[a],s=Zb.paramIsY[a],l=Zb.numParams[a],u=n.slice(1).replace(Zb.paramRE,function(c){return i>=l||(o[i]?c=t(c):s[i]&&(c=r(c)),i++),c});return a+u})}function tft(e,t){if(hP(e)){var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeShapeIndex){Zue(e);return}e._fullLayout._activeShapeIndex=n,e._fullLayout._deactivateShape=Zue,sN(e)}}}function Zue(e){if(hP(e)){var t=e._fullLayout._activeShapeIndex;t>=0&&(Kue(e),delete e._fullLayout._activeShapeIndex,sN(e))}}function rft(e){if(hP(e)){Kue(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t{"use strict";var S0=Oa(),ece=Mc(),tce=hf(),Pl=$L(),ift=dP().eraseActiveShape,vP=Pr(),tl=vP._,Il=lce.exports={};Il.toImage={name:"toImage",title:function(e){var t=e._context.toImageButtonOptions||{},r=t.format||"png";return r==="png"?tl(e,"Download plot as a PNG"):tl(e,"Download plot")},icon:Pl.camera,click:function(e){var t=e._context.toImageButtonOptions,r={format:t.format||"png"};vP.notifier(tl(e,"Taking snapshot - this may take a few seconds"),"long",e),["filename","width","height","scale"].forEach(function(n){n in t&&(r[n]=t[n])}),S0.call("downloadImage",e,r).then(function(n){vP.notifier(tl(e,"Snapshot succeeded")+" - "+n,"long",e)}).catch(function(){vP.notifier(tl(e,"Sorry, there was a problem downloading your snapshot!"),"long",e)})}};Il.sendDataToCloud={name:"sendDataToCloud",title:function(e){return tl(e,"Edit in Chart Studio")},icon:Pl.disk,click:function(e){ece.sendDataToCloud(e)}};Il.editInChartStudio={name:"editInChartStudio",title:function(e){return tl(e,"Edit in Chart Studio")},icon:Pl.pencil,click:function(e){ece.sendDataToCloud(e)}};Il.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return tl(e,"Zoom")},attr:"dragmode",val:"zoom",icon:Pl.zoombox,click:Bv};Il.pan2d={name:"pan2d",_cat:"pan",title:function(e){return tl(e,"Pan")},attr:"dragmode",val:"pan",icon:Pl.pan,click:Bv};Il.select2d={name:"select2d",_cat:"select",title:function(e){return tl(e,"Box Select")},attr:"dragmode",val:"select",icon:Pl.selectbox,click:Bv};Il.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return tl(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:Pl.lasso,click:Bv};Il.drawclosedpath={name:"drawclosedpath",title:function(e){return tl(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:Pl.drawclosedpath,click:Bv};Il.drawopenpath={name:"drawopenpath",title:function(e){return tl(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:Pl.drawopenpath,click:Bv};Il.drawline={name:"drawline",title:function(e){return tl(e,"Draw line")},attr:"dragmode",val:"drawline",icon:Pl.drawline,click:Bv};Il.drawrect={name:"drawrect",title:function(e){return tl(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:Pl.drawrect,click:Bv};Il.drawcircle={name:"drawcircle",title:function(e){return tl(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:Pl.drawcircle,click:Bv};Il.eraseshape={name:"eraseshape",title:function(e){return tl(e,"Erase active shape")},icon:Pl.eraseshape,click:ift};Il.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return tl(e,"Zoom in")},attr:"zoom",val:"in",icon:Pl.zoom_plus,click:Bv};Il.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return tl(e,"Zoom out")},attr:"zoom",val:"out",icon:Pl.zoom_minus,click:Bv};Il.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return tl(e,"Autoscale")},attr:"zoom",val:"auto",icon:Pl.autoscale,click:Bv};Il.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return tl(e,"Reset axes")},attr:"zoom",val:"reset",icon:Pl.home,click:Bv};Il.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return tl(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:Pl.tooltip_basic,gravity:"ne",click:Bv};Il.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return tl(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:Pl.tooltip_compare,gravity:"ne",click:Bv};function Bv(e,t){var r=t.currentTarget,n=r.getAttribute("data-attr"),i=r.getAttribute("data-val")||!0,a=e._fullLayout,o={},s=tce.list(e,null,!0),l=a._cartesianSpikesEnabled,u,c;if(n==="zoom"){var f=i==="in"?.5:2,h=(1+f)/2,d=(1-f)/2,v,m;for(c=0;c{"use strict";var uce=cN(),oft=Object.keys(uce),cce=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],fce=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(cce),nT=[],sft=function(e){if(fce.indexOf(e._cat||e.name)===-1){var t=e.name,r=(e._cat||e.name).toLowerCase();nT.indexOf(t)===-1&&nT.push(t),nT.indexOf(r)===-1&&nT.push(r)}};oft.forEach(function(e){sft(uce[e])});nT.sort();hce.exports={DRAW_MODES:cce,backButtons:fce,foreButtons:nT}});var hN=ye((nor,dce)=>{"use strict";var ior=fN();dce.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}});var pce=ye((aor,vce)=>{"use strict";var lft=Pr(),SM=ka(),uft=vl(),cft=hN();vce.exports=function(t,r){var n=t.modebar||{},i=uft.newContainer(r,"modebar");function a(s,l){return lft.coerce(n,i,cft,s,l)}a("orientation"),a("bgcolor",SM.addOpacity(r.paper_bgcolor,.5));var o=SM.contrast(SM.rgb(r.modebar.bgcolor));a("color",SM.addOpacity(o,.3)),a("activecolor",SM.addOpacity(o,.7)),a("uirevision",r.uirevision),a("add"),a("remove")}});var _ce=ye((oor,yce)=>{"use strict";var dN=qa(),fft=Eo(),gP=Pr(),gce=$L(),hft=g6().version,dft=new DOMParser;function mce(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var km=mce.prototype;km.update=function(e,t){this.graphInfo=e;var r=this.graphInfo._context,n=this.graphInfo._fullLayout,i="modebar-"+n._uid;this.element.setAttribute("id",i),this.element.setAttribute("role","toolbar"),this._uid=i,this.element.className="modebar modebar--custom",r.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),n.modebar.orientation==="v"&&(this.element.className+=" vertical",t=t.reverse());var a=n.modebar,o="#"+i+" .modebar-group";document.querySelectorAll(o).forEach(function(f){f.style.backgroundColor=a.bgcolor});var s=!this.hasButtons(t),l=this.hasLogo!==r.displaylogo,u=this.locale!==r.locale;if(this.locale=r.locale,(s||l||u)&&(this.removeAllButtons(),this.updateButtons(t),r.watermark||r.displaylogo)){var c=this.getLogo();r.watermark&&(c.className=c.className+" watermark"),n.modebar.orientation==="v"?this.element.insertBefore(c,this.element.childNodes[0]):this.element.appendChild(c),this.hasLogo=!0}this.updateActiveButton(),gP.setStyleOnHover("#"+i+" .modebar-btn",".active",".icon path","fill: "+a.activecolor,"fill: "+a.color,this.element)};km.updateButtons=function(e){var t=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(r){var n=t.createGroup();r.forEach(function(i){var a=i.name;if(!a)throw new Error("must provide button 'name' in button config");if(t.buttonsNames.indexOf(a)!==-1)throw new Error("button name '"+a+"' is taken");t.buttonsNames.push(a);var o=t.createButton(i);t.buttonElements.push(o),n.appendChild(o)}),t.element.appendChild(n)})};km.createGroup=function(){var e=document.createElement("div");e.className="modebar-group";var t=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=t.bgcolor,e};km.createButton=function(e){var t=this,r=document.createElement("button");r.setAttribute("type","button"),r.setAttribute("rel","tooltip"),r.className="modebar-btn";var n=e.title;n===void 0?n=e.name:typeof n=="function"&&(n=n(this.graphInfo)),(n||n===0)&&(r.setAttribute("data-title",n),r.setAttribute("aria-label",n)),e.attr!==void 0&&r.setAttribute("data-attr",e.attr);var i=e.val;i!==void 0&&(typeof i=="function"&&(i=i(this.graphInfo)),r.setAttribute("data-val",i));var a=e.click;if(typeof a!="function")throw new Error("must provide button 'click' function in button config");r.addEventListener("click",function(s){e.click(t.graphInfo,s),t.updateActiveButton(s.currentTarget)}),r.setAttribute("data-toggle",e.toggle||!1),e.toggle&&dN.select(r).classed("active",!0);var o=e.icon;return typeof o=="function"?r.appendChild(o()):r.appendChild(this.createIcon(o||gce.question)),r.setAttribute("data-gravity",e.gravity||"n"),r};km.createIcon=function(e){var t=fft(e.height)?Number(e.height):e.ascent-e.descent,r="http://www.w3.org/2000/svg",n;if(e.path){n=document.createElementNS(r,"svg"),n.setAttribute("viewBox",[0,0,e.width,t].join(" ")),n.setAttribute("class","icon");var i=document.createElementNS(r,"path");i.setAttribute("d",e.path),e.transform?i.setAttribute("transform",e.transform):e.ascent!==void 0&&i.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),n.appendChild(i)}if(e.svg){var a=dft.parseFromString(e.svg,"application/xml");n=a.childNodes[0]}return n.setAttribute("height","1em"),n.setAttribute("width","1em"),n};km.updateActiveButton=function(e){var t=this.graphInfo._fullLayout,r=e!==void 0?e.getAttribute("data-attr"):null;this.buttonElements.forEach(function(n){var i=n.getAttribute("data-val")||!0,a=n.getAttribute("data-attr"),o=n.getAttribute("data-toggle")==="true",s=dN.select(n),l=function(f,h){var d=t.modebar,v=f.querySelector(".icon path");v&&(h||f.matches(":hover")?v.style.fill=d.activecolor:v.style.fill=d.color)};if(o){if(a===r){var u=!s.classed("active");s.classed("active",u),l(n,u)}}else{var c=a===null?a:gP.nestedProperty(t,a).get();s.classed("active",c===i),l(n,c===i)}})};km.hasButtons=function(e){var t=this.buttons;if(!t||e.length!==t.length)return!1;for(var r=0;r{"use strict";var gft=hf(),xce=Ru(),vN=Oa(),mft=ip().isUnifiedHover,yft=_ce(),mP=cN(),_ft=fN().DRAW_MODES,xft=Pr().extendDeep;bce.exports=function(t){var r=t._fullLayout,n=t._context,i=r._modeBar;if(!n.displayModeBar&&!n.watermark){i&&(i.destroy(),delete r._modeBar);return}if(!Array.isArray(n.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(n.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var a=n.modeBarButtons,o;Array.isArray(a)&&a.length?o=Mft(a):!n.displayModeBar&&n.watermark?o=[]:o=bft(t),i?i.update(t,o):r._modeBar=yft(t,o)};function bft(e){var t=e._fullLayout,r=e._fullData,n=e._context;function i(N,H){if(typeof H=="string"){if(H.toLowerCase()===N.toLowerCase())return!0}else{var re=H.name,oe=H._cat||H.name;if(re===N||oe===N.toLowerCase())return!0}return!1}var a=t.modebar.add;typeof a=="string"&&(a=[a]);var o=t.modebar.remove;typeof o=="string"&&(o=[o]);var s=n.modeBarButtonsToAdd.concat(a.filter(function(N){for(var H=0;H1?(P=["toggleHover"],E=["resetViews"]):f?(g=["zoomInGeo","zoomOutGeo"],P=["hoverClosestGeo"],E=["resetGeo"]):c?(P=["hoverClosest3d"],E=["resetCameraDefault3d","resetCameraLastSave3d"]):m?(g=["zoomInMapbox","zoomOutMapbox"],P=["toggleHover"],E=["resetViewMapbox"]):b?(g=["zoomInMap","zoomOutMap"],P=["toggleHover"],E=["resetViewMap"]):h?P=["hoverClosestPie"]:M?(P=["hoverClosestCartesian","hoverCompareCartesian"],E=["resetViewSankey"]):P=["toggleHover"],u&&P.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(Aft(r)||L)&&(P=[]),u&&!T&&(g=["zoomIn2d","zoomOut2d","autoScale2d"],E[0]!=="resetViews"&&(E=["resetScale2d"])),c?z=["zoom3d","pan3d","orbitRotation","tableRotation"]:u&&!T||v?z=["zoom2d","pan2d"]:m||b||f?z=["pan2d"]:p&&(z=["zoom2d"]),Tft(r)&&z.push("select2d","lasso2d");var q=[],U=function(N){q.indexOf(N)===-1&&P.indexOf(N)!==-1&&q.push(N)};if(Array.isArray(s)){for(var G=[],Z=0;Z{"use strict";Tce.exports={moduleType:"component",name:"modebar",layoutAttributes:hN(),supplyLayoutDefaults:pce(),manage:wce()}});var gN=ye((uor,Ace)=>{"use strict";var Eft=Dh().FROM_BL;Ace.exports=function(t,r,n){n===void 0&&(n=Eft[t.constraintoward||"center"]);var i=[t.r2l(t.range[0]),t.r2l(t.range[1])],a=i[0]+(i[1]-i[0])*n;t.range=t._input.range=[t.l2r(a+(i[0]-a)*r),t.l2r(a+(i[1]-a)*r)],t.setScale()}});var Kb=ye(MM=>{"use strict";var Yb=Pr(),mN=Mg(),Lg=hf().id2name,kft=Rd(),Sce=gN(),Cft=xm(),Lft=fs().ALMOST_EQUAL,Pft=Dh().FROM_BL;MM.handleDefaults=function(e,t,r){var n=r.axIds,i=r.axHasImage,a=t._axisConstraintGroups=[],o=t._axisMatchGroups=[],s,l,u,c,f,h,d,v;for(s=0;sa?r.slice(a):n.slice(i))+o}function Rft(e,t){for(var r=t._size,n=r.h/r.w,i={},a=Object.keys(e),o=0;oLft*v&&!k)){for(a=0;az&&reP&&(P=re);var _e=(P-g)/(2*E);f/=_e,g=l.l2r(g),P=l.l2r(P),l.range=l._input.range=x{"use strict";var _P=qa(),Nv=Oa(),Jp=Mc(),M0=Pr(),xN=Zl(),bN=bM(),EM=ka(),aT=So(),Cce=zb(),Dce=pN(),kM=ho(),Fy=Dh(),Fce=Kb(),Dft=Fce.enforce,Fft=Fce.clean,Lce=Mg().doAutoRange,zce="start",zft="middle",qce="end",qft=Rh().zindexSeparator;pd.layoutStyles=function(e){return M0.syncOrAsync([Jp.doAutoMargin,Bft],e)};function Oft(e,t,r){for(var n=0;n=e[1]||i[1]<=e[0])&&a[0]t[0])return!0}return!1}function Bft(e){var t=e._fullLayout,r=t._size,n=r.p,i=kM.list(e,"",!0),a,o,s,l,u,c;if(t._paperdiv.style({width:e._context.responsive&&t.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":t.width+"px",height:e._context.responsive&&t.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":t.height+"px"}).selectAll(".main-svg").call(aT.setSize,t.width,t.height),e._context.setBackground(e,t.paper_bgcolor),pd.drawMainTitle(e),Dce.manage(e),!t._has("cartesian"))return Jp.previousPromises(e);function f(Le,me,Pe){var ce=Le._lw/2;if(Le._id.charAt(0)==="x"){if(me){if(Pe==="top")return me._offset-n-ce}else return r.t+r.h*(1-(Le.position||0))+ce%1;return me._offset+me._length+n+ce}if(me){if(Pe==="right")return me._offset+me._length+n+ce}else return r.l+r.w*(Le.position||0)+ce%1;return me._offset-n-ce}for(a=0;a0){Gft(e,a,u,l),s.attr({x:o,y:a,"text-anchor":n,dy:Rce(t.yanchor)}).call(xN.positionText,o,a);var c=(t.text.match(xN.BR_TAG_ALL)||[]).length;if(c){var f=Fy.LINE_SPACING*c+Fy.MID_SHIFT;t.y===0&&(f=-f),s.selectAll(".line").each(function(){var b=+this.getAttribute("dy").slice(0,-2)-f+"em";this.setAttribute("dy",b)})}var h=_P.select(e).selectAll(".gtitle-subtitle");if(h.node()){var d=s.node().getBBox(),v=d.y+d.height,m=v+Cce.SUBTITLE_PADDING_EM*t.subtitle.font.size;h.attr({x:o,y:m,"text-anchor":n,dy:Rce(t.yanchor)}).call(xN.positionText,o,m)}}}};function Nft(e,t,r,n,i){var a=t.yref==="paper"?e._fullLayout._size.h:e._fullLayout.height,o=M0.isTopAnchor(t)?n:n-i,s=r==="b"?a-o:o;return M0.isTopAnchor(t)&&r==="t"||M0.isBottomAnchor(t)&&r==="b"?!1:s.5?"t":"b",o=e._fullLayout.margin[a],s=0;return t.yref==="paper"?s=r+t.pad.t+t.pad.b:t.yref==="container"&&(s=Uft(a,n,i,e._fullLayout.height,r)+t.pad.t+t.pad.b),s>o?s:0}function Gft(e,t,r,n){var i="title.automargin",a=e._fullLayout.title,o=a.y>.5?"t":"b",s={x:a.x,y:a.y,t:0,b:0},l={};a.yref==="paper"&&Nft(e,a,o,t,n)?s[o]=r:a.yref==="container"&&(l[o]=r,e._fullLayout._reservedMargin[i]=l),Jp.allowAutoMargin(e,i),Jp.autoMargin(e,i,s)}function Hft(e,t){var r=e.title,n=e._size,i=0;switch(t===zce?i=r.pad.l:t===qce&&(i=-r.pad.r),r.xref){case"paper":return n.l+n.w*r.x+i;case"container":default:return e.width*r.x+i}}function jft(e,t){var r=e.title,n=e._size,i=0;if(t==="0em"||!t?i=-r.pad.b:t===Fy.CAP_SHIFT+"em"&&(i=r.pad.t),r.y==="auto")return n.t/2;switch(r.yref){case"paper":return n.t+n.h-n.h*r.y+i;case"container":default:return e.height-e.height*r.y+i}}function Rce(e){return e==="top"?Fy.CAP_SHIFT+.3+"em":e==="bottom"?"-0.3em":Fy.MID_SHIFT+"em"}function Wft(e){var t=e.title,r=zft;return M0.isRightAnchor(t)?r=qce:M0.isLeftAnchor(t)&&(r=zce),r}function Xft(e){var t=e.title,r="0em";return M0.isTopAnchor(t)?r=Fy.CAP_SHIFT+"em":M0.isMiddleAnchor(t)&&(r=Fy.MID_SHIFT+"em"),r}pd.doTraceStyle=function(e){var t=e.calcdata,r=[],n;for(n=0;n{"use strict";var Zft=m_().readPaths,Yft=lP(),Oce=o_().clearOutlineControllers,wN=ka(),Bce=So(),Kft=vl().arrayEditor,Nce=x_(),Jft=Nce.getPathString;Vce.exports={draw:xP,drawOne:Uce,activateLastSelection:eht};function xP(e){var t=e._fullLayout;Oce(e),t._selectionLayer.selectAll("path").remove();for(var r in t._plots){var n=t._plots[r].selectionLayer;n&&n.selectAll("path").remove()}for(var i=0;i=0;b--){var p=o.append("path").attr(l).style("opacity",b?.1:u).call(wN.stroke,f).call(wN.fill,c).call(Bce.dashLine,b?"solid":d,b?4+h:h);if($ft(p,e,n),v){var k=Kft(e.layout,"selections",n);p.style({cursor:"move"});var M={element:p.node(),plotinfo:i,gd:e,editHelpers:k,isActiveSelection:!0},T=Zft(s,e);Yft(T,p,M)}else p.style("pointer-events",b?"all":"none");m[b]=p}var L=m[0],x=m[1];x.node().addEventListener("click",function(){return Qft(e,L)})}}function $ft(e,t,r){var n=r.xref+r.yref;Bce.setClipUrl(e,"clip"+t._fullLayout._uid+n,t)}function Qft(e,t){if(bP(e)){var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeSelectionIndex){TN(e);return}e._fullLayout._activeSelectionIndex=n,e._fullLayout._deactivateSelection=TN,xP(e)}}}function eht(e){if(bP(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=TN,xP(e)}}function TN(e){if(bP(e)){var t=e._fullLayout._activeSelectionIndex;t>=0&&(Oce(e),delete e._fullLayout._activeSelectionIndex,xP(e))}}});var Hce=ye((vor,Gce)=>{function tht(){var e,t=0,r=!1;function n(i,a){return e.list.push({type:i,data:a?JSON.parse(JSON.stringify(a)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(i,a){return n("check",{seg1:i,seg2:a})},segmentChop:function(i,a){return n("div_seg",{seg:i,pt:a}),n("chop",{seg:i,pt:a})},statusRemove:function(i){return n("pop_seg",{seg:i})},segmentUpdate:function(i){return n("seg_update",{seg:i})},segmentNew:function(i,a){return n("new_seg",{seg:i,primary:a})},segmentRemove:function(i){return n("rem_seg",{seg:i})},tempStatus:function(i,a,o){return n("temp_status",{seg:i,above:a,below:o})},rewind:function(i){return n("rewind",{seg:i})},status:function(i,a,o){return n("status",{seg:i,above:a,below:o})},vert:function(i){return i===r?e:(r=i,n("vert",{x:i}))},log:function(i){return typeof i!="string"&&(i=JSON.stringify(i,!1," ")),n("log",{txt:i})},reset:function(){return n("reset")},selected:function(i){return n("selected",{segs:i})},chainStart:function(i){return n("chain_start",{seg:i})},chainRemoveHead:function(i,a){return n("chain_rem_head",{index:i,pt:a})},chainRemoveTail:function(i,a){return n("chain_rem_tail",{index:i,pt:a})},chainNew:function(i,a){return n("chain_new",{pt1:i,pt2:a})},chainMatch:function(i){return n("chain_match",{index:i})},chainClose:function(i){return n("chain_close",{index:i})},chainAddHead:function(i,a){return n("chain_add_head",{index:i,pt:a})},chainAddTail:function(i,a){return n("chain_add_tail",{index:i,pt:a})},chainConnect:function(i,a){return n("chain_con",{index1:i,index2:a})},chainReverse:function(i){return n("chain_rev",{index:i})},chainJoin:function(i,a){return n("chain_join",{index1:i,index2:a})},done:function(){return n("done")}},e}Gce.exports=tht});var Wce=ye((por,jce)=>{function rht(e){typeof e!="number"&&(e=1e-10);var t={epsilon:function(r){return typeof r=="number"&&(e=r),e},pointAboveOrOnLine:function(r,n,i){var a=n[0],o=n[1],s=i[0],l=i[1],u=r[0],c=r[1];return(s-a)*(c-o)-(l-o)*(u-a)>=-e},pointBetween:function(r,n,i){var a=r[1]-n[1],o=i[0]-n[0],s=r[0]-n[0],l=i[1]-n[1],u=s*o+a*l;if(u-e)},pointsSameX:function(r,n){return Math.abs(r[0]-n[0])e!=s-a>e&&(o-c)*(a-f)/(s-f)+c-i>e&&(l=!l),o=c,s=f}return l}};return t}jce.exports=rht});var Zce=ye((gor,Xce)=>{var iht={create:function(){var e={root:{root:!0,next:null},exists:function(t){return!(t===null||t===e.root)},isEmpty:function(){return e.root.next===null},getHead:function(){return e.root.next},insertBefore:function(t,r){for(var n=e.root,i=e.root.next;i!==null;){if(r(i)){t.prev=i.prev,t.next=i,i.prev.next=t,i.prev=t;return}n=i,i=i.next}n.next=t,t.prev=n,t.next=null},findTransition:function(t){for(var r=e.root,n=e.root.next;n!==null&&!t(n);)r=n,n=n.next;return{before:r===e.root?null:r,after:n,insert:function(i){return i.prev=r,i.next=n,r.next=i,n!==null&&(n.prev=i),i}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}};Xce.exports=iht});var Kce=ye((mor,Yce)=>{var LM=Zce();function nht(e,t,r){function n(v,m){return{id:r?r.segmentId():-1,start:v,end:m,myFill:{above:null,below:null},otherFill:null}}function i(v,m,b){return{id:r?r.segmentId():-1,start:v,end:m,myFill:{above:b.myFill.above,below:b.myFill.below},otherFill:null}}var a=LM.create();function o(v,m,b,p,k,M){var T=t.pointsCompare(m,k);return T!==0?T:t.pointsSame(b,M)?0:v!==p?v?1:-1:t.pointAboveOrOnLine(b,p?k:M,p?M:k)?1:-1}function s(v,m){a.insertBefore(v,function(b){var p=o(v.isStart,v.pt,m,b.isStart,b.pt,b.other.pt);return p<0})}function l(v,m){var b=LM.node({isStart:!0,pt:v.start,seg:v,primary:m,other:null,status:null});return s(b,v.end),b}function u(v,m,b){var p=LM.node({isStart:!1,pt:m.end,seg:m,primary:b,other:v,status:null});v.other=p,s(p,v.pt)}function c(v,m){var b=l(v,m);return u(b,v,m),b}function f(v,m){r&&r.segmentChop(v.seg,m),v.other.remove(),v.seg.end=m,v.other.pt=m,s(v.other,v.pt)}function h(v,m){var b=i(m,v.seg.end,v.seg);return f(v,m),c(b,v.primary)}function d(v,m){var b=LM.create();function p(G,Z){var j=G.seg.start,N=G.seg.end,H=Z.seg.start,re=Z.seg.end;return t.pointsCollinear(j,H,re)?t.pointsCollinear(N,H,re)||t.pointAboveOrOnLine(N,H,re)?1:-1:t.pointAboveOrOnLine(j,H,re)?1:-1}function k(G){return b.findTransition(function(Z){var j=p(G,Z.ev);return j>0})}function M(G,Z){var j=G.seg,N=Z.seg,H=j.start,re=j.end,oe=N.start,_e=N.end;r&&r.checkIntersection(j,N);var ke=t.linesIntersect(H,re,oe,_e);if(ke===!1){if(!t.pointsCollinear(H,re,oe)||t.pointsSame(H,_e)||t.pointsSame(re,oe))return!1;var Ce=t.pointsSame(H,oe),ge=t.pointsSame(re,_e);if(Ce&&ge)return Z;var ie=!Ce&&t.pointBetween(H,oe,_e),Se=!ge&&t.pointBetween(re,oe,_e);if(Ce)return Se?h(Z,re):h(G,_e),Z;ie&&(ge||(Se?h(Z,re):h(G,_e)),h(Z,H))}else ke.alongA===0&&(ke.alongB===-1?h(G,oe):ke.alongB===0?h(G,ke.pt):ke.alongB===1&&h(G,_e)),ke.alongB===0&&(ke.alongA===-1?h(Z,H):ke.alongA===0?h(Z,ke.pt):ke.alongA===1&&h(Z,re));return!1}for(var T=[];!a.isEmpty();){var L=a.getHead();if(r&&r.vert(L.pt[0]),L.isStart){let G=function(){if(C){var Z=M(L,C);if(Z)return Z}return S?M(L,S):!1};var U=G;r&&r.segmentNew(L.seg,L.primary);var x=k(L),C=x.before?x.before.ev:null,S=x.after?x.after.ev:null;r&&r.tempStatus(L.seg,C?C.seg:!1,S?S.seg:!1);var g=G();if(g){if(e){var P;L.seg.myFill.below===null?P=!0:P=L.seg.myFill.above!==L.seg.myFill.below,P&&(g.seg.myFill.above=!g.seg.myFill.above)}else g.seg.otherFill=L.seg.myFill;r&&r.segmentUpdate(g.seg),L.other.remove(),L.remove()}if(a.getHead()!==L){r&&r.rewind(L.seg);continue}if(e){var P;L.seg.myFill.below===null?P=!0:P=L.seg.myFill.above!==L.seg.myFill.below,S?L.seg.myFill.below=S.seg.myFill.above:L.seg.myFill.below=v,P?L.seg.myFill.above=!L.seg.myFill.below:L.seg.myFill.above=L.seg.myFill.below}else if(L.seg.otherFill===null){var E;S?L.primary===S.primary?E=S.seg.otherFill.above:E=S.seg.myFill.above:E=L.primary?m:v,L.seg.otherFill={above:E,below:E}}r&&r.status(L.seg,C?C.seg:!1,S?S.seg:!1),L.other.status=x.insert(LM.node({ev:L}))}else{var z=L.status;if(z===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(b.exists(z.prev)&&b.exists(z.next)&&M(z.prev.ev,z.next.ev),r&&r.statusRemove(z.ev.seg),z.remove(),!L.primary){var q=L.seg.myFill;L.seg.myFill=L.seg.otherFill,L.seg.otherFill=q}T.push(L.seg)}a.getHead().remove()}return r&&r.done(),T}return e?{addRegion:function(v){for(var m,b=v[v.length-1],p=0;p{function aht(e,t,r){var n=[],i=[];return e.forEach(function(a){var o=a.start,s=a.end;if(t.pointsSame(o,s)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}r&&r.chainStart(a);var l={index:0,matches_head:!1,matches_pt1:!1},u={index:0,matches_head:!1,matches_pt1:!1},c=l;function f(U,G,Z){return c.index=U,c.matches_head=G,c.matches_pt1=Z,c===l?(c=u,!1):(c=null,!0)}for(var h=0;h{function PM(e,t,r){var n=[];return e.forEach(function(i){var a=(i.myFill.above?8:0)+(i.myFill.below?4:0)+(i.otherFill&&i.otherFill.above?2:0)+(i.otherFill&&i.otherFill.below?1:0);t[a]!==0&&n.push({id:r?r.segmentId():-1,start:i.start,end:i.end,myFill:{above:t[a]===1,below:t[a]===2},otherFill:null})}),r&&r.selected(n),n}var oht={union:function(e,t){return PM(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],t)},intersect:function(e,t){return PM(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],t)},difference:function(e,t){return PM(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],t)},differenceRev:function(e,t){return PM(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],t)},xor:function(e,t){return PM(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],t)}};Qce.exports=oht});var rfe=ye((xor,tfe)=>{var sht={toPolygon:function(e,t){function r(a){if(a.length<=0)return e.segments({inverted:!1,regions:[]});function o(u){var c=u.slice(0,u.length-1);return e.segments({inverted:!1,regions:[c]})}for(var s=o(a[0]),l=1;l{var lht=Hce(),uht=Wce(),ife=Kce(),cht=$ce(),IM=efe(),nfe=rfe(),E0=!1,RM=uht(),kp;kp={buildLog:function(e){return e===!0?E0=lht():e===!1&&(E0=!1),E0===!1?!1:E0.list},epsilon:function(e){return RM.epsilon(e)},segments:function(e){var t=ife(!0,RM,E0);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){var r=ife(!1,RM,E0);return{combined:r.calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:IM.union(e.combined,E0),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:IM.intersect(e.combined,E0),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:IM.difference(e.combined,E0),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:IM.differenceRev(e.combined,E0),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:IM.xor(e.combined,E0),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:cht(e.segments,RM,E0),inverted:e.inverted}},polygonFromGeoJSON:function(e){return nfe.toPolygon(kp,e)},polygonToGeoJSON:function(e){return nfe.fromPolygon(kp,RM,e)},union:function(e,t){return DM(e,t,kp.selectUnion)},intersect:function(e,t){return DM(e,t,kp.selectIntersect)},difference:function(e,t){return DM(e,t,kp.selectDifference)},differenceRev:function(e,t){return DM(e,t,kp.selectDifferenceRev)},xor:function(e,t){return DM(e,t,kp.selectXor)}};function DM(e,t,r){var n=kp.segments(e),i=kp.segments(t),a=kp.combine(n,i),o=r(a);return kp.polygon(o)}typeof window=="object"&&(window.PolyBool=kp);afe.exports=kp});var lfe=ye((wor,sfe)=>{sfe.exports=function(t,r,n,i){var a=t[0],o=t[1],s=!1;n===void 0&&(n=0),i===void 0&&(i=r.length);for(var l=i-n,u=0,c=l-1;uo!=v>o&&a<(d-f)*(o-h)/(v-h)+f;m&&(s=!s)}return s}});var FM=ye((Tor,ufe)=>{"use strict";var SN=P6().dot,wP=fs().BADNUM,TP=ufe.exports={};TP.tester=function(t){var r=t.slice(),n=r[0][0],i=n,a=r[0][1],o=a,s;for((r[r.length-1][0]!==r[0][0]||r[r.length-1][1]!==r[0][1])&&r.push(r[0]),s=1;si||p===wP||po||m&&u(v))}function f(v,m){var b=v[0],p=v[1];if(b===wP||bi||p===wP||po)return!1;var k=r.length,M=r[0][0],T=r[0][1],L=0,x,C,S,g,P;for(x=1;xMath.max(C,M)||p>Math.max(S,T)))if(ps||Math.abs(SN(f,u))>i)return!0;return!1};TP.filter=function(t,r){var n=[t[0]],i=0,a=0;function o(l){t.push(l);var u=n.length,c=i;n.splice(a+1);for(var f=c+1;f1){var s=t.pop();o(s)}return{addPt:o,raw:t,filtered:n}}});var ffe=ye((Aor,cfe)=>{"use strict";cfe.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}});var Rfe=ye((Sor,Ife)=>{"use strict";var hfe=ofe(),fht=lfe(),OM=Oa(),hht=So().dashStyle,zM=ka(),dht=vf(),vht=ip().makeEventData,GM=Cg(),pht=GM.freeMode,ght=GM.rectMode,BM=GM.drawMode,CN=GM.openMode,LN=GM.selectMode,dfe=x_(),vfe=TM(),_fe=lP(),xfe=o_().clearOutline,bfe=m_(),MN=bfe.handleEllipse,mht=bfe.readPaths,yht=aP().newShapes,_ht=QB(),xht=AN().activateLastSelection,SP=Pr(),bht=SP.sorterAsc,wfe=FM(),qM=H6(),k0=hf().getFromId,wht=bM(),Tht=CM().redrawReglTraces,MP=ffe(),Cm=MP.MINSELECT,Aht=wfe.filter,PN=wfe.tester,IN=tP(),pfe=IN.p2r,Sht=IN.axValue,Mht=IN.getTransform;function RN(e){return e.subplot!==void 0}function Eht(e,t,r,n,i){var a=!RN(n),o=pht(i),s=ght(i),l=CN(i),u=BM(i),c=LN(i),f=i==="drawline",h=i==="drawcircle",d=f||h,v=n.gd,m=v._fullLayout,b=c&&m.newselection.mode==="immediate"&&a,p=m._zoomlayer,k=n.element.getBoundingClientRect(),M=n.plotinfo,T=Mht(M),L=t-k.left,x=r-k.top;m._calcInverseTransform(v);var C=SP.apply3DTransform(m._invTransform)(L,x);L=C[0],x=C[1];var S=m._invScaleX,g=m._invScaleY,P=L,E=x,z="M"+L+","+x,q=n.xaxes[0],U=n.yaxes[0],G=q._length,Z=U._length,j=e.altKey&&!(BM(i)&&l),N,H,re,oe,_e,ke,Ce;Afe(e,v,n),o&&(N=Aht([[L,x]],MP.BENDPX));var ge=p.selectAll("path.select-outline-"+M.id).data([1]),ie=u?m.newshape:m.newselection;u&&(n.hasText=ie.label.text||ie.label.texttemplate);var Se=u&&!l?ie.fillcolor:"rgba(0,0,0,0)",Ee=ie.line.color||(a?zM.contrast(v._fullLayout.plot_bgcolor):"#7f7f7f");ge.enter().append("path").attr("class","select-outline select-outline-"+M.id).style({opacity:u?ie.opacity/2:1,"stroke-dasharray":hht(ie.line.dash,ie.line.width),"stroke-width":ie.line.width+"px","shape-rendering":"crispEdges"}).call(zM.stroke,Ee).call(zM.fill,Se).attr("fill-rule","evenodd").classed("cursor-move",!!u).attr("transform",T).attr("d",z+"Z");var we=p.append("path").attr("class","zoombox-corners").style({fill:zM.background,stroke:zM.defaultLine,"stroke-width":1}).attr("transform",T).attr("d","M0,0Z");if(u&&n.hasText){var De=p.select(".label-temp");De.empty()&&(De=p.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Le=m._uid+MP.SELECTID,me=[],Pe=EP(v,n.xaxes,n.yaxes,n.subplot);b&&!e.shiftKey&&(n._clearSubplotSelections=function(){if(a){var He=q._id,lt=U._id;Cfe(v,He,lt,Pe);for(var mt=(v.layout||{}).selections||[],Vt=[],st=!1,ct=0;ct=0){v._fullLayout._deactivateShape(v);return}if(!u){var mt=m.clickmode;qM.done(Le).then(function(){if(qM.clear(Le),He===2){for(ge.remove(),_e=0;_e-1&&Tfe(lt,v,n.xaxes,n.yaxes,n.subplot,n,ge),mt==="event"&&VM(v,void 0);dht.click(v,lt,M.id)}).catch(SP.error)}},n.doneFn=function(){we.remove(),qM.done(Le).then(function(){qM.clear(Le),!b&&oe&&n.selectionDefs&&(oe.subtract=j,n.selectionDefs.push(oe),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,re)),(b||u)&&NM(n,b),n.doneFnCompleted&&n.doneFnCompleted(me),c&&VM(v,Ce)}).catch(SP.error)}}function Tfe(e,t,r,n,i,a,o){var s=t._hoverdata,l=t._fullLayout,u=l.clickmode,c=u.indexOf("event")>-1,f=[],h,d,v,m,b,p,k,M,T,L;if(Iht(s)){Afe(e,t,a),h=EP(t,r,n,i);var x=Rht(s,h),C=x.pointNumbers.length>0;if(C?Dht(h,x):Fht(h)&&(k=mfe(x))){for(o&&o.remove(),L=0;L=0}function Pht(e){return e._fullLayout._activeSelectionIndex>=0}function NM(e,t){var r=e.dragmode,n=e.plotinfo,i=e.gd;Lht(i)&&i._fullLayout._deactivateShape(i),Pht(i)&&i._fullLayout._deactivateSelection(i);var a=i._fullLayout,o=a._zoomlayer,s=BM(r),l=LN(r);if(s||l){var u=o.selectAll(".select-outline-"+n.id);if(u&&i._fullLayout._outlining){var c;s&&(c=yht(u,e)),c&&OM.call("_guiRelayout",i,{shapes:c});var f;l&&!RN(e)&&(f=_ht(u,e)),f&&(i._fullLayout._noEmitSelectedAtStart=!0,OM.call("_guiRelayout",i,{selections:f}).then(function(){t&&xht(i)})),i._fullLayout._outlining=!1}}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function gfe(e){return e._id}function EP(e,t,r,n){if(!e.calcdata)return[];var i=[],a=t.map(gfe),o=r.map(gfe),s,l,u;for(u=0;u0,a=i?n[0]:r;return t.selectedpoints?t.selectedpoints.indexOf(a)>-1:!1}function Dht(e,t){var r=[],n,i,a,o;for(o=0;o0&&r.push(n);if(r.length===1&&(a=r[0]===t.searchInfo,a&&(i=t.searchInfo.cd[0].trace,i.selectedpoints.length===t.pointNumbers.length))){for(o=0;o1||(t+=n.selectedpoints.length,t>1)))return!1;return t===1}function UM(e,t,r){var n;for(n=0;n-1&&t;if(!o&&t){var He=yfe(e,!0);if(He.length){var lt=He[0].xref,mt=He[0].yref;if(lt&&mt){var Vt=Lfe(He),st=Pfe([k0(e,lt,"x"),k0(e,mt,"y")]);st(me,Vt)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:ce&&VM(e,me),h._reselect=!1}if(!o&&h._deselect){var ct=h._deselect;s=ct.xref,l=ct.yref,Oht(s,l,c)||Cfe(e,s,l,n),ce&&(me.points.length?VM(e,me):zN(e)),h._deselect=!1}return{eventData:me,selectionTesters:r}}function qht(e){var t=e.calcdata;if(t)for(var r=0;r{"use strict";Dfe.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]});var HM=ye((Eor,Ffe)=>{"use strict";Ffe.exports={axisRefDescription:function(e,t,r){return["If set to a",e,"axis id (e.g. *"+e+"* or","*"+e+"2*), the `"+e+"` position refers to a",e,"coordinate. If set to *paper*, the `"+e+"`","position refers to the distance from the",t,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",t,"("+r+"). If set to a",e,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",t,"of the domain of that axis: e.g.,","*"+e+"2 domain* refers to the domain of the second",e," axis and a",e,"position of 0.5 refers to the","point between the",t,"and the",r,"of the domain of the","second",e,"axis."].join(" ")}}});var Jb=ye((Cor,Ofe)=>{"use strict";var zfe=qN(),qfe=ec(),kP=Rh(),Ght=vl().templatedArray,kor=HM();Ofe.exports=Ght("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:qfe({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:zfe.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:zfe.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",kP.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",kP.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",kP.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",kP.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:qfe({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})});var Lm=ye((Lor,Bfe)=>{"use strict";Bfe.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}});var Pg=ye((Por,Nfe)=>{"use strict";Nfe.exports=function(t){return{valType:"color",editType:"style",anim:!0}}});var pf=ye((Ior,Zfe)=>{"use strict";var Ufe=df().axisHoverFormat,{hovertemplateAttrs:Hht,texttemplateAttrs:jht,templatefallbackAttrs:Vfe}=Ll(),Gfe=Tu(),Wht=ec(),Hfe=Pd().dash,Xht=Pd().pattern,Zht=So(),Yht=Lm(),jM=Ao().extendFlat,Kht=Pg();function jfe(e){return{valType:"any",dflt:0,editType:"calc"}}function Wfe(e){return{valType:"any",editType:"calc"}}function Xfe(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}Zfe.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dx:{valType:"number",dflt:1,editType:"calc",anim:!0},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dy:{valType:"number",dflt:1,editType:"calc",anim:!0},xperiod:jfe("x"),yperiod:jfe("y"),xperiod0:Wfe("x0"),yperiod0:Wfe("y0"),xperiodalignment:Xfe("x"),yperiodalignment:Xfe("y"),xhoverformat:Ufe("x"),yhoverformat:Ufe("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc"},alignmentgroup:{valType:"string",dflt:"",editType:"calc"},stackgroup:{valType:"string",dflt:"",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc"},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},texttemplate:jht(),texttemplatefallback:Vfe({editType:"calc"}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc"},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style"},hovertemplate:Hht({},{keys:Yht.eventDataKeys}),hovertemplatefallback:Vfe(),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:jM({},Hfe,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot"},simplify:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot"},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc"},fillcolor:Kht(!0),fillgradient:jM({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc"},start:{valType:"number",editType:"calc"},stop:{valType:"number",editType:"calc"},colorscale:{valType:"colorscale",editType:"style"},editType:"calc"}),fillpattern:Xht,marker:jM({symbol:{valType:"enumerated",values:Zht.symbolList,dflt:"circle",arrayOk:!0,editType:"style"},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot"},sizeref:{valType:"number",dflt:1,editType:"calc"},sizemin:{valType:"number",min:0,dflt:0,editType:"calc"},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc"},line:jM({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},dash:jM({},Hfe,{arrayOk:!0}),editType:"calc"},Gfe("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc"},color:{valType:"color",arrayOk:!0,editType:"calc"},editType:"calc"},editType:"calc"},Gfe("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc"},textfont:Wht({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}});var ON=ye((Dor,Jfe)=>{"use strict";var Yfe=Jb(),Kfe=pf().line,Jht=Pd().dash,CP=Ao().extendFlat,$ht=mc().overrideAll,Qht=vl().templatedArray,Ror=HM();Jfe.exports=$ht(Qht("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:CP({},Yfe.xref,{}),yref:CP({},Yfe.yref,{}),x0:{valType:"any"},x1:{valType:"any"},y0:{valType:"any"},y1:{valType:"any"},path:{valType:"string",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw"},line:{color:Kfe.color,width:CP({},Kfe.width,{min:1,dflt:1}),dash:CP({},Jht,{dflt:"dot"})}}),"arraydraw","from-root")});var the=ye((For,ehe)=>{"use strict";var $fe=Pr(),LP=ho(),edt=Zd(),tdt=ON(),Qfe=x_();ehe.exports=function(t,r){edt(t,r,{name:"selections",handleItemDefaults:rdt});for(var n=r.selections,i=0;i{"use strict";rhe.exports=function(t,r,n){n("newselection.mode");var i=n("newselection.line.width");i&&(n("newselection.line.color"),n("newselection.line.dash")),n("activeselection.fillcolor"),n("activeselection.opacity")}});var WM=ye((qor,ohe)=>{"use strict";var idt=Oa(),nhe=Pr(),ahe=hf();ohe.exports=function(t){return function(n,i){var a=n[t];if(Array.isArray(a))for(var o=idt.subplotsRegistry.cartesian,s=o.idRegex,l=i._subplots,u=l.xaxis,c=l.yaxis,f=l.cartesian,h=i._has("cartesian"),d=0;d{"use strict";var she=AN(),XM=Rfe();lhe.exports={moduleType:"component",name:"selections",layoutAttributes:ON(),supplyLayoutDefaults:the(),supplyDrawNewSelectionDefaults:ihe(),includeBasePlot:WM()("selections"),draw:she.draw,drawOne:she.drawOne,reselect:XM.reselect,prepSelect:XM.prepSelect,clearOutline:XM.clearOutline,clearSelectionsCache:XM.clearSelectionsCache,selectOnClick:XM.selectOnClick}});var jN=ye((Bor,khe)=>{"use strict";var GN=qa(),C0=Pr(),uhe=C0.numberFormat,ndt=fd(),adt=UL(),PP=Oa(),yhe=C0.strTranslate,odt=Zl(),che=ka(),w_=So(),sdt=vf(),fhe=ho(),ldt=Eg(),udt=yv(),_he=Cg(),IP=_he.selectingOrDrawing,cdt=_he.freeMode,fdt=Dh().FROM_TL,hdt=bM(),ddt=CM().redrawReglTraces,vdt=Mc(),NN=hf().getFromId,pdt=qf().prepSelect,gdt=qf().clearOutline,mdt=qf().selectOnClick,BN=gN(),HN=Rh(),hhe=HN.MINDRAG,ap=HN.MINZOOM,dhe=!0;function ydt(e,t,r,n,i,a,o,s){var l=e._fullLayout._zoomlayer,u=o+s==="nsew",c=(o+s).length===1,f,h,d,v,m,b,p,k,M,T,L,x,C,S,g,P,E,z,q,U,G,Z,j;r+=t.yaxis._shift;function N(){if(f=t.xaxis,h=t.yaxis,M=f._length,T=h._length,p=f._offset,k=h._offset,d={},d[f._id]=f,v={},v[h._id]=h,o&&s)for(var Et=t.overlays,pt=0;pt=0){Xt._fullLayout._deactivateShape(Xt);return}var or=Xt._fullLayout.clickmode;if(VN(Xt),Et===2&&!c&&Ue(),u)or.indexOf("select")>-1&&mdt(pt,Xt,m,b,t.id,oe),or.indexOf("event")>-1&&sdt.click(Xt,pt,t.id);else if(Et===1&&c){var _r=o?h:f,Er=o==="s"||s==="w"?0:1,ei=_r._name+".range["+Er+"]",qr=_dt(_r,Er),jr="left",gt="middle";if(_r.fixedrange)return;o?(gt=o==="n"?"top":"bottom",_r.side==="right"&&(jr="right")):s==="e"&&(jr="right"),Xt._context.showAxisRangeEntryBoxes&&GN.select(re).call(odt.makeEditable,{gd:Xt,immediate:!0,background:Xt._fullLayout.paper_bgcolor,text:String(qr),fill:_r.tickfont?_r.tickfont.color:"#444",horizontalAlign:jr,verticalAlign:gt}).on("edit",function(Ge){var Je=_r.d2r(Ge);Je!==void 0&&PP.call("_guiRelayout",Xt,ei,Je)})}}udt.init(oe);var Ce,ge,ie,Se,Ee,we,De,Le,me,Pe;function ce(Et,pt,Xt){var or=re.getBoundingClientRect();Ce=pt-or.left,ge=Xt-or.top,e._fullLayout._calcInverseTransform(e);var _r=C0.apply3DTransform(e._fullLayout._invTransform)(Ce,ge);Ce=_r[0],ge=_r[1],ie={l:Ce,r:Ce,w:0,t:ge,b:ge,h:0},Se=e._hmpixcount?e._hmlumcount/e._hmpixcount:ndt(e._fullLayout.plot_bgcolor).getLuminance(),Ee="M0,0H"+M+"V"+T+"H0V0",we=!1,De="xy",Pe=!1,Le=whe(l,Se,p,k,Ee),me=The(l,p,k)}function He(Et,pt){if(e._transitioningWithDuration)return!1;var Xt=Math.max(0,Math.min(M,Z*Et+Ce)),or=Math.max(0,Math.min(T,j*pt+ge)),_r=Math.abs(Xt-Ce),Er=Math.abs(or-ge);ie.l=Math.min(Ce,Xt),ie.r=Math.max(Ce,Xt),ie.t=Math.min(ge,or),ie.b=Math.max(ge,or);function ei(){De="",ie.r=ie.l,ie.t=ie.b,me.attr("d","M0,0Z")}if(L.isSubplotConstrained)_r>ap||Er>ap?(De="xy",_r/M>Er/T?(Er=_r*T/M,ge>or?ie.t=ge-Er:ie.b=ge+Er):(_r=Er*M/T,Ce>Xt?ie.l=Ce-_r:ie.r=Ce+_r),me.attr("d",RP(ie))):ei();else if(x.isSubplotConstrained)if(_r>ap||Er>ap){De="xy";var qr=Math.min(ie.l/M,(T-ie.b)/T),jr=Math.max(ie.r/M,(T-ie.t)/T);ie.l=qr*M,ie.r=jr*M,ie.b=(1-qr)*T,ie.t=(1-jr)*T,me.attr("d",RP(ie))}else ei();else!S||Er0){var Ge;if(x.isSubplotConstrained||!C&&S.length===1){for(Ge=0;Ge1&&(ei.maxallowed!==void 0&&P===(ei.range[0]1&&(qr.maxallowed!==void 0&&E===(qr.range[0]=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function bdt(e,t,r){return e?e==="nsew"?r?"":t==="pan"?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}function whe(e,t,r,n,i){return e.append("path").attr("class","zoombox").style({fill:t>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",yhe(r,n)).attr("d",i+"Z")}function The(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:che.background,stroke:che.defaultLine,"stroke-width":1,opacity:0}).attr("transform",yhe(t,r)).attr("d","M0,0Z")}function Ahe(e,t,r,n,i,a){e.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),She(e,t,i,a)}function She(e,t,r,n){r||(e.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function VN(e){GN.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function Mhe(e){dhe&&e.data&&e._context.showTips&&(C0.notifier(C0._(e,"Double-click to zoom back out"),"long",e),dhe=!1)}function wdt(e,t){return"M"+(e.l-.5)+","+(t-ap-.5)+"h-3v"+(2*ap+1)+"h3ZM"+(e.r+.5)+","+(t-ap-.5)+"h3v"+(2*ap+1)+"h-3Z"}function Tdt(e,t){return"M"+(t-ap-.5)+","+(e.t-.5)+"v-3h"+(2*ap+1)+"v3ZM"+(t-ap-.5)+","+(e.b+.5)+"v3h"+(2*ap+1)+"v-3Z"}function RP(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,ap)/2);return"M"+(e.l-3.5)+","+(e.t-.5+t)+"h3v"+-t+"h"+t+"v-3h-"+(t+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+t)+"h-3v"+-t+"h"+-t+"v-3h"+(t+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-t)+"h-3v"+t+"h"+-t+"v3h"+(t+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-t)+"h3v"+t+"h"+t+"v3h-"+(t+3)+"Z"}function ghe(e,t,r,n,i){for(var a=!1,o={},s={},l,u,c,f,h=(i||{}).xaHash,d=(i||{}).yaHash,v=0;v{"use strict";var Adt=qa(),DP=vf(),Sdt=yv(),Mdt=Eg(),Ig=jN().makeDragBox,gd=Rh().DRAGGERSIZE;FP.initInteractions=function(t){var r=t._fullLayout;if(t._context.staticPlot){Adt.select(t).selectAll(".drag").remove();return}if(!(!r._has("cartesian")&&!r._has("splom"))){var n=Object.keys(r._plots||{}).sort(function(a,o){if((r._plots[a].mainplot&&!0)===(r._plots[o].mainplot&&!0)){var s=a.split("y"),l=o.split("y");return s[0]===l[0]?Number(s[1]||1)-Number(l[1]||1):Number(s[0]||1)-Number(l[0]||1)}return r._plots[a].mainplot?1:-1});n.forEach(function(a){var o=r._plots[a],s=o.xaxis,l=o.yaxis;if(!o.mainplot){var u=Ig(t,o,s._offset,l._offset,s._length,l._length,"ns","ew");u.onmousemove=function(h){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===a&&t._fullLayout._plots[a]&&DP.hover(t,h,a)},DP.hover(t,h,a),t._fullLayout._lasthover=u,t._fullLayout._hoversubplot=a},u.onmouseout=function(h){t._dragging||(t._fullLayout._hoversubplot=null,Sdt.unhover(t,h))},t._context.showAxisDragHandles&&(Ig(t,o,s._offset-gd,l._offset-gd,gd,gd,"n","w"),Ig(t,o,s._offset+s._length,l._offset-gd,gd,gd,"n","e"),Ig(t,o,s._offset-gd,l._offset+l._length,gd,gd,"s","w"),Ig(t,o,s._offset+s._length,l._offset+l._length,gd,gd,"s","e"))}if(t._context.showAxisDragHandles){if(a===s._mainSubplot){var c=s._mainLinePosition;s.side==="top"&&(c-=gd),Ig(t,o,s._offset+s._length*.1,c,s._length*.8,gd,"","ew"),Ig(t,o,s._offset,c,s._length*.1,gd,"","w"),Ig(t,o,s._offset+s._length*.9,c,s._length*.1,gd,"","e")}if(a===l._mainSubplot){var f=l._mainLinePosition;l.side!=="right"&&(f-=gd),Ig(t,o,f,l._offset+l._length*.1,gd,l._length*.8,"ns",""),Ig(t,o,f,l._offset+l._length*.9,gd,l._length*.1,"s",""),Ig(t,o,f,l._offset,gd,l._length*.1,"n","")}}});var i=r._hoverlayer.node();i.onmousemove=function(a){a.target=t._fullLayout._lasthover,DP.hover(t,a,r._hoversubplot)},i.onclick=function(a){a.target=t._fullLayout._lasthover,DP.click(t,a)},i.onmousedown=function(a){t._fullLayout._lasthover.onmousedown(a)},FP.updateFx(t)}};FP.updateFx=function(e){var t=e._fullLayout,r=t.dragmode==="pan"?"move":"crosshair";Mdt(t._draggers,r)}});var Phe=ye((Uor,Lhe)=>{"use strict";var Che=Oa();Lhe.exports=function(t){for(var r=Che.layoutArrayContainers,n=Che.layoutArrayRegexes,i=t.split("[")[0],a,o,s=0;s{"use strict";var Edt=Ty(),XN=L6(),ZM=K1(),kdt=U6().sorterAsc,ZN=Oa();YM.containerArrayMatch=Phe();var Cdt=YM.isAddVal=function(t){return t==="add"||Edt(t)},Ihe=YM.isRemoveVal=function(t){return t===null||t==="remove"};YM.applyContainerArrayChanges=function(t,r,n,i,a){var o=r.astr,s=ZN.getComponentMethod(o,"supplyLayoutDefaults"),l=ZN.getComponentMethod(o,"draw"),u=ZN.getComponentMethod(o,"drawOne"),c=i.replot||i.recalc||s===XN||l===XN,f=t.layout,h=t._fullLayout;if(n[""]){Object.keys(n).length>1&&ZM.warn("Full array edits are incompatible with other edits",o);var d=n[""][""];if(Ihe(d))r.set(null);else if(Array.isArray(d))r.set(d);else return ZM.warn("Unrecognized full array edit value",o,d),!0;return c?!1:(s(f,h),l(t),!0)}var v=Object.keys(n).map(Number).sort(kdt),m=r.get(),b=m||[],p=a(h,o).get(),k=[],M=-1,T=b.length,L,x,C,S,g,P,E,z;for(L=0;Lb.length-(E?0:1)){ZM.warn("index out of range",o,C);continue}if(P!==void 0)g.length>1&&ZM.warn("Insertion & removal are incompatible with edits to the same index.",o,C),Ihe(P)?k.push(C):E?(P==="add"&&(P={}),b.splice(C,0,P),p&&p.splice(C,0,{})):ZM.warn("Unrecognized full object edit value",o,C,P),M===-1&&(M=C);else for(x=0;x=0;L--)b.splice(k[L],1),p&&p.splice(k[L],1);if(b.length?m||r.set(b):r.set(null),c)return!1;if(s(f,h),u!==XN){var q;if(M===-1)q=v;else{for(T=Math.max(b.length,T),q=[],L=0;L=M));L++)q.push(C);for(L=M;L{"use strict";var qhe=Eo(),Ohe=Oa(),Uv=Pr(),KM=Mc(),Bhe=hf(),Nhe=ka(),JM=Bhe.cleanId,Ldt=Bhe.getFromTrace,YN=Ohe.traceIs,Pdt=["x","y","z"];L0.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&Uv.log("Clearing previous rejected promises from queue."),e._promises=[]};L0.cleanLayout=function(e){var t,r;e||(e={}),e.xaxis1&&(e.xaxis||(e.xaxis=e.xaxis1),delete e.xaxis1),e.yaxis1&&(e.yaxis||(e.yaxis=e.yaxis1),delete e.yaxis1),e.scene1&&(e.scene||(e.scene=e.scene1),delete e.scene1);var n=(KM.subplotsRegistry.cartesian||{}).attrRegex,i=(KM.subplotsRegistry.polar||{}).attrRegex,a=(KM.subplotsRegistry.ternary||{}).attrRegex,o=(KM.subplotsRegistry.gl3d||{}).attrRegex,s=Object.keys(e);for(t=0;t3?(b.x=1.02,b.xanchor="left"):b.x<-2&&(b.x=-.02,b.xanchor="right"),b.y>3?(b.y=1.02,b.yanchor="bottom"):b.y<-2&&(b.y=-.02,b.yanchor="top")),e.dragmode==="rotate"&&(e.dragmode="orbit"),Nhe.clean(e),e.template&&e.template.layout&&L0.cleanLayout(e.template.layout),e};function oT(e,t,r=!1){var n=e[t],i=t.charAt(0);r&&Array.isArray(n)||n&&n!=="paper"&&(e[t]=JM(n,i,!0))}L0.cleanData=function(e){for(var t=0;t0)return e.slice(0,t)}L0.hasParent=function(e,t){for(var r=zhe(t);r;){if(r in e)return!0;r=zhe(r)}return!1};L0.clearAxisTypes=function(e,t,r){for(var n=0;n{let r=(...n)=>n.every(i=>Uv.isPlainObject(i))||n.every(i=>Array.isArray(i));if([e,t].every(n=>Array.isArray(n))){if(e.length!==t.length)return!1;for(let n=0;nUv.isPlainObject(n))){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e){if(n.startsWith("_"))continue;let i=e[n],a=t[n];if(i!==a&&!(r(i,a)?KN(i,a):!1))return!1}return!0}return!1};L0.collectionsAreEqual=KN});var ZP=ye(_l=>{"use strict";var BP=qa(),Ddt=Eo(),Fdt=lO(),Sa=Pr(),Ec=Sa.nestedProperty,QN=C3(),op=Sne(),P0=Oa(),WP=I3(),Qo=Mc(),Vv=ho(),zdt=AB(),qdt=Rd(),JN=So(),Odt=ka(),Bdt=WN().initInteractions,Ndt=Wp(),Udt=qf().clearOutline,Whe=_b().dfltConfig,qP=Rhe(),gh=Uhe(),Au=CM(),T_=mc(),Vdt=Rh().AX_NAME_PATTERN,$N=0,Vhe=5;function Gdt(e,t,r,n){var i;if(e=Sa.getGraphDiv(e),QN.init(e),Sa.isPlainObject(t)){var a=t;t=a.data,r=a.layout,n=a.config,i=a.frames}var o=QN.triggerHandler(e,"plotly_beforeplot",[t,r,n]);if(o===!1)return Promise.reject();!t&&!r&&!Sa.isPlotDiv(e)&&Sa.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",e);function s(){if(i)return _l.addFrames(e,i)}Zhe(e,n),r||(r={}),BP.select(e).classed("js-plotly-plot",!0),JN.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var l=(e.data||[]).length===0&&Array.isArray(t);Array.isArray(t)&&(gh.cleanData(t),l?e.data=t:e.data.push.apply(e.data,t),e.empty=!1),(!e.layout||l)&&(e.layout=gh.cleanLayout(r)),Qo.supplyDefaults(e);var u=e._fullLayout,c=u._has("cartesian");u._replotting=!0,(l||u._shouldCreateBgLayer)&&(hvt(e),u._shouldCreateBgLayer&&delete u._shouldCreateBgLayer),JN.initGradients(e),JN.initPatterns(e),l&&Vv.saveShowSpikeInitial(e);var f=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;f&&Qo.doCalcdata(e);for(var h=0;h=e.data.length||i<-e.data.length)throw new Error(r+" must be valid indices for gd.data.");if(t.indexOf(i,n+1)>-1||i>=0&&t.indexOf(-e.data.length+i)>-1||i<0&&t.indexOf(e.data.length+i)>-1)throw new Error("each index in "+r+" must be unique.")}}function Yhe(e,t,r){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof t=="undefined")throw new Error("currentIndices is a required argument.");if(Array.isArray(t)||(t=[t]),UP(e,t,"currentIndices"),typeof r!="undefined"&&!Array.isArray(r)&&(r=[r]),typeof r!="undefined"&&UP(e,r,"newIndices"),typeof r!="undefined"&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function Zdt(e,t,r){var n,i;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof t=="undefined")throw new Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),n=0;n=0&&c=0&&c0&&typeof S.parts[E]!="string";)E--;var z=S.parts[E],q=S.parts[E-1]+"."+z,U=S.parts.slice(0,E).join("."),G=Ec(e.layout,U).get(),Z=Ec(n,U).get(),j=S.get();if(g!==void 0){p[C]=g,k[C]=z==="reverse"?g:zy(j);var N=WP.getLayoutValObject(n,S.parts);if(N&&N.impliedEdits&&g!==null)for(var H in N.impliedEdits)M(Sa.relativeAttr(C,H),N.impliedEdits[H]);if(["width","height"].indexOf(C)!==-1)if(g){M("autosize",null);var re=C==="height"?"width":"height";M(re,n[re])}else n[C]=e._initialAutoSize[C];else if(C==="autosize")M("width",g?null:n.width),M("height",g?null:n.height);else if(q.match(nde))x(q),Ec(n,U+"._inputRange").set(null);else if(q.match(ade)){x(q),Ec(n,U+"._inputRange").set(null);var oe=Ec(n,U).get();oe._inputDomain&&(oe._input.domain=oe._inputDomain.slice())}else q.match($dt)&&Ec(n,U+"._inputDomain").set(null);if(z==="type"){L=G;var _e=Z.type==="linear"&&g==="log",ke=Z.type==="log"&&g==="linear";if(_e||ke){if(!L||!L.range)M(U+".autorange",!0);else if(Z.autorange)_e&&(L.range=L.range[1]>L.range[0]?[1,2]:[2,1]);else{var Ce=L.range[0],ge=L.range[1];_e?(Ce<=0&&ge<=0&&M(U+".autorange",!0),Ce<=0?Ce=ge/1e6:ge<=0&&(ge=Ce/1e6),M(U+".range[0]",Math.log(Ce)/Math.LN10),M(U+".range[1]",Math.log(ge)/Math.LN10)):(M(U+".range[0]",Math.pow(10,Ce)),M(U+".range[1]",Math.pow(10,ge)))}Array.isArray(n._subplots.polar)&&n._subplots.polar.length&&n[S.parts[0]]&&S.parts[1]==="radialaxis"&&delete n[S.parts[0]]._subplot.viewInitial["radialaxis.range"],P0.getComponentMethod("annotations","convertCoords")(e,Z,g,M),P0.getComponentMethod("images","convertCoords")(e,Z,g,M)}else M(U+".autorange",!0),M(U+".range",null);Ec(n,U+"._inputRange").set(null)}else if(z.match(Vdt)){var ie=Ec(n,C).get(),Se=(g||{}).type;(!Se||Se==="-")&&(Se="linear"),P0.getComponentMethod("annotations","convertCoords")(e,ie,Se,M),P0.getComponentMethod("images","convertCoords")(e,ie,Se,M)}var Ee=qP.containerArrayMatch(C);if(Ee){c=Ee.array,f=Ee.index;var we=Ee.property,De=N||{editType:"calc"};f!==""&&we===""&&(qP.isAddVal(g)?k[C]=null:qP.isRemoveVal(g)?k[C]=(Ec(r,c).get()||[])[f]:Sa.warn("unrecognized full object value",t)),T_.update(b,De),u[c]||(u[c]={});var Le=u[c][f];Le||(Le=u[c][f]={}),Le[we]=g,delete t[C]}else z==="reverse"?(G.range?G.range.reverse():(M(U+".autorange",!0),G.range=[1,0]),Z.autorange?b.calc=!0:b.plot=!0):(C==="dragmode"&&(g===!1&&j!==!1||g!==!1&&j===!1)||n._has("scatter-like")&&n._has("regl")&&C==="dragmode"&&(g==="lasso"||g==="select")&&!(j==="lasso"||j==="select")?b.plot=!0:N?T_.update(b,N):b.calc=!0,S.set(g))}}for(c in u){var me=qP.applyContainerArrayChanges(e,a(r,c),u[c],b,a);me||(b.plot=!0)}for(var Pe in T){L=Vv.getFromId(e,Pe);var ce=L&&L._constraintGroup;if(ce){b.calc=!0;for(var He in ce)T[He]||(Vv.getFromId(e,He)._constraintShrinkable=!0)}}(sde(e)||t.height||t.width)&&(b.plot=!0);var lt=n.shapes;for(f=0;f1;)if(n.pop(),r=Ec(t,n.join(".")+".uirevision").get(),r!==void 0)return r;return t.uirevision}function tvt(e,t){for(var r=0;r[U,e._ev.listeners(U)]);a=_l.newPlot(e,t,r,n).then(()=>{for(let[U,G]of q)G.forEach(Z=>e.on(U,Z));return _l.react(e,t,r,n)})}else{e.data=t||[],gh.cleanData(e.data),e.layout=r||{},gh.cleanLayout(e.layout),ivt(e.data,e.layout,s,l),Qo.supplyDefaults(e,{skipUpdateCalc:!0});var f=e._fullData,h=e._fullLayout,d=h.datarevision===void 0,v=h.transition,m=ovt(e,l,h,d,v),b=m.newDataRevision,p=avt(e,s,f,d,v,b);if(sde(e)&&(m.layoutReplot=!0),p.calc||m.calc){e.calcdata=void 0;for(var k=Object.getOwnPropertyNames(h),M=0;M(c||e.emit("plotly_react",{config:n,data:t,layout:r}),e))}function avt(e,t,r,n,i,a){var o=t.length===r.length;if(!i&&!o)return{fullReplot:!0,calc:!0};var s=T_.traceFlags();s.arrays={},s.nChanges=0,s.nChangesAnim=0;var l,u;function c(d){var v=WP.getTraceValObject(u,d);return!u._module.animatable&&v.anim&&(v.anim=!1),v}var f={getValObject:c,flags:s,immutable:n,transition:i,newDataRevision:a,gd:e},h={};for(l=0;l=i.length?i[0]:i[u]:i}function s(u){return Array.isArray(a)?u>=a.length?a[0]:a[u]:a}function l(u,c){var f=0;return function(){if(u&&++f===c)return u()}}return new Promise(function(u,c){function f(){if(n._frameQueue.length!==0){for(;n._frameQueue.length;){var z=n._frameQueue.pop();z.onInterrupt&&z.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}function h(z){if(z.length!==0){for(var q=0;qn._timeToNext&&v()};z()}var b=0;function p(z){return Array.isArray(i)?b>=i.length?z.transitionOpts=i[b]:z.transitionOpts=i[0]:z.transitionOpts=i,b++,z}var k,M,T=[],L=t==null,x=Array.isArray(t),C=!L&&!x&&Sa.isPlainObject(t);if(C)T.push({type:"object",data:p(Sa.extendFlat({},t))});else if(L||["string","number"].indexOf(typeof t)!==-1)for(k=0;k0&&PP)&&E.push(M);T=E}}T.length>0?h(T):(e.emit("plotly_animated"),u())})}function lvt(e,t,r){if(e=Sa.getGraphDiv(e),t==null)return Promise.resolve();if(!Sa.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var n,i,a,o,s=e._transitionData._frames,l=e._transitionData._frameHash;if(!Array.isArray(t))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+t);var u=s.length+t.length*2,c=[],f={};for(n=t.length-1;n>=0;n--)if(Sa.isPlainObject(t[n])){var h=t[n].name,d=(l[h]||f[h]||{}).name,v=t[n].name,m=l[d]||f[d];d&&v&&typeof v=="number"&&m&&$NS.index?-1:C.index=0;n--){if(i=c[n].frame,typeof i.name=="number"&&Sa.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!i.name)for(;l[i.name="frame "+e._transitionData._counter++];);if(l[i.name]){for(a=0;a=0;r--)n=t[r],a.push({type:"delete",index:n}),o.unshift({type:"insert",index:n,value:i[n]});var s=Qo.modifyFrames,l=Qo.modifyFrames,u=[e,o],c=[e,a];return op&&op.add(e,s,u,l,c),Qo.modifyFrames(e,a)}function cvt(e){e=Sa.getGraphDiv(e);var t=e._fullLayout||{},r=e._fullData||[];return Qo.cleanPlot([],{},r,t),Qo.purge(e),QN.purge(e),t._container&&t._container.remove(),delete e._context,e}function fvt(e){var t=e._fullLayout,r=e.getBoundingClientRect();if(!Sa.equalDomRects(r,t._lastBBox)){var n=t._invTransform=Sa.inverseTransformMatrix(Sa.getFullTransformMatrix(e));t._invScaleX=Math.sqrt(n[0][0]*n[0][0]+n[0][1]*n[0][1]+n[0][2]*n[0][2]),t._invScaleY=Math.sqrt(n[1][0]*n[1][0]+n[1][1]*n[1][1]+n[1][2]*n[1][2]),t._lastBBox=r}}function hvt(e){var t=BP.select(e),r=e._fullLayout;if(r._calcInverseTransform=fvt,r._calcInverseTransform(e),r._container=t.selectAll(".plot-container").data([0]),r._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),r._paperdiv=r._container.selectAll(".svg-container").data([0]),r._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),r._glcontainer=r._paperdiv.selectAll(".gl-container").data([{}]),r._glcontainer.enter().append("div").classed("gl-container",!0),r._paperdiv.selectAll(".main-svg").remove(),r._paperdiv.select(".modebar-container").remove(),r._paper=r._paperdiv.insert("svg",":first-child").classed("main-svg",!0),r._toppaper=r._paperdiv.append("svg").classed("main-svg",!0),r._modebardiv=r._paperdiv.append("div"),delete r._modeBar,r._hoverpaper=r._paperdiv.append("svg").classed("main-svg",!0),!r._uid){var n={};BP.selectAll("defs").each(function(){this.id&&(n[this.id.split("-")[1]]=1)}),r._uid=Sa.randstr(n)}r._paperdiv.selectAll(".main-svg").attr(Ndt.svgAttrs),r._defs=r._paper.append("defs").attr("id","defs-"+r._uid),r._clips=r._defs.append("g").classed("clips",!0),r._topdefs=r._toppaper.append("defs").attr("id","topdefs-"+r._uid),r._topclips=r._topdefs.append("g").classed("clips",!0),r._bgLayer=r._paper.append("g").classed("bglayer",!0),r._draggers=r._paper.append("g").classed("draglayer",!0);var i=r._paper.append("g").classed("layer-below",!0);r._imageLowerLayer=i.append("g").classed("imagelayer",!0),r._shapeLowerLayer=i.append("g").classed("shapelayer",!0),r._cartesianlayer=r._paper.append("g").classed("cartesianlayer",!0),r._polarlayer=r._paper.append("g").classed("polarlayer",!0),r._smithlayer=r._paper.append("g").classed("smithlayer",!0),r._ternarylayer=r._paper.append("g").classed("ternarylayer",!0),r._geolayer=r._paper.append("g").classed("geolayer",!0),r._funnelarealayer=r._paper.append("g").classed("funnelarealayer",!0),r._pielayer=r._paper.append("g").classed("pielayer",!0),r._iciclelayer=r._paper.append("g").classed("iciclelayer",!0),r._treemaplayer=r._paper.append("g").classed("treemaplayer",!0),r._sunburstlayer=r._paper.append("g").classed("sunburstlayer",!0),r._indicatorlayer=r._toppaper.append("g").classed("indicatorlayer",!0),r._glimages=r._paper.append("g").classed("glimages",!0);var a=r._toppaper.append("g").classed("layer-above",!0);r._imageUpperLayer=a.append("g").classed("imagelayer",!0),r._shapeUpperLayer=a.append("g").classed("shapelayer",!0),r._selectionLayer=r._toppaper.append("g").classed("selectionlayer",!0),r._infolayer=r._toppaper.append("g").classed("infolayer",!0),r._menulayer=r._toppaper.append("g").classed("menulayer",!0),r._zoomlayer=r._toppaper.append("g").classed("zoomlayer",!0),r._hoverlayer=r._hoverpaper.append("g").classed("hoverlayer",!0),r._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),e.emit("plotly_framework")}_l.animate=svt;_l.addFrames=lvt;_l.deleteFrames=uvt;_l.addTraces=ede;_l.deleteTraces=tde;_l.extendTraces=$he;_l.moveTraces=eU;_l.prependTraces=Qhe;_l.newPlot=Xdt;_l._doPlot=Gdt;_l.purge=cvt;_l.react=nvt;_l.redraw=Wdt;_l.relayout=$M;_l.restyle=VP;_l.setPlotConfig=Hdt;_l.update=HP;_l._guiRelayout=tU($M);_l._guiRestyle=tU(VP);_l._guiUpdate=tU(HP);_l._storeDirectGUIEdit=Jdt});var qy=ye(Pm=>{"use strict";var dvt=Oa();Pm.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("mapbox")||e._has("map"))?500:0};Pm.getRedrawFunc=function(e){return function(){dvt.getComponentMethod("colorbar","draw")(e)}};Pm.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)};Pm.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var lde=window.URL||window.webkitURL;Pm.createObjectURL=function(e){return lde.createObjectURL(e)};Pm.revokeObjectURL=function(e){return lde.revokeObjectURL(e)};Pm.createBlob=function(e,t){if(t==="svg")return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if(t==="full-json")return new window.Blob([e],{type:"application/json;charset=utf-8"});var r=vvt(window.atob(e));return new window.Blob([r],{type:"image/"+t})};Pm.octetStream=function(e){document.location.href="data:application/octet-stream"+e};function vvt(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),i=0;i{"use strict";var iU=qa(),Wor=Pr(),pvt=So(),gvt=ka(),Xor=Wp(),rU=/"/g,e4="TOBESTRIPPED",mvt=new RegExp('("'+e4+")|("+e4+'")',"g");function yvt(e){var t=iU.select("body").append("div").style({display:"none"}).html(""),r=e.replace(/(&[^;]*;)/gi,function(n){return n==="<"?"<":n==="&rt;"?">":n.indexOf("<")!==-1||n.indexOf(">")!==-1?"":t.html(n).text()});return t.remove(),r}function _vt(e){return e.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}ude.exports=function(t,r,n){var i=t._fullLayout,a=i._paper,o=i._toppaper,s=i.width,l=i.height,u;a.insert("rect",":first-child").call(pvt.setRect,0,0,s,l).call(gvt.fill,i.paper_bgcolor);var c=i._basePlotModules||[];for(u=0;u{"use strict";var xvt=Pr(),bvt=Ab().EventEmitter,t4=qy();function wvt(e){var t=e.emitter||new bvt,r=new Promise(function(n,i){var a=window.Image,o=e.svg,s=e.format||"png",l=e.canvas,u=e.scale||1,c=e.width||300,f=e.height||150,h=u*c,d=u*f,v=l.getContext("2d",{willReadFrequently:!0}),m=new a,b,p;s==="svg"||xvt.isSafari()?p=t4.encodeSVG(o):(b=t4.createBlob(o,"svg"),p=t4.createObjectURL(b)),l.width=h,l.height=d,m.onload=function(){var k;switch(b=null,t4.revokeObjectURL(p),s!=="svg"&&v.drawImage(m,0,0,h,d),s){case"jpeg":k=l.toDataURL("image/jpeg");break;case"png":k=l.toDataURL("image/png");break;case"webp":k=l.toDataURL("image/webp");break;case"svg":k=p;break;default:var M="Image format is not jpeg, png, svg or webp.";if(i(new Error(M)),!e.promise)return t.emit("error",M)}n(k),e.promise||t.emit("success",k)},m.onerror=function(k){if(b=null,t4.revokeObjectURL(p),i(k),!e.promise)return t.emit("error",k)},m.src=p});return e.promise?r:t}cde.exports=wvt});var aU=ye((Kor,dde)=>{"use strict";var fde=Eo(),hde=ZP(),Tvt=Mc(),Im=Pr(),r4=qy(),Avt=YP(),Svt=KP(),Mvt=g6().version,nU={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};function Evt(e,t){t=t||{};var r,n,i,a;Im.isPlainObject(e)?(r=e.data||[],n=e.layout||{},i=e.config||{},a={}):(e=Im.getGraphDiv(e),r=Im.extendDeep([],e.data),n=Im.extendDeep({},e.layout),i=e._context,a=e._fullLayout||{});function o(x){return!(x in t)||Im.validate(t[x],nU[x])}if(!o("width")&&t.width!==null||!o("height")&&t.height!==null)throw new Error("Height and width should be pixel values.");if(!o("format"))throw new Error("Export format is not "+Im.join2(nU.format.values,", "," or ")+".");var s={};function l(x,C){return Im.coerce(t,s,nU,x,C)}var u=l("format"),c=l("width"),f=l("height"),h=l("scale"),d=l("setBackground"),v=l("imageDataOnly"),m=document.createElement("div");m.style.position="absolute",m.style.left="-5000px",document.body.appendChild(m);var b=Im.extendFlat({},n);c?b.width=c:t.width===null&&fde(a.width)&&(b.width=a.width),f?b.height=f:t.height===null&&fde(a.height)&&(b.height=a.height);var p=Im.extendFlat({},i,{_exportedPlot:!0,staticPlot:!0,setBackground:d}),k=r4.getRedrawFunc(m);function M(){return new Promise(function(x){setTimeout(x,r4.getDelay(m._fullLayout))})}function T(){return new Promise(function(x,C){var S=Avt(m,u,h),g=m._fullLayout.width,P=m._fullLayout.height;function E(){hde.purge(m),document.body.removeChild(m)}if(u==="full-json"){var z=Tvt.graphJson(m,!1,"keepdata","object",!0,!0);return z.version=Mvt,z=JSON.stringify(z),E(),x(v?z:r4.encodeJSON(z))}if(E(),u==="svg")return x(v?S:r4.encodeSVG(S));var q=document.createElement("canvas");q.id=Im.randstr(),Svt({format:u,width:g,height:P,scale:h,canvas:q,svg:S,promise:!0}).then(x).catch(C)})}function L(x){return v?x.replace(r4.IMAGE_URL_PREFIX,""):x}return new Promise(function(x,C){hde.newPlot(m,r,b,p).then(k).then(M).then(T).then(function(S){x(L(S))}).catch(function(S){C(S)})})}dde.exports=Evt});var gde=ye((Jor,pde)=>{"use strict";var I0=Pr(),kvt=Mc(),Cvt=I3(),Lvt=_b().dfltConfig,Rg=I0.isPlainObject,Qb=Array.isArray,oU=I0.isArrayOrTypedArray;pde.exports=function(t,r){t===void 0&&(t=[]),r===void 0&&(r={});var n=Cvt.get(),i=[],a={_context:I0.extendFlat({},Lvt)},o,s;Qb(t)?(a.data=I0.extendDeep([],t),o=t):(a.data=[],o=[],i.push(md("array","data"))),Rg(r)?(a.layout=I0.extendDeep({},r),s=r):(a.layout={},s={},arguments.length>1&&i.push(md("object","layout"))),kvt.supplyDefaults(a);for(var l=a._fullData,u=o.length,c=0;cf.length&&n.push(md("unused",i,u.concat(f.length)));var p=f.length,k=Array.isArray(b);k&&(p=Math.min(p,b.length));var M,T,L,x,C;if(h.dimensions===2)for(T=0;Tf[T].length&&n.push(md("unused",i,u.concat(T,f[T].length)));var S=f[T].length;for(M=0;M<(k?Math.min(S,b[T].length):S);M++)L=k?b[T][M]:b,x=c[T][M],C=f[T][M],I0.validate(x,L)?C!==x&&C!==+x&&n.push(md("dynamic",i,u.concat(T,M),x,C)):n.push(md("value",i,u.concat(T,M),x))}else n.push(md("array",i,u.concat(T),c[T]));else for(T=0;T{"use strict";var qvt=Pr(),$P=qy();function Ovt(e,t,r){var n=document.createElement("a"),i="download"in n,a=new Promise(function(o,s){var l,u;if(i)return l=$P.createBlob(e,r),u=$P.createObjectURL(l),n.href=u,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),$P.revokeObjectURL(u),l=null,o(t);if(qvt.isSafari()){var c=r==="svg"?",":";base64,";return $P.octetStream(c+encodeURIComponent(e)),o(t)}s(new Error("download error"))});return a}mde.exports=Ovt});var sU=ye((esr,xde)=>{"use strict";var _de=Pr(),Bvt=aU(),Nvt=yde(),Qor=qy();function Uvt(e,t){var r;return _de.isPlainObject(e)||(r=_de.getGraphDiv(e)),t=t||{},t.format=t.format||"png",t.width=t.width||null,t.height=t.height||null,t.imageDataOnly=!0,new Promise(function(n,i){r&&r._snapshotInProgress&&i(new Error("Snapshotting already in progress.")),r&&(r._snapshotInProgress=!0);var a=Bvt(e,t),o=t.filename||e.fn||"newplot";o+="."+t.format.replace("-","."),a.then(function(s){return r&&(r._snapshotInProgress=!1),Nvt(s,o,t.format)}).then(function(s){n(s)}).catch(function(s){r&&(r._snapshotInProgress=!1),i(s)})})}xde.exports=Uvt});var Sde=ye(lU=>{"use strict";var Cp=Pr(),Lp=Cp.isPlainObject,bde=I3(),wde=Mc(),Vvt=Gl(),Tde=vl(),Ade=_b().dfltConfig;lU.makeTemplate=function(e){e=Cp.isPlainObject(e)?e:Cp.getGraphDiv(e),e=Cp.extendDeep({_context:Ade},{data:e.data,layout:e.layout}),wde.supplyDefaults(e);var t=e.data||[],r=e.layout||{};r._basePlotModules=e._fullLayout._basePlotModules,r._modules=e._fullLayout._modules;var n={data:{},layout:{}};t.forEach(function(d){var v={};i4(d,v,Hvt.bind(null,d));var m=Cp.coerce(d,{},Vvt,"type"),b=n.data[m];b||(b=n.data[m]=[]),b.push(v)}),i4(r,n.layout,Gvt.bind(null,r)),delete n.layout.template;var i=r.template;if(Lp(i)){var a=i.layout,o,s,l,u,c,f;Lp(a)&&QP(a,n.layout);var h=i.data;if(Lp(h)){for(s in n.data)if(l=h[s],Array.isArray(l)){for(c=n.data[s],f=c.length,u=l.length,o=0;op?o.push({code:"unused",traceType:d,templateCount:b,dataCount:p}):p>b&&o.push({code:"reused",traceType:d,templateCount:b,dataCount:p})}}function k(M,T){for(var L in M)if(L.charAt(0)!=="_"){var x=M[L],C=R0(M,L,T);Lp(x)?(Array.isArray(M)&&x._template===!1&&x.templateitemname&&o.push({code:"missing",path:C,templateitemname:x.templateitemname}),k(x,C)):Array.isArray(x)&&jvt(x)&&k(x,C)}}if(k({data:l,layout:s},""),o.length)return o.map(Wvt)};function jvt(e){for(var t=0;t{"use strict";var rd=ZP();ef._doPlot=rd._doPlot;ef.newPlot=rd.newPlot;ef.restyle=rd.restyle;ef.relayout=rd.relayout;ef.redraw=rd.redraw;ef.update=rd.update;ef._guiRestyle=rd._guiRestyle;ef._guiRelayout=rd._guiRelayout;ef._guiUpdate=rd._guiUpdate;ef._storeDirectGUIEdit=rd._storeDirectGUIEdit;ef.react=rd.react;ef.extendTraces=rd.extendTraces;ef.prependTraces=rd.prependTraces;ef.addTraces=rd.addTraces;ef.deleteTraces=rd.deleteTraces;ef.moveTraces=rd.moveTraces;ef.purge=rd.purge;ef.addFrames=rd.addFrames;ef.deleteFrames=rd.deleteFrames;ef.animate=rd.animate;ef.setPlotConfig=rd.setPlotConfig;var Xvt=HS().getGraphDiv,Zvt=dP().eraseActiveShape;ef.deleteActiveShape=function(e){return Zvt(Xvt(e))};ef.toImage=aU();ef.validate=gde();ef.downloadImage=sU();var Mde=Sde();ef.makeTemplate=Mde.makeTemplate;ef.validateTemplate=Mde.validateTemplate});var sT=ye((isr,kde)=>{"use strict";var uU=Pr(),Yvt=Oa();kde.exports=function(t,r,n,i){var a=i("x"),o=i("y"),s,l=Yvt.getComponentMethod("calendars","handleTraceDefaults");if(l(t,r,["x","y"],n),a){var u=uU.minRowLength(a);o?s=Math.min(u,uU.minRowLength(o)):(s=u,i("y0"),i("dy"))}else{if(!o)return 0;s=uU.minRowLength(o),i("x0"),i("dx")}return r._length=s,s}});var Dg=ye((nsr,Pde)=>{"use strict";var Cde=Pr().dateTick0,Kvt=fs(),Jvt=Kvt.ONEWEEK;function Lde(e,t){return e%Jvt===0?Cde(t,1):Cde(t,0)}Pde.exports=function(t,r,n,i,a){if(a||(a={x:!0,y:!0}),a.x){var o=i("xperiod");o&&(i("xperiod0",Lde(o,r.xcalendar)),i("xperiodalignment"))}if(a.y){var s=i("yperiod");s&&(i("yperiod0",Lde(s,r.ycalendar)),i("yperiodalignment"))}}});var Dde=ye((asr,Rde)=>{"use strict";var Ide=["orientation","groupnorm","stackgaps"];Rde.exports=function(t,r,n,i){var a=n._scatterStackOpts,o=i("stackgroup");if(o){var s=r.xaxis+r.yaxis,l=a[s];l||(l=a[s]={});var u=l[o],c=!1;u?u.traces.push(r):(u=l[o]={traceIndices:[],traces:[r]},c=!0);for(var f={orientation:r.x&&!r.y?"h":"v"},h=0;h{"use strict";var Fde=ka(),zde=pv().hasColorscale,qde=td(),$vt=Ru();Ode.exports=function(t,r,n,i,a,o={}){var s=$vt.isBubble(t),l=(t.line||{}).color,u;if(l&&(n=l),a("marker.symbol"),a("marker.opacity",s?.7:1),a("marker.size"),o.noAngle||(a("marker.angle"),o.noAngleRef||a("marker.angleref"),o.noStandOff||a("marker.standoff")),a("marker.color",n),zde(t,"marker")&&qde(t,r,i,a,{prefix:"marker.",cLetter:"c"}),o.noSelect||(a("selected.marker.color"),a("unselected.marker.color"),a("selected.marker.size"),a("unselected.marker.size")),o.noLine||(l&&!Array.isArray(l)&&r.marker.color!==l?u=l:s?u=Fde.background:u=Fde.defaultLine,a("marker.line.color",u),zde(t,"marker.line")&&qde(t,r,i,a,{prefix:"marker.line.",cLetter:"c"}),a("marker.line.width",s?1:0),o.noLineDash||a("marker.line.dash")),s&&(a("marker.sizeref"),a("marker.sizemin"),a("marker.sizemode")),o.gradient){var c=a("marker.gradient.type");c!=="none"&&a("marker.gradient.color")}}});var D0=ye((ssr,Bde)=>{"use strict";var Qvt=Pr().isArrayOrTypedArray,ept=pv().hasColorscale,tpt=td();Bde.exports=function(t,r,n,i,a,o){o||(o={});var s=(t.marker||{}).color;if(s&&s._inputArray&&(s=s._inputArray),a("line.color",n),ept(t,"line"))tpt(t,r,i,a,{prefix:"line.",cLetter:"c"});else{var l=(Qvt(s)?!1:s)||n;a("line.color",l)}a("line.width"),o.noDash||a("line.dash"),o.backoff&&a("line.backoff")}});var lT=ye((lsr,Nde)=>{"use strict";Nde.exports=function(t,r,n){var i=n("line.shape");i==="spline"&&n("line.smoothing")}});var F0=ye((usr,Ude)=>{"use strict";var rpt=Pr();Ude.exports=function(e,t,r,n,i){i=i||{},n("textposition"),rpt.coerceFont(n,"textfont",i.font||r.font,i),i.noSelect||(n("selected.textfont.color"),n("unselected.textfont.color"))}});var Fg=ye((csr,Gde)=>{"use strict";var tI=ka(),Vde=Pr().isArrayOrTypedArray;function ipt(e){for(var t=tI.interpolate(e[0][1],e[1][1],.5),r=2;r{"use strict";var Hde=Pr(),npt=Oa(),apt=pf(),opt=Lm(),uT=Ru(),spt=sT(),lpt=Dg(),upt=Dde(),cpt=$p(),fpt=D0(),jde=lT(),hpt=F0(),dpt=Fg(),vpt=Pr().coercePattern;Wde.exports=function(t,r,n,i){function a(d,v){return Hde.coerce(t,r,apt,d,v)}var o=spt(t,r,i,a);if(o||(r.visible=!1),!!r.visible){lpt(t,r,i,a),a("xhoverformat"),a("yhoverformat"),a("zorder");var s=upt(t,r,i,a);i.scattermode==="group"&&r.orientation===void 0&&a("orientation","v");var l=!s&&o{"use strict";var ppt=Kb().getAxisGroup;Zde.exports=function(t,r,n,i,a){var o=r.orientation,s=r[{v:"x",h:"y"}[o]+"axis"],l=ppt(n,s)+o,u=n._alignmentOpts||{},c=i("alignmentgroup"),f=u[l];f||(f=u[l]={});var h=f[c];h?h.traces.push(r):h=f[c]={traces:[r],alignmentIndex:Object.keys(f).length,offsetGroups:{}};var d=i("offsetgroup")||"",v=h.offsetGroups,m=v[d];r._offsetIndex=0,(a!=="group"||d)&&(m||(m=v[d]={offsetIndex:Object.keys(v).length}),r._offsetIndex=m.offsetIndex)}});var cU=ye((dsr,Yde)=>{"use strict";var gpt=Pr(),mpt=e2(),ypt=pf();Yde.exports=function(t,r){var n,i,a,o=r.scattermode;function s(h){return gpt.coerce(i._input,i,ypt,h)}if(r.scattermode==="group")for(a=0;a=0;c--){var f=t[c];if(f.type==="scatter"&&f.xaxis===l.xaxis&&f.yaxis===l.yaxis){f.opacity=void 0;break}}}}}});var Jde=ye((vsr,Kde)=>{"use strict";var _pt=Pr(),xpt=tL();Kde.exports=function(e,t){function r(i,a){return _pt.coerce(e,t,xpt,i,a)}var n=t.barmode==="group";t.scattermode==="group"&&r("scattergap",n?t.bargap:.2)}});var zg=ye((psr,Qde)=>{"use strict";var bpt=Eo(),$de=Pr(),wpt=$de.dateTime2ms,rI=$de.incrementMonth,Tpt=fs(),Apt=Tpt.ONEAVGMONTH;Qde.exports=function(t,r,n,i){if(r.type!=="date")return{vals:i};var a=t[n+"periodalignment"];if(!a)return{vals:i};var o=t[n+"period"],s;if(bpt(o)){if(o=+o,o<=0)return{vals:i}}else if(typeof o=="string"&&o.charAt(0)==="M"){var l=+o.substring(1);if(l>0&&Math.round(l)===l)s=l;else return{vals:i}}for(var u=r.calendar,c=a==="start",f=a==="end",h=t[n+"period0"],d=wpt(h,u)||0,v=[],m=[],b=[],p=i.length,k=0;kM;)x=rI(x,-s,u);for(;x<=M;)x=rI(x,s,u);L=rI(x,-s,u)}else{for(T=Math.round((M-d)/o),x=d+T*o;x>M;)x-=o;for(;x<=M;)x+=o;L=x-o}v[k]=c?L:f?x:(L+x)/2,m[k]=L,b[k]=x}return{vals:v,starts:m,ends:b}}});var z0=ye((gsr,tve)=>{"use strict";var fU=pv().hasColorscale,hU=gv(),eve=Ru();tve.exports=function(t,r){eve.hasLines(r)&&fU(r,"line")&&hU(t,r,{vals:r.line.color,containerStr:"line",cLetter:"c"}),eve.hasMarkers(r)&&(fU(r,"marker")&&hU(t,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),fU(r,"marker.line")&&hU(t,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}});var Rm=ye((msr,rve)=>{"use strict";var Of=Pr();rve.exports=function(t,r){for(var n=0;n{"use strict";var ive=Pr();nve.exports=function(t,r){ive.isArrayOrTypedArray(r.selectedpoints)&&ive.tagSelected(t,r)}});var O0=ye((_sr,fve)=>{"use strict";var ave=Eo(),vU=Pr(),n4=ho(),ove=zg(),dU=fs().BADNUM,pU=Ru(),Spt=z0(),Mpt=Rm(),Ept=q0();function kpt(e,t){var r=e._fullLayout,n=t._xA=n4.getFromId(e,t.xaxis||"x","x"),i=t._yA=n4.getFromId(e,t.yaxis||"y","y"),a=n.makeCalcdata(t,"x"),o=i.makeCalcdata(t,"y"),s=ove(t,n,"x",a),l=ove(t,i,"y",o),u=s.vals,c=l.vals,f=t._length,h=new Array(f),d=t.ids,v=gU(t,r,n,i),m=!1,b,p,k,M,T,L;uve(r,t);var x="x",C="y",S;if(v)vU.pushUnique(v.traceIndices,t.index),b=v.orientation==="v",b?(C="s",S="x"):(x="s",S="y"),T=v.stackgaps==="interpolate";else{var g=lve(t,f);sve(e,t,n,i,u,c,g)}var P=!!t.xperiodalignment,E=!!t.yperiodalignment;for(p=0;pp&&h[M].gap;)M--;for(L=h[M].s,k=h.length-1;k>M;k--)h[k].s=L;for(;p{"use strict";hve.exports=iI;var Cpt=Pr().distinctVals;function iI(e,t){this.traces=e,this.sepNegVal=t.sepNegVal,this.overlapNoMerge=t.overlapNoMerge;for(var r=1/0,n=t.posAxis._id.charAt(0),i=[],a=0;a{"use strict";vve.exports={TEXTPAD:3,eventDataKeys:["value","label"]}});var t2=ye((wsr,yve)=>{"use strict";var B0=Eo(),{isArrayOrTypedArray:Oy}=Pr(),{BADNUM:cT}=fs(),Lpt=Oa(),a4=ho(),{getAxisGroup:Ppt}=Kb(),nI=dve(),{TEXTPAD:Ipt}=A_(),{LINE_SPACING:Rpt}=Dh(),{BR_TAG_ALL:Dpt}=Zl();function Fpt(e,t){for(var r=t.xaxis,n=t.yaxis,i=e._fullLayout,a=e._fullData,o=e.calcdata,s=[],l=[],u=0;ul+o||!B0(s))}for(var c=0;cn(a))):n(e.text);let i=e.outsidetextfont.size*Rpt*r+Ipt;return{ppadplus:t.some(a=>a.s<0)?i:0,ppadminus:t.some(a=>a.s>=0)?i:0}}return{ppadplus:void 0,ppadminus:void 0}}function jpt(e,t,r,n){for(var i=fT(n),a=0;a{"use strict";var _ve=O0(),xve=t2().setGroupPositions;function Xpt(e,t){for(var r=t.xaxis,n=t.yaxis,i=e._fullLayout,a=e._fullData,o=e.calcdata,s=[],l=[],u=0;ug[c]&&c{"use strict";var Ypt=So(),Mve=fs(),o4=Mve.BADNUM,Eve=Mve.LOG_CLIP,Tve=Eve+.5,Ave=Eve-.5,aI=Pr(),Kpt=aI.segmentsIntersect,Sve=aI.constrain,TU=Lm();kve.exports=function(t,r){var n=r.trace||{},i=r.xaxis,a=r.yaxis,o=i.type==="log",s=a.type==="log",l=i._length,u=a._length,c=r.backoff,f=n.marker,h=r.connectGaps,d=r.baseTolerance,v=r.shape,m=v==="linear",b=n.fill&&n.fill!=="none",p=[],k=TU.minTolerance,M=t.length,T=new Array(M),L=0,x,C,S,g,P,E,z,q,U,G,Z,j,N,H,re,oe;function _e(gt){var Ge=t[gt];if(!Ge)return!1;var Je=r.linearized?i.l2p(Ge.x):i.c2p(Ge.x),We=r.linearized?a.l2p(Ge.y):a.c2p(Ge.y);if(Je===o4){if(o&&(Je=i.c2p(Ge.x,!0)),Je===o4)return!1;s&&We===o4&&(Je*=Math.abs(i._m*u*(i._m>0?Tve:Ave)/(a._m*l*(a._m>0?Tve:Ave)))),Je*=1e3}if(We===o4){if(s&&(We=a.c2p(Ge.y,!0)),We===o4)return!1;We*=1e3}return[Je,We]}function ke(gt,Ge,Je,We){var et=Je-gt,xt=We-Ge,At=.5-gt,Kt=.5-Ge,er=et*et+xt*xt,Sr=et*At+xt*Kt;if(Sr>0&&Sr1||Math.abs(At.y-Je[0][1])>1)&&(At=[At.x,At.y],We&&Se(At,gt)De||gt[1]me)return[Sve(gt[0],we,De),Sve(gt[1],Le,me)]}function Ht(gt,Ge){if(gt[0]===Ge[0]&&(gt[0]===we||gt[0]===De)||gt[1]===Ge[1]&&(gt[1]===Le||gt[1]===me))return!0}function nr(gt,Ge){var Je=[],We=Qt(gt),et=Qt(Ge);return We&&et&&Ht(We,et)||(We&&Je.push(We),et&&Je.push(et)),Je}function tt(gt,Ge,Je){return function(We,et){var xt=Qt(We),At=Qt(et),Kt=[];if(xt&&At&&Ht(xt,At))return Kt;xt&&Kt.push(xt),At&&Kt.push(At);var er=2*aI.constrain((We[gt]+et[gt])/2,Ge,Je)-((xt||We)[gt]+(At||et)[gt]);if(er){var Sr;xt&&At?Sr=er>0==xt[gt]>At[gt]?xt:At:Sr=xt||At,Sr[gt]+=er}return Kt}}var je;v==="linear"||v==="spline"?je=ct:v==="hv"||v==="vh"?je=nr:v==="hvh"?je=tt(0,we,De):v==="vhv"&&(je=tt(1,Le,me));function Ue(gt,Ge){var Je=Ge[0]-gt[0],We=(Ge[1]-gt[1])/Je,et=(gt[1]*Ge[0]-Ge[1]*gt[0])/Je;return et>0?[We>0?we:De,me]:[We>0?De:we,Le]}function Ae(gt){var Ge=gt[0],Je=gt[1],We=Ge===T[L-1][0],et=Je===T[L-1][1];if(!(We&&et))if(L>1){var xt=Ge===T[L-2][0],At=Je===T[L-2][1];We&&(Ge===we||Ge===De)&&xt?At?L--:T[L-1]=gt:et&&(Je===Le||Je===me)&&At?xt?L--:T[L-1]=gt:T[L++]=gt}else T[L++]=gt}function rt(gt){T[L-1][0]!==gt[0]&&T[L-1][1]!==gt[1]&&Ae([lt,mt]),Ae(gt),Vt=null,lt=mt=0}var St=aI.isArrayOrTypedArray(f);function Tt(gt){if(gt&&c&&(gt.i=x,gt.d=t,gt.trace=n,gt.marker=St?f[gt.i]:f,gt.backoff=c),Ce=gt[0]/l,ge=gt[1]/u,ce=gt[0]De?De:0,He=gt[1]me?me:0,ce||He){if(!L)T[L++]=[ce||gt[0],He||gt[1]];else if(Vt){var Ge=je(Vt,gt);Ge.length>1&&(rt(Ge[0]),T[L++]=Ge[1])}else st=je(T[L-1],gt)[0],T[L++]=st;var Je=T[L-1];ce&&He&&(Je[0]!==ce||Je[1]!==He)?(Vt&&(lt!==ce&&mt!==He?Ae(lt&&mt?Ue(Vt,gt):[lt||ce,mt||He]):lt&&mt&&Ae([lt,mt])),Ae([ce,He])):lt-ce&&mt-He&&Ae([ce||lt,He||mt]),Vt=gt,lt=ce,mt=He}else Vt&&rt(je(Vt,gt)[0]),T[L++]=gt}for(x=0;xie(E,dt))break;S=E,N=U[0]*q[0]+U[1]*q[1],N>Z?(Z=N,g=E,z=!1):N=t.length||!E)break;Tt(E),C=E}}Vt&&Ae([lt||Vt[0],mt||Vt[1]]),p.push(T.slice(0,L))}var Et=v.slice(v.length-1);if(c&&Et!=="h"&&Et!=="v"){for(var pt=!1,Xt=-1,or=[],_r=0;_r{"use strict";var Cve={tonextx:1,tonexty:1,tonext:1};Lve.exports=function(t,r,n){var i,a,o,s,l,u={},c=!1,f=-1,h=0,d=-1;for(a=0;a=0?l=d:(l=d=h,h++),l{"use strict";var qg=qa(),Jpt=Oa(),s4=Pr(),hT=s4.ensureSingle,Ive=s4.identity,Kf=So(),dT=Ru(),$pt=AU(),Qpt=SU(),oI=FM().tester;Rve.exports=function(t,r,n,i,a,o){var s,l,u=!a,c=!!a&&a.duration>0,f=Qpt(t,r,n);if(s=i.selectAll("g.trace").data(f,function(d){return d[0].trace.uid}),s.enter().append("g").attr("class",function(d){return"trace scatter trace"+d[0].trace.uid}).style("stroke-miterlimit",2),s.order(),e0t(t,s,r),c){o&&(l=o());var h=qg.transition().duration(a.duration).ease(a.easing).each("end",function(){l&&l()}).each("interrupt",function(){l&&l()});h.each(function(){i.selectAll("g.trace").each(function(d,v){Pve(t,v,r,d,f,this,a)})})}else s.each(function(d,v){Pve(t,v,r,d,f,this,a)});u&&s.exit().remove(),i.selectAll("path:not([d])").remove()};function e0t(e,t,r){t.each(function(n){var i=hT(qg.select(this),"g","fills");Kf.setClipUrl(i,r.layerClipId,e);var a=n[0].trace;a._ownFill=null,a._nextFill=null;var o=[];a._ownfill&&o.push("_ownFill"),a._nexttrace&&o.push("_nextFill");var s=i.selectAll("g").data(o,Ive);s.enter().append("g"),s.exit().remove(),s.order().each(function(l){a[l]=hT(qg.select(this),"path","js-fill")})})}function Pve(e,t,r,n,i,a,o){var s=e._context.staticPlot,l;t0t(e,t,r,n,i);var u=!!o&&o.duration>0;function c(tt){return u?tt.transition():tt}var f=r.xaxis,h=r.yaxis,d=n[0].trace,v=d.line,m=qg.select(a),b=hT(m,"g","errorbars"),p=hT(m,"g","lines"),k=hT(m,"g","points"),M=hT(m,"g","text");if(Jpt.getComponentMethod("errorbars","plot")(e,b,r,o),d.visible!==!0)return;c(m).style("opacity",d.opacity);var T,L,x=d.fill.charAt(d.fill.length-1);x!=="x"&&x!=="y"&&(x="");var C,S;x==="y"?(C=1,S=h.c2p(0,!0)):x==="x"&&(C=0,S=f.c2p(0,!0)),n[0][r.isRangePlot?"nodeRangePlot3":"node3"]=m;var g="",P=[],E=d._prevtrace,z=null,q=null;E&&(g=E._prevRevpath||"",L=E._nextFill,P=E._ownPolygons,z=E._fillsegments,q=E._fillElement);var U,G,Z="",j="",N,H,re,oe,_e,ke,Ce=[];d._polygons=[];var ge=[],ie=[],Se=s4.noop;if(T=d._ownFill,dT.hasLines(d)||d.fill!=="none"){L&&L.datum(n),["hv","vh","hvh","vhv"].indexOf(v.shape)!==-1?(N=Kf.steps(v.shape),H=Kf.steps(v.shape.split("").reverse().join(""))):v.shape==="spline"?N=H=function(tt){var je=tt[tt.length-1];return tt.length>1&&tt[0][0]===je[0]&&tt[0][1]===je[1]?Kf.smoothclosed(tt.slice(1),v.smoothing):Kf.smoothopen(tt,v.smoothing)}:N=H=function(tt){return"M"+tt.join("L")},re=function(tt){return H(tt.reverse())},ie=$pt(n,{xaxis:f,yaxis:h,trace:d,connectGaps:d.connectgaps,baseTolerance:Math.max(v.width||1,3)/4,shape:v.shape,backoff:v.backoff,simplify:v.simplify,fill:d.fill}),ge=new Array(ie.length);var Ee=0;for(l=0;l=s[0]&&m.x<=s[1]&&m.y>=l[0]&&m.y<=l[1]}),h=Math.ceil(f.length/c),d=0;i.forEach(function(m,b){var p=m[0].trace;dT.hasMarkers(p)&&p.marker.maxdisplayed>0&&b{"use strict";Dve.exports={container:"marker",min:"cmin",max:"cmax"}});var lI=ye((ksr,Fve)=>{"use strict";var sI=ho();Fve.exports=function(t,r,n){var i={},a={_fullLayout:n},o=sI.getFromTrace(a,r,"x"),s=sI.getFromTrace(a,r,"y"),l=t.orig_x;l===void 0&&(l=t.x);var u=t.orig_y;return u===void 0&&(u=t.y),i.xLabel=sI.tickText(o,o.c2l(l),!0).text,i.yLabel=sI.tickText(s,s.c2l(u),!0).text,i}});var sp=ye((Csr,zve)=>{"use strict";var MU=qa(),pT=So(),r0t=Oa();function i0t(e){var t=MU.select(e).selectAll("g.trace.scatter");t.style("opacity",function(r){return r[0].trace.opacity}),t.selectAll("g.points").each(function(r){var n=MU.select(this),i=r.trace||r[0].trace;EU(n,i,e)}),t.selectAll("g.text").each(function(r){var n=MU.select(this),i=r.trace||r[0].trace;kU(n,i,e)}),t.selectAll("g.trace path.js-line").call(pT.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(pT.fillGroupStyle,e,!1),r0t.getComponentMethod("errorbars","style")(t)}function EU(e,t,r){pT.pointStyle(e.selectAll("path.point"),t,r)}function kU(e,t,r){pT.textPointStyle(e.selectAll("text"),t,r)}function n0t(e,t,r){var n=t[0].trace;n.selectedpoints?(pT.selectedPointStyle(r.selectAll("path.point"),n),pT.selectedTextStyle(r.selectAll("text"),n)):(EU(r,n,e),kU(r,n,e))}zve.exports={style:i0t,stylePoints:EU,styleText:kU,styleOnSelect:n0t}});var mT=ye((Lsr,qve)=>{"use strict";var gT=ka(),a0t=Ru();qve.exports=function(t,r){var n,i;if(t.mode==="lines")return n=t.line.color,n&&gT.opacity(n)?n:t.fillcolor;if(t.mode==="none")return t.fill?t.fillcolor:"";var a=r.mcc||(t.marker||{}).color,o=r.mlcc||((t.marker||{}).line||{}).color;return i=a&&gT.opacity(a)?a:o&&gT.opacity(o)&&(r.mlw||((t.marker||{}).line||{}).width)?o:"",i?gT.opacity(i)<.3?gT.addOpacity(i,.3):i:(n=(t.line||{}).color,n&&gT.opacity(n)&&a0t.hasLines(t)&&t.line.width?n:t.fillcolor)}});var yT=ye((Psr,Bve)=>{"use strict";var uI=Pr(),Ove=vf(),o0t=Oa(),s0t=mT(),CU=ka(),l0t=uI.fillText;Bve.exports=function(t,r,n,i){var a=t.cd,o=a[0].trace,s=t.xa,l=t.ya,u=s.c2p(r),c=l.c2p(n),f=[u,c],h=o.hoveron||"",d=o.mode.indexOf("markers")!==-1?3:.5,v=!!o.xperiodalignment,m=!!o.yperiodalignment;if(h.indexOf("points")!==-1){var b=function(j){if(v){var N=s.c2p(j.xStart),H=s.c2p(j.xEnd);return u>=Math.min(N,H)&&u<=Math.max(N,H)?0:1/0}var re=Math.max(3,j.mrc||0),oe=1-1/re,_e=Math.abs(s.c2p(j.x)-u);return _e=Math.min(N,H)&&c<=Math.max(N,H)?0:1/0}var re=Math.max(3,j.mrc||0),oe=1-1/re,_e=Math.abs(l.c2p(j.y)-c);return _eCe!=me>=Ce&&(we=Se[ie-1][0],De=Se[ie][0],me-Le&&(Ee=we+(De-we)*(Ce-Le)/(me-Le),re=Math.min(re,Ee),oe=Math.max(oe,Ee)));return re=Math.max(re,0),oe=Math.min(oe,s._length),{x0:re,x1:oe,y0:Ce,y1:Ce}}if(h.indexOf("fills")!==-1&&o._fillElement){var U=z(o._fillElement)&&!z(o._fillExclusionElement);if(U){var G=q(o._polygons);G===null&&(G={x0:f[0],x1:f[0],y0:f[1],y1:f[1]});var Z=CU.defaultLine;return CU.opacity(o.fillcolor)?Z=o.fillcolor:CU.opacity((o.line||{}).color)&&(Z=o.line.color),uI.extendFlat(t,{distance:t.maxHoverDistance,x0:G.x0,x1:G.x1,y0:G.y0,y1:G.y1,color:Z,hovertemplate:!1}),delete t.index,o.text&&!uI.isArrayOrTypedArray(o.text)?t.text=String(o.text):t.text=o.name,[t]}}}});var _T=ye((Isr,Uve)=>{"use strict";var Nve=Ru();Uve.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l,u,c,f,h=!Nve.hasMarkers(s)&&!Nve.hasText(s);if(h)return[];if(r===!1)for(l=0;l{"use strict";Vve.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}});var PU=ye((Dsr,Wve)=>{"use strict";var l4=Oa().traceIs,LU=G3();Wve.exports=function(t,r,n,i){n("autotypenumbers",i.autotypenumbersDflt);var a=n("type",(i.splomStash||{}).type);a==="-"&&(u0t(r,i.data),r.type==="-"?r.type="linear":t.type=r.type)};function u0t(e,t){if(e.type==="-"){var r=e._id,n=r.charAt(0),i;r.indexOf("scene")!==-1&&(r=n);var a=c0t(t,r,n);if(a){if(a.type==="histogram"&&n==={v:"y",h:"x"}[a.orientation||"v"]){e.type="linear";return}var o=n+"calendar",s=a[o],l={noMultiCategory:!l4(a,"cartesian")||l4(a,"noMultiCategory")};if(a.type==="box"&&a._hasPreCompStats&&n==={h:"x",v:"y"}[a.orientation||"v"]&&(l.noMultiCategory=!0),l.autotypenumbers=e.autotypenumbers,jve(a,n)){var u=Hve(a),c=[];for(i=0;i0&&(i["_"+r+"axes"]||{})[t])return i;if((i[r+"axis"]||r)===t){if(jve(i,r))return i;if((i[r]||[]).length||i[r+"0"])return i}}}function Hve(e){return{v:"x",h:"y"}[e.orientation||"v"]}function jve(e,t){var r=Hve(e),n=l4(e,"box-violin"),i=l4(e._fullInput||{},"candlestick");return n&&!i&&t===r&&e[r]===void 0&&e[r+"0"]===void 0}});var cI=ye((Fsr,Xve)=>{"use strict";var f0t=vv().isTypedArraySpec;function h0t(e,t){var r=t.dataAttr||e._id.charAt(0),n={},i,a,o;if(t.axData)i=t.axData;else for(i=[],a=0;a0||f0t(a),s;o&&(s="array");var l=n("categoryorder",s),u;l==="array"&&(u=n("categoryarray")),!o&&l==="array"&&(l=r.categoryorder="trace"),l==="trace"?r._initialCategories=[]:l==="array"?r._initialCategories=u.slice():(u=h0t(r,i).sort(),l==="category ascending"?r._initialCategories=u:l==="category descending"&&(r._initialCategories=u.reverse()))}}});var u4=ye((zsr,Yve)=>{"use strict";var Zve=fd().mix,d0t=Ih(),v0t=Pr();Yve.exports=function(t,r,n,i){i=i||{};var a=i.dfltColor;function o(S,g){return v0t.coerce2(t,r,i.attributes,S,g)}var s=o("linecolor",a),l=o("linewidth"),u=n("showline",i.showLine||!!s||!!l);u||(delete r.linecolor,delete r.linewidth);var c=Zve(a,i.bgColor,i.blend||d0t.lightFraction).toRgbString(),f=o("gridcolor",c),h=o("gridwidth"),d=o("griddash"),v=n("showgrid",i.showGrid||!!f||!!h||!!d);if(v||(delete r.gridcolor,delete r.gridwidth,delete r.griddash),i.hasMinor){var m=Zve(r.gridcolor,i.bgColor,67).toRgbString(),b=o("minor.gridcolor",m),p=o("minor.gridwidth",r.gridwidth||1),k=o("minor.griddash",r.griddash||"solid"),M=n("minor.showgrid",!!b||!!p||!!k);M||(delete r.minor.gridcolor,delete r.minor.gridwidth,delete r.minor.griddash)}if(!i.noZeroLine){var T=o("zerolinelayer"),L=o("zerolinecolor",a),x=o("zerolinewidth"),C=n("zeroline",i.showGrid||!!L||!!x);C||(delete r.zerolinelayer,delete r.zerolinecolor,delete r.zerolinewidth)}}});var f4=ye((qsr,tpe)=>{"use strict";var Kve=Eo(),p0t=Oa(),c4=Pr(),g0t=vl(),m0t=Zd(),IU=Rd(),Jve=Lb(),$ve=z3(),y0t=s_(),_0t=l_(),x0t=cI(),b0t=u4(),w0t=AB(),Qve=xm(),fI=Rh().WEEKDAY_PATTERN,T0t=Rh().HOUR_PATTERN;tpe.exports=function(t,r,n,i,a){var o=i.letter,s=i.font||{},l=i.splomStash||{},u=n("visible",!i.visibleDflt),c=r._template||{},f=r.type||c.type||"-",h;if(f==="date"){var d=p0t.getComponentMethod("calendars","handleDefaults");d(t,r,"calendar",i.calendar),i.noTicklabelmode||(h=n("ticklabelmode"))}!i.noTicklabelindex&&(f==="date"||f==="linear")&&n("ticklabelindex");var v="";(!i.noTicklabelposition||f==="multicategory")&&(v=c4.coerce(t,r,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:h==="period"?["outside","inside"]:o==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),i.noTicklabeloverflow||n("ticklabeloverflow",v.indexOf("inside")!==-1?"hide past domain":f==="category"||f==="multicategory"?"allow":"hide past div"),Qve(r,a),w0t(t,r,n,i),x0t(t,r,n,i),i.noHover||(f!=="category"&&n("hoverformat"),i.noUnifiedhovertitle||n("unifiedhovertitle.text"));var m=n("color"),b=m!==IU.color.dflt?m:s.color,p=l.label||a._dfltTitle[o];if(_0t(t,r,n,f,i),!u)return r;n("title.text",p),c4.coerceFont(n,"title.font",s,{overrideDflt:{size:c4.bigFont(s.size),color:b}}),Jve(t,r,n,f);var k=i.hasMinor;if(k&&(g0t.newContainer(r,"minor"),Jve(t,r,n,f,{isMinor:!0})),y0t(t,r,n,f,i),$ve(t,r,n,i),k){var M=i.isMinor;i.isMinor=!0,$ve(t,r,n,i),i.isMinor=M}b0t(t,r,n,{dfltColor:m,bgColor:i.bgColor,showGrid:i.showGrid,hasMinor:k,attributes:IU}),k&&!r.minor.ticks&&!r.minor.showgrid&&delete r.minor,(r.showline||r.ticks)&&n("mirror");var T=f==="multicategory";if(!i.noTickson&&(f==="category"||T)&&(r.ticks||r.showgrid)&&(T?(n("tickson","boundaries"),delete r.ticklabelposition):n("tickson")),T){var L=n("showdividers");L&&(n("dividercolor"),n("dividerwidth"))}if(f==="date")if(m0t(t,r,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:A0t}),!r.rangebreaks.length)delete r.rangebreaks;else{for(var x=0;x=2){var o="",s,l;if(a.length===2){for(s=0;s<2;s++)if(l=epe(a[s]),l){o=fI;break}}var u=n("pattern",o);if(u===fI)for(s=0;s<2;s++)l=epe(a[s]),l&&(t.bounds[s]=a[s]=l-1);if(u)for(s=0;s<2;s++)switch(l=a[s],u){case fI:if(!Kve(l)){t.enabled=!1;return}if(l=+l,l!==Math.floor(l)||l<0||l>=7){t.enabled=!1;return}t.bounds[s]=a[s]=l;break;case T0t:if(!Kve(l)){t.enabled=!1;return}if(l=+l,l<0||l>24){t.enabled=!1;return}t.bounds[s]=a[s]=l;break}if(r.autorange===!1){var c=r.range;if(c[0]c[1]){t.enabled=!1;return}}else if(a[0]>c[0]&&a[1]{"use strict";var M0t=Eo(),hI=Pr();rpe.exports=function(t,r,n,i){var a=i.counterAxes||[],o=i.overlayableAxes||[],s=i.letter,l=i.grid,u=i.overlayingDomain,c,f,h,d,v,m;l&&(f=l._domains[s][l._axisMap[r._id]],c=l._anchors[r._id],f&&(h=l[s+"side"].split(" ")[0],d=l.domain[s][h==="right"||h==="top"?1:0])),f=f||[0,1],c=c||(M0t(t.position)?"free":a[0]||"free"),h=h||(s==="x"?"bottom":"left"),d=d||0,v=0,m=!1;var b=hI.coerce(t,r,{anchor:{valType:"enumerated",values:["free"].concat(a),dflt:c}},"anchor"),p=hI.coerce(t,r,{side:{valType:"enumerated",values:s==="x"?["bottom","top"]:["left","right"],dflt:h}},"side");if(b==="free"){if(s==="y"){var k=n("autoshift");k&&(d=p==="left"?u[0]:u[1],m=r.automargin?r.automargin:!0,v=p==="left"?-3:3),n("shift",v)}n("position",d)}n("automargin",m);var M=!1;if(o.length&&(M=hI.coerce(t,r,{overlaying:{valType:"enumerated",values:[!1].concat(o),dflt:!1}},"overlaying")),!M){var T=n("domain",f);T[0]>T[1]-1/4096&&(r.domain=f),hI.noneOrAll(t.domain,r.domain,f),r.tickmode==="sync"&&(r.tickmode="auto")}return n("layer"),r}});var fpe=ye((Bsr,cpe)=>{"use strict";var r2=Pr(),ipe=ka(),E0t=ip().isUnifiedHover,k0t=YB(),npe=vl(),C0t=x3(),ape=Rd(),L0t=PU(),ope=f4(),P0t=Kb(),spe=dI(),DU=hf(),Dm=DU.id2name,lpe=DU.name2id,I0t=Rh().AX_ID_PATTERN,upe=Oa(),vI=upe.traceIs,RU=upe.getComponentMethod;function pI(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}cpe.exports=function(t,r,n){var i=r.autotypenumbers,a={},o={},s={},l={},u={},c={},f={},h={},d={},v={},m,b;for(m=0;m{"use strict";var R0t=qa(),hpe=Oa(),gI=Pr(),Qp=So(),mI=ho();dpe.exports=function(t,r,n,i){var a=t._fullLayout;if(r.length===0){mI.redrawComponents(t);return}function o(b){var p=b.xaxis,k=b.yaxis;a._defs.select("#"+b.clipId+"> rect").call(Qp.setTranslate,0,0).call(Qp.setScale,1,1),b.plot.call(Qp.setTranslate,p._offset,k._offset).call(Qp.setScale,1,1);var M=b.plot.selectAll(".scatterlayer .trace");M.selectAll(".point").call(Qp.setPointGroupScale,1,1),M.selectAll(".textpoint").call(Qp.setTextPointsScale,1,1),M.call(Qp.hideOutsideRangePoints,b)}function s(b,p){var k=b.plotinfo,M=k.xaxis,T=k.yaxis,L=M._length,x=T._length,C=!!b.xr1,S=!!b.yr1,g=[];if(C){var P=gI.simpleMap(b.xr0,M.r2l),E=gI.simpleMap(b.xr1,M.r2l),z=P[1]-P[0],q=E[1]-E[0];g[0]=(P[0]*(1-p)+p*E[0]-P[0])/(P[1]-P[0])*L,g[2]=L*(1-p+p*q/z),M.range[0]=M.l2r(P[0]*(1-p)+p*E[0]),M.range[1]=M.l2r(P[1]*(1-p)+p*E[1])}else g[0]=0,g[2]=L;if(S){var U=gI.simpleMap(b.yr0,T.r2l),G=gI.simpleMap(b.yr1,T.r2l),Z=U[1]-U[0],j=G[1]-G[0];g[1]=(U[1]*(1-p)+p*G[1]-U[1])/(U[0]-U[1])*x,g[3]=x*(1-p+p*j/Z),T.range[0]=M.l2r(U[0]*(1-p)+p*G[0]),T.range[1]=T.l2r(U[1]*(1-p)+p*G[1])}else g[1]=0,g[3]=x;mI.drawOne(t,M,{skipTitle:!0}),mI.drawOne(t,T,{skipTitle:!0}),mI.redrawComponents(t,[M._id,T._id]);var N=C?L/g[2]:1,H=S?x/g[3]:1,re=C?g[0]:0,oe=S?g[1]:0,_e=C?g[0]/g[2]*L:0,ke=S?g[1]/g[3]*x:0,Ce=M._offset-_e,ge=T._offset-ke;k.clipRect.call(Qp.setTranslate,re,oe).call(Qp.setScale,1/N,1/H),k.plot.call(Qp.setTranslate,Ce,ge).call(Qp.setScale,N,H),Qp.setPointGroupScale(k.zoomScalePts,1/N,1/H),Qp.setTextPointsScale(k.zoomScaleTxt,1/N,1/H)}var l;i&&(l=i());function u(){for(var b={},p=0;pn.duration?(u(),d=window.cancelAnimationFrame(m)):d=window.requestAnimationFrame(m)}return f=Date.now(),d=window.requestAnimationFrame(m),Promise.resolve()}});var mh=ye(xv=>{"use strict";var _I=qa(),ppe=Oa(),i2=Pr(),D0t=Mc(),F0t=So(),gpe=Id().getModuleCalcData,S_=hf(),Og=Rh(),z0t=Wp(),iu=i2.ensureSingle;function yI(e,t,r){return i2.ensureSingle(e,t,r,function(n){n.datum(r)})}var n2=Og.zindexSeparator;xv.name="cartesian";xv.attr=["xaxis","yaxis"];xv.idRoot=["x","y"];xv.idRegex=Og.idRegex;xv.attrRegex=Og.attrRegex;xv.attributes=Gve();xv.layoutAttributes=Rd();xv.supplyLayoutDefaults=fpe();xv.transitionAxes=vpe();xv.finalizeSubplots=function(e,t){var r=t._subplots,n=r.xaxis,i=r.yaxis,a=r.cartesian,o=a,s={},l={},u,c,f;for(u=0;u0){var d=h.id;if(d.indexOf(n2)!==-1)continue;d+=n2+(u+1),h=i2.extendFlat({},h,{id:d,plot:i._cartesianlayer.selectAll(".subplot").select("."+d)})}for(var v=[],m,b=0;b1&&(L+=n2+T),M.push(s+L),o=0;o1,f=t.mainplotinfo;if(!t.mainplot||c)if(u)t.xlines=iu(n,"path","xlines-above"),t.ylines=iu(n,"path","ylines-above"),t.xaxislayer=iu(n,"g","xaxislayer-above"),t.yaxislayer=iu(n,"g","yaxislayer-above");else{if(!o){var h=iu(n,"g","layer-subplot");t.shapelayer=iu(h,"g","shapelayer"),t.imagelayer=iu(h,"g","imagelayer"),f&&c?(t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer):(t.minorGridlayer=iu(n,"g","minor-gridlayer"),t.gridlayer=iu(n,"g","gridlayer"),t.zerolinelayer=iu(n,"g","zerolinelayer"));var d=iu(n,"g","layer-between");t.shapelayerBetween=iu(d,"g","shapelayer"),t.imagelayerBetween=iu(d,"g","imagelayer"),iu(n,"path","xlines-below"),iu(n,"path","ylines-below"),t.overlinesBelow=iu(n,"g","overlines-below"),iu(n,"g","xaxislayer-below"),iu(n,"g","yaxislayer-below"),t.overaxesBelow=iu(n,"g","overaxes-below")}t.overplot=iu(n,"g","overplot"),t.plot=iu(t.overplot,"g",i),f&&c?t.zerolinelayerAbove=f.zerolinelayerAbove:t.zerolinelayerAbove=iu(n,"g","zerolinelayer-above"),o||(t.xlines=iu(n,"path","xlines-above"),t.ylines=iu(n,"path","ylines-above"),t.overlinesAbove=iu(n,"g","overlines-above"),iu(n,"g","xaxislayer-above"),iu(n,"g","yaxislayer-above"),t.overaxesAbove=iu(n,"g","overaxes-above"),t.xlines=n.select(".xlines-"+s),t.ylines=n.select(".ylines-"+l),t.xaxislayer=n.select(".xaxislayer-"+s),t.yaxislayer=n.select(".yaxislayer-"+l))}else{var v=f.plotgroup,m=i+"-x",b=i+"-y";t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer,t.zerolinelayerAbove=f.zerolinelayerAbove,iu(f.overlinesBelow,"path",m),iu(f.overlinesBelow,"path",b),iu(f.overaxesBelow,"g",m),iu(f.overaxesBelow,"g",b),t.plot=iu(f.overplot,"g",i),iu(f.overlinesAbove,"path",m),iu(f.overlinesAbove,"path",b),iu(f.overaxesAbove,"g",m),iu(f.overaxesAbove,"g",b),t.xlines=v.select(".overlines-"+s).select("."+m),t.ylines=v.select(".overlines-"+l).select("."+b),t.xaxislayer=v.select(".overaxes-"+s).select("."+m),t.yaxislayer=v.select(".overaxes-"+l).select("."+b)}o||(u||(yI(t.minorGridlayer,"g",t.xaxis._id),yI(t.minorGridlayer,"g",t.yaxis._id),t.minorGridlayer.selectAll("g").map(function(p){return p[0]}).sort(S_.idSort),yI(t.gridlayer,"g",t.xaxis._id),yI(t.gridlayer,"g",t.yaxis._id),t.gridlayer.selectAll("g").map(function(p){return p[0]}).sort(S_.idSort)),t.xlines.style("fill","none").classed("crisp",!0),t.ylines.style("fill","none").classed("crisp",!0))}function _pe(e,t){if(e){var r={};e.each(function(l){var u=l[0],c=_I.select(this);c.remove(),xpe(u,t),r[u]=!0});for(var n in t._plots)for(var i=t._plots[n],a=i.overlays||[],o=0;o{"use strict";var xI=Ru();bpe.exports={hasLines:xI.hasLines,hasMarkers:xI.hasMarkers,hasText:xI.hasText,isBubble:xI.isBubble,attributes:pf(),layoutAttributes:tL(),supplyDefaults:Xde(),crossTraceDefaults:cU(),supplyLayoutDefaults:Jde(),calc:O0().calc,crossTraceCalc:wve(),arraysToCalcdata:Rm(),plot:vT(),colorbar:$d(),formatLabels:lI(),style:sp().style,styleOnSelect:sp().styleOnSelect,hoverPoints:yT(),selectPoints:_T(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:mh(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}});var Spe=ye((Gsr,Ape)=>{"use strict";var O0t=qa(),B0t=ka(),Tpe=qN(),FU=Pr(),N0t=FU.strScale,U0t=FU.strRotate,V0t=FU.strTranslate;Ape.exports=function(t,r,n){var i=t.node(),a=Tpe[n.arrowhead||0],o=Tpe[n.startarrowhead||0],s=(n.arrowwidth||1)*(n.arrowsize||1),l=(n.arrowwidth||1)*(n.startarrowsize||1),u=r.indexOf("start")>=0,c=r.indexOf("end")>=0,f=a.backoff*s+n.standoff,h=o.backoff*l+n.startstandoff,d,v,m,b;if(i.nodeName==="line"){d={x:+t.attr("x1"),y:+t.attr("y1")},v={x:+t.attr("x2"),y:+t.attr("y2")};var p=d.x-v.x,k=d.y-v.y;if(m=Math.atan2(k,p),b=m+Math.PI,f&&h&&f+h>Math.sqrt(p*p+k*k)){U();return}if(f){if(f*f>p*p+k*k){U();return}var M=f*Math.cos(m),T=f*Math.sin(m);v.x+=M,v.y+=T,t.attr({x2:v.x,y2:v.y})}if(h){if(h*h>p*p+k*k){U();return}var L=h*Math.cos(m),x=h*Math.sin(m);d.x-=L,d.y-=x,t.attr({x1:d.x,y1:d.y})}}else if(i.nodeName==="path"){var C=i.getTotalLength(),S="";if(C{"use strict";var Mpe=qa(),zU=Oa(),G0t=Mc(),E_=Pr(),qU=E_.strTranslate,d4=ho(),a2=ka(),By=So(),Epe=vf(),OU=Zl(),BU=Eg(),h4=yv(),H0t=vl().arrayEditor,j0t=Spe();Lpe.exports={draw:W0t,drawOne:kpe,drawRaw:Cpe};function W0t(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r2/3?et="right":et="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[et]}for(var Le=!1,me=["x","y"],Pe=0;Pe1)&&(lt===He?(dt=mt.r2fraction(t["a"+ce]),(dt<0||dt>1)&&(Le=!0)):Le=!0),je=mt._offset+mt.r2p(t[ce]),rt=.5}else{var Et=Tt==="domain";ce==="x"?(Ae=t[ce],je=Et?mt._offset+mt._length*Ae:je=s.l+s.w*Ae):(Ae=1-t[ce],je=Et?mt._offset+mt._length*Ae:je=s.t+s.h*Ae),rt=t.showarrow?.5:Ae}if(t.showarrow){tt.head=je;var pt=t["a"+ce];if(St=st*De(.5,t.xanchor)-ct*De(.5,t.yanchor),lt===He){var Xt=d4.getRefType(lt);Xt==="domain"?(ce==="y"&&(pt=1-pt),tt.tail=mt._offset+mt._length*pt):Xt==="paper"?ce==="y"?(pt=1-pt,tt.tail=s.t+s.h*pt):tt.tail=s.l+s.w*pt:tt.tail=mt._offset+mt.r2p(pt),Ue=St}else tt.tail=je+pt,Ue=St+pt;tt.text=tt.tail+St;var or=o[ce==="x"?"width":"height"];if(He==="paper"&&(tt.head=E_.constrain(tt.head,1,or-1)),lt==="pixel"){var _r=-Math.max(tt.tail-3,tt.text),Er=Math.min(tt.tail+3,tt.text)-or;_r>0?(tt.tail+=_r,tt.text+=_r):Er>0&&(tt.tail-=Er,tt.text-=Er)}tt.tail+=nr,tt.head+=nr}else St=Qt*De(rt,Ht),Ue=St,tt.text=je+St;tt.text+=nr,St+=nr,Ue+=nr,t["_"+ce+"padplus"]=Qt/2+Ue,t["_"+ce+"padminus"]=Qt/2-Ue,t["_"+ce+"size"]=Qt,t["_"+ce+"shift"]=St}if(Le){C.remove();return}var ei=0,qr=0;if(t.align!=="left"&&(ei=(ie-Ce)*(t.align==="center"?.5:1)),t.valign!=="top"&&(qr=(Se-ge)*(t.valign==="middle"?.5:1)),_e)oe.select("svg").attr({x:P+ei-1,y:P+qr}).call(By.setClipUrl,z?m:null,e);else{var jr=P+qr-ke.top,gt=P+ei-ke.left;Z.call(OU.positionText,gt,jr).call(By.setClipUrl,z?m:null,e)}q.select("rect").call(By.setRect,P,P,ie,Se),E.call(By.setRect,S/2,S/2,Ee-S,we-S),C.call(By.setTranslate,Math.round(b.x.text-Ee/2),Math.round(b.y.text-we/2)),M.attr({transform:"rotate("+p+","+b.x.text+","+b.y.text+")"});var Ge=function(We,et){k.selectAll(".annotation-arrow-g").remove();var xt=b.x.head,At=b.y.head,Kt=b.x.tail+We,er=b.y.tail+et,Sr=b.x.text+We,Gr=b.y.text+et,Ir=E_.rotationXYMatrix(p,Sr,Gr),Yr=E_.apply2DTransform(Ir),_i=E_.apply2DTransform2(Ir),Pi=+E.attr("width"),ai=+E.attr("height"),mi=Sr-.5*Pi,un=mi+Pi,Fn=Gr-.5*ai,An=Fn+ai,Hn=[[mi,Fn,mi,An],[mi,An,un,An],[un,An,un,Fn],[un,Fn,mi,Fn]].map(_i);if(!Hn.reduce(function($r,Ri){return $r^!!E_.segmentsIntersect(xt,At,xt+1e6,At+1e6,Ri[0],Ri[1],Ri[2],Ri[3])},!1)){Hn.forEach(function($r){var Ri=E_.segmentsIntersect(Kt,er,xt,At,$r[0],$r[1],$r[2],$r[3]);Ri&&(Kt=Ri.x,er=Ri.y)});var Qn=t.arrowwidth,Vi=t.arrowcolor,Kn=t.arrowside,Jn=k.append("g").style({opacity:a2.opacity(Vi)}).classed("annotation-arrow-g",!0),Gt=Jn.append("path").attr("d","M"+Kt+","+er+"L"+xt+","+At).style("stroke-width",Qn+"px").call(a2.stroke,a2.rgb(Vi));if(j0t(Gt,Kn,t),l.annotationPosition&&Gt.node().parentNode&&!n){var wt=xt,rr=At;if(t.standoff){var ir=Math.sqrt(Math.pow(xt-Kt,2)+Math.pow(At-er,2));wt+=t.standoff*(Kt-xt)/ir,rr+=t.standoff*(er-At)/ir}var wr=Jn.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Kt-wt)+","+(er-rr),transform:qU(wt,rr)}).style("stroke-width",Qn+6+"px").call(a2.stroke,"rgba(0,0,0,0)").call(a2.fill,"rgba(0,0,0,0)"),Xr,ti;h4.init({element:wr.node(),gd:e,prepFn:function(){var $r=By.getTranslate(C);Xr=$r.x,ti=$r.y,i&&i.autorange&&h(i._name+".autorange",!0),a&&a.autorange&&h(a._name+".autorange",!0)},moveFn:function($r,Ri){var Zi=Yr(Xr,ti),en=Zi[0]+$r,fn=Zi[1]+Ri;C.call(By.setTranslate,en,fn),d("x",M_(i,$r,"x",s,t)),d("y",M_(a,Ri,"y",s,t)),t.axref===t.xref&&d("ax",M_(i,$r,"ax",s,t)),t.ayref===t.yref&&d("ay",M_(a,Ri,"ay",s,t)),Jn.attr("transform",qU($r,Ri)),M.attr({transform:"rotate("+p+","+en+","+fn+")"})},doneFn:function(){zU.call("_guiRelayout",e,v());var $r=document.querySelector(".js-notes-box-panel");$r&&$r.redraw($r.selectedObj)}})}}};if(t.showarrow&&Ge(0,0),T){var Je;h4.init({element:C.node(),gd:e,prepFn:function(){Je=M.attr("transform")},moveFn:function(We,et){var xt="pointer";if(t.showarrow)t.axref===t.xref?d("ax",M_(i,We,"ax",s,t)):d("ax",t.ax+We),t.ayref===t.yref?d("ay",M_(a,et,"ay",s.w,t)):d("ay",t.ay+et),Ge(We,et);else{if(n)return;var At,Kt;if(i)At=M_(i,We,"x",s,t);else{var er=t._xsize/s.w,Sr=t.x+(t._xshift-t.xshift)/s.w-er/2;At=h4.align(Sr+We/s.w,er,0,1,t.xanchor)}if(a)Kt=M_(a,et,"y",s,t);else{var Gr=t._ysize/s.h,Ir=t.y-(t._yshift+t.yshift)/s.h-Gr/2;Kt=h4.align(Ir-et/s.h,Gr,0,1,t.yanchor)}d("x",At),d("y",Kt),(!i||!a)&&(xt=h4.getCursor(i?.5:At,a?.5:Kt,t.xanchor,t.yanchor))}M.attr({transform:qU(We,et)+Je}),BU(C,xt)},clickFn:function(We,et){t.captureevents&&e.emit("plotly_clickannotation",x(et))},doneFn:function(){BU(C),zU.call("_guiRelayout",e,v());var We=document.querySelector(".js-notes-box-panel");We&&We.redraw(We.selectedObj)}})}}l.annotationText?Z.call(OU.makeEditable,{delegate:C,gd:e}).call(j).on("edit",function(H){t.text=H,this.call(j),d("text",H),i&&i.autorange&&h(i._name+".autorange",!0),a&&a.autorange&&h(a._name+".autorange",!0),zU.call("_guiRelayout",e,v())}):Z.call(j)}});var zpe=ye((jsr,Fpe)=>{"use strict";var Ppe=Pr(),X0t=Oa(),Ipe=vl().arrayEditor;Fpe.exports={hasClickToShow:Z0t,onClick:Y0t};function Z0t(e,t){var r=Dpe(e,t);return r.on.length>0||r.explicitOff.length>0}function Y0t(e,t){var r=Dpe(e,t),n=r.on,i=r.off.concat(r.explicitOff),a={},o=e._fullLayout.annotations,s,l;if(n.length||i.length){for(s=0;s{"use strict";var NU=Pr(),xT=ka();qpe.exports=function(t,r,n,i){i("opacity");var a=i("bgcolor"),o=i("bordercolor"),s=xT.opacity(o);i("borderpad");var l=i("borderwidth"),u=i("showarrow");i("text",u?" ":n._dfltTitle.annotation),i("textangle"),NU.coerceFont(i,"font",n.font),i("width"),i("align");var c=i("height");if(c&&i("valign"),u){var f=i("arrowside"),h,d;f.indexOf("end")!==-1&&(h=i("arrowhead"),d=i("arrowsize")),f.indexOf("start")!==-1&&(i("startarrowhead",h),i("startarrowsize",d)),i("arrowcolor",s?r.bordercolor:xT.defaultLine),i("arrowwidth",(s&&l||1)*2),i("standoff"),i("startstandoff")}var v=i("hovertext"),m=n.hoverlabel||{};if(v){var b=i("hoverlabel.bgcolor",m.bgcolor||(xT.opacity(a)?xT.rgb(a):xT.defaultLine)),p=i("hoverlabel.bordercolor",m.bordercolor||xT.contrast(b)),k=NU.extendFlat({},m.font);k.color||(k.color=p),NU.coerceFont(i,"hoverlabel.font",k)}i("captureevents",!!v)}});var Bpe=ye((Xsr,Ope)=>{"use strict";var VU=Pr(),o2=ho(),K0t=Zd(),J0t=UU(),$0t=Jb();Ope.exports=function(t,r){K0t(t,r,{name:"annotations",handleItemDefaults:Q0t})};function Q0t(e,t,r){function n(M,T){return VU.coerce(e,t,$0t,M,T)}var i=n("visible"),a=n("clicktoshow");if(i||a){J0t(e,t,r,n);for(var o=t.showarrow,s=["x","y"],l=[-10,-30],u={_fullLayout:r},c=0;c<2;c++){var f=s[c],h=o2.coerceRef(e,t,u,f,"","paper");if(h!=="paper"){var d=o2.getFromId(u,h);d._annIndices.push(t._index)}if(o2.coercePosition(t,u,n,h,f,.5),o){var v="a"+f,m=o2.coerceRef(e,t,u,v,"pixel",["pixel","paper"]);m!=="pixel"&&m!==h&&(m=t[v]="pixel");var b=m==="pixel"?l[c]:.4;o2.coercePosition(t,u,n,m,v,b)}n(f+"anchor"),n(f+"shift")}if(VU.noneOrAll(e,t,["x","y"]),o&&VU.noneOrAll(e,t,["ax","ay"]),a){var p=n("xclick"),k=n("yclick");t._xclick=p===void 0?t.x:o2.cleanPosition(p,u,t.xref),t._yclick=k===void 0?t.y:o2.cleanPosition(k,u,t.yref)}}}});var Vpe=ye((Zsr,Upe)=>{"use strict";var GU=Pr(),s2=ho(),egt=bI().draw;Upe.exports=function(t){var r=t._fullLayout,n=GU.filterVisible(r.annotations);if(n.length&&t._fullData.length)return GU.syncOrAsync([egt,tgt],t)};function tgt(e){var t=e._fullLayout;GU.filterVisible(t.annotations).forEach(function(r){var n=s2.getFromId(e,r.xref),i=s2.getFromId(e,r.yref),a=s2.getRefType(r.xref),o=s2.getRefType(r.yref);r._extremes={},a==="range"&&Npe(r,n),o==="range"&&Npe(r,i)})}function Npe(e,t){var r=t._id,n=r.charAt(0),i=e[n],a=e["a"+n],o=e[n+"ref"],s=e["a"+n+"ref"],l=e["_"+n+"padplus"],u=e["_"+n+"padminus"],c={x:1,y:-1}[n]*e[n+"shift"],f=3*e.arrowsize*e.arrowwidth||0,h=f+c,d=f-c,v=3*e.startarrowsize*e.arrowwidth||0,m=v+c,b=v-c,p;if(s===o){var k=s2.findExtremes(t,[t.r2c(i)],{ppadplus:h,ppadminus:d}),M=s2.findExtremes(t,[t.r2c(a)],{ppadplus:Math.max(l,m),ppadminus:Math.max(u,b)});p={min:[k.min[0],M.min[0]],max:[k.max[0],M.max[0]]}}else m=a?m+a:m,b=a?b-a:b,p=s2.findExtremes(t,[t.r2c(i)],{ppadplus:Math.max(l,h,m),ppadminus:Math.max(u,d,b)});e._extremes[r]=p}});var Hpe=ye((Ysr,Gpe)=>{"use strict";var rgt=Eo(),igt=S6();Gpe.exports=function(t,r,n,i){r=r||{};var a=n==="log"&&r.type==="linear",o=n==="linear"&&r.type==="log";if(!(a||o))return;var s=t._fullLayout.annotations,l=r._id.charAt(0),u,c;function f(d){var v=u[d],m=null;a?m=igt(v,r.range):m=Math.pow(10,v),rgt(m)||(m=null),i(c+d,m)}for(var h=0;h{"use strict";var HU=bI(),jpe=zpe();Wpe.exports={moduleType:"component",name:"annotations",layoutAttributes:Jb(),supplyLayoutDefaults:Bpe(),includeBasePlot:WM()("annotations"),calcAutorange:Vpe(),draw:HU.draw,drawOne:HU.drawOne,drawRaw:HU.drawRaw,hasClickToShow:jpe.hasClickToShow,onClick:jpe.onClick,convertCoords:Hpe()}});var wI=ye((Jsr,Zpe)=>{"use strict";var kc=Jb(),ngt=mc().overrideAll,agt=vl().templatedArray;Zpe.exports=ngt(agt("annotation",{visible:kc.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:kc.xanchor,xshift:kc.xshift,yanchor:kc.yanchor,yshift:kc.yshift,text:kc.text,textangle:kc.textangle,font:kc.font,width:kc.width,height:kc.height,opacity:kc.opacity,align:kc.align,valign:kc.valign,bgcolor:kc.bgcolor,bordercolor:kc.bordercolor,borderpad:kc.borderpad,borderwidth:kc.borderwidth,showarrow:kc.showarrow,arrowcolor:kc.arrowcolor,arrowhead:kc.arrowhead,startarrowhead:kc.startarrowhead,arrowside:kc.arrowside,arrowsize:kc.arrowsize,startarrowsize:kc.startarrowsize,arrowwidth:kc.arrowwidth,standoff:kc.standoff,startstandoff:kc.startstandoff,hovertext:kc.hovertext,hoverlabel:kc.hoverlabel,captureevents:kc.captureevents}),"calc","from-root")});var Kpe=ye(($sr,Ype)=>{"use strict";var jU=Pr(),ogt=ho(),sgt=Zd(),lgt=UU(),ugt=wI();Ype.exports=function(t,r,n){sgt(t,r,{name:"annotations",handleItemDefaults:cgt,fullLayout:n.fullLayout})};function cgt(e,t,r,n){function i(s,l){return jU.coerce(e,t,ugt,s,l)}function a(s){var l=s+"axis",u={_fullLayout:{}};return u._fullLayout[l]=r[l],ogt.coercePosition(t,u,i,s,s,.5)}var o=i("visible");o&&(lgt(e,t,n.fullLayout,i),a("x"),a("y"),a("z"),jU.noneOrAll(e,t,["x","y","z"]),t.xref="x",t.yref="y",t.zref="z",i("xanchor"),i("yanchor"),i("xshift"),i("yshift"),t.showarrow&&(t.axref="pixel",t.ayref="pixel",i("ax",-10),i("ay",-30),jU.noneOrAll(e,t,["ax","ay"])))}});var e0e=ye((Qsr,Qpe)=>{"use strict";var Jpe=Pr(),$pe=ho();Qpe.exports=function(t){for(var r=t.fullSceneLayout,n=r.annotations,i=0;i{"use strict";function WU(e,t){var r=[0,0,0,0],n,i;for(n=0;n<4;++n)for(i=0;i<4;++i)r[i]+=e[4*n+i]*t[n];return r}function hgt(e,t){var r=WU(e.projection,WU(e.view,WU(e.model,[t[0],t[1],t[2],1])));return r}t0e.exports=hgt});var i0e=ye((tlr,r0e)=>{"use strict";var dgt=bI().drawRaw,vgt=XU(),pgt=["x","y","z"];r0e.exports=function(t){for(var r=t.fullSceneLayout,n=t.dataScale,i=r.annotations,a=0;a1){s=!0;break}}s?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+a+'"]').remove():(o._pdata=vgt(t.glplot.cameraParams,[r.xaxis.r2l(o.x)*n[0],r.yaxis.r2l(o.y)*n[1],r.zaxis.r2l(o.z)*n[2]]),dgt(t.graphDiv,o,a,t.id,o._xa,o._ya))}}});var o0e=ye((rlr,a0e)=>{"use strict";var ggt=Oa(),n0e=Pr();a0e.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:wI()}}},layoutAttributes:wI(),handleDefaults:Kpe(),includeBasePlot:mgt,convert:e0e(),draw:i0e()};function mgt(e,t){var r=ggt.subplotsRegistry.gl3d;if(r)for(var n=r.attrRegex,i=Object.keys(e),a=0;a{"use strict";var ilr=Rh(),s0e=ec(),l0e=pf().line,ygt=Pd().dash,Bg=Ao().extendFlat,_gt=vl().templatedArray,nlr=HM(),bT=Gl(),u0e=Jb(),{shapeTexttemplateAttrs:xgt,templatefallbackAttrs:bgt}=Ll(),wgt=D6();c0e.exports=_gt("shape",{visible:Bg({},bT.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:Bg({},bT.legend,{editType:"calc+arraydraw"}),legendgroup:Bg({},bT.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:Bg({},bT.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:s0e({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:Bg({},bT.legendrank,{editType:"calc+arraydraw"}),legendwidth:Bg({},bT.legendwidth,{editType:"calc+arraydraw"}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",editType:"arraydraw"},xref:Bg({},u0e.xref,{arrayOk:!0}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},x0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},x1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},yref:Bg({},u0e.yref,{arrayOk:!0}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},y0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},y1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:Bg({},l0e.color,{editType:"arraydraw"}),width:Bg({},l0e.width,{editType:"calc+arraydraw"}),dash:Bg({},ygt,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},label:{text:{valType:"string",dflt:"",editType:"arraydraw"},texttemplate:xgt({},{keys:Object.keys(wgt)}),texttemplatefallback:bgt({editType:"arraydraw"}),font:s0e({editType:"calc+arraydraw",colorEditType:"arraydraw"}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})});var h0e=ye((olr,f0e)=>{"use strict";var wT=Pr(),e0=ho(),Tgt=Zd(),Agt=ZU(),v4=x_();f0e.exports=function(t,r){Tgt(t,r,{name:"shapes",handleItemDefaults:Mgt})};function Sgt(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}function Mgt(e,t,r){function n(M,T){return wT.coerce(e,t,Agt,M,T)}t._isShape=!0;var i=n("visible");if(!i)return;var a=n("showlegend");a&&(n("legend"),n("legendwidth"),n("legendgroup"),n("legendgrouptitle.text"),wT.coerceFont(n,"legendgrouptitle.font"),n("legendrank"));var o=n("path"),s=o?"path":"rect",l=n("type",s),u=l!=="path";u&&delete t.path,n("editable"),n("layer"),n("opacity"),n("fillcolor"),n("fillrule");var c=n("line.width");c&&(n("line.color"),n("line.dash"));var f=n("xsizemode"),h=n("ysizemode");let d=[.25,.75],v=[0,10];["x","y"].forEach(M=>{var T=M+"anchor",L=M==="x"?f:h,x={_fullLayout:r},C,S,g,P;let E=M+"ref",z=e[E];if(Array.isArray(z)&&z.length>0){let q=v4.countDefiningCoords(l,o,M);P=e0.coerceRefArray(e,t,x,M,void 0,"paper",q),t["_"+M+"refArray"]=!0}else P=e0.coerceRef(e,t,x,M,void 0,"paper");if(Array.isArray(P))P.forEach(function(q){e0.getRefType(q)==="range"&&(C=e0.getFromId(x,q),C&&C._shapeIndices.indexOf(t._index)===-1&&C._shapeIndices.push(t._index))}),u&&[0,1].forEach(function(q){let U=P[q];e0.getRefType(U)==="range"?(C=e0.getFromId(x,U),S=v4.shapePositionToRange(C),g=v4.rangeToShapePosition(C),(C.type==="category"||C.type==="multicategory")&&n(M+q+"shift")):S=g=wT.identity;let Z=M+q,j=e[Z];if(e[Z]=S(e[Z],!0),L==="pixel"?n(Z,v[q]):e0.coercePosition(t,x,n,U,Z,d[q]),t[Z]=g(t[Z]),e[Z]=j,q===0&&L==="pixel"){let N=e[T];e[T]=S(e[T],!0),e0.coercePosition(t,x,n,U,T,.25),t[T]=g(t[T]),e[T]=N}});else{if(e0.getRefType(P)==="range"?(C=e0.getFromId(x,P),C._shapeIndices.push(t._index),g=v4.rangeToShapePosition(C),S=v4.shapePositionToRange(C),u&&(C.type==="category"||C.type==="multicategory")&&(n(M+"0shift"),n(M+"1shift"))):S=g=wT.identity,u){let U=M+"0",G=M+"1",Z=e[U],j=e[G];e[U]=S(e[U],!0),e[G]=S(e[G],!0),L==="pixel"?(n(U,v[0]),n(G,v[1])):(e0.coercePosition(t,x,n,P,U,d[0]),e0.coercePosition(t,x,n,P,G,d[1])),t[U]=g(t[U]),t[G]=g(t[G]),e[U]=Z,e[G]=j}if(L==="pixel"){let U=e[T];e[T]=S(e[T],!0),e0.coercePosition(t,x,n,P,T,.25),t[T]=g(t[T]),e[T]=U}}}),u&&wT.noneOrAll(e,t,["x0","x1","y0","y1"]);var m=l==="line",b,p;if(u&&(b=n("label.texttemplate"),n("label.texttemplatefallback")),b||(p=n("label.text")),p||b){n("label.textangle");var k=n("label.textposition",m?"middle":"middle center");n("label.xanchor"),n("label.yanchor",Sgt(m,k)),n("label.padding"),wT.coerceFont(n,"label.font",r.font)}}});var p0e=ye((slr,v0e)=>{"use strict";var Egt=ka(),d0e=Pr();function kgt(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}v0e.exports=function(t,r,n){n("newshape.visible"),n("newshape.name"),n("newshape.showlegend"),n("newshape.legend"),n("newshape.legendwidth"),n("newshape.legendgroup"),n("newshape.legendgrouptitle.text"),d0e.coerceFont(n,"newshape.legendgrouptitle.font"),n("newshape.legendrank"),n("newshape.drawdirection"),n("newshape.layer"),n("newshape.fillcolor"),n("newshape.fillrule"),n("newshape.opacity");var i=n("newshape.line.width");if(i){var a=(t||{}).plot_bgcolor||"#FFF";n("newshape.line.color",Egt.contrast(a)),n("newshape.line.dash")}var o=t.dragmode==="drawline",s=n("newshape.label.text"),l=n("newshape.label.texttemplate");if(n("newshape.label.texttemplatefallback"),s||l){n("newshape.label.textangle");var u=n("newshape.label.textposition",o?"middle":"middle center");n("newshape.label.xanchor"),n("newshape.label.yanchor",kgt(o,u)),n("newshape.label.padding"),d0e.coerceFont(n,"newshape.label.font",r.font)}n("activeshape.fillcolor"),n("activeshape.opacity")}});var w0e=ye((llr,b0e)=>{"use strict";var YU=Pr(),N0=ho(),Fm=TM(),KU=x_();b0e.exports=function(t){var r=t._fullLayout,n=YU.filterVisible(r.shapes);if(!(!n.length||!t._fullData.length))for(var i=0;i{o=N0.getFromId(t,f),a._extremes[o._id]=N0.findExtremes(o,h,m0e(a))})}else a.xref!=="paper"&&l!=="domain"&&(o=N0.getFromId(t,a.xref),s=_0e(o,a,Fm.paramIsX),s&&(a._extremes[o._id]=N0.findExtremes(o,s,m0e(a))));if(u==="array"){let c=g0e(t,a,"y");Object.entries(c).forEach(([f,h])=>{o=N0.getFromId(t,f),a._extremes[o._id]=N0.findExtremes(o,h,y0e(a))})}else a.yref!=="paper"&&u!=="domain"&&(o=N0.getFromId(t,a.yref),s=_0e(o,a,Fm.paramIsY),s&&(a._extremes[o._id]=N0.findExtremes(o,s,y0e(a))))}};function g0e(e,t,r){let n=t[r+"ref"],i=r==="x"?Fm.paramIsX:Fm.paramIsY;function a(f,h){f==="paper"||N0.getRefType(f)==="domain"||(o[f]||(o[f]=[]),o[f].push(h))}let o={};if(t.type==="path"&&t.path){let f=t.path.match(Fm.segmentRE)||[];for(var s=0,l=0;lv&&(a(n[s],m[v]),s++)}}else a(n[0],t[r+"0"]),a(n[1],t[r+"1"]);let u={};for(let f in o){let h=N0.getFromId(e,f);if(h){var c=h.type==="category"||h.type==="multicategory"?h.r2c:h.d2c;h.type==="date"&&(c=KU.decodeDate(c)),u[h._id]=o[f].map(c)}}return u}function m0e(e){return x0e(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function y0e(e){return x0e(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function x0e(e,t,r,n,i,a){var o=e/2,s=a;if(t==="pixel"){var l=i?KU.extractPathCoords(i,a?Fm.paramIsY:Fm.paramIsX):[r,n],u=YU.aggNums(Math.max,null,l),c=YU.aggNums(Math.min,null,l),f=c<0?Math.abs(c)+o:o,h=u>0?u+o:o;return{ppad:o,ppadplus:s?f:h,ppadminus:s?h:f}}else return{ppad:o}}function _0e(e,t,r){var n=e._id.charAt(0)==="x"?"x":"y",i=e.type==="category"||e.type==="multicategory",a,o,s=0,l=0,u=i?e.r2c:e.d2c,c=t[n+"sizemode"]==="scaled";if(c?(a=t[n+"0"],o=t[n+"1"],i&&(s=t[n+"0shift"],l=t[n+"1shift"])):(a=t[n+"anchor"],o=t[n+"anchor"]),a!==void 0)return[u(a)+s,u(o)+l];if(t.path){var f=1/0,h=-1/0,d=t.path.match(Fm.segmentRE),v,m,b,p,k;for(e.type==="date"&&(u=KU.decodeDate(u)),v=0;vh&&(h=k)));if(h>=f)return[f,h]}}});var S0e=ye((ulr,A0e)=>{"use strict";var T0e=dP();A0e.exports={moduleType:"component",name:"shapes",layoutAttributes:ZU(),supplyLayoutDefaults:h0e(),supplyDrawNewShapeDefaults:p0e(),includeBasePlot:WM()("shapes"),calcAutorange:w0e(),draw:T0e.draw,drawOne:T0e.drawOne}});var JU=ye((flr,E0e)=>{"use strict";var M0e=Rh(),Cgt=vl().templatedArray,clr=HM();E0e.exports=Cgt("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",M0e.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",M0e.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})});var C0e=ye((hlr,k0e)=>{"use strict";var Lgt=Pr(),$U=ho(),Pgt=Zd(),Igt=JU(),Rgt="images";k0e.exports=function(t,r){var n={name:Rgt,handleItemDefaults:Dgt};Pgt(t,r,n)};function Dgt(e,t,r){function n(h,d){return Lgt.coerce(e,t,Igt,h,d)}var i=n("source"),a=n("visible",!!i);if(!a)return t;n("layer"),n("xanchor"),n("yanchor"),n("sizex"),n("sizey"),n("sizing"),n("opacity");for(var o={_fullLayout:r},s=["x","y"],l=0;l<2;l++){var u=s[l],c=$U.coerceRef(e,t,o,u,"paper",void 0);if(c!=="paper"){var f=$U.getFromId(o,c);f._imgIndices.push(t._index)}$U.coercePosition(t,o,n,c,u,0)}return t}});var R0e=ye((dlr,I0e)=>{"use strict";var L0e=qa(),Fgt=So(),TT=ho(),P0e=hf(),zgt=Wp();I0e.exports=function(t){var r=t._fullLayout,n=[],i={},a=[],o,s;for(s=0;s{"use strict";var D0e=Eo(),qgt=S6();F0e.exports=function(t,r,n,i){r=r||{};var a=n==="log"&&r.type==="linear",o=n==="linear"&&r.type==="log";if(a||o){for(var s=t._fullLayout.images,l=r._id.charAt(0),u,c,f=0;f{"use strict";q0e.exports={moduleType:"component",name:"images",layoutAttributes:JU(),supplyLayoutDefaults:C0e(),includeBasePlot:WM()("images"),draw:R0e(),convertCoords:z0e()}});var TI=ye((glr,B0e)=>{"use strict";B0e.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"\u25C4",right:"\u25BA",up:"\u25B2",down:"\u25BC"}}});var QU=ye((mlr,U0e)=>{"use strict";var Ogt=ec(),Bgt=Ih(),Ngt=Ao().extendFlat,Ugt=mc().overrideAll,Vgt=F6(),N0e=vl().templatedArray,Ggt=N0e("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});U0e.exports=Ugt(N0e("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:Ggt,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:Ngt(Vgt({editType:"arraydraw"}),{}),font:Ogt({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:Bgt.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")});var j0e=ye((ylr,H0e)=>{"use strict";var AI=Pr(),V0e=Zd(),G0e=QU(),Hgt=TI(),jgt=Hgt.name,Wgt=G0e.buttons;H0e.exports=function(t,r){var n={name:jgt,handleItemDefaults:Xgt};V0e(t,r,n)};function Xgt(e,t,r){function n(o,s){return AI.coerce(e,t,G0e,o,s)}var i=V0e(e,t,{name:"buttons",handleItemDefaults:Zgt}),a=n("visible",i.length>0);a&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),AI.noneOrAll(e,t,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),AI.coerceFont(n,"font",r.font),n("bgcolor",r.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function Zgt(e,t){function r(i,a){return AI.coerce(e,t,Wgt,i,a)}var n=r("visible",e.method==="skip"||Array.isArray(e.args));n&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}});var Z0e=ye((_lr,X0e)=>{"use strict";X0e.exports=Mf;var Ng=qa(),W0e=ka(),AT=So(),SI=Pr();function Mf(e,t,r){this.gd=e,this.container=t,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}Mf.barWidth=2;Mf.barLength=20;Mf.barRadius=2;Mf.barPad=1;Mf.barColor="#808BA4";Mf.prototype.enable=function(t,r,n){var i=this.gd._fullLayout,a=i.width,o=i.height;this.position=t;var s=this.position.l,l=this.position.w,u=this.position.t,c=this.position.h,f=this.position.direction,h=f==="down",d=f==="left",v=f==="right",m=f==="up",b=l,p=c,k,M,T,L;!h&&!d&&!v&&!m&&(this.position.direction="down",h=!0);var x=h||m;x?(k=s,M=k+b,h?(T=u,L=Math.min(T+p,o),p=L-T):(L=u+p,T=Math.max(L-p,0),p=L-T)):(T=u,L=T+p,d?(M=s+b,k=Math.max(M-b,0),b=M-k):(k=s,M=Math.min(k+b,a),b=M-k)),this._box={l:k,t:T,w:b,h:p};var C=l>b,S=Mf.barLength+2*Mf.barPad,g=Mf.barWidth+2*Mf.barPad,P=s,E=u+c;E+g>o&&(E=o-g);var z=this.container.selectAll("rect.scrollbar-horizontal").data(C?[0]:[]);z.exit().on(".drag",null).remove(),z.enter().append("rect").classed("scrollbar-horizontal",!0).call(W0e.fill,Mf.barColor),C?(this.hbar=z.attr({rx:Mf.barRadius,ry:Mf.barRadius,x:P,y:E,width:S,height:g}),this._hbarXMin=P+S/2,this._hbarTranslateMax=b-S):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var q=c>p,U=Mf.barWidth+2*Mf.barPad,G=Mf.barLength+2*Mf.barPad,Z=s+l,j=u;Z+U>a&&(Z=a-U);var N=this.container.selectAll("rect.scrollbar-vertical").data(q?[0]:[]);N.exit().on(".drag",null).remove(),N.enter().append("rect").classed("scrollbar-vertical",!0).call(W0e.fill,Mf.barColor),q?(this.vbar=N.attr({rx:Mf.barRadius,ry:Mf.barRadius,x:Z,y:j,width:U,height:G}),this._vbarYMin=j+G/2,this._vbarTranslateMax=p-G):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var H=this.id,re=k-.5,oe=q?M+U+.5:M+.5,_e=T-.5,ke=C?L+g+.5:L+.5,Ce=i._topdefs.selectAll("#"+H).data(C||q?[0]:[]);if(Ce.exit().remove(),Ce.enter().append("clipPath").attr("id",H).append("rect"),C||q?(this._clipRect=Ce.select("rect").attr({x:Math.floor(re),y:Math.floor(_e),width:Math.ceil(oe)-Math.floor(re),height:Math.ceil(ke)-Math.floor(_e)}),this.container.call(AT.setClipUrl,H,this.gd),this.bg.attr({x:s,y:u,width:l,height:c})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(AT.setClipUrl,null),delete this._clipRect),C||q){var ge=Ng.behavior.drag().on("dragstart",function(){Ng.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(ge);var ie=Ng.behavior.drag().on("dragstart",function(){Ng.event.sourceEvent.preventDefault(),Ng.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));C&&this.hbar.on(".drag",null).call(ie),q&&this.vbar.on(".drag",null).call(ie)}this.setTranslate(r,n)};Mf.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(AT.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)};Mf.prototype._onBoxDrag=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t-=Ng.event.dx),this.vbar&&(r-=Ng.event.dy),this.setTranslate(t,r)};Mf.prototype._onBoxWheel=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t+=Ng.event.deltaY),this.vbar&&(r+=Ng.event.deltaY),this.setTranslate(t,r)};Mf.prototype._onBarDrag=function(){var t=this.translateX,r=this.translateY;if(this.hbar){var n=t+this._hbarXMin,i=n+this._hbarTranslateMax,a=SI.constrain(Ng.event.x,n,i),o=(a-n)/(i-n),s=this.position.w-this._box.w;t=o*s}if(this.vbar){var l=r+this._vbarYMin,u=l+this._vbarTranslateMax,c=SI.constrain(Ng.event.y,l,u),f=(c-l)/(u-l),h=this.position.h-this._box.h;r=f*h}this.setTranslate(t,r)};Mf.prototype.setTranslate=function(t,r){var n=this.position.w-this._box.w,i=this.position.h-this._box.h;if(t=SI.constrain(t||0,0,n),r=SI.constrain(r||0,0,i),this.translateX=t,this.translateY=r,this.container.call(AT.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-r),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+r-.5)}),this.hbar){var a=t/n;this.hbar.call(AT.setTranslate,t+a*this._hbarTranslateMax,r)}if(this.vbar){var o=r/i;this.vbar.call(AT.setTranslate,t,r+o*this._vbarTranslateMax)}}});var nge=ye((xlr,ige)=>{"use strict";var ST=qa(),p4=Mc(),g4=ka(),MT=So(),t0=Pr(),MI=Zl(),Ygt=vl().arrayEditor,K0e=Dh().LINE_SPACING,es=TI(),Kgt=Z0e();ige.exports=function(t){var r=t._fullLayout,n=t0.filterVisible(r[es.name]);function i(h){p4.autoMargin(t,tge(h))}var a=r._menulayer.selectAll("g."+es.containerClassName).data(n.length>0?[0]:[]);if(a.enter().append("g").classed(es.containerClassName,!0).style("cursor","pointer"),a.exit().each(function(){ST.select(this).selectAll("g."+es.headerGroupClassName).each(i)}).remove(),n.length!==0){var o=a.selectAll("g."+es.headerGroupClassName).data(n,Jgt);o.enter().append("g").classed(es.headerGroupClassName,!0);for(var s=t0.ensureSingle(a,"g",es.dropdownButtonGroupClassName,function(h){h.style("pointer-events","all")}),l=0;l{"use strict";var nmt=TI();age.exports={moduleType:"component",name:nmt.name,layoutAttributes:QU(),supplyLayoutDefaults:j0e(),draw:nge()}});var y4=ye((wlr,sge)=>{"use strict";sge.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}});var iV=ye((Tlr,cge)=>{"use strict";var lge=ec(),amt=F6(),omt=Ao().extendDeepAll,smt=mc().overrideAll,lmt=jS(),uge=vl().templatedArray,l2=y4(),umt=uge("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});cge.exports=smt(uge("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:umt,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:omt(amt({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:lmt.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:lge({})},font:lge({}),activebgcolor:{valType:"color",dflt:l2.gripBgActiveColor},bgcolor:{valType:"color",dflt:l2.railBgColor},bordercolor:{valType:"color",dflt:l2.railBorderColor},borderwidth:{valType:"number",min:0,dflt:l2.railBorderWidth},ticklen:{valType:"number",min:0,dflt:l2.tickLength},tickcolor:{valType:"color",dflt:l2.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:l2.minorTickLength}}),"arraydraw","from-root")});var vge=ye((Alr,dge)=>{"use strict";var ET=Pr(),fge=Zd(),hge=iV(),cmt=y4(),fmt=cmt.name,hmt=hge.steps;dge.exports=function(t,r){fge(t,r,{name:fmt,handleItemDefaults:dmt})};function dmt(e,t,r){function n(f,h){return ET.coerce(e,t,hge,f,h)}for(var i=fge(e,t,{name:"steps",handleItemDefaults:vmt}),a=0,o=0;o{"use strict";var Ug=qa(),EI=Mc(),k_=ka(),Vg=So(),r0=Pr(),pmt=r0.strTranslate,_4=Zl(),gmt=vl().arrayEditor,Rs=y4(),oV=Dh(),mge=oV.LINE_SPACING,nV=oV.FROM_TL,aV=oV.FROM_BR;Tge.exports=function(t){var r=t._context.staticPlot,n=t._fullLayout,i=mmt(n,t),a=n._infolayer.selectAll("g."+Rs.containerClassName).data(i.length>0?[0]:[]);a.enter().append("g").classed(Rs.containerClassName,!0).style("cursor",r?null:"ew-resize");function o(c){c._commandObserver&&(c._commandObserver.remove(),delete c._commandObserver),EI.autoMargin(t,yge(c))}if(a.exit().each(function(){Ug.select(this).selectAll("g."+Rs.groupClassName).each(o)}).remove(),i.length!==0){var s=a.selectAll("g."+Rs.groupClassName).data(i,ymt);s.enter().append("g").classed(Rs.groupClassName,!0),s.exit().each(o).remove();for(var l=0;l0&&(s=s.transition().duration(t.transition.duration).ease(t.transition.easing)),s.attr("transform",pmt(o-Rs.gripWidth*.5,t._dims.currentValueTotalHeight))}}function sV(e,t){var r=e._dims;return r.inputAreaStart+Rs.stepInset+(r.inputAreaLength-2*Rs.stepInset)*Math.min(1,Math.max(0,t))}function gge(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-Rs.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*Rs.stepInset-2*r.inputAreaStart)))}function Smt(e,t,r){var n=r._dims,i=r0.ensureSingle(e,"rect",Rs.railTouchRectClass,function(a){a.call(bge,t,e,r).style("pointer-events","all")});i.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,Rs.tickOffset+r.ticklen+n.labelHeight)}).call(k_.fill,r.bgcolor).attr("opacity",0),Vg.setTranslate(i,0,n.currentValueTotalHeight)}function Mmt(e,t){var r=t._dims,n=r.inputAreaLength-Rs.railInset*2,i=r0.ensureSingle(e,"rect",Rs.railRectClass);i.attr({width:n,height:Rs.railWidth,rx:Rs.railRadius,ry:Rs.railRadius,"shape-rendering":"crispEdges"}).call(k_.stroke,t.bordercolor).call(k_.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),Vg.setTranslate(i,Rs.railInset,(r.inputAreaWidth-Rs.railWidth)*.5+r.currentValueTotalHeight)}});var Mge=ye((Mlr,Sge)=>{"use strict";var Emt=y4();Sge.exports={moduleType:"component",name:Emt.name,layoutAttributes:iV(),supplyLayoutDefaults:vge(),draw:Age()}});var CI=ye((Elr,kge)=>{"use strict";var Ege=Ih();kge.exports={bgcolor:{valType:"color",dflt:Ege.background,editType:"plot"},bordercolor:{valType:"color",dflt:Ege.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}});var lV=ye((klr,Cge)=>{"use strict";Cge.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}});var LI=ye((Clr,Lge)=>{"use strict";Lge.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}});var Rge=ye(II=>{"use strict";var kmt=hf(),Cmt=Zl(),Pge=LI(),Lmt=Dh().LINE_SPACING,PI=Pge.name;function Ige(e){var t=e&&e[PI];return t&&t.visible}II.isVisible=Ige;II.makeData=function(e){for(var t=kmt.list({_fullLayout:e},"x",!0),r=e.margin,n=[],i=0;i{"use strict";var RI=Pr(),Dge=vl(),Fge=hf(),Pmt=CI(),Imt=lV();zge.exports=function(t,r,n){var i=t[n],a=r[n];if(!(i.rangeslider||r._requestRangeslider[a._id]))return;RI.isPlainObject(i.rangeslider)||(i.rangeslider={});var o=i.rangeslider,s=Dge.newContainer(a,"rangeslider");function l(L,x){return RI.coerce(o,s,Pmt,L,x)}var u,c;function f(L,x){return RI.coerce(u,c,Imt,L,x)}var h=l("visible");if(h){l("bgcolor",r.plot_bgcolor),l("bordercolor"),l("borderwidth"),l("thickness"),l("autorange",!a.isValidRange(o.range)),l("range");var d=r._subplots;if(d)for(var v=d.cartesian.filter(function(L){return L.slice(0,Math.max(0,L.indexOf("y")))===Fge.name2id(n)}).map(function(L){return L.slice(L.indexOf("y"),L.length)}),m=RI.simpleMap(v,Fge.id2name),b=0;b{"use strict";var Rmt=hf().list,Dmt=Mg().getAutoRange,Fmt=LI();Oge.exports=function(t){for(var r=Rmt(t,"x",!0),n=0;n{"use strict";var DI=qa(),zmt=Oa(),qmt=Mc(),Jf=Pr(),FI=Jf.strTranslate,Uge=So(),C_=ka(),Omt=zb(),Bmt=mh(),uV=hf(),Nmt=yv(),Umt=Eg(),rl=LI();Vge.exports=function(e){for(var t=e._fullLayout,r=t._rangeSliderData,n=0;n=N.max)Z=E[j+1];else if(G=N.pmax)Z=E[j+1];else if(G0?e.touches[0].clientX:0}function Vmt(e,t,r,n){if(t._context.staticPlot)return;var i=e.select("rect."+rl.slideBoxClassName).node(),a=e.select("rect."+rl.grabAreaMinClassName).node(),o=e.select("rect."+rl.grabAreaMaxClassName).node();function s(){var l=DI.event,u=l.target,c=Nge(l),f=c-e.node().getBoundingClientRect().left,h=n.d2p(r._rl[0]),d=n.d2p(r._rl[1]),v=Nmt.coverSlip();this.addEventListener("touchmove",m),this.addEventListener("touchend",b),v.addEventListener("mousemove",m),v.addEventListener("mouseup",b);function m(p){var k=Nge(p),M=+k-c,T,L,x;switch(u){case i:if(x="ew-resize",h+M>r._length||d+M<0)return;T=h+M,L=d+M;break;case a:if(x="col-resize",h+M>r._length)return;T=h+M,L=d;break;case o:if(x="col-resize",d+M<0)return;T=h,L=d+M;break;default:x="ew-resize",T=f,L=f+M;break}if(L{"use strict";var $mt=Pr(),Qmt=CI(),eyt=lV(),cV=Rge();Hge.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:$mt.extendFlat({},Qmt,{yaxis:eyt})}}},layoutAttributes:CI(),handleDefaults:qge(),calcAutorange:Bge(),draw:Gge(),isVisible:cV.isVisible,makeData:cV.makeData,autoMarginOpts:cV.autoMarginOpts}});var zI=ye((Flr,Xge)=>{"use strict";var tyt=ec(),Wge=Ih(),ryt=vl().templatedArray,iyt=ryt("button",{visible:{valType:"boolean",dflt:!0,editType:"plot"},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot"},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot"},count:{valType:"number",min:0,dflt:1,editType:"plot"},label:{valType:"string",editType:"plot"},editType:"plot"});Xge.exports={visible:{valType:"boolean",editType:"plot"},buttons:iyt,x:{valType:"number",min:-2,max:3,editType:"plot"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot"},y:{valType:"number",min:-2,max:3,editType:"plot"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot"},font:tyt({editType:"plot"}),bgcolor:{valType:"color",dflt:Wge.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:Wge.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}});var fV=ye((zlr,Zge)=>{"use strict";Zge.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}});var Jge=ye((qlr,Kge)=>{"use strict";var qI=Pr(),nyt=ka(),ayt=vl(),oyt=Zd(),Yge=zI(),hV=fV();Kge.exports=function(t,r,n,i,a){var o=t.rangeselector||{},s=ayt.newContainer(r,"rangeselector");function l(d,v){return qI.coerce(o,s,Yge,d,v)}var u=oyt(o,s,{name:"buttons",handleItemDefaults:syt,calendar:a}),c=l("visible",u.length>0);if(c){var f=lyt(r,n,i);l("x",f[0]),l("y",f[1]),qI.noneOrAll(t,r,["x","y"]),l("xanchor"),l("yanchor"),qI.coerceFont(l,"font",n.font);var h=l("bgcolor");l("activecolor",nyt.contrast(h,hV.lightAmount,hV.darkAmount)),l("bordercolor"),l("borderwidth")}};function syt(e,t,r,n){var i=n.calendar;function a(l,u){return qI.coerce(e,t,Yge.buttons,l,u)}var o=a("visible");if(o){var s=a("step");s!=="all"&&(i&&i!=="gregorian"&&(s==="month"||s==="year")?t.stepmode="backward":a("stepmode"),a("count")),a("label")}}function lyt(e,t,r){for(var n=r.filter(function(s){return t[s].anchor===e._id}),i=0,a=0;a{"use strict";var uyt=Sq(),cyt=Pr().titleCase;$ge.exports=function(t,r){var n=t._name,i={};if(r.step==="all")i[n+".autorange"]=!0;else{var a=fyt(t,r);i[n+".range[0]"]=a[0],i[n+".range[1]"]=a[1]}return i};function fyt(e,t){var r=e.range,n=new Date(e.r2l(r[1])),i=t.step,a=uyt["utc"+cyt(i)],o=t.count,s;switch(t.stepmode){case"backward":s=e.l2r(+a.offset(n,-o));break;case"todate":var l=a.offset(n,-o);s=e.l2r(+a.ceil(l));break}var u=r[1];return[s,u]}});var sme=ye((Blr,ome)=>{"use strict";var BI=qa(),hyt=Oa(),dyt=Mc(),eme=ka(),ame=So(),Ny=Pr(),tme=Ny.strTranslate,OI=Zl(),vyt=hf(),pV=Dh(),rme=pV.LINE_SPACING,ime=pV.FROM_TL,nme=pV.FROM_BR,vV=fV(),pyt=Qge();ome.exports=function(t){var r=t._fullLayout,n=r._infolayer.selectAll(".rangeselector").data(gyt(t),myt);n.enter().append("g").classed("rangeselector",!0),n.exit().remove(),n.style({cursor:"pointer","pointer-events":"all"}),n.each(function(i){var a=BI.select(this),o=i,s=o.rangeselector,l=a.selectAll("g.button").data(Ny.filterVisible(s.buttons));l.enter().append("g").classed("button",!0),l.exit().remove(),l.each(function(u){var c=BI.select(this),f=pyt(o,u);u._isActive=yyt(o,u,f),c.call(dV,s,u),c.call(xyt,s,u,t),c.on("click",function(){t._dragged||hyt.call("_guiRelayout",t,f)}),c.on("mouseover",function(){u._isHovered=!0,c.call(dV,s,u)}),c.on("mouseout",function(){u._isHovered=!1,c.call(dV,s,u)})}),wyt(t,l,s,o._name,a)})};function gyt(e){for(var t=vyt.list(e,"x",!0),r=[],n=0;n{"use strict";lme.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:zI()}}},layoutAttributes:zI(),handleDefaults:Jge(),draw:sme()}});var Cc=ye(gV=>{"use strict";var cme=Ao().extendFlat;gV.attributes=function(e,t){e=e||{},t=t||{};var r={valType:"info_array",editType:e.editType,items:[{valType:"number",min:0,max:1,editType:e.editType},{valType:"number",min:0,max:1,editType:e.editType}],dflt:[0,1]},n=e.name?e.name+" ":"",i=e.trace?"trace ":"subplot ",a=t.description?" "+t.description:"",o={x:cme({},r,{}),y:cme({},r,{}),editType:e.editType};return e.noGridCell||(o.row={valType:"integer",min:0,dflt:0,editType:e.editType},o.column={valType:"integer",min:0,dflt:0,editType:e.editType}),o};gV.defaults=function(e,t,r,n){var i=n&&n.x||[0,1],a=n&&n.y||[0,1],o=t.grid;if(o){var s=r("domain.column");s!==void 0&&(s{"use strict";var Tyt=Pr(),Ayt=g3().counter,Syt=Cc().attributes,fme=Rh().idRegex,Myt=vl(),mV={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[Ayt("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[fme.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[fme.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:Syt({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function NI(e,t,r){var n=t[r+"axes"],i=Object.keys((e._splomAxes||{})[r]||{});if(Array.isArray(n))return n;if(i.length)return i}function Eyt(e,t){var r=e.grid||{},n=NI(t,r,"x"),i=NI(t,r,"y");if(!e.grid&&!n&&!i)return;var a=Array.isArray(r.subplots)&&Array.isArray(r.subplots[0]),o=Array.isArray(n),s=Array.isArray(i),l=o&&n!==r.xaxes&&s&&i!==r.yaxes,u,c;a?(u=r.subplots.length,c=r.subplots[0].length):(s&&(u=i.length),o&&(c=n.length));var f=Myt.newContainer(t,"grid");function h(x,C){return Tyt.coerce(r,f,mV,x,C)}var d=h("rows",u),v=h("columns",c);if(!(d*v>1)){delete t.grid;return}if(!a&&!o&&!s){var m=h("pattern")==="independent";m&&(a=!0)}f._hasSubplotGrid=a;var b=h("roworder"),p=b==="top to bottom",k=a?.2:.1,M=a?.3:.1,T,L;l&&t._splomGridDflt&&(T=t._splomGridDflt.xside,L=t._splomGridDflt.yside),f._domains={x:hme("x",h,k,T,v),y:hme("y",h,M,L,d,p)}}function hme(e,t,r,n,i,a){var o=t(e+"gap",r),s=t("domain."+e);t(e+"side",n);for(var l=new Array(i),u=s[0],c=(s[1]-u)/(i-o),f=c*(1-o),h=0;h{"use strict";pme.exports={visible:{valType:"boolean",editType:"calc"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc"},symmetric:{valType:"boolean",editType:"calc"},array:{valType:"data_array",editType:"calc"},arrayminus:{valType:"data_array",editType:"calc"},value:{valType:"number",min:0,dflt:10,editType:"calc"},valueminus:{valType:"number",min:0,dflt:10,editType:"calc"},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style"},thickness:{valType:"number",min:0,dflt:2,editType:"style"},width:{valType:"number",min:0,editType:"plot"},editType:"calc"}});var yme=ye((Hlr,mme)=>{"use strict";var gme=Eo(),Cyt=Oa(),Lyt=Pr(),Pyt=vl(),Iyt=_V();mme.exports=function(e,t,r,n){var i="error_"+n.axis,a=Pyt.newContainer(t,i),o=e[i]||{};function s(v,m){return Lyt.coerce(o,a,Iyt,v,m)}var l=o.array!==void 0||o.value!==void 0||o.type==="sqrt",u=s("visible",l);if(u!==!1){var c=s("type","array"in o?"data":"percent"),f=!0;c!=="sqrt"&&(f=s("symmetric",!((c==="data"?"arrayminus":"valueminus")in o))),c==="data"?(s("array"),s("traceref"),f||(s("arrayminus"),s("tracerefminus"))):(c==="percent"||c==="constant")&&(s("value"),f||s("valueminus"));var h="copy_"+n.inherit+"style";if(n.inherit){var d=t["error_"+n.inherit];(d||{}).visible&&s(h,!(o.color||gme(o.thickness)||gme(o.width)))}(!n.inherit||!a[h])&&(s("color",r),s("thickness"),s("width",Cyt.traceIs(t,"gl3d")?0:4))}}});var xV=ye((jlr,xme)=>{"use strict";xme.exports=function(t){var r=t.type,n=t.symmetric;if(r==="data"){var i=t.array||[];if(n)return function(u,c){var f=+i[c];return[f,f]};var a=t.arrayminus||[];return function(u,c){var f=+i[c],h=+a[c];return!isNaN(f)||!isNaN(h)?[h||0,f||0]:[NaN,NaN]}}else{var o=_me(r,t.value),s=_me(r,t.valueminus);return n||t.valueminus===void 0?function(u){var c=o(u);return[c,c]}:function(u){return[s(u),o(u)]}}};function _me(e,t){if(e==="percent")return function(r){return Math.abs(r*t/100)};if(e==="constant")return function(){return Math.abs(t)};if(e==="sqrt")return function(r){return Math.sqrt(Math.abs(r))}}});var Tme=ye((Wlr,wme)=>{"use strict";var bV=Eo(),Ryt=Oa(),wV=ho(),Dyt=Pr(),Fyt=xV();wme.exports=function(t){for(var r=t.calcdata,n=0;n{"use strict";var Ame=qa(),L_=Eo(),zyt=So(),qyt=Ru();Sme.exports=function(t,r,n,i){var a,o=n.xaxis,s=n.yaxis,l=i&&i.duration>0,u=t._context.staticPlot;r.each(function(c){var f=c[0].trace,h=f.error_x||{},d=f.error_y||{},v;f.ids&&(v=function(k){return k.id});var m=qyt.hasMarkers(f)&&f.marker.maxdisplayed>0;!d.visible&&!h.visible&&(c=[]);var b=Ame.select(this).selectAll("g.errorbar").data(c,v);if(b.exit().remove(),!!c.length){h.visible||b.selectAll("path.xerror").remove(),d.visible||b.selectAll("path.yerror").remove(),b.style("opacity",1);var p=b.enter().append("g").classed("errorbar",!0);l&&p.style("opacity",0).transition().duration(i.duration).style("opacity",1),zyt.setClipUrl(b,n.layerClipId,t),b.each(function(k){var M=Ame.select(this),T=Oyt(k,o,s);if(!(m&&!k.vis)){var L,x=M.select("path.yerror");if(d.visible&&L_(T.x)&&L_(T.yh)&&L_(T.ys)){var C=d.width;L="M"+(T.x-C)+","+T.yh+"h"+2*C+"m-"+C+",0V"+T.ys,T.noYS||(L+="m-"+C+",0h"+2*C),a=!x.size(),a?x=M.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("yerror",!0):l&&(x=x.transition().duration(i.duration).ease(i.easing)),x.attr("d",L)}else x.remove();var S=M.select("path.xerror");if(h.visible&&L_(T.y)&&L_(T.xh)&&L_(T.xs)){var g=(h.copy_ystyle?d:h).width;L="M"+T.xh+","+(T.y-g)+"v"+2*g+"m0,-"+g+"H"+T.xs,T.noXS||(L+="m0,-"+g+"v"+2*g),a=!S.size(),a?S=M.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("xerror",!0):l&&(S=S.transition().duration(i.duration).ease(i.easing)),S.attr("d",L)}else S.remove()}})}})};function Oyt(e,t,r){var n={x:t.c2p(e.x),y:r.c2p(e.y)};return e.yh!==void 0&&(n.yh=r.c2p(e.yh),n.ys=r.c2p(e.ys),L_(n.ys)||(n.noYS=!0,n.ys=r.c2p(e.ys,!0))),e.xh!==void 0&&(n.xh=t.c2p(e.xh),n.xs=t.c2p(e.xs),L_(n.xs)||(n.noXS=!0,n.xs=t.c2p(e.xs,!0))),n}});var Cme=ye((Zlr,kme)=>{"use strict";var Byt=qa(),Eme=ka();kme.exports=function(t){t.each(function(r){var n=r[0].trace,i=n.error_y||{},a=n.error_x||{},o=Byt.select(this);o.selectAll("path.yerror").style("stroke-width",i.thickness+"px").call(Eme.stroke,i.color),a.copy_ystyle&&(a=i),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(Eme.stroke,a.color)})}});var Ime=ye((Ylr,Pme)=>{"use strict";var x4=Pr(),Lme=mc().overrideAll,b4=_V(),u2={error_x:x4.extendFlat({},b4),error_y:x4.extendFlat({},b4)};delete u2.error_x.copy_zstyle;delete u2.error_y.copy_zstyle;delete u2.error_y.copy_ystyle;var w4={error_x:x4.extendFlat({},b4),error_y:x4.extendFlat({},b4),error_z:x4.extendFlat({},b4)};delete w4.error_x.copy_ystyle;delete w4.error_y.copy_ystyle;delete w4.error_z.copy_ystyle;delete w4.error_z.copy_zstyle;Pme.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:u2,bar:u2,histogram:u2,scatter3d:Lme(w4,"calc","nested"),scattergl:Lme(u2,"calc","nested")}},supplyDefaults:yme(),calc:Tme(),makeComputeError:xV(),plot:Mme(),style:Cme(),hoverInfo:Nyt};function Nyt(e,t,r){(t.error_y||{}).visible&&(r.yerr=e.yh-e.y,t.error_y.symmetric||(r.yerrneg=e.y-e.ys)),(t.error_x||{}).visible&&(r.xerr=e.xh-e.x,t.error_x.symmetric||(r.xerrneg=e.x-e.xs))}});var Dme=ye((Klr,Rme)=>{"use strict";Rme.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}});var Ume=ye((Jlr,Nme)=>{"use strict";var P_=qa(),TV=fd(),VI=Mc(),Fme=Oa(),Uy=ho(),UI=yv(),U0=Pr(),Hg=U0.strTranslate,Bme=Ao().extendFlat,AV=Eg(),Gg=So(),SV=ka(),Uyt=zb(),Vyt=Zl(),Gyt=pv().flipScale,Hyt=f4(),jyt=dI(),Wyt=Rd(),MV=Dh(),zme=MV.LINE_SPACING,qme=MV.FROM_TL,Ome=MV.FROM_BR,gf=Dme().cn;function Xyt(e){var t=e._fullLayout,r=t._infolayer.selectAll("g."+gf.colorbar).data(Zyt(e),function(n){return n._id});r.enter().append("g").attr("class",function(n){return n._id}).classed(gf.colorbar,!0),r.each(function(n){var i=P_.select(this);U0.ensureSingle(i,"rect",gf.cbbg),U0.ensureSingle(i,"g",gf.cbfills),U0.ensureSingle(i,"g",gf.cblines),U0.ensureSingle(i,"g",gf.cbaxis,function(o){o.classed(gf.crisp,!0)}),U0.ensureSingle(i,"g",gf.cbtitleunshift,function(o){o.append("g").classed(gf.cbtitle,!0)}),U0.ensureSingle(i,"rect",gf.cboutline);var a=Yyt(i,n,e);a&&a.then&&(e._promises||[]).push(a),e._context.edits.colorbarPosition&&Kyt(i,n,e)}),r.exit().each(function(n){VI.autoMargin(e,n._id)}).remove(),r.order()}function Zyt(e){var t=e._fullLayout,r=e.calcdata,n=[],i,a,o,s;function l(M){return Bme(M,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function u(){typeof s.calc=="function"?s.calc(e,o,i):(i._fillgradient=a.reversescale?Gyt(a.colorscale):a.colorscale,i._zrange=[a[s.min],a[s.max]])}for(var c=0;c1){var Pe=Math.pow(10,Math.floor(Math.log(me)/Math.LN10));De*=Pe*U0.roundUp(me/Pe,[2,5,10]),(Math.abs(z.start)/z.size+1e-6)%1<2e-6&&(Ee.tick0=0)}Ee.dtick=De}Ee.domain=n?[ie+v/T.h,ie+H-v/T.h]:[ie+d/T.w,ie+H-d/T.w],Ee.setScale(),e.attr("transform",Hg(Math.round(T.l),Math.round(T.t)));var ce=e.select("."+gf.cbtitleunshift).attr("transform",Hg(-Math.round(T.l),-Math.round(T.t))),He=Ee.ticklabelposition,lt=Ee.title.font.size,mt=e.select("."+gf.cbaxis),Vt,st=0,ct=0;function Qt(Ue,Ae){var rt={propContainer:Ee,propName:t._propPrefix+"title.text",traceIndex:t._traceIndex,_meta:t._meta,placeholder:M._dfltTitle.colorbar,containerGroup:e.select("."+gf.cbtitle)},St=Ue.charAt(0)==="h"?Ue.slice(1):"h"+Ue;e.selectAll("."+St+",."+St+"-math-group").remove(),Uyt.draw(r,Ue,Bme(rt,Ae||{}))}function Ht(){if(n&&we||!n&&!we){var Ue,Ae;S==="top"&&(Ue=d+T.l+re*m,Ae=v+T.t+oe*(1-ie-H)+3+lt*.75),S==="bottom"&&(Ue=d+T.l+re*m,Ae=v+T.t+oe*(1-ie)-3-lt*.25),S==="right"&&(Ae=v+T.t+oe*b+3+lt*.75,Ue=d+T.l+re*ie),Qt(Ee._id+"title",{attributes:{x:Ue,y:Ae,"text-anchor":n?"start":"middle"}})}}function nr(){if(n&&!we||!n&&we){var Ue=Ee.position||0,Ae=Ee._offset+Ee._length/2,rt,St;if(S==="right")St=Ae,rt=T.l+re*Ue+10+lt*(Ee.showticklabels?1:.5);else if(rt=Ae,S==="bottom"&&(St=T.t+oe*Ue+10+(He.indexOf("inside")===-1?Ee.tickfont.size:0)+(Ee.ticks!=="inside"&&t.ticklen||0)),S==="top"){var Tt=C.text.split("
").length;St=T.t+oe*Ue+10-Z-zme*lt*Tt}Qt((n?"h":"v")+Ee._id+"title",{avoid:{selection:P_.select(r).selectAll("g."+Ee._id+"tick"),side:S,offsetTop:n?0:T.t,offsetLeft:n?T.l:0,maxShift:n?M.width:M.height},attributes:{x:rt,y:St,"text-anchor":"middle"},transform:{rotate:n?-90:0,offset:0}})}}function tt(){if(!n&&!we||n&&we){var Ue=e.select("."+gf.cbtitle),Ae=Ue.select("text"),rt=[-l/2,l/2],St=Ue.select(".h"+Ee._id+"title-math-group").node(),Tt=15.6;Ae.node()&&(Tt=parseInt(Ae.node().style.fontSize,10)*zme);var dt;if(St?(dt=Gg.bBox(St),ct=dt.width,st=dt.height,st>Tt&&(rt[1]-=(st-Tt)/2)):Ae.node()&&!Ae.classed(gf.jsPlaceholder)&&(dt=Gg.bBox(Ae.node()),ct=dt.width,st=dt.height),n){if(st){if(st+=5,S==="top")Ee.domain[1]-=st/T.h,rt[1]*=-1;else{Ee.domain[0]+=st/T.h;var Et=Vyt.lineCount(Ae);rt[1]+=(1-Et)*Tt}Ue.attr("transform",Hg(rt[0],rt[1])),Ee.setScale()}}else ct&&(S==="right"&&(Ee.domain[0]+=(ct+lt/2)/T.w),Ue.attr("transform",Hg(rt[0],rt[1])),Ee.setScale())}e.selectAll("."+gf.cbfills+",."+gf.cblines).attr("transform",n?Hg(0,Math.round(T.h*(1-Ee.domain[1]))):Hg(Math.round(T.w*Ee.domain[0]),0)),mt.attr("transform",n?Hg(0,Math.round(-T.t)):Hg(Math.round(-T.l),0));var pt=e.select("."+gf.cbfills).selectAll("rect."+gf.cbfill).attr("style","").data(U);pt.enter().append("rect").classed(gf.cbfill,!0).attr("style",""),pt.exit().remove();var Xt=g.map(Ee.c2p).map(Math.round).sort(function(qr,jr){return qr-jr});pt.each(function(qr,jr){var gt=[jr===0?g[0]:(U[jr]+U[jr-1])/2,jr===U.length-1?g[1]:(U[jr]+U[jr+1])/2].map(Ee.c2p).map(Math.round);n&&(gt[1]=U0.constrain(gt[1]+(gt[1]>gt[0])?1:-1,Xt[0],Xt[1]));var Ge=P_.select(this).attr(n?"x":"y",_e).attr(n?"y":"x",P_.min(gt)).attr(n?"width":"height",Math.max(Z,2)).attr(n?"height":"width",Math.max(P_.max(gt)-P_.min(gt),2));if(t._fillgradient)Gg.gradient(Ge,r,t._id,n?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var Je=E(qr).replace("e-","");Ge.attr("fill",TV(Je).toHexString())}});var or=e.select("."+gf.cblines).selectAll("path."+gf.cbline).data(x.color&&x.width?G:[]);or.enter().append("path").classed(gf.cbline,!0),or.exit().remove(),or.each(function(qr){var jr=_e,gt=Math.round(Ee.c2p(qr))+x.width/2%1;P_.select(this).attr("d","M"+(n?jr+","+gt:gt+","+jr)+(n?"h":"v")+Z).call(Gg.lineGroupStyle,x.width,P(qr),x.dash)}),mt.selectAll("g."+Ee._id+"tick,path").remove();var _r=_e+Z+(l||0)/2-(t.ticks==="outside"?1:0),Er=Uy.calcTicks(Ee),ei=Uy.getTickSigns(Ee)[2];return Uy.drawTicks(r,Ee,{vals:Ee.ticks==="inside"?Uy.clipEnds(Ee,Er):Er,layer:mt,path:Uy.makeTickPath(Ee,_r,ei),transFn:Uy.makeTransTickFn(Ee)}),Uy.drawLabels(r,Ee,{vals:Er,layer:mt,transFn:Uy.makeTransTickLabelFn(Ee),labelFns:Uy.makeLabelFns(Ee,_r)})}function je(){var Ue,Ae=Z+l/2;He.indexOf("inside")===-1&&(Ue=Gg.bBox(mt.node()),Ae+=n?Ue.width:Ue.height),Vt=ce.select("text");var rt=0,St=n&&S==="top",Tt=!n&&S==="right",dt=0;if(Vt.node()&&!Vt.classed(gf.jsPlaceholder)){var Et,pt=ce.select(".h"+Ee._id+"title-math-group").node();pt&&(n&&we||!n&&!we)?(Ue=Gg.bBox(pt),rt=Ue.width,Et=Ue.height):(Ue=Gg.bBox(ce.node()),rt=Ue.right-T.l-(n?_e:Se),Et=Ue.bottom-T.t-(n?Se:_e),!n&&S==="top"&&(Ae+=Ue.height,dt=Ue.height)),Tt&&(Vt.attr("transform",Hg(rt/2+lt/2,0)),rt*=2),Ae=Math.max(Ae,n?rt:Et)}var Xt=(n?d:v)*2+Ae+u+l/2,or=0;!n&&C.text&&h==="bottom"&&b<=0&&(or=Xt/2,Xt+=or,dt+=or),M._hColorbarMoveTitle=or,M._hColorbarMoveCBTitle=dt;var _r=u+l,Er=(n?_e:Se)-_r/2-(n?d:0),ei=(n?Se:_e)-(n?N:v+dt-or);e.select("."+gf.cbbg).attr("x",Er).attr("y",ei).attr(n?"width":"height",Math.max(Xt-or,2)).attr(n?"height":"width",Math.max(N+_r,2)).call(SV.fill,c).call(SV.stroke,t.bordercolor).style("stroke-width",u);var qr=Tt?Math.max(rt-10,0):0;e.selectAll("."+gf.cboutline).attr("x",(n?_e:Se+d)+qr).attr("y",(n?Se+v-N:_e)+(St?st:0)).attr(n?"width":"height",Math.max(Z,2)).attr(n?"height":"width",Math.max(N-(n?2*v+st:2*d+qr),2)).call(SV.stroke,t.outlinecolor).style({fill:"none","stroke-width":l});var jr=n?ke*Xt:0,gt=n?0:(1-Ce)*Xt-dt;if(jr=k?T.l-jr:-jr,gt=p?T.t-gt:-gt,e.attr("transform",Hg(jr,gt)),!n&&(u||TV(c).getAlpha()&&!TV.equals(M.paper_bgcolor,c))){var Ge=mt.selectAll("text"),Je=Ge[0].length,We=e.select("."+gf.cbbg).node(),et=Gg.bBox(We),xt=Gg.getTranslate(e),At=2;Ge.each(function(mi,un){var Fn=0,An=Je-1;if(un===Fn||un===An){var Hn=Gg.bBox(this),Qn=Gg.getTranslate(this),Vi;if(un===An){var Kn=Hn.right+Qn.x,Jn=et.right+xt.x+Se-u-At+m;Vi=Jn-Kn,Vi>0&&(Vi=0)}else if(un===Fn){var Gt=Hn.left+Qn.x,wt=et.left+xt.x+Se+u+At;Vi=wt-Gt,Vi<0&&(Vi=0)}Vi&&(Je<3?this.setAttribute("transform","translate("+Vi+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Kt={},er=qme[f],Sr=Ome[f],Gr=qme[h],Ir=Ome[h],Yr=Xt-Z;n?(a==="pixels"?(Kt.y=b,Kt.t=N*Gr,Kt.b=N*Ir):(Kt.t=Kt.b=0,Kt.yt=b+i*Gr,Kt.yb=b-i*Ir),s==="pixels"?(Kt.x=m,Kt.l=Xt*er,Kt.r=Xt*Sr):(Kt.l=Yr*er,Kt.r=Yr*Sr,Kt.xl=m-o*er,Kt.xr=m+o*Sr)):(a==="pixels"?(Kt.x=m,Kt.l=N*er,Kt.r=N*Sr):(Kt.l=Kt.r=0,Kt.xl=m+i*er,Kt.xr=m-i*Sr),s==="pixels"?(Kt.y=1-b,Kt.t=Xt*Gr,Kt.b=Xt*Ir):(Kt.t=Yr*Gr,Kt.b=Yr*Ir,Kt.yt=b-o*Gr,Kt.yb=b+o*Ir));var _i=t.y<.5?"b":"t",Pi=t.x<.5?"l":"r";r._fullLayout._reservedMargin[t._id]={};var ai={r:M.width-Er-jr,l:Er+Kt.r,b:M.height-ei-gt,t:ei+Kt.b};k&&p?VI.autoMargin(r,t._id,Kt):k?r._fullLayout._reservedMargin[t._id][_i]=ai[_i]:p||n?r._fullLayout._reservedMargin[t._id][Pi]=ai[Pi]:r._fullLayout._reservedMargin[t._id][_i]=ai[_i]}return U0.syncOrAsync([VI.previousPromises,Ht,tt,nr,VI.previousPromises,je],r)}function Kyt(e,t,r){var n=t.orientation==="v",i=r._fullLayout,a=i._size,o,s,l;UI.init({element:e.node(),gd:r,prepFn:function(){o=e.attr("transform"),AV(e)},moveFn:function(u,c){e.attr("transform",o+Hg(u,c)),s=UI.align((n?t._uFrac:t._vFrac)+u/a.w,n?t._thickFrac:t._lenFrac,0,1,t.xanchor),l=UI.align((n?t._vFrac:1-t._uFrac)-c/a.h,n?t._lenFrac:t._thickFrac,0,1,t.yanchor);var f=UI.getCursor(s,l,t.xanchor,t.yanchor);AV(e,f)},doneFn:function(){if(AV(e),s!==void 0&&l!==void 0){var u={};u[t._propPrefix+"x"]=s,u[t._propPrefix+"y"]=l,t._traceIndex!==void 0?Fme.call("_guiRestyle",r,u,t._traceIndex):Fme.call("_guiRelayout",r,u)}}})}function Jyt(e,t,r){var n=t._levels,i=[],a=[],o,s,l=n.end+n.size/100,u=n.size,c=1.001*r[0]-.001*r[1],f=1.001*r[1]-.001*r[0];for(s=0;s<1e5&&(o=n.start+s*u,!(u>0?o>=l:o<=l));s++)o>c&&o0?o>=l:o<=l));s++)o>r[0]&&o{"use strict";Vme.exports={moduleType:"component",name:"colorbar",attributes:uL(),supplyDefaults:FO(),draw:Ume().draw,hasColorbar:kO()}});var jme=ye((Qlr,Hme)=>{"use strict";Hme.exports={moduleType:"component",name:"legend",layoutAttributes:CB(),supplyLayoutDefaults:PB(),draw:HB(),style:NB()}});var Xme=ye((eur,Wme)=>{"use strict";Wme.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}});var Yme=ye((tur,Zme)=>{"use strict";Zme.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}});var kV=ye((rur,Qme)=>{"use strict";var Qyt=Oa(),$me=Pr(),EV=$me.extendFlat,Kme=$me.extendDeep;function Jme(e){var t;switch(e){case"themes__thumb":t={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":t={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:t={}}return t}function e1t(e){var t=["xaxis","yaxis","zaxis"];return t.indexOf(e.slice(0,5))>-1}Qme.exports=function(t,r){var n,i=t.data,a=t.layout,o=Kme([],i),s=Kme({},a,Jme(r.tileClass)),l=t._context||{};if(r.width&&(s.width=r.width),r.height&&(s.height=r.height),r.tileClass==="thumbnail"||r.tileClass==="themes__thumb"){s.annotations=[];var u=Object.keys(s);for(n=0;n{"use strict";var t1t=Ab().EventEmitter,r1t=Oa(),i1t=Pr(),eye=qy(),n1t=kV(),a1t=YP(),o1t=KP();function s1t(e,t){var r=new t1t,n=n1t(e,{format:"png"}),i=n.gd;i.style.position="absolute",i.style.left="-5000px",document.body.appendChild(i);function a(){var s=eye.getDelay(i._fullLayout);setTimeout(function(){var l=a1t(i),u=document.createElement("canvas");u.id=i1t.randstr(),r=o1t({format:t.format,width:i._fullLayout.width,height:i._fullLayout.height,canvas:u,emitter:r,svg:l}),r.clean=function(){i&&document.body.removeChild(i)}},s)}var o=eye.getRedrawFunc(i);return r1t.call("_doPlot",i,n.data,n.layout,n.config).then(o).then(a).catch(function(s){r.emit("error",s)}),r}tye.exports=s1t});var aye=ye((nur,nye)=>{"use strict";var iye=qy(),l1t={getDelay:iye.getDelay,getRedrawFunc:iye.getRedrawFunc,clone:kV(),toSVG:YP(),svgToImg:KP(),toImage:rye(),downloadImage:sU()};nye.exports=l1t});var sye=ye(Vy=>{"use strict";Vy.version=g6().version;bee();une();var u1t=Oa(),T4=Vy.register=u1t.register,LV=Ede(),oye=Object.keys(LV);for(GI=0;GI{"use strict";lye.exports=sye()});var zm=ye((sur,vye)=>{"use strict";var Bf=pf(),cye=df().axisHoverFormat,{hovertemplateAttrs:c1t,texttemplateAttrs:f1t,templatefallbackAttrs:fye}=Ll(),dye=Tu(),h1t=ec(),hye=A_(),d1t=Pd().pattern,c2=Ao().extendFlat,PV=h1t({editType:"calc",arrayOk:!0,colorEditType:"style"}),v1t=Bf.marker,p1t=v1t.line,g1t=c2({},p1t.width,{dflt:0}),m1t=c2({width:g1t,editType:"calc"},dye("marker.line")),y1t=c2({line:m1t,editType:"calc"},dye("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:d1t,cornerradius:{valType:"any",editType:"calc"}});vye.exports={x:Bf.x,x0:Bf.x0,dx:Bf.dx,y:Bf.y,y0:Bf.y0,dy:Bf.dy,xperiod:Bf.xperiod,yperiod:Bf.yperiod,xperiod0:Bf.xperiod0,yperiod0:Bf.yperiod0,xperiodalignment:Bf.xperiodalignment,yperiodalignment:Bf.yperiodalignment,xhoverformat:cye("x"),yhoverformat:cye("y"),text:Bf.text,texttemplate:f1t({editType:"plot"},{keys:hye.eventDataKeys}),texttemplatefallback:fye({editType:"plot"}),hovertext:Bf.hovertext,hovertemplate:c1t({},{keys:hye.eventDataKeys}),hovertemplatefallback:fye(),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:c2({},PV,{}),insidetextfont:c2({},PV,{}),outsidetextfont:c2({},PV,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:c2({},Bf.cliponaxis,{}),orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},base:{valType:"any",dflt:null,arrayOk:!0,editType:"calc"},offset:{valType:"number",dflt:null,arrayOk:!0,editType:"calc"},width:{valType:"number",dflt:null,min:0,arrayOk:!0,editType:"calc"},marker:y1t,offsetgroup:Bf.offsetgroup,alignmentgroup:Bf.alignmentgroup,selected:{marker:{opacity:Bf.selected.marker.opacity,color:Bf.selected.marker.color,editType:"style"},textfont:Bf.selected.textfont,editType:"style"},unselected:{marker:{opacity:Bf.unselected.marker.opacity,color:Bf.unselected.marker.color,editType:"style"},textfont:Bf.unselected.textfont,editType:"style"},zorder:Bf.zorder}});var jI=ye((lur,pye)=>{"use strict";pye.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},barcornerradius:{valType:"any",editType:"calc"}}});var WI=ye((uur,yye)=>{"use strict";var _1t=ka(),gye=pv().hasColorscale,mye=td(),x1t=Pr().coercePattern;yye.exports=function(t,r,n,i,a){var o=n("marker.color",i),s=gye(t,"marker");s&&mye(t,r,a,n,{prefix:"marker.",cLetter:"c"}),n("marker.line.color",_1t.defaultLine),gye(t,"marker.line")&&mye(t,r,a,n,{prefix:"marker.line.",cLetter:"c"}),n("marker.line.width"),n("marker.opacity"),x1t(n,"marker.pattern",o,s),n("selected.marker.color"),n("unselected.marker.color")}});var i0=ye((cur,Aye)=>{"use strict";var _ye=Eo(),CT=Pr(),xye=ka(),b1t=Oa(),w1t=sT(),T1t=Dg(),A1t=WI(),S1t=e2(),bye=zm(),XI=CT.coerceFont;function M1t(e,t,r,n){function i(u,c){return CT.coerce(e,t,bye,u,c)}var a=w1t(e,t,n,i);if(!a){t.visible=!1;return}T1t(e,t,n,i),i("xhoverformat"),i("yhoverformat"),i("zorder"),i("orientation",t.x&&!t.y?"h":"v"),i("base"),i("offset"),i("width"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var o=i("textposition");Tye(e,t,n,i,o,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),A1t(e,t,i,r,n);var s=(t.marker.line||{}).color,l=b1t.getComponentMethod("errorbars","supplyDefaults");l(e,t,s||xye.defaultLine,{axis:"y"}),l(e,t,s||xye.defaultLine,{axis:"x",inherit:"y"}),CT.coerceSelectionMarkerOpacity(t,i)}function E1t(e,t){var r,n;function i(s,l){return CT.coerce(n._input,n,bye,s,l)}for(var a=0;a=0)return e}else if(typeof e=="string"&&(e=e.trim(),e.slice(-1)==="%"&&_ye(e.slice(0,-1))&&(e=+e.slice(0,-1),e>=0)))return e+"%"}function Tye(e,t,r,n,i,a){a=a||{};var o=a.moduleHasSelected!==!1,s=a.moduleHasUnselected!==!1,l=a.moduleHasConstrain!==!1,u=a.moduleHasCliponaxis!==!1,c=a.moduleHasTextangle!==!1,f=a.moduleHasInsideanchor!==!1,h=!!a.hasPathbar,d=Array.isArray(i)||i==="auto",v=d||i==="inside",m=d||i==="outside";if(v||m){var b=XI(n,"textfont",r.font),p=CT.extendFlat({},b),k=e.textfont&&e.textfont.color,M=!k;if(M&&delete p.color,XI(n,"insidetextfont",p),h){var T=CT.extendFlat({},b);M&&delete T.color,XI(n,"pathbar.textfont",T)}m&&XI(n,"outsidetextfont",b),o&&n("selected.textfont.color"),s&&n("unselected.textfont.color"),l&&n("constraintext"),u&&n("cliponaxis"),c&&n("textangle"),n("texttemplate"),n("texttemplatefallback")}v&&f&&n("insidetextanchor")}Aye.exports={supplyDefaults:M1t,crossTraceDefaults:E1t,handleText:Tye,validateCornerradius:wye}});var IV=ye((fur,Sye)=>{"use strict";var k1t=Oa(),C1t=ho(),L1t=Pr(),P1t=jI(),I1t=i0().validateCornerradius;Sye.exports=function(e,t,r){function n(m,b){return L1t.coerce(e,t,P1t,m,b)}for(var i=!1,a=!1,o=!1,s={},l=n("barmode"),u=l==="group",c=0;c0&&!s[h]&&(o=!0),s[h]=!0),f.visible&&f.type==="histogram"){var d=C1t.getFromId({_fullLayout:t},f[f.orientation==="v"?"xaxis":"yaxis"]);d.type!=="category"&&(a=!0)}}if(!i){delete t.barmode;return}l!=="overlay"&&n("barnorm"),n("bargap",a&&!o?0:.2),n("bargroupgap");var v=n("barcornerradius");t.barcornerradius=I1t(v)}});var A4=ye((hur,Mye)=>{"use strict";var LT=Pr();Mye.exports=function(t,r){for(var n=0;n{"use strict";var Eye=ho(),kye=zg(),Cye=pv().hasColorscale,Lye=gv(),R1t=A4(),D1t=q0();Pye.exports=function(t,r){var n=Eye.getFromId(t,r.xaxis||"x"),i=Eye.getFromId(t,r.yaxis||"y"),a,o,s,l,u,c,f={msUTC:!!(r.base||r.base===0)};r.orientation==="h"?(a=n.makeCalcdata(r,"x",f),s=i.makeCalcdata(r,"y"),l=kye(r,i,"y",s),u=!!r.yperiodalignment,c="y"):(a=i.makeCalcdata(r,"y",f),s=n.makeCalcdata(r,"x"),l=kye(r,n,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;for(var h=Math.min(o.length,a.length),d=new Array(h),v=0;v{"use strict";var F1t=qa(),z1t=Pr();function q1t(e,t,r){var n=e._fullLayout,i=n["_"+r+"Text_minsize"];if(i){var a=n.uniformtext.mode==="hide",o;switch(r){case"funnelarea":case"pie":case"sunburst":o="g.slice";break;case"treemap":case"icicle":o="g.slice, g.pathbar";break;default:o="g.points > g.point"}t.selectAll(o).each(function(s){var l=s.transform;if(l){l.scale=a&&l.hide?0:i/l.fontSize;var u=F1t.select(this).select("text");z1t.setTransormAndDisplay(u,l)}})}}function O1t(e,t,r){if(r.uniformtext.mode){var n=Rye(e),i=r.uniformtext.minsize,a=t.scale*t.fontSize;t.hide=a{"use strict";var N1t=Eo(),U1t=fd(),Fye=Pr().isArrayOrTypedArray;f2.coerceString=function(e,t,r){if(typeof t=="string"){if(t||!e.noBlank)return t}else if((typeof t=="number"||t===!0)&&!e.strict)return String(t);return r!==void 0?r:e.dflt};f2.coerceNumber=function(e,t,r){if(N1t(t)){t=+t;var n=e.min,i=e.max,a=n!==void 0&&ti;if(!a)return t}return r!==void 0?r:e.dflt};f2.coerceColor=function(e,t,r){return U1t(t).isValid()?t:r!==void 0?r:e.dflt};f2.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),e.values.indexOf(t)!==-1?t:r!==void 0?r:e.dflt};f2.getValue=function(e,t){var r;return Fye(e)?t{"use strict";var S4=qa(),V1t=ka(),M4=So(),zye=Pr(),qye=Oa(),Oye=bv().resizeText,RV=zm(),G1t=RV.textfont,H1t=RV.insidetextfont,j1t=RV.outsidetextfont,Qd=ZI();function W1t(e){var t=S4.select(e).selectAll('g[class^="barlayer"]').selectAll("g.trace");Oye(e,t,"bar");var r=t.size(),n=e._fullLayout;t.style("opacity",function(i){return i[0].trace.opacity}).each(function(i){(n.barmode==="stack"&&r>1||n.bargap===0&&n.bargroupgap===0&&!i[0].trace.marker.line.width)&&S4.select(this).attr("shape-rendering","crispEdges")}),t.selectAll("g.points").each(function(i){var a=S4.select(this),o=i[0].trace;Bye(a,o,e)}),qye.getComponentMethod("errorbars","style")(t)}function Bye(e,t,r){M4.pointStyle(e.selectAll("path"),t,r),Nye(e,t,r)}function Nye(e,t,r){e.selectAll("text").each(function(n){var i=S4.select(this),a=zye.ensureUniformFontSize(r,Uye(i,n,t,r));M4.font(i,a)})}function X1t(e,t,r){var n=t[0].trace;n.selectedpoints?Z1t(r,n,e):(Bye(r,n,e),qye.getComponentMethod("errorbars","style")(r))}function Z1t(e,t,r){M4.selectedPointStyle(e.selectAll("path"),t),Y1t(e.selectAll("text"),t,r)}function Y1t(e,t,r){e.each(function(n){var i=S4.select(this),a;if(n.selected){a=zye.ensureUniformFontSize(r,Uye(i,n,t,r));var o=t.selected.textfont&&t.selected.textfont.color;o&&(a.color=o),M4.font(i,a)}else M4.selectedTextStyle(i,t)})}function Uye(e,t,r,n){var i=n._fullLayout.font,a=r.textfont;if(e.classed("bartext-inside")){var o=jye(t,r);a=Gye(r,t.i,i,o)}else e.classed("bartext-outside")&&(a=Hye(r,t.i,i));return a}function Vye(e,t,r){return DV(G1t,e.textfont,t,r)}function Gye(e,t,r,n){var i=Vye(e,t,r),a=e._input.textfont===void 0||e._input.textfont.color===void 0||Array.isArray(e.textfont.color)&&e.textfont.color[t]===void 0;return a&&(i={color:V1t.contrast(n),family:i.family,size:i.size,weight:i.weight,style:i.style,variant:i.variant,textcase:i.textcase,lineposition:i.lineposition,shadow:i.shadow}),DV(H1t,e.insidetextfont,t,i)}function Hye(e,t,r){var n=Vye(e,t,r);return DV(j1t,e.outsidetextfont,t,n)}function DV(e,t,r,n){t=t||{};var i=Qd.getValue(t.family,r),a=Qd.getValue(t.size,r),o=Qd.getValue(t.color,r),s=Qd.getValue(t.weight,r),l=Qd.getValue(t.style,r),u=Qd.getValue(t.variant,r),c=Qd.getValue(t.textcase,r),f=Qd.getValue(t.lineposition,r),h=Qd.getValue(t.shadow,r);return{family:Qd.coerceString(e.family,i,n.family),size:Qd.coerceNumber(e.size,a,n.size),color:Qd.coerceColor(e.color,o,n.color),weight:Qd.coerceString(e.weight,s,n.weight),style:Qd.coerceString(e.style,l,n.style),variant:Qd.coerceString(e.variant,u,n.variant),textcase:Qd.coerceString(e.variant,c,n.textcase),lineposition:Qd.coerceString(e.variant,f,n.lineposition),shadow:Qd.coerceString(e.variant,h,n.shadow)}}function jye(e,t){return t.type==="waterfall"?t[e.dir].marker.color:e.mcc||e.mc||t.marker.color}Wye.exports={style:W1t,styleTextPoints:Nye,styleOnSelect:X1t,getInsideTextFont:Gye,getOutsideTextFont:Hye,getBarColor:jye,resizeText:Oye}});var d2=ye((mur,e1e)=>{"use strict";var YI=qa(),KI=Eo(),Dd=Pr(),K1t=Zl(),J1t=ka(),I_=So(),$1t=Oa(),JI=ho().tickText,Xye=bv(),Q1t=Xye.recordMinTextSize,e_t=Xye.clearMinTextSize,FV=V0(),PT=ZI(),t_t=A_(),Zye=zm(),r_t=Zye.text,i_t=Zye.textposition,n_t=ip().appendArrayPointValue,Gv=t_t.TEXTPAD;function a_t(e){return e.id}function o_t(e){if(e.ids)return a_t}function zV(e){return(e>0)-(e<0)}function qm(e,t){return e0}function l_t(e,t,r,n,i,a){var o=t.xaxis,s=t.yaxis,l=e._fullLayout,u=e._context.staticPlot;i||(i={mode:l.barmode,norm:l.barmode,gap:l.bargap,groupgap:l.bargroupgap},e_t("bar",l));var c=Dd.makeTraceGroups(n,r,"trace bars").each(function(f){var h=YI.select(this),d=f[0].trace,v=f[0].t,m=d.type==="waterfall",b=d.type==="funnel",p=d.type==="histogram",k=d.type==="bar",M=k||b,T=0;m&&d.connector.visible&&d.connector.mode==="between"&&(T=d.connector.line.width/2);var L=d.orientation==="h",x=Kye(i),C=Dd.ensureSingle(h,"g","points"),S=o_t(d),g=C.selectAll("g.point").data(Dd.identity,S);g.enter().append("g").classed("point",!0),g.exit().remove(),g.each(function(E,z){var q=YI.select(this),U=s_t(E,o,s,L),G=U[0][0],Z=U[0][1],j=U[1][0],N=U[1][1],H=(L?Z-G:N-j)===0;H&&M&&PT.getLineWidth(d,E)&&(H=!1),H||(H=!KI(G)||!KI(Z)||!KI(j)||!KI(N)),E.isBlank=H,H&&(L?Z=G:N=j),T&&!H&&(L?(G-=qm(G,Z)*T,Z+=qm(G,Z)*T):(j-=qm(j,N)*T,N+=qm(j,N)*T));var re,oe;if(d.type==="waterfall"){if(!H){var _e=d[E.dir].marker;re=_e.line.width,oe=_e.color}}else re=PT.getLineWidth(d,E),oe=E.mc||d.marker.color;function ke(Ae){var rt=YI.round(re/2%1,2);return i.gap===0&&i.groupgap===0?YI.round(Math.round(Ae)-rt,2):Ae}function Ce(Ae,rt,St){return St&&Ae===rt?Ae:Math.abs(Ae-rt)>=2?ke(Ae):Ae>rt?Math.ceil(Ae):Math.floor(Ae)}var ge=J1t.opacity(oe),ie=ge<1||re>.01?ke:Ce;e._context.staticPlot||(G=ie(G,Z,L),Z=ie(Z,G,L),j=ie(j,N,!L),N=ie(N,j,!L));var Se=L?o.c2p:s.c2p,Ee;E.s0>0?Ee=E._sMax:E.s0<0?Ee=E._sMin:Ee=E.s1>0?E._sMax:E._sMin;function we(Ae,rt){if(!Ae)return 0;var St=Math.abs(L?N-j:Z-G),Tt=Math.abs(L?Z-G:N-j),dt=ie(Math.abs(Se(Ee,!0)-Se(0,!0))),Et=E.hasB?Math.min(St/2,Tt/2):Math.min(St/2,dt),pt;if(rt==="%"){var Xt=Math.min(50,Ae);pt=St*(Xt/100)}else pt=Ae;return ie(Math.max(Math.min(pt,Et),0))}var De=k||p?we(v.cornerradiusvalue,v.cornerradiusform):0,Le,me,Pe="M"+G+","+j+"V"+N+"H"+Z+"V"+j+"Z",ce=0;if(De&&E.s){var He=zV(E.s0)===0||zV(E.s)===zV(E.s0)?E.s1:E.s0;if(ce=ie(E.hasB?0:Math.abs(Se(Ee,!0)-Se(He,!0))),ce0?Math.sqrt(ce*(2*De-ce)):0,Qt=lt>0?Math.max:Math.min;Le="M"+G+","+j+"V"+(N-st*mt)+"H"+Qt(Z-(De-ce)*lt,G)+"A "+De+","+De+" 0 0 "+Vt+" "+Z+","+(N-De*mt-ct)+"V"+(j+De*mt+ct)+"A "+De+","+De+" 0 0 "+Vt+" "+Qt(Z-(De-ce)*lt,G)+","+(j+st*mt)+"Z"}else if(E.hasB)Le="M"+(G+De*lt)+","+j+"A "+De+","+De+" 0 0 "+Vt+" "+G+","+(j+De*mt)+"V"+(N-De*mt)+"A "+De+","+De+" 0 0 "+Vt+" "+(G+De*lt)+","+N+"H"+(Z-De*lt)+"A "+De+","+De+" 0 0 "+Vt+" "+Z+","+(N-De*mt)+"V"+(j+De*mt)+"A "+De+","+De+" 0 0 "+Vt+" "+(Z-De*lt)+","+j+"Z";else{me=Math.abs(N-j)+ce;var Ht=me0?Math.sqrt(ce*(2*De-ce)):0,tt=mt>0?Math.max:Math.min;Le="M"+(G+Ht*lt)+","+j+"V"+tt(N-(De-ce)*mt,j)+"A "+De+","+De+" 0 0 "+Vt+" "+(G+De*lt-nr)+","+N+"H"+(Z-De*lt+nr)+"A "+De+","+De+" 0 0 "+Vt+" "+(Z-Ht*lt)+","+tt(N-(De-ce)*mt,j)+"V"+j+"Z"}}else Le=Pe}else Le=Pe;var je=Yye(Dd.ensureSingle(q,"path"),l,i,a);if(je.style("vector-effect",u?"none":"non-scaling-stroke").attr("d",isNaN((Z-G)*(N-j))||H&&e._context.staticPlot?"M0,0Z":Le).call(I_.setClipUrl,t.layerClipId,e),!l.uniformtext.mode&&x){var Ue=I_.makePointStyleFns(d);I_.singlePointStyle(E,je,d,Ue,e)}u_t(e,t,q,f,z,G,Z,j,N,De,ce,i,a),t.layerClipId&&I_.hideOutsideRangePoint(E,q.select("text"),o,s,d.xcalendar,d.ycalendar)});var P=d.cliponaxis===!1;I_.setClipUrl(h,P?null:t.layerClipId,e)});$1t.getComponentMethod("errorbars","plot")(e,c,t,i)}function u_t(e,t,r,n,i,a,o,s,l,u,c,f,h){var d=t.xaxis,v=t.yaxis,m=e._fullLayout,b;function p(me,Pe,ce){var He=Dd.ensureSingle(me,"text").text(Pe).attr({class:"bartext bartext-"+b,"text-anchor":"middle","data-notex":1}).call(I_.font,ce).call(K1t.convertToTspans,e);return He}var k=n[0].trace,M=k.orientation==="h",T=h_t(m,n,i,d,v);b=d_t(k,i);var L=f.mode==="stack"||f.mode==="relative",x=n[i],C=!L||x._outmost,S=x.hasB,g=u&&u-c>Gv;if(!T||b==="none"||(x.isBlank||a===o||s===l)&&(b==="auto"||b==="inside")){r.select("text").remove();return}var P=m.font,E=FV.getBarColor(n[i],k),z=FV.getInsideTextFont(k,i,P,E),q=FV.getOutsideTextFont(k,i,P),U=k.insidetextanchor||"end",G=r.datum();M?d.type==="log"&&G.s0<=0&&(d.range[0]0&&ke>0,ie;g?S?ie=h2(N-2*u,H,_e,ke,M)||h2(N,H-2*u,_e,ke,M):M?ie=h2(N-(u-c),H,_e,ke,M)||h2(N,H-2*(u-c),_e,ke,M):ie=h2(N,H-(u-c),_e,ke,M)||h2(N-2*(u-c),H,_e,ke,M):ie=h2(N,H,_e,ke,M),ge&&ie?b="inside":(b="outside",re.remove(),re=null)}else b="inside";if(!re){Ce=Dd.ensureUniformFontSize(e,b==="outside"?q:z),re=p(r,T,Ce);var Se=re.attr("transform");if(re.attr("transform",""),oe=I_.bBox(re.node()),_e=oe.width,ke=oe.height,re.attr("transform",Se),_e<=0||ke<=0){re.remove();return}}var Ee=k.textangle,we,De;b==="outside"?(De=k.constraintext==="both"||k.constraintext==="outside",we=f_t(a,o,s,l,oe,{isHorizontal:M,constrained:De,angle:Ee})):(De=k.constraintext==="both"||k.constraintext==="inside",we=Qye(a,o,s,l,oe,{isHorizontal:M,constrained:De,angle:Ee,anchor:U,hasB:S,r:u,overhead:c})),we.fontSize=Ce.size,Q1t(k.type==="histogram"?"bar":k.type,we,m),x.transform=we;var Le=Yye(re,m,f,h);Dd.setTransormAndDisplay(Le,we)}function h2(e,t,r,n,i){if(e<0||t<0)return!1;var a=r<=e&&n<=t,o=r<=t&&n<=e,s=i?e>=r*(t/n):t>=n*(e/r);return a||o||s}function Jye(e){return e==="auto"?0:e}function $ye(e,t){var r=Math.PI/180*t,n=Math.abs(Math.sin(r)),i=Math.abs(Math.cos(r));return{x:e.width*i+e.height*n,y:e.width*n+e.height*i}}function Qye(e,t,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,u=a.anchor,c=u==="end",f=u==="start",h=a.leftToRight||0,d=(h+1)/2,v=1-d,m=a.hasB,b=a.r,p=a.overhead,k=i.width,M=i.height,T=Math.abs(t-e),L=Math.abs(n-r),x=T>2*Gv&&L>2*Gv?Gv:0;T-=2*x,L-=2*x;var C=Jye(l);l==="auto"&&!(k<=T&&M<=L)&&(k>T||M>L)&&(!(k>L||M>T)||kGv){var E=c_t(e,t,r,n,S,b,p,o,m);g=E.scale,P=E.pad}else g=1,s&&(g=Math.min(1,T/S.x,L/S.y)),P=0;var z=i.left*v+i.right*d,q=(i.top+i.bottom)/2,U=(e+Gv)*v+(t-Gv)*d,G=(r+n)/2,Z=0,j=0;if(f||c){var N=(o?S.x:S.y)/2;b&&(c||m)&&(x+=P);var H=o?qm(e,t):qm(r,n);o?f?(U=e+H*x,Z=-H*N):(U=t-H*x,Z=H*N):f?(G=r+H*x,j=-H*N):(G=n-H*x,j=H*N)}return{textX:z,textY:q,targetX:U,targetY:G,anchorX:Z,anchorY:j,scale:g,rotate:C}}function c_t(e,t,r,n,i,a,o,s,l){var u=Math.max(0,Math.abs(t-e)-2*Gv),c=Math.max(0,Math.abs(n-r)-2*Gv),f=a-Gv,h=o?f-Math.sqrt(f*f-(f-o)*(f-o)):f,d=l?f*2:s?f-o:2*h,v=l?f*2:s?2*h:f-o,m,b,p,k,M;return i.y/i.x>=c/(u-d)?k=c/i.y:i.y/i.x<=(c-v)/u?k=u/i.x:!l&&s?(m=i.x*i.x+i.y*i.y/4,b=-2*i.x*(u-f)-i.y*(c/2-f),p=(u-f)*(u-f)+(c/2-f)*(c/2-f)-f*f,k=(-b+Math.sqrt(b*b-4*m*p))/(2*m)):l?(m=(i.x*i.x+i.y*i.y)/4,b=-i.x*(u/2-f)-i.y*(c/2-f),p=(u/2-f)*(u/2-f)+(c/2-f)*(c/2-f)-f*f,k=(-b+Math.sqrt(b*b-4*m*p))/(2*m)):(m=i.x*i.x/4+i.y*i.y,b=-i.x*(u/2-f)-2*i.y*(c-f),p=(u/2-f)*(u/2-f)+(c-f)*(c-f)-f*f,k=(-b+Math.sqrt(b*b-4*m*p))/(2*m)),k=Math.min(1,k),s?M=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(c-i.y*k)/2)*(f-(c-i.y*k)/2)))-o):M=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(u-i.x*k)/2)*(f-(u-i.x*k)/2)))-o),{scale:k,pad:M}}function f_t(e,t,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,u=i.width,c=i.height,f=Math.abs(t-e),h=Math.abs(n-r),d;o?d=h>2*Gv?Gv:0:d=f>2*Gv?Gv:0;var v=1;s&&(v=o?Math.min(1,h/c):Math.min(1,f/u));var m=Jye(l),b=$ye(i,m),p=(o?b.x:b.y)/2,k=(i.left+i.right)/2,M=(i.top+i.bottom)/2,T=(e+t)/2,L=(r+n)/2,x=0,C=0,S=o?qm(t,e):qm(r,n);return o?(T=t-S*d,x=S*p):(L=n+S*d,C=-S*p),{textX:k,textY:M,targetX:T,targetY:L,anchorX:x,anchorY:C,scale:v,rotate:m}}function h_t(e,t,r,n,i){var a=t[0].trace,o=a.texttemplate,s;return o?s=v_t(e,t,r,n,i):a.textinfo?s=p_t(t,r,n,i):s=PT.getValue(a.text,r),PT.coerceString(r_t,s)}function d_t(e,t){var r=PT.getValue(e.textposition,t);return PT.coerceEnumerated(i_t,r)}function v_t(e,t,r,n,i){var a=t[0].trace,o=Dd.castOption(a,r,"texttemplate");if(!o)return"";var s=a.type==="histogram",l=a.type==="waterfall",u=a.type==="funnel",c=a.orientation==="h",f,h,d,v;c?(f="y",h=i,d="x",v=n):(f="x",h=n,d="y",v=i);function m(x){return JI(h,h.c2l(x),!0).text}function b(x){return JI(v,v.c2l(x),!0).text}var p=t[r],k={};k.label=p.p,k.labelLabel=k[f+"Label"]=m(p.p);var M=Dd.castOption(a,p.i,"text");(M===0||M)&&(k.text=M),k.value=p.s,k.valueLabel=k[d+"Label"]=b(p.s);var T={};n_t(T,a,p.i),(s||T.x===void 0)&&(T.x=c?k.value:k.label),(s||T.y===void 0)&&(T.y=c?k.label:k.value),(s||T.xLabel===void 0)&&(T.xLabel=c?k.valueLabel:k.labelLabel),(s||T.yLabel===void 0)&&(T.yLabel=c?k.labelLabel:k.valueLabel),l&&(k.delta=+p.rawS||p.s,k.deltaLabel=b(k.delta),k.final=p.v,k.finalLabel=b(k.final),k.initial=k.final-k.delta,k.initialLabel=b(k.initial)),u&&(k.value=p.s,k.valueLabel=b(k.value),k.percentInitial=p.begR,k.percentInitialLabel=Dd.formatPercent(p.begR),k.percentPrevious=p.difR,k.percentPreviousLabel=Dd.formatPercent(p.difR),k.percentTotal=p.sumR,k.percenTotalLabel=Dd.formatPercent(p.sumR));var L=Dd.castOption(a,p.i,"customdata");return L&&(k.customdata=L),Dd.texttemplateString({data:[T,k,a._meta],fallback:a.texttemplatefallback,labels:k,locale:e._d3locale,template:o})}function p_t(e,t,r,n){var i=e[0].trace,a=i.orientation==="h",o=i.type==="waterfall",s=i.type==="funnel";function l(L){var x=a?n:r;return JI(x,L,!0).text}function u(L){var x=a?r:n;return JI(x,+L,!0).text}var c=i.textinfo,f=e[t],h=c.split("+"),d=[],v,m=function(L){return h.indexOf(L)!==-1};if(m("label")&&d.push(l(e[t].p)),m("text")&&(v=Dd.castOption(i,f.i,"text"),(v===0||v)&&d.push(v)),o){var b=+f.rawS||f.s,p=f.v,k=p-b;m("initial")&&d.push(u(k)),m("delta")&&d.push(u(b)),m("final")&&d.push(u(p))}if(s){m("value")&&d.push(u(f.s));var M=0;m("percent initial")&&M++,m("percent previous")&&M++,m("percent total")&&M++;var T=M>1;m("percent initial")&&(v=Dd.formatPercent(f.begR),T&&(v+=" of initial"),d.push(v)),m("percent previous")&&(v=Dd.formatPercent(f.difR),T&&(v+=" of previous"),d.push(v)),m("percent total")&&(v=Dd.formatPercent(f.sumR),T&&(v+=" of total"),d.push(v))}return d.join("
")}e1e.exports={plot:l_t,toMoveInsideBar:Qye}});var IT=ye((yur,n1e)=>{"use strict";var E4=vf(),g_t=Oa(),t1e=ka(),m_t=Pr().fillText,y_t=ZI().getLineWidth,qV=ho().hoverLabelText,__t=fs().BADNUM;function x_t(e,t,r,n,i){var a=r1e(e,t,r,n,i);if(a){var o=a.cd,s=o[0].trace,l=o[a.index];return a.color=i1e(s,l),g_t.getComponentMethod("errorbars","hoverInfo")(l,s,a),[a]}}function r1e(e,t,r,n,i){var a=e.cd,o=a[0].trace,s=a[0].t,l=n==="closest",u=o.type==="waterfall",c=e.maxHoverDistance,f=e.maxSpikeDistance,h,d,v,m,b,p,k;o.orientation==="h"?(h=r,d=t,v="y",m="x",b=G,p=z):(h=t,d=r,v="x",m="y",p=G,b=z);var M=o[v+"period"],T=l||M;function L(ie){return C(ie,-1)}function x(ie){return C(ie,1)}function C(ie,Se){var Ee=ie.w;return ie[v]+Se*Ee/2}function S(ie){return ie[v+"End"]-ie[v+"Start"]}var g=l?L:M?function(ie){return ie.p-S(ie)/2}:function(ie){return Math.min(L(ie),ie.p-s.bardelta/2)},P=l?x:M?function(ie){return ie.p+S(ie)/2}:function(ie){return Math.max(x(ie),ie.p+s.bardelta/2)};function E(ie,Se,Ee){return i.finiteRange&&(Ee=0),E4.inbox(ie-h,Se-h,Ee+Math.min(1,Math.abs(Se-ie)/k)-1)}function z(ie){return E(g(ie),P(ie),c)}function q(ie){return E(L(ie),x(ie),f)}function U(ie){var Se=ie[m];if(u){var Ee=Math.abs(ie.rawS)||0;d>0?Se+=Ee:d<0&&(Se-=Ee)}return Se}function G(ie){var Se=d,Ee=ie.b,we=U(ie);return E4.inbox(Ee-Se,we-Se,c+(we-Se)/(we-Ee)-1)}function Z(ie){var Se=d,Ee=ie.b,we=U(ie);return E4.inbox(Ee-Se,we-Se,f+(we-Se)/(we-Ee)-1)}var j=e[v+"a"],N=e[m+"a"];k=Math.abs(j.r2c(j.range[1])-j.r2c(j.range[0]));function H(ie){return(b(ie)+p(ie))/2}var re=E4.getDistanceFunction(n,b,p,H);if(E4.getClosest(a,re,e),e.index!==!1&&a[e.index].p!==__t){T||(g=function(ie){return Math.min(L(ie),ie.p-s.bargroupwidth/2)},P=function(ie){return Math.max(x(ie),ie.p+s.bargroupwidth/2)});var oe=e.index,_e=a[oe],ke=o.base?_e.b+_e.s:_e.s;e[m+"0"]=e[m+"1"]=N.c2p(_e[m],!0),e[m+"LabelVal"]=ke;var Ce=s.extents[s.extents.round(_e.p)];e[v+"0"]=j.c2p(l?g(_e):Ce[0],!0),e[v+"1"]=j.c2p(l?P(_e):Ce[1],!0);var ge=_e.orig_p!==void 0;return e[v+"LabelVal"]=ge?_e.orig_p:_e.p,e.labelLabel=qV(j,e[v+"LabelVal"],o[v+"hoverformat"]),e.valueLabel=qV(N,e[m+"LabelVal"],o[m+"hoverformat"]),e.baseLabel=qV(N,_e.b,o[m+"hoverformat"]),e.spikeDistance=(Z(_e)+q(_e))/2,e[v+"Spike"]=j.c2p(_e.p,!0),m_t(_e,o,e),e.hovertemplate=o.hovertemplate,e}}function i1e(e,t){var r=t.mcc||e.marker.color,n=t.mlcc||e.marker.line.color,i=y_t(e,t);if(t1e.opacity(r))return r;if(t1e.opacity(n)&&i)return n}n1e.exports={hoverPoints:x_t,hoverOnBars:r1e,getTraceColor:i1e}});var o1e=ye((_ur,a1e)=>{"use strict";a1e.exports=function(t,r,n){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),n.orientation==="h"?(t.label=t.y,t.value=t.x):(t.label=t.x,t.value=t.y),t}});var RT=ye((xur,s1e)=>{"use strict";s1e.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=n[0].trace,s=o.type==="funnel",l=o.orientation==="h",u=[],c;if(r===!1)for(c=0;c{"use strict";l1e.exports={attributes:zm(),layoutAttributes:jI(),supplyDefaults:i0().supplyDefaults,crossTraceDefaults:i0().crossTraceDefaults,supplyLayoutDefaults:IV(),calc:Iye(),crossTraceCalc:t2().crossTraceCalc,colorbar:$d(),arraysToCalcdata:A4(),plot:d2().plot,style:V0().style,styleOnSelect:V0().styleOnSelect,hoverPoints:IT().hoverPoints,eventData:o1e(),selectPoints:RT(),moduleType:"trace",name:"bar",basePlotModule:mh(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}});var f1e=ye((wur,c1e)=>{"use strict";c1e.exports=u1e()});var k4=ye((Tur,p1e)=>{"use strict";var w_t=Pg(),G0=pf(),h1e=zm(),T_t=Ih(),d1e=df().axisHoverFormat,{hovertemplateAttrs:A_t,templatefallbackAttrs:S_t}=Ll(),Gy=Ao().extendFlat,DT=G0.marker,v1e=DT.line;p1e.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},xperiod:G0.xperiod,yperiod:G0.yperiod,xperiod0:G0.xperiod0,yperiod0:G0.yperiod0,xperiodalignment:G0.xperiodalignment,yperiodalignment:G0.yperiodalignment,xhoverformat:d1e("x"),yhoverformat:d1e("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},sdmultiple:{valType:"number",min:0,editType:"calc",dflt:1},sizemode:{valType:"enumerated",values:["quartiles","sd"],editType:"calc",dflt:"quartiles"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:Gy({},DT.symbol,{arrayOk:!1,editType:"plot"}),opacity:Gy({},DT.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:Gy({},DT.angle,{arrayOk:!1,editType:"calc"}),size:Gy({},DT.size,{arrayOk:!1,editType:"calc"}),color:Gy({},DT.color,{arrayOk:!1,editType:"style"}),line:{color:Gy({},v1e.color,{arrayOk:!1,dflt:T_t.defaultLine,editType:"style"}),width:Gy({},v1e.width,{arrayOk:!1,dflt:0,editType:"style"}),outliercolor:{valType:"color",editType:"style"},outlierwidth:{valType:"number",min:0,dflt:1,editType:"style"},editType:"style"},editType:"plot"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:w_t(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:h1e.offsetgroup,alignmentgroup:h1e.alignmentgroup,selected:{marker:G0.selected.marker,editType:"style"},unselected:{marker:G0.unselected.marker,editType:"style"},text:Gy({},G0.text,{}),hovertext:Gy({},G0.hovertext,{}),hovertemplate:A_t({}),hovertemplatefallback:S_t(),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:G0.zorder}});var C4=ye((Aur,g1e)=>{"use strict";g1e.exports={boxmode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},boxgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"},boxgroupgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"}}});var P4=ye((Sur,x1e)=>{"use strict";var H0=Pr(),M_t=Oa(),E_t=ka(),k_t=Dg(),C_t=e2(),m1e=G3(),L4=k4();function L_t(e,t,r,n){function i(v,m){return H0.coerce(e,t,L4,v,m)}if(y1e(e,t,i,n),t.visible!==!1){k_t(e,t,n,i),i("xhoverformat"),i("yhoverformat");var a=t._hasPreCompStats;a&&(i("lowerfence"),i("upperfence")),i("line.color",(e.marker||{}).color||r),i("line.width"),i("fillcolor",E_t.addOpacity(t.line.color,.5));var o=!1;if(a){var s=i("mean"),l=i("sd");s&&s.length&&(o=!0,l&&l.length&&(o="sd"))}i("whiskerwidth");var u=i("sizemode"),c;u==="quartiles"&&(c=i("boxmean",o)),i("showwhiskers",u==="quartiles"),(u==="sd"||c==="sd")&&i("sdmultiple"),i("width"),i("quartilemethod");var f=!1;if(a){var h=i("notchspan");h&&h.length&&(f=!0)}else H0.validate(e.notchwidth,L4.notchwidth)&&(f=!0);var d=i("notched",f);d&&i("notchwidth"),_1e(e,t,i,{prefix:"box"}),i("zorder")}}function y1e(e,t,r,n){function i(P){var E=0;return P&&P.length&&(E+=1,H0.isArrayOrTypedArray(P[0])&&P[0].length&&(E+=1)),E}function a(P){return H0.validate(e[P],L4[P])}var o=r("y"),s=r("x"),l;if(t.type==="box"){var u=r("q1"),c=r("median"),f=r("q3");t._hasPreCompStats=u&&u.length&&c&&c.length&&f&&f.length,l=Math.min(H0.minRowLength(u),H0.minRowLength(c),H0.minRowLength(f))}var h=i(o),d=i(s),v=h&&H0.minRowLength(o),m=d&&H0.minRowLength(s),b=n.calendar,p={autotypenumbers:n.autotypenumbers},k,M;if(t._hasPreCompStats)switch(String(d)+String(h)){case"00":var T=a("x0")||a("dx"),L=a("y0")||a("dy");L&&!T?k="h":k="v",M=l;break;case"10":k="v",M=Math.min(l,m);break;case"20":k="h",M=Math.min(l,s.length);break;case"01":k="h",M=Math.min(l,v);break;case"02":k="v",M=Math.min(l,o.length);break;case"12":k="v",M=Math.min(l,m,o.length);break;case"21":k="h",M=Math.min(l,s.length,v);break;case"11":M=0;break;case"22":var x=!1,C;for(C=0;C0?(k="v",d>0?M=Math.min(m,v):M=Math.min(v)):d>0?(k="h",M=Math.min(m)):M=0;if(!M){t.visible=!1;return}t._length=M;var S=r("orientation",k);t._hasPreCompStats?S==="v"&&d===0?(r("x0",0),r("dx",1)):S==="h"&&h===0&&(r("y0",0),r("dy",1)):S==="v"&&d===0?r("x0"):S==="h"&&h===0&&r("y0");var g=M_t.getComponentMethod("calendars","handleTraceDefaults");g(e,t,["x","y"],n)}function _1e(e,t,r,n){var i=n.prefix,a=H0.coerce2(e,t,L4,"marker.outliercolor"),o=r("marker.line.outliercolor"),s="outliers";t._hasPreCompStats?s="all":(a||o)&&(s="suspectedoutliers");var l=r(i+"points",s);l?(r("jitter",l==="all"?.3:0),r("pointpos",l==="all"?-1.5:0),r("marker.symbol"),r("marker.opacity"),r("marker.size"),r("marker.angle"),r("marker.color",t.line.color),r("marker.line.color"),r("marker.line.width"),l==="suspectedoutliers"&&(r("marker.line.outliercolor",t.marker.color),r("marker.line.outlierwidth")),r("selected.marker.color"),r("unselected.marker.color"),r("selected.marker.size"),r("unselected.marker.size"),r("text"),r("hovertext")):delete t.marker;var u=r("hoveron");(u==="all"||u.indexOf("points")!==-1)&&(r("hovertemplate"),r("hovertemplatefallback")),H0.coerceSelectionMarkerOpacity(t,r)}function P_t(e,t){var r,n;function i(l){return H0.coerce(n._input,n,L4,l)}for(var a=0;a{"use strict";var I_t=Oa(),R_t=Pr(),D_t=C4();function b1e(e,t,r,n,i){for(var a=i+"Layout",o=!1,s=0;s{"use strict";var BV=Eo(),QI=ho(),z_t=zg(),yh=Pr(),n0=fs().BADNUM,Hy=yh._;P1e.exports=function(t,r){var n=t._fullLayout,i=QI.getFromId(t,r.xaxis||"x"),a=QI.getFromId(t,r.yaxis||"y"),o=[],s=r.type==="violin"?"_numViolins":"_numBoxes",l,u,c,f,h,d,v;r.orientation==="h"?(c=i,f="x",h=a,d="y",v=!!r.yperiodalignment):(c=a,f="y",h=i,d="x",v=!!r.xperiodalignment);var m=q_t(r,d,h,n[s]),b=m[0],p=m[1],k=yh.distinctVals(b,h),M=k.vals,T=k.minDiff/2,L,x,C,S,g,P,E=(r.boxpoints||r.points)==="all"?yh.identity:function(Vt){return Vt.vL.uf};if(r._hasPreCompStats){var z=r[f],q=function(Vt){return c.d2c((r[Vt]||[])[l])},U=1/0,G=-1/0;for(l=0;l=L.q1&&L.q3>=L.med){var j=q("lowerfence");L.lf=j!==n0&&j<=L.q1?j:M1e(L,C,S);var N=q("upperfence");L.uf=N!==n0&&N>=L.q3?N:E1e(L,C,S);var H=q("mean");L.mean=H!==n0?H:S?yh.mean(C,S):(L.q1+L.q3)/2;var re=q("sd");L.sd=H!==n0&&re>=0?re:S?yh.stdev(C,S,L.mean):L.q3-L.q1,L.lo=k1e(L),L.uo=C1e(L);var oe=q("notchspan");oe=oe!==n0&&oe>0?oe:L1e(L,S),L.ln=L.med-oe,L.un=L.med+oe;var _e=L.lf,ke=L.uf;r.boxpoints&&C.length&&(_e=Math.min(_e,C[0]),ke=Math.max(ke,C[S-1])),r.notched&&(_e=Math.min(_e,L.ln),ke=Math.max(ke,L.un)),L.min=_e,L.max=ke}else{yh.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+L.q1,"median = "+L.med,"q3 = "+L.q3].join(` +`));var Ce;L.med!==n0?Ce=L.med:L.q1!==n0?L.q3!==n0?Ce=(L.q1+L.q3)/2:Ce=L.q1:L.q3!==n0?Ce=L.q3:Ce=0,L.med=Ce,L.q1=L.q3=Ce,L.lf=L.uf=Ce,L.mean=L.sd=Ce,L.ln=L.un=Ce,L.min=L.max=Ce}U=Math.min(U,L.min),G=Math.max(G,L.max),L.pts2=x.filter(E),o.push(L)}}r._extremes[c._id]=QI.findExtremes(c,[U,G],{padded:!0})}else{var ge=c.makeCalcdata(r,f),ie=O_t(M,T),Se=M.length,Ee=B_t(Se);for(l=0;l=0&&we0){if(L={},L.pos=L[d]=M[l],x=L.pts=Ee[l].sort(A1e),C=L[f]=x.map(S1e),S=C.length,L.min=C[0],L.max=C[S-1],L.mean=yh.mean(C,S),L.sd=yh.stdev(C,S,L.mean)*r.sdmultiple,L.med=yh.interp(C,.5),S%2&&(Pe||ce)){var He,lt;Pe?(He=C.slice(0,S/2),lt=C.slice(S/2+1)):ce&&(He=C.slice(0,S/2+1),lt=C.slice(S/2)),L.q1=yh.interp(He,.5),L.q3=yh.interp(lt,.5)}else L.q1=yh.interp(C,.25),L.q3=yh.interp(C,.75);L.lf=M1e(L,C,S),L.uf=E1e(L,C,S),L.lo=k1e(L),L.uo=C1e(L);var mt=L1e(L,S);L.ln=L.med-mt,L.un=L.med+mt,De=Math.min(De,L.ln),Le=Math.max(Le,L.un),L.pts2=x.filter(E),o.push(L)}r.notched&&yh.isTypedArray(ge)&&(ge=Array.from(ge)),r._extremes[c._id]=QI.findExtremes(c,r.notched?ge.concat([De,Le]):ge,{padded:!0})}return N_t(o,r),o.length>0?(o[0].t={num:n[s],dPos:T,posLetter:d,valLetter:f,labels:{med:Hy(t,"median:"),min:Hy(t,"min:"),q1:Hy(t,"q1:"),q3:Hy(t,"q3:"),max:Hy(t,"max:"),mean:r.boxmean==="sd"||r.sizemode==="sd"?Hy(t,"mean \xB1 \u03C3:").replace("\u03C3",r.sdmultiple===1?"\u03C3":r.sdmultiple+"\u03C3"):Hy(t,"mean:"),lf:Hy(t,"lower fence:"),uf:Hy(t,"upper fence:")}},n[s]++,o):[{t:{empty:!0}}]};function q_t(e,t,r,n){var i=t in e,a=t+"0"in e,o="d"+t in e;if(i||a&&o){var s=r.makeCalcdata(e,t),l=z_t(e,r,t,s).vals;return[l,s]}var u;a?u=e[t+"0"]:"name"in e&&(r.type==="category"||BV(e.name)&&["linear","log"].indexOf(r.type)!==-1||yh.isDateTime(e.name)&&r.type==="date")?u=e.name:u=n;for(var c=r.type==="multicategory"?r.r2c_just_indices(u):r.d2c(u,0,e[t+"calendar"]),f=e._length,h=new Array(f),d=0;d{"use strict";var I1e=ho(),U_t=Pr(),V_t=Kb().getAxisGroup,R1e=["v","h"];function G_t(e,t){for(var r=e.calcdata,n=t.xaxis,i=t.yaxis,a=0;a1,k=1-a[e+"gap"],M=1-a[e+"groupgap"];for(l=0;l0;if(C==="positive"?(N=S*(x?1:.5),oe=re,H=oe=P):C==="negative"?(N=oe=P,H=S*(x?1:.5),_e=re):(N=H=S,oe=_e=re),Ee){var we=T.pointpos,De=T.jitter,Le=T.marker.size/2,me=0;we+De>=0&&(me=re*(we+De),me>N?(Se=!0,ge=Le,ke=me):me>oe&&(ge=Le,ke=N)),me<=N&&(ke=N);var Pe=0;we-De<=0&&(Pe=-re*(we-De),Pe>H?(Se=!0,ie=Le,Ce=Pe):Pe>_e&&(ie=Le,Ce=H)),Pe<=H&&(Ce=H)}else ke=N,Ce=H;var ce=new Array(c.length);for(u=0;u{"use strict";var FT=qa(),v2=Pr(),H_t=So(),z1e=5,j_t=.01;function W_t(e,t,r,n){var i=e._context.staticPlot,a=t.xaxis,o=t.yaxis;v2.makeTraceGroups(n,r,"trace boxes").each(function(s){var l=FT.select(this),u=s[0],c=u.t,f=u.trace;if(c.wdPos=c.bdPos*f.whiskerwidth,f.visible!==!0||c.empty){l.remove();return}var h,d;f.orientation==="h"?(h=o,d=a):(h=a,d=o),q1e(l,{pos:h,val:d},f,c,i),O1e(l,{x:a,y:o},f,c),B1e(l,{pos:h,val:d},f,c)})}function q1e(e,t,r,n,i){var a=r.orientation==="h",o=t.val,s=t.pos,l=!!s.rangebreaks,u=n.bPos,c=n.wdPos||0,f=n.bPosPxOffset||0,h=r.whiskerwidth||0,d=r.showwhiskers!==!1,v=r.notched||!1,m=v?1-2*r.notchwidth:1,b,p;Array.isArray(n.bdPos)?(b=n.bdPos[0],p=n.bdPos[1]):(b=n.bdPos,p=n.bdPos);var k=e.selectAll("path.box").data(r.type!=="violin"||r.box.visible?v2.identity:[]);k.enter().append("path").style("vector-effect",i?"none":"non-scaling-stroke").attr("class","box"),k.exit().remove(),k.each(function(M){if(M.empty)return FT.select(this).attr("d","M0,0Z");var T=s.c2l(M.pos+u,!0),L=s.l2p(T-b)+f,x=s.l2p(T+p)+f,C=l?(L+x)/2:s.l2p(T)+f,S=r.whiskerwidth,g=l?L*S+(1-S)*C:s.l2p(T-c)+f,P=l?x*S+(1-S)*C:s.l2p(T+c)+f,E=s.l2p(T-b*m)+f,z=s.l2p(T+p*m)+f,q=r.sizemode==="sd",U=o.c2p(q?M.mean-M.sd:M.q1,!0),G=q?o.c2p(M.mean+M.sd,!0):o.c2p(M.q3,!0),Z=v2.constrain(q?o.c2p(M.mean,!0):o.c2p(M.med,!0),Math.min(U,G)+1,Math.max(U,G)-1),j=M.lf===void 0||r.boxpoints===!1||q,N=o.c2p(j?M.min:M.lf,!0),H=o.c2p(j?M.max:M.uf,!0),re=o.c2p(M.ln,!0),oe=o.c2p(M.un,!0);a?FT.select(this).attr("d","M"+Z+","+E+"V"+z+"M"+U+","+L+"V"+x+(v?"H"+re+"L"+Z+","+z+"L"+oe+","+x:"")+"H"+G+"V"+L+(v?"H"+oe+"L"+Z+","+E+"L"+re+","+L:"")+"Z"+(d?"M"+U+","+C+"H"+N+"M"+G+","+C+"H"+H+(h===0?"":"M"+N+","+g+"V"+P+"M"+H+","+g+"V"+P):"")):FT.select(this).attr("d","M"+E+","+Z+"H"+z+"M"+L+","+U+"H"+x+(v?"V"+re+"L"+z+","+Z+"L"+x+","+oe:"")+"V"+G+"H"+L+(v?"V"+oe+"L"+E+","+Z+"L"+L+","+re:"")+"Z"+(d?"M"+C+","+U+"V"+N+"M"+C+","+G+"V"+H+(h===0?"":"M"+g+","+N+"H"+P+"M"+g+","+H+"H"+P):""))})}function O1e(e,t,r,n){var i=t.x,a=t.y,o=n.bdPos,s=n.bPos,l=r.boxpoints||r.points;v2.seedPseudoRandom();var u=function(h){return h.forEach(function(d){d.t=n,d.trace=r}),h},c=e.selectAll("g.points").data(l?u:[]);c.enter().append("g").attr("class","points"),c.exit().remove();var f=c.selectAll("path").data(function(h){var d,v=h.pts2,m=Math.max((h.max-h.min)/10,h.q3-h.q1),b=m*1e-9,p=m*j_t,k=[],M=0,T;if(r.jitter){if(m===0)for(M=1,k=new Array(v.length),d=0;dh.lo&&(P.so=!0)}return v});f.enter().append("path").classed("point",!0),f.exit().remove(),f.call(H_t.translatePoints,i,a)}function B1e(e,t,r,n){var i=t.val,a=t.pos,o=!!a.rangebreaks,s=n.bPos,l=n.bPosPxOffset||0,u=r.boxmean||(r.meanline||{}).visible,c,f;Array.isArray(n.bdPos)?(c=n.bdPos[0],f=n.bdPos[1]):(c=n.bdPos,f=n.bdPos);var h=e.selectAll("path.mean").data(r.type==="box"&&r.boxmean||r.type==="violin"&&r.box.visible&&r.meanline.visible?v2.identity:[]);h.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),h.exit().remove(),h.each(function(d){var v=a.c2l(d.pos+s,!0),m=a.l2p(v-c)+l,b=a.l2p(v+f)+l,p=o?(m+b)/2:a.l2p(v)+l,k=i.c2p(d.mean,!0),M=i.c2p(d.mean-d.sd,!0),T=i.c2p(d.mean+d.sd,!0);r.orientation==="h"?FT.select(this).attr("d","M"+k+","+m+"V"+b+(u==="sd"?"m0,0L"+M+","+p+"L"+k+","+m+"L"+T+","+p+"Z":"")):FT.select(this).attr("d","M"+m+","+k+"H"+b+(u==="sd"?"m0,0L"+p+","+M+"L"+m+","+k+"L"+p+","+T+"Z":""))})}N1e.exports={plot:W_t,plotBoxAndWhiskers:q1e,plotPoints:O1e,plotBoxMean:B1e}});var r8=ye((Lur,U1e)=>{"use strict";var UV=qa(),VV=ka(),GV=So();function X_t(e,t,r){var n=r||UV.select(e).selectAll("g.trace.boxes");n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var a=UV.select(this),o=i[0].trace,s=o.line.width;function l(f,h,d,v){f.style("stroke-width",h+"px").call(VV.stroke,d).call(VV.fill,v)}var u=a.selectAll("path.box");if(o.type==="candlestick")u.each(function(f){if(!f.empty){var h=UV.select(this),d=o[f.dir];l(h,d.line.width,d.line.color,d.fillcolor),h.style("opacity",o.selectedpoints&&!f.selected?.3:1)}});else{l(u,s,o.line.color,o.fillcolor),a.selectAll("path.mean").style({"stroke-width":s,"stroke-dasharray":2*s+"px,"+s+"px"}).call(VV.stroke,o.line.color);var c=a.selectAll("path.point");GV.pointStyle(c,o,e)}})}function Z_t(e,t,r){var n=t[0].trace,i=r.selectAll("path.point");n.selectedpoints?GV.selectedPointStyle(i,n):GV.pointStyle(i,n,e)}U1e.exports={style:X_t,styleOnSelect:Z_t}});var jV=ye((Pur,j1e)=>{"use strict";var Y_t=ho(),HV=Pr(),R_=vf(),V1e=ka(),K_t=HV.fillText;function J_t(e,t,r,n){var i=e.cd,a=i[0].trace,o=a.hoveron,s=[],l;return o.indexOf("boxes")!==-1&&(s=s.concat(G1e(e,t,r,n))),o.indexOf("points")!==-1&&(l=H1e(e,t,r)),n==="closest"?l?[l]:s:(l&&s.push(l),s)}function G1e(e,t,r,n){var i=e.cd,a=e.xa,o=e.ya,s=i[0].trace,l=i[0].t,u=s.type==="violin",c,f,h,d,v,m,b,p,k,M,T,L=l.bdPos,x,C,S=l.wHover,g=function(Le){return h.c2l(Le.pos)+l.bPos-h.c2l(m)};u&&s.side!=="both"?(s.side==="positive"&&(k=function(Le){var me=g(Le);return R_.inbox(me,me+S,M)},x=L,C=0),s.side==="negative"&&(k=function(Le){var me=g(Le);return R_.inbox(me-S,me,M)},x=0,C=L)):(k=function(Le){var me=g(Le);return R_.inbox(me-S,me+S,M)},x=C=L);var P;u?P=function(Le){return R_.inbox(Le.span[0]-v,Le.span[1]-v,M)}:P=function(Le){return R_.inbox(Le.min-v,Le.max-v,M)},s.orientation==="h"?(v=t,m=r,b=P,p=k,c="y",h=o,f="x",d=a):(v=r,m=t,b=k,p=P,c="x",h=a,f="y",d=o);var E=Math.min(1,L/Math.abs(h.r2c(h.range[1])-h.r2c(h.range[0])));M=e.maxHoverDistance-E,T=e.maxSpikeDistance-E;function z(Le){return(b(Le)+p(Le))/2}var q=R_.getDistanceFunction(n,b,p,z);if(R_.getClosest(i,q,e),e.index===!1)return[];var U=i[e.index],G=s.line.color,Z=(s.marker||{}).color;V1e.opacity(G)&&s.line.width?e.color=G:V1e.opacity(Z)&&s.boxpoints?e.color=Z:e.color=s.fillcolor,e[c+"0"]=h.c2p(U.pos+l.bPos-C,!0),e[c+"1"]=h.c2p(U.pos+l.bPos+x,!0),e[c+"LabelVal"]=U.orig_p!==void 0?U.orig_p:U.pos;var j=c+"Spike";e.spikeDistance=z(U)*T/M,e[j]=h.c2p(U.pos,!0);var N=s.boxmean||s.sizemode==="sd"||(s.meanline||{}).visible,H=s.boxpoints||s.points,re=H&&N?["max","uf","q3","med","mean","q1","lf","min"]:H&&!N?["max","uf","q3","med","q1","lf","min"]:!H&&N?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],oe=d.range[1]{"use strict";W1e.exports=function(t,r){return r.hoverOnBox&&(t.hoverOnBox=r.hoverOnBox),"xVal"in r&&(t.x=r.xVal),"yVal"in r&&(t.y=r.yVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var WV=ye((Rur,Z1e)=>{"use strict";Z1e.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s,l;if(r===!1)for(s=0;s{"use strict";Y1e.exports={attributes:k4(),layoutAttributes:C4(),supplyDefaults:P4().supplyDefaults,crossTraceDefaults:P4().crossTraceDefaults,supplyLayoutDefaults:$I().supplyLayoutDefaults,calc:NV(),crossTraceCalc:e8().crossTraceCalc,plot:t8().plot,style:r8().style,styleOnSelect:r8().styleOnSelect,hoverPoints:jV().hoverPoints,eventData:X1e(),selectPoints:WV(),moduleType:"trace",name:"box",basePlotModule:mh(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}});var $1e=ye((Fur,J1e)=>{"use strict";J1e.exports=K1e()});var zT=ye((zur,e_e)=>{"use strict";var $_t=Tu(),{extendFlat:Pp}=Ao(),Q_t=Gl(),{axisHoverFormat:XV}=df(),ext=ec(),{hovertemplateAttrs:txt,templatefallbackAttrs:Q1e,texttemplateAttrs:rxt}=Ll(),a0=pf();e_e.exports=Pp({z:{valType:"data_array",editType:"calc"},x:Pp({},a0.x,{impliedEdits:{xtype:"array"}}),x0:Pp({},a0.x0,{impliedEdits:{xtype:"scaled"}}),dx:Pp({},a0.dx,{impliedEdits:{xtype:"scaled"}}),y:Pp({},a0.y,{impliedEdits:{ytype:"array"}}),y0:Pp({},a0.y0,{impliedEdits:{ytype:"scaled"}}),dy:Pp({},a0.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:Pp({},a0.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:Pp({},a0.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:Pp({},a0.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:Pp({},a0.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:Pp({},a0.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:Pp({},a0.yperiodalignment,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},hovertext:{valType:"data_array",editType:"calc"},transpose:{valType:"boolean",dflt:!1,editType:"calc"},xtype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},ytype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},zsmooth:{valType:"enumerated",values:["fast","best",!1],dflt:!1,editType:"calc"},hoverongaps:{valType:"boolean",dflt:!0,editType:"none"},connectgaps:{valType:"boolean",editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},xhoverformat:XV("x"),yhoverformat:XV("y"),zhoverformat:XV("z",1),hovertemplate:txt(),hovertemplatefallback:Q1e(),texttemplate:rxt({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),texttemplatefallback:Q1e({editType:"plot"}),textfont:ext({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:Pp({},Q_t.showlegend,{dflt:!1}),zorder:a0.zorder},$_t("",{cLetter:"z",autoColorDflt:!1}))});var n8=ye((qur,r_e)=>{"use strict";var ixt=Eo(),i8=Pr(),nxt=Oa();r_e.exports=function(t,r,n,i,a,o){var s=n("z");a=a||"x",o=o||"y";var l,u;if(s===void 0||!s.length)return 0;if(i8.isArray1D(s)){l=n(a),u=n(o);var c=i8.minRowLength(l),f=i8.minRowLength(u);if(c===0||f===0)return 0;r._length=Math.min(c,f,s.length)}else{if(l=t_e(a,n),u=t_e(o,n),!axt(s))return 0;n("transpose"),r._length=null}var h=nxt.getComponentMethod("calendars","handleTraceDefaults");return h(t,r,[a,o],i),!0};function t_e(e,t){var r=t(e),n=r?t(e+"type","array"):"scaled";return n==="scaled"&&(t(e+"0"),t("d"+e)),r}function axt(e){for(var t=!0,r=!1,n=!1,i,a=0;a0&&(r=!0);for(var o=0;o{"use strict";var i_e=Pr();n_e.exports=function(t,r){t("texttemplate"),t("texttemplatefallback");var n=i_e.extendFlat({},r.font,{color:"auto",size:"auto"});i_e.coerceFont(t,"textfont",n)}});var ZV=ye((Bur,a_e)=>{"use strict";a_e.exports=function(t,r,n){var i=n("zsmooth");i===!1&&(n("xgap"),n("ygap")),n("zhoverformat")}});var l_e=ye((Nur,s_e)=>{"use strict";var o_e=Pr(),oxt=n8(),sxt=I4(),lxt=Dg(),uxt=ZV(),cxt=td(),fxt=zT();s_e.exports=function(t,r,n,i){function a(s,l){return o_e.coerce(t,r,fxt,s,l)}var o=oxt(t,r,a,i);if(!o){r.visible=!1;return}lxt(t,r,i,a),a("xhoverformat"),a("yhoverformat"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),sxt(a,i),uxt(t,r,a,i),a("hoverongaps"),a("connectgaps",o_e.isArray1D(r.z)&&r.zsmooth!==!1),cxt(t,r,i,a,{prefix:"",cLetter:"z"}),a("zorder")}});var YV=ye((Uur,u_e)=>{"use strict";var qT=Eo();u_e.exports={count:function(e,t,r){return r[e]++,1},sum:function(e,t,r,n){var i=n[t];return qT(i)?(i=Number(i),r[e]+=i,i):0},avg:function(e,t,r,n,i){var a=n[t];return qT(a)&&(a=Number(a),r[e]+=a,i[e]++),0},min:function(e,t,r,n){var i=n[t];if(qT(i))if(i=Number(i),qT(r[e])){if(r[e]>i){var a=i-r[e];return r[e]=i,a}}else return r[e]=i,i;return 0},max:function(e,t,r,n){var i=n[t];if(qT(i))if(i=Number(i),qT(r[e])){if(r[e]{"use strict";c_e.exports={percent:function(e,t){for(var r=e.length,n=100/t,i=0;i{"use strict";f_e.exports=function(t,r){for(var n=t.length,i=0,a=0;a{"use strict";var OT=fs(),p2=OT.ONEAVGYEAR,h_e=OT.ONEAVGMONTH,o8=OT.ONEDAY,d_e=OT.ONEHOUR,v_e=OT.ONEMIN,p_e=OT.ONESEC,g_e=ho().tickIncrement;__e.exports=function(t,r,n,i,a){var o=-1.1*r,s=-.1*r,l=t-s,u=n[0],c=n[1],f=Math.min(a8(u+s,u+l,i,a),a8(c+s,c+l,i,a)),h=Math.min(a8(u+o,u+s,i,a),a8(c+o,c+s,i,a)),d,v;if(f>h&&ho8){var m=d===p2?1:6,b=d===p2?"M12":"M1";return function(p,k){var M=i.c2d(p,p2,a),T=M.indexOf("-",m);T>0&&(M=M.slice(0,T));var L=i.d2c(M,0,a);if(Lp_e?e>o8?e>p2*1.1?p2:e>h_e*1.1?h_e:o8:e>d_e?d_e:e>v_e?v_e:p_e:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function hxt(e,t,r,n,i,a){if(n&&e>o8){var o=y_e(t,i,a),s=y_e(r,i,a),l=e===p2?0:1;return o[l]!==s[l]}return Math.floor(r/e)-Math.floor(t/e)>.1}function y_e(e,t,r){var n=t.c2d(e,p2,r).split("-");return n[0]===""&&(n.unshift(),n[0]="-"+n[0]),n}});var tG=ye((jur,A_e)=>{"use strict";var QV=Eo(),Hv=Pr(),x_e=Oa(),j0=ho(),{hasColorscale:b_e}=pv(),w_e=gv(),dxt=A4(),T_e=YV(),vxt=KV(),pxt=JV(),gxt=$V();function mxt(e,t){var r=[],n=[],i=t.orientation==="h",a=j0.getFromId(e,i?t.yaxis:t.xaxis),o=i?"y":"x",s={x:"y",y:"x"}[o],l=t[o+"calendar"],u=t.cumulative,c,f=eG(e,t,a,o),h=f[0],d=f[1],v=typeof h.size=="string",m=[],b=v?m:h,p=[],k=[],M=[],T=0,L=t.histnorm,x=t.histfunc,C=L.indexOf("density")!==-1,S,g,P;u.enabled&&C&&(L=L.replace(/ ?density$/,""),C=!1);var E=x==="max"||x==="min",z=E?null:0,q=T_e.count,U=vxt[L],G=!1,Z=function(me){return a.r2c(me,0,l)},j;for(Hv.isArrayOrTypedArray(t[s])&&x!=="count"&&(j=t[s],G=x==="avg",q=T_e[x]),c=Z(h.start),g=Z(h.end)+(c-j0.tickIncrement(c,h.size,!1,l))/1e6;c=0&&P=we;c--)if(n[c]){De=c;break}for(c=we;c<=De;c++)if(QV(r[c])&&QV(n[c])){var Le={p:r[c],s:n[c],b:0};u.enabled||(Le.pts=M[c],oe?Le.ph0=Le.ph1=M[c].length?d[M[c][0]]:r[c]:(t._computePh=!0,Le.ph0=ie(m[c]),Le.ph1=ie(m[c+1],!0))),Ee.push(Le)}return Ee.length===1&&(Ee[0].width1=j0.tickIncrement(Ee[0].p,h.size,!1,l)-Ee[0].p),b_e(t,"marker")&&w_e(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),b_e(t,"marker.line")&&w_e(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}),dxt(Ee,t),Hv.isArrayOrTypedArray(t.selectedpoints)&&Hv.tagSelected(Ee,t,Ce),Ee}function eG(e,t,r,n,i){var a=n+"bins",o=e._fullLayout,s=t["_"+n+"bingroup"],l=o._histogramBinOpts[s],u=o.barmode==="overlay",c,f,h,d,v,m,b,p=function(ge){return r.r2c(ge,0,d)},k=function(ge){return r.c2r(ge,0,d)},M=r.type==="date"?function(ge){return ge||ge===0?Hv.cleanDate(ge,null,d):null}:function(ge){return QV(ge)?Number(ge):null};function T(ge,ie,Se){ie[ge+"Found"]?(ie[ge]=M(ie[ge]),ie[ge]===null&&(ie[ge]=Se[ge])):(m[ge]=ie[ge]=Se[ge],Hv.nestedProperty(f[0],a+"."+ge).set(Se[ge]))}if(t["_"+n+"autoBinFinished"])delete t["_"+n+"autoBinFinished"];else{f=l.traces;var L=[],x=!0,C=!1,S=!1;for(c=0;cr.r2l(j)&&(H=j0.tickIncrement(H,l.size,!0,d)),q.start=r.l2r(H),Z||Hv.nestedProperty(t,a+".start").set(q.start)}var re=l.end,oe=r.r2l(z.end),_e=oe!==void 0;if((l.endFound||_e)&&oe!==r.r2l(re)){var ke=_e?oe:Hv.aggNums(Math.max,null,v);q.end=r.l2r(ke),_e||Hv.nestedProperty(t,a+".start").set(q.end)}var Ce="autobin"+n;return t._input[Ce]===!1&&(t._input[a]=Hv.extendFlat({},t[a]||{}),delete t._input[Ce],delete t[Ce]),[q,v]}function yxt(e,t,r,n,i){var a=e._fullLayout,o=_xt(e,t),s=!1,l=1/0,u=[t],c,f,h;for(c=0;c=0;n--)s(n);else if(t==="increasing"){for(n=1;n=0;n--)e[n]+=e[n+1];r==="exclude"&&(e.push(0),e.shift())}}A_e.exports={calc:mxt,calcAllAutoBins:eG}});var I_e=ye((Wur,P_e)=>{"use strict";var S_e=Pr(),BT=ho(),M_e=YV(),bxt=KV(),wxt=JV(),Txt=$V(),E_e=tG().calcAllAutoBins;P_e.exports=function(t,r){var n=BT.getFromId(t,r.xaxis),i=BT.getFromId(t,r.yaxis),a=r.xcalendar,o=r.ycalendar,s=function(Et){return n.r2c(Et,0,a)},l=function(Et){return i.r2c(Et,0,o)},u=function(Et){return n.c2r(Et,0,a)},c=function(Et){return i.c2r(Et,0,o)},f,h,d,v,m=E_e(t,r,n,"x"),b=m[0],p=m[1],k=E_e(t,r,i,"y"),M=k[0],T=k[1],L=r._length;p.length>L&&p.splice(L,p.length-L),T.length>L&&T.splice(L,T.length-L);var x=[],C=[],S=[],g=typeof b.size=="string",P=typeof M.size=="string",E=[],z=[],q=g?E:b,U=P?z:M,G=0,Z=[],j=[],N=r.histnorm,H=r.histfunc,re=N.indexOf("density")!==-1,oe=H==="max"||H==="min",_e=oe?null:0,ke=M_e.count,Ce=bxt[N],ge=!1,ie=[],Se=[],Ee="z"in r?r.z:"marker"in r&&Array.isArray(r.marker.color)?r.marker.color:"";Ee&&H!=="count"&&(ge=H==="avg",ke=M_e[H]);var we=b.size,De=s(b.start),Le=s(b.end)+(De-BT.tickIncrement(De,we,!1,a))/1e6;for(f=De;f=0&&d=0&&v{"use strict";var Om=Pr(),R_e=fs().BADNUM,D_e=zg();F_e.exports=function(t,r,n,i,a,o){var s=t._length,l=r.makeCalcdata(t,i),u=n.makeCalcdata(t,a);l=D_e(t,r,i,l).vals,u=D_e(t,n,a,u).vals;var c=t.text,f=c!==void 0&&Om.isArray1D(c),h=t.hovertext,d=h!==void 0&&Om.isArray1D(h),v,m,b=Om.distinctVals(l),p=b.vals,k=Om.distinctVals(u),M=k.vals,T=[],L,x,C=M.length,S=p.length;for(v=0;v{"use strict";var Axt=Eo(),Sxt=Pr(),l8=fs().BADNUM;z_e.exports=function(t,r,n,i){var a,o,s,l,u,c;function f(p){if(Axt(p))return+p}if(r&&r.transpose){for(a=0,u=0;u{"use strict";var Mxt=Pr(),q_e=.01,Ext=[[-1,0],[1,0],[0,-1],[0,1]];function kxt(e){return .5-.25*Math.min(1,e*.5)}B_e.exports=function(t,r){var n=1,i;for(O_e(t,r),i=0;iq_e;i++)n=O_e(t,r,kxt(n));return n>q_e&&Mxt.log("interp2d didn't converge quickly",n),t};function O_e(e,t,r){var n=0,i,a,o,s,l,u,c,f,h,d,v,m,b;for(s=0;sm&&(n=Math.max(n,Math.abs(e[a][o]-v)/(b-m))))}return n}});var f8=ye((Kur,N_e)=>{"use strict";var Cxt=Pr().maxRowLength;N_e.exports=function(t){var r=[],n={},i=[],a=t[0],o=[],s=[0,0,0],l=Cxt(t),u,c,f,h,d,v,m,b;for(c=0;c=0;d--)h=i[d],c=h[0],f=h[1],v=((n[[c-1,f]]||s)[2]+(n[[c+1,f]]||s)[2]+(n[[c,f-1]]||s)[2]+(n[[c,f+1]]||s)[2])/20,v&&(m[h]=[c,f,v],i.splice(d,1),b=!0);if(!b)throw"findEmpties iterated with no new neighbors";for(h in m)n[h]=m[h],r.push(m[h])}return r.sort(function(p,k){return k[2]-p[2]})}});var rG=ye((Jur,G_e)=>{"use strict";var U_e=Oa(),V_e=Pr().isArrayOrTypedArray;G_e.exports=function(t,r,n,i,a,o){var s=[],l=U_e.traceIs(t,"contour"),u=U_e.traceIs(t,"histogram"),c,f,h,d=V_e(r)&&r.length>1;if(d&&!u&&o.type!=="category"){var v=r.length;if(v<=a){if(l)s=Array.from(r).slice(0,a);else if(a===1)o.type==="log"?s=[.5*r[0],2*r[0]]:s=[r[0]-.5,r[0]+.5];else if(o.type==="log"){for(s=[Math.pow(r[0],1.5)/Math.pow(r[1],.5)],h=1;h{"use strict";var H_e=Oa(),iG=Pr(),h8=ho(),j_e=zg(),Lxt=I_e(),Pxt=gv(),Ixt=s8(),Rxt=u8(),Dxt=c8(),Fxt=f8(),d8=rG(),nG=fs().BADNUM;X_e.exports=function(t,r){var n=h8.getFromId(t,r.xaxis||"x"),i=h8.getFromId(t,r.yaxis||"y"),a=H_e.traceIs(r,"contour"),o=H_e.traceIs(r,"histogram"),s=a?"best":r.zsmooth,l,u,c,f,h,d,v,m,b,p,k;if(n._minDtick=0,i._minDtick=0,o)k=Lxt(t,r),f=k.orig_x,l=k.x,u=k.x0,c=k.dx,m=k.orig_y,h=k.y,d=k.y0,v=k.dy,b=k.z;else{var M=r.z;iG.isArray1D(M)?(Ixt(r,n,i,"x","y",["z"]),l=r._x,h=r._y,M=r._z):(f=r.x?n.makeCalcdata(r,"x"):[],m=r.y?i.makeCalcdata(r,"y"):[],l=j_e(r,n,"x",f).vals,h=j_e(r,i,"y",m).vals,r._x=l,r._y=h),u=r.x0,c=r.dx,d=r.y0,v=r.dy,b=Rxt(M,r,n,i)}(n.rangebreaks||i.rangebreaks)&&(b=zxt(l,h,b),o||(l=W_e(l),h=W_e(h),r._x=l,r._y=h)),!o&&(a||r.connectgaps)&&(r._emptypoints=Fxt(b),Dxt(b,r._emptypoints));function T(q){s=r._input.zsmooth=r.zsmooth=!1,iG.warn('cannot use zsmooth: "fast": '+q)}function L(q){if(q.length>1){var U=(q[q.length-1]-q[0])/(q.length-1),G=Math.abs(U/100);for(p=0;pG)return!1}return!0}r._islinear=!1,n.type==="log"||i.type==="log"?s==="fast"&&T("log axis found"):L(l)?L(h)?r._islinear=!0:s==="fast"&&T("y scale is not linear"):s==="fast"&&T("x scale is not linear");var x=iG.maxRowLength(b),C=r.xtype==="scaled"?"":l,S=d8(r,C,u,c,x,n),g=r.ytype==="scaled"?"":h,P=d8(r,g,d,v,b.length,i);r._extremes[n._id]=h8.findExtremes(n,S),r._extremes[i._id]=h8.findExtremes(i,P);var E={x:S,y:P,z:b,text:r._text||r.text,hovertext:r._hovertext||r.hovertext};if(r.xperiodalignment&&f&&(E.orig_x=f),r.yperiodalignment&&m&&(E.orig_y=m),C&&C.length===S.length-1&&(E.xCenter=C),g&&g.length===P.length-1&&(E.yCenter=g),o&&(E.xRanges=k.xRanges,E.yRanges=k.yRanges,E.pts=k.pts),a||Pxt(t,r,{vals:b,cLetter:"z"}),a&&r.contours&&r.contours.coloring==="heatmap"){var z={type:r.type==="contour"?"heatmap":"histogram2d",xcalendar:r.xcalendar,ycalendar:r.ycalendar};E.xfill=d8(z,C,u,c,x,n),E.yfill=d8(z,g,d,v,b.length,i)}return[E]};function W_e(e){for(var t=[],r=e.length,n=0;n{"use strict";p8.CSS_DECLARATIONS=[["image-rendering","optimizeSpeed"],["image-rendering","-moz-crisp-edges"],["image-rendering","-o-crisp-edges"],["image-rendering","-webkit-optimize-contrast"],["image-rendering","optimize-contrast"],["image-rendering","crisp-edges"],["image-rendering","pixelated"]];p8.STYLE=p8.CSS_DECLARATIONS.map(function(e){return e.join(": ")+"; "}).join("")});var oG=ye((ecr,Y_e)=>{"use strict";var Z_e=g8(),qxt=So(),aG=Pr(),NT=null;function Oxt(){if(NT!==null)return NT;NT=!1;var e=aG.isSafari()||aG.isMacWKWebView()||aG.isIOS();if(window.navigator.userAgent&&!e){var t=Array.from(Z_e.CSS_DECLARATIONS).reverse(),r=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof r=="function")NT=t.some(function(o){return r.apply(null,o)});else{var n=qxt.tester.append("image").attr("style",Z_e.STYLE),i=window.getComputedStyle(n.node()),a=i.imageRendering;NT=t.some(function(o){var s=o[1];return a===s||a===s.toLowerCase()}),n.remove()}}return NT}Y_e.exports=Oxt});var m8=ye((tcr,nxe)=>{"use strict";var K_e=qa(),Bxt=fd(),Nxt=Oa(),Uxt=So(),Vxt=ho(),W0=Pr(),J_e=Zl(),Gxt=lI(),Hxt=ka(),jxt=tc().extractOpts,Wxt=tc().makeColorScaleFuncFromTrace,Xxt=Wp(),Zxt=Dh(),sG=Zxt.LINE_SPACING,Yxt=oG(),Kxt=g8().STYLE,rxe="heatmap-label";function ixe(e){return e.selectAll("g."+rxe)}function $_e(e){ixe(e).remove()}nxe.exports=function(e,t,r,n){var i=t.xaxis,a=t.yaxis;W0.makeTraceGroups(n,r,"hm").each(function(o){var s=K_e.select(this),l=o[0],u=l.trace,c=u.xgap||0,f=u.ygap||0,h=l.z,d=l.x,v=l.y,m=l.xCenter,b=l.yCenter,p=Nxt.traceIs(u,"contour"),k=p?"best":u.zsmooth,M=h.length,T=W0.maxRowLength(h),L=!1,x=!1,C,S,g,P,E,z,q,U;for(z=0;C===void 0&&z0;)S=i.c2p(d[z]),z--;for(S0;)E=a.c2p(v[z]),z--;E=i._length||S<=0||P>=a._length||E<=0;if(H){var re=s.selectAll("image").data([]);re.exit().remove(),$_e(s);return}var oe,_e;G==="fast"?(oe=T,_e=M):(oe=j,_e=N);var ke=document.createElement("canvas");ke.width=oe,ke.height=_e;var Ce=ke.getContext("2d",{willReadFrequently:!0}),ge=Wxt(u,{noNumericCheck:!0,returnArray:!0}),ie,Se;G==="fast"?(ie=L?function(fn){return T-1-fn}:W0.identity,Se=x?function(fn){return M-1-fn}:W0.identity):(ie=function(fn){return W0.constrain(Math.round(i.c2p(d[fn])-C),0,j)},Se=function(fn){return W0.constrain(Math.round(a.c2p(v[fn])-P),0,N)});var Ee=Se(0),we=[Ee,Ee],De=L?0:1,Le=x?0:1,me=0,Pe=0,ce=0,He=0,lt,mt,Vt,st,ct;function Qt(fn,yn){if(fn!==void 0){var Mn=ge(fn);return Mn[0]=Math.round(Mn[0]),Mn[1]=Math.round(Mn[1]),Mn[2]=Math.round(Mn[2]),me+=yn,Pe+=Mn[0]*yn,ce+=Mn[1]*yn,He+=Mn[2]*yn,Mn}return[0,0,0,0]}function Ht(fn,yn,Mn,Ba){var ua=fn[Mn.bin0];if(ua===void 0)return Qt(void 0,1);var ma=fn[Mn.bin1],Wa=yn[Mn.bin0],Fa=yn[Mn.bin1],Xo=ma-ua||0,da=Wa-ua||0,jn;return ma===void 0?Fa===void 0?jn=0:Wa===void 0?jn=2*(Fa-ua):jn=(2*Fa-Wa-ua)*2/3:Fa===void 0?Wa===void 0?jn=0:jn=(2*ua-ma-Wa)*2/3:Wa===void 0?jn=(2*Fa-ma-ua)*2/3:jn=Fa+ua-ma-Wa,Qt(ua+Mn.frac*Xo+Ba.frac*(da+Mn.frac*jn))}if(G!=="default"){var nr=0,tt;try{tt=new Uint8Array(oe*_e*4)}catch(fn){tt=new Array(oe*_e*4)}if(G==="smooth"){var je=m||d,Ue=b||v,Ae=new Array(je.length),rt=new Array(Ue.length),St=new Array(j),Tt=m?exe:Q_e,dt=b?exe:Q_e,Et,pt,Xt;for(z=0;zYr||Yr>a._length))for(q=er;qPi||Pi>i._length)){var ai=Gxt({x:_i,y:Ir},u,e._fullLayout);ai.x=_i,ai.y=Ir;var mi=l.z[z][q];mi===void 0?(ai.z="",ai.zLabel=""):(ai.z=mi,ai.zLabel=Vxt.tickText(We,mi,"hover").text);var un=l.text&&l.text[z]&&l.text[z][q];(un===void 0||un===!1)&&(un=""),ai.text=un;var Fn=W0.texttemplateString({data:[ai,u._meta],fallback:u.texttemplatefallback,labels:ai,locale:e._fullLayout._d3locale,template:Ge});if(Fn){var An=Fn.split("
"),Hn=An.length,Qn=0;for(U=0;U{"use strict";axe.exports={min:"zmin",max:"zmax"}});var y8=ye((icr,oxe)=>{"use strict";var Jxt=qa();oxe.exports=function(t){Jxt.select(t).selectAll(".hm image").style("opacity",function(r){return r.trace.opacity})}});var x8=ye((ncr,lxe)=>{"use strict";var sxe=vf(),R4=Pr(),_8=R4.isArrayOrTypedArray,$xt=ho(),Qxt=tc().extractOpts;lxe.exports=function(t,r,n,i,a){a||(a={});var o=a.isContour,s=t.cd[0],l=s.trace,u=t.xa,c=t.ya,f=s.x,h=s.y,d=s.z,v=s.xCenter,m=s.yCenter,b=s.zmask,p=l.zhoverformat,k=f,M=h,T,L,x,C;if(t.index!==!1){try{x=Math.round(t.index[1]),C=Math.round(t.index[0])}catch(re){R4.error("Error hovering on heatmap, pointNumber must be [row,col], found:",t.index);return}if(x<0||x>=d[0].length||C<0||C>d.length)return}else{if(sxe.inbox(r-f[0],r-f[f.length-1],0)>0||sxe.inbox(n-h[0],n-h[h.length-1],0)>0)return;if(o){var S;for(k=[2*f[0]-f[1]],S=1;S{"use strict";uxe.exports={attributes:zT(),supplyDefaults:l_e(),calc:v8(),plot:m8(),colorbar:D_(),style:y8(),hoverPoints:x8(),moduleType:"trace",name:"heatmap",basePlotModule:mh(),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}});var hxe=ye((ocr,fxe)=>{"use strict";fxe.exports=cxe()});var lG=ye((scr,dxe)=>{"use strict";dxe.exports=function(t,r){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}});var pxe=ye((lcr,vxe)=>{"use strict";vxe.exports={eventDataKeys:["binNumber"]}});var b8=ye((ucr,_xe)=>{"use strict";var Ip=zm(),gxe=df().axisHoverFormat,{hovertemplateAttrs:ebt,texttemplateAttrs:tbt,templatefallbackAttrs:mxe}=Ll(),uG=ec(),yxe=lG(),rbt=pxe(),cG=Ao().extendFlat;_xe.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:gxe("x"),yhoverformat:gxe("y"),text:cG({},Ip.text,{}),hovertext:cG({},Ip.hovertext,{}),orientation:Ip.orientation,histfunc:{valType:"enumerated",values:["count","sum","avg","min","max"],dflt:"count",editType:"calc"},histnorm:{valType:"enumerated",values:["","percent","probability","density","probability density"],dflt:"",editType:"calc"},cumulative:{enabled:{valType:"boolean",dflt:!1,editType:"calc"},direction:{valType:"enumerated",values:["increasing","decreasing"],dflt:"increasing",editType:"calc"},currentbin:{valType:"enumerated",values:["include","exclude","half"],dflt:"include",editType:"calc"},editType:"calc"},nbinsx:{valType:"integer",min:0,dflt:0,editType:"calc"},xbins:yxe("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:yxe("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:ebt({},{keys:rbt.eventDataKeys}),hovertemplatefallback:mxe(),texttemplate:tbt({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),texttemplatefallback:mxe({editType:"plot"}),textposition:cG({},Ip.textposition,{arrayOk:!1}),textfont:uG({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:uG({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:uG({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:Ip.insidetextanchor,textangle:Ip.textangle,cliponaxis:Ip.cliponaxis,constraintext:Ip.constraintext,marker:Ip.marker,offsetgroup:Ip.offsetgroup,alignmentgroup:Ip.alignmentgroup,selected:Ip.selected,unselected:Ip.unselected,zorder:Ip.zorder}});var Txe=ye((ccr,wxe)=>{"use strict";var xxe=Oa(),D4=Pr(),bxe=ka(),ibt=i0().handleText,nbt=WI(),abt=b8();wxe.exports=function(t,r,n,i){function a(k,M){return D4.coerce(t,r,abt,k,M)}var o=a("x"),s=a("y"),l=a("cumulative.enabled");l&&(a("cumulative.direction"),a("cumulative.currentbin")),a("text");var u=a("textposition");ibt(t,r,i,a,u,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat");var c=a("orientation",s&&!o?"h":"v"),f=c==="v"?"x":"y",h=c==="v"?"y":"x",d=o&&s?Math.min(D4.minRowLength(o)&&D4.minRowLength(s)):D4.minRowLength(r[f]||[]);if(!d){r.visible=!1;return}r._length=d;var v=xxe.getComponentMethod("calendars","handleTraceDefaults");v(t,r,["x","y"],i);var m=r[h];m&&a("histfunc"),a("histnorm"),a("autobin"+f),nbt(t,r,a,n,i),D4.coerceSelectionMarkerOpacity(r,a);var b=(r.marker.line||{}).color,p=xxe.getComponentMethod("errorbars","supplyDefaults");p(t,r,b||bxe.defaultLine,{axis:"y"}),p(t,r,b||bxe.defaultLine,{axis:"x",inherit:"y"}),a("zorder")}});var T8=ye((fcr,Mxe)=>{"use strict";var F4=Pr(),obt=hf(),w8=Oa().traceIs,sbt=e2(),lbt=i0().validateCornerradius,Axe=F4.nestedProperty,fG=Kb().getAxisGroup,Sxe=[{aStr:{x:"xbins.start",y:"ybins.start"},name:"start"},{aStr:{x:"xbins.end",y:"ybins.end"},name:"end"},{aStr:{x:"xbins.size",y:"ybins.size"},name:"size"},{aStr:{x:"nbinsx",y:"nbinsy"},name:"nbins"}],ubt=["x","y"];Mxe.exports=function(t,r){var n=r._histogramBinOpts={},i=[],a={},o=[],s,l,u,c,f,h,d;function v(G,Z){return F4.coerce(s._input,s,s._module.attributes,G,Z)}function m(G){return G.orientation==="v"?"x":"y"}function b(G,Z){var j=obt.getFromTrace({_fullLayout:r},G,Z);return j.type}function p(G,Z,j){var N=G.uid+"__"+j;Z||(Z=N);var H=b(G,j),re=G[j+"calendar"]||"",oe=n[Z],_e=!0;oe&&(H===oe.axType&&re===oe.calendar?(_e=!1,oe.traces.push(G),oe.dirs.push(j)):(Z=N,H!==oe.axType&&F4.warn(["Attempted to group the bins of trace",G.index,"set on a","type:"+H,"axis","with bins on","type:"+oe.axType,"axis."].join(" ")),re!==oe.calendar&&F4.warn(["Attempted to group the bins of trace",G.index,"set with a",re,"calendar","with bins",oe.calendar?"on a "+oe.calendar+" calendar":"w/o a set calendar"].join(" ")))),_e&&(n[Z]={traces:[G],dirs:[j],axType:H,calendar:G[j+"calendar"]||""}),G["_"+j+"bingroup"]=Z}for(f=0;f{"use strict";var cbt=IT().hoverPoints,fbt=ho().hoverLabelText;Exe.exports=function(t,r,n,i,a){var o=cbt(t,r,n,i,a);if(o){t=o[0];var s=t.cd[t.index],l=t.cd[0].trace;if(!l.cumulative.enabled){var u=l.orientation==="h"?"y":"x";t[u+"Label"]=fbt(t[u+"a"],[s.ph0,s.ph1],l[u+"hoverformat"])}return o}}});var hG=ye((dcr,Cxe)=>{"use strict";Cxe.exports=function(t,r,n,i,a){if(t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"zLabelVal"in r&&(t.z=r.zLabelVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),!(n.cumulative||{}).enabled){var o=Array.isArray(a)?i[0].pts[a[0]][a[1]]:i[a].pts;t.pointNumbers=o,t.binNumber=t.pointNumber,delete t.pointNumber,delete t.pointIndex;var s;if(n._indexToPoints){s=[];for(var l=0;l{"use strict";Lxe.exports={attributes:b8(),layoutAttributes:jI(),supplyDefaults:Txe(),crossTraceDefaults:T8(),supplyLayoutDefaults:IV(),calc:tG().calc,crossTraceCalc:t2().crossTraceCalc,plot:d2().plot,layerName:"barlayer",style:V0().style,styleOnSelect:V0().styleOnSelect,colorbar:$d(),hoverPoints:kxe(),selectPoints:RT(),eventData:hG(),moduleType:"trace",name:"histogram",basePlotModule:mh(),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}});var Rxe=ye((pcr,Ixe)=>{"use strict";Ixe.exports=Pxe()});var S8=ye((gcr,zxe)=>{"use strict";var jg=b8(),Dxe=lG(),A8=zT(),hbt=Gl(),dG=df().axisHoverFormat,{hovertemplateAttrs:dbt,texttemplateAttrs:vbt,templatefallbackAttrs:Fxe}=Ll(),pbt=Tu(),z4=Ao().extendFlat;zxe.exports=z4({x:jg.x,y:jg.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:jg.histnorm,histfunc:jg.histfunc,nbinsx:jg.nbinsx,xbins:Dxe("x"),nbinsy:jg.nbinsy,ybins:Dxe("y"),autobinx:jg.autobinx,autobiny:jg.autobiny,bingroup:z4({},jg.bingroup,{}),xbingroup:z4({},jg.bingroup,{}),ybingroup:z4({},jg.bingroup,{}),xgap:A8.xgap,ygap:A8.ygap,zsmooth:A8.zsmooth,xhoverformat:dG("x"),yhoverformat:dG("y"),zhoverformat:dG("z",1),hovertemplate:dbt({},{keys:["z"]}),hovertemplatefallback:Fxe(),texttemplate:vbt({arrayOk:!1,editType:"plot"},{keys:["z"]}),texttemplatefallback:Fxe({editType:"plot"}),textfont:A8.textfont,showlegend:z4({},hbt.showlegend,{dflt:!1})},pbt("",{cLetter:"z",autoColorDflt:!1}))});var vG=ye((mcr,Oxe)=>{"use strict";var gbt=Oa(),qxe=Pr();Oxe.exports=function(t,r,n,i){var a=n("x"),o=n("y"),s=qxe.minRowLength(a),l=qxe.minRowLength(o);if(!s||!l){r.visible=!1;return}r._length=Math.min(s,l);var u=gbt.getComponentMethod("calendars","handleTraceDefaults");u(t,r,["x","y"],i);var c=n("z")||n("marker.color");c&&n("histfunc"),n("histnorm"),n("autobinx"),n("autobiny")}});var Nxe=ye((ycr,Bxe)=>{"use strict";var mbt=Pr(),ybt=vG(),_bt=ZV(),xbt=td(),bbt=I4(),wbt=S8();Bxe.exports=function(t,r,n,i){function a(o,s){return mbt.coerce(t,r,wbt,o,s)}ybt(t,r,a,i),r.visible!==!1&&(_bt(t,r,a,i),xbt(t,r,i,a,{prefix:"",cLetter:"z"}),a("hovertemplate"),a("hovertemplatefallback"),bbt(a,i),a("xhoverformat"),a("yhoverformat"))}});var Gxe=ye((_cr,Vxe)=>{"use strict";var Tbt=x8(),Uxe=ho().hoverLabelText;Vxe.exports=function(t,r,n,i,a){var o=Tbt(t,r,n,i,a);if(o){t=o[0];var s=t.index,l=s[0],u=s[1],c=t.cd[0],f=c.trace,h=c.xRanges[u],d=c.yRanges[l];return t.xLabel=Uxe(t.xa,[h[0],h[1]],f.xhoverformat),t.yLabel=Uxe(t.ya,[d[0],d[1]],f.yhoverformat),o}}});var jxe=ye((xcr,Hxe)=>{"use strict";Hxe.exports={attributes:S8(),supplyDefaults:Nxe(),crossTraceDefaults:T8(),calc:v8(),plot:m8(),layerName:"heatmaplayer",colorbar:D_(),style:y8(),hoverPoints:Gxe(),eventData:hG(),moduleType:"trace",name:"histogram2d",basePlotModule:mh(),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}});var Xxe=ye((bcr,Wxe)=>{"use strict";Wxe.exports=jxe()});var M8=ye((wcr,Zxe)=>{"use strict";Zxe.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}});var q4=ye((Tcr,$xe)=>{"use strict";var _h=zT(),E8=pf(),Kxe=df(),pG=Kxe.axisHoverFormat,Abt=Kxe.descriptionOnlyNumbers,Sbt=Tu(),Mbt=Pd().dash,Ebt=ec(),UT=Ao().extendFlat,Jxe=M8(),kbt=Jxe.COMPARISON_OPS2,Cbt=Jxe.INTERVAL_OPS,Yxe=E8.line;$xe.exports=UT({z:_h.z,x:_h.x,x0:_h.x0,dx:_h.dx,y:_h.y,y0:_h.y0,dy:_h.dy,xperiod:_h.xperiod,yperiod:_h.yperiod,xperiod0:E8.xperiod0,yperiod0:E8.yperiod0,xperiodalignment:_h.xperiodalignment,yperiodalignment:_h.yperiodalignment,text:_h.text,hovertext:_h.hovertext,transpose:_h.transpose,xtype:_h.xtype,ytype:_h.ytype,xhoverformat:pG("x"),yhoverformat:pG("y"),zhoverformat:pG("z",1),hovertemplate:_h.hovertemplate,hovertemplatefallback:_h.hovertemplatefallback,texttemplate:UT({},_h.texttemplate,{}),texttemplatefallback:_h.texttemplatefallback,textfont:UT({},_h.textfont,{}),hoverongaps:_h.hoverongaps,connectgaps:UT({},_h.connectgaps,{}),fillcolor:{valType:"color",editType:"calc"},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0}},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc"},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc"},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1}},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc"},showlines:{valType:"boolean",dflt:!0,editType:"plot"},showlabels:{valType:"boolean",dflt:!1,editType:"plot"},labelfont:Ebt({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:Abt("contour label")},operation:{valType:"enumerated",values:[].concat(kbt).concat(Cbt),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:UT({},Yxe.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:Mbt,smoothing:UT({},Yxe.smoothing,{}),editType:"plot"},zorder:E8.zorder},Sbt("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))});var mG=ye((Acr,ebe)=>{"use strict";var wv=S8(),Bm=q4(),Lbt=Tu(),gG=df().axisHoverFormat,Qxe=Ao().extendFlat;ebe.exports=Qxe({x:wv.x,y:wv.y,z:wv.z,marker:wv.marker,histnorm:wv.histnorm,histfunc:wv.histfunc,nbinsx:wv.nbinsx,xbins:wv.xbins,nbinsy:wv.nbinsy,ybins:wv.ybins,autobinx:wv.autobinx,autobiny:wv.autobiny,bingroup:wv.bingroup,xbingroup:wv.xbingroup,ybingroup:wv.ybingroup,autocontour:Bm.autocontour,ncontours:Bm.ncontours,contours:Bm.contours,line:{color:Bm.line.color,width:Qxe({},Bm.line.width,{dflt:.5}),dash:Bm.line.dash,smoothing:Bm.line.smoothing,editType:"plot"},xhoverformat:gG("x"),yhoverformat:gG("y"),zhoverformat:gG("z",1),hovertemplate:wv.hovertemplate,hovertemplatefallback:wv.hovertemplatefallback,texttemplate:Bm.texttemplate,texttemplatefallback:Bm.texttemplatefallback,textfont:Bm.textfont},Lbt("",{cLetter:"z",editTypeOverride:"calc"}))});var k8=ye((Scr,tbe)=>{"use strict";tbe.exports=function(t,r,n,i){var a=i("contours.start"),o=i("contours.end"),s=a===!1||o===!1,l=n("contours.size"),u;s?u=r.autocontour=!0:u=n("autocontour",!1),(u||!l)&&n("ncontours")}});var yG=ye((Mcr,rbe)=>{"use strict";var Pbt=Pr();rbe.exports=function(t,r,n,i){i||(i={});var a=t("contours.showlabels");if(a){var o=r.font;Pbt.coerceFont(t,"contours.labelfont",o,{overrideDflt:{color:n}}),t("contours.labelformat")}i.hasHover!==!1&&t("zhoverformat")}});var C8=ye((Ecr,ibe)=>{"use strict";var Ibt=td(),Rbt=yG();ibe.exports=function(t,r,n,i,a){var o=n("contours.coloring"),s,l="";o==="fill"&&(s=n("contours.showlines")),s!==!1&&(o!=="lines"&&(l=n("line.color","#000")),n("line.width",.5),n("line.dash")),o!=="none"&&(t.showlegend!==!0&&(r.showlegend=!1),r._dfltShowLegend=!1,Ibt(t,r,i,n,{prefix:"",cLetter:"z"})),n("line.smoothing"),Rbt(n,i,l,a)}});var sbe=ye((kcr,obe)=>{"use strict";var nbe=Pr(),Dbt=vG(),Fbt=k8(),zbt=C8(),qbt=I4(),abe=mG();obe.exports=function(t,r,n,i){function a(s,l){return nbe.coerce(t,r,abe,s,l)}function o(s){return nbe.coerce2(t,r,abe,s)}Dbt(t,r,a,i),r.visible!==!1&&(Fbt(t,r,a,o),zbt(t,r,a,i),a("xhoverformat"),a("yhoverformat"),a("hovertemplate"),a("hovertemplatefallback"),r.contours&&r.contours.coloring==="heatmap"&&qbt(a,i))}});var bG=ye((Ccr,ube)=>{"use strict";var xG=ho(),_G=Pr();ube.exports=function(t,r){var n=t.contours;if(t.autocontour){var i=t.zmin,a=t.zmax;(t.zauto||i===void 0)&&(i=_G.aggNums(Math.min,null,r)),(t.zauto||a===void 0)&&(a=_G.aggNums(Math.max,null,r));var o=lbe(i,a,t.ncontours);n.size=o.dtick,n.start=xG.tickFirst(o),o.range.reverse(),n.end=xG.tickFirst(o),n.start===i&&(n.start+=n.size),n.end===a&&(n.end-=n.size),n.start>n.end&&(n.start=n.end=(n.start+n.end)/2),t._input.contours||(t._input.contours={}),_G.extendFlat(t._input.contours,{start:n.start,end:n.end,size:n.size}),t._input.autocontour=!0}else if(n.type!=="constraint"){var s=n.start,l=n.end,u=t._input.contours;if(s>l&&(n.start=u.start=l,l=n.end=u.end=s,s=n.start),!(n.size>0)){var c;s===l?c=1:c=lbe(s,l,t.ncontours).dtick,u.size=n.size=c}}};function lbe(e,t,r){var n={type:"linear",range:[e,t]};return xG.autoTicks(n,(t-e)/(r||15)),n}});var O4=ye((Lcr,cbe)=>{"use strict";cbe.exports=function(t){return t.end+t.size/1e6}});var wG=ye((Pcr,hbe)=>{"use strict";var fbe=tc(),Obt=v8(),Bbt=bG(),Nbt=O4();hbe.exports=function(t,r){var n=Obt(t,r),i=n[0].z;Bbt(r,i);var a=r.contours,o=fbe.extractOpts(r),s;if(a.coloring==="heatmap"&&o.auto&&r.autocontour===!1){var l=a.start,u=Nbt(a),c=a.size||1,f=Math.floor((u-l)/c)+1;isFinite(c)||(c=1,f=1);var h=l-c/2,d=h+f*c;s=[h,d]}else s=i;return fbe.calc(t,r,{vals:s,cLetter:"z"}),n}});var B4=ye((Icr,dbe)=>{"use strict";dbe.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}});var TG=ye((Rcr,vbe)=>{"use strict";var L8=B4();vbe.exports=function(t){var r=t[0].z,n=r.length,i=r[0].length,a=n===2||i===2,o,s,l,u,c,f,h,d,v;for(s=0;se?0:1)+(t[0][1]>e?0:2)+(t[1][1]>e?0:4)+(t[1][0]>e?0:8);if(r===5||r===10){var n=(t[0][0]+t[0][1]+t[1][0]+t[1][1])/4;return e>n?r===5?713:1114:r===5?104:208}return r===15?0:r}});var AG=ye((Dcr,mbe)=>{"use strict";var P8=Pr(),VT=B4();mbe.exports=function(t,r,n){var i,a,o,s,l;for(r=r||.01,n=n||.01,o=0;o20?(o=VT.CHOOSESADDLE[o][(s[0]||s[1])<0?0:1],e.crossings[a]=VT.SADDLEREMAINDER[o]):delete e.crossings[a],s=VT.NEWDELTA[o],!s){P8.log("Found bad marching index:",o,t,e.level);break}l.push(gbe(e,t,s)),t[0]+=s[0],t[1]+=s[1],a=t.join(","),N4(l[l.length-1],l[l.length-2],n,i)&&l.pop();var v=s[0]&&(t[0]<0||t[0]>c-2)||s[1]&&(t[1]<0||t[1]>u-2),m=t[0]===f[0]&&t[1]===f[1]&&s[0]===h[0]&&s[1]===h[1];if(m||r&&v)break;o=e.crossings[a]}d===1e4&&P8.log("Infinite loop in contour?");var b=N4(l[0],l[l.length-1],n,i),p=0,k=.2*e.smoothing,M=[],T=0,L,x,C,S,g,P,E,z,q,U,G;for(d=1;d=T;d--)if(L=M[d],L=T&&L+M[x]z&&q--,e.edgepaths[q]=G.concat(l,U));break}H||(e.edgepaths[z]=l.concat(U))}for(z=0;z20&&t?e===208||e===1114?n=r[0]===0?1:-1:i=r[1]===0?1:-1:VT.BOTTOMSTART.indexOf(e)!==-1?i=1:VT.LEFTSTART.indexOf(e)!==-1?n=1:VT.TOPSTART.indexOf(e)!==-1?i=-1:n=-1,[n,i]}function gbe(e,t,r){var n=t[0]+Math.max(r[0],0),i=t[1]+Math.max(r[1],0),a=e.z[i][n],o=e.xaxis,s=e.yaxis;if(r[1]){var l=(e.level-a)/(e.z[i][n+1]-a),u=(l!==1?(1-l)*o.c2l(e.x[n]):0)+(l!==0?l*o.c2l(e.x[n+1]):0);return[o.c2p(o.l2c(u),!0),s.c2p(e.y[i],!0),n+l,i]}else{var c=(e.level-a)/(e.z[i+1][n]-a),f=(c!==1?(1-c)*s.c2l(e.y[i]):0)+(c!==0?c*s.c2l(e.y[i+1]):0);return[o.c2p(e.x[n],!0),s.c2p(s.l2c(f),!0),n,i+c]}}});var bbe=ye((Fcr,xbe)=>{"use strict";var SG=M8(),Hbt=Eo();xbe.exports={"[]":ybe("[]"),"][":ybe("]["),">":MG(">"),"<":MG("<"),"=":MG("=")};function _be(e,t){var r=Array.isArray(t),n;function i(a){return Hbt(a)?+a:null}return SG.COMPARISON_OPS2.indexOf(e)!==-1?n=i(r?t[0]:t):SG.INTERVAL_OPS.indexOf(e)!==-1?n=r?[i(t[0]),i(t[1])]:[i(t),i(t)]:SG.SET_OPS.indexOf(e)!==-1&&(n=r?t.map(i):[i(t)]),n}function ybe(e){return function(t){t=_be(e,t);var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]);return{start:r,end:n,size:n-r}}}function MG(e){return function(t){return t=_be(e,t),{start:t,end:1/0,size:1/0}}}});var EG=ye((zcr,Tbe)=>{"use strict";var wbe=Pr(),jbt=bbe(),Wbt=O4();Tbe.exports=function(t,r,n){for(var i=t.type==="constraint"?jbt[t._operation](t.value):t,a=i.size,o=[],s=Wbt(i),l=n.trace._carpetTrace,u=l?{xaxis:l.aaxis,yaxis:l.baxis,x:n.a,y:n.b}:{xaxis:r.xaxis,yaxis:r.yaxis,x:n.x,y:n.y},c=i.start;c1e3){wbe.warn("Too many contours, clipping at 1000",t);break}return o}});var kG=ye((qcr,Sbe)=>{"use strict";var GT=Pr();Sbe.exports=function(e,t){var r,n,i,a=function(l){return l.reverse()},o=function(l){return l};switch(t){case"=":case"<":return e;case">":for(e.length!==1&>.warn("Contour data invalid for the specified inequality operation."),n=e[0],r=0;r{"use strict";Mbe.exports=function(e,t){var r=e[0],n=r.z,i;switch(t.type){case"levels":var a=Math.min(n[0][0],n[0][1]);for(i=0;io.level||o.starts.length&&a===o.level)}break;case"constraint":if(r.prefixBoundary=!1,r.edgepaths.length)return;var s=r.x.length,l=r.y.length,u=-1/0,c=1/0;for(i=0;i":f>u&&(r.prefixBoundary=!0);break;case"<":(fu||r.starts.length&&d===c)&&(r.prefixBoundary=!0);break;case"][":h=Math.min(f[0],f[1]),d=Math.max(f[0],f[1]),hu&&(r.prefixBoundary=!0);break}break}}});var I8=ye(jv=>{"use strict";var V4=qa(),Fd=Pr(),jy=So(),Xbt=tc(),Cbe=Zl(),Ebe=ho(),kbe=xm(),Zbt=m8(),Lbe=TG(),Pbe=AG(),Ybt=EG(),Kbt=kG(),Ibe=CG(),U4=B4(),Nm=U4.LABELOPTIMIZER;jv.plot=function(t,r,n,i){var a=r.xaxis,o=r.yaxis;Fd.makeTraceGroups(i,n,"contour").each(function(s){var l=V4.select(this),u=s[0],c=u.trace,f=u.x,h=u.y,d=c.contours,v=Ybt(d,r,u),m=Fd.ensureSingle(l,"g","heatmapcoloring"),b=[];d.coloring==="heatmap"&&(b=[s]),Zbt(t,r,b,m),Lbe(v),Pbe(v);var p=a.c2p(f[0],!0),k=a.c2p(f[f.length-1],!0),M=o.c2p(h[0],!0),T=o.c2p(h[h.length-1],!0),L=[[p,T],[k,T],[k,M],[p,M]],x=v;d.type==="constraint"&&(x=Kbt(v,d._operation)),Jbt(l,L,d),$bt(l,x,L,d),Qbt(l,v,t,u,d),t2t(l,r,t,u,L)})};function Jbt(e,t,r){var n=Fd.ensureSingle(e,"g","contourbg"),i=n.selectAll("path").data(r.coloring==="fill"?[0]:[]);i.enter().append("path"),i.exit().remove(),i.attr("d","M"+t.join("L")+"Z").style("stroke","none")}function $bt(e,t,r,n){var i=n.coloring==="fill"||n.type==="constraint"&&n._operation!=="=",a="M"+r.join("L")+"Z";i&&Ibe(t,n);var o=Fd.ensureSingle(e,"g","contourfill"),s=o.selectAll("path").data(i?t:[]);s.enter().append("path"),s.exit().remove(),s.each(function(l){var u=(l.prefixBoundary?a:"")+Rbe(l,r);u?V4.select(this).attr("d",u).style("stroke","none"):V4.select(this).remove()})}function Rbe(e,t){var r="",n=0,i=e.edgepaths.map(function(p,k){return k}),a=!0,o,s,l,u,c,f;function h(p){return Math.abs(p[1]-t[0][1])<.01}function d(p){return Math.abs(p[1]-t[2][1])<.01}function v(p){return Math.abs(p[0]-t[0][0])<.01}function m(p){return Math.abs(p[0]-t[2][0])<.01}for(;i.length;){for(f=jy.smoothopen(e.edgepaths[n],e.smoothing),r+=a?f:f.replace(/^M/,"L"),i.splice(i.indexOf(n),1),o=e.edgepaths[n][e.edgepaths[n].length-1],u=-1,l=0;l<4;l++){if(!o){Fd.log("Missing end?",n,e);break}for(h(o)&&!m(o)?s=t[1]:v(o)?s=t[0]:d(o)?s=t[3]:m(o)&&(s=t[2]),c=0;c=0&&(s=b,u=c):Math.abs(o[1]-s[1])<.01?Math.abs(o[1]-b[1])<.01&&(b[0]-o[0])*(s[0]-b[0])>=0&&(s=b,u=c):Fd.log("endpt to newendpt is not vert. or horz.",o,s,b)}if(o=s,u>=0)break;r+="L"+s}if(u===e.edgepaths.length){Fd.log("unclosed perimeter path");break}n=u,a=i.indexOf(n)===-1,a&&(n=i[0],r+="Z")}for(n=0;nNm.MAXCOST*2)break;h&&(s/=2),o=u-s/2,l=o+s*1.5}if(f<=Nm.MAXCOST)return c};function e2t(e,t,r,n){var i=t.width/2,a=t.height/2,o=e.x,s=e.y,l=e.theta,u=Math.cos(l)*i,c=Math.sin(l)*i,f=(o>n.center?n.right-o:o-n.left)/(u+Math.abs(Math.sin(l)*a)),h=(s>n.middle?n.bottom-s:s-n.top)/(Math.abs(c)+Math.cos(l)*a);if(f<1||h<1)return 1/0;var d=Nm.EDGECOST*(1/(f-1)+1/(h-1));d+=Nm.ANGLECOST*l*l;for(var v=o-u,m=s-c,b=o+u,p=s+c,k=0;k{"use strict";var i2t=qa(),LG=tc(),n2t=O4();Dbe.exports=function(t){var r=t.contours,n=r.start,i=n2t(r),a=r.size||1,o=Math.floor((i-n)/a)+1,s=r.coloring==="lines"?0:1,l=LG.extractOpts(t);isFinite(a)||(a=1,o=1);var u=l.reversescale?LG.flipScale(l.colorscale):l.colorscale,c=u.length,f=new Array(c),h=new Array(c),d,v,m=l.min,b=l.max;if(r.coloring==="heatmap"){for(v=0;v=b)&&(n<=m&&(n=m),i>=b&&(i=b),o=Math.floor((i-n)/a)+1,s=0),v=0;vm&&(f.unshift(m),h.unshift(h[0])),f[f.length-1]{"use strict";var R8=qa(),Fbe=So(),a2t=y8(),o2t=PG();zbe.exports=function(t){var r=R8.select(t).selectAll("g.contour");r.style("opacity",function(n){return n[0].trace.opacity}),r.each(function(n){var i=R8.select(this),a=n[0].trace,o=a.contours,s=a.line,l=o.size||1,u=o.start,c=o.type==="constraint",f=!c&&o.coloring==="lines",h=!c&&o.coloring==="fill",d=f||h?o2t(a):null;i.selectAll("g.contourlevel").each(function(b){R8.select(this).selectAll("path").call(Fbe.lineGroupStyle,s.width,f?d(b.level):s.color,s.dash)});var v=o.labelfont;if(i.selectAll("g.contourlabels text").each(function(b){Fbe.font(R8.select(this),{weight:v.weight,style:v.style,variant:v.variant,textcase:v.textcase,lineposition:v.lineposition,shadow:v.shadow,family:v.family,size:v.size,color:v.color||(f?d(b.level):s.color)})}),c)i.selectAll("g.contourfill path").style("fill",a.fillcolor);else if(h){var m;i.selectAll("g.contourfill path").style("fill",function(b){return m===void 0&&(m=b.level),d(b.level+.5*l)}),m===void 0&&(m=u),i.selectAll("g.contourbg path").style("fill",d(m-.5*l))}}),a2t(t)}});var F8=ye((Vcr,Obe)=>{"use strict";var qbe=tc(),s2t=PG(),l2t=O4();function u2t(e,t,r){var n=t.contours,i=t.line,a=n.size||1,o=n.coloring,s=s2t(t,{isColorbar:!0});if(o==="heatmap"){var l=qbe.extractOpts(t);r._fillgradient=l.reversescale?qbe.flipScale(l.colorscale):l.colorscale,r._zrange=[l.min,l.max]}else o==="fill"&&(r._fillcolor=s);r._line={color:o==="lines"?s:i.color,width:n.showlines!==!1?i.width:0,dash:i.dash},r._levels={start:n.start,end:l2t(n),size:a}}Obe.exports={min:"zmin",max:"zmax",calc:u2t}});var IG=ye((Gcr,Bbe)=>{"use strict";var z8=ka(),c2t=x8();Bbe.exports=function(t,r,n,i,a){a||(a={}),a.isContour=!0;var o=c2t(t,r,n,i,a);return o&&o.forEach(function(s){var l=s.trace;l.contours.type==="constraint"&&(l.fillcolor&&z8.opacity(l.fillcolor)?s.color=z8.addOpacity(l.fillcolor,1):l.contours.showlines&&z8.opacity(l.line.color)&&(s.color=z8.addOpacity(l.line.color,1)))}),o}});var Ube=ye((Hcr,Nbe)=>{"use strict";Nbe.exports={attributes:mG(),supplyDefaults:sbe(),crossTraceDefaults:T8(),calc:wG(),plot:I8().plot,layerName:"contourlayer",style:D8(),colorbar:F8(),hoverPoints:IG(),moduleType:"trace",name:"histogram2dcontour",basePlotModule:mh(),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}});var Gbe=ye((jcr,Vbe)=>{"use strict";Vbe.exports=Ube()});var RG=ye((Wcr,Ybe)=>{"use strict";var Hbe=Eo(),f2t=yG(),Xbe=ka(),jbe=Xbe.addOpacity,h2t=Xbe.opacity,Zbe=M8(),Wbe=Pr().isArrayOrTypedArray,d2t=Zbe.CONSTRAINT_REDUCTION,v2t=Zbe.COMPARISON_OPS2;Ybe.exports=function(t,r,n,i,a,o){var s=r.contours,l,u,c,f=n("contours.operation");if(s._operation=d2t[f],p2t(n,s),f==="="?l=s.showlines=!0:(l=n("contours.showlines"),c=n("fillcolor",jbe((t.line||{}).color||a,.5))),l){var h=c&&h2t(c)?jbe(r.fillcolor,1):a;u=n("line.color",h),n("line.width",2),n("line.dash")}n("line.smoothing"),f2t(n,i,u,o)};function p2t(e,t){var r;v2t.indexOf(t.operation)===-1?(e("contours.value",[0,1]),Wbe(t.value)?t.value.length>2?t.value=t.value.slice(2):t.length===0?t.value=[0,1]:t.length<2?(r=parseFloat(t.value[0]),t.value=[r,r+1]):t.value=[parseFloat(t.value[0]),parseFloat(t.value[1])]:Hbe(t.value)&&(r=parseFloat(t.value),t.value=[r,r+1])):(e("contours.value",0),Hbe(t.value)||(Wbe(t.value)?t.value=parseFloat(t.value[0]):t.value=0))}});var $be=ye((Xcr,Jbe)=>{"use strict";var DG=Pr(),g2t=n8(),m2t=Dg(),y2t=RG(),_2t=k8(),x2t=C8(),b2t=I4(),Kbe=q4();Jbe.exports=function(t,r,n,i){function a(u,c){return DG.coerce(t,r,Kbe,u,c)}function o(u){return DG.coerce2(t,r,Kbe,u)}var s=g2t(t,r,a,i);if(!s){r.visible=!1;return}m2t(t,r,i,a),a("xhoverformat"),a("yhoverformat"),a("text"),a("hovertext"),a("hoverongaps"),a("hovertemplate"),a("hovertemplatefallback");var l=a("contours.type")==="constraint";a("connectgaps",DG.isArray1D(r.z)),l?y2t(t,r,a,i,n):(_2t(t,r,a,o),x2t(t,r,a,i)),r.contours&&r.contours.coloring==="heatmap"&&b2t(a,i),a("zorder")}});var e2e=ye((Zcr,Qbe)=>{"use strict";Qbe.exports={attributes:q4(),supplyDefaults:$be(),calc:wG(),plot:I8().plot,style:D8(),colorbar:F8(),hoverPoints:IG(),moduleType:"trace",name:"contour",basePlotModule:mh(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}});var r2e=ye((Ycr,t2e)=>{"use strict";t2e.exports=e2e()});var FG=ye((Kcr,o2e)=>{"use strict";var{hovertemplateAttrs:w2t,texttemplateAttrs:T2t,templatefallbackAttrs:i2e}=Ll(),A2t=Pg(),o0=pf(),S2t=Gl(),n2e=Tu(),M2t=Pd().dash,F_=Ao().extendFlat,X0=o0.marker,G4=o0.line,a2e=X0.line;o2e.exports={a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},c:{valType:"data_array",editType:"calc"},sum:{valType:"number",dflt:0,min:0,editType:"calc"},mode:F_({},o0.mode,{dflt:"markers"}),text:F_({},o0.text,{}),texttemplate:T2t({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:i2e({editType:"plot"}),hovertext:F_({},o0.hovertext,{}),line:{color:G4.color,width:G4.width,dash:M2t,backoff:G4.backoff,shape:F_({},G4.shape,{values:["linear","spline"]}),smoothing:G4.smoothing,editType:"calc"},connectgaps:o0.connectgaps,cliponaxis:o0.cliponaxis,fill:F_({},o0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:A2t(),marker:F_({symbol:X0.symbol,opacity:X0.opacity,angle:X0.angle,angleref:X0.angleref,standoff:X0.standoff,maxdisplayed:X0.maxdisplayed,size:X0.size,sizeref:X0.sizeref,sizemin:X0.sizemin,sizemode:X0.sizemode,line:F_({width:a2e.width,dash:a2e.dash,editType:"calc"},n2e("marker.line")),gradient:X0.gradient,editType:"calc"},n2e("marker")),textfont:o0.textfont,textposition:o0.textposition,selected:o0.selected,unselected:o0.unselected,hoverinfo:F_({},S2t.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:o0.hoveron,hovertemplate:w2t(),hovertemplatefallback:i2e()}});var c2e=ye((Jcr,u2e)=>{"use strict";var s2e=Pr(),E2t=Lm(),HT=Ru(),k2t=$p(),C2t=D0(),l2e=lT(),L2t=F0(),P2t=Fg(),I2t=FG();u2e.exports=function(t,r,n,i){function a(h,d){return s2e.coerce(t,r,I2t,h,d)}var o=a("a"),s=a("b"),l=a("c"),u;if(o?(u=o.length,s?(u=Math.min(u,s.length),l&&(u=Math.min(u,l.length))):l?u=Math.min(u,l.length):u=0):s&&l&&(u=Math.min(s.length,l.length)),!u){r.visible=!1;return}r._length=u,a("sum"),a("text"),a("hovertext"),r.hoveron!=="fills"&&(a("hovertemplate"),a("hovertemplatefallback"));var c=u{"use strict";var zG=ho();f2e.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot;return i.aLabel=zG.tickText(a.aaxis,t.a,!0).text,i.bLabel=zG.tickText(a.baxis,t.b,!0).text,i.cLabel=zG.tickText(a.caxis,t.c,!0).text,i}});var g2e=ye((Qcr,p2e)=>{"use strict";var qG=Eo(),R2t=z0(),D2t=Rm(),F2t=q0(),z2t=O0().calcMarkerSize,d2e=["a","b","c"],v2e={a:["b","c"],b:["a","c"],c:["a","b"]};p2e.exports=function(t,r){var n=t._fullLayout[r.subplot],i=n.sum,a=r.sum||i,o={a:r.a,b:r.b,c:r.c},s=r.ids,l,u,c,f,h,d;for(l=0;l{"use strict";var q2t=vT();m2e.exports=function(t,r,n){var i=r.plotContainer;i.select(".scatterlayer").selectAll("*").remove();for(var a=r.xaxis,o=r.yaxis,s={xaxis:a,yaxis:o,plot:i,layerClipId:r._hasClipOnAxisFalse?r.clipIdRelative:null},l=r.layers.frontplot.select("g.scatterlayer"),u=0;u{"use strict";var O2t=yT();_2e.exports=function(t,r,n,i){var a=O2t(t,r,n,i);if(!a||a[0].index===!1)return;var o=a[0];if(o.index===void 0){var s=1-o.y0/t.ya._length,l=t.xa._length,u=l*s/2,c=l-u;return o.x0=Math.max(Math.min(o.x0,c),u),o.x1=Math.max(Math.min(o.x1,c),u),a}var f=o.cd[o.index],h=o.trace,d=o.subplot;o.a=f.a,o.b=f.b,o.c=f.c,o.xLabelVal=void 0,o.yLabelVal=void 0;var v={};v[h.subplot]={_subplot:d};var m=h._module.formatLabels(f,h,v);o.aLabel=m.aLabel,o.bLabel=m.bLabel,o.cLabel=m.cLabel;var b=f.hi||h.hoverinfo,p=[];function k(T,L){p.push(T._hovertitle+": "+L)}if(!h.hovertemplate){var M=b.split("+");M.indexOf("all")!==-1&&(M=["a","b","c"]),M.indexOf("a")!==-1&&k(d.aaxis,o.aLabel),M.indexOf("b")!==-1&&k(d.baxis,o.bLabel),M.indexOf("c")!==-1&&k(d.caxis,o.cLabel)}return o.extraText=p.join("
"),o.hovertemplate=h.hovertemplate,a}});var w2e=ye((rfr,b2e)=>{"use strict";b2e.exports=function(t,r,n,i,a){if(r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),i[a]){var o=i[a];t.a=o.a,t.b=o.b,t.c=o.c}else t.a=r.a,t.b=r.b,t.c=r.c;return t}});var R2e=ye((ifr,I2e)=>{"use strict";var k2e=qa(),B2t=fd(),OG=Oa(),Wy=Pr(),Um=Wy.strTranslate,q8=Wy._,WT=ka(),O8=So(),H4=xm(),BG=Ao().extendFlat,N2t=Mc(),z_=ho(),T2e=yv(),A2e=vf(),C2e=Cg(),S2e=C2e.freeMode,U2t=C2e.rectMode,NG=zb(),V2t=qf().prepSelect,G2t=qf().selectOnClick,H2t=qf().clearOutline,j2t=qf().clearSelectionsCache,L2e=Rh();function P2e(e,t){this.id=e.id,this.graphDiv=e.graphDiv,this.init(t),this.makeFramework(t),this.updateFx(t),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}I2e.exports=P2e;var Vm=P2e.prototype;Vm.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}};Vm.plot=function(e,t){var r=this,n=t[r.id],i=t._size;r._hasClipOnAxisFalse=!1;for(var a=0;ajT*u?(p=u,b=p*jT):(b=l,p=b/jT),k=o*b/l,M=s*p/u,v=t.l+t.w*i-b/2,m=t.t+t.h*(1-a)-p/2,r.x0=v,r.y0=m,r.w=b,r.h=p,r.sum=c,r.xaxis={type:"linear",range:[f+2*d-c,c-f-2*h],domain:[i-k/2,i+k/2],_id:"x"},H4(r.xaxis,r.graphDiv._fullLayout),r.xaxis.setScale(),r.xaxis.isPtWithinRange=function(U){return U.a>=r.aaxis.range[0]&&U.a<=r.aaxis.range[1]&&U.b>=r.baxis.range[1]&&U.b<=r.baxis.range[0]&&U.c>=r.caxis.range[1]&&U.c<=r.caxis.range[0]},r.yaxis={type:"linear",range:[f,c-h-d],domain:[a-M/2,a+M/2],_id:"y"},H4(r.yaxis,r.graphDiv._fullLayout),r.yaxis.setScale(),r.yaxis.isPtWithinRange=function(){return!0};var T=r.yaxis.domain[0],L=r.aaxis=BG({},e.aaxis,{range:[f,c-h-d],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[T,T+M*jT],anchor:"free",position:0,_id:"y",_length:b});H4(L,r.graphDiv._fullLayout),L.setScale();var x=r.baxis=BG({},e.baxis,{range:[c-f-d,h],side:"bottom",domain:r.xaxis.domain,anchor:"free",position:0,_id:"x",_length:b});H4(x,r.graphDiv._fullLayout),x.setScale();var C=r.caxis=BG({},e.caxis,{range:[c-f-h,d],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[T,T+M*jT],anchor:"free",position:0,_id:"y",_length:b});H4(C,r.graphDiv._fullLayout),C.setScale();var S="M"+v+","+(m+p)+"h"+b+"l-"+b/2+",-"+p+"Z";r.clipDef.select("path").attr("d",S),r.layers.plotbg.select("path").attr("d",S);var g="M0,"+p+"h"+b+"l-"+b/2+",-"+p+"Z";r.clipDefRelative.select("path").attr("d",g);var P=Um(v,m);r.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",P),r.clipDefRelative.select("path").attr("transform",null);var E=Um(v-x._offset,m+p);r.layers.baxis.attr("transform",E),r.layers.bgrid.attr("transform",E);var z=Um(v+b/2,m)+"rotate(30)"+Um(0,-L._offset);r.layers.aaxis.attr("transform",z),r.layers.agrid.attr("transform",z);var q=Um(v+b/2,m)+"rotate(-30)"+Um(0,-C._offset);r.layers.caxis.attr("transform",q),r.layers.cgrid.attr("transform",q),r.drawAxes(!0),r.layers.aline.select("path").attr("d",L.showline?"M"+v+","+(m+p)+"l"+b/2+",-"+p:"M0,0").call(WT.stroke,L.linecolor||"#000").style("stroke-width",(L.linewidth||0)+"px"),r.layers.bline.select("path").attr("d",x.showline?"M"+v+","+(m+p)+"h"+b:"M0,0").call(WT.stroke,x.linecolor||"#000").style("stroke-width",(x.linewidth||0)+"px"),r.layers.cline.select("path").attr("d",C.showline?"M"+(v+b/2)+","+m+"l"+b/2+","+p:"M0,0").call(WT.stroke,C.linecolor||"#000").style("stroke-width",(C.linewidth||0)+"px"),r.graphDiv._context.staticPlot||r.initInteractions(),O8.setClipUrl(r.layers.frontplot,r._hasClipOnAxisFalse?null:r.clipId,r.graphDiv)};Vm.drawAxes=function(e){var t=this,r=t.graphDiv,n=t.id.slice(7)+"title",i=t.layers,a=t.aaxis,o=t.baxis,s=t.caxis;if(t.drawAx(a),t.drawAx(o),t.drawAx(s),e){var l=Math.max(a.showticklabels?a.tickfont.size/2:0,(s.showticklabels?s.tickfont.size*.75:0)+(s.ticks==="outside"?s.ticklen*.87:0)),u=(o.showticklabels?o.tickfont.size:0)+(o.ticks==="outside"?o.ticklen:0)+3;i["a-title"]=NG.draw(r,"a"+n,{propContainer:a,propName:t.id+".aaxis.title.text",placeholder:q8(r,"Click to enter Component A title"),attributes:{x:t.x0+t.w/2,y:t.y0-a.title.font.size/3-l,"text-anchor":"middle"}}),i["b-title"]=NG.draw(r,"b"+n,{propContainer:o,propName:t.id+".baxis.title.text",placeholder:q8(r,"Click to enter Component B title"),attributes:{x:t.x0-u,y:t.y0+t.h+o.title.font.size*.83+u,"text-anchor":"middle"}}),i["c-title"]=NG.draw(r,"c"+n,{propContainer:s,propName:t.id+".caxis.title.text",placeholder:q8(r,"Click to enter Component C title"),attributes:{x:t.x0+t.w+u,y:t.y0+t.h+s.title.font.size*.83+u,"text-anchor":"middle"}})}};Vm.drawAx=function(e){var t=this,r=t.graphDiv,n=e._name,i=n.charAt(0),a=e._id,o=t.layers[n],s=30,l=i+"tickLayout",u=W2t(e);t[l]!==u&&(o.selectAll("."+a+"tick").remove(),t[l]=u),e.setScale();var c=z_.calcTicks(e),f=z_.clipEnds(e,c),h=z_.makeTransTickFn(e),d=z_.getTickSigns(e)[2],v=Wy.deg2rad(s),m=d*(e.linewidth||1)/2,b=d*e.ticklen,p=t.w,k=t.h,M=i==="b"?"M0,"+m+"l"+Math.sin(v)*b+","+Math.cos(v)*b:"M"+m+",0l"+Math.cos(v)*b+","+-Math.sin(v)*b,T={a:"M0,0l"+k+",-"+p/2,b:"M0,0l-"+p/2+",-"+k,c:"M0,0l-"+k+","+p/2}[i];z_.drawTicks(r,e,{vals:e.ticks==="inside"?f:c,layer:o,path:M,transFn:h,crisp:!1}),z_.drawGrid(r,e,{vals:f,layer:t.layers[i+"grid"],path:T,transFn:h,crisp:!1}),z_.drawLabels(r,e,{vals:c,layer:o,transFn:h,labelFns:z_.makeLabelFns(e,0,s)})};function W2t(e){return e.ticks+String(e.ticklen)+String(e.showticklabels)}var yd=L2e.MINZOOM/2+.87,X2t="m-0.87,.5h"+yd+"v3h-"+(yd+5.2)+"l"+(yd/2+2.6)+",-"+(yd*.87+4.5)+"l2.6,1.5l-"+yd/2+","+yd*.87+"Z",Z2t="m0.87,.5h-"+yd+"v3h"+(yd+5.2)+"l-"+(yd/2+2.6)+",-"+(yd*.87+4.5)+"l-2.6,1.5l"+yd/2+","+yd*.87+"Z",Y2t="m0,1l"+yd/2+","+yd*.87+"l2.6,-1.5l-"+(yd/2+2.6)+",-"+(yd*.87+4.5)+"l-"+(yd/2+2.6)+","+(yd*.87+4.5)+"l2.6,1.5l"+yd/2+",-"+yd*.87+"Z",K2t="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",M2e=!0;Vm.clearOutline=function(){j2t(this.dragOptions),H2t(this.dragOptions.gd)};Vm.initInteractions=function(){var e=this,t=e.layers.plotbg.select("path").node(),r=e.graphDiv,n=r._fullLayout._zoomlayer,i,a;this.dragOptions={element:t,gd:r,plotinfo:{id:e.id,domain:r._fullLayout[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis},subplot:e.id,prepFn:function(E,z,q){e.dragOptions.xaxes=[e.xaxis],e.dragOptions.yaxes=[e.yaxis],i=r._fullLayout._invScaleX,a=r._fullLayout._invScaleY;var U=e.dragOptions.dragmode=r._fullLayout.dragmode;S2e(U)?e.dragOptions.minDrag=1:e.dragOptions.minDrag=void 0,U==="zoom"?(e.dragOptions.moveFn=x,e.dragOptions.clickFn=p,e.dragOptions.doneFn=C,k(E,z,q)):U==="pan"?(e.dragOptions.moveFn=g,e.dragOptions.clickFn=p,e.dragOptions.doneFn=P,S(),e.clearOutline(r)):(U2t(U)||S2e(U))&&V2t(E,z,q,e.dragOptions,U)}};var o,s,l,u,c,f,h,d,v,m;function b(E){var z={};return z[e.id+".aaxis.min"]=E.a,z[e.id+".baxis.min"]=E.b,z[e.id+".caxis.min"]=E.c,z}function p(E,z){var q=r._fullLayout.clickmode;E2e(r),E===2&&(r.emit("plotly_doubleclick",null),OG.call("_guiRelayout",r,b({a:0,b:0,c:0}))),q.indexOf("select")>-1&&E===1&&G2t(z,r,[e.xaxis],[e.yaxis],e.id,e.dragOptions),q.indexOf("event")>-1&&A2e.click(r,z,e.id)}function k(E,z,q){var U=t.getBoundingClientRect();o=z-U.left,s=q-U.top,r._fullLayout._calcInverseTransform(r);var G=r._fullLayout._invTransform,Z=Wy.apply3DTransform(G)(o,s);o=Z[0],s=Z[1],l={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},c=l,u=e.aaxis.range[1]-l.a,f=B2t(e.graphDiv._fullLayout[e.id].bgcolor).getLuminance(),h="M0,"+e.h+"L"+e.w/2+", 0L"+e.w+","+e.h+"Z",d=!1,v=n.append("path").attr("class","zoombox").attr("transform",Um(e.x0,e.y0)).style({fill:f>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",h),m=n.append("path").attr("class","zoombox-corners").attr("transform",Um(e.x0,e.y0)).style({fill:WT.background,stroke:WT.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),e.clearOutline(r)}function M(E,z){return 1-z/e.h}function T(E,z){return 1-(E+(e.h-z)/Math.sqrt(3))/e.w}function L(E,z){return(E-(e.h-z)/Math.sqrt(3))/e.w}function x(E,z){var q=o+E*i,U=s+z*a,G=Math.max(0,Math.min(1,M(o,s),M(q,U))),Z=Math.max(0,Math.min(1,T(o,s),T(q,U))),j=Math.max(0,Math.min(1,L(o,s),L(q,U))),N=(G/2+j)*e.w,H=(1-G/2-Z)*e.w,re=(N+H)/2,oe=H-N,_e=(1-G)*e.h,ke=_e-oe/jT;oe.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),m.transition().style("opacity",1).duration(200),d=!0),r.emit("plotly_relayouting",b(c))}function C(){E2e(r),c!==l&&(OG.call("_guiRelayout",r,b(c)),M2e&&r.data&&r._context.showTips&&(Wy.notifier(q8(r,"Double-click to zoom back out"),"long",r),M2e=!1))}function S(){l={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},c=l}function g(E,z){var q=E/e.xaxis._m,U=z/e.yaxis._m;c={a:l.a-U,b:l.b+(q+U)/2,c:l.c-(q-U)/2};var G=[c.a,c.b,c.c].sort(Wy.sorterAsc),Z={a:G.indexOf(c.a),b:G.indexOf(c.b),c:G.indexOf(c.c)};G[0]<0&&(G[1]+G[0]/2<0?(G[2]+=G[0]+G[1],G[0]=G[1]=0):(G[2]+=G[0]/2,G[1]+=G[0]/2,G[0]=0),c={a:G[Z.a],b:G[Z.b],c:G[Z.c]},z=(l.a-c.a)*e.yaxis._m,E=(l.c-c.c-l.b+c.b)*e.xaxis._m);var j=Um(e.x0+E,e.y0+z);e.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",j);var N=Um(-E,-z);e.clipDefRelative.select("path").attr("transform",N),e.aaxis.range=[c.a,e.sum-c.b-c.c],e.baxis.range=[e.sum-c.a-c.c,c.b],e.caxis.range=[e.sum-c.a-c.b,c.c],e.drawAxes(!1),e._hasClipOnAxisFalse&&e.plotContainer.select(".scatterlayer").selectAll(".trace").call(O8.hideOutsideRangePoints,e),r.emit("plotly_relayouting",b(c))}function P(){OG.call("_guiRelayout",r,b(c))}t.onmousemove=function(E){A2e.hover(r,E,e.id),r._fullLayout._lasthover=t,r._fullLayout._hoversubplot=e.id},t.onmouseout=function(E){r._dragging||T2e.unhover(r,E)},T2e.init(this.dragOptions)};function E2e(e){k2e.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}});var GG=ye((nfr,D2e)=>{"use strict";var J2t=Ih(),$2t=Cc().attributes,su=Rd(),Q2t=mc().overrideAll,UG=Ao().extendFlat,VG={title:{text:su.title.text,font:su.title.font},color:su.color,tickmode:su.minor.tickmode,nticks:UG({},su.nticks,{dflt:6,min:1}),tick0:su.tick0,dtick:su.dtick,tickvals:su.tickvals,ticktext:su.ticktext,ticks:su.ticks,ticklen:su.ticklen,tickwidth:su.tickwidth,tickcolor:su.tickcolor,ticklabelstep:su.ticklabelstep,showticklabels:su.showticklabels,labelalias:su.labelalias,showtickprefix:su.showtickprefix,tickprefix:su.tickprefix,showticksuffix:su.showticksuffix,ticksuffix:su.ticksuffix,showexponent:su.showexponent,exponentformat:su.exponentformat,minexponent:su.minexponent,separatethousands:su.separatethousands,tickfont:su.tickfont,tickangle:su.tickangle,tickformat:su.tickformat,tickformatstops:su.tickformatstops,hoverformat:su.hoverformat,showline:UG({},su.showline,{dflt:!0}),linecolor:su.linecolor,linewidth:su.linewidth,showgrid:UG({},su.showgrid,{dflt:!0}),gridcolor:su.gridcolor,gridwidth:su.gridwidth,griddash:su.griddash,layer:su.layer,min:{valType:"number",dflt:0,min:0}},B8=D2e.exports=Q2t({domain:$2t({name:"ternary"}),bgcolor:{valType:"color",dflt:J2t.background},sum:{valType:"number",dflt:1,min:0},aaxis:VG,baxis:VG,caxis:VG},"plot","from-root");B8.uirevision={valType:"any",editType:"none"};B8.aaxis.uirevision=B8.baxis.uirevision=B8.caxis.uirevision={valType:"any",editType:"none"}});var q_=ye((afr,F2e)=>{"use strict";var ewt=Pr(),twt=vl(),rwt=Cc().defaults;F2e.exports=function(t,r,n,i){var a=i.type,o=i.attributes,s=i.handleDefaults,l=i.partition||"x",u=r._subplots[a],c=u.length,f=c&&u[0].replace(/\d+$/,""),h,d;function v(k,M){return ewt.coerce(h,d,o,k,M)}for(var m=0;m{"use strict";var iwt=ka(),nwt=vl(),N8=Pr(),awt=q_(),owt=s_(),swt=l_(),lwt=z3(),uwt=Lb(),cwt=u4(),q2e=GG(),z2e=["aaxis","baxis","caxis"];O2e.exports=function(t,r,n){awt(t,r,n,{type:"ternary",attributes:q2e,handleDefaults:fwt,font:r.font,paper_bgcolor:r.paper_bgcolor})};function fwt(e,t,r,n){var i=r("bgcolor"),a=r("sum");n.bgColor=iwt.combine(i,n.paper_bgcolor);for(var o,s,l,u=0;u=a&&(c.min=0,f.min=0,h.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}function hwt(e,t,r,n){var i=q2e[t._name];function a(d,v){return N8.coerce(e,t,i,d,v)}a("uirevision",n.uirevision),t.type="linear";var o=a("color"),s=o!==i.color.dflt?o:r.font.color,l=t._name,u=l.charAt(0).toUpperCase(),c="Component "+u,f=a("title.text",c);t._hovertitle=f===c?f:u,N8.coerceFont(a,"title.font",r.font,{overrideDflt:{size:N8.bigFont(r.font.size),color:s}}),a("min"),uwt(e,t,a,"linear"),swt(e,t,a,"linear"),owt(e,t,a,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),lwt(e,t,a,{outerTicks:!0});var h=a("showticklabels");h&&(N8.coerceFont(a,"tickfont",r.font,{overrideDflt:{color:s}}),a("tickangle"),a("tickformat")),cwt(e,t,a,{dfltColor:o,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),a("hoverformat"),a("layer")}});var N2e=ye(Z0=>{"use strict";var dwt=R2e(),vwt=Id().getSubplotCalcData,pwt=Pr().counterRegex,XT="ternary";Z0.name=XT;var gwt=Z0.attr="subplot";Z0.idRoot=XT;Z0.idRegex=Z0.attrRegex=pwt(XT);var mwt=Z0.attributes={};mwt[gwt]={valType:"subplotid",dflt:"ternary",editType:"calc"};Z0.layoutAttributes=GG();Z0.supplyLayoutDefaults=B2e();Z0.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,i=r._subplots[XT],a=0;a{"use strict";U2e.exports={attributes:FG(),supplyDefaults:c2e(),colorbar:$d(),formatLabels:h2e(),calc:g2e(),plot:y2e(),style:sp().style,styleOnSelect:sp().styleOnSelect,hoverPoints:x2e(),selectPoints:_T(),eventData:w2e(),moduleType:"trace",name:"scatterternary",basePlotModule:N2e(),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}});var H2e=ye((ufr,G2e)=>{"use strict";G2e.exports=V2e()});var HG=ye((cfr,W2e)=>{"use strict";var Oh=k4(),ZT=Ao().extendFlat,j2e=df().axisHoverFormat;W2e.exports={y:Oh.y,x:Oh.x,x0:Oh.x0,y0:Oh.y0,xhoverformat:j2e("x"),yhoverformat:j2e("y"),name:ZT({},Oh.name,{}),orientation:ZT({},Oh.orientation,{}),bandwidth:{valType:"number",min:0,editType:"calc"},scalegroup:{valType:"string",dflt:"",editType:"calc"},scalemode:{valType:"enumerated",values:["width","count"],dflt:"width",editType:"calc"},spanmode:{valType:"enumerated",values:["soft","hard","manual"],dflt:"soft",editType:"calc"},span:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:Oh.fillcolor,points:ZT({},Oh.boxpoints,{}),jitter:ZT({},Oh.jitter,{}),pointpos:ZT({},Oh.pointpos,{}),width:ZT({},Oh.width,{}),marker:Oh.marker,text:Oh.text,hovertext:Oh.hovertext,hovertemplate:Oh.hovertemplate,hovertemplatefallback:Oh.hovertemplatefallback,quartilemethod:Oh.quartilemethod,box:{visible:{valType:"boolean",dflt:!1,editType:"plot"},width:{valType:"number",min:0,max:1,dflt:.25,editType:"plot"},fillcolor:{valType:"color",editType:"style"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"plot"},meanline:{visible:{valType:"boolean",dflt:!1,editType:"plot"},color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"plot"},side:{valType:"enumerated",values:["both","positive","negative"],dflt:"both",editType:"calc"},offsetgroup:Oh.offsetgroup,alignmentgroup:Oh.alignmentgroup,selected:Oh.selected,unselected:Oh.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"},zorder:Oh.zorder}});var XG=ye((ffr,X2e)=>{"use strict";var jG=C4(),WG=Pr().extendFlat;X2e.exports={violinmode:WG({},jG.boxmode,{}),violingap:WG({},jG.boxgap,{}),violingroupgap:WG({},jG.boxgroupgap,{})}});var $2e=ye((hfr,J2e)=>{"use strict";var Z2e=Pr(),ywt=ka(),Y2e=P4(),K2e=HG();J2e.exports=function(t,r,n,i){function a(L,x){return Z2e.coerce(t,r,K2e,L,x)}function o(L,x){return Z2e.coerce2(t,r,K2e,L,x)}if(Y2e.handleSampleDefaults(t,r,a,i),r.visible!==!1){a("bandwidth"),a("side");var s=a("width");s||(a("scalegroup",r.name),a("scalemode"));var l=a("span"),u;Array.isArray(l)&&(u="manual"),a("spanmode",u);var c=a("line.color",(t.marker||{}).color||n),f=a("line.width"),h=a("fillcolor",ywt.addOpacity(r.line.color,.5));Y2e.handlePointsDefaults(t,r,a,{prefix:""});var d=o("box.width"),v=o("box.fillcolor",h),m=o("box.line.color",c),b=o("box.line.width",f),p=a("box.visible",!!(d||v||m||b));p||(r.box={visible:!1});var k=o("meanline.color",c),M=o("meanline.width",f),T=a("meanline.visible",!!(k||M));T||(r.meanline={visible:!1}),a("quartilemethod"),a("zorder")}}});var ewe=ye((dfr,Q2e)=>{"use strict";var _wt=Pr(),xwt=XG(),bwt=$I();Q2e.exports=function(t,r,n){function i(a,o){return _wt.coerce(t,r,xwt,a,o)}bwt._supply(t,r,n,i,"violin")}});var U8=ye(g2=>{"use strict";var wwt=Pr(),Twt={gaussian:function(e){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*e*e)}};g2.makeKDE=function(e,t,r){var n=r.length,i=Twt.gaussian,a=e.bandwidth,o=1/(n*a);return function(s){for(var l=0,u=0;u{"use strict";var ZG=Pr(),YG=ho(),Awt=NV(),twe=U8(),Swt=fs().BADNUM;rwe.exports=function(t,r){var n=Awt(t,r);if(n[0].t.empty)return n;for(var i=t._fullLayout,a=YG.getFromId(t,r[r.orientation==="h"?"xaxis":"yaxis"]),o=1/0,s=-1/0,l=0,u=0,c=0;c{"use strict";var Cwt=e8().setPositionOffset,nwe=["v","h"];awe.exports=function(t,r){for(var n=t.calcdata,i=r.xaxis,a=r.yaxis,o=0;o{"use strict";var KG=qa(),JG=Pr(),Lwt=So(),$G=t8(),Pwt=AU(),Iwt=U8();swe.exports=function(t,r,n,i){var a=t._context.staticPlot,o=t._fullLayout,s=r.xaxis,l=r.yaxis;function u(c,f){var h=Pwt(c,{xaxis:s,yaxis:l,trace:f,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return Lwt.smoothopen(h[0],1)}JG.makeTraceGroups(i,n,"trace violins").each(function(c){var f=KG.select(this),h=c[0],d=h.t,v=h.trace;if(v.visible!==!0||d.empty){f.remove();return}var m=d.bPos,b=d.bdPos,p=r[d.valLetter+"axis"],k=r[d.posLetter+"axis"],M=v.side==="both",T=M||v.side==="positive",L=M||v.side==="negative",x=f.selectAll("path.violin").data(JG.identity);x.enter().append("path").style("vector-effect",a?"none":"non-scaling-stroke").attr("class","violin"),x.exit().remove(),x.each(function(U){var G=KG.select(this),Z=U.density,j=Z.length,N=k.c2l(U.pos+m,!0),H=k.l2p(N),re;if(v.width)re=d.maxKDE/b;else{var oe=o._violinScaleGroupStats[v.scalegroup];re=v.scalemode==="count"?oe.maxKDE/b*(oe.maxCount/U.pts.length):oe.maxKDE/b}var _e,ke,Ce,ge,ie,Se,Ee;if(T){for(Se=new Array(j),ge=0;ge{"use strict";var uwe=qa(),YT=ka(),Rwt=sp().stylePoints;cwe.exports=function(t){var r=uwe.select(t).selectAll("g.trace.violins");r.style("opacity",function(n){return n[0].trace.opacity}),r.each(function(n){var i=n[0].trace,a=uwe.select(this),o=i.box||{},s=o.line||{},l=i.meanline||{},u=l.width;a.selectAll("path.violin").style("stroke-width",i.line.width+"px").call(YT.stroke,i.line.color).call(YT.fill,i.fillcolor),a.selectAll("path.box").style("stroke-width",s.width+"px").call(YT.stroke,s.color).call(YT.fill,o.fillcolor);var c={"stroke-width":u+"px","stroke-dasharray":2*u+"px,"+u+"px"};a.selectAll("path.mean").style(c).call(YT.stroke,l.color),a.selectAll("path.meanline").style(c).call(YT.stroke,l.color),Rwt(a,i,t)})}});var pwe=ye((_fr,vwe)=>{"use strict";var Dwt=ka(),QG=Pr(),Fwt=ho(),hwe=jV(),dwe=U8();vwe.exports=function(t,r,n,i,a){a||(a={});var o=a.hoverLayer,s=t.cd,l=s[0].trace,u=l.hoveron,c=u.indexOf("violins")!==-1,f=u.indexOf("kde")!==-1,h=[],d,v;if(c||f){var m=hwe.hoverOnBoxes(t,r,n,i);if(f&&m.length>0){var b=t.xa,p=t.ya,k,M,T,L,x;l.orientation==="h"?(x=r,k="y",T=p,M="x",L=b):(x=n,k="x",T=b,M="y",L=p);var C=s[t.index];if(x>=C.span[0]&&x<=C.span[1]){var S=QG.extendFlat({},t),g=L.c2p(x,!0),P=dwe.getKdeValue(C,l,x),E=dwe.getPositionOnKdePath(C,l,g),z=T._offset,q=T._length;S[k+"0"]=E[0],S[k+"1"]=E[1],S[M+"0"]=S[M+"1"]=g,S[M+"Label"]=M+": "+Fwt.hoverLabelText(L,x,l[M+"hoverformat"])+", "+s[0].t.labels.kde+" "+P.toFixed(3);for(var U=0,G=0;G{"use strict";gwe.exports={attributes:HG(),layoutAttributes:XG(),supplyDefaults:$2e(),crossTraceDefaults:P4().crossTraceDefaults,supplyLayoutDefaults:ewe(),calc:iwe(),crossTraceCalc:owe(),plot:lwe(),style:fwe(),styleOnSelect:sp().styleOnSelect,hoverPoints:pwe(),selectPoints:WV(),moduleType:"trace",name:"violin",basePlotModule:mh(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}});var _we=ye((bfr,ywe)=>{"use strict";ywe.exports=mwe()});var bwe=ye((wfr,xwe)=>{"use strict";xwe.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}});var tH=ye((Tfr,Swe)=>{"use strict";var jc=zm(),eH=pf().line,zwt=Gl(),wwe=df().axisHoverFormat,{hovertemplateAttrs:qwt,texttemplateAttrs:Owt,templatefallbackAttrs:Twe}=Ll(),Awe=bwe(),Xy=Ao().extendFlat,Bwt=ka();Swe.exports={x:jc.x,x0:jc.x0,dx:jc.dx,y:jc.y,y0:jc.y0,dy:jc.dy,xperiod:jc.xperiod,yperiod:jc.yperiod,xperiod0:jc.xperiod0,yperiod0:jc.yperiod0,xperiodalignment:jc.xperiodalignment,yperiodalignment:jc.yperiodalignment,xhoverformat:wwe("x"),yhoverformat:wwe("y"),hovertext:jc.hovertext,hovertemplate:qwt({},{keys:Awe.eventDataKeys}),hovertemplatefallback:Twe(),hoverinfo:Xy({},zwt.hoverinfo,{flags:["name","x","y","text","percent initial","percent previous","percent total"]}),textinfo:{valType:"flaglist",flags:["label","text","percent initial","percent previous","percent total","value"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:Owt({editType:"plot"},{keys:Awe.eventDataKeys.concat(["label","value"])}),texttemplatefallback:Twe({editType:"plot"}),text:jc.text,textposition:jc.textposition,insidetextanchor:Xy({},jc.insidetextanchor,{dflt:"middle"}),textangle:Xy({},jc.textangle,{dflt:0}),textfont:jc.textfont,insidetextfont:jc.insidetextfont,outsidetextfont:jc.outsidetextfont,constraintext:jc.constraintext,cliponaxis:jc.cliponaxis,orientation:Xy({},jc.orientation,{}),offset:Xy({},jc.offset,{arrayOk:!1}),width:Xy({},jc.width,{arrayOk:!1}),marker:Nwt(),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:Xy({},eH.color,{dflt:Bwt.defaultLine}),width:Xy({},eH.width,{dflt:0,editType:"plot"}),dash:eH.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:jc.offsetgroup,alignmentgroup:jc.alignmentgroup,zorder:jc.zorder};function Nwt(){var e=Xy({},jc.marker);return delete e.pattern,delete e.cornerradius,e}});var rH=ye((Afr,Mwe)=>{"use strict";Mwe.exports={funnelmode:{valType:"enumerated",values:["stack","group","overlay"],dflt:"stack",editType:"calc"},funnelgap:{valType:"number",min:0,max:1,editType:"calc"},funnelgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}});var nH=ye((Sfr,kwe)=>{"use strict";var V8=Pr(),Uwt=e2(),Vwt=i0().handleText,Gwt=sT(),Hwt=Dg(),Ewe=tH(),iH=ka();function jwt(e,t,r,n){function i(f,h){return V8.coerce(e,t,Ewe,f,h)}var a=Gwt(e,t,n,i);if(!a){t.visible=!1;return}Hwt(e,t,n,i),i("xhoverformat"),i("yhoverformat"),i("orientation",t.y&&!t.x?"v":"h"),i("offset"),i("width");var o=i("text");i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var s=i("textposition");Vwt(e,t,n,i,s,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&!t.texttemplate&&i("textinfo",V8.isArrayOrTypedArray(o)?"text+value":"value");var l=i("marker.color",r);i("marker.line.color",iH.defaultLine),i("marker.line.width");var u=i("connector.visible");if(u){i("connector.fillcolor",Wwt(l));var c=i("connector.line.width");c&&(i("connector.line.color"),i("connector.line.dash"))}i("zorder")}function Wwt(e){var t=V8.isArrayOrTypedArray(e)?"#000":e;return iH.addOpacity(t,.5*iH.opacity(t))}function Xwt(e,t){var r,n;function i(o){return V8.coerce(n._input,n,Ewe,o)}for(var a=0;a{"use strict";var Zwt=Pr(),Ywt=rH();Cwe.exports=function(e,t,r){var n=!1;function i(s,l){return Zwt.coerce(e,t,Ywt,s,l)}for(var a=0;a{"use strict";var KT=Pr();Pwe.exports=function(t,r){for(var n=0;n{"use strict";var Rwe=ho(),Dwe=zg(),Kwt=Iwe(),Jwt=q0(),j4=fs().BADNUM;Fwe.exports=function(t,r){var n=Rwe.getFromId(t,r.xaxis||"x"),i=Rwe.getFromId(t,r.yaxis||"y"),a,o,s,l,u,c,f,h;r.orientation==="h"?(a=n.makeCalcdata(r,"x"),s=i.makeCalcdata(r,"y"),l=Dwe(r,i,"y",s),u=!!r.yperiodalignment,c="y"):(a=i.makeCalcdata(r,"y"),s=n.makeCalcdata(r,"x"),l=Dwe(r,n,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;var d=Math.min(o.length,a.length),v=new Array(d);for(r._base=[],f=0;f{"use strict";var qwe=t2().setGroupPositions;Owe.exports=function(t,r){var n=t._fullLayout,i=t._fullData,a=t.calcdata,o=r.xaxis,s=r.yaxis,l=[],u=[],c=[],f,h;for(h=0;h{"use strict";var G8=qa(),B_=Pr(),Nwe=So(),O_=fs().BADNUM,$wt=d2(),Qwt=bv().clearMinTextSize;Vwe.exports=function(t,r,n,i){var a=t._fullLayout;Qwt("funnel",a),e3t(t,r,n,i),t3t(t,r,n,i),$wt.plot(t,r,n,i,{mode:a.funnelmode,norm:a.funnelmode,gap:a.funnelgap,groupgap:a.funnelgroupgap})};function e3t(e,t,r,n){var i=t.xaxis,a=t.yaxis;B_.makeTraceGroups(n,r,"trace bars").each(function(o){var s=G8.select(this),l=o[0].trace,u=B_.ensureSingle(s,"g","regions");if(!l.connector||!l.connector.visible){u.remove();return}var c=l.orientation==="h",f=u.selectAll("g.region").data(B_.identity);f.enter().append("g").classed("region",!0),f.exit().remove();var h=f.size();f.each(function(d,v){if(!(v!==h-1&&!d.cNext)){var m=Uwe(d,i,a,c),b=m[0],p=m[1],k="";b[0]!==O_&&p[0]!==O_&&b[1]!==O_&&p[1]!==O_&&b[2]!==O_&&p[2]!==O_&&b[3]!==O_&&p[3]!==O_&&(c?k+="M"+b[0]+","+p[1]+"L"+b[2]+","+p[2]+"H"+b[3]+"L"+b[1]+","+p[1]+"Z":k+="M"+b[1]+","+p[1]+"L"+b[2]+","+p[3]+"V"+p[2]+"L"+b[1]+","+p[0]+"Z"),k===""&&(k="M0,0Z"),B_.ensureSingle(G8.select(this),"path").attr("d",k).call(Nwe.setClipUrl,t.layerClipId,e)}})})}function t3t(e,t,r,n){var i=t.xaxis,a=t.yaxis;B_.makeTraceGroups(n,r,"trace bars").each(function(o){var s=G8.select(this),l=o[0].trace,u=B_.ensureSingle(s,"g","lines");if(!l.connector||!l.connector.visible||!l.connector.line.width){u.remove();return}var c=l.orientation==="h",f=u.selectAll("g.line").data(B_.identity);f.enter().append("g").classed("line",!0),f.exit().remove();var h=f.size();f.each(function(d,v){if(!(v!==h-1&&!d.cNext)){var m=Uwe(d,i,a,c),b=m[0],p=m[1],k="";b[3]!==void 0&&p[3]!==void 0&&(c?(k+="M"+b[0]+","+p[1]+"L"+b[2]+","+p[2],k+="M"+b[1]+","+p[1]+"L"+b[3]+","+p[2]):(k+="M"+b[1]+","+p[1]+"L"+b[2]+","+p[3],k+="M"+b[1]+","+p[0]+"L"+b[2]+","+p[2])),k===""&&(k="M0,0Z"),B_.ensureSingle(G8.select(this),"path").attr("d",k).call(Nwe.setClipUrl,t.layerClipId,e)}})})}function Uwe(e,t,r,n){var i=[],a=[],o=n?t:r,s=n?r:t;return i[0]=o.c2p(e.s0,!0),a[0]=s.c2p(e.p0,!0),i[1]=o.c2p(e.s1,!0),a[1]=s.c2p(e.p1,!0),i[2]=o.c2p(e.nextS0,!0),a[2]=s.c2p(e.nextP0,!0),i[3]=o.c2p(e.nextS1,!0),a[3]=s.c2p(e.nextP1,!0),n?[i,a]:[a,i]}});var Wwe=ye((Pfr,jwe)=>{"use strict";var W4=qa(),Hwe=So(),oH=ka(),r3t=X1().DESELECTDIM,i3t=V0(),n3t=bv().resizeText,a3t=i3t.styleTextPoints;function o3t(e,t,r){var n=r||W4.select(e).selectAll('g[class^="funnellayer"]').selectAll("g.trace");n3t(e,n,"funnel"),n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var a=W4.select(this),o=i[0].trace;a.selectAll(".point > path").each(function(s){if(!s.isBlank){var l=o.marker;W4.select(this).call(oH.fill,s.mc||l.color).call(oH.stroke,s.mlc||l.line.color).call(Hwe.dashLine,l.line.dash,s.mlw||l.line.width).style("opacity",o.selectedpoints&&!s.selected?r3t:1)}}),a3t(a,o,e),a.selectAll(".regions").each(function(){W4.select(this).selectAll("path").style("stroke-width",0).call(oH.fill,o.connector.fillcolor)}),a.selectAll(".lines").each(function(){var s=o.connector.line;Hwe.lineGroupStyle(W4.select(this).selectAll("path"),s.width,s.color,s.dash)})})}jwe.exports={style:o3t}});var Ywe=ye((Ifr,Zwe)=>{"use strict";var Xwe=ka().opacity,s3t=IT().hoverOnBars,sH=Pr().formatPercent;Zwe.exports=function(t,r,n,i,a){var o=s3t(t,r,n,i,a);if(o){var s=o.cd,l=s[0].trace,u=l.orientation==="h",c=o.index,f=s[c],h=u?"x":"y";o[h+"LabelVal"]=f.s,o.percentInitial=f.begR,o.percentInitialLabel=sH(f.begR,1),o.percentPrevious=f.difR,o.percentPreviousLabel=sH(f.difR,1),o.percentTotal=f.sumR,o.percentTotalLabel=sH(f.sumR,1);var d=f.hi||l.hoverinfo,v=[];if(d&&d!=="none"&&d!=="skip"){var m=d==="all",b=d.split("+"),p=function(k){return m||b.indexOf(k)!==-1};p("percent initial")&&v.push(o.percentInitialLabel+" of initial"),p("percent previous")&&v.push(o.percentPreviousLabel+" of previous"),p("percent total")&&v.push(o.percentTotalLabel+" of total")}return o.extraText=v.join("
"),o.color=l3t(l,f),[o]}};function l3t(e,t){var r=e.marker,n=t.mc||r.color,i=t.mlc||r.line.color,a=t.mlw||r.line.width;if(Xwe(n))return n;if(Xwe(i)&&a)return i}});var Jwe=ye((Rfr,Kwe)=>{"use strict";Kwe.exports=function(t,r){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"percentInitial"in r&&(t.percentInitial=r.percentInitial),"percentPrevious"in r&&(t.percentPrevious=r.percentPrevious),"percentTotal"in r&&(t.percentTotal=r.percentTotal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var Qwe=ye((Dfr,$we)=>{"use strict";$we.exports={attributes:tH(),layoutAttributes:rH(),supplyDefaults:nH().supplyDefaults,crossTraceDefaults:nH().crossTraceDefaults,supplyLayoutDefaults:Lwe(),calc:zwe(),crossTraceCalc:Bwe(),plot:Gwe(),style:Wwe().style,hoverPoints:Ywe(),eventData:Jwe(),selectPoints:RT(),moduleType:"trace",name:"funnel",basePlotModule:mh(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var t3e=ye((Ffr,e3e)=>{"use strict";e3e.exports=Qwe()});var i3e=ye((zfr,r3e)=>{"use strict";r3e.exports={eventDataKeys:["initial","delta","final"]}});var cH=ye((qfr,s3e)=>{"use strict";var _c=zm(),lH=pf().line,u3t=Gl(),n3e=df().axisHoverFormat,{hovertemplateAttrs:c3t,texttemplateAttrs:f3t,templatefallbackAttrs:a3e}=Ll(),o3e=i3e(),JT=Ao().extendFlat,h3t=ka();function uH(e){return{marker:{color:JT({},_c.marker.color,{arrayOk:!1,editType:"style"}),line:{color:JT({},_c.marker.line.color,{arrayOk:!1,editType:"style"}),width:JT({},_c.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}s3e.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:_c.x,x0:_c.x0,dx:_c.dx,y:_c.y,y0:_c.y0,dy:_c.dy,xperiod:_c.xperiod,yperiod:_c.yperiod,xperiod0:_c.xperiod0,yperiod0:_c.yperiod0,xperiodalignment:_c.xperiodalignment,yperiodalignment:_c.yperiodalignment,xhoverformat:n3e("x"),yhoverformat:n3e("y"),hovertext:_c.hovertext,hovertemplate:c3t({},{keys:o3e.eventDataKeys}),hovertemplatefallback:a3e(),hoverinfo:JT({},u3t.hoverinfo,{flags:["name","x","y","text","initial","delta","final"]}),textinfo:{valType:"flaglist",flags:["label","text","initial","delta","final"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:f3t({editType:"plot"},{keys:o3e.eventDataKeys.concat(["label"])}),texttemplatefallback:a3e({editType:"plot"}),text:_c.text,textposition:_c.textposition,insidetextanchor:_c.insidetextanchor,textangle:_c.textangle,textfont:_c.textfont,insidetextfont:_c.insidetextfont,outsidetextfont:_c.outsidetextfont,constraintext:_c.constraintext,cliponaxis:_c.cliponaxis,orientation:_c.orientation,offset:_c.offset,width:_c.width,increasing:uH("increasing"),decreasing:uH("decreasing"),totals:uH("intermediate sums and total"),connector:{line:{color:JT({},lH.color,{dflt:h3t.defaultLine}),width:JT({},lH.width,{editType:"plot"}),dash:lH.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:_c.offsetgroup,alignmentgroup:_c.alignmentgroup,zorder:_c.zorder}});var fH=ye((Ofr,l3e)=>{"use strict";l3e.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc"},waterfallgap:{valType:"number",min:0,max:1,editType:"calc"},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}});var $T=ye((Bfr,u3e)=>{"use strict";u3e.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}});var dH=ye((Nfr,d3e)=>{"use strict";var c3e=Pr(),d3t=e2(),v3t=i0().handleText,p3t=sT(),g3t=Dg(),f3e=cH(),m3t=ka(),h3e=$T(),y3t=h3e.INCREASING.COLOR,_3t=h3e.DECREASING.COLOR,x3t="#4499FF";function hH(e,t,r){e(t+".marker.color",r),e(t+".marker.line.color",m3t.defaultLine),e(t+".marker.line.width")}function b3t(e,t,r,n){function i(u,c){return c3e.coerce(e,t,f3e,u,c)}var a=p3t(e,t,n,i);if(!a){t.visible=!1;return}g3t(e,t,n,i),i("xhoverformat"),i("yhoverformat"),i("measure"),i("orientation",t.x&&!t.y?"h":"v"),i("base"),i("offset"),i("width"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var o=i("textposition");v3t(e,t,n,i,o,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&(i("texttemplate"),i("texttemplatefallback"),t.texttemplate||i("textinfo")),hH(i,"increasing",y3t),hH(i,"decreasing",_3t),hH(i,"totals",x3t);var s=i("connector.visible");if(s){i("connector.mode");var l=i("connector.line.width");l&&(i("connector.line.color"),i("connector.line.dash"))}i("zorder")}function w3t(e,t){var r,n;function i(o){return c3e.coerce(n._input,n,f3e,o)}if(t.waterfallmode==="group")for(var a=0;a{"use strict";var T3t=Pr(),A3t=fH();v3e.exports=function(e,t,r){var n=!1;function i(s,l){return T3t.coerce(e,t,A3t,s,l)}for(var a=0;a{"use strict";var g3e=ho(),m3e=zg(),y3e=Pr().mergeArray,S3t=q0(),_3e=fs().BADNUM;function vH(e){return e==="a"||e==="absolute"}function pH(e){return e==="t"||e==="total"}x3e.exports=function(t,r){var n=g3e.getFromId(t,r.xaxis||"x"),i=g3e.getFromId(t,r.yaxis||"y"),a,o,s,l,u,c;r.orientation==="h"?(a=n.makeCalcdata(r,"x"),s=i.makeCalcdata(r,"y"),l=m3e(r,i,"y",s),u=!!r.yperiodalignment,c="y"):(a=i.makeCalcdata(r,"y"),s=n.makeCalcdata(r,"x"),l=m3e(r,n,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;for(var f=Math.min(o.length,a.length),h=new Array(f),d=0,v,m=!1,b=0;b{"use strict";var w3e=t2().setGroupPositions;T3e.exports=function(t,r){var n=t._fullLayout,i=t._fullData,a=t.calcdata,o=r.xaxis,s=r.yaxis,l=[],u=[],c=[],f,h;for(h=0;h{"use strict";var S3e=qa(),H8=Pr(),M3t=So(),QT=fs().BADNUM,E3t=d2(),k3t=bv().clearMinTextSize;M3e.exports=function(t,r,n,i){var a=t._fullLayout;k3t("waterfall",a),E3t.plot(t,r,n,i,{mode:a.waterfallmode,norm:a.waterfallmode,gap:a.waterfallgap,groupgap:a.waterfallgroupgap}),C3t(t,r,n,i)};function C3t(e,t,r,n){var i=t.xaxis,a=t.yaxis;H8.makeTraceGroups(n,r,"trace bars").each(function(o){var s=S3e.select(this),l=o[0].trace,u=H8.ensureSingle(s,"g","lines");if(!l.connector||!l.connector.visible){u.remove();return}var c=l.orientation==="h",f=l.connector.mode,h=u.selectAll("g.line").data(H8.identity);h.enter().append("g").classed("line",!0),h.exit().remove();var d=h.size();h.each(function(v,m){if(!(m!==d-1&&!v.cNext)){var b=L3t(v,i,a,c),p=b[0],k=b[1],M="";p[0]!==QT&&k[0]!==QT&&p[1]!==QT&&k[1]!==QT&&(f==="spanning"&&!v.isSum&&m>0&&(c?M+="M"+p[0]+","+k[1]+"V"+k[0]:M+="M"+p[1]+","+k[0]+"H"+p[0]),f!=="between"&&(v.isSum||m{"use strict";var j8=qa(),k3e=So(),C3e=ka(),P3t=X1().DESELECTDIM,I3t=V0(),R3t=bv().resizeText,D3t=I3t.styleTextPoints;function F3t(e,t,r){var n=r||j8.select(e).selectAll('g[class^="waterfalllayer"]').selectAll("g.trace");R3t(e,n,"waterfall"),n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var a=j8.select(this),o=i[0].trace;a.selectAll(".point > path").each(function(s){if(!s.isBlank){var l=o[s.dir].marker;j8.select(this).call(C3e.fill,l.color).call(C3e.stroke,l.line.color).call(k3e.dashLine,l.line.dash,l.line.width).style("opacity",o.selectedpoints&&!s.selected?P3t:1)}}),D3t(a,o,e),a.selectAll(".lines").each(function(){var s=o.connector.line;k3e.lineGroupStyle(j8.select(this).selectAll("path"),s.width,s.color,s.dash)})})}L3e.exports={style:F3t}});var z3e=ye((Wfr,F3e)=>{"use strict";var z3t=ho().hoverLabelText,I3e=ka().opacity,q3t=IT().hoverOnBars,R3e=$T(),D3e={increasing:R3e.INCREASING.SYMBOL,decreasing:R3e.DECREASING.SYMBOL};F3e.exports=function(t,r,n,i,a){var o=q3t(t,r,n,i,a);if(!o)return;var s=o.cd,l=s[0].trace,u=l.orientation==="h",c=u?"x":"y",f=u?t.xa:t.ya;function h(x){return z3t(f,x,l[c+"hoverformat"])}var d=o.index,v=s[d],m=v.isSum?v.b+v.s:v.rawS;o.initial=v.b+v.s-m,o.delta=m,o.final=o.initial+o.delta;var b=h(Math.abs(o.delta));o.deltaLabel=m<0?"("+b+")":b,o.finalLabel=h(o.final),o.initialLabel=h(o.initial);var p=v.hi||l.hoverinfo,k=[];if(p&&p!=="none"&&p!=="skip"){var M=p==="all",T=p.split("+"),L=function(x){return M||T.indexOf(x)!==-1};v.isSum||(L("final")&&(u?!L("x"):!L("y"))&&k.push(o.finalLabel),L("delta")&&(m<0?k.push(o.deltaLabel+" "+D3e.decreasing):k.push(o.deltaLabel+" "+D3e.increasing)),L("initial")&&k.push("Initial: "+o.initialLabel))}return k.length&&(o.extraText=k.join("
")),o.color=O3t(l,v),[o]};function O3t(e,t){var r=e[t.dir].marker,n=r.color,i=r.line.color,a=r.line.width;if(I3e(n))return n;if(I3e(i)&&a)return i}});var O3e=ye((Xfr,q3e)=>{"use strict";q3e.exports=function(t,r){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"initial"in r&&(t.initial=r.initial),"delta"in r&&(t.delta=r.delta),"final"in r&&(t.final=r.final),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var N3e=ye((Zfr,B3e)=>{"use strict";B3e.exports={attributes:cH(),layoutAttributes:fH(),supplyDefaults:dH().supplyDefaults,crossTraceDefaults:dH().crossTraceDefaults,supplyLayoutDefaults:p3e(),calc:b3e(),crossTraceCalc:A3e(),plot:E3e(),style:P3e().style,hoverPoints:z3e(),eventData:O3e(),selectPoints:RT(),moduleType:"trace",name:"waterfall",basePlotModule:mh(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var V3e=ye((Yfr,U3e)=>{"use strict";U3e.exports=N3e()});var eA=ye((Kfr,G3e)=>{"use strict";G3e.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(e){return e.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:["","","",""]},rgba256:{colormodel:"rgba",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(e){var t=e.slice(0,3);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(e){var t=e.slice(0,4);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xB0","%","%",""]}}}});var gH=ye((Jfr,j3e)=>{"use strict";var B3t=Gl(),N3t=pf().zorder,{hovertemplateAttrs:U3t,templatefallbackAttrs:V3t}=Ll(),H3e=Ao().extendFlat,G3t=eA().colormodel,Z4=["rgb","rgba","rgba256","hsl","hsla"],H3t=[],j3t=[];for(tA=0;tA{"use strict";var W3t=Pr(),X3t=gH(),W3e=eA(),Z3t=qy().IMAGE_URL_PREFIX;X3e.exports=function(t,r){function n(o,s){return W3t.coerce(t,r,X3t,o,s)}n("source"),r.source&&!r.source.match(Z3t)&&delete r.source,r._hasSource=!!r.source;var i=n("z");if(r._hasZ=!(i===void 0||!i.length||!i[0]||!i[0].length),!r._hasZ&&!r._hasSource){r.visible=!1;return}n("x0"),n("y0"),n("dx"),n("dy");var a;r._hasZ?(n("colormodel","rgb"),a=W3e.colormodel[r.colormodel],n("zmin",a.zminDflt||a.min),n("zmax",a.zmaxDflt||a.max)):r._hasSource&&(r.colormodel="rgba256",a=W3e.colormodel[r.colormodel],r.zmin=a.zminDflt,r.zmax=a.zmaxDflt),n("zsmooth"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),r._length=null,n("zorder")}});var Zy=ye((Qfr,mH)=>{typeof Object.create=="function"?mH.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:mH.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}});var yH=ye((ehr,Y3e)=>{Y3e.exports=Ab().EventEmitter});var $3e=ye(W8=>{"use strict";W8.byteLength=K3t;W8.toByteArray=$3t;W8.fromByteArray=tTt;var Gm=[],Y0=[],Y3t=typeof Uint8Array!="undefined"?Uint8Array:Array,_H="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(m2=0,K3e=_H.length;m20)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function K3t(e){var t=J3e(e),r=t[0],n=t[1];return(r+n)*3/4-n}function J3t(e,t,r){return(t+r)*3/4-r}function $3t(e){var t,r=J3e(e),n=r[0],i=r[1],a=new Y3t(J3t(e,n,i)),o=0,s=i>0?n-4:n,l;for(l=0;l>16&255,a[o++]=t>>8&255,a[o++]=t&255;return i===2&&(t=Y0[e.charCodeAt(l)]<<2|Y0[e.charCodeAt(l+1)]>>4,a[o++]=t&255),i===1&&(t=Y0[e.charCodeAt(l)]<<10|Y0[e.charCodeAt(l+1)]<<4|Y0[e.charCodeAt(l+2)]>>2,a[o++]=t>>8&255,a[o++]=t&255),a}function Q3t(e){return Gm[e>>18&63]+Gm[e>>12&63]+Gm[e>>6&63]+Gm[e&63]}function eTt(e,t,r){for(var n,i=[],a=t;as?s:o+a));return n===1?(t=e[r-1],i.push(Gm[t>>2]+Gm[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],i.push(Gm[t>>10]+Gm[t>>4&63]+Gm[t<<2&63]+"=")),i.join("")}});var Q3e=ye(xH=>{xH.read=function(e,t,r,n,i){var a,o,s=i*8-n-1,l=(1<>1,c=-7,f=r?i-1:0,h=r?-1:1,d=e[t+f];for(f+=h,a=d&(1<<-c)-1,d>>=-c,c+=s;c>0;a=a*256+e[t+f],f+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=o*256+e[t+f],f+=h,c-=8);if(a===0)a=1-u;else{if(a===l)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,n),a=a-u}return(d?-1:1)*o*Math.pow(2,a-n)};xH.write=function(e,t,r,n,i,a){var o,s,l,u=a*8-i-1,c=(1<>1,h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,v=n?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+f>=1?t+=h/l:t+=h*Math.pow(2,1-f),t*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*l-1)*Math.pow(2,i),o=o+f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[r+d]=s&255,d+=v,s/=256,i-=8);for(o=o<0;e[r+d]=o&255,d+=v,o/=256,u-=8);e[r+d-v]|=m*128}});var _2=ye(aA=>{"use strict";var bH=$3e(),iA=Q3e(),eTe=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;aA.Buffer=ra;aA.SlowBuffer=sTt;aA.INSPECT_MAX_BYTES=50;var X8=2147483647;aA.kMaxLength=X8;ra.TYPED_ARRAY_SUPPORT=rTt();!ra.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function rTt(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch(e){return!1}}Object.defineProperty(ra.prototype,"parent",{enumerable:!0,get:function(){if(ra.isBuffer(this))return this.buffer}});Object.defineProperty(ra.prototype,"offset",{enumerable:!0,get:function(){if(ra.isBuffer(this))return this.byteOffset}});function Yy(e){if(e>X8)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,ra.prototype),t}function ra(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return SH(e)}return nTe(e,t,r)}ra.poolSize=8192;function nTe(e,t,r){if(typeof e=="string")return nTt(e,t);if(ArrayBuffer.isView(e))return aTt(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Hm(e,ArrayBuffer)||e&&Hm(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(Hm(e,SharedArrayBuffer)||e&&Hm(e.buffer,SharedArrayBuffer)))return TH(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return ra.from(n,t,r);let i=oTt(e);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return ra.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}ra.from=function(e,t,r){return nTe(e,t,r)};Object.setPrototypeOf(ra.prototype,Uint8Array.prototype);Object.setPrototypeOf(ra,Uint8Array);function aTe(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function iTt(e,t,r){return aTe(e),e<=0?Yy(e):t!==void 0?typeof r=="string"?Yy(e).fill(t,r):Yy(e).fill(t):Yy(e)}ra.alloc=function(e,t,r){return iTt(e,t,r)};function SH(e){return aTe(e),Yy(e<0?0:MH(e)|0)}ra.allocUnsafe=function(e){return SH(e)};ra.allocUnsafeSlow=function(e){return SH(e)};function nTt(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!ra.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=oTe(e,t)|0,n=Yy(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function wH(e){let t=e.length<0?0:MH(e.length)|0,r=Yy(t);for(let n=0;n=X8)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+X8.toString(16)+" bytes");return e|0}function sTt(e){return+e!=e&&(e=0),ra.alloc(+e)}ra.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==ra.prototype};ra.compare=function(t,r){if(Hm(t,Uint8Array)&&(t=ra.from(t,t.offset,t.byteLength)),Hm(r,Uint8Array)&&(r=ra.from(r,r.offset,r.byteLength)),!ra.isBuffer(t)||!ra.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;let n=t.length,i=r.length;for(let a=0,o=Math.min(n,i);ai.length?(ra.isBuffer(o)||(o=ra.from(o)),o.copy(i,a)):Uint8Array.prototype.set.call(i,o,a);else if(ra.isBuffer(o))o.copy(i,a);else throw new TypeError('"list" argument must be an Array of Buffers');a+=o.length}return i};function oTe(e,t){if(ra.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Hm(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return AH(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return pTe(e).length;default:if(i)return n?-1:AH(e).length;t=(""+t).toLowerCase(),i=!0}}ra.byteLength=oTe;function lTt(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return yTt(this,t,r);case"utf8":case"utf-8":return lTe(this,t,r);case"ascii":return gTt(this,t,r);case"latin1":case"binary":return mTt(this,t,r);case"base64":return vTt(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _Tt(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}ra.prototype._isBuffer=!0;function y2(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}ra.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;rr&&(t+=" ... "),""};eTe&&(ra.prototype[eTe]=ra.prototype.inspect);ra.prototype.compare=function(t,r,n,i,a){if(Hm(t,Uint8Array)&&(t=ra.from(t,t.offset,t.byteLength)),!ra.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),a===void 0&&(a=this.length),r<0||n>t.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&r>=n)return 0;if(i>=a)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,a>>>=0,this===t)return 0;let o=a-i,s=n-r,l=Math.min(o,s),u=this.slice(i,a),c=t.slice(r,n);for(let f=0;f2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,kH(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=ra.from(t,n)),ra.isBuffer(t))return t.length===0?-1:tTe(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):tTe(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function tTe(e,t,r,n,i){let a=1,o=e.length,s=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;a=2,o/=2,s/=2,r/=2}function l(c,f){return a===1?c[f]:c.readUInt16BE(f*a)}let u;if(i){let c=-1;for(u=r;uo&&(r=o-s),u=r;u>=0;u--){let c=!0;for(let f=0;fi&&(n=i)):n=i;let a=t.length;n>a/2&&(n=a/2);let o;for(o=0;o>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let a=this.length-r;if((n===void 0||n>a)&&(n=a),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let o=!1;for(;;)switch(i){case"hex":return uTt(this,t,r,n);case"utf8":case"utf-8":return cTt(this,t,r,n);case"ascii":case"latin1":case"binary":return fTt(this,t,r,n);case"base64":return hTt(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return dTt(this,t,r,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}};ra.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function vTt(e,t,r){return t===0&&r===e.length?bH.fromByteArray(e):bH.fromByteArray(e.slice(t,r))}function lTe(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:a>223?3:a>191?2:1;if(i+s<=r){let l,u,c,f;switch(s){case 1:a<128&&(o=a);break;case 2:l=e[i+1],(l&192)===128&&(f=(a&31)<<6|l&63,f>127&&(o=f));break;case 3:l=e[i+1],u=e[i+2],(l&192)===128&&(u&192)===128&&(f=(a&15)<<12|(l&63)<<6|u&63,f>2047&&(f<55296||f>57343)&&(o=f));break;case 4:l=e[i+1],u=e[i+2],c=e[i+3],(l&192)===128&&(u&192)===128&&(c&192)===128&&(f=(a&15)<<18|(l&63)<<12|(u&63)<<6|c&63,f>65535&&f<1114112&&(o=f))}}o===null?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),i+=s}return pTt(n)}var rTe=4096;function pTt(e){let t=e.length;if(t<=rTe)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let a=t;an&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),rr)throw new RangeError("Trying to access beyond buffer length")}ra.prototype.readUintLE=ra.prototype.readUIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||ev(t,r,this.length);let i=this[t],a=1,o=0;for(;++o>>0,r=r>>>0,n||ev(t,r,this.length);let i=this[t+--r],a=1;for(;r>0&&(a*=256);)i+=this[t+--r]*a;return i};ra.prototype.readUint8=ra.prototype.readUInt8=function(t,r){return t=t>>>0,r||ev(t,1,this.length),this[t]};ra.prototype.readUint16LE=ra.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||ev(t,2,this.length),this[t]|this[t+1]<<8};ra.prototype.readUint16BE=ra.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||ev(t,2,this.length),this[t]<<8|this[t+1]};ra.prototype.readUint32LE=ra.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||ev(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};ra.prototype.readUint32BE=ra.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||ev(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};ra.prototype.readBigUInt64LE=N_(function(t){t=t>>>0,nA(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Y4(t,this.length-8);let i=r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,a=this[++t]+this[++t]*2**8+this[++t]*2**16+n*2**24;return BigInt(i)+(BigInt(a)<>>0,nA(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Y4(t,this.length-8);let i=r*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],a=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n;return(BigInt(i)<>>0,r=r>>>0,n||ev(t,r,this.length);let i=this[t],a=1,o=0;for(;++o=a&&(i-=Math.pow(2,8*r)),i};ra.prototype.readIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||ev(t,r,this.length);let i=r,a=1,o=this[t+--i];for(;i>0&&(a*=256);)o+=this[t+--i]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*r)),o};ra.prototype.readInt8=function(t,r){return t=t>>>0,r||ev(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};ra.prototype.readInt16LE=function(t,r){t=t>>>0,r||ev(t,2,this.length);let n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};ra.prototype.readInt16BE=function(t,r){t=t>>>0,r||ev(t,2,this.length);let n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};ra.prototype.readInt32LE=function(t,r){return t=t>>>0,r||ev(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};ra.prototype.readInt32BE=function(t,r){return t=t>>>0,r||ev(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};ra.prototype.readBigInt64LE=N_(function(t){t=t>>>0,nA(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Y4(t,this.length-8);let i=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(n<<24);return(BigInt(i)<>>0,nA(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Y4(t,this.length-8);let i=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(i)<>>0,r||ev(t,4,this.length),iA.read(this,t,!0,23,4)};ra.prototype.readFloatBE=function(t,r){return t=t>>>0,r||ev(t,4,this.length),iA.read(this,t,!1,23,4)};ra.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||ev(t,8,this.length),iA.read(this,t,!0,52,8)};ra.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||ev(t,8,this.length),iA.read(this,t,!1,52,8)};function Rp(e,t,r,n,i,a){if(!ra.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}ra.prototype.writeUintLE=ra.prototype.writeUIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,n=n>>>0,!i){let s=Math.pow(2,8*n)-1;Rp(this,t,r,n,s,0)}let a=1,o=0;for(this[r]=t&255;++o>>0,n=n>>>0,!i){let s=Math.pow(2,8*n)-1;Rp(this,t,r,n,s,0)}let a=n-1,o=1;for(this[r+a]=t&255;--a>=0&&(o*=256);)this[r+a]=t/o&255;return r+n};ra.prototype.writeUint8=ra.prototype.writeUInt8=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,1,255,0),this[r]=t&255,r+1};ra.prototype.writeUint16LE=ra.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};ra.prototype.writeUint16BE=ra.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};ra.prototype.writeUint32LE=ra.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};ra.prototype.writeUint32BE=ra.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function uTe(e,t,r,n,i){vTe(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,r}function cTe(e,t,r,n,i){vTe(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r+7]=a,a=a>>8,e[r+6]=a,a=a>>8,e[r+5]=a,a=a>>8,e[r+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o=o>>8,e[r+2]=o,o=o>>8,e[r+1]=o,o=o>>8,e[r]=o,r+8}ra.prototype.writeBigUInt64LE=N_(function(t,r=0){return uTe(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});ra.prototype.writeBigUInt64BE=N_(function(t,r=0){return cTe(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});ra.prototype.writeIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let l=Math.pow(2,8*n-1);Rp(this,t,r,n,l-1,-l)}let a=0,o=1,s=0;for(this[r]=t&255;++a>0)-s&255;return r+n};ra.prototype.writeIntBE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let l=Math.pow(2,8*n-1);Rp(this,t,r,n,l-1,-l)}let a=n-1,o=1,s=0;for(this[r+a]=t&255;--a>=0&&(o*=256);)t<0&&s===0&&this[r+a+1]!==0&&(s=1),this[r+a]=(t/o>>0)-s&255;return r+n};ra.prototype.writeInt8=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};ra.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};ra.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};ra.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};ra.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Rp(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};ra.prototype.writeBigInt64LE=N_(function(t,r=0){return uTe(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});ra.prototype.writeBigInt64BE=N_(function(t,r=0){return cTe(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function fTe(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function hTe(e,t,r,n,i){return t=+t,r=r>>>0,i||fTe(e,t,r,4,34028234663852886e22,-34028234663852886e22),iA.write(e,t,r,n,23,4),r+4}ra.prototype.writeFloatLE=function(t,r,n){return hTe(this,t,r,!0,n)};ra.prototype.writeFloatBE=function(t,r,n){return hTe(this,t,r,!1,n)};function dTe(e,t,r,n,i){return t=+t,r=r>>>0,i||fTe(e,t,r,8,17976931348623157e292,-17976931348623157e292),iA.write(e,t,r,n,52,8),r+8}ra.prototype.writeDoubleLE=function(t,r,n){return dTe(this,t,r,!0,n)};ra.prototype.writeDoubleBE=function(t,r,n){return dTe(this,t,r,!1,n)};ra.prototype.copy=function(t,r,n,i){if(!ra.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-r>>0,n=n===void 0?this.length:n>>>0,t||(t=0);let a;if(typeof t=="number")for(a=r;a2**32?i=iTe(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=iTe(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function iTe(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function xTt(e,t,r){nA(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Y4(t,e.length-(r+1))}function vTe(e,t,r,n,i,a){if(e>r||e3?t===0||t===BigInt(0)?s=`>= 0${o} and < 2${o} ** ${(a+1)*8}${o}`:s=`>= -(2${o} ** ${(a+1)*8-1}${o}) and < 2 ** ${(a+1)*8-1}${o}`:s=`>= ${t}${o} and <= ${r}${o}`,new rA.ERR_OUT_OF_RANGE("value",s,e)}xTt(n,i,a)}function nA(e,t){if(typeof e!="number")throw new rA.ERR_INVALID_ARG_TYPE(t,"number",e)}function Y4(e,t,r){throw Math.floor(e)!==e?(nA(e,r),new rA.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new rA.ERR_BUFFER_OUT_OF_BOUNDS:new rA.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var bTt=/[^+/0-9A-Za-z-_]/g;function wTt(e){if(e=e.split("=")[0],e=e.trim().replace(bTt,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function AH(e,t){t=t||1/0;let r,n=e.length,i=null,a=[];for(let o=0;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return a}function TTt(e){let t=[];for(let r=0;r>8,i=r%256,a.push(i),a.push(n);return a}function pTe(e){return bH.toByteArray(wTt(e))}function Z8(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function Hm(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function kH(e){return e!==e}var STt=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function N_(e){return typeof BigInt=="undefined"?MTt:e}function MTt(){throw new Error("BigInt not supported")}});var Y8=ye((ahr,gTe)=>{"use strict";gTe.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(var a in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,r);if(s.value!==i||s.enumerable!==!0)return!1}return!0}});var K4=ye((ohr,mTe)=>{"use strict";var ETt=Y8();mTe.exports=function(){return ETt()&&!!Symbol.toStringTag}});var CH=ye((shr,yTe)=>{"use strict";yTe.exports=Object});var xTe=ye((lhr,_Te)=>{"use strict";_Te.exports=Error});var wTe=ye((uhr,bTe)=>{"use strict";bTe.exports=EvalError});var ATe=ye((chr,TTe)=>{"use strict";TTe.exports=RangeError});var MTe=ye((fhr,STe)=>{"use strict";STe.exports=ReferenceError});var LH=ye((hhr,ETe)=>{"use strict";ETe.exports=SyntaxError});var oA=ye((dhr,kTe)=>{"use strict";kTe.exports=TypeError});var LTe=ye((vhr,CTe)=>{"use strict";CTe.exports=URIError});var ITe=ye((phr,PTe)=>{"use strict";PTe.exports=Math.abs});var DTe=ye((ghr,RTe)=>{"use strict";RTe.exports=Math.floor});var zTe=ye((mhr,FTe)=>{"use strict";FTe.exports=Math.max});var OTe=ye((yhr,qTe)=>{"use strict";qTe.exports=Math.min});var NTe=ye((_hr,BTe)=>{"use strict";BTe.exports=Math.pow});var VTe=ye((xhr,UTe)=>{"use strict";UTe.exports=Math.round});var HTe=ye((bhr,GTe)=>{"use strict";GTe.exports=Number.isNaN||function(t){return t!==t}});var WTe=ye((whr,jTe)=>{"use strict";var kTt=HTe();jTe.exports=function(t){return kTt(t)||t===0?t:t<0?-1:1}});var ZTe=ye((Thr,XTe)=>{"use strict";XTe.exports=Object.getOwnPropertyDescriptor});var x2=ye((Ahr,YTe)=>{"use strict";var K8=ZTe();if(K8)try{K8([],"length")}catch(e){K8=null}YTe.exports=K8});var J4=ye((Shr,KTe)=>{"use strict";var J8=Object.defineProperty||!1;if(J8)try{J8({},"a",{value:1})}catch(e){J8=!1}KTe.exports=J8});var QTe=ye((Mhr,$Te)=>{"use strict";var JTe=typeof Symbol!="undefined"&&Symbol,CTt=Y8();$Te.exports=function(){return typeof JTe!="function"||typeof Symbol!="function"||typeof JTe("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:CTt()}});var PH=ye((Ehr,eAe)=>{"use strict";eAe.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var IH=ye((khr,tAe)=>{"use strict";var LTt=CH();tAe.exports=LTt.getPrototypeOf||null});var nAe=ye((Chr,iAe)=>{"use strict";var PTt="Function.prototype.bind called on incompatible ",ITt=Object.prototype.toString,RTt=Math.max,DTt="[object Function]",rAe=function(t,r){for(var n=[],i=0;i{"use strict";var qTt=nAe();aAe.exports=Function.prototype.bind||qTt});var $8=ye((Phr,oAe)=>{"use strict";oAe.exports=Function.prototype.call});var RH=ye((Ihr,sAe)=>{"use strict";sAe.exports=Function.prototype.apply});var uAe=ye((Rhr,lAe)=>{"use strict";lAe.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var fAe=ye((Dhr,cAe)=>{"use strict";var OTt=sA(),BTt=RH(),NTt=$8(),UTt=uAe();cAe.exports=UTt||OTt.call(NTt,BTt)});var dAe=ye((Fhr,hAe)=>{"use strict";var VTt=sA(),GTt=oA(),HTt=$8(),jTt=fAe();hAe.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new GTt("a function is required");return jTt(VTt,HTt,t)}});var _Ae=ye((zhr,yAe)=>{"use strict";var WTt=dAe(),vAe=x2(),gAe;try{gAe=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var DH=!!gAe&&vAe&&vAe(Object.prototype,"__proto__"),mAe=Object,pAe=mAe.getPrototypeOf;yAe.exports=DH&&typeof DH.get=="function"?WTt([DH.get]):typeof pAe=="function"?function(t){return pAe(t==null?t:mAe(t))}:!1});var AAe=ye((qhr,TAe)=>{"use strict";var xAe=PH(),bAe=IH(),wAe=_Ae();TAe.exports=xAe?function(t){return xAe(t)}:bAe?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return bAe(t)}:wAe?function(t){return wAe(t)}:null});var MAe=ye((Ohr,SAe)=>{"use strict";var XTt=Function.prototype.call,ZTt=Object.prototype.hasOwnProperty,YTt=sA();SAe.exports=YTt.call(XTt,ZTt)});var tR=ye((Bhr,IAe)=>{"use strict";var lu,KTt=CH(),JTt=xTe(),$Tt=wTe(),QTt=ATe(),eAt=MTe(),fA=LH(),cA=oA(),tAt=LTe(),rAt=ITe(),iAt=DTe(),nAt=zTe(),aAt=OTe(),oAt=NTe(),sAt=VTe(),lAt=WTe(),LAe=Function,FH=function(e){try{return LAe('"use strict"; return ('+e+").constructor;")()}catch(t){}},$4=x2(),uAt=J4(),zH=function(){throw new cA},cAt=$4?function(){try{return arguments.callee,zH}catch(e){try{return $4(arguments,"callee").get}catch(t){return zH}}}():zH,lA=QTe()(),tv=AAe(),fAt=IH(),hAt=PH(),PAe=RH(),Q4=$8(),uA={},dAt=typeof Uint8Array=="undefined"||!tv?lu:tv(Uint8Array),b2={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?lu:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?lu:ArrayBuffer,"%ArrayIteratorPrototype%":lA&&tv?tv([][Symbol.iterator]()):lu,"%AsyncFromSyncIteratorPrototype%":lu,"%AsyncFunction%":uA,"%AsyncGenerator%":uA,"%AsyncGeneratorFunction%":uA,"%AsyncIteratorPrototype%":uA,"%Atomics%":typeof Atomics=="undefined"?lu:Atomics,"%BigInt%":typeof BigInt=="undefined"?lu:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?lu:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?lu:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?lu:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":JTt,"%eval%":eval,"%EvalError%":$Tt,"%Float16Array%":typeof Float16Array=="undefined"?lu:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?lu:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?lu:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?lu:FinalizationRegistry,"%Function%":LAe,"%GeneratorFunction%":uA,"%Int8Array%":typeof Int8Array=="undefined"?lu:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?lu:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?lu:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":lA&&tv?tv(tv([][Symbol.iterator]())):lu,"%JSON%":typeof JSON=="object"?JSON:lu,"%Map%":typeof Map=="undefined"?lu:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!lA||!tv?lu:tv(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":KTt,"%Object.getOwnPropertyDescriptor%":$4,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?lu:Promise,"%Proxy%":typeof Proxy=="undefined"?lu:Proxy,"%RangeError%":QTt,"%ReferenceError%":eAt,"%Reflect%":typeof Reflect=="undefined"?lu:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?lu:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!lA||!tv?lu:tv(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?lu:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":lA&&tv?tv(""[Symbol.iterator]()):lu,"%Symbol%":lA?Symbol:lu,"%SyntaxError%":fA,"%ThrowTypeError%":cAt,"%TypedArray%":dAt,"%TypeError%":cA,"%Uint8Array%":typeof Uint8Array=="undefined"?lu:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?lu:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?lu:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?lu:Uint32Array,"%URIError%":tAt,"%WeakMap%":typeof WeakMap=="undefined"?lu:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?lu:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?lu:WeakSet,"%Function.prototype.call%":Q4,"%Function.prototype.apply%":PAe,"%Object.defineProperty%":uAt,"%Object.getPrototypeOf%":fAt,"%Math.abs%":rAt,"%Math.floor%":iAt,"%Math.max%":nAt,"%Math.min%":aAt,"%Math.pow%":oAt,"%Math.round%":sAt,"%Math.sign%":lAt,"%Reflect.getPrototypeOf%":hAt};if(tv)try{null.error}catch(e){EAe=tv(tv(e)),b2["%Error.prototype%"]=EAe}var EAe,vAt=function e(t){var r;if(t==="%AsyncFunction%")r=FH("async function () {}");else if(t==="%GeneratorFunction%")r=FH("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=FH("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&tv&&(r=tv(i.prototype))}return b2[t]=r,r},kAe={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},eE=sA(),Q8=MAe(),pAt=eE.call(Q4,Array.prototype.concat),gAt=eE.call(PAe,Array.prototype.splice),CAe=eE.call(Q4,String.prototype.replace),eR=eE.call(Q4,String.prototype.slice),mAt=eE.call(Q4,RegExp.prototype.exec),yAt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,_At=/\\(\\)?/g,xAt=function(t){var r=eR(t,0,1),n=eR(t,-1);if(r==="%"&&n!=="%")throw new fA("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new fA("invalid intrinsic syntax, expected opening `%`");var i=[];return CAe(t,yAt,function(a,o,s,l){i[i.length]=s?CAe(l,_At,"$1"):o||a}),i},bAt=function(t,r){var n=t,i;if(Q8(kAe,n)&&(i=kAe[n],n="%"+i[0]+"%"),Q8(b2,n)){var a=b2[n];if(a===uA&&(a=vAt(n)),typeof a=="undefined"&&!r)throw new cA("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new fA("intrinsic "+t+" does not exist!")};IAe.exports=function(t,r){if(typeof t!="string"||t.length===0)throw new cA("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new cA('"allowMissing" argument must be a boolean');if(mAt(/^%?[^%]*%?$/,t)===null)throw new fA("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=xAt(t),i=n.length>0?n[0]:"",a=bAt("%"+i+"%",r),o=a.name,s=a.value,l=!1,u=a.alias;u&&(i=u[0],gAt(n,pAt([0,1],u)));for(var c=1,f=!0;c=n.length){var m=$4(s,h);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?s=m.get:s=s[h]}else f=Q8(s,h),s=s[h];f&&!l&&(b2[o]=s)}}return s}});var zAe=ye((Nhr,FAe)=>{"use strict";var RAe=J4(),wAt=LH(),hA=oA(),DAe=x2();FAe.exports=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new hA("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new hA("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new hA("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new hA("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new hA("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new hA("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,l=!!DAe&&DAe(t,r);if(RAe)RAe(t,r,{configurable:o===null&&l?l.configurable:!o,enumerable:i===null&&l?l.enumerable:!i,value:n,writable:a===null&&l?l.writable:!a});else if(s||!i&&!a&&!o)t[r]=n;else throw new wAt("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var OH=ye((Uhr,OAe)=>{"use strict";var qH=J4(),qAe=function(){return!!qH};qAe.hasArrayLengthDefineBug=function(){if(!qH)return null;try{return qH([],"length",{value:1}).length!==1}catch(t){return!0}};OAe.exports=qAe});var GAe=ye((Vhr,VAe)=>{"use strict";var TAt=tR(),BAe=zAe(),AAt=OH()(),NAe=x2(),UAe=oA(),SAt=TAt("%Math.floor%");VAe.exports=function(t,r){if(typeof t!="function")throw new UAe("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||SAt(r)!==r)throw new UAe("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,a=!0;if("length"in t&&NAe){var o=NAe(t,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(a=!1)}return(i||a||!n)&&(AAt?BAe(t,"length",r,!0,!0):BAe(t,"length",r)),t}});var tE=ye((Ghr,rR)=>{"use strict";var BH=sA(),iR=tR(),MAt=GAe(),EAt=oA(),WAe=iR("%Function.prototype.apply%"),XAe=iR("%Function.prototype.call%"),ZAe=iR("%Reflect.apply%",!0)||BH.call(XAe,WAe),HAe=J4(),kAt=iR("%Math.max%");rR.exports=function(t){if(typeof t!="function")throw new EAt("a function is required");var r=ZAe(BH,XAe,arguments);return MAt(r,1+kAt(0,t.length-(arguments.length-1)),!0)};var jAe=function(){return ZAe(BH,WAe,arguments)};HAe?HAe(rR.exports,"apply",{value:jAe}):rR.exports.apply=jAe});var dA=ye((Hhr,JAe)=>{"use strict";var YAe=tR(),KAe=tE(),CAt=KAe(YAe("String.prototype.indexOf"));JAe.exports=function(t,r){var n=YAe(t,!!r);return typeof n=="function"&&CAt(t,".prototype.")>-1?KAe(n):n}});var e5e=ye((jhr,QAe)=>{"use strict";var LAt=K4()(),PAt=dA(),NH=PAt("Object.prototype.toString"),nR=function(t){return LAt&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:NH(t)==="[object Arguments]"},$Ae=function(t){return nR(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&NH(t)!=="[object Array]"&&NH(t.callee)==="[object Function]"},IAt=function(){return nR(arguments)}();nR.isLegacyArguments=$Ae;QAe.exports=IAt?nR:$Ae});var i5e=ye((Whr,r5e)=>{"use strict";var RAt=Object.prototype.toString,DAt=Function.prototype.toString,FAt=/^\s*(?:function)?\*/,t5e=K4()(),UH=Object.getPrototypeOf,zAt=function(){if(!t5e)return!1;try{return Function("return function*() {}")()}catch(e){}},VH;r5e.exports=function(t){if(typeof t!="function")return!1;if(FAt.test(DAt.call(t)))return!0;if(!t5e){var r=RAt.call(t);return r==="[object GeneratorFunction]"}if(!UH)return!1;if(typeof VH=="undefined"){var n=zAt();VH=n?UH(n):!1}return UH(t)===VH}});var s5e=ye((Xhr,o5e)=>{"use strict";var a5e=Function.prototype.toString,vA=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,HH,aR;if(typeof vA=="function"&&typeof Object.defineProperty=="function")try{HH=Object.defineProperty({},"length",{get:function(){throw aR}}),aR={},vA(function(){throw 42},null,HH)}catch(e){e!==aR&&(vA=null)}else vA=null;var qAt=/^\s*class\b/,jH=function(t){try{var r=a5e.call(t);return qAt.test(r)}catch(n){return!1}},GH=function(t){try{return jH(t)?!1:(a5e.call(t),!0)}catch(r){return!1}},oR=Object.prototype.toString,OAt="[object Object]",BAt="[object Function]",NAt="[object GeneratorFunction]",UAt="[object HTMLAllCollection]",VAt="[object HTML document.all class]",GAt="[object HTMLCollection]",HAt=typeof Symbol=="function"&&!!Symbol.toStringTag,jAt=!(0 in[,]),WH=function(){return!1};typeof document=="object"&&(n5e=document.all,oR.call(n5e)===oR.call(document.all)&&(WH=function(t){if((jAt||!t)&&(typeof t=="undefined"||typeof t=="object"))try{var r=oR.call(t);return(r===UAt||r===VAt||r===GAt||r===OAt)&&t("")==null}catch(n){}return!1}));var n5e;o5e.exports=vA?function(t){if(WH(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{vA(t,null,HH)}catch(r){if(r!==aR)return!1}return!jH(t)&&GH(t)}:function(t){if(WH(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(HAt)return GH(t);if(jH(t))return!1;var r=oR.call(t);return r!==BAt&&r!==NAt&&!/^\[object HTML/.test(r)?!1:GH(t)}});var XH=ye((Zhr,u5e)=>{"use strict";var WAt=s5e(),XAt=Object.prototype.toString,l5e=Object.prototype.hasOwnProperty,ZAt=function(t,r,n){for(var i=0,a=t.length;i=3&&(i=n),XAt.call(t)==="[object Array]"?ZAt(t,r,i):typeof t=="string"?YAt(t,r,i):KAt(t,r,i)};u5e.exports=JAt});var YH=ye((Yhr,c5e)=>{"use strict";var ZH=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],$At=typeof globalThis=="undefined"?window:globalThis;c5e.exports=function(){for(var t=[],r=0;r{"use strict";var lR=XH(),QAt=YH(),f5e=tE(),$H=dA(),sR=x2(),e5t=$H("Object.prototype.toString"),d5e=K4()(),h5e=typeof globalThis=="undefined"?window:globalThis,JH=QAt(),QH=$H("String.prototype.slice"),KH=Object.getPrototypeOf,t5t=$H("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n-1?r:r!=="Object"?!1:i5t(t)}return sR?r5t(t):null}});var b5e=ye((Jhr,x5e)=>{"use strict";var g5e=XH(),n5t=YH(),tj=dA(),a5t=tj("Object.prototype.toString"),m5e=K4()(),cR=x2(),o5t=typeof globalThis=="undefined"?window:globalThis,y5e=n5t(),s5t=tj("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n-1}return cR?u5t(t):!1}});var nj=ye(uu=>{"use strict";var c5t=e5e(),f5t=i5e(),Wg=p5e(),w5e=b5e();function pA(e){return e.call.bind(e)}var T5e=typeof BigInt!="undefined",A5e=typeof Symbol!="undefined",K0=pA(Object.prototype.toString),h5t=pA(Number.prototype.valueOf),d5t=pA(String.prototype.valueOf),v5t=pA(Boolean.prototype.valueOf);T5e&&(S5e=pA(BigInt.prototype.valueOf));var S5e;A5e&&(M5e=pA(Symbol.prototype.valueOf));var M5e;function iE(e,t){if(typeof e!="object")return!1;try{return t(e),!0}catch(r){return!1}}uu.isArgumentsObject=c5t;uu.isGeneratorFunction=f5t;uu.isTypedArray=w5e;function p5t(e){return typeof Promise!="undefined"&&e instanceof Promise||e!==null&&typeof e=="object"&&typeof e.then=="function"&&typeof e.catch=="function"}uu.isPromise=p5t;function g5t(e){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(e):w5e(e)||k5e(e)}uu.isArrayBufferView=g5t;function m5t(e){return Wg(e)==="Uint8Array"}uu.isUint8Array=m5t;function y5t(e){return Wg(e)==="Uint8ClampedArray"}uu.isUint8ClampedArray=y5t;function _5t(e){return Wg(e)==="Uint16Array"}uu.isUint16Array=_5t;function x5t(e){return Wg(e)==="Uint32Array"}uu.isUint32Array=x5t;function b5t(e){return Wg(e)==="Int8Array"}uu.isInt8Array=b5t;function w5t(e){return Wg(e)==="Int16Array"}uu.isInt16Array=w5t;function T5t(e){return Wg(e)==="Int32Array"}uu.isInt32Array=T5t;function A5t(e){return Wg(e)==="Float32Array"}uu.isFloat32Array=A5t;function S5t(e){return Wg(e)==="Float64Array"}uu.isFloat64Array=S5t;function M5t(e){return Wg(e)==="BigInt64Array"}uu.isBigInt64Array=M5t;function E5t(e){return Wg(e)==="BigUint64Array"}uu.isBigUint64Array=E5t;function fR(e){return K0(e)==="[object Map]"}fR.working=typeof Map!="undefined"&&fR(new Map);function k5t(e){return typeof Map=="undefined"?!1:fR.working?fR(e):e instanceof Map}uu.isMap=k5t;function hR(e){return K0(e)==="[object Set]"}hR.working=typeof Set!="undefined"&&hR(new Set);function C5t(e){return typeof Set=="undefined"?!1:hR.working?hR(e):e instanceof Set}uu.isSet=C5t;function dR(e){return K0(e)==="[object WeakMap]"}dR.working=typeof WeakMap!="undefined"&&dR(new WeakMap);function L5t(e){return typeof WeakMap=="undefined"?!1:dR.working?dR(e):e instanceof WeakMap}uu.isWeakMap=L5t;function ij(e){return K0(e)==="[object WeakSet]"}ij.working=typeof WeakSet!="undefined"&&ij(new WeakSet);function P5t(e){return ij(e)}uu.isWeakSet=P5t;function vR(e){return K0(e)==="[object ArrayBuffer]"}vR.working=typeof ArrayBuffer!="undefined"&&vR(new ArrayBuffer);function E5e(e){return typeof ArrayBuffer=="undefined"?!1:vR.working?vR(e):e instanceof ArrayBuffer}uu.isArrayBuffer=E5e;function pR(e){return K0(e)==="[object DataView]"}pR.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&pR(new DataView(new ArrayBuffer(1),0,1));function k5e(e){return typeof DataView=="undefined"?!1:pR.working?pR(e):e instanceof DataView}uu.isDataView=k5e;var rj=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function rE(e){return K0(e)==="[object SharedArrayBuffer]"}function C5e(e){return typeof rj=="undefined"?!1:(typeof rE.working=="undefined"&&(rE.working=rE(new rj)),rE.working?rE(e):e instanceof rj)}uu.isSharedArrayBuffer=C5e;function I5t(e){return K0(e)==="[object AsyncFunction]"}uu.isAsyncFunction=I5t;function R5t(e){return K0(e)==="[object Map Iterator]"}uu.isMapIterator=R5t;function D5t(e){return K0(e)==="[object Set Iterator]"}uu.isSetIterator=D5t;function F5t(e){return K0(e)==="[object Generator]"}uu.isGeneratorObject=F5t;function z5t(e){return K0(e)==="[object WebAssembly.Module]"}uu.isWebAssemblyCompiledModule=z5t;function L5e(e){return iE(e,h5t)}uu.isNumberObject=L5e;function P5e(e){return iE(e,d5t)}uu.isStringObject=P5e;function I5e(e){return iE(e,v5t)}uu.isBooleanObject=I5e;function R5e(e){return T5e&&iE(e,S5e)}uu.isBigIntObject=R5e;function D5e(e){return A5e&&iE(e,M5e)}uu.isSymbolObject=D5e;function q5t(e){return L5e(e)||P5e(e)||I5e(e)||R5e(e)||D5e(e)}uu.isBoxedPrimitive=q5t;function O5t(e){return typeof Uint8Array!="undefined"&&(E5e(e)||C5e(e))}uu.isAnyArrayBuffer=O5t;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(uu,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})})});var aj=ye((Qhr,F5e)=>{F5e.exports=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}});var fj=ye(cu=>{var z5e=Object.getOwnPropertyDescriptors||function(t){for(var r=Object.keys(t),n={},i=0;i=i)return s;switch(s){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(l){return"[Circular]"}default:return s}}),o=n[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),uj(t)?r.showHidden=t:t&&cu._extend(r,t),T2(r.showHidden)&&(r.showHidden=!1),T2(r.depth)&&(r.depth=2),T2(r.colors)&&(r.colors=!1),T2(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=N5t),_R(r,e,r.depth)}cu.inspect=U_;U_.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};U_.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function N5t(e,t){var r=U_.styles[t];return r?"\x1B["+U_.colors[r][0]+"m"+e+"\x1B["+U_.colors[r][1]+"m":e}function U5t(e,t){return e}function V5t(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function _R(e,t,r){if(e.customInspect&&t&&yR(t.inspect)&&t.inspect!==cu.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return wR(n)||(n=_R(e,n,r)),n}var i=G5t(e,t);if(i)return i;var a=Object.keys(t),o=V5t(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),aE(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return oj(t);if(a.length===0){if(yR(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(nE(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(xR(t))return e.stylize(Date.prototype.toString.call(t),"date");if(aE(t))return oj(t)}var l="",u=!1,c=["{","}"];if(O5e(t)&&(u=!0,c=["[","]"]),yR(t)){var f=t.name?": "+t.name:"";l=" [Function"+f+"]"}if(nE(t)&&(l=" "+RegExp.prototype.toString.call(t)),xR(t)&&(l=" "+Date.prototype.toUTCString.call(t)),aE(t)&&(l=" "+oj(t)),a.length===0&&(!u||t.length==0))return c[0]+l+c[1];if(r<0)return nE(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var h;return u?h=H5t(e,t,r,o,a):h=a.map(function(d){return lj(e,t,r,o,d,u)}),e.seen.pop(),j5t(h,l,c)}function G5t(e,t){if(T2(t))return e.stylize("undefined","undefined");if(wR(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(B5e(t))return e.stylize(""+t,"number");if(uj(t))return e.stylize(""+t,"boolean");if(bR(t))return e.stylize("null","null")}function oj(e){return"["+Error.prototype.toString.call(e)+"]"}function H5t(e,t,r,n,i){for(var a=[],o=0,s=t.length;o-1&&(a?s=s.split(` `).map(function(u){return" "+u}).join(` `).slice(2):s=` `+s.split(` `).map(function(u){return" "+u}).join(` -`))):s=e.stylize("[Circular]","special")),T2(o)){if(a&&i.match(/^\d+$/))return s;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function G5t(e,t,r){var n=0,i=e.reduce(function(a,o){return n++,o.indexOf(` +`))):s=e.stylize("[Circular]","special")),T2(o)){if(a&&i.match(/^\d+$/))return s;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function j5t(e,t,r){var n=0,i=e.reduce(function(a,o){return n++,o.indexOf(` `)>=0&&n++,a+o.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(t===""?"":t+` `)+" "+e.join(`, - `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}cu.types=nj();function q5e(e){return Array.isArray(e)}cu.isArray=q5e;function uj(e){return typeof e=="boolean"}cu.isBoolean=uj;function bR(e){return e===null}cu.isNull=bR;function H5t(e){return e==null}cu.isNullOrUndefined=H5t;function B5e(e){return typeof e=="number"}cu.isNumber=B5e;function wR(e){return typeof e=="string"}cu.isString=wR;function j5t(e){return typeof e=="symbol"}cu.isSymbol=j5t;function T2(e){return e===void 0}cu.isUndefined=T2;function nE(e){return pA(e)&&cj(e)==="[object RegExp]"}cu.isRegExp=nE;cu.types.isRegExp=nE;function pA(e){return typeof e=="object"&&e!==null}cu.isObject=pA;function xR(e){return pA(e)&&cj(e)==="[object Date]"}cu.isDate=xR;cu.types.isDate=xR;function aE(e){return pA(e)&&(cj(e)==="[object Error]"||e instanceof Error)}cu.isError=aE;cu.types.isNativeError=aE;function yR(e){return typeof e=="function"}cu.isFunction=yR;function W5t(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}cu.isPrimitive=W5t;cu.isBuffer=aj();function cj(e){return Object.prototype.toString.call(e)}function sj(e){return e<10?"0"+e.toString(10):e.toString(10)}var X5t=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Z5t(){var e=new Date,t=[sj(e.getHours()),sj(e.getMinutes()),sj(e.getSeconds())].join(":");return[e.getDate(),X5t[e.getMonth()],t].join(" ")}cu.log=function(){console.log("%s - %s",Z5t(),cu.format.apply(cu,arguments))};cu.inherits=Zy();cu._extend=function(e,t){if(!t||!pA(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};function N5e(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var w2=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;cu.promisify=function(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if(w2&&t[w2]){var r=t[w2];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,w2,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var n,i,a=new Promise(function(l,u){n=l,i=u}),o=[],s=0;s{"use strict";function U5e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function J5t(e){for(var t=1;t0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i}},{key:"concat",value:function(r){if(this.length===0)return TR.alloc(0);for(var n=TR.allocUnsafe(r>>>0),i=this.head,a=0;i;)nSt(i.data,n,a),a+=i.data.length,i=i.next;return n}},{key:"consume",value:function(r,n){var i;return ro.length?o.length:r;if(s===o.length?a+=o:a+=o.slice(0,r),r-=s,r===0){s===o.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(s));break}++i}return this.length-=i,a}},{key:"_getBuffer",value:function(r){var n=TR.allocUnsafe(r),i=this.head,a=1;for(i.data.copy(n),r-=i.data.length;i=i.next;){var o=i.data,s=r>o.length?o.length:r;if(o.copy(n,n.length-r,0,s),r-=s,r===0){s===o.length?(++a,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(s));break}++a}return this.length-=a,n}},{key:iSt,value:function(r,n){return hj(this,J5t({},n,{depth:0,customInspect:!1}))}}]),e}()});var vj=ye((Yhr,W5e)=>{"use strict";function aSt(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(dj,this,e)):process.nextTick(dj,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!t&&a?r._writableState?r._writableState.errorEmitted?process.nextTick(AR,r):(r._writableState.errorEmitted=!0,process.nextTick(j5e,r,a)):process.nextTick(j5e,r,a):t?(process.nextTick(AR,r),t(a)):process.nextTick(AR,r)}),this)}function j5e(e,t){dj(e,t),AR(e)}function AR(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function oSt(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function dj(e,t){e.emit("error",t)}function sSt(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}W5e.exports={destroy:aSt,undestroy:oSt,errorOrDestroy:sSt}});var A2=ye((Khr,Y5e)=>{"use strict";function lSt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var Z5e={};function J0(e,t,r){r||(r=Error);function n(a,o,s){return typeof t=="string"?t:t(a,o,s)}var i=function(a){lSt(o,a);function o(s,l,u){return a.call(this,n(s,l,u))||this}return o}(r);i.prototype.name=r.name,i.prototype.code=e,Z5e[e]=i}function X5e(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(n){return String(n)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function uSt(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function cSt(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function fSt(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}J0("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);J0("ERR_INVALID_ARG_TYPE",function(e,t,r){var n;typeof t=="string"&&uSt(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var i;if(cSt(e," argument"))i="The ".concat(e," ").concat(n," ").concat(X5e(t,"type"));else{var a=fSt(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(a," ").concat(n," ").concat(X5e(t,"type"))}return i+=". Received type ".concat(typeof r),i},TypeError);J0("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");J0("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});J0("ERR_STREAM_PREMATURE_CLOSE","Premature close");J0("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});J0("ERR_MULTIPLE_CALLBACK","Callback called multiple times");J0("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");J0("ERR_STREAM_WRITE_AFTER_END","write after end");J0("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);J0("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);J0("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Y5e.exports.codes=Z5e});var pj=ye((Jhr,K5e)=>{"use strict";var hSt=A2().codes.ERR_INVALID_OPT_VALUE;function dSt(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function vSt(e,t,r,n){var i=dSt(t,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var a=n?r:"highWaterMark";throw new hSt(a,i)}return Math.floor(i)}return e.objectMode?16:16*1024}K5e.exports={getHighWaterMark:vSt}});var $5e=ye(($hr,J5e)=>{J5e.exports=pSt;function pSt(e,t){if(gj("noDeprecation"))return e;var r=!1;function n(){if(!r){if(gj("throwDeprecation"))throw new Error(t);gj("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return n}function gj(e){try{if(!window.localStorage)return!1}catch(r){return!1}var t=window.localStorage[e];return t==null?!1:String(t).toLowerCase()==="true"}});var _j=ye((Qhr,nSe)=>{"use strict";nSe.exports=Bh;function eSe(e){var t=this;this.next=null,this.entry=null,this.finish=function(){VSt(t,e)}}var gA;Bh.WritableState=sE;var gSt={deprecate:$5e()},tSe=yH(),MR=_2().Buffer,mSt=window.Uint8Array||function(){};function ySt(e){return MR.from(e)}function _St(e){return MR.isBuffer(e)||e instanceof mSt}var yj=vj(),xSt=pj(),bSt=xSt.getHighWaterMark,V_=A2().codes,wSt=V_.ERR_INVALID_ARG_TYPE,TSt=V_.ERR_METHOD_NOT_IMPLEMENTED,ASt=V_.ERR_MULTIPLE_CALLBACK,SSt=V_.ERR_STREAM_CANNOT_PIPE,MSt=V_.ERR_STREAM_DESTROYED,ESt=V_.ERR_STREAM_NULL_VALUES,kSt=V_.ERR_STREAM_WRITE_AFTER_END,CSt=V_.ERR_UNKNOWN_ENCODING,mA=yj.errorOrDestroy;Zy()(Bh,tSe);function LSt(){}function sE(e,t,r){gA=gA||S2(),e=e||{},typeof r!="boolean"&&(r=t instanceof gA),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=bSt(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){OSt(t,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new eSe(this)}sE.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(sE.prototype,"buffer",{get:gSt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}})();var SR;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(SR=Function.prototype[Symbol.hasInstance],Object.defineProperty(Bh,Symbol.hasInstance,{value:function(t){return SR.call(this,t)?!0:this!==Bh?!1:t&&t._writableState instanceof sE}})):SR=function(t){return t instanceof this};function Bh(e){gA=gA||S2();var t=this instanceof gA;if(!t&&!SR.call(Bh,this))return new Bh(e);this._writableState=new sE(e,this,t),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),tSe.call(this)}Bh.prototype.pipe=function(){mA(this,new SSt)};function PSt(e,t){var r=new kSt;mA(e,r),process.nextTick(t,r)}function ISt(e,t,r,n){var i;return r===null?i=new ESt:typeof r!="string"&&!t.objectMode&&(i=new wSt("chunk",["string","Buffer"],r)),i?(mA(e,i),process.nextTick(n,i),!1):!0}Bh.prototype.write=function(e,t,r){var n=this._writableState,i=!1,a=!n.objectMode&&_St(e);return a&&!MR.isBuffer(e)&&(e=ySt(e)),typeof t=="function"&&(r=t,t=null),a?t="buffer":t||(t=n.defaultEncoding),typeof r!="function"&&(r=LSt),n.ending?PSt(this,r):(a||ISt(this,n,e,r))&&(n.pendingcb++,i=DSt(this,n,a,e,t,r)),i};Bh.prototype.cork=function(){this._writableState.corked++};Bh.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&rSe(this,e))};Bh.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new CSt(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(Bh.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function RSt(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=MR.from(t,r)),t}Object.defineProperty(Bh.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function DSt(e,t,r,n,i,a){if(!r){var o=RSt(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var s=t.objectMode?1:n.length;t.length+=s;var l=t.length{"use strict";var GSt=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};oSe.exports=jm;var aSe=wj(),bj=_j();Zy()(jm,aSe);for(xj=GSt(bj.prototype),ER=0;ER{var CR=_2(),Wm=CR.Buffer;function sSe(e,t){for(var r in e)t[r]=e[r]}Wm.from&&Wm.alloc&&Wm.allocUnsafe&&Wm.allocUnsafeSlow?lSe.exports=CR:(sSe(CR,Tj),Tj.Buffer=M2);function M2(e,t,r){return Wm(e,t,r)}M2.prototype=Object.create(Wm.prototype);sSe(Wm,M2);M2.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return Wm(e,t,r)};M2.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=Wm(e);return t!==void 0?typeof r=="string"?n.fill(t,r):n.fill(t):n.fill(0),n};M2.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Wm(e)};M2.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return CR.SlowBuffer(e)}});var Mj=ye(fSe=>{"use strict";var Sj=uSe().Buffer,cSe=Sj.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function WSt(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function XSt(e){var t=WSt(e);if(typeof t!="string"&&(Sj.isEncoding===cSe||!cSe(e)))throw new Error("Unknown encoding: "+e);return t||e}fSe.StringDecoder=lE;function lE(e){this.encoding=XSt(e);var t;switch(this.encoding){case"utf16le":this.text=QSt,this.end=eMt,t=4;break;case"utf8":this.fillLast=KSt,t=4;break;case"base64":this.text=tMt,this.end=rMt,t=3;break;default:this.write=iMt,this.end=nMt;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Sj.allocUnsafe(t)}lE.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function ZSt(e,t,r){var n=t.length-1;if(n=0?(i>0&&(e.lastNeed=i-1),i):--n=0?(i>0&&(e.lastNeed=i-2),i):--n=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function YSt(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function KSt(e){var t=this.lastTotal-this.lastNeed,r=YSt(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function JSt(e,t){var r=ZSt(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function $St(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function QSt(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function eMt(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function tMt(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function rMt(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function iMt(e){return e.toString(this.encoding)}function nMt(e){return e&&e.length?this.write(e):""}});var LR=ye((rdr,vSe)=>{"use strict";var hSe=A2().codes.ERR_STREAM_PREMATURE_CLOSE;function aMt(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i{"use strict";var PR;function G_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var lMt=LR(),H_=Symbol("lastResolve"),E2=Symbol("lastReject"),uE=Symbol("error"),IR=Symbol("ended"),k2=Symbol("lastPromise"),Ej=Symbol("handlePromise"),C2=Symbol("stream");function j_(e,t){return{value:e,done:t}}function uMt(e){var t=e[H_];if(t!==null){var r=e[C2].read();r!==null&&(e[k2]=null,e[H_]=null,e[E2]=null,t(j_(r,!1)))}}function cMt(e){process.nextTick(uMt,e)}function fMt(e,t){return function(r,n){e.then(function(){if(t[IR]){r(j_(void 0,!0));return}t[Ej](r,n)},n)}}var hMt=Object.getPrototypeOf(function(){}),dMt=Object.setPrototypeOf((PR={get stream(){return this[C2]},next:function(){var t=this,r=this[uE];if(r!==null)return Promise.reject(r);if(this[IR])return Promise.resolve(j_(void 0,!0));if(this[C2].destroyed)return new Promise(function(o,s){process.nextTick(function(){t[uE]?s(t[uE]):o(j_(void 0,!0))})});var n=this[k2],i;if(n)i=new Promise(fMt(n,this));else{var a=this[C2].read();if(a!==null)return Promise.resolve(j_(a,!1));i=new Promise(this[Ej])}return this[k2]=i,i}},G_(PR,Symbol.asyncIterator,function(){return this}),G_(PR,"return",function(){var t=this;return new Promise(function(r,n){t[C2].destroy(null,function(i){if(i){n(i);return}r(j_(void 0,!0))})})}),PR),hMt),vMt=function(t){var r,n=Object.create(dMt,(r={},G_(r,C2,{value:t,writable:!0}),G_(r,H_,{value:null,writable:!0}),G_(r,E2,{value:null,writable:!0}),G_(r,uE,{value:null,writable:!0}),G_(r,IR,{value:t._readableState.endEmitted,writable:!0}),G_(r,Ej,{value:function(a,o){var s=n[C2].read();s?(n[k2]=null,n[H_]=null,n[E2]=null,a(j_(s,!1))):(n[H_]=a,n[E2]=o)},writable:!0}),r));return n[k2]=null,lMt(t,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=n[E2];a!==null&&(n[k2]=null,n[H_]=null,n[E2]=null,a(i)),n[uE]=i;return}var o=n[H_];o!==null&&(n[k2]=null,n[H_]=null,n[E2]=null,o(j_(void 0,!0))),n[IR]=!0}),t.on("readable",cMt.bind(null,n)),n};pSe.exports=vMt});var ySe=ye((ndr,mSe)=>{mSe.exports=function(){throw new Error("Readable.from is not available in the browser")}});var wj=ye((odr,kSe)=>{"use strict";kSe.exports=Bu;var yA;Bu.ReadableState=wSe;var adr=Ab().EventEmitter,bSe=function(t,r){return t.listeners(r).length},fE=yH(),RR=_2().Buffer,pMt=window.Uint8Array||function(){};function gMt(e){return RR.from(e)}function mMt(e){return RR.isBuffer(e)||e instanceof pMt}var kj=fj(),nu;kj&&kj.debuglog?nu=kj.debuglog("stream"):nu=function(){};var yMt=H5e(),Fj=vj(),_Mt=pj(),xMt=_Mt.getHighWaterMark,DR=A2().codes,bMt=DR.ERR_INVALID_ARG_TYPE,wMt=DR.ERR_STREAM_PUSH_AFTER_EOF,TMt=DR.ERR_METHOD_NOT_IMPLEMENTED,AMt=DR.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,_A,Cj,Lj;Zy()(Bu,fE);var cE=Fj.errorOrDestroy,Pj=["error","close","destroy","pause","resume"];function SMt(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function wSe(e,t,r){yA=yA||S2(),e=e||{},typeof r!="boolean"&&(r=t instanceof yA),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=xMt(this,e,"readableHighWaterMark",r),this.buffer=new yMt,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(_A||(_A=Mj().StringDecoder),this.decoder=new _A(e.encoding),this.encoding=e.encoding)}function Bu(e){if(yA=yA||S2(),!(this instanceof Bu))return new Bu(e);var t=this instanceof yA;this._readableState=new wSe(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),fE.call(this)}Object.defineProperty(Bu.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});Bu.prototype.destroy=Fj.destroy;Bu.prototype._undestroy=Fj.undestroy;Bu.prototype._destroy=function(e,t){t(e)};Bu.prototype.push=function(e,t){var r=this._readableState,n;return r.objectMode?n=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=RR.from(e,t),t=""),n=!0),TSe(this,e,t,!1,n)};Bu.prototype.unshift=function(e){return TSe(this,e,null,!0,!1)};function TSe(e,t,r,n,i){nu("readableAddChunk",t);var a=e._readableState;if(t===null)a.reading=!1,kMt(e,a);else{var o;if(i||(o=MMt(a,t)),o)cE(e,o);else if(a.objectMode||t&&t.length>0)if(typeof t!="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==RR.prototype&&(t=gMt(t)),n)a.endEmitted?cE(e,new AMt):Ij(e,a,t,!0);else if(a.ended)cE(e,new wMt);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||t.length!==0?Ij(e,a,t,!1):Dj(e,a)):Ij(e,a,t,!1)}else n||(a.reading=!1,Dj(e,a))}return!a.ended&&(a.length=_Se?e=_Se:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function xSe(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=EMt(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}Bu.prototype.read=function(e){nu("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return nu("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?Rj(this):FR(this),null;if(e=xSe(e,t),e===0&&t.ended)return t.length===0&&Rj(this),null;var n=t.needReadable;nu("need readable",n),(t.length===0||t.length-e0?i=MSe(e,t):i=null,i===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&Rj(this)),i!==null&&this.emit("data",i),i};function kMt(e,t){if(nu("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?FR(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,ASe(e)))}}function FR(e){var t=e._readableState;nu("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(nu("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(ASe,e))}function ASe(e){var t=e._readableState;nu("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,zj(e)}function Dj(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(CMt,e,t))}function CMt(e,t){for(;!t.reading&&!t.ended&&(t.length1&&ESe(n.pipes,e)!==-1)&&!u&&(nu("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(b){nu("onerror",b),_(),e.removeListener("error",h),bSe(e,"error")===0&&cE(e,b)}SMt(e,"error",h);function d(){e.removeListener("finish",v),_()}e.once("close",d);function v(){nu("onfinish"),e.removeListener("close",d),_()}e.once("finish",v);function _(){nu("unpipe"),r.unpipe(e)}return e.emit("pipe",r),n.flowing||(nu("pipe resume"),r.resume()),e};function LMt(e){return function(){var r=e._readableState;nu("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&bSe(e,"data")&&(r.flowing=!0,zj(e))}}Bu.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a0,n.flowing!==!1&&this.resume()):e==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,nu("on readable",n.length,n.reading),n.length?FR(this):n.reading||process.nextTick(PMt,this)),r};Bu.prototype.addListener=Bu.prototype.on;Bu.prototype.removeListener=function(e,t){var r=fE.prototype.removeListener.call(this,e,t);return e==="readable"&&process.nextTick(SSe,this),r};Bu.prototype.removeAllListeners=function(e){var t=fE.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(SSe,this),t};function SSe(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function PMt(e){nu("readable nexttick read 0"),e.read(0)}Bu.prototype.resume=function(){var e=this._readableState;return e.flowing||(nu("resume"),e.flowing=!e.readableListening,IMt(this,e)),e.paused=!1,this};function IMt(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(RMt,e,t))}function RMt(e,t){nu("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),zj(e),t.flowing&&!t.reading&&e.read(0)}Bu.prototype.pause=function(){return nu("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(nu("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function zj(e){var t=e._readableState;for(nu("flow",t.flowing);t.flowing&&e.read()!==null;);}Bu.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;e.on("end",function(){if(nu("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&t.push(o)}t.push(null)}),e.on("data",function(o){if(nu("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var s=t.push(o);s||(n=!0,e.pause())}});for(var i in e)this[i]===void 0&&typeof e[i]=="function"&&(this[i]=function(s){return function(){return e[s].apply(e,arguments)}}(i));for(var a=0;a=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function Rj(e){var t=e._readableState;nu("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(DMt,t,e))}function DMt(e,t){if(nu("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}typeof Symbol=="function"&&(Bu.from=function(e,t){return Lj===void 0&&(Lj=ySe()),Lj(Bu,e,t)});function ESe(e,t){for(var r=0,n=e.length;r{"use strict";LSe.exports=Ky;var zR=A2().codes,FMt=zR.ERR_METHOD_NOT_IMPLEMENTED,zMt=zR.ERR_MULTIPLE_CALLBACK,OMt=zR.ERR_TRANSFORM_ALREADY_TRANSFORMING,qMt=zR.ERR_TRANSFORM_WITH_LENGTH_0,OR=S2();Zy()(Ky,OR);function BMt(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new zMt);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length{"use strict";ISe.exports=hE;var PSe=Oj();Zy()(hE,PSe);function hE(e){if(!(this instanceof hE))return new hE(e);PSe.call(this,e)}hE.prototype._transform=function(e,t,r){r(null,e)}});var qSe=ye((udr,OSe)=>{"use strict";var qj;function UMt(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var zSe=A2().codes,VMt=zSe.ERR_MISSING_ARGS,GMt=zSe.ERR_STREAM_DESTROYED;function DSe(e){if(e)throw e}function HMt(e){return e.setHeader&&typeof e.abort=="function"}function jMt(e,t,r,n){n=UMt(n);var i=!1;e.on("close",function(){i=!0}),qj===void 0&&(qj=LR()),qj(e,{readable:t,writable:r},function(o){if(o)return n(o);i=!0,n()});var a=!1;return function(o){if(!i&&!a){if(a=!0,HMt(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(o||new GMt("pipe"))}}}function FSe(e){e()}function WMt(e,t){return e.pipe(t)}function XMt(e){return!e.length||typeof e[e.length-1]!="function"?DSe:e.pop()}function ZMt(){for(var e=arguments.length,t=new Array(e),r=0;r0;return jMt(o,l,u,function(c){i||(i=c),c&&a.forEach(FSe),!l&&(a.forEach(FSe),n(i))})});return t.reduce(WMt)}OSe.exports=ZMt});var NSe=ye((cdr,BSe)=>{BSe.exports=$0;var Bj=Ab().EventEmitter,YMt=Zy();YMt($0,Bj);$0.Readable=wj();$0.Writable=_j();$0.Duplex=S2();$0.Transform=Oj();$0.PassThrough=RSe();$0.finished=LR();$0.pipeline=qSe();$0.Stream=$0;function $0(){Bj.call(this)}$0.prototype.pipe=function(e,t){var r=this;function n(c){e.writable&&e.write(c)===!1&&r.pause&&r.pause()}r.on("data",n);function i(){r.readable&&r.resume&&r.resume()}e.on("drain",i),!e._isStdio&&(!t||t.end!==!1)&&(r.on("end",o),r.on("close",s));var a=!1;function o(){a||(a=!0,e.end())}function s(){a||(a=!0,typeof e.destroy=="function"&&e.destroy())}function l(c){if(u(),Bj.listenerCount(this,"error")===0)throw c}r.on("error",l),e.on("error",l);function u(){r.removeListener("data",n),e.removeListener("drain",i),r.removeListener("end",o),r.removeListener("close",s),r.removeListener("error",l),e.removeListener("error",l),r.removeListener("end",u),r.removeListener("close",u),e.removeListener("close",u)}return r.on("end",u),r.on("close",u),e.on("close",u),e.emit("pipe",r),e}});var bA=ye(fu=>{var USe=Object.getOwnPropertyDescriptors||function(t){for(var r=Object.keys(t),n={},i=0;i=i)return s;switch(s){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(l){return"[Circular]"}default:return s}}),o=n[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),Gj(t)?r.showHidden=t:t&&fu._extend(r,t),P2(r.showHidden)&&(r.showHidden=!1),P2(r.depth)&&(r.depth=2),P2(r.colors)&&(r.colors=!1),P2(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=JMt),UR(r,e,r.depth)}fu.inspect=W_;W_.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};W_.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function JMt(e,t){var r=W_.styles[t];return r?"\x1B["+W_.colors[r][0]+"m"+e+"\x1B["+W_.colors[r][1]+"m":e}function $Mt(e,t){return e}function QMt(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function UR(e,t,r){if(e.customInspect&&t&&NR(t.inspect)&&t.inspect!==fu.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return HR(n)||(n=UR(e,n,r)),n}var i=e4t(e,t);if(i)return i;var a=Object.keys(t),o=QMt(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),vE(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return Nj(t);if(a.length===0){if(NR(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(dE(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(VR(t))return e.stylize(Date.prototype.toString.call(t),"date");if(vE(t))return Nj(t)}var l="",u=!1,c=["{","}"];if(GSe(t)&&(u=!0,c=["[","]"]),NR(t)){var f=t.name?": "+t.name:"";l=" [Function"+f+"]"}if(dE(t)&&(l=" "+RegExp.prototype.toString.call(t)),VR(t)&&(l=" "+Date.prototype.toUTCString.call(t)),vE(t)&&(l=" "+Nj(t)),a.length===0&&(!u||t.length==0))return c[0]+l+c[1];if(r<0)return dE(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var h;return u?h=t4t(e,t,r,o,a):h=a.map(function(d){return Vj(e,t,r,o,d,u)}),e.seen.pop(),r4t(h,l,c)}function e4t(e,t){if(P2(t))return e.stylize("undefined","undefined");if(HR(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(HSe(t))return e.stylize(""+t,"number");if(Gj(t))return e.stylize(""+t,"boolean");if(GR(t))return e.stylize("null","null")}function Nj(e){return"["+Error.prototype.toString.call(e)+"]"}function t4t(e,t,r,n,i){for(var a=[],o=0,s=t.length;o{"use strict";function U5e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Q5t(e){for(var t=1;t0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i}},{key:"concat",value:function(r){if(this.length===0)return TR.alloc(0);for(var n=TR.allocUnsafe(r>>>0),i=this.head,a=0;i;)oSt(i.data,n,a),a+=i.data.length,i=i.next;return n}},{key:"consume",value:function(r,n){var i;return ro.length?o.length:r;if(s===o.length?a+=o:a+=o.slice(0,r),r-=s,r===0){s===o.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(s));break}++i}return this.length-=i,a}},{key:"_getBuffer",value:function(r){var n=TR.allocUnsafe(r),i=this.head,a=1;for(i.data.copy(n),r-=i.data.length;i=i.next;){var o=i.data,s=r>o.length?o.length:r;if(o.copy(n,n.length-r,0,s),r-=s,r===0){s===o.length?(++a,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(s));break}++a}return this.length-=a,n}},{key:aSt,value:function(r,n){return hj(this,Q5t({},n,{depth:0,customInspect:!1}))}}]),e}()});var vj=ye((rdr,W5e)=>{"use strict";function sSt(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(dj,this,e)):process.nextTick(dj,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!t&&a?r._writableState?r._writableState.errorEmitted?process.nextTick(AR,r):(r._writableState.errorEmitted=!0,process.nextTick(j5e,r,a)):process.nextTick(j5e,r,a):t?(process.nextTick(AR,r),t(a)):process.nextTick(AR,r)}),this)}function j5e(e,t){dj(e,t),AR(e)}function AR(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function lSt(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function dj(e,t){e.emit("error",t)}function uSt(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}W5e.exports={destroy:sSt,undestroy:lSt,errorOrDestroy:uSt}});var A2=ye((idr,Y5e)=>{"use strict";function cSt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var Z5e={};function J0(e,t,r){r||(r=Error);function n(a,o,s){return typeof t=="string"?t:t(a,o,s)}var i=function(a){cSt(o,a);function o(s,l,u){return a.call(this,n(s,l,u))||this}return o}(r);i.prototype.name=r.name,i.prototype.code=e,Z5e[e]=i}function X5e(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(n){return String(n)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function fSt(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function hSt(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function dSt(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}J0("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);J0("ERR_INVALID_ARG_TYPE",function(e,t,r){var n;typeof t=="string"&&fSt(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var i;if(hSt(e," argument"))i="The ".concat(e," ").concat(n," ").concat(X5e(t,"type"));else{var a=dSt(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(a," ").concat(n," ").concat(X5e(t,"type"))}return i+=". Received type ".concat(typeof r),i},TypeError);J0("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");J0("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});J0("ERR_STREAM_PREMATURE_CLOSE","Premature close");J0("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});J0("ERR_MULTIPLE_CALLBACK","Callback called multiple times");J0("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");J0("ERR_STREAM_WRITE_AFTER_END","write after end");J0("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);J0("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);J0("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Y5e.exports.codes=Z5e});var pj=ye((ndr,K5e)=>{"use strict";var vSt=A2().codes.ERR_INVALID_OPT_VALUE;function pSt(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function gSt(e,t,r,n){var i=pSt(t,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var a=n?r:"highWaterMark";throw new vSt(a,i)}return Math.floor(i)}return e.objectMode?16:16*1024}K5e.exports={getHighWaterMark:gSt}});var $5e=ye((adr,J5e)=>{J5e.exports=mSt;function mSt(e,t){if(gj("noDeprecation"))return e;var r=!1;function n(){if(!r){if(gj("throwDeprecation"))throw new Error(t);gj("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return n}function gj(e){try{if(!window.localStorage)return!1}catch(r){return!1}var t=window.localStorage[e];return t==null?!1:String(t).toLowerCase()==="true"}});var _j=ye((odr,nSe)=>{"use strict";nSe.exports=Bh;function eSe(e){var t=this;this.next=null,this.entry=null,this.finish=function(){HSt(t,e)}}var mA;Bh.WritableState=sE;var ySt={deprecate:$5e()},tSe=yH(),MR=_2().Buffer,_St=window.Uint8Array||function(){};function xSt(e){return MR.from(e)}function bSt(e){return MR.isBuffer(e)||e instanceof _St}var yj=vj(),wSt=pj(),TSt=wSt.getHighWaterMark,V_=A2().codes,ASt=V_.ERR_INVALID_ARG_TYPE,SSt=V_.ERR_METHOD_NOT_IMPLEMENTED,MSt=V_.ERR_MULTIPLE_CALLBACK,ESt=V_.ERR_STREAM_CANNOT_PIPE,kSt=V_.ERR_STREAM_DESTROYED,CSt=V_.ERR_STREAM_NULL_VALUES,LSt=V_.ERR_STREAM_WRITE_AFTER_END,PSt=V_.ERR_UNKNOWN_ENCODING,yA=yj.errorOrDestroy;Zy()(Bh,tSe);function ISt(){}function sE(e,t,r){mA=mA||S2(),e=e||{},typeof r!="boolean"&&(r=t instanceof mA),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=TSt(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){BSt(t,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new eSe(this)}sE.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(sE.prototype,"buffer",{get:ySt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}})();var SR;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(SR=Function.prototype[Symbol.hasInstance],Object.defineProperty(Bh,Symbol.hasInstance,{value:function(t){return SR.call(this,t)?!0:this!==Bh?!1:t&&t._writableState instanceof sE}})):SR=function(t){return t instanceof this};function Bh(e){mA=mA||S2();var t=this instanceof mA;if(!t&&!SR.call(Bh,this))return new Bh(e);this._writableState=new sE(e,this,t),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),tSe.call(this)}Bh.prototype.pipe=function(){yA(this,new ESt)};function RSt(e,t){var r=new LSt;yA(e,r),process.nextTick(t,r)}function DSt(e,t,r,n){var i;return r===null?i=new CSt:typeof r!="string"&&!t.objectMode&&(i=new ASt("chunk",["string","Buffer"],r)),i?(yA(e,i),process.nextTick(n,i),!1):!0}Bh.prototype.write=function(e,t,r){var n=this._writableState,i=!1,a=!n.objectMode&&bSt(e);return a&&!MR.isBuffer(e)&&(e=xSt(e)),typeof t=="function"&&(r=t,t=null),a?t="buffer":t||(t=n.defaultEncoding),typeof r!="function"&&(r=ISt),n.ending?RSt(this,r):(a||DSt(this,n,e,r))&&(n.pendingcb++,i=zSt(this,n,a,e,t,r)),i};Bh.prototype.cork=function(){this._writableState.corked++};Bh.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&rSe(this,e))};Bh.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new PSt(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(Bh.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function FSt(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=MR.from(t,r)),t}Object.defineProperty(Bh.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function zSt(e,t,r,n,i,a){if(!r){var o=FSt(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var s=t.objectMode?1:n.length;t.length+=s;var l=t.length{"use strict";var jSt=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};oSe.exports=jm;var aSe=wj(),bj=_j();Zy()(jm,aSe);for(xj=jSt(bj.prototype),ER=0;ER{var CR=_2(),Wm=CR.Buffer;function sSe(e,t){for(var r in e)t[r]=e[r]}Wm.from&&Wm.alloc&&Wm.allocUnsafe&&Wm.allocUnsafeSlow?lSe.exports=CR:(sSe(CR,Tj),Tj.Buffer=M2);function M2(e,t,r){return Wm(e,t,r)}M2.prototype=Object.create(Wm.prototype);sSe(Wm,M2);M2.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return Wm(e,t,r)};M2.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=Wm(e);return t!==void 0?typeof r=="string"?n.fill(t,r):n.fill(t):n.fill(0),n};M2.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Wm(e)};M2.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return CR.SlowBuffer(e)}});var Mj=ye(fSe=>{"use strict";var Sj=uSe().Buffer,cSe=Sj.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function ZSt(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function YSt(e){var t=ZSt(e);if(typeof t!="string"&&(Sj.isEncoding===cSe||!cSe(e)))throw new Error("Unknown encoding: "+e);return t||e}fSe.StringDecoder=lE;function lE(e){this.encoding=YSt(e);var t;switch(this.encoding){case"utf16le":this.text=tMt,this.end=rMt,t=4;break;case"utf8":this.fillLast=$St,t=4;break;case"base64":this.text=iMt,this.end=nMt,t=3;break;default:this.write=aMt,this.end=oMt;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Sj.allocUnsafe(t)}lE.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function KSt(e,t,r){var n=t.length-1;if(n=0?(i>0&&(e.lastNeed=i-1),i):--n=0?(i>0&&(e.lastNeed=i-2),i):--n=0?(i>0&&(i===2?i=0:e.lastNeed=i-3),i):0))}function JSt(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function $St(e){var t=this.lastTotal-this.lastNeed,r=JSt(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function QSt(e,t){var r=KSt(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function eMt(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function tMt(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function rMt(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function iMt(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function nMt(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function aMt(e){return e.toString(this.encoding)}function oMt(e){return e&&e.length?this.write(e):""}});var LR=ye((udr,vSe)=>{"use strict";var hSe=A2().codes.ERR_STREAM_PREMATURE_CLOSE;function sMt(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i{"use strict";var PR;function G_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var cMt=LR(),H_=Symbol("lastResolve"),E2=Symbol("lastReject"),uE=Symbol("error"),IR=Symbol("ended"),k2=Symbol("lastPromise"),Ej=Symbol("handlePromise"),C2=Symbol("stream");function j_(e,t){return{value:e,done:t}}function fMt(e){var t=e[H_];if(t!==null){var r=e[C2].read();r!==null&&(e[k2]=null,e[H_]=null,e[E2]=null,t(j_(r,!1)))}}function hMt(e){process.nextTick(fMt,e)}function dMt(e,t){return function(r,n){e.then(function(){if(t[IR]){r(j_(void 0,!0));return}t[Ej](r,n)},n)}}var vMt=Object.getPrototypeOf(function(){}),pMt=Object.setPrototypeOf((PR={get stream(){return this[C2]},next:function(){var t=this,r=this[uE];if(r!==null)return Promise.reject(r);if(this[IR])return Promise.resolve(j_(void 0,!0));if(this[C2].destroyed)return new Promise(function(o,s){process.nextTick(function(){t[uE]?s(t[uE]):o(j_(void 0,!0))})});var n=this[k2],i;if(n)i=new Promise(dMt(n,this));else{var a=this[C2].read();if(a!==null)return Promise.resolve(j_(a,!1));i=new Promise(this[Ej])}return this[k2]=i,i}},G_(PR,Symbol.asyncIterator,function(){return this}),G_(PR,"return",function(){var t=this;return new Promise(function(r,n){t[C2].destroy(null,function(i){if(i){n(i);return}r(j_(void 0,!0))})})}),PR),vMt),gMt=function(t){var r,n=Object.create(pMt,(r={},G_(r,C2,{value:t,writable:!0}),G_(r,H_,{value:null,writable:!0}),G_(r,E2,{value:null,writable:!0}),G_(r,uE,{value:null,writable:!0}),G_(r,IR,{value:t._readableState.endEmitted,writable:!0}),G_(r,Ej,{value:function(a,o){var s=n[C2].read();s?(n[k2]=null,n[H_]=null,n[E2]=null,a(j_(s,!1))):(n[H_]=a,n[E2]=o)},writable:!0}),r));return n[k2]=null,cMt(t,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=n[E2];a!==null&&(n[k2]=null,n[H_]=null,n[E2]=null,a(i)),n[uE]=i;return}var o=n[H_];o!==null&&(n[k2]=null,n[H_]=null,n[E2]=null,o(j_(void 0,!0))),n[IR]=!0}),t.on("readable",hMt.bind(null,n)),n};pSe.exports=gMt});var ySe=ye((fdr,mSe)=>{mSe.exports=function(){throw new Error("Readable.from is not available in the browser")}});var wj=ye((ddr,kSe)=>{"use strict";kSe.exports=Bu;var _A;Bu.ReadableState=wSe;var hdr=Ab().EventEmitter,bSe=function(t,r){return t.listeners(r).length},fE=yH(),RR=_2().Buffer,mMt=window.Uint8Array||function(){};function yMt(e){return RR.from(e)}function _Mt(e){return RR.isBuffer(e)||e instanceof mMt}var kj=fj(),nu;kj&&kj.debuglog?nu=kj.debuglog("stream"):nu=function(){};var xMt=H5e(),Fj=vj(),bMt=pj(),wMt=bMt.getHighWaterMark,DR=A2().codes,TMt=DR.ERR_INVALID_ARG_TYPE,AMt=DR.ERR_STREAM_PUSH_AFTER_EOF,SMt=DR.ERR_METHOD_NOT_IMPLEMENTED,MMt=DR.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,xA,Cj,Lj;Zy()(Bu,fE);var cE=Fj.errorOrDestroy,Pj=["error","close","destroy","pause","resume"];function EMt(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function wSe(e,t,r){_A=_A||S2(),e=e||{},typeof r!="boolean"&&(r=t instanceof _A),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=wMt(this,e,"readableHighWaterMark",r),this.buffer=new xMt,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(xA||(xA=Mj().StringDecoder),this.decoder=new xA(e.encoding),this.encoding=e.encoding)}function Bu(e){if(_A=_A||S2(),!(this instanceof Bu))return new Bu(e);var t=this instanceof _A;this._readableState=new wSe(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),fE.call(this)}Object.defineProperty(Bu.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});Bu.prototype.destroy=Fj.destroy;Bu.prototype._undestroy=Fj.undestroy;Bu.prototype._destroy=function(e,t){t(e)};Bu.prototype.push=function(e,t){var r=this._readableState,n;return r.objectMode?n=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=RR.from(e,t),t=""),n=!0),TSe(this,e,t,!1,n)};Bu.prototype.unshift=function(e){return TSe(this,e,null,!0,!1)};function TSe(e,t,r,n,i){nu("readableAddChunk",t);var a=e._readableState;if(t===null)a.reading=!1,LMt(e,a);else{var o;if(i||(o=kMt(a,t)),o)cE(e,o);else if(a.objectMode||t&&t.length>0)if(typeof t!="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==RR.prototype&&(t=yMt(t)),n)a.endEmitted?cE(e,new MMt):Ij(e,a,t,!0);else if(a.ended)cE(e,new AMt);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||t.length!==0?Ij(e,a,t,!1):Dj(e,a)):Ij(e,a,t,!1)}else n||(a.reading=!1,Dj(e,a))}return!a.ended&&(a.length=_Se?e=_Se:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function xSe(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=CMt(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}Bu.prototype.read=function(e){nu("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return nu("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?Rj(this):FR(this),null;if(e=xSe(e,t),e===0&&t.ended)return t.length===0&&Rj(this),null;var n=t.needReadable;nu("need readable",n),(t.length===0||t.length-e0?i=MSe(e,t):i=null,i===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&Rj(this)),i!==null&&this.emit("data",i),i};function LMt(e,t){if(nu("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?FR(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,ASe(e)))}}function FR(e){var t=e._readableState;nu("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(nu("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(ASe,e))}function ASe(e){var t=e._readableState;nu("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,zj(e)}function Dj(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(PMt,e,t))}function PMt(e,t){for(;!t.reading&&!t.ended&&(t.length1&&ESe(n.pipes,e)!==-1)&&!u&&(nu("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(b){nu("onerror",b),m(),e.removeListener("error",h),bSe(e,"error")===0&&cE(e,b)}EMt(e,"error",h);function d(){e.removeListener("finish",v),m()}e.once("close",d);function v(){nu("onfinish"),e.removeListener("close",d),m()}e.once("finish",v);function m(){nu("unpipe"),r.unpipe(e)}return e.emit("pipe",r),n.flowing||(nu("pipe resume"),r.resume()),e};function IMt(e){return function(){var r=e._readableState;nu("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&bSe(e,"data")&&(r.flowing=!0,zj(e))}}Bu.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a0,n.flowing!==!1&&this.resume()):e==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,nu("on readable",n.length,n.reading),n.length?FR(this):n.reading||process.nextTick(RMt,this)),r};Bu.prototype.addListener=Bu.prototype.on;Bu.prototype.removeListener=function(e,t){var r=fE.prototype.removeListener.call(this,e,t);return e==="readable"&&process.nextTick(SSe,this),r};Bu.prototype.removeAllListeners=function(e){var t=fE.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(SSe,this),t};function SSe(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function RMt(e){nu("readable nexttick read 0"),e.read(0)}Bu.prototype.resume=function(){var e=this._readableState;return e.flowing||(nu("resume"),e.flowing=!e.readableListening,DMt(this,e)),e.paused=!1,this};function DMt(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(FMt,e,t))}function FMt(e,t){nu("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),zj(e),t.flowing&&!t.reading&&e.read(0)}Bu.prototype.pause=function(){return nu("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(nu("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function zj(e){var t=e._readableState;for(nu("flow",t.flowing);t.flowing&&e.read()!==null;);}Bu.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;e.on("end",function(){if(nu("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&t.push(o)}t.push(null)}),e.on("data",function(o){if(nu("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var s=t.push(o);s||(n=!0,e.pause())}});for(var i in e)this[i]===void 0&&typeof e[i]=="function"&&(this[i]=function(s){return function(){return e[s].apply(e,arguments)}}(i));for(var a=0;a=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function Rj(e){var t=e._readableState;nu("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(zMt,t,e))}function zMt(e,t){if(nu("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}typeof Symbol=="function"&&(Bu.from=function(e,t){return Lj===void 0&&(Lj=ySe()),Lj(Bu,e,t)});function ESe(e,t){for(var r=0,n=e.length;r{"use strict";LSe.exports=Ky;var zR=A2().codes,qMt=zR.ERR_METHOD_NOT_IMPLEMENTED,OMt=zR.ERR_MULTIPLE_CALLBACK,BMt=zR.ERR_TRANSFORM_ALREADY_TRANSFORMING,NMt=zR.ERR_TRANSFORM_WITH_LENGTH_0,qR=S2();Zy()(Ky,qR);function UMt(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new OMt);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length{"use strict";ISe.exports=hE;var PSe=qj();Zy()(hE,PSe);function hE(e){if(!(this instanceof hE))return new hE(e);PSe.call(this,e)}hE.prototype._transform=function(e,t,r){r(null,e)}});var OSe=ye((gdr,qSe)=>{"use strict";var Oj;function GMt(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var zSe=A2().codes,HMt=zSe.ERR_MISSING_ARGS,jMt=zSe.ERR_STREAM_DESTROYED;function DSe(e){if(e)throw e}function WMt(e){return e.setHeader&&typeof e.abort=="function"}function XMt(e,t,r,n){n=GMt(n);var i=!1;e.on("close",function(){i=!0}),Oj===void 0&&(Oj=LR()),Oj(e,{readable:t,writable:r},function(o){if(o)return n(o);i=!0,n()});var a=!1;return function(o){if(!i&&!a){if(a=!0,WMt(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(o||new jMt("pipe"))}}}function FSe(e){e()}function ZMt(e,t){return e.pipe(t)}function YMt(e){return!e.length||typeof e[e.length-1]!="function"?DSe:e.pop()}function KMt(){for(var e=arguments.length,t=new Array(e),r=0;r0;return XMt(o,l,u,function(c){i||(i=c),c&&a.forEach(FSe),!l&&(a.forEach(FSe),n(i))})});return t.reduce(ZMt)}qSe.exports=KMt});var NSe=ye((mdr,BSe)=>{BSe.exports=$0;var Bj=Ab().EventEmitter,JMt=Zy();JMt($0,Bj);$0.Readable=wj();$0.Writable=_j();$0.Duplex=S2();$0.Transform=qj();$0.PassThrough=RSe();$0.finished=LR();$0.pipeline=OSe();$0.Stream=$0;function $0(){Bj.call(this)}$0.prototype.pipe=function(e,t){var r=this;function n(c){e.writable&&e.write(c)===!1&&r.pause&&r.pause()}r.on("data",n);function i(){r.readable&&r.resume&&r.resume()}e.on("drain",i),!e._isStdio&&(!t||t.end!==!1)&&(r.on("end",o),r.on("close",s));var a=!1;function o(){a||(a=!0,e.end())}function s(){a||(a=!0,typeof e.destroy=="function"&&e.destroy())}function l(c){if(u(),Bj.listenerCount(this,"error")===0)throw c}r.on("error",l),e.on("error",l);function u(){r.removeListener("data",n),e.removeListener("drain",i),r.removeListener("end",o),r.removeListener("close",s),r.removeListener("error",l),e.removeListener("error",l),r.removeListener("end",u),r.removeListener("close",u),e.removeListener("close",u)}return r.on("end",u),r.on("close",u),e.on("close",u),e.emit("pipe",r),e}});var wA=ye(fu=>{var USe=Object.getOwnPropertyDescriptors||function(t){for(var r=Object.keys(t),n={},i=0;i=i)return s;switch(s){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(l){return"[Circular]"}default:return s}}),o=n[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),Gj(t)?r.showHidden=t:t&&fu._extend(r,t),P2(r.showHidden)&&(r.showHidden=!1),P2(r.depth)&&(r.depth=2),P2(r.colors)&&(r.colors=!1),P2(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=QMt),UR(r,e,r.depth)}fu.inspect=W_;W_.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};W_.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function QMt(e,t){var r=W_.styles[t];return r?"\x1B["+W_.colors[r][0]+"m"+e+"\x1B["+W_.colors[r][1]+"m":e}function e4t(e,t){return e}function t4t(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function UR(e,t,r){if(e.customInspect&&t&&NR(t.inspect)&&t.inspect!==fu.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return HR(n)||(n=UR(e,n,r)),n}var i=r4t(e,t);if(i)return i;var a=Object.keys(t),o=t4t(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),vE(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return Nj(t);if(a.length===0){if(NR(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(dE(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(VR(t))return e.stylize(Date.prototype.toString.call(t),"date");if(vE(t))return Nj(t)}var l="",u=!1,c=["{","}"];if(GSe(t)&&(u=!0,c=["[","]"]),NR(t)){var f=t.name?": "+t.name:"";l=" [Function"+f+"]"}if(dE(t)&&(l=" "+RegExp.prototype.toString.call(t)),VR(t)&&(l=" "+Date.prototype.toUTCString.call(t)),vE(t)&&(l=" "+Nj(t)),a.length===0&&(!u||t.length==0))return c[0]+l+c[1];if(r<0)return dE(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var h;return u?h=i4t(e,t,r,o,a):h=a.map(function(d){return Vj(e,t,r,o,d,u)}),e.seen.pop(),n4t(h,l,c)}function r4t(e,t){if(P2(t))return e.stylize("undefined","undefined");if(HR(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(HSe(t))return e.stylize(""+t,"number");if(Gj(t))return e.stylize(""+t,"boolean");if(GR(t))return e.stylize("null","null")}function Nj(e){return"["+Error.prototype.toString.call(e)+"]"}function i4t(e,t,r,n,i){for(var a=[],o=0,s=t.length;o-1&&(a?s=s.split(` `).map(function(u){return" "+u}).join(` `).slice(2):s=` `+s.split(` `).map(function(u){return" "+u}).join(` -`))):s=e.stylize("[Circular]","special")),P2(o)){if(a&&i.match(/^\d+$/))return s;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function r4t(e,t,r){var n=0,i=e.reduce(function(a,o){return n++,o.indexOf(` +`))):s=e.stylize("[Circular]","special")),P2(o)){if(a&&i.match(/^\d+$/))return s;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function n4t(e,t,r){var n=0,i=e.reduce(function(a,o){return n++,o.indexOf(` `)>=0&&n++,a+o.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(t===""?"":t+` `)+" "+e.join(`, - `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}fu.types=nj();function GSe(e){return Array.isArray(e)}fu.isArray=GSe;function Gj(e){return typeof e=="boolean"}fu.isBoolean=Gj;function GR(e){return e===null}fu.isNull=GR;function i4t(e){return e==null}fu.isNullOrUndefined=i4t;function HSe(e){return typeof e=="number"}fu.isNumber=HSe;function HR(e){return typeof e=="string"}fu.isString=HR;function n4t(e){return typeof e=="symbol"}fu.isSymbol=n4t;function P2(e){return e===void 0}fu.isUndefined=P2;function dE(e){return xA(e)&&Hj(e)==="[object RegExp]"}fu.isRegExp=dE;fu.types.isRegExp=dE;function xA(e){return typeof e=="object"&&e!==null}fu.isObject=xA;function VR(e){return xA(e)&&Hj(e)==="[object Date]"}fu.isDate=VR;fu.types.isDate=VR;function vE(e){return xA(e)&&(Hj(e)==="[object Error]"||e instanceof Error)}fu.isError=vE;fu.types.isNativeError=vE;function NR(e){return typeof e=="function"}fu.isFunction=NR;function a4t(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}fu.isPrimitive=a4t;fu.isBuffer=aj();function Hj(e){return Object.prototype.toString.call(e)}function Uj(e){return e<10?"0"+e.toString(10):e.toString(10)}var o4t=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function s4t(){var e=new Date,t=[Uj(e.getHours()),Uj(e.getMinutes()),Uj(e.getSeconds())].join(":");return[e.getDate(),o4t[e.getMonth()],t].join(" ")}fu.log=function(){console.log("%s - %s",s4t(),fu.format.apply(fu,arguments))};fu.inherits=Zy();fu._extend=function(e,t){if(!t||!xA(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};function jSe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var L2=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;fu.promisify=function(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if(L2&&t[L2]){var r=t[L2];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,L2,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var n,i,a=new Promise(function(l,u){n=l,i=u}),o=[],s=0;s{"use strict";function X_(e){"@babel/helpers - typeof";return X_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},X_(e)}function WSe(e,t){for(var r=0;r2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function _4t(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function x4t(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function b4t(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}pE("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError);pE("ERR_INVALID_ARG_TYPE",function(e,t,r){wA===void 0&&(wA=gE()),wA(typeof e=="string","'name' must be a string");var n;typeof t=="string"&&_4t(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var i;if(x4t(e," argument"))i="The ".concat(e," ").concat(n," ").concat(XSe(t,"type"));else{var a=b4t(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(a," ").concat(n," ").concat(XSe(t,"type"))}return i+=". Received type ".concat(X_(r)),i},TypeError);pE("ERR_INVALID_ARG_VALUE",function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";jj===void 0&&(jj=bA());var n=jj.inspect(t);return n.length>128&&(n="".concat(n.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(n)},TypeError,RangeError);pE("ERR_INVALID_RETURN_VALUE",function(e,t,r){var n;return r&&r.constructor&&r.constructor.name?n="instance of ".concat(r.constructor.name):n="type ".concat(X_(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(n,".")},TypeError);pE("ERR_MISSING_ARGS",function(){for(var e=arguments.length,t=new Array(e),r=0;r0,"At least one arg needs to be specified");var n="The ",i=t.length;switch(t=t.map(function(a){return'"'.concat(a,'"')}),i){case 1:n+="".concat(t[0]," argument");break;case 2:n+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:n+=t.slice(0,i-1).join(", "),n+=", and ".concat(t[i-1]," arguments");break}return"".concat(n," must be specified")},TypeError);YSe.exports.codes=ZSe});var aMe=ye((ddr,nMe)=>{"use strict";function KSe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function JSe(e){for(var t=1;te.length)&&(r=e.length),e.substring(r-t.length,r)===t}function I4t(e,t){if(t=Math.floor(t),e.length==0||t==0)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+=e.substring(0,r-e.length),e}var Xg="",mE="",yE="",Tv="",I2={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},R4t=10;function eMe(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach(function(n){r[n]=e[n]}),Object.defineProperty(r,"message",{value:e.message}),r}function _E(e){return Kj(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function D4t(e,t,r){var n="",i="",a=0,o="",s=!1,l=_E(e),u=l.split(` + `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}fu.types=nj();function GSe(e){return Array.isArray(e)}fu.isArray=GSe;function Gj(e){return typeof e=="boolean"}fu.isBoolean=Gj;function GR(e){return e===null}fu.isNull=GR;function a4t(e){return e==null}fu.isNullOrUndefined=a4t;function HSe(e){return typeof e=="number"}fu.isNumber=HSe;function HR(e){return typeof e=="string"}fu.isString=HR;function o4t(e){return typeof e=="symbol"}fu.isSymbol=o4t;function P2(e){return e===void 0}fu.isUndefined=P2;function dE(e){return bA(e)&&Hj(e)==="[object RegExp]"}fu.isRegExp=dE;fu.types.isRegExp=dE;function bA(e){return typeof e=="object"&&e!==null}fu.isObject=bA;function VR(e){return bA(e)&&Hj(e)==="[object Date]"}fu.isDate=VR;fu.types.isDate=VR;function vE(e){return bA(e)&&(Hj(e)==="[object Error]"||e instanceof Error)}fu.isError=vE;fu.types.isNativeError=vE;function NR(e){return typeof e=="function"}fu.isFunction=NR;function s4t(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}fu.isPrimitive=s4t;fu.isBuffer=aj();function Hj(e){return Object.prototype.toString.call(e)}function Uj(e){return e<10?"0"+e.toString(10):e.toString(10)}var l4t=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function u4t(){var e=new Date,t=[Uj(e.getHours()),Uj(e.getMinutes()),Uj(e.getSeconds())].join(":");return[e.getDate(),l4t[e.getMonth()],t].join(" ")}fu.log=function(){console.log("%s - %s",u4t(),fu.format.apply(fu,arguments))};fu.inherits=Zy();fu._extend=function(e,t){if(!t||!bA(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};function jSe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var L2=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;fu.promisify=function(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if(L2&&t[L2]){var r=t[L2];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,L2,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var n,i,a=new Promise(function(l,u){n=l,i=u}),o=[],s=0;s{"use strict";function X_(e){"@babel/helpers - typeof";return X_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},X_(e)}function WSe(e,t){for(var r=0;r2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function b4t(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function w4t(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function T4t(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}pE("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError);pE("ERR_INVALID_ARG_TYPE",function(e,t,r){TA===void 0&&(TA=gE()),TA(typeof e=="string","'name' must be a string");var n;typeof t=="string"&&b4t(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var i;if(w4t(e," argument"))i="The ".concat(e," ").concat(n," ").concat(XSe(t,"type"));else{var a=T4t(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(a," ").concat(n," ").concat(XSe(t,"type"))}return i+=". Received type ".concat(X_(r)),i},TypeError);pE("ERR_INVALID_ARG_VALUE",function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";jj===void 0&&(jj=wA());var n=jj.inspect(t);return n.length>128&&(n="".concat(n.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(n)},TypeError,RangeError);pE("ERR_INVALID_RETURN_VALUE",function(e,t,r){var n;return r&&r.constructor&&r.constructor.name?n="instance of ".concat(r.constructor.name):n="type ".concat(X_(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(n,".")},TypeError);pE("ERR_MISSING_ARGS",function(){for(var e=arguments.length,t=new Array(e),r=0;r0,"At least one arg needs to be specified");var n="The ",i=t.length;switch(t=t.map(function(a){return'"'.concat(a,'"')}),i){case 1:n+="".concat(t[0]," argument");break;case 2:n+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:n+=t.slice(0,i-1).join(", "),n+=", and ".concat(t[i-1]," arguments");break}return"".concat(n," must be specified")},TypeError);YSe.exports.codes=ZSe});var aMe=ye((xdr,nMe)=>{"use strict";function KSe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function JSe(e){for(var t=1;te.length)&&(r=e.length),e.substring(r-t.length,r)===t}function D4t(e,t){if(t=Math.floor(t),e.length==0||t==0)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+=e.substring(0,r-e.length),e}var Xg="",mE="",yE="",Tv="",I2={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},F4t=10;function eMe(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach(function(n){r[n]=e[n]}),Object.defineProperty(r,"message",{value:e.message}),r}function _E(e){return Kj(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function z4t(e,t,r){var n="",i="",a=0,o="",s=!1,l=_E(e),u=l.split(` `),c=_E(t).split(` -`),f=0,h="";if(r==="strictEqual"&&Dp(e)==="object"&&Dp(t)==="object"&&e!==null&&t!==null&&(r="strictEqualObject"),u.length===1&&c.length===1&&u[0]!==c[0]){var d=u[0].length+c[0].length;if(d<=R4t){if((Dp(e)!=="object"||e===null)&&(Dp(t)!=="object"||t===null)&&(e!==0||t!==0))return"".concat(I2[r],` +`),f=0,h="";if(r==="strictEqual"&&Dp(e)==="object"&&Dp(t)==="object"&&e!==null&&t!==null&&(r="strictEqualObject"),u.length===1&&c.length===1&&u[0]!==c[0]){var d=u[0].length+c[0].length;if(d<=F4t){if((Dp(e)!=="object"||e===null)&&(Dp(t)!=="object"||t===null)&&(e!==0||t!==0))return"".concat(I2[r],` `)+"".concat(u[0]," !== ").concat(c[0],` `)}else if(r!=="strictEqualObject"){var v=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(d2&&(h=` - `.concat(I4t(" ",f),"^"),f=0)}}}for(var _=u[u.length-1],b=c[c.length-1];_===b&&(f++<2?o=` - `.concat(_).concat(o):n=_,u.pop(),c.pop(),!(u.length===0||c.length===0));)_=u[u.length-1],b=c[c.length-1];var p=Math.max(u.length,c.length);if(p===0){var k=l.split(` + `.concat(D4t(" ",f),"^"),f=0)}}}for(var m=u[u.length-1],b=c[c.length-1];m===b&&(f++<2?o=` + `.concat(m).concat(o):n=m,u.pop(),c.pop(),!(u.length===0||c.length===0));)m=u[u.length-1],b=c[c.length-1];var p=Math.max(u.length,c.length);if(p===0){var k=l.split(` `);if(k.length>30)for(k[26]="".concat(Xg,"...").concat(Tv);k.length>27;)k.pop();return"".concat(I2.notIdentical,` `).concat(k.join(` `),` `)}f>3&&(o=` `.concat(Xg,"...").concat(Tv).concat(o),s=!0),n!==""&&(o=` - `.concat(n).concat(o),n="");var E=0,T=I2[r]+` + `.concat(n).concat(o),n="");var M=0,T=I2[r]+` `.concat(mE,"+ actual").concat(Tv," ").concat(yE,"- expected").concat(Tv),L=" ".concat(Xg,"...").concat(Tv," Lines skipped");for(f=0;f1&&f>2&&(x>4?(i+=` `.concat(Xg,"...").concat(Tv),s=!0):x>3&&(i+=` - `.concat(c[f-2]),E++),i+=` - `.concat(c[f-1]),E++),a=f,n+=` -`.concat(yE,"-").concat(Tv," ").concat(c[f]),E++;else if(c.length1&&f>2&&(x>4?(i+=` + `.concat(c[f-2]),M++),i+=` + `.concat(c[f-1]),M++),a=f,n+=` +`.concat(yE,"-").concat(Tv," ").concat(c[f]),M++;else if(c.length1&&f>2&&(x>4?(i+=` `.concat(Xg,"...").concat(Tv),s=!0):x>3&&(i+=` - `.concat(u[f-2]),E++),i+=` - `.concat(u[f-1]),E++),a=f,i+=` -`.concat(mE,"+").concat(Tv," ").concat(u[f]),E++;else{var C=c[f],M=u[f],g=M!==C&&(!QSe(M,",")||M.slice(0,-1)!==C);g&&QSe(C,",")&&C.slice(0,-1)===M&&(g=!1,M+=","),g?(x>1&&f>2&&(x>4?(i+=` + `.concat(u[f-2]),M++),i+=` + `.concat(u[f-1]),M++),a=f,i+=` +`.concat(mE,"+").concat(Tv," ").concat(u[f]),M++;else{var C=c[f],S=u[f],g=S!==C&&(!QSe(S,",")||S.slice(0,-1)!==C);g&&QSe(C,",")&&C.slice(0,-1)===S&&(g=!1,S+=","),g?(x>1&&f>2&&(x>4?(i+=` `.concat(Xg,"...").concat(Tv),s=!0):x>3&&(i+=` - `.concat(u[f-2]),E++),i+=` - `.concat(u[f-1]),E++),a=f,i+=` -`.concat(mE,"+").concat(Tv," ").concat(M),n+=` -`.concat(yE,"-").concat(Tv," ").concat(C),E+=2):(i+=n,n="",(x===1||f===0)&&(i+=` - `.concat(M),E++))}if(E>20&&f20&&f30)for(d[26]="".concat(Xg,"...").concat(Tv);d.length>27;)d.pop();d.length===1?a=r.call(this,"".concat(h," ").concat(d[0])):a=r.call(this,"".concat(h,` `).concat(d.join(` `),` -`))}else{var v=_E(u),_="",b=I2[s];s==="notDeepEqual"||s==="notEqual"?(v="".concat(I2[s],` +`))}else{var v=_E(u),m="",b=I2[s];s==="notDeepEqual"||s==="notEqual"?(v="".concat(I2[s],` -`).concat(v),v.length>1024&&(v="".concat(v.slice(0,1021),"..."))):(_="".concat(_E(c)),v.length>512&&(v="".concat(v.slice(0,509),"...")),_.length>512&&(_="".concat(_.slice(0,509),"...")),s==="deepEqual"||s==="equal"?v="".concat(b,` +`).concat(v),v.length>1024&&(v="".concat(v.slice(0,1021),"..."))):(m="".concat(_E(c)),v.length>512&&(v="".concat(v.slice(0,509),"...")),m.length>512&&(m="".concat(m.slice(0,509),"...")),s==="deepEqual"||s==="equal"?v="".concat(b,` `).concat(v,` should equal -`):_=" ".concat(s," ").concat(_)),a=r.call(this,"".concat(v).concat(_))}return Error.stackTraceLimit=f,a.generatedMessage=!o,Object.defineProperty(Zj(a),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),a.code="ERR_ASSERTION",a.actual=u,a.expected=c,a.operator=s,Error.captureStackTrace&&Error.captureStackTrace(Zj(a),l),a.stack,a.name="AssertionError",rMe(a)}return A4t(n,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(a,o){return Kj(this,JSe(JSe({},o),{},{customInspect:!1,depth:0}))}}]),n}(Yj(Error),Kj.custom);nMe.exports=F4t});var Jj=ye((vdr,sMe)=>{"use strict";var oMe=Object.prototype.toString;sMe.exports=function(t){var r=oMe.call(t),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&oMe.call(t.callee)==="[object Function]"),n}});var gMe=ye((pdr,pMe)=>{"use strict";var vMe;Object.keys||(wE=Object.prototype.hasOwnProperty,$j=Object.prototype.toString,lMe=Jj(),Qj=Object.prototype.propertyIsEnumerable,uMe=!Qj.call({toString:null},"toString"),cMe=Qj.call(function(){},"prototype"),TE=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],XR=function(e){var t=e.constructor;return t&&t.prototype===e},fMe={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},hMe=function(){if(typeof window=="undefined")return!1;for(var e in window)try{if(!fMe["$"+e]&&wE.call(window,e)&&window[e]!==null&&typeof window[e]=="object")try{XR(window[e])}catch(t){return!0}}catch(t){return!0}return!1}(),dMe=function(e){if(typeof window=="undefined"||!hMe)return XR(e);try{return XR(e)}catch(t){return!1}},vMe=function(t){var r=t!==null&&typeof t=="object",n=$j.call(t)==="[object Function]",i=lMe(t),a=r&&$j.call(t)==="[object String]",o=[];if(!r&&!n&&!i)throw new TypeError("Object.keys called on a non-object");var s=cMe&&n;if(a&&t.length>0&&!wE.call(t,0))for(var l=0;l0)for(var u=0;u{"use strict";var z4t=Array.prototype.slice,O4t=Jj(),mMe=Object.keys,ZR=mMe?function(t){return mMe(t)}:gMe(),yMe=Object.keys;ZR.shim=function(){if(Object.keys){var t=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);t||(Object.keys=function(n){return O4t(n)?yMe(z4t.call(n)):yMe(n)})}else Object.keys=ZR;return Object.keys||ZR};_Me.exports=ZR});var SMe=ye((mdr,AMe)=>{"use strict";var q4t=eW(),wMe=Y8()(),TMe=hA(),xMe=Object,B4t=TMe("Array.prototype.push"),bMe=TMe("Object.prototype.propertyIsEnumerable"),N4t=wMe?Object.getOwnPropertySymbols:null;AMe.exports=function(t,r){if(t==null)throw new TypeError("target must be an object");var n=xMe(t);if(arguments.length===1)return n;for(var i=1;i{"use strict";var tW=SMe(),U4t=function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),r={},n=0;n{"use strict";var kMe=function(e){return e!==e};CMe.exports=function(t,r){return t===0&&r===0?1/t===1/r:!!(t===r||kMe(t)&&kMe(r))}});var YR=ye((xdr,LMe)=>{"use strict";var G4t=rW();LMe.exports=function(){return typeof Object.is=="function"?Object.is:G4t}});var AE=ye((bdr,DMe)=>{"use strict";var H4t=eW(),j4t=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",W4t=Object.prototype.toString,X4t=Array.prototype.concat,PMe=Object.defineProperty,Z4t=function(e){return typeof e=="function"&&W4t.call(e)==="[object Function]"},Y4t=qH()(),IMe=PMe&&Y4t,K4t=function(e,t,r,n){if(t in e){if(n===!0){if(e[t]===r)return}else if(!Z4t(n)||!n())return}IMe?PMe(e,t,{configurable:!0,enumerable:!1,value:r,writable:!0}):e[t]=r},RMe=function(e,t){var r=arguments.length>2?arguments[2]:{},n=H4t(t);j4t&&(n=X4t.call(n,Object.getOwnPropertySymbols(t)));for(var i=0;i{"use strict";var J4t=YR(),$4t=AE();FMe.exports=function(){var t=J4t();return $4t(Object,{is:t},{is:function(){return Object.is!==t}}),t}});var NMe=ye((Tdr,BMe)=>{"use strict";var Q4t=AE(),eEt=tE(),tEt=rW(),OMe=YR(),rEt=zMe(),qMe=eEt(OMe(),Object);Q4t(qMe,{getPolyfill:OMe,implementation:tEt,shim:rEt});BMe.exports=qMe});var iW=ye((Adr,UMe)=>{"use strict";UMe.exports=function(t){return t!==t}});var nW=ye((Sdr,VMe)=>{"use strict";var iEt=iW();VMe.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:iEt}});var HMe=ye((Mdr,GMe)=>{"use strict";var nEt=AE(),aEt=nW();GMe.exports=function(){var t=aEt();return nEt(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}});var ZMe=ye((Edr,XMe)=>{"use strict";var oEt=tE(),sEt=AE(),lEt=iW(),jMe=nW(),uEt=HMe(),WMe=oEt(jMe(),Number);sEt(WMe,{getPolyfill:jMe,implementation:lEt,shim:uEt});XMe.exports=WMe});var v4e=ye((kdr,d4e)=>{"use strict";function YMe(e,t){return dEt(e)||hEt(e,t)||fEt(e,t)||cEt()}function cEt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fEt(e,t){if(e){if(typeof e=="string")return KMe(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return KMe(e,t)}}function KMe(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r10)return!0;for(var t=0;t57)return!0}return e.length===10&&e>=Math.pow(2,32)}function $R(e){return Object.keys(e).filter(wEt).concat(eD(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function u4e(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);i{"use strict";function Zg(e){"@babel/helpers - typeof";return Zg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zg(e)}function p4e(e,t){for(var r=0;r{"use strict";var oMe=Object.prototype.toString;sMe.exports=function(t){var r=oMe.call(t),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&oMe.call(t.callee)==="[object Function]"),n}});var gMe=ye((wdr,pMe)=>{"use strict";var vMe;Object.keys||(wE=Object.prototype.hasOwnProperty,$j=Object.prototype.toString,lMe=Jj(),Qj=Object.prototype.propertyIsEnumerable,uMe=!Qj.call({toString:null},"toString"),cMe=Qj.call(function(){},"prototype"),TE=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],XR=function(e){var t=e.constructor;return t&&t.prototype===e},fMe={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},hMe=function(){if(typeof window=="undefined")return!1;for(var e in window)try{if(!fMe["$"+e]&&wE.call(window,e)&&window[e]!==null&&typeof window[e]=="object")try{XR(window[e])}catch(t){return!0}}catch(t){return!0}return!1}(),dMe=function(e){if(typeof window=="undefined"||!hMe)return XR(e);try{return XR(e)}catch(t){return!1}},vMe=function(t){var r=t!==null&&typeof t=="object",n=$j.call(t)==="[object Function]",i=lMe(t),a=r&&$j.call(t)==="[object String]",o=[];if(!r&&!n&&!i)throw new TypeError("Object.keys called on a non-object");var s=cMe&&n;if(a&&t.length>0&&!wE.call(t,0))for(var l=0;l0)for(var u=0;u{"use strict";var O4t=Array.prototype.slice,B4t=Jj(),mMe=Object.keys,ZR=mMe?function(t){return mMe(t)}:gMe(),yMe=Object.keys;ZR.shim=function(){if(Object.keys){var t=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);t||(Object.keys=function(n){return B4t(n)?yMe(O4t.call(n)):yMe(n)})}else Object.keys=ZR;return Object.keys||ZR};_Me.exports=ZR});var SMe=ye((Adr,AMe)=>{"use strict";var N4t=eW(),wMe=Y8()(),TMe=dA(),xMe=Object,U4t=TMe("Array.prototype.push"),bMe=TMe("Object.prototype.propertyIsEnumerable"),V4t=wMe?Object.getOwnPropertySymbols:null;AMe.exports=function(t,r){if(t==null)throw new TypeError("target must be an object");var n=xMe(t);if(arguments.length===1)return n;for(var i=1;i{"use strict";var tW=SMe(),G4t=function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),r={},n=0;n{"use strict";var kMe=function(e){return e!==e};CMe.exports=function(t,r){return t===0&&r===0?1/t===1/r:!!(t===r||kMe(t)&&kMe(r))}});var YR=ye((Edr,LMe)=>{"use strict";var j4t=rW();LMe.exports=function(){return typeof Object.is=="function"?Object.is:j4t}});var AE=ye((kdr,DMe)=>{"use strict";var W4t=eW(),X4t=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",Z4t=Object.prototype.toString,Y4t=Array.prototype.concat,PMe=Object.defineProperty,K4t=function(e){return typeof e=="function"&&Z4t.call(e)==="[object Function]"},J4t=OH()(),IMe=PMe&&J4t,$4t=function(e,t,r,n){if(t in e){if(n===!0){if(e[t]===r)return}else if(!K4t(n)||!n())return}IMe?PMe(e,t,{configurable:!0,enumerable:!1,value:r,writable:!0}):e[t]=r},RMe=function(e,t){var r=arguments.length>2?arguments[2]:{},n=W4t(t);X4t&&(n=Y4t.call(n,Object.getOwnPropertySymbols(t)));for(var i=0;i{"use strict";var Q4t=YR(),eEt=AE();FMe.exports=function(){var t=Q4t();return eEt(Object,{is:t},{is:function(){return Object.is!==t}}),t}});var NMe=ye((Ldr,BMe)=>{"use strict";var tEt=AE(),rEt=tE(),iEt=rW(),qMe=YR(),nEt=zMe(),OMe=rEt(qMe(),Object);tEt(OMe,{getPolyfill:qMe,implementation:iEt,shim:nEt});BMe.exports=OMe});var iW=ye((Pdr,UMe)=>{"use strict";UMe.exports=function(t){return t!==t}});var nW=ye((Idr,VMe)=>{"use strict";var aEt=iW();VMe.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:aEt}});var HMe=ye((Rdr,GMe)=>{"use strict";var oEt=AE(),sEt=nW();GMe.exports=function(){var t=sEt();return oEt(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}});var ZMe=ye((Ddr,XMe)=>{"use strict";var lEt=tE(),uEt=AE(),cEt=iW(),jMe=nW(),fEt=HMe(),WMe=lEt(jMe(),Number);uEt(WMe,{getPolyfill:jMe,implementation:cEt,shim:fEt});XMe.exports=WMe});var v4e=ye((Fdr,d4e)=>{"use strict";function YMe(e,t){return pEt(e)||vEt(e,t)||dEt(e,t)||hEt()}function hEt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dEt(e,t){if(e){if(typeof e=="string")return KMe(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return KMe(e,t)}}function KMe(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r10)return!0;for(var t=0;t57)return!0}return e.length===10&&e>=Math.pow(2,32)}function $R(e){return Object.keys(e).filter(AEt).concat(eD(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function u4e(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);i{"use strict";function Zg(e){"@babel/helpers - typeof";return Zg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zg(e)}function p4e(e,t){for(var r=0;r1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i{var CE=1e3,LE=CE*60,PE=LE*60,IE=PE*24,ZEt=IE*365.25;R4e.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return YEt(e);if(r==="number"&&isNaN(e)===!1)return t.long?JEt(e):KEt(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function YEt(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*ZEt;case"days":case"day":case"d":return r*IE;case"hours":case"hour":case"hrs":case"hr":case"h":return r*PE;case"minutes":case"minute":case"mins":case"min":case"m":return r*LE;case"seconds":case"second":case"secs":case"sec":case"s":return r*CE;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function KEt(e){return e>=IE?Math.round(e/IE)+"d":e>=PE?Math.round(e/PE)+"h":e>=LE?Math.round(e/LE)+"m":e>=CE?Math.round(e/CE)+"s":e+"ms"}function JEt(e){return lD(e,IE,"day")||lD(e,PE,"hour")||lD(e,LE,"minute")||lD(e,CE,"second")||e+" ms"}function lD(e,t,r){if(!(e{Lc=F4e.exports=fW.debug=fW.default=fW;Lc.coerce=rkt;Lc.disable=ekt;Lc.enable=QEt;Lc.enabled=tkt;Lc.humanize=D4e();Lc.names=[];Lc.skips=[];Lc.formatters={};var cW;function $Et(e){var t=0,r;for(r in e)t=(t<<5)-t+e.charCodeAt(r),t|=0;return Lc.colors[Math.abs(t)%Lc.colors.length]}function fW(e){function t(){if(t.enabled){var r=t,n=+new Date,i=n-(cW||n);r.diff=i,r.prev=cW,r.curr=n,cW=n;for(var a=new Array(arguments.length),o=0;o{up=q4e.exports=z4e();up.log=akt;up.formatArgs=nkt;up.save=okt;up.load=O4e;up.useColors=ikt;up.storage=typeof chrome!="undefined"&&typeof chrome.storage!="undefined"?chrome.storage.local:skt();up.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function ikt(){return typeof window!="undefined"&&window.process&&window.process.type==="renderer"?!0:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}up.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}};function nkt(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+up.humanize(this.diff),!!t){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var n=0,i=0;e[0].replace(/%[a-zA-Z%]/g,function(a){a!=="%%"&&(n++,a==="%c"&&(i=n))}),e.splice(i,0,r)}}function akt(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function okt(e){try{e==null?up.storage.removeItem("debug"):up.storage.debug=e}catch(t){}}function O4e(){var e;try{e=up.storage.debug}catch(t){}return!e&&typeof process!="undefined"&&"env"in process&&(e=process.env.DEBUG),e}up.enable(O4e());function skt(){try{return window.localStorage}catch(e){}}});var X4e=ye((Pdr,W4e)=>{var AA=gE(),J_=B4e()("stream-parser");W4e.exports=ukt;var U4e=-1,uD=0,lkt=1,V4e=2;function ukt(e){var t=e&&typeof e._transform=="function",r=e&&typeof e._write=="function";if(!t&&!r)throw new Error("must pass a Writable or Transform stream in");J_("extending Parser into stream"),e._bytes=ckt,e._skipBytes=fkt,t&&(e._passthrough=hkt),t?e._transform=vkt:e._write=dkt}function RE(e){J_("initializing parser stream"),e._parserBytesLeft=0,e._parserBuffers=[],e._parserBuffered=0,e._parserState=U4e,e._parserCallback=null,typeof e.push=="function"&&(e._parserOutput=e.push.bind(e)),e._parserInit=!0}function ckt(e,t){AA(!this._parserCallback,'there is already a "callback" set!'),AA(isFinite(e)&&e>0,'can only buffer a finite number of bytes > 0, got "'+e+'"'),this._parserInit||RE(this),J_("buffering %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=uD}function fkt(e,t){AA(!this._parserCallback,'there is already a "callback" set!'),AA(e>0,'can only skip > 0 bytes, got "'+e+'"'),this._parserInit||RE(this),J_("skipping %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=lkt}function hkt(e,t){AA(!this._parserCallback,'There is already a "callback" set!'),AA(e>0,'can only pass through > 0 bytes, got "'+e+'"'),this._parserInit||RE(this),J_("passing through %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=V4e}function dkt(e,t,r){this._parserInit||RE(this),J_("write(%o bytes)",e.length),typeof t=="function"&&(r=t),H4e(this,e,null,r)}function vkt(e,t,r){this._parserInit||RE(this),J_("transform(%o bytes)",e.length),typeof t!="function"&&(t=this._parserOutput),H4e(this,e,t,r)}function G4e(e,t,r,n){return e._parserBytesLeft<=0?n(new Error("got data but not currently parsing anything")):t.length<=e._parserBytesLeft?function(){return N4e(e,t,r,n)}:function(){var i=t.slice(0,e._parserBytesLeft);return N4e(e,i,r,function(a){if(a)return n(a);if(t.length>i.length)return function(){return G4e(e,t.slice(i.length),r,n)}})}}function N4e(e,t,r,n){if(e._parserBytesLeft-=t.length,J_("%o bytes left for stream piece",e._parserBytesLeft),e._parserState===uD?(e._parserBuffers.push(t),e._parserBuffered+=t.length):e._parserState===V4e&&r(t),e._parserBytesLeft===0){var i=e._parserCallback;if(i&&e._parserState===uD&&e._parserBuffers.length>1&&(t=Buffer.concat(e._parserBuffers,e._parserBuffered)),e._parserState!==uD&&(t=null),e._parserCallback=null,e._parserBuffered=0,e._parserState=U4e,e._parserBuffers.splice(0),i){var a=[];t&&a.push(t),r&&a.push(r);var o=i.length>a.length;o&&a.push(j4e(n));var s=i.apply(e,a);if(!o||n===s)return n}}else return n}var H4e=j4e(G4e);function j4e(e){return function(){for(var t=e.apply(this,arguments);typeof t=="function";)t=t();return t}}});var rc=ye(Jy=>{"use strict";var Z4e=NSe().Transform,pkt=X4e();function DE(){Z4e.call(this,{readableObjectMode:!0})}DE.prototype=Object.create(Z4e.prototype);DE.prototype.constructor=DE;pkt(DE.prototype);Jy.ParserStream=DE;Jy.sliceEq=function(e,t,r){for(var n=t,i=0;i{"use strict";var SA=rc().readUInt16BE,dW=rc().readUInt32BE;function FE(e,t){if(e.length<4+t)return null;var r=dW(e,t);return e.length>4&15,n=e[4]&15,i=e[5]>>4&15,a=SA(e,6),o=8,s=0;sa.width||i.width===a.width&&i.height>a.height?i:a}),r=e.reduce(function(i,a){return i.height>a.height||i.height===a.height&&i.width>a.width?i:a}),n;return t.width>r.height||t.width===r.height&&t.height>r.width?n=t:n=r,n}fD.exports.readSizeFromMeta=function(e){var t={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(xkt(e,t),!!t.sizes.length){var r=bkt(t.sizes),n=1;t.transforms.forEach(function(a){var o={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},s={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(a.type==="imir"&&(a.value===0?n=s[n]:(n=s[n],n=o[n],n=o[n])),a.type==="irot")for(var l=0;l{"use strict";function hD(e,t){var r=new Error(e);return r.code=t,r}function wkt(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}function $y(e,t,r){this.input=e.subarray(t,r),this.start=t;var n=String.fromCharCode.apply(null,this.input.subarray(0,4));if(n!=="II*\0"&&n!=="MM\0*")throw hD("invalid TIFF signature","EBADDATA");this.big_endian=n[0]==="M"}$y.prototype.each=function(e){this.aborted=!1;var t=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:t}];this.ifds_to_read.length>0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,e)}};$y.prototype.read_uint16=function(e){var t=this.input;if(e+2>t.length)throw hD("unexpected EOF","EBADDATA");return this.big_endian?t[e]*256+t[e+1]:t[e]+t[e+1]*256};$y.prototype.read_uint32=function(e){var t=this.input;if(e+4>t.length)throw hD("unexpected EOF","EBADDATA");return this.big_endian?t[e]*16777216+t[e+1]*65536+t[e+2]*256+t[e+3]:t[e]+t[e+1]*256+t[e+2]*65536+t[e+3]*16777216};$y.prototype.is_subifd_link=function(e,t){return e===0&&t===34665||e===0&&t===34853||e===34665&&t===40965};$y.prototype.exif_format_length=function(e){switch(e){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}};$y.prototype.exif_format_read=function(e,t){var r;switch(e){case 1:case 2:return r=this.input[t],r;case 6:return r=this.input[t],r|(r&128)*33554430;case 3:return r=this.read_uint16(t),r;case 8:return r=this.read_uint16(t),r|(r&32768)*131070;case 4:return r=this.read_uint32(t),r;case 9:return r=this.read_uint32(t),r|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}};$y.prototype.scan_ifd=function(e,t,r){var n=this.read_uint16(t);t+=2;for(var i=0;ithis.input.length)throw hD("unexpected EOF","EBADDATA");for(var h=[],d=c,v=0;v0&&(this.ifds_to_read.push({id:a,offset:h[0]}),f=!0);var b={is_big_endian:this.big_endian,ifd:e,tag:a,format:o,count:s,entry_offset:t+this.start,data_length:u,data_offset:c+this.start,value:h,is_subifd_link:f};if(r(b)===!1){this.aborted=!0;return}t+=12}e===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(t)})};vW.exports.ExifParser=$y;vW.exports.get_orientation=function(e){var t=0;try{return new $y(e,0,e.length).each(function(r){if(r.ifd===0&&r.tag===274&&Array.isArray(r.value))return t=r.value[0],!1}),t}catch(r){return-1}}});var J4e=ye((Fdr,K4e)=>{"use strict";var Tkt=rc().str2arr,Akt=rc().sliceEq,Skt=rc().readUInt32BE,vD=Y4e(),Mkt=dD(),Ekt=Tkt("ftyp");K4e.exports=function(e){if(Akt(e,4,Ekt)){var t=vD.unbox(e,0);if(t){var r=vD.getMimeType(t.data);if(r){for(var n,i=t.end;;){var a=vD.unbox(e,i);if(!a)break;if(i=a.end,a.boxtype==="mdat")return;if(a.boxtype==="meta"){n=a.data;break}}if(n){var o=vD.readSizeFromMeta(n);if(o){var s={width:o.width,height:o.height,type:r.type,mime:r.mime,wUnits:"px",hUnits:"px"};if(o.variants.length>1&&(s.variants=o.variants),o.orientation&&(s.orientation=o.orientation),o.exif_location&&o.exif_location.offset+o.exif_location.length<=e.length){var l=Skt(e,o.exif_location.offset),u=e.slice(o.exif_location.offset+l+4,o.exif_location.offset+o.exif_location.length),c=Mkt.get_orientation(u);c>0&&(s.orientation=c)}return s}}}}}}});var eEe=ye((zdr,Q4e)=>{"use strict";var kkt=rc().str2arr,Ckt=rc().sliceEq,$4e=rc().readUInt16LE,Lkt=kkt("BM");Q4e.exports=function(e){if(!(e.length<26)&&Ckt(e,0,Lkt))return{width:$4e(e,18),height:$4e(e,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}});var aEe=ye((Odr,nEe)=>{"use strict";var iEe=rc().str2arr,tEe=rc().sliceEq,rEe=rc().readUInt16LE,Pkt=iEe("GIF87a"),Ikt=iEe("GIF89a");nEe.exports=function(e){if(!(e.length<10)&&!(!tEe(e,0,Pkt)&&!tEe(e,0,Ikt)))return{width:rEe(e,6),height:rEe(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}});var lEe=ye((qdr,sEe)=>{"use strict";var pW=rc().readUInt16LE,Rkt=0,Dkt=1,oEe=16;sEe.exports=function(e){var t=pW(e,0),r=pW(e,2),n=pW(e,4);if(!(t!==Rkt||r!==Dkt||!n)){for(var i=[],a={width:0,height:0},o=0;oa.width||l>a.height)&&(a=u)}return{width:a.width,height:a.height,variants:i,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}});var cEe=ye((Bdr,uEe)=>{"use strict";var gW=rc().readUInt16BE,Fkt=rc().str2arr,zkt=rc().sliceEq,Okt=dD(),qkt=Fkt("Exif\0\0");uEe.exports=function(e){if(!(e.length<2)&&!(e[0]!==255||e[1]!==216||e[2]!==255))for(var t=2;;){for(;;){if(e.length-t<2)return;if(e[t++]===255)break}for(var r=e[t++],n;r===255;)r=e[t++];if(208<=r&&r<=217||r===1)n=0;else if(192<=r&&r<=254){if(e.length-t<2)return;n=gW(e,t)-2,t+=2}else return;if(r===217||r===218)return;var i;if(r===225&&n>=10&&zkt(e,t,qkt)&&(i=Okt.get_orientation(e.slice(t+6,t+n))),n>=5&&192<=r&&r<=207&&r!==196&&r!==200&&r!==204){if(e.length-t0&&(a.orientation=i),a}t+=n}}});var pEe=ye((Ndr,vEe)=>{"use strict";var dEe=rc().str2arr,fEe=rc().sliceEq,hEe=rc().readUInt32BE,Bkt=dEe(`\x89PNG\r +`));var s=new K_({actual:e,expected:t,message:r,operator:i,stackStartFn:n});throw s.generatedMessage=o,s}}Ef.match=function e(t,r,n){L4e(t,r,n,e,"match")};Ef.doesNotMatch=function e(t,r,n){L4e(t,r,n,e,"doesNotMatch")};function P4e(){for(var e=arguments.length,t=new Array(e),r=0;r{var CE=1e3,LE=CE*60,PE=LE*60,IE=PE*24,KEt=IE*365.25;R4e.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return JEt(e);if(r==="number"&&isNaN(e)===!1)return t.long?QEt(e):$Et(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function JEt(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*KEt;case"days":case"day":case"d":return r*IE;case"hours":case"hour":case"hrs":case"hr":case"h":return r*PE;case"minutes":case"minute":case"mins":case"min":case"m":return r*LE;case"seconds":case"second":case"secs":case"sec":case"s":return r*CE;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function $Et(e){return e>=IE?Math.round(e/IE)+"d":e>=PE?Math.round(e/PE)+"h":e>=LE?Math.round(e/LE)+"m":e>=CE?Math.round(e/CE)+"s":e+"ms"}function QEt(e){return lD(e,IE,"day")||lD(e,PE,"hour")||lD(e,LE,"minute")||lD(e,CE,"second")||e+" ms"}function lD(e,t,r){if(!(e{Lc=F4e.exports=fW.debug=fW.default=fW;Lc.coerce=nkt;Lc.disable=rkt;Lc.enable=tkt;Lc.enabled=ikt;Lc.humanize=D4e();Lc.names=[];Lc.skips=[];Lc.formatters={};var cW;function ekt(e){var t=0,r;for(r in e)t=(t<<5)-t+e.charCodeAt(r),t|=0;return Lc.colors[Math.abs(t)%Lc.colors.length]}function fW(e){function t(){if(t.enabled){var r=t,n=+new Date,i=n-(cW||n);r.diff=i,r.prev=cW,r.curr=n,cW=n;for(var a=new Array(arguments.length),o=0;o{up=O4e.exports=z4e();up.log=skt;up.formatArgs=okt;up.save=lkt;up.load=q4e;up.useColors=akt;up.storage=typeof chrome!="undefined"&&typeof chrome.storage!="undefined"?chrome.storage.local:ukt();up.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function akt(){return typeof window!="undefined"&&window.process&&window.process.type==="renderer"?!0:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}up.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}};function okt(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+up.humanize(this.diff),!!t){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var n=0,i=0;e[0].replace(/%[a-zA-Z%]/g,function(a){a!=="%%"&&(n++,a==="%c"&&(i=n))}),e.splice(i,0,r)}}function skt(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function lkt(e){try{e==null?up.storage.removeItem("debug"):up.storage.debug=e}catch(t){}}function q4e(){var e;try{e=up.storage.debug}catch(t){}return!e&&typeof process!="undefined"&&"env"in process&&(e=process.env.DEBUG),e}up.enable(q4e());function ukt(){try{return window.localStorage}catch(e){}}});var X4e=ye((Odr,W4e)=>{var SA=gE(),J_=B4e()("stream-parser");W4e.exports=fkt;var U4e=-1,uD=0,ckt=1,V4e=2;function fkt(e){var t=e&&typeof e._transform=="function",r=e&&typeof e._write=="function";if(!t&&!r)throw new Error("must pass a Writable or Transform stream in");J_("extending Parser into stream"),e._bytes=hkt,e._skipBytes=dkt,t&&(e._passthrough=vkt),t?e._transform=gkt:e._write=pkt}function RE(e){J_("initializing parser stream"),e._parserBytesLeft=0,e._parserBuffers=[],e._parserBuffered=0,e._parserState=U4e,e._parserCallback=null,typeof e.push=="function"&&(e._parserOutput=e.push.bind(e)),e._parserInit=!0}function hkt(e,t){SA(!this._parserCallback,'there is already a "callback" set!'),SA(isFinite(e)&&e>0,'can only buffer a finite number of bytes > 0, got "'+e+'"'),this._parserInit||RE(this),J_("buffering %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=uD}function dkt(e,t){SA(!this._parserCallback,'there is already a "callback" set!'),SA(e>0,'can only skip > 0 bytes, got "'+e+'"'),this._parserInit||RE(this),J_("skipping %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=ckt}function vkt(e,t){SA(!this._parserCallback,'There is already a "callback" set!'),SA(e>0,'can only pass through > 0 bytes, got "'+e+'"'),this._parserInit||RE(this),J_("passing through %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=V4e}function pkt(e,t,r){this._parserInit||RE(this),J_("write(%o bytes)",e.length),typeof t=="function"&&(r=t),H4e(this,e,null,r)}function gkt(e,t,r){this._parserInit||RE(this),J_("transform(%o bytes)",e.length),typeof t!="function"&&(t=this._parserOutput),H4e(this,e,t,r)}function G4e(e,t,r,n){return e._parserBytesLeft<=0?n(new Error("got data but not currently parsing anything")):t.length<=e._parserBytesLeft?function(){return N4e(e,t,r,n)}:function(){var i=t.slice(0,e._parserBytesLeft);return N4e(e,i,r,function(a){if(a)return n(a);if(t.length>i.length)return function(){return G4e(e,t.slice(i.length),r,n)}})}}function N4e(e,t,r,n){if(e._parserBytesLeft-=t.length,J_("%o bytes left for stream piece",e._parserBytesLeft),e._parserState===uD?(e._parserBuffers.push(t),e._parserBuffered+=t.length):e._parserState===V4e&&r(t),e._parserBytesLeft===0){var i=e._parserCallback;if(i&&e._parserState===uD&&e._parserBuffers.length>1&&(t=Buffer.concat(e._parserBuffers,e._parserBuffered)),e._parserState!==uD&&(t=null),e._parserCallback=null,e._parserBuffered=0,e._parserState=U4e,e._parserBuffers.splice(0),i){var a=[];t&&a.push(t),r&&a.push(r);var o=i.length>a.length;o&&a.push(j4e(n));var s=i.apply(e,a);if(!o||n===s)return n}}else return n}var H4e=j4e(G4e);function j4e(e){return function(){for(var t=e.apply(this,arguments);typeof t=="function";)t=t();return t}}});var rc=ye(Jy=>{"use strict";var Z4e=NSe().Transform,mkt=X4e();function DE(){Z4e.call(this,{readableObjectMode:!0})}DE.prototype=Object.create(Z4e.prototype);DE.prototype.constructor=DE;mkt(DE.prototype);Jy.ParserStream=DE;Jy.sliceEq=function(e,t,r){for(var n=t,i=0;i{"use strict";var MA=rc().readUInt16BE,dW=rc().readUInt32BE;function FE(e,t){if(e.length<4+t)return null;var r=dW(e,t);return e.length>4&15,n=e[4]&15,i=e[5]>>4&15,a=MA(e,6),o=8,s=0;sa.width||i.width===a.width&&i.height>a.height?i:a}),r=e.reduce(function(i,a){return i.height>a.height||i.height===a.height&&i.width>a.width?i:a}),n;return t.width>r.height||t.width===r.height&&t.height>r.width?n=t:n=r,n}fD.exports.readSizeFromMeta=function(e){var t={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(wkt(e,t),!!t.sizes.length){var r=Tkt(t.sizes),n=1;t.transforms.forEach(function(a){var o={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},s={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(a.type==="imir"&&(a.value===0?n=s[n]:(n=s[n],n=o[n],n=o[n])),a.type==="irot")for(var l=0;l{"use strict";function hD(e,t){var r=new Error(e);return r.code=t,r}function Akt(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}function $y(e,t,r){this.input=e.subarray(t,r),this.start=t;var n=String.fromCharCode.apply(null,this.input.subarray(0,4));if(n!=="II*\0"&&n!=="MM\0*")throw hD("invalid TIFF signature","EBADDATA");this.big_endian=n[0]==="M"}$y.prototype.each=function(e){this.aborted=!1;var t=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:t}];this.ifds_to_read.length>0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,e)}};$y.prototype.read_uint16=function(e){var t=this.input;if(e+2>t.length)throw hD("unexpected EOF","EBADDATA");return this.big_endian?t[e]*256+t[e+1]:t[e]+t[e+1]*256};$y.prototype.read_uint32=function(e){var t=this.input;if(e+4>t.length)throw hD("unexpected EOF","EBADDATA");return this.big_endian?t[e]*16777216+t[e+1]*65536+t[e+2]*256+t[e+3]:t[e]+t[e+1]*256+t[e+2]*65536+t[e+3]*16777216};$y.prototype.is_subifd_link=function(e,t){return e===0&&t===34665||e===0&&t===34853||e===34665&&t===40965};$y.prototype.exif_format_length=function(e){switch(e){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}};$y.prototype.exif_format_read=function(e,t){var r;switch(e){case 1:case 2:return r=this.input[t],r;case 6:return r=this.input[t],r|(r&128)*33554430;case 3:return r=this.read_uint16(t),r;case 8:return r=this.read_uint16(t),r|(r&32768)*131070;case 4:return r=this.read_uint32(t),r;case 9:return r=this.read_uint32(t),r|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}};$y.prototype.scan_ifd=function(e,t,r){var n=this.read_uint16(t);t+=2;for(var i=0;ithis.input.length)throw hD("unexpected EOF","EBADDATA");for(var h=[],d=c,v=0;v0&&(this.ifds_to_read.push({id:a,offset:h[0]}),f=!0);var b={is_big_endian:this.big_endian,ifd:e,tag:a,format:o,count:s,entry_offset:t+this.start,data_length:u,data_offset:c+this.start,value:h,is_subifd_link:f};if(r(b)===!1){this.aborted=!0;return}t+=12}e===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(t)})};vW.exports.ExifParser=$y;vW.exports.get_orientation=function(e){var t=0;try{return new $y(e,0,e.length).each(function(r){if(r.ifd===0&&r.tag===274&&Array.isArray(r.value))return t=r.value[0],!1}),t}catch(r){return-1}}});var J4e=ye((Vdr,K4e)=>{"use strict";var Skt=rc().str2arr,Mkt=rc().sliceEq,Ekt=rc().readUInt32BE,vD=Y4e(),kkt=dD(),Ckt=Skt("ftyp");K4e.exports=function(e){if(Mkt(e,4,Ckt)){var t=vD.unbox(e,0);if(t){var r=vD.getMimeType(t.data);if(r){for(var n,i=t.end;;){var a=vD.unbox(e,i);if(!a)break;if(i=a.end,a.boxtype==="mdat")return;if(a.boxtype==="meta"){n=a.data;break}}if(n){var o=vD.readSizeFromMeta(n);if(o){var s={width:o.width,height:o.height,type:r.type,mime:r.mime,wUnits:"px",hUnits:"px"};if(o.variants.length>1&&(s.variants=o.variants),o.orientation&&(s.orientation=o.orientation),o.exif_location&&o.exif_location.offset+o.exif_location.length<=e.length){var l=Ekt(e,o.exif_location.offset),u=e.slice(o.exif_location.offset+l+4,o.exif_location.offset+o.exif_location.length),c=kkt.get_orientation(u);c>0&&(s.orientation=c)}return s}}}}}}});var eEe=ye((Gdr,Q4e)=>{"use strict";var Lkt=rc().str2arr,Pkt=rc().sliceEq,$4e=rc().readUInt16LE,Ikt=Lkt("BM");Q4e.exports=function(e){if(!(e.length<26)&&Pkt(e,0,Ikt))return{width:$4e(e,18),height:$4e(e,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}});var aEe=ye((Hdr,nEe)=>{"use strict";var iEe=rc().str2arr,tEe=rc().sliceEq,rEe=rc().readUInt16LE,Rkt=iEe("GIF87a"),Dkt=iEe("GIF89a");nEe.exports=function(e){if(!(e.length<10)&&!(!tEe(e,0,Rkt)&&!tEe(e,0,Dkt)))return{width:rEe(e,6),height:rEe(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}});var lEe=ye((jdr,sEe)=>{"use strict";var pW=rc().readUInt16LE,Fkt=0,zkt=1,oEe=16;sEe.exports=function(e){var t=pW(e,0),r=pW(e,2),n=pW(e,4);if(!(t!==Fkt||r!==zkt||!n)){for(var i=[],a={width:0,height:0},o=0;oa.width||l>a.height)&&(a=u)}return{width:a.width,height:a.height,variants:i,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}});var cEe=ye((Wdr,uEe)=>{"use strict";var gW=rc().readUInt16BE,qkt=rc().str2arr,Okt=rc().sliceEq,Bkt=dD(),Nkt=qkt("Exif\0\0");uEe.exports=function(e){if(!(e.length<2)&&!(e[0]!==255||e[1]!==216||e[2]!==255))for(var t=2;;){for(;;){if(e.length-t<2)return;if(e[t++]===255)break}for(var r=e[t++],n;r===255;)r=e[t++];if(208<=r&&r<=217||r===1)n=0;else if(192<=r&&r<=254){if(e.length-t<2)return;n=gW(e,t)-2,t+=2}else return;if(r===217||r===218)return;var i;if(r===225&&n>=10&&Okt(e,t,Nkt)&&(i=Bkt.get_orientation(e.slice(t+6,t+n))),n>=5&&192<=r&&r<=207&&r!==196&&r!==200&&r!==204){if(e.length-t0&&(a.orientation=i),a}t+=n}}});var pEe=ye((Xdr,vEe)=>{"use strict";var dEe=rc().str2arr,fEe=rc().sliceEq,hEe=rc().readUInt32BE,Ukt=dEe(`\x89PNG\r  -`),Nkt=dEe("IHDR");vEe.exports=function(e){if(!(e.length<24)&&fEe(e,0,Bkt)&&fEe(e,12,Nkt))return{width:hEe(e,16),height:hEe(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}});var yEe=ye((Udr,mEe)=>{"use strict";var Ukt=rc().str2arr,Vkt=rc().sliceEq,gEe=rc().readUInt32BE,Gkt=Ukt("8BPS\0");mEe.exports=function(e){if(!(e.length<22)&&Vkt(e,0,Gkt))return{width:gEe(e,18),height:gEe(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}});var bEe=ye((Vdr,xEe)=>{"use strict";function Hkt(e){return e===32||e===9||e===13||e===10}function MA(e){return typeof e=="number"&&isFinite(e)&&e>0}function jkt(e){var t=0,r=e.length;for(e[0]===239&&e[1]===187&&e[2]===191&&(t=3);t]*>/,Xkt=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,Zkt=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,Ykt=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,Kkt=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,_Ee=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function Jkt(e){var t=e.match(Zkt),r=e.match(Ykt),n=e.match(Kkt);return{width:t&&(t[1]||t[2]),height:r&&(r[1]||r[2]),viewbox:n&&(n[1]||n[2])}}function Xm(e){return _Ee.test(e)?e.match(_Ee)[0]:"px"}xEe.exports=function(e){if(jkt(e)){for(var t="",r=0;r{"use strict";var AEe=rc().str2arr,wEe=rc().sliceEq,$kt=rc().readUInt16LE,Qkt=rc().readUInt16BE,eCt=rc().readUInt32LE,tCt=rc().readUInt32BE,rCt=AEe("II*\0"),iCt=AEe("MM\0*");function pD(e,t,r){return r?Qkt(e,t):$kt(e,t)}function mW(e,t,r){return r?tCt(e,t):eCt(e,t)}function TEe(e,t,r){var n=pD(e,t+2,r),i=mW(e,t+4,r);return i!==1||n!==3&&n!==4?null:n===3?pD(e,t+8,r):mW(e,t+8,r)}SEe.exports=function(e){if(!(e.length<8)&&!(!wEe(e,0,rCt)&&!wEe(e,0,iCt))){var t=e[0]===77,r=mW(e,4,t)-8;if(!(r<0)){var n=r+8;if(!(e.length-n<2)){var i=pD(e,n+0,t)*12;if(!(i<=0)&&(n+=2,!(e.length-n{"use strict";var CEe=rc().str2arr,EEe=rc().sliceEq,kEe=rc().readUInt16LE,yW=rc().readUInt32LE,nCt=dD(),aCt=CEe("RIFF"),oCt=CEe("WEBP");function sCt(e,t){if(!(e[t+3]!==157||e[t+4]!==1||e[t+5]!==42))return{width:kEe(e,t+6)&16383,height:kEe(e,t+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function lCt(e,t){if(e[t]===47){var r=yW(e,t+1);return{width:(r&16383)+1,height:(r>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function uCt(e,t){return{width:(e[t+6]<<16|e[t+5]<<8|e[t+4])+1,height:(e[t+9]<e.length)){for(;t+8=10?r=r||sCt(e,t+8):a==="VP8L"&&o>=9?r=r||lCt(e,t+8):a==="VP8X"&&o>=10?r=r||uCt(e,t+8):a==="EXIF"&&(n=nCt.get_orientation(e.slice(t+8,t+8+o)),t=1/0),t+=8+o}if(r)return n>0&&(r.orientation=n),r}}}});var REe=ye((jdr,IEe)=>{"use strict";IEe.exports={avif:J4e(),bmp:eEe(),gif:aEe(),ico:lEe(),jpeg:cEe(),png:pEe(),psd:yEe(),svg:bEe(),tiff:MEe(),webp:PEe()}});var DEe=ye((Wdr,xW)=>{"use strict";var _W=REe();function cCt(e){for(var t=Object.keys(_W),r=0;r{"use strict";var fCt=DEe(),hCt=Oy().IMAGE_URL_PREFIX,dCt=_2().Buffer;FEe.getImageSize=function(e){var t=e.replace(hCt,""),r=new dCt(t,"base64");return fCt(r)}});var BEe=ye((Zdr,qEe)=>{"use strict";var OEe=Dr(),vCt=QT(),pCt=Eo(),gD=ho(),gCt=Dr().maxRowLength,mCt=zEe().getImageSize;qEe.exports=function(t,r){var n,i;if(r._hasZ)n=r.z.length,i=gCt(r.z);else if(r._hasSource){var a=mCt(r.source);n=a.height,i=a.width}var o=gD.getFromId(t,r.xaxis||"x"),s=gD.getFromId(t,r.yaxis||"y"),l=o.d2c(r.x0)-r.dx/2,u=s.d2c(r.y0)-r.dy/2,c,f=[l,l+i*r.dx],h=[u,u+n*r.dy];if(o&&o.type==="log")for(c=0;c{"use strict";var bCt=Oa(),R2=Dr(),NEe=R2.strTranslate,wCt=Wp(),TCt=QT(),ACt=oG(),SCt=g8().STYLE;UEe.exports=function(t,r,n,i){var a=r.xaxis,o=r.yaxis,s=!t._context._exportedPlot&&ACt();R2.makeTraceGroups(i,n,"im").each(function(l){var u=bCt.select(this),c=l[0],f=c.trace,h=(f.zsmooth==="fast"||f.zsmooth===!1&&s)&&!f._hasZ&&f._hasSource&&a.type==="linear"&&o.type==="linear";f._realImage=h;var d=c.z,v=c.x0,_=c.y0,b=c.w,p=c.h,k=f.dx,E=f.dy,T,L,x,C,M,g;for(g=0;T===void 0&&g0;)L=a.c2p(v+g*k),g--;for(g=0;C===void 0&&g0;)M=o.c2p(_+g*E),g--;if(LH[0];if(re||oe){var _e=T+A/2,Ce=C+z/2;j+="transform:"+NEe(_e+"px",Ce+"px")+"scale("+(re?-1:1)+","+(oe?-1:1)+")"+NEe(-_e+"px",-Ce+"px")+";"}}Z.attr("style",j);var Le=new Promise(function(ge){if(f._hasZ)ge();else if(f._hasSource)if(f._canvas&&f._canvas.el.width===b&&f._canvas.el.height===p&&f._canvas.source===f.source)ge();else{var ie=document.createElement("canvas");ie.width=b,ie.height=p;var Se=ie.getContext("2d",{willReadFrequently:!0});f._image=f._image||new Image;var Ee=f._image;Ee.onload=function(){Se.drawImage(Ee,0,0),f._canvas={el:ie,source:f.source},ge()},Ee.setAttribute("src",f.source)}}).then(function(){var ge,ie;if(f._hasZ)ie=G(function(Ae,Be){var Pe=d[Be][Ae];return R2.isTypedArray(Pe)&&(Pe=Array.from(Pe)),Pe}),ge=ie.toDataURL("image/png");else if(f._hasSource)if(h)ge=f.source;else{var Se=f._canvas.el.getContext("2d",{willReadFrequently:!0}),Ee=Se.getImageData(0,0,b,p).data;ie=G(function(Ae,Be){var Pe=4*(Be*b+Ae);return[Ee[Pe],Ee[Pe+1],Ee[Pe+2],Ee[Pe+3]]}),ge=ie.toDataURL("image/png")}Z.attr({"xlink:href":ge,height:z,width:A,x:T,y:C})});t._promises.push(Le)})}});var HEe=ye((Kdr,GEe)=>{"use strict";var MCt=Oa();GEe.exports=function(t){MCt.select(t).selectAll(".im image").style("opacity",function(r){return r[0].trace.opacity})}});var ZEe=ye((Jdr,XEe)=>{"use strict";var jEe=vf(),WEe=Dr(),mD=WEe.isArrayOrTypedArray,ECt=QT();XEe.exports=function(t,r,n){var i=t.cd[0],a=i.trace,o=t.xa,s=t.ya;if(!(jEe.inbox(r-i.x0,r-(i.x0+i.w*a.dx),0)>0||jEe.inbox(n-i.y0,n-(i.y0+i.h*a.dy),0)>0)){var l=Math.floor((r-i.x0)/a.dx),u=Math.floor(Math.abs(n-i.y0)/a.dy),c;if(a._hasZ?c=i.z[u][l]:a._hasSource&&(c=a._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(l,u,1,1).data),!!c){var f=i.hi||a.hoverinfo,h;if(f){var d=f.split("+");d.indexOf("all")!==-1&&(d=["color"]),d.indexOf("color")!==-1&&(h=!0)}var v=ECt.colormodel[a.colormodel],_=v.colormodel||a.colormodel,b=_.length,p=a._scaler(c),k=v.suffix,E=[];(a.hovertemplate||h)&&(E.push("["+[p[0]+k[0],p[1]+k[1],p[2]+k[2]].join(", ")),b===4&&E.push(", "+p[3]+k[3]),E.push("]"),E=E.join(""),t.extraText=_.toUpperCase()+": "+E);var T;mD(a.hovertext)&&mD(a.hovertext[u])?T=a.hovertext[u][l]:mD(a.text)&&mD(a.text[u])&&(T=a.text[u][l]);var L=s.c2p(i.y0+(u+.5)*a.dy),x=i.x0+(l+.5)*a.dx,C=i.y0+(u+.5)*a.dy,M="["+c.slice(0,a.colormodel.length).join(", ")+"]";return[WEe.extendFlat(t,{index:[u,l],x0:o.c2p(i.x0+l*a.dx),x1:o.c2p(i.x0+(l+1)*a.dx),y0:L,y1:L,color:p,xVal:x,xLabelVal:x,yVal:C,yLabelVal:C,zLabelVal:M,text:T,hovertemplateLabels:{zLabel:M,colorLabel:E,"color[0]Label":p[0]+k[0],"color[1]Label":p[1]+k[1],"color[2]Label":p[2]+k[2],"color[3]Label":p[3]+k[3]}})]}}}});var KEe=ye(($dr,YEe)=>{"use strict";YEe.exports=function(t,r){return"xVal"in r&&(t.x=r.xVal),"yVal"in r&&(t.y=r.yVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t.color=r.color,t.colormodel=r.trace.colormodel,t.z||(t.z=r.color),t}});var $Ee=ye((Qdr,JEe)=>{"use strict";JEe.exports={attributes:gH(),supplyDefaults:Z3e(),calc:BEe(),plot:VEe(),style:HEe(),hoverPoints:ZEe(),eventData:KEe(),moduleType:"trace",name:"image",basePlotModule:mh(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}});var eke=ye((evr,QEe)=>{"use strict";QEe.exports=$Ee()});var F2=ye((tvr,rke)=>{"use strict";var bW=Gl(),kCt=Cc().attributes,CCt=ec(),LCt=Ih(),{hovertemplateAttrs:PCt,texttemplateAttrs:ICt,templatefallbackAttrs:tke}=Ll(),D2=Ao().extendFlat,RCt=Pd().pattern,yD=CCt({editType:"plot",arrayOk:!0,colorEditType:"plot"});rke.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:LCt.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:RCt,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:D2({},bW.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:PCt({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:tke(),texttemplate:ICt({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:tke({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:D2({},yD,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:D2({},yD,{}),outsidetextfont:D2({},yD,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:D2({},bW.showlegend,{arrayOk:!0}),legend:D2({},bW.legend,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:D2({},yD,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:kCt({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"}}});var z2=ye((rvr,ake)=>{"use strict";var DCt=Eo(),zE=Dr(),FCt=F2(),zCt=Cc().defaults,OCt=i0().handleText,qCt=Dr().coercePattern;function ike(e,t){var r=zE.isArrayOrTypedArray(e),n=zE.isArrayOrTypedArray(t),i=Math.min(r?e.length:1/0,n?t.length:1/0);if(isFinite(i)||(i=0),i&&n){for(var a,o=0;o0){a=!0;break}}a||(i=0)}return{hasLabels:r,hasValues:n,len:i}}function nke(e,t,r,n,i){var a=n("marker.line.width");a&&n("marker.line.color",i?void 0:r.paper_bgcolor);var o=n("marker.colors");qCt(n,"marker.pattern",o),e.marker&&!t.marker.pattern.fgcolor&&(t.marker.pattern.fgcolor=e.marker.colors),t.marker.pattern.bgcolor||(t.marker.pattern.bgcolor=r.paper_bgcolor)}function BCt(e,t,r,n){function i(k,E){return zE.coerce(e,t,FCt,k,E)}var a=i("labels"),o=i("values"),s=ike(a,o),l=s.len;if(t._hasLabels=s.hasLabels,t._hasValues=s.hasValues,!t._hasLabels&&t._hasValues&&(i("label0"),i("dlabel")),!l){t.visible=!1;return}t._length=l,nke(e,t,n,i,!0),i("scalegroup");var u=i("text"),c=i("texttemplate");i("texttemplatefallback");var f;if(c||(f=i("textinfo",zE.isArrayOrTypedArray(u)?"text+percent":"percent")),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),c||f&&f!=="none"){var h=i("textposition");OCt(e,t,n,i,h,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var d=Array.isArray(h)||h==="auto",v=d||h==="outside";v&&i("automargin"),(h==="inside"||h==="auto"||Array.isArray(h))&&i("insidetextorientation")}else f==="none"&&i("textposition","none");zCt(t,n,i);var _=i("hole"),b=i("title.text");if(b){var p=i("title.position",_?"middle center":"top center");!_&&p==="middle center"&&(t.title.position="top center"),zE.coerceFont(i,"title.font",n.font)}i("sort"),i("direction"),i("rotation"),i("pull")}ake.exports={handleLabelsAndValues:ike,handleMarkerDefaults:nke,supplyDefaults:BCt}});var _D=ye((ivr,oke)=>{"use strict";oke.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var lke=ye((nvr,ske)=>{"use strict";var NCt=Dr(),UCt=_D();ske.exports=function(t,r){function n(i,a){return NCt.coerce(t,r,UCt,i,a)}n("hiddenlabels"),n("piecolorway",r.colorway),n("extendpiecolors")}});var EA=ye((avr,fke)=>{"use strict";var VCt=Eo(),wW=fd(),GCt=ka(),HCt={};function jCt(e,t){var r=[],n=e._fullLayout,i=n.hiddenlabels||[],a=t.labels,o=t.marker.colors||[],s=t.values,l=t._length,u=t._hasValues&&l,c,f;if(t.dlabel)for(a=new Array(l),c=0;c=0});var T=t.type==="funnelarea"?_:t.sort;return T&&r.sort(function(L,x){return x.v-L.v}),r[0]&&(r[0].vTotal=v),r}function uke(e){return function(r,n){return!r||(r=wW(r),!r.isValid())?!1:(r=GCt.addOpacity(r,r.getAlpha()),e[n]||(e[n]=r),r)}}function WCt(e,t){var r=(t||{}).type;r||(r="pie");var n=e._fullLayout,i=e.calcdata,a=n[r+"colorway"],o=n["_"+r+"colormap"];n["extend"+r+"colors"]&&(a=cke(a,HCt));for(var s=0,l=0;l{"use strict";var XCt=ip().appendArrayMultiPointValues;hke.exports=function(t,r){var n={curveNumber:r.index,pointNumbers:t.pts,data:r._input,fullData:r,label:t.label,color:t.color,value:t.v,percent:t.percent,text:t.text,bbox:t.bbox,v:t.v};return t.pts.length===1&&(n.pointNumber=n.i=t.pts[0]),XCt(n,r,t.pts),r.type==="funnelarea"&&(delete n.v,delete n.i),n}});var TD=ye((svr,Dke)=>{"use strict";var Fp=Oa(),ZCt=Mc(),xD=vf(),_ke=ka(),Qy=So(),rv=Dr(),YCt=rv.strScale,vke=rv.strTranslate,TW=Zl(),xke=bv(),KCt=xke.recordMinTextSize,JCt=xke.clearMinTextSize,bke=A_().TEXTPAD,ns=g_(),bD=dke(),pke=Dr().isValidTextValue;function $Ct(e,t){var r=e._context.staticPlot,n=e._fullLayout,i=n._size;JCt("pie",n),Ake(t,e),Pke(t,i);var a=rv.makeTraceGroups(n._pielayer,t,"trace").each(function(o){var s=Fp.select(this),l=o[0],u=l.trace;s6t(o),s.attr("stroke-linejoin","round"),s.each(function(){var c=Fp.select(this).selectAll("g.slice").data(o);c.enter().append("g").classed("slice",!0),c.exit().remove();var f=[[[],[]],[[],[]]],h=!1;c.each(function(T,L){if(T.hidden){Fp.select(this).selectAll("path,g").remove();return}T.pointNumber=T.i,T.curveNumber=u.index,f[T.pxmid[1]<0?0:1][T.pxmid[0]<0?0:1].push(T);var x=l.cx,C=l.cy,M=Fp.select(this),g=M.selectAll("path.surface").data([T]);if(g.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),M.call(wke,e,o),u.pull){var P=+ns.castOption(u.pull,T.pts)||0;P>0&&(x+=P*T.pxmid[0],C+=P*T.pxmid[1])}T.cxFinal=x,T.cyFinal=C;function A(N,H,re,oe){var _e=oe*(H[0]-N[0]),Ce=oe*(H[1]-N[1]);return"a"+oe*l.r+","+oe*l.r+" 0 "+T.largeArc+(re?" 1 ":" 0 ")+_e+","+Ce}var z=u.hole;if(T.v===l.vTotal){var O="M"+(x+T.px0[0])+","+(C+T.px0[1])+A(T.px0,T.pxmid,!0,1)+A(T.pxmid,T.px0,!0,1)+"Z";z?g.attr("d","M"+(x+z*T.px0[0])+","+(C+z*T.px0[1])+A(T.px0,T.pxmid,!1,z)+A(T.pxmid,T.px0,!1,z)+"Z"+O):g.attr("d",O)}else{var U=A(T.px0,T.px1,!0,1);if(z){var G=1-z;g.attr("d","M"+(x+z*T.px1[0])+","+(C+z*T.px1[1])+A(T.px1,T.px0,!1,z)+"l"+G*T.px0[0]+","+G*T.px0[1]+U+"Z")}else g.attr("d","M"+x+","+C+"l"+T.px0[0]+","+T.px0[1]+U+"Z")}Ike(e,T,l);var Z=ns.castOption(u.textposition,T.pts),j=M.selectAll("g.slicetext").data(T.text&&Z!=="none"?[0]:[]);j.enter().append("g").classed("slicetext",!0),j.exit().remove(),j.each(function(){var N=rv.ensureSingle(Fp.select(this),"text","",function(ie){ie.attr("data-notex",1)}),H=rv.ensureUniformFontSize(e,Z==="outside"?e6t(u,T,n.font):Tke(u,T,n.font));N.text(T.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(Qy.font,H).call(TW.convertToTspans,e);var re=Qy.bBox(N.node()),oe;if(Z==="outside")oe=yke(re,T);else if(oe=Ske(re,T,l),Z==="auto"&&oe.scale<1){var _e=rv.ensureUniformFontSize(e,u.outsidetextfont);N.call(Qy.font,_e),re=Qy.bBox(N.node()),oe=yke(re,T)}var Ce=oe.textPosAngle,Le=Ce===void 0?T.pxmid:wD(l.r,Ce);if(oe.targetX=x+Le[0]*oe.rCenter+(oe.x||0),oe.targetY=C+Le[1]*oe.rCenter+(oe.y||0),Rke(oe,re),oe.outside){var ge=oe.targetY;T.yLabelMin=ge-re.height/2,T.yLabelMid=ge,T.yLabelMax=ge+re.height/2,T.labelExtraX=0,T.labelExtraY=0,h=!0}oe.fontSize=H.size,KCt(u.type,oe,n),o[L].transform=oe,rv.setTransormAndDisplay(N,oe)})});var d=Fp.select(this).selectAll("g.titletext").data(u.title.text?[0]:[]);if(d.enter().append("g").classed("titletext",!0),d.exit().remove(),d.each(function(){var T=rv.ensureSingle(Fp.select(this),"text","",function(C){C.attr("data-notex",1)}),L=u.title.text;u._meta&&(L=rv.templateString(L,u._meta)),T.text(L).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(Qy.font,u.title.font).call(TW.convertToTspans,e);var x;u.title.position==="middle center"?x=i6t(l):x=Cke(l,i),T.attr("transform",vke(x.x,x.y)+YCt(Math.min(1,x.scale))+vke(x.tx,x.ty))}),h&&a6t(f,u),QCt(c,u),h&&u.automargin){var v=Qy.bBox(s.node()),_=u.domain,b=i.w*(_.x[1]-_.x[0]),p=i.h*(_.y[1]-_.y[0]),k=(.5*b-l.r)/i.w,E=(.5*p-l.r)/i.h;ZCt.autoMargin(e,"pie."+u.uid+".automargin",{xl:_.x[0]-k,xr:_.x[1]+k,yb:_.y[0]-E,yt:_.y[1]+E,l:Math.max(l.cx-l.r-v.left,0),r:Math.max(v.right-(l.cx+l.r),0),b:Math.max(v.bottom-(l.cy+l.r),0),t:Math.max(l.cy-l.r-v.top,0),pad:5})}})});setTimeout(function(){a.selectAll("tspan").each(function(){var o=Fp.select(this);o.attr("dy")&&o.attr("dy",o.attr("dy"))})},0)}function QCt(e,t){e.each(function(r){var n=Fp.select(this);if(!r.labelExtraX&&!r.labelExtraY){n.select("path.textline").remove();return}var i=n.select("g.slicetext text");r.transform.targetX+=r.labelExtraX,r.transform.targetY+=r.labelExtraY,rv.setTransormAndDisplay(i,r.transform);var a=r.cxFinal+r.pxmid[0],o=r.cyFinal+r.pxmid[1],s="M"+a+","+o,l=(r.yLabelMax-r.yLabelMin)*(r.pxmid[0]<0?-1:1)/4;if(r.labelExtraX){var u=r.labelExtraX*r.pxmid[1]/r.pxmid[0],c=r.yLabelMid+r.labelExtraY-(r.cyFinal+r.pxmid[1]);Math.abs(u)>Math.abs(c)?s+="l"+c*r.pxmid[0]/r.pxmid[1]+","+c+"H"+(a+r.labelExtraX+l):s+="l"+r.labelExtraX+","+u+"v"+(c-u)+"h"+l}else s+="V"+(r.yLabelMid+r.labelExtraY)+"h"+l;rv.ensureSingle(n,"path","textline").call(_ke.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:s,fill:"none"})})}function wke(e,t,r){var n=r[0],i=n.cx,a=n.cy,o=n.trace,s=o.type==="funnelarea";"_hasHoverLabel"in o||(o._hasHoverLabel=!1),"_hasHoverEvent"in o||(o._hasHoverEvent=!1),e.on("mouseover",function(l){var u=t._fullLayout,c=t._fullData[o.index];if(!(t._dragging||u.hovermode===!1)){var f=c.hoverinfo;if(Array.isArray(f)&&(f=xD.castHoverinfo({hoverinfo:[ns.castOption(f,l.pts)],_module:o._module},u,0)),f==="all"&&(f="label+text+value+percent+name"),c.hovertemplate||f!=="none"&&f!=="skip"&&f){var h=l.rInscribed||0,d=i+l.pxmid[0]*(1-h),v=a+l.pxmid[1]*(1-h),_=u.separators,b=[];if(f&&f.indexOf("label")!==-1&&b.push(l.label),l.text=ns.castOption(c.hovertext||c.text,l.pts),f&&f.indexOf("text")!==-1){var p=l.text;rv.isValidTextValue(p)&&b.push(p)}l.value=l.v,l.valueLabel=ns.formatPieValue(l.v,_),f&&f.indexOf("value")!==-1&&b.push(l.valueLabel),l.percent=l.v/n.vTotal,l.percentLabel=ns.formatPiePercent(l.percent,_),f&&f.indexOf("percent")!==-1&&b.push(l.percentLabel);var k=c.hoverlabel,E=k.font,T=[];xD.loneHover({trace:o,x0:d-h*n.r,x1:d+h*n.r,y:v,_x0:s?i+l.TL[0]:d-h*n.r,_x1:s?i+l.TR[0]:d+h*n.r,_y0:s?a+l.TL[1]:v-h*n.r,_y1:s?a+l.BL[1]:v+h*n.r,text:b.join("
"),name:c.hovertemplate||f.indexOf("name")!==-1?c.name:void 0,idealAlign:l.pxmid[0]<0?"left":"right",color:ns.castOption(k.bgcolor,l.pts)||l.color,borderColor:ns.castOption(k.bordercolor,l.pts),fontFamily:ns.castOption(E.family,l.pts),fontSize:ns.castOption(E.size,l.pts),fontColor:ns.castOption(E.color,l.pts),nameLength:ns.castOption(k.namelength,l.pts),textAlign:ns.castOption(k.align,l.pts),hovertemplate:ns.castOption(c.hovertemplate,l.pts),hovertemplateLabels:l,eventData:[bD(l,c)]},{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:t,inOut_bbox:T}),l.bbox=T[0],o._hasHoverLabel=!0}o._hasHoverEvent=!0,t.emit("plotly_hover",{points:[bD(l,c)],event:Fp.event})}}),e.on("mouseout",function(l){var u=t._fullLayout,c=t._fullData[o.index],f=Fp.select(this).datum();o._hasHoverEvent&&(l.originalEvent=Fp.event,t.emit("plotly_unhover",{points:[bD(f,c)],event:Fp.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(xD.loneUnhover(u._hoverlayer.node()),o._hasHoverLabel=!1)}),e.on("click",function(l){var u=t._fullLayout,c=t._fullData[o.index];t._dragging||u.hovermode===!1||(t._hoverdata=[bD(l,c)],xD.click(t,Fp.event))})}function e6t(e,t,r){var n=ns.castOption(e.outsidetextfont.color,t.pts)||ns.castOption(e.textfont.color,t.pts)||r.color,i=ns.castOption(e.outsidetextfont.family,t.pts)||ns.castOption(e.textfont.family,t.pts)||r.family,a=ns.castOption(e.outsidetextfont.size,t.pts)||ns.castOption(e.textfont.size,t.pts)||r.size,o=ns.castOption(e.outsidetextfont.weight,t.pts)||ns.castOption(e.textfont.weight,t.pts)||r.weight,s=ns.castOption(e.outsidetextfont.style,t.pts)||ns.castOption(e.textfont.style,t.pts)||r.style,l=ns.castOption(e.outsidetextfont.variant,t.pts)||ns.castOption(e.textfont.variant,t.pts)||r.variant,u=ns.castOption(e.outsidetextfont.textcase,t.pts)||ns.castOption(e.textfont.textcase,t.pts)||r.textcase,c=ns.castOption(e.outsidetextfont.lineposition,t.pts)||ns.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=ns.castOption(e.outsidetextfont.shadow,t.pts)||ns.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n,family:i,size:a,weight:o,style:s,variant:l,textcase:u,lineposition:c,shadow:f}}function Tke(e,t,r){var n=ns.castOption(e.insidetextfont.color,t.pts);!n&&e._input.textfont&&(n=ns.castOption(e._input.textfont.color,t.pts));var i=ns.castOption(e.insidetextfont.family,t.pts)||ns.castOption(e.textfont.family,t.pts)||r.family,a=ns.castOption(e.insidetextfont.size,t.pts)||ns.castOption(e.textfont.size,t.pts)||r.size,o=ns.castOption(e.insidetextfont.weight,t.pts)||ns.castOption(e.textfont.weight,t.pts)||r.weight,s=ns.castOption(e.insidetextfont.style,t.pts)||ns.castOption(e.textfont.style,t.pts)||r.style,l=ns.castOption(e.insidetextfont.variant,t.pts)||ns.castOption(e.textfont.variant,t.pts)||r.variant,u=ns.castOption(e.insidetextfont.textcase,t.pts)||ns.castOption(e.textfont.textcase,t.pts)||r.textcase,c=ns.castOption(e.insidetextfont.lineposition,t.pts)||ns.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=ns.castOption(e.insidetextfont.shadow,t.pts)||ns.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n||_ke.contrast(t.color),family:i,size:a,weight:o,style:s,variant:l,textcase:u,lineposition:c,shadow:f}}function Ake(e,t){for(var r,n,i=0;i=-4;k-=2)p(Math.PI*k,"tan");for(k=4;k>=-4;k-=2)p(Math.PI*(k+1),"tan")}if(f||d){for(k=4;k>=-4;k-=2)p(Math.PI*(k+1.5),"rad");for(k=4;k>=-4;k-=2)p(Math.PI*(k+.5),"rad")}}if(s||v||f){var E=Math.sqrt(e.width*e.width+e.height*e.height);if(b={scale:i*n*2/E,rCenter:1-i,rotate:0},b.textPosAngle=(t.startangle+t.stopangle)/2,b.scale>=1)return b;_.push(b)}(v||d)&&(b=gke(e,n,o,l,u),b.textPosAngle=(t.startangle+t.stopangle)/2,_.push(b)),(v||h)&&(b=mke(e,n,o,l,u),b.textPosAngle=(t.startangle+t.stopangle)/2,_.push(b));for(var T=0,L=0,x=0;x<_.length;x++){var C=_[x].scale;if(L=1)break}return _[T]}function t6t(e,t){var r=e.startangle,n=e.stopangle;return r>t&&t>n||r0?1:-1)/2,y:a/(1+r*r/(n*n)),outside:!0}}function i6t(e){var t=Math.sqrt(e.titleBox.width*e.titleBox.width+e.titleBox.height*e.titleBox.height);return{x:e.cx,y:e.cy,scale:e.trace.hole*e.r*2/t,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}function Cke(e,t){var r=1,n=1,i,a=e.trace,o={x:e.cx,y:e.cy},s={tx:0,ty:0};s.ty+=a.title.font.size,i=Lke(a),a.title.position.indexOf("top")!==-1?(o.y-=(1+i)*e.r,s.ty-=e.titleBox.height):a.title.position.indexOf("bottom")!==-1&&(o.y+=(1+i)*e.r);var l=n6t(e.r,e.trace.aspectratio),u=t.w*(a.domain.x[1]-a.domain.x[0])/2;return a.title.position.indexOf("left")!==-1?(u=u+l,o.x-=(1+i)*l,s.tx+=e.titleBox.width/2):a.title.position.indexOf("center")!==-1?u*=2:a.title.position.indexOf("right")!==-1&&(u=u+l,o.x+=(1+i)*l,s.tx-=e.titleBox.width/2),r=u/e.titleBox.width,n=AW(e,t)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function n6t(e,t){return e/(t===void 0?1:t)}function AW(e,t){var r=e.trace,n=t.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(e.titleBox.height,n/2)}function Lke(e){var t=e.pull;if(!t)return 0;var r;if(rv.isArrayOrTypedArray(t))for(t=0,r=0;rt&&(t=e.pull[r]);return t}function a6t(e,t){var r,n,i,a,o,s,l,u,c,f,h,d,v;function _(E,T){return E.pxmid[1]-T.pxmid[1]}function b(E,T){return T.pxmid[1]-E.pxmid[1]}function p(E,T){T||(T={});var L=T.labelExtraY+(n?T.yLabelMax:T.yLabelMin),x=n?E.yLabelMin:E.yLabelMax,C=n?E.yLabelMax:E.yLabelMin,M=E.cyFinal+o(E.px0[1],E.px1[1]),g=L-x,P,A,z,O,U,G;if(g*l>0&&(E.labelExtraY=g),!!rv.isArrayOrTypedArray(t.pull))for(A=0;A=(ns.castOption(t.pull,z.pts)||0))&&((E.pxmid[1]-z.pxmid[1])*l>0?(O=z.cyFinal+o(z.px0[1],z.px1[1]),g=O-x-E.labelExtraY,g*l>0&&(E.labelExtraY+=g)):(C+E.labelExtraY-M)*l>0&&(P=3*s*Math.abs(A-f.indexOf(E)),U=z.cxFinal+a(z.px0[0],z.px1[0]),G=U+P-(E.cxFinal+E.pxmid[0])-E.labelExtraX,G*s>0&&(E.labelExtraX+=G)))}for(n=0;n<2;n++)for(i=n?_:b,o=n?Math.max:Math.min,l=n?1:-1,r=0;r<2;r++){for(a=r?Math.max:Math.min,s=r?1:-1,u=e[n][r],u.sort(i),c=e[1-n][r],f=c.concat(u),d=[],h=0;h1?(u=r.r,c=u/i.aspectratio):(c=r.r,u=c*i.aspectratio),u*=(1+i.baseratio)/2,l=u*c}o=Math.min(o,l/r.vTotal)}for(n=0;nt.vTotal/2?1:0,u.halfangle=Math.PI*Math.min(u.v/t.vTotal,.5),u.ring=1-n.hole,u.rInscribed=r6t(u,t))}function wD(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}function Ike(e,t,r){var n=e._fullLayout,i=r.trace,a=i.texttemplate,o=i.textinfo;if(!a&&o&&o!=="none"){var s=o.split("+"),l=function(T){return s.indexOf(T)!==-1},u=l("label"),c=l("text"),f=l("value"),h=l("percent"),d=n.separators,v;if(v=u?[t.label]:[],c){var _=ns.getFirstFilled(i.text,t.pts);pke(_)&&v.push(_)}f&&v.push(ns.formatPieValue(t.v,d)),h&&v.push(ns.formatPiePercent(t.v/r.vTotal,d)),t.text=v.join("
")}function b(T){return{label:T.label,value:T.v,valueLabel:ns.formatPieValue(T.v,n.separators),percent:T.v/r.vTotal,percentLabel:ns.formatPiePercent(T.v/r.vTotal,n.separators),color:T.color,text:T.text,customdata:rv.castOption(i,T.i,"customdata")}}if(a){var p=rv.castOption(i,t.i,"texttemplate");if(!p)t.text="";else{var k=b(t),E=ns.getFirstFilled(i.text,t.pts);(pke(E)||E==="")&&(k.text=E),t.text=rv.texttemplateString({data:[k,i._meta],fallback:i.texttemplatefallback,labels:k,locale:e._fullLayout._d3locale,template:p})}}}function Rke(e,t){var r=e.rotate*Math.PI/180,n=Math.cos(r),i=Math.sin(r),a=(t.left+t.right)/2,o=(t.top+t.bottom)/2;e.textX=a*n-o*i,e.textY=a*i+o*n,e.noCenter=!0}Dke.exports={plot:$Ct,formatSliceLabel:Ike,transformInsideText:Ske,determineInsideTextFont:Tke,positionTitleOutside:Cke,prerenderTitles:Ake,layoutAreas:Pke,attachFxHandlers:wke,computeTransform:Rke}});var Oke=ye((lvr,zke)=>{"use strict";var Fke=Oa(),l6t=X3(),u6t=bv().resizeText;zke.exports=function(t){var r=t._fullLayout._pielayer.selectAll(".trace");u6t(t,r,"pie"),r.each(function(n){var i=n[0],a=i.trace,o=Fke.select(this);o.style({opacity:a.opacity}),o.selectAll("path.surface").each(function(s){Fke.select(this).call(l6t,s,a,t)})})}});var Bke=ye(kA=>{"use strict";var qke=Mc();kA.name="pie";kA.plot=function(e,t,r,n){qke.plotBasePlot(kA.name,e,t,r,n)};kA.clean=function(e,t,r,n){qke.cleanBasePlot(kA.name,e,t,r,n)}});var Uke=ye((cvr,Nke)=>{"use strict";Nke.exports={attributes:F2(),supplyDefaults:z2().supplyDefaults,supplyLayoutDefaults:lke(),layoutAttributes:_D(),calc:EA().calc,crossTraceCalc:EA().crossTraceCalc,plot:TD().plot,style:Oke(),styleOne:X3(),moduleType:"trace",name:"pie",basePlotModule:Bke(),categories:["pie-like","pie","showLegend"],meta:{}}});var Gke=ye((fvr,Vke)=>{"use strict";Vke.exports=Uke()});var jke=ye(CA=>{"use strict";var Hke=Mc();CA.name="sunburst";CA.plot=function(e,t,r,n){Hke.plotBasePlot(CA.name,e,t,r,n)};CA.clean=function(e,t,r,n){Hke.cleanBasePlot(CA.name,e,t,r,n)}});var SW=ye((dvr,Wke)=>{"use strict";Wke.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}});var qE=ye((vvr,Yke)=>{"use strict";var c6t=Gl(),{hovertemplateAttrs:f6t,texttemplateAttrs:h6t,templatefallbackAttrs:Xke}=Ll(),d6t=Tu(),v6t=Cc().attributes,e1=F2(),Zke=SW(),OE=Ao().extendFlat,p6t=Pd().pattern;Yke.exports={labels:{valType:"data_array",editType:"calc"},parents:{valType:"data_array",editType:"calc"},values:{valType:"data_array",editType:"calc"},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc"},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc"},level:{valType:"any",editType:"plot",anim:!0},maxdepth:{valType:"integer",editType:"plot",dflt:-1},marker:OE({colors:{valType:"data_array",editType:"calc"},line:{color:OE({},e1.marker.line.color,{dflt:null}),width:OE({},e1.marker.line.width,{dflt:1}),editType:"calc"},pattern:p6t,editType:"calc"},d6t("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:e1.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:h6t({editType:"plot"},{keys:Zke.eventDataKeys.concat(["label","value"])}),texttemplatefallback:Xke({editType:"plot"}),hovertext:e1.hovertext,hoverinfo:OE({},c6t.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:f6t({},{keys:Zke.eventDataKeys}),hovertemplatefallback:Xke(),textfont:e1.textfont,insidetextorientation:e1.insidetextorientation,insidetextfont:e1.insidetextfont,outsidetextfont:OE({},e1.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:e1.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:v6t({name:"sunburst",trace:!0,editType:"calc"})}});var MW=ye((pvr,Kke)=>{"use strict";Kke.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var eCe=ye((gvr,Qke)=>{"use strict";var Jke=Dr(),g6t=qE(),m6t=Cc().defaults,y6t=i0().handleText,_6t=z2().handleMarkerDefaults,$ke=tc(),x6t=$ke.hasColorscale,b6t=$ke.handleDefaults;Qke.exports=function(t,r,n,i){function a(h,d){return Jke.coerce(t,r,g6t,h,d)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=a("values");l&&l.length?a("branchvalues"):a("count"),a("level"),a("maxdepth"),_6t(t,r,i,a);var u=r._hasColorscale=x6t(t,"marker","colors")||(t.marker||{}).coloraxis;u&&b6t(t,r,i,a,{prefix:"marker.",cLetter:"c"}),a("leaf.opacity",u?1:.7);var c=a("text");a("texttemplate"),a("texttemplatefallback"),r.texttemplate||a("textinfo",Jke.isArrayOrTypedArray(c)?"text+label":"label"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var f="auto";y6t(t,r,i,a,f,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("insidetextorientation"),a("sort"),a("rotation"),a("root.color"),m6t(r,i,a),r._length=null}});var rCe=ye((mvr,tCe)=>{"use strict";var w6t=Dr(),T6t=MW();tCe.exports=function(t,r){function n(i,a){return w6t.coerce(t,r,T6t,i,a)}n("sunburstcolorway",r.colorway),n("extendsunburstcolors")}});var BE=ye((AD,iCe)=>{(function(e,t){typeof AD=="object"&&typeof iCe!="undefined"?t(AD):(e=e||self,t(e.d3=e.d3||{}))})(AD,function(e){"use strict";function t(We,tt){return We.parent===tt.parent?1:2}function r(We){return We.reduce(n,0)/We.length}function n(We,tt){return We+tt.x}function i(We){return 1+We.reduce(a,0)}function a(We,tt){return Math.max(We,tt.y)}function o(We){for(var tt;tt=We.children;)We=tt[0];return We}function s(We){for(var tt;tt=We.children;)We=tt[tt.length-1];return We}function l(){var We=t,tt=1,xt=1,Ie=!1;function xe(ke){var vt,ir=0;ke.eachAfter(function($r){var di=$r.children;di?($r.x=r(di),$r.y=i(di)):($r.x=vt?ir+=We($r,vt):0,$r.y=0,vt=$r)});var ar=o(ke),vr=s(ke),ii=ar.x-We(ar,vr)/2,pi=vr.x+We(vr,ar)/2;return ke.eachAfter(Ie?function($r){$r.x=($r.x-ke.x)*tt,$r.y=(ke.y-$r.y)*xt}:function($r){$r.x=($r.x-ii)/(pi-ii)*tt,$r.y=(1-(ke.y?$r.y/ke.y:1))*xt})}return xe.separation=function(ke){return arguments.length?(We=ke,xe):We},xe.size=function(ke){return arguments.length?(Ie=!1,tt=+ke[0],xt=+ke[1],xe):Ie?null:[tt,xt]},xe.nodeSize=function(ke){return arguments.length?(Ie=!0,tt=+ke[0],xt=+ke[1],xe):Ie?[tt,xt]:null},xe}function u(We){var tt=0,xt=We.children,Ie=xt&&xt.length;if(!Ie)tt=1;else for(;--Ie>=0;)tt+=xt[Ie].value;We.value=tt}function c(){return this.eachAfter(u)}function f(We){var tt=this,xt,Ie=[tt],xe,ke,vt;do for(xt=Ie.reverse(),Ie=[];tt=xt.pop();)if(We(tt),xe=tt.children,xe)for(ke=0,vt=xe.length;ke=0;--xe)xt.push(Ie[xe]);return this}function d(We){for(var tt=this,xt=[tt],Ie=[],xe,ke,vt;tt=xt.pop();)if(Ie.push(tt),xe=tt.children,xe)for(ke=0,vt=xe.length;ke=0;)xt+=Ie[xe].value;tt.value=xt})}function _(We){return this.eachBefore(function(tt){tt.children&&tt.children.sort(We)})}function b(We){for(var tt=this,xt=p(tt,We),Ie=[tt];tt!==xt;)tt=tt.parent,Ie.push(tt);for(var xe=Ie.length;We!==xt;)Ie.splice(xe,0,We),We=We.parent;return Ie}function p(We,tt){if(We===tt)return We;var xt=We.ancestors(),Ie=tt.ancestors(),xe=null;for(We=xt.pop(),tt=Ie.pop();We===tt;)xe=We,We=xt.pop(),tt=Ie.pop();return xe}function k(){for(var We=this,tt=[We];We=We.parent;)tt.push(We);return tt}function E(){var We=[];return this.each(function(tt){We.push(tt)}),We}function T(){var We=[];return this.eachBefore(function(tt){tt.children||We.push(tt)}),We}function L(){var We=this,tt=[];return We.each(function(xt){xt!==We&&tt.push({source:xt.parent,target:xt})}),tt}function x(We,tt){var xt=new A(We),Ie=+We.value&&(xt.value=We.value),xe,ke=[xt],vt,ir,ar,vr;for(tt==null&&(tt=M);xe=ke.pop();)if(Ie&&(xe.value=+xe.data.value),(ir=tt(xe.data))&&(vr=ir.length))for(xe.children=new Array(vr),ar=vr-1;ar>=0;--ar)ke.push(vt=xe.children[ar]=new A(ir[ar])),vt.parent=xe,vt.depth=xe.depth+1;return xt.eachBefore(P)}function C(){return x(this).eachBefore(g)}function M(We){return We.children}function g(We){We.data=We.data.data}function P(We){var tt=0;do We.height=tt;while((We=We.parent)&&We.height<++tt)}function A(We){this.data=We,this.depth=this.height=0,this.parent=null}A.prototype=x.prototype={constructor:A,count:c,each:f,eachAfter:d,eachBefore:h,sum:v,sort:_,path:b,ancestors:k,descendants:E,leaves:T,links:L,copy:C};var z=Array.prototype.slice;function O(We){for(var tt=We.length,xt,Ie;tt;)Ie=Math.random()*tt--|0,xt=We[tt],We[tt]=We[Ie],We[Ie]=xt;return We}function U(We){for(var tt=0,xt=(We=O(z.call(We))).length,Ie=[],xe,ke;tt0&&xt*xt>Ie*Ie+xe*xe}function N(We,tt){for(var xt=0;xtar?(xe=(vr+ar-ke)/(2*vr),ir=Math.sqrt(Math.max(0,ar/vr-xe*xe)),xt.x=We.x-xe*Ie-ir*vt,xt.y=We.y-xe*vt+ir*Ie):(xe=(vr+ke-ar)/(2*vr),ir=Math.sqrt(Math.max(0,ke/vr-xe*xe)),xt.x=tt.x+xe*Ie-ir*vt,xt.y=tt.y+xe*vt+ir*Ie)):(xt.x=tt.x+xt.r,xt.y=tt.y)}function Le(We,tt){var xt=We.r+tt.r-1e-6,Ie=tt.x-We.x,xe=tt.y-We.y;return xt>0&&xt*xt>Ie*Ie+xe*xe}function ge(We){var tt=We._,xt=We.next._,Ie=tt.r+xt.r,xe=(tt.x*xt.r+xt.x*tt.r)/Ie,ke=(tt.y*xt.r+xt.y*tt.r)/Ie;return xe*xe+ke*ke}function ie(We){this._=We,this.next=null,this.previous=null}function Se(We){if(!(xe=We.length))return 0;var tt,xt,Ie,xe,ke,vt,ir,ar,vr,ii,pi;if(tt=We[0],tt.x=0,tt.y=0,!(xe>1))return tt.r;if(xt=We[1],tt.x=-xt.r,xt.x=tt.r,xt.y=0,!(xe>2))return tt.r+xt.r;Ce(xt,tt,Ie=We[2]),tt=new ie(tt),xt=new ie(xt),Ie=new ie(Ie),tt.next=Ie.previous=xt,xt.next=tt.previous=Ie,Ie.next=xt.previous=tt;e:for(ir=3;ir0)throw new Error("cycle");return ir}return xt.id=function(Ie){return arguments.length?(We=Be(Ie),xt):We},xt.parentId=function(Ie){return arguments.length?(tt=Be(Ie),xt):tt},xt}function $e(We,tt){return We.parent===tt.parent?1:2}function St(We){var tt=We.children;return tt?tt[0]:We.t}function Qt(We){var tt=We.children;return tt?tt[tt.length-1]:We.t}function Gt(We,tt,xt){var Ie=xt/(tt.i-We.i);tt.c-=Ie,tt.s+=xt,We.c+=Ie,tt.z+=xt,tt.m+=xt}function _t(We){for(var tt=0,xt=0,Ie=We.children,xe=Ie.length,ke;--xe>=0;)ke=Ie[xe],ke.z+=tt,ke.m+=tt,tt+=ke.s+(xt+=ke.c)}function It(We,tt,xt){return We.a.parent===tt.parent?We.a:xt}function mt(We,tt){this._=We,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=tt}mt.prototype=Object.create(A.prototype);function er(We){for(var tt=new mt(We,0),xt,Ie=[tt],xe,ke,vt,ir;xt=Ie.pop();)if(ke=xt._.children)for(xt.children=new Array(ir=ke.length),vt=ir-1;vt>=0;--vt)Ie.push(xe=xt.children[vt]=new mt(ke[vt],vt)),xe.parent=xt;return(tt.parent=new mt(null,0)).children=[tt],tt}function lr(){var We=$e,tt=1,xt=1,Ie=null;function xe(vr){var ii=er(vr);if(ii.eachAfter(ke),ii.parent.m=-ii.z,ii.eachBefore(vt),Ie)vr.eachBefore(ar);else{var pi=vr,$r=vr,di=vr;vr.eachBefore(function(qn){qn.x$r.x&&($r=qn),qn.depth>di.depth&&(di=qn)});var ji=pi===$r?1:We(pi,$r)/2,In=ji-pi.x,wi=tt/($r.x+ji+In),On=xt/(di.depth||1);vr.eachBefore(function(qn){qn.x=(qn.x+In)*wi,qn.y=qn.depth*On})}return vr}function ke(vr){var ii=vr.children,pi=vr.parent.children,$r=vr.i?pi[vr.i-1]:null;if(ii){_t(vr);var di=(ii[0].z+ii[ii.length-1].z)/2;$r?(vr.z=$r.z+We(vr._,$r._),vr.m=vr.z-di):vr.z=di}else $r&&(vr.z=$r.z+We(vr._,$r._));vr.parent.A=ir(vr,$r,vr.parent.A||pi[0])}function vt(vr){vr._.x=vr.z+vr.parent.m,vr.m+=vr.parent.m}function ir(vr,ii,pi){if(ii){for(var $r=vr,di=vr,ji=ii,In=$r.parent.children[0],wi=$r.m,On=di.m,qn=ji.m,Fn=In.m,ra;ji=Qt(ji),$r=St($r),ji&&$r;)In=St(In),di=Qt(di),di.a=vr,ra=ji.z+qn-$r.z-wi+We(ji._,$r._),ra>0&&(Gt(It(ji,vr,pi),vr,ra),wi+=ra,On+=ra),qn+=ji.m,wi+=$r.m,Fn+=In.m,On+=di.m;ji&&!Qt(di)&&(di.t=ji,di.m+=qn-On),$r&&!St(In)&&(In.t=$r,In.m+=wi-Fn,pi=vr)}return pi}function ar(vr){vr.x*=tt,vr.y=vr.depth*xt}return xe.separation=function(vr){return arguments.length?(We=vr,xe):We},xe.size=function(vr){return arguments.length?(Ie=!1,tt=+vr[0],xt=+vr[1],xe):Ie?null:[tt,xt]},xe.nodeSize=function(vr){return arguments.length?(Ie=!0,tt=+vr[0],xt=+vr[1],xe):Ie?[tt,xt]:null},xe}function wr(We,tt,xt,Ie,xe){for(var ke=We.children,vt,ir=-1,ar=ke.length,vr=We.value&&(xe-xt)/We.value;++irqn&&(qn=vr),Ut=wi*wi*la,Fn=Math.max(qn/Ut,Ut/On),Fn>ra){wi-=vr;break}ra=Fn}vt.push(ar={value:wi,dice:di1?Ie:1)},xt}(Lr);function Vr(){var We=Br,tt=!1,xt=1,Ie=1,xe=[0],ke=Pe,vt=Pe,ir=Pe,ar=Pe,vr=Pe;function ii($r){return $r.x0=$r.y0=0,$r.x1=xt,$r.y1=Ie,$r.eachBefore(pi),xe=[0],tt&&$r.eachBefore(Vt),$r}function pi($r){var di=xe[$r.depth],ji=$r.x0+di,In=$r.y0+di,wi=$r.x1-di,On=$r.y1-di;wi=$r-1){var qn=ke[pi];qn.x0=ji,qn.y0=In,qn.x1=wi,qn.y1=On;return}for(var Fn=vr[pi],ra=di/2+Fn,la=pi+1,Ut=$r-1;la>>1;vr[wt]On-In){var Er=(ji*nr+wi*rr)/di;ii(pi,la,rr,ji,In,Er,On),ii(la,$r,nr,Er,In,wi,On)}else{var Xr=(In*nr+On*rr)/di;ii(pi,la,rr,ji,In,wi,Xr),ii(la,$r,nr,ji,Xr,wi,On)}}}function Ge(We,tt,xt,Ie,xe){(We.depth&1?wr:ot)(We,tt,xt,Ie,xe)}var Je=function We(tt){function xt(Ie,xe,ke,vt,ir){if((ar=Ie._squarify)&&ar.ratio===tt)for(var ar,vr,ii,pi,$r=-1,di,ji=ar.length,In=Ie.value;++$r1?Ie:1)},xt}(Lr);e.cluster=l,e.hierarchy=x,e.pack=ce,e.packEnclose=U,e.packSiblings=Ee,e.partition=ut,e.stratify=fr,e.tree=lr,e.treemap=Vr,e.treemapBinary=dt,e.treemapDice=ot,e.treemapResquarify=Je,e.treemapSlice=wr,e.treemapSliceDice=Ge,e.treemapSquarify=Br,Object.defineProperty(e,"__esModule",{value:!0})})});var UE=ye(NE=>{"use strict";var nCe=BE(),A6t=Eo(),LA=Dr(),S6t=tc().makeColorScaleFuncFromTrace,M6t=EA().makePullColorFn,E6t=EA().generateExtendedColors,k6t=tc().calc,C6t=fs().ALMOST_EQUAL,L6t={},P6t={},I6t={};NE.calc=function(e,t){var r=e._fullLayout,n=t.ids,i=LA.isArrayOrTypedArray(n),a=t.labels,o=t.parents,s=t.values,l=LA.isArrayOrTypedArray(s),u=[],c={},f={},h=function(j,N){c[j]?c[j].push(N):c[j]=[N],f[N]=1},d=function(j){return j||typeof j=="number"},v=function(j){return!l||A6t(s[j])&&s[j]>=0},_,b,p;i?(_=Math.min(n.length,o.length),b=function(j){return d(n[j])&&v(j)},p=function(j){return String(n[j])}):(_=Math.min(a.length,o.length),b=function(j){return d(a[j])&&v(j)},p=function(j){return String(a[j])}),l&&(_=Math.min(_,s.length));for(var k=0;k<_;k++)if(b(k)){var E=p(k),T=d(o[k])?String(o[k]):"",L={i:k,id:E,pid:T,label:d(a[k])?String(a[k]):""};l&&(L.v=+s[k]),u.push(L),h(T,E)}if(c[""]){if(c[""].length>1){for(var M=LA.randstr(),g=0;g{"use strict";var Gkt=rc().str2arr,Hkt=rc().sliceEq,gEe=rc().readUInt32BE,jkt=Gkt("8BPS\0");mEe.exports=function(e){if(!(e.length<22)&&Hkt(e,0,jkt))return{width:gEe(e,18),height:gEe(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}});var bEe=ye((Ydr,xEe)=>{"use strict";function Wkt(e){return e===32||e===9||e===13||e===10}function EA(e){return typeof e=="number"&&isFinite(e)&&e>0}function Xkt(e){var t=0,r=e.length;for(e[0]===239&&e[1]===187&&e[2]===191&&(t=3);t]*>/,Ykt=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,Kkt=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,Jkt=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,$kt=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,_Ee=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function Qkt(e){var t=e.match(Kkt),r=e.match(Jkt),n=e.match($kt);return{width:t&&(t[1]||t[2]),height:r&&(r[1]||r[2]),viewbox:n&&(n[1]||n[2])}}function Xm(e){return _Ee.test(e)?e.match(_Ee)[0]:"px"}xEe.exports=function(e){if(Xkt(e)){for(var t="",r=0;r{"use strict";var AEe=rc().str2arr,wEe=rc().sliceEq,eCt=rc().readUInt16LE,tCt=rc().readUInt16BE,rCt=rc().readUInt32LE,iCt=rc().readUInt32BE,nCt=AEe("II*\0"),aCt=AEe("MM\0*");function pD(e,t,r){return r?tCt(e,t):eCt(e,t)}function mW(e,t,r){return r?iCt(e,t):rCt(e,t)}function TEe(e,t,r){var n=pD(e,t+2,r),i=mW(e,t+4,r);return i!==1||n!==3&&n!==4?null:n===3?pD(e,t+8,r):mW(e,t+8,r)}SEe.exports=function(e){if(!(e.length<8)&&!(!wEe(e,0,nCt)&&!wEe(e,0,aCt))){var t=e[0]===77,r=mW(e,4,t)-8;if(!(r<0)){var n=r+8;if(!(e.length-n<2)){var i=pD(e,n+0,t)*12;if(!(i<=0)&&(n+=2,!(e.length-n{"use strict";var CEe=rc().str2arr,EEe=rc().sliceEq,kEe=rc().readUInt16LE,yW=rc().readUInt32LE,oCt=dD(),sCt=CEe("RIFF"),lCt=CEe("WEBP");function uCt(e,t){if(!(e[t+3]!==157||e[t+4]!==1||e[t+5]!==42))return{width:kEe(e,t+6)&16383,height:kEe(e,t+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function cCt(e,t){if(e[t]===47){var r=yW(e,t+1);return{width:(r&16383)+1,height:(r>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function fCt(e,t){return{width:(e[t+6]<<16|e[t+5]<<8|e[t+4])+1,height:(e[t+9]<e.length)){for(;t+8=10?r=r||uCt(e,t+8):a==="VP8L"&&o>=9?r=r||cCt(e,t+8):a==="VP8X"&&o>=10?r=r||fCt(e,t+8):a==="EXIF"&&(n=oCt.get_orientation(e.slice(t+8,t+8+o)),t=1/0),t+=8+o}if(r)return n>0&&(r.orientation=n),r}}}});var REe=ye(($dr,IEe)=>{"use strict";IEe.exports={avif:J4e(),bmp:eEe(),gif:aEe(),ico:lEe(),jpeg:cEe(),png:pEe(),psd:yEe(),svg:bEe(),tiff:MEe(),webp:PEe()}});var DEe=ye((Qdr,xW)=>{"use strict";var _W=REe();function hCt(e){for(var t=Object.keys(_W),r=0;r{"use strict";var dCt=DEe(),vCt=qy().IMAGE_URL_PREFIX,pCt=_2().Buffer;FEe.getImageSize=function(e){var t=e.replace(vCt,""),r=new pCt(t,"base64");return dCt(r)}});var BEe=ye((tvr,OEe)=>{"use strict";var qEe=Pr(),gCt=eA(),mCt=Eo(),gD=ho(),yCt=Pr().maxRowLength,_Ct=zEe().getImageSize;OEe.exports=function(t,r){var n,i;if(r._hasZ)n=r.z.length,i=yCt(r.z);else if(r._hasSource){var a=_Ct(r.source);n=a.height,i=a.width}var o=gD.getFromId(t,r.xaxis||"x"),s=gD.getFromId(t,r.yaxis||"y"),l=o.d2c(r.x0)-r.dx/2,u=s.d2c(r.y0)-r.dy/2,c,f=[l,l+i*r.dx],h=[u,u+n*r.dy];if(o&&o.type==="log")for(c=0;c{"use strict";var TCt=qa(),R2=Pr(),NEe=R2.strTranslate,ACt=Wp(),SCt=eA(),MCt=oG(),ECt=g8().STYLE;UEe.exports=function(t,r,n,i){var a=r.xaxis,o=r.yaxis,s=!t._context._exportedPlot&&MCt();R2.makeTraceGroups(i,n,"im").each(function(l){var u=TCt.select(this),c=l[0],f=c.trace,h=(f.zsmooth==="fast"||f.zsmooth===!1&&s)&&!f._hasZ&&f._hasSource&&a.type==="linear"&&o.type==="linear";f._realImage=h;var d=c.z,v=c.x0,m=c.y0,b=c.w,p=c.h,k=f.dx,M=f.dy,T,L,x,C,S,g;for(g=0;T===void 0&&g0;)L=a.c2p(v+g*k),g--;for(g=0;C===void 0&&g0;)S=o.c2p(m+g*M),g--;if(LH[0];if(re||oe){var _e=T+E/2,ke=C+z/2;j+="transform:"+NEe(_e+"px",ke+"px")+"scale("+(re?-1:1)+","+(oe?-1:1)+")"+NEe(-_e+"px",-ke+"px")+";"}}Z.attr("style",j);var Ce=new Promise(function(ge){if(f._hasZ)ge();else if(f._hasSource)if(f._canvas&&f._canvas.el.width===b&&f._canvas.el.height===p&&f._canvas.source===f.source)ge();else{var ie=document.createElement("canvas");ie.width=b,ie.height=p;var Se=ie.getContext("2d",{willReadFrequently:!0});f._image=f._image||new Image;var Ee=f._image;Ee.onload=function(){Se.drawImage(Ee,0,0),f._canvas={el:ie,source:f.source},ge()},Ee.setAttribute("src",f.source)}}).then(function(){var ge,ie;if(f._hasZ)ie=G(function(we,De){var Le=d[De][we];return R2.isTypedArray(Le)&&(Le=Array.from(Le)),Le}),ge=ie.toDataURL("image/png");else if(f._hasSource)if(h)ge=f.source;else{var Se=f._canvas.el.getContext("2d",{willReadFrequently:!0}),Ee=Se.getImageData(0,0,b,p).data;ie=G(function(we,De){var Le=4*(De*b+we);return[Ee[Le],Ee[Le+1],Ee[Le+2],Ee[Le+3]]}),ge=ie.toDataURL("image/png")}Z.attr({"xlink:href":ge,height:z,width:E,x:T,y:C})});t._promises.push(Ce)})}});var HEe=ye((ivr,GEe)=>{"use strict";var kCt=qa();GEe.exports=function(t){kCt.select(t).selectAll(".im image").style("opacity",function(r){return r[0].trace.opacity})}});var ZEe=ye((nvr,XEe)=>{"use strict";var jEe=vf(),WEe=Pr(),mD=WEe.isArrayOrTypedArray,CCt=eA();XEe.exports=function(t,r,n){var i=t.cd[0],a=i.trace,o=t.xa,s=t.ya;if(!(jEe.inbox(r-i.x0,r-(i.x0+i.w*a.dx),0)>0||jEe.inbox(n-i.y0,n-(i.y0+i.h*a.dy),0)>0)){var l=Math.floor((r-i.x0)/a.dx),u=Math.floor(Math.abs(n-i.y0)/a.dy),c;if(a._hasZ?c=i.z[u][l]:a._hasSource&&(c=a._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(l,u,1,1).data),!!c){var f=i.hi||a.hoverinfo,h;if(f){var d=f.split("+");d.indexOf("all")!==-1&&(d=["color"]),d.indexOf("color")!==-1&&(h=!0)}var v=CCt.colormodel[a.colormodel],m=v.colormodel||a.colormodel,b=m.length,p=a._scaler(c),k=v.suffix,M=[];(a.hovertemplate||h)&&(M.push("["+[p[0]+k[0],p[1]+k[1],p[2]+k[2]].join(", ")),b===4&&M.push(", "+p[3]+k[3]),M.push("]"),M=M.join(""),t.extraText=m.toUpperCase()+": "+M);var T;mD(a.hovertext)&&mD(a.hovertext[u])?T=a.hovertext[u][l]:mD(a.text)&&mD(a.text[u])&&(T=a.text[u][l]);var L=s.c2p(i.y0+(u+.5)*a.dy),x=i.x0+(l+.5)*a.dx,C=i.y0+(u+.5)*a.dy,S="["+c.slice(0,a.colormodel.length).join(", ")+"]";return[WEe.extendFlat(t,{index:[u,l],x0:o.c2p(i.x0+l*a.dx),x1:o.c2p(i.x0+(l+1)*a.dx),y0:L,y1:L,color:p,xVal:x,xLabelVal:x,yVal:C,yLabelVal:C,zLabelVal:S,text:T,hovertemplateLabels:{zLabel:S,colorLabel:M,"color[0]Label":p[0]+k[0],"color[1]Label":p[1]+k[1],"color[2]Label":p[2]+k[2],"color[3]Label":p[3]+k[3]}})]}}}});var KEe=ye((avr,YEe)=>{"use strict";YEe.exports=function(t,r){return"xVal"in r&&(t.x=r.xVal),"yVal"in r&&(t.y=r.yVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t.color=r.color,t.colormodel=r.trace.colormodel,t.z||(t.z=r.color),t}});var $Ee=ye((ovr,JEe)=>{"use strict";JEe.exports={attributes:gH(),supplyDefaults:Z3e(),calc:BEe(),plot:VEe(),style:HEe(),hoverPoints:ZEe(),eventData:KEe(),moduleType:"trace",name:"image",basePlotModule:mh(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}});var eke=ye((svr,QEe)=>{"use strict";QEe.exports=$Ee()});var F2=ye((lvr,rke)=>{"use strict";var bW=Gl(),LCt=Cc().attributes,PCt=ec(),ICt=Ih(),{hovertemplateAttrs:RCt,texttemplateAttrs:DCt,templatefallbackAttrs:tke}=Ll(),D2=Ao().extendFlat,FCt=Pd().pattern,yD=PCt({editType:"plot",arrayOk:!0,colorEditType:"plot"});rke.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:ICt.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:FCt,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:D2({},bW.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:RCt({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:tke(),texttemplate:DCt({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:tke({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:D2({},yD,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:D2({},yD,{}),outsidetextfont:D2({},yD,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:D2({},bW.showlegend,{arrayOk:!0}),legend:D2({},bW.legend,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:D2({},yD,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:LCt({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"}}});var z2=ye((uvr,ake)=>{"use strict";var zCt=Eo(),zE=Pr(),qCt=F2(),OCt=Cc().defaults,BCt=i0().handleText,NCt=Pr().coercePattern;function ike(e,t){var r=zE.isArrayOrTypedArray(e),n=zE.isArrayOrTypedArray(t),i=Math.min(r?e.length:1/0,n?t.length:1/0);if(isFinite(i)||(i=0),i&&n){for(var a,o=0;o0){a=!0;break}}a||(i=0)}return{hasLabels:r,hasValues:n,len:i}}function nke(e,t,r,n,i){var a=n("marker.line.width");a&&n("marker.line.color",i?void 0:r.paper_bgcolor);var o=n("marker.colors");NCt(n,"marker.pattern",o),e.marker&&!t.marker.pattern.fgcolor&&(t.marker.pattern.fgcolor=e.marker.colors),t.marker.pattern.bgcolor||(t.marker.pattern.bgcolor=r.paper_bgcolor)}function UCt(e,t,r,n){function i(k,M){return zE.coerce(e,t,qCt,k,M)}var a=i("labels"),o=i("values"),s=ike(a,o),l=s.len;if(t._hasLabels=s.hasLabels,t._hasValues=s.hasValues,!t._hasLabels&&t._hasValues&&(i("label0"),i("dlabel")),!l){t.visible=!1;return}t._length=l,nke(e,t,n,i,!0),i("scalegroup");var u=i("text"),c=i("texttemplate");i("texttemplatefallback");var f;if(c||(f=i("textinfo",zE.isArrayOrTypedArray(u)?"text+percent":"percent")),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),c||f&&f!=="none"){var h=i("textposition");BCt(e,t,n,i,h,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var d=Array.isArray(h)||h==="auto",v=d||h==="outside";v&&i("automargin"),(h==="inside"||h==="auto"||Array.isArray(h))&&i("insidetextorientation")}else f==="none"&&i("textposition","none");OCt(t,n,i);var m=i("hole"),b=i("title.text");if(b){var p=i("title.position",m?"middle center":"top center");!m&&p==="middle center"&&(t.title.position="top center"),zE.coerceFont(i,"title.font",n.font)}i("sort"),i("direction"),i("rotation"),i("pull")}ake.exports={handleLabelsAndValues:ike,handleMarkerDefaults:nke,supplyDefaults:UCt}});var _D=ye((cvr,oke)=>{"use strict";oke.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var lke=ye((fvr,ske)=>{"use strict";var VCt=Pr(),GCt=_D();ske.exports=function(t,r){function n(i,a){return VCt.coerce(t,r,GCt,i,a)}n("hiddenlabels"),n("piecolorway",r.colorway),n("extendpiecolors")}});var kA=ye((hvr,fke)=>{"use strict";var HCt=Eo(),wW=fd(),jCt=ka(),WCt={};function XCt(e,t){var r=[],n=e._fullLayout,i=n.hiddenlabels||[],a=t.labels,o=t.marker.colors||[],s=t.values,l=t._length,u=t._hasValues&&l,c,f;if(t.dlabel)for(a=new Array(l),c=0;c=0});var T=t.type==="funnelarea"?m:t.sort;return T&&r.sort(function(L,x){return x.v-L.v}),r[0]&&(r[0].vTotal=v),r}function uke(e){return function(r,n){return!r||(r=wW(r),!r.isValid())?!1:(r=jCt.addOpacity(r,r.getAlpha()),e[n]||(e[n]=r),r)}}function ZCt(e,t){var r=(t||{}).type;r||(r="pie");var n=e._fullLayout,i=e.calcdata,a=n[r+"colorway"],o=n["_"+r+"colormap"];n["extend"+r+"colors"]&&(a=cke(a,WCt));for(var s=0,l=0;l{"use strict";var YCt=ip().appendArrayMultiPointValues;hke.exports=function(t,r){var n={curveNumber:r.index,pointNumbers:t.pts,data:r._input,fullData:r,label:t.label,color:t.color,value:t.v,percent:t.percent,text:t.text,bbox:t.bbox,v:t.v};return t.pts.length===1&&(n.pointNumber=n.i=t.pts[0]),YCt(n,r,t.pts),r.type==="funnelarea"&&(delete n.v,delete n.i),n}});var TD=ye((vvr,Dke)=>{"use strict";var Fp=qa(),KCt=Mc(),xD=vf(),_ke=ka(),Qy=So(),rv=Pr(),JCt=rv.strScale,vke=rv.strTranslate,TW=Zl(),xke=bv(),$Ct=xke.recordMinTextSize,QCt=xke.clearMinTextSize,bke=A_().TEXTPAD,ns=g_(),bD=dke(),pke=Pr().isValidTextValue;function e6t(e,t){var r=e._context.staticPlot,n=e._fullLayout,i=n._size;QCt("pie",n),Ake(t,e),Pke(t,i);var a=rv.makeTraceGroups(n._pielayer,t,"trace").each(function(o){var s=Fp.select(this),l=o[0],u=l.trace;u6t(o),s.attr("stroke-linejoin","round"),s.each(function(){var c=Fp.select(this).selectAll("g.slice").data(o);c.enter().append("g").classed("slice",!0),c.exit().remove();var f=[[[],[]],[[],[]]],h=!1;c.each(function(T,L){if(T.hidden){Fp.select(this).selectAll("path,g").remove();return}T.pointNumber=T.i,T.curveNumber=u.index,f[T.pxmid[1]<0?0:1][T.pxmid[0]<0?0:1].push(T);var x=l.cx,C=l.cy,S=Fp.select(this),g=S.selectAll("path.surface").data([T]);if(g.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),S.call(wke,e,o),u.pull){var P=+ns.castOption(u.pull,T.pts)||0;P>0&&(x+=P*T.pxmid[0],C+=P*T.pxmid[1])}T.cxFinal=x,T.cyFinal=C;function E(N,H,re,oe){var _e=oe*(H[0]-N[0]),ke=oe*(H[1]-N[1]);return"a"+oe*l.r+","+oe*l.r+" 0 "+T.largeArc+(re?" 1 ":" 0 ")+_e+","+ke}var z=u.hole;if(T.v===l.vTotal){var q="M"+(x+T.px0[0])+","+(C+T.px0[1])+E(T.px0,T.pxmid,!0,1)+E(T.pxmid,T.px0,!0,1)+"Z";z?g.attr("d","M"+(x+z*T.px0[0])+","+(C+z*T.px0[1])+E(T.px0,T.pxmid,!1,z)+E(T.pxmid,T.px0,!1,z)+"Z"+q):g.attr("d",q)}else{var U=E(T.px0,T.px1,!0,1);if(z){var G=1-z;g.attr("d","M"+(x+z*T.px1[0])+","+(C+z*T.px1[1])+E(T.px1,T.px0,!1,z)+"l"+G*T.px0[0]+","+G*T.px0[1]+U+"Z")}else g.attr("d","M"+x+","+C+"l"+T.px0[0]+","+T.px0[1]+U+"Z")}Ike(e,T,l);var Z=ns.castOption(u.textposition,T.pts),j=S.selectAll("g.slicetext").data(T.text&&Z!=="none"?[0]:[]);j.enter().append("g").classed("slicetext",!0),j.exit().remove(),j.each(function(){var N=rv.ensureSingle(Fp.select(this),"text","",function(ie){ie.attr("data-notex",1)}),H=rv.ensureUniformFontSize(e,Z==="outside"?r6t(u,T,n.font):Tke(u,T,n.font));N.text(T.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(Qy.font,H).call(TW.convertToTspans,e);var re=Qy.bBox(N.node()),oe;if(Z==="outside")oe=yke(re,T);else if(oe=Ske(re,T,l),Z==="auto"&&oe.scale<1){var _e=rv.ensureUniformFontSize(e,u.outsidetextfont);N.call(Qy.font,_e),re=Qy.bBox(N.node()),oe=yke(re,T)}var ke=oe.textPosAngle,Ce=ke===void 0?T.pxmid:wD(l.r,ke);if(oe.targetX=x+Ce[0]*oe.rCenter+(oe.x||0),oe.targetY=C+Ce[1]*oe.rCenter+(oe.y||0),Rke(oe,re),oe.outside){var ge=oe.targetY;T.yLabelMin=ge-re.height/2,T.yLabelMid=ge,T.yLabelMax=ge+re.height/2,T.labelExtraX=0,T.labelExtraY=0,h=!0}oe.fontSize=H.size,$Ct(u.type,oe,n),o[L].transform=oe,rv.setTransormAndDisplay(N,oe)})});var d=Fp.select(this).selectAll("g.titletext").data(u.title.text?[0]:[]);if(d.enter().append("g").classed("titletext",!0),d.exit().remove(),d.each(function(){var T=rv.ensureSingle(Fp.select(this),"text","",function(C){C.attr("data-notex",1)}),L=u.title.text;u._meta&&(L=rv.templateString(L,u._meta)),T.text(L).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(Qy.font,u.title.font).call(TW.convertToTspans,e);var x;u.title.position==="middle center"?x=a6t(l):x=Cke(l,i),T.attr("transform",vke(x.x,x.y)+JCt(Math.min(1,x.scale))+vke(x.tx,x.ty))}),h&&s6t(f,u),t6t(c,u),h&&u.automargin){var v=Qy.bBox(s.node()),m=u.domain,b=i.w*(m.x[1]-m.x[0]),p=i.h*(m.y[1]-m.y[0]),k=(.5*b-l.r)/i.w,M=(.5*p-l.r)/i.h;KCt.autoMargin(e,"pie."+u.uid+".automargin",{xl:m.x[0]-k,xr:m.x[1]+k,yb:m.y[0]-M,yt:m.y[1]+M,l:Math.max(l.cx-l.r-v.left,0),r:Math.max(v.right-(l.cx+l.r),0),b:Math.max(v.bottom-(l.cy+l.r),0),t:Math.max(l.cy-l.r-v.top,0),pad:5})}})});setTimeout(function(){a.selectAll("tspan").each(function(){var o=Fp.select(this);o.attr("dy")&&o.attr("dy",o.attr("dy"))})},0)}function t6t(e,t){e.each(function(r){var n=Fp.select(this);if(!r.labelExtraX&&!r.labelExtraY){n.select("path.textline").remove();return}var i=n.select("g.slicetext text");r.transform.targetX+=r.labelExtraX,r.transform.targetY+=r.labelExtraY,rv.setTransormAndDisplay(i,r.transform);var a=r.cxFinal+r.pxmid[0],o=r.cyFinal+r.pxmid[1],s="M"+a+","+o,l=(r.yLabelMax-r.yLabelMin)*(r.pxmid[0]<0?-1:1)/4;if(r.labelExtraX){var u=r.labelExtraX*r.pxmid[1]/r.pxmid[0],c=r.yLabelMid+r.labelExtraY-(r.cyFinal+r.pxmid[1]);Math.abs(u)>Math.abs(c)?s+="l"+c*r.pxmid[0]/r.pxmid[1]+","+c+"H"+(a+r.labelExtraX+l):s+="l"+r.labelExtraX+","+u+"v"+(c-u)+"h"+l}else s+="V"+(r.yLabelMid+r.labelExtraY)+"h"+l;rv.ensureSingle(n,"path","textline").call(_ke.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:s,fill:"none"})})}function wke(e,t,r){var n=r[0],i=n.cx,a=n.cy,o=n.trace,s=o.type==="funnelarea";"_hasHoverLabel"in o||(o._hasHoverLabel=!1),"_hasHoverEvent"in o||(o._hasHoverEvent=!1),e.on("mouseover",function(l){var u=t._fullLayout,c=t._fullData[o.index];if(!(t._dragging||u.hovermode===!1)){var f=c.hoverinfo;if(Array.isArray(f)&&(f=xD.castHoverinfo({hoverinfo:[ns.castOption(f,l.pts)],_module:o._module},u,0)),f==="all"&&(f="label+text+value+percent+name"),c.hovertemplate||f!=="none"&&f!=="skip"&&f){var h=l.rInscribed||0,d=i+l.pxmid[0]*(1-h),v=a+l.pxmid[1]*(1-h),m=u.separators,b=[];if(f&&f.indexOf("label")!==-1&&b.push(l.label),l.text=ns.castOption(c.hovertext||c.text,l.pts),f&&f.indexOf("text")!==-1){var p=l.text;rv.isValidTextValue(p)&&b.push(p)}l.value=l.v,l.valueLabel=ns.formatPieValue(l.v,m),f&&f.indexOf("value")!==-1&&b.push(l.valueLabel),l.percent=l.v/n.vTotal,l.percentLabel=ns.formatPiePercent(l.percent,m),f&&f.indexOf("percent")!==-1&&b.push(l.percentLabel);var k=c.hoverlabel,M=k.font,T=[];xD.loneHover({trace:o,x0:d-h*n.r,x1:d+h*n.r,y:v,_x0:s?i+l.TL[0]:d-h*n.r,_x1:s?i+l.TR[0]:d+h*n.r,_y0:s?a+l.TL[1]:v-h*n.r,_y1:s?a+l.BL[1]:v+h*n.r,text:b.join("
"),name:c.hovertemplate||f.indexOf("name")!==-1?c.name:void 0,idealAlign:l.pxmid[0]<0?"left":"right",color:ns.castOption(k.bgcolor,l.pts)||l.color,borderColor:ns.castOption(k.bordercolor,l.pts),fontFamily:ns.castOption(M.family,l.pts),fontSize:ns.castOption(M.size,l.pts),fontColor:ns.castOption(M.color,l.pts),nameLength:ns.castOption(k.namelength,l.pts),textAlign:ns.castOption(k.align,l.pts),hovertemplate:ns.castOption(c.hovertemplate,l.pts),hovertemplateLabels:l,eventData:[bD(l,c)]},{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:t,inOut_bbox:T}),l.bbox=T[0],o._hasHoverLabel=!0}o._hasHoverEvent=!0,t.emit("plotly_hover",{points:[bD(l,c)],event:Fp.event})}}),e.on("mouseout",function(l){var u=t._fullLayout,c=t._fullData[o.index],f=Fp.select(this).datum();o._hasHoverEvent&&(l.originalEvent=Fp.event,t.emit("plotly_unhover",{points:[bD(f,c)],event:Fp.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(xD.loneUnhover(u._hoverlayer.node()),o._hasHoverLabel=!1)}),e.on("click",function(l){var u=t._fullLayout,c=t._fullData[o.index];t._dragging||u.hovermode===!1||(t._hoverdata=[bD(l,c)],xD.click(t,Fp.event))})}function r6t(e,t,r){var n=ns.castOption(e.outsidetextfont.color,t.pts)||ns.castOption(e.textfont.color,t.pts)||r.color,i=ns.castOption(e.outsidetextfont.family,t.pts)||ns.castOption(e.textfont.family,t.pts)||r.family,a=ns.castOption(e.outsidetextfont.size,t.pts)||ns.castOption(e.textfont.size,t.pts)||r.size,o=ns.castOption(e.outsidetextfont.weight,t.pts)||ns.castOption(e.textfont.weight,t.pts)||r.weight,s=ns.castOption(e.outsidetextfont.style,t.pts)||ns.castOption(e.textfont.style,t.pts)||r.style,l=ns.castOption(e.outsidetextfont.variant,t.pts)||ns.castOption(e.textfont.variant,t.pts)||r.variant,u=ns.castOption(e.outsidetextfont.textcase,t.pts)||ns.castOption(e.textfont.textcase,t.pts)||r.textcase,c=ns.castOption(e.outsidetextfont.lineposition,t.pts)||ns.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=ns.castOption(e.outsidetextfont.shadow,t.pts)||ns.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n,family:i,size:a,weight:o,style:s,variant:l,textcase:u,lineposition:c,shadow:f}}function Tke(e,t,r){var n=ns.castOption(e.insidetextfont.color,t.pts);!n&&e._input.textfont&&(n=ns.castOption(e._input.textfont.color,t.pts));var i=ns.castOption(e.insidetextfont.family,t.pts)||ns.castOption(e.textfont.family,t.pts)||r.family,a=ns.castOption(e.insidetextfont.size,t.pts)||ns.castOption(e.textfont.size,t.pts)||r.size,o=ns.castOption(e.insidetextfont.weight,t.pts)||ns.castOption(e.textfont.weight,t.pts)||r.weight,s=ns.castOption(e.insidetextfont.style,t.pts)||ns.castOption(e.textfont.style,t.pts)||r.style,l=ns.castOption(e.insidetextfont.variant,t.pts)||ns.castOption(e.textfont.variant,t.pts)||r.variant,u=ns.castOption(e.insidetextfont.textcase,t.pts)||ns.castOption(e.textfont.textcase,t.pts)||r.textcase,c=ns.castOption(e.insidetextfont.lineposition,t.pts)||ns.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=ns.castOption(e.insidetextfont.shadow,t.pts)||ns.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n||_ke.contrast(t.color),family:i,size:a,weight:o,style:s,variant:l,textcase:u,lineposition:c,shadow:f}}function Ake(e,t){for(var r,n,i=0;i=-4;k-=2)p(Math.PI*k,"tan");for(k=4;k>=-4;k-=2)p(Math.PI*(k+1),"tan")}if(f||d){for(k=4;k>=-4;k-=2)p(Math.PI*(k+1.5),"rad");for(k=4;k>=-4;k-=2)p(Math.PI*(k+.5),"rad")}}if(s||v||f){var M=Math.sqrt(e.width*e.width+e.height*e.height);if(b={scale:i*n*2/M,rCenter:1-i,rotate:0},b.textPosAngle=(t.startangle+t.stopangle)/2,b.scale>=1)return b;m.push(b)}(v||d)&&(b=gke(e,n,o,l,u),b.textPosAngle=(t.startangle+t.stopangle)/2,m.push(b)),(v||h)&&(b=mke(e,n,o,l,u),b.textPosAngle=(t.startangle+t.stopangle)/2,m.push(b));for(var T=0,L=0,x=0;x=1)break}return m[T]}function i6t(e,t){var r=e.startangle,n=e.stopangle;return r>t&&t>n||r0?1:-1)/2,y:a/(1+r*r/(n*n)),outside:!0}}function a6t(e){var t=Math.sqrt(e.titleBox.width*e.titleBox.width+e.titleBox.height*e.titleBox.height);return{x:e.cx,y:e.cy,scale:e.trace.hole*e.r*2/t,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}function Cke(e,t){var r=1,n=1,i,a=e.trace,o={x:e.cx,y:e.cy},s={tx:0,ty:0};s.ty+=a.title.font.size,i=Lke(a),a.title.position.indexOf("top")!==-1?(o.y-=(1+i)*e.r,s.ty-=e.titleBox.height):a.title.position.indexOf("bottom")!==-1&&(o.y+=(1+i)*e.r);var l=o6t(e.r,e.trace.aspectratio),u=t.w*(a.domain.x[1]-a.domain.x[0])/2;return a.title.position.indexOf("left")!==-1?(u=u+l,o.x-=(1+i)*l,s.tx+=e.titleBox.width/2):a.title.position.indexOf("center")!==-1?u*=2:a.title.position.indexOf("right")!==-1&&(u=u+l,o.x+=(1+i)*l,s.tx-=e.titleBox.width/2),r=u/e.titleBox.width,n=AW(e,t)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function o6t(e,t){return e/(t===void 0?1:t)}function AW(e,t){var r=e.trace,n=t.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(e.titleBox.height,n/2)}function Lke(e){var t=e.pull;if(!t)return 0;var r;if(rv.isArrayOrTypedArray(t))for(t=0,r=0;rt&&(t=e.pull[r]);return t}function s6t(e,t){var r,n,i,a,o,s,l,u,c,f,h,d,v;function m(M,T){return M.pxmid[1]-T.pxmid[1]}function b(M,T){return T.pxmid[1]-M.pxmid[1]}function p(M,T){T||(T={});var L=T.labelExtraY+(n?T.yLabelMax:T.yLabelMin),x=n?M.yLabelMin:M.yLabelMax,C=n?M.yLabelMax:M.yLabelMin,S=M.cyFinal+o(M.px0[1],M.px1[1]),g=L-x,P,E,z,q,U,G;if(g*l>0&&(M.labelExtraY=g),!!rv.isArrayOrTypedArray(t.pull))for(E=0;E=(ns.castOption(t.pull,z.pts)||0))&&((M.pxmid[1]-z.pxmid[1])*l>0?(q=z.cyFinal+o(z.px0[1],z.px1[1]),g=q-x-M.labelExtraY,g*l>0&&(M.labelExtraY+=g)):(C+M.labelExtraY-S)*l>0&&(P=3*s*Math.abs(E-f.indexOf(M)),U=z.cxFinal+a(z.px0[0],z.px1[0]),G=U+P-(M.cxFinal+M.pxmid[0])-M.labelExtraX,G*s>0&&(M.labelExtraX+=G)))}for(n=0;n<2;n++)for(i=n?m:b,o=n?Math.max:Math.min,l=n?1:-1,r=0;r<2;r++){for(a=r?Math.max:Math.min,s=r?1:-1,u=e[n][r],u.sort(i),c=e[1-n][r],f=c.concat(u),d=[],h=0;h1?(u=r.r,c=u/i.aspectratio):(c=r.r,u=c*i.aspectratio),u*=(1+i.baseratio)/2,l=u*c}o=Math.min(o,l/r.vTotal)}for(n=0;nt.vTotal/2?1:0,u.halfangle=Math.PI*Math.min(u.v/t.vTotal,.5),u.ring=1-n.hole,u.rInscribed=n6t(u,t))}function wD(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}function Ike(e,t,r){var n=e._fullLayout,i=r.trace,a=i.texttemplate,o=i.textinfo;if(!a&&o&&o!=="none"){var s=o.split("+"),l=function(T){return s.indexOf(T)!==-1},u=l("label"),c=l("text"),f=l("value"),h=l("percent"),d=n.separators,v;if(v=u?[t.label]:[],c){var m=ns.getFirstFilled(i.text,t.pts);pke(m)&&v.push(m)}f&&v.push(ns.formatPieValue(t.v,d)),h&&v.push(ns.formatPiePercent(t.v/r.vTotal,d)),t.text=v.join("
")}function b(T){return{label:T.label,value:T.v,valueLabel:ns.formatPieValue(T.v,n.separators),percent:T.v/r.vTotal,percentLabel:ns.formatPiePercent(T.v/r.vTotal,n.separators),color:T.color,text:T.text,customdata:rv.castOption(i,T.i,"customdata")}}if(a){var p=rv.castOption(i,t.i,"texttemplate");if(!p)t.text="";else{var k=b(t),M=ns.getFirstFilled(i.text,t.pts);(pke(M)||M==="")&&(k.text=M),t.text=rv.texttemplateString({data:[k,i._meta],fallback:i.texttemplatefallback,labels:k,locale:e._fullLayout._d3locale,template:p})}}}function Rke(e,t){var r=e.rotate*Math.PI/180,n=Math.cos(r),i=Math.sin(r),a=(t.left+t.right)/2,o=(t.top+t.bottom)/2;e.textX=a*n-o*i,e.textY=a*i+o*n,e.noCenter=!0}Dke.exports={plot:e6t,formatSliceLabel:Ike,transformInsideText:Ske,determineInsideTextFont:Tke,positionTitleOutside:Cke,prerenderTitles:Ake,layoutAreas:Pke,attachFxHandlers:wke,computeTransform:Rke}});var qke=ye((pvr,zke)=>{"use strict";var Fke=qa(),c6t=Z3(),f6t=bv().resizeText;zke.exports=function(t){var r=t._fullLayout._pielayer.selectAll(".trace");f6t(t,r,"pie"),r.each(function(n){var i=n[0],a=i.trace,o=Fke.select(this);o.style({opacity:a.opacity}),o.selectAll("path.surface").each(function(s){Fke.select(this).call(c6t,s,a,t)})})}});var Bke=ye(CA=>{"use strict";var Oke=Mc();CA.name="pie";CA.plot=function(e,t,r,n){Oke.plotBasePlot(CA.name,e,t,r,n)};CA.clean=function(e,t,r,n){Oke.cleanBasePlot(CA.name,e,t,r,n)}});var Uke=ye((mvr,Nke)=>{"use strict";Nke.exports={attributes:F2(),supplyDefaults:z2().supplyDefaults,supplyLayoutDefaults:lke(),layoutAttributes:_D(),calc:kA().calc,crossTraceCalc:kA().crossTraceCalc,plot:TD().plot,style:qke(),styleOne:Z3(),moduleType:"trace",name:"pie",basePlotModule:Bke(),categories:["pie-like","pie","showLegend"],meta:{}}});var Gke=ye((yvr,Vke)=>{"use strict";Vke.exports=Uke()});var jke=ye(LA=>{"use strict";var Hke=Mc();LA.name="sunburst";LA.plot=function(e,t,r,n){Hke.plotBasePlot(LA.name,e,t,r,n)};LA.clean=function(e,t,r,n){Hke.cleanBasePlot(LA.name,e,t,r,n)}});var SW=ye((xvr,Wke)=>{"use strict";Wke.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}});var OE=ye((bvr,Yke)=>{"use strict";var h6t=Gl(),{hovertemplateAttrs:d6t,texttemplateAttrs:v6t,templatefallbackAttrs:Xke}=Ll(),p6t=Tu(),g6t=Cc().attributes,e1=F2(),Zke=SW(),qE=Ao().extendFlat,m6t=Pd().pattern;Yke.exports={labels:{valType:"data_array",editType:"calc"},parents:{valType:"data_array",editType:"calc"},values:{valType:"data_array",editType:"calc"},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc"},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc"},level:{valType:"any",editType:"plot",anim:!0},maxdepth:{valType:"integer",editType:"plot",dflt:-1},marker:qE({colors:{valType:"data_array",editType:"calc"},line:{color:qE({},e1.marker.line.color,{dflt:null}),width:qE({},e1.marker.line.width,{dflt:1}),editType:"calc"},pattern:m6t,editType:"calc"},p6t("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:e1.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:v6t({editType:"plot"},{keys:Zke.eventDataKeys.concat(["label","value"])}),texttemplatefallback:Xke({editType:"plot"}),hovertext:e1.hovertext,hoverinfo:qE({},h6t.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:d6t({},{keys:Zke.eventDataKeys}),hovertemplatefallback:Xke(),textfont:e1.textfont,insidetextorientation:e1.insidetextorientation,insidetextfont:e1.insidetextfont,outsidetextfont:qE({},e1.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:e1.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:g6t({name:"sunburst",trace:!0,editType:"calc"})}});var MW=ye((wvr,Kke)=>{"use strict";Kke.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var eCe=ye((Tvr,Qke)=>{"use strict";var Jke=Pr(),y6t=OE(),_6t=Cc().defaults,x6t=i0().handleText,b6t=z2().handleMarkerDefaults,$ke=tc(),w6t=$ke.hasColorscale,T6t=$ke.handleDefaults;Qke.exports=function(t,r,n,i){function a(h,d){return Jke.coerce(t,r,y6t,h,d)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=a("values");l&&l.length?a("branchvalues"):a("count"),a("level"),a("maxdepth"),b6t(t,r,i,a);var u=r._hasColorscale=w6t(t,"marker","colors")||(t.marker||{}).coloraxis;u&&T6t(t,r,i,a,{prefix:"marker.",cLetter:"c"}),a("leaf.opacity",u?1:.7);var c=a("text");a("texttemplate"),a("texttemplatefallback"),r.texttemplate||a("textinfo",Jke.isArrayOrTypedArray(c)?"text+label":"label"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var f="auto";x6t(t,r,i,a,f,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("insidetextorientation"),a("sort"),a("rotation"),a("root.color"),_6t(r,i,a),r._length=null}});var rCe=ye((Avr,tCe)=>{"use strict";var A6t=Pr(),S6t=MW();tCe.exports=function(t,r){function n(i,a){return A6t.coerce(t,r,S6t,i,a)}n("sunburstcolorway",r.colorway),n("extendsunburstcolors")}});var BE=ye((AD,iCe)=>{(function(e,t){typeof AD=="object"&&typeof iCe!="undefined"?t(AD):(e=e||self,t(e.d3=e.d3||{}))})(AD,function(e){"use strict";function t(We,et){return We.parent===et.parent?1:2}function r(We){return We.reduce(n,0)/We.length}function n(We,et){return We+et.x}function i(We){return 1+We.reduce(a,0)}function a(We,et){return Math.max(We,et.y)}function o(We){for(var et;et=We.children;)We=et[0];return We}function s(We){for(var et;et=We.children;)We=et[et.length-1];return We}function l(){var We=t,et=1,xt=1,At=!1;function Kt(er){var Sr,Gr=0;er.eachAfter(function(ai){var mi=ai.children;mi?(ai.x=r(mi),ai.y=i(mi)):(ai.x=Sr?Gr+=We(ai,Sr):0,ai.y=0,Sr=ai)});var Ir=o(er),Yr=s(er),_i=Ir.x-We(Ir,Yr)/2,Pi=Yr.x+We(Yr,Ir)/2;return er.eachAfter(At?function(ai){ai.x=(ai.x-er.x)*et,ai.y=(er.y-ai.y)*xt}:function(ai){ai.x=(ai.x-_i)/(Pi-_i)*et,ai.y=(1-(er.y?ai.y/er.y:1))*xt})}return Kt.separation=function(er){return arguments.length?(We=er,Kt):We},Kt.size=function(er){return arguments.length?(At=!1,et=+er[0],xt=+er[1],Kt):At?null:[et,xt]},Kt.nodeSize=function(er){return arguments.length?(At=!0,et=+er[0],xt=+er[1],Kt):At?[et,xt]:null},Kt}function u(We){var et=0,xt=We.children,At=xt&&xt.length;if(!At)et=1;else for(;--At>=0;)et+=xt[At].value;We.value=et}function c(){return this.eachAfter(u)}function f(We){var et=this,xt,At=[et],Kt,er,Sr;do for(xt=At.reverse(),At=[];et=xt.pop();)if(We(et),Kt=et.children,Kt)for(er=0,Sr=Kt.length;er=0;--Kt)xt.push(At[Kt]);return this}function d(We){for(var et=this,xt=[et],At=[],Kt,er,Sr;et=xt.pop();)if(At.push(et),Kt=et.children,Kt)for(er=0,Sr=Kt.length;er=0;)xt+=At[Kt].value;et.value=xt})}function m(We){return this.eachBefore(function(et){et.children&&et.children.sort(We)})}function b(We){for(var et=this,xt=p(et,We),At=[et];et!==xt;)et=et.parent,At.push(et);for(var Kt=At.length;We!==xt;)At.splice(Kt,0,We),We=We.parent;return At}function p(We,et){if(We===et)return We;var xt=We.ancestors(),At=et.ancestors(),Kt=null;for(We=xt.pop(),et=At.pop();We===et;)Kt=We,We=xt.pop(),et=At.pop();return Kt}function k(){for(var We=this,et=[We];We=We.parent;)et.push(We);return et}function M(){var We=[];return this.each(function(et){We.push(et)}),We}function T(){var We=[];return this.eachBefore(function(et){et.children||We.push(et)}),We}function L(){var We=this,et=[];return We.each(function(xt){xt!==We&&et.push({source:xt.parent,target:xt})}),et}function x(We,et){var xt=new E(We),At=+We.value&&(xt.value=We.value),Kt,er=[xt],Sr,Gr,Ir,Yr;for(et==null&&(et=S);Kt=er.pop();)if(At&&(Kt.value=+Kt.data.value),(Gr=et(Kt.data))&&(Yr=Gr.length))for(Kt.children=new Array(Yr),Ir=Yr-1;Ir>=0;--Ir)er.push(Sr=Kt.children[Ir]=new E(Gr[Ir])),Sr.parent=Kt,Sr.depth=Kt.depth+1;return xt.eachBefore(P)}function C(){return x(this).eachBefore(g)}function S(We){return We.children}function g(We){We.data=We.data.data}function P(We){var et=0;do We.height=et;while((We=We.parent)&&We.height<++et)}function E(We){this.data=We,this.depth=this.height=0,this.parent=null}E.prototype=x.prototype={constructor:E,count:c,each:f,eachAfter:d,eachBefore:h,sum:v,sort:m,path:b,ancestors:k,descendants:M,leaves:T,links:L,copy:C};var z=Array.prototype.slice;function q(We){for(var et=We.length,xt,At;et;)At=Math.random()*et--|0,xt=We[et],We[et]=We[At],We[At]=xt;return We}function U(We){for(var et=0,xt=(We=q(z.call(We))).length,At=[],Kt,er;et0&&xt*xt>At*At+Kt*Kt}function N(We,et){for(var xt=0;xtIr?(Kt=(Yr+Ir-er)/(2*Yr),Gr=Math.sqrt(Math.max(0,Ir/Yr-Kt*Kt)),xt.x=We.x-Kt*At-Gr*Sr,xt.y=We.y-Kt*Sr+Gr*At):(Kt=(Yr+er-Ir)/(2*Yr),Gr=Math.sqrt(Math.max(0,er/Yr-Kt*Kt)),xt.x=et.x+Kt*At-Gr*Sr,xt.y=et.y+Kt*Sr+Gr*At)):(xt.x=et.x+xt.r,xt.y=et.y)}function Ce(We,et){var xt=We.r+et.r-1e-6,At=et.x-We.x,Kt=et.y-We.y;return xt>0&&xt*xt>At*At+Kt*Kt}function ge(We){var et=We._,xt=We.next._,At=et.r+xt.r,Kt=(et.x*xt.r+xt.x*et.r)/At,er=(et.y*xt.r+xt.y*et.r)/At;return Kt*Kt+er*er}function ie(We){this._=We,this.next=null,this.previous=null}function Se(We){if(!(Kt=We.length))return 0;var et,xt,At,Kt,er,Sr,Gr,Ir,Yr,_i,Pi;if(et=We[0],et.x=0,et.y=0,!(Kt>1))return et.r;if(xt=We[1],et.x=-xt.r,xt.x=et.r,xt.y=0,!(Kt>2))return et.r+xt.r;ke(xt,et,At=We[2]),et=new ie(et),xt=new ie(xt),At=new ie(At),et.next=At.previous=xt,xt.next=et.previous=At,At.next=xt.previous=et;e:for(Gr=3;Gr0)throw new Error("cycle");return Gr}return xt.id=function(At){return arguments.length?(We=De(At),xt):We},xt.parentId=function(At){return arguments.length?(et=De(At),xt):et},xt}function Ae(We,et){return We.parent===et.parent?1:2}function rt(We){var et=We.children;return et?et[0]:We.t}function St(We){var et=We.children;return et?et[et.length-1]:We.t}function Tt(We,et,xt){var At=xt/(et.i-We.i);et.c-=At,et.s+=xt,We.c+=At,et.z+=xt,et.m+=xt}function dt(We){for(var et=0,xt=0,At=We.children,Kt=At.length,er;--Kt>=0;)er=At[Kt],er.z+=et,er.m+=et,et+=er.s+(xt+=er.c)}function Et(We,et,xt){return We.a.parent===et.parent?We.a:xt}function pt(We,et){this._=We,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=et}pt.prototype=Object.create(E.prototype);function Xt(We){for(var et=new pt(We,0),xt,At=[et],Kt,er,Sr,Gr;xt=At.pop();)if(er=xt._.children)for(xt.children=new Array(Gr=er.length),Sr=Gr-1;Sr>=0;--Sr)At.push(Kt=xt.children[Sr]=new pt(er[Sr],Sr)),Kt.parent=xt;return(et.parent=new pt(null,0)).children=[et],et}function or(){var We=Ae,et=1,xt=1,At=null;function Kt(Yr){var _i=Xt(Yr);if(_i.eachAfter(er),_i.parent.m=-_i.z,_i.eachBefore(Sr),At)Yr.eachBefore(Ir);else{var Pi=Yr,ai=Yr,mi=Yr;Yr.eachBefore(function(Qn){Qn.xai.x&&(ai=Qn),Qn.depth>mi.depth&&(mi=Qn)});var un=Pi===ai?1:We(Pi,ai)/2,Fn=un-Pi.x,An=et/(ai.x+un+Fn),Hn=xt/(mi.depth||1);Yr.eachBefore(function(Qn){Qn.x=(Qn.x+Fn)*An,Qn.y=Qn.depth*Hn})}return Yr}function er(Yr){var _i=Yr.children,Pi=Yr.parent.children,ai=Yr.i?Pi[Yr.i-1]:null;if(_i){dt(Yr);var mi=(_i[0].z+_i[_i.length-1].z)/2;ai?(Yr.z=ai.z+We(Yr._,ai._),Yr.m=Yr.z-mi):Yr.z=mi}else ai&&(Yr.z=ai.z+We(Yr._,ai._));Yr.parent.A=Gr(Yr,ai,Yr.parent.A||Pi[0])}function Sr(Yr){Yr._.x=Yr.z+Yr.parent.m,Yr.m+=Yr.parent.m}function Gr(Yr,_i,Pi){if(_i){for(var ai=Yr,mi=Yr,un=_i,Fn=ai.parent.children[0],An=ai.m,Hn=mi.m,Qn=un.m,Vi=Fn.m,Kn;un=St(un),ai=rt(ai),un&&ai;)Fn=rt(Fn),mi=St(mi),mi.a=Yr,Kn=un.z+Qn-ai.z-An+We(un._,ai._),Kn>0&&(Tt(Et(un,Yr,Pi),Yr,Kn),An+=Kn,Hn+=Kn),Qn+=un.m,An+=ai.m,Vi+=Fn.m,Hn+=mi.m;un&&!St(mi)&&(mi.t=un,mi.m+=Qn-Hn),ai&&!rt(Fn)&&(Fn.t=ai,Fn.m+=An-Vi,Pi=Yr)}return Pi}function Ir(Yr){Yr.x*=et,Yr.y=Yr.depth*xt}return Kt.separation=function(Yr){return arguments.length?(We=Yr,Kt):We},Kt.size=function(Yr){return arguments.length?(At=!1,et=+Yr[0],xt=+Yr[1],Kt):At?null:[et,xt]},Kt.nodeSize=function(Yr){return arguments.length?(At=!0,et=+Yr[0],xt=+Yr[1],Kt):At?[et,xt]:null},Kt}function _r(We,et,xt,At,Kt){for(var er=We.children,Sr,Gr=-1,Ir=er.length,Yr=We.value&&(Kt-xt)/We.value;++GrQn&&(Qn=Yr),Gt=An*An*Jn,Vi=Math.max(Qn/Gt,Gt/Hn),Vi>Kn){An-=Yr;break}Kn=Vi}Sr.push(Ir={value:An,dice:mi1?At:1)},xt}(Er);function jr(){var We=qr,et=!1,xt=1,At=1,Kt=[0],er=Le,Sr=Le,Gr=Le,Ir=Le,Yr=Le;function _i(ai){return ai.x0=ai.y0=0,ai.x1=xt,ai.y1=At,ai.eachBefore(Pi),Kt=[0],et&&ai.eachBefore(Vt),ai}function Pi(ai){var mi=Kt[ai.depth],un=ai.x0+mi,Fn=ai.y0+mi,An=ai.x1-mi,Hn=ai.y1-mi;An=ai-1){var Qn=er[Pi];Qn.x0=un,Qn.y0=Fn,Qn.x1=An,Qn.y1=Hn;return}for(var Vi=Yr[Pi],Kn=mi/2+Vi,Jn=Pi+1,Gt=ai-1;Jn>>1;Yr[wt]Hn-Fn){var wr=(un*ir+An*rr)/mi;_i(Pi,Jn,rr,un,Fn,wr,Hn),_i(Jn,ai,ir,wr,Fn,An,Hn)}else{var Xr=(Fn*ir+Hn*rr)/mi;_i(Pi,Jn,rr,un,Fn,An,Xr),_i(Jn,ai,ir,un,Xr,An,Hn)}}}function Ge(We,et,xt,At,Kt){(We.depth&1?_r:st)(We,et,xt,At,Kt)}var Je=function We(et){function xt(At,Kt,er,Sr,Gr){if((Ir=At._squarify)&&Ir.ratio===et)for(var Ir,Yr,_i,Pi,ai=-1,mi,un=Ir.length,Fn=At.value;++ai1?At:1)},xt}(Er);e.cluster=l,e.hierarchy=x,e.pack=ce,e.packEnclose=U,e.packSiblings=Ee,e.partition=ct,e.stratify=Ue,e.tree=or,e.treemap=jr,e.treemapBinary=gt,e.treemapDice=st,e.treemapResquarify=Je,e.treemapSlice=_r,e.treemapSliceDice=Ge,e.treemapSquarify=qr,Object.defineProperty(e,"__esModule",{value:!0})})});var UE=ye(NE=>{"use strict";var nCe=BE(),M6t=Eo(),PA=Pr(),E6t=tc().makeColorScaleFuncFromTrace,k6t=kA().makePullColorFn,C6t=kA().generateExtendedColors,L6t=tc().calc,P6t=fs().ALMOST_EQUAL,I6t={},R6t={},D6t={};NE.calc=function(e,t){var r=e._fullLayout,n=t.ids,i=PA.isArrayOrTypedArray(n),a=t.labels,o=t.parents,s=t.values,l=PA.isArrayOrTypedArray(s),u=[],c={},f={},h=function(j,N){c[j]?c[j].push(N):c[j]=[N],f[N]=1},d=function(j){return j||typeof j=="number"},v=function(j){return!l||M6t(s[j])&&s[j]>=0},m,b,p;i?(m=Math.min(n.length,o.length),b=function(j){return d(n[j])&&v(j)},p=function(j){return String(n[j])}):(m=Math.min(a.length,o.length),b=function(j){return d(a[j])&&v(j)},p=function(j){return String(a[j])}),l&&(m=Math.min(m,s.length));for(var k=0;k1){for(var S=PA.randstr(),g=0;g{});function Ym(){}function sCe(){return this.rgb().formatHex()}function N6t(){return this.rgb().formatHex8()}function U6t(){return vCe(this).formatHsl()}function lCe(){return this.rgb().formatRgb()}function ex(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=R6t.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?uCe(t):r===3?new _d(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?MD(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?MD(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=D6t.exec(e))?new _d(t[1],t[2],t[3],1):(t=F6t.exec(e))?new _d(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=z6t.exec(e))?MD(t[1],t[2],t[3],t[4]):(t=O6t.exec(e))?MD(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=q6t.exec(e))?hCe(t[1],t[2]/100,t[3]/100,1):(t=B6t.exec(e))?hCe(t[1],t[2]/100,t[3]/100,t[4]):oCe.hasOwnProperty(e)?uCe(oCe[e]):e==="transparent"?new _d(NaN,NaN,NaN,0):null}function uCe(e){return new _d(e>>16&255,e>>8&255,e&255,1)}function MD(e,t,r,n){return n<=0&&(e=t=r=NaN),new _d(e,t,r,n)}function GE(e){return e instanceof Ym||(e=ex(e)),e?(e=e.rgb(),new _d(e.r,e.g,e.b,e.opacity)):new _d}function IA(e,t,r,n){return arguments.length===1?GE(e):new _d(e,t,r,n==null?1:n)}function _d(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function cCe(){return`#${O2(this.r)}${O2(this.g)}${O2(this.b)}`}function V6t(){return`#${O2(this.r)}${O2(this.g)}${O2(this.b)}${O2((isNaN(this.opacity)?1:this.opacity)*255)}`}function fCe(){let e=kD(this.opacity);return`${e===1?"rgb(":"rgba("}${q2(this.r)}, ${q2(this.g)}, ${q2(this.b)}${e===1?")":`, ${e})`}`}function kD(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function q2(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function O2(e){return e=q2(e),(e<16?"0":"")+e.toString(16)}function hCe(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Kg(e,t,r,n)}function vCe(e){if(e instanceof Kg)return new Kg(e.h,e.s,e.l,e.opacity);if(e instanceof Ym||(e=ex(e)),!e)return new Kg;if(e instanceof Kg)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,s=a-i,l=(a+i)/2;return s?(t===a?o=(r-n)/s+(r0&&l<1?0:o,new Kg(o,s,l,e.opacity)}function HE(e,t,r,n){return arguments.length===1?vCe(e):new Kg(e,t,r,n==null?1:n)}function Kg(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function dCe(e){return e=(e||0)%360,e<0?e+360:e}function ED(e){return Math.max(0,Math.min(1,e||0))}function EW(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var Q_,B2,PA,VE,Zm,R6t,D6t,F6t,z6t,O6t,q6t,B6t,oCe,CD=gu(()=>{SD();Q_=.7,B2=1/Q_,PA="\\s*([+-]?\\d+)\\s*",VE="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Zm="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",R6t=/^#([0-9a-f]{3,8})$/,D6t=new RegExp(`^rgb\\(${PA},${PA},${PA}\\)$`),F6t=new RegExp(`^rgb\\(${Zm},${Zm},${Zm}\\)$`),z6t=new RegExp(`^rgba\\(${PA},${PA},${PA},${VE}\\)$`),O6t=new RegExp(`^rgba\\(${Zm},${Zm},${Zm},${VE}\\)$`),q6t=new RegExp(`^hsl\\(${VE},${Zm},${Zm}\\)$`),B6t=new RegExp(`^hsla\\(${VE},${Zm},${Zm},${VE}\\)$`),oCe={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};t1(Ym,ex,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:sCe,formatHex:sCe,formatHex8:N6t,formatHsl:U6t,formatRgb:lCe,toString:lCe});t1(_d,IA,$_(Ym,{brighter(e){return e=e==null?B2:Math.pow(B2,e),new _d(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Q_:Math.pow(Q_,e),new _d(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new _d(q2(this.r),q2(this.g),q2(this.b),kD(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:cCe,formatHex:cCe,formatHex8:V6t,formatRgb:fCe,toString:fCe}));t1(Kg,HE,$_(Ym,{brighter(e){return e=e==null?B2:Math.pow(B2,e),new Kg(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Q_:Math.pow(Q_,e),new Kg(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new _d(EW(e>=240?e-240:e+120,i,n),EW(e,i,n),EW(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Kg(dCe(this.h),ED(this.s),ED(this.l),kD(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=kD(this.opacity);return`${e===1?"hsl(":"hsla("}${dCe(this.h)}, ${ED(this.s)*100}%, ${ED(this.l)*100}%${e===1?")":`, ${e})`}`}}))});var LD,PD,kW=gu(()=>{LD=Math.PI/180,PD=180/Math.PI});function xCe(e){if(e instanceof Km)return new Km(e.l,e.a,e.b,e.opacity);if(e instanceof r1)return bCe(e);e instanceof _d||(e=GE(e));var t=IW(e.r),r=IW(e.g),n=IW(e.b),i=CW((.2225045*t+.7168786*r+.0606169*n)/gCe),a,o;return t===r&&r===n?a=o=i:(a=CW((.4360747*t+.3850649*r+.1430804*n)/pCe),o=CW((.0139322*t+.0971045*r+.7141733*n)/mCe)),new Km(116*i-16,500*(a-i),200*(i-o),e.opacity)}function DA(e,t,r,n){return arguments.length===1?xCe(e):new Km(e,t,r,n==null?1:n)}function Km(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function CW(e){return e>G6t?Math.pow(e,1/3):e/_Ce+yCe}function LW(e){return e>RA?e*e*e:_Ce*(e-yCe)}function PW(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function IW(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function H6t(e){if(e instanceof r1)return new r1(e.h,e.c,e.l,e.opacity);if(e instanceof Km||(e=xCe(e)),e.a===0&&e.b===0)return new r1(NaN,0{SD();CD();kW();ID=18,pCe=.96422,gCe=1,mCe=.82521,yCe=4/29,RA=6/29,_Ce=3*RA*RA,G6t=RA*RA*RA;t1(Km,DA,$_(Ym,{brighter(e){return new Km(this.l+ID*(e==null?1:e),this.a,this.b,this.opacity)},darker(e){return new Km(this.l-ID*(e==null?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=pCe*LW(t),e=gCe*LW(e),r=mCe*LW(r),new _d(PW(3.1338561*t-1.6168667*e-.4906146*r),PW(-.9787684*t+1.9161415*e+.033454*r),PW(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));t1(r1,jE,$_(Ym,{brighter(e){return new r1(this.h,this.c,this.l+ID*(e==null?1:e),this.opacity)},darker(e){return new r1(this.h,this.c,this.l-ID*(e==null?1:e),this.opacity)},rgb(){return bCe(this).rgb()}}))});function j6t(e){if(e instanceof N2)return new N2(e.h,e.s,e.l,e.opacity);e instanceof _d||(e=GE(e));var t=e.r/255,r=e.g/255,n=e.b/255,i=(SCe*n+TCe*t-ACe*r)/(SCe+TCe-ACe),a=n-i,o=(WE*(r-i)-DW*a)/RD,s=Math.sqrt(o*o+a*a)/(WE*i*(1-i)),l=s?Math.atan2(o,a)*PD-120:NaN;return new N2(l<0?l+360:l,s,i,e.opacity)}function FA(e,t,r,n){return arguments.length===1?j6t(e):new N2(e,t,r,n==null?1:n)}function N2(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}var MCe,RW,DW,RD,WE,TCe,ACe,SCe,ECe=gu(()=>{SD();CD();kW();MCe=-.14861,RW=1.78277,DW=-.29227,RD=-.90649,WE=1.97294,TCe=WE*RD,ACe=WE*RW,SCe=RW*DW-RD*MCe;t1(N2,FA,$_(Ym,{brighter(e){return e=e==null?B2:Math.pow(B2,e),new N2(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Q_:Math.pow(Q_,e),new N2(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*LD,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),i=Math.sin(e);return new _d(255*(t+r*(MCe*n+RW*i)),255*(t+r*(DW*n+RD*i)),255*(t+r*(WE*n)),this.opacity)}}))});var U2=gu(()=>{CD();wCe();ECe()});function FW(e,t,r,n,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*r+(1+3*e+3*a-3*o)*n+o*i)/6}function DD(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[n],a=e[n+1],o=n>0?e[n-1]:2*i-a,s=n{});function zD(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),i=e[(n+t-1)%t],a=e[n%t],o=e[(n+1)%t],s=e[(n+2)%t];return FW((r-n/t)*t,i,a,o,s)}}var zW=gu(()=>{FD()});var zA,OW=gu(()=>{zA=e=>()=>e});function kCe(e,t){return function(r){return e+r*t}}function W6t(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function tx(e,t){var r=t-e;return r?kCe(e,r>180||r<-180?r-360*Math.round(r/360):r):zA(isNaN(e)?t:e)}function CCe(e){return(e=+e)==1?$f:function(t,r){return r-t?W6t(t,r,e):zA(isNaN(t)?r:t)}}function $f(e,t){var r=t-e;return r?kCe(e,r):zA(isNaN(e)?t:e)}var V2=gu(()=>{OW()});function LCe(e){return function(t){var r=t.length,n=new Array(r),i=new Array(r),a=new Array(r),o,s;for(o=0;o{U2();FD();zW();V2();XE=function e(t){var r=CCe(t);function n(i,a){var o=r((i=IA(i)).r,(a=IA(a)).r),s=r(i.g,a.g),l=r(i.b,a.b),u=$f(i.opacity,a.opacity);return function(c){return i.r=o(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return n.gamma=e,n}(1);PCe=LCe(DD),ICe=LCe(zD)});function OA(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;i{});function RCe(e,t){return(OD(t)?OA:BW)(e,t)}function BW(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),o;for(o=0;o{ZE();qD()});function BD(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}var UW=gu(()=>{});function zp(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var YE=gu(()=>{});function ND(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=rx(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var VW=gu(()=>{ZE()});function X6t(e){return function(){return e}}function Z6t(e){return function(t){return e(t)+""}}function UD(e,t){var r=HW.lastIndex=GW.lastIndex=0,n,i,a,o=-1,s=[],l=[];for(e=e+"",t=t+"";(n=HW.exec(e))&&(i=GW.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:zp(n,i)})),r=GW.lastIndex;return r{YE();HW=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,GW=new RegExp(HW.source,"g")});function rx(e,t){var r=typeof t,n;return t==null||r==="boolean"?zA(t):(r==="number"?zp:r==="string"?(n=ex(t))?(t=n,XE):UD:t instanceof ex?XE:t instanceof Date?BD:OD(t)?OA:Array.isArray(t)?BW:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?ND:zp)(e,t)}var ZE=gu(()=>{U2();qW();NW();UW();YE();VW();jW();OW();qD()});function DCe(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}var FCe=gu(()=>{});function zCe(e,t){var r=tx(+e,+t);return function(n){var i=r(n);return i-360*Math.floor(i/360)}}var OCe=gu(()=>{V2()});function qCe(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var BCe=gu(()=>{});function WW(e,t,r,n,i,a){var o,s,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),e*n{NCe=180/Math.PI,VD={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function VCe(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?VD:WW(t.a,t.b,t.c,t.d,t.e,t.f)}function GCe(e){return e==null?VD:(GD||(GD=document.createElementNS("http://www.w3.org/2000/svg","g")),GD.setAttribute("transform",e),(e=GD.transform.baseVal.consolidate())?(e=e.matrix,WW(e.a,e.b,e.c,e.d,e.e,e.f)):VD)}var GD,HCe=gu(()=>{UCe()});function jCe(e,t,r,n){function i(u){return u.length?u.pop()+" ":""}function a(u,c,f,h,d,v){if(u!==f||c!==h){var _=d.push("translate(",null,t,null,r);v.push({i:_-4,x:zp(u,f)},{i:_-2,x:zp(c,h)})}else(f||h)&&d.push("translate("+f+t+h+r)}function o(u,c,f,h){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),h.push({i:f.push(i(f)+"rotate(",null,n)-2,x:zp(u,c)})):c&&f.push(i(f)+"rotate("+c+n)}function s(u,c,f,h){u!==c?h.push({i:f.push(i(f)+"skewX(",null,n)-2,x:zp(u,c)}):c&&f.push(i(f)+"skewX("+c+n)}function l(u,c,f,h,d,v){if(u!==f||c!==h){var _=d.push(i(d)+"scale(",null,",",null,")");v.push({i:_-4,x:zp(u,f)},{i:_-2,x:zp(c,h)})}else(f!==1||h!==1)&&d.push(i(d)+"scale("+f+","+h+")")}return function(u,c){var f=[],h=[];return u=e(u),c=e(c),a(u.translateX,u.translateY,c.translateX,c.translateY,f,h),o(u.rotate,c.rotate,f,h),s(u.skewX,c.skewX,f,h),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,h),u=c=null,function(d){for(var v=-1,_=h.length,b;++v<_;)f[(b=h[v]).i]=b.x(d);return f.join("")}}}var WCe,XCe,ZCe=gu(()=>{YE();HCe();WCe=jCe(VCe,"px, ","px)","deg)"),XCe=jCe(GCe,", ",")",")")});function YCe(e){return((e=Math.exp(e))+1/e)/2}function K6t(e){return((e=Math.exp(e))-1/e)/2}function J6t(e){return((e=Math.exp(2*e))-1)/(e+1)}var Y6t,KCe,JCe=gu(()=>{Y6t=1e-12;KCe=function e(t,r,n){function i(a,o){var s=a[0],l=a[1],u=a[2],c=o[0],f=o[1],h=o[2],d=c-s,v=f-l,_=d*d+v*v,b,p;if(_{U2();V2();QCe=$Ce(tx),e6e=$Ce($f)});function XW(e,t){var r=$f((e=DA(e)).l,(t=DA(t)).l),n=$f(e.a,t.a),i=$f(e.b,t.b),a=$f(e.opacity,t.opacity);return function(o){return e.l=r(o),e.a=n(o),e.b=i(o),e.opacity=a(o),e+""}}var r6e=gu(()=>{U2();V2()});function i6e(e){return function(t,r){var n=e((t=jE(t)).h,(r=jE(r)).h),i=$f(t.c,r.c),a=$f(t.l,r.l),o=$f(t.opacity,r.opacity);return function(s){return t.h=n(s),t.c=i(s),t.l=a(s),t.opacity=o(s),t+""}}}var n6e,a6e,o6e=gu(()=>{U2();V2();n6e=i6e(tx),a6e=i6e($f)});function s6e(e){return function t(r){r=+r;function n(i,a){var o=e((i=FA(i)).h,(a=FA(a)).h),s=$f(i.s,a.s),l=$f(i.l,a.l),u=$f(i.opacity,a.opacity);return function(c){return i.h=o(c),i.s=s(c),i.l=l(Math.pow(c,r)),i.opacity=u(c),i+""}}return n.gamma=t,n}(1)}var l6e,u6e,c6e=gu(()=>{U2();V2();l6e=s6e(tx),u6e=s6e($f)});function ZW(e,t){t===void 0&&(t=e,e=rx);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r{ZE()});function h6e(e,t){for(var r=new Array(t),n=0;n{});var G2={};mee(G2,{interpolate:()=>rx,interpolateArray:()=>RCe,interpolateBasis:()=>DD,interpolateBasisClosed:()=>zD,interpolateCubehelix:()=>l6e,interpolateCubehelixLong:()=>u6e,interpolateDate:()=>BD,interpolateDiscrete:()=>DCe,interpolateHcl:()=>n6e,interpolateHclLong:()=>a6e,interpolateHsl:()=>QCe,interpolateHslLong:()=>e6e,interpolateHue:()=>zCe,interpolateLab:()=>XW,interpolateNumber:()=>zp,interpolateNumberArray:()=>OA,interpolateObject:()=>ND,interpolateRgb:()=>XE,interpolateRgbBasis:()=>PCe,interpolateRgbBasisClosed:()=>ICe,interpolateRound:()=>qCe,interpolateString:()=>UD,interpolateTransformCss:()=>WCe,interpolateTransformSvg:()=>XCe,interpolateZoom:()=>KCe,piecewise:()=>ZW,quantize:()=>h6e});var H2=gu(()=>{ZE();NW();FD();zW();UW();FCe();OCe();YE();qD();VW();BCe();jW();ZCe();JCe();qW();t6e();r6e();o6e();c6e();f6e();d6e()});var HD=ye((s0r,v6e)=>{"use strict";var $6t=So(),Q6t=ka();v6e.exports=function(t,r,n,i,a){var o=r.data.data,s=o.i,l=a||o.color;if(s>=0){r.i=o.i;var u=n.marker;u.pattern?(!u.colors||!u.pattern.shape)&&(u.color=l,r.color=l):(u.color=l,r.color=l),$6t.pointStyle(t,n,i,r)}else Q6t.fill(t,l)}});var YW=ye((l0r,_6e)=>{"use strict";var p6e=Oa(),g6e=ka(),m6e=Dr(),eLt=bv().resizeText,tLt=HD();function rLt(e){var t=e._fullLayout._sunburstlayer.selectAll(".trace");eLt(e,t,"sunburst"),t.each(function(r){var n=p6e.select(this),i=r[0],a=i.trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each(function(o){p6e.select(this).call(y6e,o,a,e)})})}function y6e(e,t,r,n){var i=t.data.data,a=!t.children,o=i.i,s=m6e.castOption(r,o,"marker.line.color")||g6e.defaultLine,l=m6e.castOption(r,o,"marker.line.width")||0;e.call(tLt,t,r,n).style("stroke-width",l).call(g6e.stroke,s).style("opacity",a?r.leaf.opacity:null)}_6e.exports={style:rLt,styleOne:y6e}});var i1=ye(Bs=>{"use strict";var j2=Dr(),iLt=ka(),nLt=Eg(),x6e=g_();Bs.findEntryWithLevel=function(e,t){var r;return t&&e.eachAfter(function(n){if(Bs.getPtId(n)===t)return r=n.copy()}),r||e};Bs.findEntryWithChild=function(e,t){var r;return e.eachAfter(function(n){for(var i=n.children||[],a=0;a0)};Bs.getMaxDepth=function(e){return e.maxdepth>=0?e.maxdepth:1/0};Bs.isHeader=function(e,t){return!(Bs.isLeaf(e)||e.depth===t._maxDepth-1)};function b6e(e){return e.data.data.pid}Bs.getParent=function(e,t){return Bs.findEntryWithLevel(e,b6e(t))};Bs.listPath=function(e,t){var r=e.parent;if(!r)return[];var n=t?[r.data[t]]:[r];return Bs.listPath(r,t).concat(n)};Bs.getPath=function(e){return Bs.listPath(e,"label").join("/")+"/"};Bs.formatValue=x6e.formatPieValue;Bs.formatPercent=function(e,t){var r=j2.formatPercent(e,0);return r==="0%"&&(r=x6e.formatPiePercent(e,t)),r}});var $E=ye((c0r,A6e)=>{"use strict";var qA=Oa(),w6e=qa(),sLt=ip().appendArrayPointValue,KE=vf(),T6e=Dr(),lLt=k3(),id=i1(),uLt=g_(),cLt=uLt.formatPieValue;A6e.exports=function(t,r,n,i,a){var o=i[0],s=o.trace,l=o.hierarchy,u=s.type==="sunburst",c=s.type==="treemap"||s.type==="icicle";"_hasHoverLabel"in s||(s._hasHoverLabel=!1),"_hasHoverEvent"in s||(s._hasHoverEvent=!1);var f=function(v){var _=n._fullLayout;if(!(n._dragging||_.hovermode===!1)){var b=n._fullData[s.index],p=v.data.data,k=p.i,E=id.isHierarchyRoot(v),T=id.getParent(l,v),L=id.getValue(v),x=function(Ce){return T6e.castOption(b,k,Ce)},C=x("hovertemplate"),M=KE.castHoverinfo(b,_,k),g=_.separators,P;if(C||M&&M!=="none"&&M!=="skip"){var A,z;u&&(A=o.cx+v.pxmid[0]*(1-v.rInscribed),z=o.cy+v.pxmid[1]*(1-v.rInscribed)),c&&(A=v._hoverX,z=v._hoverY);var O={},U=[],G=[],Z=function(Ce){return U.indexOf(Ce)!==-1};M&&(U=M==="all"?b._module.attributes.hoverinfo.flags:M.split("+")),O.label=p.label,Z("label")&&O.label&&G.push(O.label),p.hasOwnProperty("v")&&(O.value=p.v,O.valueLabel=cLt(O.value,g),Z("value")&&G.push(O.valueLabel)),O.currentPath=v.currentPath=id.getPath(v.data),Z("current path")&&!E&&G.push(O.currentPath);var j,N=[],H=function(){N.indexOf(j)===-1&&(G.push(j),N.push(j))};O.percentParent=v.percentParent=L/id.getValue(T),O.parent=v.parentString=id.getPtLabel(T),Z("percent parent")&&(j=id.formatPercent(O.percentParent,g)+" of "+O.parent,H()),O.percentEntry=v.percentEntry=L/id.getValue(r),O.entry=v.entry=id.getPtLabel(r),Z("percent entry")&&!E&&!v.onPathbar&&(j=id.formatPercent(O.percentEntry,g)+" of "+O.entry,H()),O.percentRoot=v.percentRoot=L/id.getValue(l),O.root=v.root=id.getPtLabel(l),Z("percent root")&&!E&&(j=id.formatPercent(O.percentRoot,g)+" of "+O.root,H()),O.text=x("hovertext")||x("text"),Z("text")&&(j=O.text,T6e.isValidTextValue(j)&&G.push(j)),P=[JE(v,b,a.eventDataKeys)];var re={trace:b,y:z,_x0:v._x0,_x1:v._x1,_y0:v._y0,_y1:v._y1,text:G.join("
"),name:C||Z("name")?b.name:void 0,color:x("hoverlabel.bgcolor")||p.color,borderColor:x("hoverlabel.bordercolor"),fontFamily:x("hoverlabel.font.family"),fontSize:x("hoverlabel.font.size"),fontColor:x("hoverlabel.font.color"),fontWeight:x("hoverlabel.font.weight"),fontStyle:x("hoverlabel.font.style"),fontVariant:x("hoverlabel.font.variant"),nameLength:x("hoverlabel.namelength"),textAlign:x("hoverlabel.align"),hovertemplate:C,hovertemplateLabels:O,eventData:P};u&&(re.x0=A-v.rInscribed*v.rpx1,re.x1=A+v.rInscribed*v.rpx1,re.idealAlign=v.pxmid[0]<0?"left":"right"),c&&(re.x=A,re.idealAlign=A<0?"left":"right");var oe=[];KE.loneHover(re,{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:n,inOut_bbox:oe}),P[0].bbox=oe[0],s._hasHoverLabel=!0}if(c){var _e=t.select("path.surface");a.styleOne(_e,v,b,n,{hovered:!0})}s._hasHoverEvent=!0,n.emit("plotly_hover",{points:P||[JE(v,b,a.eventDataKeys)],event:qA.event})}},h=function(v){var _=n._fullLayout,b=n._fullData[s.index],p=qA.select(this).datum();if(s._hasHoverEvent&&(v.originalEvent=qA.event,n.emit("plotly_unhover",{points:[JE(p,b,a.eventDataKeys)],event:qA.event}),s._hasHoverEvent=!1),s._hasHoverLabel&&(KE.loneUnhover(_._hoverlayer.node()),s._hasHoverLabel=!1),c){var k=t.select("path.surface");a.styleOne(k,p,b,n,{hovered:!1})}},d=function(v){var _=n._fullLayout,b=n._fullData[s.index],p=u&&(id.isHierarchyRoot(v)||id.isLeaf(v)),k=id.getPtId(v),E=id.isEntry(v)?id.findEntryWithChild(l,k):id.findEntryWithLevel(l,k),T=id.getPtId(E),L={points:[JE(v,b,a.eventDataKeys)],event:qA.event};p||(L.nextLevel=T);var x=lLt.triggerHandler(n,"plotly_"+s.type+"click",L);if(x!==!1&&_.hovermode&&(n._hoverdata=[JE(v,b,a.eventDataKeys)],KE.click(n,qA.event)),!p&&x!==!1&&!n._dragging&&!n._transitioning){w6e.call("_storeDirectGUIEdit",b,_._tracePreGUI[b.uid],{level:b.level});var C={data:[{level:T}],traces:[s.index]},M={frame:{redraw:!1,duration:a.transitionTime},transition:{duration:a.transitionTime,easing:a.transitionEasing},mode:"immediate",fromcurrent:!0};KE.loneUnhover(_._hoverlayer.node()),w6e.call("animate",n,C,M)}};t.on("mouseover",f),t.on("mouseout",h),t.on("click",d)};function JE(e,t,r){for(var n=e.data.data,i={curveNumber:t.index,pointNumber:n.i,data:t._input,fullData:t},a=0;a{"use strict";var QE=Oa(),fLt=BE(),Jg=(H2(),pb(G2)).interpolate,S6e=So(),Av=Dr(),hLt=Zl(),C6e=bv(),M6e=C6e.recordMinTextSize,dLt=C6e.clearMinTextSize,L6e=TD(),vLt=g_().getRotationAngle,pLt=L6e.computeTransform,gLt=L6e.transformInsideText,mLt=YW().styleOne,yLt=V0().resizeText,_Lt=$E(),KW=SW(),Rl=i1();jD.plot=function(e,t,r,n){var i=e._fullLayout,a=i._sunburstlayer,o,s,l=!r,u=!i.uniformtext.mode&&Rl.hasTransition(r);if(dLt("sunburst",i),o=a.selectAll("g.trace.sunburst").data(t,function(f){return f[0].trace.uid}),o.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),o.order(),u){n&&(s=n());var c=QE.transition().duration(r.duration).ease(r.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()});c.each(function(){a.selectAll("g.trace").each(function(f){E6e(e,f,this,r)})})}else o.each(function(f){E6e(e,f,this,r)}),i.uniformtext.mode&&yLt(e,i._sunburstlayer.selectAll(".trace"),"sunburst");l&&o.exit().remove()};function E6e(e,t,r,n){var i=e._context.staticPlot,a=e._fullLayout,o=!a.uniformtext.mode&&Rl.hasTransition(n),s=QE.select(r),l=s.selectAll("g.slice"),u=t[0],c=u.trace,f=u.hierarchy,h=Rl.findEntryWithLevel(f,c.level),d=Rl.getMaxDepth(c),v=a._size,_=c.domain,b=v.w*(_.x[1]-_.x[0]),p=v.h*(_.y[1]-_.y[0]),k=.5*Math.min(b,p),E=u.cx=v.l+v.w*(_.x[1]+_.x[0])/2,T=u.cy=v.t+v.h*(1-_.y[0])-p/2;if(!h)return l.remove();var L=null,x={};o&&l.each(function(ge){x[Rl.getPtId(ge)]={rpx0:ge.rpx0,rpx1:ge.rpx1,x0:ge.x0,x1:ge.x1,transform:ge.transform},!L&&Rl.isEntry(ge)&&(L=ge)});var C=xLt(h).descendants(),M=h.height+1,g=0,P=d;u.hasMultipleRoots&&Rl.isHierarchyRoot(h)&&(C=C.slice(1),M-=1,g=1,P+=1),C=C.filter(function(ge){return ge.y1<=P});var A=vLt(c.rotation);A&&C.forEach(function(ge){ge.x0+=A,ge.x1+=A});var z=Math.min(M,d),O=function(ge){return(ge-g)/z*k},U=function(ge,ie){return[ge*Math.cos(ie),-ge*Math.sin(ie)]},G=function(ge){return Av.pathAnnulus(ge.rpx0,ge.rpx1,ge.x0,ge.x1,E,T)},Z=function(ge){return E+k6e(ge)[0]*(ge.transform.rCenter||0)+(ge.transform.x||0)},j=function(ge){return T+k6e(ge)[1]*(ge.transform.rCenter||0)+(ge.transform.y||0)};l=l.data(C,Rl.getPtId),l.enter().append("g").classed("slice",!0),o?l.exit().transition().each(function(){var ge=QE.select(this),ie=ge.select("path.surface");ie.transition().attrTween("d",function(Ee){var Ae=oe(Ee);return function(Be){return G(Ae(Be))}});var Se=ge.select("g.slicetext");Se.attr("opacity",0)}).remove():l.exit().remove(),l.order();var N=null;if(o&&L){var H=Rl.getPtId(L);l.each(function(ge){N===null&&Rl.getPtId(ge)===H&&(N=ge.x1)})}var re=l;o&&(re=re.transition().each("end",function(){var ge=QE.select(this);Rl.setSliceCursor(ge,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),re.each(function(ge){var ie=QE.select(this),Se=Av.ensureSingle(ie,"path","surface",function(De){De.style("pointer-events",i?"none":"all")});ge.rpx0=O(ge.y0),ge.rpx1=O(ge.y1),ge.xmid=(ge.x0+ge.x1)/2,ge.pxmid=U(ge.rpx1,ge.xmid),ge.midangle=-(ge.xmid-Math.PI/2),ge.startangle=-(ge.x0-Math.PI/2),ge.stopangle=-(ge.x1-Math.PI/2),ge.halfangle=.5*Math.min(Av.angleDelta(ge.x0,ge.x1)||Math.PI,Math.PI),ge.ring=1-ge.rpx0/ge.rpx1,ge.rInscribed=bLt(ge,c),o?Se.transition().attrTween("d",function(De){var ce=_e(De);return function(je){return G(ce(je))}}):Se.attr("d",G),ie.call(_Lt,h,e,t,{eventDataKeys:KW.eventDataKeys,transitionTime:KW.CLICK_TRANSITION_TIME,transitionEasing:KW.CLICK_TRANSITION_EASING}).call(Rl.setSliceCursor,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:e._transitioning}),Se.call(mLt,ge,c,e);var Ee=Av.ensureSingle(ie,"g","slicetext"),Ae=Av.ensureSingle(Ee,"text","",function(De){De.attr("data-notex",1)}),Be=Av.ensureUniformFontSize(e,Rl.determineTextFont(c,ge,a.font));Ae.text(jD.formatSliceLabel(ge,h,c,t,a)).classed("slicetext",!0).attr("text-anchor","middle").call(S6e.font,Be).call(hLt.convertToTspans,e);var Pe=S6e.bBox(Ae.node());ge.transform=gLt(Pe,ge,u),ge.transform.targetX=Z(ge),ge.transform.targetY=j(ge);var me=function(De,ce){var je=De.transform;return pLt(je,ce),je.fontSize=Be.size,M6e(c.type,je,a),Av.getTextTransform(je)};o?Ae.transition().attrTween("transform",function(De){var ce=Ce(De);return function(je){return me(ce(je),Pe)}}):Ae.attr("transform",me(ge,Pe))});function oe(ge){var ie=Rl.getPtId(ge),Se=x[ie],Ee=x[Rl.getPtId(h)],Ae;if(Ee){var Be=(ge.x1>Ee.x1?2*Math.PI:0)+A;Ae=ge.rpx1N?2*Math.PI:0)+A;Se={x0:Ae,x1:Ae}}else Se={rpx0:k,rpx1:k},Av.extendFlat(Se,Le(ge));else Se={rpx0:0,rpx1:0};else Se={x0:A,x1:A};return Jg(Se,Ee)}function Ce(ge){var ie=x[Rl.getPtId(ge)],Se,Ee=ge.transform;if(ie)Se=ie;else if(Se={rpx1:ge.rpx1,transform:{textPosAngle:Ee.textPosAngle,scale:0,rotate:Ee.rotate,rCenter:Ee.rCenter,x:Ee.x,y:Ee.y}},L)if(ge.parent)if(N){var Ae=ge.x1>N?2*Math.PI:0;Se.x0=Se.x1=Ae}else Av.extendFlat(Se,Le(ge));else Se.x0=Se.x1=A;else Se.x0=Se.x1=A;var Be=Jg(Se.transform.textPosAngle,ge.transform.textPosAngle),Pe=Jg(Se.rpx1,ge.rpx1),me=Jg(Se.x0,ge.x0),De=Jg(Se.x1,ge.x1),ce=Jg(Se.transform.scale,Ee.scale),je=Jg(Se.transform.rotate,Ee.rotate),lt=Ee.rCenter===0?3:Se.transform.rCenter===0?1/3:1,pt=Jg(Se.transform.rCenter,Ee.rCenter),Vt=function(ot){return pt(Math.pow(ot,lt))};return function(ot){var ut=Pe(ot),Wt=me(ot),Nt=De(ot),$t=Vt(ot),sr=U(ut,(Wt+Nt)/2),Tr=Be(ot),fr={pxmid:sr,rpx1:ut,transform:{textPosAngle:Tr,rCenter:$t,x:Ee.x,y:Ee.y}};return M6e(c.type,Ee,a),{transform:{targetX:Z(fr),targetY:j(fr),scale:ce(ot),rotate:je(ot),rCenter:$t}}}}function Le(ge){var ie=ge.parent,Se=x[Rl.getPtId(ie)],Ee={};if(Se){var Ae=ie.children,Be=Ae.indexOf(ge),Pe=Ae.length,me=Jg(Se.x0,Se.x1);Ee.x0=me(Be/Pe),Ee.x1=me(Be/Pe)}else Ee.x0=Ee.x1=0;return Ee}}function xLt(e){return fLt.partition().size([2*Math.PI,e.height+1])(e)}jD.formatSliceLabel=function(e,t,r,n,i){var a=r.texttemplate,o=r.textinfo;if(!a&&(!o||o==="none"))return"";var s=i.separators,l=n[0],u=e.data.data,c=l.hierarchy,f=Rl.isHierarchyRoot(e),h=Rl.getParent(c,e),d=Rl.getValue(e);if(!a){var v=o.split("+"),_=function(g){return v.indexOf(g)!==-1},b=[],p;if(_("label")&&u.label&&b.push(u.label),u.hasOwnProperty("v")&&_("value")&&b.push(Rl.formatValue(u.v,s)),!f){_("current path")&&b.push(Rl.getPath(e.data));var k=0;_("percent parent")&&k++,_("percent entry")&&k++,_("percent root")&&k++;var E=k>1;if(k){var T,L=function(g){p=Rl.formatPercent(T,s),E&&(p+=" of "+g),b.push(p)};_("percent parent")&&!f&&(T=d/Rl.getValue(h),L("parent")),_("percent entry")&&(T=d/Rl.getValue(t),L("entry")),_("percent root")&&(T=d/Rl.getValue(c),L("root"))}}return _("text")&&(p=Av.castOption(r,u.i,"text"),Av.isValidTextValue(p)&&b.push(p)),b.join("
")}var x=Av.castOption(r,u.i,"texttemplate");if(!x)return"";var C={};u.label&&(C.label=u.label),u.hasOwnProperty("v")&&(C.value=u.v,C.valueLabel=Rl.formatValue(u.v,s)),C.currentPath=Rl.getPath(e.data),f||(C.percentParent=d/Rl.getValue(h),C.percentParentLabel=Rl.formatPercent(C.percentParent,s),C.parent=Rl.getPtLabel(h)),C.percentEntry=d/Rl.getValue(t),C.percentEntryLabel=Rl.formatPercent(C.percentEntry,s),C.entry=Rl.getPtLabel(t),C.percentRoot=d/Rl.getValue(c),C.percentRootLabel=Rl.formatPercent(C.percentRoot,s),C.root=Rl.getPtLabel(c),u.hasOwnProperty("color")&&(C.color=u.color);var M=Av.castOption(r,u.i,"text");return(Av.isValidTextValue(M)||M==="")&&(C.text=M),C.customdata=Av.castOption(r,u.i,"customdata"),Av.texttemplateString({data:[C,r._meta],fallback:r.texttemplatefallback,labels:C,locale:i._d3locale,template:x})};function bLt(e){return e.rpx0===0&&Av.isFullCircle([e.x0,e.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2))}function k6e(e){return wLt(e.rpx1,e.transform.textPosAngle)}function wLt(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}});var I6e=ye((h0r,P6e)=>{"use strict";P6e.exports={moduleType:"trace",name:"sunburst",basePlotModule:jke(),categories:[],animatable:!0,attributes:qE(),layoutAttributes:MW(),supplyDefaults:eCe(),supplyLayoutDefaults:rCe(),calc:UE().calc,crossTraceCalc:UE().crossTraceCalc,plot:WD().plot,style:YW().style,colorbar:$d(),meta:{}}});var D6e=ye((d0r,R6e)=>{"use strict";R6e.exports=I6e()});var z6e=ye(BA=>{"use strict";var F6e=Mc();BA.name="treemap";BA.plot=function(e,t,r,n){F6e.plotBasePlot(BA.name,e,t,r,n)};BA.clean=function(e,t,r,n){F6e.cleanBasePlot(BA.name,e,t,r,n)}});var W2=ye((p0r,O6e)=>{"use strict";O6e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}});var XD=ye((g0r,N6e)=>{"use strict";var{hovertemplateAttrs:TLt,texttemplateAttrs:ALt,templatefallbackAttrs:q6e}=Ll(),SLt=Tu(),MLt=Cc().attributes,X2=F2(),tg=qE(),B6e=W2(),JW=Ao().extendFlat,ELt=Pd().pattern;N6e.exports={labels:tg.labels,parents:tg.parents,values:tg.values,branchvalues:tg.branchvalues,count:tg.count,level:tg.level,maxdepth:tg.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:JW({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:tg.marker.colors,pattern:ELt,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:tg.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},SLt("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:JW({},X2.textfont,{}),editType:"calc"},text:X2.text,textinfo:tg.textinfo,texttemplate:ALt({editType:"plot"},{keys:B6e.eventDataKeys.concat(["label","value"])}),texttemplatefallback:q6e({editType:"plot"}),hovertext:X2.hovertext,hoverinfo:tg.hoverinfo,hovertemplate:TLt({},{keys:B6e.eventDataKeys}),hovertemplatefallback:q6e(),textfont:X2.textfont,insidetextfont:X2.insidetextfont,outsidetextfont:JW({},X2.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:X2.sort,root:tg.root,domain:MLt({name:"treemap",trace:!0,editType:"calc"})}});var $W=ye((m0r,U6e)=>{"use strict";U6e.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var j6e=ye((y0r,H6e)=>{"use strict";var V6e=Dr(),kLt=XD(),CLt=ka(),LLt=Cc().defaults,PLt=i0().handleText,ILt=A_().TEXTPAD,RLt=z2().handleMarkerDefaults,G6e=tc(),DLt=G6e.hasColorscale,FLt=G6e.handleDefaults;H6e.exports=function(t,r,n,i){function a(b,p){return V6e.coerce(t,r,kLt,b,p)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=a("values");l&&l.length?a("branchvalues"):a("count"),a("level"),a("maxdepth");var u=a("tiling.packing");u==="squarify"&&a("tiling.squarifyratio"),a("tiling.flip"),a("tiling.pad");var c=a("text");a("texttemplate"),a("texttemplatefallback"),r.texttemplate||a("textinfo",V6e.isArrayOrTypedArray(c)?"text+label":"label"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var f=a("pathbar.visible"),h="auto";PLt(t,r,i,a,h,{hasPathbar:f,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("textposition");var d=r.textposition.indexOf("bottom")!==-1;RLt(t,r,i,a);var v=r._hasColorscale=DLt(t,"marker","colors")||(t.marker||{}).coloraxis;v?FLt(t,r,i,a,{prefix:"marker.",cLetter:"c"}):a("marker.depthfade",!(r.marker.colors||[]).length);var _=r.textfont.size*2;a("marker.pad.t",d?_/4:_),a("marker.pad.l",_/4),a("marker.pad.r",_/4),a("marker.pad.b",d?_:_/4),a("marker.cornerradius"),r._hovered={marker:{line:{width:2,color:CLt.contrast(i.paper_bgcolor)}}},f&&(a("pathbar.thickness",r.pathbar.textfont.size+2*ILt),a("pathbar.side"),a("pathbar.edgeshape")),a("sort"),a("root.color"),LLt(r,i,a),r._length=null}});var X6e=ye((_0r,W6e)=>{"use strict";var zLt=Dr(),OLt=$W();W6e.exports=function(t,r){function n(i,a){return zLt.coerce(t,r,OLt,i,a)}n("treemapcolorway",r.colorway),n("extendtreemapcolors")}});var eX=ye(QW=>{"use strict";var Z6e=UE();QW.calc=function(e,t){return Z6e.calc(e,t)};QW.crossTraceCalc=function(e){return Z6e._runCrossTraceCalc("treemap",e)}});var tX=ye((b0r,Y6e)=>{"use strict";Y6e.exports=function e(t,r,n){var i;n.swapXY&&(i=t.x0,t.x0=t.y0,t.y0=i,i=t.x1,t.x1=t.y1,t.y1=i),n.flipX&&(i=t.x0,t.x0=r[0]-t.x1,t.x1=r[0]-i),n.flipY&&(i=t.y0,t.y0=r[1]-t.y1,t.y1=r[1]-i);var a=t.children;if(a)for(var o=0;o{"use strict";var NA=BE(),qLt=tX();K6e.exports=function(t,r,n){var i=n.flipX,a=n.flipY,o=n.packing==="dice-slice",s=n.pad[a?"bottom":"top"],l=n.pad[i?"right":"left"],u=n.pad[i?"left":"right"],c=n.pad[a?"top":"bottom"],f;o&&(f=l,l=s,s=f,f=u,u=c,c=f);var h=NA.treemap().tile(BLt(n.packing,n.squarifyratio)).paddingInner(n.pad.inner).paddingLeft(l).paddingRight(u).paddingTop(s).paddingBottom(c).size(o?[r[1],r[0]]:r)(t);return(o||i||a)&&qLt(h,r,{swapXY:o,flipX:i,flipY:a}),h};function BLt(e,t){switch(e){case"squarify":return NA.treemapSquarify.ratio(t);case"binary":return NA.treemapBinary;case"dice":return NA.treemapDice;case"slice":return NA.treemapSlice;default:return NA.treemapSliceDice}}});var ZD=ye((T0r,eLe)=>{"use strict";var J6e=Oa(),UA=ka(),$6e=Dr(),iX=i1(),NLt=bv().resizeText,ULt=HD();function VLt(e){var t=e._fullLayout._treemaplayer.selectAll(".trace");NLt(e,t,"treemap"),t.each(function(r){var n=J6e.select(this),i=r[0],a=i.trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each(function(o){J6e.select(this).call(Q6e,o,a,e,{hovered:!1})})})}function Q6e(e,t,r,n,i){var a=(i||{}).hovered,o=t.data.data,s=o.i,l,u,c=o.color,f=iX.isHierarchyRoot(t),h=1;if(a)l=r._hovered.marker.line.color,u=r._hovered.marker.line.width;else if(f&&c===r.root.color)h=100,l="rgba(0,0,0,0)",u=0;else if(l=$6e.castOption(r,s,"marker.line.color")||UA.defaultLine,u=$6e.castOption(r,s,"marker.line.width")||0,!r._hasColorscale&&!t.onPathbar){var d=r.marker.depthfade;if(d){var v=UA.combine(UA.addOpacity(r._backgroundColor,.75),c),_;if(d===!0){var b=iX.getMaxDepth(r);isFinite(b)?iX.isLeaf(t)?_=0:_=r._maxVisibleLayers-(t.data.depth-r._entryDepth):_=t.data.height+1}else _=t.data.depth-r._entryDepth,r._atRootLevel||_++;if(_>0)for(var p=0;p<_;p++){var k=.5*p/_;c=UA.combine(UA.addOpacity(v,k),c)}}}e.call(ULt,t,r,n,c).style("stroke-width",u).call(UA.stroke,l).style("opacity",h)}eLe.exports={style:VLt,styleOne:Q6e}});var aLe=ye((A0r,nLe)=>{"use strict";var tLe=Oa(),YD=Dr(),rLe=So(),GLt=Zl(),HLt=rX(),iLe=ZD().styleOne,nX=W2(),VA=i1(),jLt=$E(),aX=!0;nLe.exports=function(t,r,n,i,a){var o=a.barDifY,s=a.width,l=a.height,u=a.viewX,c=a.viewY,f=a.pathSlice,h=a.toMoveInsideSlice,d=a.strTransform,v=a.hasTransition,_=a.handleSlicesExit,b=a.makeUpdateSliceInterpolator,p=a.makeUpdateTextInterpolator,k={},E=t._context.staticPlot,T=t._fullLayout,L=r[0],x=L.trace,C=L.hierarchy,M=s/x._entryDepth,g=VA.listPath(n.data,"id"),P=HLt(C.copy(),[s,l],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();P=P.filter(function(z){var O=g.indexOf(z.data.id);return O===-1?!1:(z.x0=M*O,z.x1=M*(O+1),z.y0=o,z.y1=o+l,z.onPathbar=!0,!0)}),P.reverse(),i=i.data(P,VA.getPtId),i.enter().append("g").classed("pathbar",!0),_(i,aX,k,[s,l],f),i.order();var A=i;v&&(A=A.transition().each("end",function(){var z=tLe.select(this);VA.setSliceCursor(z,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),A.each(function(z){z._x0=u(z.x0),z._x1=u(z.x1),z._y0=c(z.y0),z._y1=c(z.y1),z._hoverX=u(z.x1-Math.min(s,l)/2),z._hoverY=c(z.y1-l/2);var O=tLe.select(this),U=YD.ensureSingle(O,"path","surface",function(N){N.style("pointer-events",E?"none":"all")});v?U.transition().attrTween("d",function(N){var H=b(N,aX,k,[s,l]);return function(re){return f(H(re))}}):U.attr("d",f),O.call(jLt,n,t,r,{styleOne:iLe,eventDataKeys:nX.eventDataKeys,transitionTime:nX.CLICK_TRANSITION_TIME,transitionEasing:nX.CLICK_TRANSITION_EASING}).call(VA.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),U.call(iLe,z,x,t,{hovered:!1}),z._text=(VA.getPtLabel(z)||"").split("
").join(" ")||"";var G=YD.ensureSingle(O,"g","slicetext"),Z=YD.ensureSingle(G,"text","",function(N){N.attr("data-notex",1)}),j=YD.ensureUniformFontSize(t,VA.determineTextFont(x,z,T.font,{onPathbar:!0}));Z.text(z._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(rLe.font,j).call(GLt.convertToTspans,t),z.textBB=rLe.bBox(Z.node()),z.transform=h(z,{fontSize:j.size,onPathbar:!0}),z.transform.fontSize=j.size,v?Z.transition().attrTween("transform",function(N){var H=p(N,aX,k,[s,l]);return function(re){return d(H(re))}}):Z.attr("transform",d(z))})}});var uLe=ye((S0r,lLe)=>{"use strict";var oLe=Oa(),oX=(H2(),pb(G2)).interpolate,ix=i1(),ek=Dr(),sLe=A_().TEXTPAD,WLt=d2(),XLt=WLt.toMoveInsideBar,ZLt=bv(),sX=ZLt.recordMinTextSize,YLt=W2(),KLt=aLe();function Z2(e){return ix.isHierarchyRoot(e)?"":ix.getPtId(e)}lLe.exports=function(t,r,n,i,a){var o=t._fullLayout,s=r[0],l=s.trace,u=l.type,c=u==="icicle",f=s.hierarchy,h=ix.findEntryWithLevel(f,l.level),d=oLe.select(n),v=d.selectAll("g.pathbar"),_=d.selectAll("g.slice");if(!h){v.remove(),_.remove();return}var b=ix.isHierarchyRoot(h),p=!o.uniformtext.mode&&ix.hasTransition(i),k=ix.getMaxDepth(l),E=function($e){return $e.data.depth-h.data.depth-1?C+P:-(g+P):0,z={x0:M,x1:M,y0:A,y1:A+g},O=function($e,St,Qt){var Gt=l.tiling.pad,_t=function(lr){return lr-Gt<=St.x0},It=function(lr){return lr+Gt>=St.x1},mt=function(lr){return lr-Gt<=St.y0},er=function(lr){return lr+Gt>=St.y1};return $e.x0===St.x0&&$e.x1===St.x1&&$e.y0===St.y0&&$e.y1===St.y1?{x0:$e.x0,x1:$e.x1,y0:$e.y0,y1:$e.y1}:{x0:_t($e.x0-Gt)?0:It($e.x0-Gt)?Qt[0]:$e.x0,x1:_t($e.x1+Gt)?0:It($e.x1+Gt)?Qt[0]:$e.x1,y0:mt($e.y0-Gt)?0:er($e.y0-Gt)?Qt[1]:$e.y0,y1:mt($e.y1+Gt)?0:er($e.y1+Gt)?Qt[1]:$e.y1}},U=null,G={},Z={},j=null,N=function($e,St){return St?G[Z2($e)]:Z[Z2($e)]},H=function($e,St,Qt,Gt){if(St)return G[Z2(f)]||z;var _t=Z[l.level]||Qt;return E($e)?O($e,_t,Gt):{}};s.hasMultipleRoots&&b&&k++,l._maxDepth=k,l._backgroundColor=o.paper_bgcolor,l._entryDepth=h.data.depth,l._atRootLevel=b;var re=-x/2+T.l+T.w*(L.x[1]+L.x[0])/2,oe=-C/2+T.t+T.h*(1-(L.y[1]+L.y[0])/2),_e=function($e){return re+$e},Ce=function($e){return oe+$e},Le=Ce(0),ge=_e(0),ie=function($e){return ge+$e},Se=function($e){return Le+$e};function Ee($e,St){return $e+","+St}var Ae=ie(0),Be=function($e){$e.x=Math.max(Ae,$e.x)},Pe=l.pathbar.edgeshape,me=function($e){var St=ie(Math.max(Math.min($e.x0,$e.x0),0)),Qt=ie(Math.min(Math.max($e.x1,$e.x1),M)),Gt=Se($e.y0),_t=Se($e.y1),It=g/2,mt={},er={};mt.x=St,er.x=Qt,mt.y=er.y=(Gt+_t)/2;var lr={x:St,y:Gt},wr={x:Qt,y:Gt},Lr={x:Qt,y:_t},ti={x:St,y:_t};return Pe===">"?(lr.x-=It,wr.x-=It,Lr.x-=It,ti.x-=It):Pe==="/"?(Lr.x-=It,ti.x-=It,mt.x-=It/2,er.x-=It/2):Pe==="\\"?(lr.x-=It,wr.x-=It,mt.x-=It/2,er.x-=It/2):Pe==="<"&&(mt.x-=It,er.x-=It),Be(lr),Be(ti),Be(mt),Be(wr),Be(Lr),Be(er),"M"+Ee(lr.x,lr.y)+"L"+Ee(wr.x,wr.y)+"L"+Ee(er.x,er.y)+"L"+Ee(Lr.x,Lr.y)+"L"+Ee(ti.x,ti.y)+"L"+Ee(mt.x,mt.y)+"Z"},De=l[c?"tiling":"marker"].pad,ce=function($e){return l.textposition.indexOf($e)!==-1},je=ce("top"),lt=ce("left"),pt=ce("right"),Vt=ce("bottom"),ot=function($e){var St=_e($e.x0),Qt=_e($e.x1),Gt=Ce($e.y0),_t=Ce($e.y1),It=Qt-St,mt=_t-Gt;if(!It||!mt)return"";var er=l.marker.cornerradius||0,lr=Math.min(er,It/2,mt/2);lr&&$e.data&&$e.data.data&&$e.data.data.label&&(je&&(lr=Math.min(lr,De.t)),lt&&(lr=Math.min(lr,De.l)),pt&&(lr=Math.min(lr,De.r)),Vt&&(lr=Math.min(lr,De.b)));var wr=function(Lr,ti){return lr?"a"+Ee(lr,lr)+" 0 0 1 "+Ee(Lr,ti):""};return"M"+Ee(St,Gt+lr)+wr(lr,-lr)+"L"+Ee(Qt-lr,Gt)+wr(lr,lr)+"L"+Ee(Qt,_t-lr)+wr(-lr,lr)+"L"+Ee(St+lr,_t)+wr(-lr,-lr)+"Z"},ut=function($e,St){var Qt=$e.x0,Gt=$e.x1,_t=$e.y0,It=$e.y1,mt=$e.textBB,er=je||St.isHeader&&!Vt,lr=er?"start":Vt?"end":"middle",wr=ce("right"),Lr=ce("left")||St.onPathbar,ti=Lr?-1:wr?1:0;if(St.isHeader){if(Qt+=(c?De:De.l)-sLe,Gt-=(c?De:De.r)-sLe,Qt>=Gt){var Br=(Qt+Gt)/2;Qt=Br,Gt=Br}var Vr;Vt?(Vr=It-(c?De:De.b),_t{"use strict";var JLt=Oa(),$Lt=i1(),QLt=bv(),ePt=QLt.clearMinTextSize,tPt=V0().resizeText,cLe=uLe();fLe.exports=function(t,r,n,i,a){var o=a.type,s=a.drawDescendants,l=t._fullLayout,u=l["_"+o+"layer"],c,f,h=!n;if(ePt(o,l),c=u.selectAll("g.trace."+o).data(r,function(v){return v[0].trace.uid}),c.enter().append("g").classed("trace",!0).classed(o,!0),c.order(),!l.uniformtext.mode&&$Lt.hasTransition(n)){i&&(f=i());var d=JLt.transition().duration(n.duration).ease(n.easing).each("end",function(){f&&f()}).each("interrupt",function(){f&&f()});d.each(function(){u.selectAll("g.trace").each(function(v){cLe(t,v,this,n,s)})})}else c.each(function(v){cLe(t,v,this,n,s)}),l.uniformtext.mode&&tPt(t,u.selectAll(".trace"),o);h&&c.exit().remove()}});var gLe=ye((E0r,pLe)=>{"use strict";var hLe=Oa(),KD=Dr(),dLe=So(),rPt=Zl(),iPt=rX(),vLe=ZD().styleOne,uX=W2(),nx=i1(),nPt=$E(),aPt=WD().formatSliceLabel,cX=!1;pLe.exports=function(t,r,n,i,a){var o=a.width,s=a.height,l=a.viewX,u=a.viewY,c=a.pathSlice,f=a.toMoveInsideSlice,h=a.strTransform,d=a.hasTransition,v=a.handleSlicesExit,_=a.makeUpdateSliceInterpolator,b=a.makeUpdateTextInterpolator,p=a.prevEntry,k={},E=t._context.staticPlot,T=t._fullLayout,L=r[0],x=L.trace,C=x.textposition.indexOf("left")!==-1,M=x.textposition.indexOf("right")!==-1,g=x.textposition.indexOf("bottom")!==-1,P=!g&&!x.marker.pad.t||g&&!x.marker.pad.b,A=iPt(n,[o,s],{packing:x.tiling.packing,squarifyratio:x.tiling.squarifyratio,flipX:x.tiling.flip.indexOf("x")>-1,flipY:x.tiling.flip.indexOf("y")>-1,pad:{inner:x.tiling.pad,top:x.marker.pad.t,left:x.marker.pad.l,right:x.marker.pad.r,bottom:x.marker.pad.b}}),z=A.descendants(),O=1/0,U=-1/0;z.forEach(function(H){var re=H.depth;re>=x._maxDepth?(H.x0=H.x1=(H.x0+H.x1)/2,H.y0=H.y1=(H.y0+H.y1)/2):(O=Math.min(O,re),U=Math.max(U,re))}),i=i.data(z,nx.getPtId),x._maxVisibleLayers=isFinite(U)?U-O+1:0,i.enter().append("g").classed("slice",!0),v(i,cX,k,[o,s],c),i.order();var G=null;if(d&&p){var Z=nx.getPtId(p);i.each(function(H){G===null&&nx.getPtId(H)===Z&&(G={x0:H.x0,x1:H.x1,y0:H.y0,y1:H.y1})})}var j=function(){return G||{x0:0,x1:o,y0:0,y1:s}},N=i;return d&&(N=N.transition().each("end",function(){var H=hLe.select(this);nx.setSliceCursor(H,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),N.each(function(H){var re=nx.isHeader(H,x);H._x0=l(H.x0),H._x1=l(H.x1),H._y0=u(H.y0),H._y1=u(H.y1),H._hoverX=l(H.x1-x.marker.pad.r),H._hoverY=u(g?H.y1-x.marker.pad.b/2:H.y0+x.marker.pad.t/2);var oe=hLe.select(this),_e=KD.ensureSingle(oe,"path","surface",function(Ee){Ee.style("pointer-events",E?"none":"all")});d?_e.transition().attrTween("d",function(Ee){var Ae=_(Ee,cX,j(),[o,s]);return function(Be){return c(Ae(Be))}}):_e.attr("d",c),oe.call(nPt,n,t,r,{styleOne:vLe,eventDataKeys:uX.eventDataKeys,transitionTime:uX.CLICK_TRANSITION_TIME,transitionEasing:uX.CLICK_TRANSITION_EASING}).call(nx.setSliceCursor,t,{isTransitioning:t._transitioning}),_e.call(vLe,H,x,t,{hovered:!1}),H.x0===H.x1||H.y0===H.y1?H._text="":re?H._text=P?"":nx.getPtLabel(H)||"":H._text=aPt(H,n,x,r,T)||"";var Ce=KD.ensureSingle(oe,"g","slicetext"),Le=KD.ensureSingle(Ce,"text","",function(Ee){Ee.attr("data-notex",1)}),ge=KD.ensureUniformFontSize(t,nx.determineTextFont(x,H,T.font)),ie=H._text||" ",Se=re&&ie.indexOf("
")===-1;Le.text(ie).classed("slicetext",!0).attr("text-anchor",M?"end":C||Se?"start":"middle").call(dLe.font,ge).call(rPt.convertToTspans,t),H.textBB=dLe.bBox(Le.node()),H.transform=f(H,{fontSize:ge.size,isHeader:re}),H.transform.fontSize=ge.size,d?Le.transition().attrTween("transform",function(Ee){var Ae=b(Ee,cX,j(),[o,s]);return function(Be){return h(Ae(Be))}}):Le.attr("transform",h(H))}),G}});var yLe=ye((k0r,mLe)=>{"use strict";var oPt=lX(),sPt=gLe();mLe.exports=function(t,r,n,i){return oPt(t,r,n,i,{type:"treemap",drawDescendants:sPt})}});var xLe=ye((C0r,_Le)=>{"use strict";_Le.exports={moduleType:"trace",name:"treemap",basePlotModule:z6e(),categories:[],animatable:!0,attributes:XD(),layoutAttributes:$W(),supplyDefaults:j6e(),supplyLayoutDefaults:X6e(),calc:eX().calc,crossTraceCalc:eX().crossTraceCalc,plot:yLe(),style:ZD().style,colorbar:$d(),meta:{}}});var wLe=ye((L0r,bLe)=>{"use strict";bLe.exports=xLe()});var ALe=ye(GA=>{"use strict";var TLe=Mc();GA.name="icicle";GA.plot=function(e,t,r,n){TLe.plotBasePlot(GA.name,e,t,r,n)};GA.clean=function(e,t,r,n){TLe.cleanBasePlot(GA.name,e,t,r,n)}});var fX=ye((I0r,ELe)=>{"use strict";var{hovertemplateAttrs:lPt,texttemplateAttrs:uPt,templatefallbackAttrs:SLe}=Ll(),cPt=Tu(),fPt=Cc().attributes,tk=F2(),s0=qE(),JD=XD(),MLe=W2(),hPt=Ao().extendFlat,dPt=Pd().pattern;ELe.exports={labels:s0.labels,parents:s0.parents,values:s0.values,branchvalues:s0.branchvalues,count:s0.count,level:s0.level,maxdepth:s0.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:JD.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:hPt({colors:s0.marker.colors,line:s0.marker.line,pattern:dPt,editType:"calc"},cPt("marker",{colorAttr:"colors",anim:!1})),leaf:s0.leaf,pathbar:JD.pathbar,text:tk.text,textinfo:s0.textinfo,texttemplate:uPt({editType:"plot"},{keys:MLe.eventDataKeys.concat(["label","value"])}),texttemplatefallback:SLe({editType:"plot"}),hovertext:tk.hovertext,hoverinfo:s0.hoverinfo,hovertemplate:lPt({},{keys:MLe.eventDataKeys}),hovertemplatefallback:SLe(),textfont:tk.textfont,insidetextfont:tk.insidetextfont,outsidetextfont:JD.outsidetextfont,textposition:JD.textposition,sort:tk.sort,root:s0.root,domain:fPt({name:"icicle",trace:!0,editType:"calc"})}});var hX=ye((R0r,kLe)=>{"use strict";kLe.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var ILe=ye((D0r,PLe)=>{"use strict";var CLe=Dr(),vPt=fX(),pPt=ka(),gPt=Cc().defaults,mPt=i0().handleText,yPt=A_().TEXTPAD,_Pt=z2().handleMarkerDefaults,LLe=tc(),xPt=LLe.hasColorscale,bPt=LLe.handleDefaults;PLe.exports=function(t,r,n,i){function a(d,v){return CLe.coerce(t,r,vPt,d,v)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=a("values");l&&l.length?a("branchvalues"):a("count"),a("level"),a("maxdepth"),a("tiling.orientation"),a("tiling.flip"),a("tiling.pad");var u=a("text");a("texttemplate"),a("texttemplatefallback"),r.texttemplate||a("textinfo",CLe.isArrayOrTypedArray(u)?"text+label":"label"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var c=a("pathbar.visible"),f="auto";mPt(t,r,i,a,f,{hasPathbar:c,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("textposition"),_Pt(t,r,i,a);var h=r._hasColorscale=xPt(t,"marker","colors")||(t.marker||{}).coloraxis;h&&bPt(t,r,i,a,{prefix:"marker.",cLetter:"c"}),a("leaf.opacity",h?1:.7),r._hovered={marker:{line:{width:2,color:pPt.contrast(i.paper_bgcolor)}}},c&&(a("pathbar.thickness",r.pathbar.textfont.size+2*yPt),a("pathbar.side"),a("pathbar.edgeshape")),a("sort"),a("root.color"),gPt(r,i,a),r._length=null}});var DLe=ye((F0r,RLe)=>{"use strict";var wPt=Dr(),TPt=hX();RLe.exports=function(t,r){function n(i,a){return wPt.coerce(t,r,TPt,i,a)}n("iciclecolorway",r.colorway),n("extendiciclecolors")}});var vX=ye(dX=>{"use strict";var FLe=UE();dX.calc=function(e,t){return FLe.calc(e,t)};dX.crossTraceCalc=function(e){return FLe._runCrossTraceCalc("icicle",e)}});var OLe=ye((O0r,zLe)=>{"use strict";var APt=BE(),SPt=tX();zLe.exports=function(t,r,n){var i=n.flipX,a=n.flipY,o=n.orientation==="h",s=n.maxDepth,l=r[0],u=r[1];s&&(l=(t.height+1)*r[0]/Math.min(t.height+1,s),u=(t.height+1)*r[1]/Math.min(t.height+1,s));var c=APt.partition().padding(n.pad.inner).size(o?[r[1],l]:[r[0],u])(t);return(o||i||a)&&SPt(c,r,{swapXY:o,flipX:i,flipY:a}),c}});var pX=ye((q0r,VLe)=>{"use strict";var qLe=Oa(),BLe=ka(),NLe=Dr(),MPt=bv().resizeText,EPt=HD();function kPt(e){var t=e._fullLayout._iciclelayer.selectAll(".trace");MPt(e,t,"icicle"),t.each(function(r){var n=qLe.select(this),i=r[0],a=i.trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each(function(o){qLe.select(this).call(ULe,o,a,e)})})}function ULe(e,t,r,n){var i=t.data.data,a=!t.children,o=i.i,s=NLe.castOption(r,o,"marker.line.color")||BLe.defaultLine,l=NLe.castOption(r,o,"marker.line.width")||0;e.call(EPt,t,r,n).style("stroke-width",l).call(BLe.stroke,s).style("opacity",a?r.leaf.opacity:null)}VLe.exports={style:kPt,styleOne:ULe}});var XLe=ye((B0r,WLe)=>{"use strict";var GLe=Oa(),$D=Dr(),HLe=So(),CPt=Zl(),LPt=OLe(),jLe=pX().styleOne,gX=W2(),HA=i1(),PPt=$E(),IPt=WD().formatSliceLabel,mX=!1;WLe.exports=function(t,r,n,i,a){var o=a.width,s=a.height,l=a.viewX,u=a.viewY,c=a.pathSlice,f=a.toMoveInsideSlice,h=a.strTransform,d=a.hasTransition,v=a.handleSlicesExit,_=a.makeUpdateSliceInterpolator,b=a.makeUpdateTextInterpolator,p=a.prevEntry,k={},E=t._context.staticPlot,T=t._fullLayout,L=r[0],x=L.trace,C=x.textposition.indexOf("left")!==-1,M=x.textposition.indexOf("right")!==-1,g=x.textposition.indexOf("bottom")!==-1,P=LPt(n,[o,s],{flipX:x.tiling.flip.indexOf("x")>-1,flipY:x.tiling.flip.indexOf("y")>-1,orientation:x.tiling.orientation,pad:{inner:x.tiling.pad},maxDepth:x._maxDepth}),A=P.descendants(),z=1/0,O=-1/0;A.forEach(function(N){var H=N.depth;H>=x._maxDepth?(N.x0=N.x1=(N.x0+N.x1)/2,N.y0=N.y1=(N.y0+N.y1)/2):(z=Math.min(z,H),O=Math.max(O,H))}),i=i.data(A,HA.getPtId),x._maxVisibleLayers=isFinite(O)?O-z+1:0,i.enter().append("g").classed("slice",!0),v(i,mX,k,[o,s],c),i.order();var U=null;if(d&&p){var G=HA.getPtId(p);i.each(function(N){U===null&&HA.getPtId(N)===G&&(U={x0:N.x0,x1:N.x1,y0:N.y0,y1:N.y1})})}var Z=function(){return U||{x0:0,x1:o,y0:0,y1:s}},j=i;return d&&(j=j.transition().each("end",function(){var N=GLe.select(this);HA.setSliceCursor(N,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),j.each(function(N){N._x0=l(N.x0),N._x1=l(N.x1),N._y0=u(N.y0),N._y1=u(N.y1),N._hoverX=l(N.x1-x.tiling.pad),N._hoverY=u(g?N.y1-x.tiling.pad/2:N.y0+x.tiling.pad/2);var H=GLe.select(this),re=$D.ensureSingle(H,"path","surface",function(Le){Le.style("pointer-events",E?"none":"all")});d?re.transition().attrTween("d",function(Le){var ge=_(Le,mX,Z(),[o,s],{orientation:x.tiling.orientation,flipX:x.tiling.flip.indexOf("x")>-1,flipY:x.tiling.flip.indexOf("y")>-1});return function(ie){return c(ge(ie))}}):re.attr("d",c),H.call(PPt,n,t,r,{styleOne:jLe,eventDataKeys:gX.eventDataKeys,transitionTime:gX.CLICK_TRANSITION_TIME,transitionEasing:gX.CLICK_TRANSITION_EASING}).call(HA.setSliceCursor,t,{isTransitioning:t._transitioning}),re.call(jLe,N,x,t,{hovered:!1}),N.x0===N.x1||N.y0===N.y1?N._text="":N._text=IPt(N,n,x,r,T)||"";var oe=$D.ensureSingle(H,"g","slicetext"),_e=$D.ensureSingle(oe,"text","",function(Le){Le.attr("data-notex",1)}),Ce=$D.ensureUniformFontSize(t,HA.determineTextFont(x,N,T.font));_e.text(N._text||" ").classed("slicetext",!0).attr("text-anchor",M?"end":C?"start":"middle").call(HLe.font,Ce).call(CPt.convertToTspans,t),N.textBB=HLe.bBox(_e.node()),N.transform=f(N,{fontSize:Ce.size}),N.transform.fontSize=Ce.size,d?_e.transition().attrTween("transform",function(Le){var ge=b(Le,mX,Z(),[o,s]);return function(ie){return h(ge(ie))}}):_e.attr("transform",h(N))}),U}});var YLe=ye((N0r,ZLe)=>{"use strict";var RPt=lX(),DPt=XLe();ZLe.exports=function(t,r,n,i){return RPt(t,r,n,i,{type:"icicle",drawDescendants:DPt})}});var JLe=ye((U0r,KLe)=>{"use strict";KLe.exports={moduleType:"trace",name:"icicle",basePlotModule:ALe(),categories:[],animatable:!0,attributes:fX(),layoutAttributes:hX(),supplyDefaults:ILe(),supplyLayoutDefaults:DLe(),calc:vX().calc,crossTraceCalc:vX().crossTraceCalc,plot:YLe(),style:pX().style,colorbar:$d(),meta:{}}});var QLe=ye((V0r,$Le)=>{"use strict";$Le.exports=JLe()});var tPe=ye(jA=>{"use strict";var ePe=Mc();jA.name="funnelarea";jA.plot=function(e,t,r,n){ePe.plotBasePlot(jA.name,e,t,r,n)};jA.clean=function(e,t,r,n){ePe.cleanBasePlot(jA.name,e,t,r,n)}});var yX=ye((H0r,iPe)=>{"use strict";var iv=F2(),FPt=Gl(),zPt=Cc().attributes,{hovertemplateAttrs:OPt,texttemplateAttrs:qPt,templatefallbackAttrs:rPe}=Ll(),Y2=Ao().extendFlat;iPe.exports={labels:iv.labels,label0:iv.label0,dlabel:iv.dlabel,values:iv.values,marker:{colors:iv.marker.colors,line:{color:Y2({},iv.marker.line.color,{dflt:null}),width:Y2({},iv.marker.line.width,{dflt:1}),editType:"calc"},pattern:iv.marker.pattern,editType:"calc"},text:iv.text,hovertext:iv.hovertext,scalegroup:Y2({},iv.scalegroup,{}),textinfo:Y2({},iv.textinfo,{flags:["label","text","value","percent"]}),texttemplate:qPt({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:rPe({editType:"plot"}),hoverinfo:Y2({},FPt.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:OPt({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:rPe(),textposition:Y2({},iv.textposition,{values:["inside","none"],dflt:"inside"}),textfont:iv.textfont,insidetextfont:iv.insidetextfont,title:{text:iv.title.text,font:iv.title.font,position:Y2({},iv.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:zPt({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot"},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot"}}});var _X=ye((j0r,nPe)=>{"use strict";var BPt=_D().hiddenlabels;nPe.exports={hiddenlabels:BPt,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var sPe=ye((W0r,oPe)=>{"use strict";var aPe=Dr(),NPt=yX(),UPt=Cc().defaults,VPt=i0().handleText,GPt=z2().handleLabelsAndValues,HPt=z2().handleMarkerDefaults;oPe.exports=function(t,r,n,i){function a(_,b){return aPe.coerce(t,r,NPt,_,b)}var o=a("labels"),s=a("values"),l=GPt(o,s),u=l.len;if(r._hasLabels=l.hasLabels,r._hasValues=l.hasValues,!r._hasLabels&&r._hasValues&&(a("label0"),a("dlabel")),!u){r.visible=!1;return}r._length=u,HPt(t,r,i,a),a("scalegroup");var c=a("text"),f=a("texttemplate");a("texttemplatefallback");var h;if(f||(h=a("textinfo",Array.isArray(c)?"text+percent":"percent")),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),f||h&&h!=="none"){var d=a("textposition");VPt(t,r,i,a,d,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else h==="none"&&a("textposition","none");UPt(r,i,a);var v=a("title.text");v&&(a("title.position"),aPe.coerceFont(a,"title.font",i.font)),a("aspectratio"),a("baseratio")}});var uPe=ye((X0r,lPe)=>{"use strict";var jPt=Dr(),WPt=_X();lPe.exports=function(t,r){function n(i,a){return jPt.coerce(t,r,WPt,i,a)}n("hiddenlabels"),n("funnelareacolorway",r.colorway),n("extendfunnelareacolors")}});var xX=ye((Z0r,fPe)=>{"use strict";var cPe=EA();function XPt(e,t){return cPe.calc(e,t)}function ZPt(e){cPe.crossTraceCalc(e,{type:"funnelarea"})}fPe.exports={calc:XPt,crossTraceCalc:ZPt}});var gPe=ye((Y0r,pPe)=>{"use strict";var K2=Oa(),bX=So(),ax=Dr(),YPt=ax.strScale,hPe=ax.strTranslate,dPe=Zl(),KPt=d2(),JPt=KPt.toMoveInsideBar,vPe=bv(),$Pt=vPe.recordMinTextSize,QPt=vPe.clearMinTextSize,eIt=g_(),WA=TD(),tIt=WA.attachFxHandlers,rIt=WA.determineInsideTextFont,iIt=WA.layoutAreas,nIt=WA.prerenderTitles,aIt=WA.positionTitleOutside,oIt=WA.formatSliceLabel;pPe.exports=function(t,r){var n=t._context.staticPlot,i=t._fullLayout;QPt("funnelarea",i),nIt(r,t),iIt(r,i._size),ax.makeTraceGroups(i._funnelarealayer,r,"trace").each(function(a){var o=K2.select(this),s=a[0],l=s.trace;lIt(a),o.each(function(){var u=K2.select(this).selectAll("g.slice").data(a);u.enter().append("g").classed("slice",!0),u.exit().remove(),u.each(function(f,h){if(f.hidden){K2.select(this).selectAll("path,g").remove();return}f.pointNumber=f.i,f.curveNumber=l.index;var d=s.cx,v=s.cy,_=K2.select(this),b=_.selectAll("path.surface").data([f]);b.enter().append("path").classed("surface",!0).style({"pointer-events":n?"none":"all"}),_.call(tIt,t,a);var p="M"+(d+f.TR[0])+","+(v+f.TR[1])+wX(f.TR,f.BR)+wX(f.BR,f.BL)+wX(f.BL,f.TL)+"Z";b.attr("d",p),oIt(t,f,s);var k=eIt.castOption(l.textposition,f.pts),E=_.selectAll("g.slicetext").data(f.text&&k!=="none"?[0]:[]);E.enter().append("g").classed("slicetext",!0),E.exit().remove(),E.each(function(){var T=ax.ensureSingle(K2.select(this),"text","",function(z){z.attr("data-notex",1)}),L=ax.ensureUniformFontSize(t,rIt(l,f,i.font));T.text(f.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(bX.font,L).call(dPe.convertToTspans,t);var x=bX.bBox(T.node()),C,M,g,P=Math.min(f.BL[1],f.BR[1])+v,A=Math.max(f.TL[1],f.TR[1])+v;M=Math.max(f.TL[0],f.BL[0])+d,g=Math.min(f.TR[0],f.BR[0])+d,C=JPt(M,g,P,A,x,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),C.fontSize=L.size,$Pt(l.type,C,i),a[h].transform=C,ax.setTransormAndDisplay(T,C)})});var c=K2.select(this).selectAll("g.titletext").data(l.title.text?[0]:[]);c.enter().append("g").classed("titletext",!0),c.exit().remove(),c.each(function(){var f=ax.ensureSingle(K2.select(this),"text","",function(v){v.attr("data-notex",1)}),h=l.title.text;l._meta&&(h=ax.templateString(h,l._meta)),f.text(h).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(bX.font,l.title.font).call(dPe.convertToTspans,t);var d=aIt(s,i._size);f.attr("transform",hPe(d.x,d.y)+YPt(Math.min(1,d.scale))+hPe(d.tx,d.ty))})})})};function wX(e,t){var r=t[0]-e[0],n=t[1]-e[1];return"l"+r+","+n}function sIt(e,t){return[.5*(e[0]+t[0]),.5*(e[1]+t[1])]}function lIt(e){if(!e.length)return;var t=e[0],r=t.trace,n=r.aspectratio,i=r.baseratio;i>.999&&(i=.999);var a=Math.pow(i,2),o=t.vTotal,s=o*a/(1-a),l=o,u=s/o;function c(){var O=Math.sqrt(u);return{x:O,y:-O}}function f(){var O=c();return[O.x,O.y]}var h,d=[];d.push(f());var v,_;for(v=e.length-1;v>-1;v--)if(_=e[v],!_.hidden){var b=_.v/l;u+=b,d.push(f())}var p=1/0,k=-1/0;for(v=0;v-1;v--)if(_=e[v],!_.hidden){P+=1;var A=d[P][0],z=d[P][1];_.TL=[-A,z],_.TR=[A,z],_.BL=M,_.BR=g,_.pxmid=sIt(_.TR,_.BR),M=_.TL,g=_.TR}}});var _Pe=ye((K0r,yPe)=>{"use strict";var mPe=Oa(),uIt=X3(),cIt=bv().resizeText;yPe.exports=function(t){var r=t._fullLayout._funnelarealayer.selectAll(".trace");cIt(t,r,"funnelarea"),r.each(function(n){var i=n[0],a=i.trace,o=mPe.select(this);o.style({opacity:a.opacity}),o.selectAll("path.surface").each(function(s){mPe.select(this).call(uIt,s,a,t)})})}});var bPe=ye((J0r,xPe)=>{"use strict";xPe.exports={moduleType:"trace",name:"funnelarea",basePlotModule:tPe(),categories:["pie-like","funnelarea","showLegend"],attributes:yX(),layoutAttributes:_X(),supplyDefaults:sPe(),supplyLayoutDefaults:uPe(),calc:xX().calc,crossTraceCalc:xX().crossTraceCalc,plot:gPe(),style:_Pe(),styleOne:X3(),meta:{}}});var TPe=ye(($0r,wPe)=>{"use strict";wPe.exports=bPe()});var zd=ye((Q0r,APe)=>{(function(){var e={24:function(i){var a={left:0,top:0};i.exports=o;function o(l,u,c){u=u||l.currentTarget||l.srcElement,Array.isArray(c)||(c=[0,0]);var f=l.clientX||0,h=l.clientY||0,d=s(u);return c[0]=f-d.left,c[1]=h-d.top,c}function s(l){return l===window||l===document||l===document.body?a:l.getBoundingClientRect()}},109:function(i){i.exports=a;function a(o,s,l,u){var c=l[0],f=l[2],h=s[0]-c,d=s[2]-f,v=Math.sin(u),_=Math.cos(u);return o[0]=c+d*v+h*_,o[1]=s[1],o[2]=f+d*_-h*v,o}},160:function(i){i.exports=a;function a(o,s,l){return o[0]=Math.max(s[0],l[0]),o[1]=Math.max(s[1],l[1]),o[2]=Math.max(s[2],l[2]),o[3]=Math.max(s[3],l[3]),o}},216:function(i){"use strict";i.exports=a;function a(o,s){for(var l={},u=0;u1){v[0]in h||(h[v[0]]=[]),h=h[v[0]];for(var _=1;_=0;--N){var Se=Z[N];H=Se[0];var Ee=U[H],Ae=Ee[0],Be=Ee[1],Pe=O[Ae],me=O[Be];if((Pe[0]-me[0]||Pe[1]-me[1])<0){var De=Ae;Ae=Be,Be=De}Ee[0]=Ae;var ce=Ee[1]=Se[1],je;for(j&&(je=Ee[2]);N>0&&Z[N-1][0]===H;){var Se=Z[--N],lt=Se[1];j?U.push([ce,lt,je]):U.push([ce,lt]),ce=lt}j?U.push([ce,Be,je]):U.push([ce,Be])}return re}function x(O,U,G){for(var Z=U.length,j=new s(Z),N=[],H=0;HU[2]?1:0)}function g(O,U,G){if(O.length!==0){if(U)for(var Z=0;Z0||H.length>0}function z(O,U,G){var Z;if(G){Z=U;for(var j=new Array(U.length),N=0;N{});function Ym(){}function sCe(){return this.rgb().formatHex()}function V6t(){return this.rgb().formatHex8()}function G6t(){return vCe(this).formatHsl()}function lCe(){return this.rgb().formatRgb()}function ex(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=F6t.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?uCe(t):r===3?new _d(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?MD(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?MD(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=z6t.exec(e))?new _d(t[1],t[2],t[3],1):(t=q6t.exec(e))?new _d(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=O6t.exec(e))?MD(t[1],t[2],t[3],t[4]):(t=B6t.exec(e))?MD(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=N6t.exec(e))?hCe(t[1],t[2]/100,t[3]/100,1):(t=U6t.exec(e))?hCe(t[1],t[2]/100,t[3]/100,t[4]):oCe.hasOwnProperty(e)?uCe(oCe[e]):e==="transparent"?new _d(NaN,NaN,NaN,0):null}function uCe(e){return new _d(e>>16&255,e>>8&255,e&255,1)}function MD(e,t,r,n){return n<=0&&(e=t=r=NaN),new _d(e,t,r,n)}function GE(e){return e instanceof Ym||(e=ex(e)),e?(e=e.rgb(),new _d(e.r,e.g,e.b,e.opacity)):new _d}function RA(e,t,r,n){return arguments.length===1?GE(e):new _d(e,t,r,n==null?1:n)}function _d(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function cCe(){return`#${q2(this.r)}${q2(this.g)}${q2(this.b)}`}function H6t(){return`#${q2(this.r)}${q2(this.g)}${q2(this.b)}${q2((isNaN(this.opacity)?1:this.opacity)*255)}`}function fCe(){let e=kD(this.opacity);return`${e===1?"rgb(":"rgba("}${O2(this.r)}, ${O2(this.g)}, ${O2(this.b)}${e===1?")":`, ${e})`}`}function kD(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function O2(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function q2(e){return e=O2(e),(e<16?"0":"")+e.toString(16)}function hCe(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Kg(e,t,r,n)}function vCe(e){if(e instanceof Kg)return new Kg(e.h,e.s,e.l,e.opacity);if(e instanceof Ym||(e=ex(e)),!e)return new Kg;if(e instanceof Kg)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,s=a-i,l=(a+i)/2;return s?(t===a?o=(r-n)/s+(r0&&l<1?0:o,new Kg(o,s,l,e.opacity)}function HE(e,t,r,n){return arguments.length===1?vCe(e):new Kg(e,t,r,n==null?1:n)}function Kg(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function dCe(e){return e=(e||0)%360,e<0?e+360:e}function ED(e){return Math.max(0,Math.min(1,e||0))}function EW(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var Q_,B2,IA,VE,Zm,F6t,z6t,q6t,O6t,B6t,N6t,U6t,oCe,CD=gu(()=>{SD();Q_=.7,B2=1/Q_,IA="\\s*([+-]?\\d+)\\s*",VE="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Zm="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",F6t=/^#([0-9a-f]{3,8})$/,z6t=new RegExp(`^rgb\\(${IA},${IA},${IA}\\)$`),q6t=new RegExp(`^rgb\\(${Zm},${Zm},${Zm}\\)$`),O6t=new RegExp(`^rgba\\(${IA},${IA},${IA},${VE}\\)$`),B6t=new RegExp(`^rgba\\(${Zm},${Zm},${Zm},${VE}\\)$`),N6t=new RegExp(`^hsl\\(${VE},${Zm},${Zm}\\)$`),U6t=new RegExp(`^hsla\\(${VE},${Zm},${Zm},${VE}\\)$`),oCe={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};t1(Ym,ex,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:sCe,formatHex:sCe,formatHex8:V6t,formatHsl:G6t,formatRgb:lCe,toString:lCe});t1(_d,RA,$_(Ym,{brighter(e){return e=e==null?B2:Math.pow(B2,e),new _d(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Q_:Math.pow(Q_,e),new _d(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new _d(O2(this.r),O2(this.g),O2(this.b),kD(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:cCe,formatHex:cCe,formatHex8:H6t,formatRgb:fCe,toString:fCe}));t1(Kg,HE,$_(Ym,{brighter(e){return e=e==null?B2:Math.pow(B2,e),new Kg(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Q_:Math.pow(Q_,e),new Kg(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new _d(EW(e>=240?e-240:e+120,i,n),EW(e,i,n),EW(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Kg(dCe(this.h),ED(this.s),ED(this.l),kD(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=kD(this.opacity);return`${e===1?"hsl(":"hsla("}${dCe(this.h)}, ${ED(this.s)*100}%, ${ED(this.l)*100}%${e===1?")":`, ${e})`}`}}))});var LD,PD,kW=gu(()=>{LD=Math.PI/180,PD=180/Math.PI});function xCe(e){if(e instanceof Km)return new Km(e.l,e.a,e.b,e.opacity);if(e instanceof r1)return bCe(e);e instanceof _d||(e=GE(e));var t=IW(e.r),r=IW(e.g),n=IW(e.b),i=CW((.2225045*t+.7168786*r+.0606169*n)/gCe),a,o;return t===r&&r===n?a=o=i:(a=CW((.4360747*t+.3850649*r+.1430804*n)/pCe),o=CW((.0139322*t+.0971045*r+.7141733*n)/mCe)),new Km(116*i-16,500*(a-i),200*(i-o),e.opacity)}function FA(e,t,r,n){return arguments.length===1?xCe(e):new Km(e,t,r,n==null?1:n)}function Km(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function CW(e){return e>j6t?Math.pow(e,1/3):e/_Ce+yCe}function LW(e){return e>DA?e*e*e:_Ce*(e-yCe)}function PW(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function IW(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function W6t(e){if(e instanceof r1)return new r1(e.h,e.c,e.l,e.opacity);if(e instanceof Km||(e=xCe(e)),e.a===0&&e.b===0)return new r1(NaN,0{SD();CD();kW();ID=18,pCe=.96422,gCe=1,mCe=.82521,yCe=4/29,DA=6/29,_Ce=3*DA*DA,j6t=DA*DA*DA;t1(Km,FA,$_(Ym,{brighter(e){return new Km(this.l+ID*(e==null?1:e),this.a,this.b,this.opacity)},darker(e){return new Km(this.l-ID*(e==null?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=pCe*LW(t),e=gCe*LW(e),r=mCe*LW(r),new _d(PW(3.1338561*t-1.6168667*e-.4906146*r),PW(-.9787684*t+1.9161415*e+.033454*r),PW(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));t1(r1,jE,$_(Ym,{brighter(e){return new r1(this.h,this.c,this.l+ID*(e==null?1:e),this.opacity)},darker(e){return new r1(this.h,this.c,this.l-ID*(e==null?1:e),this.opacity)},rgb(){return bCe(this).rgb()}}))});function X6t(e){if(e instanceof N2)return new N2(e.h,e.s,e.l,e.opacity);e instanceof _d||(e=GE(e));var t=e.r/255,r=e.g/255,n=e.b/255,i=(SCe*n+TCe*t-ACe*r)/(SCe+TCe-ACe),a=n-i,o=(WE*(r-i)-DW*a)/RD,s=Math.sqrt(o*o+a*a)/(WE*i*(1-i)),l=s?Math.atan2(o,a)*PD-120:NaN;return new N2(l<0?l+360:l,s,i,e.opacity)}function zA(e,t,r,n){return arguments.length===1?X6t(e):new N2(e,t,r,n==null?1:n)}function N2(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}var MCe,RW,DW,RD,WE,TCe,ACe,SCe,ECe=gu(()=>{SD();CD();kW();MCe=-.14861,RW=1.78277,DW=-.29227,RD=-.90649,WE=1.97294,TCe=WE*RD,ACe=WE*RW,SCe=RW*DW-RD*MCe;t1(N2,zA,$_(Ym,{brighter(e){return e=e==null?B2:Math.pow(B2,e),new N2(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Q_:Math.pow(Q_,e),new N2(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*LD,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),i=Math.sin(e);return new _d(255*(t+r*(MCe*n+RW*i)),255*(t+r*(DW*n+RD*i)),255*(t+r*(WE*n)),this.opacity)}}))});var U2=gu(()=>{CD();wCe();ECe()});function FW(e,t,r,n,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*r+(1+3*e+3*a-3*o)*n+o*i)/6}function DD(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[n],a=e[n+1],o=n>0?e[n-1]:2*i-a,s=n{});function zD(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),i=e[(n+t-1)%t],a=e[n%t],o=e[(n+1)%t],s=e[(n+2)%t];return FW((r-n/t)*t,i,a,o,s)}}var zW=gu(()=>{FD()});var qA,qW=gu(()=>{qA=e=>()=>e});function kCe(e,t){return function(r){return e+r*t}}function Z6t(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function tx(e,t){var r=t-e;return r?kCe(e,r>180||r<-180?r-360*Math.round(r/360):r):qA(isNaN(e)?t:e)}function CCe(e){return(e=+e)==1?$f:function(t,r){return r-t?Z6t(t,r,e):qA(isNaN(t)?r:t)}}function $f(e,t){var r=t-e;return r?kCe(e,r):qA(isNaN(e)?t:e)}var V2=gu(()=>{qW()});function LCe(e){return function(t){var r=t.length,n=new Array(r),i=new Array(r),a=new Array(r),o,s;for(o=0;o{U2();FD();zW();V2();XE=function e(t){var r=CCe(t);function n(i,a){var o=r((i=RA(i)).r,(a=RA(a)).r),s=r(i.g,a.g),l=r(i.b,a.b),u=$f(i.opacity,a.opacity);return function(c){return i.r=o(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return n.gamma=e,n}(1);PCe=LCe(DD),ICe=LCe(zD)});function OA(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;i{});function RCe(e,t){return(qD(t)?OA:BW)(e,t)}function BW(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),o;for(o=0;o{ZE();OD()});function BD(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}var UW=gu(()=>{});function zp(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var YE=gu(()=>{});function ND(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=rx(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var VW=gu(()=>{ZE()});function Y6t(e){return function(){return e}}function K6t(e){return function(t){return e(t)+""}}function UD(e,t){var r=HW.lastIndex=GW.lastIndex=0,n,i,a,o=-1,s=[],l=[];for(e=e+"",t=t+"";(n=HW.exec(e))&&(i=GW.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:zp(n,i)})),r=GW.lastIndex;return r{YE();HW=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,GW=new RegExp(HW.source,"g")});function rx(e,t){var r=typeof t,n;return t==null||r==="boolean"?qA(t):(r==="number"?zp:r==="string"?(n=ex(t))?(t=n,XE):UD:t instanceof ex?XE:t instanceof Date?BD:qD(t)?OA:Array.isArray(t)?BW:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?ND:zp)(e,t)}var ZE=gu(()=>{U2();OW();NW();UW();YE();VW();jW();qW();OD()});function DCe(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}var FCe=gu(()=>{});function zCe(e,t){var r=tx(+e,+t);return function(n){var i=r(n);return i-360*Math.floor(i/360)}}var qCe=gu(()=>{V2()});function OCe(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var BCe=gu(()=>{});function WW(e,t,r,n,i,a){var o,s,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),e*n{NCe=180/Math.PI,VD={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function VCe(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?VD:WW(t.a,t.b,t.c,t.d,t.e,t.f)}function GCe(e){return e==null?VD:(GD||(GD=document.createElementNS("http://www.w3.org/2000/svg","g")),GD.setAttribute("transform",e),(e=GD.transform.baseVal.consolidate())?(e=e.matrix,WW(e.a,e.b,e.c,e.d,e.e,e.f)):VD)}var GD,HCe=gu(()=>{UCe()});function jCe(e,t,r,n){function i(u){return u.length?u.pop()+" ":""}function a(u,c,f,h,d,v){if(u!==f||c!==h){var m=d.push("translate(",null,t,null,r);v.push({i:m-4,x:zp(u,f)},{i:m-2,x:zp(c,h)})}else(f||h)&&d.push("translate("+f+t+h+r)}function o(u,c,f,h){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),h.push({i:f.push(i(f)+"rotate(",null,n)-2,x:zp(u,c)})):c&&f.push(i(f)+"rotate("+c+n)}function s(u,c,f,h){u!==c?h.push({i:f.push(i(f)+"skewX(",null,n)-2,x:zp(u,c)}):c&&f.push(i(f)+"skewX("+c+n)}function l(u,c,f,h,d,v){if(u!==f||c!==h){var m=d.push(i(d)+"scale(",null,",",null,")");v.push({i:m-4,x:zp(u,f)},{i:m-2,x:zp(c,h)})}else(f!==1||h!==1)&&d.push(i(d)+"scale("+f+","+h+")")}return function(u,c){var f=[],h=[];return u=e(u),c=e(c),a(u.translateX,u.translateY,c.translateX,c.translateY,f,h),o(u.rotate,c.rotate,f,h),s(u.skewX,c.skewX,f,h),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,h),u=c=null,function(d){for(var v=-1,m=h.length,b;++v{YE();HCe();WCe=jCe(VCe,"px, ","px)","deg)"),XCe=jCe(GCe,", ",")",")")});function YCe(e){return((e=Math.exp(e))+1/e)/2}function $6t(e){return((e=Math.exp(e))-1/e)/2}function Q6t(e){return((e=Math.exp(2*e))-1)/(e+1)}var J6t,KCe,JCe=gu(()=>{J6t=1e-12;KCe=function e(t,r,n){function i(a,o){var s=a[0],l=a[1],u=a[2],c=o[0],f=o[1],h=o[2],d=c-s,v=f-l,m=d*d+v*v,b,p;if(m{U2();V2();QCe=$Ce(tx),e6e=$Ce($f)});function XW(e,t){var r=$f((e=FA(e)).l,(t=FA(t)).l),n=$f(e.a,t.a),i=$f(e.b,t.b),a=$f(e.opacity,t.opacity);return function(o){return e.l=r(o),e.a=n(o),e.b=i(o),e.opacity=a(o),e+""}}var r6e=gu(()=>{U2();V2()});function i6e(e){return function(t,r){var n=e((t=jE(t)).h,(r=jE(r)).h),i=$f(t.c,r.c),a=$f(t.l,r.l),o=$f(t.opacity,r.opacity);return function(s){return t.h=n(s),t.c=i(s),t.l=a(s),t.opacity=o(s),t+""}}}var n6e,a6e,o6e=gu(()=>{U2();V2();n6e=i6e(tx),a6e=i6e($f)});function s6e(e){return function t(r){r=+r;function n(i,a){var o=e((i=zA(i)).h,(a=zA(a)).h),s=$f(i.s,a.s),l=$f(i.l,a.l),u=$f(i.opacity,a.opacity);return function(c){return i.h=o(c),i.s=s(c),i.l=l(Math.pow(c,r)),i.opacity=u(c),i+""}}return n.gamma=t,n}(1)}var l6e,u6e,c6e=gu(()=>{U2();V2();l6e=s6e(tx),u6e=s6e($f)});function ZW(e,t){t===void 0&&(t=e,e=rx);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r{ZE()});function h6e(e,t){for(var r=new Array(t),n=0;n{});var G2={};mee(G2,{interpolate:()=>rx,interpolateArray:()=>RCe,interpolateBasis:()=>DD,interpolateBasisClosed:()=>zD,interpolateCubehelix:()=>l6e,interpolateCubehelixLong:()=>u6e,interpolateDate:()=>BD,interpolateDiscrete:()=>DCe,interpolateHcl:()=>n6e,interpolateHclLong:()=>a6e,interpolateHsl:()=>QCe,interpolateHslLong:()=>e6e,interpolateHue:()=>zCe,interpolateLab:()=>XW,interpolateNumber:()=>zp,interpolateNumberArray:()=>OA,interpolateObject:()=>ND,interpolateRgb:()=>XE,interpolateRgbBasis:()=>PCe,interpolateRgbBasisClosed:()=>ICe,interpolateRound:()=>OCe,interpolateString:()=>UD,interpolateTransformCss:()=>WCe,interpolateTransformSvg:()=>XCe,interpolateZoom:()=>KCe,piecewise:()=>ZW,quantize:()=>h6e});var H2=gu(()=>{ZE();NW();FD();zW();UW();FCe();qCe();YE();OD();VW();BCe();jW();ZCe();JCe();OW();t6e();r6e();o6e();c6e();f6e();d6e()});var HD=ye((v0r,v6e)=>{"use strict";var eLt=So(),tLt=ka();v6e.exports=function(t,r,n,i,a){var o=r.data.data,s=o.i,l=a||o.color;if(s>=0){r.i=o.i;var u=n.marker;u.pattern?(!u.colors||!u.pattern.shape)&&(u.color=l,r.color=l):(u.color=l,r.color=l),eLt.pointStyle(t,n,i,r)}else tLt.fill(t,l)}});var YW=ye((p0r,_6e)=>{"use strict";var p6e=qa(),g6e=ka(),m6e=Pr(),rLt=bv().resizeText,iLt=HD();function nLt(e){var t=e._fullLayout._sunburstlayer.selectAll(".trace");rLt(e,t,"sunburst"),t.each(function(r){var n=p6e.select(this),i=r[0],a=i.trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each(function(o){p6e.select(this).call(y6e,o,a,e)})})}function y6e(e,t,r,n){var i=t.data.data,a=!t.children,o=i.i,s=m6e.castOption(r,o,"marker.line.color")||g6e.defaultLine,l=m6e.castOption(r,o,"marker.line.width")||0;e.call(iLt,t,r,n).style("stroke-width",l).call(g6e.stroke,s).style("opacity",a?r.leaf.opacity:null)}_6e.exports={style:nLt,styleOne:y6e}});var i1=ye(Bs=>{"use strict";var j2=Pr(),aLt=ka(),oLt=Eg(),x6e=g_();Bs.findEntryWithLevel=function(e,t){var r;return t&&e.eachAfter(function(n){if(Bs.getPtId(n)===t)return r=n.copy()}),r||e};Bs.findEntryWithChild=function(e,t){var r;return e.eachAfter(function(n){for(var i=n.children||[],a=0;a0)};Bs.getMaxDepth=function(e){return e.maxdepth>=0?e.maxdepth:1/0};Bs.isHeader=function(e,t){return!(Bs.isLeaf(e)||e.depth===t._maxDepth-1)};function b6e(e){return e.data.data.pid}Bs.getParent=function(e,t){return Bs.findEntryWithLevel(e,b6e(t))};Bs.listPath=function(e,t){var r=e.parent;if(!r)return[];var n=t?[r.data[t]]:[r];return Bs.listPath(r,t).concat(n)};Bs.getPath=function(e){return Bs.listPath(e,"label").join("/")+"/"};Bs.formatValue=x6e.formatPieValue;Bs.formatPercent=function(e,t){var r=j2.formatPercent(e,0);return r==="0%"&&(r=x6e.formatPiePercent(e,t)),r}});var $E=ye((m0r,A6e)=>{"use strict";var BA=qa(),w6e=Oa(),uLt=ip().appendArrayPointValue,KE=vf(),T6e=Pr(),cLt=C3(),id=i1(),fLt=g_(),hLt=fLt.formatPieValue;A6e.exports=function(t,r,n,i,a){var o=i[0],s=o.trace,l=o.hierarchy,u=s.type==="sunburst",c=s.type==="treemap"||s.type==="icicle";"_hasHoverLabel"in s||(s._hasHoverLabel=!1),"_hasHoverEvent"in s||(s._hasHoverEvent=!1);var f=function(v){var m=n._fullLayout;if(!(n._dragging||m.hovermode===!1)){var b=n._fullData[s.index],p=v.data.data,k=p.i,M=id.isHierarchyRoot(v),T=id.getParent(l,v),L=id.getValue(v),x=function(ke){return T6e.castOption(b,k,ke)},C=x("hovertemplate"),S=KE.castHoverinfo(b,m,k),g=m.separators,P;if(C||S&&S!=="none"&&S!=="skip"){var E,z;u&&(E=o.cx+v.pxmid[0]*(1-v.rInscribed),z=o.cy+v.pxmid[1]*(1-v.rInscribed)),c&&(E=v._hoverX,z=v._hoverY);var q={},U=[],G=[],Z=function(ke){return U.indexOf(ke)!==-1};S&&(U=S==="all"?b._module.attributes.hoverinfo.flags:S.split("+")),q.label=p.label,Z("label")&&q.label&&G.push(q.label),p.hasOwnProperty("v")&&(q.value=p.v,q.valueLabel=hLt(q.value,g),Z("value")&&G.push(q.valueLabel)),q.currentPath=v.currentPath=id.getPath(v.data),Z("current path")&&!M&&G.push(q.currentPath);var j,N=[],H=function(){N.indexOf(j)===-1&&(G.push(j),N.push(j))};q.percentParent=v.percentParent=L/id.getValue(T),q.parent=v.parentString=id.getPtLabel(T),Z("percent parent")&&(j=id.formatPercent(q.percentParent,g)+" of "+q.parent,H()),q.percentEntry=v.percentEntry=L/id.getValue(r),q.entry=v.entry=id.getPtLabel(r),Z("percent entry")&&!M&&!v.onPathbar&&(j=id.formatPercent(q.percentEntry,g)+" of "+q.entry,H()),q.percentRoot=v.percentRoot=L/id.getValue(l),q.root=v.root=id.getPtLabel(l),Z("percent root")&&!M&&(j=id.formatPercent(q.percentRoot,g)+" of "+q.root,H()),q.text=x("hovertext")||x("text"),Z("text")&&(j=q.text,T6e.isValidTextValue(j)&&G.push(j)),P=[JE(v,b,a.eventDataKeys)];var re={trace:b,y:z,_x0:v._x0,_x1:v._x1,_y0:v._y0,_y1:v._y1,text:G.join("
"),name:C||Z("name")?b.name:void 0,color:x("hoverlabel.bgcolor")||p.color,borderColor:x("hoverlabel.bordercolor"),fontFamily:x("hoverlabel.font.family"),fontSize:x("hoverlabel.font.size"),fontColor:x("hoverlabel.font.color"),fontWeight:x("hoverlabel.font.weight"),fontStyle:x("hoverlabel.font.style"),fontVariant:x("hoverlabel.font.variant"),nameLength:x("hoverlabel.namelength"),textAlign:x("hoverlabel.align"),hovertemplate:C,hovertemplateLabels:q,eventData:P};u&&(re.x0=E-v.rInscribed*v.rpx1,re.x1=E+v.rInscribed*v.rpx1,re.idealAlign=v.pxmid[0]<0?"left":"right"),c&&(re.x=E,re.idealAlign=E<0?"left":"right");var oe=[];KE.loneHover(re,{container:m._hoverlayer.node(),outerContainer:m._paper.node(),gd:n,inOut_bbox:oe}),P[0].bbox=oe[0],s._hasHoverLabel=!0}if(c){var _e=t.select("path.surface");a.styleOne(_e,v,b,n,{hovered:!0})}s._hasHoverEvent=!0,n.emit("plotly_hover",{points:P||[JE(v,b,a.eventDataKeys)],event:BA.event})}},h=function(v){var m=n._fullLayout,b=n._fullData[s.index],p=BA.select(this).datum();if(s._hasHoverEvent&&(v.originalEvent=BA.event,n.emit("plotly_unhover",{points:[JE(p,b,a.eventDataKeys)],event:BA.event}),s._hasHoverEvent=!1),s._hasHoverLabel&&(KE.loneUnhover(m._hoverlayer.node()),s._hasHoverLabel=!1),c){var k=t.select("path.surface");a.styleOne(k,p,b,n,{hovered:!1})}},d=function(v){var m=n._fullLayout,b=n._fullData[s.index],p=u&&(id.isHierarchyRoot(v)||id.isLeaf(v)),k=id.getPtId(v),M=id.isEntry(v)?id.findEntryWithChild(l,k):id.findEntryWithLevel(l,k),T=id.getPtId(M),L={points:[JE(v,b,a.eventDataKeys)],event:BA.event};p||(L.nextLevel=T);var x=cLt.triggerHandler(n,"plotly_"+s.type+"click",L);if(x!==!1&&m.hovermode&&(n._hoverdata=[JE(v,b,a.eventDataKeys)],KE.click(n,BA.event)),!p&&x!==!1&&!n._dragging&&!n._transitioning){w6e.call("_storeDirectGUIEdit",b,m._tracePreGUI[b.uid],{level:b.level});var C={data:[{level:T}],traces:[s.index]},S={frame:{redraw:!1,duration:a.transitionTime},transition:{duration:a.transitionTime,easing:a.transitionEasing},mode:"immediate",fromcurrent:!0};KE.loneUnhover(m._hoverlayer.node()),w6e.call("animate",n,C,S)}};t.on("mouseover",f),t.on("mouseout",h),t.on("click",d)};function JE(e,t,r){for(var n=e.data.data,i={curveNumber:t.index,pointNumber:n.i,data:t._input,fullData:t},a=0;a{"use strict";var QE=qa(),dLt=BE(),Jg=(H2(),pb(G2)).interpolate,S6e=So(),Av=Pr(),vLt=Zl(),C6e=bv(),M6e=C6e.recordMinTextSize,pLt=C6e.clearMinTextSize,L6e=TD(),gLt=g_().getRotationAngle,mLt=L6e.computeTransform,yLt=L6e.transformInsideText,_Lt=YW().styleOne,xLt=V0().resizeText,bLt=$E(),KW=SW(),Rl=i1();jD.plot=function(e,t,r,n){var i=e._fullLayout,a=i._sunburstlayer,o,s,l=!r,u=!i.uniformtext.mode&&Rl.hasTransition(r);if(pLt("sunburst",i),o=a.selectAll("g.trace.sunburst").data(t,function(f){return f[0].trace.uid}),o.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),o.order(),u){n&&(s=n());var c=QE.transition().duration(r.duration).ease(r.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()});c.each(function(){a.selectAll("g.trace").each(function(f){E6e(e,f,this,r)})})}else o.each(function(f){E6e(e,f,this,r)}),i.uniformtext.mode&&xLt(e,i._sunburstlayer.selectAll(".trace"),"sunburst");l&&o.exit().remove()};function E6e(e,t,r,n){var i=e._context.staticPlot,a=e._fullLayout,o=!a.uniformtext.mode&&Rl.hasTransition(n),s=QE.select(r),l=s.selectAll("g.slice"),u=t[0],c=u.trace,f=u.hierarchy,h=Rl.findEntryWithLevel(f,c.level),d=Rl.getMaxDepth(c),v=a._size,m=c.domain,b=v.w*(m.x[1]-m.x[0]),p=v.h*(m.y[1]-m.y[0]),k=.5*Math.min(b,p),M=u.cx=v.l+v.w*(m.x[1]+m.x[0])/2,T=u.cy=v.t+v.h*(1-m.y[0])-p/2;if(!h)return l.remove();var L=null,x={};o&&l.each(function(ge){x[Rl.getPtId(ge)]={rpx0:ge.rpx0,rpx1:ge.rpx1,x0:ge.x0,x1:ge.x1,transform:ge.transform},!L&&Rl.isEntry(ge)&&(L=ge)});var C=wLt(h).descendants(),S=h.height+1,g=0,P=d;u.hasMultipleRoots&&Rl.isHierarchyRoot(h)&&(C=C.slice(1),S-=1,g=1,P+=1),C=C.filter(function(ge){return ge.y1<=P});var E=gLt(c.rotation);E&&C.forEach(function(ge){ge.x0+=E,ge.x1+=E});var z=Math.min(S,d),q=function(ge){return(ge-g)/z*k},U=function(ge,ie){return[ge*Math.cos(ie),-ge*Math.sin(ie)]},G=function(ge){return Av.pathAnnulus(ge.rpx0,ge.rpx1,ge.x0,ge.x1,M,T)},Z=function(ge){return M+k6e(ge)[0]*(ge.transform.rCenter||0)+(ge.transform.x||0)},j=function(ge){return T+k6e(ge)[1]*(ge.transform.rCenter||0)+(ge.transform.y||0)};l=l.data(C,Rl.getPtId),l.enter().append("g").classed("slice",!0),o?l.exit().transition().each(function(){var ge=QE.select(this),ie=ge.select("path.surface");ie.transition().attrTween("d",function(Ee){var we=oe(Ee);return function(De){return G(we(De))}});var Se=ge.select("g.slicetext");Se.attr("opacity",0)}).remove():l.exit().remove(),l.order();var N=null;if(o&&L){var H=Rl.getPtId(L);l.each(function(ge){N===null&&Rl.getPtId(ge)===H&&(N=ge.x1)})}var re=l;o&&(re=re.transition().each("end",function(){var ge=QE.select(this);Rl.setSliceCursor(ge,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),re.each(function(ge){var ie=QE.select(this),Se=Av.ensureSingle(ie,"path","surface",function(Pe){Pe.style("pointer-events",i?"none":"all")});ge.rpx0=q(ge.y0),ge.rpx1=q(ge.y1),ge.xmid=(ge.x0+ge.x1)/2,ge.pxmid=U(ge.rpx1,ge.xmid),ge.midangle=-(ge.xmid-Math.PI/2),ge.startangle=-(ge.x0-Math.PI/2),ge.stopangle=-(ge.x1-Math.PI/2),ge.halfangle=.5*Math.min(Av.angleDelta(ge.x0,ge.x1)||Math.PI,Math.PI),ge.ring=1-ge.rpx0/ge.rpx1,ge.rInscribed=TLt(ge,c),o?Se.transition().attrTween("d",function(Pe){var ce=_e(Pe);return function(He){return G(ce(He))}}):Se.attr("d",G),ie.call(bLt,h,e,t,{eventDataKeys:KW.eventDataKeys,transitionTime:KW.CLICK_TRANSITION_TIME,transitionEasing:KW.CLICK_TRANSITION_EASING}).call(Rl.setSliceCursor,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:e._transitioning}),Se.call(_Lt,ge,c,e);var Ee=Av.ensureSingle(ie,"g","slicetext"),we=Av.ensureSingle(Ee,"text","",function(Pe){Pe.attr("data-notex",1)}),De=Av.ensureUniformFontSize(e,Rl.determineTextFont(c,ge,a.font));we.text(jD.formatSliceLabel(ge,h,c,t,a)).classed("slicetext",!0).attr("text-anchor","middle").call(S6e.font,De).call(vLt.convertToTspans,e);var Le=S6e.bBox(we.node());ge.transform=yLt(Le,ge,u),ge.transform.targetX=Z(ge),ge.transform.targetY=j(ge);var me=function(Pe,ce){var He=Pe.transform;return mLt(He,ce),He.fontSize=De.size,M6e(c.type,He,a),Av.getTextTransform(He)};o?we.transition().attrTween("transform",function(Pe){var ce=ke(Pe);return function(He){return me(ce(He),Le)}}):we.attr("transform",me(ge,Le))});function oe(ge){var ie=Rl.getPtId(ge),Se=x[ie],Ee=x[Rl.getPtId(h)],we;if(Ee){var De=(ge.x1>Ee.x1?2*Math.PI:0)+E;we=ge.rpx1N?2*Math.PI:0)+E;Se={x0:we,x1:we}}else Se={rpx0:k,rpx1:k},Av.extendFlat(Se,Ce(ge));else Se={rpx0:0,rpx1:0};else Se={x0:E,x1:E};return Jg(Se,Ee)}function ke(ge){var ie=x[Rl.getPtId(ge)],Se,Ee=ge.transform;if(ie)Se=ie;else if(Se={rpx1:ge.rpx1,transform:{textPosAngle:Ee.textPosAngle,scale:0,rotate:Ee.rotate,rCenter:Ee.rCenter,x:Ee.x,y:Ee.y}},L)if(ge.parent)if(N){var we=ge.x1>N?2*Math.PI:0;Se.x0=Se.x1=we}else Av.extendFlat(Se,Ce(ge));else Se.x0=Se.x1=E;else Se.x0=Se.x1=E;var De=Jg(Se.transform.textPosAngle,ge.transform.textPosAngle),Le=Jg(Se.rpx1,ge.rpx1),me=Jg(Se.x0,ge.x0),Pe=Jg(Se.x1,ge.x1),ce=Jg(Se.transform.scale,Ee.scale),He=Jg(Se.transform.rotate,Ee.rotate),lt=Ee.rCenter===0?3:Se.transform.rCenter===0?1/3:1,mt=Jg(Se.transform.rCenter,Ee.rCenter),Vt=function(st){return mt(Math.pow(st,lt))};return function(st){var ct=Le(st),Qt=me(st),Ht=Pe(st),nr=Vt(st),tt=U(ct,(Qt+Ht)/2),je=De(st),Ue={pxmid:tt,rpx1:ct,transform:{textPosAngle:je,rCenter:nr,x:Ee.x,y:Ee.y}};return M6e(c.type,Ee,a),{transform:{targetX:Z(Ue),targetY:j(Ue),scale:ce(st),rotate:He(st),rCenter:nr}}}}function Ce(ge){var ie=ge.parent,Se=x[Rl.getPtId(ie)],Ee={};if(Se){var we=ie.children,De=we.indexOf(ge),Le=we.length,me=Jg(Se.x0,Se.x1);Ee.x0=me(De/Le),Ee.x1=me(De/Le)}else Ee.x0=Ee.x1=0;return Ee}}function wLt(e){return dLt.partition().size([2*Math.PI,e.height+1])(e)}jD.formatSliceLabel=function(e,t,r,n,i){var a=r.texttemplate,o=r.textinfo;if(!a&&(!o||o==="none"))return"";var s=i.separators,l=n[0],u=e.data.data,c=l.hierarchy,f=Rl.isHierarchyRoot(e),h=Rl.getParent(c,e),d=Rl.getValue(e);if(!a){var v=o.split("+"),m=function(g){return v.indexOf(g)!==-1},b=[],p;if(m("label")&&u.label&&b.push(u.label),u.hasOwnProperty("v")&&m("value")&&b.push(Rl.formatValue(u.v,s)),!f){m("current path")&&b.push(Rl.getPath(e.data));var k=0;m("percent parent")&&k++,m("percent entry")&&k++,m("percent root")&&k++;var M=k>1;if(k){var T,L=function(g){p=Rl.formatPercent(T,s),M&&(p+=" of "+g),b.push(p)};m("percent parent")&&!f&&(T=d/Rl.getValue(h),L("parent")),m("percent entry")&&(T=d/Rl.getValue(t),L("entry")),m("percent root")&&(T=d/Rl.getValue(c),L("root"))}}return m("text")&&(p=Av.castOption(r,u.i,"text"),Av.isValidTextValue(p)&&b.push(p)),b.join("
")}var x=Av.castOption(r,u.i,"texttemplate");if(!x)return"";var C={};u.label&&(C.label=u.label),u.hasOwnProperty("v")&&(C.value=u.v,C.valueLabel=Rl.formatValue(u.v,s)),C.currentPath=Rl.getPath(e.data),f||(C.percentParent=d/Rl.getValue(h),C.percentParentLabel=Rl.formatPercent(C.percentParent,s),C.parent=Rl.getPtLabel(h)),C.percentEntry=d/Rl.getValue(t),C.percentEntryLabel=Rl.formatPercent(C.percentEntry,s),C.entry=Rl.getPtLabel(t),C.percentRoot=d/Rl.getValue(c),C.percentRootLabel=Rl.formatPercent(C.percentRoot,s),C.root=Rl.getPtLabel(c),u.hasOwnProperty("color")&&(C.color=u.color);var S=Av.castOption(r,u.i,"text");return(Av.isValidTextValue(S)||S==="")&&(C.text=S),C.customdata=Av.castOption(r,u.i,"customdata"),Av.texttemplateString({data:[C,r._meta],fallback:r.texttemplatefallback,labels:C,locale:i._d3locale,template:x})};function TLt(e){return e.rpx0===0&&Av.isFullCircle([e.x0,e.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2))}function k6e(e){return ALt(e.rpx1,e.transform.textPosAngle)}function ALt(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}});var I6e=ye((_0r,P6e)=>{"use strict";P6e.exports={moduleType:"trace",name:"sunburst",basePlotModule:jke(),categories:[],animatable:!0,attributes:OE(),layoutAttributes:MW(),supplyDefaults:eCe(),supplyLayoutDefaults:rCe(),calc:UE().calc,crossTraceCalc:UE().crossTraceCalc,plot:WD().plot,style:YW().style,colorbar:$d(),meta:{}}});var D6e=ye((x0r,R6e)=>{"use strict";R6e.exports=I6e()});var z6e=ye(NA=>{"use strict";var F6e=Mc();NA.name="treemap";NA.plot=function(e,t,r,n){F6e.plotBasePlot(NA.name,e,t,r,n)};NA.clean=function(e,t,r,n){F6e.cleanBasePlot(NA.name,e,t,r,n)}});var W2=ye((w0r,q6e)=>{"use strict";q6e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}});var XD=ye((T0r,N6e)=>{"use strict";var{hovertemplateAttrs:SLt,texttemplateAttrs:MLt,templatefallbackAttrs:O6e}=Ll(),ELt=Tu(),kLt=Cc().attributes,X2=F2(),tg=OE(),B6e=W2(),JW=Ao().extendFlat,CLt=Pd().pattern;N6e.exports={labels:tg.labels,parents:tg.parents,values:tg.values,branchvalues:tg.branchvalues,count:tg.count,level:tg.level,maxdepth:tg.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:JW({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:tg.marker.colors,pattern:CLt,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:tg.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},ELt("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:JW({},X2.textfont,{}),editType:"calc"},text:X2.text,textinfo:tg.textinfo,texttemplate:MLt({editType:"plot"},{keys:B6e.eventDataKeys.concat(["label","value"])}),texttemplatefallback:O6e({editType:"plot"}),hovertext:X2.hovertext,hoverinfo:tg.hoverinfo,hovertemplate:SLt({},{keys:B6e.eventDataKeys}),hovertemplatefallback:O6e(),textfont:X2.textfont,insidetextfont:X2.insidetextfont,outsidetextfont:JW({},X2.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:X2.sort,root:tg.root,domain:kLt({name:"treemap",trace:!0,editType:"calc"})}});var $W=ye((A0r,U6e)=>{"use strict";U6e.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var j6e=ye((S0r,H6e)=>{"use strict";var V6e=Pr(),LLt=XD(),PLt=ka(),ILt=Cc().defaults,RLt=i0().handleText,DLt=A_().TEXTPAD,FLt=z2().handleMarkerDefaults,G6e=tc(),zLt=G6e.hasColorscale,qLt=G6e.handleDefaults;H6e.exports=function(t,r,n,i){function a(b,p){return V6e.coerce(t,r,LLt,b,p)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=a("values");l&&l.length?a("branchvalues"):a("count"),a("level"),a("maxdepth");var u=a("tiling.packing");u==="squarify"&&a("tiling.squarifyratio"),a("tiling.flip"),a("tiling.pad");var c=a("text");a("texttemplate"),a("texttemplatefallback"),r.texttemplate||a("textinfo",V6e.isArrayOrTypedArray(c)?"text+label":"label"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var f=a("pathbar.visible"),h="auto";RLt(t,r,i,a,h,{hasPathbar:f,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("textposition");var d=r.textposition.indexOf("bottom")!==-1;FLt(t,r,i,a);var v=r._hasColorscale=zLt(t,"marker","colors")||(t.marker||{}).coloraxis;v?qLt(t,r,i,a,{prefix:"marker.",cLetter:"c"}):a("marker.depthfade",!(r.marker.colors||[]).length);var m=r.textfont.size*2;a("marker.pad.t",d?m/4:m),a("marker.pad.l",m/4),a("marker.pad.r",m/4),a("marker.pad.b",d?m:m/4),a("marker.cornerradius"),r._hovered={marker:{line:{width:2,color:PLt.contrast(i.paper_bgcolor)}}},f&&(a("pathbar.thickness",r.pathbar.textfont.size+2*DLt),a("pathbar.side"),a("pathbar.edgeshape")),a("sort"),a("root.color"),ILt(r,i,a),r._length=null}});var X6e=ye((M0r,W6e)=>{"use strict";var OLt=Pr(),BLt=$W();W6e.exports=function(t,r){function n(i,a){return OLt.coerce(t,r,BLt,i,a)}n("treemapcolorway",r.colorway),n("extendtreemapcolors")}});var eX=ye(QW=>{"use strict";var Z6e=UE();QW.calc=function(e,t){return Z6e.calc(e,t)};QW.crossTraceCalc=function(e){return Z6e._runCrossTraceCalc("treemap",e)}});var tX=ye((k0r,Y6e)=>{"use strict";Y6e.exports=function e(t,r,n){var i;n.swapXY&&(i=t.x0,t.x0=t.y0,t.y0=i,i=t.x1,t.x1=t.y1,t.y1=i),n.flipX&&(i=t.x0,t.x0=r[0]-t.x1,t.x1=r[0]-i),n.flipY&&(i=t.y0,t.y0=r[1]-t.y1,t.y1=r[1]-i);var a=t.children;if(a)for(var o=0;o{"use strict";var UA=BE(),NLt=tX();K6e.exports=function(t,r,n){var i=n.flipX,a=n.flipY,o=n.packing==="dice-slice",s=n.pad[a?"bottom":"top"],l=n.pad[i?"right":"left"],u=n.pad[i?"left":"right"],c=n.pad[a?"top":"bottom"],f;o&&(f=l,l=s,s=f,f=u,u=c,c=f);var h=UA.treemap().tile(ULt(n.packing,n.squarifyratio)).paddingInner(n.pad.inner).paddingLeft(l).paddingRight(u).paddingTop(s).paddingBottom(c).size(o?[r[1],r[0]]:r)(t);return(o||i||a)&&NLt(h,r,{swapXY:o,flipX:i,flipY:a}),h};function ULt(e,t){switch(e){case"squarify":return UA.treemapSquarify.ratio(t);case"binary":return UA.treemapBinary;case"dice":return UA.treemapDice;case"slice":return UA.treemapSlice;default:return UA.treemapSliceDice}}});var ZD=ye((L0r,eLe)=>{"use strict";var J6e=qa(),VA=ka(),$6e=Pr(),iX=i1(),VLt=bv().resizeText,GLt=HD();function HLt(e){var t=e._fullLayout._treemaplayer.selectAll(".trace");VLt(e,t,"treemap"),t.each(function(r){var n=J6e.select(this),i=r[0],a=i.trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each(function(o){J6e.select(this).call(Q6e,o,a,e,{hovered:!1})})})}function Q6e(e,t,r,n,i){var a=(i||{}).hovered,o=t.data.data,s=o.i,l,u,c=o.color,f=iX.isHierarchyRoot(t),h=1;if(a)l=r._hovered.marker.line.color,u=r._hovered.marker.line.width;else if(f&&c===r.root.color)h=100,l="rgba(0,0,0,0)",u=0;else if(l=$6e.castOption(r,s,"marker.line.color")||VA.defaultLine,u=$6e.castOption(r,s,"marker.line.width")||0,!r._hasColorscale&&!t.onPathbar){var d=r.marker.depthfade;if(d){var v=VA.combine(VA.addOpacity(r._backgroundColor,.75),c),m;if(d===!0){var b=iX.getMaxDepth(r);isFinite(b)?iX.isLeaf(t)?m=0:m=r._maxVisibleLayers-(t.data.depth-r._entryDepth):m=t.data.height+1}else m=t.data.depth-r._entryDepth,r._atRootLevel||m++;if(m>0)for(var p=0;p{"use strict";var tLe=qa(),YD=Pr(),rLe=So(),jLt=Zl(),WLt=rX(),iLe=ZD().styleOne,nX=W2(),GA=i1(),XLt=$E(),aX=!0;nLe.exports=function(t,r,n,i,a){var o=a.barDifY,s=a.width,l=a.height,u=a.viewX,c=a.viewY,f=a.pathSlice,h=a.toMoveInsideSlice,d=a.strTransform,v=a.hasTransition,m=a.handleSlicesExit,b=a.makeUpdateSliceInterpolator,p=a.makeUpdateTextInterpolator,k={},M=t._context.staticPlot,T=t._fullLayout,L=r[0],x=L.trace,C=L.hierarchy,S=s/x._entryDepth,g=GA.listPath(n.data,"id"),P=WLt(C.copy(),[s,l],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();P=P.filter(function(z){var q=g.indexOf(z.data.id);return q===-1?!1:(z.x0=S*q,z.x1=S*(q+1),z.y0=o,z.y1=o+l,z.onPathbar=!0,!0)}),P.reverse(),i=i.data(P,GA.getPtId),i.enter().append("g").classed("pathbar",!0),m(i,aX,k,[s,l],f),i.order();var E=i;v&&(E=E.transition().each("end",function(){var z=tLe.select(this);GA.setSliceCursor(z,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),E.each(function(z){z._x0=u(z.x0),z._x1=u(z.x1),z._y0=c(z.y0),z._y1=c(z.y1),z._hoverX=u(z.x1-Math.min(s,l)/2),z._hoverY=c(z.y1-l/2);var q=tLe.select(this),U=YD.ensureSingle(q,"path","surface",function(N){N.style("pointer-events",M?"none":"all")});v?U.transition().attrTween("d",function(N){var H=b(N,aX,k,[s,l]);return function(re){return f(H(re))}}):U.attr("d",f),q.call(XLt,n,t,r,{styleOne:iLe,eventDataKeys:nX.eventDataKeys,transitionTime:nX.CLICK_TRANSITION_TIME,transitionEasing:nX.CLICK_TRANSITION_EASING}).call(GA.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),U.call(iLe,z,x,t,{hovered:!1}),z._text=(GA.getPtLabel(z)||"").split("
").join(" ")||"";var G=YD.ensureSingle(q,"g","slicetext"),Z=YD.ensureSingle(G,"text","",function(N){N.attr("data-notex",1)}),j=YD.ensureUniformFontSize(t,GA.determineTextFont(x,z,T.font,{onPathbar:!0}));Z.text(z._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(rLe.font,j).call(jLt.convertToTspans,t),z.textBB=rLe.bBox(Z.node()),z.transform=h(z,{fontSize:j.size,onPathbar:!0}),z.transform.fontSize=j.size,v?Z.transition().attrTween("transform",function(N){var H=p(N,aX,k,[s,l]);return function(re){return d(H(re))}}):Z.attr("transform",d(z))})}});var uLe=ye((I0r,lLe)=>{"use strict";var oLe=qa(),oX=(H2(),pb(G2)).interpolate,ix=i1(),ek=Pr(),sLe=A_().TEXTPAD,ZLt=d2(),YLt=ZLt.toMoveInsideBar,KLt=bv(),sX=KLt.recordMinTextSize,JLt=W2(),$Lt=aLe();function Z2(e){return ix.isHierarchyRoot(e)?"":ix.getPtId(e)}lLe.exports=function(t,r,n,i,a){var o=t._fullLayout,s=r[0],l=s.trace,u=l.type,c=u==="icicle",f=s.hierarchy,h=ix.findEntryWithLevel(f,l.level),d=oLe.select(n),v=d.selectAll("g.pathbar"),m=d.selectAll("g.slice");if(!h){v.remove(),m.remove();return}var b=ix.isHierarchyRoot(h),p=!o.uniformtext.mode&&ix.hasTransition(i),k=ix.getMaxDepth(l),M=function(Ae){return Ae.data.depth-h.data.depth-1?C+P:-(g+P):0,z={x0:S,x1:S,y0:E,y1:E+g},q=function(Ae,rt,St){var Tt=l.tiling.pad,dt=function(or){return or-Tt<=rt.x0},Et=function(or){return or+Tt>=rt.x1},pt=function(or){return or-Tt<=rt.y0},Xt=function(or){return or+Tt>=rt.y1};return Ae.x0===rt.x0&&Ae.x1===rt.x1&&Ae.y0===rt.y0&&Ae.y1===rt.y1?{x0:Ae.x0,x1:Ae.x1,y0:Ae.y0,y1:Ae.y1}:{x0:dt(Ae.x0-Tt)?0:Et(Ae.x0-Tt)?St[0]:Ae.x0,x1:dt(Ae.x1+Tt)?0:Et(Ae.x1+Tt)?St[0]:Ae.x1,y0:pt(Ae.y0-Tt)?0:Xt(Ae.y0-Tt)?St[1]:Ae.y0,y1:pt(Ae.y1+Tt)?0:Xt(Ae.y1+Tt)?St[1]:Ae.y1}},U=null,G={},Z={},j=null,N=function(Ae,rt){return rt?G[Z2(Ae)]:Z[Z2(Ae)]},H=function(Ae,rt,St,Tt){if(rt)return G[Z2(f)]||z;var dt=Z[l.level]||St;return M(Ae)?q(Ae,dt,Tt):{}};s.hasMultipleRoots&&b&&k++,l._maxDepth=k,l._backgroundColor=o.paper_bgcolor,l._entryDepth=h.data.depth,l._atRootLevel=b;var re=-x/2+T.l+T.w*(L.x[1]+L.x[0])/2,oe=-C/2+T.t+T.h*(1-(L.y[1]+L.y[0])/2),_e=function(Ae){return re+Ae},ke=function(Ae){return oe+Ae},Ce=ke(0),ge=_e(0),ie=function(Ae){return ge+Ae},Se=function(Ae){return Ce+Ae};function Ee(Ae,rt){return Ae+","+rt}var we=ie(0),De=function(Ae){Ae.x=Math.max(we,Ae.x)},Le=l.pathbar.edgeshape,me=function(Ae){var rt=ie(Math.max(Math.min(Ae.x0,Ae.x0),0)),St=ie(Math.min(Math.max(Ae.x1,Ae.x1),S)),Tt=Se(Ae.y0),dt=Se(Ae.y1),Et=g/2,pt={},Xt={};pt.x=rt,Xt.x=St,pt.y=Xt.y=(Tt+dt)/2;var or={x:rt,y:Tt},_r={x:St,y:Tt},Er={x:St,y:dt},ei={x:rt,y:dt};return Le===">"?(or.x-=Et,_r.x-=Et,Er.x-=Et,ei.x-=Et):Le==="/"?(Er.x-=Et,ei.x-=Et,pt.x-=Et/2,Xt.x-=Et/2):Le==="\\"?(or.x-=Et,_r.x-=Et,pt.x-=Et/2,Xt.x-=Et/2):Le==="<"&&(pt.x-=Et,Xt.x-=Et),De(or),De(ei),De(pt),De(_r),De(Er),De(Xt),"M"+Ee(or.x,or.y)+"L"+Ee(_r.x,_r.y)+"L"+Ee(Xt.x,Xt.y)+"L"+Ee(Er.x,Er.y)+"L"+Ee(ei.x,ei.y)+"L"+Ee(pt.x,pt.y)+"Z"},Pe=l[c?"tiling":"marker"].pad,ce=function(Ae){return l.textposition.indexOf(Ae)!==-1},He=ce("top"),lt=ce("left"),mt=ce("right"),Vt=ce("bottom"),st=function(Ae){var rt=_e(Ae.x0),St=_e(Ae.x1),Tt=ke(Ae.y0),dt=ke(Ae.y1),Et=St-rt,pt=dt-Tt;if(!Et||!pt)return"";var Xt=l.marker.cornerradius||0,or=Math.min(Xt,Et/2,pt/2);or&&Ae.data&&Ae.data.data&&Ae.data.data.label&&(He&&(or=Math.min(or,Pe.t)),lt&&(or=Math.min(or,Pe.l)),mt&&(or=Math.min(or,Pe.r)),Vt&&(or=Math.min(or,Pe.b)));var _r=function(Er,ei){return or?"a"+Ee(or,or)+" 0 0 1 "+Ee(Er,ei):""};return"M"+Ee(rt,Tt+or)+_r(or,-or)+"L"+Ee(St-or,Tt)+_r(or,or)+"L"+Ee(St,dt-or)+_r(-or,or)+"L"+Ee(rt+or,dt)+_r(-or,-or)+"Z"},ct=function(Ae,rt){var St=Ae.x0,Tt=Ae.x1,dt=Ae.y0,Et=Ae.y1,pt=Ae.textBB,Xt=He||rt.isHeader&&!Vt,or=Xt?"start":Vt?"end":"middle",_r=ce("right"),Er=ce("left")||rt.onPathbar,ei=Er?-1:_r?1:0;if(rt.isHeader){if(St+=(c?Pe:Pe.l)-sLe,Tt-=(c?Pe:Pe.r)-sLe,St>=Tt){var qr=(St+Tt)/2;St=qr,Tt=qr}var jr;Vt?(jr=Et-(c?Pe:Pe.b),dt{"use strict";var QLt=qa(),ePt=i1(),tPt=bv(),rPt=tPt.clearMinTextSize,iPt=V0().resizeText,cLe=uLe();fLe.exports=function(t,r,n,i,a){var o=a.type,s=a.drawDescendants,l=t._fullLayout,u=l["_"+o+"layer"],c,f,h=!n;if(rPt(o,l),c=u.selectAll("g.trace."+o).data(r,function(v){return v[0].trace.uid}),c.enter().append("g").classed("trace",!0).classed(o,!0),c.order(),!l.uniformtext.mode&&ePt.hasTransition(n)){i&&(f=i());var d=QLt.transition().duration(n.duration).ease(n.easing).each("end",function(){f&&f()}).each("interrupt",function(){f&&f()});d.each(function(){u.selectAll("g.trace").each(function(v){cLe(t,v,this,n,s)})})}else c.each(function(v){cLe(t,v,this,n,s)}),l.uniformtext.mode&&iPt(t,u.selectAll(".trace"),o);h&&c.exit().remove()}});var gLe=ye((D0r,pLe)=>{"use strict";var hLe=qa(),KD=Pr(),dLe=So(),nPt=Zl(),aPt=rX(),vLe=ZD().styleOne,uX=W2(),nx=i1(),oPt=$E(),sPt=WD().formatSliceLabel,cX=!1;pLe.exports=function(t,r,n,i,a){var o=a.width,s=a.height,l=a.viewX,u=a.viewY,c=a.pathSlice,f=a.toMoveInsideSlice,h=a.strTransform,d=a.hasTransition,v=a.handleSlicesExit,m=a.makeUpdateSliceInterpolator,b=a.makeUpdateTextInterpolator,p=a.prevEntry,k={},M=t._context.staticPlot,T=t._fullLayout,L=r[0],x=L.trace,C=x.textposition.indexOf("left")!==-1,S=x.textposition.indexOf("right")!==-1,g=x.textposition.indexOf("bottom")!==-1,P=!g&&!x.marker.pad.t||g&&!x.marker.pad.b,E=aPt(n,[o,s],{packing:x.tiling.packing,squarifyratio:x.tiling.squarifyratio,flipX:x.tiling.flip.indexOf("x")>-1,flipY:x.tiling.flip.indexOf("y")>-1,pad:{inner:x.tiling.pad,top:x.marker.pad.t,left:x.marker.pad.l,right:x.marker.pad.r,bottom:x.marker.pad.b}}),z=E.descendants(),q=1/0,U=-1/0;z.forEach(function(H){var re=H.depth;re>=x._maxDepth?(H.x0=H.x1=(H.x0+H.x1)/2,H.y0=H.y1=(H.y0+H.y1)/2):(q=Math.min(q,re),U=Math.max(U,re))}),i=i.data(z,nx.getPtId),x._maxVisibleLayers=isFinite(U)?U-q+1:0,i.enter().append("g").classed("slice",!0),v(i,cX,k,[o,s],c),i.order();var G=null;if(d&&p){var Z=nx.getPtId(p);i.each(function(H){G===null&&nx.getPtId(H)===Z&&(G={x0:H.x0,x1:H.x1,y0:H.y0,y1:H.y1})})}var j=function(){return G||{x0:0,x1:o,y0:0,y1:s}},N=i;return d&&(N=N.transition().each("end",function(){var H=hLe.select(this);nx.setSliceCursor(H,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),N.each(function(H){var re=nx.isHeader(H,x);H._x0=l(H.x0),H._x1=l(H.x1),H._y0=u(H.y0),H._y1=u(H.y1),H._hoverX=l(H.x1-x.marker.pad.r),H._hoverY=u(g?H.y1-x.marker.pad.b/2:H.y0+x.marker.pad.t/2);var oe=hLe.select(this),_e=KD.ensureSingle(oe,"path","surface",function(Ee){Ee.style("pointer-events",M?"none":"all")});d?_e.transition().attrTween("d",function(Ee){var we=m(Ee,cX,j(),[o,s]);return function(De){return c(we(De))}}):_e.attr("d",c),oe.call(oPt,n,t,r,{styleOne:vLe,eventDataKeys:uX.eventDataKeys,transitionTime:uX.CLICK_TRANSITION_TIME,transitionEasing:uX.CLICK_TRANSITION_EASING}).call(nx.setSliceCursor,t,{isTransitioning:t._transitioning}),_e.call(vLe,H,x,t,{hovered:!1}),H.x0===H.x1||H.y0===H.y1?H._text="":re?H._text=P?"":nx.getPtLabel(H)||"":H._text=sPt(H,n,x,r,T)||"";var ke=KD.ensureSingle(oe,"g","slicetext"),Ce=KD.ensureSingle(ke,"text","",function(Ee){Ee.attr("data-notex",1)}),ge=KD.ensureUniformFontSize(t,nx.determineTextFont(x,H,T.font)),ie=H._text||" ",Se=re&&ie.indexOf("
")===-1;Ce.text(ie).classed("slicetext",!0).attr("text-anchor",S?"end":C||Se?"start":"middle").call(dLe.font,ge).call(nPt.convertToTspans,t),H.textBB=dLe.bBox(Ce.node()),H.transform=f(H,{fontSize:ge.size,isHeader:re}),H.transform.fontSize=ge.size,d?Ce.transition().attrTween("transform",function(Ee){var we=b(Ee,cX,j(),[o,s]);return function(De){return h(we(De))}}):Ce.attr("transform",h(H))}),G}});var yLe=ye((F0r,mLe)=>{"use strict";var lPt=lX(),uPt=gLe();mLe.exports=function(t,r,n,i){return lPt(t,r,n,i,{type:"treemap",drawDescendants:uPt})}});var xLe=ye((z0r,_Le)=>{"use strict";_Le.exports={moduleType:"trace",name:"treemap",basePlotModule:z6e(),categories:[],animatable:!0,attributes:XD(),layoutAttributes:$W(),supplyDefaults:j6e(),supplyLayoutDefaults:X6e(),calc:eX().calc,crossTraceCalc:eX().crossTraceCalc,plot:yLe(),style:ZD().style,colorbar:$d(),meta:{}}});var wLe=ye((q0r,bLe)=>{"use strict";bLe.exports=xLe()});var ALe=ye(HA=>{"use strict";var TLe=Mc();HA.name="icicle";HA.plot=function(e,t,r,n){TLe.plotBasePlot(HA.name,e,t,r,n)};HA.clean=function(e,t,r,n){TLe.cleanBasePlot(HA.name,e,t,r,n)}});var fX=ye((B0r,ELe)=>{"use strict";var{hovertemplateAttrs:cPt,texttemplateAttrs:fPt,templatefallbackAttrs:SLe}=Ll(),hPt=Tu(),dPt=Cc().attributes,tk=F2(),s0=OE(),JD=XD(),MLe=W2(),vPt=Ao().extendFlat,pPt=Pd().pattern;ELe.exports={labels:s0.labels,parents:s0.parents,values:s0.values,branchvalues:s0.branchvalues,count:s0.count,level:s0.level,maxdepth:s0.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:JD.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:vPt({colors:s0.marker.colors,line:s0.marker.line,pattern:pPt,editType:"calc"},hPt("marker",{colorAttr:"colors",anim:!1})),leaf:s0.leaf,pathbar:JD.pathbar,text:tk.text,textinfo:s0.textinfo,texttemplate:fPt({editType:"plot"},{keys:MLe.eventDataKeys.concat(["label","value"])}),texttemplatefallback:SLe({editType:"plot"}),hovertext:tk.hovertext,hoverinfo:s0.hoverinfo,hovertemplate:cPt({},{keys:MLe.eventDataKeys}),hovertemplatefallback:SLe(),textfont:tk.textfont,insidetextfont:tk.insidetextfont,outsidetextfont:JD.outsidetextfont,textposition:JD.textposition,sort:tk.sort,root:s0.root,domain:dPt({name:"icicle",trace:!0,editType:"calc"})}});var hX=ye((N0r,kLe)=>{"use strict";kLe.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var ILe=ye((U0r,PLe)=>{"use strict";var CLe=Pr(),gPt=fX(),mPt=ka(),yPt=Cc().defaults,_Pt=i0().handleText,xPt=A_().TEXTPAD,bPt=z2().handleMarkerDefaults,LLe=tc(),wPt=LLe.hasColorscale,TPt=LLe.handleDefaults;PLe.exports=function(t,r,n,i){function a(d,v){return CLe.coerce(t,r,gPt,d,v)}var o=a("labels"),s=a("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=a("values");l&&l.length?a("branchvalues"):a("count"),a("level"),a("maxdepth"),a("tiling.orientation"),a("tiling.flip"),a("tiling.pad");var u=a("text");a("texttemplate"),a("texttemplatefallback"),r.texttemplate||a("textinfo",CLe.isArrayOrTypedArray(u)?"text+label":"label"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var c=a("pathbar.visible"),f="auto";_Pt(t,r,i,a,f,{hasPathbar:c,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),a("textposition"),bPt(t,r,i,a);var h=r._hasColorscale=wPt(t,"marker","colors")||(t.marker||{}).coloraxis;h&&TPt(t,r,i,a,{prefix:"marker.",cLetter:"c"}),a("leaf.opacity",h?1:.7),r._hovered={marker:{line:{width:2,color:mPt.contrast(i.paper_bgcolor)}}},c&&(a("pathbar.thickness",r.pathbar.textfont.size+2*xPt),a("pathbar.side"),a("pathbar.edgeshape")),a("sort"),a("root.color"),yPt(r,i,a),r._length=null}});var DLe=ye((V0r,RLe)=>{"use strict";var APt=Pr(),SPt=hX();RLe.exports=function(t,r){function n(i,a){return APt.coerce(t,r,SPt,i,a)}n("iciclecolorway",r.colorway),n("extendiciclecolors")}});var vX=ye(dX=>{"use strict";var FLe=UE();dX.calc=function(e,t){return FLe.calc(e,t)};dX.crossTraceCalc=function(e){return FLe._runCrossTraceCalc("icicle",e)}});var qLe=ye((H0r,zLe)=>{"use strict";var MPt=BE(),EPt=tX();zLe.exports=function(t,r,n){var i=n.flipX,a=n.flipY,o=n.orientation==="h",s=n.maxDepth,l=r[0],u=r[1];s&&(l=(t.height+1)*r[0]/Math.min(t.height+1,s),u=(t.height+1)*r[1]/Math.min(t.height+1,s));var c=MPt.partition().padding(n.pad.inner).size(o?[r[1],l]:[r[0],u])(t);return(o||i||a)&&EPt(c,r,{swapXY:o,flipX:i,flipY:a}),c}});var pX=ye((j0r,VLe)=>{"use strict";var OLe=qa(),BLe=ka(),NLe=Pr(),kPt=bv().resizeText,CPt=HD();function LPt(e){var t=e._fullLayout._iciclelayer.selectAll(".trace");kPt(e,t,"icicle"),t.each(function(r){var n=OLe.select(this),i=r[0],a=i.trace;n.style("opacity",a.opacity),n.selectAll("path.surface").each(function(o){OLe.select(this).call(ULe,o,a,e)})})}function ULe(e,t,r,n){var i=t.data.data,a=!t.children,o=i.i,s=NLe.castOption(r,o,"marker.line.color")||BLe.defaultLine,l=NLe.castOption(r,o,"marker.line.width")||0;e.call(CPt,t,r,n).style("stroke-width",l).call(BLe.stroke,s).style("opacity",a?r.leaf.opacity:null)}VLe.exports={style:LPt,styleOne:ULe}});var XLe=ye((W0r,WLe)=>{"use strict";var GLe=qa(),$D=Pr(),HLe=So(),PPt=Zl(),IPt=qLe(),jLe=pX().styleOne,gX=W2(),jA=i1(),RPt=$E(),DPt=WD().formatSliceLabel,mX=!1;WLe.exports=function(t,r,n,i,a){var o=a.width,s=a.height,l=a.viewX,u=a.viewY,c=a.pathSlice,f=a.toMoveInsideSlice,h=a.strTransform,d=a.hasTransition,v=a.handleSlicesExit,m=a.makeUpdateSliceInterpolator,b=a.makeUpdateTextInterpolator,p=a.prevEntry,k={},M=t._context.staticPlot,T=t._fullLayout,L=r[0],x=L.trace,C=x.textposition.indexOf("left")!==-1,S=x.textposition.indexOf("right")!==-1,g=x.textposition.indexOf("bottom")!==-1,P=IPt(n,[o,s],{flipX:x.tiling.flip.indexOf("x")>-1,flipY:x.tiling.flip.indexOf("y")>-1,orientation:x.tiling.orientation,pad:{inner:x.tiling.pad},maxDepth:x._maxDepth}),E=P.descendants(),z=1/0,q=-1/0;E.forEach(function(N){var H=N.depth;H>=x._maxDepth?(N.x0=N.x1=(N.x0+N.x1)/2,N.y0=N.y1=(N.y0+N.y1)/2):(z=Math.min(z,H),q=Math.max(q,H))}),i=i.data(E,jA.getPtId),x._maxVisibleLayers=isFinite(q)?q-z+1:0,i.enter().append("g").classed("slice",!0),v(i,mX,k,[o,s],c),i.order();var U=null;if(d&&p){var G=jA.getPtId(p);i.each(function(N){U===null&&jA.getPtId(N)===G&&(U={x0:N.x0,x1:N.x1,y0:N.y0,y1:N.y1})})}var Z=function(){return U||{x0:0,x1:o,y0:0,y1:s}},j=i;return d&&(j=j.transition().each("end",function(){var N=GLe.select(this);jA.setSliceCursor(N,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),j.each(function(N){N._x0=l(N.x0),N._x1=l(N.x1),N._y0=u(N.y0),N._y1=u(N.y1),N._hoverX=l(N.x1-x.tiling.pad),N._hoverY=u(g?N.y1-x.tiling.pad/2:N.y0+x.tiling.pad/2);var H=GLe.select(this),re=$D.ensureSingle(H,"path","surface",function(Ce){Ce.style("pointer-events",M?"none":"all")});d?re.transition().attrTween("d",function(Ce){var ge=m(Ce,mX,Z(),[o,s],{orientation:x.tiling.orientation,flipX:x.tiling.flip.indexOf("x")>-1,flipY:x.tiling.flip.indexOf("y")>-1});return function(ie){return c(ge(ie))}}):re.attr("d",c),H.call(RPt,n,t,r,{styleOne:jLe,eventDataKeys:gX.eventDataKeys,transitionTime:gX.CLICK_TRANSITION_TIME,transitionEasing:gX.CLICK_TRANSITION_EASING}).call(jA.setSliceCursor,t,{isTransitioning:t._transitioning}),re.call(jLe,N,x,t,{hovered:!1}),N.x0===N.x1||N.y0===N.y1?N._text="":N._text=DPt(N,n,x,r,T)||"";var oe=$D.ensureSingle(H,"g","slicetext"),_e=$D.ensureSingle(oe,"text","",function(Ce){Ce.attr("data-notex",1)}),ke=$D.ensureUniformFontSize(t,jA.determineTextFont(x,N,T.font));_e.text(N._text||" ").classed("slicetext",!0).attr("text-anchor",S?"end":C?"start":"middle").call(HLe.font,ke).call(PPt.convertToTspans,t),N.textBB=HLe.bBox(_e.node()),N.transform=f(N,{fontSize:ke.size}),N.transform.fontSize=ke.size,d?_e.transition().attrTween("transform",function(Ce){var ge=b(Ce,mX,Z(),[o,s]);return function(ie){return h(ge(ie))}}):_e.attr("transform",h(N))}),U}});var YLe=ye((X0r,ZLe)=>{"use strict";var FPt=lX(),zPt=XLe();ZLe.exports=function(t,r,n,i){return FPt(t,r,n,i,{type:"icicle",drawDescendants:zPt})}});var JLe=ye((Z0r,KLe)=>{"use strict";KLe.exports={moduleType:"trace",name:"icicle",basePlotModule:ALe(),categories:[],animatable:!0,attributes:fX(),layoutAttributes:hX(),supplyDefaults:ILe(),supplyLayoutDefaults:DLe(),calc:vX().calc,crossTraceCalc:vX().crossTraceCalc,plot:YLe(),style:pX().style,colorbar:$d(),meta:{}}});var QLe=ye((Y0r,$Le)=>{"use strict";$Le.exports=JLe()});var tPe=ye(WA=>{"use strict";var ePe=Mc();WA.name="funnelarea";WA.plot=function(e,t,r,n){ePe.plotBasePlot(WA.name,e,t,r,n)};WA.clean=function(e,t,r,n){ePe.cleanBasePlot(WA.name,e,t,r,n)}});var yX=ye((J0r,iPe)=>{"use strict";var iv=F2(),qPt=Gl(),OPt=Cc().attributes,{hovertemplateAttrs:BPt,texttemplateAttrs:NPt,templatefallbackAttrs:rPe}=Ll(),Y2=Ao().extendFlat;iPe.exports={labels:iv.labels,label0:iv.label0,dlabel:iv.dlabel,values:iv.values,marker:{colors:iv.marker.colors,line:{color:Y2({},iv.marker.line.color,{dflt:null}),width:Y2({},iv.marker.line.width,{dflt:1}),editType:"calc"},pattern:iv.marker.pattern,editType:"calc"},text:iv.text,hovertext:iv.hovertext,scalegroup:Y2({},iv.scalegroup,{}),textinfo:Y2({},iv.textinfo,{flags:["label","text","value","percent"]}),texttemplate:NPt({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:rPe({editType:"plot"}),hoverinfo:Y2({},qPt.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:BPt({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:rPe(),textposition:Y2({},iv.textposition,{values:["inside","none"],dflt:"inside"}),textfont:iv.textfont,insidetextfont:iv.insidetextfont,title:{text:iv.title.text,font:iv.title.font,position:Y2({},iv.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:OPt({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot"},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot"}}});var _X=ye(($0r,nPe)=>{"use strict";var UPt=_D().hiddenlabels;nPe.exports={hiddenlabels:UPt,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var sPe=ye((Q0r,oPe)=>{"use strict";var aPe=Pr(),VPt=yX(),GPt=Cc().defaults,HPt=i0().handleText,jPt=z2().handleLabelsAndValues,WPt=z2().handleMarkerDefaults;oPe.exports=function(t,r,n,i){function a(m,b){return aPe.coerce(t,r,VPt,m,b)}var o=a("labels"),s=a("values"),l=jPt(o,s),u=l.len;if(r._hasLabels=l.hasLabels,r._hasValues=l.hasValues,!r._hasLabels&&r._hasValues&&(a("label0"),a("dlabel")),!u){r.visible=!1;return}r._length=u,WPt(t,r,i,a),a("scalegroup");var c=a("text"),f=a("texttemplate");a("texttemplatefallback");var h;if(f||(h=a("textinfo",Array.isArray(c)?"text+percent":"percent")),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),f||h&&h!=="none"){var d=a("textposition");HPt(t,r,i,a,d,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else h==="none"&&a("textposition","none");GPt(r,i,a);var v=a("title.text");v&&(a("title.position"),aPe.coerceFont(a,"title.font",i.font)),a("aspectratio"),a("baseratio")}});var uPe=ye((egr,lPe)=>{"use strict";var XPt=Pr(),ZPt=_X();lPe.exports=function(t,r){function n(i,a){return XPt.coerce(t,r,ZPt,i,a)}n("hiddenlabels"),n("funnelareacolorway",r.colorway),n("extendfunnelareacolors")}});var xX=ye((tgr,fPe)=>{"use strict";var cPe=kA();function YPt(e,t){return cPe.calc(e,t)}function KPt(e){cPe.crossTraceCalc(e,{type:"funnelarea"})}fPe.exports={calc:YPt,crossTraceCalc:KPt}});var gPe=ye((rgr,pPe)=>{"use strict";var K2=qa(),bX=So(),ax=Pr(),JPt=ax.strScale,hPe=ax.strTranslate,dPe=Zl(),$Pt=d2(),QPt=$Pt.toMoveInsideBar,vPe=bv(),eIt=vPe.recordMinTextSize,tIt=vPe.clearMinTextSize,rIt=g_(),XA=TD(),iIt=XA.attachFxHandlers,nIt=XA.determineInsideTextFont,aIt=XA.layoutAreas,oIt=XA.prerenderTitles,sIt=XA.positionTitleOutside,lIt=XA.formatSliceLabel;pPe.exports=function(t,r){var n=t._context.staticPlot,i=t._fullLayout;tIt("funnelarea",i),oIt(r,t),aIt(r,i._size),ax.makeTraceGroups(i._funnelarealayer,r,"trace").each(function(a){var o=K2.select(this),s=a[0],l=s.trace;cIt(a),o.each(function(){var u=K2.select(this).selectAll("g.slice").data(a);u.enter().append("g").classed("slice",!0),u.exit().remove(),u.each(function(f,h){if(f.hidden){K2.select(this).selectAll("path,g").remove();return}f.pointNumber=f.i,f.curveNumber=l.index;var d=s.cx,v=s.cy,m=K2.select(this),b=m.selectAll("path.surface").data([f]);b.enter().append("path").classed("surface",!0).style({"pointer-events":n?"none":"all"}),m.call(iIt,t,a);var p="M"+(d+f.TR[0])+","+(v+f.TR[1])+wX(f.TR,f.BR)+wX(f.BR,f.BL)+wX(f.BL,f.TL)+"Z";b.attr("d",p),lIt(t,f,s);var k=rIt.castOption(l.textposition,f.pts),M=m.selectAll("g.slicetext").data(f.text&&k!=="none"?[0]:[]);M.enter().append("g").classed("slicetext",!0),M.exit().remove(),M.each(function(){var T=ax.ensureSingle(K2.select(this),"text","",function(z){z.attr("data-notex",1)}),L=ax.ensureUniformFontSize(t,nIt(l,f,i.font));T.text(f.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(bX.font,L).call(dPe.convertToTspans,t);var x=bX.bBox(T.node()),C,S,g,P=Math.min(f.BL[1],f.BR[1])+v,E=Math.max(f.TL[1],f.TR[1])+v;S=Math.max(f.TL[0],f.BL[0])+d,g=Math.min(f.TR[0],f.BR[0])+d,C=QPt(S,g,P,E,x,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),C.fontSize=L.size,eIt(l.type,C,i),a[h].transform=C,ax.setTransormAndDisplay(T,C)})});var c=K2.select(this).selectAll("g.titletext").data(l.title.text?[0]:[]);c.enter().append("g").classed("titletext",!0),c.exit().remove(),c.each(function(){var f=ax.ensureSingle(K2.select(this),"text","",function(v){v.attr("data-notex",1)}),h=l.title.text;l._meta&&(h=ax.templateString(h,l._meta)),f.text(h).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(bX.font,l.title.font).call(dPe.convertToTspans,t);var d=sIt(s,i._size);f.attr("transform",hPe(d.x,d.y)+JPt(Math.min(1,d.scale))+hPe(d.tx,d.ty))})})})};function wX(e,t){var r=t[0]-e[0],n=t[1]-e[1];return"l"+r+","+n}function uIt(e,t){return[.5*(e[0]+t[0]),.5*(e[1]+t[1])]}function cIt(e){if(!e.length)return;var t=e[0],r=t.trace,n=r.aspectratio,i=r.baseratio;i>.999&&(i=.999);var a=Math.pow(i,2),o=t.vTotal,s=o*a/(1-a),l=o,u=s/o;function c(){var q=Math.sqrt(u);return{x:q,y:-q}}function f(){var q=c();return[q.x,q.y]}var h,d=[];d.push(f());var v,m;for(v=e.length-1;v>-1;v--)if(m=e[v],!m.hidden){var b=m.v/l;u+=b,d.push(f())}var p=1/0,k=-1/0;for(v=0;v-1;v--)if(m=e[v],!m.hidden){P+=1;var E=d[P][0],z=d[P][1];m.TL=[-E,z],m.TR=[E,z],m.BL=S,m.BR=g,m.pxmid=uIt(m.TR,m.BR),S=m.TL,g=m.TR}}});var _Pe=ye((igr,yPe)=>{"use strict";var mPe=qa(),fIt=Z3(),hIt=bv().resizeText;yPe.exports=function(t){var r=t._fullLayout._funnelarealayer.selectAll(".trace");hIt(t,r,"funnelarea"),r.each(function(n){var i=n[0],a=i.trace,o=mPe.select(this);o.style({opacity:a.opacity}),o.selectAll("path.surface").each(function(s){mPe.select(this).call(fIt,s,a,t)})})}});var bPe=ye((ngr,xPe)=>{"use strict";xPe.exports={moduleType:"trace",name:"funnelarea",basePlotModule:tPe(),categories:["pie-like","funnelarea","showLegend"],attributes:yX(),layoutAttributes:_X(),supplyDefaults:sPe(),supplyLayoutDefaults:uPe(),calc:xX().calc,crossTraceCalc:xX().crossTraceCalc,plot:gPe(),style:_Pe(),styleOne:Z3(),meta:{}}});var TPe=ye((agr,wPe)=>{"use strict";wPe.exports=bPe()});var zd=ye((ogr,APe)=>{(function(){var e={1964:function(i,a,o){i.exports={alpha_shape:o(3502),convex_hull:o(7352),delaunay_triangulate:o(7642),gl_cone3d:o(6405),gl_error3d:o(9165),gl_line3d:o(5714),gl_mesh3d:o(7201),gl_plot3d:o(4100),gl_scatter3d:o(8418),gl_streamtube3d:o(7815),gl_surface3d:o(9499),ndarray:o(9618),ndarray_linear_interpolate:o(4317)}},4793:function(i,a,o){"use strict";var s;function l(tt){"@babel/helpers - typeof";return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(je){return typeof je}:function(je){return je&&typeof Symbol=="function"&&je.constructor===Symbol&&je!==Symbol.prototype?"symbol":typeof je},l(tt)}var u=o(7507),c=o(3778),f=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;a.hp=m,s=P,a.IS=50;var h=2147483647;s=h,m.TYPED_ARRAY_SUPPORT=d(),!m.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function d(){try{var tt=new Uint8Array(1),je={foo:function(){return 42}};return Object.setPrototypeOf(je,Uint8Array.prototype),Object.setPrototypeOf(tt,je),tt.foo()===42}catch(Ue){return!1}}Object.defineProperty(m.prototype,"parent",{enumerable:!0,get:function(){if(m.isBuffer(this))return this.buffer}}),Object.defineProperty(m.prototype,"offset",{enumerable:!0,get:function(){if(m.isBuffer(this))return this.byteOffset}});function v(tt){if(tt>h)throw new RangeError('The value "'+tt+'" is invalid for option "size"');var je=new Uint8Array(tt);return Object.setPrototypeOf(je,m.prototype),je}function m(tt,je,Ue){if(typeof tt=="number"){if(typeof je=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return M(tt)}return b(tt,je,Ue)}m.poolSize=8192;function b(tt,je,Ue){if(typeof tt=="string")return T(tt,je);if(ArrayBuffer.isView(tt))return x(tt);if(tt==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(tt));if(Qt(tt,ArrayBuffer)||tt&&Qt(tt.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(Qt(tt,SharedArrayBuffer)||tt&&Qt(tt.buffer,SharedArrayBuffer)))return C(tt,je,Ue);if(typeof tt=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Ae=tt.valueOf&&tt.valueOf();if(Ae!=null&&Ae!==tt)return m.from(Ae,je,Ue);var rt=S(tt);if(rt)return rt;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof tt[Symbol.toPrimitive]=="function")return m.from(tt[Symbol.toPrimitive]("string"),je,Ue);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(tt))}m.from=function(tt,je,Ue){return b(tt,je,Ue)},Object.setPrototypeOf(m.prototype,Uint8Array.prototype),Object.setPrototypeOf(m,Uint8Array);function p(tt){if(typeof tt!="number")throw new TypeError('"size" argument must be of type number');if(tt<0)throw new RangeError('The value "'+tt+'" is invalid for option "size"')}function k(tt,je,Ue){return p(tt),tt<=0?v(tt):je!==void 0?typeof Ue=="string"?v(tt).fill(je,Ue):v(tt).fill(je):v(tt)}m.alloc=function(tt,je,Ue){return k(tt,je,Ue)};function M(tt){return p(tt),v(tt<0?0:g(tt)|0)}m.allocUnsafe=function(tt){return M(tt)},m.allocUnsafeSlow=function(tt){return M(tt)};function T(tt,je){if((typeof je!="string"||je==="")&&(je="utf8"),!m.isEncoding(je))throw new TypeError("Unknown encoding: "+je);var Ue=E(tt,je)|0,Ae=v(Ue),rt=Ae.write(tt,je);return rt!==Ue&&(Ae=Ae.slice(0,rt)),Ae}function L(tt){for(var je=tt.length<0?0:g(tt.length)|0,Ue=v(je),Ae=0;Ae=h)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h.toString(16)+" bytes");return tt|0}function P(tt){return+tt!=tt&&(tt=0),m.alloc(+tt)}m.isBuffer=function(je){return je!=null&&je._isBuffer===!0&&je!==m.prototype},m.compare=function(je,Ue){if(Qt(je,Uint8Array)&&(je=m.from(je,je.offset,je.byteLength)),Qt(Ue,Uint8Array)&&(Ue=m.from(Ue,Ue.offset,Ue.byteLength)),!m.isBuffer(je)||!m.isBuffer(Ue))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(je===Ue)return 0;for(var Ae=je.length,rt=Ue.length,St=0,Tt=Math.min(Ae,rt);Strt.length?m.from(Tt).copy(rt,St):Uint8Array.prototype.set.call(rt,Tt,St);else if(m.isBuffer(Tt))Tt.copy(rt,St);else throw new TypeError('"list" argument must be an Array of Buffers');St+=Tt.length}return rt};function E(tt,je){if(m.isBuffer(tt))return tt.length;if(ArrayBuffer.isView(tt)||Qt(tt,ArrayBuffer))return tt.byteLength;if(typeof tt!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+l(tt));var Ue=tt.length,Ae=arguments.length>2&&arguments[2]===!0;if(!Ae&&Ue===0)return 0;for(var rt=!1;;)switch(je){case"ascii":case"latin1":case"binary":return Ue;case"utf8":case"utf-8":return lt(tt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ue*2;case"hex":return Ue>>>1;case"base64":return st(tt).length;default:if(rt)return Ae?-1:lt(tt).length;je=(""+je).toLowerCase(),rt=!0}}m.byteLength=E;function z(tt,je,Ue){var Ae=!1;if((je===void 0||je<0)&&(je=0),je>this.length||((Ue===void 0||Ue>this.length)&&(Ue=this.length),Ue<=0)||(Ue>>>=0,je>>>=0,Ue<=je))return"";for(tt||(tt="utf8");;)switch(tt){case"hex":return Se(this,je,Ue);case"utf8":case"utf-8":return _e(this,je,Ue);case"ascii":return ge(this,je,Ue);case"latin1":case"binary":return ie(this,je,Ue);case"base64":return oe(this,je,Ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ee(this,je,Ue);default:if(Ae)throw new TypeError("Unknown encoding: "+tt);tt=(tt+"").toLowerCase(),Ae=!0}}m.prototype._isBuffer=!0;function q(tt,je,Ue){var Ae=tt[je];tt[je]=tt[Ue],tt[Ue]=Ae}m.prototype.swap16=function(){var je=this.length;if(je%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Ue=0;UeUe&&(je+=" ... "),""},f&&(m.prototype[f]=m.prototype.inspect),m.prototype.compare=function(je,Ue,Ae,rt,St){if(Qt(je,Uint8Array)&&(je=m.from(je,je.offset,je.byteLength)),!m.isBuffer(je))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+l(je));if(Ue===void 0&&(Ue=0),Ae===void 0&&(Ae=je?je.length:0),rt===void 0&&(rt=0),St===void 0&&(St=this.length),Ue<0||Ae>je.length||rt<0||St>this.length)throw new RangeError("out of range index");if(rt>=St&&Ue>=Ae)return 0;if(rt>=St)return-1;if(Ue>=Ae)return 1;if(Ue>>>=0,Ae>>>=0,rt>>>=0,St>>>=0,this===je)return 0;for(var Tt=St-rt,dt=Ae-Ue,Et=Math.min(Tt,dt),pt=this.slice(rt,St),Xt=je.slice(Ue,Ae),or=0;or2147483647?Ue=2147483647:Ue<-2147483648&&(Ue=-2147483648),Ue=+Ue,Ht(Ue)&&(Ue=rt?0:tt.length-1),Ue<0&&(Ue=tt.length+Ue),Ue>=tt.length){if(rt)return-1;Ue=tt.length-1}else if(Ue<0)if(rt)Ue=0;else return-1;if(typeof je=="string"&&(je=m.from(je,Ae)),m.isBuffer(je))return je.length===0?-1:G(tt,je,Ue,Ae,rt);if(typeof je=="number")return je=je&255,typeof Uint8Array.prototype.indexOf=="function"?rt?Uint8Array.prototype.indexOf.call(tt,je,Ue):Uint8Array.prototype.lastIndexOf.call(tt,je,Ue):G(tt,[je],Ue,Ae,rt);throw new TypeError("val must be string, number or Buffer")}function G(tt,je,Ue,Ae,rt){var St=1,Tt=tt.length,dt=je.length;if(Ae!==void 0&&(Ae=String(Ae).toLowerCase(),Ae==="ucs2"||Ae==="ucs-2"||Ae==="utf16le"||Ae==="utf-16le")){if(tt.length<2||je.length<2)return-1;St=2,Tt/=2,dt/=2,Ue/=2}function Et(Er,ei){return St===1?Er[ei]:Er.readUInt16BE(ei*St)}var pt;if(rt){var Xt=-1;for(pt=Ue;ptTt&&(Ue=Tt-dt),pt=Ue;pt>=0;pt--){for(var or=!0,_r=0;_rrt&&(Ae=rt)):Ae=rt;var St=je.length;Ae>St/2&&(Ae=St/2);for(var Tt=0;Tt>>0,isFinite(Ae)?(Ae=Ae>>>0,rt===void 0&&(rt="utf8")):(rt=Ae,Ae=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var St=this.length-Ue;if((Ae===void 0||Ae>St)&&(Ae=St),je.length>0&&(Ae<0||Ue<0)||Ue>this.length)throw new RangeError("Attempt to write outside buffer bounds");rt||(rt="utf8");for(var Tt=!1;;)switch(rt){case"hex":return Z(this,je,Ue,Ae);case"utf8":case"utf-8":return j(this,je,Ue,Ae);case"ascii":case"latin1":case"binary":return N(this,je,Ue,Ae);case"base64":return H(this,je,Ue,Ae);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return re(this,je,Ue,Ae);default:if(Tt)throw new TypeError("Unknown encoding: "+rt);rt=(""+rt).toLowerCase(),Tt=!0}},m.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function oe(tt,je,Ue){return je===0&&Ue===tt.length?u.fromByteArray(tt):u.fromByteArray(tt.slice(je,Ue))}function _e(tt,je,Ue){Ue=Math.min(tt.length,Ue);for(var Ae=[],rt=je;rt239?4:St>223?3:St>191?2:1;if(rt+dt<=Ue){var Et,pt,Xt,or;switch(dt){case 1:St<128&&(Tt=St);break;case 2:Et=tt[rt+1],(Et&192)===128&&(or=(St&31)<<6|Et&63,or>127&&(Tt=or));break;case 3:Et=tt[rt+1],pt=tt[rt+2],(Et&192)===128&&(pt&192)===128&&(or=(St&15)<<12|(Et&63)<<6|pt&63,or>2047&&(or<55296||or>57343)&&(Tt=or));break;case 4:Et=tt[rt+1],pt=tt[rt+2],Xt=tt[rt+3],(Et&192)===128&&(pt&192)===128&&(Xt&192)===128&&(or=(St&15)<<18|(Et&63)<<12|(pt&63)<<6|Xt&63,or>65535&&or<1114112&&(Tt=or))}}Tt===null?(Tt=65533,dt=1):Tt>65535&&(Tt-=65536,Ae.push(Tt>>>10&1023|55296),Tt=56320|Tt&1023),Ae.push(Tt),rt+=dt}return Ce(Ae)}var ke=4096;function Ce(tt){var je=tt.length;if(je<=ke)return String.fromCharCode.apply(String,tt);for(var Ue="",Ae=0;AeAe)&&(Ue=Ae);for(var rt="",St=je;StAe&&(je=Ae),Ue<0?(Ue+=Ae,Ue<0&&(Ue=0)):Ue>Ae&&(Ue=Ae),UeUe)throw new RangeError("Trying to access beyond buffer length")}m.prototype.readUintLE=m.prototype.readUIntLE=function(je,Ue,Ae){je=je>>>0,Ue=Ue>>>0,Ae||we(je,Ue,this.length);for(var rt=this[je],St=1,Tt=0;++Tt>>0,Ue=Ue>>>0,Ae||we(je,Ue,this.length);for(var rt=this[je+--Ue],St=1;Ue>0&&(St*=256);)rt+=this[je+--Ue]*St;return rt},m.prototype.readUint8=m.prototype.readUInt8=function(je,Ue){return je=je>>>0,Ue||we(je,1,this.length),this[je]},m.prototype.readUint16LE=m.prototype.readUInt16LE=function(je,Ue){return je=je>>>0,Ue||we(je,2,this.length),this[je]|this[je+1]<<8},m.prototype.readUint16BE=m.prototype.readUInt16BE=function(je,Ue){return je=je>>>0,Ue||we(je,2,this.length),this[je]<<8|this[je+1]},m.prototype.readUint32LE=m.prototype.readUInt32LE=function(je,Ue){return je=je>>>0,Ue||we(je,4,this.length),(this[je]|this[je+1]<<8|this[je+2]<<16)+this[je+3]*16777216},m.prototype.readUint32BE=m.prototype.readUInt32BE=function(je,Ue){return je=je>>>0,Ue||we(je,4,this.length),this[je]*16777216+(this[je+1]<<16|this[je+2]<<8|this[je+3])},m.prototype.readIntLE=function(je,Ue,Ae){je=je>>>0,Ue=Ue>>>0,Ae||we(je,Ue,this.length);for(var rt=this[je],St=1,Tt=0;++Tt=St&&(rt-=Math.pow(2,8*Ue)),rt},m.prototype.readIntBE=function(je,Ue,Ae){je=je>>>0,Ue=Ue>>>0,Ae||we(je,Ue,this.length);for(var rt=Ue,St=1,Tt=this[je+--rt];rt>0&&(St*=256);)Tt+=this[je+--rt]*St;return St*=128,Tt>=St&&(Tt-=Math.pow(2,8*Ue)),Tt},m.prototype.readInt8=function(je,Ue){return je=je>>>0,Ue||we(je,1,this.length),this[je]&128?(255-this[je]+1)*-1:this[je]},m.prototype.readInt16LE=function(je,Ue){je=je>>>0,Ue||we(je,2,this.length);var Ae=this[je]|this[je+1]<<8;return Ae&32768?Ae|4294901760:Ae},m.prototype.readInt16BE=function(je,Ue){je=je>>>0,Ue||we(je,2,this.length);var Ae=this[je+1]|this[je]<<8;return Ae&32768?Ae|4294901760:Ae},m.prototype.readInt32LE=function(je,Ue){return je=je>>>0,Ue||we(je,4,this.length),this[je]|this[je+1]<<8|this[je+2]<<16|this[je+3]<<24},m.prototype.readInt32BE=function(je,Ue){return je=je>>>0,Ue||we(je,4,this.length),this[je]<<24|this[je+1]<<16|this[je+2]<<8|this[je+3]},m.prototype.readFloatLE=function(je,Ue){return je=je>>>0,Ue||we(je,4,this.length),c.read(this,je,!0,23,4)},m.prototype.readFloatBE=function(je,Ue){return je=je>>>0,Ue||we(je,4,this.length),c.read(this,je,!1,23,4)},m.prototype.readDoubleLE=function(je,Ue){return je=je>>>0,Ue||we(je,8,this.length),c.read(this,je,!0,52,8)},m.prototype.readDoubleBE=function(je,Ue){return je=je>>>0,Ue||we(je,8,this.length),c.read(this,je,!1,52,8)};function De(tt,je,Ue,Ae,rt,St){if(!m.isBuffer(tt))throw new TypeError('"buffer" argument must be a Buffer instance');if(je>rt||jett.length)throw new RangeError("Index out of range")}m.prototype.writeUintLE=m.prototype.writeUIntLE=function(je,Ue,Ae,rt){if(je=+je,Ue=Ue>>>0,Ae=Ae>>>0,!rt){var St=Math.pow(2,8*Ae)-1;De(this,je,Ue,Ae,St,0)}var Tt=1,dt=0;for(this[Ue]=je&255;++dt>>0,Ae=Ae>>>0,!rt){var St=Math.pow(2,8*Ae)-1;De(this,je,Ue,Ae,St,0)}var Tt=Ae-1,dt=1;for(this[Ue+Tt]=je&255;--Tt>=0&&(dt*=256);)this[Ue+Tt]=je/dt&255;return Ue+Ae},m.prototype.writeUint8=m.prototype.writeUInt8=function(je,Ue,Ae){return je=+je,Ue=Ue>>>0,Ae||De(this,je,Ue,1,255,0),this[Ue]=je&255,Ue+1},m.prototype.writeUint16LE=m.prototype.writeUInt16LE=function(je,Ue,Ae){return je=+je,Ue=Ue>>>0,Ae||De(this,je,Ue,2,65535,0),this[Ue]=je&255,this[Ue+1]=je>>>8,Ue+2},m.prototype.writeUint16BE=m.prototype.writeUInt16BE=function(je,Ue,Ae){return je=+je,Ue=Ue>>>0,Ae||De(this,je,Ue,2,65535,0),this[Ue]=je>>>8,this[Ue+1]=je&255,Ue+2},m.prototype.writeUint32LE=m.prototype.writeUInt32LE=function(je,Ue,Ae){return je=+je,Ue=Ue>>>0,Ae||De(this,je,Ue,4,4294967295,0),this[Ue+3]=je>>>24,this[Ue+2]=je>>>16,this[Ue+1]=je>>>8,this[Ue]=je&255,Ue+4},m.prototype.writeUint32BE=m.prototype.writeUInt32BE=function(je,Ue,Ae){return je=+je,Ue=Ue>>>0,Ae||De(this,je,Ue,4,4294967295,0),this[Ue]=je>>>24,this[Ue+1]=je>>>16,this[Ue+2]=je>>>8,this[Ue+3]=je&255,Ue+4},m.prototype.writeIntLE=function(je,Ue,Ae,rt){if(je=+je,Ue=Ue>>>0,!rt){var St=Math.pow(2,8*Ae-1);De(this,je,Ue,Ae,St-1,-St)}var Tt=0,dt=1,Et=0;for(this[Ue]=je&255;++Tt>0)-Et&255;return Ue+Ae},m.prototype.writeIntBE=function(je,Ue,Ae,rt){if(je=+je,Ue=Ue>>>0,!rt){var St=Math.pow(2,8*Ae-1);De(this,je,Ue,Ae,St-1,-St)}var Tt=Ae-1,dt=1,Et=0;for(this[Ue+Tt]=je&255;--Tt>=0&&(dt*=256);)je<0&&Et===0&&this[Ue+Tt+1]!==0&&(Et=1),this[Ue+Tt]=(je/dt>>0)-Et&255;return Ue+Ae},m.prototype.writeInt8=function(je,Ue,Ae){return je=+je,Ue=Ue>>>0,Ae||De(this,je,Ue,1,127,-128),je<0&&(je=255+je+1),this[Ue]=je&255,Ue+1},m.prototype.writeInt16LE=function(je,Ue,Ae){return je=+je,Ue=Ue>>>0,Ae||De(this,je,Ue,2,32767,-32768),this[Ue]=je&255,this[Ue+1]=je>>>8,Ue+2},m.prototype.writeInt16BE=function(je,Ue,Ae){return je=+je,Ue=Ue>>>0,Ae||De(this,je,Ue,2,32767,-32768),this[Ue]=je>>>8,this[Ue+1]=je&255,Ue+2},m.prototype.writeInt32LE=function(je,Ue,Ae){return je=+je,Ue=Ue>>>0,Ae||De(this,je,Ue,4,2147483647,-2147483648),this[Ue]=je&255,this[Ue+1]=je>>>8,this[Ue+2]=je>>>16,this[Ue+3]=je>>>24,Ue+4},m.prototype.writeInt32BE=function(je,Ue,Ae){return je=+je,Ue=Ue>>>0,Ae||De(this,je,Ue,4,2147483647,-2147483648),je<0&&(je=4294967295+je+1),this[Ue]=je>>>24,this[Ue+1]=je>>>16,this[Ue+2]=je>>>8,this[Ue+3]=je&255,Ue+4};function Le(tt,je,Ue,Ae,rt,St){if(Ue+Ae>tt.length)throw new RangeError("Index out of range");if(Ue<0)throw new RangeError("Index out of range")}function me(tt,je,Ue,Ae,rt){return je=+je,Ue=Ue>>>0,rt||Le(tt,je,Ue,4,34028234663852886e22,-34028234663852886e22),c.write(tt,je,Ue,Ae,23,4),Ue+4}m.prototype.writeFloatLE=function(je,Ue,Ae){return me(this,je,Ue,!0,Ae)},m.prototype.writeFloatBE=function(je,Ue,Ae){return me(this,je,Ue,!1,Ae)};function Pe(tt,je,Ue,Ae,rt){return je=+je,Ue=Ue>>>0,rt||Le(tt,je,Ue,8,17976931348623157e292,-17976931348623157e292),c.write(tt,je,Ue,Ae,52,8),Ue+8}m.prototype.writeDoubleLE=function(je,Ue,Ae){return Pe(this,je,Ue,!0,Ae)},m.prototype.writeDoubleBE=function(je,Ue,Ae){return Pe(this,je,Ue,!1,Ae)},m.prototype.copy=function(je,Ue,Ae,rt){if(!m.isBuffer(je))throw new TypeError("argument should be a Buffer");if(Ae||(Ae=0),!rt&&rt!==0&&(rt=this.length),Ue>=je.length&&(Ue=je.length),Ue||(Ue=0),rt>0&&rt=this.length)throw new RangeError("Index out of range");if(rt<0)throw new RangeError("sourceEnd out of bounds");rt>this.length&&(rt=this.length),je.length-Ue>>0,Ae=Ae===void 0?this.length:Ae>>>0,je||(je=0);var Tt;if(typeof je=="number")for(Tt=Ue;Tt55295&&Ue<57344){if(!rt){if(Ue>56319){(je-=3)>-1&&St.push(239,191,189);continue}else if(Tt+1===Ae){(je-=3)>-1&&St.push(239,191,189);continue}rt=Ue;continue}if(Ue<56320){(je-=3)>-1&&St.push(239,191,189),rt=Ue;continue}Ue=(rt-55296<<10|Ue-56320)+65536}else rt&&(je-=3)>-1&&St.push(239,191,189);if(rt=null,Ue<128){if((je-=1)<0)break;St.push(Ue)}else if(Ue<2048){if((je-=2)<0)break;St.push(Ue>>6|192,Ue&63|128)}else if(Ue<65536){if((je-=3)<0)break;St.push(Ue>>12|224,Ue>>6&63|128,Ue&63|128)}else if(Ue<1114112){if((je-=4)<0)break;St.push(Ue>>18|240,Ue>>12&63|128,Ue>>6&63|128,Ue&63|128)}else throw new Error("Invalid code point")}return St}function mt(tt){for(var je=[],Ue=0;Ue>8,rt=Ue%256,St.push(rt),St.push(Ae);return St}function st(tt){return u.toByteArray(He(tt))}function ct(tt,je,Ue,Ae){for(var rt=0;rt=je.length||rt>=tt.length);++rt)je[rt+Ue]=tt[rt];return rt}function Qt(tt,je){return tt instanceof je||tt!=null&&tt.constructor!=null&&tt.constructor.name!=null&&tt.constructor.name===je.name}function Ht(tt){return tt!==tt}var nr=function(){for(var tt="0123456789abcdef",je=new Array(256),Ue=0;Ue<16;++Ue)for(var Ae=Ue*16,rt=0;rt<16;++rt)je[Ae+rt]=tt[Ue]+tt[rt];return je}()},9216:function(i){"use strict";i.exports=l,i.exports.isMobile=l,i.exports.default=l;var a=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,o=/CrOS/,s=/android|ipad|playbook|silk/i;function l(u){u||(u={});var c=u.ua;if(!c&&typeof navigator!="undefined"&&(c=navigator.userAgent),c&&c.headers&&typeof c.headers["user-agent"]=="string"&&(c=c.headers["user-agent"]),typeof c!="string")return!1;var f=a.test(c)&&!o.test(c)||!!u.tablet&&s.test(c);return!f&&u.tablet&&u.featureDetect&&navigator&&navigator.maxTouchPoints>1&&c.indexOf("Macintosh")!==-1&&c.indexOf("Safari")!==-1&&(f=!0),f}},6296:function(i,a,o){"use strict";i.exports=h;var s=o(7261),l=o(9977),u=o(1811);function c(d,v){this._controllerNames=Object.keys(d),this._controllerList=this._controllerNames.map(function(m){return d[m]}),this._mode=v,this._active=d[v],this._active||(this._mode="turntable",this._active=d.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var f=c.prototype;f.flush=function(d){for(var v=this._controllerList,m=0;m0)throw new Error("Invalid string. Length must be a multiple of 4");var L=M.indexOf("=");L===-1&&(L=T);var x=L===T?0:4-L%4;return[L,x]}function d(M){var T=h(M),L=T[0],x=T[1];return(L+x)*3/4-x}function v(M,T,L){return(T+L)*3/4-L}function m(M){var T,L=h(M),x=L[0],C=L[1],S=new l(v(M,x,C)),g=0,P=C>0?x-4:x,E;for(E=0;E>16&255,S[g++]=T>>8&255,S[g++]=T&255;return C===2&&(T=s[M.charCodeAt(E)]<<2|s[M.charCodeAt(E+1)]>>4,S[g++]=T&255),C===1&&(T=s[M.charCodeAt(E)]<<10|s[M.charCodeAt(E+1)]<<4|s[M.charCodeAt(E+2)]>>2,S[g++]=T>>8&255,S[g++]=T&255),S}function b(M){return o[M>>18&63]+o[M>>12&63]+o[M>>6&63]+o[M&63]}function p(M,T,L){for(var x,C=[],S=T;SP?P:g+S));return x===1?(T=M[L-1],C.push(o[T>>2]+o[T<<4&63]+"==")):x===2&&(T=(M[L-2]<<8)+M[L-1],C.push(o[T>>10]+o[T>>4&63]+o[T<<2&63]+"=")),C.join("")}},3865:function(i,a,o){"use strict";var s=o(869);i.exports=l;function l(u,c){return s(u[0].mul(c[1]).add(c[0].mul(u[1])),u[1].mul(c[1]))}},1318:function(i){"use strict";i.exports=a;function a(o,s){return o[0].mul(s[1]).cmp(s[0].mul(o[1]))}},8697:function(i,a,o){"use strict";var s=o(869);i.exports=l;function l(u,c){return s(u[0].mul(c[1]),u[1].mul(c[0]))}},7842:function(i,a,o){"use strict";var s=o(6330),l=o(1533),u=o(2651),c=o(6768),f=o(869),h=o(8697);i.exports=d;function d(v,m){if(s(v))return m?h(v,d(m)):[v[0].clone(),v[1].clone()];var b=0,p,k;if(l(v))p=v.clone();else if(typeof v=="string")p=c(v);else{if(v===0)return[u(0),u(1)];if(v===Math.floor(v))p=u(v);else{for(;v!==Math.floor(v);)v=v*Math.pow(2,256),b-=256;p=u(v)}}if(s(m))p.mul(m[1]),k=m[0].clone();else if(l(m))k=m.clone();else if(typeof m=="string")k=c(m);else if(!m)k=u(1);else if(m===Math.floor(m))k=u(m);else{for(;m!==Math.floor(m);)m=m*Math.pow(2,256),b+=256;k=u(m)}return b>0?p=p.ushln(b):b<0&&(k=k.ushln(-b)),f(p,k)}},6330:function(i,a,o){"use strict";var s=o(1533);i.exports=l;function l(u){return Array.isArray(u)&&u.length===2&&s(u[0])&&s(u[1])}},5716:function(i,a,o){"use strict";var s=o(6859);i.exports=l;function l(u){return u.cmp(new s(0))}},1369:function(i,a,o){"use strict";var s=o(5716);i.exports=l;function l(u){var c=u.length,f=u.words,h=0;if(c===1)h=f[0];else if(c===2)h=f[0]+f[1]*67108864;else for(var d=0;d20?52:h+32}},1533:function(i,a,o){"use strict";var s=o(6859);i.exports=l;function l(u){return u&&typeof u=="object"&&!!u.words}},2651:function(i,a,o){"use strict";var s=o(6859),l=o(2361);i.exports=u;function u(c){var f=l.exponent(c);return f<52?new s(c):new s(c*Math.pow(2,52-f)).ushln(f-52)}},869:function(i,a,o){"use strict";var s=o(2651),l=o(5716);i.exports=u;function u(c,f){var h=l(c),d=l(f);if(h===0)return[s(0),s(1)];if(d===0)return[s(0),s(0)];d<0&&(c=c.neg(),f=f.neg());var v=c.gcd(f);return v.cmpn(1)?[c.div(v),f.div(v)]:[c,f]}},6768:function(i,a,o){"use strict";var s=o(6859);i.exports=l;function l(u){return new s(u)}},6504:function(i,a,o){"use strict";var s=o(869);i.exports=l;function l(u,c){return s(u[0].mul(c[0]),u[1].mul(c[1]))}},7721:function(i,a,o){"use strict";var s=o(5716);i.exports=l;function l(u){return s(u[0])*s(u[1])}},5572:function(i,a,o){"use strict";var s=o(869);i.exports=l;function l(u,c){return s(u[0].mul(c[1]).sub(u[1].mul(c[0])),u[1].mul(c[1]))}},946:function(i,a,o){"use strict";var s=o(1369),l=o(4025);i.exports=u;function u(c){var f=c[0],h=c[1];if(f.cmpn(0)===0)return 0;var d=f.abs().divmod(h.abs()),v=d.div,m=s(v),b=d.mod,p=f.negative!==h.negative?-1:1;if(b.cmpn(0)===0)return p*m;if(m){var k=l(m)+4,M=s(b.ushln(k).divRound(h));return p*(m+M*Math.pow(2,-k))}else{var T=h.bitLength()-b.bitLength()+53,M=s(b.ushln(T).divRound(h));return T<1023?p*M*Math.pow(2,-T):(M*=Math.pow(2,-1023),p*M*Math.pow(2,1023-T))}}},2478:function(i){"use strict";function a(f,h,d,v,m){for(var b=m+1;v<=m;){var p=v+m>>>1,k=f[p],M=d!==void 0?d(k,h):k-h;M>=0?(b=p,m=p-1):v=p+1}return b}function o(f,h,d,v,m){for(var b=m+1;v<=m;){var p=v+m>>>1,k=f[p],M=d!==void 0?d(k,h):k-h;M>0?(b=p,m=p-1):v=p+1}return b}function s(f,h,d,v,m){for(var b=v-1;v<=m;){var p=v+m>>>1,k=f[p],M=d!==void 0?d(k,h):k-h;M<0?(b=p,v=p+1):m=p-1}return b}function l(f,h,d,v,m){for(var b=v-1;v<=m;){var p=v+m>>>1,k=f[p],M=d!==void 0?d(k,h):k-h;M<=0?(b=p,v=p+1):m=p-1}return b}function u(f,h,d,v,m){for(;v<=m;){var b=v+m>>>1,p=f[b],k=d!==void 0?d(p,h):p-h;if(k===0)return b;k<=0?v=b+1:m=b-1}return-1}function c(f,h,d,v,m,b){return typeof d=="function"?b(f,h,d,v===void 0?0:v|0,m===void 0?f.length-1:m|0):b(f,h,void 0,d===void 0?0:d|0,v===void 0?f.length-1:v|0)}i.exports={ge:function(f,h,d,v,m){return c(f,h,d,v,m,a)},gt:function(f,h,d,v,m){return c(f,h,d,v,m,o)},lt:function(f,h,d,v,m){return c(f,h,d,v,m,s)},le:function(f,h,d,v,m){return c(f,h,d,v,m,l)},eq:function(f,h,d,v,m){return c(f,h,d,v,m,u)}}},8828:function(i,a){"use strict";"use restrict";var o=32;a.INT_BITS=o,a.INT_MAX=2147483647,a.INT_MIN=-1<0)-(u<0)},a.abs=function(u){var c=u>>o-1;return(u^c)-c},a.min=function(u,c){return c^(u^c)&-(u65535)<<4,u>>>=c,f=(u>255)<<3,u>>>=f,c|=f,f=(u>15)<<2,u>>>=f,c|=f,f=(u>3)<<1,u>>>=f,c|=f,c|u>>1},a.log10=function(u){return u>=1e9?9:u>=1e8?8:u>=1e7?7:u>=1e6?6:u>=1e5?5:u>=1e4?4:u>=1e3?3:u>=100?2:u>=10?1:0},a.popCount=function(u){return u=u-(u>>>1&1431655765),u=(u&858993459)+(u>>>2&858993459),(u+(u>>>4)&252645135)*16843009>>>24};function s(u){var c=32;return u&=-u,u&&c--,u&65535&&(c-=16),u&16711935&&(c-=8),u&252645135&&(c-=4),u&858993459&&(c-=2),u&1431655765&&(c-=1),c}a.countTrailingZeros=s,a.nextPow2=function(u){return u+=u===0,--u,u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u+1},a.prevPow2=function(u){return u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u-(u>>>1)},a.parity=function(u){return u^=u>>>16,u^=u>>>8,u^=u>>>4,u&=15,27030>>>u&1};var l=new Array(256);(function(u){for(var c=0;c<256;++c){var f=c,h=c,d=7;for(f>>>=1;f;f>>>=1)h<<=1,h|=f&1,--d;u[c]=h<>>8&255]<<16|l[u>>>16&255]<<8|l[u>>>24&255]},a.interleave2=function(u,c){return u&=65535,u=(u|u<<8)&16711935,u=(u|u<<4)&252645135,u=(u|u<<2)&858993459,u=(u|u<<1)&1431655765,c&=65535,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,u|c<<1},a.deinterleave2=function(u,c){return u=u>>>c&1431655765,u=(u|u>>>1)&858993459,u=(u|u>>>2)&252645135,u=(u|u>>>4)&16711935,u=(u|u>>>16)&65535,u<<16>>16},a.interleave3=function(u,c,f){return u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,u|=c<<1,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,u|f<<2},a.deinterleave3=function(u,c){return u=u>>>c&1227133513,u=(u|u>>>2)&3272356035,u=(u|u>>>4)&251719695,u=(u|u>>>8)&4278190335,u=(u|u>>>16)&1023,u<<22>>22},a.nextCombination=function(u){var c=u|u-1;return c+1|(~c&-~c)-1>>>s(u)+1}},6859:function(i,a,o){i=o.nmd(i),function(s,l){"use strict";function u(j,N){if(!j)throw new Error(N||"Assertion failed")}function c(j,N){j.super_=N;var H=function(){};H.prototype=N.prototype,j.prototype=new H,j.prototype.constructor=j}function f(j,N,H){if(f.isBN(j))return j;this.negative=0,this.words=null,this.length=0,this.red=null,j!==null&&((N==="le"||N==="be")&&(H=N,N=10),this._init(j||0,N||10,H||"be"))}typeof s=="object"?s.exports=f:l.BN=f,f.BN=f,f.wordSize=26;var h;try{typeof window!="undefined"&&typeof window.Buffer!="undefined"?h=window.Buffer:h=o(7790).Buffer}catch(j){}f.isBN=function(N){return N instanceof f?!0:N!==null&&typeof N=="object"&&N.constructor.wordSize===f.wordSize&&Array.isArray(N.words)},f.max=function(N,H){return N.cmp(H)>0?N:H},f.min=function(N,H){return N.cmp(H)<0?N:H},f.prototype._init=function(N,H,re){if(typeof N=="number")return this._initNumber(N,H,re);if(typeof N=="object")return this._initArray(N,H,re);H==="hex"&&(H=16),u(H===(H|0)&&H>=2&&H<=36),N=N.toString().replace(/\s+/g,"");var oe=0;N[0]==="-"&&(oe++,this.negative=1),oe=0;oe-=3)ke=N[oe]|N[oe-1]<<8|N[oe-2]<<16,this.words[_e]|=ke<>>26-Ce&67108863,Ce+=24,Ce>=26&&(Ce-=26,_e++);else if(re==="le")for(oe=0,_e=0;oe>>26-Ce&67108863,Ce+=24,Ce>=26&&(Ce-=26,_e++);return this.strip()};function d(j,N){var H=j.charCodeAt(N);return H>=65&&H<=70?H-55:H>=97&&H<=102?H-87:H-48&15}function v(j,N,H){var re=d(j,H);return H-1>=N&&(re|=d(j,H-1)<<4),re}f.prototype._parseHex=function(N,H,re){this.length=Math.ceil((N.length-H)/6),this.words=new Array(this.length);for(var oe=0;oe=H;oe-=2)Ce=v(N,H,oe)<<_e,this.words[ke]|=Ce&67108863,_e>=18?(_e-=18,ke+=1,this.words[ke]|=Ce>>>26):_e+=8;else{var ge=N.length-H;for(oe=ge%2===0?H+1:H;oe=18?(_e-=18,ke+=1,this.words[ke]|=Ce>>>26):_e+=8}this.strip()};function m(j,N,H,re){for(var oe=0,_e=Math.min(j.length,H),ke=N;ke<_e;ke++){var Ce=j.charCodeAt(ke)-48;oe*=re,Ce>=49?oe+=Ce-49+10:Ce>=17?oe+=Ce-17+10:oe+=Ce}return oe}f.prototype._parseBase=function(N,H,re){this.words=[0],this.length=1;for(var oe=0,_e=1;_e<=67108863;_e*=H)oe++;oe--,_e=_e/H|0;for(var ke=N.length-re,Ce=ke%oe,ge=Math.min(ke,ke-Ce)+re,ie=0,Se=re;Se1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?""};var b=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],k=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];f.prototype.toString=function(N,H){N=N||10,H=H|0||1;var re;if(N===16||N==="hex"){re="";for(var oe=0,_e=0,ke=0;ke>>24-oe&16777215,oe+=2,oe>=26&&(oe-=26,ke--),_e!==0||ke!==this.length-1?re=b[6-ge.length]+ge+re:re=ge+re}for(_e!==0&&(re=_e.toString(16)+re);re.length%H!==0;)re="0"+re;return this.negative!==0&&(re="-"+re),re}if(N===(N|0)&&N>=2&&N<=36){var ie=p[N],Se=k[N];re="";var Ee=this.clone();for(Ee.negative=0;!Ee.isZero();){var we=Ee.modn(Se).toString(N);Ee=Ee.idivn(Se),Ee.isZero()?re=we+re:re=b[ie-we.length]+we+re}for(this.isZero()&&(re="0"+re);re.length%H!==0;)re="0"+re;return this.negative!==0&&(re="-"+re),re}u(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var N=this.words[0];return this.length===2?N+=this.words[1]*67108864:this.length===3&&this.words[2]===1?N+=4503599627370496+this.words[1]*67108864:this.length>2&&u(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-N:N},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(N,H){return u(typeof h!="undefined"),this.toArrayLike(h,N,H)},f.prototype.toArray=function(N,H){return this.toArrayLike(Array,N,H)},f.prototype.toArrayLike=function(N,H,re){var oe=this.byteLength(),_e=re||Math.max(1,oe);u(oe<=_e,"byte array longer than desired length"),u(_e>0,"Requested array length <= 0"),this.strip();var ke=H==="le",Ce=new N(_e),ge,ie,Se=this.clone();if(ke){for(ie=0;!Se.isZero();ie++)ge=Se.andln(255),Se.iushrn(8),Ce[ie]=ge;for(;ie<_e;ie++)Ce[ie]=0}else{for(ie=0;ie<_e-oe;ie++)Ce[ie]=0;for(ie=0;!Se.isZero();ie++)ge=Se.andln(255),Se.iushrn(8),Ce[_e-ie-1]=ge}return Ce},Math.clz32?f.prototype._countBits=function(N){return 32-Math.clz32(N)}:f.prototype._countBits=function(N){var H=N,re=0;return H>=4096&&(re+=13,H>>>=13),H>=64&&(re+=7,H>>>=7),H>=8&&(re+=4,H>>>=4),H>=2&&(re+=2,H>>>=2),re+H},f.prototype._zeroBits=function(N){if(N===0)return 26;var H=N,re=0;return(H&8191)===0&&(re+=13,H>>>=13),(H&127)===0&&(re+=7,H>>>=7),(H&15)===0&&(re+=4,H>>>=4),(H&3)===0&&(re+=2,H>>>=2),(H&1)===0&&re++,re},f.prototype.bitLength=function(){var N=this.words[this.length-1],H=this._countBits(N);return(this.length-1)*26+H};function M(j){for(var N=new Array(j.bitLength()),H=0;H>>oe}return N}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var N=0,H=0;HN.length?this.clone().ior(N):N.clone().ior(this)},f.prototype.uor=function(N){return this.length>N.length?this.clone().iuor(N):N.clone().iuor(this)},f.prototype.iuand=function(N){var H;this.length>N.length?H=N:H=this;for(var re=0;reN.length?this.clone().iand(N):N.clone().iand(this)},f.prototype.uand=function(N){return this.length>N.length?this.clone().iuand(N):N.clone().iuand(this)},f.prototype.iuxor=function(N){var H,re;this.length>N.length?(H=this,re=N):(H=N,re=this);for(var oe=0;oeN.length?this.clone().ixor(N):N.clone().ixor(this)},f.prototype.uxor=function(N){return this.length>N.length?this.clone().iuxor(N):N.clone().iuxor(this)},f.prototype.inotn=function(N){u(typeof N=="number"&&N>=0);var H=Math.ceil(N/26)|0,re=N%26;this._expand(H),re>0&&H--;for(var oe=0;oe0&&(this.words[oe]=~this.words[oe]&67108863>>26-re),this.strip()},f.prototype.notn=function(N){return this.clone().inotn(N)},f.prototype.setn=function(N,H){u(typeof N=="number"&&N>=0);var re=N/26|0,oe=N%26;return this._expand(re+1),H?this.words[re]=this.words[re]|1<N.length?(re=this,oe=N):(re=N,oe=this);for(var _e=0,ke=0;ke>>26;for(;_e!==0&&ke>>26;if(this.length=re.length,_e!==0)this.words[this.length]=_e,this.length++;else if(re!==this)for(;keN.length?this.clone().iadd(N):N.clone().iadd(this)},f.prototype.isub=function(N){if(N.negative!==0){N.negative=0;var H=this.iadd(N);return N.negative=1,H._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(N),this.negative=1,this._normSign();var re=this.cmp(N);if(re===0)return this.negative=0,this.length=1,this.words[0]=0,this;var oe,_e;re>0?(oe=this,_e=N):(oe=N,_e=this);for(var ke=0,Ce=0;Ce<_e.length;Ce++)H=(oe.words[Ce]|0)-(_e.words[Ce]|0)+ke,ke=H>>26,this.words[Ce]=H&67108863;for(;ke!==0&&Ce>26,this.words[Ce]=H&67108863;if(ke===0&&Ce>>26,Ee=ge&67108863,we=Math.min(ie,N.length-1),De=Math.max(0,ie-j.length+1);De<=we;De++){var Le=ie-De|0;oe=j.words[Le]|0,_e=N.words[De]|0,ke=oe*_e+Ee,Se+=ke/67108864|0,Ee=ke&67108863}H.words[ie]=Ee|0,ge=Se|0}return ge!==0?H.words[ie]=ge|0:H.length--,H.strip()}var L=function(N,H,re){var oe=N.words,_e=H.words,ke=re.words,Ce=0,ge,ie,Se,Ee=oe[0]|0,we=Ee&8191,De=Ee>>>13,Le=oe[1]|0,me=Le&8191,Pe=Le>>>13,ce=oe[2]|0,He=ce&8191,lt=ce>>>13,mt=oe[3]|0,Vt=mt&8191,st=mt>>>13,ct=oe[4]|0,Qt=ct&8191,Ht=ct>>>13,nr=oe[5]|0,tt=nr&8191,je=nr>>>13,Ue=oe[6]|0,Ae=Ue&8191,rt=Ue>>>13,St=oe[7]|0,Tt=St&8191,dt=St>>>13,Et=oe[8]|0,pt=Et&8191,Xt=Et>>>13,or=oe[9]|0,_r=or&8191,Er=or>>>13,ei=_e[0]|0,qr=ei&8191,jr=ei>>>13,gt=_e[1]|0,Ge=gt&8191,Je=gt>>>13,We=_e[2]|0,et=We&8191,xt=We>>>13,At=_e[3]|0,Kt=At&8191,er=At>>>13,Sr=_e[4]|0,Gr=Sr&8191,Ir=Sr>>>13,Yr=_e[5]|0,_i=Yr&8191,Pi=Yr>>>13,ai=_e[6]|0,mi=ai&8191,un=ai>>>13,Fn=_e[7]|0,An=Fn&8191,Hn=Fn>>>13,Qn=_e[8]|0,Vi=Qn&8191,Kn=Qn>>>13,Jn=_e[9]|0,Gt=Jn&8191,wt=Jn>>>13;re.negative=N.negative^H.negative,re.length=19,ge=Math.imul(we,qr),ie=Math.imul(we,jr),ie=ie+Math.imul(De,qr)|0,Se=Math.imul(De,jr);var rr=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(rr>>>26)|0,rr&=67108863,ge=Math.imul(me,qr),ie=Math.imul(me,jr),ie=ie+Math.imul(Pe,qr)|0,Se=Math.imul(Pe,jr),ge=ge+Math.imul(we,Ge)|0,ie=ie+Math.imul(we,Je)|0,ie=ie+Math.imul(De,Ge)|0,Se=Se+Math.imul(De,Je)|0;var ir=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(ir>>>26)|0,ir&=67108863,ge=Math.imul(He,qr),ie=Math.imul(He,jr),ie=ie+Math.imul(lt,qr)|0,Se=Math.imul(lt,jr),ge=ge+Math.imul(me,Ge)|0,ie=ie+Math.imul(me,Je)|0,ie=ie+Math.imul(Pe,Ge)|0,Se=Se+Math.imul(Pe,Je)|0,ge=ge+Math.imul(we,et)|0,ie=ie+Math.imul(we,xt)|0,ie=ie+Math.imul(De,et)|0,Se=Se+Math.imul(De,xt)|0;var wr=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(wr>>>26)|0,wr&=67108863,ge=Math.imul(Vt,qr),ie=Math.imul(Vt,jr),ie=ie+Math.imul(st,qr)|0,Se=Math.imul(st,jr),ge=ge+Math.imul(He,Ge)|0,ie=ie+Math.imul(He,Je)|0,ie=ie+Math.imul(lt,Ge)|0,Se=Se+Math.imul(lt,Je)|0,ge=ge+Math.imul(me,et)|0,ie=ie+Math.imul(me,xt)|0,ie=ie+Math.imul(Pe,et)|0,Se=Se+Math.imul(Pe,xt)|0,ge=ge+Math.imul(we,Kt)|0,ie=ie+Math.imul(we,er)|0,ie=ie+Math.imul(De,Kt)|0,Se=Se+Math.imul(De,er)|0;var Xr=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(Xr>>>26)|0,Xr&=67108863,ge=Math.imul(Qt,qr),ie=Math.imul(Qt,jr),ie=ie+Math.imul(Ht,qr)|0,Se=Math.imul(Ht,jr),ge=ge+Math.imul(Vt,Ge)|0,ie=ie+Math.imul(Vt,Je)|0,ie=ie+Math.imul(st,Ge)|0,Se=Se+Math.imul(st,Je)|0,ge=ge+Math.imul(He,et)|0,ie=ie+Math.imul(He,xt)|0,ie=ie+Math.imul(lt,et)|0,Se=Se+Math.imul(lt,xt)|0,ge=ge+Math.imul(me,Kt)|0,ie=ie+Math.imul(me,er)|0,ie=ie+Math.imul(Pe,Kt)|0,Se=Se+Math.imul(Pe,er)|0,ge=ge+Math.imul(we,Gr)|0,ie=ie+Math.imul(we,Ir)|0,ie=ie+Math.imul(De,Gr)|0,Se=Se+Math.imul(De,Ir)|0;var ti=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(ti>>>26)|0,ti&=67108863,ge=Math.imul(tt,qr),ie=Math.imul(tt,jr),ie=ie+Math.imul(je,qr)|0,Se=Math.imul(je,jr),ge=ge+Math.imul(Qt,Ge)|0,ie=ie+Math.imul(Qt,Je)|0,ie=ie+Math.imul(Ht,Ge)|0,Se=Se+Math.imul(Ht,Je)|0,ge=ge+Math.imul(Vt,et)|0,ie=ie+Math.imul(Vt,xt)|0,ie=ie+Math.imul(st,et)|0,Se=Se+Math.imul(st,xt)|0,ge=ge+Math.imul(He,Kt)|0,ie=ie+Math.imul(He,er)|0,ie=ie+Math.imul(lt,Kt)|0,Se=Se+Math.imul(lt,er)|0,ge=ge+Math.imul(me,Gr)|0,ie=ie+Math.imul(me,Ir)|0,ie=ie+Math.imul(Pe,Gr)|0,Se=Se+Math.imul(Pe,Ir)|0,ge=ge+Math.imul(we,_i)|0,ie=ie+Math.imul(we,Pi)|0,ie=ie+Math.imul(De,_i)|0,Se=Se+Math.imul(De,Pi)|0;var $r=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+($r>>>26)|0,$r&=67108863,ge=Math.imul(Ae,qr),ie=Math.imul(Ae,jr),ie=ie+Math.imul(rt,qr)|0,Se=Math.imul(rt,jr),ge=ge+Math.imul(tt,Ge)|0,ie=ie+Math.imul(tt,Je)|0,ie=ie+Math.imul(je,Ge)|0,Se=Se+Math.imul(je,Je)|0,ge=ge+Math.imul(Qt,et)|0,ie=ie+Math.imul(Qt,xt)|0,ie=ie+Math.imul(Ht,et)|0,Se=Se+Math.imul(Ht,xt)|0,ge=ge+Math.imul(Vt,Kt)|0,ie=ie+Math.imul(Vt,er)|0,ie=ie+Math.imul(st,Kt)|0,Se=Se+Math.imul(st,er)|0,ge=ge+Math.imul(He,Gr)|0,ie=ie+Math.imul(He,Ir)|0,ie=ie+Math.imul(lt,Gr)|0,Se=Se+Math.imul(lt,Ir)|0,ge=ge+Math.imul(me,_i)|0,ie=ie+Math.imul(me,Pi)|0,ie=ie+Math.imul(Pe,_i)|0,Se=Se+Math.imul(Pe,Pi)|0,ge=ge+Math.imul(we,mi)|0,ie=ie+Math.imul(we,un)|0,ie=ie+Math.imul(De,mi)|0,Se=Se+Math.imul(De,un)|0;var Ri=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(Ri>>>26)|0,Ri&=67108863,ge=Math.imul(Tt,qr),ie=Math.imul(Tt,jr),ie=ie+Math.imul(dt,qr)|0,Se=Math.imul(dt,jr),ge=ge+Math.imul(Ae,Ge)|0,ie=ie+Math.imul(Ae,Je)|0,ie=ie+Math.imul(rt,Ge)|0,Se=Se+Math.imul(rt,Je)|0,ge=ge+Math.imul(tt,et)|0,ie=ie+Math.imul(tt,xt)|0,ie=ie+Math.imul(je,et)|0,Se=Se+Math.imul(je,xt)|0,ge=ge+Math.imul(Qt,Kt)|0,ie=ie+Math.imul(Qt,er)|0,ie=ie+Math.imul(Ht,Kt)|0,Se=Se+Math.imul(Ht,er)|0,ge=ge+Math.imul(Vt,Gr)|0,ie=ie+Math.imul(Vt,Ir)|0,ie=ie+Math.imul(st,Gr)|0,Se=Se+Math.imul(st,Ir)|0,ge=ge+Math.imul(He,_i)|0,ie=ie+Math.imul(He,Pi)|0,ie=ie+Math.imul(lt,_i)|0,Se=Se+Math.imul(lt,Pi)|0,ge=ge+Math.imul(me,mi)|0,ie=ie+Math.imul(me,un)|0,ie=ie+Math.imul(Pe,mi)|0,Se=Se+Math.imul(Pe,un)|0,ge=ge+Math.imul(we,An)|0,ie=ie+Math.imul(we,Hn)|0,ie=ie+Math.imul(De,An)|0,Se=Se+Math.imul(De,Hn)|0;var Zi=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(Zi>>>26)|0,Zi&=67108863,ge=Math.imul(pt,qr),ie=Math.imul(pt,jr),ie=ie+Math.imul(Xt,qr)|0,Se=Math.imul(Xt,jr),ge=ge+Math.imul(Tt,Ge)|0,ie=ie+Math.imul(Tt,Je)|0,ie=ie+Math.imul(dt,Ge)|0,Se=Se+Math.imul(dt,Je)|0,ge=ge+Math.imul(Ae,et)|0,ie=ie+Math.imul(Ae,xt)|0,ie=ie+Math.imul(rt,et)|0,Se=Se+Math.imul(rt,xt)|0,ge=ge+Math.imul(tt,Kt)|0,ie=ie+Math.imul(tt,er)|0,ie=ie+Math.imul(je,Kt)|0,Se=Se+Math.imul(je,er)|0,ge=ge+Math.imul(Qt,Gr)|0,ie=ie+Math.imul(Qt,Ir)|0,ie=ie+Math.imul(Ht,Gr)|0,Se=Se+Math.imul(Ht,Ir)|0,ge=ge+Math.imul(Vt,_i)|0,ie=ie+Math.imul(Vt,Pi)|0,ie=ie+Math.imul(st,_i)|0,Se=Se+Math.imul(st,Pi)|0,ge=ge+Math.imul(He,mi)|0,ie=ie+Math.imul(He,un)|0,ie=ie+Math.imul(lt,mi)|0,Se=Se+Math.imul(lt,un)|0,ge=ge+Math.imul(me,An)|0,ie=ie+Math.imul(me,Hn)|0,ie=ie+Math.imul(Pe,An)|0,Se=Se+Math.imul(Pe,Hn)|0,ge=ge+Math.imul(we,Vi)|0,ie=ie+Math.imul(we,Kn)|0,ie=ie+Math.imul(De,Vi)|0,Se=Se+Math.imul(De,Kn)|0;var en=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(en>>>26)|0,en&=67108863,ge=Math.imul(_r,qr),ie=Math.imul(_r,jr),ie=ie+Math.imul(Er,qr)|0,Se=Math.imul(Er,jr),ge=ge+Math.imul(pt,Ge)|0,ie=ie+Math.imul(pt,Je)|0,ie=ie+Math.imul(Xt,Ge)|0,Se=Se+Math.imul(Xt,Je)|0,ge=ge+Math.imul(Tt,et)|0,ie=ie+Math.imul(Tt,xt)|0,ie=ie+Math.imul(dt,et)|0,Se=Se+Math.imul(dt,xt)|0,ge=ge+Math.imul(Ae,Kt)|0,ie=ie+Math.imul(Ae,er)|0,ie=ie+Math.imul(rt,Kt)|0,Se=Se+Math.imul(rt,er)|0,ge=ge+Math.imul(tt,Gr)|0,ie=ie+Math.imul(tt,Ir)|0,ie=ie+Math.imul(je,Gr)|0,Se=Se+Math.imul(je,Ir)|0,ge=ge+Math.imul(Qt,_i)|0,ie=ie+Math.imul(Qt,Pi)|0,ie=ie+Math.imul(Ht,_i)|0,Se=Se+Math.imul(Ht,Pi)|0,ge=ge+Math.imul(Vt,mi)|0,ie=ie+Math.imul(Vt,un)|0,ie=ie+Math.imul(st,mi)|0,Se=Se+Math.imul(st,un)|0,ge=ge+Math.imul(He,An)|0,ie=ie+Math.imul(He,Hn)|0,ie=ie+Math.imul(lt,An)|0,Se=Se+Math.imul(lt,Hn)|0,ge=ge+Math.imul(me,Vi)|0,ie=ie+Math.imul(me,Kn)|0,ie=ie+Math.imul(Pe,Vi)|0,Se=Se+Math.imul(Pe,Kn)|0,ge=ge+Math.imul(we,Gt)|0,ie=ie+Math.imul(we,wt)|0,ie=ie+Math.imul(De,Gt)|0,Se=Se+Math.imul(De,wt)|0;var fn=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(fn>>>26)|0,fn&=67108863,ge=Math.imul(_r,Ge),ie=Math.imul(_r,Je),ie=ie+Math.imul(Er,Ge)|0,Se=Math.imul(Er,Je),ge=ge+Math.imul(pt,et)|0,ie=ie+Math.imul(pt,xt)|0,ie=ie+Math.imul(Xt,et)|0,Se=Se+Math.imul(Xt,xt)|0,ge=ge+Math.imul(Tt,Kt)|0,ie=ie+Math.imul(Tt,er)|0,ie=ie+Math.imul(dt,Kt)|0,Se=Se+Math.imul(dt,er)|0,ge=ge+Math.imul(Ae,Gr)|0,ie=ie+Math.imul(Ae,Ir)|0,ie=ie+Math.imul(rt,Gr)|0,Se=Se+Math.imul(rt,Ir)|0,ge=ge+Math.imul(tt,_i)|0,ie=ie+Math.imul(tt,Pi)|0,ie=ie+Math.imul(je,_i)|0,Se=Se+Math.imul(je,Pi)|0,ge=ge+Math.imul(Qt,mi)|0,ie=ie+Math.imul(Qt,un)|0,ie=ie+Math.imul(Ht,mi)|0,Se=Se+Math.imul(Ht,un)|0,ge=ge+Math.imul(Vt,An)|0,ie=ie+Math.imul(Vt,Hn)|0,ie=ie+Math.imul(st,An)|0,Se=Se+Math.imul(st,Hn)|0,ge=ge+Math.imul(He,Vi)|0,ie=ie+Math.imul(He,Kn)|0,ie=ie+Math.imul(lt,Vi)|0,Se=Se+Math.imul(lt,Kn)|0,ge=ge+Math.imul(me,Gt)|0,ie=ie+Math.imul(me,wt)|0,ie=ie+Math.imul(Pe,Gt)|0,Se=Se+Math.imul(Pe,wt)|0;var yn=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(yn>>>26)|0,yn&=67108863,ge=Math.imul(_r,et),ie=Math.imul(_r,xt),ie=ie+Math.imul(Er,et)|0,Se=Math.imul(Er,xt),ge=ge+Math.imul(pt,Kt)|0,ie=ie+Math.imul(pt,er)|0,ie=ie+Math.imul(Xt,Kt)|0,Se=Se+Math.imul(Xt,er)|0,ge=ge+Math.imul(Tt,Gr)|0,ie=ie+Math.imul(Tt,Ir)|0,ie=ie+Math.imul(dt,Gr)|0,Se=Se+Math.imul(dt,Ir)|0,ge=ge+Math.imul(Ae,_i)|0,ie=ie+Math.imul(Ae,Pi)|0,ie=ie+Math.imul(rt,_i)|0,Se=Se+Math.imul(rt,Pi)|0,ge=ge+Math.imul(tt,mi)|0,ie=ie+Math.imul(tt,un)|0,ie=ie+Math.imul(je,mi)|0,Se=Se+Math.imul(je,un)|0,ge=ge+Math.imul(Qt,An)|0,ie=ie+Math.imul(Qt,Hn)|0,ie=ie+Math.imul(Ht,An)|0,Se=Se+Math.imul(Ht,Hn)|0,ge=ge+Math.imul(Vt,Vi)|0,ie=ie+Math.imul(Vt,Kn)|0,ie=ie+Math.imul(st,Vi)|0,Se=Se+Math.imul(st,Kn)|0,ge=ge+Math.imul(He,Gt)|0,ie=ie+Math.imul(He,wt)|0,ie=ie+Math.imul(lt,Gt)|0,Se=Se+Math.imul(lt,wt)|0;var Mn=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(Mn>>>26)|0,Mn&=67108863,ge=Math.imul(_r,Kt),ie=Math.imul(_r,er),ie=ie+Math.imul(Er,Kt)|0,Se=Math.imul(Er,er),ge=ge+Math.imul(pt,Gr)|0,ie=ie+Math.imul(pt,Ir)|0,ie=ie+Math.imul(Xt,Gr)|0,Se=Se+Math.imul(Xt,Ir)|0,ge=ge+Math.imul(Tt,_i)|0,ie=ie+Math.imul(Tt,Pi)|0,ie=ie+Math.imul(dt,_i)|0,Se=Se+Math.imul(dt,Pi)|0,ge=ge+Math.imul(Ae,mi)|0,ie=ie+Math.imul(Ae,un)|0,ie=ie+Math.imul(rt,mi)|0,Se=Se+Math.imul(rt,un)|0,ge=ge+Math.imul(tt,An)|0,ie=ie+Math.imul(tt,Hn)|0,ie=ie+Math.imul(je,An)|0,Se=Se+Math.imul(je,Hn)|0,ge=ge+Math.imul(Qt,Vi)|0,ie=ie+Math.imul(Qt,Kn)|0,ie=ie+Math.imul(Ht,Vi)|0,Se=Se+Math.imul(Ht,Kn)|0,ge=ge+Math.imul(Vt,Gt)|0,ie=ie+Math.imul(Vt,wt)|0,ie=ie+Math.imul(st,Gt)|0,Se=Se+Math.imul(st,wt)|0;var Ba=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(Ba>>>26)|0,Ba&=67108863,ge=Math.imul(_r,Gr),ie=Math.imul(_r,Ir),ie=ie+Math.imul(Er,Gr)|0,Se=Math.imul(Er,Ir),ge=ge+Math.imul(pt,_i)|0,ie=ie+Math.imul(pt,Pi)|0,ie=ie+Math.imul(Xt,_i)|0,Se=Se+Math.imul(Xt,Pi)|0,ge=ge+Math.imul(Tt,mi)|0,ie=ie+Math.imul(Tt,un)|0,ie=ie+Math.imul(dt,mi)|0,Se=Se+Math.imul(dt,un)|0,ge=ge+Math.imul(Ae,An)|0,ie=ie+Math.imul(Ae,Hn)|0,ie=ie+Math.imul(rt,An)|0,Se=Se+Math.imul(rt,Hn)|0,ge=ge+Math.imul(tt,Vi)|0,ie=ie+Math.imul(tt,Kn)|0,ie=ie+Math.imul(je,Vi)|0,Se=Se+Math.imul(je,Kn)|0,ge=ge+Math.imul(Qt,Gt)|0,ie=ie+Math.imul(Qt,wt)|0,ie=ie+Math.imul(Ht,Gt)|0,Se=Se+Math.imul(Ht,wt)|0;var ua=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(ua>>>26)|0,ua&=67108863,ge=Math.imul(_r,_i),ie=Math.imul(_r,Pi),ie=ie+Math.imul(Er,_i)|0,Se=Math.imul(Er,Pi),ge=ge+Math.imul(pt,mi)|0,ie=ie+Math.imul(pt,un)|0,ie=ie+Math.imul(Xt,mi)|0,Se=Se+Math.imul(Xt,un)|0,ge=ge+Math.imul(Tt,An)|0,ie=ie+Math.imul(Tt,Hn)|0,ie=ie+Math.imul(dt,An)|0,Se=Se+Math.imul(dt,Hn)|0,ge=ge+Math.imul(Ae,Vi)|0,ie=ie+Math.imul(Ae,Kn)|0,ie=ie+Math.imul(rt,Vi)|0,Se=Se+Math.imul(rt,Kn)|0,ge=ge+Math.imul(tt,Gt)|0,ie=ie+Math.imul(tt,wt)|0,ie=ie+Math.imul(je,Gt)|0,Se=Se+Math.imul(je,wt)|0;var ma=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(ma>>>26)|0,ma&=67108863,ge=Math.imul(_r,mi),ie=Math.imul(_r,un),ie=ie+Math.imul(Er,mi)|0,Se=Math.imul(Er,un),ge=ge+Math.imul(pt,An)|0,ie=ie+Math.imul(pt,Hn)|0,ie=ie+Math.imul(Xt,An)|0,Se=Se+Math.imul(Xt,Hn)|0,ge=ge+Math.imul(Tt,Vi)|0,ie=ie+Math.imul(Tt,Kn)|0,ie=ie+Math.imul(dt,Vi)|0,Se=Se+Math.imul(dt,Kn)|0,ge=ge+Math.imul(Ae,Gt)|0,ie=ie+Math.imul(Ae,wt)|0,ie=ie+Math.imul(rt,Gt)|0,Se=Se+Math.imul(rt,wt)|0;var Wa=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(Wa>>>26)|0,Wa&=67108863,ge=Math.imul(_r,An),ie=Math.imul(_r,Hn),ie=ie+Math.imul(Er,An)|0,Se=Math.imul(Er,Hn),ge=ge+Math.imul(pt,Vi)|0,ie=ie+Math.imul(pt,Kn)|0,ie=ie+Math.imul(Xt,Vi)|0,Se=Se+Math.imul(Xt,Kn)|0,ge=ge+Math.imul(Tt,Gt)|0,ie=ie+Math.imul(Tt,wt)|0,ie=ie+Math.imul(dt,Gt)|0,Se=Se+Math.imul(dt,wt)|0;var Fa=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(Fa>>>26)|0,Fa&=67108863,ge=Math.imul(_r,Vi),ie=Math.imul(_r,Kn),ie=ie+Math.imul(Er,Vi)|0,Se=Math.imul(Er,Kn),ge=ge+Math.imul(pt,Gt)|0,ie=ie+Math.imul(pt,wt)|0,ie=ie+Math.imul(Xt,Gt)|0,Se=Se+Math.imul(Xt,wt)|0;var Xo=(Ce+ge|0)+((ie&8191)<<13)|0;Ce=(Se+(ie>>>13)|0)+(Xo>>>26)|0,Xo&=67108863,ge=Math.imul(_r,Gt),ie=Math.imul(_r,wt),ie=ie+Math.imul(Er,Gt)|0,Se=Math.imul(Er,wt);var da=(Ce+ge|0)+((ie&8191)<<13)|0;return Ce=(Se+(ie>>>13)|0)+(da>>>26)|0,da&=67108863,ke[0]=rr,ke[1]=ir,ke[2]=wr,ke[3]=Xr,ke[4]=ti,ke[5]=$r,ke[6]=Ri,ke[7]=Zi,ke[8]=en,ke[9]=fn,ke[10]=yn,ke[11]=Mn,ke[12]=Ba,ke[13]=ua,ke[14]=ma,ke[15]=Wa,ke[16]=Fa,ke[17]=Xo,ke[18]=da,Ce!==0&&(ke[19]=Ce,re.length++),re};Math.imul||(L=T);function x(j,N,H){H.negative=N.negative^j.negative,H.length=j.length+N.length;for(var re=0,oe=0,_e=0;_e>>26)|0,oe+=ke>>>26,ke&=67108863}H.words[_e]=Ce,re=ke,ke=oe}return re!==0?H.words[_e]=re:H.length--,H.strip()}function C(j,N,H){var re=new S;return re.mulp(j,N,H)}f.prototype.mulTo=function(N,H){var re,oe=this.length+N.length;return this.length===10&&N.length===10?re=L(this,N,H):oe<63?re=T(this,N,H):oe<1024?re=x(this,N,H):re=C(this,N,H),re};function S(j,N){this.x=j,this.y=N}S.prototype.makeRBT=function(N){for(var H=new Array(N),re=f.prototype._countBits(N)-1,oe=0;oe>=1;return oe},S.prototype.permute=function(N,H,re,oe,_e,ke){for(var Ce=0;Ce>>1)_e++;return 1<<_e+1+oe},S.prototype.conjugate=function(N,H,re){if(!(re<=1))for(var oe=0;oe>>13,re[2*ke+1]=_e&8191,_e=_e>>>13;for(ke=2*H;ke>=26,H+=oe/67108864|0,H+=_e>>>26,this.words[re]=_e&67108863}return H!==0&&(this.words[re]=H,this.length++),this.length=N===0?1:this.length,this},f.prototype.muln=function(N){return this.clone().imuln(N)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(N){var H=M(N);if(H.length===0)return new f(1);for(var re=this,oe=0;oe=0);var H=N%26,re=(N-H)/26,oe=67108863>>>26-H<<26-H,_e;if(H!==0){var ke=0;for(_e=0;_e>>26-H}ke&&(this.words[_e]=ke,this.length++)}if(re!==0){for(_e=this.length-1;_e>=0;_e--)this.words[_e+re]=this.words[_e];for(_e=0;_e=0);var oe;H?oe=(H-H%26)/26:oe=0;var _e=N%26,ke=Math.min((N-_e)/26,this.length),Ce=67108863^67108863>>>_e<<_e,ge=re;if(oe-=ke,oe=Math.max(0,oe),ge){for(var ie=0;ieke)for(this.length-=ke,ie=0;ie=0&&(Se!==0||ie>=oe);ie--){var Ee=this.words[ie]|0;this.words[ie]=Se<<26-_e|Ee>>>_e,Se=Ee&Ce}return ge&&Se!==0&&(ge.words[ge.length++]=Se),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(N,H,re){return u(this.negative===0),this.iushrn(N,H,re)},f.prototype.shln=function(N){return this.clone().ishln(N)},f.prototype.ushln=function(N){return this.clone().iushln(N)},f.prototype.shrn=function(N){return this.clone().ishrn(N)},f.prototype.ushrn=function(N){return this.clone().iushrn(N)},f.prototype.testn=function(N){u(typeof N=="number"&&N>=0);var H=N%26,re=(N-H)/26,oe=1<=0);var H=N%26,re=(N-H)/26;if(u(this.negative===0,"imaskn works only with positive numbers"),this.length<=re)return this;if(H!==0&&re++,this.length=Math.min(re,this.length),H!==0){var oe=67108863^67108863>>>H<=67108864;H++)this.words[H]-=67108864,H===this.length-1?this.words[H+1]=1:this.words[H+1]++;return this.length=Math.max(this.length,H+1),this},f.prototype.isubn=function(N){if(u(typeof N=="number"),u(N<67108864),N<0)return this.iaddn(-N);if(this.negative!==0)return this.negative=0,this.iaddn(N),this.negative=1,this;if(this.words[0]-=N,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var H=0;H>26)-(ge/67108864|0),this.words[_e+re]=ke&67108863}for(;_e>26,this.words[_e+re]=ke&67108863;if(Ce===0)return this.strip();for(u(Ce===-1),Ce=0,_e=0;_e>26,this.words[_e]=ke&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(N,H){var re=this.length-N.length,oe=this.clone(),_e=N,ke=_e.words[_e.length-1]|0,Ce=this._countBits(ke);re=26-Ce,re!==0&&(_e=_e.ushln(re),oe.iushln(re),ke=_e.words[_e.length-1]|0);var ge=oe.length-_e.length,ie;if(H!=="mod"){ie=new f(null),ie.length=ge+1,ie.words=new Array(ie.length);for(var Se=0;Se=0;we--){var De=(oe.words[_e.length+we]|0)*67108864+(oe.words[_e.length+we-1]|0);for(De=Math.min(De/ke|0,67108863),oe._ishlnsubmul(_e,De,we);oe.negative!==0;)De--,oe.negative=0,oe._ishlnsubmul(_e,1,we),oe.isZero()||(oe.negative^=1);ie&&(ie.words[we]=De)}return ie&&ie.strip(),oe.strip(),H!=="div"&&re!==0&&oe.iushrn(re),{div:ie||null,mod:oe}},f.prototype.divmod=function(N,H,re){if(u(!N.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var oe,_e,ke;return this.negative!==0&&N.negative===0?(ke=this.neg().divmod(N,H),H!=="mod"&&(oe=ke.div.neg()),H!=="div"&&(_e=ke.mod.neg(),re&&_e.negative!==0&&_e.iadd(N)),{div:oe,mod:_e}):this.negative===0&&N.negative!==0?(ke=this.divmod(N.neg(),H),H!=="mod"&&(oe=ke.div.neg()),{div:oe,mod:ke.mod}):(this.negative&N.negative)!==0?(ke=this.neg().divmod(N.neg(),H),H!=="div"&&(_e=ke.mod.neg(),re&&_e.negative!==0&&_e.isub(N)),{div:ke.div,mod:_e}):N.length>this.length||this.cmp(N)<0?{div:new f(0),mod:this}:N.length===1?H==="div"?{div:this.divn(N.words[0]),mod:null}:H==="mod"?{div:null,mod:new f(this.modn(N.words[0]))}:{div:this.divn(N.words[0]),mod:new f(this.modn(N.words[0]))}:this._wordDiv(N,H)},f.prototype.div=function(N){return this.divmod(N,"div",!1).div},f.prototype.mod=function(N){return this.divmod(N,"mod",!1).mod},f.prototype.umod=function(N){return this.divmod(N,"mod",!0).mod},f.prototype.divRound=function(N){var H=this.divmod(N);if(H.mod.isZero())return H.div;var re=H.div.negative!==0?H.mod.isub(N):H.mod,oe=N.ushrn(1),_e=N.andln(1),ke=re.cmp(oe);return ke<0||_e===1&&ke===0?H.div:H.div.negative!==0?H.div.isubn(1):H.div.iaddn(1)},f.prototype.modn=function(N){u(N<=67108863);for(var H=(1<<26)%N,re=0,oe=this.length-1;oe>=0;oe--)re=(H*re+(this.words[oe]|0))%N;return re},f.prototype.idivn=function(N){u(N<=67108863);for(var H=0,re=this.length-1;re>=0;re--){var oe=(this.words[re]|0)+H*67108864;this.words[re]=oe/N|0,H=oe%N}return this.strip()},f.prototype.divn=function(N){return this.clone().idivn(N)},f.prototype.egcd=function(N){u(N.negative===0),u(!N.isZero());var H=this,re=N.clone();H.negative!==0?H=H.umod(N):H=H.clone();for(var oe=new f(1),_e=new f(0),ke=new f(0),Ce=new f(1),ge=0;H.isEven()&&re.isEven();)H.iushrn(1),re.iushrn(1),++ge;for(var ie=re.clone(),Se=H.clone();!H.isZero();){for(var Ee=0,we=1;(H.words[0]&we)===0&&Ee<26;++Ee,we<<=1);if(Ee>0)for(H.iushrn(Ee);Ee-- >0;)(oe.isOdd()||_e.isOdd())&&(oe.iadd(ie),_e.isub(Se)),oe.iushrn(1),_e.iushrn(1);for(var De=0,Le=1;(re.words[0]&Le)===0&&De<26;++De,Le<<=1);if(De>0)for(re.iushrn(De);De-- >0;)(ke.isOdd()||Ce.isOdd())&&(ke.iadd(ie),Ce.isub(Se)),ke.iushrn(1),Ce.iushrn(1);H.cmp(re)>=0?(H.isub(re),oe.isub(ke),_e.isub(Ce)):(re.isub(H),ke.isub(oe),Ce.isub(_e))}return{a:ke,b:Ce,gcd:re.iushln(ge)}},f.prototype._invmp=function(N){u(N.negative===0),u(!N.isZero());var H=this,re=N.clone();H.negative!==0?H=H.umod(N):H=H.clone();for(var oe=new f(1),_e=new f(0),ke=re.clone();H.cmpn(1)>0&&re.cmpn(1)>0;){for(var Ce=0,ge=1;(H.words[0]&ge)===0&&Ce<26;++Ce,ge<<=1);if(Ce>0)for(H.iushrn(Ce);Ce-- >0;)oe.isOdd()&&oe.iadd(ke),oe.iushrn(1);for(var ie=0,Se=1;(re.words[0]&Se)===0&&ie<26;++ie,Se<<=1);if(ie>0)for(re.iushrn(ie);ie-- >0;)_e.isOdd()&&_e.iadd(ke),_e.iushrn(1);H.cmp(re)>=0?(H.isub(re),oe.isub(_e)):(re.isub(H),_e.isub(oe))}var Ee;return H.cmpn(1)===0?Ee=oe:Ee=_e,Ee.cmpn(0)<0&&Ee.iadd(N),Ee},f.prototype.gcd=function(N){if(this.isZero())return N.abs();if(N.isZero())return this.abs();var H=this.clone(),re=N.clone();H.negative=0,re.negative=0;for(var oe=0;H.isEven()&&re.isEven();oe++)H.iushrn(1),re.iushrn(1);do{for(;H.isEven();)H.iushrn(1);for(;re.isEven();)re.iushrn(1);var _e=H.cmp(re);if(_e<0){var ke=H;H=re,re=ke}else if(_e===0||re.cmpn(1)===0)break;H.isub(re)}while(!0);return re.iushln(oe)},f.prototype.invm=function(N){return this.egcd(N).a.umod(N)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(N){return this.words[0]&N},f.prototype.bincn=function(N){u(typeof N=="number");var H=N%26,re=(N-H)/26,oe=1<>>26,Ce&=67108863,this.words[ke]=Ce}return _e!==0&&(this.words[ke]=_e,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(N){var H=N<0;if(this.negative!==0&&!H)return-1;if(this.negative===0&&H)return 1;this.strip();var re;if(this.length>1)re=1;else{H&&(N=-N),u(N<=67108863,"Number is too big");var oe=this.words[0]|0;re=oe===N?0:oeN.length)return 1;if(this.length=0;re--){var oe=this.words[re]|0,_e=N.words[re]|0;if(oe!==_e){oe<_e?H=-1:oe>_e&&(H=1);break}}return H},f.prototype.gtn=function(N){return this.cmpn(N)===1},f.prototype.gt=function(N){return this.cmp(N)===1},f.prototype.gten=function(N){return this.cmpn(N)>=0},f.prototype.gte=function(N){return this.cmp(N)>=0},f.prototype.ltn=function(N){return this.cmpn(N)===-1},f.prototype.lt=function(N){return this.cmp(N)===-1},f.prototype.lten=function(N){return this.cmpn(N)<=0},f.prototype.lte=function(N){return this.cmp(N)<=0},f.prototype.eqn=function(N){return this.cmpn(N)===0},f.prototype.eq=function(N){return this.cmp(N)===0},f.red=function(N){return new G(N)},f.prototype.toRed=function(N){return u(!this.red,"Already a number in reduction context"),u(this.negative===0,"red works only with positives"),N.convertTo(this)._forceRed(N)},f.prototype.fromRed=function(){return u(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(N){return this.red=N,this},f.prototype.forceRed=function(N){return u(!this.red,"Already a number in reduction context"),this._forceRed(N)},f.prototype.redAdd=function(N){return u(this.red,"redAdd works only with red numbers"),this.red.add(this,N)},f.prototype.redIAdd=function(N){return u(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,N)},f.prototype.redSub=function(N){return u(this.red,"redSub works only with red numbers"),this.red.sub(this,N)},f.prototype.redISub=function(N){return u(this.red,"redISub works only with red numbers"),this.red.isub(this,N)},f.prototype.redShl=function(N){return u(this.red,"redShl works only with red numbers"),this.red.shl(this,N)},f.prototype.redMul=function(N){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,N),this.red.mul(this,N)},f.prototype.redIMul=function(N){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,N),this.red.imul(this,N)},f.prototype.redSqr=function(){return u(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return u(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return u(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return u(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return u(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(N){return u(this.red&&!N.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,N)};var g={k256:null,p224:null,p192:null,p25519:null};function P(j,N){this.name=j,this.p=new f(N,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}P.prototype._tmp=function(){var N=new f(null);return N.words=new Array(Math.ceil(this.n/13)),N},P.prototype.ireduce=function(N){var H=N,re;do this.split(H,this.tmp),H=this.imulK(H),H=H.iadd(this.tmp),re=H.bitLength();while(re>this.n);var oe=re0?H.isub(this.p):H.strip!==void 0?H.strip():H._strip(),H},P.prototype.split=function(N,H){N.iushrn(this.n,0,H)},P.prototype.imulK=function(N){return N.imul(this.k)};function E(){P.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}c(E,P),E.prototype.split=function(N,H){for(var re=4194303,oe=Math.min(N.length,9),_e=0;_e>>22,ke=Ce}ke>>>=22,N.words[_e-10]=ke,ke===0&&N.length>10?N.length-=10:N.length-=9},E.prototype.imulK=function(N){N.words[N.length]=0,N.words[N.length+1]=0,N.length+=2;for(var H=0,re=0;re>>=26,N.words[re]=_e,H=oe}return H!==0&&(N.words[N.length++]=H),N},f._prime=function(N){if(g[N])return g[N];var H;if(N==="k256")H=new E;else if(N==="p224")H=new z;else if(N==="p192")H=new q;else if(N==="p25519")H=new U;else throw new Error("Unknown prime "+N);return g[N]=H,H};function G(j){if(typeof j=="string"){var N=f._prime(j);this.m=N.p,this.prime=N}else u(j.gtn(1),"modulus must be greater than 1"),this.m=j,this.prime=null}G.prototype._verify1=function(N){u(N.negative===0,"red works only with positives"),u(N.red,"red works only with red numbers")},G.prototype._verify2=function(N,H){u((N.negative|H.negative)===0,"red works only with positives"),u(N.red&&N.red===H.red,"red works only with red numbers")},G.prototype.imod=function(N){return this.prime?this.prime.ireduce(N)._forceRed(this):N.umod(this.m)._forceRed(this)},G.prototype.neg=function(N){return N.isZero()?N.clone():this.m.sub(N)._forceRed(this)},G.prototype.add=function(N,H){this._verify2(N,H);var re=N.add(H);return re.cmp(this.m)>=0&&re.isub(this.m),re._forceRed(this)},G.prototype.iadd=function(N,H){this._verify2(N,H);var re=N.iadd(H);return re.cmp(this.m)>=0&&re.isub(this.m),re},G.prototype.sub=function(N,H){this._verify2(N,H);var re=N.sub(H);return re.cmpn(0)<0&&re.iadd(this.m),re._forceRed(this)},G.prototype.isub=function(N,H){this._verify2(N,H);var re=N.isub(H);return re.cmpn(0)<0&&re.iadd(this.m),re},G.prototype.shl=function(N,H){return this._verify1(N),this.imod(N.ushln(H))},G.prototype.imul=function(N,H){return this._verify2(N,H),this.imod(N.imul(H))},G.prototype.mul=function(N,H){return this._verify2(N,H),this.imod(N.mul(H))},G.prototype.isqr=function(N){return this.imul(N,N.clone())},G.prototype.sqr=function(N){return this.mul(N,N)},G.prototype.sqrt=function(N){if(N.isZero())return N.clone();var H=this.m.andln(3);if(u(H%2===1),H===3){var re=this.m.add(new f(1)).iushrn(2);return this.pow(N,re)}for(var oe=this.m.subn(1),_e=0;!oe.isZero()&&oe.andln(1)===0;)_e++,oe.iushrn(1);u(!oe.isZero());var ke=new f(1).toRed(this),Ce=ke.redNeg(),ge=this.m.subn(1).iushrn(1),ie=this.m.bitLength();for(ie=new f(2*ie*ie).toRed(this);this.pow(ie,ge).cmp(Ce)!==0;)ie.redIAdd(Ce);for(var Se=this.pow(ie,oe),Ee=this.pow(N,oe.addn(1).iushrn(1)),we=this.pow(N,oe),De=_e;we.cmp(ke)!==0;){for(var Le=we,me=0;Le.cmp(ke)!==0;me++)Le=Le.redSqr();u(me=0;_e--){for(var Se=H.words[_e],Ee=ie-1;Ee>=0;Ee--){var we=Se>>Ee&1;if(ke!==oe[0]&&(ke=this.sqr(ke)),we===0&&Ce===0){ge=0;continue}Ce<<=1,Ce|=we,ge++,!(ge!==re&&(_e!==0||Ee!==0))&&(ke=this.mul(ke,oe[Ce]),ge=0,Ce=0)}ie=26}return ke},G.prototype.convertTo=function(N){var H=N.umod(this.m);return H===N?H.clone():H},G.prototype.convertFrom=function(N){var H=N.clone();return H.red=null,H},f.mont=function(N){return new Z(N)};function Z(j){G.call(this,j),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}c(Z,G),Z.prototype.convertTo=function(N){return this.imod(N.ushln(this.shift))},Z.prototype.convertFrom=function(N){var H=this.imod(N.mul(this.rinv));return H.red=null,H},Z.prototype.imul=function(N,H){if(N.isZero()||H.isZero())return N.words[0]=0,N.length=1,N;var re=N.imul(H),oe=re.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_e=re.isub(oe).iushrn(this.shift),ke=_e;return _e.cmp(this.m)>=0?ke=_e.isub(this.m):_e.cmpn(0)<0&&(ke=_e.iadd(this.m)),ke._forceRed(this)},Z.prototype.mul=function(N,H){if(N.isZero()||H.isZero())return new f(0)._forceRed(this);var re=N.mul(H),oe=re.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_e=re.isub(oe).iushrn(this.shift),ke=_e;return _e.cmp(this.m)>=0?ke=_e.isub(this.m):_e.cmpn(0)<0&&(ke=_e.iadd(this.m)),ke._forceRed(this)},Z.prototype.invm=function(N){var H=this.imod(N._invmp(this.m).mul(this.r2));return H._forceRed(this)}}(i,this)},6204:function(i){"use strict";i.exports=a;function a(o){var s,l,u,c=o.length,f=0;for(s=0;s>>1;if(!(S<=0)){var g,P=s.mallocDouble(2*S*x),E=s.mallocInt32(x);if(x=f(k,S,P,E),x>0){if(S===1&&L)l.init(x),g=l.sweepComplete(S,T,0,x,P,E,0,x,P,E);else{var z=s.mallocDouble(2*S*C),q=s.mallocInt32(C);C=f(M,S,z,q),C>0&&(l.init(x+C),S===1?g=l.sweepBipartite(S,T,0,x,P,E,0,C,z,q):g=u(S,T,L,x,P,E,C,z,q),s.free(z),s.free(q))}s.free(P),s.free(E)}return g}}}var d;function v(k,M){d.push([k,M])}function m(k){return d=[],h(k,k,v,!0),d}function b(k,M){return d=[],h(k,M,v,!1),d}function p(k,M,T){switch(arguments.length){case 1:return m(k);case 2:return typeof M=="function"?h(k,k,M,!0):b(k,M);case 3:return h(k,M,T,!1);default:throw new Error("box-intersect: Invalid arguments")}}},2455:function(i,a){"use strict";function o(){function u(h,d,v,m,b,p,k,M,T,L,x){for(var C=2*h,S=m,g=C*m;ST-M?u(h,d,v,m,b,p,k,M,T,L,x):c(h,d,v,m,b,p,k,M,T,L,x)}return f}function s(){function u(v,m,b,p,k,M,T,L,x,C,S){for(var g=2*v,P=p,E=g*p;PC-x?p?u(v,m,b,k,M,T,L,x,C,S,g):c(v,m,b,k,M,T,L,x,C,S,g):p?f(v,m,b,k,M,T,L,x,C,S,g):h(v,m,b,k,M,T,L,x,C,S,g)}return d}function l(u){return u?o():s()}a.partial=l(!1),a.full=l(!0)},7150:function(i,a,o){"use strict";i.exports=j;var s=o(1888),l=o(8828),u=o(2455),c=u.partial,f=u.full,h=o(855),d=o(3545),v=o(8105),m=128,b=1<<22,p=1<<22,k=v("!(lo>=p0)&&!(p1>=hi)"),M=v("lo===p0"),T=v("lo0;){Se-=1;var De=Se*S,Le=E[De],me=E[De+1],Pe=E[De+2],ce=E[De+3],He=E[De+4],lt=E[De+5],mt=Se*g,Vt=z[mt],st=z[mt+1],ct=lt&1,Qt=!!(lt&16),Ht=_e,nr=ke,tt=ge,je=ie;if(ct&&(Ht=ge,nr=ie,tt=_e,je=ke),!(lt&2&&(Pe=T(N,Le,me,Pe,Ht,nr,st),me>=Pe))&&!(lt&4&&(me=L(N,Le,me,Pe,Ht,nr,Vt),me>=Pe))){var Ue=Pe-me,Ae=He-ce;if(Qt){if(N*Ue*(Ue+Ae)v&&b[C+d]>L;--x,C-=k){for(var S=C,g=C+k,P=0;P>>1,L=2*h,x=T,C=b[L*T+d];k=z?(x=E,C=z):P>=U?(x=g,C=P):(x=q,C=U):z>=U?(x=E,C=z):U>=P?(x=g,C=P):(x=q,C=U);for(var j=L*(M-1),N=L*x,G=0;G=p0)&&!(p1>=hi)":d};function o(v){return a[v]}function s(v,m,b,p,k,M,T){for(var L=2*v,x=L*b,C=x,S=b,g=m,P=v+m,E=b;p>E;++E,x+=L){var z=k[x+g];if(z===T)if(S===E)S+=1,C+=L;else{for(var q=0;L>q;++q){var U=k[x+q];k[x+q]=k[C],k[C++]=U}var G=M[E];M[E]=M[S],M[S++]=G}}return S}function l(v,m,b,p,k,M,T){for(var L=2*v,x=L*b,C=x,S=b,g=m,P=v+m,E=b;p>E;++E,x+=L){var z=k[x+g];if(zq;++q){var U=k[x+q];k[x+q]=k[C],k[C++]=U}var G=M[E];M[E]=M[S],M[S++]=G}}return S}function u(v,m,b,p,k,M,T){for(var L=2*v,x=L*b,C=x,S=b,g=m,P=v+m,E=b;p>E;++E,x+=L){var z=k[x+P];if(z<=T)if(S===E)S+=1,C+=L;else{for(var q=0;L>q;++q){var U=k[x+q];k[x+q]=k[C],k[C++]=U}var G=M[E];M[E]=M[S],M[S++]=G}}return S}function c(v,m,b,p,k,M,T){for(var L=2*v,x=L*b,C=x,S=b,g=m,P=v+m,E=b;p>E;++E,x+=L){var z=k[x+P];if(z<=T)if(S===E)S+=1,C+=L;else{for(var q=0;L>q;++q){var U=k[x+q];k[x+q]=k[C],k[C++]=U}var G=M[E];M[E]=M[S],M[S++]=G}}return S}function f(v,m,b,p,k,M,T){for(var L=2*v,x=L*b,C=x,S=b,g=m,P=v+m,E=b;p>E;++E,x+=L){var z=k[x+g],q=k[x+P];if(z<=T&&T<=q)if(S===E)S+=1,C+=L;else{for(var U=0;L>U;++U){var G=k[x+U];k[x+U]=k[C],k[C++]=G}var Z=M[E];M[E]=M[S],M[S++]=Z}}return S}function h(v,m,b,p,k,M,T){for(var L=2*v,x=L*b,C=x,S=b,g=m,P=v+m,E=b;p>E;++E,x+=L){var z=k[x+g],q=k[x+P];if(zU;++U){var G=k[x+U];k[x+U]=k[C],k[C++]=G}var Z=M[E];M[E]=M[S],M[S++]=Z}}return S}function d(v,m,b,p,k,M,T,L){for(var x=2*v,C=x*b,S=C,g=b,P=m,E=v+m,z=b;p>z;++z,C+=x){var q=k[C+P],U=k[C+E];if(!(q>=T)&&!(L>=U))if(g===z)g+=1,S+=x;else{for(var G=0;x>G;++G){var Z=k[C+G];k[C+G]=k[S],k[S++]=Z}var j=M[z];M[z]=M[g],M[g++]=j}}return g}},4192:function(i){"use strict";i.exports=o;var a=32;function o(m,b){b<=4*a?s(0,b-1,m):v(0,b-1,m)}function s(m,b,p){for(var k=2*(m+1),M=m+1;M<=b;++M){for(var T=p[k++],L=p[k++],x=M,C=k-2;x-- >m;){var S=p[C-2],g=p[C-1];if(Sp[b+1]:!0}function d(m,b,p,k){m*=2;var M=k[m];return M>1,x=L-k,C=L+k,S=M,g=x,P=L,E=C,z=T,q=m+1,U=b-1,G=0;h(S,g,p)&&(G=S,S=g,g=G),h(E,z,p)&&(G=E,E=z,z=G),h(S,P,p)&&(G=S,S=P,P=G),h(g,P,p)&&(G=g,g=P,P=G),h(S,E,p)&&(G=S,S=E,E=G),h(P,E,p)&&(G=P,P=E,E=G),h(g,z,p)&&(G=g,g=z,z=G),h(g,P,p)&&(G=g,g=P,P=G),h(E,z,p)&&(G=E,E=z,z=G);for(var Z=p[2*g],j=p[2*g+1],N=p[2*E],H=p[2*E+1],re=2*S,oe=2*P,_e=2*z,ke=2*M,Ce=2*L,ge=2*T,ie=0;ie<2;++ie){var Se=p[re+ie],Ee=p[oe+ie],we=p[_e+ie];p[ke+ie]=Se,p[Ce+ie]=Ee,p[ge+ie]=we}u(x,m,p),u(C,b,p);for(var De=q;De<=U;++De)if(d(De,Z,j,p))De!==q&&l(De,q,p),++q;else if(!d(De,N,H,p))for(;;)if(d(U,N,H,p)){d(U,Z,j,p)?(c(De,q,U,p),++q,--U):(l(De,U,p),--U);break}else{if(--U>>1;u(k,Ee);for(var we=0,De=0,Ce=0;Ce=c)Le=Le-c|0,T(v,m,De--,Le);else if(Le>=0)T(h,d,we--,Le);else if(Le<=-c){Le=-Le-c|0;for(var me=0;me>>1;u(k,Ee);for(var we=0,De=0,Le=0,Ce=0;Ce>1===k[2*Ce+3]>>1&&(Pe=2,Ce+=1),me<0){for(var ce=-(me>>1)-1,He=0;He>1)-1;Pe===0?T(h,d,we--,ce):Pe===1?T(v,m,De--,ce):Pe===2&&T(b,p,Le--,ce)}}}function S(P,E,z,q,U,G,Z,j,N,H,re,oe){var _e=0,ke=2*P,Ce=E,ge=E+P,ie=1,Se=1;q?Se=c:ie=c;for(var Ee=U;Ee>>1;u(k,me);for(var Pe=0,Ee=0;Ee=c?(He=!q,we-=c):(He=!!q,we-=1),He)L(h,d,Pe++,we);else{var lt=oe[we],mt=ke*we,Vt=re[mt+E+1],st=re[mt+E+1+P];e:for(var ct=0;ct>>1;u(k,we);for(var De=0,ge=0;ge=c)h[De++]=ie-c;else{ie-=1;var me=re[ie],Pe=_e*ie,ce=H[Pe+E+1],He=H[Pe+E+1+P];e:for(var lt=0;lt=0;--lt)if(h[lt]===ie){for(var ct=lt+1;ct0;){for(var M=d.pop(),b=d.pop(),T=-1,L=-1,p=m[b],C=1;C=0||(h.flip(b,M),u(f,h,d,T,b,L),u(f,h,d,b,L,T),u(f,h,d,L,M,T),u(f,h,d,M,T,L))}}},5023:function(i,a,o){"use strict";var s=o(2478);i.exports=d;function l(v,m,b,p,k,M,T){this.cells=v,this.neighbor=m,this.flags=p,this.constraint=b,this.active=k,this.next=M,this.boundary=T}var u=l.prototype;function c(v,m){return v[0]-m[0]||v[1]-m[1]||v[2]-m[2]}u.locate=function(){var v=[0,0,0];return function(m,b,p){var k=m,M=b,T=p;return b0||T.length>0;){for(;M.length>0;){var g=M.pop();if(L[g]!==-k){L[g]=k;for(var P=x[g],E=0;E<3;++E){var z=S[3*g+E];z>=0&&L[z]===0&&(C[3*g+E]?T.push(z):(M.push(z),L[z]=k))}}}var q=T;T=M,M=q,T.length=0,k=-k}var U=h(x,L,m);return b?U.concat(p.boundary):U}},8902:function(i,a,o){"use strict";var s=o(2478),l=o(3250)[3],u=0,c=1,f=2;i.exports=T;function h(L,x,C,S,g){this.a=L,this.b=x,this.idx=C,this.lowerIds=S,this.upperIds=g}function d(L,x,C,S){this.a=L,this.b=x,this.type=C,this.idx=S}function v(L,x){var C=L.a[0]-x.a[0]||L.a[1]-x.a[1]||L.type-x.type;return C||L.type!==u&&(C=l(L.a,L.b,x.b),C)?C:L.idx-x.idx}function m(L,x){return l(L.a,L.b,x)}function b(L,x,C,S,g){for(var P=s.lt(x,S,m),E=s.gt(x,S,m),z=P;z1&&l(C[U[Z-2]],C[U[Z-1]],S)>0;)L.push([U[Z-1],U[Z-2],g]),Z-=1;U.length=Z,U.push(g);for(var G=q.upperIds,Z=G.length;Z>1&&l(C[G[Z-2]],C[G[Z-1]],S)<0;)L.push([G[Z-2],G[Z-1],g]),Z-=1;G.length=Z,G.push(g)}}function p(L,x){var C;return L.a[0]q[0]&&g.push(new d(q,z,f,P),new d(z,q,c,P))}g.sort(v);for(var U=g[0].a[0]-(1+Math.abs(g[0].a[0]))*Math.pow(2,-52),G=[new h([U,1],[U,0],-1,[],[],[],[])],Z=[],P=0,j=g.length;P=0}}(),u.removeTriangle=function(h,d,v){var m=this.stars;c(m[h],d,v),c(m[d],v,h),c(m[v],h,d)},u.addTriangle=function(h,d,v){var m=this.stars;m[h].push(d,v),m[d].push(v,h),m[v].push(h,d)},u.opposite=function(h,d){for(var v=this.stars[d],m=1,b=v.length;m=0;--N){var Se=Z[N];H=Se[0];var Ee=U[H],we=Ee[0],De=Ee[1],Le=q[we],me=q[De];if((Le[0]-me[0]||Le[1]-me[1])<0){var Pe=we;we=De,De=Pe}Ee[0]=we;var ce=Ee[1]=Se[1],He;for(j&&(He=Ee[2]);N>0&&Z[N-1][0]===H;){var Se=Z[--N],lt=Se[1];j?U.push([ce,lt,He]):U.push([ce,lt]),ce=lt}j?U.push([ce,De,He]):U.push([ce,De])}return re}function x(q,U,G){for(var Z=U.length,j=new s(Z),N=[],H=0;HU[2]?1:0)}function g(q,U,G){if(q.length!==0){if(U)for(var Z=0;Z0||H.length>0}function z(q,U,G){var Z;if(G){Z=U;for(var j=new Array(U.length),N=0;NL+1)throw new Error(M+" map requires nshades to be at least size "+k.length);Array.isArray(d.alpha)?d.alpha.length!==2?x=[1,1]:x=d.alpha.slice():typeof d.alpha=="number"?x=[d.alpha,d.alpha]:x=[1,1],v=k.map(function(z){return Math.round(z.index*L)}),x[0]=Math.min(Math.max(x[0],0),1),x[1]=Math.min(Math.max(x[1],0),1);var S=k.map(function(z,q){var U=k[q].index,G=k[q].rgb.slice();return G.length===4&&G[3]>=0&&G[3]<=1||(G[3]=x[0]+(x[1]-x[0])*U),G}),g=[];for(C=0;C=0}function d(v,m,b,p){var k=s(m,b,p);if(k===0){var M=l(s(v,m,b)),T=l(s(v,m,p));if(M===T){if(M===0){var L=h(v,m,b),x=h(v,m,p);return L===x?0:L?1:-1}return 0}else{if(T===0)return M>0||h(v,m,p)?-1:1;if(M===0)return T>0||h(v,m,b)?1:-1}return l(T-M)}var C=s(v,m,b);if(C>0)return k>0&&s(v,m,p)>0?1:-1;if(C<0)return k>0||s(v,m,p)>0?1:-1;var S=s(v,m,p);return S>0||h(v,m,b)?1:-1}},8572:function(i){"use strict";i.exports=function(o){return o<0?-1:o>0?1:0}},8507:function(i){i.exports=s;var a=Math.min;function o(l,u){return l-u}function s(l,u){var c=l.length,f=l.length-u.length;if(f)return f;switch(c){case 0:return 0;case 1:return l[0]-u[0];case 2:return l[0]+l[1]-u[0]-u[1]||a(l[0],l[1])-a(u[0],u[1]);case 3:var h=l[0]+l[1],d=u[0]+u[1];if(f=h+l[2]-(d+u[2]),f)return f;var v=a(l[0],l[1]),m=a(u[0],u[1]);return a(v,l[2])-a(m,u[2])||a(v+l[2],h)-a(m+u[2],d);case 4:var b=l[0],p=l[1],k=l[2],M=l[3],T=u[0],L=u[1],x=u[2],C=u[3];return b+p+k+M-(T+L+x+C)||a(b,p,k,M)-a(T,L,x,C,T)||a(b+p,b+k,b+M,p+k,p+M,k+M)-a(T+L,T+x,T+C,L+x,L+C,x+C)||a(b+p+k,b+p+M,b+k+M,p+k+M)-a(T+L+x,T+L+C,T+x+C,L+x+C);default:for(var S=l.slice().sort(o),g=u.slice().sort(o),P=0;Po[l][0]&&(l=u);return sl?[[l],[s]]:[[s]]}},4750:function(i,a,o){"use strict";i.exports=l;var s=o(3090);function l(u){var c=s(u),f=c.length;if(f<=2)return[];for(var h=new Array(f),d=c[f-1],v=0;v=d[T]&&(M+=1);p[k]=M}}return h}function f(h,d){try{return s(h,!0)}catch(p){var v=l(h);if(v.length<=d)return[];var m=u(h,v),b=s(m,!0);return c(b,v)}}},4769:function(i){"use strict";function a(s,l,u,c,f,h){var d=6*f*f-6*f,v=3*f*f-4*f+1,m=-6*f*f+6*f,b=3*f*f-2*f;if(s.length){h||(h=new Array(s.length));for(var p=s.length-1;p>=0;--p)h[p]=d*s[p]+v*l[p]+m*u[p]+b*c[p];return h}return d*s+v*l+m*u[p]+b*c}function o(s,l,u,c,f,h){var d=f-1,v=f*f,m=d*d,b=(1+2*f)*m,p=f*m,k=v*(3-2*f),M=v*d;if(s.length){h||(h=new Array(s.length));for(var T=s.length-1;T>=0;--T)h[T]=b*s[T]+p*l[T]+k*u[T]+M*c[T];return h}return b*s+p*l+k*u+M*c}i.exports=o,i.exports.derivative=a},7642:function(i,a,o){"use strict";var s=o(8954),l=o(1682);i.exports=h;function u(d,v){this.point=d,this.index=v}function c(d,v){for(var m=d.point,b=v.point,p=m.length,k=0;k=2)return!1;G[j]=N}return!0}):U=U.filter(function(G){for(var Z=0;Z<=b;++Z){var j=P[G[Z]];if(j<0)return!1;G[Z]=j}return!0}),b&1)for(var M=0;M>>31},i.exports.exponent=function(k){var M=i.exports.hi(k);return(M<<1>>>21)-1023},i.exports.fraction=function(k){var M=i.exports.lo(k),T=i.exports.hi(k),L=T&(1<<20)-1;return T&2146435072&&(L+=1048576),[M,L]},i.exports.denormalized=function(k){var M=i.exports.hi(k);return!(M&2146435072)}},1338:function(i){"use strict";function a(l,u,c){var f=l[c]|0;if(f<=0)return[];var h=new Array(f),d;if(c===l.length-1)for(d=0;d0)return o(l|0,u);break;case"object":if(typeof l.length=="number")return a(l,u,0);break}return[]}i.exports=s},3134:function(i,a,o){"use strict";i.exports=l;var s=o(1682);function l(u,c){var f=u.length;if(typeof c!="number"){c=0;for(var h=0;h=b-1)for(var C=M.length-1,g=v-m[b-1],S=0;S=b-1)for(var x=M.length-1,C=v-m[b-1],S=0;S=0;--b)if(v[--m])return!1;return!0},f.jump=function(v){var m=this.lastT(),b=this.dimension;if(!(v0;--S)p.push(u(L[S-1],x[S-1],arguments[S])),k.push(0)}},f.push=function(v){var m=this.lastT(),b=this.dimension;if(!(v1e-6?1/T:0;this._time.push(v);for(var g=b;g>0;--g){var P=u(x[g-1],C[g-1],arguments[g]);p.push(P),k.push((P-p[M++])*S)}}},f.set=function(v){var m=this.dimension;if(!(v0;--L)b.push(u(M[L-1],T[L-1],arguments[L])),p.push(0)}},f.move=function(v){var m=this.lastT(),b=this.dimension;if(!(v<=m||arguments.length!==b+1)){var p=this._state,k=this._velocity,M=p.length-this.dimension,T=this.bounds,L=T[0],x=T[1],C=v-m,S=C>1e-6?1/C:0;this._time.push(v);for(var g=b;g>0;--g){var P=arguments[g];p.push(u(L[g-1],x[g-1],p[M++]+P)),k.push(P*S)}}},f.idle=function(v){var m=this.lastT();if(!(v=0;--S)p.push(u(L[S],x[S],p[M]+C*k[M])),k.push(0),M+=1}};function h(v){for(var m=new Array(v),b=0;b=0;--q){var g=P[q];E[q]<=0?P[q]=new s(g._color,g.key,g.value,P[q+1],g.right,g._count+1):P[q]=new s(g._color,g.key,g.value,g.left,P[q+1],g._count+1)}for(var q=P.length-1;q>1;--q){var U=P[q-1],g=P[q];if(U._color===o||g._color===o)break;var G=P[q-2];if(G.left===U)if(U.left===g){var Z=G.right;if(Z&&Z._color===a)U._color=o,G.right=u(o,Z),G._color=a,q-=1;else{if(G._color=a,G.left=U.right,U._color=o,U.right=G,P[q-2]=U,P[q-1]=g,c(G),c(U),q>=3){var j=P[q-3];j.left===G?j.left=U:j.right=U}break}}else{var Z=G.right;if(Z&&Z._color===a)U._color=o,G.right=u(o,Z),G._color=a,q-=1;else{if(U.right=g.left,G._color=a,G.left=g.right,g._color=o,g.left=U,g.right=G,P[q-2]=g,P[q-1]=U,c(G),c(U),c(g),q>=3){var j=P[q-3];j.left===G?j.left=g:j.right=g}break}}else if(U.right===g){var Z=G.left;if(Z&&Z._color===a)U._color=o,G.left=u(o,Z),G._color=a,q-=1;else{if(G._color=a,G.right=U.left,U._color=o,U.left=G,P[q-2]=U,P[q-1]=g,c(G),c(U),q>=3){var j=P[q-3];j.right===G?j.right=U:j.left=U}break}}else{var Z=G.left;if(Z&&Z._color===a)U._color=o,G.left=u(o,Z),G._color=a,q-=1;else{if(U.left=g.right,G._color=a,G.right=g.left,g._color=o,g.right=U,g.left=G,P[q-2]=g,P[q-1]=U,c(G),c(U),c(g),q>=3){var j=P[q-3];j.right===G?j.right=g:j.left=g}break}}}return P[0]._color=o,new f(S,P[0])};function d(x,C){if(C.left){var S=d(x,C.left);if(S)return S}var S=x(C.key,C.value);if(S)return S;if(C.right)return d(x,C.right)}function v(x,C,S,g){var P=C(x,g.key);if(P<=0){if(g.left){var E=v(x,C,S,g.left);if(E)return E}var E=S(g.key,g.value);if(E)return E}if(g.right)return v(x,C,S,g.right)}function m(x,C,S,g,P){var E=S(x,P.key),z=S(C,P.key),q;if(E<=0&&(P.left&&(q=m(x,C,S,g,P.left),q)||z>0&&(q=g(P.key,P.value),q)))return q;if(z>0&&P.right)return m(x,C,S,g,P.right)}h.forEach=function(C,S,g){if(this.root)switch(arguments.length){case 1:return d(C,this.root);case 2:return v(S,this._compare,C,this.root);case 3:return this._compare(S,g)>=0?void 0:m(S,g,this._compare,C,this.root)}},Object.defineProperty(h,"begin",{get:function(){for(var x=[],C=this.root;C;)x.push(C),C=C.left;return new b(this,x)}}),Object.defineProperty(h,"end",{get:function(){for(var x=[],C=this.root;C;)x.push(C),C=C.right;return new b(this,x)}}),h.at=function(x){if(x<0)return new b(this,[]);for(var C=this.root,S=[];;){if(S.push(C),C.left){if(x=C.right._count)break;C=C.right}else break}return new b(this,[])},h.ge=function(x){for(var C=this._compare,S=this.root,g=[],P=0;S;){var E=C(x,S.key);g.push(S),E<=0&&(P=g.length),E<=0?S=S.left:S=S.right}return g.length=P,new b(this,g)},h.gt=function(x){for(var C=this._compare,S=this.root,g=[],P=0;S;){var E=C(x,S.key);g.push(S),E<0&&(P=g.length),E<0?S=S.left:S=S.right}return g.length=P,new b(this,g)},h.lt=function(x){for(var C=this._compare,S=this.root,g=[],P=0;S;){var E=C(x,S.key);g.push(S),E>0&&(P=g.length),E<=0?S=S.left:S=S.right}return g.length=P,new b(this,g)},h.le=function(x){for(var C=this._compare,S=this.root,g=[],P=0;S;){var E=C(x,S.key);g.push(S),E>=0&&(P=g.length),E<0?S=S.left:S=S.right}return g.length=P,new b(this,g)},h.find=function(x){for(var C=this._compare,S=this.root,g=[];S;){var P=C(x,S.key);if(g.push(S),P===0)return new b(this,g);P<=0?S=S.left:S=S.right}return new b(this,[])},h.remove=function(x){var C=this.find(x);return C?C.remove():this},h.get=function(x){for(var C=this._compare,S=this.root;S;){var g=C(x,S.key);if(g===0)return S.value;g<=0?S=S.left:S=S.right}};function b(x,C){this.tree=x,this._stack=C}var p=b.prototype;Object.defineProperty(p,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(p,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),p.clone=function(){return new b(this.tree,this._stack.slice())};function k(x,C){x.key=C.key,x.value=C.value,x.left=C.left,x.right=C.right,x._color=C._color,x._count=C._count}function M(x){for(var C,S,g,P,E=x.length-1;E>=0;--E){if(C=x[E],E===0){C._color=o;return}if(S=x[E-1],S.left===C){if(g=S.right,g.right&&g.right._color===a){if(g=S.right=l(g),P=g.right=l(g.right),S.right=g.left,g.left=S,g.right=P,g._color=S._color,C._color=o,S._color=o,P._color=o,c(S),c(g),E>1){var z=x[E-2];z.left===S?z.left=g:z.right=g}x[E-1]=g;return}else if(g.left&&g.left._color===a){if(g=S.right=l(g),P=g.left=l(g.left),S.right=P.left,g.left=P.right,P.left=S,P.right=g,P._color=S._color,S._color=o,g._color=o,C._color=o,c(S),c(g),c(P),E>1){var z=x[E-2];z.left===S?z.left=P:z.right=P}x[E-1]=P;return}if(g._color===o)if(S._color===a){S._color=o,S.right=u(a,g);return}else{S.right=u(a,g);continue}else{if(g=l(g),S.right=g.left,g.left=S,g._color=S._color,S._color=a,c(S),c(g),E>1){var z=x[E-2];z.left===S?z.left=g:z.right=g}x[E-1]=g,x[E]=S,E+11){var z=x[E-2];z.right===S?z.right=g:z.left=g}x[E-1]=g;return}else if(g.right&&g.right._color===a){if(g=S.left=l(g),P=g.right=l(g.right),S.left=P.right,g.right=P.left,P.right=S,P.left=g,P._color=S._color,S._color=o,g._color=o,C._color=o,c(S),c(g),c(P),E>1){var z=x[E-2];z.right===S?z.right=P:z.left=P}x[E-1]=P;return}if(g._color===o)if(S._color===a){S._color=o,S.left=u(a,g);return}else{S.left=u(a,g);continue}else{if(g=l(g),S.left=g.right,g.right=S,g._color=S._color,S._color=a,c(S),c(g),E>1){var z=x[E-2];z.right===S?z.right=g:z.left=g}x[E-1]=g,x[E]=S,E+1=0;--g){var S=x[g];S.left===x[g+1]?C[g]=new s(S._color,S.key,S.value,C[g+1],S.right,S._count):C[g]=new s(S._color,S.key,S.value,S.left,C[g+1],S._count)}if(S=C[C.length-1],S.left&&S.right){var P=C.length;for(S=S.left;S.right;)C.push(S),S=S.right;var E=C[P-1];C.push(new s(S._color,E.key,E.value,S.left,S.right,S._count)),C[P-1].key=S.key,C[P-1].value=S.value;for(var g=C.length-2;g>=P;--g)S=C[g],C[g]=new s(S._color,S.key,S.value,S.left,C[g+1],S._count);C[P-1].left=C[P]}if(S=C[C.length-1],S._color===a){var z=C[C.length-2];z.left===S?z.left=null:z.right===S&&(z.right=null),C.pop();for(var g=0;g0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(p,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(p,"index",{get:function(){var x=0,C=this._stack;if(C.length===0){var S=this.tree.root;return S?S._count:0}else C[C.length-1].left&&(x=C[C.length-1].left._count);for(var g=C.length-2;g>=0;--g)C[g+1]===C[g].right&&(++x,C[g].left&&(x+=C[g].left._count));return x},enumerable:!0}),p.next=function(){var x=this._stack;if(x.length!==0){var C=x[x.length-1];if(C.right)for(C=C.right;C;)x.push(C),C=C.left;else for(x.pop();x.length>0&&x[x.length-1].right===C;)C=x[x.length-1],x.pop()}},Object.defineProperty(p,"hasNext",{get:function(){var x=this._stack;if(x.length===0)return!1;if(x[x.length-1].right)return!0;for(var C=x.length-1;C>0;--C)if(x[C-1].left===x[C])return!0;return!1}}),p.update=function(x){var C=this._stack;if(C.length===0)throw new Error("Can't update empty node!");var S=new Array(C.length),g=C[C.length-1];S[S.length-1]=new s(g._color,g.key,x,g.left,g.right,g._count);for(var P=C.length-2;P>=0;--P)g=C[P],g.left===C[P+1]?S[P]=new s(g._color,g.key,g.value,S[P+1],g.right,g._count):S[P]=new s(g._color,g.key,g.value,g.left,S[P+1],g._count);return new f(this.tree._compare,S[0])},p.prev=function(){var x=this._stack;if(x.length!==0){var C=x[x.length-1];if(C.left)for(C=C.left;C;)x.push(C),C=C.right;else for(x.pop();x.length>0&&x[x.length-1].left===C;)C=x[x.length-1],x.pop()}},Object.defineProperty(p,"hasPrev",{get:function(){var x=this._stack;if(x.length===0)return!1;if(x[x.length-1].left)return!0;for(var C=x.length-1;C>0;--C)if(x[C-1].right===x[C])return!0;return!1}});function T(x,C){return xC?1:0}function L(x){return new f(x||T,null)}},3837:function(i,a,o){"use strict";i.exports=q;var s=o(4935),l=o(501),u=o(5304),c=o(6429),f=o(6444),h=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),d=ArrayBuffer,v=DataView;function m(U){return d.isView(U)&&!(U instanceof v)}function b(U){return Array.isArray(U)||m(U)}function p(U,G){return U[0]=G[0],U[1]=G[1],U[2]=G[2],U}function k(U){this.gl=U,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=u(U)}var M=k.prototype;M.update=function(U){U=U||{};function G(we,De,Le){if(Le in U){var me=U[Le],Pe=this[Le],ce;(we?b(me)&&b(me[0]):b(me))?this[Le]=ce=[De(me[0]),De(me[1]),De(me[2])]:this[Le]=ce=[De(me),De(me),De(me)];for(var He=0;He<3;++He)if(ce[He]!==Pe[He])return!0}return!1}var Z=G.bind(this,!1,Number),j=G.bind(this,!1,Boolean),N=G.bind(this,!1,String),H=G.bind(this,!0,function(we){if(b(we)){if(we.length===3)return[+we[0],+we[1],+we[2],1];if(we.length===4)return[+we[0],+we[1],+we[2],+we[3]]}return[0,0,0,1]}),re,oe=!1,_e=!1;if("bounds"in U)for(var ke=U.bounds,Ce=0;Ce<2;++Ce)for(var ge=0;ge<3;++ge)ke[Ce][ge]!==this.bounds[Ce][ge]&&(_e=!0),this.bounds[Ce][ge]=ke[Ce][ge];if("ticks"in U){re=U.ticks,oe=!0,this.autoTicks=!1;for(var Ce=0;Ce<3;++Ce)this.tickSpacing[Ce]=0}else Z("tickSpacing")&&(this.autoTicks=!0,_e=!0);if(this._firstInit&&("ticks"in U||"tickSpacing"in U||(this.autoTicks=!0),_e=!0,oe=!0,this._firstInit=!1),_e&&this.autoTicks&&(re=f.create(this.bounds,this.tickSpacing),oe=!0),oe){for(var Ce=0;Ce<3;++Ce)re[Ce].sort(function(De,Le){return De.x-Le.x});f.equal(re,this.ticks)?oe=!1:this.ticks=re}j("tickEnable"),N("tickFont")&&(oe=!0),N("tickFontStyle")&&(oe=!0),N("tickFontWeight")&&(oe=!0),N("tickFontVariant")&&(oe=!0),Z("tickSize"),Z("tickAngle"),Z("tickPad"),H("tickColor");var ie=N("labels");N("labelFont")&&(ie=!0),N("labelFontStyle")&&(ie=!0),N("labelFontWeight")&&(ie=!0),N("labelFontVariant")&&(ie=!0),j("labelEnable"),Z("labelSize"),Z("labelPad"),H("labelColor"),j("lineEnable"),j("lineMirror"),Z("lineWidth"),H("lineColor"),j("lineTickEnable"),j("lineTickMirror"),Z("lineTickLength"),Z("lineTickWidth"),H("lineTickColor"),j("gridEnable"),Z("gridWidth"),H("gridColor"),j("zeroEnable"),H("zeroLineColor"),Z("zeroLineWidth"),j("backgroundEnable"),H("backgroundColor");var Se=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],Ee=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(ie||oe)&&this._text.update(this.bounds,this.labels,Se,this.ticks,Ee):this._text=s(this.gl,this.bounds,this.labels,Se,this.ticks,Ee),this._lines&&oe&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=l(this.gl,this.bounds,this.ticks))};function T(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var L=[new T,new T,new T];function x(U,G,Z,j,N){for(var H=U.primalOffset,re=U.primalMinor,oe=U.mirrorOffset,_e=U.mirrorMinor,ke=j[G],Ce=0;Ce<3;++Ce)if(G!==Ce){var ge=H,ie=oe,Se=re,Ee=_e;ke&1<0?(Se[Ce]=-1,Ee[Ce]=0):(Se[Ce]=0,Ee[Ce]=1)}}var C=[0,0,0],S={model:h,view:h,projection:h,_ortho:!1};M.isOpaque=function(){return!0},M.isTransparent=function(){return!1},M.drawTransparent=function(U){};var g=0,P=[0,0,0],E=[0,0,0],z=[0,0,0];M.draw=function(U){U=U||S;for(var Le=this.gl,G=U.model||h,Z=U.view||h,j=U.projection||h,N=this.bounds,H=U._ortho||!1,re=c(G,Z,j,N,H),oe=re.cubeEdges,_e=re.axis,ke=Z[12],Ce=Z[13],ge=Z[14],ie=Z[15],Se=H?2:1,Ee=Se*this.pixelRatio*(j[3]*ke+j[7]*Ce+j[11]*ge+j[15]*ie)/Le.drawingBufferHeight,we=0;we<3;++we)this.lastCubeProps.cubeEdges[we]=oe[we],this.lastCubeProps.axis[we]=_e[we];for(var De=L,we=0;we<3;++we)x(L[we],we,this.bounds,oe,_e);for(var Le=this.gl,me=C,we=0;we<3;++we)this.backgroundEnable[we]?me[we]=_e[we]:me[we]=0;this._background.draw(G,Z,j,N,me,this.backgroundColor),this._lines.bind(G,Z,j,this);for(var we=0;we<3;++we){var Pe=[0,0,0];_e[we]>0?Pe[we]=N[1][we]:Pe[we]=N[0][we];for(var ce=0;ce<2;++ce){var He=(we+1+ce)%3,lt=(we+1+(ce^1))%3;this.gridEnable[He]&&this._lines.drawGrid(He,lt,this.bounds,Pe,this.gridColor[He],this.gridWidth[He]*this.pixelRatio)}for(var ce=0;ce<2;++ce){var He=(we+1+ce)%3,lt=(we+1+(ce^1))%3;this.zeroEnable[lt]&&Math.min(N[0][lt],N[1][lt])<=0&&Math.max(N[0][lt],N[1][lt])>=0&&this._lines.drawZero(He,lt,this.bounds,Pe,this.zeroLineColor[lt],this.zeroLineWidth[lt]*this.pixelRatio)}}for(var we=0;we<3;++we){this.lineEnable[we]&&this._lines.drawAxisLine(we,this.bounds,De[we].primalOffset,this.lineColor[we],this.lineWidth[we]*this.pixelRatio),this.lineMirror[we]&&this._lines.drawAxisLine(we,this.bounds,De[we].mirrorOffset,this.lineColor[we],this.lineWidth[we]*this.pixelRatio);for(var mt=p(P,De[we].primalMinor),Vt=p(E,De[we].mirrorMinor),st=this.lineTickLength,ce=0;ce<3;++ce){var ct=Ee/G[5*ce];mt[ce]*=st[ce]*ct,Vt[ce]*=st[ce]*ct}this.lineTickEnable[we]&&this._lines.drawAxisTicks(we,De[we].primalOffset,mt,this.lineTickColor[we],this.lineTickWidth[we]*this.pixelRatio),this.lineTickMirror[we]&&this._lines.drawAxisTicks(we,De[we].mirrorOffset,Vt,this.lineTickColor[we],this.lineTickWidth[we]*this.pixelRatio)}this._lines.unbind(),this._text.bind(G,Z,j,this.pixelRatio);var Qt,Ht=.5,nr,tt;function je(dt){tt=[0,0,0],tt[dt]=1}function Ue(dt,Et,pt){var Xt=(dt+1)%3,or=(dt+2)%3,_r=Et[Xt],Er=Et[or],ei=pt[Xt],qr=pt[or];if(_r>0&&qr>0){je(Xt);return}else if(_r>0&&qr<0){je(Xt);return}else if(_r<0&&qr>0){je(Xt);return}else if(_r<0&&qr<0){je(Xt);return}else if(Er>0&&ei>0){je(or);return}else if(Er>0&&ei<0){je(or);return}else if(Er<0&&ei>0){je(or);return}else if(Er<0&&ei<0){je(or);return}}for(var we=0;we<3;++we){for(var Ae=De[we].primalMinor,rt=De[we].mirrorMinor,St=p(z,De[we].primalOffset),ce=0;ce<3;++ce)this.lineTickEnable[we]&&(St[ce]+=Ee*Ae[ce]*Math.max(this.lineTickLength[ce],0)/G[5*ce]);var Tt=[0,0,0];if(Tt[we]=1,this.tickEnable[we]){this.tickAngle[we]===-3600?(this.tickAngle[we]=0,this.tickAlign[we]="auto"):this.tickAlign[we]=-1,nr=1,Qt=[this.tickAlign[we],Ht,nr],Qt[0]==="auto"?Qt[0]=g:Qt[0]=parseInt(""+Qt[0]),tt=[0,0,0],Ue(we,Ae,rt);for(var ce=0;ce<3;++ce)St[ce]+=Ee*Ae[ce]*this.tickPad[ce]/G[5*ce];this._text.drawTicks(we,this.tickSize[we],this.tickAngle[we],St,this.tickColor[we],Tt,tt,Qt)}if(this.labelEnable[we]){nr=0,tt=[0,0,0],this.labels[we].length>4&&(je(we),nr=1),Qt=[this.labelAlign[we],Ht,nr],Qt[0]==="auto"?Qt[0]=g:Qt[0]=parseInt(""+Qt[0]);for(var ce=0;ce<3;++ce)St[ce]+=Ee*Ae[ce]*this.labelPad[ce]/G[5*ce];St[we]+=.5*(N[0][we]+N[1][we]),this._text.drawLabel(we,this.labelSize[we],this.labelAngle[we],St,this.labelColor[we],[0,0,0],tt,Qt)}}this._text.unbind()},M.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function q(U,G){var Z=new k(U);return Z.update(G),Z}},5304:function(i,a,o){"use strict";i.exports=h;var s=o(2762),l=o(8116),u=o(1879).bg;function c(d,v,m,b){this.gl=d,this.buffer=v,this.vao=m,this.shader=b}var f=c.prototype;f.draw=function(d,v,m,b,p,k){for(var M=!1,T=0;T<3;++T)M=M||p[T];if(M){var L=this.gl;L.enable(L.POLYGON_OFFSET_FILL),L.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:d,view:v,projection:m,bounds:b,enable:p,colors:k},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),L.disable(L.POLYGON_OFFSET_FILL)}},f.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function h(d){for(var v=[],m=[],b=0,p=0;p<3;++p)for(var k=(p+1)%3,M=(p+2)%3,T=[0,0,0],L=[0,0,0],x=-1;x<=1;x+=2){m.push(b,b+2,b+1,b+1,b+2,b+3),T[p]=x,L[p]=x;for(var C=-1;C<=1;C+=2){T[k]=C;for(var S=-1;S<=1;S+=2)T[M]=S,v.push(T[0],T[1],T[2],L[0],L[1],L[2]),b+=1}var g=k;k=M,M=g}var P=s(d,new Float32Array(v)),E=s(d,new Uint16Array(m),d.ELEMENT_ARRAY_BUFFER),z=l(d,[{buffer:P,type:d.FLOAT,size:3,offset:0,stride:24},{buffer:P,type:d.FLOAT,size:3,offset:12,stride:24}],E),q=u(d);return q.attributes.position.location=0,q.attributes.normal.location=1,new c(d,P,z,q)}},6429:function(i,a,o){"use strict";i.exports=x;var s=o(8828),l=o(6760),u=o(5202),c=o(3250),f=new Array(16),h=new Array(8),d=new Array(8),v=new Array(3),m=[0,0,0];(function(){for(var C=0;C<8;++C)h[C]=[1,1,1,1],d[C]=[1,1,1]})();function b(C,S,g){for(var P=0;P<4;++P){C[P]=g[12+P];for(var E=0;E<3;++E)C[P]+=S[E]*g[4*E+P]}}var p=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function k(C){for(var S=0;S_e&&(Z|=1<_e){Z|=1<d[q][1])&&(De=q);for(var Le=-1,q=0;q<3;++q){var me=De^1<d[Pe][0]&&(Pe=me)}}var ce=M;ce[0]=ce[1]=ce[2]=0,ce[s.log2(Le^De)]=De&Le,ce[s.log2(De^Pe)]=De&Pe;var He=Pe^7;He===Z||He===we?(He=Le^7,ce[s.log2(Pe^He)]=He&Pe):ce[s.log2(Le^He)]=He&Le;for(var lt=T,mt=Z,H=0;H<3;++H)mt&1< HALF_PI) && (b <= ONE_AND_HALF_PI)) ? + b - PI : + b; +} + +float look_horizontal_or_vertical(float a, float ratio) { + // ratio controls the ratio between being horizontal to (vertical + horizontal) + // if ratio is set to 0.5 then it is 50%, 50%. + // when using a higher ratio e.g. 0.75 the result would + // likely be more horizontal than vertical. + + float b = positive_angle(a); + + return + (b < ( ratio) * HALF_PI) ? 0.0 : + (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI : + (b < (2.0 + ratio) * HALF_PI) ? 0.0 : + (b < (4.0 - ratio) * HALF_PI) ? HALF_PI : + 0.0; +} + +float roundTo(float a, float b) { + return float(b * floor((a + 0.5 * b) / b)); +} + +float look_round_n_directions(float a, int n) { + float b = positive_angle(a); + float div = TWO_PI / float(n); + float c = roundTo(b, div); + return look_upwards(c); +} + +float applyAlignOption(float rawAngle, float delta) { + return + (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions + (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical + (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis + (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards + (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal + rawAngle; // otherwise return back raw input angle +} + +bool isAxisTitle = (axis.x == 0.0) && + (axis.y == 0.0) && + (axis.z == 0.0); + +void main() { + //Compute world offset + float axisDistance = position.z; + vec3 dataPosition = axisDistance * axis + offset; + + float beta = angle; // i.e. user defined attributes for each tick + + float axisAngle; + float clipAngle; + float flip; + + if (enableAlign) { + axisAngle = (isAxisTitle) ? HALF_PI : + computeViewAngle(dataPosition, dataPosition + axis); + clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir); + + axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0; + clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0; + + flip = (dot(vec2(cos(axisAngle), sin(axisAngle)), + vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0; + + beta += applyAlignOption(clipAngle, flip * PI); + } + + //Compute plane offset + vec2 planeCoord = position.xy * pixelScale; + + mat2 planeXform = scale * mat2( + cos(beta), sin(beta), + -sin(beta), cos(beta) + ); + + vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution; + + //Compute clip position + vec3 clipPosition = project(dataPosition); + + //Apply text offset in clip coordinates + clipPosition += vec3(viewOffset, 0.0); + + //Done + gl_Position = vec4(clipPosition, 1.0); +} +`]),h=s([`precision highp float; +#define GLSLIFY 1 + +uniform vec4 color; +void main() { + gl_FragColor = color; +}`]);a.Q=function(m){return l(m,f,h,null,[{name:"position",type:"vec3"}])};var d=s([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position; +attribute vec3 normal; + +uniform mat4 model, view, projection; +uniform vec3 enable; +uniform vec3 bounds[2]; + +varying vec3 colorChannel; + +void main() { + + vec3 signAxis = sign(bounds[1] - bounds[0]); + + vec3 realNormal = signAxis * normal; + + if(dot(realNormal, enable) > 0.0) { + vec3 minRange = min(bounds[0], bounds[1]); + vec3 maxRange = max(bounds[0], bounds[1]); + vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0)); + gl_Position = projection * (view * (model * vec4(nPosition, 1.0))); + } else { + gl_Position = vec4(0,0,0,0); + } + + colorChannel = abs(realNormal); +} +`]),v=s([`precision highp float; +#define GLSLIFY 1 + +uniform vec4 colors[3]; + +varying vec3 colorChannel; + +void main() { + gl_FragColor = colorChannel.x * colors[0] + + colorChannel.y * colors[1] + + colorChannel.z * colors[2]; +}`]);a.bg=function(m){return l(m,d,v,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},4935:function(i,a,o){"use strict";i.exports=k;var s=o(2762),l=o(8116),u=o(4359),c=o(1879).Q,f=window||process.global||{},h=f.__TEXT_CACHE||{};f.__TEXT_CACHE={};var d=3;function v(M,T,L,x){this.gl=M,this.shader=T,this.buffer=L,this.vao=x,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var m=v.prototype,b=[0,0];m.bind=function(M,T,L,x){this.vao.bind(),this.shader.bind();var C=this.shader.uniforms;C.model=M,C.view=T,C.projection=L,C.pixelScale=x,b[0]=this.gl.drawingBufferWidth,b[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=b},m.unbind=function(){this.vao.unbind()},m.update=function(M,T,L,x,C){var S=[];function g(H,re,oe,_e,ke,Ce){var ge=[oe.style,oe.weight,oe.variant,oe.family].join("_"),ie=h[ge];ie||(ie=h[ge]={});var Se=ie[re];Se||(Se=ie[re]=p(re,{triangles:!0,font:oe.family,fontStyle:oe.style,fontWeight:oe.weight,fontVariant:oe.variant,textAlign:"center",textBaseline:"middle",lineSpacing:ke,styletags:Ce}));for(var Ee=(_e||12)/12,we=Se.positions,De=Se.cells,Le=0,me=De.length;Le=0;--ce){var He=we[Pe[ce]];S.push(Ee*He[0],-Ee*He[1],H)}}for(var P=[0,0,0],E=[0,0,0],z=[0,0,0],q=[0,0,0],U=1.25,G={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},Z=0;Z<3;++Z){z[Z]=S.length/d|0,g(.5*(M[0][Z]+M[1][Z]),T[Z],L[Z],12,U,G),q[Z]=(S.length/d|0)-z[Z],P[Z]=S.length/d|0;for(var j=0;j=0&&(d=f.length-h-1);var v=Math.pow(10,d),m=Math.round(u*c*v),b=m+"";if(b.indexOf("e")>=0)return b;var p=m/v,k=m%v;m<0?(p=-Math.ceil(p)|0,k=-k|0):(p=Math.floor(p)|0,k=k|0);var M=""+p;if(m<0&&(M="-"+M),d){for(var T=""+k;T.length=u[0][h];--m)d.push({x:m*c[h],text:o(c[h],m)});f.push(d)}return f}function l(u,c){for(var f=0;f<3;++f){if(u[f].length!==c[f].length)return!1;for(var h=0;hM)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return p.bufferSubData(k,x,L),M}function v(p,k){for(var M=s.malloc(p.length,k),T=p.length,L=0;L=0;--T){if(k[T]!==M)return!1;M*=p[T]}return!0}h.update=function(p,k){if(typeof k!="number"&&(k=-1),this.bind(),typeof p=="object"&&typeof p.shape!="undefined"){var M=p.dtype;if(c.indexOf(M)<0&&(M="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var T=gl.getExtension("OES_element_index_uint");T&&M!=="uint16"?M="uint32":M="uint16"}if(M===p.dtype&&m(p.shape,p.stride))p.offset===0&&p.data.length===p.shape[0]?this.length=d(this.gl,this.type,this.length,this.usage,p.data,k):this.length=d(this.gl,this.type,this.length,this.usage,p.data.subarray(p.offset,p.shape[0]),k);else{var L=s.malloc(p.size,M),x=u(L,p.shape);l.assign(x,p),k<0?this.length=d(this.gl,this.type,this.length,this.usage,L,k):this.length=d(this.gl,this.type,this.length,this.usage,L.subarray(0,p.size),k),s.free(L)}}else if(Array.isArray(p)){var C;this.type===this.gl.ELEMENT_ARRAY_BUFFER?C=v(p,"uint16"):C=v(p,"float32"),k<0?this.length=d(this.gl,this.type,this.length,this.usage,C,k):this.length=d(this.gl,this.type,this.length,this.usage,C.subarray(0,p.length),k),s.free(C)}else if(typeof p=="object"&&typeof p.length=="number")this.length=d(this.gl,this.type,this.length,this.usage,p,k);else if(typeof p=="number"||p===void 0){if(k>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");p=p|0,p<=0&&(p=1),this.gl.bufferData(this.type,p|0,this.usage),this.length=p}else throw new Error("gl-buffer: Invalid data type")};function b(p,k,M,T){if(M=M||p.ARRAY_BUFFER,T=T||p.DYNAMIC_DRAW,M!==p.ARRAY_BUFFER&&M!==p.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(T!==p.DYNAMIC_DRAW&&T!==p.STATIC_DRAW&&T!==p.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var L=p.createBuffer(),x=new f(p,M,L,0,T);return x.update(k),x}i.exports=b},6405:function(i,a,o){"use strict";var s=o(2931);i.exports=function(u,c){var f=u.positions,h=u.vectors,d={positions:[],vertexIntensity:[],vertexIntensityBounds:u.vertexIntensityBounds,vectors:[],cells:[],coneOffset:u.coneOffset,colormap:u.colormap};if(u.positions.length===0)return c&&(c[0]=[0,0,0],c[1]=[0,0,0]),d;for(var v=0,m=1/0,b=-1/0,p=1/0,k=-1/0,M=1/0,T=-1/0,L=null,x=null,C=[],S=1/0,g=!1,P=u.coneSizemode==="raw",E=0;Ev&&(v=s.length(q)),E&&!P){var U=2*s.distance(L,z)/(s.length(x)+s.length(q));U?(S=Math.min(S,U),g=!1):g=!0}g||(L=z,x=q),C.push(q)}var G=[m,p,M],Z=[b,k,T];c&&(c[0]=G,c[1]=Z),v===0&&(v=1);var j=1/v;isFinite(S)||(S=1),d.vectorScale=S;var N=u.coneSize||(P?1:.5);u.absoluteConeSize&&(N=u.absoluteConeSize*j),d.coneScale=N;for(var E=0,H=0;E=1},p.isTransparent=function(){return this.opacity<1},p.pickSlots=1,p.setPickBase=function(C){this.pickId=C};function k(C){for(var S=v({colormap:C,nshades:256,format:"rgba"}),g=new Uint8Array(256*4),P=0;P<256;++P){for(var E=S[P],z=0;z<3;++z)g[4*P+z]=E[z];g[4*P+3]=E[3]*255}return d(g,[256,256,4],[4,0,1])}function M(C){for(var S=C.length,g=new Array(S),P=0;P0){var H=this.triShader;H.bind(),H.uniforms=U,this.triangleVAO.bind(),S.drawArrays(S.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},p.drawPick=function(C){C=C||{};for(var S=this.gl,g=C.model||m,P=C.view||m,E=C.projection||m,z=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],q=0;q<3;++q)z[0][q]=Math.max(z[0][q],this.clipBounds[0][q]),z[1][q]=Math.min(z[1][q],this.clipBounds[1][q]);this._model=[].slice.call(g),this._view=[].slice.call(P),this._projection=[].slice.call(E),this._resolution=[S.drawingBufferWidth,S.drawingBufferHeight];var U={model:g,view:P,projection:E,clipBounds:z,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},G=this.pickShader;G.bind(),G.uniforms=U,this.triangleCount>0&&(this.triangleVAO.bind(),S.drawArrays(S.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},p.pick=function(C){if(!C||C.id!==this.pickId)return null;var S=C.value[0]+256*C.value[1]+65536*C.value[2],g=this.cells[S],P=this.positions[g[1]].slice(0,3),E={position:P,dataCoordinate:P,index:Math.floor(g[1]/48)};return this.traceType==="cone"?E.index=Math.floor(g[1]/48):this.traceType==="streamtube"&&(E.intensity=this.intensity[g[1]],E.velocity=this.vectors[g[1]].slice(0,3),E.divergence=this.vectors[g[1]][3],E.index=S),E},p.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()};function T(C,S){var g=s(C,S.meshShader.vertex,S.meshShader.fragment,null,S.meshShader.attributes);return g.attributes.position.location=0,g.attributes.color.location=2,g.attributes.uv.location=3,g.attributes.vector.location=4,g}function L(C,S){var g=s(C,S.pickShader.vertex,S.pickShader.fragment,null,S.pickShader.attributes);return g.attributes.position.location=0,g.attributes.id.location=1,g.attributes.vector.location=4,g}function x(C,S,g){var P=g.shaders;arguments.length===1&&(S=C,C=S.gl);var E=T(C,P),z=L(C,P),q=c(C,d(new Uint8Array([255,255,255,255]),[1,1,4]));q.generateMipmap(),q.minFilter=C.LINEAR_MIPMAP_LINEAR,q.magFilter=C.LINEAR;var U=l(C),G=l(C),Z=l(C),j=l(C),N=l(C),H=u(C,[{buffer:U,type:C.FLOAT,size:4},{buffer:N,type:C.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:Z,type:C.FLOAT,size:4},{buffer:j,type:C.FLOAT,size:2},{buffer:G,type:C.FLOAT,size:4}]),re=new b(C,q,E,z,U,G,N,Z,j,H,g.traceType||"cone");return re.update(S),re}i.exports=x},614:function(i,a,o){var s=o(3236),l=s([`precision highp float; precision highp float; #define GLSLIFY 1 @@ -436,39 +653,242 @@ void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); -}`]);a.meshShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},a.pickShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},620:function(i){i.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},665:function(i,a,o){"use strict";var s=o(3202);i.exports=f;var l=96;function u(h,d){var v=s(getComputedStyle(h).getPropertyValue(d));return v[0]*f(v[1],h)}function c(h,d){var v=document.createElement("div");v.style["font-size"]="128"+h,d.appendChild(v);var _=u(v,"font-size")/128;return d.removeChild(v),_}function f(h,d){switch(d=d||document.body,h=(h||"px").trim().toLowerCase(),(d===window||d===document)&&(d=document.body),h){case"%":return d.clientHeight/100;case"ch":case"ex":return c(h,d);case"em":return u(d,"font-size");case"rem":return u(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return l;case"cm":return l/2.54;case"mm":return l/25.4;case"pt":return l/72;case"pc":return l/6}return 1}},727:function(i,a,o){"use strict";var s=o(2962),l=6;function u(T){var L=T===2?h:T===3?d:T===4?v:T===5?_:b;return T<6?L(s[T]):L(s)}function c(){return[[0]]}function f(T,L){return[[L[0]],[T[0][0]]]}function h(T){return function(x,C){return[T([[+C[0],+x[0][1]],[+C[1],+x[1][1]]]),T([[+x[0][0],+C[0]],[+x[1][0],+C[1]]]),T(x)]}}function d(T){return function(x,C){return[T([[+C[0],+x[0][1],+x[0][2]],[+C[1],+x[1][1],+x[1][2]],[+C[2],+x[2][1],+x[2][2]]]),T([[+x[0][0],+C[0],+x[0][2]],[+x[1][0],+C[1],+x[1][2]],[+x[2][0],+C[2],+x[2][2]]]),T([[+x[0][0],+x[0][1],+C[0]],[+x[1][0],+x[1][1],+C[1]],[+x[2][0],+x[2][1],+C[2]]]),T(x)]}}function v(T){return function(x,C){return[T([[+C[0],+x[0][1],+x[0][2],+x[0][3]],[+C[1],+x[1][1],+x[1][2],+x[1][3]],[+C[2],+x[2][1],+x[2][2],+x[2][3]],[+C[3],+x[3][1],+x[3][2],+x[3][3]]]),T([[+x[0][0],+C[0],+x[0][2],+x[0][3]],[+x[1][0],+C[1],+x[1][2],+x[1][3]],[+x[2][0],+C[2],+x[2][2],+x[2][3]],[+x[3][0],+C[3],+x[3][2],+x[3][3]]]),T([[+x[0][0],+x[0][1],+C[0],+x[0][3]],[+x[1][0],+x[1][1],+C[1],+x[1][3]],[+x[2][0],+x[2][1],+C[2],+x[2][3]],[+x[3][0],+x[3][1],+C[3],+x[3][3]]]),T([[+x[0][0],+x[0][1],+x[0][2],+C[0]],[+x[1][0],+x[1][1],+x[1][2],+C[1]],[+x[2][0],+x[2][1],+x[2][2],+C[2]],[+x[3][0],+x[3][1],+x[3][2],+C[3]]]),T(x)]}}function _(T){return function(x,C){return[T([[+C[0],+x[0][1],+x[0][2],+x[0][3],+x[0][4]],[+C[1],+x[1][1],+x[1][2],+x[1][3],+x[1][4]],[+C[2],+x[2][1],+x[2][2],+x[2][3],+x[2][4]],[+C[3],+x[3][1],+x[3][2],+x[3][3],+x[3][4]],[+C[4],+x[4][1],+x[4][2],+x[4][3],+x[4][4]]]),T([[+x[0][0],+C[0],+x[0][2],+x[0][3],+x[0][4]],[+x[1][0],+C[1],+x[1][2],+x[1][3],+x[1][4]],[+x[2][0],+C[2],+x[2][2],+x[2][3],+x[2][4]],[+x[3][0],+C[3],+x[3][2],+x[3][3],+x[3][4]],[+x[4][0],+C[4],+x[4][2],+x[4][3],+x[4][4]]]),T([[+x[0][0],+x[0][1],+C[0],+x[0][3],+x[0][4]],[+x[1][0],+x[1][1],+C[1],+x[1][3],+x[1][4]],[+x[2][0],+x[2][1],+C[2],+x[2][3],+x[2][4]],[+x[3][0],+x[3][1],+C[3],+x[3][3],+x[3][4]],[+x[4][0],+x[4][1],+C[4],+x[4][3],+x[4][4]]]),T([[+x[0][0],+x[0][1],+x[0][2],+C[0],+x[0][4]],[+x[1][0],+x[1][1],+x[1][2],+C[1],+x[1][4]],[+x[2][0],+x[2][1],+x[2][2],+C[2],+x[2][4]],[+x[3][0],+x[3][1],+x[3][2],+C[3],+x[3][4]],[+x[4][0],+x[4][1],+x[4][2],+C[4],+x[4][4]]]),T([[+x[0][0],+x[0][1],+x[0][2],+x[0][3],+C[0]],[+x[1][0],+x[1][1],+x[1][2],+x[1][3],+C[1]],[+x[2][0],+x[2][1],+x[2][2],+x[2][3],+C[2]],[+x[3][0],+x[3][1],+x[3][2],+x[3][3],+C[3]],[+x[4][0],+x[4][1],+x[4][2],+x[4][3],+C[4]]]),T(x)]}}function b(T){return function(x,C){return[T([[+C[0],+x[0][1],+x[0][2],+x[0][3],+x[0][4],+x[0][5]],[+C[1],+x[1][1],+x[1][2],+x[1][3],+x[1][4],+x[1][5]],[+C[2],+x[2][1],+x[2][2],+x[2][3],+x[2][4],+x[2][5]],[+C[3],+x[3][1],+x[3][2],+x[3][3],+x[3][4],+x[3][5]],[+C[4],+x[4][1],+x[4][2],+x[4][3],+x[4][4],+x[4][5]],[+C[5],+x[5][1],+x[5][2],+x[5][3],+x[5][4],+x[5][5]]]),T([[+x[0][0],+C[0],+x[0][2],+x[0][3],+x[0][4],+x[0][5]],[+x[1][0],+C[1],+x[1][2],+x[1][3],+x[1][4],+x[1][5]],[+x[2][0],+C[2],+x[2][2],+x[2][3],+x[2][4],+x[2][5]],[+x[3][0],+C[3],+x[3][2],+x[3][3],+x[3][4],+x[3][5]],[+x[4][0],+C[4],+x[4][2],+x[4][3],+x[4][4],+x[4][5]],[+x[5][0],+C[5],+x[5][2],+x[5][3],+x[5][4],+x[5][5]]]),T([[+x[0][0],+x[0][1],+C[0],+x[0][3],+x[0][4],+x[0][5]],[+x[1][0],+x[1][1],+C[1],+x[1][3],+x[1][4],+x[1][5]],[+x[2][0],+x[2][1],+C[2],+x[2][3],+x[2][4],+x[2][5]],[+x[3][0],+x[3][1],+C[3],+x[3][3],+x[3][4],+x[3][5]],[+x[4][0],+x[4][1],+C[4],+x[4][3],+x[4][4],+x[4][5]],[+x[5][0],+x[5][1],+C[5],+x[5][3],+x[5][4],+x[5][5]]]),T([[+x[0][0],+x[0][1],+x[0][2],+C[0],+x[0][4],+x[0][5]],[+x[1][0],+x[1][1],+x[1][2],+C[1],+x[1][4],+x[1][5]],[+x[2][0],+x[2][1],+x[2][2],+C[2],+x[2][4],+x[2][5]],[+x[3][0],+x[3][1],+x[3][2],+C[3],+x[3][4],+x[3][5]],[+x[4][0],+x[4][1],+x[4][2],+C[4],+x[4][4],+x[4][5]],[+x[5][0],+x[5][1],+x[5][2],+C[5],+x[5][4],+x[5][5]]]),T([[+x[0][0],+x[0][1],+x[0][2],+x[0][3],+C[0],+x[0][5]],[+x[1][0],+x[1][1],+x[1][2],+x[1][3],+C[1],+x[1][5]],[+x[2][0],+x[2][1],+x[2][2],+x[2][3],+C[2],+x[2][5]],[+x[3][0],+x[3][1],+x[3][2],+x[3][3],+C[3],+x[3][5]],[+x[4][0],+x[4][1],+x[4][2],+x[4][3],+C[4],+x[4][5]],[+x[5][0],+x[5][1],+x[5][2],+x[5][3],+C[5],+x[5][5]]]),T([[+x[0][0],+x[0][1],+x[0][2],+x[0][3],+x[0][4],+C[0]],[+x[1][0],+x[1][1],+x[1][2],+x[1][3],+x[1][4],+C[1]],[+x[2][0],+x[2][1],+x[2][2],+x[2][3],+x[2][4],+C[2]],[+x[3][0],+x[3][1],+x[3][2],+x[3][3],+x[3][4],+C[3]],[+x[4][0],+x[4][1],+x[4][2],+x[4][3],+x[4][4],+C[4]],[+x[5][0],+x[5][1],+x[5][2],+x[5][3],+x[5][4],+C[5]]]),T(x)]}}var p=[c,f];function k(T,L,x,C,M,g,P,A){return function(O,U){switch(O.length){case 0:return T(O,U);case 1:return L(O,U);case 2:return x(O,U);case 3:return C(O,U);case 4:return M(O,U);case 5:return g(O,U)}var G=P[O.length];return G||(G=P[O.length]=A(O.length)),G(O,U)}}function E(){for(;p.length1e-6?(k=Math.acos(E),T=Math.sin(k),L=Math.sin((1-u)*k)/T,x=Math.sin(u*k)/T):(L=1-u,x=u),o[0]=L*c+x*v,o[1]=L*f+x*_,o[2]=L*h+x*b,o[3]=L*d+x*p,o}},799:function(i,a,o){var s=o(3236),l=o(9405),u=s([`precision mediump float; -#define GLSLIFY 1 -attribute vec2 position; -varying vec2 uv; -void main() { - uv = position; - gl_Position = vec4(position, 0, 1); -}`]),c=s([`precision mediump float; +}`]);a.meshShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},a.pickShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737:function(i){i.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},5171:function(i,a,o){var s=o(737);i.exports=function(u){return s[u]}},9165:function(i,a,o){"use strict";i.exports=b;var s=o(2762),l=o(8116),u=o(3436),c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function f(p,k,M,T){this.gl=p,this.shader=T,this.buffer=k,this.vao=M,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var h=f.prototype;h.isOpaque=function(){return!this.hasAlpha},h.isTransparent=function(){return this.hasAlpha},h.drawTransparent=h.draw=function(p){var k=this.gl,M=this.shader.uniforms;this.shader.bind();var T=M.view=p.view||c,L=M.projection=p.projection||c;M.model=p.model||c,M.clipBounds=this.clipBounds,M.opacity=this.opacity;var x=T[12],C=T[13],S=T[14],g=T[15],P=p._ortho||!1,E=P?2:1,z=E*this.pixelRatio*(L[3]*x+L[7]*C+L[11]*S+L[15]*g)/k.drawingBufferHeight;this.vao.bind();for(var q=0;q<3;++q)k.lineWidth(this.lineWidth[q]*this.pixelRatio),M.capSize=this.capSize[q]*z,this.lineCount[q]&&k.drawArrays(k.LINES,this.lineOffset[q],this.lineCount[q]);this.vao.unbind()};function d(p,k){for(var M=0;M<3;++M)p[0][M]=Math.min(p[0][M],k[M]),p[1][M]=Math.max(p[1][M],k[M])}var v=function(){for(var p=new Array(3),k=0;k<3;++k){for(var M=[],T=1;T<=2;++T)for(var L=-1;L<=1;L+=2){var x=(T+k)%3,C=[0,0,0];C[x]=L,M.push(C)}p[k]=M}return p}();function m(p,k,M,T){for(var L=v[T],x=0;x0){var U=P.slice();U[S]+=z[1][S],L.push(P[0],P[1],P[2],q[0],q[1],q[2],q[3],0,0,0,U[0],U[1],U[2],q[0],q[1],q[2],q[3],0,0,0),d(this.bounds,U),C+=2+m(L,U,q,S)}}}this.lineCount[S]=C-this.lineOffset[S]}this.buffer.update(L)}},h.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function b(p){var k=p.gl,M=s(k),T=l(k,[{buffer:M,type:k.FLOAT,size:3,offset:0,stride:40},{buffer:M,type:k.FLOAT,size:4,offset:12,stride:40},{buffer:M,type:k.FLOAT,size:3,offset:28,stride:40}]),L=u(k);L.attributes.position.location=0,L.attributes.color.location=1,L.attributes.offset.location=2;var x=new f(k,M,T,L);return x.update(p),x}},3436:function(i,a,o){"use strict";var s=o(3236),l=o(9405),u=s([`precision highp float; #define GLSLIFY 1 -uniform sampler2D accumBuffer; -varying vec2 uv; +attribute vec3 position, offset; +attribute vec4 color; +uniform mat4 model, view, projection; +uniform float capSize; +varying vec4 fragColor; +varying vec3 fragPosition; void main() { - vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0)); - gl_FragColor = min(vec4(1,1,1,1), accum); -}`]);i.exports=function(f){return l(f,u,c,null,[{name:"position",type:"vec2"}])}},811:function(i){i.exports=a;function a(o,s){return o[0]=1/s[0],o[1]=1/s[1],o[2]=1/s[2],o}},840:function(i,a,o){var s=o(3236),l=s([`precision highp float; + vec4 worldPosition = model * vec4(position, 1.0); + worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0); + gl_Position = projection * (view * worldPosition); + fragColor = color; + fragPosition = position; +}`]),c=s([`precision highp float; #define GLSLIFY 1 -attribute vec3 position, normal; -attribute vec4 color; -attribute vec2 uv; +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} -uniform mat4 model - , view - , projection - , inverseModel; -uniform vec3 eyePosition - , lightPosition; +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} -varying vec3 f_normal - , f_lightDirection - , f_eyeDirection +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float opacity; +varying vec3 fragPosition; +varying vec4 fragColor; + +void main() { + if ( + outOfRange(clipBounds[0], clipBounds[1], fragPosition) || + fragColor.a * opacity == 0. + ) discard; + + gl_FragColor = opacity * fragColor; +}`]);i.exports=function(f){return l(f,u,c,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},2260:function(i,a,o){"use strict";var s=o(7766);i.exports=C;var l=null,u,c,f,h;function d(S){var g=S.getParameter(S.FRAMEBUFFER_BINDING),P=S.getParameter(S.RENDERBUFFER_BINDING),E=S.getParameter(S.TEXTURE_BINDING_2D);return[g,P,E]}function v(S,g){S.bindFramebuffer(S.FRAMEBUFFER,g[0]),S.bindRenderbuffer(S.RENDERBUFFER,g[1]),S.bindTexture(S.TEXTURE_2D,g[2])}function m(S,g){var P=S.getParameter(g.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(P+1);for(var E=0;E<=P;++E){for(var z=new Array(P),q=0;q1&&G.drawBuffersWEBGL(l[U]);var re=P.getExtension("WEBGL_depth_texture");re?Z?S.depth=p(P,z,q,re.UNSIGNED_INT_24_8_WEBGL,P.DEPTH_STENCIL,P.DEPTH_STENCIL_ATTACHMENT):j&&(S.depth=p(P,z,q,P.UNSIGNED_SHORT,P.DEPTH_COMPONENT,P.DEPTH_ATTACHMENT)):j&&Z?S._depth_rb=k(P,z,q,P.DEPTH_STENCIL,P.DEPTH_STENCIL_ATTACHMENT):j?S._depth_rb=k(P,z,q,P.DEPTH_COMPONENT16,P.DEPTH_ATTACHMENT):Z&&(S._depth_rb=k(P,z,q,P.STENCIL_INDEX,P.STENCIL_ATTACHMENT));var oe=P.checkFramebufferStatus(P.FRAMEBUFFER);if(oe!==P.FRAMEBUFFER_COMPLETE){S._destroyed=!0,P.bindFramebuffer(P.FRAMEBUFFER,null),P.deleteFramebuffer(S.handle),S.handle=null,S.depth&&(S.depth.dispose(),S.depth=null),S._depth_rb&&(P.deleteRenderbuffer(S._depth_rb),S._depth_rb=null);for(var H=0;Hz||P<0||P>z)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");S._shape[0]=g,S._shape[1]=P;for(var q=d(E),U=0;Uq||P<0||P>q)throw new Error("gl-fbo: Parameters are too large for FBO");E=E||{};var U=1;if("color"in E){if(U=Math.max(E.color|0,0),U<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(U>1)if(z){if(U>S.getParameter(z.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+U+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var G=S.UNSIGNED_BYTE,Z=S.getExtension("OES_texture_float");if(E.float&&U>0){if(!Z)throw new Error("gl-fbo: Context does not support floating point textures");G=S.FLOAT}else E.preferFloat&&U>0&&Z&&(G=S.FLOAT);var j=!0;"depth"in E&&(j=!!E.depth);var N=!1;return"stencil"in E&&(N=!!E.stencil),new T(S,g,P,G,U,j,N,z)}},2992:function(i,a,o){var s=o(3387).sprintf,l=o(5171),u=o(1848),c=o(1085);i.exports=f;function f(h,d,v){"use strict";var m=u(d)||"of unknown name (see npm glsl-shader-name)",b="unknown type";v!==void 0&&(b=v===l.FRAGMENT_SHADER?"fragment":"vertex");for(var p=s(`Error compiling %s shader %s: +`,b,m),k=s("%s%s",p,h),M=h.split(` +`),T={},L=0;L max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform sampler2D dashTexture; +uniform float dashScale; +uniform float opacity; + +varying vec3 worldPosition; +varying float pixelArcLength; +varying vec4 fragColor; + +void main() { + if ( + outOfRange(clipBounds[0], clipBounds[1], worldPosition) || + fragColor.a * opacity == 0. + ) discard; + + float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r; + if(dashWeight < 0.5) { + discard; + } + gl_FragColor = fragColor * opacity; +} +`]),f=s([`precision highp float; +#define GLSLIFY 1 + +#define FLOAT_MAX 1.70141184e38 +#define FLOAT_MIN 1.17549435e-38 + +// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl +vec4 packFloat(float v) { + float av = abs(v); + + //Handle special cases + if(av < FLOAT_MIN) { + return vec4(0.0, 0.0, 0.0, 0.0); + } else if(v > FLOAT_MAX) { + return vec4(127.0, 128.0, 0.0, 0.0) / 255.0; + } else if(v < -FLOAT_MAX) { + return vec4(255.0, 128.0, 0.0, 0.0) / 255.0; + } + + vec4 c = vec4(0,0,0,0); + + //Compute exponent and mantissa + float e = floor(log2(av)); + float m = av * pow(2.0, -e) - 1.0; + + //Unpack mantissa + c[1] = floor(128.0 * m); + m -= c[1] / 128.0; + c[2] = floor(32768.0 * m); + m -= c[2] / 32768.0; + c[3] = floor(8388608.0 * m); + + //Unpack exponent + float ebias = e + 127.0; + c[0] = floor(ebias / 2.0); + ebias -= c[0] * 2.0; + c[1] += floor(ebias) * 128.0; + + //Unpack sign bit + c[0] += 128.0 * step(0.0, -v); + + //Scale back to range + return c / 255.0; +} + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform float pickId; +uniform vec3 clipBounds[2]; + +varying vec3 worldPosition; +varying float pixelArcLength; +varying vec4 fragColor; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard; + + gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz); +}`]),h=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];a.createShader=function(d){return l(d,u,c,null,h)},a.createPickShader=function(d){return l(d,u,f,null,h)}},5714:function(i,a,o){"use strict";i.exports=S;var s=o(2762),l=o(8116),u=o(7766),c=new Uint8Array(4),f=new Float32Array(c.buffer);function h(g,P,E,z){return c[0]=z,c[1]=E,c[2]=P,c[3]=g,f[0]}var d=o(2478),v=o(9618),m=o(7319),b=m.createShader,p=m.createPickShader,k=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function M(g,P){for(var E=0,z=0;z<3;++z){var q=g[z]-P[z];E+=q*q}return Math.sqrt(E)}function T(g){for(var P=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],E=0;E<3;++E)P[0][E]=Math.max(g[0][E],P[0][E]),P[1][E]=Math.min(g[1][E],P[1][E]);return P}function L(g,P,E,z){this.arcLength=g,this.position=P,this.index=E,this.dataCoordinate=z}function x(g,P,E,z,q,U){this.gl=g,this.shader=P,this.pickShader=E,this.buffer=z,this.vao=q,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=U,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var C=x.prototype;C.isTransparent=function(){return this.hasAlpha},C.isOpaque=function(){return!this.hasAlpha},C.pickSlots=1,C.setPickBase=function(g){this.pickId=g},C.drawTransparent=C.draw=function(g){if(this.vertexCount){var P=this.gl,E=this.shader,z=this.vao;E.bind(),E.uniforms={model:g.model||k,view:g.view||k,projection:g.projection||k,clipBounds:T(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[P.drawingBufferWidth,P.drawingBufferHeight],pixelRatio:this.pixelRatio},z.bind(),z.draw(P.TRIANGLE_STRIP,this.vertexCount),z.unbind()}},C.drawPick=function(g){if(this.vertexCount){var P=this.gl,E=this.pickShader,z=this.vao;E.bind(),E.uniforms={model:g.model||k,view:g.view||k,projection:g.projection||k,pickId:this.pickId,clipBounds:T(this.clipBounds),screenShape:[P.drawingBufferWidth,P.drawingBufferHeight],pixelRatio:this.pixelRatio},z.bind(),z.draw(P.TRIANGLE_STRIP,this.vertexCount),z.unbind()}},C.update=function(g){var P,E;this.dirty=!0;var z=!!g.connectGaps;"dashScale"in g&&(this.dashScale=g.dashScale),this.hasAlpha=!1,"opacity"in g&&(this.opacity=+g.opacity,this.opacity<1&&(this.hasAlpha=!0));var q=[],U=[],G=[],Z=0,j=0,N=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],H=g.position||g.positions;if(H){var re=g.color||g.colors||[0,0,0,1],oe=g.lineWidth||1,_e=!1;e:for(P=1;P0){for(var ge=0;ge<24;++ge)q.push(q[q.length-12]);j+=2,_e=!0}continue e}N[0][E]=Math.min(N[0][E],ke[E],Ce[E]),N[1][E]=Math.max(N[1][E],ke[E],Ce[E])}var ie,Se;Array.isArray(re[0])?(ie=re.length>P-1?re[P-1]:re.length>0?re[re.length-1]:[0,0,0,1],Se=re.length>P?re[P]:re.length>0?re[re.length-1]:[0,0,0,1]):ie=Se=re,ie.length===3&&(ie=[ie[0],ie[1],ie[2],1]),Se.length===3&&(Se=[Se[0],Se[1],Se[2],1]),!this.hasAlpha&&ie[3]<1&&(this.hasAlpha=!0);var Ee;Array.isArray(oe)?Ee=oe.length>P-1?oe[P-1]:oe.length>0?oe[oe.length-1]:[0,0,0,1]:Ee=oe;var we=Z;if(Z+=M(ke,Ce),_e){for(E=0;E<2;++E)q.push(ke[0],ke[1],ke[2],Ce[0],Ce[1],Ce[2],we,Ee,ie[0],ie[1],ie[2],ie[3]);j+=2,_e=!1}q.push(ke[0],ke[1],ke[2],Ce[0],Ce[1],Ce[2],we,Ee,ie[0],ie[1],ie[2],ie[3],ke[0],ke[1],ke[2],Ce[0],Ce[1],Ce[2],we,-Ee,ie[0],ie[1],ie[2],ie[3],Ce[0],Ce[1],Ce[2],ke[0],ke[1],ke[2],Z,-Ee,Se[0],Se[1],Se[2],Se[3],Ce[0],Ce[1],Ce[2],ke[0],ke[1],ke[2],Z,Ee,Se[0],Se[1],Se[2],Se[3]),j+=4}}if(this.buffer.update(q),U.push(Z),G.push(H[H.length-1].slice()),this.bounds=N,this.vertexCount=j,this.points=G,this.arcLength=U,"dashes"in g){var De=g.dashes,Le=De.slice();for(Le.unshift(0),P=1;P1.0001)return null;E+=P[L]}return Math.abs(E-1)>.001?null:[x,h(v,P),P]}},840:function(i,a,o){var s=o(3236),l=s([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position, normal; +attribute vec4 color; +attribute vec2 uv; + +uniform mat4 model + , view + , projection + , inverseModel; +uniform vec3 eyePosition + , lightPosition; + +varying vec3 f_normal + , f_lightDirection + , f_eyeDirection , f_data; varying vec4 f_color; varying vec2 f_uv; @@ -723,7 +1143,7 @@ void main() { gl_Position = projection * (view * (model * vec4(position, 1.0))); f_id = id; f_position = position; -}`]),_=s([`precision highp float; +}`]),m=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -816,217 +1236,28 @@ uniform vec3 contourColor; void main() { gl_FragColor = vec4(contourColor, 1.0); } -`]);a.meshShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},a.wireShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},a.pointShader={vertex:h,fragment:d,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},a.pickShader={vertex:v,fragment:_,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},a.pointPickShader={vertex:b,fragment:_,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},a.contourShader={vertex:p,fragment:k,attributes:[{name:"position",type:"vec3"}]}},855:function(i,a,o){"use strict";i.exports={init:E,sweepBipartite:x,sweepComplete:C,scanBipartite:M,scanComplete:g};var s=o(1888),l=o(8828),u=o(4192),c=1<<28,f=1024,h=s.mallocInt32(f),d=s.mallocInt32(f),v=s.mallocInt32(f),_=s.mallocInt32(f),b=s.mallocInt32(f),p=s.mallocInt32(f),k=s.mallocDouble(f*8);function E(P){var A=l.nextPow2(P);h.length>>1;u(k,Ee);for(var Ae=0,Be=0,Le=0;Le=c)Pe=Pe-c|0,T(v,_,Be--,Pe);else if(Pe>=0)T(h,d,Ae--,Pe);else if(Pe<=-c){Pe=-Pe-c|0;for(var me=0;me>>1;u(k,Ee);for(var Ae=0,Be=0,Pe=0,Le=0;Le>1===k[2*Le+3]>>1&&(De=2,Le+=1),me<0){for(var ce=-(me>>1)-1,je=0;je>1)-1;De===0?T(h,d,Ae--,ce):De===1?T(v,_,Be--,ce):De===2&&T(b,p,Pe--,ce)}}}function M(P,A,z,O,U,G,Z,j,N,H,re,oe){var _e=0,Ce=2*P,Le=A,ge=A+P,ie=1,Se=1;O?Se=c:ie=c;for(var Ee=U;Ee>>1;u(k,me);for(var De=0,Ee=0;Ee=c?(je=!O,Ae-=c):(je=!!O,Ae-=1),je)L(h,d,De++,Ae);else{var lt=oe[Ae],pt=Ce*Ae,Vt=re[pt+A+1],ot=re[pt+A+1+P];e:for(var ut=0;ut>>1;u(k,Ae);for(var Be=0,ge=0;ge=c)h[Be++]=ie-c;else{ie-=1;var me=re[ie],De=_e*ie,ce=H[De+A+1],je=H[De+A+1+P];e:for(var lt=0;lt=0;--lt)if(h[lt]===ie){for(var ut=lt+1;utge&&Se>0){var Ee=(ie[Se][0]-ge)/(ie[Se][0]-ie[Se-1][0]);return ie[Se][1]*(1-Ee)+Ee*ie[Se-1][1]}}return 1}function Z(ge,ie){for(var Se=p({colormap:ge,nshades:256,format:"rgba"}),Ee=new Uint8Array(256*4),we=0;we<256;++we){for(var De=Se[we],Le=0;Le<3;++Le)Ee[4*we+Le]=De[Le];ie?Ee[4*we+3]=255*G(we/255,ie):Ee[4*we+3]=255*De[3]}return b(Ee,[256,256,4],[4,0,1])}function j(ge){for(var ie=ge.length,Se=new Array(ie),Ee=0;Ee0){var mt=this.triShader;mt.bind(),mt.uniforms=me,this.triangleVAO.bind(),ie.drawArrays(ie.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var mt=this.lineShader;mt.bind(),mt.uniforms=me,this.edgeVAO.bind(),ie.lineWidth(this.lineWidth*this.pixelRatio),ie.drawArrays(ie.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var mt=this.pointShader;mt.bind(),mt.uniforms=me,this.pointVAO.bind(),ie.drawArrays(ie.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var mt=this.contourShader;mt.bind(),mt.uniforms=me,this.contourVAO.bind(),ie.drawArrays(ie.LINES,0,this.contourCount),this.contourVAO.unbind()}},U.drawPick=function(ge){ge=ge||{};for(var ie=this.gl,Se=ge.model||z,Ee=ge.view||z,we=ge.projection||z,De=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],Le=0;Le<3;++Le)De[0][Le]=Math.max(De[0][Le],this.clipBounds[0][Le]),De[1][Le]=Math.min(De[1][Le],this.clipBounds[1][Le]);this._model=[].slice.call(Se),this._view=[].slice.call(Ee),this._projection=[].slice.call(we),this._resolution=[ie.drawingBufferWidth,ie.drawingBufferHeight];var me={model:Se,view:Ee,projection:we,clipBounds:De,pickId:this.pickId/255},Pe=this.pickShader;if(Pe.bind(),Pe.uniforms=me,this.triangleCount>0&&(this.triangleVAO.bind(),ie.drawArrays(ie.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),ie.lineWidth(this.lineWidth*this.pixelRatio),ie.drawArrays(ie.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var Pe=this.pointPickShader;Pe.bind(),Pe.uniforms=me,this.pointVAO.bind(),ie.drawArrays(ie.POINTS,0,this.pointCount),this.pointVAO.unbind()}},U.pick=function(ge){if(!ge||ge.id!==this.pickId)return null;for(var ie=ge.value[0]+256*ge.value[1]+65536*ge.value[2],Se=this.cells[ie],Ee=this.positions,we=new Array(Se.length),De=0;DeMath.abs(g))p.rotate(z,0,0,-S*P*Math.PI*x.rotateSpeed/window.innerWidth);else if(!x._ortho){var q=-x.zoomSpeed*E*g/window.innerHeight*(z-p.lastT())/20;p.pan(z,0,0,M*(Math.exp(q)-1))}}},!0)},x.enableMouseListeners(),x}},799:function(i,a,o){var s=o(3236),l=o(9405),u=s([`precision mediump float; #define GLSLIFY 1 - -attribute vec4 uv; -attribute vec3 f; -attribute vec3 normal; - -uniform vec3 objectOffset; -uniform mat4 model, view, projection, inverseModel; -uniform vec3 lightPosition, eyePosition; -uniform sampler2D colormap; - -varying float value, kill; -varying vec3 worldCoordinate; -varying vec2 planeCoordinate; -varying vec3 lightDirection, eyeDirection, surfaceNormal; -varying vec4 vColor; - +attribute vec2 position; +varying vec2 uv; void main() { - vec3 localCoordinate = vec3(uv.zw, f.x); - worldCoordinate = objectOffset + localCoordinate; - mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0)); - vec4 worldPosition = (model * objectOffsetTranslation) * vec4(localCoordinate, 1.0); - vec4 clipPosition = projection * (view * worldPosition); - gl_Position = clipPosition; - kill = f.y; - value = f.z; - planeCoordinate = uv.xy; + uv = position; + gl_Position = vec4(position, 0, 1); +}`]),c=s([`precision mediump float; +#define GLSLIFY 1 - vColor = texture2D(colormap, vec2(value, value)); +uniform sampler2D accumBuffer; +varying vec2 uv; - //Lighting geometry parameters - vec4 cameraCoordinate = view * worldPosition; - cameraCoordinate.xyz /= cameraCoordinate.w; - lightDirection = lightPosition - cameraCoordinate.xyz; - eyeDirection = eyePosition - cameraCoordinate.xyz; - surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz); -} -`]),c=l([`precision highp float; +void main() { + vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0)); + gl_FragColor = min(vec4(1,1,1,1), accum); +}`]);i.exports=function(f){return l(f,u,c,null,[{name:"position",type:"vec2"}])}},4100:function(i,a,o){"use strict";var s=o(4437),l=o(3837),u=o(5445),c=o(4449),f=o(3589),h=o(2260),d=o(7169),v=o(351),m=o(4772),b=o(4040),p=o(799),k=o(9216)({tablet:!0,featureDetect:!0});i.exports={createScene:C,createCamera:s};function M(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function T(g,P){var E=null;try{E=g.getContext("webgl",P),E||(E=g.getContext("experimental-webgl",P))}catch(z){return null}return E}function L(g){var P=Math.round(Math.log(Math.abs(g))/Math.log(10));if(P<0){var E=Math.round(Math.pow(10,-P));return Math.ceil(g*E)/E}else if(P>0){var E=Math.round(Math.pow(10,P));return Math.ceil(g/E)*E}return Math.ceil(g)}function x(g){return typeof g=="boolean"?g:!0}function C(g){g=g||{},g.camera=g.camera||{};var P=g.canvas;if(!P)if(P=document.createElement("canvas"),g.container){var E=g.container;E.appendChild(P)}else document.body.appendChild(P);var z=g.gl;if(z||(g.glOptions&&(k=!!g.glOptions.preserveDrawingBuffer),z=T(P,g.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:k})),!z)throw new Error("webgl not supported");var q=g.bounds||[[-10,-10,-10],[10,10,10]],U=new M,G=h(z,z.drawingBufferWidth,z.drawingBufferHeight,{preferFloat:!k}),Z=p(z),j=g.cameraObject&&g.cameraObject._ortho===!0||g.camera.projection&&g.camera.projection.type==="orthographic"||!1,N={eye:g.camera.eye||[2,0,0],center:g.camera.center||[0,0,0],up:g.camera.up||[0,1,0],zoomMin:g.camera.zoomMax||.1,zoomMax:g.camera.zoomMin||100,mode:g.camera.mode||"turntable",_ortho:j},H=g.axes||{},re=l(z,H);re.enable=!H.disable;var oe=g.spikes||{},_e=c(z,oe),ke=[],Ce=[],ge=[],ie=[],Se=!0,Le=!0,Ee=new Array(16),we=new Array(16),De={view:null,projection:Ee,model:we,_ortho:!1},Le=!0,me=[z.drawingBufferWidth,z.drawingBufferHeight],Pe=g.cameraObject||s(P,N),ce={gl:z,contextLost:!1,pixelRatio:g.pixelRatio||1,canvas:P,selection:U,camera:Pe,axes:re,axesPixels:null,spikes:_e,bounds:q,objects:ke,shape:me,aspect:g.aspectRatio||[1,1,1],pickRadius:g.pickRadius||10,zNear:g.zNear||.01,zFar:g.zFar||1e3,fovy:g.fovy||Math.PI/4,clearColor:g.clearColor||[0,0,0,0],autoResize:x(g.autoResize),autoBounds:x(g.autoBounds),autoScale:!!g.autoScale,autoCenter:x(g.autoCenter),clipToBounds:x(g.clipToBounds),snapToData:!!g.snapToData,onselect:g.onselect||null,onrender:g.onrender||null,onclick:g.onclick||null,cameraParams:De,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(tt){this.aspect[0]=tt.x,this.aspect[1]=tt.y,this.aspect[2]=tt.z,Le=!0},setBounds:function(tt,je){this.bounds[0][tt]=je.min,this.bounds[1][tt]=je.max},setClearColor:function(tt){this.clearColor=tt},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},He=[z.drawingBufferWidth/ce.pixelRatio|0,z.drawingBufferHeight/ce.pixelRatio|0];function lt(){if(!ce._stopped&&ce.autoResize){var tt=P.parentNode,je=1,Ue=1;tt&&tt!==document.body?(je=tt.clientWidth,Ue=tt.clientHeight):(je=window.innerWidth,Ue=window.innerHeight);var Ae=Math.ceil(je*ce.pixelRatio)|0,rt=Math.ceil(Ue*ce.pixelRatio)|0;if(Ae!==P.width||rt!==P.height){P.width=Ae,P.height=rt;var St=P.style;St.position=St.position||"absolute",St.left="0px",St.top="0px",St.width=je+"px",St.height=Ue+"px",Se=!0}}}ce.autoResize&<(),window.addEventListener("resize",lt);function mt(){for(var tt=ke.length,je=ie.length,Ue=0;Ue0&&ge[je-1]===0;)ge.pop(),ie.pop().dispose()}ce.update=function(tt){ce._stopped||(tt=tt||{},Se=!0,Le=!0)},ce.add=function(tt){ce._stopped||(tt.axes=re,ke.push(tt),Ce.push(-1),Se=!0,Le=!0,mt())},ce.remove=function(tt){if(!ce._stopped){var je=ke.indexOf(tt);je<0||(ke.splice(je,1),Ce.pop(),Se=!0,Le=!0,mt())}},ce.dispose=function(){if(!ce._stopped&&(ce._stopped=!0,window.removeEventListener("resize",lt),P.removeEventListener("webglcontextlost",Vt),ce.mouseListener.enabled=!1,!ce.contextLost)){re.dispose(),_e.dispose();for(var tt=0;ttU.distance)continue;for(var pt=0;pt1e-6?(k=Math.acos(M),T=Math.sin(k),L=Math.sin((1-u)*k)/T,x=Math.sin(u*k)/T):(L=1-u,x=u),o[0]=L*c+x*v,o[1]=L*f+x*m,o[2]=L*h+x*b,o[3]=L*d+x*p,o}},5964:function(i){"use strict";i.exports=function(a){return!a&&a!==0?"":a.toString()}},9366:function(i,a,o){"use strict";var s=o(4359);i.exports=u;var l={};function u(c,f,h){var d=[f.style,f.weight,f.variant,f.family].join("_"),v=l[d];if(v||(v=l[d]={}),c in v)return v[c];var m={textAlign:"center",textBaseline:"middle",lineHeight:1,font:f.family,fontStyle:f.style,fontWeight:f.weight,fontVariant:f.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};m.triangles=!0;var b=s(c,m);m.triangles=!1;var p=s(c,m),k,M;if(h&&h!==1){for(k=0;k max(a, b)) || - (p < min(a, b))); -} - -bool outOfRange(vec2 a, vec2 b, vec2 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y)); -} - -bool outOfRange(vec3 a, vec3 b, vec3 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y) || - outOfRange(a.z, b.z, p.z)); -} - -bool outOfRange(vec4 a, vec4 b, vec4 p) { - return outOfRange(a.xyz, b.xyz, p.xyz); -} - -uniform vec3 lowerBound, upperBound; -uniform float contourTint; -uniform vec4 contourColor; -uniform sampler2D colormap; -uniform vec3 clipBounds[2]; -uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; -uniform float vertexColor; - -varying float value, kill; -varying vec3 worldCoordinate; -varying vec3 lightDirection, eyeDirection, surfaceNormal; -varying vec4 vColor; - -void main() { - if ( - kill > 0.0 || - vColor.a == 0.0 || - outOfRange(clipBounds[0], clipBounds[1], worldCoordinate) - ) discard; - - vec3 N = normalize(surfaceNormal); - vec3 V = normalize(eyeDirection); - vec3 L = normalize(lightDirection); - - if(gl_FrontFacing) { - N = -N; - } - - float specular = max(beckmannSpecular(L, V, N, roughness), 0.); - float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); - - //decide how to interpolate color \u2014 in vertex or in fragment - vec4 surfaceColor = - step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) + - step(.5, vertexColor) * vColor; - - vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); - - gl_FragColor = mix(litColor, contourColor, contourTint) * opacity; -} -`]),f=l([`precision highp float; -#define GLSLIFY 1 - -attribute vec4 uv; -attribute float f; - -uniform vec3 objectOffset; -uniform mat3 permutation; -uniform mat4 model, view, projection; -uniform float height, zOffset; -uniform sampler2D colormap; - -varying float value, kill; -varying vec3 worldCoordinate; -varying vec2 planeCoordinate; -varying vec3 lightDirection, eyeDirection, surfaceNormal; -varying vec4 vColor; - -void main() { - vec3 dataCoordinate = permutation * vec3(uv.xy, height); - worldCoordinate = objectOffset + dataCoordinate; - mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0)); - vec4 worldPosition = (model * objectOffsetTranslation) * vec4(dataCoordinate, 1.0); - - vec4 clipPosition = projection * (view * worldPosition); - clipPosition.z += zOffset; - - gl_Position = clipPosition; - value = f + objectOffset.z; - kill = -1.0; - planeCoordinate = uv.zw; - - vColor = texture2D(colormap, vec2(value, value)); - - //Don't do lighting for contours - surfaceNormal = vec3(1,0,0); - eyeDirection = vec3(0,1,0); - lightDirection = vec3(0,0,1); -} -`]),h=l([`precision highp float; -#define GLSLIFY 1 - -bool outOfRange(float a, float b, float p) { - return ((p > max(a, b)) || - (p < min(a, b))); -} - -bool outOfRange(vec2 a, vec2 b, vec2 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y)); -} - -bool outOfRange(vec3 a, vec3 b, vec3 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y) || - outOfRange(a.z, b.z, p.z)); -} - -bool outOfRange(vec4 a, vec4 b, vec4 p) { - return outOfRange(a.xyz, b.xyz, p.xyz); -} - -uniform vec2 shape; -uniform vec3 clipBounds[2]; -uniform float pickId; - -varying float value, kill; -varying vec3 worldCoordinate; -varying vec2 planeCoordinate; -varying vec3 surfaceNormal; - -vec2 splitFloat(float v) { - float vh = 255.0 * v; - float upper = floor(vh); - float lower = fract(vh); - return vec2(upper / 255.0, floor(lower * 16.0) / 16.0); -} - -void main() { - if ((kill > 0.0) || - (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard; - - vec2 ux = splitFloat(planeCoordinate.x / shape.x); - vec2 uy = splitFloat(planeCoordinate.y / shape.y); - gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0)); -} -`]);a.createShader=function(d){var v=s(d,u,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v.attributes.normal.location=2,v},a.createPickShader=function(d){var v=s(d,u,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v.attributes.normal.location=2,v},a.createContourShader=function(d){var v=s(d,f,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v},a.createPickContourShader=function(d){var v=s(d,f,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return v.attributes.uv.location=0,v.attributes.f.location=1,v}},1085:function(i,a,o){var s=o(1371);i.exports=l;function l(u,c,f){c=typeof c=="number"?c:1,f=f||": ";var h=u.split(/\r?\n/),d=String(h.length+c-1).length;return h.map(function(v,_){var b=_+c,p=String(b).length,k=s(b,d-p);return k+f+v}).join(` -`)}},1091:function(i){i.exports=a;function a(){var o=new Float32Array(3);return o[0]=0,o[1]=0,o[2]=0,o}},1125:function(i,a,o){"use strict";i.exports=u;var s=o(3250)[3];function l(c,f,h,d){for(var v=0;v<2;++v){var _=c[v],b=f[v],p=Math.min(_,b),k=Math.max(_,b),E=h[v],T=d[v],L=Math.min(E,T),x=Math.max(E,T);if(x0&&_>0||v<0&&_<0)return!1;var b=s(h,c,f),p=s(d,c,f);return b>0&&p>0||b<0&&p<0?!1:v===0&&_===0&&b===0&&p===0?l(c,f,h,d):!0}},1278:function(i,a,o){"use strict";var s=o(2361),l=Math.pow(2,-1074),u=-1>>>0;i.exports=c;function c(f,h){if(isNaN(f)||isNaN(h))return NaN;if(f===h)return f;if(f===0)return h<0?-l:l;var d=s.hi(f),v=s.lo(f);return h>f==f>0?v===u?(d+=1,v=0):v+=1:v===0?(v=u,d-=1):v-=1,s.pack(v,d)}},1283:function(i,a,o){var s=o(9405),l=o(3236),u=l([`precision highp float; -#define GLSLIFY 1 - -bool outOfRange(float a, float b, float p) { - return ((p > max(a, b)) || - (p < min(a, b))); +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { @@ -1265,7 +1496,9 @@ void main() { if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard; gl_FragColor = vec4(pickGroup, pickId.bgr); -}`]),v=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],_={vertex:u,fragment:h,attributes:v},b={vertex:c,fragment:h,attributes:v},p={vertex:f,fragment:h,attributes:v},k={vertex:u,fragment:d,attributes:v},E={vertex:c,fragment:d,attributes:v},T={vertex:f,fragment:d,attributes:v};function L(x,C){var M=s(x,C),g=M.attributes;return g.position.location=0,g.color.location=1,g.glyph.location=2,g.id.location=3,M}a.createPerspective=function(x){return L(x,_)},a.createOrtho=function(x){return L(x,b)},a.createProject=function(x){return L(x,p)},a.createPickPerspective=function(x){return L(x,k)},a.createPickOrtho=function(x){return L(x,E)},a.createPickProject=function(x){return L(x,T)}},1303:function(i,a,o){"use strict";i.exports=u;var s=o(3250);function l(c,f){var h,d;if(f[0][0]f[1][0])h=f[1],d=f[0];else{var v=Math.min(c[0][1],c[1][1]),_=Math.max(c[0][1],c[1][1]),b=Math.min(f[0][1],f[1][1]),p=Math.max(f[0][1],f[1][1]);return _p?v-p:_-p}var k,E;c[0][1]f[1][0])h=f[1],d=f[0];else return l(f,c);var v,_;if(c[0][0]c[1][0])v=c[1],_=c[0];else return-l(c,f);var b=s(h,d,_),p=s(h,d,v);if(b<0){if(p<=0)return b}else if(b>0){if(p>=0)return b}else if(p)return p;if(b=s(_,v,d),p=s(_,v,h),b<0){if(p<=0)return b}else if(b>0){if(p>=0)return b}else if(p)return p;return d[0]-_[0]}},1318:function(i){"use strict";i.exports=a;function a(o,s){return o[0].mul(s[1]).cmp(s[0].mul(o[1]))}},1338:function(i){"use strict";function a(l,u,c){var f=l[c]|0;if(f<=0)return[];var h=new Array(f),d;if(c===l.length-1)for(d=0;d0)return o(l|0,u);break;case"object":if(typeof l.length=="number")return a(l,u,0);break}return[]}i.exports=s},1369:function(i,a,o){"use strict";var s=o(5716);i.exports=l;function l(u){var c=u.length,f=u.words,h=0;if(c===1)h=f[0];else if(c===2)h=f[0]+f[1]*67108864;else for(var d=0;du)throw new Error("gl-vao: Too many vertex attributes");for(var c=0;c1?1:we}function S(we,De,Le,me,Pe,ce,He,lt,mt,Vt,st,ct){this.gl=we,this.pixelRatio=1,this.shader=De,this.orthoShader=Le,this.projectShader=me,this.pointBuffer=Pe,this.colorBuffer=ce,this.glyphBuffer=He,this.idBuffer=lt,this.vao=mt,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[.6666666666666666,.6666666666666666,.6666666666666666],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=Vt,this.pickOrthoShader=st,this.pickProjectShader=ct,this.points=[],this._selectResult=new x(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}var g=S.prototype;g.pickSlots=1,g.setPickBase=function(we){this.pickId=we},g.isTransparent=function(){if(this.hasAlpha)return!0;for(var we=0;we<3;++we)if(this.axesProject[we]&&this.projectHasAlpha)return!0;return!1},g.isOpaque=function(){if(!this.hasAlpha)return!0;for(var we=0;we<3;++we)if(this.axesProject[we]&&!this.projectHasAlpha)return!0;return!1};var P=[0,0],E=[0,0,0],z=[0,0,0],q=[0,0,0,1],U=[0,0,0,1],G=m.slice(),Z=[0,0,0],j=[[0,0,0],[0,0,0]];function N(we){return we[0]=we[1]=we[2]=0,we}function H(we,De){return we[0]=De[0],we[1]=De[1],we[2]=De[2],we[3]=1,we}function re(we,De,Le,me){return we[0]=De[0],we[1]=De[1],we[2]=De[2],we[Le]=me,we}function oe(we){for(var De=j,Le=0;Le<2;++Le)for(var me=0;me<3;++me)De[Le][me]=Math.max(Math.min(we[Le][me],1e8),-1e8);return De}function _e(we,De,Le,me){var Pe=De.axesProject,ce=De.gl,He=we.uniforms,lt=Le.model||m,mt=Le.view||m,Vt=Le.projection||m,st=De.axesBounds,ct=oe(De.clipBounds),Qt;De.axes&&De.axes.lastCubeProps?Qt=De.axes.lastCubeProps.axis:Qt=[1,1,1],P[0]=2/ce.drawingBufferWidth,P[1]=2/ce.drawingBufferHeight,we.bind(),He.view=mt,He.projection=Vt,He.screenSize=P,He.highlightId=De.highlightId,He.highlightScale=De.highlightScale,He.clipBounds=ct,He.pickGroup=De.pickId/255,He.pixelRatio=me;for(var Ht=0;Ht<3;++Ht)if(Pe[Ht]){He.scale=De.projectScale[Ht],He.opacity=De.projectOpacity[Ht];for(var nr=G,tt=0;tt<16;++tt)nr[tt]=0;for(var tt=0;tt<4;++tt)nr[5*tt]=1;nr[5*Ht]=0,Qt[Ht]<0?nr[12+Ht]=st[0][Ht]:nr[12+Ht]=st[1][Ht],f(nr,lt,nr),He.model=nr;var je=(Ht+1)%3,Ue=(Ht+2)%3,Ae=N(E),rt=N(z);Ae[je]=1,rt[Ue]=1;var St=L(Vt,mt,lt,H(q,Ae)),Tt=L(Vt,mt,lt,H(U,rt));if(Math.abs(St[1])>Math.abs(Tt[1])){var dt=St;St=Tt,Tt=dt,dt=Ae,Ae=rt,rt=dt;var Et=je;je=Ue,Ue=Et}St[0]<0&&(Ae[je]=-1),Tt[1]>0&&(rt[Ue]=-1);for(var pt=0,Xt=0,tt=0;tt<4;++tt)pt+=Math.pow(lt[4*je+tt],2),Xt+=Math.pow(lt[4*Ue+tt],2);Ae[je]/=Math.sqrt(pt),rt[Ue]/=Math.sqrt(Xt),He.axes[0]=Ae,He.axes[1]=rt,He.fragClipBounds[0]=re(Z,ct[0],Ht,-1e8),He.fragClipBounds[1]=re(Z,ct[1],Ht,1e8),De.vao.bind(),De.vao.draw(ce.TRIANGLES,De.vertexCount),De.lineWidth>0&&(ce.lineWidth(De.lineWidth*me),De.vao.draw(ce.LINES,De.lineVertexCount,De.vertexCount)),De.vao.unbind()}}var ke=[-1e8,-1e8,-1e8],Ce=[1e8,1e8,1e8],ge=[ke,Ce];function ie(we,De,Le,me,Pe,ce,He){var lt=Le.gl;if((ce===Le.projectHasAlpha||He)&&_e(De,Le,me,Pe),ce===Le.hasAlpha||He){we.bind();var mt=we.uniforms;mt.model=me.model||m,mt.view=me.view||m,mt.projection=me.projection||m,P[0]=2/lt.drawingBufferWidth,P[1]=2/lt.drawingBufferHeight,mt.screenSize=P,mt.highlightId=Le.highlightId,mt.highlightScale=Le.highlightScale,mt.fragClipBounds=ge,mt.clipBounds=Le.axes.bounds,mt.opacity=Le.opacity,mt.pickGroup=Le.pickId/255,mt.pixelRatio=Pe,Le.vao.bind(),Le.vao.draw(lt.TRIANGLES,Le.vertexCount),Le.lineWidth>0&&(lt.lineWidth(Le.lineWidth*Pe),Le.vao.draw(lt.LINES,Le.lineVertexCount,Le.vertexCount)),Le.vao.unbind()}}g.draw=function(we){var De=this.useOrtho?this.orthoShader:this.shader;ie(De,this.projectShader,this,we,this.pixelRatio,!1,!1)},g.drawTransparent=function(we){var De=this.useOrtho?this.orthoShader:this.shader;ie(De,this.projectShader,this,we,this.pixelRatio,!0,!1)},g.drawPick=function(we){var De=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;ie(De,this.pickProjectShader,this,we,1,!0,!0)},g.pick=function(we){if(!we||we.id!==this.pickId)return null;var De=we.value[2]+(we.value[1]<<8)+(we.value[0]<<16);if(De>=this.pointCount||De<0)return null;var Le=this.points[De],me=this._selectResult;me.index=De;for(var Pe=0;Pe<3;++Pe)me.position[Pe]=me.dataCoordinate[Pe]=Le[Pe];return me},g.highlight=function(we){if(!we)this.highlightId=[1,1,1,1];else{var De=we.index,Le=De&255,me=De>>8&255,Pe=De>>16&255;this.highlightId=[Le/255,me/255,Pe/255,0]}};function Se(we,De,Le,me){var Pe;M(we)?De0){var jr=0,gt=Ue,Ge=[0,0,0,1],Je=[0,0,0,1],We=M(Qt)&&M(Qt[0]),et=M(tt)&&M(tt[0]);e:for(var me=0;me0?1-Xt[0][0]:Ir<0?1+Xt[1][0]:1,Yr*=Yr>0?1-Xt[0][1]:Yr<0?1+Xt[1][1]:1;for(var _i=[Ir,Yr],Fn=Et.cells||[],An=Et.positions||[],Tt=0;Ttthis.buffer.length){l.free(this.buffer);for(var M=this.buffer=l.mallocUint8(c(k*p*4)),T=0;TM)for(p=M;pk)for(p=k;p=0){for(var j=Z.type.charAt(Z.type.length-1)|0,N=new Array(j),H=0;H=0;)re+=1;U[G]=re}var oe=new Array(M.length);function _e(){x.program=c.program(C,x._vref,x._fref,q,U);for(var ke=0;ke=0){var g=C.charCodeAt(C.length-1)-48;if(g<2||g>4)throw new s("","Invalid data type for attribute "+x+": "+C);f(v,m,S[0],p,g,k,x)}else if(C.indexOf("mat")>=0){var g=C.charCodeAt(C.length-1)-48;if(g<2||g>4)throw new s("","Invalid data type for attribute "+x+": "+C);h(v,m,S,p,g,k,x)}else throw new s("","Unknown data type for attribute "+x+": "+C);break}}return k}},3327:function(i,a,o){"use strict";var s=o(216),l=o(8866);i.exports=f;function u(h){return function(){return h}}function c(h,d){for(var v=new Array(h),m=0;m4)throw new l("","Invalid data type");switch(re.charAt(0)){case"b":case"i":h["uniform"+oe+"iv"](m[U],G);break;case"v":h["uniform"+oe+"fv"](m[U],G);break;default:throw new l("","Unrecognized data type for vector "+name+": "+re)}}else if(re.indexOf("mat")===0&&re.length===4){if(oe=re.charCodeAt(re.length-1)-48,oe<2||oe>4)throw new l("","Invalid uniform dimension type for matrix "+name+": "+re);h["uniformMatrix"+oe+"fv"](m[U],!1,G);break}else throw new l("","Unknown uniform data type for "+name+": "+re)}}}}}function k(C,S){if(typeof S!="object")return[[C,S]];var g=[];for(var P in S){var E=S[P],z=C;parseInt(P)+""===P?z+="["+P+"]":z+="."+P,typeof E=="object"?g.push.apply(g,k(z,E)):g.push([z,E])}return g}function M(C){switch(C){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var S=C.indexOf("vec");if(0<=S&&S<=1&&C.length===4+S){var g=C.charCodeAt(C.length-1)-48;if(g<2||g>4)throw new l("","Invalid data type");return C.charAt(0)==="b"?c(g,!1):c(g,0)}else if(C.indexOf("mat")===0&&C.length===4){var g=C.charCodeAt(C.length-1)-48;if(g<2||g>4)throw new l("","Invalid uniform dimension type for matrix "+name+": "+C);return c(g*g,0)}else throw new l("","Unknown uniform data type for "+name+": "+C)}}function T(C,S,g){if(typeof g=="object"){var P=L(g);Object.defineProperty(C,S,{get:u(P),set:p(g),enumerable:!0,configurable:!1})}else m[g]?Object.defineProperty(C,S,{get:b(g),set:p(g),enumerable:!0,configurable:!1}):C[S]=M(v[g].type)}function L(C){var S;if(Array.isArray(C)){S=new Array(C.length);for(var g=0;g1){v[0]in h||(h[v[0]]=[]),h=h[v[0]];for(var m=1;m1)for(var k=0;k=0?z[re]:H)}function G(N){var H=L(N);return H?O in H:A.indexOf(N)>=0}function Z(N,H){var re,oe=L(N);return oe?oe[O]=H:(re=A.indexOf(N),re>=0?z[re]=H:(re=A.length,z[re]=H,A[re]=N)),this}function j(N){var H=L(N),re,oe;return H?O in H&&delete H[O]:(re=A.indexOf(N),re<0?!1:(oe=A.length-1,A[re]=void 0,z[re]=z[oe],A[re]=A[oe],A.length=oe,z.length=oe,!0))}return Object.create(P.prototype,{get___:{value:x(U)},has___:{value:x(G)},set___:{value:x(Z)},delete___:{value:x(j)}})};P.prototype=Object.create(Object.prototype,{get:{value:function(z,O){return this.get___(z,O)},writable:!0,configurable:!0},has:{value:function(z){return this.has___(z)},writable:!0,configurable:!0},set:{value:function(z,O){return this.set___(z,O)},writable:!0,configurable:!0},delete:{value:function(z){return this.delete___(z)},writable:!0,configurable:!0}}),typeof l=="function"?function(){s&&typeof Proxy!="undefined"&&(Proxy=void 0);function A(){this instanceof P||M();var z=new l,O=void 0,U=!1;function G(H,re){return O?z.has(H)?z.get(H):O.get___(H,re):z.get(H,re)}function Z(H){return z.has(H)||(O?O.has___(H):!1)}var j;s?j=function(H,re){return z.set(H,re),z.has(H)||(O||(O=new P),O.set(H,re)),this}:j=function(H,re){if(U)try{z.set(H,re)}catch(oe){O||(O=new P),O.set___(H,re)}else z.set(H,re);return this};function N(H){var re=!!z.delete(H);return O&&O.delete___(H)||re}return Object.create(P.prototype,{get___:{value:x(G)},has___:{value:x(Z)},set___:{value:x(j)},delete___:{value:x(N)},permitHostObjects___:{value:x(function(H){if(H===o)U=!0;else throw new Error("bogus call to permitHostObjects___")})}})}A.prototype=P.prototype,i.exports=A,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy!="undefined"&&(Proxy=void 0),i.exports=P)})()},1570:function(i){"use strict";i.exports=o;var a=[function(){function l(c,f,h,d){for(var v=Math.min(h,d)|0,_=Math.max(h,d)|0,b=c[2*v],p=c[2*v+1];b>1,E=f[2*k+1];if(E===_)return k;_>1,E=f[2*k+1];if(E===_)return k;_>1,E=f[2*k+1];if(E===_)return k;_>1,E=f[2*k+1];if(E===_)return k;_ HALF_PI) && (b <= ONE_AND_HALF_PI)) ? - b - PI : - b; -} - -float look_horizontal_or_vertical(float a, float ratio) { - // ratio controls the ratio between being horizontal to (vertical + horizontal) - // if ratio is set to 0.5 then it is 50%, 50%. - // when using a higher ratio e.g. 0.75 the result would - // likely be more horizontal than vertical. - - float b = positive_angle(a); - - return - (b < ( ratio) * HALF_PI) ? 0.0 : - (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI : - (b < (2.0 + ratio) * HALF_PI) ? 0.0 : - (b < (4.0 - ratio) * HALF_PI) ? HALF_PI : - 0.0; -} - -float roundTo(float a, float b) { - return float(b * floor((a + 0.5 * b) / b)); -} - -float look_round_n_directions(float a, int n) { - float b = positive_angle(a); - float div = TWO_PI / float(n); - float c = roundTo(b, div); - return look_upwards(c); -} - -float applyAlignOption(float rawAngle, float delta) { - return - (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions - (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical - (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis - (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards - (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal - rawAngle; // otherwise return back raw input angle -} - -bool isAxisTitle = (axis.x == 0.0) && - (axis.y == 0.0) && - (axis.z == 0.0); - -void main() { - //Compute world offset - float axisDistance = position.z; - vec3 dataPosition = axisDistance * axis + offset; - - float beta = angle; // i.e. user defined attributes for each tick - - float axisAngle; - float clipAngle; - float flip; - - if (enableAlign) { - axisAngle = (isAxisTitle) ? HALF_PI : - computeViewAngle(dataPosition, dataPosition + axis); - clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir); - - axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0; - clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0; - - flip = (dot(vec2(cos(axisAngle), sin(axisAngle)), - vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0; - - beta += applyAlignOption(clipAngle, flip * PI); - } - - //Compute plane offset - vec2 planeCoord = position.xy * pixelScale; - - mat2 planeXform = scale * mat2( - cos(beta), sin(beta), - -sin(beta), cos(beta) - ); - - vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution; - - //Compute clip position - vec3 clipPosition = project(dataPosition); - - //Apply text offset in clip coordinates - clipPosition += vec3(viewOffset, 0.0); - - //Done - gl_Position = vec4(clipPosition, 1.0); -} -`]),h=s([`precision highp float; -#define GLSLIFY 1 - -uniform vec4 color; -void main() { - gl_FragColor = color; -}`]);a.Q=function(_){return l(_,f,h,null,[{name:"position",type:"vec3"}])};var d=s([`precision highp float; -#define GLSLIFY 1 - -attribute vec3 position; -attribute vec3 normal; - -uniform mat4 model, view, projection; -uniform vec3 enable; -uniform vec3 bounds[2]; - -varying vec3 colorChannel; - -void main() { - - vec3 signAxis = sign(bounds[1] - bounds[0]); - - vec3 realNormal = signAxis * normal; - - if(dot(realNormal, enable) > 0.0) { - vec3 minRange = min(bounds[0], bounds[1]); - vec3 maxRange = max(bounds[0], bounds[1]); - vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0)); - gl_Position = projection * (view * (model * vec4(nPosition, 1.0))); - } else { - gl_Position = vec4(0,0,0,0); - } - - colorChannel = abs(realNormal); -} -`]),v=s([`precision highp float; -#define GLSLIFY 1 - -uniform vec4 colors[3]; - -varying vec3 colorChannel; - -void main() { - gl_FragColor = colorChannel.x * colors[0] + - colorChannel.y * colors[1] + - colorChannel.z * colors[2]; -}`]);a.bg=function(_){return l(_,d,v,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},1888:function(i,a,o){"use strict";var s=o(8828),l=o(1338),u=o(4793).hp;o.g.__TYPEDARRAY_POOL||(o.g.__TYPEDARRAY_POOL={UINT8:l([32,0]),UINT16:l([32,0]),UINT32:l([32,0]),BIGUINT64:l([32,0]),INT8:l([32,0]),INT16:l([32,0]),INT32:l([32,0]),BIGINT64:l([32,0]),FLOAT:l([32,0]),DOUBLE:l([32,0]),DATA:l([32,0]),UINT8C:l([32,0]),BUFFER:l([32,0])});var c=typeof Uint8ClampedArray!="undefined",f=typeof BigUint64Array!="undefined",h=typeof BigInt64Array!="undefined",d=o.g.__TYPEDARRAY_POOL;d.UINT8C||(d.UINT8C=l([32,0])),d.BIGUINT64||(d.BIGUINT64=l([32,0])),d.BIGINT64||(d.BIGINT64=l([32,0])),d.BUFFER||(d.BUFFER=l([32,0]));var v=d.DATA,_=d.BUFFER;a.free=function(j){if(u.isBuffer(j))_[s.log2(j.length)].push(j);else{if(Object.prototype.toString.call(j)!=="[object ArrayBuffer]"&&(j=j.buffer),!j)return;var N=j.length||j.byteLength,H=s.log2(N)|0;v[H].push(j)}};function b(Z){if(Z){var j=Z.length||Z.byteLength,N=s.log2(j);v[N].push(Z)}}function p(Z){b(Z.buffer)}a.freeUint8=a.freeUint16=a.freeUint32=a.freeBigUint64=a.freeInt8=a.freeInt16=a.freeInt32=a.freeBigInt64=a.freeFloat32=a.freeFloat=a.freeFloat64=a.freeDouble=a.freeUint8Clamped=a.freeDataView=p,a.freeArrayBuffer=b,a.freeBuffer=function(j){_[s.log2(j.length)].push(j)},a.malloc=function(j,N){if(N===void 0||N==="arraybuffer")return k(j);switch(N){case"uint8":return E(j);case"uint16":return T(j);case"uint32":return L(j);case"int8":return x(j);case"int16":return C(j);case"int32":return M(j);case"float":case"float32":return g(j);case"double":case"float64":return P(j);case"uint8_clamped":return A(j);case"bigint64":return O(j);case"biguint64":return z(j);case"buffer":return G(j);case"data":case"dataview":return U(j);default:return null}return null};function k(j){var j=s.nextPow2(j),N=s.log2(j),H=v[N];return H.length>0?H.pop():new ArrayBuffer(j)}a.mallocArrayBuffer=k;function E(Z){return new Uint8Array(k(Z),0,Z)}a.mallocUint8=E;function T(Z){return new Uint16Array(k(2*Z),0,Z)}a.mallocUint16=T;function L(Z){return new Uint32Array(k(4*Z),0,Z)}a.mallocUint32=L;function x(Z){return new Int8Array(k(Z),0,Z)}a.mallocInt8=x;function C(Z){return new Int16Array(k(2*Z),0,Z)}a.mallocInt16=C;function M(Z){return new Int32Array(k(4*Z),0,Z)}a.mallocInt32=M;function g(Z){return new Float32Array(k(4*Z),0,Z)}a.mallocFloat32=a.mallocFloat=g;function P(Z){return new Float64Array(k(8*Z),0,Z)}a.mallocFloat64=a.mallocDouble=P;function A(Z){return c?new Uint8ClampedArray(k(Z),0,Z):E(Z)}a.mallocUint8Clamped=A;function z(Z){return f?new BigUint64Array(k(8*Z),0,Z):null}a.mallocBigUint64=z;function O(Z){return h?new BigInt64Array(k(8*Z),0,Z):null}a.mallocBigInt64=O;function U(Z){return new DataView(k(Z),0,Z)}a.mallocDataView=U;function G(Z){Z=s.nextPow2(Z);var j=s.log2(Z),N=_[j];return N.length>0?N.pop():new u(Z)}a.mallocBuffer=G,a.clearCache=function(){for(var j=0;j<32;++j)d.UINT8[j].length=0,d.UINT16[j].length=0,d.UINT32[j].length=0,d.INT8[j].length=0,d.INT16[j].length=0,d.INT32[j].length=0,d.FLOAT[j].length=0,d.DOUBLE[j].length=0,d.BIGUINT64[j].length=0,d.BIGINT64[j].length=0,d.UINT8C[j].length=0,v[j].length=0,_[j].length=0}},1903:function(i){i.exports=a;function a(o){var s=new Float32Array(16);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s[3]=o[3],s[4]=o[4],s[5]=o[5],s[6]=o[6],s[7]=o[7],s[8]=o[8],s[9]=o[9],s[10]=o[10],s[11]=o[11],s[12]=o[12],s[13]=o[13],s[14]=o[14],s[15]=o[15],s}},1944:function(i,a,o){"use strict";var s=o(5250),l=o(8210);i.exports=u;function u(c,f){for(var h=s(c[0],f[0]),d=1;d>1,G=h(g[U],P);G<=0?(G===0&&(O=U),A=U+1):G>0&&(z=U-1)}return O}a.findCell=b;function p(g,P){for(var A=new Array(g.length),z=0,O=A.length;z=g.length||h(g[_e],U)!==0););}return A}a.incidence=p;function k(g,P){if(!P)return p(_(T(g,0)),g,0);for(var A=new Array(P),z=0;z>>N&1&&j.push(O[N]);P.push(j)}return v(P)}a.explode=E;function T(g,P){if(P<0)return[];for(var A=[],z=(1<0}C=C.filter(M);for(var g=C.length,P=new Array(g),A=new Array(g),x=0;x0;){var ce=Pe.pop(),je=Ce[ce];h(je,function(ut,Wt){return ut-Wt});var lt=je.length,pt=me[ce],Vt;if(pt===0){var j=C[ce];Vt=[j]}for(var x=0;x=0)&&(me[ot]=pt^1,Pe.push(ot),pt===0)){var j=C[ot];Be(j)||(j.reverse(),Vt.push(j))}}pt===0&&De.push(Vt)}return De}},2145:function(i,a){"use strict";a.uniforms=u,a.attributes=c;var o={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube"},s=null;function l(f,h){if(!s){var d=Object.keys(o);s={};for(var v=0;v1)for(var k=0;k1&&G.drawBuffersWEBGL(l[U]);var re=P.getExtension("WEBGL_depth_texture");re?Z?M.depth=p(P,z,O,re.UNSIGNED_INT_24_8_WEBGL,P.DEPTH_STENCIL,P.DEPTH_STENCIL_ATTACHMENT):j&&(M.depth=p(P,z,O,P.UNSIGNED_SHORT,P.DEPTH_COMPONENT,P.DEPTH_ATTACHMENT)):j&&Z?M._depth_rb=k(P,z,O,P.DEPTH_STENCIL,P.DEPTH_STENCIL_ATTACHMENT):j?M._depth_rb=k(P,z,O,P.DEPTH_COMPONENT16,P.DEPTH_ATTACHMENT):Z&&(M._depth_rb=k(P,z,O,P.STENCIL_INDEX,P.STENCIL_ATTACHMENT));var oe=P.checkFramebufferStatus(P.FRAMEBUFFER);if(oe!==P.FRAMEBUFFER_COMPLETE){M._destroyed=!0,P.bindFramebuffer(P.FRAMEBUFFER,null),P.deleteFramebuffer(M.handle),M.handle=null,M.depth&&(M.depth.dispose(),M.depth=null),M._depth_rb&&(P.deleteRenderbuffer(M._depth_rb),M._depth_rb=null);for(var H=0;Hz||P<0||P>z)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");M._shape[0]=g,M._shape[1]=P;for(var O=d(A),U=0;UO||P<0||P>O)throw new Error("gl-fbo: Parameters are too large for FBO");A=A||{};var U=1;if("color"in A){if(U=Math.max(A.color|0,0),U<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(U>1)if(z){if(U>M.getParameter(z.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+U+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var G=M.UNSIGNED_BYTE,Z=M.getExtension("OES_texture_float");if(A.float&&U>0){if(!Z)throw new Error("gl-fbo: Context does not support floating point textures");G=M.FLOAT}else A.preferFloat&&U>0&&Z&&(G=M.FLOAT);var j=!0;"depth"in A&&(j=!!A.depth);var N=!1;return"stencil"in A&&(N=!!A.stencil),new T(M,g,P,G,U,j,N,z)}},2272:function(i,a,o){"use strict";var s=o(2646)[4],l=o(2478);i.exports=c;function u(f,h,d,v,_,b){var p=h.opposite(v,_);if(!(p<0)){if(_0;){for(var E=d.pop(),b=d.pop(),T=-1,L=-1,p=_[b],C=1;C=0||(h.flip(b,E),u(f,h,d,T,b,L),u(f,h,d,b,L,T),u(f,h,d,L,E,T),u(f,h,d,E,T,L))}}},2334:function(i){i.exports=a;function a(o,s,l){return o[0]=Math.min(s[0],l[0]),o[1]=Math.min(s[1],l[1]),o[2]=Math.min(s[2],l[2]),o[3]=Math.min(s[3],l[3]),o}},2335:function(i){i.exports=a;function a(o){var s=new Float32Array(4);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s[3]=o[3],s}},2361:function(i){var a=!1;if(typeof Float64Array!="undefined"){var o=new Float64Array(1),s=new Uint32Array(o.buffer);if(o[0]=1,a=!0,s[1]===1072693248){let k=function(L,x){return s[0]=L,s[1]=x,o[0]},E=function(L){return o[0]=L,s[0]},T=function(L){return o[0]=L,s[1]};var u=k,c=E,f=T;i.exports=function(x){return o[0]=x,[s[0],s[1]]},i.exports.pack=k,i.exports.lo=E,i.exports.hi=T}else if(s[0]===1072693248){let k=function(L,x){return s[1]=L,s[0]=x,o[0]},E=function(L){return o[0]=L,s[1]},T=function(L){return o[0]=L,s[0]};var h=k,d=E,v=T;i.exports=function(x){return o[0]=x,[s[1],s[0]]},i.exports.pack=k,i.exports.lo=E,i.exports.hi=T}else a=!1}if(!a){let k=function(L,x){return l.writeUInt32LE(L,0,!0),l.writeUInt32LE(x,4,!0),l.readDoubleLE(0,!0)},E=function(L){return l.writeDoubleLE(L,0,!0),l.readUInt32LE(0,!0)},T=function(L){return l.writeDoubleLE(L,0,!0),l.readUInt32LE(4,!0)};var _=k,b=E,p=T,l=new Buffer(8);i.exports=function(x){return l.writeDoubleLE(x,0,!0),[l.readUInt32LE(0,!0),l.readUInt32LE(4,!0)]},i.exports.pack=k,i.exports.lo=E,i.exports.hi=T}i.exports.sign=function(k){return i.exports.hi(k)>>>31},i.exports.exponent=function(k){var E=i.exports.hi(k);return(E<<1>>>21)-1023},i.exports.fraction=function(k){var E=i.exports.lo(k),T=i.exports.hi(k),L=T&(1<<20)-1;return T&2146435072&&(L+=1048576),[E,L]},i.exports.denormalized=function(k){var E=i.exports.hi(k);return!(E&2146435072)}},2408:function(i){i.exports=a;function a(o,s,l){var u=Math.sin(l),c=Math.cos(l),f=s[0],h=s[1],d=s[2],v=s[3],_=s[8],b=s[9],p=s[10],k=s[11];return s!==o&&(o[4]=s[4],o[5]=s[5],o[6]=s[6],o[7]=s[7],o[12]=s[12],o[13]=s[13],o[14]=s[14],o[15]=s[15]),o[0]=f*c-_*u,o[1]=h*c-b*u,o[2]=d*c-p*u,o[3]=v*c-k*u,o[8]=f*u+_*c,o[9]=h*u+b*c,o[10]=d*u+p*c,o[11]=v*u+k*c,o}},2419:function(i){"use strict";i.exports=a;function a(o){for(var s=1,l=1;lT-E?u(h,d,v,_,b,p,k,E,T,L,x):c(h,d,v,_,b,p,k,E,T,L,x)}return f}function s(){function u(v,_,b,p,k,E,T,L,x,C,M){for(var g=2*v,P=p,A=g*p;PC-x?p?u(v,_,b,k,E,T,L,x,C,M,g):c(v,_,b,k,E,T,L,x,C,M,g):p?f(v,_,b,k,E,T,L,x,C,M,g):h(v,_,b,k,E,T,L,x,C,M,g)}return d}function l(u){return u?o():s()}a.partial=l(!1),a.full=l(!0)},2478:function(i){"use strict";function a(f,h,d,v,_){for(var b=_+1;v<=_;){var p=v+_>>>1,k=f[p],E=d!==void 0?d(k,h):k-h;E>=0?(b=p,_=p-1):v=p+1}return b}function o(f,h,d,v,_){for(var b=_+1;v<=_;){var p=v+_>>>1,k=f[p],E=d!==void 0?d(k,h):k-h;E>0?(b=p,_=p-1):v=p+1}return b}function s(f,h,d,v,_){for(var b=v-1;v<=_;){var p=v+_>>>1,k=f[p],E=d!==void 0?d(k,h):k-h;E<0?(b=p,v=p+1):_=p-1}return b}function l(f,h,d,v,_){for(var b=v-1;v<=_;){var p=v+_>>>1,k=f[p],E=d!==void 0?d(k,h):k-h;E<=0?(b=p,v=p+1):_=p-1}return b}function u(f,h,d,v,_){for(;v<=_;){var b=v+_>>>1,p=f[b],k=d!==void 0?d(p,h):p-h;if(k===0)return b;k<=0?v=b+1:_=b-1}return-1}function c(f,h,d,v,_,b){return typeof d=="function"?b(f,h,d,v===void 0?0:v|0,_===void 0?f.length-1:_|0):b(f,h,void 0,d===void 0?0:d|0,v===void 0?f.length-1:v|0)}i.exports={ge:function(f,h,d,v,_){return c(f,h,d,v,_,a)},gt:function(f,h,d,v,_){return c(f,h,d,v,_,o)},lt:function(f,h,d,v,_){return c(f,h,d,v,_,s)},le:function(f,h,d,v,_){return c(f,h,d,v,_,l)},eq:function(f,h,d,v,_){return c(f,h,d,v,_,u)}}},2504:function(i){i.exports=a;function a(o,s,l){var u=l[0],c=l[1],f=l[2];return o[0]=s[0]*u,o[1]=s[1]*u,o[2]=s[2]*u,o[3]=s[3]*u,o[4]=s[4]*c,o[5]=s[5]*c,o[6]=s[6]*c,o[7]=s[7]*c,o[8]=s[8]*f,o[9]=s[9]*f,o[10]=s[10]*f,o[11]=s[11]*f,o[12]=s[12],o[13]=s[13],o[14]=s[14],o[15]=s[15],o}},2538:function(i,a,o){"use strict";var s=o(8902),l=o(5542),u=o(2272),c=o(5023);i.exports=_;function f(b){return[Math.min(b[0],b[1]),Math.max(b[0],b[1])]}function h(b,p){return b[0]-p[0]||b[1]-p[1]}function d(b){return b.map(f).sort(h)}function v(b,p,k){return p in b?b[p]:k}function _(b,p,k){Array.isArray(p)?(k=k||{},p=p||[]):(k=p||{},p=[]);var E=!!v(k,"delaunay",!0),T=!!v(k,"interior",!0),L=!!v(k,"exterior",!0),x=!!v(k,"infinity",!1);if(!T&&!L||b.length===0)return[];var C=s(b,p);if(E||T!==L||x){for(var M=l(b.length,d(p)),g=0;g0){if(Ce=1,ie[Ee++]=v(M[z],E,T,L),z+=re,x>0)for(_e=1,O=M[z],Ae=ie[Ee]=v(O,E,T,L),me=ie[Ee+Be],je=ie[Ee+De],Vt=ie[Ee+lt],(Ae!==me||Ae!==je||Ae!==Vt)&&(G=M[z+U],j=M[z+Z],H=M[z+N],h(_e,Ce,O,G,j,H,Ae,me,je,Vt,E,T,L),ot=Se[Ee]=Le++),Ee+=1,z+=re,_e=2;_e0)for(_e=1,O=M[z],Ae=ie[Ee]=v(O,E,T,L),me=ie[Ee+Be],je=ie[Ee+De],Vt=ie[Ee+lt],(Ae!==me||Ae!==je||Ae!==Vt)&&(G=M[z+U],j=M[z+Z],H=M[z+N],h(_e,Ce,O,G,j,H,Ae,me,je,Vt,E,T,L),ot=Se[Ee]=Le++,Vt!==je&&d(Se[Ee+De],ot,j,H,je,Vt,E,T,L)),Ee+=1,z+=re,_e=2;_e0){if(_e=1,ie[Ee++]=v(M[z],E,T,L),z+=re,C>0)for(Ce=1,O=M[z],Ae=ie[Ee]=v(O,E,T,L),je=ie[Ee+De],me=ie[Ee+Be],Vt=ie[Ee+lt],(Ae!==je||Ae!==me||Ae!==Vt)&&(G=M[z+U],j=M[z+Z],H=M[z+N],h(_e,Ce,O,G,j,H,Ae,je,me,Vt,E,T,L),ot=Se[Ee]=Le++),Ee+=1,z+=re,Ce=2;Ce0)for(Ce=1,O=M[z],Ae=ie[Ee]=v(O,E,T,L),je=ie[Ee+De],me=ie[Ee+Be],Vt=ie[Ee+lt],(Ae!==je||Ae!==me||Ae!==Vt)&&(G=M[z+U],j=M[z+Z],H=M[z+N],h(_e,Ce,O,G,j,H,Ae,je,me,Vt,E,T,L),ot=Se[Ee]=Le++,Vt!==je&&d(Se[Ee+De],ot,H,G,Vt,je,E,T,L)),Ee+=1,z+=re,Ce=2;Ce 0"),typeof f.vertex!="function"&&h("Must specify vertex creation function"),typeof f.cell!="function"&&h("Must specify cell creation function"),typeof f.phase!="function"&&h("Must specify phase function");for(var b=f.getters||[],p=new Array(v),k=0;k=0?p[k]=!0:p[k]=!1;return u(f.vertex,f.cell,f.phase,_,d,p)}},2642:function(i,a,o){"use strict";i.exports=u;var s=o(727);function l(c){for(var f=0,h=0;hp[1][2]&&(z[0]=-z[0]),p[0][2]>p[2][0]&&(z[1]=-z[1]),p[1][0]>p[0][1]&&(z[2]=-z[2]),!0};function E(x,C,M){var g=C[0],P=C[1],A=C[2],z=C[3];return x[0]=M[0]*g+M[4]*P+M[8]*A+M[12]*z,x[1]=M[1]*g+M[5]*P+M[9]*A+M[13]*z,x[2]=M[2]*g+M[6]*P+M[10]*A+M[14]*z,x[3]=M[3]*g+M[7]*P+M[11]*A+M[15]*z,x}function T(x,C){x[0][0]=C[0],x[0][1]=C[1],x[0][2]=C[2],x[1][0]=C[4],x[1][1]=C[5],x[1][2]=C[6],x[2][0]=C[8],x[2][1]=C[9],x[2][2]=C[10]}function L(x,C,M,g,P){x[0]=C[0]*g+M[0]*P,x[1]=C[1]*g+M[1]*P,x[2]=C[2]*g+M[2]*P}},2653:function(i,a,o){"use strict";var s=o(3865);i.exports=l;function l(u,c){for(var f=u.length,h=new Array(f),d=0;d=d[T]&&(E+=1);p[k]=E}}return h}function f(h,d){try{return s(h,!0)}catch(p){var v=l(h);if(v.length<=d)return[];var _=u(h,v),b=s(_,!0);return c(b,v)}}},2762:function(i,a,o){"use strict";var s=o(1888),l=o(5298),u=o(9618),c=["uint8","uint8_clamped","uint16","uint32","int8","int16","int32","float32"];function f(p,k,E,T,L){this.gl=p,this.type=k,this.handle=E,this.length=T,this.usage=L}var h=f.prototype;h.bind=function(){this.gl.bindBuffer(this.type,this.handle)},h.unbind=function(){this.gl.bindBuffer(this.type,null)},h.dispose=function(){this.gl.deleteBuffer(this.handle)};function d(p,k,E,T,L,x){var C=L.length*L.BYTES_PER_ELEMENT;if(x<0)return p.bufferData(k,L,T),C;if(C+x>E)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return p.bufferSubData(k,x,L),E}function v(p,k){for(var E=s.malloc(p.length,k),T=p.length,L=0;L=0;--T){if(k[T]!==E)return!1;E*=p[T]}return!0}h.update=function(p,k){if(typeof k!="number"&&(k=-1),this.bind(),typeof p=="object"&&typeof p.shape!="undefined"){var E=p.dtype;if(c.indexOf(E)<0&&(E="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var T=gl.getExtension("OES_element_index_uint");T&&E!=="uint16"?E="uint32":E="uint16"}if(E===p.dtype&&_(p.shape,p.stride))p.offset===0&&p.data.length===p.shape[0]?this.length=d(this.gl,this.type,this.length,this.usage,p.data,k):this.length=d(this.gl,this.type,this.length,this.usage,p.data.subarray(p.offset,p.shape[0]),k);else{var L=s.malloc(p.size,E),x=u(L,p.shape);l.assign(x,p),k<0?this.length=d(this.gl,this.type,this.length,this.usage,L,k):this.length=d(this.gl,this.type,this.length,this.usage,L.subarray(0,p.size),k),s.free(L)}}else if(Array.isArray(p)){var C;this.type===this.gl.ELEMENT_ARRAY_BUFFER?C=v(p,"uint16"):C=v(p,"float32"),k<0?this.length=d(this.gl,this.type,this.length,this.usage,C,k):this.length=d(this.gl,this.type,this.length,this.usage,C.subarray(0,p.length),k),s.free(C)}else if(typeof p=="object"&&typeof p.length=="number")this.length=d(this.gl,this.type,this.length,this.usage,p,k);else if(typeof p=="number"||p===void 0){if(k>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");p=p|0,p<=0&&(p=1),this.gl.bufferData(this.type,p|0,this.usage),this.length=p}else throw new Error("gl-buffer: Invalid data type")};function b(p,k,E,T){if(E=E||p.ARRAY_BUFFER,T=T||p.DYNAMIC_DRAW,E!==p.ARRAY_BUFFER&&E!==p.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(T!==p.DYNAMIC_DRAW&&T!==p.STATIC_DRAW&&T!==p.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var L=p.createBuffer(),x=new f(p,E,L,0,T);return x.update(k),x}i.exports=b},2825:function(i){i.exports=a;function a(o,s,l){var u=new Float32Array(3);return u[0]=o,u[1]=s,u[2]=l,u}},2931:function(i,a,o){i.exports={EPSILON:o(2613),create:o(1091),clone:o(3126),angle:o(8192),fromValues:o(2825),copy:o(3990),set:o(1463),equals:o(9922),exactEquals:o(9265),add:o(5632),subtract:o(6843),sub:o(2229),multiply:o(5847),mul:o(4505),divide:o(6690),div:o(4008),min:o(8107),max:o(7417),floor:o(2681),ceil:o(9226),round:o(2447),scale:o(6621),scaleAndAdd:o(8489),distance:o(7056),dist:o(5455),squaredDistance:o(2953),sqrDist:o(6141),length:o(1387),len:o(868),squaredLength:o(3066),sqrLen:o(5486),negate:o(5093),inverse:o(811),normalize:o(3536),dot:o(244),cross:o(5911),lerp:o(6658),random:o(7636),transformMat4:o(5673),transformMat3:o(492),transformQuat:o(264),rotateX:o(6894),rotateY:o(109),rotateZ:o(8692),forEach:o(5137)}},2933:function(i){i.exports=a;function a(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o[3]=s[3],o}},2953:function(i){i.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2];return l*l+u*u+c*c}},2962:function(i,a,o){"use strict";var s=o(5250),l=o(8210),u=o(3012),c=o(7004),f=6;function h(T,L,x,C){return function(g){return C(T(x(g[0][0],g[1][1]),x(-g[0][1],g[1][0])))}}function d(T,L,x,C){return function(g){return C(T(L(T(x(g[1][1],g[2][2]),x(-g[1][2],g[2][1])),g[0][0]),T(L(T(x(g[1][0],g[2][2]),x(-g[1][2],g[2][0])),-g[0][1]),L(T(x(g[1][0],g[2][1]),x(-g[1][1],g[2][0])),g[0][2]))))}}function v(T,L,x,C){return function(g){return C(T(T(L(T(L(T(x(g[2][2],g[3][3]),x(-g[2][3],g[3][2])),g[1][1]),T(L(T(x(g[2][1],g[3][3]),x(-g[2][3],g[3][1])),-g[1][2]),L(T(x(g[2][1],g[3][2]),x(-g[2][2],g[3][1])),g[1][3]))),g[0][0]),L(T(L(T(x(g[2][2],g[3][3]),x(-g[2][3],g[3][2])),g[1][0]),T(L(T(x(g[2][0],g[3][3]),x(-g[2][3],g[3][0])),-g[1][2]),L(T(x(g[2][0],g[3][2]),x(-g[2][2],g[3][0])),g[1][3]))),-g[0][1])),T(L(T(L(T(x(g[2][1],g[3][3]),x(-g[2][3],g[3][1])),g[1][0]),T(L(T(x(g[2][0],g[3][3]),x(-g[2][3],g[3][0])),-g[1][1]),L(T(x(g[2][0],g[3][1]),x(-g[2][1],g[3][0])),g[1][3]))),g[0][2]),L(T(L(T(x(g[2][1],g[3][2]),x(-g[2][2],g[3][1])),g[1][0]),T(L(T(x(g[2][0],g[3][2]),x(-g[2][2],g[3][0])),-g[1][1]),L(T(x(g[2][0],g[3][1]),x(-g[2][1],g[3][0])),g[1][2]))),-g[0][3]))))}}function _(T,L,x,C){return function(g){return C(T(T(L(T(T(L(T(L(T(x(g[3][3],g[4][4]),x(-g[3][4],g[4][3])),g[2][2]),T(L(T(x(g[3][2],g[4][4]),x(-g[3][4],g[4][2])),-g[2][3]),L(T(x(g[3][2],g[4][3]),x(-g[3][3],g[4][2])),g[2][4]))),g[1][1]),L(T(L(T(x(g[3][3],g[4][4]),x(-g[3][4],g[4][3])),g[2][1]),T(L(T(x(g[3][1],g[4][4]),x(-g[3][4],g[4][1])),-g[2][3]),L(T(x(g[3][1],g[4][3]),x(-g[3][3],g[4][1])),g[2][4]))),-g[1][2])),T(L(T(L(T(x(g[3][2],g[4][4]),x(-g[3][4],g[4][2])),g[2][1]),T(L(T(x(g[3][1],g[4][4]),x(-g[3][4],g[4][1])),-g[2][2]),L(T(x(g[3][1],g[4][2]),x(-g[3][2],g[4][1])),g[2][4]))),g[1][3]),L(T(L(T(x(g[3][2],g[4][3]),x(-g[3][3],g[4][2])),g[2][1]),T(L(T(x(g[3][1],g[4][3]),x(-g[3][3],g[4][1])),-g[2][2]),L(T(x(g[3][1],g[4][2]),x(-g[3][2],g[4][1])),g[2][3]))),-g[1][4]))),g[0][0]),L(T(T(L(T(L(T(x(g[3][3],g[4][4]),x(-g[3][4],g[4][3])),g[2][2]),T(L(T(x(g[3][2],g[4][4]),x(-g[3][4],g[4][2])),-g[2][3]),L(T(x(g[3][2],g[4][3]),x(-g[3][3],g[4][2])),g[2][4]))),g[1][0]),L(T(L(T(x(g[3][3],g[4][4]),x(-g[3][4],g[4][3])),g[2][0]),T(L(T(x(g[3][0],g[4][4]),x(-g[3][4],g[4][0])),-g[2][3]),L(T(x(g[3][0],g[4][3]),x(-g[3][3],g[4][0])),g[2][4]))),-g[1][2])),T(L(T(L(T(x(g[3][2],g[4][4]),x(-g[3][4],g[4][2])),g[2][0]),T(L(T(x(g[3][0],g[4][4]),x(-g[3][4],g[4][0])),-g[2][2]),L(T(x(g[3][0],g[4][2]),x(-g[3][2],g[4][0])),g[2][4]))),g[1][3]),L(T(L(T(x(g[3][2],g[4][3]),x(-g[3][3],g[4][2])),g[2][0]),T(L(T(x(g[3][0],g[4][3]),x(-g[3][3],g[4][0])),-g[2][2]),L(T(x(g[3][0],g[4][2]),x(-g[3][2],g[4][0])),g[2][3]))),-g[1][4]))),-g[0][1])),T(L(T(T(L(T(L(T(x(g[3][3],g[4][4]),x(-g[3][4],g[4][3])),g[2][1]),T(L(T(x(g[3][1],g[4][4]),x(-g[3][4],g[4][1])),-g[2][3]),L(T(x(g[3][1],g[4][3]),x(-g[3][3],g[4][1])),g[2][4]))),g[1][0]),L(T(L(T(x(g[3][3],g[4][4]),x(-g[3][4],g[4][3])),g[2][0]),T(L(T(x(g[3][0],g[4][4]),x(-g[3][4],g[4][0])),-g[2][3]),L(T(x(g[3][0],g[4][3]),x(-g[3][3],g[4][0])),g[2][4]))),-g[1][1])),T(L(T(L(T(x(g[3][1],g[4][4]),x(-g[3][4],g[4][1])),g[2][0]),T(L(T(x(g[3][0],g[4][4]),x(-g[3][4],g[4][0])),-g[2][1]),L(T(x(g[3][0],g[4][1]),x(-g[3][1],g[4][0])),g[2][4]))),g[1][3]),L(T(L(T(x(g[3][1],g[4][3]),x(-g[3][3],g[4][1])),g[2][0]),T(L(T(x(g[3][0],g[4][3]),x(-g[3][3],g[4][0])),-g[2][1]),L(T(x(g[3][0],g[4][1]),x(-g[3][1],g[4][0])),g[2][3]))),-g[1][4]))),g[0][2]),T(L(T(T(L(T(L(T(x(g[3][2],g[4][4]),x(-g[3][4],g[4][2])),g[2][1]),T(L(T(x(g[3][1],g[4][4]),x(-g[3][4],g[4][1])),-g[2][2]),L(T(x(g[3][1],g[4][2]),x(-g[3][2],g[4][1])),g[2][4]))),g[1][0]),L(T(L(T(x(g[3][2],g[4][4]),x(-g[3][4],g[4][2])),g[2][0]),T(L(T(x(g[3][0],g[4][4]),x(-g[3][4],g[4][0])),-g[2][2]),L(T(x(g[3][0],g[4][2]),x(-g[3][2],g[4][0])),g[2][4]))),-g[1][1])),T(L(T(L(T(x(g[3][1],g[4][4]),x(-g[3][4],g[4][1])),g[2][0]),T(L(T(x(g[3][0],g[4][4]),x(-g[3][4],g[4][0])),-g[2][1]),L(T(x(g[3][0],g[4][1]),x(-g[3][1],g[4][0])),g[2][4]))),g[1][2]),L(T(L(T(x(g[3][1],g[4][2]),x(-g[3][2],g[4][1])),g[2][0]),T(L(T(x(g[3][0],g[4][2]),x(-g[3][2],g[4][0])),-g[2][1]),L(T(x(g[3][0],g[4][1]),x(-g[3][1],g[4][0])),g[2][2]))),-g[1][4]))),-g[0][3]),L(T(T(L(T(L(T(x(g[3][2],g[4][3]),x(-g[3][3],g[4][2])),g[2][1]),T(L(T(x(g[3][1],g[4][3]),x(-g[3][3],g[4][1])),-g[2][2]),L(T(x(g[3][1],g[4][2]),x(-g[3][2],g[4][1])),g[2][3]))),g[1][0]),L(T(L(T(x(g[3][2],g[4][3]),x(-g[3][3],g[4][2])),g[2][0]),T(L(T(x(g[3][0],g[4][3]),x(-g[3][3],g[4][0])),-g[2][2]),L(T(x(g[3][0],g[4][2]),x(-g[3][2],g[4][0])),g[2][3]))),-g[1][1])),T(L(T(L(T(x(g[3][1],g[4][3]),x(-g[3][3],g[4][1])),g[2][0]),T(L(T(x(g[3][0],g[4][3]),x(-g[3][3],g[4][0])),-g[2][1]),L(T(x(g[3][0],g[4][1]),x(-g[3][1],g[4][0])),g[2][3]))),g[1][2]),L(T(L(T(x(g[3][1],g[4][2]),x(-g[3][2],g[4][1])),g[2][0]),T(L(T(x(g[3][0],g[4][2]),x(-g[3][2],g[4][0])),-g[2][1]),L(T(x(g[3][0],g[4][1]),x(-g[3][1],g[4][0])),g[2][2]))),-g[1][3]))),g[0][4])))))}}function b(T){var L=T===2?h:T===3?d:T===4?v:T===5?_:void 0;return L(l,u,s,c)}var p=[function(){return[0]},function(L){return[L[0][0]]}];function k(T,L,x,C,M,g,P,A){return function(O){switch(O.length){case 0:return T(O);case 1:return L(O);case 2:return x(O);case 3:return C(O);case 4:return M(O);case 5:return g(O)}var U=P[O.length];return U||(U=P[O.length]=A(O.length)),U(O)}}function E(){for(;p.length0){z=d[G][P][0],U=G;break}O=z[U^1];for(var Z=0;Z<2;++Z)for(var j=d[Z][P],N=0;N0&&(z=H,O=re,U=Z)}return A||z&&p(z,U),O}function E(g,P){var A=d[P][g][0],z=[g];p(A,P);for(var O=A[P^1],U=P;;){for(;O!==g;)z.push(O),O=k(z[z.length-2],O,!1);if(d[0][g].length+d[1][g].length===0)break;var G=z[z.length-1],Z=g,j=z[1],N=k(G,Z,!0);if(s(c[G],c[Z],c[j],c[N])<0)break;z.push(g),O=k(G,Z)}return z}function T(g,P){return P[1]===P[P.length-1]}for(var v=0;v0;){var C=d[0][v].length,M=E(v,L);T(x,M)?x.push.apply(x,M):(x.length>0&&b.push(x),x=M)}x.length>0&&b.push(x)}return b}},3090:function(i,a,o){"use strict";i.exports=l;var s=o(3250)[3];function l(u){var c=u.length;if(c<3){for(var k=new Array(c),f=0;f1&&s(u[d[p-2]],u[d[p-1]],b)<=0;)p-=1,d.pop();for(d.push(_),p=v.length;p>1&&s(u[v[p-2]],u[v[p-1]],b)>=0;)p-=1,v.pop();v.push(_)}for(var k=new Array(v.length+d.length-2),E=0,f=0,T=d.length;f0;--L)k[E++]=v[L];return k}},3105:function(i,a){"use strict";"use restrict";var o=32;a.INT_BITS=o,a.INT_MAX=2147483647,a.INT_MIN=-1<0)-(u<0)},a.abs=function(u){var c=u>>o-1;return(u^c)-c},a.min=function(u,c){return c^(u^c)&-(u65535)<<4,u>>>=c,f=(u>255)<<3,u>>>=f,c|=f,f=(u>15)<<2,u>>>=f,c|=f,f=(u>3)<<1,u>>>=f,c|=f,c|u>>1},a.log10=function(u){return u>=1e9?9:u>=1e8?8:u>=1e7?7:u>=1e6?6:u>=1e5?5:u>=1e4?4:u>=1e3?3:u>=100?2:u>=10?1:0},a.popCount=function(u){return u=u-(u>>>1&1431655765),u=(u&858993459)+(u>>>2&858993459),(u+(u>>>4)&252645135)*16843009>>>24};function s(u){var c=32;return u&=-u,u&&c--,u&65535&&(c-=16),u&16711935&&(c-=8),u&252645135&&(c-=4),u&858993459&&(c-=2),u&1431655765&&(c-=1),c}a.countTrailingZeros=s,a.nextPow2=function(u){return u+=u===0,--u,u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u+1},a.prevPow2=function(u){return u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u-(u>>>1)},a.parity=function(u){return u^=u>>>16,u^=u>>>8,u^=u>>>4,u&=15,27030>>>u&1};var l=new Array(256);(function(u){for(var c=0;c<256;++c){var f=c,h=c,d=7;for(f>>>=1;f;f>>>=1)h<<=1,h|=f&1,--d;u[c]=h<>>8&255]<<16|l[u>>>16&255]<<8|l[u>>>24&255]},a.interleave2=function(u,c){return u&=65535,u=(u|u<<8)&16711935,u=(u|u<<4)&252645135,u=(u|u<<2)&858993459,u=(u|u<<1)&1431655765,c&=65535,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,u|c<<1},a.deinterleave2=function(u,c){return u=u>>>c&1431655765,u=(u|u>>>1)&858993459,u=(u|u>>>2)&252645135,u=(u|u>>>4)&16711935,u=(u|u>>>16)&65535,u<<16>>16},a.interleave3=function(u,c,f){return u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,u|=c<<1,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,u|f<<2},a.deinterleave3=function(u,c){return u=u>>>c&1227133513,u=(u|u>>>2)&3272356035,u=(u|u>>>4)&251719695,u=(u|u>>>8)&4278190335,u=(u|u>>>16)&1023,u<<22>>22},a.nextCombination=function(u){var c=u|u-1;return c+1|(~c&-~c)-1>>>s(u)+1}},3126:function(i){i.exports=a;function a(o){var s=new Float32Array(3);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s}},3134:function(i,a,o){"use strict";i.exports=l;var s=o(1682);function l(u,c){var f=u.length;if(typeof c!="number"){c=0;for(var h=0;h=0}function d(v,_,b,p){var k=s(_,b,p);if(k===0){var E=l(s(v,_,b)),T=l(s(v,_,p));if(E===T){if(E===0){var L=h(v,_,b),x=h(v,_,p);return L===x?0:L?1:-1}return 0}else{if(T===0)return E>0||h(v,_,p)?-1:1;if(E===0)return T>0||h(v,_,b)?1:-1}return l(T-E)}var C=s(v,_,b);if(C>0)return k>0&&s(v,_,p)>0?1:-1;if(C<0)return k>0||s(v,_,p)>0?1:-1;var M=s(v,_,p);return M>0||h(v,_,b)?1:-1}},3202:function(i){i.exports=function(o,s){s||(s=[0,""]),o=String(o);var l=parseFloat(o,10);return s[0]=l,s[1]=o.match(/[\d.\-\+]*\s*(.*)/)[1]||"",s}},3233:function(i){"use strict";var a="",o;i.exports=s;function s(l,u){if(typeof l!="string")throw new TypeError("expected a string");if(u===1)return l;if(u===2)return l+l;var c=l.length*u;if(o!==l||typeof o=="undefined")o=l,a="";else if(a.length>=c)return a.substr(0,c);for(;c>a.length&&u>1;)u&1&&(a+=l),u>>=1,l+=l;return a+=l,a=a.substr(0,c),a}},3236:function(i){i.exports=function(a){typeof a=="string"&&(a=[a]);for(var o=[].slice.call(arguments,1),s=[],l=0;l0){if(U<=0)return G;Z=O+U}else if(O<0){if(U>=0)return G;Z=-(O+U)}else return G;var j=d*Z;return G>=j||G<=-j?G:E(P,A,z)},function(P,A,z,O){var U=P[0]-O[0],G=A[0]-O[0],Z=z[0]-O[0],j=P[1]-O[1],N=A[1]-O[1],H=z[1]-O[1],re=P[2]-O[2],oe=A[2]-O[2],_e=z[2]-O[2],Ce=G*H,Le=Z*N,ge=Z*j,ie=U*H,Se=U*N,Ee=G*j,Ae=re*(Ce-Le)+oe*(ge-ie)+_e*(Se-Ee),Be=(Math.abs(Ce)+Math.abs(Le))*Math.abs(re)+(Math.abs(ge)+Math.abs(ie))*Math.abs(oe)+(Math.abs(Se)+Math.abs(Ee))*Math.abs(_e),Pe=v*Be;return Ae>Pe||-Ae>Pe?Ae:T(P,A,z,O)}];function x(g){var P=L[g.length];return P||(P=L[g.length]=k(g.length)),P.apply(void 0,g)}function C(g,P,A,z,O,U,G){return function(j,N,H,re,oe){switch(arguments.length){case 0:case 1:return 0;case 2:return z(j,N);case 3:return O(j,N,H);case 4:return U(j,N,H,re);case 5:return G(j,N,H,re,oe)}for(var _e=new Array(arguments.length),Ce=0;Ce4)throw new l("","Invalid data type");switch(re.charAt(0)){case"b":case"i":h["uniform"+oe+"iv"](_[U],G);break;case"v":h["uniform"+oe+"fv"](_[U],G);break;default:throw new l("","Unrecognized data type for vector "+name+": "+re)}}else if(re.indexOf("mat")===0&&re.length===4){if(oe=re.charCodeAt(re.length-1)-48,oe<2||oe>4)throw new l("","Invalid uniform dimension type for matrix "+name+": "+re);h["uniformMatrix"+oe+"fv"](_[U],!1,G);break}else throw new l("","Unknown uniform data type for "+name+": "+re)}}}}}function k(C,M){if(typeof M!="object")return[[C,M]];var g=[];for(var P in M){var A=M[P],z=C;parseInt(P)+""===P?z+="["+P+"]":z+="."+P,typeof A=="object"?g.push.apply(g,k(z,A)):g.push([z,A])}return g}function E(C){switch(C){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var M=C.indexOf("vec");if(0<=M&&M<=1&&C.length===4+M){var g=C.charCodeAt(C.length-1)-48;if(g<2||g>4)throw new l("","Invalid data type");return C.charAt(0)==="b"?c(g,!1):c(g,0)}else if(C.indexOf("mat")===0&&C.length===4){var g=C.charCodeAt(C.length-1)-48;if(g<2||g>4)throw new l("","Invalid uniform dimension type for matrix "+name+": "+C);return c(g*g,0)}else throw new l("","Unknown uniform data type for "+name+": "+C)}}function T(C,M,g){if(typeof g=="object"){var P=L(g);Object.defineProperty(C,M,{get:u(P),set:p(g),enumerable:!0,configurable:!1})}else _[g]?Object.defineProperty(C,M,{get:b(g),set:p(g),enumerable:!0,configurable:!1}):C[M]=E(v[g].type)}function L(C){var M;if(Array.isArray(C)){M=new Array(C.length);for(var g=0;g=0!=M>=0&&_.push(E[0]+.5+.5*(C+M)/(C-M))}v+=x,++E[0]}}}function o(){return a()}var s=o;function l(f){var h={};return function(v,_,b){var p=v.dtype,k=v.order,E=[p,k.join()].join(),T=h[E];return T||(h[E]=T=f([p,k])),T(v.shape.slice(0),v.data,v.stride,v.offset|0,_,b)}}function u(f){return l(s.bind(void 0,f))}function c(f){return u({funcName:f.funcName})}i.exports=c({funcName:"zeroCrossings"})},3352:function(i,a,o){"use strict";var s=o(2478),l=0,u=1,c=2;i.exports=P;function f(A,z,O,U,G){this.mid=A,this.left=z,this.right=O,this.leftPoints=U,this.rightPoints=G,this.count=(z?z.count:0)+(O?O.count:0)+U.length}var h=f.prototype;function d(A,z){A.mid=z.mid,A.left=z.left,A.right=z.right,A.leftPoints=z.leftPoints,A.rightPoints=z.rightPoints,A.count=z.count}function v(A,z){var O=C(z);A.mid=O.mid,A.left=O.left,A.right=O.right,A.leftPoints=O.leftPoints,A.rightPoints=O.rightPoints,A.count=O.count}function _(A,z){var O=A.intervals([]);O.push(z),v(A,O)}function b(A,z){var O=A.intervals([]),U=O.indexOf(z);return U<0?l:(O.splice(U,1),v(A,O),u)}h.intervals=function(A){return A.push.apply(A,this.leftPoints),this.left&&this.left.intervals(A),this.right&&this.right.intervals(A),A},h.insert=function(A){var z=this.count-this.leftPoints.length;if(this.count+=1,A[1]3*(z+1)?_(this,A):this.left.insert(A):this.left=C([A]);else if(A[0]>this.mid)this.right?4*(this.right.count+1)>3*(z+1)?_(this,A):this.right.insert(A):this.right=C([A]);else{var O=s.ge(this.leftPoints,A,L),U=s.ge(this.rightPoints,A,x);this.leftPoints.splice(O,0,A),this.rightPoints.splice(U,0,A)}},h.remove=function(A){var z=this.count-this.leftPoints;if(A[1]3*(z-1))return b(this,A);var U=this.left.remove(A);return U===c?(this.left=null,this.count-=1,u):(U===u&&(this.count-=1),U)}else if(A[0]>this.mid){if(!this.right)return l;var G=this.left?this.left.count:0;if(4*G>3*(z-1))return b(this,A);var U=this.right.remove(A);return U===c?(this.right=null,this.count-=1,u):(U===u&&(this.count-=1),U)}else{if(this.count===1)return this.leftPoints[0]===A?c:l;if(this.leftPoints.length===1&&this.leftPoints[0]===A){if(this.left&&this.right){for(var Z=this,j=this.left;j.right;)Z=j,j=j.right;if(Z===this)j.right=this.right;else{var N=this.left,U=this.right;Z.count-=j.count,Z.right=j.left,j.left=N,j.right=U}d(this,j),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?d(this,this.left):d(this,this.right);return u}for(var N=s.ge(this.leftPoints,A,L);N=0&&A[U][1]>=z;--U){var G=O(A[U]);if(G)return G}}function E(A,z){for(var O=0;Othis.mid){if(this.right){var O=this.right.queryPoint(A,z);if(O)return O}return k(this.rightPoints,A,z)}else return E(this.leftPoints,z)},h.queryInterval=function(A,z,O){if(Athis.mid&&this.right){var U=this.right.queryInterval(A,z,O);if(U)return U}return zthis.mid?k(this.rightPoints,A,O):E(this.leftPoints,O)};function T(A,z){return A-z}function L(A,z){var O=A[0]-z[0];return O||A[1]-z[1]}function x(A,z){var O=A[1]-z[1];return O||A[0]-z[0]}function C(A){if(A.length===0)return null;for(var z=[],O=0;O>1],G=[],Z=[],j=[],O=0;O=0),x.type){case"b":k=parseInt(k,10).toString(2);break;case"c":k=String.fromCharCode(parseInt(k,10));break;case"d":case"i":k=parseInt(k,10);break;case"j":k=JSON.stringify(k,null,x.width?parseInt(x.width):0);break;case"e":k=x.precision?parseFloat(k).toExponential(x.precision):parseFloat(k).toExponential();break;case"f":k=x.precision?parseFloat(k).toFixed(x.precision):parseFloat(k);break;case"g":k=x.precision?String(Number(k.toPrecision(x.precision))):parseFloat(k);break;case"o":k=(parseInt(k,10)>>>0).toString(8);break;case"s":k=String(k),k=x.precision?k.substring(0,x.precision):k;break;case"t":k=String(!!k),k=x.precision?k.substring(0,x.precision):k;break;case"T":k=Object.prototype.toString.call(k).slice(8,-1).toLowerCase(),k=x.precision?k.substring(0,x.precision):k;break;case"u":k=parseInt(k,10)>>>0;break;case"v":k=k.valueOf(),k=x.precision?k.substring(0,x.precision):k;break;case"x":k=(parseInt(k,10)>>>0).toString(16);break;case"X":k=(parseInt(k,10)>>>0).toString(16).toUpperCase();break}l.json.test(x.type)?E+=k:(l.number.test(x.type)&&(!P||x.sign)?(A=P?"+":"-",k=k.toString().replace(l.sign,"")):A="",M=x.pad_char?x.pad_char==="0"?"0":x.pad_char.charAt(1):" ",g=x.width-(A+k).length,C=x.width&&g>0?M.repeat(g):"",E+=x.align?A+k+C:M==="0"?A+C+k:C+A+k)}return E}var h=Object.create(null);function d(v){if(h[v])return h[v];for(var _=v,b,p=[],k=0;_;){if((b=l.text.exec(_))!==null)p.push(b[0]);else if((b=l.modulo.exec(_))!==null)p.push("%");else if((b=l.placeholder.exec(_))!==null){if(b[2]){k|=1;var E=[],T=b[2],L=[];if((L=l.key.exec(T))!==null)for(E.push(L[1]);(T=T.substring(L[0].length))!=="";)if((L=l.key_access.exec(T))!==null)E.push(L[1]);else if((L=l.index_access.exec(T))!==null)E.push(L[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");b[2]=E}else k|=2;if(k===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");p.push({placeholder:b[0],param_no:b[1],keys:b[2],sign:b[3],pad_char:b[4],align:b[5],width:b[6],precision:b[7],type:b[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");_=_.substring(b[0].length)}return h[v]=p}a.sprintf=u,a.vsprintf=c,typeof window!="undefined"&&(window.sprintf=u,window.vsprintf=c,s=function(){return{sprintf:u,vsprintf:c}}.call(a,o,a,i),s!==void 0&&(i.exports=s))})()},3390:function(i){i.exports=a;function a(o,s,l,u){var c=new Float32Array(4);return c[0]=o,c[1]=s,c[2]=l,c[3]=u,c}},3436:function(i,a,o){"use strict";var s=o(3236),l=o(9405),u=s([`precision highp float; -#define GLSLIFY 1 - -attribute vec3 position, offset; -attribute vec4 color; -uniform mat4 model, view, projection; -uniform float capSize; -varying vec4 fragColor; -varying vec3 fragPosition; - -void main() { - vec4 worldPosition = model * vec4(position, 1.0); - worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0); - gl_Position = projection * (view * worldPosition); - fragColor = color; - fragPosition = position; -}`]),c=s([`precision highp float; -#define GLSLIFY 1 - -bool outOfRange(float a, float b, float p) { - return ((p > max(a, b)) || - (p < min(a, b))); -} - -bool outOfRange(vec2 a, vec2 b, vec2 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y)); -} - -bool outOfRange(vec3 a, vec3 b, vec3 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y) || - outOfRange(a.z, b.z, p.z)); -} + vec2 delta = weight * clipOffset * screenShape; + vec2 lineOffset = normalize(vec2(delta.y, -delta.x)) / screenShape; -bool outOfRange(vec4 a, vec4 b, vec4 p) { - return outOfRange(a.xyz, b.xyz, p.xyz); + gl_Position = vec4(clipPos.xy + clipPos.w * 0.5 * lineWidth * lineOffset, clipPos.z, clipPos.w); + fragColor = color.x * colors[0] + color.y * colors[1] + color.z * colors[2]; } +`]),c=s([`precision mediump float; +#define GLSLIFY 1 -uniform vec3 clipBounds[2]; -uniform float opacity; -varying vec3 fragPosition; varying vec4 fragColor; void main() { - if ( - outOfRange(clipBounds[0], clipBounds[1], fragPosition) || - fragColor.a * opacity == 0. - ) discard; - - gl_FragColor = opacity * fragColor; -}`]);i.exports=function(f){return l(f,u,c,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},3502:function(i,a,o){i.exports=u;var s=o(5995),l=o(9127);function u(c,f){return l(s(c,f))}},3508:function(i,a,o){var s=o(6852);s=s.slice().filter(function(l){return!/^(gl\_|texture)/.test(l)}),i.exports=s.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},3536:function(i){i.exports=a;function a(o,s){var l=s[0],u=s[1],c=s[2],f=l*l+u*u+c*c;return f>0&&(f=1/Math.sqrt(f),o[0]=s[0]*f,o[1]=s[1]*f,o[2]=s[2]*f),o}},3545:function(i,a,o){"use strict";i.exports=f;var s=o(8105),l=s("lov&&b[C+d]>L;--x,C-=k){for(var M=C,g=C+k,P=0;P>>1,L=2*h,x=T,C=b[L*T+d];k=z?(x=A,C=z):P>=U?(x=g,C=P):(x=O,C=U):z>=U?(x=A,C=z):U>=P?(x=g,C=P):(x=O,C=U);for(var j=L*(E-1),N=L*x,G=0;Gthis.buffer.length){l.free(this.buffer);for(var E=this.buffer=l.mallocUint8(c(k*p*4)),T=0;Tx|0},vertex:function(E,T,L,x,C,M,g,P,A,z,O,U,G){var Z=(g<<0)+(P<<1)+(A<<2)+(z<<3)|0;if(!(Z===0||Z===15))switch(Z){case 0:O.push([E-.5,T-.5]);break;case 1:O.push([E-.25-.25*(x+L-2*G)/(L-x),T-.25-.25*(C+L-2*G)/(L-C)]);break;case 2:O.push([E-.75-.25*(-x-L+2*G)/(x-L),T-.25-.25*(M+x-2*G)/(x-M)]);break;case 3:O.push([E-.5,T-.5-.5*(C+L+M+x-4*G)/(L-C+x-M)]);break;case 4:O.push([E-.25-.25*(M+C-2*G)/(C-M),T-.75-.25*(-C-L+2*G)/(C-L)]);break;case 5:O.push([E-.5-.5*(x+L+M+C-4*G)/(L-x+C-M),T-.5]);break;case 6:O.push([E-.5-.25*(-x-L+M+C)/(x-L+C-M),T-.5-.25*(-C-L+M+x)/(C-L+x-M)]);break;case 7:O.push([E-.75-.25*(M+C-2*G)/(C-M),T-.75-.25*(M+x-2*G)/(x-M)]);break;case 8:O.push([E-.75-.25*(-M-C+2*G)/(M-C),T-.75-.25*(-M-x+2*G)/(M-x)]);break;case 9:O.push([E-.5-.25*(x+L+-M-C)/(L-x+M-C),T-.5-.25*(C+L+-M-x)/(L-C+M-x)]);break;case 10:O.push([E-.5-.5*(-x-L+-M-C+4*G)/(x-L+M-C),T-.5]);break;case 11:O.push([E-.25-.25*(-M-C+2*G)/(M-C),T-.75-.25*(C+L-2*G)/(L-C)]);break;case 12:O.push([E-.5,T-.5-.5*(-C-L+-M-x+4*G)/(C-L+M-x)]);break;case 13:O.push([E-.75-.25*(x+L-2*G)/(L-x),T-.25-.25*(-M-x+2*G)/(M-x)]);break;case 14:O.push([E-.25-.25*(-x-L+2*G)/(x-L),T-.25-.25*(-C-L+2*G)/(C-L)]);break;case 15:O.push([E-.5,T-.5]);break}},cell:function(E,T,L,x,C,M,g,P,A){C?P.push([E,T]):P.push([T,E])}});return function(k,E){var T=[],L=[];return p(k,T,L,E),{positions:T,cells:L}}}};function c(v,_){var b=v.length+"d",p=u[b];if(p)return p(s,v,_)}function f(v,_){for(var b=l(v,_),p=b.length,k=new Array(p),E=new Array(p),T=0;T>1,b=-7,p=l?c-1:0,k=l?-1:1,E=o[s+p];for(p+=k,f=E&(1<<-b)-1,E>>=-b,b+=d;b>0;f=f*256+o[s+p],p+=k,b-=8);for(h=f&(1<<-b)-1,f>>=-b,b+=u;b>0;h=h*256+o[s+p],p+=k,b-=8);if(f===0)f=1-_;else{if(f===v)return h?NaN:(E?-1:1)*(1/0);h=h+Math.pow(2,u),f=f-_}return(E?-1:1)*h*Math.pow(2,f-u)},a.write=function(o,s,l,u,c,f){var h,d,v,_=f*8-c-1,b=(1<<_)-1,p=b>>1,k=c===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=u?0:f-1,T=u?1:-1,L=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(d=isNaN(s)?1:0,h=b):(h=Math.floor(Math.log(s)/Math.LN2),s*(v=Math.pow(2,-h))<1&&(h--,v*=2),h+p>=1?s+=k/v:s+=k*Math.pow(2,1-p),s*v>=2&&(h++,v/=2),h+p>=b?(d=0,h=b):h+p>=1?(d=(s*v-1)*Math.pow(2,c),h=h+p):(d=s*Math.pow(2,p-1)*Math.pow(2,c),h=0));c>=8;o[l+E]=d&255,E+=T,d/=256,c-=8);for(h=h<0;o[l+E]=h&255,E+=T,h/=256,_-=8);o[l+E-T]|=L*128}},3788:function(i,a,o){"use strict";var s=o(8507),l=o(2419);i.exports=u;function u(c,f){return s(c,f)||l(c)-l(f)}},3837:function(i,a,o){"use strict";i.exports=O;var s=o(4935),l=o(501),u=o(5304),c=o(6429),f=o(6444),h=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),d=ArrayBuffer,v=DataView;function _(U){return d.isView(U)&&!(U instanceof v)}function b(U){return Array.isArray(U)||_(U)}function p(U,G){return U[0]=G[0],U[1]=G[1],U[2]=G[2],U}function k(U){this.gl=U,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=u(U)}var E=k.prototype;E.update=function(U){U=U||{};function G(Ae,Be,Pe){if(Pe in U){var me=U[Pe],De=this[Pe],ce;(Ae?b(me)&&b(me[0]):b(me))?this[Pe]=ce=[Be(me[0]),Be(me[1]),Be(me[2])]:this[Pe]=ce=[Be(me),Be(me),Be(me)];for(var je=0;je<3;++je)if(ce[je]!==De[je])return!0}return!1}var Z=G.bind(this,!1,Number),j=G.bind(this,!1,Boolean),N=G.bind(this,!1,String),H=G.bind(this,!0,function(Ae){if(b(Ae)){if(Ae.length===3)return[+Ae[0],+Ae[1],+Ae[2],1];if(Ae.length===4)return[+Ae[0],+Ae[1],+Ae[2],+Ae[3]]}return[0,0,0,1]}),re,oe=!1,_e=!1;if("bounds"in U)for(var Ce=U.bounds,Le=0;Le<2;++Le)for(var ge=0;ge<3;++ge)Ce[Le][ge]!==this.bounds[Le][ge]&&(_e=!0),this.bounds[Le][ge]=Ce[Le][ge];if("ticks"in U){re=U.ticks,oe=!0,this.autoTicks=!1;for(var Le=0;Le<3;++Le)this.tickSpacing[Le]=0}else Z("tickSpacing")&&(this.autoTicks=!0,_e=!0);if(this._firstInit&&("ticks"in U||"tickSpacing"in U||(this.autoTicks=!0),_e=!0,oe=!0,this._firstInit=!1),_e&&this.autoTicks&&(re=f.create(this.bounds,this.tickSpacing),oe=!0),oe){for(var Le=0;Le<3;++Le)re[Le].sort(function(Be,Pe){return Be.x-Pe.x});f.equal(re,this.ticks)?oe=!1:this.ticks=re}j("tickEnable"),N("tickFont")&&(oe=!0),N("tickFontStyle")&&(oe=!0),N("tickFontWeight")&&(oe=!0),N("tickFontVariant")&&(oe=!0),Z("tickSize"),Z("tickAngle"),Z("tickPad"),H("tickColor");var ie=N("labels");N("labelFont")&&(ie=!0),N("labelFontStyle")&&(ie=!0),N("labelFontWeight")&&(ie=!0),N("labelFontVariant")&&(ie=!0),j("labelEnable"),Z("labelSize"),Z("labelPad"),H("labelColor"),j("lineEnable"),j("lineMirror"),Z("lineWidth"),H("lineColor"),j("lineTickEnable"),j("lineTickMirror"),Z("lineTickLength"),Z("lineTickWidth"),H("lineTickColor"),j("gridEnable"),Z("gridWidth"),H("gridColor"),j("zeroEnable"),H("zeroLineColor"),Z("zeroLineWidth"),j("backgroundEnable"),H("backgroundColor");var Se=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],Ee=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(ie||oe)&&this._text.update(this.bounds,this.labels,Se,this.ticks,Ee):this._text=s(this.gl,this.bounds,this.labels,Se,this.ticks,Ee),this._lines&&oe&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=l(this.gl,this.bounds,this.ticks))};function T(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var L=[new T,new T,new T];function x(U,G,Z,j,N){for(var H=U.primalOffset,re=U.primalMinor,oe=U.mirrorOffset,_e=U.mirrorMinor,Ce=j[G],Le=0;Le<3;++Le)if(G!==Le){var ge=H,ie=oe,Se=re,Ee=_e;Ce&1<0?(Se[Le]=-1,Ee[Le]=0):(Se[Le]=0,Ee[Le]=1)}}var C=[0,0,0],M={model:h,view:h,projection:h,_ortho:!1};E.isOpaque=function(){return!0},E.isTransparent=function(){return!1},E.drawTransparent=function(U){};var g=0,P=[0,0,0],A=[0,0,0],z=[0,0,0];E.draw=function(U){U=U||M;for(var Pe=this.gl,G=U.model||h,Z=U.view||h,j=U.projection||h,N=this.bounds,H=U._ortho||!1,re=c(G,Z,j,N,H),oe=re.cubeEdges,_e=re.axis,Ce=Z[12],Le=Z[13],ge=Z[14],ie=Z[15],Se=H?2:1,Ee=Se*this.pixelRatio*(j[3]*Ce+j[7]*Le+j[11]*ge+j[15]*ie)/Pe.drawingBufferHeight,Ae=0;Ae<3;++Ae)this.lastCubeProps.cubeEdges[Ae]=oe[Ae],this.lastCubeProps.axis[Ae]=_e[Ae];for(var Be=L,Ae=0;Ae<3;++Ae)x(L[Ae],Ae,this.bounds,oe,_e);for(var Pe=this.gl,me=C,Ae=0;Ae<3;++Ae)this.backgroundEnable[Ae]?me[Ae]=_e[Ae]:me[Ae]=0;this._background.draw(G,Z,j,N,me,this.backgroundColor),this._lines.bind(G,Z,j,this);for(var Ae=0;Ae<3;++Ae){var De=[0,0,0];_e[Ae]>0?De[Ae]=N[1][Ae]:De[Ae]=N[0][Ae];for(var ce=0;ce<2;++ce){var je=(Ae+1+ce)%3,lt=(Ae+1+(ce^1))%3;this.gridEnable[je]&&this._lines.drawGrid(je,lt,this.bounds,De,this.gridColor[je],this.gridWidth[je]*this.pixelRatio)}for(var ce=0;ce<2;++ce){var je=(Ae+1+ce)%3,lt=(Ae+1+(ce^1))%3;this.zeroEnable[lt]&&Math.min(N[0][lt],N[1][lt])<=0&&Math.max(N[0][lt],N[1][lt])>=0&&this._lines.drawZero(je,lt,this.bounds,De,this.zeroLineColor[lt],this.zeroLineWidth[lt]*this.pixelRatio)}}for(var Ae=0;Ae<3;++Ae){this.lineEnable[Ae]&&this._lines.drawAxisLine(Ae,this.bounds,Be[Ae].primalOffset,this.lineColor[Ae],this.lineWidth[Ae]*this.pixelRatio),this.lineMirror[Ae]&&this._lines.drawAxisLine(Ae,this.bounds,Be[Ae].mirrorOffset,this.lineColor[Ae],this.lineWidth[Ae]*this.pixelRatio);for(var pt=p(P,Be[Ae].primalMinor),Vt=p(A,Be[Ae].mirrorMinor),ot=this.lineTickLength,ce=0;ce<3;++ce){var ut=Ee/G[5*ce];pt[ce]*=ot[ce]*ut,Vt[ce]*=ot[ce]*ut}this.lineTickEnable[Ae]&&this._lines.drawAxisTicks(Ae,Be[Ae].primalOffset,pt,this.lineTickColor[Ae],this.lineTickWidth[Ae]*this.pixelRatio),this.lineTickMirror[Ae]&&this._lines.drawAxisTicks(Ae,Be[Ae].mirrorOffset,Vt,this.lineTickColor[Ae],this.lineTickWidth[Ae]*this.pixelRatio)}this._lines.unbind(),this._text.bind(G,Z,j,this.pixelRatio);var Wt,Nt=.5,$t,sr;function Tr(_t){sr=[0,0,0],sr[_t]=1}function fr(_t,It,mt){var er=(_t+1)%3,lr=(_t+2)%3,wr=It[er],Lr=It[lr],ti=mt[er],Br=mt[lr];if(wr>0&&Br>0){Tr(er);return}else if(wr>0&&Br<0){Tr(er);return}else if(wr<0&&Br>0){Tr(er);return}else if(wr<0&&Br<0){Tr(er);return}else if(Lr>0&&ti>0){Tr(lr);return}else if(Lr>0&&ti<0){Tr(lr);return}else if(Lr<0&&ti>0){Tr(lr);return}else if(Lr<0&&ti<0){Tr(lr);return}}for(var Ae=0;Ae<3;++Ae){for(var $e=Be[Ae].primalMinor,St=Be[Ae].mirrorMinor,Qt=p(z,Be[Ae].primalOffset),ce=0;ce<3;++ce)this.lineTickEnable[Ae]&&(Qt[ce]+=Ee*$e[ce]*Math.max(this.lineTickLength[ce],0)/G[5*ce]);var Gt=[0,0,0];if(Gt[Ae]=1,this.tickEnable[Ae]){this.tickAngle[Ae]===-3600?(this.tickAngle[Ae]=0,this.tickAlign[Ae]="auto"):this.tickAlign[Ae]=-1,$t=1,Wt=[this.tickAlign[Ae],Nt,$t],Wt[0]==="auto"?Wt[0]=g:Wt[0]=parseInt(""+Wt[0]),sr=[0,0,0],fr(Ae,$e,St);for(var ce=0;ce<3;++ce)Qt[ce]+=Ee*$e[ce]*this.tickPad[ce]/G[5*ce];this._text.drawTicks(Ae,this.tickSize[Ae],this.tickAngle[Ae],Qt,this.tickColor[Ae],Gt,sr,Wt)}if(this.labelEnable[Ae]){$t=0,sr=[0,0,0],this.labels[Ae].length>4&&(Tr(Ae),$t=1),Wt=[this.labelAlign[Ae],Nt,$t],Wt[0]==="auto"?Wt[0]=g:Wt[0]=parseInt(""+Wt[0]);for(var ce=0;ce<3;++ce)Qt[ce]+=Ee*$e[ce]*this.labelPad[ce]/G[5*ce];Qt[Ae]+=.5*(N[0][Ae]+N[1][Ae]),this._text.drawLabel(Ae,this.labelSize[Ae],this.labelAngle[Ae],Qt,this.labelColor[Ae],[0,0,0],sr,Wt)}}this._text.unbind()},E.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function O(U,G){var Z=new k(U);return Z.update(G),Z}},3840:function(i){"use strict";i.exports=L;var a=0,o=1;function s(x,C,M,g,P,A){this._color=x,this.key=C,this.value=M,this.left=g,this.right=P,this._count=A}function l(x){return new s(x._color,x.key,x.value,x.left,x.right,x._count)}function u(x,C){return new s(x,C.key,C.value,C.left,C.right,C._count)}function c(x){x._count=1+(x.left?x.left._count:0)+(x.right?x.right._count:0)}function f(x,C){this._compare=x,this.root=C}var h=f.prototype;Object.defineProperty(h,"keys",{get:function(){var x=[];return this.forEach(function(C,M){x.push(C)}),x}}),Object.defineProperty(h,"values",{get:function(){var x=[];return this.forEach(function(C,M){x.push(M)}),x}}),Object.defineProperty(h,"length",{get:function(){return this.root?this.root._count:0}}),h.insert=function(x,C){for(var M=this._compare,g=this.root,P=[],A=[];g;){var z=M(x,g.key);P.push(g),A.push(z),z<=0?g=g.left:g=g.right}P.push(new s(a,x,C,null,null,1));for(var O=P.length-2;O>=0;--O){var g=P[O];A[O]<=0?P[O]=new s(g._color,g.key,g.value,P[O+1],g.right,g._count+1):P[O]=new s(g._color,g.key,g.value,g.left,P[O+1],g._count+1)}for(var O=P.length-1;O>1;--O){var U=P[O-1],g=P[O];if(U._color===o||g._color===o)break;var G=P[O-2];if(G.left===U)if(U.left===g){var Z=G.right;if(Z&&Z._color===a)U._color=o,G.right=u(o,Z),G._color=a,O-=1;else{if(G._color=a,G.left=U.right,U._color=o,U.right=G,P[O-2]=U,P[O-1]=g,c(G),c(U),O>=3){var j=P[O-3];j.left===G?j.left=U:j.right=U}break}}else{var Z=G.right;if(Z&&Z._color===a)U._color=o,G.right=u(o,Z),G._color=a,O-=1;else{if(U.right=g.left,G._color=a,G.left=g.right,g._color=o,g.left=U,g.right=G,P[O-2]=g,P[O-1]=U,c(G),c(U),c(g),O>=3){var j=P[O-3];j.left===G?j.left=g:j.right=g}break}}else if(U.right===g){var Z=G.left;if(Z&&Z._color===a)U._color=o,G.left=u(o,Z),G._color=a,O-=1;else{if(G._color=a,G.right=U.left,U._color=o,U.left=G,P[O-2]=U,P[O-1]=g,c(G),c(U),O>=3){var j=P[O-3];j.right===G?j.right=U:j.left=U}break}}else{var Z=G.left;if(Z&&Z._color===a)U._color=o,G.left=u(o,Z),G._color=a,O-=1;else{if(U.left=g.right,G._color=a,G.right=g.left,g._color=o,g.right=U,g.left=G,P[O-2]=g,P[O-1]=U,c(G),c(U),c(g),O>=3){var j=P[O-3];j.right===G?j.right=g:j.left=g}break}}}return P[0]._color=o,new f(M,P[0])};function d(x,C){if(C.left){var M=d(x,C.left);if(M)return M}var M=x(C.key,C.value);if(M)return M;if(C.right)return d(x,C.right)}function v(x,C,M,g){var P=C(x,g.key);if(P<=0){if(g.left){var A=v(x,C,M,g.left);if(A)return A}var A=M(g.key,g.value);if(A)return A}if(g.right)return v(x,C,M,g.right)}function _(x,C,M,g,P){var A=M(x,P.key),z=M(C,P.key),O;if(A<=0&&(P.left&&(O=_(x,C,M,g,P.left),O)||z>0&&(O=g(P.key,P.value),O)))return O;if(z>0&&P.right)return _(x,C,M,g,P.right)}h.forEach=function(C,M,g){if(this.root)switch(arguments.length){case 1:return d(C,this.root);case 2:return v(M,this._compare,C,this.root);case 3:return this._compare(M,g)>=0?void 0:_(M,g,this._compare,C,this.root)}},Object.defineProperty(h,"begin",{get:function(){for(var x=[],C=this.root;C;)x.push(C),C=C.left;return new b(this,x)}}),Object.defineProperty(h,"end",{get:function(){for(var x=[],C=this.root;C;)x.push(C),C=C.right;return new b(this,x)}}),h.at=function(x){if(x<0)return new b(this,[]);for(var C=this.root,M=[];;){if(M.push(C),C.left){if(x=C.right._count)break;C=C.right}else break}return new b(this,[])},h.ge=function(x){for(var C=this._compare,M=this.root,g=[],P=0;M;){var A=C(x,M.key);g.push(M),A<=0&&(P=g.length),A<=0?M=M.left:M=M.right}return g.length=P,new b(this,g)},h.gt=function(x){for(var C=this._compare,M=this.root,g=[],P=0;M;){var A=C(x,M.key);g.push(M),A<0&&(P=g.length),A<0?M=M.left:M=M.right}return g.length=P,new b(this,g)},h.lt=function(x){for(var C=this._compare,M=this.root,g=[],P=0;M;){var A=C(x,M.key);g.push(M),A>0&&(P=g.length),A<=0?M=M.left:M=M.right}return g.length=P,new b(this,g)},h.le=function(x){for(var C=this._compare,M=this.root,g=[],P=0;M;){var A=C(x,M.key);g.push(M),A>=0&&(P=g.length),A<0?M=M.left:M=M.right}return g.length=P,new b(this,g)},h.find=function(x){for(var C=this._compare,M=this.root,g=[];M;){var P=C(x,M.key);if(g.push(M),P===0)return new b(this,g);P<=0?M=M.left:M=M.right}return new b(this,[])},h.remove=function(x){var C=this.find(x);return C?C.remove():this},h.get=function(x){for(var C=this._compare,M=this.root;M;){var g=C(x,M.key);if(g===0)return M.value;g<=0?M=M.left:M=M.right}};function b(x,C){this.tree=x,this._stack=C}var p=b.prototype;Object.defineProperty(p,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(p,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),p.clone=function(){return new b(this.tree,this._stack.slice())};function k(x,C){x.key=C.key,x.value=C.value,x.left=C.left,x.right=C.right,x._color=C._color,x._count=C._count}function E(x){for(var C,M,g,P,A=x.length-1;A>=0;--A){if(C=x[A],A===0){C._color=o;return}if(M=x[A-1],M.left===C){if(g=M.right,g.right&&g.right._color===a){if(g=M.right=l(g),P=g.right=l(g.right),M.right=g.left,g.left=M,g.right=P,g._color=M._color,C._color=o,M._color=o,P._color=o,c(M),c(g),A>1){var z=x[A-2];z.left===M?z.left=g:z.right=g}x[A-1]=g;return}else if(g.left&&g.left._color===a){if(g=M.right=l(g),P=g.left=l(g.left),M.right=P.left,g.left=P.right,P.left=M,P.right=g,P._color=M._color,M._color=o,g._color=o,C._color=o,c(M),c(g),c(P),A>1){var z=x[A-2];z.left===M?z.left=P:z.right=P}x[A-1]=P;return}if(g._color===o)if(M._color===a){M._color=o,M.right=u(a,g);return}else{M.right=u(a,g);continue}else{if(g=l(g),M.right=g.left,g.left=M,g._color=M._color,M._color=a,c(M),c(g),A>1){var z=x[A-2];z.left===M?z.left=g:z.right=g}x[A-1]=g,x[A]=M,A+11){var z=x[A-2];z.right===M?z.right=g:z.left=g}x[A-1]=g;return}else if(g.right&&g.right._color===a){if(g=M.left=l(g),P=g.right=l(g.right),M.left=P.right,g.right=P.left,P.right=M,P.left=g,P._color=M._color,M._color=o,g._color=o,C._color=o,c(M),c(g),c(P),A>1){var z=x[A-2];z.right===M?z.right=P:z.left=P}x[A-1]=P;return}if(g._color===o)if(M._color===a){M._color=o,M.left=u(a,g);return}else{M.left=u(a,g);continue}else{if(g=l(g),M.left=g.right,g.right=M,g._color=M._color,M._color=a,c(M),c(g),A>1){var z=x[A-2];z.right===M?z.right=g:z.left=g}x[A-1]=g,x[A]=M,A+1=0;--g){var M=x[g];M.left===x[g+1]?C[g]=new s(M._color,M.key,M.value,C[g+1],M.right,M._count):C[g]=new s(M._color,M.key,M.value,M.left,C[g+1],M._count)}if(M=C[C.length-1],M.left&&M.right){var P=C.length;for(M=M.left;M.right;)C.push(M),M=M.right;var A=C[P-1];C.push(new s(M._color,A.key,A.value,M.left,M.right,M._count)),C[P-1].key=M.key,C[P-1].value=M.value;for(var g=C.length-2;g>=P;--g)M=C[g],C[g]=new s(M._color,M.key,M.value,M.left,C[g+1],M._count);C[P-1].left=C[P]}if(M=C[C.length-1],M._color===a){var z=C[C.length-2];z.left===M?z.left=null:z.right===M&&(z.right=null),C.pop();for(var g=0;g0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(p,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(p,"index",{get:function(){var x=0,C=this._stack;if(C.length===0){var M=this.tree.root;return M?M._count:0}else C[C.length-1].left&&(x=C[C.length-1].left._count);for(var g=C.length-2;g>=0;--g)C[g+1]===C[g].right&&(++x,C[g].left&&(x+=C[g].left._count));return x},enumerable:!0}),p.next=function(){var x=this._stack;if(x.length!==0){var C=x[x.length-1];if(C.right)for(C=C.right;C;)x.push(C),C=C.left;else for(x.pop();x.length>0&&x[x.length-1].right===C;)C=x[x.length-1],x.pop()}},Object.defineProperty(p,"hasNext",{get:function(){var x=this._stack;if(x.length===0)return!1;if(x[x.length-1].right)return!0;for(var C=x.length-1;C>0;--C)if(x[C-1].left===x[C])return!0;return!1}}),p.update=function(x){var C=this._stack;if(C.length===0)throw new Error("Can't update empty node!");var M=new Array(C.length),g=C[C.length-1];M[M.length-1]=new s(g._color,g.key,x,g.left,g.right,g._count);for(var P=C.length-2;P>=0;--P)g=C[P],g.left===C[P+1]?M[P]=new s(g._color,g.key,g.value,M[P+1],g.right,g._count):M[P]=new s(g._color,g.key,g.value,g.left,M[P+1],g._count);return new f(this.tree._compare,M[0])},p.prev=function(){var x=this._stack;if(x.length!==0){var C=x[x.length-1];if(C.left)for(C=C.left;C;)x.push(C),C=C.right;else for(x.pop();x.length>0&&x[x.length-1].left===C;)C=x[x.length-1],x.pop()}},Object.defineProperty(p,"hasPrev",{get:function(){var x=this._stack;if(x.length===0)return!1;if(x[x.length-1].left)return!0;for(var C=x.length-1;C>0;--C)if(x[C-1].right===x[C])return!0;return!1}});function T(x,C){return xC?1:0}function L(x){return new f(x||T,null)}},3865:function(i,a,o){"use strict";var s=o(869);i.exports=l;function l(u,c){return s(u[0].mul(c[1]).add(c[0].mul(u[1])),u[1].mul(c[1]))}},3952:function(i,a,o){"use strict";i.exports=u;var s=o(3250);function l(c,f){for(var h=new Array(f+1),d=0;d20?52:h+32}},4040:function(i){i.exports=a;function a(o,s,l,u,c,f,h){var d=1/(s-l),v=1/(u-c),_=1/(f-h);return o[0]=-2*d,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*v,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*_,o[11]=0,o[12]=(s+l)*d,o[13]=(c+u)*v,o[14]=(h+f)*_,o[15]=1,o}},4041:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],d=l[1],v=l[2],_=l[3],b=_*u+d*f-v*c,p=_*c+v*u-h*f,k=_*f+h*c-d*u,E=-h*u-d*c-v*f;return o[0]=b*_+E*-h+p*-v-k*-d,o[1]=p*_+E*-d+k*-h-b*-v,o[2]=k*_+E*-v+b*-d-p*-h,o[3]=s[3],o}},4081:function(i){"use strict";i.exports=a;function a(o,s,l,u,c,f,h,d,v,_){var b=s+f+_;if(p>0){var p=Math.sqrt(b+1);o[0]=.5*(h-v)/p,o[1]=.5*(d-u)/p,o[2]=.5*(l-f)/p,o[3]=.5*p}else{var k=Math.max(s,f,_),p=Math.sqrt(2*k-b+1);s>=k?(o[0]=.5*p,o[1]=.5*(c+l)/p,o[2]=.5*(d+u)/p,o[3]=.5*(h-v)/p):f>=k?(o[0]=.5*(l+c)/p,o[1]=.5*p,o[2]=.5*(v+h)/p,o[3]=.5*(d-u)/p):(o[0]=.5*(u+d)/p,o[1]=.5*(h+v)/p,o[2]=.5*p,o[3]=.5*(l-c)/p)}return o}},4100:function(i,a,o){"use strict";var s=o(4437),l=o(3837),u=o(5445),c=o(4449),f=o(3589),h=o(2260),d=o(7169),v=o(351),_=o(4772),b=o(4040),p=o(799),k=o(9216)({tablet:!0,featureDetect:!0});i.exports={createScene:C,createCamera:s};function E(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function T(g,P){var A=null;try{A=g.getContext("webgl",P),A||(A=g.getContext("experimental-webgl",P))}catch(z){return null}return A}function L(g){var P=Math.round(Math.log(Math.abs(g))/Math.log(10));if(P<0){var A=Math.round(Math.pow(10,-P));return Math.ceil(g*A)/A}else if(P>0){var A=Math.round(Math.pow(10,P));return Math.ceil(g/A)*A}return Math.ceil(g)}function x(g){return typeof g=="boolean"?g:!0}function C(g){g=g||{},g.camera=g.camera||{};var P=g.canvas;if(!P)if(P=document.createElement("canvas"),g.container){var A=g.container;A.appendChild(P)}else document.body.appendChild(P);var z=g.gl;if(z||(g.glOptions&&(k=!!g.glOptions.preserveDrawingBuffer),z=T(P,g.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:k})),!z)throw new Error("webgl not supported");var O=g.bounds||[[-10,-10,-10],[10,10,10]],U=new E,G=h(z,z.drawingBufferWidth,z.drawingBufferHeight,{preferFloat:!k}),Z=p(z),j=g.cameraObject&&g.cameraObject._ortho===!0||g.camera.projection&&g.camera.projection.type==="orthographic"||!1,N={eye:g.camera.eye||[2,0,0],center:g.camera.center||[0,0,0],up:g.camera.up||[0,1,0],zoomMin:g.camera.zoomMax||.1,zoomMax:g.camera.zoomMin||100,mode:g.camera.mode||"turntable",_ortho:j},H=g.axes||{},re=l(z,H);re.enable=!H.disable;var oe=g.spikes||{},_e=c(z,oe),Ce=[],Le=[],ge=[],ie=[],Se=!0,Pe=!0,Ee=new Array(16),Ae=new Array(16),Be={view:null,projection:Ee,model:Ae,_ortho:!1},Pe=!0,me=[z.drawingBufferWidth,z.drawingBufferHeight],De=g.cameraObject||s(P,N),ce={gl:z,contextLost:!1,pixelRatio:g.pixelRatio||1,canvas:P,selection:U,camera:De,axes:re,axesPixels:null,spikes:_e,bounds:O,objects:Ce,shape:me,aspect:g.aspectRatio||[1,1,1],pickRadius:g.pickRadius||10,zNear:g.zNear||.01,zFar:g.zFar||1e3,fovy:g.fovy||Math.PI/4,clearColor:g.clearColor||[0,0,0,0],autoResize:x(g.autoResize),autoBounds:x(g.autoBounds),autoScale:!!g.autoScale,autoCenter:x(g.autoCenter),clipToBounds:x(g.clipToBounds),snapToData:!!g.snapToData,onselect:g.onselect||null,onrender:g.onrender||null,onclick:g.onclick||null,cameraParams:Be,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(sr){this.aspect[0]=sr.x,this.aspect[1]=sr.y,this.aspect[2]=sr.z,Pe=!0},setBounds:function(sr,Tr){this.bounds[0][sr]=Tr.min,this.bounds[1][sr]=Tr.max},setClearColor:function(sr){this.clearColor=sr},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},je=[z.drawingBufferWidth/ce.pixelRatio|0,z.drawingBufferHeight/ce.pixelRatio|0];function lt(){if(!ce._stopped&&ce.autoResize){var sr=P.parentNode,Tr=1,fr=1;sr&&sr!==document.body?(Tr=sr.clientWidth,fr=sr.clientHeight):(Tr=window.innerWidth,fr=window.innerHeight);var $e=Math.ceil(Tr*ce.pixelRatio)|0,St=Math.ceil(fr*ce.pixelRatio)|0;if($e!==P.width||St!==P.height){P.width=$e,P.height=St;var Qt=P.style;Qt.position=Qt.position||"absolute",Qt.left="0px",Qt.top="0px",Qt.width=Tr+"px",Qt.height=fr+"px",Se=!0}}}ce.autoResize&<(),window.addEventListener("resize",lt);function pt(){for(var sr=Ce.length,Tr=ie.length,fr=0;fr0&&ge[Tr-1]===0;)ge.pop(),ie.pop().dispose()}ce.update=function(sr){ce._stopped||(sr=sr||{},Se=!0,Pe=!0)},ce.add=function(sr){ce._stopped||(sr.axes=re,Ce.push(sr),Le.push(-1),Se=!0,Pe=!0,pt())},ce.remove=function(sr){if(!ce._stopped){var Tr=Ce.indexOf(sr);Tr<0||(Ce.splice(Tr,1),Le.pop(),Se=!0,Pe=!0,pt())}},ce.dispose=function(){if(!ce._stopped&&(ce._stopped=!0,window.removeEventListener("resize",lt),P.removeEventListener("webglcontextlost",Vt),ce.mouseListener.enabled=!1,!ce.contextLost)){re.dispose(),_e.dispose();for(var sr=0;srU.distance)continue;for(var mt=0;mt_;){var M=p[C-2],g=p[C-1];if(Mp[b+1]:!0}function d(_,b,p,k){_*=2;var E=k[_];return E>1,x=L-k,C=L+k,M=E,g=x,P=L,A=C,z=T,O=_+1,U=b-1,G=0;h(M,g,p)&&(G=M,M=g,g=G),h(A,z,p)&&(G=A,A=z,z=G),h(M,P,p)&&(G=M,M=P,P=G),h(g,P,p)&&(G=g,g=P,P=G),h(M,A,p)&&(G=M,M=A,A=G),h(P,A,p)&&(G=P,P=A,A=G),h(g,z,p)&&(G=g,g=z,z=G),h(g,P,p)&&(G=g,g=P,P=G),h(A,z,p)&&(G=A,A=z,z=G);for(var Z=p[2*g],j=p[2*g+1],N=p[2*A],H=p[2*A+1],re=2*M,oe=2*P,_e=2*z,Ce=2*E,Le=2*L,ge=2*T,ie=0;ie<2;++ie){var Se=p[re+ie],Ee=p[oe+ie],Ae=p[_e+ie];p[Ce+ie]=Se,p[Le+ie]=Ee,p[ge+ie]=Ae}u(x,_,p),u(C,b,p);for(var Be=O;Be<=U;++Be)if(d(Be,Z,j,p))Be!==O&&l(Be,O,p),++O;else if(!d(Be,N,H,p))for(;;)if(d(U,N,H,p)){d(U,Z,j,p)?(c(Be,O,U,p),++O,--U):(l(Be,U,p),--U);break}else{if(--U0)if(E[0]!==L[1][0])T=k,k=k.right;else{var g=v(k.right,E);if(g)return g;k=k.left}else{if(E[0]!==L[1][0])return k;var g=v(k.right,E);if(g)return g;k=k.left}}return T}h.castUp=function(k){var E=s.le(this.coordinates,k[0]);if(E<0)return-1;var T=this.slabs[E],L=v(this.slabs[E],k),x=-1;if(L&&(x=L.value),this.coordinates[E]===k[0]){var C=null;if(L&&(C=L.key),E>0){var M=v(this.slabs[E-1],k);M&&(C?c(M.key,C)>0&&(C=M.key,x=M.value):(x=M.value,C=M.key))}var g=this.horizontal[E];if(g.length>0){var P=s.ge(g,k[1],d);if(P=g.length)return x;A=g[P]}}if(A.start)if(C){var z=u(C[0],C[1],[k[0],A.y]);C[0][0]>C[1][0]&&(z=-z),z>0&&(x=A.index)}else x=A.index;else A.y!==k[1]&&(x=A.index)}}}return x};function _(k,E,T,L){this.y=k,this.index=E,this.start=T,this.closed=L}function b(k,E,T,L){this.x=k,this.segment=E,this.create=T,this.index=L}function p(k){for(var E=k.length,T=2*E,L=new Array(T),x=0;xMath.abs(g))p.rotate(z,0,0,-M*P*Math.PI*x.rotateSpeed/window.innerWidth);else if(!x._ortho){var O=-x.zoomSpeed*A*g/window.innerHeight*(z-p.lastT())/20;p.pan(z,0,0,E*(Math.exp(O)-1))}}},!0)},x.enableMouseListeners(),x}},4449:function(i,a,o){"use strict";var s=o(2762),l=o(8116),u=o(1493);i.exports=b;var c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function f(p,k,E,T){this.gl=p,this.buffer=k,this.vao=E,this.shader=T,this.pixelRatio=1,this.bounds=[[-1e3,-1e3,-1e3],[1e3,1e3,1e3]],this.position=[0,0,0],this.lineWidth=[2,2,2],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.enabled=[!0,!0,!0],this.drawSides=[!0,!0,!0],this.axes=null}var h=f.prototype,d=[0,0,0],v=[0,0,0],_=[0,0];h.isTransparent=function(){return!1},h.drawTransparent=function(p){},h.draw=function(p){var k=this.gl,E=this.vao,T=this.shader;E.bind(),T.bind();var L=p.model||c,x=p.view||c,C=p.projection||c,M;this.axes&&(M=this.axes.lastCubeProps.axis);for(var g=d,P=v,A=0;A<3;++A)M&&M[A]<0?(g[A]=this.bounds[0][A],P[A]=this.bounds[1][A]):(g[A]=this.bounds[1][A],P[A]=this.bounds[0][A]);_[0]=k.drawingBufferWidth,_[1]=k.drawingBufferHeight,T.uniforms.model=L,T.uniforms.view=x,T.uniforms.projection=C,T.uniforms.coordinates=[this.position,g,P],T.uniforms.colors=this.colors,T.uniforms.screenShape=_;for(var A=0;A<3;++A)T.uniforms.lineWidth=this.lineWidth[A]*this.pixelRatio,this.enabled[A]&&(E.draw(k.TRIANGLES,6,6*A),this.drawSides[A]&&E.draw(k.TRIANGLES,12,18+12*A));E.unbind()},h.update=function(p){p&&("bounds"in p&&(this.bounds=p.bounds),"position"in p&&(this.position=p.position),"lineWidth"in p&&(this.lineWidth=p.lineWidth),"colors"in p&&(this.colors=p.colors),"enabled"in p&&(this.enabled=p.enabled),"drawSides"in p&&(this.drawSides=p.drawSides))},h.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function b(p,k){var E=[];function T(g,P,A,z,O,U){var G=[g,P,A,0,0,0,1];G[z+3]=1,G[z]=O,E.push.apply(E,G),G[6]=-1,E.push.apply(E,G),G[z]=U,E.push.apply(E,G),E.push.apply(E,G),G[6]=1,E.push.apply(E,G),G[z]=O,E.push.apply(E,G)}T(0,0,0,0,0,1),T(0,0,0,1,0,1),T(0,0,0,2,0,1),T(1,0,0,1,-1,1),T(1,0,0,2,-1,1),T(0,1,0,0,-1,1),T(0,1,0,2,-1,1),T(0,0,1,0,-1,1),T(0,0,1,1,-1,1);var L=s(p,E),x=l(p,[{type:p.FLOAT,buffer:L,size:3,offset:0,stride:28},{type:p.FLOAT,buffer:L,size:3,offset:12,stride:28},{type:p.FLOAT,buffer:L,size:1,offset:24,stride:28}]),C=u(p);C.attributes.position.location=0,C.attributes.color.location=1,C.attributes.weight.location=2;var M=new f(p,L,x,C);return M.update(k),M}},4494:function(i){i.exports=a;function a(o,s){return o[0]=1/s[0],o[1]=1/s[1],o[2]=1/s[2],o[3]=1/s[3],o}},4505:function(i,a,o){i.exports=o(5847)},4578:function(i){i.exports=a;function a(o,s,l,u,c){return o[0]=s,o[1]=l,o[2]=u,o[3]=c,o}},4623:function(i){"use strict";"use restrict";i.exports=a;function a(o){this.roots=new Array(o),this.ranks=new Array(o);for(var s=0;s0)return 1<=0)return 1<=0;--p)h[p]=d*s[p]+v*l[p]+_*u[p]+b*c[p];return h}return d*s+v*l+_*u[p]+b*c}function o(s,l,u,c,f,h){var d=f-1,v=f*f,_=d*d,b=(1+2*f)*_,p=f*_,k=v*(3-2*f),E=v*d;if(s.length){h||(h=new Array(s.length));for(var T=s.length-1;T>=0;--T)h[T]=b*s[T]+p*l[T]+k*u[T]+E*c[T];return h}return b*s+p*l+k*u+E*c}i.exports=o,i.exports.derivative=a},4772:function(i){i.exports=a;function a(o,s,l,u,c){var f=1/Math.tan(s/2),h=1/(u-c);return o[0]=f/l,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=f,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=(c+u)*h,o[11]=-1,o[12]=0,o[13]=0,o[14]=2*c*u*h,o[15]=0,o}},4793:function(i,a,o){"use strict";var s;function l(Ie,xe){if(!(Ie instanceof xe))throw new TypeError("Cannot call a class as a function")}function u(Ie,xe){for(var ke=0;keM)throw new RangeError('The value "'+Ie+'" is invalid for option "size"');var xe=new Uint8Array(Ie);return Object.setPrototypeOf(xe,A.prototype),xe}function A(Ie,xe,ke){if(typeof Ie=="number"){if(typeof xe=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return G(Ie)}return z(Ie,xe,ke)}A.poolSize=8192;function z(Ie,xe,ke){if(typeof Ie=="string")return Z(Ie,xe);if(ArrayBuffer.isView(Ie))return N(Ie);if(Ie==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+T(Ie));if(Ge(Ie,ArrayBuffer)||Ie&&Ge(Ie.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(Ge(Ie,SharedArrayBuffer)||Ie&&Ge(Ie.buffer,SharedArrayBuffer)))return H(Ie,xe,ke);if(typeof Ie=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var vt=Ie.valueOf&&Ie.valueOf();if(vt!=null&&vt!==Ie)return A.from(vt,xe,ke);var ir=re(Ie);if(ir)return ir;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof Ie[Symbol.toPrimitive]=="function")return A.from(Ie[Symbol.toPrimitive]("string"),xe,ke);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+T(Ie))}A.from=function(Ie,xe,ke){return z(Ie,xe,ke)},Object.setPrototypeOf(A.prototype,Uint8Array.prototype),Object.setPrototypeOf(A,Uint8Array);function O(Ie){if(typeof Ie!="number")throw new TypeError('"size" argument must be of type number');if(Ie<0)throw new RangeError('The value "'+Ie+'" is invalid for option "size"')}function U(Ie,xe,ke){return O(Ie),Ie<=0?P(Ie):xe!==void 0?typeof ke=="string"?P(Ie).fill(xe,ke):P(Ie).fill(xe):P(Ie)}A.alloc=function(Ie,xe,ke){return U(Ie,xe,ke)};function G(Ie){return O(Ie),P(Ie<0?0:oe(Ie)|0)}A.allocUnsafe=function(Ie){return G(Ie)},A.allocUnsafeSlow=function(Ie){return G(Ie)};function Z(Ie,xe){if((typeof xe!="string"||xe==="")&&(xe="utf8"),!A.isEncoding(xe))throw new TypeError("Unknown encoding: "+xe);var ke=Ce(Ie,xe)|0,vt=P(ke),ir=vt.write(Ie,xe);return ir!==ke&&(vt=vt.slice(0,ir)),vt}function j(Ie){for(var xe=Ie.length<0?0:oe(Ie.length)|0,ke=P(xe),vt=0;vt=M)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+M.toString(16)+" bytes");return Ie|0}function _e(Ie){return+Ie!=Ie&&(Ie=0),A.alloc(+Ie)}A.isBuffer=function(xe){return xe!=null&&xe._isBuffer===!0&&xe!==A.prototype},A.compare=function(xe,ke){if(Ge(xe,Uint8Array)&&(xe=A.from(xe,xe.offset,xe.byteLength)),Ge(ke,Uint8Array)&&(ke=A.from(ke,ke.offset,ke.byteLength)),!A.isBuffer(xe)||!A.isBuffer(ke))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(xe===ke)return 0;for(var vt=xe.length,ir=ke.length,ar=0,vr=Math.min(vt,ir);arir.length?(A.isBuffer(vr)||(vr=A.from(vr)),vr.copy(ir,ar)):Uint8Array.prototype.set.call(ir,vr,ar);else if(A.isBuffer(vr))vr.copy(ir,ar);else throw new TypeError('"list" argument must be an Array of Buffers');ar+=vr.length}return ir};function Ce(Ie,xe){if(A.isBuffer(Ie))return Ie.length;if(ArrayBuffer.isView(Ie)||Ge(Ie,ArrayBuffer))return Ie.byteLength;if(typeof Ie!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+T(Ie));var ke=Ie.length,vt=arguments.length>2&&arguments[2]===!0;if(!vt&&ke===0)return 0;for(var ir=!1;;)switch(xe){case"ascii":case"latin1":case"binary":return ke;case"utf8":case"utf-8":return Lr(Ie).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ke*2;case"hex":return ke>>>1;case"base64":return Vr(Ie).length;default:if(ir)return vt?-1:Lr(Ie).length;xe=(""+xe).toLowerCase(),ir=!0}}A.byteLength=Ce;function Le(Ie,xe,ke){var vt=!1;if((xe===void 0||xe<0)&&(xe=0),xe>this.length||((ke===void 0||ke>this.length)&&(ke=this.length),ke<=0)||(ke>>>=0,xe>>>=0,ke<=xe))return"";for(Ie||(Ie="utf8");;)switch(Ie){case"hex":return ot(this,xe,ke);case"utf8":case"utf-8":return ce(this,xe,ke);case"ascii":return pt(this,xe,ke);case"latin1":case"binary":return Vt(this,xe,ke);case"base64":return De(this,xe,ke);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ut(this,xe,ke);default:if(vt)throw new TypeError("Unknown encoding: "+Ie);Ie=(Ie+"").toLowerCase(),vt=!0}}A.prototype._isBuffer=!0;function ge(Ie,xe,ke){var vt=Ie[xe];Ie[xe]=Ie[ke],Ie[ke]=vt}A.prototype.swap16=function(){var xe=this.length;if(xe%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ke=0;keke&&(xe+=" ... "),""},C&&(A.prototype[C]=A.prototype.inspect),A.prototype.compare=function(xe,ke,vt,ir,ar){if(Ge(xe,Uint8Array)&&(xe=A.from(xe,xe.offset,xe.byteLength)),!A.isBuffer(xe))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+T(xe));if(ke===void 0&&(ke=0),vt===void 0&&(vt=xe?xe.length:0),ir===void 0&&(ir=0),ar===void 0&&(ar=this.length),ke<0||vt>xe.length||ir<0||ar>this.length)throw new RangeError("out of range index");if(ir>=ar&&ke>=vt)return 0;if(ir>=ar)return-1;if(ke>=vt)return 1;if(ke>>>=0,vt>>>=0,ir>>>=0,ar>>>=0,this===xe)return 0;for(var vr=ar-ir,ii=vt-ke,pi=Math.min(vr,ii),$r=this.slice(ir,ar),di=xe.slice(ke,vt),ji=0;ji2147483647?ke=2147483647:ke<-2147483648&&(ke=-2147483648),ke=+ke,Je(ke)&&(ke=ir?0:Ie.length-1),ke<0&&(ke=Ie.length+ke),ke>=Ie.length){if(ir)return-1;ke=Ie.length-1}else if(ke<0)if(ir)ke=0;else return-1;if(typeof xe=="string"&&(xe=A.from(xe,vt)),A.isBuffer(xe))return xe.length===0?-1:Se(Ie,xe,ke,vt,ir);if(typeof xe=="number")return xe=xe&255,typeof Uint8Array.prototype.indexOf=="function"?ir?Uint8Array.prototype.indexOf.call(Ie,xe,ke):Uint8Array.prototype.lastIndexOf.call(Ie,xe,ke):Se(Ie,[xe],ke,vt,ir);throw new TypeError("val must be string, number or Buffer")}function Se(Ie,xe,ke,vt,ir){var ar=1,vr=Ie.length,ii=xe.length;if(vt!==void 0&&(vt=String(vt).toLowerCase(),vt==="ucs2"||vt==="ucs-2"||vt==="utf16le"||vt==="utf-16le")){if(Ie.length<2||xe.length<2)return-1;ar=2,vr/=2,ii/=2,ke/=2}function pi(wi,On){return ar===1?wi[On]:wi.readUInt16BE(On*ar)}var $r;if(ir){var di=-1;for($r=ke;$rvr&&(ke=vr-ii),$r=ke;$r>=0;$r--){for(var ji=!0,In=0;Inir&&(vt=ir)):vt=ir;var ar=xe.length;vt>ar/2&&(vt=ar/2);var vr;for(vr=0;vr>>0,isFinite(vt)?(vt=vt>>>0,ir===void 0&&(ir="utf8")):(ir=vt,vt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ar=this.length-ke;if((vt===void 0||vt>ar)&&(vt=ar),xe.length>0&&(vt<0||ke<0)||ke>this.length)throw new RangeError("Attempt to write outside buffer bounds");ir||(ir="utf8");for(var vr=!1;;)switch(ir){case"hex":return Ee(this,xe,ke,vt);case"utf8":case"utf-8":return Ae(this,xe,ke,vt);case"ascii":case"latin1":case"binary":return Be(this,xe,ke,vt);case"base64":return Pe(this,xe,ke,vt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return me(this,xe,ke,vt);default:if(vr)throw new TypeError("Unknown encoding: "+ir);ir=(""+ir).toLowerCase(),vr=!0}},A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function De(Ie,xe,ke){return xe===0&&ke===Ie.length?L.fromByteArray(Ie):L.fromByteArray(Ie.slice(xe,ke))}function ce(Ie,xe,ke){ke=Math.min(Ie.length,ke);for(var vt=[],ir=xe;ir239?4:ar>223?3:ar>191?2:1;if(ir+ii<=ke){var pi=void 0,$r=void 0,di=void 0,ji=void 0;switch(ii){case 1:ar<128&&(vr=ar);break;case 2:pi=Ie[ir+1],(pi&192)===128&&(ji=(ar&31)<<6|pi&63,ji>127&&(vr=ji));break;case 3:pi=Ie[ir+1],$r=Ie[ir+2],(pi&192)===128&&($r&192)===128&&(ji=(ar&15)<<12|(pi&63)<<6|$r&63,ji>2047&&(ji<55296||ji>57343)&&(vr=ji));break;case 4:pi=Ie[ir+1],$r=Ie[ir+2],di=Ie[ir+3],(pi&192)===128&&($r&192)===128&&(di&192)===128&&(ji=(ar&15)<<18|(pi&63)<<12|($r&63)<<6|di&63,ji>65535&&ji<1114112&&(vr=ji))}}vr===null?(vr=65533,ii=1):vr>65535&&(vr-=65536,vt.push(vr>>>10&1023|55296),vr=56320|vr&1023),vt.push(vr),ir+=ii}return lt(vt)}var je=4096;function lt(Ie){var xe=Ie.length;if(xe<=je)return String.fromCharCode.apply(String,Ie);for(var ke="",vt=0;vtvt)&&(ke=vt);for(var ir="",ar=xe;arvt&&(xe=vt),ke<0?(ke+=vt,ke<0&&(ke=0)):ke>vt&&(ke=vt),keke)throw new RangeError("Trying to access beyond buffer length")}A.prototype.readUintLE=A.prototype.readUIntLE=function(xe,ke,vt){xe=xe>>>0,ke=ke>>>0,vt||Wt(xe,ke,this.length);for(var ir=this[xe],ar=1,vr=0;++vr>>0,ke=ke>>>0,vt||Wt(xe,ke,this.length);for(var ir=this[xe+--ke],ar=1;ke>0&&(ar*=256);)ir+=this[xe+--ke]*ar;return ir},A.prototype.readUint8=A.prototype.readUInt8=function(xe,ke){return xe=xe>>>0,ke||Wt(xe,1,this.length),this[xe]},A.prototype.readUint16LE=A.prototype.readUInt16LE=function(xe,ke){return xe=xe>>>0,ke||Wt(xe,2,this.length),this[xe]|this[xe+1]<<8},A.prototype.readUint16BE=A.prototype.readUInt16BE=function(xe,ke){return xe=xe>>>0,ke||Wt(xe,2,this.length),this[xe]<<8|this[xe+1]},A.prototype.readUint32LE=A.prototype.readUInt32LE=function(xe,ke){return xe=xe>>>0,ke||Wt(xe,4,this.length),(this[xe]|this[xe+1]<<8|this[xe+2]<<16)+this[xe+3]*16777216},A.prototype.readUint32BE=A.prototype.readUInt32BE=function(xe,ke){return xe=xe>>>0,ke||Wt(xe,4,this.length),this[xe]*16777216+(this[xe+1]<<16|this[xe+2]<<8|this[xe+3])},A.prototype.readBigUInt64LE=tt(function(xe){xe=xe>>>0,mt(xe,"offset");var ke=this[xe],vt=this[xe+7];(ke===void 0||vt===void 0)&&er(xe,this.length-8);var ir=ke+this[++xe]*Math.pow(2,8)+this[++xe]*Math.pow(2,16)+this[++xe]*Math.pow(2,24),ar=this[++xe]+this[++xe]*Math.pow(2,8)+this[++xe]*Math.pow(2,16)+vt*Math.pow(2,24);return BigInt(ir)+(BigInt(ar)<>>0,mt(xe,"offset");var ke=this[xe],vt=this[xe+7];(ke===void 0||vt===void 0)&&er(xe,this.length-8);var ir=ke*Math.pow(2,24)+this[++xe]*Math.pow(2,16)+this[++xe]*Math.pow(2,8)+this[++xe],ar=this[++xe]*Math.pow(2,24)+this[++xe]*Math.pow(2,16)+this[++xe]*Math.pow(2,8)+vt;return(BigInt(ir)<>>0,ke=ke>>>0,vt||Wt(xe,ke,this.length);for(var ir=this[xe],ar=1,vr=0;++vr=ar&&(ir-=Math.pow(2,8*ke)),ir},A.prototype.readIntBE=function(xe,ke,vt){xe=xe>>>0,ke=ke>>>0,vt||Wt(xe,ke,this.length);for(var ir=ke,ar=1,vr=this[xe+--ir];ir>0&&(ar*=256);)vr+=this[xe+--ir]*ar;return ar*=128,vr>=ar&&(vr-=Math.pow(2,8*ke)),vr},A.prototype.readInt8=function(xe,ke){return xe=xe>>>0,ke||Wt(xe,1,this.length),this[xe]&128?(255-this[xe]+1)*-1:this[xe]},A.prototype.readInt16LE=function(xe,ke){xe=xe>>>0,ke||Wt(xe,2,this.length);var vt=this[xe]|this[xe+1]<<8;return vt&32768?vt|4294901760:vt},A.prototype.readInt16BE=function(xe,ke){xe=xe>>>0,ke||Wt(xe,2,this.length);var vt=this[xe+1]|this[xe]<<8;return vt&32768?vt|4294901760:vt},A.prototype.readInt32LE=function(xe,ke){return xe=xe>>>0,ke||Wt(xe,4,this.length),this[xe]|this[xe+1]<<8|this[xe+2]<<16|this[xe+3]<<24},A.prototype.readInt32BE=function(xe,ke){return xe=xe>>>0,ke||Wt(xe,4,this.length),this[xe]<<24|this[xe+1]<<16|this[xe+2]<<8|this[xe+3]},A.prototype.readBigInt64LE=tt(function(xe){xe=xe>>>0,mt(xe,"offset");var ke=this[xe],vt=this[xe+7];(ke===void 0||vt===void 0)&&er(xe,this.length-8);var ir=this[xe+4]+this[xe+5]*Math.pow(2,8)+this[xe+6]*Math.pow(2,16)+(vt<<24);return(BigInt(ir)<>>0,mt(xe,"offset");var ke=this[xe],vt=this[xe+7];(ke===void 0||vt===void 0)&&er(xe,this.length-8);var ir=(ke<<24)+this[++xe]*Math.pow(2,16)+this[++xe]*Math.pow(2,8)+this[++xe];return(BigInt(ir)<>>0,ke||Wt(xe,4,this.length),x.read(this,xe,!0,23,4)},A.prototype.readFloatBE=function(xe,ke){return xe=xe>>>0,ke||Wt(xe,4,this.length),x.read(this,xe,!1,23,4)},A.prototype.readDoubleLE=function(xe,ke){return xe=xe>>>0,ke||Wt(xe,8,this.length),x.read(this,xe,!0,52,8)},A.prototype.readDoubleBE=function(xe,ke){return xe=xe>>>0,ke||Wt(xe,8,this.length),x.read(this,xe,!1,52,8)};function Nt(Ie,xe,ke,vt,ir,ar){if(!A.isBuffer(Ie))throw new TypeError('"buffer" argument must be a Buffer instance');if(xe>ir||xeIe.length)throw new RangeError("Index out of range")}A.prototype.writeUintLE=A.prototype.writeUIntLE=function(xe,ke,vt,ir){if(xe=+xe,ke=ke>>>0,vt=vt>>>0,!ir){var ar=Math.pow(2,8*vt)-1;Nt(this,xe,ke,vt,ar,0)}var vr=1,ii=0;for(this[ke]=xe&255;++ii>>0,vt=vt>>>0,!ir){var ar=Math.pow(2,8*vt)-1;Nt(this,xe,ke,vt,ar,0)}var vr=vt-1,ii=1;for(this[ke+vr]=xe&255;--vr>=0&&(ii*=256);)this[ke+vr]=xe/ii&255;return ke+vt},A.prototype.writeUint8=A.prototype.writeUInt8=function(xe,ke,vt){return xe=+xe,ke=ke>>>0,vt||Nt(this,xe,ke,1,255,0),this[ke]=xe&255,ke+1},A.prototype.writeUint16LE=A.prototype.writeUInt16LE=function(xe,ke,vt){return xe=+xe,ke=ke>>>0,vt||Nt(this,xe,ke,2,65535,0),this[ke]=xe&255,this[ke+1]=xe>>>8,ke+2},A.prototype.writeUint16BE=A.prototype.writeUInt16BE=function(xe,ke,vt){return xe=+xe,ke=ke>>>0,vt||Nt(this,xe,ke,2,65535,0),this[ke]=xe>>>8,this[ke+1]=xe&255,ke+2},A.prototype.writeUint32LE=A.prototype.writeUInt32LE=function(xe,ke,vt){return xe=+xe,ke=ke>>>0,vt||Nt(this,xe,ke,4,4294967295,0),this[ke+3]=xe>>>24,this[ke+2]=xe>>>16,this[ke+1]=xe>>>8,this[ke]=xe&255,ke+4},A.prototype.writeUint32BE=A.prototype.writeUInt32BE=function(xe,ke,vt){return xe=+xe,ke=ke>>>0,vt||Nt(this,xe,ke,4,4294967295,0),this[ke]=xe>>>24,this[ke+1]=xe>>>16,this[ke+2]=xe>>>8,this[ke+3]=xe&255,ke+4};function $t(Ie,xe,ke,vt,ir){It(xe,vt,ir,Ie,ke,7);var ar=Number(xe&BigInt(4294967295));Ie[ke++]=ar,ar=ar>>8,Ie[ke++]=ar,ar=ar>>8,Ie[ke++]=ar,ar=ar>>8,Ie[ke++]=ar;var vr=Number(xe>>BigInt(32)&BigInt(4294967295));return Ie[ke++]=vr,vr=vr>>8,Ie[ke++]=vr,vr=vr>>8,Ie[ke++]=vr,vr=vr>>8,Ie[ke++]=vr,ke}function sr(Ie,xe,ke,vt,ir){It(xe,vt,ir,Ie,ke,7);var ar=Number(xe&BigInt(4294967295));Ie[ke+7]=ar,ar=ar>>8,Ie[ke+6]=ar,ar=ar>>8,Ie[ke+5]=ar,ar=ar>>8,Ie[ke+4]=ar;var vr=Number(xe>>BigInt(32)&BigInt(4294967295));return Ie[ke+3]=vr,vr=vr>>8,Ie[ke+2]=vr,vr=vr>>8,Ie[ke+1]=vr,vr=vr>>8,Ie[ke]=vr,ke+8}A.prototype.writeBigUInt64LE=tt(function(xe){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return $t(this,xe,ke,BigInt(0),BigInt("0xffffffffffffffff"))}),A.prototype.writeBigUInt64BE=tt(function(xe){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return sr(this,xe,ke,BigInt(0),BigInt("0xffffffffffffffff"))}),A.prototype.writeIntLE=function(xe,ke,vt,ir){if(xe=+xe,ke=ke>>>0,!ir){var ar=Math.pow(2,8*vt-1);Nt(this,xe,ke,vt,ar-1,-ar)}var vr=0,ii=1,pi=0;for(this[ke]=xe&255;++vr>0)-pi&255;return ke+vt},A.prototype.writeIntBE=function(xe,ke,vt,ir){if(xe=+xe,ke=ke>>>0,!ir){var ar=Math.pow(2,8*vt-1);Nt(this,xe,ke,vt,ar-1,-ar)}var vr=vt-1,ii=1,pi=0;for(this[ke+vr]=xe&255;--vr>=0&&(ii*=256);)xe<0&&pi===0&&this[ke+vr+1]!==0&&(pi=1),this[ke+vr]=(xe/ii>>0)-pi&255;return ke+vt},A.prototype.writeInt8=function(xe,ke,vt){return xe=+xe,ke=ke>>>0,vt||Nt(this,xe,ke,1,127,-128),xe<0&&(xe=255+xe+1),this[ke]=xe&255,ke+1},A.prototype.writeInt16LE=function(xe,ke,vt){return xe=+xe,ke=ke>>>0,vt||Nt(this,xe,ke,2,32767,-32768),this[ke]=xe&255,this[ke+1]=xe>>>8,ke+2},A.prototype.writeInt16BE=function(xe,ke,vt){return xe=+xe,ke=ke>>>0,vt||Nt(this,xe,ke,2,32767,-32768),this[ke]=xe>>>8,this[ke+1]=xe&255,ke+2},A.prototype.writeInt32LE=function(xe,ke,vt){return xe=+xe,ke=ke>>>0,vt||Nt(this,xe,ke,4,2147483647,-2147483648),this[ke]=xe&255,this[ke+1]=xe>>>8,this[ke+2]=xe>>>16,this[ke+3]=xe>>>24,ke+4},A.prototype.writeInt32BE=function(xe,ke,vt){return xe=+xe,ke=ke>>>0,vt||Nt(this,xe,ke,4,2147483647,-2147483648),xe<0&&(xe=4294967295+xe+1),this[ke]=xe>>>24,this[ke+1]=xe>>>16,this[ke+2]=xe>>>8,this[ke+3]=xe&255,ke+4},A.prototype.writeBigInt64LE=tt(function(xe){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return $t(this,xe,ke,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),A.prototype.writeBigInt64BE=tt(function(xe){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return sr(this,xe,ke,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Tr(Ie,xe,ke,vt,ir,ar){if(ke+vt>Ie.length)throw new RangeError("Index out of range");if(ke<0)throw new RangeError("Index out of range")}function fr(Ie,xe,ke,vt,ir){return xe=+xe,ke=ke>>>0,ir||Tr(Ie,xe,ke,4,34028234663852886e22,-34028234663852886e22),x.write(Ie,xe,ke,vt,23,4),ke+4}A.prototype.writeFloatLE=function(xe,ke,vt){return fr(this,xe,ke,!0,vt)},A.prototype.writeFloatBE=function(xe,ke,vt){return fr(this,xe,ke,!1,vt)};function $e(Ie,xe,ke,vt,ir){return xe=+xe,ke=ke>>>0,ir||Tr(Ie,xe,ke,8,17976931348623157e292,-17976931348623157e292),x.write(Ie,xe,ke,vt,52,8),ke+8}A.prototype.writeDoubleLE=function(xe,ke,vt){return $e(this,xe,ke,!0,vt)},A.prototype.writeDoubleBE=function(xe,ke,vt){return $e(this,xe,ke,!1,vt)},A.prototype.copy=function(xe,ke,vt,ir){if(!A.isBuffer(xe))throw new TypeError("argument should be a Buffer");if(vt||(vt=0),!ir&&ir!==0&&(ir=this.length),ke>=xe.length&&(ke=xe.length),ke||(ke=0),ir>0&&ir=this.length)throw new RangeError("Index out of range");if(ir<0)throw new RangeError("sourceEnd out of bounds");ir>this.length&&(ir=this.length),xe.length-ke>>0,vt=vt===void 0?this.length:vt>>>0,xe||(xe=0);var vr;if(typeof xe=="number")for(vr=ke;vrMath.pow(2,32)?ir=Gt(String(ke)):typeof ke=="bigint"&&(ir=String(ke),(ke>Math.pow(BigInt(2),BigInt(32))||ke<-Math.pow(BigInt(2),BigInt(32)))&&(ir=Gt(ir)),ir+="n"),vt+=" It must be ".concat(xe,". Received ").concat(ir),vt},RangeError);function Gt(Ie){for(var xe="",ke=Ie.length,vt=Ie[0]==="-"?1:0;ke>=vt+4;ke-=3)xe="_".concat(Ie.slice(ke-3,ke)).concat(xe);return"".concat(Ie.slice(0,ke)).concat(xe)}function _t(Ie,xe,ke){mt(xe,"offset"),(Ie[xe]===void 0||Ie[xe+ke]===void 0)&&er(xe,Ie.length-(ke+1))}function It(Ie,xe,ke,vt,ir,ar){if(Ie>ke||Ie3?xe===0||xe===BigInt(0)?ii=">= 0".concat(vr," and < 2").concat(vr," ** ").concat((ar+1)*8).concat(vr):ii=">= -(2".concat(vr," ** ").concat((ar+1)*8-1).concat(vr,") and < 2 ** ")+"".concat((ar+1)*8-1).concat(vr):ii=">= ".concat(xe).concat(vr," and <= ").concat(ke).concat(vr),new St.ERR_OUT_OF_RANGE("value",ii,Ie)}_t(vt,ir,ar)}function mt(Ie,xe){if(typeof Ie!="number")throw new St.ERR_INVALID_ARG_TYPE(xe,"number",Ie)}function er(Ie,xe,ke){throw Math.floor(Ie)!==Ie?(mt(Ie,ke),new St.ERR_OUT_OF_RANGE(ke||"offset","an integer",Ie)):xe<0?new St.ERR_BUFFER_OUT_OF_BOUNDS:new St.ERR_OUT_OF_RANGE(ke||"offset",">= ".concat(ke?1:0," and <= ").concat(xe),Ie)}var lr=/[^+/0-9A-Za-z-_]/g;function wr(Ie){if(Ie=Ie.split("=")[0],Ie=Ie.trim().replace(lr,""),Ie.length<2)return"";for(;Ie.length%4!==0;)Ie=Ie+"=";return Ie}function Lr(Ie,xe){xe=xe||1/0;for(var ke,vt=Ie.length,ir=null,ar=[],vr=0;vr55295&&ke<57344){if(!ir){if(ke>56319){(xe-=3)>-1&&ar.push(239,191,189);continue}else if(vr+1===vt){(xe-=3)>-1&&ar.push(239,191,189);continue}ir=ke;continue}if(ke<56320){(xe-=3)>-1&&ar.push(239,191,189),ir=ke;continue}ke=(ir-55296<<10|ke-56320)+65536}else ir&&(xe-=3)>-1&&ar.push(239,191,189);if(ir=null,ke<128){if((xe-=1)<0)break;ar.push(ke)}else if(ke<2048){if((xe-=2)<0)break;ar.push(ke>>6|192,ke&63|128)}else if(ke<65536){if((xe-=3)<0)break;ar.push(ke>>12|224,ke>>6&63|128,ke&63|128)}else if(ke<1114112){if((xe-=4)<0)break;ar.push(ke>>18|240,ke>>12&63|128,ke>>6&63|128,ke&63|128)}else throw new Error("Invalid code point")}return ar}function ti(Ie){for(var xe=[],ke=0;ke>8,ir=ke%256,ar.push(ir),ar.push(vt);return ar}function Vr(Ie){return L.toByteArray(wr(Ie))}function dt(Ie,xe,ke,vt){var ir;for(ir=0;ir=xe.length||ir>=Ie.length);++ir)xe[ir+ke]=Ie[ir];return ir}function Ge(Ie,xe){return Ie instanceof xe||Ie!=null&&Ie.constructor!=null&&Ie.constructor.name!=null&&Ie.constructor.name===xe.name}function Je(Ie){return Ie!==Ie}var We=function(){for(var Ie="0123456789abcdef",xe=new Array(256),ke=0;ke<16;++ke)for(var vt=ke*16,ir=0;ir<16;++ir)xe[vt+ir]=Ie[ke]+Ie[ir];return xe}();function tt(Ie){return typeof BigInt=="undefined"?xt:Ie}function xt(){throw new Error("BigInt not supported")}},4844:function(i){i.exports=a;function a(o,s,l,u){return o[0]=s[0]+l[0]*u,o[1]=s[1]+l[1]*u,o[2]=s[2]+l[2]*u,o[3]=s[3]+l[3]*u,o}},4905:function(i,a,o){var s=o(5874);i.exports=l;function l(u,c){var f=s(c),h=[];return h=h.concat(f(u)),h=h.concat(f(null)),h}},4935:function(i,a,o){"use strict";i.exports=k;var s=o(2762),l=o(8116),u=o(4359),c=o(1879).Q,f=window||process.global||{},h=f.__TEXT_CACHE||{};f.__TEXT_CACHE={};var d=3;function v(E,T,L,x){this.gl=E,this.shader=T,this.buffer=L,this.vao=x,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var _=v.prototype,b=[0,0];_.bind=function(E,T,L,x){this.vao.bind(),this.shader.bind();var C=this.shader.uniforms;C.model=E,C.view=T,C.projection=L,C.pixelScale=x,b[0]=this.gl.drawingBufferWidth,b[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=b},_.unbind=function(){this.vao.unbind()},_.update=function(E,T,L,x,C){var M=[];function g(H,re,oe,_e,Ce,Le){var ge=[oe.style,oe.weight,oe.variant,oe.family].join("_"),ie=h[ge];ie||(ie=h[ge]={});var Se=ie[re];Se||(Se=ie[re]=p(re,{triangles:!0,font:oe.family,fontStyle:oe.style,fontWeight:oe.weight,fontVariant:oe.variant,textAlign:"center",textBaseline:"middle",lineSpacing:Ce,styletags:Le}));for(var Ee=(_e||12)/12,Ae=Se.positions,Be=Se.cells,Pe=0,me=Be.length;Pe=0;--ce){var je=Ae[De[ce]];M.push(Ee*je[0],-Ee*je[1],H)}}for(var P=[0,0,0],A=[0,0,0],z=[0,0,0],O=[0,0,0],U=1.25,G={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},Z=0;Z<3;++Z){z[Z]=M.length/d|0,g(.5*(E[0][Z]+E[1][Z]),T[Z],L[Z],12,U,G),O[Z]=(M.length/d|0)-z[Z],P[Z]=M.length/d|0;for(var j=0;j0||T.length>0;){for(;E.length>0;){var g=E.pop();if(L[g]!==-k){L[g]=k;for(var P=x[g],A=0;A<3;++A){var z=M[3*g+A];z>=0&&L[z]===0&&(C[3*g+A]?T.push(z):(E.push(z),L[z]=k))}}}var O=T;T=E,E=O,T.length=0,k=-k}var U=h(x,L,_);return b?U.concat(p.boundary):U}},5033:function(i){"use strict";i.exports=a;function a(o,s,l){var u=s||0,c=l||1;return[[o[12]+o[0],o[13]+o[1],o[14]+o[2],o[15]+o[3]],[o[12]-o[0],o[13]-o[1],o[14]-o[2],o[15]-o[3]],[o[12]+o[4],o[13]+o[5],o[14]+o[6],o[15]+o[7]],[o[12]-o[4],o[13]-o[5],o[14]-o[6],o[15]-o[7]],[u*o[12]+o[8],u*o[13]+o[9],u*o[14]+o[10],u*o[15]+o[11]],[c*o[12]-o[8],c*o[13]-o[9],c*o[14]-o[10],c*o[15]-o[11]]]}},5085:function(i,a,o){i.exports=k;var s=o(3250)[3],l=o(4209),u=o(3352),c=o(2478);function f(){return!0}function h(E){return function(T,L){var x=E[T];return x?!!x.queryPoint(L,f):!1}}function d(E){for(var T={},L=0;L0&&T[x]===L[0])C=E[x-1];else return 1;for(var M=1;C;){var g=C.key,P=s(L,g[0],g[1]);if(g[0][0]0)M=-1,C=C.right;else return 0;else if(P>0)C=C.left;else if(P<0)M=1,C=C.right;else return 0}return M}}function _(E){return 1}function b(E){return function(L){return E(L[0],L[1])?0:1}}function p(E,T){return function(x){return E(x[0],x[1])?0:T(x)}}function k(E){for(var T=E.length,L=[],x=[],C=0,M=0;M0&&(h=1/Math.sqrt(h),o[0]=l*h,o[1]=u*h,o[2]=c*h,o[3]=f*h),o}},5202:function(i,a,o){"use strict";var s=o(1944),l=o(8210);i.exports=f,i.exports.positive=h,i.exports.negative=d;function u(v,_){var b=l(s(v,_),[_[_.length-1]]);return b[b.length-1]}function c(v,_,b,p){var k=p-_,E=-_/k;E<0?E=0:E>1&&(E=1);for(var T=1-E,L=v.length,x=new Array(L),C=0;C0||k>0&&x<0){var C=c(E,x,T,k);b.push(C),p.push(C.slice())}x<0?p.push(T.slice()):x>0?b.push(T.slice()):(b.push(T.slice()),p.push(T.slice())),k=x}return{positive:b,negative:p}}function h(v,_){for(var b=[],p=u(v[v.length-1],_),k=v[v.length-1],E=v[0],T=0;T0||p>0&&L<0)&&b.push(c(k,L,E,p)),L>=0&&b.push(E.slice()),p=L}return b}function d(v,_){for(var b=[],p=u(v[v.length-1],_),k=v[v.length-1],E=v[0],T=0;T0||p>0&&L<0)&&b.push(c(k,L,E,p)),L<=0&&b.push(E.slice()),p=L}return b}},5219:function(i){"use strict";i.exports=function(a){for(var o=a.length,s,l=0;l13)&&s!==32&&s!==133&&s!==160&&s!==5760&&s!==6158&&(s<8192||s>8205)&&s!==8232&&s!==8233&&s!==8239&&s!==8287&&s!==8288&&s!==12288&&s!==65279)return!1;return!0}},5250:function(i){"use strict";i.exports=o;var a=+(Math.pow(2,27)+1);function o(s,l,u){var c=s*l,f=a*s,h=f-s,d=f-h,v=s-d,_=a*l,b=_-l,p=_-b,k=l-p,E=c-d*p,T=E-v*p,L=T-d*k,x=v*k-L;return u?(u[0]=x,u[1]=c,u):[x,c]}},5298:function(i,a){"use strict";var o={"float64,2,1,0":function(){return function(v,_,b,p,k){var E=v[0],T=v[1],L=v[2],x=b[0],C=b[1],M=b[2];p|=0;var g=0,P=0,A=0,z=M,O=C-L*M,U=x-T*C;for(A=0;A0;){j<64?(x=j,j=0):(x=64,j-=64);for(var N=v[1]|0;N>0;){N<64?(C=N,N=0):(C=64,N-=64),p=G+j*g+N*P,T=Z+j*z+N*O;var H=0,re=0,oe=0,_e=A,Ce=g-M*A,Le=P-x*g,ge=U,ie=z-M*U,Se=O-x*z;for(oe=0;oe0;){O<64?(x=O,O=0):(x=64,O-=64);for(var U=v[0]|0;U>0;){U<64?(L=U,U=0):(L=64,U-=64),p=A+O*M+U*C,T=z+O*P+U*g;var G=0,Z=0,j=M,N=C-x*M,H=P,re=g-x*P;for(Z=0;Z0;){Z<64?(C=Z,Z=0):(C=64,Z-=64);for(var j=v[0]|0;j>0;){j<64?(L=j,j=0):(L=64,j-=64);for(var N=v[1]|0;N>0;){N<64?(x=N,N=0):(x=64,N-=64),p=U+Z*P+j*M+N*g,T=G+Z*O+j*A+N*z;var H=0,re=0,oe=0,_e=P,Ce=M-C*P,Le=g-L*M,ge=O,ie=A-C*O,Se=z-L*A;for(oe=0;oe=0}}(),u.removeTriangle=function(h,d,v){var _=this.stars;c(_[h],d,v),c(_[d],v,h),c(_[v],h,d)},u.addTriangle=function(h,d,v){var _=this.stars;_[h].push(d,v),_[d].push(v,h),_[v].push(h,d)},u.opposite=function(h,d){for(var v=this.stars[d],_=1,b=v.length;_0;){var p=v.pop();h[p]=!1;for(var k=f[p],_=0;_0){for(var ge=0;ge<24;++ge)O.push(O[O.length-12]);j+=2,_e=!0}continue e}N[0][A]=Math.min(N[0][A],Ce[A],Le[A]),N[1][A]=Math.max(N[1][A],Ce[A],Le[A])}var ie,Se;Array.isArray(re[0])?(ie=re.length>P-1?re[P-1]:re.length>0?re[re.length-1]:[0,0,0,1],Se=re.length>P?re[P]:re.length>0?re[re.length-1]:[0,0,0,1]):ie=Se=re,ie.length===3&&(ie=[ie[0],ie[1],ie[2],1]),Se.length===3&&(Se=[Se[0],Se[1],Se[2],1]),!this.hasAlpha&&ie[3]<1&&(this.hasAlpha=!0);var Ee;Array.isArray(oe)?Ee=oe.length>P-1?oe[P-1]:oe.length>0?oe[oe.length-1]:[0,0,0,1]:Ee=oe;var Ae=Z;if(Z+=E(Ce,Le),_e){for(A=0;A<2;++A)O.push(Ce[0],Ce[1],Ce[2],Le[0],Le[1],Le[2],Ae,Ee,ie[0],ie[1],ie[2],ie[3]);j+=2,_e=!1}O.push(Ce[0],Ce[1],Ce[2],Le[0],Le[1],Le[2],Ae,Ee,ie[0],ie[1],ie[2],ie[3],Ce[0],Ce[1],Ce[2],Le[0],Le[1],Le[2],Ae,-Ee,ie[0],ie[1],ie[2],ie[3],Le[0],Le[1],Le[2],Ce[0],Ce[1],Ce[2],Z,-Ee,Se[0],Se[1],Se[2],Se[3],Le[0],Le[1],Le[2],Ce[0],Ce[1],Ce[2],Z,Ee,Se[0],Se[1],Se[2],Se[3]),j+=4}}if(this.buffer.update(O),U.push(Z),G.push(H[H.length-1].slice()),this.bounds=N,this.vertexCount=j,this.points=G,this.arcLength=U,"dashes"in g){var Be=g.dashes,Pe=Be.slice();for(Pe.unshift(0),P=1;Po[l][0]&&(l=u);return sl?[[l],[s]]:[[s]]}},5771:function(i,a,o){"use strict";var s=o(8507),l=o(3788),u=o(2419);i.exports=c;function c(f){f.sort(l);for(var h=f.length,d=0,v=0;v0){var p=f[d-1];if(s(_,p)===0&&u(p)!==b){d-=1;continue}}f[d++]=_}}return f.length=d,f}},5838:function(i,a,o){"use strict";i.exports=l;var s=o(7842);function l(u){for(var c=new Array(u.length),f=0;f0)continue;Gt=$e.slice(0,1).join("")}return De(Gt),Le+=Gt.length,N=N.slice(Gt.length),N.length}while(!0)}function $t(){return/[^a-fA-F0-9]/.test(Z)?(De(N.join("")),G=h,O):(N.push(Z),j=Z,O+1)}function sr(){return Z==="."||/[eE]/.test(Z)?(N.push(Z),G=E,j=Z,O+1):Z==="x"&&N.length===1&&N[0]==="0"?(G=g,N.push(Z),j=Z,O+1):/[^\d]/.test(Z)?(De(N.join("")),G=h,O):(N.push(Z),j=Z,O+1)}function Tr(){return Z==="f"&&(N.push(Z),j=Z,O+=1),/[eE]/.test(Z)||(Z==="-"||Z==="+")&&/[eE]/.test(j)?(N.push(Z),j=Z,O+1):/[^\d]/.test(Z)?(De(N.join("")),G=h,O):(N.push(Z),j=Z,O+1)}function fr(){if(/[^\d\w_]/.test(Z)){var $e=N.join("");return me[$e]?G=x:Pe[$e]?G=L:G=T,De(N.join("")),G=h,O}return N.push(Z),j=Z,O+1}}},5878:function(i,a,o){"use strict";i.exports=c;var s=o(3250),l=o(2014);function u(f,h,d){var v=Math.abs(s(f,h,d)),_=Math.sqrt(Math.pow(h[0]-d[0],2)+Math.pow(h[1]-d[1],2));return v/_}function c(f,h,d){for(var v=h.length,_=f.length,b=new Array(v),p=new Array(v),k=new Array(v),E=new Array(v),T=0;T>1:(ie>>1)-1}function z(ie){for(var Se=P(ie);;){var Ee=Se,Ae=2*ie+1,Be=2*(ie+1),Pe=ie;if(Ae0;){var Ee=A(ie);if(Ee>=0){var Ae=P(Ee);if(Se0){var ie=j[0];return g(0,re-1),re-=1,z(0),ie}return-1}function G(ie,Se){var Ee=j[ie];return k[Ee]===Se?ie:(k[Ee]=-1/0,O(ie),U(),k[Ee]=Se,re+=1,O(re-1))}function Z(ie){if(!E[ie]){E[ie]=!0;var Se=b[ie],Ee=p[ie];b[Ee]>=0&&(b[Ee]=Se),p[Se]>=0&&(p[Se]=Ee),N[Se]>=0&&G(N[Se],M(Se)),N[Ee]>=0&&G(N[Ee],M(Ee))}}for(var j=[],N=new Array(v),T=0;T>1;T>=0;--T)z(T);for(;;){var oe=U();if(oe<0||k[oe]>d)break;Z(oe)}for(var _e=[],T=0;T=0&&Ee>=0&&Se!==Ee){var Ae=N[Se],Be=N[Ee];Ae!==Be&&ge.push([Ae,Be])}}),l.unique(l.normalize(ge)),{positions:_e,edges:ge}}},5911:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],d=l[1],v=l[2];return o[0]=c*v-f*d,o[1]=f*h-u*v,o[2]=u*d-c*h,o}},5964:function(i){"use strict";i.exports=function(a){return!a&&a!==0?"":a.toString()}},5995:function(i,a,o){"use strict";i.exports=u;var s=o(7642),l=o(6037);function u(c,f){return s(f).filter(function(h){for(var d=new Array(h.length),v=0;v2&&A[1]>2&&M(P.pick(-1,-1).lo(1,1).hi(A[0]-2,A[1]-2),g.pick(-1,-1,0).lo(1,1).hi(A[0]-2,A[1]-2),g.pick(-1,-1,1).lo(1,1).hi(A[0]-2,A[1]-2)),A[1]>2&&(C(P.pick(0,-1).lo(1).hi(A[1]-2),g.pick(0,-1,1).lo(1).hi(A[1]-2)),x(g.pick(0,-1,0).lo(1).hi(A[1]-2))),A[1]>2&&(C(P.pick(A[0]-1,-1).lo(1).hi(A[1]-2),g.pick(A[0]-1,-1,1).lo(1).hi(A[1]-2)),x(g.pick(A[0]-1,-1,0).lo(1).hi(A[1]-2))),A[0]>2&&(C(P.pick(-1,0).lo(1).hi(A[0]-2),g.pick(-1,0,0).lo(1).hi(A[0]-2)),x(g.pick(-1,0,1).lo(1).hi(A[0]-2))),A[0]>2&&(C(P.pick(-1,A[1]-1).lo(1).hi(A[0]-2),g.pick(-1,A[1]-1,0).lo(1).hi(A[0]-2)),x(g.pick(-1,A[1]-1,1).lo(1).hi(A[0]-2))),g.set(0,0,0,0),g.set(0,0,1,0),g.set(A[0]-1,0,0,0),g.set(A[0]-1,0,1,0),g.set(0,A[1]-1,0,0),g.set(0,A[1]-1,1,0),g.set(A[0]-1,A[1]-1,0,0),g.set(A[0]-1,A[1]-1,1,0),g}}function T(L){var x=L.join(),A=v[x];if(A)return A;for(var C=L.length,M=[b,p],g=1;g<=C;++g)M.push(k(g));var P=E,A=P.apply(void 0,M);return v[x]=A,A}i.exports=function(x,C,M){if(Array.isArray(M)||(typeof M=="string"?M=s(C.dimension,M):M=s(C.dimension,"clamp")),C.size===0)return x;if(C.dimension===0)return x.set(0),x;var g=T(M);return g(x,C)}},6204:function(i){"use strict";i.exports=a;function a(o){var s,l,u,c=o.length,f=0;for(s=0;sv&&(v=s.length(O)),A&&!P){var U=2*s.distance(L,z)/(s.length(x)+s.length(O));U?(M=Math.min(M,U),g=!1):g=!0}g||(L=z,x=O),C.push(O)}var G=[_,p,E],Z=[b,k,T];c&&(c[0]=G,c[1]=Z),v===0&&(v=1);var j=1/v;isFinite(M)||(M=1),d.vectorScale=M;var N=u.coneSize||(P?1:.5);u.absoluteConeSize&&(N=u.absoluteConeSize*j),d.coneScale=N;for(var A=0,H=0;A_e&&(Z|=1<_e){Z|=1<d[O][1])&&(Be=O);for(var Pe=-1,O=0;O<3;++O){var me=Be^1<d[De][0]&&(De=me)}}var ce=E;ce[0]=ce[1]=ce[2]=0,ce[s.log2(Pe^Be)]=Be&Pe,ce[s.log2(Be^De)]=Be&De;var je=De^7;je===Z||je===Ae?(je=Pe^7,ce[s.log2(De^je)]=je&De):ce[s.log2(Pe^je)]=je&Pe;for(var lt=T,pt=Z,H=0;H<3;++H)pt&1<=0&&(d=f.length-h-1);var v=Math.pow(10,d),_=Math.round(u*c*v),b=_+"";if(b.indexOf("e")>=0)return b;var p=_/v,k=_%v;_<0?(p=-Math.ceil(p)|0,k=-k|0):(p=Math.floor(p)|0,k=k|0);var E=""+p;if(_<0&&(E="-"+E),d){for(var T=""+k;T.length=u[0][h];--_)d.push({x:_*c[h],text:o(c[h],_)});f.push(d)}return f}function l(u,c){for(var f=0;f<3;++f){if(u[f].length!==c[f].length)return!1;for(var h=0;hL+1)throw new Error(E+" map requires nshades to be at least size "+k.length);Array.isArray(d.alpha)?d.alpha.length!==2?x=[1,1]:x=d.alpha.slice():typeof d.alpha=="number"?x=[d.alpha,d.alpha]:x=[1,1],v=k.map(function(z){return Math.round(z.index*L)}),x[0]=Math.min(Math.max(x[0],0),1),x[1]=Math.min(Math.max(x[1],0),1);var M=k.map(function(z,O){var U=k[O].index,G=k[O].rgb.slice();return G.length===4&&G[3]>=0&&G[3]<=1||(G[3]=x[0]+(x[1]-x[0])*U),G}),g=[];for(C=0;C>1,Z=d(P[G],A);Z<=0?(Z===0&&(U=G),z=G+1):Z>0&&(O=G-1)}return U}s=p;function k(P,A){for(var z=new Array(P.length),O=0,U=z.length;O=P.length||d(P[Ce],G)!==0););}return z}s=k;function E(P,A){if(!A)return k(b(L(P,0)),P,0);for(var z=new Array(A),O=0;O>>H&1&&N.push(U[H]);A.push(N)}return _(A)}s=T;function L(P,A){if(A<0)return[];for(var z=[],O=(1<0?N:H},f.min=function(N,H){return N.cmp(H)<0?N:H},f.prototype._init=function(N,H,re){if(typeof N=="number")return this._initNumber(N,H,re);if(typeof N=="object")return this._initArray(N,H,re);H==="hex"&&(H=16),u(H===(H|0)&&H>=2&&H<=36),N=N.toString().replace(/\s+/g,"");var oe=0;N[0]==="-"&&(oe++,this.negative=1),oe=0;oe-=3)Ce=N[oe]|N[oe-1]<<8|N[oe-2]<<16,this.words[_e]|=Ce<>>26-Le&67108863,Le+=24,Le>=26&&(Le-=26,_e++);else if(re==="le")for(oe=0,_e=0;oe>>26-Le&67108863,Le+=24,Le>=26&&(Le-=26,_e++);return this.strip()};function d(j,N){var H=j.charCodeAt(N);return H>=65&&H<=70?H-55:H>=97&&H<=102?H-87:H-48&15}function v(j,N,H){var re=d(j,H);return H-1>=N&&(re|=d(j,H-1)<<4),re}f.prototype._parseHex=function(N,H,re){this.length=Math.ceil((N.length-H)/6),this.words=new Array(this.length);for(var oe=0;oe=H;oe-=2)Le=v(N,H,oe)<<_e,this.words[Ce]|=Le&67108863,_e>=18?(_e-=18,Ce+=1,this.words[Ce]|=Le>>>26):_e+=8;else{var ge=N.length-H;for(oe=ge%2===0?H+1:H;oe=18?(_e-=18,Ce+=1,this.words[Ce]|=Le>>>26):_e+=8}this.strip()};function _(j,N,H,re){for(var oe=0,_e=Math.min(j.length,H),Ce=N;Ce<_e;Ce++){var Le=j.charCodeAt(Ce)-48;oe*=re,Le>=49?oe+=Le-49+10:Le>=17?oe+=Le-17+10:oe+=Le}return oe}f.prototype._parseBase=function(N,H,re){this.words=[0],this.length=1;for(var oe=0,_e=1;_e<=67108863;_e*=H)oe++;oe--,_e=_e/H|0;for(var Ce=N.length-re,Le=Ce%oe,ge=Math.min(Ce,Ce-Le)+re,ie=0,Se=re;Se1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?""};var b=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],k=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];f.prototype.toString=function(N,H){N=N||10,H=H|0||1;var re;if(N===16||N==="hex"){re="";for(var oe=0,_e=0,Ce=0;Ce>>24-oe&16777215,_e!==0||Ce!==this.length-1?re=b[6-ge.length]+ge+re:re=ge+re,oe+=2,oe>=26&&(oe-=26,Ce--)}for(_e!==0&&(re=_e.toString(16)+re);re.length%H!==0;)re="0"+re;return this.negative!==0&&(re="-"+re),re}if(N===(N|0)&&N>=2&&N<=36){var ie=p[N],Se=k[N];re="";var Ee=this.clone();for(Ee.negative=0;!Ee.isZero();){var Ae=Ee.modn(Se).toString(N);Ee=Ee.idivn(Se),Ee.isZero()?re=Ae+re:re=b[ie-Ae.length]+Ae+re}for(this.isZero()&&(re="0"+re);re.length%H!==0;)re="0"+re;return this.negative!==0&&(re="-"+re),re}u(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var N=this.words[0];return this.length===2?N+=this.words[1]*67108864:this.length===3&&this.words[2]===1?N+=4503599627370496+this.words[1]*67108864:this.length>2&&u(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-N:N},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(N,H){return u(typeof h!="undefined"),this.toArrayLike(h,N,H)},f.prototype.toArray=function(N,H){return this.toArrayLike(Array,N,H)},f.prototype.toArrayLike=function(N,H,re){var oe=this.byteLength(),_e=re||Math.max(1,oe);u(oe<=_e,"byte array longer than desired length"),u(_e>0,"Requested array length <= 0"),this.strip();var Ce=H==="le",Le=new N(_e),ge,ie,Se=this.clone();if(Ce){for(ie=0;!Se.isZero();ie++)ge=Se.andln(255),Se.iushrn(8),Le[ie]=ge;for(;ie<_e;ie++)Le[ie]=0}else{for(ie=0;ie<_e-oe;ie++)Le[ie]=0;for(ie=0;!Se.isZero();ie++)ge=Se.andln(255),Se.iushrn(8),Le[_e-ie-1]=ge}return Le},Math.clz32?f.prototype._countBits=function(N){return 32-Math.clz32(N)}:f.prototype._countBits=function(N){var H=N,re=0;return H>=4096&&(re+=13,H>>>=13),H>=64&&(re+=7,H>>>=7),H>=8&&(re+=4,H>>>=4),H>=2&&(re+=2,H>>>=2),re+H},f.prototype._zeroBits=function(N){if(N===0)return 26;var H=N,re=0;return(H&8191)===0&&(re+=13,H>>>=13),(H&127)===0&&(re+=7,H>>>=7),(H&15)===0&&(re+=4,H>>>=4),(H&3)===0&&(re+=2,H>>>=2),(H&1)===0&&re++,re},f.prototype.bitLength=function(){var N=this.words[this.length-1],H=this._countBits(N);return(this.length-1)*26+H};function E(j){for(var N=new Array(j.bitLength()),H=0;H>>oe}return N}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var N=0,H=0;HN.length?this.clone().ior(N):N.clone().ior(this)},f.prototype.uor=function(N){return this.length>N.length?this.clone().iuor(N):N.clone().iuor(this)},f.prototype.iuand=function(N){var H;this.length>N.length?H=N:H=this;for(var re=0;reN.length?this.clone().iand(N):N.clone().iand(this)},f.prototype.uand=function(N){return this.length>N.length?this.clone().iuand(N):N.clone().iuand(this)},f.prototype.iuxor=function(N){var H,re;this.length>N.length?(H=this,re=N):(H=N,re=this);for(var oe=0;oeN.length?this.clone().ixor(N):N.clone().ixor(this)},f.prototype.uxor=function(N){return this.length>N.length?this.clone().iuxor(N):N.clone().iuxor(this)},f.prototype.inotn=function(N){u(typeof N=="number"&&N>=0);var H=Math.ceil(N/26)|0,re=N%26;this._expand(H),re>0&&H--;for(var oe=0;oe0&&(this.words[oe]=~this.words[oe]&67108863>>26-re),this.strip()},f.prototype.notn=function(N){return this.clone().inotn(N)},f.prototype.setn=function(N,H){u(typeof N=="number"&&N>=0);var re=N/26|0,oe=N%26;return this._expand(re+1),H?this.words[re]=this.words[re]|1<N.length?(re=this,oe=N):(re=N,oe=this);for(var _e=0,Ce=0;Ce>>26;for(;_e!==0&&Ce>>26;if(this.length=re.length,_e!==0)this.words[this.length]=_e,this.length++;else if(re!==this)for(;CeN.length?this.clone().iadd(N):N.clone().iadd(this)},f.prototype.isub=function(N){if(N.negative!==0){N.negative=0;var H=this.iadd(N);return N.negative=1,H._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(N),this.negative=1,this._normSign();var re=this.cmp(N);if(re===0)return this.negative=0,this.length=1,this.words[0]=0,this;var oe,_e;re>0?(oe=this,_e=N):(oe=N,_e=this);for(var Ce=0,Le=0;Le<_e.length;Le++)H=(oe.words[Le]|0)-(_e.words[Le]|0)+Ce,Ce=H>>26,this.words[Le]=H&67108863;for(;Ce!==0&&Le>26,this.words[Le]=H&67108863;if(Ce===0&&Le>>26,Ee=ge&67108863,Ae=Math.min(ie,N.length-1),Be=Math.max(0,ie-j.length+1);Be<=Ae;Be++){var Pe=ie-Be|0;oe=j.words[Pe]|0,_e=N.words[Be]|0,Ce=oe*_e+Ee,Se+=Ce/67108864|0,Ee=Ce&67108863}H.words[ie]=Ee|0,ge=Se|0}return ge!==0?H.words[ie]=ge|0:H.length--,H.strip()}var L=function(N,H,re){var oe=N.words,_e=H.words,Ce=re.words,Le=0,ge,ie,Se,Ee=oe[0]|0,Ae=Ee&8191,Be=Ee>>>13,Pe=oe[1]|0,me=Pe&8191,De=Pe>>>13,ce=oe[2]|0,je=ce&8191,lt=ce>>>13,pt=oe[3]|0,Vt=pt&8191,ot=pt>>>13,ut=oe[4]|0,Wt=ut&8191,Nt=ut>>>13,$t=oe[5]|0,sr=$t&8191,Tr=$t>>>13,fr=oe[6]|0,$e=fr&8191,St=fr>>>13,Qt=oe[7]|0,Gt=Qt&8191,_t=Qt>>>13,It=oe[8]|0,mt=It&8191,er=It>>>13,lr=oe[9]|0,wr=lr&8191,Lr=lr>>>13,ti=_e[0]|0,Br=ti&8191,Vr=ti>>>13,dt=_e[1]|0,Ge=dt&8191,Je=dt>>>13,We=_e[2]|0,tt=We&8191,xt=We>>>13,Ie=_e[3]|0,xe=Ie&8191,ke=Ie>>>13,vt=_e[4]|0,ir=vt&8191,ar=vt>>>13,vr=_e[5]|0,ii=vr&8191,pi=vr>>>13,$r=_e[6]|0,di=$r&8191,ji=$r>>>13,In=_e[7]|0,wi=In&8191,On=In>>>13,qn=_e[8]|0,Fn=qn&8191,ra=qn>>>13,la=_e[9]|0,Ut=la&8191,wt=la>>>13;re.negative=N.negative^H.negative,re.length=19,ge=Math.imul(Ae,Br),ie=Math.imul(Ae,Vr),ie=ie+Math.imul(Be,Br)|0,Se=Math.imul(Be,Vr);var rr=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(rr>>>26)|0,rr&=67108863,ge=Math.imul(me,Br),ie=Math.imul(me,Vr),ie=ie+Math.imul(De,Br)|0,Se=Math.imul(De,Vr),ge=ge+Math.imul(Ae,Ge)|0,ie=ie+Math.imul(Ae,Je)|0,ie=ie+Math.imul(Be,Ge)|0,Se=Se+Math.imul(Be,Je)|0;var nr=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(nr>>>26)|0,nr&=67108863,ge=Math.imul(je,Br),ie=Math.imul(je,Vr),ie=ie+Math.imul(lt,Br)|0,Se=Math.imul(lt,Vr),ge=ge+Math.imul(me,Ge)|0,ie=ie+Math.imul(me,Je)|0,ie=ie+Math.imul(De,Ge)|0,Se=Se+Math.imul(De,Je)|0,ge=ge+Math.imul(Ae,tt)|0,ie=ie+Math.imul(Ae,xt)|0,ie=ie+Math.imul(Be,tt)|0,Se=Se+Math.imul(Be,xt)|0;var Er=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(Er>>>26)|0,Er&=67108863,ge=Math.imul(Vt,Br),ie=Math.imul(Vt,Vr),ie=ie+Math.imul(ot,Br)|0,Se=Math.imul(ot,Vr),ge=ge+Math.imul(je,Ge)|0,ie=ie+Math.imul(je,Je)|0,ie=ie+Math.imul(lt,Ge)|0,Se=Se+Math.imul(lt,Je)|0,ge=ge+Math.imul(me,tt)|0,ie=ie+Math.imul(me,xt)|0,ie=ie+Math.imul(De,tt)|0,Se=Se+Math.imul(De,xt)|0,ge=ge+Math.imul(Ae,xe)|0,ie=ie+Math.imul(Ae,ke)|0,ie=ie+Math.imul(Be,xe)|0,Se=Se+Math.imul(Be,ke)|0;var Xr=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(Xr>>>26)|0,Xr&=67108863,ge=Math.imul(Wt,Br),ie=Math.imul(Wt,Vr),ie=ie+Math.imul(Nt,Br)|0,Se=Math.imul(Nt,Vr),ge=ge+Math.imul(Vt,Ge)|0,ie=ie+Math.imul(Vt,Je)|0,ie=ie+Math.imul(ot,Ge)|0,Se=Se+Math.imul(ot,Je)|0,ge=ge+Math.imul(je,tt)|0,ie=ie+Math.imul(je,xt)|0,ie=ie+Math.imul(lt,tt)|0,Se=Se+Math.imul(lt,xt)|0,ge=ge+Math.imul(me,xe)|0,ie=ie+Math.imul(me,ke)|0,ie=ie+Math.imul(De,xe)|0,Se=Se+Math.imul(De,ke)|0,ge=ge+Math.imul(Ae,ir)|0,ie=ie+Math.imul(Ae,ar)|0,ie=ie+Math.imul(Be,ir)|0,Se=Se+Math.imul(Be,ar)|0;var ri=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(ri>>>26)|0,ri&=67108863,ge=Math.imul(sr,Br),ie=Math.imul(sr,Vr),ie=ie+Math.imul(Tr,Br)|0,Se=Math.imul(Tr,Vr),ge=ge+Math.imul(Wt,Ge)|0,ie=ie+Math.imul(Wt,Je)|0,ie=ie+Math.imul(Nt,Ge)|0,Se=Se+Math.imul(Nt,Je)|0,ge=ge+Math.imul(Vt,tt)|0,ie=ie+Math.imul(Vt,xt)|0,ie=ie+Math.imul(ot,tt)|0,Se=Se+Math.imul(ot,xt)|0,ge=ge+Math.imul(je,xe)|0,ie=ie+Math.imul(je,ke)|0,ie=ie+Math.imul(lt,xe)|0,Se=Se+Math.imul(lt,ke)|0,ge=ge+Math.imul(me,ir)|0,ie=ie+Math.imul(me,ar)|0,ie=ie+Math.imul(De,ir)|0,Se=Se+Math.imul(De,ar)|0,ge=ge+Math.imul(Ae,ii)|0,ie=ie+Math.imul(Ae,pi)|0,ie=ie+Math.imul(Be,ii)|0,Se=Se+Math.imul(Be,pi)|0;var Qr=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(Qr>>>26)|0,Qr&=67108863,ge=Math.imul($e,Br),ie=Math.imul($e,Vr),ie=ie+Math.imul(St,Br)|0,Se=Math.imul(St,Vr),ge=ge+Math.imul(sr,Ge)|0,ie=ie+Math.imul(sr,Je)|0,ie=ie+Math.imul(Tr,Ge)|0,Se=Se+Math.imul(Tr,Je)|0,ge=ge+Math.imul(Wt,tt)|0,ie=ie+Math.imul(Wt,xt)|0,ie=ie+Math.imul(Nt,tt)|0,Se=Se+Math.imul(Nt,xt)|0,ge=ge+Math.imul(Vt,xe)|0,ie=ie+Math.imul(Vt,ke)|0,ie=ie+Math.imul(ot,xe)|0,Se=Se+Math.imul(ot,ke)|0,ge=ge+Math.imul(je,ir)|0,ie=ie+Math.imul(je,ar)|0,ie=ie+Math.imul(lt,ir)|0,Se=Se+Math.imul(lt,ar)|0,ge=ge+Math.imul(me,ii)|0,ie=ie+Math.imul(me,pi)|0,ie=ie+Math.imul(De,ii)|0,Se=Se+Math.imul(De,pi)|0,ge=ge+Math.imul(Ae,di)|0,ie=ie+Math.imul(Ae,ji)|0,ie=ie+Math.imul(Be,di)|0,Se=Se+Math.imul(Be,ji)|0;var Oi=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(Oi>>>26)|0,Oi&=67108863,ge=Math.imul(Gt,Br),ie=Math.imul(Gt,Vr),ie=ie+Math.imul(_t,Br)|0,Se=Math.imul(_t,Vr),ge=ge+Math.imul($e,Ge)|0,ie=ie+Math.imul($e,Je)|0,ie=ie+Math.imul(St,Ge)|0,Se=Se+Math.imul(St,Je)|0,ge=ge+Math.imul(sr,tt)|0,ie=ie+Math.imul(sr,xt)|0,ie=ie+Math.imul(Tr,tt)|0,Se=Se+Math.imul(Tr,xt)|0,ge=ge+Math.imul(Wt,xe)|0,ie=ie+Math.imul(Wt,ke)|0,ie=ie+Math.imul(Nt,xe)|0,Se=Se+Math.imul(Nt,ke)|0,ge=ge+Math.imul(Vt,ir)|0,ie=ie+Math.imul(Vt,ar)|0,ie=ie+Math.imul(ot,ir)|0,Se=Se+Math.imul(ot,ar)|0,ge=ge+Math.imul(je,ii)|0,ie=ie+Math.imul(je,pi)|0,ie=ie+Math.imul(lt,ii)|0,Se=Se+Math.imul(lt,pi)|0,ge=ge+Math.imul(me,di)|0,ie=ie+Math.imul(me,ji)|0,ie=ie+Math.imul(De,di)|0,Se=Se+Math.imul(De,ji)|0,ge=ge+Math.imul(Ae,wi)|0,ie=ie+Math.imul(Ae,On)|0,ie=ie+Math.imul(Be,wi)|0,Se=Se+Math.imul(Be,On)|0;var $i=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+($i>>>26)|0,$i&=67108863,ge=Math.imul(mt,Br),ie=Math.imul(mt,Vr),ie=ie+Math.imul(er,Br)|0,Se=Math.imul(er,Vr),ge=ge+Math.imul(Gt,Ge)|0,ie=ie+Math.imul(Gt,Je)|0,ie=ie+Math.imul(_t,Ge)|0,Se=Se+Math.imul(_t,Je)|0,ge=ge+Math.imul($e,tt)|0,ie=ie+Math.imul($e,xt)|0,ie=ie+Math.imul(St,tt)|0,Se=Se+Math.imul(St,xt)|0,ge=ge+Math.imul(sr,xe)|0,ie=ie+Math.imul(sr,ke)|0,ie=ie+Math.imul(Tr,xe)|0,Se=Se+Math.imul(Tr,ke)|0,ge=ge+Math.imul(Wt,ir)|0,ie=ie+Math.imul(Wt,ar)|0,ie=ie+Math.imul(Nt,ir)|0,Se=Se+Math.imul(Nt,ar)|0,ge=ge+Math.imul(Vt,ii)|0,ie=ie+Math.imul(Vt,pi)|0,ie=ie+Math.imul(ot,ii)|0,Se=Se+Math.imul(ot,pi)|0,ge=ge+Math.imul(je,di)|0,ie=ie+Math.imul(je,ji)|0,ie=ie+Math.imul(lt,di)|0,Se=Se+Math.imul(lt,ji)|0,ge=ge+Math.imul(me,wi)|0,ie=ie+Math.imul(me,On)|0,ie=ie+Math.imul(De,wi)|0,Se=Se+Math.imul(De,On)|0,ge=ge+Math.imul(Ae,Fn)|0,ie=ie+Math.imul(Ae,ra)|0,ie=ie+Math.imul(Be,Fn)|0,Se=Se+Math.imul(Be,ra)|0;var tn=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(tn>>>26)|0,tn&=67108863,ge=Math.imul(wr,Br),ie=Math.imul(wr,Vr),ie=ie+Math.imul(Lr,Br)|0,Se=Math.imul(Lr,Vr),ge=ge+Math.imul(mt,Ge)|0,ie=ie+Math.imul(mt,Je)|0,ie=ie+Math.imul(er,Ge)|0,Se=Se+Math.imul(er,Je)|0,ge=ge+Math.imul(Gt,tt)|0,ie=ie+Math.imul(Gt,xt)|0,ie=ie+Math.imul(_t,tt)|0,Se=Se+Math.imul(_t,xt)|0,ge=ge+Math.imul($e,xe)|0,ie=ie+Math.imul($e,ke)|0,ie=ie+Math.imul(St,xe)|0,Se=Se+Math.imul(St,ke)|0,ge=ge+Math.imul(sr,ir)|0,ie=ie+Math.imul(sr,ar)|0,ie=ie+Math.imul(Tr,ir)|0,Se=Se+Math.imul(Tr,ar)|0,ge=ge+Math.imul(Wt,ii)|0,ie=ie+Math.imul(Wt,pi)|0,ie=ie+Math.imul(Nt,ii)|0,Se=Se+Math.imul(Nt,pi)|0,ge=ge+Math.imul(Vt,di)|0,ie=ie+Math.imul(Vt,ji)|0,ie=ie+Math.imul(ot,di)|0,Se=Se+Math.imul(ot,ji)|0,ge=ge+Math.imul(je,wi)|0,ie=ie+Math.imul(je,On)|0,ie=ie+Math.imul(lt,wi)|0,Se=Se+Math.imul(lt,On)|0,ge=ge+Math.imul(me,Fn)|0,ie=ie+Math.imul(me,ra)|0,ie=ie+Math.imul(De,Fn)|0,Se=Se+Math.imul(De,ra)|0,ge=ge+Math.imul(Ae,Ut)|0,ie=ie+Math.imul(Ae,wt)|0,ie=ie+Math.imul(Be,Ut)|0,Se=Se+Math.imul(Be,wt)|0;var fn=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(fn>>>26)|0,fn&=67108863,ge=Math.imul(wr,Ge),ie=Math.imul(wr,Je),ie=ie+Math.imul(Lr,Ge)|0,Se=Math.imul(Lr,Je),ge=ge+Math.imul(mt,tt)|0,ie=ie+Math.imul(mt,xt)|0,ie=ie+Math.imul(er,tt)|0,Se=Se+Math.imul(er,xt)|0,ge=ge+Math.imul(Gt,xe)|0,ie=ie+Math.imul(Gt,ke)|0,ie=ie+Math.imul(_t,xe)|0,Se=Se+Math.imul(_t,ke)|0,ge=ge+Math.imul($e,ir)|0,ie=ie+Math.imul($e,ar)|0,ie=ie+Math.imul(St,ir)|0,Se=Se+Math.imul(St,ar)|0,ge=ge+Math.imul(sr,ii)|0,ie=ie+Math.imul(sr,pi)|0,ie=ie+Math.imul(Tr,ii)|0,Se=Se+Math.imul(Tr,pi)|0,ge=ge+Math.imul(Wt,di)|0,ie=ie+Math.imul(Wt,ji)|0,ie=ie+Math.imul(Nt,di)|0,Se=Se+Math.imul(Nt,ji)|0,ge=ge+Math.imul(Vt,wi)|0,ie=ie+Math.imul(Vt,On)|0,ie=ie+Math.imul(ot,wi)|0,Se=Se+Math.imul(ot,On)|0,ge=ge+Math.imul(je,Fn)|0,ie=ie+Math.imul(je,ra)|0,ie=ie+Math.imul(lt,Fn)|0,Se=Se+Math.imul(lt,ra)|0,ge=ge+Math.imul(me,Ut)|0,ie=ie+Math.imul(me,wt)|0,ie=ie+Math.imul(De,Ut)|0,Se=Se+Math.imul(De,wt)|0;var yn=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(yn>>>26)|0,yn&=67108863,ge=Math.imul(wr,tt),ie=Math.imul(wr,xt),ie=ie+Math.imul(Lr,tt)|0,Se=Math.imul(Lr,xt),ge=ge+Math.imul(mt,xe)|0,ie=ie+Math.imul(mt,ke)|0,ie=ie+Math.imul(er,xe)|0,Se=Se+Math.imul(er,ke)|0,ge=ge+Math.imul(Gt,ir)|0,ie=ie+Math.imul(Gt,ar)|0,ie=ie+Math.imul(_t,ir)|0,Se=Se+Math.imul(_t,ar)|0,ge=ge+Math.imul($e,ii)|0,ie=ie+Math.imul($e,pi)|0,ie=ie+Math.imul(St,ii)|0,Se=Se+Math.imul(St,pi)|0,ge=ge+Math.imul(sr,di)|0,ie=ie+Math.imul(sr,ji)|0,ie=ie+Math.imul(Tr,di)|0,Se=Se+Math.imul(Tr,ji)|0,ge=ge+Math.imul(Wt,wi)|0,ie=ie+Math.imul(Wt,On)|0,ie=ie+Math.imul(Nt,wi)|0,Se=Se+Math.imul(Nt,On)|0,ge=ge+Math.imul(Vt,Fn)|0,ie=ie+Math.imul(Vt,ra)|0,ie=ie+Math.imul(ot,Fn)|0,Se=Se+Math.imul(ot,ra)|0,ge=ge+Math.imul(je,Ut)|0,ie=ie+Math.imul(je,wt)|0,ie=ie+Math.imul(lt,Ut)|0,Se=Se+Math.imul(lt,wt)|0;var Sn=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(Sn>>>26)|0,Sn&=67108863,ge=Math.imul(wr,xe),ie=Math.imul(wr,ke),ie=ie+Math.imul(Lr,xe)|0,Se=Math.imul(Lr,ke),ge=ge+Math.imul(mt,ir)|0,ie=ie+Math.imul(mt,ar)|0,ie=ie+Math.imul(er,ir)|0,Se=Se+Math.imul(er,ar)|0,ge=ge+Math.imul(Gt,ii)|0,ie=ie+Math.imul(Gt,pi)|0,ie=ie+Math.imul(_t,ii)|0,Se=Se+Math.imul(_t,pi)|0,ge=ge+Math.imul($e,di)|0,ie=ie+Math.imul($e,ji)|0,ie=ie+Math.imul(St,di)|0,Se=Se+Math.imul(St,ji)|0,ge=ge+Math.imul(sr,wi)|0,ie=ie+Math.imul(sr,On)|0,ie=ie+Math.imul(Tr,wi)|0,Se=Se+Math.imul(Tr,On)|0,ge=ge+Math.imul(Wt,Fn)|0,ie=ie+Math.imul(Wt,ra)|0,ie=ie+Math.imul(Nt,Fn)|0,Se=Se+Math.imul(Nt,ra)|0,ge=ge+Math.imul(Vt,Ut)|0,ie=ie+Math.imul(Vt,wt)|0,ie=ie+Math.imul(ot,Ut)|0,Se=Se+Math.imul(ot,wt)|0;var Ba=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(Ba>>>26)|0,Ba&=67108863,ge=Math.imul(wr,ir),ie=Math.imul(wr,ar),ie=ie+Math.imul(Lr,ir)|0,Se=Math.imul(Lr,ar),ge=ge+Math.imul(mt,ii)|0,ie=ie+Math.imul(mt,pi)|0,ie=ie+Math.imul(er,ii)|0,Se=Se+Math.imul(er,pi)|0,ge=ge+Math.imul(Gt,di)|0,ie=ie+Math.imul(Gt,ji)|0,ie=ie+Math.imul(_t,di)|0,Se=Se+Math.imul(_t,ji)|0,ge=ge+Math.imul($e,wi)|0,ie=ie+Math.imul($e,On)|0,ie=ie+Math.imul(St,wi)|0,Se=Se+Math.imul(St,On)|0,ge=ge+Math.imul(sr,Fn)|0,ie=ie+Math.imul(sr,ra)|0,ie=ie+Math.imul(Tr,Fn)|0,Se=Se+Math.imul(Tr,ra)|0,ge=ge+Math.imul(Wt,Ut)|0,ie=ie+Math.imul(Wt,wt)|0,ie=ie+Math.imul(Nt,Ut)|0,Se=Se+Math.imul(Nt,wt)|0;var ua=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(ua>>>26)|0,ua&=67108863,ge=Math.imul(wr,ii),ie=Math.imul(wr,pi),ie=ie+Math.imul(Lr,ii)|0,Se=Math.imul(Lr,pi),ge=ge+Math.imul(mt,di)|0,ie=ie+Math.imul(mt,ji)|0,ie=ie+Math.imul(er,di)|0,Se=Se+Math.imul(er,ji)|0,ge=ge+Math.imul(Gt,wi)|0,ie=ie+Math.imul(Gt,On)|0,ie=ie+Math.imul(_t,wi)|0,Se=Se+Math.imul(_t,On)|0,ge=ge+Math.imul($e,Fn)|0,ie=ie+Math.imul($e,ra)|0,ie=ie+Math.imul(St,Fn)|0,Se=Se+Math.imul(St,ra)|0,ge=ge+Math.imul(sr,Ut)|0,ie=ie+Math.imul(sr,wt)|0,ie=ie+Math.imul(Tr,Ut)|0,Se=Se+Math.imul(Tr,wt)|0;var ma=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(ma>>>26)|0,ma&=67108863,ge=Math.imul(wr,di),ie=Math.imul(wr,ji),ie=ie+Math.imul(Lr,di)|0,Se=Math.imul(Lr,ji),ge=ge+Math.imul(mt,wi)|0,ie=ie+Math.imul(mt,On)|0,ie=ie+Math.imul(er,wi)|0,Se=Se+Math.imul(er,On)|0,ge=ge+Math.imul(Gt,Fn)|0,ie=ie+Math.imul(Gt,ra)|0,ie=ie+Math.imul(_t,Fn)|0,Se=Se+Math.imul(_t,ra)|0,ge=ge+Math.imul($e,Ut)|0,ie=ie+Math.imul($e,wt)|0,ie=ie+Math.imul(St,Ut)|0,Se=Se+Math.imul(St,wt)|0;var Wa=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(Wa>>>26)|0,Wa&=67108863,ge=Math.imul(wr,wi),ie=Math.imul(wr,On),ie=ie+Math.imul(Lr,wi)|0,Se=Math.imul(Lr,On),ge=ge+Math.imul(mt,Fn)|0,ie=ie+Math.imul(mt,ra)|0,ie=ie+Math.imul(er,Fn)|0,Se=Se+Math.imul(er,ra)|0,ge=ge+Math.imul(Gt,Ut)|0,ie=ie+Math.imul(Gt,wt)|0,ie=ie+Math.imul(_t,Ut)|0,Se=Se+Math.imul(_t,wt)|0;var Fa=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(Fa>>>26)|0,Fa&=67108863,ge=Math.imul(wr,Fn),ie=Math.imul(wr,ra),ie=ie+Math.imul(Lr,Fn)|0,Se=Math.imul(Lr,ra),ge=ge+Math.imul(mt,Ut)|0,ie=ie+Math.imul(mt,wt)|0,ie=ie+Math.imul(er,Ut)|0,Se=Se+Math.imul(er,wt)|0;var Xo=(Le+ge|0)+((ie&8191)<<13)|0;Le=(Se+(ie>>>13)|0)+(Xo>>>26)|0,Xo&=67108863,ge=Math.imul(wr,Ut),ie=Math.imul(wr,wt),ie=ie+Math.imul(Lr,Ut)|0,Se=Math.imul(Lr,wt);var da=(Le+ge|0)+((ie&8191)<<13)|0;return Le=(Se+(ie>>>13)|0)+(da>>>26)|0,da&=67108863,Ce[0]=rr,Ce[1]=nr,Ce[2]=Er,Ce[3]=Xr,Ce[4]=ri,Ce[5]=Qr,Ce[6]=Oi,Ce[7]=$i,Ce[8]=tn,Ce[9]=fn,Ce[10]=yn,Ce[11]=Sn,Ce[12]=Ba,Ce[13]=ua,Ce[14]=ma,Ce[15]=Wa,Ce[16]=Fa,Ce[17]=Xo,Ce[18]=da,Le!==0&&(Ce[19]=Le,re.length++),re};Math.imul||(L=T);function x(j,N,H){H.negative=N.negative^j.negative,H.length=j.length+N.length;for(var re=0,oe=0,_e=0;_e>>26)|0,oe+=Ce>>>26,Ce&=67108863}H.words[_e]=Le,re=Ce,Ce=oe}return re!==0?H.words[_e]=re:H.length--,H.strip()}function C(j,N,H){var re=new M;return re.mulp(j,N,H)}f.prototype.mulTo=function(N,H){var re,oe=this.length+N.length;return this.length===10&&N.length===10?re=L(this,N,H):oe<63?re=T(this,N,H):oe<1024?re=x(this,N,H):re=C(this,N,H),re};function M(j,N){this.x=j,this.y=N}M.prototype.makeRBT=function(N){for(var H=new Array(N),re=f.prototype._countBits(N)-1,oe=0;oe>=1;return oe},M.prototype.permute=function(N,H,re,oe,_e,Ce){for(var Le=0;Le>>1)_e++;return 1<<_e+1+oe},M.prototype.conjugate=function(N,H,re){if(!(re<=1))for(var oe=0;oe>>13,re[2*Ce+1]=_e&8191,_e=_e>>>13;for(Ce=2*H;Ce>=26,H+=oe/67108864|0,H+=_e>>>26,this.words[re]=_e&67108863}return H!==0&&(this.words[re]=H,this.length++),this},f.prototype.muln=function(N){return this.clone().imuln(N)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(N){var H=E(N);if(H.length===0)return new f(1);for(var re=this,oe=0;oe=0);var H=N%26,re=(N-H)/26,oe=67108863>>>26-H<<26-H,_e;if(H!==0){var Ce=0;for(_e=0;_e>>26-H}Ce&&(this.words[_e]=Ce,this.length++)}if(re!==0){for(_e=this.length-1;_e>=0;_e--)this.words[_e+re]=this.words[_e];for(_e=0;_e=0);var oe;H?oe=(H-H%26)/26:oe=0;var _e=N%26,Ce=Math.min((N-_e)/26,this.length),Le=67108863^67108863>>>_e<<_e,ge=re;if(oe-=Ce,oe=Math.max(0,oe),ge){for(var ie=0;ieCe)for(this.length-=Ce,ie=0;ie=0&&(Se!==0||ie>=oe);ie--){var Ee=this.words[ie]|0;this.words[ie]=Se<<26-_e|Ee>>>_e,Se=Ee&Le}return ge&&Se!==0&&(ge.words[ge.length++]=Se),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(N,H,re){return u(this.negative===0),this.iushrn(N,H,re)},f.prototype.shln=function(N){return this.clone().ishln(N)},f.prototype.ushln=function(N){return this.clone().iushln(N)},f.prototype.shrn=function(N){return this.clone().ishrn(N)},f.prototype.ushrn=function(N){return this.clone().iushrn(N)},f.prototype.testn=function(N){u(typeof N=="number"&&N>=0);var H=N%26,re=(N-H)/26,oe=1<=0);var H=N%26,re=(N-H)/26;if(u(this.negative===0,"imaskn works only with positive numbers"),this.length<=re)return this;if(H!==0&&re++,this.length=Math.min(re,this.length),H!==0){var oe=67108863^67108863>>>H<=67108864;H++)this.words[H]-=67108864,H===this.length-1?this.words[H+1]=1:this.words[H+1]++;return this.length=Math.max(this.length,H+1),this},f.prototype.isubn=function(N){if(u(typeof N=="number"),u(N<67108864),N<0)return this.iaddn(-N);if(this.negative!==0)return this.negative=0,this.iaddn(N),this.negative=1,this;if(this.words[0]-=N,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var H=0;H>26)-(ge/67108864|0),this.words[_e+re]=Ce&67108863}for(;_e>26,this.words[_e+re]=Ce&67108863;if(Le===0)return this.strip();for(u(Le===-1),Le=0,_e=0;_e>26,this.words[_e]=Ce&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(N,H){var re=this.length-N.length,oe=this.clone(),_e=N,Ce=_e.words[_e.length-1]|0,Le=this._countBits(Ce);re=26-Le,re!==0&&(_e=_e.ushln(re),oe.iushln(re),Ce=_e.words[_e.length-1]|0);var ge=oe.length-_e.length,ie;if(H!=="mod"){ie=new f(null),ie.length=ge+1,ie.words=new Array(ie.length);for(var Se=0;Se=0;Ae--){var Be=(oe.words[_e.length+Ae]|0)*67108864+(oe.words[_e.length+Ae-1]|0);for(Be=Math.min(Be/Ce|0,67108863),oe._ishlnsubmul(_e,Be,Ae);oe.negative!==0;)Be--,oe.negative=0,oe._ishlnsubmul(_e,1,Ae),oe.isZero()||(oe.negative^=1);ie&&(ie.words[Ae]=Be)}return ie&&ie.strip(),oe.strip(),H!=="div"&&re!==0&&oe.iushrn(re),{div:ie||null,mod:oe}},f.prototype.divmod=function(N,H,re){if(u(!N.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var oe,_e,Ce;return this.negative!==0&&N.negative===0?(Ce=this.neg().divmod(N,H),H!=="mod"&&(oe=Ce.div.neg()),H!=="div"&&(_e=Ce.mod.neg(),re&&_e.negative!==0&&_e.iadd(N)),{div:oe,mod:_e}):this.negative===0&&N.negative!==0?(Ce=this.divmod(N.neg(),H),H!=="mod"&&(oe=Ce.div.neg()),{div:oe,mod:Ce.mod}):(this.negative&N.negative)!==0?(Ce=this.neg().divmod(N.neg(),H),H!=="div"&&(_e=Ce.mod.neg(),re&&_e.negative!==0&&_e.isub(N)),{div:Ce.div,mod:_e}):N.length>this.length||this.cmp(N)<0?{div:new f(0),mod:this}:N.length===1?H==="div"?{div:this.divn(N.words[0]),mod:null}:H==="mod"?{div:null,mod:new f(this.modn(N.words[0]))}:{div:this.divn(N.words[0]),mod:new f(this.modn(N.words[0]))}:this._wordDiv(N,H)},f.prototype.div=function(N){return this.divmod(N,"div",!1).div},f.prototype.mod=function(N){return this.divmod(N,"mod",!1).mod},f.prototype.umod=function(N){return this.divmod(N,"mod",!0).mod},f.prototype.divRound=function(N){var H=this.divmod(N);if(H.mod.isZero())return H.div;var re=H.div.negative!==0?H.mod.isub(N):H.mod,oe=N.ushrn(1),_e=N.andln(1),Ce=re.cmp(oe);return Ce<0||_e===1&&Ce===0?H.div:H.div.negative!==0?H.div.isubn(1):H.div.iaddn(1)},f.prototype.modn=function(N){u(N<=67108863);for(var H=(1<<26)%N,re=0,oe=this.length-1;oe>=0;oe--)re=(H*re+(this.words[oe]|0))%N;return re},f.prototype.idivn=function(N){u(N<=67108863);for(var H=0,re=this.length-1;re>=0;re--){var oe=(this.words[re]|0)+H*67108864;this.words[re]=oe/N|0,H=oe%N}return this.strip()},f.prototype.divn=function(N){return this.clone().idivn(N)},f.prototype.egcd=function(N){u(N.negative===0),u(!N.isZero());var H=this,re=N.clone();H.negative!==0?H=H.umod(N):H=H.clone();for(var oe=new f(1),_e=new f(0),Ce=new f(0),Le=new f(1),ge=0;H.isEven()&&re.isEven();)H.iushrn(1),re.iushrn(1),++ge;for(var ie=re.clone(),Se=H.clone();!H.isZero();){for(var Ee=0,Ae=1;(H.words[0]&Ae)===0&&Ee<26;++Ee,Ae<<=1);if(Ee>0)for(H.iushrn(Ee);Ee-- >0;)(oe.isOdd()||_e.isOdd())&&(oe.iadd(ie),_e.isub(Se)),oe.iushrn(1),_e.iushrn(1);for(var Be=0,Pe=1;(re.words[0]&Pe)===0&&Be<26;++Be,Pe<<=1);if(Be>0)for(re.iushrn(Be);Be-- >0;)(Ce.isOdd()||Le.isOdd())&&(Ce.iadd(ie),Le.isub(Se)),Ce.iushrn(1),Le.iushrn(1);H.cmp(re)>=0?(H.isub(re),oe.isub(Ce),_e.isub(Le)):(re.isub(H),Ce.isub(oe),Le.isub(_e))}return{a:Ce,b:Le,gcd:re.iushln(ge)}},f.prototype._invmp=function(N){u(N.negative===0),u(!N.isZero());var H=this,re=N.clone();H.negative!==0?H=H.umod(N):H=H.clone();for(var oe=new f(1),_e=new f(0),Ce=re.clone();H.cmpn(1)>0&&re.cmpn(1)>0;){for(var Le=0,ge=1;(H.words[0]&ge)===0&&Le<26;++Le,ge<<=1);if(Le>0)for(H.iushrn(Le);Le-- >0;)oe.isOdd()&&oe.iadd(Ce),oe.iushrn(1);for(var ie=0,Se=1;(re.words[0]&Se)===0&&ie<26;++ie,Se<<=1);if(ie>0)for(re.iushrn(ie);ie-- >0;)_e.isOdd()&&_e.iadd(Ce),_e.iushrn(1);H.cmp(re)>=0?(H.isub(re),oe.isub(_e)):(re.isub(H),_e.isub(oe))}var Ee;return H.cmpn(1)===0?Ee=oe:Ee=_e,Ee.cmpn(0)<0&&Ee.iadd(N),Ee},f.prototype.gcd=function(N){if(this.isZero())return N.abs();if(N.isZero())return this.abs();var H=this.clone(),re=N.clone();H.negative=0,re.negative=0;for(var oe=0;H.isEven()&&re.isEven();oe++)H.iushrn(1),re.iushrn(1);do{for(;H.isEven();)H.iushrn(1);for(;re.isEven();)re.iushrn(1);var _e=H.cmp(re);if(_e<0){var Ce=H;H=re,re=Ce}else if(_e===0||re.cmpn(1)===0)break;H.isub(re)}while(!0);return re.iushln(oe)},f.prototype.invm=function(N){return this.egcd(N).a.umod(N)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(N){return this.words[0]&N},f.prototype.bincn=function(N){u(typeof N=="number");var H=N%26,re=(N-H)/26,oe=1<>>26,Le&=67108863,this.words[Ce]=Le}return _e!==0&&(this.words[Ce]=_e,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(N){var H=N<0;if(this.negative!==0&&!H)return-1;if(this.negative===0&&H)return 1;this.strip();var re;if(this.length>1)re=1;else{H&&(N=-N),u(N<=67108863,"Number is too big");var oe=this.words[0]|0;re=oe===N?0:oeN.length)return 1;if(this.length=0;re--){var oe=this.words[re]|0,_e=N.words[re]|0;if(oe!==_e){oe<_e?H=-1:oe>_e&&(H=1);break}}return H},f.prototype.gtn=function(N){return this.cmpn(N)===1},f.prototype.gt=function(N){return this.cmp(N)===1},f.prototype.gten=function(N){return this.cmpn(N)>=0},f.prototype.gte=function(N){return this.cmp(N)>=0},f.prototype.ltn=function(N){return this.cmpn(N)===-1},f.prototype.lt=function(N){return this.cmp(N)===-1},f.prototype.lten=function(N){return this.cmpn(N)<=0},f.prototype.lte=function(N){return this.cmp(N)<=0},f.prototype.eqn=function(N){return this.cmpn(N)===0},f.prototype.eq=function(N){return this.cmp(N)===0},f.red=function(N){return new G(N)},f.prototype.toRed=function(N){return u(!this.red,"Already a number in reduction context"),u(this.negative===0,"red works only with positives"),N.convertTo(this)._forceRed(N)},f.prototype.fromRed=function(){return u(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(N){return this.red=N,this},f.prototype.forceRed=function(N){return u(!this.red,"Already a number in reduction context"),this._forceRed(N)},f.prototype.redAdd=function(N){return u(this.red,"redAdd works only with red numbers"),this.red.add(this,N)},f.prototype.redIAdd=function(N){return u(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,N)},f.prototype.redSub=function(N){return u(this.red,"redSub works only with red numbers"),this.red.sub(this,N)},f.prototype.redISub=function(N){return u(this.red,"redISub works only with red numbers"),this.red.isub(this,N)},f.prototype.redShl=function(N){return u(this.red,"redShl works only with red numbers"),this.red.shl(this,N)},f.prototype.redMul=function(N){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,N),this.red.mul(this,N)},f.prototype.redIMul=function(N){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,N),this.red.imul(this,N)},f.prototype.redSqr=function(){return u(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return u(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return u(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return u(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return u(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(N){return u(this.red&&!N.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,N)};var g={k256:null,p224:null,p192:null,p25519:null};function P(j,N){this.name=j,this.p=new f(N,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}P.prototype._tmp=function(){var N=new f(null);return N.words=new Array(Math.ceil(this.n/13)),N},P.prototype.ireduce=function(N){var H=N,re;do this.split(H,this.tmp),H=this.imulK(H),H=H.iadd(this.tmp),re=H.bitLength();while(re>this.n);var oe=re0?H.isub(this.p):H.strip!==void 0?H.strip():H._strip(),H},P.prototype.split=function(N,H){N.iushrn(this.n,0,H)},P.prototype.imulK=function(N){return N.imul(this.k)};function A(){P.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}c(A,P),A.prototype.split=function(N,H){for(var re=4194303,oe=Math.min(N.length,9),_e=0;_e>>22,Ce=Le}Ce>>>=22,N.words[_e-10]=Ce,Ce===0&&N.length>10?N.length-=10:N.length-=9},A.prototype.imulK=function(N){N.words[N.length]=0,N.words[N.length+1]=0,N.length+=2;for(var H=0,re=0;re>>=26,N.words[re]=_e,H=oe}return H!==0&&(N.words[N.length++]=H),N},f._prime=function(N){if(g[N])return g[N];var H;if(N==="k256")H=new A;else if(N==="p224")H=new z;else if(N==="p192")H=new O;else if(N==="p25519")H=new U;else throw new Error("Unknown prime "+N);return g[N]=H,H};function G(j){if(typeof j=="string"){var N=f._prime(j);this.m=N.p,this.prime=N}else u(j.gtn(1),"modulus must be greater than 1"),this.m=j,this.prime=null}G.prototype._verify1=function(N){u(N.negative===0,"red works only with positives"),u(N.red,"red works only with red numbers")},G.prototype._verify2=function(N,H){u((N.negative|H.negative)===0,"red works only with positives"),u(N.red&&N.red===H.red,"red works only with red numbers")},G.prototype.imod=function(N){return this.prime?this.prime.ireduce(N)._forceRed(this):N.umod(this.m)._forceRed(this)},G.prototype.neg=function(N){return N.isZero()?N.clone():this.m.sub(N)._forceRed(this)},G.prototype.add=function(N,H){this._verify2(N,H);var re=N.add(H);return re.cmp(this.m)>=0&&re.isub(this.m),re._forceRed(this)},G.prototype.iadd=function(N,H){this._verify2(N,H);var re=N.iadd(H);return re.cmp(this.m)>=0&&re.isub(this.m),re},G.prototype.sub=function(N,H){this._verify2(N,H);var re=N.sub(H);return re.cmpn(0)<0&&re.iadd(this.m),re._forceRed(this)},G.prototype.isub=function(N,H){this._verify2(N,H);var re=N.isub(H);return re.cmpn(0)<0&&re.iadd(this.m),re},G.prototype.shl=function(N,H){return this._verify1(N),this.imod(N.ushln(H))},G.prototype.imul=function(N,H){return this._verify2(N,H),this.imod(N.imul(H))},G.prototype.mul=function(N,H){return this._verify2(N,H),this.imod(N.mul(H))},G.prototype.isqr=function(N){return this.imul(N,N.clone())},G.prototype.sqr=function(N){return this.mul(N,N)},G.prototype.sqrt=function(N){if(N.isZero())return N.clone();var H=this.m.andln(3);if(u(H%2===1),H===3){var re=this.m.add(new f(1)).iushrn(2);return this.pow(N,re)}for(var oe=this.m.subn(1),_e=0;!oe.isZero()&&oe.andln(1)===0;)_e++,oe.iushrn(1);u(!oe.isZero());var Ce=new f(1).toRed(this),Le=Ce.redNeg(),ge=this.m.subn(1).iushrn(1),ie=this.m.bitLength();for(ie=new f(2*ie*ie).toRed(this);this.pow(ie,ge).cmp(Le)!==0;)ie.redIAdd(Le);for(var Se=this.pow(ie,oe),Ee=this.pow(N,oe.addn(1).iushrn(1)),Ae=this.pow(N,oe),Be=_e;Ae.cmp(Ce)!==0;){for(var Pe=Ae,me=0;Pe.cmp(Ce)!==0;me++)Pe=Pe.redSqr();u(me=0;_e--){for(var Se=H.words[_e],Ee=ie-1;Ee>=0;Ee--){var Ae=Se>>Ee&1;if(Ce!==oe[0]&&(Ce=this.sqr(Ce)),Ae===0&&Le===0){ge=0;continue}Le<<=1,Le|=Ae,ge++,!(ge!==re&&(_e!==0||Ee!==0))&&(Ce=this.mul(Ce,oe[Le]),ge=0,Le=0)}ie=26}return Ce},G.prototype.convertTo=function(N){var H=N.umod(this.m);return H===N?H.clone():H},G.prototype.convertFrom=function(N){var H=N.clone();return H.red=null,H},f.mont=function(N){return new Z(N)};function Z(j){G.call(this,j),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}c(Z,G),Z.prototype.convertTo=function(N){return this.imod(N.ushln(this.shift))},Z.prototype.convertFrom=function(N){var H=this.imod(N.mul(this.rinv));return H.red=null,H},Z.prototype.imul=function(N,H){if(N.isZero()||H.isZero())return N.words[0]=0,N.length=1,N;var re=N.imul(H),oe=re.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_e=re.isub(oe).iushrn(this.shift),Ce=_e;return _e.cmp(this.m)>=0?Ce=_e.isub(this.m):_e.cmpn(0)<0&&(Ce=_e.iadd(this.m)),Ce._forceRed(this)},Z.prototype.mul=function(N,H){if(N.isZero()||H.isZero())return new f(0)._forceRed(this);var re=N.mul(H),oe=re.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_e=re.isub(oe).iushrn(this.shift),Ce=_e;return _e.cmp(this.m)>=0?Ce=_e.isub(this.m):_e.cmpn(0)<0&&(Ce=_e.iadd(this.m)),Ce._forceRed(this)},Z.prototype.invm=function(N){var H=this.imod(N._invmp(this.m).mul(this.r2));return H._forceRed(this)}}(i,this)},6860:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]-l[0],o[1]=s[1]-l[1],o[2]=s[2]-l[2],o[3]=s[3]-l[3],o}},6864:function(i){i.exports=a;function a(){var o=new Float32Array(16);return o[0]=1,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=1,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=1,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o}},6867:function(i,a,o){"use strict";i.exports=p;var s=o(1888),l=o(855),u=o(7150);function c(k,E){for(var T=0;T>>1;if(!(M<=0)){var g,P=s.mallocDouble(2*M*x),A=s.mallocInt32(x);if(x=f(k,M,P,A),x>0){if(M===1&&L)l.init(x),g=l.sweepComplete(M,T,0,x,P,A,0,x,P,A);else{var z=s.mallocDouble(2*M*C),O=s.mallocInt32(C);C=f(E,M,z,O),C>0&&(l.init(x+C),M===1?g=l.sweepBipartite(M,T,0,x,P,A,0,C,z,O):g=u(M,T,L,x,P,A,C,z,O),s.free(z),s.free(O))}s.free(P),s.free(A)}return g}}}var d;function v(k,E){d.push([k,E])}function _(k){return d=[],h(k,k,v,!0),d}function b(k,E){return d=[],h(k,E,v,!1),d}function p(k,E,T){switch(arguments.length){case 1:return _(k);case 2:return typeof E=="function"?h(k,k,E,!0):b(k,E);case 3:return h(k,E,T,!1);default:throw new Error("box-intersect: Invalid arguments")}}},6894:function(i){i.exports=a;function a(o,s,l,u){var c=l[1],f=l[2],h=s[1]-c,d=s[2]-f,v=Math.sin(u),_=Math.cos(u);return o[0]=s[0],o[1]=c+h*_-d*v,o[2]=f+h*v+d*_,o}},7004:function(i){"use strict";i.exports=a;function a(o){for(var s=o.length,l=o[o.length-1],u=s,c=s-2;c>=0;--c){var f=l,h=o[c];l=f+h;var d=l-f,v=h-d;v&&(o[--u]=l,l=v)}for(var _=0,c=u;c=p0)&&!(p1>=hi)"),E=v("lo===p0"),T=v("lo0;){Se-=1;var Be=Se*M,Pe=A[Be],me=A[Be+1],De=A[Be+2],ce=A[Be+3],je=A[Be+4],lt=A[Be+5],pt=Se*g,Vt=z[pt],ot=z[pt+1],ut=lt&1,Wt=!!(lt&16),Nt=_e,$t=Ce,sr=ge,Tr=ie;if(ut&&(Nt=ge,$t=ie,sr=_e,Tr=Ce),!(lt&2&&(De=T(N,Pe,me,De,Nt,$t,ot),me>=De))&&!(lt&4&&(me=L(N,Pe,me,De,Nt,$t,Vt),me>=De))){var fr=De-me,$e=je-ce;if(Wt){if(N*fr*(fr+$e)ge&&Se>0){var Ee=(ie[Se][0]-ge)/(ie[Se][0]-ie[Se-1][0]);return ie[Se][1]*(1-Ee)+Ee*ie[Se-1][1]}}return 1}function Z(ge,ie){for(var Se=p({colormap:ge,nshades:256,format:"rgba"}),Ee=new Uint8Array(256*4),Ae=0;Ae<256;++Ae){for(var Be=Se[Ae],Pe=0;Pe<3;++Pe)Ee[4*Ae+Pe]=Be[Pe];ie?Ee[4*Ae+3]=255*G(Ae/255,ie):Ee[4*Ae+3]=255*Be[3]}return b(Ee,[256,256,4],[4,0,1])}function j(ge){for(var ie=ge.length,Se=new Array(ie),Ee=0;Ee0){var pt=this.triShader;pt.bind(),pt.uniforms=me,this.triangleVAO.bind(),ie.drawArrays(ie.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var pt=this.lineShader;pt.bind(),pt.uniforms=me,this.edgeVAO.bind(),ie.lineWidth(this.lineWidth*this.pixelRatio),ie.drawArrays(ie.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var pt=this.pointShader;pt.bind(),pt.uniforms=me,this.pointVAO.bind(),ie.drawArrays(ie.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var pt=this.contourShader;pt.bind(),pt.uniforms=me,this.contourVAO.bind(),ie.drawArrays(ie.LINES,0,this.contourCount),this.contourVAO.unbind()}},U.drawPick=function(ge){ge=ge||{};for(var ie=this.gl,Se=ge.model||z,Ee=ge.view||z,Ae=ge.projection||z,Be=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],Pe=0;Pe<3;++Pe)Be[0][Pe]=Math.max(Be[0][Pe],this.clipBounds[0][Pe]),Be[1][Pe]=Math.min(Be[1][Pe],this.clipBounds[1][Pe]);this._model=[].slice.call(Se),this._view=[].slice.call(Ee),this._projection=[].slice.call(Ae),this._resolution=[ie.drawingBufferWidth,ie.drawingBufferHeight];var me={model:Se,view:Ee,projection:Ae,clipBounds:Be,pickId:this.pickId/255},De=this.pickShader;if(De.bind(),De.uniforms=me,this.triangleCount>0&&(this.triangleVAO.bind(),ie.drawArrays(ie.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),ie.lineWidth(this.lineWidth*this.pixelRatio),ie.drawArrays(ie.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var De=this.pointPickShader;De.bind(),De.uniforms=me,this.pointVAO.bind(),ie.drawArrays(ie.POINTS,0,this.pointCount),this.pointVAO.unbind()}},U.pick=function(ge){if(!ge||ge.id!==this.pickId)return null;for(var ie=ge.value[0]+256*ge.value[1]+65536*ge.value[2],Se=this.cells[ie],Ee=this.positions,Ae=new Array(Se.length),Be=0;BeMath.max(x,C)?M[2]=1:x>Math.max(L,C)?M[0]=1:M[1]=1;for(var g=0,P=0,A=0;A<3;++A)g+=T[A]*T[A],P+=M[A]*T[A];for(var A=0;A<3;++A)M[A]-=P/g*T[A];return f(M,M),M}function b(T,L,x,C,M,g,P,A){this.center=s(x),this.up=s(C),this.right=s(M),this.radius=s([g]),this.angle=s([P,A]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(T,L),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var z=0;z<16;++z)this.computedMatrix[z]=.5;this.recalcMatrix(0)}var p=b.prototype;p.setDistanceLimits=function(T,L){T>0?T=Math.log(T):T=-1/0,L>0?L=Math.log(L):L=1/0,L=Math.max(L,T),this.radius.bounds[0][0]=T,this.radius.bounds[1][0]=L},p.getDistanceLimits=function(T){var L=this.radius.bounds[0];return T?(T[0]=Math.exp(L[0][0]),T[1]=Math.exp(L[1][0]),T):[Math.exp(L[0][0]),Math.exp(L[1][0])]},p.recalcMatrix=function(T){this.center.curve(T),this.up.curve(T),this.right.curve(T),this.radius.curve(T),this.angle.curve(T);for(var L=this.computedUp,x=this.computedRight,C=0,M=0,g=0;g<3;++g)M+=L[g]*x[g],C+=L[g]*L[g];for(var P=Math.sqrt(C),A=0,g=0;g<3;++g)x[g]-=L[g]*M/C,A+=x[g]*x[g],L[g]/=P;for(var z=Math.sqrt(A),g=0;g<3;++g)x[g]/=z;var O=this.computedToward;c(O,L,x),f(O,O);for(var U=Math.exp(this.computedRadius[0]),G=this.computedAngle[0],Z=this.computedAngle[1],j=Math.cos(G),N=Math.sin(G),H=Math.cos(Z),re=Math.sin(Z),oe=this.computedCenter,_e=j*H,Ce=N*H,Le=re,ge=-j*re,ie=-N*re,Se=H,Ee=this.computedEye,Ae=this.computedMatrix,g=0;g<3;++g){var Be=_e*x[g]+Ce*O[g]+Le*L[g];Ae[4*g+1]=ge*x[g]+ie*O[g]+Se*L[g],Ae[4*g+2]=Be,Ae[4*g+3]=0}var Pe=Ae[1],me=Ae[5],De=Ae[9],ce=Ae[2],je=Ae[6],lt=Ae[10],pt=me*lt-De*je,Vt=De*ce-Pe*lt,ot=Pe*je-me*ce,ut=d(pt,Vt,ot);pt/=ut,Vt/=ut,ot/=ut,Ae[0]=pt,Ae[4]=Vt,Ae[8]=ot;for(var g=0;g<3;++g)Ee[g]=oe[g]+Ae[2+4*g]*U;for(var g=0;g<3;++g){for(var A=0,Wt=0;Wt<3;++Wt)A+=Ae[g+4*Wt]*Ee[Wt];Ae[12+g]=-A}Ae[15]=1},p.getMatrix=function(T,L){this.recalcMatrix(T);var x=this.computedMatrix;if(L){for(var C=0;C<16;++C)L[C]=x[C];return L}return x};var k=[0,0,0];p.rotate=function(T,L,x,C){if(this.angle.move(T,L,x),C){this.recalcMatrix(T);var M=this.computedMatrix;k[0]=M[2],k[1]=M[6],k[2]=M[10];for(var g=this.computedUp,P=this.computedRight,A=this.computedToward,z=0;z<3;++z)M[4*z]=g[z],M[4*z+1]=P[z],M[4*z+2]=A[z];u(M,M,C,k);for(var z=0;z<3;++z)g[z]=M[4*z],P[z]=M[4*z+1];this.up.set(T,g[0],g[1],g[2]),this.right.set(T,P[0],P[1],P[2])}},p.pan=function(T,L,x,C){L=L||0,x=x||0,C=C||0,this.recalcMatrix(T);var M=this.computedMatrix,g=Math.exp(this.computedRadius[0]),P=M[1],A=M[5],z=M[9],O=d(P,A,z);P/=O,A/=O,z/=O;var U=M[0],G=M[4],Z=M[8],j=U*P+G*A+Z*z;U-=P*j,G-=A*j,Z-=z*j;var N=d(U,G,Z);U/=N,G/=N,Z/=N;var H=U*L+P*x,re=G*L+A*x,oe=Z*L+z*x;this.center.move(T,H,re,oe);var _e=Math.exp(this.computedRadius[0]);_e=Math.max(1e-4,_e+C),this.radius.set(T,Math.log(_e))},p.translate=function(T,L,x,C){this.center.move(T,L||0,x||0,C||0)},p.setMatrix=function(T,L,x,C){var M=1;typeof x=="number"&&(M=x|0),(M<0||M>3)&&(M=1);var g=(M+2)%3,P=(M+1)%3;L||(this.recalcMatrix(T),L=this.computedMatrix);var A=L[M],z=L[M+4],O=L[M+8];if(C){var G=Math.abs(A),Z=Math.abs(z),j=Math.abs(O),N=Math.max(G,Z,j);G===N?(A=A<0?-1:1,z=O=0):j===N?(O=O<0?-1:1,A=z=0):(z=z<0?-1:1,A=O=0)}else{var U=d(A,z,O);A/=U,z/=U,O/=U}var H=L[g],re=L[g+4],oe=L[g+8],_e=H*A+re*z+oe*O;H-=A*_e,re-=z*_e,oe-=O*_e;var Ce=d(H,re,oe);H/=Ce,re/=Ce,oe/=Ce;var Le=z*oe-O*re,ge=O*H-A*oe,ie=A*re-z*H,Se=d(Le,ge,ie);Le/=Se,ge/=Se,ie/=Se,this.center.jump(T,fr,$e,St),this.radius.idle(T),this.up.jump(T,A,z,O),this.right.jump(T,H,re,oe);var Ee,Ae;if(M===2){var Be=L[1],Pe=L[5],me=L[9],De=Be*H+Pe*re+me*oe,ce=Be*Le+Pe*ge+me*ie;Vt<0?Ee=-Math.PI/2:Ee=Math.PI/2,Ae=Math.atan2(ce,De)}else{var je=L[2],lt=L[6],pt=L[10],Vt=je*A+lt*z+pt*O,ot=je*H+lt*re+pt*oe,ut=je*Le+lt*ge+pt*ie;Ee=Math.asin(v(Vt)),Ae=Math.atan2(ut,ot)}this.angle.jump(T,Ae,Ee),this.recalcMatrix(T);var Wt=L[2],Nt=L[6],$t=L[10],sr=this.computedMatrix;l(sr,L);var Tr=sr[15],fr=sr[12]/Tr,$e=sr[13]/Tr,St=sr[14]/Tr,Qt=Math.exp(this.computedRadius[0]);this.center.jump(T,fr-Wt*Qt,$e-Nt*Qt,St-$t*Qt)},p.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},p.idle=function(T){this.center.idle(T),this.up.idle(T),this.right.idle(T),this.radius.idle(T),this.angle.idle(T)},p.flush=function(T){this.center.flush(T),this.up.flush(T),this.right.flush(T),this.radius.flush(T),this.angle.flush(T)},p.setDistance=function(T,L){L>0&&this.radius.set(T,Math.log(L))},p.lookAt=function(T,L,x,C){this.recalcMatrix(T),L=L||this.computedEye,x=x||this.computedCenter,C=C||this.computedUp;var M=C[0],g=C[1],P=C[2],A=d(M,g,P);if(!(A<1e-6)){M/=A,g/=A,P/=A;var z=L[0]-x[0],O=L[1]-x[1],U=L[2]-x[2],G=d(z,O,U);if(!(G<1e-6)){z/=G,O/=G,U/=G;var Z=this.computedRight,j=Z[0],N=Z[1],H=Z[2],re=M*j+g*N+P*H;j-=re*M,N-=re*g,H-=re*P;var oe=d(j,N,H);if(!(oe<.01&&(j=g*U-P*O,N=P*z-M*U,H=M*O-g*z,oe=d(j,N,H),oe<1e-6))){j/=oe,N/=oe,H/=oe,this.up.set(T,M,g,P),this.right.set(T,j,N,H),this.center.set(T,x[0],x[1],x[2]),this.radius.set(T,Math.log(G));var _e=g*H-P*N,Ce=P*j-M*H,Le=M*N-g*j,ge=d(_e,Ce,Le);_e/=ge,Ce/=ge,Le/=ge;var ie=M*z+g*O+P*U,Se=j*z+N*O+H*U,Ee=_e*z+Ce*O+Le*U,Ae=Math.asin(v(ie)),Be=Math.atan2(Ee,Se),Pe=this.angle._state,me=Pe[Pe.length-1],De=Pe[Pe.length-2];me=me%(2*Math.PI);var ce=Math.abs(me+2*Math.PI-Be),je=Math.abs(me-Be),lt=Math.abs(me-2*Math.PI-Be);ce0)for(var ie=0;ieL)return C-1}return C},d=function(T,L,x){return Tx?x:T},v=function(T,L,x){var C=L.vectors,S=L.meshgrid,g=T[0],P=T[1],E=T[2],z=S[0].length,q=S[1].length,U=S[2].length,G=h(S[0],g),Z=h(S[1],P),j=h(S[2],E),N=G+1,H=Z+1,re=j+1;if(G=d(G,0,z-1),N=d(N,0,z-1),Z=d(Z,0,q-1),H=d(H,0,q-1),j=d(j,0,U-1),re=d(re,0,U-1),G<0||Z<0||j<0||N>z-1||H>q-1||re>U-1)return s.create();var oe=S[0][G],_e=S[0][N],ke=S[1][Z],Ce=S[1][H],ge=S[2][j],ie=S[2][re],Se=(g-oe)/(_e-oe),Ee=(P-ke)/(Ce-ke),we=(E-ge)/(ie-ge);isFinite(Se)||(Se=.5),isFinite(Ee)||(Ee=.5),isFinite(we)||(we=.5);var De,Le,me,Pe,ce,He;switch(x.reversedX&&(G=z-1-G,N=z-1-N),x.reversedY&&(Z=q-1-Z,H=q-1-H),x.reversedZ&&(j=U-1-j,re=U-1-re),x.filled){case 5:ce=j,He=re,me=Z*U,Pe=H*U,De=G*U*q,Le=N*U*q;break;case 4:ce=j,He=re,De=G*U,Le=N*U,me=Z*U*z,Pe=H*U*z;break;case 3:me=Z,Pe=H,ce=j*q,He=re*q,De=G*q*U,Le=N*q*U;break;case 2:me=Z,Pe=H,De=G*q,Le=N*q,ce=j*q*z,He=re*q*z;break;case 1:De=G,Le=N,ce=j*z,He=re*z,me=Z*z*U,Pe=H*z*U;break;default:De=G,Le=N,me=Z*z,Pe=H*z,ce=j*z*q,He=re*z*q;break}var lt=C[De+me+ce],mt=C[De+me+He],Vt=C[De+Pe+ce],st=C[De+Pe+He],ct=C[Le+me+ce],Qt=C[Le+me+He],Ht=C[Le+Pe+ce],nr=C[Le+Pe+He],tt=s.create(),je=s.create(),Ue=s.create(),Ae=s.create();s.lerp(tt,lt,ct,Se),s.lerp(je,mt,Qt,Se),s.lerp(Ue,Vt,Ht,Se),s.lerp(Ae,st,nr,Se);var rt=s.create(),St=s.create();s.lerp(rt,tt,Ue,Ee),s.lerp(St,je,Ae,Ee);var Tt=s.create();return s.lerp(Tt,rt,St,we),Tt},m=function(T,L){var x=L[0],C=L[1],S=L[2];return T[0]=x<0?-x:x,T[1]=C<0?-C:C,T[2]=S<0?-S:S,T},b=function(T){var L=1/0;T.sort(function(g,P){return g-P});for(var x=T.length,C=1;CN||nrH||ttre)},_e=s.distance(L[0],L[1]),ke=10*_e/C,Ce=ke*ke,ge=1,ie=0,Se=x.length;Se>1&&(ge=p(x));for(var Ee=0;Eeie&&(ie=lt),ce.push(lt),U.push({points:De,velocities:Le,divergences:ce});for(var mt=0;mtCe&&s.scale(Vt,Vt,ke/Math.sqrt(st)),s.add(Vt,Vt,we),me=z(Vt),s.squaredDistance(Pe,Vt)-Ce>-1e-4*Ce){De.push(Vt),Pe=Vt,Le.push(me);var He=q(Vt,me),lt=s.length(He);isFinite(lt)&<>ie&&(ie=lt),ce.push(lt)}we=Vt}}var ct=f(U,T.colormap,ie,ge);return g?ct.tubeScale=g:(ie===0&&(ie=1),ct.tubeScale=S*.5*ge/ie),ct};var k=o(6740),M=o(6405).createMesh;i.exports.createTubeMesh=function(T,L){return M(T,L,{shaders:k,traceType:"streamtube"})}},990:function(i,a,o){var s=o(9405),l=o(3236),u=l([`precision highp float; #define GLSLIFY 1 -attribute vec3 position, nextPosition; -attribute float arcLength, lineWidth; -attribute vec4 color; - -uniform vec2 screenShape; -uniform float pixelRatio; -uniform mat4 model, view, projection; +attribute vec4 uv; +attribute vec3 f; +attribute vec3 normal; -varying vec4 fragColor; -varying vec3 worldPosition; -varying float pixelArcLength; +uniform vec3 objectOffset; +uniform mat4 model, view, projection, inverseModel; +uniform vec3 lightPosition, eyePosition; +uniform sampler2D colormap; -vec4 project(vec3 p) { - return projection * (view * (model * vec4(p, 1.0))); -} +varying float value, kill; +varying vec3 worldCoordinate; +varying vec2 planeCoordinate; +varying vec3 lightDirection, eyeDirection, surfaceNormal; +varying vec4 vColor; void main() { - vec4 startPoint = project(position); - vec4 endPoint = project(nextPosition); - - vec2 A = startPoint.xy / startPoint.w; - vec2 B = endPoint.xy / endPoint.w; + vec3 localCoordinate = vec3(uv.zw, f.x); + worldCoordinate = objectOffset + localCoordinate; + mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0)); + vec4 worldPosition = (model * objectOffsetTranslation) * vec4(localCoordinate, 1.0); + vec4 clipPosition = projection * (view * worldPosition); + gl_Position = clipPosition; + kill = f.y; + value = f.z; + planeCoordinate = uv.xy; - float clipAngle = atan( - (B.y - A.y) * screenShape.y, - (B.x - A.x) * screenShape.x - ); + vColor = texture2D(colormap, vec2(value, value)); - vec2 offset = 0.5 * pixelRatio * lineWidth * vec2( - sin(clipAngle), - -cos(clipAngle) - ) / screenShape; + //Lighting geometry parameters + vec4 cameraCoordinate = view * worldPosition; + cameraCoordinate.xyz /= cameraCoordinate.w; + lightDirection = lightPosition - cameraCoordinate.xyz; + eyeDirection = eyePosition - cameraCoordinate.xyz; + surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz); +} +`]),c=l([`precision highp float; +#define GLSLIFY 1 - gl_Position = vec4(startPoint.xy + startPoint.w * offset, startPoint.zw); +float beckmannDistribution(float x, float roughness) { + float NdotH = max(x, 0.0001); + float cos2Alpha = NdotH * NdotH; + float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; + float roughness2 = roughness * roughness; + float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; + return exp(tan2Alpha / roughness2) / denom; +} - worldPosition = position; - pixelArcLength = arcLength; - fragColor = color; +float beckmannSpecular( + vec3 lightDirection, + vec3 viewDirection, + vec3 surfaceNormal, + float roughness) { + return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness); } -`]),c=s([`precision highp float; -#define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || @@ -1904,71 +1873,87 @@ bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } -uniform vec3 clipBounds[2]; -uniform sampler2D dashTexture; -uniform float dashScale; -uniform float opacity; +uniform vec3 lowerBound, upperBound; +uniform float contourTint; +uniform vec4 contourColor; +uniform sampler2D colormap; +uniform vec3 clipBounds[2]; +uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; +uniform float vertexColor; -varying vec3 worldPosition; -varying float pixelArcLength; -varying vec4 fragColor; +varying float value, kill; +varying vec3 worldCoordinate; +varying vec3 lightDirection, eyeDirection, surfaceNormal; +varying vec4 vColor; void main() { if ( - outOfRange(clipBounds[0], clipBounds[1], worldPosition) || - fragColor.a * opacity == 0. + kill > 0.0 || + vColor.a == 0.0 || + outOfRange(clipBounds[0], clipBounds[1], worldCoordinate) ) discard; - float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r; - if(dashWeight < 0.5) { - discard; + vec3 N = normalize(surfaceNormal); + vec3 V = normalize(eyeDirection); + vec3 L = normalize(lightDirection); + + if(gl_FrontFacing) { + N = -N; } - gl_FragColor = fragColor * opacity; + + float specular = max(beckmannSpecular(L, V, N, roughness), 0.); + float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); + + //decide how to interpolate color \u2014 in vertex or in fragment + vec4 surfaceColor = + step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) + + step(.5, vertexColor) * vColor; + + vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); + + gl_FragColor = mix(litColor, contourColor, contourTint) * opacity; } -`]),f=s([`precision highp float; +`]),f=l([`precision highp float; #define GLSLIFY 1 -#define FLOAT_MAX 1.70141184e38 -#define FLOAT_MIN 1.17549435e-38 - -// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl -vec4 packFloat(float v) { - float av = abs(v); +attribute vec4 uv; +attribute float f; - //Handle special cases - if(av < FLOAT_MIN) { - return vec4(0.0, 0.0, 0.0, 0.0); - } else if(v > FLOAT_MAX) { - return vec4(127.0, 128.0, 0.0, 0.0) / 255.0; - } else if(v < -FLOAT_MAX) { - return vec4(255.0, 128.0, 0.0, 0.0) / 255.0; - } +uniform vec3 objectOffset; +uniform mat3 permutation; +uniform mat4 model, view, projection; +uniform float height, zOffset; +uniform sampler2D colormap; - vec4 c = vec4(0,0,0,0); +varying float value, kill; +varying vec3 worldCoordinate; +varying vec2 planeCoordinate; +varying vec3 lightDirection, eyeDirection, surfaceNormal; +varying vec4 vColor; - //Compute exponent and mantissa - float e = floor(log2(av)); - float m = av * pow(2.0, -e) - 1.0; +void main() { + vec3 dataCoordinate = permutation * vec3(uv.xy, height); + worldCoordinate = objectOffset + dataCoordinate; + mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0)); + vec4 worldPosition = (model * objectOffsetTranslation) * vec4(dataCoordinate, 1.0); - //Unpack mantissa - c[1] = floor(128.0 * m); - m -= c[1] / 128.0; - c[2] = floor(32768.0 * m); - m -= c[2] / 32768.0; - c[3] = floor(8388608.0 * m); + vec4 clipPosition = projection * (view * worldPosition); + clipPosition.z += zOffset; - //Unpack exponent - float ebias = e + 127.0; - c[0] = floor(ebias / 2.0); - ebias -= c[0] * 2.0; - c[1] += floor(ebias) * 128.0; + gl_Position = clipPosition; + value = f + objectOffset.z; + kill = -1.0; + planeCoordinate = uv.zw; - //Unpack sign bit - c[0] += 128.0 * step(0.0, -v); + vColor = texture2D(colormap, vec2(value, value)); - //Scale back to range - return c / 255.0; + //Don't do lighting for contours + surfaceNormal = vec3(1,0,0); + eyeDirection = vec3(0,1,0); + lightDirection = vec3(0,0,1); } +`]),h=l([`precision highp float; +#define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || @@ -1990,24 +1975,39 @@ bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } -uniform float pickId; +uniform vec2 shape; uniform vec3 clipBounds[2]; +uniform float pickId; -varying vec3 worldPosition; -varying float pixelArcLength; -varying vec4 fragColor; +varying float value, kill; +varying vec3 worldCoordinate; +varying vec2 planeCoordinate; +varying vec3 surfaceNormal; + +vec2 splitFloat(float v) { + float vh = 255.0 * v; + float upper = floor(vh); + float lower = fract(vh); + return vec2(upper / 255.0, floor(lower * 16.0) / 16.0); +} void main() { - if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard; + if ((kill > 0.0) || + (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard; - gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz); -}`]),h=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];a.createShader=function(d){return l(d,u,c,null,h)},a.createPickShader=function(d){return l(d,u,f,null,h)}},7352:function(i,a,o){"use strict";var s=o(5721),l=o(4750),u=o(2690);i.exports=c;function c(f){var h=f.length;if(h===0)return[];if(h===1)return[[0]];var d=f[0].length;return d===0?[]:d===1?s(f):d===2?l(f):u(f,d)}},7399:function(i){i.exports=a;function a(o,s){var l=s[0],u=s[1],c=s[2],f=s[3],h=l+l,d=u+u,v=c+c,_=l*h,b=u*h,p=u*d,k=c*h,E=c*d,T=c*v,L=f*h,x=f*d,C=f*v;return o[0]=1-p-T,o[1]=b+C,o[2]=k-x,o[3]=0,o[4]=b-C,o[5]=1-_-T,o[6]=E+L,o[7]=0,o[8]=k+x,o[9]=E-L,o[10]=1-_-p,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o}},7417:function(i){i.exports=a;function a(o,s,l){return o[0]=Math.max(s[0],l[0]),o[1]=Math.max(s[1],l[1]),o[2]=Math.max(s[2],l[2]),o}},7442:function(i,a,o){var s=o(6658),l=o(7182),u=o(2652),c=o(9921),f=o(8648),h=b(),d=b(),v=b();i.exports=_;function _(E,T,L,x){if(c(T)===0||c(L)===0)return!1;var C=u(T,h.translate,h.scale,h.skew,h.perspective,h.quaternion),M=u(L,d.translate,d.scale,d.skew,d.perspective,d.quaternion);return!C||!M?!1:(s(v.translate,h.translate,d.translate,x),s(v.skew,h.skew,d.skew,x),s(v.scale,h.scale,d.scale,x),s(v.perspective,h.perspective,d.perspective,x),f(v.quaternion,h.quaternion,d.quaternion,x),l(E,v.translate,v.scale,v.skew,v.perspective,v.quaternion),!0)}function b(){return{translate:p(),scale:p(1),skew:p(),perspective:k(),quaternion:k()}}function p(E){return[E||0,E||0,E||0]}function k(){return[0,0,0,1]}},7507:function(i,a){"use strict";a.byteLength=d,a.toByteArray=_,a.fromByteArray=k;for(var o=[],s=[],l=typeof Uint8Array!="undefined"?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,f=u.length;c0)throw new Error("Invalid string. Length must be a multiple of 4");var L=E.indexOf("=");L===-1&&(L=T);var x=L===T?0:4-L%4;return[L,x]}function d(E){var T=h(E),L=T[0],x=T[1];return(L+x)*3/4-x}function v(E,T,L){return(T+L)*3/4-L}function _(E){var T,L=h(E),x=L[0],C=L[1],M=new l(v(E,x,C)),g=0,P=C>0?x-4:x,A;for(A=0;A>16&255,M[g++]=T>>8&255,M[g++]=T&255;return C===2&&(T=s[E.charCodeAt(A)]<<2|s[E.charCodeAt(A+1)]>>4,M[g++]=T&255),C===1&&(T=s[E.charCodeAt(A)]<<10|s[E.charCodeAt(A+1)]<<4|s[E.charCodeAt(A+2)]>>2,M[g++]=T>>8&255,M[g++]=T&255),M}function b(E){return o[E>>18&63]+o[E>>12&63]+o[E>>6&63]+o[E&63]}function p(E,T,L){for(var x,C=[],M=T;MP?P:g+M));return x===1?(T=E[L-1],C.push(o[T>>2]+o[T<<4&63]+"==")):x===2&&(T=(E[L-2]<<8)+E[L-1],C.push(o[T>>10]+o[T>>4&63]+o[T<<2&63]+"=")),C.join("")}},7518:function(i,a,o){"use strict";var s=o(1433);function l(f,h,d,v,_,b){this.location=f,this.dimension=h,this.a=d,this.b=v,this.c=_,this.d=b}l.prototype.bind=function(f){switch(this.dimension){case 1:f.vertexAttrib1f(this.location,this.a);break;case 2:f.vertexAttrib2f(this.location,this.a,this.b);break;case 3:f.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:f.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d);break}};function u(f,h,d){this.gl=f,this._ext=h,this.handle=d,this._attribs=[],this._useElements=!1,this._elementsType=f.UNSIGNED_SHORT}u.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var f=0;f1.0001)return null;A+=P[L]}return Math.abs(A-1)>.001?null:[x,h(v,P),P]}},7636:function(i){i.exports=a;function a(o,s){s=s||1;var l=Math.random()*2*Math.PI,u=Math.random()*2-1,c=Math.sqrt(1-u*u)*s;return o[0]=Math.cos(l)*c,o[1]=Math.sin(l)*c,o[2]=u*s,o}},7640:function(i,a,o){"use strict";var s=o(1888);function l(_){switch(_){case"uint32":return[s.mallocUint32,s.freeUint32];default:return null}}var u={"uint32,1,0":function(_,b){return function(k,E,T,L,x,C,M,g,P,A,z){var O,U,G,Z=k*x+L,j,N=_(g),H,re,oe,_e;for(O=k+1;O<=E;++O){for(U=O,Z+=x,G=Z,H=0,re=Z,j=0;jk;){H=0,re=G-x;t:for(j=0;j_e)break t;re+=A,H+=z}for(H=G,re=G-x,j=0;j>1,N=j-U,H=j+U,re=G,oe=N,_e=j,Ce=H,Le=Z,ge=E+1,ie=T-1,Se=!0,Ee,Ae,Be,Pe,me,De,ce,je,lt,pt=0,Vt=0,ot=0,ut,Wt,Nt,$t,sr,Tr,fr,$e,St,Qt,Gt,_t,It,mt,er,lr,wr=P,Lr=b(wr),ti=b(wr);Wt=C*re,Nt=C*oe,lr=x;e:for(ut=0;ut0){Ae=re,re=oe,oe=Ae;break e}if(ot<0)break e;lr+=z}Wt=C*Ce,Nt=C*Le,lr=x;e:for(ut=0;ut0){Ae=Ce,Ce=Le,Le=Ae;break e}if(ot<0)break e;lr+=z}Wt=C*re,Nt=C*_e,lr=x;e:for(ut=0;ut0){Ae=re,re=_e,_e=Ae;break e}if(ot<0)break e;lr+=z}Wt=C*oe,Nt=C*_e,lr=x;e:for(ut=0;ut0){Ae=oe,oe=_e,_e=Ae;break e}if(ot<0)break e;lr+=z}Wt=C*re,Nt=C*Ce,lr=x;e:for(ut=0;ut0){Ae=re,re=Ce,Ce=Ae;break e}if(ot<0)break e;lr+=z}Wt=C*_e,Nt=C*Ce,lr=x;e:for(ut=0;ut0){Ae=_e,_e=Ce,Ce=Ae;break e}if(ot<0)break e;lr+=z}Wt=C*oe,Nt=C*Le,lr=x;e:for(ut=0;ut0){Ae=oe,oe=Le,Le=Ae;break e}if(ot<0)break e;lr+=z}Wt=C*oe,Nt=C*_e,lr=x;e:for(ut=0;ut0){Ae=oe,oe=_e,_e=Ae;break e}if(ot<0)break e;lr+=z}Wt=C*Ce,Nt=C*Le,lr=x;e:for(ut=0;ut0){Ae=Ce,Ce=Le,Le=Ae;break e}if(ot<0)break e;lr+=z}for(Wt=C*re,Nt=C*oe,$t=C*_e,sr=C*Ce,Tr=C*Le,fr=C*G,$e=C*j,St=C*Z,er=0,lr=x,ut=0;ut0)ie--;else if(ot<0){for(Wt=C*De,Nt=C*ge,$t=C*ie,lr=x,ut=0;ut0)for(;;){ce=x+ie*C,er=0;e:for(ut=0;ut0){if(--ieZ){e:for(;;){for(ce=x+ge*C,er=0,lr=x,ut=0;ut1&&k?T(p,k[0],k[1]):T(p)}var d={"uint32,1,0":function(_,b){return function(p){var k=p.data,E=p.offset|0,T=p.shape,L=p.stride,x=L[0]|0,C=T[0]|0,M=L[1]|0,g=T[1]|0,P=M,A=M,z=1;C<=32?_(0,C-1,k,E,x,M,C,g,P,A,z):b(0,C-1,k,E,x,M,C,g,P,A,z)}}};function v(_,b){var p=[b,_].join(","),k=d[p],E=c(_,b),T=h(_,b,E);return k(E,T)}i.exports=v},7642:function(i,a,o){"use strict";var s=o(8954),l=o(1682);i.exports=h;function u(d,v){this.point=d,this.index=v}function c(d,v){for(var _=d.point,b=v.point,p=_.length,k=0;k=2)return!1;G[j]=N}return!0}):U=U.filter(function(G){for(var Z=0;Z<=b;++Z){var j=P[G[Z]];if(j<0)return!1;G[Z]=j}return!0}),b&1)for(var E=0;E",H="",re=N.length,oe=H.length,_e=G[0]===k||G[0]===L,Ce=0,Le=-oe;Ce>-1&&(Ce=Z.indexOf(N,Ce),!(Ce===-1||(Le=Z.indexOf(H,Ce+re),Le===-1)||Le<=Ce));){for(var ge=Ce;ge=Le)j[ge]=null,Z=Z.substr(0,ge)+" "+Z.substr(ge+1);else if(j[ge]!==null){var ie=j[ge].indexOf(G[0]);ie===-1?j[ge]+=G:_e&&(j[ge]=j[ge].substr(0,ie+1)+(1+parseInt(j[ge][ie+1]))+j[ge].substr(ie+2))}var Se=Ce+re,Ee=Z.substr(Se,Le-Se),Ae=Ee.indexOf(N);Ae!==-1?Ce=Ae:Ce=Le+oe}return j}function M(U,G,Z){for(var j=G.textAlign||"start",N=G.textBaseline||"alphabetic",H=[1<<30,1<<30],re=[0,0],oe=U.length,_e=0;_e/g,` -`):Z=Z.replace(/\/g," ");var re="",oe=[];for(me=0;me-1?parseInt($e[1+Gt]):0,mt=_t>-1?parseInt(St[1+_t]):0;It!==mt&&(Qt=Qt.replace(ot(),"?px "),je*=Math.pow(.75,mt-It),Qt=Qt.replace("?px ",ot())),ce+=.25*ie*(mt-It)}if(H.superscripts===!0){var er=$e.indexOf(k),lr=St.indexOf(k),wr=er>-1?parseInt($e[1+er]):0,Lr=lr>-1?parseInt(St[1+lr]):0;wr!==Lr&&(Qt=Qt.replace(ot(),"?px "),je*=Math.pow(.75,Lr-wr),Qt=Qt.replace("?px ",ot())),ce-=.25*ie*(Lr-wr)}if(H.bolds===!0){var ti=$e.indexOf(v)>-1,Br=St.indexOf(v)>-1;!ti&&Br&&(Vr?Qt=Qt.replace("italic ","italic bold "):Qt="bold "+Qt),ti&&!Br&&(Qt=Qt.replace("bold ",""))}if(H.italics===!0){var Vr=$e.indexOf(b)>-1,dt=St.indexOf(b)>-1;!Vr&&dt&&(Qt="italic "+Qt),Vr&&!dt&&(Qt=Qt.replace("italic ",""))}G.font=Qt}for(Pe=0;Pe0&&(N=j.size),j.lineSpacing&&j.lineSpacing>0&&(H=j.lineSpacing),j.styletags&&j.styletags.breaklines&&(re.breaklines=!!j.styletags.breaklines),j.styletags&&j.styletags.bolds&&(re.bolds=!!j.styletags.bolds),j.styletags&&j.styletags.italics&&(re.italics=!!j.styletags.italics),j.styletags&&j.styletags.subscripts&&(re.subscripts=!!j.styletags.subscripts),j.styletags&&j.styletags.superscripts&&(re.superscripts=!!j.styletags.superscripts)),Z.font=[j.fontStyle,j.fontVariant,j.fontWeight,N+"px",j.font].filter(function(_e){return _e}).join(" "),Z.textAlign="start",Z.textBaseline="alphabetic",Z.direction="ltr";var oe=g(G,Z,U,N,H,re);return z(oe,j,N)}},7721:function(i,a,o){"use strict";var s=o(5716);i.exports=l;function l(u){return s(u[0])*s(u[1])}},7765:function(i,a,o){"use strict";i.exports=p;var s=o(9618),l=o(1888),u=o(446),c=o(1570);function f(k){for(var E=k.length,T=0,L=0;LU||z<0||z>U)throw new Error("gl-texture2d: Invalid texture size");return P._shape=[A,z],P.bind(),O.texImage2D(O.TEXTURE_2D,0,P.format,A,z,0,P.format,P.type,null),P._mipLevels=[0],P}function p(P,A,z,O,U,G){this.gl=P,this.handle=A,this.format=U,this.type=G,this._shape=[z,O],this._mipLevels=[0],this._magFilter=P.NEAREST,this._minFilter=P.NEAREST,this._wrapS=P.CLAMP_TO_EDGE,this._wrapT=P.CLAMP_TO_EDGE,this._anisoSamples=1;var Z=this,j=[this._wrapS,this._wrapT];Object.defineProperties(j,[{get:function(){return Z._wrapS},set:function(H){return Z.wrapS=H}},{get:function(){return Z._wrapT},set:function(H){return Z.wrapT=H}}]),this._wrapVector=j;var N=[this._shape[0],this._shape[1]];Object.defineProperties(N,[{get:function(){return Z._shape[0]},set:function(H){return Z.width=H}},{get:function(){return Z._shape[1]},set:function(H){return Z.height=H}}]),this._shapeVector=N}var k=p.prototype;Object.defineProperties(k,{minFilter:{get:function(){return this._minFilter},set:function(P){this.bind();var A=this.gl;if(this.type===A.FLOAT&&c.indexOf(P)>=0&&(A.getExtension("OES_texture_float_linear")||(P=A.NEAREST)),f.indexOf(P)<0)throw new Error("gl-texture2d: Unknown filter mode "+P);return A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MIN_FILTER,P),this._minFilter=P}},magFilter:{get:function(){return this._magFilter},set:function(P){this.bind();var A=this.gl;if(this.type===A.FLOAT&&c.indexOf(P)>=0&&(A.getExtension("OES_texture_float_linear")||(P=A.NEAREST)),f.indexOf(P)<0)throw new Error("gl-texture2d: Unknown filter mode "+P);return A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MAG_FILTER,P),this._magFilter=P}},mipSamples:{get:function(){return this._anisoSamples},set:function(P){var A=this._anisoSamples;if(this._anisoSamples=Math.max(P,1)|0,A!==this._anisoSamples){var z=this.gl.getExtension("EXT_texture_filter_anisotropic");z&&this.gl.texParameterf(this.gl.TEXTURE_2D,z.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(P){if(this.bind(),h.indexOf(P)<0)throw new Error("gl-texture2d: Unknown wrap mode "+P);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,P),this._wrapS=P}},wrapT:{get:function(){return this._wrapT},set:function(P){if(this.bind(),h.indexOf(P)<0)throw new Error("gl-texture2d: Unknown wrap mode "+P);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,P),this._wrapT=P}},wrap:{get:function(){return this._wrapVector},set:function(P){if(Array.isArray(P)||(P=[P,P]),P.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var A=0;A<2;++A)if(h.indexOf(P[A])<0)throw new Error("gl-texture2d: Unknown wrap mode "+P);this._wrapS=P[0],this._wrapT=P[1];var z=this.gl;return this.bind(),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_S,this._wrapS),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_T,this._wrapT),P}},shape:{get:function(){return this._shapeVector},set:function(P){if(!Array.isArray(P))P=[P|0,P|0];else if(P.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return b(this,P[0]|0,P[1]|0),[P[0]|0,P[1]|0]}},width:{get:function(){return this._shape[0]},set:function(P){return P=P|0,b(this,P,this._shape[1]),P}},height:{get:function(){return this._shape[1]},set:function(P){return P=P|0,b(this,this._shape[0],P),P}}}),k.bind=function(P){var A=this.gl;return P!==void 0&&A.activeTexture(A.TEXTURE0+(P|0)),A.bindTexture(A.TEXTURE_2D,this.handle),P!==void 0?P|0:A.getParameter(A.ACTIVE_TEXTURE)-A.TEXTURE0},k.dispose=function(){this.gl.deleteTexture(this.handle)},k.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var P=Math.min(this._shape[0],this._shape[1]),A=0;P>0;++A,P>>>=1)this._mipLevels.indexOf(A)<0&&this._mipLevels.push(A)},k.setPixels=function(P,A,z,O){var U=this.gl;this.bind(),Array.isArray(A)?(O=z,z=A[1]|0,A=A[0]|0):(A=A||0,z=z||0),O=O||0;var G=v(P)?P:P.raw;if(G){var Z=this._mipLevels.indexOf(O)<0;Z?(U.texImage2D(U.TEXTURE_2D,0,this.format,this.format,this.type,G),this._mipLevels.push(O)):U.texSubImage2D(U.TEXTURE_2D,O,A,z,this.format,this.type,G)}else if(P.shape&&P.stride&&P.data){if(P.shape.length<2||A+P.shape[1]>this._shape[1]>>>O||z+P.shape[0]>this._shape[0]>>>O||A<0||z<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");T(U,A,z,O,this.format,this.type,this._mipLevels,P)}else throw new Error("gl-texture2d: Unsupported data type")};function E(P,A){return P.length===3?A[2]===1&&A[1]===P[0]*P[2]&&A[0]===P[2]:A[0]===1&&A[1]===P[0]}function T(P,A,z,O,U,G,Z,j){var N=j.dtype,H=j.shape.slice();if(H.length<2||H.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var re=0,oe=0,_e=E(H,j.stride.slice());N==="float32"?re=P.FLOAT:N==="float64"?(re=P.FLOAT,_e=!1,N="float32"):N==="uint8"?re=P.UNSIGNED_BYTE:(re=P.UNSIGNED_BYTE,_e=!1,N="uint8");var Ce=1;if(H.length===2)oe=P.LUMINANCE,H=[H[0],H[1],1],j=s(j.data,H,[j.stride[0],j.stride[1],1],j.offset);else if(H.length===3){if(H[2]===1)oe=P.ALPHA;else if(H[2]===2)oe=P.LUMINANCE_ALPHA;else if(H[2]===3)oe=P.RGB;else if(H[2]===4)oe=P.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");Ce=H[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((oe===P.LUMINANCE||oe===P.ALPHA)&&(U===P.LUMINANCE||U===P.ALPHA)&&(oe=U),oe!==U)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var Le=j.size,ge=Z.indexOf(O)<0;if(ge&&Z.push(O),re===G&&_e)j.offset===0&&j.data.length===Le?ge?P.texImage2D(P.TEXTURE_2D,O,U,H[0],H[1],0,U,G,j.data):P.texSubImage2D(P.TEXTURE_2D,O,A,z,H[0],H[1],U,G,j.data):ge?P.texImage2D(P.TEXTURE_2D,O,U,H[0],H[1],0,U,G,j.data.subarray(j.offset,j.offset+Le)):P.texSubImage2D(P.TEXTURE_2D,O,A,z,H[0],H[1],U,G,j.data.subarray(j.offset,j.offset+Le));else{var ie;G===P.FLOAT?ie=u.mallocFloat32(Le):ie=u.mallocUint8(Le);var Se=s(ie,H,[H[2],H[2]*H[0],1]);re===P.FLOAT&&G===P.UNSIGNED_BYTE?_(Se,j):l.assign(Se,j),ge?P.texImage2D(P.TEXTURE_2D,O,U,H[0],H[1],0,U,G,ie.subarray(0,Le)):P.texSubImage2D(P.TEXTURE_2D,O,A,z,H[0],H[1],U,G,ie.subarray(0,Le)),G===P.FLOAT?u.freeFloat32(ie):u.freeUint8(ie)}}function L(P){var A=P.createTexture();return P.bindTexture(P.TEXTURE_2D,A),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_MIN_FILTER,P.NEAREST),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_MAG_FILTER,P.NEAREST),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_S,P.CLAMP_TO_EDGE),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_T,P.CLAMP_TO_EDGE),A}function x(P,A,z,O,U){var G=P.getParameter(P.MAX_TEXTURE_SIZE);if(A<0||A>G||z<0||z>G)throw new Error("gl-texture2d: Invalid texture shape");if(U===P.FLOAT&&!P.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var Z=L(P);return P.texImage2D(P.TEXTURE_2D,0,O,A,z,0,O,U,null),new p(P,Z,A,z,O,U)}function C(P,A,z,O,U,G){var Z=L(P);return P.texImage2D(P.TEXTURE_2D,0,U,U,G,A),new p(P,Z,z,O,U,G)}function M(P,A){var z=A.dtype,O=A.shape.slice(),U=P.getParameter(P.MAX_TEXTURE_SIZE);if(O[0]<0||O[0]>U||O[1]<0||O[1]>U)throw new Error("gl-texture2d: Invalid texture size");var G=E(O,A.stride.slice()),Z=0;z==="float32"?Z=P.FLOAT:z==="float64"?(Z=P.FLOAT,G=!1,z="float32"):z==="uint8"?Z=P.UNSIGNED_BYTE:(Z=P.UNSIGNED_BYTE,G=!1,z="uint8");var j=0;if(O.length===2)j=P.LUMINANCE,O=[O[0],O[1],1],A=s(A.data,O,[A.stride[0],A.stride[1],1],A.offset);else if(O.length===3)if(O[2]===1)j=P.ALPHA;else if(O[2]===2)j=P.LUMINANCE_ALPHA;else if(O[2]===3)j=P.RGB;else if(O[2]===4)j=P.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");Z===P.FLOAT&&!P.getExtension("OES_texture_float")&&(Z=P.UNSIGNED_BYTE,G=!1);var N,H,re=A.size;if(G)A.offset===0&&A.data.length===re?N=A.data:N=A.data.subarray(A.offset,A.offset+re);else{var oe=[O[2],O[2]*O[0],1];H=u.malloc(re,z);var _e=s(H,O,oe,0);(z==="float32"||z==="float64")&&Z===P.UNSIGNED_BYTE?_(_e,A):l.assign(_e,A),N=H.subarray(0,re)}var Ce=L(P);return P.texImage2D(P.TEXTURE_2D,0,j,O[0],O[1],0,j,Z,N),G||u.free(H),new p(P,Ce,O[0],O[1],j,Z)}function g(P){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(c||d(P),typeof arguments[1]=="number")return x(P,arguments[1],arguments[2],arguments[3]||P.RGBA,arguments[4]||P.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return x(P,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||P.RGBA,arguments[3]||P.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var A=arguments[1],z=v(A)?A:A.raw;if(z)return C(P,z,A.width|0,A.height|0,arguments[2]||P.RGBA,arguments[3]||P.UNSIGNED_BYTE);if(A.shape&&A.data&&A.stride)return M(P,A)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},7790:function(){},7815:function(i,a,o){"use strict";var s=o(2931),l=o(9970),u=["xyz","xzy","yxz","yzx","zxy","zyx"],c=function(T,L,x,C){for(var M=T.points,g=T.velocities,P=T.divergences,A=[],z=[],O=[],U=[],G=[],Z=[],j=0,N=0,H=l.create(),re=l.create(),oe=8,_e=0;_e0)for(var ie=0;ieL)return C-1}return C},d=function(T,L,x){return Tx?x:T},v=function(T,L,x){var C=L.vectors,M=L.meshgrid,g=T[0],P=T[1],A=T[2],z=M[0].length,O=M[1].length,U=M[2].length,G=h(M[0],g),Z=h(M[1],P),j=h(M[2],A),N=G+1,H=Z+1,re=j+1;if(G=d(G,0,z-1),N=d(N,0,z-1),Z=d(Z,0,O-1),H=d(H,0,O-1),j=d(j,0,U-1),re=d(re,0,U-1),G<0||Z<0||j<0||N>z-1||H>O-1||re>U-1)return s.create();var oe=M[0][G],_e=M[0][N],Ce=M[1][Z],Le=M[1][H],ge=M[2][j],ie=M[2][re],Se=(g-oe)/(_e-oe),Ee=(P-Ce)/(Le-Ce),Ae=(A-ge)/(ie-ge);isFinite(Se)||(Se=.5),isFinite(Ee)||(Ee=.5),isFinite(Ae)||(Ae=.5);var Be,Pe,me,De,ce,je;switch(x.reversedX&&(G=z-1-G,N=z-1-N),x.reversedY&&(Z=O-1-Z,H=O-1-H),x.reversedZ&&(j=U-1-j,re=U-1-re),x.filled){case 5:ce=j,je=re,me=Z*U,De=H*U,Be=G*U*O,Pe=N*U*O;break;case 4:ce=j,je=re,Be=G*U,Pe=N*U,me=Z*U*z,De=H*U*z;break;case 3:me=Z,De=H,ce=j*O,je=re*O,Be=G*O*U,Pe=N*O*U;break;case 2:me=Z,De=H,Be=G*O,Pe=N*O,ce=j*O*z,je=re*O*z;break;case 1:Be=G,Pe=N,ce=j*z,je=re*z,me=Z*z*U,De=H*z*U;break;default:Be=G,Pe=N,me=Z*z,De=H*z,ce=j*z*O,je=re*z*O;break}var lt=C[Be+me+ce],pt=C[Be+me+je],Vt=C[Be+De+ce],ot=C[Be+De+je],ut=C[Pe+me+ce],Wt=C[Pe+me+je],Nt=C[Pe+De+ce],$t=C[Pe+De+je],sr=s.create(),Tr=s.create(),fr=s.create(),$e=s.create();s.lerp(sr,lt,ut,Se),s.lerp(Tr,pt,Wt,Se),s.lerp(fr,Vt,Nt,Se),s.lerp($e,ot,$t,Se);var St=s.create(),Qt=s.create();s.lerp(St,sr,fr,Ee),s.lerp(Qt,Tr,$e,Ee);var Gt=s.create();return s.lerp(Gt,St,Qt,Ae),Gt},_=function(T,L){var x=L[0],C=L[1],M=L[2];return T[0]=x<0?-x:x,T[1]=C<0?-C:C,T[2]=M<0?-M:M,T},b=function(T){var L=1/0;T.sort(function(g,P){return g-P});for(var x=T.length,C=1;CN||$tH||srre)},_e=s.distance(L[0],L[1]),Ce=10*_e/C,Le=Ce*Ce,ge=1,ie=0,Se=x.length;Se>1&&(ge=p(x));for(var Ee=0;Eeie&&(ie=lt),ce.push(lt),U.push({points:Be,velocities:Pe,divergences:ce});for(var pt=0;ptLe&&s.scale(Vt,Vt,Ce/Math.sqrt(ot)),s.add(Vt,Vt,Ae),me=z(Vt),s.squaredDistance(De,Vt)-Le>-1e-4*Le){Be.push(Vt),De=Vt,Pe.push(me);var je=O(Vt,me),lt=s.length(je);isFinite(lt)&<>ie&&(ie=lt),ce.push(lt)}Ae=Vt}}var ut=f(U,T.colormap,ie,ge);return g?ut.tubeScale=g:(ie===0&&(ie=1),ut.tubeScale=M*.5*ge/ie),ut};var k=o(6740),E=o(6405).createMesh;i.exports.createTubeMesh=function(T,L){return E(T,L,{shaders:k,traceType:"streamtube"})}},7827:function(i){i.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},7842:function(i,a,o){"use strict";var s=o(6330),l=o(1533),u=o(2651),c=o(6768),f=o(869),h=o(8697);i.exports=d;function d(v,_){if(s(v))return _?h(v,d(_)):[v[0].clone(),v[1].clone()];var b=0,p,k;if(l(v))p=v.clone();else if(typeof v=="string")p=c(v);else{if(v===0)return[u(0),u(1)];if(v===Math.floor(v))p=u(v);else{for(;v!==Math.floor(v);)v=v*Math.pow(2,256),b-=256;p=u(v)}}if(s(_))p.mul(_[1]),k=_[0].clone();else if(l(_))k=_.clone();else if(typeof _=="string")k=c(_);else if(!_)k=u(1);else if(_===Math.floor(_))k=u(_);else{for(;_!==Math.floor(_);)_=_*Math.pow(2,256),b+=256;k=u(_)}return b>0?p=p.ushln(b):b<0&&(k=k.ushln(-b)),f(p,k)}},7894:function(i){i.exports=a;function a(o){return o[0]=1,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=1,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=1,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o}},7932:function(i,a,o){var s=o(620);i.exports=s.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},7960:function(i){i.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2],f=s[3]-o[3];return l*l+u*u+c*c+f*f}},8105:function(i){"use strict";i.exports=o;var a={"lo===p0":s,"lo=p0)&&!(p1>=hi)":d};function o(v){return a[v]}function s(v,_,b,p,k,E,T){for(var L=2*v,x=L*b,C=x,M=b,g=_,P=v+_,A=b;p>A;++A,x+=L){var z=k[x+g];if(z===T)if(M===A)M+=1,C+=L;else{for(var O=0;L>O;++O){var U=k[x+O];k[x+O]=k[C],k[C++]=U}var G=E[A];E[A]=E[M],E[M++]=G}}return M}function l(v,_,b,p,k,E,T){for(var L=2*v,x=L*b,C=x,M=b,g=_,P=v+_,A=b;p>A;++A,x+=L){var z=k[x+g];if(zO;++O){var U=k[x+O];k[x+O]=k[C],k[C++]=U}var G=E[A];E[A]=E[M],E[M++]=G}}return M}function u(v,_,b,p,k,E,T){for(var L=2*v,x=L*b,C=x,M=b,g=_,P=v+_,A=b;p>A;++A,x+=L){var z=k[x+P];if(z<=T)if(M===A)M+=1,C+=L;else{for(var O=0;L>O;++O){var U=k[x+O];k[x+O]=k[C],k[C++]=U}var G=E[A];E[A]=E[M],E[M++]=G}}return M}function c(v,_,b,p,k,E,T){for(var L=2*v,x=L*b,C=x,M=b,g=_,P=v+_,A=b;p>A;++A,x+=L){var z=k[x+P];if(z<=T)if(M===A)M+=1,C+=L;else{for(var O=0;L>O;++O){var U=k[x+O];k[x+O]=k[C],k[C++]=U}var G=E[A];E[A]=E[M],E[M++]=G}}return M}function f(v,_,b,p,k,E,T){for(var L=2*v,x=L*b,C=x,M=b,g=_,P=v+_,A=b;p>A;++A,x+=L){var z=k[x+g],O=k[x+P];if(z<=T&&T<=O)if(M===A)M+=1,C+=L;else{for(var U=0;L>U;++U){var G=k[x+U];k[x+U]=k[C],k[C++]=G}var Z=E[A];E[A]=E[M],E[M++]=Z}}return M}function h(v,_,b,p,k,E,T){for(var L=2*v,x=L*b,C=x,M=b,g=_,P=v+_,A=b;p>A;++A,x+=L){var z=k[x+g],O=k[x+P];if(zU;++U){var G=k[x+U];k[x+U]=k[C],k[C++]=G}var Z=E[A];E[A]=E[M],E[M++]=Z}}return M}function d(v,_,b,p,k,E,T,L){for(var x=2*v,C=x*b,M=C,g=b,P=_,A=v+_,z=b;p>z;++z,C+=x){var O=k[C+P],U=k[C+A];if(!(O>=T)&&!(L>=U))if(g===z)g+=1,M+=x;else{for(var G=0;x>G;++G){var Z=k[C+G];k[C+G]=k[M],k[M++]=Z}var j=E[z];E[z]=E[g],E[g++]=j}}return g}},8107:function(i){i.exports=a;function a(o,s,l){return o[0]=Math.min(s[0],l[0]),o[1]=Math.min(s[1],l[1]),o[2]=Math.min(s[2],l[2]),o}},8116:function(i,a,o){"use strict";var s=o(7518),l=o(870);function u(f){this.bindVertexArrayOES=f.bindVertexArray.bind(f),this.createVertexArrayOES=f.createVertexArray.bind(f),this.deleteVertexArrayOES=f.deleteVertexArray.bind(f)}function c(f,h,d,v){var _=f.createVertexArray?new u(f):f.getExtension("OES_vertex_array_object"),b;return _?b=s(f,_):b=l(f),b.update(h,d,v),b}i.exports=c},8192:function(i,a,o){i.exports=c;var s=o(2825),l=o(3536),u=o(244);function c(f,h){var d=s(f[0],f[1],f[2]),v=s(h[0],h[1],h[2]);l(d,d),l(v,v);var _=u(d,v);return _>1?0:Math.acos(_)}},8210:function(i){"use strict";i.exports=o;function a(s,l){var u=s+l,c=u-s,f=u-c,h=l-c,d=s-f,v=d+h;return v?[v,u]:[u]}function o(s,l){var u=s.length|0,c=l.length|0;if(u===1&&c===1)return a(s[0],l[0]);var f=u+c,h=new Array(f),d=0,v=0,_=0,b=Math.abs,p=s[v],k=b(p),E=l[_],T=b(E),L,x;k=c?(L=p,v+=1,vd)for(var z=h[p],O=1/Math.sqrt(M*P),A=0;A<3;++A){var U=(A+1)%3,G=(A+2)%3;z[A]+=O*(g[U]*C[G]-g[G]*C[U])}}for(var v=0;vd)for(var O=1/Math.sqrt(Z),A=0;A<3;++A)z[A]*=O;else for(var A=0;A<3;++A)z[A]=0}return h},a.faceNormals=function(l,u,c){for(var f=l.length,h=new Array(f),d=c===void 0?s:c,v=0;vd?L=1/Math.sqrt(L):L=0;for(var p=0;p<3;++p)T[p]*=L;h[v]=T}return h}},8418:function(i,a,o){"use strict";var s=o(5219),l=o(2762),u=o(8116),c=o(1888),f=o(6760),h=o(1283),d=o(9366),v=o(5964),_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],b=ArrayBuffer,p=DataView;function k(Ae){return b.isView(Ae)&&!(Ae instanceof p)}function E(Ae){return Array.isArray(Ae)||k(Ae)}i.exports=Ee;function T(Ae,Be){var Pe=Ae[0],me=Ae[1],De=Ae[2],ce=Ae[3];return Ae[0]=Be[0]*Pe+Be[4]*me+Be[8]*De+Be[12]*ce,Ae[1]=Be[1]*Pe+Be[5]*me+Be[9]*De+Be[13]*ce,Ae[2]=Be[2]*Pe+Be[6]*me+Be[10]*De+Be[14]*ce,Ae[3]=Be[3]*Pe+Be[7]*me+Be[11]*De+Be[15]*ce,Ae}function L(Ae,Be,Pe,me){return T(me,me,Pe),T(me,me,Be),T(me,me,Ae)}function x(Ae,Be){this.index=Ae,this.dataCoordinate=this.position=Be}function C(Ae){return Ae===!0||Ae>1?1:Ae}function M(Ae,Be,Pe,me,De,ce,je,lt,pt,Vt,ot,ut){this.gl=Ae,this.pixelRatio=1,this.shader=Be,this.orthoShader=Pe,this.projectShader=me,this.pointBuffer=De,this.colorBuffer=ce,this.glyphBuffer=je,this.idBuffer=lt,this.vao=pt,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[.6666666666666666,.6666666666666666,.6666666666666666],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=Vt,this.pickOrthoShader=ot,this.pickProjectShader=ut,this.points=[],this._selectResult=new x(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}var g=M.prototype;g.pickSlots=1,g.setPickBase=function(Ae){this.pickId=Ae},g.isTransparent=function(){if(this.hasAlpha)return!0;for(var Ae=0;Ae<3;++Ae)if(this.axesProject[Ae]&&this.projectHasAlpha)return!0;return!1},g.isOpaque=function(){if(!this.hasAlpha)return!0;for(var Ae=0;Ae<3;++Ae)if(this.axesProject[Ae]&&!this.projectHasAlpha)return!0;return!1};var P=[0,0],A=[0,0,0],z=[0,0,0],O=[0,0,0,1],U=[0,0,0,1],G=_.slice(),Z=[0,0,0],j=[[0,0,0],[0,0,0]];function N(Ae){return Ae[0]=Ae[1]=Ae[2]=0,Ae}function H(Ae,Be){return Ae[0]=Be[0],Ae[1]=Be[1],Ae[2]=Be[2],Ae[3]=1,Ae}function re(Ae,Be,Pe,me){return Ae[0]=Be[0],Ae[1]=Be[1],Ae[2]=Be[2],Ae[Pe]=me,Ae}function oe(Ae){for(var Be=j,Pe=0;Pe<2;++Pe)for(var me=0;me<3;++me)Be[Pe][me]=Math.max(Math.min(Ae[Pe][me],1e8),-1e8);return Be}function _e(Ae,Be,Pe,me){var De=Be.axesProject,ce=Be.gl,je=Ae.uniforms,lt=Pe.model||_,pt=Pe.view||_,Vt=Pe.projection||_,ot=Be.axesBounds,ut=oe(Be.clipBounds),Wt;Be.axes&&Be.axes.lastCubeProps?Wt=Be.axes.lastCubeProps.axis:Wt=[1,1,1],P[0]=2/ce.drawingBufferWidth,P[1]=2/ce.drawingBufferHeight,Ae.bind(),je.view=pt,je.projection=Vt,je.screenSize=P,je.highlightId=Be.highlightId,je.highlightScale=Be.highlightScale,je.clipBounds=ut,je.pickGroup=Be.pickId/255,je.pixelRatio=me;for(var Nt=0;Nt<3;++Nt)if(De[Nt]){je.scale=Be.projectScale[Nt],je.opacity=Be.projectOpacity[Nt];for(var $t=G,sr=0;sr<16;++sr)$t[sr]=0;for(var sr=0;sr<4;++sr)$t[5*sr]=1;$t[5*Nt]=0,Wt[Nt]<0?$t[12+Nt]=ot[0][Nt]:$t[12+Nt]=ot[1][Nt],f($t,lt,$t),je.model=$t;var Tr=(Nt+1)%3,fr=(Nt+2)%3,$e=N(A),St=N(z);$e[Tr]=1,St[fr]=1;var Qt=L(Vt,pt,lt,H(O,$e)),Gt=L(Vt,pt,lt,H(U,St));if(Math.abs(Qt[1])>Math.abs(Gt[1])){var _t=Qt;Qt=Gt,Gt=_t,_t=$e,$e=St,St=_t;var It=Tr;Tr=fr,fr=It}Qt[0]<0&&($e[Tr]=-1),Gt[1]>0&&(St[fr]=-1);for(var mt=0,er=0,sr=0;sr<4;++sr)mt+=Math.pow(lt[4*Tr+sr],2),er+=Math.pow(lt[4*fr+sr],2);$e[Tr]/=Math.sqrt(mt),St[fr]/=Math.sqrt(er),je.axes[0]=$e,je.axes[1]=St,je.fragClipBounds[0]=re(Z,ut[0],Nt,-1e8),je.fragClipBounds[1]=re(Z,ut[1],Nt,1e8),Be.vao.bind(),Be.vao.draw(ce.TRIANGLES,Be.vertexCount),Be.lineWidth>0&&(ce.lineWidth(Be.lineWidth*me),Be.vao.draw(ce.LINES,Be.lineVertexCount,Be.vertexCount)),Be.vao.unbind()}}var Ce=[-1e8,-1e8,-1e8],Le=[1e8,1e8,1e8],ge=[Ce,Le];function ie(Ae,Be,Pe,me,De,ce,je){var lt=Pe.gl;if((ce===Pe.projectHasAlpha||je)&&_e(Be,Pe,me,De),ce===Pe.hasAlpha||je){Ae.bind();var pt=Ae.uniforms;pt.model=me.model||_,pt.view=me.view||_,pt.projection=me.projection||_,P[0]=2/lt.drawingBufferWidth,P[1]=2/lt.drawingBufferHeight,pt.screenSize=P,pt.highlightId=Pe.highlightId,pt.highlightScale=Pe.highlightScale,pt.fragClipBounds=ge,pt.clipBounds=Pe.axes.bounds,pt.opacity=Pe.opacity,pt.pickGroup=Pe.pickId/255,pt.pixelRatio=De,Pe.vao.bind(),Pe.vao.draw(lt.TRIANGLES,Pe.vertexCount),Pe.lineWidth>0&&(lt.lineWidth(Pe.lineWidth*De),Pe.vao.draw(lt.LINES,Pe.lineVertexCount,Pe.vertexCount)),Pe.vao.unbind()}}g.draw=function(Ae){var Be=this.useOrtho?this.orthoShader:this.shader;ie(Be,this.projectShader,this,Ae,this.pixelRatio,!1,!1)},g.drawTransparent=function(Ae){var Be=this.useOrtho?this.orthoShader:this.shader;ie(Be,this.projectShader,this,Ae,this.pixelRatio,!0,!1)},g.drawPick=function(Ae){var Be=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;ie(Be,this.pickProjectShader,this,Ae,1,!0,!0)},g.pick=function(Ae){if(!Ae||Ae.id!==this.pickId)return null;var Be=Ae.value[2]+(Ae.value[1]<<8)+(Ae.value[0]<<16);if(Be>=this.pointCount||Be<0)return null;var Pe=this.points[Be],me=this._selectResult;me.index=Be;for(var De=0;De<3;++De)me.position[De]=me.dataCoordinate[De]=Pe[De];return me},g.highlight=function(Ae){if(!Ae)this.highlightId=[1,1,1,1];else{var Be=Ae.index,Pe=Be&255,me=Be>>8&255,De=Be>>16&255;this.highlightId=[Pe/255,me/255,De/255,0]}};function Se(Ae,Be,Pe,me){var De;E(Ae)?Be0){var Vr=0,dt=fr,Ge=[0,0,0,1],Je=[0,0,0,1],We=E(Wt)&&E(Wt[0]),tt=E(sr)&&E(sr[0]);e:for(var me=0;me0?1-er[0][0]:ar<0?1+er[1][0]:1,vr*=vr>0?1-er[0][1]:vr<0?1+er[1][1]:1;for(var ii=[ar,vr],In=It.cells||[],wi=It.positions||[],Gt=0;Gt=c?(L=p,v+=1,v0?1:0}},8648:function(i,a,o){i.exports=o(783)},8692:function(i){i.exports=a;function a(o,s,l,u){var c=l[0],f=l[1],h=s[0]-c,d=s[1]-f,v=Math.sin(u),_=Math.cos(u);return o[0]=c+h*_-d*v,o[1]=f+h*v+d*_,o[2]=s[2],o}},8697:function(i,a,o){"use strict";var s=o(869);i.exports=l;function l(u,c){return s(u[0].mul(c[1]),u[1].mul(c[0]))}},8731:function(i,a,o){"use strict";i.exports=d;var s=o(8866);function l(v,_,b,p,k,E){this._gl=v,this._wrapper=_,this._index=b,this._locations=p,this._dimension=k,this._constFunc=E}var u=l.prototype;u.pointer=function(_,b,p,k){var E=this,T=E._gl,L=E._locations[E._index];T.vertexAttribPointer(L,E._dimension,_||T.FLOAT,!!b,p||0,k||0),T.enableVertexAttribArray(L)},u.set=function(v,_,b,p){return this._constFunc(this._locations[this._index],v,_,b,p)},Object.defineProperty(u,"location",{get:function(){return this._locations[this._index]},set:function(v){return v!==this._locations[this._index]&&(this._locations[this._index]=v|0,this._wrapper.program=null),v|0}});var c=[function(v,_,b){return b.length===void 0?v.vertexAttrib1f(_,b):v.vertexAttrib1fv(_,b)},function(v,_,b,p){return b.length===void 0?v.vertexAttrib2f(_,b,p):v.vertexAttrib2fv(_,b)},function(v,_,b,p,k){return b.length===void 0?v.vertexAttrib3f(_,b,p,k):v.vertexAttrib3fv(_,b)},function(v,_,b,p,k,E){return b.length===void 0?v.vertexAttrib4f(_,b,p,k,E):v.vertexAttrib4fv(_,b)}];function f(v,_,b,p,k,E,T){var L=c[k],x=new l(v,_,b,p,k,L);Object.defineProperty(E,T,{set:function(C){return v.disableVertexAttribArray(p[b]),L(v,p[b],C),C},get:function(){return x},enumerable:!0})}function h(v,_,b,p,k,E,T){for(var L=new Array(k),x=new Array(k),C=0;C=0){var g=C.charCodeAt(C.length-1)-48;if(g<2||g>4)throw new s("","Invalid data type for attribute "+x+": "+C);f(v,_,M[0],p,g,k,x)}else if(C.indexOf("mat")>=0){var g=C.charCodeAt(C.length-1)-48;if(g<2||g>4)throw new s("","Invalid data type for attribute "+x+": "+C);h(v,_,M,p,g,k,x)}else throw new s("","Unknown data type for attribute "+x+": "+C);break}}return k}},8828:function(i,a){"use strict";"use restrict";var o=32;a.INT_BITS=o,a.INT_MAX=2147483647,a.INT_MIN=-1<0)-(u<0)},a.abs=function(u){var c=u>>o-1;return(u^c)-c},a.min=function(u,c){return c^(u^c)&-(u65535)<<4,u>>>=c,f=(u>255)<<3,u>>>=f,c|=f,f=(u>15)<<2,u>>>=f,c|=f,f=(u>3)<<1,u>>>=f,c|=f,c|u>>1},a.log10=function(u){return u>=1e9?9:u>=1e8?8:u>=1e7?7:u>=1e6?6:u>=1e5?5:u>=1e4?4:u>=1e3?3:u>=100?2:u>=10?1:0},a.popCount=function(u){return u=u-(u>>>1&1431655765),u=(u&858993459)+(u>>>2&858993459),(u+(u>>>4)&252645135)*16843009>>>24};function s(u){var c=32;return u&=-u,u&&c--,u&65535&&(c-=16),u&16711935&&(c-=8),u&252645135&&(c-=4),u&858993459&&(c-=2),u&1431655765&&(c-=1),c}a.countTrailingZeros=s,a.nextPow2=function(u){return u+=u===0,--u,u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u+1},a.prevPow2=function(u){return u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u-(u>>>1)},a.parity=function(u){return u^=u>>>16,u^=u>>>8,u^=u>>>4,u&=15,27030>>>u&1};var l=new Array(256);(function(u){for(var c=0;c<256;++c){var f=c,h=c,d=7;for(f>>>=1;f;f>>>=1)h<<=1,h|=f&1,--d;u[c]=h<>>8&255]<<16|l[u>>>16&255]<<8|l[u>>>24&255]},a.interleave2=function(u,c){return u&=65535,u=(u|u<<8)&16711935,u=(u|u<<4)&252645135,u=(u|u<<2)&858993459,u=(u|u<<1)&1431655765,c&=65535,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,u|c<<1},a.deinterleave2=function(u,c){return u=u>>>c&1431655765,u=(u|u>>>1)&858993459,u=(u|u>>>2)&252645135,u=(u|u>>>4)&16711935,u=(u|u>>>16)&65535,u<<16>>16},a.interleave3=function(u,c,f){return u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,u|=c<<1,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,u|f<<2},a.deinterleave3=function(u,c){return u=u>>>c&1227133513,u=(u|u>>>2)&3272356035,u=(u|u>>>4)&251719695,u=(u|u>>>8)&4278190335,u=(u|u>>>16)&1023,u<<22>>22},a.nextCombination=function(u){var c=u|u-1;return c+1|(~c&-~c)-1>>>s(u)+1}},8866:function(i){function a(o,s,l){this.shortMessage=s||"",this.longMessage=l||"",this.rawError=o||"",this.message="gl-shader: "+(s||o||"")+(l?` -`+l:""),this.stack=new Error().stack}a.prototype=new Error,a.prototype.name="GLError",a.prototype.constructor=a,i.exports=a},8902:function(i,a,o){"use strict";var s=o(2478),l=o(3250)[3],u=0,c=1,f=2;i.exports=T;function h(L,x,C,M,g){this.a=L,this.b=x,this.idx=C,this.lowerIds=M,this.upperIds=g}function d(L,x,C,M){this.a=L,this.b=x,this.type=C,this.idx=M}function v(L,x){var C=L.a[0]-x.a[0]||L.a[1]-x.a[1]||L.type-x.type;return C||L.type!==u&&(C=l(L.a,L.b,x.b),C)?C:L.idx-x.idx}function _(L,x){return l(L.a,L.b,x)}function b(L,x,C,M,g){for(var P=s.lt(x,M,_),A=s.gt(x,M,_),z=P;z1&&l(C[U[Z-2]],C[U[Z-1]],M)>0;)L.push([U[Z-1],U[Z-2],g]),Z-=1;U.length=Z,U.push(g);for(var G=O.upperIds,Z=G.length;Z>1&&l(C[G[Z-2]],C[G[Z-1]],M)<0;)L.push([G[Z-2],G[Z-1],g]),Z-=1;G.length=Z,G.push(g)}}function p(L,x){var C;return L.a[0]O[0]&&g.push(new d(O,z,f,P),new d(z,O,c,P))}g.sort(v);for(var U=g[0].a[0]-(1+Math.abs(g[0].a[0]))*Math.pow(2,-52),G=[new h([U,1],[U,0],-1,[],[],[],[])],Z=[],P=0,j=g.length;P0;){k=M.pop();for(var g=k.adjacent,P=0;P<=T;++P){var A=g[P];if(!(!A.boundary||A.lastVisited<=-L)){for(var z=A.vertices,O=0;O<=T;++O){var U=z[O];U<0?x[O]=E:x[O]=C[U]}var G=this.orient();if(G>0)return A;A.lastVisited=-L,G===0&&M.push(A)}}}return null},b.walk=function(k,E){var T=this.vertices.length-1,L=this.dimension,x=this.vertices,C=this.tuple,M=E?this.interior.length*Math.random()|0:this.interior.length-1,g=this.interior[M];e:for(;!g.boundary;){for(var P=g.vertices,A=g.adjacent,z=0;z<=L;++z)C[z]=x[P[z]];g.lastVisited=T;for(var z=0;z<=L;++z){var O=A[z];if(!(O.lastVisited>=T)){var U=C[z];C[z]=k;var G=this.orient();if(C[z]=U,G<0){g=O;continue e}else O.boundary?O.lastVisited=-T:O.lastVisited=T}}return}return g},b.addPeaks=function(k,E){var T=this.vertices.length-1,L=this.dimension,x=this.vertices,C=this.tuple,M=this.interior,g=this.simplices,P=[E];E.lastVisited=T,E.vertices[E.vertices.indexOf(-1)]=T,E.boundary=!1,M.push(E);for(var A=[];P.length>0;){var E=P.pop(),z=E.vertices,O=E.adjacent,U=z.indexOf(T);if(!(U<0)){for(var G=0;G<=L;++G)if(G!==U){var Z=O[G];if(!(!Z.boundary||Z.lastVisited>=T)){var j=Z.vertices;if(Z.lastVisited!==-T){for(var N=0,H=0;H<=L;++H)j[H]<0?(N=H,C[H]=k):C[H]=x[j[H]];var re=this.orient();if(re>0){j[N]=T,Z.boundary=!1,M.push(Z),P.push(Z),Z.lastVisited=T;continue}else Z.lastVisited=-T}var oe=Z.adjacent,_e=z.slice(),Ce=O.slice(),Le=new u(_e,Ce,!0);g.push(Le);var ge=oe.indexOf(E);if(!(ge<0)){oe[ge]=Le,Ce[U]=Z,_e[G]=-1,Ce[G]=E,O[G]=Le,Le.flip();for(var H=0;H<=L;++H){var ie=_e[H];if(!(ie<0||ie===T)){for(var Se=new Array(L-1),Ee=0,Ae=0;Ae<=L;++Ae){var Be=_e[Ae];Be<0||Ae===H||(Se[Ee++]=Be)}A.push(new c(Se,Le,H))}}}}}}}A.sort(f);for(var G=0;G+1=0?M[P++]=g[z]:A=z&1;if(A===(k&1)){var O=M[0];M[0]=M[1],M[1]=O}E.push(M)}}return E};function p(k,E){var T=k.length;if(T===0)throw new Error("Must have at least d+1 points");var L=k[0].length;if(T<=L)throw new Error("Must input at least d+1 points");var x=k.slice(0,L+1),C=s.apply(void 0,x);if(C===0)throw new Error("Input not in general position");for(var M=new Array(L+1),g=0;g<=L;++g)M[g]=g;C<0&&(M[0]=1,M[1]=0);for(var P=new u(M,new Array(L+1),!1),A=P.adjacent,z=new Array(L+2),g=0;g<=L;++g){for(var O=M.slice(),U=0;U<=L;++U)U===g&&(O[U]=-1);var G=O[0];O[0]=O[1],O[1]=G;var Z=new u(O,new Array(L+1),!0);A[g]=Z,z[g]=Z}z[L+1]=P;for(var g=0;g<=L;++g)for(var O=A[g].vertices,j=A[g].adjacent,U=0;U<=L;++U){var N=O[U];if(N<0){j[U]=P;continue}for(var H=0;H<=L;++H)A[H].vertices.indexOf(N)<0&&(j[U]=A[H])}for(var re=new _(L,x,z),oe=!!E,g=L+1;g=1},p.isTransparent=function(){return this.opacity<1},p.pickSlots=1,p.setPickBase=function(C){this.pickId=C};function k(C){for(var M=v({colormap:C,nshades:256,format:"rgba"}),g=new Uint8Array(256*4),P=0;P<256;++P){for(var A=M[P],z=0;z<3;++z)g[4*P+z]=A[z];g[4*P+3]=A[3]*255}return d(g,[256,256,4],[4,0,1])}function E(C){for(var M=C.length,g=new Array(M),P=0;P0){var H=this.triShader;H.bind(),H.uniforms=U,this.triangleVAO.bind(),M.drawArrays(M.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},p.drawPick=function(C){C=C||{};for(var M=this.gl,g=C.model||_,P=C.view||_,A=C.projection||_,z=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],O=0;O<3;++O)z[0][O]=Math.max(z[0][O],this.clipBounds[0][O]),z[1][O]=Math.min(z[1][O],this.clipBounds[1][O]);this._model=[].slice.call(g),this._view=[].slice.call(P),this._projection=[].slice.call(A),this._resolution=[M.drawingBufferWidth,M.drawingBufferHeight];var U={model:g,view:P,projection:A,clipBounds:z,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},G=this.pickShader;G.bind(),G.uniforms=U,this.triangleCount>0&&(this.triangleVAO.bind(),M.drawArrays(M.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},p.pick=function(C){if(!C||C.id!==this.pickId)return null;var M=C.value[0]+256*C.value[1]+65536*C.value[2],g=this.cells[M],P=this.positions[g[1]].slice(0,3),A={position:P,dataCoordinate:P,index:Math.floor(g[1]/48)};return this.traceType==="cone"?A.index=Math.floor(g[1]/48):this.traceType==="streamtube"&&(A.intensity=this.intensity[g[1]],A.velocity=this.vectors[g[1]].slice(0,3),A.divergence=this.vectors[g[1]][3],A.index=M),A},p.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()};function T(C,M){var g=s(C,M.meshShader.vertex,M.meshShader.fragment,null,M.meshShader.attributes);return g.attributes.position.location=0,g.attributes.color.location=2,g.attributes.uv.location=3,g.attributes.vector.location=4,g}function L(C,M){var g=s(C,M.pickShader.vertex,M.pickShader.fragment,null,M.pickShader.attributes);return g.attributes.position.location=0,g.attributes.id.location=1,g.attributes.vector.location=4,g}function x(C,M,g){var P=g.shaders;arguments.length===1&&(M=C,C=M.gl);var A=T(C,P),z=L(C,P),O=c(C,d(new Uint8Array([255,255,255,255]),[1,1,4]));O.generateMipmap(),O.minFilter=C.LINEAR_MIPMAP_LINEAR,O.magFilter=C.LINEAR;var U=l(C),G=l(C),Z=l(C),j=l(C),N=l(C),H=u(C,[{buffer:U,type:C.FLOAT,size:4},{buffer:N,type:C.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:Z,type:C.FLOAT,size:4},{buffer:j,type:C.FLOAT,size:2},{buffer:G,type:C.FLOAT,size:4}]),re=new b(C,O,A,z,U,G,N,Z,j,H,g.traceType||"cone");return re.update(M),re}i.exports=x},9127:function(i,a,o){"use strict";i.exports=u;var s=o(6204),l=o(5771);function u(c){return l(s(c))}},9131:function(i,a,o){var s=o(5177),l=o(9288);i.exports=u;function u(c,f){return f=f||1,c[0]=Math.random(),c[1]=Math.random(),c[2]=Math.random(),c[3]=Math.random(),s(c,c),l(c,c,f),c}},9165:function(i,a,o){"use strict";i.exports=b;var s=o(2762),l=o(8116),u=o(3436),c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function f(p,k,E,T){this.gl=p,this.shader=T,this.buffer=k,this.vao=E,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var h=f.prototype;h.isOpaque=function(){return!this.hasAlpha},h.isTransparent=function(){return this.hasAlpha},h.drawTransparent=h.draw=function(p){var k=this.gl,E=this.shader.uniforms;this.shader.bind();var T=E.view=p.view||c,L=E.projection=p.projection||c;E.model=p.model||c,E.clipBounds=this.clipBounds,E.opacity=this.opacity;var x=T[12],C=T[13],M=T[14],g=T[15],P=p._ortho||!1,A=P?2:1,z=A*this.pixelRatio*(L[3]*x+L[7]*C+L[11]*M+L[15]*g)/k.drawingBufferHeight;this.vao.bind();for(var O=0;O<3;++O)k.lineWidth(this.lineWidth[O]*this.pixelRatio),E.capSize=this.capSize[O]*z,this.lineCount[O]&&k.drawArrays(k.LINES,this.lineOffset[O],this.lineCount[O]);this.vao.unbind()};function d(p,k){for(var E=0;E<3;++E)p[0][E]=Math.min(p[0][E],k[E]),p[1][E]=Math.max(p[1][E],k[E])}var v=function(){for(var p=new Array(3),k=0;k<3;++k){for(var E=[],T=1;T<=2;++T)for(var L=-1;L<=1;L+=2){var x=(T+k)%3,C=[0,0,0];C[x]=L,E.push(C)}p[k]=E}return p}();function _(p,k,E,T){for(var L=v[T],x=0;x0){var U=P.slice();U[M]+=z[1][M],L.push(P[0],P[1],P[2],O[0],O[1],O[2],O[3],0,0,0,U[0],U[1],U[2],O[0],O[1],O[2],O[3],0,0,0),d(this.bounds,U),C+=2+_(L,U,O,M)}}}this.lineCount[M]=C-this.lineOffset[M]}this.buffer.update(L)}},h.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function b(p){var k=p.gl,E=s(k),T=l(k,[{buffer:E,type:k.FLOAT,size:3,offset:0,stride:40},{buffer:E,type:k.FLOAT,size:4,offset:12,stride:40},{buffer:E,type:k.FLOAT,size:3,offset:28,stride:40}]),L=u(k);L.attributes.position.location=0,L.attributes.color.location=1,L.attributes.offset.location=2;var x=new f(k,E,T,L);return x.update(p),x}},9215:function(i,a,o){"use strict";i.exports=d;var s=o(4769),l=o(2478);function u(v,_,b){return Math.min(_,Math.max(v,b))}function c(v,_,b){this.dimension=v.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var p=0;p=b-1)for(var C=E.length-1,g=v-_[b-1],M=0;M=b-1)for(var x=E.length-1,C=v-_[b-1],M=0;M=0;--b)if(v[--_])return!1;return!0},f.jump=function(v){var _=this.lastT(),b=this.dimension;if(!(v<_||arguments.length!==b+1)){var p=this._state,k=this._velocity,E=p.length-this.dimension,T=this.bounds,L=T[0],x=T[1];this._time.push(_,v);for(var C=0;C<2;++C)for(var M=0;M0;--M)p.push(u(L[M-1],x[M-1],arguments[M])),k.push(0)}},f.push=function(v){var _=this.lastT(),b=this.dimension;if(!(v<_||arguments.length!==b+1)){var p=this._state,k=this._velocity,E=p.length-this.dimension,T=v-_,L=this.bounds,x=L[0],C=L[1],M=T>1e-6?1/T:0;this._time.push(v);for(var g=b;g>0;--g){var P=u(x[g-1],C[g-1],arguments[g]);p.push(P),k.push((P-p[E++])*M)}}},f.set=function(v){var _=this.dimension;if(!(v0;--L)b.push(u(E[L-1],T[L-1],arguments[L])),p.push(0)}},f.move=function(v){var _=this.lastT(),b=this.dimension;if(!(v<=_||arguments.length!==b+1)){var p=this._state,k=this._velocity,E=p.length-this.dimension,T=this.bounds,L=T[0],x=T[1],C=v-_,M=C>1e-6?1/C:0;this._time.push(v);for(var g=b;g>0;--g){var P=arguments[g];p.push(u(L[g-1],x[g-1],p[E++]+P)),k.push(P*M)}}},f.idle=function(v){var _=this.lastT();if(!(v<_)){var b=this.dimension,p=this._state,k=this._velocity,E=p.length-b,T=this.bounds,L=T[0],x=T[1],C=v-_;this._time.push(v);for(var M=b-1;M>=0;--M)p.push(u(L[M],x[M],p[E]+C*k[E])),k.push(0),E+=1}};function h(v){for(var _=new Array(v),b=0;b1&&c.indexOf("Macintosh")!==-1&&c.indexOf("Safari")!==-1&&(f=!0),f}},9226:function(i){i.exports=a;function a(o,s){return o[0]=Math.ceil(s[0]),o[1]=Math.ceil(s[1]),o[2]=Math.ceil(s[2]),o}},9265:function(i){i.exports=a;function a(o,s){return o[0]===s[0]&&o[1]===s[1]&&o[2]===s[2]}},9288:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]*l,o[1]=s[1]*l,o[2]=s[2]*l,o[3]=s[3]*l,o}},9346:function(i){"use strict";var a=new Float64Array(4),o=new Float64Array(4),s=new Float64Array(4);function l(u,c,f,h,d){a.length=_?(g=1,A=_+2*k+T):(g=-k/_,A=k*g+T)):(g=0,E>=0?(P=0,A=T):-E>=p?(P=1,A=p+2*E+T):(P=-E/p,A=E*P+T));else if(P<0)P=0,k>=0?(g=0,A=T):-k>=_?(g=1,A=_+2*k+T):(g=-k/_,A=k*g+T);else{var z=1/M;g*=z,P*=z,A=g*(_*g+b*P+2*k)+P*(b*g+p*P+2*E)+T}else{var O,U,G,Z;g<0?(O=b+k,U=p+E,U>O?(G=U-O,Z=_-2*b+p,G>=Z?(g=1,P=0,A=_+2*k+T):(g=G/Z,P=1-g,A=g*(_*g+b*P+2*k)+P*(b*g+p*P+2*E)+T)):(g=0,U<=0?(P=1,A=p+2*E+T):E>=0?(P=0,A=T):(P=-E/p,A=E*P+T))):P<0?(O=b+E,U=_+k,U>O?(G=U-O,Z=_-2*b+p,G>=Z?(P=1,g=0,A=p+2*E+T):(P=G/Z,g=1-P,A=g*(_*g+b*P+2*k)+P*(b*g+p*P+2*E)+T)):(P=0,U<=0?(g=1,A=_+2*k+T):k>=0?(g=0,A=T):(g=-k/_,A=k*g+T))):(G=p+E-b-k,G<=0?(g=0,P=1,A=p+2*E+T):(Z=_-2*b+p,G>=Z?(g=1,P=0,A=_+2*k+T):(g=G/Z,P=1-g,A=g*(_*g+b*P+2*k)+P*(b*g+p*P+2*E)+T)))}for(var j=1-g-P,v=0;vE)for(p=E;pk)for(p=k;p=0){for(var j=Z.type.charAt(Z.type.length-1)|0,N=new Array(j),H=0;H=0;)re+=1;U[G]=re}var oe=new Array(E.length);function _e(){x.program=c.program(C,x._vref,x._fref,O,U);for(var Ce=0;CePe&&De>0){var ce=(me[De][0]-Pe)/(me[De][0]-me[De-1][0]);return me[De][1]*(1-ce)+ce*me[De-1][1]}}return 1}var H=[0,0,0],re={showSurface:!1,showContour:!1,projections:[A.slice(),A.slice(),A.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function oe(Pe,me){var De,ce,je,lt=me.axes&&me.axes.lastCubeProps.axis||H,pt=me.showSurface,Vt=me.showContour;for(De=0;De<3;++De)for(pt=pt||me.surfaceProject[De],ce=0;ce<3;++ce)Vt=Vt||me.contourProject[De][ce];for(De=0;De<3;++De){var ot=re.projections[De];for(ce=0;ce<16;++ce)ot[ce]=0;for(ce=0;ce<4;++ce)ot[5*ce]=1;ot[5*De]=0,ot[12+De]=me.axesBounds[+(lt[De]>0)][De],p(ot,Pe.model,ot);var ut=re.clipBounds[De];for(je=0;je<2;++je)for(ce=0;ce<3;++ce)ut[je][ce]=Pe.clipBounds[je][ce];ut[0][De]=-1e8,ut[1][De]=1e8}return re.showSurface=pt,re.showContour=Vt,re}var _e={model:A,view:A,projection:A,inverseModel:A.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},Ce=A.slice(),Le=[1,0,0,0,1,0,0,0,1];function ge(Pe,me){Pe=Pe||{};var De=this.gl;De.disable(De.CULL_FACE),this._colorMap.bind(0);var ce=_e;ce.model=Pe.model||A,ce.view=Pe.view||A,ce.projection=Pe.projection||A,ce.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],ce.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],ce.objectOffset=this.objectOffset,ce.contourColor=this.contourColor[0],ce.inverseModel=k(ce.inverseModel,ce.model);for(var je=0;je<2;++je)for(var lt=ce.clipBounds[je],pt=0;pt<3;++pt)lt[pt]=Math.min(Math.max(this.clipBounds[je][pt],-1e8),1e8);ce.kambient=this.ambientLight,ce.kdiffuse=this.diffuseLight,ce.kspecular=this.specularLight,ce.roughness=this.roughness,ce.fresnel=this.fresnel,ce.opacity=this.opacity,ce.height=0,ce.permutation=Le,ce.vertexColor=this.vertexColor;var Vt=Ce;for(p(Vt,ce.view,ce.model),p(Vt,ce.projection,Vt),k(Vt,Vt),je=0;je<3;++je)ce.eyePosition[je]=Vt[12+je]/Vt[15];var ot=Vt[15];for(je=0;je<3;++je)ot+=this.lightPosition[je]*Vt[4*je+3];for(je=0;je<3;++je){var ut=Vt[12+je];for(pt=0;pt<3;++pt)ut+=Vt[4*pt+je]*this.lightPosition[pt];ce.lightPosition[je]=ut/ot}var Wt=oe(ce,this);if(Wt.showSurface){for(this._shader.bind(),this._shader.uniforms=ce,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(De.TRIANGLES,this._vertexCount),je=0;je<3;++je)!this.surfaceProject[je]||!this.vertexCount||(this._shader.uniforms.model=Wt.projections[je],this._shader.uniforms.clipBounds=Wt.clipBounds[je],this._vao.draw(De.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Wt.showContour){var Nt=this._contourShader;ce.kambient=1,ce.kdiffuse=0,ce.kspecular=0,ce.opacity=1,Nt.bind(),Nt.uniforms=ce;var $t=this._contourVAO;for($t.bind(),je=0;je<3;++je)for(Nt.uniforms.permutation=O[je],De.lineWidth(this.contourWidth[je]*this.pixelRatio),pt=0;pt>4)/16)/255,je=Math.floor(ce),lt=ce-je,pt=me[1]*(Pe.value[1]+(Pe.value[2]&15)/16)/255,Vt=Math.floor(pt),ot=pt-Vt;je+=1,Vt+=1;var ut=De.position;ut[0]=ut[1]=ut[2]=0;for(var Wt=0;Wt<2;++Wt)for(var Nt=Wt?lt:1-lt,$t=0;$t<2;++$t)for(var sr=$t?ot:1-ot,Tr=je+Wt,fr=Vt+$t,$e=Nt*sr,St=0;St<3;++St)ut[St]+=this._field[St].get(Tr,fr)*$e;for(var Qt=this._pickResult.level,Gt=0;Gt<3;++Gt)if(Qt[Gt]=E.le(this.contourLevels[Gt],ut[Gt]),Qt[Gt]<0)this.contourLevels[Gt].length>0&&(Qt[Gt]=0);else if(Qt[Gt]Math.abs(It-ut[Gt])&&(Qt[Gt]+=1)}for(De.index[0]=lt<.5?je:je+1,De.index[1]=ot<.5?Vt:Vt+1,De.uv[0]=ce/me[0],De.uv[1]=pt/me[1],St=0;St<3;++St)De.dataCoordinate[St]=this._field[St].get(De.index[0],De.index[1]);return De},j.padField=function(Pe,me){var De=me.shape.slice(),ce=Pe.shape.slice();d.assign(Pe.lo(1,1).hi(De[0],De[1]),me),d.assign(Pe.lo(1).hi(De[0],1),me.hi(De[0],1)),d.assign(Pe.lo(1,ce[1]-1).hi(De[0],1),me.lo(0,De[1]-1).hi(De[0],1)),d.assign(Pe.lo(0,1).hi(1,De[1]),me.hi(1)),d.assign(Pe.lo(ce[0]-1,1).hi(1,De[1]),me.lo(De[0]-1)),Pe.set(0,0,me.get(0,0)),Pe.set(0,ce[1]-1,me.get(0,De[1]-1)),Pe.set(ce[0]-1,0,me.get(De[0]-1,0)),Pe.set(ce[0]-1,ce[1]-1,me.get(De[0]-1,De[1]-1))};function Se(Pe,me){return Array.isArray(Pe)?[me(Pe[0]),me(Pe[1]),me(Pe[2])]:[me(Pe),me(Pe),me(Pe)]}function Ee(Pe){return Array.isArray(Pe)?Pe.length===3?[Pe[0],Pe[1],Pe[2],1]:[Pe[0],Pe[1],Pe[2],Pe[3]]:[0,0,0,1]}function Ae(Pe){if(Array.isArray(Pe)){if(Array.isArray(Pe))return[Ee(Pe[0]),Ee(Pe[1]),Ee(Pe[2])];var me=Ee(Pe);return[me.slice(),me.slice(),me.slice()]}}j.update=function(Pe){Pe=Pe||{},this.objectOffset=Pe.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in Pe&&(this.contourWidth=Se(Pe.contourWidth,Number)),"showContour"in Pe&&(this.showContour=Se(Pe.showContour,Boolean)),"showSurface"in Pe&&(this.showSurface=!!Pe.showSurface),"contourTint"in Pe&&(this.contourTint=Se(Pe.contourTint,Boolean)),"contourColor"in Pe&&(this.contourColor=Ae(Pe.contourColor)),"contourProject"in Pe&&(this.contourProject=Se(Pe.contourProject,function(yn){return Se(yn,Boolean)})),"surfaceProject"in Pe&&(this.surfaceProject=Pe.surfaceProject),"dynamicColor"in Pe&&(this.dynamicColor=Ae(Pe.dynamicColor)),"dynamicTint"in Pe&&(this.dynamicTint=Se(Pe.dynamicTint,Number)),"dynamicWidth"in Pe&&(this.dynamicWidth=Se(Pe.dynamicWidth,Number)),"opacity"in Pe&&(this.opacity=Pe.opacity),"opacityscale"in Pe&&(this.opacityscale=Pe.opacityscale),"colorBounds"in Pe&&(this.colorBounds=Pe.colorBounds),"vertexColor"in Pe&&(this.vertexColor=Pe.vertexColor?1:0),"colormap"in Pe&&this._colorMap.setPixels(this.genColormap(Pe.colormap,this.opacityscale));var me=Pe.field||Pe.coords&&Pe.coords[2]||null,De=!1;if(me||(this._field[2].shape[0]||this._field[2].shape[2]?me=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):me=this._field[2].hi(0,0)),"field"in Pe||"coords"in Pe){var ce=(me.shape[0]+2)*(me.shape[1]+2);ce>this._field[2].data.length&&(f.freeFloat(this._field[2].data),this._field[2].data=f.mallocFloat(s.nextPow2(ce))),this._field[2]=_(this._field[2].data,[me.shape[0]+2,me.shape[1]+2]),this.padField(this._field[2],me),this.shape=me.shape.slice();for(var je=this.shape,lt=0;lt<2;++lt)this._field[2].size>this._field[lt].data.length&&(f.freeFloat(this._field[lt].data),this._field[lt].data=f.mallocFloat(this._field[2].size)),this._field[lt]=_(this._field[lt].data,[je[0]+2,je[1]+2]);if(Pe.coords){var pt=Pe.coords;if(!Array.isArray(pt)||pt.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(lt=0;lt<2;++lt){var Vt=pt[lt];for($t=0;$t<2;++$t)if(Vt.shape[$t]!==je[$t])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[lt],Vt)}}else if(Pe.ticks){var ot=Pe.ticks;if(!Array.isArray(ot)||ot.length!==2)throw new Error("gl-surface: invalid ticks");for(lt=0;lt<2;++lt){var ut=ot[lt];if((Array.isArray(ut)||ut.length)&&(ut=_(ut)),ut.shape[0]!==je[lt])throw new Error("gl-surface: invalid tick length");var Wt=_(ut.data,je);Wt.stride[lt]=ut.stride[0],Wt.stride[lt^1]=0,this.padField(this._field[lt],Wt)}}else{for(lt=0;lt<2;++lt){var Nt=[0,0];Nt[lt]=1,this._field[lt]=_(this._field[lt].data,[je[0]+2,je[1]+2],Nt,0)}this._field[0].set(0,0,0);for(var $t=0;$t0){for(var tn=0;tn<5;++tn)pi.pop();We-=1}continue e}}}In.push(We)}this._contourOffsets[$r]=ji,this._contourCounts[$r]=In}var fn=f.mallocFloat(pi.length);for(lt=0;lt=0&&(M=x|0,C+=P*M,g-=M),new E(this.data,g,P,C)},T.step=function(x){var C=this.shape[0],M=this.stride[0],g=this.offset,P=0,A=Math.ceil;return typeof x=="number"&&(P=x|0,P<0?(g+=M*(C-1),C=A(-C/P)):C=A(C/P),M*=P),new E(this.data,C,M,g)},T.transpose=function(x){x=x===void 0?0:x|0;var C=this.shape,M=this.stride;return new E(this.data,C[x],M[x],this.offset)},T.pick=function(x){var C=[],M=[],g=this.offset;typeof x=="number"&&x>=0?g=g+this.stride[0]*x|0:(C.push(this.shape[0]),M.push(this.stride[0]));var P=p[C.length+1];return P(this.data,C,M,g)},function(x,C,M,g){return new E(x,C[0],M[0],g)}},2:function(b,p,k){function E(L,x,C,M,g,P){this.data=L,this.shape=[x,C],this.stride=[M,g],this.offset=P|0}var T=E.prototype;return T.dtype=b,T.dimension=2,Object.defineProperty(T,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(T,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),T.set=function(x,C,M){return b==="generic"?this.data.set(this.offset+this.stride[0]*x+this.stride[1]*C,M):this.data[this.offset+this.stride[0]*x+this.stride[1]*C]=M},T.get=function(x,C){return b==="generic"?this.data.get(this.offset+this.stride[0]*x+this.stride[1]*C):this.data[this.offset+this.stride[0]*x+this.stride[1]*C]},T.index=function(x,C){return this.offset+this.stride[0]*x+this.stride[1]*C},T.hi=function(x,C){return new E(this.data,typeof x!="number"||x<0?this.shape[0]:x|0,typeof C!="number"||C<0?this.shape[1]:C|0,this.stride[0],this.stride[1],this.offset)},T.lo=function(x,C){var M=this.offset,g=0,P=this.shape[0],A=this.shape[1],z=this.stride[0],O=this.stride[1];return typeof x=="number"&&x>=0&&(g=x|0,M+=z*g,P-=g),typeof C=="number"&&C>=0&&(g=C|0,M+=O*g,A-=g),new E(this.data,P,A,z,O,M)},T.step=function(x,C){var M=this.shape[0],g=this.shape[1],P=this.stride[0],A=this.stride[1],z=this.offset,O=0,U=Math.ceil;return typeof x=="number"&&(O=x|0,O<0?(z+=P*(M-1),M=U(-M/O)):M=U(M/O),P*=O),typeof C=="number"&&(O=C|0,O<0?(z+=A*(g-1),g=U(-g/O)):g=U(g/O),A*=O),new E(this.data,M,g,P,A,z)},T.transpose=function(x,C){x=x===void 0?0:x|0,C=C===void 0?1:C|0;var M=this.shape,g=this.stride;return new E(this.data,M[x],M[C],g[x],g[C],this.offset)},T.pick=function(x,C){var M=[],g=[],P=this.offset;typeof x=="number"&&x>=0?P=P+this.stride[0]*x|0:(M.push(this.shape[0]),g.push(this.stride[0])),typeof C=="number"&&C>=0?P=P+this.stride[1]*C|0:(M.push(this.shape[1]),g.push(this.stride[1]));var A=p[M.length+1];return A(this.data,M,g,P)},function(x,C,M,g){return new E(x,C[0],C[1],M[0],M[1],g)}},3:function(b,p,k){function E(L,x,C,M,g,P,A,z){this.data=L,this.shape=[x,C,M],this.stride=[g,P,A],this.offset=z|0}var T=E.prototype;return T.dtype=b,T.dimension=3,Object.defineProperty(T,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(T,"order",{get:function(){var x=Math.abs(this.stride[0]),C=Math.abs(this.stride[1]),M=Math.abs(this.stride[2]);return x>C?C>M?[2,1,0]:x>M?[1,2,0]:[1,0,2]:x>M?[2,0,1]:M>C?[0,1,2]:[0,2,1]}}),T.set=function(x,C,M,g){return b==="generic"?this.data.set(this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*M,g):this.data[this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*M]=g},T.get=function(x,C,M){return b==="generic"?this.data.get(this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*M):this.data[this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*M]},T.index=function(x,C,M){return this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*M},T.hi=function(x,C,M){return new E(this.data,typeof x!="number"||x<0?this.shape[0]:x|0,typeof C!="number"||C<0?this.shape[1]:C|0,typeof M!="number"||M<0?this.shape[2]:M|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},T.lo=function(x,C,M){var g=this.offset,P=0,A=this.shape[0],z=this.shape[1],O=this.shape[2],U=this.stride[0],G=this.stride[1],Z=this.stride[2];return typeof x=="number"&&x>=0&&(P=x|0,g+=U*P,A-=P),typeof C=="number"&&C>=0&&(P=C|0,g+=G*P,z-=P),typeof M=="number"&&M>=0&&(P=M|0,g+=Z*P,O-=P),new E(this.data,A,z,O,U,G,Z,g)},T.step=function(x,C,M){var g=this.shape[0],P=this.shape[1],A=this.shape[2],z=this.stride[0],O=this.stride[1],U=this.stride[2],G=this.offset,Z=0,j=Math.ceil;return typeof x=="number"&&(Z=x|0,Z<0?(G+=z*(g-1),g=j(-g/Z)):g=j(g/Z),z*=Z),typeof C=="number"&&(Z=C|0,Z<0?(G+=O*(P-1),P=j(-P/Z)):P=j(P/Z),O*=Z),typeof M=="number"&&(Z=M|0,Z<0?(G+=U*(A-1),A=j(-A/Z)):A=j(A/Z),U*=Z),new E(this.data,g,P,A,z,O,U,G)},T.transpose=function(x,C,M){x=x===void 0?0:x|0,C=C===void 0?1:C|0,M=M===void 0?2:M|0;var g=this.shape,P=this.stride;return new E(this.data,g[x],g[C],g[M],P[x],P[C],P[M],this.offset)},T.pick=function(x,C,M){var g=[],P=[],A=this.offset;typeof x=="number"&&x>=0?A=A+this.stride[0]*x|0:(g.push(this.shape[0]),P.push(this.stride[0])),typeof C=="number"&&C>=0?A=A+this.stride[1]*C|0:(g.push(this.shape[1]),P.push(this.stride[1])),typeof M=="number"&&M>=0?A=A+this.stride[2]*M|0:(g.push(this.shape[2]),P.push(this.stride[2]));var z=p[g.length+1];return z(this.data,g,P,A)},function(x,C,M,g){return new E(x,C[0],C[1],C[2],M[0],M[1],M[2],g)}},4:function(b,p,k){function E(L,x,C,M,g,P,A,z,O,U){this.data=L,this.shape=[x,C,M,g],this.stride=[P,A,z,O],this.offset=U|0}var T=E.prototype;return T.dtype=b,T.dimension=4,Object.defineProperty(T,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(T,"order",{get:k}),T.set=function(x,C,M,g,P){return b==="generic"?this.data.set(this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*M+this.stride[3]*g,P):this.data[this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*M+this.stride[3]*g]=P},T.get=function(x,C,M,g){return b==="generic"?this.data.get(this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*M+this.stride[3]*g):this.data[this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*M+this.stride[3]*g]},T.index=function(x,C,M,g){return this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*M+this.stride[3]*g},T.hi=function(x,C,M,g){return new E(this.data,typeof x!="number"||x<0?this.shape[0]:x|0,typeof C!="number"||C<0?this.shape[1]:C|0,typeof M!="number"||M<0?this.shape[2]:M|0,typeof g!="number"||g<0?this.shape[3]:g|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},T.lo=function(x,C,M,g){var P=this.offset,A=0,z=this.shape[0],O=this.shape[1],U=this.shape[2],G=this.shape[3],Z=this.stride[0],j=this.stride[1],N=this.stride[2],H=this.stride[3];return typeof x=="number"&&x>=0&&(A=x|0,P+=Z*A,z-=A),typeof C=="number"&&C>=0&&(A=C|0,P+=j*A,O-=A),typeof M=="number"&&M>=0&&(A=M|0,P+=N*A,U-=A),typeof g=="number"&&g>=0&&(A=g|0,P+=H*A,G-=A),new E(this.data,z,O,U,G,Z,j,N,H,P)},T.step=function(x,C,M,g){var P=this.shape[0],A=this.shape[1],z=this.shape[2],O=this.shape[3],U=this.stride[0],G=this.stride[1],Z=this.stride[2],j=this.stride[3],N=this.offset,H=0,re=Math.ceil;return typeof x=="number"&&(H=x|0,H<0?(N+=U*(P-1),P=re(-P/H)):P=re(P/H),U*=H),typeof C=="number"&&(H=C|0,H<0?(N+=G*(A-1),A=re(-A/H)):A=re(A/H),G*=H),typeof M=="number"&&(H=M|0,H<0?(N+=Z*(z-1),z=re(-z/H)):z=re(z/H),Z*=H),typeof g=="number"&&(H=g|0,H<0?(N+=j*(O-1),O=re(-O/H)):O=re(O/H),j*=H),new E(this.data,P,A,z,O,U,G,Z,j,N)},T.transpose=function(x,C,M,g){x=x===void 0?0:x|0,C=C===void 0?1:C|0,M=M===void 0?2:M|0,g=g===void 0?3:g|0;var P=this.shape,A=this.stride;return new E(this.data,P[x],P[C],P[M],P[g],A[x],A[C],A[M],A[g],this.offset)},T.pick=function(x,C,M,g){var P=[],A=[],z=this.offset;typeof x=="number"&&x>=0?z=z+this.stride[0]*x|0:(P.push(this.shape[0]),A.push(this.stride[0])),typeof C=="number"&&C>=0?z=z+this.stride[1]*C|0:(P.push(this.shape[1]),A.push(this.stride[1])),typeof M=="number"&&M>=0?z=z+this.stride[2]*M|0:(P.push(this.shape[2]),A.push(this.stride[2])),typeof g=="number"&&g>=0?z=z+this.stride[3]*g|0:(P.push(this.shape[3]),A.push(this.stride[3]));var O=p[P.length+1];return O(this.data,P,A,z)},function(x,C,M,g){return new E(x,C[0],C[1],C[2],C[3],M[0],M[1],M[2],M[3],g)}},5:function(p,k,E){function T(x,C,M,g,P,A,z,O,U,G,Z,j){this.data=x,this.shape=[C,M,g,P,A],this.stride=[z,O,U,G,Z],this.offset=j|0}var L=T.prototype;return L.dtype=p,L.dimension=5,Object.defineProperty(L,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(L,"order",{get:E}),L.set=function(C,M,g,P,A,z){return p==="generic"?this.data.set(this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*g+this.stride[3]*P+this.stride[4]*A,z):this.data[this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*g+this.stride[3]*P+this.stride[4]*A]=z},L.get=function(C,M,g,P,A){return p==="generic"?this.data.get(this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*g+this.stride[3]*P+this.stride[4]*A):this.data[this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*g+this.stride[3]*P+this.stride[4]*A]},L.index=function(C,M,g,P,A){return this.offset+this.stride[0]*C+this.stride[1]*M+this.stride[2]*g+this.stride[3]*P+this.stride[4]*A},L.hi=function(C,M,g,P,A){return new T(this.data,typeof C!="number"||C<0?this.shape[0]:C|0,typeof M!="number"||M<0?this.shape[1]:M|0,typeof g!="number"||g<0?this.shape[2]:g|0,typeof P!="number"||P<0?this.shape[3]:P|0,typeof A!="number"||A<0?this.shape[4]:A|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},L.lo=function(C,M,g,P,A){var z=this.offset,O=0,U=this.shape[0],G=this.shape[1],Z=this.shape[2],j=this.shape[3],N=this.shape[4],H=this.stride[0],re=this.stride[1],oe=this.stride[2],_e=this.stride[3],Ce=this.stride[4];return typeof C=="number"&&C>=0&&(O=C|0,z+=H*O,U-=O),typeof M=="number"&&M>=0&&(O=M|0,z+=re*O,G-=O),typeof g=="number"&&g>=0&&(O=g|0,z+=oe*O,Z-=O),typeof P=="number"&&P>=0&&(O=P|0,z+=_e*O,j-=O),typeof A=="number"&&A>=0&&(O=A|0,z+=Ce*O,N-=O),new T(this.data,U,G,Z,j,N,H,re,oe,_e,Ce,z)},L.step=function(C,M,g,P,A){var z=this.shape[0],O=this.shape[1],U=this.shape[2],G=this.shape[3],Z=this.shape[4],j=this.stride[0],N=this.stride[1],H=this.stride[2],re=this.stride[3],oe=this.stride[4],_e=this.offset,Ce=0,Le=Math.ceil;return typeof C=="number"&&(Ce=C|0,Ce<0?(_e+=j*(z-1),z=Le(-z/Ce)):z=Le(z/Ce),j*=Ce),typeof M=="number"&&(Ce=M|0,Ce<0?(_e+=N*(O-1),O=Le(-O/Ce)):O=Le(O/Ce),N*=Ce),typeof g=="number"&&(Ce=g|0,Ce<0?(_e+=H*(U-1),U=Le(-U/Ce)):U=Le(U/Ce),H*=Ce),typeof P=="number"&&(Ce=P|0,Ce<0?(_e+=re*(G-1),G=Le(-G/Ce)):G=Le(G/Ce),re*=Ce),typeof A=="number"&&(Ce=A|0,Ce<0?(_e+=oe*(Z-1),Z=Le(-Z/Ce)):Z=Le(Z/Ce),oe*=Ce),new T(this.data,z,O,U,G,Z,j,N,H,re,oe,_e)},L.transpose=function(C,M,g,P,A){C=C===void 0?0:C|0,M=M===void 0?1:M|0,g=g===void 0?2:g|0,P=P===void 0?3:P|0,A=A===void 0?4:A|0;var z=this.shape,O=this.stride;return new T(this.data,z[C],z[M],z[g],z[P],z[A],O[C],O[M],O[g],O[P],O[A],this.offset)},L.pick=function(C,M,g,P,A){var z=[],O=[],U=this.offset;typeof C=="number"&&C>=0?U=U+this.stride[0]*C|0:(z.push(this.shape[0]),O.push(this.stride[0])),typeof M=="number"&&M>=0?U=U+this.stride[1]*M|0:(z.push(this.shape[1]),O.push(this.stride[1])),typeof g=="number"&&g>=0?U=U+this.stride[2]*g|0:(z.push(this.shape[2]),O.push(this.stride[2])),typeof P=="number"&&P>=0?U=U+this.stride[3]*P|0:(z.push(this.shape[3]),O.push(this.stride[3])),typeof A=="number"&&A>=0?U=U+this.stride[4]*A|0:(z.push(this.shape[4]),O.push(this.stride[4]));var G=k[z.length+1];return G(this.data,z,O,U)},function(C,M,g,P){return new T(C,M[0],M[1],M[2],M[3],M[4],g[0],g[1],g[2],g[3],g[4],P)}}};function h(b,p){var k=p===-1?"T":String(p),E=f[k];return p===-1?E(b):p===0?E(b,v[b][0]):E(b,v[b],c)}function d(b){if(s(b))return"buffer";if(l)switch(Object.prototype.toString.call(b)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(b)?"array":"generic"}var v={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function _(b,p,k,E){if(b===void 0){var g=v.array[0];return g([])}else typeof b=="number"&&(b=[b]);p===void 0&&(p=[b.length]);var T=p.length;if(k===void 0){k=new Array(T);for(var L=T-1,x=1;L>=0;--L)k[L]=x,x*=p[L]}if(E===void 0){E=0;for(var L=0;L1e-6?(k[0]=T/M,k[1]=L/M,k[2]=x/M,k[3]=C/M):(k[0]=k[1]=k[2]=0,k[3]=1)}function _(k,E,T){this.radius=s([T]),this.center=s(E),this.rotation=s(k),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var b=_.prototype;b.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},b.recalcMatrix=function(k){this.radius.curve(k),this.center.curve(k),this.rotation.curve(k);var E=this.computedRotation;v(E,E);var T=this.computedMatrix;u(T,E);var L=this.computedCenter,x=this.computedEye,C=this.computedUp,M=Math.exp(this.computedRadius[0]);x[0]=L[0]+M*T[2],x[1]=L[1]+M*T[6],x[2]=L[2]+M*T[10],C[0]=T[1],C[1]=T[5],C[2]=T[9];for(var g=0;g<3;++g){for(var P=0,A=0;A<3;++A)P+=T[g+4*A]*x[A];T[12+g]=-P}},b.getMatrix=function(k,E){this.recalcMatrix(k);var T=this.computedMatrix;if(E){for(var L=0;L<16;++L)E[L]=T[L];return E}return T},b.idle=function(k){this.center.idle(k),this.radius.idle(k),this.rotation.idle(k)},b.flush=function(k){this.center.flush(k),this.radius.flush(k),this.rotation.flush(k)},b.pan=function(k,E,T,L){E=E||0,T=T||0,L=L||0,this.recalcMatrix(k);var x=this.computedMatrix,C=x[1],M=x[5],g=x[9],P=h(C,M,g);C/=P,M/=P,g/=P;var A=x[0],z=x[4],O=x[8],U=A*C+z*M+O*g;A-=C*U,z-=M*U,O-=g*U;var G=h(A,z,O);A/=G,z/=G,O/=G;var Z=x[2],j=x[6],N=x[10],H=Z*C+j*M+N*g,re=Z*A+j*z+N*O;Z-=H*C+re*A,j-=H*M+re*z,N-=H*g+re*O;var oe=h(Z,j,N);Z/=oe,j/=oe,N/=oe;var _e=A*E+C*T,Ce=z*E+M*T,Le=O*E+g*T;this.center.move(k,_e,Ce,Le);var ge=Math.exp(this.computedRadius[0]);ge=Math.max(1e-4,ge+L),this.radius.set(k,Math.log(ge))},b.rotate=function(k,E,T,L){this.recalcMatrix(k),E=E||0,T=T||0;var x=this.computedMatrix,C=x[0],M=x[4],g=x[8],P=x[1],A=x[5],z=x[9],O=x[2],U=x[6],G=x[10],Z=E*C+T*P,j=E*M+T*A,N=E*g+T*z,H=-(U*N-G*j),re=-(G*Z-O*N),oe=-(O*j-U*Z),_e=Math.sqrt(Math.max(0,1-Math.pow(H,2)-Math.pow(re,2)-Math.pow(oe,2))),Ce=d(H,re,oe,_e);Ce>1e-6?(H/=Ce,re/=Ce,oe/=Ce,_e/=Ce):(H=re=oe=0,_e=1);var Le=this.computedRotation,ge=Le[0],ie=Le[1],Se=Le[2],Ee=Le[3],Ae=ge*_e+Ee*H+ie*oe-Se*re,Be=ie*_e+Ee*re+Se*H-ge*oe,Pe=Se*_e+Ee*oe+ge*re-ie*H,me=Ee*_e-ge*H-ie*re-Se*oe;if(L){H=O,re=U,oe=G;var De=Math.sin(L)/h(H,re,oe);H*=De,re*=De,oe*=De,_e=Math.cos(E),Ae=Ae*_e+me*H+Be*oe-Pe*re,Be=Be*_e+me*re+Pe*H-Ae*oe,Pe=Pe*_e+me*oe+Ae*re-Be*H,me=me*_e-Ae*H-Be*re-Pe*oe}var ce=d(Ae,Be,Pe,me);ce>1e-6?(Ae/=ce,Be/=ce,Pe/=ce,me/=ce):(Ae=Be=Pe=0,me=1),this.rotation.set(k,Ae,Be,Pe,me)},b.lookAt=function(k,E,T,L){this.recalcMatrix(k),T=T||this.computedCenter,E=E||this.computedEye,L=L||this.computedUp;var x=this.computedMatrix;l(x,E,T,L);var C=this.computedRotation;f(C,x[0],x[1],x[2],x[4],x[5],x[6],x[8],x[9],x[10]),v(C,C),this.rotation.set(k,C[0],C[1],C[2],C[3]);for(var M=0,g=0;g<3;++g)M+=Math.pow(T[g]-E[g],2);this.radius.set(k,.5*Math.log(Math.max(M,1e-6))),this.center.set(k,T[0],T[1],T[2])},b.translate=function(k,E,T,L){this.center.move(k,E||0,T||0,L||0)},b.setMatrix=function(k,E){var T=this.computedRotation;f(T,E[0],E[1],E[2],E[4],E[5],E[6],E[8],E[9],E[10]),v(T,T),this.rotation.set(k,T[0],T[1],T[2],T[3]);var L=this.computedMatrix;c(L,E);var x=L[15];if(Math.abs(x)>1e-6){var C=L[12]/x,M=L[13]/x,g=L[14]/x;this.recalcMatrix(k);var P=Math.exp(this.computedRadius[0]);this.center.set(k,C-L[2]*P,M-L[6]*P,g-L[10]*P),this.radius.idle(k)}else this.center.idle(k),this.radius.idle(k)},b.setDistance=function(k,E){E>0&&this.radius.set(k,Math.log(E))},b.setDistanceLimits=function(k,E){k>0?k=Math.log(k):k=-1/0,E>0?E=Math.log(E):E=1/0,E=Math.max(E,k),this.radius.bounds[0][0]=k,this.radius.bounds[1][0]=E},b.getDistanceLimits=function(k){var E=this.radius.bounds;return k?(k[0]=Math.exp(E[0][0]),k[1]=Math.exp(E[1][0]),k):[Math.exp(E[0][0]),Math.exp(E[1][0])]},b.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},b.fromJSON=function(k){var E=this.lastT(),T=k.center;T&&this.center.set(E,T[0],T[1],T[2]);var L=k.rotation;L&&this.rotation.set(E,L[0],L[1],L[2],L[3]);var x=k.distance;x&&x>0&&this.radius.set(E,Math.log(x)),this.setDistanceLimits(k.zoomMin,k.zoomMax)};function p(k){k=k||{};var E=k.center||[0,0,0],T=k.rotation||[0,0,0,1],L=k.radius||1;E=[].slice.call(E,0,3),T=[].slice.call(T,0,4),v(T,T);var x=new _(T,E,Math.log(L));return x.setDistanceLimits(k.zoomMin,k.zoomMax),("eye"in k||"up"in k)&&x.lookAt(0,k.eye,k.center,k.up),x}},9994:function(i,a,o){"use strict";var s=o(9618),l=o(8277);i.exports=function(c,f){for(var h=[],d=c,v=1;Array.isArray(d);)h.push(d.length),v*=d.length,d=d[0];return h.length===0?s():(f||(f=s(new Float64Array(v),h)),l(f,c),f)}}},t={};function r(i){var a=t[i];if(a!==void 0)return a.exports;var o=t[i]={id:i,loaded:!1,exports:{}};return e[i].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}(function(){r.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch(i){if(typeof window=="object")return window}}()})(),function(){r.nmd=function(i){return i.paths=[],i.children||(i.children=[]),i}}();var n=r(1964);APe.exports=n})()});var TX=ye((egr,SPe)=>{"use strict";SPe.exports={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]}});var CPe=ye((tgr,kPe)=>{"use strict";var MPe=TX();kPe.exports=fIt;var EPe={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function fIt(e){var t,r=[],n=1,i;if(typeof e=="string")if(e=e.toLowerCase(),MPe[e])r=MPe[e].slice(),i="rgb";else if(e==="transparent")n=0,i="rgb",r=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var a=e.slice(1),o=a.length,s=o<=4;n=1,s?(r=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],o===4&&(n=parseInt(a[3]+a[3],16)/255)):(r=[parseInt(a[0]+a[1],16),parseInt(a[2]+a[3],16),parseInt(a[4]+a[5],16)],o===8&&(n=parseInt(a[6]+a[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),i="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var l=t[1],u=l==="rgb",a=l.replace(/a$/,"");i=a;var o=a==="cmyk"?4:a==="gray"?1:3;r=t[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(h,d){if(/%$/.test(h))return d===o?parseFloat(h)/100:a==="rgb"?parseFloat(h)*255/100:parseFloat(h);if(a[d]==="h"){if(/deg$/.test(h))return parseFloat(h);if(EPe[h]!==void 0)return EPe[h]}return parseFloat(h)}),l===a&&r.push(1),n=u||r[o]===void 0?1:r[o],r=r.slice(0,o)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(r=e.match(/([0-9]+)/g).map(function(c){return parseFloat(c)}),i=e.match(/([a-z])/ig).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(r=[e[0],e[1],e[2]],i="rgb",n=e.length===4?e[3]:1):e instanceof Object&&(e.r!=null||e.red!=null||e.R!=null?(i="rgb",r=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(i="hsl",r=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),n=e.a||e.alpha||e.opacity||1,e.opacity!=null&&(n/=100)):(i="rgb",r=[e>>>16,(e&65280)>>>8,e&255]);return{space:i,values:r,alpha:n}}});var PPe=ye((rgr,LPe)=>{"use strict";var hIt=CPe();LPe.exports=function(t){Array.isArray(t)&&t.raw&&(t=String.raw.apply(null,arguments));var r,n,i,a=hIt(t);if(!a.space)return[];var o=[0,0,0],s=a.space[0]==="h"?[360,100,100]:[255,255,255];return r=Array(3),r[0]=Math.min(Math.max(a.values[0],o[0]),s[0]),r[1]=Math.min(Math.max(a.values[1],o[1]),s[1]),r[2]=Math.min(Math.max(a.values[2],o[2]),s[2]),a.space[0]==="h"&&(r=dIt(r)),r.push(Math.min(Math.max(a.alpha,0),1)),r};function dIt(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100,i,a,o,s,l,u=0;if(r===0)return l=n*255,[l,l,l];for(a=n<.5?n*(1+r):n+r-n*r,i=2*n-a,s=[0,0,0];u<3;)o=t+1/3*-(u-1),o<0?o++:o>1&&o--,l=6*o<1?i+(a-i)*6*o:2*o<1?a:3*o<2?i+(a-i)*(2/3-o)*6:i,s[u++]=l*255;return s}});var rk=ye((igr,IPe)=>{IPe.exports=vIt;function vIt(e,t,r){return tr?r:e:et?t:e}});var QD=ye((ngr,RPe)=>{RPe.exports=function(e){switch(e){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}});var ox=ye((agr,DPe)=>{"use strict";var pIt=PPe(),eF=rk(),gIt=QD();DPe.exports=function(t,r){(r==="float"||!r)&&(r="array"),r==="uint"&&(r="uint8"),r==="uint_clamped"&&(r="uint8_clamped");var n=gIt(r),i=new n(4),a=r!=="uint8"&&r!=="uint8_clamped";return(!t.length||typeof t=="string")&&(t=pIt(t),t[0]/=255,t[1]/=255,t[2]/=255),mIt(t)?(i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3]!=null?t[3]:255,a&&(i[0]/=255,i[1]/=255,i[2]/=255,i[3]/=255),i):(a?(i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3]!=null?t[3]:1):(i[0]=eF(Math.floor(t[0]*255),0,255),i[1]=eF(Math.floor(t[1]*255),0,255),i[2]=eF(Math.floor(t[2]*255),0,255),i[3]=t[3]==null?255:eF(Math.floor(t[3]*255),0,255)),i)};function mIt(e){return!!(e instanceof Uint8Array||e instanceof Uint8ClampedArray||Array.isArray(e)&&(e[0]>1||e[0]===0)&&(e[1]>1||e[1]===0)&&(e[2]>1||e[2]===0)&&(!e[3]||e[3]>1))}});var n1=ye((ogr,FPe)=>{"use strict";var yIt=ox();function _It(e){return e?yIt(e):[0,0,0,1]}FPe.exports=_It});var a1=ye((sgr,VPe)=>{"use strict";var NPe=Eo(),xIt=fd(),tF=ox(),rF=tc(),bIt=Ih().defaultLine,zPe=vv().isArrayOrTypedArray,AX=tF(bIt),UPe=1;function OPe(e,t){var r=e;return r[3]*=t,r}function qPe(e){if(NPe(e))return AX;var t=tF(e);return t.length?t:AX}function BPe(e){return NPe(e)?e:UPe}function wIt(e,t,r){var n=e.color;n&&n._inputArray&&(n=n._inputArray);var i=zPe(n),a=zPe(t),o=rF.extractOpts(e),s=[],l,u,c,f,h;if(o.colorscale!==void 0?l=rF.makeColorScaleFuncFromTrace(e):l=qPe,i?u=function(v,_){return v[_]===void 0?AX:tF(l(v[_]))}:u=qPe,a?c=function(v,_){return v[_]===void 0?UPe:BPe(v[_])}:c=BPe,i||a)for(var d=0;d{"use strict";GPe.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}});var iF=ye((ugr,HPe)=>{"use strict";HPe.exports={circle:"\u25CF","circle-open":"\u25CB",square:"\u25A0","square-open":"\u25A1",diamond:"\u25C6","diamond-open":"\u25C7",cross:"+",x:"\u274C"}});var WPe=ye((cgr,jPe)=>{"use strict";var AIt=qa();function MX(e,t,r,n){if(!t||!t.visible)return null;for(var i=AIt.getComponentMethod("errorbars","makeComputeError")(t),a=new Array(e.length),o=0;o0){var f=n.c2l(u);n._lowerLogErrorBound||(n._lowerLogErrorBound=f),n._lowerErrorBound=Math.min(n._lowerLogErrorBound,f)}}else a[o]=[-s[0]*r,s[1]*r]}return a}function SIt(e){for(var t=0;t{"use strict";var EIt=zd().gl_line3d,XPe=zd().gl_scatter3d,kIt=zd().gl_error3d,CIt=zd().gl_mesh3d,LIt=zd().delaunay_triangulate,o1=Dr(),$Pe=n1(),nF=a1().formatColor,PIt=O3(),EX=SX(),IIt=iF(),RIt=ho(),DIt=ip().appendArrayPointValue,FIt=WPe();function QPe(e,t){this.scene=e,this.uid=t,this.linePlot=null,this.scatterPlot=null,this.errorBars=null,this.textMarkers=null,this.delaunayMesh=null,this.color=null,this.mode="",this.dataPoints=[],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.textLabels=null,this.data=null}var CX=QPe.prototype;CX.handlePick=function(e){if(e.object&&(e.object===this.linePlot||e.object===this.delaunayMesh||e.object===this.textMarkers||e.object===this.scatterPlot)){var t=e.index=e.data.index;return e.object.highlight&&e.object.highlight(null),this.scatterPlot&&(e.object=this.scatterPlot,this.scatterPlot.highlight(e.data)),e.textLabel="",this.textLabels&&(o1.isArrayOrTypedArray(this.textLabels)?(this.textLabels[t]||this.textLabels[t]===0)&&(e.textLabel=this.textLabels[t]):e.textLabel=this.textLabels),e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]],!0}};function zIt(e,t,r){var n=(r+1)%3,i=(r+2)%3,a=[],o=[],s;for(s=0;s-1?-1:e.indexOf("right")>-1?1:0}function YPe(e){return e==null?0:e.indexOf("top")>-1?-1:e.indexOf("bottom")>-1?1:0}function qIt(e){var t=0,r=0,n=[t,r];if(Array.isArray(e))for(var i=0;i=0){var u=zIt(s.position,s.delaunayColor,s.delaunayAxis);u.opacity=e.opacity,this.delaunayMesh?this.delaunayMesh.update(u):(u.gl=t,this.delaunayMesh=CIt(u),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)};CX.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())};function VIt(e,t){var r=new QPe(e,t.uid);return r.update(t),r}eIe.exports=VIt});var DX=ye((hgr,aIe)=>{"use strict";var s1=pf(),GIt=ec(),RX=Tu(),LX=df().axisHoverFormat,{hovertemplateAttrs:HIt,texttemplateAttrs:jIt,templatefallbackAttrs:rIe}=Ll(),iIe=Gl(),WIt=SX(),XIt=iF(),$g=Ao().extendFlat,ZIt=mc().overrideAll,nIe=t_(),YIt=s1.line,J2=s1.marker,KIt=J2.line,JIt=$g({width:YIt.width,dash:{valType:"enumerated",values:nIe(WIt),dflt:"solid"}},RX("line"));function PX(e){return{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}}}var IX=aIe.exports=ZIt({x:s1.x,y:s1.y,z:{valType:"data_array"},text:$g({},s1.text,{}),texttemplate:jIt(),texttemplatefallback:rIe({editType:"calc"}),hovertext:$g({},s1.hovertext,{}),hovertemplate:HIt(),hovertemplatefallback:rIe(),xhoverformat:LX("x"),yhoverformat:LX("y"),zhoverformat:LX("z"),mode:$g({},s1.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:PX("x"),y:PX("y"),z:PX("z")},connectgaps:s1.connectgaps,line:JIt,marker:$g({symbol:{valType:"enumerated",values:nIe(XIt),dflt:"circle",arrayOk:!0},size:$g({},J2.size,{dflt:8}),sizeref:J2.sizeref,sizemin:J2.sizemin,sizemode:J2.sizemode,opacity:$g({},J2.opacity,{arrayOk:!1}),colorbar:J2.colorbar,line:$g({width:$g({},KIt.width,{arrayOk:!1})},RX("marker.line"))},RX("marker")),textposition:$g({},s1.textposition,{dflt:"top center"}),textfont:GIt({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:iIe.opacity,hoverinfo:$g({},iIe.hoverinfo)},"calc","nested");IX.x.editType=IX.y.editType=IX.z.editType="calc+clearAxisTypes"});var lIe=ye((dgr,sIe)=>{"use strict";var oIe=qa(),$It=Dr(),FX=Ru(),QIt=$p(),e8t=D0(),t8t=F0(),r8t=DX();sIe.exports=function(t,r,n,i){function a(d,v){return $It.coerce(t,r,r8t,d,v)}var o=i8t(t,r,a,i);if(!o){r.visible=!1;return}a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),a("mode"),FX.hasMarkers(r)&&QIt(t,r,n,i,a,{noAngle:!0,noLineDash:!0,noSelect:!0}),FX.hasLines(r)&&(a("connectgaps"),e8t(t,r,n,i,a)),FX.hasText(r)&&(a("texttemplate"),a("texttemplatefallback"),t8t(t,r,i,a,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var s=(r.line||{}).color,l=(r.marker||{}).color;a("surfaceaxis")>=0&&a("surfacecolor",s||l);for(var u=["x","y","z"],c=0;c<3;++c){var f="projection."+u[c];a(f+".show")&&(a(f+".opacity"),a(f+".scale"))}var h=oIe.getComponentMethod("errorbars","supplyDefaults");h(t,r,s||l||n,{axis:"z"}),h(t,r,s||l||n,{axis:"y",inherit:"z"}),h(t,r,s||l||n,{axis:"x",inherit:"z"})};function i8t(e,t,r,n){var i=0,a=r("x"),o=r("y"),s=r("z"),l=oIe.getComponentMethod("calendars","handleTraceDefaults");return l(e,t,["x","y","z"],n),a&&o&&s&&(i=Math.min(a.length,o.length,s.length),t._length=t._xlength=t._ylength=t._zlength=i),i}});var cIe=ye((vgr,uIe)=>{"use strict";var n8t=Rm(),a8t=z0();uIe.exports=function(t,r){var n=[{x:!1,y:!1,trace:r,t:{}}];return n8t(n,r),a8t(t,r),n}});var hIe=ye((pgr,fIe)=>{fIe.exports=o8t;function o8t(e,t){if(typeof e!="string")throw new TypeError("must specify type string");if(t=t||{},typeof document=="undefined"&&!t.canvas)return null;var r=t.canvas||document.createElement("canvas");typeof t.width=="number"&&(r.width=t.width),typeof t.height=="number"&&(r.height=t.height);var n=t,i;try{var a=[e];e.indexOf("webgl")===0&&a.push("experimental-"+e);for(var o=0;o{var s8t=hIe();dIe.exports=function(t){return s8t("webgl",t)}});var zX=ye((mgr,gIe)=>{"use strict";var pIe=ka(),l8t=function(){};gIe.exports=function(t){for(var r in t)typeof t[r]=="function"&&(t[r]=l8t);t.destroy=function(){t.container.parentNode.removeChild(t.container)};var n=document.createElement("div");n.className="no-webgl",n.style.cursor="pointer",n.style.fontSize="24px",n.style.color=pIe.defaults[0],n.style.position="absolute",n.style.left=n.style.top="0px",n.style.width=n.style.height="100%",n.style["background-color"]=pIe.lightLine,n.style["z-index"]=30;var i=document.createElement("p");return i.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",i.style.position="relative",i.style.top="50%",i.style.left="50%",i.style.height="30%",i.style.width="50%",i.style.margin="-15% 0 0 -25%",n.appendChild(i),t.container.appendChild(n),t.container.style.background="#FFFFFF",t.container.onclick=function(){window.open("https://get.webgl.org")},!1}});var _Ie=ye((ygr,yIe)=>{"use strict";var $2=n1(),u8t=Dr(),c8t=["xaxis","yaxis","zaxis"];function mIe(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickFontWeight=["normal","normal","normal","normal"],this.tickFontStyle=["normal","normal","normal","normal"],this.tickFontVariant=["normal","normal","normal","normal"],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["Open Sans","Open Sans","Open Sans"],this.labelSize=[20,20,20],this.labelFontWeight=["normal","normal","normal","normal"],this.labelFontStyle=["normal","normal","normal","normal"],this.labelFontVariant=["normal","normal","normal","normal"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[10,10,10],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}var f8t=mIe.prototype;f8t.merge=function(e,t){for(var r=this,n=0;n<3;++n){var i=t[c8t[n]];if(!i.visible){r.tickEnable[n]=!1,r.labelEnable[n]=!1,r.lineEnable[n]=!1,r.lineTickEnable[n]=!1,r.gridEnable[n]=!1,r.zeroEnable[n]=!1,r.backgroundEnable[n]=!1;continue}r.labels[n]=e._meta?u8t.templateString(i.title.text,e._meta):i.title.text,"font"in i.title&&(i.title.font.color&&(r.labelColor[n]=$2(i.title.font.color)),i.title.font.family&&(r.labelFont[n]=i.title.font.family),i.title.font.size&&(r.labelSize[n]=i.title.font.size),i.title.font.weight&&(r.labelFontWeight[n]=i.title.font.weight),i.title.font.style&&(r.labelFontStyle[n]=i.title.font.style),i.title.font.variant&&(r.labelFontVariant[n]=i.title.font.variant)),"showline"in i&&(r.lineEnable[n]=i.showline),"linecolor"in i&&(r.lineColor[n]=$2(i.linecolor)),"linewidth"in i&&(r.lineWidth[n]=i.linewidth),"showgrid"in i&&(r.gridEnable[n]=i.showgrid),"gridcolor"in i&&(r.gridColor[n]=$2(i.gridcolor)),"gridwidth"in i&&(r.gridWidth[n]=i.gridwidth),i.type==="log"?r.zeroEnable[n]=!1:"zeroline"in i&&(r.zeroEnable[n]=i.zeroline),"zerolinecolor"in i&&(r.zeroLineColor[n]=$2(i.zerolinecolor)),"zerolinewidth"in i&&(r.zeroLineWidth[n]=i.zerolinewidth),"ticks"in i&&i.ticks?r.lineTickEnable[n]=!0:r.lineTickEnable[n]=!1,"ticklen"in i&&(r.lineTickLength[n]=r._defaultLineTickLength[n]=i.ticklen),"tickcolor"in i&&(r.lineTickColor[n]=$2(i.tickcolor)),"tickwidth"in i&&(r.lineTickWidth[n]=i.tickwidth),"tickangle"in i&&(r.tickAngle[n]=i.tickangle==="auto"?-3600:Math.PI*-i.tickangle/180),"showticklabels"in i&&(r.tickEnable[n]=i.showticklabels),"tickfont"in i&&(i.tickfont.color&&(r.tickColor[n]=$2(i.tickfont.color)),i.tickfont.family&&(r.tickFont[n]=i.tickfont.family),i.tickfont.size&&(r.tickSize[n]=i.tickfont.size),i.tickfont.weight&&(r.tickFontWeight[n]=i.tickfont.weight),i.tickfont.style&&(r.tickFontStyle[n]=i.tickfont.style),i.tickfont.variant&&(r.tickFontVariant[n]=i.tickfont.variant)),"mirror"in i?["ticks","all","allticks"].indexOf(i.mirror)!==-1?(r.lineTickMirror[n]=!0,r.lineMirror[n]=!0):i.mirror===!0?(r.lineTickMirror[n]=!1,r.lineMirror[n]=!0):(r.lineTickMirror[n]=!1,r.lineMirror[n]=!1):r.lineMirror[n]=!1,"showbackground"in i&&i.showbackground!==!1?(r.backgroundEnable[n]=!0,r.backgroundColor[n]=$2(i.backgroundcolor)):r.backgroundEnable[n]=!1}};function h8t(e,t){var r=new mIe;return r.merge(e,t),r}yIe.exports=h8t});var wIe=ye((_gr,bIe)=>{"use strict";var d8t=n1(),v8t=["xaxis","yaxis","zaxis"];function xIe(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}var p8t=xIe.prototype;p8t.merge=function(e){for(var t=0;t<3;++t){var r=e[v8t[t]];if(!r.visible){this.enabled[t]=!1,this.drawSides[t]=!1;continue}this.enabled[t]=r.showspikes,this.colors[t]=d8t(r.spikecolor),this.drawSides[t]=r.spikesides,this.lineWidth[t]=r.spikethickness}};function g8t(e){var t=new xIe;return t.merge(e),t}bIe.exports=g8t});var SIe=ye((xgr,AIe)=>{"use strict";AIe.exports=b8t;var TIe=ho(),m8t=Dr(),y8t=["xaxis","yaxis","zaxis"],_8t=[0,0,0];function x8t(e){for(var t=new Array(3),r=0;r<3;++r){for(var n=e[r],i=new Array(n.length),a=0;a/g," "));i[a]=u,o.tickmode=s}}t.ticks=i;for(var a=0;a<3;++a){_8t[a]=.5*(e.glplot.bounds[0][a]+e.glplot.bounds[1][a]);for(var c=0;c<2;++c)t.bounds[c][a]=e.glplot.bounds[c][a]}e.contourLevels=x8t(i)}});var IIe=ye((bgr,PIe)=>{"use strict";var kIe=zd().gl_plot3d,w8t=kIe.createCamera,MIe=kIe.createScene,T8t=vIe(),A8t=UL(),sF=qa(),cp=Dr(),oF=cp.preserveDrawingBuffer(),lF=ho(),Qg=vf(),S8t=n1(),M8t=zX(),E8t=XU(),k8t=_Ie(),C8t=wIe(),L8t=SIe(),P8t=Mg().applyAutorangeOptions,ik,aF,CIe=!1;function LIe(e,t){var r=document.createElement("div"),n=e.container;this.graphDiv=e.graphDiv;var i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.style.position="absolute",i.style.top=i.style.left="0px",i.style.width=i.style.height="100%",i.style["z-index"]=20,i.style["pointer-events"]="none",r.appendChild(i),this.svgContainer=i,r.id=e.id,r.style.position="absolute",r.style.top=r.style.left="0px",r.style.width=r.style.height="100%",n.appendChild(r),this.fullLayout=t,this.id=e.id||"scene",this.fullSceneLayout=t[this.id],this.plotArgs=[[],{},{}],this.axesOptions=k8t(t,t[this.id]),this.spikeOptions=C8t(t[this.id]),this.container=r,this.staticMode=!!e.staticPlot,this.pixelRatio=this.pixelRatio||e.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=sF.getComponentMethod("annotations3d","convert"),this.drawAnnotations=sF.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var Sv=LIe.prototype;Sv.prepareOptions=function(){var e=this,t={canvas:e.canvas,gl:e.gl,glOptions:{preserveDrawingBuffer:oF,premultipliedAlpha:!0,antialias:!0},container:e.container,axes:e.axesOptions,spikes:e.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:e.camera,pixelRatio:e.pixelRatio};if(e.staticMode){if(!aF&&(ik=document.createElement("canvas"),aF=T8t({canvas:ik,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!aF))throw new Error("error creating static canvas/context for image server");t.gl=aF,t.canvas=ik}return t};var EIe=!0;Sv.tryCreatePlot=function(){var e=this,t=e.prepareOptions(),r=!0;try{e.glplot=MIe(t)}catch(n){if(e.staticMode||!EIe||oF)r=!1;else{cp.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{oF=t.glOptions.preserveDrawingBuffer=!0,e.glplot=MIe(t)}catch(i){oF=t.glOptions.preserveDrawingBuffer=!1,r=!1}}}return EIe=!1,r};Sv.initializeGLCamera=function(){var e=this,t=e.fullSceneLayout.camera,r=t.projection.type==="orthographic";e.camera=w8t(e.container,{center:[t.center.x,t.center.y,t.center.z],eye:[t.eye.x,t.eye.y,t.eye.z],up:[t.up.x,t.up.y,t.up.z],_ortho:r,zoomMin:.01,zoomMax:100,mode:"orbit"})};Sv.initializeGLPlot=function(){var e=this;e.initializeGLCamera();var t=e.tryCreatePlot();if(!t)return M8t(e);e.traces={},e.make4thDimension();var r=e.graphDiv,n=r.layout,i=function(){var o={};return e.isCameraChanged(n)&&(o[e.id+".camera"]=e.getCamera()),e.isAspectChanged(n)&&(o[e.id+".aspectratio"]=e.glplot.getAspectratio(),n[e.id].aspectmode!=="manual"&&(e.fullSceneLayout.aspectmode=n[e.id].aspectmode=o[e.id+".aspectmode"]="manual")),o},a=function(o){if(o.fullSceneLayout.dragmode!==!1){var s=i();o.saveLayout(n),o.graphDiv.emit("plotly_relayout",s)}};return e.glplot.canvas&&(e.glplot.canvas.addEventListener("mouseup",function(){a(e)}),e.glplot.canvas.addEventListener("touchstart",function(){CIe=!0}),e.glplot.canvas.addEventListener("wheel",function(o){if(r._context._scrollZoom.gl3d){if(e.camera._ortho){var s=o.deltaX>o.deltaY?1.1:.9090909090909091,l=e.glplot.getAspectratio();e.glplot.setAspectratio({x:s*l.x,y:s*l.y,z:s*l.z})}a(e)}},A8t?{passive:!1}:!1),e.glplot.canvas.addEventListener("mousemove",function(){if(e.fullSceneLayout.dragmode!==!1&&e.camera.mouseListener.buttons!==0){var o=i();e.graphDiv.emit("plotly_relayouting",o)}}),e.staticMode||e.glplot.canvas.addEventListener("webglcontextlost",function(o){r&&r.emit&&r.emit("plotly_webglcontextlost",{event:o,layer:e.id})},!1)),e.glplot.oncontextloss=function(){e.recoverContext()},e.glplot.onrender=function(){e.render()},!0};Sv.render=function(){var e=this,t=e.graphDiv,r,n=e.svgContainer,i=e.container.getBoundingClientRect();t._fullLayout._calcInverseTransform(t);var a=t._fullLayout._invScaleX,o=t._fullLayout._invScaleY,s=i.width*a,l=i.height*o;n.setAttributeNS(null,"viewBox","0 0 "+s+" "+l),n.setAttributeNS(null,"width",s),n.setAttributeNS(null,"height",l),L8t(e),e.glplot.axes.update(e.axesOptions);for(var u=Object.keys(e.traces),c=null,f=e.glplot.selection,h=0;h")):r.type==="isosurface"||r.type==="volume"?(p.valueLabel=lF.hoverLabelText(e._mockAxis,e._mockAxis.d2l(f.traceCoordinate[3]),r.valuehoverformat),x.push("value: "+p.valueLabel),f.textLabel&&x.push(f.textLabel),L=x.join("
")):L=f.textLabel;var C={x:f.traceCoordinate[0],y:f.traceCoordinate[1],z:f.traceCoordinate[2],data:_._input,fullData:_,curveNumber:_.index,pointNumber:b};Qg.appendArrayPointValue(C,_,b),r._module.eventData&&(C=_._module.eventData(C,f,_,{},b));var M={points:[C]};if(e.fullSceneLayout.hovermode){var g=[];Qg.loneHover({trace:_,x:(.5+.5*v[0]/v[3])*s,y:(.5-.5*v[1]/v[3])*l,xLabel:p.xLabel,yLabel:p.yLabel,zLabel:p.zLabel,text:L,name:c.name,color:Qg.castHoverOption(_,b,"bgcolor")||c.color,borderColor:Qg.castHoverOption(_,b,"bordercolor"),fontFamily:Qg.castHoverOption(_,b,"font.family"),fontSize:Qg.castHoverOption(_,b,"font.size"),fontColor:Qg.castHoverOption(_,b,"font.color"),nameLength:Qg.castHoverOption(_,b,"namelength"),textAlign:Qg.castHoverOption(_,b,"align"),hovertemplate:cp.castOption(_,b,"hovertemplate"),hovertemplateLabels:cp.extendFlat({},C,p),eventData:[C]},{container:n,gd:t,inOut_bbox:g}),C.bbox=g[0]}f.distance<5&&(f.buttons||CIe)?t.emit("plotly_click",M):t.emit("plotly_hover",M),this.oldEventData=M}else Qg.loneUnhover(n),this.oldEventData&&t.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)};Sv.recoverContext=function(){var e=this;e.glplot.dispose();var t=function(){if(e.glplot.gl.isContextLost()){requestAnimationFrame(t);return}if(!e.initializeGLPlot()){cp.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}e.plot.apply(e,e.plotArgs)};requestAnimationFrame(t)};var nk=["xaxis","yaxis","zaxis"];function I8t(e,t,r){for(var n=e.fullSceneLayout,i=0;i<3;i++){var a=nk[i],o=a.charAt(0),s=n[a],l=t[o],u=t[o+"calendar"],c=t["_"+o+"length"];if(!cp.isArrayOrTypedArray(l))r[0][i]=Math.min(r[0][i],0),r[1][i]=Math.max(r[1][i],c-1);else for(var f,h=0;h<(c||l.length);h++)if(cp.isArrayOrTypedArray(l[h]))for(var d=0;d_[1][o])_[0][o]=-1,_[1][o]=1;else{var A=_[1][o]-_[0][o];_[0][o]-=A/32,_[1][o]+=A/32}if(k=[_[0][o],_[1][o]],k=P8t(k,l),_[0][o]=k[0],_[1][o]=k[1],l.isReversed()){var z=_[0][o];_[0][o]=_[1][o],_[1][o]=z}}else k=l.range,_[0][o]=l.r2l(k[0]),_[1][o]=l.r2l(k[1]);_[0][o]===_[1][o]&&(_[0][o]-=1,_[1][o]+=1),b[o]=_[1][o]-_[0][o],l.range=[_[0][o],_[1][o]],l.limitRange(),n.glplot.setBounds(o,{min:l.range[0]*d[o],max:l.range[1]*d[o]})}var O,U=c.aspectmode;if(U==="cube")O=[1,1,1];else if(U==="manual"){var G=c.aspectratio;O=[G.x,G.y,G.z]}else if(U==="auto"||U==="data"){var Z=[1,1,1];for(o=0;o<3;++o){l=c[nk[o]],u=l.type;var j=p[u];Z[o]=Math.pow(j.acc,1/j.count)/d[o]}U==="data"||Math.max.apply(null,Z)/Math.min.apply(null,Z)<=4?O=Z:O=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");c.aspectratio.x=f.aspectratio.x=O[0],c.aspectratio.y=f.aspectratio.y=O[1],c.aspectratio.z=f.aspectratio.z=O[2],n.glplot.setAspectratio(c.aspectratio),n.viewInitial.aspectratio||(n.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),n.viewInitial.aspectmode||(n.viewInitial.aspectmode=c.aspectmode);var N=c.domain||null,H=t._size||null;if(N&&H){var re=n.container.style;re.position="absolute",re.left=H.l+N.x[0]*H.w+"px",re.top=H.t+(1-N.y[1])*H.h+"px",re.width=H.w*(N.x[1]-N.x[0])+"px",re.height=H.h*(N.y[1]-N.y[0])+"px"}n.glplot.redraw()}};Sv.destroy=function(){var e=this;e.glplot&&(e.camera.mouseListener.enabled=!1,e.container.removeEventListener("wheel",e.camera.wheelListener),e.camera=null,e.glplot.dispose(),e.container.parentNode.removeChild(e.container),e.glplot=null)};function D8t(e){return[[e.eye.x,e.eye.y,e.eye.z],[e.center.x,e.center.y,e.center.z],[e.up.x,e.up.y,e.up.z]]}function F8t(e){return{up:{x:e.up[0],y:e.up[1],z:e.up[2]},center:{x:e.center[0],y:e.center[1],z:e.center[2]},eye:{x:e.eye[0],y:e.eye[1],z:e.eye[2]},projection:{type:e._ortho===!0?"orthographic":"perspective"}}}Sv.getCamera=function(){var e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),F8t(e.camera)};Sv.setViewport=function(e){var t=this,r=e.camera;t.camera.lookAt.apply(this,D8t(r)),t.glplot.setAspectratio(e.aspectratio);var n=r.projection.type==="orthographic",i=t.camera._ortho;n!==i&&(t.glplot.redraw(),t.glplot.clearRGBA(),t.glplot.dispose(),t.initializeGLPlot())};Sv.isCameraChanged=function(e){var t=this,r=t.getCamera(),n=cp.nestedProperty(e,t.id+".camera"),i=n.get();function a(u,c,f,h){var d=["up","center","eye"],v=["x","y","z"];return c[d[f]]&&u[d[f]][v[h]]===c[d[f]][v[h]]}var o=!1;if(i===void 0)o=!0;else{for(var s=0;s<3;s++)for(var l=0;l<3;l++)if(!a(r,i,s,l)){o=!0;break}(!i.projection||r.projection&&r.projection.type!==i.projection.type)&&(o=!0)}return o};Sv.isAspectChanged=function(e){var t=this,r=t.glplot.getAspectratio(),n=cp.nestedProperty(e,t.id+".aspectratio"),i=n.get();return i===void 0||i.x!==r.x||i.y!==r.y||i.z!==r.z};Sv.saveLayout=function(e){var t=this,r=t.fullLayout,n,i,a,o,s,l,u=t.isCameraChanged(e),c=t.isAspectChanged(e),f=u||c;if(f){var h={};if(u&&(n=t.getCamera(),i=cp.nestedProperty(e,t.id+".camera"),a=i.get(),h[t.id+".camera"]=a),c&&(o=t.glplot.getAspectratio(),s=cp.nestedProperty(e,t.id+".aspectratio"),l=s.get(),h[t.id+".aspectratio"]=l),sF.call("_storeDirectGUIEdit",e,r._preGUI,h),u){i.set(n);var d=cp.nestedProperty(r,t.id+".camera");d.set(n)}if(c){s.set(o);var v=cp.nestedProperty(r,t.id+".aspectratio");v.set(o),t.glplot.redraw()}}return f};Sv.updateFx=function(e,t){var r=this,n=r.camera;if(n)if(e==="orbit")n.mode="orbit",n.keyBindingMode="rotate";else if(e==="turntable"){n.up=[0,0,1],n.mode="turntable",n.keyBindingMode="rotate";var i=r.graphDiv,a=i._fullLayout,o=r.fullSceneLayout.camera,s=o.up.x,l=o.up.y,u=o.up.z;if(u/Math.sqrt(s*s+l*l+u*u)<.999){var c=r.id+".camera.up",f={x:0,y:0,z:1},h={};h[c]=f;var d=i.layout;sF.call("_storeDirectGUIEdit",d,a._preGUI,h),o.up=f,cp.nestedProperty(d,c).set(f)}}else n.keyBindingMode=e;r.fullSceneLayout.hovermode=t};function z8t(e,t,r){for(var n=0,i=r-1;n0)for(var s=255/o,l=0;l<3;++l)e[a+l]=Math.min(s*e[a+l],255)}}Sv.toImage=function(e){var t=this;e||(e="png"),t.staticMode&&t.container.appendChild(ik),t.glplot.redraw();var r=t.glplot.gl,n=r.drawingBufferWidth,i=r.drawingBufferHeight;r.bindFramebuffer(r.FRAMEBUFFER,null);var a=new Uint8Array(n*i*4);r.readPixels(0,0,n,i,r.RGBA,r.UNSIGNED_BYTE,a),z8t(a,n,i),O8t(a,n,i);var o=document.createElement("canvas");o.width=n,o.height=i;var s=o.getContext("2d",{willReadFrequently:!0}),l=s.createImageData(n,i);l.data.set(a),s.putImageData(l,0,0);var u;switch(e){case"jpeg":u=o.toDataURL("image/jpeg");break;case"webp":u=o.toDataURL("image/webp");break;default:u=o.toDataURL("image/png")}return t.staticMode&&t.container.removeChild(ik),u};Sv.setConvert=function(){for(var e=this,t=0;t<3;t++){var r=e.fullSceneLayout[nk[t]];lF.setConvert(r,e.fullLayout),r.setScale=cp.noop}};Sv.make4thDimension=function(){var e=this,t=e.graphDiv,r=t._fullLayout;e._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},lF.setConvert(e._mockAxis,r)};PIe.exports=LIe});var DIe=ye((wgr,RIe)=>{"use strict";RIe.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}});var qX=ye((Tgr,FIe)=>{"use strict";var q8t=ka(),xs=Rd(),OX=Ao().extendFlat,B8t=mc().overrideAll;FIe.exports=B8t({visible:xs.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:q8t.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:xs.color,categoryorder:xs.categoryorder,categoryarray:xs.categoryarray,title:{text:xs.title.text,font:xs.title.font},type:OX({},xs.type,{values:["-","linear","log","date","category"]}),autotypenumbers:xs.autotypenumbers,autorange:xs.autorange,autorangeoptions:{minallowed:xs.autorangeoptions.minallowed,maxallowed:xs.autorangeoptions.maxallowed,clipmin:xs.autorangeoptions.clipmin,clipmax:xs.autorangeoptions.clipmax,include:xs.autorangeoptions.include,editType:"plot"},rangemode:xs.rangemode,minallowed:xs.minallowed,maxallowed:xs.maxallowed,range:OX({},xs.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:xs.minor.tickmode,nticks:xs.nticks,tick0:xs.tick0,dtick:xs.dtick,tickvals:xs.tickvals,ticktext:xs.ticktext,ticks:xs.ticks,mirror:xs.mirror,ticklen:xs.ticklen,tickwidth:xs.tickwidth,tickcolor:xs.tickcolor,showticklabels:xs.showticklabels,labelalias:xs.labelalias,tickfont:xs.tickfont,tickangle:xs.tickangle,tickprefix:xs.tickprefix,showtickprefix:xs.showtickprefix,ticksuffix:xs.ticksuffix,showticksuffix:xs.showticksuffix,showexponent:xs.showexponent,exponentformat:xs.exponentformat,minexponent:xs.minexponent,separatethousands:xs.separatethousands,tickformat:xs.tickformat,tickformatstops:xs.tickformatstops,hoverformat:xs.hoverformat,showline:xs.showline,linecolor:xs.linecolor,linewidth:xs.linewidth,showgrid:xs.showgrid,gridcolor:OX({},xs.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:xs.gridwidth,zeroline:xs.zeroline,zerolinecolor:xs.zerolinecolor,zerolinewidth:xs.zerolinewidth},"plot","from-root")});var VX=ye((Agr,zIe)=>{"use strict";var BX=qX(),N8t=Cc().attributes,NX=Ao().extendFlat,U8t=Dr().counterRegex;function UX(e,t,r){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}zIe.exports={_arrayAttrRegexps:[U8t("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:NX(UX(0,0,1),{}),center:NX(UX(0,0,0),{}),eye:NX(UX(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:N8t({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:BX,yaxis:BX,zaxis:BX,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot"}});var NIe=ye((Sgr,BIe)=>{"use strict";var V8t=fd().mix,OIe=Dr(),G8t=vl(),H8t=qX(),j8t=PU(),W8t=f4(),qIe=["xaxis","yaxis","zaxis"],X8t=100*136/187;BIe.exports=function(t,r,n){var i,a;function o(u,c){return OIe.coerce(i,a,H8t,u,c)}for(var s=0;s{"use strict";var Z8t=Dr(),Y8t=ka(),K8t=qa(),J8t=O_(),$8t=NIe(),UIe=VX(),Q8t=Id().getSubplotData,VIe="gl3d";GIe.exports=function(t,r,n){var i=r._basePlotModules.length>1;function a(o){if(!i){var s=Z8t.validate(t[o],UIe[o]);if(s)return t[o]}}J8t(t,r,n,{type:VIe,attributes:UIe,handleDefaults:eRt,fullLayout:r,font:r.font,fullData:n,getDfltFromLayout:a,autotypenumbersDflt:r.autotypenumbers,paper_bgcolor:r.paper_bgcolor,calendar:r.calendar})};function eRt(e,t,r,n){for(var i=r("bgcolor"),a=Y8t.combine(i,n.paper_bgcolor),o=["up","center","eye"],s=0;s.999)&&(h="turntable")}else h="turntable";r("dragmode",h),r("hovermode",n.getDfltFromLayout("hovermode"))}});var sx=ye(fp=>{"use strict";var tRt=mc().overrideAll,rRt=W1(),iRt=IIe(),nRt=Id().getSubplotData,aRt=Dr(),oRt=Wp(),XA="gl3d",GX="scene";fp.name=XA;fp.attr=GX;fp.idRoot=GX;fp.idRegex=fp.attrRegex=aRt.counterRegex("scene");fp.attributes=DIe();fp.layoutAttributes=VX();fp.baseLayoutAttrOverrides=tRt({hoverlabel:rRt.hoverlabel},"plot","nested");fp.supplyLayoutDefaults=HIe();fp.plot=function(t){for(var r=t._fullLayout,n=t._fullData,i=r._subplots[XA],a=0;a{"use strict";jIe.exports={plot:tIe(),attributes:DX(),markerSymbols:iF(),supplyDefaults:lIe(),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:cIe(),moduleType:"trace",name:"scatter3d",basePlotModule:sx(),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}});var ZIe=ye((Cgr,XIe)=>{"use strict";XIe.exports=WIe()});var ak=ye((Lgr,JIe)=>{"use strict";var YIe=ka(),sRt=Tu(),HX=df().axisHoverFormat,{hovertemplateAttrs:lRt,templatefallbackAttrs:uRt}=Ll(),KIe=Gl(),jX=Ao().extendFlat,cRt=mc().overrideAll;function WX(e){return{valType:"boolean",dflt:!1}}function XX(e){return{show:{valType:"boolean",dflt:!1},start:{valType:"number",dflt:null,editType:"plot"},end:{valType:"number",dflt:null,editType:"plot"},size:{valType:"number",dflt:null,min:0,editType:"plot"},project:{x:WX("x"),y:WX("y"),z:WX("z")},color:{valType:"color",dflt:YIe.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:YIe.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var ZX=JIe.exports=cRt(jX({z:{valType:"data_array"},x:{valType:"data_array"},y:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:lRt(),hovertemplatefallback:uRt(),xhoverformat:HX("x"),yhoverformat:HX("y"),zhoverformat:HX("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},sRt("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:XX("x"),y:XX("y"),z:XX("z")},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05,description:"Represents the level that incident rays are reflected in a single direction, causing shine."},roughness:{valType:"number",min:0,max:1,dflt:.5,description:"Alters specular reflection; the rougher the surface, the wider and less contrasty the shine."},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},hoverinfo:jX({},KIe.hoverinfo),showlegend:jX({},KIe.showlegend,{dflt:!1})}),"calc","nested");ZX.x.editType=ZX.y.editType=ZX.z.editType="calc+clearAxisTypes"});var KX=ye((Pgr,e8e)=>{"use strict";var fRt=qa(),$Ie=Dr(),hRt=td(),dRt=ak(),YX=.1;function vRt(e,t){for(var r=[],n=32,i=0;i{"use strict";var t8e=gv();r8e.exports=function(t,r){r.surfacecolor?t8e(t,r,{vals:r.surfacecolor,containerStr:"",cLetter:"c"}):t8e(t,r,{vals:r.z,containerStr:"",cLetter:"c"})}});var u8e=ye((Rgr,l8e)=>{"use strict";var mRt=zd().gl_surface3d,ZA=zd().ndarray,yRt=zd().ndarray_linear_interpolate.d2,_Rt=c8(),xRt=f8(),ok=Dr().isArrayOrTypedArray,bRt=a1().parseColorScale,n8e=n1(),wRt=tc().extractOpts;function o8e(e,t,r){this.scene=e,this.uid=r,this.surface=t,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var em=o8e.prototype;em.getXat=function(e,t,r,n){var i=ok(this.data.x)?ok(this.data.x[0])?this.data.x[t][e]:this.data.x[e]:e;return r===void 0?i:n.d2l(i,0,r)};em.getYat=function(e,t,r,n){var i=ok(this.data.y)?ok(this.data.y[0])?this.data.y[t][e]:this.data.y[t]:t;return r===void 0?i:n.d2l(i,0,r)};em.getZat=function(e,t,r,n){var i=this.data.z[t][e];return i===null&&this.data.connectgaps&&this.data._interpolatedZ&&(i=this.data._interpolatedZ[t][e]),r===void 0?i:n.d2l(i,0,r)};em.handlePick=function(e){if(e.object===this.surface){var t=(e.data.index[0]-1)/this.dataScaleX-1,r=(e.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(t),this.data.z[0].length-1),0),i=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);e.index=[n,i],e.traceCoordinate=[this.getXat(n,i),this.getYat(n,i),this.getZat(n,i)],e.dataCoordinate=[this.getXat(n,i,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(n,i,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(n,i,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var a=0;a<3;a++){var o=e.dataCoordinate[a];o!=null&&(e.dataCoordinate[a]*=this.scene.dataScale[a])}var s=this.data.hovertext||this.data.text;return ok(s)&&s[i]&&s[i][n]!==void 0?e.textLabel=s[i][n]:s?e.textLabel=s:e.textLabel="",e.data.dataCoordinate=e.dataCoordinate.slice(),this.surface.highlight(e.data),this.scene.glplot.spikes.position=e.dataCoordinate,!0}};function TRt(e){var t=e[0].rgb,r=e[e.length-1].rgb;return t[0]===r[0]&&t[1]===r[1]&&t[2]===r[2]&&t[3]===r[3]}var YA=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function ARt(e,t){if(e0){r=YA[n];break}return r}function MRt(e,t){if(!(e<1||t<1)){for(var r=JX(e),n=JX(t),i=1,a=0;auF;)n--,n/=SRt(n),n++,n1?i:1};function kRt(e,t,r){var n=r[8]+r[2]*t[0]+r[5]*t[1];return e[0]=(r[6]+r[0]*t[0]+r[3]*t[1])/n,e[1]=(r[7]+r[1]*t[0]+r[4]*t[1])/n,e}function CRt(e,t,r){return LRt(e,t,kRt,r),e}function LRt(e,t,r,n){for(var i=[0,0],a=e.shape[0],o=e.shape[1],s=0;s0&&this.contourStart[n]!==null&&this.contourEnd[n]!==null&&this.contourEnd[n]>this.contourStart[n]))for(t[n]=!0,i=this.contourStart[n];ih&&(this.minValues[u]=h),this.maxValues[u]{"use strict";c8e.exports={attributes:ak(),supplyDefaults:KX().supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:i8e(),plot:u8e(),moduleType:"trace",name:"surface",basePlotModule:sx(),categories:["gl3d","2dMap","showLegend"],meta:{}}});var d8e=ye((Fgr,h8e)=>{"use strict";h8e.exports=f8e()});var KA=ye((zgr,p8e)=>{"use strict";var RRt=Tu(),$X=df().axisHoverFormat,{hovertemplateAttrs:DRt,templatefallbackAttrs:FRt}=Ll(),lx=ak(),v8e=Gl(),ux=Ao().extendFlat;p8e.exports=ux({x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},i:{valType:"data_array",editType:"calc"},j:{valType:"data_array",editType:"calc"},k:{valType:"data_array",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:DRt({editType:"calc"}),hovertemplatefallback:FRt({editType:"calc"}),xhoverformat:$X("x"),yhoverformat:$X("y"),zhoverformat:$X("z"),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"}},RRt("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:lx.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:ux({},lx.contours.x.show,{}),color:lx.contours.x.color,width:lx.contours.x.width,editType:"calc"},lightposition:{x:ux({},lx.lightposition.x,{dflt:1e5}),y:ux({},lx.lightposition.y,{dflt:1e5}),z:ux({},lx.lightposition.z,{dflt:0}),editType:"calc"},lighting:ux({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc",description:"Epsilon for vertex normals calculation avoids math issues arising from degenerate geometry."},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc",description:"Epsilon for face normals calculation avoids math issues arising from degenerate geometry."},editType:"calc"},lx.lighting),hoverinfo:ux({},v8e.hoverinfo,{editType:"calc"}),showlegend:ux({},v8e.showlegend,{dflt:!1})})});var fF=ye((Ogr,m8e)=>{"use strict";var zRt=Tu(),cF=df().axisHoverFormat,{hovertemplateAttrs:ORt,templatefallbackAttrs:qRt}=Ll(),sk=KA(),g8e=Gl(),QX=Ao().extendFlat,BRt=mc().overrideAll;function eZ(e){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function tZ(e){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var JA=m8e.exports=BRt(QX({x:{valType:"data_array"},y:{valType:"data_array"},z:{valType:"data_array"},value:{valType:"data_array"},isomin:{valType:"number"},isomax:{valType:"number"},surface:{show:{valType:"boolean",dflt:!0},count:{valType:"integer",dflt:2,min:1},fill:{valType:"number",min:0,max:1,dflt:1},pattern:{valType:"flaglist",flags:["A","B","C","D","E"],extras:["all","odd","even"],dflt:"all"}},spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:.15}},slices:{x:eZ("x"),y:eZ("y"),z:eZ("z")},caps:{x:tZ("x"),y:tZ("y"),z:tZ("z")},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:ORt(),hovertemplatefallback:qRt(),xhoverformat:cF("x"),yhoverformat:cF("y"),zhoverformat:cF("z"),valuehoverformat:cF("value",1),showlegend:QX({},g8e.showlegend,{dflt:!1})},zRt("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:sk.opacity,lightposition:sk.lightposition,lighting:sk.lighting,flatshading:sk.flatshading,contour:sk.contour,hoverinfo:QX({},g8e.hoverinfo)}),"calc","nested");JA.flatshading.dflt=!0;JA.lighting.facenormalsepsilon.dflt=0;JA.x.editType=JA.y.editType=JA.z.editType=JA.value.editType="calc+clearAxisTypes"});var rZ=ye((qgr,_8e)=>{"use strict";var NRt=Dr(),URt=qa(),VRt=fF(),GRt=td();function HRt(e,t,r,n){function i(a,o){return NRt.coerce(e,t,VRt,a,o)}y8e(e,t,r,n,i)}function y8e(e,t,r,n,i){var a=i("isomin"),o=i("isomax");o!=null&&a!==void 0&&a!==null&&a>o&&(t.isomin=null,t.isomax=null);var s=i("x"),l=i("y"),u=i("z"),c=i("value");if(!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length){t.visible=!1;return}var f=URt.getComponentMethod("calendars","handleTraceDefaults");f(e,t,["x","y","z"],n),i("valuehoverformat"),["x","y","z"].forEach(function(_){i(_+"hoverformat");var b="caps."+_,p=i(b+".show");p&&i(b+".fill");var k="slices."+_,E=i(k+".show");E&&(i(k+".fill"),i(k+".locations"))});var h=i("spaceframe.show");h&&i("spaceframe.fill");var d=i("surface.show");d&&(i("surface.count"),i("surface.fill"),i("surface.pattern"));var v=i("contour.show");v&&(i("contour.color"),i("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach(function(_){i(_)}),GRt(e,t,n,i,{prefix:"",cLetter:"c"}),t._length=null}_8e.exports={supplyDefaults:HRt,supplyIsoDefaults:y8e}});var hF=ye((Bgr,b8e)=>{"use strict";var nZ=Dr(),jRt=gv();function WRt(e,t){t._len=Math.min(t.u.length,t.v.length,t.w.length,t.x.length,t.y.length,t.z.length),t._u=Jm(t.u,t._len),t._v=Jm(t.v,t._len),t._w=Jm(t.w,t._len),t._x=Jm(t.x,t._len),t._y=Jm(t.y,t._len),t._z=Jm(t.z,t._len);var r=x8e(t);t._gridFill=r.fill,t._Xs=r.Xs,t._Ys=r.Ys,t._Zs=r.Zs,t._len=r.len;var n=0,i,a,o;t.starts&&(i=Jm(t.starts.x||[]),a=Jm(t.starts.y||[]),o=Jm(t.starts.z||[]),n=Math.min(i.length,a.length,o.length)),t._startsX=i||[],t._startsY=a||[],t._startsZ=o||[];var s=0,l=1/0,u;for(u=0;u1&&(E=t[i-1],L=r[i-1],C=n[i-1]),a=0;aE?"-":"+")+"x"),v=v.replace("y",(T>L?"-":"+")+"y"),v=v.replace("z",(x>C?"-":"+")+"z");var A=function(){i=0,M=[],g=[],P=[]};(!i||i{"use strict";var XRt=gv(),ZRt=hF().processGrid,dF=hF().filter;w8e.exports=function(t,r){r._len=Math.min(r.x.length,r.y.length,r.z.length,r.value.length),r._x=dF(r.x,r._len),r._y=dF(r.y,r._len),r._z=dF(r.z,r._len),r._value=dF(r.value,r._len);var n=ZRt(r);r._gridFill=n.fill,r._Xs=n.Xs,r._Ys=n.Ys,r._Zs=n.Zs,r._len=n.len;for(var i=1/0,a=-1/0,o=0;o{"use strict";T8e.exports=function(t,r,n,i){i=i||t.length;for(var a=new Array(i),o=0;o{"use strict";var YRt=zd().gl_mesh3d,KRt=a1().parseColorScale,JRt=Dr().isArrayOrTypedArray,$Rt=n1(),QRt=tc().extractOpts,A8e=$A(),lk=function(e,t){for(var r=t.length-1;r>0;r--){var n=Math.min(t[r],t[r-1]),i=Math.max(t[r],t[r-1]);if(i>n&&n-1}function oe(Qt,Gt){return Qt===null?Gt:Qt}function _e(Qt,Gt,_t){A();var It=[Gt],mt=[_t];if(j>=1)It=[Gt],mt=[_t];else if(j>0){var er=H(Gt,_t);It=er.xyzv,mt=er.abc}for(var lr=0;lr-1?_t[Lr]:P(ti,Br,Vr);Ge>-1?wr[Lr]=Ge:wr[Lr]=O(ti,Br,Vr,oe(Qt,dt))}U(wr[0],wr[1],wr[2])}}function Ce(Qt,Gt,_t){var It=function(mt,er,lr){_e(Qt,[Gt[mt],Gt[er],Gt[lr]],[_t[mt],_t[er],_t[lr]])};It(0,1,2),It(2,3,0)}function Le(Qt,Gt,_t){var It=function(mt,er,lr){_e(Qt,[Gt[mt],Gt[er],Gt[lr]],[_t[mt],_t[er],_t[lr]])};It(0,1,2),It(3,0,1),It(2,3,0),It(1,2,3)}function ge(Qt,Gt,_t,It){var mt=Qt[3];mt<_t&&(mt=_t),mt>It&&(mt=It);for(var er=(Qt[3]-mt)/(Qt[3]-Gt[3]+1e-9),lr=[],wr=0;wr<4;wr++)lr[wr]=(1-er)*Qt[wr]+er*Gt[wr];return lr}function ie(Qt,Gt,_t){return Qt>=Gt&&Qt<=_t}function Se(Qt){var Gt=.001*(L-T);return Qt>=T-Gt&&Qt<=L+Gt}function Ee(Qt){for(var Gt=[],_t=0;_t<4;_t++){var It=Qt[_t];Gt.push([e._x[It],e._y[It],e._z[It],e._value[It]])}return Gt}var Ae=3;function Be(Qt,Gt,_t,It,mt,er){er||(er=1),_t=[-1,-1,-1];var lr=!1,wr=[ie(Gt[0][3],It,mt),ie(Gt[1][3],It,mt),ie(Gt[2][3],It,mt)];if(!wr[0]&&!wr[1]&&!wr[2])return!1;var Lr=function(Br,Vr,dt){return Se(Vr[0][3])&&Se(Vr[1][3])&&Se(Vr[2][3])?(_e(Br,Vr,dt),!0):erwr?[k,er]:[er,E];Nt(Gt,Lr[0],Lr[1])}}var ti=[[Math.min(T,E),Math.max(T,E)],[Math.min(k,L),Math.max(k,L)]];["x","y","z"].forEach(function(Br){for(var Vr=[],dt=0;dt0&&(Ie.push(vt.id),Br==="x"?xe.push([vt.distRatio,0,0]):Br==="y"?xe.push([0,vt.distRatio,0]):xe.push([0,0,vt.distRatio]))}else Br==="x"?xt=fr(1,d-1):Br==="y"?xt=fr(1,v-1):xt=fr(1,_-1);Ie.length>0&&(Br==="x"?Vr[Ge]=$t(Qt,Ie,Je,We,xe,Vr[Ge]):Br==="y"?Vr[Ge]=sr(Qt,Ie,Je,We,xe,Vr[Ge]):Vr[Ge]=Tr(Qt,Ie,Je,We,xe,Vr[Ge]),Ge++),xt.length>0&&(Br==="x"?Vr[Ge]=pt(Qt,xt,Je,We,Vr[Ge]):Br==="y"?Vr[Ge]=Vt(Qt,xt,Je,We,Vr[Ge]):Vr[Ge]=ot(Qt,xt,Je,We,Vr[Ge]),Ge++)}var ir=e.caps[Br];ir.show&&ir.fill&&(N(ir.fill),Br==="x"?Vr[Ge]=pt(Qt,[0,d-1],Je,We,Vr[Ge]):Br==="y"?Vr[Ge]=Vt(Qt,[0,v-1],Je,We,Vr[Ge]):Vr[Ge]=ot(Qt,[0,_-1],Je,We,Vr[Ge]),Ge++)}}),s===0&&z(),e._meshX=x,e._meshY=C,e._meshZ=M,e._meshIntensity=g,e._Xs=c,e._Ys=f,e._Zs=h}return St(),e}function tDt(e,t){var r=e.glplot.gl,n=YRt({gl:r}),i=new S8e(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}E8e.exports={findNearestOnAxis:lk,generateIsoMeshes:M8e,createIsosurfaceTrace:tDt}});var C8e=ye((Ggr,k8e)=>{"use strict";k8e.exports={attributes:fF(),supplyDefaults:rZ().supplyDefaults,calc:aZ(),colorbar:{min:"cmin",max:"cmax"},plot:vF().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:sx(),categories:["gl3d","showLegend"],meta:{}}});var P8e=ye((Hgr,L8e)=>{"use strict";L8e.exports=C8e()});var lZ=ye((jgr,R8e)=>{"use strict";var rDt=Tu(),xh=fF(),iDt=ak(),I8e=Gl(),sZ=Ao().extendFlat,nDt=mc().overrideAll,pF=R8e.exports=nDt(sZ({x:xh.x,y:xh.y,z:xh.z,value:xh.value,isomin:xh.isomin,isomax:xh.isomax,surface:xh.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:xh.slices,caps:xh.caps,text:xh.text,hovertext:xh.hovertext,xhoverformat:xh.xhoverformat,yhoverformat:xh.yhoverformat,zhoverformat:xh.zhoverformat,valuehoverformat:xh.valuehoverformat,hovertemplate:xh.hovertemplate,hovertemplatefallback:xh.hovertemplatefallback},rDt("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:xh.colorbar,opacity:xh.opacity,opacityscale:iDt.opacityscale,lightposition:xh.lightposition,lighting:xh.lighting,flatshading:xh.flatshading,contour:xh.contour,hoverinfo:sZ({},I8e.hoverinfo),showlegend:sZ({},I8e.showlegend,{dflt:!1})}),"calc","nested");pF.x.editType=pF.y.editType=pF.z.editType=pF.value.editType="calc+clearAxisTypes"});var F8e=ye((Wgr,D8e)=>{"use strict";var aDt=Dr(),oDt=lZ(),sDt=rZ().supplyIsoDefaults,lDt=KX().opacityscaleDefaults;D8e.exports=function(t,r,n,i){function a(o,s){return aDt.coerce(t,r,oDt,o,s)}sDt(t,r,n,i,a),lDt(t,r,i,a)}});var B8e=ye((Xgr,q8e)=>{"use strict";var uDt=zd().gl_mesh3d,cDt=a1().parseColorScale,fDt=Dr().isArrayOrTypedArray,hDt=n1(),dDt=tc().extractOpts,z8e=$A(),uZ=vF().findNearestOnAxis,vDt=vF().generateIsoMeshes;function O8e(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.data=null,this.showContour=!1}var cZ=O8e.prototype;cZ.handlePick=function(e){if(e.object===this.mesh){var t=e.data.index,r=this.data._meshX[t],n=this.data._meshY[t],i=this.data._meshZ[t],a=this.data._Ys.length,o=this.data._Zs.length,s=uZ(r,this.data._Xs).id,l=uZ(n,this.data._Ys).id,u=uZ(i,this.data._Zs).id,c=e.index=u+o*l+o*a*s;e.traceCoordinate=[this.data._meshX[c],this.data._meshY[c],this.data._meshZ[c],this.data._value[c]];var f=this.data.hovertext||this.data.text;return fDt(f)&&f[c]!==void 0?e.textLabel=f[c]:f&&(e.textLabel=f),!0}};cZ.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=vDt(e);function n(l,u,c,f){return u.map(function(h){return l.d2l(h,0,f)*c})}var i=z8e(n(r.xaxis,e._meshX,t.dataScale[0],e.xcalendar),n(r.yaxis,e._meshY,t.dataScale[1],e.ycalendar),n(r.zaxis,e._meshZ,t.dataScale[2],e.zcalendar)),a=z8e(e._meshI,e._meshJ,e._meshK),o={positions:i,cells:a,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,opacityscale:e.opacityscale,contourEnable:e.contour.show,contourColor:hDt(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},s=dDt(e);o.vertexIntensity=e._meshIntensity,o.vertexIntensityBounds=[s.min,s.max],o.colormap=cDt(e),this.mesh.update(o)};cZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function pDt(e,t){var r=e.glplot.gl,n=uDt({gl:r}),i=new O8e(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}q8e.exports=pDt});var U8e=ye((Zgr,N8e)=>{"use strict";N8e.exports={attributes:lZ(),supplyDefaults:F8e(),calc:aZ(),colorbar:{min:"cmin",max:"cmax"},plot:B8e(),moduleType:"trace",name:"volume",basePlotModule:sx(),categories:["gl3d","showLegend"],meta:{}}});var G8e=ye((Ygr,V8e)=>{"use strict";V8e.exports=U8e()});var W8e=ye((Kgr,j8e)=>{"use strict";var gDt=qa(),H8e=Dr(),mDt=td(),yDt=KA();j8e.exports=function(t,r,n,i){function a(c,f){return H8e.coerce(t,r,yDt,c,f)}function o(c){var f=c.map(function(h){var d=a(h);return d&&H8e.isArrayOrTypedArray(d)?d:null});return f.every(function(h){return h&&h.length===f[0].length})&&f}var s=o(["x","y","z"]);if(!s){r.visible=!1;return}if(o(["i","j","k"]),r.i&&(!r.j||!r.k)||r.j&&(!r.k||!r.i)||r.k&&(!r.i||!r.j)){r.visible=!1;return}var l=gDt.getComponentMethod("calendars","handleTraceDefaults");l(t,r,["x","y","z"],i),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(c){a(c)});var u=a("contour.show");u&&(a("contour.color"),a("contour.width")),"intensity"in t?(a("intensity"),a("intensitymode"),mDt(t,r,i,a,{prefix:"",cLetter:"c"})):(r.showscale=!1,"facecolor"in t?a("facecolor"):"vertexcolor"in t?a("vertexcolor"):a("color",n)),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var Z8e=ye((Jgr,X8e)=>{"use strict";var _Dt=gv();X8e.exports=function(t,r){r.intensity&&_Dt(t,r,{vals:r.intensity,containerStr:"",cLetter:"c"})}});var Q8e=ye(($gr,$8e)=>{"use strict";var xDt=zd().gl_mesh3d,bDt=zd().delaunay_triangulate,wDt=zd().alpha_shape,TDt=zd().convex_hull,ADt=a1().parseColorScale,SDt=Dr().isArrayOrTypedArray,vZ=n1(),MDt=tc().extractOpts,Y8e=$A();function J8e(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var pZ=J8e.prototype;pZ.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index;e.data._cellCenter?e.traceCoordinate=e.data.dataCoordinate:e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]];var r=this.data.hovertext||this.data.text;return SDt(r)&&r[t]!==void 0?e.textLabel=r[t]:r&&(e.textLabel=r),!0}};function K8e(e){for(var t=[],r=e.length,n=0;n=t-.5)return!1;return!0}pZ.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=e;var n=e.x.length,i=Y8e(fZ(r.xaxis,e.x,t.dataScale[0],e.xcalendar),fZ(r.yaxis,e.y,t.dataScale[1],e.ycalendar),fZ(r.zaxis,e.z,t.dataScale[2],e.zcalendar)),a;if(e.i&&e.j&&e.k){if(e.i.length!==e.j.length||e.j.length!==e.k.length||!dZ(e.i,n)||!dZ(e.j,n)||!dZ(e.k,n))return;a=Y8e(hZ(e.i),hZ(e.j),hZ(e.k))}else e.alphahull===0?a=TDt(i):e.alphahull>0?a=wDt(e.alphahull,i):a=EDt(e.delaunayaxis,i);var o={positions:i,cells:a,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,contourEnable:e.contour.show,contourColor:vZ(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading};if(e.intensity){var s=MDt(e);this.color="#fff";var l=e.intensitymode;o[l+"Intensity"]=e.intensity,o[l+"IntensityBounds"]=[s.min,s.max],o.colormap=ADt(e)}else e.vertexcolor?(this.color=e.vertexcolor[0],o.vertexColors=K8e(e.vertexcolor)):e.facecolor?(this.color=e.facecolor[0],o.cellColors=K8e(e.facecolor)):(this.color=e.color,o.meshColor=vZ(e.color));this.mesh.update(o)};pZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function kDt(e,t){var r=e.glplot.gl,n=xDt({gl:r}),i=new J8e(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}$8e.exports=kDt});var tRe=ye((Qgr,eRe)=>{"use strict";eRe.exports={attributes:KA(),supplyDefaults:W8e(),calc:Z8e(),colorbar:{min:"cmin",max:"cmax"},plot:Q8e(),moduleType:"trace",name:"mesh3d",basePlotModule:sx(),categories:["gl3d","showLegend"],meta:{}}});var iRe=ye((emr,rRe)=>{"use strict";rRe.exports=tRe()});var mZ=ye((tmr,aRe)=>{"use strict";var CDt=Tu(),QA=df().axisHoverFormat,{hovertemplateAttrs:LDt,templatefallbackAttrs:PDt}=Ll(),IDt=KA(),nRe=Gl(),gZ=Ao().extendFlat,gF={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute","raw"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:LDt({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:PDt({editType:"calc"}),uhoverformat:QA("u",1),vhoverformat:QA("v",1),whoverformat:QA("w",1),xhoverformat:QA("x"),yhoverformat:QA("y"),zhoverformat:QA("z"),showlegend:gZ({},nRe.showlegend,{dflt:!1})};gZ(gF,CDt("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var RDt=["opacity","lightposition","lighting"];RDt.forEach(function(e){gF[e]=IDt[e]});gF.hoverinfo=gZ({},nRe.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"});aRe.exports=gF});var sRe=ye((rmr,oRe)=>{"use strict";var DDt=Dr(),FDt=td(),zDt=mZ();oRe.exports=function(t,r,n,i){function a(d,v){return DDt.coerce(t,r,zDt,d,v)}var o=a("u"),s=a("v"),l=a("w"),u=a("x"),c=a("y"),f=a("z");if(!o||!o.length||!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length||!f||!f.length){r.visible=!1;return}var h=a("sizemode");a("sizeref",h==="raw"?1:.5),a("anchor"),a("lighting.ambient"),a("lighting.diffuse"),a("lighting.specular"),a("lighting.roughness"),a("lighting.fresnel"),a("lightposition.x"),a("lightposition.y"),a("lightposition.z"),FDt(t,r,i,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var uRe=ye((imr,lRe)=>{"use strict";var ODt=gv();lRe.exports=function(t,r){for(var n=r.u,i=r.v,a=r.w,o=Math.min(r.x.length,r.y.length,r.z.length,n.length,i.length,a.length),s=-1/0,l=1/0,u=0;u{"use strict";var qDt=zd().gl_cone3d,BDt=zd().gl_cone3d.createConeMesh,NDt=Dr().simpleMap,UDt=a1().parseColorScale,VDt=tc().extractOpts,GDt=Dr().isArrayOrTypedArray,cRe=$A();function fRe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var yZ=fRe.prototype;yZ.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index,r=this.data.x[t],n=this.data.y[t],i=this.data.z[t],a=this.data.u[t],o=this.data.v[t],s=this.data.w[t];e.traceCoordinate=[r,n,i,a,o,s,Math.sqrt(a*a+o*o+s*s)];var l=this.data.hovertext||this.data.text;return GDt(l)&&l[t]!==void 0?e.textLabel=l[t]:l&&(e.textLabel=l),!0}};var HDt={xaxis:0,yaxis:1,zaxis:2},jDt={tip:1,tail:0,cm:.25,center:.5},WDt={tip:1,tail:1,cm:.75,center:.5};function hRe(e,t){var r=e.fullSceneLayout,n=e.dataScale,i={};function a(c,f){var h=r[f],d=n[HDt[f]];return NDt(c,function(v){return h.d2l(v)*d})}i.vectors=cRe(a(t.u,"xaxis"),a(t.v,"yaxis"),a(t.w,"zaxis"),t._len),i.positions=cRe(a(t.x,"xaxis"),a(t.y,"yaxis"),a(t.z,"zaxis"),t._len);var o=VDt(t);i.colormap=UDt(t),i.vertexIntensityBounds=[o.min/t._normMax,o.max/t._normMax],i.coneOffset=jDt[t.anchor];var s=t.sizemode;s==="scaled"?i.coneSize=t.sizeref||.5:s==="absolute"?i.coneSize=t.sizeref&&t._normMax?t.sizeref/t._normMax:.5:s==="raw"&&(i.coneSize=t.sizeref),i.coneSizemode=s;var l=qDt(i),u=t.lightposition;return l.lightPosition=[u.x,u.y,u.z],l.ambient=t.lighting.ambient,l.diffuse=t.lighting.diffuse,l.specular=t.lighting.specular,l.roughness=t.lighting.roughness,l.fresnel=t.lighting.fresnel,l.opacity=t.opacity,t._pad=WDt[t.anchor]*l.vectorScale*l.coneScale*t._normMax,l}yZ.update=function(e){this.data=e;var t=hRe(this.scene,e);this.mesh.update(t)};yZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function XDt(e,t){var r=e.glplot.gl,n=hRe(e,t),i=BDt(r,n),a=new fRe(e,t.uid);return a.mesh=i,a.data=t,i._trace=a,e.glplot.add(i),a}dRe.exports=XDt});var gRe=ye((amr,pRe)=>{"use strict";pRe.exports={moduleType:"trace",name:"cone",basePlotModule:sx(),categories:["gl3d","showLegend"],attributes:mZ(),supplyDefaults:sRe(),colorbar:{min:"cmin",max:"cmax"},calc:uRe(),plot:vRe(),eventData:function(e,t){return e.norm=t.traceCoordinate[6],e},meta:{}}});var yRe=ye((omr,mRe)=>{"use strict";mRe.exports=gRe()});var xZ=ye((smr,xRe)=>{"use strict";var ZDt=Tu(),e5=df().axisHoverFormat,{hovertemplateAttrs:YDt,templatefallbackAttrs:KDt}=Ll(),JDt=KA(),_Re=Gl(),_Z=Ao().extendFlat,mF={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},starts:{x:{valType:"data_array",editType:"calc"},y:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},editType:"calc"},maxdisplayed:{valType:"integer",min:0,dflt:1e3,editType:"calc"},sizeref:{valType:"number",editType:"calc",min:0,dflt:1},text:{valType:"string",dflt:"",editType:"calc"},hovertext:{valType:"string",dflt:"",editType:"calc"},hovertemplate:YDt({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),hovertemplatefallback:KDt({editType:"calc"}),uhoverformat:e5("u",1),vhoverformat:e5("v",1),whoverformat:e5("w",1),xhoverformat:e5("x"),yhoverformat:e5("y"),zhoverformat:e5("z"),showlegend:_Z({},_Re.showlegend,{dflt:!1})};_Z(mF,ZDt("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var $Dt=["opacity","lightposition","lighting"];$Dt.forEach(function(e){mF[e]=JDt[e]});mF.hoverinfo=_Z({},_Re.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"});xRe.exports=mF});var wRe=ye((lmr,bRe)=>{"use strict";var QDt=Dr(),eFt=td(),tFt=xZ();bRe.exports=function(t,r,n,i){function a(h,d){return QDt.coerce(t,r,tFt,h,d)}var o=a("u"),s=a("v"),l=a("w"),u=a("x"),c=a("y"),f=a("z");if(!o||!o.length||!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length||!f||!f.length){r.visible=!1;return}a("starts.x"),a("starts.y"),a("starts.z"),a("maxdisplayed"),a("sizeref"),a("lighting.ambient"),a("lighting.diffuse"),a("lighting.specular"),a("lighting.roughness"),a("lighting.fresnel"),a("lightposition.x"),a("lightposition.y"),a("lightposition.z"),eFt(t,r,i,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var LRe=ye((umr,CRe)=>{"use strict";var SRe=zd().gl_streamtube3d,rFt=SRe.createTubeMesh,iFt=Dr(),nFt=a1().parseColorScale,aFt=tc().extractOpts,TRe=$A(),MRe={xaxis:0,yaxis:1,zaxis:2};function ERe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var wZ=ERe.prototype;wZ.handlePick=function(e){var t=this.scene.fullSceneLayout,r=this.scene.dataScale;function n(o,s){var l=t[s],u=r[MRe[s]];return l.l2c(o)/u}if(e.object===this.mesh){var i=e.data.position,a=e.data.velocity;return e.traceCoordinate=[n(i[0],"xaxis"),n(i[1],"yaxis"),n(i[2],"zaxis"),n(a[0],"xaxis"),n(a[1],"yaxis"),n(a[2],"zaxis"),e.data.intensity*this.data._normMax,e.data.divergence],e.textLabel=this.data.hovertext||this.data.text,!0}};function ARe(e){var t=e.length,r;return t>2?r=e.slice(1,t-1):t===2?r=[(e[0]+e[1])/2]:r=e,r}function bZ(e){var t=e.length;return t===1?[.5,.5]:[e[1]-e[0],e[t-1]-e[t-2]]}function kRe(e,t){var r=e.fullSceneLayout,n=e.dataScale,i=t._len,a={};function o(z,O){var U=r[O],G=n[MRe[O]];return iFt.simpleMap(z,function(Z){return U.d2l(Z)*G})}if(a.vectors=TRe(o(t._u,"xaxis"),o(t._v,"yaxis"),o(t._w,"zaxis"),i),!i)return{positions:[],cells:[]};var s=o(t._Xs,"xaxis"),l=o(t._Ys,"yaxis"),u=o(t._Zs,"zaxis");a.meshgrid=[s,l,u],a.gridFill=t._gridFill;var c=t._slen;if(c)a.startingPositions=TRe(o(t._startsX,"xaxis"),o(t._startsY,"yaxis"),o(t._startsZ,"zaxis"));else{for(var f=l[0],h=ARe(s),d=ARe(u),v=new Array(h.length*d.length),_=0,b=0;b{"use strict";PRe.exports={moduleType:"trace",name:"streamtube",basePlotModule:sx(),categories:["gl3d","showLegend"],attributes:xZ(),supplyDefaults:wRe(),colorbar:{min:"cmin",max:"cmax"},calc:hF().calc,plot:LRe(),eventData:function(e,t){return e.tubex=e.x,e.tubey=e.y,e.tubez=e.z,e.tubeu=t.traceCoordinate[3],e.tubev=t.traceCoordinate[4],e.tubew=t.traceCoordinate[5],e.norm=t.traceCoordinate[6],e.divergence=t.traceCoordinate[7],delete e.x,delete e.y,delete e.z,e},meta:{}}});var DRe=ye((fmr,RRe)=>{"use strict";RRe.exports=IRe()});var ew=ye((dmr,BRe)=>{"use strict";var{hovertemplateAttrs:sFt,texttemplateAttrs:lFt,templatefallbackAttrs:FRe}=Ll(),uFt=Pg(),$m=pf(),cFt=Gl(),zRe=Tu(),fFt=Pd().dash,Q2=Ao().extendFlat,hFt=mc().overrideAll,rg=$m.marker,ORe=$m.line,qRe=rg.line,hmr=["The library used by the *country names* `locationmode` option is changing in an upcoming version.","Country names in existing plots may not work in the new version."].join(" ");BRe.exports=hFt({lon:{valType:"data_array"},lat:{valType:"data_array"},locations:{valType:"data_array"},locationmode:{valType:"enumerated",values:["ISO-3","USA-states","country names","geojson-id"],dflt:"ISO-3"},geojson:{valType:"any",editType:"calc"},featureidkey:{valType:"string",editType:"calc",dflt:"id"},mode:Q2({},$m.mode,{dflt:"markers"}),text:Q2({},$m.text,{}),texttemplate:lFt({editType:"plot"},{keys:["lat","lon","location","text"]}),texttemplatefallback:FRe({editType:"plot"}),hovertext:Q2({},$m.hovertext,{}),textfont:$m.textfont,textposition:$m.textposition,line:{color:ORe.color,width:ORe.width,dash:fFt},connectgaps:$m.connectgaps,marker:Q2({symbol:rg.symbol,opacity:rg.opacity,angle:rg.angle,angleref:Q2({},rg.angleref,{values:["previous","up","north"]}),standoff:rg.standoff,size:rg.size,sizeref:rg.sizeref,sizemin:rg.sizemin,sizemode:rg.sizemode,colorbar:rg.colorbar,line:Q2({width:qRe.width,dash:qRe.dash},zRe("marker.line")),gradient:rg.gradient},zRe("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:uFt(),selected:$m.selected,unselected:$m.unselected,hoverinfo:Q2({},cFt.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:sFt(),hovertemplatefallback:FRe()},"calc","nested")});var URe=ye((vmr,NRe)=>{"use strict";var yF=Dr(),TZ=Ru(),dFt=$p(),vFt=D0(),pFt=F0(),gFt=Fg(),mFt=ew(),yFt=["The library used by the *country names* `locationmode` option is changing in the next major version.","Some country names in existing plots may not work in the new version.","To ensure consistent behavior, consider setting `locationmode` to *ISO-3*."].join(" ");NRe.exports=function(t,r,n,i){function a(d,v){return yF.coerce(t,r,mFt,d,v)}var o=a("locations"),s;if(o&&o.length){var l=a("geojson"),u;(typeof l=="string"&&l!==""||yF.isPlainObject(l))&&(u="geojson-id");var c=a("locationmode",u);c==="country names"&&yF.warn(yFt),c==="geojson-id"&&a("featureidkey"),s=o.length}else{var f=a("lon")||[],h=a("lat")||[];s=Math.min(f.length,h.length)}if(!s){r.visible=!1;return}r._length=s,a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("mode"),TZ.hasMarkers(r)&&dFt(t,r,n,i,a,{gradient:!0}),TZ.hasLines(r)&&(vFt(t,r,n,i,a),a("connectgaps")),TZ.hasText(r)&&(a("texttemplate"),a("texttemplatefallback"),pFt(t,r,i,a)),a("fill"),r.fill!=="none"&&gFt(t,r,n,a),yF.coerceSelectionMarkerOpacity(r,a)}});var HRe=ye((pmr,GRe)=>{"use strict";var VRe=ho();GRe.exports=function(t,r,n){var i={},a=n[r.geo]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=VRe.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=VRe.tickText(o,o.c2l(s[1]),!0).text,i}});var _F=ye((gmr,ZRe)=>{"use strict";var AZ=Eo(),jRe=fs().BADNUM,_Ft=z0(),xFt=Rm(),bFt=O0(),wFt=Dr().isArrayOrTypedArray,WRe=Dr()._;function XRe(e){return e&&typeof e=="string"}ZRe.exports=function(t,r){var n=wFt(r.locations),i=n?r.locations.length:r._length,a=new Array(i),o;r.geojson?o=function(h){return XRe(h)||AZ(h)}:o=XRe;for(var s=0;s{"use strict";Mv.projNames={airy:"airy",aitoff:"aitoff","albers usa":"albersUsa",albers:"albers",august:"august","azimuthal equal area":"azimuthalEqualArea","azimuthal equidistant":"azimuthalEquidistant",baker:"baker",bertin1953:"bertin1953",boggs:"boggs",bonne:"bonne",bottomley:"bottomley",bromley:"bromley",collignon:"collignon","conic conformal":"conicConformal","conic equal area":"conicEqualArea","conic equidistant":"conicEquidistant",craig:"craig",craster:"craster","cylindrical equal area":"cylindricalEqualArea","cylindrical stereographic":"cylindricalStereographic",eckert1:"eckert1",eckert2:"eckert2",eckert3:"eckert3",eckert4:"eckert4",eckert5:"eckert5",eckert6:"eckert6",eisenlohr:"eisenlohr","equal earth":"equalEarth",equirectangular:"equirectangular",fahey:"fahey","foucaut sinusoidal":"foucautSinusoidal",foucaut:"foucaut",ginzburg4:"ginzburg4",ginzburg5:"ginzburg5",ginzburg6:"ginzburg6",ginzburg8:"ginzburg8",ginzburg9:"ginzburg9",gnomonic:"gnomonic","gringorten quincuncial":"gringortenQuincuncial",gringorten:"gringorten",guyou:"guyou",hammer:"hammer",hill:"hill",homolosine:"homolosine",hufnagel:"hufnagel",hyperelliptical:"hyperelliptical",kavrayskiy7:"kavrayskiy7",lagrange:"lagrange",larrivee:"larrivee",laskowski:"laskowski",loximuthal:"loximuthal",mercator:"mercator",miller:"miller",mollweide:"mollweide","mt flat polar parabolic":"mtFlatPolarParabolic","mt flat polar quartic":"mtFlatPolarQuartic","mt flat polar sinusoidal":"mtFlatPolarSinusoidal","natural earth":"naturalEarth","natural earth1":"naturalEarth1","natural earth2":"naturalEarth2","nell hammer":"nellHammer",nicolosi:"nicolosi",orthographic:"orthographic",patterson:"patterson","peirce quincuncial":"peirceQuincuncial",polyconic:"polyconic","rectangular polyconic":"rectangularPolyconic",robinson:"robinson",satellite:"satellite","sinu mollweide":"sinuMollweide",sinusoidal:"sinusoidal",stereographic:"stereographic",times:"times","transverse mercator":"transverseMercator","van der grinten":"vanDerGrinten","van der grinten2":"vanDerGrinten2","van der grinten3":"vanDerGrinten3","van der grinten4":"vanDerGrinten4",wagner4:"wagner4",wagner6:"wagner6",wiechel:"wiechel","winkel tripel":"winkel3",winkel3:"winkel3"};Mv.axesNames=["lonaxis","lataxis"];Mv.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360};Mv.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180};Mv.scopeDefaults={world:{lonaxisRange:[-180,180],lataxisRange:[-90,90],projType:"equirectangular",projRotate:[0,0,0]},usa:{lonaxisRange:[-180,-50],lataxisRange:[15,80],projType:"albers usa"},europe:{lonaxisRange:[-30,60],lataxisRange:[30,85],projType:"conic conformal",projRotate:[15,0,0],projParallels:[0,60]},asia:{lonaxisRange:[22,160],lataxisRange:[-15,55],projType:"mercator",projRotate:[0,0,0]},africa:{lonaxisRange:[-30,60],lataxisRange:[-40,40],projType:"mercator",projRotate:[0,0,0]},"north america":{lonaxisRange:[-180,-45],lataxisRange:[5,85],projType:"conic conformal",projRotate:[-100,0,0],projParallels:[29.5,45.5]},"south america":{lonaxisRange:[-100,-30],lataxisRange:[-60,15],projType:"mercator",projRotate:[0,0,0]},antarctica:{lonaxisRange:[-180,180],lataxisRange:[-90,-60],projType:"equirectangular",projRotate:[0,0,0]},oceania:{lonaxisRange:[-180,180],lataxisRange:[-50,25],projType:"equirectangular",projRotate:[0,0,0]}};Mv.clipPad=.001;Mv.precision=.1;Mv.landColor="#F0DC82";Mv.waterColor="#3399FF";Mv.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"};Mv.sphereSVG={type:"Sphere"};Mv.fillLayers={ocean:1,land:1,lakes:1};Mv.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1};Mv.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"];Mv.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"];Mv.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}});var SZ=ye((xF,YRe)=>{(function(e,t){typeof xF=="object"&&typeof YRe!="undefined"?t(xF):(e=e||self,t(e.topojson=e.topojson||{}))})(xF,function(e){"use strict";function t(E){return E}function r(E){if(E==null)return t;var T,L,x=E.scale[0],C=E.scale[1],M=E.translate[0],g=E.translate[1];return function(P,A){A||(T=L=0);var z=2,O=P.length,U=new Array(O);for(U[0]=(T+=P[0])*x+M,U[1]=(L+=P[1])*C+g;zM&&(M=z[0]),z[1]g&&(g=z[1])}function A(z){switch(z.type){case"GeometryCollection":z.geometries.forEach(A);break;case"Point":P(z.coordinates);break;case"MultiPoint":z.coordinates.forEach(P);break}}E.arcs.forEach(function(z){for(var O=-1,U=z.length,G;++OM&&(M=G[0]),G[1]g&&(g=G[1])});for(L in E.objects)A(E.objects[L]);return[x,C,M,g]}function i(E,T){for(var L,x=E.length,C=x-T;C<--x;)L=E[C],E[C++]=E[x],E[x]=L}function a(E,T){return typeof T=="string"&&(T=E.objects[T]),T.type==="GeometryCollection"?{type:"FeatureCollection",features:T.geometries.map(function(L){return o(E,L)})}:o(E,T)}function o(E,T){var L=T.id,x=T.bbox,C=T.properties==null?{}:T.properties,M=s(E,T);return L==null&&x==null?{type:"Feature",properties:C,geometry:M}:x==null?{type:"Feature",id:L,properties:C,geometry:M}:{type:"Feature",id:L,bbox:x,properties:C,geometry:M}}function s(E,T){var L=r(E.transform),x=E.arcs;function C(O,U){U.length&&U.pop();for(var G=x[O<0?~O:O],Z=0,j=G.length;Z1)x=f(E,T,L);else for(C=0,x=new Array(M=E.arcs.length);C1)for(var U=1,G=P(z[0]),Z,j;UG&&(j=z[0],z[0]=z[U],z[U]=j,G=Z);return z}).filter(function(A){return A.length>0})}}function _(E,T){for(var L=0,x=E.length;L>>1;E[C]=2))throw new Error("n must be \u22652");A=E.bbox||n(E);var L=A[0],x=A[1],C=A[2],M=A[3],g;T={scale:[C-L?(C-L)/(g-1):1,M-x?(M-x)/(g-1):1],translate:[L,x]}}else A=E.bbox;var P=p(T),A,z,O=E.objects,U={};function G(N){return P(N)}function Z(N){var H;switch(N.type){case"GeometryCollection":H={type:"GeometryCollection",geometries:N.geometries.map(Z)};break;case"Point":H={type:"Point",coordinates:G(N.coordinates)};break;case"MultiPoint":H={type:"MultiPoint",coordinates:N.coordinates.map(G)};break;default:return N}return N.id!=null&&(H.id=N.id),N.bbox!=null&&(H.bbox=N.bbox),N.properties!=null&&(H.properties=N.properties),H}function j(N){var H=0,re=1,oe=N.length,_e,Ce=new Array(oe);for(Ce[0]=P(N[0],0);++H{"use strict";var MZ=KRe.exports={},TFt=uk().locationmodeToLayer,AFt=SZ().feature;MZ.getTopojsonName=function(e){return[e.scope.replace(/ /g,"-"),"_",e.resolution.toString(),"m"].join("")};MZ.getTopojsonPath=function(e,t){return e+=e.endsWith("/")?"":"/",`${e}${t}.json`};MZ.getTopojsonFeatures=function(e,t){var r=TFt[e.locationmode],n=t.objects[r];return AFt(t,n).features}});var cx=ye(ck=>{"use strict";var SFt=fs().BADNUM;ck.calcTraceToLineCoords=function(e){for(var t=e[0].trace,r=t.connectgaps,n=[],i=[],a=0;a0&&(n.push(i),i=[])}return i.length>0&&n.push(i),n};ck.makeLine=function(e){return e.length===1?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}};ck.makePolygon=function(e){if(e.length===1)return{type:"Polygon",coordinates:e};for(var t=new Array(e.length),r=0;r{JRe.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|\xE7)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|\xE9)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|\xE9)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|\xE3)o.?tom(e|\xE9)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}});var AF=ye(ic=>{"use strict";Object.defineProperty(ic,"__esModule",{value:!0});var Op=63710088e-1,kZ={centimeters:Op*100,centimetres:Op*100,degrees:360/(2*Math.PI),feet:Op*3.28084,inches:Op*39.37,kilometers:Op/1e3,kilometres:Op/1e3,meters:Op,metres:Op,miles:Op/1609.344,millimeters:Op*1e3,millimetres:Op*1e3,nauticalmiles:Op/1852,radians:1,yards:Op*1.0936},EZ={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function fx(e,t,r={}){let n={type:"Feature"};return(r.id===0||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function MFt(e,t,r={}){switch(e){case"Point":return CZ(t).geometry;case"LineString":return PZ(t).geometry;case"Polygon":return LZ(t).geometry;case"MultiPoint":return eDe(t).geometry;case"MultiLineString":return QRe(t).geometry;case"MultiPolygon":return tDe(t).geometry;default:throw new Error(e+" is invalid")}}function CZ(e,t,r={}){if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!wF(e[0])||!wF(e[1]))throw new Error("coordinates must contain numbers");return fx({type:"Point",coordinates:e},t,r)}function EFt(e,t,r={}){return TF(e.map(n=>CZ(n,t)),r)}function LZ(e,t,r={}){for(let i of e){if(i.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(i[i.length-1].length!==i[0].length)throw new Error("First and last Position are not equivalent.");for(let a=0;aLZ(n,t)),r)}function PZ(e,t,r={}){if(e.length<2)throw new Error("coordinates must be an array of two or more positions");return fx({type:"LineString",coordinates:e},t,r)}function CFt(e,t,r={}){return TF(e.map(n=>PZ(n,t)),r)}function TF(e,t={}){let r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function QRe(e,t,r={}){return fx({type:"MultiLineString",coordinates:e},t,r)}function eDe(e,t,r={}){return fx({type:"MultiPoint",coordinates:e},t,r)}function tDe(e,t,r={}){return fx({type:"MultiPolygon",coordinates:e},t,r)}function LFt(e,t,r={}){return fx({type:"GeometryCollection",geometries:e},t,r)}function PFt(e,t=0){if(t&&!(t>=0))throw new Error("precision must be a positive number");let r=Math.pow(10,t||0);return Math.round(e*r)/r}function rDe(e,t="kilometers"){let r=kZ[t];if(!r)throw new Error(t+" units is invalid");return e*r}function IZ(e,t="kilometers"){let r=kZ[t];if(!r)throw new Error(t+" units is invalid");return e/r}function IFt(e,t){return iDe(IZ(e,t))}function RFt(e){let t=e%360;return t<0&&(t+=360),t}function DFt(e){return e=e%360,e>180?e-360:e<-180?e+360:e}function iDe(e){return e%(2*Math.PI)*180/Math.PI}function FFt(e){return e%360*Math.PI/180}function zFt(e,t="kilometers",r="kilometers"){if(!(e>=0))throw new Error("length must be a positive number");return rDe(IZ(e,t),r)}function OFt(e,t="meters",r="kilometers"){if(!(e>=0))throw new Error("area must be a positive number");let n=EZ[t];if(!n)throw new Error("invalid original units");let i=EZ[r];if(!i)throw new Error("invalid final units");return e/n*i}function wF(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function qFt(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function BFt(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(e.length!==4&&e.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach(t=>{if(!wF(t))throw new Error("bbox must only contain numbers")})}function NFt(e){if(!e)throw new Error("id is required");if(["string","number"].indexOf(typeof e)===-1)throw new Error("id must be a number or a string")}ic.areaFactors=EZ;ic.azimuthToBearing=DFt;ic.bearingToAzimuth=RFt;ic.convertArea=OFt;ic.convertLength=zFt;ic.degreesToRadians=FFt;ic.earthRadius=Op;ic.factors=kZ;ic.feature=fx;ic.featureCollection=TF;ic.geometry=MFt;ic.geometryCollection=LFt;ic.isNumber=wF;ic.isObject=qFt;ic.lengthToDegrees=IFt;ic.lengthToRadians=IZ;ic.lineString=PZ;ic.lineStrings=CFt;ic.multiLineString=QRe;ic.multiPoint=eDe;ic.multiPolygon=tDe;ic.point=CZ;ic.points=EFt;ic.polygon=LZ;ic.polygons=kFt;ic.radiansToDegrees=iDe;ic.radiansToLength=rDe;ic.round=PFt;ic.validateBBox=BFt;ic.validateId=NFt});var MF=ye(Od=>{"use strict";Object.defineProperty(Od,"__esModule",{value:!0});var Wv=AF();function fk(e,t,r){if(e!==null)for(var n,i,a,o,s,l,u,c=0,f=0,h,d=e.type,v=d==="FeatureCollection",_=d==="Feature",b=v?e.features.length:1,p=0;pl||v>u||_>c){s=f,l=n,u=v,c=_,a=0;return}var b=Wv.lineString.call(void 0,[s,f],r.properties);if(t(b,n,i,_,a)===!1)return!1;a++,s=f})===!1)return!1}}})}function XFt(e,t,r){var n=r,i=!1;return oDe(e,function(a,o,s,l,u){i===!1&&r===void 0?n=a:n=t(n,a,o,s,l,u),i=!0}),n}function sDe(e,t){if(!e)throw new Error("geojson is required");SF(e,function(r,n,i){if(r.geometry!==null){var a=r.geometry.type,o=r.geometry.coordinates;switch(a){case"LineString":if(t(r,n,i,0,0)===!1)return!1;break;case"Polygon":for(var s=0;s{"use strict";Object.defineProperty(EF,"__esModule",{value:!0});var lDe=AF(),JFt=MF();function fDe(e){return JFt.geomReduce.call(void 0,e,(t,r)=>t+$Ft(r),0)}function $Ft(e){let t=0,r;switch(e.type){case"Polygon":return uDe(e.coordinates);case"MultiPolygon":for(r=0;r0){t+=Math.abs(cDe(e[0]));for(let r=1;r=t?(n+2)%t:n+2],s=i[0]*DZ,l=a[1]*DZ,u=o[0]*DZ;r+=(u-s)*Math.sin(l),n++}return r*QFt}var ezt=fDe;EF.area=fDe;EF.default=ezt});var vDe=ye(kF=>{"use strict";Object.defineProperty(kF,"__esModule",{value:!0});var tzt=AF(),rzt=MF();function dDe(e,t={}){let r=0,n=0,i=0;return rzt.coordEach.call(void 0,e,function(a){r+=a[0],n+=a[1],i++},!0),tzt.point.call(void 0,[r/i,n/i],t.properties)}var izt=dDe;kF.centroid=dDe;kF.default=izt});var gDe=ye(CF=>{"use strict";Object.defineProperty(CF,"__esModule",{value:!0});var nzt=MF();function pDe(e,t={}){if(e.bbox!=null&&t.recompute!==!0)return e.bbox;let r=[1/0,1/0,-1/0,-1/0];return nzt.coordEach.call(void 0,e,n=>{r[0]>n[0]&&(r[0]=n[0]),r[1]>n[1]&&(r[1]=n[1]),r[2]{"use strict";var ozt=Oa(),_De=$Re(),{area:szt}=hDe(),{centroid:lzt}=vDe(),{bbox:uzt}=gDe(),mDe=ZS(),t5=K1(),czt=Ty(),fzt=FS(),LF=FM(),yDe=Object.keys(_De),hzt={"ISO-3":mDe,"USA-states":mDe,"country names":dzt};function dzt(e){for(var t=0;t0&&c[f+1][0]<0)return f;return null}switch(n==="RUS"||n==="FJI"?a=function(c){var f;if(u(c)===null)f=c;else for(f=new Array(c.length),l=0;lf?h[d++]=[c[l][0]+360,c[l][1]]:l===f?(h[d++]=c[l],h[d++]=[c[l][0],-90]):h[d++]=c[l];var v=LF.tester(h);v.pts.pop(),i.push(v)}:a=function(c){i.push(LF.tester(c))},t.type){case"MultiPolygon":for(o=0;o0?v.properties.ct=mzt(v):v.properties.ct=[NaN,NaN],h.fIn=c,h.fOut=v,i.push(v)}else t5.log(["Location",h.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete n[f]}switch(r.type){case"FeatureCollection":var l=r.features;for(a=0;ai&&(i=s,r=o)}else r=t;return lzt(r).geometry.coordinates}function yzt(e){var t=window.PlotlyGeoAssets||{},r=[];function n(l){return new Promise(function(u,c){ozt.json(l,function(f,h){if(f){delete t[l];var d=f.status===404?'GeoJSON at URL "'+l+'" does not exist.':"Unexpected error while fetching from "+l;return c(new Error(d))}return t[l]=h,u(h)})})}function i(l){return new Promise(function(u,c){var f=0,h=setInterval(function(){if(t[l]&&t[l]!=="pending")return clearInterval(h),u(t[l]);if(f>100)return clearInterval(h),c("Unexpected error while fetching from "+l);f++},50)})}for(var a=0;a{"use strict";var xzt=Oa(),bzt=So(),wDe=ka(),TDe=sp(),wzt=TDe.stylePoints,Tzt=TDe.styleText;ADe.exports=function(t,r){r&&Azt(t,r)};function Azt(e,t){var r=t[0].trace,n=t[0].node3;n.style("opacity",t[0].trace.opacity),wzt(n,r,e),Tzt(n,r,e),n.selectAll("path.js-line").style("fill","none").each(function(i){var a=xzt.select(this),o=i.trace,s=o.line||{};a.call(wDe.stroke,s.color).call(bzt.dashLine,s.dash||"",s.width||0),o.fill!=="none"&&a.call(wDe.fill,o.fillcolor)})}});var BZ=ye((kmr,EDe)=>{"use strict";var SDe=Oa(),IF=Dr(),Szt=bF().getTopojsonFeatures,zZ=cx(),PF=hx(),MDe=Mg().findExtremes,qZ=fs().BADNUM,Mzt=q0().calcMarkerSize,OZ=Ru(),Ezt=FZ();function kzt(e,t,r){var n=t.layers.frontplot.select(".scatterlayer"),i=IF.makeTraceGroups(n,r,"trace scattergeo");function a(o,s){o.lonlat[0]===qZ&&SDe.select(s).remove()}i.selectAll("*").remove(),i.each(function(o){var s=SDe.select(this),l=o[0].trace;if(OZ.hasLines(l)||l.fill!=="none"){var u=zZ.calcTraceToLineCoords(o),c=l.fill!=="none"?zZ.makePolygon(u):zZ.makeLine(u);s.selectAll("path.js-line").data([{geojson:c,trace:l}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}OZ.hasMarkers(l)&&s.selectAll("path.point").data(IF.identity).enter().append("path").classed("point",!0).each(function(f){a(f,this)}),OZ.hasText(l)&&s.selectAll("g").data(IF.identity).enter().append("g").append("text").each(function(f){a(f,this)}),Ezt(e,o)})}function Czt(e,t){var r=e[0].trace,n=t[r.geo],i=n._subplot,a=r._length,o,s;if(IF.isArrayOrTypedArray(r.locations)){var l=r.locationmode,u=l==="geojson-id"?PF.extractTraceFeature(e):Szt(r,i.topojson);for(o=0;o{"use strict";var Lzt=vf(),Pzt=fs().BADNUM,Izt=gT(),Rzt=Dr().fillText,Dzt=ew();kDe.exports=function(t,r,n){var i=t.cd,a=i[0].trace,o=t.xa,s=t.ya,l=t.subplot,u=l.projection.isLonLatOverEdges,c=l.project;function f(k){var E=k.lonlat;if(E[0]===Pzt||u(E))return 1/0;var T=c(E),L=c([r,n]),x=Math.abs(T[0]-L[0]),C=Math.abs(T[1]-L[1]),M=Math.max(3,k.mrc||0);return Math.max(Math.sqrt(x*x+C*C)-M,1-3/M)}if(Lzt.getClosest(i,f,t),t.index!==!1){var h=i[t.index],d=h.lonlat,v=[o.c2p(d),s.c2p(d)],_=h.mrc||1;t.x0=v[0]-_,t.x1=v[0]+_,t.y0=v[1]-_,t.y1=v[1]+_,t.loc=h.loc,t.lon=d[0],t.lat=d[1];var b={};b[a.geo]={_subplot:l};var p=a._module.formatLabels(h,a,b);return t.lonLabel=p.lonLabel,t.latLabel=p.latLabel,t.color=Izt(a,h),t.extraText=Fzt(a,h,t,i[0].t.labels),t.hovertemplate=a.hovertemplate,[t]}};function Fzt(e,t,r,n){if(e.hovertemplate)return;var i=t.hi||e.hoverinfo,a=i==="all"?Dzt.hoverinfo.flags:i.split("+"),o=a.indexOf("location")!==-1&&Array.isArray(e.locations),s=a.indexOf("lon")!==-1,l=a.indexOf("lat")!==-1,u=a.indexOf("text")!==-1,c=[];function f(h){return h+"\xB0"}return o?c.push(t.loc):s&&l?c.push("("+f(r.latLabel)+", "+f(r.lonLabel)+")"):s?c.push(n.lon+f(r.lonLabel)):l&&c.push(n.lat+f(r.latLabel)),u&&Rzt(t,e,c),c.join("
")}});var PDe=ye((Lmr,LDe)=>{"use strict";LDe.exports=function(t,r,n,i,a){t.lon=r.lon,t.lat=r.lat,t.location=r.loc?r.loc:null;var o=i[a];return o.fIn&&o.fIn.properties&&(t.properties=o.fIn.properties),t}});var DDe=ye((Pmr,RDe)=>{"use strict";var IDe=Ru(),zzt=fs().BADNUM;RDe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l,u,c,f,h,d=!IDe.hasMarkers(s)&&!IDe.hasText(s);if(d)return[];if(r===!1)for(h=0;h{(function(e,t){t(typeof RF=="object"&&typeof FDe!="undefined"?RF:e.d3=e.d3||{})})(RF,function(e){"use strict";function t(Ee,Ae){return EeAe?1:Ee>=Ae?0:NaN}function r(Ee){return Ee.length===1&&(Ee=n(Ee)),{left:function(Ae,Be,Pe,me){for(Pe==null&&(Pe=0),me==null&&(me=Ae.length);Pe>>1;Ee(Ae[De],Be)<0?Pe=De+1:me=De}return Pe},right:function(Ae,Be,Pe,me){for(Pe==null&&(Pe=0),me==null&&(me=Ae.length);Pe>>1;Ee(Ae[De],Be)>0?me=De:Pe=De+1}return Pe}}}function n(Ee){return function(Ae,Be){return t(Ee(Ae),Be)}}var i=r(t),a=i.right,o=i.left;function s(Ee,Ae){Ae==null&&(Ae=l);for(var Be=0,Pe=Ee.length-1,me=Ee[0],De=new Array(Pe<0?0:Pe);BeEe?1:Ae>=Ee?0:NaN}function f(Ee){return Ee===null?NaN:+Ee}function h(Ee,Ae){var Be=Ee.length,Pe=0,me=-1,De=0,ce,je,lt=0;if(Ae==null)for(;++me1)return lt/(Pe-1)}function d(Ee,Ae){var Be=h(Ee,Ae);return Be&&Math.sqrt(Be)}function v(Ee,Ae){var Be=Ee.length,Pe=-1,me,De,ce;if(Ae==null){for(;++Pe=me)for(De=ce=me;++Peme&&(De=me),ce=me)for(De=ce=me;++Peme&&(De=me),ce0)return[Ee];if((Pe=Ae0)for(Ee=Math.ceil(Ee/je),Ae=Math.floor(Ae/je),ce=new Array(De=Math.ceil(Ae-Ee+1));++me=0?(De>=L?10:De>=x?5:De>=C?2:1)*Math.pow(10,me):-Math.pow(10,-me)/(De>=L?10:De>=x?5:De>=C?2:1)}function P(Ee,Ae,Be){var Pe=Math.abs(Ae-Ee)/Math.max(0,Be),me=Math.pow(10,Math.floor(Math.log(Pe)/Math.LN10)),De=Pe/me;return De>=L?me*=10:De>=x?me*=5:De>=C&&(me*=2),Aeot;)ut.pop(),--Wt;var Nt=new Array(Wt+1),$t;for(De=0;De<=Wt;++De)$t=Nt[De]=[],$t.x0=De>0?ut[De-1]:Vt,$t.x1=De=1)return+Be(Ee[Pe-1],Pe-1,Ee);var Pe,me=(Pe-1)*Ae,De=Math.floor(me),ce=+Be(Ee[De],De,Ee),je=+Be(Ee[De+1],De+1,Ee);return ce+(je-ce)*(me-De)}}function U(Ee,Ae,Be){return Ee=p.call(Ee,f).sort(t),Math.ceil((Be-Ae)/(2*(O(Ee,.75)-O(Ee,.25))*Math.pow(Ee.length,-1/3)))}function G(Ee,Ae,Be){return Math.ceil((Be-Ae)/(3.5*d(Ee)*Math.pow(Ee.length,-1/3)))}function Z(Ee,Ae){var Be=Ee.length,Pe=-1,me,De;if(Ae==null){for(;++Pe=me)for(De=me;++PeDe&&(De=me)}else for(;++Pe=me)for(De=me;++PeDe&&(De=me);return De}function j(Ee,Ae){var Be=Ee.length,Pe=Be,me=-1,De,ce=0;if(Ae==null)for(;++me=0;)for(ce=Ee[Ae],Be=ce.length;--Be>=0;)De[--me]=ce[Be];return De}function re(Ee,Ae){var Be=Ee.length,Pe=-1,me,De;if(Ae==null){for(;++Pe=me)for(De=me;++Peme&&(De=me)}else for(;++Pe=me)for(De=me;++Peme&&(De=me);return De}function oe(Ee,Ae){for(var Be=Ae.length,Pe=new Array(Be);Be--;)Pe[Be]=Ee[Ae[Be]];return Pe}function _e(Ee,Ae){if(Be=Ee.length){var Be,Pe=0,me=0,De,ce=Ee[me];for(Ae==null&&(Ae=t);++Pe{(function(e,t){typeof DF=="object"&&typeof zDe!="undefined"?t(DF,hk()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(DF,function(e,t){"use strict";function r(){return new n}function n(){this.reset()}n.prototype={constructor:n,reset:function(){this.s=this.t=0},add:function(At){a(i,At,this.t),a(this,i.s,this.s),this.s?this.t+=i.t:this.s=i.t},valueOf:function(){return this.s}};var i=new n;function a(At,Xt,Cr){var Ar=At.s=Xt+Cr,Kr=Ar-Xt,ki=Ar-Kr;At.t=Xt-ki+(Cr-Kr)}var o=1e-6,s=1e-12,l=Math.PI,u=l/2,c=l/4,f=l*2,h=180/l,d=l/180,v=Math.abs,_=Math.atan,b=Math.atan2,p=Math.cos,k=Math.ceil,E=Math.exp,T=Math.log,L=Math.pow,x=Math.sin,C=Math.sign||function(At){return At>0?1:At<0?-1:0},M=Math.sqrt,g=Math.tan;function P(At){return At>1?0:At<-1?l:Math.acos(At)}function A(At){return At>1?u:At<-1?-u:Math.asin(At)}function z(At){return(At=x(At/2))*At}function O(){}function U(At,Xt){At&&Z.hasOwnProperty(At.type)&&Z[At.type](At,Xt)}var G={Feature:function(At,Xt){U(At.geometry,Xt)},FeatureCollection:function(At,Xt){for(var Cr=At.features,Ar=-1,Kr=Cr.length;++Ar=0?1:-1,Kr=Ar*Cr,ki=p(Xt),Xi=x(Xt),dn=ie*Xi,wn=ge*ki+dn*p(Kr),Nn=dn*Ar*x(Kr);re.add(b(Nn,wn)),Le=At,ge=ki,ie=Xi}function me(At){return oe.reset(),H(At,Se),oe*2}function De(At){return[b(At[1],At[0]),A(At[2])]}function ce(At){var Xt=At[0],Cr=At[1],Ar=p(Cr);return[Ar*p(Xt),Ar*x(Xt),x(Cr)]}function je(At,Xt){return At[0]*Xt[0]+At[1]*Xt[1]+At[2]*Xt[2]}function lt(At,Xt){return[At[1]*Xt[2]-At[2]*Xt[1],At[2]*Xt[0]-At[0]*Xt[2],At[0]*Xt[1]-At[1]*Xt[0]]}function pt(At,Xt){At[0]+=Xt[0],At[1]+=Xt[1],At[2]+=Xt[2]}function Vt(At,Xt){return[At[0]*Xt,At[1]*Xt,At[2]*Xt]}function ot(At){var Xt=M(At[0]*At[0]+At[1]*At[1]+At[2]*At[2]);At[0]/=Xt,At[1]/=Xt,At[2]/=Xt}var ut,Wt,Nt,$t,sr,Tr,fr,$e,St=r(),Qt,Gt,_t={point:It,lineStart:er,lineEnd:lr,polygonStart:function(){_t.point=wr,_t.lineStart=Lr,_t.lineEnd=ti,St.reset(),Se.polygonStart()},polygonEnd:function(){Se.polygonEnd(),_t.point=It,_t.lineStart=er,_t.lineEnd=lr,re<0?(ut=-(Nt=180),Wt=-($t=90)):St>o?$t=90:St<-o&&(Wt=-90),Gt[0]=ut,Gt[1]=Nt},sphere:function(){ut=-(Nt=180),Wt=-($t=90)}};function It(At,Xt){Qt.push(Gt=[ut=At,Nt=At]),Xt$t&&($t=Xt)}function mt(At,Xt){var Cr=ce([At*d,Xt*d]);if($e){var Ar=lt($e,Cr),Kr=[Ar[1],-Ar[0],0],ki=lt(Kr,Ar);ot(ki),ki=De(ki);var Xi=At-sr,dn=Xi>0?1:-1,wn=ki[0]*h*dn,Nn,Yi=v(Xi)>180;Yi^(dn*sr$t&&($t=Nn)):(wn=(wn+360)%360-180,Yi^(dn*sr$t&&($t=Xt))),Yi?AtBr(ut,Nt)&&(Nt=At):Br(At,Nt)>Br(ut,Nt)&&(ut=At):Nt>=ut?(AtNt&&(Nt=At)):At>sr?Br(ut,At)>Br(ut,Nt)&&(Nt=At):Br(At,Nt)>Br(ut,Nt)&&(ut=At)}else Qt.push(Gt=[ut=At,Nt=At]);Xt$t&&($t=Xt),$e=Cr,sr=At}function er(){_t.point=mt}function lr(){Gt[0]=ut,Gt[1]=Nt,_t.point=It,$e=null}function wr(At,Xt){if($e){var Cr=At-sr;St.add(v(Cr)>180?Cr+(Cr>0?360:-360):Cr)}else Tr=At,fr=Xt;Se.point(At,Xt),mt(At,Xt)}function Lr(){Se.lineStart()}function ti(){wr(Tr,fr),Se.lineEnd(),v(St)>o&&(ut=-(Nt=180)),Gt[0]=ut,Gt[1]=Nt,$e=null}function Br(At,Xt){return(Xt-=At)<0?Xt+360:Xt}function Vr(At,Xt){return At[0]-Xt[0]}function dt(At,Xt){return At[0]<=At[1]?At[0]<=Xt&&Xt<=At[1]:XtBr(Ar[0],Ar[1])&&(Ar[1]=Kr[1]),Br(Kr[0],Ar[1])>Br(Ar[0],Ar[1])&&(Ar[0]=Kr[0])):ki.push(Ar=Kr);for(Xi=-1/0,Cr=ki.length-1,Xt=0,Ar=ki[Cr];Xt<=Cr;Ar=Kr,++Xt)Kr=ki[Xt],(dn=Br(Ar[1],Kr[0]))>Xi&&(Xi=dn,ut=Kr[0],Nt=Ar[1])}return Qt=Gt=null,ut===1/0||Wt===1/0?[[NaN,NaN],[NaN,NaN]]:[[ut,Wt],[Nt,$t]]}var Je,We,tt,xt,Ie,xe,ke,vt,ir,ar,vr,ii,pi,$r,di,ji,In={sphere:O,point:wi,lineStart:qn,lineEnd:la,polygonStart:function(){In.lineStart=Ut,In.lineEnd=wt},polygonEnd:function(){In.lineStart=qn,In.lineEnd=la}};function wi(At,Xt){At*=d,Xt*=d;var Cr=p(Xt);On(Cr*p(At),Cr*x(At),x(Xt))}function On(At,Xt,Cr){++Je,tt+=(At-tt)/Je,xt+=(Xt-xt)/Je,Ie+=(Cr-Ie)/Je}function qn(){In.point=Fn}function Fn(At,Xt){At*=d,Xt*=d;var Cr=p(Xt);$r=Cr*p(At),di=Cr*x(At),ji=x(Xt),In.point=ra,On($r,di,ji)}function ra(At,Xt){At*=d,Xt*=d;var Cr=p(Xt),Ar=Cr*p(At),Kr=Cr*x(At),ki=x(Xt),Xi=b(M((Xi=di*ki-ji*Kr)*Xi+(Xi=ji*Ar-$r*ki)*Xi+(Xi=$r*Kr-di*Ar)*Xi),$r*Ar+di*Kr+ji*ki);We+=Xi,xe+=Xi*($r+($r=Ar)),ke+=Xi*(di+(di=Kr)),vt+=Xi*(ji+(ji=ki)),On($r,di,ji)}function la(){In.point=wi}function Ut(){In.point=rr}function wt(){nr(ii,pi),In.point=wi}function rr(At,Xt){ii=At,pi=Xt,At*=d,Xt*=d,In.point=nr;var Cr=p(Xt);$r=Cr*p(At),di=Cr*x(At),ji=x(Xt),On($r,di,ji)}function nr(At,Xt){At*=d,Xt*=d;var Cr=p(Xt),Ar=Cr*p(At),Kr=Cr*x(At),ki=x(Xt),Xi=di*ki-ji*Kr,dn=ji*Ar-$r*ki,wn=$r*Kr-di*Ar,Nn=M(Xi*Xi+dn*dn+wn*wn),Yi=A(Nn),Qi=Nn&&-Yi/Nn;ir+=Qi*Xi,ar+=Qi*dn,vr+=Qi*wn,We+=Yi,xe+=Yi*($r+($r=Ar)),ke+=Yi*(di+(di=Kr)),vt+=Yi*(ji+(ji=ki)),On($r,di,ji)}function Er(At){Je=We=tt=xt=Ie=xe=ke=vt=ir=ar=vr=0,H(At,In);var Xt=ir,Cr=ar,Ar=vr,Kr=Xt*Xt+Cr*Cr+Ar*Ar;return Krl?At+Math.round(-At/f)*f:At,Xt]}Qr.invert=Qr;function Oi(At,Xt,Cr){return(At%=f)?Xt||Cr?ri(tn(At),fn(Xt,Cr)):tn(At):Xt||Cr?fn(Xt,Cr):Qr}function $i(At){return function(Xt,Cr){return Xt+=At,[Xt>l?Xt-f:Xt<-l?Xt+f:Xt,Cr]}}function tn(At){var Xt=$i(At);return Xt.invert=$i(-At),Xt}function fn(At,Xt){var Cr=p(At),Ar=x(At),Kr=p(Xt),ki=x(Xt);function Xi(dn,wn){var Nn=p(wn),Yi=p(dn)*Nn,Qi=x(dn)*Nn,on=x(wn),Fi=on*Cr+Yi*Ar;return[b(Qi*Kr-Fi*ki,Yi*Cr-on*Ar),A(Fi*Kr+Qi*ki)]}return Xi.invert=function(dn,wn){var Nn=p(wn),Yi=p(dn)*Nn,Qi=x(dn)*Nn,on=x(wn),Fi=on*Kr-Qi*ki;return[b(Qi*Kr+on*ki,Yi*Cr+Fi*Ar),A(Fi*Cr-Yi*Ar)]},Xi}function yn(At){At=Oi(At[0]*d,At[1]*d,At.length>2?At[2]*d:0);function Xt(Cr){return Cr=At(Cr[0]*d,Cr[1]*d),Cr[0]*=h,Cr[1]*=h,Cr}return Xt.invert=function(Cr){return Cr=At.invert(Cr[0]*d,Cr[1]*d),Cr[0]*=h,Cr[1]*=h,Cr},Xt}function Sn(At,Xt,Cr,Ar,Kr,ki){if(Cr){var Xi=p(Xt),dn=x(Xt),wn=Ar*Cr;Kr==null?(Kr=Xt+Ar*f,ki=Xt-wn/2):(Kr=Ba(Xi,Kr),ki=Ba(Xi,ki),(Ar>0?Krki)&&(Kr+=Ar*f));for(var Nn,Yi=Kr;Ar>0?Yi>ki:Yi1&&At.push(At.pop().concat(At.shift()))},result:function(){var Cr=At;return At=[],Xt=null,Cr}}}function Wa(At,Xt){return v(At[0]-Xt[0])=0;--dn)Kr.point((Qi=Yi[dn])[0],Qi[1]);else Ar(on.x,on.p.x,-1,Kr);on=on.p}on=on.o,Yi=on.z,Fi=!Fi}while(!on.v);Kr.lineEnd()}}}function da(At){if(Xt=At.length){for(var Xt,Cr=0,Ar=At[0],Kr;++Cr=0?1:-1,as=Ss*Zo,ws=as>l,Ho=Ca*Ka;if(Wn.add(b(Ho*Ss*x(as),Ra*bo+Ho*p(as))),Xi+=ws?Zo+Ss*f:Zo,ws^Fi>=Cr^Yn>=Cr){var ml=lt(ce(on),ce(Na));ot(ml);var Ws=lt(ki,ml);ot(Ws);var Ls=(ws^Zo>=0?-1:1)*A(Ws[2]);(Ar>Ls||Ar===Ls&&(ml[0]||ml[1]))&&(dn+=ws^Zo>=0?1:-1)}}return(Xi<-o||Xi0){for(wn||(Kr.polygonStart(),wn=!0),Kr.lineStart(),bo=0;bo1&&Dn&2&&Ka.push(Ka.pop().concat(Ka.shift())),Yi.push(Ka.filter(Mt))}}return on}}function Mt(At){return At.length>1}function kr(At,Xt){return((At=At.x)[0]<0?At[1]-u-o:u-At[1])-((Xt=Xt.x)[0]<0?Xt[1]-u-o:u-Xt[1])}var Jr=jn(function(){return!0},vi,An,[-l,-u]);function vi(At){var Xt=NaN,Cr=NaN,Ar=NaN,Kr;return{lineStart:function(){At.lineStart(),Kr=1},point:function(ki,Xi){var dn=ki>0?l:-l,wn=v(ki-Xt);v(wn-l)0?u:-u),At.point(Ar,Cr),At.lineEnd(),At.lineStart(),At.point(dn,Cr),At.point(ki,Cr),Kr=0):Ar!==dn&&wn>=l&&(v(Xt-Ar)o?_((x(Xt)*(ki=p(Ar))*x(Cr)-x(Ar)*(Kr=p(Xt))*x(At))/(Kr*ki*Xi)):(Xt+Ar)/2}function An(At,Xt,Cr,Ar){var Kr;if(At==null)Kr=Cr*u,Ar.point(-l,Kr),Ar.point(0,Kr),Ar.point(l,Kr),Ar.point(l,0),Ar.point(l,-Kr),Ar.point(0,-Kr),Ar.point(-l,-Kr),Ar.point(-l,0),Ar.point(-l,Kr);else if(v(At[0]-Xt[0])>o){var ki=At[0]0,Kr=v(Xt)>o;function ki(Yi,Qi,on,Fi){Sn(Fi,At,Cr,on,Yi,Qi)}function Xi(Yi,Qi){return p(Yi)*p(Qi)>Xt}function dn(Yi){var Qi,on,Fi,Qn,Ca;return{lineStart:function(){Qn=Fi=!1,Ca=1},point:function(Ra,La){var Na=[Ra,La],Yn,Dn=Xi(Ra,La),Ka=Ar?Dn?0:Nn(Ra,La):Dn?Nn(Ra+(Ra<0?l:-l),La):0;if(!Qi&&(Qn=Fi=Dn)&&Yi.lineStart(),Dn!==Fi&&(Yn=wn(Qi,Na),(!Yn||Wa(Qi,Yn)||Wa(Na,Yn))&&(Na[2]=1)),Dn!==Fi)Ca=0,Dn?(Yi.lineStart(),Yn=wn(Na,Qi),Yi.point(Yn[0],Yn[1])):(Yn=wn(Qi,Na),Yi.point(Yn[0],Yn[1],2),Yi.lineEnd()),Qi=Yn;else if(Kr&&Qi&&Ar^Dn){var bo;!(Ka&on)&&(bo=wn(Na,Qi,!0))&&(Ca=0,Ar?(Yi.lineStart(),Yi.point(bo[0][0],bo[0][1]),Yi.point(bo[1][0],bo[1][1]),Yi.lineEnd()):(Yi.point(bo[1][0],bo[1][1]),Yi.lineEnd(),Yi.lineStart(),Yi.point(bo[0][0],bo[0][1],3)))}Dn&&(!Qi||!Wa(Qi,Na))&&Yi.point(Na[0],Na[1]),Qi=Na,Fi=Dn,on=Ka},lineEnd:function(){Fi&&Yi.lineEnd(),Qi=null},clean:function(){return Ca|(Qn&&Fi)<<1}}}function wn(Yi,Qi,on){var Fi=ce(Yi),Qn=ce(Qi),Ca=[1,0,0],Ra=lt(Fi,Qn),La=je(Ra,Ra),Na=Ra[0],Yn=La-Na*Na;if(!Yn)return!on&&Yi;var Dn=Xt*La/Yn,Ka=-Xt*Na/Yn,bo=lt(Ca,Ra),Zo=Vt(Ca,Dn),Ss=Vt(Ra,Ka);pt(Zo,Ss);var as=bo,ws=je(Zo,as),Ho=je(as,as),ml=ws*ws-Ho*(je(Zo,Zo)-1);if(!(ml<0)){var Ws=M(ml),Ls=Vt(as,(-ws-Ws)/Ho);if(pt(Ls,Zo),Ls=De(Ls),!on)return Ls;var va=Yi[0],no=Qi[0],ys=Yi[1],rs=Qi[1],Ql;no0^Ls[1]<(v(Ls[0]-va)l^(va<=Ls[0]&&Ls[0]<=no)){var pu=Vt(as,(-ws+Ws)/Ho);return pt(pu,Zo),[Ls,De(pu)]}}}function Nn(Yi,Qi){var on=Ar?At:l-At,Fi=0;return Yi<-on?Fi|=1:Yi>on&&(Fi|=2),Qi<-on?Fi|=4:Qi>on&&(Fi|=8),Fi}return jn(Xi,dn,ki,Ar?[0,-At]:[-l,At-l])}function Li(At,Xt,Cr,Ar,Kr,ki){var Xi=At[0],dn=At[1],wn=Xt[0],Nn=Xt[1],Yi=0,Qi=1,on=wn-Xi,Fi=Nn-dn,Qn;if(Qn=Cr-Xi,!(!on&&Qn>0)){if(Qn/=on,on<0){if(Qn0){if(Qn>Qi)return;Qn>Yi&&(Yi=Qn)}if(Qn=Kr-Xi,!(!on&&Qn<0)){if(Qn/=on,on<0){if(Qn>Qi)return;Qn>Yi&&(Yi=Qn)}else if(on>0){if(Qn0)){if(Qn/=Fi,Fi<0){if(Qn0){if(Qn>Qi)return;Qn>Yi&&(Yi=Qn)}if(Qn=ki-dn,!(!Fi&&Qn<0)){if(Qn/=Fi,Fi<0){if(Qn>Qi)return;Qn>Yi&&(Yi=Qn)}else if(Fi>0){if(Qn0&&(At[0]=Xi+Yi*on,At[1]=dn+Yi*Fi),Qi<1&&(Xt[0]=Xi+Qi*on,Xt[1]=dn+Qi*Fi),!0}}}}}var _n=1e9,ya=-_n;function $n(At,Xt,Cr,Ar){function Kr(Nn,Yi){return At<=Nn&&Nn<=Cr&&Xt<=Yi&&Yi<=Ar}function ki(Nn,Yi,Qi,on){var Fi=0,Qn=0;if(Nn==null||(Fi=Xi(Nn,Qi))!==(Qn=Xi(Yi,Qi))||wn(Nn,Yi)<0^Qi>0)do on.point(Fi===0||Fi===3?At:Cr,Fi>1?Ar:Xt);while((Fi=(Fi+Qi+4)%4)!==Qn);else on.point(Yi[0],Yi[1])}function Xi(Nn,Yi){return v(Nn[0]-At)0?0:3:v(Nn[0]-Cr)0?2:1:v(Nn[1]-Xt)0?1:0:Yi>0?3:2}function dn(Nn,Yi){return wn(Nn.x,Yi.x)}function wn(Nn,Yi){var Qi=Xi(Nn,1),on=Xi(Yi,1);return Qi!==on?Qi-on:Qi===0?Yi[1]-Nn[1]:Qi===1?Nn[0]-Yi[0]:Qi===2?Nn[1]-Yi[1]:Yi[0]-Nn[0]}return function(Nn){var Yi=Nn,Qi=ma(),on,Fi,Qn,Ca,Ra,La,Na,Yn,Dn,Ka,bo,Zo={point:Ss,lineStart:ml,lineEnd:Ws,polygonStart:ws,polygonEnd:Ho};function Ss(va,no){Kr(va,no)&&Yi.point(va,no)}function as(){for(var va=0,no=0,ys=Fi.length;noAr&&(Uc-Nc)*(Ar-pu)>(xu-pu)*(At-Nc)&&++va:xu<=Ar&&(Uc-Nc)*(Ar-pu)<(xu-pu)*(At-Nc)&&--va;return va}function ws(){Yi=Qi,on=[],Fi=[],bo=!0}function Ho(){var va=as(),no=bo&&va,ys=(on=t.merge(on)).length;(no||ys)&&(Nn.polygonStart(),no&&(Nn.lineStart(),ki(null,null,1,Nn),Nn.lineEnd()),ys&&Xo(on,dn,va,ki,Nn),Nn.polygonEnd()),Yi=Nn,on=Fi=Qn=null}function ml(){Zo.point=Ls,Fi&&Fi.push(Qn=[]),Ka=!0,Dn=!1,Na=Yn=NaN}function Ws(){on&&(Ls(Ca,Ra),La&&Dn&&Qi.rejoin(),on.push(Qi.result())),Zo.point=Ss,Dn&&Yi.lineEnd()}function Ls(va,no){var ys=Kr(va,no);if(Fi&&Qn.push([va,no]),Ka)Ca=va,Ra=no,La=ys,Ka=!1,ys&&(Yi.lineStart(),Yi.point(va,no));else if(ys&&Dn)Yi.point(va,no);else{var rs=[Na=Math.max(ya,Math.min(_n,Na)),Yn=Math.max(ya,Math.min(_n,Yn))],Ql=[va=Math.max(ya,Math.min(_n,va)),no=Math.max(ya,Math.min(_n,no))];Li(rs,Ql,At,Xt,Cr,Ar)?(Dn||(Yi.lineStart(),Yi.point(rs[0],rs[1])),Yi.point(Ql[0],Ql[1]),ys||Yi.lineEnd(),bo=!1):ys&&(Yi.lineStart(),Yi.point(va,no),bo=!1)}Na=va,Yn=no,Dn=ys}return Zo}}function Ma(){var At=0,Xt=0,Cr=960,Ar=500,Kr,ki,Xi;return Xi={stream:function(dn){return Kr&&ki===dn?Kr:Kr=$n(At,Xt,Cr,Ar)(ki=dn)},extent:function(dn){return arguments.length?(At=+dn[0][0],Xt=+dn[0][1],Cr=+dn[1][0],Ar=+dn[1][1],Kr=ki=null,Xi):[[At,Xt],[Cr,Ar]]}}}var _o=r(),No,po,Lo,ko={sphere:O,point:O,lineStart:Ds,lineEnd:O,polygonStart:O,polygonEnd:O};function Ds(){ko.point=ll,ko.lineEnd=Fs}function Fs(){ko.point=ko.lineEnd=O}function ll(At,Xt){At*=d,Xt*=d,No=At,po=x(Xt),Lo=p(Xt),ko.point=ul}function ul(At,Xt){At*=d,Xt*=d;var Cr=x(Xt),Ar=p(Xt),Kr=v(At-No),ki=p(Kr),Xi=x(Kr),dn=Ar*Xi,wn=Lo*Cr-po*Ar*ki,Nn=po*Cr+Lo*Ar*ki;_o.add(b(M(dn*dn+wn*wn),Nn)),No=At,po=Cr,Lo=Ar}function zl(At){return _o.reset(),H(At,ko),+_o}var us=[null,null],il={type:"LineString",coordinates:us};function As(At,Xt){return us[0]=At,us[1]=Xt,zl(il)}var cl={Feature:function(At,Xt){return zs(At.geometry,Xt)},FeatureCollection:function(At,Xt){for(var Cr=At.features,Ar=-1,Kr=Cr.length;++Ar0&&(Kr=As(At[ki],At[ki-1]),Kr>0&&Cr<=Kr&&Ar<=Kr&&(Cr+Ar-Kr)*(1-Math.pow((Cr-Ar)/Kr,2))o}).map(on)).concat(t.range(k(ki/Nn)*Nn,Kr,Nn).filter(function(Yn){return v(Yn%Qi)>o}).map(Fi))}return La.lines=function(){return Na().map(function(Yn){return{type:"LineString",coordinates:Yn}})},La.outline=function(){return{type:"Polygon",coordinates:[Qn(Ar).concat(Ca(Xi).slice(1),Qn(Cr).reverse().slice(1),Ca(dn).reverse().slice(1))]}},La.extent=function(Yn){return arguments.length?La.extentMajor(Yn).extentMinor(Yn):La.extentMinor()},La.extentMajor=function(Yn){return arguments.length?(Ar=+Yn[0][0],Cr=+Yn[1][0],dn=+Yn[0][1],Xi=+Yn[1][1],Ar>Cr&&(Yn=Ar,Ar=Cr,Cr=Yn),dn>Xi&&(Yn=dn,dn=Xi,Xi=Yn),La.precision(Ra)):[[Ar,dn],[Cr,Xi]]},La.extentMinor=function(Yn){return arguments.length?(Xt=+Yn[0][0],At=+Yn[1][0],ki=+Yn[0][1],Kr=+Yn[1][1],Xt>At&&(Yn=Xt,Xt=At,At=Yn),ki>Kr&&(Yn=ki,ki=Kr,Kr=Yn),La.precision(Ra)):[[Xt,ki],[At,Kr]]},La.step=function(Yn){return arguments.length?La.stepMajor(Yn).stepMinor(Yn):La.stepMinor()},La.stepMajor=function(Yn){return arguments.length?(Yi=+Yn[0],Qi=+Yn[1],La):[Yi,Qi]},La.stepMinor=function(Yn){return arguments.length?(wn=+Yn[0],Nn=+Yn[1],La):[wn,Nn]},La.precision=function(Yn){return arguments.length?(Ra=+Yn,on=Rn(ki,Kr,90),Fi=_a(Xt,At,Ra),Qn=Rn(dn,Xi,90),Ca=_a(Ar,Cr,Ra),La):Ra},La.extentMajor([[-180,-90+o],[180,90-o]]).extentMinor([[-180,-80-o],[180,80+o]])}function Ol(){return Vu()()}function xo(At,Xt){var Cr=At[0]*d,Ar=At[1]*d,Kr=Xt[0]*d,ki=Xt[1]*d,Xi=p(Ar),dn=x(Ar),wn=p(ki),Nn=x(ki),Yi=Xi*p(Cr),Qi=Xi*x(Cr),on=wn*p(Kr),Fi=wn*x(Kr),Qn=2*A(M(z(ki-Ar)+Xi*wn*z(Kr-Cr))),Ca=x(Qn),Ra=Qn?function(La){var Na=x(La*=Qn)/Ca,Yn=x(Qn-La)/Ca,Dn=Yn*Yi+Na*on,Ka=Yn*Qi+Na*Fi,bo=Yn*dn+Na*Nn;return[b(Ka,Dn)*h,b(bo,M(Dn*Dn+Ka*Ka))*h]}:function(){return[Cr*h,Ar*h]};return Ra.distance=Qn,Ra}function Kl(At){return At}var Ns=r(),Hl=r(),ac,aa,Oo,qo,ql={point:O,lineStart:O,lineEnd:O,polygonStart:function(){ql.lineStart=Pc,ql.lineEnd=Vf},polygonEnd:function(){ql.lineStart=ql.lineEnd=ql.point=O,Ns.add(v(Hl)),Hl.reset()},result:function(){var At=Ns/2;return Ns.reset(),At}};function Pc(){ql.point=Do}function Do(At,Xt){ql.point=rf,ac=Oo=At,aa=qo=Xt}function rf(At,Xt){Hl.add(qo*At-Oo*Xt),Oo=At,qo=Xt}function Vf(){rf(ac,aa)}var pl=1/0,Zc=pl,Jl=-pl,Os=Jl,yu={point:oc,lineStart:O,lineEnd:O,polygonStart:O,polygonEnd:O,result:function(){var At=[[pl,Zc],[Jl,Os]];return Jl=Os=-(Zc=pl=1/0),At}};function oc(At,Xt){AtJl&&(Jl=At),XtOs&&(Os=Xt)}var Cf=0,sc=0,jh=0,Lf=0,cs=0,nf=0,Gf=0,$l=0,fl=0,lc,Fu,Es,Hs,Go={point:ps,lineStart:uc,lineEnd:qs,polygonStart:function(){Go.lineStart=od,Go.lineEnd=Po},polygonEnd:function(){Go.point=ps,Go.lineStart=uc,Go.lineEnd=qs},result:function(){var At=fl?[Gf/fl,$l/fl]:nf?[Lf/nf,cs/nf]:jh?[Cf/jh,sc/jh]:[NaN,NaN];return Cf=sc=jh=Lf=cs=nf=Gf=$l=fl=0,At}};function ps(At,Xt){Cf+=At,sc+=Xt,++jh}function uc(){Go.point=xl}function xl(At,Xt){Go.point=Gu,ps(Es=At,Hs=Xt)}function Gu(At,Xt){var Cr=At-Es,Ar=Xt-Hs,Kr=M(Cr*Cr+Ar*Ar);Lf+=Kr*(Es+At)/2,cs+=Kr*(Hs+Xt)/2,nf+=Kr,ps(Es=At,Hs=Xt)}function qs(){Go.point=ps}function od(){Go.point=sd}function Po(){Ko(lc,Fu)}function sd(At,Xt){Go.point=Ko,ps(lc=Es=At,Fu=Hs=Xt)}function Ko(At,Xt){var Cr=At-Es,Ar=Xt-Hs,Kr=M(Cr*Cr+Ar*Ar);Lf+=Kr*(Es+At)/2,cs+=Kr*(Hs+Xt)/2,nf+=Kr,Kr=Hs*At-Es*Xt,Gf+=Kr*(Es+At),$l+=Kr*(Hs+Xt),fl+=Kr*3,ps(Es=At,Hs=Xt)}function Pa(At){this._context=At}Pa.prototype={_radius:4.5,pointRadius:function(At){return this._radius=At,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(At,Xt){switch(this._point){case 0:{this._context.moveTo(At,Xt),this._point=1;break}case 1:{this._context.lineTo(At,Xt);break}default:{this._context.moveTo(At+this._radius,Xt),this._context.arc(At,Xt,this._radius,0,f);break}}},result:O};var af=r(),Hu,bl,Hf,Ic,yf,Bl={point:O,lineStart:function(){Bl.point=Ah},lineEnd:function(){Hu&&Qf(bl,Hf),Bl.point=O},polygonStart:function(){Hu=!0},polygonEnd:function(){Hu=null},result:function(){var At=+af;return af.reset(),At}};function Ah(At,Xt){Bl.point=Qf,bl=Ic=At,Hf=yf=Xt}function Qf(At,Xt){Ic-=At,yf-=Xt,af.add(M(Ic*Ic+yf*yf)),Ic=At,yf=Xt}function _f(){this._string=[]}_f.prototype={_radius:4.5,_circle:Yc(4.5),pointRadius:function(At){return(At=+At)!==this._radius&&(this._radius=At,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(At,Xt){switch(this._point){case 0:{this._string.push("M",At,",",Xt),this._point=1;break}case 1:{this._string.push("L",At,",",Xt);break}default:{this._circle==null&&(this._circle=Yc(this._radius)),this._string.push("M",At,",",Xt,this._circle);break}}},result:function(){if(this._string.length){var At=this._string.join("");return this._string=[],At}else return null}};function Yc(At){return"m0,"+At+"a"+At+","+At+" 0 1,1 0,"+-2*At+"a"+At+","+At+" 0 1,1 0,"+2*At+"z"}function eh(At,Xt){var Cr=4.5,Ar,Kr;function ki(Xi){return Xi&&(typeof Cr=="function"&&Kr.pointRadius(+Cr.apply(this,arguments)),H(Xi,Ar(Kr))),Kr.result()}return ki.area=function(Xi){return H(Xi,Ar(ql)),ql.result()},ki.measure=function(Xi){return H(Xi,Ar(Bl)),Bl.result()},ki.bounds=function(Xi){return H(Xi,Ar(yu)),yu.result()},ki.centroid=function(Xi){return H(Xi,Ar(Go)),Go.result()},ki.projection=function(Xi){return arguments.length?(Ar=Xi==null?(At=null,Kl):(At=Xi).stream,ki):At},ki.context=function(Xi){return arguments.length?(Kr=Xi==null?(Xt=null,new _f):new Pa(Xt=Xi),typeof Cr!="function"&&Kr.pointRadius(Cr),ki):Xt},ki.pointRadius=function(Xi){return arguments.length?(Cr=typeof Xi=="function"?Xi:(Kr.pointRadius(+Xi),+Xi),ki):Cr},ki.projection(At).context(Xt)}function th(At){return{stream:ju(At)}}function ju(At){return function(Xt){var Cr=new jf;for(var Ar in At)Cr[Ar]=At[Ar];return Cr.stream=Xt,Cr}}function jf(){}jf.prototype={constructor:jf,point:function(At,Xt){this.stream.point(At,Xt)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function cc(At,Xt,Cr){var Ar=At.clipExtent&&At.clipExtent();return At.scale(150).translate([0,0]),Ar!=null&&At.clipExtent(null),H(Cr,At.stream(yu)),Xt(yu.result()),Ar!=null&&At.clipExtent(Ar),At}function of(At,Xt,Cr){return cc(At,function(Ar){var Kr=Xt[1][0]-Xt[0][0],ki=Xt[1][1]-Xt[0][1],Xi=Math.min(Kr/(Ar[1][0]-Ar[0][0]),ki/(Ar[1][1]-Ar[0][1])),dn=+Xt[0][0]+(Kr-Xi*(Ar[1][0]+Ar[0][0]))/2,wn=+Xt[0][1]+(ki-Xi*(Ar[1][1]+Ar[0][1]))/2;At.scale(150*Xi).translate([dn,wn])},Cr)}function Nl(At,Xt,Cr){return of(At,[[0,0],Xt],Cr)}function Kc(At,Xt,Cr){return cc(At,function(Ar){var Kr=+Xt,ki=Kr/(Ar[1][0]-Ar[0][0]),Xi=(Kr-ki*(Ar[1][0]+Ar[0][0]))/2,dn=-ki*Ar[0][1];At.scale(150*ki).translate([Xi,dn])},Cr)}function Rc(At,Xt,Cr){return cc(At,function(Ar){var Kr=+Xt,ki=Kr/(Ar[1][1]-Ar[0][1]),Xi=-ki*Ar[0][0],dn=(Kr-ki*(Ar[1][1]+Ar[0][1]))/2;At.scale(150*ki).translate([Xi,dn])},Cr)}var gs=16,Wf=p(30*d);function Wh(At,Xt){return+Xt?sf(At,Xt):rh(At)}function rh(At){return ju({point:function(Xt,Cr){Xt=At(Xt,Cr),this.stream.point(Xt[0],Xt[1])}})}function sf(At,Xt){function Cr(Ar,Kr,ki,Xi,dn,wn,Nn,Yi,Qi,on,Fi,Qn,Ca,Ra){var La=Nn-Ar,Na=Yi-Kr,Yn=La*La+Na*Na;if(Yn>4*Xt&&Ca--){var Dn=Xi+on,Ka=dn+Fi,bo=wn+Qn,Zo=M(Dn*Dn+Ka*Ka+bo*bo),Ss=A(bo/=Zo),as=v(v(bo)-1)Xt||v((La*Ws+Na*Ls)/Yn-.5)>.3||Xi*on+dn*Fi+wn*Qn2?va[2]%360*d:0,Ws()):[dn*h,wn*h,Nn*h]},Ho.angle=function(va){return arguments.length?(Qi=va%360*d,Ws()):Qi*h},Ho.reflectX=function(va){return arguments.length?(on=va?-1:1,Ws()):on<0},Ho.reflectY=function(va){return arguments.length?(Fi=va?-1:1,Ws()):Fi<0},Ho.precision=function(va){return arguments.length?(bo=Wh(Zo,Ka=va*va),Ls()):M(Ka)},Ho.fitExtent=function(va,no){return of(Ho,va,no)},Ho.fitSize=function(va,no){return Nl(Ho,va,no)},Ho.fitWidth=function(va,no){return Kc(Ho,va,no)},Ho.fitHeight=function(va,no){return Rc(Ho,va,no)};function Ws(){var va=js(Cr,0,0,on,Fi,Qi).apply(null,Xt(ki,Xi)),no=(Qi?js:ih)(Cr,Ar-va[0],Kr-va[1],on,Fi,Qi);return Yi=Oi(dn,wn,Nn),Zo=ri(Xt,no),Ss=ri(Yi,Zo),bo=Wh(Zo,Ka),Ls()}function Ls(){return as=ws=null,Ho}return function(){return Xt=At.apply(this,arguments),Ho.invert=Xt.invert&&ml,Ws()}}function ks(At){var Xt=0,Cr=l/3,Ar=Dc(At),Kr=Ar(Xt,Cr);return Kr.parallels=function(ki){return arguments.length?Ar(Xt=ki[0]*d,Cr=ki[1]*d):[Xt*h,Cr*h]},Kr}function bc(At){var Xt=p(At);function Cr(Ar,Kr){return[Ar*Xt,x(Kr)/Xt]}return Cr.invert=function(Ar,Kr){return[Ar/Xt,A(Kr*Xt)]},Cr}function hu(At,Xt){var Cr=x(At),Ar=(Cr+x(Xt))/2;if(v(Ar)=.12&&Ra<.234&&Ca>=-.425&&Ca<-.214?Kr:Ra>=.166&&Ra<.234&&Ca>=-.214&&Ca<-.115?Xi:Cr).invert(on)},Yi.stream=function(on){return At&&Xt===on?At:At=nh([Cr.stream(Xt=on),Kr.stream(on),Xi.stream(on)])},Yi.precision=function(on){return arguments.length?(Cr.precision(on),Kr.precision(on),Xi.precision(on),Qi()):Cr.precision()},Yi.scale=function(on){return arguments.length?(Cr.scale(on),Kr.scale(on*.35),Xi.scale(on),Yi.translate(Cr.translate())):Cr.scale()},Yi.translate=function(on){if(!arguments.length)return Cr.translate();var Fi=Cr.scale(),Qn=+on[0],Ca=+on[1];return Ar=Cr.translate(on).clipExtent([[Qn-.455*Fi,Ca-.238*Fi],[Qn+.455*Fi,Ca+.238*Fi]]).stream(Nn),ki=Kr.translate([Qn-.307*Fi,Ca+.201*Fi]).clipExtent([[Qn-.425*Fi+o,Ca+.12*Fi+o],[Qn-.214*Fi-o,Ca+.234*Fi-o]]).stream(Nn),dn=Xi.translate([Qn-.205*Fi,Ca+.212*Fi]).clipExtent([[Qn-.214*Fi+o,Ca+.166*Fi+o],[Qn-.115*Fi-o,Ca+.234*Fi-o]]).stream(Nn),Qi()},Yi.fitExtent=function(on,Fi){return of(Yi,on,Fi)},Yi.fitSize=function(on,Fi){return Nl(Yi,on,Fi)},Yi.fitWidth=function(on,Fi){return Kc(Yi,on,Fi)},Yi.fitHeight=function(on,Fi){return Rc(Yi,on,Fi)};function Qi(){return At=Xt=null,Yi}return Yi.scale(1070)}function zu(At){return function(Xt,Cr){var Ar=p(Xt),Kr=p(Cr),ki=At(Ar*Kr);return[ki*Kr*x(Xt),ki*x(Cr)]}}function Fc(At){return function(Xt,Cr){var Ar=M(Xt*Xt+Cr*Cr),Kr=At(Ar),ki=x(Kr),Xi=p(Kr);return[b(Xt*ki,Ar*Xi),A(Ar&&Cr*ki/Ar)]}}var wc=zu(function(At){return M(2/(1+At))});wc.invert=Fc(function(At){return 2*A(At/2)});function bd(){return Eu(wc).scale(124.75).clipAngle(180-.001)}var xf=zu(function(At){return(At=P(At))&&At/x(At)});xf.invert=Fc(function(At){return At});function Pf(){return Eu(xf).scale(79.4188).clipAngle(180-.001)}function Ou(At,Xt){return[At,T(g((u+Xt)/2))]}Ou.invert=function(At,Xt){return[At,2*_(E(Xt))-u]};function bf(){return jl(Ou).scale(961/f)}function jl(At){var Xt=Eu(At),Cr=Xt.center,Ar=Xt.scale,Kr=Xt.translate,ki=Xt.clipExtent,Xi=null,dn,wn,Nn;Xt.scale=function(Qi){return arguments.length?(Ar(Qi),Yi()):Ar()},Xt.translate=function(Qi){return arguments.length?(Kr(Qi),Yi()):Kr()},Xt.center=function(Qi){return arguments.length?(Cr(Qi),Yi()):Cr()},Xt.clipExtent=function(Qi){return arguments.length?(Qi==null?Xi=dn=wn=Nn=null:(Xi=+Qi[0][0],dn=+Qi[0][1],wn=+Qi[1][0],Nn=+Qi[1][1]),Yi()):Xi==null?null:[[Xi,dn],[wn,Nn]]};function Yi(){var Qi=l*Ar(),on=Xt(yn(Xt.rotate()).invert([0,0]));return ki(Xi==null?[[on[0]-Qi,on[1]-Qi],[on[0]+Qi,on[1]+Qi]]:At===Ou?[[Math.max(on[0]-Qi,Xi),dn],[Math.min(on[0]+Qi,wn),Nn]]:[[Xi,Math.max(on[1]-Qi,dn)],[wn,Math.min(on[1]+Qi,Nn)]])}return Yi()}function lf(At){return g((u+At)/2)}function Xh(At,Xt){var Cr=p(At),Ar=At===Xt?x(At):T(Cr/p(Xt))/T(lf(Xt)/lf(At)),Kr=Cr*L(lf(At),Ar)/Ar;if(!Ar)return Ou;function ki(Xi,dn){Kr>0?dn<-u+o&&(dn=-u+o):dn>u-o&&(dn=u-o);var wn=Kr/L(lf(dn),Ar);return[wn*x(Ar*Xi),Kr-wn*p(Ar*Xi)]}return ki.invert=function(Xi,dn){var wn=Kr-dn,Nn=C(Ar)*M(Xi*Xi+wn*wn),Yi=b(Xi,v(wn))*C(wn);return wn*Ar<0&&(Yi-=l*C(Xi)*C(wn)),[Yi/Ar,2*_(L(Kr/Nn,1/Ar))-u]},ki}function If(){return ks(Xh).scale(109.5).parallels([30,30])}function Cs(At,Xt){return[At,Xt]}Cs.invert=Cs;function du(){return Eu(Cs).scale(152.63)}function ku(At,Xt){var Cr=p(At),Ar=At===Xt?x(At):(Cr-p(Xt))/(Xt-At),Kr=Cr/Ar+At;if(v(Ar)o&&--Ar>0);return[At/(.8707+(ki=Cr*Cr)*(-.131979+ki*(-.013791+ki*ki*ki*(.003971-.001529*ki)))),Cr]};function Tc(){return Eu(Oc).scale(175.295)}function wl(At,Xt){return[p(Xt)*x(At),x(Xt)]}wl.invert=Fc(A);function vu(){return Eu(wl).scale(249.5).clipAngle(90+o)}function qc(At,Xt){var Cr=p(Xt),Ar=1+p(At)*Cr;return[Cr*x(At)/Ar,x(Xt)/Ar]}qc.invert=Fc(function(At){return 2*_(At)});function cf(){return Eu(qc).scale(250).clipAngle(142)}function fc(At,Xt){return[T(g((u+Xt)/2)),-At]}fc.invert=function(At,Xt){return[-Xt,2*_(E(At))-u]};function Bc(){var At=jl(fc),Xt=At.center,Cr=At.rotate;return At.center=function(Ar){return arguments.length?Xt([-Ar[1],Ar[0]]):(Ar=Xt(),[Ar[1],-Ar[0]])},At.rotate=function(Ar){return arguments.length?Cr([Ar[0],Ar[1],Ar.length>2?Ar[2]+90:90]):(Ar=Cr(),[Ar[0],Ar[1],Ar[2]-90])},Cr([0,0,90]).scale(159.155)}e.geoAlbers=nl,e.geoAlbersUsa=Mh,e.geoArea=me,e.geoAzimuthalEqualArea=bd,e.geoAzimuthalEqualAreaRaw=wc,e.geoAzimuthalEquidistant=Pf,e.geoAzimuthalEquidistantRaw=xf,e.geoBounds=Ge,e.geoCentroid=Er,e.geoCircle=ua,e.geoClipAntimeridian=Jr,e.geoClipCircle=Mn,e.geoClipExtent=Ma,e.geoClipRectangle=$n,e.geoConicConformal=If,e.geoConicConformalRaw=Xh,e.geoConicEqualArea=_u,e.geoConicEqualAreaRaw=hu,e.geoConicEquidistant=Xf,e.geoConicEquidistantRaw=ku,e.geoContains=bs,e.geoDistance=As,e.geoEqualEarth=Zf,e.geoEqualEarthRaw=uf,e.geoEquirectangular=du,e.geoEquirectangularRaw=Cs,e.geoGnomonic=ah,e.geoGnomonicRaw=Wl,e.geoGraticule=Vu,e.geoGraticule10=Ol,e.geoIdentity=Zu,e.geoInterpolate=xo,e.geoLength=zl,e.geoMercator=bf,e.geoMercatorRaw=Ou,e.geoNaturalEarth1=Tc,e.geoNaturalEarth1Raw=Oc,e.geoOrthographic=vu,e.geoOrthographicRaw=wl,e.geoPath=eh,e.geoProjection=Eu,e.geoProjectionMutator=Dc,e.geoRotation=yn,e.geoStereographic=cf,e.geoStereographicRaw=qc,e.geoStream=H,e.geoTransform=th,e.geoTransverseMercator=Bc,e.geoTransverseMercatorRaw=fc,Object.defineProperty(e,"__esModule",{value:!0})})});var qDe=ye((FF,ODe)=>{(function(e,t){typeof FF=="object"&&typeof ODe!="undefined"?t(FF,NZ(),hk()):t(e.d3=e.d3||{},e.d3,e.d3)})(FF,function(e,t,r){"use strict";var n=Math.abs,i=Math.atan,a=Math.atan2,o=Math.cos,s=Math.exp,l=Math.floor,u=Math.log,c=Math.max,f=Math.min,h=Math.pow,d=Math.round,v=Math.sign||function(ve){return ve>0?1:ve<0?-1:0},_=Math.sin,b=Math.tan,p=1e-6,k=1e-12,E=Math.PI,T=E/2,L=E/4,x=Math.SQRT1_2,C=G(2),M=G(E),g=E*2,P=180/E,A=E/180;function z(ve){return ve?ve/Math.sin(ve):1}function O(ve){return ve>1?T:ve<-1?-T:Math.asin(ve)}function U(ve){return ve>1?0:ve<-1?E:Math.acos(ve)}function G(ve){return ve>0?Math.sqrt(ve):0}function Z(ve){return ve=s(2*ve),(ve-1)/(ve+1)}function j(ve){return(s(ve)-s(-ve))/2}function N(ve){return(s(ve)+s(-ve))/2}function H(ve){return u(ve+G(ve*ve+1))}function re(ve){return u(ve+G(ve*ve-1))}function oe(ve){var be=b(ve/2),Re=2*u(o(ve/2))/(be*be);function qe(et,Xe){var it=o(et),Ft=o(Xe),Ht=_(Xe),tr=Ft*it,dr=-((1-tr?u((1+tr)/2)/(1-tr):-.5)+Re/(1+tr));return[dr*Ft*_(et),dr*Ht]}return qe.invert=function(et,Xe){var it=G(et*et+Xe*Xe),Ft=-ve/2,Ht=50,tr;if(!it)return[0,0];do{var dr=Ft/2,Sr=o(dr),Or=_(dr),Wr=Or/Sr,ni=-u(n(Sr));Ft-=tr=(2/Wr*ni-Re*Wr-it)/(-ni/(Or*Or)+1-Re/(2*Sr*Sr))*(Sr<0?.7:1)}while(n(tr)>p&&--Ht>0);var Pi=_(Ft);return[a(et*Pi,it*o(Ft)),O(Xe*Pi/it)]},qe}function _e(){var ve=T,be=t.geoProjectionMutator(oe),Re=be(ve);return Re.radius=function(qe){return arguments.length?be(ve=qe*A):ve*P},Re.scale(179.976).clipAngle(147)}function Ce(ve,be){var Re=o(be),qe=z(U(Re*o(ve/=2)));return[2*Re*_(ve)*qe,_(be)*qe]}Ce.invert=function(ve,be){if(!(ve*ve+4*be*be>E*E+p)){var Re=ve,qe=be,et=25;do{var Xe=_(Re),it=_(Re/2),Ft=o(Re/2),Ht=_(qe),tr=o(qe),dr=_(2*qe),Sr=Ht*Ht,Or=tr*tr,Wr=it*it,ni=1-Or*Ft*Ft,Pi=ni?U(tr*Ft)*G(cn=1/ni):cn=0,cn,ln=2*Pi*tr*it-ve,Cn=Pi*Ht-be,Kn=cn*(Or*Wr+Pi*tr*Ft*Sr),Aa=cn*(.5*Xe*dr-Pi*2*Ht*it),fa=cn*.25*(dr*it-Pi*Ht*Or*Xe),$a=cn*(Sr*Ft+Pi*Wr*tr),Co=Aa*fa-$a*Kn;if(!Co)break;var Qa=(Cn*Aa-ln*$a)/Co,mo=(ln*fa-Cn*Kn)/Co;Re-=Qa,qe-=mo}while((n(Qa)>p||n(mo)>p)&&--et>0);return[Re,qe]}};function Le(){return t.geoProjection(Ce).scale(152.63)}function ge(ve){var be=_(ve),Re=o(ve),qe=ve>=0?1:-1,et=b(qe*ve),Xe=(1+be-Re)/2;function it(Ft,Ht){var tr=o(Ht),dr=o(Ft/=2);return[(1+tr)*_(Ft),(qe*Ht>-a(dr,et)-.001?0:-qe*10)+Xe+_(Ht)*Re-(1+tr)*be*dr]}return it.invert=function(Ft,Ht){var tr=0,dr=0,Sr=50;do{var Or=o(tr),Wr=_(tr),ni=o(dr),Pi=_(dr),cn=1+ni,ln=cn*Wr-Ft,Cn=Xe+Pi*Re-cn*be*Or-Ht,Kn=cn*Or/2,Aa=-Wr*Pi,fa=be*cn*Wr/2,$a=Re*ni+be*Or*Pi,Co=Aa*fa-$a*Kn,Qa=(Cn*Aa-ln*$a)/Co/2,mo=(ln*fa-Cn*Kn)/Co;n(mo)>2&&(mo/=2),tr-=Qa,dr-=mo}while((n(Qa)>p||n(mo)>p)&&--Sr>0);return qe*dr>-a(o(tr),et)-.001?[tr*2,dr]:null},it}function ie(){var ve=20*A,be=ve>=0?1:-1,Re=b(be*ve),qe=t.geoProjectionMutator(ge),et=qe(ve),Xe=et.stream;return et.parallel=function(it){return arguments.length?(Re=b((be=(ve=it*A)>=0?1:-1)*ve),qe(ve)):ve*P},et.stream=function(it){var Ft=et.rotate(),Ht=Xe(it),tr=(et.rotate([0,0]),Xe(it)),dr=et.precision();return et.rotate(Ft),Ht.sphere=function(){tr.polygonStart(),tr.lineStart();for(var Sr=be*-180;be*Sr<180;Sr+=be*90)tr.point(Sr,be*90);if(ve)for(;be*(Sr-=3*be*dr)>=-180;)tr.point(Sr,be*-a(o(Sr*A/2),Re)*P);tr.lineEnd(),tr.polygonEnd()},Ht},et.scale(218.695).center([0,28.0974])}function Se(ve,be){var Re=b(be/2),qe=G(1-Re*Re),et=1+qe*o(ve/=2),Xe=_(ve)*qe/et,it=Re/et,Ft=Xe*Xe,Ht=it*it;return[4/3*Xe*(3+Ft-3*Ht),4/3*it*(3+3*Ft-Ht)]}Se.invert=function(ve,be){if(ve*=3/8,be*=3/8,!ve&&n(be)>1)return null;var Re=ve*ve,qe=be*be,et=1+Re+qe,Xe=G((et-G(et*et-4*be*be))/2),it=O(Xe)/3,Ft=Xe?re(n(be/Xe))/3:H(n(ve))/3,Ht=o(it),tr=N(Ft),dr=tr*tr-Ht*Ht;return[v(ve)*2*a(j(Ft)*Ht,.25-dr),v(be)*2*a(tr*_(it),.25+dr)]};function Ee(){return t.geoProjection(Se).scale(66.1603)}var Ae=G(8),Be=u(1+C);function Pe(ve,be){var Re=n(be);return Rek&&--qe>0);return[ve/(o(Re)*(Ae-1/_(Re))),v(be)*Re]};function me(){return t.geoProjection(Pe).scale(112.314)}function De(ve){var be=2*E/ve;function Re(qe,et){var Xe=t.geoAzimuthalEquidistantRaw(qe,et);if(n(qe)>T){var it=a(Xe[1],Xe[0]),Ft=G(Xe[0]*Xe[0]+Xe[1]*Xe[1]),Ht=be*d((it-T)/be)+T,tr=a(_(it-=Ht),2-o(it));it=Ht+O(E/Ft*_(tr))-tr,Xe[0]=Ft*o(it),Xe[1]=Ft*_(it)}return Xe}return Re.invert=function(qe,et){var Xe=G(qe*qe+et*et);if(Xe>T){var it=a(et,qe),Ft=be*d((it-T)/be)+T,Ht=it>Ft?-1:1,tr=Xe*o(Ft-it),dr=1/b(Ht*U((tr-E)/G(E*(E-2*tr)+Xe*Xe)));it=Ft+2*i((dr+Ht*G(dr*dr-3))/3),qe=Xe*o(it),et=Xe*_(it)}return t.geoAzimuthalEquidistantRaw.invert(qe,et)},Re}function ce(){var ve=5,be=t.geoProjectionMutator(De),Re=be(ve),qe=Re.stream,et=.01,Xe=-o(et*A),it=_(et*A);return Re.lobes=function(Ft){return arguments.length?be(ve=+Ft):ve},Re.stream=function(Ft){var Ht=Re.rotate(),tr=qe(Ft),dr=(Re.rotate([0,0]),qe(Ft));return Re.rotate(Ht),tr.sphere=function(){dr.polygonStart(),dr.lineStart();for(var Sr=0,Or=360/ve,Wr=2*E/ve,ni=90-180/ve,Pi=T;Sr0&&n(et)>p);return qe<0?NaN:Re}function ot(ve,be,Re){return be===void 0&&(be=40),Re===void 0&&(Re=k),function(qe,et,Xe,it){var Ft,Ht,tr;Xe=Xe===void 0?0:+Xe,it=it===void 0?0:+it;for(var dr=0;drFt){Xe-=Ht/=2,it-=tr/=2;continue}Ft=ni;var Pi=(Xe>0?-1:1)*Re,cn=(it>0?-1:1)*Re,ln=ve(Xe+Pi,it),Cn=ve(Xe,it+cn),Kn=(ln[0]-Sr[0])/Pi,Aa=(ln[1]-Sr[1])/Pi,fa=(Cn[0]-Sr[0])/cn,$a=(Cn[1]-Sr[1])/cn,Co=$a*Kn-Aa*fa,Qa=(n(Co)<.5?.5:1)/Co;if(Ht=(Wr*fa-Or*$a)*Qa,tr=(Or*Aa-Wr*Kn)*Qa,Xe+=Ht,it+=tr,n(Ht)0&&(Ft[1]*=1+Ht/1.5*Ft[0]*Ft[0]),Ft}return qe.invert=ot(qe),qe}function Wt(){return t.geoProjection(ut()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function Nt(ve,be){var Re=ve*_(be),qe=30,et;do be-=et=(be+_(be)-Re)/(1+o(be));while(n(et)>p&&--qe>0);return be/2}function $t(ve,be,Re){function qe(et,Xe){return[ve*et*o(Xe=Nt(Re,Xe)),be*_(Xe)]}return qe.invert=function(et,Xe){return Xe=O(Xe/be),[et/(ve*o(Xe)),O((2*Xe+_(2*Xe))/Re)]},qe}var sr=$t(C/T,C,E);function Tr(){return t.geoProjection(sr).scale(169.529)}var fr=2.00276,$e=1.11072;function St(ve,be){var Re=Nt(E,be);return[fr*ve/(1/o(be)+$e/o(Re)),(be+C*_(Re))/fr]}St.invert=function(ve,be){var Re=fr*be,qe=be<0?-L:L,et=25,Xe,it;do it=Re-C*_(qe),qe-=Xe=(_(2*qe)+2*qe-E*_(it))/(2*o(2*qe)+2+E*o(it)*C*o(qe));while(n(Xe)>p&&--et>0);return it=Re-C*_(qe),[ve*(1/o(it)+$e/o(qe))/fr,it]};function Qt(){return t.geoProjection(St).scale(160.857)}function Gt(ve){var be=0,Re=t.geoProjectionMutator(ve),qe=Re(be);return qe.parallel=function(et){return arguments.length?Re(be=et*A):be*P},qe}function _t(ve,be){return[ve*o(be),be]}_t.invert=function(ve,be){return[ve/o(be),be]};function It(){return t.geoProjection(_t).scale(152.63)}function mt(ve){if(!ve)return _t;var be=1/b(ve);function Re(qe,et){var Xe=be+ve-et,it=Xe&&qe*o(et)/Xe;return[Xe*_(it),be-Xe*o(it)]}return Re.invert=function(qe,et){var Xe=G(qe*qe+(et=be-et)*et),it=be+ve-Xe;return[Xe/o(it)*a(qe,et),it]},Re}function er(){return Gt(mt).scale(123.082).center([0,26.1441]).parallel(45)}function lr(ve){function be(Re,qe){var et=T-qe,Xe=et&&Re*ve*_(et)/et;return[et*_(Xe)/ve,T-et*o(Xe)]}return be.invert=function(Re,qe){var et=Re*ve,Xe=T-qe,it=G(et*et+Xe*Xe),Ft=a(et,Xe);return[(it?it/_(it):1)*Ft/ve,T-it]},be}function wr(){var ve=.5,be=t.geoProjectionMutator(lr),Re=be(ve);return Re.fraction=function(qe){return arguments.length?be(ve=+qe):ve},Re.scale(158.837)}var Lr=$t(1,4/E,E);function ti(){return t.geoProjection(Lr).scale(152.63)}function Br(ve,be,Re,qe,et,Xe){var it=o(Xe),Ft;if(n(ve)>1||n(Xe)>1)Ft=U(Re*et+be*qe*it);else{var Ht=_(ve/2),tr=_(Xe/2);Ft=2*O(G(Ht*Ht+be*qe*tr*tr))}return n(Ft)>p?[Ft,a(qe*_(Xe),be*et-Re*qe*it)]:[0,0]}function Vr(ve,be,Re){return U((ve*ve+be*be-Re*Re)/(2*ve*be))}function dt(ve){return ve-2*E*l((ve+E)/(2*E))}function Ge(ve,be,Re){for(var qe=[[ve[0],ve[1],_(ve[1]),o(ve[1])],[be[0],be[1],_(be[1]),o(be[1])],[Re[0],Re[1],_(Re[1]),o(Re[1])]],et=qe[2],Xe,it=0;it<3;++it,et=Xe)Xe=qe[it],et.v=Br(Xe[1]-et[1],et[3],et[2],Xe[3],Xe[2],Xe[0]-et[0]),et.point=[0,0];var Ft=Vr(qe[0].v[0],qe[2].v[0],qe[1].v[0]),Ht=Vr(qe[0].v[0],qe[1].v[0],qe[2].v[0]),tr=E-Ft;qe[2].point[1]=0,qe[0].point[0]=-(qe[1].point[0]=qe[0].v[0]/2);var dr=[qe[2].point[0]=qe[0].point[0]+qe[2].v[0]*o(Ft),2*(qe[0].point[1]=qe[1].point[1]=qe[2].v[0]*_(Ft))];function Sr(Or,Wr){var ni=_(Wr),Pi=o(Wr),cn=new Array(3),ln;for(ln=0;ln<3;++ln){var Cn=qe[ln];if(cn[ln]=Br(Wr-Cn[1],Cn[3],Cn[2],Pi,ni,Or-Cn[0]),!cn[ln][0])return Cn.point;cn[ln][1]=dt(cn[ln][1]-Cn.v[1])}var Kn=dr.slice();for(ln=0;ln<3;++ln){var Aa=ln==2?0:ln+1,fa=Vr(qe[ln].v[0],cn[ln][0],cn[Aa][0]);cn[ln][1]<0&&(fa=-fa),ln?ln==1?(fa=Ht-fa,Kn[0]-=cn[ln][0]*o(fa),Kn[1]-=cn[ln][0]*_(fa)):(fa=tr-fa,Kn[0]+=cn[ln][0]*o(fa),Kn[1]+=cn[ln][0]*_(fa)):(Kn[0]+=cn[ln][0]*o(fa),Kn[1]-=cn[ln][0]*_(fa))}return Kn[0]/=3,Kn[1]/=3,Kn}return Sr}function Je(ve){return ve[0]*=A,ve[1]*=A,ve}function We(){return tt([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function tt(ve,be,Re){var qe=t.geoCentroid({type:"MultiPoint",coordinates:[ve,be,Re]}),et=[-qe[0],-qe[1]],Xe=t.geoRotation(et),it=Ge(Je(Xe(ve)),Je(Xe(be)),Je(Xe(Re)));it.invert=ot(it);var Ft=t.geoProjection(it).rotate(et),Ht=Ft.center;return delete Ft.rotate,Ft.center=function(tr){return arguments.length?Ht(Xe(tr)):Xe.invert(Ht())},Ft.clipAngle(90)}function xt(ve,be){var Re=G(1-_(be));return[2/M*ve*Re,M*(1-Re)]}xt.invert=function(ve,be){var Re=(Re=be/M-1)*Re;return[Re>0?ve*G(E/Re)/2:0,O(1-Re)]};function Ie(){return t.geoProjection(xt).scale(95.6464).center([0,30])}function xe(ve){var be=b(ve);function Re(qe,et){return[qe,(qe?qe/_(qe):1)*(_(et)*o(qe)-be*o(et))]}return Re.invert=be?function(qe,et){qe&&(et*=_(qe)/qe);var Xe=o(qe);return[qe,2*a(G(Xe*Xe+be*be-et*et)-Xe,be-et)]}:function(qe,et){return[qe,O(qe?et*b(qe)/qe:et)]},Re}function ke(){return Gt(xe).scale(249.828).clipAngle(90)}var vt=G(3);function ir(ve,be){return[vt*ve*(2*o(2*be/3)-1)/M,vt*M*_(be/3)]}ir.invert=function(ve,be){var Re=3*O(be/(vt*M));return[M*ve/(vt*(2*o(2*Re/3)-1)),Re]};function ar(){return t.geoProjection(ir).scale(156.19)}function vr(ve){var be=o(ve);function Re(qe,et){return[qe*be,_(et)/be]}return Re.invert=function(qe,et){return[qe/be,O(et*be)]},Re}function ii(){return Gt(vr).parallel(38.58).scale(195.044)}function pi(ve){var be=o(ve);function Re(qe,et){return[qe*be,(1+be)*b(et/2)]}return Re.invert=function(qe,et){return[qe/be,i(et/(1+be))*2]},Re}function $r(){return Gt(pi).scale(124.75)}function di(ve,be){var Re=G(8/(3*E));return[Re*ve*(1-n(be)/E),Re*be]}di.invert=function(ve,be){var Re=G(8/(3*E)),qe=be/Re;return[ve/(Re*(1-n(qe)/E)),qe]};function ji(){return t.geoProjection(di).scale(165.664)}function In(ve,be){var Re=G(4-3*_(n(be)));return[2/G(6*E)*ve*Re,v(be)*G(2*E/3)*(2-Re)]}In.invert=function(ve,be){var Re=2-n(be)/G(2*E/3);return[ve*G(6*E)/(2*Re),v(be)*O((4-Re*Re)/3)]};function wi(){return t.geoProjection(In).scale(165.664)}function On(ve,be){var Re=G(E*(4+E));return[2/Re*ve*(1+G(1-4*be*be/(E*E))),4/Re*be]}On.invert=function(ve,be){var Re=G(E*(4+E))/2;return[ve*Re/(1+G(1-be*be*(4+E)/(4*E))),be*Re/2]};function qn(){return t.geoProjection(On).scale(180.739)}function Fn(ve,be){var Re=(2+T)*_(be);be/=2;for(var qe=0,et=1/0;qe<10&&n(et)>p;qe++){var Xe=o(be);be-=et=(be+_(be)*(Xe+2)-Re)/(2*Xe*(1+Xe))}return[2/G(E*(4+E))*ve*(1+o(be)),2*G(E/(4+E))*_(be)]}Fn.invert=function(ve,be){var Re=be*G((4+E)/E)/2,qe=O(Re),et=o(qe);return[ve/(2/G(E*(4+E))*(1+et)),O((qe+Re*(et+2))/(2+T))]};function ra(){return t.geoProjection(Fn).scale(180.739)}function la(ve,be){return[ve*(1+o(be))/G(2+E),2*be/G(2+E)]}la.invert=function(ve,be){var Re=G(2+E),qe=be*Re/2;return[Re*ve/(1+o(qe)),qe]};function Ut(){return t.geoProjection(la).scale(173.044)}function wt(ve,be){for(var Re=(1+T)*_(be),qe=0,et=1/0;qe<10&&n(et)>p;qe++)be-=et=(be+_(be)-Re)/(1+o(be));return Re=G(2+E),[ve*(1+o(be))/Re,2*be/Re]}wt.invert=function(ve,be){var Re=1+T,qe=G(Re/2);return[ve*2*qe/(1+o(be*=qe)),O((be+_(be))/Re)]};function rr(){return t.geoProjection(wt).scale(173.044)}var nr=3+2*C;function Er(ve,be){var Re=_(ve/=2),qe=o(ve),et=G(o(be)),Xe=o(be/=2),it=_(be)/(Xe+C*qe*et),Ft=G(2/(1+it*it)),Ht=G((C*Xe+(qe+Re)*et)/(C*Xe+(qe-Re)*et));return[nr*(Ft*(Ht-1/Ht)-2*u(Ht)),nr*(Ft*it*(Ht+1/Ht)-2*i(it))]}Er.invert=function(ve,be){if(!(Xe=Se.invert(ve/1.2,be*1.065)))return null;var Re=Xe[0],qe=Xe[1],et=20,Xe;ve/=nr,be/=nr;do{var it=Re/2,Ft=qe/2,Ht=_(it),tr=o(it),dr=_(Ft),Sr=o(Ft),Or=o(qe),Wr=G(Or),ni=dr/(Sr+C*tr*Wr),Pi=ni*ni,cn=G(2/(1+Pi)),ln=C*Sr+(tr+Ht)*Wr,Cn=C*Sr+(tr-Ht)*Wr,Kn=ln/Cn,Aa=G(Kn),fa=Aa-1/Aa,$a=Aa+1/Aa,Co=cn*fa-2*u(Aa)-ve,Qa=cn*ni*$a-2*i(ni)-be,mo=dr&&x*Wr*Ht*Pi/dr,Bo=(C*tr*Sr+Wr)/(2*(Sr+C*tr*Wr)*(Sr+C*tr*Wr)*Wr),Ps=-.5*ni*cn*cn*cn,Ts=Ps*mo,wo=Ps*Bo,To=(To=2*Sr+C*Wr*(tr-Ht))*To*Aa,hl=(C*tr*Sr*Wr+Or)/To,Ul=-(C*Ht*dr)/(Wr*To),Lu=fa*Ts-2*hl/Aa+cn*(hl+hl/Kn),au=fa*wo-2*Ul/Aa+cn*(Ul+Ul/Kn),Js=ni*$a*Ts-2*mo/(1+Pi)+cn*$a*mo+cn*ni*(hl-hl/Kn),eu=ni*$a*wo-2*Bo/(1+Pi)+cn*$a*Bo+cn*ni*(Ul-Ul/Kn),dc=au*Js-eu*Lu;if(!dc)break;var Tl=(Qa*au-Co*eu)/dc,Al=(Co*Js-Qa*Lu)/dc;Re-=Tl,qe=c(-T,f(T,qe-Al))}while((n(Tl)>p||n(Al)>p)&&--et>0);return n(n(qe)-T)qe){var Sr=G(dr),Or=a(tr,Ht),Wr=Re*d(Or/Re),ni=Or-Wr,Pi=ve*o(ni),cn=(ve*_(ni)-ni*_(Pi))/(T-Pi),ln=Wa(ni,cn),Cn=(E-ve)/Fa(ln,Pi,E);Ht=Sr;var Kn=50,Aa;do Ht-=Aa=(ve+Fa(ln,Pi,Ht)*Cn-Sr)/(ln(Ht)*Cn);while(n(Aa)>p&&--Kn>0);tr=ni*_(Ht),Htqe){var Ht=G(Ft),tr=a(it,Xe),dr=Re*d(tr/Re),Sr=tr-dr;Xe=Ht*o(Sr),it=Ht*_(Sr);for(var Or=Xe-T,Wr=_(Xe),ni=it/Wr,Pi=Xep||n(ni)>p)&&--Pi>0);return[Sr,Or]},Ht}var Wn=da(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Ha(){return t.geoProjection(Wn).scale(149.995)}var vo=da(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function jn(){return t.geoProjection(vo).scale(153.93)}var Mt=da(5/6*E,-.62636,-.0344,0,1.3493,-.05524,0,.045);function kr(){return t.geoProjection(Mt).scale(130.945)}function Jr(ve,be){var Re=ve*ve,qe=be*be;return[ve*(1-.162388*qe)*(.87-952426e-9*Re*Re),be*(1+qe/12)]}Jr.invert=function(ve,be){var Re=ve,qe=be,et=50,Xe;do{var it=qe*qe;qe-=Xe=(qe*(1+it/12)-be)/(1+it/4)}while(n(Xe)>p&&--et>0);et=50,ve/=1-.162388*it;do{var Ft=(Ft=Re*Re)*Ft;Re-=Xe=(Re*(.87-952426e-9*Ft)-ve)/(.87-.00476213*Ft)}while(n(Xe)>p&&--et>0);return[Re,qe]};function vi(){return t.geoProjection(Jr).scale(131.747)}var hn=da(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function An(){return t.geoProjection(hn).scale(131.087)}function Mn(ve){var be=ve(T,0)[0]-ve(-T,0)[0];function Re(qe,et){var Xe=qe>0?-.5:.5,it=ve(qe+Xe*E,et);return it[0]-=Xe*be,it}return ve.invert&&(Re.invert=function(qe,et){var Xe=qe>0?-.5:.5,it=ve.invert(qe+Xe*be,et),Ft=it[0]-Xe*E;return Ft<-E?Ft+=2*E:Ft>E&&(Ft-=2*E),it[0]=Ft,it}),Re}function Li(ve,be){var Re=v(ve),qe=v(be),et=o(be),Xe=o(ve)*et,it=_(ve)*et,Ft=_(qe*be);ve=n(a(it,Ft)),be=O(Xe),n(ve-T)>p&&(ve%=T);var Ht=_n(ve>E/4?T-ve:ve,be);return ve>E/4&&(Ft=Ht[0],Ht[0]=-Ht[1],Ht[1]=-Ft),Ht[0]*=Re,Ht[1]*=-qe,Ht}Li.invert=function(ve,be){n(ve)>1&&(ve=v(ve)*2-ve),n(be)>1&&(be=v(be)*2-be);var Re=v(ve),qe=v(be),et=-Re*ve,Xe=-qe*be,it=Xe/et<1,Ft=ya(it?Xe:et,it?et:Xe),Ht=Ft[0],tr=Ft[1],dr=o(tr);return it&&(Ht=-T-Ht),[Re*(a(_(Ht)*dr,-_(tr))+E),qe*O(o(Ht)*dr)]};function _n(ve,be){if(be===T)return[0,0];var Re=_(be),qe=Re*Re,et=qe*qe,Xe=1+et,it=1+3*et,Ft=1-et,Ht=O(1/G(Xe)),tr=Ft+qe*Xe*Ht,dr=(1-Re)/tr,Sr=G(dr),Or=dr*Xe,Wr=G(Or),ni=Sr*Ft,Pi,cn;if(ve===0)return[0,-(ni+qe*Wr)];var ln=o(be),Cn=1/ln,Kn=2*Re*ln,Aa=(-3*qe+Ht*it)*Kn,fa=(-tr*ln-(1-Re)*Aa)/(tr*tr),$a=.5*fa/Sr,Co=Ft*$a-2*qe*Sr*Kn,Qa=qe*Xe*fa+dr*it*Kn,mo=-Cn*Kn,Bo=-Cn*Qa,Ps=-2*Cn*Co,Ts=4*ve/E,wo;if(ve>.222*E||be.175*E){if(Pi=(ni+qe*G(Or*(1+et)-ni*ni))/(1+et),ve>E/4)return[Pi,Pi];var To=Pi,hl=.5*Pi;Pi=.5*(hl+To),cn=50;do{var Ul=G(Or-Pi*Pi),Lu=Pi*(Ps+mo*Ul)+Bo*O(Pi/Wr)-Ts;if(!Lu)break;Lu<0?hl=Pi:To=Pi,Pi=.5*(hl+To)}while(n(To-hl)>p&&--cn>0)}else{Pi=p,cn=25;do{var au=Pi*Pi,Js=G(Or-au),eu=Ps+mo*Js,dc=Pi*eu+Bo*O(Pi/Wr)-Ts,Tl=eu+(Bo-mo*au)/Js;Pi-=wo=Js?dc/Tl:0}while(n(wo)>p&&--cn>0)}return[Pi,-ni-qe*G(Or-Pi*Pi)]}function ya(ve,be){for(var Re=0,qe=1,et=.5,Xe=50;;){var it=et*et,Ft=G(et),Ht=O(1/G(1+it)),tr=1-it+et*(1+it)*Ht,dr=(1-Ft)/tr,Sr=G(dr),Or=dr*(1+it),Wr=Sr*(1-it),ni=Or-ve*ve,Pi=G(ni),cn=be+Wr+et*Pi;if(n(qe-Re)0?Re=et:qe=et,et=.5*(Re+qe)}if(!Xe)return null;var ln=O(Ft),Cn=o(ln),Kn=1/Cn,Aa=2*Ft*Cn,fa=(-3*et+Ht*(1+3*it))*Aa,$a=(-tr*Cn-(1-Ft)*fa)/(tr*tr),Co=.5*$a/Sr,Qa=(1-it)*Co-2*et*Sr*Aa,mo=-2*Kn*Qa,Bo=-Kn*Aa,Ps=-Kn*(et*(1+it)*$a+dr*(1+3*it)*Aa);return[E/4*(ve*(mo+Bo*Pi)+Ps*O(ve/G(Or))),ln]}function $n(){return t.geoProjection(Mn(Li)).scale(239.75)}function Ma(ve,be,Re){var qe,et,Xe;return ve?(qe=_o(ve,Re),be?(et=_o(be,1-Re),Xe=et[1]*et[1]+Re*qe[0]*qe[0]*et[0]*et[0],[[qe[0]*et[2]/Xe,qe[1]*qe[2]*et[0]*et[1]/Xe],[qe[1]*et[1]/Xe,-qe[0]*qe[2]*et[0]*et[2]/Xe],[qe[2]*et[1]*et[2]/Xe,-Re*qe[0]*qe[1]*et[0]/Xe]]):[[qe[0],0],[qe[1],0],[qe[2],0]]):(et=_o(be,1-Re),[[0,et[0]/et[1]],[1/et[1],0],[et[2]/et[1],0]])}function _o(ve,be){var Re,qe,et,Xe,it;if(be=1-p)return Re=(1-be)/4,qe=N(ve),Xe=Z(ve),et=1/qe,it=qe*j(ve),[Xe+Re*(it-ve)/(qe*qe),et-Re*Xe*et*(it-ve),et+Re*Xe*et*(it+ve),2*i(s(ve))-T+Re*(it-ve)/qe];var Ft=[1,0,0,0,0,0,0,0,0],Ht=[G(be),0,0,0,0,0,0,0,0],tr=0;for(qe=G(1-be),it=1;n(Ht[tr]/Ft[tr])>p&&tr<8;)Re=Ft[tr++],Ht[tr]=(Re-qe)/2,Ft[tr]=(Re+qe)/2,qe=G(Re*qe),it*=2;et=it*Ft[tr]*ve;do Xe=Ht[tr]*_(qe=et)/Ft[tr],et=(O(Xe)+et)/2;while(--tr);return[_(et),Xe=o(et),Xe/o(et-qe),et]}function No(ve,be,Re){var qe=n(ve),et=n(be),Xe=j(et);if(qe){var it=1/_(qe),Ft=1/(b(qe)*b(qe)),Ht=-(Ft+Re*(Xe*Xe*it*it)-1+Re),tr=(Re-1)*Ft,dr=(-Ht+G(Ht*Ht-4*tr))/2;return[po(i(1/G(dr)),Re)*v(ve),po(i(G((dr/Ft-1)/Re)),1-Re)*v(be)]}return[0,po(i(Xe),1-Re)*v(be)]}function po(ve,be){if(!be)return ve;if(be===1)return u(b(ve/2+L));for(var Re=1,qe=G(1-be),et=G(be),Xe=0;n(et)>p;Xe++){if(ve%E){var it=i(qe*b(ve)/Re);it<0&&(it+=E),ve+=it+~~(ve/E)*E}else ve+=ve;et=(Re+qe)/2,qe=G(Re*qe),et=((Re=et)-qe)/2}return ve/(h(2,Xe)*Re)}function Lo(ve,be){var Re=(C-1)/(C+1),qe=G(1-Re*Re),et=po(T,qe*qe),Xe=-1,it=u(b(E/4+n(be)/2)),Ft=s(Xe*it)/G(Re),Ht=ko(Ft*o(Xe*ve),Ft*_(Xe*ve)),tr=No(Ht[0],Ht[1],qe*qe);return[-tr[1],(be>=0?1:-1)*(.5*et-tr[0])]}function ko(ve,be){var Re=ve*ve,qe=be+1,et=1-Re-be*be;return[.5*((ve>=0?T:-T)-a(et,2*ve)),-.25*u(et*et+4*Re)+.5*u(qe*qe+Re)]}function Ds(ve,be){var Re=be[0]*be[0]+be[1]*be[1];return[(ve[0]*be[0]+ve[1]*be[1])/Re,(ve[1]*be[0]-ve[0]*be[1])/Re]}Lo.invert=function(ve,be){var Re=(C-1)/(C+1),qe=G(1-Re*Re),et=po(T,qe*qe),Xe=-1,it=Ma(.5*et-be,-ve,qe*qe),Ft=Ds(it[0],it[1]),Ht=a(Ft[1],Ft[0])/Xe;return[Ht,2*i(s(.5/Xe*u(Re*Ft[0]*Ft[0]+Re*Ft[1]*Ft[1])))-T]};function Fs(){return t.geoProjection(Mn(Lo)).scale(151.496)}function ll(ve){var be=_(ve),Re=o(ve),qe=ul(ve);qe.invert=ul(-ve);function et(Xe,it){var Ft=qe(Xe,it);Xe=Ft[0],it=Ft[1];var Ht=_(it),tr=o(it),dr=o(Xe),Sr=U(be*Ht+Re*tr*dr),Or=_(Sr),Wr=n(Or)>p?Sr/Or:1;return[Wr*Re*_(Xe),(n(Xe)>T?Wr:-Wr)*(be*tr-Re*Ht*dr)]}return et.invert=function(Xe,it){var Ft=G(Xe*Xe+it*it),Ht=-_(Ft),tr=o(Ft),dr=Ft*tr,Sr=-it*Ht,Or=Ft*be,Wr=G(dr*dr+Sr*Sr-Or*Or),ni=a(dr*Or+Sr*Wr,Sr*Or-dr*Wr),Pi=(Ft>T?-1:1)*a(Xe*Ht,Ft*o(ni)*tr+it*_(ni)*Ht);return qe.invert(Pi,ni)},et}function ul(ve){var be=_(ve),Re=o(ve);return function(qe,et){var Xe=o(et),it=o(qe)*Xe,Ft=_(qe)*Xe,Ht=_(et);return[a(Ft,it*Re-Ht*be),O(Ht*Re+it*be)]}}function zl(){var ve=0,be=t.geoProjectionMutator(ll),Re=be(ve),qe=Re.rotate,et=Re.stream,Xe=t.geoCircle();return Re.parallel=function(it){if(!arguments.length)return ve*P;var Ft=Re.rotate();return be(ve=it*A).rotate(Ft)},Re.rotate=function(it){return arguments.length?(qe.call(Re,[it[0],it[1]-ve*P]),Xe.center([-it[0],-it[1]]),Re):(it=qe.call(Re),it[1]+=ve*P,it)},Re.stream=function(it){return it=et(it),it.sphere=function(){it.polygonStart();var Ft=.01,Ht=Xe.radius(90-Ft)().coordinates[0],tr=Ht.length-1,dr=-1,Sr;for(it.lineStart();++dr=0;)it.point((Sr=Ht[dr])[0],Sr[1]);it.lineEnd(),it.polygonEnd()},it},Re.scale(79.4187).parallel(45).clipAngle(180-.001)}var us=3,il=O(1-1/us)*P,As=vr(0);function cl(ve){var be=il*A,Re=xt(E,be)[0]-xt(-E,be)[0],qe=As(0,be)[1],et=xt(0,be)[1],Xe=M-et,it=g/ve,Ft=4/g,Ht=qe+Xe*Xe*4/g;function tr(dr,Sr){var Or,Wr=n(Sr);if(Wr>be){var ni=f(ve-1,c(0,l((dr+E)/it)));dr+=E*(ve-1)/ve-ni*it,Or=xt(dr,Wr),Or[0]=Or[0]*g/Re-g*(ve-1)/(2*ve)+ni*g/ve,Or[1]=qe+(Or[1]-et)*4*Xe/g,Sr<0&&(Or[1]=-Or[1])}else Or=As(dr,Sr);return Or[0]*=Ft,Or[1]/=Ht,Or}return tr.invert=function(dr,Sr){dr/=Ft,Sr*=Ht;var Or=n(Sr);if(Or>qe){var Wr=f(ve-1,c(0,l((dr+E)/it)));dr=(dr+E*(ve-1)/ve-Wr*it)*Re/g;var ni=xt.invert(dr,.25*(Or-qe)*g/Xe+et);return ni[0]-=E*(ve-1)/ve-Wr*it,Sr<0&&(ni[1]=-ni[1]),ni}return As.invert(dr,Sr)},tr}function Ks(ve,be){return[ve,be&1?90-p:il]}function zs(ve,be){return[ve,be&1?-90+p:-il]}function Io(ve){return[ve[0]*(1-p),ve[1]]}function ls(ve){var be=[].concat(r.range(-180,180+ve/2,ve).map(Ks),r.range(180,-180-ve/2,-ve).map(zs));return{type:"Polygon",coordinates:[ve===180?be.map(Io):be]}}function Yl(){var ve=4,be=t.geoProjectionMutator(cl),Re=be(ve),qe=Re.stream;return Re.lobes=function(et){return arguments.length?be(ve=+et):ve},Re.stream=function(et){var Xe=Re.rotate(),it=qe(et),Ft=(Re.rotate([0,0]),qe(et));return Re.rotate(Xe),it.sphere=function(){t.geoStream(ls(180/ve),Ft)},it},Re.scale(239.75)}function Su(ve){var be=1+ve,Re=_(1/be),qe=O(Re),et=2*G(E/(Xe=E+4*qe*be)),Xe,it=.5*et*(be+G(ve*(2+ve))),Ft=ve*ve,Ht=be*be;function tr(dr,Sr){var Or=1-_(Sr),Wr,ni;if(Or&&Or<2){var Pi=T-Sr,cn=25,ln;do{var Cn=_(Pi),Kn=o(Pi),Aa=qe+a(Cn,be-Kn),fa=1+Ht-2*be*Kn;Pi-=ln=(Pi-Ft*qe-be*Cn+fa*Aa-.5*Or*Xe)/(2*be*Cn*Aa)}while(n(ln)>k&&--cn>0);Wr=et*G(fa),ni=dr*Aa/E}else Wr=et*(ve+Or),ni=dr*qe/E;return[Wr*_(ni),it-Wr*o(ni)]}return tr.invert=function(dr,Sr){var Or=dr*dr+(Sr-=it)*Sr,Wr=(1+Ht-Or/(et*et))/(2*be),ni=U(Wr),Pi=_(ni),cn=qe+a(Pi,be-Wr);return[O(dr/G(Or))*E/cn,O(1-2*(ni-Ft*qe-be*Pi+(1+Ht-2*be*Wr)*cn)/Xe)]},tr}function nc(){var ve=1,be=t.geoProjectionMutator(Su),Re=be(ve);return Re.ratio=function(qe){return arguments.length?be(ve=+qe):ve},Re.scale(167.774).center([0,18.67])}var bs=.7109889596207567,Rn=.0528035274542;function _a(ve,be){return be>-bs?(ve=sr(ve,be),ve[1]+=Rn,ve):_t(ve,be)}_a.invert=function(ve,be){return be>-bs?sr.invert(ve,be-Rn):_t.invert(ve,be)};function Vu(){return t.geoProjection(_a).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Ol(ve,be){return n(be)>bs?(ve=sr(ve,be),ve[1]-=be>0?Rn:-Rn,ve):_t(ve,be)}Ol.invert=function(ve,be){return n(be)>bs?sr.invert(ve,be+(be>0?Rn:-Rn)):_t.invert(ve,be)};function xo(){return t.geoProjection(Ol).scale(152.63)}function Kl(ve,be,Re,qe){var et=G(4*E/(2*Re+(1+ve-be/2)*_(2*Re)+(ve+be)/2*_(4*Re)+be/2*_(6*Re))),Xe=G(qe*_(Re)*G((1+ve*o(2*Re)+be*o(4*Re))/(1+ve+be))),it=Re*Ht(1);function Ft(Sr){return G(1+ve*o(2*Sr)+be*o(4*Sr))}function Ht(Sr){var Or=Sr*Re;return(2*Or+(1+ve-be/2)*_(2*Or)+(ve+be)/2*_(4*Or)+be/2*_(6*Or))/Re}function tr(Sr){return Ft(Sr)*_(Sr)}var dr=function(Sr,Or){var Wr=Re*Vt(Ht,it*_(Or)/Re,Or/E);isNaN(Wr)&&(Wr=Re*v(Or));var ni=et*Ft(Wr);return[ni*Xe*Sr/E*o(Wr),ni/Xe*_(Wr)]};return dr.invert=function(Sr,Or){var Wr=Vt(tr,Or*Xe/et);return[Sr*E/(o(Wr)*et*Xe*Ft(Wr)),O(Re*Ht(Wr/Re)/it)]},Re===0&&(et=G(qe/E),dr=function(Sr,Or){return[Sr*et,_(Or)/et]},dr.invert=function(Sr,Or){return[Sr/et,O(Or*et)]}),dr}function Ns(){var ve=1,be=0,Re=45*A,qe=2,et=t.geoProjectionMutator(Kl),Xe=et(ve,be,Re,qe);return Xe.a=function(it){return arguments.length?et(ve=+it,be,Re,qe):ve},Xe.b=function(it){return arguments.length?et(ve,be=+it,Re,qe):be},Xe.psiMax=function(it){return arguments.length?et(ve,be,Re=+it*A,qe):Re*P},Xe.ratio=function(it){return arguments.length?et(ve,be,Re,qe=+it):qe},Xe.scale(180.739)}function Hl(ve,be,Re,qe,et,Xe,it,Ft,Ht,tr,dr){if(dr.nanEncountered)return NaN;var Sr,Or,Wr,ni,Pi,cn,ln,Cn,Kn,Aa;if(Sr=Re-be,Or=ve(be+Sr*.25),Wr=ve(Re-Sr*.25),isNaN(Or)){dr.nanEncountered=!0;return}if(isNaN(Wr)){dr.nanEncountered=!0;return}return ni=Sr*(qe+4*Or+et)/12,Pi=Sr*(et+4*Wr+Xe)/12,cn=ni+Pi,Aa=(cn-it)/15,tr>Ht?(dr.maxDepthCount++,cn+Aa):Math.abs(Aa)>1;do Ht[cn]>Wr?Pi=cn:ni=cn,cn=ni+Pi>>1;while(cn>ni);var ln=Ht[cn+1]-Ht[cn];return ln&&(ln=(Wr-Ht[cn+1])/ln),(cn+1+ln)/it}var Sr=2*dr(1)/E*Xe/Re,Or=function(Wr,ni){var Pi=dr(n(_(ni))),cn=qe(Pi)*Wr;return Pi/=Sr,[cn,ni>=0?Pi:-Pi]};return Or.invert=function(Wr,ni){var Pi;return ni*=Sr,n(ni)<1&&(Pi=v(ni)*O(et(n(ni))*Xe)),[Wr/qe(n(ni)),Pi]},Or}function Oo(){var ve=0,be=2.5,Re=1.183136,qe=t.geoProjectionMutator(aa),et=qe(ve,be,Re);return et.alpha=function(Xe){return arguments.length?qe(ve=+Xe,be,Re):ve},et.k=function(Xe){return arguments.length?qe(ve,be=+Xe,Re):be},et.gamma=function(Xe){return arguments.length?qe(ve,be,Re=+Xe):Re},et.scale(152.63)}function qo(ve,be){return n(ve[0]-be[0])=0;--Ht)Re=ve[1][Ht],qe=Re[0][0],et=Re[0][1],Xe=Re[1][1],it=Re[2][0],Ft=Re[2][1],be.push(ql([[it-p,Ft-p],[it-p,Xe+p],[qe+p,Xe+p],[qe+p,et-p]],30));return{type:"Polygon",coordinates:[r.merge(be)]}}function Do(ve,be,Re){var qe,et;function Xe(Ht,tr){for(var dr=tr<0?-1:1,Sr=be[+(tr<0)],Or=0,Wr=Sr.length-1;OrSr[Or][2][0];++Or);var ni=ve(Ht-Sr[Or][1][0],tr);return ni[0]+=ve(Sr[Or][1][0],dr*tr>dr*Sr[Or][0][1]?Sr[Or][0][1]:tr)[0],ni}Re?Xe.invert=Re(Xe):ve.invert&&(Xe.invert=function(Ht,tr){for(var dr=et[+(tr<0)],Sr=be[+(tr<0)],Or=0,Wr=dr.length;Orni&&(Pi=Wr,Wr=ni,ni=Pi),[[Sr,Wr],[Or,ni]]})}),it):be.map(function(tr){return tr.map(function(dr){return[[dr[0][0]*P,dr[0][1]*P],[dr[1][0]*P,dr[1][1]*P],[dr[2][0]*P,dr[2][1]*P]]})})},be!=null&&it.lobes(be),it}var rf=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Vf(){return Do(St,rf).scale(160.857)}var pl=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Zc(){return Do(Ol,pl).scale(152.63)}var Jl=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Os(){return Do(sr,Jl).scale(169.529)}var yu=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function oc(){return Do(sr,yu).scale(169.529).rotate([20,0])}var Cf=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function sc(){return Do(_a,Cf,ot).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var jh=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function Lf(){return Do(_t,jh).scale(152.63).rotate([-20,0])}function cs(ve,be){return[3/g*ve*G(E*E/3-be*be),be]}cs.invert=function(ve,be){return[g/3*ve/G(E*E/3-be*be),be]};function nf(){return t.geoProjection(cs).scale(158.837)}function Gf(ve){function be(Re,qe){if(n(n(qe)-T)2)return null;Re/=2,qe/=2;var Xe=Re*Re,it=qe*qe,Ft=2*qe/(1+Xe+it);return Ft=h((1+Ft)/(1-Ft),1/ve),[a(2*Re,1-Xe-it)/ve,O((Ft-1)/(Ft+1))]},be}function $l(){var ve=.5,be=t.geoProjectionMutator(Gf),Re=be(ve);return Re.spacing=function(qe){return arguments.length?be(ve=+qe):ve},Re.scale(124.75)}var fl=E/C;function lc(ve,be){return[ve*(1+G(o(be)))/2,be/(o(be/2)*o(ve/6))]}lc.invert=function(ve,be){var Re=n(ve),qe=n(be),et=p,Xe=T;qep||n(cn)>p)&&--et>0);return et&&[Re,qe]};function Hs(){return t.geoProjection(Es).scale(139.98)}function Go(ve,be){return[_(ve)/o(be),b(be)*o(ve)]}Go.invert=function(ve,be){var Re=ve*ve,qe=be*be,et=qe+1,Xe=Re+et,it=ve?x*G((Xe-G(Xe*Xe-4*Re))/Re):1/G(et);return[O(ve*it),v(be)*U(it)]};function ps(){return t.geoProjection(Go).scale(144.049).clipAngle(90-.001)}function uc(ve){var be=o(ve),Re=b(L+ve/2);function qe(et,Xe){var it=Xe-ve,Ft=n(it)=0;)dr=ve[tr],Sr=dr[0]+Ft*(Wr=Sr)-Ht*Or,Or=dr[1]+Ft*Or+Ht*Wr;return Sr=Ft*(Wr=Sr)-Ht*Or,Or=Ft*Or+Ht*Wr,[Sr,Or]}return Re.invert=function(qe,et){var Xe=20,it=qe,Ft=et;do{for(var Ht=be,tr=ve[Ht],dr=tr[0],Sr=tr[1],Or=0,Wr=0,ni;--Ht>=0;)tr=ve[Ht],Or=dr+it*(ni=Or)-Ft*Wr,Wr=Sr+it*Wr+Ft*ni,dr=tr[0]+it*(ni=dr)-Ft*Sr,Sr=tr[1]+it*Sr+Ft*ni;Or=dr+it*(ni=Or)-Ft*Wr,Wr=Sr+it*Wr+Ft*ni,dr=it*(ni=dr)-Ft*Sr-qe,Sr=it*Sr+Ft*ni-et;var Pi=Or*Or+Wr*Wr,cn,ln;it-=cn=(dr*Or+Sr*Wr)/Pi,Ft-=ln=(Sr*Or-dr*Wr)/Pi}while(n(cn)+n(ln)>p*p&&--Xe>0);if(Xe){var Cn=G(it*it+Ft*Ft),Kn=2*i(Cn*.5),Aa=_(Kn);return[a(it*Aa,Cn*o(Kn)),Cn?O(Ft*Aa/Cn):0]}},Re}var Po=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],sd=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Ko=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Pa=[[.9245,0],[0,0],[.01943,0]],af=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Hu(){return Bl(Po,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function bl(){return Bl(sd,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Hf(){return Bl(Ko,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Ic(){return Bl(Pa,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function yf(){return Bl(af,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Bl(ve,be){var Re=t.geoProjection(od(ve)).rotate(be).clipAngle(90),qe=t.geoRotation(be),et=Re.center;return delete Re.rotate,Re.center=function(Xe){return arguments.length?et(qe(Xe)):qe.invert(et())},Re}var Ah=G(6),Qf=G(7);function _f(ve,be){var Re=O(7*_(be)/(3*Ah));return[Ah*ve*(2*o(2*Re/3)-1)/Qf,9*_(Re/3)/Qf]}_f.invert=function(ve,be){var Re=3*O(be*Qf/9);return[ve*Qf/(Ah*(2*o(2*Re/3)-1)),O(_(Re)*3*Ah/7)]};function Yc(){return t.geoProjection(_f).scale(164.859)}function eh(ve,be){for(var Re=(1+x)*_(be),qe=be,et=0,Xe;et<25&&(qe-=Xe=(_(qe/2)+_(qe)-Re)/(.5*o(qe/2)+o(qe)),!(n(Xe)k&&--qe>0);return Xe=Re*Re,it=Xe*Xe,Ft=Xe*it,[ve/(.84719-.13063*Xe+Ft*Ft*(-.04515+.05494*Xe-.02326*it+.00331*Ft)),Re]};function of(){return t.geoProjection(cc).scale(175.295)}function Nl(ve,be){return[ve*(1+o(be))/2,2*(be-b(be/2))]}Nl.invert=function(ve,be){for(var Re=be/2,qe=0,et=1/0;qe<10&&n(et)>p;++qe){var Xe=o(be/2);be-=et=(be-b(be/2)-Re)/(1-.5/(Xe*Xe))}return[2*ve/(1+o(be)),be]};function Kc(){return t.geoProjection(Nl).scale(152.63)}var Rc=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function gs(){return Do(je(1/0),Rc).rotate([20,0]).scale(152.63)}function Wf(ve,be){var Re=_(be),qe=o(be),et=v(ve);if(ve===0||n(be)===T)return[0,be];if(be===0)return[ve,0];if(n(ve)===T)return[ve*qe,T*Re];var Xe=E/(2*ve)-2*ve/E,it=2*be/E,Ft=(1-it*it)/(Re-it),Ht=Xe*Xe,tr=Ft*Ft,dr=1+Ht/tr,Sr=1+tr/Ht,Or=(Xe*Re/Ft-Xe/2)/dr,Wr=(tr*Re/Ht+Ft/2)/Sr,ni=Or*Or+qe*qe/dr,Pi=Wr*Wr-(tr*Re*Re/Ht+Ft*Re-1)/Sr;return[T*(Or+G(ni)*et),T*(Wr+G(Pi<0?0:Pi)*v(-be*Xe)*et)]}Wf.invert=function(ve,be){ve/=T,be/=T;var Re=ve*ve,qe=be*be,et=Re+qe,Xe=E*E;return[ve?(et-1+G((1-et)*(1-et)+4*Re))/(2*ve)*T:0,Vt(function(it){return et*(E*_(it)-2*it)*E+4*it*it*(be-_(it))+2*E*it-Xe*be},0)]};function Wh(){return t.geoProjection(Wf).scale(127.267)}var rh=1.0148,sf=.23185,Sh=-.14499,Mu=.02406,ih=rh,js=5*sf,Eu=7*Sh,Dc=9*Mu,ks=1.790857183;function bc(ve,be){var Re=be*be;return[ve,be*(rh+Re*Re*(sf+Re*(Sh+Mu*Re)))]}bc.invert=function(ve,be){be>ks?be=ks:be<-ks&&(be=-ks);var Re=be,qe;do{var et=Re*Re;Re-=qe=(Re*(rh+et*et*(sf+et*(Sh+Mu*et)))-be)/(ih+et*et*(js+et*(Eu+Dc*et)))}while(n(qe)>p);return[ve,Re]};function hu(){return t.geoProjection(bc).scale(139.319)}function _u(ve,be){if(n(be)p&&--et>0);return it=b(qe),[(n(be)=0;)if(qe=be[Ft],Re[0]===qe[0]&&Re[1]===qe[1]){if(Xe)return[Xe,Re];Xe=Re}}}function jl(ve){for(var be=ve.length,Re=[],qe=ve[be-1],et=0;et0?[-qe[0],0]:[180-qe[0],180])};var be=If.map(function(Re){return{face:Re,project:ve(Re)}});return[-1,0,0,1,0,1,4,5].forEach(function(Re,qe){var et=be[Re];et&&(et.children||(et.children=[])).push(be[qe])}),xf(be[0],function(Re,qe){return be[Re<-E/2?qe<0?6:4:Re<0?qe<0?2:0:Reqe^Wr>qe&&Re<(Or-tr)*(qe-dr)/(Wr-dr)+tr&&(et=!et)}return et}function Wl(ve,be){var Re=be.stream,qe;if(!Re)throw new Error("invalid projection");switch(ve&&ve.type){case"Feature":qe=Zu;break;case"FeatureCollection":qe=ah;break;default:qe=Tc;break}return qe(ve,Re)}function ah(ve,be){return{type:"FeatureCollection",features:ve.features.map(function(Re){return Zu(Re,be)})}}function Zu(ve,be){return{type:"Feature",id:ve.id,properties:ve.properties,geometry:Tc(ve.geometry,be)}}function Oc(ve,be){return{type:"GeometryCollection",geometries:ve.geometries.map(function(Re){return Tc(Re,be)})}}function Tc(ve,be){if(!ve)return null;if(ve.type==="GeometryCollection")return Oc(ve,be);var Re;switch(ve.type){case"Point":Re=qc;break;case"MultiPoint":Re=qc;break;case"LineString":Re=cf;break;case"MultiLineString":Re=cf;break;case"Polygon":Re=fc;break;case"MultiPolygon":Re=fc;break;case"Sphere":Re=fc;break;default:return null}return t.geoStream(ve,be(Re)),Re.result()}var wl=[],vu=[],qc={point:function(ve,be){wl.push([ve,be])},result:function(){var ve=wl.length?wl.length<2?{type:"Point",coordinates:wl[0]}:{type:"MultiPoint",coordinates:wl}:null;return wl=[],ve}},cf={lineStart:Xu,point:function(ve,be){wl.push([ve,be])},lineEnd:function(){wl.length&&(vu.push(wl),wl=[])},result:function(){var ve=vu.length?vu.length<2?{type:"LineString",coordinates:vu[0]}:{type:"MultiLineString",coordinates:vu}:null;return vu=[],ve}},fc={polygonStart:Xu,lineStart:Xu,point:function(ve,be){wl.push([ve,be])},lineEnd:function(){var ve=wl.length;if(ve){do wl.push(wl[0].slice());while(++ve<4);vu.push(wl),wl=[]}},polygonEnd:Xu,result:function(){if(!vu.length)return null;var ve=[],be=[];return vu.forEach(function(Re){uf(Re)?ve.push([Re]):be.push(Re)}),be.forEach(function(Re){var qe=Re[0];ve.some(function(et){if(Zf(et[0],qe))return et.push(Re),!0})||ve.push([Re])}),vu=[],ve.length?ve.length>1?{type:"MultiPolygon",coordinates:ve}:{type:"Polygon",coordinates:ve[0]}:null}};function Bc(ve){var be=ve(T,0)[0]-ve(-T,0)[0];function Re(qe,et){var Xe=n(qe)0?qe-E:qe+E,et),Ft=(it[0]-it[1])*x,Ht=(it[0]+it[1])*x;if(Xe)return[Ft,Ht];var tr=be*x,dr=Ft>0^Ht>0?-1:1;return[dr*Ft-v(Ht)*tr,dr*Ht-v(Ft)*tr]}return ve.invert&&(Re.invert=function(qe,et){var Xe=(qe+et)*x,it=(et-qe)*x,Ft=n(Xe)<.5*be&&n(it)<.5*be;if(!Ft){var Ht=be*x,tr=Xe>0^it>0?-1:1,dr=-tr*qe+(it>0?1:-1)*Ht,Sr=-tr*et+(Xe>0?1:-1)*Ht;Xe=(-dr-Sr)*x,it=(dr-Sr)*x}var Or=ve.invert(Xe,it);return Ft||(Or[0]+=Xe>0?E:-E),Or}),t.geoProjection(Re).rotate([-90,-90,45]).clipAngle(180-.001)}function At(){return Bc(Li).scale(176.423)}function Xt(){return Bc(Lo).scale(111.48)}function Cr(ve,be){if(!(0<=(be=+be)&&be<=20))throw new Error("invalid digits");function Re(tr){var dr=tr.length,Sr=2,Or=new Array(dr);for(Or[0]=+tr[0].toFixed(be),Or[1]=+tr[1].toFixed(be);Sr2||Wr[0]!=dr[0]||Wr[1]!=dr[1])&&(Sr.push(Wr),dr=Wr)}return Sr.length===1&&tr.length>1&&Sr.push(Re(tr[tr.length-1])),Sr}function Xe(tr){return tr.map(et)}function it(tr){if(tr==null)return tr;var dr;switch(tr.type){case"GeometryCollection":dr={type:"GeometryCollection",geometries:tr.geometries.map(it)};break;case"Point":dr={type:"Point",coordinates:Re(tr.coordinates)};break;case"MultiPoint":dr={type:tr.type,coordinates:qe(tr.coordinates)};break;case"LineString":dr={type:tr.type,coordinates:et(tr.coordinates)};break;case"MultiLineString":case"Polygon":dr={type:tr.type,coordinates:Xe(tr.coordinates)};break;case"MultiPolygon":dr={type:"MultiPolygon",coordinates:tr.coordinates.map(Xe)};break;default:return tr}return tr.bbox!=null&&(dr.bbox=tr.bbox),dr}function Ft(tr){var dr={type:"Feature",properties:tr.properties,geometry:it(tr.geometry)};return tr.id!=null&&(dr.id=tr.id),tr.bbox!=null&&(dr.bbox=tr.bbox),dr}if(ve!=null)switch(ve.type){case"Feature":return Ft(ve);case"FeatureCollection":{var Ht={type:"FeatureCollection",features:ve.features.map(Ft)};return ve.bbox!=null&&(Ht.bbox=ve.bbox),Ht}default:return it(ve)}return ve}function Ar(ve){var be=_(ve);function Re(qe,et){var Xe=be?b(qe*be/2)/be:qe/2;if(!et)return[2*Xe,-ve];var it=2*i(Xe*_(et)),Ft=1/b(et);return[_(it)*Ft,et+(1-o(it))*Ft-ve]}return Re.invert=function(qe,et){if(n(et+=ve)p&&--Ft>0);var Or=qe*(tr=b(it)),Wr=b(n(et)0?T:-T)*(Ht+et*(dr-it)/2+et*et*(dr-2*Ht+it)/2)]}Xi.invert=function(ve,be){var Re=be/T,qe=Re*90,et=f(18,n(qe/5)),Xe=c(0,l(et));do{var it=ki[Xe][1],Ft=ki[Xe+1][1],Ht=ki[f(19,Xe+2)][1],tr=Ht-it,dr=Ht-2*Ft+it,Sr=2*(n(Re)-Ft)/tr,Or=dr/tr,Wr=Sr*(1-Or*Sr*(1-2*Or*Sr));if(Wr>=0||Xe===1){qe=(be>=0?5:-5)*(Wr+et);var ni=50,Pi;do et=f(18,n(qe)/5),Xe=l(et),Wr=et-Xe,it=ki[Xe][1],Ft=ki[Xe+1][1],Ht=ki[f(19,Xe+2)][1],qe-=(Pi=(be>=0?T:-T)*(Ft+Wr*(Ht-it)/2+Wr*Wr*(Ht-2*Ft+it)/2)-be)*P;while(n(Pi)>k&&--ni>0);break}}while(--Xe>=0);var cn=ki[Xe][0],ln=ki[Xe+1][0],Cn=ki[f(19,Xe+2)][0];return[ve/(ln+Wr*(Cn-cn)/2+Wr*Wr*(Cn-2*ln+cn)/2),qe*A]};function dn(){return t.geoProjection(Xi).scale(152.63)}function wn(ve){function be(Re,qe){var et=o(qe),Xe=(ve-1)/(ve-et*o(Re));return[Xe*et*_(Re),Xe*_(qe)]}return be.invert=function(Re,qe){var et=Re*Re+qe*qe,Xe=G(et),it=(ve-G(1-et*(ve+1)/(ve-1)))/((ve-1)/Xe+Xe/(ve-1));return[a(Re*it,Xe*G(1-it*it)),Xe?O(qe*it/Xe):0]},be}function Nn(ve,be){var Re=wn(ve);if(!be)return Re;var qe=o(be),et=_(be);function Xe(it,Ft){var Ht=Re(it,Ft),tr=Ht[1],dr=tr*et/(ve-1)+qe;return[Ht[0]*qe/dr,tr/dr]}return Xe.invert=function(it,Ft){var Ht=(ve-1)/(ve-1-Ft*et);return Re.invert(Ht*it,Ht*Ft*qe)},Xe}function Yi(){var ve=2,be=0,Re=t.geoProjectionMutator(Nn),qe=Re(ve,be);return qe.distance=function(et){return arguments.length?Re(ve=+et,be):ve},qe.tilt=function(et){return arguments.length?Re(ve,be=et*A):be*P},qe.scale(432.147).clipAngle(U(1/ve)*P-1e-6)}var Qi=1e-4,on=1e4,Fi=-180,Qn=Fi+Qi,Ca=180,Ra=Ca-Qi,La=-90,Na=La+Qi,Yn=90,Dn=Yn-Qi;function Ka(ve){return ve.length>0}function bo(ve){return Math.floor(ve*on)/on}function Zo(ve){return ve===La||ve===Yn?[0,ve]:[Fi,bo(ve)]}function Ss(ve){var be=ve[0],Re=ve[1],qe=!1;return be<=Qn?(be=Fi,qe=!0):be>=Ra&&(be=Ca,qe=!0),Re<=Na?(Re=La,qe=!0):Re>=Dn&&(Re=Yn,qe=!0),qe?[be,Re]:ve}function as(ve){return ve.map(Ss)}function ws(ve,be,Re){for(var qe=0,et=ve.length;qe=Ra||dr<=Na||dr>=Dn){Xe[it]=Ss(Ht);for(var Sr=it+1;SrQn&&WrNa&&ni=Ft)break;Re.push({index:-1,polygon:be,ring:Xe=Xe.slice(Sr-1)}),Xe[0]=Zo(Xe[0][1]),it=-1,Ft=Xe.length}}}}function Ho(ve){var be,Re=ve.length,qe={},et={},Xe,it,Ft,Ht,tr;for(be=0;be0?E-Ft:Ft)*P],tr=t.geoProjection(ve(it)).rotate(Ht),dr=t.geoRotation(Ht),Sr=tr.center;return delete tr.rotate,tr.center=function(Or){return arguments.length?Sr(dr(Or)):dr.invert(Sr())},tr.clipAngle(90)}function rs(ve){var be=o(ve);function Re(qe,et){var Xe=t.geoGnomonicRaw(qe,et);return Xe[0]*=be,Xe}return Re.invert=function(qe,et){return t.geoGnomonicRaw.invert(qe/be,et)},Re}function Ql(){return Cu([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Cu(ve,be){return ys(rs,ve,be)}function Yu(ve){if(!(ve*=2))return t.geoAzimuthalEquidistantRaw;var be=-ve/2,Re=-be,qe=ve*ve,et=b(Re),Xe=.5/_(Re);function it(Ft,Ht){var tr=U(o(Ht)*o(Ft-be)),dr=U(o(Ht)*o(Ft-Re)),Sr=Ht<0?-1:1;return tr*=tr,dr*=dr,[(tr-dr)/(2*ve),Sr*G(4*qe*dr-(qe-tr+dr)*(qe-tr+dr))/(2*ve)]}return it.invert=function(Ft,Ht){var tr=Ht*Ht,dr=o(G(tr+(Or=Ft+be)*Or)),Sr=o(G(tr+(Or=Ft+Re)*Or)),Or,Wr;return[a(Wr=dr-Sr,Or=(dr+Sr)*et),(Ht<0?-1:1)*U(G(Or*Or+Wr*Wr)*Xe)]},it}function Nc(){return pu([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function pu(ve,be){return ys(Yu,ve,be)}function Uc(ve,be){if(n(be)p&&--Ft>0);return[v(ve)*(G(et*et+4)+et)*E/4,T*it]};function Ku(){return t.geoProjection(hc).scale(127.16)}function ue(ve,be,Re,qe,et){function Xe(it,Ft){var Ht=Re*_(qe*Ft),tr=G(1-Ht*Ht),dr=G(2/(1+tr*o(it*=et)));return[ve*tr*dr*_(it),be*Ht*dr]}return Xe.invert=function(it,Ft){var Ht=it/ve,tr=Ft/be,dr=G(Ht*Ht+tr*tr),Sr=2*O(dr/2);return[a(it*b(Sr),ve*dr)/et,dr&&O(Ft*_(Sr)/(be*Re*dr))/qe]},Xe}function w(ve,be,Re,qe){var et=E/3;ve=c(ve,p),be=c(be,p),ve=f(ve,T),be=f(be,E-p),Re=c(Re,0),Re=f(Re,100-p),qe=c(qe,p);var Xe=Re/100+1,it=qe/100,Ft=U(Xe*o(et))/et,Ht=_(ve)/_(Ft*T),tr=be/E,dr=G(it*_(ve/2)/_(be/2)),Sr=dr/G(tr*Ht*Ft),Or=1/(dr*G(tr*Ht*Ft));return ue(Sr,Or,Ht,Ft,tr)}function B(){var ve=65*A,be=60*A,Re=20,qe=200,et=t.geoProjectionMutator(w),Xe=et(ve,be,Re,qe);return Xe.poleline=function(it){return arguments.length?et(ve=+it*A,be,Re,qe):ve*P},Xe.parallels=function(it){return arguments.length?et(ve,be=+it*A,Re,qe):be*P},Xe.inflation=function(it){return arguments.length?et(ve,be,Re=+it,qe):Re},Xe.ratio=function(it){return arguments.length?et(ve,be,Re,qe=+it):qe},Xe.scale(163.775)}function Q(){return B().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var ee=4*E+3*G(3),le=2*G(2*E*G(3)/ee),Oe=$t(le*G(3)/E,le,ee/6);function Ze(){return t.geoProjection(Oe).scale(176.84)}function st(ve,be){return[ve*G(1-3*be*be/(E*E)),be]}st.invert=function(ve,be){return[ve/G(1-3*be*be/(E*E)),be]};function Tt(){return t.geoProjection(st).scale(152.63)}function Yt(ve,be){var Re=o(be),qe=o(ve)*Re,et=1-qe,Xe=o(ve=a(_(ve)*Re,-_(be))),it=_(ve);return Re=G(1-qe*qe),[it*Re-Xe*et,-Xe*Re-it*et]}Yt.invert=function(ve,be){var Re=(ve*ve+be*be)/-2,qe=G(-Re*(2+Re)),et=be*Re+ve*qe,Xe=ve*Re-be*qe,it=G(Xe*Xe+et*et);return[a(qe*et,it*(1+Re)),it?-O(qe*Xe/it):0]};function Kt(){return t.geoProjection(Yt).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function xr(ve,be){var Re=Ce(ve,be);return[(Re[0]+ve/T)/2,(Re[1]+be)/2]}xr.invert=function(ve,be){var Re=ve,qe=be,et=25;do{var Xe=o(qe),it=_(qe),Ft=_(2*qe),Ht=it*it,tr=Xe*Xe,dr=_(Re),Sr=o(Re/2),Or=_(Re/2),Wr=Or*Or,ni=1-tr*Sr*Sr,Pi=ni?U(Xe*Sr)*G(cn=1/ni):cn=0,cn,ln=.5*(2*Pi*Xe*Or+Re/T)-ve,Cn=.5*(Pi*it+qe)-be,Kn=.5*cn*(tr*Wr+Pi*Xe*Sr*Ht)+.5/T,Aa=cn*(dr*Ft/4-Pi*it*Or),fa=.125*cn*(Ft*Or-Pi*it*tr*dr),$a=.5*cn*(Ht*Sr+Pi*Wr*Xe)+.5,Co=Aa*fa-$a*Kn,Qa=(Cn*Aa-ln*$a)/Co,mo=(ln*fa-Cn*Kn)/Co;Re-=Qa,qe-=mo}while((n(Qa)>p||n(mo)>p)&&--et>0);return[Re,qe]};function Ir(){return t.geoProjection(xr).scale(158.837)}e.geoNaturalEarth=t.geoNaturalEarth1,e.geoNaturalEarthRaw=t.geoNaturalEarth1Raw,e.geoAiry=_e,e.geoAiryRaw=oe,e.geoAitoff=Le,e.geoAitoffRaw=Ce,e.geoArmadillo=ie,e.geoArmadilloRaw=ge,e.geoAugust=Ee,e.geoAugustRaw=Se,e.geoBaker=me,e.geoBakerRaw=Pe,e.geoBerghaus=ce,e.geoBerghausRaw=De,e.geoBertin1953=Wt,e.geoBertin1953Raw=ut,e.geoBoggs=Qt,e.geoBoggsRaw=St,e.geoBonne=er,e.geoBonneRaw=mt,e.geoBottomley=wr,e.geoBottomleyRaw=lr,e.geoBromley=ti,e.geoBromleyRaw=Lr,e.geoChamberlin=tt,e.geoChamberlinRaw=Ge,e.geoChamberlinAfrica=We,e.geoCollignon=Ie,e.geoCollignonRaw=xt,e.geoCraig=ke,e.geoCraigRaw=xe,e.geoCraster=ar,e.geoCrasterRaw=ir,e.geoCylindricalEqualArea=ii,e.geoCylindricalEqualAreaRaw=vr,e.geoCylindricalStereographic=$r,e.geoCylindricalStereographicRaw=pi,e.geoEckert1=ji,e.geoEckert1Raw=di,e.geoEckert2=wi,e.geoEckert2Raw=In,e.geoEckert3=qn,e.geoEckert3Raw=On,e.geoEckert4=ra,e.geoEckert4Raw=Fn,e.geoEckert5=Ut,e.geoEckert5Raw=la,e.geoEckert6=rr,e.geoEckert6Raw=wt,e.geoEisenlohr=Xr,e.geoEisenlohrRaw=Er,e.geoFahey=Oi,e.geoFaheyRaw=Qr,e.geoFoucaut=tn,e.geoFoucautRaw=$i,e.geoFoucautSinusoidal=yn,e.geoFoucautSinusoidalRaw=fn,e.geoGilbert=ua,e.geoGingery=Xo,e.geoGingeryRaw=ma,e.geoGinzburg4=Ha,e.geoGinzburg4Raw=Wn,e.geoGinzburg5=jn,e.geoGinzburg5Raw=vo,e.geoGinzburg6=kr,e.geoGinzburg6Raw=Mt,e.geoGinzburg8=vi,e.geoGinzburg8Raw=Jr,e.geoGinzburg9=An,e.geoGinzburg9Raw=hn,e.geoGringorten=$n,e.geoGringortenRaw=Li,e.geoGuyou=Fs,e.geoGuyouRaw=Lo,e.geoHammer=pt,e.geoHammerRaw=je,e.geoHammerRetroazimuthal=zl,e.geoHammerRetroazimuthalRaw=ll,e.geoHealpix=Yl,e.geoHealpixRaw=cl,e.geoHill=nc,e.geoHillRaw=Su,e.geoHomolosine=xo,e.geoHomolosineRaw=Ol,e.geoHufnagel=Ns,e.geoHufnagelRaw=Kl,e.geoHyperelliptical=Oo,e.geoHyperellipticalRaw=aa,e.geoInterrupt=Do,e.geoInterruptedBoggs=Vf,e.geoInterruptedHomolosine=Zc,e.geoInterruptedMollweide=Os,e.geoInterruptedMollweideHemispheres=oc,e.geoInterruptedSinuMollweide=sc,e.geoInterruptedSinusoidal=Lf,e.geoKavrayskiy7=nf,e.geoKavrayskiy7Raw=cs,e.geoLagrange=$l,e.geoLagrangeRaw=Gf,e.geoLarrivee=Fu,e.geoLarriveeRaw=lc,e.geoLaskowski=Hs,e.geoLaskowskiRaw=Es,e.geoLittrow=ps,e.geoLittrowRaw=Go,e.geoLoximuthal=xl,e.geoLoximuthalRaw=uc,e.geoMiller=qs,e.geoMillerRaw=Gu,e.geoModifiedStereographic=Bl,e.geoModifiedStereographicRaw=od,e.geoModifiedStereographicAlaska=Hu,e.geoModifiedStereographicGs48=bl,e.geoModifiedStereographicGs50=Hf,e.geoModifiedStereographicMiller=Ic,e.geoModifiedStereographicLee=yf,e.geoMollweide=Tr,e.geoMollweideRaw=sr,e.geoMtFlatPolarParabolic=Yc,e.geoMtFlatPolarParabolicRaw=_f,e.geoMtFlatPolarQuartic=th,e.geoMtFlatPolarQuarticRaw=eh,e.geoMtFlatPolarSinusoidal=jf,e.geoMtFlatPolarSinusoidalRaw=ju,e.geoNaturalEarth2=of,e.geoNaturalEarth2Raw=cc,e.geoNellHammer=Kc,e.geoNellHammerRaw=Nl,e.geoInterruptedQuarticAuthalic=gs,e.geoNicolosi=Wh,e.geoNicolosiRaw=Wf,e.geoPatterson=hu,e.geoPattersonRaw=bc,e.geoPolyconic=nl,e.geoPolyconicRaw=_u,e.geoPolyhedral=xf,e.geoPolyhedralButterfly=Cs,e.geoPolyhedralCollignon=Xf,e.geoPolyhedralWaterman=Us,e.geoProject=Wl,e.geoGringortenQuincuncial=At,e.geoPeirceQuincuncial=Xt,e.geoPierceQuincuncial=Xt,e.geoQuantize=Cr,e.geoQuincuncial=Bc,e.geoRectangularPolyconic=Kr,e.geoRectangularPolyconicRaw=Ar,e.geoRobinson=dn,e.geoRobinsonRaw=Xi,e.geoSatellite=Yi,e.geoSatelliteRaw=Nn,e.geoSinuMollweide=Vu,e.geoSinuMollweideRaw=_a,e.geoSinusoidal=It,e.geoSinusoidalRaw=_t,e.geoStitch=Ls,e.geoTimes=no,e.geoTimesRaw=va,e.geoTwoPointAzimuthal=Cu,e.geoTwoPointAzimuthalRaw=rs,e.geoTwoPointAzimuthalUsa=Ql,e.geoTwoPointEquidistant=pu,e.geoTwoPointEquidistantRaw=Yu,e.geoTwoPointEquidistantUsa=Nc,e.geoVanDerGrinten=xu,e.geoVanDerGrintenRaw=Uc,e.geoVanDerGrinten2=Ua,e.geoVanDerGrinten2Raw=Ac,e.geoVanDerGrinten3=Vc,e.geoVanDerGrinten3Raw=oo,e.geoVanDerGrinten4=Ku,e.geoVanDerGrinten4Raw=hc,e.geoWagner=B,e.geoWagner7=Q,e.geoWagnerRaw=w,e.geoWagner4=Ze,e.geoWagner4Raw=Oe,e.geoWagner6=Tt,e.geoWagner6Raw=st,e.geoWiechel=Kt,e.geoWiechelRaw=Yt,e.geoWinkel3=Ir,e.geoWinkel3Raw=xr,Object.defineProperty(e,"__esModule",{value:!0})})});var GDe=ye((Imr,VDe)=>{"use strict";var nd=Oa(),UZ=Dr(),Ozt=qa(),r5=Math.PI/180,tw=180/Math.PI,GZ={cursor:"pointer"},HZ={cursor:"auto"};function qzt(e,t){var r=e.projection,n;return t._isScoped?n=Bzt:t._isClipped?n=Uzt:n=Nzt,n(e,r)}VDe.exports=qzt;function jZ(e,t){return nd.behavior.zoom().translate(t.translate()).scale(t.scale())}function WZ(e,t,r){var n=e.id,i=e.graphDiv,a=i.layout,o=a[n],s=i._fullLayout,l=s[n],u={},c={};function f(h,d){u[n+"."+h]=UZ.nestedProperty(o,h).get(),Ozt.call("_storeDirectGUIEdit",a,s._preGUI,u);var v=UZ.nestedProperty(l,h);v.get()!==d&&(v.set(d),UZ.nestedProperty(o,h).set(d),c[n+"."+h]=d)}r(f),f("projection.scale",t.scale()/e.fitScale),f("fitbounds",!1),i.emit("plotly_relayout",c)}function Bzt(e,t){var r=jZ(e,t);function n(){nd.select(this).style(GZ)}function i(){t.scale(nd.event.scale).translate(nd.event.translate),e.render(!0);var s=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":s[0],"geo.center.lat":s[1]})}function a(s){var l=t.invert(e.midPt);s("center.lon",l[0]),s("center.lat",l[1])}function o(){nd.select(this).style(HZ),WZ(e,t,a)}return r.on("zoomstart",n).on("zoom",i).on("zoomend",o),r}function Nzt(e,t){var r=jZ(e,t),n=2,i,a,o,s,l,u,c,f,h;function d(E){return t.invert(E)}function v(E){var T=d(E);if(!T)return!0;var L=t(T);return Math.abs(L[0]-E[0])>n||Math.abs(L[1]-E[1])>n}function _(){nd.select(this).style(GZ),i=nd.mouse(this),a=t.rotate(),o=t.translate(),s=a,l=d(i)}function b(){if(u=nd.mouse(this),v(i)){r.scale(t.scale()),r.translate(t.translate());return}t.scale(nd.event.scale),t.translate([o[0],nd.event.translate[1]]),l?d(u)&&(f=d(u),c=[s[0]+(f[0]-l[0]),a[1],a[2]],t.rotate(c),s=c):(i=u,l=d(i)),h=!0,e.render(!0);var E=t.rotate(),T=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":T[0],"geo.center.lat":T[1],"geo.projection.rotation.lon":-E[0]})}function p(){nd.select(this).style(HZ),h&&WZ(e,t,k)}function k(E){var T=t.rotate(),L=t.invert(e.midPt);E("projection.rotation.lon",-T[0]),E("center.lon",L[0]),E("center.lat",L[1])}return r.on("zoomstart",_).on("zoom",b).on("zoomend",p),r}function Uzt(e,t){var r={r:t.rotate(),k:t.scale()},n=jZ(e,t),i=Yzt(n,"zoomstart","zoom","zoomend"),a=0,o=n.on,s;n.on("zoomstart",function(){nd.select(this).style(GZ);var h=nd.mouse(this),d=t.rotate(),v=d,_=t.translate(),b=Vzt(d);s=zF(t,h),o.call(n,"zoom",function(){var p=nd.mouse(this);if(t.scale(r.k=nd.event.scale),!s)h=p,s=zF(t,h);else if(zF(t,p)){t.rotate(d).translate(_);var k=zF(t,p),E=Hzt(s,k),T=Wzt(Gzt(b,E)),L=r.r=jzt(T,s,v);(!isFinite(L[0])||!isFinite(L[1])||!isFinite(L[2]))&&(L=v),t.rotate(L),v=L}u(i.of(this,arguments))}),l(i.of(this,arguments))}).on("zoomend",function(){nd.select(this).style(HZ),o.call(n,"zoom",null),c(i.of(this,arguments)),WZ(e,t,f)}).on("zoom.redraw",function(){e.render(!0);var h=t.rotate();e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.projection.rotation.lon":-h[0],"geo.projection.rotation.lat":-h[1]})});function l(h){a++||h({type:"zoomstart"})}function u(h){h({type:"zoom"})}function c(h){--a||h({type:"zoomend"})}function f(h){var d=t.rotate();h("projection.rotation.lon",-d[0]),h("projection.rotation.lat",-d[1])}return nd.rebind(n,i,"on")}function zF(e,t){var r=e.invert(t);return r&&isFinite(r[0])&&isFinite(r[1])&&Xzt(r)}function Vzt(e){var t=.5*e[0]*r5,r=.5*e[1]*r5,n=.5*e[2]*r5,i=Math.sin(t),a=Math.cos(t),o=Math.sin(r),s=Math.cos(r),l=Math.sin(n),u=Math.cos(n);return[a*s*u+i*o*l,i*s*u-a*o*l,a*o*u+i*s*l,a*s*l-i*o*u]}function Gzt(e,t){var r=e[0],n=e[1],i=e[2],a=e[3],o=t[0],s=t[1],l=t[2],u=t[3];return[r*o-n*s-i*l-a*u,r*s+n*o+i*u-a*l,r*l-n*u+i*o+a*s,r*u+n*l-i*s+a*o]}function Hzt(e,t){if(!(!e||!t)){var r=Zzt(e,t),n=Math.sqrt(UDe(r,r)),i=.5*Math.acos(Math.max(-1,Math.min(1,UDe(e,t)))),a=Math.sin(i)/n;return n&&[Math.cos(i),r[2]*a,-r[1]*a,r[0]*a]}}function jzt(e,t,r){var n=VZ(t,2,e[0]);n=VZ(n,1,e[1]),n=VZ(n,0,e[2]-r[2]);var i=t[0],a=t[1],o=t[2],s=n[0],l=n[1],u=n[2],c=Math.atan2(a,i)*tw,f=Math.sqrt(i*i+a*a),h,d;Math.abs(l)>f?(d=(l>0?90:-90)-c,h=0):(d=Math.asin(l/f)*tw-c,h=Math.sqrt(f*f-l*l));var v=180-d-2*c,_=(Math.atan2(u,s)-Math.atan2(o,h))*tw,b=(Math.atan2(u,s)-Math.atan2(o,-h))*tw,p=BDe(r[0],r[1],d,_),k=BDe(r[0],r[1],v,b);return p<=k?[d,_,r[2]]:[v,b,r[2]]}function BDe(e,t,r,n){var i=NDe(r-e),a=NDe(n-t);return Math.sqrt(i*i+a*a)}function NDe(e){return(e%360+540)%360-180}function VZ(e,t,r){var n=r*r5,i=e.slice(),a=t===0?1:0,o=t===2?1:2,s=Math.cos(n),l=Math.sin(n);return i[a]=e[a]*s-e[o]*l,i[o]=e[o]*s+e[a]*l,i}function Wzt(e){return[Math.atan2(2*(e[0]*e[1]+e[2]*e[3]),1-2*(e[1]*e[1]+e[2]*e[2]))*tw,Math.asin(Math.max(-1,Math.min(1,2*(e[0]*e[2]-e[3]*e[1]))))*tw,Math.atan2(2*(e[0]*e[3]+e[1]*e[2]),1-2*(e[2]*e[2]+e[3]*e[3]))*tw]}function Xzt(e){var t=e[0]*r5,r=e[1]*r5,n=Math.cos(r);return[n*Math.cos(t),n*Math.sin(t),Math.sin(r)]}function UDe(e,t){for(var r=0,n=0,i=e.length;n{"use strict";var l1=Oa(),YZ=NZ(),Kzt=YZ.geoPath,Jzt=YZ.geoDistance,$zt=qDe(),Qzt=qa(),vk=Dr(),e7t=vk.strTranslate,OF=ka(),dk=So(),HDe=vf(),t7t=Mc(),ZZ=ho(),jDe=Mg().getAutoRange,XZ=yv(),r7t=Of().prepSelect,i7t=Of().clearOutline,n7t=Of().selectOnClick,a7t=GDe(),hp=uk(),o7t=hx(),XDe=bF(),s7t=SZ().feature;function ZDe(e){this.id=e.id,this.graphDiv=e.graphDiv,this.container=e.container,this.topojsonURL=e.topojsonURL,this.isStatic=e.staticPlot,this.topojsonName=null,this.topojson=null,this.projection=null,this.scope=null,this.viewInitial=null,this.fitScale=null,this.bounds=null,this.midPt=null,this.hasChoropleth=!1,this.traceHash={},this.layers={},this.basePaths={},this.dataPaths={},this.dataPoints={},this.clipDef=null,this.clipRect=null,this.bgRect=null,this.makeFramework()}var tm=ZDe.prototype;YDe.exports=function(t){return new ZDe(t)};tm.plot=function(e,t,r,n){var i=this;if(n)return i.update(e,t,!0);i._geoCalcData=e,i._fullLayout=t;var a=t[this.id],o=[],s=!1;for(var l in hp.layerNameToAdjective)if(l!=="frame"&&a["show"+l]){s=!0;break}for(var u=!1,c=0;c0&&o._module.calcGeoJSON(a,t)}if(!r){var s=this.updateProjection(e,t);if(s)return;(!this.viewInitial||this.scope!==n.scope)&&this.saveViewInitial(n)}this.scope=n.scope,this.updateBaseLayers(t,n),this.updateDims(t,n),this.updateFx(t,n),t7t.generalUpdatePerTraceModule(this.graphDiv,this,e,n);var l=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=l.selectAll(".point"),this.dataPoints.text=l.selectAll("text"),this.dataPaths.line=l.selectAll(".js-line");var u=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=u.selectAll("path"),this._render()};tm.updateProjection=function(e,t){var r=this.graphDiv,n=t[this.id],i=t._size,a=n.domain,o=n.projection,s=n.lonaxis,l=n.lataxis,u=s._ax,c=l._ax,f=this.projection=l7t(n),h=[[i.l+i.w*a.x[0],i.t+i.h*(1-a.y[1])],[i.l+i.w*a.x[1],i.t+i.h*(1-a.y[0])]],d=n.center||{},v=o.rotation||{},_=s.range||[],b=l.range||[];if(n.fitbounds){u._length=h[1][0]-h[0][0],c._length=h[1][1]-h[0][1],u.range=jDe(r,u),c.range=jDe(r,c);var p=(u.range[0]+u.range[1])/2,k=(c.range[0]+c.range[1])/2;if(n._isScoped)d={lon:p,lat:k};else if(n._isClipped){d={lon:p,lat:k},v={lon:p,lat:k,roll:v.roll};var E=o.type,T=hp.lonaxisSpan[E]/2||180,L=hp.lataxisSpan[E]/2||90;_=[p-T,p+T],b=[k-L,k+L]}else d={lon:p,lat:k},v={lon:p,lat:v.lat,roll:v.roll}}f.center([d.lon-v.lon,d.lat-v.lat]).rotate([-v.lon,-v.lat,v.roll]).parallels(o.parallels);var x=WDe(_,b);f.fitExtent(h,x);var C=this.bounds=f.getBounds(x),M=this.fitScale=f.scale(),g=f.translate();if(n.fitbounds){var P=f.getBounds(WDe(u.range,c.range)),A=Math.min((C[1][0]-C[0][0])/(P[1][0]-P[0][0]),(C[1][1]-C[0][1])/(P[1][1]-P[0][1]));isFinite(A)?f.scale(A*M):vk.warn("Something went wrong during"+this.id+"fitbounds computations.")}else f.scale(o.scale*M);var z=this.midPt=[(C[0][0]+C[1][0])/2,(C[0][1]+C[1][1])/2];if(f.translate([g[0]+(z[0]-g[0]),g[1]+(z[1]-g[1])]).clipExtent(C),n._isAlbersUsa){var O=f([d.lon,d.lat]),U=f.translate();f.translate([U[0]-(O[0]-U[0]),U[1]-(O[1]-U[1])])}};tm.updateBaseLayers=function(e,t){var r=this,n=r.topojson,i=r.layers,a=r.basePaths;function o(h){return h==="lonaxis"||h==="lataxis"}function s(h){return!!hp.lineLayers[h]}function l(h){return!!hp.fillLayers[h]}var u=this.hasChoropleth?hp.layersForChoropleth:hp.layers,c=u.filter(function(h){return s(h)||l(h)?t["show"+h]:o(h)?t[h].showgrid:!0}),f=r.framework.selectAll(".layer").data(c,String);f.exit().each(function(h){delete i[h],delete a[h],l1.select(this).remove()}),f.enter().append("g").attr("class",function(h){return"layer "+h}).each(function(h){var d=i[h]=l1.select(this);h==="bg"?r.bgRect=d.append("rect").style("pointer-events","all"):o(h)?a[h]=d.append("path").style("fill","none"):h==="backplot"?d.append("g").classed("choroplethlayer",!0):h==="frontplot"?d.append("g").classed("scatterlayer",!0):s(h)?a[h]=d.append("path").style("fill","none").style("stroke-miterlimit",2):l(h)&&(a[h]=d.append("path").style("stroke","none"))}),f.order(),f.each(function(h){var d=a[h],v=hp.layerNameToAdjective[h];h==="frame"?d.datum(hp.sphereSVG):s(h)||l(h)?d.datum(s7t(n,n.objects[h])):o(h)&&d.datum(u7t(h,t,e)).call(OF.stroke,t[h].gridcolor).call(dk.dashLine,t[h].griddash,t[h].gridwidth),s(h)?d.call(OF.stroke,t[v+"color"]).call(dk.dashLine,"",t[v+"width"]):l(h)&&d.call(OF.fill,t[v+"color"])})};tm.updateDims=function(e,t){var r=this.bounds,n=(t.framewidth||0)/2,i=r[0][0]-n,a=r[0][1]-n,o=r[1][0]-i+n,s=r[1][1]-a+n;dk.setRect(this.clipRect,i,a,o,s),this.bgRect.call(dk.setRect,i,a,o,s).call(OF.fill,t.bgcolor),this.xaxis._offset=i,this.xaxis._length=o,this.yaxis._offset=a,this.yaxis._length=s};tm.updateFx=function(e,t){var r=this,n=r.graphDiv,i=r.bgRect,a=e.dragmode,o=e.clickmode;if(r.isStatic)return;function s(){var f=r.viewInitial,h={};for(var d in f)h[r.id+"."+d]=f[d];Qzt.call("_guiRelayout",n,h),n.emit("plotly_doubleclick",null)}function l(f){return r.projection.invert([f[0]+r.xaxis._offset,f[1]+r.yaxis._offset])}var u=function(f,h){if(h.isRect){var d=f.range={};d[r.id]=[l([h.xmin,h.ymin]),l([h.xmax,h.ymax])]}else{var v=f.lassoPoints={};v[r.id]=h.map(l)}},c={element:r.bgRect.node(),gd:n,plotinfo:{id:r.id,xaxis:r.xaxis,yaxis:r.yaxis,fillRangeItems:u},xaxes:[r.xaxis],yaxes:[r.yaxis],subplot:r.id,clickFn:function(f){f===2&&i7t(n)}};a==="pan"?(i.node().onmousedown=null,i.call(a7t(r,t)),i.on("dblclick.zoom",s),n._context._scrollZoom.geo||i.on("wheel.zoom",null)):(a==="select"||a==="lasso")&&(i.on(".zoom",null),c.prepFn=function(f,h,d){r7t(f,h,d,c,a)},XZ.init(c)),i.on("mousemove",function(){var f=r.projection.invert(vk.getPositionFromD3Event());if(!f)return XZ.unhover(n,l1.event);r.xaxis.p2c=function(){return f[0]},r.yaxis.p2c=function(){return f[1]},HDe.hover(n,l1.event,r.id)}),i.on("mouseout",function(){n._dragging||XZ.unhover(n,l1.event)}),i.on("click",function(){a!=="select"&&a!=="lasso"&&(o.indexOf("select")>-1&&n7t(l1.event,n,[r.xaxis],[r.yaxis],r.id,c),o.indexOf("event")>-1&&HDe.click(n,l1.event))})};tm.makeFramework=function(){var e=this,t=e.graphDiv,r=t._fullLayout,n="clip"+r._uid+e.id;e.clipDef=r._clips.append("clipPath").attr("id",n),e.clipRect=e.clipDef.append("rect"),e.framework=l1.select(e.container).append("g").attr("class","geo "+e.id).call(dk.setClipUrl,n,t),e.project=function(i){var a=e.projection(i);return a?[a[0]-e.xaxis._offset,a[1]-e.yaxis._offset]:[null,null]},e.xaxis={_id:"x",c2p:function(i){return e.project(i)[0]}},e.yaxis={_id:"y",c2p:function(i){return e.project(i)[1]}},e.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},ZZ.setConvert(e.mockAxis,r)};tm.saveViewInitial=function(e){var t=e.center||{},r=e.projection,n=r.rotation||{};this.viewInitial={fitbounds:e.fitbounds,"projection.scale":r.scale};var i;e._isScoped?i={"center.lon":t.lon,"center.lat":t.lat}:e._isClipped?i={"projection.rotation.lon":n.lon,"projection.rotation.lat":n.lat}:i={"center.lon":t.lon,"center.lat":t.lat,"projection.rotation.lon":n.lon},vk.extendFlat(this.viewInitial,i)};tm.render=function(e){this._hasMarkerAngles&&e?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()};tm._render=function(){var e=this.projection,t=e.getPath(),r;function n(a){var o=e(a.lonlat);return o?e7t(o[0],o[1]):null}function i(a){return e.isLonLatOverEdges(a.lonlat)?"none":null}for(r in this.basePaths)this.basePaths[r].attr("d",t);for(r in this.dataPaths)this.dataPaths[r].attr("d",function(a){return t(a.geojson)});for(r in this.dataPoints)this.dataPoints[r].attr("display",i).attr("transform",n)};function l7t(e){var t=e.projection,r=t.type,n=hp.projNames[r];n="geo"+vk.titleCase(n);for(var i=YZ[n]||$zt[n],a=i(),o=e._isSatellite?Math.acos(1/t.distance)*180/Math.PI:e._isClipped?hp.lonaxisSpan[r]/2:null,s=["center","rotate","parallels","clipExtent"],l=function(f){return f?a:[]},u=0;uv}else return!1},a.getPath=function(){return Kzt().projection(a)},a.getBounds=function(f){return a.getPath().bounds(f)},a.precision(hp.precision),e._isSatellite&&a.tilt(t.tilt).distance(t.distance),o&&a.clipAngle(o-hp.clipPad),a}function u7t(e,t,r){var n=1e-6,i=2.5,a=t[e],o=hp.scopeDefaults[t.scope],s,l,u;e==="lonaxis"?(s=o.lonaxisRange,l=o.lataxisRange,u=function(k,E){return[k,E]}):e==="lataxis"&&(s=o.lataxisRange,l=o.lonaxisRange,u=function(k,E){return[E,k]});var c={type:"linear",range:[s[0],s[1]-n],tick0:a.tick0,dtick:a.dtick};ZZ.setConvert(c,r);var f=ZZ.calcTicks(c);!t.isScoped&&e==="lonaxis"&&f.pop();for(var h=f.length,d=new Array(h),v=0;v0&&i<0&&(i+=360);var s=(i-n)/4;return{type:"Polygon",coordinates:[[[n,a],[n,o],[n+s,o],[n+2*s,o],[n+3*s,o],[i,o],[i,a],[i-s,a],[i-2*s,a],[i-3*s,a],[n,a]]]}}});var KZ=ye((Dmr,QDe)=>{"use strict";var n5=Ih(),c7t=Cc().attributes,f7t=Pd().dash,i5=uk(),h7t=mc().overrideAll,JDe=t_(),$De={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},showgrid:{valType:"boolean",dflt:!1},tick0:{valType:"number",dflt:0},dtick:{valType:"number"},gridcolor:{valType:"color",dflt:n5.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:f7t},d7t=QDe.exports=h7t({domain:c7t({name:"geo"},{}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:!1,editType:"plot"},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:JDe(i5.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:JDe(i5.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:n5.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:i5.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:i5.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:i5.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:i5.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:n5.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:n5.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:n5.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:n5.background},lonaxis:$De,lataxis:$De},"plot","from-root");d7t.uirevision={valType:"any",editType:"none"}});var rFe=ye((Fmr,tFe)=>{"use strict";var qF=Dr(),v7t=O_(),p7t=Id().getSubplotData,BF=uk(),g7t=KZ(),eFe=BF.axesNames;tFe.exports=function(t,r,n){v7t(t,r,n,{type:"geo",attributes:g7t,handleDefaults:m7t,fullData:n,partition:"y"})};function m7t(e,t,r,n){var i=p7t(n.fullData,"geo",n.id),a=i.map(function(oe){return oe.index}),o=r("resolution"),s=r("scope"),l=BF.scopeDefaults[s],u=r("projection.type",l.projType),c=t._isAlbersUsa=u==="albers usa";c&&(s=t.scope="usa");var f=t._isScoped=s!=="world",h=t._isSatellite=u==="satellite",d=t._isConic=u.indexOf("conic")!==-1||u==="albers",v=t._isClipped=!!BF.lonaxisSpan[u];if(e.visible===!1){var _=qF.extendDeep({},t._template);_.showcoastlines=!1,_.showcountries=!1,_.showframe=!1,_.showlakes=!1,_.showland=!1,_.showocean=!1,_.showrivers=!1,_.showsubunits=!1,_.lonaxis&&(_.lonaxis.showgrid=!1),_.lataxis&&(_.lataxis.showgrid=!1),t._template=_}for(var b=r("visible"),p,k=0;k0&&O<0&&(O+=360);var U=(z+O)/2,G;if(!c){var Z=f?l.projRotate:[U,0,0];G=r("projection.rotation.lon",Z[0]),r("projection.rotation.lat",Z[1]),r("projection.rotation.roll",Z[2]),p=r("showcoastlines",!f&&b),p&&(r("coastlinecolor"),r("coastlinewidth")),p=r("showocean",b?void 0:!1),p&&r("oceancolor")}var j,N;if(c?(j=-96.6,N=38.7):(j=f?U:G,N=(A[0]+A[1])/2),r("center.lon",j),r("center.lat",N),h&&(r("projection.tilt"),r("projection.distance")),d){var H=l.projParallels||[0,60];r("projection.parallels",H)}r("projection.scale"),p=r("showland",b?void 0:!1),p&&r("landcolor"),p=r("showlakes",b?void 0:!1),p&&r("lakecolor"),p=r("showrivers",b?void 0:!1),p&&(r("rivercolor"),r("riverwidth")),p=r("showcountries",f&&s!=="usa"&&b),p&&(r("countrycolor"),r("countrywidth")),(s==="usa"||s==="north america"&&o===50)&&(r("showsubunits",b),r("subunitcolor"),r("subunitwidth")),f||(p=r("showframe",b),p&&(r("framecolor"),r("framewidth"))),r("bgcolor");var re=r("fitbounds");re&&(delete t.projection.scale,f?(delete t.center.lon,delete t.center.lat):v?(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon,delete t.projection.rotation.lat,delete t.lonaxis.range,delete t.lataxis.range):(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon))}});var JZ=ye((zmr,aFe)=>{"use strict";var y7t=Id().getSubplotCalcData,_7t=Dr().counterRegex,x7t=KDe(),Qm="geo",iFe=_7t(Qm),nFe={};nFe[Qm]={valType:"subplotid",dflt:Qm,editType:"calc"};function b7t(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[Qm],i=0;i{"use strict";oFe.exports={attributes:ew(),supplyDefaults:URe(),colorbar:$d(),formatLabels:HRe(),calc:_F(),calcGeoJSON:BZ().calcGeoJSON,plot:BZ().plot,style:FZ(),styleOnSelect:sp().styleOnSelect,hoverPoints:CDe(),eventData:PDe(),selectPoints:DDe(),moduleType:"trace",name:"scattergeo",basePlotModule:JZ(),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}});var uFe=ye((qmr,lFe)=>{"use strict";lFe.exports=sFe()});var a5=ye((Bmr,hFe)=>{"use strict";var{hovertemplateAttrs:A7t,templatefallbackAttrs:S7t}=Ll(),vx=ew(),M7t=Tu(),cFe=Gl(),E7t=Ih().defaultLine,dx=Ao().extendFlat,fFe=vx.marker.line;hFe.exports=dx({locations:{valType:"data_array",editType:"calc"},locationmode:vx.locationmode,z:{valType:"data_array",editType:"calc"},geojson:dx({},vx.geojson,{}),featureidkey:vx.featureidkey,text:dx({},vx.text,{}),hovertext:dx({},vx.hovertext,{}),marker:{line:{color:dx({},fFe.color,{dflt:E7t}),width:dx({},fFe.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:vx.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:vx.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:dx({},cFe.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:A7t(),hovertemplatefallback:S7t(),showlegend:dx({},cFe.showlegend,{dflt:!1})},M7t("",{cLetter:"z",editTypeOverride:"calc"}))});var vFe=ye((Nmr,dFe)=>{"use strict";var pk=Dr(),k7t=td(),C7t=a5(),L7t=["The library used by the *country names* `locationmode` option is changing in the next major version.","Some country names in existing plots may not work in the new version.","To ensure consistent behavior, consider setting `locationmode` to *ISO-3*."].join(" ");dFe.exports=function(t,r,n,i){function a(h,d){return pk.coerce(t,r,C7t,h,d)}var o=a("locations"),s=a("z");if(!(o&&o.length&&pk.isArrayOrTypedArray(s)&&s.length)){r.visible=!1;return}r._length=Math.min(o.length,s.length);var l=a("geojson"),u;(typeof l=="string"&&l!==""||pk.isPlainObject(l))&&(u="geojson-id");var c=a("locationmode",u);c==="country names"&&pk.warn(L7t),c==="geojson-id"&&a("featureidkey"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var f=a("marker.line.width");f&&a("marker.line.color"),a("marker.opacity"),k7t(t,r,i,a,{prefix:"",cLetter:"z"}),pk.coerceSelectionMarkerOpacity(r,a)}});var NF=ye((Umr,mFe)=>{"use strict";var pFe=Eo(),P7t=fs().BADNUM,I7t=gv(),R7t=Rm(),D7t=O0();function gFe(e){return e&&typeof e=="string"}mFe.exports=function(t,r){var n=r._length,i=new Array(n),a;r.geojson?a=function(c){return gFe(c)||pFe(c)}:a=gFe;for(var o=0;o{"use strict";var F7t=Oa(),z7t=ka(),$Z=So(),O7t=tc();function q7t(e,t){t&&yFe(e,t)}function yFe(e,t){var r=t[0].trace,n=t[0].node3,i=n.selectAll(".choroplethlocation"),a=r.marker||{},o=a.line||{},s=O7t.makeColorScaleFuncFromTrace(r);i.each(function(l){F7t.select(this).attr("fill",s(l.z)).call(z7t.stroke,l.mlc||o.color).call($Z.dashLine,"",l.mlw||o.width||0).style("opacity",a.opacity)}),$Z.selectedPointStyle(i,r)}function B7t(e,t){var r=t[0].node3,n=t[0].trace;n.selectedpoints?$Z.selectedPointStyle(r.selectAll(".choroplethlocation"),n):yFe(e,t)}_Fe.exports={style:q7t,styleOnSelect:B7t}});var QZ=ye((Gmr,wFe)=>{"use strict";var N7t=Oa(),xFe=Dr(),o5=hx(),U7t=bF().getTopojsonFeatures,bFe=Mg().findExtremes,V7t=UF().style;function G7t(e,t,r){var n=t.layers.backplot.select(".choroplethlayer");xFe.makeTraceGroups(n,r,"trace choropleth").each(function(i){var a=N7t.select(this),o=a.selectAll("path.choroplethlocation").data(xFe.identity);o.enter().append("path").classed("choroplethlocation",!0),o.exit().remove(),V7t(e,i)})}function H7t(e,t){for(var r=e[0].trace,n=t[r.geo],i=n._subplot,a=r.locationmode,o=r._length,s=a==="geojson-id"?o5.extractTraceFeature(e):U7t(r,i.topojson),l=[],u=[],c=0;c{"use strict";var j7t=ho(),W7t=a5(),X7t=Dr().fillText;TFe.exports=function(t,r,n){var i=t.cd,a=i[0].trace,o=t.subplot,s,l,u,c,f=[r,n],h=[r+360,n];for(l=0;l")}}});var GF=ye((jmr,AFe)=>{"use strict";AFe.exports=function(t,r,n,i,a){t.location=r.location,t.z=r.z;var o=i[a];return o.fIn&&o.fIn.properties&&(t.properties=o.fIn.properties),t.ct=o.ct,t}});var HF=ye((Wmr,SFe)=>{"use strict";SFe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s,l,u,c,f;if(r===!1)for(s=0;s{"use strict";MFe.exports={attributes:a5(),supplyDefaults:vFe(),colorbar:D_(),calc:NF(),calcGeoJSON:QZ().calcGeoJSON,plot:QZ().plot,style:UF().style,styleOnSelect:UF().styleOnSelect,hoverPoints:VF(),eventData:GF(),selectPoints:HF(),moduleType:"trace",name:"choropleth",basePlotModule:JZ(),categories:["geo","noOpacity","showLegend"],meta:{}}});var CFe=ye((Zmr,kFe)=>{"use strict";kFe.exports=EFe()});var jF=ye((Ymr,PFe)=>{"use strict";var Y7t=qa(),l0=Dr(),K7t=gT();function J7t(e,t,r,n){var i=e.cd,a=i[0].t,o=i[0].trace,s=e.xa,l=e.ya,u=a.x,c=a.y,f=s.c2p(t),h=l.c2p(r),d=e.distance,v;if(a.tree){var _=s.p2c(f-d),b=s.p2c(f+d),p=l.p2c(h-d),k=l.p2c(h+d);n==="x"?v=a.tree.range(Math.min(_,b),Math.min(l._rl[0],l._rl[1]),Math.max(_,b),Math.max(l._rl[0],l._rl[1])):v=a.tree.range(Math.min(_,b),Math.min(p,k),Math.max(_,b),Math.max(p,k))}else v=a.ids;var E,T,L,x,C,M,g,P,A,z=d;if(n==="x"){var O=!!o.xperiodalignment,U=!!o.yperiodalignment;for(C=0;C=Math.min(G,Z)&&f<=Math.max(G,Z)?0:1/0}if(M=Math.min(j,N)&&h<=Math.max(j,N)?0:1/0}A=Math.sqrt(M*M+g*g),T=v[C]}}}else for(C=v.length-1;C>-1;C--)E=v[C],L=u[E],x=c[E],M=s.c2p(L)-f,g=l.c2p(x)-h,P=Math.sqrt(M*M+g*g),P{"use strict";var IFe=20;RFe.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:IFe,SYMBOL_STROKE:IFe/20,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}});var gk=ye((Jmr,OFe)=>{"use strict";var $7t=Gl(),Q7t=ec(),e9t=Pg(),mf=pf(),DFe=df().axisHoverFormat,FFe=Tu(),t9t=t_(),eY=Ao().extendFlat,r9t=mc().overrideAll,i9t=px().DASHES,zFe=mf.line,u1=mf.marker,n9t=u1.line,gx=OFe.exports=r9t({x:mf.x,x0:mf.x0,dx:mf.dx,y:mf.y,y0:mf.y0,dy:mf.dy,xperiod:mf.xperiod,yperiod:mf.yperiod,xperiod0:mf.xperiod0,yperiod0:mf.yperiod0,xperiodalignment:mf.xperiodalignment,yperiodalignment:mf.yperiodalignment,xhoverformat:DFe("x"),yhoverformat:DFe("y"),text:mf.text,hovertext:mf.hovertext,textposition:mf.textposition,textfont:Q7t({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,noNumericWeightValues:!0,variantValues:["normal","small-caps"]}),mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"]},line:{color:zFe.color,width:zFe.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:t9t(i9t),dflt:"solid"}},marker:eY({},FFe("marker"),{symbol:u1.symbol,angle:u1.angle,size:u1.size,sizeref:u1.sizeref,sizemin:u1.sizemin,sizemode:u1.sizemode,opacity:u1.opacity,colorbar:u1.colorbar,line:eY({},FFe("marker.line"),{width:n9t.width})}),connectgaps:mf.connectgaps,fill:eY({},mf.fill,{dflt:"none"}),fillcolor:e9t(),selected:{marker:mf.selected.marker,textfont:mf.selected.textfont},unselected:{marker:mf.unselected.marker,textfont:mf.unselected.textfont},opacity:$7t.opacity},"calc","nested");gx.x.editType=gx.y.editType=gx.x0.editType=gx.y0.editType="calc+clearAxisTypes";gx.hovertemplate=mf.hovertemplate;gx.hovertemplatefallback=mf.hovertemplatefallback;gx.texttemplate=mf.texttemplate;gx.texttemplatefallback=mf.texttemplatefallback});var WF=ye(tY=>{"use strict";var qFe=px();tY.isOpenSymbol=function(e){return typeof e=="string"?qFe.OPEN_RE.test(e):e%200>100};tY.isDotSymbol=function(e){return typeof e=="string"?qFe.DOT_RE.test(e):e>200}});var UFe=ye((Qmr,NFe)=>{"use strict";var BFe=Dr(),a9t=qa(),o9t=WF(),s9t=gk(),l9t=Lm(),XF=Ru(),u9t=oT(),c9t=Dg(),f9t=$p(),h9t=D0(),d9t=Fg(),v9t=F0();NFe.exports=function(t,r,n,i){function a(d,v){return BFe.coerce(t,r,s9t,d,v)}var o=t.marker?o9t.isOpenSymbol(t.marker.symbol):!1,s=XF.isBubble(t),l=u9t(t,r,i,a);if(!l){r.visible=!1;return}c9t(t,r,i,a),a("xhoverformat"),a("yhoverformat");var u=l{"use strict";var p9t=lI();VFe.exports=function(t,r,n){var i=t.i;return"x"in t||(t.x=r._x[i]),"y"in t||(t.y=r._y[i]),p9t(t,r,n)}});var jFe=ye((tyr,HFe)=>{"use strict";function g9t(e,t,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l>=0?(a=o,i=o-1):n=o+1}return a}function m9t(e,t,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l>0?(a=o,i=o-1):n=o+1}return a}function y9t(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l<0?(a=o,n=o+1):i=o-1}return a}function _9t(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l<=0?(a=o,n=o+1):i=o-1}return a}function x9t(e,t,r,n,i){for(;n<=i;){var a=n+i>>>1,o=e[a],s=r!==void 0?r(o,t):o-t;if(s===0)return a;s<=0?n=a+1:i=a-1}return-1}function mk(e,t,r,n,i,a){return typeof r=="function"?a(e,t,r,n===void 0?0:n|0,i===void 0?e.length-1:i|0):a(e,t,void 0,r===void 0?0:r|0,n===void 0?e.length-1:n|0)}HFe.exports={ge:function(e,t,r,n,i){return mk(e,t,r,n,i,g9t)},gt:function(e,t,r,n,i){return mk(e,t,r,n,i,m9t)},lt:function(e,t,r,n,i){return mk(e,t,r,n,i,y9t)},le:function(e,t,r,n,i){return mk(e,t,r,n,i,_9t)},eq:function(e,t,r,n,i){return mk(e,t,r,n,i,x9t)}}});var ey=ye((ryr,XFe)=>{"use strict";XFe.exports=function(t,r,n){var i={},a,o;if(typeof r=="string"&&(r=WFe(r)),Array.isArray(r)){var s={};for(o=0;o{"use strict";var b9t=ey();ZFe.exports=w9t;function w9t(e){var t;return arguments.length>1&&(e=arguments),typeof e=="string"?e=e.split(/\s/).map(parseFloat):typeof e=="number"&&(e=[e]),e.length&&typeof e[0]=="number"?e.length===1?t={width:e[0],height:e[0],x:0,y:0}:e.length===2?t={width:e[0],height:e[1],x:0,y:0}:t={x:e[0],y:e[1],width:e[2]-e[0]||0,height:e[3]-e[1]||0}:e&&(e=b9t(e,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"}),t={x:e.left||0,y:e.top||0},e.width==null?e.right?t.width=e.right-t.x:t.width=0:t.width=e.width,e.height==null?e.bottom?t.height=e.bottom-t.y:t.height=0:t.height=e.height),t}});var rw=ye((nyr,YFe)=>{"use strict";YFe.exports=T9t;function T9t(e,t){if(!e||e.length==null)throw Error("Argument should be an array");t==null?t=1:t=Math.floor(t);for(var r=Array(t*2),n=0;ni&&(i=e[o]),e[o]{KFe.exports=function(){for(var e=0;e{var $Fe=QD();QFe.exports=A9t;function A9t(e,t,r){if(!e)throw new TypeError("must specify data as first parameter");if(r=+(r||0)|0,Array.isArray(e)&&e[0]&&typeof e[0][0]=="number"){var n=e[0].length,i=e.length*n,a,o,s,l;(!t||typeof t=="string")&&(t=new($Fe(t||"float32"))(i+r));var u=t.length-r;if(i!==u)throw new Error("source length "+i+" ("+n+"x"+e.length+") does not match destination length "+u);for(a=0,s=r;a{"use strict";eze.exports=function(e){var t=typeof e;return e!==null&&(t==="object"||t==="function")}});var ize=ye((lyr,rze)=>{"use strict";rze.exports=Math.log2||function(e){return Math.log(e)*Math.LOG2E}});var cze=ye((uyr,uze)=>{"use strict";var nze=jFe(),aze=rk(),S9t=s5(),M9t=rw(),oze=ey(),iY=JFe(),E9t=iw(),k9t=tze(),C9t=QD(),sze=ize(),L9t=1073741824;uze.exports=function(t,r){r||(r={}),t=E9t(t,"float64"),r=oze(r,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});let n=iY(r.maxDepth,255),i=iY(r.bounds,M9t(t,2));i[0]===i[2]&&i[2]++,i[1]===i[3]&&i[3]++;let a=lze(t,i),o=t.length>>>1,s;r.dtype||(r.dtype="array"),typeof r.dtype=="string"?s=new(C9t(r.dtype))(o):r.dtype&&(s=r.dtype,Array.isArray(s)&&(s.length=o));for(let p=0;pn||x>L9t){for(let N=0;N_e||g>Ce||P=z||re===oe)return;let Le=l[H];oe===void 0&&(oe=Le.length);for(let De=re;De=T&&je<=x&<>=L&<<=C&&O.push(ce)}let ge=u[H],ie=ge[re*4+0],Se=ge[re*4+1],Ee=ge[re*4+2],Ae=ge[re*4+3],Be=G(ge,re+1),Pe=N*.5,me=H+1;U(Z,j,Pe,me,ie,Se||Ee||Ae||Be),U(Z,j+Pe,Pe,me,Se,Ee||Ae||Be),U(Z+Pe,j,Pe,me,Ee,Ae||Be),U(Z+Pe,j+Pe,Pe,me,Ae,Be)}function G(Z,j){let N=null,H=0;for(;N===null;)if(N=Z[j*4+H],H++,H>Z.length)return null;return N}return O}function _(p,k,E,T,L){let x=[];for(let C=0;C{"use strict";fze.exports=cze()});var nY=ye((fyr,hze)=>{hze.exports=P9t;function P9t(e){var t=0,r=0,n=0,i=0;return e.map(function(a){a=a.slice();var o=a[0],s=o.toUpperCase();if(o!=s)switch(a[0]=s,o){case"a":a[6]+=n,a[7]+=i;break;case"v":a[1]+=i;break;case"h":a[1]+=n;break;default:for(var l=1;l{"use strict";Object.defineProperty(YF,"__esModule",{value:!0});var I9t=function(){function e(t,r){var n=[],i=!0,a=!1,o=void 0;try{for(var s=t[Symbol.iterator](),l;!(i=(l=s.next()).done)&&(n.push(l.value),!(r&&n.length===r));i=!0);}catch(u){a=!0,o=u}finally{try{!i&&s.return&&s.return()}finally{if(a)throw o}}return n}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),yk=Math.PI*2,aY=function(t,r,n,i,a,o,s){var l=t.x,u=t.y;l*=r,u*=n;var c=i*l-a*u,f=a*l+i*u;return{x:c+o,y:f+s}},R9t=function(t,r){var n=r===1.5707963267948966?.551915024494:r===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(r/4),i=Math.cos(t),a=Math.sin(t),o=Math.cos(t+r),s=Math.sin(t+r);return[{x:i-a*n,y:a+i*n},{x:o+s*n,y:s-o*n},{x:o,y:s}]},dze=function(t,r,n,i){var a=t*i-r*n<0?-1:1,o=t*n+r*i;return o>1&&(o=1),o<-1&&(o=-1),a*Math.acos(o)},D9t=function(t,r,n,i,a,o,s,l,u,c,f,h){var d=Math.pow(a,2),v=Math.pow(o,2),_=Math.pow(f,2),b=Math.pow(h,2),p=d*v-d*b-v*_;p<0&&(p=0),p/=d*b+v*_,p=Math.sqrt(p)*(s===l?-1:1);var k=p*a/o*h,E=p*-o/a*f,T=c*k-u*E+(t+n)/2,L=u*k+c*E+(r+i)/2,x=(f-k)/a,C=(h-E)/o,M=(-f-k)/a,g=(-h-E)/o,P=dze(1,0,x,C),A=dze(x,C,M,g);return l===0&&A>0&&(A-=yk),l===1&&A<0&&(A+=yk),[T,L,P,A]},F9t=function(t){var r=t.px,n=t.py,i=t.cx,a=t.cy,o=t.rx,s=t.ry,l=t.xAxisRotation,u=l===void 0?0:l,c=t.largeArcFlag,f=c===void 0?0:c,h=t.sweepFlag,d=h===void 0?0:h,v=[];if(o===0||s===0)return[];var _=Math.sin(u*yk/360),b=Math.cos(u*yk/360),p=b*(r-i)/2+_*(n-a)/2,k=-_*(r-i)/2+b*(n-a)/2;if(p===0&&k===0)return[];o=Math.abs(o),s=Math.abs(s);var E=Math.pow(p,2)/Math.pow(o,2)+Math.pow(k,2)/Math.pow(s,2);E>1&&(o*=Math.sqrt(E),s*=Math.sqrt(E));var T=D9t(r,n,i,a,o,s,f,d,_,b,p,k),L=I9t(T,4),x=L[0],C=L[1],M=L[2],g=L[3],P=Math.abs(g)/(yk/4);Math.abs(1-P)<1e-7&&(P=1);var A=Math.max(Math.ceil(P),1);g/=A;for(var z=0;z{"use strict";mze.exports=O9t;var z9t=pze();function O9t(e){for(var t,r=[],n=0,i=0,a=0,o=0,s=null,l=null,u=0,c=0,f=0,h=e.length;f4?(n=d[d.length-4],i=d[d.length-3]):(n=u,i=c),r.push(d)}return r}function KF(e,t,r,n){return["C",e,t,r,n,r,n]}function gze(e,t,r,n,i,a){return["C",e/3+2/3*r,t/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}});var oY=ye((dyr,_ze)=>{"use strict";_ze.exports=function(t){return typeof t!="string"?!1:(t=t.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&&/[\dz]$/i.test(t)&&t.length>4))}});var wze=ye((vyr,bze)=>{"use strict";var q9t=nM(),B9t=nY(),N9t=yze(),U9t=oY(),xze=gE();bze.exports=V9t;function V9t(e){if(Array.isArray(e)&&e.length===1&&typeof e[0]=="string"&&(e=e[0]),typeof e=="string"&&(xze(U9t(e),"String is not an SVG path."),e=q9t(e)),xze(Array.isArray(e),"Argument should be a string or an array of path segments."),e=B9t(e),e=N9t(e),!e.length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],r=0,n=e.length;rt[2]&&(t[2]=i[a+0]),i[a+1]>t[3]&&(t[3]=i[a+1]);return t}});var kze=ye((pyr,Eze)=>{var nw=Math.PI,Tze=Mze(120);Eze.exports=G9t;function G9t(e){for(var t,r=[],n=0,i=0,a=0,o=0,s=null,l=null,u=0,c=0,f=0,h=e.length;f7&&(r.push(d.splice(0,7)),d.unshift("C"));break;case"S":var _=u,b=c;(t=="C"||t=="S")&&(_+=_-n,b+=b-i),d=["C",_,b,d[1],d[2],d[3],d[4]];break;case"T":t=="Q"||t=="T"?(s=u*2-s,l=c*2-l):(s=u,l=c),d=Aze(u,c,s,l,d[1],d[2]);break;case"Q":s=d[1],l=d[2],d=Aze(u,c,d[1],d[2],d[3],d[4]);break;case"L":d=JF(u,c,d[1],d[2]);break;case"H":d=JF(u,c,d[1],c);break;case"V":d=JF(u,c,u,d[1]);break;case"Z":d=JF(u,c,a,o);break}t=v,u=d[d.length-2],c=d[d.length-1],d.length>4?(n=d[d.length-4],i=d[d.length-3]):(n=u,i=c),r.push(d)}return r}function JF(e,t,r,n){return["C",e,t,r,n,r,n]}function Aze(e,t,r,n,i,a){return["C",e/3+2/3*r,t/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}function Sze(e,t,r,n,i,a,o,s,l,u){if(u)E=u[0],T=u[1],p=u[2],k=u[3];else{var c=sY(e,t,-i);e=c.x,t=c.y,c=sY(s,l,-i),s=c.x,l=c.y;var f=(e-s)/2,h=(t-l)/2,d=f*f/(r*r)+h*h/(n*n);d>1&&(d=Math.sqrt(d),r=d*r,n=d*n);var v=r*r,_=n*n,b=(a==o?-1:1)*Math.sqrt(Math.abs((v*_-v*h*h-_*f*f)/(v*h*h+_*f*f)));b==1/0&&(b=1);var p=b*r*h/n+(e+s)/2,k=b*-n*f/r+(t+l)/2,E=Math.asin(((t-k)/n).toFixed(9)),T=Math.asin(((l-k)/n).toFixed(9));E=eT&&(E=E-nw*2),!o&&T>E&&(T=T-nw*2)}if(Math.abs(T-E)>Tze){var L=T,x=s,C=l;T=E+Tze*(o&&T>E?1:-1),s=p+r*Math.cos(T),l=k+n*Math.sin(T);var M=Sze(s,l,r,n,i,0,o,x,C,[T,L,p,k])}var g=Math.tan((T-E)/4),P=4/3*r*g,A=4/3*n*g,z=[2*e-(e+P*Math.sin(E)),2*t-(t-A*Math.cos(E)),s+P*Math.sin(T),l-A*Math.cos(T),s,l];if(u)return z;M&&(z=z.concat(M));for(var O=0;O{var H9t=nY(),j9t=kze(),W9t={M:"moveTo",C:"bezierCurveTo"};Cze.exports=function(e,t){e.beginPath(),j9t(H9t(t)).forEach(function(r){var n=r[0],i=r.slice(1);e[W9t[n]].apply(e,i)}),e.closePath()}});var Dze=ye((myr,Rze)=>{"use strict";var X9t=rk();Rze.exports=Z9t;var _k=1e20;function Z9t(e,t){t||(t={});var r=t.cutoff==null?.25:t.cutoff,n=t.radius==null?8:t.radius,i=t.channel||0,a,o,s,l,u,c,f,h,d,v,_;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");a=t.width,o=t.height,l=e,t.stride?c=t.stride:c=Math.floor(e.length/a/o)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(h=e,f=h.getContext("2d"),a=h.width,o=h.height,d=f.getImageData(0,0,a,o),l=d.data,c=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(h=e.canvas,f=e,a=h.width,o=h.height,d=f.getImageData(0,0,a,o),l=d.data,c=4):window.ImageData&&e instanceof window.ImageData&&(d=e,a=e.width,o=e.height,l=d.data,c=4);if(s=Math.max(a,o),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(u=l,l=Array(a*o),v=0,_=u.length;v<_;v++)l[v]=u[v*c+i]/255;else if(c!==1)throw Error("Raw data can have only 1 value per pixel");var b=Array(a*o),p=Array(a*o),k=Array(s),E=Array(s),T=Array(s+1),L=Array(s);for(v=0,_=a*o;v<_;v++){var x=l[v];b[v]=x===1?0:x===0?_k:Math.pow(Math.max(0,.5-x),2),p[v]=x===1?_k:x===0?0:Math.pow(Math.max(0,x-.5),2)}Pze(b,a,o,k,E,L,T),Pze(p,a,o,k,E,L,T);var C=window.Float32Array?new Float32Array(a*o):new Array(a*o);for(v=0,_=a*o;v<_;v++)C[v]=X9t(1-((b[v]-p[v])/n+r),0,1);return C}function Pze(e,t,r,n,i,a,o){for(var s=0;s{"use strict";var Y9t=wze(),K9t=nM(),J9t=Lze(),$9t=oY(),Q9t=Dze(),lY=document.createElement("canvas"),dp=lY.getContext("2d");Fze.exports=eOt;function eOt(e,t){if(!$9t(e))throw Error("Argument should be valid svg path string");t||(t={});var r,n;t.shape?(r=t.shape[0],n=t.shape[1]):(r=lY.width=t.w||t.width||200,n=lY.height=t.h||t.height||200);var i=Math.min(r,n),a=t.stroke||0,o=t.viewbox||t.viewBox||Y9t(e),s=[r/(o[2]-o[0]),n/(o[3]-o[1])],l=Math.min(s[0]||0,s[1]||0)/2;if(dp.fillStyle="black",dp.fillRect(0,0,r,n),dp.fillStyle="white",a&&(typeof a!="number"&&(a=1),a>0?dp.strokeStyle="white":dp.strokeStyle="black",dp.lineWidth=Math.abs(a)),dp.translate(r*.5,n*.5),dp.scale(l,l),tOt()){var u=new Path2D(e);dp.fill(u),a&&dp.stroke(u)}else{var c=K9t(e);J9t(dp,c),dp.fill(),a&&dp.stroke()}dp.setTransform(1,0,0,1,0,0);var f=Q9t(dp,{cutoff:t.cutoff!=null?t.cutoff:.5,radius:t.radius!=null?t.radius:i*.5});return f}var $F;function tOt(){if($F!=null)return $F;var e=document.createElement("canvas").getContext("2d");if(e.canvas.width=e.canvas.height=1,!window.Path2D)return $F=!1;var t=new Path2D("M0,0h1v1h-1v-1Z");e.fillStyle="black",e.fill(t);var r=e.getImageData(0,0,1,1);return $F=r&&r.data&&r.data[3]===255}});var ow=ye((_yr,Xze)=>{"use strict";var ez=Eo(),rOt=zze(),QF=ox(),iOt=qa(),c5=Dr(),bh=c5.isArrayOrTypedArray,l5=So(),Oze=hf(),qze=a1().formatColor,u5=Ru(),nOt=O3(),cY=WF(),xk=px(),aOt=X1().DESELECTDIM,Bze={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},oOt=ip().appendArrayPointValue;function sOt(e,t){var r,n={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},i=e._context.plotGlPixelRatio;if(t.visible!==!0)return n;if(u5.hasText(t)&&(n.text=Wze(e,t),n.textSel=Uze(e,t,t.selected),n.textUnsel=Uze(e,t,t.unselected)),u5.hasMarkers(t)&&(n.marker=hY(e,t),n.markerSel=fY(e,t,t.selected),n.markerUnsel=fY(e,t,t.unselected),!t.unselected&&bh(t.marker.opacity))){var a=t.marker.opacity;for(n.markerUnsel.opacity=new Array(a.length),r=0;r500?"bold":"normal":e}function hY(e,t){var r=t._length,n=t.marker,i={},a,o=bh(n.symbol),s=bh(n.angle),l=bh(n.color),u=bh(n.line.color),c=bh(n.opacity),f=bh(n.size),h=bh(n.line.width),d;if(o||(d=cY.isOpenSymbol(n.symbol)),o||l||u||c||s){i.symbols=new Array(r),i.angles=new Array(r),i.colors=new Array(r),i.borderColors=new Array(r);var v=n.symbol,_=n.angle,b=qze(n,n.opacity,r),p=qze(n.line,n.opacity,r);if(!bh(p[0])){var k=p;for(p=Array(r),a=0;axk.TOO_MANY_POINTS||u5.hasMarkers(t)?"rect":"round";if(u&&t.connectgaps){var f=a[0],h=a[1];for(o=0;o1?l[o]:l[0]:l,d=bh(u)?u.length>1?u[o]:u[0]:u,v=Bze[h],_=Bze[d],b=c?c/.8+1:0,p=-_*b-_*.5;a.offset[o]=[v*b/f,p/f]}}return a}Xze.exports={style:sOt,markerStyle:hY,markerSelection:fY,linePositions:uOt,errorBarPositions:cOt,textPosition:fOt}});var dY=ye((xyr,Zze)=>{"use strict";var tz=Dr();Zze.exports=function(t,r){var n=r._scene,i={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},a={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return r._scene||(n=r._scene={},n.init=function(){tz.extendFlat(n,a,i)},n.init(),n.update=function(s){var l=tz.repeat(s,n.count);if(n.fill2d&&n.fill2d.update(l),n.scatter2d&&n.scatter2d.update(l),n.line2d&&n.line2d.update(l),n.error2d&&n.error2d.update(l.concat(l)),n.select2d&&n.select2d.update(l),n.glText)for(var u=0;u{"use strict";var hOt=ZF(),f5=Dr(),Yze=hf(),dOt=Mg().findExtremes,Kze=zg(),vY=q0(),vOt=vY.calcMarkerSize,pOt=vY.calcAxisExpansion,gOt=vY.setFirstScatter,mOt=z0(),h5=ow(),yOt=dY(),Jze=fs().BADNUM,_Ot=px().TOO_MANY_POINTS;Qze.exports=function(t,r){var n=t._fullLayout,i=r._xA=Yze.getFromId(t,r.xaxis,"x"),a=r._yA=Yze.getFromId(t,r.yaxis,"y"),o=n._plots[r.xaxis+r.yaxis],s=r._length,l=s>=_Ot,u=s*2,c={},f,h=i.makeCalcdata(r,"x"),d=a.makeCalcdata(r,"y"),v=Kze(r,i,"x",h),_=Kze(r,a,"y",d),b=v.vals,p=_.vals;r._x=b,r._y=p,r.xperiodalignment&&(r._origX=h,r._xStarts=v.starts,r._xEnds=v.ends),r.yperiodalignment&&(r._origY=d,r._yStarts=_.starts,r._yEnds=_.ends);var k=new Array(u),E=new Array(s);for(f=0;f1&&f5.extendFlat(o.line,h5.linePositions(e,r,n)),o.errorX||o.errorY){var s=h5.errorBarPositions(e,r,n,i,a);o.errorX&&f5.extendFlat(o.errorX,s.x),o.errorY&&f5.extendFlat(o.errorY,s.y)}return o.text&&(f5.extendFlat(o.text,{positions:n},h5.textPosition(e,r,o.text,o.marker)),f5.extendFlat(o.textSel,{positions:n},h5.textPosition(e,r,o.text,o.markerSel)),f5.extendFlat(o.textUnsel,{positions:n},h5.textPosition(e,r,o.text,o.markerUnsel))),o}});var pY=ye((wyr,r7e)=>{"use strict";var t7e=Dr(),bOt=ka(),wOt=X1().DESELECTDIM;function TOt(e){var t=e[0],r=t.trace,n=t.t,i=n._scene,a=n.index,o=i.selectBatch[a],s=i.unselectBatch[a],l=i.textOptions[a],u=i.textSelectedOptions[a]||{},c=i.textUnselectedOptions[a]||{},f=t7e.extendFlat({},l),h,d;if(o.length||s.length){var v=u.color,_=c.color,b=l.color,p=t7e.isArrayOrTypedArray(b);for(f.color=new Array(r._length),h=0;h{"use strict";var i7e=Ru(),AOt=pY().styleTextSelection;n7e.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l=n[0].t,u=s._length,c=l.x,f=l.y,h=l._scene,d=l.index;if(!h)return o;var v=i7e.hasText(s),_=i7e.hasMarkers(s),b=!_&&!v;if(s.visible!==!0||b)return o;var p=[],k=[];if(r!==!1&&!r.degenerate)for(var E=0;E{"use strict";var SOt=jF();a7e.exports={moduleType:"trace",name:"scattergl",basePlotModule:mh(),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:gk(),supplyDefaults:UFe(),crossTraceDefaults:cU(),colorbar:$d(),formatLabels:GFe(),calc:e7e(),hoverPoints:SOt.hoverPoints,selectPoints:gY(),meta:{}}});var l7e=ye((Syr,iz)=>{"use strict";var rz=rk();iz.exports=s7e;iz.exports.to=s7e;iz.exports.from=MOt;function s7e(e,t){t==null&&(t=!0);var r=e[0],n=e[1],i=e[2],a=e[3];a==null&&(a=t?1:255),t&&(r*=255,n*=255,i*=255,a*=255),r=rz(r,0,255)&255,n=rz(n,0,255)&255,i=rz(i,0,255)&255,a=rz(a,0,255)&255;var o=r*16777216+(n<<16)+(i<<8)+a;return o}function MOt(e,t){e=+e;var r=e>>>24,n=(e&16711680)>>>16,i=(e&65280)>>>8,a=e&255;return t===!1?[r,n,i,a]:[r/255,n/255,i/255,a/255]}});var Nh=ye((Myr,c7e)=>{"use strict";var u7e=Object.getOwnPropertySymbols,EOt=Object.prototype.hasOwnProperty,kOt=Object.prototype.propertyIsEnumerable;function COt(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function LOt(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(t).map(function(a){return t[a]});if(n.join("")!=="0123456789")return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(a){i[a]=a}),Object.keys(Object.assign({},i)).join("")==="abcdefghijklmnopqrst"}catch(a){return!1}}c7e.exports=LOt()?Object.assign:function(e,t){for(var r,n=COt(e),i,a=1;a{f7e.exports=function(e){typeof e=="string"&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],n=0;n{"use strict";d7e.exports=function(t,r,n){Array.isArray(n)||(n=[].slice.call(arguments,2));for(var i=0,a=n.length;i{"use strict";v7e.exports=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))});var nz=ye((Lyr,d5)=>{"use strict";d5.exports=bk;d5.exports.float32=d5.exports.float=bk;d5.exports.fract32=d5.exports.fract=POt;var g7e=new Float32Array(1);function POt(e,t){if(e.length){if(e instanceof Float32Array)return new Float32Array(e.length);t instanceof Float32Array||(t=bk(e));for(var r=0,n=t.length;r{"use strict";function IOt(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function ROt(e,t){return zOt(e)||IOt(e,t)||y7e(e,t)||BOt()}function DOt(e){return FOt(e)||OOt(e)||y7e(e)||qOt()}function FOt(e){if(Array.isArray(e))return yY(e)}function zOt(e){if(Array.isArray(e))return e}function OOt(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function y7e(e,t){if(e){if(typeof e=="string")return yY(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yY(e,t)}}function yY(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rLe&&Pe>0){var ce=(me[Pe][0]-Le)/(me[Pe][0]-me[Pe-1][0]);return me[Pe][1]*(1-ce)+ce*me[Pe-1][1]}}return 1}var H=[0,0,0],re={showSurface:!1,showContour:!1,projections:[E.slice(),E.slice(),E.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function oe(Le,me){var Pe,ce,He,lt=me.axes&&me.axes.lastCubeProps.axis||H,mt=me.showSurface,Vt=me.showContour;for(Pe=0;Pe<3;++Pe)for(mt=mt||me.surfaceProject[Pe],ce=0;ce<3;++ce)Vt=Vt||me.contourProject[Pe][ce];for(Pe=0;Pe<3;++Pe){var st=re.projections[Pe];for(ce=0;ce<16;++ce)st[ce]=0;for(ce=0;ce<4;++ce)st[5*ce]=1;st[5*Pe]=0,st[12+Pe]=me.axesBounds[+(lt[Pe]>0)][Pe],p(st,Le.model,st);var ct=re.clipBounds[Pe];for(He=0;He<2;++He)for(ce=0;ce<3;++ce)ct[He][ce]=Le.clipBounds[He][ce];ct[0][Pe]=-1e8,ct[1][Pe]=1e8}return re.showSurface=mt,re.showContour=Vt,re}var _e={model:E,view:E,projection:E,inverseModel:E.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},ke=E.slice(),Ce=[1,0,0,0,1,0,0,0,1];function ge(Le,me){Le=Le||{};var Pe=this.gl;Pe.disable(Pe.CULL_FACE),this._colorMap.bind(0);var ce=_e;ce.model=Le.model||E,ce.view=Le.view||E,ce.projection=Le.projection||E,ce.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],ce.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],ce.objectOffset=this.objectOffset,ce.contourColor=this.contourColor[0],ce.inverseModel=k(ce.inverseModel,ce.model);for(var He=0;He<2;++He)for(var lt=ce.clipBounds[He],mt=0;mt<3;++mt)lt[mt]=Math.min(Math.max(this.clipBounds[He][mt],-1e8),1e8);ce.kambient=this.ambientLight,ce.kdiffuse=this.diffuseLight,ce.kspecular=this.specularLight,ce.roughness=this.roughness,ce.fresnel=this.fresnel,ce.opacity=this.opacity,ce.height=0,ce.permutation=Ce,ce.vertexColor=this.vertexColor;var Vt=ke;for(p(Vt,ce.view,ce.model),p(Vt,ce.projection,Vt),k(Vt,Vt),He=0;He<3;++He)ce.eyePosition[He]=Vt[12+He]/Vt[15];var st=Vt[15];for(He=0;He<3;++He)st+=this.lightPosition[He]*Vt[4*He+3];for(He=0;He<3;++He){var ct=Vt[12+He];for(mt=0;mt<3;++mt)ct+=Vt[4*mt+He]*this.lightPosition[mt];ce.lightPosition[He]=ct/st}var Qt=oe(ce,this);if(Qt.showSurface){for(this._shader.bind(),this._shader.uniforms=ce,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(Pe.TRIANGLES,this._vertexCount),He=0;He<3;++He)!this.surfaceProject[He]||!this.vertexCount||(this._shader.uniforms.model=Qt.projections[He],this._shader.uniforms.clipBounds=Qt.clipBounds[He],this._vao.draw(Pe.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Qt.showContour){var Ht=this._contourShader;ce.kambient=1,ce.kdiffuse=0,ce.kspecular=0,ce.opacity=1,Ht.bind(),Ht.uniforms=ce;var nr=this._contourVAO;for(nr.bind(),He=0;He<3;++He)for(Ht.uniforms.permutation=q[He],Pe.lineWidth(this.contourWidth[He]*this.pixelRatio),mt=0;mt>4)/16)/255,He=Math.floor(ce),lt=ce-He,mt=me[1]*(Le.value[1]+(Le.value[2]&15)/16)/255,Vt=Math.floor(mt),st=mt-Vt;He+=1,Vt+=1;var ct=Pe.position;ct[0]=ct[1]=ct[2]=0;for(var Qt=0;Qt<2;++Qt)for(var Ht=Qt?lt:1-lt,nr=0;nr<2;++nr)for(var tt=nr?st:1-st,je=He+Qt,Ue=Vt+nr,Ae=Ht*tt,rt=0;rt<3;++rt)ct[rt]+=this._field[rt].get(je,Ue)*Ae;for(var St=this._pickResult.level,Tt=0;Tt<3;++Tt)if(St[Tt]=M.le(this.contourLevels[Tt],ct[Tt]),St[Tt]<0)this.contourLevels[Tt].length>0&&(St[Tt]=0);else if(St[Tt]Math.abs(Et-ct[Tt])&&(St[Tt]+=1)}for(Pe.index[0]=lt<.5?He:He+1,Pe.index[1]=st<.5?Vt:Vt+1,Pe.uv[0]=ce/me[0],Pe.uv[1]=mt/me[1],rt=0;rt<3;++rt)Pe.dataCoordinate[rt]=this._field[rt].get(Pe.index[0],Pe.index[1]);return Pe},j.padField=function(Le,me){var Pe=me.shape.slice(),ce=Le.shape.slice();d.assign(Le.lo(1,1).hi(Pe[0],Pe[1]),me),d.assign(Le.lo(1).hi(Pe[0],1),me.hi(Pe[0],1)),d.assign(Le.lo(1,ce[1]-1).hi(Pe[0],1),me.lo(0,Pe[1]-1).hi(Pe[0],1)),d.assign(Le.lo(0,1).hi(1,Pe[1]),me.hi(1)),d.assign(Le.lo(ce[0]-1,1).hi(1,Pe[1]),me.lo(Pe[0]-1)),Le.set(0,0,me.get(0,0)),Le.set(0,ce[1]-1,me.get(0,Pe[1]-1)),Le.set(ce[0]-1,0,me.get(Pe[0]-1,0)),Le.set(ce[0]-1,ce[1]-1,me.get(Pe[0]-1,Pe[1]-1))};function Se(Le,me){return Array.isArray(Le)?[me(Le[0]),me(Le[1]),me(Le[2])]:[me(Le),me(Le),me(Le)]}function Ee(Le){return Array.isArray(Le)?Le.length===3?[Le[0],Le[1],Le[2],1]:[Le[0],Le[1],Le[2],Le[3]]:[0,0,0,1]}function we(Le){if(Array.isArray(Le)){if(Array.isArray(Le))return[Ee(Le[0]),Ee(Le[1]),Ee(Le[2])];var me=Ee(Le);return[me.slice(),me.slice(),me.slice()]}}j.update=function(Le){Le=Le||{},this.objectOffset=Le.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in Le&&(this.contourWidth=Se(Le.contourWidth,Number)),"showContour"in Le&&(this.showContour=Se(Le.showContour,Boolean)),"showSurface"in Le&&(this.showSurface=!!Le.showSurface),"contourTint"in Le&&(this.contourTint=Se(Le.contourTint,Boolean)),"contourColor"in Le&&(this.contourColor=we(Le.contourColor)),"contourProject"in Le&&(this.contourProject=Se(Le.contourProject,function(yn){return Se(yn,Boolean)})),"surfaceProject"in Le&&(this.surfaceProject=Le.surfaceProject),"dynamicColor"in Le&&(this.dynamicColor=we(Le.dynamicColor)),"dynamicTint"in Le&&(this.dynamicTint=Se(Le.dynamicTint,Number)),"dynamicWidth"in Le&&(this.dynamicWidth=Se(Le.dynamicWidth,Number)),"opacity"in Le&&(this.opacity=Le.opacity),"opacityscale"in Le&&(this.opacityscale=Le.opacityscale),"colorBounds"in Le&&(this.colorBounds=Le.colorBounds),"vertexColor"in Le&&(this.vertexColor=Le.vertexColor?1:0),"colormap"in Le&&this._colorMap.setPixels(this.genColormap(Le.colormap,this.opacityscale));var me=Le.field||Le.coords&&Le.coords[2]||null,Pe=!1;if(me||(this._field[2].shape[0]||this._field[2].shape[2]?me=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):me=this._field[2].hi(0,0)),"field"in Le||"coords"in Le){var ce=(me.shape[0]+2)*(me.shape[1]+2);ce>this._field[2].data.length&&(f.freeFloat(this._field[2].data),this._field[2].data=f.mallocFloat(s.nextPow2(ce))),this._field[2]=m(this._field[2].data,[me.shape[0]+2,me.shape[1]+2]),this.padField(this._field[2],me),this.shape=me.shape.slice();for(var He=this.shape,lt=0;lt<2;++lt)this._field[2].size>this._field[lt].data.length&&(f.freeFloat(this._field[lt].data),this._field[lt].data=f.mallocFloat(this._field[2].size)),this._field[lt]=m(this._field[lt].data,[He[0]+2,He[1]+2]);if(Le.coords){var mt=Le.coords;if(!Array.isArray(mt)||mt.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(lt=0;lt<2;++lt){var Vt=mt[lt];for(nr=0;nr<2;++nr)if(Vt.shape[nr]!==He[nr])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[lt],Vt)}}else if(Le.ticks){var st=Le.ticks;if(!Array.isArray(st)||st.length!==2)throw new Error("gl-surface: invalid ticks");for(lt=0;lt<2;++lt){var ct=st[lt];if((Array.isArray(ct)||ct.length)&&(ct=m(ct)),ct.shape[0]!==He[lt])throw new Error("gl-surface: invalid tick length");var Qt=m(ct.data,He);Qt.stride[lt]=ct.stride[0],Qt.stride[lt^1]=0,this.padField(this._field[lt],Qt)}}else{for(lt=0;lt<2;++lt){var Ht=[0,0];Ht[lt]=1,this._field[lt]=m(this._field[lt].data,[He[0]+2,He[1]+2],Ht,0)}this._field[0].set(0,0,0);for(var nr=0;nr0){for(var en=0;en<5;++en)Pi.pop();We-=1}continue e}}}Fn.push(We)}this._contourOffsets[ai]=un,this._contourCounts[ai]=Fn}var fn=f.mallocFloat(Pi.length);for(lt=0;ltU||z<0||z>U)throw new Error("gl-texture2d: Invalid texture size");return P._shape=[E,z],P.bind(),q.texImage2D(q.TEXTURE_2D,0,P.format,E,z,0,P.format,P.type,null),P._mipLevels=[0],P}function p(P,E,z,q,U,G){this.gl=P,this.handle=E,this.format=U,this.type=G,this._shape=[z,q],this._mipLevels=[0],this._magFilter=P.NEAREST,this._minFilter=P.NEAREST,this._wrapS=P.CLAMP_TO_EDGE,this._wrapT=P.CLAMP_TO_EDGE,this._anisoSamples=1;var Z=this,j=[this._wrapS,this._wrapT];Object.defineProperties(j,[{get:function(){return Z._wrapS},set:function(H){return Z.wrapS=H}},{get:function(){return Z._wrapT},set:function(H){return Z.wrapT=H}}]),this._wrapVector=j;var N=[this._shape[0],this._shape[1]];Object.defineProperties(N,[{get:function(){return Z._shape[0]},set:function(H){return Z.width=H}},{get:function(){return Z._shape[1]},set:function(H){return Z.height=H}}]),this._shapeVector=N}var k=p.prototype;Object.defineProperties(k,{minFilter:{get:function(){return this._minFilter},set:function(P){this.bind();var E=this.gl;if(this.type===E.FLOAT&&c.indexOf(P)>=0&&(E.getExtension("OES_texture_float_linear")||(P=E.NEAREST)),f.indexOf(P)<0)throw new Error("gl-texture2d: Unknown filter mode "+P);return E.texParameteri(E.TEXTURE_2D,E.TEXTURE_MIN_FILTER,P),this._minFilter=P}},magFilter:{get:function(){return this._magFilter},set:function(P){this.bind();var E=this.gl;if(this.type===E.FLOAT&&c.indexOf(P)>=0&&(E.getExtension("OES_texture_float_linear")||(P=E.NEAREST)),f.indexOf(P)<0)throw new Error("gl-texture2d: Unknown filter mode "+P);return E.texParameteri(E.TEXTURE_2D,E.TEXTURE_MAG_FILTER,P),this._magFilter=P}},mipSamples:{get:function(){return this._anisoSamples},set:function(P){var E=this._anisoSamples;if(this._anisoSamples=Math.max(P,1)|0,E!==this._anisoSamples){var z=this.gl.getExtension("EXT_texture_filter_anisotropic");z&&this.gl.texParameterf(this.gl.TEXTURE_2D,z.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(P){if(this.bind(),h.indexOf(P)<0)throw new Error("gl-texture2d: Unknown wrap mode "+P);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,P),this._wrapS=P}},wrapT:{get:function(){return this._wrapT},set:function(P){if(this.bind(),h.indexOf(P)<0)throw new Error("gl-texture2d: Unknown wrap mode "+P);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,P),this._wrapT=P}},wrap:{get:function(){return this._wrapVector},set:function(P){if(Array.isArray(P)||(P=[P,P]),P.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var E=0;E<2;++E)if(h.indexOf(P[E])<0)throw new Error("gl-texture2d: Unknown wrap mode "+P);this._wrapS=P[0],this._wrapT=P[1];var z=this.gl;return this.bind(),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_S,this._wrapS),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_T,this._wrapT),P}},shape:{get:function(){return this._shapeVector},set:function(P){if(!Array.isArray(P))P=[P|0,P|0];else if(P.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return b(this,P[0]|0,P[1]|0),[P[0]|0,P[1]|0]}},width:{get:function(){return this._shape[0]},set:function(P){return P=P|0,b(this,P,this._shape[1]),P}},height:{get:function(){return this._shape[1]},set:function(P){return P=P|0,b(this,this._shape[0],P),P}}}),k.bind=function(P){var E=this.gl;return P!==void 0&&E.activeTexture(E.TEXTURE0+(P|0)),E.bindTexture(E.TEXTURE_2D,this.handle),P!==void 0?P|0:E.getParameter(E.ACTIVE_TEXTURE)-E.TEXTURE0},k.dispose=function(){this.gl.deleteTexture(this.handle)},k.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var P=Math.min(this._shape[0],this._shape[1]),E=0;P>0;++E,P>>>=1)this._mipLevels.indexOf(E)<0&&this._mipLevels.push(E)},k.setPixels=function(P,E,z,q){var U=this.gl;this.bind(),Array.isArray(E)?(q=z,z=E[1]|0,E=E[0]|0):(E=E||0,z=z||0),q=q||0;var G=v(P)?P:P.raw;if(G){var Z=this._mipLevels.indexOf(q)<0;Z?(U.texImage2D(U.TEXTURE_2D,0,this.format,this.format,this.type,G),this._mipLevels.push(q)):U.texSubImage2D(U.TEXTURE_2D,q,E,z,this.format,this.type,G)}else if(P.shape&&P.stride&&P.data){if(P.shape.length<2||E+P.shape[1]>this._shape[1]>>>q||z+P.shape[0]>this._shape[0]>>>q||E<0||z<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");T(U,E,z,q,this.format,this.type,this._mipLevels,P)}else throw new Error("gl-texture2d: Unsupported data type")};function M(P,E){return P.length===3?E[2]===1&&E[1]===P[0]*P[2]&&E[0]===P[2]:E[0]===1&&E[1]===P[0]}function T(P,E,z,q,U,G,Z,j){var N=j.dtype,H=j.shape.slice();if(H.length<2||H.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var re=0,oe=0,_e=M(H,j.stride.slice());N==="float32"?re=P.FLOAT:N==="float64"?(re=P.FLOAT,_e=!1,N="float32"):N==="uint8"?re=P.UNSIGNED_BYTE:(re=P.UNSIGNED_BYTE,_e=!1,N="uint8");var ke=1;if(H.length===2)oe=P.LUMINANCE,H=[H[0],H[1],1],j=s(j.data,H,[j.stride[0],j.stride[1],1],j.offset);else if(H.length===3){if(H[2]===1)oe=P.ALPHA;else if(H[2]===2)oe=P.LUMINANCE_ALPHA;else if(H[2]===3)oe=P.RGB;else if(H[2]===4)oe=P.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");ke=H[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((oe===P.LUMINANCE||oe===P.ALPHA)&&(U===P.LUMINANCE||U===P.ALPHA)&&(oe=U),oe!==U)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var Ce=j.size,ge=Z.indexOf(q)<0;if(ge&&Z.push(q),re===G&&_e)j.offset===0&&j.data.length===Ce?ge?P.texImage2D(P.TEXTURE_2D,q,U,H[0],H[1],0,U,G,j.data):P.texSubImage2D(P.TEXTURE_2D,q,E,z,H[0],H[1],U,G,j.data):ge?P.texImage2D(P.TEXTURE_2D,q,U,H[0],H[1],0,U,G,j.data.subarray(j.offset,j.offset+Ce)):P.texSubImage2D(P.TEXTURE_2D,q,E,z,H[0],H[1],U,G,j.data.subarray(j.offset,j.offset+Ce));else{var ie;G===P.FLOAT?ie=u.mallocFloat32(Ce):ie=u.mallocUint8(Ce);var Se=s(ie,H,[H[2],H[2]*H[0],1]);re===P.FLOAT&&G===P.UNSIGNED_BYTE?m(Se,j):l.assign(Se,j),ge?P.texImage2D(P.TEXTURE_2D,q,U,H[0],H[1],0,U,G,ie.subarray(0,Ce)):P.texSubImage2D(P.TEXTURE_2D,q,E,z,H[0],H[1],U,G,ie.subarray(0,Ce)),G===P.FLOAT?u.freeFloat32(ie):u.freeUint8(ie)}}function L(P){var E=P.createTexture();return P.bindTexture(P.TEXTURE_2D,E),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_MIN_FILTER,P.NEAREST),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_MAG_FILTER,P.NEAREST),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_S,P.CLAMP_TO_EDGE),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_T,P.CLAMP_TO_EDGE),E}function x(P,E,z,q,U){var G=P.getParameter(P.MAX_TEXTURE_SIZE);if(E<0||E>G||z<0||z>G)throw new Error("gl-texture2d: Invalid texture shape");if(U===P.FLOAT&&!P.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var Z=L(P);return P.texImage2D(P.TEXTURE_2D,0,q,E,z,0,q,U,null),new p(P,Z,E,z,q,U)}function C(P,E,z,q,U,G){var Z=L(P);return P.texImage2D(P.TEXTURE_2D,0,U,U,G,E),new p(P,Z,z,q,U,G)}function S(P,E){var z=E.dtype,q=E.shape.slice(),U=P.getParameter(P.MAX_TEXTURE_SIZE);if(q[0]<0||q[0]>U||q[1]<0||q[1]>U)throw new Error("gl-texture2d: Invalid texture size");var G=M(q,E.stride.slice()),Z=0;z==="float32"?Z=P.FLOAT:z==="float64"?(Z=P.FLOAT,G=!1,z="float32"):z==="uint8"?Z=P.UNSIGNED_BYTE:(Z=P.UNSIGNED_BYTE,G=!1,z="uint8");var j=0;if(q.length===2)j=P.LUMINANCE,q=[q[0],q[1],1],E=s(E.data,q,[E.stride[0],E.stride[1],1],E.offset);else if(q.length===3)if(q[2]===1)j=P.ALPHA;else if(q[2]===2)j=P.LUMINANCE_ALPHA;else if(q[2]===3)j=P.RGB;else if(q[2]===4)j=P.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");Z===P.FLOAT&&!P.getExtension("OES_texture_float")&&(Z=P.UNSIGNED_BYTE,G=!1);var N,H,re=E.size;if(G)E.offset===0&&E.data.length===re?N=E.data:N=E.data.subarray(E.offset,E.offset+re);else{var oe=[q[2],q[2]*q[0],1];H=u.malloc(re,z);var _e=s(H,q,oe,0);(z==="float32"||z==="float64")&&Z===P.UNSIGNED_BYTE?m(_e,E):l.assign(_e,E),N=H.subarray(0,re)}var ke=L(P);return P.texImage2D(P.TEXTURE_2D,0,j,q[0],q[1],0,j,Z,N),G||u.free(H),new p(P,ke,q[0],q[1],j,Z)}function g(P){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(c||d(P),typeof arguments[1]=="number")return x(P,arguments[1],arguments[2],arguments[3]||P.RGBA,arguments[4]||P.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return x(P,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||P.RGBA,arguments[3]||P.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var E=arguments[1],z=v(E)?E:E.raw;if(z)return C(P,z,E.width|0,E.height|0,arguments[2]||P.RGBA,arguments[3]||P.UNSIGNED_BYTE);if(E.shape&&E.data&&E.stride)return S(P,E)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},1433:function(i){"use strict";function a(o,s,l){s?s.bind():o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,null);var u=o.getParameter(o.MAX_VERTEX_ATTRIBS)|0;if(l){if(l.length>u)throw new Error("gl-vao: Too many vertex attributes");for(var c=0;c1?0:Math.acos(m)}},9226:function(i){i.exports=a;function a(o,s){return o[0]=Math.ceil(s[0]),o[1]=Math.ceil(s[1]),o[2]=Math.ceil(s[2]),o}},3126:function(i){i.exports=a;function a(o){var s=new Float32Array(3);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s}},3990:function(i){i.exports=a;function a(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o}},1091:function(i){i.exports=a;function a(){var o=new Float32Array(3);return o[0]=0,o[1]=0,o[2]=0,o}},5911:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],d=l[1],v=l[2];return o[0]=c*v-f*d,o[1]=f*h-u*v,o[2]=u*d-c*h,o}},5455:function(i,a,o){i.exports=o(7056)},7056:function(i){i.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2];return Math.sqrt(l*l+u*u+c*c)}},4008:function(i,a,o){i.exports=o(6690)},6690:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]/l[0],o[1]=s[1]/l[1],o[2]=s[2]/l[2],o}},244:function(i){i.exports=a;function a(o,s){return o[0]*s[0]+o[1]*s[1]+o[2]*s[2]}},2613:function(i){i.exports=1e-6},9922:function(i,a,o){i.exports=l;var s=o(2613);function l(u,c){var f=u[0],h=u[1],d=u[2],v=c[0],m=c[1],b=c[2];return Math.abs(f-v)<=s*Math.max(1,Math.abs(f),Math.abs(v))&&Math.abs(h-m)<=s*Math.max(1,Math.abs(h),Math.abs(m))&&Math.abs(d-b)<=s*Math.max(1,Math.abs(d),Math.abs(b))}},9265:function(i){i.exports=a;function a(o,s){return o[0]===s[0]&&o[1]===s[1]&&o[2]===s[2]}},2681:function(i){i.exports=a;function a(o,s){return o[0]=Math.floor(s[0]),o[1]=Math.floor(s[1]),o[2]=Math.floor(s[2]),o}},5137:function(i,a,o){i.exports=l;var s=o(1091)();function l(u,c,f,h,d,v){var m,b;for(c||(c=3),f||(f=0),h?b=Math.min(h*c+f,u.length):b=u.length,m=f;m0&&(f=1/Math.sqrt(f),o[0]=s[0]*f,o[1]=s[1]*f,o[2]=s[2]*f),o}},7636:function(i){i.exports=a;function a(o,s){s=s||1;var l=Math.random()*2*Math.PI,u=Math.random()*2-1,c=Math.sqrt(1-u*u)*s;return o[0]=Math.cos(l)*c,o[1]=Math.sin(l)*c,o[2]=u*s,o}},6894:function(i){i.exports=a;function a(o,s,l,u){var c=l[1],f=l[2],h=s[1]-c,d=s[2]-f,v=Math.sin(u),m=Math.cos(u);return o[0]=s[0],o[1]=c+h*m-d*v,o[2]=f+h*v+d*m,o}},109:function(i){i.exports=a;function a(o,s,l,u){var c=l[0],f=l[2],h=s[0]-c,d=s[2]-f,v=Math.sin(u),m=Math.cos(u);return o[0]=c+d*v+h*m,o[1]=s[1],o[2]=f+d*m-h*v,o}},8692:function(i){i.exports=a;function a(o,s,l,u){var c=l[0],f=l[1],h=s[0]-c,d=s[1]-f,v=Math.sin(u),m=Math.cos(u);return o[0]=c+h*m-d*v,o[1]=f+h*v+d*m,o[2]=s[2],o}},2447:function(i){i.exports=a;function a(o,s){return o[0]=Math.round(s[0]),o[1]=Math.round(s[1]),o[2]=Math.round(s[2]),o}},6621:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]*l,o[1]=s[1]*l,o[2]=s[2]*l,o}},8489:function(i){i.exports=a;function a(o,s,l,u){return o[0]=s[0]+l[0]*u,o[1]=s[1]+l[1]*u,o[2]=s[2]+l[2]*u,o}},1463:function(i){i.exports=a;function a(o,s,l,u){return o[0]=s,o[1]=l,o[2]=u,o}},6141:function(i,a,o){i.exports=o(2953)},5486:function(i,a,o){i.exports=o(3066)},2953:function(i){i.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2];return l*l+u*u+c*c}},3066:function(i){i.exports=a;function a(o){var s=o[0],l=o[1],u=o[2];return s*s+l*l+u*u}},2229:function(i,a,o){i.exports=o(6843)},6843:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]-l[0],o[1]=s[1]-l[1],o[2]=s[2]-l[2],o}},492:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2];return o[0]=u*l[0]+c*l[3]+f*l[6],o[1]=u*l[1]+c*l[4]+f*l[7],o[2]=u*l[2]+c*l[5]+f*l[8],o}},5673:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[3]*u+l[7]*c+l[11]*f+l[15];return h=h||1,o[0]=(l[0]*u+l[4]*c+l[8]*f+l[12])/h,o[1]=(l[1]*u+l[5]*c+l[9]*f+l[13])/h,o[2]=(l[2]*u+l[6]*c+l[10]*f+l[14])/h,o}},264:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],d=l[1],v=l[2],m=l[3],b=m*u+d*f-v*c,p=m*c+v*u-h*f,k=m*f+h*c-d*u,M=-h*u-d*c-v*f;return o[0]=b*m+M*-h+p*-v-k*-d,o[1]=p*m+M*-d+k*-h-b*-v,o[2]=k*m+M*-v+b*-d-p*-h,o}},4361:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]+l[0],o[1]=s[1]+l[1],o[2]=s[2]+l[2],o[3]=s[3]+l[3],o}},2335:function(i){i.exports=a;function a(o){var s=new Float32Array(4);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s[3]=o[3],s}},2933:function(i){i.exports=a;function a(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o[3]=s[3],o}},7536:function(i){i.exports=a;function a(){var o=new Float32Array(4);return o[0]=0,o[1]=0,o[2]=0,o[3]=0,o}},4691:function(i){i.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2],f=s[3]-o[3];return Math.sqrt(l*l+u*u+c*c+f*f)}},1373:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]/l[0],o[1]=s[1]/l[1],o[2]=s[2]/l[2],o[3]=s[3]/l[3],o}},3750:function(i){i.exports=a;function a(o,s){return o[0]*s[0]+o[1]*s[1]+o[2]*s[2]+o[3]*s[3]}},3390:function(i){i.exports=a;function a(o,s,l,u){var c=new Float32Array(4);return c[0]=o,c[1]=s,c[2]=l,c[3]=u,c}},9970:function(i,a,o){i.exports={create:o(7536),clone:o(2335),fromValues:o(3390),copy:o(2933),set:o(4578),add:o(4361),subtract:o(6860),multiply:o(3576),divide:o(1373),min:o(2334),max:o(160),scale:o(9288),scaleAndAdd:o(4844),distance:o(4691),squaredDistance:o(7960),length:o(6808),squaredLength:o(483),negate:o(1498),inverse:o(4494),normalize:o(5177),dot:o(3750),lerp:o(2573),random:o(9131),transformMat4:o(5352),transformQuat:o(4041)}},4494:function(i){i.exports=a;function a(o,s){return o[0]=1/s[0],o[1]=1/s[1],o[2]=1/s[2],o[3]=1/s[3],o}},6808:function(i){i.exports=a;function a(o){var s=o[0],l=o[1],u=o[2],c=o[3];return Math.sqrt(s*s+l*l+u*u+c*c)}},2573:function(i){i.exports=a;function a(o,s,l,u){var c=s[0],f=s[1],h=s[2],d=s[3];return o[0]=c+u*(l[0]-c),o[1]=f+u*(l[1]-f),o[2]=h+u*(l[2]-h),o[3]=d+u*(l[3]-d),o}},160:function(i){i.exports=a;function a(o,s,l){return o[0]=Math.max(s[0],l[0]),o[1]=Math.max(s[1],l[1]),o[2]=Math.max(s[2],l[2]),o[3]=Math.max(s[3],l[3]),o}},2334:function(i){i.exports=a;function a(o,s,l){return o[0]=Math.min(s[0],l[0]),o[1]=Math.min(s[1],l[1]),o[2]=Math.min(s[2],l[2]),o[3]=Math.min(s[3],l[3]),o}},3576:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]*l[0],o[1]=s[1]*l[1],o[2]=s[2]*l[2],o[3]=s[3]*l[3],o}},1498:function(i){i.exports=a;function a(o,s){return o[0]=-s[0],o[1]=-s[1],o[2]=-s[2],o[3]=-s[3],o}},5177:function(i){i.exports=a;function a(o,s){var l=s[0],u=s[1],c=s[2],f=s[3],h=l*l+u*u+c*c+f*f;return h>0&&(h=1/Math.sqrt(h),o[0]=l*h,o[1]=u*h,o[2]=c*h,o[3]=f*h),o}},9131:function(i,a,o){var s=o(5177),l=o(9288);i.exports=u;function u(c,f){return f=f||1,c[0]=Math.random(),c[1]=Math.random(),c[2]=Math.random(),c[3]=Math.random(),s(c,c),l(c,c,f),c}},9288:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]*l,o[1]=s[1]*l,o[2]=s[2]*l,o[3]=s[3]*l,o}},4844:function(i){i.exports=a;function a(o,s,l,u){return o[0]=s[0]+l[0]*u,o[1]=s[1]+l[1]*u,o[2]=s[2]+l[2]*u,o[3]=s[3]+l[3]*u,o}},4578:function(i){i.exports=a;function a(o,s,l,u,c){return o[0]=s,o[1]=l,o[2]=u,o[3]=c,o}},7960:function(i){i.exports=a;function a(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2],f=s[3]-o[3];return l*l+u*u+c*c+f*f}},483:function(i){i.exports=a;function a(o){var s=o[0],l=o[1],u=o[2],c=o[3];return s*s+l*l+u*u+c*c}},6860:function(i){i.exports=a;function a(o,s,l){return o[0]=s[0]-l[0],o[1]=s[1]-l[1],o[2]=s[2]-l[2],o[3]=s[3]-l[3],o}},5352:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=s[3];return o[0]=l[0]*u+l[4]*c+l[8]*f+l[12]*h,o[1]=l[1]*u+l[5]*c+l[9]*f+l[13]*h,o[2]=l[2]*u+l[6]*c+l[10]*f+l[14]*h,o[3]=l[3]*u+l[7]*c+l[11]*f+l[15]*h,o}},4041:function(i){i.exports=a;function a(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],d=l[1],v=l[2],m=l[3],b=m*u+d*f-v*c,p=m*c+v*u-h*f,k=m*f+h*c-d*u,M=-h*u-d*c-v*f;return o[0]=b*m+M*-h+p*-v-k*-d,o[1]=p*m+M*-d+k*-h-b*-v,o[2]=k*m+M*-v+b*-d-p*-h,o[3]=s[3],o}},1848:function(i,a,o){var s=o(4905),l=o(6468);i.exports=u;function u(c){for(var f=Array.isArray(c)?c:s(c),h=0;h0)continue;Tt=Ae.slice(0,1).join("")}return Pe(Tt),Ce+=Tt.length,N=N.slice(Tt.length),N.length}while(!0)}function nr(){return/[^a-fA-F0-9]/.test(Z)?(Pe(N.join("")),G=h,q):(N.push(Z),j=Z,q+1)}function tt(){return Z==="."||/[eE]/.test(Z)?(N.push(Z),G=M,j=Z,q+1):Z==="x"&&N.length===1&&N[0]==="0"?(G=g,N.push(Z),j=Z,q+1):/[^\d]/.test(Z)?(Pe(N.join("")),G=h,q):(N.push(Z),j=Z,q+1)}function je(){return Z==="f"&&(N.push(Z),j=Z,q+=1),/[eE]/.test(Z)||(Z==="-"||Z==="+")&&/[eE]/.test(j)?(N.push(Z),j=Z,q+1):/[^\d]/.test(Z)?(Pe(N.join("")),G=h,q):(N.push(Z),j=Z,q+1)}function Ue(){if(/[^\d\w_]/.test(Z)){var Ae=N.join("");return me[Ae]?G=x:Le[Ae]?G=L:G=T,Pe(N.join("")),G=h,q}return N.push(Z),j=Z,q+1}}},3508:function(i,a,o){var s=o(6852);s=s.slice().filter(function(l){return!/^(gl\_|texture)/.test(l)}),i.exports=s.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},6852:function(i){i.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},7932:function(i,a,o){var s=o(620);i.exports=s.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},620:function(i){i.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},7827:function(i){i.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(i,a,o){var s=o(5874);i.exports=l;function l(u,c){var f=s(c),h=[];return h=h.concat(f(u)),h=h.concat(f(null)),h}},3236:function(i){i.exports=function(a){typeof a=="string"&&(a=[a]);for(var o=[].slice.call(arguments,1),s=[],l=0;l>1,b=-7,p=l?c-1:0,k=l?-1:1,M=o[s+p];for(p+=k,f=M&(1<<-b)-1,M>>=-b,b+=d;b>0;f=f*256+o[s+p],p+=k,b-=8);for(h=f&(1<<-b)-1,f>>=-b,b+=u;b>0;h=h*256+o[s+p],p+=k,b-=8);if(f===0)f=1-m;else{if(f===v)return h?NaN:(M?-1:1)*(1/0);h=h+Math.pow(2,u),f=f-m}return(M?-1:1)*h*Math.pow(2,f-u)},a.write=function(o,s,l,u,c,f){var h,d,v,m=f*8-c-1,b=(1<>1,k=c===23?Math.pow(2,-24)-Math.pow(2,-77):0,M=u?0:f-1,T=u?1:-1,L=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(d=isNaN(s)?1:0,h=b):(h=Math.floor(Math.log(s)/Math.LN2),s*(v=Math.pow(2,-h))<1&&(h--,v*=2),h+p>=1?s+=k/v:s+=k*Math.pow(2,1-p),s*v>=2&&(h++,v/=2),h+p>=b?(d=0,h=b):h+p>=1?(d=(s*v-1)*Math.pow(2,c),h=h+p):(d=s*Math.pow(2,p-1)*Math.pow(2,c),h=0));c>=8;o[l+M]=d&255,M+=T,d/=256,c-=8);for(h=h<0;o[l+M]=h&255,M+=T,h/=256,m-=8);o[l+M-T]|=L*128}},8954:function(i,a,o){"use strict";i.exports=p;var s=o(3250),l=o(6803).Fw;function u(k,M,T){this.vertices=k,this.adjacent=M,this.boundary=T,this.lastVisited=-1}u.prototype.flip=function(){var k=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=k;var M=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=M};function c(k,M,T){this.vertices=k,this.cell=M,this.index=T}function f(k,M){return l(k.vertices,M.vertices)}function h(k){return function(){var M=this.tuple;return k.apply(this,M)}}function d(k){var M=s[k+1];return M||(M=s),h(M)}var v=[];function m(k,M,T){this.dimension=k,this.vertices=M,this.simplices=T,this.interior=T.filter(function(C){return!C.boundary}),this.tuple=new Array(k+1);for(var L=0;L<=k;++L)this.tuple[L]=this.vertices[L];var x=v[k];x||(x=v[k]=d(k)),this.orient=x}var b=m.prototype;b.handleBoundaryDegeneracy=function(k,M){var T=this.dimension,L=this.vertices.length-1,x=this.tuple,C=this.vertices,S=[k];for(k.lastVisited=-L;S.length>0;){k=S.pop();for(var g=k.adjacent,P=0;P<=T;++P){var E=g[P];if(!(!E.boundary||E.lastVisited<=-L)){for(var z=E.vertices,q=0;q<=T;++q){var U=z[q];U<0?x[q]=M:x[q]=C[U]}var G=this.orient();if(G>0)return E;E.lastVisited=-L,G===0&&S.push(E)}}}return null},b.walk=function(k,M){var T=this.vertices.length-1,L=this.dimension,x=this.vertices,C=this.tuple,S=M?this.interior.length*Math.random()|0:this.interior.length-1,g=this.interior[S];e:for(;!g.boundary;){for(var P=g.vertices,E=g.adjacent,z=0;z<=L;++z)C[z]=x[P[z]];g.lastVisited=T;for(var z=0;z<=L;++z){var q=E[z];if(!(q.lastVisited>=T)){var U=C[z];C[z]=k;var G=this.orient();if(C[z]=U,G<0){g=q;continue e}else q.boundary?q.lastVisited=-T:q.lastVisited=T}}return}return g},b.addPeaks=function(k,M){var T=this.vertices.length-1,L=this.dimension,x=this.vertices,C=this.tuple,S=this.interior,g=this.simplices,P=[M];M.lastVisited=T,M.vertices[M.vertices.indexOf(-1)]=T,M.boundary=!1,S.push(M);for(var E=[];P.length>0;){var M=P.pop(),z=M.vertices,q=M.adjacent,U=z.indexOf(T);if(!(U<0)){for(var G=0;G<=L;++G)if(G!==U){var Z=q[G];if(!(!Z.boundary||Z.lastVisited>=T)){var j=Z.vertices;if(Z.lastVisited!==-T){for(var N=0,H=0;H<=L;++H)j[H]<0?(N=H,C[H]=k):C[H]=x[j[H]];var re=this.orient();if(re>0){j[N]=T,Z.boundary=!1,S.push(Z),P.push(Z),Z.lastVisited=T;continue}else Z.lastVisited=-T}var oe=Z.adjacent,_e=z.slice(),ke=q.slice(),Ce=new u(_e,ke,!0);g.push(Ce);var ge=oe.indexOf(M);if(!(ge<0)){oe[ge]=Ce,ke[U]=Z,_e[G]=-1,ke[G]=M,q[G]=Ce,Ce.flip();for(var H=0;H<=L;++H){var ie=_e[H];if(!(ie<0||ie===T)){for(var Se=new Array(L-1),Ee=0,we=0;we<=L;++we){var De=_e[we];De<0||we===H||(Se[Ee++]=De)}E.push(new c(Se,Ce,H))}}}}}}}E.sort(f);for(var G=0;G+1=0?S[P++]=g[z]:E=z&1;if(E===(k&1)){var q=S[0];S[0]=S[1],S[1]=q}M.push(S)}}return M};function p(k,M){var T=k.length;if(T===0)throw new Error("Must have at least d+1 points");var L=k[0].length;if(T<=L)throw new Error("Must input at least d+1 points");var x=k.slice(0,L+1),C=s.apply(void 0,x);if(C===0)throw new Error("Input not in general position");for(var S=new Array(L+1),g=0;g<=L;++g)S[g]=g;C<0&&(S[0]=1,S[1]=0);for(var P=new u(S,new Array(L+1),!1),E=P.adjacent,z=new Array(L+2),g=0;g<=L;++g){for(var q=S.slice(),U=0;U<=L;++U)U===g&&(q[U]=-1);var G=q[0];q[0]=q[1],q[1]=G;var Z=new u(q,new Array(L+1),!0);E[g]=Z,z[g]=Z}z[L+1]=P;for(var g=0;g<=L;++g)for(var q=E[g].vertices,j=E[g].adjacent,U=0;U<=L;++U){var N=q[U];if(N<0){j[U]=P;continue}for(var H=0;H<=L;++H)E[H].vertices.indexOf(N)<0&&(j[U]=E[H])}for(var re=new m(L,x,z),oe=!!M,g=L+1;g3*(z+1)?m(this,E):this.left.insert(E):this.left=C([E]);else if(E[0]>this.mid)this.right?4*(this.right.count+1)>3*(z+1)?m(this,E):this.right.insert(E):this.right=C([E]);else{var q=s.ge(this.leftPoints,E,L),U=s.ge(this.rightPoints,E,x);this.leftPoints.splice(q,0,E),this.rightPoints.splice(U,0,E)}},h.remove=function(E){var z=this.count-this.leftPoints;if(E[1]3*(z-1))return b(this,E);var U=this.left.remove(E);return U===c?(this.left=null,this.count-=1,u):(U===u&&(this.count-=1),U)}else if(E[0]>this.mid){if(!this.right)return l;var G=this.left?this.left.count:0;if(4*G>3*(z-1))return b(this,E);var U=this.right.remove(E);return U===c?(this.right=null,this.count-=1,u):(U===u&&(this.count-=1),U)}else{if(this.count===1)return this.leftPoints[0]===E?c:l;if(this.leftPoints.length===1&&this.leftPoints[0]===E){if(this.left&&this.right){for(var Z=this,j=this.left;j.right;)Z=j,j=j.right;if(Z===this)j.right=this.right;else{var N=this.left,U=this.right;Z.count-=j.count,Z.right=j.left,j.left=N,j.right=U}d(this,j),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?d(this,this.left):d(this,this.right);return u}for(var N=s.ge(this.leftPoints,E,L);N=0&&E[U][1]>=z;--U){var G=q(E[U]);if(G)return G}}function M(E,z){for(var q=0;qthis.mid){if(this.right){var q=this.right.queryPoint(E,z);if(q)return q}return k(this.rightPoints,E,z)}else return M(this.leftPoints,z)},h.queryInterval=function(E,z,q){if(Ethis.mid&&this.right){var U=this.right.queryInterval(E,z,q);if(U)return U}return zthis.mid?k(this.rightPoints,E,q):M(this.leftPoints,q)};function T(E,z){return E-z}function L(E,z){var q=E[0]-z[0];return q||E[1]-z[1]}function x(E,z){var q=E[1]-z[1];return q||E[0]-z[0]}function C(E){if(E.length===0)return null;for(var z=[],q=0;q>1],G=[],Z=[],j=[],q=0;q13)&&s!==32&&s!==133&&s!==160&&s!==5760&&s!==6158&&(s<8192||s>8205)&&s!==8232&&s!==8233&&s!==8239&&s!==8287&&s!==8288&&s!==12288&&s!==65279)return!1;return!0}},395:function(i){function a(o,s,l){return o*(1-l)+s*l}i.exports=a},2652:function(i,a,o){var s=o(4335),l=o(6864),u=o(1903),c=o(9921),f=o(7608),h=o(5665),d={length:o(1387),normalize:o(3536),dot:o(244),cross:o(5911)},v=l(),m=l(),b=[0,0,0,0],p=[[0,0,0],[0,0,0],[0,0,0]],k=[0,0,0];i.exports=function(C,S,g,P,E,z){if(S||(S=[0,0,0]),g||(g=[0,0,0]),P||(P=[0,0,0]),E||(E=[0,0,0,1]),z||(z=[0,0,0,1]),!s(v,C)||(u(m,v),m[3]=0,m[7]=0,m[11]=0,m[15]=1,Math.abs(c(m)<1e-8)))return!1;var q=v[3],U=v[7],G=v[11],Z=v[12],j=v[13],N=v[14],H=v[15];if(q!==0||U!==0||G!==0){b[0]=q,b[1]=U,b[2]=G,b[3]=H;var re=f(m,m);if(!re)return!1;h(m,m),M(E,b,m)}else E[0]=E[1]=E[2]=0,E[3]=1;if(S[0]=Z,S[1]=j,S[2]=N,T(p,v),g[0]=d.length(p[0]),d.normalize(p[0],p[0]),P[0]=d.dot(p[0],p[1]),L(p[1],p[1],p[0],1,-P[0]),g[1]=d.length(p[1]),d.normalize(p[1],p[1]),P[0]/=g[1],P[1]=d.dot(p[0],p[2]),L(p[2],p[2],p[0],1,-P[1]),P[2]=d.dot(p[1],p[2]),L(p[2],p[2],p[1],1,-P[2]),g[2]=d.length(p[2]),d.normalize(p[2],p[2]),P[1]/=g[2],P[2]/=g[2],d.cross(k,p[1],p[2]),d.dot(p[0],k)<0)for(var oe=0;oe<3;oe++)g[oe]*=-1,p[oe][0]*=-1,p[oe][1]*=-1,p[oe][2]*=-1;return z[0]=.5*Math.sqrt(Math.max(1+p[0][0]-p[1][1]-p[2][2],0)),z[1]=.5*Math.sqrt(Math.max(1-p[0][0]+p[1][1]-p[2][2],0)),z[2]=.5*Math.sqrt(Math.max(1-p[0][0]-p[1][1]+p[2][2],0)),z[3]=.5*Math.sqrt(Math.max(1+p[0][0]+p[1][1]+p[2][2],0)),p[2][1]>p[1][2]&&(z[0]=-z[0]),p[0][2]>p[2][0]&&(z[1]=-z[1]),p[1][0]>p[0][1]&&(z[2]=-z[2]),!0};function M(x,C,S){var g=C[0],P=C[1],E=C[2],z=C[3];return x[0]=S[0]*g+S[4]*P+S[8]*E+S[12]*z,x[1]=S[1]*g+S[5]*P+S[9]*E+S[13]*z,x[2]=S[2]*g+S[6]*P+S[10]*E+S[14]*z,x[3]=S[3]*g+S[7]*P+S[11]*E+S[15]*z,x}function T(x,C){x[0][0]=C[0],x[0][1]=C[1],x[0][2]=C[2],x[1][0]=C[4],x[1][1]=C[5],x[1][2]=C[6],x[2][0]=C[8],x[2][1]=C[9],x[2][2]=C[10]}function L(x,C,S,g,P){x[0]=C[0]*g+S[0]*P,x[1]=C[1]*g+S[1]*P,x[2]=C[2]*g+S[2]*P}},4335:function(i){i.exports=function(o,s){var l=s[15];if(l===0)return!1;for(var u=1/l,c=0;c<16;c++)o[c]=s[c]*u;return!0}},7442:function(i,a,o){var s=o(6658),l=o(7182),u=o(2652),c=o(9921),f=o(8648),h=b(),d=b(),v=b();i.exports=m;function m(M,T,L,x){if(c(T)===0||c(L)===0)return!1;var C=u(T,h.translate,h.scale,h.skew,h.perspective,h.quaternion),S=u(L,d.translate,d.scale,d.skew,d.perspective,d.quaternion);return!C||!S?!1:(s(v.translate,h.translate,d.translate,x),s(v.skew,h.skew,d.skew,x),s(v.scale,h.scale,d.scale,x),s(v.perspective,h.perspective,d.perspective,x),f(v.quaternion,h.quaternion,d.quaternion,x),l(M,v.translate,v.scale,v.skew,v.perspective,v.quaternion),!0)}function b(){return{translate:p(),scale:p(1),skew:p(),perspective:k(),quaternion:k()}}function p(M){return[M||0,M||0,M||0]}function k(){return[0,0,0,1]}},7182:function(i,a,o){var s={identity:o(7894),translate:o(7656),multiply:o(6760),create:o(6864),scale:o(2504),fromRotationTranslation:o(6743)},l=s.create(),u=s.create();i.exports=function(f,h,d,v,m,b){return s.identity(f),s.fromRotationTranslation(f,b,h),f[3]=m[0],f[7]=m[1],f[11]=m[2],f[15]=m[3],s.identity(u),v[2]!==0&&(u[9]=v[2],s.multiply(f,f,u)),v[1]!==0&&(u[9]=0,u[8]=v[1],s.multiply(f,f,u)),v[0]!==0&&(u[8]=0,u[4]=v[0],s.multiply(f,f,u)),s.scale(f,f,d),f}},1811:function(i,a,o){"use strict";var s=o(2478),l=o(7442),u=o(7608),c=o(5567),f=o(2408),h=o(7089),d=o(6582),v=o(7656),m=o(2504),b=o(3536),p=[0,0,0];i.exports=L;function k(x){this._components=x.slice(),this._time=[0],this.prevMatrix=x.slice(),this.nextMatrix=x.slice(),this.computedMatrix=x.slice(),this.computedInverse=x.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}var M=k.prototype;M.recalcMatrix=function(x){var C=this._time,S=s.le(C,x),g=this.computedMatrix;if(!(S<0)){var P=this._components;if(S===C.length-1)for(var E=16*S,z=0;z<16;++z)g[z]=P[E++];else{for(var q=C[S+1]-C[S],E=16*S,U=this.prevMatrix,G=!0,z=0;z<16;++z)U[z]=P[E++];for(var Z=this.nextMatrix,z=0;z<16;++z)Z[z]=P[E++],G=G&&U[z]===Z[z];if(q<1e-6||G)for(var z=0;z<16;++z)g[z]=U[z];else l(g,U,Z,(x-C[S])/q)}var j=this.computedUp;j[0]=g[1],j[1]=g[5],j[2]=g[9],b(j,j);var N=this.computedInverse;u(N,g);var H=this.computedEye,re=N[15];H[0]=N[12]/re,H[1]=N[13]/re,H[2]=N[14]/re;for(var oe=this.computedCenter,_e=Math.exp(this.computedRadius[0]),z=0;z<3;++z)oe[z]=H[z]-g[2+4*z]*_e}},M.idle=function(x){if(!(x1&&s(u[d[p-2]],u[d[p-1]],b)<=0;)p-=1,d.pop();for(d.push(m),p=v.length;p>1&&s(u[v[p-2]],u[v[p-1]],b)>=0;)p-=1,v.pop();v.push(m)}for(var k=new Array(v.length+d.length-2),M=0,f=0,T=d.length;f0;--L)k[M++]=v[L];return k}},351:function(i,a,o){"use strict";i.exports=l;var s=o(4687);function l(u,c){c||(c=u,u=window);var f=0,h=0,d=0,v={shift:!1,alt:!1,control:!1,meta:!1},m=!1;function b(E){var z=!1;return"altKey"in E&&(z=z||E.altKey!==v.alt,v.alt=!!E.altKey),"shiftKey"in E&&(z=z||E.shiftKey!==v.shift,v.shift=!!E.shiftKey),"ctrlKey"in E&&(z=z||E.ctrlKey!==v.control,v.control=!!E.ctrlKey),"metaKey"in E&&(z=z||E.metaKey!==v.meta,v.meta=!!E.metaKey),z}function p(E,z){var q=s.x(z),U=s.y(z);"buttons"in z&&(E=z.buttons|0),(E!==f||q!==h||U!==d||b(z))&&(f=E|0,h=q||0,d=U||0,c&&c(f,h,d,v))}function k(E){p(0,E)}function M(){(f||h||d||v.shift||v.alt||v.meta||v.control)&&(h=d=0,f=0,v.shift=v.alt=v.control=v.meta=!1,c&&c(0,0,0,v))}function T(E){b(E)&&c&&c(f,h,d,v)}function L(E){s.buttons(E)===0?p(0,E):p(f,E)}function x(E){p(f|s.buttons(E),E)}function C(E){p(f&~s.buttons(E),E)}function S(){m||(m=!0,u.addEventListener("mousemove",L),u.addEventListener("mousedown",x),u.addEventListener("mouseup",C),u.addEventListener("mouseleave",k),u.addEventListener("mouseenter",k),u.addEventListener("mouseout",k),u.addEventListener("mouseover",k),u.addEventListener("blur",M),u.addEventListener("keyup",T),u.addEventListener("keydown",T),u.addEventListener("keypress",T),u!==window&&(window.addEventListener("blur",M),window.addEventListener("keyup",T),window.addEventListener("keydown",T),window.addEventListener("keypress",T)))}function g(){m&&(m=!1,u.removeEventListener("mousemove",L),u.removeEventListener("mousedown",x),u.removeEventListener("mouseup",C),u.removeEventListener("mouseleave",k),u.removeEventListener("mouseenter",k),u.removeEventListener("mouseout",k),u.removeEventListener("mouseover",k),u.removeEventListener("blur",M),u.removeEventListener("keyup",T),u.removeEventListener("keydown",T),u.removeEventListener("keypress",T),u!==window&&(window.removeEventListener("blur",M),window.removeEventListener("keyup",T),window.removeEventListener("keydown",T),window.removeEventListener("keypress",T)))}S();var P={element:u};return Object.defineProperties(P,{enabled:{get:function(){return m},set:function(E){E?S():g()},enumerable:!0},buttons:{get:function(){return f},enumerable:!0},x:{get:function(){return h},enumerable:!0},y:{get:function(){return d},enumerable:!0},mods:{get:function(){return v},enumerable:!0}}),P}},24:function(i){var a={left:0,top:0};i.exports=o;function o(l,u,c){u=u||l.currentTarget||l.srcElement,Array.isArray(c)||(c=[0,0]);var f=l.clientX||0,h=l.clientY||0,d=s(u);return c[0]=f-d.left,c[1]=h-d.top,c}function s(l){return l===window||l===document||l===document.body?a:l.getBoundingClientRect()}},4687:function(i,a){"use strict";function o(c){if(typeof c=="object"){if("buttons"in c)return c.buttons;if("which"in c){var f=c.which;if(f===2)return 4;if(f===3)return 2;if(f>0)return 1<=0)return 1<0){if(ke=1,ie[Ee++]=v(S[z],M,T,L),z+=re,x>0)for(_e=1,q=S[z],we=ie[Ee]=v(q,M,T,L),me=ie[Ee+De],He=ie[Ee+Pe],Vt=ie[Ee+lt],(we!==me||we!==He||we!==Vt)&&(G=S[z+U],j=S[z+Z],H=S[z+N],h(_e,ke,q,G,j,H,we,me,He,Vt,M,T,L),st=Se[Ee]=Ce++),Ee+=1,z+=re,_e=2;_e0)for(_e=1,q=S[z],we=ie[Ee]=v(q,M,T,L),me=ie[Ee+De],He=ie[Ee+Pe],Vt=ie[Ee+lt],(we!==me||we!==He||we!==Vt)&&(G=S[z+U],j=S[z+Z],H=S[z+N],h(_e,ke,q,G,j,H,we,me,He,Vt,M,T,L),st=Se[Ee]=Ce++,Vt!==He&&d(Se[Ee+Pe],st,j,H,He,Vt,M,T,L)),Ee+=1,z+=re,_e=2;_e0){if(_e=1,ie[Ee++]=v(S[z],M,T,L),z+=re,C>0)for(ke=1,q=S[z],we=ie[Ee]=v(q,M,T,L),He=ie[Ee+Pe],me=ie[Ee+De],Vt=ie[Ee+lt],(we!==He||we!==me||we!==Vt)&&(G=S[z+U],j=S[z+Z],H=S[z+N],h(_e,ke,q,G,j,H,we,He,me,Vt,M,T,L),st=Se[Ee]=Ce++),Ee+=1,z+=re,ke=2;ke0)for(ke=1,q=S[z],we=ie[Ee]=v(q,M,T,L),He=ie[Ee+Pe],me=ie[Ee+De],Vt=ie[Ee+lt],(we!==He||we!==me||we!==Vt)&&(G=S[z+U],j=S[z+Z],H=S[z+N],h(_e,ke,q,G,j,H,we,He,me,Vt,M,T,L),st=Se[Ee]=Ce++,Vt!==He&&d(Se[Ee+Pe],st,H,G,Vt,He,M,T,L)),Ee+=1,z+=re,ke=2;ke 0"),typeof f.vertex!="function"&&h("Must specify vertex creation function"),typeof f.cell!="function"&&h("Must specify cell creation function"),typeof f.phase!="function"&&h("Must specify phase function");for(var b=f.getters||[],p=new Array(v),k=0;k=0?p[k]=!0:p[k]=!1;return u(f.vertex,f.cell,f.phase,m,d,p)}},6199:function(i,a,o){"use strict";var s=o(1338),l={zero:function(L,x,C,S){var g=L[0],P=C[0];S|=0;var E=0,z=P;for(E=0;E2&&E[1]>2&&S(P.pick(-1,-1).lo(1,1).hi(E[0]-2,E[1]-2),g.pick(-1,-1,0).lo(1,1).hi(E[0]-2,E[1]-2),g.pick(-1,-1,1).lo(1,1).hi(E[0]-2,E[1]-2)),E[1]>2&&(C(P.pick(0,-1).lo(1).hi(E[1]-2),g.pick(0,-1,1).lo(1).hi(E[1]-2)),x(g.pick(0,-1,0).lo(1).hi(E[1]-2))),E[1]>2&&(C(P.pick(E[0]-1,-1).lo(1).hi(E[1]-2),g.pick(E[0]-1,-1,1).lo(1).hi(E[1]-2)),x(g.pick(E[0]-1,-1,0).lo(1).hi(E[1]-2))),E[0]>2&&(C(P.pick(-1,0).lo(1).hi(E[0]-2),g.pick(-1,0,0).lo(1).hi(E[0]-2)),x(g.pick(-1,0,1).lo(1).hi(E[0]-2))),E[0]>2&&(C(P.pick(-1,E[1]-1).lo(1).hi(E[0]-2),g.pick(-1,E[1]-1,0).lo(1).hi(E[0]-2)),x(g.pick(-1,E[1]-1,1).lo(1).hi(E[0]-2))),g.set(0,0,0,0),g.set(0,0,1,0),g.set(E[0]-1,0,0,0),g.set(E[0]-1,0,1,0),g.set(0,E[1]-1,0,0),g.set(0,E[1]-1,1,0),g.set(E[0]-1,E[1]-1,0,0),g.set(E[0]-1,E[1]-1,1,0),g}}function T(L){var x=L.join(),E=v[x];if(E)return E;for(var C=L.length,S=[b,p],g=1;g<=C;++g)S.push(k(g));var P=M,E=P.apply(void 0,S);return v[x]=E,E}i.exports=function(x,C,S){if(Array.isArray(S)||(typeof S=="string"?S=s(C.dimension,S):S=s(C.dimension,"clamp")),C.size===0)return x;if(C.dimension===0)return x.set(0),x;var g=T(S);return g(x,C)}},4317:function(i){"use strict";function a(c,f){var h=Math.floor(f),d=f-h,v=0<=h&&h0;){j<64?(x=j,j=0):(x=64,j-=64);for(var N=v[1]|0;N>0;){N<64?(C=N,N=0):(C=64,N-=64),p=G+j*g+N*P,T=Z+j*z+N*q;var H=0,re=0,oe=0,_e=E,ke=g-S*E,Ce=P-x*g,ge=U,ie=z-S*U,Se=q-x*z;for(oe=0;oe0;){q<64?(x=q,q=0):(x=64,q-=64);for(var U=v[0]|0;U>0;){U<64?(L=U,U=0):(L=64,U-=64),p=E+q*S+U*C,T=z+q*P+U*g;var G=0,Z=0,j=S,N=C-x*S,H=P,re=g-x*P;for(Z=0;Z0;){Z<64?(C=Z,Z=0):(C=64,Z-=64);for(var j=v[0]|0;j>0;){j<64?(L=j,j=0):(L=64,j-=64);for(var N=v[1]|0;N>0;){N<64?(x=N,N=0):(x=64,N-=64),p=U+Z*P+j*S+N*g,T=G+Z*q+j*E+N*z;var H=0,re=0,oe=0,_e=P,ke=S-C*P,Ce=g-L*S,ge=q,ie=E-C*q,Se=z-L*E;for(oe=0;oek;){H=0,re=G-x;t:for(j=0;j_e)break t;re+=E,H+=z}for(H=G,re=G-x,j=0;j>1,N=j-U,H=j+U,re=G,oe=N,_e=j,ke=H,Ce=Z,ge=M+1,ie=T-1,Se=!0,Ee,we,De,Le,me,Pe,ce,He,lt,mt=0,Vt=0,st=0,ct,Qt,Ht,nr,tt,je,Ue,Ae,rt,St,Tt,dt,Et,pt,Xt,or,_r=P,Er=b(_r),ei=b(_r);Qt=C*re,Ht=C*oe,or=x;e:for(ct=0;ct0){we=re,re=oe,oe=we;break e}if(st<0)break e;or+=z}Qt=C*ke,Ht=C*Ce,or=x;e:for(ct=0;ct0){we=ke,ke=Ce,Ce=we;break e}if(st<0)break e;or+=z}Qt=C*re,Ht=C*_e,or=x;e:for(ct=0;ct0){we=re,re=_e,_e=we;break e}if(st<0)break e;or+=z}Qt=C*oe,Ht=C*_e,or=x;e:for(ct=0;ct0){we=oe,oe=_e,_e=we;break e}if(st<0)break e;or+=z}Qt=C*re,Ht=C*ke,or=x;e:for(ct=0;ct0){we=re,re=ke,ke=we;break e}if(st<0)break e;or+=z}Qt=C*_e,Ht=C*ke,or=x;e:for(ct=0;ct0){we=_e,_e=ke,ke=we;break e}if(st<0)break e;or+=z}Qt=C*oe,Ht=C*Ce,or=x;e:for(ct=0;ct0){we=oe,oe=Ce,Ce=we;break e}if(st<0)break e;or+=z}Qt=C*oe,Ht=C*_e,or=x;e:for(ct=0;ct0){we=oe,oe=_e,_e=we;break e}if(st<0)break e;or+=z}Qt=C*ke,Ht=C*Ce,or=x;e:for(ct=0;ct0){we=ke,ke=Ce,Ce=we;break e}if(st<0)break e;or+=z}for(Qt=C*re,Ht=C*oe,nr=C*_e,tt=C*ke,je=C*Ce,Ue=C*G,Ae=C*j,rt=C*Z,Xt=0,or=x,ct=0;ct0)ie--;else if(st<0){for(Qt=C*Pe,Ht=C*ge,nr=C*ie,or=x,ct=0;ct0)for(;;){ce=x+ie*C,Xt=0;e:for(ct=0;ct0){if(--ieZ){e:for(;;){for(ce=x+ge*C,Xt=0,or=x,ct=0;ct1&&k?T(p,k[0],k[1]):T(p)}var d={"uint32,1,0":function(m,b){return function(p){var k=p.data,M=p.offset|0,T=p.shape,L=p.stride,x=L[0]|0,C=T[0]|0,S=L[1]|0,g=T[1]|0,P=S,E=S,z=1;C<=32?m(0,C-1,k,M,x,S,C,g,P,E,z):b(0,C-1,k,M,x,S,C,g,P,E,z)}}};function v(m,b){var p=[b,m].join(","),k=d[p],M=c(m,b),T=h(m,b,M);return k(M,T)}i.exports=v},446:function(i,a,o){"use strict";var s=o(7640),l={};function u(c){var f=c.order,h=c.dtype,d=[f,h],v=d.join(":"),m=l[v];return m||(l[v]=m=s(f,h)),m(c),c}i.exports=u},9618:function(i,a,o){var s=o(7163),l=typeof Float64Array!="undefined";function u(b,p){return b[0]-p[0]}function c(){var b=this.stride,p=new Array(b.length),k;for(k=0;k=0&&(S=x|0,C+=P*S,g-=S),new M(this.data,g,P,C)},T.step=function(x){var C=this.shape[0],S=this.stride[0],g=this.offset,P=0,E=Math.ceil;return typeof x=="number"&&(P=x|0,P<0?(g+=S*(C-1),C=E(-C/P)):C=E(C/P),S*=P),new M(this.data,C,S,g)},T.transpose=function(x){x=x===void 0?0:x|0;var C=this.shape,S=this.stride;return new M(this.data,C[x],S[x],this.offset)},T.pick=function(x){var C=[],S=[],g=this.offset;typeof x=="number"&&x>=0?g=g+this.stride[0]*x|0:(C.push(this.shape[0]),S.push(this.stride[0]));var P=p[C.length+1];return P(this.data,C,S,g)},function(x,C,S,g){return new M(x,C[0],S[0],g)}},2:function(b,p,k){function M(L,x,C,S,g,P){this.data=L,this.shape=[x,C],this.stride=[S,g],this.offset=P|0}var T=M.prototype;return T.dtype=b,T.dimension=2,Object.defineProperty(T,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(T,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),T.set=function(x,C,S){return b==="generic"?this.data.set(this.offset+this.stride[0]*x+this.stride[1]*C,S):this.data[this.offset+this.stride[0]*x+this.stride[1]*C]=S},T.get=function(x,C){return b==="generic"?this.data.get(this.offset+this.stride[0]*x+this.stride[1]*C):this.data[this.offset+this.stride[0]*x+this.stride[1]*C]},T.index=function(x,C){return this.offset+this.stride[0]*x+this.stride[1]*C},T.hi=function(x,C){return new M(this.data,typeof x!="number"||x<0?this.shape[0]:x|0,typeof C!="number"||C<0?this.shape[1]:C|0,this.stride[0],this.stride[1],this.offset)},T.lo=function(x,C){var S=this.offset,g=0,P=this.shape[0],E=this.shape[1],z=this.stride[0],q=this.stride[1];return typeof x=="number"&&x>=0&&(g=x|0,S+=z*g,P-=g),typeof C=="number"&&C>=0&&(g=C|0,S+=q*g,E-=g),new M(this.data,P,E,z,q,S)},T.step=function(x,C){var S=this.shape[0],g=this.shape[1],P=this.stride[0],E=this.stride[1],z=this.offset,q=0,U=Math.ceil;return typeof x=="number"&&(q=x|0,q<0?(z+=P*(S-1),S=U(-S/q)):S=U(S/q),P*=q),typeof C=="number"&&(q=C|0,q<0?(z+=E*(g-1),g=U(-g/q)):g=U(g/q),E*=q),new M(this.data,S,g,P,E,z)},T.transpose=function(x,C){x=x===void 0?0:x|0,C=C===void 0?1:C|0;var S=this.shape,g=this.stride;return new M(this.data,S[x],S[C],g[x],g[C],this.offset)},T.pick=function(x,C){var S=[],g=[],P=this.offset;typeof x=="number"&&x>=0?P=P+this.stride[0]*x|0:(S.push(this.shape[0]),g.push(this.stride[0])),typeof C=="number"&&C>=0?P=P+this.stride[1]*C|0:(S.push(this.shape[1]),g.push(this.stride[1]));var E=p[S.length+1];return E(this.data,S,g,P)},function(x,C,S,g){return new M(x,C[0],C[1],S[0],S[1],g)}},3:function(b,p,k){function M(L,x,C,S,g,P,E,z){this.data=L,this.shape=[x,C,S],this.stride=[g,P,E],this.offset=z|0}var T=M.prototype;return T.dtype=b,T.dimension=3,Object.defineProperty(T,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(T,"order",{get:function(){var x=Math.abs(this.stride[0]),C=Math.abs(this.stride[1]),S=Math.abs(this.stride[2]);return x>C?C>S?[2,1,0]:x>S?[1,2,0]:[1,0,2]:x>S?[2,0,1]:S>C?[0,1,2]:[0,2,1]}}),T.set=function(x,C,S,g){return b==="generic"?this.data.set(this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*S,g):this.data[this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*S]=g},T.get=function(x,C,S){return b==="generic"?this.data.get(this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*S):this.data[this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*S]},T.index=function(x,C,S){return this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*S},T.hi=function(x,C,S){return new M(this.data,typeof x!="number"||x<0?this.shape[0]:x|0,typeof C!="number"||C<0?this.shape[1]:C|0,typeof S!="number"||S<0?this.shape[2]:S|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},T.lo=function(x,C,S){var g=this.offset,P=0,E=this.shape[0],z=this.shape[1],q=this.shape[2],U=this.stride[0],G=this.stride[1],Z=this.stride[2];return typeof x=="number"&&x>=0&&(P=x|0,g+=U*P,E-=P),typeof C=="number"&&C>=0&&(P=C|0,g+=G*P,z-=P),typeof S=="number"&&S>=0&&(P=S|0,g+=Z*P,q-=P),new M(this.data,E,z,q,U,G,Z,g)},T.step=function(x,C,S){var g=this.shape[0],P=this.shape[1],E=this.shape[2],z=this.stride[0],q=this.stride[1],U=this.stride[2],G=this.offset,Z=0,j=Math.ceil;return typeof x=="number"&&(Z=x|0,Z<0?(G+=z*(g-1),g=j(-g/Z)):g=j(g/Z),z*=Z),typeof C=="number"&&(Z=C|0,Z<0?(G+=q*(P-1),P=j(-P/Z)):P=j(P/Z),q*=Z),typeof S=="number"&&(Z=S|0,Z<0?(G+=U*(E-1),E=j(-E/Z)):E=j(E/Z),U*=Z),new M(this.data,g,P,E,z,q,U,G)},T.transpose=function(x,C,S){x=x===void 0?0:x|0,C=C===void 0?1:C|0,S=S===void 0?2:S|0;var g=this.shape,P=this.stride;return new M(this.data,g[x],g[C],g[S],P[x],P[C],P[S],this.offset)},T.pick=function(x,C,S){var g=[],P=[],E=this.offset;typeof x=="number"&&x>=0?E=E+this.stride[0]*x|0:(g.push(this.shape[0]),P.push(this.stride[0])),typeof C=="number"&&C>=0?E=E+this.stride[1]*C|0:(g.push(this.shape[1]),P.push(this.stride[1])),typeof S=="number"&&S>=0?E=E+this.stride[2]*S|0:(g.push(this.shape[2]),P.push(this.stride[2]));var z=p[g.length+1];return z(this.data,g,P,E)},function(x,C,S,g){return new M(x,C[0],C[1],C[2],S[0],S[1],S[2],g)}},4:function(b,p,k){function M(L,x,C,S,g,P,E,z,q,U){this.data=L,this.shape=[x,C,S,g],this.stride=[P,E,z,q],this.offset=U|0}var T=M.prototype;return T.dtype=b,T.dimension=4,Object.defineProperty(T,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(T,"order",{get:k}),T.set=function(x,C,S,g,P){return b==="generic"?this.data.set(this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*S+this.stride[3]*g,P):this.data[this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*S+this.stride[3]*g]=P},T.get=function(x,C,S,g){return b==="generic"?this.data.get(this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*S+this.stride[3]*g):this.data[this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*S+this.stride[3]*g]},T.index=function(x,C,S,g){return this.offset+this.stride[0]*x+this.stride[1]*C+this.stride[2]*S+this.stride[3]*g},T.hi=function(x,C,S,g){return new M(this.data,typeof x!="number"||x<0?this.shape[0]:x|0,typeof C!="number"||C<0?this.shape[1]:C|0,typeof S!="number"||S<0?this.shape[2]:S|0,typeof g!="number"||g<0?this.shape[3]:g|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},T.lo=function(x,C,S,g){var P=this.offset,E=0,z=this.shape[0],q=this.shape[1],U=this.shape[2],G=this.shape[3],Z=this.stride[0],j=this.stride[1],N=this.stride[2],H=this.stride[3];return typeof x=="number"&&x>=0&&(E=x|0,P+=Z*E,z-=E),typeof C=="number"&&C>=0&&(E=C|0,P+=j*E,q-=E),typeof S=="number"&&S>=0&&(E=S|0,P+=N*E,U-=E),typeof g=="number"&&g>=0&&(E=g|0,P+=H*E,G-=E),new M(this.data,z,q,U,G,Z,j,N,H,P)},T.step=function(x,C,S,g){var P=this.shape[0],E=this.shape[1],z=this.shape[2],q=this.shape[3],U=this.stride[0],G=this.stride[1],Z=this.stride[2],j=this.stride[3],N=this.offset,H=0,re=Math.ceil;return typeof x=="number"&&(H=x|0,H<0?(N+=U*(P-1),P=re(-P/H)):P=re(P/H),U*=H),typeof C=="number"&&(H=C|0,H<0?(N+=G*(E-1),E=re(-E/H)):E=re(E/H),G*=H),typeof S=="number"&&(H=S|0,H<0?(N+=Z*(z-1),z=re(-z/H)):z=re(z/H),Z*=H),typeof g=="number"&&(H=g|0,H<0?(N+=j*(q-1),q=re(-q/H)):q=re(q/H),j*=H),new M(this.data,P,E,z,q,U,G,Z,j,N)},T.transpose=function(x,C,S,g){x=x===void 0?0:x|0,C=C===void 0?1:C|0,S=S===void 0?2:S|0,g=g===void 0?3:g|0;var P=this.shape,E=this.stride;return new M(this.data,P[x],P[C],P[S],P[g],E[x],E[C],E[S],E[g],this.offset)},T.pick=function(x,C,S,g){var P=[],E=[],z=this.offset;typeof x=="number"&&x>=0?z=z+this.stride[0]*x|0:(P.push(this.shape[0]),E.push(this.stride[0])),typeof C=="number"&&C>=0?z=z+this.stride[1]*C|0:(P.push(this.shape[1]),E.push(this.stride[1])),typeof S=="number"&&S>=0?z=z+this.stride[2]*S|0:(P.push(this.shape[2]),E.push(this.stride[2])),typeof g=="number"&&g>=0?z=z+this.stride[3]*g|0:(P.push(this.shape[3]),E.push(this.stride[3]));var q=p[P.length+1];return q(this.data,P,E,z)},function(x,C,S,g){return new M(x,C[0],C[1],C[2],C[3],S[0],S[1],S[2],S[3],g)}},5:function(p,k,M){function T(x,C,S,g,P,E,z,q,U,G,Z,j){this.data=x,this.shape=[C,S,g,P,E],this.stride=[z,q,U,G,Z],this.offset=j|0}var L=T.prototype;return L.dtype=p,L.dimension=5,Object.defineProperty(L,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(L,"order",{get:M}),L.set=function(C,S,g,P,E,z){return p==="generic"?this.data.set(this.offset+this.stride[0]*C+this.stride[1]*S+this.stride[2]*g+this.stride[3]*P+this.stride[4]*E,z):this.data[this.offset+this.stride[0]*C+this.stride[1]*S+this.stride[2]*g+this.stride[3]*P+this.stride[4]*E]=z},L.get=function(C,S,g,P,E){return p==="generic"?this.data.get(this.offset+this.stride[0]*C+this.stride[1]*S+this.stride[2]*g+this.stride[3]*P+this.stride[4]*E):this.data[this.offset+this.stride[0]*C+this.stride[1]*S+this.stride[2]*g+this.stride[3]*P+this.stride[4]*E]},L.index=function(C,S,g,P,E){return this.offset+this.stride[0]*C+this.stride[1]*S+this.stride[2]*g+this.stride[3]*P+this.stride[4]*E},L.hi=function(C,S,g,P,E){return new T(this.data,typeof C!="number"||C<0?this.shape[0]:C|0,typeof S!="number"||S<0?this.shape[1]:S|0,typeof g!="number"||g<0?this.shape[2]:g|0,typeof P!="number"||P<0?this.shape[3]:P|0,typeof E!="number"||E<0?this.shape[4]:E|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},L.lo=function(C,S,g,P,E){var z=this.offset,q=0,U=this.shape[0],G=this.shape[1],Z=this.shape[2],j=this.shape[3],N=this.shape[4],H=this.stride[0],re=this.stride[1],oe=this.stride[2],_e=this.stride[3],ke=this.stride[4];return typeof C=="number"&&C>=0&&(q=C|0,z+=H*q,U-=q),typeof S=="number"&&S>=0&&(q=S|0,z+=re*q,G-=q),typeof g=="number"&&g>=0&&(q=g|0,z+=oe*q,Z-=q),typeof P=="number"&&P>=0&&(q=P|0,z+=_e*q,j-=q),typeof E=="number"&&E>=0&&(q=E|0,z+=ke*q,N-=q),new T(this.data,U,G,Z,j,N,H,re,oe,_e,ke,z)},L.step=function(C,S,g,P,E){var z=this.shape[0],q=this.shape[1],U=this.shape[2],G=this.shape[3],Z=this.shape[4],j=this.stride[0],N=this.stride[1],H=this.stride[2],re=this.stride[3],oe=this.stride[4],_e=this.offset,ke=0,Ce=Math.ceil;return typeof C=="number"&&(ke=C|0,ke<0?(_e+=j*(z-1),z=Ce(-z/ke)):z=Ce(z/ke),j*=ke),typeof S=="number"&&(ke=S|0,ke<0?(_e+=N*(q-1),q=Ce(-q/ke)):q=Ce(q/ke),N*=ke),typeof g=="number"&&(ke=g|0,ke<0?(_e+=H*(U-1),U=Ce(-U/ke)):U=Ce(U/ke),H*=ke),typeof P=="number"&&(ke=P|0,ke<0?(_e+=re*(G-1),G=Ce(-G/ke)):G=Ce(G/ke),re*=ke),typeof E=="number"&&(ke=E|0,ke<0?(_e+=oe*(Z-1),Z=Ce(-Z/ke)):Z=Ce(Z/ke),oe*=ke),new T(this.data,z,q,U,G,Z,j,N,H,re,oe,_e)},L.transpose=function(C,S,g,P,E){C=C===void 0?0:C|0,S=S===void 0?1:S|0,g=g===void 0?2:g|0,P=P===void 0?3:P|0,E=E===void 0?4:E|0;var z=this.shape,q=this.stride;return new T(this.data,z[C],z[S],z[g],z[P],z[E],q[C],q[S],q[g],q[P],q[E],this.offset)},L.pick=function(C,S,g,P,E){var z=[],q=[],U=this.offset;typeof C=="number"&&C>=0?U=U+this.stride[0]*C|0:(z.push(this.shape[0]),q.push(this.stride[0])),typeof S=="number"&&S>=0?U=U+this.stride[1]*S|0:(z.push(this.shape[1]),q.push(this.stride[1])),typeof g=="number"&&g>=0?U=U+this.stride[2]*g|0:(z.push(this.shape[2]),q.push(this.stride[2])),typeof P=="number"&&P>=0?U=U+this.stride[3]*P|0:(z.push(this.shape[3]),q.push(this.stride[3])),typeof E=="number"&&E>=0?U=U+this.stride[4]*E|0:(z.push(this.shape[4]),q.push(this.stride[4]));var G=k[z.length+1];return G(this.data,z,q,U)},function(C,S,g,P){return new T(C,S[0],S[1],S[2],S[3],S[4],g[0],g[1],g[2],g[3],g[4],P)}}};function h(b,p){var k=p===-1?"T":String(p),M=f[k];return p===-1?M(b):p===0?M(b,v[b][0]):M(b,v[b],c)}function d(b){if(s(b))return"buffer";if(l)switch(Object.prototype.toString.call(b)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(b)?"array":"generic"}var v={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function m(b,p,k,M){if(b===void 0){var g=v.array[0];return g([])}else typeof b=="number"&&(b=[b]);p===void 0&&(p=[b.length]);var T=p.length;if(k===void 0){k=new Array(T);for(var L=T-1,x=1;L>=0;--L)k[L]=x,x*=p[L]}if(M===void 0){M=0;for(var L=0;L>>0;i.exports=c;function c(f,h){if(isNaN(f)||isNaN(h))return NaN;if(f===h)return f;if(f===0)return h<0?-l:l;var d=s.hi(f),v=s.lo(f);return h>f==f>0?v===u?(d+=1,v=0):v+=1:v===0?(v=u,d-=1):v-=1,s.pack(v,d)}},8406:function(i,a){var o=1e-6,s=1e-6;a.vertexNormals=function(l,u,c){for(var f=u.length,h=new Array(f),d=c===void 0?o:c,v=0;vd)for(var z=h[p],q=1/Math.sqrt(S*P),E=0;E<3;++E){var U=(E+1)%3,G=(E+2)%3;z[E]+=q*(g[U]*C[G]-g[G]*C[U])}}for(var v=0;vd)for(var q=1/Math.sqrt(Z),E=0;E<3;++E)z[E]*=q;else for(var E=0;E<3;++E)z[E]=0}return h},a.faceNormals=function(l,u,c){for(var f=l.length,h=new Array(f),d=c===void 0?s:c,v=0;vd?L=1/Math.sqrt(L):L=0;for(var p=0;p<3;++p)T[p]*=L;h[v]=T}return h}},4081:function(i){"use strict";i.exports=a;function a(o,s,l,u,c,f,h,d,v,m){var b=s+f+m;if(p>0){var p=Math.sqrt(b+1);o[0]=.5*(h-v)/p,o[1]=.5*(d-u)/p,o[2]=.5*(l-f)/p,o[3]=.5*p}else{var k=Math.max(s,f,m),p=Math.sqrt(2*k-b+1);s>=k?(o[0]=.5*p,o[1]=.5*(c+l)/p,o[2]=.5*(d+u)/p,o[3]=.5*(h-v)/p):f>=k?(o[0]=.5*(l+c)/p,o[1]=.5*p,o[2]=.5*(v+h)/p,o[3]=.5*(d-u)/p):(o[0]=.5*(u+d)/p,o[1]=.5*(h+v)/p,o[2]=.5*p,o[3]=.5*(l-c)/p)}return o}},9977:function(i,a,o){"use strict";i.exports=p;var s=o(9215),l=o(6582),u=o(7399),c=o(7608),f=o(4081);function h(k,M,T){return Math.sqrt(Math.pow(k,2)+Math.pow(M,2)+Math.pow(T,2))}function d(k,M,T,L){return Math.sqrt(Math.pow(k,2)+Math.pow(M,2)+Math.pow(T,2)+Math.pow(L,2))}function v(k,M){var T=M[0],L=M[1],x=M[2],C=M[3],S=d(T,L,x,C);S>1e-6?(k[0]=T/S,k[1]=L/S,k[2]=x/S,k[3]=C/S):(k[0]=k[1]=k[2]=0,k[3]=1)}function m(k,M,T){this.radius=s([T]),this.center=s(M),this.rotation=s(k),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var b=m.prototype;b.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},b.recalcMatrix=function(k){this.radius.curve(k),this.center.curve(k),this.rotation.curve(k);var M=this.computedRotation;v(M,M);var T=this.computedMatrix;u(T,M);var L=this.computedCenter,x=this.computedEye,C=this.computedUp,S=Math.exp(this.computedRadius[0]);x[0]=L[0]+S*T[2],x[1]=L[1]+S*T[6],x[2]=L[2]+S*T[10],C[0]=T[1],C[1]=T[5],C[2]=T[9];for(var g=0;g<3;++g){for(var P=0,E=0;E<3;++E)P+=T[g+4*E]*x[E];T[12+g]=-P}},b.getMatrix=function(k,M){this.recalcMatrix(k);var T=this.computedMatrix;if(M){for(var L=0;L<16;++L)M[L]=T[L];return M}return T},b.idle=function(k){this.center.idle(k),this.radius.idle(k),this.rotation.idle(k)},b.flush=function(k){this.center.flush(k),this.radius.flush(k),this.rotation.flush(k)},b.pan=function(k,M,T,L){M=M||0,T=T||0,L=L||0,this.recalcMatrix(k);var x=this.computedMatrix,C=x[1],S=x[5],g=x[9],P=h(C,S,g);C/=P,S/=P,g/=P;var E=x[0],z=x[4],q=x[8],U=E*C+z*S+q*g;E-=C*U,z-=S*U,q-=g*U;var G=h(E,z,q);E/=G,z/=G,q/=G;var Z=x[2],j=x[6],N=x[10],H=Z*C+j*S+N*g,re=Z*E+j*z+N*q;Z-=H*C+re*E,j-=H*S+re*z,N-=H*g+re*q;var oe=h(Z,j,N);Z/=oe,j/=oe,N/=oe;var _e=E*M+C*T,ke=z*M+S*T,Ce=q*M+g*T;this.center.move(k,_e,ke,Ce);var ge=Math.exp(this.computedRadius[0]);ge=Math.max(1e-4,ge+L),this.radius.set(k,Math.log(ge))},b.rotate=function(k,M,T,L){this.recalcMatrix(k),M=M||0,T=T||0;var x=this.computedMatrix,C=x[0],S=x[4],g=x[8],P=x[1],E=x[5],z=x[9],q=x[2],U=x[6],G=x[10],Z=M*C+T*P,j=M*S+T*E,N=M*g+T*z,H=-(U*N-G*j),re=-(G*Z-q*N),oe=-(q*j-U*Z),_e=Math.sqrt(Math.max(0,1-Math.pow(H,2)-Math.pow(re,2)-Math.pow(oe,2))),ke=d(H,re,oe,_e);ke>1e-6?(H/=ke,re/=ke,oe/=ke,_e/=ke):(H=re=oe=0,_e=1);var Ce=this.computedRotation,ge=Ce[0],ie=Ce[1],Se=Ce[2],Ee=Ce[3],we=ge*_e+Ee*H+ie*oe-Se*re,De=ie*_e+Ee*re+Se*H-ge*oe,Le=Se*_e+Ee*oe+ge*re-ie*H,me=Ee*_e-ge*H-ie*re-Se*oe;if(L){H=q,re=U,oe=G;var Pe=Math.sin(L)/h(H,re,oe);H*=Pe,re*=Pe,oe*=Pe,_e=Math.cos(M),we=we*_e+me*H+De*oe-Le*re,De=De*_e+me*re+Le*H-we*oe,Le=Le*_e+me*oe+we*re-De*H,me=me*_e-we*H-De*re-Le*oe}var ce=d(we,De,Le,me);ce>1e-6?(we/=ce,De/=ce,Le/=ce,me/=ce):(we=De=Le=0,me=1),this.rotation.set(k,we,De,Le,me)},b.lookAt=function(k,M,T,L){this.recalcMatrix(k),T=T||this.computedCenter,M=M||this.computedEye,L=L||this.computedUp;var x=this.computedMatrix;l(x,M,T,L);var C=this.computedRotation;f(C,x[0],x[1],x[2],x[4],x[5],x[6],x[8],x[9],x[10]),v(C,C),this.rotation.set(k,C[0],C[1],C[2],C[3]);for(var S=0,g=0;g<3;++g)S+=Math.pow(T[g]-M[g],2);this.radius.set(k,.5*Math.log(Math.max(S,1e-6))),this.center.set(k,T[0],T[1],T[2])},b.translate=function(k,M,T,L){this.center.move(k,M||0,T||0,L||0)},b.setMatrix=function(k,M){var T=this.computedRotation;f(T,M[0],M[1],M[2],M[4],M[5],M[6],M[8],M[9],M[10]),v(T,T),this.rotation.set(k,T[0],T[1],T[2],T[3]);var L=this.computedMatrix;c(L,M);var x=L[15];if(Math.abs(x)>1e-6){var C=L[12]/x,S=L[13]/x,g=L[14]/x;this.recalcMatrix(k);var P=Math.exp(this.computedRadius[0]);this.center.set(k,C-L[2]*P,S-L[6]*P,g-L[10]*P),this.radius.idle(k)}else this.center.idle(k),this.radius.idle(k)},b.setDistance=function(k,M){M>0&&this.radius.set(k,Math.log(M))},b.setDistanceLimits=function(k,M){k>0?k=Math.log(k):k=-1/0,M>0?M=Math.log(M):M=1/0,M=Math.max(M,k),this.radius.bounds[0][0]=k,this.radius.bounds[1][0]=M},b.getDistanceLimits=function(k){var M=this.radius.bounds;return k?(k[0]=Math.exp(M[0][0]),k[1]=Math.exp(M[1][0]),k):[Math.exp(M[0][0]),Math.exp(M[1][0])]},b.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},b.fromJSON=function(k){var M=this.lastT(),T=k.center;T&&this.center.set(M,T[0],T[1],T[2]);var L=k.rotation;L&&this.rotation.set(M,L[0],L[1],L[2],L[3]);var x=k.distance;x&&x>0&&this.radius.set(M,Math.log(x)),this.setDistanceLimits(k.zoomMin,k.zoomMax)};function p(k){k=k||{};var M=k.center||[0,0,0],T=k.rotation||[0,0,0,1],L=k.radius||1;M=[].slice.call(M,0,3),T=[].slice.call(T,0,4),v(T,T);var x=new m(T,M,Math.log(L));return x.setDistanceLimits(k.zoomMin,k.zoomMax),("eye"in k||"up"in k)&&x.lookAt(0,k.eye,k.center,k.up),x}},1371:function(i,a,o){"use strict";var s=o(3233);i.exports=function(u,c,f){return f=typeof f!="undefined"?f+"":" ",s(f,c)+u}},3202:function(i){i.exports=function(o,s){s||(s=[0,""]),o=String(o);var l=parseFloat(o,10);return s[0]=l,s[1]=o.match(/[\d.\-\+]*\s*(.*)/)[1]||"",s}},3088:function(i,a,o){"use strict";i.exports=l;var s=o(3140);function l(u,c){for(var f=c.length|0,h=u.length,d=[new Array(f),new Array(f)],v=0;v0){z=d[G][P][0],U=G;break}q=z[U^1];for(var Z=0;Z<2;++Z)for(var j=d[Z][P],N=0;N0&&(z=H,q=re,U=Z)}return E||z&&p(z,U),q}function M(g,P){var E=d[P][g][0],z=[g];p(E,P);for(var q=E[P^1],U=P;;){for(;q!==g;)z.push(q),q=k(z[z.length-2],q,!1);if(d[0][g].length+d[1][g].length===0)break;var G=z[z.length-1],Z=g,j=z[1],N=k(G,Z,!0);if(s(c[G],c[Z],c[j],c[N])<0)break;z.push(g),q=k(G,Z)}return z}function T(g,P){return P[1]===P[P.length-1]}for(var v=0;v0;){var C=d[0][v].length,S=M(v,L);T(x,S)?x.push.apply(x,S):(x.length>0&&b.push(x),x=S)}x.length>0&&b.push(x)}return b}},5609:function(i,a,o){"use strict";i.exports=l;var s=o(3134);function l(u,c){for(var f=s(u,c.length),h=new Array(c.length),d=new Array(c.length),v=[],m=0;m0;){var p=v.pop();h[p]=!1;for(var k=f[p],m=0;m0}C=C.filter(S);for(var g=C.length,P=new Array(g),E=new Array(g),x=0;x0;){var ce=Le.pop(),He=ke[ce];h(He,function(ct,Qt){return ct-Qt});var lt=He.length,mt=me[ce],Vt;if(mt===0){var j=C[ce];Vt=[j]}for(var x=0;x=0)&&(me[st]=mt^1,Le.push(st),mt===0)){var j=C[st];De(j)||(j.reverse(),Vt.push(j))}}mt===0&&Pe.push(Vt)}return Pe}},5085:function(i,a,o){i.exports=k;var s=o(3250)[3],l=o(4209),u=o(3352),c=o(2478);function f(){return!0}function h(M){return function(T,L){var x=M[T];return x?!!x.queryPoint(L,f):!1}}function d(M){for(var T={},L=0;L0&&T[x]===L[0])C=M[x-1];else return 1;for(var S=1;C;){var g=C.key,P=s(L,g[0],g[1]);if(g[0][0]0)S=-1,C=C.right;else return 0;else if(P>0)C=C.left;else if(P<0)S=1,C=C.right;else return 0}return S}}function m(M){return 1}function b(M){return function(L){return M(L[0],L[1])?0:1}}function p(M,T){return function(x){return M(x[0],x[1])?0:T(x)}}function k(M){for(var T=M.length,L=[],x=[],C=0,S=0;S=m?(g=1,E=m+2*k+T):(g=-k/m,E=k*g+T)):(g=0,M>=0?(P=0,E=T):-M>=p?(P=1,E=p+2*M+T):(P=-M/p,E=M*P+T));else if(P<0)P=0,k>=0?(g=0,E=T):-k>=m?(g=1,E=m+2*k+T):(g=-k/m,E=k*g+T);else{var z=1/S;g*=z,P*=z,E=g*(m*g+b*P+2*k)+P*(b*g+p*P+2*M)+T}else{var q,U,G,Z;g<0?(q=b+k,U=p+M,U>q?(G=U-q,Z=m-2*b+p,G>=Z?(g=1,P=0,E=m+2*k+T):(g=G/Z,P=1-g,E=g*(m*g+b*P+2*k)+P*(b*g+p*P+2*M)+T)):(g=0,U<=0?(P=1,E=p+2*M+T):M>=0?(P=0,E=T):(P=-M/p,E=M*P+T))):P<0?(q=b+M,U=m+k,U>q?(G=U-q,Z=m-2*b+p,G>=Z?(P=1,g=0,E=p+2*M+T):(P=G/Z,g=1-P,E=g*(m*g+b*P+2*k)+P*(b*g+p*P+2*M)+T)):(P=0,U<=0?(g=1,E=m+2*k+T):k>=0?(g=0,E=T):(g=-k/m,E=k*g+T))):(G=p+M-b-k,G<=0?(g=0,P=1,E=p+2*M+T):(Z=m-2*b+p,G>=Z?(g=1,P=0,E=m+2*k+T):(g=G/Z,P=1-g,E=g*(m*g+b*P+2*k)+P*(b*g+p*P+2*M)+T)))}for(var j=1-g-P,v=0;v0){var p=f[d-1];if(s(m,p)===0&&u(p)!==b){d-=1;continue}}f[d++]=m}}return f.length=d,f}},3233:function(i){"use strict";var a="",o;i.exports=s;function s(l,u){if(typeof l!="string")throw new TypeError("expected a string");if(u===1)return l;if(u===2)return l+l;var c=l.length*u;if(o!==l||typeof o=="undefined")o=l,a="";else if(a.length>=c)return a.substr(0,c);for(;c>a.length&&u>1;)u&1&&(a+=l),u>>=1,l+=l;return a+=l,a=a.substr(0,c),a}},3025:function(i,a,o){i.exports=o.g.performance&&o.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(i){"use strict";i.exports=a;function a(o){for(var s=o.length,l=o[o.length-1],u=s,c=s-2;c>=0;--c){var f=l,h=o[c];l=f+h;var d=l-f,v=h-d;v&&(o[--u]=l,l=v)}for(var m=0,c=u;c0){if(U<=0)return G;Z=q+U}else if(q<0){if(U>=0)return G;Z=-(q+U)}else return G;var j=d*Z;return G>=j||G<=-j?G:M(P,E,z)},function(P,E,z,q){var U=P[0]-q[0],G=E[0]-q[0],Z=z[0]-q[0],j=P[1]-q[1],N=E[1]-q[1],H=z[1]-q[1],re=P[2]-q[2],oe=E[2]-q[2],_e=z[2]-q[2],ke=G*H,Ce=Z*N,ge=Z*j,ie=U*H,Se=U*N,Ee=G*j,we=re*(ke-Ce)+oe*(ge-ie)+_e*(Se-Ee),De=(Math.abs(ke)+Math.abs(Ce))*Math.abs(re)+(Math.abs(ge)+Math.abs(ie))*Math.abs(oe)+(Math.abs(Se)+Math.abs(Ee))*Math.abs(_e),Le=v*De;return we>Le||-we>Le?we:T(P,E,z,q)}];function x(g){var P=L[g.length];return P||(P=L[g.length]=k(g.length)),P.apply(void 0,g)}function C(g,P,E,z,q,U,G){return function(j,N,H,re,oe){switch(arguments.length){case 0:case 1:return 0;case 2:return z(j,N);case 3:return q(j,N,H);case 4:return U(j,N,H,re);case 5:return G(j,N,H,re,oe)}for(var _e=new Array(arguments.length),ke=0;ke0&&m>0||v<0&&m<0)return!1;var b=s(h,c,f),p=s(d,c,f);return b>0&&p>0||b<0&&p<0?!1:v===0&&m===0&&b===0&&p===0?l(c,f,h,d):!0}},8545:function(i){"use strict";i.exports=o;function a(s,l){var u=s+l,c=u-s,f=u-c,h=l-c,d=s-f,v=d+h;return v?[v,u]:[u]}function o(s,l){var u=s.length|0,c=l.length|0;if(u===1&&c===1)return a(s[0],-l[0]);var f=u+c,h=new Array(f),d=0,v=0,m=0,b=Math.abs,p=s[v],k=b(p),M=-l[m],T=b(M),L,x;k=c?(L=p,v+=1,v=c?(L=p,v+=1,v>1,M=f[2*k+1];if(M===m)return k;m>1,M=f[2*k+1];if(M===m)return k;m>1,M=f[2*k+1];if(M===m)return k;m>1,M=f[2*k+1];if(M===m)return k;m>1,Z=d(P[G],E);Z<=0?(Z===0&&(U=G),z=G+1):Z>0&&(q=G-1)}return U}s=p;function k(P,E){for(var z=new Array(P.length),q=0,U=z.length;q=P.length||d(P[ke],G)!==0););}return z}s=k;function M(P,E){if(!E)return k(b(L(P,0)),P,0);for(var z=new Array(E),q=0;q>>H&1&&N.push(U[H]);E.push(N)}return m(E)}s=T;function L(P,E){if(E<0)return[];for(var z=[],q=(1<0)-(u<0)},a.abs=function(u){var c=u>>o-1;return(u^c)-c},a.min=function(u,c){return c^(u^c)&-(u65535)<<4,u>>>=c,f=(u>255)<<3,u>>>=f,c|=f,f=(u>15)<<2,u>>>=f,c|=f,f=(u>3)<<1,u>>>=f,c|=f,c|u>>1},a.log10=function(u){return u>=1e9?9:u>=1e8?8:u>=1e7?7:u>=1e6?6:u>=1e5?5:u>=1e4?4:u>=1e3?3:u>=100?2:u>=10?1:0},a.popCount=function(u){return u=u-(u>>>1&1431655765),u=(u&858993459)+(u>>>2&858993459),(u+(u>>>4)&252645135)*16843009>>>24};function s(u){var c=32;return u&=-u,u&&c--,u&65535&&(c-=16),u&16711935&&(c-=8),u&252645135&&(c-=4),u&858993459&&(c-=2),u&1431655765&&(c-=1),c}a.countTrailingZeros=s,a.nextPow2=function(u){return u+=u===0,--u,u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u+1},a.prevPow2=function(u){return u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u-(u>>>1)},a.parity=function(u){return u^=u>>>16,u^=u>>>8,u^=u>>>4,u&=15,27030>>>u&1};var l=new Array(256);(function(u){for(var c=0;c<256;++c){var f=c,h=c,d=7;for(f>>>=1;f;f>>>=1)h<<=1,h|=f&1,--d;u[c]=h<>>8&255]<<16|l[u>>>16&255]<<8|l[u>>>24&255]},a.interleave2=function(u,c){return u&=65535,u=(u|u<<8)&16711935,u=(u|u<<4)&252645135,u=(u|u<<2)&858993459,u=(u|u<<1)&1431655765,c&=65535,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,u|c<<1},a.deinterleave2=function(u,c){return u=u>>>c&1431655765,u=(u|u>>>1)&858993459,u=(u|u>>>2)&252645135,u=(u|u>>>4)&16711935,u=(u|u>>>16)&65535,u<<16>>16},a.interleave3=function(u,c,f){return u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,u|=c<<1,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,u|f<<2},a.deinterleave3=function(u,c){return u=u>>>c&1227133513,u=(u|u>>>2)&3272356035,u=(u|u>>>4)&251719695,u=(u|u>>>8)&4278190335,u=(u|u>>>16)&1023,u<<22>>22},a.nextCombination=function(u){var c=u|u-1;return c+1|(~c&-~c)-1>>>s(u)+1}},2014:function(i,a,o){"use strict";"use restrict";var s=o(3105),l=o(4623);function u(g){for(var P=0,E=Math.max,z=0,q=g.length;z>1,G=h(g[U],P);G<=0?(G===0&&(q=U),E=U+1):G>0&&(z=U-1)}return q}a.findCell=b;function p(g,P){for(var E=new Array(g.length),z=0,q=E.length;z=g.length||h(g[_e],U)!==0););}return E}a.incidence=p;function k(g,P){if(!P)return p(m(T(g,0)),g,0);for(var E=new Array(P),z=0;z>>N&1&&j.push(q[N]);P.push(j)}return v(P)}a.explode=M;function T(g,P){if(P<0)return[];for(var E=[],z=(1<>1:(ie>>1)-1}function z(ie){for(var Se=P(ie);;){var Ee=Se,we=2*ie+1,De=2*(ie+1),Le=ie;if(we0;){var Ee=E(ie);if(Ee>=0){var we=P(Ee);if(Se0){var ie=j[0];return g(0,re-1),re-=1,z(0),ie}return-1}function G(ie,Se){var Ee=j[ie];return k[Ee]===Se?ie:(k[Ee]=-1/0,q(ie),U(),k[Ee]=Se,re+=1,q(re-1))}function Z(ie){if(!M[ie]){M[ie]=!0;var Se=b[ie],Ee=p[ie];b[Ee]>=0&&(b[Ee]=Se),p[Se]>=0&&(p[Se]=Ee),N[Se]>=0&&G(N[Se],S(Se)),N[Ee]>=0&&G(N[Ee],S(Ee))}}for(var j=[],N=new Array(v),T=0;T>1;T>=0;--T)z(T);for(;;){var oe=U();if(oe<0||k[oe]>d)break;Z(oe)}for(var _e=[],T=0;T=0&&Ee>=0&&Se!==Ee){var we=N[Se],De=N[Ee];we!==De&&ge.push([we,De])}}),l.unique(l.normalize(ge)),{positions:_e,edges:ge}}},1303:function(i,a,o){"use strict";i.exports=u;var s=o(3250);function l(c,f){var h,d;if(f[0][0]f[1][0])h=f[1],d=f[0];else{var v=Math.min(c[0][1],c[1][1]),m=Math.max(c[0][1],c[1][1]),b=Math.min(f[0][1],f[1][1]),p=Math.max(f[0][1],f[1][1]);return mp?v-p:m-p}var k,M;c[0][1]f[1][0])h=f[1],d=f[0];else return l(f,c);var v,m;if(c[0][0]c[1][0])v=c[1],m=c[0];else return-l(c,f);var b=s(h,d,m),p=s(h,d,v);if(b<0){if(p<=0)return b}else if(b>0){if(p>=0)return b}else if(p)return p;if(b=s(m,v,d),p=s(m,v,h),b<0){if(p<=0)return b}else if(b>0){if(p>=0)return b}else if(p)return p;return d[0]-m[0]}},4209:function(i,a,o){"use strict";i.exports=p;var s=o(2478),l=o(3840),u=o(3250),c=o(1303);function f(k,M,T){this.slabs=k,this.coordinates=M,this.horizontal=T}var h=f.prototype;function d(k,M){return k.y-M}function v(k,M){for(var T=null;k;){var L=k.key,x,C;L[0][0]0)if(M[0]!==L[1][0])T=k,k=k.right;else{var g=v(k.right,M);if(g)return g;k=k.left}else{if(M[0]!==L[1][0])return k;var g=v(k.right,M);if(g)return g;k=k.left}}return T}h.castUp=function(k){var M=s.le(this.coordinates,k[0]);if(M<0)return-1;var T=this.slabs[M],L=v(this.slabs[M],k),x=-1;if(L&&(x=L.value),this.coordinates[M]===k[0]){var C=null;if(L&&(C=L.key),M>0){var S=v(this.slabs[M-1],k);S&&(C?c(S.key,C)>0&&(C=S.key,x=S.value):(x=S.value,C=S.key))}var g=this.horizontal[M];if(g.length>0){var P=s.ge(g,k[1],d);if(P=g.length)return x;E=g[P]}}if(E.start)if(C){var z=u(C[0],C[1],[k[0],E.y]);C[0][0]>C[1][0]&&(z=-z),z>0&&(x=E.index)}else x=E.index;else E.y!==k[1]&&(x=E.index)}}}return x};function m(k,M,T,L){this.y=k,this.index=M,this.start=T,this.closed=L}function b(k,M,T,L){this.x=k,this.segment=M,this.create=T,this.index=L}function p(k){for(var M=k.length,T=2*M,L=new Array(T),x=0;x1&&(M=1);for(var T=1-M,L=v.length,x=new Array(L),C=0;C0||k>0&&x<0){var C=c(M,x,T,k);b.push(C),p.push(C.slice())}x<0?p.push(T.slice()):x>0?b.push(T.slice()):(b.push(T.slice()),p.push(T.slice())),k=x}return{positive:b,negative:p}}function h(v,m){for(var b=[],p=u(v[v.length-1],m),k=v[v.length-1],M=v[0],T=0;T0||p>0&&L<0)&&b.push(c(k,L,M,p)),L>=0&&b.push(M.slice()),p=L}return b}function d(v,m){for(var b=[],p=u(v[v.length-1],m),k=v[v.length-1],M=v[0],T=0;T0||p>0&&L<0)&&b.push(c(k,L,M,p)),L<=0&&b.push(M.slice()),p=L}return b}},3387:function(i,a,o){var s;(function(){"use strict";var l={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function u(v){return f(d(v),arguments)}function c(v,m){return u.apply(null,[v].concat(m||[]))}function f(v,m){var b=1,p=v.length,k,M="",T,L,x,C,S,g,P,E;for(T=0;T=0),x.type){case"b":k=parseInt(k,10).toString(2);break;case"c":k=String.fromCharCode(parseInt(k,10));break;case"d":case"i":k=parseInt(k,10);break;case"j":k=JSON.stringify(k,null,x.width?parseInt(x.width):0);break;case"e":k=x.precision?parseFloat(k).toExponential(x.precision):parseFloat(k).toExponential();break;case"f":k=x.precision?parseFloat(k).toFixed(x.precision):parseFloat(k);break;case"g":k=x.precision?String(Number(k.toPrecision(x.precision))):parseFloat(k);break;case"o":k=(parseInt(k,10)>>>0).toString(8);break;case"s":k=String(k),k=x.precision?k.substring(0,x.precision):k;break;case"t":k=String(!!k),k=x.precision?k.substring(0,x.precision):k;break;case"T":k=Object.prototype.toString.call(k).slice(8,-1).toLowerCase(),k=x.precision?k.substring(0,x.precision):k;break;case"u":k=parseInt(k,10)>>>0;break;case"v":k=k.valueOf(),k=x.precision?k.substring(0,x.precision):k;break;case"x":k=(parseInt(k,10)>>>0).toString(16);break;case"X":k=(parseInt(k,10)>>>0).toString(16).toUpperCase();break}l.json.test(x.type)?M+=k:(l.number.test(x.type)&&(!P||x.sign)?(E=P?"+":"-",k=k.toString().replace(l.sign,"")):E="",S=x.pad_char?x.pad_char==="0"?"0":x.pad_char.charAt(1):" ",g=x.width-(E+k).length,C=x.width&&g>0?S.repeat(g):"",M+=x.align?E+k+C:S==="0"?E+C+k:C+E+k)}return M}var h=Object.create(null);function d(v){if(h[v])return h[v];for(var m=v,b,p=[],k=0;m;){if((b=l.text.exec(m))!==null)p.push(b[0]);else if((b=l.modulo.exec(m))!==null)p.push("%");else if((b=l.placeholder.exec(m))!==null){if(b[2]){k|=1;var M=[],T=b[2],L=[];if((L=l.key.exec(T))!==null)for(M.push(L[1]);(T=T.substring(L[0].length))!=="";)if((L=l.key_access.exec(T))!==null)M.push(L[1]);else if((L=l.index_access.exec(T))!==null)M.push(L[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");b[2]=M}else k|=2;if(k===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");p.push({placeholder:b[0],param_no:b[1],keys:b[2],sign:b[3],pad_char:b[4],align:b[5],width:b[6],precision:b[7],type:b[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");m=m.substring(b[0].length)}return h[v]=p}a.sprintf=u,a.vsprintf=c,typeof window!="undefined"&&(window.sprintf=u,window.vsprintf=c,s=function(){return{sprintf:u,vsprintf:c}}.call(a,o,a,i),s!==void 0&&(i.exports=s))})()},3711:function(i,a,o){"use strict";i.exports=d;var s=o(2640),l=o(781),u={"2d":function(v,m,b){var p=v({order:m,scalarArguments:3,getters:b==="generic"?[0]:void 0,phase:function(M,T,L,x){return M>x|0},vertex:function(M,T,L,x,C,S,g,P,E,z,q,U,G){var Z=(g<<0)+(P<<1)+(E<<2)+(z<<3)|0;if(!(Z===0||Z===15))switch(Z){case 0:q.push([M-.5,T-.5]);break;case 1:q.push([M-.25-.25*(x+L-2*G)/(L-x),T-.25-.25*(C+L-2*G)/(L-C)]);break;case 2:q.push([M-.75-.25*(-x-L+2*G)/(x-L),T-.25-.25*(S+x-2*G)/(x-S)]);break;case 3:q.push([M-.5,T-.5-.5*(C+L+S+x-4*G)/(L-C+x-S)]);break;case 4:q.push([M-.25-.25*(S+C-2*G)/(C-S),T-.75-.25*(-C-L+2*G)/(C-L)]);break;case 5:q.push([M-.5-.5*(x+L+S+C-4*G)/(L-x+C-S),T-.5]);break;case 6:q.push([M-.5-.25*(-x-L+S+C)/(x-L+C-S),T-.5-.25*(-C-L+S+x)/(C-L+x-S)]);break;case 7:q.push([M-.75-.25*(S+C-2*G)/(C-S),T-.75-.25*(S+x-2*G)/(x-S)]);break;case 8:q.push([M-.75-.25*(-S-C+2*G)/(S-C),T-.75-.25*(-S-x+2*G)/(S-x)]);break;case 9:q.push([M-.5-.25*(x+L+-S-C)/(L-x+S-C),T-.5-.25*(C+L+-S-x)/(L-C+S-x)]);break;case 10:q.push([M-.5-.5*(-x-L+-S-C+4*G)/(x-L+S-C),T-.5]);break;case 11:q.push([M-.25-.25*(-S-C+2*G)/(S-C),T-.75-.25*(C+L-2*G)/(L-C)]);break;case 12:q.push([M-.5,T-.5-.5*(-C-L+-S-x+4*G)/(C-L+S-x)]);break;case 13:q.push([M-.75-.25*(x+L-2*G)/(L-x),T-.25-.25*(-S-x+2*G)/(S-x)]);break;case 14:q.push([M-.25-.25*(-x-L+2*G)/(x-L),T-.25-.25*(-C-L+2*G)/(C-L)]);break;case 15:q.push([M-.5,T-.5]);break}},cell:function(M,T,L,x,C,S,g,P,E){C?P.push([M,T]):P.push([T,M])}});return function(k,M){var T=[],L=[];return p(k,T,L,M),{positions:T,cells:L}}}};function c(v,m){var b=v.length+"d",p=u[b];if(p)return p(s,v,m)}function f(v,m){for(var b=l(v,m),p=b.length,k=new Array(p),M=new Array(p),T=0;TMath.max(x,C)?S[2]=1:x>Math.max(L,C)?S[0]=1:S[1]=1;for(var g=0,P=0,E=0;E<3;++E)g+=T[E]*T[E],P+=S[E]*T[E];for(var E=0;E<3;++E)S[E]-=P/g*T[E];return f(S,S),S}function b(T,L,x,C,S,g,P,E){this.center=s(x),this.up=s(C),this.right=s(S),this.radius=s([g]),this.angle=s([P,E]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(T,L),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var z=0;z<16;++z)this.computedMatrix[z]=.5;this.recalcMatrix(0)}var p=b.prototype;p.setDistanceLimits=function(T,L){T>0?T=Math.log(T):T=-1/0,L>0?L=Math.log(L):L=1/0,L=Math.max(L,T),this.radius.bounds[0][0]=T,this.radius.bounds[1][0]=L},p.getDistanceLimits=function(T){var L=this.radius.bounds[0];return T?(T[0]=Math.exp(L[0][0]),T[1]=Math.exp(L[1][0]),T):[Math.exp(L[0][0]),Math.exp(L[1][0])]},p.recalcMatrix=function(T){this.center.curve(T),this.up.curve(T),this.right.curve(T),this.radius.curve(T),this.angle.curve(T);for(var L=this.computedUp,x=this.computedRight,C=0,S=0,g=0;g<3;++g)S+=L[g]*x[g],C+=L[g]*L[g];for(var P=Math.sqrt(C),E=0,g=0;g<3;++g)x[g]-=L[g]*S/C,E+=x[g]*x[g],L[g]/=P;for(var z=Math.sqrt(E),g=0;g<3;++g)x[g]/=z;var q=this.computedToward;c(q,L,x),f(q,q);for(var U=Math.exp(this.computedRadius[0]),G=this.computedAngle[0],Z=this.computedAngle[1],j=Math.cos(G),N=Math.sin(G),H=Math.cos(Z),re=Math.sin(Z),oe=this.computedCenter,_e=j*H,ke=N*H,Ce=re,ge=-j*re,ie=-N*re,Se=H,Ee=this.computedEye,we=this.computedMatrix,g=0;g<3;++g){var De=_e*x[g]+ke*q[g]+Ce*L[g];we[4*g+1]=ge*x[g]+ie*q[g]+Se*L[g],we[4*g+2]=De,we[4*g+3]=0}var Le=we[1],me=we[5],Pe=we[9],ce=we[2],He=we[6],lt=we[10],mt=me*lt-Pe*He,Vt=Pe*ce-Le*lt,st=Le*He-me*ce,ct=d(mt,Vt,st);mt/=ct,Vt/=ct,st/=ct,we[0]=mt,we[4]=Vt,we[8]=st;for(var g=0;g<3;++g)Ee[g]=oe[g]+we[2+4*g]*U;for(var g=0;g<3;++g){for(var E=0,Qt=0;Qt<3;++Qt)E+=we[g+4*Qt]*Ee[Qt];we[12+g]=-E}we[15]=1},p.getMatrix=function(T,L){this.recalcMatrix(T);var x=this.computedMatrix;if(L){for(var C=0;C<16;++C)L[C]=x[C];return L}return x};var k=[0,0,0];p.rotate=function(T,L,x,C){if(this.angle.move(T,L,x),C){this.recalcMatrix(T);var S=this.computedMatrix;k[0]=S[2],k[1]=S[6],k[2]=S[10];for(var g=this.computedUp,P=this.computedRight,E=this.computedToward,z=0;z<3;++z)S[4*z]=g[z],S[4*z+1]=P[z],S[4*z+2]=E[z];u(S,S,C,k);for(var z=0;z<3;++z)g[z]=S[4*z],P[z]=S[4*z+1];this.up.set(T,g[0],g[1],g[2]),this.right.set(T,P[0],P[1],P[2])}},p.pan=function(T,L,x,C){L=L||0,x=x||0,C=C||0,this.recalcMatrix(T);var S=this.computedMatrix,g=Math.exp(this.computedRadius[0]),P=S[1],E=S[5],z=S[9],q=d(P,E,z);P/=q,E/=q,z/=q;var U=S[0],G=S[4],Z=S[8],j=U*P+G*E+Z*z;U-=P*j,G-=E*j,Z-=z*j;var N=d(U,G,Z);U/=N,G/=N,Z/=N;var H=U*L+P*x,re=G*L+E*x,oe=Z*L+z*x;this.center.move(T,H,re,oe);var _e=Math.exp(this.computedRadius[0]);_e=Math.max(1e-4,_e+C),this.radius.set(T,Math.log(_e))},p.translate=function(T,L,x,C){this.center.move(T,L||0,x||0,C||0)},p.setMatrix=function(T,L,x,C){var S=1;typeof x=="number"&&(S=x|0),(S<0||S>3)&&(S=1);var g=(S+2)%3,P=(S+1)%3;L||(this.recalcMatrix(T),L=this.computedMatrix);var E=L[S],z=L[S+4],q=L[S+8];if(C){var G=Math.abs(E),Z=Math.abs(z),j=Math.abs(q),N=Math.max(G,Z,j);G===N?(E=E<0?-1:1,z=q=0):j===N?(q=q<0?-1:1,E=z=0):(z=z<0?-1:1,E=q=0)}else{var U=d(E,z,q);E/=U,z/=U,q/=U}var H=L[g],re=L[g+4],oe=L[g+8],_e=H*E+re*z+oe*q;H-=E*_e,re-=z*_e,oe-=q*_e;var ke=d(H,re,oe);H/=ke,re/=ke,oe/=ke;var Ce=z*oe-q*re,ge=q*H-E*oe,ie=E*re-z*H,Se=d(Ce,ge,ie);Ce/=Se,ge/=Se,ie/=Se,this.center.jump(T,Ue,Ae,rt),this.radius.idle(T),this.up.jump(T,E,z,q),this.right.jump(T,H,re,oe);var Ee,we;if(S===2){var De=L[1],Le=L[5],me=L[9],Pe=De*H+Le*re+me*oe,ce=De*Ce+Le*ge+me*ie;Vt<0?Ee=-Math.PI/2:Ee=Math.PI/2,we=Math.atan2(ce,Pe)}else{var He=L[2],lt=L[6],mt=L[10],Vt=He*E+lt*z+mt*q,st=He*H+lt*re+mt*oe,ct=He*Ce+lt*ge+mt*ie;Ee=Math.asin(v(Vt)),we=Math.atan2(ct,st)}this.angle.jump(T,we,Ee),this.recalcMatrix(T);var Qt=L[2],Ht=L[6],nr=L[10],tt=this.computedMatrix;l(tt,L);var je=tt[15],Ue=tt[12]/je,Ae=tt[13]/je,rt=tt[14]/je,St=Math.exp(this.computedRadius[0]);this.center.jump(T,Ue-Qt*St,Ae-Ht*St,rt-nr*St)},p.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},p.idle=function(T){this.center.idle(T),this.up.idle(T),this.right.idle(T),this.radius.idle(T),this.angle.idle(T)},p.flush=function(T){this.center.flush(T),this.up.flush(T),this.right.flush(T),this.radius.flush(T),this.angle.flush(T)},p.setDistance=function(T,L){L>0&&this.radius.set(T,Math.log(L))},p.lookAt=function(T,L,x,C){this.recalcMatrix(T),L=L||this.computedEye,x=x||this.computedCenter,C=C||this.computedUp;var S=C[0],g=C[1],P=C[2],E=d(S,g,P);if(!(E<1e-6)){S/=E,g/=E,P/=E;var z=L[0]-x[0],q=L[1]-x[1],U=L[2]-x[2],G=d(z,q,U);if(!(G<1e-6)){z/=G,q/=G,U/=G;var Z=this.computedRight,j=Z[0],N=Z[1],H=Z[2],re=S*j+g*N+P*H;j-=re*S,N-=re*g,H-=re*P;var oe=d(j,N,H);if(!(oe<.01&&(j=g*U-P*q,N=P*z-S*U,H=S*q-g*z,oe=d(j,N,H),oe<1e-6))){j/=oe,N/=oe,H/=oe,this.up.set(T,S,g,P),this.right.set(T,j,N,H),this.center.set(T,x[0],x[1],x[2]),this.radius.set(T,Math.log(G));var _e=g*H-P*N,ke=P*j-S*H,Ce=S*N-g*j,ge=d(_e,ke,Ce);_e/=ge,ke/=ge,Ce/=ge;var ie=S*z+g*q+P*U,Se=j*z+N*q+H*U,Ee=_e*z+ke*q+Ce*U,we=Math.asin(v(ie)),De=Math.atan2(Ee,Se),Le=this.angle._state,me=Le[Le.length-1],Pe=Le[Le.length-2];me=me%(2*Math.PI);var ce=Math.abs(me+2*Math.PI-De),He=Math.abs(me-De),lt=Math.abs(me-2*Math.PI-De);ce0?H.pop():new ArrayBuffer(j)}a.mallocArrayBuffer=k;function M(Z){return new Uint8Array(k(Z),0,Z)}a.mallocUint8=M;function T(Z){return new Uint16Array(k(2*Z),0,Z)}a.mallocUint16=T;function L(Z){return new Uint32Array(k(4*Z),0,Z)}a.mallocUint32=L;function x(Z){return new Int8Array(k(Z),0,Z)}a.mallocInt8=x;function C(Z){return new Int16Array(k(2*Z),0,Z)}a.mallocInt16=C;function S(Z){return new Int32Array(k(4*Z),0,Z)}a.mallocInt32=S;function g(Z){return new Float32Array(k(4*Z),0,Z)}a.mallocFloat32=a.mallocFloat=g;function P(Z){return new Float64Array(k(8*Z),0,Z)}a.mallocFloat64=a.mallocDouble=P;function E(Z){return c?new Uint8ClampedArray(k(Z),0,Z):M(Z)}a.mallocUint8Clamped=E;function z(Z){return f?new BigUint64Array(k(8*Z),0,Z):null}a.mallocBigUint64=z;function q(Z){return h?new BigInt64Array(k(8*Z),0,Z):null}a.mallocBigInt64=q;function U(Z){return new DataView(k(Z),0,Z)}a.mallocDataView=U;function G(Z){Z=s.nextPow2(Z);var j=s.log2(Z),N=m[j];return N.length>0?N.pop():new u(Z)}a.mallocBuffer=G,a.clearCache=function(){for(var j=0;j<32;++j)d.UINT8[j].length=0,d.UINT16[j].length=0,d.UINT32[j].length=0,d.INT8[j].length=0,d.INT16[j].length=0,d.INT32[j].length=0,d.FLOAT[j].length=0,d.DOUBLE[j].length=0,d.BIGUINT64[j].length=0,d.BIGINT64[j].length=0,d.UINT8C[j].length=0,v[j].length=0,m[j].length=0}},1755:function(i){"use strict";"use restrict";i.exports=a;function a(s){this.roots=new Array(s),this.ranks=new Array(s);for(var l=0;l",H="",re=N.length,oe=H.length,_e=G[0]===k||G[0]===L,ke=0,Ce=-oe;ke>-1&&(ke=Z.indexOf(N,ke),!(ke===-1||(Ce=Z.indexOf(H,ke+re),Ce===-1)||Ce<=ke));){for(var ge=ke;ge=Ce)j[ge]=null,Z=Z.substr(0,ge)+" "+Z.substr(ge+1);else if(j[ge]!==null){var ie=j[ge].indexOf(G[0]);ie===-1?j[ge]+=G:_e&&(j[ge]=j[ge].substr(0,ie+1)+(1+parseInt(j[ge][ie+1]))+j[ge].substr(ie+2))}var Se=ke+re,Ee=Z.substr(Se,Ce-Se),we=Ee.indexOf(N);we!==-1?ke=we:ke=Ce+oe}return j}function S(U,G,Z){for(var j=G.textAlign||"start",N=G.textBaseline||"alphabetic",H=[1<<30,1<<30],re=[0,0],oe=U.length,_e=0;_e/g,` +`):Z=Z.replace(/\/g," ");var re="",oe=[];for(me=0;me-1?parseInt(Ae[1+Tt]):0,pt=dt>-1?parseInt(rt[1+dt]):0;Et!==pt&&(St=St.replace(st(),"?px "),He*=Math.pow(.75,pt-Et),St=St.replace("?px ",st())),ce+=.25*ie*(pt-Et)}if(H.superscripts===!0){var Xt=Ae.indexOf(k),or=rt.indexOf(k),_r=Xt>-1?parseInt(Ae[1+Xt]):0,Er=or>-1?parseInt(rt[1+or]):0;_r!==Er&&(St=St.replace(st(),"?px "),He*=Math.pow(.75,Er-_r),St=St.replace("?px ",st())),ce-=.25*ie*(Er-_r)}if(H.bolds===!0){var ei=Ae.indexOf(v)>-1,qr=rt.indexOf(v)>-1;!ei&&qr&&(jr?St=St.replace("italic ","italic bold "):St="bold "+St),ei&&!qr&&(St=St.replace("bold ",""))}if(H.italics===!0){var jr=Ae.indexOf(b)>-1,gt=rt.indexOf(b)>-1;!jr&>&&(St="italic "+St),jr&&!gt&&(St=St.replace("italic ",""))}G.font=St}for(Le=0;Le0&&(N=j.size),j.lineSpacing&&j.lineSpacing>0&&(H=j.lineSpacing),j.styletags&&j.styletags.breaklines&&(re.breaklines=!!j.styletags.breaklines),j.styletags&&j.styletags.bolds&&(re.bolds=!!j.styletags.bolds),j.styletags&&j.styletags.italics&&(re.italics=!!j.styletags.italics),j.styletags&&j.styletags.subscripts&&(re.subscripts=!!j.styletags.subscripts),j.styletags&&j.styletags.superscripts&&(re.superscripts=!!j.styletags.superscripts)),Z.font=[j.fontStyle,j.fontVariant,j.fontWeight,N+"px",j.font].filter(function(_e){return _e}).join(" "),Z.textAlign="start",Z.textBaseline="alphabetic",Z.direction="ltr";var oe=g(G,Z,U,N,H,re);return z(oe,j,N)}},1538:function(i){(function(){"use strict";if(typeof ses!="undefined"&&ses.ok&&!ses.ok())return;function o(E){E.permitHostObjects___&&E.permitHostObjects___(o)}typeof ses!="undefined"&&(ses.weakMapPermitHostObjects=o);var s=!1;if(typeof WeakMap=="function"){var l=WeakMap;if(!(typeof navigator!="undefined"&&/Firefox/.test(navigator.userAgent))){var u=new l,c=Object.freeze({});if(u.set(c,1),u.get(c)!==1)s=!0;else{i.exports=WeakMap;return}}}var f=Object.prototype.hasOwnProperty,h=Object.getOwnPropertyNames,d=Object.defineProperty,v=Object.isExtensible,m="weakmap:",b=m+"ident:"+Math.random()+"___";if(typeof crypto!="undefined"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var p=new ArrayBuffer(25),k=new Uint8Array(p);crypto.getRandomValues(k),b=m+"rand:"+Array.prototype.map.call(k,function(E){return(E%36).toString(36)}).join("")+"___"}function M(E){return!(E.substr(0,m.length)==m&&E.substr(E.length-3)==="___")}if(d(Object,"getOwnPropertyNames",{value:function(z){return h(z).filter(M)}}),"getPropertyNames"in Object){var T=Object.getPropertyNames;d(Object,"getPropertyNames",{value:function(z){return T(z).filter(M)}})}function L(E){if(E!==Object(E))throw new TypeError("Not an object: "+E);var z=E[b];if(z&&z.key===E)return z;if(v(E)){z={key:E};try{return d(E,b,{value:z,writable:!1,enumerable:!1,configurable:!1}),z}catch(q){return}}}(function(){var E=Object.freeze;d(Object,"freeze",{value:function(G){return L(G),E(G)}});var z=Object.seal;d(Object,"seal",{value:function(G){return L(G),z(G)}});var q=Object.preventExtensions;d(Object,"preventExtensions",{value:function(G){return L(G),q(G)}})})();function x(E){return E.prototype=null,Object.freeze(E)}var C=!1;function S(){!C&&typeof console!="undefined"&&(C=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var g=0,P=function(){this instanceof P||S();var E=[],z=[],q=g++;function U(N,H){var re,oe=L(N);return oe?q in oe?oe[q]:H:(re=E.indexOf(N),re>=0?z[re]:H)}function G(N){var H=L(N);return H?q in H:E.indexOf(N)>=0}function Z(N,H){var re,oe=L(N);return oe?oe[q]=H:(re=E.indexOf(N),re>=0?z[re]=H:(re=E.length,z[re]=H,E[re]=N)),this}function j(N){var H=L(N),re,oe;return H?q in H&&delete H[q]:(re=E.indexOf(N),re<0?!1:(oe=E.length-1,E[re]=void 0,z[re]=z[oe],E[re]=E[oe],E.length=oe,z.length=oe,!0))}return Object.create(P.prototype,{get___:{value:x(U)},has___:{value:x(G)},set___:{value:x(Z)},delete___:{value:x(j)}})};P.prototype=Object.create(Object.prototype,{get:{value:function(z,q){return this.get___(z,q)},writable:!0,configurable:!0},has:{value:function(z){return this.has___(z)},writable:!0,configurable:!0},set:{value:function(z,q){return this.set___(z,q)},writable:!0,configurable:!0},delete:{value:function(z){return this.delete___(z)},writable:!0,configurable:!0}}),typeof l=="function"?function(){s&&typeof Proxy!="undefined"&&(Proxy=void 0);function E(){this instanceof P||S();var z=new l,q=void 0,U=!1;function G(H,re){return q?z.has(H)?z.get(H):q.get___(H,re):z.get(H,re)}function Z(H){return z.has(H)||(q?q.has___(H):!1)}var j;s?j=function(H,re){return z.set(H,re),z.has(H)||(q||(q=new P),q.set(H,re)),this}:j=function(H,re){if(U)try{z.set(H,re)}catch(oe){q||(q=new P),q.set___(H,re)}else z.set(H,re);return this};function N(H){var re=!!z.delete(H);return q&&q.delete___(H)||re}return Object.create(P.prototype,{get___:{value:x(G)},has___:{value:x(Z)},set___:{value:x(j)},delete___:{value:x(N)},permitHostObjects___:{value:x(function(H){if(H===o)U=!0;else throw new Error("bogus call to permitHostObjects___")})}})}E.prototype=P.prototype,i.exports=E,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy!="undefined"&&(Proxy=void 0),i.exports=P)})()},236:function(i,a,o){var s=o(8284);i.exports=l;function l(){var u={};return function(c){if((typeof c!="object"||c===null)&&typeof c!="function")throw new Error("Weakmap-shim: Key must be object");var f=c.valueOf(u);return f&&f.identity===u?f:s(c,u)}}},8284:function(i){i.exports=a;function a(o,s){var l={identity:s},u=o.valueOf;return Object.defineProperty(o,"valueOf",{value:function(c){return c!==s?u.apply(this,arguments):l},writable:!0}),l}},606:function(i,a,o){var s=o(236);i.exports=l;function l(){var u=s();return{get:function(c,f){var h=u(c);return h.hasOwnProperty("value")?h.value:f},set:function(c,f){return u(c).value=f,this},has:function(c){return"value"in u(c)},delete:function(c){return delete u(c).value}}}},3349:function(i){"use strict";function a(){return function(f,h,d,v,m,b){var p=f[0],k=d[0],M=[0],T=k;v|=0;var L=0,x=k;for(L=0;L=0!=S>=0&&m.push(M[0]+.5+.5*(C+S)/(C-S))}v+=x,++M[0]}}}function o(){return a()}var s=o;function l(f){var h={};return function(v,m,b){var p=v.dtype,k=v.order,M=[p,k.join()].join(),T=h[M];return T||(h[M]=T=f([p,k])),T(v.shape.slice(0),v.data,v.stride,v.offset|0,m,b)}}function u(f){return l(s.bind(void 0,f))}function c(f){return u({funcName:f.funcName})}i.exports=c({funcName:"zeroCrossings"})},781:function(i,a,o){"use strict";i.exports=l;var s=o(3349);function l(u,c){var f=[];return c=+c||0,s(u.hi(u.shape[0]-1),f,c),f}},7790:function(){}},t={};function r(i){var a=t[i];if(a!==void 0)return a.exports;var o=t[i]={id:i,loaded:!1,exports:{}};return e[i].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}(function(){r.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch(i){if(typeof window=="object")return window}}()})(),function(){r.nmd=function(i){return i.paths=[],i.children||(i.children=[]),i}}();var n=r(1964);APe.exports=n})()});var TX=ye((sgr,SPe)=>{"use strict";SPe.exports={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]}});var CPe=ye((lgr,kPe)=>{"use strict";var MPe=TX();kPe.exports=dIt;var EPe={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function dIt(e){var t,r=[],n=1,i;if(typeof e=="string")if(e=e.toLowerCase(),MPe[e])r=MPe[e].slice(),i="rgb";else if(e==="transparent")n=0,i="rgb",r=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var a=e.slice(1),o=a.length,s=o<=4;n=1,s?(r=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],o===4&&(n=parseInt(a[3]+a[3],16)/255)):(r=[parseInt(a[0]+a[1],16),parseInt(a[2]+a[3],16),parseInt(a[4]+a[5],16)],o===8&&(n=parseInt(a[6]+a[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),i="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var l=t[1],u=l==="rgb",a=l.replace(/a$/,"");i=a;var o=a==="cmyk"?4:a==="gray"?1:3;r=t[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(h,d){if(/%$/.test(h))return d===o?parseFloat(h)/100:a==="rgb"?parseFloat(h)*255/100:parseFloat(h);if(a[d]==="h"){if(/deg$/.test(h))return parseFloat(h);if(EPe[h]!==void 0)return EPe[h]}return parseFloat(h)}),l===a&&r.push(1),n=u||r[o]===void 0?1:r[o],r=r.slice(0,o)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(r=e.match(/([0-9]+)/g).map(function(c){return parseFloat(c)}),i=e.match(/([a-z])/ig).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(r=[e[0],e[1],e[2]],i="rgb",n=e.length===4?e[3]:1):e instanceof Object&&(e.r!=null||e.red!=null||e.R!=null?(i="rgb",r=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(i="hsl",r=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),n=e.a||e.alpha||e.opacity||1,e.opacity!=null&&(n/=100)):(i="rgb",r=[e>>>16,(e&65280)>>>8,e&255]);return{space:i,values:r,alpha:n}}});var PPe=ye((ugr,LPe)=>{"use strict";var vIt=CPe();LPe.exports=function(t){Array.isArray(t)&&t.raw&&(t=String.raw.apply(null,arguments));var r,n,i,a=vIt(t);if(!a.space)return[];var o=[0,0,0],s=a.space[0]==="h"?[360,100,100]:[255,255,255];return r=Array(3),r[0]=Math.min(Math.max(a.values[0],o[0]),s[0]),r[1]=Math.min(Math.max(a.values[1],o[1]),s[1]),r[2]=Math.min(Math.max(a.values[2],o[2]),s[2]),a.space[0]==="h"&&(r=pIt(r)),r.push(Math.min(Math.max(a.alpha,0),1)),r};function pIt(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100,i,a,o,s,l,u=0;if(r===0)return l=n*255,[l,l,l];for(a=n<.5?n*(1+r):n+r-n*r,i=2*n-a,s=[0,0,0];u<3;)o=t+1/3*-(u-1),o<0?o++:o>1&&o--,l=6*o<1?i+(a-i)*6*o:2*o<1?a:3*o<2?i+(a-i)*(2/3-o)*6:i,s[u++]=l*255;return s}});var rk=ye((cgr,IPe)=>{IPe.exports=gIt;function gIt(e,t,r){return tr?r:e:et?t:e}});var QD=ye((fgr,RPe)=>{RPe.exports=function(e){switch(e){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}});var ox=ye((hgr,DPe)=>{"use strict";var mIt=PPe(),eF=rk(),yIt=QD();DPe.exports=function(t,r){(r==="float"||!r)&&(r="array"),r==="uint"&&(r="uint8"),r==="uint_clamped"&&(r="uint8_clamped");var n=yIt(r),i=new n(4),a=r!=="uint8"&&r!=="uint8_clamped";return(!t.length||typeof t=="string")&&(t=mIt(t),t[0]/=255,t[1]/=255,t[2]/=255),_It(t)?(i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3]!=null?t[3]:255,a&&(i[0]/=255,i[1]/=255,i[2]/=255,i[3]/=255),i):(a?(i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3]!=null?t[3]:1):(i[0]=eF(Math.floor(t[0]*255),0,255),i[1]=eF(Math.floor(t[1]*255),0,255),i[2]=eF(Math.floor(t[2]*255),0,255),i[3]=t[3]==null?255:eF(Math.floor(t[3]*255),0,255)),i)};function _It(e){return!!(e instanceof Uint8Array||e instanceof Uint8ClampedArray||Array.isArray(e)&&(e[0]>1||e[0]===0)&&(e[1]>1||e[1]===0)&&(e[2]>1||e[2]===0)&&(!e[3]||e[3]>1))}});var n1=ye((dgr,FPe)=>{"use strict";var xIt=ox();function bIt(e){return e?xIt(e):[0,0,0,1]}FPe.exports=bIt});var a1=ye((vgr,VPe)=>{"use strict";var NPe=Eo(),wIt=fd(),tF=ox(),rF=tc(),TIt=Ih().defaultLine,zPe=vv().isArrayOrTypedArray,AX=tF(TIt),UPe=1;function qPe(e,t){var r=e;return r[3]*=t,r}function OPe(e){if(NPe(e))return AX;var t=tF(e);return t.length?t:AX}function BPe(e){return NPe(e)?e:UPe}function AIt(e,t,r){var n=e.color;n&&n._inputArray&&(n=n._inputArray);var i=zPe(n),a=zPe(t),o=rF.extractOpts(e),s=[],l,u,c,f,h;if(o.colorscale!==void 0?l=rF.makeColorScaleFuncFromTrace(e):l=OPe,i?u=function(v,m){return v[m]===void 0?AX:tF(l(v[m]))}:u=OPe,a?c=function(v,m){return v[m]===void 0?UPe:BPe(v[m])}:c=BPe,i||a)for(var d=0;d{"use strict";GPe.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}});var iF=ye((ggr,HPe)=>{"use strict";HPe.exports={circle:"\u25CF","circle-open":"\u25CB",square:"\u25A0","square-open":"\u25A1",diamond:"\u25C6","diamond-open":"\u25C7",cross:"+",x:"\u274C"}});var WPe=ye((mgr,jPe)=>{"use strict";var MIt=Oa();function MX(e,t,r,n){if(!t||!t.visible)return null;for(var i=MIt.getComponentMethod("errorbars","makeComputeError")(t),a=new Array(e.length),o=0;o0){var f=n.c2l(u);n._lowerLogErrorBound||(n._lowerLogErrorBound=f),n._lowerErrorBound=Math.min(n._lowerLogErrorBound,f)}}else a[o]=[-s[0]*r,s[1]*r]}return a}function EIt(e){for(var t=0;t{"use strict";var CIt=zd().gl_line3d,XPe=zd().gl_scatter3d,LIt=zd().gl_error3d,PIt=zd().gl_mesh3d,IIt=zd().delaunay_triangulate,o1=Pr(),$Pe=n1(),nF=a1().formatColor,RIt=O3(),EX=SX(),DIt=iF(),FIt=ho(),zIt=ip().appendArrayPointValue,qIt=WPe();function QPe(e,t){this.scene=e,this.uid=t,this.linePlot=null,this.scatterPlot=null,this.errorBars=null,this.textMarkers=null,this.delaunayMesh=null,this.color=null,this.mode="",this.dataPoints=[],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.textLabels=null,this.data=null}var CX=QPe.prototype;CX.handlePick=function(e){if(e.object&&(e.object===this.linePlot||e.object===this.delaunayMesh||e.object===this.textMarkers||e.object===this.scatterPlot)){var t=e.index=e.data.index;return e.object.highlight&&e.object.highlight(null),this.scatterPlot&&(e.object=this.scatterPlot,this.scatterPlot.highlight(e.data)),e.textLabel="",this.textLabels&&(o1.isArrayOrTypedArray(this.textLabels)?(this.textLabels[t]||this.textLabels[t]===0)&&(e.textLabel=this.textLabels[t]):e.textLabel=this.textLabels),e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]],!0}};function OIt(e,t,r){var n=(r+1)%3,i=(r+2)%3,a=[],o=[],s;for(s=0;s-1?-1:e.indexOf("right")>-1?1:0}function YPe(e){return e==null?0:e.indexOf("top")>-1?-1:e.indexOf("bottom")>-1?1:0}function NIt(e){var t=0,r=0,n=[t,r];if(Array.isArray(e))for(var i=0;i=0){var u=OIt(s.position,s.delaunayColor,s.delaunayAxis);u.opacity=e.opacity,this.delaunayMesh?this.delaunayMesh.update(u):(u.gl=t,this.delaunayMesh=PIt(u),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)};CX.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())};function HIt(e,t){var r=new QPe(e,t.uid);return r.update(t),r}eIe.exports=HIt});var DX=ye((_gr,aIe)=>{"use strict";var s1=pf(),jIt=ec(),RX=Tu(),LX=df().axisHoverFormat,{hovertemplateAttrs:WIt,texttemplateAttrs:XIt,templatefallbackAttrs:rIe}=Ll(),iIe=Gl(),ZIt=SX(),YIt=iF(),$g=Ao().extendFlat,KIt=mc().overrideAll,nIe=t_(),JIt=s1.line,J2=s1.marker,$It=J2.line,QIt=$g({width:JIt.width,dash:{valType:"enumerated",values:nIe(ZIt),dflt:"solid"}},RX("line"));function PX(e){return{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}}}var IX=aIe.exports=KIt({x:s1.x,y:s1.y,z:{valType:"data_array"},text:$g({},s1.text,{}),texttemplate:XIt(),texttemplatefallback:rIe({editType:"calc"}),hovertext:$g({},s1.hovertext,{}),hovertemplate:WIt(),hovertemplatefallback:rIe(),xhoverformat:LX("x"),yhoverformat:LX("y"),zhoverformat:LX("z"),mode:$g({},s1.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:PX("x"),y:PX("y"),z:PX("z")},connectgaps:s1.connectgaps,line:QIt,marker:$g({symbol:{valType:"enumerated",values:nIe(YIt),dflt:"circle",arrayOk:!0},size:$g({},J2.size,{dflt:8}),sizeref:J2.sizeref,sizemin:J2.sizemin,sizemode:J2.sizemode,opacity:$g({},J2.opacity,{arrayOk:!1}),colorbar:J2.colorbar,line:$g({width:$g({},$It.width,{arrayOk:!1})},RX("marker.line"))},RX("marker")),textposition:$g({},s1.textposition,{dflt:"top center"}),textfont:jIt({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:iIe.opacity,hoverinfo:$g({},iIe.hoverinfo)},"calc","nested");IX.x.editType=IX.y.editType=IX.z.editType="calc+clearAxisTypes"});var lIe=ye((xgr,sIe)=>{"use strict";var oIe=Oa(),e8t=Pr(),FX=Ru(),t8t=$p(),r8t=D0(),i8t=F0(),n8t=DX();sIe.exports=function(t,r,n,i){function a(d,v){return e8t.coerce(t,r,n8t,d,v)}var o=a8t(t,r,a,i);if(!o){r.visible=!1;return}a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),a("mode"),FX.hasMarkers(r)&&t8t(t,r,n,i,a,{noAngle:!0,noLineDash:!0,noSelect:!0}),FX.hasLines(r)&&(a("connectgaps"),r8t(t,r,n,i,a)),FX.hasText(r)&&(a("texttemplate"),a("texttemplatefallback"),i8t(t,r,i,a,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var s=(r.line||{}).color,l=(r.marker||{}).color;a("surfaceaxis")>=0&&a("surfacecolor",s||l);for(var u=["x","y","z"],c=0;c<3;++c){var f="projection."+u[c];a(f+".show")&&(a(f+".opacity"),a(f+".scale"))}var h=oIe.getComponentMethod("errorbars","supplyDefaults");h(t,r,s||l||n,{axis:"z"}),h(t,r,s||l||n,{axis:"y",inherit:"z"}),h(t,r,s||l||n,{axis:"x",inherit:"z"})};function a8t(e,t,r,n){var i=0,a=r("x"),o=r("y"),s=r("z"),l=oIe.getComponentMethod("calendars","handleTraceDefaults");return l(e,t,["x","y","z"],n),a&&o&&s&&(i=Math.min(a.length,o.length,s.length),t._length=t._xlength=t._ylength=t._zlength=i),i}});var cIe=ye((bgr,uIe)=>{"use strict";var o8t=Rm(),s8t=z0();uIe.exports=function(t,r){var n=[{x:!1,y:!1,trace:r,t:{}}];return o8t(n,r),s8t(t,r),n}});var hIe=ye((wgr,fIe)=>{fIe.exports=l8t;function l8t(e,t){if(typeof e!="string")throw new TypeError("must specify type string");if(t=t||{},typeof document=="undefined"&&!t.canvas)return null;var r=t.canvas||document.createElement("canvas");typeof t.width=="number"&&(r.width=t.width),typeof t.height=="number"&&(r.height=t.height);var n=t,i;try{var a=[e];e.indexOf("webgl")===0&&a.push("experimental-"+e);for(var o=0;o{var u8t=hIe();dIe.exports=function(t){return u8t("webgl",t)}});var zX=ye((Agr,gIe)=>{"use strict";var pIe=ka(),c8t=function(){};gIe.exports=function(t){for(var r in t)typeof t[r]=="function"&&(t[r]=c8t);t.destroy=function(){t.container.parentNode.removeChild(t.container)};var n=document.createElement("div");n.className="no-webgl",n.style.cursor="pointer",n.style.fontSize="24px",n.style.color=pIe.defaults[0],n.style.position="absolute",n.style.left=n.style.top="0px",n.style.width=n.style.height="100%",n.style["background-color"]=pIe.lightLine,n.style["z-index"]=30;var i=document.createElement("p");return i.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",i.style.position="relative",i.style.top="50%",i.style.left="50%",i.style.height="30%",i.style.width="50%",i.style.margin="-15% 0 0 -25%",n.appendChild(i),t.container.appendChild(n),t.container.style.background="#FFFFFF",t.container.onclick=function(){window.open("https://get.webgl.org")},!1}});var _Ie=ye((Sgr,yIe)=>{"use strict";var $2=n1(),f8t=Pr(),h8t=["xaxis","yaxis","zaxis"];function mIe(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickFontWeight=["normal","normal","normal","normal"],this.tickFontStyle=["normal","normal","normal","normal"],this.tickFontVariant=["normal","normal","normal","normal"],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["Open Sans","Open Sans","Open Sans"],this.labelSize=[20,20,20],this.labelFontWeight=["normal","normal","normal","normal"],this.labelFontStyle=["normal","normal","normal","normal"],this.labelFontVariant=["normal","normal","normal","normal"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[10,10,10],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}var d8t=mIe.prototype;d8t.merge=function(e,t){for(var r=this,n=0;n<3;++n){var i=t[h8t[n]];if(!i.visible){r.tickEnable[n]=!1,r.labelEnable[n]=!1,r.lineEnable[n]=!1,r.lineTickEnable[n]=!1,r.gridEnable[n]=!1,r.zeroEnable[n]=!1,r.backgroundEnable[n]=!1;continue}r.labels[n]=e._meta?f8t.templateString(i.title.text,e._meta):i.title.text,"font"in i.title&&(i.title.font.color&&(r.labelColor[n]=$2(i.title.font.color)),i.title.font.family&&(r.labelFont[n]=i.title.font.family),i.title.font.size&&(r.labelSize[n]=i.title.font.size),i.title.font.weight&&(r.labelFontWeight[n]=i.title.font.weight),i.title.font.style&&(r.labelFontStyle[n]=i.title.font.style),i.title.font.variant&&(r.labelFontVariant[n]=i.title.font.variant)),"showline"in i&&(r.lineEnable[n]=i.showline),"linecolor"in i&&(r.lineColor[n]=$2(i.linecolor)),"linewidth"in i&&(r.lineWidth[n]=i.linewidth),"showgrid"in i&&(r.gridEnable[n]=i.showgrid),"gridcolor"in i&&(r.gridColor[n]=$2(i.gridcolor)),"gridwidth"in i&&(r.gridWidth[n]=i.gridwidth),i.type==="log"?r.zeroEnable[n]=!1:"zeroline"in i&&(r.zeroEnable[n]=i.zeroline),"zerolinecolor"in i&&(r.zeroLineColor[n]=$2(i.zerolinecolor)),"zerolinewidth"in i&&(r.zeroLineWidth[n]=i.zerolinewidth),"ticks"in i&&i.ticks?r.lineTickEnable[n]=!0:r.lineTickEnable[n]=!1,"ticklen"in i&&(r.lineTickLength[n]=r._defaultLineTickLength[n]=i.ticklen),"tickcolor"in i&&(r.lineTickColor[n]=$2(i.tickcolor)),"tickwidth"in i&&(r.lineTickWidth[n]=i.tickwidth),"tickangle"in i&&(r.tickAngle[n]=i.tickangle==="auto"?-3600:Math.PI*-i.tickangle/180),"showticklabels"in i&&(r.tickEnable[n]=i.showticklabels),"tickfont"in i&&(i.tickfont.color&&(r.tickColor[n]=$2(i.tickfont.color)),i.tickfont.family&&(r.tickFont[n]=i.tickfont.family),i.tickfont.size&&(r.tickSize[n]=i.tickfont.size),i.tickfont.weight&&(r.tickFontWeight[n]=i.tickfont.weight),i.tickfont.style&&(r.tickFontStyle[n]=i.tickfont.style),i.tickfont.variant&&(r.tickFontVariant[n]=i.tickfont.variant)),"mirror"in i?["ticks","all","allticks"].indexOf(i.mirror)!==-1?(r.lineTickMirror[n]=!0,r.lineMirror[n]=!0):i.mirror===!0?(r.lineTickMirror[n]=!1,r.lineMirror[n]=!0):(r.lineTickMirror[n]=!1,r.lineMirror[n]=!1):r.lineMirror[n]=!1,"showbackground"in i&&i.showbackground!==!1?(r.backgroundEnable[n]=!0,r.backgroundColor[n]=$2(i.backgroundcolor)):r.backgroundEnable[n]=!1}};function v8t(e,t){var r=new mIe;return r.merge(e,t),r}yIe.exports=v8t});var wIe=ye((Mgr,bIe)=>{"use strict";var p8t=n1(),g8t=["xaxis","yaxis","zaxis"];function xIe(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}var m8t=xIe.prototype;m8t.merge=function(e){for(var t=0;t<3;++t){var r=e[g8t[t]];if(!r.visible){this.enabled[t]=!1,this.drawSides[t]=!1;continue}this.enabled[t]=r.showspikes,this.colors[t]=p8t(r.spikecolor),this.drawSides[t]=r.spikesides,this.lineWidth[t]=r.spikethickness}};function y8t(e){var t=new xIe;return t.merge(e),t}bIe.exports=y8t});var SIe=ye((Egr,AIe)=>{"use strict";AIe.exports=T8t;var TIe=ho(),_8t=Pr(),x8t=["xaxis","yaxis","zaxis"],b8t=[0,0,0];function w8t(e){for(var t=new Array(3),r=0;r<3;++r){for(var n=e[r],i=new Array(n.length),a=0;a/g," "));i[a]=u,o.tickmode=s}}t.ticks=i;for(var a=0;a<3;++a){b8t[a]=.5*(e.glplot.bounds[0][a]+e.glplot.bounds[1][a]);for(var c=0;c<2;++c)t.bounds[c][a]=e.glplot.bounds[c][a]}e.contourLevels=w8t(i)}});var IIe=ye((kgr,PIe)=>{"use strict";var kIe=zd().gl_plot3d,A8t=kIe.createCamera,MIe=kIe.createScene,S8t=vIe(),M8t=UL(),sF=Oa(),cp=Pr(),oF=cp.preserveDrawingBuffer(),lF=ho(),Qg=vf(),E8t=n1(),k8t=zX(),C8t=XU(),L8t=_Ie(),P8t=wIe(),I8t=SIe(),R8t=Mg().applyAutorangeOptions,ik,aF,CIe=!1;function LIe(e,t){var r=document.createElement("div"),n=e.container;this.graphDiv=e.graphDiv;var i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.style.position="absolute",i.style.top=i.style.left="0px",i.style.width=i.style.height="100%",i.style["z-index"]=20,i.style["pointer-events"]="none",r.appendChild(i),this.svgContainer=i,r.id=e.id,r.style.position="absolute",r.style.top=r.style.left="0px",r.style.width=r.style.height="100%",n.appendChild(r),this.fullLayout=t,this.id=e.id||"scene",this.fullSceneLayout=t[this.id],this.plotArgs=[[],{},{}],this.axesOptions=L8t(t,t[this.id]),this.spikeOptions=P8t(t[this.id]),this.container=r,this.staticMode=!!e.staticPlot,this.pixelRatio=this.pixelRatio||e.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=sF.getComponentMethod("annotations3d","convert"),this.drawAnnotations=sF.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var Sv=LIe.prototype;Sv.prepareOptions=function(){var e=this,t={canvas:e.canvas,gl:e.gl,glOptions:{preserveDrawingBuffer:oF,premultipliedAlpha:!0,antialias:!0},container:e.container,axes:e.axesOptions,spikes:e.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:e.camera,pixelRatio:e.pixelRatio};if(e.staticMode){if(!aF&&(ik=document.createElement("canvas"),aF=S8t({canvas:ik,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!aF))throw new Error("error creating static canvas/context for image server");t.gl=aF,t.canvas=ik}return t};var EIe=!0;Sv.tryCreatePlot=function(){var e=this,t=e.prepareOptions(),r=!0;try{e.glplot=MIe(t)}catch(n){if(e.staticMode||!EIe||oF)r=!1;else{cp.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{oF=t.glOptions.preserveDrawingBuffer=!0,e.glplot=MIe(t)}catch(i){oF=t.glOptions.preserveDrawingBuffer=!1,r=!1}}}return EIe=!1,r};Sv.initializeGLCamera=function(){var e=this,t=e.fullSceneLayout.camera,r=t.projection.type==="orthographic";e.camera=A8t(e.container,{center:[t.center.x,t.center.y,t.center.z],eye:[t.eye.x,t.eye.y,t.eye.z],up:[t.up.x,t.up.y,t.up.z],_ortho:r,zoomMin:.01,zoomMax:100,mode:"orbit"})};Sv.initializeGLPlot=function(){var e=this;e.initializeGLCamera();var t=e.tryCreatePlot();if(!t)return k8t(e);e.traces={},e.make4thDimension();var r=e.graphDiv,n=r.layout,i=function(){var o={};return e.isCameraChanged(n)&&(o[e.id+".camera"]=e.getCamera()),e.isAspectChanged(n)&&(o[e.id+".aspectratio"]=e.glplot.getAspectratio(),n[e.id].aspectmode!=="manual"&&(e.fullSceneLayout.aspectmode=n[e.id].aspectmode=o[e.id+".aspectmode"]="manual")),o},a=function(o){if(o.fullSceneLayout.dragmode!==!1){var s=i();o.saveLayout(n),o.graphDiv.emit("plotly_relayout",s)}};return e.glplot.canvas&&(e.glplot.canvas.addEventListener("mouseup",function(){a(e)}),e.glplot.canvas.addEventListener("touchstart",function(){CIe=!0}),e.glplot.canvas.addEventListener("wheel",function(o){if(r._context._scrollZoom.gl3d){if(e.camera._ortho){var s=o.deltaX>o.deltaY?1.1:.9090909090909091,l=e.glplot.getAspectratio();e.glplot.setAspectratio({x:s*l.x,y:s*l.y,z:s*l.z})}a(e)}},M8t?{passive:!1}:!1),e.glplot.canvas.addEventListener("mousemove",function(){if(e.fullSceneLayout.dragmode!==!1&&e.camera.mouseListener.buttons!==0){var o=i();e.graphDiv.emit("plotly_relayouting",o)}}),e.staticMode||e.glplot.canvas.addEventListener("webglcontextlost",function(o){r&&r.emit&&r.emit("plotly_webglcontextlost",{event:o,layer:e.id})},!1)),e.glplot.oncontextloss=function(){e.recoverContext()},e.glplot.onrender=function(){e.render()},!0};Sv.render=function(){var e=this,t=e.graphDiv,r,n=e.svgContainer,i=e.container.getBoundingClientRect();t._fullLayout._calcInverseTransform(t);var a=t._fullLayout._invScaleX,o=t._fullLayout._invScaleY,s=i.width*a,l=i.height*o;n.setAttributeNS(null,"viewBox","0 0 "+s+" "+l),n.setAttributeNS(null,"width",s),n.setAttributeNS(null,"height",l),I8t(e),e.glplot.axes.update(e.axesOptions);for(var u=Object.keys(e.traces),c=null,f=e.glplot.selection,h=0;h")):r.type==="isosurface"||r.type==="volume"?(p.valueLabel=lF.hoverLabelText(e._mockAxis,e._mockAxis.d2l(f.traceCoordinate[3]),r.valuehoverformat),x.push("value: "+p.valueLabel),f.textLabel&&x.push(f.textLabel),L=x.join("
")):L=f.textLabel;var C={x:f.traceCoordinate[0],y:f.traceCoordinate[1],z:f.traceCoordinate[2],data:m._input,fullData:m,curveNumber:m.index,pointNumber:b};Qg.appendArrayPointValue(C,m,b),r._module.eventData&&(C=m._module.eventData(C,f,m,{},b));var S={points:[C]};if(e.fullSceneLayout.hovermode){var g=[];Qg.loneHover({trace:m,x:(.5+.5*v[0]/v[3])*s,y:(.5-.5*v[1]/v[3])*l,xLabel:p.xLabel,yLabel:p.yLabel,zLabel:p.zLabel,text:L,name:c.name,color:Qg.castHoverOption(m,b,"bgcolor")||c.color,borderColor:Qg.castHoverOption(m,b,"bordercolor"),fontFamily:Qg.castHoverOption(m,b,"font.family"),fontSize:Qg.castHoverOption(m,b,"font.size"),fontColor:Qg.castHoverOption(m,b,"font.color"),nameLength:Qg.castHoverOption(m,b,"namelength"),textAlign:Qg.castHoverOption(m,b,"align"),hovertemplate:cp.castOption(m,b,"hovertemplate"),hovertemplateLabels:cp.extendFlat({},C,p),eventData:[C]},{container:n,gd:t,inOut_bbox:g}),C.bbox=g[0]}f.distance<5&&(f.buttons||CIe)?t.emit("plotly_click",S):t.emit("plotly_hover",S),this.oldEventData=S}else Qg.loneUnhover(n),this.oldEventData&&t.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)};Sv.recoverContext=function(){var e=this;e.glplot.dispose();var t=function(){if(e.glplot.gl.isContextLost()){requestAnimationFrame(t);return}if(!e.initializeGLPlot()){cp.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}e.plot.apply(e,e.plotArgs)};requestAnimationFrame(t)};var nk=["xaxis","yaxis","zaxis"];function D8t(e,t,r){for(var n=e.fullSceneLayout,i=0;i<3;i++){var a=nk[i],o=a.charAt(0),s=n[a],l=t[o],u=t[o+"calendar"],c=t["_"+o+"length"];if(!cp.isArrayOrTypedArray(l))r[0][i]=Math.min(r[0][i],0),r[1][i]=Math.max(r[1][i],c-1);else for(var f,h=0;h<(c||l.length);h++)if(cp.isArrayOrTypedArray(l[h]))for(var d=0;dm[1][o])m[0][o]=-1,m[1][o]=1;else{var E=m[1][o]-m[0][o];m[0][o]-=E/32,m[1][o]+=E/32}if(k=[m[0][o],m[1][o]],k=R8t(k,l),m[0][o]=k[0],m[1][o]=k[1],l.isReversed()){var z=m[0][o];m[0][o]=m[1][o],m[1][o]=z}}else k=l.range,m[0][o]=l.r2l(k[0]),m[1][o]=l.r2l(k[1]);m[0][o]===m[1][o]&&(m[0][o]-=1,m[1][o]+=1),b[o]=m[1][o]-m[0][o],l.range=[m[0][o],m[1][o]],l.limitRange(),n.glplot.setBounds(o,{min:l.range[0]*d[o],max:l.range[1]*d[o]})}var q,U=c.aspectmode;if(U==="cube")q=[1,1,1];else if(U==="manual"){var G=c.aspectratio;q=[G.x,G.y,G.z]}else if(U==="auto"||U==="data"){var Z=[1,1,1];for(o=0;o<3;++o){l=c[nk[o]],u=l.type;var j=p[u];Z[o]=Math.pow(j.acc,1/j.count)/d[o]}U==="data"||Math.max.apply(null,Z)/Math.min.apply(null,Z)<=4?q=Z:q=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");c.aspectratio.x=f.aspectratio.x=q[0],c.aspectratio.y=f.aspectratio.y=q[1],c.aspectratio.z=f.aspectratio.z=q[2],n.glplot.setAspectratio(c.aspectratio),n.viewInitial.aspectratio||(n.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),n.viewInitial.aspectmode||(n.viewInitial.aspectmode=c.aspectmode);var N=c.domain||null,H=t._size||null;if(N&&H){var re=n.container.style;re.position="absolute",re.left=H.l+N.x[0]*H.w+"px",re.top=H.t+(1-N.y[1])*H.h+"px",re.width=H.w*(N.x[1]-N.x[0])+"px",re.height=H.h*(N.y[1]-N.y[0])+"px"}n.glplot.redraw()}};Sv.destroy=function(){var e=this;e.glplot&&(e.camera.mouseListener.enabled=!1,e.container.removeEventListener("wheel",e.camera.wheelListener),e.camera=null,e.glplot.dispose(),e.container.parentNode.removeChild(e.container),e.glplot=null)};function z8t(e){return[[e.eye.x,e.eye.y,e.eye.z],[e.center.x,e.center.y,e.center.z],[e.up.x,e.up.y,e.up.z]]}function q8t(e){return{up:{x:e.up[0],y:e.up[1],z:e.up[2]},center:{x:e.center[0],y:e.center[1],z:e.center[2]},eye:{x:e.eye[0],y:e.eye[1],z:e.eye[2]},projection:{type:e._ortho===!0?"orthographic":"perspective"}}}Sv.getCamera=function(){var e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),q8t(e.camera)};Sv.setViewport=function(e){var t=this,r=e.camera;t.camera.lookAt.apply(this,z8t(r)),t.glplot.setAspectratio(e.aspectratio);var n=r.projection.type==="orthographic",i=t.camera._ortho;n!==i&&(t.glplot.redraw(),t.glplot.clearRGBA(),t.glplot.dispose(),t.initializeGLPlot())};Sv.isCameraChanged=function(e){var t=this,r=t.getCamera(),n=cp.nestedProperty(e,t.id+".camera"),i=n.get();function a(u,c,f,h){var d=["up","center","eye"],v=["x","y","z"];return c[d[f]]&&u[d[f]][v[h]]===c[d[f]][v[h]]}var o=!1;if(i===void 0)o=!0;else{for(var s=0;s<3;s++)for(var l=0;l<3;l++)if(!a(r,i,s,l)){o=!0;break}(!i.projection||r.projection&&r.projection.type!==i.projection.type)&&(o=!0)}return o};Sv.isAspectChanged=function(e){var t=this,r=t.glplot.getAspectratio(),n=cp.nestedProperty(e,t.id+".aspectratio"),i=n.get();return i===void 0||i.x!==r.x||i.y!==r.y||i.z!==r.z};Sv.saveLayout=function(e){var t=this,r=t.fullLayout,n,i,a,o,s,l,u=t.isCameraChanged(e),c=t.isAspectChanged(e),f=u||c;if(f){var h={};if(u&&(n=t.getCamera(),i=cp.nestedProperty(e,t.id+".camera"),a=i.get(),h[t.id+".camera"]=a),c&&(o=t.glplot.getAspectratio(),s=cp.nestedProperty(e,t.id+".aspectratio"),l=s.get(),h[t.id+".aspectratio"]=l),sF.call("_storeDirectGUIEdit",e,r._preGUI,h),u){i.set(n);var d=cp.nestedProperty(r,t.id+".camera");d.set(n)}if(c){s.set(o);var v=cp.nestedProperty(r,t.id+".aspectratio");v.set(o),t.glplot.redraw()}}return f};Sv.updateFx=function(e,t){var r=this,n=r.camera;if(n)if(e==="orbit")n.mode="orbit",n.keyBindingMode="rotate";else if(e==="turntable"){n.up=[0,0,1],n.mode="turntable",n.keyBindingMode="rotate";var i=r.graphDiv,a=i._fullLayout,o=r.fullSceneLayout.camera,s=o.up.x,l=o.up.y,u=o.up.z;if(u/Math.sqrt(s*s+l*l+u*u)<.999){var c=r.id+".camera.up",f={x:0,y:0,z:1},h={};h[c]=f;var d=i.layout;sF.call("_storeDirectGUIEdit",d,a._preGUI,h),o.up=f,cp.nestedProperty(d,c).set(f)}}else n.keyBindingMode=e;r.fullSceneLayout.hovermode=t};function O8t(e,t,r){for(var n=0,i=r-1;n0)for(var s=255/o,l=0;l<3;++l)e[a+l]=Math.min(s*e[a+l],255)}}Sv.toImage=function(e){var t=this;e||(e="png"),t.staticMode&&t.container.appendChild(ik),t.glplot.redraw();var r=t.glplot.gl,n=r.drawingBufferWidth,i=r.drawingBufferHeight;r.bindFramebuffer(r.FRAMEBUFFER,null);var a=new Uint8Array(n*i*4);r.readPixels(0,0,n,i,r.RGBA,r.UNSIGNED_BYTE,a),O8t(a,n,i),B8t(a,n,i);var o=document.createElement("canvas");o.width=n,o.height=i;var s=o.getContext("2d",{willReadFrequently:!0}),l=s.createImageData(n,i);l.data.set(a),s.putImageData(l,0,0);var u;switch(e){case"jpeg":u=o.toDataURL("image/jpeg");break;case"webp":u=o.toDataURL("image/webp");break;default:u=o.toDataURL("image/png")}return t.staticMode&&t.container.removeChild(ik),u};Sv.setConvert=function(){for(var e=this,t=0;t<3;t++){var r=e.fullSceneLayout[nk[t]];lF.setConvert(r,e.fullLayout),r.setScale=cp.noop}};Sv.make4thDimension=function(){var e=this,t=e.graphDiv,r=t._fullLayout;e._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},lF.setConvert(e._mockAxis,r)};PIe.exports=LIe});var DIe=ye((Cgr,RIe)=>{"use strict";RIe.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}});var OX=ye((Lgr,FIe)=>{"use strict";var N8t=ka(),xs=Rd(),qX=Ao().extendFlat,U8t=mc().overrideAll;FIe.exports=U8t({visible:xs.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:N8t.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:xs.color,categoryorder:xs.categoryorder,categoryarray:xs.categoryarray,title:{text:xs.title.text,font:xs.title.font},type:qX({},xs.type,{values:["-","linear","log","date","category"]}),autotypenumbers:xs.autotypenumbers,autorange:xs.autorange,autorangeoptions:{minallowed:xs.autorangeoptions.minallowed,maxallowed:xs.autorangeoptions.maxallowed,clipmin:xs.autorangeoptions.clipmin,clipmax:xs.autorangeoptions.clipmax,include:xs.autorangeoptions.include,editType:"plot"},rangemode:xs.rangemode,minallowed:xs.minallowed,maxallowed:xs.maxallowed,range:qX({},xs.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:xs.minor.tickmode,nticks:xs.nticks,tick0:xs.tick0,dtick:xs.dtick,tickvals:xs.tickvals,ticktext:xs.ticktext,ticks:xs.ticks,mirror:xs.mirror,ticklen:xs.ticklen,tickwidth:xs.tickwidth,tickcolor:xs.tickcolor,showticklabels:xs.showticklabels,labelalias:xs.labelalias,tickfont:xs.tickfont,tickangle:xs.tickangle,tickprefix:xs.tickprefix,showtickprefix:xs.showtickprefix,ticksuffix:xs.ticksuffix,showticksuffix:xs.showticksuffix,showexponent:xs.showexponent,exponentformat:xs.exponentformat,minexponent:xs.minexponent,separatethousands:xs.separatethousands,tickformat:xs.tickformat,tickformatstops:xs.tickformatstops,hoverformat:xs.hoverformat,showline:xs.showline,linecolor:xs.linecolor,linewidth:xs.linewidth,showgrid:xs.showgrid,gridcolor:qX({},xs.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:xs.gridwidth,zeroline:xs.zeroline,zerolinecolor:xs.zerolinecolor,zerolinewidth:xs.zerolinewidth},"plot","from-root")});var VX=ye((Pgr,zIe)=>{"use strict";var BX=OX(),V8t=Cc().attributes,NX=Ao().extendFlat,G8t=Pr().counterRegex;function UX(e,t,r){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}zIe.exports={_arrayAttrRegexps:[G8t("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:NX(UX(0,0,1),{}),center:NX(UX(0,0,0),{}),eye:NX(UX(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:V8t({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:BX,yaxis:BX,zaxis:BX,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot"}});var NIe=ye((Igr,BIe)=>{"use strict";var H8t=fd().mix,qIe=Pr(),j8t=vl(),W8t=OX(),X8t=PU(),Z8t=f4(),OIe=["xaxis","yaxis","zaxis"],Y8t=100*136/187;BIe.exports=function(t,r,n){var i,a;function o(u,c){return qIe.coerce(i,a,W8t,u,c)}for(var s=0;s{"use strict";var K8t=Pr(),J8t=ka(),$8t=Oa(),Q8t=q_(),eRt=NIe(),UIe=VX(),tRt=Id().getSubplotData,VIe="gl3d";GIe.exports=function(t,r,n){var i=r._basePlotModules.length>1;function a(o){if(!i){var s=K8t.validate(t[o],UIe[o]);if(s)return t[o]}}Q8t(t,r,n,{type:VIe,attributes:UIe,handleDefaults:rRt,fullLayout:r,font:r.font,fullData:n,getDfltFromLayout:a,autotypenumbersDflt:r.autotypenumbers,paper_bgcolor:r.paper_bgcolor,calendar:r.calendar})};function rRt(e,t,r,n){for(var i=r("bgcolor"),a=J8t.combine(i,n.paper_bgcolor),o=["up","center","eye"],s=0;s.999)&&(h="turntable")}else h="turntable";r("dragmode",h),r("hovermode",n.getDfltFromLayout("hovermode"))}});var sx=ye(fp=>{"use strict";var iRt=mc().overrideAll,nRt=W1(),aRt=IIe(),oRt=Id().getSubplotData,sRt=Pr(),lRt=Wp(),ZA="gl3d",GX="scene";fp.name=ZA;fp.attr=GX;fp.idRoot=GX;fp.idRegex=fp.attrRegex=sRt.counterRegex("scene");fp.attributes=DIe();fp.layoutAttributes=VX();fp.baseLayoutAttrOverrides=iRt({hoverlabel:nRt.hoverlabel},"plot","nested");fp.supplyLayoutDefaults=HIe();fp.plot=function(t){for(var r=t._fullLayout,n=t._fullData,i=r._subplots[ZA],a=0;a{"use strict";jIe.exports={plot:tIe(),attributes:DX(),markerSymbols:iF(),supplyDefaults:lIe(),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:cIe(),moduleType:"trace",name:"scatter3d",basePlotModule:sx(),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}});var ZIe=ye((zgr,XIe)=>{"use strict";XIe.exports=WIe()});var ak=ye((qgr,JIe)=>{"use strict";var YIe=ka(),uRt=Tu(),HX=df().axisHoverFormat,{hovertemplateAttrs:cRt,templatefallbackAttrs:fRt}=Ll(),KIe=Gl(),jX=Ao().extendFlat,hRt=mc().overrideAll;function WX(e){return{valType:"boolean",dflt:!1}}function XX(e){return{show:{valType:"boolean",dflt:!1},start:{valType:"number",dflt:null,editType:"plot"},end:{valType:"number",dflt:null,editType:"plot"},size:{valType:"number",dflt:null,min:0,editType:"plot"},project:{x:WX("x"),y:WX("y"),z:WX("z")},color:{valType:"color",dflt:YIe.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:YIe.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var ZX=JIe.exports=hRt(jX({z:{valType:"data_array"},x:{valType:"data_array"},y:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:cRt(),hovertemplatefallback:fRt(),xhoverformat:HX("x"),yhoverformat:HX("y"),zhoverformat:HX("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},uRt("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:XX("x"),y:XX("y"),z:XX("z")},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05,description:"Represents the level that incident rays are reflected in a single direction, causing shine."},roughness:{valType:"number",min:0,max:1,dflt:.5,description:"Alters specular reflection; the rougher the surface, the wider and less contrasty the shine."},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},hoverinfo:jX({},KIe.hoverinfo),showlegend:jX({},KIe.showlegend,{dflt:!1})}),"calc","nested");ZX.x.editType=ZX.y.editType=ZX.z.editType="calc+clearAxisTypes"});var KX=ye((Ogr,e8e)=>{"use strict";var dRt=Oa(),$Ie=Pr(),vRt=td(),pRt=ak(),YX=.1;function gRt(e,t){for(var r=[],n=32,i=0;i{"use strict";var t8e=gv();r8e.exports=function(t,r){r.surfacecolor?t8e(t,r,{vals:r.surfacecolor,containerStr:"",cLetter:"c"}):t8e(t,r,{vals:r.z,containerStr:"",cLetter:"c"})}});var u8e=ye((Ngr,l8e)=>{"use strict";var _Rt=zd().gl_surface3d,YA=zd().ndarray,xRt=zd().ndarray_linear_interpolate.d2,bRt=c8(),wRt=f8(),ok=Pr().isArrayOrTypedArray,TRt=a1().parseColorScale,n8e=n1(),ARt=tc().extractOpts;function o8e(e,t,r){this.scene=e,this.uid=r,this.surface=t,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var em=o8e.prototype;em.getXat=function(e,t,r,n){var i=ok(this.data.x)?ok(this.data.x[0])?this.data.x[t][e]:this.data.x[e]:e;return r===void 0?i:n.d2l(i,0,r)};em.getYat=function(e,t,r,n){var i=ok(this.data.y)?ok(this.data.y[0])?this.data.y[t][e]:this.data.y[t]:t;return r===void 0?i:n.d2l(i,0,r)};em.getZat=function(e,t,r,n){var i=this.data.z[t][e];return i===null&&this.data.connectgaps&&this.data._interpolatedZ&&(i=this.data._interpolatedZ[t][e]),r===void 0?i:n.d2l(i,0,r)};em.handlePick=function(e){if(e.object===this.surface){var t=(e.data.index[0]-1)/this.dataScaleX-1,r=(e.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(t),this.data.z[0].length-1),0),i=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);e.index=[n,i],e.traceCoordinate=[this.getXat(n,i),this.getYat(n,i),this.getZat(n,i)],e.dataCoordinate=[this.getXat(n,i,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(n,i,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(n,i,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var a=0;a<3;a++){var o=e.dataCoordinate[a];o!=null&&(e.dataCoordinate[a]*=this.scene.dataScale[a])}var s=this.data.hovertext||this.data.text;return ok(s)&&s[i]&&s[i][n]!==void 0?e.textLabel=s[i][n]:s?e.textLabel=s:e.textLabel="",e.data.dataCoordinate=e.dataCoordinate.slice(),this.surface.highlight(e.data),this.scene.glplot.spikes.position=e.dataCoordinate,!0}};function SRt(e){var t=e[0].rgb,r=e[e.length-1].rgb;return t[0]===r[0]&&t[1]===r[1]&&t[2]===r[2]&&t[3]===r[3]}var KA=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function MRt(e,t){if(e0){r=KA[n];break}return r}function kRt(e,t){if(!(e<1||t<1)){for(var r=JX(e),n=JX(t),i=1,a=0;auF;)n--,n/=ERt(n),n++,n1?i:1};function LRt(e,t,r){var n=r[8]+r[2]*t[0]+r[5]*t[1];return e[0]=(r[6]+r[0]*t[0]+r[3]*t[1])/n,e[1]=(r[7]+r[1]*t[0]+r[4]*t[1])/n,e}function PRt(e,t,r){return IRt(e,t,LRt,r),e}function IRt(e,t,r,n){for(var i=[0,0],a=e.shape[0],o=e.shape[1],s=0;s0&&this.contourStart[n]!==null&&this.contourEnd[n]!==null&&this.contourEnd[n]>this.contourStart[n]))for(t[n]=!0,i=this.contourStart[n];ih&&(this.minValues[u]=h),this.maxValues[u]{"use strict";c8e.exports={attributes:ak(),supplyDefaults:KX().supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:i8e(),plot:u8e(),moduleType:"trace",name:"surface",basePlotModule:sx(),categories:["gl3d","2dMap","showLegend"],meta:{}}});var d8e=ye((Vgr,h8e)=>{"use strict";h8e.exports=f8e()});var JA=ye((Ggr,p8e)=>{"use strict";var FRt=Tu(),$X=df().axisHoverFormat,{hovertemplateAttrs:zRt,templatefallbackAttrs:qRt}=Ll(),lx=ak(),v8e=Gl(),ux=Ao().extendFlat;p8e.exports=ux({x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},i:{valType:"data_array",editType:"calc"},j:{valType:"data_array",editType:"calc"},k:{valType:"data_array",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:zRt({editType:"calc"}),hovertemplatefallback:qRt({editType:"calc"}),xhoverformat:$X("x"),yhoverformat:$X("y"),zhoverformat:$X("z"),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"}},FRt("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:lx.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:ux({},lx.contours.x.show,{}),color:lx.contours.x.color,width:lx.contours.x.width,editType:"calc"},lightposition:{x:ux({},lx.lightposition.x,{dflt:1e5}),y:ux({},lx.lightposition.y,{dflt:1e5}),z:ux({},lx.lightposition.z,{dflt:0}),editType:"calc"},lighting:ux({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc",description:"Epsilon for vertex normals calculation avoids math issues arising from degenerate geometry."},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc",description:"Epsilon for face normals calculation avoids math issues arising from degenerate geometry."},editType:"calc"},lx.lighting),hoverinfo:ux({},v8e.hoverinfo,{editType:"calc"}),showlegend:ux({},v8e.showlegend,{dflt:!1})})});var fF=ye((Hgr,m8e)=>{"use strict";var ORt=Tu(),cF=df().axisHoverFormat,{hovertemplateAttrs:BRt,templatefallbackAttrs:NRt}=Ll(),sk=JA(),g8e=Gl(),QX=Ao().extendFlat,URt=mc().overrideAll;function eZ(e){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function tZ(e){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var $A=m8e.exports=URt(QX({x:{valType:"data_array"},y:{valType:"data_array"},z:{valType:"data_array"},value:{valType:"data_array"},isomin:{valType:"number"},isomax:{valType:"number"},surface:{show:{valType:"boolean",dflt:!0},count:{valType:"integer",dflt:2,min:1},fill:{valType:"number",min:0,max:1,dflt:1},pattern:{valType:"flaglist",flags:["A","B","C","D","E"],extras:["all","odd","even"],dflt:"all"}},spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:.15}},slices:{x:eZ("x"),y:eZ("y"),z:eZ("z")},caps:{x:tZ("x"),y:tZ("y"),z:tZ("z")},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:BRt(),hovertemplatefallback:NRt(),xhoverformat:cF("x"),yhoverformat:cF("y"),zhoverformat:cF("z"),valuehoverformat:cF("value",1),showlegend:QX({},g8e.showlegend,{dflt:!1})},ORt("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:sk.opacity,lightposition:sk.lightposition,lighting:sk.lighting,flatshading:sk.flatshading,contour:sk.contour,hoverinfo:QX({},g8e.hoverinfo)}),"calc","nested");$A.flatshading.dflt=!0;$A.lighting.facenormalsepsilon.dflt=0;$A.x.editType=$A.y.editType=$A.z.editType=$A.value.editType="calc+clearAxisTypes"});var rZ=ye((jgr,_8e)=>{"use strict";var VRt=Pr(),GRt=Oa(),HRt=fF(),jRt=td();function WRt(e,t,r,n){function i(a,o){return VRt.coerce(e,t,HRt,a,o)}y8e(e,t,r,n,i)}function y8e(e,t,r,n,i){var a=i("isomin"),o=i("isomax");o!=null&&a!==void 0&&a!==null&&a>o&&(t.isomin=null,t.isomax=null);var s=i("x"),l=i("y"),u=i("z"),c=i("value");if(!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length){t.visible=!1;return}var f=GRt.getComponentMethod("calendars","handleTraceDefaults");f(e,t,["x","y","z"],n),i("valuehoverformat"),["x","y","z"].forEach(function(m){i(m+"hoverformat");var b="caps."+m,p=i(b+".show");p&&i(b+".fill");var k="slices."+m,M=i(k+".show");M&&(i(k+".fill"),i(k+".locations"))});var h=i("spaceframe.show");h&&i("spaceframe.fill");var d=i("surface.show");d&&(i("surface.count"),i("surface.fill"),i("surface.pattern"));var v=i("contour.show");v&&(i("contour.color"),i("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach(function(m){i(m)}),jRt(e,t,n,i,{prefix:"",cLetter:"c"}),t._length=null}_8e.exports={supplyDefaults:WRt,supplyIsoDefaults:y8e}});var hF=ye((Wgr,b8e)=>{"use strict";var nZ=Pr(),XRt=gv();function ZRt(e,t){t._len=Math.min(t.u.length,t.v.length,t.w.length,t.x.length,t.y.length,t.z.length),t._u=Jm(t.u,t._len),t._v=Jm(t.v,t._len),t._w=Jm(t.w,t._len),t._x=Jm(t.x,t._len),t._y=Jm(t.y,t._len),t._z=Jm(t.z,t._len);var r=x8e(t);t._gridFill=r.fill,t._Xs=r.Xs,t._Ys=r.Ys,t._Zs=r.Zs,t._len=r.len;var n=0,i,a,o;t.starts&&(i=Jm(t.starts.x||[]),a=Jm(t.starts.y||[]),o=Jm(t.starts.z||[]),n=Math.min(i.length,a.length,o.length)),t._startsX=i||[],t._startsY=a||[],t._startsZ=o||[];var s=0,l=1/0,u;for(u=0;u1&&(M=t[i-1],L=r[i-1],C=n[i-1]),a=0;aM?"-":"+")+"x"),v=v.replace("y",(T>L?"-":"+")+"y"),v=v.replace("z",(x>C?"-":"+")+"z");var E=function(){i=0,S=[],g=[],P=[]};(!i||i{"use strict";var YRt=gv(),KRt=hF().processGrid,dF=hF().filter;w8e.exports=function(t,r){r._len=Math.min(r.x.length,r.y.length,r.z.length,r.value.length),r._x=dF(r.x,r._len),r._y=dF(r.y,r._len),r._z=dF(r.z,r._len),r._value=dF(r.value,r._len);var n=KRt(r);r._gridFill=n.fill,r._Xs=n.Xs,r._Ys=n.Ys,r._Zs=n.Zs,r._len=n.len;for(var i=1/0,a=-1/0,o=0;o{"use strict";T8e.exports=function(t,r,n,i){i=i||t.length;for(var a=new Array(i),o=0;o{"use strict";var JRt=zd().gl_mesh3d,$Rt=a1().parseColorScale,QRt=Pr().isArrayOrTypedArray,eDt=n1(),tDt=tc().extractOpts,A8e=QA(),lk=function(e,t){for(var r=t.length-1;r>0;r--){var n=Math.min(t[r],t[r-1]),i=Math.max(t[r],t[r-1]);if(i>n&&n-1}function oe(St,Tt){return St===null?Tt:St}function _e(St,Tt,dt){E();var Et=[Tt],pt=[dt];if(j>=1)Et=[Tt],pt=[dt];else if(j>0){var Xt=H(Tt,dt);Et=Xt.xyzv,pt=Xt.abc}for(var or=0;or-1?dt[Er]:P(ei,qr,jr);Ge>-1?_r[Er]=Ge:_r[Er]=q(ei,qr,jr,oe(St,gt))}U(_r[0],_r[1],_r[2])}}function ke(St,Tt,dt){var Et=function(pt,Xt,or){_e(St,[Tt[pt],Tt[Xt],Tt[or]],[dt[pt],dt[Xt],dt[or]])};Et(0,1,2),Et(2,3,0)}function Ce(St,Tt,dt){var Et=function(pt,Xt,or){_e(St,[Tt[pt],Tt[Xt],Tt[or]],[dt[pt],dt[Xt],dt[or]])};Et(0,1,2),Et(3,0,1),Et(2,3,0),Et(1,2,3)}function ge(St,Tt,dt,Et){var pt=St[3];ptEt&&(pt=Et);for(var Xt=(St[3]-pt)/(St[3]-Tt[3]+1e-9),or=[],_r=0;_r<4;_r++)or[_r]=(1-Xt)*St[_r]+Xt*Tt[_r];return or}function ie(St,Tt,dt){return St>=Tt&&St<=dt}function Se(St){var Tt=.001*(L-T);return St>=T-Tt&&St<=L+Tt}function Ee(St){for(var Tt=[],dt=0;dt<4;dt++){var Et=St[dt];Tt.push([e._x[Et],e._y[Et],e._z[Et],e._value[Et]])}return Tt}var we=3;function De(St,Tt,dt,Et,pt,Xt){Xt||(Xt=1),dt=[-1,-1,-1];var or=!1,_r=[ie(Tt[0][3],Et,pt),ie(Tt[1][3],Et,pt),ie(Tt[2][3],Et,pt)];if(!_r[0]&&!_r[1]&&!_r[2])return!1;var Er=function(qr,jr,gt){return Se(jr[0][3])&&Se(jr[1][3])&&Se(jr[2][3])?(_e(qr,jr,gt),!0):Xt_r?[k,Xt]:[Xt,M];Ht(Tt,Er[0],Er[1])}}var ei=[[Math.min(T,M),Math.max(T,M)],[Math.min(k,L),Math.max(k,L)]];["x","y","z"].forEach(function(qr){for(var jr=[],gt=0;gt0&&(At.push(Sr.id),qr==="x"?Kt.push([Sr.distRatio,0,0]):qr==="y"?Kt.push([0,Sr.distRatio,0]):Kt.push([0,0,Sr.distRatio]))}else qr==="x"?xt=Ue(1,d-1):qr==="y"?xt=Ue(1,v-1):xt=Ue(1,m-1);At.length>0&&(qr==="x"?jr[Ge]=nr(St,At,Je,We,Kt,jr[Ge]):qr==="y"?jr[Ge]=tt(St,At,Je,We,Kt,jr[Ge]):jr[Ge]=je(St,At,Je,We,Kt,jr[Ge]),Ge++),xt.length>0&&(qr==="x"?jr[Ge]=mt(St,xt,Je,We,jr[Ge]):qr==="y"?jr[Ge]=Vt(St,xt,Je,We,jr[Ge]):jr[Ge]=st(St,xt,Je,We,jr[Ge]),Ge++)}var Gr=e.caps[qr];Gr.show&&Gr.fill&&(N(Gr.fill),qr==="x"?jr[Ge]=mt(St,[0,d-1],Je,We,jr[Ge]):qr==="y"?jr[Ge]=Vt(St,[0,v-1],Je,We,jr[Ge]):jr[Ge]=st(St,[0,m-1],Je,We,jr[Ge]),Ge++)}}),s===0&&z(),e._meshX=x,e._meshY=C,e._meshZ=S,e._meshIntensity=g,e._Xs=c,e._Ys=f,e._Zs=h}return rt(),e}function iDt(e,t){var r=e.glplot.gl,n=JRt({gl:r}),i=new S8e(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}E8e.exports={findNearestOnAxis:lk,generateIsoMeshes:M8e,createIsosurfaceTrace:iDt}});var C8e=ye((Kgr,k8e)=>{"use strict";k8e.exports={attributes:fF(),supplyDefaults:rZ().supplyDefaults,calc:aZ(),colorbar:{min:"cmin",max:"cmax"},plot:vF().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:sx(),categories:["gl3d","showLegend"],meta:{}}});var P8e=ye((Jgr,L8e)=>{"use strict";L8e.exports=C8e()});var lZ=ye(($gr,R8e)=>{"use strict";var nDt=Tu(),xh=fF(),aDt=ak(),I8e=Gl(),sZ=Ao().extendFlat,oDt=mc().overrideAll,pF=R8e.exports=oDt(sZ({x:xh.x,y:xh.y,z:xh.z,value:xh.value,isomin:xh.isomin,isomax:xh.isomax,surface:xh.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:xh.slices,caps:xh.caps,text:xh.text,hovertext:xh.hovertext,xhoverformat:xh.xhoverformat,yhoverformat:xh.yhoverformat,zhoverformat:xh.zhoverformat,valuehoverformat:xh.valuehoverformat,hovertemplate:xh.hovertemplate,hovertemplatefallback:xh.hovertemplatefallback},nDt("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:xh.colorbar,opacity:xh.opacity,opacityscale:aDt.opacityscale,lightposition:xh.lightposition,lighting:xh.lighting,flatshading:xh.flatshading,contour:xh.contour,hoverinfo:sZ({},I8e.hoverinfo),showlegend:sZ({},I8e.showlegend,{dflt:!1})}),"calc","nested");pF.x.editType=pF.y.editType=pF.z.editType=pF.value.editType="calc+clearAxisTypes"});var F8e=ye((Qgr,D8e)=>{"use strict";var sDt=Pr(),lDt=lZ(),uDt=rZ().supplyIsoDefaults,cDt=KX().opacityscaleDefaults;D8e.exports=function(t,r,n,i){function a(o,s){return sDt.coerce(t,r,lDt,o,s)}uDt(t,r,n,i,a),cDt(t,r,i,a)}});var B8e=ye((emr,O8e)=>{"use strict";var fDt=zd().gl_mesh3d,hDt=a1().parseColorScale,dDt=Pr().isArrayOrTypedArray,vDt=n1(),pDt=tc().extractOpts,z8e=QA(),uZ=vF().findNearestOnAxis,gDt=vF().generateIsoMeshes;function q8e(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.data=null,this.showContour=!1}var cZ=q8e.prototype;cZ.handlePick=function(e){if(e.object===this.mesh){var t=e.data.index,r=this.data._meshX[t],n=this.data._meshY[t],i=this.data._meshZ[t],a=this.data._Ys.length,o=this.data._Zs.length,s=uZ(r,this.data._Xs).id,l=uZ(n,this.data._Ys).id,u=uZ(i,this.data._Zs).id,c=e.index=u+o*l+o*a*s;e.traceCoordinate=[this.data._meshX[c],this.data._meshY[c],this.data._meshZ[c],this.data._value[c]];var f=this.data.hovertext||this.data.text;return dDt(f)&&f[c]!==void 0?e.textLabel=f[c]:f&&(e.textLabel=f),!0}};cZ.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=gDt(e);function n(l,u,c,f){return u.map(function(h){return l.d2l(h,0,f)*c})}var i=z8e(n(r.xaxis,e._meshX,t.dataScale[0],e.xcalendar),n(r.yaxis,e._meshY,t.dataScale[1],e.ycalendar),n(r.zaxis,e._meshZ,t.dataScale[2],e.zcalendar)),a=z8e(e._meshI,e._meshJ,e._meshK),o={positions:i,cells:a,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,opacityscale:e.opacityscale,contourEnable:e.contour.show,contourColor:vDt(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},s=pDt(e);o.vertexIntensity=e._meshIntensity,o.vertexIntensityBounds=[s.min,s.max],o.colormap=hDt(e),this.mesh.update(o)};cZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function mDt(e,t){var r=e.glplot.gl,n=fDt({gl:r}),i=new q8e(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}O8e.exports=mDt});var U8e=ye((tmr,N8e)=>{"use strict";N8e.exports={attributes:lZ(),supplyDefaults:F8e(),calc:aZ(),colorbar:{min:"cmin",max:"cmax"},plot:B8e(),moduleType:"trace",name:"volume",basePlotModule:sx(),categories:["gl3d","showLegend"],meta:{}}});var G8e=ye((rmr,V8e)=>{"use strict";V8e.exports=U8e()});var W8e=ye((imr,j8e)=>{"use strict";var yDt=Oa(),H8e=Pr(),_Dt=td(),xDt=JA();j8e.exports=function(t,r,n,i){function a(c,f){return H8e.coerce(t,r,xDt,c,f)}function o(c){var f=c.map(function(h){var d=a(h);return d&&H8e.isArrayOrTypedArray(d)?d:null});return f.every(function(h){return h&&h.length===f[0].length})&&f}var s=o(["x","y","z"]);if(!s){r.visible=!1;return}if(o(["i","j","k"]),r.i&&(!r.j||!r.k)||r.j&&(!r.k||!r.i)||r.k&&(!r.i||!r.j)){r.visible=!1;return}var l=yDt.getComponentMethod("calendars","handleTraceDefaults");l(t,r,["x","y","z"],i),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(c){a(c)});var u=a("contour.show");u&&(a("contour.color"),a("contour.width")),"intensity"in t?(a("intensity"),a("intensitymode"),_Dt(t,r,i,a,{prefix:"",cLetter:"c"})):(r.showscale=!1,"facecolor"in t?a("facecolor"):"vertexcolor"in t?a("vertexcolor"):a("color",n)),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var Z8e=ye((nmr,X8e)=>{"use strict";var bDt=gv();X8e.exports=function(t,r){r.intensity&&bDt(t,r,{vals:r.intensity,containerStr:"",cLetter:"c"})}});var Q8e=ye((amr,$8e)=>{"use strict";var wDt=zd().gl_mesh3d,TDt=zd().delaunay_triangulate,ADt=zd().alpha_shape,SDt=zd().convex_hull,MDt=a1().parseColorScale,EDt=Pr().isArrayOrTypedArray,vZ=n1(),kDt=tc().extractOpts,Y8e=QA();function J8e(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var pZ=J8e.prototype;pZ.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index;e.data._cellCenter?e.traceCoordinate=e.data.dataCoordinate:e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]];var r=this.data.hovertext||this.data.text;return EDt(r)&&r[t]!==void 0?e.textLabel=r[t]:r&&(e.textLabel=r),!0}};function K8e(e){for(var t=[],r=e.length,n=0;n=t-.5)return!1;return!0}pZ.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=e;var n=e.x.length,i=Y8e(fZ(r.xaxis,e.x,t.dataScale[0],e.xcalendar),fZ(r.yaxis,e.y,t.dataScale[1],e.ycalendar),fZ(r.zaxis,e.z,t.dataScale[2],e.zcalendar)),a;if(e.i&&e.j&&e.k){if(e.i.length!==e.j.length||e.j.length!==e.k.length||!dZ(e.i,n)||!dZ(e.j,n)||!dZ(e.k,n))return;a=Y8e(hZ(e.i),hZ(e.j),hZ(e.k))}else e.alphahull===0?a=SDt(i):e.alphahull>0?a=ADt(e.alphahull,i):a=CDt(e.delaunayaxis,i);var o={positions:i,cells:a,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,contourEnable:e.contour.show,contourColor:vZ(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading};if(e.intensity){var s=kDt(e);this.color="#fff";var l=e.intensitymode;o[l+"Intensity"]=e.intensity,o[l+"IntensityBounds"]=[s.min,s.max],o.colormap=MDt(e)}else e.vertexcolor?(this.color=e.vertexcolor[0],o.vertexColors=K8e(e.vertexcolor)):e.facecolor?(this.color=e.facecolor[0],o.cellColors=K8e(e.facecolor)):(this.color=e.color,o.meshColor=vZ(e.color));this.mesh.update(o)};pZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function LDt(e,t){var r=e.glplot.gl,n=wDt({gl:r}),i=new J8e(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}$8e.exports=LDt});var tRe=ye((omr,eRe)=>{"use strict";eRe.exports={attributes:JA(),supplyDefaults:W8e(),calc:Z8e(),colorbar:{min:"cmin",max:"cmax"},plot:Q8e(),moduleType:"trace",name:"mesh3d",basePlotModule:sx(),categories:["gl3d","showLegend"],meta:{}}});var iRe=ye((smr,rRe)=>{"use strict";rRe.exports=tRe()});var mZ=ye((lmr,aRe)=>{"use strict";var PDt=Tu(),e5=df().axisHoverFormat,{hovertemplateAttrs:IDt,templatefallbackAttrs:RDt}=Ll(),DDt=JA(),nRe=Gl(),gZ=Ao().extendFlat,gF={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute","raw"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:IDt({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:RDt({editType:"calc"}),uhoverformat:e5("u",1),vhoverformat:e5("v",1),whoverformat:e5("w",1),xhoverformat:e5("x"),yhoverformat:e5("y"),zhoverformat:e5("z"),showlegend:gZ({},nRe.showlegend,{dflt:!1})};gZ(gF,PDt("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var FDt=["opacity","lightposition","lighting"];FDt.forEach(function(e){gF[e]=DDt[e]});gF.hoverinfo=gZ({},nRe.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"});aRe.exports=gF});var sRe=ye((umr,oRe)=>{"use strict";var zDt=Pr(),qDt=td(),ODt=mZ();oRe.exports=function(t,r,n,i){function a(d,v){return zDt.coerce(t,r,ODt,d,v)}var o=a("u"),s=a("v"),l=a("w"),u=a("x"),c=a("y"),f=a("z");if(!o||!o.length||!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length||!f||!f.length){r.visible=!1;return}var h=a("sizemode");a("sizeref",h==="raw"?1:.5),a("anchor"),a("lighting.ambient"),a("lighting.diffuse"),a("lighting.specular"),a("lighting.roughness"),a("lighting.fresnel"),a("lightposition.x"),a("lightposition.y"),a("lightposition.z"),qDt(t,r,i,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var uRe=ye((cmr,lRe)=>{"use strict";var BDt=gv();lRe.exports=function(t,r){for(var n=r.u,i=r.v,a=r.w,o=Math.min(r.x.length,r.y.length,r.z.length,n.length,i.length,a.length),s=-1/0,l=1/0,u=0;u{"use strict";var NDt=zd().gl_cone3d,UDt=zd().gl_cone3d.createConeMesh,VDt=Pr().simpleMap,GDt=a1().parseColorScale,HDt=tc().extractOpts,jDt=Pr().isArrayOrTypedArray,cRe=QA();function fRe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var yZ=fRe.prototype;yZ.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index,r=this.data.x[t],n=this.data.y[t],i=this.data.z[t],a=this.data.u[t],o=this.data.v[t],s=this.data.w[t];e.traceCoordinate=[r,n,i,a,o,s,Math.sqrt(a*a+o*o+s*s)];var l=this.data.hovertext||this.data.text;return jDt(l)&&l[t]!==void 0?e.textLabel=l[t]:l&&(e.textLabel=l),!0}};var WDt={xaxis:0,yaxis:1,zaxis:2},XDt={tip:1,tail:0,cm:.25,center:.5},ZDt={tip:1,tail:1,cm:.75,center:.5};function hRe(e,t){var r=e.fullSceneLayout,n=e.dataScale,i={};function a(c,f){var h=r[f],d=n[WDt[f]];return VDt(c,function(v){return h.d2l(v)*d})}i.vectors=cRe(a(t.u,"xaxis"),a(t.v,"yaxis"),a(t.w,"zaxis"),t._len),i.positions=cRe(a(t.x,"xaxis"),a(t.y,"yaxis"),a(t.z,"zaxis"),t._len);var o=HDt(t);i.colormap=GDt(t),i.vertexIntensityBounds=[o.min/t._normMax,o.max/t._normMax],i.coneOffset=XDt[t.anchor];var s=t.sizemode;s==="scaled"?i.coneSize=t.sizeref||.5:s==="absolute"?i.coneSize=t.sizeref&&t._normMax?t.sizeref/t._normMax:.5:s==="raw"&&(i.coneSize=t.sizeref),i.coneSizemode=s;var l=NDt(i),u=t.lightposition;return l.lightPosition=[u.x,u.y,u.z],l.ambient=t.lighting.ambient,l.diffuse=t.lighting.diffuse,l.specular=t.lighting.specular,l.roughness=t.lighting.roughness,l.fresnel=t.lighting.fresnel,l.opacity=t.opacity,t._pad=ZDt[t.anchor]*l.vectorScale*l.coneScale*t._normMax,l}yZ.update=function(e){this.data=e;var t=hRe(this.scene,e);this.mesh.update(t)};yZ.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function YDt(e,t){var r=e.glplot.gl,n=hRe(e,t),i=UDt(r,n),a=new fRe(e,t.uid);return a.mesh=i,a.data=t,i._trace=a,e.glplot.add(i),a}dRe.exports=YDt});var gRe=ye((hmr,pRe)=>{"use strict";pRe.exports={moduleType:"trace",name:"cone",basePlotModule:sx(),categories:["gl3d","showLegend"],attributes:mZ(),supplyDefaults:sRe(),colorbar:{min:"cmin",max:"cmax"},calc:uRe(),plot:vRe(),eventData:function(e,t){return e.norm=t.traceCoordinate[6],e},meta:{}}});var yRe=ye((dmr,mRe)=>{"use strict";mRe.exports=gRe()});var xZ=ye((vmr,xRe)=>{"use strict";var KDt=Tu(),t5=df().axisHoverFormat,{hovertemplateAttrs:JDt,templatefallbackAttrs:$Dt}=Ll(),QDt=JA(),_Re=Gl(),_Z=Ao().extendFlat,mF={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},starts:{x:{valType:"data_array",editType:"calc"},y:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},editType:"calc"},maxdisplayed:{valType:"integer",min:0,dflt:1e3,editType:"calc"},sizeref:{valType:"number",editType:"calc",min:0,dflt:1},text:{valType:"string",dflt:"",editType:"calc"},hovertext:{valType:"string",dflt:"",editType:"calc"},hovertemplate:JDt({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),hovertemplatefallback:$Dt({editType:"calc"}),uhoverformat:t5("u",1),vhoverformat:t5("v",1),whoverformat:t5("w",1),xhoverformat:t5("x"),yhoverformat:t5("y"),zhoverformat:t5("z"),showlegend:_Z({},_Re.showlegend,{dflt:!1})};_Z(mF,KDt("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var eFt=["opacity","lightposition","lighting"];eFt.forEach(function(e){mF[e]=QDt[e]});mF.hoverinfo=_Z({},_Re.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"});xRe.exports=mF});var wRe=ye((pmr,bRe)=>{"use strict";var tFt=Pr(),rFt=td(),iFt=xZ();bRe.exports=function(t,r,n,i){function a(h,d){return tFt.coerce(t,r,iFt,h,d)}var o=a("u"),s=a("v"),l=a("w"),u=a("x"),c=a("y"),f=a("z");if(!o||!o.length||!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length||!f||!f.length){r.visible=!1;return}a("starts.x"),a("starts.y"),a("starts.z"),a("maxdisplayed"),a("sizeref"),a("lighting.ambient"),a("lighting.diffuse"),a("lighting.specular"),a("lighting.roughness"),a("lighting.fresnel"),a("lightposition.x"),a("lightposition.y"),a("lightposition.z"),rFt(t,r,i,a,{prefix:"",cLetter:"c"}),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("uhoverformat"),a("vhoverformat"),a("whoverformat"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),r._length=null}});var LRe=ye((gmr,CRe)=>{"use strict";var SRe=zd().gl_streamtube3d,nFt=SRe.createTubeMesh,aFt=Pr(),oFt=a1().parseColorScale,sFt=tc().extractOpts,TRe=QA(),MRe={xaxis:0,yaxis:1,zaxis:2};function ERe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var wZ=ERe.prototype;wZ.handlePick=function(e){var t=this.scene.fullSceneLayout,r=this.scene.dataScale;function n(o,s){var l=t[s],u=r[MRe[s]];return l.l2c(o)/u}if(e.object===this.mesh){var i=e.data.position,a=e.data.velocity;return e.traceCoordinate=[n(i[0],"xaxis"),n(i[1],"yaxis"),n(i[2],"zaxis"),n(a[0],"xaxis"),n(a[1],"yaxis"),n(a[2],"zaxis"),e.data.intensity*this.data._normMax,e.data.divergence],e.textLabel=this.data.hovertext||this.data.text,!0}};function ARe(e){var t=e.length,r;return t>2?r=e.slice(1,t-1):t===2?r=[(e[0]+e[1])/2]:r=e,r}function bZ(e){var t=e.length;return t===1?[.5,.5]:[e[1]-e[0],e[t-1]-e[t-2]]}function kRe(e,t){var r=e.fullSceneLayout,n=e.dataScale,i=t._len,a={};function o(z,q){var U=r[q],G=n[MRe[q]];return aFt.simpleMap(z,function(Z){return U.d2l(Z)*G})}if(a.vectors=TRe(o(t._u,"xaxis"),o(t._v,"yaxis"),o(t._w,"zaxis"),i),!i)return{positions:[],cells:[]};var s=o(t._Xs,"xaxis"),l=o(t._Ys,"yaxis"),u=o(t._Zs,"zaxis");a.meshgrid=[s,l,u],a.gridFill=t._gridFill;var c=t._slen;if(c)a.startingPositions=TRe(o(t._startsX,"xaxis"),o(t._startsY,"yaxis"),o(t._startsZ,"zaxis"));else{for(var f=l[0],h=ARe(s),d=ARe(u),v=new Array(h.length*d.length),m=0,b=0;b{"use strict";PRe.exports={moduleType:"trace",name:"streamtube",basePlotModule:sx(),categories:["gl3d","showLegend"],attributes:xZ(),supplyDefaults:wRe(),colorbar:{min:"cmin",max:"cmax"},calc:hF().calc,plot:LRe(),eventData:function(e,t){return e.tubex=e.x,e.tubey=e.y,e.tubez=e.z,e.tubeu=t.traceCoordinate[3],e.tubev=t.traceCoordinate[4],e.tubew=t.traceCoordinate[5],e.norm=t.traceCoordinate[6],e.divergence=t.traceCoordinate[7],delete e.x,delete e.y,delete e.z,e},meta:{}}});var DRe=ye((ymr,RRe)=>{"use strict";RRe.exports=IRe()});var ew=ye((xmr,BRe)=>{"use strict";var{hovertemplateAttrs:uFt,texttemplateAttrs:cFt,templatefallbackAttrs:FRe}=Ll(),fFt=Pg(),$m=pf(),hFt=Gl(),zRe=Tu(),dFt=Pd().dash,Q2=Ao().extendFlat,vFt=mc().overrideAll,rg=$m.marker,qRe=$m.line,ORe=rg.line,_mr=["The library used by the *country names* `locationmode` option is changing in an upcoming version.","Country names in existing plots may not work in the new version."].join(" ");BRe.exports=vFt({lon:{valType:"data_array"},lat:{valType:"data_array"},locations:{valType:"data_array"},locationmode:{valType:"enumerated",values:["ISO-3","USA-states","country names","geojson-id"],dflt:"ISO-3"},geojson:{valType:"any",editType:"calc"},featureidkey:{valType:"string",editType:"calc",dflt:"id"},mode:Q2({},$m.mode,{dflt:"markers"}),text:Q2({},$m.text,{}),texttemplate:cFt({editType:"plot"},{keys:["lat","lon","location","text"]}),texttemplatefallback:FRe({editType:"plot"}),hovertext:Q2({},$m.hovertext,{}),textfont:$m.textfont,textposition:$m.textposition,line:{color:qRe.color,width:qRe.width,dash:dFt},connectgaps:$m.connectgaps,marker:Q2({symbol:rg.symbol,opacity:rg.opacity,angle:rg.angle,angleref:Q2({},rg.angleref,{values:["previous","up","north"]}),standoff:rg.standoff,size:rg.size,sizeref:rg.sizeref,sizemin:rg.sizemin,sizemode:rg.sizemode,colorbar:rg.colorbar,line:Q2({width:ORe.width,dash:ORe.dash},zRe("marker.line")),gradient:rg.gradient},zRe("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:fFt(),selected:$m.selected,unselected:$m.unselected,hoverinfo:Q2({},hFt.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:uFt(),hovertemplatefallback:FRe()},"calc","nested")});var URe=ye((bmr,NRe)=>{"use strict";var yF=Pr(),TZ=Ru(),pFt=$p(),gFt=D0(),mFt=F0(),yFt=Fg(),_Ft=ew(),xFt=["The library used by the *country names* `locationmode` option is changing in the next major version.","Some country names in existing plots may not work in the new version.","To ensure consistent behavior, consider setting `locationmode` to *ISO-3*."].join(" ");NRe.exports=function(t,r,n,i){function a(d,v){return yF.coerce(t,r,_Ft,d,v)}var o=a("locations"),s;if(o&&o.length){var l=a("geojson"),u;(typeof l=="string"&&l!==""||yF.isPlainObject(l))&&(u="geojson-id");var c=a("locationmode",u);c==="country names"&&yF.warn(xFt),c==="geojson-id"&&a("featureidkey"),s=o.length}else{var f=a("lon")||[],h=a("lat")||[];s=Math.min(f.length,h.length)}if(!s){r.visible=!1;return}r._length=s,a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("mode"),TZ.hasMarkers(r)&&pFt(t,r,n,i,a,{gradient:!0}),TZ.hasLines(r)&&(gFt(t,r,n,i,a),a("connectgaps")),TZ.hasText(r)&&(a("texttemplate"),a("texttemplatefallback"),mFt(t,r,i,a)),a("fill"),r.fill!=="none"&&yFt(t,r,n,a),yF.coerceSelectionMarkerOpacity(r,a)}});var HRe=ye((wmr,GRe)=>{"use strict";var VRe=ho();GRe.exports=function(t,r,n){var i={},a=n[r.geo]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=VRe.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=VRe.tickText(o,o.c2l(s[1]),!0).text,i}});var _F=ye((Tmr,ZRe)=>{"use strict";var AZ=Eo(),jRe=fs().BADNUM,bFt=z0(),wFt=Rm(),TFt=q0(),AFt=Pr().isArrayOrTypedArray,WRe=Pr()._;function XRe(e){return e&&typeof e=="string"}ZRe.exports=function(t,r){var n=AFt(r.locations),i=n?r.locations.length:r._length,a=new Array(i),o;r.geojson?o=function(h){return XRe(h)||AZ(h)}:o=XRe;for(var s=0;s{"use strict";Mv.projNames={airy:"airy",aitoff:"aitoff","albers usa":"albersUsa",albers:"albers",august:"august","azimuthal equal area":"azimuthalEqualArea","azimuthal equidistant":"azimuthalEquidistant",baker:"baker",bertin1953:"bertin1953",boggs:"boggs",bonne:"bonne",bottomley:"bottomley",bromley:"bromley",collignon:"collignon","conic conformal":"conicConformal","conic equal area":"conicEqualArea","conic equidistant":"conicEquidistant",craig:"craig",craster:"craster","cylindrical equal area":"cylindricalEqualArea","cylindrical stereographic":"cylindricalStereographic",eckert1:"eckert1",eckert2:"eckert2",eckert3:"eckert3",eckert4:"eckert4",eckert5:"eckert5",eckert6:"eckert6",eisenlohr:"eisenlohr","equal earth":"equalEarth",equirectangular:"equirectangular",fahey:"fahey","foucaut sinusoidal":"foucautSinusoidal",foucaut:"foucaut",ginzburg4:"ginzburg4",ginzburg5:"ginzburg5",ginzburg6:"ginzburg6",ginzburg8:"ginzburg8",ginzburg9:"ginzburg9",gnomonic:"gnomonic","gringorten quincuncial":"gringortenQuincuncial",gringorten:"gringorten",guyou:"guyou",hammer:"hammer",hill:"hill",homolosine:"homolosine",hufnagel:"hufnagel",hyperelliptical:"hyperelliptical",kavrayskiy7:"kavrayskiy7",lagrange:"lagrange",larrivee:"larrivee",laskowski:"laskowski",loximuthal:"loximuthal",mercator:"mercator",miller:"miller",mollweide:"mollweide","mt flat polar parabolic":"mtFlatPolarParabolic","mt flat polar quartic":"mtFlatPolarQuartic","mt flat polar sinusoidal":"mtFlatPolarSinusoidal","natural earth":"naturalEarth","natural earth1":"naturalEarth1","natural earth2":"naturalEarth2","nell hammer":"nellHammer",nicolosi:"nicolosi",orthographic:"orthographic",patterson:"patterson","peirce quincuncial":"peirceQuincuncial",polyconic:"polyconic","rectangular polyconic":"rectangularPolyconic",robinson:"robinson",satellite:"satellite","sinu mollweide":"sinuMollweide",sinusoidal:"sinusoidal",stereographic:"stereographic",times:"times","transverse mercator":"transverseMercator","van der grinten":"vanDerGrinten","van der grinten2":"vanDerGrinten2","van der grinten3":"vanDerGrinten3","van der grinten4":"vanDerGrinten4",wagner4:"wagner4",wagner6:"wagner6",wiechel:"wiechel","winkel tripel":"winkel3",winkel3:"winkel3"};Mv.axesNames=["lonaxis","lataxis"];Mv.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360};Mv.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180};Mv.scopeDefaults={world:{lonaxisRange:[-180,180],lataxisRange:[-90,90],projType:"equirectangular",projRotate:[0,0,0]},usa:{lonaxisRange:[-180,-50],lataxisRange:[15,80],projType:"albers usa"},europe:{lonaxisRange:[-30,60],lataxisRange:[30,85],projType:"conic conformal",projRotate:[15,0,0],projParallels:[0,60]},asia:{lonaxisRange:[22,160],lataxisRange:[-15,55],projType:"mercator",projRotate:[0,0,0]},africa:{lonaxisRange:[-30,60],lataxisRange:[-40,40],projType:"mercator",projRotate:[0,0,0]},"north america":{lonaxisRange:[-180,-45],lataxisRange:[5,85],projType:"conic conformal",projRotate:[-100,0,0],projParallels:[29.5,45.5]},"south america":{lonaxisRange:[-100,-30],lataxisRange:[-60,15],projType:"mercator",projRotate:[0,0,0]},antarctica:{lonaxisRange:[-180,180],lataxisRange:[-90,-60],projType:"equirectangular",projRotate:[0,0,0]},oceania:{lonaxisRange:[-180,180],lataxisRange:[-50,25],projType:"equirectangular",projRotate:[0,0,0]}};Mv.clipPad=.001;Mv.precision=.1;Mv.landColor="#F0DC82";Mv.waterColor="#3399FF";Mv.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"};Mv.sphereSVG={type:"Sphere"};Mv.fillLayers={ocean:1,land:1,lakes:1};Mv.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1};Mv.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"];Mv.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"];Mv.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}});var SZ=ye((xF,YRe)=>{(function(e,t){typeof xF=="object"&&typeof YRe!="undefined"?t(xF):(e=e||self,t(e.topojson=e.topojson||{}))})(xF,function(e){"use strict";function t(M){return M}function r(M){if(M==null)return t;var T,L,x=M.scale[0],C=M.scale[1],S=M.translate[0],g=M.translate[1];return function(P,E){E||(T=L=0);var z=2,q=P.length,U=new Array(q);for(U[0]=(T+=P[0])*x+S,U[1]=(L+=P[1])*C+g;zS&&(S=z[0]),z[1]g&&(g=z[1])}function E(z){switch(z.type){case"GeometryCollection":z.geometries.forEach(E);break;case"Point":P(z.coordinates);break;case"MultiPoint":z.coordinates.forEach(P);break}}M.arcs.forEach(function(z){for(var q=-1,U=z.length,G;++qS&&(S=G[0]),G[1]g&&(g=G[1])});for(L in M.objects)E(M.objects[L]);return[x,C,S,g]}function i(M,T){for(var L,x=M.length,C=x-T;C<--x;)L=M[C],M[C++]=M[x],M[x]=L}function a(M,T){return typeof T=="string"&&(T=M.objects[T]),T.type==="GeometryCollection"?{type:"FeatureCollection",features:T.geometries.map(function(L){return o(M,L)})}:o(M,T)}function o(M,T){var L=T.id,x=T.bbox,C=T.properties==null?{}:T.properties,S=s(M,T);return L==null&&x==null?{type:"Feature",properties:C,geometry:S}:x==null?{type:"Feature",id:L,properties:C,geometry:S}:{type:"Feature",id:L,bbox:x,properties:C,geometry:S}}function s(M,T){var L=r(M.transform),x=M.arcs;function C(q,U){U.length&&U.pop();for(var G=x[q<0?~q:q],Z=0,j=G.length;Z1)x=f(M,T,L);else for(C=0,x=new Array(S=M.arcs.length);C1)for(var U=1,G=P(z[0]),Z,j;UG&&(j=z[0],z[0]=z[U],z[U]=j,G=Z);return z}).filter(function(E){return E.length>0})}}function m(M,T){for(var L=0,x=M.length;L>>1;M[C]=2))throw new Error("n must be \u22652");E=M.bbox||n(M);var L=E[0],x=E[1],C=E[2],S=E[3],g;T={scale:[C-L?(C-L)/(g-1):1,S-x?(S-x)/(g-1):1],translate:[L,x]}}else E=M.bbox;var P=p(T),E,z,q=M.objects,U={};function G(N){return P(N)}function Z(N){var H;switch(N.type){case"GeometryCollection":H={type:"GeometryCollection",geometries:N.geometries.map(Z)};break;case"Point":H={type:"Point",coordinates:G(N.coordinates)};break;case"MultiPoint":H={type:"MultiPoint",coordinates:N.coordinates.map(G)};break;default:return N}return N.id!=null&&(H.id=N.id),N.bbox!=null&&(H.bbox=N.bbox),N.properties!=null&&(H.properties=N.properties),H}function j(N){var H=0,re=1,oe=N.length,_e,ke=new Array(oe);for(ke[0]=P(N[0],0);++H{"use strict";var MZ=KRe.exports={},SFt=uk().locationmodeToLayer,MFt=SZ().feature;MZ.getTopojsonName=function(e){return[e.scope.replace(/ /g,"-"),"_",e.resolution.toString(),"m"].join("")};MZ.getTopojsonPath=function(e,t){return e+=e.endsWith("/")?"":"/",`${e}${t}.json`};MZ.getTopojsonFeatures=function(e,t){var r=SFt[e.locationmode],n=t.objects[r];return MFt(t,n).features}});var cx=ye(ck=>{"use strict";var EFt=fs().BADNUM;ck.calcTraceToLineCoords=function(e){for(var t=e[0].trace,r=t.connectgaps,n=[],i=[],a=0;a0&&(n.push(i),i=[])}return i.length>0&&n.push(i),n};ck.makeLine=function(e){return e.length===1?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}};ck.makePolygon=function(e){if(e.length===1)return{type:"Polygon",coordinates:e};for(var t=new Array(e.length),r=0;r{JRe.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|\xE7)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|\xE9)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|\xE9)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|\xE3)o.?tom(e|\xE9)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}});var AF=ye(ic=>{"use strict";Object.defineProperty(ic,"__esModule",{value:!0});var qp=63710088e-1,kZ={centimeters:qp*100,centimetres:qp*100,degrees:360/(2*Math.PI),feet:qp*3.28084,inches:qp*39.37,kilometers:qp/1e3,kilometres:qp/1e3,meters:qp,metres:qp,miles:qp/1609.344,millimeters:qp*1e3,millimetres:qp*1e3,nauticalmiles:qp/1852,radians:1,yards:qp*1.0936},EZ={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function fx(e,t,r={}){let n={type:"Feature"};return(r.id===0||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function kFt(e,t,r={}){switch(e){case"Point":return CZ(t).geometry;case"LineString":return PZ(t).geometry;case"Polygon":return LZ(t).geometry;case"MultiPoint":return eDe(t).geometry;case"MultiLineString":return QRe(t).geometry;case"MultiPolygon":return tDe(t).geometry;default:throw new Error(e+" is invalid")}}function CZ(e,t,r={}){if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!wF(e[0])||!wF(e[1]))throw new Error("coordinates must contain numbers");return fx({type:"Point",coordinates:e},t,r)}function CFt(e,t,r={}){return TF(e.map(n=>CZ(n,t)),r)}function LZ(e,t,r={}){for(let i of e){if(i.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(i[i.length-1].length!==i[0].length)throw new Error("First and last Position are not equivalent.");for(let a=0;aLZ(n,t)),r)}function PZ(e,t,r={}){if(e.length<2)throw new Error("coordinates must be an array of two or more positions");return fx({type:"LineString",coordinates:e},t,r)}function PFt(e,t,r={}){return TF(e.map(n=>PZ(n,t)),r)}function TF(e,t={}){let r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function QRe(e,t,r={}){return fx({type:"MultiLineString",coordinates:e},t,r)}function eDe(e,t,r={}){return fx({type:"MultiPoint",coordinates:e},t,r)}function tDe(e,t,r={}){return fx({type:"MultiPolygon",coordinates:e},t,r)}function IFt(e,t,r={}){return fx({type:"GeometryCollection",geometries:e},t,r)}function RFt(e,t=0){if(t&&!(t>=0))throw new Error("precision must be a positive number");let r=Math.pow(10,t||0);return Math.round(e*r)/r}function rDe(e,t="kilometers"){let r=kZ[t];if(!r)throw new Error(t+" units is invalid");return e*r}function IZ(e,t="kilometers"){let r=kZ[t];if(!r)throw new Error(t+" units is invalid");return e/r}function DFt(e,t){return iDe(IZ(e,t))}function FFt(e){let t=e%360;return t<0&&(t+=360),t}function zFt(e){return e=e%360,e>180?e-360:e<-180?e+360:e}function iDe(e){return e%(2*Math.PI)*180/Math.PI}function qFt(e){return e%360*Math.PI/180}function OFt(e,t="kilometers",r="kilometers"){if(!(e>=0))throw new Error("length must be a positive number");return rDe(IZ(e,t),r)}function BFt(e,t="meters",r="kilometers"){if(!(e>=0))throw new Error("area must be a positive number");let n=EZ[t];if(!n)throw new Error("invalid original units");let i=EZ[r];if(!i)throw new Error("invalid final units");return e/n*i}function wF(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function NFt(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function UFt(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(e.length!==4&&e.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach(t=>{if(!wF(t))throw new Error("bbox must only contain numbers")})}function VFt(e){if(!e)throw new Error("id is required");if(["string","number"].indexOf(typeof e)===-1)throw new Error("id must be a number or a string")}ic.areaFactors=EZ;ic.azimuthToBearing=zFt;ic.bearingToAzimuth=FFt;ic.convertArea=BFt;ic.convertLength=OFt;ic.degreesToRadians=qFt;ic.earthRadius=qp;ic.factors=kZ;ic.feature=fx;ic.featureCollection=TF;ic.geometry=kFt;ic.geometryCollection=IFt;ic.isNumber=wF;ic.isObject=NFt;ic.lengthToDegrees=DFt;ic.lengthToRadians=IZ;ic.lineString=PZ;ic.lineStrings=PFt;ic.multiLineString=QRe;ic.multiPoint=eDe;ic.multiPolygon=tDe;ic.point=CZ;ic.points=CFt;ic.polygon=LZ;ic.polygons=LFt;ic.radiansToDegrees=iDe;ic.radiansToLength=rDe;ic.round=RFt;ic.validateBBox=UFt;ic.validateId=VFt});var MF=ye(qd=>{"use strict";Object.defineProperty(qd,"__esModule",{value:!0});var Wv=AF();function fk(e,t,r){if(e!==null)for(var n,i,a,o,s,l,u,c=0,f=0,h,d=e.type,v=d==="FeatureCollection",m=d==="Feature",b=v?e.features.length:1,p=0;pl||v>u||m>c){s=f,l=n,u=v,c=m,a=0;return}var b=Wv.lineString.call(void 0,[s,f],r.properties);if(t(b,n,i,m,a)===!1)return!1;a++,s=f})===!1)return!1}}})}function YFt(e,t,r){var n=r,i=!1;return oDe(e,function(a,o,s,l,u){i===!1&&r===void 0?n=a:n=t(n,a,o,s,l,u),i=!0}),n}function sDe(e,t){if(!e)throw new Error("geojson is required");SF(e,function(r,n,i){if(r.geometry!==null){var a=r.geometry.type,o=r.geometry.coordinates;switch(a){case"LineString":if(t(r,n,i,0,0)===!1)return!1;break;case"Polygon":for(var s=0;s{"use strict";Object.defineProperty(EF,"__esModule",{value:!0});var lDe=AF(),QFt=MF();function fDe(e){return QFt.geomReduce.call(void 0,e,(t,r)=>t+ezt(r),0)}function ezt(e){let t=0,r;switch(e.type){case"Polygon":return uDe(e.coordinates);case"MultiPolygon":for(r=0;r0){t+=Math.abs(cDe(e[0]));for(let r=1;r=t?(n+2)%t:n+2],s=i[0]*DZ,l=a[1]*DZ,u=o[0]*DZ;r+=(u-s)*Math.sin(l),n++}return r*tzt}var rzt=fDe;EF.area=fDe;EF.default=rzt});var vDe=ye(kF=>{"use strict";Object.defineProperty(kF,"__esModule",{value:!0});var izt=AF(),nzt=MF();function dDe(e,t={}){let r=0,n=0,i=0;return nzt.coordEach.call(void 0,e,function(a){r+=a[0],n+=a[1],i++},!0),izt.point.call(void 0,[r/i,n/i],t.properties)}var azt=dDe;kF.centroid=dDe;kF.default=azt});var gDe=ye(CF=>{"use strict";Object.defineProperty(CF,"__esModule",{value:!0});var ozt=MF();function pDe(e,t={}){if(e.bbox!=null&&t.recompute!==!0)return e.bbox;let r=[1/0,1/0,-1/0,-1/0];return ozt.coordEach.call(void 0,e,n=>{r[0]>n[0]&&(r[0]=n[0]),r[1]>n[1]&&(r[1]=n[1]),r[2]{"use strict";var mDe={alabama:"AL",alaska:"AK",arizona:"AZ",arkansas:"AR",california:"CA",colorado:"CO",connecticut:"CT",delaware:"DE","district of columbia":"DC",florida:"FL",georgia:"GA",hawaii:"HI",idaho:"ID",illinois:"IL",indiana:"IN",iowa:"IA",kansas:"KS",kentucky:"KY",louisiana:"LA",maine:"ME",maryland:"MD",massachusetts:"MA",michigan:"MI",minnesota:"MN",mississippi:"MS",missouri:"MO",montana:"MT",nebraska:"NE",nevada:"NV","new hampshire":"NH","new jersey":"NJ","new mexico":"NM","new york":"NY","north carolina":"NC","north dakota":"ND",ohio:"OH",oklahoma:"OK",oregon:"OR",pennsylvania:"PA","rhode island":"RI","south carolina":"SC","south dakota":"SD",tennessee:"TN",texas:"TX",utah:"UT",vermont:"VT",virginia:"VA",washington:"WA","washington dc":"DC","washington d.c.":"DC","west virginia":"WV",wisconsin:"WI",wyoming:"WY"},lzt=new Set(Object.values(mDe));yDe.exports={usaLocationAbbreviations:lzt,usaLocationList:mDe}});var hx=ye((Dmr,TDe)=>{"use strict";var uzt=qa(),bDe=$Re(),{area:czt}=hDe(),{centroid:fzt}=vDe(),{bbox:hzt}=gDe(),dzt=ZS(),tw=K1(),vzt=Ty(),pzt=FS(),LF=FM(),{usaLocationAbbreviations:gzt,usaLocationList:mzt}=_De(),xDe=Object.keys(bDe),yzt={"ISO-3":dzt,"USA-states":xzt,"country names":_zt};function _zt(e){for(var t=0;t0&&c[f+1][0]<0)return f;return null}switch(n==="RUS"||n==="FJI"?a=function(c){var f;if(u(c)===null)f=c;else for(f=new Array(c.length),l=0;lf?h[d++]=[c[l][0]+360,c[l][1]]:l===f?(h[d++]=c[l],h[d++]=[c[l][0],-90]):h[d++]=c[l];var v=LF.tester(h);v.pts.pop(),i.push(v)}:a=function(c){i.push(LF.tester(c))},t.type){case"MultiPolygon":for(o=0;o0?v.properties.ct=Azt(v):v.properties.ct=[NaN,NaN],h.fIn=c,h.fOut=v,i.push(v)}else tw.log(["Location",h.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete n[f]}switch(r.type){case"FeatureCollection":var l=r.features;for(a=0;ai&&(i=s,r=o)}else r=t;return fzt(r).geometry.coordinates}function Szt(e){var t=window.PlotlyGeoAssets||{},r=[];function n(l){return new Promise(function(u,c){uzt.json(l,function(f,h){if(f){delete t[l];var d=f.status===404?'GeoJSON at URL "'+l+'" does not exist.':"Unexpected error while fetching from "+l;return c(new Error(d))}return t[l]=h,u(h)})})}function i(l){return new Promise(function(u,c){var f=0,h=setInterval(function(){if(t[l]&&t[l]!=="pending")return clearInterval(h),u(t[l]);if(f>100)return clearInterval(h),c("Unexpected error while fetching from "+l);f++},50)})}for(var a=0;a{"use strict";var Ezt=qa(),kzt=So(),ADe=ka(),SDe=sp(),Czt=SDe.stylePoints,Lzt=SDe.styleText;MDe.exports=function(t,r){r&&Pzt(t,r)};function Pzt(e,t){var r=t[0].trace,n=t[0].node3;n.style("opacity",t[0].trace.opacity),Czt(n,r,e),Lzt(n,r,e),n.selectAll("path.js-line").style("fill","none").each(function(i){var a=Ezt.select(this),o=i.trace,s=o.line||{};a.call(ADe.stroke,s.color).call(kzt.dashLine,s.dash||"",s.width||0),o.fill!=="none"&&a.call(ADe.fill,o.fillcolor)})}});var BZ=ye((zmr,CDe)=>{"use strict";var EDe=qa(),IF=Pr(),Izt=bF().getTopojsonFeatures,zZ=cx(),PF=hx(),kDe=Mg().findExtremes,OZ=fs().BADNUM,Rzt=O0().calcMarkerSize,qZ=Ru(),Dzt=FZ();function Fzt(e,t,r){var n=t.layers.frontplot.select(".scatterlayer"),i=IF.makeTraceGroups(n,r,"trace scattergeo");function a(o,s){o.lonlat[0]===OZ&&EDe.select(s).remove()}i.selectAll("*").remove(),i.each(function(o){var s=EDe.select(this),l=o[0].trace;if(qZ.hasLines(l)||l.fill!=="none"){var u=zZ.calcTraceToLineCoords(o),c=l.fill!=="none"?zZ.makePolygon(u):zZ.makeLine(u);s.selectAll("path.js-line").data([{geojson:c,trace:l}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}qZ.hasMarkers(l)&&s.selectAll("path.point").data(IF.identity).enter().append("path").classed("point",!0).each(function(f){a(f,this)}),qZ.hasText(l)&&s.selectAll("g").data(IF.identity).enter().append("g").append("text").each(function(f){a(f,this)}),Dzt(e,o)})}function zzt(e,t){var r=e[0].trace,n=t[r.geo],i=n._subplot,a=r._length,o,s;if(IF.isArrayOrTypedArray(r.locations)){var l=r.locationmode,u=l==="geojson-id"?PF.extractTraceFeature(e):Izt(r,i.topojson);for(o=0;o{"use strict";var qzt=vf(),Ozt=fs().BADNUM,Bzt=mT(),Nzt=Pr().fillText,Uzt=ew();LDe.exports=function(t,r,n){var i=t.cd,a=i[0].trace,o=t.xa,s=t.ya,l=t.subplot,u=l.projection.isLonLatOverEdges,c=l.project;function f(k){var M=k.lonlat;if(M[0]===Ozt||u(M))return 1/0;var T=c(M),L=c([r,n]),x=Math.abs(T[0]-L[0]),C=Math.abs(T[1]-L[1]),S=Math.max(3,k.mrc||0);return Math.max(Math.sqrt(x*x+C*C)-S,1-3/S)}if(qzt.getClosest(i,f,t),t.index!==!1){var h=i[t.index],d=h.lonlat,v=[o.c2p(d),s.c2p(d)],m=h.mrc||1;t.x0=v[0]-m,t.x1=v[0]+m,t.y0=v[1]-m,t.y1=v[1]+m,t.loc=h.loc,t.lon=d[0],t.lat=d[1];var b={};b[a.geo]={_subplot:l};var p=a._module.formatLabels(h,a,b);return t.lonLabel=p.lonLabel,t.latLabel=p.latLabel,t.color=Bzt(a,h),t.extraText=Vzt(a,h,t,i[0].t.labels),t.hovertemplate=a.hovertemplate,[t]}};function Vzt(e,t,r,n){if(e.hovertemplate)return;var i=t.hi||e.hoverinfo,a=i==="all"?Uzt.hoverinfo.flags:i.split("+"),o=a.indexOf("location")!==-1&&Array.isArray(e.locations),s=a.indexOf("lon")!==-1,l=a.indexOf("lat")!==-1,u=a.indexOf("text")!==-1,c=[];function f(h){return h+"\xB0"}return o?c.push(t.loc):s&&l?c.push("("+f(r.latLabel)+", "+f(r.lonLabel)+")"):s?c.push(n.lon+f(r.lonLabel)):l&&c.push(n.lat+f(r.latLabel)),u&&Nzt(t,e,c),c.join("
")}});var RDe=ye((Omr,IDe)=>{"use strict";IDe.exports=function(t,r,n,i,a){t.lon=r.lon,t.lat=r.lat,t.location=r.loc?r.loc:null;var o=i[a];return o.fIn&&o.fIn.properties&&(t.properties=o.fIn.properties),t}});var zDe=ye((Bmr,FDe)=>{"use strict";var DDe=Ru(),Gzt=fs().BADNUM;FDe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l,u,c,f,h,d=!DDe.hasMarkers(s)&&!DDe.hasText(s);if(d)return[];if(r===!1)for(h=0;h{(function(e,t){t(typeof RF=="object"&&typeof qDe!="undefined"?RF:e.d3=e.d3||{})})(RF,function(e){"use strict";function t(Ee,we){return Eewe?1:Ee>=we?0:NaN}function r(Ee){return Ee.length===1&&(Ee=n(Ee)),{left:function(we,De,Le,me){for(Le==null&&(Le=0),me==null&&(me=we.length);Le>>1;Ee(we[Pe],De)<0?Le=Pe+1:me=Pe}return Le},right:function(we,De,Le,me){for(Le==null&&(Le=0),me==null&&(me=we.length);Le>>1;Ee(we[Pe],De)>0?me=Pe:Le=Pe+1}return Le}}}function n(Ee){return function(we,De){return t(Ee(we),De)}}var i=r(t),a=i.right,o=i.left;function s(Ee,we){we==null&&(we=l);for(var De=0,Le=Ee.length-1,me=Ee[0],Pe=new Array(Le<0?0:Le);DeEe?1:we>=Ee?0:NaN}function f(Ee){return Ee===null?NaN:+Ee}function h(Ee,we){var De=Ee.length,Le=0,me=-1,Pe=0,ce,He,lt=0;if(we==null)for(;++me1)return lt/(Le-1)}function d(Ee,we){var De=h(Ee,we);return De&&Math.sqrt(De)}function v(Ee,we){var De=Ee.length,Le=-1,me,Pe,ce;if(we==null){for(;++Le=me)for(Pe=ce=me;++Leme&&(Pe=me),ce=me)for(Pe=ce=me;++Leme&&(Pe=me),ce0)return[Ee];if((Le=we0)for(Ee=Math.ceil(Ee/He),we=Math.floor(we/He),ce=new Array(Pe=Math.ceil(we-Ee+1));++me=0?(Pe>=L?10:Pe>=x?5:Pe>=C?2:1)*Math.pow(10,me):-Math.pow(10,-me)/(Pe>=L?10:Pe>=x?5:Pe>=C?2:1)}function P(Ee,we,De){var Le=Math.abs(we-Ee)/Math.max(0,De),me=Math.pow(10,Math.floor(Math.log(Le)/Math.LN10)),Pe=Le/me;return Pe>=L?me*=10:Pe>=x?me*=5:Pe>=C&&(me*=2),west;)ct.pop(),--Qt;var Ht=new Array(Qt+1),nr;for(Pe=0;Pe<=Qt;++Pe)nr=Ht[Pe]=[],nr.x0=Pe>0?ct[Pe-1]:Vt,nr.x1=Pe=1)return+De(Ee[Le-1],Le-1,Ee);var Le,me=(Le-1)*we,Pe=Math.floor(me),ce=+De(Ee[Pe],Pe,Ee),He=+De(Ee[Pe+1],Pe+1,Ee);return ce+(He-ce)*(me-Pe)}}function U(Ee,we,De){return Ee=p.call(Ee,f).sort(t),Math.ceil((De-we)/(2*(q(Ee,.75)-q(Ee,.25))*Math.pow(Ee.length,-1/3)))}function G(Ee,we,De){return Math.ceil((De-we)/(3.5*d(Ee)*Math.pow(Ee.length,-1/3)))}function Z(Ee,we){var De=Ee.length,Le=-1,me,Pe;if(we==null){for(;++Le=me)for(Pe=me;++LePe&&(Pe=me)}else for(;++Le=me)for(Pe=me;++LePe&&(Pe=me);return Pe}function j(Ee,we){var De=Ee.length,Le=De,me=-1,Pe,ce=0;if(we==null)for(;++me=0;)for(ce=Ee[we],De=ce.length;--De>=0;)Pe[--me]=ce[De];return Pe}function re(Ee,we){var De=Ee.length,Le=-1,me,Pe;if(we==null){for(;++Le=me)for(Pe=me;++Leme&&(Pe=me)}else for(;++Le=me)for(Pe=me;++Leme&&(Pe=me);return Pe}function oe(Ee,we){for(var De=we.length,Le=new Array(De);De--;)Le[De]=Ee[we[De]];return Le}function _e(Ee,we){if(De=Ee.length){var De,Le=0,me=0,Pe,ce=Ee[me];for(we==null&&(we=t);++Le{(function(e,t){typeof DF=="object"&&typeof ODe!="undefined"?t(DF,hk()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(DF,function(e,t){"use strict";function r(){return new n}function n(){this.reset()}n.prototype={constructor:n,reset:function(){this.s=this.t=0},add:function(kt){a(i,kt,this.t),a(this,i.s,this.s),this.s?this.t+=i.t:this.s=i.t},valueOf:function(){return this.s}};var i=new n;function a(kt,Zt,Mr){var xr=kt.s=Zt+Mr,Kr=xr-Zt,Mi=xr-Kr;kt.t=Zt-Mi+(Mr-Kr)}var o=1e-6,s=1e-12,l=Math.PI,u=l/2,c=l/4,f=l*2,h=180/l,d=l/180,v=Math.abs,m=Math.atan,b=Math.atan2,p=Math.cos,k=Math.ceil,M=Math.exp,T=Math.log,L=Math.pow,x=Math.sin,C=Math.sign||function(kt){return kt>0?1:kt<0?-1:0},S=Math.sqrt,g=Math.tan;function P(kt){return kt>1?0:kt<-1?l:Math.acos(kt)}function E(kt){return kt>1?u:kt<-1?-u:Math.asin(kt)}function z(kt){return(kt=x(kt/2))*kt}function q(){}function U(kt,Zt){kt&&Z.hasOwnProperty(kt.type)&&Z[kt.type](kt,Zt)}var G={Feature:function(kt,Zt){U(kt.geometry,Zt)},FeatureCollection:function(kt,Zt){for(var Mr=kt.features,xr=-1,Kr=Mr.length;++xr=0?1:-1,Kr=xr*Mr,Mi=p(Zt),Wi=x(Zt),dn=ie*Wi,wn=ge*Mi+dn*p(Kr),On=dn*xr*x(Kr);re.add(b(On,wn)),Ce=kt,ge=Mi,ie=Wi}function me(kt){return oe.reset(),H(kt,Se),oe*2}function Pe(kt){return[b(kt[1],kt[0]),E(kt[2])]}function ce(kt){var Zt=kt[0],Mr=kt[1],xr=p(Mr);return[xr*p(Zt),xr*x(Zt),x(Mr)]}function He(kt,Zt){return kt[0]*Zt[0]+kt[1]*Zt[1]+kt[2]*Zt[2]}function lt(kt,Zt){return[kt[1]*Zt[2]-kt[2]*Zt[1],kt[2]*Zt[0]-kt[0]*Zt[2],kt[0]*Zt[1]-kt[1]*Zt[0]]}function mt(kt,Zt){kt[0]+=Zt[0],kt[1]+=Zt[1],kt[2]+=Zt[2]}function Vt(kt,Zt){return[kt[0]*Zt,kt[1]*Zt,kt[2]*Zt]}function st(kt){var Zt=S(kt[0]*kt[0]+kt[1]*kt[1]+kt[2]*kt[2]);kt[0]/=Zt,kt[1]/=Zt,kt[2]/=Zt}var ct,Qt,Ht,nr,tt,je,Ue,Ae,rt=r(),St,Tt,dt={point:Et,lineStart:Xt,lineEnd:or,polygonStart:function(){dt.point=_r,dt.lineStart=Er,dt.lineEnd=ei,rt.reset(),Se.polygonStart()},polygonEnd:function(){Se.polygonEnd(),dt.point=Et,dt.lineStart=Xt,dt.lineEnd=or,re<0?(ct=-(Ht=180),Qt=-(nr=90)):rt>o?nr=90:rt<-o&&(Qt=-90),Tt[0]=ct,Tt[1]=Ht},sphere:function(){ct=-(Ht=180),Qt=-(nr=90)}};function Et(kt,Zt){St.push(Tt=[ct=kt,Ht=kt]),Ztnr&&(nr=Zt)}function pt(kt,Zt){var Mr=ce([kt*d,Zt*d]);if(Ae){var xr=lt(Ae,Mr),Kr=[xr[1],-xr[0],0],Mi=lt(Kr,xr);st(Mi),Mi=Pe(Mi);var Wi=kt-tt,dn=Wi>0?1:-1,wn=Mi[0]*h*dn,On,Yi=v(Wi)>180;Yi^(dn*ttnr&&(nr=On)):(wn=(wn+360)%360-180,Yi^(dn*ttnr&&(nr=Zt))),Yi?ktqr(ct,Ht)&&(Ht=kt):qr(kt,Ht)>qr(ct,Ht)&&(ct=kt):Ht>=ct?(ktHt&&(Ht=kt)):kt>tt?qr(ct,kt)>qr(ct,Ht)&&(Ht=kt):qr(kt,Ht)>qr(ct,Ht)&&(ct=kt)}else St.push(Tt=[ct=kt,Ht=kt]);Ztnr&&(nr=Zt),Ae=Mr,tt=kt}function Xt(){dt.point=pt}function or(){Tt[0]=ct,Tt[1]=Ht,dt.point=Et,Ae=null}function _r(kt,Zt){if(Ae){var Mr=kt-tt;rt.add(v(Mr)>180?Mr+(Mr>0?360:-360):Mr)}else je=kt,Ue=Zt;Se.point(kt,Zt),pt(kt,Zt)}function Er(){Se.lineStart()}function ei(){_r(je,Ue),Se.lineEnd(),v(rt)>o&&(ct=-(Ht=180)),Tt[0]=ct,Tt[1]=Ht,Ae=null}function qr(kt,Zt){return(Zt-=kt)<0?Zt+360:Zt}function jr(kt,Zt){return kt[0]-Zt[0]}function gt(kt,Zt){return kt[0]<=kt[1]?kt[0]<=Zt&&Zt<=kt[1]:Ztqr(xr[0],xr[1])&&(xr[1]=Kr[1]),qr(Kr[0],xr[1])>qr(xr[0],xr[1])&&(xr[0]=Kr[0])):Mi.push(xr=Kr);for(Wi=-1/0,Mr=Mi.length-1,Zt=0,xr=Mi[Mr];Zt<=Mr;xr=Kr,++Zt)Kr=Mi[Zt],(dn=qr(xr[1],Kr[0]))>Wi&&(Wi=dn,ct=Kr[0],Ht=xr[1])}return St=Tt=null,ct===1/0||Qt===1/0?[[NaN,NaN],[NaN,NaN]]:[[ct,Qt],[Ht,nr]]}var Je,We,et,xt,At,Kt,er,Sr,Gr,Ir,Yr,_i,Pi,ai,mi,un,Fn={sphere:q,point:An,lineStart:Qn,lineEnd:Jn,polygonStart:function(){Fn.lineStart=Gt,Fn.lineEnd=wt},polygonEnd:function(){Fn.lineStart=Qn,Fn.lineEnd=Jn}};function An(kt,Zt){kt*=d,Zt*=d;var Mr=p(Zt);Hn(Mr*p(kt),Mr*x(kt),x(Zt))}function Hn(kt,Zt,Mr){++Je,et+=(kt-et)/Je,xt+=(Zt-xt)/Je,At+=(Mr-At)/Je}function Qn(){Fn.point=Vi}function Vi(kt,Zt){kt*=d,Zt*=d;var Mr=p(Zt);ai=Mr*p(kt),mi=Mr*x(kt),un=x(Zt),Fn.point=Kn,Hn(ai,mi,un)}function Kn(kt,Zt){kt*=d,Zt*=d;var Mr=p(Zt),xr=Mr*p(kt),Kr=Mr*x(kt),Mi=x(Zt),Wi=b(S((Wi=mi*Mi-un*Kr)*Wi+(Wi=un*xr-ai*Mi)*Wi+(Wi=ai*Kr-mi*xr)*Wi),ai*xr+mi*Kr+un*Mi);We+=Wi,Kt+=Wi*(ai+(ai=xr)),er+=Wi*(mi+(mi=Kr)),Sr+=Wi*(un+(un=Mi)),Hn(ai,mi,un)}function Jn(){Fn.point=An}function Gt(){Fn.point=rr}function wt(){ir(_i,Pi),Fn.point=An}function rr(kt,Zt){_i=kt,Pi=Zt,kt*=d,Zt*=d,Fn.point=ir;var Mr=p(Zt);ai=Mr*p(kt),mi=Mr*x(kt),un=x(Zt),Hn(ai,mi,un)}function ir(kt,Zt){kt*=d,Zt*=d;var Mr=p(Zt),xr=Mr*p(kt),Kr=Mr*x(kt),Mi=x(Zt),Wi=mi*Mi-un*Kr,dn=un*xr-ai*Mi,wn=ai*Kr-mi*xr,On=S(Wi*Wi+dn*dn+wn*wn),Yi=E(On),$i=On&&-Yi/On;Gr+=$i*Wi,Ir+=$i*dn,Yr+=$i*wn,We+=Yi,Kt+=Yi*(ai+(ai=xr)),er+=Yi*(mi+(mi=Kr)),Sr+=Yi*(un+(un=Mi)),Hn(ai,mi,un)}function wr(kt){Je=We=et=xt=At=Kt=er=Sr=Gr=Ir=Yr=0,H(kt,Fn);var Zt=Gr,Mr=Ir,xr=Yr,Kr=Zt*Zt+Mr*Mr+xr*xr;return Krl?kt+Math.round(-kt/f)*f:kt,Zt]}$r.invert=$r;function Ri(kt,Zt,Mr){return(kt%=f)?Zt||Mr?ti(en(kt),fn(Zt,Mr)):en(kt):Zt||Mr?fn(Zt,Mr):$r}function Zi(kt){return function(Zt,Mr){return Zt+=kt,[Zt>l?Zt-f:Zt<-l?Zt+f:Zt,Mr]}}function en(kt){var Zt=Zi(kt);return Zt.invert=Zi(-kt),Zt}function fn(kt,Zt){var Mr=p(kt),xr=x(kt),Kr=p(Zt),Mi=x(Zt);function Wi(dn,wn){var On=p(wn),Yi=p(dn)*On,$i=x(dn)*On,an=x(wn),Fi=an*Mr+Yi*xr;return[b($i*Kr-Fi*Mi,Yi*Mr-an*xr),E(Fi*Kr+$i*Mi)]}return Wi.invert=function(dn,wn){var On=p(wn),Yi=p(dn)*On,$i=x(dn)*On,an=x(wn),Fi=an*Kr-$i*Mi;return[b($i*Kr+an*Mi,Yi*Mr+Fi*xr),E(Fi*Mr-Yi*xr)]},Wi}function yn(kt){kt=Ri(kt[0]*d,kt[1]*d,kt.length>2?kt[2]*d:0);function Zt(Mr){return Mr=kt(Mr[0]*d,Mr[1]*d),Mr[0]*=h,Mr[1]*=h,Mr}return Zt.invert=function(Mr){return Mr=kt.invert(Mr[0]*d,Mr[1]*d),Mr[0]*=h,Mr[1]*=h,Mr},Zt}function Mn(kt,Zt,Mr,xr,Kr,Mi){if(Mr){var Wi=p(Zt),dn=x(Zt),wn=xr*Mr;Kr==null?(Kr=Zt+xr*f,Mi=Zt-wn/2):(Kr=Ba(Wi,Kr),Mi=Ba(Wi,Mi),(xr>0?KrMi)&&(Kr+=xr*f));for(var On,Yi=Kr;xr>0?Yi>Mi:Yi1&&kt.push(kt.pop().concat(kt.shift()))},result:function(){var Mr=kt;return kt=[],Zt=null,Mr}}}function Wa(kt,Zt){return v(kt[0]-Zt[0])=0;--dn)Kr.point(($i=Yi[dn])[0],$i[1]);else xr(an.x,an.p.x,-1,Kr);an=an.p}an=an.o,Yi=an.z,Fi=!Fi}while(!an.v);Kr.lineEnd()}}}function da(kt){if(Zt=kt.length){for(var Zt,Mr=0,xr=kt[0],Kr;++Mr=0?1:-1,as=Ss*Zo,ws=as>l,Ho=Ca*Ka;if(jn.add(b(Ho*Ss*x(as),Ra*bo+Ho*p(as))),Wi+=ws?Zo+Ss*f:Zo,ws^Fi>=Mr^Zn>=Mr){var ml=lt(ce(an),ce(Na));st(ml);var Ws=lt(Mi,ml);st(Ws);var Ls=(ws^Zo>=0?-1:1)*E(Ws[2]);(xr>Ls||xr===Ls&&(ml[0]||ml[1]))&&(dn+=ws^Zo>=0?1:-1)}}return(Wi<-o||Wi0){for(wn||(Kr.polygonStart(),wn=!0),Kr.lineStart(),bo=0;bo1&&Dn&2&&Ka.push(Ka.pop().concat(Ka.shift())),Yi.push(Ka.filter(Ct))}}return an}}function Ct(kt){return kt.length>1}function Ar(kt,Zt){return((kt=kt.x)[0]<0?kt[1]-u-o:u-kt[1])-((Zt=Zt.x)[0]<0?Zt[1]-u-o:u-Zt[1])}var Jr=Gn(function(){return!0},hi,Sn,[-l,-u]);function hi(kt){var Zt=NaN,Mr=NaN,xr=NaN,Kr;return{lineStart:function(){kt.lineStart(),Kr=1},point:function(Mi,Wi){var dn=Mi>0?l:-l,wn=v(Mi-Zt);v(wn-l)0?u:-u),kt.point(xr,Mr),kt.lineEnd(),kt.lineStart(),kt.point(dn,Mr),kt.point(Mi,Mr),Kr=0):xr!==dn&&wn>=l&&(v(Zt-xr)o?m((x(Zt)*(Mi=p(xr))*x(Mr)-x(xr)*(Kr=p(Zt))*x(kt))/(Kr*Mi*Wi)):(Zt+xr)/2}function Sn(kt,Zt,Mr,xr){var Kr;if(kt==null)Kr=Mr*u,xr.point(-l,Kr),xr.point(0,Kr),xr.point(l,Kr),xr.point(l,0),xr.point(l,-Kr),xr.point(0,-Kr),xr.point(-l,-Kr),xr.point(-l,0),xr.point(-l,Kr);else if(v(kt[0]-Zt[0])>o){var Mi=kt[0]0,Kr=v(Zt)>o;function Mi(Yi,$i,an,Fi){Mn(Fi,kt,Mr,an,Yi,$i)}function Wi(Yi,$i){return p(Yi)*p($i)>Zt}function dn(Yi){var $i,an,Fi,ta,Ca;return{lineStart:function(){ta=Fi=!1,Ca=1},point:function(Ra,La){var Na=[Ra,La],Zn,Dn=Wi(Ra,La),Ka=xr?Dn?0:On(Ra,La):Dn?On(Ra+(Ra<0?l:-l),La):0;if(!$i&&(ta=Fi=Dn)&&Yi.lineStart(),Dn!==Fi&&(Zn=wn($i,Na),(!Zn||Wa($i,Zn)||Wa(Na,Zn))&&(Na[2]=1)),Dn!==Fi)Ca=0,Dn?(Yi.lineStart(),Zn=wn(Na,$i),Yi.point(Zn[0],Zn[1])):(Zn=wn($i,Na),Yi.point(Zn[0],Zn[1],2),Yi.lineEnd()),$i=Zn;else if(Kr&&$i&&xr^Dn){var bo;!(Ka&an)&&(bo=wn(Na,$i,!0))&&(Ca=0,xr?(Yi.lineStart(),Yi.point(bo[0][0],bo[0][1]),Yi.point(bo[1][0],bo[1][1]),Yi.lineEnd()):(Yi.point(bo[1][0],bo[1][1]),Yi.lineEnd(),Yi.lineStart(),Yi.point(bo[0][0],bo[0][1],3)))}Dn&&(!$i||!Wa($i,Na))&&Yi.point(Na[0],Na[1]),$i=Na,Fi=Dn,an=Ka},lineEnd:function(){Fi&&Yi.lineEnd(),$i=null},clean:function(){return Ca|(ta&&Fi)<<1}}}function wn(Yi,$i,an){var Fi=ce(Yi),ta=ce($i),Ca=[1,0,0],Ra=lt(Fi,ta),La=He(Ra,Ra),Na=Ra[0],Zn=La-Na*Na;if(!Zn)return!an&&Yi;var Dn=Zt*La/Zn,Ka=-Zt*Na/Zn,bo=lt(Ca,Ra),Zo=Vt(Ca,Dn),Ss=Vt(Ra,Ka);mt(Zo,Ss);var as=bo,ws=He(Zo,as),Ho=He(as,as),ml=ws*ws-Ho*(He(Zo,Zo)-1);if(!(ml<0)){var Ws=S(ml),Ls=Vt(as,(-ws-Ws)/Ho);if(mt(Ls,Zo),Ls=Pe(Ls),!an)return Ls;var va=Yi[0],no=$i[0],ys=Yi[1],rs=$i[1],Ql;no0^Ls[1]<(v(Ls[0]-va)l^(va<=Ls[0]&&Ls[0]<=no)){var pu=Vt(as,(-ws+Ws)/Ho);return mt(pu,Zo),[Ls,Pe(pu)]}}}function On(Yi,$i){var an=xr?kt:l-kt,Fi=0;return Yi<-an?Fi|=1:Yi>an&&(Fi|=2),$i<-an?Fi|=4:$i>an&&(Fi|=8),Fi}return Gn(Wi,dn,Mi,xr?[0,-kt]:[-l,kt-l])}function ki(kt,Zt,Mr,xr,Kr,Mi){var Wi=kt[0],dn=kt[1],wn=Zt[0],On=Zt[1],Yi=0,$i=1,an=wn-Wi,Fi=On-dn,ta;if(ta=Mr-Wi,!(!an&&ta>0)){if(ta/=an,an<0){if(ta0){if(ta>$i)return;ta>Yi&&(Yi=ta)}if(ta=Kr-Wi,!(!an&&ta<0)){if(ta/=an,an<0){if(ta>$i)return;ta>Yi&&(Yi=ta)}else if(an>0){if(ta0)){if(ta/=Fi,Fi<0){if(ta0){if(ta>$i)return;ta>Yi&&(Yi=ta)}if(ta=Mi-dn,!(!Fi&&ta<0)){if(ta/=Fi,Fi<0){if(ta>$i)return;ta>Yi&&(Yi=ta)}else if(Fi>0){if(ta0&&(kt[0]=Wi+Yi*an,kt[1]=dn+Yi*Fi),$i<1&&(Zt[0]=Wi+$i*an,Zt[1]=dn+$i*Fi),!0}}}}}var _n=1e9,ya=-_n;function ea(kt,Zt,Mr,xr){function Kr(On,Yi){return kt<=On&&On<=Mr&&Zt<=Yi&&Yi<=xr}function Mi(On,Yi,$i,an){var Fi=0,ta=0;if(On==null||(Fi=Wi(On,$i))!==(ta=Wi(Yi,$i))||wn(On,Yi)<0^$i>0)do an.point(Fi===0||Fi===3?kt:Mr,Fi>1?xr:Zt);while((Fi=(Fi+$i+4)%4)!==ta);else an.point(Yi[0],Yi[1])}function Wi(On,Yi){return v(On[0]-kt)0?0:3:v(On[0]-Mr)0?2:1:v(On[1]-Zt)0?1:0:Yi>0?3:2}function dn(On,Yi){return wn(On.x,Yi.x)}function wn(On,Yi){var $i=Wi(On,1),an=Wi(Yi,1);return $i!==an?$i-an:$i===0?Yi[1]-On[1]:$i===1?On[0]-Yi[0]:$i===2?On[1]-Yi[1]:Yi[0]-On[0]}return function(On){var Yi=On,$i=ma(),an,Fi,ta,Ca,Ra,La,Na,Zn,Dn,Ka,bo,Zo={point:Ss,lineStart:ml,lineEnd:Ws,polygonStart:ws,polygonEnd:Ho};function Ss(va,no){Kr(va,no)&&Yi.point(va,no)}function as(){for(var va=0,no=0,ys=Fi.length;noxr&&(Uc-Nc)*(xr-pu)>(xu-pu)*(kt-Nc)&&++va:xu<=xr&&(Uc-Nc)*(xr-pu)<(xu-pu)*(kt-Nc)&&--va;return va}function ws(){Yi=$i,an=[],Fi=[],bo=!0}function Ho(){var va=as(),no=bo&&va,ys=(an=t.merge(an)).length;(no||ys)&&(On.polygonStart(),no&&(On.lineStart(),Mi(null,null,1,On),On.lineEnd()),ys&&Xo(an,dn,va,Mi,On),On.polygonEnd()),Yi=On,an=Fi=ta=null}function ml(){Zo.point=Ls,Fi&&Fi.push(ta=[]),Ka=!0,Dn=!1,Na=Zn=NaN}function Ws(){an&&(Ls(Ca,Ra),La&&Dn&&$i.rejoin(),an.push($i.result())),Zo.point=Ss,Dn&&Yi.lineEnd()}function Ls(va,no){var ys=Kr(va,no);if(Fi&&ta.push([va,no]),Ka)Ca=va,Ra=no,La=ys,Ka=!1,ys&&(Yi.lineStart(),Yi.point(va,no));else if(ys&&Dn)Yi.point(va,no);else{var rs=[Na=Math.max(ya,Math.min(_n,Na)),Zn=Math.max(ya,Math.min(_n,Zn))],Ql=[va=Math.max(ya,Math.min(_n,va)),no=Math.max(ya,Math.min(_n,no))];ki(rs,Ql,kt,Zt,Mr,xr)?(Dn||(Yi.lineStart(),Yi.point(rs[0],rs[1])),Yi.point(Ql[0],Ql[1]),ys||Yi.lineEnd(),bo=!1):ys&&(Yi.lineStart(),Yi.point(va,no),bo=!1)}Na=va,Zn=no,Dn=ys}return Zo}}function Ma(){var kt=0,Zt=0,Mr=960,xr=500,Kr,Mi,Wi;return Wi={stream:function(dn){return Kr&&Mi===dn?Kr:Kr=ea(kt,Zt,Mr,xr)(Mi=dn)},extent:function(dn){return arguments.length?(kt=+dn[0][0],Zt=+dn[0][1],Mr=+dn[1][0],xr=+dn[1][1],Kr=Mi=null,Wi):[[kt,Zt],[Mr,xr]]}}}var _o=r(),No,po,Lo,ko={sphere:q,point:q,lineStart:Ds,lineEnd:q,polygonStart:q,polygonEnd:q};function Ds(){ko.point=ll,ko.lineEnd=Fs}function Fs(){ko.point=ko.lineEnd=q}function ll(kt,Zt){kt*=d,Zt*=d,No=kt,po=x(Zt),Lo=p(Zt),ko.point=ul}function ul(kt,Zt){kt*=d,Zt*=d;var Mr=x(Zt),xr=p(Zt),Kr=v(kt-No),Mi=p(Kr),Wi=x(Kr),dn=xr*Wi,wn=Lo*Mr-po*xr*Mi,On=po*Mr+Lo*xr*Mi;_o.add(b(S(dn*dn+wn*wn),On)),No=kt,po=Mr,Lo=xr}function zl(kt){return _o.reset(),H(kt,ko),+_o}var us=[null,null],il={type:"LineString",coordinates:us};function As(kt,Zt){return us[0]=kt,us[1]=Zt,zl(il)}var cl={Feature:function(kt,Zt){return zs(kt.geometry,Zt)},FeatureCollection:function(kt,Zt){for(var Mr=kt.features,xr=-1,Kr=Mr.length;++xr0&&(Kr=As(kt[Mi],kt[Mi-1]),Kr>0&&Mr<=Kr&&xr<=Kr&&(Mr+xr-Kr)*(1-Math.pow((Mr-xr)/Kr,2))o}).map(an)).concat(t.range(k(Mi/On)*On,Kr,On).filter(function(Zn){return v(Zn%$i)>o}).map(Fi))}return La.lines=function(){return Na().map(function(Zn){return{type:"LineString",coordinates:Zn}})},La.outline=function(){return{type:"Polygon",coordinates:[ta(xr).concat(Ca(Wi).slice(1),ta(Mr).reverse().slice(1),Ca(dn).reverse().slice(1))]}},La.extent=function(Zn){return arguments.length?La.extentMajor(Zn).extentMinor(Zn):La.extentMinor()},La.extentMajor=function(Zn){return arguments.length?(xr=+Zn[0][0],Mr=+Zn[1][0],dn=+Zn[0][1],Wi=+Zn[1][1],xr>Mr&&(Zn=xr,xr=Mr,Mr=Zn),dn>Wi&&(Zn=dn,dn=Wi,Wi=Zn),La.precision(Ra)):[[xr,dn],[Mr,Wi]]},La.extentMinor=function(Zn){return arguments.length?(Zt=+Zn[0][0],kt=+Zn[1][0],Mi=+Zn[0][1],Kr=+Zn[1][1],Zt>kt&&(Zn=Zt,Zt=kt,kt=Zn),Mi>Kr&&(Zn=Mi,Mi=Kr,Kr=Zn),La.precision(Ra)):[[Zt,Mi],[kt,Kr]]},La.step=function(Zn){return arguments.length?La.stepMajor(Zn).stepMinor(Zn):La.stepMinor()},La.stepMajor=function(Zn){return arguments.length?(Yi=+Zn[0],$i=+Zn[1],La):[Yi,$i]},La.stepMinor=function(Zn){return arguments.length?(wn=+Zn[0],On=+Zn[1],La):[wn,On]},La.precision=function(Zn){return arguments.length?(Ra=+Zn,an=Rn(Mi,Kr,90),Fi=_a(Zt,kt,Ra),ta=Rn(dn,Wi,90),Ca=_a(xr,Mr,Ra),La):Ra},La.extentMajor([[-180,-90+o],[180,90-o]]).extentMinor([[-180,-80-o],[180,80+o]])}function ql(){return Vu()()}function xo(kt,Zt){var Mr=kt[0]*d,xr=kt[1]*d,Kr=Zt[0]*d,Mi=Zt[1]*d,Wi=p(xr),dn=x(xr),wn=p(Mi),On=x(Mi),Yi=Wi*p(Mr),$i=Wi*x(Mr),an=wn*p(Kr),Fi=wn*x(Kr),ta=2*E(S(z(Mi-xr)+Wi*wn*z(Kr-Mr))),Ca=x(ta),Ra=ta?function(La){var Na=x(La*=ta)/Ca,Zn=x(ta-La)/Ca,Dn=Zn*Yi+Na*an,Ka=Zn*$i+Na*Fi,bo=Zn*dn+Na*On;return[b(Ka,Dn)*h,b(bo,S(Dn*Dn+Ka*Ka))*h]}:function(){return[Mr*h,xr*h]};return Ra.distance=ta,Ra}function Kl(kt){return kt}var Ns=r(),Hl=r(),ac,oa,qo,Oo,Ol={point:q,lineStart:q,lineEnd:q,polygonStart:function(){Ol.lineStart=Pc,Ol.lineEnd=Vf},polygonEnd:function(){Ol.lineStart=Ol.lineEnd=Ol.point=q,Ns.add(v(Hl)),Hl.reset()},result:function(){var kt=Ns/2;return Ns.reset(),kt}};function Pc(){Ol.point=Do}function Do(kt,Zt){Ol.point=rf,ac=qo=kt,oa=Oo=Zt}function rf(kt,Zt){Hl.add(Oo*kt-qo*Zt),qo=kt,Oo=Zt}function Vf(){rf(ac,oa)}var pl=1/0,Zc=pl,Jl=-pl,qs=Jl,yu={point:oc,lineStart:q,lineEnd:q,polygonStart:q,polygonEnd:q,result:function(){var kt=[[pl,Zc],[Jl,qs]];return Jl=qs=-(Zc=pl=1/0),kt}};function oc(kt,Zt){ktJl&&(Jl=kt),Ztqs&&(qs=Zt)}var Cf=0,sc=0,jh=0,Lf=0,cs=0,nf=0,Gf=0,$l=0,fl=0,lc,Fu,Es,Hs,Go={point:ps,lineStart:uc,lineEnd:Os,polygonStart:function(){Go.lineStart=od,Go.lineEnd=Po},polygonEnd:function(){Go.point=ps,Go.lineStart=uc,Go.lineEnd=Os},result:function(){var kt=fl?[Gf/fl,$l/fl]:nf?[Lf/nf,cs/nf]:jh?[Cf/jh,sc/jh]:[NaN,NaN];return Cf=sc=jh=Lf=cs=nf=Gf=$l=fl=0,kt}};function ps(kt,Zt){Cf+=kt,sc+=Zt,++jh}function uc(){Go.point=xl}function xl(kt,Zt){Go.point=Gu,ps(Es=kt,Hs=Zt)}function Gu(kt,Zt){var Mr=kt-Es,xr=Zt-Hs,Kr=S(Mr*Mr+xr*xr);Lf+=Kr*(Es+kt)/2,cs+=Kr*(Hs+Zt)/2,nf+=Kr,ps(Es=kt,Hs=Zt)}function Os(){Go.point=ps}function od(){Go.point=sd}function Po(){Ko(lc,Fu)}function sd(kt,Zt){Go.point=Ko,ps(lc=Es=kt,Fu=Hs=Zt)}function Ko(kt,Zt){var Mr=kt-Es,xr=Zt-Hs,Kr=S(Mr*Mr+xr*xr);Lf+=Kr*(Es+kt)/2,cs+=Kr*(Hs+Zt)/2,nf+=Kr,Kr=Hs*kt-Es*Zt,Gf+=Kr*(Es+kt),$l+=Kr*(Hs+Zt),fl+=Kr*3,ps(Es=kt,Hs=Zt)}function Pa(kt){this._context=kt}Pa.prototype={_radius:4.5,pointRadius:function(kt){return this._radius=kt,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(kt,Zt){switch(this._point){case 0:{this._context.moveTo(kt,Zt),this._point=1;break}case 1:{this._context.lineTo(kt,Zt);break}default:{this._context.moveTo(kt+this._radius,Zt),this._context.arc(kt,Zt,this._radius,0,f);break}}},result:q};var af=r(),Hu,bl,Hf,Ic,yf,Bl={point:q,lineStart:function(){Bl.point=Ah},lineEnd:function(){Hu&&Qf(bl,Hf),Bl.point=q},polygonStart:function(){Hu=!0},polygonEnd:function(){Hu=null},result:function(){var kt=+af;return af.reset(),kt}};function Ah(kt,Zt){Bl.point=Qf,bl=Ic=kt,Hf=yf=Zt}function Qf(kt,Zt){Ic-=kt,yf-=Zt,af.add(S(Ic*Ic+yf*yf)),Ic=kt,yf=Zt}function _f(){this._string=[]}_f.prototype={_radius:4.5,_circle:Yc(4.5),pointRadius:function(kt){return(kt=+kt)!==this._radius&&(this._radius=kt,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(kt,Zt){switch(this._point){case 0:{this._string.push("M",kt,",",Zt),this._point=1;break}case 1:{this._string.push("L",kt,",",Zt);break}default:{this._circle==null&&(this._circle=Yc(this._radius)),this._string.push("M",kt,",",Zt,this._circle);break}}},result:function(){if(this._string.length){var kt=this._string.join("");return this._string=[],kt}else return null}};function Yc(kt){return"m0,"+kt+"a"+kt+","+kt+" 0 1,1 0,"+-2*kt+"a"+kt+","+kt+" 0 1,1 0,"+2*kt+"z"}function eh(kt,Zt){var Mr=4.5,xr,Kr;function Mi(Wi){return Wi&&(typeof Mr=="function"&&Kr.pointRadius(+Mr.apply(this,arguments)),H(Wi,xr(Kr))),Kr.result()}return Mi.area=function(Wi){return H(Wi,xr(Ol)),Ol.result()},Mi.measure=function(Wi){return H(Wi,xr(Bl)),Bl.result()},Mi.bounds=function(Wi){return H(Wi,xr(yu)),yu.result()},Mi.centroid=function(Wi){return H(Wi,xr(Go)),Go.result()},Mi.projection=function(Wi){return arguments.length?(xr=Wi==null?(kt=null,Kl):(kt=Wi).stream,Mi):kt},Mi.context=function(Wi){return arguments.length?(Kr=Wi==null?(Zt=null,new _f):new Pa(Zt=Wi),typeof Mr!="function"&&Kr.pointRadius(Mr),Mi):Zt},Mi.pointRadius=function(Wi){return arguments.length?(Mr=typeof Wi=="function"?Wi:(Kr.pointRadius(+Wi),+Wi),Mi):Mr},Mi.projection(kt).context(Zt)}function th(kt){return{stream:ju(kt)}}function ju(kt){return function(Zt){var Mr=new jf;for(var xr in kt)Mr[xr]=kt[xr];return Mr.stream=Zt,Mr}}function jf(){}jf.prototype={constructor:jf,point:function(kt,Zt){this.stream.point(kt,Zt)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function cc(kt,Zt,Mr){var xr=kt.clipExtent&&kt.clipExtent();return kt.scale(150).translate([0,0]),xr!=null&&kt.clipExtent(null),H(Mr,kt.stream(yu)),Zt(yu.result()),xr!=null&&kt.clipExtent(xr),kt}function of(kt,Zt,Mr){return cc(kt,function(xr){var Kr=Zt[1][0]-Zt[0][0],Mi=Zt[1][1]-Zt[0][1],Wi=Math.min(Kr/(xr[1][0]-xr[0][0]),Mi/(xr[1][1]-xr[0][1])),dn=+Zt[0][0]+(Kr-Wi*(xr[1][0]+xr[0][0]))/2,wn=+Zt[0][1]+(Mi-Wi*(xr[1][1]+xr[0][1]))/2;kt.scale(150*Wi).translate([dn,wn])},Mr)}function Nl(kt,Zt,Mr){return of(kt,[[0,0],Zt],Mr)}function Kc(kt,Zt,Mr){return cc(kt,function(xr){var Kr=+Zt,Mi=Kr/(xr[1][0]-xr[0][0]),Wi=(Kr-Mi*(xr[1][0]+xr[0][0]))/2,dn=-Mi*xr[0][1];kt.scale(150*Mi).translate([Wi,dn])},Mr)}function Rc(kt,Zt,Mr){return cc(kt,function(xr){var Kr=+Zt,Mi=Kr/(xr[1][1]-xr[0][1]),Wi=-Mi*xr[0][0],dn=(Kr-Mi*(xr[1][1]+xr[0][1]))/2;kt.scale(150*Mi).translate([Wi,dn])},Mr)}var gs=16,Wf=p(30*d);function Wh(kt,Zt){return+Zt?sf(kt,Zt):rh(kt)}function rh(kt){return ju({point:function(Zt,Mr){Zt=kt(Zt,Mr),this.stream.point(Zt[0],Zt[1])}})}function sf(kt,Zt){function Mr(xr,Kr,Mi,Wi,dn,wn,On,Yi,$i,an,Fi,ta,Ca,Ra){var La=On-xr,Na=Yi-Kr,Zn=La*La+Na*Na;if(Zn>4*Zt&&Ca--){var Dn=Wi+an,Ka=dn+Fi,bo=wn+ta,Zo=S(Dn*Dn+Ka*Ka+bo*bo),Ss=E(bo/=Zo),as=v(v(bo)-1)Zt||v((La*Ws+Na*Ls)/Zn-.5)>.3||Wi*an+dn*Fi+wn*ta2?va[2]%360*d:0,Ws()):[dn*h,wn*h,On*h]},Ho.angle=function(va){return arguments.length?($i=va%360*d,Ws()):$i*h},Ho.reflectX=function(va){return arguments.length?(an=va?-1:1,Ws()):an<0},Ho.reflectY=function(va){return arguments.length?(Fi=va?-1:1,Ws()):Fi<0},Ho.precision=function(va){return arguments.length?(bo=Wh(Zo,Ka=va*va),Ls()):S(Ka)},Ho.fitExtent=function(va,no){return of(Ho,va,no)},Ho.fitSize=function(va,no){return Nl(Ho,va,no)},Ho.fitWidth=function(va,no){return Kc(Ho,va,no)},Ho.fitHeight=function(va,no){return Rc(Ho,va,no)};function Ws(){var va=js(Mr,0,0,an,Fi,$i).apply(null,Zt(Mi,Wi)),no=($i?js:ih)(Mr,xr-va[0],Kr-va[1],an,Fi,$i);return Yi=Ri(dn,wn,On),Zo=ti(Zt,no),Ss=ti(Yi,Zo),bo=Wh(Zo,Ka),Ls()}function Ls(){return as=ws=null,Ho}return function(){return Zt=kt.apply(this,arguments),Ho.invert=Zt.invert&&ml,Ws()}}function ks(kt){var Zt=0,Mr=l/3,xr=Dc(kt),Kr=xr(Zt,Mr);return Kr.parallels=function(Mi){return arguments.length?xr(Zt=Mi[0]*d,Mr=Mi[1]*d):[Zt*h,Mr*h]},Kr}function bc(kt){var Zt=p(kt);function Mr(xr,Kr){return[xr*Zt,x(Kr)/Zt]}return Mr.invert=function(xr,Kr){return[xr/Zt,E(Kr*Zt)]},Mr}function hu(kt,Zt){var Mr=x(kt),xr=(Mr+x(Zt))/2;if(v(xr)=.12&&Ra<.234&&Ca>=-.425&&Ca<-.214?Kr:Ra>=.166&&Ra<.234&&Ca>=-.214&&Ca<-.115?Wi:Mr).invert(an)},Yi.stream=function(an){return kt&&Zt===an?kt:kt=nh([Mr.stream(Zt=an),Kr.stream(an),Wi.stream(an)])},Yi.precision=function(an){return arguments.length?(Mr.precision(an),Kr.precision(an),Wi.precision(an),$i()):Mr.precision()},Yi.scale=function(an){return arguments.length?(Mr.scale(an),Kr.scale(an*.35),Wi.scale(an),Yi.translate(Mr.translate())):Mr.scale()},Yi.translate=function(an){if(!arguments.length)return Mr.translate();var Fi=Mr.scale(),ta=+an[0],Ca=+an[1];return xr=Mr.translate(an).clipExtent([[ta-.455*Fi,Ca-.238*Fi],[ta+.455*Fi,Ca+.238*Fi]]).stream(On),Mi=Kr.translate([ta-.307*Fi,Ca+.201*Fi]).clipExtent([[ta-.425*Fi+o,Ca+.12*Fi+o],[ta-.214*Fi-o,Ca+.234*Fi-o]]).stream(On),dn=Wi.translate([ta-.205*Fi,Ca+.212*Fi]).clipExtent([[ta-.214*Fi+o,Ca+.166*Fi+o],[ta-.115*Fi-o,Ca+.234*Fi-o]]).stream(On),$i()},Yi.fitExtent=function(an,Fi){return of(Yi,an,Fi)},Yi.fitSize=function(an,Fi){return Nl(Yi,an,Fi)},Yi.fitWidth=function(an,Fi){return Kc(Yi,an,Fi)},Yi.fitHeight=function(an,Fi){return Rc(Yi,an,Fi)};function $i(){return kt=Zt=null,Yi}return Yi.scale(1070)}function zu(kt){return function(Zt,Mr){var xr=p(Zt),Kr=p(Mr),Mi=kt(xr*Kr);return[Mi*Kr*x(Zt),Mi*x(Mr)]}}function Fc(kt){return function(Zt,Mr){var xr=S(Zt*Zt+Mr*Mr),Kr=kt(xr),Mi=x(Kr),Wi=p(Kr);return[b(Zt*Mi,xr*Wi),E(xr&&Mr*Mi/xr)]}}var wc=zu(function(kt){return S(2/(1+kt))});wc.invert=Fc(function(kt){return 2*E(kt/2)});function bd(){return Eu(wc).scale(124.75).clipAngle(180-.001)}var xf=zu(function(kt){return(kt=P(kt))&&kt/x(kt)});xf.invert=Fc(function(kt){return kt});function Pf(){return Eu(xf).scale(79.4188).clipAngle(180-.001)}function qu(kt,Zt){return[kt,T(g((u+Zt)/2))]}qu.invert=function(kt,Zt){return[kt,2*m(M(Zt))-u]};function bf(){return jl(qu).scale(961/f)}function jl(kt){var Zt=Eu(kt),Mr=Zt.center,xr=Zt.scale,Kr=Zt.translate,Mi=Zt.clipExtent,Wi=null,dn,wn,On;Zt.scale=function($i){return arguments.length?(xr($i),Yi()):xr()},Zt.translate=function($i){return arguments.length?(Kr($i),Yi()):Kr()},Zt.center=function($i){return arguments.length?(Mr($i),Yi()):Mr()},Zt.clipExtent=function($i){return arguments.length?($i==null?Wi=dn=wn=On=null:(Wi=+$i[0][0],dn=+$i[0][1],wn=+$i[1][0],On=+$i[1][1]),Yi()):Wi==null?null:[[Wi,dn],[wn,On]]};function Yi(){var $i=l*xr(),an=Zt(yn(Zt.rotate()).invert([0,0]));return Mi(Wi==null?[[an[0]-$i,an[1]-$i],[an[0]+$i,an[1]+$i]]:kt===qu?[[Math.max(an[0]-$i,Wi),dn],[Math.min(an[0]+$i,wn),On]]:[[Wi,Math.max(an[1]-$i,dn)],[wn,Math.min(an[1]+$i,On)]])}return Yi()}function lf(kt){return g((u+kt)/2)}function Xh(kt,Zt){var Mr=p(kt),xr=kt===Zt?x(kt):T(Mr/p(Zt))/T(lf(Zt)/lf(kt)),Kr=Mr*L(lf(kt),xr)/xr;if(!xr)return qu;function Mi(Wi,dn){Kr>0?dn<-u+o&&(dn=-u+o):dn>u-o&&(dn=u-o);var wn=Kr/L(lf(dn),xr);return[wn*x(xr*Wi),Kr-wn*p(xr*Wi)]}return Mi.invert=function(Wi,dn){var wn=Kr-dn,On=C(xr)*S(Wi*Wi+wn*wn),Yi=b(Wi,v(wn))*C(wn);return wn*xr<0&&(Yi-=l*C(Wi)*C(wn)),[Yi/xr,2*m(L(Kr/On,1/xr))-u]},Mi}function If(){return ks(Xh).scale(109.5).parallels([30,30])}function Cs(kt,Zt){return[kt,Zt]}Cs.invert=Cs;function du(){return Eu(Cs).scale(152.63)}function ku(kt,Zt){var Mr=p(kt),xr=kt===Zt?x(kt):(Mr-p(Zt))/(Zt-kt),Kr=Mr/xr+kt;if(v(xr)o&&--xr>0);return[kt/(.8707+(Mi=Mr*Mr)*(-.131979+Mi*(-.013791+Mi*Mi*Mi*(.003971-.001529*Mi)))),Mr]};function Tc(){return Eu(qc).scale(175.295)}function wl(kt,Zt){return[p(Zt)*x(kt),x(Zt)]}wl.invert=Fc(E);function vu(){return Eu(wl).scale(249.5).clipAngle(90+o)}function Oc(kt,Zt){var Mr=p(Zt),xr=1+p(kt)*Mr;return[Mr*x(kt)/xr,x(Zt)/xr]}Oc.invert=Fc(function(kt){return 2*m(kt)});function cf(){return Eu(Oc).scale(250).clipAngle(142)}function fc(kt,Zt){return[T(g((u+Zt)/2)),-kt]}fc.invert=function(kt,Zt){return[-Zt,2*m(M(kt))-u]};function Bc(){var kt=jl(fc),Zt=kt.center,Mr=kt.rotate;return kt.center=function(xr){return arguments.length?Zt([-xr[1],xr[0]]):(xr=Zt(),[xr[1],-xr[0]])},kt.rotate=function(xr){return arguments.length?Mr([xr[0],xr[1],xr.length>2?xr[2]+90:90]):(xr=Mr(),[xr[0],xr[1],xr[2]-90])},Mr([0,0,90]).scale(159.155)}e.geoAlbers=nl,e.geoAlbersUsa=Mh,e.geoArea=me,e.geoAzimuthalEqualArea=bd,e.geoAzimuthalEqualAreaRaw=wc,e.geoAzimuthalEquidistant=Pf,e.geoAzimuthalEquidistantRaw=xf,e.geoBounds=Ge,e.geoCentroid=wr,e.geoCircle=ua,e.geoClipAntimeridian=Jr,e.geoClipCircle=En,e.geoClipExtent=Ma,e.geoClipRectangle=ea,e.geoConicConformal=If,e.geoConicConformalRaw=Xh,e.geoConicEqualArea=_u,e.geoConicEqualAreaRaw=hu,e.geoConicEquidistant=Xf,e.geoConicEquidistantRaw=ku,e.geoContains=bs,e.geoDistance=As,e.geoEqualEarth=Zf,e.geoEqualEarthRaw=uf,e.geoEquirectangular=du,e.geoEquirectangularRaw=Cs,e.geoGnomonic=ah,e.geoGnomonicRaw=Wl,e.geoGraticule=Vu,e.geoGraticule10=ql,e.geoIdentity=Zu,e.geoInterpolate=xo,e.geoLength=zl,e.geoMercator=bf,e.geoMercatorRaw=qu,e.geoNaturalEarth1=Tc,e.geoNaturalEarth1Raw=qc,e.geoOrthographic=vu,e.geoOrthographicRaw=wl,e.geoPath=eh,e.geoProjection=Eu,e.geoProjectionMutator=Dc,e.geoRotation=yn,e.geoStereographic=cf,e.geoStereographicRaw=Oc,e.geoStream=H,e.geoTransform=th,e.geoTransverseMercator=Bc,e.geoTransverseMercatorRaw=fc,Object.defineProperty(e,"__esModule",{value:!0})})});var NDe=ye((FF,BDe)=>{(function(e,t){typeof FF=="object"&&typeof BDe!="undefined"?t(FF,NZ(),hk()):t(e.d3=e.d3||{},e.d3,e.d3)})(FF,function(e,t,r){"use strict";var n=Math.abs,i=Math.atan,a=Math.atan2,o=Math.cos,s=Math.exp,l=Math.floor,u=Math.log,c=Math.max,f=Math.min,h=Math.pow,d=Math.round,v=Math.sign||function(ve){return ve>0?1:ve<0?-1:0},m=Math.sin,b=Math.tan,p=1e-6,k=1e-12,M=Math.PI,T=M/2,L=M/4,x=Math.SQRT1_2,C=G(2),S=G(M),g=M*2,P=180/M,E=M/180;function z(ve){return ve?ve/Math.sin(ve):1}function q(ve){return ve>1?T:ve<-1?-T:Math.asin(ve)}function U(ve){return ve>1?0:ve<-1?M:Math.acos(ve)}function G(ve){return ve>0?Math.sqrt(ve):0}function Z(ve){return ve=s(2*ve),(ve-1)/(ve+1)}function j(ve){return(s(ve)-s(-ve))/2}function N(ve){return(s(ve)+s(-ve))/2}function H(ve){return u(ve+G(ve*ve+1))}function re(ve){return u(ve+G(ve*ve-1))}function oe(ve){var xe=b(ve/2),Ie=2*u(o(ve/2))/(xe*xe);function qe(Qe,Xe){var nt=o(Qe),qt=o(Xe),jt=m(Xe),ar=qt*nt,fr=-((1-ar?u((1+ar)/2)/(1-ar):-.5)+Ie/(1+ar));return[fr*qt*m(Qe),fr*jt]}return qe.invert=function(Qe,Xe){var nt=G(Qe*Qe+Xe*Xe),qt=-ve/2,jt=50,ar;if(!nt)return[0,0];do{var fr=qt/2,br=o(fr),Fr=m(fr),Hr=Fr/br,ri=-u(n(br));qt-=ar=(2/Hr*ri-Ie*Hr-nt)/(-ri/(Fr*Fr)+1-Ie/(2*br*br))*(br<0?.7:1)}while(n(ar)>p&&--jt>0);var Ci=m(qt);return[a(Qe*Ci,nt*o(qt)),q(Xe*Ci/nt)]},qe}function _e(){var ve=T,xe=t.geoProjectionMutator(oe),Ie=xe(ve);return Ie.radius=function(qe){return arguments.length?xe(ve=qe*E):ve*P},Ie.scale(179.976).clipAngle(147)}function ke(ve,xe){var Ie=o(xe),qe=z(U(Ie*o(ve/=2)));return[2*Ie*m(ve)*qe,m(xe)*qe]}ke.invert=function(ve,xe){if(!(ve*ve+4*xe*xe>M*M+p)){var Ie=ve,qe=xe,Qe=25;do{var Xe=m(Ie),nt=m(Ie/2),qt=o(Ie/2),jt=m(qe),ar=o(qe),fr=m(2*qe),br=jt*jt,Fr=ar*ar,Hr=nt*nt,ri=1-Fr*qt*qt,Ci=ri?U(ar*qt)*G(cn=1/ri):cn=0,cn,sn=2*Ci*ar*nt-ve,Ln=Ci*jt-xe,Yn=cn*(Fr*Hr+Ci*ar*qt*br),Aa=cn*(.5*Xe*fr-Ci*2*jt*nt),fa=cn*.25*(fr*nt-Ci*jt*Fr*Xe),$a=cn*(br*qt+Ci*Hr*ar),Co=Aa*fa-$a*Yn;if(!Co)break;var Qa=(Ln*Aa-sn*$a)/Co,mo=(sn*fa-Ln*Yn)/Co;Ie-=Qa,qe-=mo}while((n(Qa)>p||n(mo)>p)&&--Qe>0);return[Ie,qe]}};function Ce(){return t.geoProjection(ke).scale(152.63)}function ge(ve){var xe=m(ve),Ie=o(ve),qe=ve>=0?1:-1,Qe=b(qe*ve),Xe=(1+xe-Ie)/2;function nt(qt,jt){var ar=o(jt),fr=o(qt/=2);return[(1+ar)*m(qt),(qe*jt>-a(fr,Qe)-.001?0:-qe*10)+Xe+m(jt)*Ie-(1+ar)*xe*fr]}return nt.invert=function(qt,jt){var ar=0,fr=0,br=50;do{var Fr=o(ar),Hr=m(ar),ri=o(fr),Ci=m(fr),cn=1+ri,sn=cn*Hr-qt,Ln=Xe+Ci*Ie-cn*xe*Fr-jt,Yn=cn*Fr/2,Aa=-Hr*Ci,fa=xe*cn*Hr/2,$a=Ie*ri+xe*Fr*Ci,Co=Aa*fa-$a*Yn,Qa=(Ln*Aa-sn*$a)/Co/2,mo=(sn*fa-Ln*Yn)/Co;n(mo)>2&&(mo/=2),ar-=Qa,fr-=mo}while((n(Qa)>p||n(mo)>p)&&--br>0);return qe*fr>-a(o(ar),Qe)-.001?[ar*2,fr]:null},nt}function ie(){var ve=20*E,xe=ve>=0?1:-1,Ie=b(xe*ve),qe=t.geoProjectionMutator(ge),Qe=qe(ve),Xe=Qe.stream;return Qe.parallel=function(nt){return arguments.length?(Ie=b((xe=(ve=nt*E)>=0?1:-1)*ve),qe(ve)):ve*P},Qe.stream=function(nt){var qt=Qe.rotate(),jt=Xe(nt),ar=(Qe.rotate([0,0]),Xe(nt)),fr=Qe.precision();return Qe.rotate(qt),jt.sphere=function(){ar.polygonStart(),ar.lineStart();for(var br=xe*-180;xe*br<180;br+=xe*90)ar.point(br,xe*90);if(ve)for(;xe*(br-=3*xe*fr)>=-180;)ar.point(br,xe*-a(o(br*E/2),Ie)*P);ar.lineEnd(),ar.polygonEnd()},jt},Qe.scale(218.695).center([0,28.0974])}function Se(ve,xe){var Ie=b(xe/2),qe=G(1-Ie*Ie),Qe=1+qe*o(ve/=2),Xe=m(ve)*qe/Qe,nt=Ie/Qe,qt=Xe*Xe,jt=nt*nt;return[4/3*Xe*(3+qt-3*jt),4/3*nt*(3+3*qt-jt)]}Se.invert=function(ve,xe){if(ve*=3/8,xe*=3/8,!ve&&n(xe)>1)return null;var Ie=ve*ve,qe=xe*xe,Qe=1+Ie+qe,Xe=G((Qe-G(Qe*Qe-4*xe*xe))/2),nt=q(Xe)/3,qt=Xe?re(n(xe/Xe))/3:H(n(ve))/3,jt=o(nt),ar=N(qt),fr=ar*ar-jt*jt;return[v(ve)*2*a(j(qt)*jt,.25-fr),v(xe)*2*a(ar*m(nt),.25+fr)]};function Ee(){return t.geoProjection(Se).scale(66.1603)}var we=G(8),De=u(1+C);function Le(ve,xe){var Ie=n(xe);return Iek&&--qe>0);return[ve/(o(Ie)*(we-1/m(Ie))),v(xe)*Ie]};function me(){return t.geoProjection(Le).scale(112.314)}function Pe(ve){var xe=2*M/ve;function Ie(qe,Qe){var Xe=t.geoAzimuthalEquidistantRaw(qe,Qe);if(n(qe)>T){var nt=a(Xe[1],Xe[0]),qt=G(Xe[0]*Xe[0]+Xe[1]*Xe[1]),jt=xe*d((nt-T)/xe)+T,ar=a(m(nt-=jt),2-o(nt));nt=jt+q(M/qt*m(ar))-ar,Xe[0]=qt*o(nt),Xe[1]=qt*m(nt)}return Xe}return Ie.invert=function(qe,Qe){var Xe=G(qe*qe+Qe*Qe);if(Xe>T){var nt=a(Qe,qe),qt=xe*d((nt-T)/xe)+T,jt=nt>qt?-1:1,ar=Xe*o(qt-nt),fr=1/b(jt*U((ar-M)/G(M*(M-2*ar)+Xe*Xe)));nt=qt+2*i((fr+jt*G(fr*fr-3))/3),qe=Xe*o(nt),Qe=Xe*m(nt)}return t.geoAzimuthalEquidistantRaw.invert(qe,Qe)},Ie}function ce(){var ve=5,xe=t.geoProjectionMutator(Pe),Ie=xe(ve),qe=Ie.stream,Qe=.01,Xe=-o(Qe*E),nt=m(Qe*E);return Ie.lobes=function(qt){return arguments.length?xe(ve=+qt):ve},Ie.stream=function(qt){var jt=Ie.rotate(),ar=qe(qt),fr=(Ie.rotate([0,0]),qe(qt));return Ie.rotate(jt),ar.sphere=function(){fr.polygonStart(),fr.lineStart();for(var br=0,Fr=360/ve,Hr=2*M/ve,ri=90-180/ve,Ci=T;br0&&n(Qe)>p);return qe<0?NaN:Ie}function st(ve,xe,Ie){return xe===void 0&&(xe=40),Ie===void 0&&(Ie=k),function(qe,Qe,Xe,nt){var qt,jt,ar;Xe=Xe===void 0?0:+Xe,nt=nt===void 0?0:+nt;for(var fr=0;frqt){Xe-=jt/=2,nt-=ar/=2;continue}qt=ri;var Ci=(Xe>0?-1:1)*Ie,cn=(nt>0?-1:1)*Ie,sn=ve(Xe+Ci,nt),Ln=ve(Xe,nt+cn),Yn=(sn[0]-br[0])/Ci,Aa=(sn[1]-br[1])/Ci,fa=(Ln[0]-br[0])/cn,$a=(Ln[1]-br[1])/cn,Co=$a*Yn-Aa*fa,Qa=(n(Co)<.5?.5:1)/Co;if(jt=(Hr*fa-Fr*$a)*Qa,ar=(Fr*Aa-Hr*Yn)*Qa,Xe+=jt,nt+=ar,n(jt)0&&(qt[1]*=1+jt/1.5*qt[0]*qt[0]),qt}return qe.invert=st(qe),qe}function Qt(){return t.geoProjection(ct()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function Ht(ve,xe){var Ie=ve*m(xe),qe=30,Qe;do xe-=Qe=(xe+m(xe)-Ie)/(1+o(xe));while(n(Qe)>p&&--qe>0);return xe/2}function nr(ve,xe,Ie){function qe(Qe,Xe){return[ve*Qe*o(Xe=Ht(Ie,Xe)),xe*m(Xe)]}return qe.invert=function(Qe,Xe){return Xe=q(Xe/xe),[Qe/(ve*o(Xe)),q((2*Xe+m(2*Xe))/Ie)]},qe}var tt=nr(C/T,C,M);function je(){return t.geoProjection(tt).scale(169.529)}var Ue=2.00276,Ae=1.11072;function rt(ve,xe){var Ie=Ht(M,xe);return[Ue*ve/(1/o(xe)+Ae/o(Ie)),(xe+C*m(Ie))/Ue]}rt.invert=function(ve,xe){var Ie=Ue*xe,qe=xe<0?-L:L,Qe=25,Xe,nt;do nt=Ie-C*m(qe),qe-=Xe=(m(2*qe)+2*qe-M*m(nt))/(2*o(2*qe)+2+M*o(nt)*C*o(qe));while(n(Xe)>p&&--Qe>0);return nt=Ie-C*m(qe),[ve*(1/o(nt)+Ae/o(qe))/Ue,nt]};function St(){return t.geoProjection(rt).scale(160.857)}function Tt(ve){var xe=0,Ie=t.geoProjectionMutator(ve),qe=Ie(xe);return qe.parallel=function(Qe){return arguments.length?Ie(xe=Qe*E):xe*P},qe}function dt(ve,xe){return[ve*o(xe),xe]}dt.invert=function(ve,xe){return[ve/o(xe),xe]};function Et(){return t.geoProjection(dt).scale(152.63)}function pt(ve){if(!ve)return dt;var xe=1/b(ve);function Ie(qe,Qe){var Xe=xe+ve-Qe,nt=Xe&&qe*o(Qe)/Xe;return[Xe*m(nt),xe-Xe*o(nt)]}return Ie.invert=function(qe,Qe){var Xe=G(qe*qe+(Qe=xe-Qe)*Qe),nt=xe+ve-Xe;return[Xe/o(nt)*a(qe,Qe),nt]},Ie}function Xt(){return Tt(pt).scale(123.082).center([0,26.1441]).parallel(45)}function or(ve){function xe(Ie,qe){var Qe=T-qe,Xe=Qe&&Ie*ve*m(Qe)/Qe;return[Qe*m(Xe)/ve,T-Qe*o(Xe)]}return xe.invert=function(Ie,qe){var Qe=Ie*ve,Xe=T-qe,nt=G(Qe*Qe+Xe*Xe),qt=a(Qe,Xe);return[(nt?nt/m(nt):1)*qt/ve,T-nt]},xe}function _r(){var ve=.5,xe=t.geoProjectionMutator(or),Ie=xe(ve);return Ie.fraction=function(qe){return arguments.length?xe(ve=+qe):ve},Ie.scale(158.837)}var Er=nr(1,4/M,M);function ei(){return t.geoProjection(Er).scale(152.63)}function qr(ve,xe,Ie,qe,Qe,Xe){var nt=o(Xe),qt;if(n(ve)>1||n(Xe)>1)qt=U(Ie*Qe+xe*qe*nt);else{var jt=m(ve/2),ar=m(Xe/2);qt=2*q(G(jt*jt+xe*qe*ar*ar))}return n(qt)>p?[qt,a(qe*m(Xe),xe*Qe-Ie*qe*nt)]:[0,0]}function jr(ve,xe,Ie){return U((ve*ve+xe*xe-Ie*Ie)/(2*ve*xe))}function gt(ve){return ve-2*M*l((ve+M)/(2*M))}function Ge(ve,xe,Ie){for(var qe=[[ve[0],ve[1],m(ve[1]),o(ve[1])],[xe[0],xe[1],m(xe[1]),o(xe[1])],[Ie[0],Ie[1],m(Ie[1]),o(Ie[1])]],Qe=qe[2],Xe,nt=0;nt<3;++nt,Qe=Xe)Xe=qe[nt],Qe.v=qr(Xe[1]-Qe[1],Qe[3],Qe[2],Xe[3],Xe[2],Xe[0]-Qe[0]),Qe.point=[0,0];var qt=jr(qe[0].v[0],qe[2].v[0],qe[1].v[0]),jt=jr(qe[0].v[0],qe[1].v[0],qe[2].v[0]),ar=M-qt;qe[2].point[1]=0,qe[0].point[0]=-(qe[1].point[0]=qe[0].v[0]/2);var fr=[qe[2].point[0]=qe[0].point[0]+qe[2].v[0]*o(qt),2*(qe[0].point[1]=qe[1].point[1]=qe[2].v[0]*m(qt))];function br(Fr,Hr){var ri=m(Hr),Ci=o(Hr),cn=new Array(3),sn;for(sn=0;sn<3;++sn){var Ln=qe[sn];if(cn[sn]=qr(Hr-Ln[1],Ln[3],Ln[2],Ci,ri,Fr-Ln[0]),!cn[sn][0])return Ln.point;cn[sn][1]=gt(cn[sn][1]-Ln.v[1])}var Yn=fr.slice();for(sn=0;sn<3;++sn){var Aa=sn==2?0:sn+1,fa=jr(qe[sn].v[0],cn[sn][0],cn[Aa][0]);cn[sn][1]<0&&(fa=-fa),sn?sn==1?(fa=jt-fa,Yn[0]-=cn[sn][0]*o(fa),Yn[1]-=cn[sn][0]*m(fa)):(fa=ar-fa,Yn[0]+=cn[sn][0]*o(fa),Yn[1]+=cn[sn][0]*m(fa)):(Yn[0]+=cn[sn][0]*o(fa),Yn[1]-=cn[sn][0]*m(fa))}return Yn[0]/=3,Yn[1]/=3,Yn}return br}function Je(ve){return ve[0]*=E,ve[1]*=E,ve}function We(){return et([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function et(ve,xe,Ie){var qe=t.geoCentroid({type:"MultiPoint",coordinates:[ve,xe,Ie]}),Qe=[-qe[0],-qe[1]],Xe=t.geoRotation(Qe),nt=Ge(Je(Xe(ve)),Je(Xe(xe)),Je(Xe(Ie)));nt.invert=st(nt);var qt=t.geoProjection(nt).rotate(Qe),jt=qt.center;return delete qt.rotate,qt.center=function(ar){return arguments.length?jt(Xe(ar)):Xe.invert(jt())},qt.clipAngle(90)}function xt(ve,xe){var Ie=G(1-m(xe));return[2/S*ve*Ie,S*(1-Ie)]}xt.invert=function(ve,xe){var Ie=(Ie=xe/S-1)*Ie;return[Ie>0?ve*G(M/Ie)/2:0,q(1-Ie)]};function At(){return t.geoProjection(xt).scale(95.6464).center([0,30])}function Kt(ve){var xe=b(ve);function Ie(qe,Qe){return[qe,(qe?qe/m(qe):1)*(m(Qe)*o(qe)-xe*o(Qe))]}return Ie.invert=xe?function(qe,Qe){qe&&(Qe*=m(qe)/qe);var Xe=o(qe);return[qe,2*a(G(Xe*Xe+xe*xe-Qe*Qe)-Xe,xe-Qe)]}:function(qe,Qe){return[qe,q(qe?Qe*b(qe)/qe:Qe)]},Ie}function er(){return Tt(Kt).scale(249.828).clipAngle(90)}var Sr=G(3);function Gr(ve,xe){return[Sr*ve*(2*o(2*xe/3)-1)/S,Sr*S*m(xe/3)]}Gr.invert=function(ve,xe){var Ie=3*q(xe/(Sr*S));return[S*ve/(Sr*(2*o(2*Ie/3)-1)),Ie]};function Ir(){return t.geoProjection(Gr).scale(156.19)}function Yr(ve){var xe=o(ve);function Ie(qe,Qe){return[qe*xe,m(Qe)/xe]}return Ie.invert=function(qe,Qe){return[qe/xe,q(Qe*xe)]},Ie}function _i(){return Tt(Yr).parallel(38.58).scale(195.044)}function Pi(ve){var xe=o(ve);function Ie(qe,Qe){return[qe*xe,(1+xe)*b(Qe/2)]}return Ie.invert=function(qe,Qe){return[qe/xe,i(Qe/(1+xe))*2]},Ie}function ai(){return Tt(Pi).scale(124.75)}function mi(ve,xe){var Ie=G(8/(3*M));return[Ie*ve*(1-n(xe)/M),Ie*xe]}mi.invert=function(ve,xe){var Ie=G(8/(3*M)),qe=xe/Ie;return[ve/(Ie*(1-n(qe)/M)),qe]};function un(){return t.geoProjection(mi).scale(165.664)}function Fn(ve,xe){var Ie=G(4-3*m(n(xe)));return[2/G(6*M)*ve*Ie,v(xe)*G(2*M/3)*(2-Ie)]}Fn.invert=function(ve,xe){var Ie=2-n(xe)/G(2*M/3);return[ve*G(6*M)/(2*Ie),v(xe)*q((4-Ie*Ie)/3)]};function An(){return t.geoProjection(Fn).scale(165.664)}function Hn(ve,xe){var Ie=G(M*(4+M));return[2/Ie*ve*(1+G(1-4*xe*xe/(M*M))),4/Ie*xe]}Hn.invert=function(ve,xe){var Ie=G(M*(4+M))/2;return[ve*Ie/(1+G(1-xe*xe*(4+M)/(4*M))),xe*Ie/2]};function Qn(){return t.geoProjection(Hn).scale(180.739)}function Vi(ve,xe){var Ie=(2+T)*m(xe);xe/=2;for(var qe=0,Qe=1/0;qe<10&&n(Qe)>p;qe++){var Xe=o(xe);xe-=Qe=(xe+m(xe)*(Xe+2)-Ie)/(2*Xe*(1+Xe))}return[2/G(M*(4+M))*ve*(1+o(xe)),2*G(M/(4+M))*m(xe)]}Vi.invert=function(ve,xe){var Ie=xe*G((4+M)/M)/2,qe=q(Ie),Qe=o(qe);return[ve/(2/G(M*(4+M))*(1+Qe)),q((qe+Ie*(Qe+2))/(2+T))]};function Kn(){return t.geoProjection(Vi).scale(180.739)}function Jn(ve,xe){return[ve*(1+o(xe))/G(2+M),2*xe/G(2+M)]}Jn.invert=function(ve,xe){var Ie=G(2+M),qe=xe*Ie/2;return[Ie*ve/(1+o(qe)),qe]};function Gt(){return t.geoProjection(Jn).scale(173.044)}function wt(ve,xe){for(var Ie=(1+T)*m(xe),qe=0,Qe=1/0;qe<10&&n(Qe)>p;qe++)xe-=Qe=(xe+m(xe)-Ie)/(1+o(xe));return Ie=G(2+M),[ve*(1+o(xe))/Ie,2*xe/Ie]}wt.invert=function(ve,xe){var Ie=1+T,qe=G(Ie/2);return[ve*2*qe/(1+o(xe*=qe)),q((xe+m(xe))/Ie)]};function rr(){return t.geoProjection(wt).scale(173.044)}var ir=3+2*C;function wr(ve,xe){var Ie=m(ve/=2),qe=o(ve),Qe=G(o(xe)),Xe=o(xe/=2),nt=m(xe)/(Xe+C*qe*Qe),qt=G(2/(1+nt*nt)),jt=G((C*Xe+(qe+Ie)*Qe)/(C*Xe+(qe-Ie)*Qe));return[ir*(qt*(jt-1/jt)-2*u(jt)),ir*(qt*nt*(jt+1/jt)-2*i(nt))]}wr.invert=function(ve,xe){if(!(Xe=Se.invert(ve/1.2,xe*1.065)))return null;var Ie=Xe[0],qe=Xe[1],Qe=20,Xe;ve/=ir,xe/=ir;do{var nt=Ie/2,qt=qe/2,jt=m(nt),ar=o(nt),fr=m(qt),br=o(qt),Fr=o(qe),Hr=G(Fr),ri=fr/(br+C*ar*Hr),Ci=ri*ri,cn=G(2/(1+Ci)),sn=C*br+(ar+jt)*Hr,Ln=C*br+(ar-jt)*Hr,Yn=sn/Ln,Aa=G(Yn),fa=Aa-1/Aa,$a=Aa+1/Aa,Co=cn*fa-2*u(Aa)-ve,Qa=cn*ri*$a-2*i(ri)-xe,mo=fr&&x*Hr*jt*Ci/fr,Bo=(C*ar*br+Hr)/(2*(br+C*ar*Hr)*(br+C*ar*Hr)*Hr),Ps=-.5*ri*cn*cn*cn,Ts=Ps*mo,wo=Ps*Bo,To=(To=2*br+C*Hr*(ar-jt))*To*Aa,hl=(C*ar*br*Hr+Fr)/To,Ul=-(C*jt*fr)/(Hr*To),Lu=fa*Ts-2*hl/Aa+cn*(hl+hl/Yn),au=fa*wo-2*Ul/Aa+cn*(Ul+Ul/Yn),Js=ri*$a*Ts-2*mo/(1+Ci)+cn*$a*mo+cn*ri*(hl-hl/Yn),eu=ri*$a*wo-2*Bo/(1+Ci)+cn*$a*Bo+cn*ri*(Ul-Ul/Yn),dc=au*Js-eu*Lu;if(!dc)break;var Tl=(Qa*au-Co*eu)/dc,Al=(Co*Js-Qa*Lu)/dc;Ie-=Tl,qe=c(-T,f(T,qe-Al))}while((n(Tl)>p||n(Al)>p)&&--Qe>0);return n(n(qe)-T)qe){var br=G(fr),Fr=a(ar,jt),Hr=Ie*d(Fr/Ie),ri=Fr-Hr,Ci=ve*o(ri),cn=(ve*m(ri)-ri*m(Ci))/(T-Ci),sn=Wa(ri,cn),Ln=(M-ve)/Fa(sn,Ci,M);jt=br;var Yn=50,Aa;do jt-=Aa=(ve+Fa(sn,Ci,jt)*Ln-br)/(sn(jt)*Ln);while(n(Aa)>p&&--Yn>0);ar=ri*m(jt),jtqe){var jt=G(qt),ar=a(nt,Xe),fr=Ie*d(ar/Ie),br=ar-fr;Xe=jt*o(br),nt=jt*m(br);for(var Fr=Xe-T,Hr=m(Xe),ri=nt/Hr,Ci=Xep||n(ri)>p)&&--Ci>0);return[br,Fr]},jt}var jn=da(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Ha(){return t.geoProjection(jn).scale(149.995)}var vo=da(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Gn(){return t.geoProjection(vo).scale(153.93)}var Ct=da(5/6*M,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Ar(){return t.geoProjection(Ct).scale(130.945)}function Jr(ve,xe){var Ie=ve*ve,qe=xe*xe;return[ve*(1-.162388*qe)*(.87-952426e-9*Ie*Ie),xe*(1+qe/12)]}Jr.invert=function(ve,xe){var Ie=ve,qe=xe,Qe=50,Xe;do{var nt=qe*qe;qe-=Xe=(qe*(1+nt/12)-xe)/(1+nt/4)}while(n(Xe)>p&&--Qe>0);Qe=50,ve/=1-.162388*nt;do{var qt=(qt=Ie*Ie)*qt;Ie-=Xe=(Ie*(.87-952426e-9*qt)-ve)/(.87-.00476213*qt)}while(n(Xe)>p&&--Qe>0);return[Ie,qe]};function hi(){return t.geoProjection(Jr).scale(131.747)}var hn=da(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Sn(){return t.geoProjection(hn).scale(131.087)}function En(ve){var xe=ve(T,0)[0]-ve(-T,0)[0];function Ie(qe,Qe){var Xe=qe>0?-.5:.5,nt=ve(qe+Xe*M,Qe);return nt[0]-=Xe*xe,nt}return ve.invert&&(Ie.invert=function(qe,Qe){var Xe=qe>0?-.5:.5,nt=ve.invert(qe+Xe*xe,Qe),qt=nt[0]-Xe*M;return qt<-M?qt+=2*M:qt>M&&(qt-=2*M),nt[0]=qt,nt}),Ie}function ki(ve,xe){var Ie=v(ve),qe=v(xe),Qe=o(xe),Xe=o(ve)*Qe,nt=m(ve)*Qe,qt=m(qe*xe);ve=n(a(nt,qt)),xe=q(Xe),n(ve-T)>p&&(ve%=T);var jt=_n(ve>M/4?T-ve:ve,xe);return ve>M/4&&(qt=jt[0],jt[0]=-jt[1],jt[1]=-qt),jt[0]*=Ie,jt[1]*=-qe,jt}ki.invert=function(ve,xe){n(ve)>1&&(ve=v(ve)*2-ve),n(xe)>1&&(xe=v(xe)*2-xe);var Ie=v(ve),qe=v(xe),Qe=-Ie*ve,Xe=-qe*xe,nt=Xe/Qe<1,qt=ya(nt?Xe:Qe,nt?Qe:Xe),jt=qt[0],ar=qt[1],fr=o(ar);return nt&&(jt=-T-jt),[Ie*(a(m(jt)*fr,-m(ar))+M),qe*q(o(jt)*fr)]};function _n(ve,xe){if(xe===T)return[0,0];var Ie=m(xe),qe=Ie*Ie,Qe=qe*qe,Xe=1+Qe,nt=1+3*Qe,qt=1-Qe,jt=q(1/G(Xe)),ar=qt+qe*Xe*jt,fr=(1-Ie)/ar,br=G(fr),Fr=fr*Xe,Hr=G(Fr),ri=br*qt,Ci,cn;if(ve===0)return[0,-(ri+qe*Hr)];var sn=o(xe),Ln=1/sn,Yn=2*Ie*sn,Aa=(-3*qe+jt*nt)*Yn,fa=(-ar*sn-(1-Ie)*Aa)/(ar*ar),$a=.5*fa/br,Co=qt*$a-2*qe*br*Yn,Qa=qe*Xe*fa+fr*nt*Yn,mo=-Ln*Yn,Bo=-Ln*Qa,Ps=-2*Ln*Co,Ts=4*ve/M,wo;if(ve>.222*M||xe.175*M){if(Ci=(ri+qe*G(Fr*(1+Qe)-ri*ri))/(1+Qe),ve>M/4)return[Ci,Ci];var To=Ci,hl=.5*Ci;Ci=.5*(hl+To),cn=50;do{var Ul=G(Fr-Ci*Ci),Lu=Ci*(Ps+mo*Ul)+Bo*q(Ci/Hr)-Ts;if(!Lu)break;Lu<0?hl=Ci:To=Ci,Ci=.5*(hl+To)}while(n(To-hl)>p&&--cn>0)}else{Ci=p,cn=25;do{var au=Ci*Ci,Js=G(Fr-au),eu=Ps+mo*Js,dc=Ci*eu+Bo*q(Ci/Hr)-Ts,Tl=eu+(Bo-mo*au)/Js;Ci-=wo=Js?dc/Tl:0}while(n(wo)>p&&--cn>0)}return[Ci,-ri-qe*G(Fr-Ci*Ci)]}function ya(ve,xe){for(var Ie=0,qe=1,Qe=.5,Xe=50;;){var nt=Qe*Qe,qt=G(Qe),jt=q(1/G(1+nt)),ar=1-nt+Qe*(1+nt)*jt,fr=(1-qt)/ar,br=G(fr),Fr=fr*(1+nt),Hr=br*(1-nt),ri=Fr-ve*ve,Ci=G(ri),cn=xe+Hr+Qe*Ci;if(n(qe-Ie)0?Ie=Qe:qe=Qe,Qe=.5*(Ie+qe)}if(!Xe)return null;var sn=q(qt),Ln=o(sn),Yn=1/Ln,Aa=2*qt*Ln,fa=(-3*Qe+jt*(1+3*nt))*Aa,$a=(-ar*Ln-(1-qt)*fa)/(ar*ar),Co=.5*$a/br,Qa=(1-nt)*Co-2*Qe*br*Aa,mo=-2*Yn*Qa,Bo=-Yn*Aa,Ps=-Yn*(Qe*(1+nt)*$a+fr*(1+3*nt)*Aa);return[M/4*(ve*(mo+Bo*Ci)+Ps*q(ve/G(Fr))),sn]}function ea(){return t.geoProjection(En(ki)).scale(239.75)}function Ma(ve,xe,Ie){var qe,Qe,Xe;return ve?(qe=_o(ve,Ie),xe?(Qe=_o(xe,1-Ie),Xe=Qe[1]*Qe[1]+Ie*qe[0]*qe[0]*Qe[0]*Qe[0],[[qe[0]*Qe[2]/Xe,qe[1]*qe[2]*Qe[0]*Qe[1]/Xe],[qe[1]*Qe[1]/Xe,-qe[0]*qe[2]*Qe[0]*Qe[2]/Xe],[qe[2]*Qe[1]*Qe[2]/Xe,-Ie*qe[0]*qe[1]*Qe[0]/Xe]]):[[qe[0],0],[qe[1],0],[qe[2],0]]):(Qe=_o(xe,1-Ie),[[0,Qe[0]/Qe[1]],[1/Qe[1],0],[Qe[2]/Qe[1],0]])}function _o(ve,xe){var Ie,qe,Qe,Xe,nt;if(xe=1-p)return Ie=(1-xe)/4,qe=N(ve),Xe=Z(ve),Qe=1/qe,nt=qe*j(ve),[Xe+Ie*(nt-ve)/(qe*qe),Qe-Ie*Xe*Qe*(nt-ve),Qe+Ie*Xe*Qe*(nt+ve),2*i(s(ve))-T+Ie*(nt-ve)/qe];var qt=[1,0,0,0,0,0,0,0,0],jt=[G(xe),0,0,0,0,0,0,0,0],ar=0;for(qe=G(1-xe),nt=1;n(jt[ar]/qt[ar])>p&&ar<8;)Ie=qt[ar++],jt[ar]=(Ie-qe)/2,qt[ar]=(Ie+qe)/2,qe=G(Ie*qe),nt*=2;Qe=nt*qt[ar]*ve;do Xe=jt[ar]*m(qe=Qe)/qt[ar],Qe=(q(Xe)+Qe)/2;while(--ar);return[m(Qe),Xe=o(Qe),Xe/o(Qe-qe),Qe]}function No(ve,xe,Ie){var qe=n(ve),Qe=n(xe),Xe=j(Qe);if(qe){var nt=1/m(qe),qt=1/(b(qe)*b(qe)),jt=-(qt+Ie*(Xe*Xe*nt*nt)-1+Ie),ar=(Ie-1)*qt,fr=(-jt+G(jt*jt-4*ar))/2;return[po(i(1/G(fr)),Ie)*v(ve),po(i(G((fr/qt-1)/Ie)),1-Ie)*v(xe)]}return[0,po(i(Xe),1-Ie)*v(xe)]}function po(ve,xe){if(!xe)return ve;if(xe===1)return u(b(ve/2+L));for(var Ie=1,qe=G(1-xe),Qe=G(xe),Xe=0;n(Qe)>p;Xe++){if(ve%M){var nt=i(qe*b(ve)/Ie);nt<0&&(nt+=M),ve+=nt+~~(ve/M)*M}else ve+=ve;Qe=(Ie+qe)/2,qe=G(Ie*qe),Qe=((Ie=Qe)-qe)/2}return ve/(h(2,Xe)*Ie)}function Lo(ve,xe){var Ie=(C-1)/(C+1),qe=G(1-Ie*Ie),Qe=po(T,qe*qe),Xe=-1,nt=u(b(M/4+n(xe)/2)),qt=s(Xe*nt)/G(Ie),jt=ko(qt*o(Xe*ve),qt*m(Xe*ve)),ar=No(jt[0],jt[1],qe*qe);return[-ar[1],(xe>=0?1:-1)*(.5*Qe-ar[0])]}function ko(ve,xe){var Ie=ve*ve,qe=xe+1,Qe=1-Ie-xe*xe;return[.5*((ve>=0?T:-T)-a(Qe,2*ve)),-.25*u(Qe*Qe+4*Ie)+.5*u(qe*qe+Ie)]}function Ds(ve,xe){var Ie=xe[0]*xe[0]+xe[1]*xe[1];return[(ve[0]*xe[0]+ve[1]*xe[1])/Ie,(ve[1]*xe[0]-ve[0]*xe[1])/Ie]}Lo.invert=function(ve,xe){var Ie=(C-1)/(C+1),qe=G(1-Ie*Ie),Qe=po(T,qe*qe),Xe=-1,nt=Ma(.5*Qe-xe,-ve,qe*qe),qt=Ds(nt[0],nt[1]),jt=a(qt[1],qt[0])/Xe;return[jt,2*i(s(.5/Xe*u(Ie*qt[0]*qt[0]+Ie*qt[1]*qt[1])))-T]};function Fs(){return t.geoProjection(En(Lo)).scale(151.496)}function ll(ve){var xe=m(ve),Ie=o(ve),qe=ul(ve);qe.invert=ul(-ve);function Qe(Xe,nt){var qt=qe(Xe,nt);Xe=qt[0],nt=qt[1];var jt=m(nt),ar=o(nt),fr=o(Xe),br=U(xe*jt+Ie*ar*fr),Fr=m(br),Hr=n(Fr)>p?br/Fr:1;return[Hr*Ie*m(Xe),(n(Xe)>T?Hr:-Hr)*(xe*ar-Ie*jt*fr)]}return Qe.invert=function(Xe,nt){var qt=G(Xe*Xe+nt*nt),jt=-m(qt),ar=o(qt),fr=qt*ar,br=-nt*jt,Fr=qt*xe,Hr=G(fr*fr+br*br-Fr*Fr),ri=a(fr*Fr+br*Hr,br*Fr-fr*Hr),Ci=(qt>T?-1:1)*a(Xe*jt,qt*o(ri)*ar+nt*m(ri)*jt);return qe.invert(Ci,ri)},Qe}function ul(ve){var xe=m(ve),Ie=o(ve);return function(qe,Qe){var Xe=o(Qe),nt=o(qe)*Xe,qt=m(qe)*Xe,jt=m(Qe);return[a(qt,nt*Ie-jt*xe),q(jt*Ie+nt*xe)]}}function zl(){var ve=0,xe=t.geoProjectionMutator(ll),Ie=xe(ve),qe=Ie.rotate,Qe=Ie.stream,Xe=t.geoCircle();return Ie.parallel=function(nt){if(!arguments.length)return ve*P;var qt=Ie.rotate();return xe(ve=nt*E).rotate(qt)},Ie.rotate=function(nt){return arguments.length?(qe.call(Ie,[nt[0],nt[1]-ve*P]),Xe.center([-nt[0],-nt[1]]),Ie):(nt=qe.call(Ie),nt[1]+=ve*P,nt)},Ie.stream=function(nt){return nt=Qe(nt),nt.sphere=function(){nt.polygonStart();var qt=.01,jt=Xe.radius(90-qt)().coordinates[0],ar=jt.length-1,fr=-1,br;for(nt.lineStart();++fr=0;)nt.point((br=jt[fr])[0],br[1]);nt.lineEnd(),nt.polygonEnd()},nt},Ie.scale(79.4187).parallel(45).clipAngle(180-.001)}var us=3,il=q(1-1/us)*P,As=Yr(0);function cl(ve){var xe=il*E,Ie=xt(M,xe)[0]-xt(-M,xe)[0],qe=As(0,xe)[1],Qe=xt(0,xe)[1],Xe=S-Qe,nt=g/ve,qt=4/g,jt=qe+Xe*Xe*4/g;function ar(fr,br){var Fr,Hr=n(br);if(Hr>xe){var ri=f(ve-1,c(0,l((fr+M)/nt)));fr+=M*(ve-1)/ve-ri*nt,Fr=xt(fr,Hr),Fr[0]=Fr[0]*g/Ie-g*(ve-1)/(2*ve)+ri*g/ve,Fr[1]=qe+(Fr[1]-Qe)*4*Xe/g,br<0&&(Fr[1]=-Fr[1])}else Fr=As(fr,br);return Fr[0]*=qt,Fr[1]/=jt,Fr}return ar.invert=function(fr,br){fr/=qt,br*=jt;var Fr=n(br);if(Fr>qe){var Hr=f(ve-1,c(0,l((fr+M)/nt)));fr=(fr+M*(ve-1)/ve-Hr*nt)*Ie/g;var ri=xt.invert(fr,.25*(Fr-qe)*g/Xe+Qe);return ri[0]-=M*(ve-1)/ve-Hr*nt,br<0&&(ri[1]=-ri[1]),ri}return As.invert(fr,br)},ar}function Ks(ve,xe){return[ve,xe&1?90-p:il]}function zs(ve,xe){return[ve,xe&1?-90+p:-il]}function Io(ve){return[ve[0]*(1-p),ve[1]]}function ls(ve){var xe=[].concat(r.range(-180,180+ve/2,ve).map(Ks),r.range(180,-180-ve/2,-ve).map(zs));return{type:"Polygon",coordinates:[ve===180?xe.map(Io):xe]}}function Yl(){var ve=4,xe=t.geoProjectionMutator(cl),Ie=xe(ve),qe=Ie.stream;return Ie.lobes=function(Qe){return arguments.length?xe(ve=+Qe):ve},Ie.stream=function(Qe){var Xe=Ie.rotate(),nt=qe(Qe),qt=(Ie.rotate([0,0]),qe(Qe));return Ie.rotate(Xe),nt.sphere=function(){t.geoStream(ls(180/ve),qt)},nt},Ie.scale(239.75)}function Su(ve){var xe=1+ve,Ie=m(1/xe),qe=q(Ie),Qe=2*G(M/(Xe=M+4*qe*xe)),Xe,nt=.5*Qe*(xe+G(ve*(2+ve))),qt=ve*ve,jt=xe*xe;function ar(fr,br){var Fr=1-m(br),Hr,ri;if(Fr&&Fr<2){var Ci=T-br,cn=25,sn;do{var Ln=m(Ci),Yn=o(Ci),Aa=qe+a(Ln,xe-Yn),fa=1+jt-2*xe*Yn;Ci-=sn=(Ci-qt*qe-xe*Ln+fa*Aa-.5*Fr*Xe)/(2*xe*Ln*Aa)}while(n(sn)>k&&--cn>0);Hr=Qe*G(fa),ri=fr*Aa/M}else Hr=Qe*(ve+Fr),ri=fr*qe/M;return[Hr*m(ri),nt-Hr*o(ri)]}return ar.invert=function(fr,br){var Fr=fr*fr+(br-=nt)*br,Hr=(1+jt-Fr/(Qe*Qe))/(2*xe),ri=U(Hr),Ci=m(ri),cn=qe+a(Ci,xe-Hr);return[q(fr/G(Fr))*M/cn,q(1-2*(ri-qt*qe-xe*Ci+(1+jt-2*xe*Hr)*cn)/Xe)]},ar}function nc(){var ve=1,xe=t.geoProjectionMutator(Su),Ie=xe(ve);return Ie.ratio=function(qe){return arguments.length?xe(ve=+qe):ve},Ie.scale(167.774).center([0,18.67])}var bs=.7109889596207567,Rn=.0528035274542;function _a(ve,xe){return xe>-bs?(ve=tt(ve,xe),ve[1]+=Rn,ve):dt(ve,xe)}_a.invert=function(ve,xe){return xe>-bs?tt.invert(ve,xe-Rn):dt.invert(ve,xe)};function Vu(){return t.geoProjection(_a).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function ql(ve,xe){return n(xe)>bs?(ve=tt(ve,xe),ve[1]-=xe>0?Rn:-Rn,ve):dt(ve,xe)}ql.invert=function(ve,xe){return n(xe)>bs?tt.invert(ve,xe+(xe>0?Rn:-Rn)):dt.invert(ve,xe)};function xo(){return t.geoProjection(ql).scale(152.63)}function Kl(ve,xe,Ie,qe){var Qe=G(4*M/(2*Ie+(1+ve-xe/2)*m(2*Ie)+(ve+xe)/2*m(4*Ie)+xe/2*m(6*Ie))),Xe=G(qe*m(Ie)*G((1+ve*o(2*Ie)+xe*o(4*Ie))/(1+ve+xe))),nt=Ie*jt(1);function qt(br){return G(1+ve*o(2*br)+xe*o(4*br))}function jt(br){var Fr=br*Ie;return(2*Fr+(1+ve-xe/2)*m(2*Fr)+(ve+xe)/2*m(4*Fr)+xe/2*m(6*Fr))/Ie}function ar(br){return qt(br)*m(br)}var fr=function(br,Fr){var Hr=Ie*Vt(jt,nt*m(Fr)/Ie,Fr/M);isNaN(Hr)&&(Hr=Ie*v(Fr));var ri=Qe*qt(Hr);return[ri*Xe*br/M*o(Hr),ri/Xe*m(Hr)]};return fr.invert=function(br,Fr){var Hr=Vt(ar,Fr*Xe/Qe);return[br*M/(o(Hr)*Qe*Xe*qt(Hr)),q(Ie*jt(Hr/Ie)/nt)]},Ie===0&&(Qe=G(qe/M),fr=function(br,Fr){return[br*Qe,m(Fr)/Qe]},fr.invert=function(br,Fr){return[br/Qe,q(Fr*Qe)]}),fr}function Ns(){var ve=1,xe=0,Ie=45*E,qe=2,Qe=t.geoProjectionMutator(Kl),Xe=Qe(ve,xe,Ie,qe);return Xe.a=function(nt){return arguments.length?Qe(ve=+nt,xe,Ie,qe):ve},Xe.b=function(nt){return arguments.length?Qe(ve,xe=+nt,Ie,qe):xe},Xe.psiMax=function(nt){return arguments.length?Qe(ve,xe,Ie=+nt*E,qe):Ie*P},Xe.ratio=function(nt){return arguments.length?Qe(ve,xe,Ie,qe=+nt):qe},Xe.scale(180.739)}function Hl(ve,xe,Ie,qe,Qe,Xe,nt,qt,jt,ar,fr){if(fr.nanEncountered)return NaN;var br,Fr,Hr,ri,Ci,cn,sn,Ln,Yn,Aa;if(br=Ie-xe,Fr=ve(xe+br*.25),Hr=ve(Ie-br*.25),isNaN(Fr)){fr.nanEncountered=!0;return}if(isNaN(Hr)){fr.nanEncountered=!0;return}return ri=br*(qe+4*Fr+Qe)/12,Ci=br*(Qe+4*Hr+Xe)/12,cn=ri+Ci,Aa=(cn-nt)/15,ar>jt?(fr.maxDepthCount++,cn+Aa):Math.abs(Aa)>1;do jt[cn]>Hr?Ci=cn:ri=cn,cn=ri+Ci>>1;while(cn>ri);var sn=jt[cn+1]-jt[cn];return sn&&(sn=(Hr-jt[cn+1])/sn),(cn+1+sn)/nt}var br=2*fr(1)/M*Xe/Ie,Fr=function(Hr,ri){var Ci=fr(n(m(ri))),cn=qe(Ci)*Hr;return Ci/=br,[cn,ri>=0?Ci:-Ci]};return Fr.invert=function(Hr,ri){var Ci;return ri*=br,n(ri)<1&&(Ci=v(ri)*q(Qe(n(ri))*Xe)),[Hr/qe(n(ri)),Ci]},Fr}function qo(){var ve=0,xe=2.5,Ie=1.183136,qe=t.geoProjectionMutator(oa),Qe=qe(ve,xe,Ie);return Qe.alpha=function(Xe){return arguments.length?qe(ve=+Xe,xe,Ie):ve},Qe.k=function(Xe){return arguments.length?qe(ve,xe=+Xe,Ie):xe},Qe.gamma=function(Xe){return arguments.length?qe(ve,xe,Ie=+Xe):Ie},Qe.scale(152.63)}function Oo(ve,xe){return n(ve[0]-xe[0])=0;--jt)Ie=ve[1][jt],qe=Ie[0][0],Qe=Ie[0][1],Xe=Ie[1][1],nt=Ie[2][0],qt=Ie[2][1],xe.push(Ol([[nt-p,qt-p],[nt-p,Xe+p],[qe+p,Xe+p],[qe+p,Qe-p]],30));return{type:"Polygon",coordinates:[r.merge(xe)]}}function Do(ve,xe,Ie){var qe,Qe;function Xe(jt,ar){for(var fr=ar<0?-1:1,br=xe[+(ar<0)],Fr=0,Hr=br.length-1;Frbr[Fr][2][0];++Fr);var ri=ve(jt-br[Fr][1][0],ar);return ri[0]+=ve(br[Fr][1][0],fr*ar>fr*br[Fr][0][1]?br[Fr][0][1]:ar)[0],ri}Ie?Xe.invert=Ie(Xe):ve.invert&&(Xe.invert=function(jt,ar){for(var fr=Qe[+(ar<0)],br=xe[+(ar<0)],Fr=0,Hr=fr.length;Frri&&(Ci=Hr,Hr=ri,ri=Ci),[[br,Hr],[Fr,ri]]})}),nt):xe.map(function(ar){return ar.map(function(fr){return[[fr[0][0]*P,fr[0][1]*P],[fr[1][0]*P,fr[1][1]*P],[fr[2][0]*P,fr[2][1]*P]]})})},xe!=null&&nt.lobes(xe),nt}var rf=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Vf(){return Do(rt,rf).scale(160.857)}var pl=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Zc(){return Do(ql,pl).scale(152.63)}var Jl=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function qs(){return Do(tt,Jl).scale(169.529)}var yu=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function oc(){return Do(tt,yu).scale(169.529).rotate([20,0])}var Cf=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function sc(){return Do(_a,Cf,st).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var jh=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function Lf(){return Do(dt,jh).scale(152.63).rotate([-20,0])}function cs(ve,xe){return[3/g*ve*G(M*M/3-xe*xe),xe]}cs.invert=function(ve,xe){return[g/3*ve/G(M*M/3-xe*xe),xe]};function nf(){return t.geoProjection(cs).scale(158.837)}function Gf(ve){function xe(Ie,qe){if(n(n(qe)-T)2)return null;Ie/=2,qe/=2;var Xe=Ie*Ie,nt=qe*qe,qt=2*qe/(1+Xe+nt);return qt=h((1+qt)/(1-qt),1/ve),[a(2*Ie,1-Xe-nt)/ve,q((qt-1)/(qt+1))]},xe}function $l(){var ve=.5,xe=t.geoProjectionMutator(Gf),Ie=xe(ve);return Ie.spacing=function(qe){return arguments.length?xe(ve=+qe):ve},Ie.scale(124.75)}var fl=M/C;function lc(ve,xe){return[ve*(1+G(o(xe)))/2,xe/(o(xe/2)*o(ve/6))]}lc.invert=function(ve,xe){var Ie=n(ve),qe=n(xe),Qe=p,Xe=T;qep||n(cn)>p)&&--Qe>0);return Qe&&[Ie,qe]};function Hs(){return t.geoProjection(Es).scale(139.98)}function Go(ve,xe){return[m(ve)/o(xe),b(xe)*o(ve)]}Go.invert=function(ve,xe){var Ie=ve*ve,qe=xe*xe,Qe=qe+1,Xe=Ie+Qe,nt=ve?x*G((Xe-G(Xe*Xe-4*Ie))/Ie):1/G(Qe);return[q(ve*nt),v(xe)*U(nt)]};function ps(){return t.geoProjection(Go).scale(144.049).clipAngle(90-.001)}function uc(ve){var xe=o(ve),Ie=b(L+ve/2);function qe(Qe,Xe){var nt=Xe-ve,qt=n(nt)=0;)fr=ve[ar],br=fr[0]+qt*(Hr=br)-jt*Fr,Fr=fr[1]+qt*Fr+jt*Hr;return br=qt*(Hr=br)-jt*Fr,Fr=qt*Fr+jt*Hr,[br,Fr]}return Ie.invert=function(qe,Qe){var Xe=20,nt=qe,qt=Qe;do{for(var jt=xe,ar=ve[jt],fr=ar[0],br=ar[1],Fr=0,Hr=0,ri;--jt>=0;)ar=ve[jt],Fr=fr+nt*(ri=Fr)-qt*Hr,Hr=br+nt*Hr+qt*ri,fr=ar[0]+nt*(ri=fr)-qt*br,br=ar[1]+nt*br+qt*ri;Fr=fr+nt*(ri=Fr)-qt*Hr,Hr=br+nt*Hr+qt*ri,fr=nt*(ri=fr)-qt*br-qe,br=nt*br+qt*ri-Qe;var Ci=Fr*Fr+Hr*Hr,cn,sn;nt-=cn=(fr*Fr+br*Hr)/Ci,qt-=sn=(br*Fr-fr*Hr)/Ci}while(n(cn)+n(sn)>p*p&&--Xe>0);if(Xe){var Ln=G(nt*nt+qt*qt),Yn=2*i(Ln*.5),Aa=m(Yn);return[a(nt*Aa,Ln*o(Yn)),Ln?q(qt*Aa/Ln):0]}},Ie}var Po=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],sd=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Ko=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Pa=[[.9245,0],[0,0],[.01943,0]],af=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Hu(){return Bl(Po,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function bl(){return Bl(sd,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Hf(){return Bl(Ko,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Ic(){return Bl(Pa,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function yf(){return Bl(af,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Bl(ve,xe){var Ie=t.geoProjection(od(ve)).rotate(xe).clipAngle(90),qe=t.geoRotation(xe),Qe=Ie.center;return delete Ie.rotate,Ie.center=function(Xe){return arguments.length?Qe(qe(Xe)):qe.invert(Qe())},Ie}var Ah=G(6),Qf=G(7);function _f(ve,xe){var Ie=q(7*m(xe)/(3*Ah));return[Ah*ve*(2*o(2*Ie/3)-1)/Qf,9*m(Ie/3)/Qf]}_f.invert=function(ve,xe){var Ie=3*q(xe*Qf/9);return[ve*Qf/(Ah*(2*o(2*Ie/3)-1)),q(m(Ie)*3*Ah/7)]};function Yc(){return t.geoProjection(_f).scale(164.859)}function eh(ve,xe){for(var Ie=(1+x)*m(xe),qe=xe,Qe=0,Xe;Qe<25&&(qe-=Xe=(m(qe/2)+m(qe)-Ie)/(.5*o(qe/2)+o(qe)),!(n(Xe)k&&--qe>0);return Xe=Ie*Ie,nt=Xe*Xe,qt=Xe*nt,[ve/(.84719-.13063*Xe+qt*qt*(-.04515+.05494*Xe-.02326*nt+.00331*qt)),Ie]};function of(){return t.geoProjection(cc).scale(175.295)}function Nl(ve,xe){return[ve*(1+o(xe))/2,2*(xe-b(xe/2))]}Nl.invert=function(ve,xe){for(var Ie=xe/2,qe=0,Qe=1/0;qe<10&&n(Qe)>p;++qe){var Xe=o(xe/2);xe-=Qe=(xe-b(xe/2)-Ie)/(1-.5/(Xe*Xe))}return[2*ve/(1+o(xe)),xe]};function Kc(){return t.geoProjection(Nl).scale(152.63)}var Rc=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function gs(){return Do(He(1/0),Rc).rotate([20,0]).scale(152.63)}function Wf(ve,xe){var Ie=m(xe),qe=o(xe),Qe=v(ve);if(ve===0||n(xe)===T)return[0,xe];if(xe===0)return[ve,0];if(n(ve)===T)return[ve*qe,T*Ie];var Xe=M/(2*ve)-2*ve/M,nt=2*xe/M,qt=(1-nt*nt)/(Ie-nt),jt=Xe*Xe,ar=qt*qt,fr=1+jt/ar,br=1+ar/jt,Fr=(Xe*Ie/qt-Xe/2)/fr,Hr=(ar*Ie/jt+qt/2)/br,ri=Fr*Fr+qe*qe/fr,Ci=Hr*Hr-(ar*Ie*Ie/jt+qt*Ie-1)/br;return[T*(Fr+G(ri)*Qe),T*(Hr+G(Ci<0?0:Ci)*v(-xe*Xe)*Qe)]}Wf.invert=function(ve,xe){ve/=T,xe/=T;var Ie=ve*ve,qe=xe*xe,Qe=Ie+qe,Xe=M*M;return[ve?(Qe-1+G((1-Qe)*(1-Qe)+4*Ie))/(2*ve)*T:0,Vt(function(nt){return Qe*(M*m(nt)-2*nt)*M+4*nt*nt*(xe-m(nt))+2*M*nt-Xe*xe},0)]};function Wh(){return t.geoProjection(Wf).scale(127.267)}var rh=1.0148,sf=.23185,Sh=-.14499,Mu=.02406,ih=rh,js=5*sf,Eu=7*Sh,Dc=9*Mu,ks=1.790857183;function bc(ve,xe){var Ie=xe*xe;return[ve,xe*(rh+Ie*Ie*(sf+Ie*(Sh+Mu*Ie)))]}bc.invert=function(ve,xe){xe>ks?xe=ks:xe<-ks&&(xe=-ks);var Ie=xe,qe;do{var Qe=Ie*Ie;Ie-=qe=(Ie*(rh+Qe*Qe*(sf+Qe*(Sh+Mu*Qe)))-xe)/(ih+Qe*Qe*(js+Qe*(Eu+Dc*Qe)))}while(n(qe)>p);return[ve,Ie]};function hu(){return t.geoProjection(bc).scale(139.319)}function _u(ve,xe){if(n(xe)p&&--Qe>0);return nt=b(qe),[(n(xe)=0;)if(qe=xe[qt],Ie[0]===qe[0]&&Ie[1]===qe[1]){if(Xe)return[Xe,Ie];Xe=Ie}}}function jl(ve){for(var xe=ve.length,Ie=[],qe=ve[xe-1],Qe=0;Qe0?[-qe[0],0]:[180-qe[0],180])};var xe=If.map(function(Ie){return{face:Ie,project:ve(Ie)}});return[-1,0,0,1,0,1,4,5].forEach(function(Ie,qe){var Qe=xe[Ie];Qe&&(Qe.children||(Qe.children=[])).push(xe[qe])}),xf(xe[0],function(Ie,qe){return xe[Ie<-M/2?qe<0?6:4:Ie<0?qe<0?2:0:Ieqe^Hr>qe&&Ie<(Fr-ar)*(qe-fr)/(Hr-fr)+ar&&(Qe=!Qe)}return Qe}function Wl(ve,xe){var Ie=xe.stream,qe;if(!Ie)throw new Error("invalid projection");switch(ve&&ve.type){case"Feature":qe=Zu;break;case"FeatureCollection":qe=ah;break;default:qe=Tc;break}return qe(ve,Ie)}function ah(ve,xe){return{type:"FeatureCollection",features:ve.features.map(function(Ie){return Zu(Ie,xe)})}}function Zu(ve,xe){return{type:"Feature",id:ve.id,properties:ve.properties,geometry:Tc(ve.geometry,xe)}}function qc(ve,xe){return{type:"GeometryCollection",geometries:ve.geometries.map(function(Ie){return Tc(Ie,xe)})}}function Tc(ve,xe){if(!ve)return null;if(ve.type==="GeometryCollection")return qc(ve,xe);var Ie;switch(ve.type){case"Point":Ie=Oc;break;case"MultiPoint":Ie=Oc;break;case"LineString":Ie=cf;break;case"MultiLineString":Ie=cf;break;case"Polygon":Ie=fc;break;case"MultiPolygon":Ie=fc;break;case"Sphere":Ie=fc;break;default:return null}return t.geoStream(ve,xe(Ie)),Ie.result()}var wl=[],vu=[],Oc={point:function(ve,xe){wl.push([ve,xe])},result:function(){var ve=wl.length?wl.length<2?{type:"Point",coordinates:wl[0]}:{type:"MultiPoint",coordinates:wl}:null;return wl=[],ve}},cf={lineStart:Xu,point:function(ve,xe){wl.push([ve,xe])},lineEnd:function(){wl.length&&(vu.push(wl),wl=[])},result:function(){var ve=vu.length?vu.length<2?{type:"LineString",coordinates:vu[0]}:{type:"MultiLineString",coordinates:vu}:null;return vu=[],ve}},fc={polygonStart:Xu,lineStart:Xu,point:function(ve,xe){wl.push([ve,xe])},lineEnd:function(){var ve=wl.length;if(ve){do wl.push(wl[0].slice());while(++ve<4);vu.push(wl),wl=[]}},polygonEnd:Xu,result:function(){if(!vu.length)return null;var ve=[],xe=[];return vu.forEach(function(Ie){uf(Ie)?ve.push([Ie]):xe.push(Ie)}),xe.forEach(function(Ie){var qe=Ie[0];ve.some(function(Qe){if(Zf(Qe[0],qe))return Qe.push(Ie),!0})||ve.push([Ie])}),vu=[],ve.length?ve.length>1?{type:"MultiPolygon",coordinates:ve}:{type:"Polygon",coordinates:ve[0]}:null}};function Bc(ve){var xe=ve(T,0)[0]-ve(-T,0)[0];function Ie(qe,Qe){var Xe=n(qe)0?qe-M:qe+M,Qe),qt=(nt[0]-nt[1])*x,jt=(nt[0]+nt[1])*x;if(Xe)return[qt,jt];var ar=xe*x,fr=qt>0^jt>0?-1:1;return[fr*qt-v(jt)*ar,fr*jt-v(qt)*ar]}return ve.invert&&(Ie.invert=function(qe,Qe){var Xe=(qe+Qe)*x,nt=(Qe-qe)*x,qt=n(Xe)<.5*xe&&n(nt)<.5*xe;if(!qt){var jt=xe*x,ar=Xe>0^nt>0?-1:1,fr=-ar*qe+(nt>0?1:-1)*jt,br=-ar*Qe+(Xe>0?1:-1)*jt;Xe=(-fr-br)*x,nt=(fr-br)*x}var Fr=ve.invert(Xe,nt);return qt||(Fr[0]+=Xe>0?M:-M),Fr}),t.geoProjection(Ie).rotate([-90,-90,45]).clipAngle(180-.001)}function kt(){return Bc(ki).scale(176.423)}function Zt(){return Bc(Lo).scale(111.48)}function Mr(ve,xe){if(!(0<=(xe=+xe)&&xe<=20))throw new Error("invalid digits");function Ie(ar){var fr=ar.length,br=2,Fr=new Array(fr);for(Fr[0]=+ar[0].toFixed(xe),Fr[1]=+ar[1].toFixed(xe);br2||Hr[0]!=fr[0]||Hr[1]!=fr[1])&&(br.push(Hr),fr=Hr)}return br.length===1&&ar.length>1&&br.push(Ie(ar[ar.length-1])),br}function Xe(ar){return ar.map(Qe)}function nt(ar){if(ar==null)return ar;var fr;switch(ar.type){case"GeometryCollection":fr={type:"GeometryCollection",geometries:ar.geometries.map(nt)};break;case"Point":fr={type:"Point",coordinates:Ie(ar.coordinates)};break;case"MultiPoint":fr={type:ar.type,coordinates:qe(ar.coordinates)};break;case"LineString":fr={type:ar.type,coordinates:Qe(ar.coordinates)};break;case"MultiLineString":case"Polygon":fr={type:ar.type,coordinates:Xe(ar.coordinates)};break;case"MultiPolygon":fr={type:"MultiPolygon",coordinates:ar.coordinates.map(Xe)};break;default:return ar}return ar.bbox!=null&&(fr.bbox=ar.bbox),fr}function qt(ar){var fr={type:"Feature",properties:ar.properties,geometry:nt(ar.geometry)};return ar.id!=null&&(fr.id=ar.id),ar.bbox!=null&&(fr.bbox=ar.bbox),fr}if(ve!=null)switch(ve.type){case"Feature":return qt(ve);case"FeatureCollection":{var jt={type:"FeatureCollection",features:ve.features.map(qt)};return ve.bbox!=null&&(jt.bbox=ve.bbox),jt}default:return nt(ve)}return ve}function xr(ve){var xe=m(ve);function Ie(qe,Qe){var Xe=xe?b(qe*xe/2)/xe:qe/2;if(!Qe)return[2*Xe,-ve];var nt=2*i(Xe*m(Qe)),qt=1/b(Qe);return[m(nt)*qt,Qe+(1-o(nt))*qt-ve]}return Ie.invert=function(qe,Qe){if(n(Qe+=ve)p&&--qt>0);var Fr=qe*(ar=b(nt)),Hr=b(n(Qe)0?T:-T)*(jt+Qe*(fr-nt)/2+Qe*Qe*(fr-2*jt+nt)/2)]}Wi.invert=function(ve,xe){var Ie=xe/T,qe=Ie*90,Qe=f(18,n(qe/5)),Xe=c(0,l(Qe));do{var nt=Mi[Xe][1],qt=Mi[Xe+1][1],jt=Mi[f(19,Xe+2)][1],ar=jt-nt,fr=jt-2*qt+nt,br=2*(n(Ie)-qt)/ar,Fr=fr/ar,Hr=br*(1-Fr*br*(1-2*Fr*br));if(Hr>=0||Xe===1){qe=(xe>=0?5:-5)*(Hr+Qe);var ri=50,Ci;do Qe=f(18,n(qe)/5),Xe=l(Qe),Hr=Qe-Xe,nt=Mi[Xe][1],qt=Mi[Xe+1][1],jt=Mi[f(19,Xe+2)][1],qe-=(Ci=(xe>=0?T:-T)*(qt+Hr*(jt-nt)/2+Hr*Hr*(jt-2*qt+nt)/2)-xe)*P;while(n(Ci)>k&&--ri>0);break}}while(--Xe>=0);var cn=Mi[Xe][0],sn=Mi[Xe+1][0],Ln=Mi[f(19,Xe+2)][0];return[ve/(sn+Hr*(Ln-cn)/2+Hr*Hr*(Ln-2*sn+cn)/2),qe*E]};function dn(){return t.geoProjection(Wi).scale(152.63)}function wn(ve){function xe(Ie,qe){var Qe=o(qe),Xe=(ve-1)/(ve-Qe*o(Ie));return[Xe*Qe*m(Ie),Xe*m(qe)]}return xe.invert=function(Ie,qe){var Qe=Ie*Ie+qe*qe,Xe=G(Qe),nt=(ve-G(1-Qe*(ve+1)/(ve-1)))/((ve-1)/Xe+Xe/(ve-1));return[a(Ie*nt,Xe*G(1-nt*nt)),Xe?q(qe*nt/Xe):0]},xe}function On(ve,xe){var Ie=wn(ve);if(!xe)return Ie;var qe=o(xe),Qe=m(xe);function Xe(nt,qt){var jt=Ie(nt,qt),ar=jt[1],fr=ar*Qe/(ve-1)+qe;return[jt[0]*qe/fr,ar/fr]}return Xe.invert=function(nt,qt){var jt=(ve-1)/(ve-1-qt*Qe);return Ie.invert(jt*nt,jt*qt*qe)},Xe}function Yi(){var ve=2,xe=0,Ie=t.geoProjectionMutator(On),qe=Ie(ve,xe);return qe.distance=function(Qe){return arguments.length?Ie(ve=+Qe,xe):ve},qe.tilt=function(Qe){return arguments.length?Ie(ve,xe=Qe*E):xe*P},qe.scale(432.147).clipAngle(U(1/ve)*P-1e-6)}var $i=1e-4,an=1e4,Fi=-180,ta=Fi+$i,Ca=180,Ra=Ca-$i,La=-90,Na=La+$i,Zn=90,Dn=Zn-$i;function Ka(ve){return ve.length>0}function bo(ve){return Math.floor(ve*an)/an}function Zo(ve){return ve===La||ve===Zn?[0,ve]:[Fi,bo(ve)]}function Ss(ve){var xe=ve[0],Ie=ve[1],qe=!1;return xe<=ta?(xe=Fi,qe=!0):xe>=Ra&&(xe=Ca,qe=!0),Ie<=Na?(Ie=La,qe=!0):Ie>=Dn&&(Ie=Zn,qe=!0),qe?[xe,Ie]:ve}function as(ve){return ve.map(Ss)}function ws(ve,xe,Ie){for(var qe=0,Qe=ve.length;qe=Ra||fr<=Na||fr>=Dn){Xe[nt]=Ss(jt);for(var br=nt+1;brta&&HrNa&&ri=qt)break;Ie.push({index:-1,polygon:xe,ring:Xe=Xe.slice(br-1)}),Xe[0]=Zo(Xe[0][1]),nt=-1,qt=Xe.length}}}}function Ho(ve){var xe,Ie=ve.length,qe={},Qe={},Xe,nt,qt,jt,ar;for(xe=0;xe0?M-qt:qt)*P],ar=t.geoProjection(ve(nt)).rotate(jt),fr=t.geoRotation(jt),br=ar.center;return delete ar.rotate,ar.center=function(Fr){return arguments.length?br(fr(Fr)):fr.invert(br())},ar.clipAngle(90)}function rs(ve){var xe=o(ve);function Ie(qe,Qe){var Xe=t.geoGnomonicRaw(qe,Qe);return Xe[0]*=xe,Xe}return Ie.invert=function(qe,Qe){return t.geoGnomonicRaw.invert(qe/xe,Qe)},Ie}function Ql(){return Cu([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Cu(ve,xe){return ys(rs,ve,xe)}function Yu(ve){if(!(ve*=2))return t.geoAzimuthalEquidistantRaw;var xe=-ve/2,Ie=-xe,qe=ve*ve,Qe=b(Ie),Xe=.5/m(Ie);function nt(qt,jt){var ar=U(o(jt)*o(qt-xe)),fr=U(o(jt)*o(qt-Ie)),br=jt<0?-1:1;return ar*=ar,fr*=fr,[(ar-fr)/(2*ve),br*G(4*qe*fr-(qe-ar+fr)*(qe-ar+fr))/(2*ve)]}return nt.invert=function(qt,jt){var ar=jt*jt,fr=o(G(ar+(Fr=qt+xe)*Fr)),br=o(G(ar+(Fr=qt+Ie)*Fr)),Fr,Hr;return[a(Hr=fr-br,Fr=(fr+br)*Qe),(jt<0?-1:1)*U(G(Fr*Fr+Hr*Hr)*Xe)]},nt}function Nc(){return pu([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function pu(ve,xe){return ys(Yu,ve,xe)}function Uc(ve,xe){if(n(xe)p&&--qt>0);return[v(ve)*(G(Qe*Qe+4)+Qe)*M/4,T*nt]};function Ku(){return t.geoProjection(hc).scale(127.16)}function ue(ve,xe,Ie,qe,Qe){function Xe(nt,qt){var jt=Ie*m(qe*qt),ar=G(1-jt*jt),fr=G(2/(1+ar*o(nt*=Qe)));return[ve*ar*fr*m(nt),xe*jt*fr]}return Xe.invert=function(nt,qt){var jt=nt/ve,ar=qt/xe,fr=G(jt*jt+ar*ar),br=2*q(fr/2);return[a(nt*b(br),ve*fr)/Qe,fr&&q(qt*m(br)/(xe*Ie*fr))/qe]},Xe}function w(ve,xe,Ie,qe){var Qe=M/3;ve=c(ve,p),xe=c(xe,p),ve=f(ve,T),xe=f(xe,M-p),Ie=c(Ie,0),Ie=f(Ie,100-p),qe=c(qe,p);var Xe=Ie/100+1,nt=qe/100,qt=U(Xe*o(Qe))/Qe,jt=m(ve)/m(qt*T),ar=xe/M,fr=G(nt*m(ve/2)/m(xe/2)),br=fr/G(ar*jt*qt),Fr=1/(fr*G(ar*jt*qt));return ue(br,Fr,jt,qt,ar)}function B(){var ve=65*E,xe=60*E,Ie=20,qe=200,Qe=t.geoProjectionMutator(w),Xe=Qe(ve,xe,Ie,qe);return Xe.poleline=function(nt){return arguments.length?Qe(ve=+nt*E,xe,Ie,qe):ve*P},Xe.parallels=function(nt){return arguments.length?Qe(ve,xe=+nt*E,Ie,qe):xe*P},Xe.inflation=function(nt){return arguments.length?Qe(ve,xe,Ie=+nt,qe):Ie},Xe.ratio=function(nt){return arguments.length?Qe(ve,xe,Ie,qe=+nt):qe},Xe.scale(163.775)}function Q(){return B().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var ee=4*M+3*G(3),le=2*G(2*M*G(3)/ee),ze=nr(le*G(3)/M,le,ee/6);function Ze(){return t.geoProjection(ze).scale(176.84)}function ut(ve,xe){return[ve*G(1-3*xe*xe/(M*M)),xe]}ut.invert=function(ve,xe){return[ve/G(1-3*xe*xe/(M*M)),xe]};function Mt(){return t.geoProjection(ut).scale(152.63)}function Jt(ve,xe){var Ie=o(xe),qe=o(ve)*Ie,Qe=1-qe,Xe=o(ve=a(m(ve)*Ie,-m(xe))),nt=m(ve);return Ie=G(1-qe*qe),[nt*Ie-Xe*Qe,-Xe*Ie-nt*Qe]}Jt.invert=function(ve,xe){var Ie=(ve*ve+xe*xe)/-2,qe=G(-Ie*(2+Ie)),Qe=xe*Ie+ve*qe,Xe=ve*Ie-xe*qe,nt=G(Xe*Xe+Qe*Qe);return[a(qe*Qe,nt*(1+Ie)),nt?-q(qe*Xe/nt):0]};function $t(){return t.geoProjection(Jt).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function mr(ve,xe){var Ie=ke(ve,xe);return[(Ie[0]+ve/T)/2,(Ie[1]+xe)/2]}mr.invert=function(ve,xe){var Ie=ve,qe=xe,Qe=25;do{var Xe=o(qe),nt=m(qe),qt=m(2*qe),jt=nt*nt,ar=Xe*Xe,fr=m(Ie),br=o(Ie/2),Fr=m(Ie/2),Hr=Fr*Fr,ri=1-ar*br*br,Ci=ri?U(Xe*br)*G(cn=1/ri):cn=0,cn,sn=.5*(2*Ci*Xe*Fr+Ie/T)-ve,Ln=.5*(Ci*nt+qe)-xe,Yn=.5*cn*(ar*Hr+Ci*Xe*br*jt)+.5/T,Aa=cn*(fr*qt/4-Ci*nt*Fr),fa=.125*cn*(qt*Fr-Ci*nt*ar*fr),$a=.5*cn*(jt*br+Ci*Hr*Xe)+.5,Co=Aa*fa-$a*Yn,Qa=(Ln*Aa-sn*$a)/Co,mo=(sn*fa-Ln*Yn)/Co;Ie-=Qa,qe-=mo}while((n(Qa)>p||n(mo)>p)&&--Qe>0);return[Ie,qe]};function Cr(){return t.geoProjection(mr).scale(158.837)}e.geoNaturalEarth=t.geoNaturalEarth1,e.geoNaturalEarthRaw=t.geoNaturalEarth1Raw,e.geoAiry=_e,e.geoAiryRaw=oe,e.geoAitoff=Ce,e.geoAitoffRaw=ke,e.geoArmadillo=ie,e.geoArmadilloRaw=ge,e.geoAugust=Ee,e.geoAugustRaw=Se,e.geoBaker=me,e.geoBakerRaw=Le,e.geoBerghaus=ce,e.geoBerghausRaw=Pe,e.geoBertin1953=Qt,e.geoBertin1953Raw=ct,e.geoBoggs=St,e.geoBoggsRaw=rt,e.geoBonne=Xt,e.geoBonneRaw=pt,e.geoBottomley=_r,e.geoBottomleyRaw=or,e.geoBromley=ei,e.geoBromleyRaw=Er,e.geoChamberlin=et,e.geoChamberlinRaw=Ge,e.geoChamberlinAfrica=We,e.geoCollignon=At,e.geoCollignonRaw=xt,e.geoCraig=er,e.geoCraigRaw=Kt,e.geoCraster=Ir,e.geoCrasterRaw=Gr,e.geoCylindricalEqualArea=_i,e.geoCylindricalEqualAreaRaw=Yr,e.geoCylindricalStereographic=ai,e.geoCylindricalStereographicRaw=Pi,e.geoEckert1=un,e.geoEckert1Raw=mi,e.geoEckert2=An,e.geoEckert2Raw=Fn,e.geoEckert3=Qn,e.geoEckert3Raw=Hn,e.geoEckert4=Kn,e.geoEckert4Raw=Vi,e.geoEckert5=Gt,e.geoEckert5Raw=Jn,e.geoEckert6=rr,e.geoEckert6Raw=wt,e.geoEisenlohr=Xr,e.geoEisenlohrRaw=wr,e.geoFahey=Ri,e.geoFaheyRaw=$r,e.geoFoucaut=en,e.geoFoucautRaw=Zi,e.geoFoucautSinusoidal=yn,e.geoFoucautSinusoidalRaw=fn,e.geoGilbert=ua,e.geoGingery=Xo,e.geoGingeryRaw=ma,e.geoGinzburg4=Ha,e.geoGinzburg4Raw=jn,e.geoGinzburg5=Gn,e.geoGinzburg5Raw=vo,e.geoGinzburg6=Ar,e.geoGinzburg6Raw=Ct,e.geoGinzburg8=hi,e.geoGinzburg8Raw=Jr,e.geoGinzburg9=Sn,e.geoGinzburg9Raw=hn,e.geoGringorten=ea,e.geoGringortenRaw=ki,e.geoGuyou=Fs,e.geoGuyouRaw=Lo,e.geoHammer=mt,e.geoHammerRaw=He,e.geoHammerRetroazimuthal=zl,e.geoHammerRetroazimuthalRaw=ll,e.geoHealpix=Yl,e.geoHealpixRaw=cl,e.geoHill=nc,e.geoHillRaw=Su,e.geoHomolosine=xo,e.geoHomolosineRaw=ql,e.geoHufnagel=Ns,e.geoHufnagelRaw=Kl,e.geoHyperelliptical=qo,e.geoHyperellipticalRaw=oa,e.geoInterrupt=Do,e.geoInterruptedBoggs=Vf,e.geoInterruptedHomolosine=Zc,e.geoInterruptedMollweide=qs,e.geoInterruptedMollweideHemispheres=oc,e.geoInterruptedSinuMollweide=sc,e.geoInterruptedSinusoidal=Lf,e.geoKavrayskiy7=nf,e.geoKavrayskiy7Raw=cs,e.geoLagrange=$l,e.geoLagrangeRaw=Gf,e.geoLarrivee=Fu,e.geoLarriveeRaw=lc,e.geoLaskowski=Hs,e.geoLaskowskiRaw=Es,e.geoLittrow=ps,e.geoLittrowRaw=Go,e.geoLoximuthal=xl,e.geoLoximuthalRaw=uc,e.geoMiller=Os,e.geoMillerRaw=Gu,e.geoModifiedStereographic=Bl,e.geoModifiedStereographicRaw=od,e.geoModifiedStereographicAlaska=Hu,e.geoModifiedStereographicGs48=bl,e.geoModifiedStereographicGs50=Hf,e.geoModifiedStereographicMiller=Ic,e.geoModifiedStereographicLee=yf,e.geoMollweide=je,e.geoMollweideRaw=tt,e.geoMtFlatPolarParabolic=Yc,e.geoMtFlatPolarParabolicRaw=_f,e.geoMtFlatPolarQuartic=th,e.geoMtFlatPolarQuarticRaw=eh,e.geoMtFlatPolarSinusoidal=jf,e.geoMtFlatPolarSinusoidalRaw=ju,e.geoNaturalEarth2=of,e.geoNaturalEarth2Raw=cc,e.geoNellHammer=Kc,e.geoNellHammerRaw=Nl,e.geoInterruptedQuarticAuthalic=gs,e.geoNicolosi=Wh,e.geoNicolosiRaw=Wf,e.geoPatterson=hu,e.geoPattersonRaw=bc,e.geoPolyconic=nl,e.geoPolyconicRaw=_u,e.geoPolyhedral=xf,e.geoPolyhedralButterfly=Cs,e.geoPolyhedralCollignon=Xf,e.geoPolyhedralWaterman=Us,e.geoProject=Wl,e.geoGringortenQuincuncial=kt,e.geoPeirceQuincuncial=Zt,e.geoPierceQuincuncial=Zt,e.geoQuantize=Mr,e.geoQuincuncial=Bc,e.geoRectangularPolyconic=Kr,e.geoRectangularPolyconicRaw=xr,e.geoRobinson=dn,e.geoRobinsonRaw=Wi,e.geoSatellite=Yi,e.geoSatelliteRaw=On,e.geoSinuMollweide=Vu,e.geoSinuMollweideRaw=_a,e.geoSinusoidal=Et,e.geoSinusoidalRaw=dt,e.geoStitch=Ls,e.geoTimes=no,e.geoTimesRaw=va,e.geoTwoPointAzimuthal=Cu,e.geoTwoPointAzimuthalRaw=rs,e.geoTwoPointAzimuthalUsa=Ql,e.geoTwoPointEquidistant=pu,e.geoTwoPointEquidistantRaw=Yu,e.geoTwoPointEquidistantUsa=Nc,e.geoVanDerGrinten=xu,e.geoVanDerGrintenRaw=Uc,e.geoVanDerGrinten2=Ua,e.geoVanDerGrinten2Raw=Ac,e.geoVanDerGrinten3=Vc,e.geoVanDerGrinten3Raw=oo,e.geoVanDerGrinten4=Ku,e.geoVanDerGrinten4Raw=hc,e.geoWagner=B,e.geoWagner7=Q,e.geoWagnerRaw=w,e.geoWagner4=Ze,e.geoWagner4Raw=ze,e.geoWagner6=Mt,e.geoWagner6Raw=ut,e.geoWiechel=$t,e.geoWiechelRaw=Jt,e.geoWinkel3=Cr,e.geoWinkel3Raw=mr,Object.defineProperty(e,"__esModule",{value:!0})})});var jDe=ye((Nmr,HDe)=>{"use strict";var nd=qa(),UZ=Pr(),Hzt=Oa(),r5=Math.PI/180,rw=180/Math.PI,GZ={cursor:"pointer"},HZ={cursor:"auto"};function jzt(e,t){var r=e.projection,n;return t._isScoped?n=Wzt:t._isClipped?n=Zzt:n=Xzt,n(e,r)}HDe.exports=jzt;function jZ(e,t){return nd.behavior.zoom().translate(t.translate()).scale(t.scale())}function WZ(e,t,r){var n=e.id,i=e.graphDiv,a=i.layout,o=a[n],s=i._fullLayout,l=s[n],u={},c={};function f(h,d){u[n+"."+h]=UZ.nestedProperty(o,h).get(),Hzt.call("_storeDirectGUIEdit",a,s._preGUI,u);var v=UZ.nestedProperty(l,h);v.get()!==d&&(v.set(d),UZ.nestedProperty(o,h).set(d),c[n+"."+h]=d)}r(f),f("projection.scale",t.scale()/e.fitScale),f("fitbounds",!1),i.emit("plotly_relayout",c)}function Wzt(e,t){var r=jZ(e,t);function n(){nd.select(this).style(GZ)}function i(){t.scale(nd.event.scale).translate(nd.event.translate),e.render(!0);var s=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":s[0],"geo.center.lat":s[1]})}function a(s){var l=t.invert(e.midPt);s("center.lon",l[0]),s("center.lat",l[1])}function o(){nd.select(this).style(HZ),WZ(e,t,a)}return r.on("zoomstart",n).on("zoom",i).on("zoomend",o),r}function Xzt(e,t){var r=jZ(e,t),n=2,i,a,o,s,l,u,c,f,h;function d(M){return t.invert(M)}function v(M){var T=d(M);if(!T)return!0;var L=t(T);return Math.abs(L[0]-M[0])>n||Math.abs(L[1]-M[1])>n}function m(){nd.select(this).style(GZ),i=nd.mouse(this),a=t.rotate(),o=t.translate(),s=a,l=d(i)}function b(){if(u=nd.mouse(this),v(i)){r.scale(t.scale()),r.translate(t.translate());return}t.scale(nd.event.scale),t.translate([o[0],nd.event.translate[1]]),l?d(u)&&(f=d(u),c=[s[0]+(f[0]-l[0]),a[1],a[2]],t.rotate(c),s=c):(i=u,l=d(i)),h=!0,e.render(!0);var M=t.rotate(),T=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":T[0],"geo.center.lat":T[1],"geo.projection.rotation.lon":-M[0]})}function p(){nd.select(this).style(HZ),h&&WZ(e,t,k)}function k(M){var T=t.rotate(),L=t.invert(e.midPt);M("projection.rotation.lon",-T[0]),M("center.lon",L[0]),M("center.lat",L[1])}return r.on("zoomstart",m).on("zoom",b).on("zoomend",p),r}function Zzt(e,t){var r={r:t.rotate(),k:t.scale()},n=jZ(e,t),i=r7t(n,"zoomstart","zoom","zoomend"),a=0,o=n.on,s;n.on("zoomstart",function(){nd.select(this).style(GZ);var h=nd.mouse(this),d=t.rotate(),v=d,m=t.translate(),b=Yzt(d);s=zF(t,h),o.call(n,"zoom",function(){var p=nd.mouse(this);if(t.scale(r.k=nd.event.scale),!s)h=p,s=zF(t,h);else if(zF(t,p)){t.rotate(d).translate(m);var k=zF(t,p),M=Jzt(s,k),T=Qzt(Kzt(b,M)),L=r.r=$zt(T,s,v);(!isFinite(L[0])||!isFinite(L[1])||!isFinite(L[2]))&&(L=v),t.rotate(L),v=L}u(i.of(this,arguments))}),l(i.of(this,arguments))}).on("zoomend",function(){nd.select(this).style(HZ),o.call(n,"zoom",null),c(i.of(this,arguments)),WZ(e,t,f)}).on("zoom.redraw",function(){e.render(!0);var h=t.rotate();e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.projection.rotation.lon":-h[0],"geo.projection.rotation.lat":-h[1]})});function l(h){a++||h({type:"zoomstart"})}function u(h){h({type:"zoom"})}function c(h){--a||h({type:"zoomend"})}function f(h){var d=t.rotate();h("projection.rotation.lon",-d[0]),h("projection.rotation.lat",-d[1])}return nd.rebind(n,i,"on")}function zF(e,t){var r=e.invert(t);return r&&isFinite(r[0])&&isFinite(r[1])&&e7t(r)}function Yzt(e){var t=.5*e[0]*r5,r=.5*e[1]*r5,n=.5*e[2]*r5,i=Math.sin(t),a=Math.cos(t),o=Math.sin(r),s=Math.cos(r),l=Math.sin(n),u=Math.cos(n);return[a*s*u+i*o*l,i*s*u-a*o*l,a*o*u+i*s*l,a*s*l-i*o*u]}function Kzt(e,t){var r=e[0],n=e[1],i=e[2],a=e[3],o=t[0],s=t[1],l=t[2],u=t[3];return[r*o-n*s-i*l-a*u,r*s+n*o+i*u-a*l,r*l-n*u+i*o+a*s,r*u+n*l-i*s+a*o]}function Jzt(e,t){if(!(!e||!t)){var r=t7t(e,t),n=Math.sqrt(GDe(r,r)),i=.5*Math.acos(Math.max(-1,Math.min(1,GDe(e,t)))),a=Math.sin(i)/n;return n&&[Math.cos(i),r[2]*a,-r[1]*a,r[0]*a]}}function $zt(e,t,r){var n=VZ(t,2,e[0]);n=VZ(n,1,e[1]),n=VZ(n,0,e[2]-r[2]);var i=t[0],a=t[1],o=t[2],s=n[0],l=n[1],u=n[2],c=Math.atan2(a,i)*rw,f=Math.sqrt(i*i+a*a),h,d;Math.abs(l)>f?(d=(l>0?90:-90)-c,h=0):(d=Math.asin(l/f)*rw-c,h=Math.sqrt(f*f-l*l));var v=180-d-2*c,m=(Math.atan2(u,s)-Math.atan2(o,h))*rw,b=(Math.atan2(u,s)-Math.atan2(o,-h))*rw,p=UDe(r[0],r[1],d,m),k=UDe(r[0],r[1],v,b);return p<=k?[d,m,r[2]]:[v,b,r[2]]}function UDe(e,t,r,n){var i=VDe(r-e),a=VDe(n-t);return Math.sqrt(i*i+a*a)}function VDe(e){return(e%360+540)%360-180}function VZ(e,t,r){var n=r*r5,i=e.slice(),a=t===0?1:0,o=t===2?1:2,s=Math.cos(n),l=Math.sin(n);return i[a]=e[a]*s-e[o]*l,i[o]=e[o]*s+e[a]*l,i}function Qzt(e){return[Math.atan2(2*(e[0]*e[1]+e[2]*e[3]),1-2*(e[1]*e[1]+e[2]*e[2]))*rw,Math.asin(Math.max(-1,Math.min(1,2*(e[0]*e[2]-e[3]*e[1]))))*rw,Math.atan2(2*(e[0]*e[3]+e[1]*e[2]),1-2*(e[2]*e[2]+e[3]*e[3]))*rw]}function e7t(e){var t=e[0]*r5,r=e[1]*r5,n=Math.cos(r);return[n*Math.cos(t),n*Math.sin(t),Math.sin(r)]}function GDe(e,t){for(var r=0,n=0,i=e.length;n{"use strict";var l1=qa(),YZ=NZ(),i7t=YZ.geoPath,n7t=YZ.geoDistance,a7t=NDe(),o7t=Oa(),vk=Pr(),s7t=vk.strTranslate,qF=ka(),dk=So(),WDe=vf(),l7t=Mc(),ZZ=ho(),XDe=Mg().getAutoRange,XZ=yv(),u7t=qf().prepSelect,c7t=qf().clearOutline,f7t=qf().selectOnClick,h7t=jDe(),hp=uk(),d7t=hx(),YDe=bF(),v7t=SZ().feature;function KDe(e){this.id=e.id,this.graphDiv=e.graphDiv,this.container=e.container,this.topojsonURL=e.topojsonURL,this.isStatic=e.staticPlot,this.topojsonName=null,this.topojson=null,this.projection=null,this.scope=null,this.viewInitial=null,this.fitScale=null,this.bounds=null,this.midPt=null,this.hasChoropleth=!1,this.traceHash={},this.layers={},this.basePaths={},this.dataPaths={},this.dataPoints={},this.clipDef=null,this.clipRect=null,this.bgRect=null,this.makeFramework()}var tm=KDe.prototype;JDe.exports=function(t){return new KDe(t)};tm.plot=function(e,t,r,n){var i=this;if(n)return i.update(e,t,!0);i._geoCalcData=e,i._fullLayout=t;var a=t[this.id],o=[],s=!1;for(var l in hp.layerNameToAdjective)if(l!=="frame"&&a["show"+l]){s=!0;break}for(var u=!1,c=0;c0&&o._module.calcGeoJSON(a,t)}if(!r){var s=this.updateProjection(e,t);if(s)return;(!this.viewInitial||this.scope!==n.scope)&&this.saveViewInitial(n)}this.scope=n.scope,this.updateBaseLayers(t,n),this.updateDims(t,n),this.updateFx(t,n),l7t.generalUpdatePerTraceModule(this.graphDiv,this,e,n);var l=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=l.selectAll(".point"),this.dataPoints.text=l.selectAll("text"),this.dataPaths.line=l.selectAll(".js-line");var u=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=u.selectAll("path"),this._render()};tm.updateProjection=function(e,t){var r=this.graphDiv,n=t[this.id],i=t._size,a=n.domain,o=n.projection,s=n.lonaxis,l=n.lataxis,u=s._ax,c=l._ax,f=this.projection=p7t(n),h=[[i.l+i.w*a.x[0],i.t+i.h*(1-a.y[1])],[i.l+i.w*a.x[1],i.t+i.h*(1-a.y[0])]],d=n.center||{},v=o.rotation||{},m=s.range||[],b=l.range||[];if(n.fitbounds){u._length=h[1][0]-h[0][0],c._length=h[1][1]-h[0][1],u.range=XDe(r,u),c.range=XDe(r,c);var p=(u.range[0]+u.range[1])/2,k=(c.range[0]+c.range[1])/2;if(n._isScoped)d={lon:p,lat:k};else if(n._isClipped){d={lon:p,lat:k},v={lon:p,lat:k,roll:v.roll};var M=o.type,T=hp.lonaxisSpan[M]/2||180,L=hp.lataxisSpan[M]/2||90;m=[p-T,p+T],b=[k-L,k+L]}else d={lon:p,lat:k},v={lon:p,lat:v.lat,roll:v.roll}}f.center([d.lon-v.lon,d.lat-v.lat]).rotate([-v.lon,-v.lat,v.roll]).parallels(o.parallels);var x=ZDe(m,b);f.fitExtent(h,x);var C=this.bounds=f.getBounds(x),S=this.fitScale=f.scale(),g=f.translate();if(n.fitbounds){var P=f.getBounds(ZDe(u.range,c.range)),E=Math.min((C[1][0]-C[0][0])/(P[1][0]-P[0][0]),(C[1][1]-C[0][1])/(P[1][1]-P[0][1]));isFinite(E)?f.scale(E*S):vk.warn("Something went wrong during"+this.id+"fitbounds computations.")}else f.scale(o.scale*S);var z=this.midPt=[(C[0][0]+C[1][0])/2,(C[0][1]+C[1][1])/2];if(f.translate([g[0]+(z[0]-g[0]),g[1]+(z[1]-g[1])]).clipExtent(C),n._isAlbersUsa){var q=f([d.lon,d.lat]),U=f.translate();f.translate([U[0]-(q[0]-U[0]),U[1]-(q[1]-U[1])])}};tm.updateBaseLayers=function(e,t){var r=this,n=r.topojson,i=r.layers,a=r.basePaths;function o(h){return h==="lonaxis"||h==="lataxis"}function s(h){return!!hp.lineLayers[h]}function l(h){return!!hp.fillLayers[h]}var u=this.hasChoropleth?hp.layersForChoropleth:hp.layers,c=u.filter(function(h){return s(h)||l(h)?t["show"+h]:o(h)?t[h].showgrid:!0}),f=r.framework.selectAll(".layer").data(c,String);f.exit().each(function(h){delete i[h],delete a[h],l1.select(this).remove()}),f.enter().append("g").attr("class",function(h){return"layer "+h}).each(function(h){var d=i[h]=l1.select(this);h==="bg"?r.bgRect=d.append("rect").style("pointer-events","all"):o(h)?a[h]=d.append("path").style("fill","none"):h==="backplot"?d.append("g").classed("choroplethlayer",!0):h==="frontplot"?d.append("g").classed("scatterlayer",!0):s(h)?a[h]=d.append("path").style("fill","none").style("stroke-miterlimit",2):l(h)&&(a[h]=d.append("path").style("stroke","none"))}),f.order(),f.each(function(h){var d=a[h],v=hp.layerNameToAdjective[h];h==="frame"?d.datum(hp.sphereSVG):s(h)||l(h)?d.datum(v7t(n,n.objects[h])):o(h)&&d.datum(g7t(h,t,e)).call(qF.stroke,t[h].gridcolor).call(dk.dashLine,t[h].griddash,t[h].gridwidth),s(h)?d.call(qF.stroke,t[v+"color"]).call(dk.dashLine,"",t[v+"width"]):l(h)&&d.call(qF.fill,t[v+"color"])})};tm.updateDims=function(e,t){var r=this.bounds,n=(t.framewidth||0)/2,i=r[0][0]-n,a=r[0][1]-n,o=r[1][0]-i+n,s=r[1][1]-a+n;dk.setRect(this.clipRect,i,a,o,s),this.bgRect.call(dk.setRect,i,a,o,s).call(qF.fill,t.bgcolor),this.xaxis._offset=i,this.xaxis._length=o,this.yaxis._offset=a,this.yaxis._length=s};tm.updateFx=function(e,t){var r=this,n=r.graphDiv,i=r.bgRect,a=e.dragmode,o=e.clickmode;if(r.isStatic)return;function s(){var f=r.viewInitial,h={};for(var d in f)h[r.id+"."+d]=f[d];o7t.call("_guiRelayout",n,h),n.emit("plotly_doubleclick",null)}function l(f){return r.projection.invert([f[0]+r.xaxis._offset,f[1]+r.yaxis._offset])}var u=function(f,h){if(h.isRect){var d=f.range={};d[r.id]=[l([h.xmin,h.ymin]),l([h.xmax,h.ymax])]}else{var v=f.lassoPoints={};v[r.id]=h.map(l)}},c={element:r.bgRect.node(),gd:n,plotinfo:{id:r.id,xaxis:r.xaxis,yaxis:r.yaxis,fillRangeItems:u},xaxes:[r.xaxis],yaxes:[r.yaxis],subplot:r.id,clickFn:function(f){f===2&&c7t(n)}};a==="pan"?(i.node().onmousedown=null,i.call(h7t(r,t)),i.on("dblclick.zoom",s),n._context._scrollZoom.geo||i.on("wheel.zoom",null)):(a==="select"||a==="lasso")&&(i.on(".zoom",null),c.prepFn=function(f,h,d){u7t(f,h,d,c,a)},XZ.init(c)),i.on("mousemove",function(){var f=r.projection.invert(vk.getPositionFromD3Event());if(!f)return XZ.unhover(n,l1.event);r.xaxis.p2c=function(){return f[0]},r.yaxis.p2c=function(){return f[1]},WDe.hover(n,l1.event,r.id)}),i.on("mouseout",function(){n._dragging||XZ.unhover(n,l1.event)}),i.on("click",function(){a!=="select"&&a!=="lasso"&&(o.indexOf("select")>-1&&f7t(l1.event,n,[r.xaxis],[r.yaxis],r.id,c),o.indexOf("event")>-1&&WDe.click(n,l1.event))})};tm.makeFramework=function(){var e=this,t=e.graphDiv,r=t._fullLayout,n="clip"+r._uid+e.id;e.clipDef=r._clips.append("clipPath").attr("id",n),e.clipRect=e.clipDef.append("rect"),e.framework=l1.select(e.container).append("g").attr("class","geo "+e.id).call(dk.setClipUrl,n,t),e.project=function(i){var a=e.projection(i);return a?[a[0]-e.xaxis._offset,a[1]-e.yaxis._offset]:[null,null]},e.xaxis={_id:"x",c2p:function(i){return e.project(i)[0]}},e.yaxis={_id:"y",c2p:function(i){return e.project(i)[1]}},e.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},ZZ.setConvert(e.mockAxis,r)};tm.saveViewInitial=function(e){var t=e.center||{},r=e.projection,n=r.rotation||{};this.viewInitial={fitbounds:e.fitbounds,"projection.scale":r.scale};var i;e._isScoped?i={"center.lon":t.lon,"center.lat":t.lat}:e._isClipped?i={"projection.rotation.lon":n.lon,"projection.rotation.lat":n.lat}:i={"center.lon":t.lon,"center.lat":t.lat,"projection.rotation.lon":n.lon},vk.extendFlat(this.viewInitial,i)};tm.render=function(e){this._hasMarkerAngles&&e?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()};tm._render=function(){var e=this.projection,t=e.getPath(),r;function n(a){var o=e(a.lonlat);return o?s7t(o[0],o[1]):null}function i(a){return e.isLonLatOverEdges(a.lonlat)?"none":null}for(r in this.basePaths)this.basePaths[r].attr("d",t);for(r in this.dataPaths)this.dataPaths[r].attr("d",function(a){return t(a.geojson)});for(r in this.dataPoints)this.dataPoints[r].attr("display",i).attr("transform",n)};function p7t(e){var t=e.projection,r=t.type,n=hp.projNames[r];n="geo"+vk.titleCase(n);for(var i=YZ[n]||a7t[n],a=i(),o=e._isSatellite?Math.acos(1/t.distance)*180/Math.PI:e._isClipped?hp.lonaxisSpan[r]/2:null,s=["center","rotate","parallels","clipExtent"],l=function(f){return f?a:[]},u=0;uv}else return!1},a.getPath=function(){return i7t().projection(a)},a.getBounds=function(f){return a.getPath().bounds(f)},a.precision(hp.precision),e._isSatellite&&a.tilt(t.tilt).distance(t.distance),o&&a.clipAngle(o-hp.clipPad),a}function g7t(e,t,r){var n=1e-6,i=2.5,a=t[e],o=hp.scopeDefaults[t.scope],s,l,u;e==="lonaxis"?(s=o.lonaxisRange,l=o.lataxisRange,u=function(k,M){return[k,M]}):e==="lataxis"&&(s=o.lataxisRange,l=o.lonaxisRange,u=function(k,M){return[M,k]});var c={type:"linear",range:[s[0],s[1]-n],tick0:a.tick0,dtick:a.dtick};ZZ.setConvert(c,r);var f=ZZ.calcTicks(c);!t.isScoped&&e==="lonaxis"&&f.pop();for(var h=f.length,d=new Array(h),v=0;v0&&i<0&&(i+=360);var s=(i-n)/4;return{type:"Polygon",coordinates:[[[n,a],[n,o],[n+s,o],[n+2*s,o],[n+3*s,o],[i,o],[i,a],[i-s,a],[i-2*s,a],[i-3*s,a],[n,a]]]}}});var KZ=ye((Vmr,tFe)=>{"use strict";var n5=Ih(),m7t=Cc().attributes,y7t=Pd().dash,i5=uk(),_7t=mc().overrideAll,QDe=t_(),eFe={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},showgrid:{valType:"boolean",dflt:!1},tick0:{valType:"number",dflt:0},dtick:{valType:"number"},gridcolor:{valType:"color",dflt:n5.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:y7t},x7t=tFe.exports=_7t({domain:m7t({name:"geo"},{}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:!1,editType:"plot"},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:QDe(i5.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:QDe(i5.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:n5.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:i5.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:i5.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:i5.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:i5.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:n5.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:n5.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:n5.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:n5.background},lonaxis:eFe,lataxis:eFe},"plot","from-root");x7t.uirevision={valType:"any",editType:"none"}});var nFe=ye((Gmr,iFe)=>{"use strict";var OF=Pr(),b7t=q_(),w7t=Id().getSubplotData,BF=uk(),T7t=KZ(),rFe=BF.axesNames;iFe.exports=function(t,r,n){b7t(t,r,n,{type:"geo",attributes:T7t,handleDefaults:A7t,fullData:n,partition:"y"})};function A7t(e,t,r,n){var i=w7t(n.fullData,"geo",n.id),a=i.map(function(oe){return oe.index}),o=r("resolution"),s=r("scope"),l=BF.scopeDefaults[s],u=r("projection.type",l.projType),c=t._isAlbersUsa=u==="albers usa";c&&(s=t.scope="usa");var f=t._isScoped=s!=="world",h=t._isSatellite=u==="satellite",d=t._isConic=u.indexOf("conic")!==-1||u==="albers",v=t._isClipped=!!BF.lonaxisSpan[u];if(e.visible===!1){var m=OF.extendDeep({},t._template);m.showcoastlines=!1,m.showcountries=!1,m.showframe=!1,m.showlakes=!1,m.showland=!1,m.showocean=!1,m.showrivers=!1,m.showsubunits=!1,m.lonaxis&&(m.lonaxis.showgrid=!1),m.lataxis&&(m.lataxis.showgrid=!1),t._template=m}for(var b=r("visible"),p,k=0;k0&&q<0&&(q+=360);var U=(z+q)/2,G;if(!c){var Z=f?l.projRotate:[U,0,0];G=r("projection.rotation.lon",Z[0]),r("projection.rotation.lat",Z[1]),r("projection.rotation.roll",Z[2]),p=r("showcoastlines",!f&&b),p&&(r("coastlinecolor"),r("coastlinewidth")),p=r("showocean",b?void 0:!1),p&&r("oceancolor")}var j,N;if(c?(j=-96.6,N=38.7):(j=f?U:G,N=(E[0]+E[1])/2),r("center.lon",j),r("center.lat",N),h&&(r("projection.tilt"),r("projection.distance")),d){var H=l.projParallels||[0,60];r("projection.parallels",H)}r("projection.scale"),p=r("showland",b?void 0:!1),p&&r("landcolor"),p=r("showlakes",b?void 0:!1),p&&r("lakecolor"),p=r("showrivers",b?void 0:!1),p&&(r("rivercolor"),r("riverwidth")),p=r("showcountries",f&&s!=="usa"&&b),p&&(r("countrycolor"),r("countrywidth")),(s==="usa"||s==="north america"&&o===50)&&(r("showsubunits",b),r("subunitcolor"),r("subunitwidth")),f||(p=r("showframe",b),p&&(r("framecolor"),r("framewidth"))),r("bgcolor");var re=r("fitbounds");re&&(delete t.projection.scale,f?(delete t.center.lon,delete t.center.lat):v?(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon,delete t.projection.rotation.lat,delete t.lonaxis.range,delete t.lataxis.range):(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon))}});var JZ=ye((Hmr,sFe)=>{"use strict";var S7t=Id().getSubplotCalcData,M7t=Pr().counterRegex,E7t=$De(),Qm="geo",aFe=M7t(Qm),oFe={};oFe[Qm]={valType:"subplotid",dflt:Qm,editType:"calc"};function k7t(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[Qm],i=0;i{"use strict";lFe.exports={attributes:ew(),supplyDefaults:URe(),colorbar:$d(),formatLabels:HRe(),calc:_F(),calcGeoJSON:BZ().calcGeoJSON,plot:BZ().plot,style:FZ(),styleOnSelect:sp().styleOnSelect,hoverPoints:PDe(),eventData:RDe(),selectPoints:zDe(),moduleType:"trace",name:"scattergeo",basePlotModule:JZ(),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}});var fFe=ye((Wmr,cFe)=>{"use strict";cFe.exports=uFe()});var a5=ye((Xmr,vFe)=>{"use strict";var{hovertemplateAttrs:P7t,templatefallbackAttrs:I7t}=Ll(),vx=ew(),R7t=Tu(),hFe=Gl(),D7t=Ih().defaultLine,dx=Ao().extendFlat,dFe=vx.marker.line;vFe.exports=dx({locations:{valType:"data_array",editType:"calc"},locationmode:vx.locationmode,z:{valType:"data_array",editType:"calc"},geojson:dx({},vx.geojson,{}),featureidkey:vx.featureidkey,text:dx({},vx.text,{}),hovertext:dx({},vx.hovertext,{}),marker:{line:{color:dx({},dFe.color,{dflt:D7t}),width:dx({},dFe.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:vx.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:vx.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:dx({},hFe.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:P7t(),hovertemplatefallback:I7t(),showlegend:dx({},hFe.showlegend,{dflt:!1})},R7t("",{cLetter:"z",editTypeOverride:"calc"}))});var gFe=ye((Zmr,pFe)=>{"use strict";var pk=Pr(),F7t=td(),z7t=a5(),q7t=["The library used by the *country names* `locationmode` option is changing in the next major version.","Some country names in existing plots may not work in the new version.","To ensure consistent behavior, consider setting `locationmode` to *ISO-3*."].join(" ");pFe.exports=function(t,r,n,i){function a(h,d){return pk.coerce(t,r,z7t,h,d)}var o=a("locations"),s=a("z");if(!(o&&o.length&&pk.isArrayOrTypedArray(s)&&s.length)){r.visible=!1;return}r._length=Math.min(o.length,s.length);var l=a("geojson"),u;(typeof l=="string"&&l!==""||pk.isPlainObject(l))&&(u="geojson-id");var c=a("locationmode",u);c==="country names"&&pk.warn(q7t),c==="geojson-id"&&a("featureidkey"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var f=a("marker.line.width");f&&a("marker.line.color"),a("marker.opacity"),F7t(t,r,i,a,{prefix:"",cLetter:"z"}),pk.coerceSelectionMarkerOpacity(r,a)}});var NF=ye((Ymr,_Fe)=>{"use strict";var mFe=Eo(),O7t=fs().BADNUM,B7t=gv(),N7t=Rm(),U7t=q0();function yFe(e){return e&&typeof e=="string"}_Fe.exports=function(t,r){var n=r._length,i=new Array(n),a;r.geojson?a=function(c){return yFe(c)||mFe(c)}:a=yFe;for(var o=0;o{"use strict";var V7t=qa(),G7t=ka(),$Z=So(),H7t=tc();function j7t(e,t){t&&xFe(e,t)}function xFe(e,t){var r=t[0].trace,n=t[0].node3,i=n.selectAll(".choroplethlocation"),a=r.marker||{},o=a.line||{},s=H7t.makeColorScaleFuncFromTrace(r);i.each(function(l){V7t.select(this).attr("fill",s(l.z)).call(G7t.stroke,l.mlc||o.color).call($Z.dashLine,"",l.mlw||o.width||0).style("opacity",a.opacity)}),$Z.selectedPointStyle(i,r)}function W7t(e,t){var r=t[0].node3,n=t[0].trace;n.selectedpoints?$Z.selectedPointStyle(r.selectAll(".choroplethlocation"),n):xFe(e,t)}bFe.exports={style:j7t,styleOnSelect:W7t}});var QZ=ye((Jmr,AFe)=>{"use strict";var X7t=qa(),wFe=Pr(),o5=hx(),Z7t=bF().getTopojsonFeatures,TFe=Mg().findExtremes,Y7t=UF().style;function K7t(e,t,r){var n=t.layers.backplot.select(".choroplethlayer");wFe.makeTraceGroups(n,r,"trace choropleth").each(function(i){var a=X7t.select(this),o=a.selectAll("path.choroplethlocation").data(wFe.identity);o.enter().append("path").classed("choroplethlocation",!0),o.exit().remove(),Y7t(e,i)})}function J7t(e,t){for(var r=e[0].trace,n=t[r.geo],i=n._subplot,a=r.locationmode,o=r._length,s=a==="geojson-id"?o5.extractTraceFeature(e):Z7t(r,i.topojson),l=[],u=[],c=0;c{"use strict";var $7t=ho(),Q7t=a5(),e9t=Pr().fillText;SFe.exports=function(t,r,n){var i=t.cd,a=i[0].trace,o=t.subplot,s,l,u,c,f=[r,n],h=[r+360,n];for(l=0;l")}}});var GF=ye((Qmr,MFe)=>{"use strict";MFe.exports=function(t,r,n,i,a){t.location=r.location,t.z=r.z;var o=i[a];return o.fIn&&o.fIn.properties&&(t.properties=o.fIn.properties),t.ct=o.ct,t}});var HF=ye((eyr,EFe)=>{"use strict";EFe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s,l,u,c,f;if(r===!1)for(s=0;s{"use strict";kFe.exports={attributes:a5(),supplyDefaults:gFe(),colorbar:D_(),calc:NF(),calcGeoJSON:QZ().calcGeoJSON,plot:QZ().plot,style:UF().style,styleOnSelect:UF().styleOnSelect,hoverPoints:VF(),eventData:GF(),selectPoints:HF(),moduleType:"trace",name:"choropleth",basePlotModule:JZ(),categories:["geo","noOpacity","showLegend"],meta:{}}});var PFe=ye((ryr,LFe)=>{"use strict";LFe.exports=CFe()});var jF=ye((iyr,RFe)=>{"use strict";var r9t=Oa(),l0=Pr(),i9t=mT();function n9t(e,t,r,n){var i=e.cd,a=i[0].t,o=i[0].trace,s=e.xa,l=e.ya,u=a.x,c=a.y,f=s.c2p(t),h=l.c2p(r),d=e.distance,v;if(a.tree){var m=s.p2c(f-d),b=s.p2c(f+d),p=l.p2c(h-d),k=l.p2c(h+d);n==="x"?v=a.tree.range(Math.min(m,b),Math.min(l._rl[0],l._rl[1]),Math.max(m,b),Math.max(l._rl[0],l._rl[1])):v=a.tree.range(Math.min(m,b),Math.min(p,k),Math.max(m,b),Math.max(p,k))}else v=a.ids;var M,T,L,x,C,S,g,P,E,z=d;if(n==="x"){var q=!!o.xperiodalignment,U=!!o.yperiodalignment;for(C=0;C=Math.min(G,Z)&&f<=Math.max(G,Z)?0:1/0}if(S=Math.min(j,N)&&h<=Math.max(j,N)?0:1/0}E=Math.sqrt(S*S+g*g),T=v[C]}}}else for(C=v.length-1;C>-1;C--)M=v[C],L=u[M],x=c[M],S=s.c2p(L)-f,g=l.c2p(x)-h,P=Math.sqrt(S*S+g*g),P{"use strict";var DFe=20;FFe.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:DFe,SYMBOL_STROKE:DFe/20,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}});var gk=ye((ayr,BFe)=>{"use strict";var a9t=Gl(),o9t=ec(),s9t=Pg(),mf=pf(),zFe=df().axisHoverFormat,qFe=Tu(),l9t=t_(),eY=Ao().extendFlat,u9t=mc().overrideAll,c9t=px().DASHES,OFe=mf.line,u1=mf.marker,f9t=u1.line,gx=BFe.exports=u9t({x:mf.x,x0:mf.x0,dx:mf.dx,y:mf.y,y0:mf.y0,dy:mf.dy,xperiod:mf.xperiod,yperiod:mf.yperiod,xperiod0:mf.xperiod0,yperiod0:mf.yperiod0,xperiodalignment:mf.xperiodalignment,yperiodalignment:mf.yperiodalignment,xhoverformat:zFe("x"),yhoverformat:zFe("y"),text:mf.text,hovertext:mf.hovertext,textposition:mf.textposition,textfont:o9t({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,noNumericWeightValues:!0,variantValues:["normal","small-caps"]}),mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"]},line:{color:OFe.color,width:OFe.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:l9t(c9t),dflt:"solid"}},marker:eY({},qFe("marker"),{symbol:u1.symbol,angle:u1.angle,size:u1.size,sizeref:u1.sizeref,sizemin:u1.sizemin,sizemode:u1.sizemode,opacity:u1.opacity,colorbar:u1.colorbar,line:eY({},qFe("marker.line"),{width:f9t.width})}),connectgaps:mf.connectgaps,fill:eY({},mf.fill,{dflt:"none"}),fillcolor:s9t(),selected:{marker:mf.selected.marker,textfont:mf.selected.textfont},unselected:{marker:mf.unselected.marker,textfont:mf.unselected.textfont},opacity:a9t.opacity},"calc","nested");gx.x.editType=gx.y.editType=gx.x0.editType=gx.y0.editType="calc+clearAxisTypes";gx.hovertemplate=mf.hovertemplate;gx.hovertemplatefallback=mf.hovertemplatefallback;gx.texttemplate=mf.texttemplate;gx.texttemplatefallback=mf.texttemplatefallback});var WF=ye(tY=>{"use strict";var NFe=px();tY.isOpenSymbol=function(e){return typeof e=="string"?NFe.OPEN_RE.test(e):e%200>100};tY.isDotSymbol=function(e){return typeof e=="string"?NFe.DOT_RE.test(e):e>200}});var GFe=ye((syr,VFe)=>{"use strict";var UFe=Pr(),h9t=Oa(),d9t=WF(),v9t=gk(),p9t=Lm(),XF=Ru(),g9t=sT(),m9t=Dg(),y9t=$p(),_9t=D0(),x9t=Fg(),b9t=F0();VFe.exports=function(t,r,n,i){function a(d,v){return UFe.coerce(t,r,v9t,d,v)}var o=t.marker?d9t.isOpenSymbol(t.marker.symbol):!1,s=XF.isBubble(t),l=g9t(t,r,i,a);if(!l){r.visible=!1;return}m9t(t,r,i,a),a("xhoverformat"),a("yhoverformat");var u=l{"use strict";var w9t=lI();HFe.exports=function(t,r,n){var i=t.i;return"x"in t||(t.x=r._x[i]),"y"in t||(t.y=r._y[i]),w9t(t,r,n)}});var XFe=ye((uyr,WFe)=>{"use strict";function T9t(e,t,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l>=0?(a=o,i=o-1):n=o+1}return a}function A9t(e,t,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l>0?(a=o,i=o-1):n=o+1}return a}function S9t(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l<0?(a=o,n=o+1):i=o-1}return a}function M9t(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l<=0?(a=o,n=o+1):i=o-1}return a}function E9t(e,t,r,n,i){for(;n<=i;){var a=n+i>>>1,o=e[a],s=r!==void 0?r(o,t):o-t;if(s===0)return a;s<=0?n=a+1:i=a-1}return-1}function mk(e,t,r,n,i,a){return typeof r=="function"?a(e,t,r,n===void 0?0:n|0,i===void 0?e.length-1:i|0):a(e,t,void 0,r===void 0?0:r|0,n===void 0?e.length-1:n|0)}WFe.exports={ge:function(e,t,r,n,i){return mk(e,t,r,n,i,T9t)},gt:function(e,t,r,n,i){return mk(e,t,r,n,i,A9t)},lt:function(e,t,r,n,i){return mk(e,t,r,n,i,S9t)},le:function(e,t,r,n,i){return mk(e,t,r,n,i,M9t)},eq:function(e,t,r,n,i){return mk(e,t,r,n,i,E9t)}}});var ey=ye((cyr,YFe)=>{"use strict";YFe.exports=function(t,r,n){var i={},a,o;if(typeof r=="string"&&(r=ZFe(r)),Array.isArray(r)){var s={};for(o=0;o{"use strict";var k9t=ey();KFe.exports=C9t;function C9t(e){var t;return arguments.length>1&&(e=arguments),typeof e=="string"?e=e.split(/\s/).map(parseFloat):typeof e=="number"&&(e=[e]),e.length&&typeof e[0]=="number"?e.length===1?t={width:e[0],height:e[0],x:0,y:0}:e.length===2?t={width:e[0],height:e[1],x:0,y:0}:t={x:e[0],y:e[1],width:e[2]-e[0]||0,height:e[3]-e[1]||0}:e&&(e=k9t(e,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"}),t={x:e.left||0,y:e.top||0},e.width==null?e.right?t.width=e.right-t.x:t.width=0:t.width=e.width,e.height==null?e.bottom?t.height=e.bottom-t.y:t.height=0:t.height=e.height),t}});var iw=ye((hyr,JFe)=>{"use strict";JFe.exports=L9t;function L9t(e,t){if(!e||e.length==null)throw Error("Argument should be an array");t==null?t=1:t=Math.floor(t);for(var r=Array(t*2),n=0;ni&&(i=e[o]),e[o]{$Fe.exports=function(){for(var e=0;e{var eze=QD();tze.exports=P9t;function P9t(e,t,r){if(!e)throw new TypeError("must specify data as first parameter");if(r=+(r||0)|0,Array.isArray(e)&&e[0]&&typeof e[0][0]=="number"){var n=e[0].length,i=e.length*n,a,o,s,l;(!t||typeof t=="string")&&(t=new(eze(t||"float32"))(i+r));var u=t.length-r;if(i!==u)throw new Error("source length "+i+" ("+n+"x"+e.length+") does not match destination length "+u);for(a=0,s=r;a{"use strict";rze.exports=function(e){var t=typeof e;return e!==null&&(t==="object"||t==="function")}});var aze=ye((gyr,nze)=>{"use strict";nze.exports=Math.log2||function(e){return Math.log(e)*Math.LOG2E}});var hze=ye((myr,fze)=>{"use strict";var oze=XFe(),sze=rk(),I9t=s5(),R9t=iw(),lze=ey(),iY=QFe(),D9t=nw(),F9t=ize(),z9t=QD(),uze=aze(),q9t=1073741824;fze.exports=function(t,r){r||(r={}),t=D9t(t,"float64"),r=lze(r,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});let n=iY(r.maxDepth,255),i=iY(r.bounds,R9t(t,2));i[0]===i[2]&&i[2]++,i[1]===i[3]&&i[3]++;let a=cze(t,i),o=t.length>>>1,s;r.dtype||(r.dtype="array"),typeof r.dtype=="string"?s=new(z9t(r.dtype))(o):r.dtype&&(s=r.dtype,Array.isArray(s)&&(s.length=o));for(let p=0;pn||x>q9t){for(let N=0;N_e||g>ke||P=z||re===oe)return;let Ce=l[H];oe===void 0&&(oe=Ce.length);for(let Pe=re;Pe=T&&He<=x&<>=L&<<=C&&q.push(ce)}let ge=u[H],ie=ge[re*4+0],Se=ge[re*4+1],Ee=ge[re*4+2],we=ge[re*4+3],De=G(ge,re+1),Le=N*.5,me=H+1;U(Z,j,Le,me,ie,Se||Ee||we||De),U(Z,j+Le,Le,me,Se,Ee||we||De),U(Z+Le,j,Le,me,Ee,we||De),U(Z+Le,j+Le,Le,me,we,De)}function G(Z,j){let N=null,H=0;for(;N===null;)if(N=Z[j*4+H],H++,H>Z.length)return null;return N}return q}function m(p,k,M,T,L){let x=[];for(let C=0;C{"use strict";dze.exports=hze()});var nY=ye((_yr,vze)=>{vze.exports=O9t;function O9t(e){var t=0,r=0,n=0,i=0;return e.map(function(a){a=a.slice();var o=a[0],s=o.toUpperCase();if(o!=s)switch(a[0]=s,o){case"a":a[6]+=n,a[7]+=i;break;case"v":a[1]+=i;break;case"h":a[1]+=n;break;default:for(var l=1;l{"use strict";Object.defineProperty(YF,"__esModule",{value:!0});var B9t=function(){function e(t,r){var n=[],i=!0,a=!1,o=void 0;try{for(var s=t[Symbol.iterator](),l;!(i=(l=s.next()).done)&&(n.push(l.value),!(r&&n.length===r));i=!0);}catch(u){a=!0,o=u}finally{try{!i&&s.return&&s.return()}finally{if(a)throw o}}return n}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),yk=Math.PI*2,aY=function(t,r,n,i,a,o,s){var l=t.x,u=t.y;l*=r,u*=n;var c=i*l-a*u,f=a*l+i*u;return{x:c+o,y:f+s}},N9t=function(t,r){var n=r===1.5707963267948966?.551915024494:r===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(r/4),i=Math.cos(t),a=Math.sin(t),o=Math.cos(t+r),s=Math.sin(t+r);return[{x:i-a*n,y:a+i*n},{x:o+s*n,y:s-o*n},{x:o,y:s}]},pze=function(t,r,n,i){var a=t*i-r*n<0?-1:1,o=t*n+r*i;return o>1&&(o=1),o<-1&&(o=-1),a*Math.acos(o)},U9t=function(t,r,n,i,a,o,s,l,u,c,f,h){var d=Math.pow(a,2),v=Math.pow(o,2),m=Math.pow(f,2),b=Math.pow(h,2),p=d*v-d*b-v*m;p<0&&(p=0),p/=d*b+v*m,p=Math.sqrt(p)*(s===l?-1:1);var k=p*a/o*h,M=p*-o/a*f,T=c*k-u*M+(t+n)/2,L=u*k+c*M+(r+i)/2,x=(f-k)/a,C=(h-M)/o,S=(-f-k)/a,g=(-h-M)/o,P=pze(1,0,x,C),E=pze(x,C,S,g);return l===0&&E>0&&(E-=yk),l===1&&E<0&&(E+=yk),[T,L,P,E]},V9t=function(t){var r=t.px,n=t.py,i=t.cx,a=t.cy,o=t.rx,s=t.ry,l=t.xAxisRotation,u=l===void 0?0:l,c=t.largeArcFlag,f=c===void 0?0:c,h=t.sweepFlag,d=h===void 0?0:h,v=[];if(o===0||s===0)return[];var m=Math.sin(u*yk/360),b=Math.cos(u*yk/360),p=b*(r-i)/2+m*(n-a)/2,k=-m*(r-i)/2+b*(n-a)/2;if(p===0&&k===0)return[];o=Math.abs(o),s=Math.abs(s);var M=Math.pow(p,2)/Math.pow(o,2)+Math.pow(k,2)/Math.pow(s,2);M>1&&(o*=Math.sqrt(M),s*=Math.sqrt(M));var T=U9t(r,n,i,a,o,s,f,d,m,b,p,k),L=B9t(T,4),x=L[0],C=L[1],S=L[2],g=L[3],P=Math.abs(g)/(yk/4);Math.abs(1-P)<1e-7&&(P=1);var E=Math.max(Math.ceil(P),1);g/=E;for(var z=0;z{"use strict";_ze.exports=H9t;var G9t=mze();function H9t(e){for(var t,r=[],n=0,i=0,a=0,o=0,s=null,l=null,u=0,c=0,f=0,h=e.length;f4?(n=d[d.length-4],i=d[d.length-3]):(n=u,i=c),r.push(d)}return r}function KF(e,t,r,n){return["C",e,t,r,n,r,n]}function yze(e,t,r,n,i,a){return["C",e/3+2/3*r,t/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}});var oY=ye((byr,bze)=>{"use strict";bze.exports=function(t){return typeof t!="string"?!1:(t=t.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&&/[\dz]$/i.test(t)&&t.length>4))}});var Aze=ye((wyr,Tze)=>{"use strict";var j9t=nM(),W9t=nY(),X9t=xze(),Z9t=oY(),wze=gE();Tze.exports=Y9t;function Y9t(e){if(Array.isArray(e)&&e.length===1&&typeof e[0]=="string"&&(e=e[0]),typeof e=="string"&&(wze(Z9t(e),"String is not an SVG path."),e=j9t(e)),wze(Array.isArray(e),"Argument should be a string or an array of path segments."),e=W9t(e),e=X9t(e),!e.length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],r=0,n=e.length;rt[2]&&(t[2]=i[a+0]),i[a+1]>t[3]&&(t[3]=i[a+1]);return t}});var Lze=ye((Tyr,Cze)=>{var aw=Math.PI,Sze=kze(120);Cze.exports=K9t;function K9t(e){for(var t,r=[],n=0,i=0,a=0,o=0,s=null,l=null,u=0,c=0,f=0,h=e.length;f7&&(r.push(d.splice(0,7)),d.unshift("C"));break;case"S":var m=u,b=c;(t=="C"||t=="S")&&(m+=m-n,b+=b-i),d=["C",m,b,d[1],d[2],d[3],d[4]];break;case"T":t=="Q"||t=="T"?(s=u*2-s,l=c*2-l):(s=u,l=c),d=Mze(u,c,s,l,d[1],d[2]);break;case"Q":s=d[1],l=d[2],d=Mze(u,c,d[1],d[2],d[3],d[4]);break;case"L":d=JF(u,c,d[1],d[2]);break;case"H":d=JF(u,c,d[1],c);break;case"V":d=JF(u,c,u,d[1]);break;case"Z":d=JF(u,c,a,o);break}t=v,u=d[d.length-2],c=d[d.length-1],d.length>4?(n=d[d.length-4],i=d[d.length-3]):(n=u,i=c),r.push(d)}return r}function JF(e,t,r,n){return["C",e,t,r,n,r,n]}function Mze(e,t,r,n,i,a){return["C",e/3+2/3*r,t/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}function Eze(e,t,r,n,i,a,o,s,l,u){if(u)M=u[0],T=u[1],p=u[2],k=u[3];else{var c=sY(e,t,-i);e=c.x,t=c.y,c=sY(s,l,-i),s=c.x,l=c.y;var f=(e-s)/2,h=(t-l)/2,d=f*f/(r*r)+h*h/(n*n);d>1&&(d=Math.sqrt(d),r=d*r,n=d*n);var v=r*r,m=n*n,b=(a==o?-1:1)*Math.sqrt(Math.abs((v*m-v*h*h-m*f*f)/(v*h*h+m*f*f)));b==1/0&&(b=1);var p=b*r*h/n+(e+s)/2,k=b*-n*f/r+(t+l)/2,M=Math.asin(((t-k)/n).toFixed(9)),T=Math.asin(((l-k)/n).toFixed(9));M=eT&&(M=M-aw*2),!o&&T>M&&(T=T-aw*2)}if(Math.abs(T-M)>Sze){var L=T,x=s,C=l;T=M+Sze*(o&&T>M?1:-1),s=p+r*Math.cos(T),l=k+n*Math.sin(T);var S=Eze(s,l,r,n,i,0,o,x,C,[T,L,p,k])}var g=Math.tan((T-M)/4),P=4/3*r*g,E=4/3*n*g,z=[2*e-(e+P*Math.sin(M)),2*t-(t-E*Math.cos(M)),s+P*Math.sin(T),l-E*Math.cos(T),s,l];if(u)return z;S&&(z=z.concat(S));for(var q=0;q{var J9t=nY(),$9t=Lze(),Q9t={M:"moveTo",C:"bezierCurveTo"};Pze.exports=function(e,t){e.beginPath(),$9t(J9t(t)).forEach(function(r){var n=r[0],i=r.slice(1);e[Q9t[n]].apply(e,i)}),e.closePath()}});var zze=ye((Syr,Fze)=>{"use strict";var eqt=rk();Fze.exports=tqt;var _k=1e20;function tqt(e,t){t||(t={});var r=t.cutoff==null?.25:t.cutoff,n=t.radius==null?8:t.radius,i=t.channel||0,a,o,s,l,u,c,f,h,d,v,m;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");a=t.width,o=t.height,l=e,t.stride?c=t.stride:c=Math.floor(e.length/a/o)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(h=e,f=h.getContext("2d"),a=h.width,o=h.height,d=f.getImageData(0,0,a,o),l=d.data,c=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(h=e.canvas,f=e,a=h.width,o=h.height,d=f.getImageData(0,0,a,o),l=d.data,c=4):window.ImageData&&e instanceof window.ImageData&&(d=e,a=e.width,o=e.height,l=d.data,c=4);if(s=Math.max(a,o),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(u=l,l=Array(a*o),v=0,m=u.length;v{"use strict";var rqt=Aze(),iqt=nM(),nqt=Ize(),aqt=oY(),oqt=zze(),lY=document.createElement("canvas"),dp=lY.getContext("2d");qze.exports=sqt;function sqt(e,t){if(!aqt(e))throw Error("Argument should be valid svg path string");t||(t={});var r,n;t.shape?(r=t.shape[0],n=t.shape[1]):(r=lY.width=t.w||t.width||200,n=lY.height=t.h||t.height||200);var i=Math.min(r,n),a=t.stroke||0,o=t.viewbox||t.viewBox||rqt(e),s=[r/(o[2]-o[0]),n/(o[3]-o[1])],l=Math.min(s[0]||0,s[1]||0)/2;if(dp.fillStyle="black",dp.fillRect(0,0,r,n),dp.fillStyle="white",a&&(typeof a!="number"&&(a=1),a>0?dp.strokeStyle="white":dp.strokeStyle="black",dp.lineWidth=Math.abs(a)),dp.translate(r*.5,n*.5),dp.scale(l,l),lqt()){var u=new Path2D(e);dp.fill(u),a&&dp.stroke(u)}else{var c=iqt(e);nqt(dp,c),dp.fill(),a&&dp.stroke()}dp.setTransform(1,0,0,1,0,0);var f=oqt(dp,{cutoff:t.cutoff!=null?t.cutoff:.5,radius:t.radius!=null?t.radius:i*.5});return f}var $F;function lqt(){if($F!=null)return $F;var e=document.createElement("canvas").getContext("2d");if(e.canvas.width=e.canvas.height=1,!window.Path2D)return $F=!1;var t=new Path2D("M0,0h1v1h-1v-1Z");e.fillStyle="black",e.fill(t);var r=e.getImageData(0,0,1,1);return $F=r&&r.data&&r.data[3]===255}});var sw=ye((Eyr,Yze)=>{"use strict";var ez=Eo(),uqt=Oze(),QF=ox(),cqt=Oa(),c5=Pr(),bh=c5.isArrayOrTypedArray,l5=So(),Bze=hf(),Nze=a1().formatColor,u5=Ru(),fqt=O3(),cY=WF(),xk=px(),hqt=X1().DESELECTDIM,Uze={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},dqt=ip().appendArrayPointValue;function vqt(e,t){var r,n={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},i=e._context.plotGlPixelRatio;if(t.visible!==!0)return n;if(u5.hasText(t)&&(n.text=Zze(e,t),n.textSel=Gze(e,t,t.selected),n.textUnsel=Gze(e,t,t.unselected)),u5.hasMarkers(t)&&(n.marker=hY(e,t),n.markerSel=fY(e,t,t.selected),n.markerUnsel=fY(e,t,t.unselected),!t.unselected&&bh(t.marker.opacity))){var a=t.marker.opacity;for(n.markerUnsel.opacity=new Array(a.length),r=0;r500?"bold":"normal":e}function hY(e,t){var r=t._length,n=t.marker,i={},a,o=bh(n.symbol),s=bh(n.angle),l=bh(n.color),u=bh(n.line.color),c=bh(n.opacity),f=bh(n.size),h=bh(n.line.width),d;if(o||(d=cY.isOpenSymbol(n.symbol)),o||l||u||c||s){i.symbols=new Array(r),i.angles=new Array(r),i.colors=new Array(r),i.borderColors=new Array(r);var v=n.symbol,m=n.angle,b=Nze(n,n.opacity,r),p=Nze(n.line,n.opacity,r);if(!bh(p[0])){var k=p;for(p=Array(r),a=0;axk.TOO_MANY_POINTS||u5.hasMarkers(t)?"rect":"round";if(u&&t.connectgaps){var f=a[0],h=a[1];for(o=0;o1?l[o]:l[0]:l,d=bh(u)?u.length>1?u[o]:u[0]:u,v=Uze[h],m=Uze[d],b=c?c/.8+1:0,p=-m*b-m*.5;a.offset[o]=[v*b/f,p/f]}}return a}Yze.exports={style:vqt,markerStyle:hY,markerSelection:fY,linePositions:gqt,errorBarPositions:mqt,textPosition:yqt}});var dY=ye((kyr,Kze)=>{"use strict";var tz=Pr();Kze.exports=function(t,r){var n=r._scene,i={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},a={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return r._scene||(n=r._scene={},n.init=function(){tz.extendFlat(n,a,i)},n.init(),n.update=function(s){var l=tz.repeat(s,n.count);if(n.fill2d&&n.fill2d.update(l),n.scatter2d&&n.scatter2d.update(l),n.line2d&&n.line2d.update(l),n.error2d&&n.error2d.update(l.concat(l)),n.select2d&&n.select2d.update(l),n.glText)for(var u=0;u{"use strict";var _qt=ZF(),f5=Pr(),Jze=hf(),xqt=Mg().findExtremes,$ze=zg(),vY=O0(),bqt=vY.calcMarkerSize,wqt=vY.calcAxisExpansion,Tqt=vY.setFirstScatter,Aqt=z0(),h5=sw(),Sqt=dY(),Qze=fs().BADNUM,Mqt=px().TOO_MANY_POINTS;t7e.exports=function(t,r){var n=t._fullLayout,i=r._xA=Jze.getFromId(t,r.xaxis,"x"),a=r._yA=Jze.getFromId(t,r.yaxis,"y"),o=n._plots[r.xaxis+r.yaxis],s=r._length,l=s>=Mqt,u=s*2,c={},f,h=i.makeCalcdata(r,"x"),d=a.makeCalcdata(r,"y"),v=$ze(r,i,"x",h),m=$ze(r,a,"y",d),b=v.vals,p=m.vals;r._x=b,r._y=p,r.xperiodalignment&&(r._origX=h,r._xStarts=v.starts,r._xEnds=v.ends),r.yperiodalignment&&(r._origY=d,r._yStarts=m.starts,r._yEnds=m.ends);var k=new Array(u),M=new Array(s);for(f=0;f1&&f5.extendFlat(o.line,h5.linePositions(e,r,n)),o.errorX||o.errorY){var s=h5.errorBarPositions(e,r,n,i,a);o.errorX&&f5.extendFlat(o.errorX,s.x),o.errorY&&f5.extendFlat(o.errorY,s.y)}return o.text&&(f5.extendFlat(o.text,{positions:n},h5.textPosition(e,r,o.text,o.marker)),f5.extendFlat(o.textSel,{positions:n},h5.textPosition(e,r,o.text,o.markerSel)),f5.extendFlat(o.textUnsel,{positions:n},h5.textPosition(e,r,o.text,o.markerUnsel))),o}});var pY=ye((Lyr,n7e)=>{"use strict";var i7e=Pr(),kqt=ka(),Cqt=X1().DESELECTDIM;function Lqt(e){var t=e[0],r=t.trace,n=t.t,i=n._scene,a=n.index,o=i.selectBatch[a],s=i.unselectBatch[a],l=i.textOptions[a],u=i.textSelectedOptions[a]||{},c=i.textUnselectedOptions[a]||{},f=i7e.extendFlat({},l),h,d;if(o.length||s.length){var v=u.color,m=c.color,b=l.color,p=i7e.isArrayOrTypedArray(b);for(f.color=new Array(r._length),h=0;h{"use strict";var a7e=Ru(),Pqt=pY().styleTextSelection;o7e.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l=n[0].t,u=s._length,c=l.x,f=l.y,h=l._scene,d=l.index;if(!h)return o;var v=a7e.hasText(s),m=a7e.hasMarkers(s),b=!m&&!v;if(s.visible!==!0||b)return o;var p=[],k=[];if(r!==!1&&!r.degenerate)for(var M=0;M{"use strict";var Iqt=jF();s7e.exports={moduleType:"trace",name:"scattergl",basePlotModule:mh(),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:gk(),supplyDefaults:GFe(),crossTraceDefaults:cU(),colorbar:$d(),formatLabels:jFe(),calc:r7e(),hoverPoints:Iqt.hoverPoints,selectPoints:gY(),meta:{}}});var c7e=ye((Ryr,iz)=>{"use strict";var rz=rk();iz.exports=u7e;iz.exports.to=u7e;iz.exports.from=Rqt;function u7e(e,t){t==null&&(t=!0);var r=e[0],n=e[1],i=e[2],a=e[3];a==null&&(a=t?1:255),t&&(r*=255,n*=255,i*=255,a*=255),r=rz(r,0,255)&255,n=rz(n,0,255)&255,i=rz(i,0,255)&255,a=rz(a,0,255)&255;var o=r*16777216+(n<<16)+(i<<8)+a;return o}function Rqt(e,t){e=+e;var r=e>>>24,n=(e&16711680)>>>16,i=(e&65280)>>>8,a=e&255;return t===!1?[r,n,i,a]:[r/255,n/255,i/255,a/255]}});var Nh=ye((Dyr,h7e)=>{"use strict";var f7e=Object.getOwnPropertySymbols,Dqt=Object.prototype.hasOwnProperty,Fqt=Object.prototype.propertyIsEnumerable;function zqt(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function qqt(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(t).map(function(a){return t[a]});if(n.join("")!=="0123456789")return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(a){i[a]=a}),Object.keys(Object.assign({},i)).join("")==="abcdefghijklmnopqrst"}catch(a){return!1}}h7e.exports=qqt()?Object.assign:function(e,t){for(var r,n=zqt(e),i,a=1;a{d7e.exports=function(e){typeof e=="string"&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],n=0;n{"use strict";p7e.exports=function(t,r,n){Array.isArray(n)||(n=[].slice.call(arguments,2));for(var i=0,a=n.length;i{"use strict";g7e.exports=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))});var nz=ye((Oyr,d5)=>{"use strict";d5.exports=bk;d5.exports.float32=d5.exports.float=bk;d5.exports.fract32=d5.exports.fract=Oqt;var y7e=new Float32Array(1);function Oqt(e,t){if(e.length){if(e instanceof Float32Array)return new Float32Array(e.length);t instanceof Float32Array||(t=bk(e));for(var r=0,n=t.length;r{"use strict";function Bqt(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Nqt(e,t){return Gqt(e)||Bqt(e,t)||x7e(e,t)||Wqt()}function Uqt(e){return Vqt(e)||Hqt(e)||x7e(e)||jqt()}function Vqt(e){if(Array.isArray(e))return yY(e)}function Gqt(e){if(Array.isArray(e))return e}function Hqt(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function x7e(e,t){if(e){if(typeof e=="string")return yY(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yY(e,t)}}function yY(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rre)?N.tree=GOt(j,{bounds:ge}):re&&re.length&&(N.tree=re),N.tree){var ie={primitive:"points",usage:"static",data:N.tree,type:"uint32"};N.elements?N.elements(ie):N.elements=o.elements(ie)}var Se=oz.float32(j);oe({data:Se,usage:"dynamic"});var Ee=oz.fract32(j,Se);return _e({data:Ee,usage:"dynamic"}),Ce({data:new Uint8Array(Le),type:"uint8",usage:"stream"}),j}},{marker:function(j,N,H){var re=N.activation;if(re.forEach(function(Ee){return Ee&&Ee.destroy&&Ee.destroy()}),re.length=0,!j||typeof j[0]=="number"){var oe=e.addMarker(j);re[oe]=!0}else{for(var _e=[],Ce=0,Le=Math.min(j.length,N.count);Ce=0)return i;var a;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)a=e;else{a=new Uint8Array(e.length);for(var o=0,s=e.length;on*4&&(this.tooManyColors=!0),this.updatePalette(r),i.length===1?i[0]:i};nv.prototype.updatePalette=function(e){if(!this.tooManyColors){var t=this.maxColors,r=this.paletteTexture,n=Math.ceil(e.length*.25/t);if(n>1){e=e.slice();for(var i=e.length*.25%t;i{"use strict";TY.exports=uz;TY.exports.default=uz;function uz(e,t,r){r=r||2;var n=t&&t.length,i=n?t[0]*r:e.length,a=b7e(e,0,i,r,!0),o=[];if(!a||a.next===a.prev)return o;var s,l,u,c,f,h,d;if(n&&(a=tqt(e,t,a,r)),e.length>80*r){s=u=e[0],l=c=e[1];for(var v=r;vu&&(u=f),h>c&&(c=h);d=Math.max(u-s,c-l),d=d!==0?32767/d:0}return wk(a,o,r,s,l,d,0),o}function b7e(e,t,r,n,i){var a,o;if(i===wY(e,t,r,n)>0)for(a=t;a=t;a-=n)o=x7e(a,e[a],e[a+1],o);return o&&cz(o,o.next)&&(Ak(o),o=o.next),o}function lw(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(cz(r,r.next)||wh(r.prev,r,r.next)===0)){if(Ak(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function wk(e,t,r,n,i,a,o){if(e){!o&&a&&oqt(e,n,i,a);for(var s=e,l,u;e.prev!==e.next;){if(l=e.prev,u=e.next,a?$Ot(e,n,i,a):JOt(e)){t.push(l.i/r|0),t.push(e.i/r|0),t.push(u.i/r|0),Ak(e),e=u.next,s=u.next;continue}if(e=u,e===s){o?o===1?(e=QOt(lw(e),t,r),wk(e,t,r,n,i,a,2)):o===2&&eqt(e,t,r,n,i,a):wk(lw(e),t,r,n,i,a,1);break}}}}function JOt(e){var t=e.prev,r=e,n=e.next;if(wh(t,r,n)>=0)return!1;for(var i=t.x,a=r.x,o=n.x,s=t.y,l=r.y,u=n.y,c=ia?i>o?i:o:a>o?a:o,d=s>l?s>u?s:u:l>u?l:u,v=n.next;v!==t;){if(v.x>=c&&v.x<=h&&v.y>=f&&v.y<=d&&v5(i,s,a,l,o,u,v.x,v.y)&&wh(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function $Ot(e,t,r,n){var i=e.prev,a=e,o=e.next;if(wh(i,a,o)>=0)return!1;for(var s=i.x,l=a.x,u=o.x,c=i.y,f=a.y,h=o.y,d=sl?s>u?s:u:l>u?l:u,b=c>f?c>h?c:h:f>h?f:h,p=xY(d,v,t,r,n),k=xY(_,b,t,r,n),E=e.prevZ,T=e.nextZ;E&&E.z>=p&&T&&T.z<=k;){if(E.x>=d&&E.x<=_&&E.y>=v&&E.y<=b&&E!==i&&E!==o&&v5(s,c,l,f,u,h,E.x,E.y)&&wh(E.prev,E,E.next)>=0||(E=E.prevZ,T.x>=d&&T.x<=_&&T.y>=v&&T.y<=b&&T!==i&&T!==o&&v5(s,c,l,f,u,h,T.x,T.y)&&wh(T.prev,T,T.next)>=0))return!1;T=T.nextZ}for(;E&&E.z>=p;){if(E.x>=d&&E.x<=_&&E.y>=v&&E.y<=b&&E!==i&&E!==o&&v5(s,c,l,f,u,h,E.x,E.y)&&wh(E.prev,E,E.next)>=0)return!1;E=E.prevZ}for(;T&&T.z<=k;){if(T.x>=d&&T.x<=_&&T.y>=v&&T.y<=b&&T!==i&&T!==o&&v5(s,c,l,f,u,h,T.x,T.y)&&wh(T.prev,T,T.next)>=0)return!1;T=T.nextZ}return!0}function QOt(e,t,r){var n=e;do{var i=n.prev,a=n.next.next;!cz(i,a)&&w7e(i,n,n.next,a)&&Tk(i,a)&&Tk(a,i)&&(t.push(i.i/r|0),t.push(n.i/r|0),t.push(a.i/r|0),Ak(n),Ak(n.next),n=e=a),n=n.next}while(n!==e);return lw(n)}function eqt(e,t,r,n,i,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&uqt(o,s)){var l=T7e(o,s);o=lw(o,o.next),l=lw(l,l.next),wk(o,t,r,n,i,a,0),wk(l,t,r,n,i,a,0);return}s=s.next}o=o.next}while(o!==e)}function tqt(e,t,r,n){var i=[],a,o,s,l,u;for(a=0,o=t.length;a=r.next.y&&r.next.y!==r.y){var s=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=n&&s>a&&(a=s,o=r.x=r.x&&r.x>=u&&n!==r.x&&v5(io.x||r.x===o.x&&aqt(o,r)))&&(o=r,f=h)),r=r.next;while(r!==l);return o}function aqt(e,t){return wh(e.prev,e,t.prev)<0&&wh(t.next,e,e.next)<0}function oqt(e,t,r,n){var i=e;do i.z===0&&(i.z=xY(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,sqt(i)}function sqt(e){var t,r,n,i,a,o,s,l,u=1;do{for(r=e,e=null,a=null,o=0;r;){for(o++,n=r,s=0,t=0;t0||l>0&&n;)s!==0&&(l===0||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;r=n}a.nextZ=null,u*=2}while(o>1);return e}function xY(e,t,r,n,i){return e=(e-r)*i|0,t=(t-n)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function lqt(e){var t=e,r=e;do(t.x=(e-o)*(a-s)&&(e-o)*(n-s)>=(r-o)*(t-s)&&(r-o)*(a-s)>=(i-o)*(n-s)}function uqt(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!cqt(e,t)&&(Tk(e,t)&&Tk(t,e)&&fqt(e,t)&&(wh(e.prev,e,t.prev)||wh(e,t.prev,t))||cz(e,t)&&wh(e.prev,e,e.next)>0&&wh(t.prev,t,t.next)>0)}function wh(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function cz(e,t){return e.x===t.x&&e.y===t.y}function w7e(e,t,r,n){var i=lz(wh(e,t,r)),a=lz(wh(e,t,n)),o=lz(wh(r,n,e)),s=lz(wh(r,n,t));return!!(i!==a&&o!==s||i===0&&sz(e,r,t)||a===0&&sz(e,n,t)||o===0&&sz(r,e,n)||s===0&&sz(r,t,n))}function sz(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function lz(e){return e>0?1:e<0?-1:0}function cqt(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&w7e(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function Tk(e,t){return wh(e.prev,e,e.next)<0?wh(e,t,e.next)>=0&&wh(e,e.prev,t)>=0:wh(e,t,e.prev)<0||wh(e,e.next,t)<0}function fqt(e,t){var r=e,n=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==e);return n}function T7e(e,t){var r=new bY(e.i,e.x,e.y),n=new bY(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function x7e(e,t,r,n){var i=new bY(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function Ak(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function bY(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}uz.deviation=function(e,t,r,n){var i=t&&t.length,a=i?t[0]*r:e.length,o=Math.abs(wY(e,0,a,r));if(i)for(var s=0,l=t.length;s0&&(n+=e[i-1].length,r.holes.push(n))}return r}});var M7e=ye((Ryr,S7e)=>{"use strict";var hqt=rw();S7e.exports=dqt;function dqt(e,t,r){if(!e||e.length==null)throw Error("Argument should be an array");t==null&&(t=1),r==null&&(r=hqt(e,t));for(var n=0;n{"use strict";E7e.exports=function(){var e,t;if(typeof WeakMap!="function")return!1;try{e=new WeakMap([[t={},"one"],[{},"two"],[{},"three"]])}catch(r){return!1}return!(String(e)!=="[object WeakMap]"||typeof e.set!="function"||e.set({},1)!==e||typeof e.delete!="function"||typeof e.has!="function"||e.get(t)!=="one")}});var L7e=ye((Fyr,C7e)=>{"use strict";C7e.exports=function(){}});var mx=ye((zyr,P7e)=>{"use strict";var vqt=L7e()();P7e.exports=function(e){return e!==vqt&&e!==null}});var AY=ye((Oyr,R7e)=>{"use strict";var pqt=Object.create,gqt=Object.getPrototypeOf,I7e={};R7e.exports=function(){var e=Object.setPrototypeOf,t=arguments[0]||pqt;return typeof e!="function"?!1:gqt(e(t(null),I7e))===I7e}});var SY=ye((qyr,D7e)=>{"use strict";var mqt=mx(),yqt={function:!0,object:!0};D7e.exports=function(e){return mqt(e)&&yqt[typeof e]||!1}});var c1=ye((Byr,F7e)=>{"use strict";var _qt=mx();F7e.exports=function(e){if(!_qt(e))throw new TypeError("Cannot use null or undefined");return e}});var O7e=ye((Nyr,z7e)=>{"use strict";var MY=Object.create,fz;AY()()||(fz=EY());z7e.exports=function(){var e,t,r;return!fz||fz.level!==1?MY:(e={},t={},r={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(n){if(n==="__proto__"){t[n]={configurable:!0,enumerable:!1,writable:!0,value:void 0};return}t[n]=r}),Object.defineProperties(e,t),Object.defineProperty(fz,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:e}),function(n,i){return MY(n===null?e:n,i)})}()});var EY=ye((Uyr,q7e)=>{"use strict";var xqt=SY(),bqt=c1(),wqt=Object.prototype.isPrototypeOf,Tqt=Object.defineProperty,Aqt={configurable:!0,enumerable:!1,writable:!0,value:void 0},hz;hz=function(e,t){if(bqt(e),t===null||xqt(t))return e;throw new TypeError("Prototype must be null or an object")};q7e.exports=function(e){var t,r;return e?(e.level===2?e.set?(r=e.set,t=function(n,i){return r.call(hz(n,i),i),n}):t=function(n,i){return hz(n,i).__proto__=i,n}:t=function n(i,a){var o;return hz(i,a),o=wqt.call(n.nullPolyfill,i),o&&delete n.nullPolyfill.__proto__,a===null&&(a=n.nullPolyfill),i.__proto__=a,o&&Tqt(n.nullPolyfill,"__proto__",Aqt),i},Object.defineProperty(t,"level",{configurable:!1,enumerable:!1,writable:!1,value:e.level})):null}(function(){var e=Object.create(null),t={},r,n=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(n){try{r=n.set,r.call(e,t)}catch(i){}if(Object.getPrototypeOf(e)===t)return{set:r,level:2}}return e.__proto__=t,Object.getPrototypeOf(e)===t?{level:2}:(e={},e.__proto__=t,Object.getPrototypeOf(e)===t?{level:1}:!1)}());O7e()});var dz=ye((Vyr,B7e)=>{"use strict";B7e.exports=AY()()?Object.setPrototypeOf:EY()});var U7e=ye((Gyr,N7e)=>{"use strict";var Sqt=SY();N7e.exports=function(e){if(!Sqt(e))throw new TypeError(e+" is not an Object");return e}});var G7e=ye((Hyr,V7e)=>{"use strict";var Mqt=Object.create(null),Eqt=Math.random;V7e.exports=function(){var e;do e=Eqt().toString(36).slice(2);while(Mqt[e]);return e}});var uw=ye((jyr,H7e)=>{"use strict";var kqt=void 0;H7e.exports=function(e){return e!==kqt&&e!==null}});var vz=ye((Wyr,j7e)=>{"use strict";var Cqt=uw(),Lqt={object:!0,function:!0,undefined:!0};j7e.exports=function(e){return Cqt(e)?hasOwnProperty.call(Lqt,typeof e):!1}});var X7e=ye((Xyr,W7e)=>{"use strict";var Pqt=vz();W7e.exports=function(e){if(!Pqt(e))return!1;try{return e.constructor?e.constructor.prototype===e:!1}catch(t){return!1}}});var Y7e=ye((Zyr,Z7e)=>{"use strict";var Iqt=X7e();Z7e.exports=function(e){if(typeof e!="function"||!hasOwnProperty.call(e,"length"))return!1;try{if(typeof e.length!="number"||typeof e.call!="function"||typeof e.apply!="function")return!1}catch(t){return!1}return!Iqt(e)}});var kY=ye((Yyr,K7e)=>{"use strict";var Rqt=Y7e(),Dqt=/^\s*class[\s{/}]/,Fqt=Function.prototype.toString;K7e.exports=function(e){return!(!Rqt(e)||Dqt.test(Fqt.call(e)))}});var $7e=ye((Kyr,J7e)=>{"use strict";J7e.exports=function(){var e=Object.assign,t;return typeof e!="function"?!1:(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}});var e9e=ye((Jyr,Q7e)=>{"use strict";Q7e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}});var r9e=ye(($yr,t9e)=>{"use strict";var zqt=mx(),Oqt=Object.keys;t9e.exports=function(e){return Oqt(zqt(e)?Object(e):e)}});var n9e=ye((Qyr,i9e)=>{"use strict";i9e.exports=e9e()()?Object.keys:r9e()});var o9e=ye((e1r,a9e)=>{"use strict";var qqt=n9e(),Bqt=c1(),Nqt=Math.max;a9e.exports=function(e,t){var r,n,i=Nqt(arguments.length,2),a;for(e=Object(Bqt(e)),a=function(o){try{e[o]=t[o]}catch(s){r||(r=s)}},n=1;n{"use strict";s9e.exports=$7e()()?Object.assign:o9e()});var CY=ye((r1r,l9e)=>{"use strict";var Uqt=mx(),Vqt=Array.prototype.forEach,Gqt=Object.create,Hqt=function(e,t){var r;for(r in e)t[r]=e[r]};l9e.exports=function(e){var t=Gqt(null);return Vqt.call(arguments,function(r){Uqt(r)&&Hqt(Object(r),t)}),t}});var c9e=ye((i1r,u9e)=>{"use strict";var LY="razdwatrzy";u9e.exports=function(){return typeof LY.contains!="function"?!1:LY.contains("dwa")===!0&&LY.contains("foo")===!1}});var h9e=ye((n1r,f9e)=>{"use strict";var jqt=String.prototype.indexOf;f9e.exports=function(e){return jqt.call(this,e,arguments[1])>-1}});var PY=ye((a1r,d9e)=>{"use strict";d9e.exports=c9e()()?String.prototype.contains:h9e()});var f1=ye((o1r,m9e)=>{"use strict";var gz=uw(),v9e=kY(),p9e=pz(),g9e=CY(),Sk=PY(),Wqt=m9e.exports=function(e,t){var r,n,i,a,o;return arguments.length<2||typeof e!="string"?(a=t,t=e,e=null):a=arguments[2],gz(e)?(r=Sk.call(e,"c"),n=Sk.call(e,"e"),i=Sk.call(e,"w")):(r=i=!0,n=!1),o={value:t,configurable:r,enumerable:n,writable:i},a?p9e(g9e(a),o):o};Wqt.gs=function(e,t,r){var n,i,a,o;return typeof e!="string"?(a=r,r=t,t=e,e=null):a=arguments[3],gz(t)?v9e(t)?gz(r)?v9e(r)||(a=r,r=void 0):r=void 0:(a=t,t=r=void 0):t=void 0,gz(e)?(n=Sk.call(e,"c"),i=Sk.call(e,"e")):(n=!0,i=!1),o={get:t,set:r,configurable:n,enumerable:i},a?p9e(g9e(a),o):o}});var Mk=ye((s1r,_9e)=>{"use strict";var y9e=Object.prototype.toString,Xqt=y9e.call(function(){return arguments}());_9e.exports=function(e){return y9e.call(e)===Xqt}});var Ek=ye((l1r,b9e)=>{"use strict";var x9e=Object.prototype.toString,Zqt=x9e.call("");b9e.exports=function(e){return typeof e=="string"||e&&typeof e=="object"&&(e instanceof String||x9e.call(e)===Zqt)||!1}});var T9e=ye((u1r,w9e)=>{"use strict";w9e.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}});var M9e=ye((c1r,S9e)=>{var A9e=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};S9e.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return A9e()}try{return __global__||A9e()}finally{delete Object.prototype.__global__}}()});var kk=ye((f1r,E9e)=>{"use strict";E9e.exports=T9e()()?globalThis:M9e()});var C9e=ye((h1r,k9e)=>{"use strict";var Yqt=kk(),IY={object:!0,symbol:!0};k9e.exports=function(){var e=Yqt.Symbol,t;if(typeof e!="function")return!1;t=e("test symbol");try{String(t)}catch(r){return!1}return!(!IY[typeof e.iterator]||!IY[typeof e.toPrimitive]||!IY[typeof e.toStringTag])}});var P9e=ye((d1r,L9e)=>{"use strict";L9e.exports=function(e){return e?typeof e=="symbol"?!0:!e.constructor||e.constructor.name!=="Symbol"?!1:e[e.constructor.toStringTag]==="Symbol":!1}});var RY=ye((v1r,I9e)=>{"use strict";var Kqt=P9e();I9e.exports=function(e){if(!Kqt(e))throw new TypeError(e+" is not a symbol");return e}});var O9e=ye((p1r,z9e)=>{"use strict";var R9e=f1(),Jqt=Object.create,D9e=Object.defineProperty,$qt=Object.prototype,F9e=Jqt(null);z9e.exports=function(e){for(var t=0,r,n;F9e[e+(t||"")];)++t;return e+=t||"",F9e[e]=!0,r="@@"+e,D9e($qt,r,R9e.gs(null,function(i){n||(n=!0,D9e(this,r,R9e(i)),n=!1)})),r}});var B9e=ye((g1r,q9e)=>{"use strict";var rm=f1(),Uh=kk().Symbol;q9e.exports=function(e){return Object.defineProperties(e,{hasInstance:rm("",Uh&&Uh.hasInstance||e("hasInstance")),isConcatSpreadable:rm("",Uh&&Uh.isConcatSpreadable||e("isConcatSpreadable")),iterator:rm("",Uh&&Uh.iterator||e("iterator")),match:rm("",Uh&&Uh.match||e("match")),replace:rm("",Uh&&Uh.replace||e("replace")),search:rm("",Uh&&Uh.search||e("search")),species:rm("",Uh&&Uh.species||e("species")),split:rm("",Uh&&Uh.split||e("split")),toPrimitive:rm("",Uh&&Uh.toPrimitive||e("toPrimitive")),toStringTag:rm("",Uh&&Uh.toStringTag||e("toStringTag")),unscopables:rm("",Uh&&Uh.unscopables||e("unscopables"))})}});var V9e=ye((m1r,U9e)=>{"use strict";var N9e=f1(),Qqt=RY(),Ck=Object.create(null);U9e.exports=function(e){return Object.defineProperties(e,{for:N9e(function(t){return Ck[t]?Ck[t]:Ck[t]=e(String(t))}),keyFor:N9e(function(t){var r;Qqt(t);for(r in Ck)if(Ck[r]===t)return r})})}});var j9e=ye((y1r,H9e)=>{"use strict";var ty=f1(),DY=RY(),mz=kk().Symbol,eBt=O9e(),tBt=B9e(),rBt=V9e(),iBt=Object.create,FY=Object.defineProperties,yz=Object.defineProperty,Xv,p5,G9e;if(typeof mz=="function")try{String(mz()),G9e=!0}catch(e){}else mz=null;p5=function(t){if(this instanceof p5)throw new TypeError("Symbol is not a constructor");return Xv(t)};H9e.exports=Xv=function e(t){var r;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return G9e?mz(t):(r=iBt(p5.prototype),t=t===void 0?"":String(t),FY(r,{__description__:ty("",t),__name__:ty("",eBt(t))}))};tBt(Xv);rBt(Xv);FY(p5.prototype,{constructor:ty(Xv),toString:ty("",function(){return this.__name__})});FY(Xv.prototype,{toString:ty(function(){return"Symbol ("+DY(this).__description__+")"}),valueOf:ty(function(){return DY(this)})});yz(Xv.prototype,Xv.toPrimitive,ty("",function(){var e=DY(this);return typeof e=="symbol"?e:e.toString()}));yz(Xv.prototype,Xv.toStringTag,ty("c","Symbol"));yz(p5.prototype,Xv.toStringTag,ty("c",Xv.prototype[Xv.toStringTag]));yz(p5.prototype,Xv.toPrimitive,ty("c",Xv.prototype[Xv.toPrimitive]))});var yx=ye((_1r,W9e)=>{"use strict";W9e.exports=C9e()()?kk().Symbol:j9e()});var Z9e=ye((x1r,X9e)=>{"use strict";var nBt=c1();X9e.exports=function(){return nBt(this).length=0,this}});var g5=ye((b1r,Y9e)=>{"use strict";Y9e.exports=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e}});var J9e=ye((w1r,K9e)=>{"use strict";var aBt=uw(),oBt=vz(),sBt=Object.prototype.toString;K9e.exports=function(e){if(!aBt(e))return null;if(oBt(e)){var t=e.toString;if(typeof t!="function"||t===sBt)return null}try{return""+e}catch(r){return null}}});var Q9e=ye((T1r,$9e)=>{"use strict";$9e.exports=function(e){try{return e.toString()}catch(t){try{return String(e)}catch(r){return null}}}});var tOe=ye((A1r,eOe)=>{"use strict";var lBt=Q9e(),uBt=/[\n\r\u2028\u2029]/g;eOe.exports=function(e){var t=lBt(e);return t===null?"":(t.length>100&&(t=t.slice(0,99)+"\u2026"),t=t.replace(uBt,function(r){switch(r){case` -`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),t)}});var zY=ye((S1r,nOe)=>{"use strict";var rOe=uw(),cBt=vz(),fBt=J9e(),hBt=tOe(),iOe=function(e,t){return e.replace("%v",hBt(t))};nOe.exports=function(e,t,r){if(!cBt(r))throw new TypeError(iOe(t,e));if(!rOe(e)){if("default"in r)return r.default;if(r.isOptional)return null}var n=fBt(r.errorMessage);throw rOe(n)||(n=t),new TypeError(iOe(n,e))}});var oOe=ye((M1r,aOe)=>{"use strict";var dBt=zY(),vBt=uw();aOe.exports=function(e){return vBt(e)?e:dBt(e,"Cannot use %v",arguments[1])}});var lOe=ye((E1r,sOe)=>{"use strict";var pBt=zY(),gBt=kY();sOe.exports=function(e){return gBt(e)?e:pBt(e,"%v is not a plain function",arguments[1])}});var cOe=ye((k1r,uOe)=>{"use strict";uOe.exports=function(){var e=Array.from,t,r;return typeof e!="function"?!1:(t=["raz","dwa"],r=e(t),!!(r&&r!==t&&r[1]==="dwa"))}});var hOe=ye((C1r,fOe)=>{"use strict";var mBt=Object.prototype.toString,yBt=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);fOe.exports=function(e){return typeof e=="function"&&yBt(mBt.call(e))}});var vOe=ye((L1r,dOe)=>{"use strict";dOe.exports=function(){var e=Math.sign;return typeof e!="function"?!1:e(10)===1&&e(-20)===-1}});var gOe=ye((P1r,pOe)=>{"use strict";pOe.exports=function(e){return e=Number(e),isNaN(e)||e===0?e:e>0?1:-1}});var yOe=ye((I1r,mOe)=>{"use strict";mOe.exports=vOe()()?Math.sign:gOe()});var xOe=ye((R1r,_Oe)=>{"use strict";var _Bt=yOe(),xBt=Math.abs,bBt=Math.floor;_Oe.exports=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:_Bt(e)*bBt(xBt(e)))}});var wOe=ye((D1r,bOe)=>{"use strict";var wBt=xOe(),TBt=Math.max;bOe.exports=function(e){return TBt(0,wBt(e))}});var MOe=ye((F1r,SOe)=>{"use strict";var ABt=yx().iterator,SBt=Mk(),MBt=hOe(),EBt=wOe(),TOe=g5(),kBt=c1(),CBt=mx(),LBt=Ek(),AOe=Array.isArray,OY=Function.prototype.call,cw={configurable:!0,enumerable:!0,writable:!0,value:null},qY=Object.defineProperty;SOe.exports=function(e){var t=arguments[1],r=arguments[2],n,i,a,o,s,l,u,c,f,h;if(e=Object(kBt(e)),CBt(t)&&TOe(t),!this||this===Array||!MBt(this)){if(!t){if(SBt(e))return s=e.length,s!==1?Array.apply(null,e):(o=new Array(1),o[0]=e[0],o);if(AOe(e)){for(o=new Array(s=e.length),i=0;i=55296&&l<=56319&&(h+=e[++i])),h=t?OY.call(t,r,h,a):h,n?(cw.value=h,qY(o,a,cw)):o[a]=h,++a;s=a}}if(s===void 0)for(s=EBt(e.length),n&&(o=new n(s)),i=0;i{"use strict";EOe.exports=cOe()()?Array.from:MOe()});var LOe=ye((O1r,COe)=>{"use strict";var PBt=kOe(),IBt=pz(),RBt=c1();COe.exports=function(e){var t=Object(RBt(e)),r=arguments[1],n=Object(arguments[2]);if(t!==e&&!r)return t;var i={};return r?PBt(r,function(a){(n.ensure||a in e)&&(i[a]=e[a])}):IBt(i,e),i}});var ROe=ye((q1r,IOe)=>{"use strict";var DBt=g5(),FBt=c1(),zBt=Function.prototype.bind,POe=Function.prototype.call,OBt=Object.keys,qBt=Object.prototype.propertyIsEnumerable;IOe.exports=function(e,t){return function(r,n){var i,a=arguments[2],o=arguments[3];return r=Object(FBt(r)),DBt(n),i=OBt(r),o&&i.sort(typeof o=="function"?zBt.call(o,r):void 0),typeof e!="function"&&(e=i[e]),POe.call(e,i,function(s,l){return qBt.call(r,s)?POe.call(n,a,r[s],s,r,l):t})}}});var FOe=ye((B1r,DOe)=>{"use strict";DOe.exports=ROe()("forEach")});var OOe=ye((N1r,zOe)=>{"use strict";var BBt=g5(),NBt=FOe(),UBt=Function.prototype.call;zOe.exports=function(e,t){var r={},n=arguments[2];return BBt(t),NBt(e,function(i,a,o,s){r[a]=UBt.call(t,n,i,a,o,s)}),r}});var UOe=ye((U1r,NOe)=>{"use strict";var VBt=uw(),GBt=oOe(),qOe=lOe(),HBt=LOe(),jBt=CY(),WBt=OOe(),XBt=Function.prototype.bind,ZBt=Object.defineProperty,YBt=Object.prototype.hasOwnProperty,BOe;BOe=function(e,t,r){var n=GBt(t)&&qOe(t.value),i;return i=HBt(t),delete i.writable,delete i.value,i.get=function(){return!r.overwriteDefinition&&YBt.call(this,e)?n:(t.value=XBt.call(n,r.resolveContext?r.resolveContext(this):this),ZBt(this,e,t),this[e])},i};NOe.exports=function(e){var t=jBt(arguments[1]);return VBt(t.resolveContext)&&qOe(t.resolveContext),WBt(e,function(r,n){return BOe(n,r,t)})}});var BY=ye((V1r,jOe)=>{"use strict";var KBt=Z9e(),JBt=pz(),$Bt=g5(),QBt=c1(),qp=f1(),eNt=UOe(),VOe=yx(),GOe=Object.defineProperty,HOe=Object.defineProperties,Lk;jOe.exports=Lk=function(e,t){if(!(this instanceof Lk))throw new TypeError("Constructor requires 'new'");HOe(this,{__list__:qp("w",QBt(e)),__context__:qp("w",t),__nextIndex__:qp("w",0)}),t&&($Bt(t.on),t.on("_add",this._onAdd),t.on("_delete",this._onDelete),t.on("_clear",this._onClear))};delete Lk.prototype.constructor;HOe(Lk.prototype,JBt({_next:qp(function(){var e;if(this.__list__){if(this.__redo__&&(e=this.__redo__.shift(),e!==void 0))return e;if(this.__nextIndex__=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){GOe(this,"__redo__",qp("c",[e]));return}this.__redo__.forEach(function(t,r){t>=e&&(this.__redo__[r]=++t)},this),this.__redo__.push(e)}}),_onDelete:qp(function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(t=this.__redo__.indexOf(e),t!==-1&&this.__redo__.splice(t,1),this.__redo__.forEach(function(r,n){r>e&&(this.__redo__[n]=--r)},this)))}),_onClear:qp(function(){this.__redo__&&KBt.call(this.__redo__),this.__nextIndex__=0})})));GOe(Lk.prototype,VOe.iterator,qp(function(){return this}))});var KOe=ye((G1r,YOe)=>{"use strict";var WOe=dz(),XOe=PY(),NY=f1(),tNt=yx(),UY=BY(),ZOe=Object.defineProperty,m5;m5=YOe.exports=function(e,t){if(!(this instanceof m5))throw new TypeError("Constructor requires 'new'");UY.call(this,e),t?XOe.call(t,"key+value")?t="key+value":XOe.call(t,"key")?t="key":t="value":t="value",ZOe(this,"__kind__",NY("",t))};WOe&&WOe(m5,UY);delete m5.prototype.constructor;m5.prototype=Object.create(UY.prototype,{_resolve:NY(function(e){return this.__kind__==="value"?this.__list__[e]:this.__kind__==="key+value"?[e,this.__list__[e]]:e})});ZOe(m5.prototype,tNt.toStringTag,NY("c","Array Iterator"))});var eqe=ye((H1r,QOe)=>{"use strict";var JOe=dz(),_z=f1(),rNt=yx(),VY=BY(),$Oe=Object.defineProperty,y5;y5=QOe.exports=function(e){if(!(this instanceof y5))throw new TypeError("Constructor requires 'new'");e=String(e),VY.call(this,e),$Oe(this,"__length__",_z("",e.length))};JOe&&JOe(y5,VY);delete y5.prototype.constructor;y5.prototype=Object.create(VY.prototype,{_next:_z(function(){if(this.__list__){if(this.__nextIndex__=55296&&r<=56319?t+this.__list__[this.__nextIndex__++]:t)})});$Oe(y5.prototype,rNt.toStringTag,_z("c","String Iterator"))});var rqe=ye((j1r,tqe)=>{"use strict";var iNt=Mk(),nNt=mx(),aNt=Ek(),oNt=yx().iterator,sNt=Array.isArray;tqe.exports=function(e){return nNt(e)?sNt(e)||aNt(e)||iNt(e)?!0:typeof e[oNt]=="function":!1}});var nqe=ye((W1r,iqe)=>{"use strict";var lNt=rqe();iqe.exports=function(e){if(!lNt(e))throw new TypeError(e+" is not iterable");return e}});var GY=ye((X1r,sqe)=>{"use strict";var uNt=Mk(),cNt=Ek(),aqe=KOe(),fNt=eqe(),hNt=nqe(),oqe=yx().iterator;sqe.exports=function(e){return typeof hNt(e)[oqe]=="function"?e[oqe]():uNt(e)?new aqe(e):cNt(e)?new fNt(e):new aqe(e)}});var uqe=ye((Z1r,lqe)=>{"use strict";var dNt=Mk(),vNt=g5(),pNt=Ek(),gNt=GY(),mNt=Array.isArray,HY=Function.prototype.call,yNt=Array.prototype.some;lqe.exports=function(e,t){var r,n=arguments[2],i,a,o,s,l,u,c;if(mNt(e)||dNt(e)?r="array":pNt(e)?r="string":e=gNt(e),vNt(t),a=function(){o=!0},r==="array"){yNt.call(e,function(f){return HY.call(t,n,f,a),o});return}if(r==="string"){for(l=e.length,s=0;s=55296&&c<=56319&&(u+=e[++s])),HY.call(t,n,u,a),!o);++s);return}for(i=e.next();!i.done;){if(HY.call(t,n,i.value,a),o)return;i=e.next()}}});var fqe=ye((Y1r,cqe)=>{"use strict";cqe.exports=function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"}()});var vqe=ye((K1r,dqe)=>{"use strict";var _Nt=mx(),bz=dz(),xz=U7e(),xNt=c1(),bNt=G7e(),h1=f1(),wNt=GY(),TNt=uqe(),ANt=yx().toStringTag,hqe=fqe(),SNt=Array.isArray,WY=Object.defineProperty,jY=Object.prototype.hasOwnProperty,MNt=Object.getPrototypeOf,_x;dqe.exports=_x=function(){var e=arguments[0],t;if(!(this instanceof _x))throw new TypeError("Constructor requires 'new'");return t=hqe&&bz&&WeakMap!==_x?bz(new WeakMap,MNt(this)):this,_Nt(e)&&(SNt(e)||(e=wNt(e))),WY(t,"__weakMapData__",h1("c","$weakMap$"+bNt())),e&&TNt(e,function(r){xNt(r),t.set(r[0],r[1])}),t};hqe&&(bz&&bz(_x,WeakMap),_x.prototype=Object.create(WeakMap.prototype,{constructor:h1(_x)}));Object.defineProperties(_x.prototype,{delete:h1(function(e){return jY.call(xz(e),this.__weakMapData__)?(delete e[this.__weakMapData__],!0):!1}),get:h1(function(e){if(jY.call(xz(e),this.__weakMapData__))return e[this.__weakMapData__]}),has:h1(function(e){return jY.call(xz(e),this.__weakMapData__)}),set:h1(function(e,t){return WY(xz(e),this.__weakMapData__,h1("c",t)),this}),toString:h1(function(){return"[object WeakMap]"})});WY(_x.prototype,ANt,h1("c","WeakMap"))});var XY=ye((J1r,pqe)=>{"use strict";pqe.exports=k7e()()?WeakMap:vqe()});var mqe=ye(($1r,gqe)=>{"use strict";gqe.exports=function(e,t,r){if(typeof Array.prototype.findIndex=="function")return e.findIndex(t,r);if(typeof t!="function")throw new TypeError("predicate must be a function");var n=Object(e),i=n.length;if(i===0)return-1;for(var a=0;a{"use strict";var wz=ox(),ENt=rw(),YY=Nh(),kNt=ey(),CNt=iw(),yqe=A7e(),LNt=M7e(),{float32:PNt,fract32:ZY}=nz(),INt=XY(),_qe=s5(),RNt=mqe(),DNt=` +`]),_7e&&(v.frag=v.frag.replace("smoothstep","smoothStep"),d.frag=d.frag.replace("smoothstep","smoothStep")),this.drawCircle=e(v)}nv.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4};nv.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this};nv.prototype.draw=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;nre)?N.tree=Kqt(j,{bounds:ge}):re&&re.length&&(N.tree=re),N.tree){var ie={primitive:"points",usage:"static",data:N.tree,type:"uint32"};N.elements?N.elements(ie):N.elements=o.elements(ie)}var Se=oz.float32(j);oe({data:Se,usage:"dynamic"});var Ee=oz.fract32(j,Se);return _e({data:Ee,usage:"dynamic"}),ke({data:new Uint8Array(Ce),type:"uint8",usage:"stream"}),j}},{marker:function(j,N,H){var re=N.activation;if(re.forEach(function(Ee){return Ee&&Ee.destroy&&Ee.destroy()}),re.length=0,!j||typeof j[0]=="number"){var oe=e.addMarker(j);re[oe]=!0}else{for(var _e=[],ke=0,Ce=Math.min(j.length,N.count);ke=0)return i;var a;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)a=e;else{a=new Uint8Array(e.length);for(var o=0,s=e.length;on*4&&(this.tooManyColors=!0),this.updatePalette(r),i.length===1?i[0]:i};nv.prototype.updatePalette=function(e){if(!this.tooManyColors){var t=this.maxColors,r=this.paletteTexture,n=Math.ceil(e.length*.25/t);if(n>1){e=e.slice();for(var i=e.length*.25%t;i{"use strict";TY.exports=uz;TY.exports.default=uz;function uz(e,t,r){r=r||2;var n=t&&t.length,i=n?t[0]*r:e.length,a=T7e(e,0,i,r,!0),o=[];if(!a||a.next===a.prev)return o;var s,l,u,c,f,h,d;if(n&&(a=lOt(e,t,a,r)),e.length>80*r){s=u=e[0],l=c=e[1];for(var v=r;vu&&(u=f),h>c&&(c=h);d=Math.max(u-s,c-l),d=d!==0?32767/d:0}return wk(a,o,r,s,l,d,0),o}function T7e(e,t,r,n,i){var a,o;if(i===wY(e,t,r,n)>0)for(a=t;a=t;a-=n)o=w7e(a,e[a],e[a+1],o);return o&&cz(o,o.next)&&(Ak(o),o=o.next),o}function uw(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(cz(r,r.next)||wh(r.prev,r,r.next)===0)){if(Ak(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function wk(e,t,r,n,i,a,o){if(e){!o&&a&&dOt(e,n,i,a);for(var s=e,l,u;e.prev!==e.next;){if(l=e.prev,u=e.next,a?aOt(e,n,i,a):nOt(e)){t.push(l.i/r|0),t.push(e.i/r|0),t.push(u.i/r|0),Ak(e),e=u.next,s=u.next;continue}if(e=u,e===s){o?o===1?(e=oOt(uw(e),t,r),wk(e,t,r,n,i,a,2)):o===2&&sOt(e,t,r,n,i,a):wk(uw(e),t,r,n,i,a,1);break}}}}function nOt(e){var t=e.prev,r=e,n=e.next;if(wh(t,r,n)>=0)return!1;for(var i=t.x,a=r.x,o=n.x,s=t.y,l=r.y,u=n.y,c=ia?i>o?i:o:a>o?a:o,d=s>l?s>u?s:u:l>u?l:u,v=n.next;v!==t;){if(v.x>=c&&v.x<=h&&v.y>=f&&v.y<=d&&v5(i,s,a,l,o,u,v.x,v.y)&&wh(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function aOt(e,t,r,n){var i=e.prev,a=e,o=e.next;if(wh(i,a,o)>=0)return!1;for(var s=i.x,l=a.x,u=o.x,c=i.y,f=a.y,h=o.y,d=sl?s>u?s:u:l>u?l:u,b=c>f?c>h?c:h:f>h?f:h,p=xY(d,v,t,r,n),k=xY(m,b,t,r,n),M=e.prevZ,T=e.nextZ;M&&M.z>=p&&T&&T.z<=k;){if(M.x>=d&&M.x<=m&&M.y>=v&&M.y<=b&&M!==i&&M!==o&&v5(s,c,l,f,u,h,M.x,M.y)&&wh(M.prev,M,M.next)>=0||(M=M.prevZ,T.x>=d&&T.x<=m&&T.y>=v&&T.y<=b&&T!==i&&T!==o&&v5(s,c,l,f,u,h,T.x,T.y)&&wh(T.prev,T,T.next)>=0))return!1;T=T.nextZ}for(;M&&M.z>=p;){if(M.x>=d&&M.x<=m&&M.y>=v&&M.y<=b&&M!==i&&M!==o&&v5(s,c,l,f,u,h,M.x,M.y)&&wh(M.prev,M,M.next)>=0)return!1;M=M.prevZ}for(;T&&T.z<=k;){if(T.x>=d&&T.x<=m&&T.y>=v&&T.y<=b&&T!==i&&T!==o&&v5(s,c,l,f,u,h,T.x,T.y)&&wh(T.prev,T,T.next)>=0)return!1;T=T.nextZ}return!0}function oOt(e,t,r){var n=e;do{var i=n.prev,a=n.next.next;!cz(i,a)&&A7e(i,n,n.next,a)&&Tk(i,a)&&Tk(a,i)&&(t.push(i.i/r|0),t.push(n.i/r|0),t.push(a.i/r|0),Ak(n),Ak(n.next),n=e=a),n=n.next}while(n!==e);return uw(n)}function sOt(e,t,r,n,i,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&gOt(o,s)){var l=S7e(o,s);o=uw(o,o.next),l=uw(l,l.next),wk(o,t,r,n,i,a,0),wk(l,t,r,n,i,a,0);return}s=s.next}o=o.next}while(o!==e)}function lOt(e,t,r,n){var i=[],a,o,s,l,u;for(a=0,o=t.length;a=r.next.y&&r.next.y!==r.y){var s=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=n&&s>a&&(a=s,o=r.x=r.x&&r.x>=u&&n!==r.x&&v5(io.x||r.x===o.x&&hOt(o,r)))&&(o=r,f=h)),r=r.next;while(r!==l);return o}function hOt(e,t){return wh(e.prev,e,t.prev)<0&&wh(t.next,e,e.next)<0}function dOt(e,t,r,n){var i=e;do i.z===0&&(i.z=xY(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,vOt(i)}function vOt(e){var t,r,n,i,a,o,s,l,u=1;do{for(r=e,e=null,a=null,o=0;r;){for(o++,n=r,s=0,t=0;t0||l>0&&n;)s!==0&&(l===0||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;r=n}a.nextZ=null,u*=2}while(o>1);return e}function xY(e,t,r,n,i){return e=(e-r)*i|0,t=(t-n)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function pOt(e){var t=e,r=e;do(t.x=(e-o)*(a-s)&&(e-o)*(n-s)>=(r-o)*(t-s)&&(r-o)*(a-s)>=(i-o)*(n-s)}function gOt(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!mOt(e,t)&&(Tk(e,t)&&Tk(t,e)&&yOt(e,t)&&(wh(e.prev,e,t.prev)||wh(e,t.prev,t))||cz(e,t)&&wh(e.prev,e,e.next)>0&&wh(t.prev,t,t.next)>0)}function wh(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function cz(e,t){return e.x===t.x&&e.y===t.y}function A7e(e,t,r,n){var i=lz(wh(e,t,r)),a=lz(wh(e,t,n)),o=lz(wh(r,n,e)),s=lz(wh(r,n,t));return!!(i!==a&&o!==s||i===0&&sz(e,r,t)||a===0&&sz(e,n,t)||o===0&&sz(r,e,n)||s===0&&sz(r,t,n))}function sz(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function lz(e){return e>0?1:e<0?-1:0}function mOt(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&A7e(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function Tk(e,t){return wh(e.prev,e,e.next)<0?wh(e,t,e.next)>=0&&wh(e,e.prev,t)>=0:wh(e,t,e.prev)<0||wh(e,e.next,t)<0}function yOt(e,t){var r=e,n=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==e);return n}function S7e(e,t){var r=new bY(e.i,e.x,e.y),n=new bY(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function w7e(e,t,r,n){var i=new bY(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function Ak(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function bY(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}uz.deviation=function(e,t,r,n){var i=t&&t.length,a=i?t[0]*r:e.length,o=Math.abs(wY(e,0,a,r));if(i)for(var s=0,l=t.length;s0&&(n+=e[i-1].length,r.holes.push(n))}return r}});var k7e=ye((Uyr,E7e)=>{"use strict";var _Ot=iw();E7e.exports=xOt;function xOt(e,t,r){if(!e||e.length==null)throw Error("Argument should be an array");t==null&&(t=1),r==null&&(r=_Ot(e,t));for(var n=0;n{"use strict";C7e.exports=function(){var e,t;if(typeof WeakMap!="function")return!1;try{e=new WeakMap([[t={},"one"],[{},"two"],[{},"three"]])}catch(r){return!1}return!(String(e)!=="[object WeakMap]"||typeof e.set!="function"||e.set({},1)!==e||typeof e.delete!="function"||typeof e.has!="function"||e.get(t)!=="one")}});var I7e=ye((Gyr,P7e)=>{"use strict";P7e.exports=function(){}});var mx=ye((Hyr,R7e)=>{"use strict";var bOt=I7e()();R7e.exports=function(e){return e!==bOt&&e!==null}});var AY=ye((jyr,F7e)=>{"use strict";var wOt=Object.create,TOt=Object.getPrototypeOf,D7e={};F7e.exports=function(){var e=Object.setPrototypeOf,t=arguments[0]||wOt;return typeof e!="function"?!1:TOt(e(t(null),D7e))===D7e}});var SY=ye((Wyr,z7e)=>{"use strict";var AOt=mx(),SOt={function:!0,object:!0};z7e.exports=function(e){return AOt(e)&&SOt[typeof e]||!1}});var c1=ye((Xyr,q7e)=>{"use strict";var MOt=mx();q7e.exports=function(e){if(!MOt(e))throw new TypeError("Cannot use null or undefined");return e}});var B7e=ye((Zyr,O7e)=>{"use strict";var MY=Object.create,fz;AY()()||(fz=EY());O7e.exports=function(){var e,t,r;return!fz||fz.level!==1?MY:(e={},t={},r={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(n){if(n==="__proto__"){t[n]={configurable:!0,enumerable:!1,writable:!0,value:void 0};return}t[n]=r}),Object.defineProperties(e,t),Object.defineProperty(fz,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:e}),function(n,i){return MY(n===null?e:n,i)})}()});var EY=ye((Yyr,N7e)=>{"use strict";var EOt=SY(),kOt=c1(),COt=Object.prototype.isPrototypeOf,LOt=Object.defineProperty,POt={configurable:!0,enumerable:!1,writable:!0,value:void 0},hz;hz=function(e,t){if(kOt(e),t===null||EOt(t))return e;throw new TypeError("Prototype must be null or an object")};N7e.exports=function(e){var t,r;return e?(e.level===2?e.set?(r=e.set,t=function(n,i){return r.call(hz(n,i),i),n}):t=function(n,i){return hz(n,i).__proto__=i,n}:t=function n(i,a){var o;return hz(i,a),o=COt.call(n.nullPolyfill,i),o&&delete n.nullPolyfill.__proto__,a===null&&(a=n.nullPolyfill),i.__proto__=a,o&&LOt(n.nullPolyfill,"__proto__",POt),i},Object.defineProperty(t,"level",{configurable:!1,enumerable:!1,writable:!1,value:e.level})):null}(function(){var e=Object.create(null),t={},r,n=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(n){try{r=n.set,r.call(e,t)}catch(i){}if(Object.getPrototypeOf(e)===t)return{set:r,level:2}}return e.__proto__=t,Object.getPrototypeOf(e)===t?{level:2}:(e={},e.__proto__=t,Object.getPrototypeOf(e)===t?{level:1}:!1)}());B7e()});var dz=ye((Kyr,U7e)=>{"use strict";U7e.exports=AY()()?Object.setPrototypeOf:EY()});var G7e=ye((Jyr,V7e)=>{"use strict";var IOt=SY();V7e.exports=function(e){if(!IOt(e))throw new TypeError(e+" is not an Object");return e}});var j7e=ye(($yr,H7e)=>{"use strict";var ROt=Object.create(null),DOt=Math.random;H7e.exports=function(){var e;do e=DOt().toString(36).slice(2);while(ROt[e]);return e}});var cw=ye((Qyr,W7e)=>{"use strict";var FOt=void 0;W7e.exports=function(e){return e!==FOt&&e!==null}});var vz=ye((e1r,X7e)=>{"use strict";var zOt=cw(),qOt={object:!0,function:!0,undefined:!0};X7e.exports=function(e){return zOt(e)?hasOwnProperty.call(qOt,typeof e):!1}});var Y7e=ye((t1r,Z7e)=>{"use strict";var OOt=vz();Z7e.exports=function(e){if(!OOt(e))return!1;try{return e.constructor?e.constructor.prototype===e:!1}catch(t){return!1}}});var J7e=ye((r1r,K7e)=>{"use strict";var BOt=Y7e();K7e.exports=function(e){if(typeof e!="function"||!hasOwnProperty.call(e,"length"))return!1;try{if(typeof e.length!="number"||typeof e.call!="function"||typeof e.apply!="function")return!1}catch(t){return!1}return!BOt(e)}});var kY=ye((i1r,$7e)=>{"use strict";var NOt=J7e(),UOt=/^\s*class[\s{/}]/,VOt=Function.prototype.toString;$7e.exports=function(e){return!(!NOt(e)||UOt.test(VOt.call(e)))}});var e9e=ye((n1r,Q7e)=>{"use strict";Q7e.exports=function(){var e=Object.assign,t;return typeof e!="function"?!1:(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}});var r9e=ye((a1r,t9e)=>{"use strict";t9e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}});var n9e=ye((o1r,i9e)=>{"use strict";var GOt=mx(),HOt=Object.keys;i9e.exports=function(e){return HOt(GOt(e)?Object(e):e)}});var o9e=ye((s1r,a9e)=>{"use strict";a9e.exports=r9e()()?Object.keys:n9e()});var l9e=ye((l1r,s9e)=>{"use strict";var jOt=o9e(),WOt=c1(),XOt=Math.max;s9e.exports=function(e,t){var r,n,i=XOt(arguments.length,2),a;for(e=Object(WOt(e)),a=function(o){try{e[o]=t[o]}catch(s){r||(r=s)}},n=1;n{"use strict";u9e.exports=e9e()()?Object.assign:l9e()});var CY=ye((c1r,c9e)=>{"use strict";var ZOt=mx(),YOt=Array.prototype.forEach,KOt=Object.create,JOt=function(e,t){var r;for(r in e)t[r]=e[r]};c9e.exports=function(e){var t=KOt(null);return YOt.call(arguments,function(r){ZOt(r)&&JOt(Object(r),t)}),t}});var h9e=ye((f1r,f9e)=>{"use strict";var LY="razdwatrzy";f9e.exports=function(){return typeof LY.contains!="function"?!1:LY.contains("dwa")===!0&&LY.contains("foo")===!1}});var v9e=ye((h1r,d9e)=>{"use strict";var $Ot=String.prototype.indexOf;d9e.exports=function(e){return $Ot.call(this,e,arguments[1])>-1}});var PY=ye((d1r,p9e)=>{"use strict";p9e.exports=h9e()()?String.prototype.contains:v9e()});var f1=ye((v1r,_9e)=>{"use strict";var gz=cw(),g9e=kY(),m9e=pz(),y9e=CY(),Sk=PY(),QOt=_9e.exports=function(e,t){var r,n,i,a,o;return arguments.length<2||typeof e!="string"?(a=t,t=e,e=null):a=arguments[2],gz(e)?(r=Sk.call(e,"c"),n=Sk.call(e,"e"),i=Sk.call(e,"w")):(r=i=!0,n=!1),o={value:t,configurable:r,enumerable:n,writable:i},a?m9e(y9e(a),o):o};QOt.gs=function(e,t,r){var n,i,a,o;return typeof e!="string"?(a=r,r=t,t=e,e=null):a=arguments[3],gz(t)?g9e(t)?gz(r)?g9e(r)||(a=r,r=void 0):r=void 0:(a=t,t=r=void 0):t=void 0,gz(e)?(n=Sk.call(e,"c"),i=Sk.call(e,"e")):(n=!0,i=!1),o={get:t,set:r,configurable:n,enumerable:i},a?m9e(y9e(a),o):o}});var Mk=ye((p1r,b9e)=>{"use strict";var x9e=Object.prototype.toString,eBt=x9e.call(function(){return arguments}());b9e.exports=function(e){return x9e.call(e)===eBt}});var Ek=ye((g1r,T9e)=>{"use strict";var w9e=Object.prototype.toString,tBt=w9e.call("");T9e.exports=function(e){return typeof e=="string"||e&&typeof e=="object"&&(e instanceof String||w9e.call(e)===tBt)||!1}});var S9e=ye((m1r,A9e)=>{"use strict";A9e.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}});var k9e=ye((y1r,E9e)=>{var M9e=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};E9e.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return M9e()}try{return __global__||M9e()}finally{delete Object.prototype.__global__}}()});var kk=ye((_1r,C9e)=>{"use strict";C9e.exports=S9e()()?globalThis:k9e()});var P9e=ye((x1r,L9e)=>{"use strict";var rBt=kk(),IY={object:!0,symbol:!0};L9e.exports=function(){var e=rBt.Symbol,t;if(typeof e!="function")return!1;t=e("test symbol");try{String(t)}catch(r){return!1}return!(!IY[typeof e.iterator]||!IY[typeof e.toPrimitive]||!IY[typeof e.toStringTag])}});var R9e=ye((b1r,I9e)=>{"use strict";I9e.exports=function(e){return e?typeof e=="symbol"?!0:!e.constructor||e.constructor.name!=="Symbol"?!1:e[e.constructor.toStringTag]==="Symbol":!1}});var RY=ye((w1r,D9e)=>{"use strict";var iBt=R9e();D9e.exports=function(e){if(!iBt(e))throw new TypeError(e+" is not a symbol");return e}});var B9e=ye((T1r,O9e)=>{"use strict";var F9e=f1(),nBt=Object.create,z9e=Object.defineProperty,aBt=Object.prototype,q9e=nBt(null);O9e.exports=function(e){for(var t=0,r,n;q9e[e+(t||"")];)++t;return e+=t||"",q9e[e]=!0,r="@@"+e,z9e(aBt,r,F9e.gs(null,function(i){n||(n=!0,z9e(this,r,F9e(i)),n=!1)})),r}});var U9e=ye((A1r,N9e)=>{"use strict";var rm=f1(),Uh=kk().Symbol;N9e.exports=function(e){return Object.defineProperties(e,{hasInstance:rm("",Uh&&Uh.hasInstance||e("hasInstance")),isConcatSpreadable:rm("",Uh&&Uh.isConcatSpreadable||e("isConcatSpreadable")),iterator:rm("",Uh&&Uh.iterator||e("iterator")),match:rm("",Uh&&Uh.match||e("match")),replace:rm("",Uh&&Uh.replace||e("replace")),search:rm("",Uh&&Uh.search||e("search")),species:rm("",Uh&&Uh.species||e("species")),split:rm("",Uh&&Uh.split||e("split")),toPrimitive:rm("",Uh&&Uh.toPrimitive||e("toPrimitive")),toStringTag:rm("",Uh&&Uh.toStringTag||e("toStringTag")),unscopables:rm("",Uh&&Uh.unscopables||e("unscopables"))})}});var H9e=ye((S1r,G9e)=>{"use strict";var V9e=f1(),oBt=RY(),Ck=Object.create(null);G9e.exports=function(e){return Object.defineProperties(e,{for:V9e(function(t){return Ck[t]?Ck[t]:Ck[t]=e(String(t))}),keyFor:V9e(function(t){var r;oBt(t);for(r in Ck)if(Ck[r]===t)return r})})}});var X9e=ye((M1r,W9e)=>{"use strict";var ty=f1(),DY=RY(),mz=kk().Symbol,sBt=B9e(),lBt=U9e(),uBt=H9e(),cBt=Object.create,FY=Object.defineProperties,yz=Object.defineProperty,Xv,p5,j9e;if(typeof mz=="function")try{String(mz()),j9e=!0}catch(e){}else mz=null;p5=function(t){if(this instanceof p5)throw new TypeError("Symbol is not a constructor");return Xv(t)};W9e.exports=Xv=function e(t){var r;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return j9e?mz(t):(r=cBt(p5.prototype),t=t===void 0?"":String(t),FY(r,{__description__:ty("",t),__name__:ty("",sBt(t))}))};lBt(Xv);uBt(Xv);FY(p5.prototype,{constructor:ty(Xv),toString:ty("",function(){return this.__name__})});FY(Xv.prototype,{toString:ty(function(){return"Symbol ("+DY(this).__description__+")"}),valueOf:ty(function(){return DY(this)})});yz(Xv.prototype,Xv.toPrimitive,ty("",function(){var e=DY(this);return typeof e=="symbol"?e:e.toString()}));yz(Xv.prototype,Xv.toStringTag,ty("c","Symbol"));yz(p5.prototype,Xv.toStringTag,ty("c",Xv.prototype[Xv.toStringTag]));yz(p5.prototype,Xv.toPrimitive,ty("c",Xv.prototype[Xv.toPrimitive]))});var yx=ye((E1r,Z9e)=>{"use strict";Z9e.exports=P9e()()?kk().Symbol:X9e()});var K9e=ye((k1r,Y9e)=>{"use strict";var fBt=c1();Y9e.exports=function(){return fBt(this).length=0,this}});var g5=ye((C1r,J9e)=>{"use strict";J9e.exports=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e}});var Q9e=ye((L1r,$9e)=>{"use strict";var hBt=cw(),dBt=vz(),vBt=Object.prototype.toString;$9e.exports=function(e){if(!hBt(e))return null;if(dBt(e)){var t=e.toString;if(typeof t!="function"||t===vBt)return null}try{return""+e}catch(r){return null}}});var tqe=ye((P1r,eqe)=>{"use strict";eqe.exports=function(e){try{return e.toString()}catch(t){try{return String(e)}catch(r){return null}}}});var iqe=ye((I1r,rqe)=>{"use strict";var pBt=tqe(),gBt=/[\n\r\u2028\u2029]/g;rqe.exports=function(e){var t=pBt(e);return t===null?"":(t.length>100&&(t=t.slice(0,99)+"\u2026"),t=t.replace(gBt,function(r){switch(r){case` +`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),t)}});var zY=ye((R1r,oqe)=>{"use strict";var nqe=cw(),mBt=vz(),yBt=Q9e(),_Bt=iqe(),aqe=function(e,t){return e.replace("%v",_Bt(t))};oqe.exports=function(e,t,r){if(!mBt(r))throw new TypeError(aqe(t,e));if(!nqe(e)){if("default"in r)return r.default;if(r.isOptional)return null}var n=yBt(r.errorMessage);throw nqe(n)||(n=t),new TypeError(aqe(n,e))}});var lqe=ye((D1r,sqe)=>{"use strict";var xBt=zY(),bBt=cw();sqe.exports=function(e){return bBt(e)?e:xBt(e,"Cannot use %v",arguments[1])}});var cqe=ye((F1r,uqe)=>{"use strict";var wBt=zY(),TBt=kY();uqe.exports=function(e){return TBt(e)?e:wBt(e,"%v is not a plain function",arguments[1])}});var hqe=ye((z1r,fqe)=>{"use strict";fqe.exports=function(){var e=Array.from,t,r;return typeof e!="function"?!1:(t=["raz","dwa"],r=e(t),!!(r&&r!==t&&r[1]==="dwa"))}});var vqe=ye((q1r,dqe)=>{"use strict";var ABt=Object.prototype.toString,SBt=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);dqe.exports=function(e){return typeof e=="function"&&SBt(ABt.call(e))}});var gqe=ye((O1r,pqe)=>{"use strict";pqe.exports=function(){var e=Math.sign;return typeof e!="function"?!1:e(10)===1&&e(-20)===-1}});var yqe=ye((B1r,mqe)=>{"use strict";mqe.exports=function(e){return e=Number(e),isNaN(e)||e===0?e:e>0?1:-1}});var xqe=ye((N1r,_qe)=>{"use strict";_qe.exports=gqe()()?Math.sign:yqe()});var wqe=ye((U1r,bqe)=>{"use strict";var MBt=xqe(),EBt=Math.abs,kBt=Math.floor;bqe.exports=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:MBt(e)*kBt(EBt(e)))}});var Aqe=ye((V1r,Tqe)=>{"use strict";var CBt=wqe(),LBt=Math.max;Tqe.exports=function(e){return LBt(0,CBt(e))}});var kqe=ye((G1r,Eqe)=>{"use strict";var PBt=yx().iterator,IBt=Mk(),RBt=vqe(),DBt=Aqe(),Sqe=g5(),FBt=c1(),zBt=mx(),qBt=Ek(),Mqe=Array.isArray,qY=Function.prototype.call,fw={configurable:!0,enumerable:!0,writable:!0,value:null},OY=Object.defineProperty;Eqe.exports=function(e){var t=arguments[1],r=arguments[2],n,i,a,o,s,l,u,c,f,h;if(e=Object(FBt(e)),zBt(t)&&Sqe(t),!this||this===Array||!RBt(this)){if(!t){if(IBt(e))return s=e.length,s!==1?Array.apply(null,e):(o=new Array(1),o[0]=e[0],o);if(Mqe(e)){for(o=new Array(s=e.length),i=0;i=55296&&l<=56319&&(h+=e[++i])),h=t?qY.call(t,r,h,a):h,n?(fw.value=h,OY(o,a,fw)):o[a]=h,++a;s=a}}if(s===void 0)for(s=DBt(e.length),n&&(o=new n(s)),i=0;i{"use strict";Cqe.exports=hqe()()?Array.from:kqe()});var Iqe=ye((j1r,Pqe)=>{"use strict";var OBt=Lqe(),BBt=pz(),NBt=c1();Pqe.exports=function(e){var t=Object(NBt(e)),r=arguments[1],n=Object(arguments[2]);if(t!==e&&!r)return t;var i={};return r?OBt(r,function(a){(n.ensure||a in e)&&(i[a]=e[a])}):BBt(i,e),i}});var Fqe=ye((W1r,Dqe)=>{"use strict";var UBt=g5(),VBt=c1(),GBt=Function.prototype.bind,Rqe=Function.prototype.call,HBt=Object.keys,jBt=Object.prototype.propertyIsEnumerable;Dqe.exports=function(e,t){return function(r,n){var i,a=arguments[2],o=arguments[3];return r=Object(VBt(r)),UBt(n),i=HBt(r),o&&i.sort(typeof o=="function"?GBt.call(o,r):void 0),typeof e!="function"&&(e=i[e]),Rqe.call(e,i,function(s,l){return jBt.call(r,s)?Rqe.call(n,a,r[s],s,r,l):t})}}});var qqe=ye((X1r,zqe)=>{"use strict";zqe.exports=Fqe()("forEach")});var Bqe=ye((Z1r,Oqe)=>{"use strict";var WBt=g5(),XBt=qqe(),ZBt=Function.prototype.call;Oqe.exports=function(e,t){var r={},n=arguments[2];return WBt(t),XBt(e,function(i,a,o,s){r[a]=ZBt.call(t,n,i,a,o,s)}),r}});var Gqe=ye((Y1r,Vqe)=>{"use strict";var YBt=cw(),KBt=lqe(),Nqe=cqe(),JBt=Iqe(),$Bt=CY(),QBt=Bqe(),eNt=Function.prototype.bind,tNt=Object.defineProperty,rNt=Object.prototype.hasOwnProperty,Uqe;Uqe=function(e,t,r){var n=KBt(t)&&Nqe(t.value),i;return i=JBt(t),delete i.writable,delete i.value,i.get=function(){return!r.overwriteDefinition&&rNt.call(this,e)?n:(t.value=eNt.call(n,r.resolveContext?r.resolveContext(this):this),tNt(this,e,t),this[e])},i};Vqe.exports=function(e){var t=$Bt(arguments[1]);return YBt(t.resolveContext)&&Nqe(t.resolveContext),QBt(e,function(r,n){return Uqe(n,r,t)})}});var BY=ye((K1r,Xqe)=>{"use strict";var iNt=K9e(),nNt=pz(),aNt=g5(),oNt=c1(),Op=f1(),sNt=Gqe(),Hqe=yx(),jqe=Object.defineProperty,Wqe=Object.defineProperties,Lk;Xqe.exports=Lk=function(e,t){if(!(this instanceof Lk))throw new TypeError("Constructor requires 'new'");Wqe(this,{__list__:Op("w",oNt(e)),__context__:Op("w",t),__nextIndex__:Op("w",0)}),t&&(aNt(t.on),t.on("_add",this._onAdd),t.on("_delete",this._onDelete),t.on("_clear",this._onClear))};delete Lk.prototype.constructor;Wqe(Lk.prototype,nNt({_next:Op(function(){var e;if(this.__list__){if(this.__redo__&&(e=this.__redo__.shift(),e!==void 0))return e;if(this.__nextIndex__=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){jqe(this,"__redo__",Op("c",[e]));return}this.__redo__.forEach(function(t,r){t>=e&&(this.__redo__[r]=++t)},this),this.__redo__.push(e)}}),_onDelete:Op(function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(t=this.__redo__.indexOf(e),t!==-1&&this.__redo__.splice(t,1),this.__redo__.forEach(function(r,n){r>e&&(this.__redo__[n]=--r)},this)))}),_onClear:Op(function(){this.__redo__&&iNt.call(this.__redo__),this.__nextIndex__=0})})));jqe(Lk.prototype,Hqe.iterator,Op(function(){return this}))});var $qe=ye((J1r,Jqe)=>{"use strict";var Zqe=dz(),Yqe=PY(),NY=f1(),lNt=yx(),UY=BY(),Kqe=Object.defineProperty,m5;m5=Jqe.exports=function(e,t){if(!(this instanceof m5))throw new TypeError("Constructor requires 'new'");UY.call(this,e),t?Yqe.call(t,"key+value")?t="key+value":Yqe.call(t,"key")?t="key":t="value":t="value",Kqe(this,"__kind__",NY("",t))};Zqe&&Zqe(m5,UY);delete m5.prototype.constructor;m5.prototype=Object.create(UY.prototype,{_resolve:NY(function(e){return this.__kind__==="value"?this.__list__[e]:this.__kind__==="key+value"?[e,this.__list__[e]]:e})});Kqe(m5.prototype,lNt.toStringTag,NY("c","Array Iterator"))});var rOe=ye(($1r,tOe)=>{"use strict";var Qqe=dz(),_z=f1(),uNt=yx(),VY=BY(),eOe=Object.defineProperty,y5;y5=tOe.exports=function(e){if(!(this instanceof y5))throw new TypeError("Constructor requires 'new'");e=String(e),VY.call(this,e),eOe(this,"__length__",_z("",e.length))};Qqe&&Qqe(y5,VY);delete y5.prototype.constructor;y5.prototype=Object.create(VY.prototype,{_next:_z(function(){if(this.__list__){if(this.__nextIndex__=55296&&r<=56319?t+this.__list__[this.__nextIndex__++]:t)})});eOe(y5.prototype,uNt.toStringTag,_z("c","String Iterator"))});var nOe=ye((Q1r,iOe)=>{"use strict";var cNt=Mk(),fNt=mx(),hNt=Ek(),dNt=yx().iterator,vNt=Array.isArray;iOe.exports=function(e){return fNt(e)?vNt(e)||hNt(e)||cNt(e)?!0:typeof e[dNt]=="function":!1}});var oOe=ye((e_r,aOe)=>{"use strict";var pNt=nOe();aOe.exports=function(e){if(!pNt(e))throw new TypeError(e+" is not iterable");return e}});var GY=ye((t_r,uOe)=>{"use strict";var gNt=Mk(),mNt=Ek(),sOe=$qe(),yNt=rOe(),_Nt=oOe(),lOe=yx().iterator;uOe.exports=function(e){return typeof _Nt(e)[lOe]=="function"?e[lOe]():gNt(e)?new sOe(e):mNt(e)?new yNt(e):new sOe(e)}});var fOe=ye((r_r,cOe)=>{"use strict";var xNt=Mk(),bNt=g5(),wNt=Ek(),TNt=GY(),ANt=Array.isArray,HY=Function.prototype.call,SNt=Array.prototype.some;cOe.exports=function(e,t){var r,n=arguments[2],i,a,o,s,l,u,c;if(ANt(e)||xNt(e)?r="array":wNt(e)?r="string":e=TNt(e),bNt(t),a=function(){o=!0},r==="array"){SNt.call(e,function(f){return HY.call(t,n,f,a),o});return}if(r==="string"){for(l=e.length,s=0;s=55296&&c<=56319&&(u+=e[++s])),HY.call(t,n,u,a),!o);++s);return}for(i=e.next();!i.done;){if(HY.call(t,n,i.value,a),o)return;i=e.next()}}});var dOe=ye((i_r,hOe)=>{"use strict";hOe.exports=function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"}()});var gOe=ye((n_r,pOe)=>{"use strict";var MNt=mx(),bz=dz(),xz=G7e(),ENt=c1(),kNt=j7e(),h1=f1(),CNt=GY(),LNt=fOe(),PNt=yx().toStringTag,vOe=dOe(),INt=Array.isArray,WY=Object.defineProperty,jY=Object.prototype.hasOwnProperty,RNt=Object.getPrototypeOf,_x;pOe.exports=_x=function(){var e=arguments[0],t;if(!(this instanceof _x))throw new TypeError("Constructor requires 'new'");return t=vOe&&bz&&WeakMap!==_x?bz(new WeakMap,RNt(this)):this,MNt(e)&&(INt(e)||(e=CNt(e))),WY(t,"__weakMapData__",h1("c","$weakMap$"+kNt())),e&&LNt(e,function(r){ENt(r),t.set(r[0],r[1])}),t};vOe&&(bz&&bz(_x,WeakMap),_x.prototype=Object.create(WeakMap.prototype,{constructor:h1(_x)}));Object.defineProperties(_x.prototype,{delete:h1(function(e){return jY.call(xz(e),this.__weakMapData__)?(delete e[this.__weakMapData__],!0):!1}),get:h1(function(e){if(jY.call(xz(e),this.__weakMapData__))return e[this.__weakMapData__]}),has:h1(function(e){return jY.call(xz(e),this.__weakMapData__)}),set:h1(function(e,t){return WY(xz(e),this.__weakMapData__,h1("c",t)),this}),toString:h1(function(){return"[object WeakMap]"})});WY(_x.prototype,PNt,h1("c","WeakMap"))});var XY=ye((a_r,mOe)=>{"use strict";mOe.exports=L7e()()?WeakMap:gOe()});var _Oe=ye((o_r,yOe)=>{"use strict";yOe.exports=function(e,t,r){if(typeof Array.prototype.findIndex=="function")return e.findIndex(t,r);if(typeof t!="function")throw new TypeError("predicate must be a function");var n=Object(e),i=n.length;if(i===0)return-1;for(var a=0;a{"use strict";var wz=ox(),DNt=iw(),YY=Nh(),FNt=ey(),zNt=nw(),xOe=M7e(),qNt=k7e(),{float32:ONt,fract32:ZY}=nz(),BNt=XY(),bOe=s5(),NNt=_Oe(),UNt=` precision highp float; attribute vec2 aCoord, bCoord, aCoordFract, bCoordFract; @@ -2247,7 +2247,7 @@ void main() { fragColor = color / 255.; } -`,FNt=` +`,VNt=` precision highp float; uniform float dashLength, pixelRatio, thickness, opacity, id; @@ -2265,7 +2265,7 @@ void main() { gl_FragColor = fragColor; gl_FragColor.a *= alpha * opacity * dash; } -`,zNt=` +`,GNt=` precision highp float; attribute vec2 position, positionFract; @@ -2293,14 +2293,14 @@ void main() { fragColor = color / 255.; fragColor.a *= opacity; } -`,ONt=` +`,HNt=` precision highp float; varying vec4 fragColor; void main() { gl_FragColor = fragColor; } -`,qNt=` +`,jNt=` precision highp float; attribute vec2 aCoord, bCoord, nextCoord, prevCoord; @@ -2504,7 +2504,7 @@ void main() { } } } -`,BNt=` +`,WNt=` precision highp float; uniform float dashLength, pixelRatio, thickness, opacity, id, miterMode; @@ -2584,7 +2584,7 @@ void main() { gl_FragColor = fragColor; gl_FragColor.a *= alpha * opacity * dash; } -`;xqe.exports=Wc;function Wc(e,t){if(!(this instanceof Wc))return new Wc(e,t);if(typeof e=="function"?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),e=t.regl,!e.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=e._gl,this.regl=e,this.passes=[],this.shaders=Wc.shaders.has(e)?Wc.shaders.get(e):Wc.shaders.set(e,Wc.createShaders(e)).get(e),this.update(t)}Wc.dashMult=2;Wc.maxPatternLength=256;Wc.precisionThreshold=3e6;Wc.maxPoints=1e4;Wc.maxLines=2048;Wc.shaders=new INt;Wc.createShaders=function(e){let t=e.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),r={primitive:"triangle strip",instances:e.prop("count"),count:4,offset:0,uniforms:{miterMode:(o,s)=>s.join==="round"?2:1,miterLimit:e.prop("miterLimit"),scale:e.prop("scale"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),thickness:e.prop("thickness"),dashTexture:e.prop("dashTexture"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),dashLength:e.prop("dashLength"),viewport:(o,s)=>[s.viewport.x,s.viewport.y,o.viewportWidth,o.viewportHeight],depth:e.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:(o,s)=>!s.overlay},stencil:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport")},n=e(YY({vert:DNt,frag:FNt,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},r)),i;try{i=e(YY({cull:{enable:!0,face:"back"},vert:qNt,frag:BNt,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aColor:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:e.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},r))}catch(o){i=n}return{fill:e({primitive:"triangle",elements:(o,s)=>s.triangles,offset:0,vert:zNt,frag:ONt,uniforms:{scale:e.prop("scale"),color:e.prop("fill"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),viewport:(o,s)=>[s.viewport.x,s.viewport.y,o.viewportWidth,o.viewportHeight]},attributes:{position:{buffer:e.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8}},blend:r.blend,depth:{enable:!1},scissor:r.scissor,stencil:r.stencil,viewport:r.viewport}),rect:n,miter:i}};Wc.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null};Wc.prototype.render=function(...e){e.length&&this.update(...e),this.draw()};Wc.prototype.draw=function(...e){return(e.length?e:this.passes).forEach((t,r)=>{if(t&&Array.isArray(t))return this.draw(...t);typeof t=="number"&&(t=this.passes[t]),t&&t.count>1&&t.opacity&&(this.regl._refresh(),t.fill&&t.triangles&&t.triangles.length>2&&this.shaders.fill(t),t.thickness&&(t.scale[0]*t.viewport.width>Wc.precisionThreshold||t.scale[1]*t.viewport.height>Wc.precisionThreshold?this.shaders.rect(t):t.join==="rect"||!t.join&&(t.thickness<=2||t.count>=Wc.maxPoints)?this.shaders.rect(t):this.shaders.miter(t)))}),this};Wc.prototype.update=function(e){if(!e)return;e.length!=null?typeof e[0]=="number"&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);let{regl:t,gl:r}=this;if(e.forEach((i,a)=>{let o=this.passes[a];if(i!==void 0){if(i===null){this.passes[a]=null;return}if(typeof i[0]=="number"&&(i={positions:i}),i=kNt(i,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),o||(this.passes[a]=o={id:a,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:t.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:t.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},i=YY({},Wc.defaults,i)),i.thickness!=null&&(o.thickness=parseFloat(i.thickness)),i.opacity!=null&&(o.opacity=parseFloat(i.opacity)),i.miterLimit!=null&&(o.miterLimit=parseFloat(i.miterLimit)),i.overlay!=null&&(o.overlay=!!i.overlay,aL-x),k=[],E=0,T=o.hole!=null?o.hole[0]:null;if(T!=null){let L=RNt(p,x=>x>=T);p=p.slice(0,L),p.push(T)}for(let L=0;Lg-T+(p[L]-E)),M=yqe(x,C);M=M.map(g=>g+E+(g+E{e.colorBuffer.destroy(),e.positionBuffer.destroy(),e.dashTexture.destroy()}),this.passes.length=0,this}});var Sqe=ye((e_r,Aqe)=>{"use strict";var NNt=rw(),UNt=ox(),VNt=mY(),GNt=ey(),bqe=Nh(),wqe=iw(),{float32:HNt,fract32:JY}=nz();Aqe.exports=jNt;var Tqe=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]];function jNt(e,t){if(typeof e=="function"?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),e=t.regl,!e.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let r=e._gl,n,i,a,o,s,l,u={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},c=[];return o=e.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),i=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),a=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),s=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),l=e.buffer({usage:"static",type:"float",data:Tqe}),v(t),n=e({vert:` +`;wOe.exports=Wc;function Wc(e,t){if(!(this instanceof Wc))return new Wc(e,t);if(typeof e=="function"?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),e=t.regl,!e.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=e._gl,this.regl=e,this.passes=[],this.shaders=Wc.shaders.has(e)?Wc.shaders.get(e):Wc.shaders.set(e,Wc.createShaders(e)).get(e),this.update(t)}Wc.dashMult=2;Wc.maxPatternLength=256;Wc.precisionThreshold=3e6;Wc.maxPoints=1e4;Wc.maxLines=2048;Wc.shaders=new BNt;Wc.createShaders=function(e){let t=e.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),r={primitive:"triangle strip",instances:e.prop("count"),count:4,offset:0,uniforms:{miterMode:(o,s)=>s.join==="round"?2:1,miterLimit:e.prop("miterLimit"),scale:e.prop("scale"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),thickness:e.prop("thickness"),dashTexture:e.prop("dashTexture"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),dashLength:e.prop("dashLength"),viewport:(o,s)=>[s.viewport.x,s.viewport.y,o.viewportWidth,o.viewportHeight],depth:e.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:(o,s)=>!s.overlay},stencil:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport")},n=e(YY({vert:UNt,frag:VNt,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},r)),i;try{i=e(YY({cull:{enable:!0,face:"back"},vert:jNt,frag:WNt,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aColor:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:e.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},r))}catch(o){i=n}return{fill:e({primitive:"triangle",elements:(o,s)=>s.triangles,offset:0,vert:GNt,frag:HNt,uniforms:{scale:e.prop("scale"),color:e.prop("fill"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),viewport:(o,s)=>[s.viewport.x,s.viewport.y,o.viewportWidth,o.viewportHeight]},attributes:{position:{buffer:e.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8}},blend:r.blend,depth:{enable:!1},scissor:r.scissor,stencil:r.stencil,viewport:r.viewport}),rect:n,miter:i}};Wc.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null};Wc.prototype.render=function(...e){e.length&&this.update(...e),this.draw()};Wc.prototype.draw=function(...e){return(e.length?e:this.passes).forEach((t,r)=>{if(t&&Array.isArray(t))return this.draw(...t);typeof t=="number"&&(t=this.passes[t]),t&&t.count>1&&t.opacity&&(this.regl._refresh(),t.fill&&t.triangles&&t.triangles.length>2&&this.shaders.fill(t),t.thickness&&(t.scale[0]*t.viewport.width>Wc.precisionThreshold||t.scale[1]*t.viewport.height>Wc.precisionThreshold?this.shaders.rect(t):t.join==="rect"||!t.join&&(t.thickness<=2||t.count>=Wc.maxPoints)?this.shaders.rect(t):this.shaders.miter(t)))}),this};Wc.prototype.update=function(e){if(!e)return;e.length!=null?typeof e[0]=="number"&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);let{regl:t,gl:r}=this;if(e.forEach((i,a)=>{let o=this.passes[a];if(i!==void 0){if(i===null){this.passes[a]=null;return}if(typeof i[0]=="number"&&(i={positions:i}),i=FNt(i,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),o||(this.passes[a]=o={id:a,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:t.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:t.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},i=YY({},Wc.defaults,i)),i.thickness!=null&&(o.thickness=parseFloat(i.thickness)),i.opacity!=null&&(o.opacity=parseFloat(i.opacity)),i.miterLimit!=null&&(o.miterLimit=parseFloat(i.miterLimit)),i.overlay!=null&&(o.overlay=!!i.overlay,aL-x),k=[],M=0,T=o.hole!=null?o.hole[0]:null;if(T!=null){let L=NNt(p,x=>x>=T);p=p.slice(0,L),p.push(T)}for(let L=0;Lg-T+(p[L]-M)),S=xOe(x,C);S=S.map(g=>g+M+(g+M{e.colorBuffer.destroy(),e.positionBuffer.destroy(),e.dashTexture.destroy()}),this.passes.length=0,this}});var EOe=ye((l_r,MOe)=>{"use strict";var XNt=iw(),ZNt=ox(),YNt=mY(),KNt=ey(),TOe=Nh(),AOe=nw(),{float32:JNt,fract32:JY}=nz();MOe.exports=$Nt;var SOe=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]];function $Nt(e,t){if(typeof e=="function"?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),e=t.regl,!e.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let r=e._gl,n,i,a,o,s,l,u={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},c=[];return o=e.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),i=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),a=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),s=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),l=e.buffer({usage:"static",type:"float",data:SOe}),v(t),n=e({vert:` precision highp float; attribute vec2 position, positionFract; @@ -2628,10 +2628,10 @@ void main() { gl_FragColor = fragColor; gl_FragColor.a *= opacity; } - `,uniforms:{range:e.prop("range"),lineWidth:e.prop("lineWidth"),capSize:e.prop("capSize"),opacity:e.prop("opacity"),scale:e.prop("scale"),translate:e.prop("translate"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),viewport:(b,p)=>[p.viewport.x,p.viewport.y,b.viewportWidth,b.viewportHeight]},attributes:{color:{buffer:o,offset:(b,p)=>p.offset*4,divisor:1},position:{buffer:i,offset:(b,p)=>p.offset*8,divisor:1},positionFract:{buffer:a,offset:(b,p)=>p.offset*8,divisor:1},error:{buffer:s,offset:(b,p)=>p.offset*16,divisor:1},direction:{buffer:l,stride:24,offset:0},lineOffset:{buffer:l,stride:24,offset:8},capOffset:{buffer:l,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport"),stencil:!1,instances:e.prop("count"),count:Tqe.length}),bqe(f,{update:v,draw:h,destroy:_,regl:e,gl:r,canvas:r.canvas,groups:c}),f;function f(b){b?v(b):b===null&&_(),h()}function h(b){if(typeof b=="number")return d(b);b&&!Array.isArray(b)&&(b=[b]),e._refresh(),c.forEach((p,k)=>{if(p){if(b&&(b[k]?p.draw=!0:p.draw=!1),!p.draw){p.draw=!0;return}d(k)}})}function d(b){typeof b=="number"&&(b=c[b]),b!=null&&b&&b.count&&b.color&&b.opacity&&b.positions&&b.positions.length>1&&(b.scaleRatio=[b.scale[0]*b.viewport.width,b.scale[1]*b.viewport.height],n(b),b.after&&b.after(b))}function v(b){if(!b)return;b.length!=null?typeof b[0]=="number"&&(b=[{positions:b}]):Array.isArray(b)||(b=[b]);let p=0,k=0;if(f.groups=c=b.map((L,x)=>{let C=c[x];if(L)typeof L=="function"?L={after:L}:typeof L[0]=="number"&&(L={positions:L});else return C;return L=GNt(L,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),C||(c[x]=C={id:x,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},L=bqe({},u,L)),VNt(C,L,[{lineWidth:M=>+M*.5,capSize:M=>+M*.5,opacity:parseFloat,errors:M=>(M=wqe(M),k+=M.length,M),positions:(M,g)=>(M=wqe(M,"float64"),g.count=Math.floor(M.length/2),g.bounds=NNt(M,2),g.offset=p,p+=g.count,M)},{color:(M,g)=>{let P=g.count;if(M||(M="transparent"),!Array.isArray(M)||typeof M[0]=="number"){let z=M;M=Array(P);for(let O=0;O{let A=g.bounds;return M||(M=A),g.scale=[1/(M[2]-M[0]),1/(M[3]-M[1])],g.translate=[-M[0],-M[1]],g.scaleFract=JY(g.scale),g.translateFract=JY(g.translate),M},viewport:M=>{let g;return Array.isArray(M)?g={x:M[0],y:M[1],width:M[2]-M[0],height:M[3]-M[1]}:M?(g={x:M.x||M.left||0,y:M.y||M.top||0},M.right?g.width=M.right-g.x:g.width=M.w||M.width||0,M.bottom?g.height=M.bottom-g.y:g.height=M.h||M.height||0):g={x:0,y:0,width:r.drawingBufferWidth,height:r.drawingBufferHeight},g}}]),C}),p||k){let L=c.reduce((g,P,A)=>g+(P?P.count:0),0),x=new Float64Array(L*2),C=new Uint8Array(L*4),M=new Float32Array(L*4);c.forEach((g,P)=>{if(!g)return;let{positions:A,count:z,offset:O,color:U,errors:G}=g;z&&(C.set(U,O*4),M.set(G,O*4),x.set(A,O*2))});var E=HNt(x);i(E);var T=JY(x,E);a(T),o(C),s(M)}}function _(){i.destroy(),a.destroy(),o.destroy(),s.destroy(),l.destroy()}}});var kqe=ye((t_r,Eqe)=>{var Mqe=/[\'\"]/;Eqe.exports=function(t){return t?(Mqe.test(t.charAt(0))&&(t=t.substr(1)),Mqe.test(t.charAt(t.length-1))&&(t=t.substr(0,t.length-1)),t):""}});var $Y=ye((r_r,WNt)=>{WNt.exports=["inherit","initial","unset"]});var QY=ye((i_r,XNt)=>{XNt.exports=["caption","icon","menu","message-box","small-caption","status-bar"]});var eK=ye((n_r,ZNt)=>{ZNt.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]});var tK=ye((a_r,YNt)=>{YNt.exports=["normal","italic","oblique"]});var rK=ye((o_r,KNt)=>{KNt.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]});var Iqe=ye((s_r,Pqe)=>{"use strict";function Cqe(e,t){if(typeof e!="string")return[e];var r=[e];typeof t=="string"||Array.isArray(t)?t={brackets:t}:t||(t={});var n=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],i=t.escape||"___",a=!!t.flat;n.forEach(function(l){var u=new RegExp(["\\",l[0],"[^\\",l[0],"\\",l[1],"]*\\",l[1]].join("")),c=[];function f(h,d,v){var _=r.push(h.slice(l[0].length,-l[1].length))-1;return c.push(_),i+_+i}r.forEach(function(h,d){for(var v,_=0;h!=v;)if(v=h,h=h.replace(u,f),_++>1e4)throw Error("References have circular dependency. Please, check them.");r[d]=h}),c=c.reverse(),r=r.map(function(h){return c.forEach(function(d){h=h.replace(new RegExp("(\\"+i+d+"\\"+i+")","g"),l[0]+"$1"+l[1])}),h})});var o=new RegExp("\\"+i+"([0-9]+)\\"+i);function s(l,u,c){for(var f=[],h,d=0;h=o.exec(l);){if(d++>1e4)throw Error("Circular references in parenthesis");f.push(l.slice(0,h.index)),f.push(s(u[h[1]],u)),l=l.slice(h.index+h[0].length)}return f.push(l),f}return a?r:s(r[0],r)}function Lqe(e,t){if(t&&t.flat){var r=t&&t.escape||"___",n=e[0],i;if(!n)return"";for(var a=new RegExp("\\"+r+"([0-9]+)\\"+r),o=0;n!=i;){if(o++>1e4)throw Error("Circular references in "+e);i=n,n=n.replace(a,s)}return n}return e.reduce(function l(u,c){return Array.isArray(c)&&(c=c.reduce(l,"")),u+c},"");function s(l,u){if(e[u]==null)throw Error("Reference "+u+"is undefined");return e[u]}}function iK(e,t){return Array.isArray(e)?Lqe(e,t):Cqe(e,t)}iK.parse=Cqe;iK.stringify=Lqe;Pqe.exports=iK});var Fqe=ye((l_r,Dqe)=>{"use strict";var Rqe=Iqe();Dqe.exports=function(t,r,n){if(t==null)throw Error("First argument should be a string");if(r==null)throw Error("Separator should be a string or a RegExp");n?(typeof n=="string"||Array.isArray(n))&&(n={ignore:n}):n={},n.escape==null&&(n.escape=!0),n.ignore==null?n.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof n.ignore=="string"&&(n.ignore=[n.ignore]),n.ignore=n.ignore.map(function(f){return f.length===1&&(f=f+f),f}));var i=Rqe.parse(t,{flat:!0,brackets:n.ignore}),a=i[0],o=a.split(r);if(n.escape){for(var s=[],l=0;l{JNt.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]});var nK=ye((c_r,Oqe)=>{"use strict";var $Nt=zqe();Oqe.exports={isSize:function(t){return/^[\d\.]/.test(t)||t.indexOf("/")!==-1||$Nt.indexOf(t)!==-1}}});var Uqe=ye((f_r,Nqe)=>{"use strict";var QNt=kqe(),eUt=$Y(),tUt=QY(),rUt=eK(),iUt=tK(),nUt=rK(),aK=Fqe(),aUt=nK().isSize;Nqe.exports=Bqe;var Pk=Bqe.cache={};function Bqe(e){if(typeof e!="string")throw new Error("Font argument must be a string.");if(Pk[e])return Pk[e];if(e==="")throw new Error("Cannot parse an empty string.");if(tUt.indexOf(e)!==-1)return Pk[e]={system:e};for(var t={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},r=aK(e,/\s+/),n;n=r.shift();){if(eUt.indexOf(n)!==-1)return["style","variant","weight","stretch"].forEach(function(a){t[a]=n}),Pk[e]=t;if(iUt.indexOf(n)!==-1){t.style=n;continue}if(n==="normal"||n==="small-caps"){t.variant=n;continue}if(nUt.indexOf(n)!==-1){t.stretch=n;continue}if(rUt.indexOf(n)!==-1){t.weight=n;continue}if(aUt(n)){var i=aK(n,"/");if(t.size=i[0],i[1]!=null?t.lineHeight=qqe(i[1]):r[0]==="/"&&(r.shift(),t.lineHeight=qqe(r.shift())),!r.length)throw new Error("Missing required font-family.");return t.family=aK(r.join(" "),/\s*,\s*/).map(QNt),Pk[e]=t}throw new Error("Unknown or unsupported font token: "+n)}throw new Error("Missing required font-size.")}function qqe(e){var t=parseFloat(e);return t.toString()===e?t:e}});var sK=ye((h_r,Vqe)=>{"use strict";var oUt=ey(),sUt=nK().isSize,lUt=Rk($Y()),uUt=Rk(QY()),cUt=Rk(eK()),fUt=Rk(tK()),hUt=Rk(rK()),dUt={normal:1,"small-caps":1},vUt={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},oK={style:"normal",variant:"normal",weight:"normal",stretch:"normal",size:"1rem",lineHeight:"normal",family:"serif"};Vqe.exports=function(t){if(t=oUt(t,{style:"style fontstyle fontStyle font-style slope distinction",variant:"variant font-variant fontVariant fontvariant var capitalization",weight:"weight w font-weight fontWeight fontweight",stretch:"stretch font-stretch fontStretch fontstretch width",size:"size s font-size fontSize fontsize height em emSize",lineHeight:"lh line-height lineHeight lineheight leading",family:"font family fontFamily font-family fontfamily type typeface face",system:"system reserved default global"}),t.system)return t.system&&Ik(t.system,uUt),t.system;if(Ik(t.style,fUt),Ik(t.variant,dUt),Ik(t.weight,cUt),Ik(t.stretch,hUt),t.size==null&&(t.size=oK.size),typeof t.size=="number"&&(t.size+="px"),!sUt)throw Error("Bad size value `"+t.size+"`");t.family||(t.family=oK.family),Array.isArray(t.family)&&(t.family.length||(t.family=[oK.family]),t.family=t.family.map(function(n){return vUt[n]?n:'"'+n+'"'}).join(", "));var r=[];return r.push(t.style),t.variant!==t.style&&r.push(t.variant),t.weight!==t.variant&&t.weight!==t.style&&r.push(t.weight),t.stretch!==t.weight&&t.stretch!==t.variant&&t.stretch!==t.style&&r.push(t.stretch),r.push(t.size+(t.lineHeight==null||t.lineHeight==="normal"||t.lineHeight+""=="1"?"":"/"+t.lineHeight)),r.push(t.family),r.filter(Boolean).join(" ")};function Ik(e,t){if(e&&!t[e]&&!lUt[e])throw Error("Unknown keyword `"+e+"`");return e}function Rk(e){for(var t={},r=0;r{"use strict";Gqe.exports={parse:Uqe(),stringify:sK()}});var jqe=ye((lK,uK)=>{(function(e,t){typeof lK=="object"&&typeof uK!="undefined"?uK.exports=t():e.createREGL=t()})(lK,function(){"use strict";var e=function(Me,bt){for(var zt=Object.keys(bt),Rr=0;Rr1&&bt===zt&&(bt==='"'||bt==="'"))return['"'+o(Me.substr(1,Me.length-2))+'"'];var Rr=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(Me);if(Rr)return s(Me.substr(0,Rr.index)).concat(s(Rr[1])).concat(s(Me.substr(Rr.index+Rr[0].length)));var jr=Me.split(".");if(jr.length===1)return['"'+o(Me)+'"'];for(var Nr=[],Gr=0;Gr65535)<<4,Me>>>=bt,zt=(Me>255)<<3,Me>>>=zt,bt|=zt,zt=(Me>15)<<2,Me>>>=zt,bt|=zt,zt=(Me>3)<<1,Me>>>=zt,bt|=zt,bt|Me>>1}function N(){var Me=M(8,function(){return[]});function bt(Nr){var Gr=Z(Nr),mi=Me[j(Gr)>>2];return mi.length>0?mi.pop():new ArrayBuffer(Gr)}function zt(Nr){Me[j(Nr.byteLength)>>2].push(Nr)}function Rr(Nr,Gr){var mi=null;switch(Nr){case g:mi=new Int8Array(bt(Gr),0,Gr);break;case P:mi=new Uint8Array(bt(Gr),0,Gr);break;case A:mi=new Int16Array(bt(2*Gr),0,Gr);break;case z:mi=new Uint16Array(bt(2*Gr),0,Gr);break;case O:mi=new Int32Array(bt(4*Gr),0,Gr);break;case U:mi=new Uint32Array(bt(4*Gr),0,Gr);break;case G:mi=new Float32Array(bt(4*Gr),0,Gr);break;default:return null}return mi.length!==Gr?mi.subarray(0,Gr):mi}function jr(Nr){zt(Nr.buffer)}return{alloc:bt,free:zt,allocType:Rr,freeType:jr}}var H=N();H.zero=N();var re=3408,oe=3410,_e=3411,Ce=3412,Le=3413,ge=3414,ie=3415,Se=33901,Ee=33902,Ae=3379,Be=3386,Pe=34921,me=36347,De=36348,ce=35661,je=35660,lt=34930,pt=36349,Vt=34076,ot=34024,ut=7936,Wt=7937,Nt=7938,$t=35724,sr=34047,Tr=36063,fr=34852,$e=3553,St=34067,Qt=34069,Gt=33984,_t=6408,It=5126,mt=5121,er=36160,lr=36053,wr=36064,Lr=16384,ti=function(Me,bt){var zt=1;bt.ext_texture_filter_anisotropic&&(zt=Me.getParameter(sr));var Rr=1,jr=1;bt.webgl_draw_buffers&&(Rr=Me.getParameter(fr),jr=Me.getParameter(Tr));var Nr=!!bt.oes_texture_float;if(Nr){var Gr=Me.createTexture();Me.bindTexture($e,Gr),Me.texImage2D($e,0,_t,1,1,0,_t,It,null);var mi=Me.createFramebuffer();if(Me.bindFramebuffer(er,mi),Me.framebufferTexture2D(er,wr,$e,Gr,0),Me.bindTexture($e,null),Me.checkFramebufferStatus(er)!==lr)Nr=!1;else{Me.viewport(0,0,1,1),Me.clearColor(1,0,0,1),Me.clear(Lr);var Ui=H.allocType(It,4);Me.readPixels(0,0,1,1,_t,It,Ui),Me.getError()?Nr=!1:(Me.deleteFramebuffer(mi),Me.deleteTexture(Gr),Nr=Ui[0]===1),H.freeType(Ui)}}var qi=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),Ei=!0;if(!qi){var Hn=Me.createTexture(),en=H.allocType(mt,36);Me.activeTexture(Gt),Me.bindTexture(St,Hn),Me.texImage2D(Qt,0,_t,3,3,0,_t,mt,en),H.freeType(en),Me.bindTexture(St,null),Me.deleteTexture(Hn),Ei=!Me.getError()}return{colorBits:[Me.getParameter(oe),Me.getParameter(_e),Me.getParameter(Ce),Me.getParameter(Le)],depthBits:Me.getParameter(ge),stencilBits:Me.getParameter(ie),subpixelBits:Me.getParameter(re),extensions:Object.keys(bt).filter(function(Wi){return!!bt[Wi]}),maxAnisotropic:zt,maxDrawbuffers:Rr,maxColorAttachments:jr,pointSizeDims:Me.getParameter(Se),lineWidthDims:Me.getParameter(Ee),maxViewportDims:Me.getParameter(Be),maxCombinedTextureUnits:Me.getParameter(ce),maxCubeMapSize:Me.getParameter(Vt),maxRenderbufferSize:Me.getParameter(ot),maxTextureUnits:Me.getParameter(lt),maxTextureSize:Me.getParameter(Ae),maxAttributes:Me.getParameter(Pe),maxVertexUniforms:Me.getParameter(me),maxVertexTextureUnits:Me.getParameter(je),maxVaryingVectors:Me.getParameter(De),maxFragmentUniforms:Me.getParameter(pt),glsl:Me.getParameter($t),renderer:Me.getParameter(Wt),vendor:Me.getParameter(ut),version:Me.getParameter(Nt),readFloat:Nr,npotTextureCube:Ei}},Br=function(Me){return Me instanceof Uint8Array||Me instanceof Uint16Array||Me instanceof Uint32Array||Me instanceof Int8Array||Me instanceof Int16Array||Me instanceof Int32Array||Me instanceof Float32Array||Me instanceof Float64Array||Me instanceof Uint8ClampedArray};function Vr(Me){return!!Me&&typeof Me=="object"&&Array.isArray(Me.shape)&&Array.isArray(Me.stride)&&typeof Me.offset=="number"&&Me.shape.length===Me.stride.length&&(Array.isArray(Me.data)||Br(Me.data))}var dt=function(Me){return Object.keys(Me).map(function(bt){return Me[bt]})},Ge={shape:xe,flatten:Ie};function Je(Me,bt,zt){for(var Rr=0;Rr0){var Bn;if(Array.isArray(Yr[0])){Zi=Fn(Yr);for(var hi=1,li=1;li0){if(typeof hi[0]=="number"){var Vi=H.allocType(ci.dtype,hi.length);Er(Vi,hi),Zi(Vi,mn),H.freeType(Vi)}else if(Array.isArray(hi[0])||Br(hi[0])){Ji=Fn(hi);var Ni=qn(hi,Ji,ci.dtype);Zi(Ni,mn),H.freeType(Ni)}}}else if(Vr(hi)){Ji=hi.shape;var pn=hi.stride,Vn=0,na=0,Ki=0,kn=0;Ji.length===1?(Vn=Ji[0],na=1,Ki=pn[0],kn=0):Ji.length===2&&(Vn=Ji[0],na=Ji[1],Ki=pn[0],kn=pn[1]);var ta=Array.isArray(hi.data)?ci.dtype:nr(hi.data),oa=H.allocType(ta,Vn*na);Xr(oa,hi.data,Vn,na,Ki,kn,hi.offset),Zi(oa,mn),H.freeType(oa)}return an}return xi||an(Mr),an._reglType="buffer",an._buffer=ci,an.subdata=Bn,zt.profile&&(an.stats=ci.stats),an.destroy=function(){en(ci)},an}function si(){dt(Nr).forEach(function(Mr){Mr.buffer=Me.createBuffer(),Me.bindBuffer(Mr.type,Mr.buffer),Me.bufferData(Mr.type,Mr.persistentData||Mr.byteLength,Mr.usage)})}return zt.profile&&(bt.getTotalBufferSize=function(){var Mr=0;return Object.keys(Nr).forEach(function(Yr){Mr+=Nr[Yr].stats.size}),Mr}),{create:Wi,createStream:Ui,destroyStream:qi,clear:function(){dt(Nr).forEach(en),mi.forEach(en)},getBuffer:function(Mr){return Mr&&Mr._buffer instanceof Gr?Mr._buffer:null},restore:si,_initBuffer:Hn}}var Qr=0,Oi=0,$i=1,tn=1,fn=4,yn=4,Sn={points:Qr,point:Oi,lines:$i,line:tn,triangles:fn,triangle:yn,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Ba=0,ua=1,ma=4,Wa=5120,Fa=5121,Xo=5122,da=5123,Wn=5124,Ha=5125,vo=34963,jn=35040,Mt=35044;function kr(Me,bt,zt,Rr){var jr={},Nr=0,Gr={uint8:Fa,uint16:da};bt.oes_element_index_uint&&(Gr.uint32=Ha);function mi(si){this.id=Nr++,jr[this.id]=this,this.buffer=si,this.primType=ma,this.vertCount=0,this.type=0}mi.prototype.bind=function(){this.buffer.bind()};var Ui=[];function qi(si){var Mr=Ui.pop();return Mr||(Mr=new mi(zt.create(null,vo,!0,!1)._buffer)),Hn(Mr,si,jn,-1,-1,0,0),Mr}function Ei(si){Ui.push(si)}function Hn(si,Mr,Yr,xi,Ri,ci,an){si.buffer.bind();var Zi;if(Mr){var Bn=an;!an&&(!Br(Mr)||Vr(Mr)&&!Br(Mr.data))&&(Bn=bt.oes_element_index_uint?Ha:da),zt._initBuffer(si.buffer,Mr,Yr,Bn,3)}else Me.bufferData(vo,ci,Yr),si.buffer.dtype=Zi||Fa,si.buffer.usage=Yr,si.buffer.dimension=3,si.buffer.byteLength=ci;if(Zi=an,!an){switch(si.buffer.dtype){case Fa:case Wa:Zi=Fa;break;case da:case Xo:Zi=da;break;case Ha:case Wn:Zi=Ha;break;default:}si.buffer.dtype=Zi}si.type=Zi;var hi=Ri;hi<0&&(hi=si.buffer.byteLength,Zi===da?hi>>=1:Zi===Ha&&(hi>>=2)),si.vertCount=hi;var li=xi;if(xi<0){li=ma;var mn=si.buffer.dimension;mn===1&&(li=Ba),mn===2&&(li=ua),mn===3&&(li=ma)}si.primType=li}function en(si){Rr.elementsCount--,delete jr[si.id],si.buffer.destroy(),si.buffer=null}function Wi(si,Mr){var Yr=zt.create(null,vo,!0),xi=new mi(Yr._buffer);Rr.elementsCount++;function Ri(ci){if(!ci)Yr(),xi.primType=ma,xi.vertCount=0,xi.type=Fa;else if(typeof ci=="number")Yr(ci),xi.primType=ma,xi.vertCount=ci|0,xi.type=Fa;else{var an=null,Zi=Mt,Bn=-1,hi=-1,li=0,mn=0;Array.isArray(ci)||Br(ci)||Vr(ci)?an=ci:("data"in ci&&(an=ci.data),"usage"in ci&&(Zi=On[ci.usage]),"primitive"in ci&&(Bn=Sn[ci.primitive]),"count"in ci&&(hi=ci.count|0),"type"in ci&&(mn=Gr[ci.type]),"length"in ci?li=ci.length|0:(li=hi,mn===da||mn===Xo?li*=2:(mn===Ha||mn===Wn)&&(li*=4))),Hn(xi,an,Zi,Bn,hi,li,mn)}return Ri}return Ri(si),Ri._reglType="elements",Ri._elements=xi,Ri.subdata=function(ci,an){return Yr.subdata(ci,an),Ri},Ri.destroy=function(){en(xi)},Ri}return{create:Wi,createStream:qi,destroyStream:Ei,getElements:function(si){return typeof si=="function"&&si._elements instanceof mi?si._elements:null},clear:function(){dt(jr).forEach(en)}}}var Jr=new Float32Array(1),vi=new Uint32Array(Jr.buffer),hn=5123;function An(Me){for(var bt=H.allocType(hn,Me.length),zt=0;zt>>31<<15,Nr=(Rr<<1>>>24)-127,Gr=Rr>>13&1023;if(Nr<-24)bt[zt]=jr;else if(Nr<-14){var mi=-14-Nr;bt[zt]=jr+(Gr+1024>>mi)}else Nr>15?bt[zt]=jr+31744:bt[zt]=jr+(Nr+15<<10)+Gr}return bt}function Mn(Me){return Array.isArray(Me)||Br(Me)}var Li=34467,_n=3553,ya=34067,$n=34069,Ma=6408,_o=6406,No=6407,po=6409,Lo=6410,ko=32854,Ds=32855,Fs=36194,ll=32819,ul=32820,zl=33635,us=34042,il=6402,As=34041,cl=35904,Ks=35906,zs=36193,Io=33776,ls=33777,Yl=33778,Su=33779,nc=35986,bs=35987,Rn=34798,_a=35840,Vu=35841,Ol=35842,xo=35843,Kl=36196,Ns=5121,Hl=5123,ac=5125,aa=5126,Oo=10242,qo=10243,ql=10497,Pc=33071,Do=33648,rf=10240,Vf=10241,pl=9728,Zc=9729,Jl=9984,Os=9985,yu=9986,oc=9987,Cf=33170,sc=4352,jh=4353,Lf=4354,cs=34046,nf=3317,Gf=37440,$l=37441,fl=37443,lc=37444,Fu=33984,Es=[Jl,yu,Os,oc],Hs=[0,po,Lo,No,Ma],Go={};Go[po]=Go[_o]=Go[il]=1,Go[As]=Go[Lo]=2,Go[No]=Go[cl]=3,Go[Ma]=Go[Ks]=4;function ps(Me){return"[object "+Me+"]"}var uc=ps("HTMLCanvasElement"),xl=ps("OffscreenCanvas"),Gu=ps("CanvasRenderingContext2D"),qs=ps("ImageBitmap"),od=ps("HTMLImageElement"),Po=ps("HTMLVideoElement"),sd=Object.keys(ke).concat([uc,xl,Gu,qs,od,Po]),Ko=[];Ko[Ns]=1,Ko[aa]=4,Ko[zs]=2,Ko[Hl]=2,Ko[ac]=4;var Pa=[];Pa[ko]=2,Pa[Ds]=2,Pa[Fs]=2,Pa[As]=4,Pa[Io]=.5,Pa[ls]=.5,Pa[Yl]=1,Pa[Su]=1,Pa[nc]=.5,Pa[bs]=1,Pa[Rn]=1,Pa[_a]=.5,Pa[Vu]=.25,Pa[Ol]=.5,Pa[xo]=.25,Pa[Kl]=.5;function af(Me){return Array.isArray(Me)&&(Me.length===0||typeof Me[0]=="number")}function Hu(Me){if(!Array.isArray(Me))return!1;var bt=Me.length;return!(bt===0||!Mn(Me[0]))}function bl(Me){return Object.prototype.toString.call(Me)}function Hf(Me){return bl(Me)===uc}function Ic(Me){return bl(Me)===xl}function yf(Me){return bl(Me)===Gu}function Bl(Me){return bl(Me)===qs}function Ah(Me){return bl(Me)===od}function Qf(Me){return bl(Me)===Po}function _f(Me){if(!Me)return!1;var bt=bl(Me);return sd.indexOf(bt)>=0?!0:af(Me)||Hu(Me)||Vr(Me)}function Yc(Me){return ke[Object.prototype.toString.call(Me)]|0}function eh(Me,bt){var zt=bt.length;switch(Me.type){case Ns:case Hl:case ac:case aa:var Rr=H.allocType(Me.type,zt);Rr.set(bt),Me.data=Rr;break;case zs:Me.data=An(bt);break;default:}}function th(Me,bt){return H.allocType(Me.type===zs?aa:Me.type,bt)}function ju(Me,bt){Me.type===zs?(Me.data=An(bt),H.freeType(bt)):Me.data=bt}function jf(Me,bt,zt,Rr,jr,Nr){for(var Gr=Me.width,mi=Me.height,Ui=Me.channels,qi=Gr*mi*Ui,Ei=th(Me,qi),Hn=0,en=0;en=1;)mi+=Gr*Ui*Ui,Ui/=2;return mi}else return Gr*zt*Rr}function of(Me,bt,zt,Rr,jr,Nr,Gr){var mi={"don't care":sc,"dont care":sc,nice:Lf,fast:jh},Ui={repeat:ql,clamp:Pc,mirror:Do},qi={nearest:pl,linear:Zc},Ei=e({mipmap:oc,"nearest mipmap nearest":Jl,"linear mipmap nearest":Os,"nearest mipmap linear":yu,"linear mipmap linear":oc},qi),Hn={none:0,browser:lc},en={uint8:Ns,rgba4:ll,rgb565:zl,"rgb5 a1":ul},Wi={alpha:_o,luminance:po,"luminance alpha":Lo,rgb:No,rgba:Ma,rgba4:ko,"rgb5 a1":Ds,rgb565:Fs},si={};bt.ext_srgb&&(Wi.srgb=cl,Wi.srgba=Ks),bt.oes_texture_float&&(en.float32=en.float=aa),bt.oes_texture_half_float&&(en.float16=en["half float"]=zs),bt.webgl_depth_texture&&(e(Wi,{depth:il,"depth stencil":As}),e(en,{uint16:Hl,uint32:ac,"depth stencil":us})),bt.webgl_compressed_texture_s3tc&&e(si,{"rgb s3tc dxt1":Io,"rgba s3tc dxt1":ls,"rgba s3tc dxt3":Yl,"rgba s3tc dxt5":Su}),bt.webgl_compressed_texture_atc&&e(si,{"rgb atc":nc,"rgba atc explicit alpha":bs,"rgba atc interpolated alpha":Rn}),bt.webgl_compressed_texture_pvrtc&&e(si,{"rgb pvrtc 4bppv1":_a,"rgb pvrtc 2bppv1":Vu,"rgba pvrtc 4bppv1":Ol,"rgba pvrtc 2bppv1":xo}),bt.webgl_compressed_texture_etc1&&(si["rgb etc1"]=Kl);var Mr=Array.prototype.slice.call(Me.getParameter(Li));Object.keys(si).forEach(function(ne){var we=si[ne];Mr.indexOf(we)>=0&&(Wi[ne]=we)});var Yr=Object.keys(Wi);zt.textureFormats=Yr;var xi=[];Object.keys(Wi).forEach(function(ne){var we=Wi[ne];xi[we]=ne});var Ri=[];Object.keys(en).forEach(function(ne){var we=en[ne];Ri[we]=ne});var ci=[];Object.keys(qi).forEach(function(ne){var we=qi[ne];ci[we]=ne});var an=[];Object.keys(Ei).forEach(function(ne){var we=Ei[ne];an[we]=ne});var Zi=[];Object.keys(Ui).forEach(function(ne){var we=Ui[ne];Zi[we]=ne});var Bn=Yr.reduce(function(ne,we){var Ue=Wi[we];return Ue===po||Ue===_o||Ue===po||Ue===Lo||Ue===il||Ue===As||bt.ext_srgb&&(Ue===cl||Ue===Ks)?ne[Ue]=Ue:Ue===Ds||we.indexOf("rgba")>=0?ne[Ue]=Ma:ne[Ue]=No,ne},{});function hi(){this.internalformat=Ma,this.format=Ma,this.type=Ns,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=lc,this.width=0,this.height=0,this.channels=0}function li(ne,we){ne.internalformat=we.internalformat,ne.format=we.format,ne.type=we.type,ne.compressed=we.compressed,ne.premultiplyAlpha=we.premultiplyAlpha,ne.flipY=we.flipY,ne.unpackAlignment=we.unpackAlignment,ne.colorSpace=we.colorSpace,ne.width=we.width,ne.height=we.height,ne.channels=we.channels}function mn(ne,we){if(!(typeof we!="object"||!we)){if("premultiplyAlpha"in we&&(ne.premultiplyAlpha=we.premultiplyAlpha),"flipY"in we&&(ne.flipY=we.flipY),"alignment"in we&&(ne.unpackAlignment=we.alignment),"colorSpace"in we&&(ne.colorSpace=Hn[we.colorSpace]),"type"in we){var Ue=we.type;ne.type=en[Ue]}var ft=ne.width,Zt=ne.height,hr=ne.channels,qt=!1;"shape"in we?(ft=we.shape[0],Zt=we.shape[1],we.shape.length===3&&(hr=we.shape[2],qt=!0)):("radius"in we&&(ft=Zt=we.radius),"width"in we&&(ft=we.width),"height"in we&&(Zt=we.height),"channels"in we&&(hr=we.channels,qt=!0)),ne.width=ft|0,ne.height=Zt|0,ne.channels=hr|0;var Ve=!1;if("format"in we){var Qe=we.format,at=ne.internalformat=Wi[Qe];ne.format=Bn[at],Qe in en&&("type"in we||(ne.type=en[Qe])),Qe in si&&(ne.compressed=!0),Ve=!0}!qt&&Ve?ne.channels=Go[ne.format]:qt&&!Ve&&ne.channels!==Hs[ne.format]&&(ne.format=ne.internalformat=Hs[ne.channels])}}function Ji(ne){Me.pixelStorei(Gf,ne.flipY),Me.pixelStorei($l,ne.premultiplyAlpha),Me.pixelStorei(fl,ne.colorSpace),Me.pixelStorei(nf,ne.unpackAlignment)}function Vi(){hi.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Ni(ne,we){var Ue=null;if(_f(we)?Ue=we:we&&(mn(ne,we),"x"in we&&(ne.xOffset=we.x|0),"y"in we&&(ne.yOffset=we.y|0),_f(we.data)&&(Ue=we.data)),we.copy){var ft=jr.viewportWidth,Zt=jr.viewportHeight;ne.width=ne.width||ft-ne.xOffset,ne.height=ne.height||Zt-ne.yOffset,ne.needsCopy=!0}else if(!Ue)ne.width=ne.width||1,ne.height=ne.height||1,ne.channels=ne.channels||4;else if(Br(Ue))ne.channels=ne.channels||4,ne.data=Ue,!("type"in we)&&ne.type===Ns&&(ne.type=Yc(Ue));else if(af(Ue))ne.channels=ne.channels||4,eh(ne,Ue),ne.alignment=1,ne.needsFree=!0;else if(Vr(Ue)){var hr=Ue.data;!Array.isArray(hr)&&ne.type===Ns&&(ne.type=Yc(hr));var qt=Ue.shape,Ve=Ue.stride,Qe,at,Ct,Ot,Rt,Bt;qt.length===3?(Ct=qt[2],Bt=Ve[2]):(Ct=1,Bt=1),Qe=qt[0],at=qt[1],Ot=Ve[0],Rt=Ve[1],ne.alignment=1,ne.width=Qe,ne.height=at,ne.channels=Ct,ne.format=ne.internalformat=Hs[Ct],ne.needsFree=!0,jf(ne,hr,Ot,Rt,Bt,Ue.offset)}else if(Hf(Ue)||Ic(Ue)||yf(Ue))Hf(Ue)||Ic(Ue)?ne.element=Ue:ne.element=Ue.canvas,ne.width=ne.element.width,ne.height=ne.element.height,ne.channels=4;else if(Bl(Ue))ne.element=Ue,ne.width=Ue.width,ne.height=Ue.height,ne.channels=4;else if(Ah(Ue))ne.element=Ue,ne.width=Ue.naturalWidth,ne.height=Ue.naturalHeight,ne.channels=4;else if(Qf(Ue))ne.element=Ue,ne.width=Ue.videoWidth,ne.height=Ue.videoHeight,ne.channels=4;else if(Hu(Ue)){var Dt=ne.width||Ue[0].length,yt=ne.height||Ue.length,Pt=ne.channels;Mn(Ue[0][0])?Pt=Pt||Ue[0][0].length:Pt=Pt||1;for(var ht=Ge.shape(Ue),ur=1,br=0;br>=Zt,Ue.height>>=Zt,Ni(Ue,ft[Zt]),ne.mipmask|=1<=0&&!("faces"in we)&&(ne.genMipmaps=!0)}if("mag"in we){var ft=we.mag;ne.magFilter=qi[ft]}var Zt=ne.wrapS,hr=ne.wrapT;if("wrap"in we){var qt=we.wrap;typeof qt=="string"?Zt=hr=Ui[qt]:Array.isArray(qt)&&(Zt=Ui[qt[0]],hr=Ui[qt[1]])}else{if("wrapS"in we){var Ve=we.wrapS;Zt=Ui[Ve]}if("wrapT"in we){var Qe=we.wrapT;hr=Ui[Qe]}}if(ne.wrapS=Zt,ne.wrapT=hr,"anisotropic"in we){var at=we.anisotropic;ne.anisotropic=we.anisotropic}if("mipmap"in we){var Ct=!1;switch(typeof we.mipmap){case"string":ne.mipmapHint=mi[we.mipmap],ne.genMipmaps=!0,Ct=!0;break;case"boolean":Ct=ne.genMipmaps=we.mipmap;break;case"object":ne.genMipmaps=!1,Ct=!0;break;default:}Ct&&!("min"in we)&&(ne.minFilter=Jl)}}function al(ne,we){Me.texParameteri(we,Vf,ne.minFilter),Me.texParameteri(we,rf,ne.magFilter),Me.texParameteri(we,Oo,ne.wrapS),Me.texParameteri(we,qo,ne.wrapT),bt.ext_texture_filter_anisotropic&&Me.texParameteri(we,cs,ne.anisotropic),ne.genMipmaps&&(Me.hint(Cf,ne.mipmapHint),Me.generateMipmap(we))}var Vl=0,ss={},Vs=zt.maxTextureUnits,Ys=Array(Vs).map(function(){return null});function wa(ne){hi.call(this),this.mipmask=0,this.internalformat=Ma,this.id=Vl++,this.refCount=1,this.target=ne,this.texture=Me.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new zo,Gr.profile&&(this.stats={size:0})}function ol(ne){Me.activeTexture(Fu),Me.bindTexture(ne.target,ne.texture)}function io(){var ne=Ys[0];ne?Me.bindTexture(ne.target,ne.texture):Me.bindTexture(_n,null)}function Y(ne){var we=ne.texture,Ue=ne.unit,ft=ne.target;Ue>=0&&(Me.activeTexture(Fu+Ue),Me.bindTexture(ft,null),Ys[Ue]=null),Me.deleteTexture(we),ne.texture=null,ne.params=null,ne.pixels=null,ne.refCount=0,delete ss[ne.id],Nr.textureCount--}e(wa.prototype,{bind:function(){var ne=this;ne.bindCount+=1;var we=ne.unit;if(we<0){for(var Ue=0;Ue0)continue;ft.unit=-1}Ys[Ue]=ne,we=Ue;break}we>=Vs,Gr.profile&&Nr.maxTextureUnits>Rt)-Ct,Bt.height=Bt.height||(Ue.height>>Rt)-Ot,ol(Ue),Vn(Bt,_n,Ct,Ot,Rt),io(),kn(Bt),ft}function hr(qt,Ve){var Qe=qt|0,at=Ve|0||Qe;if(Qe===Ue.width&&at===Ue.height)return ft;ft.width=Ue.width=Qe,ft.height=Ue.height=at,ol(Ue);for(var Ct=0;Ue.mipmask>>Ct;++Ct){var Ot=Qe>>Ct,Rt=at>>Ct;if(!Ot||!Rt)break;Me.texImage2D(_n,Ct,Ue.format,Ot,Rt,0,Ue.format,Ue.type,null)}return io(),Gr.profile&&(Ue.stats.size=cc(Ue.internalformat,Ue.type,Qe,at,!1,!1)),ft}return ft(ne,we),ft.subimage=Zt,ft.resize=hr,ft._reglType="texture2d",ft._texture=Ue,Gr.profile&&(ft.stats=Ue.stats),ft.destroy=function(){Ue.decRef()},ft}function J(ne,we,Ue,ft,Zt,hr){var qt=new wa(ya);ss[qt.id]=qt,Nr.cubeCount++;var Ve=new Array(6);function Qe(Ot,Rt,Bt,Dt,yt,Pt){var ht,ur=qt.texInfo;for(zo.call(ur),ht=0;ht<6;++ht)Ve[ht]=Va();if(typeof Ot=="number"||!Ot){var br=Ot|0||1;for(ht=0;ht<6;++ht)oa(Ve[ht],br,br)}else if(typeof Ot=="object")if(Rt)ba(Ve[0],Ot),ba(Ve[1],Rt),ba(Ve[2],Bt),ba(Ve[3],Dt),ba(Ve[4],yt),ba(Ve[5],Pt);else if(Qs(ur,Ot),mn(qt,Ot),"faces"in Ot){var Ur=Ot.faces;for(ht=0;ht<6;++ht)li(Ve[ht],qt),ba(Ve[ht],Ur[ht])}else for(ht=0;ht<6;++ht)ba(Ve[ht],Ot);for(li(qt,Ve[0]),ur.genMipmaps?qt.mipmask=(Ve[0].width<<1)-1:qt.mipmask=Ve[0].mipmask,qt.internalformat=Ve[0].internalformat,Qe.width=Ve[0].width,Qe.height=Ve[0].height,ol(qt),ht=0;ht<6;++ht)is(Ve[ht],$n+ht);for(al(ur,ya),io(),Gr.profile&&(qt.stats.size=cc(qt.internalformat,qt.type,Qe.width,Qe.height,ur.genMipmaps,!0)),Qe.format=xi[qt.internalformat],Qe.type=Ri[qt.type],Qe.mag=ci[ur.magFilter],Qe.min=an[ur.minFilter],Qe.wrapS=Zi[ur.wrapS],Qe.wrapT=Zi[ur.wrapT],ht=0;ht<6;++ht)Ml(Ve[ht]);return Qe}function at(Ot,Rt,Bt,Dt,yt){var Pt=Bt|0,ht=Dt|0,ur=yt|0,br=Ki();return li(br,qt),br.width=0,br.height=0,Ni(br,Rt),br.width=br.width||(qt.width>>ur)-Pt,br.height=br.height||(qt.height>>ur)-ht,ol(qt),Vn(br,$n+Ot,Pt,ht,ur),io(),kn(br),Qe}function Ct(Ot){var Rt=Ot|0;if(Rt!==qt.width){Qe.width=qt.width=Rt,Qe.height=qt.height=Rt,ol(qt);for(var Bt=0;Bt<6;++Bt)for(var Dt=0;qt.mipmask>>Dt;++Dt)Me.texImage2D($n+Bt,Dt,qt.format,Rt>>Dt,Rt>>Dt,0,qt.format,qt.type,null);return io(),Gr.profile&&(qt.stats.size=cc(qt.internalformat,qt.type,Qe.width,Qe.height,!1,!0)),Qe}}return Qe(ne,we,Ue,ft,Zt,hr),Qe.subimage=at,Qe.resize=Ct,Qe._reglType="textureCube",Qe._texture=qt,Gr.profile&&(Qe.stats=qt.stats),Qe.destroy=function(){qt.decRef()},Qe}function q(){for(var ne=0;ne>ft,Ue.height>>ft,0,Ue.internalformat,Ue.type,null);else for(var Zt=0;Zt<6;++Zt)Me.texImage2D($n+Zt,ft,Ue.internalformat,Ue.width>>ft,Ue.height>>ft,0,Ue.internalformat,Ue.type,null);al(Ue.texInfo,Ue.target)})}function de(){for(var ne=0;ne=0?Ml=!0:Ui.indexOf(zo)>=0&&(Ml=!1))),("depthTexture"in wa||"depthStencilTexture"in wa)&&(Ys=!!(wa.depthTexture||wa.depthStencilTexture)),"depth"in wa&&(typeof wa.depth=="boolean"?is=wa.depth:(Vl=wa.depth,Zs=!1)),"stencil"in wa&&(typeof wa.stencil=="boolean"?Zs=wa.stencil:(ss=wa.stencil,is=!1)),"depthStencil"in wa&&(typeof wa.depthStencil=="boolean"?is=Zs=wa.depthStencil:(Vs=wa.depthStencil,is=!1,Zs=!1))}var io=null,Y=null,D=null,J=null;if(Array.isArray(Va))io=Va.map(si);else if(Va)io=[si(Va)];else for(io=new Array(al),ta=0;ta0&&(kn.depth=Ni[0].depth,kn.stencil=Ni[0].stencil,kn.depthStencil=Ni[0].depthStencil),Ni[Ki]?Ni[Ki](kn):Ni[Ki]=li(kn)}return e(pn,{width:ta,height:ta,color:zo})}function Vn(na){var Ki,kn=na|0;if(kn===pn.width)return pn;var ta=pn.color;for(Ki=0;Ki=ta.byteLength?oa.subdata(ta):(oa.destroy(),li.buffers[na]=null)),li.buffers[na]||(oa=li.buffers[na]=jr.create(Ki,If,!1,!0)),kn.buffer=jr.getBuffer(oa),kn.size=kn.buffer.dimension|0,kn.normalized=!1,kn.type=kn.buffer.dtype,kn.offset=0,kn.stride=0,kn.divisor=0,kn.state=1,pn[na]=1}else jr.getBuffer(Ki)?(kn.buffer=jr.getBuffer(Ki),kn.size=kn.buffer.dimension|0,kn.normalized=!1,kn.type=kn.buffer.dtype,kn.offset=0,kn.stride=0,kn.divisor=0,kn.state=1):jr.getBuffer(Ki.buffer)?(kn.buffer=jr.getBuffer(Ki.buffer),kn.size=(+Ki.size||kn.buffer.dimension)|0,kn.normalized=!!Ki.normalized||!1,"type"in Ki?kn.type=ji[Ki.type]:kn.type=kn.buffer.dtype,kn.offset=(Ki.offset||0)|0,kn.stride=(Ki.stride||0)|0,kn.divisor=(Ki.divisor||0)|0,kn.state=1):"x"in Ki&&(kn.x=+Ki.x||0,kn.y=+Ki.y||0,kn.z=+Ki.z||0,kn.w=+Ki.w||0,kn.state=2)}for(var ba=0;ba1)for(var Ji=0;JiMr&&(Mr=Yr.stats.uniformsCount)}),Mr},zt.getMaxAttributesCount=function(){var Mr=0;return Ei.forEach(function(Yr){Yr.stats.attributesCount>Mr&&(Mr=Yr.stats.attributesCount)}),Mr});function si(){jr={},Nr={};for(var Mr=0;Mr16&&(zt=Yi(zt,Me.length*8));for(var Rr=Array(16),jr=Array(16),Nr=0;Nr<16;Nr++)Rr[Nr]=zt[Nr]^909522486,jr[Nr]=zt[Nr]^1549556828;var Gr=Yi(Rr.concat(Bc(bt)),512+bt.length*8);return At(Yi(jr.concat(Gr),768))}function vu(Me){for(var bt=ah?"0123456789ABCDEF":"0123456789abcdef",zt="",Rr,jr=0;jr>>4&15)+bt.charAt(Rr&15);return zt}function qc(Me){for(var bt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",zt="",Rr=Me.length,jr=0;jrMe.length*8?zt+=Zu:zt+=bt.charAt(Nr>>>6*(3-Gr)&63);return zt}function cf(Me,bt){var zt=bt.length,Rr=Array(),jr,Nr,Gr,mi,Ui=Array(Math.ceil(Me.length/2));for(jr=0;jr0;){for(mi=Array(),Gr=0,jr=0;jr0||Nr>0)&&(mi[mi.length]=Nr);Rr[Rr.length]=Gr,Ui=mi}var qi="";for(jr=Rr.length-1;jr>=0;jr--)qi+=bt.charAt(Rr[jr]);var Ei=Math.ceil(Me.length*8/(Math.log(bt.length)/Math.log(2)));for(jr=qi.length;jr>>6&31,128|Rr&63):Rr<=65535?bt+=String.fromCharCode(224|Rr>>>12&15,128|Rr>>>6&63,128|Rr&63):Rr<=2097151&&(bt+=String.fromCharCode(240|Rr>>>18&7,128|Rr>>>12&63,128|Rr>>>6&63,128|Rr&63));return bt}function Bc(Me){for(var bt=Array(Me.length>>2),zt=0;zt>5]|=(Me.charCodeAt(zt/8)&255)<<24-zt%32;return bt}function At(Me){for(var bt="",zt=0;zt>5]>>>24-zt%32&255);return bt}function Xt(Me,bt){return Me>>>bt|Me<<32-bt}function Cr(Me,bt){return Me>>>bt}function Ar(Me,bt,zt){return Me&bt^~Me&zt}function Kr(Me,bt,zt){return Me&bt^Me&zt^bt&zt}function ki(Me){return Xt(Me,2)^Xt(Me,13)^Xt(Me,22)}function Xi(Me){return Xt(Me,6)^Xt(Me,11)^Xt(Me,25)}function dn(Me){return Xt(Me,7)^Xt(Me,18)^Cr(Me,3)}function wn(Me){return Xt(Me,17)^Xt(Me,19)^Cr(Me,10)}var Nn=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function Yi(Me,bt){var zt=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Rr=new Array(64),jr,Nr,Gr,mi,Ui,qi,Ei,Hn,en,Wi,si,Mr;for(Me[bt>>5]|=128<<24-bt%32,Me[(bt+64>>9<<4)+15]=bt,en=0;en>16)+(bt>>16)+(zt>>16);return Rr<<16|zt&65535}function on(Me){return Array.prototype.slice.call(Me)}function Fi(Me){return on(Me).join("")}function Qn(Me){var bt=Me&&Me.cache,zt=0,Rr=[],jr=[],Nr=[];function Gr(si,Mr){var Yr=Mr&&Mr.stable;if(!Yr){for(var xi=0;xi0&&(si.push(Ri,"="),si.push.apply(si,on(arguments)),si.push(";")),Ri}return e(Mr,{def:xi,toString:function(){return Fi([Yr.length>0?"var "+Yr.join(",")+";":"",Fi(si)])}})}function Ui(){var si=mi(),Mr=mi(),Yr=si.toString,xi=Mr.toString;function Ri(ci,an){Mr(ci,an,"=",si.def(ci,an),";")}return e(function(){si.apply(si,on(arguments))},{def:si.def,entry:si,exit:Mr,save:Ri,set:function(ci,an,Zi){Ri(ci,an),si(ci,an,"=",Zi,";")},toString:function(){return Yr()+xi()}})}function qi(){var si=Fi(arguments),Mr=Ui(),Yr=Ui(),xi=Mr.toString,Ri=Yr.toString;return e(Mr,{then:function(){return Mr.apply(Mr,on(arguments)),this},else:function(){return Yr.apply(Yr,on(arguments)),this},toString:function(){var ci=Ri();return ci&&(ci="else{"+ci+"}"),Fi(["if(",si,"){",xi(),"}",ci])}})}var Ei=mi(),Hn={};function en(si,Mr){var Yr=[];function xi(){var Bn="a"+Yr.length;return Yr.push(Bn),Bn}Mr=Mr||0;for(var Ri=0;Ri[p.viewport.x,p.viewport.y,b.viewportWidth,b.viewportHeight]},attributes:{color:{buffer:o,offset:(b,p)=>p.offset*4,divisor:1},position:{buffer:i,offset:(b,p)=>p.offset*8,divisor:1},positionFract:{buffer:a,offset:(b,p)=>p.offset*8,divisor:1},error:{buffer:s,offset:(b,p)=>p.offset*16,divisor:1},direction:{buffer:l,stride:24,offset:0},lineOffset:{buffer:l,stride:24,offset:8},capOffset:{buffer:l,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport"),stencil:!1,instances:e.prop("count"),count:SOe.length}),TOe(f,{update:v,draw:h,destroy:m,regl:e,gl:r,canvas:r.canvas,groups:c}),f;function f(b){b?v(b):b===null&&m(),h()}function h(b){if(typeof b=="number")return d(b);b&&!Array.isArray(b)&&(b=[b]),e._refresh(),c.forEach((p,k)=>{if(p){if(b&&(b[k]?p.draw=!0:p.draw=!1),!p.draw){p.draw=!0;return}d(k)}})}function d(b){typeof b=="number"&&(b=c[b]),b!=null&&b&&b.count&&b.color&&b.opacity&&b.positions&&b.positions.length>1&&(b.scaleRatio=[b.scale[0]*b.viewport.width,b.scale[1]*b.viewport.height],n(b),b.after&&b.after(b))}function v(b){if(!b)return;b.length!=null?typeof b[0]=="number"&&(b=[{positions:b}]):Array.isArray(b)||(b=[b]);let p=0,k=0;if(f.groups=c=b.map((L,x)=>{let C=c[x];if(L)typeof L=="function"?L={after:L}:typeof L[0]=="number"&&(L={positions:L});else return C;return L=KNt(L,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),C||(c[x]=C={id:x,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},L=TOe({},u,L)),YNt(C,L,[{lineWidth:S=>+S*.5,capSize:S=>+S*.5,opacity:parseFloat,errors:S=>(S=AOe(S),k+=S.length,S),positions:(S,g)=>(S=AOe(S,"float64"),g.count=Math.floor(S.length/2),g.bounds=XNt(S,2),g.offset=p,p+=g.count,S)},{color:(S,g)=>{let P=g.count;if(S||(S="transparent"),!Array.isArray(S)||typeof S[0]=="number"){let z=S;S=Array(P);for(let q=0;q{let E=g.bounds;return S||(S=E),g.scale=[1/(S[2]-S[0]),1/(S[3]-S[1])],g.translate=[-S[0],-S[1]],g.scaleFract=JY(g.scale),g.translateFract=JY(g.translate),S},viewport:S=>{let g;return Array.isArray(S)?g={x:S[0],y:S[1],width:S[2]-S[0],height:S[3]-S[1]}:S?(g={x:S.x||S.left||0,y:S.y||S.top||0},S.right?g.width=S.right-g.x:g.width=S.w||S.width||0,S.bottom?g.height=S.bottom-g.y:g.height=S.h||S.height||0):g={x:0,y:0,width:r.drawingBufferWidth,height:r.drawingBufferHeight},g}}]),C}),p||k){let L=c.reduce((g,P,E)=>g+(P?P.count:0),0),x=new Float64Array(L*2),C=new Uint8Array(L*4),S=new Float32Array(L*4);c.forEach((g,P)=>{if(!g)return;let{positions:E,count:z,offset:q,color:U,errors:G}=g;z&&(C.set(U,q*4),S.set(G,q*4),x.set(E,q*2))});var M=JNt(x);i(M);var T=JY(x,M);a(T),o(C),s(S)}}function m(){i.destroy(),a.destroy(),o.destroy(),s.destroy(),l.destroy()}}});var LOe=ye((u_r,COe)=>{var kOe=/[\'\"]/;COe.exports=function(t){return t?(kOe.test(t.charAt(0))&&(t=t.substr(1)),kOe.test(t.charAt(t.length-1))&&(t=t.substr(0,t.length-1)),t):""}});var $Y=ye((c_r,QNt)=>{QNt.exports=["inherit","initial","unset"]});var QY=ye((f_r,eUt)=>{eUt.exports=["caption","icon","menu","message-box","small-caption","status-bar"]});var eK=ye((h_r,tUt)=>{tUt.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]});var tK=ye((d_r,rUt)=>{rUt.exports=["normal","italic","oblique"]});var rK=ye((v_r,iUt)=>{iUt.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]});var DOe=ye((p_r,ROe)=>{"use strict";function POe(e,t){if(typeof e!="string")return[e];var r=[e];typeof t=="string"||Array.isArray(t)?t={brackets:t}:t||(t={});var n=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],i=t.escape||"___",a=!!t.flat;n.forEach(function(l){var u=new RegExp(["\\",l[0],"[^\\",l[0],"\\",l[1],"]*\\",l[1]].join("")),c=[];function f(h,d,v){var m=r.push(h.slice(l[0].length,-l[1].length))-1;return c.push(m),i+m+i}r.forEach(function(h,d){for(var v,m=0;h!=v;)if(v=h,h=h.replace(u,f),m++>1e4)throw Error("References have circular dependency. Please, check them.");r[d]=h}),c=c.reverse(),r=r.map(function(h){return c.forEach(function(d){h=h.replace(new RegExp("(\\"+i+d+"\\"+i+")","g"),l[0]+"$1"+l[1])}),h})});var o=new RegExp("\\"+i+"([0-9]+)\\"+i);function s(l,u,c){for(var f=[],h,d=0;h=o.exec(l);){if(d++>1e4)throw Error("Circular references in parenthesis");f.push(l.slice(0,h.index)),f.push(s(u[h[1]],u)),l=l.slice(h.index+h[0].length)}return f.push(l),f}return a?r:s(r[0],r)}function IOe(e,t){if(t&&t.flat){var r=t&&t.escape||"___",n=e[0],i;if(!n)return"";for(var a=new RegExp("\\"+r+"([0-9]+)\\"+r),o=0;n!=i;){if(o++>1e4)throw Error("Circular references in "+e);i=n,n=n.replace(a,s)}return n}return e.reduce(function l(u,c){return Array.isArray(c)&&(c=c.reduce(l,"")),u+c},"");function s(l,u){if(e[u]==null)throw Error("Reference "+u+"is undefined");return e[u]}}function iK(e,t){return Array.isArray(e)?IOe(e,t):POe(e,t)}iK.parse=POe;iK.stringify=IOe;ROe.exports=iK});var qOe=ye((g_r,zOe)=>{"use strict";var FOe=DOe();zOe.exports=function(t,r,n){if(t==null)throw Error("First argument should be a string");if(r==null)throw Error("Separator should be a string or a RegExp");n?(typeof n=="string"||Array.isArray(n))&&(n={ignore:n}):n={},n.escape==null&&(n.escape=!0),n.ignore==null?n.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof n.ignore=="string"&&(n.ignore=[n.ignore]),n.ignore=n.ignore.map(function(f){return f.length===1&&(f=f+f),f}));var i=FOe.parse(t,{flat:!0,brackets:n.ignore}),a=i[0],o=a.split(r);if(n.escape){for(var s=[],l=0;l{nUt.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]});var nK=ye((y_r,BOe)=>{"use strict";var aUt=OOe();BOe.exports={isSize:function(t){return/^[\d\.]/.test(t)||t.indexOf("/")!==-1||aUt.indexOf(t)!==-1}}});var GOe=ye((__r,VOe)=>{"use strict";var oUt=LOe(),sUt=$Y(),lUt=QY(),uUt=eK(),cUt=tK(),fUt=rK(),aK=qOe(),hUt=nK().isSize;VOe.exports=UOe;var Pk=UOe.cache={};function UOe(e){if(typeof e!="string")throw new Error("Font argument must be a string.");if(Pk[e])return Pk[e];if(e==="")throw new Error("Cannot parse an empty string.");if(lUt.indexOf(e)!==-1)return Pk[e]={system:e};for(var t={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},r=aK(e,/\s+/),n;n=r.shift();){if(sUt.indexOf(n)!==-1)return["style","variant","weight","stretch"].forEach(function(a){t[a]=n}),Pk[e]=t;if(cUt.indexOf(n)!==-1){t.style=n;continue}if(n==="normal"||n==="small-caps"){t.variant=n;continue}if(fUt.indexOf(n)!==-1){t.stretch=n;continue}if(uUt.indexOf(n)!==-1){t.weight=n;continue}if(hUt(n)){var i=aK(n,"/");if(t.size=i[0],i[1]!=null?t.lineHeight=NOe(i[1]):r[0]==="/"&&(r.shift(),t.lineHeight=NOe(r.shift())),!r.length)throw new Error("Missing required font-family.");return t.family=aK(r.join(" "),/\s*,\s*/).map(oUt),Pk[e]=t}throw new Error("Unknown or unsupported font token: "+n)}throw new Error("Missing required font-size.")}function NOe(e){var t=parseFloat(e);return t.toString()===e?t:e}});var sK=ye((x_r,HOe)=>{"use strict";var dUt=ey(),vUt=nK().isSize,pUt=Rk($Y()),gUt=Rk(QY()),mUt=Rk(eK()),yUt=Rk(tK()),_Ut=Rk(rK()),xUt={normal:1,"small-caps":1},bUt={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},oK={style:"normal",variant:"normal",weight:"normal",stretch:"normal",size:"1rem",lineHeight:"normal",family:"serif"};HOe.exports=function(t){if(t=dUt(t,{style:"style fontstyle fontStyle font-style slope distinction",variant:"variant font-variant fontVariant fontvariant var capitalization",weight:"weight w font-weight fontWeight fontweight",stretch:"stretch font-stretch fontStretch fontstretch width",size:"size s font-size fontSize fontsize height em emSize",lineHeight:"lh line-height lineHeight lineheight leading",family:"font family fontFamily font-family fontfamily type typeface face",system:"system reserved default global"}),t.system)return t.system&&Ik(t.system,gUt),t.system;if(Ik(t.style,yUt),Ik(t.variant,xUt),Ik(t.weight,mUt),Ik(t.stretch,_Ut),t.size==null&&(t.size=oK.size),typeof t.size=="number"&&(t.size+="px"),!vUt)throw Error("Bad size value `"+t.size+"`");t.family||(t.family=oK.family),Array.isArray(t.family)&&(t.family.length||(t.family=[oK.family]),t.family=t.family.map(function(n){return bUt[n]?n:'"'+n+'"'}).join(", "));var r=[];return r.push(t.style),t.variant!==t.style&&r.push(t.variant),t.weight!==t.variant&&t.weight!==t.style&&r.push(t.weight),t.stretch!==t.weight&&t.stretch!==t.variant&&t.stretch!==t.style&&r.push(t.stretch),r.push(t.size+(t.lineHeight==null||t.lineHeight==="normal"||t.lineHeight+""=="1"?"":"/"+t.lineHeight)),r.push(t.family),r.filter(Boolean).join(" ")};function Ik(e,t){if(e&&!t[e]&&!pUt[e])throw Error("Unknown keyword `"+e+"`");return e}function Rk(e){for(var t={},r=0;r{"use strict";jOe.exports={parse:GOe(),stringify:sK()}});var XOe=ye((lK,uK)=>{(function(e,t){typeof lK=="object"&&typeof uK!="undefined"?uK.exports=t():e.createREGL=t()})(lK,function(){"use strict";var e=function(Me,bt){for(var Ot=Object.keys(bt),Lr=0;Lr1&&bt===Ot&&(bt==='"'||bt==="'"))return['"'+o(Me.substr(1,Me.length-2))+'"'];var Lr=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(Me);if(Lr)return s(Me.substr(0,Lr.index)).concat(s(Lr[1])).concat(s(Me.substr(Lr.index+Lr[0].length)));var Vr=Me.split(".");if(Vr.length===1)return['"'+o(Me)+'"'];for(var Or=[],Nr=0;Nr65535)<<4,Me>>>=bt,Ot=(Me>255)<<3,Me>>>=Ot,bt|=Ot,Ot=(Me>15)<<2,Me>>>=Ot,bt|=Ot,Ot=(Me>3)<<1,Me>>>=Ot,bt|=Ot,bt|Me>>1}function N(){var Me=S(8,function(){return[]});function bt(Or){var Nr=Z(Or),vi=Me[j(Nr)>>2];return vi.length>0?vi.pop():new ArrayBuffer(Nr)}function Ot(Or){Me[j(Or.byteLength)>>2].push(Or)}function Lr(Or,Nr){var vi=null;switch(Or){case g:vi=new Int8Array(bt(Nr),0,Nr);break;case P:vi=new Uint8Array(bt(Nr),0,Nr);break;case E:vi=new Int16Array(bt(2*Nr),0,Nr);break;case z:vi=new Uint16Array(bt(2*Nr),0,Nr);break;case q:vi=new Int32Array(bt(4*Nr),0,Nr);break;case U:vi=new Uint32Array(bt(4*Nr),0,Nr);break;case G:vi=new Float32Array(bt(4*Nr),0,Nr);break;default:return null}return vi.length!==Nr?vi.subarray(0,Nr):vi}function Vr(Or){Ot(Or.buffer)}return{alloc:bt,free:Ot,allocType:Lr,freeType:Vr}}var H=N();H.zero=N();var re=3408,oe=3410,_e=3411,ke=3412,Ce=3413,ge=3414,ie=3415,Se=33901,Ee=33902,we=3379,De=3386,Le=34921,me=36347,Pe=36348,ce=35661,He=35660,lt=34930,mt=36349,Vt=34076,st=34024,ct=7936,Qt=7937,Ht=7938,nr=35724,tt=34047,je=36063,Ue=34852,Ae=3553,rt=34067,St=34069,Tt=33984,dt=6408,Et=5126,pt=5121,Xt=36160,or=36053,_r=36064,Er=16384,ei=function(Me,bt){var Ot=1;bt.ext_texture_filter_anisotropic&&(Ot=Me.getParameter(tt));var Lr=1,Vr=1;bt.webgl_draw_buffers&&(Lr=Me.getParameter(Ue),Vr=Me.getParameter(je));var Or=!!bt.oes_texture_float;if(Or){var Nr=Me.createTexture();Me.bindTexture(Ae,Nr),Me.texImage2D(Ae,0,dt,1,1,0,dt,Et,null);var vi=Me.createFramebuffer();if(Me.bindFramebuffer(Xt,vi),Me.framebufferTexture2D(Xt,_r,Ae,Nr,0),Me.bindTexture(Ae,null),Me.checkFramebufferStatus(Xt)!==or)Or=!1;else{Me.viewport(0,0,1,1),Me.clearColor(1,0,0,1),Me.clear(Er);var Ni=H.allocType(Et,4);Me.readPixels(0,0,1,1,dt,Et,Ni),Me.getError()?Or=!1:(Me.deleteFramebuffer(vi),Me.deleteTexture(Nr),Or=Ni[0]===1),H.freeType(Ni)}}var qi=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),Si=!0;if(!qi){var Vn=Me.createTexture(),Qi=H.allocType(pt,36);Me.activeTexture(Tt),Me.bindTexture(rt,Vn),Me.texImage2D(St,0,dt,3,3,0,dt,pt,Qi),H.freeType(Qi),Me.bindTexture(rt,null),Me.deleteTexture(Vn),Si=!Me.getError()}return{colorBits:[Me.getParameter(oe),Me.getParameter(_e),Me.getParameter(ke),Me.getParameter(Ce)],depthBits:Me.getParameter(ge),stencilBits:Me.getParameter(ie),subpixelBits:Me.getParameter(re),extensions:Object.keys(bt).filter(function(ji){return!!bt[ji]}),maxAnisotropic:Ot,maxDrawbuffers:Lr,maxColorAttachments:Vr,pointSizeDims:Me.getParameter(Se),lineWidthDims:Me.getParameter(Ee),maxViewportDims:Me.getParameter(De),maxCombinedTextureUnits:Me.getParameter(ce),maxCubeMapSize:Me.getParameter(Vt),maxRenderbufferSize:Me.getParameter(st),maxTextureUnits:Me.getParameter(lt),maxTextureSize:Me.getParameter(we),maxAttributes:Me.getParameter(Le),maxVertexUniforms:Me.getParameter(me),maxVertexTextureUnits:Me.getParameter(He),maxVaryingVectors:Me.getParameter(Pe),maxFragmentUniforms:Me.getParameter(mt),glsl:Me.getParameter(nr),renderer:Me.getParameter(Qt),vendor:Me.getParameter(ct),version:Me.getParameter(Ht),readFloat:Or,npotTextureCube:Si}},qr=function(Me){return Me instanceof Uint8Array||Me instanceof Uint16Array||Me instanceof Uint32Array||Me instanceof Int8Array||Me instanceof Int16Array||Me instanceof Int32Array||Me instanceof Float32Array||Me instanceof Float64Array||Me instanceof Uint8ClampedArray};function jr(Me){return!!Me&&typeof Me=="object"&&Array.isArray(Me.shape)&&Array.isArray(Me.stride)&&typeof Me.offset=="number"&&Me.shape.length===Me.stride.length&&(Array.isArray(Me.data)||qr(Me.data))}var gt=function(Me){return Object.keys(Me).map(function(bt){return Me[bt]})},Ge={shape:Kt,flatten:At};function Je(Me,bt,Ot){for(var Lr=0;Lr0){var qn;if(Array.isArray(Zr[0])){Xi=Vi(Zr);for(var fi=1,si=1;si0){if(typeof fi[0]=="number"){var Ui=H.allocType(ui.dtype,fi.length);wr(Ui,fi),Xi(Ui,mn),H.freeType(Ui)}else if(Array.isArray(fi[0])||qr(fi[0])){Ji=Vi(fi);var Bi=Qn(fi,Ji,ui.dtype);Xi(Bi,mn),H.freeType(Bi)}}}else if(jr(fi)){Ji=fi.shape;var pn=fi.stride,Nn=0,aa=0,Ki=0,Cn=0;Ji.length===1?(Nn=Ji[0],aa=1,Ki=pn[0],Cn=0):Ji.length===2&&(Nn=Ji[0],aa=Ji[1],Ki=pn[0],Cn=pn[1]);var ia=Array.isArray(fi.data)?ui.dtype:ir(fi.data),sa=H.allocType(ia,Nn*aa);Xr(sa,fi.data,Nn,aa,Ki,Cn,fi.offset),Xi(sa,mn),H.freeType(sa)}return nn}return yi||nn(Tr),nn._reglType="buffer",nn._buffer=ui,nn.subdata=qn,Ot.profile&&(nn.stats=ui.stats),nn.destroy=function(){Qi(ui)},nn}function oi(){gt(Or).forEach(function(Tr){Tr.buffer=Me.createBuffer(),Me.bindBuffer(Tr.type,Tr.buffer),Me.bufferData(Tr.type,Tr.persistentData||Tr.byteLength,Tr.usage)})}return Ot.profile&&(bt.getTotalBufferSize=function(){var Tr=0;return Object.keys(Or).forEach(function(Zr){Tr+=Or[Zr].stats.size}),Tr}),{create:ji,createStream:Ni,destroyStream:qi,clear:function(){gt(Or).forEach(Qi),vi.forEach(Qi)},getBuffer:function(Tr){return Tr&&Tr._buffer instanceof Nr?Tr._buffer:null},restore:oi,_initBuffer:Vn}}var $r=0,Ri=0,Zi=1,en=1,fn=4,yn=4,Mn={points:$r,point:Ri,lines:Zi,line:en,triangles:fn,triangle:yn,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Ba=0,ua=1,ma=4,Wa=5120,Fa=5121,Xo=5122,da=5123,jn=5124,Ha=5125,vo=34963,Gn=35040,Ct=35044;function Ar(Me,bt,Ot,Lr){var Vr={},Or=0,Nr={uint8:Fa,uint16:da};bt.oes_element_index_uint&&(Nr.uint32=Ha);function vi(oi){this.id=Or++,Vr[this.id]=this,this.buffer=oi,this.primType=ma,this.vertCount=0,this.type=0}vi.prototype.bind=function(){this.buffer.bind()};var Ni=[];function qi(oi){var Tr=Ni.pop();return Tr||(Tr=new vi(Ot.create(null,vo,!0,!1)._buffer)),Vn(Tr,oi,Gn,-1,-1,0,0),Tr}function Si(oi){Ni.push(oi)}function Vn(oi,Tr,Zr,yi,Ii,ui,nn){oi.buffer.bind();var Xi;if(Tr){var qn=nn;!nn&&(!qr(Tr)||jr(Tr)&&!qr(Tr.data))&&(qn=bt.oes_element_index_uint?Ha:da),Ot._initBuffer(oi.buffer,Tr,Zr,qn,3)}else Me.bufferData(vo,ui,Zr),oi.buffer.dtype=Xi||Fa,oi.buffer.usage=Zr,oi.buffer.dimension=3,oi.buffer.byteLength=ui;if(Xi=nn,!nn){switch(oi.buffer.dtype){case Fa:case Wa:Xi=Fa;break;case da:case Xo:Xi=da;break;case Ha:case jn:Xi=Ha;break;default:}oi.buffer.dtype=Xi}oi.type=Xi;var fi=Ii;fi<0&&(fi=oi.buffer.byteLength,Xi===da?fi>>=1:Xi===Ha&&(fi>>=2)),oi.vertCount=fi;var si=yi;if(yi<0){si=ma;var mn=oi.buffer.dimension;mn===1&&(si=Ba),mn===2&&(si=ua),mn===3&&(si=ma)}oi.primType=si}function Qi(oi){Lr.elementsCount--,delete Vr[oi.id],oi.buffer.destroy(),oi.buffer=null}function ji(oi,Tr){var Zr=Ot.create(null,vo,!0),yi=new vi(Zr._buffer);Lr.elementsCount++;function Ii(ui){if(!ui)Zr(),yi.primType=ma,yi.vertCount=0,yi.type=Fa;else if(typeof ui=="number")Zr(ui),yi.primType=ma,yi.vertCount=ui|0,yi.type=Fa;else{var nn=null,Xi=Ct,qn=-1,fi=-1,si=0,mn=0;Array.isArray(ui)||qr(ui)||jr(ui)?nn=ui:("data"in ui&&(nn=ui.data),"usage"in ui&&(Xi=Hn[ui.usage]),"primitive"in ui&&(qn=Mn[ui.primitive]),"count"in ui&&(fi=ui.count|0),"type"in ui&&(mn=Nr[ui.type]),"length"in ui?si=ui.length|0:(si=fi,mn===da||mn===Xo?si*=2:(mn===Ha||mn===jn)&&(si*=4))),Vn(yi,nn,Xi,qn,fi,si,mn)}return Ii}return Ii(oi),Ii._reglType="elements",Ii._elements=yi,Ii.subdata=function(ui,nn){return Zr.subdata(ui,nn),Ii},Ii.destroy=function(){Qi(yi)},Ii}return{create:ji,createStream:qi,destroyStream:Si,getElements:function(oi){return typeof oi=="function"&&oi._elements instanceof vi?oi._elements:null},clear:function(){gt(Vr).forEach(Qi)}}}var Jr=new Float32Array(1),hi=new Uint32Array(Jr.buffer),hn=5123;function Sn(Me){for(var bt=H.allocType(hn,Me.length),Ot=0;Ot>>31<<15,Or=(Lr<<1>>>24)-127,Nr=Lr>>13&1023;if(Or<-24)bt[Ot]=Vr;else if(Or<-14){var vi=-14-Or;bt[Ot]=Vr+(Nr+1024>>vi)}else Or>15?bt[Ot]=Vr+31744:bt[Ot]=Vr+(Or+15<<10)+Nr}return bt}function En(Me){return Array.isArray(Me)||qr(Me)}var ki=34467,_n=3553,ya=34067,ea=34069,Ma=6408,_o=6406,No=6407,po=6409,Lo=6410,ko=32854,Ds=32855,Fs=36194,ll=32819,ul=32820,zl=33635,us=34042,il=6402,As=34041,cl=35904,Ks=35906,zs=36193,Io=33776,ls=33777,Yl=33778,Su=33779,nc=35986,bs=35987,Rn=34798,_a=35840,Vu=35841,ql=35842,xo=35843,Kl=36196,Ns=5121,Hl=5123,ac=5125,oa=5126,qo=10242,Oo=10243,Ol=10497,Pc=33071,Do=33648,rf=10240,Vf=10241,pl=9728,Zc=9729,Jl=9984,qs=9985,yu=9986,oc=9987,Cf=33170,sc=4352,jh=4353,Lf=4354,cs=34046,nf=3317,Gf=37440,$l=37441,fl=37443,lc=37444,Fu=33984,Es=[Jl,yu,qs,oc],Hs=[0,po,Lo,No,Ma],Go={};Go[po]=Go[_o]=Go[il]=1,Go[As]=Go[Lo]=2,Go[No]=Go[cl]=3,Go[Ma]=Go[Ks]=4;function ps(Me){return"[object "+Me+"]"}var uc=ps("HTMLCanvasElement"),xl=ps("OffscreenCanvas"),Gu=ps("CanvasRenderingContext2D"),Os=ps("ImageBitmap"),od=ps("HTMLImageElement"),Po=ps("HTMLVideoElement"),sd=Object.keys(er).concat([uc,xl,Gu,Os,od,Po]),Ko=[];Ko[Ns]=1,Ko[oa]=4,Ko[zs]=2,Ko[Hl]=2,Ko[ac]=4;var Pa=[];Pa[ko]=2,Pa[Ds]=2,Pa[Fs]=2,Pa[As]=4,Pa[Io]=.5,Pa[ls]=.5,Pa[Yl]=1,Pa[Su]=1,Pa[nc]=.5,Pa[bs]=1,Pa[Rn]=1,Pa[_a]=.5,Pa[Vu]=.25,Pa[ql]=.5,Pa[xo]=.25,Pa[Kl]=.5;function af(Me){return Array.isArray(Me)&&(Me.length===0||typeof Me[0]=="number")}function Hu(Me){if(!Array.isArray(Me))return!1;var bt=Me.length;return!(bt===0||!En(Me[0]))}function bl(Me){return Object.prototype.toString.call(Me)}function Hf(Me){return bl(Me)===uc}function Ic(Me){return bl(Me)===xl}function yf(Me){return bl(Me)===Gu}function Bl(Me){return bl(Me)===Os}function Ah(Me){return bl(Me)===od}function Qf(Me){return bl(Me)===Po}function _f(Me){if(!Me)return!1;var bt=bl(Me);return sd.indexOf(bt)>=0?!0:af(Me)||Hu(Me)||jr(Me)}function Yc(Me){return er[Object.prototype.toString.call(Me)]|0}function eh(Me,bt){var Ot=bt.length;switch(Me.type){case Ns:case Hl:case ac:case oa:var Lr=H.allocType(Me.type,Ot);Lr.set(bt),Me.data=Lr;break;case zs:Me.data=Sn(bt);break;default:}}function th(Me,bt){return H.allocType(Me.type===zs?oa:Me.type,bt)}function ju(Me,bt){Me.type===zs?(Me.data=Sn(bt),H.freeType(bt)):Me.data=bt}function jf(Me,bt,Ot,Lr,Vr,Or){for(var Nr=Me.width,vi=Me.height,Ni=Me.channels,qi=Nr*vi*Ni,Si=th(Me,qi),Vn=0,Qi=0;Qi=1;)vi+=Nr*Ni*Ni,Ni/=2;return vi}else return Nr*Ot*Lr}function of(Me,bt,Ot,Lr,Vr,Or,Nr){var vi={"don't care":sc,"dont care":sc,nice:Lf,fast:jh},Ni={repeat:Ol,clamp:Pc,mirror:Do},qi={nearest:pl,linear:Zc},Si=e({mipmap:oc,"nearest mipmap nearest":Jl,"linear mipmap nearest":qs,"nearest mipmap linear":yu,"linear mipmap linear":oc},qi),Vn={none:0,browser:lc},Qi={uint8:Ns,rgba4:ll,rgb565:zl,"rgb5 a1":ul},ji={alpha:_o,luminance:po,"luminance alpha":Lo,rgb:No,rgba:Ma,rgba4:ko,"rgb5 a1":Ds,rgb565:Fs},oi={};bt.ext_srgb&&(ji.srgb=cl,ji.srgba=Ks),bt.oes_texture_float&&(Qi.float32=Qi.float=oa),bt.oes_texture_half_float&&(Qi.float16=Qi["half float"]=zs),bt.webgl_depth_texture&&(e(ji,{depth:il,"depth stencil":As}),e(Qi,{uint16:Hl,uint32:ac,"depth stencil":us})),bt.webgl_compressed_texture_s3tc&&e(oi,{"rgb s3tc dxt1":Io,"rgba s3tc dxt1":ls,"rgba s3tc dxt3":Yl,"rgba s3tc dxt5":Su}),bt.webgl_compressed_texture_atc&&e(oi,{"rgb atc":nc,"rgba atc explicit alpha":bs,"rgba atc interpolated alpha":Rn}),bt.webgl_compressed_texture_pvrtc&&e(oi,{"rgb pvrtc 4bppv1":_a,"rgb pvrtc 2bppv1":Vu,"rgba pvrtc 4bppv1":ql,"rgba pvrtc 2bppv1":xo}),bt.webgl_compressed_texture_etc1&&(oi["rgb etc1"]=Kl);var Tr=Array.prototype.slice.call(Me.getParameter(ki));Object.keys(oi).forEach(function(ne){var be=oi[ne];Tr.indexOf(be)>=0&&(ji[ne]=be)});var Zr=Object.keys(ji);Ot.textureFormats=Zr;var yi=[];Object.keys(ji).forEach(function(ne){var be=ji[ne];yi[be]=ne});var Ii=[];Object.keys(Qi).forEach(function(ne){var be=Qi[ne];Ii[be]=ne});var ui=[];Object.keys(qi).forEach(function(ne){var be=qi[ne];ui[be]=ne});var nn=[];Object.keys(Si).forEach(function(ne){var be=Si[ne];nn[be]=ne});var Xi=[];Object.keys(Ni).forEach(function(ne){var be=Ni[ne];Xi[be]=ne});var qn=Zr.reduce(function(ne,be){var Be=ji[be];return Be===po||Be===_o||Be===po||Be===Lo||Be===il||Be===As||bt.ext_srgb&&(Be===cl||Be===Ks)?ne[Be]=Be:Be===Ds||be.indexOf("rgba")>=0?ne[Be]=Ma:ne[Be]=No,ne},{});function fi(){this.internalformat=Ma,this.format=Ma,this.type=Ns,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=lc,this.width=0,this.height=0,this.channels=0}function si(ne,be){ne.internalformat=be.internalformat,ne.format=be.format,ne.type=be.type,ne.compressed=be.compressed,ne.premultiplyAlpha=be.premultiplyAlpha,ne.flipY=be.flipY,ne.unpackAlignment=be.unpackAlignment,ne.colorSpace=be.colorSpace,ne.width=be.width,ne.height=be.height,ne.channels=be.channels}function mn(ne,be){if(!(typeof be!="object"||!be)){if("premultiplyAlpha"in be&&(ne.premultiplyAlpha=be.premultiplyAlpha),"flipY"in be&&(ne.flipY=be.flipY),"alignment"in be&&(ne.unpackAlignment=be.alignment),"colorSpace"in be&&(ne.colorSpace=Vn[be.colorSpace]),"type"in be){var Be=be.type;ne.type=Qi[Be]}var ht=ne.width,Yt=ne.height,cr=ne.channels,Nt=!1;"shape"in be?(ht=be.shape[0],Yt=be.shape[1],be.shape.length===3&&(cr=be.shape[2],Nt=!0)):("radius"in be&&(ht=Yt=be.radius),"width"in be&&(ht=be.width),"height"in be&&(Yt=be.height),"channels"in be&&(cr=be.channels,Nt=!0)),ne.width=ht|0,ne.height=Yt|0,ne.channels=cr|0;var Ne=!1;if("format"in be){var $e=be.format,ot=ne.internalformat=ji[$e];ne.format=qn[ot],$e in Qi&&("type"in be||(ne.type=Qi[$e])),$e in oi&&(ne.compressed=!0),Ne=!0}!Nt&&Ne?ne.channels=Go[ne.format]:Nt&&!Ne&&ne.channels!==Hs[ne.format]&&(ne.format=ne.internalformat=Hs[ne.channels])}}function Ji(ne){Me.pixelStorei(Gf,ne.flipY),Me.pixelStorei($l,ne.premultiplyAlpha),Me.pixelStorei(fl,ne.colorSpace),Me.pixelStorei(nf,ne.unpackAlignment)}function Ui(){fi.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Bi(ne,be){var Be=null;if(_f(be)?Be=be:be&&(mn(ne,be),"x"in be&&(ne.xOffset=be.x|0),"y"in be&&(ne.yOffset=be.y|0),_f(be.data)&&(Be=be.data)),be.copy){var ht=Vr.viewportWidth,Yt=Vr.viewportHeight;ne.width=ne.width||ht-ne.xOffset,ne.height=ne.height||Yt-ne.yOffset,ne.needsCopy=!0}else if(!Be)ne.width=ne.width||1,ne.height=ne.height||1,ne.channels=ne.channels||4;else if(qr(Be))ne.channels=ne.channels||4,ne.data=Be,!("type"in be)&&ne.type===Ns&&(ne.type=Yc(Be));else if(af(Be))ne.channels=ne.channels||4,eh(ne,Be),ne.alignment=1,ne.needsFree=!0;else if(jr(Be)){var cr=Be.data;!Array.isArray(cr)&&ne.type===Ns&&(ne.type=Yc(cr));var Nt=Be.shape,Ne=Be.stride,$e,ot,It,Bt,Ft,Ut;Nt.length===3?(It=Nt[2],Ut=Ne[2]):(It=1,Ut=1),$e=Nt[0],ot=Nt[1],Bt=Ne[0],Ft=Ne[1],ne.alignment=1,ne.width=$e,ne.height=ot,ne.channels=It,ne.format=ne.internalformat=Hs[It],ne.needsFree=!0,jf(ne,cr,Bt,Ft,Ut,Be.offset)}else if(Hf(Be)||Ic(Be)||yf(Be))Hf(Be)||Ic(Be)?ne.element=Be:ne.element=Be.canvas,ne.width=ne.element.width,ne.height=ne.element.height,ne.channels=4;else if(Bl(Be))ne.element=Be,ne.width=Be.width,ne.height=Be.height,ne.channels=4;else if(Ah(Be))ne.element=Be,ne.width=Be.naturalWidth,ne.height=Be.naturalHeight,ne.channels=4;else if(Qf(Be))ne.element=Be,ne.width=Be.videoWidth,ne.height=Be.videoHeight,ne.channels=4;else if(Hu(Be)){var zt=ne.width||Be[0].length,_t=ne.height||Be.length,Dt=ne.channels;En(Be[0][0])?Dt=Dt||Be[0][0].length:Dt=Dt||1;for(var vt=Ge.shape(Be),lr=1,yr=0;yr>=Yt,Be.height>>=Yt,Bi(Be,ht[Yt]),ne.mipmask|=1<=0&&!("faces"in be)&&(ne.genMipmaps=!0)}if("mag"in be){var ht=be.mag;ne.magFilter=qi[ht]}var Yt=ne.wrapS,cr=ne.wrapT;if("wrap"in be){var Nt=be.wrap;typeof Nt=="string"?Yt=cr=Ni[Nt]:Array.isArray(Nt)&&(Yt=Ni[Nt[0]],cr=Ni[Nt[1]])}else{if("wrapS"in be){var Ne=be.wrapS;Yt=Ni[Ne]}if("wrapT"in be){var $e=be.wrapT;cr=Ni[$e]}}if(ne.wrapS=Yt,ne.wrapT=cr,"anisotropic"in be){var ot=be.anisotropic;ne.anisotropic=be.anisotropic}if("mipmap"in be){var It=!1;switch(typeof be.mipmap){case"string":ne.mipmapHint=vi[be.mipmap],ne.genMipmaps=!0,It=!0;break;case"boolean":It=ne.genMipmaps=be.mipmap;break;case"object":ne.genMipmaps=!1,It=!0;break;default:}It&&!("min"in be)&&(ne.minFilter=Jl)}}function al(ne,be){Me.texParameteri(be,Vf,ne.minFilter),Me.texParameteri(be,rf,ne.magFilter),Me.texParameteri(be,qo,ne.wrapS),Me.texParameteri(be,Oo,ne.wrapT),bt.ext_texture_filter_anisotropic&&Me.texParameteri(be,cs,ne.anisotropic),ne.genMipmaps&&(Me.hint(Cf,ne.mipmapHint),Me.generateMipmap(be))}var Vl=0,ss={},Vs=Ot.maxTextureUnits,Ys=Array(Vs).map(function(){return null});function wa(ne){fi.call(this),this.mipmask=0,this.internalformat=Ma,this.id=Vl++,this.refCount=1,this.target=ne,this.texture=Me.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new zo,Nr.profile&&(this.stats={size:0})}function ol(ne){Me.activeTexture(Fu),Me.bindTexture(ne.target,ne.texture)}function io(){var ne=Ys[0];ne?Me.bindTexture(ne.target,ne.texture):Me.bindTexture(_n,null)}function Y(ne){var be=ne.texture,Be=ne.unit,ht=ne.target;Be>=0&&(Me.activeTexture(Fu+Be),Me.bindTexture(ht,null),Ys[Be]=null),Me.deleteTexture(be),ne.texture=null,ne.params=null,ne.pixels=null,ne.refCount=0,delete ss[ne.id],Or.textureCount--}e(wa.prototype,{bind:function(){var ne=this;ne.bindCount+=1;var be=ne.unit;if(be<0){for(var Be=0;Be0)continue;ht.unit=-1}Ys[Be]=ne,be=Be;break}be>=Vs,Nr.profile&&Or.maxTextureUnits>Ft)-It,Ut.height=Ut.height||(Be.height>>Ft)-Bt,ol(Be),Nn(Ut,_n,It,Bt,Ft),io(),Cn(Ut),ht}function cr(Nt,Ne){var $e=Nt|0,ot=Ne|0||$e;if($e===Be.width&&ot===Be.height)return ht;ht.width=Be.width=$e,ht.height=Be.height=ot,ol(Be);for(var It=0;Be.mipmask>>It;++It){var Bt=$e>>It,Ft=ot>>It;if(!Bt||!Ft)break;Me.texImage2D(_n,It,Be.format,Bt,Ft,0,Be.format,Be.type,null)}return io(),Nr.profile&&(Be.stats.size=cc(Be.internalformat,Be.type,$e,ot,!1,!1)),ht}return ht(ne,be),ht.subimage=Yt,ht.resize=cr,ht._reglType="texture2d",ht._texture=Be,Nr.profile&&(ht.stats=Be.stats),ht.destroy=function(){Be.decRef()},ht}function J(ne,be,Be,ht,Yt,cr){var Nt=new wa(ya);ss[Nt.id]=Nt,Or.cubeCount++;var Ne=new Array(6);function $e(Bt,Ft,Ut,zt,_t,Dt){var vt,lr=Nt.texInfo;for(zo.call(lr),vt=0;vt<6;++vt)Ne[vt]=Va();if(typeof Bt=="number"||!Bt){var yr=Bt|0||1;for(vt=0;vt<6;++vt)sa(Ne[vt],yr,yr)}else if(typeof Bt=="object")if(Ft)ba(Ne[0],Bt),ba(Ne[1],Ft),ba(Ne[2],Ut),ba(Ne[3],zt),ba(Ne[4],_t),ba(Ne[5],Dt);else if(Qs(lr,Bt),mn(Nt,Bt),"faces"in Bt){var Br=Bt.faces;for(vt=0;vt<6;++vt)si(Ne[vt],Nt),ba(Ne[vt],Br[vt])}else for(vt=0;vt<6;++vt)ba(Ne[vt],Bt);for(si(Nt,Ne[0]),lr.genMipmaps?Nt.mipmask=(Ne[0].width<<1)-1:Nt.mipmask=Ne[0].mipmask,Nt.internalformat=Ne[0].internalformat,$e.width=Ne[0].width,$e.height=Ne[0].height,ol(Nt),vt=0;vt<6;++vt)is(Ne[vt],ea+vt);for(al(lr,ya),io(),Nr.profile&&(Nt.stats.size=cc(Nt.internalformat,Nt.type,$e.width,$e.height,lr.genMipmaps,!0)),$e.format=yi[Nt.internalformat],$e.type=Ii[Nt.type],$e.mag=ui[lr.magFilter],$e.min=nn[lr.minFilter],$e.wrapS=Xi[lr.wrapS],$e.wrapT=Xi[lr.wrapT],vt=0;vt<6;++vt)Ml(Ne[vt]);return $e}function ot(Bt,Ft,Ut,zt,_t){var Dt=Ut|0,vt=zt|0,lr=_t|0,yr=Ki();return si(yr,Nt),yr.width=0,yr.height=0,Bi(yr,Ft),yr.width=yr.width||(Nt.width>>lr)-Dt,yr.height=yr.height||(Nt.height>>lr)-vt,ol(Nt),Nn(yr,ea+Bt,Dt,vt,lr),io(),Cn(yr),$e}function It(Bt){var Ft=Bt|0;if(Ft!==Nt.width){$e.width=Nt.width=Ft,$e.height=Nt.height=Ft,ol(Nt);for(var Ut=0;Ut<6;++Ut)for(var zt=0;Nt.mipmask>>zt;++zt)Me.texImage2D(ea+Ut,zt,Nt.format,Ft>>zt,Ft>>zt,0,Nt.format,Nt.type,null);return io(),Nr.profile&&(Nt.stats.size=cc(Nt.internalformat,Nt.type,$e.width,$e.height,!1,!0)),$e}}return $e(ne,be,Be,ht,Yt,cr),$e.subimage=ot,$e.resize=It,$e._reglType="textureCube",$e._texture=Nt,Nr.profile&&($e.stats=Nt.stats),$e.destroy=function(){Nt.decRef()},$e}function O(){for(var ne=0;ne>ht,Be.height>>ht,0,Be.internalformat,Be.type,null);else for(var Yt=0;Yt<6;++Yt)Me.texImage2D(ea+Yt,ht,Be.internalformat,Be.width>>ht,Be.height>>ht,0,Be.internalformat,Be.type,null);al(Be.texInfo,Be.target)})}function de(){for(var ne=0;ne=0?Ml=!0:Ni.indexOf(zo)>=0&&(Ml=!1))),("depthTexture"in wa||"depthStencilTexture"in wa)&&(Ys=!!(wa.depthTexture||wa.depthStencilTexture)),"depth"in wa&&(typeof wa.depth=="boolean"?is=wa.depth:(Vl=wa.depth,Zs=!1)),"stencil"in wa&&(typeof wa.stencil=="boolean"?Zs=wa.stencil:(ss=wa.stencil,is=!1)),"depthStencil"in wa&&(typeof wa.depthStencil=="boolean"?is=Zs=wa.depthStencil:(Vs=wa.depthStencil,is=!1,Zs=!1))}var io=null,Y=null,D=null,J=null;if(Array.isArray(Va))io=Va.map(oi);else if(Va)io=[oi(Va)];else for(io=new Array(al),ia=0;ia0&&(Cn.depth=Bi[0].depth,Cn.stencil=Bi[0].stencil,Cn.depthStencil=Bi[0].depthStencil),Bi[Ki]?Bi[Ki](Cn):Bi[Ki]=si(Cn)}return e(pn,{width:ia,height:ia,color:zo})}function Nn(aa){var Ki,Cn=aa|0;if(Cn===pn.width)return pn;var ia=pn.color;for(Ki=0;Ki=ia.byteLength?sa.subdata(ia):(sa.destroy(),si.buffers[aa]=null)),si.buffers[aa]||(sa=si.buffers[aa]=Vr.create(Ki,If,!1,!0)),Cn.buffer=Vr.getBuffer(sa),Cn.size=Cn.buffer.dimension|0,Cn.normalized=!1,Cn.type=Cn.buffer.dtype,Cn.offset=0,Cn.stride=0,Cn.divisor=0,Cn.state=1,pn[aa]=1}else Vr.getBuffer(Ki)?(Cn.buffer=Vr.getBuffer(Ki),Cn.size=Cn.buffer.dimension|0,Cn.normalized=!1,Cn.type=Cn.buffer.dtype,Cn.offset=0,Cn.stride=0,Cn.divisor=0,Cn.state=1):Vr.getBuffer(Ki.buffer)?(Cn.buffer=Vr.getBuffer(Ki.buffer),Cn.size=(+Ki.size||Cn.buffer.dimension)|0,Cn.normalized=!!Ki.normalized||!1,"type"in Ki?Cn.type=un[Ki.type]:Cn.type=Cn.buffer.dtype,Cn.offset=(Ki.offset||0)|0,Cn.stride=(Ki.stride||0)|0,Cn.divisor=(Ki.divisor||0)|0,Cn.state=1):"x"in Ki&&(Cn.x=+Ki.x||0,Cn.y=+Ki.y||0,Cn.z=+Ki.z||0,Cn.w=+Ki.w||0,Cn.state=2)}for(var ba=0;ba1)for(var Ji=0;JiTr&&(Tr=Zr.stats.uniformsCount)}),Tr},Ot.getMaxAttributesCount=function(){var Tr=0;return Si.forEach(function(Zr){Zr.stats.attributesCount>Tr&&(Tr=Zr.stats.attributesCount)}),Tr});function oi(){Vr={},Or={};for(var Tr=0;Tr16&&(Ot=Yi(Ot,Me.length*8));for(var Lr=Array(16),Vr=Array(16),Or=0;Or<16;Or++)Lr[Or]=Ot[Or]^909522486,Vr[Or]=Ot[Or]^1549556828;var Nr=Yi(Lr.concat(Bc(bt)),512+bt.length*8);return kt(Yi(Vr.concat(Nr),768))}function vu(Me){for(var bt=ah?"0123456789ABCDEF":"0123456789abcdef",Ot="",Lr,Vr=0;Vr>>4&15)+bt.charAt(Lr&15);return Ot}function Oc(Me){for(var bt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ot="",Lr=Me.length,Vr=0;VrMe.length*8?Ot+=Zu:Ot+=bt.charAt(Or>>>6*(3-Nr)&63);return Ot}function cf(Me,bt){var Ot=bt.length,Lr=Array(),Vr,Or,Nr,vi,Ni=Array(Math.ceil(Me.length/2));for(Vr=0;Vr0;){for(vi=Array(),Nr=0,Vr=0;Vr0||Or>0)&&(vi[vi.length]=Or);Lr[Lr.length]=Nr,Ni=vi}var qi="";for(Vr=Lr.length-1;Vr>=0;Vr--)qi+=bt.charAt(Lr[Vr]);var Si=Math.ceil(Me.length*8/(Math.log(bt.length)/Math.log(2)));for(Vr=qi.length;Vr>>6&31,128|Lr&63):Lr<=65535?bt+=String.fromCharCode(224|Lr>>>12&15,128|Lr>>>6&63,128|Lr&63):Lr<=2097151&&(bt+=String.fromCharCode(240|Lr>>>18&7,128|Lr>>>12&63,128|Lr>>>6&63,128|Lr&63));return bt}function Bc(Me){for(var bt=Array(Me.length>>2),Ot=0;Ot>5]|=(Me.charCodeAt(Ot/8)&255)<<24-Ot%32;return bt}function kt(Me){for(var bt="",Ot=0;Ot>5]>>>24-Ot%32&255);return bt}function Zt(Me,bt){return Me>>>bt|Me<<32-bt}function Mr(Me,bt){return Me>>>bt}function xr(Me,bt,Ot){return Me&bt^~Me&Ot}function Kr(Me,bt,Ot){return Me&bt^Me&Ot^bt&Ot}function Mi(Me){return Zt(Me,2)^Zt(Me,13)^Zt(Me,22)}function Wi(Me){return Zt(Me,6)^Zt(Me,11)^Zt(Me,25)}function dn(Me){return Zt(Me,7)^Zt(Me,18)^Mr(Me,3)}function wn(Me){return Zt(Me,17)^Zt(Me,19)^Mr(Me,10)}var On=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function Yi(Me,bt){var Ot=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Lr=new Array(64),Vr,Or,Nr,vi,Ni,qi,Si,Vn,Qi,ji,oi,Tr;for(Me[bt>>5]|=128<<24-bt%32,Me[(bt+64>>9<<4)+15]=bt,Qi=0;Qi>16)+(bt>>16)+(Ot>>16);return Lr<<16|Ot&65535}function an(Me){return Array.prototype.slice.call(Me)}function Fi(Me){return an(Me).join("")}function ta(Me){var bt=Me&&Me.cache,Ot=0,Lr=[],Vr=[],Or=[];function Nr(oi,Tr){var Zr=Tr&&Tr.stable;if(!Zr){for(var yi=0;yi0&&(oi.push(Ii,"="),oi.push.apply(oi,an(arguments)),oi.push(";")),Ii}return e(Tr,{def:yi,toString:function(){return Fi([Zr.length>0?"var "+Zr.join(",")+";":"",Fi(oi)])}})}function Ni(){var oi=vi(),Tr=vi(),Zr=oi.toString,yi=Tr.toString;function Ii(ui,nn){Tr(ui,nn,"=",oi.def(ui,nn),";")}return e(function(){oi.apply(oi,an(arguments))},{def:oi.def,entry:oi,exit:Tr,save:Ii,set:function(ui,nn,Xi){Ii(ui,nn),oi(ui,nn,"=",Xi,";")},toString:function(){return Zr()+yi()}})}function qi(){var oi=Fi(arguments),Tr=Ni(),Zr=Ni(),yi=Tr.toString,Ii=Zr.toString;return e(Tr,{then:function(){return Tr.apply(Tr,an(arguments)),this},else:function(){return Zr.apply(Zr,an(arguments)),this},toString:function(){var ui=Ii();return ui&&(ui="else{"+ui+"}"),Fi(["if(",oi,"){",yi(),"}",ui])}})}var Si=vi(),Vn={};function Qi(oi,Tr){var Zr=[];function yi(){var qn="a"+Zr.length;return Zr.push(qn),qn}Tr=Tr||0;for(var Ii=0;Ii":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},ai={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},gi={cw:Te,ccw:Ne};function Ii(Me){return Array.isArray(Me)||Br(Me)||Vr(Me)}function Si(Me){return Me.sort(function(bt,zt){return bt===ee?-1:zt===ee?1:bt=1,Rr>=2,bt)}else if(zt===Zo){var jr=Me.data;return new ei(jr.thisDep,jr.contextDep,jr.propDep,bt)}else{if(zt===Ss)return new ei(!1,!1,!1,bt);if(zt===as){for(var Nr=!1,Gr=!1,mi=!1,Ui=0;Ui=1&&(Gr=!0),Ei>=2&&(mi=!0)}else qi.type===Zo&&(Nr=Nr||qi.data.thisDep,Gr=Gr||qi.data.contextDep,mi=mi||qi.data.propDep)}return new ei(Nr,Gr,mi,bt)}else return new ei(zt===bo,zt===Ka,zt===Dn,bt)}}var ia=new ei(!1,!1,!1,function(){});function Ea(Me,bt,zt,Rr,jr,Nr,Gr,mi,Ui,qi,Ei,Hn,en,Wi,si,Mr){var Yr=qi.Record,xi={add:32774,subtract:32778,"reverse subtract":32779};zt.ext_blend_minmax&&(xi.min=He,xi.max=Ye);var Ri=zt.angle_instanced_arrays,ci=zt.webgl_draw_buffers,an=zt.oes_vertex_array_object,Zi={dirty:!0,profile:Mr.profile},Bn={},hi=[],li={},mn={};function Ji(Ve){return Ve.replace(".","_")}function Vi(Ve,Qe,at){var Ct=Ji(Ve);hi.push(Ve),Bn[Ct]=Zi[Ct]=!!at,li[Ct]=Qe}function Ni(Ve,Qe,at){var Ct=Ji(Ve);hi.push(Ve),Array.isArray(at)?(Zi[Ct]=at.slice(),Bn[Ct]=at.slice()):Zi[Ct]=Bn[Ct]=at,mn[Ct]=Qe}function pn(Ve){return!!isNaN(Ve)}Vi(ws,Pi),Vi(Ho,ni),Ni(ml,"blendColor",[0,0,0,0]),Ni(Ws,"blendEquationSeparate",[yr,yr]),Ni(Ls,"blendFuncSeparate",[gr,jt,gr,jt]),Vi(va,ln,!0),Ni(no,"depthFunc",Hr),Ni(ys,"depthRange",[0,1]),Ni(rs,"depthMask",!0),Ni(Ql,Ql,[!0,!0,!0,!0]),Vi(Cu,Wr),Ni(Yu,"cullFace",se),Ni(Nc,Nc,Ne),Ni(pu,pu,1),Vi(Uc,Kn),Ni(xu,"polygonOffset",[0,0]),Vi(Ac,Aa),Vi(Ua,fa),Ni(oo,"sampleCoverage",[1,!1]),Vi(Vc,cn),Ni(hc,"stencilMask",-1),Ni(Ku,"stencilFunc",[kt,0,-1]),Ni(ue,"stencilOpSeparate",[X,nt,nt,nt]),Ni(w,"stencilOpSeparate",[se,nt,nt,nt]),Vi(B,Cn),Ni(Q,"scissor",[0,0,Me.drawingBufferWidth,Me.drawingBufferHeight]),Ni(ee,ee,[0,0,Me.drawingBufferWidth,Me.drawingBufferHeight]);var Vn={gl:Me,context:en,strings:bt,next:Bn,current:Zi,draw:Hn,elements:Nr,buffer:jr,shader:Ei,attributes:qi.state,vao:qi,uniforms:Ui,framebuffer:mi,extensions:zt,timer:Wi,isBufferArgs:Ii},na={primTypes:Sn,compareFuncs:Zr,blendFuncs:bi,blendEquations:xi,stencilOps:ai,glTypes:ji,orientationType:gi};ci&&(na.backBuffer=[se],na.drawBuffer=M(Rr.maxDrawbuffers,function(Ve){return Ve===0?[0]:M(Ve,function(Qe){return _i+Qe})}));var Ki=0;function kn(){var Ve=Qn({cache:si}),Qe=Ve.link,at=Ve.global;Ve.id=Ki++,Ve.batchId="0";var Ct=Qe(Vn),Ot=Ve.shared={props:"a0"};Object.keys(Vn).forEach(function(Pt){Ot[Pt]=at.def(Ct,".",Pt)});var Rt=Ve.next={},Bt=Ve.current={};Object.keys(mn).forEach(function(Pt){Array.isArray(Zi[Pt])&&(Rt[Pt]=at.def(Ot.next,".",Pt),Bt[Pt]=at.def(Ot.current,".",Pt))});var Dt=Ve.constants={};Object.keys(na).forEach(function(Pt){Dt[Pt]=at.def(JSON.stringify(na[Pt]))}),Ve.invoke=function(Pt,ht){switch(ht.type){case Yn:var ur=["this",Ot.context,Ot.props,Ve.batchId];return Pt.def(Qe(ht.data),".call(",ur.slice(0,Math.max(ht.data.length+1,4)),")");case Dn:return Pt.def(Ot.props,ht.data);case Ka:return Pt.def(Ot.context,ht.data);case bo:return Pt.def("this",ht.data);case Zo:return ht.data.append(Ve,Pt),ht.data.ref;case Ss:return ht.data.toString();case as:return ht.data.map(function(br){return Ve.invoke(Pt,br)})}},Ve.attribCache={};var yt={};return Ve.scopeAttrib=function(Pt){var ht=bt.id(Pt);if(ht in yt)return yt[ht];var ur=qi.scope[ht];ur||(ur=qi.scope[ht]=new Yr);var br=yt[ht]=Qe(ur);return br},Ve}function ta(Ve){var Qe=Ve.static,at=Ve.dynamic,Ct;if(le in Qe){var Ot=!!Qe[le];Ct=En(function(Bt,Dt){return Ot}),Ct.enable=Ot}else if(le in at){var Rt=at[le];Ct=Un(Rt,function(Bt,Dt){return Bt.invoke(Dt,Rt)})}return Ct}function oa(Ve,Qe){var at=Ve.static,Ct=Ve.dynamic;if(Oe in at){var Ot=at[Oe];return Ot?(Ot=mi.getFramebuffer(Ot),En(function(Bt,Dt){var yt=Bt.link(Ot),Pt=Bt.shared;Dt.set(Pt.framebuffer,".next",yt);var ht=Pt.context;return Dt.set(ht,"."+qe,yt+".width"),Dt.set(ht,"."+et,yt+".height"),yt})):En(function(Bt,Dt){var yt=Bt.shared;Dt.set(yt.framebuffer,".next","null");var Pt=yt.context;return Dt.set(Pt,"."+qe,Pt+"."+Ht),Dt.set(Pt,"."+et,Pt+"."+tr),"null"})}else if(Oe in Ct){var Rt=Ct[Oe];return Un(Rt,function(Bt,Dt){var yt=Bt.invoke(Dt,Rt),Pt=Bt.shared,ht=Pt.framebuffer,ur=Dt.def(ht,".getFramebuffer(",yt,")");Dt.set(ht,".next",ur);var br=Pt.context;return Dt.set(br,"."+qe,ur+"?"+ur+".width:"+br+"."+Ht),Dt.set(br,"."+et,ur+"?"+ur+".height:"+br+"."+tr),ur})}else return null}function ba(Ve,Qe,at){var Ct=Ve.static,Ot=Ve.dynamic;function Rt(yt){if(yt in Ct){var Pt=Ct[yt],ht=!0,ur=Pt.x|0,br=Pt.y|0,Ur,Di;return"width"in Pt?Ur=Pt.width|0:ht=!1,"height"in Pt?Di=Pt.height|0:ht=!1,new ei(!ht&&Qe&&Qe.thisDep,!ht&&Qe&&Qe.contextDep,!ht&&Qe&&Qe.propDep,function(gn,rn){var Ci=gn.shared.context,Bi=Ur;"width"in Pt||(Bi=rn.def(Ci,".",qe,"-",ur));var Gi=Di;return"height"in Pt||(Gi=rn.def(Ci,".",et,"-",br)),[ur,br,Bi,Gi]})}else if(yt in Ot){var fi=Ot[yt],Ti=Un(fi,function(gn,rn){var Ci=gn.invoke(rn,fi),Bi=gn.shared.context,Gi=rn.def(Ci,".x|0"),sn=rn.def(Ci,".y|0"),zn=rn.def('"width" in ',Ci,"?",Ci,".width|0:","(",Bi,".",qe,"-",Gi,")"),Ja=rn.def('"height" in ',Ci,"?",Ci,".height|0:","(",Bi,".",et,"-",sn,")");return[Gi,sn,zn,Ja]});return Qe&&(Ti.thisDep=Ti.thisDep||Qe.thisDep,Ti.contextDep=Ti.contextDep||Qe.contextDep,Ti.propDep=Ti.propDep||Qe.propDep),Ti}else return Qe?new ei(Qe.thisDep,Qe.contextDep,Qe.propDep,function(gn,rn){var Ci=gn.shared.context;return[0,0,rn.def(Ci,".",qe),rn.def(Ci,".",et)]}):null}var Bt=Rt(ee);if(Bt){var Dt=Bt;Bt=new ei(Bt.thisDep,Bt.contextDep,Bt.propDep,function(yt,Pt){var ht=Dt.append(yt,Pt),ur=yt.shared.context;return Pt.set(ur,"."+Xe,ht[2]),Pt.set(ur,"."+it,ht[3]),ht})}return{viewport:Bt,scissor_box:Rt(Q)}}function is(Ve,Qe){var at=Ve.static,Ct=typeof at[st]=="string"&&typeof at[Ze]=="string";if(Ct){if(Object.keys(Qe.dynamic).length>0)return null;var Ot=Qe.static,Rt=Object.keys(Ot);if(Rt.length>0&&typeof Ot[Rt[0]]=="number"){for(var Bt=[],Dt=0;Dt"+Gi+"?"+ht+".constant["+Gi+"]:0;"}).join(""),"}}else{","if(",Ur,"(",ht,".buffer)){",gn,"=",Di,".createStream(",Sr,",",ht,".buffer);","}else{",gn,"=",Di,".getBuffer(",ht,".buffer);","}",rn,'="type" in ',ht,"?",br.glTypes,"[",ht,".type]:",gn,".dtype;",fi.normalized,"=!!",ht,".normalized;");function Ci(Bi){Pt(fi[Bi],"=",ht,".",Bi,"|0;")}return Ci("size"),Ci("offset"),Ci("stride"),Ci("divisor"),Pt("}}"),Pt.exit("if(",fi.isStream,"){",Di,".destroyStream(",gn,");","}"),fi}Ot[Rt]=Un(Bt,Dt)}),Ot}function al(Ve){var Qe=Ve.static,at=Ve.dynamic,Ct={};return Object.keys(Qe).forEach(function(Ot){var Rt=Qe[Ot];Ct[Ot]=En(function(Bt,Dt){return typeof Rt=="number"||typeof Rt=="boolean"?""+Rt:Bt.link(Rt)})}),Object.keys(at).forEach(function(Ot){var Rt=at[Ot];Ct[Ot]=Un(Rt,function(Bt,Dt){return Bt.invoke(Dt,Rt)})}),Ct}function Vl(Ve,Qe,at,Ct,Ot){var Rt=Ve.static,Bt=Ve.dynamic,Dt=is(Ve,Qe),yt=oa(Ve,Ot),Pt=ba(Ve,yt,Ot),ht=Va(Ve,Ot),ur=Ml(Ve,Ot),br=Zs(Ve,Ot,Dt);function Ur(Ci){var Bi=Pt[Ci];Bi&&(ur[Ci]=Bi)}Ur(ee),Ur(Ji(Q));var Di=Object.keys(ur).length>0,fi={framebuffer:yt,draw:ht,shader:br,state:ur,dirty:Di,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(fi.profile=ta(Ve,Ot),fi.uniforms=zo(at,Ot),fi.drawVAO=fi.scopeVAO=ht.vao,!fi.drawVAO&&br.program&&!Dt&&zt.angle_instanced_arrays&&ht.static.elements){var Ti=!0,gn=br.program.attributes.map(function(Ci){var Bi=Qe.static[Ci];return Ti=Ti&&!!Bi,Bi});if(Ti&&gn.length>0){var rn=qi.getVAO(qi.createVAO({attributes:gn,elements:ht.static.elements}));fi.drawVAO=new ei(null,null,null,function(Ci,Bi){return Ci.link(rn)}),fi.useVAO=!0}}return Dt?fi.useVAO=!0:fi.attributes=Qs(Qe,Ot),fi.context=al(Ct,Ot),fi}function ss(Ve,Qe,at){var Ct=Ve.shared,Ot=Ct.context,Rt=Ve.scope();Object.keys(at).forEach(function(Bt){Qe.save(Ot,"."+Bt);var Dt=at[Bt],yt=Dt.append(Ve,Qe);Array.isArray(yt)?Rt(Ot,".",Bt,"=[",yt.join(),"];"):Rt(Ot,".",Bt,"=",yt,";")}),Qe(Rt)}function Vs(Ve,Qe,at,Ct){var Ot=Ve.shared,Rt=Ot.gl,Bt=Ot.framebuffer,Dt;ci&&(Dt=Qe.def(Ot.extensions,".webgl_draw_buffers"));var yt=Ve.constants,Pt=yt.drawBuffer,ht=yt.backBuffer,ur;at?ur=at.append(Ve,Qe):ur=Qe.def(Bt,".next"),Ct||Qe("if(",ur,"!==",Bt,".cur){"),Qe("if(",ur,"){",Rt,".bindFramebuffer(",qr,",",ur,".framebuffer);"),ci&&Qe(Dt,".drawBuffersWEBGL(",Pt,"[",ur,".colorAttachments.length]);"),Qe("}else{",Rt,".bindFramebuffer(",qr,",null);"),ci&&Qe(Dt,".drawBuffersWEBGL(",ht,");"),Qe("}",Bt,".cur=",ur,";"),Ct||Qe("}")}function Ys(Ve,Qe,at){var Ct=Ve.shared,Ot=Ct.gl,Rt=Ve.current,Bt=Ve.next,Dt=Ct.current,yt=Ct.next,Pt=Ve.cond(Dt,".dirty");hi.forEach(function(ht){var ur=Ji(ht);if(!(ur in at.state)){var br,Ur;if(ur in Bt){br=Bt[ur],Ur=Rt[ur];var Di=M(Zi[ur].length,function(Ti){return Pt.def(br,"[",Ti,"]")});Pt(Ve.cond(Di.map(function(Ti,gn){return Ti+"!=="+Ur+"["+gn+"]"}).join("||")).then(Ot,".",mn[ur],"(",Di,");",Di.map(function(Ti,gn){return Ur+"["+gn+"]="+Ti}).join(";"),";"))}else{br=Pt.def(yt,".",ur);var fi=Ve.cond(br,"!==",Dt,".",ur);Pt(fi),ur in li?fi(Ve.cond(br).then(Ot,".enable(",li[ur],");").else(Ot,".disable(",li[ur],");"),Dt,".",ur,"=",br,";"):fi(Ot,".",mn[ur],"(",br,");",Dt,".",ur,"=",br,";")}}}),Object.keys(at.state).length===0&&Pt(Dt,".dirty=false;"),Qe(Pt)}function wa(Ve,Qe,at,Ct){var Ot=Ve.shared,Rt=Ve.current,Bt=Ot.current,Dt=Ot.gl,yt;Si(Object.keys(at)).forEach(function(Pt){var ht=at[Pt];if(!(Ct&&!Ct(ht))){var ur=ht.append(Ve,Qe);if(li[Pt]){var br=li[Pt];Ln(ht)?(yt=Ve.link(ur,{stable:!0}),Qe(Ve.cond(yt).then(Dt,".enable(",br,");").else(Dt,".disable(",br,");")),Qe(Bt,".",Pt,"=",yt,";")):(Qe(Ve.cond(ur).then(Dt,".enable(",br,");").else(Dt,".disable(",br,");")),Qe(Bt,".",Pt,"=",ur,";"))}else if(Mn(ur)){var Ur=Rt[Pt];Qe(Dt,".",mn[Pt],"(",ur,");",ur.map(function(Di,fi){return Ur+"["+fi+"]="+Di}).join(";"),";")}else Ln(ht)?(yt=Ve.link(ur,{stable:!0}),Qe(Dt,".",mn[Pt],"(",yt,");",Bt,".",Pt,"=",yt,";")):Qe(Dt,".",mn[Pt],"(",ur,");",Bt,".",Pt,"=",ur,";")}})}function ol(Ve,Qe){Ri&&(Ve.instancing=Qe.def(Ve.shared.extensions,".angle_instanced_arrays"))}function io(Ve,Qe,at,Ct,Ot){var Rt=Ve.shared,Bt=Ve.stats,Dt=Rt.current,yt=Rt.timer,Pt=at.profile;function ht(){return typeof performance=="undefined"?"Date.now()":"performance.now()"}var ur,br;function Ur(Ci){ur=Qe.def(),Ci(ur,"=",ht(),";"),typeof Ot=="string"?Ci(Bt,".count+=",Ot,";"):Ci(Bt,".count++;"),Wi&&(Ct?(br=Qe.def(),Ci(br,"=",yt,".getNumPendingQueries();")):Ci(yt,".beginQuery(",Bt,");"))}function Di(Ci){Ci(Bt,".cpuTime+=",ht(),"-",ur,";"),Wi&&(Ct?Ci(yt,".pushScopeStats(",br,",",yt,".getNumPendingQueries(),",Bt,");"):Ci(yt,".endQuery();"))}function fi(Ci){var Bi=Qe.def(Dt,".profile");Qe(Dt,".profile=",Ci,";"),Qe.exit(Dt,".profile=",Bi,";")}var Ti;if(Pt){if(Ln(Pt)){Pt.enable?(Ur(Qe),Di(Qe.exit),fi("true")):fi("false");return}Ti=Pt.append(Ve,Qe),fi(Ti)}else Ti=Qe.def(Dt,".profile");var gn=Ve.block();Ur(gn),Qe("if(",Ti,"){",gn,"}");var rn=Ve.block();Di(rn),Qe.exit("if(",Ti,"){",rn,"}")}function Y(Ve,Qe,at,Ct,Ot){var Rt=Ve.shared;function Bt(yt){switch(yt){case Co:case Ps:case hl:return 2;case Qa:case Ts:case Ul:return 3;case mo:case wo:case Lu:return 4;default:return 1}}function Dt(yt,Pt,ht){var ur=Rt.gl,br=Qe.def(yt,".location"),Ur=Qe.def(Rt.attributes,"[",br,"]"),Di=ht.state,fi=ht.buffer,Ti=[ht.x,ht.y,ht.z,ht.w],gn=["buffer","normalized","offset","stride"];function rn(){Qe("if(!",Ur,".buffer){",ur,".enableVertexAttribArray(",br,");}");var Bi=ht.type,Gi;if(ht.size?Gi=Qe.def(ht.size,"||",Pt):Gi=Pt,Qe("if(",Ur,".type!==",Bi,"||",Ur,".size!==",Gi,"||",gn.map(function(zn){return Ur+"."+zn+"!=="+ht[zn]}).join("||"),"){",ur,".bindBuffer(",Sr,",",fi,".buffer);",ur,".vertexAttribPointer(",[br,Gi,Bi,ht.normalized,ht.stride,ht.offset],");",Ur,".type=",Bi,";",Ur,".size=",Gi,";",gn.map(function(zn){return Ur+"."+zn+"="+ht[zn]+";"}).join(""),"}"),Ri){var sn=ht.divisor;Qe("if(",Ur,".divisor!==",sn,"){",Ve.instancing,".vertexAttribDivisorANGLE(",[br,sn],");",Ur,".divisor=",sn,";}")}}function Ci(){Qe("if(",Ur,".buffer){",ur,".disableVertexAttribArray(",br,");",Ur,".buffer=null;","}if(",Ca.map(function(Bi,Gi){return Ur+"."+Bi+"!=="+Ti[Gi]}).join("||"),"){",ur,".vertexAttrib4f(",br,",",Ti,");",Ca.map(function(Bi,Gi){return Ur+"."+Bi+"="+Ti[Gi]+";"}).join(""),"}")}Di===La?rn():Di===Na?Ci():(Qe("if(",Di,"===",La,"){"),rn(),Qe("}else{"),Ci(),Qe("}"))}Ct.forEach(function(yt){var Pt=yt.name,ht=at.attributes[Pt],ur;if(ht){if(!Ot(ht))return;ur=ht.append(Ve,Qe)}else{if(!Ot(ia))return;var br=Ve.scopeAttrib(Pt);ur={},Object.keys(new Yr).forEach(function(Ur){ur[Ur]=Qe.def(br,".",Ur)})}Dt(Ve.link(yt),Bt(yt.info.type),ur)})}function D(Ve,Qe,at,Ct,Ot,Rt){for(var Bt=Ve.shared,Dt=Bt.gl,yt,Pt=0;Pt1){for(var co=[],ts=[],so=0;so>1)",fi],");")}function sn(){at(Ti,".drawArraysInstancedANGLE(",[br,Ur,Di,fi],");")}ht&&ht!=="null"?rn?Gi():(at("if(",ht,"){"),Gi(),at("}else{"),sn(),at("}")):sn()}function Bi(){function Gi(){at(Rt+".drawElements("+[br,Di,gn,Ur+"<<(("+gn+"-"+Ra+")>>1)"]+");")}function sn(){at(Rt+".drawArrays("+[br,Ur,Di]+");")}ht&&ht!=="null"?rn?Gi():(at("if(",ht,"){"),Gi(),at("}else{"),sn(),at("}")):sn()}Ri&&(typeof fi!="number"||fi>=0)?typeof fi=="string"?(at("if(",fi,">0){"),Ci(),at("}else if(",fi,"<0){"),Bi(),at("}")):Ci():Bi()}function q(Ve,Qe,at,Ct,Ot){var Rt=kn(),Bt=Rt.proc("body",Ot);return Ri&&(Rt.instancing=Bt.def(Rt.shared.extensions,".angle_instanced_arrays")),Ve(Rt,Bt,at,Ct),Rt.compile().body}function K(Ve,Qe,at,Ct){ol(Ve,Qe),at.useVAO?at.drawVAO?Qe(Ve.shared.vao,".setVAO(",at.drawVAO.append(Ve,Qe),");"):Qe(Ve.shared.vao,".setVAO(",Ve.shared.vao,".targetVAO);"):(Qe(Ve.shared.vao,".setVAO(null);"),Y(Ve,Qe,at,Ct.attributes,function(){return!0})),D(Ve,Qe,at,Ct.uniforms,function(){return!0},!1),J(Ve,Qe,Qe,at)}function de(Ve,Qe){var at=Ve.proc("draw",1);ol(Ve,at),ss(Ve,at,Qe.context),Vs(Ve,at,Qe.framebuffer),Ys(Ve,at,Qe),wa(Ve,at,Qe.state),io(Ve,at,Qe,!1,!0);var Ct=Qe.shader.progVar.append(Ve,at);if(at(Ve.shared.gl,".useProgram(",Ct,".program);"),Qe.shader.program)K(Ve,at,Qe,Qe.shader.program);else{at(Ve.shared.vao,".setVAO(null);");var Ot=Ve.global.def("{}"),Rt=at.def(Ct,".id"),Bt=at.def(Ot,"[",Rt,"]");at(Ve.cond(Bt).then(Bt,".call(this,a0);").else(Bt,"=",Ot,"[",Rt,"]=",Ve.link(function(Dt){return q(K,Ve,Qe,Dt,1)}),"(",Ct,");",Bt,".call(this,a0);"))}Object.keys(Qe.state).length>0&&at(Ve.shared.current,".dirty=true;"),Ve.shared.vao&&at(Ve.shared.vao,".setVAO(null);")}function ne(Ve,Qe,at,Ct){Ve.batchId="a1",ol(Ve,Qe);function Ot(){return!0}Y(Ve,Qe,at,Ct.attributes,Ot),D(Ve,Qe,at,Ct.uniforms,Ot,!1),J(Ve,Qe,Qe,at)}function we(Ve,Qe,at,Ct){ol(Ve,Qe);var Ot=at.contextDep,Rt=Qe.def(),Bt="a0",Dt="a1",yt=Qe.def();Ve.shared.props=yt,Ve.batchId=Rt;var Pt=Ve.scope(),ht=Ve.scope();Qe(Pt.entry,"for(",Rt,"=0;",Rt,"<",Dt,";++",Rt,"){",yt,"=",Bt,"[",Rt,"];",ht,"}",Pt.exit);function ur(gn){return gn.contextDep&&Ot||gn.propDep}function br(gn){return!ur(gn)}if(at.needsContext&&ss(Ve,ht,at.context),at.needsFramebuffer&&Vs(Ve,ht,at.framebuffer),wa(Ve,ht,at.state,ur),at.profile&&ur(at.profile)&&io(Ve,ht,at,!1,!0),Ct)at.useVAO?at.drawVAO?ur(at.drawVAO)?ht(Ve.shared.vao,".setVAO(",at.drawVAO.append(Ve,ht),");"):Pt(Ve.shared.vao,".setVAO(",at.drawVAO.append(Ve,Pt),");"):Pt(Ve.shared.vao,".setVAO(",Ve.shared.vao,".targetVAO);"):(Pt(Ve.shared.vao,".setVAO(null);"),Y(Ve,Pt,at,Ct.attributes,br),Y(Ve,ht,at,Ct.attributes,ur)),D(Ve,Pt,at,Ct.uniforms,br,!1),D(Ve,ht,at,Ct.uniforms,ur,!0),J(Ve,Pt,ht,at);else{var Ur=Ve.global.def("{}"),Di=at.shader.progVar.append(Ve,ht),fi=ht.def(Di,".id"),Ti=ht.def(Ur,"[",fi,"]");ht(Ve.shared.gl,".useProgram(",Di,".program);","if(!",Ti,"){",Ti,"=",Ur,"[",fi,"]=",Ve.link(function(gn){return q(ne,Ve,at,gn,2)}),"(",Di,");}",Ti,".call(this,a0[",Rt,"],",Rt,");")}}function Ue(Ve,Qe){var at=Ve.proc("batch",2);Ve.batchId="0",ol(Ve,at);var Ct=!1,Ot=!0;Object.keys(Qe.context).forEach(function(Ur){Ct=Ct||Qe.context[Ur].propDep}),Ct||(ss(Ve,at,Qe.context),Ot=!1);var Rt=Qe.framebuffer,Bt=!1;Rt?(Rt.propDep?Ct=Bt=!0:Rt.contextDep&&Ct&&(Bt=!0),Bt||Vs(Ve,at,Rt)):Vs(Ve,at,null),Qe.state.viewport&&Qe.state.viewport.propDep&&(Ct=!0);function Dt(Ur){return Ur.contextDep&&Ct||Ur.propDep}Ys(Ve,at,Qe),wa(Ve,at,Qe.state,function(Ur){return!Dt(Ur)}),(!Qe.profile||!Dt(Qe.profile))&&io(Ve,at,Qe,!1,"a1"),Qe.contextDep=Ct,Qe.needsContext=Ot,Qe.needsFramebuffer=Bt;var yt=Qe.shader.progVar;if(yt.contextDep&&Ct||yt.propDep)we(Ve,at,Qe,null);else{var Pt=yt.append(Ve,at);if(at(Ve.shared.gl,".useProgram(",Pt,".program);"),Qe.shader.program)we(Ve,at,Qe,Qe.shader.program);else{at(Ve.shared.vao,".setVAO(null);");var ht=Ve.global.def("{}"),ur=at.def(Pt,".id"),br=at.def(ht,"[",ur,"]");at(Ve.cond(br).then(br,".call(this,a0,a1);").else(br,"=",ht,"[",ur,"]=",Ve.link(function(Ur){return q(we,Ve,Qe,Ur,2)}),"(",Pt,");",br,".call(this,a0,a1);"))}}Object.keys(Qe.state).length>0&&at(Ve.shared.current,".dirty=true;"),Ve.shared.vao&&at(Ve.shared.vao,".setVAO(null);")}function ft(Ve,Qe){var at=Ve.proc("scope",3);Ve.batchId="a2";var Ct=Ve.shared,Ot=Ct.current;if(ss(Ve,at,Qe.context),Qe.framebuffer&&Qe.framebuffer.append(Ve,at),Si(Object.keys(Qe.state)).forEach(function(Dt){var yt=Qe.state[Dt],Pt=yt.append(Ve,at);Mn(Pt)?Pt.forEach(function(ht,ur){pn(ht)?at.set(Ve.next[Dt],"["+ur+"]",ht):at.set(Ve.next[Dt],"["+ur+"]",Ve.link(ht,{stable:!0}))}):Ln(yt)?at.set(Ct.next,"."+Dt,Ve.link(Pt,{stable:!0})):at.set(Ct.next,"."+Dt,Pt)}),io(Ve,at,Qe,!0,!0),[Tt,xr,Kt,Ir,Yt].forEach(function(Dt){var yt=Qe.draw[Dt];if(yt){var Pt=yt.append(Ve,at);pn(Pt)?at.set(Ct.draw,"."+Dt,Pt):at.set(Ct.draw,"."+Dt,Ve.link(Pt),{stable:!0})}}),Object.keys(Qe.uniforms).forEach(function(Dt){var yt=Qe.uniforms[Dt].append(Ve,at);Array.isArray(yt)&&(yt="["+yt.map(function(Pt){return pn(Pt)?Pt:Ve.link(Pt,{stable:!0})})+"]"),at.set(Ct.uniforms,"["+Ve.link(bt.id(Dt),{stable:!0})+"]",yt)}),Object.keys(Qe.attributes).forEach(function(Dt){var yt=Qe.attributes[Dt].append(Ve,at),Pt=Ve.scopeAttrib(Dt);Object.keys(new Yr).forEach(function(ht){at.set(Pt,"."+ht,yt[ht])})}),Qe.scopeVAO){var Rt=Qe.scopeVAO.append(Ve,at);pn(Rt)?at.set(Ct.vao,".targetVAO",Rt):at.set(Ct.vao,".targetVAO",Ve.link(Rt,{stable:!0}))}function Bt(Dt){var yt=Qe.shader[Dt];if(yt){var Pt=yt.append(Ve,at);pn(Pt)?at.set(Ct.shader,"."+Dt,Pt):at.set(Ct.shader,"."+Dt,Ve.link(Pt,{stable:!0}))}}Bt(Ze),Bt(st),Object.keys(Qe.state).length>0&&(at(Ot,".dirty=true;"),at.exit(Ot,".dirty=true;")),at("a1(",Ve.shared.context,",a0,",Ve.batchId,");")}function Zt(Ve){if(!(typeof Ve!="object"||Mn(Ve))){for(var Qe=Object.keys(Ve),at=0;at=0;--q){var K=Vn[q];K&&K(si,null,0)}zt.flush(),Ei&&Ei.update()}function ba(){!ta&&Vn.length>0&&(ta=d.next(oa))}function is(){ta&&(d.cancel(oa),ta=null)}function Zs(q){q.preventDefault(),jr=!0,is(),na.forEach(function(K){K()})}function Va(q){zt.getError(),jr=!1,Nr.restore(),Bn.restore(),Ri.restore(),hi.restore(),li.restore(),mn.restore(),an.restore(),Ei&&Ei.restore(),Ji.procs.refresh(),ba(),Ki.forEach(function(K){K()})}pn&&(pn.addEventListener(Fo,Zs,!1),pn.addEventListener(Uo,Va,!1));function Ml(){Vn.length=0,is(),pn&&(pn.removeEventListener(Fo,Zs),pn.removeEventListener(Uo,Va)),Bn.clear(),mn.clear(),li.clear(),an.clear(),hi.clear(),ci.clear(),Ri.clear(),Ei&&Ei.clear(),kn.forEach(function(q){q()})}function zo(q){function K(Rt){var Bt=e({},Rt);delete Bt.uniforms,delete Bt.attributes,delete Bt.context,delete Bt.vao,"stencil"in Bt&&Bt.stencil.op&&(Bt.stencil.opBack=Bt.stencil.opFront=Bt.stencil.op,delete Bt.stencil.op);function Dt(yt){if(yt in Bt){var Pt=Bt[yt];delete Bt[yt],Object.keys(Pt).forEach(function(ht){Bt[yt+"."+ht]=Pt[ht]})}}return Dt("blend"),Dt("depth"),Dt("cull"),Dt("stencil"),Dt("polygonOffset"),Dt("scissor"),Dt("sample"),"vao"in Rt&&(Bt.vao=Rt.vao),Bt}function de(Rt,Bt){var Dt={},yt={};return Object.keys(Rt).forEach(function(Pt){var ht=Rt[Pt];if(h.isDynamic(ht)){yt[Pt]=h.unbox(ht,Pt);return}else if(Bt&&Array.isArray(ht)){for(var ur=0;ur0)return Ve.call(this,Ct(Rt|0),Rt|0)}else if(Array.isArray(Rt)){if(Rt.length)return Ve.call(this,Rt,Rt.length)}else return qt.call(this,Rt)}return e(Ot,{stats:Zt,destroy:function(){hr.destroy()}})}var Qs=mn.setFBO=zo({framebuffer:h.define.call(null,$s,"framebuffer")});function al(q,K){var de=0;Ji.procs.poll();var ne=K.color;ne&&(zt.clearColor(+ne[0]||0,+ne[1]||0,+ne[2]||0,+ne[3]||0),de|=Ms),"depth"in K&&(zt.clearDepth(+K.depth),de|=Xs),"stencil"in K&&(zt.clearStencil(K.stencil|0),de|=Gn),zt.clear(de)}function Vl(q){if("framebuffer"in q)if(q.framebuffer&&q.framebuffer_reglType==="framebufferCube")for(var K=0;K<6;++K)Qs(e({framebuffer:q.framebuffer.faces[K]},q),al);else Qs(q,al);else al(null,q)}function ss(q){Vn.push(q);function K(){var de=dl(Vn,q);function ne(){var we=dl(Vn,ne);Vn[we]=Vn[Vn.length-1],Vn.length-=1,Vn.length<=0&&is()}Vn[de]=ne}return ba(),{cancel:K}}function Vs(){var q=Ni.viewport,K=Ni.scissor_box;q[0]=q[1]=K[0]=K[1]=0,si.viewportWidth=si.framebufferWidth=si.drawingBufferWidth=q[2]=K[2]=zt.drawingBufferWidth,si.viewportHeight=si.framebufferHeight=si.drawingBufferHeight=q[3]=K[3]=zt.drawingBufferHeight}function Ys(){si.tick+=1,si.time=ol(),Vs(),Ji.procs.poll()}function wa(){hi.refresh(),Vs(),Ji.procs.refresh(),Ei&&Ei.update()}function ol(){return(v()-Hn)/1e3}wa();function io(q,K){var de;switch(q){case"frame":return ss(K);case"lost":de=na;break;case"restore":de=Ki;break;case"destroy":de=kn;break;default:}return de.push(K),{cancel:function(){for(var ne=0;ne=0},read:Vi,destroy:Ml,_gl:zt,_refresh:wa,poll:function(){Ys(),Ei&&Ei.update()},now:ol,stats:mi,getCachedCode:Y,preloadCachedCode:D});return bt.onDone(null,J),J}return Sc})});var Kqe=ye((v_r,Yqe)=>{"use strict";var pUt=ey();Yqe.exports=function(t){if(t?typeof t=="string"&&(t={container:t}):t={},Xqe(t)?t={container:t}:gUt(t)?t={container:t}:mUt(t)?t={gl:t}:t=pUt(t,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0),t.pixelRatio||(t.pixelRatio=window.pixelRatio||1),t.gl)return t.gl;if(t.canvas&&(t.container=t.canvas.parentNode),t.container){if(typeof t.container=="string"){var r=document.querySelector(t.container);if(!r)throw Error("Element "+t.container+" is not found");t.container=r}Xqe(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=Zqe(),t.container.appendChild(t.canvas),Wqe(t))}else if(!t.canvas)if(typeof document!="undefined")t.container=document.body||document.documentElement,t.canvas=Zqe(),t.container.appendChild(t.canvas),Wqe(t);else throw Error("Not DOM environment. Use headless-gl.");return t.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(n){try{t.gl=t.canvas.getContext(n,t.attrs)}catch(i){}return t.gl}),t.gl};function Wqe(e){if(e.container)if(e.container==document.body)document.body.style.width||(e.canvas.width=e.width||e.pixelRatio*window.innerWidth),document.body.style.height||(e.canvas.height=e.height||e.pixelRatio*window.innerHeight);else{var t=e.container.getBoundingClientRect();e.canvas.width=e.width||t.right-t.left,e.canvas.height=e.height||t.bottom-t.top}}function Xqe(e){return typeof e.getContext=="function"&&"width"in e&&"height"in e}function gUt(e){return typeof e.nodeName=="string"&&typeof e.appendChild=="function"&&typeof e.getBoundingClientRect=="function"}function mUt(e){return typeof e.drawArrays=="function"||typeof e.drawElements=="function"}function Zqe(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top=0,e.style.left=0,e}});var $qe=ye((p_r,Jqe)=>{"use strict";var yUt=sK(),_Ut=[32,126];Jqe.exports=xUt;function xUt(e){e=e||{};var t=e.shape?e.shape:e.canvas?[e.canvas.width,e.canvas.height]:[512,512],r=e.canvas||document.createElement("canvas"),n=e.font,i=typeof e.step=="number"?[e.step,e.step]:e.step||[32,32],a=e.chars||_Ut;if(n&&typeof n!="string"&&(n=yUt(n)),!Array.isArray(a))a=String(a).split("");else if(a.length===2&&typeof a[0]=="number"&&typeof a[1]=="number"){for(var o=[],s=a[0],l=0;s<=a[1];s++)o[l++]=String.fromCharCode(s);a=o}t=t.slice(),r.width=t[0],r.height=t[1];var u=r.getContext("2d");u.fillStyle="#000",u.fillRect(0,0,r.width,r.height),u.font=n,u.textAlign="center",u.textBaseline="middle",u.fillStyle="#fff";for(var c=i[0]/2,f=i[1]/2,s=0;st[0]-i[0]/2&&(c=i[0]/2,f+=i[1]);return r}});var fK=ye(Vh=>{"use strict";"use restrict";var cK=32;Vh.INT_BITS=cK;Vh.INT_MAX=2147483647;Vh.INT_MIN=-1<0)-(e<0)};Vh.abs=function(e){var t=e>>cK-1;return(e^t)-t};Vh.min=function(e,t){return t^(e^t)&-(e65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,t|=r,t|e>>1};Vh.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0};Vh.popCount=function(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24};function Qqe(e){var t=32;return e&=-e,e&&t--,e&65535&&(t-=16),e&16711935&&(t-=8),e&252645135&&(t-=4),e&858993459&&(t-=2),e&1431655765&&(t-=1),t}Vh.countTrailingZeros=Qqe;Vh.nextPow2=function(e){return e+=e===0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1};Vh.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e-(e>>>1)};Vh.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,e&=15,27030>>>e&1};var Dk=new Array(256);(function(e){for(var t=0;t<256;++t){var r=t,n=t,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=r&1,--i;e[t]=n<>>8&255]<<16|Dk[e>>>16&255]<<8|Dk[e>>>24&255]};Vh.interleave2=function(e,t){return e&=65535,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t&=65535,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1};Vh.deinterleave2=function(e,t){return e=e>>>t&1431655765,e=(e|e>>>1)&858993459,e=(e|e>>>2)&252645135,e=(e|e>>>4)&16711935,e=(e|e>>>16)&65535,e<<16>>16};Vh.interleave3=function(e,t,r){return e&=1023,e=(e|e<<16)&4278190335,e=(e|e<<8)&251719695,e=(e|e<<4)&3272356035,e=(e|e<<2)&1227133513,t&=1023,t=(t|t<<16)&4278190335,t=(t|t<<8)&251719695,t=(t|t<<4)&3272356035,t=(t|t<<2)&1227133513,e|=t<<1,r&=1023,r=(r|r<<16)&4278190335,r=(r|r<<8)&251719695,r=(r|r<<4)&3272356035,r=(r|r<<2)&1227133513,e|r<<2};Vh.deinterleave3=function(e,t){return e=e>>>t&1227133513,e=(e|e>>>2)&3272356035,e=(e|e>>>4)&251719695,e=(e|e>>>8)&4278190335,e=(e|e>>>16)&1023,e<<22>>22};Vh.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>Qqe(e)+1}});var rBe=ye((m_r,tBe)=>{"use strict";function eBe(e,t,r){var n=e[r]|0;if(n<=0)return[];var i=new Array(n),a;if(r===e.length-1)for(a=0;a0)return bUt(e|0,t);break;case"object":if(typeof e.length=="number")return eBe(e,t,0);break}return[]}tBe.exports=wUt});var mBe=ye(mu=>{"use strict";var xx=fK(),Ev=rBe(),iBe=_2().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:Ev([32,0]),UINT16:Ev([32,0]),UINT32:Ev([32,0]),BIGUINT64:Ev([32,0]),INT8:Ev([32,0]),INT16:Ev([32,0]),INT32:Ev([32,0]),BIGINT64:Ev([32,0]),FLOAT:Ev([32,0]),DOUBLE:Ev([32,0]),DATA:Ev([32,0]),UINT8C:Ev([32,0]),BUFFER:Ev([32,0])});var TUt=typeof Uint8ClampedArray!="undefined",AUt=typeof BigUint64Array!="undefined",SUt=typeof BigInt64Array!="undefined",ad=window.__TYPEDARRAY_POOL;ad.UINT8C||(ad.UINT8C=Ev([32,0]));ad.BIGUINT64||(ad.BIGUINT64=Ev([32,0]));ad.BIGINT64||(ad.BIGINT64=Ev([32,0]));ad.BUFFER||(ad.BUFFER=Ev([32,0]));var Tz=ad.DATA,Az=ad.BUFFER;mu.free=function(t){if(iBe.isBuffer(t))Az[xx.log2(t.length)].push(t);else{if(Object.prototype.toString.call(t)!=="[object ArrayBuffer]"&&(t=t.buffer),!t)return;var r=t.length||t.byteLength,n=xx.log2(r)|0;Tz[n].push(t)}};function nBe(e){if(e){var t=e.length||e.byteLength,r=xx.log2(t);Tz[r].push(e)}}function MUt(e){nBe(e.buffer)}mu.freeUint8=mu.freeUint16=mu.freeUint32=mu.freeBigUint64=mu.freeInt8=mu.freeInt16=mu.freeInt32=mu.freeBigInt64=mu.freeFloat32=mu.freeFloat=mu.freeFloat64=mu.freeDouble=mu.freeUint8Clamped=mu.freeDataView=MUt;mu.freeArrayBuffer=nBe;mu.freeBuffer=function(t){Az[xx.log2(t.length)].push(t)};mu.malloc=function(t,r){if(r===void 0||r==="arraybuffer")return Bp(t);switch(r){case"uint8":return hK(t);case"uint16":return aBe(t);case"uint32":return oBe(t);case"int8":return sBe(t);case"int16":return lBe(t);case"int32":return uBe(t);case"float":case"float32":return cBe(t);case"double":case"float64":return fBe(t);case"uint8_clamped":return hBe(t);case"bigint64":return vBe(t);case"biguint64":return dBe(t);case"buffer":return gBe(t);case"data":case"dataview":return pBe(t);default:return null}return null};function Bp(t){var t=xx.nextPow2(t),r=xx.log2(t),n=Tz[r];return n.length>0?n.pop():new ArrayBuffer(t)}mu.mallocArrayBuffer=Bp;function hK(e){return new Uint8Array(Bp(e),0,e)}mu.mallocUint8=hK;function aBe(e){return new Uint16Array(Bp(2*e),0,e)}mu.mallocUint16=aBe;function oBe(e){return new Uint32Array(Bp(4*e),0,e)}mu.mallocUint32=oBe;function sBe(e){return new Int8Array(Bp(e),0,e)}mu.mallocInt8=sBe;function lBe(e){return new Int16Array(Bp(2*e),0,e)}mu.mallocInt16=lBe;function uBe(e){return new Int32Array(Bp(4*e),0,e)}mu.mallocInt32=uBe;function cBe(e){return new Float32Array(Bp(4*e),0,e)}mu.mallocFloat32=mu.mallocFloat=cBe;function fBe(e){return new Float64Array(Bp(8*e),0,e)}mu.mallocFloat64=mu.mallocDouble=fBe;function hBe(e){return TUt?new Uint8ClampedArray(Bp(e),0,e):hK(e)}mu.mallocUint8Clamped=hBe;function dBe(e){return AUt?new BigUint64Array(Bp(8*e),0,e):null}mu.mallocBigUint64=dBe;function vBe(e){return SUt?new BigInt64Array(Bp(8*e),0,e):null}mu.mallocBigInt64=vBe;function pBe(e){return new DataView(Bp(e),0,e)}mu.mallocDataView=pBe;function gBe(e){e=xx.nextPow2(e);var t=xx.log2(e),r=Az[t];return r.length>0?r.pop():new iBe(e)}mu.mallocBuffer=gBe;mu.clearCache=function(){for(var t=0;t<32;++t)ad.UINT8[t].length=0,ad.UINT16[t].length=0,ad.UINT32[t].length=0,ad.INT8[t].length=0,ad.INT16[t].length=0,ad.INT32[t].length=0,ad.FLOAT[t].length=0,ad.DOUBLE[t].length=0,ad.BIGUINT64[t].length=0,ad.BIGINT64[t].length=0,ad.UINT8C[t].length=0,Tz[t].length=0,Az[t].length=0}});var _Be=ye((__r,yBe)=>{"use strict";var EUt=Object.prototype.toString;yBe.exports=function(e){var t;return EUt.call(e)==="[object Object]"&&(t=Object.getPrototypeOf(e),t===null||t===Object.getPrototypeOf({}))}});var dK=ye((x_r,xBe)=>{xBe.exports=function(t,r){r||(r=[0,""]),t=String(t);var n=parseFloat(t,10);return r[0]=n,r[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",r}});var TBe=ye((b_r,wBe)=>{"use strict";var kUt=dK();wBe.exports=bBe;var Fk=96;function vK(e,t){var r=kUt(getComputedStyle(e).getPropertyValue(t));return r[0]*bBe(r[1],e)}function CUt(e,t){var r=document.createElement("div");r.style["font-size"]="128"+e,t.appendChild(r);var n=vK(r,"font-size")/128;return t.removeChild(r),n}function bBe(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":return CUt(e,t);case"em":return vK(t,"font-size");case"rem":return vK(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return Fk;case"cm":return Fk/2.54;case"mm":return Fk/25.4;case"pt":return Fk/72;case"pc":return Fk/6}return 1}});var MBe=ye((w_r,SBe)=>{"use strict";SBe.exports=Ez;var LUt=Ez.canvas=document.createElement("canvas"),Sz=LUt.getContext("2d"),ABe=Mz([32,126]);Ez.createPairs=Mz;Ez.ascii=ABe;function Ez(e,t){Array.isArray(e)&&(e=e.join(", "));var r={},n,i=16,a=.05;t&&(t.length===2&&typeof t[0]=="number"?n=Mz(t):Array.isArray(t)?n=t:(t.o?n=Mz(t.o):t.pairs&&(n=t.pairs),t.fontSize&&(i=t.fontSize),t.threshold!=null&&(a=t.threshold))),n||(n=ABe),Sz.font=i+"px "+e;for(var o=0;oi*a){var c=(u-l)/i;r[s]=c*1e3}}return r}function Mz(e){for(var t=[],r=e[0];r<=e[1];r++)for(var n=String.fromCharCode(r),i=e[0];i{"use strict";CBe.exports=bx;bx.canvas=document.createElement("canvas");bx.cache={};function bx(o,t){t||(t={}),(typeof o=="string"||Array.isArray(o))&&(t.family=o);var r=Array.isArray(t.family)?t.family.join(", "):t.family;if(!r)throw Error("`family` must be defined");var n=t.size||t.fontSize||t.em||48,i=t.weight||t.fontWeight||"",a=t.style||t.fontStyle||"",o=[a,i,n].join(" ")+"px "+r,s=t.origin||"top";if(bx.cache[r]&&n<=bx.cache[r].em)return EBe(bx.cache[r],s);var l=t.canvas||bx.canvas,u=l.getContext("2d"),c={upper:t.upper!==void 0?t.upper:"H",lower:t.lower!==void 0?t.lower:"x",descent:t.descent!==void 0?t.descent:"p",ascent:t.ascent!==void 0?t.ascent:"h",tittle:t.tittle!==void 0?t.tittle:"i",overshoot:t.overshoot!==void 0?t.overshoot:"O"},f=Math.ceil(n*1.5);l.height=f,l.width=f*.5,u.font=o;var h="H",d={top:0};u.clearRect(0,0,f,f),u.textBaseline="top",u.fillStyle="black",u.fillText(h,0,0);var v=ry(u.getImageData(0,0,f,f));u.clearRect(0,0,f,f),u.textBaseline="bottom",u.fillText(h,0,f);var _=ry(u.getImageData(0,0,f,f));d.lineHeight=d.bottom=f-_+v,u.clearRect(0,0,f,f),u.textBaseline="alphabetic",u.fillText(h,0,f);var b=ry(u.getImageData(0,0,f,f)),p=f-b-1+v;d.baseline=d.alphabetic=p,u.clearRect(0,0,f,f),u.textBaseline="middle",u.fillText(h,0,f*.5);var k=ry(u.getImageData(0,0,f,f));d.median=d.middle=f-k-1+v-f*.5,u.clearRect(0,0,f,f),u.textBaseline="hanging",u.fillText(h,0,f*.5);var E=ry(u.getImageData(0,0,f,f));d.hanging=f-E-1+v-f*.5,u.clearRect(0,0,f,f),u.textBaseline="ideographic",u.fillText(h,0,f);var T=ry(u.getImageData(0,0,f,f));if(d.ideographic=f-T-1+v,c.upper&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.upper,0,0),d.upper=ry(u.getImageData(0,0,f,f)),d.capHeight=d.baseline-d.upper),c.lower&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.lower,0,0),d.lower=ry(u.getImageData(0,0,f,f)),d.xHeight=d.baseline-d.lower),c.tittle&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.tittle,0,0),d.tittle=ry(u.getImageData(0,0,f,f))),c.ascent&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.ascent,0,0),d.ascent=ry(u.getImageData(0,0,f,f))),c.descent&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.descent,0,0),d.descent=kBe(u.getImageData(0,0,f,f))),c.overshoot){u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.overshoot,0,0);var L=kBe(u.getImageData(0,0,f,f));d.overshoot=L-p}for(var x in d)d[x]/=n;return d.em=n,bx.cache[r]=d,EBe(d,s)}function EBe(e,t){var r={};typeof t=="string"&&(t=e[t]);for(var n in e)n!=="em"&&(r[n]=e[n]-t);return r}function ry(e){for(var t=e.height,r=e.data,n=3;n0;n-=4)if(r[n]!==0)return Math.floor((n-3)*.25/t)}});var DBe=ye((A_r,RBe)=>{"use strict";var _5=Hqe(),PUt=ey(),IUt=jqe(),RUt=Kqe(),DUt=XY(),pK=ox(),FUt=$qe(),wx=mBe(),zUt=s5(),OUt=_Be(),qUt=dK(),BUt=TBe(),NUt=MBe(),UUt=Nh(),VUt=LBe(),GUt=iw(),HUt=fK(),PBe=HUt.nextPow2,IBe=new DUt,Cz=!1;document.body&&(kz=document.body.appendChild(document.createElement("div")),kz.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(kz).fontStretch&&(Cz=!0),document.body.removeChild(kz));var kz,xc=function(t){jUt(t)?(t={regl:t},this.gl=t.regl._gl):this.gl=RUt(t),this.shader=IBe.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=t.regl||IUt({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),IBe.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(OUt(t)?t:{})};xc.prototype.createShader=function(){var t=this.regl,r=t({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:t.prop("count"),offset:t.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:t.this("sizeBuffer")},width:{offset:0,stride:8,buffer:t.this("sizeBuffer")},char:t.this("charBuffer"),position:t.this("position")},uniforms:{atlasSize:function(i,a){return[a.atlas.width,a.atlas.height]},atlasDim:function(i,a){return[a.atlas.cols,a.atlas.rows]},atlas:function(i,a){return a.atlas.texture},charStep:function(i,a){return a.atlas.step},em:function(i,a){return a.atlas.em},color:t.prop("color"),opacity:t.prop("opacity"),viewport:t.this("viewportArray"),scale:t.this("scale"),align:t.prop("align"),baseline:t.prop("baseline"),translate:t.this("translate"),positionOffset:t.prop("positionOffset")},primitive:"points",viewport:t.this("viewport"),vert:` +`),Zr;if(bt&&(Zr=qc(Tr),bt[Zr]))return bt[Zr].apply(null,Vr);var yi=Function.apply(null,Lr.concat(Tr));return bt&&(bt[Zr]=yi),yi.apply(null,Vr)}return{global:Si,link:Nr,block:vi,proc:Qi,scope:Ni,cond:qi,compile:ji}}var Ca="xyzw".split(""),Ra=5121,La=1,Na=2,Zn=0,Dn=1,Ka=2,bo=3,Zo=4,Ss=5,as=6,ws="dither",Ho="blend.enable",ml="blend.color",Ws="blend.equation",Ls="blend.func",va="depth.enable",no="depth.func",ys="depth.range",rs="depth.mask",Ql="colorMask",Cu="cull.enable",Yu="cull.face",Nc="frontFace",pu="lineWidth",Uc="polygonOffset.enable",xu="polygonOffset.offset",Ac="sample.alpha",Ua="sample.enable",oo="sample.coverage",Vc="stencil.enable",hc="stencil.mask",Ku="stencil.func",ue="stencil.opFront",w="stencil.opBack",B="scissor.enable",Q="scissor.box",ee="viewport",le="profile",ze="framebuffer",Ze="vert",ut="frag",Mt="elements",Jt="primitive",$t="count",mr="offset",Cr="instances",ve="vao",xe="Width",Ie="Height",qe=ze+xe,Qe=ze+Ie,Xe=ee+xe,nt=ee+Ie,qt="drawingBuffer",jt=qt+xe,ar=qt+Ie,fr=[Ls,Ws,Ku,ue,w,oo,ee,Q,xu],br=34962,Fr=34963,Hr=2884,ri=3042,Ci=3024,cn=2960,sn=2929,Ln=3089,Yn=32823,Aa=32926,fa=32928,$a=5126,Co=35664,Qa=35665,mo=35666,Bo=5124,Ps=35667,Ts=35668,wo=35669,To=35670,hl=35671,Ul=35672,Lu=35673,au=35674,Js=35675,eu=35676,dc=35678,Tl=35680,Al=4,X=1028,se=1029,Te=2304,Oe=2305,Ve=32775,Ye=32776,Pt=519,at=7680,Wt=0,dr=1,pr=32774,Ur=513,zr=36160,gi=36064,xi={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Wr={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},ii={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},di={cw:Te,ccw:Oe};function Li(Me){return Array.isArray(Me)||qr(Me)||jr(Me)}function Ti(Me){return Me.sort(function(bt,Ot){return bt===ee?-1:Ot===ee?1:bt=1,Lr>=2,bt)}else if(Ot===Zo){var Vr=Me.data;return new Qr(Vr.thisDep,Vr.contextDep,Vr.propDep,bt)}else{if(Ot===Ss)return new Qr(!1,!1,!1,bt);if(Ot===as){for(var Or=!1,Nr=!1,vi=!1,Ni=0;Ni=1&&(Nr=!0),Si>=2&&(vi=!0)}else qi.type===Zo&&(Or=Or||qi.data.thisDep,Nr=Nr||qi.data.contextDep,vi=vi||qi.data.propDep)}return new Qr(Or,Nr,vi,bt)}else return new Qr(Ot===bo,Ot===Ka,Ot===Dn,bt)}}var na=new Qr(!1,!1,!1,function(){});function Ea(Me,bt,Ot,Lr,Vr,Or,Nr,vi,Ni,qi,Si,Vn,Qi,ji,oi,Tr){var Zr=qi.Record,yi={add:32774,subtract:32778,"reverse subtract":32779};Ot.ext_blend_minmax&&(yi.min=Ve,yi.max=Ye);var Ii=Ot.angle_instanced_arrays,ui=Ot.webgl_draw_buffers,nn=Ot.oes_vertex_array_object,Xi={dirty:!0,profile:Tr.profile},qn={},fi=[],si={},mn={};function Ji(Ne){return Ne.replace(".","_")}function Ui(Ne,$e,ot){var It=Ji(Ne);fi.push(Ne),qn[It]=Xi[It]=!!ot,si[It]=$e}function Bi(Ne,$e,ot){var It=Ji(Ne);fi.push(Ne),Array.isArray(ot)?(Xi[It]=ot.slice(),qn[It]=ot.slice()):Xi[It]=qn[It]=ot,mn[It]=$e}function pn(Ne){return!!isNaN(Ne)}Ui(ws,Ci),Ui(Ho,ri),Bi(ml,"blendColor",[0,0,0,0]),Bi(Ws,"blendEquationSeparate",[pr,pr]),Bi(Ls,"blendFuncSeparate",[dr,Wt,dr,Wt]),Ui(va,sn,!0),Bi(no,"depthFunc",Ur),Bi(ys,"depthRange",[0,1]),Bi(rs,"depthMask",!0),Bi(Ql,Ql,[!0,!0,!0,!0]),Ui(Cu,Hr),Bi(Yu,"cullFace",se),Bi(Nc,Nc,Oe),Bi(pu,pu,1),Ui(Uc,Yn),Bi(xu,"polygonOffset",[0,0]),Ui(Ac,Aa),Ui(Ua,fa),Bi(oo,"sampleCoverage",[1,!1]),Ui(Vc,cn),Bi(hc,"stencilMask",-1),Bi(Ku,"stencilFunc",[Pt,0,-1]),Bi(ue,"stencilOpSeparate",[X,at,at,at]),Bi(w,"stencilOpSeparate",[se,at,at,at]),Ui(B,Ln),Bi(Q,"scissor",[0,0,Me.drawingBufferWidth,Me.drawingBufferHeight]),Bi(ee,ee,[0,0,Me.drawingBufferWidth,Me.drawingBufferHeight]);var Nn={gl:Me,context:Qi,strings:bt,next:qn,current:Xi,draw:Vn,elements:Or,buffer:Vr,shader:Si,attributes:qi.state,vao:qi,uniforms:Ni,framebuffer:vi,extensions:Ot,timer:ji,isBufferArgs:Li},aa={primTypes:Mn,compareFuncs:Wr,blendFuncs:xi,blendEquations:yi,stencilOps:ii,glTypes:un,orientationType:di};ui&&(aa.backBuffer=[se],aa.drawBuffer=S(Lr.maxDrawbuffers,function(Ne){return Ne===0?[0]:S(Ne,function($e){return gi+$e})}));var Ki=0;function Cn(){var Ne=ta({cache:oi}),$e=Ne.link,ot=Ne.global;Ne.id=Ki++,Ne.batchId="0";var It=$e(Nn),Bt=Ne.shared={props:"a0"};Object.keys(Nn).forEach(function(Dt){Bt[Dt]=ot.def(It,".",Dt)});var Ft=Ne.next={},Ut=Ne.current={};Object.keys(mn).forEach(function(Dt){Array.isArray(Xi[Dt])&&(Ft[Dt]=ot.def(Bt.next,".",Dt),Ut[Dt]=ot.def(Bt.current,".",Dt))});var zt=Ne.constants={};Object.keys(aa).forEach(function(Dt){zt[Dt]=ot.def(JSON.stringify(aa[Dt]))}),Ne.invoke=function(Dt,vt){switch(vt.type){case Zn:var lr=["this",Bt.context,Bt.props,Ne.batchId];return Dt.def($e(vt.data),".call(",lr.slice(0,Math.max(vt.data.length+1,4)),")");case Dn:return Dt.def(Bt.props,vt.data);case Ka:return Dt.def(Bt.context,vt.data);case bo:return Dt.def("this",vt.data);case Zo:return vt.data.append(Ne,Dt),vt.data.ref;case Ss:return vt.data.toString();case as:return vt.data.map(function(yr){return Ne.invoke(Dt,yr)})}},Ne.attribCache={};var _t={};return Ne.scopeAttrib=function(Dt){var vt=bt.id(Dt);if(vt in _t)return _t[vt];var lr=qi.scope[vt];lr||(lr=qi.scope[vt]=new Zr);var yr=_t[vt]=$e(lr);return yr},Ne}function ia(Ne){var $e=Ne.static,ot=Ne.dynamic,It;if(le in $e){var Bt=!!$e[le];It=kn(function(Ut,zt){return Bt}),It.enable=Bt}else if(le in ot){var Ft=ot[le];It=Bn(Ft,function(Ut,zt){return Ut.invoke(zt,Ft)})}return It}function sa(Ne,$e){var ot=Ne.static,It=Ne.dynamic;if(ze in ot){var Bt=ot[ze];return Bt?(Bt=vi.getFramebuffer(Bt),kn(function(Ut,zt){var _t=Ut.link(Bt),Dt=Ut.shared;zt.set(Dt.framebuffer,".next",_t);var vt=Dt.context;return zt.set(vt,"."+qe,_t+".width"),zt.set(vt,"."+Qe,_t+".height"),_t})):kn(function(Ut,zt){var _t=Ut.shared;zt.set(_t.framebuffer,".next","null");var Dt=_t.context;return zt.set(Dt,"."+qe,Dt+"."+jt),zt.set(Dt,"."+Qe,Dt+"."+ar),"null"})}else if(ze in It){var Ft=It[ze];return Bn(Ft,function(Ut,zt){var _t=Ut.invoke(zt,Ft),Dt=Ut.shared,vt=Dt.framebuffer,lr=zt.def(vt,".getFramebuffer(",_t,")");zt.set(vt,".next",lr);var yr=Dt.context;return zt.set(yr,"."+qe,lr+"?"+lr+".width:"+yr+"."+jt),zt.set(yr,"."+Qe,lr+"?"+lr+".height:"+yr+"."+ar),lr})}else return null}function ba(Ne,$e,ot){var It=Ne.static,Bt=Ne.dynamic;function Ft(_t){if(_t in It){var Dt=It[_t],vt=!0,lr=Dt.x|0,yr=Dt.y|0,Br,Di;return"width"in Dt?Br=Dt.width|0:vt=!1,"height"in Dt?Di=Dt.height|0:vt=!1,new Qr(!vt&&$e&&$e.thisDep,!vt&&$e&&$e.contextDep,!vt&&$e&&$e.propDep,function(gn,tn){var Ei=gn.shared.context,Oi=Br;"width"in Dt||(Oi=tn.def(Ei,".",qe,"-",lr));var Gi=Di;return"height"in Dt||(Gi=tn.def(Ei,".",Qe,"-",yr)),[lr,yr,Oi,Gi]})}else if(_t in Bt){var ci=Bt[_t],bi=Bn(ci,function(gn,tn){var Ei=gn.invoke(tn,ci),Oi=gn.shared.context,Gi=tn.def(Ei,".x|0"),on=tn.def(Ei,".y|0"),zn=tn.def('"width" in ',Ei,"?",Ei,".width|0:","(",Oi,".",qe,"-",Gi,")"),Ja=tn.def('"height" in ',Ei,"?",Ei,".height|0:","(",Oi,".",Qe,"-",on,")");return[Gi,on,zn,Ja]});return $e&&(bi.thisDep=bi.thisDep||$e.thisDep,bi.contextDep=bi.contextDep||$e.contextDep,bi.propDep=bi.propDep||$e.propDep),bi}else return $e?new Qr($e.thisDep,$e.contextDep,$e.propDep,function(gn,tn){var Ei=gn.shared.context;return[0,0,tn.def(Ei,".",qe),tn.def(Ei,".",Qe)]}):null}var Ut=Ft(ee);if(Ut){var zt=Ut;Ut=new Qr(Ut.thisDep,Ut.contextDep,Ut.propDep,function(_t,Dt){var vt=zt.append(_t,Dt),lr=_t.shared.context;return Dt.set(lr,"."+Xe,vt[2]),Dt.set(lr,"."+nt,vt[3]),vt})}return{viewport:Ut,scissor_box:Ft(Q)}}function is(Ne,$e){var ot=Ne.static,It=typeof ot[ut]=="string"&&typeof ot[Ze]=="string";if(It){if(Object.keys($e.dynamic).length>0)return null;var Bt=$e.static,Ft=Object.keys(Bt);if(Ft.length>0&&typeof Bt[Ft[0]]=="number"){for(var Ut=[],zt=0;zt"+Gi+"?"+vt+".constant["+Gi+"]:0;"}).join(""),"}}else{","if(",Br,"(",vt,".buffer)){",gn,"=",Di,".createStream(",br,",",vt,".buffer);","}else{",gn,"=",Di,".getBuffer(",vt,".buffer);","}",tn,'="type" in ',vt,"?",yr.glTypes,"[",vt,".type]:",gn,".dtype;",ci.normalized,"=!!",vt,".normalized;");function Ei(Oi){Dt(ci[Oi],"=",vt,".",Oi,"|0;")}return Ei("size"),Ei("offset"),Ei("stride"),Ei("divisor"),Dt("}}"),Dt.exit("if(",ci.isStream,"){",Di,".destroyStream(",gn,");","}"),ci}Bt[Ft]=Bn(Ut,zt)}),Bt}function al(Ne){var $e=Ne.static,ot=Ne.dynamic,It={};return Object.keys($e).forEach(function(Bt){var Ft=$e[Bt];It[Bt]=kn(function(Ut,zt){return typeof Ft=="number"||typeof Ft=="boolean"?""+Ft:Ut.link(Ft)})}),Object.keys(ot).forEach(function(Bt){var Ft=ot[Bt];It[Bt]=Bn(Ft,function(Ut,zt){return Ut.invoke(zt,Ft)})}),It}function Vl(Ne,$e,ot,It,Bt){var Ft=Ne.static,Ut=Ne.dynamic,zt=is(Ne,$e),_t=sa(Ne,Bt),Dt=ba(Ne,_t,Bt),vt=Va(Ne,Bt),lr=Ml(Ne,Bt),yr=Zs(Ne,Bt,zt);function Br(Ei){var Oi=Dt[Ei];Oi&&(lr[Ei]=Oi)}Br(ee),Br(Ji(Q));var Di=Object.keys(lr).length>0,ci={framebuffer:_t,draw:vt,shader:yr,state:lr,dirty:Di,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(ci.profile=ia(Ne,Bt),ci.uniforms=zo(ot,Bt),ci.drawVAO=ci.scopeVAO=vt.vao,!ci.drawVAO&&yr.program&&!zt&&Ot.angle_instanced_arrays&&vt.static.elements){var bi=!0,gn=yr.program.attributes.map(function(Ei){var Oi=$e.static[Ei];return bi=bi&&!!Oi,Oi});if(bi&&gn.length>0){var tn=qi.getVAO(qi.createVAO({attributes:gn,elements:vt.static.elements}));ci.drawVAO=new Qr(null,null,null,function(Ei,Oi){return Ei.link(tn)}),ci.useVAO=!0}}return zt?ci.useVAO=!0:ci.attributes=Qs($e,Bt),ci.context=al(It,Bt),ci}function ss(Ne,$e,ot){var It=Ne.shared,Bt=It.context,Ft=Ne.scope();Object.keys(ot).forEach(function(Ut){$e.save(Bt,"."+Ut);var zt=ot[Ut],_t=zt.append(Ne,$e);Array.isArray(_t)?Ft(Bt,".",Ut,"=[",_t.join(),"];"):Ft(Bt,".",Ut,"=",_t,";")}),$e(Ft)}function Vs(Ne,$e,ot,It){var Bt=Ne.shared,Ft=Bt.gl,Ut=Bt.framebuffer,zt;ui&&(zt=$e.def(Bt.extensions,".webgl_draw_buffers"));var _t=Ne.constants,Dt=_t.drawBuffer,vt=_t.backBuffer,lr;ot?lr=ot.append(Ne,$e):lr=$e.def(Ut,".next"),It||$e("if(",lr,"!==",Ut,".cur){"),$e("if(",lr,"){",Ft,".bindFramebuffer(",zr,",",lr,".framebuffer);"),ui&&$e(zt,".drawBuffersWEBGL(",Dt,"[",lr,".colorAttachments.length]);"),$e("}else{",Ft,".bindFramebuffer(",zr,",null);"),ui&&$e(zt,".drawBuffersWEBGL(",vt,");"),$e("}",Ut,".cur=",lr,";"),It||$e("}")}function Ys(Ne,$e,ot){var It=Ne.shared,Bt=It.gl,Ft=Ne.current,Ut=Ne.next,zt=It.current,_t=It.next,Dt=Ne.cond(zt,".dirty");fi.forEach(function(vt){var lr=Ji(vt);if(!(lr in ot.state)){var yr,Br;if(lr in Ut){yr=Ut[lr],Br=Ft[lr];var Di=S(Xi[lr].length,function(bi){return Dt.def(yr,"[",bi,"]")});Dt(Ne.cond(Di.map(function(bi,gn){return bi+"!=="+Br+"["+gn+"]"}).join("||")).then(Bt,".",mn[lr],"(",Di,");",Di.map(function(bi,gn){return Br+"["+gn+"]="+bi}).join(";"),";"))}else{yr=Dt.def(_t,".",lr);var ci=Ne.cond(yr,"!==",zt,".",lr);Dt(ci),lr in si?ci(Ne.cond(yr).then(Bt,".enable(",si[lr],");").else(Bt,".disable(",si[lr],");"),zt,".",lr,"=",yr,";"):ci(Bt,".",mn[lr],"(",yr,");",zt,".",lr,"=",yr,";")}}}),Object.keys(ot.state).length===0&&Dt(zt,".dirty=false;"),$e(Dt)}function wa(Ne,$e,ot,It){var Bt=Ne.shared,Ft=Ne.current,Ut=Bt.current,zt=Bt.gl,_t;Ti(Object.keys(ot)).forEach(function(Dt){var vt=ot[Dt];if(!(It&&!It(vt))){var lr=vt.append(Ne,$e);if(si[Dt]){var yr=si[Dt];Pn(vt)?(_t=Ne.link(lr,{stable:!0}),$e(Ne.cond(_t).then(zt,".enable(",yr,");").else(zt,".disable(",yr,");")),$e(Ut,".",Dt,"=",_t,";")):($e(Ne.cond(lr).then(zt,".enable(",yr,");").else(zt,".disable(",yr,");")),$e(Ut,".",Dt,"=",lr,";"))}else if(En(lr)){var Br=Ft[Dt];$e(zt,".",mn[Dt],"(",lr,");",lr.map(function(Di,ci){return Br+"["+ci+"]="+Di}).join(";"),";")}else Pn(vt)?(_t=Ne.link(lr,{stable:!0}),$e(zt,".",mn[Dt],"(",_t,");",Ut,".",Dt,"=",_t,";")):$e(zt,".",mn[Dt],"(",lr,");",Ut,".",Dt,"=",lr,";")}})}function ol(Ne,$e){Ii&&(Ne.instancing=$e.def(Ne.shared.extensions,".angle_instanced_arrays"))}function io(Ne,$e,ot,It,Bt){var Ft=Ne.shared,Ut=Ne.stats,zt=Ft.current,_t=Ft.timer,Dt=ot.profile;function vt(){return typeof performance=="undefined"?"Date.now()":"performance.now()"}var lr,yr;function Br(Ei){lr=$e.def(),Ei(lr,"=",vt(),";"),typeof Bt=="string"?Ei(Ut,".count+=",Bt,";"):Ei(Ut,".count++;"),ji&&(It?(yr=$e.def(),Ei(yr,"=",_t,".getNumPendingQueries();")):Ei(_t,".beginQuery(",Ut,");"))}function Di(Ei){Ei(Ut,".cpuTime+=",vt(),"-",lr,";"),ji&&(It?Ei(_t,".pushScopeStats(",yr,",",_t,".getNumPendingQueries(),",Ut,");"):Ei(_t,".endQuery();"))}function ci(Ei){var Oi=$e.def(zt,".profile");$e(zt,".profile=",Ei,";"),$e.exit(zt,".profile=",Oi,";")}var bi;if(Dt){if(Pn(Dt)){Dt.enable?(Br($e),Di($e.exit),ci("true")):ci("false");return}bi=Dt.append(Ne,$e),ci(bi)}else bi=$e.def(zt,".profile");var gn=Ne.block();Br(gn),$e("if(",bi,"){",gn,"}");var tn=Ne.block();Di(tn),$e.exit("if(",bi,"){",tn,"}")}function Y(Ne,$e,ot,It,Bt){var Ft=Ne.shared;function Ut(_t){switch(_t){case Co:case Ps:case hl:return 2;case Qa:case Ts:case Ul:return 3;case mo:case wo:case Lu:return 4;default:return 1}}function zt(_t,Dt,vt){var lr=Ft.gl,yr=$e.def(_t,".location"),Br=$e.def(Ft.attributes,"[",yr,"]"),Di=vt.state,ci=vt.buffer,bi=[vt.x,vt.y,vt.z,vt.w],gn=["buffer","normalized","offset","stride"];function tn(){$e("if(!",Br,".buffer){",lr,".enableVertexAttribArray(",yr,");}");var Oi=vt.type,Gi;if(vt.size?Gi=$e.def(vt.size,"||",Dt):Gi=Dt,$e("if(",Br,".type!==",Oi,"||",Br,".size!==",Gi,"||",gn.map(function(zn){return Br+"."+zn+"!=="+vt[zn]}).join("||"),"){",lr,".bindBuffer(",br,",",ci,".buffer);",lr,".vertexAttribPointer(",[yr,Gi,Oi,vt.normalized,vt.stride,vt.offset],");",Br,".type=",Oi,";",Br,".size=",Gi,";",gn.map(function(zn){return Br+"."+zn+"="+vt[zn]+";"}).join(""),"}"),Ii){var on=vt.divisor;$e("if(",Br,".divisor!==",on,"){",Ne.instancing,".vertexAttribDivisorANGLE(",[yr,on],");",Br,".divisor=",on,";}")}}function Ei(){$e("if(",Br,".buffer){",lr,".disableVertexAttribArray(",yr,");",Br,".buffer=null;","}if(",Ca.map(function(Oi,Gi){return Br+"."+Oi+"!=="+bi[Gi]}).join("||"),"){",lr,".vertexAttrib4f(",yr,",",bi,");",Ca.map(function(Oi,Gi){return Br+"."+Oi+"="+bi[Gi]+";"}).join(""),"}")}Di===La?tn():Di===Na?Ei():($e("if(",Di,"===",La,"){"),tn(),$e("}else{"),Ei(),$e("}"))}It.forEach(function(_t){var Dt=_t.name,vt=ot.attributes[Dt],lr;if(vt){if(!Bt(vt))return;lr=vt.append(Ne,$e)}else{if(!Bt(na))return;var yr=Ne.scopeAttrib(Dt);lr={},Object.keys(new Zr).forEach(function(Br){lr[Br]=$e.def(yr,".",Br)})}zt(Ne.link(_t),Ut(_t.info.type),lr)})}function D(Ne,$e,ot,It,Bt,Ft){for(var Ut=Ne.shared,zt=Ut.gl,_t,Dt=0;Dt1){for(var co=[],ts=[],so=0;so>1)",ci],");")}function on(){ot(bi,".drawArraysInstancedANGLE(",[yr,Br,Di,ci],");")}vt&&vt!=="null"?tn?Gi():(ot("if(",vt,"){"),Gi(),ot("}else{"),on(),ot("}")):on()}function Oi(){function Gi(){ot(Ft+".drawElements("+[yr,Di,gn,Br+"<<(("+gn+"-"+Ra+")>>1)"]+");")}function on(){ot(Ft+".drawArrays("+[yr,Br,Di]+");")}vt&&vt!=="null"?tn?Gi():(ot("if(",vt,"){"),Gi(),ot("}else{"),on(),ot("}")):on()}Ii&&(typeof ci!="number"||ci>=0)?typeof ci=="string"?(ot("if(",ci,">0){"),Ei(),ot("}else if(",ci,"<0){"),Oi(),ot("}")):Ei():Oi()}function O(Ne,$e,ot,It,Bt){var Ft=Cn(),Ut=Ft.proc("body",Bt);return Ii&&(Ft.instancing=Ut.def(Ft.shared.extensions,".angle_instanced_arrays")),Ne(Ft,Ut,ot,It),Ft.compile().body}function K(Ne,$e,ot,It){ol(Ne,$e),ot.useVAO?ot.drawVAO?$e(Ne.shared.vao,".setVAO(",ot.drawVAO.append(Ne,$e),");"):$e(Ne.shared.vao,".setVAO(",Ne.shared.vao,".targetVAO);"):($e(Ne.shared.vao,".setVAO(null);"),Y(Ne,$e,ot,It.attributes,function(){return!0})),D(Ne,$e,ot,It.uniforms,function(){return!0},!1),J(Ne,$e,$e,ot)}function de(Ne,$e){var ot=Ne.proc("draw",1);ol(Ne,ot),ss(Ne,ot,$e.context),Vs(Ne,ot,$e.framebuffer),Ys(Ne,ot,$e),wa(Ne,ot,$e.state),io(Ne,ot,$e,!1,!0);var It=$e.shader.progVar.append(Ne,ot);if(ot(Ne.shared.gl,".useProgram(",It,".program);"),$e.shader.program)K(Ne,ot,$e,$e.shader.program);else{ot(Ne.shared.vao,".setVAO(null);");var Bt=Ne.global.def("{}"),Ft=ot.def(It,".id"),Ut=ot.def(Bt,"[",Ft,"]");ot(Ne.cond(Ut).then(Ut,".call(this,a0);").else(Ut,"=",Bt,"[",Ft,"]=",Ne.link(function(zt){return O(K,Ne,$e,zt,1)}),"(",It,");",Ut,".call(this,a0);"))}Object.keys($e.state).length>0&&ot(Ne.shared.current,".dirty=true;"),Ne.shared.vao&&ot(Ne.shared.vao,".setVAO(null);")}function ne(Ne,$e,ot,It){Ne.batchId="a1",ol(Ne,$e);function Bt(){return!0}Y(Ne,$e,ot,It.attributes,Bt),D(Ne,$e,ot,It.uniforms,Bt,!1),J(Ne,$e,$e,ot)}function be(Ne,$e,ot,It){ol(Ne,$e);var Bt=ot.contextDep,Ft=$e.def(),Ut="a0",zt="a1",_t=$e.def();Ne.shared.props=_t,Ne.batchId=Ft;var Dt=Ne.scope(),vt=Ne.scope();$e(Dt.entry,"for(",Ft,"=0;",Ft,"<",zt,";++",Ft,"){",_t,"=",Ut,"[",Ft,"];",vt,"}",Dt.exit);function lr(gn){return gn.contextDep&&Bt||gn.propDep}function yr(gn){return!lr(gn)}if(ot.needsContext&&ss(Ne,vt,ot.context),ot.needsFramebuffer&&Vs(Ne,vt,ot.framebuffer),wa(Ne,vt,ot.state,lr),ot.profile&&lr(ot.profile)&&io(Ne,vt,ot,!1,!0),It)ot.useVAO?ot.drawVAO?lr(ot.drawVAO)?vt(Ne.shared.vao,".setVAO(",ot.drawVAO.append(Ne,vt),");"):Dt(Ne.shared.vao,".setVAO(",ot.drawVAO.append(Ne,Dt),");"):Dt(Ne.shared.vao,".setVAO(",Ne.shared.vao,".targetVAO);"):(Dt(Ne.shared.vao,".setVAO(null);"),Y(Ne,Dt,ot,It.attributes,yr),Y(Ne,vt,ot,It.attributes,lr)),D(Ne,Dt,ot,It.uniforms,yr,!1),D(Ne,vt,ot,It.uniforms,lr,!0),J(Ne,Dt,vt,ot);else{var Br=Ne.global.def("{}"),Di=ot.shader.progVar.append(Ne,vt),ci=vt.def(Di,".id"),bi=vt.def(Br,"[",ci,"]");vt(Ne.shared.gl,".useProgram(",Di,".program);","if(!",bi,"){",bi,"=",Br,"[",ci,"]=",Ne.link(function(gn){return O(ne,Ne,ot,gn,2)}),"(",Di,");}",bi,".call(this,a0[",Ft,"],",Ft,");")}}function Be(Ne,$e){var ot=Ne.proc("batch",2);Ne.batchId="0",ol(Ne,ot);var It=!1,Bt=!0;Object.keys($e.context).forEach(function(Br){It=It||$e.context[Br].propDep}),It||(ss(Ne,ot,$e.context),Bt=!1);var Ft=$e.framebuffer,Ut=!1;Ft?(Ft.propDep?It=Ut=!0:Ft.contextDep&&It&&(Ut=!0),Ut||Vs(Ne,ot,Ft)):Vs(Ne,ot,null),$e.state.viewport&&$e.state.viewport.propDep&&(It=!0);function zt(Br){return Br.contextDep&&It||Br.propDep}Ys(Ne,ot,$e),wa(Ne,ot,$e.state,function(Br){return!zt(Br)}),(!$e.profile||!zt($e.profile))&&io(Ne,ot,$e,!1,"a1"),$e.contextDep=It,$e.needsContext=Bt,$e.needsFramebuffer=Ut;var _t=$e.shader.progVar;if(_t.contextDep&&It||_t.propDep)be(Ne,ot,$e,null);else{var Dt=_t.append(Ne,ot);if(ot(Ne.shared.gl,".useProgram(",Dt,".program);"),$e.shader.program)be(Ne,ot,$e,$e.shader.program);else{ot(Ne.shared.vao,".setVAO(null);");var vt=Ne.global.def("{}"),lr=ot.def(Dt,".id"),yr=ot.def(vt,"[",lr,"]");ot(Ne.cond(yr).then(yr,".call(this,a0,a1);").else(yr,"=",vt,"[",lr,"]=",Ne.link(function(Br){return O(be,Ne,$e,Br,2)}),"(",Dt,");",yr,".call(this,a0,a1);"))}}Object.keys($e.state).length>0&&ot(Ne.shared.current,".dirty=true;"),Ne.shared.vao&&ot(Ne.shared.vao,".setVAO(null);")}function ht(Ne,$e){var ot=Ne.proc("scope",3);Ne.batchId="a2";var It=Ne.shared,Bt=It.current;if(ss(Ne,ot,$e.context),$e.framebuffer&&$e.framebuffer.append(Ne,ot),Ti(Object.keys($e.state)).forEach(function(zt){var _t=$e.state[zt],Dt=_t.append(Ne,ot);En(Dt)?Dt.forEach(function(vt,lr){pn(vt)?ot.set(Ne.next[zt],"["+lr+"]",vt):ot.set(Ne.next[zt],"["+lr+"]",Ne.link(vt,{stable:!0}))}):Pn(_t)?ot.set(It.next,"."+zt,Ne.link(Dt,{stable:!0})):ot.set(It.next,"."+zt,Dt)}),io(Ne,ot,$e,!0,!0),[Mt,mr,$t,Cr,Jt].forEach(function(zt){var _t=$e.draw[zt];if(_t){var Dt=_t.append(Ne,ot);pn(Dt)?ot.set(It.draw,"."+zt,Dt):ot.set(It.draw,"."+zt,Ne.link(Dt),{stable:!0})}}),Object.keys($e.uniforms).forEach(function(zt){var _t=$e.uniforms[zt].append(Ne,ot);Array.isArray(_t)&&(_t="["+_t.map(function(Dt){return pn(Dt)?Dt:Ne.link(Dt,{stable:!0})})+"]"),ot.set(It.uniforms,"["+Ne.link(bt.id(zt),{stable:!0})+"]",_t)}),Object.keys($e.attributes).forEach(function(zt){var _t=$e.attributes[zt].append(Ne,ot),Dt=Ne.scopeAttrib(zt);Object.keys(new Zr).forEach(function(vt){ot.set(Dt,"."+vt,_t[vt])})}),$e.scopeVAO){var Ft=$e.scopeVAO.append(Ne,ot);pn(Ft)?ot.set(It.vao,".targetVAO",Ft):ot.set(It.vao,".targetVAO",Ne.link(Ft,{stable:!0}))}function Ut(zt){var _t=$e.shader[zt];if(_t){var Dt=_t.append(Ne,ot);pn(Dt)?ot.set(It.shader,"."+zt,Dt):ot.set(It.shader,"."+zt,Ne.link(Dt,{stable:!0}))}}Ut(Ze),Ut(ut),Object.keys($e.state).length>0&&(ot(Bt,".dirty=true;"),ot.exit(Bt,".dirty=true;")),ot("a1(",Ne.shared.context,",a0,",Ne.batchId,");")}function Yt(Ne){if(!(typeof Ne!="object"||En(Ne))){for(var $e=Object.keys(Ne),ot=0;ot<$e.length;++ot)if(h.isDynamic(Ne[$e[ot]]))return!0;return!1}}function cr(Ne,$e,ot){var It=$e.static[ot];if(!It||!Yt(It))return;var Bt=Ne.global,Ft=Object.keys(It),Ut=!1,zt=!1,_t=!1,Dt=Ne.global.def("{}");Ft.forEach(function(lr){var yr=It[lr];if(h.isDynamic(yr)){typeof yr=="function"&&(yr=It[lr]=h.unbox(yr));var Br=Bn(yr,null);Ut=Ut||Br.thisDep,_t=_t||Br.propDep,zt=zt||Br.contextDep}else{switch(Bt(Dt,".",lr,"="),typeof yr){case"number":Bt(yr);break;case"string":Bt('"',yr,'"');break;case"object":Array.isArray(yr)&&Bt("[",yr.join(),"]");break;default:Bt(Ne.link(yr));break}Bt(";")}});function vt(lr,yr){Ft.forEach(function(Br){var Di=It[Br];if(h.isDynamic(Di)){var ci=lr.invoke(yr,Di);yr(Dt,".",Br,"=",ci,";")}})}$e.dynamic[ot]=new h.DynamicVariable(Zo,{thisDep:Ut,contextDep:zt,propDep:_t,ref:Dt,append:vt}),delete $e.static[ot]}function Nt(Ne,$e,ot,It,Bt){var Ft=Cn();Ft.stats=Ft.link(Bt),Object.keys($e.static).forEach(function(zt){cr(Ft,$e,zt)}),fr.forEach(function(zt){cr(Ft,Ne,zt)});var Ut=Vl(Ne,$e,ot,It,Ft);return Ut.shader.program&&(Ut.shader.program.attributes.sort(function(zt,_t){return zt.name<_t.name?-1:1}),Ut.shader.program.uniforms.sort(function(zt,_t){return zt.name<_t.name?-1:1})),de(Ft,Ut),ht(Ft,Ut),Be(Ft,Ut),e(Ft.compile(),{destroy:function(){Ut.shader.program.destroy()}})}return{next:qn,current:Xi,procs:function(){var Ne=Cn(),$e=Ne.proc("poll"),ot=Ne.proc("refresh"),It=Ne.block();$e(It),ot(It);var Bt=Ne.shared,Ft=Bt.gl,Ut=Bt.next,zt=Bt.current;It(zt,".dirty=false;"),Vs(Ne,$e),Vs(Ne,ot,null,!0);var _t;Ii&&(_t=Ne.link(Ii)),Ot.oes_vertex_array_object&&ot(Ne.link(Ot.oes_vertex_array_object),".bindVertexArrayOES(null);");var Dt=ot.def(Bt.attributes),vt=ot.def(0),lr=Ne.cond(vt,".buffer");lr.then(Ft,".enableVertexAttribArray(i);",Ft,".bindBuffer(",br,",",vt,".buffer.buffer);",Ft,".vertexAttribPointer(i,",vt,".size,",vt,".type,",vt,".normalized,",vt,".stride,",vt,".offset);").else(Ft,".disableVertexAttribArray(i);",Ft,".vertexAttrib4f(i,",vt,".x,",vt,".y,",vt,".z,",vt,".w);",vt,".buffer=null;");var yr=Ne.link(Lr.maxAttributes,{stable:!0});return ot("for(var i=0;i<",yr,";++i){",vt,"=",Dt,"[i];",lr,"}"),Ii&&ot("for(var i=0;i<",yr,";++i){",_t,".vertexAttribDivisorANGLE(i,",Dt,"[i].divisor);","}"),ot(Ne.shared.vao,".currentVAO=null;",Ne.shared.vao,".setVAO(",Ne.shared.vao,".targetVAO);"),Object.keys(si).forEach(function(Br){var Di=si[Br],ci=It.def(Ut,".",Br),bi=Ne.block();bi("if(",ci,"){",Ft,".enable(",Di,")}else{",Ft,".disable(",Di,")}",zt,".",Br,"=",ci,";"),ot(bi),$e("if(",ci,"!==",zt,".",Br,"){",bi,"}")}),Object.keys(mn).forEach(function(Br){var Di=mn[Br],ci=Xi[Br],bi,gn,tn=Ne.block();if(tn(Ft,".",Di,"("),En(ci)){var Ei=ci.length;bi=Ne.global.def(Ut,".",Br),gn=Ne.global.def(zt,".",Br),tn(S(Ei,function(Oi){return bi+"["+Oi+"]"}),");",S(Ei,function(Oi){return gn+"["+Oi+"]="+bi+"["+Oi+"];"}).join("")),$e("if(",S(Ei,function(Oi){return bi+"["+Oi+"]!=="+gn+"["+Oi+"]"}).join("||"),"){",tn,"}")}else bi=It.def(Ut,".",Br),gn=It.def(zt,".",Br),tn(bi,");",zt,".",Br,"=",bi,";"),$e("if(",bi,"!==",gn,"){",tn,"}");ot(tn)}),Ne.compile()}(),compile:Nt}}function Ia(){return{vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0}}var yo=34918,Da=34919,go=35007,Is=function(Me,bt){if(!bt.ext_disjoint_timer_query)return null;var Ot=[];function Lr(){return Ot.pop()||bt.ext_disjoint_timer_query.createQueryEXT()}function Vr(yi){Ot.push(yi)}var Or=[];function Nr(yi){var Ii=Lr();bt.ext_disjoint_timer_query.beginQueryEXT(go,Ii),Or.push(Ii),ji(Or.length-1,Or.length,yi)}function vi(){bt.ext_disjoint_timer_query.endQueryEXT(go)}function Ni(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var qi=[];function Si(){return qi.pop()||new Ni}function Vn(yi){qi.push(yi)}var Qi=[];function ji(yi,Ii,ui){var nn=Si();nn.startQueryIndex=yi,nn.endQueryIndex=Ii,nn.sum=0,nn.stats=ui,Qi.push(nn)}var oi=[],Tr=[];function Zr(){var yi,Ii,ui=Or.length;if(ui!==0){Tr.length=Math.max(Tr.length,ui+1),oi.length=Math.max(oi.length,ui+1),oi[0]=0,Tr[0]=0;var nn=0;for(yi=0,Ii=0;Ii=0;--O){var K=Nn[O];K&&K(oi,null,0)}Ot.flush(),Si&&Si.update()}function ba(){!ia&&Nn.length>0&&(ia=d.next(sa))}function is(){ia&&(d.cancel(sa),ia=null)}function Zs(O){O.preventDefault(),Vr=!0,is(),aa.forEach(function(K){K()})}function Va(O){Ot.getError(),Vr=!1,Or.restore(),qn.restore(),Ii.restore(),fi.restore(),si.restore(),mn.restore(),nn.restore(),Si&&Si.restore(),Ji.procs.refresh(),ba(),Ki.forEach(function(K){K()})}pn&&(pn.addEventListener(Fo,Zs,!1),pn.addEventListener(Uo,Va,!1));function Ml(){Nn.length=0,is(),pn&&(pn.removeEventListener(Fo,Zs),pn.removeEventListener(Uo,Va)),qn.clear(),mn.clear(),si.clear(),nn.clear(),fi.clear(),ui.clear(),Ii.clear(),Si&&Si.clear(),Cn.forEach(function(O){O()})}function zo(O){function K(Ft){var Ut=e({},Ft);delete Ut.uniforms,delete Ut.attributes,delete Ut.context,delete Ut.vao,"stencil"in Ut&&Ut.stencil.op&&(Ut.stencil.opBack=Ut.stencil.opFront=Ut.stencil.op,delete Ut.stencil.op);function zt(_t){if(_t in Ut){var Dt=Ut[_t];delete Ut[_t],Object.keys(Dt).forEach(function(vt){Ut[_t+"."+vt]=Dt[vt]})}}return zt("blend"),zt("depth"),zt("cull"),zt("stencil"),zt("polygonOffset"),zt("scissor"),zt("sample"),"vao"in Ft&&(Ut.vao=Ft.vao),Ut}function de(Ft,Ut){var zt={},_t={};return Object.keys(Ft).forEach(function(Dt){var vt=Ft[Dt];if(h.isDynamic(vt)){_t[Dt]=h.unbox(vt,Dt);return}else if(Ut&&Array.isArray(vt)){for(var lr=0;lr0)return Ne.call(this,It(Ft|0),Ft|0)}else if(Array.isArray(Ft)){if(Ft.length)return Ne.call(this,Ft,Ft.length)}else return Nt.call(this,Ft)}return e(Bt,{stats:Yt,destroy:function(){cr.destroy()}})}var Qs=mn.setFBO=zo({framebuffer:h.define.call(null,$s,"framebuffer")});function al(O,K){var de=0;Ji.procs.poll();var ne=K.color;ne&&(Ot.clearColor(+ne[0]||0,+ne[1]||0,+ne[2]||0,+ne[3]||0),de|=Ms),"depth"in K&&(Ot.clearDepth(+K.depth),de|=Xs),"stencil"in K&&(Ot.clearStencil(K.stencil|0),de|=Un),Ot.clear(de)}function Vl(O){if("framebuffer"in O)if(O.framebuffer&&O.framebuffer_reglType==="framebufferCube")for(var K=0;K<6;++K)Qs(e({framebuffer:O.framebuffer.faces[K]},O),al);else Qs(O,al);else al(null,O)}function ss(O){Nn.push(O);function K(){var de=dl(Nn,O);function ne(){var be=dl(Nn,ne);Nn[be]=Nn[Nn.length-1],Nn.length-=1,Nn.length<=0&&is()}Nn[de]=ne}return ba(),{cancel:K}}function Vs(){var O=Bi.viewport,K=Bi.scissor_box;O[0]=O[1]=K[0]=K[1]=0,oi.viewportWidth=oi.framebufferWidth=oi.drawingBufferWidth=O[2]=K[2]=Ot.drawingBufferWidth,oi.viewportHeight=oi.framebufferHeight=oi.drawingBufferHeight=O[3]=K[3]=Ot.drawingBufferHeight}function Ys(){oi.tick+=1,oi.time=ol(),Vs(),Ji.procs.poll()}function wa(){fi.refresh(),Vs(),Ji.procs.refresh(),Si&&Si.update()}function ol(){return(v()-Vn)/1e3}wa();function io(O,K){var de;switch(O){case"frame":return ss(K);case"lost":de=aa;break;case"restore":de=Ki;break;case"destroy":de=Cn;break;default:}return de.push(K),{cancel:function(){for(var ne=0;ne=0},read:Ui,destroy:Ml,_gl:Ot,_refresh:wa,poll:function(){Ys(),Si&&Si.update()},now:ol,stats:vi,getCachedCode:Y,preloadCachedCode:D});return bt.onDone(null,J),J}return Sc})});var $Oe=ye((w_r,JOe)=>{"use strict";var wUt=ey();JOe.exports=function(t){if(t?typeof t=="string"&&(t={container:t}):t={},YOe(t)?t={container:t}:TUt(t)?t={container:t}:AUt(t)?t={gl:t}:t=wUt(t,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0),t.pixelRatio||(t.pixelRatio=window.pixelRatio||1),t.gl)return t.gl;if(t.canvas&&(t.container=t.canvas.parentNode),t.container){if(typeof t.container=="string"){var r=document.querySelector(t.container);if(!r)throw Error("Element "+t.container+" is not found");t.container=r}YOe(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=KOe(),t.container.appendChild(t.canvas),ZOe(t))}else if(!t.canvas)if(typeof document!="undefined")t.container=document.body||document.documentElement,t.canvas=KOe(),t.container.appendChild(t.canvas),ZOe(t);else throw Error("Not DOM environment. Use headless-gl.");return t.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(n){try{t.gl=t.canvas.getContext(n,t.attrs)}catch(i){}return t.gl}),t.gl};function ZOe(e){if(e.container)if(e.container==document.body)document.body.style.width||(e.canvas.width=e.width||e.pixelRatio*window.innerWidth),document.body.style.height||(e.canvas.height=e.height||e.pixelRatio*window.innerHeight);else{var t=e.container.getBoundingClientRect();e.canvas.width=e.width||t.right-t.left,e.canvas.height=e.height||t.bottom-t.top}}function YOe(e){return typeof e.getContext=="function"&&"width"in e&&"height"in e}function TUt(e){return typeof e.nodeName=="string"&&typeof e.appendChild=="function"&&typeof e.getBoundingClientRect=="function"}function AUt(e){return typeof e.drawArrays=="function"||typeof e.drawElements=="function"}function KOe(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top=0,e.style.left=0,e}});var eBe=ye((T_r,QOe)=>{"use strict";var SUt=sK(),MUt=[32,126];QOe.exports=EUt;function EUt(e){e=e||{};var t=e.shape?e.shape:e.canvas?[e.canvas.width,e.canvas.height]:[512,512],r=e.canvas||document.createElement("canvas"),n=e.font,i=typeof e.step=="number"?[e.step,e.step]:e.step||[32,32],a=e.chars||MUt;if(n&&typeof n!="string"&&(n=SUt(n)),!Array.isArray(a))a=String(a).split("");else if(a.length===2&&typeof a[0]=="number"&&typeof a[1]=="number"){for(var o=[],s=a[0],l=0;s<=a[1];s++)o[l++]=String.fromCharCode(s);a=o}t=t.slice(),r.width=t[0],r.height=t[1];var u=r.getContext("2d");u.fillStyle="#000",u.fillRect(0,0,r.width,r.height),u.font=n,u.textAlign="center",u.textBaseline="middle",u.fillStyle="#fff";for(var c=i[0]/2,f=i[1]/2,s=0;st[0]-i[0]/2&&(c=i[0]/2,f+=i[1]);return r}});var fK=ye(Vh=>{"use strict";"use restrict";var cK=32;Vh.INT_BITS=cK;Vh.INT_MAX=2147483647;Vh.INT_MIN=-1<0)-(e<0)};Vh.abs=function(e){var t=e>>cK-1;return(e^t)-t};Vh.min=function(e,t){return t^(e^t)&-(e65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,t|=r,t|e>>1};Vh.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0};Vh.popCount=function(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24};function tBe(e){var t=32;return e&=-e,e&&t--,e&65535&&(t-=16),e&16711935&&(t-=8),e&252645135&&(t-=4),e&858993459&&(t-=2),e&1431655765&&(t-=1),t}Vh.countTrailingZeros=tBe;Vh.nextPow2=function(e){return e+=e===0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1};Vh.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e-(e>>>1)};Vh.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,e&=15,27030>>>e&1};var Dk=new Array(256);(function(e){for(var t=0;t<256;++t){var r=t,n=t,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=r&1,--i;e[t]=n<>>8&255]<<16|Dk[e>>>16&255]<<8|Dk[e>>>24&255]};Vh.interleave2=function(e,t){return e&=65535,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t&=65535,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1};Vh.deinterleave2=function(e,t){return e=e>>>t&1431655765,e=(e|e>>>1)&858993459,e=(e|e>>>2)&252645135,e=(e|e>>>4)&16711935,e=(e|e>>>16)&65535,e<<16>>16};Vh.interleave3=function(e,t,r){return e&=1023,e=(e|e<<16)&4278190335,e=(e|e<<8)&251719695,e=(e|e<<4)&3272356035,e=(e|e<<2)&1227133513,t&=1023,t=(t|t<<16)&4278190335,t=(t|t<<8)&251719695,t=(t|t<<4)&3272356035,t=(t|t<<2)&1227133513,e|=t<<1,r&=1023,r=(r|r<<16)&4278190335,r=(r|r<<8)&251719695,r=(r|r<<4)&3272356035,r=(r|r<<2)&1227133513,e|r<<2};Vh.deinterleave3=function(e,t){return e=e>>>t&1227133513,e=(e|e>>>2)&3272356035,e=(e|e>>>4)&251719695,e=(e|e>>>8)&4278190335,e=(e|e>>>16)&1023,e<<22>>22};Vh.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>tBe(e)+1}});var nBe=ye((S_r,iBe)=>{"use strict";function rBe(e,t,r){var n=e[r]|0;if(n<=0)return[];var i=new Array(n),a;if(r===e.length-1)for(a=0;a0)return kUt(e|0,t);break;case"object":if(typeof e.length=="number")return rBe(e,t,0);break}return[]}iBe.exports=CUt});var _Be=ye(mu=>{"use strict";var xx=fK(),Ev=nBe(),aBe=_2().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:Ev([32,0]),UINT16:Ev([32,0]),UINT32:Ev([32,0]),BIGUINT64:Ev([32,0]),INT8:Ev([32,0]),INT16:Ev([32,0]),INT32:Ev([32,0]),BIGINT64:Ev([32,0]),FLOAT:Ev([32,0]),DOUBLE:Ev([32,0]),DATA:Ev([32,0]),UINT8C:Ev([32,0]),BUFFER:Ev([32,0])});var LUt=typeof Uint8ClampedArray!="undefined",PUt=typeof BigUint64Array!="undefined",IUt=typeof BigInt64Array!="undefined",ad=window.__TYPEDARRAY_POOL;ad.UINT8C||(ad.UINT8C=Ev([32,0]));ad.BIGUINT64||(ad.BIGUINT64=Ev([32,0]));ad.BIGINT64||(ad.BIGINT64=Ev([32,0]));ad.BUFFER||(ad.BUFFER=Ev([32,0]));var Tz=ad.DATA,Az=ad.BUFFER;mu.free=function(t){if(aBe.isBuffer(t))Az[xx.log2(t.length)].push(t);else{if(Object.prototype.toString.call(t)!=="[object ArrayBuffer]"&&(t=t.buffer),!t)return;var r=t.length||t.byteLength,n=xx.log2(r)|0;Tz[n].push(t)}};function oBe(e){if(e){var t=e.length||e.byteLength,r=xx.log2(t);Tz[r].push(e)}}function RUt(e){oBe(e.buffer)}mu.freeUint8=mu.freeUint16=mu.freeUint32=mu.freeBigUint64=mu.freeInt8=mu.freeInt16=mu.freeInt32=mu.freeBigInt64=mu.freeFloat32=mu.freeFloat=mu.freeFloat64=mu.freeDouble=mu.freeUint8Clamped=mu.freeDataView=RUt;mu.freeArrayBuffer=oBe;mu.freeBuffer=function(t){Az[xx.log2(t.length)].push(t)};mu.malloc=function(t,r){if(r===void 0||r==="arraybuffer")return Bp(t);switch(r){case"uint8":return hK(t);case"uint16":return sBe(t);case"uint32":return lBe(t);case"int8":return uBe(t);case"int16":return cBe(t);case"int32":return fBe(t);case"float":case"float32":return hBe(t);case"double":case"float64":return dBe(t);case"uint8_clamped":return vBe(t);case"bigint64":return gBe(t);case"biguint64":return pBe(t);case"buffer":return yBe(t);case"data":case"dataview":return mBe(t);default:return null}return null};function Bp(t){var t=xx.nextPow2(t),r=xx.log2(t),n=Tz[r];return n.length>0?n.pop():new ArrayBuffer(t)}mu.mallocArrayBuffer=Bp;function hK(e){return new Uint8Array(Bp(e),0,e)}mu.mallocUint8=hK;function sBe(e){return new Uint16Array(Bp(2*e),0,e)}mu.mallocUint16=sBe;function lBe(e){return new Uint32Array(Bp(4*e),0,e)}mu.mallocUint32=lBe;function uBe(e){return new Int8Array(Bp(e),0,e)}mu.mallocInt8=uBe;function cBe(e){return new Int16Array(Bp(2*e),0,e)}mu.mallocInt16=cBe;function fBe(e){return new Int32Array(Bp(4*e),0,e)}mu.mallocInt32=fBe;function hBe(e){return new Float32Array(Bp(4*e),0,e)}mu.mallocFloat32=mu.mallocFloat=hBe;function dBe(e){return new Float64Array(Bp(8*e),0,e)}mu.mallocFloat64=mu.mallocDouble=dBe;function vBe(e){return LUt?new Uint8ClampedArray(Bp(e),0,e):hK(e)}mu.mallocUint8Clamped=vBe;function pBe(e){return PUt?new BigUint64Array(Bp(8*e),0,e):null}mu.mallocBigUint64=pBe;function gBe(e){return IUt?new BigInt64Array(Bp(8*e),0,e):null}mu.mallocBigInt64=gBe;function mBe(e){return new DataView(Bp(e),0,e)}mu.mallocDataView=mBe;function yBe(e){e=xx.nextPow2(e);var t=xx.log2(e),r=Az[t];return r.length>0?r.pop():new aBe(e)}mu.mallocBuffer=yBe;mu.clearCache=function(){for(var t=0;t<32;++t)ad.UINT8[t].length=0,ad.UINT16[t].length=0,ad.UINT32[t].length=0,ad.INT8[t].length=0,ad.INT16[t].length=0,ad.INT32[t].length=0,ad.FLOAT[t].length=0,ad.DOUBLE[t].length=0,ad.BIGUINT64[t].length=0,ad.BIGINT64[t].length=0,ad.UINT8C[t].length=0,Tz[t].length=0,Az[t].length=0}});var bBe=ye((E_r,xBe)=>{"use strict";var DUt=Object.prototype.toString;xBe.exports=function(e){var t;return DUt.call(e)==="[object Object]"&&(t=Object.getPrototypeOf(e),t===null||t===Object.getPrototypeOf({}))}});var dK=ye((k_r,wBe)=>{wBe.exports=function(t,r){r||(r=[0,""]),t=String(t);var n=parseFloat(t,10);return r[0]=n,r[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",r}});var SBe=ye((C_r,ABe)=>{"use strict";var FUt=dK();ABe.exports=TBe;var Fk=96;function vK(e,t){var r=FUt(getComputedStyle(e).getPropertyValue(t));return r[0]*TBe(r[1],e)}function zUt(e,t){var r=document.createElement("div");r.style["font-size"]="128"+e,t.appendChild(r);var n=vK(r,"font-size")/128;return t.removeChild(r),n}function TBe(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":return zUt(e,t);case"em":return vK(t,"font-size");case"rem":return vK(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return Fk;case"cm":return Fk/2.54;case"mm":return Fk/25.4;case"pt":return Fk/72;case"pc":return Fk/6}return 1}});var kBe=ye((L_r,EBe)=>{"use strict";EBe.exports=Ez;var qUt=Ez.canvas=document.createElement("canvas"),Sz=qUt.getContext("2d"),MBe=Mz([32,126]);Ez.createPairs=Mz;Ez.ascii=MBe;function Ez(e,t){Array.isArray(e)&&(e=e.join(", "));var r={},n,i=16,a=.05;t&&(t.length===2&&typeof t[0]=="number"?n=Mz(t):Array.isArray(t)?n=t:(t.o?n=Mz(t.o):t.pairs&&(n=t.pairs),t.fontSize&&(i=t.fontSize),t.threshold!=null&&(a=t.threshold))),n||(n=MBe),Sz.font=i+"px "+e;for(var o=0;oi*a){var c=(u-l)/i;r[s]=c*1e3}}return r}function Mz(e){for(var t=[],r=e[0];r<=e[1];r++)for(var n=String.fromCharCode(r),i=e[0];i{"use strict";PBe.exports=bx;bx.canvas=document.createElement("canvas");bx.cache={};function bx(o,t){t||(t={}),(typeof o=="string"||Array.isArray(o))&&(t.family=o);var r=Array.isArray(t.family)?t.family.join(", "):t.family;if(!r)throw Error("`family` must be defined");var n=t.size||t.fontSize||t.em||48,i=t.weight||t.fontWeight||"",a=t.style||t.fontStyle||"",o=[a,i,n].join(" ")+"px "+r,s=t.origin||"top";if(bx.cache[r]&&n<=bx.cache[r].em)return CBe(bx.cache[r],s);var l=t.canvas||bx.canvas,u=l.getContext("2d"),c={upper:t.upper!==void 0?t.upper:"H",lower:t.lower!==void 0?t.lower:"x",descent:t.descent!==void 0?t.descent:"p",ascent:t.ascent!==void 0?t.ascent:"h",tittle:t.tittle!==void 0?t.tittle:"i",overshoot:t.overshoot!==void 0?t.overshoot:"O"},f=Math.ceil(n*1.5);l.height=f,l.width=f*.5,u.font=o;var h="H",d={top:0};u.clearRect(0,0,f,f),u.textBaseline="top",u.fillStyle="black",u.fillText(h,0,0);var v=ry(u.getImageData(0,0,f,f));u.clearRect(0,0,f,f),u.textBaseline="bottom",u.fillText(h,0,f);var m=ry(u.getImageData(0,0,f,f));d.lineHeight=d.bottom=f-m+v,u.clearRect(0,0,f,f),u.textBaseline="alphabetic",u.fillText(h,0,f);var b=ry(u.getImageData(0,0,f,f)),p=f-b-1+v;d.baseline=d.alphabetic=p,u.clearRect(0,0,f,f),u.textBaseline="middle",u.fillText(h,0,f*.5);var k=ry(u.getImageData(0,0,f,f));d.median=d.middle=f-k-1+v-f*.5,u.clearRect(0,0,f,f),u.textBaseline="hanging",u.fillText(h,0,f*.5);var M=ry(u.getImageData(0,0,f,f));d.hanging=f-M-1+v-f*.5,u.clearRect(0,0,f,f),u.textBaseline="ideographic",u.fillText(h,0,f);var T=ry(u.getImageData(0,0,f,f));if(d.ideographic=f-T-1+v,c.upper&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.upper,0,0),d.upper=ry(u.getImageData(0,0,f,f)),d.capHeight=d.baseline-d.upper),c.lower&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.lower,0,0),d.lower=ry(u.getImageData(0,0,f,f)),d.xHeight=d.baseline-d.lower),c.tittle&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.tittle,0,0),d.tittle=ry(u.getImageData(0,0,f,f))),c.ascent&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.ascent,0,0),d.ascent=ry(u.getImageData(0,0,f,f))),c.descent&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.descent,0,0),d.descent=LBe(u.getImageData(0,0,f,f))),c.overshoot){u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.overshoot,0,0);var L=LBe(u.getImageData(0,0,f,f));d.overshoot=L-p}for(var x in d)d[x]/=n;return d.em=n,bx.cache[r]=d,CBe(d,s)}function CBe(e,t){var r={};typeof t=="string"&&(t=e[t]);for(var n in e)n!=="em"&&(r[n]=e[n]-t);return r}function ry(e){for(var t=e.height,r=e.data,n=3;n0;n-=4)if(r[n]!==0)return Math.floor((n-3)*.25/t)}});var zBe=ye((I_r,FBe)=>{"use strict";var _5=WOe(),OUt=ey(),BUt=XOe(),NUt=$Oe(),UUt=XY(),pK=ox(),VUt=eBe(),wx=_Be(),GUt=s5(),HUt=bBe(),jUt=dK(),WUt=SBe(),XUt=kBe(),ZUt=Nh(),YUt=IBe(),KUt=nw(),JUt=fK(),RBe=JUt.nextPow2,DBe=new UUt,Cz=!1;document.body&&(kz=document.body.appendChild(document.createElement("div")),kz.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(kz).fontStretch&&(Cz=!0),document.body.removeChild(kz));var kz,xc=function(t){$Ut(t)?(t={regl:t},this.gl=t.regl._gl):this.gl=NUt(t),this.shader=DBe.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=t.regl||BUt({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),DBe.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(HUt(t)?t:{})};xc.prototype.createShader=function(){var t=this.regl,r=t({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:t.prop("count"),offset:t.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:t.this("sizeBuffer")},width:{offset:0,stride:8,buffer:t.this("sizeBuffer")},char:t.this("charBuffer"),position:t.this("position")},uniforms:{atlasSize:function(i,a){return[a.atlas.width,a.atlas.height]},atlasDim:function(i,a){return[a.atlas.cols,a.atlas.rows]},atlas:function(i,a){return a.atlas.texture},charStep:function(i,a){return a.atlas.step},em:function(i,a){return a.atlas.em},color:t.prop("color"),opacity:t.prop("opacity"),viewport:t.this("viewportArray"),scale:t.this("scale"),align:t.prop("align"),baseline:t.prop("baseline"),translate:t.this("translate"),positionOffset:t.prop("positionOffset")},primitive:"points",viewport:t.this("viewport"),vert:` precision highp float; attribute float width, charOffset, char; attribute vec2 position; @@ -2705,17 +2705,17 @@ void main() { // color.rgb += (1. - color.rgb) * (1. - mask.rgb); gl_FragColor = color; - }`}),n={};return{regl:t,draw:r,atlas:n}};xc.prototype.update=function(t){var r=this;if(typeof t=="string")t={text:t};else if(!t)return;t=PUt(t,{position:"position positions coord coords coordinates",font:"font fontFace fontface typeface cssFont css-font family fontFamily",fontSize:"fontSize fontsize size font-size",text:"text texts chars characters value values symbols",align:"align alignment textAlign textbaseline",baseline:"baseline textBaseline textbaseline",direction:"dir direction textDirection",color:"color colour fill fill-color fillColor textColor textcolor",kerning:"kerning kern",range:"range dataBox",viewport:"vp viewport viewBox viewbox viewPort",opacity:"opacity alpha transparency visible visibility opaque",offset:"offset positionOffset padding shift indent indentation"},!0),t.opacity!=null&&(Array.isArray(t.opacity)?this.opacity=t.opacity.map(function(Le){return parseFloat(Le)}):this.opacity=parseFloat(t.opacity)),t.viewport!=null&&(this.viewport=zUt(t.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),this.viewport==null&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),t.kerning!=null&&(this.kerning=t.kerning),t.offset!=null&&(typeof t.offset=="number"&&(t.offset=[t.offset,0]),this.positionOffset=GUt(t.offset)),t.direction&&(this.direction=t.direction),t.range&&(this.range=t.range,this.scale=[1/(t.range[2]-t.range[0]),1/(t.range[3]-t.range[1])],this.translate=[-t.range[0],-t.range[1]]),t.scale&&(this.scale=t.scale),t.translate&&(this.translate=t.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!t.font&&(t.font=xc.baseFontSize+"px sans-serif");var n=!1,i=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach(function(Le,ge){if(typeof Le=="string")try{Le=_5.parse(Le)}catch(je){Le=_5.parse(xc.baseFontSize+"px "+Le)}else{var ie=Le.style,Se=Le.weight,Ee=Le.stretch,Ae=Le.variant;Le=_5.parse(_5.stringify(Le)),ie&&(Le.style=ie),Se&&(Le.weight=Se),Ee&&(Le.stretch=Ee),Ae&&(Le.variant=Ae)}var Be=_5.stringify({size:xc.baseFontSize,family:Le.family,stretch:Cz?Le.stretch:void 0,variant:Le.variant,weight:Le.weight,style:Le.style}),Pe=qUt(Le.size),me=Math.round(Pe[0]*BUt(Pe[1]));if(me!==r.fontSize[ge]&&(i=!0,r.fontSize[ge]=me),(!r.font[ge]||Be!=r.font[ge].baseString)&&(n=!0,r.font[ge]=xc.fonts[Be],!r.font[ge])){var De=Le.family.join(", "),ce=[Le.style];Le.style!=Le.variant&&ce.push(Le.variant),Le.variant!=Le.weight&&ce.push(Le.weight),Cz&&Le.weight!=Le.stretch&&ce.push(Le.stretch),r.font[ge]={baseString:Be,family:De,weight:Le.weight,stretch:Le.stretch,style:Le.style,variant:Le.variant,width:{},kerning:{},metrics:VUt(De,{origin:"top",fontSize:xc.baseFontSize,fontStyle:ce.join(" ")})},xc.fonts[Be]=r.font[ge]}}),(n||i)&&this.font.forEach(function(Le,ge){var ie=_5.stringify({size:r.fontSize[ge],family:Le.family,stretch:Cz?Le.stretch:void 0,variant:Le.variant,weight:Le.weight,style:Le.style});if(r.fontAtlas[ge]=r.shader.atlas[ie],!r.fontAtlas[ge]){var Se=Le.metrics;r.shader.atlas[ie]=r.fontAtlas[ge]={fontString:ie,step:Math.ceil(r.fontSize[ge]*Se.bottom*.5)*2,em:r.fontSize[ge],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:r.regl.texture()}}t.text==null&&(t.text=r.text)}),typeof t.text=="string"&&t.position&&t.position.length>2){for(var a=Array(t.position.length*.5),o=0;o2){for(var u=!t.position[0].length,c=wx.mallocFloat(this.count*2),f=0,h=0;f1?r.align[ge]:r.align[0]:r.align;if(typeof ie=="number")return ie;switch(ie){case"right":case"end":return-Le;case"center":case"centre":case"middle":return-Le*.5}return 0})),this.baseline==null&&t.baseline==null&&(t.baseline=0),t.baseline!=null&&(this.baseline=t.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(Le,ge){var ie=(r.font[ge]||r.font[0]).metrics,Se=0;return Se+=ie.bottom*.5,typeof Le=="number"?Se+=Le-ie.baseline:Se+=-ie[Le],Se*=-1,Se})),t.color!=null)if(t.color||(t.color="transparent"),typeof t.color=="string"||!isNaN(t.color))this.color=pK(t.color,"uint8");else{var G;if(typeof t.color[0]=="number"&&t.color.length>this.counts.length){var Z=t.color.length;G=wx.mallocUint8(Z);for(var j=(t.color.subarray||t.color.slice).bind(t.color),N=0;N4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(oe){var _e=Math.max(this.position.length*.5||0,this.color.length*.25||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,this.positionOffset.length*.5||0);this.batch=Array(_e);for(var Ce=0;Ce1?this.counts[Ce]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[Ce]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(Ce*4,Ce*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[Ce]:this.opacity,baseline:this.baselineOffset[Ce]!=null?this.baselineOffset[Ce]:this.baselineOffset[0],align:this.align?this.alignOffset[Ce]!=null?this.alignOffset[Ce]:this.alignOffset[0]:0,atlas:this.fontAtlas[Ce]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(Ce*2,Ce*2+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]}};xc.prototype.destroy=function(){};xc.prototype.kerning=!0;xc.prototype.position={constant:new Float32Array(2)};xc.prototype.translate=null;xc.prototype.scale=null;xc.prototype.font=null;xc.prototype.text="";xc.prototype.positionOffset=[0,0];xc.prototype.opacity=1;xc.prototype.color=new Uint8Array([0,0,0,255]);xc.prototype.alignOffset=[0,0];xc.maxAtlasSize=1024;xc.atlasCanvas=document.createElement("canvas");xc.atlasContext=xc.atlasCanvas.getContext("2d",{alpha:!1});xc.baseFontSize=64;xc.fonts={};function jUt(e){return typeof e=="function"&&e._gl&&e.prop&&e.texture&&e.buffer}RBe.exports=xc});var FBe=ye((gK,mK)=>{(function(e,t){typeof gK=="object"&&typeof mK!="undefined"?mK.exports=t():e.createREGL=t()})(gK,function(){"use strict";var e=function(Me,bt){for(var zt=Object.keys(bt),Rr=0;Rr1&&bt===zt&&(bt==='"'||bt==="'"))return['"'+o(Me.substr(1,Me.length-2))+'"'];var Rr=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(Me);if(Rr)return s(Me.substr(0,Rr.index)).concat(s(Rr[1])).concat(s(Me.substr(Rr.index+Rr[0].length)));var jr=Me.split(".");if(jr.length===1)return['"'+o(Me)+'"'];for(var Nr=[],Gr=0;Gr65535)<<4,Me>>>=bt,zt=(Me>255)<<3,Me>>>=zt,bt|=zt,zt=(Me>15)<<2,Me>>>=zt,bt|=zt,zt=(Me>3)<<1,Me>>>=zt,bt|=zt,bt|Me>>1}function N(){var Me=M(8,function(){return[]});function bt(Nr){var Gr=Z(Nr),mi=Me[j(Gr)>>2];return mi.length>0?mi.pop():new ArrayBuffer(Gr)}function zt(Nr){Me[j(Nr.byteLength)>>2].push(Nr)}function Rr(Nr,Gr){var mi=null;switch(Nr){case g:mi=new Int8Array(bt(Gr),0,Gr);break;case P:mi=new Uint8Array(bt(Gr),0,Gr);break;case A:mi=new Int16Array(bt(2*Gr),0,Gr);break;case z:mi=new Uint16Array(bt(2*Gr),0,Gr);break;case O:mi=new Int32Array(bt(4*Gr),0,Gr);break;case U:mi=new Uint32Array(bt(4*Gr),0,Gr);break;case G:mi=new Float32Array(bt(4*Gr),0,Gr);break;default:return null}return mi.length!==Gr?mi.subarray(0,Gr):mi}function jr(Nr){zt(Nr.buffer)}return{alloc:bt,free:zt,allocType:Rr,freeType:jr}}var H=N();H.zero=N();var re=3408,oe=3410,_e=3411,Ce=3412,Le=3413,ge=3414,ie=3415,Se=33901,Ee=33902,Ae=3379,Be=3386,Pe=34921,me=36347,De=36348,ce=35661,je=35660,lt=34930,pt=36349,Vt=34076,ot=34024,ut=7936,Wt=7937,Nt=7938,$t=35724,sr=34047,Tr=36063,fr=34852,$e=3553,St=34067,Qt=34069,Gt=33984,_t=6408,It=5126,mt=5121,er=36160,lr=36053,wr=36064,Lr=16384,ti=function(Me,bt){var zt=1;bt.ext_texture_filter_anisotropic&&(zt=Me.getParameter(sr));var Rr=1,jr=1;bt.webgl_draw_buffers&&(Rr=Me.getParameter(fr),jr=Me.getParameter(Tr));var Nr=!!bt.oes_texture_float;if(Nr){var Gr=Me.createTexture();Me.bindTexture($e,Gr),Me.texImage2D($e,0,_t,1,1,0,_t,It,null);var mi=Me.createFramebuffer();if(Me.bindFramebuffer(er,mi),Me.framebufferTexture2D(er,wr,$e,Gr,0),Me.bindTexture($e,null),Me.checkFramebufferStatus(er)!==lr)Nr=!1;else{Me.viewport(0,0,1,1),Me.clearColor(1,0,0,1),Me.clear(Lr);var Ui=H.allocType(It,4);Me.readPixels(0,0,1,1,_t,It,Ui),Me.getError()?Nr=!1:(Me.deleteFramebuffer(mi),Me.deleteTexture(Gr),Nr=Ui[0]===1),H.freeType(Ui)}}var qi=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),Ei=!0;if(!qi){var Hn=Me.createTexture(),en=H.allocType(mt,36);Me.activeTexture(Gt),Me.bindTexture(St,Hn),Me.texImage2D(Qt,0,_t,3,3,0,_t,mt,en),H.freeType(en),Me.bindTexture(St,null),Me.deleteTexture(Hn),Ei=!Me.getError()}return{colorBits:[Me.getParameter(oe),Me.getParameter(_e),Me.getParameter(Ce),Me.getParameter(Le)],depthBits:Me.getParameter(ge),stencilBits:Me.getParameter(ie),subpixelBits:Me.getParameter(re),extensions:Object.keys(bt).filter(function(Wi){return!!bt[Wi]}),maxAnisotropic:zt,maxDrawbuffers:Rr,maxColorAttachments:jr,pointSizeDims:Me.getParameter(Se),lineWidthDims:Me.getParameter(Ee),maxViewportDims:Me.getParameter(Be),maxCombinedTextureUnits:Me.getParameter(ce),maxCubeMapSize:Me.getParameter(Vt),maxRenderbufferSize:Me.getParameter(ot),maxTextureUnits:Me.getParameter(lt),maxTextureSize:Me.getParameter(Ae),maxAttributes:Me.getParameter(Pe),maxVertexUniforms:Me.getParameter(me),maxVertexTextureUnits:Me.getParameter(je),maxVaryingVectors:Me.getParameter(De),maxFragmentUniforms:Me.getParameter(pt),glsl:Me.getParameter($t),renderer:Me.getParameter(Wt),vendor:Me.getParameter(ut),version:Me.getParameter(Nt),readFloat:Nr,npotTextureCube:Ei}},Br=function(Me){return Me instanceof Uint8Array||Me instanceof Uint16Array||Me instanceof Uint32Array||Me instanceof Int8Array||Me instanceof Int16Array||Me instanceof Int32Array||Me instanceof Float32Array||Me instanceof Float64Array||Me instanceof Uint8ClampedArray};function Vr(Me){return!!Me&&typeof Me=="object"&&Array.isArray(Me.shape)&&Array.isArray(Me.stride)&&typeof Me.offset=="number"&&Me.shape.length===Me.stride.length&&(Array.isArray(Me.data)||Br(Me.data))}var dt=function(Me){return Object.keys(Me).map(function(bt){return Me[bt]})},Ge={shape:xe,flatten:Ie};function Je(Me,bt,zt){for(var Rr=0;Rr0){var Bn;if(Array.isArray(Yr[0])){Zi=Fn(Yr);for(var hi=1,li=1;li0){if(typeof hi[0]=="number"){var Vi=H.allocType(ci.dtype,hi.length);Er(Vi,hi),Zi(Vi,mn),H.freeType(Vi)}else if(Array.isArray(hi[0])||Br(hi[0])){Ji=Fn(hi);var Ni=qn(hi,Ji,ci.dtype);Zi(Ni,mn),H.freeType(Ni)}}}else if(Vr(hi)){Ji=hi.shape;var pn=hi.stride,Vn=0,na=0,Ki=0,kn=0;Ji.length===1?(Vn=Ji[0],na=1,Ki=pn[0],kn=0):Ji.length===2&&(Vn=Ji[0],na=Ji[1],Ki=pn[0],kn=pn[1]);var ta=Array.isArray(hi.data)?ci.dtype:nr(hi.data),oa=H.allocType(ta,Vn*na);Xr(oa,hi.data,Vn,na,Ki,kn,hi.offset),Zi(oa,mn),H.freeType(oa)}return an}return xi||an(Mr),an._reglType="buffer",an._buffer=ci,an.subdata=Bn,zt.profile&&(an.stats=ci.stats),an.destroy=function(){en(ci)},an}function si(){dt(Nr).forEach(function(Mr){Mr.buffer=Me.createBuffer(),Me.bindBuffer(Mr.type,Mr.buffer),Me.bufferData(Mr.type,Mr.persistentData||Mr.byteLength,Mr.usage)})}return zt.profile&&(bt.getTotalBufferSize=function(){var Mr=0;return Object.keys(Nr).forEach(function(Yr){Mr+=Nr[Yr].stats.size}),Mr}),{create:Wi,createStream:Ui,destroyStream:qi,clear:function(){dt(Nr).forEach(en),mi.forEach(en)},getBuffer:function(Mr){return Mr&&Mr._buffer instanceof Gr?Mr._buffer:null},restore:si,_initBuffer:Hn}}var Qr=0,Oi=0,$i=1,tn=1,fn=4,yn=4,Sn={points:Qr,point:Oi,lines:$i,line:tn,triangles:fn,triangle:yn,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Ba=0,ua=1,ma=4,Wa=5120,Fa=5121,Xo=5122,da=5123,Wn=5124,Ha=5125,vo=34963,jn=35040,Mt=35044;function kr(Me,bt,zt,Rr){var jr={},Nr=0,Gr={uint8:Fa,uint16:da};bt.oes_element_index_uint&&(Gr.uint32=Ha);function mi(si){this.id=Nr++,jr[this.id]=this,this.buffer=si,this.primType=ma,this.vertCount=0,this.type=0}mi.prototype.bind=function(){this.buffer.bind()};var Ui=[];function qi(si){var Mr=Ui.pop();return Mr||(Mr=new mi(zt.create(null,vo,!0,!1)._buffer)),Hn(Mr,si,jn,-1,-1,0,0),Mr}function Ei(si){Ui.push(si)}function Hn(si,Mr,Yr,xi,Ri,ci,an){si.buffer.bind();var Zi;if(Mr){var Bn=an;!an&&(!Br(Mr)||Vr(Mr)&&!Br(Mr.data))&&(Bn=bt.oes_element_index_uint?Ha:da),zt._initBuffer(si.buffer,Mr,Yr,Bn,3)}else Me.bufferData(vo,ci,Yr),si.buffer.dtype=Zi||Fa,si.buffer.usage=Yr,si.buffer.dimension=3,si.buffer.byteLength=ci;if(Zi=an,!an){switch(si.buffer.dtype){case Fa:case Wa:Zi=Fa;break;case da:case Xo:Zi=da;break;case Ha:case Wn:Zi=Ha;break;default:}si.buffer.dtype=Zi}si.type=Zi;var hi=Ri;hi<0&&(hi=si.buffer.byteLength,Zi===da?hi>>=1:Zi===Ha&&(hi>>=2)),si.vertCount=hi;var li=xi;if(xi<0){li=ma;var mn=si.buffer.dimension;mn===1&&(li=Ba),mn===2&&(li=ua),mn===3&&(li=ma)}si.primType=li}function en(si){Rr.elementsCount--,delete jr[si.id],si.buffer.destroy(),si.buffer=null}function Wi(si,Mr){var Yr=zt.create(null,vo,!0),xi=new mi(Yr._buffer);Rr.elementsCount++;function Ri(ci){if(!ci)Yr(),xi.primType=ma,xi.vertCount=0,xi.type=Fa;else if(typeof ci=="number")Yr(ci),xi.primType=ma,xi.vertCount=ci|0,xi.type=Fa;else{var an=null,Zi=Mt,Bn=-1,hi=-1,li=0,mn=0;Array.isArray(ci)||Br(ci)||Vr(ci)?an=ci:("data"in ci&&(an=ci.data),"usage"in ci&&(Zi=On[ci.usage]),"primitive"in ci&&(Bn=Sn[ci.primitive]),"count"in ci&&(hi=ci.count|0),"type"in ci&&(mn=Gr[ci.type]),"length"in ci?li=ci.length|0:(li=hi,mn===da||mn===Xo?li*=2:(mn===Ha||mn===Wn)&&(li*=4))),Hn(xi,an,Zi,Bn,hi,li,mn)}return Ri}return Ri(si),Ri._reglType="elements",Ri._elements=xi,Ri.subdata=function(ci,an){return Yr.subdata(ci,an),Ri},Ri.destroy=function(){en(xi)},Ri}return{create:Wi,createStream:qi,destroyStream:Ei,getElements:function(si){return typeof si=="function"&&si._elements instanceof mi?si._elements:null},clear:function(){dt(jr).forEach(en)}}}var Jr=new Float32Array(1),vi=new Uint32Array(Jr.buffer),hn=5123;function An(Me){for(var bt=H.allocType(hn,Me.length),zt=0;zt>>31<<15,Nr=(Rr<<1>>>24)-127,Gr=Rr>>13&1023;if(Nr<-24)bt[zt]=jr;else if(Nr<-14){var mi=-14-Nr;bt[zt]=jr+(Gr+1024>>mi)}else Nr>15?bt[zt]=jr+31744:bt[zt]=jr+(Nr+15<<10)+Gr}return bt}function Mn(Me){return Array.isArray(Me)||Br(Me)}var Li=34467,_n=3553,ya=34067,$n=34069,Ma=6408,_o=6406,No=6407,po=6409,Lo=6410,ko=32854,Ds=32855,Fs=36194,ll=32819,ul=32820,zl=33635,us=34042,il=6402,As=34041,cl=35904,Ks=35906,zs=36193,Io=33776,ls=33777,Yl=33778,Su=33779,nc=35986,bs=35987,Rn=34798,_a=35840,Vu=35841,Ol=35842,xo=35843,Kl=36196,Ns=5121,Hl=5123,ac=5125,aa=5126,Oo=10242,qo=10243,ql=10497,Pc=33071,Do=33648,rf=10240,Vf=10241,pl=9728,Zc=9729,Jl=9984,Os=9985,yu=9986,oc=9987,Cf=33170,sc=4352,jh=4353,Lf=4354,cs=34046,nf=3317,Gf=37440,$l=37441,fl=37443,lc=37444,Fu=33984,Es=[Jl,yu,Os,oc],Hs=[0,po,Lo,No,Ma],Go={};Go[po]=Go[_o]=Go[il]=1,Go[As]=Go[Lo]=2,Go[No]=Go[cl]=3,Go[Ma]=Go[Ks]=4;function ps(Me){return"[object "+Me+"]"}var uc=ps("HTMLCanvasElement"),xl=ps("OffscreenCanvas"),Gu=ps("CanvasRenderingContext2D"),qs=ps("ImageBitmap"),od=ps("HTMLImageElement"),Po=ps("HTMLVideoElement"),sd=Object.keys(ke).concat([uc,xl,Gu,qs,od,Po]),Ko=[];Ko[Ns]=1,Ko[aa]=4,Ko[zs]=2,Ko[Hl]=2,Ko[ac]=4;var Pa=[];Pa[ko]=2,Pa[Ds]=2,Pa[Fs]=2,Pa[As]=4,Pa[Io]=.5,Pa[ls]=.5,Pa[Yl]=1,Pa[Su]=1,Pa[nc]=.5,Pa[bs]=1,Pa[Rn]=1,Pa[_a]=.5,Pa[Vu]=.25,Pa[Ol]=.5,Pa[xo]=.25,Pa[Kl]=.5;function af(Me){return Array.isArray(Me)&&(Me.length===0||typeof Me[0]=="number")}function Hu(Me){if(!Array.isArray(Me))return!1;var bt=Me.length;return!(bt===0||!Mn(Me[0]))}function bl(Me){return Object.prototype.toString.call(Me)}function Hf(Me){return bl(Me)===uc}function Ic(Me){return bl(Me)===xl}function yf(Me){return bl(Me)===Gu}function Bl(Me){return bl(Me)===qs}function Ah(Me){return bl(Me)===od}function Qf(Me){return bl(Me)===Po}function _f(Me){if(!Me)return!1;var bt=bl(Me);return sd.indexOf(bt)>=0?!0:af(Me)||Hu(Me)||Vr(Me)}function Yc(Me){return ke[Object.prototype.toString.call(Me)]|0}function eh(Me,bt){var zt=bt.length;switch(Me.type){case Ns:case Hl:case ac:case aa:var Rr=H.allocType(Me.type,zt);Rr.set(bt),Me.data=Rr;break;case zs:Me.data=An(bt);break;default:}}function th(Me,bt){return H.allocType(Me.type===zs?aa:Me.type,bt)}function ju(Me,bt){Me.type===zs?(Me.data=An(bt),H.freeType(bt)):Me.data=bt}function jf(Me,bt,zt,Rr,jr,Nr){for(var Gr=Me.width,mi=Me.height,Ui=Me.channels,qi=Gr*mi*Ui,Ei=th(Me,qi),Hn=0,en=0;en=1;)mi+=Gr*Ui*Ui,Ui/=2;return mi}else return Gr*zt*Rr}function of(Me,bt,zt,Rr,jr,Nr,Gr){var mi={"don't care":sc,"dont care":sc,nice:Lf,fast:jh},Ui={repeat:ql,clamp:Pc,mirror:Do},qi={nearest:pl,linear:Zc},Ei=e({mipmap:oc,"nearest mipmap nearest":Jl,"linear mipmap nearest":Os,"nearest mipmap linear":yu,"linear mipmap linear":oc},qi),Hn={none:0,browser:lc},en={uint8:Ns,rgba4:ll,rgb565:zl,"rgb5 a1":ul},Wi={alpha:_o,luminance:po,"luminance alpha":Lo,rgb:No,rgba:Ma,rgba4:ko,"rgb5 a1":Ds,rgb565:Fs},si={};bt.ext_srgb&&(Wi.srgb=cl,Wi.srgba=Ks),bt.oes_texture_float&&(en.float32=en.float=aa),bt.oes_texture_half_float&&(en.float16=en["half float"]=zs),bt.webgl_depth_texture&&(e(Wi,{depth:il,"depth stencil":As}),e(en,{uint16:Hl,uint32:ac,"depth stencil":us})),bt.webgl_compressed_texture_s3tc&&e(si,{"rgb s3tc dxt1":Io,"rgba s3tc dxt1":ls,"rgba s3tc dxt3":Yl,"rgba s3tc dxt5":Su}),bt.webgl_compressed_texture_atc&&e(si,{"rgb atc":nc,"rgba atc explicit alpha":bs,"rgba atc interpolated alpha":Rn}),bt.webgl_compressed_texture_pvrtc&&e(si,{"rgb pvrtc 4bppv1":_a,"rgb pvrtc 2bppv1":Vu,"rgba pvrtc 4bppv1":Ol,"rgba pvrtc 2bppv1":xo}),bt.webgl_compressed_texture_etc1&&(si["rgb etc1"]=Kl);var Mr=Array.prototype.slice.call(Me.getParameter(Li));Object.keys(si).forEach(function(ne){var we=si[ne];Mr.indexOf(we)>=0&&(Wi[ne]=we)});var Yr=Object.keys(Wi);zt.textureFormats=Yr;var xi=[];Object.keys(Wi).forEach(function(ne){var we=Wi[ne];xi[we]=ne});var Ri=[];Object.keys(en).forEach(function(ne){var we=en[ne];Ri[we]=ne});var ci=[];Object.keys(qi).forEach(function(ne){var we=qi[ne];ci[we]=ne});var an=[];Object.keys(Ei).forEach(function(ne){var we=Ei[ne];an[we]=ne});var Zi=[];Object.keys(Ui).forEach(function(ne){var we=Ui[ne];Zi[we]=ne});var Bn=Yr.reduce(function(ne,we){var Ue=Wi[we];return Ue===po||Ue===_o||Ue===po||Ue===Lo||Ue===il||Ue===As||bt.ext_srgb&&(Ue===cl||Ue===Ks)?ne[Ue]=Ue:Ue===Ds||we.indexOf("rgba")>=0?ne[Ue]=Ma:ne[Ue]=No,ne},{});function hi(){this.internalformat=Ma,this.format=Ma,this.type=Ns,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=lc,this.width=0,this.height=0,this.channels=0}function li(ne,we){ne.internalformat=we.internalformat,ne.format=we.format,ne.type=we.type,ne.compressed=we.compressed,ne.premultiplyAlpha=we.premultiplyAlpha,ne.flipY=we.flipY,ne.unpackAlignment=we.unpackAlignment,ne.colorSpace=we.colorSpace,ne.width=we.width,ne.height=we.height,ne.channels=we.channels}function mn(ne,we){if(!(typeof we!="object"||!we)){if("premultiplyAlpha"in we&&(ne.premultiplyAlpha=we.premultiplyAlpha),"flipY"in we&&(ne.flipY=we.flipY),"alignment"in we&&(ne.unpackAlignment=we.alignment),"colorSpace"in we&&(ne.colorSpace=Hn[we.colorSpace]),"type"in we){var Ue=we.type;ne.type=en[Ue]}var ft=ne.width,Zt=ne.height,hr=ne.channels,qt=!1;"shape"in we?(ft=we.shape[0],Zt=we.shape[1],we.shape.length===3&&(hr=we.shape[2],qt=!0)):("radius"in we&&(ft=Zt=we.radius),"width"in we&&(ft=we.width),"height"in we&&(Zt=we.height),"channels"in we&&(hr=we.channels,qt=!0)),ne.width=ft|0,ne.height=Zt|0,ne.channels=hr|0;var Ve=!1;if("format"in we){var Qe=we.format,at=ne.internalformat=Wi[Qe];ne.format=Bn[at],Qe in en&&("type"in we||(ne.type=en[Qe])),Qe in si&&(ne.compressed=!0),Ve=!0}!qt&&Ve?ne.channels=Go[ne.format]:qt&&!Ve&&ne.channels!==Hs[ne.format]&&(ne.format=ne.internalformat=Hs[ne.channels])}}function Ji(ne){Me.pixelStorei(Gf,ne.flipY),Me.pixelStorei($l,ne.premultiplyAlpha),Me.pixelStorei(fl,ne.colorSpace),Me.pixelStorei(nf,ne.unpackAlignment)}function Vi(){hi.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Ni(ne,we){var Ue=null;if(_f(we)?Ue=we:we&&(mn(ne,we),"x"in we&&(ne.xOffset=we.x|0),"y"in we&&(ne.yOffset=we.y|0),_f(we.data)&&(Ue=we.data)),we.copy){var ft=jr.viewportWidth,Zt=jr.viewportHeight;ne.width=ne.width||ft-ne.xOffset,ne.height=ne.height||Zt-ne.yOffset,ne.needsCopy=!0}else if(!Ue)ne.width=ne.width||1,ne.height=ne.height||1,ne.channels=ne.channels||4;else if(Br(Ue))ne.channels=ne.channels||4,ne.data=Ue,!("type"in we)&&ne.type===Ns&&(ne.type=Yc(Ue));else if(af(Ue))ne.channels=ne.channels||4,eh(ne,Ue),ne.alignment=1,ne.needsFree=!0;else if(Vr(Ue)){var hr=Ue.data;!Array.isArray(hr)&&ne.type===Ns&&(ne.type=Yc(hr));var qt=Ue.shape,Ve=Ue.stride,Qe,at,Ct,Ot,Rt,Bt;qt.length===3?(Ct=qt[2],Bt=Ve[2]):(Ct=1,Bt=1),Qe=qt[0],at=qt[1],Ot=Ve[0],Rt=Ve[1],ne.alignment=1,ne.width=Qe,ne.height=at,ne.channels=Ct,ne.format=ne.internalformat=Hs[Ct],ne.needsFree=!0,jf(ne,hr,Ot,Rt,Bt,Ue.offset)}else if(Hf(Ue)||Ic(Ue)||yf(Ue))Hf(Ue)||Ic(Ue)?ne.element=Ue:ne.element=Ue.canvas,ne.width=ne.element.width,ne.height=ne.element.height,ne.channels=4;else if(Bl(Ue))ne.element=Ue,ne.width=Ue.width,ne.height=Ue.height,ne.channels=4;else if(Ah(Ue))ne.element=Ue,ne.width=Ue.naturalWidth,ne.height=Ue.naturalHeight,ne.channels=4;else if(Qf(Ue))ne.element=Ue,ne.width=Ue.videoWidth,ne.height=Ue.videoHeight,ne.channels=4;else if(Hu(Ue)){var Dt=ne.width||Ue[0].length,yt=ne.height||Ue.length,Pt=ne.channels;Mn(Ue[0][0])?Pt=Pt||Ue[0][0].length:Pt=Pt||1;for(var ht=Ge.shape(Ue),ur=1,br=0;br>=Zt,Ue.height>>=Zt,Ni(Ue,ft[Zt]),ne.mipmask|=1<=0&&!("faces"in we)&&(ne.genMipmaps=!0)}if("mag"in we){var ft=we.mag;ne.magFilter=qi[ft]}var Zt=ne.wrapS,hr=ne.wrapT;if("wrap"in we){var qt=we.wrap;typeof qt=="string"?Zt=hr=Ui[qt]:Array.isArray(qt)&&(Zt=Ui[qt[0]],hr=Ui[qt[1]])}else{if("wrapS"in we){var Ve=we.wrapS;Zt=Ui[Ve]}if("wrapT"in we){var Qe=we.wrapT;hr=Ui[Qe]}}if(ne.wrapS=Zt,ne.wrapT=hr,"anisotropic"in we){var at=we.anisotropic;ne.anisotropic=we.anisotropic}if("mipmap"in we){var Ct=!1;switch(typeof we.mipmap){case"string":ne.mipmapHint=mi[we.mipmap],ne.genMipmaps=!0,Ct=!0;break;case"boolean":Ct=ne.genMipmaps=we.mipmap;break;case"object":ne.genMipmaps=!1,Ct=!0;break;default:}Ct&&!("min"in we)&&(ne.minFilter=Jl)}}function al(ne,we){Me.texParameteri(we,Vf,ne.minFilter),Me.texParameteri(we,rf,ne.magFilter),Me.texParameteri(we,Oo,ne.wrapS),Me.texParameteri(we,qo,ne.wrapT),bt.ext_texture_filter_anisotropic&&Me.texParameteri(we,cs,ne.anisotropic),ne.genMipmaps&&(Me.hint(Cf,ne.mipmapHint),Me.generateMipmap(we))}var Vl=0,ss={},Vs=zt.maxTextureUnits,Ys=Array(Vs).map(function(){return null});function wa(ne){hi.call(this),this.mipmask=0,this.internalformat=Ma,this.id=Vl++,this.refCount=1,this.target=ne,this.texture=Me.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new zo,Gr.profile&&(this.stats={size:0})}function ol(ne){Me.activeTexture(Fu),Me.bindTexture(ne.target,ne.texture)}function io(){var ne=Ys[0];ne?Me.bindTexture(ne.target,ne.texture):Me.bindTexture(_n,null)}function Y(ne){var we=ne.texture,Ue=ne.unit,ft=ne.target;Ue>=0&&(Me.activeTexture(Fu+Ue),Me.bindTexture(ft,null),Ys[Ue]=null),Me.deleteTexture(we),ne.texture=null,ne.params=null,ne.pixels=null,ne.refCount=0,delete ss[ne.id],Nr.textureCount--}e(wa.prototype,{bind:function(){var ne=this;ne.bindCount+=1;var we=ne.unit;if(we<0){for(var Ue=0;Ue0)continue;ft.unit=-1}Ys[Ue]=ne,we=Ue;break}we>=Vs,Gr.profile&&Nr.maxTextureUnits>Rt)-Ct,Bt.height=Bt.height||(Ue.height>>Rt)-Ot,ol(Ue),Vn(Bt,_n,Ct,Ot,Rt),io(),kn(Bt),ft}function hr(qt,Ve){var Qe=qt|0,at=Ve|0||Qe;if(Qe===Ue.width&&at===Ue.height)return ft;ft.width=Ue.width=Qe,ft.height=Ue.height=at,ol(Ue);for(var Ct=0;Ue.mipmask>>Ct;++Ct){var Ot=Qe>>Ct,Rt=at>>Ct;if(!Ot||!Rt)break;Me.texImage2D(_n,Ct,Ue.format,Ot,Rt,0,Ue.format,Ue.type,null)}return io(),Gr.profile&&(Ue.stats.size=cc(Ue.internalformat,Ue.type,Qe,at,!1,!1)),ft}return ft(ne,we),ft.subimage=Zt,ft.resize=hr,ft._reglType="texture2d",ft._texture=Ue,Gr.profile&&(ft.stats=Ue.stats),ft.destroy=function(){Ue.decRef()},ft}function J(ne,we,Ue,ft,Zt,hr){var qt=new wa(ya);ss[qt.id]=qt,Nr.cubeCount++;var Ve=new Array(6);function Qe(Ot,Rt,Bt,Dt,yt,Pt){var ht,ur=qt.texInfo;for(zo.call(ur),ht=0;ht<6;++ht)Ve[ht]=Va();if(typeof Ot=="number"||!Ot){var br=Ot|0||1;for(ht=0;ht<6;++ht)oa(Ve[ht],br,br)}else if(typeof Ot=="object")if(Rt)ba(Ve[0],Ot),ba(Ve[1],Rt),ba(Ve[2],Bt),ba(Ve[3],Dt),ba(Ve[4],yt),ba(Ve[5],Pt);else if(Qs(ur,Ot),mn(qt,Ot),"faces"in Ot){var Ur=Ot.faces;for(ht=0;ht<6;++ht)li(Ve[ht],qt),ba(Ve[ht],Ur[ht])}else for(ht=0;ht<6;++ht)ba(Ve[ht],Ot);for(li(qt,Ve[0]),ur.genMipmaps?qt.mipmask=(Ve[0].width<<1)-1:qt.mipmask=Ve[0].mipmask,qt.internalformat=Ve[0].internalformat,Qe.width=Ve[0].width,Qe.height=Ve[0].height,ol(qt),ht=0;ht<6;++ht)is(Ve[ht],$n+ht);for(al(ur,ya),io(),Gr.profile&&(qt.stats.size=cc(qt.internalformat,qt.type,Qe.width,Qe.height,ur.genMipmaps,!0)),Qe.format=xi[qt.internalformat],Qe.type=Ri[qt.type],Qe.mag=ci[ur.magFilter],Qe.min=an[ur.minFilter],Qe.wrapS=Zi[ur.wrapS],Qe.wrapT=Zi[ur.wrapT],ht=0;ht<6;++ht)Ml(Ve[ht]);return Qe}function at(Ot,Rt,Bt,Dt,yt){var Pt=Bt|0,ht=Dt|0,ur=yt|0,br=Ki();return li(br,qt),br.width=0,br.height=0,Ni(br,Rt),br.width=br.width||(qt.width>>ur)-Pt,br.height=br.height||(qt.height>>ur)-ht,ol(qt),Vn(br,$n+Ot,Pt,ht,ur),io(),kn(br),Qe}function Ct(Ot){var Rt=Ot|0;if(Rt!==qt.width){Qe.width=qt.width=Rt,Qe.height=qt.height=Rt,ol(qt);for(var Bt=0;Bt<6;++Bt)for(var Dt=0;qt.mipmask>>Dt;++Dt)Me.texImage2D($n+Bt,Dt,qt.format,Rt>>Dt,Rt>>Dt,0,qt.format,qt.type,null);return io(),Gr.profile&&(qt.stats.size=cc(qt.internalformat,qt.type,Qe.width,Qe.height,!1,!0)),Qe}}return Qe(ne,we,Ue,ft,Zt,hr),Qe.subimage=at,Qe.resize=Ct,Qe._reglType="textureCube",Qe._texture=qt,Gr.profile&&(Qe.stats=qt.stats),Qe.destroy=function(){qt.decRef()},Qe}function q(){for(var ne=0;ne>ft,Ue.height>>ft,0,Ue.internalformat,Ue.type,null);else for(var Zt=0;Zt<6;++Zt)Me.texImage2D($n+Zt,ft,Ue.internalformat,Ue.width>>ft,Ue.height>>ft,0,Ue.internalformat,Ue.type,null);al(Ue.texInfo,Ue.target)})}function de(){for(var ne=0;ne=0?Ml=!0:Ui.indexOf(zo)>=0&&(Ml=!1))),("depthTexture"in wa||"depthStencilTexture"in wa)&&(Ys=!!(wa.depthTexture||wa.depthStencilTexture)),"depth"in wa&&(typeof wa.depth=="boolean"?is=wa.depth:(Vl=wa.depth,Zs=!1)),"stencil"in wa&&(typeof wa.stencil=="boolean"?Zs=wa.stencil:(ss=wa.stencil,is=!1)),"depthStencil"in wa&&(typeof wa.depthStencil=="boolean"?is=Zs=wa.depthStencil:(Vs=wa.depthStencil,is=!1,Zs=!1))}var io=null,Y=null,D=null,J=null;if(Array.isArray(Va))io=Va.map(si);else if(Va)io=[si(Va)];else for(io=new Array(al),ta=0;ta0&&(kn.depth=Ni[0].depth,kn.stencil=Ni[0].stencil,kn.depthStencil=Ni[0].depthStencil),Ni[Ki]?Ni[Ki](kn):Ni[Ki]=li(kn)}return e(pn,{width:ta,height:ta,color:zo})}function Vn(na){var Ki,kn=na|0;if(kn===pn.width)return pn;var ta=pn.color;for(Ki=0;Ki=ta.byteLength?oa.subdata(ta):(oa.destroy(),li.buffers[na]=null)),li.buffers[na]||(oa=li.buffers[na]=jr.create(Ki,If,!1,!0)),kn.buffer=jr.getBuffer(oa),kn.size=kn.buffer.dimension|0,kn.normalized=!1,kn.type=kn.buffer.dtype,kn.offset=0,kn.stride=0,kn.divisor=0,kn.state=1,pn[na]=1}else jr.getBuffer(Ki)?(kn.buffer=jr.getBuffer(Ki),kn.size=kn.buffer.dimension|0,kn.normalized=!1,kn.type=kn.buffer.dtype,kn.offset=0,kn.stride=0,kn.divisor=0,kn.state=1):jr.getBuffer(Ki.buffer)?(kn.buffer=jr.getBuffer(Ki.buffer),kn.size=(+Ki.size||kn.buffer.dimension)|0,kn.normalized=!!Ki.normalized||!1,"type"in Ki?kn.type=ji[Ki.type]:kn.type=kn.buffer.dtype,kn.offset=(Ki.offset||0)|0,kn.stride=(Ki.stride||0)|0,kn.divisor=(Ki.divisor||0)|0,kn.state=1):"x"in Ki&&(kn.x=+Ki.x||0,kn.y=+Ki.y||0,kn.z=+Ki.z||0,kn.w=+Ki.w||0,kn.state=2)}for(var ba=0;ba1)for(var Ji=0;JiMr&&(Mr=Yr.stats.uniformsCount)}),Mr},zt.getMaxAttributesCount=function(){var Mr=0;return Ei.forEach(function(Yr){Yr.stats.attributesCount>Mr&&(Mr=Yr.stats.attributesCount)}),Mr});function si(){jr={},Nr={};for(var Mr=0;Mr16&&(zt=Yi(zt,Me.length*8));for(var Rr=Array(16),jr=Array(16),Nr=0;Nr<16;Nr++)Rr[Nr]=zt[Nr]^909522486,jr[Nr]=zt[Nr]^1549556828;var Gr=Yi(Rr.concat(Bc(bt)),512+bt.length*8);return At(Yi(jr.concat(Gr),768))}function vu(Me){for(var bt=ah?"0123456789ABCDEF":"0123456789abcdef",zt="",Rr,jr=0;jr>>4&15)+bt.charAt(Rr&15);return zt}function qc(Me){for(var bt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",zt="",Rr=Me.length,jr=0;jrMe.length*8?zt+=Zu:zt+=bt.charAt(Nr>>>6*(3-Gr)&63);return zt}function cf(Me,bt){var zt=bt.length,Rr=Array(),jr,Nr,Gr,mi,Ui=Array(Math.ceil(Me.length/2));for(jr=0;jr0;){for(mi=Array(),Gr=0,jr=0;jr0||Nr>0)&&(mi[mi.length]=Nr);Rr[Rr.length]=Gr,Ui=mi}var qi="";for(jr=Rr.length-1;jr>=0;jr--)qi+=bt.charAt(Rr[jr]);var Ei=Math.ceil(Me.length*8/(Math.log(bt.length)/Math.log(2)));for(jr=qi.length;jr>>6&31,128|Rr&63):Rr<=65535?bt+=String.fromCharCode(224|Rr>>>12&15,128|Rr>>>6&63,128|Rr&63):Rr<=2097151&&(bt+=String.fromCharCode(240|Rr>>>18&7,128|Rr>>>12&63,128|Rr>>>6&63,128|Rr&63));return bt}function Bc(Me){for(var bt=Array(Me.length>>2),zt=0;zt>5]|=(Me.charCodeAt(zt/8)&255)<<24-zt%32;return bt}function At(Me){for(var bt="",zt=0;zt>5]>>>24-zt%32&255);return bt}function Xt(Me,bt){return Me>>>bt|Me<<32-bt}function Cr(Me,bt){return Me>>>bt}function Ar(Me,bt,zt){return Me&bt^~Me&zt}function Kr(Me,bt,zt){return Me&bt^Me&zt^bt&zt}function ki(Me){return Xt(Me,2)^Xt(Me,13)^Xt(Me,22)}function Xi(Me){return Xt(Me,6)^Xt(Me,11)^Xt(Me,25)}function dn(Me){return Xt(Me,7)^Xt(Me,18)^Cr(Me,3)}function wn(Me){return Xt(Me,17)^Xt(Me,19)^Cr(Me,10)}var Nn=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function Yi(Me,bt){var zt=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Rr=new Array(64),jr,Nr,Gr,mi,Ui,qi,Ei,Hn,en,Wi,si,Mr;for(Me[bt>>5]|=128<<24-bt%32,Me[(bt+64>>9<<4)+15]=bt,en=0;en>16)+(bt>>16)+(zt>>16);return Rr<<16|zt&65535}function on(Me){return Array.prototype.slice.call(Me)}function Fi(Me){return on(Me).join("")}function Qn(Me){var bt=Me&&Me.cache,zt=0,Rr=[],jr=[],Nr=[];function Gr(si,Mr){var Yr=Mr&&Mr.stable;if(!Yr){for(var xi=0;xi0&&(si.push(Ri,"="),si.push.apply(si,on(arguments)),si.push(";")),Ri}return e(Mr,{def:xi,toString:function(){return Fi([Yr.length>0?"var "+Yr.join(",")+";":"",Fi(si)])}})}function Ui(){var si=mi(),Mr=mi(),Yr=si.toString,xi=Mr.toString;function Ri(ci,an){Mr(ci,an,"=",si.def(ci,an),";")}return e(function(){si.apply(si,on(arguments))},{def:si.def,entry:si,exit:Mr,save:Ri,set:function(ci,an,Zi){Ri(ci,an),si(ci,an,"=",Zi,";")},toString:function(){return Yr()+xi()}})}function qi(){var si=Fi(arguments),Mr=Ui(),Yr=Ui(),xi=Mr.toString,Ri=Yr.toString;return e(Mr,{then:function(){return Mr.apply(Mr,on(arguments)),this},else:function(){return Yr.apply(Yr,on(arguments)),this},toString:function(){var ci=Ri();return ci&&(ci="else{"+ci+"}"),Fi(["if(",si,"){",xi(),"}",ci])}})}var Ei=mi(),Hn={};function en(si,Mr){var Yr=[];function xi(){var Bn="a"+Yr.length;return Yr.push(Bn),Bn}Mr=Mr||0;for(var Ri=0;Ri2){for(var a=Array(t.position.length*.5),o=0;o2){for(var u=!t.position[0].length,c=wx.mallocFloat(this.count*2),f=0,h=0;f1?r.align[ge]:r.align[0]:r.align;if(typeof ie=="number")return ie;switch(ie){case"right":case"end":return-Ce;case"center":case"centre":case"middle":return-Ce*.5}return 0})),this.baseline==null&&t.baseline==null&&(t.baseline=0),t.baseline!=null&&(this.baseline=t.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(Ce,ge){var ie=(r.font[ge]||r.font[0]).metrics,Se=0;return Se+=ie.bottom*.5,typeof Ce=="number"?Se+=Ce-ie.baseline:Se+=-ie[Ce],Se*=-1,Se})),t.color!=null)if(t.color||(t.color="transparent"),typeof t.color=="string"||!isNaN(t.color))this.color=pK(t.color,"uint8");else{var G;if(typeof t.color[0]=="number"&&t.color.length>this.counts.length){var Z=t.color.length;G=wx.mallocUint8(Z);for(var j=(t.color.subarray||t.color.slice).bind(t.color),N=0;N4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(oe){var _e=Math.max(this.position.length*.5||0,this.color.length*.25||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,this.positionOffset.length*.5||0);this.batch=Array(_e);for(var ke=0;ke1?this.counts[ke]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[ke]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(ke*4,ke*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[ke]:this.opacity,baseline:this.baselineOffset[ke]!=null?this.baselineOffset[ke]:this.baselineOffset[0],align:this.align?this.alignOffset[ke]!=null?this.alignOffset[ke]:this.alignOffset[0]:0,atlas:this.fontAtlas[ke]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(ke*2,ke*2+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]}};xc.prototype.destroy=function(){};xc.prototype.kerning=!0;xc.prototype.position={constant:new Float32Array(2)};xc.prototype.translate=null;xc.prototype.scale=null;xc.prototype.font=null;xc.prototype.text="";xc.prototype.positionOffset=[0,0];xc.prototype.opacity=1;xc.prototype.color=new Uint8Array([0,0,0,255]);xc.prototype.alignOffset=[0,0];xc.maxAtlasSize=1024;xc.atlasCanvas=document.createElement("canvas");xc.atlasContext=xc.atlasCanvas.getContext("2d",{alpha:!1});xc.baseFontSize=64;xc.fonts={};function $Ut(e){return typeof e=="function"&&e._gl&&e.prop&&e.texture&&e.buffer}FBe.exports=xc});var qBe=ye((gK,mK)=>{(function(e,t){typeof gK=="object"&&typeof mK!="undefined"?mK.exports=t():e.createREGL=t()})(gK,function(){"use strict";var e=function(Me,bt){for(var Ot=Object.keys(bt),Lr=0;Lr1&&bt===Ot&&(bt==='"'||bt==="'"))return['"'+o(Me.substr(1,Me.length-2))+'"'];var Lr=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(Me);if(Lr)return s(Me.substr(0,Lr.index)).concat(s(Lr[1])).concat(s(Me.substr(Lr.index+Lr[0].length)));var Vr=Me.split(".");if(Vr.length===1)return['"'+o(Me)+'"'];for(var Or=[],Nr=0;Nr65535)<<4,Me>>>=bt,Ot=(Me>255)<<3,Me>>>=Ot,bt|=Ot,Ot=(Me>15)<<2,Me>>>=Ot,bt|=Ot,Ot=(Me>3)<<1,Me>>>=Ot,bt|=Ot,bt|Me>>1}function N(){var Me=S(8,function(){return[]});function bt(Or){var Nr=Z(Or),vi=Me[j(Nr)>>2];return vi.length>0?vi.pop():new ArrayBuffer(Nr)}function Ot(Or){Me[j(Or.byteLength)>>2].push(Or)}function Lr(Or,Nr){var vi=null;switch(Or){case g:vi=new Int8Array(bt(Nr),0,Nr);break;case P:vi=new Uint8Array(bt(Nr),0,Nr);break;case E:vi=new Int16Array(bt(2*Nr),0,Nr);break;case z:vi=new Uint16Array(bt(2*Nr),0,Nr);break;case q:vi=new Int32Array(bt(4*Nr),0,Nr);break;case U:vi=new Uint32Array(bt(4*Nr),0,Nr);break;case G:vi=new Float32Array(bt(4*Nr),0,Nr);break;default:return null}return vi.length!==Nr?vi.subarray(0,Nr):vi}function Vr(Or){Ot(Or.buffer)}return{alloc:bt,free:Ot,allocType:Lr,freeType:Vr}}var H=N();H.zero=N();var re=3408,oe=3410,_e=3411,ke=3412,Ce=3413,ge=3414,ie=3415,Se=33901,Ee=33902,we=3379,De=3386,Le=34921,me=36347,Pe=36348,ce=35661,He=35660,lt=34930,mt=36349,Vt=34076,st=34024,ct=7936,Qt=7937,Ht=7938,nr=35724,tt=34047,je=36063,Ue=34852,Ae=3553,rt=34067,St=34069,Tt=33984,dt=6408,Et=5126,pt=5121,Xt=36160,or=36053,_r=36064,Er=16384,ei=function(Me,bt){var Ot=1;bt.ext_texture_filter_anisotropic&&(Ot=Me.getParameter(tt));var Lr=1,Vr=1;bt.webgl_draw_buffers&&(Lr=Me.getParameter(Ue),Vr=Me.getParameter(je));var Or=!!bt.oes_texture_float;if(Or){var Nr=Me.createTexture();Me.bindTexture(Ae,Nr),Me.texImage2D(Ae,0,dt,1,1,0,dt,Et,null);var vi=Me.createFramebuffer();if(Me.bindFramebuffer(Xt,vi),Me.framebufferTexture2D(Xt,_r,Ae,Nr,0),Me.bindTexture(Ae,null),Me.checkFramebufferStatus(Xt)!==or)Or=!1;else{Me.viewport(0,0,1,1),Me.clearColor(1,0,0,1),Me.clear(Er);var Ni=H.allocType(Et,4);Me.readPixels(0,0,1,1,dt,Et,Ni),Me.getError()?Or=!1:(Me.deleteFramebuffer(vi),Me.deleteTexture(Nr),Or=Ni[0]===1),H.freeType(Ni)}}var qi=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),Si=!0;if(!qi){var Vn=Me.createTexture(),Qi=H.allocType(pt,36);Me.activeTexture(Tt),Me.bindTexture(rt,Vn),Me.texImage2D(St,0,dt,3,3,0,dt,pt,Qi),H.freeType(Qi),Me.bindTexture(rt,null),Me.deleteTexture(Vn),Si=!Me.getError()}return{colorBits:[Me.getParameter(oe),Me.getParameter(_e),Me.getParameter(ke),Me.getParameter(Ce)],depthBits:Me.getParameter(ge),stencilBits:Me.getParameter(ie),subpixelBits:Me.getParameter(re),extensions:Object.keys(bt).filter(function(ji){return!!bt[ji]}),maxAnisotropic:Ot,maxDrawbuffers:Lr,maxColorAttachments:Vr,pointSizeDims:Me.getParameter(Se),lineWidthDims:Me.getParameter(Ee),maxViewportDims:Me.getParameter(De),maxCombinedTextureUnits:Me.getParameter(ce),maxCubeMapSize:Me.getParameter(Vt),maxRenderbufferSize:Me.getParameter(st),maxTextureUnits:Me.getParameter(lt),maxTextureSize:Me.getParameter(we),maxAttributes:Me.getParameter(Le),maxVertexUniforms:Me.getParameter(me),maxVertexTextureUnits:Me.getParameter(He),maxVaryingVectors:Me.getParameter(Pe),maxFragmentUniforms:Me.getParameter(mt),glsl:Me.getParameter(nr),renderer:Me.getParameter(Qt),vendor:Me.getParameter(ct),version:Me.getParameter(Ht),readFloat:Or,npotTextureCube:Si}},qr=function(Me){return Me instanceof Uint8Array||Me instanceof Uint16Array||Me instanceof Uint32Array||Me instanceof Int8Array||Me instanceof Int16Array||Me instanceof Int32Array||Me instanceof Float32Array||Me instanceof Float64Array||Me instanceof Uint8ClampedArray};function jr(Me){return!!Me&&typeof Me=="object"&&Array.isArray(Me.shape)&&Array.isArray(Me.stride)&&typeof Me.offset=="number"&&Me.shape.length===Me.stride.length&&(Array.isArray(Me.data)||qr(Me.data))}var gt=function(Me){return Object.keys(Me).map(function(bt){return Me[bt]})},Ge={shape:Kt,flatten:At};function Je(Me,bt,Ot){for(var Lr=0;Lr0){var qn;if(Array.isArray(Zr[0])){Xi=Vi(Zr);for(var fi=1,si=1;si0){if(typeof fi[0]=="number"){var Ui=H.allocType(ui.dtype,fi.length);wr(Ui,fi),Xi(Ui,mn),H.freeType(Ui)}else if(Array.isArray(fi[0])||qr(fi[0])){Ji=Vi(fi);var Bi=Qn(fi,Ji,ui.dtype);Xi(Bi,mn),H.freeType(Bi)}}}else if(jr(fi)){Ji=fi.shape;var pn=fi.stride,Nn=0,aa=0,Ki=0,Cn=0;Ji.length===1?(Nn=Ji[0],aa=1,Ki=pn[0],Cn=0):Ji.length===2&&(Nn=Ji[0],aa=Ji[1],Ki=pn[0],Cn=pn[1]);var ia=Array.isArray(fi.data)?ui.dtype:ir(fi.data),sa=H.allocType(ia,Nn*aa);Xr(sa,fi.data,Nn,aa,Ki,Cn,fi.offset),Xi(sa,mn),H.freeType(sa)}return nn}return yi||nn(Tr),nn._reglType="buffer",nn._buffer=ui,nn.subdata=qn,Ot.profile&&(nn.stats=ui.stats),nn.destroy=function(){Qi(ui)},nn}function oi(){gt(Or).forEach(function(Tr){Tr.buffer=Me.createBuffer(),Me.bindBuffer(Tr.type,Tr.buffer),Me.bufferData(Tr.type,Tr.persistentData||Tr.byteLength,Tr.usage)})}return Ot.profile&&(bt.getTotalBufferSize=function(){var Tr=0;return Object.keys(Or).forEach(function(Zr){Tr+=Or[Zr].stats.size}),Tr}),{create:ji,createStream:Ni,destroyStream:qi,clear:function(){gt(Or).forEach(Qi),vi.forEach(Qi)},getBuffer:function(Tr){return Tr&&Tr._buffer instanceof Nr?Tr._buffer:null},restore:oi,_initBuffer:Vn}}var $r=0,Ri=0,Zi=1,en=1,fn=4,yn=4,Mn={points:$r,point:Ri,lines:Zi,line:en,triangles:fn,triangle:yn,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Ba=0,ua=1,ma=4,Wa=5120,Fa=5121,Xo=5122,da=5123,jn=5124,Ha=5125,vo=34963,Gn=35040,Ct=35044;function Ar(Me,bt,Ot,Lr){var Vr={},Or=0,Nr={uint8:Fa,uint16:da};bt.oes_element_index_uint&&(Nr.uint32=Ha);function vi(oi){this.id=Or++,Vr[this.id]=this,this.buffer=oi,this.primType=ma,this.vertCount=0,this.type=0}vi.prototype.bind=function(){this.buffer.bind()};var Ni=[];function qi(oi){var Tr=Ni.pop();return Tr||(Tr=new vi(Ot.create(null,vo,!0,!1)._buffer)),Vn(Tr,oi,Gn,-1,-1,0,0),Tr}function Si(oi){Ni.push(oi)}function Vn(oi,Tr,Zr,yi,Ii,ui,nn){oi.buffer.bind();var Xi;if(Tr){var qn=nn;!nn&&(!qr(Tr)||jr(Tr)&&!qr(Tr.data))&&(qn=bt.oes_element_index_uint?Ha:da),Ot._initBuffer(oi.buffer,Tr,Zr,qn,3)}else Me.bufferData(vo,ui,Zr),oi.buffer.dtype=Xi||Fa,oi.buffer.usage=Zr,oi.buffer.dimension=3,oi.buffer.byteLength=ui;if(Xi=nn,!nn){switch(oi.buffer.dtype){case Fa:case Wa:Xi=Fa;break;case da:case Xo:Xi=da;break;case Ha:case jn:Xi=Ha;break;default:}oi.buffer.dtype=Xi}oi.type=Xi;var fi=Ii;fi<0&&(fi=oi.buffer.byteLength,Xi===da?fi>>=1:Xi===Ha&&(fi>>=2)),oi.vertCount=fi;var si=yi;if(yi<0){si=ma;var mn=oi.buffer.dimension;mn===1&&(si=Ba),mn===2&&(si=ua),mn===3&&(si=ma)}oi.primType=si}function Qi(oi){Lr.elementsCount--,delete Vr[oi.id],oi.buffer.destroy(),oi.buffer=null}function ji(oi,Tr){var Zr=Ot.create(null,vo,!0),yi=new vi(Zr._buffer);Lr.elementsCount++;function Ii(ui){if(!ui)Zr(),yi.primType=ma,yi.vertCount=0,yi.type=Fa;else if(typeof ui=="number")Zr(ui),yi.primType=ma,yi.vertCount=ui|0,yi.type=Fa;else{var nn=null,Xi=Ct,qn=-1,fi=-1,si=0,mn=0;Array.isArray(ui)||qr(ui)||jr(ui)?nn=ui:("data"in ui&&(nn=ui.data),"usage"in ui&&(Xi=Hn[ui.usage]),"primitive"in ui&&(qn=Mn[ui.primitive]),"count"in ui&&(fi=ui.count|0),"type"in ui&&(mn=Nr[ui.type]),"length"in ui?si=ui.length|0:(si=fi,mn===da||mn===Xo?si*=2:(mn===Ha||mn===jn)&&(si*=4))),Vn(yi,nn,Xi,qn,fi,si,mn)}return Ii}return Ii(oi),Ii._reglType="elements",Ii._elements=yi,Ii.subdata=function(ui,nn){return Zr.subdata(ui,nn),Ii},Ii.destroy=function(){Qi(yi)},Ii}return{create:ji,createStream:qi,destroyStream:Si,getElements:function(oi){return typeof oi=="function"&&oi._elements instanceof vi?oi._elements:null},clear:function(){gt(Vr).forEach(Qi)}}}var Jr=new Float32Array(1),hi=new Uint32Array(Jr.buffer),hn=5123;function Sn(Me){for(var bt=H.allocType(hn,Me.length),Ot=0;Ot>>31<<15,Or=(Lr<<1>>>24)-127,Nr=Lr>>13&1023;if(Or<-24)bt[Ot]=Vr;else if(Or<-14){var vi=-14-Or;bt[Ot]=Vr+(Nr+1024>>vi)}else Or>15?bt[Ot]=Vr+31744:bt[Ot]=Vr+(Or+15<<10)+Nr}return bt}function En(Me){return Array.isArray(Me)||qr(Me)}var ki=34467,_n=3553,ya=34067,ea=34069,Ma=6408,_o=6406,No=6407,po=6409,Lo=6410,ko=32854,Ds=32855,Fs=36194,ll=32819,ul=32820,zl=33635,us=34042,il=6402,As=34041,cl=35904,Ks=35906,zs=36193,Io=33776,ls=33777,Yl=33778,Su=33779,nc=35986,bs=35987,Rn=34798,_a=35840,Vu=35841,ql=35842,xo=35843,Kl=36196,Ns=5121,Hl=5123,ac=5125,oa=5126,qo=10242,Oo=10243,Ol=10497,Pc=33071,Do=33648,rf=10240,Vf=10241,pl=9728,Zc=9729,Jl=9984,qs=9985,yu=9986,oc=9987,Cf=33170,sc=4352,jh=4353,Lf=4354,cs=34046,nf=3317,Gf=37440,$l=37441,fl=37443,lc=37444,Fu=33984,Es=[Jl,yu,qs,oc],Hs=[0,po,Lo,No,Ma],Go={};Go[po]=Go[_o]=Go[il]=1,Go[As]=Go[Lo]=2,Go[No]=Go[cl]=3,Go[Ma]=Go[Ks]=4;function ps(Me){return"[object "+Me+"]"}var uc=ps("HTMLCanvasElement"),xl=ps("OffscreenCanvas"),Gu=ps("CanvasRenderingContext2D"),Os=ps("ImageBitmap"),od=ps("HTMLImageElement"),Po=ps("HTMLVideoElement"),sd=Object.keys(er).concat([uc,xl,Gu,Os,od,Po]),Ko=[];Ko[Ns]=1,Ko[oa]=4,Ko[zs]=2,Ko[Hl]=2,Ko[ac]=4;var Pa=[];Pa[ko]=2,Pa[Ds]=2,Pa[Fs]=2,Pa[As]=4,Pa[Io]=.5,Pa[ls]=.5,Pa[Yl]=1,Pa[Su]=1,Pa[nc]=.5,Pa[bs]=1,Pa[Rn]=1,Pa[_a]=.5,Pa[Vu]=.25,Pa[ql]=.5,Pa[xo]=.25,Pa[Kl]=.5;function af(Me){return Array.isArray(Me)&&(Me.length===0||typeof Me[0]=="number")}function Hu(Me){if(!Array.isArray(Me))return!1;var bt=Me.length;return!(bt===0||!En(Me[0]))}function bl(Me){return Object.prototype.toString.call(Me)}function Hf(Me){return bl(Me)===uc}function Ic(Me){return bl(Me)===xl}function yf(Me){return bl(Me)===Gu}function Bl(Me){return bl(Me)===Os}function Ah(Me){return bl(Me)===od}function Qf(Me){return bl(Me)===Po}function _f(Me){if(!Me)return!1;var bt=bl(Me);return sd.indexOf(bt)>=0?!0:af(Me)||Hu(Me)||jr(Me)}function Yc(Me){return er[Object.prototype.toString.call(Me)]|0}function eh(Me,bt){var Ot=bt.length;switch(Me.type){case Ns:case Hl:case ac:case oa:var Lr=H.allocType(Me.type,Ot);Lr.set(bt),Me.data=Lr;break;case zs:Me.data=Sn(bt);break;default:}}function th(Me,bt){return H.allocType(Me.type===zs?oa:Me.type,bt)}function ju(Me,bt){Me.type===zs?(Me.data=Sn(bt),H.freeType(bt)):Me.data=bt}function jf(Me,bt,Ot,Lr,Vr,Or){for(var Nr=Me.width,vi=Me.height,Ni=Me.channels,qi=Nr*vi*Ni,Si=th(Me,qi),Vn=0,Qi=0;Qi=1;)vi+=Nr*Ni*Ni,Ni/=2;return vi}else return Nr*Ot*Lr}function of(Me,bt,Ot,Lr,Vr,Or,Nr){var vi={"don't care":sc,"dont care":sc,nice:Lf,fast:jh},Ni={repeat:Ol,clamp:Pc,mirror:Do},qi={nearest:pl,linear:Zc},Si=e({mipmap:oc,"nearest mipmap nearest":Jl,"linear mipmap nearest":qs,"nearest mipmap linear":yu,"linear mipmap linear":oc},qi),Vn={none:0,browser:lc},Qi={uint8:Ns,rgba4:ll,rgb565:zl,"rgb5 a1":ul},ji={alpha:_o,luminance:po,"luminance alpha":Lo,rgb:No,rgba:Ma,rgba4:ko,"rgb5 a1":Ds,rgb565:Fs},oi={};bt.ext_srgb&&(ji.srgb=cl,ji.srgba=Ks),bt.oes_texture_float&&(Qi.float32=Qi.float=oa),bt.oes_texture_half_float&&(Qi.float16=Qi["half float"]=zs),bt.webgl_depth_texture&&(e(ji,{depth:il,"depth stencil":As}),e(Qi,{uint16:Hl,uint32:ac,"depth stencil":us})),bt.webgl_compressed_texture_s3tc&&e(oi,{"rgb s3tc dxt1":Io,"rgba s3tc dxt1":ls,"rgba s3tc dxt3":Yl,"rgba s3tc dxt5":Su}),bt.webgl_compressed_texture_atc&&e(oi,{"rgb atc":nc,"rgba atc explicit alpha":bs,"rgba atc interpolated alpha":Rn}),bt.webgl_compressed_texture_pvrtc&&e(oi,{"rgb pvrtc 4bppv1":_a,"rgb pvrtc 2bppv1":Vu,"rgba pvrtc 4bppv1":ql,"rgba pvrtc 2bppv1":xo}),bt.webgl_compressed_texture_etc1&&(oi["rgb etc1"]=Kl);var Tr=Array.prototype.slice.call(Me.getParameter(ki));Object.keys(oi).forEach(function(ne){var be=oi[ne];Tr.indexOf(be)>=0&&(ji[ne]=be)});var Zr=Object.keys(ji);Ot.textureFormats=Zr;var yi=[];Object.keys(ji).forEach(function(ne){var be=ji[ne];yi[be]=ne});var Ii=[];Object.keys(Qi).forEach(function(ne){var be=Qi[ne];Ii[be]=ne});var ui=[];Object.keys(qi).forEach(function(ne){var be=qi[ne];ui[be]=ne});var nn=[];Object.keys(Si).forEach(function(ne){var be=Si[ne];nn[be]=ne});var Xi=[];Object.keys(Ni).forEach(function(ne){var be=Ni[ne];Xi[be]=ne});var qn=Zr.reduce(function(ne,be){var Be=ji[be];return Be===po||Be===_o||Be===po||Be===Lo||Be===il||Be===As||bt.ext_srgb&&(Be===cl||Be===Ks)?ne[Be]=Be:Be===Ds||be.indexOf("rgba")>=0?ne[Be]=Ma:ne[Be]=No,ne},{});function fi(){this.internalformat=Ma,this.format=Ma,this.type=Ns,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=lc,this.width=0,this.height=0,this.channels=0}function si(ne,be){ne.internalformat=be.internalformat,ne.format=be.format,ne.type=be.type,ne.compressed=be.compressed,ne.premultiplyAlpha=be.premultiplyAlpha,ne.flipY=be.flipY,ne.unpackAlignment=be.unpackAlignment,ne.colorSpace=be.colorSpace,ne.width=be.width,ne.height=be.height,ne.channels=be.channels}function mn(ne,be){if(!(typeof be!="object"||!be)){if("premultiplyAlpha"in be&&(ne.premultiplyAlpha=be.premultiplyAlpha),"flipY"in be&&(ne.flipY=be.flipY),"alignment"in be&&(ne.unpackAlignment=be.alignment),"colorSpace"in be&&(ne.colorSpace=Vn[be.colorSpace]),"type"in be){var Be=be.type;ne.type=Qi[Be]}var ht=ne.width,Yt=ne.height,cr=ne.channels,Nt=!1;"shape"in be?(ht=be.shape[0],Yt=be.shape[1],be.shape.length===3&&(cr=be.shape[2],Nt=!0)):("radius"in be&&(ht=Yt=be.radius),"width"in be&&(ht=be.width),"height"in be&&(Yt=be.height),"channels"in be&&(cr=be.channels,Nt=!0)),ne.width=ht|0,ne.height=Yt|0,ne.channels=cr|0;var Ne=!1;if("format"in be){var $e=be.format,ot=ne.internalformat=ji[$e];ne.format=qn[ot],$e in Qi&&("type"in be||(ne.type=Qi[$e])),$e in oi&&(ne.compressed=!0),Ne=!0}!Nt&&Ne?ne.channels=Go[ne.format]:Nt&&!Ne&&ne.channels!==Hs[ne.format]&&(ne.format=ne.internalformat=Hs[ne.channels])}}function Ji(ne){Me.pixelStorei(Gf,ne.flipY),Me.pixelStorei($l,ne.premultiplyAlpha),Me.pixelStorei(fl,ne.colorSpace),Me.pixelStorei(nf,ne.unpackAlignment)}function Ui(){fi.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Bi(ne,be){var Be=null;if(_f(be)?Be=be:be&&(mn(ne,be),"x"in be&&(ne.xOffset=be.x|0),"y"in be&&(ne.yOffset=be.y|0),_f(be.data)&&(Be=be.data)),be.copy){var ht=Vr.viewportWidth,Yt=Vr.viewportHeight;ne.width=ne.width||ht-ne.xOffset,ne.height=ne.height||Yt-ne.yOffset,ne.needsCopy=!0}else if(!Be)ne.width=ne.width||1,ne.height=ne.height||1,ne.channels=ne.channels||4;else if(qr(Be))ne.channels=ne.channels||4,ne.data=Be,!("type"in be)&&ne.type===Ns&&(ne.type=Yc(Be));else if(af(Be))ne.channels=ne.channels||4,eh(ne,Be),ne.alignment=1,ne.needsFree=!0;else if(jr(Be)){var cr=Be.data;!Array.isArray(cr)&&ne.type===Ns&&(ne.type=Yc(cr));var Nt=Be.shape,Ne=Be.stride,$e,ot,It,Bt,Ft,Ut;Nt.length===3?(It=Nt[2],Ut=Ne[2]):(It=1,Ut=1),$e=Nt[0],ot=Nt[1],Bt=Ne[0],Ft=Ne[1],ne.alignment=1,ne.width=$e,ne.height=ot,ne.channels=It,ne.format=ne.internalformat=Hs[It],ne.needsFree=!0,jf(ne,cr,Bt,Ft,Ut,Be.offset)}else if(Hf(Be)||Ic(Be)||yf(Be))Hf(Be)||Ic(Be)?ne.element=Be:ne.element=Be.canvas,ne.width=ne.element.width,ne.height=ne.element.height,ne.channels=4;else if(Bl(Be))ne.element=Be,ne.width=Be.width,ne.height=Be.height,ne.channels=4;else if(Ah(Be))ne.element=Be,ne.width=Be.naturalWidth,ne.height=Be.naturalHeight,ne.channels=4;else if(Qf(Be))ne.element=Be,ne.width=Be.videoWidth,ne.height=Be.videoHeight,ne.channels=4;else if(Hu(Be)){var zt=ne.width||Be[0].length,_t=ne.height||Be.length,Dt=ne.channels;En(Be[0][0])?Dt=Dt||Be[0][0].length:Dt=Dt||1;for(var vt=Ge.shape(Be),lr=1,yr=0;yr>=Yt,Be.height>>=Yt,Bi(Be,ht[Yt]),ne.mipmask|=1<=0&&!("faces"in be)&&(ne.genMipmaps=!0)}if("mag"in be){var ht=be.mag;ne.magFilter=qi[ht]}var Yt=ne.wrapS,cr=ne.wrapT;if("wrap"in be){var Nt=be.wrap;typeof Nt=="string"?Yt=cr=Ni[Nt]:Array.isArray(Nt)&&(Yt=Ni[Nt[0]],cr=Ni[Nt[1]])}else{if("wrapS"in be){var Ne=be.wrapS;Yt=Ni[Ne]}if("wrapT"in be){var $e=be.wrapT;cr=Ni[$e]}}if(ne.wrapS=Yt,ne.wrapT=cr,"anisotropic"in be){var ot=be.anisotropic;ne.anisotropic=be.anisotropic}if("mipmap"in be){var It=!1;switch(typeof be.mipmap){case"string":ne.mipmapHint=vi[be.mipmap],ne.genMipmaps=!0,It=!0;break;case"boolean":It=ne.genMipmaps=be.mipmap;break;case"object":ne.genMipmaps=!1,It=!0;break;default:}It&&!("min"in be)&&(ne.minFilter=Jl)}}function al(ne,be){Me.texParameteri(be,Vf,ne.minFilter),Me.texParameteri(be,rf,ne.magFilter),Me.texParameteri(be,qo,ne.wrapS),Me.texParameteri(be,Oo,ne.wrapT),bt.ext_texture_filter_anisotropic&&Me.texParameteri(be,cs,ne.anisotropic),ne.genMipmaps&&(Me.hint(Cf,ne.mipmapHint),Me.generateMipmap(be))}var Vl=0,ss={},Vs=Ot.maxTextureUnits,Ys=Array(Vs).map(function(){return null});function wa(ne){fi.call(this),this.mipmask=0,this.internalformat=Ma,this.id=Vl++,this.refCount=1,this.target=ne,this.texture=Me.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new zo,Nr.profile&&(this.stats={size:0})}function ol(ne){Me.activeTexture(Fu),Me.bindTexture(ne.target,ne.texture)}function io(){var ne=Ys[0];ne?Me.bindTexture(ne.target,ne.texture):Me.bindTexture(_n,null)}function Y(ne){var be=ne.texture,Be=ne.unit,ht=ne.target;Be>=0&&(Me.activeTexture(Fu+Be),Me.bindTexture(ht,null),Ys[Be]=null),Me.deleteTexture(be),ne.texture=null,ne.params=null,ne.pixels=null,ne.refCount=0,delete ss[ne.id],Or.textureCount--}e(wa.prototype,{bind:function(){var ne=this;ne.bindCount+=1;var be=ne.unit;if(be<0){for(var Be=0;Be0)continue;ht.unit=-1}Ys[Be]=ne,be=Be;break}be>=Vs,Nr.profile&&Or.maxTextureUnits>Ft)-It,Ut.height=Ut.height||(Be.height>>Ft)-Bt,ol(Be),Nn(Ut,_n,It,Bt,Ft),io(),Cn(Ut),ht}function cr(Nt,Ne){var $e=Nt|0,ot=Ne|0||$e;if($e===Be.width&&ot===Be.height)return ht;ht.width=Be.width=$e,ht.height=Be.height=ot,ol(Be);for(var It=0;Be.mipmask>>It;++It){var Bt=$e>>It,Ft=ot>>It;if(!Bt||!Ft)break;Me.texImage2D(_n,It,Be.format,Bt,Ft,0,Be.format,Be.type,null)}return io(),Nr.profile&&(Be.stats.size=cc(Be.internalformat,Be.type,$e,ot,!1,!1)),ht}return ht(ne,be),ht.subimage=Yt,ht.resize=cr,ht._reglType="texture2d",ht._texture=Be,Nr.profile&&(ht.stats=Be.stats),ht.destroy=function(){Be.decRef()},ht}function J(ne,be,Be,ht,Yt,cr){var Nt=new wa(ya);ss[Nt.id]=Nt,Or.cubeCount++;var Ne=new Array(6);function $e(Bt,Ft,Ut,zt,_t,Dt){var vt,lr=Nt.texInfo;for(zo.call(lr),vt=0;vt<6;++vt)Ne[vt]=Va();if(typeof Bt=="number"||!Bt){var yr=Bt|0||1;for(vt=0;vt<6;++vt)sa(Ne[vt],yr,yr)}else if(typeof Bt=="object")if(Ft)ba(Ne[0],Bt),ba(Ne[1],Ft),ba(Ne[2],Ut),ba(Ne[3],zt),ba(Ne[4],_t),ba(Ne[5],Dt);else if(Qs(lr,Bt),mn(Nt,Bt),"faces"in Bt){var Br=Bt.faces;for(vt=0;vt<6;++vt)si(Ne[vt],Nt),ba(Ne[vt],Br[vt])}else for(vt=0;vt<6;++vt)ba(Ne[vt],Bt);for(si(Nt,Ne[0]),lr.genMipmaps?Nt.mipmask=(Ne[0].width<<1)-1:Nt.mipmask=Ne[0].mipmask,Nt.internalformat=Ne[0].internalformat,$e.width=Ne[0].width,$e.height=Ne[0].height,ol(Nt),vt=0;vt<6;++vt)is(Ne[vt],ea+vt);for(al(lr,ya),io(),Nr.profile&&(Nt.stats.size=cc(Nt.internalformat,Nt.type,$e.width,$e.height,lr.genMipmaps,!0)),$e.format=yi[Nt.internalformat],$e.type=Ii[Nt.type],$e.mag=ui[lr.magFilter],$e.min=nn[lr.minFilter],$e.wrapS=Xi[lr.wrapS],$e.wrapT=Xi[lr.wrapT],vt=0;vt<6;++vt)Ml(Ne[vt]);return $e}function ot(Bt,Ft,Ut,zt,_t){var Dt=Ut|0,vt=zt|0,lr=_t|0,yr=Ki();return si(yr,Nt),yr.width=0,yr.height=0,Bi(yr,Ft),yr.width=yr.width||(Nt.width>>lr)-Dt,yr.height=yr.height||(Nt.height>>lr)-vt,ol(Nt),Nn(yr,ea+Bt,Dt,vt,lr),io(),Cn(yr),$e}function It(Bt){var Ft=Bt|0;if(Ft!==Nt.width){$e.width=Nt.width=Ft,$e.height=Nt.height=Ft,ol(Nt);for(var Ut=0;Ut<6;++Ut)for(var zt=0;Nt.mipmask>>zt;++zt)Me.texImage2D(ea+Ut,zt,Nt.format,Ft>>zt,Ft>>zt,0,Nt.format,Nt.type,null);return io(),Nr.profile&&(Nt.stats.size=cc(Nt.internalformat,Nt.type,$e.width,$e.height,!1,!0)),$e}}return $e(ne,be,Be,ht,Yt,cr),$e.subimage=ot,$e.resize=It,$e._reglType="textureCube",$e._texture=Nt,Nr.profile&&($e.stats=Nt.stats),$e.destroy=function(){Nt.decRef()},$e}function O(){for(var ne=0;ne>ht,Be.height>>ht,0,Be.internalformat,Be.type,null);else for(var Yt=0;Yt<6;++Yt)Me.texImage2D(ea+Yt,ht,Be.internalformat,Be.width>>ht,Be.height>>ht,0,Be.internalformat,Be.type,null);al(Be.texInfo,Be.target)})}function de(){for(var ne=0;ne=0?Ml=!0:Ni.indexOf(zo)>=0&&(Ml=!1))),("depthTexture"in wa||"depthStencilTexture"in wa)&&(Ys=!!(wa.depthTexture||wa.depthStencilTexture)),"depth"in wa&&(typeof wa.depth=="boolean"?is=wa.depth:(Vl=wa.depth,Zs=!1)),"stencil"in wa&&(typeof wa.stencil=="boolean"?Zs=wa.stencil:(ss=wa.stencil,is=!1)),"depthStencil"in wa&&(typeof wa.depthStencil=="boolean"?is=Zs=wa.depthStencil:(Vs=wa.depthStencil,is=!1,Zs=!1))}var io=null,Y=null,D=null,J=null;if(Array.isArray(Va))io=Va.map(oi);else if(Va)io=[oi(Va)];else for(io=new Array(al),ia=0;ia0&&(Cn.depth=Bi[0].depth,Cn.stencil=Bi[0].stencil,Cn.depthStencil=Bi[0].depthStencil),Bi[Ki]?Bi[Ki](Cn):Bi[Ki]=si(Cn)}return e(pn,{width:ia,height:ia,color:zo})}function Nn(aa){var Ki,Cn=aa|0;if(Cn===pn.width)return pn;var ia=pn.color;for(Ki=0;Ki=ia.byteLength?sa.subdata(ia):(sa.destroy(),si.buffers[aa]=null)),si.buffers[aa]||(sa=si.buffers[aa]=Vr.create(Ki,If,!1,!0)),Cn.buffer=Vr.getBuffer(sa),Cn.size=Cn.buffer.dimension|0,Cn.normalized=!1,Cn.type=Cn.buffer.dtype,Cn.offset=0,Cn.stride=0,Cn.divisor=0,Cn.state=1,pn[aa]=1}else Vr.getBuffer(Ki)?(Cn.buffer=Vr.getBuffer(Ki),Cn.size=Cn.buffer.dimension|0,Cn.normalized=!1,Cn.type=Cn.buffer.dtype,Cn.offset=0,Cn.stride=0,Cn.divisor=0,Cn.state=1):Vr.getBuffer(Ki.buffer)?(Cn.buffer=Vr.getBuffer(Ki.buffer),Cn.size=(+Ki.size||Cn.buffer.dimension)|0,Cn.normalized=!!Ki.normalized||!1,"type"in Ki?Cn.type=un[Ki.type]:Cn.type=Cn.buffer.dtype,Cn.offset=(Ki.offset||0)|0,Cn.stride=(Ki.stride||0)|0,Cn.divisor=(Ki.divisor||0)|0,Cn.state=1):"x"in Ki&&(Cn.x=+Ki.x||0,Cn.y=+Ki.y||0,Cn.z=+Ki.z||0,Cn.w=+Ki.w||0,Cn.state=2)}for(var ba=0;ba1)for(var Ji=0;JiTr&&(Tr=Zr.stats.uniformsCount)}),Tr},Ot.getMaxAttributesCount=function(){var Tr=0;return Si.forEach(function(Zr){Zr.stats.attributesCount>Tr&&(Tr=Zr.stats.attributesCount)}),Tr});function oi(){Vr={},Or={};for(var Tr=0;Tr16&&(Ot=Yi(Ot,Me.length*8));for(var Lr=Array(16),Vr=Array(16),Or=0;Or<16;Or++)Lr[Or]=Ot[Or]^909522486,Vr[Or]=Ot[Or]^1549556828;var Nr=Yi(Lr.concat(Bc(bt)),512+bt.length*8);return kt(Yi(Vr.concat(Nr),768))}function vu(Me){for(var bt=ah?"0123456789ABCDEF":"0123456789abcdef",Ot="",Lr,Vr=0;Vr>>4&15)+bt.charAt(Lr&15);return Ot}function Oc(Me){for(var bt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ot="",Lr=Me.length,Vr=0;VrMe.length*8?Ot+=Zu:Ot+=bt.charAt(Or>>>6*(3-Nr)&63);return Ot}function cf(Me,bt){var Ot=bt.length,Lr=Array(),Vr,Or,Nr,vi,Ni=Array(Math.ceil(Me.length/2));for(Vr=0;Vr0;){for(vi=Array(),Nr=0,Vr=0;Vr0||Or>0)&&(vi[vi.length]=Or);Lr[Lr.length]=Nr,Ni=vi}var qi="";for(Vr=Lr.length-1;Vr>=0;Vr--)qi+=bt.charAt(Lr[Vr]);var Si=Math.ceil(Me.length*8/(Math.log(bt.length)/Math.log(2)));for(Vr=qi.length;Vr>>6&31,128|Lr&63):Lr<=65535?bt+=String.fromCharCode(224|Lr>>>12&15,128|Lr>>>6&63,128|Lr&63):Lr<=2097151&&(bt+=String.fromCharCode(240|Lr>>>18&7,128|Lr>>>12&63,128|Lr>>>6&63,128|Lr&63));return bt}function Bc(Me){for(var bt=Array(Me.length>>2),Ot=0;Ot>5]|=(Me.charCodeAt(Ot/8)&255)<<24-Ot%32;return bt}function kt(Me){for(var bt="",Ot=0;Ot>5]>>>24-Ot%32&255);return bt}function Zt(Me,bt){return Me>>>bt|Me<<32-bt}function Mr(Me,bt){return Me>>>bt}function xr(Me,bt,Ot){return Me&bt^~Me&Ot}function Kr(Me,bt,Ot){return Me&bt^Me&Ot^bt&Ot}function Mi(Me){return Zt(Me,2)^Zt(Me,13)^Zt(Me,22)}function Wi(Me){return Zt(Me,6)^Zt(Me,11)^Zt(Me,25)}function dn(Me){return Zt(Me,7)^Zt(Me,18)^Mr(Me,3)}function wn(Me){return Zt(Me,17)^Zt(Me,19)^Mr(Me,10)}var On=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function Yi(Me,bt){var Ot=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Lr=new Array(64),Vr,Or,Nr,vi,Ni,qi,Si,Vn,Qi,ji,oi,Tr;for(Me[bt>>5]|=128<<24-bt%32,Me[(bt+64>>9<<4)+15]=bt,Qi=0;Qi>16)+(bt>>16)+(Ot>>16);return Lr<<16|Ot&65535}function an(Me){return Array.prototype.slice.call(Me)}function Fi(Me){return an(Me).join("")}function ta(Me){var bt=Me&&Me.cache,Ot=0,Lr=[],Vr=[],Or=[];function Nr(oi,Tr){var Zr=Tr&&Tr.stable;if(!Zr){for(var yi=0;yi0&&(oi.push(Ii,"="),oi.push.apply(oi,an(arguments)),oi.push(";")),Ii}return e(Tr,{def:yi,toString:function(){return Fi([Zr.length>0?"var "+Zr.join(",")+";":"",Fi(oi)])}})}function Ni(){var oi=vi(),Tr=vi(),Zr=oi.toString,yi=Tr.toString;function Ii(ui,nn){Tr(ui,nn,"=",oi.def(ui,nn),";")}return e(function(){oi.apply(oi,an(arguments))},{def:oi.def,entry:oi,exit:Tr,save:Ii,set:function(ui,nn,Xi){Ii(ui,nn),oi(ui,nn,"=",Xi,";")},toString:function(){return Zr()+yi()}})}function qi(){var oi=Fi(arguments),Tr=Ni(),Zr=Ni(),yi=Tr.toString,Ii=Zr.toString;return e(Tr,{then:function(){return Tr.apply(Tr,an(arguments)),this},else:function(){return Zr.apply(Zr,an(arguments)),this},toString:function(){var ui=Ii();return ui&&(ui="else{"+ui+"}"),Fi(["if(",oi,"){",yi(),"}",ui])}})}var Si=vi(),Vn={};function Qi(oi,Tr){var Zr=[];function yi(){var qn="a"+Zr.length;return Zr.push(qn),qn}Tr=Tr||0;for(var Ii=0;Ii":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},ai={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},gi={cw:Te,ccw:Ne};function Ii(Me){return Array.isArray(Me)||Br(Me)||Vr(Me)}function Si(Me){return Me.sort(function(bt,zt){return bt===ee?-1:zt===ee?1:bt=1,Rr>=2,bt)}else if(zt===Zo){var jr=Me.data;return new ei(jr.thisDep,jr.contextDep,jr.propDep,bt)}else{if(zt===Ss)return new ei(!1,!1,!1,bt);if(zt===as){for(var Nr=!1,Gr=!1,mi=!1,Ui=0;Ui=1&&(Gr=!0),Ei>=2&&(mi=!0)}else qi.type===Zo&&(Nr=Nr||qi.data.thisDep,Gr=Gr||qi.data.contextDep,mi=mi||qi.data.propDep)}return new ei(Nr,Gr,mi,bt)}else return new ei(zt===bo,zt===Ka,zt===Dn,bt)}}var ia=new ei(!1,!1,!1,function(){});function Ea(Me,bt,zt,Rr,jr,Nr,Gr,mi,Ui,qi,Ei,Hn,en,Wi,si,Mr){var Yr=qi.Record,xi={add:32774,subtract:32778,"reverse subtract":32779};zt.ext_blend_minmax&&(xi.min=He,xi.max=Ye);var Ri=zt.angle_instanced_arrays,ci=zt.webgl_draw_buffers,an=zt.oes_vertex_array_object,Zi={dirty:!0,profile:Mr.profile},Bn={},hi=[],li={},mn={};function Ji(Ve){return Ve.replace(".","_")}function Vi(Ve,Qe,at){var Ct=Ji(Ve);hi.push(Ve),Bn[Ct]=Zi[Ct]=!!at,li[Ct]=Qe}function Ni(Ve,Qe,at){var Ct=Ji(Ve);hi.push(Ve),Array.isArray(at)?(Zi[Ct]=at.slice(),Bn[Ct]=at.slice()):Zi[Ct]=Bn[Ct]=at,mn[Ct]=Qe}function pn(Ve){return!!isNaN(Ve)}Vi(ws,Pi),Vi(Ho,ni),Ni(ml,"blendColor",[0,0,0,0]),Ni(Ws,"blendEquationSeparate",[yr,yr]),Ni(Ls,"blendFuncSeparate",[gr,jt,gr,jt]),Vi(va,ln,!0),Ni(no,"depthFunc",Hr),Ni(ys,"depthRange",[0,1]),Ni(rs,"depthMask",!0),Ni(Ql,Ql,[!0,!0,!0,!0]),Vi(Cu,Wr),Ni(Yu,"cullFace",se),Ni(Nc,Nc,Ne),Ni(pu,pu,1),Vi(Uc,Kn),Ni(xu,"polygonOffset",[0,0]),Vi(Ac,Aa),Vi(Ua,fa),Ni(oo,"sampleCoverage",[1,!1]),Vi(Vc,cn),Ni(hc,"stencilMask",-1),Ni(Ku,"stencilFunc",[kt,0,-1]),Ni(ue,"stencilOpSeparate",[X,nt,nt,nt]),Ni(w,"stencilOpSeparate",[se,nt,nt,nt]),Vi(B,Cn),Ni(Q,"scissor",[0,0,Me.drawingBufferWidth,Me.drawingBufferHeight]),Ni(ee,ee,[0,0,Me.drawingBufferWidth,Me.drawingBufferHeight]);var Vn={gl:Me,context:en,strings:bt,next:Bn,current:Zi,draw:Hn,elements:Nr,buffer:jr,shader:Ei,attributes:qi.state,vao:qi,uniforms:Ui,framebuffer:mi,extensions:zt,timer:Wi,isBufferArgs:Ii},na={primTypes:Sn,compareFuncs:Zr,blendFuncs:bi,blendEquations:xi,stencilOps:ai,glTypes:ji,orientationType:gi};ci&&(na.backBuffer=[se],na.drawBuffer=M(Rr.maxDrawbuffers,function(Ve){return Ve===0?[0]:M(Ve,function(Qe){return _i+Qe})}));var Ki=0;function kn(){var Ve=Qn({cache:si}),Qe=Ve.link,at=Ve.global;Ve.id=Ki++,Ve.batchId="0";var Ct=Qe(Vn),Ot=Ve.shared={props:"a0"};Object.keys(Vn).forEach(function(Pt){Ot[Pt]=at.def(Ct,".",Pt)});var Rt=Ve.next={},Bt=Ve.current={};Object.keys(mn).forEach(function(Pt){Array.isArray(Zi[Pt])&&(Rt[Pt]=at.def(Ot.next,".",Pt),Bt[Pt]=at.def(Ot.current,".",Pt))});var Dt=Ve.constants={};Object.keys(na).forEach(function(Pt){Dt[Pt]=at.def(JSON.stringify(na[Pt]))}),Ve.invoke=function(Pt,ht){switch(ht.type){case Yn:var ur=["this",Ot.context,Ot.props,Ve.batchId];return Pt.def(Qe(ht.data),".call(",ur.slice(0,Math.max(ht.data.length+1,4)),")");case Dn:return Pt.def(Ot.props,ht.data);case Ka:return Pt.def(Ot.context,ht.data);case bo:return Pt.def("this",ht.data);case Zo:return ht.data.append(Ve,Pt),ht.data.ref;case Ss:return ht.data.toString();case as:return ht.data.map(function(br){return Ve.invoke(Pt,br)})}},Ve.attribCache={};var yt={};return Ve.scopeAttrib=function(Pt){var ht=bt.id(Pt);if(ht in yt)return yt[ht];var ur=qi.scope[ht];ur||(ur=qi.scope[ht]=new Yr);var br=yt[ht]=Qe(ur);return br},Ve}function ta(Ve){var Qe=Ve.static,at=Ve.dynamic,Ct;if(le in Qe){var Ot=!!Qe[le];Ct=En(function(Bt,Dt){return Ot}),Ct.enable=Ot}else if(le in at){var Rt=at[le];Ct=Un(Rt,function(Bt,Dt){return Bt.invoke(Dt,Rt)})}return Ct}function oa(Ve,Qe){var at=Ve.static,Ct=Ve.dynamic;if(Oe in at){var Ot=at[Oe];return Ot?(Ot=mi.getFramebuffer(Ot),En(function(Bt,Dt){var yt=Bt.link(Ot),Pt=Bt.shared;Dt.set(Pt.framebuffer,".next",yt);var ht=Pt.context;return Dt.set(ht,"."+qe,yt+".width"),Dt.set(ht,"."+et,yt+".height"),yt})):En(function(Bt,Dt){var yt=Bt.shared;Dt.set(yt.framebuffer,".next","null");var Pt=yt.context;return Dt.set(Pt,"."+qe,Pt+"."+Ht),Dt.set(Pt,"."+et,Pt+"."+tr),"null"})}else if(Oe in Ct){var Rt=Ct[Oe];return Un(Rt,function(Bt,Dt){var yt=Bt.invoke(Dt,Rt),Pt=Bt.shared,ht=Pt.framebuffer,ur=Dt.def(ht,".getFramebuffer(",yt,")");Dt.set(ht,".next",ur);var br=Pt.context;return Dt.set(br,"."+qe,ur+"?"+ur+".width:"+br+"."+Ht),Dt.set(br,"."+et,ur+"?"+ur+".height:"+br+"."+tr),ur})}else return null}function ba(Ve,Qe,at){var Ct=Ve.static,Ot=Ve.dynamic;function Rt(yt){if(yt in Ct){var Pt=Ct[yt],ht=!0,ur=Pt.x|0,br=Pt.y|0,Ur,Di;return"width"in Pt?Ur=Pt.width|0:ht=!1,"height"in Pt?Di=Pt.height|0:ht=!1,new ei(!ht&&Qe&&Qe.thisDep,!ht&&Qe&&Qe.contextDep,!ht&&Qe&&Qe.propDep,function(gn,rn){var Ci=gn.shared.context,Bi=Ur;"width"in Pt||(Bi=rn.def(Ci,".",qe,"-",ur));var Gi=Di;return"height"in Pt||(Gi=rn.def(Ci,".",et,"-",br)),[ur,br,Bi,Gi]})}else if(yt in Ot){var fi=Ot[yt],Ti=Un(fi,function(gn,rn){var Ci=gn.invoke(rn,fi),Bi=gn.shared.context,Gi=rn.def(Ci,".x|0"),sn=rn.def(Ci,".y|0"),zn=rn.def('"width" in ',Ci,"?",Ci,".width|0:","(",Bi,".",qe,"-",Gi,")"),Ja=rn.def('"height" in ',Ci,"?",Ci,".height|0:","(",Bi,".",et,"-",sn,")");return[Gi,sn,zn,Ja]});return Qe&&(Ti.thisDep=Ti.thisDep||Qe.thisDep,Ti.contextDep=Ti.contextDep||Qe.contextDep,Ti.propDep=Ti.propDep||Qe.propDep),Ti}else return Qe?new ei(Qe.thisDep,Qe.contextDep,Qe.propDep,function(gn,rn){var Ci=gn.shared.context;return[0,0,rn.def(Ci,".",qe),rn.def(Ci,".",et)]}):null}var Bt=Rt(ee);if(Bt){var Dt=Bt;Bt=new ei(Bt.thisDep,Bt.contextDep,Bt.propDep,function(yt,Pt){var ht=Dt.append(yt,Pt),ur=yt.shared.context;return Pt.set(ur,"."+Xe,ht[2]),Pt.set(ur,"."+it,ht[3]),ht})}return{viewport:Bt,scissor_box:Rt(Q)}}function is(Ve,Qe){var at=Ve.static,Ct=typeof at[st]=="string"&&typeof at[Ze]=="string";if(Ct){if(Object.keys(Qe.dynamic).length>0)return null;var Ot=Qe.static,Rt=Object.keys(Ot);if(Rt.length>0&&typeof Ot[Rt[0]]=="number"){for(var Bt=[],Dt=0;Dt"+Gi+"?"+ht+".constant["+Gi+"]:0;"}).join(""),"}}else{","if(",Ur,"(",ht,".buffer)){",gn,"=",Di,".createStream(",Sr,",",ht,".buffer);","}else{",gn,"=",Di,".getBuffer(",ht,".buffer);","}",rn,'="type" in ',ht,"?",br.glTypes,"[",ht,".type]:",gn,".dtype;",fi.normalized,"=!!",ht,".normalized;");function Ci(Bi){Pt(fi[Bi],"=",ht,".",Bi,"|0;")}return Ci("size"),Ci("offset"),Ci("stride"),Ci("divisor"),Pt("}}"),Pt.exit("if(",fi.isStream,"){",Di,".destroyStream(",gn,");","}"),fi}Ot[Rt]=Un(Bt,Dt)}),Ot}function al(Ve){var Qe=Ve.static,at=Ve.dynamic,Ct={};return Object.keys(Qe).forEach(function(Ot){var Rt=Qe[Ot];Ct[Ot]=En(function(Bt,Dt){return typeof Rt=="number"||typeof Rt=="boolean"?""+Rt:Bt.link(Rt)})}),Object.keys(at).forEach(function(Ot){var Rt=at[Ot];Ct[Ot]=Un(Rt,function(Bt,Dt){return Bt.invoke(Dt,Rt)})}),Ct}function Vl(Ve,Qe,at,Ct,Ot){var Rt=Ve.static,Bt=Ve.dynamic,Dt=is(Ve,Qe),yt=oa(Ve,Ot),Pt=ba(Ve,yt,Ot),ht=Va(Ve,Ot),ur=Ml(Ve,Ot),br=Zs(Ve,Ot,Dt);function Ur(Ci){var Bi=Pt[Ci];Bi&&(ur[Ci]=Bi)}Ur(ee),Ur(Ji(Q));var Di=Object.keys(ur).length>0,fi={framebuffer:yt,draw:ht,shader:br,state:ur,dirty:Di,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(fi.profile=ta(Ve,Ot),fi.uniforms=zo(at,Ot),fi.drawVAO=fi.scopeVAO=ht.vao,!fi.drawVAO&&br.program&&!Dt&&zt.angle_instanced_arrays&&ht.static.elements){var Ti=!0,gn=br.program.attributes.map(function(Ci){var Bi=Qe.static[Ci];return Ti=Ti&&!!Bi,Bi});if(Ti&&gn.length>0){var rn=qi.getVAO(qi.createVAO({attributes:gn,elements:ht.static.elements}));fi.drawVAO=new ei(null,null,null,function(Ci,Bi){return Ci.link(rn)}),fi.useVAO=!0}}return Dt?fi.useVAO=!0:fi.attributes=Qs(Qe,Ot),fi.context=al(Ct,Ot),fi}function ss(Ve,Qe,at){var Ct=Ve.shared,Ot=Ct.context,Rt=Ve.scope();Object.keys(at).forEach(function(Bt){Qe.save(Ot,"."+Bt);var Dt=at[Bt],yt=Dt.append(Ve,Qe);Array.isArray(yt)?Rt(Ot,".",Bt,"=[",yt.join(),"];"):Rt(Ot,".",Bt,"=",yt,";")}),Qe(Rt)}function Vs(Ve,Qe,at,Ct){var Ot=Ve.shared,Rt=Ot.gl,Bt=Ot.framebuffer,Dt;ci&&(Dt=Qe.def(Ot.extensions,".webgl_draw_buffers"));var yt=Ve.constants,Pt=yt.drawBuffer,ht=yt.backBuffer,ur;at?ur=at.append(Ve,Qe):ur=Qe.def(Bt,".next"),Ct||Qe("if(",ur,"!==",Bt,".cur){"),Qe("if(",ur,"){",Rt,".bindFramebuffer(",qr,",",ur,".framebuffer);"),ci&&Qe(Dt,".drawBuffersWEBGL(",Pt,"[",ur,".colorAttachments.length]);"),Qe("}else{",Rt,".bindFramebuffer(",qr,",null);"),ci&&Qe(Dt,".drawBuffersWEBGL(",ht,");"),Qe("}",Bt,".cur=",ur,";"),Ct||Qe("}")}function Ys(Ve,Qe,at){var Ct=Ve.shared,Ot=Ct.gl,Rt=Ve.current,Bt=Ve.next,Dt=Ct.current,yt=Ct.next,Pt=Ve.cond(Dt,".dirty");hi.forEach(function(ht){var ur=Ji(ht);if(!(ur in at.state)){var br,Ur;if(ur in Bt){br=Bt[ur],Ur=Rt[ur];var Di=M(Zi[ur].length,function(Ti){return Pt.def(br,"[",Ti,"]")});Pt(Ve.cond(Di.map(function(Ti,gn){return Ti+"!=="+Ur+"["+gn+"]"}).join("||")).then(Ot,".",mn[ur],"(",Di,");",Di.map(function(Ti,gn){return Ur+"["+gn+"]="+Ti}).join(";"),";"))}else{br=Pt.def(yt,".",ur);var fi=Ve.cond(br,"!==",Dt,".",ur);Pt(fi),ur in li?fi(Ve.cond(br).then(Ot,".enable(",li[ur],");").else(Ot,".disable(",li[ur],");"),Dt,".",ur,"=",br,";"):fi(Ot,".",mn[ur],"(",br,");",Dt,".",ur,"=",br,";")}}}),Object.keys(at.state).length===0&&Pt(Dt,".dirty=false;"),Qe(Pt)}function wa(Ve,Qe,at,Ct){var Ot=Ve.shared,Rt=Ve.current,Bt=Ot.current,Dt=Ot.gl,yt;Si(Object.keys(at)).forEach(function(Pt){var ht=at[Pt];if(!(Ct&&!Ct(ht))){var ur=ht.append(Ve,Qe);if(li[Pt]){var br=li[Pt];Ln(ht)?(yt=Ve.link(ur,{stable:!0}),Qe(Ve.cond(yt).then(Dt,".enable(",br,");").else(Dt,".disable(",br,");")),Qe(Bt,".",Pt,"=",yt,";")):(Qe(Ve.cond(ur).then(Dt,".enable(",br,");").else(Dt,".disable(",br,");")),Qe(Bt,".",Pt,"=",ur,";"))}else if(Mn(ur)){var Ur=Rt[Pt];Qe(Dt,".",mn[Pt],"(",ur,");",ur.map(function(Di,fi){return Ur+"["+fi+"]="+Di}).join(";"),";")}else Ln(ht)?(yt=Ve.link(ur,{stable:!0}),Qe(Dt,".",mn[Pt],"(",yt,");",Bt,".",Pt,"=",yt,";")):Qe(Dt,".",mn[Pt],"(",ur,");",Bt,".",Pt,"=",ur,";")}})}function ol(Ve,Qe){Ri&&(Ve.instancing=Qe.def(Ve.shared.extensions,".angle_instanced_arrays"))}function io(Ve,Qe,at,Ct,Ot){var Rt=Ve.shared,Bt=Ve.stats,Dt=Rt.current,yt=Rt.timer,Pt=at.profile;function ht(){return typeof performance=="undefined"?"Date.now()":"performance.now()"}var ur,br;function Ur(Ci){ur=Qe.def(),Ci(ur,"=",ht(),";"),typeof Ot=="string"?Ci(Bt,".count+=",Ot,";"):Ci(Bt,".count++;"),Wi&&(Ct?(br=Qe.def(),Ci(br,"=",yt,".getNumPendingQueries();")):Ci(yt,".beginQuery(",Bt,");"))}function Di(Ci){Ci(Bt,".cpuTime+=",ht(),"-",ur,";"),Wi&&(Ct?Ci(yt,".pushScopeStats(",br,",",yt,".getNumPendingQueries(),",Bt,");"):Ci(yt,".endQuery();"))}function fi(Ci){var Bi=Qe.def(Dt,".profile");Qe(Dt,".profile=",Ci,";"),Qe.exit(Dt,".profile=",Bi,";")}var Ti;if(Pt){if(Ln(Pt)){Pt.enable?(Ur(Qe),Di(Qe.exit),fi("true")):fi("false");return}Ti=Pt.append(Ve,Qe),fi(Ti)}else Ti=Qe.def(Dt,".profile");var gn=Ve.block();Ur(gn),Qe("if(",Ti,"){",gn,"}");var rn=Ve.block();Di(rn),Qe.exit("if(",Ti,"){",rn,"}")}function Y(Ve,Qe,at,Ct,Ot){var Rt=Ve.shared;function Bt(yt){switch(yt){case Co:case Ps:case hl:return 2;case Qa:case Ts:case Ul:return 3;case mo:case wo:case Lu:return 4;default:return 1}}function Dt(yt,Pt,ht){var ur=Rt.gl,br=Qe.def(yt,".location"),Ur=Qe.def(Rt.attributes,"[",br,"]"),Di=ht.state,fi=ht.buffer,Ti=[ht.x,ht.y,ht.z,ht.w],gn=["buffer","normalized","offset","stride"];function rn(){Qe("if(!",Ur,".buffer){",ur,".enableVertexAttribArray(",br,");}");var Bi=ht.type,Gi;if(ht.size?Gi=Qe.def(ht.size,"||",Pt):Gi=Pt,Qe("if(",Ur,".type!==",Bi,"||",Ur,".size!==",Gi,"||",gn.map(function(zn){return Ur+"."+zn+"!=="+ht[zn]}).join("||"),"){",ur,".bindBuffer(",Sr,",",fi,".buffer);",ur,".vertexAttribPointer(",[br,Gi,Bi,ht.normalized,ht.stride,ht.offset],");",Ur,".type=",Bi,";",Ur,".size=",Gi,";",gn.map(function(zn){return Ur+"."+zn+"="+ht[zn]+";"}).join(""),"}"),Ri){var sn=ht.divisor;Qe("if(",Ur,".divisor!==",sn,"){",Ve.instancing,".vertexAttribDivisorANGLE(",[br,sn],");",Ur,".divisor=",sn,";}")}}function Ci(){Qe("if(",Ur,".buffer){",ur,".disableVertexAttribArray(",br,");",Ur,".buffer=null;","}if(",Ca.map(function(Bi,Gi){return Ur+"."+Bi+"!=="+Ti[Gi]}).join("||"),"){",ur,".vertexAttrib4f(",br,",",Ti,");",Ca.map(function(Bi,Gi){return Ur+"."+Bi+"="+Ti[Gi]+";"}).join(""),"}")}Di===La?rn():Di===Na?Ci():(Qe("if(",Di,"===",La,"){"),rn(),Qe("}else{"),Ci(),Qe("}"))}Ct.forEach(function(yt){var Pt=yt.name,ht=at.attributes[Pt],ur;if(ht){if(!Ot(ht))return;ur=ht.append(Ve,Qe)}else{if(!Ot(ia))return;var br=Ve.scopeAttrib(Pt);ur={},Object.keys(new Yr).forEach(function(Ur){ur[Ur]=Qe.def(br,".",Ur)})}Dt(Ve.link(yt),Bt(yt.info.type),ur)})}function D(Ve,Qe,at,Ct,Ot,Rt){for(var Bt=Ve.shared,Dt=Bt.gl,yt,Pt=0;Pt1){for(var co=[],ts=[],so=0;so>1)",fi],");")}function sn(){at(Ti,".drawArraysInstancedANGLE(",[br,Ur,Di,fi],");")}ht&&ht!=="null"?rn?Gi():(at("if(",ht,"){"),Gi(),at("}else{"),sn(),at("}")):sn()}function Bi(){function Gi(){at(Rt+".drawElements("+[br,Di,gn,Ur+"<<(("+gn+"-"+Ra+")>>1)"]+");")}function sn(){at(Rt+".drawArrays("+[br,Ur,Di]+");")}ht&&ht!=="null"?rn?Gi():(at("if(",ht,"){"),Gi(),at("}else{"),sn(),at("}")):sn()}Ri&&(typeof fi!="number"||fi>=0)?typeof fi=="string"?(at("if(",fi,">0){"),Ci(),at("}else if(",fi,"<0){"),Bi(),at("}")):Ci():Bi()}function q(Ve,Qe,at,Ct,Ot){var Rt=kn(),Bt=Rt.proc("body",Ot);return Ri&&(Rt.instancing=Bt.def(Rt.shared.extensions,".angle_instanced_arrays")),Ve(Rt,Bt,at,Ct),Rt.compile().body}function K(Ve,Qe,at,Ct){ol(Ve,Qe),at.useVAO?at.drawVAO?Qe(Ve.shared.vao,".setVAO(",at.drawVAO.append(Ve,Qe),");"):Qe(Ve.shared.vao,".setVAO(",Ve.shared.vao,".targetVAO);"):(Qe(Ve.shared.vao,".setVAO(null);"),Y(Ve,Qe,at,Ct.attributes,function(){return!0})),D(Ve,Qe,at,Ct.uniforms,function(){return!0},!1),J(Ve,Qe,Qe,at)}function de(Ve,Qe){var at=Ve.proc("draw",1);ol(Ve,at),ss(Ve,at,Qe.context),Vs(Ve,at,Qe.framebuffer),Ys(Ve,at,Qe),wa(Ve,at,Qe.state),io(Ve,at,Qe,!1,!0);var Ct=Qe.shader.progVar.append(Ve,at);if(at(Ve.shared.gl,".useProgram(",Ct,".program);"),Qe.shader.program)K(Ve,at,Qe,Qe.shader.program);else{at(Ve.shared.vao,".setVAO(null);");var Ot=Ve.global.def("{}"),Rt=at.def(Ct,".id"),Bt=at.def(Ot,"[",Rt,"]");at(Ve.cond(Bt).then(Bt,".call(this,a0);").else(Bt,"=",Ot,"[",Rt,"]=",Ve.link(function(Dt){return q(K,Ve,Qe,Dt,1)}),"(",Ct,");",Bt,".call(this,a0);"))}Object.keys(Qe.state).length>0&&at(Ve.shared.current,".dirty=true;"),Ve.shared.vao&&at(Ve.shared.vao,".setVAO(null);")}function ne(Ve,Qe,at,Ct){Ve.batchId="a1",ol(Ve,Qe);function Ot(){return!0}Y(Ve,Qe,at,Ct.attributes,Ot),D(Ve,Qe,at,Ct.uniforms,Ot,!1),J(Ve,Qe,Qe,at)}function we(Ve,Qe,at,Ct){ol(Ve,Qe);var Ot=at.contextDep,Rt=Qe.def(),Bt="a0",Dt="a1",yt=Qe.def();Ve.shared.props=yt,Ve.batchId=Rt;var Pt=Ve.scope(),ht=Ve.scope();Qe(Pt.entry,"for(",Rt,"=0;",Rt,"<",Dt,";++",Rt,"){",yt,"=",Bt,"[",Rt,"];",ht,"}",Pt.exit);function ur(gn){return gn.contextDep&&Ot||gn.propDep}function br(gn){return!ur(gn)}if(at.needsContext&&ss(Ve,ht,at.context),at.needsFramebuffer&&Vs(Ve,ht,at.framebuffer),wa(Ve,ht,at.state,ur),at.profile&&ur(at.profile)&&io(Ve,ht,at,!1,!0),Ct)at.useVAO?at.drawVAO?ur(at.drawVAO)?ht(Ve.shared.vao,".setVAO(",at.drawVAO.append(Ve,ht),");"):Pt(Ve.shared.vao,".setVAO(",at.drawVAO.append(Ve,Pt),");"):Pt(Ve.shared.vao,".setVAO(",Ve.shared.vao,".targetVAO);"):(Pt(Ve.shared.vao,".setVAO(null);"),Y(Ve,Pt,at,Ct.attributes,br),Y(Ve,ht,at,Ct.attributes,ur)),D(Ve,Pt,at,Ct.uniforms,br,!1),D(Ve,ht,at,Ct.uniforms,ur,!0),J(Ve,Pt,ht,at);else{var Ur=Ve.global.def("{}"),Di=at.shader.progVar.append(Ve,ht),fi=ht.def(Di,".id"),Ti=ht.def(Ur,"[",fi,"]");ht(Ve.shared.gl,".useProgram(",Di,".program);","if(!",Ti,"){",Ti,"=",Ur,"[",fi,"]=",Ve.link(function(gn){return q(ne,Ve,at,gn,2)}),"(",Di,");}",Ti,".call(this,a0[",Rt,"],",Rt,");")}}function Ue(Ve,Qe){var at=Ve.proc("batch",2);Ve.batchId="0",ol(Ve,at);var Ct=!1,Ot=!0;Object.keys(Qe.context).forEach(function(Ur){Ct=Ct||Qe.context[Ur].propDep}),Ct||(ss(Ve,at,Qe.context),Ot=!1);var Rt=Qe.framebuffer,Bt=!1;Rt?(Rt.propDep?Ct=Bt=!0:Rt.contextDep&&Ct&&(Bt=!0),Bt||Vs(Ve,at,Rt)):Vs(Ve,at,null),Qe.state.viewport&&Qe.state.viewport.propDep&&(Ct=!0);function Dt(Ur){return Ur.contextDep&&Ct||Ur.propDep}Ys(Ve,at,Qe),wa(Ve,at,Qe.state,function(Ur){return!Dt(Ur)}),(!Qe.profile||!Dt(Qe.profile))&&io(Ve,at,Qe,!1,"a1"),Qe.contextDep=Ct,Qe.needsContext=Ot,Qe.needsFramebuffer=Bt;var yt=Qe.shader.progVar;if(yt.contextDep&&Ct||yt.propDep)we(Ve,at,Qe,null);else{var Pt=yt.append(Ve,at);if(at(Ve.shared.gl,".useProgram(",Pt,".program);"),Qe.shader.program)we(Ve,at,Qe,Qe.shader.program);else{at(Ve.shared.vao,".setVAO(null);");var ht=Ve.global.def("{}"),ur=at.def(Pt,".id"),br=at.def(ht,"[",ur,"]");at(Ve.cond(br).then(br,".call(this,a0,a1);").else(br,"=",ht,"[",ur,"]=",Ve.link(function(Ur){return q(we,Ve,Qe,Ur,2)}),"(",Pt,");",br,".call(this,a0,a1);"))}}Object.keys(Qe.state).length>0&&at(Ve.shared.current,".dirty=true;"),Ve.shared.vao&&at(Ve.shared.vao,".setVAO(null);")}function ft(Ve,Qe){var at=Ve.proc("scope",3);Ve.batchId="a2";var Ct=Ve.shared,Ot=Ct.current;if(ss(Ve,at,Qe.context),Qe.framebuffer&&Qe.framebuffer.append(Ve,at),Si(Object.keys(Qe.state)).forEach(function(Dt){var yt=Qe.state[Dt],Pt=yt.append(Ve,at);Mn(Pt)?Pt.forEach(function(ht,ur){pn(ht)?at.set(Ve.next[Dt],"["+ur+"]",ht):at.set(Ve.next[Dt],"["+ur+"]",Ve.link(ht,{stable:!0}))}):Ln(yt)?at.set(Ct.next,"."+Dt,Ve.link(Pt,{stable:!0})):at.set(Ct.next,"."+Dt,Pt)}),io(Ve,at,Qe,!0,!0),[Tt,xr,Kt,Ir,Yt].forEach(function(Dt){var yt=Qe.draw[Dt];if(yt){var Pt=yt.append(Ve,at);pn(Pt)?at.set(Ct.draw,"."+Dt,Pt):at.set(Ct.draw,"."+Dt,Ve.link(Pt),{stable:!0})}}),Object.keys(Qe.uniforms).forEach(function(Dt){var yt=Qe.uniforms[Dt].append(Ve,at);Array.isArray(yt)&&(yt="["+yt.map(function(Pt){return pn(Pt)?Pt:Ve.link(Pt,{stable:!0})})+"]"),at.set(Ct.uniforms,"["+Ve.link(bt.id(Dt),{stable:!0})+"]",yt)}),Object.keys(Qe.attributes).forEach(function(Dt){var yt=Qe.attributes[Dt].append(Ve,at),Pt=Ve.scopeAttrib(Dt);Object.keys(new Yr).forEach(function(ht){at.set(Pt,"."+ht,yt[ht])})}),Qe.scopeVAO){var Rt=Qe.scopeVAO.append(Ve,at);pn(Rt)?at.set(Ct.vao,".targetVAO",Rt):at.set(Ct.vao,".targetVAO",Ve.link(Rt,{stable:!0}))}function Bt(Dt){var yt=Qe.shader[Dt];if(yt){var Pt=yt.append(Ve,at);pn(Pt)?at.set(Ct.shader,"."+Dt,Pt):at.set(Ct.shader,"."+Dt,Ve.link(Pt,{stable:!0}))}}Bt(Ze),Bt(st),Object.keys(Qe.state).length>0&&(at(Ot,".dirty=true;"),at.exit(Ot,".dirty=true;")),at("a1(",Ve.shared.context,",a0,",Ve.batchId,");")}function Zt(Ve){if(!(typeof Ve!="object"||Mn(Ve))){for(var Qe=Object.keys(Ve),at=0;at=0;--q){var K=Vn[q];K&&K(si,null,0)}zt.flush(),Ei&&Ei.update()}function ba(){!ta&&Vn.length>0&&(ta=d.next(oa))}function is(){ta&&(d.cancel(oa),ta=null)}function Zs(q){q.preventDefault(),jr=!0,is(),na.forEach(function(K){K()})}function Va(q){zt.getError(),jr=!1,Nr.restore(),Bn.restore(),Ri.restore(),hi.restore(),li.restore(),mn.restore(),an.restore(),Ei&&Ei.restore(),Ji.procs.refresh(),ba(),Ki.forEach(function(K){K()})}pn&&(pn.addEventListener(Fo,Zs,!1),pn.addEventListener(Uo,Va,!1));function Ml(){Vn.length=0,is(),pn&&(pn.removeEventListener(Fo,Zs),pn.removeEventListener(Uo,Va)),Bn.clear(),mn.clear(),li.clear(),an.clear(),hi.clear(),ci.clear(),Ri.clear(),Ei&&Ei.clear(),kn.forEach(function(q){q()})}function zo(q){function K(Rt){var Bt=e({},Rt);delete Bt.uniforms,delete Bt.attributes,delete Bt.context,delete Bt.vao,"stencil"in Bt&&Bt.stencil.op&&(Bt.stencil.opBack=Bt.stencil.opFront=Bt.stencil.op,delete Bt.stencil.op);function Dt(yt){if(yt in Bt){var Pt=Bt[yt];delete Bt[yt],Object.keys(Pt).forEach(function(ht){Bt[yt+"."+ht]=Pt[ht]})}}return Dt("blend"),Dt("depth"),Dt("cull"),Dt("stencil"),Dt("polygonOffset"),Dt("scissor"),Dt("sample"),"vao"in Rt&&(Bt.vao=Rt.vao),Bt}function de(Rt,Bt){var Dt={},yt={};return Object.keys(Rt).forEach(function(Pt){var ht=Rt[Pt];if(h.isDynamic(ht)){yt[Pt]=h.unbox(ht,Pt);return}else if(Bt&&Array.isArray(ht)){for(var ur=0;ur0)return Ve.call(this,Ct(Rt|0),Rt|0)}else if(Array.isArray(Rt)){if(Rt.length)return Ve.call(this,Rt,Rt.length)}else return qt.call(this,Rt)}return e(Ot,{stats:Zt,destroy:function(){hr.destroy()}})}var Qs=mn.setFBO=zo({framebuffer:h.define.call(null,$s,"framebuffer")});function al(q,K){var de=0;Ji.procs.poll();var ne=K.color;ne&&(zt.clearColor(+ne[0]||0,+ne[1]||0,+ne[2]||0,+ne[3]||0),de|=Ms),"depth"in K&&(zt.clearDepth(+K.depth),de|=Xs),"stencil"in K&&(zt.clearStencil(K.stencil|0),de|=Gn),zt.clear(de)}function Vl(q){if("framebuffer"in q)if(q.framebuffer&&q.framebuffer_reglType==="framebufferCube")for(var K=0;K<6;++K)Qs(e({framebuffer:q.framebuffer.faces[K]},q),al);else Qs(q,al);else al(null,q)}function ss(q){Vn.push(q);function K(){var de=dl(Vn,q);function ne(){var we=dl(Vn,ne);Vn[we]=Vn[Vn.length-1],Vn.length-=1,Vn.length<=0&&is()}Vn[de]=ne}return ba(),{cancel:K}}function Vs(){var q=Ni.viewport,K=Ni.scissor_box;q[0]=q[1]=K[0]=K[1]=0,si.viewportWidth=si.framebufferWidth=si.drawingBufferWidth=q[2]=K[2]=zt.drawingBufferWidth,si.viewportHeight=si.framebufferHeight=si.drawingBufferHeight=q[3]=K[3]=zt.drawingBufferHeight}function Ys(){si.tick+=1,si.time=ol(),Vs(),Ji.procs.poll()}function wa(){hi.refresh(),Vs(),Ji.procs.refresh(),Ei&&Ei.update()}function ol(){return(v()-Hn)/1e3}wa();function io(q,K){var de;switch(q){case"frame":return ss(K);case"lost":de=na;break;case"restore":de=Ki;break;case"destroy":de=kn;break;default:}return de.push(K),{cancel:function(){for(var ne=0;ne=0},read:Vi,destroy:Ml,_gl:zt,_refresh:wa,poll:function(){Ys(),Ei&&Ei.update()},now:ol,stats:mi,getCachedCode:Y,preloadCachedCode:D});return bt.onDone(null,J),J}return Sc})});var Lz=ye((S_r,zBe)=>{"use strict";var WUt=zX(),XUt=FBe();zBe.exports=function(t,r,n){var i=t._fullLayout,a=!0;return i._glcanvas.each(function(o){if(o.regl){o.regl.preloadCachedCode(n);return}if(!(o.pick&&!i._has("parcoords"))){try{o.regl=XUt({canvas:this,attributes:{antialias:!o.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||window.devicePixelRatio,extensions:r||[],cachedCode:n||{}})}catch(s){a=!1}o.regl||(a=!1),a&&this.addEventListener("webglcontextlost",function(s){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:s,layer:o.key})},!1)}}),a||WUt({container:i._glcontainer.node()}),a}});var xK=ye((_K,UBe)=>{"use strict";var OBe=_Y(),qBe=KY(),ZUt=Sqe(),BBe=DBe(),yK=Dr(),YUt=Cg().selectMode,KUt=Lz(),JUt=Ru(),$Ut=SU(),QUt=pY().styleTextSelection,NBe={};function eVt(e,t,r,n){var i=e._size,a=e.width*n,o=e.height*n,s=i.l*n,l=i.b*n,u=i.r*n,c=i.t*n,f=i.w*n,h=i.h*n;return[s+t.domain[0]*f,l+r.domain[0]*h,a-u-(1-t.domain[1])*f,o-c-(1-r.domain[1])*h]}var _K=UBe.exports=function(t,r,n){if(n.length){var i=t._fullLayout,a=r._scene,o=r.xaxis,s=r.yaxis,l,u;if(a){var c=KUt(t,["ANGLE_instanced_arrays","OES_element_index_uint"],NBe);if(!c){a.init();return}var f=a.count,h=i._glcanvas.data()[0].regl;if($Ut(t,r,n),a.dirty){if((a.line2d||a.error2d)&&!(a.scatter2d||a.fill2d||a.glText)&&h.clear({color:!0,depth:!0}),a.error2d===!0&&(a.error2d=ZUt(h)),a.line2d===!0&&(a.line2d=qBe(h)),a.scatter2d===!0&&(a.scatter2d=OBe(h)),a.fill2d===!0&&(a.fill2d=qBe(h)),a.glText===!0)for(a.glText=new Array(f),l=0;la.glText.length){var d=f-a.glText.length;for(l=0;lre&&(isNaN(H[oe])||isNaN(H[oe+1]));)oe-=2;N.positions=H.slice(re,oe+2)}return N}),a.line2d.update(a.lineOptions)),a.error2d){var b=(a.errorXOptions||[]).concat(a.errorYOptions||[]);a.error2d.update(b)}a.scatter2d&&a.scatter2d.update(a.markerOptions),a.fillOrder=yK.repeat(null,f),a.fill2d&&(a.fillOptions=a.fillOptions.map(function(N,H){var re=n[H];if(!(!N||!re||!re[0]||!re[0].trace)){var oe=re[0],_e=oe.trace,Ce=oe.t,Le=a.lineOptions[H],ge,ie,Se=[];_e._ownfill&&Se.push(H),_e._nexttrace&&Se.push(H+1),Se.length&&(a.fillOrder[H]=Se);var Ee=[],Ae=Le&&Le.positions||Ce.positions,Be,Pe;if(_e.fill==="tozeroy"){for(Be=0;BeBe&&isNaN(Ae[Pe+1]);)Pe-=2;Ae[Be+1]!==0&&(Ee=[Ae[Be],0]),Ee=Ee.concat(Ae.slice(Be,Pe+2)),Ae[Pe+1]!==0&&(Ee=Ee.concat([Ae[Pe],0]))}else if(_e.fill==="tozerox"){for(Be=0;BeBe&&isNaN(Ae[Pe]);)Pe-=2;Ae[Be]!==0&&(Ee=[0,Ae[Be+1]]),Ee=Ee.concat(Ae.slice(Be,Pe+2)),Ae[Pe]!==0&&(Ee=Ee.concat([0,Ae[Pe+1]]))}else if(_e.fill==="toself"||_e.fill==="tonext"){for(Ee=[],ge=0,N.splitNull=!0,ie=0;ie-1;for(let[N]of n)if(N){var T=N.trace,L=N.t,x=L.index,C=T._length,M=L.x,g=L.y;if(T.selectedpoints||k||E){if(k||(k=!0),T.selectedpoints){var P=a.selectBatch[x]=yK.selIndices2selPoints(T),A={};for(u=0;u{"use strict";var VBe=o7e();VBe.plot=xK();GBe.exports=VBe});var WBe=ye((E_r,jBe)=>{"use strict";jBe.exports=HBe()});var bK=ye((k_r,KBe)=>{"use strict";var tVt=pf(),YBe=Tu(),XBe=df().axisHoverFormat,{hovertemplateAttrs:rVt,templatefallbackAttrs:iVt}=Ll(),zk=gk(),nVt=Rh().idRegex,aVt=vl().templatedArray,x5=Ao().extendFlat,d1=tVt.marker,oVt=d1.line,sVt=x5(YBe("marker.line",{editTypeOverride:"calc"}),{width:x5({},oVt.width,{editType:"calc"}),editType:"calc"}),Pz=x5(YBe("marker"),{symbol:d1.symbol,angle:d1.angle,size:x5({},d1.size,{editType:"markerSize"}),sizeref:d1.sizeref,sizemin:d1.sizemin,sizemode:d1.sizemode,opacity:d1.opacity,colorbar:d1.colorbar,line:sVt,editType:"calc"});Pz.color.editType=Pz.cmin.editType=Pz.cmax.editType="style";function ZBe(e){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:nVt[e],editType:"plot"}}}KBe.exports={dimensions:aVt("dimension",{visible:{valType:"boolean",dflt:!0,editType:"calc"},label:{valType:"string",editType:"calc"},values:{valType:"data_array",editType:"calc+clearAxisTypes"},axis:{type:{valType:"enumerated",values:["linear","log","date","category"],editType:"calc+clearAxisTypes"},matches:{valType:"boolean",dflt:!1,editType:"calc"},editType:"calc+clearAxisTypes"},editType:"calc+clearAxisTypes"}),text:x5({},zk.text,{}),hovertext:x5({},zk.hovertext,{}),hovertemplate:rVt(),hovertemplatefallback:iVt(),xhoverformat:XBe("x"),yhoverformat:XBe("y"),marker:Pz,xaxes:ZBe("x"),yaxes:ZBe("y"),diagonal:{visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},showupperhalf:{valType:"boolean",dflt:!0,editType:"calc"},showlowerhalf:{valType:"boolean",dflt:!0,editType:"calc"},selected:{marker:zk.selected.marker,editType:"calc"},unselected:{marker:zk.unselected.marker,editType:"calc"},opacity:zk.opacity}});var Iz=ye((C_r,JBe)=>{"use strict";JBe.exports=function(e,t,r,n){n||(n=1/0);var i,a;for(i=0;i{"use strict";var wK=Dr(),lVt=Zd(),$Be=bK(),uVt=Ru(),cVt=$p(),fVt=Iz(),hVt=WF().isOpenSymbol;QBe.exports=function(t,r,n,i){function a(d,v){return wK.coerce(t,r,$Be,d,v)}var o=lVt(t,r,{name:"dimensions",handleItemDefaults:dVt}),s=a("diagonal.visible"),l=a("showupperhalf"),u=a("showlowerhalf"),c=fVt(r,o,"values");if(!c||!s&&!l&&!u){r.visible=!1;return}a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat"),cVt(t,r,n,i,a,{noAngleRef:!0,noLineDash:!0,noStandOff:!0});var f=hVt(r.marker.symbol),h=uVt.isBubble(r);a("marker.line.width",f||h?1:0),vVt(t,r,i,a),wK.coerceSelectionMarkerOpacity(r,a)};function dVt(e,t){function r(i,a){return wK.coerce(e,t,$Be.dimensions,i,a)}r("label");var n=r("values");n&&n.length?r("visible"):t.visible=!1,r("axis.type"),r("axis.matches")}function vVt(e,t,r,n){var i=t.dimensions,a=i.length,o=t.showupperhalf,s=t.showlowerhalf,l=t.diagonal.visible,u,c,f=new Array(a),h=new Array(a);for(u=0;uc&&o||u{"use strict";var tNe=Dr();rNe.exports=function(t,r){var n=t._fullLayout,i=r.uid,a=n._splomScenes;a||(a=n._splomScenes={});var o={dirty:!0,selectBatch:[],unselectBatch:[]},s={matrix:!1,selectBatch:[],unselectBatch:[]},l=a[r.uid];return l||(l=a[i]=tNe.extendFlat({},o,s),l.draw=function(){l.matrix&&l.matrix.draw&&(l.selectBatch.length||l.unselectBatch.length?l.matrix.draw(l.unselectBatch,l.selectBatch):l.matrix.draw()),l.dirty=!1},l.destroy=function(){l.matrix&&l.matrix.destroy&&l.matrix.destroy(),l.matrixOptions=null,l.selectBatch=null,l.unselectBatch=null,l=null}),l.dirty||tNe.extendFlat(l,o),l}});var oNe=ye((I_r,aNe)=>{"use strict";var TK=Dr(),Rz=hf(),pVt=q0().calcMarkerSize,gVt=q0().calcAxisExpansion,mVt=z0(),nNe=ow().markerSelection,yVt=ow().markerStyle,_Vt=iNe(),xVt=fs().BADNUM,bVt=px().TOO_MANY_POINTS;aNe.exports=function(t,r){var n=r.dimensions,i=r._length,a={},o=a.cdata=[],s=a.data=[],l=r._visibleDims=[],u,c,f,h,d;function v(E,T){for(var L=E.makeCalcdata({v:T.values,vcalendar:r.calendar},"v"),x=0;xbVt,p;for(b?p=a.sizeAvg||Math.max(a.size,3):p=pVt(r,i),c=0;c{(function(){var e,t,r,n,i,a;typeof performance!="undefined"&&performance!==null&&performance.now?Ok.exports=function(){return performance.now()}:typeof process!="undefined"&&process!==null&&process.hrtime?(Ok.exports=function(){return(e()-i)/1e6},t=process.hrtime,e=function(){var o;return o=t(),o[0]*1e9+o[1]},n=e(),a=process.uptime()*1e9,i=n-a):Date.now?(Ok.exports=function(){return Date.now()-r},r=Date.now()):(Ok.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(sNe)});var cNe=ye((R_r,zz)=>{var wVt=lNe(),v1=window,Dz=["moz","webkit"],w5="AnimationFrame",T5=v1["request"+w5],qk=v1["cancel"+w5]||v1["cancelRequest"+w5];for(b5=0;!T5&&b5{fNe.exports=function(t,r){var n=typeof t=="number",i=typeof r=="number";n&&!i?(r=t,t=0):!n&&!i&&(t=0,r=0),t=t|0,r=r|0;var a=r-t;if(a<0)throw new Error("array length must be positive");for(var o=new Array(a),s=0,l=t;s{"use strict";var TVt=_Y(),AVt=ey(),SVt=rw(),dNe=cNe(),MVt=hNe(),SK=s5(),EVt=iw();pNe.exports=Ax;function Ax(e,t){if(!(this instanceof Ax))return new Ax(e,t);this.traces=[],this.passes={},this.regl=e,this.scatter=TVt(e),this.canvas=this.scatter.canvas}Ax.prototype.render=function(...e){return e.length&&this.update(...e),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=dNe(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,dNe(()=>{this.dirty=!1})),this)};Ax.prototype.update=function(...e){if(!e.length)return;for(let n=0;nb||!i.lower&&_{t[a+s]=n})}this.scatter.draw(...t)}return this};Ax.prototype.destroy=function(){return this.traces.forEach(e=>{e.buffer&&e.buffer.destroy&&e.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function kVt(e,t,r){let n=e.id!=null?e.id:e,i=t,a=r;return n<<16|(i&255)<<8|a&255}function Oz(e,t,r){let n,i,a,o,s,l,u,c,f=e[t],h=e[r];return f.length>2?(n=f[0],a=f[2],i=f[1],o=f[3]):f.length?(n=i=f[0],a=o=f[1]):(n=f.x,i=f.y,a=f.x+f.width,o=f.y+f.height),h.length>2?(s=h[0],u=h[2],l=h[1],c=h[3]):h.length?(s=l=h[0],u=c=h[1]):(s=h.x,l=h.y,u=h.x+h.width,c=h.y+h.height),[s,i,u,o]}function vNe(e){if(typeof e=="number")return[e,e,e,e];if(e.length===2)return[e[0],e[1],e[0],e[1]];{let t=SK(e);return[t.x,t.y,t.x+t.width,t.y+t.height]}}});var yNe=ye((z_r,mNe)=>{"use strict";var CVt=gNe(),MK=Dr(),qz=hf(),LVt=Cg().selectMode;mNe.exports=function(t,r,n){if(n.length)for(var i=0;i-1,A=LVt(c)||!!i.selectedpoints||P,z=!0;if(A){var O=i._length;if(i.selectedpoints){o.selectBatch=i.selectedpoints;var U=i.selectedpoints,G={};for(d=0;d{"use strict";_Ne.getDimIndex=function(t,r){for(var n=r._id,i=n.charAt(0),a={x:0,y:1}[i],o=t._visibleDims,s=0;s{"use strict";var xNe=EK(),IVt=jF().calcHover,bNe=ho().getFromId,RVt=Ao().extendFlat;function DVt(e,t,r,n,i){i||(i={});var a=(n||"").charAt(0)==="x",o=(n||"").charAt(0)==="y",s=wNe(e,t,r);if((a||o)&&i.hoversubplots==="axis"&&s[0])for(var l=(a?e.xa:e.ya)._subplotsWith,u=i.gd,c=RVt({},e),f=0;f{"use strict";var kNe=Dr(),SNe=kNe.pushUnique,MNe=Ru(),ENe=EK();CNe.exports=function(t,r){var n=t.cd,i=n[0].trace,a=n[0].t,o=t.scene,s=o.matrixOptions.cdata,l=t.xaxis,u=t.yaxis,c=[];if(!o)return c;var f=!MNe.hasMarkers(i)&&!MNe.hasText(i);if(i.visible!==!0||f)return c;var h=ENe.getDimIndex(i,l),d=ENe.getDimIndex(i,u);if(h===!1||d===!1)return c;var v=a.xpx[h],_=a.ypx[d],b=s[h],p=s[d],k=(t.scene.selectBatch||[]).slice(),E=[];if(r!==!1&&!r.degenerate)for(var T=0;T{"use strict";var PNe=Dr(),FVt=z0(),zVt=ow().markerStyle;INe.exports=function(t,r){var n=r.trace,i=t._fullLayout._splomScenes[n.uid];if(i){FVt(t,n),PNe.extendFlat(i.matrixOptions,zVt(t,n));var a=PNe.extendFlat({},i.matrixOptions,i.viewOpts);i.matrix.update(a,null)}}});var FNe=ye((U_r,DNe)=>{"use strict";var OVt=qa(),qVt=yV();DNe.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:bK(),supplyDefaults:eNe(),colorbar:$d(),calc:oNe(),plot:yNe(),hoverPoints:ANe().hoverPoints,selectPoints:LNe(),editStyle:RNe(),meta:{}};OVt.register(qVt)});var UNe=ye((V_r,NNe)=>{"use strict";var BVt=KY(),NVt=qa(),UVt=Lz(),VVt=Id().getModuleCalcData,Sx=mh(),zNe=hf().getFromId,ONe=ho().shouldShowZeroLine,qNe="splom",BNe={};function GVt(e){var t=e._fullLayout,r=NVt.getModule(qNe),n=VVt(e.calcdata,r)[0],i=UVt(e,["ANGLE_instanced_arrays","OES_element_index_uint"],BNe);i&&(t._hasOnlyLargeSploms&&kK(e),r.plot(e,{},n))}function HVt(e){var t=e.calcdata,r=e._fullLayout;r._hasOnlyLargeSploms&&kK(e);for(var n=0;n{"use strict";var VNe=FNe();VNe.basePlotModule=UNe(),GNe.exports=VNe});var WNe=ye((H_r,jNe)=>{"use strict";jNe.exports=HNe()});var PK=ye((j_r,XNe)=>{"use strict";var ZVt=Tu(),CK=Rd(),LK=ec(),YVt=Cc().attributes,Bz=Ao().extendFlat,KVt=vl().templatedArray;XNe.exports={domain:YVt({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:LK({editType:"plot"}),tickfont:LK({autoShadowDflt:!0,editType:"plot"}),rangefont:LK({editType:"plot"}),dimensions:KVt("dimension",{label:{valType:"string",editType:"plot"},tickvals:Bz({},CK.tickvals,{editType:"plot"}),ticktext:Bz({},CK.ticktext,{editType:"plot"}),tickformat:Bz({},CK.tickformat,{editType:"plot"}),visible:{valType:"boolean",dflt:!0,editType:"plot"},range:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},constraintrange:{valType:"info_array",freeLength:!0,dimensions:"1-2",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},multiselect:{valType:"boolean",dflt:!0,editType:"plot"},values:{valType:"data_array",editType:"calc"},editType:"calc"}),line:Bz({editType:"calc"},ZVt("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"})),unselected:{line:{color:{valType:"color",dflt:"#7f7f7f",editType:"plot"},opacity:{valType:"number",min:0,max:1,dflt:"auto",editType:"plot"},editType:"plot"},editType:"plot"}}});var Bk=ye((W_r,ZNe)=>{"use strict";ZNe.exports={maxDimensionCount:60,overdrag:45,verticalPadding:2,tickDistance:50,canvasPixelRatio:1,blockLineCount:5e3,layers:["contextLineLayer","focusLineLayer","pickLineLayer"],axisTitleOffset:28,axisExtentOffset:10,bar:{width:4,captureWidth:10,fillColor:"magenta",fillOpacity:1,snapDuration:150,snapRatio:.25,snapClose:.01,strokeOpacity:1,strokeWidth:1,handleHeight:8,handleOpacity:1,handleOverlap:0},cn:{axisExtentText:"axis-extent-text",parcoordsLineLayers:"parcoords-line-layers",parcoordsLineLayer:"parcoords-lines",parcoords:"parcoords",parcoordsControlView:"parcoords-control-view",yAxis:"y-axis",axisOverlays:"axis-overlays",axis:"axis",axisHeading:"axis-heading",axisTitle:"axis-title",axisExtent:"axis-extent",axisExtentTop:"axis-extent-top",axisExtentTopText:"axis-extent-top-text",axisExtentBottom:"axis-extent-bottom",axisExtentBottomText:"axis-extent-bottom-text",axisBrush:"axis-brush"},id:{filterBarPattern:"filter-bar-pattern"}}});var iy=ye((X_r,KNe)=>{"use strict";var JVt=ZS();function YNe(e){return[e]}KNe.exports={keyFun:function(e){return e.key},repeat:YNe,descend:JVt,wrap:YNe,unwrap:function(e){return e[0]}}});var DK=ye((Z_r,sUe)=>{"use strict";var Th=Bk(),im=Oa(),$Vt=iy().keyFun,Nz=iy().repeat,A5=Dr().sorterAsc,QVt=Dr().strTranslate,JNe=Th.bar.snapRatio;function $Ne(e,t){return e*(1-JNe)+t*JNe}var QNe=Th.bar.snapClose;function eGt(e,t){return e*(1-QNe)+t*QNe}function Vz(e,t,r,n){if(tGt(r,n))return r;var i=e?-1:1,a=0,o=t.length-1;if(i<0){var s=a;a=o,o=s}for(var l=t[a],u=l,c=a;i*c=t[r][0]&&e<=t[r][1])return!0;return!1}function rGt(e){e.attr("x",-Th.bar.captureWidth/2).attr("width",Th.bar.captureWidth)}function iGt(e){e.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function nGt(e){if(!e.brush.filterSpecified)return"0,"+e.height;for(var t=eUe(e.brush.filter.getConsolidated(),e.height),r=[0],n,i,a,o=t.length?t[0][0]:null,s=0;se[1]+r||t=.9*e[1]+.1*e[0]?"n":t<=.9*e[0]+.1*e[1]?"s":"ns"}function tUe(){im.select(document.body).style("cursor",null)}function RK(e){e.attr("stroke-dasharray",nGt)}function Uz(e,t){var r=im.select(e).selectAll(".highlight, .highlight-shadow"),n=t?r.transition().duration(Th.bar.snapDuration).each("end",t):r;RK(n)}function rUe(e,t){var r=e.brush,n=r.filterSpecified,i=NaN,a={},o;if(n){var s=e.height,l=r.filter.getConsolidated(),u=eUe(l,s),c=NaN,f=NaN,h=NaN;for(o=0;o<=u.length;o++){var d=u[o];if(d&&d[0]<=t&&t<=d[1]){c=o;break}else if(f=o?o-1:NaN,d&&d[0]>t){h=o;break}}if(i=c,isNaN(i)&&(isNaN(f)||isNaN(h)?i=isNaN(f)?h:f:i=t-u[f][1]=k[0]&&p<=k[1]){a.clickableOrdinalRange=k;break}}}return a}function oGt(e,t){im.event.sourceEvent.stopPropagation();var r=t.height-im.mouse(e)[1]-2*Th.verticalPadding,n=t.unitToPaddedPx.invert(r),i=t.brush,a=rUe(t,r),o=a.interval,s=i.svgBrush;if(s.wasDragged=!1,s.grabbingBar=a.region==="ns",s.grabbingBar){var l=o.map(t.unitToPaddedPx);s.grabPoint=r-l[0]-Th.verticalPadding,s.barLength=l[1]-l[0]}s.clickableOrdinalRange=a.clickableOrdinalRange,s.stayingIntervals=t.multiselect&&i.filterSpecified?i.filter.getConsolidated():[],o&&(s.stayingIntervals=s.stayingIntervals.filter(function(u){return u[0]!==o[0]&&u[1]!==o[1]})),s.startExtent=a.region?o[a.region==="s"?1:0]:n,t.parent.inBrushDrag=!0,s.brushStartCallback()}function iUe(e,t){im.event.sourceEvent.stopPropagation();var r=t.height-im.mouse(e)[1]-2*Th.verticalPadding,n=t.brush.svgBrush;n.wasDragged=!0,n._dragging=!0,n.grabbingBar?n.newExtent=[r-n.grabPoint,r+n.barLength-n.grabPoint].map(t.unitToPaddedPx.invert):n.newExtent=[n.startExtent,t.unitToPaddedPx.invert(r)].sort(A5),t.brush.filterSpecified=!0,n.extent=n.stayingIntervals.concat([n.newExtent]),n.brushCallback(t),Uz(e.parentNode)}function sGt(e,t){var r=t.brush,n=r.filter,i=r.svgBrush;i._dragging||(nUe(e,t),iUe(e,t),t.brush.svgBrush.wasDragged=!1),i._dragging=!1;var a=im.event;a.sourceEvent.stopPropagation();var o=i.grabbingBar;if(i.grabbingBar=!1,i.grabLocation=void 0,t.parent.inBrushDrag=!1,tUe(),!i.wasDragged){i.wasDragged=void 0,i.clickableOrdinalRange?r.filterSpecified&&t.multiselect?i.extent.push(i.clickableOrdinalRange):(i.extent=[i.clickableOrdinalRange],r.filterSpecified=!0):o?(i.extent=i.stayingIntervals,i.extent.length===0&&IK(r)):IK(r),i.brushCallback(t),Uz(e.parentNode),i.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);return}var s=function(){n.set(n.getConsolidated())};if(t.ordinal){var l=t.unitTickvals;l[l.length-1]i.newExtent[0];i.extent=i.stayingIntervals.concat(u?[i.newExtent]:[]),i.extent.length||IK(r),i.brushCallback(t),u?Uz(e.parentNode,s):(s(),Uz(e.parentNode))}else s();i.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}function nUe(e,t){var r=t.height-im.mouse(e)[1]-2*Th.verticalPadding,n=rUe(t,r),i="crosshair";n.clickableOrdinalRange?i="pointer":n.region&&(i=n.region+"-resize"),im.select(document.body).style("cursor",i)}function lGt(e){e.on("mousemove",function(t){im.event.preventDefault(),t.parent.inBrushDrag||nUe(this,t)}).on("mouseleave",function(t){t.parent.inBrushDrag||tUe()}).call(im.behavior.drag().on("dragstart",function(t){oGt(this,t)}).on("drag",function(t){iUe(this,t)}).on("dragend",function(t){sGt(this,t)}))}function aUe(e,t){return e[0]-t[0]}function uGt(e,t,r){var n=r._context.staticPlot,i=e.selectAll(".background").data(Nz);i.enter().append("rect").classed("background",!0).call(rGt).call(iGt).style("pointer-events",n?"none":"auto").attr("transform",QVt(0,Th.verticalPadding)),i.call(lGt).attr("height",function(s){return s.height-Th.verticalPadding});var a=e.selectAll(".highlight-shadow").data(Nz);a.enter().append("line").classed("highlight-shadow",!0).attr("x",-Th.bar.width/2).attr("stroke-width",Th.bar.width+Th.bar.strokeWidth).attr("stroke",t).attr("opacity",Th.bar.strokeOpacity).attr("stroke-linecap","butt"),a.attr("y1",function(s){return s.height}).call(RK);var o=e.selectAll(".highlight").data(Nz);o.enter().append("line").classed("highlight",!0).attr("x",-Th.bar.width/2).attr("stroke-width",Th.bar.width-Th.bar.strokeWidth).attr("stroke",Th.bar.fillColor).attr("opacity",Th.bar.fillOpacity).attr("stroke-linecap","butt"),o.attr("y1",function(s){return s.height}).call(RK)}function cGt(e,t,r){var n=e.selectAll("."+Th.cn.axisBrush).data(Nz,$Vt);n.enter().append("g").classed(Th.cn.axisBrush,!0),uGt(n,t,r)}function fGt(e){return e.svgBrush.extent.map(function(t){return t.slice()})}function IK(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function hGt(e){return function(r){var n=r.brush,i=fGt(n),a=i.slice();n.filter.set(a),e()}}function oUe(e){for(var t=e.slice(),r=[],n,i=t.shift();i;){for(n=i.slice();(i=t.shift())&&i[0]<=n[1];)n[1]=Math.max(n[1],i[1]);r.push(n)}return r.length===1&&r[0][0]>r[0][1]&&(r=[]),r}function dGt(){var e=[],t,r;return{set:function(n){e=n.map(function(i){return i.slice().sort(A5)}).sort(aUe),e.length===1&&e[0][0]===-1/0&&e[0][1]===1/0&&(e=[[0,-1]]),t=oUe(e),r=e.reduce(function(i,a){return[Math.min(i[0],a[0]),Math.max(i[1],a[1])]},[1/0,-1/0])},get:function(){return e.slice()},getConsolidated:function(){return t},getBounds:function(){return r}}}function vGt(e,t,r,n,i,a){var o=dGt();return o.set(r),{filter:o,filterSpecified:t,svgBrush:{extent:[],brushStartCallback:n,brushCallback:hGt(i),brushEndCallback:a}}}function pGt(e,t){if(Array.isArray(e[0])?(e=e.map(function(n){return n.sort(A5)}),t.multiselect?e=oUe(e.sort(aUe)):e=[e[0]]):e=[e.sort(A5)],t.tickvals){var r=t.tickvals.slice().sort(A5);if(e=e.map(function(n){var i=[Vz(0,r,n[0],[]),Vz(1,r,n[1],[])];if(i[1]>i[0])return i}).filter(function(n){return n}),!e.length)return}return e.length>1?e:e[0]}sUe.exports={makeBrush:vGt,ensureAxisBrush:cGt,cleanRanges:pGt}});var cUe=ye((Y_r,uUe)=>{"use strict";var Mx=Dr(),gGt=pv().hasColorscale,mGt=td(),yGt=Cc().defaults,_Gt=Zd(),xGt=ho(),lUe=PK(),bGt=DK(),FK=Bk().maxDimensionCount,wGt=Iz();function TGt(e,t,r,n,i){var a=i("line.color",r);if(gGt(e,"line")&&Mx.isArrayOrTypedArray(a)){if(a.length)return i("line.colorscale"),mGt(e,t,n,i,{prefix:"line.",cLetter:"c"}),a.length;t.line.color=r}return 1/0}function AGt(e,t,r,n){function i(u,c){return Mx.coerce(e,t,lUe.dimensions,u,c)}var a=i("values"),o=i("visible");if(a&&a.length||(o=t.visible=!1),o){i("label"),i("tickvals"),i("ticktext"),i("tickformat");var s=i("range");t._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:s},xGt.setConvert(t._ax,n.layout),i("multiselect");var l=i("constraintrange");l&&(t.constraintrange=bGt.cleanRanges(l,t))}}uUe.exports=function(t,r,n,i){function a(c,f){return Mx.coerce(t,r,lUe,c,f)}var o=t.dimensions;Array.isArray(o)&&o.length>FK&&(Mx.log("parcoords traces support up to "+FK+" dimensions at the moment"),o.splice(FK));var s=_Gt(t,r,{name:"dimensions",layout:i,handleItemDefaults:AGt}),l=TGt(t,r,n,i,a);yGt(r,i,a),(!Array.isArray(s)||!s.length)&&(r.visible=!1),wGt(r,s,"values",l);var u=Mx.extendFlat({},i.font,{size:Math.round(i.font.size/1.2)});Mx.coerceFont(a,"labelfont",u),Mx.coerceFont(a,"tickfont",u,{autoShadowDflt:!0}),Mx.coerceFont(a,"rangefont",u),a("labelangle"),a("labelside"),a("unselected.line.color"),a("unselected.line.opacity")}});var hUe=ye((K_r,fUe)=>{"use strict";var SGt=Dr().isArrayOrTypedArray,zK=tc(),MGt=iy().wrap;fUe.exports=function(t,r){var n,i;return zK.hasColorscale(r,"line")&&SGt(r.line.color)?(n=r.line.color,i=zK.extractOpts(r.line).colorscale,zK.calc(t,r,{vals:n,containerStr:"line",cLetter:"c"})):(n=EGt(r._length),i=[[0,r.line.color],[1,r.line.color]]),MGt({lineColor:n,cscale:i})};function EGt(e){for(var t=new Array(e),r=0;r>>16,(e&65280)>>>8,e&255],alpha:1};if(typeof e=="number")return{space:"rgb",values:[e>>>16,(e&65280)>>>8,e&255],alpha:1};if(e=String(e).toLowerCase(),OK.default[e])r=OK.default[e].slice(),i="rgb";else if(e==="transparent")n=0,i="rgb",r=[0,0,0];else if(e[0]==="#"){var a=e.slice(1),o=a.length,s=o<=4;n=1,s?(r=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],o===4&&(n=parseInt(a[3]+a[3],16)/255)):(r=[parseInt(a[0]+a[1],16),parseInt(a[2]+a[3],16),parseInt(a[4]+a[5],16)],o===8&&(n=parseInt(a[6]+a[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),i="rgb"}else if(t=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(e)){var l=t[1];i=l.replace(/a$/,"");var u=i==="cmyk"?4:i==="gray"?1:3;r=t[2].trim().split(/\s*[,\/]\s*|\s+/),i==="color"&&(i=r.shift()),r=r.map(function(h,d){if(h[h.length-1]==="%")return h=parseFloat(h)/100,d===3?h:i==="rgb"?h*255:i[0]==="h"||i[0]==="l"&&!d?h*100:i==="lab"?h*125:i==="lch"?d<2?h*150:h*360:i[0]==="o"&&!d?h:i==="oklab"?h*.4:i==="oklch"?d<2?h*.4:h*360:h;if(i[d]==="h"||d===2&&i[i.length-1]==="h"){if(dUe[h]!==void 0)return dUe[h];if(h.endsWith("deg"))return parseFloat(h);if(h.endsWith("turn"))return parseFloat(h)*360;if(h.endsWith("grad"))return parseFloat(h)*360/400;if(h.endsWith("rad"))return parseFloat(h)*180/Math.PI}return h==="none"?0:parseFloat(h)}),n=r.length>u?r.pop():1}else/[0-9](?:\s|\/|,)/.test(e)&&(r=e.match(/([0-9]+)/g).map(function(h){return parseFloat(h)}),i=((f=(c=e.match(/([a-z])/ig))==null?void 0:c.join(""))==null?void 0:f.toLowerCase())||"rgb");return{space:i,values:r,alpha:n}}var OK,vUe,dUe,pUe=gu(()=>{OK=Att(TX(),1),vUe=kGt,dUe={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}});var Nk,qK=gu(()=>{Nk={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}});var Gz,gUe=gu(()=>{qK();Gz={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100,i,a,o,s,l,u=0;if(r===0)return l=n*255,[l,l,l];for(a=n<.5?n*(1+r):n+r-n*r,i=2*n-a,s=[0,0,0];u<3;)o=t+1/3*-(u-1),o<0?o++:o>1&&o--,l=6*o<1?i+(a-i)*6*o:2*o<1?a:3*o<2?i+(a-i)*(2/3-o)*6:i,s[u++]=l*255;return s}};Nk.hsl=function(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=a-i,s,l,u;return a===i?s=0:t===a?s=(r-n)/o:r===a?s=2+(n-t)/o:n===a&&(s=4+(t-r)/o),s=Math.min(s*60,360),s<0&&(s+=360),u=(i+a)/2,a===i?l=0:u<=.5?l=o/(a+i):l=o/(2-a-i),[s,l*100,u*100]}});var yUe={};mee(yUe,{default:()=>mUe});function mUe(e){Array.isArray(e)&&e.raw&&(e=String.raw(...arguments)),e instanceof Number&&(e=+e);var t,r,n,i=vUe(e);if(!i.space)return[];let a=i.space[0]==="h"?Gz.min:Nk.min,o=i.space[0]==="h"?Gz.max:Nk.max;return t=Array(3),t[0]=Math.min(Math.max(i.values[0],a[0]),o[0]),t[1]=Math.min(Math.max(i.values[1],a[1]),o[1]),t[2]=Math.min(Math.max(i.values[2],a[2]),o[2]),i.space[0]==="h"&&(t=Gz.rgb(t)),t.push(Math.min(Math.max(i.alpha,0),1)),t}var _Ue=gu(()=>{pUe();qK();gUe()});var BK=ye(Hz=>{"use strict";var CGt=Dr().isTypedArray;Hz.convertTypedArray=function(e){return CGt(e)?Array.prototype.slice.call(e):e};Hz.isOrdinal=function(e){return!!e.tickvals};Hz.isVisible=function(e){return e.visible||!("visible"in e)}});var CUe=ye((axr,kUe)=>{"use strict";var LGt=["precision highp float;","","varying vec4 fragColor;","","attribute vec4 p01_04, p05_08, p09_12, p13_16,"," p17_20, p21_24, p25_28, p29_32,"," p33_36, p37_40, p41_44, p45_48,"," p49_52, p53_56, p57_60, colors;","","uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,"," loA, hiA, loB, hiB, loC, hiC, loD, hiD;","","uniform vec2 resolution, viewBoxPos, viewBoxSize;","uniform float maskHeight;","uniform float drwLayer; // 0: context, 1: focus, 2: pick","uniform vec4 contextColor;","uniform sampler2D maskTexture, palette;","","bool isPick = (drwLayer > 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {"," return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {"," float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);"," float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);"," return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {"," return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {"," return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {"," return ("," fOutside(p[0], lo[0], hi[0]) ||"," fOutside(p[1], lo[1], hi[1]) ||"," fOutside(p[2], lo[2], hi[2]) ||"," fOutside(p[3], lo[3], hi[3])"," );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {"," return ("," vOutside(p[0], lo[0], hi[0]) ||"," vOutside(p[1], lo[1], hi[1]) ||"," vOutside(p[2], lo[2], hi[2]) ||"," vOutside(p[3], lo[3], hi[3])"," );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {"," return mOutside(A, loA, hiA) ||"," mOutside(B, loB, hiB) ||"," mOutside(C, loC, hiC) ||"," mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {"," mat4 pnts[4];"," pnts[0] = A;"," pnts[1] = B;"," pnts[2] = C;"," pnts[3] = D;",""," for(int i = 0; i < 4; ++i) {"," for(int j = 0; j < 4; ++j) {"," for(int k = 0; k < 4; ++k) {"," if(0 == iMod("," int(255.0 * texture2D(maskTexture,"," vec2("," (float(i * 2 + j / 2) + 0.5) / 8.0,"," (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight"," ))[3]"," ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),"," 2"," )) return true;"," }"," }"," }"," return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {"," float x = 0.5 * sign(v) + 0.5;"," float y = axisY(x, A, B, C, D);"," float z = 1.0 - abs(v);",""," z += isContext ? 0.0 : 2.0 * float("," outsideBoundingBox(A, B, C, D) ||"," outsideRasterMask(A, B, C, D)"," );",""," return vec4("," 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,"," z,"," 1.0"," );","}","","void main() {"," mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);"," mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);"," mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);"," mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);",""," float v = colors[3];",""," gl_Position = position(isContext, v, A, B, C, D);",""," fragColor ="," isContext ? vec4(contextColor) :"," isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join(` -`),PGt=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` -`),Uk=Bk().maxDimensionCount,SUe=Dr(),xUe=1e-6,jz=2048,IGt=new Uint8Array(4),bUe=new Uint8Array(4),wUe={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function RGt(e){e.read({x:0,y:0,width:1,height:1,data:IGt})}function MUe(e,t,r,n,i){var a=e._gl;a.enable(a.SCISSOR_TEST),a.scissor(t,r,n,i),e.clear({color:[0,0,0,0],depth:1})}function DGt(e,t,r,n,i,a){var o=a.key;function s(l){var u=Math.min(n,i-l*n);l===0&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],MUe(e,a.scissorX,a.scissorY,a.scissorWidth,a.viewBoxSize[1])),!r.clearOnly&&(a.count=2*u,a.offset=2*l*n,t(a),l*n+u>>8*t)%256/255}function OGt(e,t,r){for(var n=new Array(e*(Uk+4)),i=0,a=0;aZ&&(Z=M[z].dim1.canvasX,U=z);A===0&&MUe(i,0,0,u.canvasWidth,u.canvasHeight);var j=E(r);for(z=0;z{"use strict";var qd=Oa(),p1=Dr(),UK=p1.isArrayOrTypedArray,FUe=p1.numberFormat,zUe=(_Ue(),pb(yUe)).default,OUe=ho(),VGt=p1.strRotate,ny=p1.strTranslate,GGt=Zl(),Wz=So(),LUe=tc(),HK=iy(),ig=HK.keyFun,ay=HK.repeat,qUe=HK.unwrap,S5=BK(),Dl=Bk(),BUe=DK(),HGt=CUe();function PUe(e,t,r){return p1.aggNums(e,null,t,r)}function NUe(e,t){return jK(PUe(Math.min,e,t),PUe(Math.max,e,t))}function Xz(e){var t=e.range;return t?jK(t[0],t[1]):NUe(e.values,e._length)}function jK(e,t){return(isNaN(e)||!isFinite(e))&&(e=0),(isNaN(t)||!isFinite(t))&&(t=0),e===t&&(e===0?(e-=1,t+=1):(e*=.9,t*=1.1)),[e,t]}function jGt(e,t){return t?function(r,n){var i=t[n];return i==null?e(r):i}:e}function WGt(e,t,r,n,i){var a=Xz(r);return n?qd.scale.ordinal().domain(n.map(jGt(FUe(r.tickformat),i))).range(n.map(function(o){var s=(o-a[0])/(a[1]-a[0]);return e-t+s*(2*t-e)})):qd.scale.linear().domain(a).range([e-t,t])}function XGt(e,t){return qd.scale.linear().range([t,e-t])}function ZGt(e,t){return qd.scale.linear().domain(Xz(e)).range([t,1-t])}function YGt(e){if(e.tickvals){var t=Xz(e);return qd.scale.ordinal().domain(e.tickvals).range(e.tickvals.map(function(r){return(r-t[0])/(t[1]-t[0])}))}}function KGt(e){var t=e.map(function(a){return a[0]}),r=e.map(function(a){var o=zUe(a[1]);return qd.rgb("rgb("+o[0]+","+o[1]+","+o[2]+")")}),n=function(a){return function(o){return o[a]}},i="rgb".split("").map(function(a){return qd.scale.linear().clamp(!0).domain(t).range(r.map(n(a)))});return function(a){return i.map(function(o){return o(a)})}}function GK(e){return e.dimensions.some(function(t){return t.brush.filterSpecified})}function JGt(e,t,r){var n=qUe(t),i=n.trace,a=S5.convertTypedArray(n.lineColor),o=i.line,s={color:zUe(i.unselected.line.color),opacity:i.unselected.line.opacity},l=LUe.extractOpts(o),u=l.reversescale?LUe.flipScale(n.cscale):n.cscale,c=i.domain,f=i.dimensions,h=e.width,d=i.labelangle,v=i.labelside,_=i.labelfont,b=i.tickfont,p=i.rangefont,k=p1.extendDeepNoArrays({},o,{color:a.map(qd.scale.linear().domain(Xz({values:a,range:[l.min,l.max],_length:i._length}))),blockLineCount:Dl.blockLineCount,canvasOverdrag:Dl.overdrag*Dl.canvasPixelRatio}),E=Math.floor(h*(c.x[1]-c.x[0])),T=Math.floor(e.height*(c.y[1]-c.y[0])),L=e.margin||{l:80,r:80,t:100,b:80},x=E,C=T;return{key:r,colCount:f.filter(S5.isVisible).length,dimensions:f,tickDistance:Dl.tickDistance,unitToColor:KGt(u),lines:k,deselectedLines:s,labelAngle:d,labelSide:v,labelFont:_,tickFont:b,rangeFont:p,layoutWidth:h,layoutHeight:e.height,domain:c,translateX:c.x[0]*h,translateY:e.height-c.y[1]*e.height,pad:L,canvasWidth:x*Dl.canvasPixelRatio+2*k.canvasOverdrag,canvasHeight:C*Dl.canvasPixelRatio,width:x,height:C,canvasPixelRatio:Dl.canvasPixelRatio}}function $Gt(e,t,r){var n=r.width,i=r.height,a=r.dimensions,o=r.canvasPixelRatio,s=function(h){return n*h/Math.max(1,r.colCount-1)},l=Dl.verticalPadding/i,u=XGt(i,Dl.verticalPadding),c={key:r.key,xScale:s,model:r,inBrushDrag:!1},f={};return c.dimensions=a.filter(S5.isVisible).map(function(h,d){var v=ZGt(h,l),_=f[h.label];f[h.label]=(_||0)+1;var b=h.label+(_?"__"+_:""),p=h.constraintrange,k=p&&p.length;k&&!UK(p[0])&&(p=[p]);var E=k?p.map(function(O){return O.map(v)}):[[-1/0,1/0]],T=function(){var O=c;O.focusLayer&&O.focusLayer.render(O.panels,!0);var U=GK(O);!e.contextShown()&&U?(O.contextLayer&&O.contextLayer.render(O.panels,!0),e.contextShown(!0)):e.contextShown()&&!U&&(O.contextLayer&&O.contextLayer.render(O.panels,!0,!0),e.contextShown(!1))},L=h.values;L.length>h._length&&(L=L.slice(0,h._length));var x=h.tickvals,C;function M(O,U){return{val:O,text:C[U]}}function g(O,U){return O.val-U.val}if(UK(x)&&x.length){p1.isTypedArray(x)&&(x=Array.from(x)),C=h.ticktext,!UK(C)||!C.length?C=x.map(FUe(h.tickformat)):C.length>x.length?C=C.slice(0,x.length):x.length>C.length&&(x=x.slice(0,C.length));for(var P=1;P=U||N>=G)return;var H=z.lineLayer.readPixel(j,G-1-N),re=H[3]!==0,oe=re?H[2]+256*(H[1]+256*H[0]):null,_e={x:j,y:N,clientX:O.clientX,clientY:O.clientY,dataIndex:z.model.key,curveNumber:oe};oe!==v&&(re?i.hover(_e):i.unhover&&i.unhover(_e),v=oe)}}),d.style("opacity",function(z){return z.pick?0:1}),s.style("background","rgba(255, 255, 255, 0)");var b=s.selectAll("."+Dl.cn.parcoords).data(h,ig);b.exit().remove(),b.enter().append("g").classed(Dl.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),b.attr("transform",function(z){return ny(z.model.translateX,z.model.translateY)});var p=b.selectAll("."+Dl.cn.parcoordsControlView).data(ay,ig);p.enter().append("g").classed(Dl.cn.parcoordsControlView,!0),p.attr("transform",function(z){return ny(z.model.pad.l,z.model.pad.t)});var k=p.selectAll("."+Dl.cn.yAxis).data(function(z){return z.dimensions},ig);k.enter().append("g").classed(Dl.cn.yAxis,!0),p.each(function(z){VK(k,z,u)}),d.each(function(z){if(z.viewModel){!z.lineLayer||i?z.lineLayer=HGt(this,z):z.lineLayer.update(z),(z.key||z.key===0)&&(z.viewModel[z.key]=z.lineLayer);var O=!z.context||i;z.lineLayer.render(z.viewModel.panels,O)}}),k.attr("transform",function(z){return ny(z.xScale(z.xIndex),0)}),k.call(qd.behavior.drag().origin(function(z){return z}).on("drag",function(z){var O=z.parent;f.linePickActive(!1),z.x=Math.max(-Dl.overdrag,Math.min(z.model.width+Dl.overdrag,qd.event.x)),z.canvasX=z.x*z.model.canvasPixelRatio,k.sort(function(U,G){return U.x-G.x}).each(function(U,G){U.xIndex=G,U.x=z===U?U.x:U.xScale(U.xIndex),U.canvasX=U.x*U.model.canvasPixelRatio}),VK(k,O,u),k.filter(function(U){return Math.abs(z.xIndex-U.xIndex)!==0}).attr("transform",function(U){return ny(U.xScale(U.xIndex),0)}),qd.select(this).attr("transform",ny(z.x,0)),k.each(function(U,G,Z){Z===z.parent.key&&(O.dimensions[G]=U)}),O.contextLayer&&O.contextLayer.render(O.panels,!1,!GK(O)),O.focusLayer.render&&O.focusLayer.render(O.panels)}).on("dragend",function(z){var O=z.parent;z.x=z.xScale(z.xIndex),z.canvasX=z.x*z.model.canvasPixelRatio,VK(k,O,u),qd.select(this).attr("transform",function(U){return ny(U.x,0)}),O.contextLayer&&O.contextLayer.render(O.panels,!1,!GK(O)),O.focusLayer&&O.focusLayer.render(O.panels),O.pickLayer&&O.pickLayer.render(O.panels,!0),f.linePickActive(!0),i&&i.axesMoved&&i.axesMoved(O.key,O.dimensions.map(function(U){return U.crossfilterDimensionIndex}))})),k.exit().remove();var E=k.selectAll("."+Dl.cn.axisOverlays).data(ay,ig);E.enter().append("g").classed(Dl.cn.axisOverlays,!0),E.selectAll("."+Dl.cn.axis).remove();var T=E.selectAll("."+Dl.cn.axis).data(ay,ig);T.enter().append("g").classed(Dl.cn.axis,!0),T.each(function(z){var O=z.model.height/z.model.tickDistance,U=z.domainScale,G=U.domain();qd.select(this).call(qd.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(O,z.tickFormat).tickValues(z.ordinal?G:null).tickFormat(function(Z){return S5.isOrdinal(z)?Z:UUe(z.model.dimensions[z.visibleIndex],Z)}).scale(U)),Wz.font(T.selectAll("text"),z.model.tickFont)}),T.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),T.selectAll("text").style("cursor","default");var L=E.selectAll("."+Dl.cn.axisHeading).data(ay,ig);L.enter().append("g").classed(Dl.cn.axisHeading,!0);var x=L.selectAll("."+Dl.cn.axisTitle).data(ay,ig);x.enter().append("text").classed(Dl.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",a?"none":"auto"),x.text(function(z){return z.label}).each(function(z){var O=qd.select(this);Wz.font(O,z.model.labelFont),GGt.convertToTspans(O,t)}).attr("transform",function(z){var O=RUe(z.model.labelAngle,z.model.labelSide),U=Dl.axisTitleOffset;return(O.dir>0?"":ny(0,2*U+z.model.height))+VGt(O.degrees)+ny(-U*O.dx,-U*O.dy)}).attr("text-anchor",function(z){var O=RUe(z.model.labelAngle,z.model.labelSide),U=Math.abs(O.dx),G=Math.abs(O.dy);return 2*U>G?O.dir*O.dx<0?"start":"end":"middle"});var C=E.selectAll("."+Dl.cn.axisExtent).data(ay,ig);C.enter().append("g").classed(Dl.cn.axisExtent,!0);var M=C.selectAll("."+Dl.cn.axisExtentTop).data(ay,ig);M.enter().append("g").classed(Dl.cn.axisExtentTop,!0),M.attr("transform",ny(0,-Dl.axisExtentOffset));var g=M.selectAll("."+Dl.cn.axisExtentTopText).data(ay,ig);g.enter().append("text").classed(Dl.cn.axisExtentTopText,!0).call(IUe),g.text(function(z){return DUe(z,!0)}).each(function(z){Wz.font(qd.select(this),z.model.rangeFont)});var P=C.selectAll("."+Dl.cn.axisExtentBottom).data(ay,ig);P.enter().append("g").classed(Dl.cn.axisExtentBottom,!0),P.attr("transform",function(z){return ny(0,z.model.height+Dl.axisExtentOffset)});var A=P.selectAll("."+Dl.cn.axisExtentBottomText).data(ay,ig);A.enter().append("text").classed(Dl.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(IUe),A.text(function(z){return DUe(z,!1)}).each(function(z){Wz.font(qd.select(this),z.model.rangeFont)}),BUe.ensureAxisBrush(E,c,t)}});var XK=ye((WK,XUe)=>{"use strict";var tHt=GUe(),rHt=Lz(),HUe=BK().isVisible,WUe={};function jUe(e,t,r){var n=t.indexOf(r),i=e.indexOf(n);return i===-1&&(i+=t.length),i}function iHt(e,t){return function(n,i){return jUe(e,t,n)-jUe(e,t,i)}}var WK=XUe.exports=function(t,r){var n=t._fullLayout,i=rHt(t,[],WUe);if(i){var a={},o={},s={},l={},u=n._size;r.forEach(function(v,_){var b=v[0].trace;s[_]=b.index;var p=l[_]=b.index;a[_]=t.data[p].dimensions,o[_]=t.data[p].dimensions.slice()});var c=function(v,_,b){var p=o[v][_],k=b.map(function(M){return M.slice()}),E="dimensions["+_+"].constraintrange",T=n._tracePreGUI[t._fullData[s[v]]._fullInput.uid];if(T[E]===void 0){var L=p.constraintrange;T[E]=L||null}var x=t._fullData[s[v]].dimensions[_];k.length?(k.length===1&&(k=k[0]),p.constraintrange=k,x.constraintrange=k.slice(),k=[k]):(delete p.constraintrange,delete x.constraintrange,k=null);var C={};C[E]=k,t.emit("plotly_restyle",[C,[l[v]]])},f=function(v){t.emit("plotly_hover",v)},h=function(v){t.emit("plotly_unhover",v)},d=function(v,_){var b=iHt(_,o[v].filter(HUe));a[v].sort(b),o[v].filter(function(p){return!HUe(p)}).sort(function(p){return o[v].indexOf(p)}).forEach(function(p){a[v].splice(a[v].indexOf(p),1),a[v].splice(o[v].indexOf(p),0,p)}),t.emit("plotly_restyle",[{dimensions:[a[v]]},[l[v]]])};tHt(t,r,{width:u.w,height:u.h,margin:{t:u.t,r:u.r,b:u.b,l:u.l}},{filterChanged:c,hover:f,unhover:h,axesMoved:d})}};WK.reglPrecompiled=WUe});var YUe=ye(Vk=>{"use strict";var ZUe=Oa(),nHt=Id().getModuleCalcData,aHt=XK(),oHt=Wp();Vk.name="parcoords";Vk.plot=function(e){var t=nHt(e.calcdata,"parcoords")[0];t.length&&aHt(e,t)};Vk.clean=function(e,t,r,n){var i=n._has&&n._has("parcoords"),a=t._has&&t._has("parcoords");i&&!a&&(n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())};Vk.toSVG=function(e){var t=e._fullLayout._glimages,r=ZUe.select(e).selectAll(".svg-container"),n=r.filter(function(a,o){return o===r.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function i(){var a=this,o=a.toDataURL("image/png"),s=t.append("svg:image");s.attr({xmlns:oHt.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:a.style.width,height:a.style.height})}n.each(i),window.setTimeout(function(){ZUe.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}});var JUe=ye((lxr,KUe)=>{"use strict";KUe.exports={attributes:PK(),supplyDefaults:cUe(),calc:hUe(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:YUe(),categories:["gl","regl","noOpacity","noHover"],meta:{}}});var eVe=ye((uxr,QUe)=>{"use strict";var $Ue=JUe();$Ue.plot=XK();QUe.exports=$Ue});var rVe=ye((cxr,tVe)=>{"use strict";tVe.exports=eVe()});var ZK=ye((fxr,sVe)=>{"use strict";var nVe=Ao().extendFlat,sHt=Gl(),iVe=ec(),lHt=Tu(),{hovertemplateAttrs:aVe,templatefallbackAttrs:oVe}=Ll(),uHt=Cc().attributes,cHt=nVe({editType:"calc"},lHt("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:aVe({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:oVe({editType:"plot"})});sVe.exports={domain:uHt({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:nVe({},sHt.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:aVe({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:oVe({editType:"plot"}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:iVe({editType:"calc"}),tickfont:iVe({autoShadowDflt:!0,editType:"calc"}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},values:{valType:"data_array",dflt:[],editType:"calc"},displayindex:{valType:"integer",editType:"calc"},editType:"calc",visible:{valType:"boolean",dflt:!0,editType:"calc"}},line:cHt,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc"},customdata:void 0,hoverlabel:void 0,ids:void 0,legend:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}});var cVe=ye((hxr,uVe)=>{"use strict";var M5=Dr(),fHt=pv().hasColorscale,hHt=td(),dHt=Cc().defaults,vHt=Zd(),lVe=ZK(),pHt=Iz(),gHt=vv().isTypedArraySpec;function mHt(e,t,r,n,i){i("line.shape"),i("line.hovertemplate"),i("line.hovertemplatefallback");var a=i("line.color",n.colorway[0]);if(fHt(e,"line")&&M5.isArrayOrTypedArray(a)){if(a.length)return i("line.colorscale"),hHt(e,t,n,i,{prefix:"line.",cLetter:"c"}),a.length;t.line.color=r}return 1/0}function yHt(e,t){function r(u,c){return M5.coerce(e,t,lVe.dimensions,u,c)}var n=r("values"),i=r("visible");if(n&&n.length||(i=t.visible=!1),i){r("label"),r("displayindex",t._index);var a=e.categoryarray,o=M5.isArrayOrTypedArray(a)&&a.length>0||gHt(a),s;o&&(s="array");var l=r("categoryorder",s);l==="array"?(r("categoryarray"),r("ticktext")):(delete e.categoryarray,delete e.ticktext),!o&&l==="array"&&(t.categoryorder="trace")}}uVe.exports=function(t,r,n,i){function a(u,c){return M5.coerce(t,r,lVe,u,c)}var o=vHt(t,r,{name:"dimensions",handleItemDefaults:yHt}),s=mHt(t,r,n,i,a);dHt(r,i,a),(!Array.isArray(o)||!o.length)&&(r.visible=!1),pHt(r,o,"values",s),a("hoveron"),a("hovertemplate"),a("hovertemplatefallback"),a("arrangement"),a("bundlecolors"),a("sortpaths"),a("counts");var l=i.font;M5.coerceFont(a,"labelfont",l,{overrideDflt:{size:Math.round(l.size)}}),M5.coerceFont(a,"tickfont",l,{autoShadowDflt:!0,overrideDflt:{size:Math.round(l.size/1.2)}})}});var hVe=ye((dxr,fVe)=>{"use strict";var _Ht=iy().wrap,xHt=pv().hasColorscale,bHt=gv(),wHt=tq(),THt=So(),Gk=Dr(),AHt=Eo();fVe.exports=function(t,r){var n=Gk.filterVisible(r.dimensions);if(n.length===0)return[];var i=n.map(function(g){var P;if(g.categoryorder==="trace")P=null;else if(g.categoryorder==="array")P=g.categoryarray;else{P=wHt(g.values);for(var A=!0,z=0;z=e.length||t[e[r]]!==void 0)return!1;t[e[r]]=!0}return!0}});var bVe=ye((vxr,xVe)=>{"use strict";var Fl=Oa(),FHt=(H2(),pb(G2)).interpolateNumber,zHt=ZP(),Wk=vf(),Ex=Dr(),Hk=Ex.strTranslate,dVe=So(),YK=fd(),OHt=Zl();function qHt(e,t,r,n){var i=t._context.staticPlot,a=e.map(QHt.bind(0,t,r)),o=n.selectAll("g.parcatslayer").data([null]);o.enter().append("g").attr("class","parcatslayer").style("pointer-events",i?"none":"all");var s=o.selectAll("g.trace.parcats").data(a,g1),l=s.enter().append("g").attr("class","trace parcats");s.attr("transform",function(k){return Hk(k.x,k.y)}),l.append("g").attr("class","paths");var u=s.select("g.paths"),c=u.selectAll("path.path").data(function(k){return k.paths},g1);c.attr("fill",function(k){return k.model.color});var f=c.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(k){return k.model.color}).attr("fill-opacity",0);$K(f),c.attr("d",function(k){return k.svgD}),f.empty()||c.sort(KK),c.exit().remove(),c.on("mouseover",BHt).on("mouseout",NHt).on("click",UHt),l.append("g").attr("class","dimensions");var h=s.select("g.dimensions"),d=h.selectAll("g.dimension").data(function(k){return k.dimensions},g1);d.enter().append("g").attr("class","dimension"),d.attr("transform",function(k){return Hk(k.x,0)}),d.exit().remove();var v=d.selectAll("g.category").data(function(k){return k.categories},g1),_=v.enter().append("g").attr("class","category");v.attr("transform",function(k){return Hk(0,k.y)}),_.append("rect").attr("class","catrect").attr("pointer-events","none"),v.select("rect.catrect").attr("fill","none").attr("width",function(k){return k.width}).attr("height",function(k){return k.height}),pVe(_);var b=v.selectAll("rect.bandrect").data(function(k){return k.bands},g1);b.each(function(){Ex.raiseToTop(this)}),b.attr("fill",function(k){return k.color});var p=b.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(k){return k.color}).attr("fill-opacity",0);b.attr("fill",function(k){return k.color}).attr("width",function(k){return k.width}).attr("height",function(k){return k.height}).attr("y",function(k){return k.y}).attr("cursor",function(k){return k.parcatsViewModel.arrangement==="fixed"?"default":k.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),eJ(p),b.exit().remove(),_.append("text").attr("class","catlabel").attr("pointer-events","none"),v.select("text.catlabel").attr("text-anchor",function(k){return jk(k)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(k){return jk(k)?k.width+5:-5}).attr("y",function(k){return k.height/2}).text(function(k){return k.model.categoryLabel}).each(function(k){dVe.font(Fl.select(this),k.parcatsViewModel.categorylabelfont),OHt.convertToTspans(Fl.select(this),t)}),_.append("text").attr("class","dimlabel"),v.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(k){return k.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(k){return k.width/2}).attr("y",-5).text(function(k,E){return E===0?k.parcatsViewModel.model.dimensions[k.model.dimensionInd].dimensionLabel:null}).each(function(k){dVe.font(Fl.select(this),k.parcatsViewModel.labelfont)}),v.selectAll("rect.bandrect").on("mouseover",ZHt).on("mouseout",YHt),v.exit().remove(),d.call(Fl.behavior.drag().origin(function(k){return{x:k.x,y:0}}).on("dragstart",KHt).on("drag",JHt).on("dragend",$Ht)),s.each(function(k){k.traceSelection=Fl.select(this),k.pathSelection=Fl.select(this).selectAll("g.paths").selectAll("path.path"),k.dimensionSelection=Fl.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),s.exit().remove()}xVe.exports=function(e,t,r,n){qHt(r,e,n,t)};function g1(e){return e.key}function jk(e){var t=e.parcatsViewModel.dimensions.length,r=e.parcatsViewModel.dimensions[t-1].model.dimensionInd;return e.model.dimensionInd===r}function KK(e,t){return e.model.rawColor>t.model.rawColor?1:e.model.rawColor"),x=Fl.mouse(i)[0];Wk.loneHover({trace:a,x:v-s.left+l.left,y:_-s.top+l.top,text:L,color:e.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:b,idealAlign:x1&&u.displayInd===l.dimensions.length-1?(h=o.left,d="left"):(h=o.left+o.width,d="right");var v=s.model.count,_=s.model.categoryLabel,b=v/s.parcatsViewModel.model.count,p={countLabel:v,categoryLabel:_,probabilityLabel:b.toFixed(3)},k=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&k.push(["Count:",p.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&k.push(["P("+p.categoryLabel+"):",p.probabilityLabel].join(" "));var E=k.join("
");return{trace:c,x:n*(h-t.left),y:i*(f-t.top),text:E,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:d,hovertemplate:c.hovertemplate,hovertemplateLabels:p,eventData:[{data:c._input,fullData:c,count:v,category:_,probability:b}]}}function WHt(e,t,r){var n=[];return Fl.select(r.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var i=this;n.push(gVe(e,t,i))}),n}function XHt(e,t,r){e._fullLayout._calcInverseTransform(e);var n=e._fullLayout._invScaleX,i=e._fullLayout._invScaleY,a=r.getBoundingClientRect(),o=Fl.select(r).datum(),s=o.categoryViewModel,l=s.parcatsViewModel,u=l.model.dimensions[s.model.dimensionInd],c=l.trace,f=a.y+a.height/2,h,d;l.dimensions.length>1&&u.displayInd===l.dimensions.length-1?(h=a.left,d="left"):(h=a.left+a.width,d="right");var v=s.model.categoryLabel,_=o.parcatsViewModel.model.count,b=0;o.categoryViewModel.bands.forEach(function(P){P.color===o.color&&(b+=P.count)});var p=s.model.count,k=0;l.pathSelection.each(function(P){P.model.color===o.color&&(k+=P.model.count)});var E=b/_,T=b/k,L=b/p,x={countLabel:b,categoryLabel:v,probabilityLabel:E.toFixed(3)},C=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&C.push(["Count:",x.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(C.push("P(color \u2229 "+v+"): "+x.probabilityLabel),C.push("P("+v+" | color): "+T.toFixed(3)),C.push("P(color | "+v+"): "+L.toFixed(3)));var M=C.join("
"),g=YK.mostReadable(o.color,["black","white"]);return{trace:c,x:n*(h-t.left),y:i*(f-t.top),text:M,color:o.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:g,fontSize:10,idealAlign:d,hovertemplate:c.hovertemplate,hovertemplateLabels:x,eventData:[{data:c._input,fullData:c,category:v,count:_,probability:E,categorycount:p,colorcount:k,bandcolorcount:b}]}}function ZHt(e){if(!e.parcatsViewModel.dragDimension&&e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var t=Fl.mouse(this)[1];if(t<-1)return;var r=e.parcatsViewModel.graphDiv,n=r._fullLayout,i=n._paperdiv.node().getBoundingClientRect(),a=e.parcatsViewModel.hoveron,o=this;if(a==="color"?(jHt(o),rJ(o,"plotly_hover",Fl.event)):(HHt(o),tJ(o,"plotly_hover",Fl.event)),e.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var s;a==="category"?s=gVe(r,i,o):a==="color"?s=XHt(r,i,o):a==="dimension"&&(s=WHt(r,i,o)),s&&Wk.loneHover(s,{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:r})}}}function YHt(e){var t=e.parcatsViewModel;if(!t.dragDimension&&($K(t.pathSelection),pVe(t.dimensionSelection.selectAll("g.category")),eJ(t.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),Wk.loneUnhover(t.graphDiv._fullLayout._hoverlayer.node()),t.pathSelection.sort(KK),t.hoverinfoItems.indexOf("skip")===-1)){var r=e.parcatsViewModel.hoveron,n=this;r==="color"?rJ(n,"plotly_unhover",Fl.event):tJ(n,"plotly_unhover",Fl.event)}}function KHt(e){e.parcatsViewModel.arrangement!=="fixed"&&(e.dragDimensionDisplayInd=e.model.displayInd,e.initialDragDimensionDisplayInds=e.parcatsViewModel.model.dimensions.map(function(t){return t.displayInd}),e.dragHasMoved=!1,e.dragCategoryDisplayInd=null,Fl.select(this).selectAll("g.category").select("rect.catrect").each(function(t){var r=Fl.mouse(this)[0],n=Fl.mouse(this)[1];-2<=r&&r<=t.width+2&&-2<=n&&n<=t.height+2&&(e.dragCategoryDisplayInd=t.model.displayInd,e.initialDragCategoryDisplayInds=e.model.categories.map(function(i){return i.displayInd}),t.model.dragY=t.y,Ex.raiseToTop(this.parentNode),Fl.select(this.parentNode).selectAll("rect.bandrect").each(function(i){i.yc.y+c.height/2&&(a.model.displayInd=c.model.displayInd,c.model.displayInd=s),e.dragCategoryDisplayInd=a.model.displayInd}if(e.dragCategoryDisplayInd===null||e.parcatsViewModel.arrangement==="freeform"){i.model.dragX=Fl.event.x;var f=e.parcatsViewModel.dimensions[r],h=e.parcatsViewModel.dimensions[n];f!==void 0&&i.model.dragXh.x&&(i.model.displayInd=h.model.displayInd,h.model.displayInd=e.dragDimensionDisplayInd),e.dragDimensionDisplayInd=i.model.displayInd}nJ(e.parcatsViewModel),iJ(e.parcatsViewModel),_Ve(e.parcatsViewModel),yVe(e.parcatsViewModel)}}function $Ht(e){if(e.parcatsViewModel.arrangement!=="fixed"&&e.dragDimensionDisplayInd!==null){Fl.select(this).selectAll("text").attr("font-weight","normal");var t={},r=mVe(e.parcatsViewModel),n=e.parcatsViewModel.model.dimensions.map(function(h){return h.displayInd}),i=e.initialDragDimensionDisplayInds.some(function(h,d){return h!==n[d]});i&&n.forEach(function(h,d){var v=e.parcatsViewModel.model.dimensions[d].containerInd;t["dimensions["+v+"].displayindex"]=h});var a=!1;if(e.dragCategoryDisplayInd!==null){var o=e.model.categories.map(function(h){return h.displayInd});if(a=e.initialDragCategoryDisplayInds.some(function(h,d){return h!==o[d]}),a){var s=e.model.categories.slice().sort(function(h,d){return h.displayInd-d.displayInd}),l=s.map(function(h){return h.categoryValue}),u=s.map(function(h){return h.categoryLabel});t["dimensions["+e.model.containerInd+"].categoryarray"]=[l],t["dimensions["+e.model.containerInd+"].ticktext"]=[u],t["dimensions["+e.model.containerInd+"].categoryorder"]="array"}}if(e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!e.dragHasMoved&&e.potentialClickBand&&(e.parcatsViewModel.hoveron==="color"?rJ(e.potentialClickBand,"plotly_click",Fl.event.sourceEvent):tJ(e.potentialClickBand,"plotly_click",Fl.event.sourceEvent)),e.model.dragX=null,e.dragCategoryDisplayInd!==null){var c=e.parcatsViewModel.dimensions[e.dragDimensionDisplayInd].categories[e.dragCategoryDisplayInd];c.model.dragY=null,e.dragCategoryDisplayInd=null}e.dragDimensionDisplayInd=null,e.parcatsViewModel.dragDimension=null,e.dragHasMoved=null,e.potentialClickBand=null,nJ(e.parcatsViewModel),iJ(e.parcatsViewModel);var f=Fl.transition().duration(300).ease("cubic-in-out");f.each(function(){_Ve(e.parcatsViewModel,!0),yVe(e.parcatsViewModel,!0)}).each("end",function(){(i||a)&&zHt.restyle(e.parcatsViewModel.graphDiv,t,[r])})}}function mVe(e){for(var t,r=e.graphDiv._fullData,n=0;n=0;l--)u+="C"+o[l]+","+(t[l+1]+n)+" "+a[l]+","+(t[l]+n)+" "+(e[l]+r[l])+","+(t[l]+n),u+="l-"+r[l]+",0 ";return u+="Z",u}function iJ(e){var t=e.dimensions,r=e.model,n=t.map(function(O){return O.categories.map(function(U){return U.y})}),i=e.model.dimensions.map(function(O){return O.categories.map(function(U){return U.displayInd})}),a=e.model.dimensions.map(function(O){return O.displayInd}),o=e.dimensions.map(function(O){return O.model.dimensionInd}),s=t.map(function(O){return O.x}),l=t.map(function(O){return O.width}),u=[];for(var c in r.paths)r.paths.hasOwnProperty(c)&&u.push(r.paths[c]);function f(O){var U=O.categoryInds.map(function(Z,j){return i[j][Z]}),G=o.map(function(Z){return U[Z]});return G}u.sort(function(O,U){var G=f(O),Z=f(U);return e.sortpaths==="backward"&&(G.reverse(),Z.reverse()),G.push(O.valueInds[0]),Z.push(U.valueInds[0]),e.bundlecolors&&(G.unshift(O.rawColor),Z.unshift(U.rawColor)),GZ?1:0});for(var h=new Array(u.length),d=t[0].model.count,v=t[0].categories.map(function(O){return O.height}).reduce(function(O,U){return O+U}),_=0;_0?p=v*(b.count/d):p=0;for(var k=new Array(n.length),E=0;E1?o=(e.width-2*r-n)/(i-1):o=0,s=r,l=s+o*a;var u=[],c=e.model.maxCats,f=t.categories.length,h=8,d=t.count,v=e.height-h*(c-1),_,b,p,k,E,T=(c-f)*h/2,L=t.categories.map(function(x){return{displayInd:x.displayInd,categoryInd:x.categoryInd}});for(L.sort(function(x,C){return x.displayInd-C.displayInd}),E=0;E0?_=b.count/d*v:_=0,p={key:b.valueInds[0],model:b,width:n,height:_,y:b.dragY!==null?b.dragY:T,bands:[],parcatsViewModel:e},T=T+_+h,u.push(p);return{key:t.dimensionInd,x:t.dragX!==null?t.dragX:l,y:0,width:n,model:t,categories:u,parcatsViewModel:e,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}});var aJ=ye((pxr,wVe)=>{"use strict";var tjt=bVe();wVe.exports=function(t,r,n,i){var a=t._fullLayout,o=a._paper,s=a._size;tjt(t,o,r,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},n,i)}});var AVe=ye(Yz=>{"use strict";var rjt=Id().getModuleCalcData,ijt=aJ(),TVe="parcats";Yz.name=TVe;Yz.plot=function(e,t,r,n){var i=rjt(e.calcdata,TVe);if(i.length){var a=i[0];ijt(e,a,r,n)}};Yz.clean=function(e,t,r,n){var i=n._has&&n._has("parcats"),a=t._has&&t._has("parcats");i&&!a&&n._paperdiv.selectAll(".parcats").remove()}});var MVe=ye((mxr,SVe)=>{"use strict";SVe.exports={attributes:ZK(),supplyDefaults:cVe(),calc:hVe(),plot:aJ(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:AVe(),categories:["noOpacity"],meta:{}}});var kVe=ye((yxr,EVe)=>{"use strict";EVe.exports=MVe()});var m1=ye((_xr,FVe)=>{"use strict";var njt=t_(),CVe="1.13.4",RVe='\xA9 OpenStreetMap contributors',LVe=['\xA9 Carto',RVe].join(" "),PVe=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),ajt=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),DVe={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:RVe,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:LVe,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:LVe,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:PVe,tiles:["https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:PVe,tiles:["https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:ajt,tiles:["https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"}},IVe=njt(DVe);FVe.exports={requiredVersion:CVe,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:DVe,styleValuesNonMapbox:IVe,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install @plotly/mapbox-gl@"+CVe+"."].join(` +`),Zr;if(bt&&(Zr=qc(Tr),bt[Zr]))return bt[Zr].apply(null,Vr);var yi=Function.apply(null,Lr.concat(Tr));return bt&&(bt[Zr]=yi),yi.apply(null,Vr)}return{global:Si,link:Nr,block:vi,proc:Qi,scope:Ni,cond:qi,compile:ji}}var Ca="xyzw".split(""),Ra=5121,La=1,Na=2,Zn=0,Dn=1,Ka=2,bo=3,Zo=4,Ss=5,as=6,ws="dither",Ho="blend.enable",ml="blend.color",Ws="blend.equation",Ls="blend.func",va="depth.enable",no="depth.func",ys="depth.range",rs="depth.mask",Ql="colorMask",Cu="cull.enable",Yu="cull.face",Nc="frontFace",pu="lineWidth",Uc="polygonOffset.enable",xu="polygonOffset.offset",Ac="sample.alpha",Ua="sample.enable",oo="sample.coverage",Vc="stencil.enable",hc="stencil.mask",Ku="stencil.func",ue="stencil.opFront",w="stencil.opBack",B="scissor.enable",Q="scissor.box",ee="viewport",le="profile",ze="framebuffer",Ze="vert",ut="frag",Mt="elements",Jt="primitive",$t="count",mr="offset",Cr="instances",ve="vao",xe="Width",Ie="Height",qe=ze+xe,Qe=ze+Ie,Xe=ee+xe,nt=ee+Ie,qt="drawingBuffer",jt=qt+xe,ar=qt+Ie,fr=[Ls,Ws,Ku,ue,w,oo,ee,Q,xu],br=34962,Fr=34963,Hr=2884,ri=3042,Ci=3024,cn=2960,sn=2929,Ln=3089,Yn=32823,Aa=32926,fa=32928,$a=5126,Co=35664,Qa=35665,mo=35666,Bo=5124,Ps=35667,Ts=35668,wo=35669,To=35670,hl=35671,Ul=35672,Lu=35673,au=35674,Js=35675,eu=35676,dc=35678,Tl=35680,Al=4,X=1028,se=1029,Te=2304,Oe=2305,Ve=32775,Ye=32776,Pt=519,at=7680,Wt=0,dr=1,pr=32774,Ur=513,zr=36160,gi=36064,xi={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Wr={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},ii={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},di={cw:Te,ccw:Oe};function Li(Me){return Array.isArray(Me)||qr(Me)||jr(Me)}function Ti(Me){return Me.sort(function(bt,Ot){return bt===ee?-1:Ot===ee?1:bt=1,Lr>=2,bt)}else if(Ot===Zo){var Vr=Me.data;return new Qr(Vr.thisDep,Vr.contextDep,Vr.propDep,bt)}else{if(Ot===Ss)return new Qr(!1,!1,!1,bt);if(Ot===as){for(var Or=!1,Nr=!1,vi=!1,Ni=0;Ni=1&&(Nr=!0),Si>=2&&(vi=!0)}else qi.type===Zo&&(Or=Or||qi.data.thisDep,Nr=Nr||qi.data.contextDep,vi=vi||qi.data.propDep)}return new Qr(Or,Nr,vi,bt)}else return new Qr(Ot===bo,Ot===Ka,Ot===Dn,bt)}}var na=new Qr(!1,!1,!1,function(){});function Ea(Me,bt,Ot,Lr,Vr,Or,Nr,vi,Ni,qi,Si,Vn,Qi,ji,oi,Tr){var Zr=qi.Record,yi={add:32774,subtract:32778,"reverse subtract":32779};Ot.ext_blend_minmax&&(yi.min=Ve,yi.max=Ye);var Ii=Ot.angle_instanced_arrays,ui=Ot.webgl_draw_buffers,nn=Ot.oes_vertex_array_object,Xi={dirty:!0,profile:Tr.profile},qn={},fi=[],si={},mn={};function Ji(Ne){return Ne.replace(".","_")}function Ui(Ne,$e,ot){var It=Ji(Ne);fi.push(Ne),qn[It]=Xi[It]=!!ot,si[It]=$e}function Bi(Ne,$e,ot){var It=Ji(Ne);fi.push(Ne),Array.isArray(ot)?(Xi[It]=ot.slice(),qn[It]=ot.slice()):Xi[It]=qn[It]=ot,mn[It]=$e}function pn(Ne){return!!isNaN(Ne)}Ui(ws,Ci),Ui(Ho,ri),Bi(ml,"blendColor",[0,0,0,0]),Bi(Ws,"blendEquationSeparate",[pr,pr]),Bi(Ls,"blendFuncSeparate",[dr,Wt,dr,Wt]),Ui(va,sn,!0),Bi(no,"depthFunc",Ur),Bi(ys,"depthRange",[0,1]),Bi(rs,"depthMask",!0),Bi(Ql,Ql,[!0,!0,!0,!0]),Ui(Cu,Hr),Bi(Yu,"cullFace",se),Bi(Nc,Nc,Oe),Bi(pu,pu,1),Ui(Uc,Yn),Bi(xu,"polygonOffset",[0,0]),Ui(Ac,Aa),Ui(Ua,fa),Bi(oo,"sampleCoverage",[1,!1]),Ui(Vc,cn),Bi(hc,"stencilMask",-1),Bi(Ku,"stencilFunc",[Pt,0,-1]),Bi(ue,"stencilOpSeparate",[X,at,at,at]),Bi(w,"stencilOpSeparate",[se,at,at,at]),Ui(B,Ln),Bi(Q,"scissor",[0,0,Me.drawingBufferWidth,Me.drawingBufferHeight]),Bi(ee,ee,[0,0,Me.drawingBufferWidth,Me.drawingBufferHeight]);var Nn={gl:Me,context:Qi,strings:bt,next:qn,current:Xi,draw:Vn,elements:Or,buffer:Vr,shader:Si,attributes:qi.state,vao:qi,uniforms:Ni,framebuffer:vi,extensions:Ot,timer:ji,isBufferArgs:Li},aa={primTypes:Mn,compareFuncs:Wr,blendFuncs:xi,blendEquations:yi,stencilOps:ii,glTypes:un,orientationType:di};ui&&(aa.backBuffer=[se],aa.drawBuffer=S(Lr.maxDrawbuffers,function(Ne){return Ne===0?[0]:S(Ne,function($e){return gi+$e})}));var Ki=0;function Cn(){var Ne=ta({cache:oi}),$e=Ne.link,ot=Ne.global;Ne.id=Ki++,Ne.batchId="0";var It=$e(Nn),Bt=Ne.shared={props:"a0"};Object.keys(Nn).forEach(function(Dt){Bt[Dt]=ot.def(It,".",Dt)});var Ft=Ne.next={},Ut=Ne.current={};Object.keys(mn).forEach(function(Dt){Array.isArray(Xi[Dt])&&(Ft[Dt]=ot.def(Bt.next,".",Dt),Ut[Dt]=ot.def(Bt.current,".",Dt))});var zt=Ne.constants={};Object.keys(aa).forEach(function(Dt){zt[Dt]=ot.def(JSON.stringify(aa[Dt]))}),Ne.invoke=function(Dt,vt){switch(vt.type){case Zn:var lr=["this",Bt.context,Bt.props,Ne.batchId];return Dt.def($e(vt.data),".call(",lr.slice(0,Math.max(vt.data.length+1,4)),")");case Dn:return Dt.def(Bt.props,vt.data);case Ka:return Dt.def(Bt.context,vt.data);case bo:return Dt.def("this",vt.data);case Zo:return vt.data.append(Ne,Dt),vt.data.ref;case Ss:return vt.data.toString();case as:return vt.data.map(function(yr){return Ne.invoke(Dt,yr)})}},Ne.attribCache={};var _t={};return Ne.scopeAttrib=function(Dt){var vt=bt.id(Dt);if(vt in _t)return _t[vt];var lr=qi.scope[vt];lr||(lr=qi.scope[vt]=new Zr);var yr=_t[vt]=$e(lr);return yr},Ne}function ia(Ne){var $e=Ne.static,ot=Ne.dynamic,It;if(le in $e){var Bt=!!$e[le];It=kn(function(Ut,zt){return Bt}),It.enable=Bt}else if(le in ot){var Ft=ot[le];It=Bn(Ft,function(Ut,zt){return Ut.invoke(zt,Ft)})}return It}function sa(Ne,$e){var ot=Ne.static,It=Ne.dynamic;if(ze in ot){var Bt=ot[ze];return Bt?(Bt=vi.getFramebuffer(Bt),kn(function(Ut,zt){var _t=Ut.link(Bt),Dt=Ut.shared;zt.set(Dt.framebuffer,".next",_t);var vt=Dt.context;return zt.set(vt,"."+qe,_t+".width"),zt.set(vt,"."+Qe,_t+".height"),_t})):kn(function(Ut,zt){var _t=Ut.shared;zt.set(_t.framebuffer,".next","null");var Dt=_t.context;return zt.set(Dt,"."+qe,Dt+"."+jt),zt.set(Dt,"."+Qe,Dt+"."+ar),"null"})}else if(ze in It){var Ft=It[ze];return Bn(Ft,function(Ut,zt){var _t=Ut.invoke(zt,Ft),Dt=Ut.shared,vt=Dt.framebuffer,lr=zt.def(vt,".getFramebuffer(",_t,")");zt.set(vt,".next",lr);var yr=Dt.context;return zt.set(yr,"."+qe,lr+"?"+lr+".width:"+yr+"."+jt),zt.set(yr,"."+Qe,lr+"?"+lr+".height:"+yr+"."+ar),lr})}else return null}function ba(Ne,$e,ot){var It=Ne.static,Bt=Ne.dynamic;function Ft(_t){if(_t in It){var Dt=It[_t],vt=!0,lr=Dt.x|0,yr=Dt.y|0,Br,Di;return"width"in Dt?Br=Dt.width|0:vt=!1,"height"in Dt?Di=Dt.height|0:vt=!1,new Qr(!vt&&$e&&$e.thisDep,!vt&&$e&&$e.contextDep,!vt&&$e&&$e.propDep,function(gn,tn){var Ei=gn.shared.context,Oi=Br;"width"in Dt||(Oi=tn.def(Ei,".",qe,"-",lr));var Gi=Di;return"height"in Dt||(Gi=tn.def(Ei,".",Qe,"-",yr)),[lr,yr,Oi,Gi]})}else if(_t in Bt){var ci=Bt[_t],bi=Bn(ci,function(gn,tn){var Ei=gn.invoke(tn,ci),Oi=gn.shared.context,Gi=tn.def(Ei,".x|0"),on=tn.def(Ei,".y|0"),zn=tn.def('"width" in ',Ei,"?",Ei,".width|0:","(",Oi,".",qe,"-",Gi,")"),Ja=tn.def('"height" in ',Ei,"?",Ei,".height|0:","(",Oi,".",Qe,"-",on,")");return[Gi,on,zn,Ja]});return $e&&(bi.thisDep=bi.thisDep||$e.thisDep,bi.contextDep=bi.contextDep||$e.contextDep,bi.propDep=bi.propDep||$e.propDep),bi}else return $e?new Qr($e.thisDep,$e.contextDep,$e.propDep,function(gn,tn){var Ei=gn.shared.context;return[0,0,tn.def(Ei,".",qe),tn.def(Ei,".",Qe)]}):null}var Ut=Ft(ee);if(Ut){var zt=Ut;Ut=new Qr(Ut.thisDep,Ut.contextDep,Ut.propDep,function(_t,Dt){var vt=zt.append(_t,Dt),lr=_t.shared.context;return Dt.set(lr,"."+Xe,vt[2]),Dt.set(lr,"."+nt,vt[3]),vt})}return{viewport:Ut,scissor_box:Ft(Q)}}function is(Ne,$e){var ot=Ne.static,It=typeof ot[ut]=="string"&&typeof ot[Ze]=="string";if(It){if(Object.keys($e.dynamic).length>0)return null;var Bt=$e.static,Ft=Object.keys(Bt);if(Ft.length>0&&typeof Bt[Ft[0]]=="number"){for(var Ut=[],zt=0;zt"+Gi+"?"+vt+".constant["+Gi+"]:0;"}).join(""),"}}else{","if(",Br,"(",vt,".buffer)){",gn,"=",Di,".createStream(",br,",",vt,".buffer);","}else{",gn,"=",Di,".getBuffer(",vt,".buffer);","}",tn,'="type" in ',vt,"?",yr.glTypes,"[",vt,".type]:",gn,".dtype;",ci.normalized,"=!!",vt,".normalized;");function Ei(Oi){Dt(ci[Oi],"=",vt,".",Oi,"|0;")}return Ei("size"),Ei("offset"),Ei("stride"),Ei("divisor"),Dt("}}"),Dt.exit("if(",ci.isStream,"){",Di,".destroyStream(",gn,");","}"),ci}Bt[Ft]=Bn(Ut,zt)}),Bt}function al(Ne){var $e=Ne.static,ot=Ne.dynamic,It={};return Object.keys($e).forEach(function(Bt){var Ft=$e[Bt];It[Bt]=kn(function(Ut,zt){return typeof Ft=="number"||typeof Ft=="boolean"?""+Ft:Ut.link(Ft)})}),Object.keys(ot).forEach(function(Bt){var Ft=ot[Bt];It[Bt]=Bn(Ft,function(Ut,zt){return Ut.invoke(zt,Ft)})}),It}function Vl(Ne,$e,ot,It,Bt){var Ft=Ne.static,Ut=Ne.dynamic,zt=is(Ne,$e),_t=sa(Ne,Bt),Dt=ba(Ne,_t,Bt),vt=Va(Ne,Bt),lr=Ml(Ne,Bt),yr=Zs(Ne,Bt,zt);function Br(Ei){var Oi=Dt[Ei];Oi&&(lr[Ei]=Oi)}Br(ee),Br(Ji(Q));var Di=Object.keys(lr).length>0,ci={framebuffer:_t,draw:vt,shader:yr,state:lr,dirty:Di,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(ci.profile=ia(Ne,Bt),ci.uniforms=zo(ot,Bt),ci.drawVAO=ci.scopeVAO=vt.vao,!ci.drawVAO&&yr.program&&!zt&&Ot.angle_instanced_arrays&&vt.static.elements){var bi=!0,gn=yr.program.attributes.map(function(Ei){var Oi=$e.static[Ei];return bi=bi&&!!Oi,Oi});if(bi&&gn.length>0){var tn=qi.getVAO(qi.createVAO({attributes:gn,elements:vt.static.elements}));ci.drawVAO=new Qr(null,null,null,function(Ei,Oi){return Ei.link(tn)}),ci.useVAO=!0}}return zt?ci.useVAO=!0:ci.attributes=Qs($e,Bt),ci.context=al(It,Bt),ci}function ss(Ne,$e,ot){var It=Ne.shared,Bt=It.context,Ft=Ne.scope();Object.keys(ot).forEach(function(Ut){$e.save(Bt,"."+Ut);var zt=ot[Ut],_t=zt.append(Ne,$e);Array.isArray(_t)?Ft(Bt,".",Ut,"=[",_t.join(),"];"):Ft(Bt,".",Ut,"=",_t,";")}),$e(Ft)}function Vs(Ne,$e,ot,It){var Bt=Ne.shared,Ft=Bt.gl,Ut=Bt.framebuffer,zt;ui&&(zt=$e.def(Bt.extensions,".webgl_draw_buffers"));var _t=Ne.constants,Dt=_t.drawBuffer,vt=_t.backBuffer,lr;ot?lr=ot.append(Ne,$e):lr=$e.def(Ut,".next"),It||$e("if(",lr,"!==",Ut,".cur){"),$e("if(",lr,"){",Ft,".bindFramebuffer(",zr,",",lr,".framebuffer);"),ui&&$e(zt,".drawBuffersWEBGL(",Dt,"[",lr,".colorAttachments.length]);"),$e("}else{",Ft,".bindFramebuffer(",zr,",null);"),ui&&$e(zt,".drawBuffersWEBGL(",vt,");"),$e("}",Ut,".cur=",lr,";"),It||$e("}")}function Ys(Ne,$e,ot){var It=Ne.shared,Bt=It.gl,Ft=Ne.current,Ut=Ne.next,zt=It.current,_t=It.next,Dt=Ne.cond(zt,".dirty");fi.forEach(function(vt){var lr=Ji(vt);if(!(lr in ot.state)){var yr,Br;if(lr in Ut){yr=Ut[lr],Br=Ft[lr];var Di=S(Xi[lr].length,function(bi){return Dt.def(yr,"[",bi,"]")});Dt(Ne.cond(Di.map(function(bi,gn){return bi+"!=="+Br+"["+gn+"]"}).join("||")).then(Bt,".",mn[lr],"(",Di,");",Di.map(function(bi,gn){return Br+"["+gn+"]="+bi}).join(";"),";"))}else{yr=Dt.def(_t,".",lr);var ci=Ne.cond(yr,"!==",zt,".",lr);Dt(ci),lr in si?ci(Ne.cond(yr).then(Bt,".enable(",si[lr],");").else(Bt,".disable(",si[lr],");"),zt,".",lr,"=",yr,";"):ci(Bt,".",mn[lr],"(",yr,");",zt,".",lr,"=",yr,";")}}}),Object.keys(ot.state).length===0&&Dt(zt,".dirty=false;"),$e(Dt)}function wa(Ne,$e,ot,It){var Bt=Ne.shared,Ft=Ne.current,Ut=Bt.current,zt=Bt.gl,_t;Ti(Object.keys(ot)).forEach(function(Dt){var vt=ot[Dt];if(!(It&&!It(vt))){var lr=vt.append(Ne,$e);if(si[Dt]){var yr=si[Dt];Pn(vt)?(_t=Ne.link(lr,{stable:!0}),$e(Ne.cond(_t).then(zt,".enable(",yr,");").else(zt,".disable(",yr,");")),$e(Ut,".",Dt,"=",_t,";")):($e(Ne.cond(lr).then(zt,".enable(",yr,");").else(zt,".disable(",yr,");")),$e(Ut,".",Dt,"=",lr,";"))}else if(En(lr)){var Br=Ft[Dt];$e(zt,".",mn[Dt],"(",lr,");",lr.map(function(Di,ci){return Br+"["+ci+"]="+Di}).join(";"),";")}else Pn(vt)?(_t=Ne.link(lr,{stable:!0}),$e(zt,".",mn[Dt],"(",_t,");",Ut,".",Dt,"=",_t,";")):$e(zt,".",mn[Dt],"(",lr,");",Ut,".",Dt,"=",lr,";")}})}function ol(Ne,$e){Ii&&(Ne.instancing=$e.def(Ne.shared.extensions,".angle_instanced_arrays"))}function io(Ne,$e,ot,It,Bt){var Ft=Ne.shared,Ut=Ne.stats,zt=Ft.current,_t=Ft.timer,Dt=ot.profile;function vt(){return typeof performance=="undefined"?"Date.now()":"performance.now()"}var lr,yr;function Br(Ei){lr=$e.def(),Ei(lr,"=",vt(),";"),typeof Bt=="string"?Ei(Ut,".count+=",Bt,";"):Ei(Ut,".count++;"),ji&&(It?(yr=$e.def(),Ei(yr,"=",_t,".getNumPendingQueries();")):Ei(_t,".beginQuery(",Ut,");"))}function Di(Ei){Ei(Ut,".cpuTime+=",vt(),"-",lr,";"),ji&&(It?Ei(_t,".pushScopeStats(",yr,",",_t,".getNumPendingQueries(),",Ut,");"):Ei(_t,".endQuery();"))}function ci(Ei){var Oi=$e.def(zt,".profile");$e(zt,".profile=",Ei,";"),$e.exit(zt,".profile=",Oi,";")}var bi;if(Dt){if(Pn(Dt)){Dt.enable?(Br($e),Di($e.exit),ci("true")):ci("false");return}bi=Dt.append(Ne,$e),ci(bi)}else bi=$e.def(zt,".profile");var gn=Ne.block();Br(gn),$e("if(",bi,"){",gn,"}");var tn=Ne.block();Di(tn),$e.exit("if(",bi,"){",tn,"}")}function Y(Ne,$e,ot,It,Bt){var Ft=Ne.shared;function Ut(_t){switch(_t){case Co:case Ps:case hl:return 2;case Qa:case Ts:case Ul:return 3;case mo:case wo:case Lu:return 4;default:return 1}}function zt(_t,Dt,vt){var lr=Ft.gl,yr=$e.def(_t,".location"),Br=$e.def(Ft.attributes,"[",yr,"]"),Di=vt.state,ci=vt.buffer,bi=[vt.x,vt.y,vt.z,vt.w],gn=["buffer","normalized","offset","stride"];function tn(){$e("if(!",Br,".buffer){",lr,".enableVertexAttribArray(",yr,");}");var Oi=vt.type,Gi;if(vt.size?Gi=$e.def(vt.size,"||",Dt):Gi=Dt,$e("if(",Br,".type!==",Oi,"||",Br,".size!==",Gi,"||",gn.map(function(zn){return Br+"."+zn+"!=="+vt[zn]}).join("||"),"){",lr,".bindBuffer(",br,",",ci,".buffer);",lr,".vertexAttribPointer(",[yr,Gi,Oi,vt.normalized,vt.stride,vt.offset],");",Br,".type=",Oi,";",Br,".size=",Gi,";",gn.map(function(zn){return Br+"."+zn+"="+vt[zn]+";"}).join(""),"}"),Ii){var on=vt.divisor;$e("if(",Br,".divisor!==",on,"){",Ne.instancing,".vertexAttribDivisorANGLE(",[yr,on],");",Br,".divisor=",on,";}")}}function Ei(){$e("if(",Br,".buffer){",lr,".disableVertexAttribArray(",yr,");",Br,".buffer=null;","}if(",Ca.map(function(Oi,Gi){return Br+"."+Oi+"!=="+bi[Gi]}).join("||"),"){",lr,".vertexAttrib4f(",yr,",",bi,");",Ca.map(function(Oi,Gi){return Br+"."+Oi+"="+bi[Gi]+";"}).join(""),"}")}Di===La?tn():Di===Na?Ei():($e("if(",Di,"===",La,"){"),tn(),$e("}else{"),Ei(),$e("}"))}It.forEach(function(_t){var Dt=_t.name,vt=ot.attributes[Dt],lr;if(vt){if(!Bt(vt))return;lr=vt.append(Ne,$e)}else{if(!Bt(na))return;var yr=Ne.scopeAttrib(Dt);lr={},Object.keys(new Zr).forEach(function(Br){lr[Br]=$e.def(yr,".",Br)})}zt(Ne.link(_t),Ut(_t.info.type),lr)})}function D(Ne,$e,ot,It,Bt,Ft){for(var Ut=Ne.shared,zt=Ut.gl,_t,Dt=0;Dt1){for(var co=[],ts=[],so=0;so>1)",ci],");")}function on(){ot(bi,".drawArraysInstancedANGLE(",[yr,Br,Di,ci],");")}vt&&vt!=="null"?tn?Gi():(ot("if(",vt,"){"),Gi(),ot("}else{"),on(),ot("}")):on()}function Oi(){function Gi(){ot(Ft+".drawElements("+[yr,Di,gn,Br+"<<(("+gn+"-"+Ra+")>>1)"]+");")}function on(){ot(Ft+".drawArrays("+[yr,Br,Di]+");")}vt&&vt!=="null"?tn?Gi():(ot("if(",vt,"){"),Gi(),ot("}else{"),on(),ot("}")):on()}Ii&&(typeof ci!="number"||ci>=0)?typeof ci=="string"?(ot("if(",ci,">0){"),Ei(),ot("}else if(",ci,"<0){"),Oi(),ot("}")):Ei():Oi()}function O(Ne,$e,ot,It,Bt){var Ft=Cn(),Ut=Ft.proc("body",Bt);return Ii&&(Ft.instancing=Ut.def(Ft.shared.extensions,".angle_instanced_arrays")),Ne(Ft,Ut,ot,It),Ft.compile().body}function K(Ne,$e,ot,It){ol(Ne,$e),ot.useVAO?ot.drawVAO?$e(Ne.shared.vao,".setVAO(",ot.drawVAO.append(Ne,$e),");"):$e(Ne.shared.vao,".setVAO(",Ne.shared.vao,".targetVAO);"):($e(Ne.shared.vao,".setVAO(null);"),Y(Ne,$e,ot,It.attributes,function(){return!0})),D(Ne,$e,ot,It.uniforms,function(){return!0},!1),J(Ne,$e,$e,ot)}function de(Ne,$e){var ot=Ne.proc("draw",1);ol(Ne,ot),ss(Ne,ot,$e.context),Vs(Ne,ot,$e.framebuffer),Ys(Ne,ot,$e),wa(Ne,ot,$e.state),io(Ne,ot,$e,!1,!0);var It=$e.shader.progVar.append(Ne,ot);if(ot(Ne.shared.gl,".useProgram(",It,".program);"),$e.shader.program)K(Ne,ot,$e,$e.shader.program);else{ot(Ne.shared.vao,".setVAO(null);");var Bt=Ne.global.def("{}"),Ft=ot.def(It,".id"),Ut=ot.def(Bt,"[",Ft,"]");ot(Ne.cond(Ut).then(Ut,".call(this,a0);").else(Ut,"=",Bt,"[",Ft,"]=",Ne.link(function(zt){return O(K,Ne,$e,zt,1)}),"(",It,");",Ut,".call(this,a0);"))}Object.keys($e.state).length>0&&ot(Ne.shared.current,".dirty=true;"),Ne.shared.vao&&ot(Ne.shared.vao,".setVAO(null);")}function ne(Ne,$e,ot,It){Ne.batchId="a1",ol(Ne,$e);function Bt(){return!0}Y(Ne,$e,ot,It.attributes,Bt),D(Ne,$e,ot,It.uniforms,Bt,!1),J(Ne,$e,$e,ot)}function be(Ne,$e,ot,It){ol(Ne,$e);var Bt=ot.contextDep,Ft=$e.def(),Ut="a0",zt="a1",_t=$e.def();Ne.shared.props=_t,Ne.batchId=Ft;var Dt=Ne.scope(),vt=Ne.scope();$e(Dt.entry,"for(",Ft,"=0;",Ft,"<",zt,";++",Ft,"){",_t,"=",Ut,"[",Ft,"];",vt,"}",Dt.exit);function lr(gn){return gn.contextDep&&Bt||gn.propDep}function yr(gn){return!lr(gn)}if(ot.needsContext&&ss(Ne,vt,ot.context),ot.needsFramebuffer&&Vs(Ne,vt,ot.framebuffer),wa(Ne,vt,ot.state,lr),ot.profile&&lr(ot.profile)&&io(Ne,vt,ot,!1,!0),It)ot.useVAO?ot.drawVAO?lr(ot.drawVAO)?vt(Ne.shared.vao,".setVAO(",ot.drawVAO.append(Ne,vt),");"):Dt(Ne.shared.vao,".setVAO(",ot.drawVAO.append(Ne,Dt),");"):Dt(Ne.shared.vao,".setVAO(",Ne.shared.vao,".targetVAO);"):(Dt(Ne.shared.vao,".setVAO(null);"),Y(Ne,Dt,ot,It.attributes,yr),Y(Ne,vt,ot,It.attributes,lr)),D(Ne,Dt,ot,It.uniforms,yr,!1),D(Ne,vt,ot,It.uniforms,lr,!0),J(Ne,Dt,vt,ot);else{var Br=Ne.global.def("{}"),Di=ot.shader.progVar.append(Ne,vt),ci=vt.def(Di,".id"),bi=vt.def(Br,"[",ci,"]");vt(Ne.shared.gl,".useProgram(",Di,".program);","if(!",bi,"){",bi,"=",Br,"[",ci,"]=",Ne.link(function(gn){return O(ne,Ne,ot,gn,2)}),"(",Di,");}",bi,".call(this,a0[",Ft,"],",Ft,");")}}function Be(Ne,$e){var ot=Ne.proc("batch",2);Ne.batchId="0",ol(Ne,ot);var It=!1,Bt=!0;Object.keys($e.context).forEach(function(Br){It=It||$e.context[Br].propDep}),It||(ss(Ne,ot,$e.context),Bt=!1);var Ft=$e.framebuffer,Ut=!1;Ft?(Ft.propDep?It=Ut=!0:Ft.contextDep&&It&&(Ut=!0),Ut||Vs(Ne,ot,Ft)):Vs(Ne,ot,null),$e.state.viewport&&$e.state.viewport.propDep&&(It=!0);function zt(Br){return Br.contextDep&&It||Br.propDep}Ys(Ne,ot,$e),wa(Ne,ot,$e.state,function(Br){return!zt(Br)}),(!$e.profile||!zt($e.profile))&&io(Ne,ot,$e,!1,"a1"),$e.contextDep=It,$e.needsContext=Bt,$e.needsFramebuffer=Ut;var _t=$e.shader.progVar;if(_t.contextDep&&It||_t.propDep)be(Ne,ot,$e,null);else{var Dt=_t.append(Ne,ot);if(ot(Ne.shared.gl,".useProgram(",Dt,".program);"),$e.shader.program)be(Ne,ot,$e,$e.shader.program);else{ot(Ne.shared.vao,".setVAO(null);");var vt=Ne.global.def("{}"),lr=ot.def(Dt,".id"),yr=ot.def(vt,"[",lr,"]");ot(Ne.cond(yr).then(yr,".call(this,a0,a1);").else(yr,"=",vt,"[",lr,"]=",Ne.link(function(Br){return O(be,Ne,$e,Br,2)}),"(",Dt,");",yr,".call(this,a0,a1);"))}}Object.keys($e.state).length>0&&ot(Ne.shared.current,".dirty=true;"),Ne.shared.vao&&ot(Ne.shared.vao,".setVAO(null);")}function ht(Ne,$e){var ot=Ne.proc("scope",3);Ne.batchId="a2";var It=Ne.shared,Bt=It.current;if(ss(Ne,ot,$e.context),$e.framebuffer&&$e.framebuffer.append(Ne,ot),Ti(Object.keys($e.state)).forEach(function(zt){var _t=$e.state[zt],Dt=_t.append(Ne,ot);En(Dt)?Dt.forEach(function(vt,lr){pn(vt)?ot.set(Ne.next[zt],"["+lr+"]",vt):ot.set(Ne.next[zt],"["+lr+"]",Ne.link(vt,{stable:!0}))}):Pn(_t)?ot.set(It.next,"."+zt,Ne.link(Dt,{stable:!0})):ot.set(It.next,"."+zt,Dt)}),io(Ne,ot,$e,!0,!0),[Mt,mr,$t,Cr,Jt].forEach(function(zt){var _t=$e.draw[zt];if(_t){var Dt=_t.append(Ne,ot);pn(Dt)?ot.set(It.draw,"."+zt,Dt):ot.set(It.draw,"."+zt,Ne.link(Dt),{stable:!0})}}),Object.keys($e.uniforms).forEach(function(zt){var _t=$e.uniforms[zt].append(Ne,ot);Array.isArray(_t)&&(_t="["+_t.map(function(Dt){return pn(Dt)?Dt:Ne.link(Dt,{stable:!0})})+"]"),ot.set(It.uniforms,"["+Ne.link(bt.id(zt),{stable:!0})+"]",_t)}),Object.keys($e.attributes).forEach(function(zt){var _t=$e.attributes[zt].append(Ne,ot),Dt=Ne.scopeAttrib(zt);Object.keys(new Zr).forEach(function(vt){ot.set(Dt,"."+vt,_t[vt])})}),$e.scopeVAO){var Ft=$e.scopeVAO.append(Ne,ot);pn(Ft)?ot.set(It.vao,".targetVAO",Ft):ot.set(It.vao,".targetVAO",Ne.link(Ft,{stable:!0}))}function Ut(zt){var _t=$e.shader[zt];if(_t){var Dt=_t.append(Ne,ot);pn(Dt)?ot.set(It.shader,"."+zt,Dt):ot.set(It.shader,"."+zt,Ne.link(Dt,{stable:!0}))}}Ut(Ze),Ut(ut),Object.keys($e.state).length>0&&(ot(Bt,".dirty=true;"),ot.exit(Bt,".dirty=true;")),ot("a1(",Ne.shared.context,",a0,",Ne.batchId,");")}function Yt(Ne){if(!(typeof Ne!="object"||En(Ne))){for(var $e=Object.keys(Ne),ot=0;ot<$e.length;++ot)if(h.isDynamic(Ne[$e[ot]]))return!0;return!1}}function cr(Ne,$e,ot){var It=$e.static[ot];if(!It||!Yt(It))return;var Bt=Ne.global,Ft=Object.keys(It),Ut=!1,zt=!1,_t=!1,Dt=Ne.global.def("{}");Ft.forEach(function(lr){var yr=It[lr];if(h.isDynamic(yr)){typeof yr=="function"&&(yr=It[lr]=h.unbox(yr));var Br=Bn(yr,null);Ut=Ut||Br.thisDep,_t=_t||Br.propDep,zt=zt||Br.contextDep}else{switch(Bt(Dt,".",lr,"="),typeof yr){case"number":Bt(yr);break;case"string":Bt('"',yr,'"');break;case"object":Array.isArray(yr)&&Bt("[",yr.join(),"]");break;default:Bt(Ne.link(yr));break}Bt(";")}});function vt(lr,yr){Ft.forEach(function(Br){var Di=It[Br];if(h.isDynamic(Di)){var ci=lr.invoke(yr,Di);yr(Dt,".",Br,"=",ci,";")}})}$e.dynamic[ot]=new h.DynamicVariable(Zo,{thisDep:Ut,contextDep:zt,propDep:_t,ref:Dt,append:vt}),delete $e.static[ot]}function Nt(Ne,$e,ot,It,Bt){var Ft=Cn();Ft.stats=Ft.link(Bt),Object.keys($e.static).forEach(function(zt){cr(Ft,$e,zt)}),fr.forEach(function(zt){cr(Ft,Ne,zt)});var Ut=Vl(Ne,$e,ot,It,Ft);return Ut.shader.program&&(Ut.shader.program.attributes.sort(function(zt,_t){return zt.name<_t.name?-1:1}),Ut.shader.program.uniforms.sort(function(zt,_t){return zt.name<_t.name?-1:1})),de(Ft,Ut),ht(Ft,Ut),Be(Ft,Ut),e(Ft.compile(),{destroy:function(){Ut.shader.program.destroy()}})}return{next:qn,current:Xi,procs:function(){var Ne=Cn(),$e=Ne.proc("poll"),ot=Ne.proc("refresh"),It=Ne.block();$e(It),ot(It);var Bt=Ne.shared,Ft=Bt.gl,Ut=Bt.next,zt=Bt.current;It(zt,".dirty=false;"),Vs(Ne,$e),Vs(Ne,ot,null,!0);var _t;Ii&&(_t=Ne.link(Ii)),Ot.oes_vertex_array_object&&ot(Ne.link(Ot.oes_vertex_array_object),".bindVertexArrayOES(null);");var Dt=ot.def(Bt.attributes),vt=ot.def(0),lr=Ne.cond(vt,".buffer");lr.then(Ft,".enableVertexAttribArray(i);",Ft,".bindBuffer(",br,",",vt,".buffer.buffer);",Ft,".vertexAttribPointer(i,",vt,".size,",vt,".type,",vt,".normalized,",vt,".stride,",vt,".offset);").else(Ft,".disableVertexAttribArray(i);",Ft,".vertexAttrib4f(i,",vt,".x,",vt,".y,",vt,".z,",vt,".w);",vt,".buffer=null;");var yr=Ne.link(Lr.maxAttributes,{stable:!0});return ot("for(var i=0;i<",yr,";++i){",vt,"=",Dt,"[i];",lr,"}"),Ii&&ot("for(var i=0;i<",yr,";++i){",_t,".vertexAttribDivisorANGLE(i,",Dt,"[i].divisor);","}"),ot(Ne.shared.vao,".currentVAO=null;",Ne.shared.vao,".setVAO(",Ne.shared.vao,".targetVAO);"),Object.keys(si).forEach(function(Br){var Di=si[Br],ci=It.def(Ut,".",Br),bi=Ne.block();bi("if(",ci,"){",Ft,".enable(",Di,")}else{",Ft,".disable(",Di,")}",zt,".",Br,"=",ci,";"),ot(bi),$e("if(",ci,"!==",zt,".",Br,"){",bi,"}")}),Object.keys(mn).forEach(function(Br){var Di=mn[Br],ci=Xi[Br],bi,gn,tn=Ne.block();if(tn(Ft,".",Di,"("),En(ci)){var Ei=ci.length;bi=Ne.global.def(Ut,".",Br),gn=Ne.global.def(zt,".",Br),tn(S(Ei,function(Oi){return bi+"["+Oi+"]"}),");",S(Ei,function(Oi){return gn+"["+Oi+"]="+bi+"["+Oi+"];"}).join("")),$e("if(",S(Ei,function(Oi){return bi+"["+Oi+"]!=="+gn+"["+Oi+"]"}).join("||"),"){",tn,"}")}else bi=It.def(Ut,".",Br),gn=It.def(zt,".",Br),tn(bi,");",zt,".",Br,"=",bi,";"),$e("if(",bi,"!==",gn,"){",tn,"}");ot(tn)}),Ne.compile()}(),compile:Nt}}function Ia(){return{vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0}}var yo=34918,Da=34919,go=35007,Is=function(Me,bt){if(!bt.ext_disjoint_timer_query)return null;var Ot=[];function Lr(){return Ot.pop()||bt.ext_disjoint_timer_query.createQueryEXT()}function Vr(yi){Ot.push(yi)}var Or=[];function Nr(yi){var Ii=Lr();bt.ext_disjoint_timer_query.beginQueryEXT(go,Ii),Or.push(Ii),ji(Or.length-1,Or.length,yi)}function vi(){bt.ext_disjoint_timer_query.endQueryEXT(go)}function Ni(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var qi=[];function Si(){return qi.pop()||new Ni}function Vn(yi){qi.push(yi)}var Qi=[];function ji(yi,Ii,ui){var nn=Si();nn.startQueryIndex=yi,nn.endQueryIndex=Ii,nn.sum=0,nn.stats=ui,Qi.push(nn)}var oi=[],Tr=[];function Zr(){var yi,Ii,ui=Or.length;if(ui!==0){Tr.length=Math.max(Tr.length,ui+1),oi.length=Math.max(oi.length,ui+1),oi[0]=0,Tr[0]=0;var nn=0;for(yi=0,Ii=0;Ii=0;--O){var K=Nn[O];K&&K(oi,null,0)}Ot.flush(),Si&&Si.update()}function ba(){!ia&&Nn.length>0&&(ia=d.next(sa))}function is(){ia&&(d.cancel(sa),ia=null)}function Zs(O){O.preventDefault(),Vr=!0,is(),aa.forEach(function(K){K()})}function Va(O){Ot.getError(),Vr=!1,Or.restore(),qn.restore(),Ii.restore(),fi.restore(),si.restore(),mn.restore(),nn.restore(),Si&&Si.restore(),Ji.procs.refresh(),ba(),Ki.forEach(function(K){K()})}pn&&(pn.addEventListener(Fo,Zs,!1),pn.addEventListener(Uo,Va,!1));function Ml(){Nn.length=0,is(),pn&&(pn.removeEventListener(Fo,Zs),pn.removeEventListener(Uo,Va)),qn.clear(),mn.clear(),si.clear(),nn.clear(),fi.clear(),ui.clear(),Ii.clear(),Si&&Si.clear(),Cn.forEach(function(O){O()})}function zo(O){function K(Ft){var Ut=e({},Ft);delete Ut.uniforms,delete Ut.attributes,delete Ut.context,delete Ut.vao,"stencil"in Ut&&Ut.stencil.op&&(Ut.stencil.opBack=Ut.stencil.opFront=Ut.stencil.op,delete Ut.stencil.op);function zt(_t){if(_t in Ut){var Dt=Ut[_t];delete Ut[_t],Object.keys(Dt).forEach(function(vt){Ut[_t+"."+vt]=Dt[vt]})}}return zt("blend"),zt("depth"),zt("cull"),zt("stencil"),zt("polygonOffset"),zt("scissor"),zt("sample"),"vao"in Ft&&(Ut.vao=Ft.vao),Ut}function de(Ft,Ut){var zt={},_t={};return Object.keys(Ft).forEach(function(Dt){var vt=Ft[Dt];if(h.isDynamic(vt)){_t[Dt]=h.unbox(vt,Dt);return}else if(Ut&&Array.isArray(vt)){for(var lr=0;lr0)return Ne.call(this,It(Ft|0),Ft|0)}else if(Array.isArray(Ft)){if(Ft.length)return Ne.call(this,Ft,Ft.length)}else return Nt.call(this,Ft)}return e(Bt,{stats:Yt,destroy:function(){cr.destroy()}})}var Qs=mn.setFBO=zo({framebuffer:h.define.call(null,$s,"framebuffer")});function al(O,K){var de=0;Ji.procs.poll();var ne=K.color;ne&&(Ot.clearColor(+ne[0]||0,+ne[1]||0,+ne[2]||0,+ne[3]||0),de|=Ms),"depth"in K&&(Ot.clearDepth(+K.depth),de|=Xs),"stencil"in K&&(Ot.clearStencil(K.stencil|0),de|=Un),Ot.clear(de)}function Vl(O){if("framebuffer"in O)if(O.framebuffer&&O.framebuffer_reglType==="framebufferCube")for(var K=0;K<6;++K)Qs(e({framebuffer:O.framebuffer.faces[K]},O),al);else Qs(O,al);else al(null,O)}function ss(O){Nn.push(O);function K(){var de=dl(Nn,O);function ne(){var be=dl(Nn,ne);Nn[be]=Nn[Nn.length-1],Nn.length-=1,Nn.length<=0&&is()}Nn[de]=ne}return ba(),{cancel:K}}function Vs(){var O=Bi.viewport,K=Bi.scissor_box;O[0]=O[1]=K[0]=K[1]=0,oi.viewportWidth=oi.framebufferWidth=oi.drawingBufferWidth=O[2]=K[2]=Ot.drawingBufferWidth,oi.viewportHeight=oi.framebufferHeight=oi.drawingBufferHeight=O[3]=K[3]=Ot.drawingBufferHeight}function Ys(){oi.tick+=1,oi.time=ol(),Vs(),Ji.procs.poll()}function wa(){fi.refresh(),Vs(),Ji.procs.refresh(),Si&&Si.update()}function ol(){return(v()-Vn)/1e3}wa();function io(O,K){var de;switch(O){case"frame":return ss(K);case"lost":de=aa;break;case"restore":de=Ki;break;case"destroy":de=Cn;break;default:}return de.push(K),{cancel:function(){for(var ne=0;ne=0},read:Ui,destroy:Ml,_gl:Ot,_refresh:wa,poll:function(){Ys(),Si&&Si.update()},now:ol,stats:vi,getCachedCode:Y,preloadCachedCode:D});return bt.onDone(null,J),J}return Sc})});var Lz=ye((R_r,OBe)=>{"use strict";var QUt=zX(),eVt=qBe();OBe.exports=function(t,r,n){var i=t._fullLayout,a=!0;return i._glcanvas.each(function(o){if(o.regl){o.regl.preloadCachedCode(n);return}if(!(o.pick&&!i._has("parcoords"))){try{o.regl=eVt({canvas:this,attributes:{antialias:!o.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||window.devicePixelRatio,extensions:r||[],cachedCode:n||{}})}catch(s){a=!1}o.regl||(a=!1),a&&this.addEventListener("webglcontextlost",function(s){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:s,layer:o.key})},!1)}}),a||QUt({container:i._glcontainer.node()}),a}});var xK=ye((_K,GBe)=>{"use strict";var BBe=_Y(),NBe=KY(),tVt=EOe(),UBe=zBe(),yK=Pr(),rVt=Cg().selectMode,iVt=Lz(),nVt=Ru(),aVt=SU(),oVt=pY().styleTextSelection,VBe={};function sVt(e,t,r,n){var i=e._size,a=e.width*n,o=e.height*n,s=i.l*n,l=i.b*n,u=i.r*n,c=i.t*n,f=i.w*n,h=i.h*n;return[s+t.domain[0]*f,l+r.domain[0]*h,a-u-(1-t.domain[1])*f,o-c-(1-r.domain[1])*h]}var _K=GBe.exports=function(t,r,n){if(n.length){var i=t._fullLayout,a=r._scene,o=r.xaxis,s=r.yaxis,l,u;if(a){var c=iVt(t,["ANGLE_instanced_arrays","OES_element_index_uint"],VBe);if(!c){a.init();return}var f=a.count,h=i._glcanvas.data()[0].regl;if(aVt(t,r,n),a.dirty){if((a.line2d||a.error2d)&&!(a.scatter2d||a.fill2d||a.glText)&&h.clear({color:!0,depth:!0}),a.error2d===!0&&(a.error2d=tVt(h)),a.line2d===!0&&(a.line2d=NBe(h)),a.scatter2d===!0&&(a.scatter2d=BBe(h)),a.fill2d===!0&&(a.fill2d=NBe(h)),a.glText===!0)for(a.glText=new Array(f),l=0;la.glText.length){var d=f-a.glText.length;for(l=0;lre&&(isNaN(H[oe])||isNaN(H[oe+1]));)oe-=2;N.positions=H.slice(re,oe+2)}return N}),a.line2d.update(a.lineOptions)),a.error2d){var b=(a.errorXOptions||[]).concat(a.errorYOptions||[]);a.error2d.update(b)}a.scatter2d&&a.scatter2d.update(a.markerOptions),a.fillOrder=yK.repeat(null,f),a.fill2d&&(a.fillOptions=a.fillOptions.map(function(N,H){var re=n[H];if(!(!N||!re||!re[0]||!re[0].trace)){var oe=re[0],_e=oe.trace,ke=oe.t,Ce=a.lineOptions[H],ge,ie,Se=[];_e._ownfill&&Se.push(H),_e._nexttrace&&Se.push(H+1),Se.length&&(a.fillOrder[H]=Se);var Ee=[],we=Ce&&Ce.positions||ke.positions,De,Le;if(_e.fill==="tozeroy"){for(De=0;DeDe&&isNaN(we[Le+1]);)Le-=2;we[De+1]!==0&&(Ee=[we[De],0]),Ee=Ee.concat(we.slice(De,Le+2)),we[Le+1]!==0&&(Ee=Ee.concat([we[Le],0]))}else if(_e.fill==="tozerox"){for(De=0;DeDe&&isNaN(we[Le]);)Le-=2;we[De]!==0&&(Ee=[0,we[De+1]]),Ee=Ee.concat(we.slice(De,Le+2)),we[Le]!==0&&(Ee=Ee.concat([0,we[Le+1]]))}else if(_e.fill==="toself"||_e.fill==="tonext"){for(Ee=[],ge=0,N.splitNull=!0,ie=0;ie-1;for(let[N]of n)if(N){var T=N.trace,L=N.t,x=L.index,C=T._length,S=L.x,g=L.y;if(T.selectedpoints||k||M){if(k||(k=!0),T.selectedpoints){var P=a.selectBatch[x]=yK.selIndices2selPoints(T),E={};for(u=0;u{"use strict";var HBe=l7e();HBe.plot=xK();jBe.exports=HBe});var ZBe=ye((F_r,XBe)=>{"use strict";XBe.exports=WBe()});var bK=ye((z_r,$Be)=>{"use strict";var lVt=pf(),JBe=Tu(),YBe=df().axisHoverFormat,{hovertemplateAttrs:uVt,templatefallbackAttrs:cVt}=Ll(),zk=gk(),fVt=Rh().idRegex,hVt=vl().templatedArray,x5=Ao().extendFlat,d1=lVt.marker,dVt=d1.line,vVt=x5(JBe("marker.line",{editTypeOverride:"calc"}),{width:x5({},dVt.width,{editType:"calc"}),editType:"calc"}),Pz=x5(JBe("marker"),{symbol:d1.symbol,angle:d1.angle,size:x5({},d1.size,{editType:"markerSize"}),sizeref:d1.sizeref,sizemin:d1.sizemin,sizemode:d1.sizemode,opacity:d1.opacity,colorbar:d1.colorbar,line:vVt,editType:"calc"});Pz.color.editType=Pz.cmin.editType=Pz.cmax.editType="style";function KBe(e){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:fVt[e],editType:"plot"}}}$Be.exports={dimensions:hVt("dimension",{visible:{valType:"boolean",dflt:!0,editType:"calc"},label:{valType:"string",editType:"calc"},values:{valType:"data_array",editType:"calc+clearAxisTypes"},axis:{type:{valType:"enumerated",values:["linear","log","date","category"],editType:"calc+clearAxisTypes"},matches:{valType:"boolean",dflt:!1,editType:"calc"},editType:"calc+clearAxisTypes"},editType:"calc+clearAxisTypes"}),text:x5({},zk.text,{}),hovertext:x5({},zk.hovertext,{}),hovertemplate:uVt(),hovertemplatefallback:cVt(),xhoverformat:YBe("x"),yhoverformat:YBe("y"),marker:Pz,xaxes:KBe("x"),yaxes:KBe("y"),diagonal:{visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},showupperhalf:{valType:"boolean",dflt:!0,editType:"calc"},showlowerhalf:{valType:"boolean",dflt:!0,editType:"calc"},selected:{marker:zk.selected.marker,editType:"calc"},unselected:{marker:zk.unselected.marker,editType:"calc"},opacity:zk.opacity}});var Iz=ye((q_r,QBe)=>{"use strict";QBe.exports=function(e,t,r,n){n||(n=1/0);var i,a;for(i=0;i{"use strict";var wK=Pr(),pVt=Zd(),eNe=bK(),gVt=Ru(),mVt=$p(),yVt=Iz(),_Vt=WF().isOpenSymbol;tNe.exports=function(t,r,n,i){function a(d,v){return wK.coerce(t,r,eNe,d,v)}var o=pVt(t,r,{name:"dimensions",handleItemDefaults:xVt}),s=a("diagonal.visible"),l=a("showupperhalf"),u=a("showlowerhalf"),c=yVt(r,o,"values");if(!c||!s&&!l&&!u){r.visible=!1;return}a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat"),mVt(t,r,n,i,a,{noAngleRef:!0,noLineDash:!0,noStandOff:!0});var f=_Vt(r.marker.symbol),h=gVt.isBubble(r);a("marker.line.width",f||h?1:0),bVt(t,r,i,a),wK.coerceSelectionMarkerOpacity(r,a)};function xVt(e,t){function r(i,a){return wK.coerce(e,t,eNe.dimensions,i,a)}r("label");var n=r("values");n&&n.length?r("visible"):t.visible=!1,r("axis.type"),r("axis.matches")}function bVt(e,t,r,n){var i=t.dimensions,a=i.length,o=t.showupperhalf,s=t.showlowerhalf,l=t.diagonal.visible,u,c,f=new Array(a),h=new Array(a);for(u=0;uc&&o||u{"use strict";var iNe=Pr();nNe.exports=function(t,r){var n=t._fullLayout,i=r.uid,a=n._splomScenes;a||(a=n._splomScenes={});var o={dirty:!0,selectBatch:[],unselectBatch:[]},s={matrix:!1,selectBatch:[],unselectBatch:[]},l=a[r.uid];return l||(l=a[i]=iNe.extendFlat({},o,s),l.draw=function(){l.matrix&&l.matrix.draw&&(l.selectBatch.length||l.unselectBatch.length?l.matrix.draw(l.unselectBatch,l.selectBatch):l.matrix.draw()),l.dirty=!1},l.destroy=function(){l.matrix&&l.matrix.destroy&&l.matrix.destroy(),l.matrixOptions=null,l.selectBatch=null,l.unselectBatch=null,l=null}),l.dirty||iNe.extendFlat(l,o),l}});var lNe=ye((N_r,sNe)=>{"use strict";var TK=Pr(),Rz=hf(),wVt=O0().calcMarkerSize,TVt=O0().calcAxisExpansion,AVt=z0(),oNe=sw().markerSelection,SVt=sw().markerStyle,MVt=aNe(),EVt=fs().BADNUM,kVt=px().TOO_MANY_POINTS;sNe.exports=function(t,r){var n=r.dimensions,i=r._length,a={},o=a.cdata=[],s=a.data=[],l=r._visibleDims=[],u,c,f,h,d;function v(M,T){for(var L=M.makeCalcdata({v:T.values,vcalendar:r.calendar},"v"),x=0;xkVt,p;for(b?p=a.sizeAvg||Math.max(a.size,3):p=wVt(r,i),c=0;c{(function(){var e,t,r,n,i,a;typeof performance!="undefined"&&performance!==null&&performance.now?qk.exports=function(){return performance.now()}:typeof process!="undefined"&&process!==null&&process.hrtime?(qk.exports=function(){return(e()-i)/1e6},t=process.hrtime,e=function(){var o;return o=t(),o[0]*1e9+o[1]},n=e(),a=process.uptime()*1e9,i=n-a):Date.now?(qk.exports=function(){return Date.now()-r},r=Date.now()):(qk.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(uNe)});var hNe=ye((U_r,zz)=>{var CVt=cNe(),v1=window,Dz=["moz","webkit"],w5="AnimationFrame",T5=v1["request"+w5],Ok=v1["cancel"+w5]||v1["cancelRequest"+w5];for(b5=0;!T5&&b5{dNe.exports=function(t,r){var n=typeof t=="number",i=typeof r=="number";n&&!i?(r=t,t=0):!n&&!i&&(t=0,r=0),t=t|0,r=r|0;var a=r-t;if(a<0)throw new Error("array length must be positive");for(var o=new Array(a),s=0,l=t;s{"use strict";var LVt=_Y(),PVt=ey(),IVt=iw(),pNe=hNe(),RVt=vNe(),SK=s5(),DVt=nw();mNe.exports=Ax;function Ax(e,t){if(!(this instanceof Ax))return new Ax(e,t);this.traces=[],this.passes={},this.regl=e,this.scatter=LVt(e),this.canvas=this.scatter.canvas}Ax.prototype.render=function(...e){return e.length&&this.update(...e),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=pNe(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,pNe(()=>{this.dirty=!1})),this)};Ax.prototype.update=function(...e){if(!e.length)return;for(let n=0;nb||!i.lower&&m{t[a+s]=n})}this.scatter.draw(...t)}return this};Ax.prototype.destroy=function(){return this.traces.forEach(e=>{e.buffer&&e.buffer.destroy&&e.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function FVt(e,t,r){let n=e.id!=null?e.id:e,i=t,a=r;return n<<16|(i&255)<<8|a&255}function qz(e,t,r){let n,i,a,o,s,l,u,c,f=e[t],h=e[r];return f.length>2?(n=f[0],a=f[2],i=f[1],o=f[3]):f.length?(n=i=f[0],a=o=f[1]):(n=f.x,i=f.y,a=f.x+f.width,o=f.y+f.height),h.length>2?(s=h[0],u=h[2],l=h[1],c=h[3]):h.length?(s=l=h[0],u=c=h[1]):(s=h.x,l=h.y,u=h.x+h.width,c=h.y+h.height),[s,i,u,o]}function gNe(e){if(typeof e=="number")return[e,e,e,e];if(e.length===2)return[e[0],e[1],e[0],e[1]];{let t=SK(e);return[t.x,t.y,t.x+t.width,t.y+t.height]}}});var xNe=ye((H_r,_Ne)=>{"use strict";var zVt=yNe(),MK=Pr(),Oz=hf(),qVt=Cg().selectMode;_Ne.exports=function(t,r,n){if(n.length)for(var i=0;i-1,E=qVt(c)||!!i.selectedpoints||P,z=!0;if(E){var q=i._length;if(i.selectedpoints){o.selectBatch=i.selectedpoints;var U=i.selectedpoints,G={};for(d=0;d{"use strict";bNe.getDimIndex=function(t,r){for(var n=r._id,i=n.charAt(0),a={x:0,y:1}[i],o=t._visibleDims,s=0;s{"use strict";var wNe=EK(),BVt=jF().calcHover,TNe=ho().getFromId,NVt=Ao().extendFlat;function UVt(e,t,r,n,i){i||(i={});var a=(n||"").charAt(0)==="x",o=(n||"").charAt(0)==="y",s=ANe(e,t,r);if((a||o)&&i.hoversubplots==="axis"&&s[0])for(var l=(a?e.xa:e.ya)._subplotsWith,u=i.gd,c=NVt({},e),f=0;f{"use strict";var LNe=Pr(),ENe=LNe.pushUnique,kNe=Ru(),CNe=EK();PNe.exports=function(t,r){var n=t.cd,i=n[0].trace,a=n[0].t,o=t.scene,s=o.matrixOptions.cdata,l=t.xaxis,u=t.yaxis,c=[];if(!o)return c;var f=!kNe.hasMarkers(i)&&!kNe.hasText(i);if(i.visible!==!0||f)return c;var h=CNe.getDimIndex(i,l),d=CNe.getDimIndex(i,u);if(h===!1||d===!1)return c;var v=a.xpx[h],m=a.ypx[d],b=s[h],p=s[d],k=(t.scene.selectBatch||[]).slice(),M=[];if(r!==!1&&!r.degenerate)for(var T=0;T{"use strict";var RNe=Pr(),VVt=z0(),GVt=sw().markerStyle;DNe.exports=function(t,r){var n=r.trace,i=t._fullLayout._splomScenes[n.uid];if(i){VVt(t,n),RNe.extendFlat(i.matrixOptions,GVt(t,n));var a=RNe.extendFlat({},i.matrixOptions,i.viewOpts);i.matrix.update(a,null)}}});var qNe=ye((Y_r,zNe)=>{"use strict";var HVt=Oa(),jVt=yV();zNe.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:bK(),supplyDefaults:rNe(),colorbar:$d(),calc:lNe(),plot:xNe(),hoverPoints:MNe().hoverPoints,selectPoints:INe(),editStyle:FNe(),meta:{}};HVt.register(jVt)});var GNe=ye((K_r,VNe)=>{"use strict";var WVt=KY(),XVt=Oa(),ZVt=Lz(),YVt=Id().getModuleCalcData,Sx=mh(),ONe=hf().getFromId,BNe=ho().shouldShowZeroLine,NNe="splom",UNe={};function KVt(e){var t=e._fullLayout,r=XVt.getModule(NNe),n=YVt(e.calcdata,r)[0],i=ZVt(e,["ANGLE_instanced_arrays","OES_element_index_uint"],UNe);i&&(t._hasOnlyLargeSploms&&kK(e),r.plot(e,{},n))}function JVt(e){var t=e.calcdata,r=e._fullLayout;r._hasOnlyLargeSploms&&kK(e);for(var n=0;n{"use strict";var HNe=qNe();HNe.basePlotModule=GNe(),jNe.exports=HNe});var ZNe=ye(($_r,XNe)=>{"use strict";XNe.exports=WNe()});var PK=ye((Q_r,YNe)=>{"use strict";var tGt=Tu(),CK=Rd(),LK=ec(),rGt=Cc().attributes,Bz=Ao().extendFlat,iGt=vl().templatedArray;YNe.exports={domain:rGt({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:LK({editType:"plot"}),tickfont:LK({autoShadowDflt:!0,editType:"plot"}),rangefont:LK({editType:"plot"}),dimensions:iGt("dimension",{label:{valType:"string",editType:"plot"},tickvals:Bz({},CK.tickvals,{editType:"plot"}),ticktext:Bz({},CK.ticktext,{editType:"plot"}),tickformat:Bz({},CK.tickformat,{editType:"plot"}),visible:{valType:"boolean",dflt:!0,editType:"plot"},range:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},constraintrange:{valType:"info_array",freeLength:!0,dimensions:"1-2",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},multiselect:{valType:"boolean",dflt:!0,editType:"plot"},values:{valType:"data_array",editType:"calc"},editType:"calc"}),line:Bz({editType:"calc"},tGt("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"})),unselected:{line:{color:{valType:"color",dflt:"#7f7f7f",editType:"plot"},opacity:{valType:"number",min:0,max:1,dflt:"auto",editType:"plot"},editType:"plot"},editType:"plot"}}});var Bk=ye((exr,KNe)=>{"use strict";KNe.exports={maxDimensionCount:60,overdrag:45,verticalPadding:2,tickDistance:50,canvasPixelRatio:1,blockLineCount:5e3,layers:["contextLineLayer","focusLineLayer","pickLineLayer"],axisTitleOffset:28,axisExtentOffset:10,bar:{width:4,captureWidth:10,fillColor:"magenta",fillOpacity:1,snapDuration:150,snapRatio:.25,snapClose:.01,strokeOpacity:1,strokeWidth:1,handleHeight:8,handleOpacity:1,handleOverlap:0},cn:{axisExtentText:"axis-extent-text",parcoordsLineLayers:"parcoords-line-layers",parcoordsLineLayer:"parcoords-lines",parcoords:"parcoords",parcoordsControlView:"parcoords-control-view",yAxis:"y-axis",axisOverlays:"axis-overlays",axis:"axis",axisHeading:"axis-heading",axisTitle:"axis-title",axisExtent:"axis-extent",axisExtentTop:"axis-extent-top",axisExtentTopText:"axis-extent-top-text",axisExtentBottom:"axis-extent-bottom",axisExtentBottomText:"axis-extent-bottom-text",axisBrush:"axis-brush"},id:{filterBarPattern:"filter-bar-pattern"}}});var iy=ye((txr,$Ne)=>{"use strict";var nGt=ZS();function JNe(e){return[e]}$Ne.exports={keyFun:function(e){return e.key},repeat:JNe,descend:nGt,wrap:JNe,unwrap:function(e){return e[0]}}});var DK=ye((rxr,uUe)=>{"use strict";var Th=Bk(),im=qa(),aGt=iy().keyFun,Nz=iy().repeat,A5=Pr().sorterAsc,oGt=Pr().strTranslate,QNe=Th.bar.snapRatio;function eUe(e,t){return e*(1-QNe)+t*QNe}var tUe=Th.bar.snapClose;function sGt(e,t){return e*(1-tUe)+t*tUe}function Vz(e,t,r,n){if(lGt(r,n))return r;var i=e?-1:1,a=0,o=t.length-1;if(i<0){var s=a;a=o,o=s}for(var l=t[a],u=l,c=a;i*c=t[r][0]&&e<=t[r][1])return!0;return!1}function uGt(e){e.attr("x",-Th.bar.captureWidth/2).attr("width",Th.bar.captureWidth)}function cGt(e){e.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function fGt(e){if(!e.brush.filterSpecified)return"0,"+e.height;for(var t=rUe(e.brush.filter.getConsolidated(),e.height),r=[0],n,i,a,o=t.length?t[0][0]:null,s=0;se[1]+r||t=.9*e[1]+.1*e[0]?"n":t<=.9*e[0]+.1*e[1]?"s":"ns"}function iUe(){im.select(document.body).style("cursor",null)}function RK(e){e.attr("stroke-dasharray",fGt)}function Uz(e,t){var r=im.select(e).selectAll(".highlight, .highlight-shadow"),n=t?r.transition().duration(Th.bar.snapDuration).each("end",t):r;RK(n)}function nUe(e,t){var r=e.brush,n=r.filterSpecified,i=NaN,a={},o;if(n){var s=e.height,l=r.filter.getConsolidated(),u=rUe(l,s),c=NaN,f=NaN,h=NaN;for(o=0;o<=u.length;o++){var d=u[o];if(d&&d[0]<=t&&t<=d[1]){c=o;break}else if(f=o?o-1:NaN,d&&d[0]>t){h=o;break}}if(i=c,isNaN(i)&&(isNaN(f)||isNaN(h)?i=isNaN(f)?h:f:i=t-u[f][1]=k[0]&&p<=k[1]){a.clickableOrdinalRange=k;break}}}return a}function dGt(e,t){im.event.sourceEvent.stopPropagation();var r=t.height-im.mouse(e)[1]-2*Th.verticalPadding,n=t.unitToPaddedPx.invert(r),i=t.brush,a=nUe(t,r),o=a.interval,s=i.svgBrush;if(s.wasDragged=!1,s.grabbingBar=a.region==="ns",s.grabbingBar){var l=o.map(t.unitToPaddedPx);s.grabPoint=r-l[0]-Th.verticalPadding,s.barLength=l[1]-l[0]}s.clickableOrdinalRange=a.clickableOrdinalRange,s.stayingIntervals=t.multiselect&&i.filterSpecified?i.filter.getConsolidated():[],o&&(s.stayingIntervals=s.stayingIntervals.filter(function(u){return u[0]!==o[0]&&u[1]!==o[1]})),s.startExtent=a.region?o[a.region==="s"?1:0]:n,t.parent.inBrushDrag=!0,s.brushStartCallback()}function aUe(e,t){im.event.sourceEvent.stopPropagation();var r=t.height-im.mouse(e)[1]-2*Th.verticalPadding,n=t.brush.svgBrush;n.wasDragged=!0,n._dragging=!0,n.grabbingBar?n.newExtent=[r-n.grabPoint,r+n.barLength-n.grabPoint].map(t.unitToPaddedPx.invert):n.newExtent=[n.startExtent,t.unitToPaddedPx.invert(r)].sort(A5),t.brush.filterSpecified=!0,n.extent=n.stayingIntervals.concat([n.newExtent]),n.brushCallback(t),Uz(e.parentNode)}function vGt(e,t){var r=t.brush,n=r.filter,i=r.svgBrush;i._dragging||(oUe(e,t),aUe(e,t),t.brush.svgBrush.wasDragged=!1),i._dragging=!1;var a=im.event;a.sourceEvent.stopPropagation();var o=i.grabbingBar;if(i.grabbingBar=!1,i.grabLocation=void 0,t.parent.inBrushDrag=!1,iUe(),!i.wasDragged){i.wasDragged=void 0,i.clickableOrdinalRange?r.filterSpecified&&t.multiselect?i.extent.push(i.clickableOrdinalRange):(i.extent=[i.clickableOrdinalRange],r.filterSpecified=!0):o?(i.extent=i.stayingIntervals,i.extent.length===0&&IK(r)):IK(r),i.brushCallback(t),Uz(e.parentNode),i.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);return}var s=function(){n.set(n.getConsolidated())};if(t.ordinal){var l=t.unitTickvals;l[l.length-1]i.newExtent[0];i.extent=i.stayingIntervals.concat(u?[i.newExtent]:[]),i.extent.length||IK(r),i.brushCallback(t),u?Uz(e.parentNode,s):(s(),Uz(e.parentNode))}else s();i.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}function oUe(e,t){var r=t.height-im.mouse(e)[1]-2*Th.verticalPadding,n=nUe(t,r),i="crosshair";n.clickableOrdinalRange?i="pointer":n.region&&(i=n.region+"-resize"),im.select(document.body).style("cursor",i)}function pGt(e){e.on("mousemove",function(t){im.event.preventDefault(),t.parent.inBrushDrag||oUe(this,t)}).on("mouseleave",function(t){t.parent.inBrushDrag||iUe()}).call(im.behavior.drag().on("dragstart",function(t){dGt(this,t)}).on("drag",function(t){aUe(this,t)}).on("dragend",function(t){vGt(this,t)}))}function sUe(e,t){return e[0]-t[0]}function gGt(e,t,r){var n=r._context.staticPlot,i=e.selectAll(".background").data(Nz);i.enter().append("rect").classed("background",!0).call(uGt).call(cGt).style("pointer-events",n?"none":"auto").attr("transform",oGt(0,Th.verticalPadding)),i.call(pGt).attr("height",function(s){return s.height-Th.verticalPadding});var a=e.selectAll(".highlight-shadow").data(Nz);a.enter().append("line").classed("highlight-shadow",!0).attr("x",-Th.bar.width/2).attr("stroke-width",Th.bar.width+Th.bar.strokeWidth).attr("stroke",t).attr("opacity",Th.bar.strokeOpacity).attr("stroke-linecap","butt"),a.attr("y1",function(s){return s.height}).call(RK);var o=e.selectAll(".highlight").data(Nz);o.enter().append("line").classed("highlight",!0).attr("x",-Th.bar.width/2).attr("stroke-width",Th.bar.width-Th.bar.strokeWidth).attr("stroke",Th.bar.fillColor).attr("opacity",Th.bar.fillOpacity).attr("stroke-linecap","butt"),o.attr("y1",function(s){return s.height}).call(RK)}function mGt(e,t,r){var n=e.selectAll("."+Th.cn.axisBrush).data(Nz,aGt);n.enter().append("g").classed(Th.cn.axisBrush,!0),gGt(n,t,r)}function yGt(e){return e.svgBrush.extent.map(function(t){return t.slice()})}function IK(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function _Gt(e){return function(r){var n=r.brush,i=yGt(n),a=i.slice();n.filter.set(a),e()}}function lUe(e){for(var t=e.slice(),r=[],n,i=t.shift();i;){for(n=i.slice();(i=t.shift())&&i[0]<=n[1];)n[1]=Math.max(n[1],i[1]);r.push(n)}return r.length===1&&r[0][0]>r[0][1]&&(r=[]),r}function xGt(){var e=[],t,r;return{set:function(n){e=n.map(function(i){return i.slice().sort(A5)}).sort(sUe),e.length===1&&e[0][0]===-1/0&&e[0][1]===1/0&&(e=[[0,-1]]),t=lUe(e),r=e.reduce(function(i,a){return[Math.min(i[0],a[0]),Math.max(i[1],a[1])]},[1/0,-1/0])},get:function(){return e.slice()},getConsolidated:function(){return t},getBounds:function(){return r}}}function bGt(e,t,r,n,i,a){var o=xGt();return o.set(r),{filter:o,filterSpecified:t,svgBrush:{extent:[],brushStartCallback:n,brushCallback:_Gt(i),brushEndCallback:a}}}function wGt(e,t){if(Array.isArray(e[0])?(e=e.map(function(n){return n.sort(A5)}),t.multiselect?e=lUe(e.sort(sUe)):e=[e[0]]):e=[e.sort(A5)],t.tickvals){var r=t.tickvals.slice().sort(A5);if(e=e.map(function(n){var i=[Vz(0,r,n[0],[]),Vz(1,r,n[1],[])];if(i[1]>i[0])return i}).filter(function(n){return n}),!e.length)return}return e.length>1?e:e[0]}uUe.exports={makeBrush:bGt,ensureAxisBrush:mGt,cleanRanges:wGt}});var hUe=ye((ixr,fUe)=>{"use strict";var Mx=Pr(),TGt=pv().hasColorscale,AGt=td(),SGt=Cc().defaults,MGt=Zd(),EGt=ho(),cUe=PK(),kGt=DK(),FK=Bk().maxDimensionCount,CGt=Iz();function LGt(e,t,r,n,i){var a=i("line.color",r);if(TGt(e,"line")&&Mx.isArrayOrTypedArray(a)){if(a.length)return i("line.colorscale"),AGt(e,t,n,i,{prefix:"line.",cLetter:"c"}),a.length;t.line.color=r}return 1/0}function PGt(e,t,r,n){function i(u,c){return Mx.coerce(e,t,cUe.dimensions,u,c)}var a=i("values"),o=i("visible");if(a&&a.length||(o=t.visible=!1),o){i("label"),i("tickvals"),i("ticktext"),i("tickformat");var s=i("range");t._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:s},EGt.setConvert(t._ax,n.layout),i("multiselect");var l=i("constraintrange");l&&(t.constraintrange=kGt.cleanRanges(l,t))}}fUe.exports=function(t,r,n,i){function a(c,f){return Mx.coerce(t,r,cUe,c,f)}var o=t.dimensions;Array.isArray(o)&&o.length>FK&&(Mx.log("parcoords traces support up to "+FK+" dimensions at the moment"),o.splice(FK));var s=MGt(t,r,{name:"dimensions",layout:i,handleItemDefaults:PGt}),l=LGt(t,r,n,i,a);SGt(r,i,a),(!Array.isArray(s)||!s.length)&&(r.visible=!1),CGt(r,s,"values",l);var u=Mx.extendFlat({},i.font,{size:Math.round(i.font.size/1.2)});Mx.coerceFont(a,"labelfont",u),Mx.coerceFont(a,"tickfont",u,{autoShadowDflt:!0}),Mx.coerceFont(a,"rangefont",u),a("labelangle"),a("labelside"),a("unselected.line.color"),a("unselected.line.opacity")}});var vUe=ye((nxr,dUe)=>{"use strict";var IGt=Pr().isArrayOrTypedArray,zK=tc(),RGt=iy().wrap;dUe.exports=function(t,r){var n,i;return zK.hasColorscale(r,"line")&&IGt(r.line.color)?(n=r.line.color,i=zK.extractOpts(r.line).colorscale,zK.calc(t,r,{vals:n,containerStr:"line",cLetter:"c"})):(n=DGt(r._length),i=[[0,r.line.color],[1,r.line.color]]),RGt({lineColor:n,cscale:i})};function DGt(e){for(var t=new Array(e),r=0;r>>16,(e&65280)>>>8,e&255],alpha:1};if(typeof e=="number")return{space:"rgb",values:[e>>>16,(e&65280)>>>8,e&255],alpha:1};if(e=String(e).toLowerCase(),qK.default[e])r=qK.default[e].slice(),i="rgb";else if(e==="transparent")n=0,i="rgb",r=[0,0,0];else if(e[0]==="#"){var a=e.slice(1),o=a.length,s=o<=4;n=1,s?(r=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],o===4&&(n=parseInt(a[3]+a[3],16)/255)):(r=[parseInt(a[0]+a[1],16),parseInt(a[2]+a[3],16),parseInt(a[4]+a[5],16)],o===8&&(n=parseInt(a[6]+a[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),i="rgb"}else if(t=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(e)){var l=t[1];i=l.replace(/a$/,"");var u=i==="cmyk"?4:i==="gray"?1:3;r=t[2].trim().split(/\s*[,\/]\s*|\s+/),i==="color"&&(i=r.shift()),r=r.map(function(h,d){if(h[h.length-1]==="%")return h=parseFloat(h)/100,d===3?h:i==="rgb"?h*255:i[0]==="h"||i[0]==="l"&&!d?h*100:i==="lab"?h*125:i==="lch"?d<2?h*150:h*360:i[0]==="o"&&!d?h:i==="oklab"?h*.4:i==="oklch"?d<2?h*.4:h*360:h;if(i[d]==="h"||d===2&&i[i.length-1]==="h"){if(pUe[h]!==void 0)return pUe[h];if(h.endsWith("deg"))return parseFloat(h);if(h.endsWith("turn"))return parseFloat(h)*360;if(h.endsWith("grad"))return parseFloat(h)*360/400;if(h.endsWith("rad"))return parseFloat(h)*180/Math.PI}return h==="none"?0:parseFloat(h)}),n=r.length>u?r.pop():1}else/[0-9](?:\s|\/|,)/.test(e)&&(r=e.match(/([0-9]+)/g).map(function(h){return parseFloat(h)}),i=((f=(c=e.match(/([a-z])/ig))==null?void 0:c.join(""))==null?void 0:f.toLowerCase())||"rgb");return{space:i,values:r,alpha:n}}var qK,gUe,pUe,mUe=gu(()=>{qK=Mtt(TX(),1),gUe=FGt,pUe={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}});var Nk,OK=gu(()=>{Nk={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}});var Gz,yUe=gu(()=>{OK();Gz={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100,i,a,o,s,l,u=0;if(r===0)return l=n*255,[l,l,l];for(a=n<.5?n*(1+r):n+r-n*r,i=2*n-a,s=[0,0,0];u<3;)o=t+1/3*-(u-1),o<0?o++:o>1&&o--,l=6*o<1?i+(a-i)*6*o:2*o<1?a:3*o<2?i+(a-i)*(2/3-o)*6:i,s[u++]=l*255;return s}};Nk.hsl=function(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=a-i,s,l,u;return a===i?s=0:t===a?s=(r-n)/o:r===a?s=2+(n-t)/o:n===a&&(s=4+(t-r)/o),s=Math.min(s*60,360),s<0&&(s+=360),u=(i+a)/2,a===i?l=0:u<=.5?l=o/(a+i):l=o/(2-a-i),[s,l*100,u*100]}});var xUe={};mee(xUe,{default:()=>_Ue});function _Ue(e){Array.isArray(e)&&e.raw&&(e=String.raw(...arguments)),e instanceof Number&&(e=+e);var t,r,n,i=gUe(e);if(!i.space)return[];let a=i.space[0]==="h"?Gz.min:Nk.min,o=i.space[0]==="h"?Gz.max:Nk.max;return t=Array(3),t[0]=Math.min(Math.max(i.values[0],a[0]),o[0]),t[1]=Math.min(Math.max(i.values[1],a[1]),o[1]),t[2]=Math.min(Math.max(i.values[2],a[2]),o[2]),i.space[0]==="h"&&(t=Gz.rgb(t)),t.push(Math.min(Math.max(i.alpha,0),1)),t}var bUe=gu(()=>{mUe();OK();yUe()});var BK=ye(Hz=>{"use strict";var zGt=Pr().isTypedArray;Hz.convertTypedArray=function(e){return zGt(e)?Array.prototype.slice.call(e):e};Hz.isOrdinal=function(e){return!!e.tickvals};Hz.isVisible=function(e){return e.visible||!("visible"in e)}});var PUe=ye((dxr,LUe)=>{"use strict";var qGt=["precision highp float;","","varying vec4 fragColor;","","attribute vec4 p01_04, p05_08, p09_12, p13_16,"," p17_20, p21_24, p25_28, p29_32,"," p33_36, p37_40, p41_44, p45_48,"," p49_52, p53_56, p57_60, colors;","","uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,"," loA, hiA, loB, hiB, loC, hiC, loD, hiD;","","uniform vec2 resolution, viewBoxPos, viewBoxSize;","uniform float maskHeight;","uniform float drwLayer; // 0: context, 1: focus, 2: pick","uniform vec4 contextColor;","uniform sampler2D maskTexture, palette;","","bool isPick = (drwLayer > 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {"," return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {"," float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);"," float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);"," return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {"," return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {"," return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {"," return ("," fOutside(p[0], lo[0], hi[0]) ||"," fOutside(p[1], lo[1], hi[1]) ||"," fOutside(p[2], lo[2], hi[2]) ||"," fOutside(p[3], lo[3], hi[3])"," );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {"," return ("," vOutside(p[0], lo[0], hi[0]) ||"," vOutside(p[1], lo[1], hi[1]) ||"," vOutside(p[2], lo[2], hi[2]) ||"," vOutside(p[3], lo[3], hi[3])"," );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {"," return mOutside(A, loA, hiA) ||"," mOutside(B, loB, hiB) ||"," mOutside(C, loC, hiC) ||"," mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {"," mat4 pnts[4];"," pnts[0] = A;"," pnts[1] = B;"," pnts[2] = C;"," pnts[3] = D;",""," for(int i = 0; i < 4; ++i) {"," for(int j = 0; j < 4; ++j) {"," for(int k = 0; k < 4; ++k) {"," if(0 == iMod("," int(255.0 * texture2D(maskTexture,"," vec2("," (float(i * 2 + j / 2) + 0.5) / 8.0,"," (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight"," ))[3]"," ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),"," 2"," )) return true;"," }"," }"," }"," return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {"," float x = 0.5 * sign(v) + 0.5;"," float y = axisY(x, A, B, C, D);"," float z = 1.0 - abs(v);",""," z += isContext ? 0.0 : 2.0 * float("," outsideBoundingBox(A, B, C, D) ||"," outsideRasterMask(A, B, C, D)"," );",""," return vec4("," 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,"," z,"," 1.0"," );","}","","void main() {"," mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);"," mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);"," mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);"," mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);",""," float v = colors[3];",""," gl_Position = position(isContext, v, A, B, C, D);",""," fragColor ="," isContext ? vec4(contextColor) :"," isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join(` +`),OGt=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` +`),Uk=Bk().maxDimensionCount,EUe=Pr(),wUe=1e-6,jz=2048,BGt=new Uint8Array(4),TUe=new Uint8Array(4),AUe={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function NGt(e){e.read({x:0,y:0,width:1,height:1,data:BGt})}function kUe(e,t,r,n,i){var a=e._gl;a.enable(a.SCISSOR_TEST),a.scissor(t,r,n,i),e.clear({color:[0,0,0,0],depth:1})}function UGt(e,t,r,n,i,a){var o=a.key;function s(l){var u=Math.min(n,i-l*n);l===0&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],kUe(e,a.scissorX,a.scissorY,a.scissorWidth,a.viewBoxSize[1])),!r.clearOnly&&(a.count=2*u,a.offset=2*l*n,t(a),l*n+u>>8*t)%256/255}function HGt(e,t,r){for(var n=new Array(e*(Uk+4)),i=0,a=0;aZ&&(Z=S[z].dim1.canvasX,U=z);E===0&&kUe(i,0,0,u.canvasWidth,u.canvasHeight);var j=M(r);for(z=0;z{"use strict";var Od=qa(),p1=Pr(),UK=p1.isArrayOrTypedArray,qUe=p1.numberFormat,OUe=(bUe(),pb(xUe)).default,BUe=ho(),YGt=p1.strRotate,ny=p1.strTranslate,KGt=Zl(),Wz=So(),IUe=tc(),HK=iy(),ig=HK.keyFun,ay=HK.repeat,NUe=HK.unwrap,S5=BK(),Dl=Bk(),UUe=DK(),JGt=PUe();function RUe(e,t,r){return p1.aggNums(e,null,t,r)}function VUe(e,t){return jK(RUe(Math.min,e,t),RUe(Math.max,e,t))}function Xz(e){var t=e.range;return t?jK(t[0],t[1]):VUe(e.values,e._length)}function jK(e,t){return(isNaN(e)||!isFinite(e))&&(e=0),(isNaN(t)||!isFinite(t))&&(t=0),e===t&&(e===0?(e-=1,t+=1):(e*=.9,t*=1.1)),[e,t]}function $Gt(e,t){return t?function(r,n){var i=t[n];return i==null?e(r):i}:e}function QGt(e,t,r,n,i){var a=Xz(r);return n?Od.scale.ordinal().domain(n.map($Gt(qUe(r.tickformat),i))).range(n.map(function(o){var s=(o-a[0])/(a[1]-a[0]);return e-t+s*(2*t-e)})):Od.scale.linear().domain(a).range([e-t,t])}function eHt(e,t){return Od.scale.linear().range([t,e-t])}function tHt(e,t){return Od.scale.linear().domain(Xz(e)).range([t,1-t])}function rHt(e){if(e.tickvals){var t=Xz(e);return Od.scale.ordinal().domain(e.tickvals).range(e.tickvals.map(function(r){return(r-t[0])/(t[1]-t[0])}))}}function iHt(e){var t=e.map(function(a){return a[0]}),r=e.map(function(a){var o=OUe(a[1]);return Od.rgb("rgb("+o[0]+","+o[1]+","+o[2]+")")}),n=function(a){return function(o){return o[a]}},i="rgb".split("").map(function(a){return Od.scale.linear().clamp(!0).domain(t).range(r.map(n(a)))});return function(a){return i.map(function(o){return o(a)})}}function GK(e){return e.dimensions.some(function(t){return t.brush.filterSpecified})}function nHt(e,t,r){var n=NUe(t),i=n.trace,a=S5.convertTypedArray(n.lineColor),o=i.line,s={color:OUe(i.unselected.line.color),opacity:i.unselected.line.opacity},l=IUe.extractOpts(o),u=l.reversescale?IUe.flipScale(n.cscale):n.cscale,c=i.domain,f=i.dimensions,h=e.width,d=i.labelangle,v=i.labelside,m=i.labelfont,b=i.tickfont,p=i.rangefont,k=p1.extendDeepNoArrays({},o,{color:a.map(Od.scale.linear().domain(Xz({values:a,range:[l.min,l.max],_length:i._length}))),blockLineCount:Dl.blockLineCount,canvasOverdrag:Dl.overdrag*Dl.canvasPixelRatio}),M=Math.floor(h*(c.x[1]-c.x[0])),T=Math.floor(e.height*(c.y[1]-c.y[0])),L=e.margin||{l:80,r:80,t:100,b:80},x=M,C=T;return{key:r,colCount:f.filter(S5.isVisible).length,dimensions:f,tickDistance:Dl.tickDistance,unitToColor:iHt(u),lines:k,deselectedLines:s,labelAngle:d,labelSide:v,labelFont:m,tickFont:b,rangeFont:p,layoutWidth:h,layoutHeight:e.height,domain:c,translateX:c.x[0]*h,translateY:e.height-c.y[1]*e.height,pad:L,canvasWidth:x*Dl.canvasPixelRatio+2*k.canvasOverdrag,canvasHeight:C*Dl.canvasPixelRatio,width:x,height:C,canvasPixelRatio:Dl.canvasPixelRatio}}function aHt(e,t,r){var n=r.width,i=r.height,a=r.dimensions,o=r.canvasPixelRatio,s=function(h){return n*h/Math.max(1,r.colCount-1)},l=Dl.verticalPadding/i,u=eHt(i,Dl.verticalPadding),c={key:r.key,xScale:s,model:r,inBrushDrag:!1},f={};return c.dimensions=a.filter(S5.isVisible).map(function(h,d){var v=tHt(h,l),m=f[h.label];f[h.label]=(m||0)+1;var b=h.label+(m?"__"+m:""),p=h.constraintrange,k=p&&p.length;k&&!UK(p[0])&&(p=[p]);var M=k?p.map(function(q){return q.map(v)}):[[-1/0,1/0]],T=function(){var q=c;q.focusLayer&&q.focusLayer.render(q.panels,!0);var U=GK(q);!e.contextShown()&&U?(q.contextLayer&&q.contextLayer.render(q.panels,!0),e.contextShown(!0)):e.contextShown()&&!U&&(q.contextLayer&&q.contextLayer.render(q.panels,!0,!0),e.contextShown(!1))},L=h.values;L.length>h._length&&(L=L.slice(0,h._length));var x=h.tickvals,C;function S(q,U){return{val:q,text:C[U]}}function g(q,U){return q.val-U.val}if(UK(x)&&x.length){p1.isTypedArray(x)&&(x=Array.from(x)),C=h.ticktext,!UK(C)||!C.length?C=x.map(qUe(h.tickformat)):C.length>x.length?C=C.slice(0,x.length):x.length>C.length&&(x=x.slice(0,C.length));for(var P=1;P=U||N>=G)return;var H=z.lineLayer.readPixel(j,G-1-N),re=H[3]!==0,oe=re?H[2]+256*(H[1]+256*H[0]):null,_e={x:j,y:N,clientX:q.clientX,clientY:q.clientY,dataIndex:z.model.key,curveNumber:oe};oe!==v&&(re?i.hover(_e):i.unhover&&i.unhover(_e),v=oe)}}),d.style("opacity",function(z){return z.pick?0:1}),s.style("background","rgba(255, 255, 255, 0)");var b=s.selectAll("."+Dl.cn.parcoords).data(h,ig);b.exit().remove(),b.enter().append("g").classed(Dl.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),b.attr("transform",function(z){return ny(z.model.translateX,z.model.translateY)});var p=b.selectAll("."+Dl.cn.parcoordsControlView).data(ay,ig);p.enter().append("g").classed(Dl.cn.parcoordsControlView,!0),p.attr("transform",function(z){return ny(z.model.pad.l,z.model.pad.t)});var k=p.selectAll("."+Dl.cn.yAxis).data(function(z){return z.dimensions},ig);k.enter().append("g").classed(Dl.cn.yAxis,!0),p.each(function(z){VK(k,z,u)}),d.each(function(z){if(z.viewModel){!z.lineLayer||i?z.lineLayer=JGt(this,z):z.lineLayer.update(z),(z.key||z.key===0)&&(z.viewModel[z.key]=z.lineLayer);var q=!z.context||i;z.lineLayer.render(z.viewModel.panels,q)}}),k.attr("transform",function(z){return ny(z.xScale(z.xIndex),0)}),k.call(Od.behavior.drag().origin(function(z){return z}).on("drag",function(z){var q=z.parent;f.linePickActive(!1),z.x=Math.max(-Dl.overdrag,Math.min(z.model.width+Dl.overdrag,Od.event.x)),z.canvasX=z.x*z.model.canvasPixelRatio,k.sort(function(U,G){return U.x-G.x}).each(function(U,G){U.xIndex=G,U.x=z===U?U.x:U.xScale(U.xIndex),U.canvasX=U.x*U.model.canvasPixelRatio}),VK(k,q,u),k.filter(function(U){return Math.abs(z.xIndex-U.xIndex)!==0}).attr("transform",function(U){return ny(U.xScale(U.xIndex),0)}),Od.select(this).attr("transform",ny(z.x,0)),k.each(function(U,G,Z){Z===z.parent.key&&(q.dimensions[G]=U)}),q.contextLayer&&q.contextLayer.render(q.panels,!1,!GK(q)),q.focusLayer.render&&q.focusLayer.render(q.panels)}).on("dragend",function(z){var q=z.parent;z.x=z.xScale(z.xIndex),z.canvasX=z.x*z.model.canvasPixelRatio,VK(k,q,u),Od.select(this).attr("transform",function(U){return ny(U.x,0)}),q.contextLayer&&q.contextLayer.render(q.panels,!1,!GK(q)),q.focusLayer&&q.focusLayer.render(q.panels),q.pickLayer&&q.pickLayer.render(q.panels,!0),f.linePickActive(!0),i&&i.axesMoved&&i.axesMoved(q.key,q.dimensions.map(function(U){return U.crossfilterDimensionIndex}))})),k.exit().remove();var M=k.selectAll("."+Dl.cn.axisOverlays).data(ay,ig);M.enter().append("g").classed(Dl.cn.axisOverlays,!0),M.selectAll("."+Dl.cn.axis).remove();var T=M.selectAll("."+Dl.cn.axis).data(ay,ig);T.enter().append("g").classed(Dl.cn.axis,!0),T.each(function(z){var q=z.model.height/z.model.tickDistance,U=z.domainScale,G=U.domain();Od.select(this).call(Od.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(q,z.tickFormat).tickValues(z.ordinal?G:null).tickFormat(function(Z){return S5.isOrdinal(z)?Z:GUe(z.model.dimensions[z.visibleIndex],Z)}).scale(U)),Wz.font(T.selectAll("text"),z.model.tickFont)}),T.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),T.selectAll("text").style("cursor","default");var L=M.selectAll("."+Dl.cn.axisHeading).data(ay,ig);L.enter().append("g").classed(Dl.cn.axisHeading,!0);var x=L.selectAll("."+Dl.cn.axisTitle).data(ay,ig);x.enter().append("text").classed(Dl.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",a?"none":"auto"),x.text(function(z){return z.label}).each(function(z){var q=Od.select(this);Wz.font(q,z.model.labelFont),KGt.convertToTspans(q,t)}).attr("transform",function(z){var q=FUe(z.model.labelAngle,z.model.labelSide),U=Dl.axisTitleOffset;return(q.dir>0?"":ny(0,2*U+z.model.height))+YGt(q.degrees)+ny(-U*q.dx,-U*q.dy)}).attr("text-anchor",function(z){var q=FUe(z.model.labelAngle,z.model.labelSide),U=Math.abs(q.dx),G=Math.abs(q.dy);return 2*U>G?q.dir*q.dx<0?"start":"end":"middle"});var C=M.selectAll("."+Dl.cn.axisExtent).data(ay,ig);C.enter().append("g").classed(Dl.cn.axisExtent,!0);var S=C.selectAll("."+Dl.cn.axisExtentTop).data(ay,ig);S.enter().append("g").classed(Dl.cn.axisExtentTop,!0),S.attr("transform",ny(0,-Dl.axisExtentOffset));var g=S.selectAll("."+Dl.cn.axisExtentTopText).data(ay,ig);g.enter().append("text").classed(Dl.cn.axisExtentTopText,!0).call(DUe),g.text(function(z){return zUe(z,!0)}).each(function(z){Wz.font(Od.select(this),z.model.rangeFont)});var P=C.selectAll("."+Dl.cn.axisExtentBottom).data(ay,ig);P.enter().append("g").classed(Dl.cn.axisExtentBottom,!0),P.attr("transform",function(z){return ny(0,z.model.height+Dl.axisExtentOffset)});var E=P.selectAll("."+Dl.cn.axisExtentBottomText).data(ay,ig);E.enter().append("text").classed(Dl.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(DUe),E.text(function(z){return zUe(z,!1)}).each(function(z){Wz.font(Od.select(this),z.model.rangeFont)}),UUe.ensureAxisBrush(M,c,t)}});var XK=ye((WK,YUe)=>{"use strict";var lHt=jUe(),uHt=Lz(),WUe=BK().isVisible,ZUe={};function XUe(e,t,r){var n=t.indexOf(r),i=e.indexOf(n);return i===-1&&(i+=t.length),i}function cHt(e,t){return function(n,i){return XUe(e,t,n)-XUe(e,t,i)}}var WK=YUe.exports=function(t,r){var n=t._fullLayout,i=uHt(t,[],ZUe);if(i){var a={},o={},s={},l={},u=n._size;r.forEach(function(v,m){var b=v[0].trace;s[m]=b.index;var p=l[m]=b.index;a[m]=t.data[p].dimensions,o[m]=t.data[p].dimensions.slice()});var c=function(v,m,b){var p=o[v][m],k=b.map(function(S){return S.slice()}),M="dimensions["+m+"].constraintrange",T=n._tracePreGUI[t._fullData[s[v]]._fullInput.uid];if(T[M]===void 0){var L=p.constraintrange;T[M]=L||null}var x=t._fullData[s[v]].dimensions[m];k.length?(k.length===1&&(k=k[0]),p.constraintrange=k,x.constraintrange=k.slice(),k=[k]):(delete p.constraintrange,delete x.constraintrange,k=null);var C={};C[M]=k,t.emit("plotly_restyle",[C,[l[v]]])},f=function(v){t.emit("plotly_hover",v)},h=function(v){t.emit("plotly_unhover",v)},d=function(v,m){var b=cHt(m,o[v].filter(WUe));a[v].sort(b),o[v].filter(function(p){return!WUe(p)}).sort(function(p){return o[v].indexOf(p)}).forEach(function(p){a[v].splice(a[v].indexOf(p),1),a[v].splice(o[v].indexOf(p),0,p)}),t.emit("plotly_restyle",[{dimensions:[a[v]]},[l[v]]])};lHt(t,r,{width:u.w,height:u.h,margin:{t:u.t,r:u.r,b:u.b,l:u.l}},{filterChanged:c,hover:f,unhover:h,axesMoved:d})}};WK.reglPrecompiled=ZUe});var JUe=ye(Vk=>{"use strict";var KUe=qa(),fHt=Id().getModuleCalcData,hHt=XK(),dHt=Wp();Vk.name="parcoords";Vk.plot=function(e){var t=fHt(e.calcdata,"parcoords")[0];t.length&&hHt(e,t)};Vk.clean=function(e,t,r,n){var i=n._has&&n._has("parcoords"),a=t._has&&t._has("parcoords");i&&!a&&(n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())};Vk.toSVG=function(e){var t=e._fullLayout._glimages,r=KUe.select(e).selectAll(".svg-container"),n=r.filter(function(a,o){return o===r.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function i(){var a=this,o=a.toDataURL("image/png"),s=t.append("svg:image");s.attr({xmlns:dHt.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:a.style.width,height:a.style.height})}n.each(i),window.setTimeout(function(){KUe.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}});var QUe=ye((gxr,$Ue)=>{"use strict";$Ue.exports={attributes:PK(),supplyDefaults:hUe(),calc:vUe(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:JUe(),categories:["gl","regl","noOpacity","noHover"],meta:{}}});var rVe=ye((mxr,tVe)=>{"use strict";var eVe=QUe();eVe.plot=XK();tVe.exports=eVe});var nVe=ye((yxr,iVe)=>{"use strict";iVe.exports=rVe()});var ZK=ye((_xr,uVe)=>{"use strict";var oVe=Ao().extendFlat,vHt=Gl(),aVe=ec(),pHt=Tu(),{hovertemplateAttrs:sVe,templatefallbackAttrs:lVe}=Ll(),gHt=Cc().attributes,mHt=oVe({editType:"calc"},pHt("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:sVe({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:lVe({editType:"plot"})});uVe.exports={domain:gHt({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:oVe({},vHt.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:sVe({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:lVe({editType:"plot"}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:aVe({editType:"calc"}),tickfont:aVe({autoShadowDflt:!0,editType:"calc"}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},values:{valType:"data_array",dflt:[],editType:"calc"},displayindex:{valType:"integer",editType:"calc"},editType:"calc",visible:{valType:"boolean",dflt:!0,editType:"calc"}},line:mHt,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc"},customdata:void 0,hoverlabel:void 0,ids:void 0,legend:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}});var hVe=ye((xxr,fVe)=>{"use strict";var M5=Pr(),yHt=pv().hasColorscale,_Ht=td(),xHt=Cc().defaults,bHt=Zd(),cVe=ZK(),wHt=Iz(),THt=vv().isTypedArraySpec;function AHt(e,t,r,n,i){i("line.shape"),i("line.hovertemplate"),i("line.hovertemplatefallback");var a=i("line.color",n.colorway[0]);if(yHt(e,"line")&&M5.isArrayOrTypedArray(a)){if(a.length)return i("line.colorscale"),_Ht(e,t,n,i,{prefix:"line.",cLetter:"c"}),a.length;t.line.color=r}return 1/0}function SHt(e,t){function r(u,c){return M5.coerce(e,t,cVe.dimensions,u,c)}var n=r("values"),i=r("visible");if(n&&n.length||(i=t.visible=!1),i){r("label"),r("displayindex",t._index);var a=e.categoryarray,o=M5.isArrayOrTypedArray(a)&&a.length>0||THt(a),s;o&&(s="array");var l=r("categoryorder",s);l==="array"?(r("categoryarray"),r("ticktext")):(delete e.categoryarray,delete e.ticktext),!o&&l==="array"&&(t.categoryorder="trace")}}fVe.exports=function(t,r,n,i){function a(u,c){return M5.coerce(t,r,cVe,u,c)}var o=bHt(t,r,{name:"dimensions",handleItemDefaults:SHt}),s=AHt(t,r,n,i,a);xHt(r,i,a),(!Array.isArray(o)||!o.length)&&(r.visible=!1),wHt(r,o,"values",s),a("hoveron"),a("hovertemplate"),a("hovertemplatefallback"),a("arrangement"),a("bundlecolors"),a("sortpaths"),a("counts");var l=i.font;M5.coerceFont(a,"labelfont",l,{overrideDflt:{size:Math.round(l.size)}}),M5.coerceFont(a,"tickfont",l,{autoShadowDflt:!0,overrideDflt:{size:Math.round(l.size/1.2)}})}});var vVe=ye((bxr,dVe)=>{"use strict";var MHt=iy().wrap,EHt=pv().hasColorscale,kHt=gv(),CHt=tO(),LHt=So(),Gk=Pr(),PHt=Eo();dVe.exports=function(t,r){var n=Gk.filterVisible(r.dimensions);if(n.length===0)return[];var i=n.map(function(g){var P;if(g.categoryorder==="trace")P=null;else if(g.categoryorder==="array")P=g.categoryarray;else{P=CHt(g.values);for(var E=!0,z=0;z=e.length||t[e[r]]!==void 0)return!1;t[e[r]]=!0}return!0}});var TVe=ye((wxr,wVe)=>{"use strict";var Fl=qa(),VHt=(H2(),pb(G2)).interpolateNumber,GHt=ZP(),Wk=vf(),Ex=Pr(),Hk=Ex.strTranslate,pVe=So(),YK=fd(),HHt=Zl();function jHt(e,t,r,n){var i=t._context.staticPlot,a=e.map(ojt.bind(0,t,r)),o=n.selectAll("g.parcatslayer").data([null]);o.enter().append("g").attr("class","parcatslayer").style("pointer-events",i?"none":"all");var s=o.selectAll("g.trace.parcats").data(a,g1),l=s.enter().append("g").attr("class","trace parcats");s.attr("transform",function(k){return Hk(k.x,k.y)}),l.append("g").attr("class","paths");var u=s.select("g.paths"),c=u.selectAll("path.path").data(function(k){return k.paths},g1);c.attr("fill",function(k){return k.model.color});var f=c.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(k){return k.model.color}).attr("fill-opacity",0);$K(f),c.attr("d",function(k){return k.svgD}),f.empty()||c.sort(KK),c.exit().remove(),c.on("mouseover",WHt).on("mouseout",XHt).on("click",ZHt),l.append("g").attr("class","dimensions");var h=s.select("g.dimensions"),d=h.selectAll("g.dimension").data(function(k){return k.dimensions},g1);d.enter().append("g").attr("class","dimension"),d.attr("transform",function(k){return Hk(k.x,0)}),d.exit().remove();var v=d.selectAll("g.category").data(function(k){return k.categories},g1),m=v.enter().append("g").attr("class","category");v.attr("transform",function(k){return Hk(0,k.y)}),m.append("rect").attr("class","catrect").attr("pointer-events","none"),v.select("rect.catrect").attr("fill","none").attr("width",function(k){return k.width}).attr("height",function(k){return k.height}),mVe(m);var b=v.selectAll("rect.bandrect").data(function(k){return k.bands},g1);b.each(function(){Ex.raiseToTop(this)}),b.attr("fill",function(k){return k.color});var p=b.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(k){return k.color}).attr("fill-opacity",0);b.attr("fill",function(k){return k.color}).attr("width",function(k){return k.width}).attr("height",function(k){return k.height}).attr("y",function(k){return k.y}).attr("cursor",function(k){return k.parcatsViewModel.arrangement==="fixed"?"default":k.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),eJ(p),b.exit().remove(),m.append("text").attr("class","catlabel").attr("pointer-events","none"),v.select("text.catlabel").attr("text-anchor",function(k){return jk(k)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(k){return jk(k)?k.width+5:-5}).attr("y",function(k){return k.height/2}).text(function(k){return k.model.categoryLabel}).each(function(k){pVe.font(Fl.select(this),k.parcatsViewModel.categorylabelfont),HHt.convertToTspans(Fl.select(this),t)}),m.append("text").attr("class","dimlabel"),v.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(k){return k.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(k){return k.width/2}).attr("y",-5).text(function(k,M){return M===0?k.parcatsViewModel.model.dimensions[k.model.dimensionInd].dimensionLabel:null}).each(function(k){pVe.font(Fl.select(this),k.parcatsViewModel.labelfont)}),v.selectAll("rect.bandrect").on("mouseover",tjt).on("mouseout",rjt),v.exit().remove(),d.call(Fl.behavior.drag().origin(function(k){return{x:k.x,y:0}}).on("dragstart",ijt).on("drag",njt).on("dragend",ajt)),s.each(function(k){k.traceSelection=Fl.select(this),k.pathSelection=Fl.select(this).selectAll("g.paths").selectAll("path.path"),k.dimensionSelection=Fl.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),s.exit().remove()}wVe.exports=function(e,t,r,n){jHt(r,e,n,t)};function g1(e){return e.key}function jk(e){var t=e.parcatsViewModel.dimensions.length,r=e.parcatsViewModel.dimensions[t-1].model.dimensionInd;return e.model.dimensionInd===r}function KK(e,t){return e.model.rawColor>t.model.rawColor?1:e.model.rawColor"),x=Fl.mouse(i)[0];Wk.loneHover({trace:a,x:v-s.left+l.left,y:m-s.top+l.top,text:L,color:e.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:b,idealAlign:x1&&u.displayInd===l.dimensions.length-1?(h=o.left,d="left"):(h=o.left+o.width,d="right");var v=s.model.count,m=s.model.categoryLabel,b=v/s.parcatsViewModel.model.count,p={countLabel:v,categoryLabel:m,probabilityLabel:b.toFixed(3)},k=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&k.push(["Count:",p.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&k.push(["P("+p.categoryLabel+"):",p.probabilityLabel].join(" "));var M=k.join("
");return{trace:c,x:n*(h-t.left),y:i*(f-t.top),text:M,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:d,hovertemplate:c.hovertemplate,hovertemplateLabels:p,eventData:[{data:c._input,fullData:c,count:v,category:m,probability:b}]}}function QHt(e,t,r){var n=[];return Fl.select(r.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var i=this;n.push(yVe(e,t,i))}),n}function ejt(e,t,r){e._fullLayout._calcInverseTransform(e);var n=e._fullLayout._invScaleX,i=e._fullLayout._invScaleY,a=r.getBoundingClientRect(),o=Fl.select(r).datum(),s=o.categoryViewModel,l=s.parcatsViewModel,u=l.model.dimensions[s.model.dimensionInd],c=l.trace,f=a.y+a.height/2,h,d;l.dimensions.length>1&&u.displayInd===l.dimensions.length-1?(h=a.left,d="left"):(h=a.left+a.width,d="right");var v=s.model.categoryLabel,m=o.parcatsViewModel.model.count,b=0;o.categoryViewModel.bands.forEach(function(P){P.color===o.color&&(b+=P.count)});var p=s.model.count,k=0;l.pathSelection.each(function(P){P.model.color===o.color&&(k+=P.model.count)});var M=b/m,T=b/k,L=b/p,x={countLabel:b,categoryLabel:v,probabilityLabel:M.toFixed(3)},C=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&C.push(["Count:",x.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(C.push("P(color \u2229 "+v+"): "+x.probabilityLabel),C.push("P("+v+" | color): "+T.toFixed(3)),C.push("P(color | "+v+"): "+L.toFixed(3)));var S=C.join("
"),g=YK.mostReadable(o.color,["black","white"]);return{trace:c,x:n*(h-t.left),y:i*(f-t.top),text:S,color:o.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:g,fontSize:10,idealAlign:d,hovertemplate:c.hovertemplate,hovertemplateLabels:x,eventData:[{data:c._input,fullData:c,category:v,count:m,probability:M,categorycount:p,colorcount:k,bandcolorcount:b}]}}function tjt(e){if(!e.parcatsViewModel.dragDimension&&e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var t=Fl.mouse(this)[1];if(t<-1)return;var r=e.parcatsViewModel.graphDiv,n=r._fullLayout,i=n._paperdiv.node().getBoundingClientRect(),a=e.parcatsViewModel.hoveron,o=this;if(a==="color"?($Ht(o),rJ(o,"plotly_hover",Fl.event)):(JHt(o),tJ(o,"plotly_hover",Fl.event)),e.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var s;a==="category"?s=yVe(r,i,o):a==="color"?s=ejt(r,i,o):a==="dimension"&&(s=QHt(r,i,o)),s&&Wk.loneHover(s,{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:r})}}}function rjt(e){var t=e.parcatsViewModel;if(!t.dragDimension&&($K(t.pathSelection),mVe(t.dimensionSelection.selectAll("g.category")),eJ(t.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),Wk.loneUnhover(t.graphDiv._fullLayout._hoverlayer.node()),t.pathSelection.sort(KK),t.hoverinfoItems.indexOf("skip")===-1)){var r=e.parcatsViewModel.hoveron,n=this;r==="color"?rJ(n,"plotly_unhover",Fl.event):tJ(n,"plotly_unhover",Fl.event)}}function ijt(e){e.parcatsViewModel.arrangement!=="fixed"&&(e.dragDimensionDisplayInd=e.model.displayInd,e.initialDragDimensionDisplayInds=e.parcatsViewModel.model.dimensions.map(function(t){return t.displayInd}),e.dragHasMoved=!1,e.dragCategoryDisplayInd=null,Fl.select(this).selectAll("g.category").select("rect.catrect").each(function(t){var r=Fl.mouse(this)[0],n=Fl.mouse(this)[1];-2<=r&&r<=t.width+2&&-2<=n&&n<=t.height+2&&(e.dragCategoryDisplayInd=t.model.displayInd,e.initialDragCategoryDisplayInds=e.model.categories.map(function(i){return i.displayInd}),t.model.dragY=t.y,Ex.raiseToTop(this.parentNode),Fl.select(this.parentNode).selectAll("rect.bandrect").each(function(i){i.yc.y+c.height/2&&(a.model.displayInd=c.model.displayInd,c.model.displayInd=s),e.dragCategoryDisplayInd=a.model.displayInd}if(e.dragCategoryDisplayInd===null||e.parcatsViewModel.arrangement==="freeform"){i.model.dragX=Fl.event.x;var f=e.parcatsViewModel.dimensions[r],h=e.parcatsViewModel.dimensions[n];f!==void 0&&i.model.dragXh.x&&(i.model.displayInd=h.model.displayInd,h.model.displayInd=e.dragDimensionDisplayInd),e.dragDimensionDisplayInd=i.model.displayInd}nJ(e.parcatsViewModel),iJ(e.parcatsViewModel),bVe(e.parcatsViewModel),xVe(e.parcatsViewModel)}}function ajt(e){if(e.parcatsViewModel.arrangement!=="fixed"&&e.dragDimensionDisplayInd!==null){Fl.select(this).selectAll("text").attr("font-weight","normal");var t={},r=_Ve(e.parcatsViewModel),n=e.parcatsViewModel.model.dimensions.map(function(h){return h.displayInd}),i=e.initialDragDimensionDisplayInds.some(function(h,d){return h!==n[d]});i&&n.forEach(function(h,d){var v=e.parcatsViewModel.model.dimensions[d].containerInd;t["dimensions["+v+"].displayindex"]=h});var a=!1;if(e.dragCategoryDisplayInd!==null){var o=e.model.categories.map(function(h){return h.displayInd});if(a=e.initialDragCategoryDisplayInds.some(function(h,d){return h!==o[d]}),a){var s=e.model.categories.slice().sort(function(h,d){return h.displayInd-d.displayInd}),l=s.map(function(h){return h.categoryValue}),u=s.map(function(h){return h.categoryLabel});t["dimensions["+e.model.containerInd+"].categoryarray"]=[l],t["dimensions["+e.model.containerInd+"].ticktext"]=[u],t["dimensions["+e.model.containerInd+"].categoryorder"]="array"}}if(e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!e.dragHasMoved&&e.potentialClickBand&&(e.parcatsViewModel.hoveron==="color"?rJ(e.potentialClickBand,"plotly_click",Fl.event.sourceEvent):tJ(e.potentialClickBand,"plotly_click",Fl.event.sourceEvent)),e.model.dragX=null,e.dragCategoryDisplayInd!==null){var c=e.parcatsViewModel.dimensions[e.dragDimensionDisplayInd].categories[e.dragCategoryDisplayInd];c.model.dragY=null,e.dragCategoryDisplayInd=null}e.dragDimensionDisplayInd=null,e.parcatsViewModel.dragDimension=null,e.dragHasMoved=null,e.potentialClickBand=null,nJ(e.parcatsViewModel),iJ(e.parcatsViewModel);var f=Fl.transition().duration(300).ease("cubic-in-out");f.each(function(){bVe(e.parcatsViewModel,!0),xVe(e.parcatsViewModel,!0)}).each("end",function(){(i||a)&&GHt.restyle(e.parcatsViewModel.graphDiv,t,[r])})}}function _Ve(e){for(var t,r=e.graphDiv._fullData,n=0;n=0;l--)u+="C"+o[l]+","+(t[l+1]+n)+" "+a[l]+","+(t[l]+n)+" "+(e[l]+r[l])+","+(t[l]+n),u+="l-"+r[l]+",0 ";return u+="Z",u}function iJ(e){var t=e.dimensions,r=e.model,n=t.map(function(q){return q.categories.map(function(U){return U.y})}),i=e.model.dimensions.map(function(q){return q.categories.map(function(U){return U.displayInd})}),a=e.model.dimensions.map(function(q){return q.displayInd}),o=e.dimensions.map(function(q){return q.model.dimensionInd}),s=t.map(function(q){return q.x}),l=t.map(function(q){return q.width}),u=[];for(var c in r.paths)r.paths.hasOwnProperty(c)&&u.push(r.paths[c]);function f(q){var U=q.categoryInds.map(function(Z,j){return i[j][Z]}),G=o.map(function(Z){return U[Z]});return G}u.sort(function(q,U){var G=f(q),Z=f(U);return e.sortpaths==="backward"&&(G.reverse(),Z.reverse()),G.push(q.valueInds[0]),Z.push(U.valueInds[0]),e.bundlecolors&&(G.unshift(q.rawColor),Z.unshift(U.rawColor)),GZ?1:0});for(var h=new Array(u.length),d=t[0].model.count,v=t[0].categories.map(function(q){return q.height}).reduce(function(q,U){return q+U}),m=0;m0?p=v*(b.count/d):p=0;for(var k=new Array(n.length),M=0;M1?o=(e.width-2*r-n)/(i-1):o=0,s=r,l=s+o*a;var u=[],c=e.model.maxCats,f=t.categories.length,h=8,d=t.count,v=e.height-h*(c-1),m,b,p,k,M,T=(c-f)*h/2,L=t.categories.map(function(x){return{displayInd:x.displayInd,categoryInd:x.categoryInd}});for(L.sort(function(x,C){return x.displayInd-C.displayInd}),M=0;M0?m=b.count/d*v:m=0,p={key:b.valueInds[0],model:b,width:n,height:m,y:b.dragY!==null?b.dragY:T,bands:[],parcatsViewModel:e},T=T+m+h,u.push(p);return{key:t.dimensionInd,x:t.dragX!==null?t.dragX:l,y:0,width:n,model:t,categories:u,parcatsViewModel:e,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}});var aJ=ye((Txr,AVe)=>{"use strict";var ljt=TVe();AVe.exports=function(t,r,n,i){var a=t._fullLayout,o=a._paper,s=a._size;ljt(t,o,r,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},n,i)}});var MVe=ye(Yz=>{"use strict";var ujt=Id().getModuleCalcData,cjt=aJ(),SVe="parcats";Yz.name=SVe;Yz.plot=function(e,t,r,n){var i=ujt(e.calcdata,SVe);if(i.length){var a=i[0];cjt(e,a,r,n)}};Yz.clean=function(e,t,r,n){var i=n._has&&n._has("parcats"),a=t._has&&t._has("parcats");i&&!a&&n._paperdiv.selectAll(".parcats").remove()}});var kVe=ye((Sxr,EVe)=>{"use strict";EVe.exports={attributes:ZK(),supplyDefaults:hVe(),calc:vVe(),plot:aJ(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:MVe(),categories:["noOpacity"],meta:{}}});var LVe=ye((Mxr,CVe)=>{"use strict";CVe.exports=kVe()});var m1=ye((Exr,qVe)=>{"use strict";var fjt=t_(),PVe="1.13.4",FVe='\xA9 OpenStreetMap contributors',IVe=['\xA9 Carto',FVe].join(" "),RVe=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),hjt=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),zVe={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:FVe,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:IVe,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:IVe,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:RVe,tiles:["https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:RVe,tiles:["https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:hjt,tiles:["https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"}},DVe=fjt(zVe);qVe.exports={requiredVersion:PVe,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:zVe,styleValuesNonMapbox:DVe,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install @plotly/mapbox-gl@"+PVe+"."].join(` `),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:"," Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });","More info here: https://www.mapbox.com/help/define-access-token/"].join(` -`),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",IVe.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join(` +`),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",DVe.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join(` `),multipleTokensErrorMsg:["Set multiple mapbox access token across different mapbox subplot,","using first token found as mapbox-gl does not allow multipleaccess tokens on the same page."].join(` -`),mapOnErrorMsg:"Mapbox error.",mapboxLogo:{path0:"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z",path1:"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z",path2:"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z",polygon:"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34"},styleRules:{map:"overflow:hidden;position:relative;","missing-css":"display:none;",canary:"background-color:salmon;","ctrl-bottom-left":"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;","ctrl-bottom-right":"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;",ctrl:"clear: both; pointer-events: auto; transform: translate(0, 0);","ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner":"display: none;","ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner":"display: block; margin-top:2px","ctrl-attrib.mapboxgl-compact:hover":"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;","ctrl-attrib.mapboxgl-compact::after":`content: ""; cursor: pointer; position: absolute; background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;`,"ctrl-attrib.mapboxgl-compact":"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;","ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":`display:block; width: 21px; height: 21px; background-image: url('data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E')`}}});var Zk=ye((xxr,BVe)=>{"use strict";var zVe=Dr(),OVe=ka().defaultLine,ojt=Cc().attributes,sjt=ec(),ljt=pf().textposition,ujt=mc().overrideAll,cjt=vl().templatedArray,oJ=m1(),qVe=sjt({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});qVe.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var fjt=BVe.exports=ujt({_arrayAttrRegexps:[zVe.counterRegex("mapbox",".layers",!0)],domain:ojt({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:oJ.styleValuesMapbox.concat(oJ.styleValuesNonMapbox),dflt:oJ.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:cjt("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:OVe},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:OVe}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:qVe,textposition:zVe.extendFlat({},ljt,{arrayOk:!1})}})},"plot","from-root");fjt.uirevision={valType:"any",editType:"none"}});var Kz=ye((bxr,GVe)=>{"use strict";var{hovertemplateAttrs:hjt,texttemplateAttrs:djt,templatefallbackAttrs:NVe}=Ll(),vjt=Pg(),Yk=ew(),E5=pf(),UVe=Zk(),pjt=Gl(),gjt=Tu(),fw=Ao().extendFlat,mjt=mc().overrideAll,yjt=Zk(),VVe=Yk.line,k5=Yk.marker;GVe.exports=mjt({lon:Yk.lon,lat:Yk.lat,cluster:{enabled:{valType:"boolean"},maxzoom:fw({},yjt.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:fw({},k5.opacity,{dflt:1})},mode:fw({},E5.mode,{dflt:"markers"}),text:fw({},E5.text,{}),texttemplate:djt({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:NVe({editType:"plot"}),hovertext:fw({},E5.hovertext,{}),line:{color:VVe.color,width:VVe.width},connectgaps:E5.connectgaps,marker:fw({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:k5.opacity,size:k5.size,sizeref:k5.sizeref,sizemin:k5.sizemin,sizemode:k5.sizemode},gjt("marker")),fill:Yk.fill,fillcolor:vjt(),textfont:UVe.layers.symbol.textfont,textposition:UVe.layers.symbol.textposition,below:{valType:"string"},selected:{marker:E5.selected.marker},unselected:{marker:E5.unselected.marker},hoverinfo:fw({},pjt.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:hjt(),hovertemplatefallback:NVe()},"calc","nested")});var sJ=ye((wxr,HVe)=>{"use strict";var _jt=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];HVe.exports={isSupportedFont:function(e){return _jt.indexOf(e)!==-1}}});var XVe=ye((Txr,WVe)=>{"use strict";var Kk=Dr(),lJ=Ru(),xjt=$p(),bjt=D0(),wjt=F0(),Tjt=Fg(),jVe=Kz(),Ajt=sJ().isSupportedFont;WVe.exports=function(t,r,n,i){function a(p,k){return Kk.coerce(t,r,jVe,p,k)}function o(p,k){return Kk.coerce2(t,r,jVe,p,k)}var s=Sjt(t,r,a);if(!s){r.visible=!1;return}if(a("text"),a("texttemplate"),a("texttemplatefallback"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("mode"),a("below"),lJ.hasMarkers(r)){xjt(t,r,n,i,a,{noLine:!0,noAngle:!0}),a("marker.allowoverlap"),a("marker.angle");var l=r.marker;l.symbol!=="circle"&&(Kk.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),Kk.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}lJ.hasLines(r)&&(bjt(t,r,n,i,a,{noDash:!0}),a("connectgaps"));var u=o("cluster.maxzoom"),c=o("cluster.step"),f=o("cluster.color",r.marker&&r.marker.color||n),h=o("cluster.size"),d=o("cluster.opacity"),v=u!==!1||c!==!1||f!==!1||h!==!1||d!==!1,_=a("cluster.enabled",v);if(_||lJ.hasText(r)){var b=i.font.family;wjt(t,r,i,a,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:Ajt(b)?b:"Open Sans Regular",weight:i.font.weight,style:i.font.style,size:i.font.size,color:i.font.color}})}a("fill"),r.fill!=="none"&&Tjt(t,r,n,a),Kk.coerceSelectionMarkerOpacity(r,a)};function Sjt(e,t,r){var n=r("lon")||[],i=r("lat")||[],a=Math.min(n.length,i.length);return t._length=a,a}});var uJ=ye((Axr,YVe)=>{"use strict";var ZVe=ho();YVe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=ZVe.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=ZVe.tickText(o,o.c2l(s[1]),!0).text,i}});var cJ=ye((Sxr,JVe)=>{"use strict";var KVe=Dr();JVe.exports=function(t,r){var n=t.split(" "),i=n[0],a=n[1],o=KVe.isArrayOrTypedArray(r)?KVe.mean(r):r,s=.5+o/100,l=1.5+o/100,u=["",""],c=[0,0];switch(i){case"top":u[0]="top",c[1]=-l;break;case"bottom":u[0]="bottom",c[1]=l;break}switch(a){case"left":u[1]="right",c[0]=-s;break;case"right":u[1]="left",c[0]=s;break}var f;return u[0]&&u[1]?f=u.join("-"):u[0]?f=u[0]:u[1]?f=u[1]:f="center",{anchor:f,offset:c}}});var iGe=ye((Mxr,rGe)=>{"use strict";var eGe=Eo(),av=Dr(),Mjt=fs().BADNUM,$z=cx(),$Ve=tc(),Ejt=So(),kjt=O3(),Qz=Ru(),Cjt=sJ().isSupportedFont,Ljt=cJ(),Pjt=ip().appendArrayPointValue,Ijt=Zl().NEWLINES,Rjt=Zl().BR_TAG_ALL;rGe.exports=function(t,r){var n=r[0].trace,i=n.visible===!0&&n._length!==0,a=n.fill!=="none",o=Qz.hasLines(n),s=Qz.hasMarkers(n),l=Qz.hasText(n),u=s&&n.marker.symbol==="circle",c=s&&n.marker.symbol!=="circle",f=n.cluster&&n.cluster.enabled,h=Jz("fill"),d=Jz("line"),v=Jz("circle"),_=Jz("symbol"),b={fill:h,line:d,circle:v,symbol:_};if(!i)return b;var p;if((a||o)&&(p=$z.calcTraceToLineCoords(r)),a&&(h.geojson=$z.makePolygon(p),h.layout.visibility="visible",av.extendFlat(h.paint,{"fill-color":n.fillcolor})),o&&(d.geojson=$z.makeLine(p),d.layout.visibility="visible",av.extendFlat(d.paint,{"line-width":n.line.width,"line-color":n.line.color,"line-opacity":n.opacity})),u){var k=Djt(r);v.geojson=k.geojson,v.layout.visibility="visible",f&&(v.filter=["!",["has","point_count"]],b.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":hJ(n.cluster.color,n.cluster.step),"circle-radius":hJ(n.cluster.size,n.cluster.step),"circle-opacity":hJ(n.cluster.opacity,n.cluster.step)}},b.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":QVe(n),"text-size":12}}),av.extendFlat(v.paint,{"circle-color":k.mcc,"circle-radius":k.mrc,"circle-opacity":k.mo})}if(u&&f&&(v.filter=["!",["has","point_count"]]),(c||l)&&(_.geojson=Fjt(r,t),av.extendFlat(_.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),c&&(av.extendFlat(_.layout,{"icon-size":n.marker.size/10}),"angle"in n.marker&&n.marker.angle!=="auto"&&av.extendFlat(_.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),_.layout["icon-allow-overlap"]=n.marker.allowoverlap,av.extendFlat(_.paint,{"icon-opacity":n.opacity*n.marker.opacity,"icon-color":n.marker.color})),l)){var E=(n.marker||{}).size,T=Ljt(n.textposition,E);av.extendFlat(_.layout,{"text-size":n.textfont.size,"text-anchor":T.anchor,"text-offset":T.offset,"text-font":QVe(n)}),av.extendFlat(_.paint,{"text-color":n.textfont.color,"text-opacity":n.opacity})}return b};function Jz(e){return{type:e,geojson:$z.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function Djt(e){var t=e[0].trace,r=t.marker,n=t.selectedpoints,i=av.isArrayOrTypedArray(r.color),a=av.isArrayOrTypedArray(r.size),o=av.isArrayOrTypedArray(r.opacity),s;function l(E){return t.opacity*E}function u(E){return E/2}var c;i&&($Ve.hasColorscale(t,"marker")?c=$Ve.makeColorScaleFuncFromTrace(r):c=av.identity);var f;a&&(f=kjt(t));var h;o&&(h=function(E){var T=eGe(E)?+av.constrain(E,0,1):0;return l(T)});var d=[];for(s=0;s850?s+=" Black":i>750?s+=" Extra Bold":i>650?s+=" Bold":i>550?s+=" Semi Bold":i>450?s+=" Medium":i>350?s+=" Regular":i>250?s+=" Light":i>150?s+=" Extra Light":s+=" Thin"):a.slice(0,2).join(" ")==="Open Sans"?(s="Open Sans",i>750?s+=" Extrabold":i>650?s+=" Bold":i>550?s+=" Semibold":i>350?s+=" Regular":s+=" Light"):a.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(s="Klokantech Noto Sans",a[3]==="CJK"&&(s+=" CJK"),s+=i>500?" Bold":" Regular")),o&&(s+=" Italic"),s==="Open Sans Regular Italic"?s="Open Sans Italic":s==="Open Sans Regular Bold"?s="Open Sans Bold":s==="Open Sans Regular Bold Italic"?s="Open Sans Bold Italic":s==="Klokantech Noto Sans Regular Italic"&&(s="Klokantech Noto Sans Italic"),Cjt(s)||(s=r);var l=s.split(", ");return l}});var sGe=ye((Exr,oGe)=>{"use strict";var zjt=Dr(),nGe=iGe(),C5=m1().traceLayerPrefix,ng={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function aGe(e,t,r,n){this.type="scattermapbox",this.subplot=e,this.uid=t,this.clusterEnabled=r,this.isHidden=n,this.sourceIds={fill:"source-"+t+"-fill",line:"source-"+t+"-line",circle:"source-"+t+"-circle",symbol:"source-"+t+"-symbol",cluster:"source-"+t+"-circle",clusterCount:"source-"+t+"-circle"},this.layerIds={fill:C5+t+"-fill",line:C5+t+"-line",circle:C5+t+"-circle",symbol:C5+t+"-symbol",cluster:C5+t+"-cluster",clusterCount:C5+t+"-cluster-count"},this.below=null}var Jk=aGe.prototype;Jk.addSource=function(e,t,r){var n={type:"geojson",data:t.geojson};r&&r.enabled&&zjt.extendFlat(n,{cluster:!0,clusterMaxZoom:r.maxzoom});var i=this.subplot.map.getSource(this.sourceIds[e]);i?i.setData(t.geojson):this.subplot.map.addSource(this.sourceIds[e],n)};Jk.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};Jk.addLayer=function(e,t,r){var n={type:t.type,id:this.layerIds[e],source:this.sourceIds[e],layout:t.layout,paint:t.paint};t.filter&&(n.filter=t.filter);for(var i=this.layerIds[e],a,o=this.subplot.getMapLayers(),s=0;s=0;L--){var x=T[L];i.removeLayer(u.layerIds[x])}E||i.removeSource(u.sourceIds.circle)}function h(E){for(var T=ng.nonCluster,L=0;L=0;L--){var x=T[L];i.removeLayer(u.layerIds[x]),E||i.removeSource(u.sourceIds[x])}}function v(E){l?f(E):d(E)}function _(E){s?c(E):h(E)}function b(){for(var E=s?ng.cluster:ng.nonCluster,T=0;T=0;n--){var i=r[n];t.removeLayer(this.layerIds[i]),t.removeSource(this.sourceIds[i])}};oGe.exports=function(t,r){var n=r[0].trace,i=n.cluster&&n.cluster.enabled,a=n.visible!==!0,o=new aGe(t,n.uid,i,a),s=nGe(t.gd,r),l=o.below=t.belowLookup["trace-"+n.uid],u,c,f;if(i)for(o.addSource("circle",s.circle,n.cluster),u=0;u{"use strict";var Ojt=vf(),dJ=Dr(),qjt=gT(),Bjt=dJ.fillText,Njt=fs().BADNUM,Ujt=m1().traceLayerPrefix;function Vjt(e,t,r){var n=e.cd,i=n[0].trace,a=e.xa,o=e.ya,s=e.subplot,l=[],u=Ujt+i.uid+"-circle",c=i.cluster&&i.cluster.enabled;if(c){var f=s.map.queryRenderedFeatures(null,{layers:[u]});l=f.map(function(M){return M.id})}var h=t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360),d=h*360,v=t-d;function _(M){var g=M.lonlat;if(g[0]===Njt||c&&l.indexOf(M.i+1)===-1)return 1/0;var P=dJ.modHalf(g[0],360),A=g[1],z=s.project([P,A]),O=z.x-a.c2p([v,A]),U=z.y-o.c2p([P,r]),G=Math.max(3,M.mrc||0);return Math.max(Math.sqrt(O*O+U*U)-G,1-3/G)}if(Ojt.getClosest(n,_,e),e.index!==!1){var b=n[e.index],p=b.lonlat,k=[dJ.modHalf(p[0],360)+d,p[1]],E=a.c2p(k),T=o.c2p(k),L=b.mrc||1;e.x0=E-L,e.x1=E+L,e.y0=T-L,e.y1=T+L;var x={};x[i.subplot]={_subplot:s};var C=i._module.formatLabels(b,i,x);return e.lonLabel=C.lonLabel,e.latLabel=C.latLabel,e.color=qjt(i,b),e.extraText=lGe(i,b,n[0].t.labels),e.hovertemplate=i.hovertemplate,[e]}}function lGe(e,t,r){if(e.hovertemplate)return;var n=t.hi||e.hoverinfo,i=n.split("+"),a=i.indexOf("all")!==-1,o=i.indexOf("lon")!==-1,s=i.indexOf("lat")!==-1,l=t.lonlat,u=[];function c(f){return f+"\xB0"}return a||o&&s?u.push("("+c(l[1])+", "+c(l[0])+")"):o?u.push(r.lon+c(l[0])):s&&u.push(r.lat+c(l[1])),(a||i.indexOf("text")!==-1)&&Bjt(t,e,u),u.join("
")}uGe.exports={hoverPoints:Vjt,getExtraText:lGe}});var fGe=ye((Cxr,cGe)=>{"use strict";cGe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var dGe=ye((Lxr,hGe)=>{"use strict";var Gjt=Dr(),Hjt=Ru(),jjt=fs().BADNUM;hGe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l;if(!Hjt.hasMarkers(s))return[];if(r===!1)for(l=0;l{(function(e,t){typeof vJ=="object"&&typeof pJ!="undefined"?pJ.exports=t():(e=e||self,e.mapboxgl=t())})(vJ,function(){"use strict";var e,t,r;function n(i,a){if(!e)e=a;else if(!t)t=a;else{var o="var sharedChunk = {}; ("+e+")(sharedChunk); ("+t+")(sharedChunk);",s={};e(s),r=a(s),typeof window!="undefined"&&(r.workerUrl=window.URL.createObjectURL(new Blob([o],{type:"text/javascript"})))}}return n(["exports"],function(i){"use strict";function a(m,y){return y={exports:{}},m(y,y.exports),y.exports}var o="1.13.4",s=l;function l(m,y,I,V){this.cx=3*m,this.bx=3*(I-m)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*y,this.by=3*(V-y)-this.cy,this.ay=1-this.cy-this.by,this.p1x=m,this.p1y=V,this.p2x=I,this.p2y=V}l.prototype.sampleCurveX=function(m){return((this.ax*m+this.bx)*m+this.cx)*m},l.prototype.sampleCurveY=function(m){return((this.ay*m+this.by)*m+this.cy)*m},l.prototype.sampleCurveDerivativeX=function(m){return(3*this.ax*m+2*this.bx)*m+this.cx},l.prototype.solveCurveX=function(m,y){typeof y=="undefined"&&(y=1e-6);var I,V,$,ae,he;for($=m,he=0;he<8;he++){if(ae=this.sampleCurveX($)-m,Math.abs(ae)V)return V;for(;Iae?I=$:V=$,$=(V-I)*.5+I}return $},l.prototype.solve=function(m,y){return this.sampleCurveY(this.solveCurveX(m,y))};var u=c;function c(m,y){this.x=m,this.y=y}c.prototype={clone:function(){return new c(this.x,this.y)},add:function(m){return this.clone()._add(m)},sub:function(m){return this.clone()._sub(m)},multByPoint:function(m){return this.clone()._multByPoint(m)},divByPoint:function(m){return this.clone()._divByPoint(m)},mult:function(m){return this.clone()._mult(m)},div:function(m){return this.clone()._div(m)},rotate:function(m){return this.clone()._rotate(m)},rotateAround:function(m,y){return this.clone()._rotateAround(m,y)},matMult:function(m){return this.clone()._matMult(m)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(m){return this.x===m.x&&this.y===m.y},dist:function(m){return Math.sqrt(this.distSqr(m))},distSqr:function(m){var y=m.x-this.x,I=m.y-this.y;return y*y+I*I},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(m){return Math.atan2(this.y-m.y,this.x-m.x)},angleWith:function(m){return this.angleWithSep(m.x,m.y)},angleWithSep:function(m,y){return Math.atan2(this.x*y-this.y*m,this.x*m+this.y*y)},_matMult:function(m){var y=m[0]*this.x+m[1]*this.y,I=m[2]*this.x+m[3]*this.y;return this.x=y,this.y=I,this},_add:function(m){return this.x+=m.x,this.y+=m.y,this},_sub:function(m){return this.x-=m.x,this.y-=m.y,this},_mult:function(m){return this.x*=m,this.y*=m,this},_div:function(m){return this.x/=m,this.y/=m,this},_multByPoint:function(m){return this.x*=m.x,this.y*=m.y,this},_divByPoint:function(m){return this.x/=m.x,this.y/=m.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var m=this.y;return this.y=this.x,this.x=-m,this},_rotate:function(m){var y=Math.cos(m),I=Math.sin(m),V=y*this.x-I*this.y,$=I*this.x+y*this.y;return this.x=V,this.y=$,this},_rotateAround:function(m,y){var I=Math.cos(m),V=Math.sin(m),$=y.x+I*(this.x-y.x)-V*(this.y-y.y),ae=y.y+V*(this.x-y.x)+I*(this.y-y.y);return this.x=$,this.y=ae,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},c.convert=function(m){return m instanceof c?m:Array.isArray(m)?new c(m[0],m[1]):m};var f=typeof self!="undefined"?self:{};function h(m,y){if(Array.isArray(m)){if(!Array.isArray(y)||m.length!==y.length)return!1;for(var I=0;I=1)return 1;var y=m*m,I=y*m;return 4*(m<.5?I:3*(m-y)+I-.75)}function _(m,y,I,V){var $=new s(m,y,I,V);return function(ae){return $.solve(ae)}}var b=_(.25,.1,.25,1);function p(m,y,I){return Math.min(I,Math.max(y,m))}function k(m,y,I){var V=I-y,$=((m-y)%V+V)%V+y;return $===y?I:$}function E(m,y,I){if(!m.length)return I(null,[]);var V=m.length,$=new Array(m.length),ae=null;m.forEach(function(he,ze){y(he,function(rt,gt){rt&&(ae=rt),$[ze]=gt,--V===0&&I(ae,$)})})}function T(m){var y=[];for(var I in m)y.push(m[I]);return y}function L(m,y){var I=[];for(var V in m)V in y||I.push(V);return I}function x(m){for(var y=[],I=arguments.length-1;I-- >0;)y[I]=arguments[I+1];for(var V=0,$=y;V<$.length;V+=1){var ae=$[V];for(var he in ae)m[he]=ae[he]}return m}function C(m,y){for(var I={},V=0;V>y/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,m)}return m()}function A(m){return m<=1?1:Math.pow(2,Math.ceil(Math.log(m)/Math.LN2))}function z(m){return m?/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(m):!1}function O(m,y){m.forEach(function(I){y[I]&&(y[I]=y[I].bind(y))})}function U(m,y){return m.indexOf(y,m.length-y.length)!==-1}function G(m,y,I){var V={};for(var $ in m)V[$]=y.call(I||this,m[$],$,m);return V}function Z(m,y,I){var V={};for(var $ in m)y.call(I||this,m[$],$,m)&&(V[$]=m[$]);return V}function j(m){return Array.isArray(m)?m.map(j):typeof m=="object"&&m?G(m,j):m}function N(m,y){for(var I=0;I=0)return!0;return!1}var H={};function re(m){H[m]||(typeof console!="undefined"&&console.warn(m),H[m]=!0)}function oe(m,y,I){return(I.y-m.y)*(y.x-m.x)>(y.y-m.y)*(I.x-m.x)}function _e(m){for(var y=0,I=0,V=m.length,$=V-1,ae=void 0,he=void 0;I@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,I={};if(m.replace(y,function($,ae,he,ze){var rt=he||ze;return I[ae]=rt?rt.toLowerCase():!0,""}),I["max-age"]){var V=parseInt(I["max-age"],10);isNaN(V)?delete I["max-age"]:I["max-age"]=V}return I}var ie=null;function Se(m){if(ie==null){var y=m.navigator?m.navigator.userAgent:null;ie=!!m.safari||!!(y&&(/\b(iPad|iPhone|iPod)\b/.test(y)||y.match("Safari")&&!y.match("Chrome")))}return ie}function Ee(m){try{var y=f[m];return y.setItem("_mapbox_test_",1),y.removeItem("_mapbox_test_"),!0}catch(I){return!1}}function Ae(m){return f.btoa(encodeURIComponent(m).replace(/%([0-9A-F]{2})/g,function(y,I){return String.fromCharCode(+("0x"+I))}))}function Be(m){return decodeURIComponent(f.atob(m).split("").map(function(y){return"%"+("00"+y.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var Pe=f.performance&&f.performance.now?f.performance.now.bind(f.performance):Date.now.bind(Date),me=f.requestAnimationFrame||f.mozRequestAnimationFrame||f.webkitRequestAnimationFrame||f.msRequestAnimationFrame,De=f.cancelAnimationFrame||f.mozCancelAnimationFrame||f.webkitCancelAnimationFrame||f.msCancelAnimationFrame,ce,je,lt={now:Pe,frame:function(y){var I=me(y);return{cancel:function(){return De(I)}}},getImageData:function(y,I){I===void 0&&(I=0);var V=f.document.createElement("canvas"),$=V.getContext("2d");if(!$)throw new Error("failed to create canvas 2d context");return V.width=y.width,V.height=y.height,$.drawImage(y,0,0,y.width,y.height),$.getImageData(-I,-I,y.width+2*I,y.height+2*I)},resolveURL:function(y){return ce||(ce=f.document.createElement("a")),ce.href=y,ce.href},hardwareConcurrency:f.navigator&&f.navigator.hardwareConcurrency||4,get devicePixelRatio(){return f.devicePixelRatio},get prefersReducedMotion(){return f.matchMedia?(je==null&&(je=f.matchMedia("(prefers-reduced-motion: reduce)")),je.matches):!1}},pt={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?this.API_URL.indexOf("https://api.mapbox.cn")===0?"https://events.mapbox.cn/events/v2":this.API_URL.indexOf("https://api.mapbox.com")===0?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},Vt={supported:!1,testSupport:$t},ot,ut=!1,Wt,Nt=!1;f.document&&(Wt=f.document.createElement("img"),Wt.onload=function(){ot&&sr(ot),ot=null,Nt=!0},Wt.onerror=function(){ut=!0,ot=null},Wt.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function $t(m){ut||!Wt||(Nt?sr(m):ot=m)}function sr(m){var y=m.createTexture();m.bindTexture(m.TEXTURE_2D,y);try{if(m.texImage2D(m.TEXTURE_2D,0,m.RGBA,m.RGBA,m.UNSIGNED_BYTE,Wt),m.isContextLost())return;Vt.supported=!0}catch(I){}m.deleteTexture(y),ut=!0}var Tr="01";function fr(){for(var m="1",y="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",I="",V=0;V<10;V++)I+=y[Math.floor(Math.random()*62)];var $=12*60*60*1e3,ae=[m,Tr,I].join(""),he=Date.now()+$;return{token:ae,tokenExpiresAt:he}}var $e=function(y,I){this._transformRequestFn=y,this._customAccessToken=I,this._createSkuToken()};$e.prototype._createSkuToken=function(){var y=fr();this._skuToken=y.token,this._skuTokenExpiresAt=y.tokenExpiresAt},$e.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},$e.prototype.transformRequest=function(y,I){return this._transformRequestFn?this._transformRequestFn(y,I)||{url:y}:{url:y}},$e.prototype.normalizeStyleURL=function(y,I){if(!St(y))return y;var V=er(y);return V.path="/styles/v1"+V.path,this._makeAPIURL(V,this._customAccessToken||I)},$e.prototype.normalizeGlyphsURL=function(y,I){if(!St(y))return y;var V=er(y);return V.path="/fonts/v1"+V.path,this._makeAPIURL(V,this._customAccessToken||I)},$e.prototype.normalizeSourceURL=function(y,I){if(!St(y))return y;var V=er(y);return V.path="/v4/"+V.authority+".json",V.params.push("secure"),this._makeAPIURL(V,this._customAccessToken||I)},$e.prototype.normalizeSpriteURL=function(y,I,V,$){var ae=er(y);return St(y)?(ae.path="/styles/v1"+ae.path+"/sprite"+I+V,this._makeAPIURL(ae,this._customAccessToken||$)):(ae.path+=""+I+V,lr(ae))},$e.prototype.normalizeTileURL=function(y,I){if(this._isSkuTokenExpired()&&this._createSkuToken(),y&&!St(y))return y;var V=er(y),$=/(\.(png|jpg)\d*)(?=$)/,ae=/^.+\/v4\//,he=lt.devicePixelRatio>=2||I===512?"@2x":"",ze=Vt.supported?".webp":"$1";V.path=V.path.replace($,""+he+ze),V.path=V.path.replace(ae,"/"),V.path="/v4"+V.path;var rt=this._customAccessToken||It(V.params)||pt.ACCESS_TOKEN;return pt.REQUIRE_ACCESS_TOKEN&&rt&&this._skuToken&&V.params.push("sku="+this._skuToken),this._makeAPIURL(V,rt)},$e.prototype.canonicalizeTileURL=function(y,I){var V="/v4/",$=/\.[\w]+$/,ae=er(y);if(!ae.path.match(/(^\/v4\/)/)||!ae.path.match($))return y;var he="mapbox://tiles/";he+=ae.path.replace(V,"");var ze=ae.params;return I&&(ze=ze.filter(function(rt){return!rt.match(/^access_token=/)})),ze.length&&(he+="?"+ze.join("&")),he},$e.prototype.canonicalizeTileset=function(y,I){for(var V=I?St(I):!1,$=[],ae=0,he=y.tiles||[];ae=0&&y.params.splice(ae,1)}if($.path!=="/"&&(y.path=""+$.path+y.path),!pt.REQUIRE_ACCESS_TOKEN)return lr(y);if(I=I||pt.ACCESS_TOKEN,!I)throw new Error("An API access token is required to use Mapbox GL. "+V);if(I[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+V);return y.params=y.params.filter(function(he){return he.indexOf("access_token")===-1}),y.params.push("access_token="+I),lr(y)};function St(m){return m.indexOf("mapbox:")===0}var Qt=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function Gt(m){return Qt.test(m)}function _t(m){return m.indexOf("sku=")>0&&Gt(m)}function It(m){for(var y=0,I=m;y=1&&f.localStorage.setItem(I,JSON.stringify(this.eventData))}catch($){re("Unable to write to LocalStorage")}},ti.prototype.processRequests=function(y){},ti.prototype.postEvent=function(y,I,V,$){var ae=this;if(pt.EVENTS_URL){var he=er(pt.EVENTS_URL);he.params.push("access_token="+($||pt.ACCESS_TOKEN||""));var ze={event:this.type,created:new Date(y).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:o,skuId:Tr,userId:this.anonId},rt=I?x(ze,I):ze,gt={url:lr(he),headers:{"Content-Type":"text/plain"},body:JSON.stringify([rt])};this.pendingRequest=Qr(gt,function(Et){ae.pendingRequest=null,V(Et),ae.saveEventData(),ae.processRequests($)})}},ti.prototype.queueRequest=function(y,I){this.queue.push(y),this.processRequests(I)};var Br=function(m){function y(){m.call(this,"map.load"),this.success={},this.skuToken=""}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.postMapLoadEvent=function(V,$,ae,he){this.skuToken=ae,(pt.EVENTS_URL&&he||pt.ACCESS_TOKEN&&Array.isArray(V)&&V.some(function(ze){return St(ze)||Gt(ze)}))&&this.queueRequest({id:$,timestamp:Date.now()},he)},y.prototype.processRequests=function(V){var $=this;if(!(this.pendingRequest||this.queue.length===0)){var ae=this.queue.shift(),he=ae.id,ze=ae.timestamp;he&&this.success[he]||(this.anonId||this.fetchEventData(),z(this.anonId)||(this.anonId=P()),this.postEvent(ze,{skuToken:this.skuToken},function(rt){rt||he&&($.success[he]=!0)},V))}},y}(ti),Vr=function(m){function y(I){m.call(this,"appUserTurnstile"),this._customAccessToken=I}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.postTurnstileEvent=function(V,$){pt.EVENTS_URL&&pt.ACCESS_TOKEN&&Array.isArray(V)&&V.some(function(ae){return St(ae)||Gt(ae)})&&this.queueRequest(Date.now(),$)},y.prototype.processRequests=function(V){var $=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var ae=Lr(pt.ACCESS_TOKEN),he=ae?ae.u:pt.ACCESS_TOKEN,ze=he!==this.eventData.tokenU;z(this.anonId)||(this.anonId=P(),ze=!0);var rt=this.queue.shift();if(this.eventData.lastSuccess){var gt=new Date(this.eventData.lastSuccess),Et=new Date(rt),or=(rt-this.eventData.lastSuccess)/(24*60*60*1e3);ze=ze||or>=1||or<-1||gt.getDate()!==Et.getDate()}else ze=!0;if(!ze)return this.processRequests();this.postEvent(rt,{"enabled.telemetry":!1},function(_r){_r||($.eventData.lastSuccess=rt,$.eventData.tokenU=he)},V)}},y}(ti),dt=new Vr,Ge=dt.postTurnstileEvent.bind(dt),Je=new Br,We=Je.postMapLoadEvent.bind(Je),tt="mapbox-tiles",xt=500,Ie=50,xe=1e3*60*7,ke;function vt(){f.caches&&!ke&&(ke=f.caches.open(tt))}var ir;function ar(m,y){if(ir===void 0)try{new Response(new ReadableStream),ir=!0}catch(I){ir=!1}ir?y(m.body):m.blob().then(y)}function vr(m,y,I){if(vt(),!!ke){var V={status:y.status,statusText:y.statusText,headers:new f.Headers};y.headers.forEach(function(he,ze){return V.headers.set(ze,he)});var $=ge(y.headers.get("Cache-Control")||"");if(!$["no-store"]){$["max-age"]&&V.headers.set("Expires",new Date(I+$["max-age"]*1e3).toUTCString());var ae=new Date(V.headers.get("Expires")).getTime()-I;aeDate.now()&&!I["no-cache"]}var di=1/0;function ji(m){di++,di>Ie&&(m.getActor().send("enforceCacheSizeLimit",xt),di=0)}function In(m){vt(),ke&&ke.then(function(y){y.keys().then(function(I){for(var V=0;V=200&&I.status<300||I.status===0)&&I.response!==null){var $=I.response;if(m.type==="json")try{$=JSON.parse(I.response)}catch(ae){return y(ae)}y(null,$,I.getResponseHeader("Cache-Control"),I.getResponseHeader("Expires"))}else y(new la(I.statusText,I.status,m.url))},I.send(m.body),{cancel:function(){return I.abort()}}}var Er=function(m,y){if(!wt(m.url)){if(f.fetch&&f.Request&&f.AbortController&&f.Request.prototype.hasOwnProperty("signal"))return rr(m,y);if(Le()&&self.worker&&self.worker.actor){var I=!0;return self.worker.actor.send("getResource",m,y,void 0,I)}}return nr(m,y)},Xr=function(m,y){return Er(x(m,{type:"json"}),y)},ri=function(m,y){return Er(x(m,{type:"arrayBuffer"}),y)},Qr=function(m,y){return Er(x(m,{method:"POST"}),y)};function Oi(m){var y=f.document.createElement("a");return y.href=m,y.protocol===f.document.location.protocol&&y.host===f.document.location.host}var $i="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function tn(m,y,I,V){var $=new f.Image,ae=f.URL;$.onload=function(){y(null,$),ae.revokeObjectURL($.src),$.onload=null,f.requestAnimationFrame(function(){$.src=$i})},$.onerror=function(){return y(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var he=new f.Blob([new Uint8Array(m)],{type:"image/png"});$.cacheControl=I,$.expires=V,$.src=m.byteLength?ae.createObjectURL(he):$i}function fn(m,y){var I=new f.Blob([new Uint8Array(m)],{type:"image/png"});f.createImageBitmap(I).then(function(V){y(null,V)}).catch(function(V){y(new Error("Could not load image because of "+V.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var yn,Sn,Ba=function(){yn=[],Sn=0};Ba();var ua=function(m,y){if(Vt.supported&&(m.headers||(m.headers={}),m.headers.accept="image/webp,*/*"),Sn>=pt.MAX_PARALLEL_IMAGE_REQUESTS){var I={requestParameters:m,callback:y,cancelled:!1,cancel:function(){this.cancelled=!0}};return yn.push(I),I}Sn++;var V=!1,$=function(){if(!V)for(V=!0,Sn--;yn.length&&Sn0||this._oneTimeListeners&&this._oneTimeListeners[y]&&this._oneTimeListeners[y].length>0||this._eventedParent&&this._eventedParent.listens(y)},Wn.prototype.setEventedParent=function(y,I){return this._eventedParent=y,this._eventedParentData=I,this};var Ha=8,vo={version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},jn={"*":{type:"source"}},Mt=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],kr={type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},Jr={type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},vi={type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},hn={type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},An={type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},Mn={type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},Li={id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},_n=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],ya={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},$n={"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Ma={"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_o={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},No={"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},po={"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Lo={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ko={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Ds={type:"array",value:"*"},Fs={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},ll={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},ul={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},zl={type:"array",value:"*",minimum:1},us={anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},il=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],As={"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},cl={"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},Ks={"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},zs={"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Io={"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},ls={"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Yl={"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Su={"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},nc={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},bs={"*":{type:"string"}},Rn={$version:Ha,$root:vo,sources:jn,source:Mt,source_vector:kr,source_raster:Jr,source_raster_dem:vi,source_geojson:hn,source_video:An,source_image:Mn,layer:Li,layout:_n,layout_background:ya,layout_fill:$n,layout_circle:Ma,layout_heatmap:_o,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:No,layout_symbol:po,layout_raster:Lo,layout_hillshade:ko,filter:Ds,filter_operator:Fs,geometry_type:ll,function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:ul,expression:zl,light:us,paint:il,paint_fill:As,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:cl,paint_circle:Ks,paint_heatmap:zs,paint_symbol:Io,paint_raster:ls,paint_hillshade:Yl,paint_background:Su,transition:nc,"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:bs},_a=function(y,I,V,$){this.message=(y?y+": ":"")+V,$&&(this.identifier=$),I!=null&&I.__line__&&(this.line=I.__line__)};function Vu(m){var y=m.key,I=m.value;return I?[new _a(y,I,"constants have been deprecated as of v8")]:[]}function Ol(m){for(var y=[],I=arguments.length-1;I-- >0;)y[I]=arguments[I+1];for(var V=0,$=y;V<$.length;V+=1){var ae=$[V];for(var he in ae)m[he]=ae[he]}return m}function xo(m){return m instanceof Number||m instanceof String||m instanceof Boolean?m.valueOf():m}function Kl(m){if(Array.isArray(m))return m.map(Kl);if(m instanceof Object&&!(m instanceof Number||m instanceof String||m instanceof Boolean)){var y={};for(var I in m)y[I]=Kl(m[I]);return y}return xo(m)}var Ns=function(m){function y(I,V){m.call(this,V),this.message=V,this.key=I}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y}(Error),Hl=function(y,I){I===void 0&&(I=[]),this.parent=y,this.bindings={};for(var V=0,$=I;V<$.length;V+=1){var ae=$[V],he=ae[0],ze=ae[1];this.bindings[he]=ze}};Hl.prototype.concat=function(y){return new Hl(this,y)},Hl.prototype.get=function(y){if(this.bindings[y])return this.bindings[y];if(this.parent)return this.parent.get(y);throw new Error(y+" not found in scope.")},Hl.prototype.has=function(y){return this.bindings[y]?!0:this.parent?this.parent.has(y):!1};var ac={kind:"null"},aa={kind:"number"},Oo={kind:"string"},qo={kind:"boolean"},ql={kind:"color"},Pc={kind:"object"},Do={kind:"value"},rf={kind:"error"},Vf={kind:"collator"},pl={kind:"formatted"},Zc={kind:"resolvedImage"};function Jl(m,y){return{kind:"array",itemType:m,N:y}}function Os(m){if(m.kind==="array"){var y=Os(m.itemType);return typeof m.N=="number"?"array<"+y+", "+m.N+">":m.itemType.kind==="value"?"array":"array<"+y+">"}else return m.kind}var yu=[ac,aa,Oo,qo,ql,pl,Pc,Jl(Do),Zc];function oc(m,y){if(y.kind==="error")return null;if(m.kind==="array"){if(y.kind==="array"&&(y.N===0&&y.itemType.kind==="value"||!oc(m.itemType,y.itemType))&&(typeof m.N!="number"||m.N===y.N))return null}else{if(m.kind===y.kind)return null;if(m.kind==="value")for(var I=0,V=yu;I255?255:gt}function $(gt){return gt<0?0:gt>1?1:gt}function ae(gt){return gt[gt.length-1]==="%"?V(parseFloat(gt)/100*255):V(parseInt(gt))}function he(gt){return gt[gt.length-1]==="%"?$(parseFloat(gt)/100):$(parseFloat(gt))}function ze(gt,Et,or){return or<0?or+=1:or>1&&(or-=1),or*6<1?gt+(Et-gt)*or*6:or*2<1?Et:or*3<2?gt+(Et-gt)*(2/3-or)*6:gt}function rt(gt){var Et=gt.replace(/ /g,"").toLowerCase();if(Et in I)return I[Et].slice();if(Et[0]==="#"){if(Et.length===4){var or=parseInt(Et.substr(1),16);return or>=0&&or<=4095?[(or&3840)>>4|(or&3840)>>8,or&240|(or&240)>>4,or&15|(or&15)<<4,1]:null}else if(Et.length===7){var or=parseInt(Et.substr(1),16);return or>=0&&or<=16777215?[(or&16711680)>>16,(or&65280)>>8,or&255,1]:null}return null}var _r=Et.indexOf("("),pr=Et.indexOf(")");if(_r!==-1&&pr+1===Et.length){var Fr=Et.substr(0,_r),oi=Et.substr(_r+1,pr-(_r+1)).split(","),Hi=1;switch(Fr){case"rgba":if(oi.length!==4)return null;Hi=he(oi.pop());case"rgb":return oi.length!==3?null:[ae(oi[0]),ae(oi[1]),ae(oi[2]),Hi];case"hsla":if(oi.length!==4)return null;Hi=he(oi.pop());case"hsl":if(oi.length!==3)return null;var Ai=(parseFloat(oi[0])%360+360)%360/360,bn=he(oi[1]),nn=he(oi[2]),xn=nn<=.5?nn*(bn+1):nn+bn-nn*bn,Pn=nn*2-xn;return[V(ze(Pn,xn,Ai+1/3)*255),V(ze(Pn,xn,Ai)*255),V(ze(Pn,xn,Ai-1/3)*255),Hi];default:return null}}return null}try{y.parseCSSColor=rt}catch(gt){}}),Lf=jh.parseCSSColor,cs=function(y,I,V,$){$===void 0&&($=1),this.r=y,this.g=I,this.b=V,this.a=$};cs.parse=function(y){if(y){if(y instanceof cs)return y;if(typeof y=="string"){var I=Lf(y);if(I)return new cs(I[0]/255*I[3],I[1]/255*I[3],I[2]/255*I[3],I[3])}}},cs.prototype.toString=function(){var y=this.toArray(),I=y[0],V=y[1],$=y[2],ae=y[3];return"rgba("+Math.round(I)+","+Math.round(V)+","+Math.round($)+","+ae+")"},cs.prototype.toArray=function(){var y=this,I=y.r,V=y.g,$=y.b,ae=y.a;return ae===0?[0,0,0,0]:[I*255/ae,V*255/ae,$*255/ae,ae]},cs.black=new cs(0,0,0,1),cs.white=new cs(1,1,1,1),cs.transparent=new cs(0,0,0,0),cs.red=new cs(1,0,0,1);var nf=function(y,I,V){y?this.sensitivity=I?"variant":"case":this.sensitivity=I?"accent":"base",this.locale=V,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};nf.prototype.compare=function(y,I){return this.collator.compare(y,I)},nf.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Gf=function(y,I,V,$,ae){this.text=y,this.image=I,this.scale=V,this.fontStack=$,this.textColor=ae},$l=function(y){this.sections=y};$l.fromString=function(y){return new $l([new Gf(y,null,null,null,null)])},$l.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(y){return y.text.length!==0||y.image&&y.image.name.length!==0})},$l.factory=function(y){return y instanceof $l?y:$l.fromString(y)},$l.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(y){return y.text}).join("")},$l.prototype.serialize=function(){for(var y=["format"],I=0,V=this.sections;I=0&&m<=255&&typeof y=="number"&&y>=0&&y<=255&&typeof I=="number"&&I>=0&&I<=255)){var $=typeof V=="number"?[m,y,I,V]:[m,y,I];return"Invalid rgba value ["+$.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof V=="undefined"||typeof V=="number"&&V>=0&&V<=1?null:"Invalid rgba value ["+[m,y,I,V].join(", ")+"]: 'a' must be between 0 and 1."}function Fu(m){if(m===null)return!0;if(typeof m=="string")return!0;if(typeof m=="boolean")return!0;if(typeof m=="number")return!0;if(m instanceof cs)return!0;if(m instanceof nf)return!0;if(m instanceof $l)return!0;if(m instanceof fl)return!0;if(Array.isArray(m)){for(var y=0,I=m;y2){var ze=y[1];if(typeof ze!="string"||!(ze in uc)||ze==="object")return I.error('The item type argument of "array" must be one of string, number, boolean',1);he=uc[ze],V++}else he=Do;var rt;if(y.length>3){if(y[2]!==null&&(typeof y[2]!="number"||y[2]<0||y[2]!==Math.floor(y[2])))return I.error('The length argument to "array" must be a positive integer literal',2);rt=y[2],V++}$=Jl(he,rt)}else $=uc[ae];for(var gt=[];V1)&&I.push($)}}return I.concat(this.args.map(function(ae){return ae.serialize()}))};var Gu=function(y){this.type=pl,this.sections=y};Gu.parse=function(y,I){if(y.length<2)return I.error("Expected at least one argument.");var V=y[1];if(!Array.isArray(V)&&typeof V=="object")return I.error("First argument must be an image or text section.");for(var $=[],ae=!1,he=1;he<=y.length-1;++he){var ze=y[he];if(ae&&typeof ze=="object"&&!Array.isArray(ze)){ae=!1;var rt=null;if(ze["font-scale"]&&(rt=I.parse(ze["font-scale"],1,aa),!rt))return null;var gt=null;if(ze["text-font"]&&(gt=I.parse(ze["text-font"],1,Jl(Oo)),!gt))return null;var Et=null;if(ze["text-color"]&&(Et=I.parse(ze["text-color"],1,ql),!Et))return null;var or=$[$.length-1];or.scale=rt,or.font=gt,or.textColor=Et}else{var _r=I.parse(y[he],1,Do);if(!_r)return null;var pr=_r.type.kind;if(pr!=="string"&&pr!=="value"&&pr!=="null"&&pr!=="resolvedImage")return I.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");ae=!0,$.push({content:_r,scale:null,font:null,textColor:null})}}return new Gu($)},Gu.prototype.evaluate=function(y){var I=function(V){var $=V.content.evaluate(y);return Es($)===Zc?new Gf("",$,null,null,null):new Gf(Hs($),null,V.scale?V.scale.evaluate(y):null,V.font?V.font.evaluate(y).join(","):null,V.textColor?V.textColor.evaluate(y):null)};return new $l(this.sections.map(I))},Gu.prototype.eachChild=function(y){for(var I=0,V=this.sections;I-1),V},qs.prototype.eachChild=function(y){y(this.input)},qs.prototype.outputDefined=function(){return!1},qs.prototype.serialize=function(){return["image",this.input.serialize()]};var od={"to-boolean":qo,"to-color":ql,"to-number":aa,"to-string":Oo},Po=function(y,I){this.type=y,this.args=I};Po.parse=function(y,I){if(y.length<2)return I.error("Expected at least one argument.");var V=y[0];if((V==="to-boolean"||V==="to-string")&&y.length!==2)return I.error("Expected one argument.");for(var $=od[V],ae=[],he=1;he4?V="Invalid rbga value "+JSON.stringify(I)+": expected an array containing either three or four numeric values.":V=lc(I[0],I[1],I[2],I[3]),!V))return new cs(I[0]/255,I[1]/255,I[2]/255,I[3])}throw new ps(V||"Could not parse color from value '"+(typeof I=="string"?I:String(JSON.stringify(I)))+"'")}else if(this.type.kind==="number"){for(var rt=null,gt=0,Et=this.args;gt=y[2]||m[1]<=y[1]||m[3]>=y[3])}function Ah(m,y){var I=Ic(m[0]),V=yf(m[1]),$=Math.pow(2,y.z);return[Math.round(I*$*bl),Math.round(V*$*bl)]}function Qf(m,y,I){var V=m[0]-y[0],$=m[1]-y[1],ae=m[0]-I[0],he=m[1]-I[1];return V*he-ae*$===0&&V*ae<=0&&$*he<=0}function _f(m,y,I){return y[1]>m[1]!=I[1]>m[1]&&m[0]<(I[0]-y[0])*(m[1]-y[1])/(I[1]-y[1])+y[0]}function Yc(m,y){for(var I=!1,V=0,$=y.length;V<$;V++)for(var ae=y[V],he=0,ze=ae.length;he0&&or<0||Et<0&&or>0}function jf(m,y,I,V){var $=[y[0]-m[0],y[1]-m[1]],ae=[V[0]-I[0],V[1]-I[1]];return th(ae,$)===0?!1:!!(ju(m,y,I,V)&&ju(I,V,m,y))}function cc(m,y,I){for(var V=0,$=I;V<$.length;V+=1)for(var ae=$[V],he=0;heI[2]){var $=V*.5,ae=m[0]-I[0]>$?-V:I[0]-m[0]>$?V:0;ae===0&&(ae=m[0]-I[2]>$?-V:I[2]-m[0]>$?V:0),m[0]+=ae}Hf(y,m)}function Wf(m){m[0]=m[1]=1/0,m[2]=m[3]=-1/0}function Wh(m,y,I,V){for(var $=Math.pow(2,V.z)*bl,ae=[V.x*bl,V.y*bl],he=[],ze=0,rt=m;ze=0)return!1;var I=!0;return m.eachChild(function(V){I&&!Eu(V,y)&&(I=!1)}),I}var Dc=function(y,I){this.type=I.type,this.name=y,this.boundExpression=I};Dc.parse=function(y,I){if(y.length!==2||typeof y[1]!="string")return I.error("'var' expression requires exactly one string literal argument.");var V=y[1];return I.scope.has(V)?new Dc(V,I.scope.get(V)):I.error('Unknown variable "'+V+'". Make sure "'+V+'" has been bound in an enclosing "let" expression before using it.',1)},Dc.prototype.evaluate=function(y){return this.boundExpression.evaluate(y)},Dc.prototype.eachChild=function(){},Dc.prototype.outputDefined=function(){return!1},Dc.prototype.serialize=function(){return["var",this.name]};var ks=function(y,I,V,$,ae){I===void 0&&(I=[]),$===void 0&&($=new Hl),ae===void 0&&(ae=[]),this.registry=y,this.path=I,this.key=I.map(function(he){return"["+he+"]"}).join(""),this.scope=$,this.errors=ae,this.expectedType=V};ks.prototype.parse=function(y,I,V,$,ae){return ae===void 0&&(ae={}),I?this.concat(I,V,$)._parse(y,ae):this._parse(y,ae)},ks.prototype._parse=function(y,I){(y===null||typeof y=="string"||typeof y=="boolean"||typeof y=="number")&&(y=["literal",y]);function V(Et,or,_r){return _r==="assert"?new xl(or,[Et]):_r==="coerce"?new Po(or,[Et]):Et}if(Array.isArray(y)){if(y.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var $=y[0];if(typeof $!="string")return this.error("Expression name must be a string, but found "+typeof $+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var ae=this.registry[$];if(ae){var he=ae.parse(y,this);if(!he)return null;if(this.expectedType){var ze=this.expectedType,rt=he.type;if((ze.kind==="string"||ze.kind==="number"||ze.kind==="boolean"||ze.kind==="object"||ze.kind==="array")&&rt.kind==="value")he=V(he,ze,I.typeAnnotation||"assert");else if((ze.kind==="color"||ze.kind==="formatted"||ze.kind==="resolvedImage")&&(rt.kind==="value"||rt.kind==="string"))he=V(he,ze,I.typeAnnotation||"coerce");else if(this.checkSubtype(ze,rt))return null}if(!(he instanceof Go)&&he.type.kind!=="resolvedImage"&&bc(he)){var gt=new Ko;try{he=new Go(he.type,he.evaluate(gt))}catch(Et){return this.error(Et.message),null}}return he}return this.error('Unknown expression "'+$+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof y=="undefined"?this.error("'undefined' value invalid. Use null instead."):typeof y=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof y+" instead.")},ks.prototype.concat=function(y,I,V){var $=typeof y=="number"?this.path.concat(y):this.path,ae=V?this.scope.concat(V):this.scope;return new ks(this.registry,$,I||null,ae,this.errors)},ks.prototype.error=function(y){for(var I=[],V=arguments.length-1;V-- >0;)I[V]=arguments[V+1];var $=""+this.key+I.map(function(ae){return"["+ae+"]"}).join("");this.errors.push(new Ns($,y))},ks.prototype.checkSubtype=function(y,I){var V=oc(y,I);return V&&this.error(V),V};function bc(m){if(m instanceof Dc)return bc(m.boundExpression);if(m instanceof Pa&&m.name==="error")return!1;if(m instanceof Hu)return!1;if(m instanceof Mu)return!1;var y=m instanceof Po||m instanceof xl,I=!0;return m.eachChild(function(V){y?I=I&&bc(V):I=I&&V instanceof Go}),I?ih(m)&&Eu(m,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function hu(m,y){for(var I=m.length-1,V=0,$=I,ae=0,he,ze;V<=$;)if(ae=Math.floor((V+$)/2),he=m[ae],ze=m[ae+1],he<=y){if(ae===I||yy)$=ae-1;else throw new ps("Input is not a number.");return 0}var _u=function(y,I,V){this.type=y,this.input=I,this.labels=[],this.outputs=[];for(var $=0,ae=V;$=ze)return I.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',gt);var or=I.parse(rt,Et,ae);if(!or)return null;ae=ae||or.type,$.push([ze,or])}return new _u(ae,V,$)},_u.prototype.evaluate=function(y){var I=this.labels,V=this.outputs;if(I.length===1)return V[0].evaluate(y);var $=this.input.evaluate(y);if($<=I[0])return V[0].evaluate(y);var ae=I.length;if($>=I[ae-1])return V[ae-1].evaluate(y);var he=hu(I,$);return V[he].evaluate(y)},_u.prototype.eachChild=function(y){y(this.input);for(var I=0,V=this.outputs;I0&&y.push(this.labels[I]),y.push(this.outputs[I].serialize());return y};function nl(m,y,I){return m*(1-I)+y*I}function nh(m,y,I){return new cs(nl(m.r,y.r,I),nl(m.g,y.g,I),nl(m.b,y.b,I),nl(m.a,y.a,I))}function Mh(m,y,I){return m.map(function(V,$){return nl(V,y[$],I)})}var zu=Object.freeze({__proto__:null,number:nl,color:nh,array:Mh}),Fc=.95047,wc=1,bd=1.08883,xf=4/29,Pf=6/29,Ou=3*Pf*Pf,bf=Pf*Pf*Pf,jl=Math.PI/180,lf=180/Math.PI;function Xh(m){return m>bf?Math.pow(m,1/3):m/Ou+xf}function If(m){return m>Pf?m*m*m:Ou*(m-xf)}function Cs(m){return 255*(m<=.0031308?12.92*m:1.055*Math.pow(m,1/2.4)-.055)}function du(m){return m/=255,m<=.04045?m/12.92:Math.pow((m+.055)/1.055,2.4)}function ku(m){var y=du(m.r),I=du(m.g),V=du(m.b),$=Xh((.4124564*y+.3575761*I+.1804375*V)/Fc),ae=Xh((.2126729*y+.7151522*I+.072175*V)/wc),he=Xh((.0193339*y+.119192*I+.9503041*V)/bd);return{l:116*ae-16,a:500*($-ae),b:200*(ae-he),alpha:m.a}}function Xf(m){var y=(m.l+16)/116,I=isNaN(m.a)?y:y+m.a/500,V=isNaN(m.b)?y:y-m.b/200;return y=wc*If(y),I=Fc*If(I),V=bd*If(V),new cs(Cs(3.2404542*I-1.5371385*y-.4985314*V),Cs(-.969266*I+1.8760108*y+.041556*V),Cs(.0556434*I-.2040259*y+1.0572252*V),m.alpha)}function Us(m,y,I){return{l:nl(m.l,y.l,I),a:nl(m.a,y.a,I),b:nl(m.b,y.b,I),alpha:nl(m.alpha,y.alpha,I)}}function wf(m){var y=ku(m),I=y.l,V=y.a,$=y.b,ae=Math.atan2($,V)*lf;return{h:ae<0?ae+360:ae,c:Math.sqrt(V*V+$*$),l:I,alpha:m.a}}function zc(m){var y=m.h*jl,I=m.c,V=m.l;return Xf({l:V,a:Math.cos(y)*I,b:Math.sin(y)*I,alpha:m.alpha})}function Wu(m,y,I){var V=y-m;return m+I*(V>180||V<-180?V-360*Math.round(V/360):V)}function Rf(m,y,I){return{h:Wu(m.h,y.h,I),c:nl(m.c,y.c,I),l:nl(m.l,y.l,I),alpha:nl(m.alpha,y.alpha,I)}}var Xu={forward:ku,reverse:Xf,interpolate:Us},uf={forward:wf,reverse:zc,interpolate:Rf},Zf=Object.freeze({__proto__:null,lab:Xu,hcl:uf}),Wl=function(y,I,V,$,ae){this.type=y,this.operator=I,this.interpolation=V,this.input=$,this.labels=[],this.outputs=[];for(var he=0,ze=ae;he1}))return I.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);$={name:"cubic-bezier",controlPoints:rt}}else return I.error("Unknown interpolation type "+String($[0]),1,0);if(y.length-1<4)return I.error("Expected at least 4 arguments, but found only "+(y.length-1)+".");if((y.length-1)%2!==0)return I.error("Expected an even number of arguments.");if(ae=I.parse(ae,2,aa),!ae)return null;var gt=[],Et=null;V==="interpolate-hcl"||V==="interpolate-lab"?Et=ql:I.expectedType&&I.expectedType.kind!=="value"&&(Et=I.expectedType);for(var or=0;or=_r)return I.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',Fr);var Hi=I.parse(pr,oi,Et);if(!Hi)return null;Et=Et||Hi.type,gt.push([_r,Hi])}return Et.kind!=="number"&&Et.kind!=="color"&&!(Et.kind==="array"&&Et.itemType.kind==="number"&&typeof Et.N=="number")?I.error("Type "+Os(Et)+" is not interpolatable."):new Wl(Et,V,$,ae,gt)},Wl.prototype.evaluate=function(y){var I=this.labels,V=this.outputs;if(I.length===1)return V[0].evaluate(y);var $=this.input.evaluate(y);if($<=I[0])return V[0].evaluate(y);var ae=I.length;if($>=I[ae-1])return V[ae-1].evaluate(y);var he=hu(I,$),ze=I[he],rt=I[he+1],gt=Wl.interpolationFactor(this.interpolation,$,ze,rt),Et=V[he].evaluate(y),or=V[he+1].evaluate(y);return this.operator==="interpolate"?zu[this.type.kind.toLowerCase()](Et,or,gt):this.operator==="interpolate-hcl"?uf.reverse(uf.interpolate(uf.forward(Et),uf.forward(or),gt)):Xu.reverse(Xu.interpolate(Xu.forward(Et),Xu.forward(or),gt))},Wl.prototype.eachChild=function(y){y(this.input);for(var I=0,V=this.outputs;I=V.length)throw new ps("Array index out of bounds: "+I+" > "+(V.length-1)+".");if(I!==Math.floor(I))throw new ps("Array index must be an integer, but found "+I+" instead.");return V[I]},Tc.prototype.eachChild=function(y){y(this.index),y(this.input)},Tc.prototype.outputDefined=function(){return!1},Tc.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var wl=function(y,I){this.type=qo,this.needle=y,this.haystack=I};wl.parse=function(y,I){if(y.length!==3)return I.error("Expected 2 arguments, but found "+(y.length-1)+" instead.");var V=I.parse(y[1],1,Do),$=I.parse(y[2],2,Do);return!V||!$?null:Cf(V.type,[qo,Oo,aa,ac,Do])?new wl(V,$):I.error("Expected first argument to be of type boolean, string, number or null, but found "+Os(V.type)+" instead")},wl.prototype.evaluate=function(y){var I=this.needle.evaluate(y),V=this.haystack.evaluate(y);if(!V)return!1;if(!sc(I,["boolean","string","number","null"]))throw new ps("Expected first argument to be of type boolean, string, number or null, but found "+Os(Es(I))+" instead.");if(!sc(V,["string","array"]))throw new ps("Expected second argument to be of type array or string, but found "+Os(Es(V))+" instead.");return V.indexOf(I)>=0},wl.prototype.eachChild=function(y){y(this.needle),y(this.haystack)},wl.prototype.outputDefined=function(){return!0},wl.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var vu=function(y,I,V){this.type=aa,this.needle=y,this.haystack=I,this.fromIndex=V};vu.parse=function(y,I){if(y.length<=2||y.length>=5)return I.error("Expected 3 or 4 arguments, but found "+(y.length-1)+" instead.");var V=I.parse(y[1],1,Do),$=I.parse(y[2],2,Do);if(!V||!$)return null;if(!Cf(V.type,[qo,Oo,aa,ac,Do]))return I.error("Expected first argument to be of type boolean, string, number or null, but found "+Os(V.type)+" instead");if(y.length===4){var ae=I.parse(y[3],3,aa);return ae?new vu(V,$,ae):null}else return new vu(V,$)},vu.prototype.evaluate=function(y){var I=this.needle.evaluate(y),V=this.haystack.evaluate(y);if(!sc(I,["boolean","string","number","null"]))throw new ps("Expected first argument to be of type boolean, string, number or null, but found "+Os(Es(I))+" instead.");if(!sc(V,["string","array"]))throw new ps("Expected second argument to be of type array or string, but found "+Os(Es(V))+" instead.");if(this.fromIndex){var $=this.fromIndex.evaluate(y);return V.indexOf(I,$)}return V.indexOf(I)},vu.prototype.eachChild=function(y){y(this.needle),y(this.haystack),this.fromIndex&&y(this.fromIndex)},vu.prototype.outputDefined=function(){return!1},vu.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var y=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),y]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var qc=function(y,I,V,$,ae,he){this.inputType=y,this.type=I,this.input=V,this.cases=$,this.outputs=ae,this.otherwise=he};qc.parse=function(y,I){if(y.length<5)return I.error("Expected at least 4 arguments, but found only "+(y.length-1)+".");if(y.length%2!==1)return I.error("Expected an even number of arguments.");var V,$;I.expectedType&&I.expectedType.kind!=="value"&&($=I.expectedType);for(var ae={},he=[],ze=2;zeNumber.MAX_SAFE_INTEGER)return Et.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof pr=="number"&&Math.floor(pr)!==pr)return Et.error("Numeric branch labels must be integer values.");if(!V)V=Es(pr);else if(Et.checkSubtype(V,Es(pr)))return null;if(typeof ae[String(pr)]!="undefined")return Et.error("Branch labels must be unique.");ae[String(pr)]=he.length}var Fr=I.parse(gt,ze,$);if(!Fr)return null;$=$||Fr.type,he.push(Fr)}var oi=I.parse(y[1],1,Do);if(!oi)return null;var Hi=I.parse(y[y.length-1],y.length-1,$);return!Hi||oi.type.kind!=="value"&&I.concat(1).checkSubtype(V,oi.type)?null:new qc(V,$,oi,ae,he,Hi)},qc.prototype.evaluate=function(y){var I=this.input.evaluate(y),V=Es(I)===this.inputType&&this.outputs[this.cases[I]]||this.otherwise;return V.evaluate(y)},qc.prototype.eachChild=function(y){y(this.input),this.outputs.forEach(y),y(this.otherwise)},qc.prototype.outputDefined=function(){return this.outputs.every(function(y){return y.outputDefined()})&&this.otherwise.outputDefined()},qc.prototype.serialize=function(){for(var y=this,I=["match",this.input.serialize()],V=Object.keys(this.cases).sort(),$=[],ae={},he=0,ze=V;he=5)return I.error("Expected 3 or 4 arguments, but found "+(y.length-1)+" instead.");var V=I.parse(y[1],1,Do),$=I.parse(y[2],2,aa);if(!V||!$)return null;if(!Cf(V.type,[Jl(Do),Oo,Do]))return I.error("Expected first argument to be of type array or string, but found "+Os(V.type)+" instead");if(y.length===4){var ae=I.parse(y[3],3,aa);return ae?new fc(V.type,V,$,ae):null}else return new fc(V.type,V,$)},fc.prototype.evaluate=function(y){var I=this.input.evaluate(y),V=this.beginIndex.evaluate(y);if(!sc(I,["string","array"]))throw new ps("Expected first argument to be of type array or string, but found "+Os(Es(I))+" instead.");if(this.endIndex){var $=this.endIndex.evaluate(y);return I.slice(V,$)}return I.slice(V)},fc.prototype.eachChild=function(y){y(this.input),y(this.beginIndex),this.endIndex&&y(this.endIndex)},fc.prototype.outputDefined=function(){return!1},fc.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var y=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),y]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function Bc(m,y){return m==="=="||m==="!="?y.kind==="boolean"||y.kind==="string"||y.kind==="number"||y.kind==="null"||y.kind==="value":y.kind==="string"||y.kind==="number"||y.kind==="value"}function At(m,y,I){return y===I}function Xt(m,y,I){return y!==I}function Cr(m,y,I){return yI}function Kr(m,y,I){return y<=I}function ki(m,y,I){return y>=I}function Xi(m,y,I,V){return V.compare(y,I)===0}function dn(m,y,I,V){return!Xi(m,y,I,V)}function wn(m,y,I,V){return V.compare(y,I)<0}function Nn(m,y,I,V){return V.compare(y,I)>0}function Yi(m,y,I,V){return V.compare(y,I)<=0}function Qi(m,y,I,V){return V.compare(y,I)>=0}function on(m,y,I){var V=m!=="=="&&m!=="!=";return function(){function $(ae,he,ze){this.type=qo,this.lhs=ae,this.rhs=he,this.collator=ze,this.hasUntypedArgument=ae.type.kind==="value"||he.type.kind==="value"}return $.parse=function(he,ze){if(he.length!==3&&he.length!==4)return ze.error("Expected two or three arguments.");var rt=he[0],gt=ze.parse(he[1],1,Do);if(!gt)return null;if(!Bc(rt,gt.type))return ze.concat(1).error('"'+rt+`" comparisons are not supported for type '`+Os(gt.type)+"'.");var Et=ze.parse(he[2],2,Do);if(!Et)return null;if(!Bc(rt,Et.type))return ze.concat(2).error('"'+rt+`" comparisons are not supported for type '`+Os(Et.type)+"'.");if(gt.type.kind!==Et.type.kind&>.type.kind!=="value"&&Et.type.kind!=="value")return ze.error("Cannot compare types '"+Os(gt.type)+"' and '"+Os(Et.type)+"'.");V&&(gt.type.kind==="value"&&Et.type.kind!=="value"?gt=new xl(Et.type,[gt]):gt.type.kind!=="value"&&Et.type.kind==="value"&&(Et=new xl(gt.type,[Et])));var or=null;if(he.length===4){if(gt.type.kind!=="string"&&Et.type.kind!=="string"&>.type.kind!=="value"&&Et.type.kind!=="value")return ze.error("Cannot use collator to compare non-string types.");if(or=ze.parse(he[3],3,Vf),!or)return null}return new $(gt,Et,or)},$.prototype.evaluate=function(he){var ze=this.lhs.evaluate(he),rt=this.rhs.evaluate(he);if(V&&this.hasUntypedArgument){var gt=Es(ze),Et=Es(rt);if(gt.kind!==Et.kind||!(gt.kind==="string"||gt.kind==="number"))throw new ps('Expected arguments for "'+m+'" to be (string, string) or (number, number), but found ('+gt.kind+", "+Et.kind+") instead.")}if(this.collator&&!V&&this.hasUntypedArgument){var or=Es(ze),_r=Es(rt);if(or.kind!=="string"||_r.kind!=="string")return y(he,ze,rt)}return this.collator?I(he,ze,rt,this.collator.evaluate(he)):y(he,ze,rt)},$.prototype.eachChild=function(he){he(this.lhs),he(this.rhs),this.collator&&he(this.collator)},$.prototype.outputDefined=function(){return!0},$.prototype.serialize=function(){var he=[m];return this.eachChild(function(ze){he.push(ze.serialize())}),he},$}()}var Fi=on("==",At,Xi),Qn=on("!=",Xt,dn),Ca=on("<",Cr,wn),Ra=on(">",Ar,Nn),La=on("<=",Kr,Yi),Na=on(">=",ki,Qi),Yn=function(y,I,V,$,ae){this.type=Oo,this.number=y,this.locale=I,this.currency=V,this.minFractionDigits=$,this.maxFractionDigits=ae};Yn.parse=function(y,I){if(y.length!==3)return I.error("Expected two arguments.");var V=I.parse(y[1],1,aa);if(!V)return null;var $=y[2];if(typeof $!="object"||Array.isArray($))return I.error("NumberFormat options argument must be an object.");var ae=null;if($.locale&&(ae=I.parse($.locale,1,Oo),!ae))return null;var he=null;if($.currency&&(he=I.parse($.currency,1,Oo),!he))return null;var ze=null;if($["min-fraction-digits"]&&(ze=I.parse($["min-fraction-digits"],1,aa),!ze))return null;var rt=null;return $["max-fraction-digits"]&&(rt=I.parse($["max-fraction-digits"],1,aa),!rt)?null:new Yn(V,ae,he,ze,rt)},Yn.prototype.evaluate=function(y){return new Intl.NumberFormat(this.locale?this.locale.evaluate(y):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(y):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(y):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(y):void 0}).format(this.number.evaluate(y))},Yn.prototype.eachChild=function(y){y(this.number),this.locale&&y(this.locale),this.currency&&y(this.currency),this.minFractionDigits&&y(this.minFractionDigits),this.maxFractionDigits&&y(this.maxFractionDigits)},Yn.prototype.outputDefined=function(){return!1},Yn.prototype.serialize=function(){var y={};return this.locale&&(y.locale=this.locale.serialize()),this.currency&&(y.currency=this.currency.serialize()),this.minFractionDigits&&(y["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(y["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),y]};var Dn=function(y){this.type=aa,this.input=y};Dn.parse=function(y,I){if(y.length!==2)return I.error("Expected 1 argument, but found "+(y.length-1)+" instead.");var V=I.parse(y[1],1);return V?V.type.kind!=="array"&&V.type.kind!=="string"&&V.type.kind!=="value"?I.error("Expected argument of type string or array, but found "+Os(V.type)+" instead."):new Dn(V):null},Dn.prototype.evaluate=function(y){var I=this.input.evaluate(y);if(typeof I=="string")return I.length;if(Array.isArray(I))return I.length;throw new ps("Expected value to be of type string or array, but found "+Os(Es(I))+" instead.")},Dn.prototype.eachChild=function(y){y(this.input)},Dn.prototype.outputDefined=function(){return!1},Dn.prototype.serialize=function(){var y=["length"];return this.eachChild(function(I){y.push(I.serialize())}),y};var Ka={"==":Fi,"!=":Qn,">":Ra,"<":Ca,">=":Na,"<=":La,array:xl,at:Tc,boolean:xl,case:cf,coalesce:Zu,collator:Hu,format:Gu,image:qs,in:wl,"index-of":vu,interpolate:Wl,"interpolate-hcl":Wl,"interpolate-lab":Wl,length:Dn,let:Oc,literal:Go,match:qc,number:xl,"number-format":Yn,object:xl,slice:fc,step:_u,string:xl,"to-boolean":Po,"to-color":Po,"to-number":Po,"to-string":Po,var:Dc,within:Mu};function bo(m,y){var I=y[0],V=y[1],$=y[2],ae=y[3];I=I.evaluate(m),V=V.evaluate(m),$=$.evaluate(m);var he=ae?ae.evaluate(m):1,ze=lc(I,V,$,he);if(ze)throw new ps(ze);return new cs(I/255*he,V/255*he,$/255*he,he)}function Zo(m,y){return m in y}function Ss(m,y){var I=y[m];return typeof I=="undefined"?null:I}function as(m,y,I,V){for(;I<=V;){var $=I+V>>1;if(y[$]===m)return!0;y[$]>m?V=$-1:I=$+1}return!1}function ws(m){return{type:m}}Pa.register(Ka,{error:[rf,[Oo],function(m,y){var I=y[0];throw new ps(I.evaluate(m))}],typeof:[Oo,[Do],function(m,y){var I=y[0];return Os(Es(I.evaluate(m)))}],"to-rgba":[Jl(aa,4),[ql],function(m,y){var I=y[0];return I.evaluate(m).toArray()}],rgb:[ql,[aa,aa,aa],bo],rgba:[ql,[aa,aa,aa,aa],bo],has:{type:qo,overloads:[[[Oo],function(m,y){var I=y[0];return Zo(I.evaluate(m),m.properties())}],[[Oo,Pc],function(m,y){var I=y[0],V=y[1];return Zo(I.evaluate(m),V.evaluate(m))}]]},get:{type:Do,overloads:[[[Oo],function(m,y){var I=y[0];return Ss(I.evaluate(m),m.properties())}],[[Oo,Pc],function(m,y){var I=y[0],V=y[1];return Ss(I.evaluate(m),V.evaluate(m))}]]},"feature-state":[Do,[Oo],function(m,y){var I=y[0];return Ss(I.evaluate(m),m.featureState||{})}],properties:[Pc,[],function(m){return m.properties()}],"geometry-type":[Oo,[],function(m){return m.geometryType()}],id:[Do,[],function(m){return m.id()}],zoom:[aa,[],function(m){return m.globals.zoom}],"heatmap-density":[aa,[],function(m){return m.globals.heatmapDensity||0}],"line-progress":[aa,[],function(m){return m.globals.lineProgress||0}],accumulated:[Do,[],function(m){return m.globals.accumulated===void 0?null:m.globals.accumulated}],"+":[aa,ws(aa),function(m,y){for(var I=0,V=0,$=y;V<$.length;V+=1){var ae=$[V];I+=ae.evaluate(m)}return I}],"*":[aa,ws(aa),function(m,y){for(var I=1,V=0,$=y;V<$.length;V+=1){var ae=$[V];I*=ae.evaluate(m)}return I}],"-":{type:aa,overloads:[[[aa,aa],function(m,y){var I=y[0],V=y[1];return I.evaluate(m)-V.evaluate(m)}],[[aa],function(m,y){var I=y[0];return-I.evaluate(m)}]]},"/":[aa,[aa,aa],function(m,y){var I=y[0],V=y[1];return I.evaluate(m)/V.evaluate(m)}],"%":[aa,[aa,aa],function(m,y){var I=y[0],V=y[1];return I.evaluate(m)%V.evaluate(m)}],ln2:[aa,[],function(){return Math.LN2}],pi:[aa,[],function(){return Math.PI}],e:[aa,[],function(){return Math.E}],"^":[aa,[aa,aa],function(m,y){var I=y[0],V=y[1];return Math.pow(I.evaluate(m),V.evaluate(m))}],sqrt:[aa,[aa],function(m,y){var I=y[0];return Math.sqrt(I.evaluate(m))}],log10:[aa,[aa],function(m,y){var I=y[0];return Math.log(I.evaluate(m))/Math.LN10}],ln:[aa,[aa],function(m,y){var I=y[0];return Math.log(I.evaluate(m))}],log2:[aa,[aa],function(m,y){var I=y[0];return Math.log(I.evaluate(m))/Math.LN2}],sin:[aa,[aa],function(m,y){var I=y[0];return Math.sin(I.evaluate(m))}],cos:[aa,[aa],function(m,y){var I=y[0];return Math.cos(I.evaluate(m))}],tan:[aa,[aa],function(m,y){var I=y[0];return Math.tan(I.evaluate(m))}],asin:[aa,[aa],function(m,y){var I=y[0];return Math.asin(I.evaluate(m))}],acos:[aa,[aa],function(m,y){var I=y[0];return Math.acos(I.evaluate(m))}],atan:[aa,[aa],function(m,y){var I=y[0];return Math.atan(I.evaluate(m))}],min:[aa,ws(aa),function(m,y){return Math.min.apply(Math,y.map(function(I){return I.evaluate(m)}))}],max:[aa,ws(aa),function(m,y){return Math.max.apply(Math,y.map(function(I){return I.evaluate(m)}))}],abs:[aa,[aa],function(m,y){var I=y[0];return Math.abs(I.evaluate(m))}],round:[aa,[aa],function(m,y){var I=y[0],V=I.evaluate(m);return V<0?-Math.round(-V):Math.round(V)}],floor:[aa,[aa],function(m,y){var I=y[0];return Math.floor(I.evaluate(m))}],ceil:[aa,[aa],function(m,y){var I=y[0];return Math.ceil(I.evaluate(m))}],"filter-==":[qo,[Oo,Do],function(m,y){var I=y[0],V=y[1];return m.properties()[I.value]===V.value}],"filter-id-==":[qo,[Do],function(m,y){var I=y[0];return m.id()===I.value}],"filter-type-==":[qo,[Oo],function(m,y){var I=y[0];return m.geometryType()===I.value}],"filter-<":[qo,[Oo,Do],function(m,y){var I=y[0],V=y[1],$=m.properties()[I.value],ae=V.value;return typeof $==typeof ae&&$":[qo,[Oo,Do],function(m,y){var I=y[0],V=y[1],$=m.properties()[I.value],ae=V.value;return typeof $==typeof ae&&$>ae}],"filter-id->":[qo,[Do],function(m,y){var I=y[0],V=m.id(),$=I.value;return typeof V==typeof $&&V>$}],"filter-<=":[qo,[Oo,Do],function(m,y){var I=y[0],V=y[1],$=m.properties()[I.value],ae=V.value;return typeof $==typeof ae&&$<=ae}],"filter-id-<=":[qo,[Do],function(m,y){var I=y[0],V=m.id(),$=I.value;return typeof V==typeof $&&V<=$}],"filter->=":[qo,[Oo,Do],function(m,y){var I=y[0],V=y[1],$=m.properties()[I.value],ae=V.value;return typeof $==typeof ae&&$>=ae}],"filter-id->=":[qo,[Do],function(m,y){var I=y[0],V=m.id(),$=I.value;return typeof V==typeof $&&V>=$}],"filter-has":[qo,[Do],function(m,y){var I=y[0];return I.value in m.properties()}],"filter-has-id":[qo,[],function(m){return m.id()!==null&&m.id()!==void 0}],"filter-type-in":[qo,[Jl(Oo)],function(m,y){var I=y[0];return I.value.indexOf(m.geometryType())>=0}],"filter-id-in":[qo,[Jl(Do)],function(m,y){var I=y[0];return I.value.indexOf(m.id())>=0}],"filter-in-small":[qo,[Oo,Jl(Do)],function(m,y){var I=y[0],V=y[1];return V.value.indexOf(m.properties()[I.value])>=0}],"filter-in-large":[qo,[Oo,Jl(Do)],function(m,y){var I=y[0],V=y[1];return as(m.properties()[I.value],V.value,0,V.value.length-1)}],all:{type:qo,overloads:[[[qo,qo],function(m,y){var I=y[0],V=y[1];return I.evaluate(m)&&V.evaluate(m)}],[ws(qo),function(m,y){for(var I=0,V=y;I-1}function va(m){return!!m.expression&&m.expression.interpolated}function no(m){return m instanceof Number?"number":m instanceof String?"string":m instanceof Boolean?"boolean":Array.isArray(m)?"array":m===null?"null":typeof m}function ys(m){return typeof m=="object"&&m!==null&&!Array.isArray(m)}function rs(m){return m}function Ql(m,y){var I=y.type==="color",V=m.stops&&typeof m.stops[0][0]=="object",$=V||m.property!==void 0,ae=V||!$,he=m.type||(va(y)?"exponential":"interval");if(I&&(m=Ol({},m),m.stops&&(m.stops=m.stops.map(function(ha){return[ha[0],cs.parse(ha[1])]})),m.default?m.default=cs.parse(m.default):m.default=cs.parse(y.default)),m.colorSpace&&m.colorSpace!=="rgb"&&!Zf[m.colorSpace])throw new Error("Unknown color space: "+m.colorSpace);var ze,rt,gt;if(he==="exponential")ze=pu;else if(he==="interval")ze=Nc;else if(he==="categorical"){ze=Yu,rt=Object.create(null);for(var Et=0,or=m.stops;Et=m.stops[V-1][0])return m.stops[V-1][1];var $=hu(m.stops.map(function(ae){return ae[0]}),I);return m.stops[$][1]}function pu(m,y,I){var V=m.base!==void 0?m.base:1;if(no(I)!=="number")return Cu(m.default,y.default);var $=m.stops.length;if($===1||I<=m.stops[0][0])return m.stops[0][1];if(I>=m.stops[$-1][0])return m.stops[$-1][1];var ae=hu(m.stops.map(function(or){return or[0]}),I),he=xu(I,V,m.stops[ae][0],m.stops[ae+1][0]),ze=m.stops[ae][1],rt=m.stops[ae+1][1],gt=zu[y.type]||rs;if(m.colorSpace&&m.colorSpace!=="rgb"){var Et=Zf[m.colorSpace];gt=function(or,_r){return Et.reverse(Et.interpolate(Et.forward(or),Et.forward(_r),he))}}return typeof ze.evaluate=="function"?{evaluate:function(){for(var _r=[],pr=arguments.length;pr--;)_r[pr]=arguments[pr];var Fr=ze.evaluate.apply(void 0,_r),oi=rt.evaluate.apply(void 0,_r);if(!(Fr===void 0||oi===void 0))return gt(Fr,oi,he)}}:gt(ze,rt,he)}function Uc(m,y,I){return y.type==="color"?I=cs.parse(I):y.type==="formatted"?I=$l.fromString(I.toString()):y.type==="resolvedImage"?I=fl.fromString(I.toString()):no(I)!==y.type&&(y.type!=="enum"||!y.values[I])&&(I=void 0),Cu(I,m.default,y.default)}function xu(m,y,I,V){var $=V-I,ae=m-I;return $===0?0:y===1?ae/$:(Math.pow(y,ae)-1)/(Math.pow(y,$)-1)}var Ac=function(y,I){this.expression=y,this._warningHistory={},this._evaluator=new Ko,this._defaultValue=I?ee(I):null,this._enumValues=I&&I.type==="enum"?I.values:null};Ac.prototype.evaluateWithoutErrorHandling=function(y,I,V,$,ae,he){return this._evaluator.globals=y,this._evaluator.feature=I,this._evaluator.featureState=V,this._evaluator.canonical=$,this._evaluator.availableImages=ae||null,this._evaluator.formattedSection=he,this.expression.evaluate(this._evaluator)},Ac.prototype.evaluate=function(y,I,V,$,ae,he){this._evaluator.globals=y,this._evaluator.feature=I||null,this._evaluator.featureState=V||null,this._evaluator.canonical=$,this._evaluator.availableImages=ae||null,this._evaluator.formattedSection=he||null;try{var ze=this.expression.evaluate(this._evaluator);if(ze==null||typeof ze=="number"&&ze!==ze)return this._defaultValue;if(this._enumValues&&!(ze in this._enumValues))throw new ps("Expected value to be one of "+Object.keys(this._enumValues).map(function(rt){return JSON.stringify(rt)}).join(", ")+", but found "+JSON.stringify(ze)+" instead.");return ze}catch(rt){return this._warningHistory[rt.message]||(this._warningHistory[rt.message]=!0,typeof console!="undefined"&&console.warn(rt.message)),this._defaultValue}};function Ua(m){return Array.isArray(m)&&m.length>0&&typeof m[0]=="string"&&m[0]in Ka}function oo(m,y){var I=new ks(Ka,[],y?Q(y):void 0),V=I.parse(m,void 0,void 0,void 0,y&&y.type==="string"?{typeAnnotation:"coerce"}:void 0);return V?Ho(new Ac(V,y)):ml(I.errors)}var Vc=function(y,I){this.kind=y,this._styleExpression=I,this.isStateDependent=y!=="constant"&&!js(I.expression)};Vc.prototype.evaluateWithoutErrorHandling=function(y,I,V,$,ae,he){return this._styleExpression.evaluateWithoutErrorHandling(y,I,V,$,ae,he)},Vc.prototype.evaluate=function(y,I,V,$,ae,he){return this._styleExpression.evaluate(y,I,V,$,ae,he)};var hc=function(y,I,V,$){this.kind=y,this.zoomStops=V,this._styleExpression=I,this.isStateDependent=y!=="camera"&&!js(I.expression),this.interpolationType=$};hc.prototype.evaluateWithoutErrorHandling=function(y,I,V,$,ae,he){return this._styleExpression.evaluateWithoutErrorHandling(y,I,V,$,ae,he)},hc.prototype.evaluate=function(y,I,V,$,ae,he){return this._styleExpression.evaluate(y,I,V,$,ae,he)},hc.prototype.interpolationFactor=function(y,I,V){return this.interpolationType?Wl.interpolationFactor(this.interpolationType,y,I,V):0};function Ku(m,y){if(m=oo(m,y),m.result==="error")return m;var I=m.value.expression,V=ih(I);if(!V&&!Ws(y))return ml([new Ns("","data expressions not supported")]);var $=Eu(I,["zoom"]);if(!$&&!Ls(y))return ml([new Ns("","zoom expressions not supported")]);var ae=B(I);if(!ae&&!$)return ml([new Ns("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(ae instanceof Ns)return ml([ae]);if(ae instanceof Wl&&!va(y))return ml([new Ns("",'"interpolate" expressions cannot be used with this property')]);if(!ae)return Ho(V?new Vc("constant",m.value):new Vc("source",m.value));var he=ae instanceof Wl?ae.interpolation:void 0;return Ho(V?new hc("camera",m.value,ae.labels,he):new hc("composite",m.value,ae.labels,he))}var ue=function(y,I){this._parameters=y,this._specification=I,Ol(this,Ql(this._parameters,this._specification))};ue.deserialize=function(y){return new ue(y._parameters,y._specification)},ue.serialize=function(y){return{_parameters:y._parameters,_specification:y._specification}};function w(m,y){if(ys(m))return new ue(m,y);if(Ua(m)){var I=Ku(m,y);if(I.result==="error")throw new Error(I.value.map(function($){return $.key+": "+$.message}).join(", "));return I.value}else{var V=m;return typeof m=="string"&&y.type==="color"&&(V=cs.parse(m)),{kind:"constant",evaluate:function(){return V}}}}function B(m){var y=null;if(m instanceof Oc)y=B(m.result);else if(m instanceof Zu)for(var I=0,V=m.args;IV.maximum?[new _a(y,I,I+" is greater than the maximum value "+V.maximum)]:[]}function st(m){var y=m.valueSpec,I=xo(m.value.type),V,$={},ae,he,ze=I!=="categorical"&&m.value.property===void 0,rt=!ze,gt=no(m.value.stops)==="array"&&no(m.value.stops[0])==="array"&&no(m.value.stops[0][0])==="object",Et=le({key:m.key,value:m.value,valueSpec:m.styleSpec.function,style:m.style,styleSpec:m.styleSpec,objectElementValidators:{stops:or,default:Fr}});return I==="identity"&&ze&&Et.push(new _a(m.key,m.value,'missing required property "property"')),I!=="identity"&&!m.value.stops&&Et.push(new _a(m.key,m.value,'missing required property "stops"')),I==="exponential"&&m.valueSpec.expression&&!va(m.valueSpec)&&Et.push(new _a(m.key,m.value,"exponential functions not supported")),m.styleSpec.$version>=8&&(rt&&!Ws(m.valueSpec)?Et.push(new _a(m.key,m.value,"property functions not supported")):ze&&!Ls(m.valueSpec)&&Et.push(new _a(m.key,m.value,"zoom functions not supported"))),(I==="categorical"||gt)&&m.value.property===void 0&&Et.push(new _a(m.key,m.value,'"property" property is required')),Et;function or(oi){if(I==="identity")return[new _a(oi.key,oi.value,'identity function may not have a "stops" property')];var Hi=[],Ai=oi.value;return Hi=Hi.concat(Oe({key:oi.key,value:Ai,valueSpec:oi.valueSpec,style:oi.style,styleSpec:oi.styleSpec,arrayElementValidator:_r})),no(Ai)==="array"&&Ai.length===0&&Hi.push(new _a(oi.key,Ai,"array must have at least one stop")),Hi}function _r(oi){var Hi=[],Ai=oi.value,bn=oi.key;if(no(Ai)!=="array")return[new _a(bn,Ai,"array expected, "+no(Ai)+" found")];if(Ai.length!==2)return[new _a(bn,Ai,"array length 2 expected, length "+Ai.length+" found")];if(gt){if(no(Ai[0])!=="object")return[new _a(bn,Ai,"object expected, "+no(Ai[0])+" found")];if(Ai[0].zoom===void 0)return[new _a(bn,Ai,"object stop key must have zoom")];if(Ai[0].value===void 0)return[new _a(bn,Ai,"object stop key must have value")];if(he&&he>xo(Ai[0].zoom))return[new _a(bn,Ai[0].zoom,"stop zoom values must appear in ascending order")];xo(Ai[0].zoom)!==he&&(he=xo(Ai[0].zoom),ae=void 0,$={}),Hi=Hi.concat(le({key:bn+"[0]",value:Ai[0],valueSpec:{zoom:{}},style:oi.style,styleSpec:oi.styleSpec,objectElementValidators:{zoom:Ze,value:pr}}))}else Hi=Hi.concat(pr({key:bn+"[0]",value:Ai[0],valueSpec:{},style:oi.style,styleSpec:oi.styleSpec},Ai));return Ua(Kl(Ai[1]))?Hi.concat([new _a(bn+"[1]",Ai[1],"expressions are not allowed in function stops.")]):Hi.concat(Qa({key:bn+"[1]",value:Ai[1],valueSpec:y,style:oi.style,styleSpec:oi.styleSpec}))}function pr(oi,Hi){var Ai=no(oi.value),bn=xo(oi.value),nn=oi.value!==null?oi.value:Hi;if(!V)V=Ai;else if(Ai!==V)return[new _a(oi.key,nn,Ai+" stop domain type must match previous stop domain type "+V)];if(Ai!=="number"&&Ai!=="string"&&Ai!=="boolean")return[new _a(oi.key,nn,"stop domain value must be a number, string, or boolean")];if(Ai!=="number"&&I!=="categorical"){var xn="number expected, "+Ai+" found";return Ws(y)&&I===void 0&&(xn+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new _a(oi.key,nn,xn)]}return I==="categorical"&&Ai==="number"&&(!isFinite(bn)||Math.floor(bn)!==bn)?[new _a(oi.key,nn,"integer expected, found "+bn)]:I!=="categorical"&&Ai==="number"&&ae!==void 0&&bn=2&&m[1]!=="$id"&&m[1]!=="$type";case"in":return m.length>=3&&(typeof m[1]!="string"||Array.isArray(m[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return m.length!==3||Array.isArray(m[1])||Array.isArray(m[2]);case"any":case"all":for(var y=0,I=m.slice(1);yy?1:0}function qe(m){if(!Array.isArray(m))return!1;if(m[0]==="within")return!0;for(var y=1;y"||y==="<="||y===">="?Xe(m[1],m[2],y):y==="any"?it(m.slice(1)):y==="all"?["all"].concat(m.slice(1).map(et)):y==="none"?["all"].concat(m.slice(1).map(et).map(tr)):y==="in"?Ft(m[1],m.slice(2)):y==="!in"?tr(Ft(m[1],m.slice(2))):y==="has"?Ht(m[1]):y==="!has"?tr(Ht(m[1])):y==="within"?m:!0;return I}function Xe(m,y,I){switch(m){case"$type":return["filter-type-"+I,y];case"$id":return["filter-id-"+I,y];default:return["filter-"+I,m,y]}}function it(m){return["any"].concat(m.map(et))}function Ft(m,y){if(y.length===0)return!1;switch(m){case"$type":return["filter-type-in",["literal",y]];case"$id":return["filter-id-in",["literal",y]];default:return y.length>200&&!y.some(function(I){return typeof I!=typeof y[0]})?["filter-in-large",m,["literal",y.sort(Re)]]:["filter-in-small",m,["literal",y]]}}function Ht(m){switch(m){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",m]}}function tr(m){return["!",m]}function dr(m){return Ir(Kl(m.value))?Tt(Ol({},m,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Sr(m)}function Sr(m){var y=m.value,I=m.key;if(no(y)!=="array")return[new _a(I,y,"array expected, "+no(y)+" found")];var V=m.styleSpec,$,ae=[];if(y.length<1)return[new _a(I,y,"filter array must have at least 1 element")];switch(ae=ae.concat(xr({key:I+"[0]",value:y[0],valueSpec:V.filter_operator,style:m.style,styleSpec:m.styleSpec})),xo(y[0])){case"<":case"<=":case">":case">=":y.length>=2&&xo(y[1])==="$type"&&ae.push(new _a(I,y,'"$type" cannot be use with operator "'+y[0]+'"'));case"==":case"!=":y.length!==3&&ae.push(new _a(I,y,'filter array for operator "'+y[0]+'" must have 3 elements'));case"in":case"!in":y.length>=2&&($=no(y[1]),$!=="string"&&ae.push(new _a(I+"[1]",y[1],"string expected, "+$+" found")));for(var he=2;he=Et[pr+0]&&V>=Et[pr+1])?(he[_r]=!0,ae.push(gt[_r])):he[_r]=!1}}},eu.prototype._forEachCell=function(m,y,I,V,$,ae,he,ze){for(var rt=this._convertToCellCoord(m),gt=this._convertToCellCoord(y),Et=this._convertToCellCoord(I),or=this._convertToCellCoord(V),_r=rt;_r<=Et;_r++)for(var pr=gt;pr<=or;pr++){var Fr=this.d*pr+_r;if(!(ze&&!ze(this._convertFromCellCoord(_r),this._convertFromCellCoord(pr),this._convertFromCellCoord(_r+1),this._convertFromCellCoord(pr+1)))&&$.call(this,m,y,I,V,Fr,ae,he,ze))return}},eu.prototype._convertFromCellCoord=function(m){return(m-this.padding)/this.scale},eu.prototype._convertToCellCoord=function(m){return Math.max(0,Math.min(this.d-1,Math.floor(m*this.scale)+this.padding))},eu.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var m=this.cells,y=Js+this.cells.length+1+1,I=0,V=0;V=0)){var or=m[Et];gt[Et]=Al[rt].shallow.indexOf(Et)>=0?or:He(or,y)}m instanceof Error&&(gt.message=m.message)}if(gt.$name)throw new Error("$name property is reserved for worker serialization logic.");return rt!=="Object"&&(gt.$name=rt),gt}throw new Error("can't serialize object of type "+typeof m)}function Ye(m){if(m==null||typeof m=="boolean"||typeof m=="number"||typeof m=="string"||m instanceof Boolean||m instanceof Number||m instanceof String||m instanceof Date||m instanceof RegExp||Te(m)||Ne(m)||ArrayBuffer.isView(m)||m instanceof dc)return m;if(Array.isArray(m))return m.map(Ye);if(typeof m=="object"){var y=m.$name||"Object",I=Al[y],V=I.klass;if(!V)throw new Error("can't deserialize unregistered class "+y);if(V.deserialize)return V.deserialize(m);for(var $=Object.create(V.prototype),ae=0,he=Object.keys(m);ae=0?rt:Ye(rt)}}return $}throw new Error("can't deserialize object of type "+typeof m)}var kt=function(){this.first=!0};kt.prototype.update=function(y,I){var V=Math.floor(y);return this.first?(this.first=!1,this.lastIntegerZoom=V,this.lastIntegerZoomTime=0,this.lastZoom=y,this.lastFloorZoom=V,!0):(this.lastFloorZoom>V?(this.lastIntegerZoom=V+1,this.lastIntegerZoomTime=I):this.lastFloorZoom=128&&m<=255},Arabic:function(m){return m>=1536&&m<=1791},"Arabic Supplement":function(m){return m>=1872&&m<=1919},"Arabic Extended-A":function(m){return m>=2208&&m<=2303},"Hangul Jamo":function(m){return m>=4352&&m<=4607},"Unified Canadian Aboriginal Syllabics":function(m){return m>=5120&&m<=5759},Khmer:function(m){return m>=6016&&m<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(m){return m>=6320&&m<=6399},"General Punctuation":function(m){return m>=8192&&m<=8303},"Letterlike Symbols":function(m){return m>=8448&&m<=8527},"Number Forms":function(m){return m>=8528&&m<=8591},"Miscellaneous Technical":function(m){return m>=8960&&m<=9215},"Control Pictures":function(m){return m>=9216&&m<=9279},"Optical Character Recognition":function(m){return m>=9280&&m<=9311},"Enclosed Alphanumerics":function(m){return m>=9312&&m<=9471},"Geometric Shapes":function(m){return m>=9632&&m<=9727},"Miscellaneous Symbols":function(m){return m>=9728&&m<=9983},"Miscellaneous Symbols and Arrows":function(m){return m>=11008&&m<=11263},"CJK Radicals Supplement":function(m){return m>=11904&&m<=12031},"Kangxi Radicals":function(m){return m>=12032&&m<=12255},"Ideographic Description Characters":function(m){return m>=12272&&m<=12287},"CJK Symbols and Punctuation":function(m){return m>=12288&&m<=12351},Hiragana:function(m){return m>=12352&&m<=12447},Katakana:function(m){return m>=12448&&m<=12543},Bopomofo:function(m){return m>=12544&&m<=12591},"Hangul Compatibility Jamo":function(m){return m>=12592&&m<=12687},Kanbun:function(m){return m>=12688&&m<=12703},"Bopomofo Extended":function(m){return m>=12704&&m<=12735},"CJK Strokes":function(m){return m>=12736&&m<=12783},"Katakana Phonetic Extensions":function(m){return m>=12784&&m<=12799},"Enclosed CJK Letters and Months":function(m){return m>=12800&&m<=13055},"CJK Compatibility":function(m){return m>=13056&&m<=13311},"CJK Unified Ideographs Extension A":function(m){return m>=13312&&m<=19903},"Yijing Hexagram Symbols":function(m){return m>=19904&&m<=19967},"CJK Unified Ideographs":function(m){return m>=19968&&m<=40959},"Yi Syllables":function(m){return m>=40960&&m<=42127},"Yi Radicals":function(m){return m>=42128&&m<=42191},"Hangul Jamo Extended-A":function(m){return m>=43360&&m<=43391},"Hangul Syllables":function(m){return m>=44032&&m<=55215},"Hangul Jamo Extended-B":function(m){return m>=55216&&m<=55295},"Private Use Area":function(m){return m>=57344&&m<=63743},"CJK Compatibility Ideographs":function(m){return m>=63744&&m<=64255},"Arabic Presentation Forms-A":function(m){return m>=64336&&m<=65023},"Vertical Forms":function(m){return m>=65040&&m<=65055},"CJK Compatibility Forms":function(m){return m>=65072&&m<=65103},"Small Form Variants":function(m){return m>=65104&&m<=65135},"Arabic Presentation Forms-B":function(m){return m>=65136&&m<=65279},"Halfwidth and Fullwidth Forms":function(m){return m>=65280&&m<=65519}};function jt(m){for(var y=0,I=m;y=65097&&m<=65103)||nt["CJK Compatibility Ideographs"](m)||nt["CJK Compatibility"](m)||nt["CJK Radicals Supplement"](m)||nt["CJK Strokes"](m)||nt["CJK Symbols and Punctuation"](m)&&!(m>=12296&&m<=12305)&&!(m>=12308&&m<=12319)&&m!==12336||nt["CJK Unified Ideographs Extension A"](m)||nt["CJK Unified Ideographs"](m)||nt["Enclosed CJK Letters and Months"](m)||nt["Hangul Compatibility Jamo"](m)||nt["Hangul Jamo Extended-A"](m)||nt["Hangul Jamo Extended-B"](m)||nt["Hangul Jamo"](m)||nt["Hangul Syllables"](m)||nt.Hiragana(m)||nt["Ideographic Description Characters"](m)||nt.Kanbun(m)||nt["Kangxi Radicals"](m)||nt["Katakana Phonetic Extensions"](m)||nt.Katakana(m)&&m!==12540||nt["Halfwidth and Fullwidth Forms"](m)&&m!==65288&&m!==65289&&m!==65293&&!(m>=65306&&m<=65310)&&m!==65339&&m!==65341&&m!==65343&&!(m>=65371&&m<=65503)&&m!==65507&&!(m>=65512&&m<=65519)||nt["Small Form Variants"](m)&&!(m>=65112&&m<=65118)&&!(m>=65123&&m<=65126)||nt["Unified Canadian Aboriginal Syllabics"](m)||nt["Unified Canadian Aboriginal Syllabics Extended"](m)||nt["Vertical Forms"](m)||nt["Yijing Hexagram Symbols"](m)||nt["Yi Syllables"](m)||nt["Yi Radicals"](m))}function _i(m){return!!(nt["Latin-1 Supplement"](m)&&(m===167||m===169||m===174||m===177||m===188||m===189||m===190||m===215||m===247)||nt["General Punctuation"](m)&&(m===8214||m===8224||m===8225||m===8240||m===8241||m===8251||m===8252||m===8258||m===8263||m===8264||m===8265||m===8273)||nt["Letterlike Symbols"](m)||nt["Number Forms"](m)||nt["Miscellaneous Technical"](m)&&(m>=8960&&m<=8967||m>=8972&&m<=8991||m>=8996&&m<=9e3||m===9003||m>=9085&&m<=9114||m>=9150&&m<=9165||m===9167||m>=9169&&m<=9179||m>=9186&&m<=9215)||nt["Control Pictures"](m)&&m!==9251||nt["Optical Character Recognition"](m)||nt["Enclosed Alphanumerics"](m)||nt["Geometric Shapes"](m)||nt["Miscellaneous Symbols"](m)&&!(m>=9754&&m<=9759)||nt["Miscellaneous Symbols and Arrows"](m)&&(m>=11026&&m<=11055||m>=11088&&m<=11097||m>=11192&&m<=11243)||nt["CJK Symbols and Punctuation"](m)||nt.Katakana(m)||nt["Private Use Area"](m)||nt["CJK Compatibility Forms"](m)||nt["Small Form Variants"](m)||nt["Halfwidth and Fullwidth Forms"](m)||m===8734||m===8756||m===8757||m>=9984&&m<=10087||m>=10102&&m<=10131||m===65532||m===65533)}function bi(m){return!(qr(m)||_i(m))}function Zr(m){return nt.Arabic(m)||nt["Arabic Supplement"](m)||nt["Arabic Extended-A"](m)||nt["Arabic Presentation Forms-A"](m)||nt["Arabic Presentation Forms-B"](m)}function ai(m){return m>=1424&&m<=2303||nt["Arabic Presentation Forms-A"](m)||nt["Arabic Presentation Forms-B"](m)}function gi(m,y){return!(!y&&ai(m)||m>=2304&&m<=3583||m>=3840&&m<=4255||nt.Khmer(m))}function Ii(m){for(var y=0,I=m;y-1&&(En=ei.error),Ln&&Ln(m)};function Ea(){Ia.fire(new Xo("pluginStateChange",{pluginStatus:En,pluginURL:Un}))}var Ia=new Wn,yo=function(){return En},Da=function(m){return m({pluginStatus:En,pluginURL:Un}),Ia.on("pluginStateChange",m),m},go=function(m,y,I){if(I===void 0&&(I=!1),En===ei.deferred||En===ei.loading||En===ei.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");Un=lt.resolveURL(m),En=ei.deferred,Ln=y,Ea(),I||Is()},Is=function(){if(En!==ei.deferred||!Un)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");En=ei.loading,Ea(),Un&&ri({url:Un},function(m){m?ia(m):(En=ei.loaded,Ea())})},Ms={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return En===ei.loaded||Ms.applyArabicShaping!=null},isLoading:function(){return En===ei.loading},setState:function(y){En=y.pluginStatus,Un=y.pluginURL},isParsed:function(){return Ms.applyArabicShaping!=null&&Ms.processBidirectionalText!=null&&Ms.processStyledBidirectionalText!=null},getPluginURL:function(){return Un}},Xs=function(){!Ms.isLoading()&&!Ms.isLoaded()&&yo()==="deferred"&&Is()},Gn=function(y,I){this.zoom=y,I?(this.now=I.now,this.fadeDuration=I.fadeDuration,this.zoomHistory=I.zoomHistory,this.transition=I.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new kt,this.transition={})};Gn.prototype.isSupportedScript=function(y){return Si(y,Ms.isLoaded())},Gn.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},Gn.prototype.getCrossfadeParameters=function(){var y=this.zoom,I=y-Math.floor(y),V=this.crossFadingFactor();return y>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:I+(1-I)*V}:{fromScale:.5,toScale:1,t:1-(1-V)*I}};var ja=function(y,I){this.property=y,this.value=I,this.expression=w(I===void 0?y.specification.default:I,y.specification)};ja.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},ja.prototype.possiblyEvaluate=function(y,I,V){return this.property.possiblyEvaluate(this,y,I,V)};var Fo=function(y){this.property=y,this.value=new ja(y,void 0)};Fo.prototype.transitioned=function(y,I){return new $s(this.property,this.value,I,x({},y.transition,this.transition),y.now)},Fo.prototype.untransitioned=function(){return new $s(this.property,this.value,null,{},0)};var Uo=function(y){this._properties=y,this._values=Object.create(y.defaultTransitionablePropertyValues)};Uo.prototype.getValue=function(y){return j(this._values[y].value.value)},Uo.prototype.setValue=function(y,I){this._values.hasOwnProperty(y)||(this._values[y]=new Fo(this._values[y].property)),this._values[y].value=new ja(this._values[y].property,I===null?void 0:j(I))},Uo.prototype.getTransition=function(y){return j(this._values[y].transition)},Uo.prototype.setTransition=function(y,I){this._values.hasOwnProperty(y)||(this._values[y]=new Fo(this._values[y].property)),this._values[y].transition=j(I)||void 0},Uo.prototype.serialize=function(){for(var y={},I=0,V=Object.keys(this._values);Ithis.end)return this.prior=null,ae;if(this.value.isDataDriven())return this.prior=null,ae;if($he.zoomHistory.lastIntegerZoom?{from:V,to:$}:{from:ae,to:$}},y.prototype.interpolate=function(V){return V},y}(bt),Rr=function(y){this.specification=y};Rr.prototype.possiblyEvaluate=function(y,I,V,$){if(y.value!==void 0)if(y.expression.kind==="constant"){var ae=y.expression.evaluate(I,null,{},V,$);return this._calculate(ae,ae,ae,I)}else return this._calculate(y.expression.evaluate(new Gn(Math.floor(I.zoom-1),I)),y.expression.evaluate(new Gn(Math.floor(I.zoom),I)),y.expression.evaluate(new Gn(Math.floor(I.zoom+1),I)),I)},Rr.prototype._calculate=function(y,I,V,$){var ae=$.zoom;return ae>$.zoomHistory.lastIntegerZoom?{from:y,to:I}:{from:V,to:I}},Rr.prototype.interpolate=function(y){return y};var jr=function(y){this.specification=y};jr.prototype.possiblyEvaluate=function(y,I,V,$){return!!y.expression.evaluate(I,null,{},V,$)},jr.prototype.interpolate=function(){return!1};var Nr=function(y){this.properties=y,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var I in y){var V=y[I];V.specification.overridable&&this.overridableProperties.push(I);var $=this.defaultPropertyValues[I]=new ja(V,void 0),ae=this.defaultTransitionablePropertyValues[I]=new Fo(V);this.defaultTransitioningPropertyValues[I]=ae.untransitioned(),this.defaultPossiblyEvaluatedValues[I]=$.possiblyEvaluate({})}};X("DataDrivenProperty",bt),X("DataConstantProperty",Me),X("CrossFadedDataDrivenProperty",zt),X("CrossFadedProperty",Rr),X("ColorRampProperty",jr);var Gr="-transition",mi=function(m){function y(I,V){if(m.call(this),this.id=I.id,this.type=I.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},I.type!=="custom"&&(I=I,this.metadata=I.metadata,this.minzoom=I.minzoom,this.maxzoom=I.maxzoom,I.type!=="background"&&(this.source=I.source,this.sourceLayer=I["source-layer"],this.filter=I.filter),V.layout&&(this._unevaluatedLayout=new bu(V.layout)),V.paint)){this._transitionablePaint=new Uo(V.paint);for(var $ in I.paint)this.setPaintProperty($,I.paint[$],{validate:!1});for(var ae in I.layout)this.setLayoutProperty(ae,I.layout[ae],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Sc(V.paint)}}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},y.prototype.getLayoutProperty=function(V){return V==="visibility"?this.visibility:this._unevaluatedLayout.getValue(V)},y.prototype.setLayoutProperty=function(V,$,ae){if(ae===void 0&&(ae={}),$!=null){var he="layers."+this.id+".layout."+V;if(this._validate(Ul,he,V,$,ae))return}if(V==="visibility"){this.visibility=$;return}this._unevaluatedLayout.setValue(V,$)},y.prototype.getPaintProperty=function(V){return U(V,Gr)?this._transitionablePaint.getTransition(V.slice(0,-Gr.length)):this._transitionablePaint.getValue(V)},y.prototype.setPaintProperty=function(V,$,ae){if(ae===void 0&&(ae={}),$!=null){var he="layers."+this.id+".paint."+V;if(this._validate(hl,he,V,$,ae))return!1}if(U(V,Gr))return this._transitionablePaint.setTransition(V.slice(0,-Gr.length),$||void 0),!1;var ze=this._transitionablePaint._values[V],rt=ze.property.specification["property-type"]==="cross-faded-data-driven",gt=ze.value.isDataDriven(),Et=ze.value;this._transitionablePaint.setValue(V,$),this._handleSpecialPaintPropertyUpdate(V);var or=this._transitionablePaint._values[V].value,_r=or.isDataDriven();return _r||gt||rt||this._handleOverridablePaintPropertyUpdate(V,Et,or)},y.prototype._handleSpecialPaintPropertyUpdate=function(V){},y.prototype._handleOverridablePaintPropertyUpdate=function(V,$,ae){return!1},y.prototype.isHidden=function(V){return this.minzoom&&V=this.maxzoom?!0:this.visibility==="none"},y.prototype.updateTransitions=function(V){this._transitioningPaint=this._transitionablePaint.transitioned(V,this._transitioningPaint)},y.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},y.prototype.recalculate=function(V,$){V.getCrossfadeParameters&&(this._crossfadeParameters=V.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(V,void 0,$)),this.paint=this._transitioningPaint.possiblyEvaluate(V,void 0,$)},y.prototype.serialize=function(){var V={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(V.layout=V.layout||{},V.layout.visibility=this.visibility),Z(V,function($,ae){return $!==void 0&&!(ae==="layout"&&!Object.keys($).length)&&!(ae==="paint"&&!Object.keys($).length)})},y.prototype._validate=function(V,$,ae,he,ze){return ze===void 0&&(ze={}),ze&&ze.validate===!1?!1:Lu(this,V.call(wo,{key:$,layerType:this.type,objectKey:ae,value:he,styleSpec:Rn,style:{glyphs:!0,sprite:!0}}))},y.prototype.is3D=function(){return!1},y.prototype.isTileClipped=function(){return!1},y.prototype.hasOffscreenPass=function(){return!1},y.prototype.resize=function(){},y.prototype.isStateDependent=function(){for(var V in this.paint._values){var $=this.paint.get(V);if(!(!($ instanceof dl)||!Ws($.property.specification))&&($.value.kind==="source"||$.value.kind==="composite")&&$.value.isStateDependent)return!0}return!1},y}(Wn),Ui={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},qi=function(y,I){this._structArray=y,this._pos1=I*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Ei=128,Hn=5,en=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};en.serialize=function(y,I){return y._trim(),I&&(y.isTransferred=!0,I.push(y.arrayBuffer)),{length:y.length,arrayBuffer:y.arrayBuffer}},en.deserialize=function(y){var I=Object.create(this.prototype);return I.arrayBuffer=y.arrayBuffer,I.length=y.length,I.capacity=y.arrayBuffer.byteLength/I.bytesPerElement,I._refreshViews(),I},en.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},en.prototype.clear=function(){this.length=0},en.prototype.resize=function(y){this.reserve(y),this.length=y},en.prototype.reserve=function(y){if(y>this.capacity){this.capacity=Math.max(y,Math.floor(this.capacity*Hn),Ei),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var I=this.uint8;this._refreshViews(),I&&this.uint8.set(I)}},en.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function Wi(m,y){y===void 0&&(y=1);var I=0,V=0,$=m.map(function(he){var ze=si(he.type),rt=I=Mr(I,Math.max(y,ze)),gt=he.components||1;return V=Math.max(V,ze),I+=ze*gt,{name:he.name,type:he.type,components:gt,offset:rt}}),ae=Mr(I,Math.max(V,y));return{members:$,size:ae,alignment:y}}function si(m){return Ui[m].BYTES_PER_ELEMENT}function Mr(m,y){return Math.ceil(m/y)*y}var Yr=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$){var ae=this.length;return this.resize(ae+1),this.emplace(ae,V,$)},y.prototype.emplace=function(V,$,ae){var he=V*2;return this.int16[he+0]=$,this.int16[he+1]=ae,V},y}(en);Yr.prototype.bytesPerElement=4,X("StructArrayLayout2i4",Yr);var xi=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$,ae,he){var ze=this.length;return this.resize(ze+1),this.emplace(ze,V,$,ae,he)},y.prototype.emplace=function(V,$,ae,he,ze){var rt=V*4;return this.int16[rt+0]=$,this.int16[rt+1]=ae,this.int16[rt+2]=he,this.int16[rt+3]=ze,V},y}(en);xi.prototype.bytesPerElement=8,X("StructArrayLayout4i8",xi);var Ri=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$,ae,he,ze,rt){var gt=this.length;return this.resize(gt+1),this.emplace(gt,V,$,ae,he,ze,rt)},y.prototype.emplace=function(V,$,ae,he,ze,rt,gt){var Et=V*6;return this.int16[Et+0]=$,this.int16[Et+1]=ae,this.int16[Et+2]=he,this.int16[Et+3]=ze,this.int16[Et+4]=rt,this.int16[Et+5]=gt,V},y}(en);Ri.prototype.bytesPerElement=12,X("StructArrayLayout2i4i12",Ri);var ci=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$,ae,he,ze,rt){var gt=this.length;return this.resize(gt+1),this.emplace(gt,V,$,ae,he,ze,rt)},y.prototype.emplace=function(V,$,ae,he,ze,rt,gt){var Et=V*4,or=V*8;return this.int16[Et+0]=$,this.int16[Et+1]=ae,this.uint8[or+4]=he,this.uint8[or+5]=ze,this.uint8[or+6]=rt,this.uint8[or+7]=gt,V},y}(en);ci.prototype.bytesPerElement=8,X("StructArrayLayout2i4ub8",ci);var an=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$){var ae=this.length;return this.resize(ae+1),this.emplace(ae,V,$)},y.prototype.emplace=function(V,$,ae){var he=V*2;return this.float32[he+0]=$,this.float32[he+1]=ae,V},y}(en);an.prototype.bytesPerElement=8,X("StructArrayLayout2f8",an);var Zi=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$,ae,he,ze,rt,gt,Et,or,_r){var pr=this.length;return this.resize(pr+1),this.emplace(pr,V,$,ae,he,ze,rt,gt,Et,or,_r)},y.prototype.emplace=function(V,$,ae,he,ze,rt,gt,Et,or,_r,pr){var Fr=V*10;return this.uint16[Fr+0]=$,this.uint16[Fr+1]=ae,this.uint16[Fr+2]=he,this.uint16[Fr+3]=ze,this.uint16[Fr+4]=rt,this.uint16[Fr+5]=gt,this.uint16[Fr+6]=Et,this.uint16[Fr+7]=or,this.uint16[Fr+8]=_r,this.uint16[Fr+9]=pr,V},y}(en);Zi.prototype.bytesPerElement=20,X("StructArrayLayout10ui20",Zi);var Bn=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$,ae,he,ze,rt,gt,Et,or,_r,pr,Fr){var oi=this.length;return this.resize(oi+1),this.emplace(oi,V,$,ae,he,ze,rt,gt,Et,or,_r,pr,Fr)},y.prototype.emplace=function(V,$,ae,he,ze,rt,gt,Et,or,_r,pr,Fr,oi){var Hi=V*12;return this.int16[Hi+0]=$,this.int16[Hi+1]=ae,this.int16[Hi+2]=he,this.int16[Hi+3]=ze,this.uint16[Hi+4]=rt,this.uint16[Hi+5]=gt,this.uint16[Hi+6]=Et,this.uint16[Hi+7]=or,this.int16[Hi+8]=_r,this.int16[Hi+9]=pr,this.int16[Hi+10]=Fr,this.int16[Hi+11]=oi,V},y}(en);Bn.prototype.bytesPerElement=24,X("StructArrayLayout4i4ui4i24",Bn);var hi=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$,ae){var he=this.length;return this.resize(he+1),this.emplace(he,V,$,ae)},y.prototype.emplace=function(V,$,ae,he){var ze=V*3;return this.float32[ze+0]=$,this.float32[ze+1]=ae,this.float32[ze+2]=he,V},y}(en);hi.prototype.bytesPerElement=12,X("StructArrayLayout3f12",hi);var li=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V){var $=this.length;return this.resize($+1),this.emplace($,V)},y.prototype.emplace=function(V,$){var ae=V*1;return this.uint32[ae+0]=$,V},y}(en);li.prototype.bytesPerElement=4,X("StructArrayLayout1ul4",li);var mn=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$,ae,he,ze,rt,gt,Et,or){var _r=this.length;return this.resize(_r+1),this.emplace(_r,V,$,ae,he,ze,rt,gt,Et,or)},y.prototype.emplace=function(V,$,ae,he,ze,rt,gt,Et,or,_r){var pr=V*10,Fr=V*5;return this.int16[pr+0]=$,this.int16[pr+1]=ae,this.int16[pr+2]=he,this.int16[pr+3]=ze,this.int16[pr+4]=rt,this.int16[pr+5]=gt,this.uint32[Fr+3]=Et,this.uint16[pr+8]=or,this.uint16[pr+9]=_r,V},y}(en);mn.prototype.bytesPerElement=20,X("StructArrayLayout6i1ul2ui20",mn);var Ji=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$,ae,he,ze,rt){var gt=this.length;return this.resize(gt+1),this.emplace(gt,V,$,ae,he,ze,rt)},y.prototype.emplace=function(V,$,ae,he,ze,rt,gt){var Et=V*6;return this.int16[Et+0]=$,this.int16[Et+1]=ae,this.int16[Et+2]=he,this.int16[Et+3]=ze,this.int16[Et+4]=rt,this.int16[Et+5]=gt,V},y}(en);Ji.prototype.bytesPerElement=12,X("StructArrayLayout2i2i2i12",Ji);var Vi=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$,ae,he,ze){var rt=this.length;return this.resize(rt+1),this.emplace(rt,V,$,ae,he,ze)},y.prototype.emplace=function(V,$,ae,he,ze,rt){var gt=V*4,Et=V*8;return this.float32[gt+0]=$,this.float32[gt+1]=ae,this.float32[gt+2]=he,this.int16[Et+6]=ze,this.int16[Et+7]=rt,V},y}(en);Vi.prototype.bytesPerElement=16,X("StructArrayLayout2f1f2i16",Vi);var Ni=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$,ae,he){var ze=this.length;return this.resize(ze+1),this.emplace(ze,V,$,ae,he)},y.prototype.emplace=function(V,$,ae,he,ze){var rt=V*12,gt=V*3;return this.uint8[rt+0]=$,this.uint8[rt+1]=ae,this.float32[gt+1]=he,this.float32[gt+2]=ze,V},y}(en);Ni.prototype.bytesPerElement=12,X("StructArrayLayout2ub2f12",Ni);var pn=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$,ae){var he=this.length;return this.resize(he+1),this.emplace(he,V,$,ae)},y.prototype.emplace=function(V,$,ae,he){var ze=V*3;return this.uint16[ze+0]=$,this.uint16[ze+1]=ae,this.uint16[ze+2]=he,V},y}(en);pn.prototype.bytesPerElement=6,X("StructArrayLayout3ui6",pn);var Vn=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$,ae,he,ze,rt,gt,Et,or,_r,pr,Fr,oi,Hi,Ai,bn,nn){var xn=this.length;return this.resize(xn+1),this.emplace(xn,V,$,ae,he,ze,rt,gt,Et,or,_r,pr,Fr,oi,Hi,Ai,bn,nn)},y.prototype.emplace=function(V,$,ae,he,ze,rt,gt,Et,or,_r,pr,Fr,oi,Hi,Ai,bn,nn,xn){var Pn=V*24,Zn=V*12,ga=V*48;return this.int16[Pn+0]=$,this.int16[Pn+1]=ae,this.uint16[Pn+2]=he,this.uint16[Pn+3]=ze,this.uint32[Zn+2]=rt,this.uint32[Zn+3]=gt,this.uint32[Zn+4]=Et,this.uint16[Pn+10]=or,this.uint16[Pn+11]=_r,this.uint16[Pn+12]=pr,this.float32[Zn+7]=Fr,this.float32[Zn+8]=oi,this.uint8[ga+36]=Hi,this.uint8[ga+37]=Ai,this.uint8[ga+38]=bn,this.uint32[Zn+10]=nn,this.int16[Pn+22]=xn,V},y}(en);Vn.prototype.bytesPerElement=48,X("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Vn);var na=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$,ae,he,ze,rt,gt,Et,or,_r,pr,Fr,oi,Hi,Ai,bn,nn,xn,Pn,Zn,ga,ha,eo,za,Za,Jo,to,ao){var _s=this.length;return this.resize(_s+1),this.emplace(_s,V,$,ae,he,ze,rt,gt,Et,or,_r,pr,Fr,oi,Hi,Ai,bn,nn,xn,Pn,Zn,ga,ha,eo,za,Za,Jo,to,ao)},y.prototype.emplace=function(V,$,ae,he,ze,rt,gt,Et,or,_r,pr,Fr,oi,Hi,Ai,bn,nn,xn,Pn,Zn,ga,ha,eo,za,Za,Jo,to,ao,_s){var jo=V*34,El=V*17;return this.int16[jo+0]=$,this.int16[jo+1]=ae,this.int16[jo+2]=he,this.int16[jo+3]=ze,this.int16[jo+4]=rt,this.int16[jo+5]=gt,this.int16[jo+6]=Et,this.int16[jo+7]=or,this.uint16[jo+8]=_r,this.uint16[jo+9]=pr,this.uint16[jo+10]=Fr,this.uint16[jo+11]=oi,this.uint16[jo+12]=Hi,this.uint16[jo+13]=Ai,this.uint16[jo+14]=bn,this.uint16[jo+15]=nn,this.uint16[jo+16]=xn,this.uint16[jo+17]=Pn,this.uint16[jo+18]=Zn,this.uint16[jo+19]=ga,this.uint16[jo+20]=ha,this.uint16[jo+21]=eo,this.uint16[jo+22]=za,this.uint32[El+12]=Za,this.float32[El+13]=Jo,this.float32[El+14]=to,this.float32[El+15]=ao,this.float32[El+16]=_s,V},y}(en);na.prototype.bytesPerElement=68,X("StructArrayLayout8i15ui1ul4f68",na);var Ki=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V){var $=this.length;return this.resize($+1),this.emplace($,V)},y.prototype.emplace=function(V,$){var ae=V*1;return this.float32[ae+0]=$,V},y}(en);Ki.prototype.bytesPerElement=4,X("StructArrayLayout1f4",Ki);var kn=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$,ae){var he=this.length;return this.resize(he+1),this.emplace(he,V,$,ae)},y.prototype.emplace=function(V,$,ae,he){var ze=V*3;return this.int16[ze+0]=$,this.int16[ze+1]=ae,this.int16[ze+2]=he,V},y}(en);kn.prototype.bytesPerElement=6,X("StructArrayLayout3i6",kn);var ta=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$,ae){var he=this.length;return this.resize(he+1),this.emplace(he,V,$,ae)},y.prototype.emplace=function(V,$,ae,he){var ze=V*2,rt=V*4;return this.uint32[ze+0]=$,this.uint16[rt+2]=ae,this.uint16[rt+3]=he,V},y}(en);ta.prototype.bytesPerElement=8,X("StructArrayLayout1ul2ui8",ta);var oa=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$){var ae=this.length;return this.resize(ae+1),this.emplace(ae,V,$)},y.prototype.emplace=function(V,$,ae){var he=V*2;return this.uint16[he+0]=$,this.uint16[he+1]=ae,V},y}(en);oa.prototype.bytesPerElement=4,X("StructArrayLayout2ui4",oa);var ba=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V){var $=this.length;return this.resize($+1),this.emplace($,V)},y.prototype.emplace=function(V,$){var ae=V*1;return this.uint16[ae+0]=$,V},y}(en);ba.prototype.bytesPerElement=2,X("StructArrayLayout1ui2",ba);var is=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},y.prototype.emplaceBack=function(V,$,ae,he){var ze=this.length;return this.resize(ze+1),this.emplace(ze,V,$,ae,he)},y.prototype.emplace=function(V,$,ae,he,ze){var rt=V*4;return this.float32[rt+0]=$,this.float32[rt+1]=ae,this.float32[rt+2]=he,this.float32[rt+3]=ze,V},y}(en);is.prototype.bytesPerElement=16,X("StructArrayLayout4f16",is);var Zs=function(m){function y(){m.apply(this,arguments)}m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y;var I={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return I.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},I.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},I.x1.get=function(){return this._structArray.int16[this._pos2+2]},I.y1.get=function(){return this._structArray.int16[this._pos2+3]},I.x2.get=function(){return this._structArray.int16[this._pos2+4]},I.y2.get=function(){return this._structArray.int16[this._pos2+5]},I.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},I.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},I.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},I.anchorPoint.get=function(){return new u(this.anchorPointX,this.anchorPointY)},Object.defineProperties(y.prototype,I),y}(qi);Zs.prototype.size=20;var Va=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.get=function(V){return new Zs(this,V)},y}(mn);X("CollisionBoxArray",Va);var Ml=function(m){function y(){m.apply(this,arguments)}m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y;var I={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return I.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},I.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},I.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},I.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},I.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},I.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},I.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},I.segment.get=function(){return this._structArray.uint16[this._pos2+10]},I.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},I.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},I.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},I.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},I.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},I.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},I.placedOrientation.set=function(V){this._structArray.uint8[this._pos1+37]=V},I.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},I.hidden.set=function(V){this._structArray.uint8[this._pos1+38]=V},I.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},I.crossTileID.set=function(V){this._structArray.uint32[this._pos4+10]=V},I.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(y.prototype,I),y}(qi);Ml.prototype.size=48;var zo=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.get=function(V){return new Ml(this,V)},y}(Vn);X("PlacedSymbolArray",zo);var Qs=function(m){function y(){m.apply(this,arguments)}m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y;var I={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return I.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},I.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},I.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},I.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},I.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},I.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},I.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},I.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},I.key.get=function(){return this._structArray.uint16[this._pos2+8]},I.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},I.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},I.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},I.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},I.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},I.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},I.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},I.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},I.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},I.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},I.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},I.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},I.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},I.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},I.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},I.crossTileID.set=function(V){this._structArray.uint32[this._pos4+12]=V},I.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},I.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},I.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},I.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(y.prototype,I),y}(qi);Qs.prototype.size=68;var al=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.get=function(V){return new Qs(this,V)},y}(na);X("SymbolInstanceArray",al);var Vl=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.getoffsetX=function(V){return this.float32[V*1+0]},y}(Ki);X("GlyphOffsetArray",Vl);var ss=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.getx=function(V){return this.int16[V*3+0]},y.prototype.gety=function(V){return this.int16[V*3+1]},y.prototype.gettileUnitDistanceFromAnchor=function(V){return this.int16[V*3+2]},y}(kn);X("SymbolLineVertexArray",ss);var Vs=function(m){function y(){m.apply(this,arguments)}m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y;var I={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return I.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},I.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},I.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(y.prototype,I),y}(qi);Vs.prototype.size=8;var Ys=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.get=function(V){return new Vs(this,V)},y}(ta);X("FeatureIndexArray",Ys);var wa=Wi([{name:"a_pos",components:2,type:"Int16"}],4),ol=wa.members,io=function(y){y===void 0&&(y=[]),this.segments=y};io.prototype.prepareSegment=function(y,I,V,$){var ae=this.segments[this.segments.length-1];return y>io.MAX_VERTEX_ARRAY_LENGTH&&re("Max vertices per segment is "+io.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+y),(!ae||ae.vertexLength+y>io.MAX_VERTEX_ARRAY_LENGTH||ae.sortKey!==$)&&(ae={vertexOffset:I.length,primitiveOffset:V.length,vertexLength:0,primitiveLength:0},$!==void 0&&(ae.sortKey=$),this.segments.push(ae)),ae},io.prototype.get=function(){return this.segments},io.prototype.destroy=function(){for(var y=0,I=this.segments;y>>16)*rt&65535)<<16)&4294967295,Et=Et<<15|Et>>>17,Et=(Et&65535)*gt+(((Et>>>16)*gt&65535)<<16)&4294967295,he^=Et,he=he<<13|he>>>19,ze=(he&65535)*5+(((he>>>16)*5&65535)<<16)&4294967295,he=(ze&65535)+27492+(((ze>>>16)+58964&65535)<<16);switch(Et=0,$){case 3:Et^=(I.charCodeAt(or+2)&255)<<16;case 2:Et^=(I.charCodeAt(or+1)&255)<<8;case 1:Et^=I.charCodeAt(or)&255,Et=(Et&65535)*rt+(((Et>>>16)*rt&65535)<<16)&4294967295,Et=Et<<15|Et>>>17,Et=(Et&65535)*gt+(((Et>>>16)*gt&65535)<<16)&4294967295,he^=Et}return he^=I.length,he^=he>>>16,he=(he&65535)*2246822507+(((he>>>16)*2246822507&65535)<<16)&4294967295,he^=he>>>13,he=(he&65535)*3266489909+(((he>>>16)*3266489909&65535)<<16)&4294967295,he^=he>>>16,he>>>0}m.exports=y}),q=a(function(m){function y(I,V){for(var $=I.length,ae=V^$,he=0,ze;$>=4;)ze=I.charCodeAt(he)&255|(I.charCodeAt(++he)&255)<<8|(I.charCodeAt(++he)&255)<<16|(I.charCodeAt(++he)&255)<<24,ze=(ze&65535)*1540483477+(((ze>>>16)*1540483477&65535)<<16),ze^=ze>>>24,ze=(ze&65535)*1540483477+(((ze>>>16)*1540483477&65535)<<16),ae=(ae&65535)*1540483477+(((ae>>>16)*1540483477&65535)<<16)^ze,$-=4,++he;switch($){case 3:ae^=(I.charCodeAt(he+2)&255)<<16;case 2:ae^=(I.charCodeAt(he+1)&255)<<8;case 1:ae^=I.charCodeAt(he)&255,ae=(ae&65535)*1540483477+(((ae>>>16)*1540483477&65535)<<16)}return ae^=ae>>>13,ae=(ae&65535)*1540483477+(((ae>>>16)*1540483477&65535)<<16),ae^=ae>>>15,ae>>>0}m.exports=y}),K=J,de=J,ne=q;K.murmur3=de,K.murmur2=ne;var we=function(){this.ids=[],this.positions=[],this.indexed=!1};we.prototype.add=function(y,I,V,$){this.ids.push(ft(y)),this.positions.push(I,V,$)},we.prototype.getPositions=function(y){for(var I=ft(y),V=0,$=this.ids.length-1;V<$;){var ae=V+$>>1;this.ids[ae]>=I?$=ae:V=ae+1}for(var he=[];this.ids[V]===I;){var ze=this.positions[3*V],rt=this.positions[3*V+1],gt=this.positions[3*V+2];he.push({index:ze,start:rt,end:gt}),V++}return he},we.serialize=function(y,I){var V=new Float64Array(y.ids),$=new Uint32Array(y.positions);return Zt(V,$,0,V.length-1),I&&I.push(V.buffer,$.buffer),{ids:V,positions:$}},we.deserialize=function(y){var I=new we;return I.ids=y.ids,I.positions=y.positions,I.indexed=!0,I};var Ue=Math.pow(2,53)-1;function ft(m){var y=+m;return!isNaN(y)&&y<=Ue?y:K(String(m))}function Zt(m,y,I,V){for(;I>1],ae=I-1,he=V+1;;){do ae++;while(m[ae]<$);do he--;while(m[he]>$);if(ae>=he)break;hr(m,ae,he),hr(y,3*ae,3*he),hr(y,3*ae+1,3*he+1),hr(y,3*ae+2,3*he+2)}he-Ihe.x+1||rthe.y+1)&&re("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return I}function Ja(m,y){return{type:m.type,id:m.id,properties:m.properties,geometry:y?zn(m):[]}}function co(m,y,I,V,$){m.emplaceBack(y*2+(V+1)/2,I*2+($+1)/2)}var ts=function(y){this.zoom=y.zoom,this.overscaling=y.overscaling,this.layers=y.layers,this.layerIds=this.layers.map(function(I){return I.id}),this.index=y.index,this.hasPattern=!1,this.layoutVertexArray=new Yr,this.indexArray=new pn,this.segments=new io,this.programConfigurations=new fi(y.layers,y.zoom),this.stateDependentLayerIds=this.layers.filter(function(I){return I.isStateDependent()}).map(function(I){return I.id})};ts.prototype.populate=function(y,I,V){var $=this.layers[0],ae=[],he=null;$.type==="circle"&&(he=$.layout.get("circle-sort-key"));for(var ze=0,rt=y;ze=Ci||_r<0||_r>=Ci)){var pr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,y.sortKey),Fr=pr.vertexLength;co(this.layoutVertexArray,or,_r,-1,-1),co(this.layoutVertexArray,or,_r,1,-1),co(this.layoutVertexArray,or,_r,1,1),co(this.layoutVertexArray,or,_r,-1,1),this.indexArray.emplaceBack(Fr,Fr+1,Fr+2),this.indexArray.emplaceBack(Fr,Fr+3,Fr+2),pr.vertexLength+=4,pr.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,y,V,{},$)},X("CircleBucket",ts,{omit:["layers"]});function so(m,y){for(var I=0;I=3){for(var ae=0;ae<$.length;ae++)if(Td(m,$[ae]))return!0}if(Cv(m,$,I))return!0}return!1}function Cv(m,y,I){if(m.length>1){if(Lv(m,y))return!0;for(var V=0;V1?m.distSqr(I):m.distSqr(I.sub(y)._mult($)._add(y))}function gp(m,y){for(var I=!1,V,$,ae,he=0;hey.y!=ae.y>y.y&&y.x<(ae.x-$.x)*(y.y-$.y)/(ae.y-$.y)+$.x&&(I=!I)}return I}function Td(m,y){for(var I=!1,V=0,$=m.length-1;Vy.y!=he.y>y.y&&y.x<(he.x-ae.x)*(y.y-ae.y)/(he.y-ae.y)+ae.x&&(I=!I)}return I}function mp(m,y,I,V,$){for(var ae=0,he=m;ae=ze.x&&$>=ze.y)return!0}var rt=[new u(y,I),new u(y,$),new u(V,$),new u(V,I)];if(m.length>2)for(var gt=0,Et=rt;gt$.x&&y.x>$.x||m.y$.y&&y.y>$.y)return!1;var ae=oe(m,y,I[0]);return ae!==oe(m,y,I[1])||ae!==oe(m,y,I[2])||ae!==oe(m,y,I[3])}function Ad(m,y,I){var V=y.paint.get(m).value;return V.kind==="constant"?V.value:I.programConfigurations.get(y.id).getMaxValue(m)}function Pv(m){return Math.sqrt(m[0]*m[0]+m[1]*m[1])}function Jv(m,y,I,V,$){if(!y[0]&&!y[1])return m;var ae=u.convert(y)._mult($);I==="viewport"&&ae._rotate(-V);for(var he=[],ze=0;ze0&&(ae=1/Math.sqrt(ae)),m[0]=y[0]*ae,m[1]=y[1]*ae,m[2]=y[2]*ae,m}function V9(m,y){return m[0]*y[0]+m[1]*y[1]+m[2]*y[2]}function G9(m,y,I){var V=y[0],$=y[1],ae=y[2],he=I[0],ze=I[1],rt=I[2];return m[0]=$*rt-ae*ze,m[1]=ae*he-V*rt,m[2]=V*ze-$*he,m}function H9(m,y,I){var V=y[0],$=y[1],ae=y[2];return m[0]=V*I[0]+$*I[3]+ae*I[6],m[1]=V*I[1]+$*I[4]+ae*I[7],m[2]=V*I[2]+$*I[5]+ae*I[8],m}var j9=um,OQ=function(){var m=lm();return function(y,I,V,$,ae,he){var ze,rt;for(I||(I=3),V||(V=0),$?rt=Math.min($*I+V,y.length):rt=y.length,ze=V;zem.width||$.height>m.height||I.x>m.width-$.width||I.y>m.height-$.height)throw new RangeError("out of range source coordinates for image copy");if($.width>y.width||$.height>y.height||V.x>y.width-$.width||V.y>y.height-$.height)throw new RangeError("out of range destination coordinates for image copy");for(var he=m.data,ze=y.data,rt=0;rt<$.height;rt++)for(var gt=((I.y+rt)*m.width+I.x)*ae,Et=((V.y+rt)*y.width+V.x)*ae,or=0;or<$.width*ae;or++)ze[Et+or]=he[gt+or];return y}var Dv=function(y,I){Md(this,y,1,I)};Dv.prototype.resize=function(y){Bw(this,y,1)},Dv.prototype.clone=function(){return new Dv({width:this.width,height:this.height},new Uint8Array(this.data))},Dv.copy=function(y,I,V,$,ae){Nw(y,I,V,$,ae,1)};var Eh=function(y,I){Md(this,y,4,I)};Eh.prototype.resize=function(y){Bw(this,y,4)},Eh.prototype.replace=function(y,I){I?this.data.set(y):y instanceof Uint8ClampedArray?this.data=new Uint8Array(y.buffer):this.data=y},Eh.prototype.clone=function(){return new Eh({width:this.width,height:this.height},new Uint8Array(this.data))},Eh.copy=function(y,I,V,$,ae){Nw(y,I,V,$,ae,4)},X("AlphaImage",Dv),X("RGBAImage",Eh);var $x=new Nr({"heatmap-radius":new bt(Rn.paint_heatmap["heatmap-radius"]),"heatmap-weight":new bt(Rn.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Me(Rn.paint_heatmap["heatmap-intensity"]),"heatmap-color":new jr(Rn.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Me(Rn.paint_heatmap["heatmap-opacity"])}),P1={paint:$x};function Qx(m){var y={},I=m.resolution||256,V=m.clips?m.clips.length:1,$=m.image||new Eh({width:I,height:V}),ae=function(bn,nn,xn){y[m.evaluationKey]=xn;var Pn=m.expression.evaluate(y);$.data[bn+nn+0]=Math.floor(Pn.r*255/Pn.a),$.data[bn+nn+1]=Math.floor(Pn.g*255/Pn.a),$.data[bn+nn+2]=Math.floor(Pn.b*255/Pn.a),$.data[bn+nn+3]=Math.floor(Pn.a*255)};if(m.clips)for(var gt=0,Et=0;gt80*I){ze=gt=m[0],rt=Et=m[1];for(var Fr=I;Fr<$;Fr+=I)or=m[Fr],_r=m[Fr+1],orgt&&(gt=or),_r>Et&&(Et=_r);pr=Math.max(gt-ze,Et-rt),pr=pr!==0?1/pr:0}return eb(ae,he,I,ze,rt,pr),he}function Gw(m,y,I,V,$){var ae,he;if($===mS(m,y,I,V)>0)for(ae=y;ae=y;ae-=V)he=FC(ae,m[ae],m[ae+1],he);return he&&rb(he,he.next)&&(ab(he),he=he.next),he}function cm(m,y){if(!m)return m;y||(y=m);var I=m,V;do if(V=!1,!I.steiner&&(rb(I,I.next)||Tf(I.prev,I,I.next)===0)){if(ab(I),I=y=I.prev,I===I.next)break;V=!0}else I=I.next;while(V||I!==y);return y}function eb(m,y,I,V,$,ae,he){if(m){!he&&ae&&Hw(m,V,$,ae);for(var ze=m,rt,gt;m.prev!==m.next;){if(rt=m.prev,gt=m.next,ae?IC(m,V,$,ae):PC(m)){y.push(rt.i/I),y.push(m.i/I),y.push(gt.i/I),ab(m),m=gt.next,ze=gt.next;continue}if(m=gt,m===ze){he?he===1?(m=tb(cm(m),y,I),eb(m,y,I,V,$,ae,2)):he===2&&v0(m,y,I,V,$,ae):eb(cm(m),y,I,V,$,ae,1);break}}}}function PC(m){var y=m.prev,I=m,V=m.next;if(Tf(y,I,V)>=0)return!1;for(var $=m.next.next;$!==m.prev;){if(hm(y.x,y.y,I.x,I.y,V.x,V.y,$.x,$.y)&&Tf($.prev,$,$.next)>=0)return!1;$=$.next}return!0}function IC(m,y,I,V){var $=m.prev,ae=m,he=m.next;if(Tf($,ae,he)>=0)return!1;for(var ze=$.xae.x?$.x>he.x?$.x:he.x:ae.x>he.x?ae.x:he.x,Et=$.y>ae.y?$.y>he.y?$.y:he.y:ae.y>he.y?ae.y:he.y,or=dS(ze,rt,y,I,V),_r=dS(gt,Et,y,I,V),pr=m.prevZ,Fr=m.nextZ;pr&&pr.z>=or&&Fr&&Fr.z<=_r;){if(pr!==m.prev&&pr!==m.next&&hm($.x,$.y,ae.x,ae.y,he.x,he.y,pr.x,pr.y)&&Tf(pr.prev,pr,pr.next)>=0||(pr=pr.prevZ,Fr!==m.prev&&Fr!==m.next&&hm($.x,$.y,ae.x,ae.y,he.x,he.y,Fr.x,Fr.y)&&Tf(Fr.prev,Fr,Fr.next)>=0))return!1;Fr=Fr.nextZ}for(;pr&&pr.z>=or;){if(pr!==m.prev&&pr!==m.next&&hm($.x,$.y,ae.x,ae.y,he.x,he.y,pr.x,pr.y)&&Tf(pr.prev,pr,pr.next)>=0)return!1;pr=pr.prevZ}for(;Fr&&Fr.z<=_r;){if(Fr!==m.prev&&Fr!==m.next&&hm($.x,$.y,ae.x,ae.y,he.x,he.y,Fr.x,Fr.y)&&Tf(Fr.prev,Fr,Fr.next)>=0)return!1;Fr=Fr.nextZ}return!0}function tb(m,y,I){var V=m;do{var $=V.prev,ae=V.next.next;!rb($,ae)&&jw($,V,V.next,ae)&&nb($,ae)&&nb(ae,$)&&(y.push($.i/I),y.push(V.i/I),y.push(ae.i/I),ab(V),ab(V.next),V=m=ae),V=V.next}while(V!==m);return cm(V)}function v0(m,y,I,V,$,ae){var he=m;do{for(var ze=he.next.next;ze!==he.prev;){if(he.i!==ze.i&&R1(he,ze)){var rt=pS(he,ze);he=cm(he,he.next),rt=cm(rt,rt.next),eb(he,y,I,V,$,ae),eb(rt,y,I,V,$,ae);return}ze=ze.next}he=he.next}while(he!==m)}function fm(m,y,I,V){var $=[],ae,he,ze,rt,gt;for(ae=0,he=y.length;ae=I.next.y&&I.next.y!==I.y){var ze=I.x+($-I.y)*(I.next.x-I.x)/(I.next.y-I.y);if(ze<=V&&ze>ae){if(ae=ze,ze===V){if($===I.y)return I;if($===I.next.y)return I.next}he=I.x=I.x&&I.x>=gt&&V!==I.x&&hm($he.x||I.x===he.x&&eO(he,I)))&&(he=I,or=_r)),I=I.next;while(I!==rt);return he}function eO(m,y){return Tf(m.prev,m,y.prev)<0&&Tf(y.next,m,m.next)<0}function Hw(m,y,I,V){var $=m;do $.z===null&&($.z=dS($.x,$.y,y,I,V)),$.prevZ=$.prev,$.nextZ=$.next,$=$.next;while($!==m);$.prevZ.nextZ=null,$.prevZ=null,hS($)}function hS(m){var y,I,V,$,ae,he,ze,rt,gt=1;do{for(I=m,m=null,ae=null,he=0;I;){for(he++,V=I,ze=0,y=0;y0||rt>0&&V;)ze!==0&&(rt===0||!V||I.z<=V.z)?($=I,I=I.nextZ,ze--):($=V,V=V.nextZ,rt--),ae?ae.nextZ=$:m=$,$.prevZ=ae,ae=$;I=V}ae.nextZ=null,gt*=2}while(he>1);return m}function dS(m,y,I,V,$){return m=32767*(m-I)*$,y=32767*(y-V)*$,m=(m|m<<8)&16711935,m=(m|m<<4)&252645135,m=(m|m<<2)&858993459,m=(m|m<<1)&1431655765,y=(y|y<<8)&16711935,y=(y|y<<4)&252645135,y=(y|y<<2)&858993459,y=(y|y<<1)&1431655765,m|y<<1}function vS(m){var y=m,I=m;do(y.x=0&&(m-he)*(V-ze)-(I-he)*(y-ze)>=0&&(I-he)*(ae-ze)-($-he)*(V-ze)>=0}function R1(m,y){return m.next.i!==y.i&&m.prev.i!==y.i&&!DC(m,y)&&(nb(m,y)&&nb(y,m)&&tO(m,y)&&(Tf(m.prev,m,y.prev)||Tf(m,y.prev,y))||rb(m,y)&&Tf(m.prev,m,m.next)>0&&Tf(y.prev,y,y.next)>0)}function Tf(m,y,I){return(y.y-m.y)*(I.x-y.x)-(y.x-m.x)*(I.y-y.y)}function rb(m,y){return m.x===y.x&&m.y===y.y}function jw(m,y,I,V){var $=gy(Tf(m,y,I)),ae=gy(Tf(m,y,V)),he=gy(Tf(I,V,m)),ze=gy(Tf(I,V,y));return!!($!==ae&&he!==ze||$===0&&ib(m,I,y)||ae===0&&ib(m,V,y)||he===0&&ib(I,m,V)||ze===0&&ib(I,y,V))}function ib(m,y,I){return y.x<=Math.max(m.x,I.x)&&y.x>=Math.min(m.x,I.x)&&y.y<=Math.max(m.y,I.y)&&y.y>=Math.min(m.y,I.y)}function gy(m){return m>0?1:m<0?-1:0}function DC(m,y){var I=m;do{if(I.i!==m.i&&I.next.i!==m.i&&I.i!==y.i&&I.next.i!==y.i&&jw(I,I.next,m,y))return!0;I=I.next}while(I!==m);return!1}function nb(m,y){return Tf(m.prev,m,m.next)<0?Tf(m,y,m.next)>=0&&Tf(m,m.prev,y)>=0:Tf(m,y,m.prev)<0||Tf(m,m.next,y)<0}function tO(m,y){var I=m,V=!1,$=(m.x+y.x)/2,ae=(m.y+y.y)/2;do I.y>ae!=I.next.y>ae&&I.next.y!==I.y&&$<(I.next.x-I.x)*(ae-I.y)/(I.next.y-I.y)+I.x&&(V=!V),I=I.next;while(I!==m);return V}function pS(m,y){var I=new gS(m.i,m.x,m.y),V=new gS(y.i,y.x,y.y),$=m.next,ae=y.prev;return m.next=y,y.prev=m,I.next=$,$.prev=I,V.next=I,I.prev=V,ae.next=V,V.prev=ae,V}function FC(m,y,I,V){var $=new gS(m,y,I);return V?($.next=V.next,$.prev=V,V.next.prev=$,V.next=$):($.prev=$,$.next=$),$}function ab(m){m.next.prev=m.prev,m.prev.next=m.next,m.prevZ&&(m.prevZ.nextZ=m.nextZ),m.nextZ&&(m.nextZ.prevZ=m.prevZ)}function gS(m,y,I){this.i=m,this.x=y,this.y=I,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}I1.deviation=function(m,y,I,V){var $=y&&y.length,ae=$?y[0]*I:m.length,he=Math.abs(mS(m,0,ae,I));if($)for(var ze=0,rt=y.length;ze0&&(V+=m[$-1].length,I.holes.push(V))}return I},Vw.default=LC;function yS(m,y,I,V,$){pg(m,y,I||0,V||m.length-1,$||zC)}function pg(m,y,I,V,$){for(;V>I;){if(V-I>600){var ae=V-I+1,he=y-I+1,ze=Math.log(ae),rt=.5*Math.exp(2*ze/3),gt=.5*Math.sqrt(ze*rt*(ae-rt)/ae)*(he-ae/2<0?-1:1),Et=Math.max(I,Math.floor(y-he*rt/ae+gt)),or=Math.min(V,Math.floor(y+(ae-he)*rt/ae+gt));pg(m,y,Et,or,$)}var _r=m[y],pr=I,Fr=V;for(D1(m,I,y),$(m[V],_r)>0&&D1(m,I,V);pr0;)Fr--}$(m[I],_r)===0?D1(m,I,Fr):(Fr++,D1(m,Fr,V)),Fr<=y&&(I=Fr+1),y<=Fr&&(V=Fr-1)}}function D1(m,y,I){var V=m[y];m[y]=m[I],m[I]=V}function zC(m,y){return my?1:0}function Ww(m,y){var I=m.length;if(I<=1)return[m];for(var V=[],$,ae,he=0;he1)for(var rt=0;rt>3}if(V--,I===1||I===2)$+=m.readSVarint(),ae+=m.readSVarint(),I===1&&(ze&&he.push(ze),ze=[]),ze.push(new u($,ae));else if(I===7)ze&&ze.push(ze[0].clone());else throw new Error("unknown command "+I)}return ze&&he.push(ze),he},my.prototype.bbox=function(){var m=this._pbf;m.pos=this._geometry;for(var y=m.readVarint()+m.pos,I=1,V=0,$=0,ae=0,he=1/0,ze=-1/0,rt=1/0,gt=-1/0;m.pos>3}if(V--,I===1||I===2)$+=m.readSVarint(),ae+=m.readSVarint(),$ze&&(ze=$),aegt&&(gt=ae);else if(I!==7)throw new Error("unknown command "+I)}return[he,rt,ze,gt]},my.prototype.toGeoJSON=function(m,y,I){var V=this.extent*Math.pow(2,I),$=this.extent*m,ae=this.extent*y,he=this.loadGeometry(),ze=my.types[this.type],rt,gt;function Et(pr){for(var Fr=0;Fr>3;y=V===1?m.readString():V===2?m.readFloat():V===3?m.readDouble():V===4?m.readVarint64():V===5?m.readVarint():V===6?m.readSVarint():V===7?m.readBoolean():null}return y}bS.prototype.feature=function(m){if(m<0||m>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[m];var y=this._pbf.readVarint()+this._pbf.pos;return new xS(this._pbf,y,this.extent,this._keys,this._values)};var WC=iO;function iO(m,y){this.layers=m.readFields(nO,{},y)}function nO(m,y,I){if(m===3){var V=new gg(I,I.readVarint()+I.pos);V.length&&(y[V.name]=V)}}var XC=WC,F1=xS,ZC=gg,mg={VectorTile:XC,VectorTileFeature:F1,VectorTileLayer:ZC},YC=mg.VectorTileFeature.types,Zw=500,z1=Math.pow(2,13);function dm(m,y,I,V,$,ae,he,ze){m.emplaceBack(y,I,Math.floor(V*z1)*2+he,$*z1*2,ae*z1*2,Math.round(ze))}var Vp=function(y){this.zoom=y.zoom,this.overscaling=y.overscaling,this.layers=y.layers,this.layerIds=this.layers.map(function(I){return I.id}),this.index=y.index,this.hasPattern=!1,this.layoutVertexArray=new Ri,this.indexArray=new pn,this.programConfigurations=new fi(y.layers,y.zoom),this.segments=new io,this.stateDependentLayerIds=this.layers.filter(function(I){return I.isStateDependent()}).map(function(I){return I.id})};Vp.prototype.populate=function(y,I,V){this.features=[],this.hasPattern=Xw("fill-extrusion",this.layers,I);for(var $=0,ae=y;$=1){var xn=Hi[bn-1];if(!aO(nn,xn)){pr.vertexLength+4>io.MAX_VERTEX_ARRAY_LENGTH&&(pr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var Pn=nn.sub(xn)._perp()._unit(),Zn=xn.dist(nn);Ai+Zn>32768&&(Ai=0),dm(this.layoutVertexArray,nn.x,nn.y,Pn.x,Pn.y,0,0,Ai),dm(this.layoutVertexArray,nn.x,nn.y,Pn.x,Pn.y,0,1,Ai),Ai+=Zn,dm(this.layoutVertexArray,xn.x,xn.y,Pn.x,Pn.y,0,0,Ai),dm(this.layoutVertexArray,xn.x,xn.y,Pn.x,Pn.y,0,1,Ai);var ga=pr.vertexLength;this.indexArray.emplaceBack(ga,ga+2,ga+1),this.indexArray.emplaceBack(ga+1,ga+2,ga+3),pr.vertexLength+=4,pr.primitiveLength+=2}}}}if(pr.vertexLength+gt>io.MAX_VERTEX_ARRAY_LENGTH&&(pr=this.segments.prepareSegment(gt,this.layoutVertexArray,this.indexArray)),YC[y.type]==="Polygon"){for(var ha=[],eo=[],za=pr.vertexLength,Za=0,Jo=rt;ZaCi)||m.y===y.y&&(m.y<0||m.y>Ci)}function oO(m){return m.every(function(y){return y.x<0})||m.every(function(y){return y.x>Ci})||m.every(function(y){return y.y<0})||m.every(function(y){return y.y>Ci})}var O1=new Nr({"fill-extrusion-opacity":new Me(Rn["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new bt(Rn["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Me(Rn["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Me(Rn["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new zt(Rn["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new bt(Rn["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new bt(Rn["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Me(Rn["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),ld={paint:O1},vm=function(m){function y(I){m.call(this,I,ld)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.createBucket=function(V){return new Vp(V)},y.prototype.queryRadius=function(){return Pv(this.paint.get("fill-extrusion-translate"))},y.prototype.is3D=function(){return!0},y.prototype.queryIntersectsFeature=function(V,$,ae,he,ze,rt,gt,Et){var or=Jv(V,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),rt.angle,gt),_r=this.paint.get("fill-extrusion-height").evaluate($,ae),pr=this.paint.get("fill-extrusion-base").evaluate($,ae),Fr=sO(or,Et,rt,0),oi=TS(he,pr,_r,Et),Hi=oi[0],Ai=oi[1];return KC(Hi,Ai,Fr)},y}(mi);function yy(m,y){return m.x*y.x+m.y*y.y}function wS(m,y){if(m.length===1){for(var I=0,V=y[I++],$;!$||V.equals($);)if($=y[I++],!$)return 1/0;for(;I=2&&y[gt-1].equals(y[gt-2]);)gt--;for(var Et=0;Et0;if(ha&&bn>Et){var za=pr.dist(Fr);if(za>2*or){var Za=pr.sub(pr.sub(Fr)._mult(or/za)._round());this.updateDistance(Fr,Za),this.addCurrentVertex(Za,Hi,0,0,_r),Fr=Za}}var Jo=Fr&&oi,to=Jo?V:rt?"butt":$;if(Jo&&to==="round"&&(Znae&&(to="bevel"),to==="bevel"&&(Zn>2&&(to="flipbevel"),Zn100)nn=Ai.mult(-1);else{var ao=Zn*Hi.add(Ai).mag()/Hi.sub(Ai).mag();nn._perp()._mult(ao*(eo?-1:1))}this.addCurrentVertex(pr,nn,0,0,_r),this.addCurrentVertex(pr,nn.mult(-1),0,0,_r)}else if(to==="bevel"||to==="fakeround"){var _s=-Math.sqrt(Zn*Zn-1),jo=eo?_s:0,El=eo?0:_s;if(Fr&&this.addCurrentVertex(pr,Hi,jo,El,_r),to==="fakeround")for(var Iu=Math.round(ga*180/Math.PI/SS),kl=1;kl2*or){var ch=pr.add(oi.sub(pr)._mult(or/$h)._round());this.updateDistance(pr,ch),this.addCurrentVertex(ch,Ai,0,0,_r),pr=ch}}}}},sh.prototype.addCurrentVertex=function(y,I,V,$,ae,he){he===void 0&&(he=!1);var ze=I.x+I.y*V,rt=I.y-I.x*V,gt=-I.x+I.y*$,Et=-I.y-I.x*$;this.addHalfVertex(y,ze,rt,he,!1,V,ae),this.addHalfVertex(y,gt,Et,he,!0,-$,ae),this.distance>cb/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(y,I,V,$,ae,he))},sh.prototype.addHalfVertex=function(y,I,V,$,ae,he,ze){var rt=y.x,gt=y.y,Et=this.lineClips?this.scaledDistance*(cb-1):this.scaledDistance,or=Et*Kw;if(this.layoutVertexArray.emplaceBack((rt<<1)+($?1:0),(gt<<1)+(ae?1:0),Math.round(Yw*I)+128,Math.round(Yw*V)+128,(he===0?0:he<0?-1:1)+1|(or&63)<<2,or>>6),this.lineClips){var _r=this.scaledDistance-this.lineClips.start,pr=this.lineClips.end-this.lineClips.start,Fr=_r/pr;this.layoutVertexArray2.emplaceBack(Fr,this.lineClipsArray.length)}var oi=ze.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,oi),ze.primitiveLength++),ae?this.e2=oi:this.e1=oi},sh.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},sh.prototype.updateDistance=function(y,I){this.distance+=y.dist(I),this.updateScaledDistance()},X("LineBucket",sh,{omit:["layers","patternFeatures"]});var MS=new Nr({"line-cap":new Me(Rn.layout_line["line-cap"]),"line-join":new bt(Rn.layout_line["line-join"]),"line-miter-limit":new Me(Rn.layout_line["line-miter-limit"]),"line-round-limit":new Me(Rn.layout_line["line-round-limit"]),"line-sort-key":new bt(Rn.layout_line["line-sort-key"])}),ES=new Nr({"line-opacity":new bt(Rn.paint_line["line-opacity"]),"line-color":new bt(Rn.paint_line["line-color"]),"line-translate":new Me(Rn.paint_line["line-translate"]),"line-translate-anchor":new Me(Rn.paint_line["line-translate-anchor"]),"line-width":new bt(Rn.paint_line["line-width"]),"line-gap-width":new bt(Rn.paint_line["line-gap-width"]),"line-offset":new bt(Rn.paint_line["line-offset"]),"line-blur":new bt(Rn.paint_line["line-blur"]),"line-dasharray":new Rr(Rn.paint_line["line-dasharray"]),"line-pattern":new zt(Rn.paint_line["line-pattern"]),"line-gradient":new jr(Rn.paint_line["line-gradient"])}),Jw={paint:ES,layout:MS},uO=function(m){function y(){m.apply(this,arguments)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.possiblyEvaluate=function(V,$){return $=new Gn(Math.floor($.zoom),{now:$.now,fadeDuration:$.fadeDuration,zoomHistory:$.zoomHistory,transition:$.transition}),m.prototype.possiblyEvaluate.call(this,V,$)},y.prototype.evaluate=function(V,$,ae,he){return $=x({},$,{zoom:Math.floor($.zoom)}),m.prototype.evaluate.call(this,V,$,ae,he)},y}(bt),R=new uO(Jw.paint.properties["line-width"].specification);R.useIntegerZoom=!0;var S=function(m){function y(I){m.call(this,I,Jw),this.gradientVersion=0}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype._handleSpecialPaintPropertyUpdate=function(V){if(V==="line-gradient"){var $=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=$._styleExpression.expression instanceof _u,this.gradientVersion=(this.gradientVersion+1)%d}},y.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},y.prototype.recalculate=function(V,$){m.prototype.recalculate.call(this,V,$),this.paint._values["line-floorwidth"]=R.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,V)},y.prototype.createBucket=function(V){return new sh(V)},y.prototype.queryRadius=function(V){var $=V,ae=F(Ad("line-width",this,$),Ad("line-gap-width",this,$)),he=Ad("line-offset",this,$);return ae/2+Math.abs(he)+Pv(this.paint.get("line-translate"))},y.prototype.queryIntersectsFeature=function(V,$,ae,he,ze,rt,gt){var Et=Jv(V,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),rt.angle,gt),or=gt/2*F(this.paint.get("line-width").evaluate($,ae),this.paint.get("line-gap-width").evaluate($,ae)),_r=this.paint.get("line-offset").evaluate($,ae);return _r&&(he=W(he,_r*gt)),ou(Et,he,or)},y.prototype.isTileClipped=function(){return!0},y}(mi);function F(m,y){return y>0?y+2*m:m}function W(m,y){for(var I=[],V=new u(0,0),$=0;$":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"};function un(m){for(var y="",I=0;I>1,Et=-7,or=I?$-1:0,_r=I?-1:1,pr=m[y+or];for(or+=_r,ae=pr&(1<<-Et)-1,pr>>=-Et,Et+=ze;Et>0;ae=ae*256+m[y+or],or+=_r,Et-=8);for(he=ae&(1<<-Et)-1,ae>>=-Et,Et+=V;Et>0;he=he*256+m[y+or],or+=_r,Et-=8);if(ae===0)ae=1-gt;else{if(ae===rt)return he?NaN:(pr?-1:1)*(1/0);he=he+Math.pow(2,V),ae=ae-gt}return(pr?-1:1)*he*Math.pow(2,ae-V)},ro=function(m,y,I,V,$,ae){var he,ze,rt,gt=ae*8-$-1,Et=(1<>1,_r=$===23?Math.pow(2,-24)-Math.pow(2,-77):0,pr=V?0:ae-1,Fr=V?1:-1,oi=y<0||y===0&&1/y<0?1:0;for(y=Math.abs(y),isNaN(y)||y===1/0?(ze=isNaN(y)?1:0,he=Et):(he=Math.floor(Math.log(y)/Math.LN2),y*(rt=Math.pow(2,-he))<1&&(he--,rt*=2),he+or>=1?y+=_r/rt:y+=_r*Math.pow(2,1-or),y*rt>=2&&(he++,rt/=2),he+or>=Et?(ze=0,he=Et):he+or>=1?(ze=(y*rt-1)*Math.pow(2,$),he=he+or):(ze=y*Math.pow(2,or-1)*Math.pow(2,$),he=0));$>=8;m[I+pr]=ze&255,pr+=Fr,ze/=256,$-=8);for(he=he<<$|ze,gt+=$;gt>0;m[I+pr]=he&255,pr+=Fr,he/=256,gt-=8);m[I+pr-Fr]|=oi*128},Vo={read:pa,write:ro},Xa=sa;function sa(m){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(m)?m:new Uint8Array(m||0),this.pos=0,this.type=0,this.length=this.buf.length}sa.Varint=0,sa.Fixed64=1,sa.Bytes=2,sa.Fixed32=5;var Mo=65536*65536,fo=1/Mo,lo=12,Xn=typeof TextDecoder=="undefined"?null:new TextDecoder("utf8");sa.prototype={destroy:function(){this.buf=null},readFields:function(m,y,I){for(I=I||this.length;this.pos>3,ae=this.pos;this.type=V&7,m($,y,this),this.pos===ae&&this.skip(V)}return y},readMessage:function(m,y){return this.readFields(m,y,this.readVarint()+this.pos)},readFixed32:function(){var m=Yh(this.buf,this.pos);return this.pos+=4,m},readSFixed32:function(){var m=Fv(this.buf,this.pos);return this.pos+=4,m},readFixed64:function(){var m=Yh(this.buf,this.pos)+Yh(this.buf,this.pos+4)*Mo;return this.pos+=8,m},readSFixed64:function(){var m=Yh(this.buf,this.pos)+Fv(this.buf,this.pos+4)*Mo;return this.pos+=8,m},readFloat:function(){var m=Vo.read(this.buf,this.pos,!0,23,4);return this.pos+=4,m},readDouble:function(){var m=Vo.read(this.buf,this.pos,!0,52,8);return this.pos+=8,m},readVarint:function(m){var y=this.buf,I,V;return V=y[this.pos++],I=V&127,V<128||(V=y[this.pos++],I|=(V&127)<<7,V<128)||(V=y[this.pos++],I|=(V&127)<<14,V<128)||(V=y[this.pos++],I|=(V&127)<<21,V<128)?I:(V=y[this.pos],I|=(V&15)<<28,Ro(I,m,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var m=this.readVarint();return m%2===1?(m+1)/-2:m/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var m=this.readVarint()+this.pos,y=this.pos;return this.pos=m,m-y>=lo&&Xn?ru(this.buf,y,m):lv(this.buf,y,m)},readBytes:function(){var m=this.readVarint()+this.pos,y=this.buf.subarray(this.pos,m);return this.pos=m,y},readPackedVarint:function(m,y){if(this.type!==sa.Bytes)return m.push(this.readVarint(y));var I=uo(this);for(m=m||[];this.pos127;);else if(y===sa.Bytes)this.pos=this.readVarint()+this.pos;else if(y===sa.Fixed32)this.pos+=4;else if(y===sa.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+y)},writeTag:function(m,y){this.writeVarint(m<<3|y)},realloc:function(m){for(var y=this.length||16;y268435455||m<0){Ju(m,this);return}this.realloc(4),this.buf[this.pos++]=m&127|(m>127?128:0),!(m<=127)&&(this.buf[this.pos++]=(m>>>=7)&127|(m>127?128:0),!(m<=127)&&(this.buf[this.pos++]=(m>>>=7)&127|(m>127?128:0),!(m<=127)&&(this.buf[this.pos++]=m>>>7&127)))},writeSVarint:function(m){this.writeVarint(m<0?-m*2-1:m*2)},writeBoolean:function(m){this.writeVarint(!!m)},writeString:function(m){m=String(m),this.realloc(m.length*4),this.pos++;var y=this.pos;this.pos=pc(this.buf,m,this.pos);var I=this.pos-y;I>=128&&Qv(y,I,this),this.pos=y-1,this.writeVarint(I),this.pos+=I},writeFloat:function(m){this.realloc(4),Vo.write(this.buf,m,this.pos,!0,23,4),this.pos+=4},writeDouble:function(m){this.realloc(8),Vo.write(this.buf,m,this.pos,!0,52,8),this.pos+=8},writeBytes:function(m){var y=m.length;this.writeVarint(y),this.realloc(y);for(var I=0;I=128&&Qv(I,V,this),this.pos=I-1,this.writeVarint(V),this.pos+=V},writeMessage:function(m,y,I){this.writeTag(m,sa.Bytes),this.writeRawMessage(y,I)},writePackedVarint:function(m,y){y.length&&this.writeMessage(m,ud,y)},writePackedSVarint:function(m,y){y.length&&this.writeMessage(m,Ch,y)},writePackedBoolean:function(m,y){y.length&&this.writeMessage(m,Hd,y)},writePackedFloat:function(m,y){y.length&&this.writeMessage(m,Vd,y)},writePackedDouble:function(m,y){y.length&&this.writeMessage(m,Gd,y)},writePackedFixed32:function(m,y){y.length&&this.writeMessage(m,Af,y)},writePackedSFixed32:function(m,y){y.length&&this.writeMessage(m,Lh,y)},writePackedFixed64:function(m,y){y.length&&this.writeMessage(m,Ed,y)},writePackedSFixed64:function(m,y){y.length&&this.writeMessage(m,cd,y)},writeBytesField:function(m,y){this.writeTag(m,sa.Bytes),this.writeBytes(y)},writeFixed32Field:function(m,y){this.writeTag(m,sa.Fixed32),this.writeFixed32(y)},writeSFixed32Field:function(m,y){this.writeTag(m,sa.Fixed32),this.writeSFixed32(y)},writeFixed64Field:function(m,y){this.writeTag(m,sa.Fixed64),this.writeFixed64(y)},writeSFixed64Field:function(m,y){this.writeTag(m,sa.Fixed64),this.writeSFixed64(y)},writeVarintField:function(m,y){this.writeTag(m,sa.Varint),this.writeVarint(y)},writeSVarintField:function(m,y){this.writeTag(m,sa.Varint),this.writeSVarint(y)},writeStringField:function(m,y){this.writeTag(m,sa.Bytes),this.writeString(y)},writeFloatField:function(m,y){this.writeTag(m,sa.Fixed32),this.writeFloat(y)},writeDoubleField:function(m,y){this.writeTag(m,sa.Fixed64),this.writeDouble(y)},writeBooleanField:function(m,y){this.writeVarintField(m,!!y)}};function Ro(m,y,I){var V=I.buf,$,ae;if(ae=V[I.pos++],$=(ae&112)>>4,ae<128||(ae=V[I.pos++],$|=(ae&127)<<3,ae<128)||(ae=V[I.pos++],$|=(ae&127)<<10,ae<128)||(ae=V[I.pos++],$|=(ae&127)<<17,ae<128)||(ae=V[I.pos++],$|=(ae&127)<<24,ae<128)||(ae=V[I.pos++],$|=(ae&1)<<31,ae<128))return $o(m,$,y);throw new Error("Expected varint not more than 10 bytes")}function uo(m){return m.type===sa.Bytes?m.readVarint()+m.pos:m.pos+1}function $o(m,y,I){return I?y*4294967296+(m>>>0):(y>>>0)*4294967296+(m>>>0)}function Ju(m,y){var I,V;if(m>=0?(I=m%4294967296|0,V=m/4294967296|0):(I=~(-m%4294967296),V=~(-m/4294967296),I^4294967295?I=I+1|0:(I=0,V=V+1|0)),m>=18446744073709552e3||m<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");y.realloc(10),qu(I,V,y),kh(V,y)}function qu(m,y,I){I.buf[I.pos++]=m&127|128,m>>>=7,I.buf[I.pos++]=m&127|128,m>>>=7,I.buf[I.pos++]=m&127|128,m>>>=7,I.buf[I.pos++]=m&127|128,m>>>=7,I.buf[I.pos]=m&127}function kh(m,y){var I=(m&7)<<4;y.buf[y.pos++]|=I|((m>>>=3)?128:0),m&&(y.buf[y.pos++]=m&127|((m>>>=7)?128:0),m&&(y.buf[y.pos++]=m&127|((m>>>=7)?128:0),m&&(y.buf[y.pos++]=m&127|((m>>>=7)?128:0),m&&(y.buf[y.pos++]=m&127|((m>>>=7)?128:0),m&&(y.buf[y.pos++]=m&127)))))}function Qv(m,y,I){var V=y<=16383?1:y<=2097151?2:y<=268435455?3:Math.floor(Math.log(y)/(Math.LN2*7));I.realloc(V);for(var $=I.pos-1;$>=m;$--)I.buf[$+V]=I.buf[$]}function ud(m,y){for(var I=0;I>>8,m[I+2]=y>>>16,m[I+3]=y>>>24}function Fv(m,y){return(m[y]|m[y+1]<<8|m[y+2]<<16)+(m[y+3]<<24)}function lv(m,y,I){for(var V="",$=y;$239?4:ae>223?3:ae>191?2:1;if($+ze>I)break;var rt,gt,Et;ze===1?ae<128&&(he=ae):ze===2?(rt=m[$+1],(rt&192)===128&&(he=(ae&31)<<6|rt&63,he<=127&&(he=null))):ze===3?(rt=m[$+1],gt=m[$+2],(rt&192)===128&&(gt&192)===128&&(he=(ae&15)<<12|(rt&63)<<6|gt&63,(he<=2047||he>=55296&&he<=57343)&&(he=null))):ze===4&&(rt=m[$+1],gt=m[$+2],Et=m[$+3],(rt&192)===128&&(gt&192)===128&&(Et&192)===128&&(he=(ae&15)<<18|(rt&63)<<12|(gt&63)<<6|Et&63,(he<=65535||he>=1114112)&&(he=null))),he===null?(he=65533,ze=1):he>65535&&(he-=65536,V+=String.fromCharCode(he>>>10&1023|55296),he=56320|he&1023),V+=String.fromCharCode(he),$+=ze}return V}function ru(m,y,I){return Xn.decode(m.subarray(y,I))}function pc(m,y,I){for(var V=0,$,ae;V55295&&$<57344)if(ae)if($<56320){m[I++]=239,m[I++]=191,m[I++]=189,ae=$;continue}else $=ae-55296<<10|$-56320|65536,ae=null;else{$>56319||V+1===y.length?(m[I++]=239,m[I++]=191,m[I++]=189):ae=$;continue}else ae&&(m[I++]=239,m[I++]=191,m[I++]=189,ae=null);$<128?m[I++]=$:($<2048?m[I++]=$>>6|192:($<65536?m[I++]=$>>12|224:(m[I++]=$>>18|240,m[I++]=$>>12&63|128),m[I++]=$>>6&63|128),m[I++]=$&63|128)}return I}var $u=3;function zv(m,y,I){m===1&&I.readMessage(ff,y)}function ff(m,y,I){if(m===3){var V=I.readMessage(q1,{}),$=V.id,ae=V.bitmap,he=V.width,ze=V.height,rt=V.left,gt=V.top,Et=V.advance;y.push({id:$,bitmap:new Dv({width:he+2*$u,height:ze+2*$u},ae),metrics:{width:he,height:ze,left:rt,top:gt,advance:Et}})}}function q1(m,y,I){m===1?y.id=I.readVarint():m===2?y.bitmap=I.readBytes():m===3?y.width=I.readVarint():m===4?y.height=I.readVarint():m===5?y.left=I.readSVarint():m===6?y.top=I.readSVarint():m===7&&(y.advance=I.readVarint())}function p0(m){return new Xa(m).readFields(zv,[])}var Gp=$u;function ep(m){for(var y=0,I=0,V=0,$=m;V<$.length;V+=1){var ae=$[V];y+=ae.w*ae.h,I=Math.max(I,ae.w)}m.sort(function(Hi,Ai){return Ai.h-Hi.h});for(var he=Math.max(Math.ceil(Math.sqrt(y/.95)),I),ze=[{x:0,y:0,w:he,h:1/0}],rt=0,gt=0,Et=0,or=m;Et=0;pr--){var Fr=ze[pr];if(!(_r.w>Fr.w||_r.h>Fr.h)){if(_r.x=Fr.x,_r.y=Fr.y,gt=Math.max(gt,_r.y+_r.h),rt=Math.max(rt,_r.x+_r.w),_r.w===Fr.w&&_r.h===Fr.h){var oi=ze.pop();pr=0&&$>=y&&m0[this.text.charCodeAt($)];$--)V--;this.text=this.text.substring(y,V),this.sectionIndex=this.sectionIndex.slice(y,V)},Kh.prototype.substring=function(y,I){var V=new Kh;return V.text=this.text.substring(y,I),V.sectionIndex=this.sectionIndex.slice(y,I),V.sections=this.sections,V},Kh.prototype.toString=function(){return this.text},Kh.prototype.getMaxScale=function(){var y=this;return this.sectionIndex.reduce(function(I,V){return Math.max(I,y.sections[V].scale)},0)},Kh.prototype.addTextSection=function(y,I){this.text+=y.text,this.sections.push(_y.forText(y.scale,y.fontStack||I));for(var V=this.sections.length-1,$=0;$=g0?null:++this.imageSectionID:(this.imageSectionID=$w,this.imageSectionID)};function cO(m,y){for(var I=[],V=m.text,$=0,ae=0,he=y;ae=0,Et=0,or=0;or0&&ch>eo&&(eo=ch)}else{var Cl=I[Za.fontStack],yl=Cl&&Cl[to];if(yl&&yl.rect)jo=yl.rect,_s=yl.metrics;else{var Qu=y[Za.fontStack],gc=Qu&&Qu[to];if(!gc)continue;_s=gc.metrics}ao=(Pn-Za.scale)*Tn}kl?(m.verticalizable=!0,ha.push({glyph:to,imageName:El,x:_r,y:pr+ao,vertical:kl,scale:Za.scale,fontStack:Za.fontStack,sectionIndex:Jo,metrics:_s,rect:jo}),_r+=Iu*Za.scale+gt):(ha.push({glyph:to,imageName:El,x:_r,y:pr+ao,vertical:kl,scale:Za.scale,fontStack:Za.fontStack,sectionIndex:Jo,metrics:_s,rect:jo}),_r+=_s.advance*Za.scale+gt)}if(ha.length!==0){var Wd=_r-gt;Fr=Math.max(Wd,Fr),vO(ha,0,ha.length-1,Hi,eo)}_r=0;var Xd=ae*Pn+eo;ga.lineOffset=Math.max(eo,Zn),pr+=Xd,oi=Math.max(Xd,oi),++Ai}var Qh=pr-B1,fv=CS(he),hv=fv.horizontalAlign,Ph=fv.verticalAlign;kd(m.positionedLines,Hi,hv,Ph,Fr,oi,ae,Qh,$.length),m.top+=-Ph*Qh,m.bottom=m.top+Qh,m.left+=-hv*Fr,m.right=m.left+Fr}function vO(m,y,I,V,$){if(!(!V&&!$))for(var ae=m[I],he=ae.metrics.advance*ae.scale,ze=(m[I].x+he)*V,rt=y;rt<=I;rt++)m[rt].x-=ze,m[rt].y+=$}function kd(m,y,I,V,$,ae,he,ze,rt){var gt=(y-I)*$,Et=0;ae!==he?Et=-ze*V-B1:Et=(-V*rt+.5)*he;for(var or=0,_r=m;or<_r.length;or+=1)for(var pr=_r[or],Fr=0,oi=pr.positionedGlyphs;Fr-I/2;){if(he--,he<0)return!1;ze-=m[he].dist(ae),ae=m[he]}ze+=m[he].dist(m[he+1]),he++;for(var rt=[],gt=0;zeV;)gt-=rt.shift().angleDelta;if(gt>$)return!1;he++,ze+=or.dist(_r)}return!0}function VQ(m){for(var y=0,I=0;Igt){var Fr=(gt-rt)/pr,oi=nl(or.x,_r.x,Fr),Hi=nl(or.y,_r.y,Fr),Ai=new jd(oi,Hi,_r.angleTo(or),Et);return Ai._round(),!he||UQ(m,Ai,ze,he,y)?Ai:void 0}rt+=pr}}function Fet(m,y,I,V,$,ae,he,ze,rt){var gt=GQ(V,ae,he),Et=HQ(V,$),or=Et*he,_r=m[0].x===0||m[0].x===rt||m[0].y===0||m[0].y===rt;y-or=0&&xn=0&&Pn=0&&_r+gt<=Et){var Zn=new jd(xn,Pn,bn,Fr);Zn._round(),(!V||UQ(m,Zn,ae,V,$))&&pr.push(Zn)}}or+=Ai}return!ze&&!pr.length&&!he&&(pr=jQ(m,or/2,I,V,$,ae,he,!0,rt)),pr}function WQ(m,y,I,V,$){for(var ae=[],he=0;he=V&&or.x>=V)&&(Et.x>=V?Et=new u(V,Et.y+(or.y-Et.y)*((V-Et.x)/(or.x-Et.x)))._round():or.x>=V&&(or=new u(V,Et.y+(or.y-Et.y)*((V-Et.x)/(or.x-Et.x)))._round()),!(Et.y>=$&&or.y>=$)&&(Et.y>=$?Et=new u(Et.x+(or.x-Et.x)*(($-Et.y)/(or.y-Et.y)),$)._round():or.y>=$&&(or=new u(Et.x+(or.x-Et.x)*(($-Et.y)/(or.y-Et.y)),$)._round()),(!rt||!Et.equals(rt[rt.length-1]))&&(rt=[Et],ae.push(rt)),rt.push(or)))))}return ae}var t3=Gc;function XQ(m,y,I,V){var $=[],ae=m.image,he=ae.pixelRatio,ze=ae.paddedRect.w-2*t3,rt=ae.paddedRect.h-2*t3,gt=m.right-m.left,Et=m.bottom-m.top,or=ae.stretchX||[[0,ze]],_r=ae.stretchY||[[0,rt]],pr=function(Cl,yl){return Cl+yl[1]-yl[0]},Fr=or.reduce(pr,0),oi=_r.reduce(pr,0),Hi=ze-Fr,Ai=rt-oi,bn=0,nn=Fr,xn=0,Pn=oi,Zn=0,ga=Hi,ha=0,eo=Ai;if(ae.content&&V){var za=ae.content;bn=n6(or,0,za[0]),xn=n6(_r,0,za[1]),nn=n6(or,za[0],za[2]),Pn=n6(_r,za[1],za[3]),Zn=za[0]-bn,ha=za[1]-xn,ga=za[2]-za[0]-nn,eo=za[3]-za[1]-Pn}var Za=function(Cl,yl,Qu,gc){var Sf=a6(Cl.stretch-bn,nn,gt,m.left),Ff=o6(Cl.fixed-Zn,ga,Cl.stretch,Fr),$h=a6(yl.stretch-xn,Pn,Et,m.top),ch=o6(yl.fixed-ha,eo,yl.stretch,oi),Wd=a6(Qu.stretch-bn,nn,gt,m.left),Xd=o6(Qu.fixed-Zn,ga,Qu.stretch,Fr),Qh=a6(gc.stretch-xn,Pn,Et,m.top),fv=o6(gc.fixed-ha,eo,gc.stretch,oi),hv=new u(Sf,$h),Ph=new u(Wd,$h),dv=new u(Wd,Qh),bp=new u(Sf,Qh),wy=new u(Ff/he,ch/he),V1=new u(Xd/he,fv/he),G1=y*Math.PI/180;if(G1){var H1=Math.sin(G1),u3=Math.cos(G1),y0=[u3,-H1,H1,u3];hv._matMult(y0),Ph._matMult(y0),bp._matMult(y0),dv._matMult(y0)}var h6=Cl.stretch+Cl.fixed,wO=Qu.stretch+Qu.fixed,d6=yl.stretch+yl.fixed,TO=gc.stretch+gc.fixed,Hp={x:ae.paddedRect.x+t3+h6,y:ae.paddedRect.y+t3+d6,w:wO-h6,h:TO-d6},c3=ga/he/gt,v6=eo/he/Et;return{tl:hv,tr:Ph,bl:bp,br:dv,tex:Hp,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:wy,pixelOffsetBR:V1,minFontScaleX:c3,minFontScaleY:v6,isSDF:I}};if(!V||!ae.stretchX&&!ae.stretchY)$.push(Za({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:ze+1},{fixed:0,stretch:rt+1}));else for(var Jo=ZQ(or,Hi,Fr),to=ZQ(_r,Ai,oi),ao=0;ao0&&(Fr=Math.max(10,Fr),this.circleDiameter=Fr)}else{var oi=he.top*ze-rt,Hi=he.bottom*ze+rt,Ai=he.left*ze-rt,bn=he.right*ze+rt,nn=he.collisionPadding;if(nn&&(Ai-=nn[0]*ze,oi-=nn[1]*ze,bn+=nn[2]*ze,Hi+=nn[3]*ze),Et){var xn=new u(Ai,oi),Pn=new u(bn,oi),Zn=new u(Ai,Hi),ga=new u(bn,Hi),ha=Et*Math.PI/180;xn._rotate(ha),Pn._rotate(ha),Zn._rotate(ha),ga._rotate(ha),Ai=Math.min(xn.x,Pn.x,Zn.x,ga.x),bn=Math.max(xn.x,Pn.x,Zn.x,ga.x),oi=Math.min(xn.y,Pn.y,Zn.y,ga.y),Hi=Math.max(xn.y,Pn.y,Zn.y,ga.y)}y.emplaceBack(I.x,I.y,Ai,oi,bn,Hi,V,$,ae)}this.boxEndIndex=y.length},r3=function(y,I){if(y===void 0&&(y=[]),I===void 0&&(I=Oet),this.data=y,this.length=this.data.length,this.compare=I,this.length>0)for(var V=(this.length>>1)-1;V>=0;V--)this._down(V)};r3.prototype.push=function(y){this.data.push(y),this.length++,this._up(this.length-1)},r3.prototype.pop=function(){if(this.length!==0){var y=this.data[0],I=this.data.pop();return this.length--,this.length>0&&(this.data[0]=I,this._down(0)),y}},r3.prototype.peek=function(){return this.data[0]},r3.prototype._up=function(y){for(var I=this,V=I.data,$=I.compare,ae=V[y];y>0;){var he=y-1>>1,ze=V[he];if($(ae,ze)>=0)break;V[y]=ze,y=he}V[y]=ae},r3.prototype._down=function(y){for(var I=this,V=I.data,$=I.compare,ae=this.length>>1,he=V[y];y=0)break;V[y]=rt,y=ze}V[y]=he};function Oet(m,y){return my?1:0}function qet(m,y,I){y===void 0&&(y=1),I===void 0&&(I=!1);for(var V=1/0,$=1/0,ae=-1/0,he=-1/0,ze=m[0],rt=0;rtae)&&(ae=gt.x),(!rt||gt.y>he)&&(he=gt.y)}var Et=ae-V,or=he-$,_r=Math.min(Et,or),pr=_r/2,Fr=new r3([],Bet);if(_r===0)return new u(V,$);for(var oi=V;oiAi.d||!Ai.d)&&(Ai=nn,I&&console.log("found best %d after %d probes",Math.round(1e4*nn.d)/1e4,bn)),!(nn.max-Ai.d<=y)&&(pr=nn.h/2,Fr.push(new i3(nn.p.x-pr,nn.p.y-pr,pr,m)),Fr.push(new i3(nn.p.x+pr,nn.p.y-pr,pr,m)),Fr.push(new i3(nn.p.x-pr,nn.p.y+pr,pr,m)),Fr.push(new i3(nn.p.x+pr,nn.p.y+pr,pr,m)),bn+=4)}return I&&(console.log("num probes: "+bn),console.log("best distance: "+Ai.d)),Ai.p}function Bet(m,y){return y.max-m.max}function i3(m,y,I,V){this.p=new u(m,y),this.h=I,this.d=Net(this.p,V),this.max=this.d+this.h*Math.SQRT2}function Net(m,y){for(var I=!1,V=1/0,$=0;$m.y!=Et.y>m.y&&m.x<(Et.x-gt.x)*(m.y-gt.y)/(Et.y-gt.y)+gt.x&&(I=!I),V=Math.min(V,hg(m,gt,Et))}return(I?1:-1)*Math.sqrt(V)}function Uet(m){for(var y=0,I=0,V=0,$=m[0],ae=0,he=$.length,ze=he-1;ae=Ci||y0.y<0||y0.y>=Ci||Het(m,y0,u3,I,V,$,to,m.layers[0],m.collisionBoxArray,y.index,y.sourceLayerIndex,m.index,Ai,Pn,ha,rt,nn,Zn,eo,pr,y,ae,gt,Et,he)};if(za==="line")for(var _s=0,jo=WQ(y.geometry,0,0,Ci,Ci);_s1){var $h=Det(Ff,ga,I.vertical||Fr,V,oi,bn);$h&&ao(Ff,$h)}}else if(y.type==="Polygon")for(var ch=0,Wd=Ww(y.geometry,0);chN1&&re(m.layerIds[0]+': Value for "text-size" is >= '+LS+'. Reduce your "text-size".')):Hi.kind==="composite"&&(Ai=[Cd*pr.compositeTextSizes[0].evaluate(he,{},Fr),Cd*pr.compositeTextSizes[1].evaluate(he,{},Fr)],(Ai[0]>N1||Ai[1]>N1)&&re(m.layerIds[0]+': Value for "text-size" is >= '+LS+'. Reduce your "text-size".')),m.addSymbols(m.text,oi,Ai,ze,ae,he,gt,y,rt.lineStartIndex,rt.lineLength,_r,Fr);for(var bn=0,nn=Et;bnN1&&re(m.layerIds[0]+': Value for "icon-size" is >= '+LS+'. Reduce your "icon-size".')):hv.kind==="composite"&&(Ph=[Cd*Pn.compositeIconSizes[0].evaluate(xn,{},ga),Cd*Pn.compositeIconSizes[1].evaluate(xn,{},ga)],(Ph[0]>N1||Ph[1]>N1)&&re(m.layerIds[0]+': Value for "icon-size" is >= '+LS+'. Reduce your "icon-size".')),m.addSymbols(m.icon,Qh,Ph,nn,bn,xn,!1,y,za.lineStartIndex,za.lineLength,-1,ga),kl=m.icon.placedSymbolArray.length-1,fv&&(jo=fv.length*4,m.addSymbols(m.icon,fv,Ph,nn,bn,xn,uv.vertical,y,za.lineStartIndex,za.lineLength,-1,ga),Cl=m.icon.placedSymbolArray.length-1)}for(var dv in V.horizontal){var bp=V.horizontal[dv];if(!Za){Qu=K(bp.text);var wy=ze.layout.get("text-rotate").evaluate(xn,{},ga);Za=new s6(rt,y,gt,Et,or,bp,_r,pr,Fr,wy)}var V1=bp.positionedLines.length===1;if(El+=KQ(m,y,bp,ae,ze,Fr,xn,oi,za,V.vertical?uv.horizontal:uv.horizontalOnly,V1?Object.keys(V.horizontal):[dv],yl,kl,Pn,ga),V1)break}V.vertical&&(Iu+=KQ(m,y,V.vertical,ae,ze,Fr,xn,oi,za,uv.vertical,["vertical"],yl,Cl,Pn,ga));var G1=Za?Za.boxStartIndex:m.collisionBoxArray.length,H1=Za?Za.boxEndIndex:m.collisionBoxArray.length,u3=to?to.boxStartIndex:m.collisionBoxArray.length,y0=to?to.boxEndIndex:m.collisionBoxArray.length,h6=Jo?Jo.boxStartIndex:m.collisionBoxArray.length,wO=Jo?Jo.boxEndIndex:m.collisionBoxArray.length,d6=ao?ao.boxStartIndex:m.collisionBoxArray.length,TO=ao?ao.boxEndIndex:m.collisionBoxArray.length,Hp=-1,c3=function(RS,dee){return RS&&RS.circleDiameter?Math.max(RS.circleDiameter,dee):dee};Hp=c3(Za,Hp),Hp=c3(to,Hp),Hp=c3(Jo,Hp),Hp=c3(ao,Hp);var v6=Hp>-1?1:0;v6&&(Hp*=ha/Tn),m.glyphOffsetArray.length>=Pu.MAX_GLYPHS&&re("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),xn.sortKey!==void 0&&m.addToSortKeyRanges(m.symbolInstances.length,xn.sortKey),m.symbolInstances.emplaceBack(y.x,y.y,yl.right>=0?yl.right:-1,yl.center>=0?yl.center:-1,yl.left>=0?yl.left:-1,yl.vertical||-1,kl,Cl,Qu,G1,H1,u3,y0,h6,wO,d6,TO,gt,El,Iu,_s,jo,v6,0,_r,gc,Sf,Hp)}function jet(m,y,I,V){var $=m.compareText;if(!(y in $))$[y]=[];else for(var ae=$[y],he=ae.length-1;he>=0;he--)if(V.dist(ae[he])0)&&(he.value.kind!=="constant"||he.value.value.length>0),Et=rt.value.kind!=="constant"||!!rt.value.value||Object.keys(rt.parameters).length>0,or=ae.get("symbol-sort-key");if(this.features=[],!(!gt&&!Et)){for(var _r=I.iconDependencies,pr=I.glyphDependencies,Fr=I.availableImages,oi=new Gn(this.zoom),Hi=0,Ai=y;Hi=0;for(var Iu=0,kl=eo.sections;Iu=0;rt--)he[rt]={x:I[rt].x,y:I[rt].y,tileUnitDistanceFromAnchor:ae},rt>0&&(ae+=I[rt-1].dist(I[rt]));for(var gt=0;gt0},Pu.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Pu.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Pu.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Pu.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Pu.prototype.addIndicesForPlacedSymbol=function(y,I){for(var V=y.placedSymbolArray.get(I),$=V.vertexStartIndex+V.numGlyphs*4,ae=V.vertexStartIndex;ae<$;ae+=4)y.indexArray.emplaceBack(ae,ae+1,ae+2),y.indexArray.emplaceBack(ae+1,ae+2,ae+3)},Pu.prototype.getSortedSymbolIndexes=function(y){if(this.sortedAngle===y&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;for(var I=Math.sin(y),V=Math.cos(y),$=[],ae=[],he=[],ze=0;ze1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(y),this.sortedAngle=y,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var V=0,$=this.symbolInstanceIndexes;V<$.length;V+=1){var ae=$[V],he=this.symbolInstances.get(ae);this.featureSortOrder.push(he.featureIndex),[he.rightJustifiedTextSymbolIndex,he.centerJustifiedTextSymbolIndex,he.leftJustifiedTextSymbolIndex].forEach(function(ze,rt,gt){ze>=0&>.indexOf(ze)===rt&&I.addIndicesForPlacedSymbol(I.text,ze)}),he.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,he.verticalPlacedTextSymbolIndex),he.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,he.placedIconSymbolIndex),he.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,he.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},X("SymbolBucket",Pu,{omit:["layers","collisionBoxArray","features","compareText"]}),Pu.MAX_GLYPHS=65535,Pu.addDynamicAttributes=mO;function Yet(m,y){return y.replace(/{([^{}]+)}/g,function(I,V){return V in m?String(m[V]):""})}var Ket=new Nr({"symbol-placement":new Me(Rn.layout_symbol["symbol-placement"]),"symbol-spacing":new Me(Rn.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Me(Rn.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new bt(Rn.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Me(Rn.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Me(Rn.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Me(Rn.layout_symbol["icon-ignore-placement"]),"icon-optional":new Me(Rn.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Me(Rn.layout_symbol["icon-rotation-alignment"]),"icon-size":new bt(Rn.layout_symbol["icon-size"]),"icon-text-fit":new Me(Rn.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Me(Rn.layout_symbol["icon-text-fit-padding"]),"icon-image":new bt(Rn.layout_symbol["icon-image"]),"icon-rotate":new bt(Rn.layout_symbol["icon-rotate"]),"icon-padding":new Me(Rn.layout_symbol["icon-padding"]),"icon-keep-upright":new Me(Rn.layout_symbol["icon-keep-upright"]),"icon-offset":new bt(Rn.layout_symbol["icon-offset"]),"icon-anchor":new bt(Rn.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Me(Rn.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Me(Rn.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Me(Rn.layout_symbol["text-rotation-alignment"]),"text-field":new bt(Rn.layout_symbol["text-field"]),"text-font":new bt(Rn.layout_symbol["text-font"]),"text-size":new bt(Rn.layout_symbol["text-size"]),"text-max-width":new bt(Rn.layout_symbol["text-max-width"]),"text-line-height":new Me(Rn.layout_symbol["text-line-height"]),"text-letter-spacing":new bt(Rn.layout_symbol["text-letter-spacing"]),"text-justify":new bt(Rn.layout_symbol["text-justify"]),"text-radial-offset":new bt(Rn.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Me(Rn.layout_symbol["text-variable-anchor"]),"text-anchor":new bt(Rn.layout_symbol["text-anchor"]),"text-max-angle":new Me(Rn.layout_symbol["text-max-angle"]),"text-writing-mode":new Me(Rn.layout_symbol["text-writing-mode"]),"text-rotate":new bt(Rn.layout_symbol["text-rotate"]),"text-padding":new Me(Rn.layout_symbol["text-padding"]),"text-keep-upright":new Me(Rn.layout_symbol["text-keep-upright"]),"text-transform":new bt(Rn.layout_symbol["text-transform"]),"text-offset":new bt(Rn.layout_symbol["text-offset"]),"text-allow-overlap":new Me(Rn.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Me(Rn.layout_symbol["text-ignore-placement"]),"text-optional":new Me(Rn.layout_symbol["text-optional"])}),Jet=new Nr({"icon-opacity":new bt(Rn.paint_symbol["icon-opacity"]),"icon-color":new bt(Rn.paint_symbol["icon-color"]),"icon-halo-color":new bt(Rn.paint_symbol["icon-halo-color"]),"icon-halo-width":new bt(Rn.paint_symbol["icon-halo-width"]),"icon-halo-blur":new bt(Rn.paint_symbol["icon-halo-blur"]),"icon-translate":new Me(Rn.paint_symbol["icon-translate"]),"icon-translate-anchor":new Me(Rn.paint_symbol["icon-translate-anchor"]),"text-opacity":new bt(Rn.paint_symbol["text-opacity"]),"text-color":new bt(Rn.paint_symbol["text-color"],{runtimeType:ql,getOverride:function(m){return m.textColor},hasOverride:function(m){return!!m.textColor}}),"text-halo-color":new bt(Rn.paint_symbol["text-halo-color"]),"text-halo-width":new bt(Rn.paint_symbol["text-halo-width"]),"text-halo-blur":new bt(Rn.paint_symbol["text-halo-blur"]),"text-translate":new Me(Rn.paint_symbol["text-translate"]),"text-translate-anchor":new Me(Rn.paint_symbol["text-translate-anchor"])}),yO={paint:Jet,layout:Ket},o3=function(y){this.type=y.property.overrides?y.property.overrides.runtimeType:ac,this.defaultValue=y};o3.prototype.evaluate=function(y){if(y.formattedSection){var I=this.defaultValue.property.overrides;if(I&&I.hasOverride(y.formattedSection))return I.getOverride(y.formattedSection)}return y.feature&&y.featureState?this.defaultValue.evaluate(y.feature,y.featureState):this.defaultValue.property.specification.default},o3.prototype.eachChild=function(y){if(!this.defaultValue.isConstant()){var I=this.defaultValue.value;y(I._styleExpression.expression)}},o3.prototype.outputDefined=function(){return!1},o3.prototype.serialize=function(){return null},X("FormatSectionOverride",o3,{omit:["defaultValue"]});var $et=function(m){function y(I){m.call(this,I,yO)}return m&&(y.__proto__=m),y.prototype=Object.create(m&&m.prototype),y.prototype.constructor=y,y.prototype.recalculate=function(V,$){if(m.prototype.recalculate.call(this,V,$),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){var ae=this.layout.get("text-writing-mode");if(ae){for(var he=[],ze=0,rt=ae;ze",targetMapId:$,sourceMapId:he.mapId})}}},s3.prototype.receive=function(y){var I=y.data,V=I.id;if(V&&!(I.targetMapId&&this.mapId!==I.targetMapId))if(I.type===""){delete this.tasks[V];var $=this.cancelCallbacks[V];delete this.cancelCallbacks[V],$&&$()}else Le()||I.mustQueue?(this.tasks[V]=I,this.taskQueue.push(V),this.invoker.trigger()):this.processTask(V,I)},s3.prototype.process=function(){if(this.taskQueue.length){var y=this.taskQueue.shift(),I=this.tasks[y];delete this.tasks[y],this.taskQueue.length&&this.invoker.trigger(),I&&this.processTask(y,I)}},s3.prototype.processTask=function(y,I){var V=this;if(I.type===""){var $=this.callbacks[y];delete this.callbacks[y],$&&(I.error?$(Ye(I.error)):$(null,Ye(I.data)))}else{var ae=!1,he=Se(this.globalScope)?void 0:[],ze=I.hasCallback?function(_r,pr){ae=!0,delete V.cancelCallbacks[y],V.target.postMessage({id:y,type:"",sourceMapId:V.mapId,error:_r?He(_r):null,data:He(pr,he)},he)}:function(_r){ae=!0},rt=null,gt=Ye(I.data);if(this.parent[I.type])rt=this.parent[I.type](I.sourceMapId,gt,ze);else if(this.parent.getWorkerSource){var Et=I.type.split("."),or=this.parent.getWorkerSource(I.sourceMapId,Et[0],gt.source);rt=or[Et[1]](gt,ze)}else ze(new Error("Could not find function "+I.type));!ae&&rt&&rt.cancel&&(this.cancelCallbacks[y]=rt.cancel)}},s3.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function utt(m,y,I){y=Math.pow(2,I)-y-1;var V=ree(m*256,y*256,I),$=ree((m+1)*256,(y+1)*256,I);return V[0]+","+V[1]+","+$[0]+","+$[1]}function ree(m,y,I){var V=2*Math.PI*6378137/256/Math.pow(2,I),$=m*V-2*Math.PI*6378137/2,ae=y*V-2*Math.PI*6378137/2;return[$,ae]}var lh=function(y,I){y&&(I?this.setSouthWest(y).setNorthEast(I):y.length===4?this.setSouthWest([y[0],y[1]]).setNorthEast([y[2],y[3]]):this.setSouthWest(y[0]).setNorthEast(y[1]))};lh.prototype.setNorthEast=function(y){return this._ne=y instanceof Hc?new Hc(y.lng,y.lat):Hc.convert(y),this},lh.prototype.setSouthWest=function(y){return this._sw=y instanceof Hc?new Hc(y.lng,y.lat):Hc.convert(y),this},lh.prototype.extend=function(y){var I=this._sw,V=this._ne,$,ae;if(y instanceof Hc)$=y,ae=y;else if(y instanceof lh){if($=y._sw,ae=y._ne,!$||!ae)return this}else{if(Array.isArray(y))if(y.length===4||y.every(Array.isArray)){var he=y;return this.extend(lh.convert(he))}else{var ze=y;return this.extend(Hc.convert(ze))}return this}return!I&&!V?(this._sw=new Hc($.lng,$.lat),this._ne=new Hc(ae.lng,ae.lat)):(I.lng=Math.min($.lng,I.lng),I.lat=Math.min($.lat,I.lat),V.lng=Math.max(ae.lng,V.lng),V.lat=Math.max(ae.lat,V.lat)),this},lh.prototype.getCenter=function(){return new Hc((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},lh.prototype.getSouthWest=function(){return this._sw},lh.prototype.getNorthEast=function(){return this._ne},lh.prototype.getNorthWest=function(){return new Hc(this.getWest(),this.getNorth())},lh.prototype.getSouthEast=function(){return new Hc(this.getEast(),this.getSouth())},lh.prototype.getWest=function(){return this._sw.lng},lh.prototype.getSouth=function(){return this._sw.lat},lh.prototype.getEast=function(){return this._ne.lng},lh.prototype.getNorth=function(){return this._ne.lat},lh.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},lh.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},lh.prototype.isEmpty=function(){return!(this._sw&&this._ne)},lh.prototype.contains=function(y){var I=Hc.convert(y),V=I.lng,$=I.lat,ae=this._sw.lat<=$&&$<=this._ne.lat,he=this._sw.lng<=V&&V<=this._ne.lng;return this._sw.lng>this._ne.lng&&(he=this._sw.lng>=V&&V>=this._ne.lng),ae&&he},lh.convert=function(y){return!y||y instanceof lh?y:new lh(y)};var iee=63710088e-1,Hc=function(y,I){if(isNaN(y)||isNaN(I))throw new Error("Invalid LngLat object: ("+y+", "+I+")");if(this.lng=+y,this.lat=+I,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Hc.prototype.wrap=function(){return new Hc(k(this.lng,-180,180),this.lat)},Hc.prototype.toArray=function(){return[this.lng,this.lat]},Hc.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Hc.prototype.distanceTo=function(y){var I=Math.PI/180,V=this.lat*I,$=y.lat*I,ae=Math.sin(V)*Math.sin($)+Math.cos(V)*Math.cos($)*Math.cos((y.lng-this.lng)*I),he=iee*Math.acos(Math.min(ae,1));return he},Hc.prototype.toBounds=function(y){y===void 0&&(y=0);var I=40075017,V=360*y/I,$=V/Math.cos(Math.PI/180*this.lat);return new lh(new Hc(this.lng-$,this.lat-V),new Hc(this.lng+$,this.lat+V))},Hc.convert=function(y){if(y instanceof Hc)return y;if(Array.isArray(y)&&(y.length===2||y.length===3))return new Hc(Number(y[0]),Number(y[1]));if(!Array.isArray(y)&&typeof y=="object"&&y!==null)return new Hc(Number("lng"in y?y.lng:y.lon),Number(y.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var nee=2*Math.PI*iee;function aee(m){return nee*Math.cos(m*Math.PI/180)}function oee(m){return(180+m)/360}function see(m){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+m*Math.PI/360)))/360}function lee(m,y){return m/aee(y)}function ctt(m){return m*360-180}function xO(m){var y=180-m*360;return 360/Math.PI*Math.atan(Math.exp(y*Math.PI/180))-90}function ftt(m,y){return m*aee(xO(y))}function htt(m){return 1/Math.cos(m*Math.PI/180)}var db=function(y,I,V){V===void 0&&(V=0),this.x=+y,this.y=+I,this.z=+V};db.fromLngLat=function(y,I){I===void 0&&(I=0);var V=Hc.convert(y);return new db(oee(V.lng),see(V.lat),lee(I,V.lat))},db.prototype.toLngLat=function(){return new Hc(ctt(this.x),xO(this.y))},db.prototype.toAltitude=function(){return ftt(this.z,this.y)},db.prototype.meterInMercatorCoordinateUnits=function(){return 1/nee*htt(xO(this.y))};var vb=function(y,I,V){this.z=y,this.x=I,this.y=V,this.key=IS(0,y,y,I,V)};vb.prototype.equals=function(y){return this.z===y.z&&this.x===y.x&&this.y===y.y},vb.prototype.url=function(y,I){var V=utt(this.x,this.y,this.z),$=dtt(this.z,this.x,this.y);return y[(this.x+this.y)%y.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String(I==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",$).replace("{bbox-epsg-3857}",V)},vb.prototype.getTilePoint=function(y){var I=Math.pow(2,this.z);return new u((y.x*I-this.x)*Ci,(y.y*I-this.y)*Ci)},vb.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var uee=function(y,I){this.wrap=y,this.canonical=I,this.key=IS(y,I.z,I.z,I.x,I.y)},uh=function(y,I,V,$,ae){this.overscaledZ=y,this.wrap=I,this.canonical=new vb(V,+$,+ae),this.key=IS(I,y,V,$,ae)};uh.prototype.equals=function(y){return this.overscaledZ===y.overscaledZ&&this.wrap===y.wrap&&this.canonical.equals(y.canonical)},uh.prototype.scaledTo=function(y){var I=this.canonical.z-y;return y>this.canonical.z?new uh(y,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new uh(y,this.wrap,y,this.canonical.x>>I,this.canonical.y>>I)},uh.prototype.calculateScaledKey=function(y,I){var V=this.canonical.z-y;return y>this.canonical.z?IS(this.wrap*+I,y,this.canonical.z,this.canonical.x,this.canonical.y):IS(this.wrap*+I,y,y,this.canonical.x>>V,this.canonical.y>>V)},uh.prototype.isChildOf=function(y){if(y.wrap!==this.wrap)return!1;var I=this.canonical.z-y.canonical.z;return y.overscaledZ===0||y.overscaledZ>I&&y.canonical.y===this.canonical.y>>I},uh.prototype.children=function(y){if(this.overscaledZ>=y)return[new uh(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var I=this.canonical.z+1,V=this.canonical.x*2,$=this.canonical.y*2;return[new uh(I,this.wrap,I,V,$),new uh(I,this.wrap,I,V+1,$),new uh(I,this.wrap,I,V,$+1),new uh(I,this.wrap,I,V+1,$+1)]},uh.prototype.isLessThan=function(y){return this.wrapy.wrap?!1:this.overscaledZy.overscaledZ?!1:this.canonical.xy.canonical.x?!1:this.canonical.y0;ae--)$=1<=this.dim+1||I<-1||I>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(I+1)*this.stride+(y+1)},xy.prototype._unpackMapbox=function(y,I,V){return(y*256*256+I*256+V)/10-1e4},xy.prototype._unpackTerrarium=function(y,I,V){return y*256+I+V/256-32768},xy.prototype.getPixels=function(){return new Eh({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},xy.prototype.backfillBorder=function(y,I,V){if(this.dim!==y.dim)throw new Error("dem dimension mismatch");var $=I*this.dim,ae=I*this.dim+this.dim,he=V*this.dim,ze=V*this.dim+this.dim;switch(I){case-1:$=ae-1;break;case 1:ae=$+1;break}switch(V){case-1:he=ze-1;break;case 1:ze=he+1;break}for(var rt=-I*this.dim,gt=-V*this.dim,Et=he;Et=0&&or[3]>=0&&rt.insert(ze,or[0],or[1],or[2],or[3])}},by.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new mg.VectorTile(new Xa(this.rawTileData)).layers,this.sourceLayerCoder=new c6(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},by.prototype.query=function(y,I,V,$){var ae=this;this.loadVTLayers();for(var he=y.params||{},ze=Ci/y.tileSize/y.scale,rt=be(he.filter),gt=y.queryGeometry,Et=y.queryPadding*ze,or=fee(gt),_r=this.grid.query(or.minX-Et,or.minY-Et,or.maxX+Et,or.maxY+Et),pr=fee(y.cameraQueryGeometry),Fr=this.grid3D.query(pr.minX-Et,pr.minY-Et,pr.maxX+Et,pr.maxY+Et,function(Zn,ga,ha,eo){return mp(y.cameraQueryGeometry,Zn-Et,ga-Et,ha+Et,eo+Et)}),oi=0,Hi=Fr;oi$)ae=!1;else if(!I)ae=!0;else if(this.expirationTime=Ha.maxzoom)&&Ha.visibility!=="none"){h(Wn,this.zoom,nr);var vo=$i[Ha.id]=Ha.createBucket({index:Oi.bucketLayerIDs.length,layers:Wn,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Ba,sourceID:this.source});vo.populate(ua,tn,this.tileID.canonical),Oi.bucketLayerIDs.push(Wn.map(function(Li){return Li.id}))}}}}var jn,Mt,kr,Jr,vi=i.mapObject(tn.glyphDependencies,function(Li){return Object.keys(Li).map(Number)});Object.keys(vi).length?Er.send("getGlyphs",{uid:this.uid,stacks:vi},function(Li,_n){jn||(jn=Li,Mt=_n,Mn.call(ri))}):Mt={};var hn=Object.keys(tn.iconDependencies);hn.length?Er.send("getImages",{icons:hn,source:this.source,tileID:this.tileID,type:"icons"},function(Li,_n){jn||(jn=Li,kr=_n,Mn.call(ri))}):kr={};var An=Object.keys(tn.patternDependencies);An.length?Er.send("getImages",{icons:An,source:this.source,tileID:this.tileID,type:"patterns"},function(Li,_n){jn||(jn=Li,Jr=_n,Mn.call(ri))}):Jr={},Mn.call(this);function Mn(){if(jn)return Xr(jn);if(Mt&&kr&&Jr){var Li=new c(Mt),_n=new i.ImageAtlas(kr,Jr);for(var ya in $i){var $n=$i[ya];$n instanceof i.SymbolBucket?(h($n.layers,this.zoom,nr),i.performSymbolLayout($n,Mt,Li.positions,kr,_n.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):$n.hasPattern&&($n instanceof i.LineBucket||$n instanceof i.FillBucket||$n instanceof i.FillExtrusionBucket)&&(h($n.layers,this.zoom,nr),$n.addFeatures(tn,this.tileID.canonical,_n.patternPositions))}this.status="done",Xr(null,{buckets:i.values($i).filter(function(Ma){return!Ma.isEmpty()}),featureIndex:Oi,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Li.image,imageAtlas:_n,glyphMap:this.returnDependencies?Mt:null,iconMap:this.returnDependencies?kr:null,glyphPositions:this.returnDependencies?Li.positions:null})}}};function h(Ut,wt,rr){for(var nr=new i.EvaluationParameters(wt),Er=0,Xr=Ut;Er=0!=!!wt&&Ut.reverse()}var L=i.vectorTile.VectorTileFeature.prototype.toGeoJSON,x=function(wt){this._feature=wt,this.extent=i.EXTENT,this.type=wt.type,this.properties=wt.tags,"id"in wt&&!isNaN(wt.id)&&(this.id=parseInt(wt.id,10))};x.prototype.loadGeometry=function(){if(this._feature.type===1){for(var wt=[],rr=0,nr=this._feature.geometry;rr>31}function Le(Ut,wt){for(var rr=Ut.loadGeometry(),nr=Ut.type,Er=0,Xr=0,ri=rr.length,Qr=0;Qr>1;Se(Ut,wt,ri,nr,Er,Xr%2),ie(Ut,wt,rr,nr,ri-1,Xr+1),ie(Ut,wt,rr,ri+1,Er,Xr+1)}}function Se(Ut,wt,rr,nr,Er,Xr){for(;Er>nr;){if(Er-nr>600){var ri=Er-nr+1,Qr=rr-nr+1,Oi=Math.log(ri),$i=.5*Math.exp(2*Oi/3),tn=.5*Math.sqrt(Oi*$i*(ri-$i)/ri)*(Qr-ri/2<0?-1:1),fn=Math.max(nr,Math.floor(rr-Qr*$i/ri+tn)),yn=Math.min(Er,Math.floor(rr+(ri-Qr)*$i/ri+tn));Se(Ut,wt,rr,fn,yn,Xr)}var Sn=wt[2*rr+Xr],Ba=nr,ua=Er;for(Ee(Ut,wt,nr,rr),wt[2*Er+Xr]>Sn&&Ee(Ut,wt,nr,Er);BaSn;)ua--}wt[2*nr+Xr]===Sn?Ee(Ut,wt,nr,ua):(ua++,Ee(Ut,wt,ua,Er)),ua<=rr&&(nr=ua+1),rr<=ua&&(Er=ua-1)}}function Ee(Ut,wt,rr,nr){Ae(Ut,rr,nr),Ae(wt,2*rr,2*nr),Ae(wt,2*rr+1,2*nr+1)}function Ae(Ut,wt,rr){var nr=Ut[wt];Ut[wt]=Ut[rr],Ut[rr]=nr}function Be(Ut,wt,rr,nr,Er,Xr,ri){for(var Qr=[0,Ut.length-1,0],Oi=[],$i,tn;Qr.length;){var fn=Qr.pop(),yn=Qr.pop(),Sn=Qr.pop();if(yn-Sn<=ri){for(var Ba=Sn;Ba<=yn;Ba++)$i=wt[2*Ba],tn=wt[2*Ba+1],$i>=rr&&$i<=Er&&tn>=nr&&tn<=Xr&&Oi.push(Ut[Ba]);continue}var ua=Math.floor((Sn+yn)/2);$i=wt[2*ua],tn=wt[2*ua+1],$i>=rr&&$i<=Er&&tn>=nr&&tn<=Xr&&Oi.push(Ut[ua]);var ma=(fn+1)%2;(fn===0?rr<=$i:nr<=tn)&&(Qr.push(Sn),Qr.push(ua-1),Qr.push(ma)),(fn===0?Er>=$i:Xr>=tn)&&(Qr.push(ua+1),Qr.push(yn),Qr.push(ma))}return Oi}function Pe(Ut,wt,rr,nr,Er,Xr){for(var ri=[0,Ut.length-1,0],Qr=[],Oi=Er*Er;ri.length;){var $i=ri.pop(),tn=ri.pop(),fn=ri.pop();if(tn-fn<=Xr){for(var yn=fn;yn<=tn;yn++)me(wt[2*yn],wt[2*yn+1],rr,nr)<=Oi&&Qr.push(Ut[yn]);continue}var Sn=Math.floor((fn+tn)/2),Ba=wt[2*Sn],ua=wt[2*Sn+1];me(Ba,ua,rr,nr)<=Oi&&Qr.push(Ut[Sn]);var ma=($i+1)%2;($i===0?rr-Er<=Ba:nr-Er<=ua)&&(ri.push(fn),ri.push(Sn-1),ri.push(ma)),($i===0?rr+Er>=Ba:nr+Er>=ua)&&(ri.push(Sn+1),ri.push(tn),ri.push(ma))}return Qr}function me(Ut,wt,rr,nr){var Er=Ut-rr,Xr=wt-nr;return Er*Er+Xr*Xr}var De=function(Ut){return Ut[0]},ce=function(Ut){return Ut[1]},je=function(wt,rr,nr,Er,Xr){rr===void 0&&(rr=De),nr===void 0&&(nr=ce),Er===void 0&&(Er=64),Xr===void 0&&(Xr=Float64Array),this.nodeSize=Er,this.points=wt;for(var ri=wt.length<65536?Uint16Array:Uint32Array,Qr=this.ids=new ri(wt.length),Oi=this.coords=new Xr(wt.length*2),$i=0;$i=Er;tn--){var fn=+Date.now();Oi=this._cluster(Oi,tn),this.trees[tn]=new je(Oi,$e,St,ri,Float32Array),nr&&console.log("z%d: %d clusters in %dms",tn,Oi.length,+Date.now()-fn)}return nr&&console.timeEnd("total time"),this},pt.prototype.getClusters=function(wt,rr){var nr=((wt[0]+180)%360+360)%360-180,Er=Math.max(-90,Math.min(90,wt[1])),Xr=wt[2]===180?180:((wt[2]+180)%360+360)%360-180,ri=Math.max(-90,Math.min(90,wt[3]));if(wt[2]-wt[0]>=360)nr=-180,Xr=180;else if(nr>Xr){var Qr=this.getClusters([nr,Er,180,ri],rr),Oi=this.getClusters([-180,Er,Xr,ri],rr);return Qr.concat(Oi)}for(var $i=this.trees[this._limitZoom(rr)],tn=$i.range(Nt(nr),$t(ri),Nt(Xr),$t(Er)),fn=[],yn=0,Sn=tn;ynrr&&(ua+=Xo.numPoints||1)}if(ua>=Oi){for(var da=fn.x*Ba,Wn=fn.y*Ba,Ha=Qr&&Ba>1?this._map(fn,!0):null,vo=(tn<<5)+(rr+1)+this.points.length,jn=0,Mt=Sn;jn1)for(var hn=0,An=Sn;hn>5},pt.prototype._getOriginZoom=function(wt){return(wt-this.points.length)%32},pt.prototype._map=function(wt,rr){if(wt.numPoints)return rr?fr({},wt.properties):wt.properties;var nr=this.points[wt.index].properties,Er=this.options.map(nr);return rr&&Er===nr?fr({},Er):Er};function Vt(Ut,wt,rr,nr,Er){return{x:Ut,y:wt,zoom:1/0,id:rr,parentId:-1,numPoints:nr,properties:Er}}function ot(Ut,wt){var rr=Ut.geometry.coordinates,nr=rr[0],Er=rr[1];return{x:Nt(nr),y:$t(Er),zoom:1/0,index:wt,parentId:-1}}function ut(Ut){return{type:"Feature",id:Ut.id,properties:Wt(Ut),geometry:{type:"Point",coordinates:[sr(Ut.x),Tr(Ut.y)]}}}function Wt(Ut){var wt=Ut.numPoints,rr=wt>=1e4?Math.round(wt/1e3)+"k":wt>=1e3?Math.round(wt/100)/10+"k":wt;return fr(fr({},Ut.properties),{cluster:!0,cluster_id:Ut.id,point_count:wt,point_count_abbreviated:rr})}function Nt(Ut){return Ut/360+.5}function $t(Ut){var wt=Math.sin(Ut*Math.PI/180),rr=.5-.25*Math.log((1+wt)/(1-wt))/Math.PI;return rr<0?0:rr>1?1:rr}function sr(Ut){return(Ut-.5)*360}function Tr(Ut){var wt=(180-Ut*360)*Math.PI/180;return 360*Math.atan(Math.exp(wt))/Math.PI-90}function fr(Ut,wt){for(var rr in wt)Ut[rr]=wt[rr];return Ut}function $e(Ut){return Ut.x}function St(Ut){return Ut.y}function Qt(Ut,wt,rr,nr){for(var Er=nr,Xr=rr-wt>>1,ri=rr-wt,Qr,Oi=Ut[wt],$i=Ut[wt+1],tn=Ut[rr],fn=Ut[rr+1],yn=wt+3;ynEr)Qr=yn,Er=Sn;else if(Sn===Er){var Ba=Math.abs(yn-Xr);Banr&&(Qr-wt>3&&Qt(Ut,wt,Qr,nr),Ut[Qr+2]=Er,rr-Qr>3&&Qt(Ut,Qr,rr,nr))}function Gt(Ut,wt,rr,nr,Er,Xr){var ri=Er-rr,Qr=Xr-nr;if(ri!==0||Qr!==0){var Oi=((Ut-rr)*ri+(wt-nr)*Qr)/(ri*ri+Qr*Qr);Oi>1?(rr=Er,nr=Xr):Oi>0&&(rr+=ri*Oi,nr+=Qr*Oi)}return ri=Ut-rr,Qr=wt-nr,ri*ri+Qr*Qr}function _t(Ut,wt,rr,nr){var Er={id:typeof Ut=="undefined"?null:Ut,type:wt,geometry:rr,tags:nr,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return It(Er),Er}function It(Ut){var wt=Ut.geometry,rr=Ut.type;if(rr==="Point"||rr==="MultiPoint"||rr==="LineString")mt(Ut,wt);else if(rr==="Polygon"||rr==="MultiLineString")for(var nr=0;nr0&&(nr?ri+=(Er*$i-Oi*Xr)/2:ri+=Math.sqrt(Math.pow(Oi-Er,2)+Math.pow($i-Xr,2))),Er=Oi,Xr=$i}var tn=wt.length-3;wt[2]=1,Qt(wt,0,tn,rr),wt[tn+2]=1,wt.size=Math.abs(ri),wt.start=0,wt.end=wt.size}function ti(Ut,wt,rr,nr){for(var Er=0;Er1?1:rr}function dt(Ut,wt,rr,nr,Er,Xr,ri,Qr){if(rr/=wt,nr/=wt,Xr>=rr&&ri=nr)return null;for(var Oi=[],$i=0;$i=rr&&Ba=nr)continue;var ua=[];if(yn==="Point"||yn==="MultiPoint")Ge(fn,ua,rr,nr,Er);else if(yn==="LineString")Je(fn,ua,rr,nr,Er,!1,Qr.lineMetrics);else if(yn==="MultiLineString")tt(fn,ua,rr,nr,Er,!1);else if(yn==="Polygon")tt(fn,ua,rr,nr,Er,!0);else if(yn==="MultiPolygon")for(var ma=0;ma=rr&&ri<=nr&&(wt.push(Ut[Xr]),wt.push(Ut[Xr+1]),wt.push(Ut[Xr+2]))}}function Je(Ut,wt,rr,nr,Er,Xr,ri){for(var Qr=We(Ut),Oi=Er===0?Ie:xe,$i=Ut.start,tn,fn,yn=0;ynrr&&(fn=Oi(Qr,Sn,Ba,ma,Wa,rr),ri&&(Qr.start=$i+tn*fn)):Fa>nr?Xo=rr&&(fn=Oi(Qr,Sn,Ba,ma,Wa,rr),da=!0),Xo>nr&&Fa<=nr&&(fn=Oi(Qr,Sn,Ba,ma,Wa,nr),da=!0),!Xr&&da&&(ri&&(Qr.end=$i+tn*fn),wt.push(Qr),Qr=We(Ut)),ri&&($i+=tn)}var Wn=Ut.length-3;Sn=Ut[Wn],Ba=Ut[Wn+1],ua=Ut[Wn+2],Fa=Er===0?Sn:Ba,Fa>=rr&&Fa<=nr&&xt(Qr,Sn,Ba,ua),Wn=Qr.length-3,Xr&&Wn>=3&&(Qr[Wn]!==Qr[0]||Qr[Wn+1]!==Qr[1])&&xt(Qr,Qr[0],Qr[1],Qr[2]),Qr.length&&wt.push(Qr)}function We(Ut){var wt=[];return wt.size=Ut.size,wt.start=Ut.start,wt.end=Ut.end,wt}function tt(Ut,wt,rr,nr,Er,Xr){for(var ri=0;riri.maxX&&(ri.maxX=tn),fn>ri.maxY&&(ri.maxY=fn)}return ri}function pi(Ut,wt,rr,nr){var Er=wt.geometry,Xr=wt.type,ri=[];if(Xr==="Point"||Xr==="MultiPoint")for(var Qr=0;Qr0&&wt.size<(Er?ri:nr)){rr.numPoints+=wt.length/3;return}for(var Qr=[],Oi=0;Oiri)&&(rr.numSimplified++,Qr.push(wt[Oi]),Qr.push(wt[Oi+1])),rr.numPoints++;Er&&di(Qr,Xr),Ut.push(Qr)}function di(Ut,wt){for(var rr=0,nr=0,Er=Ut.length,Xr=Er-2;nr0===wt)for(nr=0,Er=Ut.length;nr24)throw new Error("maxZoom should be in the 0-24 range");if(wt.promoteId&&wt.generateId)throw new Error("promoteId and generateId cannot be used together.");var nr=er(Ut,wt);this.tiles={},this.tileCoords=[],rr&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",wt.indexMaxZoom,wt.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),nr=ke(nr,wt),nr.length&&this.splitTile(nr,0,0,0),rr&&(nr.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}In.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},In.prototype.splitTile=function(Ut,wt,rr,nr,Er,Xr,ri){for(var Qr=[Ut,wt,rr,nr],Oi=this.options,$i=Oi.debug;Qr.length;){nr=Qr.pop(),rr=Qr.pop(),wt=Qr.pop(),Ut=Qr.pop();var tn=1<1&&console.time("creation"),yn=this.tiles[fn]=ii(Ut,wt,rr,nr,Oi),this.tileCoords.push({z:wt,x:rr,y:nr}),$i)){$i>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",wt,rr,nr,yn.numFeatures,yn.numPoints,yn.numSimplified),console.timeEnd("creation"));var Sn="z"+wt;this.stats[Sn]=(this.stats[Sn]||0)+1,this.total++}if(yn.source=Ut,Er){if(wt===Oi.maxZoom||wt===Er)continue;var Ba=1<1&&console.time("clipping");var ua=.5*Oi.buffer/Oi.extent,ma=.5-ua,Wa=.5+ua,Fa=1+ua,Xo,da,Wn,Ha,vo,jn;Xo=da=Wn=Ha=null,vo=dt(Ut,tn,rr-ua,rr+Wa,0,yn.minX,yn.maxX,Oi),jn=dt(Ut,tn,rr+ma,rr+Fa,0,yn.minX,yn.maxX,Oi),Ut=null,vo&&(Xo=dt(vo,tn,nr-ua,nr+Wa,1,yn.minY,yn.maxY,Oi),da=dt(vo,tn,nr+ma,nr+Fa,1,yn.minY,yn.maxY,Oi),vo=null),jn&&(Wn=dt(jn,tn,nr-ua,nr+Wa,1,yn.minY,yn.maxY,Oi),Ha=dt(jn,tn,nr+ma,nr+Fa,1,yn.minY,yn.maxY,Oi),jn=null),$i>1&&console.timeEnd("clipping"),Qr.push(Xo||[],wt+1,rr*2,nr*2),Qr.push(da||[],wt+1,rr*2,nr*2+1),Qr.push(Wn||[],wt+1,rr*2+1,nr*2),Qr.push(Ha||[],wt+1,rr*2+1,nr*2+1)}}},In.prototype.getTile=function(Ut,wt,rr){var nr=this.options,Er=nr.extent,Xr=nr.debug;if(Ut<0||Ut>24)return null;var ri=1<1&&console.log("drilling down to z%d-%d-%d",Ut,wt,rr);for(var Oi=Ut,$i=wt,tn=rr,fn;!fn&&Oi>0;)Oi--,$i=Math.floor($i/2),tn=Math.floor(tn/2),fn=this.tiles[wi(Oi,$i,tn)];return!fn||!fn.source?null:(Xr>1&&console.log("found parent tile z%d-%d-%d",Oi,$i,tn),Xr>1&&console.time("drilling down"),this.splitTile(fn.source,Oi,$i,tn,Ut,wt,rr),Xr>1&&console.timeEnd("drilling down"),this.tiles[Qr]?ar(this.tiles[Qr],Er):null)};function wi(Ut,wt,rr){return((1<=0?0:Y.button},o.remove=function(Y){Y.parentNode&&Y.parentNode.removeChild(Y)};function _(Y,D,J){var q,K,de,ne=i.browser.devicePixelRatio>1?"@2x":"",we=i.getJSON(D.transformRequest(D.normalizeSpriteURL(Y,ne,".json"),i.ResourceType.SpriteJSON),function(Zt,hr){we=null,de||(de=Zt,q=hr,ft())}),Ue=i.getImage(D.transformRequest(D.normalizeSpriteURL(Y,ne,".png"),i.ResourceType.SpriteImage),function(Zt,hr){Ue=null,de||(de=Zt,K=hr,ft())});function ft(){if(de)J(de);else if(q&&K){var Zt=i.browser.getImageData(K),hr={};for(var qt in q){var Ve=q[qt],Qe=Ve.width,at=Ve.height,Ct=Ve.x,Ot=Ve.y,Rt=Ve.sdf,Bt=Ve.pixelRatio,Dt=Ve.stretchX,yt=Ve.stretchY,Pt=Ve.content,ht=new i.RGBAImage({width:Qe,height:at});i.RGBAImage.copy(Zt,ht,{x:Ct,y:Ot},{x:0,y:0},{width:Qe,height:at}),hr[qt]={data:ht,pixelRatio:Bt,sdf:Rt,stretchX:Dt,stretchY:yt,content:Pt}}J(null,hr)}}return{cancel:function(){we&&(we.cancel(),we=null),Ue&&(Ue.cancel(),Ue=null)}}}function b(Y){var D=Y.userImage;if(D&&D.render){var J=D.render();if(J)return Y.data.replace(new Uint8Array(D.data.buffer)),!0}return!1}var p=1,k=function(Y){function D(){Y.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new i.RGBAImage({width:1,height:1}),this.dirty=!0}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.isLoaded=function(){return this.loaded},D.prototype.setLoaded=function(q){if(this.loaded!==q&&(this.loaded=q,q)){for(var K=0,de=this.requestors;K=0?1.2:1))}C.prototype.draw=function(Y){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(Y,this.buffer,this.middle);for(var D=this.ctx.getImageData(0,0,this.size,this.size),J=new Uint8ClampedArray(this.size*this.size),q=0;q65535){Zt(new Error("glyphs > 65535 not supported"));return}if(Ve.ranges[at]){Zt(null,{stack:hr,id:qt,glyph:Qe});return}var Ct=Ve.requests[at];Ct||(Ct=Ve.requests[at]=[],P.loadGlyphRange(hr,at,q.url,q.requestManager,function(Ot,Rt){if(Rt){for(var Bt in Rt)q._doesCharSupportLocalGlyph(+Bt)||(Ve.glyphs[+Bt]=Rt[+Bt]);Ve.ranges[at]=!0}for(var Dt=0,yt=Ct;Dt1&&(ft=D[++Ue]);var hr=Math.abs(Zt-ft.left),qt=Math.abs(Zt-ft.right),Ve=Math.min(hr,qt),Qe=void 0,at=de/q*(K+1);if(ft.isDash){var Ct=K-Math.abs(at);Qe=Math.sqrt(Ve*Ve+Ct*Ct)}else Qe=K-Math.sqrt(Ve*Ve+at*at);this.data[we+Zt]=Math.max(0,Math.min(255,Qe+128))}},G.prototype.addRegularDash=function(D){for(var J=D.length-1;J>=0;--J){var q=D[J],K=D[J+1];q.zeroLength?D.splice(J,1):K&&K.isDash===q.isDash&&(K.left=q.left,D.splice(J,1))}var de=D[0],ne=D[D.length-1];de.isDash===ne.isDash&&(de.left=ne.left-this.width,ne.right=de.right+this.width);for(var we=this.width*this.nextRow,Ue=0,ft=D[Ue],Zt=0;Zt1&&(ft=D[++Ue]);var hr=Math.abs(Zt-ft.left),qt=Math.abs(Zt-ft.right),Ve=Math.min(hr,qt),Qe=ft.isDash?Ve:-Ve;this.data[we+Zt]=Math.max(0,Math.min(255,Qe+128))}},G.prototype.addDash=function(D,J){var q=J?7:0,K=2*q+1;if(this.nextRow+K>this.height)return i.warnOnce("LineAtlas out of space"),null;for(var de=0,ne=0;ne=q.minX&&D.x=q.minY&&D.y0&&(Zt[new i.OverscaledTileID(q.overscaledZ,we,K.z,ne,K.y-1).key]={backfilled:!1},Zt[new i.OverscaledTileID(q.overscaledZ,q.wrap,K.z,K.x,K.y-1).key]={backfilled:!1},Zt[new i.OverscaledTileID(q.overscaledZ,ft,K.z,Ue,K.y-1).key]={backfilled:!1}),K.y+10&&(de.resourceTiming=q._resourceTiming,q._resourceTiming=[]),q.fire(new i.Event("data",de))})},D.prototype.onAdd=function(q){this.map=q,this.load()},D.prototype.setData=function(q){var K=this;return this._data=q,this.fire(new i.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(de){if(de){K.fire(new i.ErrorEvent(de));return}var ne={dataType:"source",sourceDataType:"content"};K._collectResourceTiming&&K._resourceTiming&&K._resourceTiming.length>0&&(ne.resourceTiming=K._resourceTiming,K._resourceTiming=[]),K.fire(new i.Event("data",ne))}),this},D.prototype.getClusterExpansionZoom=function(q,K){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:q,source:this.id},K),this},D.prototype.getClusterChildren=function(q,K){return this.actor.send("geojson.getClusterChildren",{clusterId:q,source:this.id},K),this},D.prototype.getClusterLeaves=function(q,K,de,ne){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:q,limit:K,offset:de},ne),this},D.prototype._updateWorkerData=function(q){var K=this;this._loaded=!1;var de=i.extend({},this.workerOptions),ne=this._data;typeof ne=="string"?(de.request=this.map._requestManager.transformRequest(i.browser.resolveURL(ne),i.ResourceType.Source),de.request.collectResourceTiming=this._collectResourceTiming):de.data=JSON.stringify(ne),this.actor.send(this.type+".loadData",de,function(we,Ue){K._removed||Ue&&Ue.abandoned||(K._loaded=!0,Ue&&Ue.resourceTiming&&Ue.resourceTiming[K.id]&&(K._resourceTiming=Ue.resourceTiming[K.id].slice(0)),K.actor.send(K.type+".coalesce",{source:de.source},null),q(we))})},D.prototype.loaded=function(){return this._loaded},D.prototype.loadTile=function(q,K){var de=this,ne=q.actor?"reloadTile":"loadTile";q.actor=this.actor;var we={type:this.type,uid:q.uid,tileID:q.tileID,zoom:q.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:i.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};q.request=this.actor.send(ne,we,function(Ue,ft){return delete q.request,q.unloadVectorData(),q.aborted?K(null):Ue?K(Ue):(q.loadVectorData(ft,de.map.painter,ne==="reloadTile"),K(null))})},D.prototype.abortTile=function(q){q.request&&(q.request.cancel(),delete q.request),q.aborted=!0},D.prototype.unloadTile=function(q){q.unloadVectorData(),this.actor.send("removeTile",{uid:q.uid,type:this.type,source:this.id})},D.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},D.prototype.serialize=function(){return i.extend({},this._options,{type:this.type,data:this._data})},D.prototype.hasTransition=function(){return!1},D}(i.Evented),Ce=i.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),Le=function(Y){function D(J,q,K,de){Y.call(this),this.id=J,this.dispatcher=K,this.coordinates=q.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(de),this.options=q}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.load=function(q,K){var de=this;this._loaded=!1,this.fire(new i.Event("dataloading",{dataType:"source"})),this.url=this.options.url,i.getImage(this.map._requestManager.transformRequest(this.url,i.ResourceType.Image),function(ne,we){de._loaded=!0,ne?de.fire(new i.ErrorEvent(ne)):we&&(de.image=we,q&&(de.coordinates=q),K&&K(),de._finishLoading())})},D.prototype.loaded=function(){return this._loaded},D.prototype.updateImage=function(q){var K=this;return!this.image||!q.url?this:(this.options.url=q.url,this.load(q.coordinates,function(){K.texture=null}),this)},D.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new i.Event("data",{dataType:"source",sourceDataType:"metadata"})))},D.prototype.onAdd=function(q){this.map=q,this.load()},D.prototype.setCoordinates=function(q){var K=this;this.coordinates=q;var de=q.map(i.MercatorCoordinate.fromLngLat);this.tileID=ge(de),this.minzoom=this.maxzoom=this.tileID.z;var ne=de.map(function(we){return K.tileID.getTilePoint(we)._round()});return this._boundsArray=new i.StructArrayLayout4i8,this._boundsArray.emplaceBack(ne[0].x,ne[0].y,0,0),this._boundsArray.emplaceBack(ne[1].x,ne[1].y,i.EXTENT,0),this._boundsArray.emplaceBack(ne[3].x,ne[3].y,0,i.EXTENT),this._boundsArray.emplaceBack(ne[2].x,ne[2].y,i.EXTENT,i.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new i.Event("data",{dataType:"source",sourceDataType:"content"})),this},D.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var q=this.map.painter.context,K=q.gl;this.boundsBuffer||(this.boundsBuffer=q.createVertexBuffer(this._boundsArray,Ce.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new i.Texture(q,this.image,K.RGBA),this.texture.bind(K.LINEAR,K.CLAMP_TO_EDGE));for(var de in this.tiles){var ne=this.tiles[de];ne.state!=="loaded"&&(ne.state="loaded",ne.texture=this.texture)}}},D.prototype.loadTile=function(q,K){this.tileID&&this.tileID.equals(q.tileID.canonical)?(this.tiles[String(q.tileID.wrap)]=q,q.buckets={},K(null)):(q.state="errored",K(null))},D.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},D.prototype.hasTransition=function(){return!1},D}(i.Evented);function ge(Y){for(var D=1/0,J=1/0,q=-1/0,K=-1/0,de=0,ne=Y;deK.end(0)?this.fire(new i.ErrorEvent(new i.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+K.start(0)+" and "+K.end(0)+"-second mark."))):this.video.currentTime=q}},D.prototype.getVideo=function(){return this.video},D.prototype.onAdd=function(q){this.map||(this.map=q,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},D.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var q=this.map.painter.context,K=q.gl;this.boundsBuffer||(this.boundsBuffer=q.createVertexBuffer(this._boundsArray,Ce.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(K.LINEAR,K.CLAMP_TO_EDGE),K.texSubImage2D(K.TEXTURE_2D,0,0,0,K.RGBA,K.UNSIGNED_BYTE,this.video)):(this.texture=new i.Texture(q,this.video,K.RGBA),this.texture.bind(K.LINEAR,K.CLAMP_TO_EDGE));for(var de in this.tiles){var ne=this.tiles[de];ne.state!=="loaded"&&(ne.state="loaded",ne.texture=this.texture)}}},D.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},D.prototype.hasTransition=function(){return this.video&&!this.video.paused},D}(Le),Se=function(Y){function D(J,q,K,de){Y.call(this,J,q,K,de),q.coordinates?(!Array.isArray(q.coordinates)||q.coordinates.length!==4||q.coordinates.some(function(ne){return!Array.isArray(ne)||ne.length!==2||ne.some(function(we){return typeof we!="number"})}))&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+J,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new i.ErrorEvent(new i.ValidationError("sources."+J,null,'missing required property "coordinates"'))),q.animate&&typeof q.animate!="boolean"&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+J,null,'optional "animate" property must be a boolean value'))),q.canvas?typeof q.canvas!="string"&&!(q.canvas instanceof i.window.HTMLCanvasElement)&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+J,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new i.ErrorEvent(new i.ValidationError("sources."+J,null,'missing required property "canvas"'))),this.options=q,this.animate=q.animate!==void 0?q.animate:!0}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.load=function(){if(this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof i.window.HTMLCanvasElement?this.options.canvas:i.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()){this.fire(new i.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero.")));return}this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading()},D.prototype.getCanvas=function(){return this.canvas},D.prototype.onAdd=function(q){this.map=q,this.load(),this.canvas&&this.animate&&this.play()},D.prototype.onRemove=function(){this.pause()},D.prototype.prepare=function(){var q=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,q=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,q=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var K=this.map.painter.context,de=K.gl;this.boundsBuffer||(this.boundsBuffer=K.createVertexBuffer(this._boundsArray,Ce.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(q||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new i.Texture(K,this.canvas,de.RGBA,{premultiply:!0});for(var ne in this.tiles){var we=this.tiles[ne];we.state!=="loaded"&&(we.state="loaded",we.texture=this.texture)}}},D.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},D.prototype.hasTransition=function(){return this._playing},D.prototype._hasInvalidDimensions=function(){for(var q=0,K=[this.canvas.width,this.canvas.height];qthis.max){var we=this._getAndRemoveByKey(this.order[0]);we&&this.onRemove(we)}return this},ot.prototype.has=function(D){return D.wrapped().key in this.data},ot.prototype.getAndRemove=function(D){return this.has(D)?this._getAndRemoveByKey(D.wrapped().key):null},ot.prototype._getAndRemoveByKey=function(D){var J=this.data[D].shift();return J.timeout&&clearTimeout(J.timeout),this.data[D].length===0&&delete this.data[D],this.order.splice(this.order.indexOf(D),1),J.value},ot.prototype.getByKey=function(D){var J=this.data[D];return J?J[0].value:null},ot.prototype.get=function(D){if(!this.has(D))return null;var J=this.data[D.wrapped().key][0];return J.value},ot.prototype.remove=function(D,J){if(!this.has(D))return this;var q=D.wrapped().key,K=J===void 0?0:this.data[q].indexOf(J),de=this.data[q][K];return this.data[q].splice(K,1),de.timeout&&clearTimeout(de.timeout),this.data[q].length===0&&delete this.data[q],this.onRemove(de.value),this.order.splice(this.order.indexOf(q),1),this},ot.prototype.setMaxSize=function(D){for(this.max=D;this.order.length>this.max;){var J=this._getAndRemoveByKey(this.order[0]);J&&this.onRemove(J)}return this},ot.prototype.filter=function(D){var J=[];for(var q in this.data)for(var K=0,de=this.data[q];K1||(Math.abs(hr)>1&&(Math.abs(hr+Ve)===1?hr+=Ve:Math.abs(hr-Ve)===1&&(hr-=Ve)),!(!Zt.dem||!ft.dem)&&(ft.dem.backfillBorder(Zt.dem,hr,qt),ft.neighboringTiles&&ft.neighboringTiles[Qe]&&(ft.neighboringTiles[Qe].backfilled=!0)))}},D.prototype.getTile=function(q){return this.getTileByID(q.key)},D.prototype.getTileByID=function(q){return this._tiles[q]},D.prototype._retainLoadedChildren=function(q,K,de,ne){for(var we in this._tiles){var Ue=this._tiles[we];if(!(ne[we]||!Ue.hasData()||Ue.tileID.overscaledZ<=K||Ue.tileID.overscaledZ>de)){for(var ft=Ue.tileID;Ue&&Ue.tileID.overscaledZ>K+1;){var Zt=Ue.tileID.scaledTo(Ue.tileID.overscaledZ-1);Ue=this._tiles[Zt.key],Ue&&Ue.hasData()&&(ft=Zt)}for(var hr=ft;hr.overscaledZ>K;)if(hr=hr.scaledTo(hr.overscaledZ-1),q[hr.key]){ne[ft.key]=ft;break}}}},D.prototype.findLoadedParent=function(q,K){if(q.key in this._loadedParentTiles){var de=this._loadedParentTiles[q.key];return de&&de.tileID.overscaledZ>=K?de:null}for(var ne=q.overscaledZ-1;ne>=K;ne--){var we=q.scaledTo(ne),Ue=this._getLoadedTile(we);if(Ue)return Ue}},D.prototype._getLoadedTile=function(q){var K=this._tiles[q.key];if(K&&K.hasData())return K;var de=this._cache.getByKey(q.wrapped().key);return de},D.prototype.updateCacheSize=function(q){var K=Math.ceil(q.width/this._source.tileSize)+1,de=Math.ceil(q.height/this._source.tileSize)+1,ne=K*de,we=5,Ue=Math.floor(ne*we),ft=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,Ue):Ue;this._cache.setMaxSize(ft)},D.prototype.handleWrapJump=function(q){var K=this._prevLng===void 0?q:this._prevLng,de=q-K,ne=de/360,we=Math.round(ne);if(this._prevLng=q,we){var Ue={};for(var ft in this._tiles){var Zt=this._tiles[ft];Zt.tileID=Zt.tileID.unwrapTo(Zt.tileID.wrap+we),Ue[Zt.tileID.key]=Zt}this._tiles=Ue;for(var hr in this._timers)clearTimeout(this._timers[hr]),delete this._timers[hr];for(var qt in this._tiles){var Ve=this._tiles[qt];this._setTileReloadTimer(qt,Ve)}}},D.prototype.update=function(q){var K=this;if(this.transform=q,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(q),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var de;this.used?this._source.tileID?de=q.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(Ur){return new i.OverscaledTileID(Ur.canonical.z,Ur.wrap,Ur.canonical.z,Ur.canonical.x,Ur.canonical.y)}):(de=q.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(de=de.filter(function(Ur){return K._source.hasTile(Ur)}))):de=[];var ne=q.coveringZoomLevel(this._source),we=Math.max(ne-D.maxOverzooming,this._source.minzoom),Ue=Math.max(ne+D.maxUnderzooming,this._source.minzoom),ft=this._updateRetainedTiles(de,ne);if(Oi(this._source.type)){for(var Zt={},hr={},qt=Object.keys(ft),Ve=0,Qe=qt;Vethis._source.maxzoom){var Rt=Ct.children(this._source.maxzoom)[0],Bt=this.getTile(Rt);if(Bt&&Bt.hasData()){de[Rt.key]=Rt;continue}}else{var Dt=Ct.children(this._source.maxzoom);if(de[Dt[0].key]&&de[Dt[1].key]&&de[Dt[2].key]&&de[Dt[3].key])continue}for(var yt=Ot.wasRequested(),Pt=Ct.overscaledZ-1;Pt>=we;--Pt){var ht=Ct.scaledTo(Pt);if(ne[ht.key]||(ne[ht.key]=!0,Ot=this.getTile(ht),!Ot&&yt&&(Ot=this._addTile(ht)),Ot&&(de[ht.key]=ht,yt=Ot.wasRequested(),Ot.hasData())))break}}}return de},D.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var q in this._tiles){for(var K=[],de=void 0,ne=this._tiles[q].tileID;ne.overscaledZ>0;){if(ne.key in this._loadedParentTiles){de=this._loadedParentTiles[ne.key];break}K.push(ne.key);var we=ne.scaledTo(ne.overscaledZ-1);if(de=this._getLoadedTile(we),de)break;ne=we}for(var Ue=0,ft=K;Ue0)&&(K.hasData()&&K.state!=="reloading"?this._cache.add(K.tileID,K,K.getExpiryTimeout()):(K.aborted=!0,this._abortTile(K),this._unloadTile(K))))},D.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var q in this._tiles)this._removeTile(q);this._cache.reset()},D.prototype.tilesIn=function(q,K,de){var ne=this,we=[],Ue=this.transform;if(!Ue)return we;for(var ft=de?Ue.getCameraQueryGeometry(q):q,Zt=q.map(function(Pt){return Ue.pointCoordinate(Pt)}),hr=ft.map(function(Pt){return Ue.pointCoordinate(Pt)}),qt=this.getIds(),Ve=1/0,Qe=1/0,at=-1/0,Ct=-1/0,Ot=0,Rt=hr;Ot=0&&Di[1].y+Ur>=0){var fi=Zt.map(function(gn){return ur.getTilePoint(gn)}),Ti=hr.map(function(gn){return ur.getTilePoint(gn)});we.push({tile:ht,tileID:ur,queryGeometry:fi,cameraQueryGeometry:Ti,scale:br})}}},yt=0;yt=i.browser.now())return!0}return!1},D.prototype.setFeatureState=function(q,K,de){q=q||"_geojsonTileLayer",this._state.updateState(q,K,de)},D.prototype.removeFeatureState=function(q,K,de){q=q||"_geojsonTileLayer",this._state.removeFeatureState(q,K,de)},D.prototype.getFeatureState=function(q,K){return q=q||"_geojsonTileLayer",this._state.getState(q,K)},D.prototype.setDependencies=function(q,K,de){var ne=this._tiles[q];ne&&ne.setDependencies(K,de)},D.prototype.reloadTilesForDependencies=function(q,K){for(var de in this._tiles){var ne=this._tiles[de];ne.hasDependency(q,K)&&this._reloadTile(de,"reloading")}this._cache.filter(function(we){return!we.hasDependency(q,K)})},D}(i.Evented);ri.maxOverzooming=10,ri.maxUnderzooming=3;function Qr(Y,D){var J=Math.abs(Y.wrap*2)-+(Y.wrap<0),q=Math.abs(D.wrap*2)-+(D.wrap<0);return Y.overscaledZ-D.overscaledZ||q-J||D.canonical.y-Y.canonical.y||D.canonical.x-Y.canonical.x}function Oi(Y){return Y==="raster"||Y==="image"||Y==="video"}function $i(){return new i.window.Worker(io.workerUrl)}var tn="mapboxgl_preloaded_worker_pool",fn=function(){this.active={}};fn.prototype.acquire=function(D){if(!this.workers)for(this.workers=[];this.workers.length0?(K-ne)/we:0;return this.points[de].mult(1-Ue).add(this.points[J].mult(Ue))};var Li=function(D,J,q){var K=this.boxCells=[],de=this.circleCells=[];this.xCellCount=Math.ceil(D/q),this.yCellCount=Math.ceil(J/q);for(var ne=0;nethis.width||K<0||J>this.height)return de?!1:[];var we=[];if(D<=0&&J<=0&&this.width<=q&&this.height<=K){if(de)return!0;for(var Ue=0;Ue0:we}},Li.prototype._queryCircle=function(D,J,q,K,de){var ne=D-q,we=D+q,Ue=J-q,ft=J+q;if(we<0||ne>this.width||ft<0||Ue>this.height)return K?!1:[];var Zt=[],hr={hitTest:K,circle:{x:D,y:J,radius:q},seenUids:{box:{},circle:{}}};return this._forEachCell(ne,Ue,we,ft,this._queryCellCircle,Zt,hr,de),K?Zt.length>0:Zt},Li.prototype.query=function(D,J,q,K,de){return this._query(D,J,q,K,!1,de)},Li.prototype.hitTest=function(D,J,q,K,de){return this._query(D,J,q,K,!0,de)},Li.prototype.hitTestCircle=function(D,J,q,K){return this._queryCircle(D,J,q,!0,K)},Li.prototype._queryCell=function(D,J,q,K,de,ne,we,Ue){var ft=we.seenUids,Zt=this.boxCells[de];if(Zt!==null)for(var hr=this.bboxes,qt=0,Ve=Zt;qt=hr[at+0]&&K>=hr[at+1]&&(!Ue||Ue(this.boxKeys[Qe]))){if(we.hitTest)return ne.push(!0),!0;ne.push({key:this.boxKeys[Qe],x1:hr[at],y1:hr[at+1],x2:hr[at+2],y2:hr[at+3]})}}}var Ct=this.circleCells[de];if(Ct!==null)for(var Ot=this.circles,Rt=0,Bt=Ct;Rtwe*we+Ue*Ue},Li.prototype._circleAndRectCollide=function(D,J,q,K,de,ne,we){var Ue=(ne-K)/2,ft=Math.abs(D-(K+Ue));if(ft>Ue+q)return!1;var Zt=(we-de)/2,hr=Math.abs(J-(de+Zt));if(hr>Zt+q)return!1;if(ft<=Ue||hr<=Zt)return!0;var qt=ft-Ue,Ve=hr-Zt;return qt*qt+Ve*Ve<=q*q};function _n(Y,D,J,q,K){var de=i.create();return D?(i.scale(de,de,[1/K,1/K,1]),J||i.rotateZ(de,de,q.angle)):i.multiply(de,q.labelPlaneMatrix,Y),de}function ya(Y,D,J,q,K){if(D){var de=i.clone(Y);return i.scale(de,de,[K,K,1]),J||i.rotateZ(de,de,-q.angle),de}else return q.glCoordMatrix}function $n(Y,D){var J=[Y.x,Y.y,0,1];zl(J,J,D);var q=J[3];return{point:new i.Point(J[0]/q,J[1]/q),signedDistanceFromCamera:q}}function Ma(Y,D){return .5+.5*(Y/D)}function _o(Y,D){var J=Y[0]/Y[3],q=Y[1]/Y[3],K=J>=-D[0]&&J<=D[0]&&q>=-D[1]&&q<=D[1];return K}function No(Y,D,J,q,K,de,ne,we){var Ue=q?Y.textSizeData:Y.iconSizeData,ft=i.evaluateSizeForZoom(Ue,J.transform.zoom),Zt=[256/J.width*2+1,256/J.height*2+1],hr=q?Y.text.dynamicLayoutVertexArray:Y.icon.dynamicLayoutVertexArray;hr.clear();for(var qt=Y.lineVertexArray,Ve=q?Y.text.placedSymbolArray:Y.icon.placedSymbolArray,Qe=J.transform.width/J.transform.height,at=!1,Ct=0;Ctde)return{useVertical:!0}}return(Y===i.WritingMode.vertical?D.yJ.x)?{needsFlipping:!0}:null}function ko(Y,D,J,q,K,de,ne,we,Ue,ft,Zt,hr,qt,Ve){var Qe=D/24,at=Y.lineOffsetX*Qe,Ct=Y.lineOffsetY*Qe,Ot;if(Y.numGlyphs>1){var Rt=Y.glyphStartIndex+Y.numGlyphs,Bt=Y.lineStartIndex,Dt=Y.lineStartIndex+Y.lineLength,yt=po(Qe,we,at,Ct,J,Zt,hr,Y,Ue,de,qt);if(!yt)return{notEnoughRoom:!0};var Pt=$n(yt.first.point,ne).point,ht=$n(yt.last.point,ne).point;if(q&&!J){var ur=Lo(Y.writingMode,Pt,ht,Ve);if(ur)return ur}Ot=[yt.first];for(var br=Y.glyphStartIndex+1;br0?Ti.point:Ds(hr,fi,Ur,1,K),rn=Lo(Y.writingMode,Ur,gn,Ve);if(rn)return rn}var Ci=Fs(Qe*we.getoffsetX(Y.glyphStartIndex),at,Ct,J,Zt,hr,Y.segment,Y.lineStartIndex,Y.lineStartIndex+Y.lineLength,Ue,de,qt);if(!Ci)return{notEnoughRoom:!0};Ot=[Ci]}for(var Bi=0,Gi=Ot;Bi0?1:-1,Qe=0;q&&(Ve*=-1,Qe=Math.PI),Ve<0&&(Qe+=Math.PI);for(var at=Ve>0?we+ne:we+ne+1,Ct=K,Ot=K,Rt=0,Bt=0,Dt=Math.abs(qt),yt=[];Rt+Bt<=Dt;){if(at+=Ve,at=Ue)return null;if(Ot=Ct,yt.push(Ct),Ct=hr[at],Ct===void 0){var Pt=new i.Point(ft.getx(at),ft.gety(at)),ht=$n(Pt,Zt);if(ht.signedDistanceFromCamera>0)Ct=hr[at]=ht.point;else{var ur=at-Ve,br=Rt===0?de:new i.Point(ft.getx(ur),ft.gety(ur));Ct=Ds(br,Pt,Ot,Dt-Rt+1,Zt)}}Rt+=Bt,Bt=Ot.dist(Ct)}var Ur=(Dt-Rt)/Bt,Di=Ct.sub(Ot),fi=Di.mult(Ur)._add(Ot);fi._add(Di._unit()._perp()._mult(J*Ve));var Ti=Qe+Math.atan2(Ct.y-Ot.y,Ct.x-Ot.x);return yt.push(fi),{point:fi,angle:Ti,path:yt}}var ll=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ul(Y,D){for(var J=0;J=1;sn--)Gi.push(Ci.path[sn]);for(var zn=1;zn0){for(var so=Gi[0].clone(),Yo=Gi[0].clone(),ms=1;ms=Ti.x&&Yo.x<=gn.x&&so.y>=Ti.y&&Yo.y<=gn.y?ts=[Gi]:Yo.xgn.x||Yo.ygn.y?ts=[]:ts=i.clipLine([Gi],Ti.x,Ti.y,gn.x,gn.y)}for(var ou=0,Cv=ts;ou=this.screenRightBoundary||Kthis.screenBottomBoundary},il.prototype.isInsideGrid=function(D,J,q,K){return q>=0&&D=0&&J0){var Dt;return this.prevPlacement&&this.prevPlacement.variableOffsets[qt.crossTileID]&&this.prevPlacement.placements[qt.crossTileID]&&this.prevPlacement.placements[qt.crossTileID].text&&(Dt=this.prevPlacement.variableOffsets[qt.crossTileID].anchor),this.variableOffsets[qt.crossTileID]={textOffset:Ct,width:q,height:K,anchor:D,textBoxScale:de,prevAnchor:Dt},this.markUsedJustification(Ve,D,qt,Qe),Ve.allowVerticalPlacement&&(this.markUsedOrientation(Ve,Qe,qt),this.placedOrientations[qt.crossTileID]=Qe),{shift:Ot,placedGlyphBoxes:Rt}}},bs.prototype.placeLayerBucketPart=function(D,J,q){var K=this,de=D.parameters,ne=de.bucket,we=de.layout,Ue=de.posMatrix,ft=de.textLabelPlaneMatrix,Zt=de.labelToScreenMatrix,hr=de.textPixelRatio,qt=de.holdingForFade,Ve=de.collisionBoxArray,Qe=de.partiallyEvaluatedTextSize,at=de.collisionGroup,Ct=we.get("text-optional"),Ot=we.get("icon-optional"),Rt=we.get("text-allow-overlap"),Bt=we.get("icon-allow-overlap"),Dt=we.get("text-rotation-alignment")==="map",yt=we.get("text-pitch-alignment")==="map",Pt=we.get("icon-text-fit")!=="none",ht=we.get("symbol-z-order")==="viewport-y",ur=Rt&&(Bt||!ne.hasIconData()||Ot),br=Bt&&(Rt||!ne.hasTextData()||Ct);!ne.collisionArrays&&Ve&&ne.deserializeCollisionBoxes(Ve);var Ur=function(Ci,Bi){if(!J[Ci.crossTileID]){if(qt){K.placements[Ci.crossTileID]=new zs(!1,!1,!1);return}var Gi=!1,sn=!1,zn=!0,Ja=null,co={box:null,offscreen:null},ts={box:null,offscreen:null},so=null,Yo=null,ms=null,ou=0,Cv=0,Lv=0;Bi.textFeatureIndex?ou=Bi.textFeatureIndex:Ci.useRuntimeCollisionCircles&&(ou=Ci.featureIndex),Bi.verticalTextFeatureIndex&&(Cv=Bi.verticalTextFeatureIndex);var wd=Bi.textBox;if(wd){var Kv=function(vc){var tu=i.WritingMode.horizontal;if(ne.allowVerticalPlacement&&!vc&&K.prevPlacement){var Sd=K.prevPlacement.placedOrientations[Ci.crossTileID];Sd&&(K.placedOrientations[Ci.crossTileID]=Sd,tu=Sd,K.markUsedOrientation(ne,tu,Ci))}return tu},hg=function(vc,tu){if(ne.allowVerticalPlacement&&Ci.numVerticalGlyphVertices>0&&Bi.verticalTextBox)for(var Sd=0,vy=ne.writingModes;Sd0&&(Ud=Ud.filter(function(vc){return vc!==Ad.anchor}),Ud.unshift(Ad.anchor))}var Pv=function(vc,tu,Sd){for(var vy=vc.x2-vc.x1,L1=vc.y2-vc.y1,wu=Ci.textBoxScale,Yx=Pt&&!Bt?tu:null,lm={box:[],offscreen:!1},Ow=Rt?Ud.length*2:Ud.length,Rv=0;Rv=Ud.length,Kx=K.attemptAnchorPlacement(um,vc,vy,L1,wu,Dt,yt,hr,Ue,at,qw,Ci,ne,Sd,Yx);if(Kx&&(lm=Kx.placedGlyphBoxes,lm&&lm.box&&lm.box.length)){Gi=!0,Ja=Kx.shift;break}}return lm},Jv=function(){return Pv(wd,Bi.iconBox,i.WritingMode.horizontal)},Iv=function(){var vc=Bi.verticalTextBox,tu=co&&co.box&&co.box.length;return ne.allowVerticalPlacement&&!tu&&Ci.numVerticalGlyphVertices>0&&vc?Pv(vc,Bi.verticalIconBox,i.WritingMode.vertical):{box:null,offscreen:null}};hg(Jv,Iv),co&&(Gi=co.box,zn=co.offscreen);var fy=Kv(co&&co.box);if(!Gi&&K.prevPlacement){var dg=K.prevPlacement.variableOffsets[Ci.crossTileID];dg&&(K.variableOffsets[Ci.crossTileID]=dg,K.markUsedJustification(ne,dg.anchor,Ci,fy))}}else{var gp=function(vc,tu){var Sd=K.collisionIndex.placeCollisionBox(vc,Rt,hr,Ue,at.predicate);return Sd&&Sd.box&&Sd.box.length&&(K.markUsedOrientation(ne,tu,Ci),K.placedOrientations[Ci.crossTileID]=tu),Sd},Td=function(){return gp(wd,i.WritingMode.horizontal)},mp=function(){var vc=Bi.verticalTextBox;return ne.allowVerticalPlacement&&Ci.numVerticalGlyphVertices>0&&vc?gp(vc,i.WritingMode.vertical):{box:null,offscreen:null}};hg(Td,mp),Kv(co&&co.box&&co.box.length)}}if(so=co,Gi=so&&so.box&&so.box.length>0,zn=so&&so.offscreen,Ci.useRuntimeCollisionCircles){var oh=ne.text.placedSymbolArray.get(Ci.centerJustifiedTextSymbolIndex),vg=i.evaluateSizeForFeature(ne.textSizeData,Qe,oh),hy=we.get("text-padding"),Zh=Ci.collisionCircleDiameter;Yo=K.collisionIndex.placeCollisionCircles(Rt,oh,ne.lineVertexArray,ne.glyphOffsetArray,vg,Ue,ft,Zt,q,yt,at.predicate,Zh,hy),Gi=Rt||Yo.circles.length>0&&!Yo.collisionDetected,zn=zn&&Yo.offscreen}if(Bi.iconFeatureIndex&&(Lv=Bi.iconFeatureIndex),Bi.iconBox){var am=function(vc){var tu=Pt&&Ja?nc(vc,Ja.x,Ja.y,Dt,yt,K.transform.angle):vc;return K.collisionIndex.placeCollisionBox(tu,Bt,hr,Ue,at.predicate)};ts&&ts.box&&ts.box.length&&Bi.verticalIconBox?(ms=am(Bi.verticalIconBox),sn=ms.box.length>0):(ms=am(Bi.iconBox),sn=ms.box.length>0),zn=zn&&ms.offscreen}var k1=Ct||Ci.numHorizontalGlyphVertices===0&&Ci.numVerticalGlyphVertices===0,C1=Ot||Ci.numIconVertices===0;if(!k1&&!C1?sn=Gi=sn&&Gi:C1?k1||(sn=sn&&Gi):Gi=sn&&Gi,Gi&&so&&so.box&&(ts&&ts.box&&Cv?K.collisionIndex.insertCollisionBox(so.box,we.get("text-ignore-placement"),ne.bucketInstanceId,Cv,at.ID):K.collisionIndex.insertCollisionBox(so.box,we.get("text-ignore-placement"),ne.bucketInstanceId,ou,at.ID)),sn&&ms&&K.collisionIndex.insertCollisionBox(ms.box,we.get("icon-ignore-placement"),ne.bucketInstanceId,Lv,at.ID),Yo&&(Gi&&K.collisionIndex.insertCollisionCircles(Yo.circles,we.get("text-ignore-placement"),ne.bucketInstanceId,ou,at.ID),q)){var dy=ne.bucketInstanceId,om=K.collisionCircleArrays[dy];om===void 0&&(om=K.collisionCircleArrays[dy]=new Io);for(var sm=0;sm=0;--fi){var Ti=Di[fi];Ur(ne.symbolInstances.get(Ti),ne.collisionArrays[Ti])}else for(var gn=D.symbolInstanceStart;gn=0&&(ne>=0&&Zt!==ne?D.text.placedSymbolArray.get(Zt).crossTileID=0:D.text.placedSymbolArray.get(Zt).crossTileID=q.crossTileID)}},bs.prototype.markUsedOrientation=function(D,J,q){for(var K=J===i.WritingMode.horizontal||J===i.WritingMode.horizontalOnly?J:0,de=J===i.WritingMode.vertical?J:0,ne=[q.leftJustifiedTextSymbolIndex,q.centerJustifiedTextSymbolIndex,q.rightJustifiedTextSymbolIndex],we=0,Ue=ne;we0||yt>0,Ur=Bt.numIconVertices>0,Di=K.placedOrientations[Bt.crossTileID],fi=Di===i.WritingMode.vertical,Ti=Di===i.WritingMode.horizontal||Di===i.WritingMode.horizontalOnly;if(br){var gn=ac(ur.text),rn=fi?aa:gn;Qe(D.text,Dt,rn);var Ci=Ti?aa:gn;Qe(D.text,yt,Ci);var Bi=ur.text.isHidden();[Bt.rightJustifiedTextSymbolIndex,Bt.centerJustifiedTextSymbolIndex,Bt.leftJustifiedTextSymbolIndex].forEach(function(Lv){Lv>=0&&(D.text.placedSymbolArray.get(Lv).hidden=Bi||fi?1:0)}),Bt.verticalPlacedTextSymbolIndex>=0&&(D.text.placedSymbolArray.get(Bt.verticalPlacedTextSymbolIndex).hidden=Bi||Ti?1:0);var Gi=K.variableOffsets[Bt.crossTileID];Gi&&K.markUsedJustification(D,Gi.anchor,Bt,Di);var sn=K.placedOrientations[Bt.crossTileID];sn&&(K.markUsedJustification(D,"left",Bt,sn),K.markUsedOrientation(D,sn,Bt))}if(Ur){var zn=ac(ur.icon),Ja=!(qt&&Bt.verticalPlacedIconSymbolIndex&&fi);if(Bt.placedIconSymbolIndex>=0){var co=Ja?zn:aa;Qe(D.icon,Bt.numIconVertices,co),D.icon.placedSymbolArray.get(Bt.placedIconSymbolIndex).hidden=ur.icon.isHidden()}if(Bt.verticalPlacedIconSymbolIndex>=0){var ts=Ja?aa:zn;Qe(D.icon,Bt.numVerticalIconVertices,ts),D.icon.placedSymbolArray.get(Bt.verticalPlacedIconSymbolIndex).hidden=ur.icon.isHidden()}}if(D.hasIconCollisionBoxData()||D.hasTextCollisionBoxData()){var so=D.collisionArrays[Rt];if(so){var Yo=new i.Point(0,0);if(so.textBox||so.verticalTextBox){var ms=!0;if(ft){var ou=K.variableOffsets[Pt];ou?(Yo=Su(ou.anchor,ou.width,ou.height,ou.textOffset,ou.textBoxScale),Zt&&Yo._rotate(hr?K.transform.angle:-K.transform.angle)):ms=!1}so.textBox&&Rn(D.textCollisionBox.collisionVertexArray,ur.text.placed,!ms||fi,Yo.x,Yo.y),so.verticalTextBox&&Rn(D.textCollisionBox.collisionVertexArray,ur.text.placed,!ms||Ti,Yo.x,Yo.y)}var Cv=!!(!Ti&&so.verticalIconBox);so.iconBox&&Rn(D.iconCollisionBox.collisionVertexArray,ur.icon.placed,Cv,qt?Yo.x:0,qt?Yo.y:0),so.verticalIconBox&&Rn(D.iconCollisionBox.collisionVertexArray,ur.icon.placed,!Cv,qt?Yo.x:0,qt?Yo.y:0)}}},Ct=0;CtD},bs.prototype.setStale=function(){this.stale=!0};function Rn(Y,D,J,q,K){Y.emplaceBack(D?1:0,J?1:0,q||0,K||0),Y.emplaceBack(D?1:0,J?1:0,q||0,K||0),Y.emplaceBack(D?1:0,J?1:0,q||0,K||0),Y.emplaceBack(D?1:0,J?1:0,q||0,K||0)}var _a=Math.pow(2,25),Vu=Math.pow(2,24),Ol=Math.pow(2,17),xo=Math.pow(2,16),Kl=Math.pow(2,9),Ns=Math.pow(2,8),Hl=Math.pow(2,1);function ac(Y){if(Y.opacity===0&&!Y.placed)return 0;if(Y.opacity===1&&Y.placed)return 4294967295;var D=Y.placed?1:0,J=Math.floor(Y.opacity*127);return J*_a+D*Vu+J*Ol+D*xo+J*Kl+D*Ns+J*Hl+D}var aa=0,Oo=function(D){this._sortAcrossTiles=D.layout.get("symbol-z-order")!=="viewport-y"&&D.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Oo.prototype.continuePlacement=function(D,J,q,K,de){for(var ne=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var we=D[this._currentPlacementIndex],Ue=J[we],ft=this.placement.collisionIndex.transform.zoom;if(Ue.type==="symbol"&&(!Ue.minzoom||Ue.minzoom<=ft)&&(!Ue.maxzoom||Ue.maxzoom>ft)){this._inProgressLayer||(this._inProgressLayer=new Oo(Ue));var Zt=this._inProgressLayer.continuePlacement(q[Ue.source],this.placement,this._showCollisionBoxes,Ue,ne);if(Zt)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},qo.prototype.commit=function(D){return this.placement.commit(D),this.placement};var ql=512/i.EXTENT/2,Pc=function(D,J,q){this.tileID=D,this.indexedSymbolInstances={},this.bucketInstanceId=q;for(var K=0;KD.overscaledZ)for(var ft in Ue){var Zt=Ue[ft];Zt.tileID.isChildOf(D)&&Zt.findMatches(J.symbolInstances,D,ne)}else{var hr=D.scaledTo(Number(we)),qt=Ue[hr.key];qt&&qt.findMatches(J.symbolInstances,D,ne)}}for(var Ve=0;Ve0)throw new Error("Unimplemented: "+ne.map(function(we){return we.command}).join(", ")+".");return de.forEach(function(we){we.command!=="setTransition"&&K[we.command].apply(K,we.args)}),this.stylesheet=q,!0},D.prototype.addImage=function(q,K){if(this.getImage(q))return this.fire(new i.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(q,K),this._afterImageUpdated(q)},D.prototype.updateImage=function(q,K){this.imageManager.updateImage(q,K)},D.prototype.getImage=function(q){return this.imageManager.getImage(q)},D.prototype.removeImage=function(q){if(!this.getImage(q))return this.fire(new i.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(q),this._afterImageUpdated(q)},D.prototype._afterImageUpdated=function(q){this._availableImages=this.imageManager.listImages(),this._changedImages[q]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new i.Event("data",{dataType:"style"}))},D.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},D.prototype.addSource=function(q,K,de){var ne=this;if(de===void 0&&(de={}),this._checkLoaded(),this.sourceCaches[q]!==void 0)throw new Error("There is already a source with this ID");if(!K.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(K).join(", ")+".");var we=["vector","raster","geojson","video","image"],Ue=we.indexOf(K.type)>=0;if(!(Ue&&this._validate(i.validateStyle.source,"sources."+q,K,null,de))){this.map&&this.map._collectResourceTiming&&(K.collectResourceTiming=!0);var ft=this.sourceCaches[q]=new ri(q,K,this.dispatcher);ft.style=this,ft.setEventedParent(this,function(){return{isSourceLoaded:ne.loaded(),source:ft.serialize(),sourceId:q}}),ft.onAdd(this.map),this._changed=!0}},D.prototype.removeSource=function(q){if(this._checkLoaded(),this.sourceCaches[q]===void 0)throw new Error("There is no source with this ID");for(var K in this._layers)if(this._layers[K].source===q)return this.fire(new i.ErrorEvent(new Error('Source "'+q+'" cannot be removed while layer "'+K+'" is using it.')));var de=this.sourceCaches[q];delete this.sourceCaches[q],delete this._updatedSources[q],de.fire(new i.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:q})),de.setEventedParent(null),de.clearTiles(),de.onRemove&&de.onRemove(this.map),this._changed=!0},D.prototype.setGeoJSONSourceData=function(q,K){this._checkLoaded();var de=this.sourceCaches[q].getSource();de.setData(K),this._changed=!0},D.prototype.getSource=function(q){return this.sourceCaches[q]&&this.sourceCaches[q].getSource()},D.prototype.addLayer=function(q,K,de){de===void 0&&(de={}),this._checkLoaded();var ne=q.id;if(this.getLayer(ne)){this.fire(new i.ErrorEvent(new Error('Layer with id "'+ne+'" already exists on this map')));return}var we;if(q.type==="custom"){if(pl(this,i.validateCustomStyleLayer(q)))return;we=i.createStyleLayer(q)}else{if(typeof q.source=="object"&&(this.addSource(ne,q.source),q=i.clone$1(q),q=i.extend(q,{source:ne})),this._validate(i.validateStyle.layer,"layers."+ne,q,{arrayIndex:-1},de))return;we=i.createStyleLayer(q),this._validateLayer(we),we.setEventedParent(this,{layer:{id:ne}}),this._serializedLayers[we.id]=we.serialize()}var Ue=K?this._order.indexOf(K):this._order.length;if(K&&Ue===-1){this.fire(new i.ErrorEvent(new Error('Layer with id "'+K+'" does not exist on this map.')));return}if(this._order.splice(Ue,0,ne),this._layerOrderChanged=!0,this._layers[ne]=we,this._removedLayers[ne]&&we.source&&we.type!=="custom"){var ft=this._removedLayers[ne];delete this._removedLayers[ne],ft.type!==we.type?this._updatedSources[we.source]="clear":(this._updatedSources[we.source]="reload",this.sourceCaches[we.source].pause())}this._updateLayer(we),we.onAdd&&we.onAdd(this.map)},D.prototype.moveLayer=function(q,K){this._checkLoaded(),this._changed=!0;var de=this._layers[q];if(!de){this.fire(new i.ErrorEvent(new Error("The layer '"+q+"' does not exist in the map's style and cannot be moved.")));return}if(q!==K){var ne=this._order.indexOf(q);this._order.splice(ne,1);var we=K?this._order.indexOf(K):this._order.length;if(K&&we===-1){this.fire(new i.ErrorEvent(new Error('Layer with id "'+K+'" does not exist on this map.')));return}this._order.splice(we,0,q),this._layerOrderChanged=!0}},D.prototype.removeLayer=function(q){this._checkLoaded();var K=this._layers[q];if(!K){this.fire(new i.ErrorEvent(new Error("The layer '"+q+"' does not exist in the map's style and cannot be removed.")));return}K.setEventedParent(null);var de=this._order.indexOf(q);this._order.splice(de,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[q]=K,delete this._layers[q],delete this._serializedLayers[q],delete this._updatedLayers[q],delete this._updatedPaintProps[q],K.onRemove&&K.onRemove(this.map)},D.prototype.getLayer=function(q){return this._layers[q]},D.prototype.hasLayer=function(q){return q in this._layers},D.prototype.setLayerZoomRange=function(q,K,de){this._checkLoaded();var ne=this.getLayer(q);if(!ne){this.fire(new i.ErrorEvent(new Error("The layer '"+q+"' does not exist in the map's style and cannot have zoom extent.")));return}ne.minzoom===K&&ne.maxzoom===de||(K!=null&&(ne.minzoom=K),de!=null&&(ne.maxzoom=de),this._updateLayer(ne))},D.prototype.setFilter=function(q,K,de){de===void 0&&(de={}),this._checkLoaded();var ne=this.getLayer(q);if(!ne){this.fire(new i.ErrorEvent(new Error("The layer '"+q+"' does not exist in the map's style and cannot be filtered.")));return}if(!i.deepEqual(ne.filter,K)){if(K==null){ne.filter=void 0,this._updateLayer(ne);return}this._validate(i.validateStyle.filter,"layers."+ne.id+".filter",K,null,de)||(ne.filter=i.clone$1(K),this._updateLayer(ne))}},D.prototype.getFilter=function(q){return i.clone$1(this.getLayer(q).filter)},D.prototype.setLayoutProperty=function(q,K,de,ne){ne===void 0&&(ne={}),this._checkLoaded();var we=this.getLayer(q);if(!we){this.fire(new i.ErrorEvent(new Error("The layer '"+q+"' does not exist in the map's style and cannot be styled.")));return}i.deepEqual(we.getLayoutProperty(K),de)||(we.setLayoutProperty(K,de,ne),this._updateLayer(we))},D.prototype.getLayoutProperty=function(q,K){var de=this.getLayer(q);if(!de){this.fire(new i.ErrorEvent(new Error("The layer '"+q+"' does not exist in the map's style.")));return}return de.getLayoutProperty(K)},D.prototype.setPaintProperty=function(q,K,de,ne){ne===void 0&&(ne={}),this._checkLoaded();var we=this.getLayer(q);if(!we){this.fire(new i.ErrorEvent(new Error("The layer '"+q+"' does not exist in the map's style and cannot be styled.")));return}if(!i.deepEqual(we.getPaintProperty(K),de)){var Ue=we.setPaintProperty(K,de,ne);Ue&&this._updateLayer(we),this._changed=!0,this._updatedPaintProps[q]=!0}},D.prototype.getPaintProperty=function(q,K){return this.getLayer(q).getPaintProperty(K)},D.prototype.setFeatureState=function(q,K){this._checkLoaded();var de=q.source,ne=q.sourceLayer,we=this.sourceCaches[de];if(we===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+de+"' does not exist in the map's style.")));return}var Ue=we.getSource().type;if(Ue==="geojson"&&ne){this.fire(new i.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(Ue==="vector"&&!ne){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}q.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),we.setFeatureState(ne,q.id,K)},D.prototype.removeFeatureState=function(q,K){this._checkLoaded();var de=q.source,ne=this.sourceCaches[de];if(ne===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+de+"' does not exist in the map's style.")));return}var we=ne.getSource().type,Ue=we==="vector"?q.sourceLayer:void 0;if(we==="vector"&&!Ue){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(K&&typeof q.id!="string"&&typeof q.id!="number"){this.fire(new i.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}ne.removeFeatureState(Ue,q.id,K)},D.prototype.getFeatureState=function(q){this._checkLoaded();var K=q.source,de=q.sourceLayer,ne=this.sourceCaches[K];if(ne===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+K+"' does not exist in the map's style.")));return}var we=ne.getSource().type;if(we==="vector"&&!de){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return q.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),ne.getFeatureState(de,q.id)},D.prototype.getTransition=function(){return i.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},D.prototype.serialize=function(){return i.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:i.mapObject(this.sourceCaches,function(q){return q.serialize()}),layers:this._serializeLayers(this._order)},function(q){return q!==void 0})},D.prototype._updateLayer=function(q){this._updatedLayers[q.id]=!0,q.source&&!this._updatedSources[q.source]&&this.sourceCaches[q.source].getSource().type!=="raster"&&(this._updatedSources[q.source]="reload",this.sourceCaches[q.source].pause()),this._changed=!0},D.prototype._flattenAndSortRenderedFeatures=function(q){for(var K=this,de=function(Ti){return K._layers[Ti].type==="fill-extrusion"},ne={},we=[],Ue=this._order.length-1;Ue>=0;Ue--){var ft=this._order[Ue];if(de(ft)){ne[ft]=Ue;for(var Zt=0,hr=q;Zt=0;Rt--){var Bt=this._order[Rt];if(de(Bt))for(var Dt=we.length-1;Dt>=0;Dt--){var yt=we[Dt].feature;if(ne[yt.layer.id] .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":`display:block; width: 21px; height: 21px; background-image: url('data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E')`}}});var Zk=ye((kxr,UVe)=>{"use strict";var OVe=Pr(),BVe=ka().defaultLine,djt=Cc().attributes,vjt=ec(),pjt=pf().textposition,gjt=mc().overrideAll,mjt=vl().templatedArray,oJ=m1(),NVe=vjt({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});NVe.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var yjt=UVe.exports=gjt({_arrayAttrRegexps:[OVe.counterRegex("mapbox",".layers",!0)],domain:djt({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:oJ.styleValuesMapbox.concat(oJ.styleValuesNonMapbox),dflt:oJ.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:mjt("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:BVe},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:BVe}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:NVe,textposition:OVe.extendFlat({},pjt,{arrayOk:!1})}})},"plot","from-root");yjt.uirevision={valType:"any",editType:"none"}});var Kz=ye((Cxr,jVe)=>{"use strict";var{hovertemplateAttrs:_jt,texttemplateAttrs:xjt,templatefallbackAttrs:VVe}=Ll(),bjt=Pg(),Yk=ew(),E5=pf(),GVe=Zk(),wjt=Gl(),Tjt=Tu(),hw=Ao().extendFlat,Ajt=mc().overrideAll,Sjt=Zk(),HVe=Yk.line,k5=Yk.marker;jVe.exports=Ajt({lon:Yk.lon,lat:Yk.lat,cluster:{enabled:{valType:"boolean"},maxzoom:hw({},Sjt.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:hw({},k5.opacity,{dflt:1})},mode:hw({},E5.mode,{dflt:"markers"}),text:hw({},E5.text,{}),texttemplate:xjt({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:VVe({editType:"plot"}),hovertext:hw({},E5.hovertext,{}),line:{color:HVe.color,width:HVe.width},connectgaps:E5.connectgaps,marker:hw({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:k5.opacity,size:k5.size,sizeref:k5.sizeref,sizemin:k5.sizemin,sizemode:k5.sizemode},Tjt("marker")),fill:Yk.fill,fillcolor:bjt(),textfont:GVe.layers.symbol.textfont,textposition:GVe.layers.symbol.textposition,below:{valType:"string"},selected:{marker:E5.selected.marker},unselected:{marker:E5.unselected.marker},hoverinfo:hw({},wjt.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:_jt(),hovertemplatefallback:VVe()},"calc","nested")});var sJ=ye((Lxr,WVe)=>{"use strict";var Mjt=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];WVe.exports={isSupportedFont:function(e){return Mjt.indexOf(e)!==-1}}});var YVe=ye((Pxr,ZVe)=>{"use strict";var Kk=Pr(),lJ=Ru(),Ejt=$p(),kjt=D0(),Cjt=F0(),Ljt=Fg(),XVe=Kz(),Pjt=sJ().isSupportedFont;ZVe.exports=function(t,r,n,i){function a(p,k){return Kk.coerce(t,r,XVe,p,k)}function o(p,k){return Kk.coerce2(t,r,XVe,p,k)}var s=Ijt(t,r,a);if(!s){r.visible=!1;return}if(a("text"),a("texttemplate"),a("texttemplatefallback"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("mode"),a("below"),lJ.hasMarkers(r)){Ejt(t,r,n,i,a,{noLine:!0,noAngle:!0}),a("marker.allowoverlap"),a("marker.angle");var l=r.marker;l.symbol!=="circle"&&(Kk.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),Kk.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}lJ.hasLines(r)&&(kjt(t,r,n,i,a,{noDash:!0}),a("connectgaps"));var u=o("cluster.maxzoom"),c=o("cluster.step"),f=o("cluster.color",r.marker&&r.marker.color||n),h=o("cluster.size"),d=o("cluster.opacity"),v=u!==!1||c!==!1||f!==!1||h!==!1||d!==!1,m=a("cluster.enabled",v);if(m||lJ.hasText(r)){var b=i.font.family;Cjt(t,r,i,a,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:Pjt(b)?b:"Open Sans Regular",weight:i.font.weight,style:i.font.style,size:i.font.size,color:i.font.color}})}a("fill"),r.fill!=="none"&&Ljt(t,r,n,a),Kk.coerceSelectionMarkerOpacity(r,a)};function Ijt(e,t,r){var n=r("lon")||[],i=r("lat")||[],a=Math.min(n.length,i.length);return t._length=a,a}});var uJ=ye((Ixr,JVe)=>{"use strict";var KVe=ho();JVe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=KVe.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=KVe.tickText(o,o.c2l(s[1]),!0).text,i}});var cJ=ye((Rxr,QVe)=>{"use strict";var $Ve=Pr();QVe.exports=function(t,r){var n=t.split(" "),i=n[0],a=n[1],o=$Ve.isArrayOrTypedArray(r)?$Ve.mean(r):r,s=.5+o/100,l=1.5+o/100,u=["",""],c=[0,0];switch(i){case"top":u[0]="top",c[1]=-l;break;case"bottom":u[0]="bottom",c[1]=l;break}switch(a){case"left":u[1]="right",c[0]=-s;break;case"right":u[1]="left",c[0]=s;break}var f;return u[0]&&u[1]?f=u.join("-"):u[0]?f=u[0]:u[1]?f=u[1]:f="center",{anchor:f,offset:c}}});var aGe=ye((Dxr,nGe)=>{"use strict";var rGe=Eo(),av=Pr(),Rjt=fs().BADNUM,$z=cx(),eGe=tc(),Djt=So(),Fjt=O3(),Qz=Ru(),zjt=sJ().isSupportedFont,qjt=cJ(),Ojt=ip().appendArrayPointValue,Bjt=Zl().NEWLINES,Njt=Zl().BR_TAG_ALL;nGe.exports=function(t,r){var n=r[0].trace,i=n.visible===!0&&n._length!==0,a=n.fill!=="none",o=Qz.hasLines(n),s=Qz.hasMarkers(n),l=Qz.hasText(n),u=s&&n.marker.symbol==="circle",c=s&&n.marker.symbol!=="circle",f=n.cluster&&n.cluster.enabled,h=Jz("fill"),d=Jz("line"),v=Jz("circle"),m=Jz("symbol"),b={fill:h,line:d,circle:v,symbol:m};if(!i)return b;var p;if((a||o)&&(p=$z.calcTraceToLineCoords(r)),a&&(h.geojson=$z.makePolygon(p),h.layout.visibility="visible",av.extendFlat(h.paint,{"fill-color":n.fillcolor})),o&&(d.geojson=$z.makeLine(p),d.layout.visibility="visible",av.extendFlat(d.paint,{"line-width":n.line.width,"line-color":n.line.color,"line-opacity":n.opacity})),u){var k=Ujt(r);v.geojson=k.geojson,v.layout.visibility="visible",f&&(v.filter=["!",["has","point_count"]],b.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":hJ(n.cluster.color,n.cluster.step),"circle-radius":hJ(n.cluster.size,n.cluster.step),"circle-opacity":hJ(n.cluster.opacity,n.cluster.step)}},b.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":tGe(n),"text-size":12}}),av.extendFlat(v.paint,{"circle-color":k.mcc,"circle-radius":k.mrc,"circle-opacity":k.mo})}if(u&&f&&(v.filter=["!",["has","point_count"]]),(c||l)&&(m.geojson=Vjt(r,t),av.extendFlat(m.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),c&&(av.extendFlat(m.layout,{"icon-size":n.marker.size/10}),"angle"in n.marker&&n.marker.angle!=="auto"&&av.extendFlat(m.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),m.layout["icon-allow-overlap"]=n.marker.allowoverlap,av.extendFlat(m.paint,{"icon-opacity":n.opacity*n.marker.opacity,"icon-color":n.marker.color})),l)){var M=(n.marker||{}).size,T=qjt(n.textposition,M);av.extendFlat(m.layout,{"text-size":n.textfont.size,"text-anchor":T.anchor,"text-offset":T.offset,"text-font":tGe(n)}),av.extendFlat(m.paint,{"text-color":n.textfont.color,"text-opacity":n.opacity})}return b};function Jz(e){return{type:e,geojson:$z.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function Ujt(e){var t=e[0].trace,r=t.marker,n=t.selectedpoints,i=av.isArrayOrTypedArray(r.color),a=av.isArrayOrTypedArray(r.size),o=av.isArrayOrTypedArray(r.opacity),s;function l(M){return t.opacity*M}function u(M){return M/2}var c;i&&(eGe.hasColorscale(t,"marker")?c=eGe.makeColorScaleFuncFromTrace(r):c=av.identity);var f;a&&(f=Fjt(t));var h;o&&(h=function(M){var T=rGe(M)?+av.constrain(M,0,1):0;return l(T)});var d=[];for(s=0;s850?s+=" Black":i>750?s+=" Extra Bold":i>650?s+=" Bold":i>550?s+=" Semi Bold":i>450?s+=" Medium":i>350?s+=" Regular":i>250?s+=" Light":i>150?s+=" Extra Light":s+=" Thin"):a.slice(0,2).join(" ")==="Open Sans"?(s="Open Sans",i>750?s+=" Extrabold":i>650?s+=" Bold":i>550?s+=" Semibold":i>350?s+=" Regular":s+=" Light"):a.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(s="Klokantech Noto Sans",a[3]==="CJK"&&(s+=" CJK"),s+=i>500?" Bold":" Regular")),o&&(s+=" Italic"),s==="Open Sans Regular Italic"?s="Open Sans Italic":s==="Open Sans Regular Bold"?s="Open Sans Bold":s==="Open Sans Regular Bold Italic"?s="Open Sans Bold Italic":s==="Klokantech Noto Sans Regular Italic"&&(s="Klokantech Noto Sans Italic"),zjt(s)||(s=r);var l=s.split(", ");return l}});var uGe=ye((Fxr,lGe)=>{"use strict";var Gjt=Pr(),oGe=aGe(),C5=m1().traceLayerPrefix,ng={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function sGe(e,t,r,n){this.type="scattermapbox",this.subplot=e,this.uid=t,this.clusterEnabled=r,this.isHidden=n,this.sourceIds={fill:"source-"+t+"-fill",line:"source-"+t+"-line",circle:"source-"+t+"-circle",symbol:"source-"+t+"-symbol",cluster:"source-"+t+"-circle",clusterCount:"source-"+t+"-circle"},this.layerIds={fill:C5+t+"-fill",line:C5+t+"-line",circle:C5+t+"-circle",symbol:C5+t+"-symbol",cluster:C5+t+"-cluster",clusterCount:C5+t+"-cluster-count"},this.below=null}var Jk=sGe.prototype;Jk.addSource=function(e,t,r){var n={type:"geojson",data:t.geojson};r&&r.enabled&&Gjt.extendFlat(n,{cluster:!0,clusterMaxZoom:r.maxzoom});var i=this.subplot.map.getSource(this.sourceIds[e]);i?i.setData(t.geojson):this.subplot.map.addSource(this.sourceIds[e],n)};Jk.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};Jk.addLayer=function(e,t,r){var n={type:t.type,id:this.layerIds[e],source:this.sourceIds[e],layout:t.layout,paint:t.paint};t.filter&&(n.filter=t.filter);for(var i=this.layerIds[e],a,o=this.subplot.getMapLayers(),s=0;s=0;L--){var x=T[L];i.removeLayer(u.layerIds[x])}M||i.removeSource(u.sourceIds.circle)}function h(M){for(var T=ng.nonCluster,L=0;L=0;L--){var x=T[L];i.removeLayer(u.layerIds[x]),M||i.removeSource(u.sourceIds[x])}}function v(M){l?f(M):d(M)}function m(M){s?c(M):h(M)}function b(){for(var M=s?ng.cluster:ng.nonCluster,T=0;T=0;n--){var i=r[n];t.removeLayer(this.layerIds[i]),t.removeSource(this.sourceIds[i])}};lGe.exports=function(t,r){var n=r[0].trace,i=n.cluster&&n.cluster.enabled,a=n.visible!==!0,o=new sGe(t,n.uid,i,a),s=oGe(t.gd,r),l=o.below=t.belowLookup["trace-"+n.uid],u,c,f;if(i)for(o.addSource("circle",s.circle,n.cluster),u=0;u{"use strict";var Hjt=vf(),dJ=Pr(),jjt=mT(),Wjt=dJ.fillText,Xjt=fs().BADNUM,Zjt=m1().traceLayerPrefix;function Yjt(e,t,r){var n=e.cd,i=n[0].trace,a=e.xa,o=e.ya,s=e.subplot,l=[],u=Zjt+i.uid+"-circle",c=i.cluster&&i.cluster.enabled;if(c){var f=s.map.queryRenderedFeatures(null,{layers:[u]});l=f.map(function(S){return S.id})}var h=t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360),d=h*360,v=t-d;function m(S){var g=S.lonlat;if(g[0]===Xjt||c&&l.indexOf(S.i+1)===-1)return 1/0;var P=dJ.modHalf(g[0],360),E=g[1],z=s.project([P,E]),q=z.x-a.c2p([v,E]),U=z.y-o.c2p([P,r]),G=Math.max(3,S.mrc||0);return Math.max(Math.sqrt(q*q+U*U)-G,1-3/G)}if(Hjt.getClosest(n,m,e),e.index!==!1){var b=n[e.index],p=b.lonlat,k=[dJ.modHalf(p[0],360)+d,p[1]],M=a.c2p(k),T=o.c2p(k),L=b.mrc||1;e.x0=M-L,e.x1=M+L,e.y0=T-L,e.y1=T+L;var x={};x[i.subplot]={_subplot:s};var C=i._module.formatLabels(b,i,x);return e.lonLabel=C.lonLabel,e.latLabel=C.latLabel,e.color=jjt(i,b),e.extraText=cGe(i,b,n[0].t.labels),e.hovertemplate=i.hovertemplate,[e]}}function cGe(e,t,r){if(e.hovertemplate)return;var n=t.hi||e.hoverinfo,i=n.split("+"),a=i.indexOf("all")!==-1,o=i.indexOf("lon")!==-1,s=i.indexOf("lat")!==-1,l=t.lonlat,u=[];function c(f){return f+"\xB0"}return a||o&&s?u.push("("+c(l[1])+", "+c(l[0])+")"):o?u.push(r.lon+c(l[0])):s&&u.push(r.lat+c(l[1])),(a||i.indexOf("text")!==-1)&&Wjt(t,e,u),u.join("
")}fGe.exports={hoverPoints:Yjt,getExtraText:cGe}});var dGe=ye((qxr,hGe)=>{"use strict";hGe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var pGe=ye((Oxr,vGe)=>{"use strict";var Kjt=Pr(),Jjt=Ru(),$jt=fs().BADNUM;vGe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l;if(!Jjt.hasMarkers(s))return[];if(r===!1)for(l=0;l{(function(e,t){typeof vJ=="object"&&typeof pJ!="undefined"?pJ.exports=t():(e=e||self,e.mapboxgl=t())})(vJ,function(){"use strict";var e,t,r;function n(i,a){if(!e)e=a;else if(!t)t=a;else{var o="var sharedChunk = {}; ("+e+")(sharedChunk); ("+t+")(sharedChunk);",s={};e(s),r=a(s),typeof window!="undefined"&&(r.workerUrl=window.URL.createObjectURL(new Blob([o],{type:"text/javascript"})))}}return n(["exports"],function(i){"use strict";function a(y,_){return _={exports:{}},y(_,_.exports),_.exports}var o="1.13.4",s=l;function l(y,_,I,V){this.cx=3*y,this.bx=3*(I-y)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*_,this.by=3*(V-_)-this.cy,this.ay=1-this.cy-this.by,this.p1x=y,this.p1y=V,this.p2x=I,this.p2y=V}l.prototype.sampleCurveX=function(y){return((this.ax*y+this.bx)*y+this.cx)*y},l.prototype.sampleCurveY=function(y){return((this.ay*y+this.by)*y+this.cy)*y},l.prototype.sampleCurveDerivativeX=function(y){return(3*this.ax*y+2*this.bx)*y+this.cx},l.prototype.solveCurveX=function(y,_){typeof _=="undefined"&&(_=1e-6);var I,V,$,ae,he;for($=y,he=0;he<8;he++){if(ae=this.sampleCurveX($)-y,Math.abs(ae)<_)return $;var Fe=this.sampleCurveDerivativeX($);if(Math.abs(Fe)<1e-6)break;$=$-ae/Fe}if(I=0,V=1,$=y,$V)return V;for(;Iae?I=$:V=$,$=(V-I)*.5+I}return $},l.prototype.solve=function(y,_){return this.sampleCurveY(this.solveCurveX(y,_))};var u=c;function c(y,_){this.x=y,this.y=_}c.prototype={clone:function(){return new c(this.x,this.y)},add:function(y){return this.clone()._add(y)},sub:function(y){return this.clone()._sub(y)},multByPoint:function(y){return this.clone()._multByPoint(y)},divByPoint:function(y){return this.clone()._divByPoint(y)},mult:function(y){return this.clone()._mult(y)},div:function(y){return this.clone()._div(y)},rotate:function(y){return this.clone()._rotate(y)},rotateAround:function(y,_){return this.clone()._rotateAround(y,_)},matMult:function(y){return this.clone()._matMult(y)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(y){return this.x===y.x&&this.y===y.y},dist:function(y){return Math.sqrt(this.distSqr(y))},distSqr:function(y){var _=y.x-this.x,I=y.y-this.y;return _*_+I*I},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(y){return Math.atan2(this.y-y.y,this.x-y.x)},angleWith:function(y){return this.angleWithSep(y.x,y.y)},angleWithSep:function(y,_){return Math.atan2(this.x*_-this.y*y,this.x*y+this.y*_)},_matMult:function(y){var _=y[0]*this.x+y[1]*this.y,I=y[2]*this.x+y[3]*this.y;return this.x=_,this.y=I,this},_add:function(y){return this.x+=y.x,this.y+=y.y,this},_sub:function(y){return this.x-=y.x,this.y-=y.y,this},_mult:function(y){return this.x*=y,this.y*=y,this},_div:function(y){return this.x/=y,this.y/=y,this},_multByPoint:function(y){return this.x*=y.x,this.y*=y.y,this},_divByPoint:function(y){return this.x/=y.x,this.y/=y.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var y=this.y;return this.y=this.x,this.x=-y,this},_rotate:function(y){var _=Math.cos(y),I=Math.sin(y),V=_*this.x-I*this.y,$=I*this.x+_*this.y;return this.x=V,this.y=$,this},_rotateAround:function(y,_){var I=Math.cos(y),V=Math.sin(y),$=_.x+I*(this.x-_.x)-V*(this.y-_.y),ae=_.y+V*(this.x-_.x)+I*(this.y-_.y);return this.x=$,this.y=ae,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},c.convert=function(y){return y instanceof c?y:Array.isArray(y)?new c(y[0],y[1]):y};var f=typeof self!="undefined"?self:{};function h(y,_){if(Array.isArray(y)){if(!Array.isArray(_)||y.length!==_.length)return!1;for(var I=0;I=1)return 1;var _=y*y,I=_*y;return 4*(y<.5?I:3*(y-_)+I-.75)}function m(y,_,I,V){var $=new s(y,_,I,V);return function(ae){return $.solve(ae)}}var b=m(.25,.1,.25,1);function p(y,_,I){return Math.min(I,Math.max(_,y))}function k(y,_,I){var V=I-_,$=((y-_)%V+V)%V+_;return $===_?I:$}function M(y,_,I){if(!y.length)return I(null,[]);var V=y.length,$=new Array(y.length),ae=null;y.forEach(function(he,Fe){_(he,function(it,yt){it&&(ae=it),$[Fe]=yt,--V===0&&I(ae,$)})})}function T(y){var _=[];for(var I in y)_.push(y[I]);return _}function L(y,_){var I=[];for(var V in y)V in _||I.push(V);return I}function x(y){for(var _=[],I=arguments.length-1;I-- >0;)_[I]=arguments[I+1];for(var V=0,$=_;V<$.length;V+=1){var ae=$[V];for(var he in ae)y[he]=ae[he]}return y}function C(y,_){for(var I={},V=0;V<_.length;V++){var $=_[V];$ in y&&(I[$]=y[$])}return I}var S=1;function g(){return S++}function P(){function y(_){return _?(_^Math.random()*16>>_/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,y)}return y()}function E(y){return y<=1?1:Math.pow(2,Math.ceil(Math.log(y)/Math.LN2))}function z(y){return y?/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(y):!1}function q(y,_){y.forEach(function(I){_[I]&&(_[I]=_[I].bind(_))})}function U(y,_){return y.indexOf(_,y.length-_.length)!==-1}function G(y,_,I){var V={};for(var $ in y)V[$]=_.call(I||this,y[$],$,y);return V}function Z(y,_,I){var V={};for(var $ in y)_.call(I||this,y[$],$,y)&&(V[$]=y[$]);return V}function j(y){return Array.isArray(y)?y.map(j):typeof y=="object"&&y?G(y,j):y}function N(y,_){for(var I=0;I=0)return!0;return!1}var H={};function re(y){H[y]||(typeof console!="undefined"&&console.warn(y),H[y]=!0)}function oe(y,_,I){return(I.y-y.y)*(_.x-y.x)>(_.y-y.y)*(I.x-y.x)}function _e(y){for(var _=0,I=0,V=y.length,$=V-1,ae=void 0,he=void 0;I@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,I={};if(y.replace(_,function($,ae,he,Fe){var it=he||Fe;return I[ae]=it?it.toLowerCase():!0,""}),I["max-age"]){var V=parseInt(I["max-age"],10);isNaN(V)?delete I["max-age"]:I["max-age"]=V}return I}var ie=null;function Se(y){if(ie==null){var _=y.navigator?y.navigator.userAgent:null;ie=!!y.safari||!!(_&&(/\b(iPad|iPhone|iPod)\b/.test(_)||_.match("Safari")&&!_.match("Chrome")))}return ie}function Ee(y){try{var _=f[y];return _.setItem("_mapbox_test_",1),_.removeItem("_mapbox_test_"),!0}catch(I){return!1}}function we(y){return f.btoa(encodeURIComponent(y).replace(/%([0-9A-F]{2})/g,function(_,I){return String.fromCharCode(+("0x"+I))}))}function De(y){return decodeURIComponent(f.atob(y).split("").map(function(_){return"%"+("00"+_.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var Le=f.performance&&f.performance.now?f.performance.now.bind(f.performance):Date.now.bind(Date),me=f.requestAnimationFrame||f.mozRequestAnimationFrame||f.webkitRequestAnimationFrame||f.msRequestAnimationFrame,Pe=f.cancelAnimationFrame||f.mozCancelAnimationFrame||f.webkitCancelAnimationFrame||f.msCancelAnimationFrame,ce,He,lt={now:Le,frame:function(_){var I=me(_);return{cancel:function(){return Pe(I)}}},getImageData:function(_,I){I===void 0&&(I=0);var V=f.document.createElement("canvas"),$=V.getContext("2d");if(!$)throw new Error("failed to create canvas 2d context");return V.width=_.width,V.height=_.height,$.drawImage(_,0,0,_.width,_.height),$.getImageData(-I,-I,_.width+2*I,_.height+2*I)},resolveURL:function(_){return ce||(ce=f.document.createElement("a")),ce.href=_,ce.href},hardwareConcurrency:f.navigator&&f.navigator.hardwareConcurrency||4,get devicePixelRatio(){return f.devicePixelRatio},get prefersReducedMotion(){return f.matchMedia?(He==null&&(He=f.matchMedia("(prefers-reduced-motion: reduce)")),He.matches):!1}},mt={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?this.API_URL.indexOf("https://api.mapbox.cn")===0?"https://events.mapbox.cn/events/v2":this.API_URL.indexOf("https://api.mapbox.com")===0?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},Vt={supported:!1,testSupport:nr},st,ct=!1,Qt,Ht=!1;f.document&&(Qt=f.document.createElement("img"),Qt.onload=function(){st&&tt(st),st=null,Ht=!0},Qt.onerror=function(){ct=!0,st=null},Qt.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function nr(y){ct||!Qt||(Ht?tt(y):st=y)}function tt(y){var _=y.createTexture();y.bindTexture(y.TEXTURE_2D,_);try{if(y.texImage2D(y.TEXTURE_2D,0,y.RGBA,y.RGBA,y.UNSIGNED_BYTE,Qt),y.isContextLost())return;Vt.supported=!0}catch(I){}y.deleteTexture(_),ct=!0}var je="01";function Ue(){for(var y="1",_="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",I="",V=0;V<10;V++)I+=_[Math.floor(Math.random()*62)];var $=12*60*60*1e3,ae=[y,je,I].join(""),he=Date.now()+$;return{token:ae,tokenExpiresAt:he}}var Ae=function(_,I){this._transformRequestFn=_,this._customAccessToken=I,this._createSkuToken()};Ae.prototype._createSkuToken=function(){var _=Ue();this._skuToken=_.token,this._skuTokenExpiresAt=_.tokenExpiresAt},Ae.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Ae.prototype.transformRequest=function(_,I){return this._transformRequestFn?this._transformRequestFn(_,I)||{url:_}:{url:_}},Ae.prototype.normalizeStyleURL=function(_,I){if(!rt(_))return _;var V=Xt(_);return V.path="/styles/v1"+V.path,this._makeAPIURL(V,this._customAccessToken||I)},Ae.prototype.normalizeGlyphsURL=function(_,I){if(!rt(_))return _;var V=Xt(_);return V.path="/fonts/v1"+V.path,this._makeAPIURL(V,this._customAccessToken||I)},Ae.prototype.normalizeSourceURL=function(_,I){if(!rt(_))return _;var V=Xt(_);return V.path="/v4/"+V.authority+".json",V.params.push("secure"),this._makeAPIURL(V,this._customAccessToken||I)},Ae.prototype.normalizeSpriteURL=function(_,I,V,$){var ae=Xt(_);return rt(_)?(ae.path="/styles/v1"+ae.path+"/sprite"+I+V,this._makeAPIURL(ae,this._customAccessToken||$)):(ae.path+=""+I+V,or(ae))},Ae.prototype.normalizeTileURL=function(_,I){if(this._isSkuTokenExpired()&&this._createSkuToken(),_&&!rt(_))return _;var V=Xt(_),$=/(\.(png|jpg)\d*)(?=$)/,ae=/^.+\/v4\//,he=lt.devicePixelRatio>=2||I===512?"@2x":"",Fe=Vt.supported?".webp":"$1";V.path=V.path.replace($,""+he+Fe),V.path=V.path.replace(ae,"/"),V.path="/v4"+V.path;var it=this._customAccessToken||Et(V.params)||mt.ACCESS_TOKEN;return mt.REQUIRE_ACCESS_TOKEN&&it&&this._skuToken&&V.params.push("sku="+this._skuToken),this._makeAPIURL(V,it)},Ae.prototype.canonicalizeTileURL=function(_,I){var V="/v4/",$=/\.[\w]+$/,ae=Xt(_);if(!ae.path.match(/(^\/v4\/)/)||!ae.path.match($))return _;var he="mapbox://tiles/";he+=ae.path.replace(V,"");var Fe=ae.params;return I&&(Fe=Fe.filter(function(it){return!it.match(/^access_token=/)})),Fe.length&&(he+="?"+Fe.join("&")),he},Ae.prototype.canonicalizeTileset=function(_,I){for(var V=I?rt(I):!1,$=[],ae=0,he=_.tiles||[];ae=0&&_.params.splice(ae,1)}if($.path!=="/"&&(_.path=""+$.path+_.path),!mt.REQUIRE_ACCESS_TOKEN)return or(_);if(I=I||mt.ACCESS_TOKEN,!I)throw new Error("An API access token is required to use Mapbox GL. "+V);if(I[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+V);return _.params=_.params.filter(function(he){return he.indexOf("access_token")===-1}),_.params.push("access_token="+I),or(_)};function rt(y){return y.indexOf("mapbox:")===0}var St=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function Tt(y){return St.test(y)}function dt(y){return y.indexOf("sku=")>0&&Tt(y)}function Et(y){for(var _=0,I=y;_=1&&f.localStorage.setItem(I,JSON.stringify(this.eventData))}catch($){re("Unable to write to LocalStorage")}},ei.prototype.processRequests=function(_){},ei.prototype.postEvent=function(_,I,V,$){var ae=this;if(mt.EVENTS_URL){var he=Xt(mt.EVENTS_URL);he.params.push("access_token="+($||mt.ACCESS_TOKEN||""));var Fe={event:this.type,created:new Date(_).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:o,skuId:je,userId:this.anonId},it=I?x(Fe,I):Fe,yt={url:or(he),headers:{"Content-Type":"text/plain"},body:JSON.stringify([it])};this.pendingRequest=$r(yt,function(Lt){ae.pendingRequest=null,V(Lt),ae.saveEventData(),ae.processRequests($)})}},ei.prototype.queueRequest=function(_,I){this.queue.push(_),this.processRequests(I)};var qr=function(y){function _(){y.call(this,"map.load"),this.success={},this.skuToken=""}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.postMapLoadEvent=function(V,$,ae,he){this.skuToken=ae,(mt.EVENTS_URL&&he||mt.ACCESS_TOKEN&&Array.isArray(V)&&V.some(function(Fe){return rt(Fe)||Tt(Fe)}))&&this.queueRequest({id:$,timestamp:Date.now()},he)},_.prototype.processRequests=function(V){var $=this;if(!(this.pendingRequest||this.queue.length===0)){var ae=this.queue.shift(),he=ae.id,Fe=ae.timestamp;he&&this.success[he]||(this.anonId||this.fetchEventData(),z(this.anonId)||(this.anonId=P()),this.postEvent(Fe,{skuToken:this.skuToken},function(it){it||he&&($.success[he]=!0)},V))}},_}(ei),jr=function(y){function _(I){y.call(this,"appUserTurnstile"),this._customAccessToken=I}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.postTurnstileEvent=function(V,$){mt.EVENTS_URL&&mt.ACCESS_TOKEN&&Array.isArray(V)&&V.some(function(ae){return rt(ae)||Tt(ae)})&&this.queueRequest(Date.now(),$)},_.prototype.processRequests=function(V){var $=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var ae=Er(mt.ACCESS_TOKEN),he=ae?ae.u:mt.ACCESS_TOKEN,Fe=he!==this.eventData.tokenU;z(this.anonId)||(this.anonId=P(),Fe=!0);var it=this.queue.shift();if(this.eventData.lastSuccess){var yt=new Date(this.eventData.lastSuccess),Lt=new Date(it),sr=(it-this.eventData.lastSuccess)/(24*60*60*1e3);Fe=Fe||sr>=1||sr<-1||yt.getDate()!==Lt.getDate()}else Fe=!0;if(!Fe)return this.processRequests();this.postEvent(it,{"enabled.telemetry":!1},function(gr){gr||($.eventData.lastSuccess=it,$.eventData.tokenU=he)},V)}},_}(ei),gt=new jr,Ge=gt.postTurnstileEvent.bind(gt),Je=new qr,We=Je.postMapLoadEvent.bind(Je),et="mapbox-tiles",xt=500,At=50,Kt=1e3*60*7,er;function Sr(){f.caches&&!er&&(er=f.caches.open(et))}var Gr;function Ir(y,_){if(Gr===void 0)try{new Response(new ReadableStream),Gr=!0}catch(I){Gr=!1}Gr?_(y.body):y.blob().then(_)}function Yr(y,_,I){if(Sr(),!!er){var V={status:_.status,statusText:_.statusText,headers:new f.Headers};_.headers.forEach(function(he,Fe){return V.headers.set(Fe,he)});var $=ge(_.headers.get("Cache-Control")||"");if(!$["no-store"]){$["max-age"]&&V.headers.set("Expires",new Date(I+$["max-age"]*1e3).toUTCString());var ae=new Date(V.headers.get("Expires")).getTime()-I;aeDate.now()&&!I["no-cache"]}var mi=1/0;function un(y){mi++,mi>At&&(y.getActor().send("enforceCacheSizeLimit",xt),mi=0)}function Fn(y){Sr(),er&&er.then(function(_){_.keys().then(function(I){for(var V=0;V=200&&I.status<300||I.status===0)&&I.response!==null){var $=I.response;if(y.type==="json")try{$=JSON.parse(I.response)}catch(ae){return _(ae)}_(null,$,I.getResponseHeader("Cache-Control"),I.getResponseHeader("Expires"))}else _(new Jn(I.statusText,I.status,y.url))},I.send(y.body),{cancel:function(){return I.abort()}}}var wr=function(y,_){if(!wt(y.url)){if(f.fetch&&f.Request&&f.AbortController&&f.Request.prototype.hasOwnProperty("signal"))return rr(y,_);if(Ce()&&self.worker&&self.worker.actor){var I=!0;return self.worker.actor.send("getResource",y,_,void 0,I)}}return ir(y,_)},Xr=function(y,_){return wr(x(y,{type:"json"}),_)},ti=function(y,_){return wr(x(y,{type:"arrayBuffer"}),_)},$r=function(y,_){return wr(x(y,{method:"POST"}),_)};function Ri(y){var _=f.document.createElement("a");return _.href=y,_.protocol===f.document.location.protocol&&_.host===f.document.location.host}var Zi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function en(y,_,I,V){var $=new f.Image,ae=f.URL;$.onload=function(){_(null,$),ae.revokeObjectURL($.src),$.onload=null,f.requestAnimationFrame(function(){$.src=Zi})},$.onerror=function(){return _(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var he=new f.Blob([new Uint8Array(y)],{type:"image/png"});$.cacheControl=I,$.expires=V,$.src=y.byteLength?ae.createObjectURL(he):Zi}function fn(y,_){var I=new f.Blob([new Uint8Array(y)],{type:"image/png"});f.createImageBitmap(I).then(function(V){_(null,V)}).catch(function(V){_(new Error("Could not load image because of "+V.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var yn,Mn,Ba=function(){yn=[],Mn=0};Ba();var ua=function(y,_){if(Vt.supported&&(y.headers||(y.headers={}),y.headers.accept="image/webp,*/*"),Mn>=mt.MAX_PARALLEL_IMAGE_REQUESTS){var I={requestParameters:y,callback:_,cancelled:!1,cancel:function(){this.cancelled=!0}};return yn.push(I),I}Mn++;var V=!1,$=function(){if(!V)for(V=!0,Mn--;yn.length&&Mn0||this._oneTimeListeners&&this._oneTimeListeners[_]&&this._oneTimeListeners[_].length>0||this._eventedParent&&this._eventedParent.listens(_)},jn.prototype.setEventedParent=function(_,I){return this._eventedParent=_,this._eventedParentData=I,this};var Ha=8,vo={version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},Gn={"*":{type:"source"}},Ct=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],Ar={type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},Jr={type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},hi={type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},hn={type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},Sn={type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},En={type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},ki={id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},_n=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],ya={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ea={"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Ma={"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_o={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},No={"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},po={"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Lo={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ko={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Ds={type:"array",value:"*"},Fs={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},ll={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},ul={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},zl={type:"array",value:"*",minimum:1},us={anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},il=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],As={"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},cl={"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},Ks={"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},zs={"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Io={"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},ls={"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Yl={"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Su={"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},nc={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},bs={"*":{type:"string"}},Rn={$version:Ha,$root:vo,sources:Gn,source:Ct,source_vector:Ar,source_raster:Jr,source_raster_dem:hi,source_geojson:hn,source_video:Sn,source_image:En,layer:ki,layout:_n,layout_background:ya,layout_fill:ea,layout_circle:Ma,layout_heatmap:_o,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:No,layout_symbol:po,layout_raster:Lo,layout_hillshade:ko,filter:Ds,filter_operator:Fs,geometry_type:ll,function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:ul,expression:zl,light:us,paint:il,paint_fill:As,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:cl,paint_circle:Ks,paint_heatmap:zs,paint_symbol:Io,paint_raster:ls,paint_hillshade:Yl,paint_background:Su,transition:nc,"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:bs},_a=function(_,I,V,$){this.message=(_?_+": ":"")+V,$&&(this.identifier=$),I!=null&&I.__line__&&(this.line=I.__line__)};function Vu(y){var _=y.key,I=y.value;return I?[new _a(_,I,"constants have been deprecated as of v8")]:[]}function ql(y){for(var _=[],I=arguments.length-1;I-- >0;)_[I]=arguments[I+1];for(var V=0,$=_;V<$.length;V+=1){var ae=$[V];for(var he in ae)y[he]=ae[he]}return y}function xo(y){return y instanceof Number||y instanceof String||y instanceof Boolean?y.valueOf():y}function Kl(y){if(Array.isArray(y))return y.map(Kl);if(y instanceof Object&&!(y instanceof Number||y instanceof String||y instanceof Boolean)){var _={};for(var I in y)_[I]=Kl(y[I]);return _}return xo(y)}var Ns=function(y){function _(I,V){y.call(this,V),this.message=V,this.key=I}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_}(Error),Hl=function(_,I){I===void 0&&(I=[]),this.parent=_,this.bindings={};for(var V=0,$=I;V<$.length;V+=1){var ae=$[V],he=ae[0],Fe=ae[1];this.bindings[he]=Fe}};Hl.prototype.concat=function(_){return new Hl(this,_)},Hl.prototype.get=function(_){if(this.bindings[_])return this.bindings[_];if(this.parent)return this.parent.get(_);throw new Error(_+" not found in scope.")},Hl.prototype.has=function(_){return this.bindings[_]?!0:this.parent?this.parent.has(_):!1};var ac={kind:"null"},oa={kind:"number"},qo={kind:"string"},Oo={kind:"boolean"},Ol={kind:"color"},Pc={kind:"object"},Do={kind:"value"},rf={kind:"error"},Vf={kind:"collator"},pl={kind:"formatted"},Zc={kind:"resolvedImage"};function Jl(y,_){return{kind:"array",itemType:y,N:_}}function qs(y){if(y.kind==="array"){var _=qs(y.itemType);return typeof y.N=="number"?"array<"+_+", "+y.N+">":y.itemType.kind==="value"?"array":"array<"+_+">"}else return y.kind}var yu=[ac,oa,qo,Oo,Ol,pl,Pc,Jl(Do),Zc];function oc(y,_){if(_.kind==="error")return null;if(y.kind==="array"){if(_.kind==="array"&&(_.N===0&&_.itemType.kind==="value"||!oc(y.itemType,_.itemType))&&(typeof y.N!="number"||y.N===_.N))return null}else{if(y.kind===_.kind)return null;if(y.kind==="value")for(var I=0,V=yu;I255?255:yt}function $(yt){return yt<0?0:yt>1?1:yt}function ae(yt){return yt[yt.length-1]==="%"?V(parseFloat(yt)/100*255):V(parseInt(yt))}function he(yt){return yt[yt.length-1]==="%"?$(parseFloat(yt)/100):$(parseFloat(yt))}function Fe(yt,Lt,sr){return sr<0?sr+=1:sr>1&&(sr-=1),sr*6<1?yt+(Lt-yt)*sr*6:sr*2<1?Lt:sr*3<2?yt+(Lt-yt)*(2/3-sr)*6:yt}function it(yt){var Lt=yt.replace(/ /g,"").toLowerCase();if(Lt in I)return I[Lt].slice();if(Lt[0]==="#"){if(Lt.length===4){var sr=parseInt(Lt.substr(1),16);return sr>=0&&sr<=4095?[(sr&3840)>>4|(sr&3840)>>8,sr&240|(sr&240)>>4,sr&15|(sr&15)<<4,1]:null}else if(Lt.length===7){var sr=parseInt(Lt.substr(1),16);return sr>=0&&sr<=16777215?[(sr&16711680)>>16,(sr&65280)>>8,sr&255,1]:null}return null}var gr=Lt.indexOf("("),hr=Lt.indexOf(")");if(gr!==-1&&hr+1===Lt.length){var Rr=Lt.substr(0,gr),ni=Lt.substr(gr+1,hr-(gr+1)).split(","),Hi=1;switch(Rr){case"rgba":if(ni.length!==4)return null;Hi=he(ni.pop());case"rgb":return ni.length!==3?null:[ae(ni[0]),ae(ni[1]),ae(ni[2]),Hi];case"hsla":if(ni.length!==4)return null;Hi=he(ni.pop());case"hsl":if(ni.length!==3)return null;var wi=(parseFloat(ni[0])%360+360)%360/360,bn=he(ni[1]),rn=he(ni[2]),xn=rn<=.5?rn*(bn+1):rn+bn-rn*bn,In=rn*2-xn;return[V(Fe(In,xn,wi+1/3)*255),V(Fe(In,xn,wi)*255),V(Fe(In,xn,wi-1/3)*255),Hi];default:return null}}return null}try{_.parseCSSColor=it}catch(yt){}}),Lf=jh.parseCSSColor,cs=function(_,I,V,$){$===void 0&&($=1),this.r=_,this.g=I,this.b=V,this.a=$};cs.parse=function(_){if(_){if(_ instanceof cs)return _;if(typeof _=="string"){var I=Lf(_);if(I)return new cs(I[0]/255*I[3],I[1]/255*I[3],I[2]/255*I[3],I[3])}}},cs.prototype.toString=function(){var _=this.toArray(),I=_[0],V=_[1],$=_[2],ae=_[3];return"rgba("+Math.round(I)+","+Math.round(V)+","+Math.round($)+","+ae+")"},cs.prototype.toArray=function(){var _=this,I=_.r,V=_.g,$=_.b,ae=_.a;return ae===0?[0,0,0,0]:[I*255/ae,V*255/ae,$*255/ae,ae]},cs.black=new cs(0,0,0,1),cs.white=new cs(1,1,1,1),cs.transparent=new cs(0,0,0,0),cs.red=new cs(1,0,0,1);var nf=function(_,I,V){_?this.sensitivity=I?"variant":"case":this.sensitivity=I?"accent":"base",this.locale=V,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};nf.prototype.compare=function(_,I){return this.collator.compare(_,I)},nf.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Gf=function(_,I,V,$,ae){this.text=_,this.image=I,this.scale=V,this.fontStack=$,this.textColor=ae},$l=function(_){this.sections=_};$l.fromString=function(_){return new $l([new Gf(_,null,null,null,null)])},$l.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(_){return _.text.length!==0||_.image&&_.image.name.length!==0})},$l.factory=function(_){return _ instanceof $l?_:$l.fromString(_)},$l.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(_){return _.text}).join("")},$l.prototype.serialize=function(){for(var _=["format"],I=0,V=this.sections;I=0&&y<=255&&typeof _=="number"&&_>=0&&_<=255&&typeof I=="number"&&I>=0&&I<=255)){var $=typeof V=="number"?[y,_,I,V]:[y,_,I];return"Invalid rgba value ["+$.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof V=="undefined"||typeof V=="number"&&V>=0&&V<=1?null:"Invalid rgba value ["+[y,_,I,V].join(", ")+"]: 'a' must be between 0 and 1."}function Fu(y){if(y===null)return!0;if(typeof y=="string")return!0;if(typeof y=="boolean")return!0;if(typeof y=="number")return!0;if(y instanceof cs)return!0;if(y instanceof nf)return!0;if(y instanceof $l)return!0;if(y instanceof fl)return!0;if(Array.isArray(y)){for(var _=0,I=y;_2){var Fe=_[1];if(typeof Fe!="string"||!(Fe in uc)||Fe==="object")return I.error('The item type argument of "array" must be one of string, number, boolean',1);he=uc[Fe],V++}else he=Do;var it;if(_.length>3){if(_[2]!==null&&(typeof _[2]!="number"||_[2]<0||_[2]!==Math.floor(_[2])))return I.error('The length argument to "array" must be a positive integer literal',2);it=_[2],V++}$=Jl(he,it)}else $=uc[ae];for(var yt=[];V<_.length;V++){var Lt=I.parse(_[V],V,Do);if(!Lt)return null;yt.push(Lt)}return new xl($,yt)},xl.prototype.evaluate=function(_){for(var I=0;I1)&&I.push($)}}return I.concat(this.args.map(function(ae){return ae.serialize()}))};var Gu=function(_){this.type=pl,this.sections=_};Gu.parse=function(_,I){if(_.length<2)return I.error("Expected at least one argument.");var V=_[1];if(!Array.isArray(V)&&typeof V=="object")return I.error("First argument must be an image or text section.");for(var $=[],ae=!1,he=1;he<=_.length-1;++he){var Fe=_[he];if(ae&&typeof Fe=="object"&&!Array.isArray(Fe)){ae=!1;var it=null;if(Fe["font-scale"]&&(it=I.parse(Fe["font-scale"],1,oa),!it))return null;var yt=null;if(Fe["text-font"]&&(yt=I.parse(Fe["text-font"],1,Jl(qo)),!yt))return null;var Lt=null;if(Fe["text-color"]&&(Lt=I.parse(Fe["text-color"],1,Ol),!Lt))return null;var sr=$[$.length-1];sr.scale=it,sr.font=yt,sr.textColor=Lt}else{var gr=I.parse(_[he],1,Do);if(!gr)return null;var hr=gr.type.kind;if(hr!=="string"&&hr!=="value"&&hr!=="null"&&hr!=="resolvedImage")return I.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");ae=!0,$.push({content:gr,scale:null,font:null,textColor:null})}}return new Gu($)},Gu.prototype.evaluate=function(_){var I=function(V){var $=V.content.evaluate(_);return Es($)===Zc?new Gf("",$,null,null,null):new Gf(Hs($),null,V.scale?V.scale.evaluate(_):null,V.font?V.font.evaluate(_).join(","):null,V.textColor?V.textColor.evaluate(_):null)};return new $l(this.sections.map(I))},Gu.prototype.eachChild=function(_){for(var I=0,V=this.sections;I-1),V},Os.prototype.eachChild=function(_){_(this.input)},Os.prototype.outputDefined=function(){return!1},Os.prototype.serialize=function(){return["image",this.input.serialize()]};var od={"to-boolean":Oo,"to-color":Ol,"to-number":oa,"to-string":qo},Po=function(_,I){this.type=_,this.args=I};Po.parse=function(_,I){if(_.length<2)return I.error("Expected at least one argument.");var V=_[0];if((V==="to-boolean"||V==="to-string")&&_.length!==2)return I.error("Expected one argument.");for(var $=od[V],ae=[],he=1;he<_.length;he++){var Fe=I.parse(_[he],he,Do);if(!Fe)return null;ae.push(Fe)}return new Po($,ae)},Po.prototype.evaluate=function(_){if(this.type.kind==="boolean")return!!this.args[0].evaluate(_);if(this.type.kind==="color"){for(var I,V,$=0,ae=this.args;$4?V="Invalid rbga value "+JSON.stringify(I)+": expected an array containing either three or four numeric values.":V=lc(I[0],I[1],I[2],I[3]),!V))return new cs(I[0]/255,I[1]/255,I[2]/255,I[3])}throw new ps(V||"Could not parse color from value '"+(typeof I=="string"?I:String(JSON.stringify(I)))+"'")}else if(this.type.kind==="number"){for(var it=null,yt=0,Lt=this.args;yt=_[2]||y[1]<=_[1]||y[3]>=_[3])}function Ah(y,_){var I=Ic(y[0]),V=yf(y[1]),$=Math.pow(2,_.z);return[Math.round(I*$*bl),Math.round(V*$*bl)]}function Qf(y,_,I){var V=y[0]-_[0],$=y[1]-_[1],ae=y[0]-I[0],he=y[1]-I[1];return V*he-ae*$===0&&V*ae<=0&&$*he<=0}function _f(y,_,I){return _[1]>y[1]!=I[1]>y[1]&&y[0]<(I[0]-_[0])*(y[1]-_[1])/(I[1]-_[1])+_[0]}function Yc(y,_){for(var I=!1,V=0,$=_.length;V<$;V++)for(var ae=_[V],he=0,Fe=ae.length;he0&&sr<0||Lt<0&&sr>0}function jf(y,_,I,V){var $=[_[0]-y[0],_[1]-y[1]],ae=[V[0]-I[0],V[1]-I[1]];return th(ae,$)===0?!1:!!(ju(y,_,I,V)&&ju(I,V,y,_))}function cc(y,_,I){for(var V=0,$=I;V<$.length;V+=1)for(var ae=$[V],he=0;heI[2]){var $=V*.5,ae=y[0]-I[0]>$?-V:I[0]-y[0]>$?V:0;ae===0&&(ae=y[0]-I[2]>$?-V:I[2]-y[0]>$?V:0),y[0]+=ae}Hf(_,y)}function Wf(y){y[0]=y[1]=1/0,y[2]=y[3]=-1/0}function Wh(y,_,I,V){for(var $=Math.pow(2,V.z)*bl,ae=[V.x*bl,V.y*bl],he=[],Fe=0,it=y;Fe=0)return!1;var I=!0;return y.eachChild(function(V){I&&!Eu(V,_)&&(I=!1)}),I}var Dc=function(_,I){this.type=I.type,this.name=_,this.boundExpression=I};Dc.parse=function(_,I){if(_.length!==2||typeof _[1]!="string")return I.error("'var' expression requires exactly one string literal argument.");var V=_[1];return I.scope.has(V)?new Dc(V,I.scope.get(V)):I.error('Unknown variable "'+V+'". Make sure "'+V+'" has been bound in an enclosing "let" expression before using it.',1)},Dc.prototype.evaluate=function(_){return this.boundExpression.evaluate(_)},Dc.prototype.eachChild=function(){},Dc.prototype.outputDefined=function(){return!1},Dc.prototype.serialize=function(){return["var",this.name]};var ks=function(_,I,V,$,ae){I===void 0&&(I=[]),$===void 0&&($=new Hl),ae===void 0&&(ae=[]),this.registry=_,this.path=I,this.key=I.map(function(he){return"["+he+"]"}).join(""),this.scope=$,this.errors=ae,this.expectedType=V};ks.prototype.parse=function(_,I,V,$,ae){return ae===void 0&&(ae={}),I?this.concat(I,V,$)._parse(_,ae):this._parse(_,ae)},ks.prototype._parse=function(_,I){(_===null||typeof _=="string"||typeof _=="boolean"||typeof _=="number")&&(_=["literal",_]);function V(Lt,sr,gr){return gr==="assert"?new xl(sr,[Lt]):gr==="coerce"?new Po(sr,[Lt]):Lt}if(Array.isArray(_)){if(_.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var $=_[0];if(typeof $!="string")return this.error("Expression name must be a string, but found "+typeof $+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var ae=this.registry[$];if(ae){var he=ae.parse(_,this);if(!he)return null;if(this.expectedType){var Fe=this.expectedType,it=he.type;if((Fe.kind==="string"||Fe.kind==="number"||Fe.kind==="boolean"||Fe.kind==="object"||Fe.kind==="array")&&it.kind==="value")he=V(he,Fe,I.typeAnnotation||"assert");else if((Fe.kind==="color"||Fe.kind==="formatted"||Fe.kind==="resolvedImage")&&(it.kind==="value"||it.kind==="string"))he=V(he,Fe,I.typeAnnotation||"coerce");else if(this.checkSubtype(Fe,it))return null}if(!(he instanceof Go)&&he.type.kind!=="resolvedImage"&&bc(he)){var yt=new Ko;try{he=new Go(he.type,he.evaluate(yt))}catch(Lt){return this.error(Lt.message),null}}return he}return this.error('Unknown expression "'+$+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof _=="undefined"?this.error("'undefined' value invalid. Use null instead."):typeof _=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof _+" instead.")},ks.prototype.concat=function(_,I,V){var $=typeof _=="number"?this.path.concat(_):this.path,ae=V?this.scope.concat(V):this.scope;return new ks(this.registry,$,I||null,ae,this.errors)},ks.prototype.error=function(_){for(var I=[],V=arguments.length-1;V-- >0;)I[V]=arguments[V+1];var $=""+this.key+I.map(function(ae){return"["+ae+"]"}).join("");this.errors.push(new Ns($,_))},ks.prototype.checkSubtype=function(_,I){var V=oc(_,I);return V&&this.error(V),V};function bc(y){if(y instanceof Dc)return bc(y.boundExpression);if(y instanceof Pa&&y.name==="error")return!1;if(y instanceof Hu)return!1;if(y instanceof Mu)return!1;var _=y instanceof Po||y instanceof xl,I=!0;return y.eachChild(function(V){_?I=I&&bc(V):I=I&&V instanceof Go}),I?ih(y)&&Eu(y,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function hu(y,_){for(var I=y.length-1,V=0,$=I,ae=0,he,Fe;V<=$;)if(ae=Math.floor((V+$)/2),he=y[ae],Fe=y[ae+1],he<=_){if(ae===I||__)$=ae-1;else throw new ps("Input is not a number.");return 0}var _u=function(_,I,V){this.type=_,this.input=I,this.labels=[],this.outputs=[];for(var $=0,ae=V;$=Fe)return I.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',yt);var sr=I.parse(it,Lt,ae);if(!sr)return null;ae=ae||sr.type,$.push([Fe,sr])}return new _u(ae,V,$)},_u.prototype.evaluate=function(_){var I=this.labels,V=this.outputs;if(I.length===1)return V[0].evaluate(_);var $=this.input.evaluate(_);if($<=I[0])return V[0].evaluate(_);var ae=I.length;if($>=I[ae-1])return V[ae-1].evaluate(_);var he=hu(I,$);return V[he].evaluate(_)},_u.prototype.eachChild=function(_){_(this.input);for(var I=0,V=this.outputs;I0&&_.push(this.labels[I]),_.push(this.outputs[I].serialize());return _};function nl(y,_,I){return y*(1-I)+_*I}function nh(y,_,I){return new cs(nl(y.r,_.r,I),nl(y.g,_.g,I),nl(y.b,_.b,I),nl(y.a,_.a,I))}function Mh(y,_,I){return y.map(function(V,$){return nl(V,_[$],I)})}var zu=Object.freeze({__proto__:null,number:nl,color:nh,array:Mh}),Fc=.95047,wc=1,bd=1.08883,xf=4/29,Pf=6/29,qu=3*Pf*Pf,bf=Pf*Pf*Pf,jl=Math.PI/180,lf=180/Math.PI;function Xh(y){return y>bf?Math.pow(y,1/3):y/qu+xf}function If(y){return y>Pf?y*y*y:qu*(y-xf)}function Cs(y){return 255*(y<=.0031308?12.92*y:1.055*Math.pow(y,1/2.4)-.055)}function du(y){return y/=255,y<=.04045?y/12.92:Math.pow((y+.055)/1.055,2.4)}function ku(y){var _=du(y.r),I=du(y.g),V=du(y.b),$=Xh((.4124564*_+.3575761*I+.1804375*V)/Fc),ae=Xh((.2126729*_+.7151522*I+.072175*V)/wc),he=Xh((.0193339*_+.119192*I+.9503041*V)/bd);return{l:116*ae-16,a:500*($-ae),b:200*(ae-he),alpha:y.a}}function Xf(y){var _=(y.l+16)/116,I=isNaN(y.a)?_:_+y.a/500,V=isNaN(y.b)?_:_-y.b/200;return _=wc*If(_),I=Fc*If(I),V=bd*If(V),new cs(Cs(3.2404542*I-1.5371385*_-.4985314*V),Cs(-.969266*I+1.8760108*_+.041556*V),Cs(.0556434*I-.2040259*_+1.0572252*V),y.alpha)}function Us(y,_,I){return{l:nl(y.l,_.l,I),a:nl(y.a,_.a,I),b:nl(y.b,_.b,I),alpha:nl(y.alpha,_.alpha,I)}}function wf(y){var _=ku(y),I=_.l,V=_.a,$=_.b,ae=Math.atan2($,V)*lf;return{h:ae<0?ae+360:ae,c:Math.sqrt(V*V+$*$),l:I,alpha:y.a}}function zc(y){var _=y.h*jl,I=y.c,V=y.l;return Xf({l:V,a:Math.cos(_)*I,b:Math.sin(_)*I,alpha:y.alpha})}function Wu(y,_,I){var V=_-y;return y+I*(V>180||V<-180?V-360*Math.round(V/360):V)}function Rf(y,_,I){return{h:Wu(y.h,_.h,I),c:nl(y.c,_.c,I),l:nl(y.l,_.l,I),alpha:nl(y.alpha,_.alpha,I)}}var Xu={forward:ku,reverse:Xf,interpolate:Us},uf={forward:wf,reverse:zc,interpolate:Rf},Zf=Object.freeze({__proto__:null,lab:Xu,hcl:uf}),Wl=function(_,I,V,$,ae){this.type=_,this.operator=I,this.interpolation=V,this.input=$,this.labels=[],this.outputs=[];for(var he=0,Fe=ae;he1}))return I.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);$={name:"cubic-bezier",controlPoints:it}}else return I.error("Unknown interpolation type "+String($[0]),1,0);if(_.length-1<4)return I.error("Expected at least 4 arguments, but found only "+(_.length-1)+".");if((_.length-1)%2!==0)return I.error("Expected an even number of arguments.");if(ae=I.parse(ae,2,oa),!ae)return null;var yt=[],Lt=null;V==="interpolate-hcl"||V==="interpolate-lab"?Lt=Ol:I.expectedType&&I.expectedType.kind!=="value"&&(Lt=I.expectedType);for(var sr=0;sr=gr)return I.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',Rr);var Hi=I.parse(hr,ni,Lt);if(!Hi)return null;Lt=Lt||Hi.type,yt.push([gr,Hi])}return Lt.kind!=="number"&&Lt.kind!=="color"&&!(Lt.kind==="array"&&Lt.itemType.kind==="number"&&typeof Lt.N=="number")?I.error("Type "+qs(Lt)+" is not interpolatable."):new Wl(Lt,V,$,ae,yt)},Wl.prototype.evaluate=function(_){var I=this.labels,V=this.outputs;if(I.length===1)return V[0].evaluate(_);var $=this.input.evaluate(_);if($<=I[0])return V[0].evaluate(_);var ae=I.length;if($>=I[ae-1])return V[ae-1].evaluate(_);var he=hu(I,$),Fe=I[he],it=I[he+1],yt=Wl.interpolationFactor(this.interpolation,$,Fe,it),Lt=V[he].evaluate(_),sr=V[he+1].evaluate(_);return this.operator==="interpolate"?zu[this.type.kind.toLowerCase()](Lt,sr,yt):this.operator==="interpolate-hcl"?uf.reverse(uf.interpolate(uf.forward(Lt),uf.forward(sr),yt)):Xu.reverse(Xu.interpolate(Xu.forward(Lt),Xu.forward(sr),yt))},Wl.prototype.eachChild=function(_){_(this.input);for(var I=0,V=this.outputs;I=V.length)throw new ps("Array index out of bounds: "+I+" > "+(V.length-1)+".");if(I!==Math.floor(I))throw new ps("Array index must be an integer, but found "+I+" instead.");return V[I]},Tc.prototype.eachChild=function(_){_(this.index),_(this.input)},Tc.prototype.outputDefined=function(){return!1},Tc.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var wl=function(_,I){this.type=Oo,this.needle=_,this.haystack=I};wl.parse=function(_,I){if(_.length!==3)return I.error("Expected 2 arguments, but found "+(_.length-1)+" instead.");var V=I.parse(_[1],1,Do),$=I.parse(_[2],2,Do);return!V||!$?null:Cf(V.type,[Oo,qo,oa,ac,Do])?new wl(V,$):I.error("Expected first argument to be of type boolean, string, number or null, but found "+qs(V.type)+" instead")},wl.prototype.evaluate=function(_){var I=this.needle.evaluate(_),V=this.haystack.evaluate(_);if(!V)return!1;if(!sc(I,["boolean","string","number","null"]))throw new ps("Expected first argument to be of type boolean, string, number or null, but found "+qs(Es(I))+" instead.");if(!sc(V,["string","array"]))throw new ps("Expected second argument to be of type array or string, but found "+qs(Es(V))+" instead.");return V.indexOf(I)>=0},wl.prototype.eachChild=function(_){_(this.needle),_(this.haystack)},wl.prototype.outputDefined=function(){return!0},wl.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var vu=function(_,I,V){this.type=oa,this.needle=_,this.haystack=I,this.fromIndex=V};vu.parse=function(_,I){if(_.length<=2||_.length>=5)return I.error("Expected 3 or 4 arguments, but found "+(_.length-1)+" instead.");var V=I.parse(_[1],1,Do),$=I.parse(_[2],2,Do);if(!V||!$)return null;if(!Cf(V.type,[Oo,qo,oa,ac,Do]))return I.error("Expected first argument to be of type boolean, string, number or null, but found "+qs(V.type)+" instead");if(_.length===4){var ae=I.parse(_[3],3,oa);return ae?new vu(V,$,ae):null}else return new vu(V,$)},vu.prototype.evaluate=function(_){var I=this.needle.evaluate(_),V=this.haystack.evaluate(_);if(!sc(I,["boolean","string","number","null"]))throw new ps("Expected first argument to be of type boolean, string, number or null, but found "+qs(Es(I))+" instead.");if(!sc(V,["string","array"]))throw new ps("Expected second argument to be of type array or string, but found "+qs(Es(V))+" instead.");if(this.fromIndex){var $=this.fromIndex.evaluate(_);return V.indexOf(I,$)}return V.indexOf(I)},vu.prototype.eachChild=function(_){_(this.needle),_(this.haystack),this.fromIndex&&_(this.fromIndex)},vu.prototype.outputDefined=function(){return!1},vu.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var _=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),_]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Oc=function(_,I,V,$,ae,he){this.inputType=_,this.type=I,this.input=V,this.cases=$,this.outputs=ae,this.otherwise=he};Oc.parse=function(_,I){if(_.length<5)return I.error("Expected at least 4 arguments, but found only "+(_.length-1)+".");if(_.length%2!==1)return I.error("Expected an even number of arguments.");var V,$;I.expectedType&&I.expectedType.kind!=="value"&&($=I.expectedType);for(var ae={},he=[],Fe=2;Fe<_.length-1;Fe+=2){var it=_[Fe],yt=_[Fe+1];Array.isArray(it)||(it=[it]);var Lt=I.concat(Fe);if(it.length===0)return Lt.error("Expected at least one branch label.");for(var sr=0,gr=it;srNumber.MAX_SAFE_INTEGER)return Lt.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof hr=="number"&&Math.floor(hr)!==hr)return Lt.error("Numeric branch labels must be integer values.");if(!V)V=Es(hr);else if(Lt.checkSubtype(V,Es(hr)))return null;if(typeof ae[String(hr)]!="undefined")return Lt.error("Branch labels must be unique.");ae[String(hr)]=he.length}var Rr=I.parse(yt,Fe,$);if(!Rr)return null;$=$||Rr.type,he.push(Rr)}var ni=I.parse(_[1],1,Do);if(!ni)return null;var Hi=I.parse(_[_.length-1],_.length-1,$);return!Hi||ni.type.kind!=="value"&&I.concat(1).checkSubtype(V,ni.type)?null:new Oc(V,$,ni,ae,he,Hi)},Oc.prototype.evaluate=function(_){var I=this.input.evaluate(_),V=Es(I)===this.inputType&&this.outputs[this.cases[I]]||this.otherwise;return V.evaluate(_)},Oc.prototype.eachChild=function(_){_(this.input),this.outputs.forEach(_),_(this.otherwise)},Oc.prototype.outputDefined=function(){return this.outputs.every(function(_){return _.outputDefined()})&&this.otherwise.outputDefined()},Oc.prototype.serialize=function(){for(var _=this,I=["match",this.input.serialize()],V=Object.keys(this.cases).sort(),$=[],ae={},he=0,Fe=V;he=5)return I.error("Expected 3 or 4 arguments, but found "+(_.length-1)+" instead.");var V=I.parse(_[1],1,Do),$=I.parse(_[2],2,oa);if(!V||!$)return null;if(!Cf(V.type,[Jl(Do),qo,Do]))return I.error("Expected first argument to be of type array or string, but found "+qs(V.type)+" instead");if(_.length===4){var ae=I.parse(_[3],3,oa);return ae?new fc(V.type,V,$,ae):null}else return new fc(V.type,V,$)},fc.prototype.evaluate=function(_){var I=this.input.evaluate(_),V=this.beginIndex.evaluate(_);if(!sc(I,["string","array"]))throw new ps("Expected first argument to be of type array or string, but found "+qs(Es(I))+" instead.");if(this.endIndex){var $=this.endIndex.evaluate(_);return I.slice(V,$)}return I.slice(V)},fc.prototype.eachChild=function(_){_(this.input),_(this.beginIndex),this.endIndex&&_(this.endIndex)},fc.prototype.outputDefined=function(){return!1},fc.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var _=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),_]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function Bc(y,_){return y==="=="||y==="!="?_.kind==="boolean"||_.kind==="string"||_.kind==="number"||_.kind==="null"||_.kind==="value":_.kind==="string"||_.kind==="number"||_.kind==="value"}function kt(y,_,I){return _===I}function Zt(y,_,I){return _!==I}function Mr(y,_,I){return _I}function Kr(y,_,I){return _<=I}function Mi(y,_,I){return _>=I}function Wi(y,_,I,V){return V.compare(_,I)===0}function dn(y,_,I,V){return!Wi(y,_,I,V)}function wn(y,_,I,V){return V.compare(_,I)<0}function On(y,_,I,V){return V.compare(_,I)>0}function Yi(y,_,I,V){return V.compare(_,I)<=0}function $i(y,_,I,V){return V.compare(_,I)>=0}function an(y,_,I){var V=y!=="=="&&y!=="!=";return function(){function $(ae,he,Fe){this.type=Oo,this.lhs=ae,this.rhs=he,this.collator=Fe,this.hasUntypedArgument=ae.type.kind==="value"||he.type.kind==="value"}return $.parse=function(he,Fe){if(he.length!==3&&he.length!==4)return Fe.error("Expected two or three arguments.");var it=he[0],yt=Fe.parse(he[1],1,Do);if(!yt)return null;if(!Bc(it,yt.type))return Fe.concat(1).error('"'+it+`" comparisons are not supported for type '`+qs(yt.type)+"'.");var Lt=Fe.parse(he[2],2,Do);if(!Lt)return null;if(!Bc(it,Lt.type))return Fe.concat(2).error('"'+it+`" comparisons are not supported for type '`+qs(Lt.type)+"'.");if(yt.type.kind!==Lt.type.kind&&yt.type.kind!=="value"&&Lt.type.kind!=="value")return Fe.error("Cannot compare types '"+qs(yt.type)+"' and '"+qs(Lt.type)+"'.");V&&(yt.type.kind==="value"&&Lt.type.kind!=="value"?yt=new xl(Lt.type,[yt]):yt.type.kind!=="value"&&Lt.type.kind==="value"&&(Lt=new xl(yt.type,[Lt])));var sr=null;if(he.length===4){if(yt.type.kind!=="string"&&Lt.type.kind!=="string"&&yt.type.kind!=="value"&&Lt.type.kind!=="value")return Fe.error("Cannot use collator to compare non-string types.");if(sr=Fe.parse(he[3],3,Vf),!sr)return null}return new $(yt,Lt,sr)},$.prototype.evaluate=function(he){var Fe=this.lhs.evaluate(he),it=this.rhs.evaluate(he);if(V&&this.hasUntypedArgument){var yt=Es(Fe),Lt=Es(it);if(yt.kind!==Lt.kind||!(yt.kind==="string"||yt.kind==="number"))throw new ps('Expected arguments for "'+y+'" to be (string, string) or (number, number), but found ('+yt.kind+", "+Lt.kind+") instead.")}if(this.collator&&!V&&this.hasUntypedArgument){var sr=Es(Fe),gr=Es(it);if(sr.kind!=="string"||gr.kind!=="string")return _(he,Fe,it)}return this.collator?I(he,Fe,it,this.collator.evaluate(he)):_(he,Fe,it)},$.prototype.eachChild=function(he){he(this.lhs),he(this.rhs),this.collator&&he(this.collator)},$.prototype.outputDefined=function(){return!0},$.prototype.serialize=function(){var he=[y];return this.eachChild(function(Fe){he.push(Fe.serialize())}),he},$}()}var Fi=an("==",kt,Wi),ta=an("!=",Zt,dn),Ca=an("<",Mr,wn),Ra=an(">",xr,On),La=an("<=",Kr,Yi),Na=an(">=",Mi,$i),Zn=function(_,I,V,$,ae){this.type=qo,this.number=_,this.locale=I,this.currency=V,this.minFractionDigits=$,this.maxFractionDigits=ae};Zn.parse=function(_,I){if(_.length!==3)return I.error("Expected two arguments.");var V=I.parse(_[1],1,oa);if(!V)return null;var $=_[2];if(typeof $!="object"||Array.isArray($))return I.error("NumberFormat options argument must be an object.");var ae=null;if($.locale&&(ae=I.parse($.locale,1,qo),!ae))return null;var he=null;if($.currency&&(he=I.parse($.currency,1,qo),!he))return null;var Fe=null;if($["min-fraction-digits"]&&(Fe=I.parse($["min-fraction-digits"],1,oa),!Fe))return null;var it=null;return $["max-fraction-digits"]&&(it=I.parse($["max-fraction-digits"],1,oa),!it)?null:new Zn(V,ae,he,Fe,it)},Zn.prototype.evaluate=function(_){return new Intl.NumberFormat(this.locale?this.locale.evaluate(_):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(_):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(_):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(_):void 0}).format(this.number.evaluate(_))},Zn.prototype.eachChild=function(_){_(this.number),this.locale&&_(this.locale),this.currency&&_(this.currency),this.minFractionDigits&&_(this.minFractionDigits),this.maxFractionDigits&&_(this.maxFractionDigits)},Zn.prototype.outputDefined=function(){return!1},Zn.prototype.serialize=function(){var _={};return this.locale&&(_.locale=this.locale.serialize()),this.currency&&(_.currency=this.currency.serialize()),this.minFractionDigits&&(_["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(_["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),_]};var Dn=function(_){this.type=oa,this.input=_};Dn.parse=function(_,I){if(_.length!==2)return I.error("Expected 1 argument, but found "+(_.length-1)+" instead.");var V=I.parse(_[1],1);return V?V.type.kind!=="array"&&V.type.kind!=="string"&&V.type.kind!=="value"?I.error("Expected argument of type string or array, but found "+qs(V.type)+" instead."):new Dn(V):null},Dn.prototype.evaluate=function(_){var I=this.input.evaluate(_);if(typeof I=="string")return I.length;if(Array.isArray(I))return I.length;throw new ps("Expected value to be of type string or array, but found "+qs(Es(I))+" instead.")},Dn.prototype.eachChild=function(_){_(this.input)},Dn.prototype.outputDefined=function(){return!1},Dn.prototype.serialize=function(){var _=["length"];return this.eachChild(function(I){_.push(I.serialize())}),_};var Ka={"==":Fi,"!=":ta,">":Ra,"<":Ca,">=":Na,"<=":La,array:xl,at:Tc,boolean:xl,case:cf,coalesce:Zu,collator:Hu,format:Gu,image:Os,in:wl,"index-of":vu,interpolate:Wl,"interpolate-hcl":Wl,"interpolate-lab":Wl,length:Dn,let:qc,literal:Go,match:Oc,number:xl,"number-format":Zn,object:xl,slice:fc,step:_u,string:xl,"to-boolean":Po,"to-color":Po,"to-number":Po,"to-string":Po,var:Dc,within:Mu};function bo(y,_){var I=_[0],V=_[1],$=_[2],ae=_[3];I=I.evaluate(y),V=V.evaluate(y),$=$.evaluate(y);var he=ae?ae.evaluate(y):1,Fe=lc(I,V,$,he);if(Fe)throw new ps(Fe);return new cs(I/255*he,V/255*he,$/255*he,he)}function Zo(y,_){return y in _}function Ss(y,_){var I=_[y];return typeof I=="undefined"?null:I}function as(y,_,I,V){for(;I<=V;){var $=I+V>>1;if(_[$]===y)return!0;_[$]>y?V=$-1:I=$+1}return!1}function ws(y){return{type:y}}Pa.register(Ka,{error:[rf,[qo],function(y,_){var I=_[0];throw new ps(I.evaluate(y))}],typeof:[qo,[Do],function(y,_){var I=_[0];return qs(Es(I.evaluate(y)))}],"to-rgba":[Jl(oa,4),[Ol],function(y,_){var I=_[0];return I.evaluate(y).toArray()}],rgb:[Ol,[oa,oa,oa],bo],rgba:[Ol,[oa,oa,oa,oa],bo],has:{type:Oo,overloads:[[[qo],function(y,_){var I=_[0];return Zo(I.evaluate(y),y.properties())}],[[qo,Pc],function(y,_){var I=_[0],V=_[1];return Zo(I.evaluate(y),V.evaluate(y))}]]},get:{type:Do,overloads:[[[qo],function(y,_){var I=_[0];return Ss(I.evaluate(y),y.properties())}],[[qo,Pc],function(y,_){var I=_[0],V=_[1];return Ss(I.evaluate(y),V.evaluate(y))}]]},"feature-state":[Do,[qo],function(y,_){var I=_[0];return Ss(I.evaluate(y),y.featureState||{})}],properties:[Pc,[],function(y){return y.properties()}],"geometry-type":[qo,[],function(y){return y.geometryType()}],id:[Do,[],function(y){return y.id()}],zoom:[oa,[],function(y){return y.globals.zoom}],"heatmap-density":[oa,[],function(y){return y.globals.heatmapDensity||0}],"line-progress":[oa,[],function(y){return y.globals.lineProgress||0}],accumulated:[Do,[],function(y){return y.globals.accumulated===void 0?null:y.globals.accumulated}],"+":[oa,ws(oa),function(y,_){for(var I=0,V=0,$=_;V<$.length;V+=1){var ae=$[V];I+=ae.evaluate(y)}return I}],"*":[oa,ws(oa),function(y,_){for(var I=1,V=0,$=_;V<$.length;V+=1){var ae=$[V];I*=ae.evaluate(y)}return I}],"-":{type:oa,overloads:[[[oa,oa],function(y,_){var I=_[0],V=_[1];return I.evaluate(y)-V.evaluate(y)}],[[oa],function(y,_){var I=_[0];return-I.evaluate(y)}]]},"/":[oa,[oa,oa],function(y,_){var I=_[0],V=_[1];return I.evaluate(y)/V.evaluate(y)}],"%":[oa,[oa,oa],function(y,_){var I=_[0],V=_[1];return I.evaluate(y)%V.evaluate(y)}],ln2:[oa,[],function(){return Math.LN2}],pi:[oa,[],function(){return Math.PI}],e:[oa,[],function(){return Math.E}],"^":[oa,[oa,oa],function(y,_){var I=_[0],V=_[1];return Math.pow(I.evaluate(y),V.evaluate(y))}],sqrt:[oa,[oa],function(y,_){var I=_[0];return Math.sqrt(I.evaluate(y))}],log10:[oa,[oa],function(y,_){var I=_[0];return Math.log(I.evaluate(y))/Math.LN10}],ln:[oa,[oa],function(y,_){var I=_[0];return Math.log(I.evaluate(y))}],log2:[oa,[oa],function(y,_){var I=_[0];return Math.log(I.evaluate(y))/Math.LN2}],sin:[oa,[oa],function(y,_){var I=_[0];return Math.sin(I.evaluate(y))}],cos:[oa,[oa],function(y,_){var I=_[0];return Math.cos(I.evaluate(y))}],tan:[oa,[oa],function(y,_){var I=_[0];return Math.tan(I.evaluate(y))}],asin:[oa,[oa],function(y,_){var I=_[0];return Math.asin(I.evaluate(y))}],acos:[oa,[oa],function(y,_){var I=_[0];return Math.acos(I.evaluate(y))}],atan:[oa,[oa],function(y,_){var I=_[0];return Math.atan(I.evaluate(y))}],min:[oa,ws(oa),function(y,_){return Math.min.apply(Math,_.map(function(I){return I.evaluate(y)}))}],max:[oa,ws(oa),function(y,_){return Math.max.apply(Math,_.map(function(I){return I.evaluate(y)}))}],abs:[oa,[oa],function(y,_){var I=_[0];return Math.abs(I.evaluate(y))}],round:[oa,[oa],function(y,_){var I=_[0],V=I.evaluate(y);return V<0?-Math.round(-V):Math.round(V)}],floor:[oa,[oa],function(y,_){var I=_[0];return Math.floor(I.evaluate(y))}],ceil:[oa,[oa],function(y,_){var I=_[0];return Math.ceil(I.evaluate(y))}],"filter-==":[Oo,[qo,Do],function(y,_){var I=_[0],V=_[1];return y.properties()[I.value]===V.value}],"filter-id-==":[Oo,[Do],function(y,_){var I=_[0];return y.id()===I.value}],"filter-type-==":[Oo,[qo],function(y,_){var I=_[0];return y.geometryType()===I.value}],"filter-<":[Oo,[qo,Do],function(y,_){var I=_[0],V=_[1],$=y.properties()[I.value],ae=V.value;return typeof $==typeof ae&&$":[Oo,[qo,Do],function(y,_){var I=_[0],V=_[1],$=y.properties()[I.value],ae=V.value;return typeof $==typeof ae&&$>ae}],"filter-id->":[Oo,[Do],function(y,_){var I=_[0],V=y.id(),$=I.value;return typeof V==typeof $&&V>$}],"filter-<=":[Oo,[qo,Do],function(y,_){var I=_[0],V=_[1],$=y.properties()[I.value],ae=V.value;return typeof $==typeof ae&&$<=ae}],"filter-id-<=":[Oo,[Do],function(y,_){var I=_[0],V=y.id(),$=I.value;return typeof V==typeof $&&V<=$}],"filter->=":[Oo,[qo,Do],function(y,_){var I=_[0],V=_[1],$=y.properties()[I.value],ae=V.value;return typeof $==typeof ae&&$>=ae}],"filter-id->=":[Oo,[Do],function(y,_){var I=_[0],V=y.id(),$=I.value;return typeof V==typeof $&&V>=$}],"filter-has":[Oo,[Do],function(y,_){var I=_[0];return I.value in y.properties()}],"filter-has-id":[Oo,[],function(y){return y.id()!==null&&y.id()!==void 0}],"filter-type-in":[Oo,[Jl(qo)],function(y,_){var I=_[0];return I.value.indexOf(y.geometryType())>=0}],"filter-id-in":[Oo,[Jl(Do)],function(y,_){var I=_[0];return I.value.indexOf(y.id())>=0}],"filter-in-small":[Oo,[qo,Jl(Do)],function(y,_){var I=_[0],V=_[1];return V.value.indexOf(y.properties()[I.value])>=0}],"filter-in-large":[Oo,[qo,Jl(Do)],function(y,_){var I=_[0],V=_[1];return as(y.properties()[I.value],V.value,0,V.value.length-1)}],all:{type:Oo,overloads:[[[Oo,Oo],function(y,_){var I=_[0],V=_[1];return I.evaluate(y)&&V.evaluate(y)}],[ws(Oo),function(y,_){for(var I=0,V=_;I-1}function va(y){return!!y.expression&&y.expression.interpolated}function no(y){return y instanceof Number?"number":y instanceof String?"string":y instanceof Boolean?"boolean":Array.isArray(y)?"array":y===null?"null":typeof y}function ys(y){return typeof y=="object"&&y!==null&&!Array.isArray(y)}function rs(y){return y}function Ql(y,_){var I=_.type==="color",V=y.stops&&typeof y.stops[0][0]=="object",$=V||y.property!==void 0,ae=V||!$,he=y.type||(va(_)?"exponential":"interval");if(I&&(y=ql({},y),y.stops&&(y.stops=y.stops.map(function(ha){return[ha[0],cs.parse(ha[1])]})),y.default?y.default=cs.parse(y.default):y.default=cs.parse(_.default)),y.colorSpace&&y.colorSpace!=="rgb"&&!Zf[y.colorSpace])throw new Error("Unknown color space: "+y.colorSpace);var Fe,it,yt;if(he==="exponential")Fe=pu;else if(he==="interval")Fe=Nc;else if(he==="categorical"){Fe=Yu,it=Object.create(null);for(var Lt=0,sr=y.stops;Lt=y.stops[V-1][0])return y.stops[V-1][1];var $=hu(y.stops.map(function(ae){return ae[0]}),I);return y.stops[$][1]}function pu(y,_,I){var V=y.base!==void 0?y.base:1;if(no(I)!=="number")return Cu(y.default,_.default);var $=y.stops.length;if($===1||I<=y.stops[0][0])return y.stops[0][1];if(I>=y.stops[$-1][0])return y.stops[$-1][1];var ae=hu(y.stops.map(function(sr){return sr[0]}),I),he=xu(I,V,y.stops[ae][0],y.stops[ae+1][0]),Fe=y.stops[ae][1],it=y.stops[ae+1][1],yt=zu[_.type]||rs;if(y.colorSpace&&y.colorSpace!=="rgb"){var Lt=Zf[y.colorSpace];yt=function(sr,gr){return Lt.reverse(Lt.interpolate(Lt.forward(sr),Lt.forward(gr),he))}}return typeof Fe.evaluate=="function"?{evaluate:function(){for(var gr=[],hr=arguments.length;hr--;)gr[hr]=arguments[hr];var Rr=Fe.evaluate.apply(void 0,gr),ni=it.evaluate.apply(void 0,gr);if(!(Rr===void 0||ni===void 0))return yt(Rr,ni,he)}}:yt(Fe,it,he)}function Uc(y,_,I){return _.type==="color"?I=cs.parse(I):_.type==="formatted"?I=$l.fromString(I.toString()):_.type==="resolvedImage"?I=fl.fromString(I.toString()):no(I)!==_.type&&(_.type!=="enum"||!_.values[I])&&(I=void 0),Cu(I,y.default,_.default)}function xu(y,_,I,V){var $=V-I,ae=y-I;return $===0?0:_===1?ae/$:(Math.pow(_,ae)-1)/(Math.pow(_,$)-1)}var Ac=function(_,I){this.expression=_,this._warningHistory={},this._evaluator=new Ko,this._defaultValue=I?ee(I):null,this._enumValues=I&&I.type==="enum"?I.values:null};Ac.prototype.evaluateWithoutErrorHandling=function(_,I,V,$,ae,he){return this._evaluator.globals=_,this._evaluator.feature=I,this._evaluator.featureState=V,this._evaluator.canonical=$,this._evaluator.availableImages=ae||null,this._evaluator.formattedSection=he,this.expression.evaluate(this._evaluator)},Ac.prototype.evaluate=function(_,I,V,$,ae,he){this._evaluator.globals=_,this._evaluator.feature=I||null,this._evaluator.featureState=V||null,this._evaluator.canonical=$,this._evaluator.availableImages=ae||null,this._evaluator.formattedSection=he||null;try{var Fe=this.expression.evaluate(this._evaluator);if(Fe==null||typeof Fe=="number"&&Fe!==Fe)return this._defaultValue;if(this._enumValues&&!(Fe in this._enumValues))throw new ps("Expected value to be one of "+Object.keys(this._enumValues).map(function(it){return JSON.stringify(it)}).join(", ")+", but found "+JSON.stringify(Fe)+" instead.");return Fe}catch(it){return this._warningHistory[it.message]||(this._warningHistory[it.message]=!0,typeof console!="undefined"&&console.warn(it.message)),this._defaultValue}};function Ua(y){return Array.isArray(y)&&y.length>0&&typeof y[0]=="string"&&y[0]in Ka}function oo(y,_){var I=new ks(Ka,[],_?Q(_):void 0),V=I.parse(y,void 0,void 0,void 0,_&&_.type==="string"?{typeAnnotation:"coerce"}:void 0);return V?Ho(new Ac(V,_)):ml(I.errors)}var Vc=function(_,I){this.kind=_,this._styleExpression=I,this.isStateDependent=_!=="constant"&&!js(I.expression)};Vc.prototype.evaluateWithoutErrorHandling=function(_,I,V,$,ae,he){return this._styleExpression.evaluateWithoutErrorHandling(_,I,V,$,ae,he)},Vc.prototype.evaluate=function(_,I,V,$,ae,he){return this._styleExpression.evaluate(_,I,V,$,ae,he)};var hc=function(_,I,V,$){this.kind=_,this.zoomStops=V,this._styleExpression=I,this.isStateDependent=_!=="camera"&&!js(I.expression),this.interpolationType=$};hc.prototype.evaluateWithoutErrorHandling=function(_,I,V,$,ae,he){return this._styleExpression.evaluateWithoutErrorHandling(_,I,V,$,ae,he)},hc.prototype.evaluate=function(_,I,V,$,ae,he){return this._styleExpression.evaluate(_,I,V,$,ae,he)},hc.prototype.interpolationFactor=function(_,I,V){return this.interpolationType?Wl.interpolationFactor(this.interpolationType,_,I,V):0};function Ku(y,_){if(y=oo(y,_),y.result==="error")return y;var I=y.value.expression,V=ih(I);if(!V&&!Ws(_))return ml([new Ns("","data expressions not supported")]);var $=Eu(I,["zoom"]);if(!$&&!Ls(_))return ml([new Ns("","zoom expressions not supported")]);var ae=B(I);if(!ae&&!$)return ml([new Ns("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(ae instanceof Ns)return ml([ae]);if(ae instanceof Wl&&!va(_))return ml([new Ns("",'"interpolate" expressions cannot be used with this property')]);if(!ae)return Ho(V?new Vc("constant",y.value):new Vc("source",y.value));var he=ae instanceof Wl?ae.interpolation:void 0;return Ho(V?new hc("camera",y.value,ae.labels,he):new hc("composite",y.value,ae.labels,he))}var ue=function(_,I){this._parameters=_,this._specification=I,ql(this,Ql(this._parameters,this._specification))};ue.deserialize=function(_){return new ue(_._parameters,_._specification)},ue.serialize=function(_){return{_parameters:_._parameters,_specification:_._specification}};function w(y,_){if(ys(y))return new ue(y,_);if(Ua(y)){var I=Ku(y,_);if(I.result==="error")throw new Error(I.value.map(function($){return $.key+": "+$.message}).join(", "));return I.value}else{var V=y;return typeof y=="string"&&_.type==="color"&&(V=cs.parse(y)),{kind:"constant",evaluate:function(){return V}}}}function B(y){var _=null;if(y instanceof qc)_=B(y.result);else if(y instanceof Zu)for(var I=0,V=y.args;IV.maximum?[new _a(_,I,I+" is greater than the maximum value "+V.maximum)]:[]}function ut(y){var _=y.valueSpec,I=xo(y.value.type),V,$={},ae,he,Fe=I!=="categorical"&&y.value.property===void 0,it=!Fe,yt=no(y.value.stops)==="array"&&no(y.value.stops[0])==="array"&&no(y.value.stops[0][0])==="object",Lt=le({key:y.key,value:y.value,valueSpec:y.styleSpec.function,style:y.style,styleSpec:y.styleSpec,objectElementValidators:{stops:sr,default:Rr}});return I==="identity"&&Fe&&Lt.push(new _a(y.key,y.value,'missing required property "property"')),I!=="identity"&&!y.value.stops&&Lt.push(new _a(y.key,y.value,'missing required property "stops"')),I==="exponential"&&y.valueSpec.expression&&!va(y.valueSpec)&&Lt.push(new _a(y.key,y.value,"exponential functions not supported")),y.styleSpec.$version>=8&&(it&&!Ws(y.valueSpec)?Lt.push(new _a(y.key,y.value,"property functions not supported")):Fe&&!Ls(y.valueSpec)&&Lt.push(new _a(y.key,y.value,"zoom functions not supported"))),(I==="categorical"||yt)&&y.value.property===void 0&&Lt.push(new _a(y.key,y.value,'"property" property is required')),Lt;function sr(ni){if(I==="identity")return[new _a(ni.key,ni.value,'identity function may not have a "stops" property')];var Hi=[],wi=ni.value;return Hi=Hi.concat(ze({key:ni.key,value:wi,valueSpec:ni.valueSpec,style:ni.style,styleSpec:ni.styleSpec,arrayElementValidator:gr})),no(wi)==="array"&&wi.length===0&&Hi.push(new _a(ni.key,wi,"array must have at least one stop")),Hi}function gr(ni){var Hi=[],wi=ni.value,bn=ni.key;if(no(wi)!=="array")return[new _a(bn,wi,"array expected, "+no(wi)+" found")];if(wi.length!==2)return[new _a(bn,wi,"array length 2 expected, length "+wi.length+" found")];if(yt){if(no(wi[0])!=="object")return[new _a(bn,wi,"object expected, "+no(wi[0])+" found")];if(wi[0].zoom===void 0)return[new _a(bn,wi,"object stop key must have zoom")];if(wi[0].value===void 0)return[new _a(bn,wi,"object stop key must have value")];if(he&&he>xo(wi[0].zoom))return[new _a(bn,wi[0].zoom,"stop zoom values must appear in ascending order")];xo(wi[0].zoom)!==he&&(he=xo(wi[0].zoom),ae=void 0,$={}),Hi=Hi.concat(le({key:bn+"[0]",value:wi[0],valueSpec:{zoom:{}},style:ni.style,styleSpec:ni.styleSpec,objectElementValidators:{zoom:Ze,value:hr}}))}else Hi=Hi.concat(hr({key:bn+"[0]",value:wi[0],valueSpec:{},style:ni.style,styleSpec:ni.styleSpec},wi));return Ua(Kl(wi[1]))?Hi.concat([new _a(bn+"[1]",wi[1],"expressions are not allowed in function stops.")]):Hi.concat(Qa({key:bn+"[1]",value:wi[1],valueSpec:_,style:ni.style,styleSpec:ni.styleSpec}))}function hr(ni,Hi){var wi=no(ni.value),bn=xo(ni.value),rn=ni.value!==null?ni.value:Hi;if(!V)V=wi;else if(wi!==V)return[new _a(ni.key,rn,wi+" stop domain type must match previous stop domain type "+V)];if(wi!=="number"&&wi!=="string"&&wi!=="boolean")return[new _a(ni.key,rn,"stop domain value must be a number, string, or boolean")];if(wi!=="number"&&I!=="categorical"){var xn="number expected, "+wi+" found";return Ws(_)&&I===void 0&&(xn+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new _a(ni.key,rn,xn)]}return I==="categorical"&&wi==="number"&&(!isFinite(bn)||Math.floor(bn)!==bn)?[new _a(ni.key,rn,"integer expected, found "+bn)]:I!=="categorical"&&wi==="number"&&ae!==void 0&&bn=2&&y[1]!=="$id"&&y[1]!=="$type";case"in":return y.length>=3&&(typeof y[1]!="string"||Array.isArray(y[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return y.length!==3||Array.isArray(y[1])||Array.isArray(y[2]);case"any":case"all":for(var _=0,I=y.slice(1);__?1:0}function qe(y){if(!Array.isArray(y))return!1;if(y[0]==="within")return!0;for(var _=1;_"||_==="<="||_===">="?Xe(y[1],y[2],_):_==="any"?nt(y.slice(1)):_==="all"?["all"].concat(y.slice(1).map(Qe)):_==="none"?["all"].concat(y.slice(1).map(Qe).map(ar)):_==="in"?qt(y[1],y.slice(2)):_==="!in"?ar(qt(y[1],y.slice(2))):_==="has"?jt(y[1]):_==="!has"?ar(jt(y[1])):_==="within"?y:!0;return I}function Xe(y,_,I){switch(y){case"$type":return["filter-type-"+I,_];case"$id":return["filter-id-"+I,_];default:return["filter-"+I,y,_]}}function nt(y){return["any"].concat(y.map(Qe))}function qt(y,_){if(_.length===0)return!1;switch(y){case"$type":return["filter-type-in",["literal",_]];case"$id":return["filter-id-in",["literal",_]];default:return _.length>200&&!_.some(function(I){return typeof I!=typeof _[0]})?["filter-in-large",y,["literal",_.sort(Ie)]]:["filter-in-small",y,["literal",_]]}}function jt(y){switch(y){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",y]}}function ar(y){return["!",y]}function fr(y){return Cr(Kl(y.value))?Mt(ql({},y,{expressionContext:"filter",valueSpec:{value:"boolean"}})):br(y)}function br(y){var _=y.value,I=y.key;if(no(_)!=="array")return[new _a(I,_,"array expected, "+no(_)+" found")];var V=y.styleSpec,$,ae=[];if(_.length<1)return[new _a(I,_,"filter array must have at least 1 element")];switch(ae=ae.concat(mr({key:I+"[0]",value:_[0],valueSpec:V.filter_operator,style:y.style,styleSpec:y.styleSpec})),xo(_[0])){case"<":case"<=":case">":case">=":_.length>=2&&xo(_[1])==="$type"&&ae.push(new _a(I,_,'"$type" cannot be use with operator "'+_[0]+'"'));case"==":case"!=":_.length!==3&&ae.push(new _a(I,_,'filter array for operator "'+_[0]+'" must have 3 elements'));case"in":case"!in":_.length>=2&&($=no(_[1]),$!=="string"&&ae.push(new _a(I+"[1]",_[1],"string expected, "+$+" found")));for(var he=2;he<_.length;he++)$=no(_[he]),xo(_[1])==="$type"?ae=ae.concat(mr({key:I+"["+he+"]",value:_[he],valueSpec:V.geometry_type,style:y.style,styleSpec:y.styleSpec})):$!=="string"&&$!=="number"&&$!=="boolean"&&ae.push(new _a(I+"["+he+"]",_[he],"string, number, or boolean expected, "+$+" found"));break;case"any":case"all":case"none":for(var Fe=1;Fe<_.length;Fe++)ae=ae.concat(br({key:I+"["+Fe+"]",value:_[Fe],style:y.style,styleSpec:y.styleSpec}));break;case"has":case"!has":$=no(_[1]),_.length!==2?ae.push(new _a(I,_,'filter array for "'+_[0]+'" operator must have 2 elements')):$!=="string"&&ae.push(new _a(I+"[1]",_[1],"string expected, "+$+" found"));break;case"within":$=no(_[1]),_.length!==2?ae.push(new _a(I,_,'filter array for "'+_[0]+'" operator must have 2 elements')):$!=="object"&&ae.push(new _a(I+"[1]",_[1],"object expected, "+$+" found"));break}return ae}function Fr(y,_){var I=y.key,V=y.style,$=y.styleSpec,ae=y.value,he=y.objectKey,Fe=$[_+"_"+y.layerType];if(!Fe)return[];var it=he.match(/^(.*)-transition$/);if(_==="paint"&&it&&Fe[it[1]]&&Fe[it[1]].transition)return Qa({key:I,value:ae,valueSpec:$.transition,style:V,styleSpec:$});var yt=y.valueSpec||Fe[he];if(!yt)return[new _a(I,ae,'unknown property "'+he+'"')];var Lt;if(no(ae)==="string"&&Ws(yt)&&!yt.tokens&&(Lt=/^{([^}]+)}$/.exec(ae)))return[new _a(I,ae,'"'+he+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(Lt[1])+" }`.")];var sr=[];return y.layerType==="symbol"&&(he==="text-field"&&V&&!V.glyphs&&sr.push(new _a(I,ae,'use of "text-field" requires a style "glyphs" property')),he==="text-font"&&ys(Kl(ae))&&xo(ae.type)==="identity"&&sr.push(new _a(I,ae,'"text-font" does not support identity functions'))),sr.concat(Qa({key:y.key,value:ae,valueSpec:yt,style:V,styleSpec:$,expressionContext:"property",propertyType:_,propertyKey:he}))}function Hr(y){return Fr(y,"paint")}function ri(y){return Fr(y,"layout")}function Ci(y){var _=[],I=y.value,V=y.key,$=y.style,ae=y.styleSpec;!I.type&&!I.ref&&_.push(new _a(V,I,'either "type" or "ref" is required'));var he=xo(I.type),Fe=xo(I.ref);if(I.id)for(var it=xo(I.id),yt=0;yt=Lt[hr+0]&&V>=Lt[hr+1])?(he[gr]=!0,ae.push(yt[gr])):he[gr]=!1}}},eu.prototype._forEachCell=function(y,_,I,V,$,ae,he,Fe){for(var it=this._convertToCellCoord(y),yt=this._convertToCellCoord(_),Lt=this._convertToCellCoord(I),sr=this._convertToCellCoord(V),gr=it;gr<=Lt;gr++)for(var hr=yt;hr<=sr;hr++){var Rr=this.d*hr+gr;if(!(Fe&&!Fe(this._convertFromCellCoord(gr),this._convertFromCellCoord(hr),this._convertFromCellCoord(gr+1),this._convertFromCellCoord(hr+1)))&&$.call(this,y,_,I,V,Rr,ae,he,Fe))return}},eu.prototype._convertFromCellCoord=function(y){return(y-this.padding)/this.scale},eu.prototype._convertToCellCoord=function(y){return Math.max(0,Math.min(this.d-1,Math.floor(y*this.scale)+this.padding))},eu.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var y=this.cells,_=Js+this.cells.length+1+1,I=0,V=0;V=0)){var sr=y[Lt];yt[Lt]=Al[it].shallow.indexOf(Lt)>=0?sr:Ve(sr,_)}y instanceof Error&&(yt.message=y.message)}if(yt.$name)throw new Error("$name property is reserved for worker serialization logic.");return it!=="Object"&&(yt.$name=it),yt}throw new Error("can't serialize object of type "+typeof y)}function Ye(y){if(y==null||typeof y=="boolean"||typeof y=="number"||typeof y=="string"||y instanceof Boolean||y instanceof Number||y instanceof String||y instanceof Date||y instanceof RegExp||Te(y)||Oe(y)||ArrayBuffer.isView(y)||y instanceof dc)return y;if(Array.isArray(y))return y.map(Ye);if(typeof y=="object"){var _=y.$name||"Object",I=Al[_],V=I.klass;if(!V)throw new Error("can't deserialize unregistered class "+_);if(V.deserialize)return V.deserialize(y);for(var $=Object.create(V.prototype),ae=0,he=Object.keys(y);ae=0?it:Ye(it)}}return $}throw new Error("can't deserialize object of type "+typeof y)}var Pt=function(){this.first=!0};Pt.prototype.update=function(_,I){var V=Math.floor(_);return this.first?(this.first=!1,this.lastIntegerZoom=V,this.lastIntegerZoomTime=0,this.lastZoom=_,this.lastFloorZoom=V,!0):(this.lastFloorZoom>V?(this.lastIntegerZoom=V+1,this.lastIntegerZoomTime=I):this.lastFloorZoom=128&&y<=255},Arabic:function(y){return y>=1536&&y<=1791},"Arabic Supplement":function(y){return y>=1872&&y<=1919},"Arabic Extended-A":function(y){return y>=2208&&y<=2303},"Hangul Jamo":function(y){return y>=4352&&y<=4607},"Unified Canadian Aboriginal Syllabics":function(y){return y>=5120&&y<=5759},Khmer:function(y){return y>=6016&&y<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(y){return y>=6320&&y<=6399},"General Punctuation":function(y){return y>=8192&&y<=8303},"Letterlike Symbols":function(y){return y>=8448&&y<=8527},"Number Forms":function(y){return y>=8528&&y<=8591},"Miscellaneous Technical":function(y){return y>=8960&&y<=9215},"Control Pictures":function(y){return y>=9216&&y<=9279},"Optical Character Recognition":function(y){return y>=9280&&y<=9311},"Enclosed Alphanumerics":function(y){return y>=9312&&y<=9471},"Geometric Shapes":function(y){return y>=9632&&y<=9727},"Miscellaneous Symbols":function(y){return y>=9728&&y<=9983},"Miscellaneous Symbols and Arrows":function(y){return y>=11008&&y<=11263},"CJK Radicals Supplement":function(y){return y>=11904&&y<=12031},"Kangxi Radicals":function(y){return y>=12032&&y<=12255},"Ideographic Description Characters":function(y){return y>=12272&&y<=12287},"CJK Symbols and Punctuation":function(y){return y>=12288&&y<=12351},Hiragana:function(y){return y>=12352&&y<=12447},Katakana:function(y){return y>=12448&&y<=12543},Bopomofo:function(y){return y>=12544&&y<=12591},"Hangul Compatibility Jamo":function(y){return y>=12592&&y<=12687},Kanbun:function(y){return y>=12688&&y<=12703},"Bopomofo Extended":function(y){return y>=12704&&y<=12735},"CJK Strokes":function(y){return y>=12736&&y<=12783},"Katakana Phonetic Extensions":function(y){return y>=12784&&y<=12799},"Enclosed CJK Letters and Months":function(y){return y>=12800&&y<=13055},"CJK Compatibility":function(y){return y>=13056&&y<=13311},"CJK Unified Ideographs Extension A":function(y){return y>=13312&&y<=19903},"Yijing Hexagram Symbols":function(y){return y>=19904&&y<=19967},"CJK Unified Ideographs":function(y){return y>=19968&&y<=40959},"Yi Syllables":function(y){return y>=40960&&y<=42127},"Yi Radicals":function(y){return y>=42128&&y<=42191},"Hangul Jamo Extended-A":function(y){return y>=43360&&y<=43391},"Hangul Syllables":function(y){return y>=44032&&y<=55215},"Hangul Jamo Extended-B":function(y){return y>=55216&&y<=55295},"Private Use Area":function(y){return y>=57344&&y<=63743},"CJK Compatibility Ideographs":function(y){return y>=63744&&y<=64255},"Arabic Presentation Forms-A":function(y){return y>=64336&&y<=65023},"Vertical Forms":function(y){return y>=65040&&y<=65055},"CJK Compatibility Forms":function(y){return y>=65072&&y<=65103},"Small Form Variants":function(y){return y>=65104&&y<=65135},"Arabic Presentation Forms-B":function(y){return y>=65136&&y<=65279},"Halfwidth and Fullwidth Forms":function(y){return y>=65280&&y<=65519}};function Wt(y){for(var _=0,I=y;_=65097&&y<=65103)||at["CJK Compatibility Ideographs"](y)||at["CJK Compatibility"](y)||at["CJK Radicals Supplement"](y)||at["CJK Strokes"](y)||at["CJK Symbols and Punctuation"](y)&&!(y>=12296&&y<=12305)&&!(y>=12308&&y<=12319)&&y!==12336||at["CJK Unified Ideographs Extension A"](y)||at["CJK Unified Ideographs"](y)||at["Enclosed CJK Letters and Months"](y)||at["Hangul Compatibility Jamo"](y)||at["Hangul Jamo Extended-A"](y)||at["Hangul Jamo Extended-B"](y)||at["Hangul Jamo"](y)||at["Hangul Syllables"](y)||at.Hiragana(y)||at["Ideographic Description Characters"](y)||at.Kanbun(y)||at["Kangxi Radicals"](y)||at["Katakana Phonetic Extensions"](y)||at.Katakana(y)&&y!==12540||at["Halfwidth and Fullwidth Forms"](y)&&y!==65288&&y!==65289&&y!==65293&&!(y>=65306&&y<=65310)&&y!==65339&&y!==65341&&y!==65343&&!(y>=65371&&y<=65503)&&y!==65507&&!(y>=65512&&y<=65519)||at["Small Form Variants"](y)&&!(y>=65112&&y<=65118)&&!(y>=65123&&y<=65126)||at["Unified Canadian Aboriginal Syllabics"](y)||at["Unified Canadian Aboriginal Syllabics Extended"](y)||at["Vertical Forms"](y)||at["Yijing Hexagram Symbols"](y)||at["Yi Syllables"](y)||at["Yi Radicals"](y))}function gi(y){return!!(at["Latin-1 Supplement"](y)&&(y===167||y===169||y===174||y===177||y===188||y===189||y===190||y===215||y===247)||at["General Punctuation"](y)&&(y===8214||y===8224||y===8225||y===8240||y===8241||y===8251||y===8252||y===8258||y===8263||y===8264||y===8265||y===8273)||at["Letterlike Symbols"](y)||at["Number Forms"](y)||at["Miscellaneous Technical"](y)&&(y>=8960&&y<=8967||y>=8972&&y<=8991||y>=8996&&y<=9e3||y===9003||y>=9085&&y<=9114||y>=9150&&y<=9165||y===9167||y>=9169&&y<=9179||y>=9186&&y<=9215)||at["Control Pictures"](y)&&y!==9251||at["Optical Character Recognition"](y)||at["Enclosed Alphanumerics"](y)||at["Geometric Shapes"](y)||at["Miscellaneous Symbols"](y)&&!(y>=9754&&y<=9759)||at["Miscellaneous Symbols and Arrows"](y)&&(y>=11026&&y<=11055||y>=11088&&y<=11097||y>=11192&&y<=11243)||at["CJK Symbols and Punctuation"](y)||at.Katakana(y)||at["Private Use Area"](y)||at["CJK Compatibility Forms"](y)||at["Small Form Variants"](y)||at["Halfwidth and Fullwidth Forms"](y)||y===8734||y===8756||y===8757||y>=9984&&y<=10087||y>=10102&&y<=10131||y===65532||y===65533)}function xi(y){return!(zr(y)||gi(y))}function Wr(y){return at.Arabic(y)||at["Arabic Supplement"](y)||at["Arabic Extended-A"](y)||at["Arabic Presentation Forms-A"](y)||at["Arabic Presentation Forms-B"](y)}function ii(y){return y>=1424&&y<=2303||at["Arabic Presentation Forms-A"](y)||at["Arabic Presentation Forms-B"](y)}function di(y,_){return!(!_&&ii(y)||y>=2304&&y<=3583||y>=3840&&y<=4255||at.Khmer(y))}function Li(y){for(var _=0,I=y;_-1&&(kn=Qr.error),Pn&&Pn(y)};function Ea(){Ia.fire(new Xo("pluginStateChange",{pluginStatus:kn,pluginURL:Bn}))}var Ia=new jn,yo=function(){return kn},Da=function(y){return y({pluginStatus:kn,pluginURL:Bn}),Ia.on("pluginStateChange",y),y},go=function(y,_,I){if(I===void 0&&(I=!1),kn===Qr.deferred||kn===Qr.loading||kn===Qr.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");Bn=lt.resolveURL(y),kn=Qr.deferred,Pn=_,Ea(),I||Is()},Is=function(){if(kn!==Qr.deferred||!Bn)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");kn=Qr.loading,Ea(),Bn&&ti({url:Bn},function(y){y?na(y):(kn=Qr.loaded,Ea())})},Ms={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return kn===Qr.loaded||Ms.applyArabicShaping!=null},isLoading:function(){return kn===Qr.loading},setState:function(_){kn=_.pluginStatus,Bn=_.pluginURL},isParsed:function(){return Ms.applyArabicShaping!=null&&Ms.processBidirectionalText!=null&&Ms.processStyledBidirectionalText!=null},getPluginURL:function(){return Bn}},Xs=function(){!Ms.isLoading()&&!Ms.isLoaded()&&yo()==="deferred"&&Is()},Un=function(_,I){this.zoom=_,I?(this.now=I.now,this.fadeDuration=I.fadeDuration,this.zoomHistory=I.zoomHistory,this.transition=I.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Pt,this.transition={})};Un.prototype.isSupportedScript=function(_){return Ti(_,Ms.isLoaded())},Un.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},Un.prototype.getCrossfadeParameters=function(){var _=this.zoom,I=_-Math.floor(_),V=this.crossFadingFactor();return _>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:I+(1-I)*V}:{fromScale:.5,toScale:1,t:1-(1-V)*I}};var ja=function(_,I){this.property=_,this.value=I,this.expression=w(I===void 0?_.specification.default:I,_.specification)};ja.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},ja.prototype.possiblyEvaluate=function(_,I,V){return this.property.possiblyEvaluate(this,_,I,V)};var Fo=function(_){this.property=_,this.value=new ja(_,void 0)};Fo.prototype.transitioned=function(_,I){return new $s(this.property,this.value,I,x({},_.transition,this.transition),_.now)},Fo.prototype.untransitioned=function(){return new $s(this.property,this.value,null,{},0)};var Uo=function(_){this._properties=_,this._values=Object.create(_.defaultTransitionablePropertyValues)};Uo.prototype.getValue=function(_){return j(this._values[_].value.value)},Uo.prototype.setValue=function(_,I){this._values.hasOwnProperty(_)||(this._values[_]=new Fo(this._values[_].property)),this._values[_].value=new ja(this._values[_].property,I===null?void 0:j(I))},Uo.prototype.getTransition=function(_){return j(this._values[_].transition)},Uo.prototype.setTransition=function(_,I){this._values.hasOwnProperty(_)||(this._values[_]=new Fo(this._values[_].property)),this._values[_].transition=j(I)||void 0},Uo.prototype.serialize=function(){for(var _={},I=0,V=Object.keys(this._values);Ithis.end)return this.prior=null,ae;if(this.value.isDataDriven())return this.prior=null,ae;if($he.zoomHistory.lastIntegerZoom?{from:V,to:$}:{from:ae,to:$}},_.prototype.interpolate=function(V){return V},_}(bt),Lr=function(_){this.specification=_};Lr.prototype.possiblyEvaluate=function(_,I,V,$){if(_.value!==void 0)if(_.expression.kind==="constant"){var ae=_.expression.evaluate(I,null,{},V,$);return this._calculate(ae,ae,ae,I)}else return this._calculate(_.expression.evaluate(new Un(Math.floor(I.zoom-1),I)),_.expression.evaluate(new Un(Math.floor(I.zoom),I)),_.expression.evaluate(new Un(Math.floor(I.zoom+1),I)),I)},Lr.prototype._calculate=function(_,I,V,$){var ae=$.zoom;return ae>$.zoomHistory.lastIntegerZoom?{from:_,to:I}:{from:V,to:I}},Lr.prototype.interpolate=function(_){return _};var Vr=function(_){this.specification=_};Vr.prototype.possiblyEvaluate=function(_,I,V,$){return!!_.expression.evaluate(I,null,{},V,$)},Vr.prototype.interpolate=function(){return!1};var Or=function(_){this.properties=_,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var I in _){var V=_[I];V.specification.overridable&&this.overridableProperties.push(I);var $=this.defaultPropertyValues[I]=new ja(V,void 0),ae=this.defaultTransitionablePropertyValues[I]=new Fo(V);this.defaultTransitioningPropertyValues[I]=ae.untransitioned(),this.defaultPossiblyEvaluatedValues[I]=$.possiblyEvaluate({})}};X("DataDrivenProperty",bt),X("DataConstantProperty",Me),X("CrossFadedDataDrivenProperty",Ot),X("CrossFadedProperty",Lr),X("ColorRampProperty",Vr);var Nr="-transition",vi=function(y){function _(I,V){if(y.call(this),this.id=I.id,this.type=I.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},I.type!=="custom"&&(I=I,this.metadata=I.metadata,this.minzoom=I.minzoom,this.maxzoom=I.maxzoom,I.type!=="background"&&(this.source=I.source,this.sourceLayer=I["source-layer"],this.filter=I.filter),V.layout&&(this._unevaluatedLayout=new bu(V.layout)),V.paint)){this._transitionablePaint=new Uo(V.paint);for(var $ in I.paint)this.setPaintProperty($,I.paint[$],{validate:!1});for(var ae in I.layout)this.setLayoutProperty(ae,I.layout[ae],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Sc(V.paint)}}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},_.prototype.getLayoutProperty=function(V){return V==="visibility"?this.visibility:this._unevaluatedLayout.getValue(V)},_.prototype.setLayoutProperty=function(V,$,ae){if(ae===void 0&&(ae={}),$!=null){var he="layers."+this.id+".layout."+V;if(this._validate(Ul,he,V,$,ae))return}if(V==="visibility"){this.visibility=$;return}this._unevaluatedLayout.setValue(V,$)},_.prototype.getPaintProperty=function(V){return U(V,Nr)?this._transitionablePaint.getTransition(V.slice(0,-Nr.length)):this._transitionablePaint.getValue(V)},_.prototype.setPaintProperty=function(V,$,ae){if(ae===void 0&&(ae={}),$!=null){var he="layers."+this.id+".paint."+V;if(this._validate(hl,he,V,$,ae))return!1}if(U(V,Nr))return this._transitionablePaint.setTransition(V.slice(0,-Nr.length),$||void 0),!1;var Fe=this._transitionablePaint._values[V],it=Fe.property.specification["property-type"]==="cross-faded-data-driven",yt=Fe.value.isDataDriven(),Lt=Fe.value;this._transitionablePaint.setValue(V,$),this._handleSpecialPaintPropertyUpdate(V);var sr=this._transitionablePaint._values[V].value,gr=sr.isDataDriven();return gr||yt||it||this._handleOverridablePaintPropertyUpdate(V,Lt,sr)},_.prototype._handleSpecialPaintPropertyUpdate=function(V){},_.prototype._handleOverridablePaintPropertyUpdate=function(V,$,ae){return!1},_.prototype.isHidden=function(V){return this.minzoom&&V=this.maxzoom?!0:this.visibility==="none"},_.prototype.updateTransitions=function(V){this._transitioningPaint=this._transitionablePaint.transitioned(V,this._transitioningPaint)},_.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},_.prototype.recalculate=function(V,$){V.getCrossfadeParameters&&(this._crossfadeParameters=V.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(V,void 0,$)),this.paint=this._transitioningPaint.possiblyEvaluate(V,void 0,$)},_.prototype.serialize=function(){var V={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(V.layout=V.layout||{},V.layout.visibility=this.visibility),Z(V,function($,ae){return $!==void 0&&!(ae==="layout"&&!Object.keys($).length)&&!(ae==="paint"&&!Object.keys($).length)})},_.prototype._validate=function(V,$,ae,he,Fe){return Fe===void 0&&(Fe={}),Fe&&Fe.validate===!1?!1:Lu(this,V.call(wo,{key:$,layerType:this.type,objectKey:ae,value:he,styleSpec:Rn,style:{glyphs:!0,sprite:!0}}))},_.prototype.is3D=function(){return!1},_.prototype.isTileClipped=function(){return!1},_.prototype.hasOffscreenPass=function(){return!1},_.prototype.resize=function(){},_.prototype.isStateDependent=function(){for(var V in this.paint._values){var $=this.paint.get(V);if(!(!($ instanceof dl)||!Ws($.property.specification))&&($.value.kind==="source"||$.value.kind==="composite")&&$.value.isStateDependent)return!0}return!1},_}(jn),Ni={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},qi=function(_,I){this._structArray=_,this._pos1=I*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Si=128,Vn=5,Qi=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};Qi.serialize=function(_,I){return _._trim(),I&&(_.isTransferred=!0,I.push(_.arrayBuffer)),{length:_.length,arrayBuffer:_.arrayBuffer}},Qi.deserialize=function(_){var I=Object.create(this.prototype);return I.arrayBuffer=_.arrayBuffer,I.length=_.length,I.capacity=_.arrayBuffer.byteLength/I.bytesPerElement,I._refreshViews(),I},Qi.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Qi.prototype.clear=function(){this.length=0},Qi.prototype.resize=function(_){this.reserve(_),this.length=_},Qi.prototype.reserve=function(_){if(_>this.capacity){this.capacity=Math.max(_,Math.floor(this.capacity*Vn),Si),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var I=this.uint8;this._refreshViews(),I&&this.uint8.set(I)}},Qi.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function ji(y,_){_===void 0&&(_=1);var I=0,V=0,$=y.map(function(he){var Fe=oi(he.type),it=I=Tr(I,Math.max(_,Fe)),yt=he.components||1;return V=Math.max(V,Fe),I+=Fe*yt,{name:he.name,type:he.type,components:yt,offset:it}}),ae=Tr(I,Math.max(V,_));return{members:$,size:ae,alignment:_}}function oi(y){return Ni[y].BYTES_PER_ELEMENT}function Tr(y,_){return Math.ceil(y/_)*_}var Zr=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$){var ae=this.length;return this.resize(ae+1),this.emplace(ae,V,$)},_.prototype.emplace=function(V,$,ae){var he=V*2;return this.int16[he+0]=$,this.int16[he+1]=ae,V},_}(Qi);Zr.prototype.bytesPerElement=4,X("StructArrayLayout2i4",Zr);var yi=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$,ae,he){var Fe=this.length;return this.resize(Fe+1),this.emplace(Fe,V,$,ae,he)},_.prototype.emplace=function(V,$,ae,he,Fe){var it=V*4;return this.int16[it+0]=$,this.int16[it+1]=ae,this.int16[it+2]=he,this.int16[it+3]=Fe,V},_}(Qi);yi.prototype.bytesPerElement=8,X("StructArrayLayout4i8",yi);var Ii=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$,ae,he,Fe,it){var yt=this.length;return this.resize(yt+1),this.emplace(yt,V,$,ae,he,Fe,it)},_.prototype.emplace=function(V,$,ae,he,Fe,it,yt){var Lt=V*6;return this.int16[Lt+0]=$,this.int16[Lt+1]=ae,this.int16[Lt+2]=he,this.int16[Lt+3]=Fe,this.int16[Lt+4]=it,this.int16[Lt+5]=yt,V},_}(Qi);Ii.prototype.bytesPerElement=12,X("StructArrayLayout2i4i12",Ii);var ui=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$,ae,he,Fe,it){var yt=this.length;return this.resize(yt+1),this.emplace(yt,V,$,ae,he,Fe,it)},_.prototype.emplace=function(V,$,ae,he,Fe,it,yt){var Lt=V*4,sr=V*8;return this.int16[Lt+0]=$,this.int16[Lt+1]=ae,this.uint8[sr+4]=he,this.uint8[sr+5]=Fe,this.uint8[sr+6]=it,this.uint8[sr+7]=yt,V},_}(Qi);ui.prototype.bytesPerElement=8,X("StructArrayLayout2i4ub8",ui);var nn=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$){var ae=this.length;return this.resize(ae+1),this.emplace(ae,V,$)},_.prototype.emplace=function(V,$,ae){var he=V*2;return this.float32[he+0]=$,this.float32[he+1]=ae,V},_}(Qi);nn.prototype.bytesPerElement=8,X("StructArrayLayout2f8",nn);var Xi=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$,ae,he,Fe,it,yt,Lt,sr,gr){var hr=this.length;return this.resize(hr+1),this.emplace(hr,V,$,ae,he,Fe,it,yt,Lt,sr,gr)},_.prototype.emplace=function(V,$,ae,he,Fe,it,yt,Lt,sr,gr,hr){var Rr=V*10;return this.uint16[Rr+0]=$,this.uint16[Rr+1]=ae,this.uint16[Rr+2]=he,this.uint16[Rr+3]=Fe,this.uint16[Rr+4]=it,this.uint16[Rr+5]=yt,this.uint16[Rr+6]=Lt,this.uint16[Rr+7]=sr,this.uint16[Rr+8]=gr,this.uint16[Rr+9]=hr,V},_}(Qi);Xi.prototype.bytesPerElement=20,X("StructArrayLayout10ui20",Xi);var qn=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$,ae,he,Fe,it,yt,Lt,sr,gr,hr,Rr){var ni=this.length;return this.resize(ni+1),this.emplace(ni,V,$,ae,he,Fe,it,yt,Lt,sr,gr,hr,Rr)},_.prototype.emplace=function(V,$,ae,he,Fe,it,yt,Lt,sr,gr,hr,Rr,ni){var Hi=V*12;return this.int16[Hi+0]=$,this.int16[Hi+1]=ae,this.int16[Hi+2]=he,this.int16[Hi+3]=Fe,this.uint16[Hi+4]=it,this.uint16[Hi+5]=yt,this.uint16[Hi+6]=Lt,this.uint16[Hi+7]=sr,this.int16[Hi+8]=gr,this.int16[Hi+9]=hr,this.int16[Hi+10]=Rr,this.int16[Hi+11]=ni,V},_}(Qi);qn.prototype.bytesPerElement=24,X("StructArrayLayout4i4ui4i24",qn);var fi=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$,ae){var he=this.length;return this.resize(he+1),this.emplace(he,V,$,ae)},_.prototype.emplace=function(V,$,ae,he){var Fe=V*3;return this.float32[Fe+0]=$,this.float32[Fe+1]=ae,this.float32[Fe+2]=he,V},_}(Qi);fi.prototype.bytesPerElement=12,X("StructArrayLayout3f12",fi);var si=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V){var $=this.length;return this.resize($+1),this.emplace($,V)},_.prototype.emplace=function(V,$){var ae=V*1;return this.uint32[ae+0]=$,V},_}(Qi);si.prototype.bytesPerElement=4,X("StructArrayLayout1ul4",si);var mn=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$,ae,he,Fe,it,yt,Lt,sr){var gr=this.length;return this.resize(gr+1),this.emplace(gr,V,$,ae,he,Fe,it,yt,Lt,sr)},_.prototype.emplace=function(V,$,ae,he,Fe,it,yt,Lt,sr,gr){var hr=V*10,Rr=V*5;return this.int16[hr+0]=$,this.int16[hr+1]=ae,this.int16[hr+2]=he,this.int16[hr+3]=Fe,this.int16[hr+4]=it,this.int16[hr+5]=yt,this.uint32[Rr+3]=Lt,this.uint16[hr+8]=sr,this.uint16[hr+9]=gr,V},_}(Qi);mn.prototype.bytesPerElement=20,X("StructArrayLayout6i1ul2ui20",mn);var Ji=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$,ae,he,Fe,it){var yt=this.length;return this.resize(yt+1),this.emplace(yt,V,$,ae,he,Fe,it)},_.prototype.emplace=function(V,$,ae,he,Fe,it,yt){var Lt=V*6;return this.int16[Lt+0]=$,this.int16[Lt+1]=ae,this.int16[Lt+2]=he,this.int16[Lt+3]=Fe,this.int16[Lt+4]=it,this.int16[Lt+5]=yt,V},_}(Qi);Ji.prototype.bytesPerElement=12,X("StructArrayLayout2i2i2i12",Ji);var Ui=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$,ae,he,Fe){var it=this.length;return this.resize(it+1),this.emplace(it,V,$,ae,he,Fe)},_.prototype.emplace=function(V,$,ae,he,Fe,it){var yt=V*4,Lt=V*8;return this.float32[yt+0]=$,this.float32[yt+1]=ae,this.float32[yt+2]=he,this.int16[Lt+6]=Fe,this.int16[Lt+7]=it,V},_}(Qi);Ui.prototype.bytesPerElement=16,X("StructArrayLayout2f1f2i16",Ui);var Bi=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$,ae,he){var Fe=this.length;return this.resize(Fe+1),this.emplace(Fe,V,$,ae,he)},_.prototype.emplace=function(V,$,ae,he,Fe){var it=V*12,yt=V*3;return this.uint8[it+0]=$,this.uint8[it+1]=ae,this.float32[yt+1]=he,this.float32[yt+2]=Fe,V},_}(Qi);Bi.prototype.bytesPerElement=12,X("StructArrayLayout2ub2f12",Bi);var pn=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$,ae){var he=this.length;return this.resize(he+1),this.emplace(he,V,$,ae)},_.prototype.emplace=function(V,$,ae,he){var Fe=V*3;return this.uint16[Fe+0]=$,this.uint16[Fe+1]=ae,this.uint16[Fe+2]=he,V},_}(Qi);pn.prototype.bytesPerElement=6,X("StructArrayLayout3ui6",pn);var Nn=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$,ae,he,Fe,it,yt,Lt,sr,gr,hr,Rr,ni,Hi,wi,bn,rn){var xn=this.length;return this.resize(xn+1),this.emplace(xn,V,$,ae,he,Fe,it,yt,Lt,sr,gr,hr,Rr,ni,Hi,wi,bn,rn)},_.prototype.emplace=function(V,$,ae,he,Fe,it,yt,Lt,sr,gr,hr,Rr,ni,Hi,wi,bn,rn,xn){var In=V*24,Xn=V*12,ga=V*48;return this.int16[In+0]=$,this.int16[In+1]=ae,this.uint16[In+2]=he,this.uint16[In+3]=Fe,this.uint32[Xn+2]=it,this.uint32[Xn+3]=yt,this.uint32[Xn+4]=Lt,this.uint16[In+10]=sr,this.uint16[In+11]=gr,this.uint16[In+12]=hr,this.float32[Xn+7]=Rr,this.float32[Xn+8]=ni,this.uint8[ga+36]=Hi,this.uint8[ga+37]=wi,this.uint8[ga+38]=bn,this.uint32[Xn+10]=rn,this.int16[In+22]=xn,V},_}(Qi);Nn.prototype.bytesPerElement=48,X("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Nn);var aa=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$,ae,he,Fe,it,yt,Lt,sr,gr,hr,Rr,ni,Hi,wi,bn,rn,xn,In,Xn,ga,ha,eo,za,Za,Jo,to,ao){var _s=this.length;return this.resize(_s+1),this.emplace(_s,V,$,ae,he,Fe,it,yt,Lt,sr,gr,hr,Rr,ni,Hi,wi,bn,rn,xn,In,Xn,ga,ha,eo,za,Za,Jo,to,ao)},_.prototype.emplace=function(V,$,ae,he,Fe,it,yt,Lt,sr,gr,hr,Rr,ni,Hi,wi,bn,rn,xn,In,Xn,ga,ha,eo,za,Za,Jo,to,ao,_s){var jo=V*34,El=V*17;return this.int16[jo+0]=$,this.int16[jo+1]=ae,this.int16[jo+2]=he,this.int16[jo+3]=Fe,this.int16[jo+4]=it,this.int16[jo+5]=yt,this.int16[jo+6]=Lt,this.int16[jo+7]=sr,this.uint16[jo+8]=gr,this.uint16[jo+9]=hr,this.uint16[jo+10]=Rr,this.uint16[jo+11]=ni,this.uint16[jo+12]=Hi,this.uint16[jo+13]=wi,this.uint16[jo+14]=bn,this.uint16[jo+15]=rn,this.uint16[jo+16]=xn,this.uint16[jo+17]=In,this.uint16[jo+18]=Xn,this.uint16[jo+19]=ga,this.uint16[jo+20]=ha,this.uint16[jo+21]=eo,this.uint16[jo+22]=za,this.uint32[El+12]=Za,this.float32[El+13]=Jo,this.float32[El+14]=to,this.float32[El+15]=ao,this.float32[El+16]=_s,V},_}(Qi);aa.prototype.bytesPerElement=68,X("StructArrayLayout8i15ui1ul4f68",aa);var Ki=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V){var $=this.length;return this.resize($+1),this.emplace($,V)},_.prototype.emplace=function(V,$){var ae=V*1;return this.float32[ae+0]=$,V},_}(Qi);Ki.prototype.bytesPerElement=4,X("StructArrayLayout1f4",Ki);var Cn=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$,ae){var he=this.length;return this.resize(he+1),this.emplace(he,V,$,ae)},_.prototype.emplace=function(V,$,ae,he){var Fe=V*3;return this.int16[Fe+0]=$,this.int16[Fe+1]=ae,this.int16[Fe+2]=he,V},_}(Qi);Cn.prototype.bytesPerElement=6,X("StructArrayLayout3i6",Cn);var ia=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$,ae){var he=this.length;return this.resize(he+1),this.emplace(he,V,$,ae)},_.prototype.emplace=function(V,$,ae,he){var Fe=V*2,it=V*4;return this.uint32[Fe+0]=$,this.uint16[it+2]=ae,this.uint16[it+3]=he,V},_}(Qi);ia.prototype.bytesPerElement=8,X("StructArrayLayout1ul2ui8",ia);var sa=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$){var ae=this.length;return this.resize(ae+1),this.emplace(ae,V,$)},_.prototype.emplace=function(V,$,ae){var he=V*2;return this.uint16[he+0]=$,this.uint16[he+1]=ae,V},_}(Qi);sa.prototype.bytesPerElement=4,X("StructArrayLayout2ui4",sa);var ba=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V){var $=this.length;return this.resize($+1),this.emplace($,V)},_.prototype.emplace=function(V,$){var ae=V*1;return this.uint16[ae+0]=$,V},_}(Qi);ba.prototype.bytesPerElement=2,X("StructArrayLayout1ui2",ba);var is=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},_.prototype.emplaceBack=function(V,$,ae,he){var Fe=this.length;return this.resize(Fe+1),this.emplace(Fe,V,$,ae,he)},_.prototype.emplace=function(V,$,ae,he,Fe){var it=V*4;return this.float32[it+0]=$,this.float32[it+1]=ae,this.float32[it+2]=he,this.float32[it+3]=Fe,V},_}(Qi);is.prototype.bytesPerElement=16,X("StructArrayLayout4f16",is);var Zs=function(y){function _(){y.apply(this,arguments)}y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_;var I={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return I.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},I.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},I.x1.get=function(){return this._structArray.int16[this._pos2+2]},I.y1.get=function(){return this._structArray.int16[this._pos2+3]},I.x2.get=function(){return this._structArray.int16[this._pos2+4]},I.y2.get=function(){return this._structArray.int16[this._pos2+5]},I.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},I.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},I.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},I.anchorPoint.get=function(){return new u(this.anchorPointX,this.anchorPointY)},Object.defineProperties(_.prototype,I),_}(qi);Zs.prototype.size=20;var Va=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.get=function(V){return new Zs(this,V)},_}(mn);X("CollisionBoxArray",Va);var Ml=function(y){function _(){y.apply(this,arguments)}y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_;var I={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return I.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},I.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},I.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},I.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},I.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},I.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},I.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},I.segment.get=function(){return this._structArray.uint16[this._pos2+10]},I.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},I.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},I.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},I.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},I.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},I.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},I.placedOrientation.set=function(V){this._structArray.uint8[this._pos1+37]=V},I.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},I.hidden.set=function(V){this._structArray.uint8[this._pos1+38]=V},I.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},I.crossTileID.set=function(V){this._structArray.uint32[this._pos4+10]=V},I.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(_.prototype,I),_}(qi);Ml.prototype.size=48;var zo=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.get=function(V){return new Ml(this,V)},_}(Nn);X("PlacedSymbolArray",zo);var Qs=function(y){function _(){y.apply(this,arguments)}y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_;var I={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return I.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},I.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},I.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},I.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},I.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},I.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},I.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},I.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},I.key.get=function(){return this._structArray.uint16[this._pos2+8]},I.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},I.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},I.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},I.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},I.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},I.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},I.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},I.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},I.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},I.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},I.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},I.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},I.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},I.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},I.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},I.crossTileID.set=function(V){this._structArray.uint32[this._pos4+12]=V},I.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},I.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},I.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},I.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(_.prototype,I),_}(qi);Qs.prototype.size=68;var al=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.get=function(V){return new Qs(this,V)},_}(aa);X("SymbolInstanceArray",al);var Vl=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.getoffsetX=function(V){return this.float32[V*1+0]},_}(Ki);X("GlyphOffsetArray",Vl);var ss=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.getx=function(V){return this.int16[V*3+0]},_.prototype.gety=function(V){return this.int16[V*3+1]},_.prototype.gettileUnitDistanceFromAnchor=function(V){return this.int16[V*3+2]},_}(Cn);X("SymbolLineVertexArray",ss);var Vs=function(y){function _(){y.apply(this,arguments)}y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_;var I={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return I.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},I.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},I.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(_.prototype,I),_}(qi);Vs.prototype.size=8;var Ys=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.get=function(V){return new Vs(this,V)},_}(ia);X("FeatureIndexArray",Ys);var wa=ji([{name:"a_pos",components:2,type:"Int16"}],4),ol=wa.members,io=function(_){_===void 0&&(_=[]),this.segments=_};io.prototype.prepareSegment=function(_,I,V,$){var ae=this.segments[this.segments.length-1];return _>io.MAX_VERTEX_ARRAY_LENGTH&&re("Max vertices per segment is "+io.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+_),(!ae||ae.vertexLength+_>io.MAX_VERTEX_ARRAY_LENGTH||ae.sortKey!==$)&&(ae={vertexOffset:I.length,primitiveOffset:V.length,vertexLength:0,primitiveLength:0},$!==void 0&&(ae.sortKey=$),this.segments.push(ae)),ae},io.prototype.get=function(){return this.segments},io.prototype.destroy=function(){for(var _=0,I=this.segments;_>>16)*it&65535)<<16)&4294967295,Lt=Lt<<15|Lt>>>17,Lt=(Lt&65535)*yt+(((Lt>>>16)*yt&65535)<<16)&4294967295,he^=Lt,he=he<<13|he>>>19,Fe=(he&65535)*5+(((he>>>16)*5&65535)<<16)&4294967295,he=(Fe&65535)+27492+(((Fe>>>16)+58964&65535)<<16);switch(Lt=0,$){case 3:Lt^=(I.charCodeAt(sr+2)&255)<<16;case 2:Lt^=(I.charCodeAt(sr+1)&255)<<8;case 1:Lt^=I.charCodeAt(sr)&255,Lt=(Lt&65535)*it+(((Lt>>>16)*it&65535)<<16)&4294967295,Lt=Lt<<15|Lt>>>17,Lt=(Lt&65535)*yt+(((Lt>>>16)*yt&65535)<<16)&4294967295,he^=Lt}return he^=I.length,he^=he>>>16,he=(he&65535)*2246822507+(((he>>>16)*2246822507&65535)<<16)&4294967295,he^=he>>>13,he=(he&65535)*3266489909+(((he>>>16)*3266489909&65535)<<16)&4294967295,he^=he>>>16,he>>>0}y.exports=_}),O=a(function(y){function _(I,V){for(var $=I.length,ae=V^$,he=0,Fe;$>=4;)Fe=I.charCodeAt(he)&255|(I.charCodeAt(++he)&255)<<8|(I.charCodeAt(++he)&255)<<16|(I.charCodeAt(++he)&255)<<24,Fe=(Fe&65535)*1540483477+(((Fe>>>16)*1540483477&65535)<<16),Fe^=Fe>>>24,Fe=(Fe&65535)*1540483477+(((Fe>>>16)*1540483477&65535)<<16),ae=(ae&65535)*1540483477+(((ae>>>16)*1540483477&65535)<<16)^Fe,$-=4,++he;switch($){case 3:ae^=(I.charCodeAt(he+2)&255)<<16;case 2:ae^=(I.charCodeAt(he+1)&255)<<8;case 1:ae^=I.charCodeAt(he)&255,ae=(ae&65535)*1540483477+(((ae>>>16)*1540483477&65535)<<16)}return ae^=ae>>>13,ae=(ae&65535)*1540483477+(((ae>>>16)*1540483477&65535)<<16),ae^=ae>>>15,ae>>>0}y.exports=_}),K=J,de=J,ne=O;K.murmur3=de,K.murmur2=ne;var be=function(){this.ids=[],this.positions=[],this.indexed=!1};be.prototype.add=function(_,I,V,$){this.ids.push(ht(_)),this.positions.push(I,V,$)},be.prototype.getPositions=function(_){for(var I=ht(_),V=0,$=this.ids.length-1;V<$;){var ae=V+$>>1;this.ids[ae]>=I?$=ae:V=ae+1}for(var he=[];this.ids[V]===I;){var Fe=this.positions[3*V],it=this.positions[3*V+1],yt=this.positions[3*V+2];he.push({index:Fe,start:it,end:yt}),V++}return he},be.serialize=function(_,I){var V=new Float64Array(_.ids),$=new Uint32Array(_.positions);return Yt(V,$,0,V.length-1),I&&I.push(V.buffer,$.buffer),{ids:V,positions:$}},be.deserialize=function(_){var I=new be;return I.ids=_.ids,I.positions=_.positions,I.indexed=!0,I};var Be=Math.pow(2,53)-1;function ht(y){var _=+y;return!isNaN(_)&&_<=Be?_:K(String(y))}function Yt(y,_,I,V){for(;I>1],ae=I-1,he=V+1;;){do ae++;while(y[ae]<$);do he--;while(y[he]>$);if(ae>=he)break;cr(y,ae,he),cr(_,3*ae,3*he),cr(_,3*ae+1,3*he+1),cr(_,3*ae+2,3*he+2)}he-Ihe.x+1||ithe.y+1)&&re("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return I}function Ja(y,_){return{type:y.type,id:y.id,properties:y.properties,geometry:_?zn(y):[]}}function co(y,_,I,V,$){y.emplaceBack(_*2+(V+1)/2,I*2+($+1)/2)}var ts=function(_){this.zoom=_.zoom,this.overscaling=_.overscaling,this.layers=_.layers,this.layerIds=this.layers.map(function(I){return I.id}),this.index=_.index,this.hasPattern=!1,this.layoutVertexArray=new Zr,this.indexArray=new pn,this.segments=new io,this.programConfigurations=new ci(_.layers,_.zoom),this.stateDependentLayerIds=this.layers.filter(function(I){return I.isStateDependent()}).map(function(I){return I.id})};ts.prototype.populate=function(_,I,V){var $=this.layers[0],ae=[],he=null;$.type==="circle"&&(he=$.layout.get("circle-sort-key"));for(var Fe=0,it=_;Fe=Ei||gr<0||gr>=Ei)){var hr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,_.sortKey),Rr=hr.vertexLength;co(this.layoutVertexArray,sr,gr,-1,-1),co(this.layoutVertexArray,sr,gr,1,-1),co(this.layoutVertexArray,sr,gr,1,1),co(this.layoutVertexArray,sr,gr,-1,1),this.indexArray.emplaceBack(Rr,Rr+1,Rr+2),this.indexArray.emplaceBack(Rr,Rr+3,Rr+2),hr.vertexLength+=4,hr.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,_,V,{},$)},X("CircleBucket",ts,{omit:["layers"]});function so(y,_){for(var I=0;I=3){for(var ae=0;ae<$.length;ae++)if(Td(y,$[ae]))return!0}if(Cv(y,$,I))return!0}return!1}function Cv(y,_,I){if(y.length>1){if(Lv(y,_))return!0;for(var V=0;V<_.length;V++)if(Kv(_[V],y,I))return!0}for(var $=0;$1?y.distSqr(I):y.distSqr(I.sub(_)._mult($)._add(_))}function gp(y,_){for(var I=!1,V,$,ae,he=0;he_.y!=ae.y>_.y&&_.x<(ae.x-$.x)*(_.y-$.y)/(ae.y-$.y)+$.x&&(I=!I)}return I}function Td(y,_){for(var I=!1,V=0,$=y.length-1;V_.y!=he.y>_.y&&_.x<(he.x-ae.x)*(_.y-ae.y)/(he.y-ae.y)+ae.x&&(I=!I)}return I}function mp(y,_,I,V,$){for(var ae=0,he=y;ae=Fe.x&&$>=Fe.y)return!0}var it=[new u(_,I),new u(_,$),new u(V,$),new u(V,I)];if(y.length>2)for(var yt=0,Lt=it;yt$.x&&_.x>$.x||y.y$.y&&_.y>$.y)return!1;var ae=oe(y,_,I[0]);return ae!==oe(y,_,I[1])||ae!==oe(y,_,I[2])||ae!==oe(y,_,I[3])}function Ad(y,_,I){var V=_.paint.get(y).value;return V.kind==="constant"?V.value:I.programConfigurations.get(_.id).getMaxValue(y)}function Pv(y){return Math.sqrt(y[0]*y[0]+y[1]*y[1])}function Jv(y,_,I,V,$){if(!_[0]&&!_[1])return y;var ae=u.convert(_)._mult($);I==="viewport"&&ae._rotate(-V);for(var he=[],Fe=0;Fe0&&(ae=1/Math.sqrt(ae)),y[0]=_[0]*ae,y[1]=_[1]*ae,y[2]=_[2]*ae,y}function V9(y,_){return y[0]*_[0]+y[1]*_[1]+y[2]*_[2]}function G9(y,_,I){var V=_[0],$=_[1],ae=_[2],he=I[0],Fe=I[1],it=I[2];return y[0]=$*it-ae*Fe,y[1]=ae*he-V*it,y[2]=V*Fe-$*he,y}function H9(y,_,I){var V=_[0],$=_[1],ae=_[2];return y[0]=V*I[0]+$*I[3]+ae*I[6],y[1]=V*I[1]+$*I[4]+ae*I[7],y[2]=V*I[2]+$*I[5]+ae*I[8],y}var j9=um,qQ=function(){var y=lm();return function(_,I,V,$,ae,he){var Fe,it;for(I||(I=3),V||(V=0),$?it=Math.min($*I+V,_.length):it=_.length,Fe=V;Fey.width||$.height>y.height||I.x>y.width-$.width||I.y>y.height-$.height)throw new RangeError("out of range source coordinates for image copy");if($.width>_.width||$.height>_.height||V.x>_.width-$.width||V.y>_.height-$.height)throw new RangeError("out of range destination coordinates for image copy");for(var he=y.data,Fe=_.data,it=0;it<$.height;it++)for(var yt=((I.y+it)*y.width+I.x)*ae,Lt=((V.y+it)*_.width+V.x)*ae,sr=0;sr<$.width*ae;sr++)Fe[Lt+sr]=he[yt+sr];return _}var Dv=function(_,I){Md(this,_,1,I)};Dv.prototype.resize=function(_){Nw(this,_,1)},Dv.prototype.clone=function(){return new Dv({width:this.width,height:this.height},new Uint8Array(this.data))},Dv.copy=function(_,I,V,$,ae){Uw(_,I,V,$,ae,1)};var Eh=function(_,I){Md(this,_,4,I)};Eh.prototype.resize=function(_){Nw(this,_,4)},Eh.prototype.replace=function(_,I){I?this.data.set(_):_ instanceof Uint8ClampedArray?this.data=new Uint8Array(_.buffer):this.data=_},Eh.prototype.clone=function(){return new Eh({width:this.width,height:this.height},new Uint8Array(this.data))},Eh.copy=function(_,I,V,$,ae){Uw(_,I,V,$,ae,4)},X("AlphaImage",Dv),X("RGBAImage",Eh);var $x=new Or({"heatmap-radius":new bt(Rn.paint_heatmap["heatmap-radius"]),"heatmap-weight":new bt(Rn.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Me(Rn.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Vr(Rn.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Me(Rn.paint_heatmap["heatmap-opacity"])}),P1={paint:$x};function Qx(y){var _={},I=y.resolution||256,V=y.clips?y.clips.length:1,$=y.image||new Eh({width:I,height:V}),ae=function(bn,rn,xn){_[y.evaluationKey]=xn;var In=y.expression.evaluate(_);$.data[bn+rn+0]=Math.floor(In.r*255/In.a),$.data[bn+rn+1]=Math.floor(In.g*255/In.a),$.data[bn+rn+2]=Math.floor(In.b*255/In.a),$.data[bn+rn+3]=Math.floor(In.a*255)};if(y.clips)for(var yt=0,Lt=0;yt80*I){Fe=yt=y[0],it=Lt=y[1];for(var Rr=I;Rr<$;Rr+=I)sr=y[Rr],gr=y[Rr+1],sryt&&(yt=sr),gr>Lt&&(Lt=gr);hr=Math.max(yt-Fe,Lt-it),hr=hr!==0?1/hr:0}return eb(ae,he,I,Fe,it,hr),he}function Hw(y,_,I,V,$){var ae,he;if($===mS(y,_,I,V)>0)for(ae=_;ae=_;ae-=V)he=FC(ae,y[ae],y[ae+1],he);return he&&rb(he,he.next)&&(ab(he),he=he.next),he}function cm(y,_){if(!y)return y;_||(_=y);var I=y,V;do if(V=!1,!I.steiner&&(rb(I,I.next)||Tf(I.prev,I,I.next)===0)){if(ab(I),I=_=I.prev,I===I.next)break;V=!0}else I=I.next;while(V||I!==_);return _}function eb(y,_,I,V,$,ae,he){if(y){!he&&ae&&jw(y,V,$,ae);for(var Fe=y,it,yt;y.prev!==y.next;){if(it=y.prev,yt=y.next,ae?IC(y,V,$,ae):PC(y)){_.push(it.i/I),_.push(y.i/I),_.push(yt.i/I),ab(y),y=yt.next,Fe=yt.next;continue}if(y=yt,y===Fe){he?he===1?(y=tb(cm(y),_,I),eb(y,_,I,V,$,ae,2)):he===2&&v0(y,_,I,V,$,ae):eb(cm(y),_,I,V,$,ae,1);break}}}}function PC(y){var _=y.prev,I=y,V=y.next;if(Tf(_,I,V)>=0)return!1;for(var $=y.next.next;$!==y.prev;){if(hm(_.x,_.y,I.x,I.y,V.x,V.y,$.x,$.y)&&Tf($.prev,$,$.next)>=0)return!1;$=$.next}return!0}function IC(y,_,I,V){var $=y.prev,ae=y,he=y.next;if(Tf($,ae,he)>=0)return!1;for(var Fe=$.xae.x?$.x>he.x?$.x:he.x:ae.x>he.x?ae.x:he.x,Lt=$.y>ae.y?$.y>he.y?$.y:he.y:ae.y>he.y?ae.y:he.y,sr=dS(Fe,it,_,I,V),gr=dS(yt,Lt,_,I,V),hr=y.prevZ,Rr=y.nextZ;hr&&hr.z>=sr&&Rr&&Rr.z<=gr;){if(hr!==y.prev&&hr!==y.next&&hm($.x,$.y,ae.x,ae.y,he.x,he.y,hr.x,hr.y)&&Tf(hr.prev,hr,hr.next)>=0||(hr=hr.prevZ,Rr!==y.prev&&Rr!==y.next&&hm($.x,$.y,ae.x,ae.y,he.x,he.y,Rr.x,Rr.y)&&Tf(Rr.prev,Rr,Rr.next)>=0))return!1;Rr=Rr.nextZ}for(;hr&&hr.z>=sr;){if(hr!==y.prev&&hr!==y.next&&hm($.x,$.y,ae.x,ae.y,he.x,he.y,hr.x,hr.y)&&Tf(hr.prev,hr,hr.next)>=0)return!1;hr=hr.prevZ}for(;Rr&&Rr.z<=gr;){if(Rr!==y.prev&&Rr!==y.next&&hm($.x,$.y,ae.x,ae.y,he.x,he.y,Rr.x,Rr.y)&&Tf(Rr.prev,Rr,Rr.next)>=0)return!1;Rr=Rr.nextZ}return!0}function tb(y,_,I){var V=y;do{var $=V.prev,ae=V.next.next;!rb($,ae)&&Ww($,V,V.next,ae)&&nb($,ae)&&nb(ae,$)&&(_.push($.i/I),_.push(V.i/I),_.push(ae.i/I),ab(V),ab(V.next),V=y=ae),V=V.next}while(V!==y);return cm(V)}function v0(y,_,I,V,$,ae){var he=y;do{for(var Fe=he.next.next;Fe!==he.prev;){if(he.i!==Fe.i&&R1(he,Fe)){var it=pS(he,Fe);he=cm(he,he.next),it=cm(it,it.next),eb(he,_,I,V,$,ae),eb(it,_,I,V,$,ae);return}Fe=Fe.next}he=he.next}while(he!==y)}function fm(y,_,I,V){var $=[],ae,he,Fe,it,yt;for(ae=0,he=_.length;ae=I.next.y&&I.next.y!==I.y){var Fe=I.x+($-I.y)*(I.next.x-I.x)/(I.next.y-I.y);if(Fe<=V&&Fe>ae){if(ae=Fe,Fe===V){if($===I.y)return I;if($===I.next.y)return I.next}he=I.x=I.x&&I.x>=yt&&V!==I.x&&hm($he.x||I.x===he.x&&eq(he,I)))&&(he=I,sr=gr)),I=I.next;while(I!==it);return he}function eq(y,_){return Tf(y.prev,y,_.prev)<0&&Tf(_.next,y,y.next)<0}function jw(y,_,I,V){var $=y;do $.z===null&&($.z=dS($.x,$.y,_,I,V)),$.prevZ=$.prev,$.nextZ=$.next,$=$.next;while($!==y);$.prevZ.nextZ=null,$.prevZ=null,hS($)}function hS(y){var _,I,V,$,ae,he,Fe,it,yt=1;do{for(I=y,y=null,ae=null,he=0;I;){for(he++,V=I,Fe=0,_=0;_0||it>0&&V;)Fe!==0&&(it===0||!V||I.z<=V.z)?($=I,I=I.nextZ,Fe--):($=V,V=V.nextZ,it--),ae?ae.nextZ=$:y=$,$.prevZ=ae,ae=$;I=V}ae.nextZ=null,yt*=2}while(he>1);return y}function dS(y,_,I,V,$){return y=32767*(y-I)*$,_=32767*(_-V)*$,y=(y|y<<8)&16711935,y=(y|y<<4)&252645135,y=(y|y<<2)&858993459,y=(y|y<<1)&1431655765,_=(_|_<<8)&16711935,_=(_|_<<4)&252645135,_=(_|_<<2)&858993459,_=(_|_<<1)&1431655765,y|_<<1}function vS(y){var _=y,I=y;do(_.x=0&&(y-he)*(V-Fe)-(I-he)*(_-Fe)>=0&&(I-he)*(ae-Fe)-($-he)*(V-Fe)>=0}function R1(y,_){return y.next.i!==_.i&&y.prev.i!==_.i&&!DC(y,_)&&(nb(y,_)&&nb(_,y)&&tq(y,_)&&(Tf(y.prev,y,_.prev)||Tf(y,_.prev,_))||rb(y,_)&&Tf(y.prev,y,y.next)>0&&Tf(_.prev,_,_.next)>0)}function Tf(y,_,I){return(_.y-y.y)*(I.x-_.x)-(_.x-y.x)*(I.y-_.y)}function rb(y,_){return y.x===_.x&&y.y===_.y}function Ww(y,_,I,V){var $=gy(Tf(y,_,I)),ae=gy(Tf(y,_,V)),he=gy(Tf(I,V,y)),Fe=gy(Tf(I,V,_));return!!($!==ae&&he!==Fe||$===0&&ib(y,I,_)||ae===0&&ib(y,V,_)||he===0&&ib(I,y,V)||Fe===0&&ib(I,_,V))}function ib(y,_,I){return _.x<=Math.max(y.x,I.x)&&_.x>=Math.min(y.x,I.x)&&_.y<=Math.max(y.y,I.y)&&_.y>=Math.min(y.y,I.y)}function gy(y){return y>0?1:y<0?-1:0}function DC(y,_){var I=y;do{if(I.i!==y.i&&I.next.i!==y.i&&I.i!==_.i&&I.next.i!==_.i&&Ww(I,I.next,y,_))return!0;I=I.next}while(I!==y);return!1}function nb(y,_){return Tf(y.prev,y,y.next)<0?Tf(y,_,y.next)>=0&&Tf(y,y.prev,_)>=0:Tf(y,_,y.prev)<0||Tf(y,y.next,_)<0}function tq(y,_){var I=y,V=!1,$=(y.x+_.x)/2,ae=(y.y+_.y)/2;do I.y>ae!=I.next.y>ae&&I.next.y!==I.y&&$<(I.next.x-I.x)*(ae-I.y)/(I.next.y-I.y)+I.x&&(V=!V),I=I.next;while(I!==y);return V}function pS(y,_){var I=new gS(y.i,y.x,y.y),V=new gS(_.i,_.x,_.y),$=y.next,ae=_.prev;return y.next=_,_.prev=y,I.next=$,$.prev=I,V.next=I,I.prev=V,ae.next=V,V.prev=ae,V}function FC(y,_,I,V){var $=new gS(y,_,I);return V?($.next=V.next,$.prev=V,V.next.prev=$,V.next=$):($.prev=$,$.next=$),$}function ab(y){y.next.prev=y.prev,y.prev.next=y.next,y.prevZ&&(y.prevZ.nextZ=y.nextZ),y.nextZ&&(y.nextZ.prevZ=y.prevZ)}function gS(y,_,I){this.i=y,this.x=_,this.y=I,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}I1.deviation=function(y,_,I,V){var $=_&&_.length,ae=$?_[0]*I:y.length,he=Math.abs(mS(y,0,ae,I));if($)for(var Fe=0,it=_.length;Fe0&&(V+=y[$-1].length,I.holes.push(V))}return I},Gw.default=LC;function yS(y,_,I,V,$){pg(y,_,I||0,V||y.length-1,$||zC)}function pg(y,_,I,V,$){for(;V>I;){if(V-I>600){var ae=V-I+1,he=_-I+1,Fe=Math.log(ae),it=.5*Math.exp(2*Fe/3),yt=.5*Math.sqrt(Fe*it*(ae-it)/ae)*(he-ae/2<0?-1:1),Lt=Math.max(I,Math.floor(_-he*it/ae+yt)),sr=Math.min(V,Math.floor(_+(ae-he)*it/ae+yt));pg(y,_,Lt,sr,$)}var gr=y[_],hr=I,Rr=V;for(D1(y,I,_),$(y[V],gr)>0&&D1(y,I,V);hr0;)Rr--}$(y[I],gr)===0?D1(y,I,Rr):(Rr++,D1(y,Rr,V)),Rr<=_&&(I=Rr+1),_<=Rr&&(V=Rr-1)}}function D1(y,_,I){var V=y[_];y[_]=y[I],y[I]=V}function zC(y,_){return y<_?-1:y>_?1:0}function Xw(y,_){var I=y.length;if(I<=1)return[y];for(var V=[],$,ae,he=0;he1)for(var it=0;it>3}if(V--,I===1||I===2)$+=y.readSVarint(),ae+=y.readSVarint(),I===1&&(Fe&&he.push(Fe),Fe=[]),Fe.push(new u($,ae));else if(I===7)Fe&&Fe.push(Fe[0].clone());else throw new Error("unknown command "+I)}return Fe&&he.push(Fe),he},my.prototype.bbox=function(){var y=this._pbf;y.pos=this._geometry;for(var _=y.readVarint()+y.pos,I=1,V=0,$=0,ae=0,he=1/0,Fe=-1/0,it=1/0,yt=-1/0;y.pos<_;){if(V<=0){var Lt=y.readVarint();I=Lt&7,V=Lt>>3}if(V--,I===1||I===2)$+=y.readSVarint(),ae+=y.readSVarint(),$Fe&&(Fe=$),aeyt&&(yt=ae);else if(I!==7)throw new Error("unknown command "+I)}return[he,it,Fe,yt]},my.prototype.toGeoJSON=function(y,_,I){var V=this.extent*Math.pow(2,I),$=this.extent*y,ae=this.extent*_,he=this.loadGeometry(),Fe=my.types[this.type],it,yt;function Lt(hr){for(var Rr=0;Rr>3;_=V===1?y.readString():V===2?y.readFloat():V===3?y.readDouble():V===4?y.readVarint64():V===5?y.readVarint():V===6?y.readSVarint():V===7?y.readBoolean():null}return _}bS.prototype.feature=function(y){if(y<0||y>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[y];var _=this._pbf.readVarint()+this._pbf.pos;return new xS(this._pbf,_,this.extent,this._keys,this._values)};var WC=iq;function iq(y,_){this.layers=y.readFields(nq,{},_)}function nq(y,_,I){if(y===3){var V=new gg(I,I.readVarint()+I.pos);V.length&&(_[V.name]=V)}}var XC=WC,F1=xS,ZC=gg,mg={VectorTile:XC,VectorTileFeature:F1,VectorTileLayer:ZC},YC=mg.VectorTileFeature.types,Yw=500,z1=Math.pow(2,13);function dm(y,_,I,V,$,ae,he,Fe){y.emplaceBack(_,I,Math.floor(V*z1)*2+he,$*z1*2,ae*z1*2,Math.round(Fe))}var Vp=function(_){this.zoom=_.zoom,this.overscaling=_.overscaling,this.layers=_.layers,this.layerIds=this.layers.map(function(I){return I.id}),this.index=_.index,this.hasPattern=!1,this.layoutVertexArray=new Ii,this.indexArray=new pn,this.programConfigurations=new ci(_.layers,_.zoom),this.segments=new io,this.stateDependentLayerIds=this.layers.filter(function(I){return I.isStateDependent()}).map(function(I){return I.id})};Vp.prototype.populate=function(_,I,V){this.features=[],this.hasPattern=Zw("fill-extrusion",this.layers,I);for(var $=0,ae=_;$=1){var xn=Hi[bn-1];if(!aq(rn,xn)){hr.vertexLength+4>io.MAX_VERTEX_ARRAY_LENGTH&&(hr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var In=rn.sub(xn)._perp()._unit(),Xn=xn.dist(rn);wi+Xn>32768&&(wi=0),dm(this.layoutVertexArray,rn.x,rn.y,In.x,In.y,0,0,wi),dm(this.layoutVertexArray,rn.x,rn.y,In.x,In.y,0,1,wi),wi+=Xn,dm(this.layoutVertexArray,xn.x,xn.y,In.x,In.y,0,0,wi),dm(this.layoutVertexArray,xn.x,xn.y,In.x,In.y,0,1,wi);var ga=hr.vertexLength;this.indexArray.emplaceBack(ga,ga+2,ga+1),this.indexArray.emplaceBack(ga+1,ga+2,ga+3),hr.vertexLength+=4,hr.primitiveLength+=2}}}}if(hr.vertexLength+yt>io.MAX_VERTEX_ARRAY_LENGTH&&(hr=this.segments.prepareSegment(yt,this.layoutVertexArray,this.indexArray)),YC[_.type]==="Polygon"){for(var ha=[],eo=[],za=hr.vertexLength,Za=0,Jo=it;ZaEi)||y.y===_.y&&(y.y<0||y.y>Ei)}function oq(y){return y.every(function(_){return _.x<0})||y.every(function(_){return _.x>Ei})||y.every(function(_){return _.y<0})||y.every(function(_){return _.y>Ei})}var q1=new Or({"fill-extrusion-opacity":new Me(Rn["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new bt(Rn["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Me(Rn["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Me(Rn["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Ot(Rn["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new bt(Rn["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new bt(Rn["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Me(Rn["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),ld={paint:q1},vm=function(y){function _(I){y.call(this,I,ld)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.createBucket=function(V){return new Vp(V)},_.prototype.queryRadius=function(){return Pv(this.paint.get("fill-extrusion-translate"))},_.prototype.is3D=function(){return!0},_.prototype.queryIntersectsFeature=function(V,$,ae,he,Fe,it,yt,Lt){var sr=Jv(V,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),it.angle,yt),gr=this.paint.get("fill-extrusion-height").evaluate($,ae),hr=this.paint.get("fill-extrusion-base").evaluate($,ae),Rr=sq(sr,Lt,it,0),ni=TS(he,hr,gr,Lt),Hi=ni[0],wi=ni[1];return KC(Hi,wi,Rr)},_}(vi);function yy(y,_){return y.x*_.x+y.y*_.y}function wS(y,_){if(y.length===1){for(var I=0,V=_[I++],$;!$||V.equals($);)if($=_[I++],!$)return 1/0;for(;I<_.length;I++){var ae=_[I],he=y[0],Fe=$.sub(V),it=ae.sub(V),yt=he.sub(V),Lt=yy(Fe,Fe),sr=yy(Fe,it),gr=yy(it,it),hr=yy(yt,Fe),Rr=yy(yt,it),ni=Lt*gr-sr*sr,Hi=(gr*hr-sr*Rr)/ni,wi=(Lt*Rr-sr*hr)/ni,bn=1-Hi-wi,rn=V.z*bn+$.z*Hi+ae.z*wi;if(isFinite(rn))return rn}return 1/0}else{for(var xn=1/0,In=0,Xn=_;In=2&&_[yt-1].equals(_[yt-2]);)yt--;for(var Lt=0;Lt0;if(ha&&bn>Lt){var za=hr.dist(Rr);if(za>2*sr){var Za=hr.sub(hr.sub(Rr)._mult(sr/za)._round());this.updateDistance(Rr,Za),this.addCurrentVertex(Za,Hi,0,0,gr),Rr=Za}}var Jo=Rr&&ni,to=Jo?V:it?"butt":$;if(Jo&&to==="round"&&(Xnae&&(to="bevel"),to==="bevel"&&(Xn>2&&(to="flipbevel"),Xn100)rn=wi.mult(-1);else{var ao=Xn*Hi.add(wi).mag()/Hi.sub(wi).mag();rn._perp()._mult(ao*(eo?-1:1))}this.addCurrentVertex(hr,rn,0,0,gr),this.addCurrentVertex(hr,rn.mult(-1),0,0,gr)}else if(to==="bevel"||to==="fakeround"){var _s=-Math.sqrt(Xn*Xn-1),jo=eo?_s:0,El=eo?0:_s;if(Rr&&this.addCurrentVertex(hr,Hi,jo,El,gr),to==="fakeround")for(var Iu=Math.round(ga*180/Math.PI/SS),kl=1;kl2*sr){var ch=hr.add(ni.sub(hr)._mult(sr/$h)._round());this.updateDistance(hr,ch),this.addCurrentVertex(ch,wi,0,0,gr),hr=ch}}}}},sh.prototype.addCurrentVertex=function(_,I,V,$,ae,he){he===void 0&&(he=!1);var Fe=I.x+I.y*V,it=I.y-I.x*V,yt=-I.x+I.y*$,Lt=-I.y-I.x*$;this.addHalfVertex(_,Fe,it,he,!1,V,ae),this.addHalfVertex(_,yt,Lt,he,!0,-$,ae),this.distance>cb/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(_,I,V,$,ae,he))},sh.prototype.addHalfVertex=function(_,I,V,$,ae,he,Fe){var it=_.x,yt=_.y,Lt=this.lineClips?this.scaledDistance*(cb-1):this.scaledDistance,sr=Lt*Jw;if(this.layoutVertexArray.emplaceBack((it<<1)+($?1:0),(yt<<1)+(ae?1:0),Math.round(Kw*I)+128,Math.round(Kw*V)+128,(he===0?0:he<0?-1:1)+1|(sr&63)<<2,sr>>6),this.lineClips){var gr=this.scaledDistance-this.lineClips.start,hr=this.lineClips.end-this.lineClips.start,Rr=gr/hr;this.layoutVertexArray2.emplaceBack(Rr,this.lineClipsArray.length)}var ni=Fe.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,ni),Fe.primitiveLength++),ae?this.e2=ni:this.e1=ni},sh.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},sh.prototype.updateDistance=function(_,I){this.distance+=_.dist(I),this.updateScaledDistance()},X("LineBucket",sh,{omit:["layers","patternFeatures"]});var MS=new Or({"line-cap":new Me(Rn.layout_line["line-cap"]),"line-join":new bt(Rn.layout_line["line-join"]),"line-miter-limit":new Me(Rn.layout_line["line-miter-limit"]),"line-round-limit":new Me(Rn.layout_line["line-round-limit"]),"line-sort-key":new bt(Rn.layout_line["line-sort-key"])}),ES=new Or({"line-opacity":new bt(Rn.paint_line["line-opacity"]),"line-color":new bt(Rn.paint_line["line-color"]),"line-translate":new Me(Rn.paint_line["line-translate"]),"line-translate-anchor":new Me(Rn.paint_line["line-translate-anchor"]),"line-width":new bt(Rn.paint_line["line-width"]),"line-gap-width":new bt(Rn.paint_line["line-gap-width"]),"line-offset":new bt(Rn.paint_line["line-offset"]),"line-blur":new bt(Rn.paint_line["line-blur"]),"line-dasharray":new Lr(Rn.paint_line["line-dasharray"]),"line-pattern":new Ot(Rn.paint_line["line-pattern"]),"line-gradient":new Vr(Rn.paint_line["line-gradient"])}),$w={paint:ES,layout:MS},uq=function(y){function _(){y.apply(this,arguments)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.possiblyEvaluate=function(V,$){return $=new Un(Math.floor($.zoom),{now:$.now,fadeDuration:$.fadeDuration,zoomHistory:$.zoomHistory,transition:$.transition}),y.prototype.possiblyEvaluate.call(this,V,$)},_.prototype.evaluate=function(V,$,ae,he){return $=x({},$,{zoom:Math.floor($.zoom)}),y.prototype.evaluate.call(this,V,$,ae,he)},_}(bt),R=new uq($w.paint.properties["line-width"].specification);R.useIntegerZoom=!0;var A=function(y){function _(I){y.call(this,I,$w),this.gradientVersion=0}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype._handleSpecialPaintPropertyUpdate=function(V){if(V==="line-gradient"){var $=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=$._styleExpression.expression instanceof _u,this.gradientVersion=(this.gradientVersion+1)%d}},_.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},_.prototype.recalculate=function(V,$){y.prototype.recalculate.call(this,V,$),this.paint._values["line-floorwidth"]=R.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,V)},_.prototype.createBucket=function(V){return new sh(V)},_.prototype.queryRadius=function(V){var $=V,ae=F(Ad("line-width",this,$),Ad("line-gap-width",this,$)),he=Ad("line-offset",this,$);return ae/2+Math.abs(he)+Pv(this.paint.get("line-translate"))},_.prototype.queryIntersectsFeature=function(V,$,ae,he,Fe,it,yt){var Lt=Jv(V,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),it.angle,yt),sr=yt/2*F(this.paint.get("line-width").evaluate($,ae),this.paint.get("line-gap-width").evaluate($,ae)),gr=this.paint.get("line-offset").evaluate($,ae);return gr&&(he=W(he,gr*yt)),ou(Lt,he,sr)},_.prototype.isTileClipped=function(){return!0},_}(vi);function F(y,_){return _>0?_+2*y:y}function W(y,_){for(var I=[],V=new u(0,0),$=0;$":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"};function ln(y){for(var _="",I=0;I>1,Lt=-7,sr=I?$-1:0,gr=I?-1:1,hr=y[_+sr];for(sr+=gr,ae=hr&(1<<-Lt)-1,hr>>=-Lt,Lt+=Fe;Lt>0;ae=ae*256+y[_+sr],sr+=gr,Lt-=8);for(he=ae&(1<<-Lt)-1,ae>>=-Lt,Lt+=V;Lt>0;he=he*256+y[_+sr],sr+=gr,Lt-=8);if(ae===0)ae=1-yt;else{if(ae===it)return he?NaN:(hr?-1:1)*(1/0);he=he+Math.pow(2,V),ae=ae-yt}return(hr?-1:1)*he*Math.pow(2,ae-V)},ro=function(y,_,I,V,$,ae){var he,Fe,it,yt=ae*8-$-1,Lt=(1<>1,gr=$===23?Math.pow(2,-24)-Math.pow(2,-77):0,hr=V?0:ae-1,Rr=V?1:-1,ni=_<0||_===0&&1/_<0?1:0;for(_=Math.abs(_),isNaN(_)||_===1/0?(Fe=isNaN(_)?1:0,he=Lt):(he=Math.floor(Math.log(_)/Math.LN2),_*(it=Math.pow(2,-he))<1&&(he--,it*=2),he+sr>=1?_+=gr/it:_+=gr*Math.pow(2,1-sr),_*it>=2&&(he++,it/=2),he+sr>=Lt?(Fe=0,he=Lt):he+sr>=1?(Fe=(_*it-1)*Math.pow(2,$),he=he+sr):(Fe=_*Math.pow(2,sr-1)*Math.pow(2,$),he=0));$>=8;y[I+hr]=Fe&255,hr+=Rr,Fe/=256,$-=8);for(he=he<<$|Fe,yt+=$;yt>0;y[I+hr]=he&255,hr+=Rr,he/=256,yt-=8);y[I+hr-Rr]|=ni*128},Vo={read:pa,write:ro},Xa=la;function la(y){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(y)?y:new Uint8Array(y||0),this.pos=0,this.type=0,this.length=this.buf.length}la.Varint=0,la.Fixed64=1,la.Bytes=2,la.Fixed32=5;var Mo=65536*65536,fo=1/Mo,lo=12,Wn=typeof TextDecoder=="undefined"?null:new TextDecoder("utf8");la.prototype={destroy:function(){this.buf=null},readFields:function(y,_,I){for(I=I||this.length;this.pos>3,ae=this.pos;this.type=V&7,y($,_,this),this.pos===ae&&this.skip(V)}return _},readMessage:function(y,_){return this.readFields(y,_,this.readVarint()+this.pos)},readFixed32:function(){var y=Yh(this.buf,this.pos);return this.pos+=4,y},readSFixed32:function(){var y=Fv(this.buf,this.pos);return this.pos+=4,y},readFixed64:function(){var y=Yh(this.buf,this.pos)+Yh(this.buf,this.pos+4)*Mo;return this.pos+=8,y},readSFixed64:function(){var y=Yh(this.buf,this.pos)+Fv(this.buf,this.pos+4)*Mo;return this.pos+=8,y},readFloat:function(){var y=Vo.read(this.buf,this.pos,!0,23,4);return this.pos+=4,y},readDouble:function(){var y=Vo.read(this.buf,this.pos,!0,52,8);return this.pos+=8,y},readVarint:function(y){var _=this.buf,I,V;return V=_[this.pos++],I=V&127,V<128||(V=_[this.pos++],I|=(V&127)<<7,V<128)||(V=_[this.pos++],I|=(V&127)<<14,V<128)||(V=_[this.pos++],I|=(V&127)<<21,V<128)?I:(V=_[this.pos],I|=(V&15)<<28,Ro(I,y,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var y=this.readVarint();return y%2===1?(y+1)/-2:y/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var y=this.readVarint()+this.pos,_=this.pos;return this.pos=y,y-_>=lo&&Wn?ru(this.buf,_,y):lv(this.buf,_,y)},readBytes:function(){var y=this.readVarint()+this.pos,_=this.buf.subarray(this.pos,y);return this.pos=y,_},readPackedVarint:function(y,_){if(this.type!==la.Bytes)return y.push(this.readVarint(_));var I=uo(this);for(y=y||[];this.pos127;);else if(_===la.Bytes)this.pos=this.readVarint()+this.pos;else if(_===la.Fixed32)this.pos+=4;else if(_===la.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+_)},writeTag:function(y,_){this.writeVarint(y<<3|_)},realloc:function(y){for(var _=this.length||16;_268435455||y<0){Ju(y,this);return}this.realloc(4),this.buf[this.pos++]=y&127|(y>127?128:0),!(y<=127)&&(this.buf[this.pos++]=(y>>>=7)&127|(y>127?128:0),!(y<=127)&&(this.buf[this.pos++]=(y>>>=7)&127|(y>127?128:0),!(y<=127)&&(this.buf[this.pos++]=y>>>7&127)))},writeSVarint:function(y){this.writeVarint(y<0?-y*2-1:y*2)},writeBoolean:function(y){this.writeVarint(!!y)},writeString:function(y){y=String(y),this.realloc(y.length*4),this.pos++;var _=this.pos;this.pos=pc(this.buf,y,this.pos);var I=this.pos-_;I>=128&&Qv(_,I,this),this.pos=_-1,this.writeVarint(I),this.pos+=I},writeFloat:function(y){this.realloc(4),Vo.write(this.buf,y,this.pos,!0,23,4),this.pos+=4},writeDouble:function(y){this.realloc(8),Vo.write(this.buf,y,this.pos,!0,52,8),this.pos+=8},writeBytes:function(y){var _=y.length;this.writeVarint(_),this.realloc(_);for(var I=0;I<_;I++)this.buf[this.pos++]=y[I]},writeRawMessage:function(y,_){this.pos++;var I=this.pos;y(_,this);var V=this.pos-I;V>=128&&Qv(I,V,this),this.pos=I-1,this.writeVarint(V),this.pos+=V},writeMessage:function(y,_,I){this.writeTag(y,la.Bytes),this.writeRawMessage(_,I)},writePackedVarint:function(y,_){_.length&&this.writeMessage(y,ud,_)},writePackedSVarint:function(y,_){_.length&&this.writeMessage(y,Ch,_)},writePackedBoolean:function(y,_){_.length&&this.writeMessage(y,Hd,_)},writePackedFloat:function(y,_){_.length&&this.writeMessage(y,Vd,_)},writePackedDouble:function(y,_){_.length&&this.writeMessage(y,Gd,_)},writePackedFixed32:function(y,_){_.length&&this.writeMessage(y,Af,_)},writePackedSFixed32:function(y,_){_.length&&this.writeMessage(y,Lh,_)},writePackedFixed64:function(y,_){_.length&&this.writeMessage(y,Ed,_)},writePackedSFixed64:function(y,_){_.length&&this.writeMessage(y,cd,_)},writeBytesField:function(y,_){this.writeTag(y,la.Bytes),this.writeBytes(_)},writeFixed32Field:function(y,_){this.writeTag(y,la.Fixed32),this.writeFixed32(_)},writeSFixed32Field:function(y,_){this.writeTag(y,la.Fixed32),this.writeSFixed32(_)},writeFixed64Field:function(y,_){this.writeTag(y,la.Fixed64),this.writeFixed64(_)},writeSFixed64Field:function(y,_){this.writeTag(y,la.Fixed64),this.writeSFixed64(_)},writeVarintField:function(y,_){this.writeTag(y,la.Varint),this.writeVarint(_)},writeSVarintField:function(y,_){this.writeTag(y,la.Varint),this.writeSVarint(_)},writeStringField:function(y,_){this.writeTag(y,la.Bytes),this.writeString(_)},writeFloatField:function(y,_){this.writeTag(y,la.Fixed32),this.writeFloat(_)},writeDoubleField:function(y,_){this.writeTag(y,la.Fixed64),this.writeDouble(_)},writeBooleanField:function(y,_){this.writeVarintField(y,!!_)}};function Ro(y,_,I){var V=I.buf,$,ae;if(ae=V[I.pos++],$=(ae&112)>>4,ae<128||(ae=V[I.pos++],$|=(ae&127)<<3,ae<128)||(ae=V[I.pos++],$|=(ae&127)<<10,ae<128)||(ae=V[I.pos++],$|=(ae&127)<<17,ae<128)||(ae=V[I.pos++],$|=(ae&127)<<24,ae<128)||(ae=V[I.pos++],$|=(ae&1)<<31,ae<128))return $o(y,$,_);throw new Error("Expected varint not more than 10 bytes")}function uo(y){return y.type===la.Bytes?y.readVarint()+y.pos:y.pos+1}function $o(y,_,I){return I?_*4294967296+(y>>>0):(_>>>0)*4294967296+(y>>>0)}function Ju(y,_){var I,V;if(y>=0?(I=y%4294967296|0,V=y/4294967296|0):(I=~(-y%4294967296),V=~(-y/4294967296),I^4294967295?I=I+1|0:(I=0,V=V+1|0)),y>=18446744073709552e3||y<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");_.realloc(10),Ou(I,V,_),kh(V,_)}function Ou(y,_,I){I.buf[I.pos++]=y&127|128,y>>>=7,I.buf[I.pos++]=y&127|128,y>>>=7,I.buf[I.pos++]=y&127|128,y>>>=7,I.buf[I.pos++]=y&127|128,y>>>=7,I.buf[I.pos]=y&127}function kh(y,_){var I=(y&7)<<4;_.buf[_.pos++]|=I|((y>>>=3)?128:0),y&&(_.buf[_.pos++]=y&127|((y>>>=7)?128:0),y&&(_.buf[_.pos++]=y&127|((y>>>=7)?128:0),y&&(_.buf[_.pos++]=y&127|((y>>>=7)?128:0),y&&(_.buf[_.pos++]=y&127|((y>>>=7)?128:0),y&&(_.buf[_.pos++]=y&127)))))}function Qv(y,_,I){var V=_<=16383?1:_<=2097151?2:_<=268435455?3:Math.floor(Math.log(_)/(Math.LN2*7));I.realloc(V);for(var $=I.pos-1;$>=y;$--)I.buf[$+V]=I.buf[$]}function ud(y,_){for(var I=0;I>>8,y[I+2]=_>>>16,y[I+3]=_>>>24}function Fv(y,_){return(y[_]|y[_+1]<<8|y[_+2]<<16)+(y[_+3]<<24)}function lv(y,_,I){for(var V="",$=_;$239?4:ae>223?3:ae>191?2:1;if($+Fe>I)break;var it,yt,Lt;Fe===1?ae<128&&(he=ae):Fe===2?(it=y[$+1],(it&192)===128&&(he=(ae&31)<<6|it&63,he<=127&&(he=null))):Fe===3?(it=y[$+1],yt=y[$+2],(it&192)===128&&(yt&192)===128&&(he=(ae&15)<<12|(it&63)<<6|yt&63,(he<=2047||he>=55296&&he<=57343)&&(he=null))):Fe===4&&(it=y[$+1],yt=y[$+2],Lt=y[$+3],(it&192)===128&&(yt&192)===128&&(Lt&192)===128&&(he=(ae&15)<<18|(it&63)<<12|(yt&63)<<6|Lt&63,(he<=65535||he>=1114112)&&(he=null))),he===null?(he=65533,Fe=1):he>65535&&(he-=65536,V+=String.fromCharCode(he>>>10&1023|55296),he=56320|he&1023),V+=String.fromCharCode(he),$+=Fe}return V}function ru(y,_,I){return Wn.decode(y.subarray(_,I))}function pc(y,_,I){for(var V=0,$,ae;V<_.length;V++){if($=_.charCodeAt(V),$>55295&&$<57344)if(ae)if($<56320){y[I++]=239,y[I++]=191,y[I++]=189,ae=$;continue}else $=ae-55296<<10|$-56320|65536,ae=null;else{$>56319||V+1===_.length?(y[I++]=239,y[I++]=191,y[I++]=189):ae=$;continue}else ae&&(y[I++]=239,y[I++]=191,y[I++]=189,ae=null);$<128?y[I++]=$:($<2048?y[I++]=$>>6|192:($<65536?y[I++]=$>>12|224:(y[I++]=$>>18|240,y[I++]=$>>12&63|128),y[I++]=$>>6&63|128),y[I++]=$&63|128)}return I}var $u=3;function zv(y,_,I){y===1&&I.readMessage(ff,_)}function ff(y,_,I){if(y===3){var V=I.readMessage(O1,{}),$=V.id,ae=V.bitmap,he=V.width,Fe=V.height,it=V.left,yt=V.top,Lt=V.advance;_.push({id:$,bitmap:new Dv({width:he+2*$u,height:Fe+2*$u},ae),metrics:{width:he,height:Fe,left:it,top:yt,advance:Lt}})}}function O1(y,_,I){y===1?_.id=I.readVarint():y===2?_.bitmap=I.readBytes():y===3?_.width=I.readVarint():y===4?_.height=I.readVarint():y===5?_.left=I.readSVarint():y===6?_.top=I.readSVarint():y===7&&(_.advance=I.readVarint())}function p0(y){return new Xa(y).readFields(zv,[])}var Gp=$u;function ep(y){for(var _=0,I=0,V=0,$=y;V<$.length;V+=1){var ae=$[V];_+=ae.w*ae.h,I=Math.max(I,ae.w)}y.sort(function(Hi,wi){return wi.h-Hi.h});for(var he=Math.max(Math.ceil(Math.sqrt(_/.95)),I),Fe=[{x:0,y:0,w:he,h:1/0}],it=0,yt=0,Lt=0,sr=y;Lt=0;hr--){var Rr=Fe[hr];if(!(gr.w>Rr.w||gr.h>Rr.h)){if(gr.x=Rr.x,gr.y=Rr.y,yt=Math.max(yt,gr.y+gr.h),it=Math.max(it,gr.x+gr.w),gr.w===Rr.w&&gr.h===Rr.h){var ni=Fe.pop();hr=0&&$>=_&&m0[this.text.charCodeAt($)];$--)V--;this.text=this.text.substring(_,V),this.sectionIndex=this.sectionIndex.slice(_,V)},Kh.prototype.substring=function(_,I){var V=new Kh;return V.text=this.text.substring(_,I),V.sectionIndex=this.sectionIndex.slice(_,I),V.sections=this.sections,V},Kh.prototype.toString=function(){return this.text},Kh.prototype.getMaxScale=function(){var _=this;return this.sectionIndex.reduce(function(I,V){return Math.max(I,_.sections[V].scale)},0)},Kh.prototype.addTextSection=function(_,I){this.text+=_.text,this.sections.push(_y.forText(_.scale,_.fontStack||I));for(var V=this.sections.length-1,$=0;$<_.text.length;++$)this.sectionIndex.push(V)},Kh.prototype.addImageSection=function(_){var I=_.image?_.image.name:"";if(I.length===0){re("Can't add FormattedSection with an empty image.");return}var V=this.getNextImageSectionCharCode();if(!V){re("Reached maximum number of images "+(g0-Qw+2));return}this.text+=String.fromCharCode(V),this.sections.push(_y.forImage(I)),this.sectionIndex.push(this.sections.length-1)},Kh.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?this.imageSectionID>=g0?null:++this.imageSectionID:(this.imageSectionID=Qw,this.imageSectionID)};function cq(y,_){for(var I=[],V=y.text,$=0,ae=0,he=_;ae=0,Lt=0,sr=0;sr0&&ch>eo&&(eo=ch)}else{var Cl=I[Za.fontStack],yl=Cl&&Cl[to];if(yl&&yl.rect)jo=yl.rect,_s=yl.metrics;else{var Qu=_[Za.fontStack],gc=Qu&&Qu[to];if(!gc)continue;_s=gc.metrics}ao=(In-Za.scale)*Tn}kl?(y.verticalizable=!0,ha.push({glyph:to,imageName:El,x:gr,y:hr+ao,vertical:kl,scale:Za.scale,fontStack:Za.fontStack,sectionIndex:Jo,metrics:_s,rect:jo}),gr+=Iu*Za.scale+yt):(ha.push({glyph:to,imageName:El,x:gr,y:hr+ao,vertical:kl,scale:Za.scale,fontStack:Za.fontStack,sectionIndex:Jo,metrics:_s,rect:jo}),gr+=_s.advance*Za.scale+yt)}if(ha.length!==0){var Wd=gr-yt;Rr=Math.max(Wd,Rr),vq(ha,0,ha.length-1,Hi,eo)}gr=0;var Xd=ae*In+eo;ga.lineOffset=Math.max(eo,Xn),hr+=Xd,ni=Math.max(Xd,ni),++wi}var Qh=hr-B1,fv=CS(he),hv=fv.horizontalAlign,Ph=fv.verticalAlign;kd(y.positionedLines,Hi,hv,Ph,Rr,ni,ae,Qh,$.length),y.top+=-Ph*Qh,y.bottom=y.top+Qh,y.left+=-hv*Rr,y.right=y.left+Rr}function vq(y,_,I,V,$){if(!(!V&&!$))for(var ae=y[I],he=ae.metrics.advance*ae.scale,Fe=(y[I].x+he)*V,it=_;it<=I;it++)y[it].x-=Fe,y[it].y+=$}function kd(y,_,I,V,$,ae,he,Fe,it){var yt=(_-I)*$,Lt=0;ae!==he?Lt=-Fe*V-B1:Lt=(-V*it+.5)*he;for(var sr=0,gr=y;sr-I/2;){if(he--,he<0)return!1;Fe-=y[he].dist(ae),ae=y[he]}Fe+=y[he].dist(y[he+1]),he++;for(var it=[],yt=0;FeV;)yt-=it.shift().angleDelta;if(yt>$)return!1;he++,Fe+=sr.dist(gr)}return!0}function VQ(y){for(var _=0,I=0;Iyt){var Rr=(yt-it)/hr,ni=nl(sr.x,gr.x,Rr),Hi=nl(sr.y,gr.y,Rr),wi=new jd(ni,Hi,gr.angleTo(sr),Lt);return wi._round(),!he||UQ(y,wi,Fe,he,_)?wi:void 0}it+=hr}}function qet(y,_,I,V,$,ae,he,Fe,it){var yt=GQ(V,ae,he),Lt=HQ(V,$),sr=Lt*he,gr=y[0].x===0||y[0].x===it||y[0].y===0||y[0].y===it;_-sr<_/4&&(_=sr+_/4);var hr=ae*2,Rr=gr?_/2*Fe%_:(Lt/2+hr)*he*Fe%_;return jQ(y,Rr,_,yt,I,sr,gr,!1,it)}function jQ(y,_,I,V,$,ae,he,Fe,it){for(var yt=ae/2,Lt=VQ(y),sr=0,gr=_-I,hr=[],Rr=0;Rr=0&&xn=0&&In=0&&gr+yt<=Lt){var Xn=new jd(xn,In,bn,Rr);Xn._round(),(!V||UQ(y,Xn,ae,V,$))&&hr.push(Xn)}}sr+=wi}return!Fe&&!hr.length&&!he&&(hr=jQ(y,sr/2,I,V,$,ae,he,!0,it)),hr}function WQ(y,_,I,V,$){for(var ae=[],he=0;he=V&&sr.x>=V)&&(Lt.x>=V?Lt=new u(V,Lt.y+(sr.y-Lt.y)*((V-Lt.x)/(sr.x-Lt.x)))._round():sr.x>=V&&(sr=new u(V,Lt.y+(sr.y-Lt.y)*((V-Lt.x)/(sr.x-Lt.x)))._round()),!(Lt.y>=$&&sr.y>=$)&&(Lt.y>=$?Lt=new u(Lt.x+(sr.x-Lt.x)*(($-Lt.y)/(sr.y-Lt.y)),$)._round():sr.y>=$&&(sr=new u(Lt.x+(sr.x-Lt.x)*(($-Lt.y)/(sr.y-Lt.y)),$)._round()),(!it||!Lt.equals(it[it.length-1]))&&(it=[Lt],ae.push(it)),it.push(sr)))))}return ae}var r3=Gc;function XQ(y,_,I,V){var $=[],ae=y.image,he=ae.pixelRatio,Fe=ae.paddedRect.w-2*r3,it=ae.paddedRect.h-2*r3,yt=y.right-y.left,Lt=y.bottom-y.top,sr=ae.stretchX||[[0,Fe]],gr=ae.stretchY||[[0,it]],hr=function(Cl,yl){return Cl+yl[1]-yl[0]},Rr=sr.reduce(hr,0),ni=gr.reduce(hr,0),Hi=Fe-Rr,wi=it-ni,bn=0,rn=Rr,xn=0,In=ni,Xn=0,ga=Hi,ha=0,eo=wi;if(ae.content&&V){var za=ae.content;bn=n6(sr,0,za[0]),xn=n6(gr,0,za[1]),rn=n6(sr,za[0],za[2]),In=n6(gr,za[1],za[3]),Xn=za[0]-bn,ha=za[1]-xn,ga=za[2]-za[0]-rn,eo=za[3]-za[1]-In}var Za=function(Cl,yl,Qu,gc){var Sf=a6(Cl.stretch-bn,rn,yt,y.left),Ff=o6(Cl.fixed-Xn,ga,Cl.stretch,Rr),$h=a6(yl.stretch-xn,In,Lt,y.top),ch=o6(yl.fixed-ha,eo,yl.stretch,ni),Wd=a6(Qu.stretch-bn,rn,yt,y.left),Xd=o6(Qu.fixed-Xn,ga,Qu.stretch,Rr),Qh=a6(gc.stretch-xn,In,Lt,y.top),fv=o6(gc.fixed-ha,eo,gc.stretch,ni),hv=new u(Sf,$h),Ph=new u(Wd,$h),dv=new u(Wd,Qh),bp=new u(Sf,Qh),wy=new u(Ff/he,ch/he),V1=new u(Xd/he,fv/he),G1=_*Math.PI/180;if(G1){var H1=Math.sin(G1),c3=Math.cos(G1),y0=[c3,-H1,H1,c3];hv._matMult(y0),Ph._matMult(y0),bp._matMult(y0),dv._matMult(y0)}var h6=Cl.stretch+Cl.fixed,wq=Qu.stretch+Qu.fixed,d6=yl.stretch+yl.fixed,Tq=gc.stretch+gc.fixed,Hp={x:ae.paddedRect.x+r3+h6,y:ae.paddedRect.y+r3+d6,w:wq-h6,h:Tq-d6},f3=ga/he/yt,v6=eo/he/Lt;return{tl:hv,tr:Ph,bl:bp,br:dv,tex:Hp,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:wy,pixelOffsetBR:V1,minFontScaleX:f3,minFontScaleY:v6,isSDF:I}};if(!V||!ae.stretchX&&!ae.stretchY)$.push(Za({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:Fe+1},{fixed:0,stretch:it+1}));else for(var Jo=ZQ(sr,Hi,Rr),to=ZQ(gr,wi,ni),ao=0;ao0&&(Rr=Math.max(10,Rr),this.circleDiameter=Rr)}else{var ni=he.top*Fe-it,Hi=he.bottom*Fe+it,wi=he.left*Fe-it,bn=he.right*Fe+it,rn=he.collisionPadding;if(rn&&(wi-=rn[0]*Fe,ni-=rn[1]*Fe,bn+=rn[2]*Fe,Hi+=rn[3]*Fe),Lt){var xn=new u(wi,ni),In=new u(bn,ni),Xn=new u(wi,Hi),ga=new u(bn,Hi),ha=Lt*Math.PI/180;xn._rotate(ha),In._rotate(ha),Xn._rotate(ha),ga._rotate(ha),wi=Math.min(xn.x,In.x,Xn.x,ga.x),bn=Math.max(xn.x,In.x,Xn.x,ga.x),ni=Math.min(xn.y,In.y,Xn.y,ga.y),Hi=Math.max(xn.y,In.y,Xn.y,ga.y)}_.emplaceBack(I.x,I.y,wi,ni,bn,Hi,V,$,ae)}this.boxEndIndex=_.length},i3=function(_,I){if(_===void 0&&(_=[]),I===void 0&&(I=Bet),this.data=_,this.length=this.data.length,this.compare=I,this.length>0)for(var V=(this.length>>1)-1;V>=0;V--)this._down(V)};i3.prototype.push=function(_){this.data.push(_),this.length++,this._up(this.length-1)},i3.prototype.pop=function(){if(this.length!==0){var _=this.data[0],I=this.data.pop();return this.length--,this.length>0&&(this.data[0]=I,this._down(0)),_}},i3.prototype.peek=function(){return this.data[0]},i3.prototype._up=function(_){for(var I=this,V=I.data,$=I.compare,ae=V[_];_>0;){var he=_-1>>1,Fe=V[he];if($(ae,Fe)>=0)break;V[_]=Fe,_=he}V[_]=ae},i3.prototype._down=function(_){for(var I=this,V=I.data,$=I.compare,ae=this.length>>1,he=V[_];_=0)break;V[_]=it,_=Fe}V[_]=he};function Bet(y,_){return y<_?-1:y>_?1:0}function Net(y,_,I){_===void 0&&(_=1),I===void 0&&(I=!1);for(var V=1/0,$=1/0,ae=-1/0,he=-1/0,Fe=y[0],it=0;itae)&&(ae=yt.x),(!it||yt.y>he)&&(he=yt.y)}var Lt=ae-V,sr=he-$,gr=Math.min(Lt,sr),hr=gr/2,Rr=new i3([],Uet);if(gr===0)return new u(V,$);for(var ni=V;niwi.d||!wi.d)&&(wi=rn,I&&console.log("found best %d after %d probes",Math.round(1e4*rn.d)/1e4,bn)),!(rn.max-wi.d<=_)&&(hr=rn.h/2,Rr.push(new n3(rn.p.x-hr,rn.p.y-hr,hr,y)),Rr.push(new n3(rn.p.x+hr,rn.p.y-hr,hr,y)),Rr.push(new n3(rn.p.x-hr,rn.p.y+hr,hr,y)),Rr.push(new n3(rn.p.x+hr,rn.p.y+hr,hr,y)),bn+=4)}return I&&(console.log("num probes: "+bn),console.log("best distance: "+wi.d)),wi.p}function Uet(y,_){return _.max-y.max}function n3(y,_,I,V){this.p=new u(y,_),this.h=I,this.d=Vet(this.p,V),this.max=this.d+this.h*Math.SQRT2}function Vet(y,_){for(var I=!1,V=1/0,$=0;$<_.length;$++)for(var ae=_[$],he=0,Fe=ae.length,it=Fe-1;hey.y!=Lt.y>y.y&&y.x<(Lt.x-yt.x)*(y.y-yt.y)/(Lt.y-yt.y)+yt.x&&(I=!I),V=Math.min(V,hg(y,yt,Lt))}return(I?1:-1)*Math.sqrt(V)}function Get(y){for(var _=0,I=0,V=0,$=y[0],ae=0,he=$.length,Fe=he-1;ae=Ei||y0.y<0||y0.y>=Ei||Wet(y,y0,c3,I,V,$,to,y.layers[0],y.collisionBoxArray,_.index,_.sourceLayerIndex,y.index,wi,In,ha,it,rn,Xn,eo,hr,_,ae,yt,Lt,he)};if(za==="line")for(var _s=0,jo=WQ(_.geometry,0,0,Ei,Ei);_s1){var $h=zet(Ff,ga,I.vertical||Rr,V,ni,bn);$h&&ao(Ff,$h)}}else if(_.type==="Polygon")for(var ch=0,Wd=Xw(_.geometry,0);chN1&&re(y.layerIds[0]+': Value for "text-size" is >= '+LS+'. Reduce your "text-size".')):Hi.kind==="composite"&&(wi=[Cd*hr.compositeTextSizes[0].evaluate(he,{},Rr),Cd*hr.compositeTextSizes[1].evaluate(he,{},Rr)],(wi[0]>N1||wi[1]>N1)&&re(y.layerIds[0]+': Value for "text-size" is >= '+LS+'. Reduce your "text-size".')),y.addSymbols(y.text,ni,wi,Fe,ae,he,yt,_,it.lineStartIndex,it.lineLength,gr,Rr);for(var bn=0,rn=Lt;bnN1&&re(y.layerIds[0]+': Value for "icon-size" is >= '+LS+'. Reduce your "icon-size".')):hv.kind==="composite"&&(Ph=[Cd*In.compositeIconSizes[0].evaluate(xn,{},ga),Cd*In.compositeIconSizes[1].evaluate(xn,{},ga)],(Ph[0]>N1||Ph[1]>N1)&&re(y.layerIds[0]+': Value for "icon-size" is >= '+LS+'. Reduce your "icon-size".')),y.addSymbols(y.icon,Qh,Ph,rn,bn,xn,!1,_,za.lineStartIndex,za.lineLength,-1,ga),kl=y.icon.placedSymbolArray.length-1,fv&&(jo=fv.length*4,y.addSymbols(y.icon,fv,Ph,rn,bn,xn,uv.vertical,_,za.lineStartIndex,za.lineLength,-1,ga),Cl=y.icon.placedSymbolArray.length-1)}for(var dv in V.horizontal){var bp=V.horizontal[dv];if(!Za){Qu=K(bp.text);var wy=Fe.layout.get("text-rotate").evaluate(xn,{},ga);Za=new s6(it,_,yt,Lt,sr,bp,gr,hr,Rr,wy)}var V1=bp.positionedLines.length===1;if(El+=KQ(y,_,bp,ae,Fe,Rr,xn,ni,za,V.vertical?uv.horizontal:uv.horizontalOnly,V1?Object.keys(V.horizontal):[dv],yl,kl,In,ga),V1)break}V.vertical&&(Iu+=KQ(y,_,V.vertical,ae,Fe,Rr,xn,ni,za,uv.vertical,["vertical"],yl,Cl,In,ga));var G1=Za?Za.boxStartIndex:y.collisionBoxArray.length,H1=Za?Za.boxEndIndex:y.collisionBoxArray.length,c3=to?to.boxStartIndex:y.collisionBoxArray.length,y0=to?to.boxEndIndex:y.collisionBoxArray.length,h6=Jo?Jo.boxStartIndex:y.collisionBoxArray.length,wq=Jo?Jo.boxEndIndex:y.collisionBoxArray.length,d6=ao?ao.boxStartIndex:y.collisionBoxArray.length,Tq=ao?ao.boxEndIndex:y.collisionBoxArray.length,Hp=-1,f3=function(RS,dee){return RS&&RS.circleDiameter?Math.max(RS.circleDiameter,dee):dee};Hp=f3(Za,Hp),Hp=f3(to,Hp),Hp=f3(Jo,Hp),Hp=f3(ao,Hp);var v6=Hp>-1?1:0;v6&&(Hp*=ha/Tn),y.glyphOffsetArray.length>=Pu.MAX_GLYPHS&&re("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),xn.sortKey!==void 0&&y.addToSortKeyRanges(y.symbolInstances.length,xn.sortKey),y.symbolInstances.emplaceBack(_.x,_.y,yl.right>=0?yl.right:-1,yl.center>=0?yl.center:-1,yl.left>=0?yl.left:-1,yl.vertical||-1,kl,Cl,Qu,G1,H1,c3,y0,h6,wq,d6,Tq,yt,El,Iu,_s,jo,v6,0,gr,gc,Sf,Hp)}function Xet(y,_,I,V){var $=y.compareText;if(!(_ in $))$[_]=[];else for(var ae=$[_],he=ae.length-1;he>=0;he--)if(V.dist(ae[he])0)&&(he.value.kind!=="constant"||he.value.value.length>0),Lt=it.value.kind!=="constant"||!!it.value.value||Object.keys(it.parameters).length>0,sr=ae.get("symbol-sort-key");if(this.features=[],!(!yt&&!Lt)){for(var gr=I.iconDependencies,hr=I.glyphDependencies,Rr=I.availableImages,ni=new Un(this.zoom),Hi=0,wi=_;Hi=0;for(var Iu=0,kl=eo.sections;Iu=0;it--)he[it]={x:I[it].x,y:I[it].y,tileUnitDistanceFromAnchor:ae},it>0&&(ae+=I[it-1].dist(I[it]));for(var yt=0;yt0},Pu.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Pu.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Pu.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Pu.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Pu.prototype.addIndicesForPlacedSymbol=function(_,I){for(var V=_.placedSymbolArray.get(I),$=V.vertexStartIndex+V.numGlyphs*4,ae=V.vertexStartIndex;ae<$;ae+=4)_.indexArray.emplaceBack(ae,ae+1,ae+2),_.indexArray.emplaceBack(ae+1,ae+2,ae+3)},Pu.prototype.getSortedSymbolIndexes=function(_){if(this.sortedAngle===_&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;for(var I=Math.sin(_),V=Math.cos(_),$=[],ae=[],he=[],Fe=0;Fe1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(_),this.sortedAngle=_,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var V=0,$=this.symbolInstanceIndexes;V<$.length;V+=1){var ae=$[V],he=this.symbolInstances.get(ae);this.featureSortOrder.push(he.featureIndex),[he.rightJustifiedTextSymbolIndex,he.centerJustifiedTextSymbolIndex,he.leftJustifiedTextSymbolIndex].forEach(function(Fe,it,yt){Fe>=0&&yt.indexOf(Fe)===it&&I.addIndicesForPlacedSymbol(I.text,Fe)}),he.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,he.verticalPlacedTextSymbolIndex),he.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,he.placedIconSymbolIndex),he.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,he.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},X("SymbolBucket",Pu,{omit:["layers","collisionBoxArray","features","compareText"]}),Pu.MAX_GLYPHS=65535,Pu.addDynamicAttributes=mq;function Jet(y,_){return _.replace(/{([^{}]+)}/g,function(I,V){return V in y?String(y[V]):""})}var $et=new Or({"symbol-placement":new Me(Rn.layout_symbol["symbol-placement"]),"symbol-spacing":new Me(Rn.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Me(Rn.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new bt(Rn.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Me(Rn.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Me(Rn.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Me(Rn.layout_symbol["icon-ignore-placement"]),"icon-optional":new Me(Rn.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Me(Rn.layout_symbol["icon-rotation-alignment"]),"icon-size":new bt(Rn.layout_symbol["icon-size"]),"icon-text-fit":new Me(Rn.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Me(Rn.layout_symbol["icon-text-fit-padding"]),"icon-image":new bt(Rn.layout_symbol["icon-image"]),"icon-rotate":new bt(Rn.layout_symbol["icon-rotate"]),"icon-padding":new Me(Rn.layout_symbol["icon-padding"]),"icon-keep-upright":new Me(Rn.layout_symbol["icon-keep-upright"]),"icon-offset":new bt(Rn.layout_symbol["icon-offset"]),"icon-anchor":new bt(Rn.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Me(Rn.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Me(Rn.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Me(Rn.layout_symbol["text-rotation-alignment"]),"text-field":new bt(Rn.layout_symbol["text-field"]),"text-font":new bt(Rn.layout_symbol["text-font"]),"text-size":new bt(Rn.layout_symbol["text-size"]),"text-max-width":new bt(Rn.layout_symbol["text-max-width"]),"text-line-height":new Me(Rn.layout_symbol["text-line-height"]),"text-letter-spacing":new bt(Rn.layout_symbol["text-letter-spacing"]),"text-justify":new bt(Rn.layout_symbol["text-justify"]),"text-radial-offset":new bt(Rn.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Me(Rn.layout_symbol["text-variable-anchor"]),"text-anchor":new bt(Rn.layout_symbol["text-anchor"]),"text-max-angle":new Me(Rn.layout_symbol["text-max-angle"]),"text-writing-mode":new Me(Rn.layout_symbol["text-writing-mode"]),"text-rotate":new bt(Rn.layout_symbol["text-rotate"]),"text-padding":new Me(Rn.layout_symbol["text-padding"]),"text-keep-upright":new Me(Rn.layout_symbol["text-keep-upright"]),"text-transform":new bt(Rn.layout_symbol["text-transform"]),"text-offset":new bt(Rn.layout_symbol["text-offset"]),"text-allow-overlap":new Me(Rn.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Me(Rn.layout_symbol["text-ignore-placement"]),"text-optional":new Me(Rn.layout_symbol["text-optional"])}),Qet=new Or({"icon-opacity":new bt(Rn.paint_symbol["icon-opacity"]),"icon-color":new bt(Rn.paint_symbol["icon-color"]),"icon-halo-color":new bt(Rn.paint_symbol["icon-halo-color"]),"icon-halo-width":new bt(Rn.paint_symbol["icon-halo-width"]),"icon-halo-blur":new bt(Rn.paint_symbol["icon-halo-blur"]),"icon-translate":new Me(Rn.paint_symbol["icon-translate"]),"icon-translate-anchor":new Me(Rn.paint_symbol["icon-translate-anchor"]),"text-opacity":new bt(Rn.paint_symbol["text-opacity"]),"text-color":new bt(Rn.paint_symbol["text-color"],{runtimeType:Ol,getOverride:function(y){return y.textColor},hasOverride:function(y){return!!y.textColor}}),"text-halo-color":new bt(Rn.paint_symbol["text-halo-color"]),"text-halo-width":new bt(Rn.paint_symbol["text-halo-width"]),"text-halo-blur":new bt(Rn.paint_symbol["text-halo-blur"]),"text-translate":new Me(Rn.paint_symbol["text-translate"]),"text-translate-anchor":new Me(Rn.paint_symbol["text-translate-anchor"])}),yq={paint:Qet,layout:$et},s3=function(_){this.type=_.property.overrides?_.property.overrides.runtimeType:ac,this.defaultValue=_};s3.prototype.evaluate=function(_){if(_.formattedSection){var I=this.defaultValue.property.overrides;if(I&&I.hasOverride(_.formattedSection))return I.getOverride(_.formattedSection)}return _.feature&&_.featureState?this.defaultValue.evaluate(_.feature,_.featureState):this.defaultValue.property.specification.default},s3.prototype.eachChild=function(_){if(!this.defaultValue.isConstant()){var I=this.defaultValue.value;_(I._styleExpression.expression)}},s3.prototype.outputDefined=function(){return!1},s3.prototype.serialize=function(){return null},X("FormatSectionOverride",s3,{omit:["defaultValue"]});var ett=function(y){function _(I){y.call(this,I,yq)}return y&&(_.__proto__=y),_.prototype=Object.create(y&&y.prototype),_.prototype.constructor=_,_.prototype.recalculate=function(V,$){if(y.prototype.recalculate.call(this,V,$),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){var ae=this.layout.get("text-writing-mode");if(ae){for(var he=[],Fe=0,it=ae;Fe",targetMapId:$,sourceMapId:he.mapId})}}},l3.prototype.receive=function(_){var I=_.data,V=I.id;if(V&&!(I.targetMapId&&this.mapId!==I.targetMapId))if(I.type===""){delete this.tasks[V];var $=this.cancelCallbacks[V];delete this.cancelCallbacks[V],$&&$()}else Ce()||I.mustQueue?(this.tasks[V]=I,this.taskQueue.push(V),this.invoker.trigger()):this.processTask(V,I)},l3.prototype.process=function(){if(this.taskQueue.length){var _=this.taskQueue.shift(),I=this.tasks[_];delete this.tasks[_],this.taskQueue.length&&this.invoker.trigger(),I&&this.processTask(_,I)}},l3.prototype.processTask=function(_,I){var V=this;if(I.type===""){var $=this.callbacks[_];delete this.callbacks[_],$&&(I.error?$(Ye(I.error)):$(null,Ye(I.data)))}else{var ae=!1,he=Se(this.globalScope)?void 0:[],Fe=I.hasCallback?function(gr,hr){ae=!0,delete V.cancelCallbacks[_],V.target.postMessage({id:_,type:"",sourceMapId:V.mapId,error:gr?Ve(gr):null,data:Ve(hr,he)},he)}:function(gr){ae=!0},it=null,yt=Ye(I.data);if(this.parent[I.type])it=this.parent[I.type](I.sourceMapId,yt,Fe);else if(this.parent.getWorkerSource){var Lt=I.type.split("."),sr=this.parent.getWorkerSource(I.sourceMapId,Lt[0],yt.source);it=sr[Lt[1]](yt,Fe)}else Fe(new Error("Could not find function "+I.type));!ae&&it&&it.cancel&&(this.cancelCallbacks[_]=it.cancel)}},l3.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function ftt(y,_,I){_=Math.pow(2,I)-_-1;var V=ree(y*256,_*256,I),$=ree((y+1)*256,(_+1)*256,I);return V[0]+","+V[1]+","+$[0]+","+$[1]}function ree(y,_,I){var V=2*Math.PI*6378137/256/Math.pow(2,I),$=y*V-2*Math.PI*6378137/2,ae=_*V-2*Math.PI*6378137/2;return[$,ae]}var lh=function(_,I){_&&(I?this.setSouthWest(_).setNorthEast(I):_.length===4?this.setSouthWest([_[0],_[1]]).setNorthEast([_[2],_[3]]):this.setSouthWest(_[0]).setNorthEast(_[1]))};lh.prototype.setNorthEast=function(_){return this._ne=_ instanceof Hc?new Hc(_.lng,_.lat):Hc.convert(_),this},lh.prototype.setSouthWest=function(_){return this._sw=_ instanceof Hc?new Hc(_.lng,_.lat):Hc.convert(_),this},lh.prototype.extend=function(_){var I=this._sw,V=this._ne,$,ae;if(_ instanceof Hc)$=_,ae=_;else if(_ instanceof lh){if($=_._sw,ae=_._ne,!$||!ae)return this}else{if(Array.isArray(_))if(_.length===4||_.every(Array.isArray)){var he=_;return this.extend(lh.convert(he))}else{var Fe=_;return this.extend(Hc.convert(Fe))}return this}return!I&&!V?(this._sw=new Hc($.lng,$.lat),this._ne=new Hc(ae.lng,ae.lat)):(I.lng=Math.min($.lng,I.lng),I.lat=Math.min($.lat,I.lat),V.lng=Math.max(ae.lng,V.lng),V.lat=Math.max(ae.lat,V.lat)),this},lh.prototype.getCenter=function(){return new Hc((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},lh.prototype.getSouthWest=function(){return this._sw},lh.prototype.getNorthEast=function(){return this._ne},lh.prototype.getNorthWest=function(){return new Hc(this.getWest(),this.getNorth())},lh.prototype.getSouthEast=function(){return new Hc(this.getEast(),this.getSouth())},lh.prototype.getWest=function(){return this._sw.lng},lh.prototype.getSouth=function(){return this._sw.lat},lh.prototype.getEast=function(){return this._ne.lng},lh.prototype.getNorth=function(){return this._ne.lat},lh.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},lh.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},lh.prototype.isEmpty=function(){return!(this._sw&&this._ne)},lh.prototype.contains=function(_){var I=Hc.convert(_),V=I.lng,$=I.lat,ae=this._sw.lat<=$&&$<=this._ne.lat,he=this._sw.lng<=V&&V<=this._ne.lng;return this._sw.lng>this._ne.lng&&(he=this._sw.lng>=V&&V>=this._ne.lng),ae&&he},lh.convert=function(_){return!_||_ instanceof lh?_:new lh(_)};var iee=63710088e-1,Hc=function(_,I){if(isNaN(_)||isNaN(I))throw new Error("Invalid LngLat object: ("+_+", "+I+")");if(this.lng=+_,this.lat=+I,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Hc.prototype.wrap=function(){return new Hc(k(this.lng,-180,180),this.lat)},Hc.prototype.toArray=function(){return[this.lng,this.lat]},Hc.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Hc.prototype.distanceTo=function(_){var I=Math.PI/180,V=this.lat*I,$=_.lat*I,ae=Math.sin(V)*Math.sin($)+Math.cos(V)*Math.cos($)*Math.cos((_.lng-this.lng)*I),he=iee*Math.acos(Math.min(ae,1));return he},Hc.prototype.toBounds=function(_){_===void 0&&(_=0);var I=40075017,V=360*_/I,$=V/Math.cos(Math.PI/180*this.lat);return new lh(new Hc(this.lng-$,this.lat-V),new Hc(this.lng+$,this.lat+V))},Hc.convert=function(_){if(_ instanceof Hc)return _;if(Array.isArray(_)&&(_.length===2||_.length===3))return new Hc(Number(_[0]),Number(_[1]));if(!Array.isArray(_)&&typeof _=="object"&&_!==null)return new Hc(Number("lng"in _?_.lng:_.lon),Number(_.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var nee=2*Math.PI*iee;function aee(y){return nee*Math.cos(y*Math.PI/180)}function oee(y){return(180+y)/360}function see(y){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+y*Math.PI/360)))/360}function lee(y,_){return y/aee(_)}function htt(y){return y*360-180}function xq(y){var _=180-y*360;return 360/Math.PI*Math.atan(Math.exp(_*Math.PI/180))-90}function dtt(y,_){return y*aee(xq(_))}function vtt(y){return 1/Math.cos(y*Math.PI/180)}var db=function(_,I,V){V===void 0&&(V=0),this.x=+_,this.y=+I,this.z=+V};db.fromLngLat=function(_,I){I===void 0&&(I=0);var V=Hc.convert(_);return new db(oee(V.lng),see(V.lat),lee(I,V.lat))},db.prototype.toLngLat=function(){return new Hc(htt(this.x),xq(this.y))},db.prototype.toAltitude=function(){return dtt(this.z,this.y)},db.prototype.meterInMercatorCoordinateUnits=function(){return 1/nee*vtt(xq(this.y))};var vb=function(_,I,V){this.z=_,this.x=I,this.y=V,this.key=IS(0,_,_,I,V)};vb.prototype.equals=function(_){return this.z===_.z&&this.x===_.x&&this.y===_.y},vb.prototype.url=function(_,I){var V=ftt(this.x,this.y,this.z),$=ptt(this.z,this.x,this.y);return _[(this.x+this.y)%_.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String(I==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",$).replace("{bbox-epsg-3857}",V)},vb.prototype.getTilePoint=function(_){var I=Math.pow(2,this.z);return new u((_.x*I-this.x)*Ei,(_.y*I-this.y)*Ei)},vb.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var uee=function(_,I){this.wrap=_,this.canonical=I,this.key=IS(_,I.z,I.z,I.x,I.y)},uh=function(_,I,V,$,ae){this.overscaledZ=_,this.wrap=I,this.canonical=new vb(V,+$,+ae),this.key=IS(I,_,V,$,ae)};uh.prototype.equals=function(_){return this.overscaledZ===_.overscaledZ&&this.wrap===_.wrap&&this.canonical.equals(_.canonical)},uh.prototype.scaledTo=function(_){var I=this.canonical.z-_;return _>this.canonical.z?new uh(_,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new uh(_,this.wrap,_,this.canonical.x>>I,this.canonical.y>>I)},uh.prototype.calculateScaledKey=function(_,I){var V=this.canonical.z-_;return _>this.canonical.z?IS(this.wrap*+I,_,this.canonical.z,this.canonical.x,this.canonical.y):IS(this.wrap*+I,_,_,this.canonical.x>>V,this.canonical.y>>V)},uh.prototype.isChildOf=function(_){if(_.wrap!==this.wrap)return!1;var I=this.canonical.z-_.canonical.z;return _.overscaledZ===0||_.overscaledZ>I&&_.canonical.y===this.canonical.y>>I},uh.prototype.children=function(_){if(this.overscaledZ>=_)return[new uh(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var I=this.canonical.z+1,V=this.canonical.x*2,$=this.canonical.y*2;return[new uh(I,this.wrap,I,V,$),new uh(I,this.wrap,I,V+1,$),new uh(I,this.wrap,I,V,$+1),new uh(I,this.wrap,I,V+1,$+1)]},uh.prototype.isLessThan=function(_){return this.wrap<_.wrap?!0:this.wrap>_.wrap?!1:this.overscaledZ<_.overscaledZ?!0:this.overscaledZ>_.overscaledZ?!1:this.canonical.x<_.canonical.x?!0:this.canonical.x>_.canonical.x?!1:this.canonical.y<_.canonical.y},uh.prototype.wrapped=function(){return new uh(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},uh.prototype.unwrapTo=function(_){return new uh(this.overscaledZ,_,this.canonical.z,this.canonical.x,this.canonical.y)},uh.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},uh.prototype.toUnwrapped=function(){return new uee(this.wrap,this.canonical)},uh.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},uh.prototype.getTilePoint=function(_){return this.canonical.getTilePoint(new db(_.x-this.wrap,_.y))};function IS(y,_,I,V,$){y*=2,y<0&&(y=y*-1-1);var ae=1<0;ae--)$=1<=this.dim+1||I<-1||I>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(I+1)*this.stride+(_+1)},xy.prototype._unpackMapbox=function(_,I,V){return(_*256*256+I*256+V)/10-1e4},xy.prototype._unpackTerrarium=function(_,I,V){return _*256+I+V/256-32768},xy.prototype.getPixels=function(){return new Eh({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},xy.prototype.backfillBorder=function(_,I,V){if(this.dim!==_.dim)throw new Error("dem dimension mismatch");var $=I*this.dim,ae=I*this.dim+this.dim,he=V*this.dim,Fe=V*this.dim+this.dim;switch(I){case-1:$=ae-1;break;case 1:ae=$+1;break}switch(V){case-1:he=Fe-1;break;case 1:Fe=he+1;break}for(var it=-I*this.dim,yt=-V*this.dim,Lt=he;Lt=0&&sr[3]>=0&&it.insert(Fe,sr[0],sr[1],sr[2],sr[3])}},by.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new mg.VectorTile(new Xa(this.rawTileData)).layers,this.sourceLayerCoder=new c6(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},by.prototype.query=function(_,I,V,$){var ae=this;this.loadVTLayers();for(var he=_.params||{},Fe=Ei/_.tileSize/_.scale,it=xe(he.filter),yt=_.queryGeometry,Lt=_.queryPadding*Fe,sr=fee(yt),gr=this.grid.query(sr.minX-Lt,sr.minY-Lt,sr.maxX+Lt,sr.maxY+Lt),hr=fee(_.cameraQueryGeometry),Rr=this.grid3D.query(hr.minX-Lt,hr.minY-Lt,hr.maxX+Lt,hr.maxY+Lt,function(Xn,ga,ha,eo){return mp(_.cameraQueryGeometry,Xn-Lt,ga-Lt,ha+Lt,eo+Lt)}),ni=0,Hi=Rr;ni$)ae=!1;else if(!I)ae=!0;else if(this.expirationTime=Ha.maxzoom)&&Ha.visibility!=="none"){h(jn,this.zoom,ir);var vo=Zi[Ha.id]=Ha.createBucket({index:Ri.bucketLayerIDs.length,layers:jn,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Ba,sourceID:this.source});vo.populate(ua,en,this.tileID.canonical),Ri.bucketLayerIDs.push(jn.map(function(ki){return ki.id}))}}}}var Gn,Ct,Ar,Jr,hi=i.mapObject(en.glyphDependencies,function(ki){return Object.keys(ki).map(Number)});Object.keys(hi).length?wr.send("getGlyphs",{uid:this.uid,stacks:hi},function(ki,_n){Gn||(Gn=ki,Ct=_n,En.call(ti))}):Ct={};var hn=Object.keys(en.iconDependencies);hn.length?wr.send("getImages",{icons:hn,source:this.source,tileID:this.tileID,type:"icons"},function(ki,_n){Gn||(Gn=ki,Ar=_n,En.call(ti))}):Ar={};var Sn=Object.keys(en.patternDependencies);Sn.length?wr.send("getImages",{icons:Sn,source:this.source,tileID:this.tileID,type:"patterns"},function(ki,_n){Gn||(Gn=ki,Jr=_n,En.call(ti))}):Jr={},En.call(this);function En(){if(Gn)return Xr(Gn);if(Ct&&Ar&&Jr){var ki=new c(Ct),_n=new i.ImageAtlas(Ar,Jr);for(var ya in Zi){var ea=Zi[ya];ea instanceof i.SymbolBucket?(h(ea.layers,this.zoom,ir),i.performSymbolLayout(ea,Ct,ki.positions,Ar,_n.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):ea.hasPattern&&(ea instanceof i.LineBucket||ea instanceof i.FillBucket||ea instanceof i.FillExtrusionBucket)&&(h(ea.layers,this.zoom,ir),ea.addFeatures(en,this.tileID.canonical,_n.patternPositions))}this.status="done",Xr(null,{buckets:i.values(Zi).filter(function(Ma){return!Ma.isEmpty()}),featureIndex:Ri,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:ki.image,imageAtlas:_n,glyphMap:this.returnDependencies?Ct:null,iconMap:this.returnDependencies?Ar:null,glyphPositions:this.returnDependencies?ki.positions:null})}}};function h(Gt,wt,rr){for(var ir=new i.EvaluationParameters(wt),wr=0,Xr=Gt;wr=0!=!!wt&&Gt.reverse()}var L=i.vectorTile.VectorTileFeature.prototype.toGeoJSON,x=function(wt){this._feature=wt,this.extent=i.EXTENT,this.type=wt.type,this.properties=wt.tags,"id"in wt&&!isNaN(wt.id)&&(this.id=parseInt(wt.id,10))};x.prototype.loadGeometry=function(){if(this._feature.type===1){for(var wt=[],rr=0,ir=this._feature.geometry;rr>31}function Ce(Gt,wt){for(var rr=Gt.loadGeometry(),ir=Gt.type,wr=0,Xr=0,ti=rr.length,$r=0;$r>1;Se(Gt,wt,ti,ir,wr,Xr%2),ie(Gt,wt,rr,ir,ti-1,Xr+1),ie(Gt,wt,rr,ti+1,wr,Xr+1)}}function Se(Gt,wt,rr,ir,wr,Xr){for(;wr>ir;){if(wr-ir>600){var ti=wr-ir+1,$r=rr-ir+1,Ri=Math.log(ti),Zi=.5*Math.exp(2*Ri/3),en=.5*Math.sqrt(Ri*Zi*(ti-Zi)/ti)*($r-ti/2<0?-1:1),fn=Math.max(ir,Math.floor(rr-$r*Zi/ti+en)),yn=Math.min(wr,Math.floor(rr+(ti-$r)*Zi/ti+en));Se(Gt,wt,rr,fn,yn,Xr)}var Mn=wt[2*rr+Xr],Ba=ir,ua=wr;for(Ee(Gt,wt,ir,rr),wt[2*wr+Xr]>Mn&&Ee(Gt,wt,ir,wr);BaMn;)ua--}wt[2*ir+Xr]===Mn?Ee(Gt,wt,ir,ua):(ua++,Ee(Gt,wt,ua,wr)),ua<=rr&&(ir=ua+1),rr<=ua&&(wr=ua-1)}}function Ee(Gt,wt,rr,ir){we(Gt,rr,ir),we(wt,2*rr,2*ir),we(wt,2*rr+1,2*ir+1)}function we(Gt,wt,rr){var ir=Gt[wt];Gt[wt]=Gt[rr],Gt[rr]=ir}function De(Gt,wt,rr,ir,wr,Xr,ti){for(var $r=[0,Gt.length-1,0],Ri=[],Zi,en;$r.length;){var fn=$r.pop(),yn=$r.pop(),Mn=$r.pop();if(yn-Mn<=ti){for(var Ba=Mn;Ba<=yn;Ba++)Zi=wt[2*Ba],en=wt[2*Ba+1],Zi>=rr&&Zi<=wr&&en>=ir&&en<=Xr&&Ri.push(Gt[Ba]);continue}var ua=Math.floor((Mn+yn)/2);Zi=wt[2*ua],en=wt[2*ua+1],Zi>=rr&&Zi<=wr&&en>=ir&&en<=Xr&&Ri.push(Gt[ua]);var ma=(fn+1)%2;(fn===0?rr<=Zi:ir<=en)&&($r.push(Mn),$r.push(ua-1),$r.push(ma)),(fn===0?wr>=Zi:Xr>=en)&&($r.push(ua+1),$r.push(yn),$r.push(ma))}return Ri}function Le(Gt,wt,rr,ir,wr,Xr){for(var ti=[0,Gt.length-1,0],$r=[],Ri=wr*wr;ti.length;){var Zi=ti.pop(),en=ti.pop(),fn=ti.pop();if(en-fn<=Xr){for(var yn=fn;yn<=en;yn++)me(wt[2*yn],wt[2*yn+1],rr,ir)<=Ri&&$r.push(Gt[yn]);continue}var Mn=Math.floor((fn+en)/2),Ba=wt[2*Mn],ua=wt[2*Mn+1];me(Ba,ua,rr,ir)<=Ri&&$r.push(Gt[Mn]);var ma=(Zi+1)%2;(Zi===0?rr-wr<=Ba:ir-wr<=ua)&&(ti.push(fn),ti.push(Mn-1),ti.push(ma)),(Zi===0?rr+wr>=Ba:ir+wr>=ua)&&(ti.push(Mn+1),ti.push(en),ti.push(ma))}return $r}function me(Gt,wt,rr,ir){var wr=Gt-rr,Xr=wt-ir;return wr*wr+Xr*Xr}var Pe=function(Gt){return Gt[0]},ce=function(Gt){return Gt[1]},He=function(wt,rr,ir,wr,Xr){rr===void 0&&(rr=Pe),ir===void 0&&(ir=ce),wr===void 0&&(wr=64),Xr===void 0&&(Xr=Float64Array),this.nodeSize=wr,this.points=wt;for(var ti=wt.length<65536?Uint16Array:Uint32Array,$r=this.ids=new ti(wt.length),Ri=this.coords=new Xr(wt.length*2),Zi=0;Zi=wr;en--){var fn=+Date.now();Ri=this._cluster(Ri,en),this.trees[en]=new He(Ri,Ae,rt,ti,Float32Array),ir&&console.log("z%d: %d clusters in %dms",en,Ri.length,+Date.now()-fn)}return ir&&console.timeEnd("total time"),this},mt.prototype.getClusters=function(wt,rr){var ir=((wt[0]+180)%360+360)%360-180,wr=Math.max(-90,Math.min(90,wt[1])),Xr=wt[2]===180?180:((wt[2]+180)%360+360)%360-180,ti=Math.max(-90,Math.min(90,wt[3]));if(wt[2]-wt[0]>=360)ir=-180,Xr=180;else if(ir>Xr){var $r=this.getClusters([ir,wr,180,ti],rr),Ri=this.getClusters([-180,wr,Xr,ti],rr);return $r.concat(Ri)}for(var Zi=this.trees[this._limitZoom(rr)],en=Zi.range(Ht(ir),nr(ti),Ht(Xr),nr(wr)),fn=[],yn=0,Mn=en;ynrr&&(ua+=Xo.numPoints||1)}if(ua>=Ri){for(var da=fn.x*Ba,jn=fn.y*Ba,Ha=$r&&Ba>1?this._map(fn,!0):null,vo=(en<<5)+(rr+1)+this.points.length,Gn=0,Ct=Mn;Gn1)for(var hn=0,Sn=Mn;hn>5},mt.prototype._getOriginZoom=function(wt){return(wt-this.points.length)%32},mt.prototype._map=function(wt,rr){if(wt.numPoints)return rr?Ue({},wt.properties):wt.properties;var ir=this.points[wt.index].properties,wr=this.options.map(ir);return rr&&wr===ir?Ue({},wr):wr};function Vt(Gt,wt,rr,ir,wr){return{x:Gt,y:wt,zoom:1/0,id:rr,parentId:-1,numPoints:ir,properties:wr}}function st(Gt,wt){var rr=Gt.geometry.coordinates,ir=rr[0],wr=rr[1];return{x:Ht(ir),y:nr(wr),zoom:1/0,index:wt,parentId:-1}}function ct(Gt){return{type:"Feature",id:Gt.id,properties:Qt(Gt),geometry:{type:"Point",coordinates:[tt(Gt.x),je(Gt.y)]}}}function Qt(Gt){var wt=Gt.numPoints,rr=wt>=1e4?Math.round(wt/1e3)+"k":wt>=1e3?Math.round(wt/100)/10+"k":wt;return Ue(Ue({},Gt.properties),{cluster:!0,cluster_id:Gt.id,point_count:wt,point_count_abbreviated:rr})}function Ht(Gt){return Gt/360+.5}function nr(Gt){var wt=Math.sin(Gt*Math.PI/180),rr=.5-.25*Math.log((1+wt)/(1-wt))/Math.PI;return rr<0?0:rr>1?1:rr}function tt(Gt){return(Gt-.5)*360}function je(Gt){var wt=(180-Gt*360)*Math.PI/180;return 360*Math.atan(Math.exp(wt))/Math.PI-90}function Ue(Gt,wt){for(var rr in wt)Gt[rr]=wt[rr];return Gt}function Ae(Gt){return Gt.x}function rt(Gt){return Gt.y}function St(Gt,wt,rr,ir){for(var wr=ir,Xr=rr-wt>>1,ti=rr-wt,$r,Ri=Gt[wt],Zi=Gt[wt+1],en=Gt[rr],fn=Gt[rr+1],yn=wt+3;ynwr)$r=yn,wr=Mn;else if(Mn===wr){var Ba=Math.abs(yn-Xr);Bair&&($r-wt>3&&St(Gt,wt,$r,ir),Gt[$r+2]=wr,rr-$r>3&&St(Gt,$r,rr,ir))}function Tt(Gt,wt,rr,ir,wr,Xr){var ti=wr-rr,$r=Xr-ir;if(ti!==0||$r!==0){var Ri=((Gt-rr)*ti+(wt-ir)*$r)/(ti*ti+$r*$r);Ri>1?(rr=wr,ir=Xr):Ri>0&&(rr+=ti*Ri,ir+=$r*Ri)}return ti=Gt-rr,$r=wt-ir,ti*ti+$r*$r}function dt(Gt,wt,rr,ir){var wr={id:typeof Gt=="undefined"?null:Gt,type:wt,geometry:rr,tags:ir,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return Et(wr),wr}function Et(Gt){var wt=Gt.geometry,rr=Gt.type;if(rr==="Point"||rr==="MultiPoint"||rr==="LineString")pt(Gt,wt);else if(rr==="Polygon"||rr==="MultiLineString")for(var ir=0;ir0&&(ir?ti+=(wr*Zi-Ri*Xr)/2:ti+=Math.sqrt(Math.pow(Ri-wr,2)+Math.pow(Zi-Xr,2))),wr=Ri,Xr=Zi}var en=wt.length-3;wt[2]=1,St(wt,0,en,rr),wt[en+2]=1,wt.size=Math.abs(ti),wt.start=0,wt.end=wt.size}function ei(Gt,wt,rr,ir){for(var wr=0;wr1?1:rr}function gt(Gt,wt,rr,ir,wr,Xr,ti,$r){if(rr/=wt,ir/=wt,Xr>=rr&&ti=ir)return null;for(var Ri=[],Zi=0;Zi=rr&&Ba=ir)continue;var ua=[];if(yn==="Point"||yn==="MultiPoint")Ge(fn,ua,rr,ir,wr);else if(yn==="LineString")Je(fn,ua,rr,ir,wr,!1,$r.lineMetrics);else if(yn==="MultiLineString")et(fn,ua,rr,ir,wr,!1);else if(yn==="Polygon")et(fn,ua,rr,ir,wr,!0);else if(yn==="MultiPolygon")for(var ma=0;ma=rr&&ti<=ir&&(wt.push(Gt[Xr]),wt.push(Gt[Xr+1]),wt.push(Gt[Xr+2]))}}function Je(Gt,wt,rr,ir,wr,Xr,ti){for(var $r=We(Gt),Ri=wr===0?At:Kt,Zi=Gt.start,en,fn,yn=0;ynrr&&(fn=Ri($r,Mn,Ba,ma,Wa,rr),ti&&($r.start=Zi+en*fn)):Fa>ir?Xo=rr&&(fn=Ri($r,Mn,Ba,ma,Wa,rr),da=!0),Xo>ir&&Fa<=ir&&(fn=Ri($r,Mn,Ba,ma,Wa,ir),da=!0),!Xr&&da&&(ti&&($r.end=Zi+en*fn),wt.push($r),$r=We(Gt)),ti&&(Zi+=en)}var jn=Gt.length-3;Mn=Gt[jn],Ba=Gt[jn+1],ua=Gt[jn+2],Fa=wr===0?Mn:Ba,Fa>=rr&&Fa<=ir&&xt($r,Mn,Ba,ua),jn=$r.length-3,Xr&&jn>=3&&($r[jn]!==$r[0]||$r[jn+1]!==$r[1])&&xt($r,$r[0],$r[1],$r[2]),$r.length&&wt.push($r)}function We(Gt){var wt=[];return wt.size=Gt.size,wt.start=Gt.start,wt.end=Gt.end,wt}function et(Gt,wt,rr,ir,wr,Xr){for(var ti=0;titi.maxX&&(ti.maxX=en),fn>ti.maxY&&(ti.maxY=fn)}return ti}function Pi(Gt,wt,rr,ir){var wr=wt.geometry,Xr=wt.type,ti=[];if(Xr==="Point"||Xr==="MultiPoint")for(var $r=0;$r0&&wt.size<(wr?ti:ir)){rr.numPoints+=wt.length/3;return}for(var $r=[],Ri=0;Riti)&&(rr.numSimplified++,$r.push(wt[Ri]),$r.push(wt[Ri+1])),rr.numPoints++;wr&&mi($r,Xr),Gt.push($r)}function mi(Gt,wt){for(var rr=0,ir=0,wr=Gt.length,Xr=wr-2;ir0===wt)for(ir=0,wr=Gt.length;ir24)throw new Error("maxZoom should be in the 0-24 range");if(wt.promoteId&&wt.generateId)throw new Error("promoteId and generateId cannot be used together.");var ir=Xt(Gt,wt);this.tiles={},this.tileCoords=[],rr&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",wt.indexMaxZoom,wt.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),ir=er(ir,wt),ir.length&&this.splitTile(ir,0,0,0),rr&&(ir.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}Fn.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Fn.prototype.splitTile=function(Gt,wt,rr,ir,wr,Xr,ti){for(var $r=[Gt,wt,rr,ir],Ri=this.options,Zi=Ri.debug;$r.length;){ir=$r.pop(),rr=$r.pop(),wt=$r.pop(),Gt=$r.pop();var en=1<1&&console.time("creation"),yn=this.tiles[fn]=_i(Gt,wt,rr,ir,Ri),this.tileCoords.push({z:wt,x:rr,y:ir}),Zi)){Zi>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",wt,rr,ir,yn.numFeatures,yn.numPoints,yn.numSimplified),console.timeEnd("creation"));var Mn="z"+wt;this.stats[Mn]=(this.stats[Mn]||0)+1,this.total++}if(yn.source=Gt,wr){if(wt===Ri.maxZoom||wt===wr)continue;var Ba=1<1&&console.time("clipping");var ua=.5*Ri.buffer/Ri.extent,ma=.5-ua,Wa=.5+ua,Fa=1+ua,Xo,da,jn,Ha,vo,Gn;Xo=da=jn=Ha=null,vo=gt(Gt,en,rr-ua,rr+Wa,0,yn.minX,yn.maxX,Ri),Gn=gt(Gt,en,rr+ma,rr+Fa,0,yn.minX,yn.maxX,Ri),Gt=null,vo&&(Xo=gt(vo,en,ir-ua,ir+Wa,1,yn.minY,yn.maxY,Ri),da=gt(vo,en,ir+ma,ir+Fa,1,yn.minY,yn.maxY,Ri),vo=null),Gn&&(jn=gt(Gn,en,ir-ua,ir+Wa,1,yn.minY,yn.maxY,Ri),Ha=gt(Gn,en,ir+ma,ir+Fa,1,yn.minY,yn.maxY,Ri),Gn=null),Zi>1&&console.timeEnd("clipping"),$r.push(Xo||[],wt+1,rr*2,ir*2),$r.push(da||[],wt+1,rr*2,ir*2+1),$r.push(jn||[],wt+1,rr*2+1,ir*2),$r.push(Ha||[],wt+1,rr*2+1,ir*2+1)}}},Fn.prototype.getTile=function(Gt,wt,rr){var ir=this.options,wr=ir.extent,Xr=ir.debug;if(Gt<0||Gt>24)return null;var ti=1<1&&console.log("drilling down to z%d-%d-%d",Gt,wt,rr);for(var Ri=Gt,Zi=wt,en=rr,fn;!fn&&Ri>0;)Ri--,Zi=Math.floor(Zi/2),en=Math.floor(en/2),fn=this.tiles[An(Ri,Zi,en)];return!fn||!fn.source?null:(Xr>1&&console.log("found parent tile z%d-%d-%d",Ri,Zi,en),Xr>1&&console.time("drilling down"),this.splitTile(fn.source,Ri,Zi,en,Gt,wt,rr),Xr>1&&console.timeEnd("drilling down"),this.tiles[$r]?Ir(this.tiles[$r],wr):null)};function An(Gt,wt,rr){return((1<=0?0:Y.button},o.remove=function(Y){Y.parentNode&&Y.parentNode.removeChild(Y)};function m(Y,D,J){var O,K,de,ne=i.browser.devicePixelRatio>1?"@2x":"",be=i.getJSON(D.transformRequest(D.normalizeSpriteURL(Y,ne,".json"),i.ResourceType.SpriteJSON),function(Yt,cr){be=null,de||(de=Yt,O=cr,ht())}),Be=i.getImage(D.transformRequest(D.normalizeSpriteURL(Y,ne,".png"),i.ResourceType.SpriteImage),function(Yt,cr){Be=null,de||(de=Yt,K=cr,ht())});function ht(){if(de)J(de);else if(O&&K){var Yt=i.browser.getImageData(K),cr={};for(var Nt in O){var Ne=O[Nt],$e=Ne.width,ot=Ne.height,It=Ne.x,Bt=Ne.y,Ft=Ne.sdf,Ut=Ne.pixelRatio,zt=Ne.stretchX,_t=Ne.stretchY,Dt=Ne.content,vt=new i.RGBAImage({width:$e,height:ot});i.RGBAImage.copy(Yt,vt,{x:It,y:Bt},{x:0,y:0},{width:$e,height:ot}),cr[Nt]={data:vt,pixelRatio:Ut,sdf:Ft,stretchX:zt,stretchY:_t,content:Dt}}J(null,cr)}}return{cancel:function(){be&&(be.cancel(),be=null),Be&&(Be.cancel(),Be=null)}}}function b(Y){var D=Y.userImage;if(D&&D.render){var J=D.render();if(J)return Y.data.replace(new Uint8Array(D.data.buffer)),!0}return!1}var p=1,k=function(Y){function D(){Y.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new i.RGBAImage({width:1,height:1}),this.dirty=!0}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.isLoaded=function(){return this.loaded},D.prototype.setLoaded=function(O){if(this.loaded!==O&&(this.loaded=O,O)){for(var K=0,de=this.requestors;K=0?1.2:1))}C.prototype.draw=function(Y){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(Y,this.buffer,this.middle);for(var D=this.ctx.getImageData(0,0,this.size,this.size),J=new Uint8ClampedArray(this.size*this.size),O=0;O65535){Yt(new Error("glyphs > 65535 not supported"));return}if(Ne.ranges[ot]){Yt(null,{stack:cr,id:Nt,glyph:$e});return}var It=Ne.requests[ot];It||(It=Ne.requests[ot]=[],P.loadGlyphRange(cr,ot,O.url,O.requestManager,function(Bt,Ft){if(Ft){for(var Ut in Ft)O._doesCharSupportLocalGlyph(+Ut)||(Ne.glyphs[+Ut]=Ft[+Ut]);Ne.ranges[ot]=!0}for(var zt=0,_t=It;zt<_t.length;zt+=1){var Dt=_t[zt];Dt(Bt,Ft)}delete Ne.requests[ot]})),It.push(function(Bt,Ft){Bt?Yt(Bt):Ft&&Yt(null,{stack:cr,id:Nt,glyph:Ft[Nt]||null})})},function(ht,Yt){if(ht)J(ht);else if(Yt){for(var cr={},Nt=0,Ne=Yt;Nt1&&(ht=D[++Be]);var cr=Math.abs(Yt-ht.left),Nt=Math.abs(Yt-ht.right),Ne=Math.min(cr,Nt),$e=void 0,ot=de/O*(K+1);if(ht.isDash){var It=K-Math.abs(ot);$e=Math.sqrt(Ne*Ne+It*It)}else $e=K-Math.sqrt(Ne*Ne+ot*ot);this.data[be+Yt]=Math.max(0,Math.min(255,$e+128))}},G.prototype.addRegularDash=function(D){for(var J=D.length-1;J>=0;--J){var O=D[J],K=D[J+1];O.zeroLength?D.splice(J,1):K&&K.isDash===O.isDash&&(K.left=O.left,D.splice(J,1))}var de=D[0],ne=D[D.length-1];de.isDash===ne.isDash&&(de.left=ne.left-this.width,ne.right=de.right+this.width);for(var be=this.width*this.nextRow,Be=0,ht=D[Be],Yt=0;Yt1&&(ht=D[++Be]);var cr=Math.abs(Yt-ht.left),Nt=Math.abs(Yt-ht.right),Ne=Math.min(cr,Nt),$e=ht.isDash?Ne:-Ne;this.data[be+Yt]=Math.max(0,Math.min(255,$e+128))}},G.prototype.addDash=function(D,J){var O=J?7:0,K=2*O+1;if(this.nextRow+K>this.height)return i.warnOnce("LineAtlas out of space"),null;for(var de=0,ne=0;ne=O.minX&&D.x=O.minY&&D.y0&&(Yt[new i.OverscaledTileID(O.overscaledZ,be,K.z,ne,K.y-1).key]={backfilled:!1},Yt[new i.OverscaledTileID(O.overscaledZ,O.wrap,K.z,K.x,K.y-1).key]={backfilled:!1},Yt[new i.OverscaledTileID(O.overscaledZ,ht,K.z,Be,K.y-1).key]={backfilled:!1}),K.y+10&&(de.resourceTiming=O._resourceTiming,O._resourceTiming=[]),O.fire(new i.Event("data",de))})},D.prototype.onAdd=function(O){this.map=O,this.load()},D.prototype.setData=function(O){var K=this;return this._data=O,this.fire(new i.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(de){if(de){K.fire(new i.ErrorEvent(de));return}var ne={dataType:"source",sourceDataType:"content"};K._collectResourceTiming&&K._resourceTiming&&K._resourceTiming.length>0&&(ne.resourceTiming=K._resourceTiming,K._resourceTiming=[]),K.fire(new i.Event("data",ne))}),this},D.prototype.getClusterExpansionZoom=function(O,K){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:O,source:this.id},K),this},D.prototype.getClusterChildren=function(O,K){return this.actor.send("geojson.getClusterChildren",{clusterId:O,source:this.id},K),this},D.prototype.getClusterLeaves=function(O,K,de,ne){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:O,limit:K,offset:de},ne),this},D.prototype._updateWorkerData=function(O){var K=this;this._loaded=!1;var de=i.extend({},this.workerOptions),ne=this._data;typeof ne=="string"?(de.request=this.map._requestManager.transformRequest(i.browser.resolveURL(ne),i.ResourceType.Source),de.request.collectResourceTiming=this._collectResourceTiming):de.data=JSON.stringify(ne),this.actor.send(this.type+".loadData",de,function(be,Be){K._removed||Be&&Be.abandoned||(K._loaded=!0,Be&&Be.resourceTiming&&Be.resourceTiming[K.id]&&(K._resourceTiming=Be.resourceTiming[K.id].slice(0)),K.actor.send(K.type+".coalesce",{source:de.source},null),O(be))})},D.prototype.loaded=function(){return this._loaded},D.prototype.loadTile=function(O,K){var de=this,ne=O.actor?"reloadTile":"loadTile";O.actor=this.actor;var be={type:this.type,uid:O.uid,tileID:O.tileID,zoom:O.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:i.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};O.request=this.actor.send(ne,be,function(Be,ht){return delete O.request,O.unloadVectorData(),O.aborted?K(null):Be?K(Be):(O.loadVectorData(ht,de.map.painter,ne==="reloadTile"),K(null))})},D.prototype.abortTile=function(O){O.request&&(O.request.cancel(),delete O.request),O.aborted=!0},D.prototype.unloadTile=function(O){O.unloadVectorData(),this.actor.send("removeTile",{uid:O.uid,type:this.type,source:this.id})},D.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},D.prototype.serialize=function(){return i.extend({},this._options,{type:this.type,data:this._data})},D.prototype.hasTransition=function(){return!1},D}(i.Evented),ke=i.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),Ce=function(Y){function D(J,O,K,de){Y.call(this),this.id=J,this.dispatcher=K,this.coordinates=O.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(de),this.options=O}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.load=function(O,K){var de=this;this._loaded=!1,this.fire(new i.Event("dataloading",{dataType:"source"})),this.url=this.options.url,i.getImage(this.map._requestManager.transformRequest(this.url,i.ResourceType.Image),function(ne,be){de._loaded=!0,ne?de.fire(new i.ErrorEvent(ne)):be&&(de.image=be,O&&(de.coordinates=O),K&&K(),de._finishLoading())})},D.prototype.loaded=function(){return this._loaded},D.prototype.updateImage=function(O){var K=this;return!this.image||!O.url?this:(this.options.url=O.url,this.load(O.coordinates,function(){K.texture=null}),this)},D.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new i.Event("data",{dataType:"source",sourceDataType:"metadata"})))},D.prototype.onAdd=function(O){this.map=O,this.load()},D.prototype.setCoordinates=function(O){var K=this;this.coordinates=O;var de=O.map(i.MercatorCoordinate.fromLngLat);this.tileID=ge(de),this.minzoom=this.maxzoom=this.tileID.z;var ne=de.map(function(be){return K.tileID.getTilePoint(be)._round()});return this._boundsArray=new i.StructArrayLayout4i8,this._boundsArray.emplaceBack(ne[0].x,ne[0].y,0,0),this._boundsArray.emplaceBack(ne[1].x,ne[1].y,i.EXTENT,0),this._boundsArray.emplaceBack(ne[3].x,ne[3].y,0,i.EXTENT),this._boundsArray.emplaceBack(ne[2].x,ne[2].y,i.EXTENT,i.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new i.Event("data",{dataType:"source",sourceDataType:"content"})),this},D.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var O=this.map.painter.context,K=O.gl;this.boundsBuffer||(this.boundsBuffer=O.createVertexBuffer(this._boundsArray,ke.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new i.Texture(O,this.image,K.RGBA),this.texture.bind(K.LINEAR,K.CLAMP_TO_EDGE));for(var de in this.tiles){var ne=this.tiles[de];ne.state!=="loaded"&&(ne.state="loaded",ne.texture=this.texture)}}},D.prototype.loadTile=function(O,K){this.tileID&&this.tileID.equals(O.tileID.canonical)?(this.tiles[String(O.tileID.wrap)]=O,O.buckets={},K(null)):(O.state="errored",K(null))},D.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},D.prototype.hasTransition=function(){return!1},D}(i.Evented);function ge(Y){for(var D=1/0,J=1/0,O=-1/0,K=-1/0,de=0,ne=Y;deK.end(0)?this.fire(new i.ErrorEvent(new i.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+K.start(0)+" and "+K.end(0)+"-second mark."))):this.video.currentTime=O}},D.prototype.getVideo=function(){return this.video},D.prototype.onAdd=function(O){this.map||(this.map=O,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},D.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var O=this.map.painter.context,K=O.gl;this.boundsBuffer||(this.boundsBuffer=O.createVertexBuffer(this._boundsArray,ke.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(K.LINEAR,K.CLAMP_TO_EDGE),K.texSubImage2D(K.TEXTURE_2D,0,0,0,K.RGBA,K.UNSIGNED_BYTE,this.video)):(this.texture=new i.Texture(O,this.video,K.RGBA),this.texture.bind(K.LINEAR,K.CLAMP_TO_EDGE));for(var de in this.tiles){var ne=this.tiles[de];ne.state!=="loaded"&&(ne.state="loaded",ne.texture=this.texture)}}},D.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},D.prototype.hasTransition=function(){return this.video&&!this.video.paused},D}(Ce),Se=function(Y){function D(J,O,K,de){Y.call(this,J,O,K,de),O.coordinates?(!Array.isArray(O.coordinates)||O.coordinates.length!==4||O.coordinates.some(function(ne){return!Array.isArray(ne)||ne.length!==2||ne.some(function(be){return typeof be!="number"})}))&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+J,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new i.ErrorEvent(new i.ValidationError("sources."+J,null,'missing required property "coordinates"'))),O.animate&&typeof O.animate!="boolean"&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+J,null,'optional "animate" property must be a boolean value'))),O.canvas?typeof O.canvas!="string"&&!(O.canvas instanceof i.window.HTMLCanvasElement)&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+J,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new i.ErrorEvent(new i.ValidationError("sources."+J,null,'missing required property "canvas"'))),this.options=O,this.animate=O.animate!==void 0?O.animate:!0}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.load=function(){if(this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof i.window.HTMLCanvasElement?this.options.canvas:i.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()){this.fire(new i.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero.")));return}this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading()},D.prototype.getCanvas=function(){return this.canvas},D.prototype.onAdd=function(O){this.map=O,this.load(),this.canvas&&this.animate&&this.play()},D.prototype.onRemove=function(){this.pause()},D.prototype.prepare=function(){var O=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,O=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,O=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var K=this.map.painter.context,de=K.gl;this.boundsBuffer||(this.boundsBuffer=K.createVertexBuffer(this._boundsArray,ke.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(O||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new i.Texture(K,this.canvas,de.RGBA,{premultiply:!0});for(var ne in this.tiles){var be=this.tiles[ne];be.state!=="loaded"&&(be.state="loaded",be.texture=this.texture)}}},D.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},D.prototype.hasTransition=function(){return this._playing},D.prototype._hasInvalidDimensions=function(){for(var O=0,K=[this.canvas.width,this.canvas.height];Othis.max){var be=this._getAndRemoveByKey(this.order[0]);be&&this.onRemove(be)}return this},st.prototype.has=function(D){return D.wrapped().key in this.data},st.prototype.getAndRemove=function(D){return this.has(D)?this._getAndRemoveByKey(D.wrapped().key):null},st.prototype._getAndRemoveByKey=function(D){var J=this.data[D].shift();return J.timeout&&clearTimeout(J.timeout),this.data[D].length===0&&delete this.data[D],this.order.splice(this.order.indexOf(D),1),J.value},st.prototype.getByKey=function(D){var J=this.data[D];return J?J[0].value:null},st.prototype.get=function(D){if(!this.has(D))return null;var J=this.data[D.wrapped().key][0];return J.value},st.prototype.remove=function(D,J){if(!this.has(D))return this;var O=D.wrapped().key,K=J===void 0?0:this.data[O].indexOf(J),de=this.data[O][K];return this.data[O].splice(K,1),de.timeout&&clearTimeout(de.timeout),this.data[O].length===0&&delete this.data[O],this.onRemove(de.value),this.order.splice(this.order.indexOf(O),1),this},st.prototype.setMaxSize=function(D){for(this.max=D;this.order.length>this.max;){var J=this._getAndRemoveByKey(this.order[0]);J&&this.onRemove(J)}return this},st.prototype.filter=function(D){var J=[];for(var O in this.data)for(var K=0,de=this.data[O];K1||(Math.abs(cr)>1&&(Math.abs(cr+Ne)===1?cr+=Ne:Math.abs(cr-Ne)===1&&(cr-=Ne)),!(!Yt.dem||!ht.dem)&&(ht.dem.backfillBorder(Yt.dem,cr,Nt),ht.neighboringTiles&&ht.neighboringTiles[$e]&&(ht.neighboringTiles[$e].backfilled=!0)))}},D.prototype.getTile=function(O){return this.getTileByID(O.key)},D.prototype.getTileByID=function(O){return this._tiles[O]},D.prototype._retainLoadedChildren=function(O,K,de,ne){for(var be in this._tiles){var Be=this._tiles[be];if(!(ne[be]||!Be.hasData()||Be.tileID.overscaledZ<=K||Be.tileID.overscaledZ>de)){for(var ht=Be.tileID;Be&&Be.tileID.overscaledZ>K+1;){var Yt=Be.tileID.scaledTo(Be.tileID.overscaledZ-1);Be=this._tiles[Yt.key],Be&&Be.hasData()&&(ht=Yt)}for(var cr=ht;cr.overscaledZ>K;)if(cr=cr.scaledTo(cr.overscaledZ-1),O[cr.key]){ne[ht.key]=ht;break}}}},D.prototype.findLoadedParent=function(O,K){if(O.key in this._loadedParentTiles){var de=this._loadedParentTiles[O.key];return de&&de.tileID.overscaledZ>=K?de:null}for(var ne=O.overscaledZ-1;ne>=K;ne--){var be=O.scaledTo(ne),Be=this._getLoadedTile(be);if(Be)return Be}},D.prototype._getLoadedTile=function(O){var K=this._tiles[O.key];if(K&&K.hasData())return K;var de=this._cache.getByKey(O.wrapped().key);return de},D.prototype.updateCacheSize=function(O){var K=Math.ceil(O.width/this._source.tileSize)+1,de=Math.ceil(O.height/this._source.tileSize)+1,ne=K*de,be=5,Be=Math.floor(ne*be),ht=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,Be):Be;this._cache.setMaxSize(ht)},D.prototype.handleWrapJump=function(O){var K=this._prevLng===void 0?O:this._prevLng,de=O-K,ne=de/360,be=Math.round(ne);if(this._prevLng=O,be){var Be={};for(var ht in this._tiles){var Yt=this._tiles[ht];Yt.tileID=Yt.tileID.unwrapTo(Yt.tileID.wrap+be),Be[Yt.tileID.key]=Yt}this._tiles=Be;for(var cr in this._timers)clearTimeout(this._timers[cr]),delete this._timers[cr];for(var Nt in this._tiles){var Ne=this._tiles[Nt];this._setTileReloadTimer(Nt,Ne)}}},D.prototype.update=function(O){var K=this;if(this.transform=O,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(O),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var de;this.used?this._source.tileID?de=O.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(Br){return new i.OverscaledTileID(Br.canonical.z,Br.wrap,Br.canonical.z,Br.canonical.x,Br.canonical.y)}):(de=O.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(de=de.filter(function(Br){return K._source.hasTile(Br)}))):de=[];var ne=O.coveringZoomLevel(this._source),be=Math.max(ne-D.maxOverzooming,this._source.minzoom),Be=Math.max(ne+D.maxUnderzooming,this._source.minzoom),ht=this._updateRetainedTiles(de,ne);if(Ri(this._source.type)){for(var Yt={},cr={},Nt=Object.keys(ht),Ne=0,$e=Nt;Ne<$e.length;Ne+=1){var ot=$e[Ne],It=ht[ot],Bt=this._tiles[ot];if(!(!Bt||Bt.fadeEndTime&&Bt.fadeEndTime<=i.browser.now())){var Ft=this.findLoadedParent(It,be);Ft&&(this._addTile(Ft.tileID),Yt[Ft.tileID.key]=Ft.tileID),cr[ot]=It}}this._retainLoadedChildren(cr,ne,Be,ht);for(var Ut in Yt)ht[Ut]||(this._coveredTiles[Ut]=!0,ht[Ut]=Yt[Ut])}for(var zt in ht)this._tiles[zt].clearFadeHold();for(var _t=i.keysDifference(this._tiles,ht),Dt=0,vt=_t;Dtthis._source.maxzoom){var Ft=It.children(this._source.maxzoom)[0],Ut=this.getTile(Ft);if(Ut&&Ut.hasData()){de[Ft.key]=Ft;continue}}else{var zt=It.children(this._source.maxzoom);if(de[zt[0].key]&&de[zt[1].key]&&de[zt[2].key]&&de[zt[3].key])continue}for(var _t=Bt.wasRequested(),Dt=It.overscaledZ-1;Dt>=be;--Dt){var vt=It.scaledTo(Dt);if(ne[vt.key]||(ne[vt.key]=!0,Bt=this.getTile(vt),!Bt&&_t&&(Bt=this._addTile(vt)),Bt&&(de[vt.key]=vt,_t=Bt.wasRequested(),Bt.hasData())))break}}}return de},D.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var O in this._tiles){for(var K=[],de=void 0,ne=this._tiles[O].tileID;ne.overscaledZ>0;){if(ne.key in this._loadedParentTiles){de=this._loadedParentTiles[ne.key];break}K.push(ne.key);var be=ne.scaledTo(ne.overscaledZ-1);if(de=this._getLoadedTile(be),de)break;ne=be}for(var Be=0,ht=K;Be0)&&(K.hasData()&&K.state!=="reloading"?this._cache.add(K.tileID,K,K.getExpiryTimeout()):(K.aborted=!0,this._abortTile(K),this._unloadTile(K))))},D.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var O in this._tiles)this._removeTile(O);this._cache.reset()},D.prototype.tilesIn=function(O,K,de){var ne=this,be=[],Be=this.transform;if(!Be)return be;for(var ht=de?Be.getCameraQueryGeometry(O):O,Yt=O.map(function(Dt){return Be.pointCoordinate(Dt)}),cr=ht.map(function(Dt){return Be.pointCoordinate(Dt)}),Nt=this.getIds(),Ne=1/0,$e=1/0,ot=-1/0,It=-1/0,Bt=0,Ft=cr;Bt=0&&Di[1].y+Br>=0){var ci=Yt.map(function(gn){return lr.getTilePoint(gn)}),bi=cr.map(function(gn){return lr.getTilePoint(gn)});be.push({tile:vt,tileID:lr,queryGeometry:ci,cameraQueryGeometry:bi,scale:yr})}}},_t=0;_t=i.browser.now())return!0}return!1},D.prototype.setFeatureState=function(O,K,de){O=O||"_geojsonTileLayer",this._state.updateState(O,K,de)},D.prototype.removeFeatureState=function(O,K,de){O=O||"_geojsonTileLayer",this._state.removeFeatureState(O,K,de)},D.prototype.getFeatureState=function(O,K){return O=O||"_geojsonTileLayer",this._state.getState(O,K)},D.prototype.setDependencies=function(O,K,de){var ne=this._tiles[O];ne&&ne.setDependencies(K,de)},D.prototype.reloadTilesForDependencies=function(O,K){for(var de in this._tiles){var ne=this._tiles[de];ne.hasDependency(O,K)&&this._reloadTile(de,"reloading")}this._cache.filter(function(be){return!be.hasDependency(O,K)})},D}(i.Evented);ti.maxOverzooming=10,ti.maxUnderzooming=3;function $r(Y,D){var J=Math.abs(Y.wrap*2)-+(Y.wrap<0),O=Math.abs(D.wrap*2)-+(D.wrap<0);return Y.overscaledZ-D.overscaledZ||O-J||D.canonical.y-Y.canonical.y||D.canonical.x-Y.canonical.x}function Ri(Y){return Y==="raster"||Y==="image"||Y==="video"}function Zi(){return new i.window.Worker(io.workerUrl)}var en="mapboxgl_preloaded_worker_pool",fn=function(){this.active={}};fn.prototype.acquire=function(D){if(!this.workers)for(this.workers=[];this.workers.length0?(K-ne)/be:0;return this.points[de].mult(1-Be).add(this.points[J].mult(Be))};var ki=function(D,J,O){var K=this.boxCells=[],de=this.circleCells=[];this.xCellCount=Math.ceil(D/O),this.yCellCount=Math.ceil(J/O);for(var ne=0;nethis.width||K<0||J>this.height)return de?!1:[];var be=[];if(D<=0&&J<=0&&this.width<=O&&this.height<=K){if(de)return!0;for(var Be=0;Be0:be}},ki.prototype._queryCircle=function(D,J,O,K,de){var ne=D-O,be=D+O,Be=J-O,ht=J+O;if(be<0||ne>this.width||ht<0||Be>this.height)return K?!1:[];var Yt=[],cr={hitTest:K,circle:{x:D,y:J,radius:O},seenUids:{box:{},circle:{}}};return this._forEachCell(ne,Be,be,ht,this._queryCellCircle,Yt,cr,de),K?Yt.length>0:Yt},ki.prototype.query=function(D,J,O,K,de){return this._query(D,J,O,K,!1,de)},ki.prototype.hitTest=function(D,J,O,K,de){return this._query(D,J,O,K,!0,de)},ki.prototype.hitTestCircle=function(D,J,O,K){return this._queryCircle(D,J,O,!0,K)},ki.prototype._queryCell=function(D,J,O,K,de,ne,be,Be){var ht=be.seenUids,Yt=this.boxCells[de];if(Yt!==null)for(var cr=this.bboxes,Nt=0,Ne=Yt;Nt=cr[ot+0]&&K>=cr[ot+1]&&(!Be||Be(this.boxKeys[$e]))){if(be.hitTest)return ne.push(!0),!0;ne.push({key:this.boxKeys[$e],x1:cr[ot],y1:cr[ot+1],x2:cr[ot+2],y2:cr[ot+3]})}}}var It=this.circleCells[de];if(It!==null)for(var Bt=this.circles,Ft=0,Ut=It;Ftbe*be+Be*Be},ki.prototype._circleAndRectCollide=function(D,J,O,K,de,ne,be){var Be=(ne-K)/2,ht=Math.abs(D-(K+Be));if(ht>Be+O)return!1;var Yt=(be-de)/2,cr=Math.abs(J-(de+Yt));if(cr>Yt+O)return!1;if(ht<=Be||cr<=Yt)return!0;var Nt=ht-Be,Ne=cr-Yt;return Nt*Nt+Ne*Ne<=O*O};function _n(Y,D,J,O,K){var de=i.create();return D?(i.scale(de,de,[1/K,1/K,1]),J||i.rotateZ(de,de,O.angle)):i.multiply(de,O.labelPlaneMatrix,Y),de}function ya(Y,D,J,O,K){if(D){var de=i.clone(Y);return i.scale(de,de,[K,K,1]),J||i.rotateZ(de,de,-O.angle),de}else return O.glCoordMatrix}function ea(Y,D){var J=[Y.x,Y.y,0,1];zl(J,J,D);var O=J[3];return{point:new i.Point(J[0]/O,J[1]/O),signedDistanceFromCamera:O}}function Ma(Y,D){return .5+.5*(Y/D)}function _o(Y,D){var J=Y[0]/Y[3],O=Y[1]/Y[3],K=J>=-D[0]&&J<=D[0]&&O>=-D[1]&&O<=D[1];return K}function No(Y,D,J,O,K,de,ne,be){var Be=O?Y.textSizeData:Y.iconSizeData,ht=i.evaluateSizeForZoom(Be,J.transform.zoom),Yt=[256/J.width*2+1,256/J.height*2+1],cr=O?Y.text.dynamicLayoutVertexArray:Y.icon.dynamicLayoutVertexArray;cr.clear();for(var Nt=Y.lineVertexArray,Ne=O?Y.text.placedSymbolArray:Y.icon.placedSymbolArray,$e=J.transform.width/J.transform.height,ot=!1,It=0;Itde)return{useVertical:!0}}return(Y===i.WritingMode.vertical?D.yJ.x)?{needsFlipping:!0}:null}function ko(Y,D,J,O,K,de,ne,be,Be,ht,Yt,cr,Nt,Ne){var $e=D/24,ot=Y.lineOffsetX*$e,It=Y.lineOffsetY*$e,Bt;if(Y.numGlyphs>1){var Ft=Y.glyphStartIndex+Y.numGlyphs,Ut=Y.lineStartIndex,zt=Y.lineStartIndex+Y.lineLength,_t=po($e,be,ot,It,J,Yt,cr,Y,Be,de,Nt);if(!_t)return{notEnoughRoom:!0};var Dt=ea(_t.first.point,ne).point,vt=ea(_t.last.point,ne).point;if(O&&!J){var lr=Lo(Y.writingMode,Dt,vt,Ne);if(lr)return lr}Bt=[_t.first];for(var yr=Y.glyphStartIndex+1;yr0?bi.point:Ds(cr,ci,Br,1,K),tn=Lo(Y.writingMode,Br,gn,Ne);if(tn)return tn}var Ei=Fs($e*be.getoffsetX(Y.glyphStartIndex),ot,It,J,Yt,cr,Y.segment,Y.lineStartIndex,Y.lineStartIndex+Y.lineLength,Be,de,Nt);if(!Ei)return{notEnoughRoom:!0};Bt=[Ei]}for(var Oi=0,Gi=Bt;Oi0?1:-1,$e=0;O&&(Ne*=-1,$e=Math.PI),Ne<0&&($e+=Math.PI);for(var ot=Ne>0?be+ne:be+ne+1,It=K,Bt=K,Ft=0,Ut=0,zt=Math.abs(Nt),_t=[];Ft+Ut<=zt;){if(ot+=Ne,ot=Be)return null;if(Bt=It,_t.push(It),It=cr[ot],It===void 0){var Dt=new i.Point(ht.getx(ot),ht.gety(ot)),vt=ea(Dt,Yt);if(vt.signedDistanceFromCamera>0)It=cr[ot]=vt.point;else{var lr=ot-Ne,yr=Ft===0?de:new i.Point(ht.getx(lr),ht.gety(lr));It=Ds(yr,Dt,Bt,zt-Ft+1,Yt)}}Ft+=Ut,Ut=Bt.dist(It)}var Br=(zt-Ft)/Ut,Di=It.sub(Bt),ci=Di.mult(Br)._add(Bt);ci._add(Di._unit()._perp()._mult(J*Ne));var bi=$e+Math.atan2(It.y-Bt.y,It.x-Bt.x);return _t.push(ci),{point:ci,angle:bi,path:_t}}var ll=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ul(Y,D){for(var J=0;J=1;on--)Gi.push(Ei.path[on]);for(var zn=1;zn0){for(var so=Gi[0].clone(),Yo=Gi[0].clone(),ms=1;ms=bi.x&&Yo.x<=gn.x&&so.y>=bi.y&&Yo.y<=gn.y?ts=[Gi]:Yo.xgn.x||Yo.ygn.y?ts=[]:ts=i.clipLine([Gi],bi.x,bi.y,gn.x,gn.y)}for(var ou=0,Cv=ts;ou=this.screenRightBoundary||Kthis.screenBottomBoundary},il.prototype.isInsideGrid=function(D,J,O,K){return O>=0&&D=0&&J0){var zt;return this.prevPlacement&&this.prevPlacement.variableOffsets[Nt.crossTileID]&&this.prevPlacement.placements[Nt.crossTileID]&&this.prevPlacement.placements[Nt.crossTileID].text&&(zt=this.prevPlacement.variableOffsets[Nt.crossTileID].anchor),this.variableOffsets[Nt.crossTileID]={textOffset:It,width:O,height:K,anchor:D,textBoxScale:de,prevAnchor:zt},this.markUsedJustification(Ne,D,Nt,$e),Ne.allowVerticalPlacement&&(this.markUsedOrientation(Ne,$e,Nt),this.placedOrientations[Nt.crossTileID]=$e),{shift:Bt,placedGlyphBoxes:Ft}}},bs.prototype.placeLayerBucketPart=function(D,J,O){var K=this,de=D.parameters,ne=de.bucket,be=de.layout,Be=de.posMatrix,ht=de.textLabelPlaneMatrix,Yt=de.labelToScreenMatrix,cr=de.textPixelRatio,Nt=de.holdingForFade,Ne=de.collisionBoxArray,$e=de.partiallyEvaluatedTextSize,ot=de.collisionGroup,It=be.get("text-optional"),Bt=be.get("icon-optional"),Ft=be.get("text-allow-overlap"),Ut=be.get("icon-allow-overlap"),zt=be.get("text-rotation-alignment")==="map",_t=be.get("text-pitch-alignment")==="map",Dt=be.get("icon-text-fit")!=="none",vt=be.get("symbol-z-order")==="viewport-y",lr=Ft&&(Ut||!ne.hasIconData()||Bt),yr=Ut&&(Ft||!ne.hasTextData()||It);!ne.collisionArrays&&Ne&&ne.deserializeCollisionBoxes(Ne);var Br=function(Ei,Oi){if(!J[Ei.crossTileID]){if(Nt){K.placements[Ei.crossTileID]=new zs(!1,!1,!1);return}var Gi=!1,on=!1,zn=!0,Ja=null,co={box:null,offscreen:null},ts={box:null,offscreen:null},so=null,Yo=null,ms=null,ou=0,Cv=0,Lv=0;Oi.textFeatureIndex?ou=Oi.textFeatureIndex:Ei.useRuntimeCollisionCircles&&(ou=Ei.featureIndex),Oi.verticalTextFeatureIndex&&(Cv=Oi.verticalTextFeatureIndex);var wd=Oi.textBox;if(wd){var Kv=function(vc){var tu=i.WritingMode.horizontal;if(ne.allowVerticalPlacement&&!vc&&K.prevPlacement){var Sd=K.prevPlacement.placedOrientations[Ei.crossTileID];Sd&&(K.placedOrientations[Ei.crossTileID]=Sd,tu=Sd,K.markUsedOrientation(ne,tu,Ei))}return tu},hg=function(vc,tu){if(ne.allowVerticalPlacement&&Ei.numVerticalGlyphVertices>0&&Oi.verticalTextBox)for(var Sd=0,vy=ne.writingModes;Sd0&&(Ud=Ud.filter(function(vc){return vc!==Ad.anchor}),Ud.unshift(Ad.anchor))}var Pv=function(vc,tu,Sd){for(var vy=vc.x2-vc.x1,L1=vc.y2-vc.y1,wu=Ei.textBoxScale,Yx=Dt&&!Ut?tu:null,lm={box:[],offscreen:!1},Ow=Ft?Ud.length*2:Ud.length,Rv=0;Rv=Ud.length,Kx=K.attemptAnchorPlacement(um,vc,vy,L1,wu,zt,_t,cr,Be,ot,Bw,Ei,ne,Sd,Yx);if(Kx&&(lm=Kx.placedGlyphBoxes,lm&&lm.box&&lm.box.length)){Gi=!0,Ja=Kx.shift;break}}return lm},Jv=function(){return Pv(wd,Oi.iconBox,i.WritingMode.horizontal)},Iv=function(){var vc=Oi.verticalTextBox,tu=co&&co.box&&co.box.length;return ne.allowVerticalPlacement&&!tu&&Ei.numVerticalGlyphVertices>0&&vc?Pv(vc,Oi.verticalIconBox,i.WritingMode.vertical):{box:null,offscreen:null}};hg(Jv,Iv),co&&(Gi=co.box,zn=co.offscreen);var fy=Kv(co&&co.box);if(!Gi&&K.prevPlacement){var dg=K.prevPlacement.variableOffsets[Ei.crossTileID];dg&&(K.variableOffsets[Ei.crossTileID]=dg,K.markUsedJustification(ne,dg.anchor,Ei,fy))}}else{var gp=function(vc,tu){var Sd=K.collisionIndex.placeCollisionBox(vc,Ft,cr,Be,ot.predicate);return Sd&&Sd.box&&Sd.box.length&&(K.markUsedOrientation(ne,tu,Ei),K.placedOrientations[Ei.crossTileID]=tu),Sd},Td=function(){return gp(wd,i.WritingMode.horizontal)},mp=function(){var vc=Oi.verticalTextBox;return ne.allowVerticalPlacement&&Ei.numVerticalGlyphVertices>0&&vc?gp(vc,i.WritingMode.vertical):{box:null,offscreen:null}};hg(Td,mp),Kv(co&&co.box&&co.box.length)}}if(so=co,Gi=so&&so.box&&so.box.length>0,zn=so&&so.offscreen,Ei.useRuntimeCollisionCircles){var oh=ne.text.placedSymbolArray.get(Ei.centerJustifiedTextSymbolIndex),vg=i.evaluateSizeForFeature(ne.textSizeData,$e,oh),hy=be.get("text-padding"),Zh=Ei.collisionCircleDiameter;Yo=K.collisionIndex.placeCollisionCircles(Ft,oh,ne.lineVertexArray,ne.glyphOffsetArray,vg,Be,ht,Yt,O,_t,ot.predicate,Zh,hy),Gi=Ft||Yo.circles.length>0&&!Yo.collisionDetected,zn=zn&&Yo.offscreen}if(Oi.iconFeatureIndex&&(Lv=Oi.iconFeatureIndex),Oi.iconBox){var am=function(vc){var tu=Dt&&Ja?nc(vc,Ja.x,Ja.y,zt,_t,K.transform.angle):vc;return K.collisionIndex.placeCollisionBox(tu,Ut,cr,Be,ot.predicate)};ts&&ts.box&&ts.box.length&&Oi.verticalIconBox?(ms=am(Oi.verticalIconBox),on=ms.box.length>0):(ms=am(Oi.iconBox),on=ms.box.length>0),zn=zn&&ms.offscreen}var k1=It||Ei.numHorizontalGlyphVertices===0&&Ei.numVerticalGlyphVertices===0,C1=Bt||Ei.numIconVertices===0;if(!k1&&!C1?on=Gi=on&&Gi:C1?k1||(on=on&&Gi):Gi=on&&Gi,Gi&&so&&so.box&&(ts&&ts.box&&Cv?K.collisionIndex.insertCollisionBox(so.box,be.get("text-ignore-placement"),ne.bucketInstanceId,Cv,ot.ID):K.collisionIndex.insertCollisionBox(so.box,be.get("text-ignore-placement"),ne.bucketInstanceId,ou,ot.ID)),on&&ms&&K.collisionIndex.insertCollisionBox(ms.box,be.get("icon-ignore-placement"),ne.bucketInstanceId,Lv,ot.ID),Yo&&(Gi&&K.collisionIndex.insertCollisionCircles(Yo.circles,be.get("text-ignore-placement"),ne.bucketInstanceId,ou,ot.ID),O)){var dy=ne.bucketInstanceId,om=K.collisionCircleArrays[dy];om===void 0&&(om=K.collisionCircleArrays[dy]=new Io);for(var sm=0;sm=0;--ci){var bi=Di[ci];Br(ne.symbolInstances.get(bi),ne.collisionArrays[bi])}else for(var gn=D.symbolInstanceStart;gn=0&&(ne>=0&&Yt!==ne?D.text.placedSymbolArray.get(Yt).crossTileID=0:D.text.placedSymbolArray.get(Yt).crossTileID=O.crossTileID)}},bs.prototype.markUsedOrientation=function(D,J,O){for(var K=J===i.WritingMode.horizontal||J===i.WritingMode.horizontalOnly?J:0,de=J===i.WritingMode.vertical?J:0,ne=[O.leftJustifiedTextSymbolIndex,O.centerJustifiedTextSymbolIndex,O.rightJustifiedTextSymbolIndex],be=0,Be=ne;be0||_t>0,Br=Ut.numIconVertices>0,Di=K.placedOrientations[Ut.crossTileID],ci=Di===i.WritingMode.vertical,bi=Di===i.WritingMode.horizontal||Di===i.WritingMode.horizontalOnly;if(yr){var gn=ac(lr.text),tn=ci?oa:gn;$e(D.text,zt,tn);var Ei=bi?oa:gn;$e(D.text,_t,Ei);var Oi=lr.text.isHidden();[Ut.rightJustifiedTextSymbolIndex,Ut.centerJustifiedTextSymbolIndex,Ut.leftJustifiedTextSymbolIndex].forEach(function(Lv){Lv>=0&&(D.text.placedSymbolArray.get(Lv).hidden=Oi||ci?1:0)}),Ut.verticalPlacedTextSymbolIndex>=0&&(D.text.placedSymbolArray.get(Ut.verticalPlacedTextSymbolIndex).hidden=Oi||bi?1:0);var Gi=K.variableOffsets[Ut.crossTileID];Gi&&K.markUsedJustification(D,Gi.anchor,Ut,Di);var on=K.placedOrientations[Ut.crossTileID];on&&(K.markUsedJustification(D,"left",Ut,on),K.markUsedOrientation(D,on,Ut))}if(Br){var zn=ac(lr.icon),Ja=!(Nt&&Ut.verticalPlacedIconSymbolIndex&&ci);if(Ut.placedIconSymbolIndex>=0){var co=Ja?zn:oa;$e(D.icon,Ut.numIconVertices,co),D.icon.placedSymbolArray.get(Ut.placedIconSymbolIndex).hidden=lr.icon.isHidden()}if(Ut.verticalPlacedIconSymbolIndex>=0){var ts=Ja?oa:zn;$e(D.icon,Ut.numVerticalIconVertices,ts),D.icon.placedSymbolArray.get(Ut.verticalPlacedIconSymbolIndex).hidden=lr.icon.isHidden()}}if(D.hasIconCollisionBoxData()||D.hasTextCollisionBoxData()){var so=D.collisionArrays[Ft];if(so){var Yo=new i.Point(0,0);if(so.textBox||so.verticalTextBox){var ms=!0;if(ht){var ou=K.variableOffsets[Dt];ou?(Yo=Su(ou.anchor,ou.width,ou.height,ou.textOffset,ou.textBoxScale),Yt&&Yo._rotate(cr?K.transform.angle:-K.transform.angle)):ms=!1}so.textBox&&Rn(D.textCollisionBox.collisionVertexArray,lr.text.placed,!ms||ci,Yo.x,Yo.y),so.verticalTextBox&&Rn(D.textCollisionBox.collisionVertexArray,lr.text.placed,!ms||bi,Yo.x,Yo.y)}var Cv=!!(!bi&&so.verticalIconBox);so.iconBox&&Rn(D.iconCollisionBox.collisionVertexArray,lr.icon.placed,Cv,Nt?Yo.x:0,Nt?Yo.y:0),so.verticalIconBox&&Rn(D.iconCollisionBox.collisionVertexArray,lr.icon.placed,!Cv,Nt?Yo.x:0,Nt?Yo.y:0)}}},It=0;ItD},bs.prototype.setStale=function(){this.stale=!0};function Rn(Y,D,J,O,K){Y.emplaceBack(D?1:0,J?1:0,O||0,K||0),Y.emplaceBack(D?1:0,J?1:0,O||0,K||0),Y.emplaceBack(D?1:0,J?1:0,O||0,K||0),Y.emplaceBack(D?1:0,J?1:0,O||0,K||0)}var _a=Math.pow(2,25),Vu=Math.pow(2,24),ql=Math.pow(2,17),xo=Math.pow(2,16),Kl=Math.pow(2,9),Ns=Math.pow(2,8),Hl=Math.pow(2,1);function ac(Y){if(Y.opacity===0&&!Y.placed)return 0;if(Y.opacity===1&&Y.placed)return 4294967295;var D=Y.placed?1:0,J=Math.floor(Y.opacity*127);return J*_a+D*Vu+J*ql+D*xo+J*Kl+D*Ns+J*Hl+D}var oa=0,qo=function(D){this._sortAcrossTiles=D.layout.get("symbol-z-order")!=="viewport-y"&&D.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};qo.prototype.continuePlacement=function(D,J,O,K,de){for(var ne=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var be=D[this._currentPlacementIndex],Be=J[be],ht=this.placement.collisionIndex.transform.zoom;if(Be.type==="symbol"&&(!Be.minzoom||Be.minzoom<=ht)&&(!Be.maxzoom||Be.maxzoom>ht)){this._inProgressLayer||(this._inProgressLayer=new qo(Be));var Yt=this._inProgressLayer.continuePlacement(O[Be.source],this.placement,this._showCollisionBoxes,Be,ne);if(Yt)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Oo.prototype.commit=function(D){return this.placement.commit(D),this.placement};var Ol=512/i.EXTENT/2,Pc=function(D,J,O){this.tileID=D,this.indexedSymbolInstances={},this.bucketInstanceId=O;for(var K=0;KD.overscaledZ)for(var ht in Be){var Yt=Be[ht];Yt.tileID.isChildOf(D)&&Yt.findMatches(J.symbolInstances,D,ne)}else{var cr=D.scaledTo(Number(be)),Nt=Be[cr.key];Nt&&Nt.findMatches(J.symbolInstances,D,ne)}}for(var Ne=0;Ne0)throw new Error("Unimplemented: "+ne.map(function(be){return be.command}).join(", ")+".");return de.forEach(function(be){be.command!=="setTransition"&&K[be.command].apply(K,be.args)}),this.stylesheet=O,!0},D.prototype.addImage=function(O,K){if(this.getImage(O))return this.fire(new i.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(O,K),this._afterImageUpdated(O)},D.prototype.updateImage=function(O,K){this.imageManager.updateImage(O,K)},D.prototype.getImage=function(O){return this.imageManager.getImage(O)},D.prototype.removeImage=function(O){if(!this.getImage(O))return this.fire(new i.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(O),this._afterImageUpdated(O)},D.prototype._afterImageUpdated=function(O){this._availableImages=this.imageManager.listImages(),this._changedImages[O]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new i.Event("data",{dataType:"style"}))},D.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},D.prototype.addSource=function(O,K,de){var ne=this;if(de===void 0&&(de={}),this._checkLoaded(),this.sourceCaches[O]!==void 0)throw new Error("There is already a source with this ID");if(!K.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(K).join(", ")+".");var be=["vector","raster","geojson","video","image"],Be=be.indexOf(K.type)>=0;if(!(Be&&this._validate(i.validateStyle.source,"sources."+O,K,null,de))){this.map&&this.map._collectResourceTiming&&(K.collectResourceTiming=!0);var ht=this.sourceCaches[O]=new ti(O,K,this.dispatcher);ht.style=this,ht.setEventedParent(this,function(){return{isSourceLoaded:ne.loaded(),source:ht.serialize(),sourceId:O}}),ht.onAdd(this.map),this._changed=!0}},D.prototype.removeSource=function(O){if(this._checkLoaded(),this.sourceCaches[O]===void 0)throw new Error("There is no source with this ID");for(var K in this._layers)if(this._layers[K].source===O)return this.fire(new i.ErrorEvent(new Error('Source "'+O+'" cannot be removed while layer "'+K+'" is using it.')));var de=this.sourceCaches[O];delete this.sourceCaches[O],delete this._updatedSources[O],de.fire(new i.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:O})),de.setEventedParent(null),de.clearTiles(),de.onRemove&&de.onRemove(this.map),this._changed=!0},D.prototype.setGeoJSONSourceData=function(O,K){this._checkLoaded();var de=this.sourceCaches[O].getSource();de.setData(K),this._changed=!0},D.prototype.getSource=function(O){return this.sourceCaches[O]&&this.sourceCaches[O].getSource()},D.prototype.addLayer=function(O,K,de){de===void 0&&(de={}),this._checkLoaded();var ne=O.id;if(this.getLayer(ne)){this.fire(new i.ErrorEvent(new Error('Layer with id "'+ne+'" already exists on this map')));return}var be;if(O.type==="custom"){if(pl(this,i.validateCustomStyleLayer(O)))return;be=i.createStyleLayer(O)}else{if(typeof O.source=="object"&&(this.addSource(ne,O.source),O=i.clone$1(O),O=i.extend(O,{source:ne})),this._validate(i.validateStyle.layer,"layers."+ne,O,{arrayIndex:-1},de))return;be=i.createStyleLayer(O),this._validateLayer(be),be.setEventedParent(this,{layer:{id:ne}}),this._serializedLayers[be.id]=be.serialize()}var Be=K?this._order.indexOf(K):this._order.length;if(K&&Be===-1){this.fire(new i.ErrorEvent(new Error('Layer with id "'+K+'" does not exist on this map.')));return}if(this._order.splice(Be,0,ne),this._layerOrderChanged=!0,this._layers[ne]=be,this._removedLayers[ne]&&be.source&&be.type!=="custom"){var ht=this._removedLayers[ne];delete this._removedLayers[ne],ht.type!==be.type?this._updatedSources[be.source]="clear":(this._updatedSources[be.source]="reload",this.sourceCaches[be.source].pause())}this._updateLayer(be),be.onAdd&&be.onAdd(this.map)},D.prototype.moveLayer=function(O,K){this._checkLoaded(),this._changed=!0;var de=this._layers[O];if(!de){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style and cannot be moved.")));return}if(O!==K){var ne=this._order.indexOf(O);this._order.splice(ne,1);var be=K?this._order.indexOf(K):this._order.length;if(K&&be===-1){this.fire(new i.ErrorEvent(new Error('Layer with id "'+K+'" does not exist on this map.')));return}this._order.splice(be,0,O),this._layerOrderChanged=!0}},D.prototype.removeLayer=function(O){this._checkLoaded();var K=this._layers[O];if(!K){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style and cannot be removed.")));return}K.setEventedParent(null);var de=this._order.indexOf(O);this._order.splice(de,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[O]=K,delete this._layers[O],delete this._serializedLayers[O],delete this._updatedLayers[O],delete this._updatedPaintProps[O],K.onRemove&&K.onRemove(this.map)},D.prototype.getLayer=function(O){return this._layers[O]},D.prototype.hasLayer=function(O){return O in this._layers},D.prototype.setLayerZoomRange=function(O,K,de){this._checkLoaded();var ne=this.getLayer(O);if(!ne){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style and cannot have zoom extent.")));return}ne.minzoom===K&&ne.maxzoom===de||(K!=null&&(ne.minzoom=K),de!=null&&(ne.maxzoom=de),this._updateLayer(ne))},D.prototype.setFilter=function(O,K,de){de===void 0&&(de={}),this._checkLoaded();var ne=this.getLayer(O);if(!ne){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style and cannot be filtered.")));return}if(!i.deepEqual(ne.filter,K)){if(K==null){ne.filter=void 0,this._updateLayer(ne);return}this._validate(i.validateStyle.filter,"layers."+ne.id+".filter",K,null,de)||(ne.filter=i.clone$1(K),this._updateLayer(ne))}},D.prototype.getFilter=function(O){return i.clone$1(this.getLayer(O).filter)},D.prototype.setLayoutProperty=function(O,K,de,ne){ne===void 0&&(ne={}),this._checkLoaded();var be=this.getLayer(O);if(!be){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style and cannot be styled.")));return}i.deepEqual(be.getLayoutProperty(K),de)||(be.setLayoutProperty(K,de,ne),this._updateLayer(be))},D.prototype.getLayoutProperty=function(O,K){var de=this.getLayer(O);if(!de){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style.")));return}return de.getLayoutProperty(K)},D.prototype.setPaintProperty=function(O,K,de,ne){ne===void 0&&(ne={}),this._checkLoaded();var be=this.getLayer(O);if(!be){this.fire(new i.ErrorEvent(new Error("The layer '"+O+"' does not exist in the map's style and cannot be styled.")));return}if(!i.deepEqual(be.getPaintProperty(K),de)){var Be=be.setPaintProperty(K,de,ne);Be&&this._updateLayer(be),this._changed=!0,this._updatedPaintProps[O]=!0}},D.prototype.getPaintProperty=function(O,K){return this.getLayer(O).getPaintProperty(K)},D.prototype.setFeatureState=function(O,K){this._checkLoaded();var de=O.source,ne=O.sourceLayer,be=this.sourceCaches[de];if(be===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+de+"' does not exist in the map's style.")));return}var Be=be.getSource().type;if(Be==="geojson"&&ne){this.fire(new i.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(Be==="vector"&&!ne){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}O.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),be.setFeatureState(ne,O.id,K)},D.prototype.removeFeatureState=function(O,K){this._checkLoaded();var de=O.source,ne=this.sourceCaches[de];if(ne===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+de+"' does not exist in the map's style.")));return}var be=ne.getSource().type,Be=be==="vector"?O.sourceLayer:void 0;if(be==="vector"&&!Be){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(K&&typeof O.id!="string"&&typeof O.id!="number"){this.fire(new i.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}ne.removeFeatureState(Be,O.id,K)},D.prototype.getFeatureState=function(O){this._checkLoaded();var K=O.source,de=O.sourceLayer,ne=this.sourceCaches[K];if(ne===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+K+"' does not exist in the map's style.")));return}var be=ne.getSource().type;if(be==="vector"&&!de){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return O.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),ne.getFeatureState(de,O.id)},D.prototype.getTransition=function(){return i.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},D.prototype.serialize=function(){return i.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:i.mapObject(this.sourceCaches,function(O){return O.serialize()}),layers:this._serializeLayers(this._order)},function(O){return O!==void 0})},D.prototype._updateLayer=function(O){this._updatedLayers[O.id]=!0,O.source&&!this._updatedSources[O.source]&&this.sourceCaches[O.source].getSource().type!=="raster"&&(this._updatedSources[O.source]="reload",this.sourceCaches[O.source].pause()),this._changed=!0},D.prototype._flattenAndSortRenderedFeatures=function(O){for(var K=this,de=function(bi){return K._layers[bi].type==="fill-extrusion"},ne={},be=[],Be=this._order.length-1;Be>=0;Be--){var ht=this._order[Be];if(de(ht)){ne[ht]=Be;for(var Yt=0,cr=O;Yt=0;Ft--){var Ut=this._order[Ft];if(de(Ut))for(var zt=be.length-1;zt>=0;zt--){var _t=be[zt].feature;if(ne[_t.layer.id] 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`,js=Us(Cf,sc),Eu=Us(jh,Lf),Dc=Us(cs,nf),ks=Us(Gf,$l),bc=Us(fl,lc),hu=Us(Fu,Es),_u=Us(Hs,Go),nl=Us(ps,uc),nh=Us(xl,Gu),Mh=Us(qs,od),zu=Us(Po,sd),Fc=Us(Ko,Pa),wc=Us(af,Hu),bd=Us(bl,Hf),xf=Us(Ic,yf),Pf=Us(Bl,Ah),Ou=Us(Qf,_f),bf=Us(Yc,eh),jl=Us(th,ju),lf=Us(jf,cc),Xh=Us(of,Nl),If=Us(Kc,Rc),Cs=Us(gs,Wf),du=Us(Wh,rh),ku=Us(sf,Sh),Xf=Us(Mu,ih);function Us(Y,D){var J=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,q=D.match(/attribute ([\w]+) ([\w]+)/g),K=Y.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),de=D.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),ne=de?de.concat(K):K,we={};return Y=Y.replace(J,function(Ue,ft,Zt,hr,qt){return we[qt]=!0,ft==="define"?` -#ifndef HAS_UNIFORM_u_`+qt+` -varying `+Zt+" "+hr+" "+qt+`; +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`,js=Us(Cf,sc),Eu=Us(jh,Lf),Dc=Us(cs,nf),ks=Us(Gf,$l),bc=Us(fl,lc),hu=Us(Fu,Es),_u=Us(Hs,Go),nl=Us(ps,uc),nh=Us(xl,Gu),Mh=Us(Os,od),zu=Us(Po,sd),Fc=Us(Ko,Pa),wc=Us(af,Hu),bd=Us(bl,Hf),xf=Us(Ic,yf),Pf=Us(Bl,Ah),qu=Us(Qf,_f),bf=Us(Yc,eh),jl=Us(th,ju),lf=Us(jf,cc),Xh=Us(of,Nl),If=Us(Kc,Rc),Cs=Us(gs,Wf),du=Us(Wh,rh),ku=Us(sf,Sh),Xf=Us(Mu,ih);function Us(Y,D){var J=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,O=D.match(/attribute ([\w]+) ([\w]+)/g),K=Y.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),de=D.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),ne=de?de.concat(K):K,be={};return Y=Y.replace(J,function(Be,ht,Yt,cr,Nt){return be[Nt]=!0,ht==="define"?` +#ifndef HAS_UNIFORM_u_`+Nt+` +varying `+Yt+" "+cr+" "+Nt+`; #else -uniform `+Zt+" "+hr+" u_"+qt+`; +uniform `+Yt+" "+cr+" u_"+Nt+`; #endif `:` -#ifdef HAS_UNIFORM_u_`+qt+` - `+Zt+" "+hr+" "+qt+" = u_"+qt+`; -#endif -`}),D=D.replace(J,function(Ue,ft,Zt,hr,qt){var Ve=hr==="float"?"vec2":"vec4",Qe=qt.match(/color/)?"color":Ve;return we[qt]?ft==="define"?` -#ifndef HAS_UNIFORM_u_`+qt+` -uniform lowp float u_`+qt+`_t; -attribute `+Zt+" "+Ve+" a_"+qt+`; -varying `+Zt+" "+hr+" "+qt+`; +#ifdef HAS_UNIFORM_u_`+Nt+` + `+Yt+" "+cr+" "+Nt+" = u_"+Nt+`; +#endif +`}),D=D.replace(J,function(Be,ht,Yt,cr,Nt){var Ne=cr==="float"?"vec2":"vec4",$e=Nt.match(/color/)?"color":Ne;return be[Nt]?ht==="define"?` +#ifndef HAS_UNIFORM_u_`+Nt+` +uniform lowp float u_`+Nt+`_t; +attribute `+Yt+" "+Ne+" a_"+Nt+`; +varying `+Yt+" "+cr+" "+Nt+`; #else -uniform `+Zt+" "+hr+" u_"+qt+`; +uniform `+Yt+" "+cr+" u_"+Nt+`; #endif -`:Qe==="vec4"?` -#ifndef HAS_UNIFORM_u_`+qt+` - `+qt+" = a_"+qt+`; +`:$e==="vec4"?` +#ifndef HAS_UNIFORM_u_`+Nt+` + `+Nt+" = a_"+Nt+`; #else - `+Zt+" "+hr+" "+qt+" = u_"+qt+`; + `+Yt+" "+cr+" "+Nt+" = u_"+Nt+`; #endif `:` -#ifndef HAS_UNIFORM_u_`+qt+` - `+qt+" = unpack_mix_"+Qe+"(a_"+qt+", u_"+qt+`_t); +#ifndef HAS_UNIFORM_u_`+Nt+` + `+Nt+" = unpack_mix_"+$e+"(a_"+Nt+", u_"+Nt+`_t); #else - `+Zt+" "+hr+" "+qt+" = u_"+qt+`; + `+Yt+" "+cr+" "+Nt+" = u_"+Nt+`; #endif -`:ft==="define"?` -#ifndef HAS_UNIFORM_u_`+qt+` -uniform lowp float u_`+qt+`_t; -attribute `+Zt+" "+Ve+" a_"+qt+`; +`:ht==="define"?` +#ifndef HAS_UNIFORM_u_`+Nt+` +uniform lowp float u_`+Nt+`_t; +attribute `+Yt+" "+Ne+" a_"+Nt+`; #else -uniform `+Zt+" "+hr+" u_"+qt+`; +uniform `+Yt+" "+cr+" u_"+Nt+`; #endif -`:Qe==="vec4"?` -#ifndef HAS_UNIFORM_u_`+qt+` - `+Zt+" "+hr+" "+qt+" = a_"+qt+`; +`:$e==="vec4"?` +#ifndef HAS_UNIFORM_u_`+Nt+` + `+Yt+" "+cr+" "+Nt+" = a_"+Nt+`; #else - `+Zt+" "+hr+" "+qt+" = u_"+qt+`; + `+Yt+" "+cr+" "+Nt+" = u_"+Nt+`; #endif `:` -#ifndef HAS_UNIFORM_u_`+qt+` - `+Zt+" "+hr+" "+qt+" = unpack_mix_"+Qe+"(a_"+qt+", u_"+qt+`_t); +#ifndef HAS_UNIFORM_u_`+Nt+` + `+Yt+" "+cr+" "+Nt+" = unpack_mix_"+$e+"(a_"+Nt+", u_"+Nt+`_t); #else - `+Zt+" "+hr+" "+qt+" = u_"+qt+`; + `+Yt+" "+cr+" "+Nt+" = u_"+Nt+`; #endif -`}),{fragmentSource:Y,vertexSource:D,staticAttributes:q,staticUniforms:ne}}var wf=Object.freeze({__proto__:null,prelude:js,background:Eu,backgroundPattern:Dc,circle:ks,clippingMask:bc,heatmap:hu,heatmapTexture:_u,collisionBox:nl,collisionCircle:nh,debug:Mh,fill:zu,fillOutline:Fc,fillOutlinePattern:wc,fillPattern:bd,fillExtrusion:xf,fillExtrusionPattern:Pf,hillshadePrepare:Ou,hillshade:bf,line:jl,lineGradient:lf,linePattern:Xh,lineSDF:If,raster:Cs,symbolIcon:du,symbolSDF:ku,symbolTextAndIcon:Xf}),zc=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};zc.prototype.bind=function(D,J,q,K,de,ne,we,Ue){this.context=D;for(var ft=this.boundPaintVertexBuffers.length!==K.length,Zt=0;!ft&&Zt>16,we>>16],u_pixel_coord_lower:[ne&65535,we&65535]}}function uf(Y,D,J,q){var K=J.imageManager.getPattern(Y.from.toString()),de=J.imageManager.getPattern(Y.to.toString()),ne=J.imageManager.getPixelSize(),we=ne.width,Ue=ne.height,ft=Math.pow(2,q.tileID.overscaledZ),Zt=q.tileSize*Math.pow(2,J.transform.tileZoom)/ft,hr=Zt*(q.tileID.canonical.x+q.tileID.wrap*ft),qt=Zt*q.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:K.tl,u_pattern_br_a:K.br,u_pattern_tl_b:de.tl,u_pattern_br_b:de.br,u_texsize:[we,Ue],u_mix:D.t,u_pattern_size_a:K.displaySize,u_pattern_size_b:de.displaySize,u_scale_a:D.fromScale,u_scale_b:D.toScale,u_tile_units_to_pixels:1/As(q,1,J.transform.tileZoom),u_pixel_coord_upper:[hr>>16,qt>>16],u_pixel_coord_lower:[hr&65535,qt&65535]}}var Zf=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_lightpos:new i.Uniform3f(Y,D.u_lightpos),u_lightintensity:new i.Uniform1f(Y,D.u_lightintensity),u_lightcolor:new i.Uniform3f(Y,D.u_lightcolor),u_vertical_gradient:new i.Uniform1f(Y,D.u_vertical_gradient),u_opacity:new i.Uniform1f(Y,D.u_opacity)}},Wl=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_lightpos:new i.Uniform3f(Y,D.u_lightpos),u_lightintensity:new i.Uniform1f(Y,D.u_lightintensity),u_lightcolor:new i.Uniform3f(Y,D.u_lightcolor),u_vertical_gradient:new i.Uniform1f(Y,D.u_vertical_gradient),u_height_factor:new i.Uniform1f(Y,D.u_height_factor),u_image:new i.Uniform1i(Y,D.u_image),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,D.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,D.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,D.u_scale),u_fade:new i.Uniform1f(Y,D.u_fade),u_opacity:new i.Uniform1f(Y,D.u_opacity)}},ah=function(Y,D,J,q){var K=D.style.light,de=K.properties.get("position"),ne=[de.x,de.y,de.z],we=i.create$1();K.properties.get("anchor")==="viewport"&&i.fromRotation(we,-D.transform.angle),i.transformMat3(ne,ne,we);var Ue=K.properties.get("color");return{u_matrix:Y,u_lightpos:ne,u_lightintensity:K.properties.get("intensity"),u_lightcolor:[Ue.r,Ue.g,Ue.b],u_vertical_gradient:+J,u_opacity:q}},Zu=function(Y,D,J,q,K,de,ne){return i.extend(ah(Y,D,J,q),Xu(de,D,ne),{u_height_factor:-Math.pow(2,K.overscaledZ)/ne.tileSize/8})},Oc=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix)}},Tc=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_image:new i.Uniform1i(Y,D.u_image),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,D.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,D.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,D.u_scale),u_fade:new i.Uniform1f(Y,D.u_fade)}},wl=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_world:new i.Uniform2f(Y,D.u_world)}},vu=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_world:new i.Uniform2f(Y,D.u_world),u_image:new i.Uniform1i(Y,D.u_image),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,D.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,D.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,D.u_scale),u_fade:new i.Uniform1f(Y,D.u_fade)}},qc=function(Y){return{u_matrix:Y}},cf=function(Y,D,J,q){return i.extend(qc(Y),Xu(J,D,q))},fc=function(Y,D){return{u_matrix:Y,u_world:D}},Bc=function(Y,D,J,q,K){return i.extend(cf(Y,D,J,q),{u_world:K})},At=function(Y,D){return{u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_scale_with_map:new i.Uniform1i(Y,D.u_scale_with_map),u_pitch_with_map:new i.Uniform1i(Y,D.u_pitch_with_map),u_extrude_scale:new i.Uniform2f(Y,D.u_extrude_scale),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix)}},Xt=function(Y,D,J,q){var K=Y.transform,de,ne;if(q.paint.get("circle-pitch-alignment")==="map"){var we=As(J,1,K.zoom);de=!0,ne=[we,we]}else de=!1,ne=K.pixelsToGLUnits;return{u_camera_to_center_distance:K.cameraToCenterDistance,u_scale_with_map:+(q.paint.get("circle-pitch-scale")==="map"),u_matrix:Y.translatePosMatrix(D.posMatrix,J,q.paint.get("circle-translate"),q.paint.get("circle-translate-anchor")),u_pitch_with_map:+de,u_device_pixel_ratio:i.browser.devicePixelRatio,u_extrude_scale:ne}},Cr=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_pixels_to_tile_units:new i.Uniform1f(Y,D.u_pixels_to_tile_units),u_extrude_scale:new i.Uniform2f(Y,D.u_extrude_scale),u_overscale_factor:new i.Uniform1f(Y,D.u_overscale_factor)}},Ar=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_inv_matrix:new i.UniformMatrix4f(Y,D.u_inv_matrix),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_viewport_size:new i.Uniform2f(Y,D.u_viewport_size)}},Kr=function(Y,D,J){var q=As(J,1,D.zoom),K=Math.pow(2,D.zoom-J.tileID.overscaledZ),de=J.tileID.overscaleFactor();return{u_matrix:Y,u_camera_to_center_distance:D.cameraToCenterDistance,u_pixels_to_tile_units:q,u_extrude_scale:[D.pixelsToGLUnits[0]/(q*K),D.pixelsToGLUnits[1]/(q*K)],u_overscale_factor:de}},ki=function(Y,D,J){return{u_matrix:Y,u_inv_matrix:D,u_camera_to_center_distance:J.cameraToCenterDistance,u_viewport_size:[J.width,J.height]}},Xi=function(Y,D){return{u_color:new i.UniformColor(Y,D.u_color),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_overlay:new i.Uniform1i(Y,D.u_overlay),u_overlay_scale:new i.Uniform1f(Y,D.u_overlay_scale)}},dn=function(Y,D,J){return J===void 0&&(J=1),{u_matrix:Y,u_color:D,u_overlay:0,u_overlay_scale:J}},wn=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix)}},Nn=function(Y){return{u_matrix:Y}},Yi=function(Y,D){return{u_extrude_scale:new i.Uniform1f(Y,D.u_extrude_scale),u_intensity:new i.Uniform1f(Y,D.u_intensity),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix)}},Qi=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_world:new i.Uniform2f(Y,D.u_world),u_image:new i.Uniform1i(Y,D.u_image),u_color_ramp:new i.Uniform1i(Y,D.u_color_ramp),u_opacity:new i.Uniform1f(Y,D.u_opacity)}},on=function(Y,D,J,q){return{u_matrix:Y,u_extrude_scale:As(D,1,J),u_intensity:q}},Fi=function(Y,D,J,q){var K=i.create();i.ortho(K,0,Y.width,Y.height,0,0,1);var de=Y.context.gl;return{u_matrix:K,u_world:[de.drawingBufferWidth,de.drawingBufferHeight],u_image:J,u_color_ramp:q,u_opacity:D.paint.get("heatmap-opacity")}},Qn=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_image:new i.Uniform1i(Y,D.u_image),u_latrange:new i.Uniform2f(Y,D.u_latrange),u_light:new i.Uniform2f(Y,D.u_light),u_shadow:new i.UniformColor(Y,D.u_shadow),u_highlight:new i.UniformColor(Y,D.u_highlight),u_accent:new i.UniformColor(Y,D.u_accent)}},Ca=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_image:new i.Uniform1i(Y,D.u_image),u_dimension:new i.Uniform2f(Y,D.u_dimension),u_zoom:new i.Uniform1f(Y,D.u_zoom),u_unpack:new i.Uniform4f(Y,D.u_unpack)}},Ra=function(Y,D,J){var q=J.paint.get("hillshade-shadow-color"),K=J.paint.get("hillshade-highlight-color"),de=J.paint.get("hillshade-accent-color"),ne=J.paint.get("hillshade-illumination-direction")*(Math.PI/180);J.paint.get("hillshade-illumination-anchor")==="viewport"&&(ne-=Y.transform.angle);var we=!Y.options.moving;return{u_matrix:Y.transform.calculatePosMatrix(D.tileID.toUnwrapped(),we),u_image:0,u_latrange:Na(Y,D.tileID),u_light:[J.paint.get("hillshade-exaggeration"),ne],u_shadow:q,u_highlight:K,u_accent:de}},La=function(Y,D){var J=D.stride,q=i.create();return i.ortho(q,0,i.EXTENT,-i.EXTENT,0,0,1),i.translate(q,q,[0,-i.EXTENT,0]),{u_matrix:q,u_image:1,u_dimension:[J,J],u_zoom:Y.overscaledZ,u_unpack:D.getUnpackVector()}};function Na(Y,D){var J=Math.pow(2,D.canonical.z),q=D.canonical.y;return[new i.MercatorCoordinate(0,q/J).toLngLat().lat,new i.MercatorCoordinate(0,(q+1)/J).toLngLat().lat]}var Yn=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_ratio:new i.Uniform1f(Y,D.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,D.u_units_to_pixels)}},Dn=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_ratio:new i.Uniform1f(Y,D.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,D.u_units_to_pixels),u_image:new i.Uniform1i(Y,D.u_image),u_image_height:new i.Uniform1f(Y,D.u_image_height)}},Ka=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_ratio:new i.Uniform1f(Y,D.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_image:new i.Uniform1i(Y,D.u_image),u_units_to_pixels:new i.Uniform2f(Y,D.u_units_to_pixels),u_scale:new i.Uniform3f(Y,D.u_scale),u_fade:new i.Uniform1f(Y,D.u_fade)}},bo=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_ratio:new i.Uniform1f(Y,D.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,D.u_units_to_pixels),u_patternscale_a:new i.Uniform2f(Y,D.u_patternscale_a),u_patternscale_b:new i.Uniform2f(Y,D.u_patternscale_b),u_sdfgamma:new i.Uniform1f(Y,D.u_sdfgamma),u_image:new i.Uniform1i(Y,D.u_image),u_tex_y_a:new i.Uniform1f(Y,D.u_tex_y_a),u_tex_y_b:new i.Uniform1f(Y,D.u_tex_y_b),u_mix:new i.Uniform1f(Y,D.u_mix)}},Zo=function(Y,D,J){var q=Y.transform;return{u_matrix:ml(Y,D,J),u_ratio:1/As(D,1,q.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_units_to_pixels:[1/q.pixelsToGLUnits[0],1/q.pixelsToGLUnits[1]]}},Ss=function(Y,D,J,q){return i.extend(Zo(Y,D,J),{u_image:0,u_image_height:q})},as=function(Y,D,J,q){var K=Y.transform,de=Ho(D,K);return{u_matrix:ml(Y,D,J),u_texsize:D.imageAtlasTexture.size,u_ratio:1/As(D,1,K.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_image:0,u_scale:[de,q.fromScale,q.toScale],u_fade:q.t,u_units_to_pixels:[1/K.pixelsToGLUnits[0],1/K.pixelsToGLUnits[1]]}},ws=function(Y,D,J,q,K){var de=Y.transform,ne=Y.lineAtlas,we=Ho(D,de),Ue=J.layout.get("line-cap")==="round",ft=ne.getDash(q.from,Ue),Zt=ne.getDash(q.to,Ue),hr=ft.width*K.fromScale,qt=Zt.width*K.toScale;return i.extend(Zo(Y,D,J),{u_patternscale_a:[we/hr,-ft.height/2],u_patternscale_b:[we/qt,-Zt.height/2],u_sdfgamma:ne.width/(Math.min(hr,qt)*256*i.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:ft.y,u_tex_y_b:Zt.y,u_mix:K.t})};function Ho(Y,D){return 1/As(Y,1,D.tileZoom)}function ml(Y,D,J){return Y.translatePosMatrix(D.tileID.posMatrix,D,J.paint.get("line-translate"),J.paint.get("line-translate-anchor"))}var Ws=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_tl_parent:new i.Uniform2f(Y,D.u_tl_parent),u_scale_parent:new i.Uniform1f(Y,D.u_scale_parent),u_buffer_scale:new i.Uniform1f(Y,D.u_buffer_scale),u_fade_t:new i.Uniform1f(Y,D.u_fade_t),u_opacity:new i.Uniform1f(Y,D.u_opacity),u_image0:new i.Uniform1i(Y,D.u_image0),u_image1:new i.Uniform1i(Y,D.u_image1),u_brightness_low:new i.Uniform1f(Y,D.u_brightness_low),u_brightness_high:new i.Uniform1f(Y,D.u_brightness_high),u_saturation_factor:new i.Uniform1f(Y,D.u_saturation_factor),u_contrast_factor:new i.Uniform1f(Y,D.u_contrast_factor),u_spin_weights:new i.Uniform3f(Y,D.u_spin_weights)}},Ls=function(Y,D,J,q,K){return{u_matrix:Y,u_tl_parent:D,u_scale_parent:J,u_buffer_scale:1,u_fade_t:q.mix,u_opacity:q.opacity*K.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:K.paint.get("raster-brightness-min"),u_brightness_high:K.paint.get("raster-brightness-max"),u_saturation_factor:ys(K.paint.get("raster-saturation")),u_contrast_factor:no(K.paint.get("raster-contrast")),u_spin_weights:va(K.paint.get("raster-hue-rotate"))}};function va(Y){Y*=Math.PI/180;var D=Math.sin(Y),J=Math.cos(Y);return[(2*J+1)/3,(-Math.sqrt(3)*D-J+1)/3,(Math.sqrt(3)*D-J+1)/3]}function no(Y){return Y>0?1/(1-Y):1+Y}function ys(Y){return Y>0?1-1/(1.001-Y):-Y}var rs=function(Y,D){return{u_is_size_zoom_constant:new i.Uniform1i(Y,D.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,D.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,D.u_size_t),u_size:new i.Uniform1f(Y,D.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,D.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,D.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,D.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,D.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,D.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,D.u_coord_matrix),u_is_text:new i.Uniform1i(Y,D.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,D.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_texture:new i.Uniform1i(Y,D.u_texture)}},Ql=function(Y,D){return{u_is_size_zoom_constant:new i.Uniform1i(Y,D.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,D.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,D.u_size_t),u_size:new i.Uniform1f(Y,D.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,D.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,D.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,D.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,D.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,D.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,D.u_coord_matrix),u_is_text:new i.Uniform1i(Y,D.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,D.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_texture:new i.Uniform1i(Y,D.u_texture),u_gamma_scale:new i.Uniform1f(Y,D.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(Y,D.u_is_halo)}},Cu=function(Y,D){return{u_is_size_zoom_constant:new i.Uniform1i(Y,D.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,D.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,D.u_size_t),u_size:new i.Uniform1f(Y,D.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,D.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,D.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,D.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,D.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,D.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,D.u_coord_matrix),u_is_text:new i.Uniform1i(Y,D.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,D.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_texsize_icon:new i.Uniform2f(Y,D.u_texsize_icon),u_texture:new i.Uniform1i(Y,D.u_texture),u_texture_icon:new i.Uniform1i(Y,D.u_texture_icon),u_gamma_scale:new i.Uniform1f(Y,D.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(Y,D.u_is_halo)}},Yu=function(Y,D,J,q,K,de,ne,we,Ue,ft){var Zt=K.transform;return{u_is_size_zoom_constant:+(Y==="constant"||Y==="source"),u_is_size_feature_constant:+(Y==="constant"||Y==="camera"),u_size_t:D?D.uSizeT:0,u_size:D?D.uSize:0,u_camera_to_center_distance:Zt.cameraToCenterDistance,u_pitch:Zt.pitch/360*2*Math.PI,u_rotate_symbol:+J,u_aspect_ratio:Zt.width/Zt.height,u_fade_change:K.options.fadeDuration?K.symbolFadeChange:1,u_matrix:de,u_label_plane_matrix:ne,u_coord_matrix:we,u_is_text:+Ue,u_pitch_with_map:+q,u_texsize:ft,u_texture:0}},Nc=function(Y,D,J,q,K,de,ne,we,Ue,ft,Zt){var hr=K.transform;return i.extend(Yu(Y,D,J,q,K,de,ne,we,Ue,ft),{u_gamma_scale:q?Math.cos(hr._pitch)*hr.cameraToCenterDistance:1,u_device_pixel_ratio:i.browser.devicePixelRatio,u_is_halo:+Zt})},pu=function(Y,D,J,q,K,de,ne,we,Ue,ft){return i.extend(Nc(Y,D,J,q,K,de,ne,we,!0,Ue,!0),{u_texsize_icon:ft,u_texture_icon:1})},Uc=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_opacity:new i.Uniform1f(Y,D.u_opacity),u_color:new i.UniformColor(Y,D.u_color)}},xu=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_opacity:new i.Uniform1f(Y,D.u_opacity),u_image:new i.Uniform1i(Y,D.u_image),u_pattern_tl_a:new i.Uniform2f(Y,D.u_pattern_tl_a),u_pattern_br_a:new i.Uniform2f(Y,D.u_pattern_br_a),u_pattern_tl_b:new i.Uniform2f(Y,D.u_pattern_tl_b),u_pattern_br_b:new i.Uniform2f(Y,D.u_pattern_br_b),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_mix:new i.Uniform1f(Y,D.u_mix),u_pattern_size_a:new i.Uniform2f(Y,D.u_pattern_size_a),u_pattern_size_b:new i.Uniform2f(Y,D.u_pattern_size_b),u_scale_a:new i.Uniform1f(Y,D.u_scale_a),u_scale_b:new i.Uniform1f(Y,D.u_scale_b),u_pixel_coord_upper:new i.Uniform2f(Y,D.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,D.u_pixel_coord_lower),u_tile_units_to_pixels:new i.Uniform1f(Y,D.u_tile_units_to_pixels)}},Ac=function(Y,D,J){return{u_matrix:Y,u_opacity:D,u_color:J}},Ua=function(Y,D,J,q,K,de){return i.extend(uf(q,de,J,K),{u_matrix:Y,u_opacity:D})},oo={fillExtrusion:Zf,fillExtrusionPattern:Wl,fill:Oc,fillPattern:Tc,fillOutline:wl,fillOutlinePattern:vu,circle:At,collisionBox:Cr,collisionCircle:Ar,debug:Xi,clippingMask:wn,heatmap:Yi,heatmapTexture:Qi,hillshade:Qn,hillshadePrepare:Ca,line:Yn,lineGradient:Dn,linePattern:Ka,lineSDF:bo,raster:Ws,symbolIcon:rs,symbolSDF:Ql,symbolTextAndIcon:Cu,background:Uc,backgroundPattern:xu},Vc;function hc(Y,D,J,q,K,de,ne){for(var we=Y.context,Ue=we.gl,ft=Y.useProgram("collisionBox"),Zt=[],hr=0,qt=0,Ve=0;Ve0){var Dt=i.create(),yt=Ot;i.mul(Dt,Ct.placementInvProjMatrix,Y.transform.glCoordMatrix),i.mul(Dt,Dt,Ct.placementViewportMatrix),Zt.push({circleArray:Bt,circleOffset:qt,transform:yt,invTransform:Dt}),hr+=Bt.length/4,qt=hr}Rt&&ft.draw(we,Ue.LINES,wi.disabled,Fn.disabled,Y.colorModeForRenderPass(),Er.disabled,Kr(Ot,Y.transform,at),J.id,Rt.layoutVertexBuffer,Rt.indexBuffer,Rt.segments,null,Y.transform.zoom,null,null,Rt.collisionVertexBuffer)}}if(!(!ne||!Zt.length)){var Pt=Y.useProgram("collisionCircle"),ht=new i.StructArrayLayout2f1f2i16;ht.resize(hr*4),ht._trim();for(var ur=0,br=0,Ur=Zt;br=0&&(Qe[Ct.associatedIconIndex]={shiftedAnchor:Ti,angle:gn})}}if(Zt){Ve.clear();for(var Ci=Y.icon.placedSymbolArray,Bi=0;Bi0){var ne=i.browser.now(),we=(ne-Y.timeAdded)/de,Ue=D?(ne-D.timeAdded)/de:-1,ft=J.getSource(),Zt=K.coveringZoomLevel({tileSize:ft.tileSize,roundZoom:ft.roundZoom}),hr=!D||Math.abs(D.tileID.overscaledZ-Zt)>Math.abs(Y.tileID.overscaledZ-Zt),qt=hr&&Y.refreshedUponExpiration?1:i.clamp(hr?we:1-Ue,0,1);return Y.refreshedUponExpiration&&we>=1&&(Y.refreshedUponExpiration=!1),D?{opacity:1,mix:1-qt}:{opacity:qt,mix:0}}else return{opacity:1,mix:0}}function tr(Y,D,J){var q=J.paint.get("background-color"),K=J.paint.get("background-opacity");if(K!==0){var de=Y.context,ne=de.gl,we=Y.transform,Ue=we.tileSize,ft=J.paint.get("background-pattern");if(!Y.isPatternMissing(ft)){var Zt=!ft&&q.a===1&&K===1&&Y.opaquePassEnabledForLayer()?"opaque":"translucent";if(Y.renderPass===Zt){var hr=Fn.disabled,qt=Y.depthModeForSublayer(0,Zt==="opaque"?wi.ReadWrite:wi.ReadOnly),Ve=Y.colorModeForRenderPass(),Qe=Y.useProgram(ft?"backgroundPattern":"background"),at=we.coveringTiles({tileSize:Ue});ft&&(de.activeTexture.set(ne.TEXTURE0),Y.imageManager.bind(Y.context));for(var Ct=J.getCrossfadeParameters(),Ot=0,Rt=at;Ot "+J.overscaledZ);var Ot=Ct+" "+Ve+"kb";$a(Y,Ot),ne.draw(q,K.TRIANGLES,we,Ue,wt.alphaBlended,Er.disabled,dn(de,i.Color.transparent,at),Zt,Y.debugBuffer,Y.quadTriangleIndexBuffer,Y.debugSegments)}function $a(Y,D){Y.initDebugOverlayCanvas();var J=Y.debugOverlayCanvas,q=Y.context.gl,K=Y.debugOverlayCanvas.getContext("2d");K.clearRect(0,0,J.width,J.height),K.shadowColor="white",K.shadowBlur=2,K.lineWidth=1.5,K.strokeStyle="white",K.textBaseline="top",K.font="bold 36px Open Sans, sans-serif",K.fillText(D,5,5),K.strokeText(D,5,5),Y.debugOverlayTexture.update(J),Y.debugOverlayTexture.bind(q.LINEAR,q.CLAMP_TO_EDGE)}function Co(Y,D,J){var q=Y.context,K=J.implementation;if(Y.renderPass==="offscreen"){var de=K.prerender;de&&(Y.setCustomLayerDefaults(),q.setColorMode(Y.colorModeForRenderPass()),de.call(K,q.gl,Y.transform.customLayerMatrix()),q.setDirty(),Y.setBaseState())}else if(Y.renderPass==="translucent"){Y.setCustomLayerDefaults(),q.setColorMode(Y.colorModeForRenderPass()),q.setStencilMode(Fn.disabled);var ne=K.renderingMode==="3d"?new wi(Y.context.gl.LEQUAL,wi.ReadWrite,Y.depthRangeFor3D):Y.depthModeForSublayer(0,wi.ReadOnly);q.setDepthMode(ne),K.render(q.gl,Y.transform.customLayerMatrix()),q.setDirty(),Y.setBaseState(),q.bindFramebuffer.set(null)}}var Qa={symbol:w,circle:st,heatmap:Tt,line:Ir,fill:ve,"fill-extrusion":Re,hillshade:et,raster:Ft,background:tr,debug:Aa,custom:Co},mo=function(D,J){this.context=new Xr(D),this.transform=J,this._tileTextures={},this.setup(),this.numSublayers=ri.maxUnderzooming+ri.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Vf,this.gpuTimers={}};mo.prototype.resize=function(D,J){if(this.width=D*i.browser.devicePixelRatio,this.height=J*i.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var q=0,K=this.style._order;q256&&this.clearStencil(),q.setColorMode(wt.disabled),q.setDepthMode(wi.disabled);var de=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var ne=0,we=J;ne256&&this.clearStencil();var D=this.nextStencilID++,J=this.context.gl;return new Fn({func:J.NOTEQUAL,mask:255},D,255,J.KEEP,J.KEEP,J.REPLACE)},mo.prototype.stencilModeForClipping=function(D){var J=this.context.gl;return new Fn({func:J.EQUAL,mask:255},this._tileClippingMaskIDs[D.key],0,J.KEEP,J.KEEP,J.REPLACE)},mo.prototype.stencilConfigForOverlap=function(D){var J,q=this.context.gl,K=D.sort(function(ft,Zt){return Zt.overscaledZ-ft.overscaledZ}),de=K[K.length-1].overscaledZ,ne=K[0].overscaledZ-de+1;if(ne>1){this.currentStencilSource=void 0,this.nextStencilID+ne>256&&this.clearStencil();for(var we={},Ue=0;Ue=0;this.currentLayer--){var Dt=this.style._layers[K[this.currentLayer]],yt=de[Dt.source],Pt=Ue[Dt.source];this._renderTileClippingMasks(Dt,Pt),this.renderLayer(this,yt,Dt,Pt)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?J.pop():null},mo.prototype.isPatternMissing=function(D){if(!D)return!1;if(!D.from||!D.to)return!0;var J=this.imageManager.getPattern(D.from.toString()),q=this.imageManager.getPattern(D.to.toString());return!J||!q},mo.prototype.useProgram=function(D,J){this.cache=this.cache||{};var q=""+D+(J?J.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[q]||(this.cache[q]=new Rf(this.context,D,wf[D],J,oo[D],this._showOverdrawInspector)),this.cache[q]},mo.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},mo.prototype.setBaseState=function(){var D=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(D.FUNC_ADD)},mo.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=i.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var D=this.context.gl;this.debugOverlayTexture=new i.Texture(this.context,this.debugOverlayCanvas,D.RGBA)}},mo.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var Bo=function(D,J){this.points=D,this.planes=J};Bo.fromInvProjectionMatrix=function(D,J,q){var K=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]],de=Math.pow(2,q),ne=K.map(function(ft){return i.transformMat4([],ft,D)}).map(function(ft){return i.scale$1([],ft,1/ft[3]/J*de)}),we=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],Ue=we.map(function(ft){var Zt=i.sub([],ne[ft[0]],ne[ft[1]]),hr=i.sub([],ne[ft[2]],ne[ft[1]]),qt=i.normalize([],i.cross([],Zt,hr)),Ve=-i.dot(qt,ne[ft[1]]);return qt.concat(Ve)});return new Bo(ne,Ue)};var Ps=function(D,J){this.min=D,this.max=J,this.center=i.scale$2([],i.add([],this.min,this.max),.5)};Ps.prototype.quadrant=function(D){for(var J=[D%2===0,D<2],q=i.clone$2(this.min),K=i.clone$2(this.max),de=0;de=0;if(ne===0)return 0;ne!==J.length&&(q=!1)}if(q)return 2;for(var Ue=0;Ue<3;Ue++){for(var ft=Number.MAX_VALUE,Zt=-Number.MAX_VALUE,hr=0;hrthis.max[Ue]-this.min[Ue])return 0}return 1};var Ts=function(D,J,q,K){if(D===void 0&&(D=0),J===void 0&&(J=0),q===void 0&&(q=0),K===void 0&&(K=0),isNaN(D)||D<0||isNaN(J)||J<0||isNaN(q)||q<0||isNaN(K)||K<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=D,this.bottom=J,this.left=q,this.right=K};Ts.prototype.interpolate=function(D,J,q){return J.top!=null&&D.top!=null&&(this.top=i.number(D.top,J.top,q)),J.bottom!=null&&D.bottom!=null&&(this.bottom=i.number(D.bottom,J.bottom,q)),J.left!=null&&D.left!=null&&(this.left=i.number(D.left,J.left,q)),J.right!=null&&D.right!=null&&(this.right=i.number(D.right,J.right,q)),this},Ts.prototype.getCenter=function(D,J){var q=i.clamp((this.left+D-this.right)/2,0,D),K=i.clamp((this.top+J-this.bottom)/2,0,J);return new i.Point(q,K)},Ts.prototype.equals=function(D){return this.top===D.top&&this.bottom===D.bottom&&this.left===D.left&&this.right===D.right},Ts.prototype.clone=function(){return new Ts(this.top,this.bottom,this.left,this.right)},Ts.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var wo=function(D,J,q,K,de){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=de===void 0?!0:de,this._minZoom=D||0,this._maxZoom=J||22,this._minPitch=q==null?0:q,this._maxPitch=K==null?60:K,this.setMaxBounds(),this.width=0,this.height=0,this._center=new i.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Ts,this._posMatrixCache={},this._alignedPosMatrixCache={}},To={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};wo.prototype.clone=function(){var D=new wo(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return D.tileSize=this.tileSize,D.latRange=this.latRange,D.width=this.width,D.height=this.height,D._center=this._center,D.zoom=this.zoom,D.angle=this.angle,D._fov=this._fov,D._pitch=this._pitch,D._unmodified=this._unmodified,D._edgeInsets=this._edgeInsets.clone(),D._calcMatrices(),D},To.minZoom.get=function(){return this._minZoom},To.minZoom.set=function(Y){this._minZoom!==Y&&(this._minZoom=Y,this.zoom=Math.max(this.zoom,Y))},To.maxZoom.get=function(){return this._maxZoom},To.maxZoom.set=function(Y){this._maxZoom!==Y&&(this._maxZoom=Y,this.zoom=Math.min(this.zoom,Y))},To.minPitch.get=function(){return this._minPitch},To.minPitch.set=function(Y){this._minPitch!==Y&&(this._minPitch=Y,this.pitch=Math.max(this.pitch,Y))},To.maxPitch.get=function(){return this._maxPitch},To.maxPitch.set=function(Y){this._maxPitch!==Y&&(this._maxPitch=Y,this.pitch=Math.min(this.pitch,Y))},To.renderWorldCopies.get=function(){return this._renderWorldCopies},To.renderWorldCopies.set=function(Y){Y===void 0?Y=!0:Y===null&&(Y=!1),this._renderWorldCopies=Y},To.worldSize.get=function(){return this.tileSize*this.scale},To.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},To.size.get=function(){return new i.Point(this.width,this.height)},To.bearing.get=function(){return-this.angle/Math.PI*180},To.bearing.set=function(Y){var D=-i.wrap(Y,-180,180)*Math.PI/180;this.angle!==D&&(this._unmodified=!1,this.angle=D,this._calcMatrices(),this.rotationMatrix=i.create$2(),i.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},To.pitch.get=function(){return this._pitch/Math.PI*180},To.pitch.set=function(Y){var D=i.clamp(Y,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==D&&(this._unmodified=!1,this._pitch=D,this._calcMatrices())},To.fov.get=function(){return this._fov/Math.PI*180},To.fov.set=function(Y){Y=Math.max(.01,Math.min(60,Y)),this._fov!==Y&&(this._unmodified=!1,this._fov=Y/180*Math.PI,this._calcMatrices())},To.zoom.get=function(){return this._zoom},To.zoom.set=function(Y){var D=Math.min(Math.max(Y,this.minZoom),this.maxZoom);this._zoom!==D&&(this._unmodified=!1,this._zoom=D,this.scale=this.zoomScale(D),this.tileZoom=Math.floor(D),this.zoomFraction=D-this.tileZoom,this._constrain(),this._calcMatrices())},To.center.get=function(){return this._center},To.center.set=function(Y){Y.lat===this._center.lat&&Y.lng===this._center.lng||(this._unmodified=!1,this._center=Y,this._constrain(),this._calcMatrices())},To.padding.get=function(){return this._edgeInsets.toJSON()},To.padding.set=function(Y){this._edgeInsets.equals(Y)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,Y,1),this._calcMatrices())},To.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},wo.prototype.isPaddingEqual=function(D){return this._edgeInsets.equals(D)},wo.prototype.interpolatePadding=function(D,J,q){this._unmodified=!1,this._edgeInsets.interpolate(D,J,q),this._constrain(),this._calcMatrices()},wo.prototype.coveringZoomLevel=function(D){var J=(D.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/D.tileSize));return Math.max(0,J)},wo.prototype.getVisibleUnwrappedCoordinates=function(D){var J=[new i.UnwrappedTileID(0,D)];if(this._renderWorldCopies)for(var q=this.pointCoordinate(new i.Point(0,0)),K=this.pointCoordinate(new i.Point(this.width,0)),de=this.pointCoordinate(new i.Point(this.width,this.height)),ne=this.pointCoordinate(new i.Point(0,this.height)),we=Math.floor(Math.min(q.x,K.x,de.x,ne.x)),Ue=Math.floor(Math.max(q.x,K.x,de.x,ne.x)),ft=1,Zt=we-ft;Zt<=Ue+ft;Zt++)Zt!==0&&J.push(new i.UnwrappedTileID(Zt,D));return J},wo.prototype.coveringTiles=function(D){var J=this.coveringZoomLevel(D),q=J;if(D.minzoom!==void 0&&JD.maxzoom&&(J=D.maxzoom);var K=i.MercatorCoordinate.fromLngLat(this.center),de=Math.pow(2,J),ne=[de*K.x,de*K.y,0],we=Bo.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,J),Ue=D.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(Ue=J);var ft=3,Zt=function(fi){return{aabb:new Ps([fi*de,0,0],[(fi+1)*de,de,0]),zoom:0,x:0,y:0,wrap:fi,fullyVisible:!1}},hr=[],qt=[],Ve=J,Qe=D.reparseOverscaled?q:J;if(this._renderWorldCopies)for(var at=1;at<=3;at++)hr.push(Zt(-at)),hr.push(Zt(at));for(hr.push(Zt(0));hr.length>0;){var Ct=hr.pop(),Ot=Ct.x,Rt=Ct.y,Bt=Ct.fullyVisible;if(!Bt){var Dt=Ct.aabb.intersects(we);if(Dt===0)continue;Bt=Dt===2}var yt=Ct.aabb.distanceX(ne),Pt=Ct.aabb.distanceY(ne),ht=Math.max(Math.abs(yt),Math.abs(Pt)),ur=ft+(1<ur&&Ct.zoom>=Ue){qt.push({tileID:new i.OverscaledTileID(Ct.zoom===Ve?Qe:Ct.zoom,Ct.wrap,Ct.zoom,Ot,Rt),distanceSq:i.sqrLen([ne[0]-.5-Ot,ne[1]-.5-Rt])});continue}for(var br=0;br<4;br++){var Ur=(Ot<<1)+br%2,Di=(Rt<<1)+(br>>1);hr.push({aabb:Ct.aabb.quadrant(br),zoom:Ct.zoom+1,x:Ur,y:Di,wrap:Ct.wrap,fullyVisible:Bt})}}return qt.sort(function(fi,Ti){return fi.distanceSq-Ti.distanceSq}).map(function(fi){return fi.tileID})},wo.prototype.resize=function(D,J){this.width=D,this.height=J,this.pixelsToGLUnits=[2/D,-2/J],this._constrain(),this._calcMatrices()},To.unmodified.get=function(){return this._unmodified},wo.prototype.zoomScale=function(D){return Math.pow(2,D)},wo.prototype.scaleZoom=function(D){return Math.log(D)/Math.LN2},wo.prototype.project=function(D){var J=i.clamp(D.lat,-this.maxValidLatitude,this.maxValidLatitude);return new i.Point(i.mercatorXfromLng(D.lng)*this.worldSize,i.mercatorYfromLat(J)*this.worldSize)},wo.prototype.unproject=function(D){return new i.MercatorCoordinate(D.x/this.worldSize,D.y/this.worldSize).toLngLat()},To.point.get=function(){return this.project(this.center)},wo.prototype.setLocationAtPoint=function(D,J){var q=this.pointCoordinate(J),K=this.pointCoordinate(this.centerPoint),de=this.locationCoordinate(D),ne=new i.MercatorCoordinate(de.x-(q.x-K.x),de.y-(q.y-K.y));this.center=this.coordinateLocation(ne),this._renderWorldCopies&&(this.center=this.center.wrap())},wo.prototype.locationPoint=function(D){return this.coordinatePoint(this.locationCoordinate(D))},wo.prototype.pointLocation=function(D){return this.coordinateLocation(this.pointCoordinate(D))},wo.prototype.locationCoordinate=function(D){return i.MercatorCoordinate.fromLngLat(D)},wo.prototype.coordinateLocation=function(D){return D.toLngLat()},wo.prototype.pointCoordinate=function(D){var J=0,q=[D.x,D.y,0,1],K=[D.x,D.y,1,1];i.transformMat4(q,q,this.pixelMatrixInverse),i.transformMat4(K,K,this.pixelMatrixInverse);var de=q[3],ne=K[3],we=q[0]/de,Ue=K[0]/ne,ft=q[1]/de,Zt=K[1]/ne,hr=q[2]/de,qt=K[2]/ne,Ve=hr===qt?0:(J-hr)/(qt-hr);return new i.MercatorCoordinate(i.number(we,Ue,Ve)/this.worldSize,i.number(ft,Zt,Ve)/this.worldSize)},wo.prototype.coordinatePoint=function(D){var J=[D.x*this.worldSize,D.y*this.worldSize,0,1];return i.transformMat4(J,J,this.pixelMatrix),new i.Point(J[0]/J[3],J[1]/J[3])},wo.prototype.getBounds=function(){return new i.LngLatBounds().extend(this.pointLocation(new i.Point(0,0))).extend(this.pointLocation(new i.Point(this.width,0))).extend(this.pointLocation(new i.Point(this.width,this.height))).extend(this.pointLocation(new i.Point(0,this.height)))},wo.prototype.getMaxBounds=function(){return!this.latRange||this.latRange.length!==2||!this.lngRange||this.lngRange.length!==2?null:new i.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]])},wo.prototype.setMaxBounds=function(D){D?(this.lngRange=[D.getWest(),D.getEast()],this.latRange=[D.getSouth(),D.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},wo.prototype.calculatePosMatrix=function(D,J){J===void 0&&(J=!1);var q=D.key,K=J?this._alignedPosMatrixCache:this._posMatrixCache;if(K[q])return K[q];var de=D.canonical,ne=this.worldSize/this.zoomScale(de.z),we=de.x+Math.pow(2,de.z)*D.wrap,Ue=i.identity(new Float64Array(16));return i.translate(Ue,Ue,[we*ne,de.y*ne,0]),i.scale(Ue,Ue,[ne/i.EXTENT,ne/i.EXTENT,1]),i.multiply(Ue,J?this.alignedProjMatrix:this.projMatrix,Ue),K[q]=new Float32Array(Ue),K[q]},wo.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},wo.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var D=-90,J=90,q=-180,K=180,de,ne,we,Ue,ft=this.size,Zt=this._unmodified;if(this.latRange){var hr=this.latRange;D=i.mercatorYfromLat(hr[1])*this.worldSize,J=i.mercatorYfromLat(hr[0])*this.worldSize,de=J-DJ&&(Ue=J-Ct)}if(this.lngRange){var Ot=Ve.x,Rt=ft.x/2;Ot-RtK&&(we=K-Rt)}(we!==void 0||Ue!==void 0)&&(this.center=this.unproject(new i.Point(we!==void 0?we:Ve.x,Ue!==void 0?Ue:Ve.y))),this._unmodified=Zt,this._constraining=!1}},wo.prototype._calcMatrices=function(){if(this.height){var D=this._fov/2,J=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(D)*this.height;var q=Math.PI/2+this._pitch,K=this._fov*(.5+J.y/this.height),de=Math.sin(K)*this.cameraToCenterDistance/Math.sin(i.clamp(Math.PI-q-K,.01,Math.PI-.01)),ne=this.point,we=ne.x,Ue=ne.y,ft=Math.cos(Math.PI/2-this._pitch)*de+this.cameraToCenterDistance,Zt=ft*1.01,hr=this.height/50,qt=new Float64Array(16);i.perspective(qt,this._fov,this.width/this.height,hr,Zt),qt[8]=-J.x*2/this.width,qt[9]=J.y*2/this.height,i.scale(qt,qt,[1,-1,1]),i.translate(qt,qt,[0,0,-this.cameraToCenterDistance]),i.rotateX(qt,qt,this._pitch),i.rotateZ(qt,qt,this.angle),i.translate(qt,qt,[-we,-Ue,0]),this.mercatorMatrix=i.scale([],qt,[this.worldSize,this.worldSize,this.worldSize]),i.scale(qt,qt,[1,1,i.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=qt,this.invProjMatrix=i.invert([],this.projMatrix);var Ve=this.width%2/2,Qe=this.height%2/2,at=Math.cos(this.angle),Ct=Math.sin(this.angle),Ot=we-Math.round(we)+at*Ve+Ct*Qe,Rt=Ue-Math.round(Ue)+at*Qe+Ct*Ve,Bt=new Float64Array(qt);if(i.translate(Bt,Bt,[Ot>.5?Ot-1:Ot,Rt>.5?Rt-1:Rt,0]),this.alignedProjMatrix=Bt,qt=i.create(),i.scale(qt,qt,[this.width/2,-this.height/2,1]),i.translate(qt,qt,[1,-1,0]),this.labelPlaneMatrix=qt,qt=i.create(),i.scale(qt,qt,[1,-1,1]),i.translate(qt,qt,[-1,-1,0]),i.scale(qt,qt,[2/this.width,2/this.height,1]),this.glCoordMatrix=qt,this.pixelMatrix=i.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),qt=i.invert(new Float64Array(16),this.pixelMatrix),!qt)throw new Error("failed to invert matrix");this.pixelMatrixInverse=qt,this._posMatrixCache={},this._alignedPosMatrixCache={}}},wo.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var D=this.pointCoordinate(new i.Point(0,0)),J=[D.x*this.worldSize,D.y*this.worldSize,0,1],q=i.transformMat4(J,J,this.pixelMatrix);return q[3]/this.cameraToCenterDistance},wo.prototype.getCameraPoint=function(){var D=this._pitch,J=Math.tan(D)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new i.Point(0,J))},wo.prototype.getCameraQueryGeometry=function(D){var J=this.getCameraPoint();if(D.length===1)return[D[0],J];for(var q=J.x,K=J.y,de=J.x,ne=J.y,we=0,Ue=D;we=3&&!D.some(function(q){return isNaN(q)})){var J=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(D[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+D[2],+D[1]],zoom:+D[0],bearing:J,pitch:+(D[4]||0)}),!0}return!1},Ul.prototype._updateHashUnthrottled=function(){var D=i.window.location.href.replace(/(#.+)?$/,this.getHashString());try{i.window.history.replaceState(i.window.history.state,null,D)}catch(J){}};var Lu={linearity:.3,easing:i.bezier(0,0,.3,1)},au=i.extend({deceleration:2500,maxSpeed:1400},Lu),Js=i.extend({deceleration:20,maxSpeed:1400},Lu),eu=i.extend({deceleration:1e3,maxSpeed:360},Lu),dc=i.extend({deceleration:1e3,maxSpeed:90},Lu),Tl=function(D){this._map=D,this.clear()};Tl.prototype.clear=function(){this._inertiaBuffer=[]},Tl.prototype.record=function(D){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:i.browser.now(),settings:D})},Tl.prototype._drainInertiaBuffer=function(){for(var D=this._inertiaBuffer,J=i.browser.now(),q=160;D.length>0&&J-D[0].time>q;)D.shift()},Tl.prototype._onMoveEnd=function(D){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var J={zoom:0,bearing:0,pitch:0,pan:new i.Point(0,0),pinchAround:void 0,around:void 0},q=0,K=this._inertiaBuffer;q=this._clickTolerance||this._map.fire(new se(D.type,this._map,D))},He.prototype.dblclick=function(D){return this._firePreventable(new se(D.type,this._map,D))},He.prototype.mouseover=function(D){this._map.fire(new se(D.type,this._map,D))},He.prototype.mouseout=function(D){this._map.fire(new se(D.type,this._map,D))},He.prototype.touchstart=function(D){return this._firePreventable(new Te(D.type,this._map,D))},He.prototype.touchmove=function(D){this._map.fire(new Te(D.type,this._map,D))},He.prototype.touchend=function(D){this._map.fire(new Te(D.type,this._map,D))},He.prototype.touchcancel=function(D){this._map.fire(new Te(D.type,this._map,D))},He.prototype._firePreventable=function(D){if(this._map.fire(D),D.defaultPrevented)return{}},He.prototype.isEnabled=function(){return!0},He.prototype.isActive=function(){return!1},He.prototype.enable=function(){},He.prototype.disable=function(){};var Ye=function(D){this._map=D};Ye.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Ye.prototype.mousemove=function(D){this._map.fire(new se(D.type,this._map,D))},Ye.prototype.mousedown=function(){this._delayContextMenu=!0},Ye.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new se("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Ye.prototype.contextmenu=function(D){this._delayContextMenu?this._contextMenuEvent=D:this._map.fire(new se(D.type,this._map,D)),this._map.listens("contextmenu")&&D.preventDefault()},Ye.prototype.isEnabled=function(){return!0},Ye.prototype.isActive=function(){return!1},Ye.prototype.enable=function(){},Ye.prototype.disable=function(){};var kt=function(D,J){this._map=D,this._el=D.getCanvasContainer(),this._container=D.getContainer(),this._clickTolerance=J.clickTolerance||1};kt.prototype.isEnabled=function(){return!!this._enabled},kt.prototype.isActive=function(){return!!this._active},kt.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},kt.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},kt.prototype.mousedown=function(D,J){this.isEnabled()&&D.shiftKey&&D.button===0&&(o.disableDrag(),this._startPos=this._lastPos=J,this._active=!0)},kt.prototype.mousemoveWindow=function(D,J){if(this._active){var q=J;if(!(this._lastPos.equals(q)||!this._box&&q.dist(this._startPos)this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=D.timeStamp),q.length===this.numTouches&&(this.centroid=jt(J),this.touches=nt(q,J)))},qr.prototype.touchmove=function(D,J,q){if(!(this.aborted||!this.centroid)){var K=nt(q,J);for(var de in this.touches){var ne=this.touches[de],we=K[de];(!we||we.dist(ne)>Hr)&&(this.aborted=!0)}}},qr.prototype.touchend=function(D,J,q){if((!this.centroid||D.timeStamp-this.startTime>yr)&&(this.aborted=!0),q.length===0){var K=!this.aborted&&this.centroid;if(this.reset(),K)return K}};var _i=function(D){this.singleTap=new qr(D),this.numTaps=D.numTaps,this.reset()};_i.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},_i.prototype.touchstart=function(D,J,q){this.singleTap.touchstart(D,J,q)},_i.prototype.touchmove=function(D,J,q){this.singleTap.touchmove(D,J,q)},_i.prototype.touchend=function(D,J,q){var K=this.singleTap.touchend(D,J,q);if(K){var de=D.timeStamp-this.lastTime0&&(this._active=!0);var K=nt(q,J),de=new i.Point(0,0),ne=new i.Point(0,0),we=0;for(var Ue in K){var ft=K[Ue],Zt=this._touches[Ue];Zt&&(de._add(ft),ne._add(ft.sub(Zt)),we++,K[Ue]=ft)}if(this._touches=K,!(weMath.abs(Y.x)}var Gn=100,ja=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.reset=function(){Y.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},D.prototype._start=function(q){this._lastPoints=q,Xs(q[0].sub(q[1]))&&(this._valid=!1)},D.prototype._move=function(q,K,de){var ne=q[0].sub(this._lastPoints[0]),we=q[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(ne,we,de.timeStamp),!!this._valid){this._lastPoints=q,this._active=!0;var Ue=(ne.y+we.y)/2,ft=-.5;return{pitchDelta:Ue*ft}}},D.prototype.gestureBeginsVertically=function(q,K,de){if(this._valid!==void 0)return this._valid;var ne=2,we=q.mag()>=ne,Ue=K.mag()>=ne;if(!(!we&&!Ue)){if(!we||!Ue)return this._firstMove===void 0&&(this._firstMove=de),de-this._firstMove0==K.y>0;return Xs(q)&&Xs(K)&&ft}},D}(ia),Fo={panStep:100,bearingStep:15,pitchStep:10},Uo=function(){var D=Fo;this._panStep=D.panStep,this._bearingStep=D.bearingStep,this._pitchStep=D.pitchStep,this._rotationDisabled=!1};Uo.prototype.reset=function(){this._active=!1},Uo.prototype.keydown=function(D){var J=this;if(!(D.altKey||D.ctrlKey||D.metaKey)){var q=0,K=0,de=0,ne=0,we=0;switch(D.keyCode){case 61:case 107:case 171:case 187:q=1;break;case 189:case 109:case 173:q=-1;break;case 37:D.shiftKey?K=-1:(D.preventDefault(),ne=-1);break;case 39:D.shiftKey?K=1:(D.preventDefault(),ne=1);break;case 38:D.shiftKey?de=1:(D.preventDefault(),we=-1);break;case 40:D.shiftKey?de=-1:(D.preventDefault(),we=1);break;default:return}return this._rotationDisabled&&(K=0,de=0),{cameraAnimation:function(Ue){var ft=Ue.getZoom();Ue.easeTo({duration:300,easeId:"keyboardHandler",easing:$s,zoom:q?Math.round(ft)+q*(D.shiftKey?2:1):ft,bearing:Ue.getBearing()+K*J._bearingStep,pitch:Ue.getPitch()+de*J._pitchStep,offset:[-ne*J._panStep,-we*J._panStep],center:Ue.getCenter()},{originalEvent:D})}}}},Uo.prototype.enable=function(){this._enabled=!0},Uo.prototype.disable=function(){this._enabled=!1,this.reset()},Uo.prototype.isEnabled=function(){return this._enabled},Uo.prototype.isActive=function(){return this._active},Uo.prototype.disableRotation=function(){this._rotationDisabled=!0},Uo.prototype.enableRotation=function(){this._rotationDisabled=!1};function $s(Y){return Y*(2-Y)}var Sl=4.000244140625,bu=1/100,dl=1/450,Sc=2,Me=function(D,J){this._map=D,this._el=D.getCanvasContainer(),this._handler=J,this._delta=0,this._defaultZoomRate=bu,this._wheelZoomRate=dl,i.bindAll(["_onTimeout"],this)};Me.prototype.setZoomRate=function(D){this._defaultZoomRate=D},Me.prototype.setWheelZoomRate=function(D){this._wheelZoomRate=D},Me.prototype.isEnabled=function(){return!!this._enabled},Me.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},Me.prototype.isZooming=function(){return!!this._zooming},Me.prototype.enable=function(D){this.isEnabled()||(this._enabled=!0,this._aroundCenter=D&&D.around==="center")},Me.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Me.prototype.wheel=function(D){if(this.isEnabled()){var J=D.deltaMode===i.window.WheelEvent.DOM_DELTA_LINE?D.deltaY*40:D.deltaY,q=i.browser.now(),K=q-(this._lastWheelEventTime||0);this._lastWheelEventTime=q,J!==0&&J%Sl===0?this._type="wheel":J!==0&&Math.abs(J)<4?this._type="trackpad":K>400?(this._type=null,this._lastValue=J,this._timeout=setTimeout(this._onTimeout,40,D)):this._type||(this._type=Math.abs(K*J)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,J+=this._lastValue)),D.shiftKey&&J&&(J=J/4),this._type&&(this._lastWheelEvent=D,this._delta-=J,this._active||this._start(D)),D.preventDefault()}},Me.prototype._onTimeout=function(D){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(D)},Me.prototype._start=function(D){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var J=o.mousePos(this._el,D);this._around=i.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(J)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},Me.prototype.renderFrame=function(){var D=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var J=this._map.transform;if(this._delta!==0){var q=this._type==="wheel"&&Math.abs(this._delta)>Sl?this._wheelZoomRate:this._defaultZoomRate,K=Sc/(1+Math.exp(-Math.abs(this._delta*q)));this._delta<0&&K!==0&&(K=1/K);var de=typeof this._targetZoom=="number"?J.zoomScale(this._targetZoom):J.scale;this._targetZoom=Math.min(J.maxZoom,Math.max(J.minZoom,J.scaleZoom(de*K))),this._type==="wheel"&&(this._startZoom=J.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var ne=typeof this._targetZoom=="number"?this._targetZoom:J.zoom,we=this._startZoom,Ue=this._easing,ft=!1,Zt;if(this._type==="wheel"&&we&&Ue){var hr=Math.min((i.browser.now()-this._lastWheelEventTime)/200,1),qt=Ue(hr);Zt=i.number(we,ne,qt),hr<1?this._frameId||(this._frameId=!0):ft=!0}else Zt=ne,ft=!0;return this._active=!0,ft&&(this._active=!1,this._finishTimeout=setTimeout(function(){D._zooming=!1,D._handler._triggerRenderFrame(),delete D._targetZoom,delete D._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ft,zoomDelta:Zt-J.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},Me.prototype._smoothOutEasing=function(D){var J=i.ease;if(this._prevEase){var q=this._prevEase,K=(i.browser.now()-q.start)/q.duration,de=q.easing(K+.01)-q.easing(K),ne=.27/Math.sqrt(de*de+1e-4)*.01,we=Math.sqrt(.27*.27-ne*ne);J=i.bezier(ne,we,.25,1)}return this._prevEase={start:i.browser.now(),duration:D,easing:J},J},Me.prototype.reset=function(){this._active=!1};var bt=function(D,J){this._clickZoom=D,this._tapZoom=J};bt.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},bt.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},bt.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},bt.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var zt=function(){this.reset()};zt.prototype.reset=function(){this._active=!1},zt.prototype.dblclick=function(D,J){return D.preventDefault(),{cameraAnimation:function(q){q.easeTo({duration:300,zoom:q.getZoom()+(D.shiftKey?-1:1),around:q.unproject(J)},{originalEvent:D})}}},zt.prototype.enable=function(){this._enabled=!0},zt.prototype.disable=function(){this._enabled=!1,this.reset()},zt.prototype.isEnabled=function(){return this._enabled},zt.prototype.isActive=function(){return this._active};var Rr=function(){this._tap=new _i({numTouches:1,numTaps:1}),this.reset()};Rr.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Rr.prototype.touchstart=function(D,J,q){this._swipePoint||(this._tapTime&&D.timeStamp-this._tapTime>gr&&this.reset(),this._tapTime?q.length>0&&(this._swipePoint=J[0],this._swipeTouch=q[0].identifier):this._tap.touchstart(D,J,q))},Rr.prototype.touchmove=function(D,J,q){if(!this._tapTime)this._tap.touchmove(D,J,q);else if(this._swipePoint){if(q[0].identifier!==this._swipeTouch)return;var K=J[0],de=K.y-this._swipePoint.y;return this._swipePoint=K,D.preventDefault(),this._active=!0,{zoomDelta:de/128}}},Rr.prototype.touchend=function(D,J,q){if(this._tapTime)this._swipePoint&&q.length===0&&this.reset();else{var K=this._tap.touchend(D,J,q);K&&(this._tapTime=D.timeStamp)}},Rr.prototype.touchcancel=function(){this.reset()},Rr.prototype.enable=function(){this._enabled=!0},Rr.prototype.disable=function(){this._enabled=!1,this.reset()},Rr.prototype.isEnabled=function(){return this._enabled},Rr.prototype.isActive=function(){return this._active};var jr=function(D,J,q){this._el=D,this._mousePan=J,this._touchPan=q};jr.prototype.enable=function(D){this._inertiaOptions=D||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},jr.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},jr.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},jr.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var Nr=function(D,J,q){this._pitchWithRotate=D.pitchWithRotate,this._mouseRotate=J,this._mousePitch=q};Nr.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},Nr.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},Nr.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},Nr.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var Gr=function(D,J,q,K){this._el=D,this._touchZoom=J,this._touchRotate=q,this._tapDragZoom=K,this._rotationDisabled=!1,this._enabled=!0};Gr.prototype.enable=function(D){this._touchZoom.enable(D),this._rotationDisabled||this._touchRotate.enable(D),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},Gr.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},Gr.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},Gr.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},Gr.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},Gr.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var mi=function(Y){return Y.zoom||Y.drag||Y.pitch||Y.rotate},Ui=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D}(i.Event);function qi(Y){return Y.panDelta&&Y.panDelta.mag()||Y.zoomDelta||Y.bearingDelta||Y.pitchDelta}var Ei=function(D,J){this._map=D,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Tl(D),this._bearingSnap=J.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(J),i.bindAll(["handleEvent","handleWindowEvent"],this);var q=this._el;this._listeners=[[q,"touchstart",{passive:!0}],[q,"touchmove",{passive:!1}],[q,"touchend",void 0],[q,"touchcancel",void 0],[q,"mousedown",void 0],[q,"mousemove",void 0],[q,"mouseup",void 0],[i.window.document,"mousemove",{capture:!0}],[i.window.document,"mouseup",void 0],[q,"mouseover",void 0],[q,"mouseout",void 0],[q,"dblclick",void 0],[q,"click",void 0],[q,"keydown",{capture:!1}],[q,"keyup",void 0],[q,"wheel",{passive:!1}],[q,"contextmenu",void 0],[i.window,"blur",void 0]];for(var K=0,de=this._listeners;Kwe?Math.min(2,yt):Math.max(.5,yt),fi=Math.pow(Di,1-br),Ti=ne.unproject(Bt.add(Dt.mult(br*fi)).mult(Ur));ne.setLocationAtPoint(ne.renderWorldCopies?Ti.wrap():Ti,Ct)}de._fireMoveEvents(K)},function(br){de._afterEase(K,br)},q),this},D.prototype._prepareEase=function(q,K,de){de===void 0&&(de={}),this._moving=!0,!K&&!de.moving&&this.fire(new i.Event("movestart",q)),this._zooming&&!de.zooming&&this.fire(new i.Event("zoomstart",q)),this._rotating&&!de.rotating&&this.fire(new i.Event("rotatestart",q)),this._pitching&&!de.pitching&&this.fire(new i.Event("pitchstart",q))},D.prototype._fireMoveEvents=function(q){this.fire(new i.Event("move",q)),this._zooming&&this.fire(new i.Event("zoom",q)),this._rotating&&this.fire(new i.Event("rotate",q)),this._pitching&&this.fire(new i.Event("pitch",q))},D.prototype._afterEase=function(q,K){if(!(this._easeId&&K&&this._easeId===K)){delete this._easeId;var de=this._zooming,ne=this._rotating,we=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,de&&this.fire(new i.Event("zoomend",q)),ne&&this.fire(new i.Event("rotateend",q)),we&&this.fire(new i.Event("pitchend",q)),this.fire(new i.Event("moveend",q))}},D.prototype.flyTo=function(q,K){var de=this;if(!q.essential&&i.browser.prefersReducedMotion){var ne=i.pick(q,["center","zoom","bearing","pitch","around"]);return this.jumpTo(ne,K)}this.stop(),q=i.extend({offset:[0,0],speed:1.2,curve:1.42,easing:i.ease},q);var we=this.transform,Ue=this.getZoom(),ft=this.getBearing(),Zt=this.getPitch(),hr=this.getPadding(),qt="zoom"in q?i.clamp(+q.zoom,we.minZoom,we.maxZoom):Ue,Ve="bearing"in q?this._normalizeBearing(q.bearing,ft):ft,Qe="pitch"in q?+q.pitch:Zt,at="padding"in q?q.padding:we.padding,Ct=we.zoomScale(qt-Ue),Ot=i.Point.convert(q.offset),Rt=we.centerPoint.add(Ot),Bt=we.pointLocation(Rt),Dt=i.LngLat.convert(q.center||Bt);this._normalizeCenter(Dt);var yt=we.project(Bt),Pt=we.project(Dt).sub(yt),ht=q.curve,ur=Math.max(we.width,we.height),br=ur/Ct,Ur=Pt.mag();if("minZoom"in q){var Di=i.clamp(Math.min(q.minZoom,Ue,qt),we.minZoom,we.maxZoom),fi=ur/we.zoomScale(Di-Ue);ht=Math.sqrt(fi/Ur*2)}var Ti=ht*ht;function gn(so){var Yo=(br*br-ur*ur+(so?-1:1)*Ti*Ti*Ur*Ur)/(2*(so?br:ur)*Ti*Ur);return Math.log(Math.sqrt(Yo*Yo+1)-Yo)}function rn(so){return(Math.exp(so)-Math.exp(-so))/2}function Ci(so){return(Math.exp(so)+Math.exp(-so))/2}function Bi(so){return rn(so)/Ci(so)}var Gi=gn(0),sn=function(so){return Ci(Gi)/Ci(Gi+ht*so)},zn=function(so){return ur*((Ci(Gi)*Bi(Gi+ht*so)-rn(Gi))/Ti)/Ur},Ja=(gn(1)-Gi)/ht;if(Math.abs(Ur)<1e-6||!isFinite(Ja)){if(Math.abs(ur-br)<1e-6)return this.easeTo(q,K);var co=brq.maxDuration&&(q.duration=0),this._zooming=!0,this._rotating=ft!==Ve,this._pitching=Qe!==Zt,this._padding=!we.isPaddingEqual(at),this._prepareEase(K,!1),this._ease(function(so){var Yo=so*Ja,ms=1/sn(Yo);we.zoom=so===1?qt:Ue+we.scaleZoom(ms),de._rotating&&(we.bearing=i.number(ft,Ve,so)),de._pitching&&(we.pitch=i.number(Zt,Qe,so)),de._padding&&(we.interpolatePadding(hr,at,so),Rt=we.centerPoint.add(Ot));var ou=so===1?Dt:we.unproject(yt.add(Pt.mult(zn(Yo))).mult(ms));we.setLocationAtPoint(we.renderWorldCopies?ou.wrap():ou,Rt),de._fireMoveEvents(K)},function(){return de._afterEase(K)},q),this},D.prototype.isEasing=function(){return!!this._easeFrameId},D.prototype.stop=function(){return this._stop()},D.prototype._stop=function(q,K){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var de=this._onEaseEnd;delete this._onEaseEnd,de.call(this,K)}if(!q){var ne=this.handlers;ne&&ne.stop(!1)}return this},D.prototype._ease=function(q,K,de){de.animate===!1||de.duration===0?(q(1),K()):(this._easeStart=i.browser.now(),this._easeOptions=de,this._onEaseFrame=q,this._onEaseEnd=K,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},D.prototype._renderFrameCallback=function(){var q=Math.min((i.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(q)),q<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},D.prototype._normalizeBearing=function(q,K){q=i.wrap(q,-180,180);var de=Math.abs(q-K);return Math.abs(q-360-K)180?-360:de<-180?360:0}},D}(i.Evented),en=function(D){D===void 0&&(D={}),this.options=D,i.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};en.prototype.getDefaultPosition=function(){return"bottom-right"},en.prototype.onAdd=function(D){var J=this.options&&this.options.compact;return this._map=D,this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=o.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=o.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),J&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),J===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},en.prototype.onRemove=function(){o.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},en.prototype._setElementTitle=function(D,J){var q=this._map._getUIString("AttributionControl."+J);D.title=q,D.setAttribute("aria-label",q)},en.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},en.prototype._updateEditLink=function(){var D=this._editLink;D||(D=this._editLink=this._container.querySelector(".mapbox-improve-map"));var J=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||i.config.ACCESS_TOKEN}];if(D){var q=J.reduce(function(K,de,ne){return de.value&&(K+=de.key+"="+de.value+(ne=0)return!1;return!0});var we=D.join(" | ");we!==this._attribHTML&&(this._attribHTML=we,D.length?(this._innerContainer.innerHTML=we,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},en.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var Wi=function(){i.bindAll(["_updateLogo"],this),i.bindAll(["_updateCompact"],this)};Wi.prototype.onAdd=function(D){this._map=D,this._container=o.create("div","mapboxgl-ctrl");var J=o.create("a","mapboxgl-ctrl-logo");return J.target="_blank",J.rel="noopener nofollow",J.href="https://www.mapbox.com/",J.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),J.setAttribute("rel","noopener nofollow"),this._container.appendChild(J),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Wi.prototype.onRemove=function(){o.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Wi.prototype.getDefaultPosition=function(){return"bottom-left"},Wi.prototype._updateLogo=function(D){(!D||D.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},Wi.prototype._logoRequired=function(){if(this._map.style){var D=this._map.style.sourceCaches;for(var J in D){var q=D[J].getSource();if(q.mapbox_logo)return!0}return!1}},Wi.prototype._updateCompact=function(){var D=this._container.children;if(D.length){var J=D[0];this._map.getCanvasContainer().offsetWidth<250?J.classList.add("mapboxgl-compact"):J.classList.remove("mapboxgl-compact")}};var si=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};si.prototype.add=function(D){var J=++this._id,q=this._queue;return q.push({callback:D,id:J,cancelled:!1}),J},si.prototype.remove=function(D){for(var J=this._currentlyRunning,q=J?this._queue.concat(J):this._queue,K=0,de=q;Kq.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(q.minPitch!=null&&q.maxPitch!=null&&q.minPitch>q.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(q.minPitch!=null&&q.minPitchBn)throw new Error("maxPitch must be less than or equal to "+Bn);var de=new wo(q.minZoom,q.maxZoom,q.minPitch,q.maxPitch,q.renderWorldCopies);if(Y.call(this,de,q),this._interactive=q.interactive,this._maxTileCacheSize=q.maxTileCacheSize,this._failIfMajorPerformanceCaveat=q.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=q.preserveDrawingBuffer,this._antialias=q.antialias,this._trackResize=q.trackResize,this._bearingSnap=q.bearingSnap,this._refreshExpiredTiles=q.refreshExpiredTiles,this._fadeDuration=q.fadeDuration,this._crossSourceCollisions=q.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=q.collectResourceTiming,this._renderTaskQueue=new si,this._controls=[],this._mapId=i.uniqueId(),this._locale=i.extend({},Mr,q.locale),this._clickTolerance=q.clickTolerance,this._requestManager=new i.RequestManager(q.transformRequest,q.accessToken),typeof q.container=="string"){if(this._container=i.window.document.getElementById(q.container),!this._container)throw new Error("Container '"+q.container+"' not found.")}else if(q.container instanceof xi)this._container=q.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(q.maxBounds&&this.setMaxBounds(q.maxBounds),i.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return K._update(!1)}),this.on("moveend",function(){return K._update(!1)}),this.on("zoom",function(){return K._update(!0)}),typeof i.window!="undefined"&&(i.window.addEventListener("online",this._onWindowOnline,!1),i.window.addEventListener("resize",this._onWindowResize,!1),i.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new Ei(this,q);var ne=typeof q.hash=="string"&&q.hash||void 0;this._hash=q.hash&&new Ul(ne).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:q.center,zoom:q.zoom,bearing:q.bearing,pitch:q.pitch}),q.bounds&&(this.resize(),this.fitBounds(q.bounds,i.extend({},q.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=q.localIdeographFontFamily,q.style&&this.setStyle(q.style,{localIdeographFontFamily:q.localIdeographFontFamily}),q.attributionControl&&this.addControl(new en({customAttribution:q.customAttribution})),this.addControl(new Wi,q.logoPosition),this.on("style.load",function(){K.transform.unmodified&&K.jumpTo(K.style.stylesheet)}),this.on("data",function(we){K._update(we.dataType==="style"),K.fire(new i.Event(we.dataType+"data",we))}),this.on("dataloading",function(we){K.fire(new i.Event(we.dataType+"dataloading",we))})}Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D;var J={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return D.prototype._getMapId=function(){return this._mapId},D.prototype.addControl=function(K,de){if(de===void 0&&(K.getDefaultPosition?de=K.getDefaultPosition():de="top-right"),!K||!K.onAdd)return this.fire(new i.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var ne=K.onAdd(this);this._controls.push(K);var we=this._controlPositions[de];return de.indexOf("bottom")!==-1?we.insertBefore(ne,we.firstChild):we.appendChild(ne),this},D.prototype.removeControl=function(K){if(!K||!K.onRemove)return this.fire(new i.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var de=this._controls.indexOf(K);return de>-1&&this._controls.splice(de,1),K.onRemove(this),this},D.prototype.hasControl=function(K){return this._controls.indexOf(K)>-1},D.prototype.resize=function(K){var de=this._containerDimensions(),ne=de[0],we=de[1];this._resizeCanvas(ne,we),this.transform.resize(ne,we),this.painter.resize(ne,we);var Ue=!this._moving;return Ue&&(this.stop(),this.fire(new i.Event("movestart",K)).fire(new i.Event("move",K))),this.fire(new i.Event("resize",K)),Ue&&this.fire(new i.Event("moveend",K)),this},D.prototype.getBounds=function(){return this.transform.getBounds()},D.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},D.prototype.setMaxBounds=function(K){return this.transform.setMaxBounds(i.LngLatBounds.convert(K)),this._update()},D.prototype.setMinZoom=function(K){if(K=K==null?ci:K,K>=ci&&K<=this.transform.maxZoom)return this.transform.minZoom=K,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=K,this._update(),this.getZoom()>K&&this.setZoom(K),this;throw new Error("maxZoom must be greater than the current minZoom")},D.prototype.getMaxZoom=function(){return this.transform.maxZoom},D.prototype.setMinPitch=function(K){if(K=K==null?Zi:K,K=Zi&&K<=this.transform.maxPitch)return this.transform.minPitch=K,this._update(),this.getPitch()Bn)throw new Error("maxPitch must be less than or equal to "+Bn);if(K>=this.transform.minPitch)return this.transform.maxPitch=K,this._update(),this.getPitch()>K&&this.setPitch(K),this;throw new Error("maxPitch must be greater than the current minPitch")},D.prototype.getMaxPitch=function(){return this.transform.maxPitch},D.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},D.prototype.setRenderWorldCopies=function(K){return this.transform.renderWorldCopies=K,this._update()},D.prototype.project=function(K){return this.transform.locationPoint(i.LngLat.convert(K))},D.prototype.unproject=function(K){return this.transform.pointLocation(i.Point.convert(K))},D.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},D.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},D.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},D.prototype._createDelegatedListener=function(K,de,ne){var we=this,Ue;if(K==="mouseenter"||K==="mouseover"){var ft=!1,Zt=function(Ct){var Ot=we.getLayer(de)?we.queryRenderedFeatures(Ct.point,{layers:[de]}):[];Ot.length?ft||(ft=!0,ne.call(we,new se(K,we,Ct.originalEvent,{features:Ot}))):ft=!1},hr=function(){ft=!1};return{layer:de,listener:ne,delegates:{mousemove:Zt,mouseout:hr}}}else if(K==="mouseleave"||K==="mouseout"){var qt=!1,Ve=function(Ct){var Ot=we.getLayer(de)?we.queryRenderedFeatures(Ct.point,{layers:[de]}):[];Ot.length?qt=!0:qt&&(qt=!1,ne.call(we,new se(K,we,Ct.originalEvent)))},Qe=function(Ct){qt&&(qt=!1,ne.call(we,new se(K,we,Ct.originalEvent)))};return{layer:de,listener:ne,delegates:{mousemove:Ve,mouseout:Qe}}}else{var at=function(Ct){var Ot=we.getLayer(de)?we.queryRenderedFeatures(Ct.point,{layers:[de]}):[];Ot.length&&(Ct.features=Ot,ne.call(we,Ct),delete Ct.features)};return{layer:de,listener:ne,delegates:(Ue={},Ue[K]=at,Ue)}}},D.prototype.on=function(K,de,ne){if(ne===void 0)return Y.prototype.on.call(this,K,de);var we=this._createDelegatedListener(K,de,ne);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[K]=this._delegatedListeners[K]||[],this._delegatedListeners[K].push(we);for(var Ue in we.delegates)this.on(Ue,we.delegates[Ue]);return this},D.prototype.once=function(K,de,ne){if(ne===void 0)return Y.prototype.once.call(this,K,de);var we=this._createDelegatedListener(K,de,ne);for(var Ue in we.delegates)this.once(Ue,we.delegates[Ue]);return this},D.prototype.off=function(K,de,ne){var we=this;if(ne===void 0)return Y.prototype.off.call(this,K,de);var Ue=function(ft){for(var Zt=ft[K],hr=0;hr180;){var ne=J.locationPoint(Y);if(ne.x>=0&&ne.y>=0&&ne.x<=J.width&&ne.y<=J.height)break;Y.lng>J.center.lng?Y.lng-=360:Y.lng+=360}return Y}var Vn={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function na(Y,D,J){var q=Y.classList;for(var K in Vn)q.remove("mapboxgl-"+J+"-anchor-"+K);q.add("mapboxgl-"+J+"-anchor-"+D)}var Ki=function(Y){function D(J,q){if(Y.call(this),(J instanceof i.window.HTMLElement||q)&&(J=i.extend({element:J},q)),i.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=J&&J.anchor||"center",this._color=J&&J.color||"#3FB1CE",this._scale=J&&J.scale||1,this._draggable=J&&J.draggable||!1,this._clickTolerance=J&&J.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=J&&J.rotation||0,this._rotationAlignment=J&&J.rotationAlignment||"auto",this._pitchAlignment=J&&J.pitchAlignment&&J.pitchAlignment!=="auto"?J.pitchAlignment:this._rotationAlignment,!J||!J.element){this._defaultMarker=!0,this._element=o.create("div"),this._element.setAttribute("aria-label","Map marker");var K=o.createNS("http://www.w3.org/2000/svg","svg"),de=41,ne=27;K.setAttributeNS(null,"display","block"),K.setAttributeNS(null,"height",de+"px"),K.setAttributeNS(null,"width",ne+"px"),K.setAttributeNS(null,"viewBox","0 0 "+ne+" "+de);var we=o.createNS("http://www.w3.org/2000/svg","g");we.setAttributeNS(null,"stroke","none"),we.setAttributeNS(null,"stroke-width","1"),we.setAttributeNS(null,"fill","none"),we.setAttributeNS(null,"fill-rule","evenodd");var Ue=o.createNS("http://www.w3.org/2000/svg","g");Ue.setAttributeNS(null,"fill-rule","nonzero");var ft=o.createNS("http://www.w3.org/2000/svg","g");ft.setAttributeNS(null,"transform","translate(3.0, 29.0)"),ft.setAttributeNS(null,"fill","#000000");for(var Zt=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}],hr=0,qt=Zt;hr=K}this._isDragging&&(this._pos=q.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new i.Event("dragstart"))),this.fire(new i.Event("drag")))},D.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new i.Event("dragend")),this._state="inactive"},D.prototype._addDragHandler=function(q){this._element.contains(q.originalEvent.target)&&(q.preventDefault(),this._positionDelta=q.point.sub(this._pos).add(this._offset),this._pointerdownPos=q.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},D.prototype.setDraggable=function(q){return this._draggable=!!q,this._map&&(q?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},D.prototype.isDraggable=function(){return this._draggable},D.prototype.setRotation=function(q){return this._rotation=q||0,this._update(),this},D.prototype.getRotation=function(){return this._rotation},D.prototype.setRotationAlignment=function(q){return this._rotationAlignment=q||"auto",this._update(),this},D.prototype.getRotationAlignment=function(){return this._rotationAlignment},D.prototype.setPitchAlignment=function(q){return this._pitchAlignment=q&&q!=="auto"?q:this._rotationAlignment,this._update(),this},D.prototype.getPitchAlignment=function(){return this._pitchAlignment},D}(i.Evented),kn={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},ta;function oa(Y){ta!==void 0?Y(ta):i.window.navigator.permissions!==void 0?i.window.navigator.permissions.query({name:"geolocation"}).then(function(D){ta=D.state!=="denied",Y(ta)}):(ta=!!i.window.navigator.geolocation,Y(ta))}var ba=0,is=!1,Zs=function(Y){function D(J){Y.call(this),this.options=i.extend({},kn,J),i.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.onAdd=function(q){return this._map=q,this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),oa(this._setupUI),this._container},D.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(i.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),o.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,ba=0,is=!1},D.prototype._isOutOfMapMaxBounds=function(q){var K=this._map.getMaxBounds(),de=q.coords;return K&&(de.longitudeK.getEast()||de.latitudeK.getNorth())},D.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break}},D.prototype._onSuccess=function(q){if(this._map){if(this._isOutOfMapMaxBounds(q)){this._setErrorState(),this.fire(new i.Event("outofmaxbounds",q)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=q,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(q),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(q),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("geolocate",q)),this._finish()}},D.prototype._updateCamera=function(q){var K=new i.LngLat(q.coords.longitude,q.coords.latitude),de=q.coords.accuracy,ne=this._map.getBearing(),we=i.extend({bearing:ne},this.options.fitBoundsOptions);this._map.fitBounds(K.toBounds(de),we,{geolocateSource:!0})},D.prototype._updateMarker=function(q){if(q){var K=new i.LngLat(q.coords.longitude,q.coords.latitude);this._accuracyCircleMarker.setLngLat(K).addTo(this._map),this._userLocationDotMarker.setLngLat(K).addTo(this._map),this._accuracy=q.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},D.prototype._updateCircleRadius=function(){var q=this._map._container.clientHeight/2,K=this._map.unproject([0,q]),de=this._map.unproject([1,q]),ne=K.distanceTo(de),we=Math.ceil(2*this._accuracy/ne);this._circleElement.style.width=we+"px",this._circleElement.style.height=we+"px"},D.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},D.prototype._onError=function(q){if(this._map){if(this.options.trackUserLocation)if(q.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var K=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=K,this._geolocateButton.setAttribute("aria-label",K),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(q.code===3&&is)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("error",q)),this._finish()}},D.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},D.prototype._setupUI=function(q){var K=this;if(this._container.addEventListener("contextmenu",function(we){return we.preventDefault()}),this._geolocateButton=o.create("button","mapboxgl-ctrl-geolocate",this._container),o.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",q===!1){i.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var de=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=de,this._geolocateButton.setAttribute("aria-label",de)}else{var ne=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=ne,this._geolocateButton.setAttribute("aria-label",ne)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=o.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Ki(this._dotElement),this._circleElement=o.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Ki({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(we){var Ue=we.originalEvent&&we.originalEvent.type==="resize";!we.geolocateSource&&K._watchState==="ACTIVE_LOCK"&&!Ue&&(K._watchState="BACKGROUND",K._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),K._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),K.fire(new i.Event("trackuserlocationend")))})},D.prototype.trigger=function(){if(!this._setup)return i.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new i.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":ba--,is=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new i.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new i.Event("trackuserlocationstart"));break}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error");break}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),ba++;var q;ba>1?(q={maximumAge:6e5,timeout:0},is=!0):(q=this.options.positionOptions,is=!1),this._geolocationWatchID=i.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,q)}}else i.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},D.prototype._clearWatch=function(){i.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},D}(i.Evented),Va={maxWidth:100,unit:"metric"},Ml=function(D){this.options=i.extend({},Va,D),i.bindAll(["_onMove","setUnit"],this)};Ml.prototype.getDefaultPosition=function(){return"bottom-left"},Ml.prototype._onMove=function(){zo(this._map,this._container,this.options)},Ml.prototype.onAdd=function(D){return this._map=D,this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",D.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Ml.prototype.onRemove=function(){o.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Ml.prototype.setUnit=function(D){this.options.unit=D,zo(this._map,this._container,this.options)};function zo(Y,D,J){var q=J&&J.maxWidth||100,K=Y._container.clientHeight/2,de=Y.unproject([0,K]),ne=Y.unproject([q,K]),we=de.distanceTo(ne);if(J&&J.unit==="imperial"){var Ue=3.2808*we;if(Ue>5280){var ft=Ue/5280;Qs(D,q,ft,Y._getUIString("ScaleControl.Miles"))}else Qs(D,q,Ue,Y._getUIString("ScaleControl.Feet"))}else if(J&&J.unit==="nautical"){var Zt=we/1852;Qs(D,q,Zt,Y._getUIString("ScaleControl.NauticalMiles"))}else we>=1e3?Qs(D,q,we/1e3,Y._getUIString("ScaleControl.Kilometers")):Qs(D,q,we,Y._getUIString("ScaleControl.Meters"))}function Qs(Y,D,J,q){var K=Vl(J),de=K/J;Y.style.width=D*de+"px",Y.innerHTML=K+" "+q}function al(Y){var D=Math.pow(10,Math.ceil(-Math.log(Y)/Math.LN10));return Math.round(Y*D)/D}function Vl(Y){var D=Math.pow(10,(""+Math.floor(Y)).length-1),J=Y/D;return J=J>=10?10:J>=5?5:J>=3?3:J>=2?2:J>=1?1:al(J),D*J}var ss=function(D){this._fullscreen=!1,D&&D.container&&(D.container instanceof i.window.HTMLElement?this._container=D.container:i.warnOnce("Full screen control 'container' must be a DOM element.")),i.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in i.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in i.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in i.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in i.window.document&&(this._fullscreenchange="MSFullscreenChange")};ss.prototype.onAdd=function(D){return this._map=D,this._container||(this._container=this._map.getContainer()),this._controlContainer=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",i.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},ss.prototype.onRemove=function(){o.remove(this._controlContainer),this._map=null,i.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},ss.prototype._checkFullscreenSupport=function(){return!!(i.window.document.fullscreenEnabled||i.window.document.mozFullScreenEnabled||i.window.document.msFullscreenEnabled||i.window.document.webkitFullscreenEnabled)},ss.prototype._setupUI=function(){var D=this._fullscreenButton=o.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);o.create("span","mapboxgl-ctrl-icon",D).setAttribute("aria-hidden",!0),D.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),i.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},ss.prototype._updateTitle=function(){var D=this._getTitle();this._fullscreenButton.setAttribute("aria-label",D),this._fullscreenButton.title=D},ss.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},ss.prototype._isFullscreen=function(){return this._fullscreen},ss.prototype._changeIcon=function(){var D=i.window.document.fullscreenElement||i.window.document.mozFullScreenElement||i.window.document.webkitFullscreenElement||i.window.document.msFullscreenElement;D===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},ss.prototype._onClickFullscreen=function(){this._isFullscreen()?i.window.document.exitFullscreen?i.window.document.exitFullscreen():i.window.document.mozCancelFullScreen?i.window.document.mozCancelFullScreen():i.window.document.msExitFullscreen?i.window.document.msExitFullscreen():i.window.document.webkitCancelFullScreen&&i.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Vs={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},Ys=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),wa=function(Y){function D(J){Y.call(this),this.options=i.extend(Object.create(Vs),J),i.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.addTo=function(q){return this._map&&this.remove(),this._map=q,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new i.Event("open")),this},D.prototype.isOpen=function(){return!!this._map},D.prototype.remove=function(){return this._content&&o.remove(this._content),this._container&&(o.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new i.Event("close")),this},D.prototype.getLngLat=function(){return this._lngLat},D.prototype.setLngLat=function(q){return this._lngLat=i.LngLat.convert(q),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},D.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},D.prototype.getElement=function(){return this._container},D.prototype.setText=function(q){return this.setDOMContent(i.window.document.createTextNode(q))},D.prototype.setHTML=function(q){var K=i.window.document.createDocumentFragment(),de=i.window.document.createElement("body"),ne;for(de.innerHTML=q;ne=de.firstChild,!!ne;)K.appendChild(ne);return this.setDOMContent(K)},D.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},D.prototype.setMaxWidth=function(q){return this.options.maxWidth=q,this._update(),this},D.prototype.setDOMContent=function(q){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=o.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(q),this._createCloseButton(),this._update(),this._focusFirstElement(),this},D.prototype.addClassName=function(q){this._container&&this._container.classList.add(q)},D.prototype.removeClassName=function(q){this._container&&this._container.classList.remove(q)},D.prototype.setOffset=function(q){return this.options.offset=q,this._update(),this},D.prototype.toggleClassName=function(q){if(this._container)return this._container.classList.toggle(q)},D.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=o.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},D.prototype._onMouseUp=function(q){this._update(q.point)},D.prototype._onMouseMove=function(q){this._update(q.point)},D.prototype._onDrag=function(q){this._update(q.point)},D.prototype._update=function(q){var K=this,de=this._lngLat||this._trackPointer;if(!(!this._map||!de||!this._content)&&(this._container||(this._container=o.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=o.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(Ve){return K._container.classList.add(Ve)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=pn(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!q))){var ne=this._pos=this._trackPointer&&q?q:this._map.project(this._lngLat),we=this.options.anchor,Ue=ol(this.options.offset);if(!we){var ft=this._container.offsetWidth,Zt=this._container.offsetHeight,hr;ne.y+Ue.bottom.ythis._map.transform.height-Zt?hr=["bottom"]:hr=[],ne.xthis._map.transform.width-ft/2&&hr.push("right"),hr.length===0?we="bottom":we=hr.join("-")}var qt=ne.add(Ue[we]).round();o.setTransform(this._container,Vn[we]+" translate("+qt.x+"px,"+qt.y+"px)"),na(this._container,we,"popup")}},D.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var q=this._container.querySelector(Ys);q&&q.focus()}},D.prototype._onClose=function(){this.remove()},D}(i.Evented);function ol(Y){if(Y)if(typeof Y=="number"){var D=Math.round(Math.sqrt(.5*Math.pow(Y,2)));return{center:new i.Point(0,0),top:new i.Point(0,Y),"top-left":new i.Point(D,D),"top-right":new i.Point(-D,D),bottom:new i.Point(0,-Y),"bottom-left":new i.Point(D,-D),"bottom-right":new i.Point(-D,-D),left:new i.Point(Y,0),right:new i.Point(-Y,0)}}else if(Y instanceof i.Point||Array.isArray(Y)){var J=i.Point.convert(Y);return{center:J,top:J,"top-left":J,"top-right":J,bottom:J,"bottom-left":J,"bottom-right":J,left:J,right:J}}else return{center:i.Point.convert(Y.center||[0,0]),top:i.Point.convert(Y.top||[0,0]),"top-left":i.Point.convert(Y["top-left"]||[0,0]),"top-right":i.Point.convert(Y["top-right"]||[0,0]),bottom:i.Point.convert(Y.bottom||[0,0]),"bottom-left":i.Point.convert(Y["bottom-left"]||[0,0]),"bottom-right":i.Point.convert(Y["bottom-right"]||[0,0]),left:i.Point.convert(Y.left||[0,0]),right:i.Point.convert(Y.right||[0,0])};else return ol(new i.Point(0,0))}var io={version:i.version,supported:a,setRTLTextPlugin:i.setRTLTextPlugin,getRTLTextPluginStatus:i.getRTLTextPluginStatus,Map:li,NavigationControl:Vi,GeolocateControl:Zs,AttributionControl:en,ScaleControl:Ml,FullscreenControl:ss,Popup:wa,Marker:Ki,Style:yu,LngLat:i.LngLat,LngLatBounds:i.LngLatBounds,Point:i.Point,MercatorCoordinate:i.MercatorCoordinate,Evented:i.Evented,config:i.config,prewarm:ua,clearPrewarmedResources:ma,get accessToken(){return i.config.ACCESS_TOKEN},set accessToken(Y){i.config.ACCESS_TOKEN=Y},get baseApiUrl(){return i.config.API_URL},set baseApiUrl(Y){i.config.API_URL=Y},get workerCount(){return fn.workerCount},set workerCount(Y){fn.workerCount=Y},get maxParallelImageRequests(){return i.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(Y){i.config.MAX_PARALLEL_IMAGE_REQUESTS=Y},clearStorage:function(D){i.clearTileCache(D)},workerUrl:""};return io}),r})});var yGe=ye((Pxr,mGe)=>{"use strict";var hw=Dr(),Wjt=Zl().sanitizeHTML,Xjt=cJ(),vGe=m1();function pGe(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=vGe.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var ag=pGe.prototype;ag.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=r7(t)};ag.needsNewImage=function(e){var t=this.subplot.map;return t.getSource(this.idSource)&&this.sourceType==="image"&&e.sourcetype==="image"&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))};ag.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type};ag.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]};ag.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]};ag.updateImage=function(e){var t=this.subplot.map;t.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var r=this.findFollowingMapboxLayerId(this.lookupBelow());r!==null&&this.subplot.map.moveLayer(this.idLayer,r)};ag.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,!!r7(e)){var r=Zjt(e);t.addSource(this.idSource,r)}};ag.findFollowingMapboxLayerId=function(e){if(e==="traces")for(var t=this.subplot.getMapLayers(),r=0;r0){for(var r=0;r0}function gGe(e){var t={},r={};switch(e.type){case"circle":hw.extendFlat(r,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":hw.extendFlat(r,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":hw.extendFlat(r,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var n=e.symbol,i=Xjt(n.textposition,n.iconsize);hw.extendFlat(t,{"icon-image":n.icon+"-15","icon-size":n.iconsize/10,"text-field":n.text,"text-size":n.textfont.size,"text-anchor":i.anchor,"text-offset":i.offset,"symbol-placement":n.placement}),hw.extendFlat(r,{"icon-color":e.color,"text-color":n.textfont.color,"text-opacity":e.opacity});break;case"raster":hw.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":e.opacity});break}return{layout:t,paint:r}}function Zjt(e){var t=e.sourcetype,r=e.source,n={type:t},i;return t==="geojson"?i="data":t==="vector"?i=typeof r=="string"?"url":"tiles":t==="raster"?(i="tiles",n.tileSize=256):t==="image"&&(i="url",n.coordinates=e.coordinates),n[i]=r,e.sourceattribution&&(n.attribution=Wjt(e.sourceattribution)),n}mGe.exports=function(t,r,n){var i=new pGe(t,r);return i.update(n),i}});var EGe=ye((Ixr,MGe)=>{"use strict";var mJ=gJ(),yJ=Dr(),wGe=hx(),_Ge=qa(),Yjt=ho(),Kjt=yv(),i7=vf(),TGe=Cg(),Jjt=TGe.drawMode,$jt=TGe.selectMode,Qjt=Of().prepSelect,eWt=Of().clearOutline,tWt=Of().clearSelectionsCache,rWt=Of().selectOnClick,kx=m1(),iWt=yGe();function AGe(e,t){this.id=t,this.gd=e;var r=e._fullLayout,n=e._context;this.container=r._glcontainer.node(),this.isStatic=n.staticPlot,this.uid=r._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(r),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var Gh=AGe.prototype;Gh.plot=function(e,t,r){var n=this,i=t[n.id];n.map&&i.accesstoken!==n.accessToken&&(n.map.remove(),n.map=null,n.styleObj=null,n.traceHash={},n.layerList=[]);var a;n.map?a=new Promise(function(o,s){n.updateMap(e,t,o,s)}):a=new Promise(function(o,s){n.createMap(e,t,o,s)}),r.push(a)};Gh.createMap=function(e,t,r,n){var i=this,a=t[i.id],o=i.styleObj=SGe(a.style,t);i.accessToken=a.accesstoken;var s=a.bounds,l=s?[[s.west,s.south],[s.east,s.north]]:null,u=i.map=new mJ.Map({container:i.div,style:o.style,center:_J(a.center),zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,maxBounds:l,interactive:!i.isStatic,preserveDrawingBuffer:i.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new mJ.AttributionControl({compact:!0}));u._canvas.style.left="0px",u._canvas.style.top="0px",i.rejectOnError(n),i.isStatic||i.initFx(e,t);var c=[];c.push(new Promise(function(f){u.once("load",f)})),c=c.concat(wGe.fetchTraceGeoData(e)),Promise.all(c).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Gh.updateMap=function(e,t,r,n){var i=this,a=i.map,o=t[this.id];i.rejectOnError(n);var s=[],l=SGe(o.style,t);JSON.stringify(i.styleObj)!==JSON.stringify(l)&&(i.styleObj=l,a.setStyle(l.style),i.traceHash={},s.push(new Promise(function(u){a.once("styledata",u)}))),s=s.concat(wGe.fetchTraceGeoData(e)),Promise.all(s).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Gh.fillBelowLookup=function(e,t){var r=t[this.id],n=r.layers,i,a,o=this.belowLookup={},s=!1;for(i=0;i1)for(i=0;i-1&&rWt(l.originalEvent,n,[r.xaxis],[r.yaxis],r.id,s),u.indexOf("event")>-1&&i7.click(n,l.originalEvent)}}};Gh.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(t.isStatic)return;function i(l){var u=t.map.unproject(l);return[u.lng,u.lat]}var a=e.dragmode,o;o=function(l,u){if(u.isRect){var c=l.range={};c[t.id]=[i([u.xmin,u.ymin]),i([u.xmax,u.ymax])]}else{var f=l.lassoPoints={};f[t.id]=u.map(i)}};var s=t.dragOptions;t.dragOptions=yJ.extendDeep(s||{},{dragmode:e.dragmode,element:t.div,gd:n,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:o},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),$jt(a)||Jjt(a)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(l,u,c){Qjt(l,u,c,t.dragOptions,a)},Kjt.init(t.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener("touchstart",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on("click",t.onClickInPanHandler))};Gh.updateFramework=function(e){var t=e[this.id].domain,r=e._size,n=this.div.style;n.width=r.w*(t.x[1]-t.x[0])+"px",n.height=r.h*(t.y[1]-t.y[0])+"px",n.left=r.l+t.x[0]*r.w+"px",n.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])};Gh.updateLayers=function(e){var t=e[this.id],r=t.layers,n=this.layerList,i;if(r.length!==n.length){for(i=0;i{"use strict";var xJ=Dr(),nWt=O_(),aWt=Zd(),kGe=Zk();CGe.exports=function(t,r,n){nWt(t,r,n,{type:"mapbox",attributes:kGe,handleDefaults:oWt,partition:"y",accessToken:r._mapboxAccessToken})};function oWt(e,t,r,n){r("accesstoken",n.accessToken),r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch");var i=r("bounds.west"),a=r("bounds.east"),o=r("bounds.south"),s=r("bounds.north");(i===void 0||a===void 0||o===void 0||s===void 0)&&delete t.bounds,aWt(e,t,{name:"layers",handleItemDefaults:sWt}),t._input=e}function sWt(e,t){function r(l,u){return xJ.coerce(e,t,kGe.layers,l,u)}var n=r("visible");if(n){var i=r("sourcetype"),a=i==="raster"||i==="image";r("source"),r("sourceattribution"),i==="vector"&&r("sourcelayer"),i==="image"&&r("coordinates");var o;a&&(o="raster");var s=r("type",o);a&&s!=="raster"&&(s=t.type="raster",xJ.log("Source types *raster* and *image* must drawn *raster* layer type.")),r("below"),r("color"),r("opacity"),r("minzoom"),r("maxzoom"),s==="circle"&&r("circle.radius"),s==="line"&&(r("line.width"),r("line.dash")),s==="fill"&&r("fill.outlinecolor"),s==="symbol"&&(r("symbol.icon"),r("symbol.iconsize"),r("symbol.text"),xJ.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}});var n7=ye(Np=>{"use strict";var PGe=gJ(),nm=Dr(),bJ=nm.strTranslate,lWt=nm.strScale,uWt=Id().getSubplotCalcData,cWt=Wp(),fWt=Oa(),IGe=So(),hWt=Zl(),dWt=EGe(),Cx="mapbox",oy=Np.constants=m1();Np.name=Cx;Np.attr="subplot";Np.idRoot=Cx;Np.idRegex=Np.attrRegex=nm.counterRegex(Cx);var vWt=["mapbox subplots and traces are deprecated!","Please consider switching to `map` subplots and traces.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");Np.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}};Np.layoutAttributes=Zk();Np.supplyLayoutDefaults=LGe();var RGe=!0;Np.plot=function(t){RGe&&(RGe=!1,nm.warn(vWt));var r=t._fullLayout,n=t.calcdata,i=r._subplots[Cx];if(PGe.version!==oy.requiredVersion)throw new Error(oy.wrongVersionErrorMsg);var a=pWt(t,i);PGe.accessToken=a;for(var o=0;op/2){var k=d.split("|").join("
");_.text(k).attr("data-unformatted",k).call(hWt.convertToTspans,e),b=IGe.bBox(_.node())}_.attr("transform",bJ(-3,-b.height+8)),v.insert("rect",".static-attribution").attr({x:-b.width-6,y:-b.height-3,width:b.width+6,height:b.height+3,fill:"rgba(255, 255, 255, 0.75)"});var E=1;b.width+6>p&&(E=p/(b.width+6));var T=[n.l+n.w*o.x[1],n.t+n.h*(1-o.y[0])];v.attr("transform",bJ(T[0],T[1])+lWt(E))}};function pWt(e,t){var r=e._fullLayout,n=e._context;if(n.mapboxAccessToken==="")return"";for(var i=[],a=[],o=!1,s=!1,l=0;l1&&nm.warn(oy.multipleTokensErrorMsg),i[0]):(a.length&&nm.log(["Listed mapbox access token(s)",a.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function DGe(e){return typeof e=="string"&&(oy.styleValuesMapbox.indexOf(e)!==-1||e.indexOf("mapbox://")===0||e.indexOf("stamen")===0)}Np.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[Cx],n=0;n{"use strict";var Fxr=["*scattermapbox* trace is deprecated!","Please consider switching to the *scattermap* trace type and `map` subplots.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");FGe.exports={attributes:Kz(),supplyDefaults:XVe(),colorbar:$d(),formatLabels:uJ(),calc:_F(),plot:sGe(),hoverPoints:t7().hoverPoints,eventData:fGe(),selectPoints:dGe(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:"trace",name:"scattermapbox",basePlotModule:n7(),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}});var qGe=ye((Oxr,OGe)=>{"use strict";OGe.exports=zGe()});var wJ=ye((qxr,BGe)=>{"use strict";var y1=a5(),gWt=Tu(),{hovertemplateAttrs:mWt,templatefallbackAttrs:yWt}=Ll(),_Wt=Gl(),Lx=Ao().extendFlat;BGe.exports=Lx({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:Lx({},y1.featureidkey,{}),below:{valType:"string",editType:"plot"},text:y1.text,hovertext:y1.hovertext,marker:{line:{color:Lx({},y1.marker.line.color,{editType:"plot"}),width:Lx({},y1.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:Lx({},y1.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:Lx({},y1.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:Lx({},y1.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:y1.hoverinfo,hovertemplate:mWt({},{keys:["properties"]}),hovertemplatefallback:yWt(),showlegend:Lx({},_Wt.showlegend,{dflt:!1})},gWt("",{cLetter:"z",editTypeOverride:"calc"}))});var UGe=ye((Bxr,NGe)=>{"use strict";var $k=Dr(),xWt=td(),bWt=wJ();NGe.exports=function(t,r,n,i){function a(c,f){return $k.coerce(t,r,bWt,c,f)}var o=a("locations"),s=a("z"),l=a("geojson");if(!$k.isArrayOrTypedArray(o)||!o.length||!$k.isArrayOrTypedArray(s)||!s.length||!(typeof l=="string"&&l!==""||$k.isPlainObject(l))){r.visible=!1;return}a("featureidkey"),r._length=Math.min(o.length,s.length),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var u=a("marker.line.width");u&&a("marker.line.color"),a("marker.opacity"),xWt(t,r,i,a,{prefix:"",cLetter:"z"}),$k.coerceSelectionMarkerOpacity(r,a)}});var TJ=ye((Nxr,HGe)=>{"use strict";var wWt=Eo(),_1=Dr(),TWt=tc(),AWt=So(),SWt=cx().makeBlank,VGe=hx();function MWt(e){var t=e[0].trace,r=t.visible===!0&&t._length!==0,n={layout:{visibility:"none"},paint:{}},i={layout:{visibility:"none"},paint:{}},a=t._opts={fill:n,line:i,geojson:SWt()};if(!r)return a;var o=VGe.extractTraceFeature(e);if(!o)return a;var s=TWt.makeColorScaleFuncFromTrace(t),l=t.marker,u=l.line||{},c;_1.isArrayOrTypedArray(l.opacity)&&(c=function(k){var E=k.mo;return wWt(E)?+_1.constrain(E,0,1):0});var f;_1.isArrayOrTypedArray(u.color)&&(f=function(k){return k.mlc});var h;_1.isArrayOrTypedArray(u.width)&&(h=function(k){return k.mlw});for(var d=0;d{"use strict";var WGe=TJ().convert,EWt=TJ().convertOnSelect,jGe=m1().traceLayerPrefix;function XGe(e,t){this.type="choroplethmapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",jGe+t+"-fill"],["line",jGe+t+"-line"]],this.below=null}var L5=XGe.prototype;L5.update=function(e){this._update(WGe(e)),e[0].trace._glTrace=this};L5.updateOnSelect=function(e){this._update(EWt(e))};L5._update=function(e){var t=this.subplot,r=this.layerList,n=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(e.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(e,n),this.below=n);for(var i=0;i=0;r--)e.removeLayer(t[r][1])};L5.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};ZGe.exports=function(t,r){var n=r[0].trace,i=new XGe(t,n.uid),a=i.sourceId,o=WGe(r),s=i.below=t.belowLookup["trace-"+n.uid];return t.map.addSource(a,{type:"geojson",data:o.geojson}),i._addLayers(o,s),r[0].trace._glTrace=i,i}});var JGe=ye((Gxr,KGe)=>{"use strict";var Vxr=["*choroplethmapbox* trace is deprecated!","Please consider switching to the *choroplethmap* trace type and `map` subplots.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");KGe.exports={attributes:wJ(),supplyDefaults:UGe(),colorbar:D_(),calc:NF(),plot:YGe(),hoverPoints:VF(),eventData:GF(),selectPoints:HF(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.updateOnSelect(t)}},getBelow:function(e,t){for(var r=t.getMapLayers(),n=r.length-2;n>=0;n--){var i=r[n].id;if(typeof i=="string"&&i.indexOf("water")===0){for(var a=n+1;a{"use strict";$Ge.exports=JGe()});var SJ=ye((jxr,tHe)=>{"use strict";var kWt=Tu(),{hovertemplateAttrs:CWt,templatefallbackAttrs:LWt}=Ll(),eHe=Gl(),a7=Kz(),AJ=Ao().extendFlat;tHe.exports=AJ({lon:a7.lon,lat:a7.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:a7.text,hovertext:a7.hovertext,hoverinfo:AJ({},eHe.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:CWt(),hovertemplatefallback:LWt(),showlegend:AJ({},eHe.showlegend,{dflt:!1})},kWt("",{cLetter:"z",editTypeOverride:"calc"}))});var iHe=ye((Wxr,rHe)=>{"use strict";var PWt=Dr(),IWt=td(),RWt=SJ();rHe.exports=function(t,r,n,i){function a(u,c){return PWt.coerce(t,r,RWt,u,c)}var o=a("lon")||[],s=a("lat")||[],l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),IWt(t,r,i,a,{prefix:"",cLetter:"z"})}});var oHe=ye((Xxr,aHe)=>{"use strict";var MJ=Eo(),DWt=Dr().isArrayOrTypedArray,EJ=fs().BADNUM,FWt=gv(),nHe=Dr()._;aHe.exports=function(t,r){for(var n=r._length,i=new Array(n),a=r.z,o=DWt(a)&&a.length,s=0;s{"use strict";var zWt=Eo(),kJ=Dr(),sHe=ka(),lHe=tc(),uHe=fs().BADNUM,OWt=cx().makeBlank;cHe.exports=function(t){var r=t[0].trace,n=r.visible===!0&&r._length!==0,i={layout:{visibility:"none"},paint:{}},a=r._opts={heatmap:i,geojson:OWt()};if(!n)return a;var o=[],s,l=r.z,u=r.radius,c=kJ.isArrayOrTypedArray(l)&&l.length,f=kJ.isArrayOrTypedArray(u);for(s=0;s0?+u[s]:0),o.push({type:"Feature",geometry:{type:"Point",coordinates:d},properties:v})}}var b=lHe.extractOpts(r),p=b.reversescale?lHe.flipScale(b.colorscale):b.colorscale,k=p[0][1],E=sHe.opacity(k)<1?k:sHe.addOpacity(k,0),T=["interpolate",["linear"],["heatmap-density"],0,E];for(s=1;s{"use strict";var hHe=fHe(),qWt=m1().traceLayerPrefix;function dHe(e,t){this.type="densitymapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",qWt+t+"-heatmap"]],this.below=null}var o7=dHe.prototype;o7.update=function(e){var t=this.subplot,r=this.layerList,n=hHe(e),i=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(n.geojson),i!==this.below&&(this._removeLayers(),this._addLayers(n,i),this.below=i);for(var a=0;a=0;r--)e.removeLayer(t[r][1])};o7.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};vHe.exports=function(t,r){var n=r[0].trace,i=new dHe(t,n.uid),a=i.sourceId,o=hHe(r),s=i.below=t.belowLookup["trace-"+n.uid];return t.map.addSource(a,{type:"geojson",data:o.geojson}),i._addLayers(o,s),i}});var mHe=ye((Kxr,gHe)=>{"use strict";var BWt=ho(),NWt=t7().hoverPoints,UWt=t7().getExtraText;gHe.exports=function(t,r,n){var i=NWt(t,r,n);if(i){var a=i[0],o=a.cd,s=o[0].trace,l=o[a.index];if(delete a.color,"z"in l){var u=a.subplot.mockAxis;a.z=l.z,a.zLabel=BWt.tickText(u,u.c2l(l.z),"hover").text}return a.extraText=UWt(s,l,o[0].t.labels),[a]}}});var _He=ye((Jxr,yHe)=>{"use strict";yHe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var bHe=ye((Qxr,xHe)=>{"use strict";var $xr=["*densitymapbox* trace is deprecated!","Please consider switching to the *densitymap* trace type and `map` subplots.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");xHe.exports={attributes:SJ(),supplyDefaults:iHe(),colorbar:D_(),formatLabels:uJ(),calc:oHe(),plot:pHe(),hoverPoints:mHe(),eventData:_He(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n{"use strict";wHe.exports=bHe()});var SHe=ye((tbr,AHe)=>{AHe.exports={version:8,name:"orto",metadata:{"maputnik:renderer":"mlgljs"},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}},{id:"waterway_tunnel",type:"line",source:"openmaptiles","source-layer":"waterway",minzoom:14,filter:["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]},"line-dasharray":[2,4]}},{id:"waterway-other",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["!in","class","canal","river","stream"],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,2]]}}},{id:"waterway-stream-canal",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]}}},{id:"waterway-river",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["==","class","river"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.2,stops:[[10,.8],[20,4]]},"line-opacity":.5}},{id:"water-offset",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",maxzoom:8,filter:["==","$type","Polygon"],layout:{visibility:"visible"},paint:{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{base:1,stops:[[6,[2,0]],[8,[0,0]]]}}},{id:"water",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{id:"water-pattern",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{id:"landcover-ice-shelf",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"landcover",filter:["==","subclass","ice_shelf"],layout:{visibility:"visible"},paint:{"fill-color":"#fff","fill-opacity":{base:1,stops:[[0,.9],[10,.3]]}}},{id:"tunnel-service-track-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[15,1],[16,4],[20,11]]}}},{id:"tunnel-minor-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,1]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"tunnel-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"tunnel-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.7}},{id:"tunnel-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"tunnel-path",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"tunnel-service-track",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-width":{base:1.2,stops:[[15.5,0],[16,2],[20,7.5]]}}},{id:"tunnel-minor",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor_road"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-opacity":1,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"tunnel-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,10]]}}},{id:"tunnel-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-motorway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#ffdaa6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-railway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]},"line-dasharray":[2,2]}},{id:"ferry",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["in","class","ferry"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{id:"aeroway-taxiway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","taxiway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,2],[17,12]]},"line-opacity":1}},{id:"aeroway-runway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","runway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,5],[17,55]]},"line-opacity":1}},{id:"aeroway-taxiway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","taxiway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,1],[17,10]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"aeroway-runway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","runway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,4],[17,50]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"highway-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-minor-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,0]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"highway-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":.5,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"highway-primary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[7,0],[8,.6]]},"line-width":{base:1.2,stops:[[7,0],[8,.6],[9,1.5],[20,22]]}}},{id:"highway-trunk-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[5,0],[6,.5]]},"line-width":{base:1.2,stops:[[5,0],[6,.6],[7,1.5],[20,22]]}}},{id:"highway-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:4,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[4,0],[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":{stops:[[4,0],[5,.5]]}}},{id:"highway-path",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"highway-motorway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-minor",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fff","line-opacity":.5,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"highway-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[8,.5],[20,13]]},"line-opacity":.5}},{id:"highway-primary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[8.5,0],[9,.5],[20,18]]},"line-opacity":0}},{id:"highway-trunk",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"highway-motorway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"railway-transit",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-transit-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway-service",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-service-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"railway-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"bridge-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,28]]}}},{id:"bridge-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"hsl(28, 76%, 67%)","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,26]]}}},{id:"bridge-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"bridge-path-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#f8f4f0","line-width":{base:1.2,stops:[[15,1.2],[20,18]]}}},{id:"bridge-path",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#cba","line-width":{base:1.2,stops:[[15,1.2],[20,4]]},"line-dasharray":[1.5,.75]}},{id:"bridge-motorway-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,20]]}}},{id:"bridge-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]}}},{id:"bridge-motorway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"bridge-railway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"bridge-railway-hatching",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"cablecar",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,1],[19,2.5]]}}},{id:"cablecar-dash",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{id:"boundary-land-level-4",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],layout:{"line-join":"round"},paint:{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{base:1.4,stops:[[4,.4],[5,1],[12,3]]},"line-opacity":.6}},{id:"boundary-land-level-2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 66%)","line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,2]]}}},{id:"boundary-land-disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=","maritime",1],["==","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,8]]}}},{id:"boundary-water",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["in","admin_level",2,4],["==","maritime",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(154, 189, 214, 1)","line-width":{base:1,stops:[[0,.6],[4,1],[5,1],[12,1]]},"line-opacity":{stops:[[6,0],[10,0]]}}},{id:"waterway-name",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:13,filter:["all",["==","$type","LineString"],["has","name"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":.2,"symbol-spacing":350},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-lakeline",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==","$type","LineString"],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":`{name:latin} +`}),{fragmentSource:Y,vertexSource:D,staticAttributes:O,staticUniforms:ne}}var wf=Object.freeze({__proto__:null,prelude:js,background:Eu,backgroundPattern:Dc,circle:ks,clippingMask:bc,heatmap:hu,heatmapTexture:_u,collisionBox:nl,collisionCircle:nh,debug:Mh,fill:zu,fillOutline:Fc,fillOutlinePattern:wc,fillPattern:bd,fillExtrusion:xf,fillExtrusionPattern:Pf,hillshadePrepare:qu,hillshade:bf,line:jl,lineGradient:lf,linePattern:Xh,lineSDF:If,raster:Cs,symbolIcon:du,symbolSDF:ku,symbolTextAndIcon:Xf}),zc=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};zc.prototype.bind=function(D,J,O,K,de,ne,be,Be){this.context=D;for(var ht=this.boundPaintVertexBuffers.length!==K.length,Yt=0;!ht&&Yt>16,be>>16],u_pixel_coord_lower:[ne&65535,be&65535]}}function uf(Y,D,J,O){var K=J.imageManager.getPattern(Y.from.toString()),de=J.imageManager.getPattern(Y.to.toString()),ne=J.imageManager.getPixelSize(),be=ne.width,Be=ne.height,ht=Math.pow(2,O.tileID.overscaledZ),Yt=O.tileSize*Math.pow(2,J.transform.tileZoom)/ht,cr=Yt*(O.tileID.canonical.x+O.tileID.wrap*ht),Nt=Yt*O.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:K.tl,u_pattern_br_a:K.br,u_pattern_tl_b:de.tl,u_pattern_br_b:de.br,u_texsize:[be,Be],u_mix:D.t,u_pattern_size_a:K.displaySize,u_pattern_size_b:de.displaySize,u_scale_a:D.fromScale,u_scale_b:D.toScale,u_tile_units_to_pixels:1/As(O,1,J.transform.tileZoom),u_pixel_coord_upper:[cr>>16,Nt>>16],u_pixel_coord_lower:[cr&65535,Nt&65535]}}var Zf=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_lightpos:new i.Uniform3f(Y,D.u_lightpos),u_lightintensity:new i.Uniform1f(Y,D.u_lightintensity),u_lightcolor:new i.Uniform3f(Y,D.u_lightcolor),u_vertical_gradient:new i.Uniform1f(Y,D.u_vertical_gradient),u_opacity:new i.Uniform1f(Y,D.u_opacity)}},Wl=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_lightpos:new i.Uniform3f(Y,D.u_lightpos),u_lightintensity:new i.Uniform1f(Y,D.u_lightintensity),u_lightcolor:new i.Uniform3f(Y,D.u_lightcolor),u_vertical_gradient:new i.Uniform1f(Y,D.u_vertical_gradient),u_height_factor:new i.Uniform1f(Y,D.u_height_factor),u_image:new i.Uniform1i(Y,D.u_image),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,D.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,D.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,D.u_scale),u_fade:new i.Uniform1f(Y,D.u_fade),u_opacity:new i.Uniform1f(Y,D.u_opacity)}},ah=function(Y,D,J,O){var K=D.style.light,de=K.properties.get("position"),ne=[de.x,de.y,de.z],be=i.create$1();K.properties.get("anchor")==="viewport"&&i.fromRotation(be,-D.transform.angle),i.transformMat3(ne,ne,be);var Be=K.properties.get("color");return{u_matrix:Y,u_lightpos:ne,u_lightintensity:K.properties.get("intensity"),u_lightcolor:[Be.r,Be.g,Be.b],u_vertical_gradient:+J,u_opacity:O}},Zu=function(Y,D,J,O,K,de,ne){return i.extend(ah(Y,D,J,O),Xu(de,D,ne),{u_height_factor:-Math.pow(2,K.overscaledZ)/ne.tileSize/8})},qc=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix)}},Tc=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_image:new i.Uniform1i(Y,D.u_image),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,D.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,D.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,D.u_scale),u_fade:new i.Uniform1f(Y,D.u_fade)}},wl=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_world:new i.Uniform2f(Y,D.u_world)}},vu=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_world:new i.Uniform2f(Y,D.u_world),u_image:new i.Uniform1i(Y,D.u_image),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_pixel_coord_upper:new i.Uniform2f(Y,D.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,D.u_pixel_coord_lower),u_scale:new i.Uniform3f(Y,D.u_scale),u_fade:new i.Uniform1f(Y,D.u_fade)}},Oc=function(Y){return{u_matrix:Y}},cf=function(Y,D,J,O){return i.extend(Oc(Y),Xu(J,D,O))},fc=function(Y,D){return{u_matrix:Y,u_world:D}},Bc=function(Y,D,J,O,K){return i.extend(cf(Y,D,J,O),{u_world:K})},kt=function(Y,D){return{u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_scale_with_map:new i.Uniform1i(Y,D.u_scale_with_map),u_pitch_with_map:new i.Uniform1i(Y,D.u_pitch_with_map),u_extrude_scale:new i.Uniform2f(Y,D.u_extrude_scale),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix)}},Zt=function(Y,D,J,O){var K=Y.transform,de,ne;if(O.paint.get("circle-pitch-alignment")==="map"){var be=As(J,1,K.zoom);de=!0,ne=[be,be]}else de=!1,ne=K.pixelsToGLUnits;return{u_camera_to_center_distance:K.cameraToCenterDistance,u_scale_with_map:+(O.paint.get("circle-pitch-scale")==="map"),u_matrix:Y.translatePosMatrix(D.posMatrix,J,O.paint.get("circle-translate"),O.paint.get("circle-translate-anchor")),u_pitch_with_map:+de,u_device_pixel_ratio:i.browser.devicePixelRatio,u_extrude_scale:ne}},Mr=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_pixels_to_tile_units:new i.Uniform1f(Y,D.u_pixels_to_tile_units),u_extrude_scale:new i.Uniform2f(Y,D.u_extrude_scale),u_overscale_factor:new i.Uniform1f(Y,D.u_overscale_factor)}},xr=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_inv_matrix:new i.UniformMatrix4f(Y,D.u_inv_matrix),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_viewport_size:new i.Uniform2f(Y,D.u_viewport_size)}},Kr=function(Y,D,J){var O=As(J,1,D.zoom),K=Math.pow(2,D.zoom-J.tileID.overscaledZ),de=J.tileID.overscaleFactor();return{u_matrix:Y,u_camera_to_center_distance:D.cameraToCenterDistance,u_pixels_to_tile_units:O,u_extrude_scale:[D.pixelsToGLUnits[0]/(O*K),D.pixelsToGLUnits[1]/(O*K)],u_overscale_factor:de}},Mi=function(Y,D,J){return{u_matrix:Y,u_inv_matrix:D,u_camera_to_center_distance:J.cameraToCenterDistance,u_viewport_size:[J.width,J.height]}},Wi=function(Y,D){return{u_color:new i.UniformColor(Y,D.u_color),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_overlay:new i.Uniform1i(Y,D.u_overlay),u_overlay_scale:new i.Uniform1f(Y,D.u_overlay_scale)}},dn=function(Y,D,J){return J===void 0&&(J=1),{u_matrix:Y,u_color:D,u_overlay:0,u_overlay_scale:J}},wn=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix)}},On=function(Y){return{u_matrix:Y}},Yi=function(Y,D){return{u_extrude_scale:new i.Uniform1f(Y,D.u_extrude_scale),u_intensity:new i.Uniform1f(Y,D.u_intensity),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix)}},$i=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_world:new i.Uniform2f(Y,D.u_world),u_image:new i.Uniform1i(Y,D.u_image),u_color_ramp:new i.Uniform1i(Y,D.u_color_ramp),u_opacity:new i.Uniform1f(Y,D.u_opacity)}},an=function(Y,D,J,O){return{u_matrix:Y,u_extrude_scale:As(D,1,J),u_intensity:O}},Fi=function(Y,D,J,O){var K=i.create();i.ortho(K,0,Y.width,Y.height,0,0,1);var de=Y.context.gl;return{u_matrix:K,u_world:[de.drawingBufferWidth,de.drawingBufferHeight],u_image:J,u_color_ramp:O,u_opacity:D.paint.get("heatmap-opacity")}},ta=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_image:new i.Uniform1i(Y,D.u_image),u_latrange:new i.Uniform2f(Y,D.u_latrange),u_light:new i.Uniform2f(Y,D.u_light),u_shadow:new i.UniformColor(Y,D.u_shadow),u_highlight:new i.UniformColor(Y,D.u_highlight),u_accent:new i.UniformColor(Y,D.u_accent)}},Ca=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_image:new i.Uniform1i(Y,D.u_image),u_dimension:new i.Uniform2f(Y,D.u_dimension),u_zoom:new i.Uniform1f(Y,D.u_zoom),u_unpack:new i.Uniform4f(Y,D.u_unpack)}},Ra=function(Y,D,J){var O=J.paint.get("hillshade-shadow-color"),K=J.paint.get("hillshade-highlight-color"),de=J.paint.get("hillshade-accent-color"),ne=J.paint.get("hillshade-illumination-direction")*(Math.PI/180);J.paint.get("hillshade-illumination-anchor")==="viewport"&&(ne-=Y.transform.angle);var be=!Y.options.moving;return{u_matrix:Y.transform.calculatePosMatrix(D.tileID.toUnwrapped(),be),u_image:0,u_latrange:Na(Y,D.tileID),u_light:[J.paint.get("hillshade-exaggeration"),ne],u_shadow:O,u_highlight:K,u_accent:de}},La=function(Y,D){var J=D.stride,O=i.create();return i.ortho(O,0,i.EXTENT,-i.EXTENT,0,0,1),i.translate(O,O,[0,-i.EXTENT,0]),{u_matrix:O,u_image:1,u_dimension:[J,J],u_zoom:Y.overscaledZ,u_unpack:D.getUnpackVector()}};function Na(Y,D){var J=Math.pow(2,D.canonical.z),O=D.canonical.y;return[new i.MercatorCoordinate(0,O/J).toLngLat().lat,new i.MercatorCoordinate(0,(O+1)/J).toLngLat().lat]}var Zn=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_ratio:new i.Uniform1f(Y,D.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,D.u_units_to_pixels)}},Dn=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_ratio:new i.Uniform1f(Y,D.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,D.u_units_to_pixels),u_image:new i.Uniform1i(Y,D.u_image),u_image_height:new i.Uniform1f(Y,D.u_image_height)}},Ka=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_ratio:new i.Uniform1f(Y,D.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_image:new i.Uniform1i(Y,D.u_image),u_units_to_pixels:new i.Uniform2f(Y,D.u_units_to_pixels),u_scale:new i.Uniform3f(Y,D.u_scale),u_fade:new i.Uniform1f(Y,D.u_fade)}},bo=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_ratio:new i.Uniform1f(Y,D.u_ratio),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(Y,D.u_units_to_pixels),u_patternscale_a:new i.Uniform2f(Y,D.u_patternscale_a),u_patternscale_b:new i.Uniform2f(Y,D.u_patternscale_b),u_sdfgamma:new i.Uniform1f(Y,D.u_sdfgamma),u_image:new i.Uniform1i(Y,D.u_image),u_tex_y_a:new i.Uniform1f(Y,D.u_tex_y_a),u_tex_y_b:new i.Uniform1f(Y,D.u_tex_y_b),u_mix:new i.Uniform1f(Y,D.u_mix)}},Zo=function(Y,D,J){var O=Y.transform;return{u_matrix:ml(Y,D,J),u_ratio:1/As(D,1,O.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_units_to_pixels:[1/O.pixelsToGLUnits[0],1/O.pixelsToGLUnits[1]]}},Ss=function(Y,D,J,O){return i.extend(Zo(Y,D,J),{u_image:0,u_image_height:O})},as=function(Y,D,J,O){var K=Y.transform,de=Ho(D,K);return{u_matrix:ml(Y,D,J),u_texsize:D.imageAtlasTexture.size,u_ratio:1/As(D,1,K.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_image:0,u_scale:[de,O.fromScale,O.toScale],u_fade:O.t,u_units_to_pixels:[1/K.pixelsToGLUnits[0],1/K.pixelsToGLUnits[1]]}},ws=function(Y,D,J,O,K){var de=Y.transform,ne=Y.lineAtlas,be=Ho(D,de),Be=J.layout.get("line-cap")==="round",ht=ne.getDash(O.from,Be),Yt=ne.getDash(O.to,Be),cr=ht.width*K.fromScale,Nt=Yt.width*K.toScale;return i.extend(Zo(Y,D,J),{u_patternscale_a:[be/cr,-ht.height/2],u_patternscale_b:[be/Nt,-Yt.height/2],u_sdfgamma:ne.width/(Math.min(cr,Nt)*256*i.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:ht.y,u_tex_y_b:Yt.y,u_mix:K.t})};function Ho(Y,D){return 1/As(Y,1,D.tileZoom)}function ml(Y,D,J){return Y.translatePosMatrix(D.tileID.posMatrix,D,J.paint.get("line-translate"),J.paint.get("line-translate-anchor"))}var Ws=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_tl_parent:new i.Uniform2f(Y,D.u_tl_parent),u_scale_parent:new i.Uniform1f(Y,D.u_scale_parent),u_buffer_scale:new i.Uniform1f(Y,D.u_buffer_scale),u_fade_t:new i.Uniform1f(Y,D.u_fade_t),u_opacity:new i.Uniform1f(Y,D.u_opacity),u_image0:new i.Uniform1i(Y,D.u_image0),u_image1:new i.Uniform1i(Y,D.u_image1),u_brightness_low:new i.Uniform1f(Y,D.u_brightness_low),u_brightness_high:new i.Uniform1f(Y,D.u_brightness_high),u_saturation_factor:new i.Uniform1f(Y,D.u_saturation_factor),u_contrast_factor:new i.Uniform1f(Y,D.u_contrast_factor),u_spin_weights:new i.Uniform3f(Y,D.u_spin_weights)}},Ls=function(Y,D,J,O,K){return{u_matrix:Y,u_tl_parent:D,u_scale_parent:J,u_buffer_scale:1,u_fade_t:O.mix,u_opacity:O.opacity*K.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:K.paint.get("raster-brightness-min"),u_brightness_high:K.paint.get("raster-brightness-max"),u_saturation_factor:ys(K.paint.get("raster-saturation")),u_contrast_factor:no(K.paint.get("raster-contrast")),u_spin_weights:va(K.paint.get("raster-hue-rotate"))}};function va(Y){Y*=Math.PI/180;var D=Math.sin(Y),J=Math.cos(Y);return[(2*J+1)/3,(-Math.sqrt(3)*D-J+1)/3,(Math.sqrt(3)*D-J+1)/3]}function no(Y){return Y>0?1/(1-Y):1+Y}function ys(Y){return Y>0?1-1/(1.001-Y):-Y}var rs=function(Y,D){return{u_is_size_zoom_constant:new i.Uniform1i(Y,D.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,D.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,D.u_size_t),u_size:new i.Uniform1f(Y,D.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,D.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,D.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,D.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,D.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,D.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,D.u_coord_matrix),u_is_text:new i.Uniform1i(Y,D.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,D.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_texture:new i.Uniform1i(Y,D.u_texture)}},Ql=function(Y,D){return{u_is_size_zoom_constant:new i.Uniform1i(Y,D.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,D.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,D.u_size_t),u_size:new i.Uniform1f(Y,D.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,D.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,D.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,D.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,D.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,D.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,D.u_coord_matrix),u_is_text:new i.Uniform1i(Y,D.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,D.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_texture:new i.Uniform1i(Y,D.u_texture),u_gamma_scale:new i.Uniform1f(Y,D.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(Y,D.u_is_halo)}},Cu=function(Y,D){return{u_is_size_zoom_constant:new i.Uniform1i(Y,D.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(Y,D.u_is_size_feature_constant),u_size_t:new i.Uniform1f(Y,D.u_size_t),u_size:new i.Uniform1f(Y,D.u_size),u_camera_to_center_distance:new i.Uniform1f(Y,D.u_camera_to_center_distance),u_pitch:new i.Uniform1f(Y,D.u_pitch),u_rotate_symbol:new i.Uniform1i(Y,D.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(Y,D.u_aspect_ratio),u_fade_change:new i.Uniform1f(Y,D.u_fade_change),u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(Y,D.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(Y,D.u_coord_matrix),u_is_text:new i.Uniform1i(Y,D.u_is_text),u_pitch_with_map:new i.Uniform1i(Y,D.u_pitch_with_map),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_texsize_icon:new i.Uniform2f(Y,D.u_texsize_icon),u_texture:new i.Uniform1i(Y,D.u_texture),u_texture_icon:new i.Uniform1i(Y,D.u_texture_icon),u_gamma_scale:new i.Uniform1f(Y,D.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(Y,D.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(Y,D.u_is_halo)}},Yu=function(Y,D,J,O,K,de,ne,be,Be,ht){var Yt=K.transform;return{u_is_size_zoom_constant:+(Y==="constant"||Y==="source"),u_is_size_feature_constant:+(Y==="constant"||Y==="camera"),u_size_t:D?D.uSizeT:0,u_size:D?D.uSize:0,u_camera_to_center_distance:Yt.cameraToCenterDistance,u_pitch:Yt.pitch/360*2*Math.PI,u_rotate_symbol:+J,u_aspect_ratio:Yt.width/Yt.height,u_fade_change:K.options.fadeDuration?K.symbolFadeChange:1,u_matrix:de,u_label_plane_matrix:ne,u_coord_matrix:be,u_is_text:+Be,u_pitch_with_map:+O,u_texsize:ht,u_texture:0}},Nc=function(Y,D,J,O,K,de,ne,be,Be,ht,Yt){var cr=K.transform;return i.extend(Yu(Y,D,J,O,K,de,ne,be,Be,ht),{u_gamma_scale:O?Math.cos(cr._pitch)*cr.cameraToCenterDistance:1,u_device_pixel_ratio:i.browser.devicePixelRatio,u_is_halo:+Yt})},pu=function(Y,D,J,O,K,de,ne,be,Be,ht){return i.extend(Nc(Y,D,J,O,K,de,ne,be,!0,Be,!0),{u_texsize_icon:ht,u_texture_icon:1})},Uc=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_opacity:new i.Uniform1f(Y,D.u_opacity),u_color:new i.UniformColor(Y,D.u_color)}},xu=function(Y,D){return{u_matrix:new i.UniformMatrix4f(Y,D.u_matrix),u_opacity:new i.Uniform1f(Y,D.u_opacity),u_image:new i.Uniform1i(Y,D.u_image),u_pattern_tl_a:new i.Uniform2f(Y,D.u_pattern_tl_a),u_pattern_br_a:new i.Uniform2f(Y,D.u_pattern_br_a),u_pattern_tl_b:new i.Uniform2f(Y,D.u_pattern_tl_b),u_pattern_br_b:new i.Uniform2f(Y,D.u_pattern_br_b),u_texsize:new i.Uniform2f(Y,D.u_texsize),u_mix:new i.Uniform1f(Y,D.u_mix),u_pattern_size_a:new i.Uniform2f(Y,D.u_pattern_size_a),u_pattern_size_b:new i.Uniform2f(Y,D.u_pattern_size_b),u_scale_a:new i.Uniform1f(Y,D.u_scale_a),u_scale_b:new i.Uniform1f(Y,D.u_scale_b),u_pixel_coord_upper:new i.Uniform2f(Y,D.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(Y,D.u_pixel_coord_lower),u_tile_units_to_pixels:new i.Uniform1f(Y,D.u_tile_units_to_pixels)}},Ac=function(Y,D,J){return{u_matrix:Y,u_opacity:D,u_color:J}},Ua=function(Y,D,J,O,K,de){return i.extend(uf(O,de,J,K),{u_matrix:Y,u_opacity:D})},oo={fillExtrusion:Zf,fillExtrusionPattern:Wl,fill:qc,fillPattern:Tc,fillOutline:wl,fillOutlinePattern:vu,circle:kt,collisionBox:Mr,collisionCircle:xr,debug:Wi,clippingMask:wn,heatmap:Yi,heatmapTexture:$i,hillshade:ta,hillshadePrepare:Ca,line:Zn,lineGradient:Dn,linePattern:Ka,lineSDF:bo,raster:Ws,symbolIcon:rs,symbolSDF:Ql,symbolTextAndIcon:Cu,background:Uc,backgroundPattern:xu},Vc;function hc(Y,D,J,O,K,de,ne){for(var be=Y.context,Be=be.gl,ht=Y.useProgram("collisionBox"),Yt=[],cr=0,Nt=0,Ne=0;Ne0){var zt=i.create(),_t=Bt;i.mul(zt,It.placementInvProjMatrix,Y.transform.glCoordMatrix),i.mul(zt,zt,It.placementViewportMatrix),Yt.push({circleArray:Ut,circleOffset:Nt,transform:_t,invTransform:zt}),cr+=Ut.length/4,Nt=cr}Ft&&ht.draw(be,Be.LINES,An.disabled,Vi.disabled,Y.colorModeForRenderPass(),wr.disabled,Kr(Bt,Y.transform,ot),J.id,Ft.layoutVertexBuffer,Ft.indexBuffer,Ft.segments,null,Y.transform.zoom,null,null,Ft.collisionVertexBuffer)}}if(!(!ne||!Yt.length)){var Dt=Y.useProgram("collisionCircle"),vt=new i.StructArrayLayout2f1f2i16;vt.resize(cr*4),vt._trim();for(var lr=0,yr=0,Br=Yt;yr=0&&($e[It.associatedIconIndex]={shiftedAnchor:bi,angle:gn})}}if(Yt){Ne.clear();for(var Ei=Y.icon.placedSymbolArray,Oi=0;Oi0){var ne=i.browser.now(),be=(ne-Y.timeAdded)/de,Be=D?(ne-D.timeAdded)/de:-1,ht=J.getSource(),Yt=K.coveringZoomLevel({tileSize:ht.tileSize,roundZoom:ht.roundZoom}),cr=!D||Math.abs(D.tileID.overscaledZ-Yt)>Math.abs(Y.tileID.overscaledZ-Yt),Nt=cr&&Y.refreshedUponExpiration?1:i.clamp(cr?be:1-Be,0,1);return Y.refreshedUponExpiration&&be>=1&&(Y.refreshedUponExpiration=!1),D?{opacity:1,mix:1-Nt}:{opacity:Nt,mix:0}}else return{opacity:1,mix:0}}function ar(Y,D,J){var O=J.paint.get("background-color"),K=J.paint.get("background-opacity");if(K!==0){var de=Y.context,ne=de.gl,be=Y.transform,Be=be.tileSize,ht=J.paint.get("background-pattern");if(!Y.isPatternMissing(ht)){var Yt=!ht&&O.a===1&&K===1&&Y.opaquePassEnabledForLayer()?"opaque":"translucent";if(Y.renderPass===Yt){var cr=Vi.disabled,Nt=Y.depthModeForSublayer(0,Yt==="opaque"?An.ReadWrite:An.ReadOnly),Ne=Y.colorModeForRenderPass(),$e=Y.useProgram(ht?"backgroundPattern":"background"),ot=be.coveringTiles({tileSize:Be});ht&&(de.activeTexture.set(ne.TEXTURE0),Y.imageManager.bind(Y.context));for(var It=J.getCrossfadeParameters(),Bt=0,Ft=ot;Bt "+J.overscaledZ);var Bt=It+" "+Ne+"kb";$a(Y,Bt),ne.draw(O,K.TRIANGLES,be,Be,wt.alphaBlended,wr.disabled,dn(de,i.Color.transparent,ot),Yt,Y.debugBuffer,Y.quadTriangleIndexBuffer,Y.debugSegments)}function $a(Y,D){Y.initDebugOverlayCanvas();var J=Y.debugOverlayCanvas,O=Y.context.gl,K=Y.debugOverlayCanvas.getContext("2d");K.clearRect(0,0,J.width,J.height),K.shadowColor="white",K.shadowBlur=2,K.lineWidth=1.5,K.strokeStyle="white",K.textBaseline="top",K.font="bold 36px Open Sans, sans-serif",K.fillText(D,5,5),K.strokeText(D,5,5),Y.debugOverlayTexture.update(J),Y.debugOverlayTexture.bind(O.LINEAR,O.CLAMP_TO_EDGE)}function Co(Y,D,J){var O=Y.context,K=J.implementation;if(Y.renderPass==="offscreen"){var de=K.prerender;de&&(Y.setCustomLayerDefaults(),O.setColorMode(Y.colorModeForRenderPass()),de.call(K,O.gl,Y.transform.customLayerMatrix()),O.setDirty(),Y.setBaseState())}else if(Y.renderPass==="translucent"){Y.setCustomLayerDefaults(),O.setColorMode(Y.colorModeForRenderPass()),O.setStencilMode(Vi.disabled);var ne=K.renderingMode==="3d"?new An(Y.context.gl.LEQUAL,An.ReadWrite,Y.depthRangeFor3D):Y.depthModeForSublayer(0,An.ReadOnly);O.setDepthMode(ne),K.render(O.gl,Y.transform.customLayerMatrix()),O.setDirty(),Y.setBaseState(),O.bindFramebuffer.set(null)}}var Qa={symbol:w,circle:ut,heatmap:Mt,line:Cr,fill:ve,"fill-extrusion":Ie,hillshade:Qe,raster:qt,background:ar,debug:Aa,custom:Co},mo=function(D,J){this.context=new Xr(D),this.transform=J,this._tileTextures={},this.setup(),this.numSublayers=ti.maxUnderzooming+ti.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Vf,this.gpuTimers={}};mo.prototype.resize=function(D,J){if(this.width=D*i.browser.devicePixelRatio,this.height=J*i.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var O=0,K=this.style._order;O256&&this.clearStencil(),O.setColorMode(wt.disabled),O.setDepthMode(An.disabled);var de=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var ne=0,be=J;ne256&&this.clearStencil();var D=this.nextStencilID++,J=this.context.gl;return new Vi({func:J.NOTEQUAL,mask:255},D,255,J.KEEP,J.KEEP,J.REPLACE)},mo.prototype.stencilModeForClipping=function(D){var J=this.context.gl;return new Vi({func:J.EQUAL,mask:255},this._tileClippingMaskIDs[D.key],0,J.KEEP,J.KEEP,J.REPLACE)},mo.prototype.stencilConfigForOverlap=function(D){var J,O=this.context.gl,K=D.sort(function(ht,Yt){return Yt.overscaledZ-ht.overscaledZ}),de=K[K.length-1].overscaledZ,ne=K[0].overscaledZ-de+1;if(ne>1){this.currentStencilSource=void 0,this.nextStencilID+ne>256&&this.clearStencil();for(var be={},Be=0;Be=0;this.currentLayer--){var zt=this.style._layers[K[this.currentLayer]],_t=de[zt.source],Dt=Be[zt.source];this._renderTileClippingMasks(zt,Dt),this.renderLayer(this,_t,zt,Dt)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?J.pop():null},mo.prototype.isPatternMissing=function(D){if(!D)return!1;if(!D.from||!D.to)return!0;var J=this.imageManager.getPattern(D.from.toString()),O=this.imageManager.getPattern(D.to.toString());return!J||!O},mo.prototype.useProgram=function(D,J){this.cache=this.cache||{};var O=""+D+(J?J.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[O]||(this.cache[O]=new Rf(this.context,D,wf[D],J,oo[D],this._showOverdrawInspector)),this.cache[O]},mo.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},mo.prototype.setBaseState=function(){var D=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(D.FUNC_ADD)},mo.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=i.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var D=this.context.gl;this.debugOverlayTexture=new i.Texture(this.context,this.debugOverlayCanvas,D.RGBA)}},mo.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var Bo=function(D,J){this.points=D,this.planes=J};Bo.fromInvProjectionMatrix=function(D,J,O){var K=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]],de=Math.pow(2,O),ne=K.map(function(ht){return i.transformMat4([],ht,D)}).map(function(ht){return i.scale$1([],ht,1/ht[3]/J*de)}),be=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],Be=be.map(function(ht){var Yt=i.sub([],ne[ht[0]],ne[ht[1]]),cr=i.sub([],ne[ht[2]],ne[ht[1]]),Nt=i.normalize([],i.cross([],Yt,cr)),Ne=-i.dot(Nt,ne[ht[1]]);return Nt.concat(Ne)});return new Bo(ne,Be)};var Ps=function(D,J){this.min=D,this.max=J,this.center=i.scale$2([],i.add([],this.min,this.max),.5)};Ps.prototype.quadrant=function(D){for(var J=[D%2===0,D<2],O=i.clone$2(this.min),K=i.clone$2(this.max),de=0;de=0;if(ne===0)return 0;ne!==J.length&&(O=!1)}if(O)return 2;for(var Be=0;Be<3;Be++){for(var ht=Number.MAX_VALUE,Yt=-Number.MAX_VALUE,cr=0;crthis.max[Be]-this.min[Be])return 0}return 1};var Ts=function(D,J,O,K){if(D===void 0&&(D=0),J===void 0&&(J=0),O===void 0&&(O=0),K===void 0&&(K=0),isNaN(D)||D<0||isNaN(J)||J<0||isNaN(O)||O<0||isNaN(K)||K<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=D,this.bottom=J,this.left=O,this.right=K};Ts.prototype.interpolate=function(D,J,O){return J.top!=null&&D.top!=null&&(this.top=i.number(D.top,J.top,O)),J.bottom!=null&&D.bottom!=null&&(this.bottom=i.number(D.bottom,J.bottom,O)),J.left!=null&&D.left!=null&&(this.left=i.number(D.left,J.left,O)),J.right!=null&&D.right!=null&&(this.right=i.number(D.right,J.right,O)),this},Ts.prototype.getCenter=function(D,J){var O=i.clamp((this.left+D-this.right)/2,0,D),K=i.clamp((this.top+J-this.bottom)/2,0,J);return new i.Point(O,K)},Ts.prototype.equals=function(D){return this.top===D.top&&this.bottom===D.bottom&&this.left===D.left&&this.right===D.right},Ts.prototype.clone=function(){return new Ts(this.top,this.bottom,this.left,this.right)},Ts.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var wo=function(D,J,O,K,de){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=de===void 0?!0:de,this._minZoom=D||0,this._maxZoom=J||22,this._minPitch=O==null?0:O,this._maxPitch=K==null?60:K,this.setMaxBounds(),this.width=0,this.height=0,this._center=new i.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Ts,this._posMatrixCache={},this._alignedPosMatrixCache={}},To={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};wo.prototype.clone=function(){var D=new wo(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return D.tileSize=this.tileSize,D.latRange=this.latRange,D.width=this.width,D.height=this.height,D._center=this._center,D.zoom=this.zoom,D.angle=this.angle,D._fov=this._fov,D._pitch=this._pitch,D._unmodified=this._unmodified,D._edgeInsets=this._edgeInsets.clone(),D._calcMatrices(),D},To.minZoom.get=function(){return this._minZoom},To.minZoom.set=function(Y){this._minZoom!==Y&&(this._minZoom=Y,this.zoom=Math.max(this.zoom,Y))},To.maxZoom.get=function(){return this._maxZoom},To.maxZoom.set=function(Y){this._maxZoom!==Y&&(this._maxZoom=Y,this.zoom=Math.min(this.zoom,Y))},To.minPitch.get=function(){return this._minPitch},To.minPitch.set=function(Y){this._minPitch!==Y&&(this._minPitch=Y,this.pitch=Math.max(this.pitch,Y))},To.maxPitch.get=function(){return this._maxPitch},To.maxPitch.set=function(Y){this._maxPitch!==Y&&(this._maxPitch=Y,this.pitch=Math.min(this.pitch,Y))},To.renderWorldCopies.get=function(){return this._renderWorldCopies},To.renderWorldCopies.set=function(Y){Y===void 0?Y=!0:Y===null&&(Y=!1),this._renderWorldCopies=Y},To.worldSize.get=function(){return this.tileSize*this.scale},To.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},To.size.get=function(){return new i.Point(this.width,this.height)},To.bearing.get=function(){return-this.angle/Math.PI*180},To.bearing.set=function(Y){var D=-i.wrap(Y,-180,180)*Math.PI/180;this.angle!==D&&(this._unmodified=!1,this.angle=D,this._calcMatrices(),this.rotationMatrix=i.create$2(),i.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},To.pitch.get=function(){return this._pitch/Math.PI*180},To.pitch.set=function(Y){var D=i.clamp(Y,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==D&&(this._unmodified=!1,this._pitch=D,this._calcMatrices())},To.fov.get=function(){return this._fov/Math.PI*180},To.fov.set=function(Y){Y=Math.max(.01,Math.min(60,Y)),this._fov!==Y&&(this._unmodified=!1,this._fov=Y/180*Math.PI,this._calcMatrices())},To.zoom.get=function(){return this._zoom},To.zoom.set=function(Y){var D=Math.min(Math.max(Y,this.minZoom),this.maxZoom);this._zoom!==D&&(this._unmodified=!1,this._zoom=D,this.scale=this.zoomScale(D),this.tileZoom=Math.floor(D),this.zoomFraction=D-this.tileZoom,this._constrain(),this._calcMatrices())},To.center.get=function(){return this._center},To.center.set=function(Y){Y.lat===this._center.lat&&Y.lng===this._center.lng||(this._unmodified=!1,this._center=Y,this._constrain(),this._calcMatrices())},To.padding.get=function(){return this._edgeInsets.toJSON()},To.padding.set=function(Y){this._edgeInsets.equals(Y)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,Y,1),this._calcMatrices())},To.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},wo.prototype.isPaddingEqual=function(D){return this._edgeInsets.equals(D)},wo.prototype.interpolatePadding=function(D,J,O){this._unmodified=!1,this._edgeInsets.interpolate(D,J,O),this._constrain(),this._calcMatrices()},wo.prototype.coveringZoomLevel=function(D){var J=(D.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/D.tileSize));return Math.max(0,J)},wo.prototype.getVisibleUnwrappedCoordinates=function(D){var J=[new i.UnwrappedTileID(0,D)];if(this._renderWorldCopies)for(var O=this.pointCoordinate(new i.Point(0,0)),K=this.pointCoordinate(new i.Point(this.width,0)),de=this.pointCoordinate(new i.Point(this.width,this.height)),ne=this.pointCoordinate(new i.Point(0,this.height)),be=Math.floor(Math.min(O.x,K.x,de.x,ne.x)),Be=Math.floor(Math.max(O.x,K.x,de.x,ne.x)),ht=1,Yt=be-ht;Yt<=Be+ht;Yt++)Yt!==0&&J.push(new i.UnwrappedTileID(Yt,D));return J},wo.prototype.coveringTiles=function(D){var J=this.coveringZoomLevel(D),O=J;if(D.minzoom!==void 0&&JD.maxzoom&&(J=D.maxzoom);var K=i.MercatorCoordinate.fromLngLat(this.center),de=Math.pow(2,J),ne=[de*K.x,de*K.y,0],be=Bo.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,J),Be=D.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(Be=J);var ht=3,Yt=function(ci){return{aabb:new Ps([ci*de,0,0],[(ci+1)*de,de,0]),zoom:0,x:0,y:0,wrap:ci,fullyVisible:!1}},cr=[],Nt=[],Ne=J,$e=D.reparseOverscaled?O:J;if(this._renderWorldCopies)for(var ot=1;ot<=3;ot++)cr.push(Yt(-ot)),cr.push(Yt(ot));for(cr.push(Yt(0));cr.length>0;){var It=cr.pop(),Bt=It.x,Ft=It.y,Ut=It.fullyVisible;if(!Ut){var zt=It.aabb.intersects(be);if(zt===0)continue;Ut=zt===2}var _t=It.aabb.distanceX(ne),Dt=It.aabb.distanceY(ne),vt=Math.max(Math.abs(_t),Math.abs(Dt)),lr=ht+(1<lr&&It.zoom>=Be){Nt.push({tileID:new i.OverscaledTileID(It.zoom===Ne?$e:It.zoom,It.wrap,It.zoom,Bt,Ft),distanceSq:i.sqrLen([ne[0]-.5-Bt,ne[1]-.5-Ft])});continue}for(var yr=0;yr<4;yr++){var Br=(Bt<<1)+yr%2,Di=(Ft<<1)+(yr>>1);cr.push({aabb:It.aabb.quadrant(yr),zoom:It.zoom+1,x:Br,y:Di,wrap:It.wrap,fullyVisible:Ut})}}return Nt.sort(function(ci,bi){return ci.distanceSq-bi.distanceSq}).map(function(ci){return ci.tileID})},wo.prototype.resize=function(D,J){this.width=D,this.height=J,this.pixelsToGLUnits=[2/D,-2/J],this._constrain(),this._calcMatrices()},To.unmodified.get=function(){return this._unmodified},wo.prototype.zoomScale=function(D){return Math.pow(2,D)},wo.prototype.scaleZoom=function(D){return Math.log(D)/Math.LN2},wo.prototype.project=function(D){var J=i.clamp(D.lat,-this.maxValidLatitude,this.maxValidLatitude);return new i.Point(i.mercatorXfromLng(D.lng)*this.worldSize,i.mercatorYfromLat(J)*this.worldSize)},wo.prototype.unproject=function(D){return new i.MercatorCoordinate(D.x/this.worldSize,D.y/this.worldSize).toLngLat()},To.point.get=function(){return this.project(this.center)},wo.prototype.setLocationAtPoint=function(D,J){var O=this.pointCoordinate(J),K=this.pointCoordinate(this.centerPoint),de=this.locationCoordinate(D),ne=new i.MercatorCoordinate(de.x-(O.x-K.x),de.y-(O.y-K.y));this.center=this.coordinateLocation(ne),this._renderWorldCopies&&(this.center=this.center.wrap())},wo.prototype.locationPoint=function(D){return this.coordinatePoint(this.locationCoordinate(D))},wo.prototype.pointLocation=function(D){return this.coordinateLocation(this.pointCoordinate(D))},wo.prototype.locationCoordinate=function(D){return i.MercatorCoordinate.fromLngLat(D)},wo.prototype.coordinateLocation=function(D){return D.toLngLat()},wo.prototype.pointCoordinate=function(D){var J=0,O=[D.x,D.y,0,1],K=[D.x,D.y,1,1];i.transformMat4(O,O,this.pixelMatrixInverse),i.transformMat4(K,K,this.pixelMatrixInverse);var de=O[3],ne=K[3],be=O[0]/de,Be=K[0]/ne,ht=O[1]/de,Yt=K[1]/ne,cr=O[2]/de,Nt=K[2]/ne,Ne=cr===Nt?0:(J-cr)/(Nt-cr);return new i.MercatorCoordinate(i.number(be,Be,Ne)/this.worldSize,i.number(ht,Yt,Ne)/this.worldSize)},wo.prototype.coordinatePoint=function(D){var J=[D.x*this.worldSize,D.y*this.worldSize,0,1];return i.transformMat4(J,J,this.pixelMatrix),new i.Point(J[0]/J[3],J[1]/J[3])},wo.prototype.getBounds=function(){return new i.LngLatBounds().extend(this.pointLocation(new i.Point(0,0))).extend(this.pointLocation(new i.Point(this.width,0))).extend(this.pointLocation(new i.Point(this.width,this.height))).extend(this.pointLocation(new i.Point(0,this.height)))},wo.prototype.getMaxBounds=function(){return!this.latRange||this.latRange.length!==2||!this.lngRange||this.lngRange.length!==2?null:new i.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]])},wo.prototype.setMaxBounds=function(D){D?(this.lngRange=[D.getWest(),D.getEast()],this.latRange=[D.getSouth(),D.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},wo.prototype.calculatePosMatrix=function(D,J){J===void 0&&(J=!1);var O=D.key,K=J?this._alignedPosMatrixCache:this._posMatrixCache;if(K[O])return K[O];var de=D.canonical,ne=this.worldSize/this.zoomScale(de.z),be=de.x+Math.pow(2,de.z)*D.wrap,Be=i.identity(new Float64Array(16));return i.translate(Be,Be,[be*ne,de.y*ne,0]),i.scale(Be,Be,[ne/i.EXTENT,ne/i.EXTENT,1]),i.multiply(Be,J?this.alignedProjMatrix:this.projMatrix,Be),K[O]=new Float32Array(Be),K[O]},wo.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},wo.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var D=-90,J=90,O=-180,K=180,de,ne,be,Be,ht=this.size,Yt=this._unmodified;if(this.latRange){var cr=this.latRange;D=i.mercatorYfromLat(cr[1])*this.worldSize,J=i.mercatorYfromLat(cr[0])*this.worldSize,de=J-DJ&&(Be=J-It)}if(this.lngRange){var Bt=Ne.x,Ft=ht.x/2;Bt-FtK&&(be=K-Ft)}(be!==void 0||Be!==void 0)&&(this.center=this.unproject(new i.Point(be!==void 0?be:Ne.x,Be!==void 0?Be:Ne.y))),this._unmodified=Yt,this._constraining=!1}},wo.prototype._calcMatrices=function(){if(this.height){var D=this._fov/2,J=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(D)*this.height;var O=Math.PI/2+this._pitch,K=this._fov*(.5+J.y/this.height),de=Math.sin(K)*this.cameraToCenterDistance/Math.sin(i.clamp(Math.PI-O-K,.01,Math.PI-.01)),ne=this.point,be=ne.x,Be=ne.y,ht=Math.cos(Math.PI/2-this._pitch)*de+this.cameraToCenterDistance,Yt=ht*1.01,cr=this.height/50,Nt=new Float64Array(16);i.perspective(Nt,this._fov,this.width/this.height,cr,Yt),Nt[8]=-J.x*2/this.width,Nt[9]=J.y*2/this.height,i.scale(Nt,Nt,[1,-1,1]),i.translate(Nt,Nt,[0,0,-this.cameraToCenterDistance]),i.rotateX(Nt,Nt,this._pitch),i.rotateZ(Nt,Nt,this.angle),i.translate(Nt,Nt,[-be,-Be,0]),this.mercatorMatrix=i.scale([],Nt,[this.worldSize,this.worldSize,this.worldSize]),i.scale(Nt,Nt,[1,1,i.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=Nt,this.invProjMatrix=i.invert([],this.projMatrix);var Ne=this.width%2/2,$e=this.height%2/2,ot=Math.cos(this.angle),It=Math.sin(this.angle),Bt=be-Math.round(be)+ot*Ne+It*$e,Ft=Be-Math.round(Be)+ot*$e+It*Ne,Ut=new Float64Array(Nt);if(i.translate(Ut,Ut,[Bt>.5?Bt-1:Bt,Ft>.5?Ft-1:Ft,0]),this.alignedProjMatrix=Ut,Nt=i.create(),i.scale(Nt,Nt,[this.width/2,-this.height/2,1]),i.translate(Nt,Nt,[1,-1,0]),this.labelPlaneMatrix=Nt,Nt=i.create(),i.scale(Nt,Nt,[1,-1,1]),i.translate(Nt,Nt,[-1,-1,0]),i.scale(Nt,Nt,[2/this.width,2/this.height,1]),this.glCoordMatrix=Nt,this.pixelMatrix=i.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),Nt=i.invert(new Float64Array(16),this.pixelMatrix),!Nt)throw new Error("failed to invert matrix");this.pixelMatrixInverse=Nt,this._posMatrixCache={},this._alignedPosMatrixCache={}}},wo.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var D=this.pointCoordinate(new i.Point(0,0)),J=[D.x*this.worldSize,D.y*this.worldSize,0,1],O=i.transformMat4(J,J,this.pixelMatrix);return O[3]/this.cameraToCenterDistance},wo.prototype.getCameraPoint=function(){var D=this._pitch,J=Math.tan(D)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new i.Point(0,J))},wo.prototype.getCameraQueryGeometry=function(D){var J=this.getCameraPoint();if(D.length===1)return[D[0],J];for(var O=J.x,K=J.y,de=J.x,ne=J.y,be=0,Be=D;be=3&&!D.some(function(O){return isNaN(O)})){var J=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(D[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+D[2],+D[1]],zoom:+D[0],bearing:J,pitch:+(D[4]||0)}),!0}return!1},Ul.prototype._updateHashUnthrottled=function(){var D=i.window.location.href.replace(/(#.+)?$/,this.getHashString());try{i.window.history.replaceState(i.window.history.state,null,D)}catch(J){}};var Lu={linearity:.3,easing:i.bezier(0,0,.3,1)},au=i.extend({deceleration:2500,maxSpeed:1400},Lu),Js=i.extend({deceleration:20,maxSpeed:1400},Lu),eu=i.extend({deceleration:1e3,maxSpeed:360},Lu),dc=i.extend({deceleration:1e3,maxSpeed:90},Lu),Tl=function(D){this._map=D,this.clear()};Tl.prototype.clear=function(){this._inertiaBuffer=[]},Tl.prototype.record=function(D){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:i.browser.now(),settings:D})},Tl.prototype._drainInertiaBuffer=function(){for(var D=this._inertiaBuffer,J=i.browser.now(),O=160;D.length>0&&J-D[0].time>O;)D.shift()},Tl.prototype._onMoveEnd=function(D){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var J={zoom:0,bearing:0,pitch:0,pan:new i.Point(0,0),pinchAround:void 0,around:void 0},O=0,K=this._inertiaBuffer;O=this._clickTolerance||this._map.fire(new se(D.type,this._map,D))},Ve.prototype.dblclick=function(D){return this._firePreventable(new se(D.type,this._map,D))},Ve.prototype.mouseover=function(D){this._map.fire(new se(D.type,this._map,D))},Ve.prototype.mouseout=function(D){this._map.fire(new se(D.type,this._map,D))},Ve.prototype.touchstart=function(D){return this._firePreventable(new Te(D.type,this._map,D))},Ve.prototype.touchmove=function(D){this._map.fire(new Te(D.type,this._map,D))},Ve.prototype.touchend=function(D){this._map.fire(new Te(D.type,this._map,D))},Ve.prototype.touchcancel=function(D){this._map.fire(new Te(D.type,this._map,D))},Ve.prototype._firePreventable=function(D){if(this._map.fire(D),D.defaultPrevented)return{}},Ve.prototype.isEnabled=function(){return!0},Ve.prototype.isActive=function(){return!1},Ve.prototype.enable=function(){},Ve.prototype.disable=function(){};var Ye=function(D){this._map=D};Ye.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Ye.prototype.mousemove=function(D){this._map.fire(new se(D.type,this._map,D))},Ye.prototype.mousedown=function(){this._delayContextMenu=!0},Ye.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new se("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Ye.prototype.contextmenu=function(D){this._delayContextMenu?this._contextMenuEvent=D:this._map.fire(new se(D.type,this._map,D)),this._map.listens("contextmenu")&&D.preventDefault()},Ye.prototype.isEnabled=function(){return!0},Ye.prototype.isActive=function(){return!1},Ye.prototype.enable=function(){},Ye.prototype.disable=function(){};var Pt=function(D,J){this._map=D,this._el=D.getCanvasContainer(),this._container=D.getContainer(),this._clickTolerance=J.clickTolerance||1};Pt.prototype.isEnabled=function(){return!!this._enabled},Pt.prototype.isActive=function(){return!!this._active},Pt.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Pt.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Pt.prototype.mousedown=function(D,J){this.isEnabled()&&D.shiftKey&&D.button===0&&(o.disableDrag(),this._startPos=this._lastPos=J,this._active=!0)},Pt.prototype.mousemoveWindow=function(D,J){if(this._active){var O=J;if(!(this._lastPos.equals(O)||!this._box&&O.dist(this._startPos)this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=D.timeStamp),O.length===this.numTouches&&(this.centroid=Wt(J),this.touches=at(O,J)))},zr.prototype.touchmove=function(D,J,O){if(!(this.aborted||!this.centroid)){var K=at(O,J);for(var de in this.touches){var ne=this.touches[de],be=K[de];(!be||be.dist(ne)>Ur)&&(this.aborted=!0)}}},zr.prototype.touchend=function(D,J,O){if((!this.centroid||D.timeStamp-this.startTime>pr)&&(this.aborted=!0),O.length===0){var K=!this.aborted&&this.centroid;if(this.reset(),K)return K}};var gi=function(D){this.singleTap=new zr(D),this.numTaps=D.numTaps,this.reset()};gi.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},gi.prototype.touchstart=function(D,J,O){this.singleTap.touchstart(D,J,O)},gi.prototype.touchmove=function(D,J,O){this.singleTap.touchmove(D,J,O)},gi.prototype.touchend=function(D,J,O){var K=this.singleTap.touchend(D,J,O);if(K){var de=D.timeStamp-this.lastTime0&&(this._active=!0);var K=at(O,J),de=new i.Point(0,0),ne=new i.Point(0,0),be=0;for(var Be in K){var ht=K[Be],Yt=this._touches[Be];Yt&&(de._add(ht),ne._add(ht.sub(Yt)),be++,K[Be]=ht)}if(this._touches=K,!(beMath.abs(Y.x)}var Un=100,ja=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.reset=function(){Y.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},D.prototype._start=function(O){this._lastPoints=O,Xs(O[0].sub(O[1]))&&(this._valid=!1)},D.prototype._move=function(O,K,de){var ne=O[0].sub(this._lastPoints[0]),be=O[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(ne,be,de.timeStamp),!!this._valid){this._lastPoints=O,this._active=!0;var Be=(ne.y+be.y)/2,ht=-.5;return{pitchDelta:Be*ht}}},D.prototype.gestureBeginsVertically=function(O,K,de){if(this._valid!==void 0)return this._valid;var ne=2,be=O.mag()>=ne,Be=K.mag()>=ne;if(!(!be&&!Be)){if(!be||!Be)return this._firstMove===void 0&&(this._firstMove=de),de-this._firstMove0==K.y>0;return Xs(O)&&Xs(K)&&ht}},D}(na),Fo={panStep:100,bearingStep:15,pitchStep:10},Uo=function(){var D=Fo;this._panStep=D.panStep,this._bearingStep=D.bearingStep,this._pitchStep=D.pitchStep,this._rotationDisabled=!1};Uo.prototype.reset=function(){this._active=!1},Uo.prototype.keydown=function(D){var J=this;if(!(D.altKey||D.ctrlKey||D.metaKey)){var O=0,K=0,de=0,ne=0,be=0;switch(D.keyCode){case 61:case 107:case 171:case 187:O=1;break;case 189:case 109:case 173:O=-1;break;case 37:D.shiftKey?K=-1:(D.preventDefault(),ne=-1);break;case 39:D.shiftKey?K=1:(D.preventDefault(),ne=1);break;case 38:D.shiftKey?de=1:(D.preventDefault(),be=-1);break;case 40:D.shiftKey?de=-1:(D.preventDefault(),be=1);break;default:return}return this._rotationDisabled&&(K=0,de=0),{cameraAnimation:function(Be){var ht=Be.getZoom();Be.easeTo({duration:300,easeId:"keyboardHandler",easing:$s,zoom:O?Math.round(ht)+O*(D.shiftKey?2:1):ht,bearing:Be.getBearing()+K*J._bearingStep,pitch:Be.getPitch()+de*J._pitchStep,offset:[-ne*J._panStep,-be*J._panStep],center:Be.getCenter()},{originalEvent:D})}}}},Uo.prototype.enable=function(){this._enabled=!0},Uo.prototype.disable=function(){this._enabled=!1,this.reset()},Uo.prototype.isEnabled=function(){return this._enabled},Uo.prototype.isActive=function(){return this._active},Uo.prototype.disableRotation=function(){this._rotationDisabled=!0},Uo.prototype.enableRotation=function(){this._rotationDisabled=!1};function $s(Y){return Y*(2-Y)}var Sl=4.000244140625,bu=1/100,dl=1/450,Sc=2,Me=function(D,J){this._map=D,this._el=D.getCanvasContainer(),this._handler=J,this._delta=0,this._defaultZoomRate=bu,this._wheelZoomRate=dl,i.bindAll(["_onTimeout"],this)};Me.prototype.setZoomRate=function(D){this._defaultZoomRate=D},Me.prototype.setWheelZoomRate=function(D){this._wheelZoomRate=D},Me.prototype.isEnabled=function(){return!!this._enabled},Me.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},Me.prototype.isZooming=function(){return!!this._zooming},Me.prototype.enable=function(D){this.isEnabled()||(this._enabled=!0,this._aroundCenter=D&&D.around==="center")},Me.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Me.prototype.wheel=function(D){if(this.isEnabled()){var J=D.deltaMode===i.window.WheelEvent.DOM_DELTA_LINE?D.deltaY*40:D.deltaY,O=i.browser.now(),K=O-(this._lastWheelEventTime||0);this._lastWheelEventTime=O,J!==0&&J%Sl===0?this._type="wheel":J!==0&&Math.abs(J)<4?this._type="trackpad":K>400?(this._type=null,this._lastValue=J,this._timeout=setTimeout(this._onTimeout,40,D)):this._type||(this._type=Math.abs(K*J)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,J+=this._lastValue)),D.shiftKey&&J&&(J=J/4),this._type&&(this._lastWheelEvent=D,this._delta-=J,this._active||this._start(D)),D.preventDefault()}},Me.prototype._onTimeout=function(D){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(D)},Me.prototype._start=function(D){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var J=o.mousePos(this._el,D);this._around=i.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(J)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},Me.prototype.renderFrame=function(){var D=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var J=this._map.transform;if(this._delta!==0){var O=this._type==="wheel"&&Math.abs(this._delta)>Sl?this._wheelZoomRate:this._defaultZoomRate,K=Sc/(1+Math.exp(-Math.abs(this._delta*O)));this._delta<0&&K!==0&&(K=1/K);var de=typeof this._targetZoom=="number"?J.zoomScale(this._targetZoom):J.scale;this._targetZoom=Math.min(J.maxZoom,Math.max(J.minZoom,J.scaleZoom(de*K))),this._type==="wheel"&&(this._startZoom=J.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var ne=typeof this._targetZoom=="number"?this._targetZoom:J.zoom,be=this._startZoom,Be=this._easing,ht=!1,Yt;if(this._type==="wheel"&&be&&Be){var cr=Math.min((i.browser.now()-this._lastWheelEventTime)/200,1),Nt=Be(cr);Yt=i.number(be,ne,Nt),cr<1?this._frameId||(this._frameId=!0):ht=!0}else Yt=ne,ht=!0;return this._active=!0,ht&&(this._active=!1,this._finishTimeout=setTimeout(function(){D._zooming=!1,D._handler._triggerRenderFrame(),delete D._targetZoom,delete D._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ht,zoomDelta:Yt-J.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},Me.prototype._smoothOutEasing=function(D){var J=i.ease;if(this._prevEase){var O=this._prevEase,K=(i.browser.now()-O.start)/O.duration,de=O.easing(K+.01)-O.easing(K),ne=.27/Math.sqrt(de*de+1e-4)*.01,be=Math.sqrt(.27*.27-ne*ne);J=i.bezier(ne,be,.25,1)}return this._prevEase={start:i.browser.now(),duration:D,easing:J},J},Me.prototype.reset=function(){this._active=!1};var bt=function(D,J){this._clickZoom=D,this._tapZoom=J};bt.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},bt.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},bt.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},bt.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var Ot=function(){this.reset()};Ot.prototype.reset=function(){this._active=!1},Ot.prototype.dblclick=function(D,J){return D.preventDefault(),{cameraAnimation:function(O){O.easeTo({duration:300,zoom:O.getZoom()+(D.shiftKey?-1:1),around:O.unproject(J)},{originalEvent:D})}}},Ot.prototype.enable=function(){this._enabled=!0},Ot.prototype.disable=function(){this._enabled=!1,this.reset()},Ot.prototype.isEnabled=function(){return this._enabled},Ot.prototype.isActive=function(){return this._active};var Lr=function(){this._tap=new gi({numTouches:1,numTaps:1}),this.reset()};Lr.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Lr.prototype.touchstart=function(D,J,O){this._swipePoint||(this._tapTime&&D.timeStamp-this._tapTime>dr&&this.reset(),this._tapTime?O.length>0&&(this._swipePoint=J[0],this._swipeTouch=O[0].identifier):this._tap.touchstart(D,J,O))},Lr.prototype.touchmove=function(D,J,O){if(!this._tapTime)this._tap.touchmove(D,J,O);else if(this._swipePoint){if(O[0].identifier!==this._swipeTouch)return;var K=J[0],de=K.y-this._swipePoint.y;return this._swipePoint=K,D.preventDefault(),this._active=!0,{zoomDelta:de/128}}},Lr.prototype.touchend=function(D,J,O){if(this._tapTime)this._swipePoint&&O.length===0&&this.reset();else{var K=this._tap.touchend(D,J,O);K&&(this._tapTime=D.timeStamp)}},Lr.prototype.touchcancel=function(){this.reset()},Lr.prototype.enable=function(){this._enabled=!0},Lr.prototype.disable=function(){this._enabled=!1,this.reset()},Lr.prototype.isEnabled=function(){return this._enabled},Lr.prototype.isActive=function(){return this._active};var Vr=function(D,J,O){this._el=D,this._mousePan=J,this._touchPan=O};Vr.prototype.enable=function(D){this._inertiaOptions=D||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Vr.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Vr.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Vr.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var Or=function(D,J,O){this._pitchWithRotate=D.pitchWithRotate,this._mouseRotate=J,this._mousePitch=O};Or.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},Or.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},Or.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},Or.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var Nr=function(D,J,O,K){this._el=D,this._touchZoom=J,this._touchRotate=O,this._tapDragZoom=K,this._rotationDisabled=!1,this._enabled=!0};Nr.prototype.enable=function(D){this._touchZoom.enable(D),this._rotationDisabled||this._touchRotate.enable(D),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},Nr.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},Nr.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},Nr.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},Nr.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},Nr.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var vi=function(Y){return Y.zoom||Y.drag||Y.pitch||Y.rotate},Ni=function(Y){function D(){Y.apply(this,arguments)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D}(i.Event);function qi(Y){return Y.panDelta&&Y.panDelta.mag()||Y.zoomDelta||Y.bearingDelta||Y.pitchDelta}var Si=function(D,J){this._map=D,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Tl(D),this._bearingSnap=J.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(J),i.bindAll(["handleEvent","handleWindowEvent"],this);var O=this._el;this._listeners=[[O,"touchstart",{passive:!0}],[O,"touchmove",{passive:!1}],[O,"touchend",void 0],[O,"touchcancel",void 0],[O,"mousedown",void 0],[O,"mousemove",void 0],[O,"mouseup",void 0],[i.window.document,"mousemove",{capture:!0}],[i.window.document,"mouseup",void 0],[O,"mouseover",void 0],[O,"mouseout",void 0],[O,"dblclick",void 0],[O,"click",void 0],[O,"keydown",{capture:!1}],[O,"keyup",void 0],[O,"wheel",{passive:!1}],[O,"contextmenu",void 0],[i.window,"blur",void 0]];for(var K=0,de=this._listeners;Kbe?Math.min(2,_t):Math.max(.5,_t),ci=Math.pow(Di,1-yr),bi=ne.unproject(Ut.add(zt.mult(yr*ci)).mult(Br));ne.setLocationAtPoint(ne.renderWorldCopies?bi.wrap():bi,It)}de._fireMoveEvents(K)},function(yr){de._afterEase(K,yr)},O),this},D.prototype._prepareEase=function(O,K,de){de===void 0&&(de={}),this._moving=!0,!K&&!de.moving&&this.fire(new i.Event("movestart",O)),this._zooming&&!de.zooming&&this.fire(new i.Event("zoomstart",O)),this._rotating&&!de.rotating&&this.fire(new i.Event("rotatestart",O)),this._pitching&&!de.pitching&&this.fire(new i.Event("pitchstart",O))},D.prototype._fireMoveEvents=function(O){this.fire(new i.Event("move",O)),this._zooming&&this.fire(new i.Event("zoom",O)),this._rotating&&this.fire(new i.Event("rotate",O)),this._pitching&&this.fire(new i.Event("pitch",O))},D.prototype._afterEase=function(O,K){if(!(this._easeId&&K&&this._easeId===K)){delete this._easeId;var de=this._zooming,ne=this._rotating,be=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,de&&this.fire(new i.Event("zoomend",O)),ne&&this.fire(new i.Event("rotateend",O)),be&&this.fire(new i.Event("pitchend",O)),this.fire(new i.Event("moveend",O))}},D.prototype.flyTo=function(O,K){var de=this;if(!O.essential&&i.browser.prefersReducedMotion){var ne=i.pick(O,["center","zoom","bearing","pitch","around"]);return this.jumpTo(ne,K)}this.stop(),O=i.extend({offset:[0,0],speed:1.2,curve:1.42,easing:i.ease},O);var be=this.transform,Be=this.getZoom(),ht=this.getBearing(),Yt=this.getPitch(),cr=this.getPadding(),Nt="zoom"in O?i.clamp(+O.zoom,be.minZoom,be.maxZoom):Be,Ne="bearing"in O?this._normalizeBearing(O.bearing,ht):ht,$e="pitch"in O?+O.pitch:Yt,ot="padding"in O?O.padding:be.padding,It=be.zoomScale(Nt-Be),Bt=i.Point.convert(O.offset),Ft=be.centerPoint.add(Bt),Ut=be.pointLocation(Ft),zt=i.LngLat.convert(O.center||Ut);this._normalizeCenter(zt);var _t=be.project(Ut),Dt=be.project(zt).sub(_t),vt=O.curve,lr=Math.max(be.width,be.height),yr=lr/It,Br=Dt.mag();if("minZoom"in O){var Di=i.clamp(Math.min(O.minZoom,Be,Nt),be.minZoom,be.maxZoom),ci=lr/be.zoomScale(Di-Be);vt=Math.sqrt(ci/Br*2)}var bi=vt*vt;function gn(so){var Yo=(yr*yr-lr*lr+(so?-1:1)*bi*bi*Br*Br)/(2*(so?yr:lr)*bi*Br);return Math.log(Math.sqrt(Yo*Yo+1)-Yo)}function tn(so){return(Math.exp(so)-Math.exp(-so))/2}function Ei(so){return(Math.exp(so)+Math.exp(-so))/2}function Oi(so){return tn(so)/Ei(so)}var Gi=gn(0),on=function(so){return Ei(Gi)/Ei(Gi+vt*so)},zn=function(so){return lr*((Ei(Gi)*Oi(Gi+vt*so)-tn(Gi))/bi)/Br},Ja=(gn(1)-Gi)/vt;if(Math.abs(Br)<1e-6||!isFinite(Ja)){if(Math.abs(lr-yr)<1e-6)return this.easeTo(O,K);var co=yrO.maxDuration&&(O.duration=0),this._zooming=!0,this._rotating=ht!==Ne,this._pitching=$e!==Yt,this._padding=!be.isPaddingEqual(ot),this._prepareEase(K,!1),this._ease(function(so){var Yo=so*Ja,ms=1/on(Yo);be.zoom=so===1?Nt:Be+be.scaleZoom(ms),de._rotating&&(be.bearing=i.number(ht,Ne,so)),de._pitching&&(be.pitch=i.number(Yt,$e,so)),de._padding&&(be.interpolatePadding(cr,ot,so),Ft=be.centerPoint.add(Bt));var ou=so===1?zt:be.unproject(_t.add(Dt.mult(zn(Yo))).mult(ms));be.setLocationAtPoint(be.renderWorldCopies?ou.wrap():ou,Ft),de._fireMoveEvents(K)},function(){return de._afterEase(K)},O),this},D.prototype.isEasing=function(){return!!this._easeFrameId},D.prototype.stop=function(){return this._stop()},D.prototype._stop=function(O,K){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var de=this._onEaseEnd;delete this._onEaseEnd,de.call(this,K)}if(!O){var ne=this.handlers;ne&&ne.stop(!1)}return this},D.prototype._ease=function(O,K,de){de.animate===!1||de.duration===0?(O(1),K()):(this._easeStart=i.browser.now(),this._easeOptions=de,this._onEaseFrame=O,this._onEaseEnd=K,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},D.prototype._renderFrameCallback=function(){var O=Math.min((i.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(O)),O<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},D.prototype._normalizeBearing=function(O,K){O=i.wrap(O,-180,180);var de=Math.abs(O-K);return Math.abs(O-360-K)180?-360:de<-180?360:0}},D}(i.Evented),Qi=function(D){D===void 0&&(D={}),this.options=D,i.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};Qi.prototype.getDefaultPosition=function(){return"bottom-right"},Qi.prototype.onAdd=function(D){var J=this.options&&this.options.compact;return this._map=D,this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=o.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=o.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),J&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),J===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Qi.prototype.onRemove=function(){o.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},Qi.prototype._setElementTitle=function(D,J){var O=this._map._getUIString("AttributionControl."+J);D.title=O,D.setAttribute("aria-label",O)},Qi.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},Qi.prototype._updateEditLink=function(){var D=this._editLink;D||(D=this._editLink=this._container.querySelector(".mapbox-improve-map"));var J=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||i.config.ACCESS_TOKEN}];if(D){var O=J.reduce(function(K,de,ne){return de.value&&(K+=de.key+"="+de.value+(ne=0)return!1;return!0});var be=D.join(" | ");be!==this._attribHTML&&(this._attribHTML=be,D.length?(this._innerContainer.innerHTML=be,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Qi.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var ji=function(){i.bindAll(["_updateLogo"],this),i.bindAll(["_updateCompact"],this)};ji.prototype.onAdd=function(D){this._map=D,this._container=o.create("div","mapboxgl-ctrl");var J=o.create("a","mapboxgl-ctrl-logo");return J.target="_blank",J.rel="noopener nofollow",J.href="https://www.mapbox.com/",J.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),J.setAttribute("rel","noopener nofollow"),this._container.appendChild(J),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},ji.prototype.onRemove=function(){o.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},ji.prototype.getDefaultPosition=function(){return"bottom-left"},ji.prototype._updateLogo=function(D){(!D||D.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},ji.prototype._logoRequired=function(){if(this._map.style){var D=this._map.style.sourceCaches;for(var J in D){var O=D[J].getSource();if(O.mapbox_logo)return!0}return!1}},ji.prototype._updateCompact=function(){var D=this._container.children;if(D.length){var J=D[0];this._map.getCanvasContainer().offsetWidth<250?J.classList.add("mapboxgl-compact"):J.classList.remove("mapboxgl-compact")}};var oi=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};oi.prototype.add=function(D){var J=++this._id,O=this._queue;return O.push({callback:D,id:J,cancelled:!1}),J},oi.prototype.remove=function(D){for(var J=this._currentlyRunning,O=J?this._queue.concat(J):this._queue,K=0,de=O;KO.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(O.minPitch!=null&&O.maxPitch!=null&&O.minPitch>O.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(O.minPitch!=null&&O.minPitchqn)throw new Error("maxPitch must be less than or equal to "+qn);var de=new wo(O.minZoom,O.maxZoom,O.minPitch,O.maxPitch,O.renderWorldCopies);if(Y.call(this,de,O),this._interactive=O.interactive,this._maxTileCacheSize=O.maxTileCacheSize,this._failIfMajorPerformanceCaveat=O.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=O.preserveDrawingBuffer,this._antialias=O.antialias,this._trackResize=O.trackResize,this._bearingSnap=O.bearingSnap,this._refreshExpiredTiles=O.refreshExpiredTiles,this._fadeDuration=O.fadeDuration,this._crossSourceCollisions=O.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=O.collectResourceTiming,this._renderTaskQueue=new oi,this._controls=[],this._mapId=i.uniqueId(),this._locale=i.extend({},Tr,O.locale),this._clickTolerance=O.clickTolerance,this._requestManager=new i.RequestManager(O.transformRequest,O.accessToken),typeof O.container=="string"){if(this._container=i.window.document.getElementById(O.container),!this._container)throw new Error("Container '"+O.container+"' not found.")}else if(O.container instanceof yi)this._container=O.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(O.maxBounds&&this.setMaxBounds(O.maxBounds),i.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return K._update(!1)}),this.on("moveend",function(){return K._update(!1)}),this.on("zoom",function(){return K._update(!0)}),typeof i.window!="undefined"&&(i.window.addEventListener("online",this._onWindowOnline,!1),i.window.addEventListener("resize",this._onWindowResize,!1),i.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new Si(this,O);var ne=typeof O.hash=="string"&&O.hash||void 0;this._hash=O.hash&&new Ul(ne).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:O.center,zoom:O.zoom,bearing:O.bearing,pitch:O.pitch}),O.bounds&&(this.resize(),this.fitBounds(O.bounds,i.extend({},O.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=O.localIdeographFontFamily,O.style&&this.setStyle(O.style,{localIdeographFontFamily:O.localIdeographFontFamily}),O.attributionControl&&this.addControl(new Qi({customAttribution:O.customAttribution})),this.addControl(new ji,O.logoPosition),this.on("style.load",function(){K.transform.unmodified&&K.jumpTo(K.style.stylesheet)}),this.on("data",function(be){K._update(be.dataType==="style"),K.fire(new i.Event(be.dataType+"data",be))}),this.on("dataloading",function(be){K.fire(new i.Event(be.dataType+"dataloading",be))})}Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D;var J={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return D.prototype._getMapId=function(){return this._mapId},D.prototype.addControl=function(K,de){if(de===void 0&&(K.getDefaultPosition?de=K.getDefaultPosition():de="top-right"),!K||!K.onAdd)return this.fire(new i.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var ne=K.onAdd(this);this._controls.push(K);var be=this._controlPositions[de];return de.indexOf("bottom")!==-1?be.insertBefore(ne,be.firstChild):be.appendChild(ne),this},D.prototype.removeControl=function(K){if(!K||!K.onRemove)return this.fire(new i.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var de=this._controls.indexOf(K);return de>-1&&this._controls.splice(de,1),K.onRemove(this),this},D.prototype.hasControl=function(K){return this._controls.indexOf(K)>-1},D.prototype.resize=function(K){var de=this._containerDimensions(),ne=de[0],be=de[1];this._resizeCanvas(ne,be),this.transform.resize(ne,be),this.painter.resize(ne,be);var Be=!this._moving;return Be&&(this.stop(),this.fire(new i.Event("movestart",K)).fire(new i.Event("move",K))),this.fire(new i.Event("resize",K)),Be&&this.fire(new i.Event("moveend",K)),this},D.prototype.getBounds=function(){return this.transform.getBounds()},D.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},D.prototype.setMaxBounds=function(K){return this.transform.setMaxBounds(i.LngLatBounds.convert(K)),this._update()},D.prototype.setMinZoom=function(K){if(K=K==null?ui:K,K>=ui&&K<=this.transform.maxZoom)return this.transform.minZoom=K,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=K,this._update(),this.getZoom()>K&&this.setZoom(K),this;throw new Error("maxZoom must be greater than the current minZoom")},D.prototype.getMaxZoom=function(){return this.transform.maxZoom},D.prototype.setMinPitch=function(K){if(K=K==null?Xi:K,K=Xi&&K<=this.transform.maxPitch)return this.transform.minPitch=K,this._update(),this.getPitch()qn)throw new Error("maxPitch must be less than or equal to "+qn);if(K>=this.transform.minPitch)return this.transform.maxPitch=K,this._update(),this.getPitch()>K&&this.setPitch(K),this;throw new Error("maxPitch must be greater than the current minPitch")},D.prototype.getMaxPitch=function(){return this.transform.maxPitch},D.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},D.prototype.setRenderWorldCopies=function(K){return this.transform.renderWorldCopies=K,this._update()},D.prototype.project=function(K){return this.transform.locationPoint(i.LngLat.convert(K))},D.prototype.unproject=function(K){return this.transform.pointLocation(i.Point.convert(K))},D.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},D.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},D.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},D.prototype._createDelegatedListener=function(K,de,ne){var be=this,Be;if(K==="mouseenter"||K==="mouseover"){var ht=!1,Yt=function(It){var Bt=be.getLayer(de)?be.queryRenderedFeatures(It.point,{layers:[de]}):[];Bt.length?ht||(ht=!0,ne.call(be,new se(K,be,It.originalEvent,{features:Bt}))):ht=!1},cr=function(){ht=!1};return{layer:de,listener:ne,delegates:{mousemove:Yt,mouseout:cr}}}else if(K==="mouseleave"||K==="mouseout"){var Nt=!1,Ne=function(It){var Bt=be.getLayer(de)?be.queryRenderedFeatures(It.point,{layers:[de]}):[];Bt.length?Nt=!0:Nt&&(Nt=!1,ne.call(be,new se(K,be,It.originalEvent)))},$e=function(It){Nt&&(Nt=!1,ne.call(be,new se(K,be,It.originalEvent)))};return{layer:de,listener:ne,delegates:{mousemove:Ne,mouseout:$e}}}else{var ot=function(It){var Bt=be.getLayer(de)?be.queryRenderedFeatures(It.point,{layers:[de]}):[];Bt.length&&(It.features=Bt,ne.call(be,It),delete It.features)};return{layer:de,listener:ne,delegates:(Be={},Be[K]=ot,Be)}}},D.prototype.on=function(K,de,ne){if(ne===void 0)return Y.prototype.on.call(this,K,de);var be=this._createDelegatedListener(K,de,ne);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[K]=this._delegatedListeners[K]||[],this._delegatedListeners[K].push(be);for(var Be in be.delegates)this.on(Be,be.delegates[Be]);return this},D.prototype.once=function(K,de,ne){if(ne===void 0)return Y.prototype.once.call(this,K,de);var be=this._createDelegatedListener(K,de,ne);for(var Be in be.delegates)this.once(Be,be.delegates[Be]);return this},D.prototype.off=function(K,de,ne){var be=this;if(ne===void 0)return Y.prototype.off.call(this,K,de);var Be=function(ht){for(var Yt=ht[K],cr=0;cr180;){var ne=J.locationPoint(Y);if(ne.x>=0&&ne.y>=0&&ne.x<=J.width&&ne.y<=J.height)break;Y.lng>J.center.lng?Y.lng-=360:Y.lng+=360}return Y}var Nn={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function aa(Y,D,J){var O=Y.classList;for(var K in Nn)O.remove("mapboxgl-"+J+"-anchor-"+K);O.add("mapboxgl-"+J+"-anchor-"+D)}var Ki=function(Y){function D(J,O){if(Y.call(this),(J instanceof i.window.HTMLElement||O)&&(J=i.extend({element:J},O)),i.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=J&&J.anchor||"center",this._color=J&&J.color||"#3FB1CE",this._scale=J&&J.scale||1,this._draggable=J&&J.draggable||!1,this._clickTolerance=J&&J.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=J&&J.rotation||0,this._rotationAlignment=J&&J.rotationAlignment||"auto",this._pitchAlignment=J&&J.pitchAlignment&&J.pitchAlignment!=="auto"?J.pitchAlignment:this._rotationAlignment,!J||!J.element){this._defaultMarker=!0,this._element=o.create("div"),this._element.setAttribute("aria-label","Map marker");var K=o.createNS("http://www.w3.org/2000/svg","svg"),de=41,ne=27;K.setAttributeNS(null,"display","block"),K.setAttributeNS(null,"height",de+"px"),K.setAttributeNS(null,"width",ne+"px"),K.setAttributeNS(null,"viewBox","0 0 "+ne+" "+de);var be=o.createNS("http://www.w3.org/2000/svg","g");be.setAttributeNS(null,"stroke","none"),be.setAttributeNS(null,"stroke-width","1"),be.setAttributeNS(null,"fill","none"),be.setAttributeNS(null,"fill-rule","evenodd");var Be=o.createNS("http://www.w3.org/2000/svg","g");Be.setAttributeNS(null,"fill-rule","nonzero");var ht=o.createNS("http://www.w3.org/2000/svg","g");ht.setAttributeNS(null,"transform","translate(3.0, 29.0)"),ht.setAttributeNS(null,"fill","#000000");for(var Yt=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}],cr=0,Nt=Yt;cr=K}this._isDragging&&(this._pos=O.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new i.Event("dragstart"))),this.fire(new i.Event("drag")))},D.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new i.Event("dragend")),this._state="inactive"},D.prototype._addDragHandler=function(O){this._element.contains(O.originalEvent.target)&&(O.preventDefault(),this._positionDelta=O.point.sub(this._pos).add(this._offset),this._pointerdownPos=O.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},D.prototype.setDraggable=function(O){return this._draggable=!!O,this._map&&(O?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},D.prototype.isDraggable=function(){return this._draggable},D.prototype.setRotation=function(O){return this._rotation=O||0,this._update(),this},D.prototype.getRotation=function(){return this._rotation},D.prototype.setRotationAlignment=function(O){return this._rotationAlignment=O||"auto",this._update(),this},D.prototype.getRotationAlignment=function(){return this._rotationAlignment},D.prototype.setPitchAlignment=function(O){return this._pitchAlignment=O&&O!=="auto"?O:this._rotationAlignment,this._update(),this},D.prototype.getPitchAlignment=function(){return this._pitchAlignment},D}(i.Evented),Cn={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},ia;function sa(Y){ia!==void 0?Y(ia):i.window.navigator.permissions!==void 0?i.window.navigator.permissions.query({name:"geolocation"}).then(function(D){ia=D.state!=="denied",Y(ia)}):(ia=!!i.window.navigator.geolocation,Y(ia))}var ba=0,is=!1,Zs=function(Y){function D(J){Y.call(this),this.options=i.extend({},Cn,J),i.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.onAdd=function(O){return this._map=O,this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),sa(this._setupUI),this._container},D.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(i.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),o.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,ba=0,is=!1},D.prototype._isOutOfMapMaxBounds=function(O){var K=this._map.getMaxBounds(),de=O.coords;return K&&(de.longitudeK.getEast()||de.latitudeK.getNorth())},D.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break}},D.prototype._onSuccess=function(O){if(this._map){if(this._isOutOfMapMaxBounds(O)){this._setErrorState(),this.fire(new i.Event("outofmaxbounds",O)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=O,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(O),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(O),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("geolocate",O)),this._finish()}},D.prototype._updateCamera=function(O){var K=new i.LngLat(O.coords.longitude,O.coords.latitude),de=O.coords.accuracy,ne=this._map.getBearing(),be=i.extend({bearing:ne},this.options.fitBoundsOptions);this._map.fitBounds(K.toBounds(de),be,{geolocateSource:!0})},D.prototype._updateMarker=function(O){if(O){var K=new i.LngLat(O.coords.longitude,O.coords.latitude);this._accuracyCircleMarker.setLngLat(K).addTo(this._map),this._userLocationDotMarker.setLngLat(K).addTo(this._map),this._accuracy=O.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},D.prototype._updateCircleRadius=function(){var O=this._map._container.clientHeight/2,K=this._map.unproject([0,O]),de=this._map.unproject([1,O]),ne=K.distanceTo(de),be=Math.ceil(2*this._accuracy/ne);this._circleElement.style.width=be+"px",this._circleElement.style.height=be+"px"},D.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},D.prototype._onError=function(O){if(this._map){if(this.options.trackUserLocation)if(O.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var K=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=K,this._geolocateButton.setAttribute("aria-label",K),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(O.code===3&&is)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("error",O)),this._finish()}},D.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},D.prototype._setupUI=function(O){var K=this;if(this._container.addEventListener("contextmenu",function(be){return be.preventDefault()}),this._geolocateButton=o.create("button","mapboxgl-ctrl-geolocate",this._container),o.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",O===!1){i.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var de=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=de,this._geolocateButton.setAttribute("aria-label",de)}else{var ne=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=ne,this._geolocateButton.setAttribute("aria-label",ne)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=o.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Ki(this._dotElement),this._circleElement=o.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Ki({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(be){var Be=be.originalEvent&&be.originalEvent.type==="resize";!be.geolocateSource&&K._watchState==="ACTIVE_LOCK"&&!Be&&(K._watchState="BACKGROUND",K._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),K._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),K.fire(new i.Event("trackuserlocationend")))})},D.prototype.trigger=function(){if(!this._setup)return i.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new i.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":ba--,is=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new i.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new i.Event("trackuserlocationstart"));break}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error");break}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),ba++;var O;ba>1?(O={maximumAge:6e5,timeout:0},is=!0):(O=this.options.positionOptions,is=!1),this._geolocationWatchID=i.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,O)}}else i.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},D.prototype._clearWatch=function(){i.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},D}(i.Evented),Va={maxWidth:100,unit:"metric"},Ml=function(D){this.options=i.extend({},Va,D),i.bindAll(["_onMove","setUnit"],this)};Ml.prototype.getDefaultPosition=function(){return"bottom-left"},Ml.prototype._onMove=function(){zo(this._map,this._container,this.options)},Ml.prototype.onAdd=function(D){return this._map=D,this._container=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",D.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Ml.prototype.onRemove=function(){o.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Ml.prototype.setUnit=function(D){this.options.unit=D,zo(this._map,this._container,this.options)};function zo(Y,D,J){var O=J&&J.maxWidth||100,K=Y._container.clientHeight/2,de=Y.unproject([0,K]),ne=Y.unproject([O,K]),be=de.distanceTo(ne);if(J&&J.unit==="imperial"){var Be=3.2808*be;if(Be>5280){var ht=Be/5280;Qs(D,O,ht,Y._getUIString("ScaleControl.Miles"))}else Qs(D,O,Be,Y._getUIString("ScaleControl.Feet"))}else if(J&&J.unit==="nautical"){var Yt=be/1852;Qs(D,O,Yt,Y._getUIString("ScaleControl.NauticalMiles"))}else be>=1e3?Qs(D,O,be/1e3,Y._getUIString("ScaleControl.Kilometers")):Qs(D,O,be,Y._getUIString("ScaleControl.Meters"))}function Qs(Y,D,J,O){var K=Vl(J),de=K/J;Y.style.width=D*de+"px",Y.innerHTML=K+" "+O}function al(Y){var D=Math.pow(10,Math.ceil(-Math.log(Y)/Math.LN10));return Math.round(Y*D)/D}function Vl(Y){var D=Math.pow(10,(""+Math.floor(Y)).length-1),J=Y/D;return J=J>=10?10:J>=5?5:J>=3?3:J>=2?2:J>=1?1:al(J),D*J}var ss=function(D){this._fullscreen=!1,D&&D.container&&(D.container instanceof i.window.HTMLElement?this._container=D.container:i.warnOnce("Full screen control 'container' must be a DOM element.")),i.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in i.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in i.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in i.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in i.window.document&&(this._fullscreenchange="MSFullscreenChange")};ss.prototype.onAdd=function(D){return this._map=D,this._container||(this._container=this._map.getContainer()),this._controlContainer=o.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",i.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},ss.prototype.onRemove=function(){o.remove(this._controlContainer),this._map=null,i.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},ss.prototype._checkFullscreenSupport=function(){return!!(i.window.document.fullscreenEnabled||i.window.document.mozFullScreenEnabled||i.window.document.msFullscreenEnabled||i.window.document.webkitFullscreenEnabled)},ss.prototype._setupUI=function(){var D=this._fullscreenButton=o.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);o.create("span","mapboxgl-ctrl-icon",D).setAttribute("aria-hidden",!0),D.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),i.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},ss.prototype._updateTitle=function(){var D=this._getTitle();this._fullscreenButton.setAttribute("aria-label",D),this._fullscreenButton.title=D},ss.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},ss.prototype._isFullscreen=function(){return this._fullscreen},ss.prototype._changeIcon=function(){var D=i.window.document.fullscreenElement||i.window.document.mozFullScreenElement||i.window.document.webkitFullscreenElement||i.window.document.msFullscreenElement;D===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},ss.prototype._onClickFullscreen=function(){this._isFullscreen()?i.window.document.exitFullscreen?i.window.document.exitFullscreen():i.window.document.mozCancelFullScreen?i.window.document.mozCancelFullScreen():i.window.document.msExitFullscreen?i.window.document.msExitFullscreen():i.window.document.webkitCancelFullScreen&&i.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Vs={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},Ys=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),wa=function(Y){function D(J){Y.call(this),this.options=i.extend(Object.create(Vs),J),i.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return Y&&(D.__proto__=Y),D.prototype=Object.create(Y&&Y.prototype),D.prototype.constructor=D,D.prototype.addTo=function(O){return this._map&&this.remove(),this._map=O,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new i.Event("open")),this},D.prototype.isOpen=function(){return!!this._map},D.prototype.remove=function(){return this._content&&o.remove(this._content),this._container&&(o.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new i.Event("close")),this},D.prototype.getLngLat=function(){return this._lngLat},D.prototype.setLngLat=function(O){return this._lngLat=i.LngLat.convert(O),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},D.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},D.prototype.getElement=function(){return this._container},D.prototype.setText=function(O){return this.setDOMContent(i.window.document.createTextNode(O))},D.prototype.setHTML=function(O){var K=i.window.document.createDocumentFragment(),de=i.window.document.createElement("body"),ne;for(de.innerHTML=O;ne=de.firstChild,!!ne;)K.appendChild(ne);return this.setDOMContent(K)},D.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},D.prototype.setMaxWidth=function(O){return this.options.maxWidth=O,this._update(),this},D.prototype.setDOMContent=function(O){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=o.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(O),this._createCloseButton(),this._update(),this._focusFirstElement(),this},D.prototype.addClassName=function(O){this._container&&this._container.classList.add(O)},D.prototype.removeClassName=function(O){this._container&&this._container.classList.remove(O)},D.prototype.setOffset=function(O){return this.options.offset=O,this._update(),this},D.prototype.toggleClassName=function(O){if(this._container)return this._container.classList.toggle(O)},D.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=o.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},D.prototype._onMouseUp=function(O){this._update(O.point)},D.prototype._onMouseMove=function(O){this._update(O.point)},D.prototype._onDrag=function(O){this._update(O.point)},D.prototype._update=function(O){var K=this,de=this._lngLat||this._trackPointer;if(!(!this._map||!de||!this._content)&&(this._container||(this._container=o.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=o.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(Ne){return K._container.classList.add(Ne)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=pn(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!O))){var ne=this._pos=this._trackPointer&&O?O:this._map.project(this._lngLat),be=this.options.anchor,Be=ol(this.options.offset);if(!be){var ht=this._container.offsetWidth,Yt=this._container.offsetHeight,cr;ne.y+Be.bottom.ythis._map.transform.height-Yt?cr=["bottom"]:cr=[],ne.xthis._map.transform.width-ht/2&&cr.push("right"),cr.length===0?be="bottom":be=cr.join("-")}var Nt=ne.add(Be[be]).round();o.setTransform(this._container,Nn[be]+" translate("+Nt.x+"px,"+Nt.y+"px)"),aa(this._container,be,"popup")}},D.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var O=this._container.querySelector(Ys);O&&O.focus()}},D.prototype._onClose=function(){this.remove()},D}(i.Evented);function ol(Y){if(Y)if(typeof Y=="number"){var D=Math.round(Math.sqrt(.5*Math.pow(Y,2)));return{center:new i.Point(0,0),top:new i.Point(0,Y),"top-left":new i.Point(D,D),"top-right":new i.Point(-D,D),bottom:new i.Point(0,-Y),"bottom-left":new i.Point(D,-D),"bottom-right":new i.Point(-D,-D),left:new i.Point(Y,0),right:new i.Point(-Y,0)}}else if(Y instanceof i.Point||Array.isArray(Y)){var J=i.Point.convert(Y);return{center:J,top:J,"top-left":J,"top-right":J,bottom:J,"bottom-left":J,"bottom-right":J,left:J,right:J}}else return{center:i.Point.convert(Y.center||[0,0]),top:i.Point.convert(Y.top||[0,0]),"top-left":i.Point.convert(Y["top-left"]||[0,0]),"top-right":i.Point.convert(Y["top-right"]||[0,0]),bottom:i.Point.convert(Y.bottom||[0,0]),"bottom-left":i.Point.convert(Y["bottom-left"]||[0,0]),"bottom-right":i.Point.convert(Y["bottom-right"]||[0,0]),left:i.Point.convert(Y.left||[0,0]),right:i.Point.convert(Y.right||[0,0])};else return ol(new i.Point(0,0))}var io={version:i.version,supported:a,setRTLTextPlugin:i.setRTLTextPlugin,getRTLTextPluginStatus:i.getRTLTextPluginStatus,Map:si,NavigationControl:Ui,GeolocateControl:Zs,AttributionControl:Qi,ScaleControl:Ml,FullscreenControl:ss,Popup:wa,Marker:Ki,Style:yu,LngLat:i.LngLat,LngLatBounds:i.LngLatBounds,Point:i.Point,MercatorCoordinate:i.MercatorCoordinate,Evented:i.Evented,config:i.config,prewarm:ua,clearPrewarmedResources:ma,get accessToken(){return i.config.ACCESS_TOKEN},set accessToken(Y){i.config.ACCESS_TOKEN=Y},get baseApiUrl(){return i.config.API_URL},set baseApiUrl(Y){i.config.API_URL=Y},get workerCount(){return fn.workerCount},set workerCount(Y){fn.workerCount=Y},get maxParallelImageRequests(){return i.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(Y){i.config.MAX_PARALLEL_IMAGE_REQUESTS=Y},clearStorage:function(D){i.clearTileCache(D)},workerUrl:""};return io}),r})});var xGe=ye((Bxr,_Ge)=>{"use strict";var dw=Pr(),Qjt=Zl().sanitizeHTML,eWt=cJ(),gGe=m1();function mGe(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=gGe.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var ag=mGe.prototype;ag.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=r7(t)};ag.needsNewImage=function(e){var t=this.subplot.map;return t.getSource(this.idSource)&&this.sourceType==="image"&&e.sourcetype==="image"&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))};ag.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type};ag.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]};ag.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]};ag.updateImage=function(e){var t=this.subplot.map;t.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var r=this.findFollowingMapboxLayerId(this.lookupBelow());r!==null&&this.subplot.map.moveLayer(this.idLayer,r)};ag.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,!!r7(e)){var r=tWt(e);t.addSource(this.idSource,r)}};ag.findFollowingMapboxLayerId=function(e){if(e==="traces")for(var t=this.subplot.getMapLayers(),r=0;r0){for(var r=0;r0}function yGe(e){var t={},r={};switch(e.type){case"circle":dw.extendFlat(r,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":dw.extendFlat(r,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":dw.extendFlat(r,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var n=e.symbol,i=eWt(n.textposition,n.iconsize);dw.extendFlat(t,{"icon-image":n.icon+"-15","icon-size":n.iconsize/10,"text-field":n.text,"text-size":n.textfont.size,"text-anchor":i.anchor,"text-offset":i.offset,"symbol-placement":n.placement}),dw.extendFlat(r,{"icon-color":e.color,"text-color":n.textfont.color,"text-opacity":e.opacity});break;case"raster":dw.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":e.opacity});break}return{layout:t,paint:r}}function tWt(e){var t=e.sourcetype,r=e.source,n={type:t},i;return t==="geojson"?i="data":t==="vector"?i=typeof r=="string"?"url":"tiles":t==="raster"?(i="tiles",n.tileSize=256):t==="image"&&(i="url",n.coordinates=e.coordinates),n[i]=r,e.sourceattribution&&(n.attribution=Qjt(e.sourceattribution)),n}_Ge.exports=function(t,r,n){var i=new mGe(t,r);return i.update(n),i}});var CGe=ye((Nxr,kGe)=>{"use strict";var mJ=gJ(),yJ=Pr(),AGe=hx(),bGe=Oa(),rWt=ho(),iWt=yv(),i7=vf(),SGe=Cg(),nWt=SGe.drawMode,aWt=SGe.selectMode,oWt=qf().prepSelect,sWt=qf().clearOutline,lWt=qf().clearSelectionsCache,uWt=qf().selectOnClick,kx=m1(),cWt=xGe();function MGe(e,t){this.id=t,this.gd=e;var r=e._fullLayout,n=e._context;this.container=r._glcontainer.node(),this.isStatic=n.staticPlot,this.uid=r._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(r),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var Gh=MGe.prototype;Gh.plot=function(e,t,r){var n=this,i=t[n.id];n.map&&i.accesstoken!==n.accessToken&&(n.map.remove(),n.map=null,n.styleObj=null,n.traceHash={},n.layerList=[]);var a;n.map?a=new Promise(function(o,s){n.updateMap(e,t,o,s)}):a=new Promise(function(o,s){n.createMap(e,t,o,s)}),r.push(a)};Gh.createMap=function(e,t,r,n){var i=this,a=t[i.id],o=i.styleObj=EGe(a.style,t);i.accessToken=a.accesstoken;var s=a.bounds,l=s?[[s.west,s.south],[s.east,s.north]]:null,u=i.map=new mJ.Map({container:i.div,style:o.style,center:_J(a.center),zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,maxBounds:l,interactive:!i.isStatic,preserveDrawingBuffer:i.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new mJ.AttributionControl({compact:!0}));u._canvas.style.left="0px",u._canvas.style.top="0px",i.rejectOnError(n),i.isStatic||i.initFx(e,t);var c=[];c.push(new Promise(function(f){u.once("load",f)})),c=c.concat(AGe.fetchTraceGeoData(e)),Promise.all(c).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Gh.updateMap=function(e,t,r,n){var i=this,a=i.map,o=t[this.id];i.rejectOnError(n);var s=[],l=EGe(o.style,t);JSON.stringify(i.styleObj)!==JSON.stringify(l)&&(i.styleObj=l,a.setStyle(l.style),i.traceHash={},s.push(new Promise(function(u){a.once("styledata",u)}))),s=s.concat(AGe.fetchTraceGeoData(e)),Promise.all(s).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Gh.fillBelowLookup=function(e,t){var r=t[this.id],n=r.layers,i,a,o=this.belowLookup={},s=!1;for(i=0;i1)for(i=0;i-1&&uWt(l.originalEvent,n,[r.xaxis],[r.yaxis],r.id,s),u.indexOf("event")>-1&&i7.click(n,l.originalEvent)}}};Gh.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(t.isStatic)return;function i(l){var u=t.map.unproject(l);return[u.lng,u.lat]}var a=e.dragmode,o;o=function(l,u){if(u.isRect){var c=l.range={};c[t.id]=[i([u.xmin,u.ymin]),i([u.xmax,u.ymax])]}else{var f=l.lassoPoints={};f[t.id]=u.map(i)}};var s=t.dragOptions;t.dragOptions=yJ.extendDeep(s||{},{dragmode:e.dragmode,element:t.div,gd:n,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:o},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),aWt(a)||nWt(a)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(l,u,c){oWt(l,u,c,t.dragOptions,a)},iWt.init(t.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener("touchstart",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on("click",t.onClickInPanHandler))};Gh.updateFramework=function(e){var t=e[this.id].domain,r=e._size,n=this.div.style;n.width=r.w*(t.x[1]-t.x[0])+"px",n.height=r.h*(t.y[1]-t.y[0])+"px",n.left=r.l+t.x[0]*r.w+"px",n.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])};Gh.updateLayers=function(e){var t=e[this.id],r=t.layers,n=this.layerList,i;if(r.length!==n.length){for(i=0;i{"use strict";var xJ=Pr(),fWt=q_(),hWt=Zd(),LGe=Zk();PGe.exports=function(t,r,n){fWt(t,r,n,{type:"mapbox",attributes:LGe,handleDefaults:dWt,partition:"y",accessToken:r._mapboxAccessToken})};function dWt(e,t,r,n){r("accesstoken",n.accessToken),r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch");var i=r("bounds.west"),a=r("bounds.east"),o=r("bounds.south"),s=r("bounds.north");(i===void 0||a===void 0||o===void 0||s===void 0)&&delete t.bounds,hWt(e,t,{name:"layers",handleItemDefaults:vWt}),t._input=e}function vWt(e,t){function r(l,u){return xJ.coerce(e,t,LGe.layers,l,u)}var n=r("visible");if(n){var i=r("sourcetype"),a=i==="raster"||i==="image";r("source"),r("sourceattribution"),i==="vector"&&r("sourcelayer"),i==="image"&&r("coordinates");var o;a&&(o="raster");var s=r("type",o);a&&s!=="raster"&&(s=t.type="raster",xJ.log("Source types *raster* and *image* must drawn *raster* layer type.")),r("below"),r("color"),r("opacity"),r("minzoom"),r("maxzoom"),s==="circle"&&r("circle.radius"),s==="line"&&(r("line.width"),r("line.dash")),s==="fill"&&r("fill.outlinecolor"),s==="symbol"&&(r("symbol.icon"),r("symbol.iconsize"),r("symbol.text"),xJ.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}});var n7=ye(Np=>{"use strict";var RGe=gJ(),nm=Pr(),bJ=nm.strTranslate,pWt=nm.strScale,gWt=Id().getSubplotCalcData,mWt=Wp(),yWt=qa(),DGe=So(),_Wt=Zl(),xWt=CGe(),Cx="mapbox",oy=Np.constants=m1();Np.name=Cx;Np.attr="subplot";Np.idRoot=Cx;Np.idRegex=Np.attrRegex=nm.counterRegex(Cx);var bWt=["mapbox subplots and traces are deprecated!","Please consider switching to `map` subplots and traces.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");Np.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}};Np.layoutAttributes=Zk();Np.supplyLayoutDefaults=IGe();var FGe=!0;Np.plot=function(t){FGe&&(FGe=!1,nm.warn(bWt));var r=t._fullLayout,n=t.calcdata,i=r._subplots[Cx];if(RGe.version!==oy.requiredVersion)throw new Error(oy.wrongVersionErrorMsg);var a=wWt(t,i);RGe.accessToken=a;for(var o=0;op/2){var k=d.split("|").join("
");m.text(k).attr("data-unformatted",k).call(_Wt.convertToTspans,e),b=DGe.bBox(m.node())}m.attr("transform",bJ(-3,-b.height+8)),v.insert("rect",".static-attribution").attr({x:-b.width-6,y:-b.height-3,width:b.width+6,height:b.height+3,fill:"rgba(255, 255, 255, 0.75)"});var M=1;b.width+6>p&&(M=p/(b.width+6));var T=[n.l+n.w*o.x[1],n.t+n.h*(1-o.y[0])];v.attr("transform",bJ(T[0],T[1])+pWt(M))}};function wWt(e,t){var r=e._fullLayout,n=e._context;if(n.mapboxAccessToken==="")return"";for(var i=[],a=[],o=!1,s=!1,l=0;l1&&nm.warn(oy.multipleTokensErrorMsg),i[0]):(a.length&&nm.log(["Listed mapbox access token(s)",a.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function zGe(e){return typeof e=="string"&&(oy.styleValuesMapbox.indexOf(e)!==-1||e.indexOf("mapbox://")===0||e.indexOf("stamen")===0)}Np.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[Cx],n=0;n{"use strict";var Gxr=["*scattermapbox* trace is deprecated!","Please consider switching to the *scattermap* trace type and `map` subplots.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");qGe.exports={attributes:Kz(),supplyDefaults:YVe(),colorbar:$d(),formatLabels:uJ(),calc:_F(),plot:uGe(),hoverPoints:t7().hoverPoints,eventData:dGe(),selectPoints:pGe(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:"trace",name:"scattermapbox",basePlotModule:n7(),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}});var NGe=ye((jxr,BGe)=>{"use strict";BGe.exports=OGe()});var wJ=ye((Wxr,UGe)=>{"use strict";var y1=a5(),TWt=Tu(),{hovertemplateAttrs:AWt,templatefallbackAttrs:SWt}=Ll(),MWt=Gl(),Lx=Ao().extendFlat;UGe.exports=Lx({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:Lx({},y1.featureidkey,{}),below:{valType:"string",editType:"plot"},text:y1.text,hovertext:y1.hovertext,marker:{line:{color:Lx({},y1.marker.line.color,{editType:"plot"}),width:Lx({},y1.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:Lx({},y1.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:Lx({},y1.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:Lx({},y1.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:y1.hoverinfo,hovertemplate:AWt({},{keys:["properties"]}),hovertemplatefallback:SWt(),showlegend:Lx({},MWt.showlegend,{dflt:!1})},TWt("",{cLetter:"z",editTypeOverride:"calc"}))});var GGe=ye((Xxr,VGe)=>{"use strict";var $k=Pr(),EWt=td(),kWt=wJ();VGe.exports=function(t,r,n,i){function a(c,f){return $k.coerce(t,r,kWt,c,f)}var o=a("locations"),s=a("z"),l=a("geojson");if(!$k.isArrayOrTypedArray(o)||!o.length||!$k.isArrayOrTypedArray(s)||!s.length||!(typeof l=="string"&&l!==""||$k.isPlainObject(l))){r.visible=!1;return}a("featureidkey"),r._length=Math.min(o.length,s.length),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var u=a("marker.line.width");u&&a("marker.line.color"),a("marker.opacity"),EWt(t,r,i,a,{prefix:"",cLetter:"z"}),$k.coerceSelectionMarkerOpacity(r,a)}});var TJ=ye((Zxr,WGe)=>{"use strict";var CWt=Eo(),_1=Pr(),LWt=tc(),PWt=So(),IWt=cx().makeBlank,HGe=hx();function RWt(e){var t=e[0].trace,r=t.visible===!0&&t._length!==0,n={layout:{visibility:"none"},paint:{}},i={layout:{visibility:"none"},paint:{}},a=t._opts={fill:n,line:i,geojson:IWt()};if(!r)return a;var o=HGe.extractTraceFeature(e);if(!o)return a;var s=LWt.makeColorScaleFuncFromTrace(t),l=t.marker,u=l.line||{},c;_1.isArrayOrTypedArray(l.opacity)&&(c=function(k){var M=k.mo;return CWt(M)?+_1.constrain(M,0,1):0});var f;_1.isArrayOrTypedArray(u.color)&&(f=function(k){return k.mlc});var h;_1.isArrayOrTypedArray(u.width)&&(h=function(k){return k.mlw});for(var d=0;d{"use strict";var ZGe=TJ().convert,DWt=TJ().convertOnSelect,XGe=m1().traceLayerPrefix;function YGe(e,t){this.type="choroplethmapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",XGe+t+"-fill"],["line",XGe+t+"-line"]],this.below=null}var L5=YGe.prototype;L5.update=function(e){this._update(ZGe(e)),e[0].trace._glTrace=this};L5.updateOnSelect=function(e){this._update(DWt(e))};L5._update=function(e){var t=this.subplot,r=this.layerList,n=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(e.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(e,n),this.below=n);for(var i=0;i=0;r--)e.removeLayer(t[r][1])};L5.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};KGe.exports=function(t,r){var n=r[0].trace,i=new YGe(t,n.uid),a=i.sourceId,o=ZGe(r),s=i.below=t.belowLookup["trace-"+n.uid];return t.map.addSource(a,{type:"geojson",data:o.geojson}),i._addLayers(o,s),r[0].trace._glTrace=i,i}});var QGe=ye((Jxr,$Ge)=>{"use strict";var Kxr=["*choroplethmapbox* trace is deprecated!","Please consider switching to the *choroplethmap* trace type and `map` subplots.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");$Ge.exports={attributes:wJ(),supplyDefaults:GGe(),colorbar:D_(),calc:NF(),plot:JGe(),hoverPoints:VF(),eventData:GF(),selectPoints:HF(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.updateOnSelect(t)}},getBelow:function(e,t){for(var r=t.getMapLayers(),n=r.length-2;n>=0;n--){var i=r[n].id;if(typeof i=="string"&&i.indexOf("water")===0){for(var a=n+1;a{"use strict";eHe.exports=QGe()});var SJ=ye((Qxr,iHe)=>{"use strict";var FWt=Tu(),{hovertemplateAttrs:zWt,templatefallbackAttrs:qWt}=Ll(),rHe=Gl(),a7=Kz(),AJ=Ao().extendFlat;iHe.exports=AJ({lon:a7.lon,lat:a7.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:a7.text,hovertext:a7.hovertext,hoverinfo:AJ({},rHe.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:zWt(),hovertemplatefallback:qWt(),showlegend:AJ({},rHe.showlegend,{dflt:!1})},FWt("",{cLetter:"z",editTypeOverride:"calc"}))});var aHe=ye((ebr,nHe)=>{"use strict";var OWt=Pr(),BWt=td(),NWt=SJ();nHe.exports=function(t,r,n,i){function a(u,c){return OWt.coerce(t,r,NWt,u,c)}var o=a("lon")||[],s=a("lat")||[],l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),BWt(t,r,i,a,{prefix:"",cLetter:"z"})}});var lHe=ye((tbr,sHe)=>{"use strict";var MJ=Eo(),UWt=Pr().isArrayOrTypedArray,EJ=fs().BADNUM,VWt=gv(),oHe=Pr()._;sHe.exports=function(t,r){for(var n=r._length,i=new Array(n),a=r.z,o=UWt(a)&&a.length,s=0;s{"use strict";var GWt=Eo(),kJ=Pr(),uHe=ka(),cHe=tc(),fHe=fs().BADNUM,HWt=cx().makeBlank;hHe.exports=function(t){var r=t[0].trace,n=r.visible===!0&&r._length!==0,i={layout:{visibility:"none"},paint:{}},a=r._opts={heatmap:i,geojson:HWt()};if(!n)return a;var o=[],s,l=r.z,u=r.radius,c=kJ.isArrayOrTypedArray(l)&&l.length,f=kJ.isArrayOrTypedArray(u);for(s=0;s0?+u[s]:0),o.push({type:"Feature",geometry:{type:"Point",coordinates:d},properties:v})}}var b=cHe.extractOpts(r),p=b.reversescale?cHe.flipScale(b.colorscale):b.colorscale,k=p[0][1],M=uHe.opacity(k)<1?k:uHe.addOpacity(k,0),T=["interpolate",["linear"],["heatmap-density"],0,M];for(s=1;s{"use strict";var vHe=dHe(),jWt=m1().traceLayerPrefix;function pHe(e,t){this.type="densitymapbox",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",jWt+t+"-heatmap"]],this.below=null}var o7=pHe.prototype;o7.update=function(e){var t=this.subplot,r=this.layerList,n=vHe(e),i=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(n.geojson),i!==this.below&&(this._removeLayers(),this._addLayers(n,i),this.below=i);for(var a=0;a=0;r--)e.removeLayer(t[r][1])};o7.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};gHe.exports=function(t,r){var n=r[0].trace,i=new pHe(t,n.uid),a=i.sourceId,o=vHe(r),s=i.below=t.belowLookup["trace-"+n.uid];return t.map.addSource(a,{type:"geojson",data:o.geojson}),i._addLayers(o,s),i}});var _He=ye((nbr,yHe)=>{"use strict";var WWt=ho(),XWt=t7().hoverPoints,ZWt=t7().getExtraText;yHe.exports=function(t,r,n){var i=XWt(t,r,n);if(i){var a=i[0],o=a.cd,s=o[0].trace,l=o[a.index];if(delete a.color,"z"in l){var u=a.subplot.mockAxis;a.z=l.z,a.zLabel=WWt.tickText(u,u.c2l(l.z),"hover").text}return a.extraText=ZWt(s,l,o[0].t.labels),[a]}}});var bHe=ye((abr,xHe)=>{"use strict";xHe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var THe=ye((sbr,wHe)=>{"use strict";var obr=["*densitymapbox* trace is deprecated!","Please consider switching to the *densitymap* trace type and `map` subplots.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");wHe.exports={attributes:SJ(),supplyDefaults:aHe(),colorbar:D_(),formatLabels:uJ(),calc:lHe(),plot:mHe(),hoverPoints:_He(),eventData:bHe(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n{"use strict";AHe.exports=THe()});var EHe=ye((ubr,MHe)=>{MHe.exports={version:8,name:"orto",metadata:{"maputnik:renderer":"mlgljs"},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}},{id:"waterway_tunnel",type:"line",source:"openmaptiles","source-layer":"waterway",minzoom:14,filter:["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]},"line-dasharray":[2,4]}},{id:"waterway-other",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["!in","class","canal","river","stream"],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,2]]}}},{id:"waterway-stream-canal",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]}}},{id:"waterway-river",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["==","class","river"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.2,stops:[[10,.8],[20,4]]},"line-opacity":.5}},{id:"water-offset",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",maxzoom:8,filter:["==","$type","Polygon"],layout:{visibility:"visible"},paint:{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{base:1,stops:[[6,[2,0]],[8,[0,0]]]}}},{id:"water",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{id:"water-pattern",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{id:"landcover-ice-shelf",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"landcover",filter:["==","subclass","ice_shelf"],layout:{visibility:"visible"},paint:{"fill-color":"#fff","fill-opacity":{base:1,stops:[[0,.9],[10,.3]]}}},{id:"tunnel-service-track-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[15,1],[16,4],[20,11]]}}},{id:"tunnel-minor-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,1]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"tunnel-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"tunnel-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.7}},{id:"tunnel-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"tunnel-path",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"tunnel-service-track",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-width":{base:1.2,stops:[[15.5,0],[16,2],[20,7.5]]}}},{id:"tunnel-minor",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor_road"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-opacity":1,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"tunnel-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,10]]}}},{id:"tunnel-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-motorway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#ffdaa6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-railway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]},"line-dasharray":[2,2]}},{id:"ferry",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["in","class","ferry"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{id:"aeroway-taxiway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","taxiway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,2],[17,12]]},"line-opacity":1}},{id:"aeroway-runway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","runway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,5],[17,55]]},"line-opacity":1}},{id:"aeroway-taxiway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","taxiway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,1],[17,10]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"aeroway-runway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","runway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,4],[17,50]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"highway-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-minor-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,0]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"highway-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":.5,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"highway-primary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[7,0],[8,.6]]},"line-width":{base:1.2,stops:[[7,0],[8,.6],[9,1.5],[20,22]]}}},{id:"highway-trunk-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[5,0],[6,.5]]},"line-width":{base:1.2,stops:[[5,0],[6,.6],[7,1.5],[20,22]]}}},{id:"highway-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:4,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[4,0],[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":{stops:[[4,0],[5,.5]]}}},{id:"highway-path",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"highway-motorway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-minor",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fff","line-opacity":.5,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"highway-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[8,.5],[20,13]]},"line-opacity":.5}},{id:"highway-primary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[8.5,0],[9,.5],[20,18]]},"line-opacity":0}},{id:"highway-trunk",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"highway-motorway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"railway-transit",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-transit-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway-service",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-service-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"railway-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"bridge-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,28]]}}},{id:"bridge-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"hsl(28, 76%, 67%)","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,26]]}}},{id:"bridge-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"bridge-path-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#f8f4f0","line-width":{base:1.2,stops:[[15,1.2],[20,18]]}}},{id:"bridge-path",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#cba","line-width":{base:1.2,stops:[[15,1.2],[20,4]]},"line-dasharray":[1.5,.75]}},{id:"bridge-motorway-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,20]]}}},{id:"bridge-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]}}},{id:"bridge-motorway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"bridge-railway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"bridge-railway-hatching",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"cablecar",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,1],[19,2.5]]}}},{id:"cablecar-dash",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{id:"boundary-land-level-4",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],layout:{"line-join":"round"},paint:{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{base:1.4,stops:[[4,.4],[5,1],[12,3]]},"line-opacity":.6}},{id:"boundary-land-level-2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 66%)","line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,2]]}}},{id:"boundary-land-disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=","maritime",1],["==","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,8]]}}},{id:"boundary-water",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["in","admin_level",2,4],["==","maritime",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(154, 189, 214, 1)","line-width":{base:1,stops:[[0,.6],[4,1],[5,1],[12,1]]},"line-opacity":{stops:[[6,0],[10,0]]}}},{id:"waterway-name",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:13,filter:["all",["==","$type","LineString"],["has","name"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":.2,"symbol-spacing":350},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-lakeline",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==","$type","LineString"],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-ocean",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["==","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-other",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["!in","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":{stops:[[0,10],[6,14]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2,visibility:"visible"},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"poi-level-3",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:16,filter:["all",["==","$type","Point"],[">=","rank",25]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} {name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-2",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:15,filter:["all",["==","$type","Point"],["<=","rank",24],[">=","rank",15]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} @@ -3222,10 +3222,10 @@ uniform `+Zt+" "+hr+" u_"+qt+`; {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(10, 9, 9, 0.8)"}},{id:"place-town",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["==","class","town"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,14],[15,24]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(22, 22, 22, 0.8)"}},{id:"place-city",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["!=","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-city-capital",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} -{name:nonlatin}`,"text-max-width":8,"icon-image":"star_11","text-offset":[.4,0],"icon-size":.8,"text-anchor":"left",visibility:"visible"},paint:{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],layout:{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-3",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-2",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-1",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-continent",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",maxzoom:1,filter:["==","class","continent"],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase",visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],id:"qebnlkra6"}});var EHe=ye((rbr,MHe)=>{MHe.exports={version:8,name:"orto",metadata:{},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}}]}});var Px=ye((ibr,IHe)=>{"use strict";var VWt=t_(),GWt=SHe(),HWt=EHe(),jWt='\xA9 OpenStreetMap contributors',kHe="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",CHe="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",s7="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",WWt="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",XWt="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",ZWt="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",PHe={basic:s7,streets:s7,outdoors:s7,light:kHe,dark:CHe,satellite:HWt,"satellite-streets":GWt,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:jWt,tiles:["https://tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":kHe,"carto-darkmatter":CHe,"carto-voyager":s7,"carto-positron-nolabels":WWt,"carto-darkmatter-nolabels":XWt,"carto-voyager-nolabels":ZWt},LHe=VWt(PHe);IHe.exports={styleValueDflt:"basic",stylesMap:PHe,styleValuesMap:LHe,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",LHe.join(", "),"or use a tile service."].join(` -`),mapOnErrorMsg:"Map error."}});var Qk=ye((nbr,OHe)=>{"use strict";var RHe=Dr(),DHe=ka().defaultLine,YWt=Cc().attributes,KWt=ec(),JWt=pf().textposition,$Wt=mc().overrideAll,QWt=vl().templatedArray,FHe=Px(),zHe=KWt({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});zHe.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var eXt=OHe.exports=$Wt({_arrayAttrRegexps:[RHe.counterRegex("map",".layers",!0)],domain:YWt({name:"map"}),style:{valType:"any",values:FHe.styleValuesMap,dflt:FHe.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:QWt("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:DHe},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:DHe}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:zHe,textposition:RHe.extendFlat({},JWt,{arrayOk:!1})}})},"plot","from-root");eXt.uirevision={valType:"any",editType:"none"}});var l7=ye((abr,UHe)=>{"use strict";var{hovertemplateAttrs:tXt,texttemplateAttrs:rXt,templatefallbackAttrs:qHe}=Ll(),iXt=Pg(),eC=ew(),P5=pf(),BHe=Qk(),nXt=Gl(),aXt=Tu(),dw=Ao().extendFlat,oXt=mc().overrideAll,sXt=Qk(),NHe=eC.line,I5=eC.marker;UHe.exports=oXt({lon:eC.lon,lat:eC.lat,cluster:{enabled:{valType:"boolean"},maxzoom:dw({},sXt.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:dw({},I5.opacity,{dflt:1})},mode:dw({},P5.mode,{dflt:"markers"}),text:dw({},P5.text,{}),texttemplate:rXt({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:qHe({editType:"plot"}),hovertext:dw({},P5.hovertext,{}),line:{color:NHe.color,width:NHe.width},connectgaps:P5.connectgaps,marker:dw({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:I5.opacity,size:I5.size,sizeref:I5.sizeref,sizemin:I5.sizemin,sizemode:I5.sizemode},aXt("marker")),fill:eC.fill,fillcolor:iXt(),textfont:BHe.layers.symbol.textfont,textposition:BHe.layers.symbol.textposition,below:{valType:"string"},selected:{marker:P5.selected.marker},unselected:{marker:P5.unselected.marker},hoverinfo:dw({},nXt.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:tXt(),hovertemplatefallback:qHe()},"calc","nested")});var CJ=ye((obr,VHe)=>{"use strict";var lXt=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];VHe.exports={isSupportedFont:function(e){return lXt.indexOf(e)!==-1}}});var jHe=ye((sbr,HHe)=>{"use strict";var tC=Dr(),LJ=Ru(),uXt=$p(),cXt=D0(),fXt=F0(),hXt=Fg(),GHe=l7(),dXt=CJ().isSupportedFont;HHe.exports=function(t,r,n,i){function a(p,k){return tC.coerce(t,r,GHe,p,k)}function o(p,k){return tC.coerce2(t,r,GHe,p,k)}var s=vXt(t,r,a);if(!s){r.visible=!1;return}if(a("text"),a("texttemplate"),a("texttemplatefallback"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("mode"),a("below"),LJ.hasMarkers(r)){uXt(t,r,n,i,a,{noLine:!0,noAngle:!0}),a("marker.allowoverlap"),a("marker.angle");var l=r.marker;l.symbol!=="circle"&&(tC.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),tC.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}LJ.hasLines(r)&&(cXt(t,r,n,i,a,{noDash:!0}),a("connectgaps"));var u=o("cluster.maxzoom"),c=o("cluster.step"),f=o("cluster.color",r.marker&&r.marker.color||n),h=o("cluster.size"),d=o("cluster.opacity"),v=u!==!1||c!==!1||f!==!1||h!==!1||d!==!1,_=a("cluster.enabled",v);if(_||LJ.hasText(r)){var b=i.font.family;fXt(t,r,i,a,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:dXt(b)?b:"Open Sans Regular",weight:i.font.weight,style:i.font.style,size:i.font.size,color:i.font.color}})}a("fill"),r.fill!=="none"&&hXt(t,r,n,a),tC.coerceSelectionMarkerOpacity(r,a)};function vXt(e,t,r){var n=r("lon")||[],i=r("lat")||[],a=Math.min(n.length,i.length);return t._length=a,a}});var PJ=ye((lbr,XHe)=>{"use strict";var WHe=ho();XHe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=WHe.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=WHe.tickText(o,o.c2l(s[1]),!0).text,i}});var IJ=ye((ubr,YHe)=>{"use strict";var ZHe=Dr();YHe.exports=function(t,r){var n=t.split(" "),i=n[0],a=n[1],o=ZHe.isArrayOrTypedArray(r)?ZHe.mean(r):r,s=.5+o/100,l=1.5+o/100,u=["",""],c=[0,0];switch(i){case"top":u[0]="top",c[1]=-l;break;case"bottom":u[0]="bottom",c[1]=l;break}switch(a){case"left":u[1]="right",c[0]=-s;break;case"right":u[1]="left",c[0]=s;break}var f;return u[0]&&u[1]?f=u.join("-"):u[0]?f=u[0]:u[1]?f=u[1]:f="center",{anchor:f,offset:c}}});var tje=ye((cbr,eje)=>{"use strict";var $He=Eo(),ov=Dr(),pXt=fs().BADNUM,c7=cx(),KHe=tc(),gXt=So(),mXt=O3(),f7=Ru(),yXt=CJ().isSupportedFont,_Xt=IJ(),xXt=ip().appendArrayPointValue,bXt=Zl().NEWLINES,wXt=Zl().BR_TAG_ALL;eje.exports=function(t,r){var n=r[0].trace,i=n.visible===!0&&n._length!==0,a=n.fill!=="none",o=f7.hasLines(n),s=f7.hasMarkers(n),l=f7.hasText(n),u=s&&n.marker.symbol==="circle",c=s&&n.marker.symbol!=="circle",f=n.cluster&&n.cluster.enabled,h=u7("fill"),d=u7("line"),v=u7("circle"),_=u7("symbol"),b={fill:h,line:d,circle:v,symbol:_};if(!i)return b;var p;if((a||o)&&(p=c7.calcTraceToLineCoords(r)),a&&(h.geojson=c7.makePolygon(p),h.layout.visibility="visible",ov.extendFlat(h.paint,{"fill-color":n.fillcolor})),o&&(d.geojson=c7.makeLine(p),d.layout.visibility="visible",ov.extendFlat(d.paint,{"line-width":n.line.width,"line-color":n.line.color,"line-opacity":n.opacity})),u){var k=TXt(r);v.geojson=k.geojson,v.layout.visibility="visible",f&&(v.filter=["!",["has","point_count"]],b.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":DJ(n.cluster.color,n.cluster.step),"circle-radius":DJ(n.cluster.size,n.cluster.step),"circle-opacity":DJ(n.cluster.opacity,n.cluster.step)}},b.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":JHe(n),"text-size":12}}),ov.extendFlat(v.paint,{"circle-color":k.mcc,"circle-radius":k.mrc,"circle-opacity":k.mo})}if(u&&f&&(v.filter=["!",["has","point_count"]]),(c||l)&&(_.geojson=AXt(r,t),ov.extendFlat(_.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),c&&(ov.extendFlat(_.layout,{"icon-size":n.marker.size/10}),"angle"in n.marker&&n.marker.angle!=="auto"&&ov.extendFlat(_.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),_.layout["icon-allow-overlap"]=n.marker.allowoverlap,ov.extendFlat(_.paint,{"icon-opacity":n.opacity*n.marker.opacity,"icon-color":n.marker.color})),l)){var E=(n.marker||{}).size,T=_Xt(n.textposition,E);ov.extendFlat(_.layout,{"text-size":n.textfont.size,"text-anchor":T.anchor,"text-offset":T.offset,"text-font":JHe(n)}),ov.extendFlat(_.paint,{"text-color":n.textfont.color,"text-opacity":n.opacity})}return b};function u7(e){return{type:e,geojson:c7.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function TXt(e){var t=e[0].trace,r=t.marker,n=t.selectedpoints,i=ov.isArrayOrTypedArray(r.color),a=ov.isArrayOrTypedArray(r.size),o=ov.isArrayOrTypedArray(r.opacity),s;function l(E){return t.opacity*E}function u(E){return E/2}var c;i&&(KHe.hasColorscale(t,"marker")?c=KHe.makeColorScaleFuncFromTrace(r):c=ov.identity);var f;a&&(f=mXt(t));var h;o&&(h=function(E){var T=$He(E)?+ov.constrain(E,0,1):0;return l(T)});var d=[];for(s=0;s850?s+=" Black":i>750?s+=" Extra Bold":i>650?s+=" Bold":i>550?s+=" Semi Bold":i>450?s+=" Medium":i>350?s+=" Regular":i>250?s+=" Light":i>150?s+=" Extra Light":s+=" Thin"):a.slice(0,2).join(" ")==="Open Sans"?(s="Open Sans",i>750?s+=" Extrabold":i>650?s+=" Bold":i>550?s+=" Semibold":i>350?s+=" Regular":s+=" Light"):a.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(s="Klokantech Noto Sans",a[3]==="CJK"&&(s+=" CJK"),s+=i>500?" Bold":" Regular")),o&&(s+=" Italic"),s==="Open Sans Regular Italic"?s="Open Sans Italic":s==="Open Sans Regular Bold"?s="Open Sans Bold":s==="Open Sans Regular Bold Italic"?s="Open Sans Bold Italic":s==="Klokantech Noto Sans Regular Italic"&&(s="Klokantech Noto Sans Italic"),yXt(s)||(s=r);var l=s.split(", ");return l}});var aje=ye((fbr,nje)=>{"use strict";var SXt=Dr(),rje=tje(),R5=Px().traceLayerPrefix,og={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function ije(e,t,r,n){this.type="scattermap",this.subplot=e,this.uid=t,this.clusterEnabled=r,this.isHidden=n,this.sourceIds={fill:"source-"+t+"-fill",line:"source-"+t+"-line",circle:"source-"+t+"-circle",symbol:"source-"+t+"-symbol",cluster:"source-"+t+"-circle",clusterCount:"source-"+t+"-circle"},this.layerIds={fill:R5+t+"-fill",line:R5+t+"-line",circle:R5+t+"-circle",symbol:R5+t+"-symbol",cluster:R5+t+"-cluster",clusterCount:R5+t+"-cluster-count"},this.below=null}var rC=ije.prototype;rC.addSource=function(e,t,r){var n={type:"geojson",data:t.geojson};r&&r.enabled&&SXt.extendFlat(n,{cluster:!0,clusterMaxZoom:r.maxzoom});var i=this.subplot.map.getSource(this.sourceIds[e]);i?i.setData(t.geojson):this.subplot.map.addSource(this.sourceIds[e],n)};rC.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};rC.addLayer=function(e,t,r){var n={type:t.type,id:this.layerIds[e],source:this.sourceIds[e],layout:t.layout,paint:t.paint};t.filter&&(n.filter=t.filter);for(var i=this.layerIds[e],a,o=this.subplot.getMapLayers(),s=0;s=0;L--){var x=T[L];i.removeLayer(u.layerIds[x])}E||i.removeSource(u.sourceIds.circle)}function h(E){for(var T=og.nonCluster,L=0;L=0;L--){var x=T[L];i.removeLayer(u.layerIds[x]),E||i.removeSource(u.sourceIds[x])}}function v(E){l?f(E):d(E)}function _(E){s?c(E):h(E)}function b(){for(var E=s?og.cluster:og.nonCluster,T=0;T=0;n--){var i=r[n];t.removeLayer(this.layerIds[i]),t.removeSource(this.sourceIds[i])}};nje.exports=function(t,r){var n=r[0].trace,i=n.cluster&&n.cluster.enabled,a=n.visible!==!0,o=new ije(t,n.uid,i,a),s=rje(t.gd,r),l=o.below=t.belowLookup["trace-"+n.uid],u,c,f;if(i)for(o.addSource("circle",s.circle,n.cluster),u=0;u{"use strict";var MXt=vf(),FJ=Dr(),EXt=gT(),kXt=FJ.fillText,CXt=fs().BADNUM,LXt=Px().traceLayerPrefix;function PXt(e,t,r){var n=e.cd,i=n[0].trace,a=e.xa,o=e.ya,s=e.subplot,l=[],u=LXt+i.uid+"-circle",c=i.cluster&&i.cluster.enabled;if(c){var f=s.map.queryRenderedFeatures(null,{layers:[u]});l=f.map(function(M){return M.id})}var h=t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360),d=h*360,v=t-d;function _(M){var g=M.lonlat;if(g[0]===CXt||c&&l.indexOf(M.i+1)===-1)return 1/0;var P=FJ.modHalf(g[0],360),A=g[1],z=s.project([P,A]),O=z.x-a.c2p([v,A]),U=z.y-o.c2p([P,r]),G=Math.max(3,M.mrc||0);return Math.max(Math.sqrt(O*O+U*U)-G,1-3/G)}if(MXt.getClosest(n,_,e),e.index!==!1){var b=n[e.index],p=b.lonlat,k=[FJ.modHalf(p[0],360)+d,p[1]],E=a.c2p(k),T=o.c2p(k),L=b.mrc||1;e.x0=E-L,e.x1=E+L,e.y0=T-L,e.y1=T+L;var x={};x[i.subplot]={_subplot:s};var C=i._module.formatLabels(b,i,x);return e.lonLabel=C.lonLabel,e.latLabel=C.latLabel,e.color=EXt(i,b),e.extraText=oje(i,b,n[0].t.labels),e.hovertemplate=i.hovertemplate,[e]}}function oje(e,t,r){if(e.hovertemplate)return;var n=t.hi||e.hoverinfo,i=n.split("+"),a=i.indexOf("all")!==-1,o=i.indexOf("lon")!==-1,s=i.indexOf("lat")!==-1,l=t.lonlat,u=[];function c(f){return f+"\xB0"}return a||o&&s?u.push("("+c(l[1])+", "+c(l[0])+")"):o?u.push(r.lon+c(l[0])):s&&u.push(r.lat+c(l[1])),(a||i.indexOf("text")!==-1)&&kXt(t,e,u),u.join("
")}sje.exports={hoverPoints:PXt,getExtraText:oje}});var uje=ye((dbr,lje)=>{"use strict";lje.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var fje=ye((vbr,cje)=>{"use strict";var IXt=Dr(),RXt=Ru(),DXt=fs().BADNUM;cje.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l;if(!RXt.hasMarkers(s))return[];if(r===!1)for(l=0;l{(function(e,t){typeof zJ=="object"&&typeof OJ!="undefined"?OJ.exports=t():(e=typeof globalThis!="undefined"?globalThis:e||self,e.maplibregl=t())})(zJ,function(){"use strict";var e={},t={};function r(i,a,o){if(t[i]=o,i==="index"){var s="var sharedModule = {}; ("+t.shared+")(sharedModule); ("+t.worker+")(sharedModule);",l={};return t.shared(l),t.index(e,l),typeof window!="undefined"&&e.setWorkerUrl(window.URL.createObjectURL(new Blob([s],{type:"text/javascript"}))),e}}r("shared",["exports"],function(i){"use strict";function a(R,S,F,W){return new(F||(F=Promise))(function(te,fe){function pe(ct){try{Ke(W.next(ct))}catch(Lt){fe(Lt)}}function Fe(ct){try{Ke(W.throw(ct))}catch(Lt){fe(Lt)}}function Ke(ct){var Lt;ct.done?te(ct.value):(Lt=ct.value,Lt instanceof F?Lt:new F(function(Jt){Jt(Lt)})).then(pe,Fe)}Ke((W=W.apply(R,S||[])).next())})}function o(R){return R&&R.__esModule&&Object.prototype.hasOwnProperty.call(R,"default")?R.default:R}typeof SuppressedError=="function"&&SuppressedError;var s=l;function l(R,S){this.x=R,this.y=S}l.prototype={clone:function(){return new l(this.x,this.y)},add:function(R){return this.clone()._add(R)},sub:function(R){return this.clone()._sub(R)},multByPoint:function(R){return this.clone()._multByPoint(R)},divByPoint:function(R){return this.clone()._divByPoint(R)},mult:function(R){return this.clone()._mult(R)},div:function(R){return this.clone()._div(R)},rotate:function(R){return this.clone()._rotate(R)},rotateAround:function(R,S){return this.clone()._rotateAround(R,S)},matMult:function(R){return this.clone()._matMult(R)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(R){return this.x===R.x&&this.y===R.y},dist:function(R){return Math.sqrt(this.distSqr(R))},distSqr:function(R){var S=R.x-this.x,F=R.y-this.y;return S*S+F*F},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(R){return Math.atan2(this.y-R.y,this.x-R.x)},angleWith:function(R){return this.angleWithSep(R.x,R.y)},angleWithSep:function(R,S){return Math.atan2(this.x*S-this.y*R,this.x*R+this.y*S)},_matMult:function(R){var S=R[2]*this.x+R[3]*this.y;return this.x=R[0]*this.x+R[1]*this.y,this.y=S,this},_add:function(R){return this.x+=R.x,this.y+=R.y,this},_sub:function(R){return this.x-=R.x,this.y-=R.y,this},_mult:function(R){return this.x*=R,this.y*=R,this},_div:function(R){return this.x/=R,this.y/=R,this},_multByPoint:function(R){return this.x*=R.x,this.y*=R.y,this},_divByPoint:function(R){return this.x/=R.x,this.y/=R.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var R=this.y;return this.y=this.x,this.x=-R,this},_rotate:function(R){var S=Math.cos(R),F=Math.sin(R),W=F*this.x+S*this.y;return this.x=S*this.x-F*this.y,this.y=W,this},_rotateAround:function(R,S){var F=Math.cos(R),W=Math.sin(R),te=S.y+W*(this.x-S.x)+F*(this.y-S.y);return this.x=S.x+F*(this.x-S.x)-W*(this.y-S.y),this.y=te,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},l.convert=function(R){return R instanceof l?R:Array.isArray(R)?new l(R[0],R[1]):R};var u=o(s),c=f;function f(R,S,F,W){this.cx=3*R,this.bx=3*(F-R)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*S,this.by=3*(W-S)-this.cy,this.ay=1-this.cy-this.by,this.p1x=R,this.p1y=S,this.p2x=F,this.p2y=W}f.prototype={sampleCurveX:function(R){return((this.ax*R+this.bx)*R+this.cx)*R},sampleCurveY:function(R){return((this.ay*R+this.by)*R+this.cy)*R},sampleCurveDerivativeX:function(R){return(3*this.ax*R+2*this.bx)*R+this.cx},solveCurveX:function(R,S){if(S===void 0&&(S=1e-6),R<0)return 0;if(R>1)return 1;for(var F=R,W=0;W<8;W++){var te=this.sampleCurveX(F)-R;if(Math.abs(te)te?pe=F:Fe=F,F=.5*(Fe-pe)+pe;return F},solve:function(R,S){return this.sampleCurveY(this.solveCurveX(R,S))}};var h=o(c);let d,v;function _(){return d==null&&(d=typeof OffscreenCanvas!="undefined"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),d}function b(){if(v==null&&(v=!1,_())){let S=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(S){for(let W=0;W<5*5;W++){let te=4*W;S.fillStyle=`rgb(${te},${te+1},${te+2})`,S.fillRect(W%5,Math.floor(W/5),1,1)}let F=S.getImageData(0,0,5,5).data;for(let W=0;W<5*5*4;W++)if(W%4!=3&&F[W]!==W){v=!0;break}}}return v||!1}function p(R,S,F,W){let te=new h(R,S,F,W);return fe=>te.solve(fe)}let k=p(.25,.1,.25,1);function E(R,S,F){return Math.min(F,Math.max(S,R))}function T(R,S,F){let W=F-S,te=((R-S)%W+W)%W+S;return te===S?F:te}function L(R,...S){for(let F of S)for(let W in F)R[W]=F[W];return R}let x=1;function C(R,S,F){let W={};for(let te in R)W[te]=S.call(this,R[te],te,R);return W}function M(R,S,F){let W={};for(let te in R)S.call(this,R[te],te,R)&&(W[te]=R[te]);return W}function g(R){return Array.isArray(R)?R.map(g):typeof R=="object"&&R?C(R,g):R}let P={};function A(R){P[R]||(typeof console!="undefined"&&console.warn(R),P[R]=!0)}function z(R,S,F){return(F.y-R.y)*(S.x-R.x)>(S.y-R.y)*(F.x-R.x)}function O(R){return typeof WorkerGlobalScope!="undefined"&&R!==void 0&&R instanceof WorkerGlobalScope}let U=null;function G(R){return typeof ImageBitmap!="undefined"&&R instanceof ImageBitmap}let Z="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function j(R,S,F,W,te){return a(this,void 0,void 0,function*(){if(typeof VideoFrame=="undefined")throw new Error("VideoFrame not supported");let fe=new VideoFrame(R,{timestamp:0});try{let pe=fe==null?void 0:fe.format;if(!pe||!pe.startsWith("BGR")&&!pe.startsWith("RGB"))throw new Error(`Unrecognized format ${pe}`);let Fe=pe.startsWith("BGR"),Ke=new Uint8ClampedArray(W*te*4);if(yield fe.copyTo(Ke,function(ct,Lt,Jt,cr,mr){let Pr=4*Math.max(-Lt,0),zr=(Math.max(0,Jt)-Jt)*cr*4+Pr,ui=4*cr,yi=Math.max(0,Lt),vn=Math.max(0,Jt);return{rect:{x:yi,y:vn,width:Math.min(ct.width,Lt+cr)-yi,height:Math.min(ct.height,Jt+mr)-vn},layout:[{offset:zr,stride:ui}]}}(R,S,F,W,te)),Fe)for(let ct=0;ctO(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,Se=function(R,S){if(/:\/\//.test(R.url)&&!/^https?:|^file:/.test(R.url)){let W=Ce(R.url);if(W)return W(R,S);if(O(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:R,targetMapId:Le},S)}if(!(/^file:/.test(F=R.url)||/^file:/.test(ie())&&!/^\w+:/.test(F))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(W,te){return a(this,void 0,void 0,function*(){let fe=new Request(W.url,{method:W.method||"GET",body:W.body,credentials:W.credentials,headers:W.headers,cache:W.cache,referrer:ie(),signal:te.signal});W.type!=="json"||fe.headers.has("Accept")||fe.headers.set("Accept","application/json");let pe=yield fetch(fe);if(!pe.ok){let ct=yield pe.blob();throw new ge(pe.status,pe.statusText,W.url,ct)}let Fe;Fe=W.type==="arrayBuffer"||W.type==="image"?pe.arrayBuffer():W.type==="json"?pe.json():pe.text();let Ke=yield Fe;if(te.signal.aborted)throw oe();return{data:Ke,cacheControl:pe.headers.get("Cache-Control"),expires:pe.headers.get("Expires")}})}(R,S);if(O(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:R,mustQueue:!0,targetMapId:Le},S)}var F;return function(W,te){return new Promise((fe,pe)=>{var Fe;let Ke=new XMLHttpRequest;Ke.open(W.method||"GET",W.url,!0),W.type!=="arrayBuffer"&&W.type!=="image"||(Ke.responseType="arraybuffer");for(let ct in W.headers)Ke.setRequestHeader(ct,W.headers[ct]);W.type==="json"&&(Ke.responseType="text",!((Fe=W.headers)===null||Fe===void 0)&&Fe.Accept||Ke.setRequestHeader("Accept","application/json")),Ke.withCredentials=W.credentials==="include",Ke.onerror=()=>{pe(new Error(Ke.statusText))},Ke.onload=()=>{if(!te.signal.aborted)if((Ke.status>=200&&Ke.status<300||Ke.status===0)&&Ke.response!==null){let ct=Ke.response;if(W.type==="json")try{ct=JSON.parse(Ke.response)}catch(Lt){return void pe(Lt)}fe({data:ct,cacheControl:Ke.getResponseHeader("Cache-Control"),expires:Ke.getResponseHeader("Expires")})}else{let ct=new Blob([Ke.response],{type:Ke.getResponseHeader("Content-Type")});pe(new ge(Ke.status,Ke.statusText,W.url,ct))}},te.signal.addEventListener("abort",()=>{Ke.abort(),pe(oe())}),Ke.send(W.body)})}(R,S)};function Ee(R){if(!R||R.indexOf("://")<=0||R.indexOf("data:image/")===0||R.indexOf("blob:")===0)return!0;let S=new URL(R),F=window.location;return S.protocol===F.protocol&&S.host===F.host}function Ae(R,S,F){F[R]&&F[R].indexOf(S)!==-1||(F[R]=F[R]||[],F[R].push(S))}function Be(R,S,F){if(F&&F[R]){let W=F[R].indexOf(S);W!==-1&&F[R].splice(W,1)}}class Pe{constructor(S,F={}){L(this,F),this.type=S}}class me extends Pe{constructor(S,F={}){super("error",L({error:S},F))}}class De{on(S,F){return this._listeners=this._listeners||{},Ae(S,F,this._listeners),this}off(S,F){return Be(S,F,this._listeners),Be(S,F,this._oneTimeListeners),this}once(S,F){return F?(this._oneTimeListeners=this._oneTimeListeners||{},Ae(S,F,this._oneTimeListeners),this):new Promise(W=>this.once(S,W))}fire(S,F){typeof S=="string"&&(S=new Pe(S,F||{}));let W=S.type;if(this.listens(W)){S.target=this;let te=this._listeners&&this._listeners[W]?this._listeners[W].slice():[];for(let Fe of te)Fe.call(this,S);let fe=this._oneTimeListeners&&this._oneTimeListeners[W]?this._oneTimeListeners[W].slice():[];for(let Fe of fe)Be(W,Fe,this._oneTimeListeners),Fe.call(this,S);let pe=this._eventedParent;pe&&(L(S,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),pe.fire(S))}else S instanceof me&&console.error(S.error);return this}listens(S){return this._listeners&&this._listeners[S]&&this._listeners[S].length>0||this._oneTimeListeners&&this._oneTimeListeners[S]&&this._oneTimeListeners[S].length>0||this._eventedParent&&this._eventedParent.listens(S)}setEventedParent(S,F){return this._eventedParent=S,this._eventedParentData=F,this}}var ce={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"enum",default:"mercator",values:{mercator:{},globe:{}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};let je=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function lt(R,S){let F={};for(let W in R)W!=="ref"&&(F[W]=R[W]);return je.forEach(W=>{W in S&&(F[W]=S[W])}),F}function pt(R,S){if(Array.isArray(R)){if(!Array.isArray(S)||R.length!==S.length)return!1;for(let F=0;F`:R.itemType.kind==="value"?"array":`array<${S}>`}return R.kind}let We=[Gt,_t,It,mt,er,ti,lr,Ge(wr),Br,Vr,dt];function tt(R,S){if(S.kind==="error")return null;if(R.kind==="array"){if(S.kind==="array"&&(S.N===0&&S.itemType.kind==="value"||!tt(R.itemType,S.itemType))&&(typeof R.N!="number"||R.N===S.N))return null}else{if(R.kind===S.kind)return null;if(R.kind==="value"){for(let F of We)if(!tt(F,S))return null}}return`Expected ${Je(R)} but found ${Je(S)} instead.`}function xt(R,S){return S.some(F=>F.kind===R.kind)}function Ie(R,S){return S.some(F=>F==="null"?R===null:F==="array"?Array.isArray(R):F==="object"?R&&!Array.isArray(R)&&typeof R=="object":F===typeof R)}function xe(R,S){return R.kind==="array"&&S.kind==="array"?R.itemType.kind===S.itemType.kind&&typeof R.N=="number":R.kind===S.kind}let ke=.96422,vt=.82521,ir=4/29,ar=6/29,vr=3*ar*ar,ii=ar*ar*ar,pi=Math.PI/180,$r=180/Math.PI;function di(R){return(R%=360)<0&&(R+=360),R}function ji([R,S,F,W]){let te,fe,pe=wi((.2225045*(R=In(R))+.7168786*(S=In(S))+.0606169*(F=In(F)))/1);R===S&&S===F?te=fe=pe:(te=wi((.4360747*R+.3850649*S+.1430804*F)/ke),fe=wi((.0139322*R+.0971045*S+.7141733*F)/vt));let Fe=116*pe-16;return[Fe<0?0:Fe,500*(te-pe),200*(pe-fe),W]}function In(R){return R<=.04045?R/12.92:Math.pow((R+.055)/1.055,2.4)}function wi(R){return R>ii?Math.pow(R,1/3):R/vr+ir}function On([R,S,F,W]){let te=(R+16)/116,fe=isNaN(S)?te:te+S/500,pe=isNaN(F)?te:te-F/200;return te=1*Fn(te),fe=ke*Fn(fe),pe=vt*Fn(pe),[qn(3.1338561*fe-1.6168667*te-.4906146*pe),qn(-.9787684*fe+1.9161415*te+.033454*pe),qn(.0719453*fe-.2289914*te+1.4052427*pe),W]}function qn(R){return(R=R<=.00304?12.92*R:1.055*Math.pow(R,1/2.4)-.055)<0?0:R>1?1:R}function Fn(R){return R>ar?R*R*R:vr*(R-ir)}function ra(R){return parseInt(R.padEnd(2,R),16)/255}function la(R,S){return Ut(S?R/100:R,0,1)}function Ut(R,S,F){return Math.min(Math.max(S,R),F)}function wt(R){return!R.some(Number.isNaN)}let rr={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]};class nr{constructor(S,F,W,te=1,fe=!0){this.r=S,this.g=F,this.b=W,this.a=te,fe||(this.r*=te,this.g*=te,this.b*=te,te||this.overwriteGetter("rgb",[S,F,W,te]))}static parse(S){if(S instanceof nr)return S;if(typeof S!="string")return;let F=function(W){if((W=W.toLowerCase().trim())==="transparent")return[0,0,0,0];let te=rr[W];if(te){let[pe,Fe,Ke]=te;return[pe/255,Fe/255,Ke/255,1]}if(W.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(W)){let pe=W.length<6?1:2,Fe=1;return[ra(W.slice(Fe,Fe+=pe)),ra(W.slice(Fe,Fe+=pe)),ra(W.slice(Fe,Fe+=pe)),ra(W.slice(Fe,Fe+pe)||"ff")]}if(W.startsWith("rgb")){let pe=W.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(pe){let[Fe,Ke,ct,Lt,Jt,cr,mr,Pr,zr,ui,yi,vn]=pe,zi=[Lt||" ",mr||" ",ui].join("");if(zi===" "||zi===" /"||zi===",,"||zi===",,,"){let un=[ct,cr,zr].join(""),Tn=un==="%%%"?100:un===""?255:0;if(Tn){let pa=[Ut(+Ke/Tn,0,1),Ut(+Jt/Tn,0,1),Ut(+Pr/Tn,0,1),yi?la(+yi,vn):1];if(wt(pa))return pa}}return}}let fe=W.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(fe){let[pe,Fe,Ke,ct,Lt,Jt,cr,mr,Pr]=fe,zr=[Ke||" ",Lt||" ",cr].join("");if(zr===" "||zr===" /"||zr===",,"||zr===",,,"){let ui=[+Fe,Ut(+ct,0,100),Ut(+Jt,0,100),mr?la(+mr,Pr):1];if(wt(ui))return function([yi,vn,zi,un]){function Tn(pa){let ro=(pa+yi/30)%12,Vo=vn*Math.min(zi,1-zi);return zi-Vo*Math.max(-1,Math.min(ro-3,9-ro,1))}return yi=di(yi),vn/=100,zi/=100,[Tn(0),Tn(8),Tn(4),un]}(ui)}}}(S);return F?new nr(...F,!1):void 0}get rgb(){let{r:S,g:F,b:W,a:te}=this,fe=te||1/0;return this.overwriteGetter("rgb",[S/fe,F/fe,W/fe,te])}get hcl(){return this.overwriteGetter("hcl",function(S){let[F,W,te,fe]=ji(S),pe=Math.sqrt(W*W+te*te);return[Math.round(1e4*pe)?di(Math.atan2(te,W)*$r):NaN,pe,F,fe]}(this.rgb))}get lab(){return this.overwriteGetter("lab",ji(this.rgb))}overwriteGetter(S,F){return Object.defineProperty(this,S,{value:F}),F}toString(){let[S,F,W,te]=this.rgb;return`rgba(${[S,F,W].map(fe=>Math.round(255*fe)).join(",")},${te})`}}nr.black=new nr(0,0,0,1),nr.white=new nr(1,1,1,1),nr.transparent=new nr(0,0,0,0),nr.red=new nr(1,0,0,1);class Er{constructor(S,F,W){this.sensitivity=S?F?"variant":"case":F?"accent":"base",this.locale=W,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(S,F){return this.collator.compare(S,F)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Xr{constructor(S,F,W,te,fe){this.text=S,this.image=F,this.scale=W,this.fontStack=te,this.textColor=fe}}class ri{constructor(S){this.sections=S}static fromString(S){return new ri([new Xr(S,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(S=>S.text.length!==0||S.image&&S.image.name.length!==0)}static factory(S){return S instanceof ri?S:ri.fromString(S)}toString(){return this.sections.length===0?"":this.sections.map(S=>S.text).join("")}}class Qr{constructor(S){this.values=S.slice()}static parse(S){if(S instanceof Qr)return S;if(typeof S=="number")return new Qr([S,S,S,S]);if(Array.isArray(S)&&!(S.length<1||S.length>4)){for(let F of S)if(typeof F!="number")return;switch(S.length){case 1:S=[S[0],S[0],S[0],S[0]];break;case 2:S=[S[0],S[1],S[0],S[1]];break;case 3:S=[S[0],S[1],S[2],S[1]]}return new Qr(S)}}toString(){return JSON.stringify(this.values)}}let Oi=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class $i{constructor(S){this.values=S.slice()}static parse(S){if(S instanceof $i)return S;if(Array.isArray(S)&&!(S.length<1)&&S.length%2==0){for(let F=0;F=0&&R<=255&&typeof S=="number"&&S>=0&&S<=255&&typeof F=="number"&&F>=0&&F<=255?W===void 0||typeof W=="number"&&W>=0&&W<=1?null:`Invalid rgba value [${[R,S,F,W].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof W=="number"?[R,S,F,W]:[R,S,F]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function yn(R){if(R===null||typeof R=="string"||typeof R=="boolean"||typeof R=="number"||R instanceof nr||R instanceof Er||R instanceof ri||R instanceof Qr||R instanceof $i||R instanceof tn)return!0;if(Array.isArray(R)){for(let S of R)if(!yn(S))return!1;return!0}if(typeof R=="object"){for(let S in R)if(!yn(R[S]))return!1;return!0}return!1}function Sn(R){if(R===null)return Gt;if(typeof R=="string")return It;if(typeof R=="boolean")return mt;if(typeof R=="number")return _t;if(R instanceof nr)return er;if(R instanceof Er)return Lr;if(R instanceof ri)return ti;if(R instanceof Qr)return Br;if(R instanceof $i)return dt;if(R instanceof tn)return Vr;if(Array.isArray(R)){let S=R.length,F;for(let W of R){let te=Sn(W);if(F){if(F===te)continue;F=wr;break}F=te}return Ge(F||wr,S)}return lr}function Ba(R){let S=typeof R;return R===null?"":S==="string"||S==="number"||S==="boolean"?String(R):R instanceof nr||R instanceof ri||R instanceof Qr||R instanceof $i||R instanceof tn?R.toString():JSON.stringify(R)}class ua{constructor(S,F){this.type=S,this.value=F}static parse(S,F){if(S.length!==2)return F.error(`'literal' expression requires exactly one argument, but found ${S.length-1} instead.`);if(!yn(S[1]))return F.error("invalid value");let W=S[1],te=Sn(W),fe=F.expectedType;return te.kind!=="array"||te.N!==0||!fe||fe.kind!=="array"||typeof fe.N=="number"&&fe.N!==0||(te=fe),new ua(te,W)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class ma{constructor(S){this.name="ExpressionEvaluationError",this.message=S}toJSON(){return this.message}}let Wa={string:It,number:_t,boolean:mt,object:lr};class Fa{constructor(S,F){this.type=S,this.args=F}static parse(S,F){if(S.length<2)return F.error("Expected at least one argument.");let W,te=1,fe=S[0];if(fe==="array"){let Fe,Ke;if(S.length>2){let ct=S[1];if(typeof ct!="string"||!(ct in Wa)||ct==="object")return F.error('The item type argument of "array" must be one of string, number, boolean',1);Fe=Wa[ct],te++}else Fe=wr;if(S.length>3){if(S[2]!==null&&(typeof S[2]!="number"||S[2]<0||S[2]!==Math.floor(S[2])))return F.error('The length argument to "array" must be a positive integer literal',2);Ke=S[2],te++}W=Ge(Fe,Ke)}else{if(!Wa[fe])throw new Error(`Types doesn't contain name = ${fe}`);W=Wa[fe]}let pe=[];for(;teS.outputDefined())}}let Xo={"to-boolean":mt,"to-color":er,"to-number":_t,"to-string":It};class da{constructor(S,F){this.type=S,this.args=F}static parse(S,F){if(S.length<2)return F.error("Expected at least one argument.");let W=S[0];if(!Xo[W])throw new Error(`Can't parse ${W} as it is not part of the known types`);if((W==="to-boolean"||W==="to-string")&&S.length!==2)return F.error("Expected one argument.");let te=Xo[W],fe=[];for(let pe=1;pe4?`Invalid rbga value ${JSON.stringify(F)}: expected an array containing either three or four numeric values.`:fn(F[0],F[1],F[2],F[3]),!W))return new nr(F[0]/255,F[1]/255,F[2]/255,F[3])}throw new ma(W||`Could not parse color from value '${typeof F=="string"?F:JSON.stringify(F)}'`)}case"padding":{let F;for(let W of this.args){F=W.evaluate(S);let te=Qr.parse(F);if(te)return te}throw new ma(`Could not parse padding from value '${typeof F=="string"?F:JSON.stringify(F)}'`)}case"variableAnchorOffsetCollection":{let F;for(let W of this.args){F=W.evaluate(S);let te=$i.parse(F);if(te)return te}throw new ma(`Could not parse variableAnchorOffsetCollection from value '${typeof F=="string"?F:JSON.stringify(F)}'`)}case"number":{let F=null;for(let W of this.args){if(F=W.evaluate(S),F===null)return 0;let te=Number(F);if(!isNaN(te))return te}throw new ma(`Could not convert ${JSON.stringify(F)} to number.`)}case"formatted":return ri.fromString(Ba(this.args[0].evaluate(S)));case"resolvedImage":return tn.fromString(Ba(this.args[0].evaluate(S)));default:return Ba(this.args[0].evaluate(S))}}eachChild(S){this.args.forEach(S)}outputDefined(){return this.args.every(S=>S.outputDefined())}}let Wn=["Unknown","Point","LineString","Polygon"];class Ha{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?Wn[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(S){let F=this._parseColorCache[S];return F||(F=this._parseColorCache[S]=nr.parse(S)),F}}class vo{constructor(S,F,W=[],te,fe=new Qt,pe=[]){this.registry=S,this.path=W,this.key=W.map(Fe=>`[${Fe}]`).join(""),this.scope=fe,this.errors=pe,this.expectedType=te,this._isConstant=F}parse(S,F,W,te,fe={}){return F?this.concat(F,W,te)._parse(S,fe):this._parse(S,fe)}_parse(S,F){function W(te,fe,pe){return pe==="assert"?new Fa(fe,[te]):pe==="coerce"?new da(fe,[te]):te}if(S!==null&&typeof S!="string"&&typeof S!="boolean"&&typeof S!="number"||(S=["literal",S]),Array.isArray(S)){if(S.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let te=S[0];if(typeof te!="string")return this.error(`Expression name must be a string, but found ${typeof te} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let fe=this.registry[te];if(fe){let pe=fe.parse(S,this);if(!pe)return null;if(this.expectedType){let Fe=this.expectedType,Ke=pe.type;if(Fe.kind!=="string"&&Fe.kind!=="number"&&Fe.kind!=="boolean"&&Fe.kind!=="object"&&Fe.kind!=="array"||Ke.kind!=="value")if(Fe.kind!=="color"&&Fe.kind!=="formatted"&&Fe.kind!=="resolvedImage"||Ke.kind!=="value"&&Ke.kind!=="string")if(Fe.kind!=="padding"||Ke.kind!=="value"&&Ke.kind!=="number"&&Ke.kind!=="array")if(Fe.kind!=="variableAnchorOffsetCollection"||Ke.kind!=="value"&&Ke.kind!=="array"){if(this.checkSubtype(Fe,Ke))return null}else pe=W(pe,Fe,F.typeAnnotation||"coerce");else pe=W(pe,Fe,F.typeAnnotation||"coerce");else pe=W(pe,Fe,F.typeAnnotation||"coerce");else pe=W(pe,Fe,F.typeAnnotation||"assert")}if(!(pe instanceof ua)&&pe.type.kind!=="resolvedImage"&&this._isConstant(pe)){let Fe=new Ha;try{pe=new ua(pe.type,pe.evaluate(Fe))}catch(Ke){return this.error(Ke.message),null}}return pe}return this.error(`Unknown expression "${te}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(S===void 0?"'undefined' value invalid. Use null instead.":typeof S=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof S} instead.`)}concat(S,F,W){let te=typeof S=="number"?this.path.concat(S):this.path,fe=W?this.scope.concat(W):this.scope;return new vo(this.registry,this._isConstant,te,F||null,fe,this.errors)}error(S,...F){let W=`${this.key}${F.map(te=>`[${te}]`).join("")}`;this.errors.push(new St(W,S))}checkSubtype(S,F){let W=tt(S,F);return W&&this.error(W),W}}class jn{constructor(S,F){this.type=F.type,this.bindings=[].concat(S),this.result=F}evaluate(S){return this.result.evaluate(S)}eachChild(S){for(let F of this.bindings)S(F[1]);S(this.result)}static parse(S,F){if(S.length<4)return F.error(`Expected at least 3 arguments, but found ${S.length-1} instead.`);let W=[];for(let fe=1;fe=W.length)throw new ma(`Array index out of bounds: ${F} > ${W.length-1}.`);if(F!==Math.floor(F))throw new ma(`Array index must be an integer, but found ${F} instead.`);return W[F]}eachChild(S){S(this.index),S(this.input)}outputDefined(){return!1}}class Jr{constructor(S,F){this.type=mt,this.needle=S,this.haystack=F}static parse(S,F){if(S.length!==3)return F.error(`Expected 2 arguments, but found ${S.length-1} instead.`);let W=F.parse(S[1],1,wr),te=F.parse(S[2],2,wr);return W&&te?xt(W.type,[mt,It,_t,Gt,wr])?new Jr(W,te):F.error(`Expected first argument to be of type boolean, string, number or null, but found ${Je(W.type)} instead`):null}evaluate(S){let F=this.needle.evaluate(S),W=this.haystack.evaluate(S);if(!W)return!1;if(!Ie(F,["boolean","string","number","null"]))throw new ma(`Expected first argument to be of type boolean, string, number or null, but found ${Je(Sn(F))} instead.`);if(!Ie(W,["string","array"]))throw new ma(`Expected second argument to be of type array or string, but found ${Je(Sn(W))} instead.`);return W.indexOf(F)>=0}eachChild(S){S(this.needle),S(this.haystack)}outputDefined(){return!0}}class vi{constructor(S,F,W){this.type=_t,this.needle=S,this.haystack=F,this.fromIndex=W}static parse(S,F){if(S.length<=2||S.length>=5)return F.error(`Expected 3 or 4 arguments, but found ${S.length-1} instead.`);let W=F.parse(S[1],1,wr),te=F.parse(S[2],2,wr);if(!W||!te)return null;if(!xt(W.type,[mt,It,_t,Gt,wr]))return F.error(`Expected first argument to be of type boolean, string, number or null, but found ${Je(W.type)} instead`);if(S.length===4){let fe=F.parse(S[3],3,_t);return fe?new vi(W,te,fe):null}return new vi(W,te)}evaluate(S){let F=this.needle.evaluate(S),W=this.haystack.evaluate(S);if(!Ie(F,["boolean","string","number","null"]))throw new ma(`Expected first argument to be of type boolean, string, number or null, but found ${Je(Sn(F))} instead.`);let te;if(this.fromIndex&&(te=this.fromIndex.evaluate(S)),Ie(W,["string"])){let fe=W.indexOf(F,te);return fe===-1?-1:[...W.slice(0,fe)].length}if(Ie(W,["array"]))return W.indexOf(F,te);throw new ma(`Expected second argument to be of type array or string, but found ${Je(Sn(W))} instead.`)}eachChild(S){S(this.needle),S(this.haystack),this.fromIndex&&S(this.fromIndex)}outputDefined(){return!1}}class hn{constructor(S,F,W,te,fe,pe){this.inputType=S,this.type=F,this.input=W,this.cases=te,this.outputs=fe,this.otherwise=pe}static parse(S,F){if(S.length<5)return F.error(`Expected at least 4 arguments, but found only ${S.length-1}.`);if(S.length%2!=1)return F.error("Expected an even number of arguments.");let W,te;F.expectedType&&F.expectedType.kind!=="value"&&(te=F.expectedType);let fe={},pe=[];for(let ct=2;ctNumber.MAX_SAFE_INTEGER)return cr.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof Pr=="number"&&Math.floor(Pr)!==Pr)return cr.error("Numeric branch labels must be integer values.");if(W){if(cr.checkSubtype(W,Sn(Pr)))return null}else W=Sn(Pr);if(fe[String(Pr)]!==void 0)return cr.error("Branch labels must be unique.");fe[String(Pr)]=pe.length}let mr=F.parse(Jt,ct,te);if(!mr)return null;te=te||mr.type,pe.push(mr)}let Fe=F.parse(S[1],1,wr);if(!Fe)return null;let Ke=F.parse(S[S.length-1],S.length-1,te);return Ke?Fe.type.kind!=="value"&&F.concat(1).checkSubtype(W,Fe.type)?null:new hn(W,te,Fe,fe,pe,Ke):null}evaluate(S){let F=this.input.evaluate(S);return(Sn(F)===this.inputType&&this.outputs[this.cases[F]]||this.otherwise).evaluate(S)}eachChild(S){S(this.input),this.outputs.forEach(S),S(this.otherwise)}outputDefined(){return this.outputs.every(S=>S.outputDefined())&&this.otherwise.outputDefined()}}class An{constructor(S,F,W){this.type=S,this.branches=F,this.otherwise=W}static parse(S,F){if(S.length<4)return F.error(`Expected at least 3 arguments, but found only ${S.length-1}.`);if(S.length%2!=0)return F.error("Expected an odd number of arguments.");let W;F.expectedType&&F.expectedType.kind!=="value"&&(W=F.expectedType);let te=[];for(let pe=1;peF.outputDefined())&&this.otherwise.outputDefined()}}class Mn{constructor(S,F,W,te){this.type=S,this.input=F,this.beginIndex=W,this.endIndex=te}static parse(S,F){if(S.length<=2||S.length>=5)return F.error(`Expected 3 or 4 arguments, but found ${S.length-1} instead.`);let W=F.parse(S[1],1,wr),te=F.parse(S[2],2,_t);if(!W||!te)return null;if(!xt(W.type,[Ge(wr),It,wr]))return F.error(`Expected first argument to be of type array or string, but found ${Je(W.type)} instead`);if(S.length===4){let fe=F.parse(S[3],3,_t);return fe?new Mn(W.type,W,te,fe):null}return new Mn(W.type,W,te)}evaluate(S){let F=this.input.evaluate(S),W=this.beginIndex.evaluate(S),te;if(this.endIndex&&(te=this.endIndex.evaluate(S)),Ie(F,["string"]))return[...F].slice(W,te).join("");if(Ie(F,["array"]))return F.slice(W,te);throw new ma(`Expected first argument to be of type array or string, but found ${Je(Sn(F))} instead.`)}eachChild(S){S(this.input),S(this.beginIndex),this.endIndex&&S(this.endIndex)}outputDefined(){return!1}}function Li(R,S){let F=R.length-1,W,te,fe=0,pe=F,Fe=0;for(;fe<=pe;)if(Fe=Math.floor((fe+pe)/2),W=R[Fe],te=R[Fe+1],W<=S){if(Fe===F||SS))throw new ma("Input is not a number.");pe=Fe-1}return 0}class _n{constructor(S,F,W){this.type=S,this.input=F,this.labels=[],this.outputs=[];for(let[te,fe]of W)this.labels.push(te),this.outputs.push(fe)}static parse(S,F){if(S.length-1<4)return F.error(`Expected at least 4 arguments, but found only ${S.length-1}.`);if((S.length-1)%2!=0)return F.error("Expected an even number of arguments.");let W=F.parse(S[1],1,_t);if(!W)return null;let te=[],fe=null;F.expectedType&&F.expectedType.kind!=="value"&&(fe=F.expectedType);for(let pe=1;pe=Fe)return F.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',ct);let Jt=F.parse(Ke,Lt,fe);if(!Jt)return null;fe=fe||Jt.type,te.push([Fe,Jt])}return new _n(fe,W,te)}evaluate(S){let F=this.labels,W=this.outputs;if(F.length===1)return W[0].evaluate(S);let te=this.input.evaluate(S);if(te<=F[0])return W[0].evaluate(S);let fe=F.length;return te>=F[fe-1]?W[fe-1].evaluate(S):W[Li(F,te)].evaluate(S)}eachChild(S){S(this.input);for(let F of this.outputs)S(F)}outputDefined(){return this.outputs.every(S=>S.outputDefined())}}function ya(R){return R&&R.__esModule&&Object.prototype.hasOwnProperty.call(R,"default")?R.default:R}var $n=Ma;function Ma(R,S,F,W){this.cx=3*R,this.bx=3*(F-R)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*S,this.by=3*(W-S)-this.cy,this.ay=1-this.cy-this.by,this.p1x=R,this.p1y=S,this.p2x=F,this.p2y=W}Ma.prototype={sampleCurveX:function(R){return((this.ax*R+this.bx)*R+this.cx)*R},sampleCurveY:function(R){return((this.ay*R+this.by)*R+this.cy)*R},sampleCurveDerivativeX:function(R){return(3*this.ax*R+2*this.bx)*R+this.cx},solveCurveX:function(R,S){if(S===void 0&&(S=1e-6),R<0)return 0;if(R>1)return 1;for(var F=R,W=0;W<8;W++){var te=this.sampleCurveX(F)-R;if(Math.abs(te)te?pe=F:Fe=F,F=.5*(Fe-pe)+pe;return F},solve:function(R,S){return this.sampleCurveY(this.solveCurveX(R,S))}};var _o=ya($n);function No(R,S,F){return R+F*(S-R)}function po(R,S,F){return R.map((W,te)=>No(W,S[te],F))}let Lo={number:No,color:function(R,S,F,W="rgb"){switch(W){case"rgb":{let[te,fe,pe,Fe]=po(R.rgb,S.rgb,F);return new nr(te,fe,pe,Fe,!1)}case"hcl":{let[te,fe,pe,Fe]=R.hcl,[Ke,ct,Lt,Jt]=S.hcl,cr,mr;if(isNaN(te)||isNaN(Ke))isNaN(te)?isNaN(Ke)?cr=NaN:(cr=Ke,pe!==1&&pe!==0||(mr=ct)):(cr=te,Lt!==1&&Lt!==0||(mr=fe));else{let vn=Ke-te;Ke>te&&vn>180?vn-=360:Ke180&&(vn+=360),cr=te+F*vn}let[Pr,zr,ui,yi]=function([vn,zi,un,Tn]){return vn=isNaN(vn)?0:vn*pi,On([un,Math.cos(vn)*zi,Math.sin(vn)*zi,Tn])}([cr,mr!=null?mr:No(fe,ct,F),No(pe,Lt,F),No(Fe,Jt,F)]);return new nr(Pr,zr,ui,yi,!1)}case"lab":{let[te,fe,pe,Fe]=On(po(R.lab,S.lab,F));return new nr(te,fe,pe,Fe,!1)}}},array:po,padding:function(R,S,F){return new Qr(po(R.values,S.values,F))},variableAnchorOffsetCollection:function(R,S,F){let W=R.values,te=S.values;if(W.length!==te.length)throw new ma(`Cannot interpolate values of different length. from: ${R.toString()}, to: ${S.toString()}`);let fe=[];for(let pe=0;petypeof Lt!="number"||Lt<0||Lt>1))return F.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);te={name:"cubic-bezier",controlPoints:ct}}}if(S.length-1<4)return F.error(`Expected at least 4 arguments, but found only ${S.length-1}.`);if((S.length-1)%2!=0)return F.error("Expected an even number of arguments.");if(fe=F.parse(fe,2,_t),!fe)return null;let Fe=[],Ke=null;W==="interpolate-hcl"||W==="interpolate-lab"?Ke=er:F.expectedType&&F.expectedType.kind!=="value"&&(Ke=F.expectedType);for(let ct=0;ct=Lt)return F.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',cr);let Pr=F.parse(Jt,mr,Ke);if(!Pr)return null;Ke=Ke||Pr.type,Fe.push([Lt,Pr])}return xe(Ke,_t)||xe(Ke,er)||xe(Ke,Br)||xe(Ke,dt)||xe(Ke,Ge(_t))?new ko(Ke,W,te,fe,Fe):F.error(`Type ${Je(Ke)} is not interpolatable.`)}evaluate(S){let F=this.labels,W=this.outputs;if(F.length===1)return W[0].evaluate(S);let te=this.input.evaluate(S);if(te<=F[0])return W[0].evaluate(S);let fe=F.length;if(te>=F[fe-1])return W[fe-1].evaluate(S);let pe=Li(F,te),Fe=ko.interpolationFactor(this.interpolation,te,F[pe],F[pe+1]),Ke=W[pe].evaluate(S),ct=W[pe+1].evaluate(S);switch(this.operator){case"interpolate":return Lo[this.type.kind](Ke,ct,Fe);case"interpolate-hcl":return Lo.color(Ke,ct,Fe,"hcl");case"interpolate-lab":return Lo.color(Ke,ct,Fe,"lab")}}eachChild(S){S(this.input);for(let F of this.outputs)S(F)}outputDefined(){return this.outputs.every(S=>S.outputDefined())}}function Ds(R,S,F,W){let te=W-F,fe=R-F;return te===0?0:S===1?fe/te:(Math.pow(S,fe)-1)/(Math.pow(S,te)-1)}class Fs{constructor(S,F){this.type=S,this.args=F}static parse(S,F){if(S.length<2)return F.error("Expectected at least one argument.");let W=null,te=F.expectedType;te&&te.kind!=="value"&&(W=te);let fe=[];for(let Fe of S.slice(1)){let Ke=F.parse(Fe,1+fe.length,W,void 0,{typeAnnotation:"omit"});if(!Ke)return null;W=W||Ke.type,fe.push(Ke)}if(!W)throw new Error("No output type");let pe=te&&fe.some(Fe=>tt(te,Fe.type));return new Fs(pe?wr:W,fe)}evaluate(S){let F,W=null,te=0;for(let fe of this.args)if(te++,W=fe.evaluate(S),W&&W instanceof tn&&!W.available&&(F||(F=W.name),W=null,te===this.args.length&&(W=F)),W!==null)break;return W}eachChild(S){this.args.forEach(S)}outputDefined(){return this.args.every(S=>S.outputDefined())}}function ll(R,S){return R==="=="||R==="!="?S.kind==="boolean"||S.kind==="string"||S.kind==="number"||S.kind==="null"||S.kind==="value":S.kind==="string"||S.kind==="number"||S.kind==="value"}function ul(R,S,F,W){return W.compare(S,F)===0}function zl(R,S,F){let W=R!=="=="&&R!=="!=";return class hje{constructor(fe,pe,Fe){this.type=mt,this.lhs=fe,this.rhs=pe,this.collator=Fe,this.hasUntypedArgument=fe.type.kind==="value"||pe.type.kind==="value"}static parse(fe,pe){if(fe.length!==3&&fe.length!==4)return pe.error("Expected two or three arguments.");let Fe=fe[0],Ke=pe.parse(fe[1],1,wr);if(!Ke)return null;if(!ll(Fe,Ke.type))return pe.concat(1).error(`"${Fe}" comparisons are not supported for type '${Je(Ke.type)}'.`);let ct=pe.parse(fe[2],2,wr);if(!ct)return null;if(!ll(Fe,ct.type))return pe.concat(2).error(`"${Fe}" comparisons are not supported for type '${Je(ct.type)}'.`);if(Ke.type.kind!==ct.type.kind&&Ke.type.kind!=="value"&&ct.type.kind!=="value")return pe.error(`Cannot compare types '${Je(Ke.type)}' and '${Je(ct.type)}'.`);W&&(Ke.type.kind==="value"&&ct.type.kind!=="value"?Ke=new Fa(ct.type,[Ke]):Ke.type.kind!=="value"&&ct.type.kind==="value"&&(ct=new Fa(Ke.type,[ct])));let Lt=null;if(fe.length===4){if(Ke.type.kind!=="string"&&ct.type.kind!=="string"&&Ke.type.kind!=="value"&&ct.type.kind!=="value")return pe.error("Cannot use collator to compare non-string types.");if(Lt=pe.parse(fe[3],3,Lr),!Lt)return null}return new hje(Ke,ct,Lt)}evaluate(fe){let pe=this.lhs.evaluate(fe),Fe=this.rhs.evaluate(fe);if(W&&this.hasUntypedArgument){let Ke=Sn(pe),ct=Sn(Fe);if(Ke.kind!==ct.kind||Ke.kind!=="string"&&Ke.kind!=="number")throw new ma(`Expected arguments for "${R}" to be (string, string) or (number, number), but found (${Ke.kind}, ${ct.kind}) instead.`)}if(this.collator&&!W&&this.hasUntypedArgument){let Ke=Sn(pe),ct=Sn(Fe);if(Ke.kind!=="string"||ct.kind!=="string")return S(fe,pe,Fe)}return this.collator?F(fe,pe,Fe,this.collator.evaluate(fe)):S(fe,pe,Fe)}eachChild(fe){fe(this.lhs),fe(this.rhs),this.collator&&fe(this.collator)}outputDefined(){return!0}}}let us=zl("==",function(R,S,F){return S===F},ul),il=zl("!=",function(R,S,F){return S!==F},function(R,S,F,W){return!ul(0,S,F,W)}),As=zl("<",function(R,S,F){return S",function(R,S,F){return S>F},function(R,S,F,W){return W.compare(S,F)>0}),Ks=zl("<=",function(R,S,F){return S<=F},function(R,S,F,W){return W.compare(S,F)<=0}),zs=zl(">=",function(R,S,F){return S>=F},function(R,S,F,W){return W.compare(S,F)>=0});class Io{constructor(S,F,W){this.type=Lr,this.locale=W,this.caseSensitive=S,this.diacriticSensitive=F}static parse(S,F){if(S.length!==2)return F.error("Expected one argument.");let W=S[1];if(typeof W!="object"||Array.isArray(W))return F.error("Collator options argument must be an object.");let te=F.parse(W["case-sensitive"]!==void 0&&W["case-sensitive"],1,mt);if(!te)return null;let fe=F.parse(W["diacritic-sensitive"]!==void 0&&W["diacritic-sensitive"],1,mt);if(!fe)return null;let pe=null;return W.locale&&(pe=F.parse(W.locale,1,It),!pe)?null:new Io(te,fe,pe)}evaluate(S){return new Er(this.caseSensitive.evaluate(S),this.diacriticSensitive.evaluate(S),this.locale?this.locale.evaluate(S):null)}eachChild(S){S(this.caseSensitive),S(this.diacriticSensitive),this.locale&&S(this.locale)}outputDefined(){return!1}}class ls{constructor(S,F,W,te,fe){this.type=It,this.number=S,this.locale=F,this.currency=W,this.minFractionDigits=te,this.maxFractionDigits=fe}static parse(S,F){if(S.length!==3)return F.error("Expected two arguments.");let W=F.parse(S[1],1,_t);if(!W)return null;let te=S[2];if(typeof te!="object"||Array.isArray(te))return F.error("NumberFormat options argument must be an object.");let fe=null;if(te.locale&&(fe=F.parse(te.locale,1,It),!fe))return null;let pe=null;if(te.currency&&(pe=F.parse(te.currency,1,It),!pe))return null;let Fe=null;if(te["min-fraction-digits"]&&(Fe=F.parse(te["min-fraction-digits"],1,_t),!Fe))return null;let Ke=null;return te["max-fraction-digits"]&&(Ke=F.parse(te["max-fraction-digits"],1,_t),!Ke)?null:new ls(W,fe,pe,Fe,Ke)}evaluate(S){return new Intl.NumberFormat(this.locale?this.locale.evaluate(S):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(S):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(S):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(S):void 0}).format(this.number.evaluate(S))}eachChild(S){S(this.number),this.locale&&S(this.locale),this.currency&&S(this.currency),this.minFractionDigits&&S(this.minFractionDigits),this.maxFractionDigits&&S(this.maxFractionDigits)}outputDefined(){return!1}}class Yl{constructor(S){this.type=ti,this.sections=S}static parse(S,F){if(S.length<2)return F.error("Expected at least one argument.");let W=S[1];if(!Array.isArray(W)&&typeof W=="object")return F.error("First argument must be an image or text section.");let te=[],fe=!1;for(let pe=1;pe<=S.length-1;++pe){let Fe=S[pe];if(fe&&typeof Fe=="object"&&!Array.isArray(Fe)){fe=!1;let Ke=null;if(Fe["font-scale"]&&(Ke=F.parse(Fe["font-scale"],1,_t),!Ke))return null;let ct=null;if(Fe["text-font"]&&(ct=F.parse(Fe["text-font"],1,Ge(It)),!ct))return null;let Lt=null;if(Fe["text-color"]&&(Lt=F.parse(Fe["text-color"],1,er),!Lt))return null;let Jt=te[te.length-1];Jt.scale=Ke,Jt.font=ct,Jt.textColor=Lt}else{let Ke=F.parse(S[pe],1,wr);if(!Ke)return null;let ct=Ke.type.kind;if(ct!=="string"&&ct!=="value"&&ct!=="null"&&ct!=="resolvedImage")return F.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");fe=!0,te.push({content:Ke,scale:null,font:null,textColor:null})}}return new Yl(te)}evaluate(S){return new ri(this.sections.map(F=>{let W=F.content.evaluate(S);return Sn(W)===Vr?new Xr("",W,null,null,null):new Xr(Ba(W),null,F.scale?F.scale.evaluate(S):null,F.font?F.font.evaluate(S).join(","):null,F.textColor?F.textColor.evaluate(S):null)}))}eachChild(S){for(let F of this.sections)S(F.content),F.scale&&S(F.scale),F.font&&S(F.font),F.textColor&&S(F.textColor)}outputDefined(){return!1}}class Su{constructor(S){this.type=Vr,this.input=S}static parse(S,F){if(S.length!==2)return F.error("Expected two arguments.");let W=F.parse(S[1],1,It);return W?new Su(W):F.error("No image name provided.")}evaluate(S){let F=this.input.evaluate(S),W=tn.fromString(F);return W&&S.availableImages&&(W.available=S.availableImages.indexOf(F)>-1),W}eachChild(S){S(this.input)}outputDefined(){return!1}}class nc{constructor(S){this.type=_t,this.input=S}static parse(S,F){if(S.length!==2)return F.error(`Expected 1 argument, but found ${S.length-1} instead.`);let W=F.parse(S[1],1);return W?W.type.kind!=="array"&&W.type.kind!=="string"&&W.type.kind!=="value"?F.error(`Expected argument of type string or array, but found ${Je(W.type)} instead.`):new nc(W):null}evaluate(S){let F=this.input.evaluate(S);if(typeof F=="string")return[...F].length;if(Array.isArray(F))return F.length;throw new ma(`Expected value to be of type string or array, but found ${Je(Sn(F))} instead.`)}eachChild(S){S(this.input)}outputDefined(){return!1}}let bs=8192;function Rn(R,S){let F=(180+R[0])/360,W=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R[1]*Math.PI/360)))/360,te=Math.pow(2,S.z);return[Math.round(F*te*bs),Math.round(W*te*bs)]}function _a(R,S){let F=Math.pow(2,S.z);return[(te=(R[0]/bs+S.x)/F,360*te-180),(W=(R[1]/bs+S.y)/F,360/Math.PI*Math.atan(Math.exp((180-360*W)*Math.PI/180))-90)];var W,te}function Vu(R,S){R[0]=Math.min(R[0],S[0]),R[1]=Math.min(R[1],S[1]),R[2]=Math.max(R[2],S[0]),R[3]=Math.max(R[3],S[1])}function Ol(R,S){return!(R[0]<=S[0]||R[2]>=S[2]||R[1]<=S[1]||R[3]>=S[3])}function xo(R,S,F){let W=R[0]-S[0],te=R[1]-S[1],fe=R[0]-F[0],pe=R[1]-F[1];return W*pe-fe*te==0&&W*fe<=0&&te*pe<=0}function Kl(R,S,F,W){return(te=[W[0]-F[0],W[1]-F[1]])[0]*(fe=[S[0]-R[0],S[1]-R[1]])[1]-te[1]*fe[0]!=0&&!(!qo(R,S,F,W)||!qo(F,W,R,S));var te,fe}function Ns(R,S,F){for(let W of F)for(let te=0;te(te=R)[1]!=(pe=Fe[Ke+1])[1]>te[1]&&te[0]<(pe[0]-fe[0])*(te[1]-fe[1])/(pe[1]-fe[1])+fe[0]&&(W=!W)}var te,fe,pe;return W}function ac(R,S){for(let F of S)if(Hl(R,F))return!0;return!1}function aa(R,S){for(let F of R)if(!Hl(F,S))return!1;for(let F=0;F0&&Fe<0||pe<0&&Fe>0}function ql(R,S,F){let W=[];for(let te=0;teF[2]){let te=.5*W,fe=R[0]-F[0]>te?-W:F[0]-R[0]>te?W:0;fe===0&&(fe=R[0]-F[2]>te?-W:F[2]-R[0]>te?W:0),R[0]+=fe}Vu(S,R)}function rf(R,S,F,W){let te=Math.pow(2,W.z)*bs,fe=[W.x*bs,W.y*bs],pe=[];for(let Fe of R)for(let Ke of Fe){let ct=[Ke.x+fe[0],Ke.y+fe[1]];Do(ct,S,F,te),pe.push(ct)}return pe}function Vf(R,S,F,W){let te=Math.pow(2,W.z)*bs,fe=[W.x*bs,W.y*bs],pe=[];for(let Ke of R){let ct=[];for(let Lt of Ke){let Jt=[Lt.x+fe[0],Lt.y+fe[1]];Vu(S,Jt),ct.push(Jt)}pe.push(ct)}if(S[2]-S[0]<=te/2){(Fe=S)[0]=Fe[1]=1/0,Fe[2]=Fe[3]=-1/0;for(let Ke of pe)for(let ct of Ke)Do(ct,S,F,te)}var Fe;return pe}class pl{constructor(S,F){this.type=mt,this.geojson=S,this.geometries=F}static parse(S,F){if(S.length!==2)return F.error(`'within' expression requires exactly one argument, but found ${S.length-1} instead.`);if(yn(S[1])){let W=S[1];if(W.type==="FeatureCollection"){let te=[];for(let fe of W.features){let{type:pe,coordinates:Fe}=fe.geometry;pe==="Polygon"&&te.push(Fe),pe==="MultiPolygon"&&te.push(...Fe)}if(te.length)return new pl(W,{type:"MultiPolygon",coordinates:te})}else if(W.type==="Feature"){let te=W.geometry.type;if(te==="Polygon"||te==="MultiPolygon")return new pl(W,W.geometry)}else if(W.type==="Polygon"||W.type==="MultiPolygon")return new pl(W,W)}return F.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(S){if(S.geometry()!=null&&S.canonicalID()!=null){if(S.geometryType()==="Point")return function(F,W){let te=[1/0,1/0,-1/0,-1/0],fe=[1/0,1/0,-1/0,-1/0],pe=F.canonicalID();if(W.type==="Polygon"){let Fe=ql(W.coordinates,fe,pe),Ke=rf(F.geometry(),te,fe,pe);if(!Ol(te,fe))return!1;for(let ct of Ke)if(!Hl(ct,Fe))return!1}if(W.type==="MultiPolygon"){let Fe=Pc(W.coordinates,fe,pe),Ke=rf(F.geometry(),te,fe,pe);if(!Ol(te,fe))return!1;for(let ct of Ke)if(!ac(ct,Fe))return!1}return!0}(S,this.geometries);if(S.geometryType()==="LineString")return function(F,W){let te=[1/0,1/0,-1/0,-1/0],fe=[1/0,1/0,-1/0,-1/0],pe=F.canonicalID();if(W.type==="Polygon"){let Fe=ql(W.coordinates,fe,pe),Ke=Vf(F.geometry(),te,fe,pe);if(!Ol(te,fe))return!1;for(let ct of Ke)if(!aa(ct,Fe))return!1}if(W.type==="MultiPolygon"){let Fe=Pc(W.coordinates,fe,pe),Ke=Vf(F.geometry(),te,fe,pe);if(!Ol(te,fe))return!1;for(let ct of Ke)if(!Oo(ct,Fe))return!1}return!0}(S,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Zc=class{constructor(R=[],S=(F,W)=>FW?1:0){if(this.data=R,this.length=this.data.length,this.compare=S,this.length>0)for(let F=(this.length>>1)-1;F>=0;F--)this._down(F)}push(R){this.data.push(R),this._up(this.length++)}pop(){if(this.length===0)return;let R=this.data[0],S=this.data.pop();return--this.length>0&&(this.data[0]=S,this._down(0)),R}peek(){return this.data[0]}_up(R){let{data:S,compare:F}=this,W=S[R];for(;R>0;){let te=R-1>>1,fe=S[te];if(F(W,fe)>=0)break;S[R]=fe,R=te}S[R]=W}_down(R){let{data:S,compare:F}=this,W=this.length>>1,te=S[R];for(;R=0)break;S[R]=S[fe],R=fe}S[R]=te}};function Jl(R,S,F,W,te){Os(R,S,F,W||R.length-1,te||oc)}function Os(R,S,F,W,te){for(;W>F;){if(W-F>600){var fe=W-F+1,pe=S-F+1,Fe=Math.log(fe),Ke=.5*Math.exp(2*Fe/3),ct=.5*Math.sqrt(Fe*Ke*(fe-Ke)/fe)*(pe-fe/2<0?-1:1);Os(R,S,Math.max(F,Math.floor(S-pe*Ke/fe+ct)),Math.min(W,Math.floor(S+(fe-pe)*Ke/fe+ct)),te)}var Lt=R[S],Jt=F,cr=W;for(yu(R,F,S),te(R[W],Lt)>0&&yu(R,F,W);Jt0;)cr--}te(R[F],Lt)===0?yu(R,F,cr):yu(R,++cr,W),cr<=S&&(F=cr+1),S<=cr&&(W=cr-1)}}function yu(R,S,F){var W=R[S];R[S]=R[F],R[F]=W}function oc(R,S){return RS?1:0}function Cf(R,S){if(R.length<=1)return[R];let F=[],W,te;for(let fe of R){let pe=jh(fe);pe!==0&&(fe.area=Math.abs(pe),te===void 0&&(te=pe<0),te===pe<0?(W&&F.push(W),W=[fe]):W.push(fe))}if(W&&F.push(W),S>1)for(let fe=0;fe1?(ct=S[Ke+1][0],Lt=S[Ke+1][1]):mr>0&&(ct+=Jt/this.kx*mr,Lt+=cr/this.ky*mr)),Jt=this.wrap(F[0]-ct)*this.kx,cr=(F[1]-Lt)*this.ky;let Pr=Jt*Jt+cr*cr;Pr180;)S-=360;return S}}function $l(R,S){return S[0]-R[0]}function fl(R){return R[1]-R[0]+1}function lc(R,S){return R[1]>=R[0]&&R[1]R[1])return[null,null];let F=fl(R);if(S){if(F===2)return[R,null];let te=Math.floor(F/2);return[[R[0],R[0]+te],[R[0]+te,R[1]]]}if(F===1)return[R,null];let W=Math.floor(F/2)-1;return[[R[0],R[0]+W],[R[0]+W+1,R[1]]]}function Es(R,S){if(!lc(S,R.length))return[1/0,1/0,-1/0,-1/0];let F=[1/0,1/0,-1/0,-1/0];for(let W=S[0];W<=S[1];++W)Vu(F,R[W]);return F}function Hs(R){let S=[1/0,1/0,-1/0,-1/0];for(let F of R)for(let W of F)Vu(S,W);return S}function Go(R){return R[0]!==-1/0&&R[1]!==-1/0&&R[2]!==1/0&&R[3]!==1/0}function ps(R,S,F){if(!Go(R)||!Go(S))return NaN;let W=0,te=0;return R[2]S[2]&&(W=R[0]-S[2]),R[1]>S[3]&&(te=R[1]-S[3]),R[3]=W)return W;if(Ol(te,fe)){if(sd(R,S))return 0}else if(sd(S,R))return 0;let pe=1/0;for(let Fe of R)for(let Ke=0,ct=Fe.length,Lt=ct-1;Ke0;){let Ke=pe.pop();if(Ke[0]>=fe)continue;let ct=Ke[1],Lt=S?50:100;if(fl(ct)<=Lt){if(!lc(ct,R.length))return NaN;if(S){let Jt=Po(R,ct,F,W);if(isNaN(Jt)||Jt===0)return Jt;fe=Math.min(fe,Jt)}else for(let Jt=ct[0];Jt<=ct[1];++Jt){let cr=od(R[Jt],F,W);if(fe=Math.min(fe,cr),fe===0)return 0}}else{let Jt=Fu(ct,S);Pa(pe,fe,W,R,Fe,Jt[0]),Pa(pe,fe,W,R,Fe,Jt[1])}}return fe}function bl(R,S,F,W,te,fe=1/0){let pe=Math.min(fe,te.distance(R[0],F[0]));if(pe===0)return pe;let Fe=new Zc([[0,[0,R.length-1],[0,F.length-1]]],$l);for(;Fe.length>0;){let Ke=Fe.pop();if(Ke[0]>=pe)continue;let ct=Ke[1],Lt=Ke[2],Jt=S?50:100,cr=W?50:100;if(fl(ct)<=Jt&&fl(Lt)<=cr){if(!lc(ct,R.length)&&lc(Lt,F.length))return NaN;let mr;if(S&&W)mr=Gu(R,ct,F,Lt,te),pe=Math.min(pe,mr);else if(S&&!W){let Pr=R.slice(ct[0],ct[1]+1);for(let zr=Lt[0];zr<=Lt[1];++zr)if(mr=uc(F[zr],Pr,te),pe=Math.min(pe,mr),pe===0)return pe}else if(!S&&W){let Pr=F.slice(Lt[0],Lt[1]+1);for(let zr=ct[0];zr<=ct[1];++zr)if(mr=uc(R[zr],Pr,te),pe=Math.min(pe,mr),pe===0)return pe}else mr=qs(R,ct,F,Lt,te),pe=Math.min(pe,mr)}else{let mr=Fu(ct,S),Pr=Fu(Lt,W);af(Fe,pe,te,R,F,mr[0],Pr[0]),af(Fe,pe,te,R,F,mr[0],Pr[1]),af(Fe,pe,te,R,F,mr[1],Pr[0]),af(Fe,pe,te,R,F,mr[1],Pr[1])}}return pe}function Hf(R){return R.type==="MultiPolygon"?R.coordinates.map(S=>({type:"Polygon",coordinates:S})):R.type==="MultiLineString"?R.coordinates.map(S=>({type:"LineString",coordinates:S})):R.type==="MultiPoint"?R.coordinates.map(S=>({type:"Point",coordinates:S})):[R]}class Ic{constructor(S,F){this.type=_t,this.geojson=S,this.geometries=F}static parse(S,F){if(S.length!==2)return F.error(`'distance' expression requires exactly one argument, but found ${S.length-1} instead.`);if(yn(S[1])){let W=S[1];if(W.type==="FeatureCollection")return new Ic(W,W.features.map(te=>Hf(te.geometry)).flat());if(W.type==="Feature")return new Ic(W,Hf(W.geometry));if("type"in W&&"coordinates"in W)return new Ic(W,Hf(W))}return F.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(S){if(S.geometry()!=null&&S.canonicalID()!=null){if(S.geometryType()==="Point")return function(F,W){let te=F.geometry(),fe=te.flat().map(Ke=>_a([Ke.x,Ke.y],F.canonical));if(te.length===0)return NaN;let pe=new Gf(fe[0][1]),Fe=1/0;for(let Ke of W){switch(Ke.type){case"Point":Fe=Math.min(Fe,bl(fe,!1,[Ke.coordinates],!1,pe,Fe));break;case"LineString":Fe=Math.min(Fe,bl(fe,!1,Ke.coordinates,!0,pe,Fe));break;case"Polygon":Fe=Math.min(Fe,Hu(fe,!1,Ke.coordinates,pe,Fe))}if(Fe===0)return Fe}return Fe}(S,this.geometries);if(S.geometryType()==="LineString")return function(F,W){let te=F.geometry(),fe=te.flat().map(Ke=>_a([Ke.x,Ke.y],F.canonical));if(te.length===0)return NaN;let pe=new Gf(fe[0][1]),Fe=1/0;for(let Ke of W){switch(Ke.type){case"Point":Fe=Math.min(Fe,bl(fe,!0,[Ke.coordinates],!1,pe,Fe));break;case"LineString":Fe=Math.min(Fe,bl(fe,!0,Ke.coordinates,!0,pe,Fe));break;case"Polygon":Fe=Math.min(Fe,Hu(fe,!0,Ke.coordinates,pe,Fe))}if(Fe===0)return Fe}return Fe}(S,this.geometries);if(S.geometryType()==="Polygon")return function(F,W){let te=F.geometry();if(te.length===0||te[0].length===0)return NaN;let fe=Cf(te,0).map(Ke=>Ke.map(ct=>ct.map(Lt=>_a([Lt.x,Lt.y],F.canonical)))),pe=new Gf(fe[0][0][0][1]),Fe=1/0;for(let Ke of W)for(let ct of fe){switch(Ke.type){case"Point":Fe=Math.min(Fe,Hu([Ke.coordinates],!1,ct,pe,Fe));break;case"LineString":Fe=Math.min(Fe,Hu(Ke.coordinates,!0,ct,pe,Fe));break;case"Polygon":Fe=Math.min(Fe,Ko(ct,Ke.coordinates,pe,Fe))}if(Fe===0)return Fe}return Fe}(S,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}let yf={"==":us,"!=":il,">":cl,"<":As,">=":zs,"<=":Ks,array:Fa,at:kr,boolean:Fa,case:An,coalesce:Fs,collator:Io,format:Yl,image:Su,in:Jr,"index-of":vi,interpolate:ko,"interpolate-hcl":ko,"interpolate-lab":ko,length:nc,let:jn,literal:ua,match:hn,number:Fa,"number-format":ls,object:Fa,slice:Mn,step:_n,string:Fa,"to-boolean":da,"to-color":da,"to-number":da,"to-string":da,var:Mt,within:pl,distance:Ic};class Bl{constructor(S,F,W,te){this.name=S,this.type=F,this._evaluate=W,this.args=te}evaluate(S){return this._evaluate(S,this.args)}eachChild(S){this.args.forEach(S)}outputDefined(){return!1}static parse(S,F){let W=S[0],te=Bl.definitions[W];if(!te)return F.error(`Unknown expression "${W}". If you wanted a literal array, use ["literal", [...]].`,0);let fe=Array.isArray(te)?te[0]:te.type,pe=Array.isArray(te)?[[te[1],te[2]]]:te.overloads,Fe=pe.filter(([ct])=>!Array.isArray(ct)||ct.length===S.length-1),Ke=null;for(let[ct,Lt]of Fe){Ke=new vo(F.registry,eh,F.path,null,F.scope);let Jt=[],cr=!1;for(let mr=1;mr{return cr=Jt,Array.isArray(cr)?`(${cr.map(Je).join(", ")})`:`(${Je(cr.type)}...)`;var cr}).join(" | "),Lt=[];for(let Jt=1;Jt{F=S?F&&eh(W):F&&W instanceof ua}),!!F&&th(R)&&jf(R,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function th(R){if(R instanceof Bl&&(R.name==="get"&&R.args.length===1||R.name==="feature-state"||R.name==="has"&&R.args.length===1||R.name==="properties"||R.name==="geometry-type"||R.name==="id"||/^filter-/.test(R.name))||R instanceof pl||R instanceof Ic)return!1;let S=!0;return R.eachChild(F=>{S&&!th(F)&&(S=!1)}),S}function ju(R){if(R instanceof Bl&&R.name==="feature-state")return!1;let S=!0;return R.eachChild(F=>{S&&!ju(F)&&(S=!1)}),S}function jf(R,S){if(R instanceof Bl&&S.indexOf(R.name)>=0)return!1;let F=!0;return R.eachChild(W=>{F&&!jf(W,S)&&(F=!1)}),F}function cc(R){return{result:"success",value:R}}function of(R){return{result:"error",value:R}}function Nl(R){return R["property-type"]==="data-driven"||R["property-type"]==="cross-faded-data-driven"}function Kc(R){return!!R.expression&&R.expression.parameters.indexOf("zoom")>-1}function Rc(R){return!!R.expression&&R.expression.interpolated}function gs(R){return R instanceof Number?"number":R instanceof String?"string":R instanceof Boolean?"boolean":Array.isArray(R)?"array":R===null?"null":typeof R}function Wf(R){return typeof R=="object"&&R!==null&&!Array.isArray(R)}function Wh(R){return R}function rh(R,S){let F=S.type==="color",W=R.stops&&typeof R.stops[0][0]=="object",te=W||!(W||R.property!==void 0),fe=R.type||(Rc(S)?"exponential":"interval");if(F||S.type==="padding"){let Lt=F?nr.parse:Qr.parse;(R=$e({},R)).stops&&(R.stops=R.stops.map(Jt=>[Jt[0],Lt(Jt[1])])),R.default=Lt(R.default?R.default:S.default)}if(R.colorSpace&&(pe=R.colorSpace)!=="rgb"&&pe!=="hcl"&&pe!=="lab")throw new Error(`Unknown color space: "${R.colorSpace}"`);var pe;let Fe,Ke,ct;if(fe==="exponential")Fe=ih;else if(fe==="interval")Fe=Mu;else if(fe==="categorical"){Fe=Sh,Ke=Object.create(null);for(let Lt of R.stops)Ke[Lt[0]]=Lt[1];ct=typeof R.stops[0][0]}else{if(fe!=="identity")throw new Error(`Unknown function type "${fe}"`);Fe=js}if(W){let Lt={},Jt=[];for(let Pr=0;PrPr[0]),evaluate:({zoom:Pr},zr)=>ih({stops:cr,base:R.base},S,Pr).evaluate(Pr,zr)}}if(te){let Lt=fe==="exponential"?{name:"exponential",base:R.base!==void 0?R.base:1}:null;return{kind:"camera",interpolationType:Lt,interpolationFactor:ko.interpolationFactor.bind(void 0,Lt),zoomStops:R.stops.map(Jt=>Jt[0]),evaluate:({zoom:Jt})=>Fe(R,S,Jt,Ke,ct)}}return{kind:"source",evaluate(Lt,Jt){let cr=Jt&&Jt.properties?Jt.properties[R.property]:void 0;return cr===void 0?sf(R.default,S.default):Fe(R,S,cr,Ke,ct)}}}function sf(R,S,F){return R!==void 0?R:S!==void 0?S:F!==void 0?F:void 0}function Sh(R,S,F,W,te){return sf(typeof F===te?W[F]:void 0,R.default,S.default)}function Mu(R,S,F){if(gs(F)!=="number")return sf(R.default,S.default);let W=R.stops.length;if(W===1||F<=R.stops[0][0])return R.stops[0][1];if(F>=R.stops[W-1][0])return R.stops[W-1][1];let te=Li(R.stops.map(fe=>fe[0]),F);return R.stops[te][1]}function ih(R,S,F){let W=R.base!==void 0?R.base:1;if(gs(F)!=="number")return sf(R.default,S.default);let te=R.stops.length;if(te===1||F<=R.stops[0][0])return R.stops[0][1];if(F>=R.stops[te-1][0])return R.stops[te-1][1];let fe=Li(R.stops.map(Lt=>Lt[0]),F),pe=function(Lt,Jt,cr,mr){let Pr=mr-cr,zr=Lt-cr;return Pr===0?0:Jt===1?zr/Pr:(Math.pow(Jt,zr)-1)/(Math.pow(Jt,Pr)-1)}(F,W,R.stops[fe][0],R.stops[fe+1][0]),Fe=R.stops[fe][1],Ke=R.stops[fe+1][1],ct=Lo[S.type]||Wh;return typeof Fe.evaluate=="function"?{evaluate(...Lt){let Jt=Fe.evaluate.apply(void 0,Lt),cr=Ke.evaluate.apply(void 0,Lt);if(Jt!==void 0&&cr!==void 0)return ct(Jt,cr,pe,R.colorSpace)}}:ct(Fe,Ke,pe,R.colorSpace)}function js(R,S,F){switch(S.type){case"color":F=nr.parse(F);break;case"formatted":F=ri.fromString(F.toString());break;case"resolvedImage":F=tn.fromString(F.toString());break;case"padding":F=Qr.parse(F);break;default:gs(F)===S.type||S.type==="enum"&&S.values[F]||(F=void 0)}return sf(F,R.default,S.default)}Bl.register(yf,{error:[{kind:"error"},[It],(R,[S])=>{throw new ma(S.evaluate(R))}],typeof:[It,[wr],(R,[S])=>Je(Sn(S.evaluate(R)))],"to-rgba":[Ge(_t,4),[er],(R,[S])=>{let[F,W,te,fe]=S.evaluate(R).rgb;return[255*F,255*W,255*te,fe]}],rgb:[er,[_t,_t,_t],Ah],rgba:[er,[_t,_t,_t,_t],Ah],has:{type:mt,overloads:[[[It],(R,[S])=>Qf(S.evaluate(R),R.properties())],[[It,lr],(R,[S,F])=>Qf(S.evaluate(R),F.evaluate(R))]]},get:{type:wr,overloads:[[[It],(R,[S])=>_f(S.evaluate(R),R.properties())],[[It,lr],(R,[S,F])=>_f(S.evaluate(R),F.evaluate(R))]]},"feature-state":[wr,[It],(R,[S])=>_f(S.evaluate(R),R.featureState||{})],properties:[lr,[],R=>R.properties()],"geometry-type":[It,[],R=>R.geometryType()],id:[wr,[],R=>R.id()],zoom:[_t,[],R=>R.globals.zoom],"heatmap-density":[_t,[],R=>R.globals.heatmapDensity||0],"line-progress":[_t,[],R=>R.globals.lineProgress||0],accumulated:[wr,[],R=>R.globals.accumulated===void 0?null:R.globals.accumulated],"+":[_t,Yc(_t),(R,S)=>{let F=0;for(let W of S)F+=W.evaluate(R);return F}],"*":[_t,Yc(_t),(R,S)=>{let F=1;for(let W of S)F*=W.evaluate(R);return F}],"-":{type:_t,overloads:[[[_t,_t],(R,[S,F])=>S.evaluate(R)-F.evaluate(R)],[[_t],(R,[S])=>-S.evaluate(R)]]},"/":[_t,[_t,_t],(R,[S,F])=>S.evaluate(R)/F.evaluate(R)],"%":[_t,[_t,_t],(R,[S,F])=>S.evaluate(R)%F.evaluate(R)],ln2:[_t,[],()=>Math.LN2],pi:[_t,[],()=>Math.PI],e:[_t,[],()=>Math.E],"^":[_t,[_t,_t],(R,[S,F])=>Math.pow(S.evaluate(R),F.evaluate(R))],sqrt:[_t,[_t],(R,[S])=>Math.sqrt(S.evaluate(R))],log10:[_t,[_t],(R,[S])=>Math.log(S.evaluate(R))/Math.LN10],ln:[_t,[_t],(R,[S])=>Math.log(S.evaluate(R))],log2:[_t,[_t],(R,[S])=>Math.log(S.evaluate(R))/Math.LN2],sin:[_t,[_t],(R,[S])=>Math.sin(S.evaluate(R))],cos:[_t,[_t],(R,[S])=>Math.cos(S.evaluate(R))],tan:[_t,[_t],(R,[S])=>Math.tan(S.evaluate(R))],asin:[_t,[_t],(R,[S])=>Math.asin(S.evaluate(R))],acos:[_t,[_t],(R,[S])=>Math.acos(S.evaluate(R))],atan:[_t,[_t],(R,[S])=>Math.atan(S.evaluate(R))],min:[_t,Yc(_t),(R,S)=>Math.min(...S.map(F=>F.evaluate(R)))],max:[_t,Yc(_t),(R,S)=>Math.max(...S.map(F=>F.evaluate(R)))],abs:[_t,[_t],(R,[S])=>Math.abs(S.evaluate(R))],round:[_t,[_t],(R,[S])=>{let F=S.evaluate(R);return F<0?-Math.round(-F):Math.round(F)}],floor:[_t,[_t],(R,[S])=>Math.floor(S.evaluate(R))],ceil:[_t,[_t],(R,[S])=>Math.ceil(S.evaluate(R))],"filter-==":[mt,[It,wr],(R,[S,F])=>R.properties()[S.value]===F.value],"filter-id-==":[mt,[wr],(R,[S])=>R.id()===S.value],"filter-type-==":[mt,[It],(R,[S])=>R.geometryType()===S.value],"filter-<":[mt,[It,wr],(R,[S,F])=>{let W=R.properties()[S.value],te=F.value;return typeof W==typeof te&&W{let F=R.id(),W=S.value;return typeof F==typeof W&&F":[mt,[It,wr],(R,[S,F])=>{let W=R.properties()[S.value],te=F.value;return typeof W==typeof te&&W>te}],"filter-id->":[mt,[wr],(R,[S])=>{let F=R.id(),W=S.value;return typeof F==typeof W&&F>W}],"filter-<=":[mt,[It,wr],(R,[S,F])=>{let W=R.properties()[S.value],te=F.value;return typeof W==typeof te&&W<=te}],"filter-id-<=":[mt,[wr],(R,[S])=>{let F=R.id(),W=S.value;return typeof F==typeof W&&F<=W}],"filter->=":[mt,[It,wr],(R,[S,F])=>{let W=R.properties()[S.value],te=F.value;return typeof W==typeof te&&W>=te}],"filter-id->=":[mt,[wr],(R,[S])=>{let F=R.id(),W=S.value;return typeof F==typeof W&&F>=W}],"filter-has":[mt,[wr],(R,[S])=>S.value in R.properties()],"filter-has-id":[mt,[],R=>R.id()!==null&&R.id()!==void 0],"filter-type-in":[mt,[Ge(It)],(R,[S])=>S.value.indexOf(R.geometryType())>=0],"filter-id-in":[mt,[Ge(wr)],(R,[S])=>S.value.indexOf(R.id())>=0],"filter-in-small":[mt,[It,Ge(wr)],(R,[S,F])=>F.value.indexOf(R.properties()[S.value])>=0],"filter-in-large":[mt,[It,Ge(wr)],(R,[S,F])=>function(W,te,fe,pe){for(;fe<=pe;){let Fe=fe+pe>>1;if(te[Fe]===W)return!0;te[Fe]>W?pe=Fe-1:fe=Fe+1}return!1}(R.properties()[S.value],F.value,0,F.value.length-1)],all:{type:mt,overloads:[[[mt,mt],(R,[S,F])=>S.evaluate(R)&&F.evaluate(R)],[Yc(mt),(R,S)=>{for(let F of S)if(!F.evaluate(R))return!1;return!0}]]},any:{type:mt,overloads:[[[mt,mt],(R,[S,F])=>S.evaluate(R)||F.evaluate(R)],[Yc(mt),(R,S)=>{for(let F of S)if(F.evaluate(R))return!0;return!1}]]},"!":[mt,[mt],(R,[S])=>!S.evaluate(R)],"is-supported-script":[mt,[It],(R,[S])=>{let F=R.globals&&R.globals.isSupportedScript;return!F||F(S.evaluate(R))}],upcase:[It,[It],(R,[S])=>S.evaluate(R).toUpperCase()],downcase:[It,[It],(R,[S])=>S.evaluate(R).toLowerCase()],concat:[It,Yc(wr),(R,S)=>S.map(F=>Ba(F.evaluate(R))).join("")],"resolved-locale":[It,[Lr],(R,[S])=>S.evaluate(R).resolvedLocale()]});class Eu{constructor(S,F){var W;this.expression=S,this._warningHistory={},this._evaluator=new Ha,this._defaultValue=F?(W=F).type==="color"&&Wf(W.default)?new nr(0,0,0,0):W.type==="color"?nr.parse(W.default)||null:W.type==="padding"?Qr.parse(W.default)||null:W.type==="variableAnchorOffsetCollection"?$i.parse(W.default)||null:W.default===void 0?null:W.default:null,this._enumValues=F&&F.type==="enum"?F.values:null}evaluateWithoutErrorHandling(S,F,W,te,fe,pe){return this._evaluator.globals=S,this._evaluator.feature=F,this._evaluator.featureState=W,this._evaluator.canonical=te,this._evaluator.availableImages=fe||null,this._evaluator.formattedSection=pe,this.expression.evaluate(this._evaluator)}evaluate(S,F,W,te,fe,pe){this._evaluator.globals=S,this._evaluator.feature=F||null,this._evaluator.featureState=W||null,this._evaluator.canonical=te,this._evaluator.availableImages=fe||null,this._evaluator.formattedSection=pe||null;try{let Fe=this.expression.evaluate(this._evaluator);if(Fe==null||typeof Fe=="number"&&Fe!=Fe)return this._defaultValue;if(this._enumValues&&!(Fe in this._enumValues))throw new ma(`Expected value to be one of ${Object.keys(this._enumValues).map(Ke=>JSON.stringify(Ke)).join(", ")}, but found ${JSON.stringify(Fe)} instead.`);return Fe}catch(Fe){return this._warningHistory[Fe.message]||(this._warningHistory[Fe.message]=!0,typeof console!="undefined"&&console.warn(Fe.message)),this._defaultValue}}}function Dc(R){return Array.isArray(R)&&R.length>0&&typeof R[0]=="string"&&R[0]in yf}function ks(R,S){let F=new vo(yf,eh,[],S?function(te){let fe={color:er,string:It,number:_t,enum:It,boolean:mt,formatted:ti,padding:Br,resolvedImage:Vr,variableAnchorOffsetCollection:dt};return te.type==="array"?Ge(fe[te.value]||wr,te.length):fe[te.type]}(S):void 0),W=F.parse(R,void 0,void 0,void 0,S&&S.type==="string"?{typeAnnotation:"coerce"}:void 0);return W?cc(new Eu(W,S)):of(F.errors)}class bc{constructor(S,F){this.kind=S,this._styleExpression=F,this.isStateDependent=S!=="constant"&&!ju(F.expression)}evaluateWithoutErrorHandling(S,F,W,te,fe,pe){return this._styleExpression.evaluateWithoutErrorHandling(S,F,W,te,fe,pe)}evaluate(S,F,W,te,fe,pe){return this._styleExpression.evaluate(S,F,W,te,fe,pe)}}class hu{constructor(S,F,W,te){this.kind=S,this.zoomStops=W,this._styleExpression=F,this.isStateDependent=S!=="camera"&&!ju(F.expression),this.interpolationType=te}evaluateWithoutErrorHandling(S,F,W,te,fe,pe){return this._styleExpression.evaluateWithoutErrorHandling(S,F,W,te,fe,pe)}evaluate(S,F,W,te,fe,pe){return this._styleExpression.evaluate(S,F,W,te,fe,pe)}interpolationFactor(S,F,W){return this.interpolationType?ko.interpolationFactor(this.interpolationType,S,F,W):0}}function _u(R,S){let F=ks(R,S);if(F.result==="error")return F;let W=F.value.expression,te=th(W);if(!te&&!Nl(S))return of([new St("","data expressions not supported")]);let fe=jf(W,["zoom"]);if(!fe&&!Kc(S))return of([new St("","zoom expressions not supported")]);let pe=nh(W);return pe||fe?pe instanceof St?of([pe]):pe instanceof ko&&!Rc(S)?of([new St("",'"interpolate" expressions cannot be used with this property')]):cc(pe?new hu(te?"camera":"composite",F.value,pe.labels,pe instanceof ko?pe.interpolation:void 0):new bc(te?"constant":"source",F.value)):of([new St("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class nl{constructor(S,F){this._parameters=S,this._specification=F,$e(this,rh(this._parameters,this._specification))}static deserialize(S){return new nl(S._parameters,S._specification)}static serialize(S){return{_parameters:S._parameters,_specification:S._specification}}}function nh(R){let S=null;if(R instanceof jn)S=nh(R.result);else if(R instanceof Fs){for(let F of R.args)if(S=nh(F),S)break}else(R instanceof _n||R instanceof ko)&&R.input instanceof Bl&&R.input.name==="zoom"&&(S=R);return S instanceof St||R.eachChild(F=>{let W=nh(F);W instanceof St?S=W:!S&&W?S=new St("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):S&&W&&S!==W&&(S=new St("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),S}function Mh(R){if(R===!0||R===!1)return!0;if(!Array.isArray(R)||R.length===0)return!1;switch(R[0]){case"has":return R.length>=2&&R[1]!=="$id"&&R[1]!=="$type";case"in":return R.length>=3&&(typeof R[1]!="string"||Array.isArray(R[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return R.length!==3||Array.isArray(R[1])||Array.isArray(R[2]);case"any":case"all":for(let S of R.slice(1))if(!Mh(S)&&typeof S!="boolean")return!1;return!0;default:return!0}}let zu={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Fc(R){if(R==null)return{filter:()=>!0,needGeometry:!1};Mh(R)||(R=xf(R));let S=ks(R,zu);if(S.result==="error")throw new Error(S.value.map(F=>`${F.key}: ${F.message}`).join(", "));return{filter:(F,W,te)=>S.value.evaluate(F,W,{},te),needGeometry:bd(R)}}function wc(R,S){return RS?1:0}function bd(R){if(!Array.isArray(R))return!1;if(R[0]==="within"||R[0]==="distance")return!0;for(let S=1;S"||S==="<="||S===">="?Pf(R[1],R[2],S):S==="any"?(F=R.slice(1),["any"].concat(F.map(xf))):S==="all"?["all"].concat(R.slice(1).map(xf)):S==="none"?["all"].concat(R.slice(1).map(xf).map(jl)):S==="in"?Ou(R[1],R.slice(2)):S==="!in"?jl(Ou(R[1],R.slice(2))):S==="has"?bf(R[1]):S!=="!has"||jl(bf(R[1]));var F}function Pf(R,S,F){switch(R){case"$type":return[`filter-type-${F}`,S];case"$id":return[`filter-id-${F}`,S];default:return[`filter-${F}`,R,S]}}function Ou(R,S){if(S.length===0)return!1;switch(R){case"$type":return["filter-type-in",["literal",S]];case"$id":return["filter-id-in",["literal",S]];default:return S.length>200&&!S.some(F=>typeof F!=typeof S[0])?["filter-in-large",R,["literal",S.sort(wc)]]:["filter-in-small",R,["literal",S]]}}function bf(R){switch(R){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",R]}}function jl(R){return["!",R]}function lf(R){let S=typeof R;if(S==="number"||S==="boolean"||S==="string"||R==null)return JSON.stringify(R);if(Array.isArray(R)){let te="[";for(let fe of R)te+=`${lf(fe)},`;return`${te}]`}let F=Object.keys(R).sort(),W="{";for(let te=0;teW.maximum?[new fr(S,F,`${F} is greater than the maximum value ${W.maximum}`)]:[]}function wf(R){let S=R.valueSpec,F=Cs(R.value.type),W,te,fe,pe={},Fe=F!=="categorical"&&R.value.property===void 0,Ke=!Fe,ct=gs(R.value.stops)==="array"&&gs(R.value.stops[0])==="array"&&gs(R.value.stops[0][0])==="object",Lt=ku({key:R.key,value:R.value,valueSpec:R.styleSpec.function,validateSpec:R.validateSpec,style:R.style,styleSpec:R.styleSpec,objectElementValidators:{stops:function(mr){if(F==="identity")return[new fr(mr.key,mr.value,'identity function may not have a "stops" property')];let Pr=[],zr=mr.value;return Pr=Pr.concat(Xf({key:mr.key,value:zr,valueSpec:mr.valueSpec,validateSpec:mr.validateSpec,style:mr.style,styleSpec:mr.styleSpec,arrayElementValidator:Jt})),gs(zr)==="array"&&zr.length===0&&Pr.push(new fr(mr.key,zr,"array must have at least one stop")),Pr},default:function(mr){return mr.validateSpec({key:mr.key,value:mr.value,valueSpec:S,validateSpec:mr.validateSpec,style:mr.style,styleSpec:mr.styleSpec})}}});return F==="identity"&&Fe&&Lt.push(new fr(R.key,R.value,'missing required property "property"')),F==="identity"||R.value.stops||Lt.push(new fr(R.key,R.value,'missing required property "stops"')),F==="exponential"&&R.valueSpec.expression&&!Rc(R.valueSpec)&&Lt.push(new fr(R.key,R.value,"exponential functions not supported")),R.styleSpec.$version>=8&&(Ke&&!Nl(R.valueSpec)?Lt.push(new fr(R.key,R.value,"property functions not supported")):Fe&&!Kc(R.valueSpec)&&Lt.push(new fr(R.key,R.value,"zoom functions not supported"))),F!=="categorical"&&!ct||R.value.property!==void 0||Lt.push(new fr(R.key,R.value,'"property" property is required')),Lt;function Jt(mr){let Pr=[],zr=mr.value,ui=mr.key;if(gs(zr)!=="array")return[new fr(ui,zr,`array expected, ${gs(zr)} found`)];if(zr.length!==2)return[new fr(ui,zr,`array length 2 expected, length ${zr.length} found`)];if(ct){if(gs(zr[0])!=="object")return[new fr(ui,zr,`object expected, ${gs(zr[0])} found`)];if(zr[0].zoom===void 0)return[new fr(ui,zr,"object stop key must have zoom")];if(zr[0].value===void 0)return[new fr(ui,zr,"object stop key must have value")];if(fe&&fe>Cs(zr[0].zoom))return[new fr(ui,zr[0].zoom,"stop zoom values must appear in ascending order")];Cs(zr[0].zoom)!==fe&&(fe=Cs(zr[0].zoom),te=void 0,pe={}),Pr=Pr.concat(ku({key:`${ui}[0]`,value:zr[0],valueSpec:{zoom:{}},validateSpec:mr.validateSpec,style:mr.style,styleSpec:mr.styleSpec,objectElementValidators:{zoom:Us,value:cr}}))}else Pr=Pr.concat(cr({key:`${ui}[0]`,value:zr[0],valueSpec:{},validateSpec:mr.validateSpec,style:mr.style,styleSpec:mr.styleSpec},zr));return Dc(du(zr[1]))?Pr.concat([new fr(`${ui}[1]`,zr[1],"expressions are not allowed in function stops.")]):Pr.concat(mr.validateSpec({key:`${ui}[1]`,value:zr[1],valueSpec:S,validateSpec:mr.validateSpec,style:mr.style,styleSpec:mr.styleSpec}))}function cr(mr,Pr){let zr=gs(mr.value),ui=Cs(mr.value),yi=mr.value!==null?mr.value:Pr;if(W){if(zr!==W)return[new fr(mr.key,yi,`${zr} stop domain type must match previous stop domain type ${W}`)]}else W=zr;if(zr!=="number"&&zr!=="string"&&zr!=="boolean")return[new fr(mr.key,yi,"stop domain value must be a number, string, or boolean")];if(zr!=="number"&&F!=="categorical"){let vn=`number expected, ${zr} found`;return Nl(S)&&F===void 0&&(vn+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new fr(mr.key,yi,vn)]}return F!=="categorical"||zr!=="number"||isFinite(ui)&&Math.floor(ui)===ui?F!=="categorical"&&zr==="number"&&te!==void 0&&uinew fr(`${R.key}${W.key}`,R.value,W.message));let F=S.value.expression||S.value._styleExpression.expression;if(R.expressionContext==="property"&&R.propertyKey==="text-font"&&!F.outputDefined())return[new fr(R.key,R.value,`Invalid data expression for "${R.propertyKey}". Output values must be contained as literals within the expression.`)];if(R.expressionContext==="property"&&R.propertyType==="layout"&&!ju(F))return[new fr(R.key,R.value,'"feature-state" data expressions are not supported with layout properties.')];if(R.expressionContext==="filter"&&!ju(F))return[new fr(R.key,R.value,'"feature-state" data expressions are not supported with filters.')];if(R.expressionContext&&R.expressionContext.indexOf("cluster")===0){if(!jf(F,["zoom","feature-state"]))return[new fr(R.key,R.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(R.expressionContext==="cluster-initial"&&!th(F))return[new fr(R.key,R.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Wu(R){let S=R.key,F=R.value,W=R.valueSpec,te=[];return Array.isArray(W.values)?W.values.indexOf(Cs(F))===-1&&te.push(new fr(S,F,`expected one of [${W.values.join(", ")}], ${JSON.stringify(F)} found`)):Object.keys(W.values).indexOf(Cs(F))===-1&&te.push(new fr(S,F,`expected one of [${Object.keys(W.values).join(", ")}], ${JSON.stringify(F)} found`)),te}function Rf(R){return Mh(du(R.value))?zc($e({},R,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Xu(R)}function Xu(R){let S=R.value,F=R.key;if(gs(S)!=="array")return[new fr(F,S,`array expected, ${gs(S)} found`)];let W=R.styleSpec,te,fe=[];if(S.length<1)return[new fr(F,S,"filter array must have at least 1 element")];switch(fe=fe.concat(Wu({key:`${F}[0]`,value:S[0],valueSpec:W.filter_operator,style:R.style,styleSpec:R.styleSpec})),Cs(S[0])){case"<":case"<=":case">":case">=":S.length>=2&&Cs(S[1])==="$type"&&fe.push(new fr(F,S,`"$type" cannot be use with operator "${S[0]}"`));case"==":case"!=":S.length!==3&&fe.push(new fr(F,S,`filter array for operator "${S[0]}" must have 3 elements`));case"in":case"!in":S.length>=2&&(te=gs(S[1]),te!=="string"&&fe.push(new fr(`${F}[1]`,S[1],`string expected, ${te} found`)));for(let pe=2;pe{ct in F&&S.push(new fr(W,F[ct],`"${ct}" is prohibited for ref layers`))}),te.layers.forEach(ct=>{Cs(ct.id)===Fe&&(Ke=ct)}),Ke?Ke.ref?S.push(new fr(W,F.ref,"ref cannot reference another ref layer")):pe=Cs(Ke.type):S.push(new fr(W,F.ref,`ref layer "${Fe}" not found`))}else if(pe!=="background")if(F.source){let Ke=te.sources&&te.sources[F.source],ct=Ke&&Cs(Ke.type);Ke?ct==="vector"&&pe==="raster"?S.push(new fr(W,F.source,`layer "${F.id}" requires a raster source`)):ct!=="raster-dem"&&pe==="hillshade"?S.push(new fr(W,F.source,`layer "${F.id}" requires a raster-dem source`)):ct==="raster"&&pe!=="raster"?S.push(new fr(W,F.source,`layer "${F.id}" requires a vector source`)):ct!=="vector"||F["source-layer"]?ct==="raster-dem"&&pe!=="hillshade"?S.push(new fr(W,F.source,"raster-dem source can only be used with layer type 'hillshade'.")):pe!=="line"||!F.paint||!F.paint["line-gradient"]||ct==="geojson"&&Ke.lineMetrics||S.push(new fr(W,F,`layer "${F.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):S.push(new fr(W,F,`layer "${F.id}" must specify a "source-layer"`)):S.push(new fr(W,F.source,`source "${F.source}" not found`))}else S.push(new fr(W,F,'missing required property "source"'));return S=S.concat(ku({key:W,value:F,valueSpec:fe.layer,style:R.style,styleSpec:R.styleSpec,validateSpec:R.validateSpec,objectElementValidators:{"*":()=>[],type:()=>R.validateSpec({key:`${W}.type`,value:F.type,valueSpec:fe.layer.type,style:R.style,styleSpec:R.styleSpec,validateSpec:R.validateSpec,object:F,objectKey:"type"}),filter:Rf,layout:Ke=>ku({layer:F,key:Ke.key,value:Ke.value,style:Ke.style,styleSpec:Ke.styleSpec,validateSpec:Ke.validateSpec,objectElementValidators:{"*":ct=>Wl($e({layerType:pe},ct))}}),paint:Ke=>ku({layer:F,key:Ke.key,value:Ke.value,style:Ke.style,styleSpec:Ke.styleSpec,validateSpec:Ke.validateSpec,objectElementValidators:{"*":ct=>Zf($e({layerType:pe},ct))}})}})),S}function Zu(R){let S=R.value,F=R.key,W=gs(S);return W!=="string"?[new fr(F,S,`string expected, ${W} found`)]:[]}let Oc={promoteId:function({key:R,value:S}){if(gs(S)==="string")return Zu({key:R,value:S});{let F=[];for(let W in S)F.push(...Zu({key:`${R}.${W}`,value:S[W]}));return F}}};function Tc(R){let S=R.value,F=R.key,W=R.styleSpec,te=R.style,fe=R.validateSpec;if(!S.type)return[new fr(F,S,'"type" is required')];let pe=Cs(S.type),Fe;switch(pe){case"vector":case"raster":return Fe=ku({key:F,value:S,valueSpec:W[`source_${pe.replace("-","_")}`],style:R.style,styleSpec:W,objectElementValidators:Oc,validateSpec:fe}),Fe;case"raster-dem":return Fe=function(Ke){var ct;let Lt=(ct=Ke.sourceName)!==null&&ct!==void 0?ct:"",Jt=Ke.value,cr=Ke.styleSpec,mr=cr.source_raster_dem,Pr=Ke.style,zr=[],ui=gs(Jt);if(Jt===void 0)return zr;if(ui!=="object")return zr.push(new fr("source_raster_dem",Jt,`object expected, ${ui} found`)),zr;let yi=Cs(Jt.encoding)==="custom",vn=["redFactor","greenFactor","blueFactor","baseShift"],zi=Ke.value.encoding?`"${Ke.value.encoding}"`:"Default";for(let un in Jt)!yi&&vn.includes(un)?zr.push(new fr(un,Jt[un],`In "${Lt}": "${un}" is only valid when "encoding" is set to "custom". ${zi} encoding found`)):mr[un]?zr=zr.concat(Ke.validateSpec({key:un,value:Jt[un],valueSpec:mr[un],validateSpec:Ke.validateSpec,style:Pr,styleSpec:cr})):zr.push(new fr(un,Jt[un],`unknown property "${un}"`));return zr}({sourceName:F,value:S,style:R.style,styleSpec:W,validateSpec:fe}),Fe;case"geojson":if(Fe=ku({key:F,value:S,valueSpec:W.source_geojson,style:te,styleSpec:W,validateSpec:fe,objectElementValidators:Oc}),S.cluster)for(let Ke in S.clusterProperties){let[ct,Lt]=S.clusterProperties[Ke],Jt=typeof ct=="string"?[ct,["accumulated"],["get",Ke]]:ct;Fe.push(...zc({key:`${F}.${Ke}.map`,value:Lt,validateSpec:fe,expressionContext:"cluster-map"})),Fe.push(...zc({key:`${F}.${Ke}.reduce`,value:Jt,validateSpec:fe,expressionContext:"cluster-reduce"}))}return Fe;case"video":return ku({key:F,value:S,valueSpec:W.source_video,style:te,validateSpec:fe,styleSpec:W});case"image":return ku({key:F,value:S,valueSpec:W.source_image,style:te,validateSpec:fe,styleSpec:W});case"canvas":return[new fr(F,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Wu({key:`${F}.type`,value:S.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:te,validateSpec:fe,styleSpec:W})}}function wl(R){let S=R.value,F=R.styleSpec,W=F.light,te=R.style,fe=[],pe=gs(S);if(S===void 0)return fe;if(pe!=="object")return fe=fe.concat([new fr("light",S,`object expected, ${pe} found`)]),fe;for(let Fe in S){let Ke=Fe.match(/^(.*)-transition$/);fe=fe.concat(Ke&&W[Ke[1]]&&W[Ke[1]].transition?R.validateSpec({key:Fe,value:S[Fe],valueSpec:F.transition,validateSpec:R.validateSpec,style:te,styleSpec:F}):W[Fe]?R.validateSpec({key:Fe,value:S[Fe],valueSpec:W[Fe],validateSpec:R.validateSpec,style:te,styleSpec:F}):[new fr(Fe,S[Fe],`unknown property "${Fe}"`)])}return fe}function vu(R){let S=R.value,F=R.styleSpec,W=F.sky,te=R.style,fe=gs(S);if(S===void 0)return[];if(fe!=="object")return[new fr("sky",S,`object expected, ${fe} found`)];let pe=[];for(let Fe in S)pe=pe.concat(W[Fe]?R.validateSpec({key:Fe,value:S[Fe],valueSpec:W[Fe],style:te,styleSpec:F}):[new fr(Fe,S[Fe],`unknown property "${Fe}"`)]);return pe}function qc(R){let S=R.value,F=R.styleSpec,W=F.terrain,te=R.style,fe=[],pe=gs(S);if(S===void 0)return fe;if(pe!=="object")return fe=fe.concat([new fr("terrain",S,`object expected, ${pe} found`)]),fe;for(let Fe in S)fe=fe.concat(W[Fe]?R.validateSpec({key:Fe,value:S[Fe],valueSpec:W[Fe],validateSpec:R.validateSpec,style:te,styleSpec:F}):[new fr(Fe,S[Fe],`unknown property "${Fe}"`)]);return fe}function cf(R){let S=[],F=R.value,W=R.key;if(Array.isArray(F)){let te=[],fe=[];for(let pe in F)F[pe].id&&te.includes(F[pe].id)&&S.push(new fr(W,F,`all the sprites' ids must be unique, but ${F[pe].id} is duplicated`)),te.push(F[pe].id),F[pe].url&&fe.includes(F[pe].url)&&S.push(new fr(W,F,`all the sprites' URLs must be unique, but ${F[pe].url} is duplicated`)),fe.push(F[pe].url),S=S.concat(ku({key:`${W}[${pe}]`,value:F[pe],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:R.validateSpec}));return S}return Zu({key:W,value:F})}let fc={"*":()=>[],array:Xf,boolean:function(R){let S=R.value,F=R.key,W=gs(S);return W!=="boolean"?[new fr(F,S,`boolean expected, ${W} found`)]:[]},number:Us,color:function(R){let S=R.key,F=R.value,W=gs(F);return W!=="string"?[new fr(S,F,`color expected, ${W} found`)]:nr.parse(String(F))?[]:[new fr(S,F,`color expected, "${F}" found`)]},constants:If,enum:Wu,filter:Rf,function:wf,layer:ah,object:ku,source:Tc,light:wl,sky:vu,terrain:qc,projection:function(R){let S=R.value,F=R.styleSpec,W=F.projection,te=R.style,fe=gs(S);if(S===void 0)return[];if(fe!=="object")return[new fr("projection",S,`object expected, ${fe} found`)];let pe=[];for(let Fe in S)pe=pe.concat(W[Fe]?R.validateSpec({key:Fe,value:S[Fe],valueSpec:W[Fe],style:te,styleSpec:F}):[new fr(Fe,S[Fe],`unknown property "${Fe}"`)]);return pe},string:Zu,formatted:function(R){return Zu(R).length===0?[]:zc(R)},resolvedImage:function(R){return Zu(R).length===0?[]:zc(R)},padding:function(R){let S=R.key,F=R.value;if(gs(F)==="array"){if(F.length<1||F.length>4)return[new fr(S,F,`padding requires 1 to 4 values; ${F.length} values found`)];let W={type:"number"},te=[];for(let fe=0;fe[]}})),R.constants&&(F=F.concat(If({key:"constants",value:R.constants,style:R,styleSpec:S,validateSpec:Bc}))),Ar(F)}function Cr(R){return function(S){return R(j1(_g({},S),{validateSpec:Bc}))}}function Ar(R){return[].concat(R).sort((S,F)=>S.line-F.line)}function Kr(R){return function(...S){return Ar(R.apply(this,S))}}Xt.source=Kr(Cr(Tc)),Xt.sprite=Kr(Cr(cf)),Xt.glyphs=Kr(Cr(At)),Xt.light=Kr(Cr(wl)),Xt.sky=Kr(Cr(vu)),Xt.terrain=Kr(Cr(qc)),Xt.layer=Kr(Cr(ah)),Xt.filter=Kr(Cr(Rf)),Xt.paintProperty=Kr(Cr(Zf)),Xt.layoutProperty=Kr(Cr(Wl));let ki=Xt,Xi=ki.light,dn=ki.sky,wn=ki.paintProperty,Nn=ki.layoutProperty;function Yi(R,S){let F=!1;if(S&&S.length)for(let W of S)R.fire(new me(new Error(W.message))),F=!0;return F}class Qi{constructor(S,F,W){let te=this.cells=[];if(S instanceof ArrayBuffer){this.arrayBuffer=S;let pe=new Int32Array(this.arrayBuffer);S=pe[0],this.d=(F=pe[1])+2*(W=pe[2]);for(let Ke=0;Ke=Jt[Pr+0]&&te>=Jt[Pr+1])?(Fe[mr]=!0,pe.push(Lt[mr])):Fe[mr]=!1}}}}_forEachCell(S,F,W,te,fe,pe,Fe,Ke){let ct=this._convertToCellCoord(S),Lt=this._convertToCellCoord(F),Jt=this._convertToCellCoord(W),cr=this._convertToCellCoord(te);for(let mr=ct;mr<=Jt;mr++)for(let Pr=Lt;Pr<=cr;Pr++){let zr=this.d*Pr+mr;if((!Ke||Ke(this._convertFromCellCoord(mr),this._convertFromCellCoord(Pr),this._convertFromCellCoord(mr+1),this._convertFromCellCoord(Pr+1)))&&fe.call(this,S,F,W,te,zr,pe,Fe,Ke))return}}_convertFromCellCoord(S){return(S-this.padding)/this.scale}_convertToCellCoord(S){return Math.max(0,Math.min(this.d-1,Math.floor(S*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let S=this.cells,F=3+this.cells.length+1+1,W=0;for(let pe=0;pe=0)continue;let pe=R[fe];te[fe]=on[F].shallow.indexOf(fe)>=0?pe:La(pe,S)}R instanceof Error&&(te.message=R.message)}if(te.$name)throw new Error("$name property is reserved for worker serialization logic.");return F!=="Object"&&(te.$name=F),te}function Na(R){if(Ra(R))return R;if(Array.isArray(R))return R.map(Na);if(typeof R!="object")throw new Error("can't deserialize object of type "+typeof R);let S=Ca(R)||"Object";if(!on[S])throw new Error(`can't deserialize unregistered class ${S}`);let{klass:F}=on[S];if(!F)throw new Error(`can't deserialize unregistered class ${S}`);if(F.deserialize)return F.deserialize(R);let W=Object.create(F.prototype);for(let te of Object.keys(R)){if(te==="$name")continue;let fe=R[te];W[te]=on[S].shallow.indexOf(te)>=0?fe:Na(fe)}return W}class Yn{constructor(){this.first=!0}update(S,F){let W=Math.floor(S);return this.first?(this.first=!1,this.lastIntegerZoom=W,this.lastIntegerZoomTime=0,this.lastZoom=S,this.lastFloorZoom=W,!0):(this.lastFloorZoom>W?(this.lastIntegerZoom=W+1,this.lastIntegerZoomTime=F):this.lastFloorZoomR>=128&&R<=255,"Hangul Jamo":R=>R>=4352&&R<=4607,Khmer:R=>R>=6016&&R<=6143,"General Punctuation":R=>R>=8192&&R<=8303,"Letterlike Symbols":R=>R>=8448&&R<=8527,"Number Forms":R=>R>=8528&&R<=8591,"Miscellaneous Technical":R=>R>=8960&&R<=9215,"Control Pictures":R=>R>=9216&&R<=9279,"Optical Character Recognition":R=>R>=9280&&R<=9311,"Enclosed Alphanumerics":R=>R>=9312&&R<=9471,"Geometric Shapes":R=>R>=9632&&R<=9727,"Miscellaneous Symbols":R=>R>=9728&&R<=9983,"Miscellaneous Symbols and Arrows":R=>R>=11008&&R<=11263,"Ideographic Description Characters":R=>R>=12272&&R<=12287,"CJK Symbols and Punctuation":R=>R>=12288&&R<=12351,Katakana:R=>R>=12448&&R<=12543,Kanbun:R=>R>=12688&&R<=12703,"CJK Strokes":R=>R>=12736&&R<=12783,"Enclosed CJK Letters and Months":R=>R>=12800&&R<=13055,"CJK Compatibility":R=>R>=13056&&R<=13311,"Yijing Hexagram Symbols":R=>R>=19904&&R<=19967,"Private Use Area":R=>R>=57344&&R<=63743,"Vertical Forms":R=>R>=65040&&R<=65055,"CJK Compatibility Forms":R=>R>=65072&&R<=65103,"Small Form Variants":R=>R>=65104&&R<=65135,"Halfwidth and Fullwidth Forms":R=>R>=65280&&R<=65519};function Ka(R){for(let S of R)if(Ho(S.charCodeAt(0)))return!0;return!1}function bo(R){for(let S of R)if(!as(S.charCodeAt(0)))return!1;return!0}function Zo(R){let S=R.map(F=>{try{return new RegExp(`\\p{sc=${F}}`,"u").source}catch(W){return null}}).filter(F=>F);return new RegExp(S.join("|"),"u")}let Ss=Zo(["Arab","Dupl","Mong","Ougr","Syrc"]);function as(R){return!Ss.test(String.fromCodePoint(R))}let ws=Zo(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function Ho(R){return!(R!==746&&R!==747&&(R<4352||!(Dn["CJK Compatibility Forms"](R)&&!(R>=65097&&R<=65103)||Dn["CJK Compatibility"](R)||Dn["CJK Strokes"](R)||!(!Dn["CJK Symbols and Punctuation"](R)||R>=12296&&R<=12305||R>=12308&&R<=12319||R===12336)||Dn["Enclosed CJK Letters and Months"](R)||Dn["Ideographic Description Characters"](R)||Dn.Kanbun(R)||Dn.Katakana(R)&&R!==12540||!(!Dn["Halfwidth and Fullwidth Forms"](R)||R===65288||R===65289||R===65293||R>=65306&&R<=65310||R===65339||R===65341||R===65343||R>=65371&&R<=65503||R===65507||R>=65512&&R<=65519)||!(!Dn["Small Form Variants"](R)||R>=65112&&R<=65118||R>=65123&&R<=65126)||Dn["Vertical Forms"](R)||Dn["Yijing Hexagram Symbols"](R)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(R))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(R))||ws.test(String.fromCodePoint(R)))))}function ml(R){return!(Ho(R)||function(S){return!!(Dn["Latin-1 Supplement"](S)&&(S===167||S===169||S===174||S===177||S===188||S===189||S===190||S===215||S===247)||Dn["General Punctuation"](S)&&(S===8214||S===8224||S===8225||S===8240||S===8241||S===8251||S===8252||S===8258||S===8263||S===8264||S===8265||S===8273)||Dn["Letterlike Symbols"](S)||Dn["Number Forms"](S)||Dn["Miscellaneous Technical"](S)&&(S>=8960&&S<=8967||S>=8972&&S<=8991||S>=8996&&S<=9e3||S===9003||S>=9085&&S<=9114||S>=9150&&S<=9165||S===9167||S>=9169&&S<=9179||S>=9186&&S<=9215)||Dn["Control Pictures"](S)&&S!==9251||Dn["Optical Character Recognition"](S)||Dn["Enclosed Alphanumerics"](S)||Dn["Geometric Shapes"](S)||Dn["Miscellaneous Symbols"](S)&&!(S>=9754&&S<=9759)||Dn["Miscellaneous Symbols and Arrows"](S)&&(S>=11026&&S<=11055||S>=11088&&S<=11097||S>=11192&&S<=11243)||Dn["CJK Symbols and Punctuation"](S)||Dn.Katakana(S)||Dn["Private Use Area"](S)||Dn["CJK Compatibility Forms"](S)||Dn["Small Form Variants"](S)||Dn["Halfwidth and Fullwidth Forms"](S)||S===8734||S===8756||S===8757||S>=9984&&S<=10087||S>=10102&&S<=10131||S===65532||S===65533)}(R))}let Ws=Zo(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function Ls(R){return Ws.test(String.fromCodePoint(R))}function va(R,S){return!(!S&&Ls(R)||R>=2304&&R<=3583||R>=3840&&R<=4255||Dn.Khmer(R))}function no(R){for(let S of R)if(Ls(S.charCodeAt(0)))return!0;return!1}let ys=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(R){this.pluginStatus=R.pluginStatus,this.pluginURL=R.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(R){this.applyArabicShaping=R.applyArabicShaping,this.processBidirectionalText=R.processBidirectionalText,this.processStyledBidirectionalText=R.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class rs{constructor(S,F){this.zoom=S,F?(this.now=F.now,this.fadeDuration=F.fadeDuration,this.zoomHistory=F.zoomHistory,this.transition=F.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Yn,this.transition={})}isSupportedScript(S){return function(F,W){for(let te of F)if(!va(te.charCodeAt(0),W))return!1;return!0}(S,ys.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let S=this.zoom,F=S-Math.floor(S),W=this.crossFadingFactor();return S>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:F+(1-F)*W}:{fromScale:.5,toScale:1,t:1-(1-W)*F}}}class Ql{constructor(S,F){this.property=S,this.value=F,this.expression=function(W,te){if(Wf(W))return new nl(W,te);if(Dc(W)){let fe=_u(W,te);if(fe.result==="error")throw new Error(fe.value.map(pe=>`${pe.key}: ${pe.message}`).join(", "));return fe.value}{let fe=W;return te.type==="color"&&typeof W=="string"?fe=nr.parse(W):te.type!=="padding"||typeof W!="number"&&!Array.isArray(W)?te.type==="variableAnchorOffsetCollection"&&Array.isArray(W)&&(fe=$i.parse(W)):fe=Qr.parse(W),{kind:"constant",evaluate:()=>fe}}}(F===void 0?S.specification.default:F,S.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(S,F,W){return this.property.possiblyEvaluate(this,S,F,W)}}class Cu{constructor(S){this.property=S,this.value=new Ql(S,void 0)}transitioned(S,F){return new Nc(this.property,this.value,F,L({},S.transition,this.transition),S.now)}untransitioned(){return new Nc(this.property,this.value,null,{},0)}}class Yu{constructor(S){this._properties=S,this._values=Object.create(S.defaultTransitionablePropertyValues)}getValue(S){return g(this._values[S].value.value)}setValue(S,F){Object.prototype.hasOwnProperty.call(this._values,S)||(this._values[S]=new Cu(this._values[S].property)),this._values[S].value=new Ql(this._values[S].property,F===null?void 0:g(F))}getTransition(S){return g(this._values[S].transition)}setTransition(S,F){Object.prototype.hasOwnProperty.call(this._values,S)||(this._values[S]=new Cu(this._values[S].property)),this._values[S].transition=g(F)||void 0}serialize(){let S={};for(let F of Object.keys(this._values)){let W=this.getValue(F);W!==void 0&&(S[F]=W);let te=this.getTransition(F);te!==void 0&&(S[`${F}-transition`]=te)}return S}transitioned(S,F){let W=new pu(this._properties);for(let te of Object.keys(this._values))W._values[te]=this._values[te].transitioned(S,F._values[te]);return W}untransitioned(){let S=new pu(this._properties);for(let F of Object.keys(this._values))S._values[F]=this._values[F].untransitioned();return S}}class Nc{constructor(S,F,W,te,fe){this.property=S,this.value=F,this.begin=fe+te.delay||0,this.end=this.begin+te.duration||0,S.specification.transition&&(te.delay||te.duration)&&(this.prior=W)}possiblyEvaluate(S,F,W){let te=S.now||0,fe=this.value.possiblyEvaluate(S,F,W),pe=this.prior;if(pe){if(te>this.end)return this.prior=null,fe;if(this.value.isDataDriven())return this.prior=null,fe;if(te=1)return 1;let ct=Ke*Ke,Lt=ct*Ke;return 4*(Ke<.5?Lt:3*(Ke-ct)+Lt-.75)}(Fe))}}return fe}}class pu{constructor(S){this._properties=S,this._values=Object.create(S.defaultTransitioningPropertyValues)}possiblyEvaluate(S,F,W){let te=new Ac(this._properties);for(let fe of Object.keys(this._values))te._values[fe]=this._values[fe].possiblyEvaluate(S,F,W);return te}hasTransition(){for(let S of Object.keys(this._values))if(this._values[S].prior)return!0;return!1}}class Uc{constructor(S){this._properties=S,this._values=Object.create(S.defaultPropertyValues)}hasValue(S){return this._values[S].value!==void 0}getValue(S){return g(this._values[S].value)}setValue(S,F){this._values[S]=new Ql(this._values[S].property,F===null?void 0:g(F))}serialize(){let S={};for(let F of Object.keys(this._values)){let W=this.getValue(F);W!==void 0&&(S[F]=W)}return S}possiblyEvaluate(S,F,W){let te=new Ac(this._properties);for(let fe of Object.keys(this._values))te._values[fe]=this._values[fe].possiblyEvaluate(S,F,W);return te}}class xu{constructor(S,F,W){this.property=S,this.value=F,this.parameters=W}isConstant(){return this.value.kind==="constant"}constantOr(S){return this.value.kind==="constant"?this.value.value:S}evaluate(S,F,W,te){return this.property.evaluate(this.value,this.parameters,S,F,W,te)}}class Ac{constructor(S){this._properties=S,this._values=Object.create(S.defaultPossiblyEvaluatedValues)}get(S){return this._values[S]}}class Ua{constructor(S){this.specification=S}possiblyEvaluate(S,F){if(S.isDataDriven())throw new Error("Value should not be data driven");return S.expression.evaluate(F)}interpolate(S,F,W){let te=Lo[this.specification.type];return te?te(S,F,W):S}}class oo{constructor(S,F){this.specification=S,this.overrides=F}possiblyEvaluate(S,F,W,te){return new xu(this,S.expression.kind==="constant"||S.expression.kind==="camera"?{kind:"constant",value:S.expression.evaluate(F,null,{},W,te)}:S.expression,F)}interpolate(S,F,W){if(S.value.kind!=="constant"||F.value.kind!=="constant")return S;if(S.value.value===void 0||F.value.value===void 0)return new xu(this,{kind:"constant",value:void 0},S.parameters);let te=Lo[this.specification.type];if(te){let fe=te(S.value.value,F.value.value,W);return new xu(this,{kind:"constant",value:fe},S.parameters)}return S}evaluate(S,F,W,te,fe,pe){return S.kind==="constant"?S.value:S.evaluate(F,W,te,fe,pe)}}class Vc extends oo{possiblyEvaluate(S,F,W,te){if(S.value===void 0)return new xu(this,{kind:"constant",value:void 0},F);if(S.expression.kind==="constant"){let fe=S.expression.evaluate(F,null,{},W,te),pe=S.property.specification.type==="resolvedImage"&&typeof fe!="string"?fe.name:fe,Fe=this._calculate(pe,pe,pe,F);return new xu(this,{kind:"constant",value:Fe},F)}if(S.expression.kind==="camera"){let fe=this._calculate(S.expression.evaluate({zoom:F.zoom-1}),S.expression.evaluate({zoom:F.zoom}),S.expression.evaluate({zoom:F.zoom+1}),F);return new xu(this,{kind:"constant",value:fe},F)}return new xu(this,S.expression,F)}evaluate(S,F,W,te,fe,pe){if(S.kind==="source"){let Fe=S.evaluate(F,W,te,fe,pe);return this._calculate(Fe,Fe,Fe,F)}return S.kind==="composite"?this._calculate(S.evaluate({zoom:Math.floor(F.zoom)-1},W,te),S.evaluate({zoom:Math.floor(F.zoom)},W,te),S.evaluate({zoom:Math.floor(F.zoom)+1},W,te),F):S.value}_calculate(S,F,W,te){return te.zoom>te.zoomHistory.lastIntegerZoom?{from:S,to:F}:{from:W,to:F}}interpolate(S){return S}}class hc{constructor(S){this.specification=S}possiblyEvaluate(S,F,W,te){if(S.value!==void 0){if(S.expression.kind==="constant"){let fe=S.expression.evaluate(F,null,{},W,te);return this._calculate(fe,fe,fe,F)}return this._calculate(S.expression.evaluate(new rs(Math.floor(F.zoom-1),F)),S.expression.evaluate(new rs(Math.floor(F.zoom),F)),S.expression.evaluate(new rs(Math.floor(F.zoom+1),F)),F)}}_calculate(S,F,W,te){return te.zoom>te.zoomHistory.lastIntegerZoom?{from:S,to:F}:{from:W,to:F}}interpolate(S){return S}}class Ku{constructor(S){this.specification=S}possiblyEvaluate(S,F,W,te){return!!S.expression.evaluate(F,null,{},W,te)}interpolate(){return!1}}class ue{constructor(S){this.properties=S,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let F in S){let W=S[F];W.specification.overridable&&this.overridableProperties.push(F);let te=this.defaultPropertyValues[F]=new Ql(W,void 0),fe=this.defaultTransitionablePropertyValues[F]=new Cu(W);this.defaultTransitioningPropertyValues[F]=fe.untransitioned(),this.defaultPossiblyEvaluatedValues[F]=te.possiblyEvaluate({})}}}Fi("DataDrivenProperty",oo),Fi("DataConstantProperty",Ua),Fi("CrossFadedDataDrivenProperty",Vc),Fi("CrossFadedProperty",hc),Fi("ColorRampProperty",Ku);let w="-transition";class B extends De{constructor(S,F){if(super(),this.id=S.id,this.type=S.type,this._featureFilter={filter:()=>!0,needGeometry:!1},S.type!=="custom"&&(this.metadata=S.metadata,this.minzoom=S.minzoom,this.maxzoom=S.maxzoom,S.type!=="background"&&(this.source=S.source,this.sourceLayer=S["source-layer"],this.filter=S.filter),F.layout&&(this._unevaluatedLayout=new Uc(F.layout)),F.paint)){this._transitionablePaint=new Yu(F.paint);for(let W in S.paint)this.setPaintProperty(W,S.paint[W],{validate:!1});for(let W in S.layout)this.setLayoutProperty(W,S.layout[W],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Ac(F.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(S){return S==="visibility"?this.visibility:this._unevaluatedLayout.getValue(S)}setLayoutProperty(S,F,W={}){F!=null&&this._validate(Nn,`layers.${this.id}.layout.${S}`,S,F,W)||(S!=="visibility"?this._unevaluatedLayout.setValue(S,F):this.visibility=F)}getPaintProperty(S){return S.endsWith(w)?this._transitionablePaint.getTransition(S.slice(0,-11)):this._transitionablePaint.getValue(S)}setPaintProperty(S,F,W={}){if(F!=null&&this._validate(wn,`layers.${this.id}.paint.${S}`,S,F,W))return!1;if(S.endsWith(w))return this._transitionablePaint.setTransition(S.slice(0,-11),F||void 0),!1;{let te=this._transitionablePaint._values[S],fe=te.property.specification["property-type"]==="cross-faded-data-driven",pe=te.value.isDataDriven(),Fe=te.value;this._transitionablePaint.setValue(S,F),this._handleSpecialPaintPropertyUpdate(S);let Ke=this._transitionablePaint._values[S].value;return Ke.isDataDriven()||pe||fe||this._handleOverridablePaintPropertyUpdate(S,Fe,Ke)}}_handleSpecialPaintPropertyUpdate(S){}_handleOverridablePaintPropertyUpdate(S,F,W){return!1}isHidden(S){return!!(this.minzoom&&S=this.maxzoom)||this.visibility==="none"}updateTransitions(S){this._transitioningPaint=this._transitionablePaint.transitioned(S,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(S,F){S.getCrossfadeParameters&&(this._crossfadeParameters=S.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(S,void 0,F)),this.paint=this._transitioningPaint.possiblyEvaluate(S,void 0,F)}serialize(){let S={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(S.layout=S.layout||{},S.layout.visibility=this.visibility),M(S,(F,W)=>!(F===void 0||W==="layout"&&!Object.keys(F).length||W==="paint"&&!Object.keys(F).length))}_validate(S,F,W,te,fe={}){return(!fe||fe.validate!==!1)&&Yi(this,S.call(ki,{key:F,layerType:this.type,objectKey:W,value:te,styleSpec:ce,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let S in this.paint._values){let F=this.paint.get(S);if(F instanceof xu&&Nl(F.property.specification)&&(F.value.kind==="source"||F.value.kind==="composite")&&F.value.isStateDependent)return!0}return!1}}let Q={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class ee{constructor(S,F){this._structArray=S,this._pos1=F*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class le{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(S,F){return S._trim(),F&&(S.isTransferred=!0,F.push(S.arrayBuffer)),{length:S.length,arrayBuffer:S.arrayBuffer}}static deserialize(S){let F=Object.create(this.prototype);return F.arrayBuffer=S.arrayBuffer,F.length=S.length,F.capacity=S.arrayBuffer.byteLength/F.bytesPerElement,F._refreshViews(),F}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(S){this.reserve(S),this.length=S}reserve(S){if(S>this.capacity){this.capacity=Math.max(S,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let F=this.uint8;this._refreshViews(),F&&this.uint8.set(F)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function Oe(R,S=1){let F=0,W=0;return{members:R.map(te=>{let fe=Q[te.type].BYTES_PER_ELEMENT,pe=F=Ze(F,Math.max(S,fe)),Fe=te.components||1;return W=Math.max(W,fe),F+=fe*Fe,{name:te.name,type:te.type,components:Fe,offset:pe}}),size:Ze(F,Math.max(W,S)),alignment:S}}function Ze(R,S){return Math.ceil(R/S)*S}class st extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,F){let W=this.length;return this.resize(W+1),this.emplace(W,S,F)}emplace(S,F,W){let te=2*S;return this.int16[te+0]=F,this.int16[te+1]=W,S}}st.prototype.bytesPerElement=4,Fi("StructArrayLayout2i4",st);class Tt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,F,W){let te=this.length;return this.resize(te+1),this.emplace(te,S,F,W)}emplace(S,F,W,te){let fe=3*S;return this.int16[fe+0]=F,this.int16[fe+1]=W,this.int16[fe+2]=te,S}}Tt.prototype.bytesPerElement=6,Fi("StructArrayLayout3i6",Tt);class Yt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,F,W,te){let fe=this.length;return this.resize(fe+1),this.emplace(fe,S,F,W,te)}emplace(S,F,W,te,fe){let pe=4*S;return this.int16[pe+0]=F,this.int16[pe+1]=W,this.int16[pe+2]=te,this.int16[pe+3]=fe,S}}Yt.prototype.bytesPerElement=8,Fi("StructArrayLayout4i8",Yt);class Kt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,F,W,te,fe,pe){let Fe=this.length;return this.resize(Fe+1),this.emplace(Fe,S,F,W,te,fe,pe)}emplace(S,F,W,te,fe,pe,Fe){let Ke=6*S;return this.int16[Ke+0]=F,this.int16[Ke+1]=W,this.int16[Ke+2]=te,this.int16[Ke+3]=fe,this.int16[Ke+4]=pe,this.int16[Ke+5]=Fe,S}}Kt.prototype.bytesPerElement=12,Fi("StructArrayLayout2i4i12",Kt);class xr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,F,W,te,fe,pe){let Fe=this.length;return this.resize(Fe+1),this.emplace(Fe,S,F,W,te,fe,pe)}emplace(S,F,W,te,fe,pe,Fe){let Ke=4*S,ct=8*S;return this.int16[Ke+0]=F,this.int16[Ke+1]=W,this.uint8[ct+4]=te,this.uint8[ct+5]=fe,this.uint8[ct+6]=pe,this.uint8[ct+7]=Fe,S}}xr.prototype.bytesPerElement=8,Fi("StructArrayLayout2i4ub8",xr);class Ir extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S,F){let W=this.length;return this.resize(W+1),this.emplace(W,S,F)}emplace(S,F,W){let te=2*S;return this.float32[te+0]=F,this.float32[te+1]=W,S}}Ir.prototype.bytesPerElement=8,Fi("StructArrayLayout2f8",Ir);class ve extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,F,W,te,fe,pe,Fe,Ke,ct,Lt){let Jt=this.length;return this.resize(Jt+1),this.emplace(Jt,S,F,W,te,fe,pe,Fe,Ke,ct,Lt)}emplace(S,F,W,te,fe,pe,Fe,Ke,ct,Lt,Jt){let cr=10*S;return this.uint16[cr+0]=F,this.uint16[cr+1]=W,this.uint16[cr+2]=te,this.uint16[cr+3]=fe,this.uint16[cr+4]=pe,this.uint16[cr+5]=Fe,this.uint16[cr+6]=Ke,this.uint16[cr+7]=ct,this.uint16[cr+8]=Lt,this.uint16[cr+9]=Jt,S}}ve.prototype.bytesPerElement=20,Fi("StructArrayLayout10ui20",ve);class be extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,F,W,te,fe,pe,Fe,Ke,ct,Lt,Jt,cr){let mr=this.length;return this.resize(mr+1),this.emplace(mr,S,F,W,te,fe,pe,Fe,Ke,ct,Lt,Jt,cr)}emplace(S,F,W,te,fe,pe,Fe,Ke,ct,Lt,Jt,cr,mr){let Pr=12*S;return this.int16[Pr+0]=F,this.int16[Pr+1]=W,this.int16[Pr+2]=te,this.int16[Pr+3]=fe,this.uint16[Pr+4]=pe,this.uint16[Pr+5]=Fe,this.uint16[Pr+6]=Ke,this.uint16[Pr+7]=ct,this.int16[Pr+8]=Lt,this.int16[Pr+9]=Jt,this.int16[Pr+10]=cr,this.int16[Pr+11]=mr,S}}be.prototype.bytesPerElement=24,Fi("StructArrayLayout4i4ui4i24",be);class Re extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S,F,W){let te=this.length;return this.resize(te+1),this.emplace(te,S,F,W)}emplace(S,F,W,te){let fe=3*S;return this.float32[fe+0]=F,this.float32[fe+1]=W,this.float32[fe+2]=te,S}}Re.prototype.bytesPerElement=12,Fi("StructArrayLayout3f12",Re);class qe extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(S){let F=this.length;return this.resize(F+1),this.emplace(F,S)}emplace(S,F){return this.uint32[1*S+0]=F,S}}qe.prototype.bytesPerElement=4,Fi("StructArrayLayout1ul4",qe);class et extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,F,W,te,fe,pe,Fe,Ke,ct){let Lt=this.length;return this.resize(Lt+1),this.emplace(Lt,S,F,W,te,fe,pe,Fe,Ke,ct)}emplace(S,F,W,te,fe,pe,Fe,Ke,ct,Lt){let Jt=10*S,cr=5*S;return this.int16[Jt+0]=F,this.int16[Jt+1]=W,this.int16[Jt+2]=te,this.int16[Jt+3]=fe,this.int16[Jt+4]=pe,this.int16[Jt+5]=Fe,this.uint32[cr+3]=Ke,this.uint16[Jt+8]=ct,this.uint16[Jt+9]=Lt,S}}et.prototype.bytesPerElement=20,Fi("StructArrayLayout6i1ul2ui20",et);class Xe extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,F,W,te,fe,pe){let Fe=this.length;return this.resize(Fe+1),this.emplace(Fe,S,F,W,te,fe,pe)}emplace(S,F,W,te,fe,pe,Fe){let Ke=6*S;return this.int16[Ke+0]=F,this.int16[Ke+1]=W,this.int16[Ke+2]=te,this.int16[Ke+3]=fe,this.int16[Ke+4]=pe,this.int16[Ke+5]=Fe,S}}Xe.prototype.bytesPerElement=12,Fi("StructArrayLayout2i2i2i12",Xe);class it extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,F,W,te,fe){let pe=this.length;return this.resize(pe+1),this.emplace(pe,S,F,W,te,fe)}emplace(S,F,W,te,fe,pe){let Fe=4*S,Ke=8*S;return this.float32[Fe+0]=F,this.float32[Fe+1]=W,this.float32[Fe+2]=te,this.int16[Ke+6]=fe,this.int16[Ke+7]=pe,S}}it.prototype.bytesPerElement=16,Fi("StructArrayLayout2f1f2i16",it);class Ft extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(S,F,W,te,fe,pe){let Fe=this.length;return this.resize(Fe+1),this.emplace(Fe,S,F,W,te,fe,pe)}emplace(S,F,W,te,fe,pe,Fe){let Ke=16*S,ct=4*S,Lt=8*S;return this.uint8[Ke+0]=F,this.uint8[Ke+1]=W,this.float32[ct+1]=te,this.float32[ct+2]=fe,this.int16[Lt+6]=pe,this.int16[Lt+7]=Fe,S}}Ft.prototype.bytesPerElement=16,Fi("StructArrayLayout2ub2f2i16",Ft);class Ht extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,F,W){let te=this.length;return this.resize(te+1),this.emplace(te,S,F,W)}emplace(S,F,W,te){let fe=3*S;return this.uint16[fe+0]=F,this.uint16[fe+1]=W,this.uint16[fe+2]=te,S}}Ht.prototype.bytesPerElement=6,Fi("StructArrayLayout3ui6",Ht);class tr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S,F,W,te,fe,pe,Fe,Ke,ct,Lt,Jt,cr,mr,Pr,zr,ui,yi){let vn=this.length;return this.resize(vn+1),this.emplace(vn,S,F,W,te,fe,pe,Fe,Ke,ct,Lt,Jt,cr,mr,Pr,zr,ui,yi)}emplace(S,F,W,te,fe,pe,Fe,Ke,ct,Lt,Jt,cr,mr,Pr,zr,ui,yi,vn){let zi=24*S,un=12*S,Tn=48*S;return this.int16[zi+0]=F,this.int16[zi+1]=W,this.uint16[zi+2]=te,this.uint16[zi+3]=fe,this.uint32[un+2]=pe,this.uint32[un+3]=Fe,this.uint32[un+4]=Ke,this.uint16[zi+10]=ct,this.uint16[zi+11]=Lt,this.uint16[zi+12]=Jt,this.float32[un+7]=cr,this.float32[un+8]=mr,this.uint8[Tn+36]=Pr,this.uint8[Tn+37]=zr,this.uint8[Tn+38]=ui,this.uint32[un+10]=yi,this.int16[zi+22]=vn,S}}tr.prototype.bytesPerElement=48,Fi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",tr);class dr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S,F,W,te,fe,pe,Fe,Ke,ct,Lt,Jt,cr,mr,Pr,zr,ui,yi,vn,zi,un,Tn,pa,ro,Vo,Xa,sa,Mo,fo){let lo=this.length;return this.resize(lo+1),this.emplace(lo,S,F,W,te,fe,pe,Fe,Ke,ct,Lt,Jt,cr,mr,Pr,zr,ui,yi,vn,zi,un,Tn,pa,ro,Vo,Xa,sa,Mo,fo)}emplace(S,F,W,te,fe,pe,Fe,Ke,ct,Lt,Jt,cr,mr,Pr,zr,ui,yi,vn,zi,un,Tn,pa,ro,Vo,Xa,sa,Mo,fo,lo){let Xn=32*S,Ro=16*S;return this.int16[Xn+0]=F,this.int16[Xn+1]=W,this.int16[Xn+2]=te,this.int16[Xn+3]=fe,this.int16[Xn+4]=pe,this.int16[Xn+5]=Fe,this.int16[Xn+6]=Ke,this.int16[Xn+7]=ct,this.uint16[Xn+8]=Lt,this.uint16[Xn+9]=Jt,this.uint16[Xn+10]=cr,this.uint16[Xn+11]=mr,this.uint16[Xn+12]=Pr,this.uint16[Xn+13]=zr,this.uint16[Xn+14]=ui,this.uint16[Xn+15]=yi,this.uint16[Xn+16]=vn,this.uint16[Xn+17]=zi,this.uint16[Xn+18]=un,this.uint16[Xn+19]=Tn,this.uint16[Xn+20]=pa,this.uint16[Xn+21]=ro,this.uint16[Xn+22]=Vo,this.uint32[Ro+12]=Xa,this.float32[Ro+13]=sa,this.float32[Ro+14]=Mo,this.uint16[Xn+30]=fo,this.uint16[Xn+31]=lo,S}}dr.prototype.bytesPerElement=64,Fi("StructArrayLayout8i15ui1ul2f2ui64",dr);class Sr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S){let F=this.length;return this.resize(F+1),this.emplace(F,S)}emplace(S,F){return this.float32[1*S+0]=F,S}}Sr.prototype.bytesPerElement=4,Fi("StructArrayLayout1f4",Sr);class Or extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S,F,W){let te=this.length;return this.resize(te+1),this.emplace(te,S,F,W)}emplace(S,F,W,te){let fe=3*S;return this.uint16[6*S+0]=F,this.float32[fe+1]=W,this.float32[fe+2]=te,S}}Or.prototype.bytesPerElement=12,Fi("StructArrayLayout1ui2f12",Or);class Wr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,F,W){let te=this.length;return this.resize(te+1),this.emplace(te,S,F,W)}emplace(S,F,W,te){let fe=4*S;return this.uint32[2*S+0]=F,this.uint16[fe+2]=W,this.uint16[fe+3]=te,S}}Wr.prototype.bytesPerElement=8,Fi("StructArrayLayout1ul2ui8",Wr);class ni extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S,F){let W=this.length;return this.resize(W+1),this.emplace(W,S,F)}emplace(S,F,W){let te=2*S;return this.uint16[te+0]=F,this.uint16[te+1]=W,S}}ni.prototype.bytesPerElement=4,Fi("StructArrayLayout2ui4",ni);class Pi extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(S){let F=this.length;return this.resize(F+1),this.emplace(F,S)}emplace(S,F){return this.uint16[1*S+0]=F,S}}Pi.prototype.bytesPerElement=2,Fi("StructArrayLayout1ui2",Pi);class cn extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(S,F,W,te){let fe=this.length;return this.resize(fe+1),this.emplace(fe,S,F,W,te)}emplace(S,F,W,te,fe){let pe=4*S;return this.float32[pe+0]=F,this.float32[pe+1]=W,this.float32[pe+2]=te,this.float32[pe+3]=fe,S}}cn.prototype.bytesPerElement=16,Fi("StructArrayLayout4f16",cn);class ln extends ee{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new u(this.anchorPointX,this.anchorPointY)}}ln.prototype.size=20;class Cn extends et{get(S){return new ln(this,S)}}Fi("CollisionBoxArray",Cn);class Kn extends ee{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(S){this._structArray.uint8[this._pos1+37]=S}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(S){this._structArray.uint8[this._pos1+38]=S}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(S){this._structArray.uint32[this._pos4+10]=S}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}Kn.prototype.size=48;class Aa extends tr{get(S){return new Kn(this,S)}}Fi("PlacedSymbolArray",Aa);class fa extends ee{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(S){this._structArray.uint32[this._pos4+12]=S}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}fa.prototype.size=64;class $a extends dr{get(S){return new fa(this,S)}}Fi("SymbolInstanceArray",$a);class Co extends Sr{getoffsetX(S){return this.float32[1*S+0]}}Fi("GlyphOffsetArray",Co);class Qa extends Tt{getx(S){return this.int16[3*S+0]}gety(S){return this.int16[3*S+1]}gettileUnitDistanceFromAnchor(S){return this.int16[3*S+2]}}Fi("SymbolLineVertexArray",Qa);class mo extends ee{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}mo.prototype.size=12;class Bo extends Or{get(S){return new mo(this,S)}}Fi("TextAnchorOffsetArray",Bo);class Ps extends ee{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}Ps.prototype.size=8;class Ts extends Wr{get(S){return new Ps(this,S)}}Fi("FeatureIndexArray",Ts);class wo extends st{}class To extends st{}class hl extends st{}class Ul extends Kt{}class Lu extends xr{}class au extends Ir{}class Js extends ve{}class eu extends be{}class dc extends Re{}class Tl extends qe{}class Al extends Xe{}class X extends Ft{}class se extends Ht{}class Te extends ni{}let Ne=Oe([{name:"a_pos",components:2,type:"Int16"}],4),{members:He}=Ne;class Ye{constructor(S=[]){this.segments=S}prepareSegment(S,F,W,te){let fe=this.segments[this.segments.length-1];return S>Ye.MAX_VERTEX_ARRAY_LENGTH&&A(`Max vertices per segment is ${Ye.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${S}`),(!fe||fe.vertexLength+S>Ye.MAX_VERTEX_ARRAY_LENGTH||fe.sortKey!==te)&&(fe={vertexOffset:F.length,primitiveOffset:W.length,vertexLength:0,primitiveLength:0},te!==void 0&&(fe.sortKey=te),this.segments.push(fe)),fe}get(){return this.segments}destroy(){for(let S of this.segments)for(let F in S.vaos)S.vaos[F].destroy()}static simpleSegment(S,F,W,te){return new Ye([{vertexOffset:S,primitiveOffset:F,vertexLength:W,primitiveLength:te,vaos:{},sortKey:0}])}}function kt(R,S){return 256*(R=E(Math.floor(R),0,255))+E(Math.floor(S),0,255)}Ye.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Fi("SegmentVector",Ye);let nt=Oe([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var jt={exports:{}},gr={exports:{}};gr.exports=function(R,S){var F,W,te,fe,pe,Fe,Ke,ct;for(W=R.length-(F=3&R.length),te=S,pe=3432918353,Fe=461845907,ct=0;ct>>16)*pe&65535)<<16)&4294967295)<<15|Ke>>>17))*Fe+(((Ke>>>16)*Fe&65535)<<16)&4294967295)<<13|te>>>19))+((5*(te>>>16)&65535)<<16)&4294967295))+((58964+(fe>>>16)&65535)<<16);switch(Ke=0,F){case 3:Ke^=(255&R.charCodeAt(ct+2))<<16;case 2:Ke^=(255&R.charCodeAt(ct+1))<<8;case 1:te^=Ke=(65535&(Ke=(Ke=(65535&(Ke^=255&R.charCodeAt(ct)))*pe+(((Ke>>>16)*pe&65535)<<16)&4294967295)<<15|Ke>>>17))*Fe+(((Ke>>>16)*Fe&65535)<<16)&4294967295}return te^=R.length,te=2246822507*(65535&(te^=te>>>16))+((2246822507*(te>>>16)&65535)<<16)&4294967295,te=3266489909*(65535&(te^=te>>>13))+((3266489909*(te>>>16)&65535)<<16)&4294967295,(te^=te>>>16)>>>0};var yr=gr.exports,Hr={exports:{}};Hr.exports=function(R,S){for(var F,W=R.length,te=S^W,fe=0;W>=4;)F=1540483477*(65535&(F=255&R.charCodeAt(fe)|(255&R.charCodeAt(++fe))<<8|(255&R.charCodeAt(++fe))<<16|(255&R.charCodeAt(++fe))<<24))+((1540483477*(F>>>16)&65535)<<16),te=1540483477*(65535&te)+((1540483477*(te>>>16)&65535)<<16)^(F=1540483477*(65535&(F^=F>>>24))+((1540483477*(F>>>16)&65535)<<16)),W-=4,++fe;switch(W){case 3:te^=(255&R.charCodeAt(fe+2))<<16;case 2:te^=(255&R.charCodeAt(fe+1))<<8;case 1:te=1540483477*(65535&(te^=255&R.charCodeAt(fe)))+((1540483477*(te>>>16)&65535)<<16)}return te=1540483477*(65535&(te^=te>>>13))+((1540483477*(te>>>16)&65535)<<16),(te^=te>>>15)>>>0};var qr=yr,_i=Hr.exports;jt.exports=qr,jt.exports.murmur3=qr,jt.exports.murmur2=_i;var bi=o(jt.exports);class Zr{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(S,F,W,te){this.ids.push(ai(S)),this.positions.push(F,W,te)}getPositions(S){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let F=ai(S),W=0,te=this.ids.length-1;for(;W>1;this.ids[pe]>=F?te=pe:W=pe+1}let fe=[];for(;this.ids[W]===F;)fe.push({index:this.positions[3*W],start:this.positions[3*W+1],end:this.positions[3*W+2]}),W++;return fe}static serialize(S,F){let W=new Float64Array(S.ids),te=new Uint32Array(S.positions);return gi(W,te,0,W.length-1),F&&F.push(W.buffer,te.buffer),{ids:W,positions:te}}static deserialize(S){let F=new Zr;return F.ids=S.ids,F.positions=S.positions,F.indexed=!0,F}}function ai(R){let S=+R;return!isNaN(S)&&S<=Number.MAX_SAFE_INTEGER?S:bi(String(R))}function gi(R,S,F,W){for(;F>1],fe=F-1,pe=W+1;for(;;){do fe++;while(R[fe]te);if(fe>=pe)break;Ii(R,fe,pe),Ii(S,3*fe,3*pe),Ii(S,3*fe+1,3*pe+1),Ii(S,3*fe+2,3*pe+2)}pe-F`u_${te}`),this.type=W}setUniform(S,F,W){S.set(W.constantOr(this.value))}getBinding(S,F,W){return this.type==="color"?new En(S,F):new ei(S,F)}}class Ia{constructor(S,F){this.uniformNames=F.map(W=>`u_${W}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(S,F){this.pixelRatioFrom=F.pixelRatio,this.pixelRatioTo=S.pixelRatio,this.patternFrom=F.tlbr,this.patternTo=S.tlbr}setUniform(S,F,W,te){let fe=te==="u_pattern_to"?this.patternTo:te==="u_pattern_from"?this.patternFrom:te==="u_pixel_ratio_to"?this.pixelRatioTo:te==="u_pixel_ratio_from"?this.pixelRatioFrom:null;fe&&S.set(fe)}getBinding(S,F,W){return W.substr(0,9)==="u_pattern"?new Ln(S,F):new ei(S,F)}}class yo{constructor(S,F,W,te){this.expression=S,this.type=W,this.maxValue=0,this.paintVertexAttributes=F.map(fe=>({name:`a_${fe}`,type:"Float32",components:W==="color"?2:1,offset:0})),this.paintVertexArray=new te}populatePaintArray(S,F,W,te,fe){let pe=this.paintVertexArray.length,Fe=this.expression.evaluate(new rs(0),F,{},te,[],fe);this.paintVertexArray.resize(S),this._setPaintValue(pe,S,Fe)}updatePaintArray(S,F,W,te){let fe=this.expression.evaluate({zoom:0},W,te);this._setPaintValue(S,F,fe)}_setPaintValue(S,F,W){if(this.type==="color"){let te=ia(W);for(let fe=S;fe`u_${Fe}_t`),this.type=W,this.useIntegerZoom=te,this.zoom=fe,this.maxValue=0,this.paintVertexAttributes=F.map(Fe=>({name:`a_${Fe}`,type:"Float32",components:W==="color"?4:2,offset:0})),this.paintVertexArray=new pe}populatePaintArray(S,F,W,te,fe){let pe=this.expression.evaluate(new rs(this.zoom),F,{},te,[],fe),Fe=this.expression.evaluate(new rs(this.zoom+1),F,{},te,[],fe),Ke=this.paintVertexArray.length;this.paintVertexArray.resize(S),this._setPaintValue(Ke,S,pe,Fe)}updatePaintArray(S,F,W,te){let fe=this.expression.evaluate({zoom:this.zoom},W,te),pe=this.expression.evaluate({zoom:this.zoom+1},W,te);this._setPaintValue(S,F,fe,pe)}_setPaintValue(S,F,W,te){if(this.type==="color"){let fe=ia(W),pe=ia(te);for(let Fe=S;Fe`#define HAS_UNIFORM_${te}`))}return S}getBinderAttributes(){let S=[];for(let F in this.binders){let W=this.binders[F];if(W instanceof yo||W instanceof Da)for(let te=0;te!0){this.programConfigurations={};for(let te of S)this.programConfigurations[te.id]=new Is(te,F,W);this.needsUpload=!1,this._featureMap=new Zr,this._bufferOffset=0}populatePaintArrays(S,F,W,te,fe,pe){for(let Fe in this.programConfigurations)this.programConfigurations[Fe].populatePaintArrays(S,F,te,fe,pe);F.id!==void 0&&this._featureMap.add(F.id,W,this._bufferOffset,S),this._bufferOffset=S,this.needsUpload=!0}updatePaintArrays(S,F,W,te){for(let fe of W)this.needsUpload=this.programConfigurations[fe.id].updatePaintArrays(S,this._featureMap,F,fe,te)||this.needsUpload}get(S){return this.programConfigurations[S]}upload(S){if(this.needsUpload){for(let F in this.programConfigurations)this.programConfigurations[F].upload(S);this.needsUpload=!1}}destroy(){for(let S in this.programConfigurations)this.programConfigurations[S].destroy()}}function Xs(R,S){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[R]||[R.replace(`${S}-`,"").replace(/-/g,"_")]}function Gn(R,S,F){let W={color:{source:Ir,composite:cn},number:{source:Sr,composite:Ir}},te=function(fe){return{"line-pattern":{source:Js,composite:Js},"fill-pattern":{source:Js,composite:Js},"fill-extrusion-pattern":{source:Js,composite:Js}}[fe]}(R);return te&&te[F]||W[S][F]}Fi("ConstantBinder",Ea),Fi("CrossFadedConstantBinder",Ia),Fi("SourceExpressionBinder",yo),Fi("CrossFadedCompositeBinder",go),Fi("CompositeExpressionBinder",Da),Fi("ProgramConfiguration",Is,{omit:["_buffers"]}),Fi("ProgramConfigurationSet",Ms);let ja=8192,Fo=Math.pow(2,14)-1,Uo=-Fo-1;function $s(R){let S=ja/R.extent,F=R.loadGeometry();for(let W=0;Wpe.x+1||Kepe.y+1)&&A("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return F}function Sl(R,S){return{type:R.type,id:R.id,properties:R.properties,geometry:S?$s(R):[]}}function bu(R,S,F,W,te){R.emplaceBack(2*S+(W+1)/2,2*F+(te+1)/2)}class dl{constructor(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(F=>F.id),this.index=S.index,this.hasPattern=!1,this.layoutVertexArray=new To,this.indexArray=new se,this.segments=new Ye,this.programConfigurations=new Ms(S.layers,S.zoom),this.stateDependentLayerIds=this.layers.filter(F=>F.isStateDependent()).map(F=>F.id)}populate(S,F,W){let te=this.layers[0],fe=[],pe=null,Fe=!1;te.type==="circle"&&(pe=te.layout.get("circle-sort-key"),Fe=!pe.isConstant());for(let{feature:Ke,id:ct,index:Lt,sourceLayerIndex:Jt}of S){let cr=this.layers[0]._featureFilter.needGeometry,mr=Sl(Ke,cr);if(!this.layers[0]._featureFilter.filter(new rs(this.zoom),mr,W))continue;let Pr=Fe?pe.evaluate(mr,{},W):void 0,zr={id:ct,properties:Ke.properties,type:Ke.type,sourceLayerIndex:Jt,index:Lt,geometry:cr?mr.geometry:$s(Ke),patterns:{},sortKey:Pr};fe.push(zr)}Fe&&fe.sort((Ke,ct)=>Ke.sortKey-ct.sortKey);for(let Ke of fe){let{geometry:ct,index:Lt,sourceLayerIndex:Jt}=Ke,cr=S[Lt].feature;this.addFeature(Ke,ct,Lt,W),F.featureIndex.insert(cr,ct,Lt,Jt,this.index)}}update(S,F,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(S,F,this.stateDependentLayers,W)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(S){this.uploaded||(this.layoutVertexBuffer=S.createVertexBuffer(this.layoutVertexArray,He),this.indexBuffer=S.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(S),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(S,F,W,te){for(let fe of F)for(let pe of fe){let Fe=pe.x,Ke=pe.y;if(Fe<0||Fe>=ja||Ke<0||Ke>=ja)continue;let ct=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,S.sortKey),Lt=ct.vertexLength;bu(this.layoutVertexArray,Fe,Ke,-1,-1),bu(this.layoutVertexArray,Fe,Ke,1,-1),bu(this.layoutVertexArray,Fe,Ke,1,1),bu(this.layoutVertexArray,Fe,Ke,-1,1),this.indexArray.emplaceBack(Lt,Lt+1,Lt+2),this.indexArray.emplaceBack(Lt,Lt+3,Lt+2),ct.vertexLength+=4,ct.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,S,W,{},te)}}function Sc(R,S){for(let F=0;F1){if(Rr(R,S))return!0;for(let W=0;W1?F:F.sub(S)._mult(te)._add(S))}function mi(R,S){let F,W,te,fe=!1;for(let pe=0;peS.y!=te.y>S.y&&S.x<(te.x-W.x)*(S.y-W.y)/(te.y-W.y)+W.x&&(fe=!fe)}return fe}function Ui(R,S){let F=!1;for(let W=0,te=R.length-1;WS.y!=pe.y>S.y&&S.x<(pe.x-fe.x)*(S.y-fe.y)/(pe.y-fe.y)+fe.x&&(F=!F)}return F}function qi(R,S,F){let W=F[0],te=F[2];if(R.xte.x&&S.x>te.x||R.yte.y&&S.y>te.y)return!1;let fe=z(R,S,F[0]);return fe!==z(R,S,F[1])||fe!==z(R,S,F[2])||fe!==z(R,S,F[3])}function Ei(R,S,F){let W=S.paint.get(R).value;return W.kind==="constant"?W.value:F.programConfigurations.get(S.id).getMaxValue(R)}function Hn(R){return Math.sqrt(R[0]*R[0]+R[1]*R[1])}function en(R,S,F,W,te){if(!S[0]&&!S[1])return R;let fe=u.convert(S)._mult(te);F==="viewport"&&fe._rotate(-W);let pe=[];for(let Fe=0;Feli(ui,zr))}(ct,Ke),mr=Jt?Lt*Fe:Lt;for(let Pr of te)for(let zr of Pr){let ui=Jt?zr:li(zr,Ke),yi=mr,vn=Bn([],[zr.x,zr.y,0,1],Ke);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?yi*=vn[3]/pe.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(yi*=pe.cameraToCenterDistance/vn[3]),Me(cr,ui,yi))return!0}return!1}}function li(R,S){let F=Bn([],[R.x,R.y,0,1],S);return new u(F[0]/F[3],F[1]/F[3])}class mn extends dl{}let Ji;Fi("HeatmapBucket",mn,{omit:["layers"]});var Vi={get paint(){return Ji=Ji||new ue({"heatmap-radius":new oo(ce.paint_heatmap["heatmap-radius"]),"heatmap-weight":new oo(ce.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Ua(ce.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Ku(ce.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Ua(ce.paint_heatmap["heatmap-opacity"])})}};function Ni(R,{width:S,height:F},W,te){if(te){if(te instanceof Uint8ClampedArray)te=new Uint8Array(te.buffer);else if(te.length!==S*F*W)throw new RangeError(`mismatched image size. expected: ${te.length} but got: ${S*F*W}`)}else te=new Uint8Array(S*F*W);return R.width=S,R.height=F,R.data=te,R}function pn(R,{width:S,height:F},W){if(S===R.width&&F===R.height)return;let te=Ni({},{width:S,height:F},W);Vn(R,te,{x:0,y:0},{x:0,y:0},{width:Math.min(R.width,S),height:Math.min(R.height,F)},W),R.width=S,R.height=F,R.data=te.data}function Vn(R,S,F,W,te,fe){if(te.width===0||te.height===0)return S;if(te.width>R.width||te.height>R.height||F.x>R.width-te.width||F.y>R.height-te.height)throw new RangeError("out of range source coordinates for image copy");if(te.width>S.width||te.height>S.height||W.x>S.width-te.width||W.y>S.height-te.height)throw new RangeError("out of range destination coordinates for image copy");let pe=R.data,Fe=S.data;if(pe===Fe)throw new Error("srcData equals dstData, so image is already copied");for(let Ke=0;Ke{S[R.evaluationKey]=Ke;let ct=R.expression.evaluate(S);te.data[pe+Fe+0]=Math.floor(255*ct.r/ct.a),te.data[pe+Fe+1]=Math.floor(255*ct.g/ct.a),te.data[pe+Fe+2]=Math.floor(255*ct.b/ct.a),te.data[pe+Fe+3]=Math.floor(255*ct.a)};if(R.clips)for(let pe=0,Fe=0;pe80*F){Fe=1/0,Ke=1/0;let Lt=-1/0,Jt=-1/0;for(let cr=F;crLt&&(Lt=mr),Pr>Jt&&(Jt=Pr)}ct=Math.max(Lt-Fe,Jt-Ke),ct=ct!==0?32767/ct:0}return Vl(fe,pe,F,Fe,Ke,ct,0),pe}function Qs(R,S,F,W,te){let fe;if(te===function(pe,Fe,Ke,ct){let Lt=0;for(let Jt=Fe,cr=Ke-ct;Jt0)for(let pe=S;pe=S;pe-=W)fe=qt(pe/W|0,R[pe],R[pe+1],fe);return fe&&ne(fe,fe.next)&&(Ve(fe),fe=fe.next),fe}function al(R,S){if(!R)return R;S||(S=R);let F,W=R;do if(F=!1,W.steiner||!ne(W,W.next)&&de(W.prev,W,W.next)!==0)W=W.next;else{if(Ve(W),W=S=W.prev,W===W.next)break;F=!0}while(F||W!==S);return S}function Vl(R,S,F,W,te,fe,pe){if(!R)return;!pe&&fe&&function(Ke,ct,Lt,Jt){let cr=Ke;do cr.z===0&&(cr.z=D(cr.x,cr.y,ct,Lt,Jt)),cr.prevZ=cr.prev,cr.nextZ=cr.next,cr=cr.next;while(cr!==Ke);cr.prevZ.nextZ=null,cr.prevZ=null,function(mr){let Pr,zr=1;do{let ui,yi=mr;mr=null;let vn=null;for(Pr=0;yi;){Pr++;let zi=yi,un=0;for(let pa=0;pa0||Tn>0&&zi;)un!==0&&(Tn===0||!zi||yi.z<=zi.z)?(ui=yi,yi=yi.nextZ,un--):(ui=zi,zi=zi.nextZ,Tn--),vn?vn.nextZ=ui:mr=ui,ui.prevZ=vn,vn=ui;yi=zi}vn.nextZ=null,zr*=2}while(Pr>1)}(cr)}(R,W,te,fe);let Fe=R;for(;R.prev!==R.next;){let Ke=R.prev,ct=R.next;if(fe?Vs(R,W,te,fe):ss(R))S.push(Ke.i,R.i,ct.i),Ve(R),R=ct.next,Fe=ct.next;else if((R=ct)===Fe){pe?pe===1?Vl(R=Ys(al(R),S),S,F,W,te,fe,2):pe===2&&wa(R,S,F,W,te,fe):Vl(al(R),S,F,W,te,fe,1);break}}}function ss(R){let S=R.prev,F=R,W=R.next;if(de(S,F,W)>=0)return!1;let te=S.x,fe=F.x,pe=W.x,Fe=S.y,Ke=F.y,ct=W.y,Lt=tefe?te>pe?te:pe:fe>pe?fe:pe,mr=Fe>Ke?Fe>ct?Fe:ct:Ke>ct?Ke:ct,Pr=W.next;for(;Pr!==S;){if(Pr.x>=Lt&&Pr.x<=cr&&Pr.y>=Jt&&Pr.y<=mr&&q(te,Fe,fe,Ke,pe,ct,Pr.x,Pr.y)&&de(Pr.prev,Pr,Pr.next)>=0)return!1;Pr=Pr.next}return!0}function Vs(R,S,F,W){let te=R.prev,fe=R,pe=R.next;if(de(te,fe,pe)>=0)return!1;let Fe=te.x,Ke=fe.x,ct=pe.x,Lt=te.y,Jt=fe.y,cr=pe.y,mr=FeKe?Fe>ct?Fe:ct:Ke>ct?Ke:ct,ui=Lt>Jt?Lt>cr?Lt:cr:Jt>cr?Jt:cr,yi=D(mr,Pr,S,F,W),vn=D(zr,ui,S,F,W),zi=R.prevZ,un=R.nextZ;for(;zi&&zi.z>=yi&&un&&un.z<=vn;){if(zi.x>=mr&&zi.x<=zr&&zi.y>=Pr&&zi.y<=ui&&zi!==te&&zi!==pe&&q(Fe,Lt,Ke,Jt,ct,cr,zi.x,zi.y)&&de(zi.prev,zi,zi.next)>=0||(zi=zi.prevZ,un.x>=mr&&un.x<=zr&&un.y>=Pr&&un.y<=ui&&un!==te&&un!==pe&&q(Fe,Lt,Ke,Jt,ct,cr,un.x,un.y)&&de(un.prev,un,un.next)>=0))return!1;un=un.nextZ}for(;zi&&zi.z>=yi;){if(zi.x>=mr&&zi.x<=zr&&zi.y>=Pr&&zi.y<=ui&&zi!==te&&zi!==pe&&q(Fe,Lt,Ke,Jt,ct,cr,zi.x,zi.y)&&de(zi.prev,zi,zi.next)>=0)return!1;zi=zi.prevZ}for(;un&&un.z<=vn;){if(un.x>=mr&&un.x<=zr&&un.y>=Pr&&un.y<=ui&&un!==te&&un!==pe&&q(Fe,Lt,Ke,Jt,ct,cr,un.x,un.y)&&de(un.prev,un,un.next)>=0)return!1;un=un.nextZ}return!0}function Ys(R,S){let F=R;do{let W=F.prev,te=F.next.next;!ne(W,te)&&we(W,F,F.next,te)&&Zt(W,te)&&Zt(te,W)&&(S.push(W.i,F.i,te.i),Ve(F),Ve(F.next),F=R=te),F=F.next}while(F!==R);return al(F)}function wa(R,S,F,W,te,fe){let pe=R;do{let Fe=pe.next.next;for(;Fe!==pe.prev;){if(pe.i!==Fe.i&&K(pe,Fe)){let Ke=hr(pe,Fe);return pe=al(pe,pe.next),Ke=al(Ke,Ke.next),Vl(pe,S,F,W,te,fe,0),void Vl(Ke,S,F,W,te,fe,0)}Fe=Fe.next}pe=pe.next}while(pe!==R)}function ol(R,S){return R.x-S.x}function io(R,S){let F=function(te,fe){let pe=fe,Fe=te.x,Ke=te.y,ct,Lt=-1/0;do{if(Ke<=pe.y&&Ke>=pe.next.y&&pe.next.y!==pe.y){let zr=pe.x+(Ke-pe.y)*(pe.next.x-pe.x)/(pe.next.y-pe.y);if(zr<=Fe&&zr>Lt&&(Lt=zr,ct=pe.x=pe.x&&pe.x>=cr&&Fe!==pe.x&&q(Kect.x||pe.x===ct.x&&Y(ct,pe)))&&(ct=pe,Pr=zr)}pe=pe.next}while(pe!==Jt);return ct}(R,S);if(!F)return S;let W=hr(F,R);return al(W,W.next),al(F,F.next)}function Y(R,S){return de(R.prev,R,S.prev)<0&&de(S.next,R,R.next)<0}function D(R,S,F,W,te){return(R=1431655765&((R=858993459&((R=252645135&((R=16711935&((R=(R-F)*te|0)|R<<8))|R<<4))|R<<2))|R<<1))|(S=1431655765&((S=858993459&((S=252645135&((S=16711935&((S=(S-W)*te|0)|S<<8))|S<<4))|S<<2))|S<<1))<<1}function J(R){let S=R,F=R;do(S.x=(R-pe)*(fe-Fe)&&(R-pe)*(W-Fe)>=(F-pe)*(S-Fe)&&(F-pe)*(fe-Fe)>=(te-pe)*(W-Fe)}function K(R,S){return R.next.i!==S.i&&R.prev.i!==S.i&&!function(F,W){let te=F;do{if(te.i!==F.i&&te.next.i!==F.i&&te.i!==W.i&&te.next.i!==W.i&&we(te,te.next,F,W))return!0;te=te.next}while(te!==F);return!1}(R,S)&&(Zt(R,S)&&Zt(S,R)&&function(F,W){let te=F,fe=!1,pe=(F.x+W.x)/2,Fe=(F.y+W.y)/2;do te.y>Fe!=te.next.y>Fe&&te.next.y!==te.y&&pe<(te.next.x-te.x)*(Fe-te.y)/(te.next.y-te.y)+te.x&&(fe=!fe),te=te.next;while(te!==F);return fe}(R,S)&&(de(R.prev,R,S.prev)||de(R,S.prev,S))||ne(R,S)&&de(R.prev,R,R.next)>0&&de(S.prev,S,S.next)>0)}function de(R,S,F){return(S.y-R.y)*(F.x-S.x)-(S.x-R.x)*(F.y-S.y)}function ne(R,S){return R.x===S.x&&R.y===S.y}function we(R,S,F,W){let te=ft(de(R,S,F)),fe=ft(de(R,S,W)),pe=ft(de(F,W,R)),Fe=ft(de(F,W,S));return te!==fe&&pe!==Fe||!(te!==0||!Ue(R,F,S))||!(fe!==0||!Ue(R,W,S))||!(pe!==0||!Ue(F,R,W))||!(Fe!==0||!Ue(F,S,W))}function Ue(R,S,F){return S.x<=Math.max(R.x,F.x)&&S.x>=Math.min(R.x,F.x)&&S.y<=Math.max(R.y,F.y)&&S.y>=Math.min(R.y,F.y)}function ft(R){return R>0?1:R<0?-1:0}function Zt(R,S){return de(R.prev,R,R.next)<0?de(R,S,R.next)>=0&&de(R,R.prev,S)>=0:de(R,S,R.prev)<0||de(R,R.next,S)<0}function hr(R,S){let F=Qe(R.i,R.x,R.y),W=Qe(S.i,S.x,S.y),te=R.next,fe=S.prev;return R.next=S,S.prev=R,F.next=te,te.prev=F,W.next=F,F.prev=W,fe.next=W,W.prev=fe,W}function qt(R,S,F,W){let te=Qe(R,S,F);return W?(te.next=W.next,te.prev=W,W.next.prev=te,W.next=te):(te.prev=te,te.next=te),te}function Ve(R){R.next.prev=R.prev,R.prev.next=R.next,R.prevZ&&(R.prevZ.nextZ=R.nextZ),R.nextZ&&(R.nextZ.prevZ=R.prevZ)}function Qe(R,S,F){return{i:R,x:S,y:F,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function at(R,S,F){let W=F.patternDependencies,te=!1;for(let fe of S){let pe=fe.paint.get(`${R}-pattern`);pe.isConstant()||(te=!0);let Fe=pe.constantOr(null);Fe&&(te=!0,W[Fe.to]=!0,W[Fe.from]=!0)}return te}function Ct(R,S,F,W,te){let fe=te.patternDependencies;for(let pe of S){let Fe=pe.paint.get(`${R}-pattern`).value;if(Fe.kind!=="constant"){let Ke=Fe.evaluate({zoom:W-1},F,{},te.availableImages),ct=Fe.evaluate({zoom:W},F,{},te.availableImages),Lt=Fe.evaluate({zoom:W+1},F,{},te.availableImages);Ke=Ke&&Ke.name?Ke.name:Ke,ct=ct&&ct.name?ct.name:ct,Lt=Lt&&Lt.name?Lt.name:Lt,fe[Ke]=!0,fe[ct]=!0,fe[Lt]=!0,F.patterns[pe.id]={min:Ke,mid:ct,max:Lt}}}return F}class Ot{constructor(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(F=>F.id),this.index=S.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new hl,this.indexArray=new se,this.indexArray2=new Te,this.programConfigurations=new Ms(S.layers,S.zoom),this.segments=new Ye,this.segments2=new Ye,this.stateDependentLayerIds=this.layers.filter(F=>F.isStateDependent()).map(F=>F.id)}populate(S,F,W){this.hasPattern=at("fill",this.layers,F);let te=this.layers[0].layout.get("fill-sort-key"),fe=!te.isConstant(),pe=[];for(let{feature:Fe,id:Ke,index:ct,sourceLayerIndex:Lt}of S){let Jt=this.layers[0]._featureFilter.needGeometry,cr=Sl(Fe,Jt);if(!this.layers[0]._featureFilter.filter(new rs(this.zoom),cr,W))continue;let mr=fe?te.evaluate(cr,{},W,F.availableImages):void 0,Pr={id:Ke,properties:Fe.properties,type:Fe.type,sourceLayerIndex:Lt,index:ct,geometry:Jt?cr.geometry:$s(Fe),patterns:{},sortKey:mr};pe.push(Pr)}fe&&pe.sort((Fe,Ke)=>Fe.sortKey-Ke.sortKey);for(let Fe of pe){let{geometry:Ke,index:ct,sourceLayerIndex:Lt}=Fe;if(this.hasPattern){let Jt=Ct("fill",this.layers,Fe,this.zoom,F);this.patternFeatures.push(Jt)}else this.addFeature(Fe,Ke,ct,W,{});F.featureIndex.insert(S[ct].feature,Ke,ct,Lt,this.index)}}update(S,F,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(S,F,this.stateDependentLayers,W)}addFeatures(S,F,W){for(let te of this.patternFeatures)this.addFeature(te,te.geometry,te.index,F,W)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(S){this.uploaded||(this.layoutVertexBuffer=S.createVertexBuffer(this.layoutVertexArray,Ml),this.indexBuffer=S.createIndexBuffer(this.indexArray),this.indexBuffer2=S.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(S),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(S,F,W,te,fe){for(let pe of Cf(F,500)){let Fe=0;for(let mr of pe)Fe+=mr.length;let Ke=this.segments.prepareSegment(Fe,this.layoutVertexArray,this.indexArray),ct=Ke.vertexLength,Lt=[],Jt=[];for(let mr of pe){if(mr.length===0)continue;mr!==pe[0]&&Jt.push(Lt.length/2);let Pr=this.segments2.prepareSegment(mr.length,this.layoutVertexArray,this.indexArray2),zr=Pr.vertexLength;this.layoutVertexArray.emplaceBack(mr[0].x,mr[0].y),this.indexArray2.emplaceBack(zr+mr.length-1,zr),Lt.push(mr[0].x),Lt.push(mr[0].y);for(let ui=1;ui>3}if(te--,W===1||W===2)fe+=R.readSVarint(),pe+=R.readSVarint(),W===1&&(S&&Fe.push(S),S=[]),S.push(new Ur(fe,pe));else{if(W!==7)throw new Error("unknown command "+W);S&&S.push(S[0].clone())}}return S&&Fe.push(S),Fe},fi.prototype.bbox=function(){var R=this._pbf;R.pos=this._geometry;for(var S=R.readVarint()+R.pos,F=1,W=0,te=0,fe=0,pe=1/0,Fe=-1/0,Ke=1/0,ct=-1/0;R.pos>3}if(W--,F===1||F===2)(te+=R.readSVarint())Fe&&(Fe=te),(fe+=R.readSVarint())ct&&(ct=fe);else if(F!==7)throw new Error("unknown command "+F)}return[pe,Ke,Fe,ct]},fi.prototype.toGeoJSON=function(R,S,F){var W,te,fe=this.extent*Math.pow(2,F),pe=this.extent*R,Fe=this.extent*S,Ke=this.loadGeometry(),ct=fi.types[this.type];function Lt(mr){for(var Pr=0;Pr>3;te=pe===1?W.readString():pe===2?W.readFloat():pe===3?W.readDouble():pe===4?W.readVarint64():pe===5?W.readVarint():pe===6?W.readSVarint():pe===7?W.readBoolean():null}return te}(F))}Bi.prototype.feature=function(R){if(R<0||R>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[R];var S=this._pbf.readVarint()+this._pbf.pos;return new rn(this._pbf,S,this.extent,this._keys,this._values)};var sn=Ci;function zn(R,S,F){if(R===3){var W=new sn(F,F.readVarint()+F.pos);W.length&&(S[W.name]=W)}}br.VectorTile=function(R,S){this.layers=R.readFields(zn,{},S)},br.VectorTileFeature=Di,br.VectorTileLayer=Ci;let Ja=br.VectorTileFeature.types,co=Math.pow(2,13);function ts(R,S,F,W,te,fe,pe,Fe){R.emplaceBack(S,F,2*Math.floor(W*co)+pe,te*co*2,fe*co*2,Math.round(Fe))}class so{constructor(S){this.zoom=S.zoom,this.overscaling=S.overscaling,this.layers=S.layers,this.layerIds=this.layers.map(F=>F.id),this.index=S.index,this.hasPattern=!1,this.layoutVertexArray=new Ul,this.centroidVertexArray=new wo,this.indexArray=new se,this.programConfigurations=new Ms(S.layers,S.zoom),this.segments=new Ye,this.stateDependentLayerIds=this.layers.filter(F=>F.isStateDependent()).map(F=>F.id)}populate(S,F,W){this.features=[],this.hasPattern=at("fill-extrusion",this.layers,F);for(let{feature:te,id:fe,index:pe,sourceLayerIndex:Fe}of S){let Ke=this.layers[0]._featureFilter.needGeometry,ct=Sl(te,Ke);if(!this.layers[0]._featureFilter.filter(new rs(this.zoom),ct,W))continue;let Lt={id:fe,sourceLayerIndex:Fe,index:pe,geometry:Ke?ct.geometry:$s(te),properties:te.properties,type:te.type,patterns:{}};this.hasPattern?this.features.push(Ct("fill-extrusion",this.layers,Lt,this.zoom,F)):this.addFeature(Lt,Lt.geometry,pe,W,{}),F.featureIndex.insert(te,Lt.geometry,pe,Fe,this.index,!0)}}addFeatures(S,F,W){for(let te of this.features){let{geometry:fe}=te;this.addFeature(te,fe,te.index,F,W)}}update(S,F,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(S,F,this.stateDependentLayers,W)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(S){this.uploaded||(this.layoutVertexBuffer=S.createVertexBuffer(this.layoutVertexArray,ur),this.centroidVertexBuffer=S.createVertexBuffer(this.centroidVertexArray,ht.members,!0),this.indexBuffer=S.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(S),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(S,F,W,te,fe){for(let pe of Cf(F,500)){let Fe={x:0,y:0,vertexCount:0},Ke=0;for(let Pr of pe)Ke+=Pr.length;let ct=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(let Pr of pe){if(Pr.length===0||ms(Pr))continue;let zr=0;for(let ui=0;ui=1){let vn=Pr[ui-1];if(!Yo(yi,vn)){ct.vertexLength+4>Ye.MAX_VERTEX_ARRAY_LENGTH&&(ct=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let zi=yi.sub(vn)._perp()._unit(),un=vn.dist(yi);zr+un>32768&&(zr=0),ts(this.layoutVertexArray,yi.x,yi.y,zi.x,zi.y,0,0,zr),ts(this.layoutVertexArray,yi.x,yi.y,zi.x,zi.y,0,1,zr),Fe.x+=2*yi.x,Fe.y+=2*yi.y,Fe.vertexCount+=2,zr+=un,ts(this.layoutVertexArray,vn.x,vn.y,zi.x,zi.y,0,0,zr),ts(this.layoutVertexArray,vn.x,vn.y,zi.x,zi.y,0,1,zr),Fe.x+=2*vn.x,Fe.y+=2*vn.y,Fe.vertexCount+=2;let Tn=ct.vertexLength;this.indexArray.emplaceBack(Tn,Tn+2,Tn+1),this.indexArray.emplaceBack(Tn+1,Tn+2,Tn+3),ct.vertexLength+=4,ct.primitiveLength+=2}}}}if(ct.vertexLength+Ke>Ye.MAX_VERTEX_ARRAY_LENGTH&&(ct=this.segments.prepareSegment(Ke,this.layoutVertexArray,this.indexArray)),Ja[S.type]!=="Polygon")continue;let Lt=[],Jt=[],cr=ct.vertexLength;for(let Pr of pe)if(Pr.length!==0){Pr!==pe[0]&&Jt.push(Lt.length/2);for(let zr=0;zrja)||R.y===S.y&&(R.y<0||R.y>ja)}function ms(R){return R.every(S=>S.x<0)||R.every(S=>S.x>ja)||R.every(S=>S.y<0)||R.every(S=>S.y>ja)}let ou;Fi("FillExtrusionBucket",so,{omit:["layers","features"]});var Cv={get paint(){return ou=ou||new ue({"fill-extrusion-opacity":new Ua(ce["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new oo(ce["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Ua(ce["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Ua(ce["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Vc(ce["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new oo(ce["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new oo(ce["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Ua(ce["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class Lv extends B{constructor(S){super(S,Cv)}createBucket(S){return new so(S)}queryRadius(){return Hn(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(S,F,W,te,fe,pe,Fe,Ke){let ct=en(S,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),pe.angle,Fe),Lt=this.paint.get("fill-extrusion-height").evaluate(F,W),Jt=this.paint.get("fill-extrusion-base").evaluate(F,W),cr=function(Pr,zr,ui,yi){let vn=[];for(let zi of Pr){let un=[zi.x,zi.y,0,1];Bn(un,un,zr),vn.push(new u(un[0]/un[3],un[1]/un[3]))}return vn}(ct,Ke),mr=function(Pr,zr,ui,yi){let vn=[],zi=[],un=yi[8]*zr,Tn=yi[9]*zr,pa=yi[10]*zr,ro=yi[11]*zr,Vo=yi[8]*ui,Xa=yi[9]*ui,sa=yi[10]*ui,Mo=yi[11]*ui;for(let fo of Pr){let lo=[],Xn=[];for(let Ro of fo){let uo=Ro.x,$o=Ro.y,Ju=yi[0]*uo+yi[4]*$o+yi[12],qu=yi[1]*uo+yi[5]*$o+yi[13],kh=yi[2]*uo+yi[6]*$o+yi[14],Qv=yi[3]*uo+yi[7]*$o+yi[15],ud=kh+pa,Ch=Qv+ro,Vd=Ju+Vo,Gd=qu+Xa,Hd=kh+sa,Af=Qv+Mo,Lh=new u((Ju+un)/Ch,(qu+Tn)/Ch);Lh.z=ud/Ch,lo.push(Lh);let Ed=new u(Vd/Af,Gd/Af);Ed.z=Hd/Af,Xn.push(Ed)}vn.push(lo),zi.push(Xn)}return[vn,zi]}(te,Jt,Lt,Ke);return function(Pr,zr,ui){let yi=1/0;bt(ui,zr)&&(yi=Kv(ui,zr[0]));for(let vn=0;vnF.id),this.index=S.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(F=>{this.gradients[F.id]={}}),this.layoutVertexArray=new Lu,this.layoutVertexArray2=new au,this.indexArray=new se,this.programConfigurations=new Ms(S.layers,S.zoom),this.segments=new Ye,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(F=>F.isStateDependent()).map(F=>F.id)}populate(S,F,W){this.hasPattern=at("line",this.layers,F);let te=this.layers[0].layout.get("line-sort-key"),fe=!te.isConstant(),pe=[];for(let{feature:Fe,id:Ke,index:ct,sourceLayerIndex:Lt}of S){let Jt=this.layers[0]._featureFilter.needGeometry,cr=Sl(Fe,Jt);if(!this.layers[0]._featureFilter.filter(new rs(this.zoom),cr,W))continue;let mr=fe?te.evaluate(cr,{},W):void 0,Pr={id:Ke,properties:Fe.properties,type:Fe.type,sourceLayerIndex:Lt,index:ct,geometry:Jt?cr.geometry:$s(Fe),patterns:{},sortKey:mr};pe.push(Pr)}fe&&pe.sort((Fe,Ke)=>Fe.sortKey-Ke.sortKey);for(let Fe of pe){let{geometry:Ke,index:ct,sourceLayerIndex:Lt}=Fe;if(this.hasPattern){let Jt=Ct("line",this.layers,Fe,this.zoom,F);this.patternFeatures.push(Jt)}else this.addFeature(Fe,Ke,ct,W,{});F.featureIndex.insert(S[ct].feature,Ke,ct,Lt,this.index)}}update(S,F,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(S,F,this.stateDependentLayers,W)}addFeatures(S,F,W){for(let te of this.patternFeatures)this.addFeature(te,te.geometry,te.index,F,W)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(S){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=S.createVertexBuffer(this.layoutVertexArray2,mp)),this.layoutVertexBuffer=S.createVertexBuffer(this.layoutVertexArray,gp),this.indexBuffer=S.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(S),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(S){if(S.properties&&Object.prototype.hasOwnProperty.call(S.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(S.properties,"mapbox_clip_end"))return{start:+S.properties.mapbox_clip_start,end:+S.properties.mapbox_clip_end}}addFeature(S,F,W,te,fe){let pe=this.layers[0].layout,Fe=pe.get("line-join").evaluate(S,{}),Ke=pe.get("line-cap"),ct=pe.get("line-miter-limit"),Lt=pe.get("line-round-limit");this.lineClips=this.lineFeatureClips(S);for(let Jt of F)this.addLine(Jt,S,Fe,Ke,ct,Lt);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,S,W,fe,te)}addLine(S,F,W,te,fe,pe){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let yi=0;yi=2&&S[Ke-1].equals(S[Ke-2]);)Ke--;let ct=0;for(;ct0;if(ro&&yi>ct){let Mo=cr.dist(mr);if(Mo>2*Lt){let fo=cr.sub(cr.sub(mr)._mult(Lt/Mo)._round());this.updateDistance(mr,fo),this.addCurrentVertex(fo,zr,0,0,Jt),mr=fo}}let Xa=mr&&Pr,sa=Xa?W:Fe?"butt":te;if(Xa&&sa==="round"&&(Tnfe&&(sa="bevel"),sa==="bevel"&&(Tn>2&&(sa="flipbevel"),Tn100)vn=ui.mult(-1);else{let Mo=Tn*zr.add(ui).mag()/zr.sub(ui).mag();vn._perp()._mult(Mo*(Vo?-1:1))}this.addCurrentVertex(cr,vn,0,0,Jt),this.addCurrentVertex(cr,vn.mult(-1),0,0,Jt)}else if(sa==="bevel"||sa==="fakeround"){let Mo=-Math.sqrt(Tn*Tn-1),fo=Vo?Mo:0,lo=Vo?0:Mo;if(mr&&this.addCurrentVertex(cr,zr,fo,lo,Jt),sa==="fakeround"){let Xn=Math.round(180*pa/Math.PI/20);for(let Ro=1;Ro2*Lt){let fo=cr.add(Pr.sub(cr)._mult(Lt/Mo)._round());this.updateDistance(cr,fo),this.addCurrentVertex(fo,ui,0,0,Jt),cr=fo}}}}addCurrentVertex(S,F,W,te,fe,pe=!1){let Fe=F.y*te-F.x,Ke=-F.y-F.x*te;this.addHalfVertex(S,F.x+F.y*W,F.y-F.x*W,pe,!1,W,fe),this.addHalfVertex(S,Fe,Ke,pe,!0,-te,fe),this.distance>Pv/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(S,F,W,te,fe,pe))}addHalfVertex({x:S,y:F},W,te,fe,pe,Fe,Ke){let ct=.5*(this.lineClips?this.scaledDistance*(Pv-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((S<<1)+(fe?1:0),(F<<1)+(pe?1:0),Math.round(63*W)+128,Math.round(63*te)+128,1+(Fe===0?0:Fe<0?-1:1)|(63&ct)<<2,ct>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let Lt=Ke.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Lt),Ke.primitiveLength++),pe?this.e2=Lt:this.e1=Lt}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(S,F){this.distance+=S.dist(F),this.updateScaledDistance()}}let Iv,fy;Fi("LineBucket",Jv,{omit:["layers","patternFeatures"]});var dg={get paint(){return fy=fy||new ue({"line-opacity":new oo(ce.paint_line["line-opacity"]),"line-color":new oo(ce.paint_line["line-color"]),"line-translate":new Ua(ce.paint_line["line-translate"]),"line-translate-anchor":new Ua(ce.paint_line["line-translate-anchor"]),"line-width":new oo(ce.paint_line["line-width"]),"line-gap-width":new oo(ce.paint_line["line-gap-width"]),"line-offset":new oo(ce.paint_line["line-offset"]),"line-blur":new oo(ce.paint_line["line-blur"]),"line-dasharray":new hc(ce.paint_line["line-dasharray"]),"line-pattern":new Vc(ce.paint_line["line-pattern"]),"line-gradient":new Ku(ce.paint_line["line-gradient"])})},get layout(){return Iv=Iv||new ue({"line-cap":new Ua(ce.layout_line["line-cap"]),"line-join":new oo(ce.layout_line["line-join"]),"line-miter-limit":new Ua(ce.layout_line["line-miter-limit"]),"line-round-limit":new Ua(ce.layout_line["line-round-limit"]),"line-sort-key":new oo(ce.layout_line["line-sort-key"])})}};class oh extends oo{possiblyEvaluate(S,F){return F=new rs(Math.floor(F.zoom),{now:F.now,fadeDuration:F.fadeDuration,zoomHistory:F.zoomHistory,transition:F.transition}),super.possiblyEvaluate(S,F)}evaluate(S,F,W,te){return F=L({},F,{zoom:Math.floor(F.zoom)}),super.evaluate(S,F,W,te)}}let vg;class hy extends B{constructor(S){super(S,dg),this.gradientVersion=0,vg||(vg=new oh(dg.paint.properties["line-width"].specification),vg.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(S){if(S==="line-gradient"){let F=this.gradientExpression();this.stepInterpolant=!!function(W){return W._styleExpression!==void 0}(F)&&F._styleExpression.expression instanceof _n,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(S,F){super.recalculate(S,F),this.paint._values["line-floorwidth"]=vg.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,S)}createBucket(S){return new Jv(S)}queryRadius(S){let F=S,W=Zh(Ei("line-width",this,F),Ei("line-gap-width",this,F)),te=Ei("line-offset",this,F);return W/2+Math.abs(te)+Hn(this.paint.get("line-translate"))}queryIntersectsFeature(S,F,W,te,fe,pe,Fe){let Ke=en(S,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),pe.angle,Fe),ct=Fe/2*Zh(this.paint.get("line-width").evaluate(F,W),this.paint.get("line-gap-width").evaluate(F,W)),Lt=this.paint.get("line-offset").evaluate(F,W);return Lt&&(te=function(Jt,cr){let mr=[];for(let Pr=0;Pr=3){for(let ui=0;ui0?S+2*R:R}let am=Oe([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),k1=Oe([{name:"a_projected_pos",components:3,type:"Float32"}],4);Oe([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let C1=Oe([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);Oe([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);let dy=Oe([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),om=Oe([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function sm(R,S,F){return R.sections.forEach(W=>{W.text=function(te,fe,pe){let Fe=fe.layout.get("text-transform").evaluate(pe,{});return Fe==="uppercase"?te=te.toLocaleUpperCase():Fe==="lowercase"&&(te=te.toLocaleLowerCase()),ys.applyArabicShaping&&(te=ys.applyArabicShaping(te)),te}(W.text,S,F)}),R}Oe([{name:"triangle",components:3,type:"Uint16"}]),Oe([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),Oe([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),Oe([{type:"Float32",name:"offsetX"}]),Oe([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),Oe([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);let vc={"!":"\uFE15","#":"\uFF03",$:"\uFF04","%":"\uFF05","&":"\uFF06","(":"\uFE35",")":"\uFE36","*":"\uFF0A","+":"\uFF0B",",":"\uFE10","-":"\uFE32",".":"\u30FB","/":"\uFF0F",":":"\uFE13",";":"\uFE14","<":"\uFE3F","=":"\uFF1D",">":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"};var tu=24,Sd=wu,vy=function(R,S,F,W,te){var fe,pe,Fe=8*te-W-1,Ke=(1<>1,Lt=-7,Jt=F?te-1:0,cr=F?-1:1,mr=R[S+Jt];for(Jt+=cr,fe=mr&(1<<-Lt)-1,mr>>=-Lt,Lt+=Fe;Lt>0;fe=256*fe+R[S+Jt],Jt+=cr,Lt-=8);for(pe=fe&(1<<-Lt)-1,fe>>=-Lt,Lt+=W;Lt>0;pe=256*pe+R[S+Jt],Jt+=cr,Lt-=8);if(fe===0)fe=1-ct;else{if(fe===Ke)return pe?NaN:1/0*(mr?-1:1);pe+=Math.pow(2,W),fe-=ct}return(mr?-1:1)*pe*Math.pow(2,fe-W)},L1=function(R,S,F,W,te,fe){var pe,Fe,Ke,ct=8*fe-te-1,Lt=(1<>1,cr=te===23?Math.pow(2,-24)-Math.pow(2,-77):0,mr=W?0:fe-1,Pr=W?1:-1,zr=S<0||S===0&&1/S<0?1:0;for(S=Math.abs(S),isNaN(S)||S===1/0?(Fe=isNaN(S)?1:0,pe=Lt):(pe=Math.floor(Math.log(S)/Math.LN2),S*(Ke=Math.pow(2,-pe))<1&&(pe--,Ke*=2),(S+=pe+Jt>=1?cr/Ke:cr*Math.pow(2,1-Jt))*Ke>=2&&(pe++,Ke/=2),pe+Jt>=Lt?(Fe=0,pe=Lt):pe+Jt>=1?(Fe=(S*Ke-1)*Math.pow(2,te),pe+=Jt):(Fe=S*Math.pow(2,Jt-1)*Math.pow(2,te),pe=0));te>=8;R[F+mr]=255&Fe,mr+=Pr,Fe/=256,te-=8);for(pe=pe<0;R[F+mr]=255&pe,mr+=Pr,pe/=256,ct-=8);R[F+mr-Pr]|=128*zr};function wu(R){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(R)?R:new Uint8Array(R||0),this.pos=0,this.type=0,this.length=this.buf.length}wu.Varint=0,wu.Fixed64=1,wu.Bytes=2,wu.Fixed32=5;var Yx=4294967296,lm=1/Yx,Ow=typeof TextDecoder=="undefined"?null:new TextDecoder("utf-8");function Rv(R){return R.type===wu.Bytes?R.readVarint()+R.pos:R.pos+1}function um(R,S,F){return F?4294967296*S+(R>>>0):4294967296*(S>>>0)+(R>>>0)}function qw(R,S,F){var W=S<=16383?1:S<=2097151?2:S<=268435455?3:Math.floor(Math.log(S)/(7*Math.LN2));F.realloc(W);for(var te=F.pos-1;te>=R;te--)F.buf[te+W]=F.buf[te]}function Kx(R,S){for(var F=0;F>>8,R[F+2]=S>>>16,R[F+3]=S>>>24}function SC(R,S){return(R[S]|R[S+1]<<8|R[S+2]<<16)+(R[S+3]<<24)}wu.prototype={destroy:function(){this.buf=null},readFields:function(R,S,F){for(F=F||this.length;this.pos>3,fe=this.pos;this.type=7&W,R(te,S,this),this.pos===fe&&this.skip(W)}return S},readMessage:function(R,S){return this.readFields(R,S,this.readVarint()+this.pos)},readFixed32:function(){var R=py(this.buf,this.pos);return this.pos+=4,R},readSFixed32:function(){var R=SC(this.buf,this.pos);return this.pos+=4,R},readFixed64:function(){var R=py(this.buf,this.pos)+py(this.buf,this.pos+4)*Yx;return this.pos+=8,R},readSFixed64:function(){var R=py(this.buf,this.pos)+SC(this.buf,this.pos+4)*Yx;return this.pos+=8,R},readFloat:function(){var R=vy(this.buf,this.pos,!0,23,4);return this.pos+=4,R},readDouble:function(){var R=vy(this.buf,this.pos,!0,52,8);return this.pos+=8,R},readVarint:function(R){var S,F,W=this.buf;return S=127&(F=W[this.pos++]),F<128?S:(S|=(127&(F=W[this.pos++]))<<7,F<128?S:(S|=(127&(F=W[this.pos++]))<<14,F<128?S:(S|=(127&(F=W[this.pos++]))<<21,F<128?S:function(te,fe,pe){var Fe,Ke,ct=pe.buf;if(Fe=(112&(Ke=ct[pe.pos++]))>>4,Ke<128||(Fe|=(127&(Ke=ct[pe.pos++]))<<3,Ke<128)||(Fe|=(127&(Ke=ct[pe.pos++]))<<10,Ke<128)||(Fe|=(127&(Ke=ct[pe.pos++]))<<17,Ke<128)||(Fe|=(127&(Ke=ct[pe.pos++]))<<24,Ke<128)||(Fe|=(1&(Ke=ct[pe.pos++]))<<31,Ke<128))return um(te,Fe,fe);throw new Error("Expected varint not more than 10 bytes")}(S|=(15&(F=W[this.pos]))<<28,R,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var R=this.readVarint();return R%2==1?(R+1)/-2:R/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var R=this.readVarint()+this.pos,S=this.pos;return this.pos=R,R-S>=12&&Ow?function(F,W,te){return Ow.decode(F.subarray(W,te))}(this.buf,S,R):function(F,W,te){for(var fe="",pe=W;pe239?4:Lt>223?3:Lt>191?2:1;if(pe+cr>te)break;cr===1?Lt<128&&(Jt=Lt):cr===2?(192&(Fe=F[pe+1]))==128&&(Jt=(31&Lt)<<6|63&Fe)<=127&&(Jt=null):cr===3?(Ke=F[pe+2],(192&(Fe=F[pe+1]))==128&&(192&Ke)==128&&((Jt=(15&Lt)<<12|(63&Fe)<<6|63&Ke)<=2047||Jt>=55296&&Jt<=57343)&&(Jt=null)):cr===4&&(Ke=F[pe+2],ct=F[pe+3],(192&(Fe=F[pe+1]))==128&&(192&Ke)==128&&(192&ct)==128&&((Jt=(15&Lt)<<18|(63&Fe)<<12|(63&Ke)<<6|63&ct)<=65535||Jt>=1114112)&&(Jt=null)),Jt===null?(Jt=65533,cr=1):Jt>65535&&(Jt-=65536,fe+=String.fromCharCode(Jt>>>10&1023|55296),Jt=56320|1023&Jt),fe+=String.fromCharCode(Jt),pe+=cr}return fe}(this.buf,S,R)},readBytes:function(){var R=this.readVarint()+this.pos,S=this.buf.subarray(this.pos,R);return this.pos=R,S},readPackedVarint:function(R,S){if(this.type!==wu.Bytes)return R.push(this.readVarint(S));var F=Rv(this);for(R=R||[];this.pos127;);else if(S===wu.Bytes)this.pos=this.readVarint()+this.pos;else if(S===wu.Fixed32)this.pos+=4;else{if(S!==wu.Fixed64)throw new Error("Unimplemented type: "+S);this.pos+=8}},writeTag:function(R,S){this.writeVarint(R<<3|S)},realloc:function(R){for(var S=this.length||16;S268435455||R<0?function(S,F){var W,te;if(S>=0?(W=S%4294967296|0,te=S/4294967296|0):(te=~(-S/4294967296),4294967295^(W=~(-S%4294967296))?W=W+1|0:(W=0,te=te+1|0)),S>=18446744073709552e3||S<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");F.realloc(10),function(fe,pe,Fe){Fe.buf[Fe.pos++]=127&fe|128,fe>>>=7,Fe.buf[Fe.pos++]=127&fe|128,fe>>>=7,Fe.buf[Fe.pos++]=127&fe|128,fe>>>=7,Fe.buf[Fe.pos++]=127&fe|128,Fe.buf[Fe.pos]=127&(fe>>>=7)}(W,0,F),function(fe,pe){var Fe=(7&fe)<<4;pe.buf[pe.pos++]|=Fe|((fe>>>=3)?128:0),fe&&(pe.buf[pe.pos++]=127&fe|((fe>>>=7)?128:0),fe&&(pe.buf[pe.pos++]=127&fe|((fe>>>=7)?128:0),fe&&(pe.buf[pe.pos++]=127&fe|((fe>>>=7)?128:0),fe&&(pe.buf[pe.pos++]=127&fe|((fe>>>=7)?128:0),fe&&(pe.buf[pe.pos++]=127&fe)))))}(te,F)}(R,this):(this.realloc(4),this.buf[this.pos++]=127&R|(R>127?128:0),R<=127||(this.buf[this.pos++]=127&(R>>>=7)|(R>127?128:0),R<=127||(this.buf[this.pos++]=127&(R>>>=7)|(R>127?128:0),R<=127||(this.buf[this.pos++]=R>>>7&127))))},writeSVarint:function(R){this.writeVarint(R<0?2*-R-1:2*R)},writeBoolean:function(R){this.writeVarint(!!R)},writeString:function(R){R=String(R),this.realloc(4*R.length),this.pos++;var S=this.pos;this.pos=function(W,te,fe){for(var pe,Fe,Ke=0;Ke55295&&pe<57344){if(!Fe){pe>56319||Ke+1===te.length?(W[fe++]=239,W[fe++]=191,W[fe++]=189):Fe=pe;continue}if(pe<56320){W[fe++]=239,W[fe++]=191,W[fe++]=189,Fe=pe;continue}pe=Fe-55296<<10|pe-56320|65536,Fe=null}else Fe&&(W[fe++]=239,W[fe++]=191,W[fe++]=189,Fe=null);pe<128?W[fe++]=pe:(pe<2048?W[fe++]=pe>>6|192:(pe<65536?W[fe++]=pe>>12|224:(W[fe++]=pe>>18|240,W[fe++]=pe>>12&63|128),W[fe++]=pe>>6&63|128),W[fe++]=63&pe|128)}return fe}(this.buf,R,this.pos);var F=this.pos-S;F>=128&&qw(S,F,this),this.pos=S-1,this.writeVarint(F),this.pos+=F},writeFloat:function(R){this.realloc(4),L1(this.buf,R,this.pos,!0,23,4),this.pos+=4},writeDouble:function(R){this.realloc(8),L1(this.buf,R,this.pos,!0,52,8),this.pos+=8},writeBytes:function(R){var S=R.length;this.writeVarint(S),this.realloc(S);for(var F=0;F=128&&qw(F,W,this),this.pos=F-1,this.writeVarint(W),this.pos+=W},writeMessage:function(R,S,F){this.writeTag(R,wu.Bytes),this.writeRawMessage(S,F)},writePackedVarint:function(R,S){S.length&&this.writeMessage(R,Kx,S)},writePackedSVarint:function(R,S){S.length&&this.writeMessage(R,V9,S)},writePackedBoolean:function(R,S){S.length&&this.writeMessage(R,j9,S)},writePackedFloat:function(R,S){S.length&&this.writeMessage(R,G9,S)},writePackedDouble:function(R,S){S.length&&this.writeMessage(R,H9,S)},writePackedFixed32:function(R,S){S.length&&this.writeMessage(R,OQ,S)},writePackedSFixed32:function(R,S){S.length&&this.writeMessage(R,W9,S)},writePackedFixed64:function(R,S){S.length&&this.writeMessage(R,X9,S)},writePackedSFixed64:function(R,S){S.length&&this.writeMessage(R,Z9,S)},writeBytesField:function(R,S){this.writeTag(R,wu.Bytes),this.writeBytes(S)},writeFixed32Field:function(R,S){this.writeTag(R,wu.Fixed32),this.writeFixed32(S)},writeSFixed32Field:function(R,S){this.writeTag(R,wu.Fixed32),this.writeSFixed32(S)},writeFixed64Field:function(R,S){this.writeTag(R,wu.Fixed64),this.writeFixed64(S)},writeSFixed64Field:function(R,S){this.writeTag(R,wu.Fixed64),this.writeSFixed64(S)},writeVarintField:function(R,S){this.writeTag(R,wu.Varint),this.writeVarint(S)},writeSVarintField:function(R,S){this.writeTag(R,wu.Varint),this.writeSVarint(S)},writeStringField:function(R,S){this.writeTag(R,wu.Bytes),this.writeString(S)},writeFloatField:function(R,S){this.writeTag(R,wu.Fixed32),this.writeFloat(S)},writeDoubleField:function(R,S){this.writeTag(R,wu.Fixed64),this.writeDouble(S)},writeBooleanField:function(R,S){this.writeVarintField(R,!!S)}};var lS=o(Sd);let uS=3;function qQ(R,S,F){R===1&&F.readMessage(Y9,S)}function Y9(R,S,F){if(R===3){let{id:W,bitmap:te,width:fe,height:pe,left:Fe,top:Ke,advance:ct}=F.readMessage(MC,{});S.push({id:W,bitmap:new na({width:fe+2*uS,height:pe+2*uS},te),metrics:{width:fe,height:pe,left:Fe,top:Ke,advance:ct}})}}function MC(R,S,F){R===1?S.id=F.readVarint():R===2?S.bitmap=F.readBytes():R===3?S.width=F.readVarint():R===4?S.height=F.readVarint():R===5?S.left=F.readSVarint():R===6?S.top=F.readSVarint():R===7&&(S.advance=F.readVarint())}let EC=uS;function cS(R){let S=0,F=0;for(let pe of R)S+=pe.w*pe.h,F=Math.max(F,pe.w);R.sort((pe,Fe)=>Fe.h-pe.h);let W=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(S/.95)),F),h:1/0}],te=0,fe=0;for(let pe of R)for(let Fe=W.length-1;Fe>=0;Fe--){let Ke=W[Fe];if(!(pe.w>Ke.w||pe.h>Ke.h)){if(pe.x=Ke.x,pe.y=Ke.y,fe=Math.max(fe,pe.y+pe.h),te=Math.max(te,pe.x+pe.w),pe.w===Ke.w&&pe.h===Ke.h){let ct=W.pop();Fe=0&&W>=S&&Uw[this.text.charCodeAt(W)];W--)F--;this.text=this.text.substring(S,F),this.sectionIndex=this.sectionIndex.slice(S,F)}substring(S,F){let W=new P1;return W.text=this.text.substring(S,F),W.sectionIndex=this.sectionIndex.slice(S,F),W.sections=this.sections,W}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((S,F)=>Math.max(S,this.sections[F].scale),0)}addTextSection(S,F){this.text+=S.text,this.sections.push($x.forText(S.scale,S.fontStack||F));let W=this.sections.length-1;for(let te=0;te=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Qx(R,S,F,W,te,fe,pe,Fe,Ke,ct,Lt,Jt,cr,mr,Pr){let zr=P1.fromFeature(R,te),ui;Jt===i.ah.vertical&&zr.verticalizePunctuation();let{processBidirectionalText:yi,processStyledBidirectionalText:vn}=ys;if(yi&&zr.sections.length===1){ui=[];let Tn=yi(zr.toString(),I1(zr,ct,fe,S,W,mr));for(let pa of Tn){let ro=new P1;ro.text=pa,ro.sections=zr.sections;for(let Vo=0;Vo0&&tp>Df&&(Df=tp)}else{let Gc=ro[ru.fontStack],Yf=Gc&&Gc[$u];if(Yf&&Yf.rect)q1=Yf.rect,ff=Yf.metrics;else{let tp=pa[ru.fontStack],yg=tp&&tp[$u];if(!yg)continue;ff=yg.metrics}zv=(Lh-ru.scale)*tu}ep?(Tn.verticalizable=!0,Yh.push({glyph:$u,imageName:p0,x:$o,y:Ju+zv,vertical:ep,scale:ru.scale,fontStack:ru.fontStack,sectionIndex:pc,metrics:ff,rect:q1}),$o+=Gp*ru.scale+Xn):(Yh.push({glyph:$u,imageName:p0,x:$o,y:Ju+zv,vertical:ep,scale:ru.scale,fontStack:ru.fontStack,sectionIndex:pc,metrics:ff,rect:q1}),$o+=ff.advance*ru.scale+Xn)}Yh.length!==0&&(qu=Math.max($o-Xn,qu),cm(Yh,0,Yh.length-1,Qv,Df)),$o=0;let Fv=sa*Lh+Df;cd.lineOffset=Math.max(Df,Ed),Ju+=Fv,kh=Math.max(Fv,kh),++ud}var Ch;let Vd=Ju-Eh,{horizontalAlign:Gd,verticalAlign:Hd}=Gw(Mo);(function(Af,Lh,Ed,cd,Yh,Df,Fv,lv,ru){let pc=(Lh-Ed)*Yh,$u=0;$u=Df!==Fv?-lv*cd-Eh:(-cd*ru+.5)*Fv;for(let zv of Af)for(let ff of zv.positionedGlyphs)ff.x+=pc,ff.y+=$u})(Tn.positionedLines,Qv,Gd,Hd,qu,kh,sa,Vd,Xa.length),Tn.top+=-Hd*Vd,Tn.bottom=Tn.top+Vd,Tn.left+=-Gd*qu,Tn.right=Tn.left+qu}(un,S,F,W,ui,pe,Fe,Ke,Jt,ct,cr,Pr),!function(Tn){for(let pa of Tn)if(pa.positionedGlyphs.length!==0)return!1;return!0}(zi)&&un}let Uw={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},K9={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},J9={40:!0};function kC(R,S,F,W,te,fe){if(S.imageName){let pe=W[S.imageName];return pe?pe.displaySize[0]*S.scale*tu/fe+te:0}{let pe=F[S.fontStack],Fe=pe&&pe[R];return Fe?Fe.metrics.advance*S.scale+te:0}}function CC(R,S,F,W){let te=Math.pow(R-S,2);return W?R=0,ct=0;for(let Jt=0;Jtct){let Lt=Math.ceil(fe/ct);te*=Lt/pe,pe=Lt}return{x1:W,y1:te,x2:W+fe,y2:te+pe}}function IC(R,S,F,W,te,fe){let pe=R.image,Fe;if(pe.content){let ui=pe.content,yi=pe.pixelRatio||1;Fe=[ui[0]/yi,ui[1]/yi,pe.displaySize[0]-ui[2]/yi,pe.displaySize[1]-ui[3]/yi]}let Ke=S.left*fe,ct=S.right*fe,Lt,Jt,cr,mr;F==="width"||F==="both"?(mr=te[0]+Ke-W[3],Jt=te[0]+ct+W[1]):(mr=te[0]+(Ke+ct-pe.displaySize[0])/2,Jt=mr+pe.displaySize[0]);let Pr=S.top*fe,zr=S.bottom*fe;return F==="height"||F==="both"?(Lt=te[1]+Pr-W[0],cr=te[1]+zr+W[2]):(Lt=te[1]+(Pr+zr-pe.displaySize[1])/2,cr=Lt+pe.displaySize[1]),{image:pe,top:Lt,right:Jt,bottom:cr,left:mr,collisionPadding:Fe}}let tb=255,v0=128,fm=tb*v0;function RC(R,S){let{expression:F}=S;if(F.kind==="constant")return{kind:"constant",layoutSize:F.evaluate(new rs(R+1))};if(F.kind==="source")return{kind:"source"};{let{zoomStops:W,interpolationType:te}=F,fe=0;for(;fepe.id),this.index=S.index,this.pixelRatio=S.pixelRatio,this.sourceLayerIndex=S.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Ri([]),this.placementViewportMatrix=Ri([]);let F=this.layers[0]._unevaluatedLayout._values;this.textSizeData=RC(this.zoom,F["text-size"]),this.iconSizeData=RC(this.zoom,F["icon-size"]);let W=this.layers[0].layout,te=W.get("symbol-sort-key"),fe=W.get("symbol-z-order");this.canOverlap=fS(W,"text-overlap","text-allow-overlap")!=="never"||fS(W,"icon-overlap","icon-allow-overlap")!=="never"||W.get("text-ignore-placement")||W.get("icon-ignore-placement"),this.sortFeaturesByKey=fe!=="viewport-y"&&!te.isConstant(),this.sortFeaturesByY=(fe==="viewport-y"||fe==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,W.get("symbol-placement")==="point"&&(this.writingModes=W.get("text-writing-mode").map(pe=>i.ah[pe])),this.stateDependentLayerIds=this.layers.filter(pe=>pe.isStateDependent()).map(pe=>pe.id),this.sourceID=S.sourceID}createArrays(){this.text=new vS(new Ms(this.layers,this.zoom,S=>/^text/.test(S))),this.icon=new vS(new Ms(this.layers,this.zoom,S=>/^icon/.test(S))),this.glyphOffsetArray=new Co,this.lineVertexArray=new Qa,this.symbolInstances=new $a,this.textAnchorOffsets=new Bo}calculateGlyphDependencies(S,F,W,te,fe){for(let pe=0;pe0)&&(pe.value.kind!=="constant"||pe.value.value.length>0),Lt=Ke.value.kind!=="constant"||!!Ke.value.value||Object.keys(Ke.parameters).length>0,Jt=fe.get("symbol-sort-key");if(this.features=[],!ct&&!Lt)return;let cr=F.iconDependencies,mr=F.glyphDependencies,Pr=F.availableImages,zr=new rs(this.zoom);for(let{feature:ui,id:yi,index:vn,sourceLayerIndex:zi}of S){let un=te._featureFilter.needGeometry,Tn=Sl(ui,un);if(!te._featureFilter.filter(zr,Tn,W))continue;let pa,ro;if(un||(Tn.geometry=$s(ui)),ct){let Xa=te.getValueAndResolveTokens("text-field",Tn,W,Pr),sa=ri.factory(Xa),Mo=this.hasRTLText=this.hasRTLText||dS(sa);(!Mo||ys.getRTLTextPluginStatus()==="unavailable"||Mo&&ys.isParsed())&&(pa=sm(sa,te,Tn))}if(Lt){let Xa=te.getValueAndResolveTokens("icon-image",Tn,W,Pr);ro=Xa instanceof tn?Xa:tn.fromString(Xa)}if(!pa&&!ro)continue;let Vo=this.sortFeaturesByKey?Jt.evaluate(Tn,{},W):void 0;if(this.features.push({id:yi,text:pa,icon:ro,index:vn,sourceLayerIndex:zi,geometry:Tn.geometry,properties:ui.properties,type:Q9[ui.type],sortKey:Vo}),ro&&(cr[ro.name]=!0),pa){let Xa=pe.evaluate(Tn,{},W).join(","),sa=fe.get("text-rotation-alignment")!=="viewport"&&fe.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(i.ah.vertical)>=0;for(let Mo of pa.sections)if(Mo.image)cr[Mo.image.name]=!0;else{let fo=Ka(pa.toString()),lo=Mo.fontStack||Xa,Xn=mr[lo]=mr[lo]||{};this.calculateGlyphDependencies(Mo.text,Xn,sa,this.allowVerticalPlacement,fo)}}}fe.get("symbol-placement")==="line"&&(this.features=function(ui){let yi={},vn={},zi=[],un=0;function Tn(Xa){zi.push(ui[Xa]),un++}function pa(Xa,sa,Mo){let fo=vn[Xa];return delete vn[Xa],vn[sa]=fo,zi[fo].geometry[0].pop(),zi[fo].geometry[0]=zi[fo].geometry[0].concat(Mo[0]),fo}function ro(Xa,sa,Mo){let fo=yi[sa];return delete yi[sa],yi[Xa]=fo,zi[fo].geometry[0].shift(),zi[fo].geometry[0]=Mo[0].concat(zi[fo].geometry[0]),fo}function Vo(Xa,sa,Mo){let fo=Mo?sa[0][sa[0].length-1]:sa[0][0];return`${Xa}:${fo.x}:${fo.y}`}for(let Xa=0;XaXa.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((ui,yi)=>ui.sortKey-yi.sortKey)}update(S,F,W){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(S,F,this.layers,W),this.icon.programConfigurations.updatePaintArrays(S,F,this.layers,W))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(S){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(S),this.iconCollisionBox.upload(S)),this.text.upload(S,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(S,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(S,F){let W=this.lineVertexArray.length;if(S.segment!==void 0){let te=S.dist(F[S.segment+1]),fe=S.dist(F[S.segment]),pe={};for(let Fe=S.segment+1;Fe=0;Fe--)pe[Fe]={x:F[Fe].x,y:F[Fe].y,tileUnitDistanceFromAnchor:fe},Fe>0&&(fe+=F[Fe-1].dist(F[Fe]));for(let Fe=0;Fe0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(S,F){let W=S.placedSymbolArray.get(F),te=W.vertexStartIndex+4*W.numGlyphs;for(let fe=W.vertexStartIndex;fete[Fe]-te[Ke]||fe[Ke]-fe[Fe]),pe}addToSortKeyRanges(S,F){let W=this.sortKeyRanges[this.sortKeyRanges.length-1];W&&W.sortKey===F?W.symbolInstanceEnd=S+1:this.sortKeyRanges.push({sortKey:F,symbolInstanceStart:S,symbolInstanceEnd:S+1})}sortFeatures(S){if(this.sortFeaturesByY&&this.sortedAngle!==S&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(S),this.sortedAngle=S,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let F of this.symbolInstanceIndexes){let W=this.symbolInstances.get(F);this.featureSortOrder.push(W.featureIndex),[W.rightJustifiedTextSymbolIndex,W.centerJustifiedTextSymbolIndex,W.leftJustifiedTextSymbolIndex].forEach((te,fe,pe)=>{te>=0&&pe.indexOf(te)===fe&&this.addIndicesForPlacedSymbol(this.text,te)}),W.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,W.verticalPlacedTextSymbolIndex),W.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,W.placedIconSymbolIndex),W.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,W.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let Tf,rb;Fi("SymbolBucket",R1,{omit:["layers","collisionBoxArray","features","compareText"]}),R1.MAX_GLYPHS=65535,R1.addDynamicAttributes=hS;var jw={get paint(){return rb=rb||new ue({"icon-opacity":new oo(ce.paint_symbol["icon-opacity"]),"icon-color":new oo(ce.paint_symbol["icon-color"]),"icon-halo-color":new oo(ce.paint_symbol["icon-halo-color"]),"icon-halo-width":new oo(ce.paint_symbol["icon-halo-width"]),"icon-halo-blur":new oo(ce.paint_symbol["icon-halo-blur"]),"icon-translate":new Ua(ce.paint_symbol["icon-translate"]),"icon-translate-anchor":new Ua(ce.paint_symbol["icon-translate-anchor"]),"text-opacity":new oo(ce.paint_symbol["text-opacity"]),"text-color":new oo(ce.paint_symbol["text-color"],{runtimeType:er,getOverride:R=>R.textColor,hasOverride:R=>!!R.textColor}),"text-halo-color":new oo(ce.paint_symbol["text-halo-color"]),"text-halo-width":new oo(ce.paint_symbol["text-halo-width"]),"text-halo-blur":new oo(ce.paint_symbol["text-halo-blur"]),"text-translate":new Ua(ce.paint_symbol["text-translate"]),"text-translate-anchor":new Ua(ce.paint_symbol["text-translate-anchor"])})},get layout(){return Tf=Tf||new ue({"symbol-placement":new Ua(ce.layout_symbol["symbol-placement"]),"symbol-spacing":new Ua(ce.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Ua(ce.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new oo(ce.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Ua(ce.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Ua(ce.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Ua(ce.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Ua(ce.layout_symbol["icon-ignore-placement"]),"icon-optional":new Ua(ce.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Ua(ce.layout_symbol["icon-rotation-alignment"]),"icon-size":new oo(ce.layout_symbol["icon-size"]),"icon-text-fit":new Ua(ce.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Ua(ce.layout_symbol["icon-text-fit-padding"]),"icon-image":new oo(ce.layout_symbol["icon-image"]),"icon-rotate":new oo(ce.layout_symbol["icon-rotate"]),"icon-padding":new oo(ce.layout_symbol["icon-padding"]),"icon-keep-upright":new Ua(ce.layout_symbol["icon-keep-upright"]),"icon-offset":new oo(ce.layout_symbol["icon-offset"]),"icon-anchor":new oo(ce.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Ua(ce.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Ua(ce.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Ua(ce.layout_symbol["text-rotation-alignment"]),"text-field":new oo(ce.layout_symbol["text-field"]),"text-font":new oo(ce.layout_symbol["text-font"]),"text-size":new oo(ce.layout_symbol["text-size"]),"text-max-width":new oo(ce.layout_symbol["text-max-width"]),"text-line-height":new Ua(ce.layout_symbol["text-line-height"]),"text-letter-spacing":new oo(ce.layout_symbol["text-letter-spacing"]),"text-justify":new oo(ce.layout_symbol["text-justify"]),"text-radial-offset":new oo(ce.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Ua(ce.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new oo(ce.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new oo(ce.layout_symbol["text-anchor"]),"text-max-angle":new Ua(ce.layout_symbol["text-max-angle"]),"text-writing-mode":new Ua(ce.layout_symbol["text-writing-mode"]),"text-rotate":new oo(ce.layout_symbol["text-rotate"]),"text-padding":new Ua(ce.layout_symbol["text-padding"]),"text-keep-upright":new Ua(ce.layout_symbol["text-keep-upright"]),"text-transform":new oo(ce.layout_symbol["text-transform"]),"text-offset":new oo(ce.layout_symbol["text-offset"]),"text-allow-overlap":new Ua(ce.layout_symbol["text-allow-overlap"]),"text-overlap":new Ua(ce.layout_symbol["text-overlap"]),"text-ignore-placement":new Ua(ce.layout_symbol["text-ignore-placement"]),"text-optional":new Ua(ce.layout_symbol["text-optional"])})}};class ib{constructor(S){if(S.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=S.property.overrides?S.property.overrides.runtimeType:Gt,this.defaultValue=S}evaluate(S){if(S.formattedSection){let F=this.defaultValue.property.overrides;if(F&&F.hasOverride(S.formattedSection))return F.getOverride(S.formattedSection)}return S.feature&&S.featureState?this.defaultValue.evaluate(S.feature,S.featureState):this.defaultValue.property.specification.default}eachChild(S){this.defaultValue.isConstant()||S(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Fi("FormatSectionOverride",ib,{omit:["defaultValue"]});class gy extends B{constructor(S){super(S,jw)}recalculate(S,F){if(super.recalculate(S,F),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){let W=this.layout.get("text-writing-mode");if(W){let te=[];for(let fe of W)te.indexOf(fe)<0&&te.push(fe);this.layout._values["text-writing-mode"]=te}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(S,F,W,te){let fe=this.layout.get(S).evaluate(F,{},W,te),pe=this._unevaluatedLayout._values[S];return pe.isDataDriven()||Dc(pe.value)||!fe?fe:function(Fe,Ke){return Ke.replace(/{([^{}]+)}/g,(ct,Lt)=>Fe&&Lt in Fe?String(Fe[Lt]):"")}(F.properties,fe)}createBucket(S){return new R1(S)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let S of jw.paint.overridableProperties){if(!gy.hasPaintOverride(this.layout,S))continue;let F=this.paint.get(S),W=new ib(F),te=new Eu(W,F.property.specification),fe=null;fe=F.value.kind==="constant"||F.value.kind==="source"?new bc("source",te):new hu("composite",te,F.value.zoomStops),this.paint._values[S]=new xu(F.property,fe,F.parameters)}}_handleOverridablePaintPropertyUpdate(S,F,W){return!(!this.layout||F.isDataDriven()||W.isDataDriven())&&gy.hasPaintOverride(this.layout,S)}static hasPaintOverride(S,F){let W=S.get("text-field"),te=jw.paint.properties[F],fe=!1,pe=Fe=>{for(let Ke of Fe)if(te.overrides&&te.overrides.hasOverride(Ke))return void(fe=!0)};if(W.value.kind==="constant"&&W.value.value instanceof ri)pe(W.value.value.sections);else if(W.value.kind==="source"){let Fe=ct=>{fe||(ct instanceof ua&&Sn(ct.value)===ti?pe(ct.value.sections):ct instanceof Yl?pe(ct.sections):ct.eachChild(Fe))},Ke=W.value;Ke._styleExpression&&Fe(Ke._styleExpression.expression)}return fe}}let DC;var nb={get paint(){return DC=DC||new ue({"background-color":new Ua(ce.paint_background["background-color"]),"background-pattern":new hc(ce.paint_background["background-pattern"]),"background-opacity":new Ua(ce.paint_background["background-opacity"])})}};class tO extends B{constructor(S){super(S,nb)}}let pS;var FC={get paint(){return pS=pS||new ue({"raster-opacity":new Ua(ce.paint_raster["raster-opacity"]),"raster-hue-rotate":new Ua(ce.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Ua(ce.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Ua(ce.paint_raster["raster-brightness-max"]),"raster-saturation":new Ua(ce.paint_raster["raster-saturation"]),"raster-contrast":new Ua(ce.paint_raster["raster-contrast"]),"raster-resampling":new Ua(ce.paint_raster["raster-resampling"]),"raster-fade-duration":new Ua(ce.paint_raster["raster-fade-duration"])})}};class ab extends B{constructor(S){super(S,FC)}}class gS extends B{constructor(S){super(S,{}),this.onAdd=F=>{this.implementation.onAdd&&this.implementation.onAdd(F,F.painter.context.gl)},this.onRemove=F=>{this.implementation.onRemove&&this.implementation.onRemove(F,F.painter.context.gl)},this.implementation=S}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class mS{constructor(S){this._methodToThrottle=S,this._triggered=!1,typeof MessageChannel!="undefined"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._methodToThrottle()},0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let yS=63710088e-1;class pg{constructor(S,F){if(isNaN(S)||isNaN(F))throw new Error(`Invalid LngLat object: (${S}, ${F})`);if(this.lng=+S,this.lat=+F,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new pg(T(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(S){let F=Math.PI/180,W=this.lat*F,te=S.lat*F,fe=Math.sin(W)*Math.sin(te)+Math.cos(W)*Math.cos(te)*Math.cos((S.lng-this.lng)*F);return yS*Math.acos(Math.min(fe,1))}static convert(S){if(S instanceof pg)return S;if(Array.isArray(S)&&(S.length===2||S.length===3))return new pg(Number(S[0]),Number(S[1]));if(!Array.isArray(S)&&typeof S=="object"&&S!==null)return new pg(Number("lng"in S?S.lng:S.lon),Number(S.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}let D1=2*Math.PI*yS;function zC(R){return D1*Math.cos(R*Math.PI/180)}function Ww(R){return(180+R)/360}function OC(R){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R*Math.PI/360)))/360}function Xw(R,S){return R/zC(S)}function ob(R){return 360/Math.PI*Math.atan(Math.exp((180-360*R)*Math.PI/180))-90}class sb{constructor(S,F,W=0){this.x=+S,this.y=+F,this.z=+W}static fromLngLat(S,F=0){let W=pg.convert(S);return new sb(Ww(W.lng),OC(W.lat),Xw(F,W.lat))}toLngLat(){return new pg(360*this.x-180,ob(this.y))}toAltitude(){return this.z*zC(ob(this.y))}meterInMercatorCoordinateUnits(){return 1/D1*(S=ob(this.y),1/Math.cos(S*Math.PI/180));var S}}function yp(R,S,F){var W=2*Math.PI*6378137/256/Math.pow(2,F);return[R*W-2*Math.PI*6378137/2,S*W-2*Math.PI*6378137/2]}class _S{constructor(S,F,W){if(!function(te,fe,pe){return!(te<0||te>25||pe<0||pe>=Math.pow(2,te)||fe<0||fe>=Math.pow(2,te))}(S,F,W))throw new Error(`x=${F}, y=${W}, z=${S} outside of bounds. 0<=x<${Math.pow(2,S)}, 0<=y<${Math.pow(2,S)} 0<=z<=25 `);this.z=S,this.x=F,this.y=W,this.key=lb(0,S,S,F,W)}equals(S){return this.z===S.z&&this.x===S.x&&this.y===S.y}url(S,F,W){let te=(pe=this.y,Fe=this.z,Ke=yp(256*(fe=this.x),256*(pe=Math.pow(2,Fe)-pe-1),Fe),ct=yp(256*(fe+1),256*(pe+1),Fe),Ke[0]+","+Ke[1]+","+ct[0]+","+ct[1]);var fe,pe,Fe,Ke,ct;let Lt=function(Jt,cr,mr){let Pr,zr="";for(let ui=Jt;ui>0;ui--)Pr=1<1?"@2x":"").replace(/{quadkey}/g,Lt).replace(/{bbox-epsg-3857}/g,te)}isChildOf(S){let F=this.z-S.z;return F>0&&S.x===this.x>>F&&S.y===this.y>>F}getTilePoint(S){let F=Math.pow(2,this.z);return new u((S.x*F-this.x)*ja,(S.y*F-this.y)*ja)}toString(){return`${this.z}/${this.x}/${this.y}`}}class qC{constructor(S,F){this.wrap=S,this.canonical=F,this.key=lb(S,F.z,F.z,F.x,F.y)}}class $v{constructor(S,F,W,te,fe){if(S= z; overscaledZ = ${S}; z = ${W}`);this.overscaledZ=S,this.wrap=F,this.canonical=new _S(W,+te,+fe),this.key=lb(F,S,W,te,fe)}clone(){return new $v(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(S){return this.overscaledZ===S.overscaledZ&&this.wrap===S.wrap&&this.canonical.equals(S.canonical)}scaledTo(S){if(S>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${S}; overscaledZ = ${this.overscaledZ}`);let F=this.canonical.z-S;return S>this.canonical.z?new $v(S,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new $v(S,this.wrap,S,this.canonical.x>>F,this.canonical.y>>F)}calculateScaledKey(S,F){if(S>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${S}; overscaledZ = ${this.overscaledZ}`);let W=this.canonical.z-S;return S>this.canonical.z?lb(this.wrap*+F,S,this.canonical.z,this.canonical.x,this.canonical.y):lb(this.wrap*+F,S,S,this.canonical.x>>W,this.canonical.y>>W)}isChildOf(S){if(S.wrap!==this.wrap)return!1;let F=this.canonical.z-S.canonical.z;return S.overscaledZ===0||S.overscaledZ>F&&S.canonical.y===this.canonical.y>>F}children(S){if(this.overscaledZ>=S)return[new $v(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let F=this.canonical.z+1,W=2*this.canonical.x,te=2*this.canonical.y;return[new $v(F,this.wrap,F,W,te),new $v(F,this.wrap,F,W+1,te),new $v(F,this.wrap,F,W,te+1),new $v(F,this.wrap,F,W+1,te+1)]}isLessThan(S){return this.wrapS.wrap)&&(this.overscaledZS.overscaledZ)&&(this.canonical.xS.canonical.x)&&this.canonical.ythis.max&&(this.max=Jt),Jt=this.dim+1||F<-1||F>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(F+1)*this.stride+(S+1)}unpack(S,F,W){return S*this.redFactor+F*this.greenFactor+W*this.blueFactor-this.baseShift}getPixels(){return new Ki({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(S,F,W){if(this.dim!==S.dim)throw new Error("dem dimension mismatch");let te=F*this.dim,fe=F*this.dim+this.dim,pe=W*this.dim,Fe=W*this.dim+this.dim;switch(F){case-1:te=fe-1;break;case 1:fe=te+1}switch(W){case-1:pe=Fe-1;break;case 1:Fe=pe+1}let Ke=-F*this.dim,ct=-W*this.dim;for(let Lt=pe;Lt=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${S} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[S]}}class xS{constructor(S,F,W,te,fe){this.type="Feature",this._vectorTileFeature=S,S._z=F,S._x=W,S._y=te,this.properties=S.properties,this.id=fe}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(S){this._geometry=S}toJSON(){let S={geometry:this.geometry};for(let F in this)F!=="_geometry"&&F!=="_vectorTileFeature"&&(S[F]=this[F]);return S}}class my{constructor(S,F){this.tileID=S,this.x=S.canonical.x,this.y=S.canonical.y,this.z=S.canonical.z,this.grid=new Qi(ja,16,0),this.grid3D=new Qi(ja,16,0),this.featureIndexArray=new Ts,this.promoteId=F}insert(S,F,W,te,fe,pe){let Fe=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(W,te,fe);let Ke=pe?this.grid3D:this.grid;for(let ct=0;ct=0&&Jt[3]>=0&&Ke.insert(Fe,Jt[0],Jt[1],Jt[2],Jt[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new br.VectorTile(new lS(this.rawTileData)).layers,this.sourceLayerCoder=new NC(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(S,F,W,te){this.loadVTLayers();let fe=S.params||{},pe=ja/S.tileSize/S.scale,Fe=Fc(fe.filter),Ke=S.queryGeometry,ct=S.queryPadding*pe,Lt=VC(Ke),Jt=this.grid.query(Lt.minX-ct,Lt.minY-ct,Lt.maxX+ct,Lt.maxY+ct),cr=VC(S.cameraQueryGeometry),mr=this.grid3D.query(cr.minX-ct,cr.minY-ct,cr.maxX+ct,cr.maxY+ct,(ui,yi,vn,zi)=>function(un,Tn,pa,ro,Vo){for(let sa of un)if(Tn<=sa.x&&pa<=sa.y&&ro>=sa.x&&Vo>=sa.y)return!0;let Xa=[new u(Tn,pa),new u(Tn,Vo),new u(ro,Vo),new u(ro,pa)];if(un.length>2){for(let sa of Xa)if(Ui(un,sa))return!0}for(let sa=0;sa(zi||(zi=$s(un)),Tn.queryIntersectsFeature(Ke,un,pa,zi,this.z,S.transform,pe,S.pixelPosMatrix)))}return Pr}loadMatchingFeature(S,F,W,te,fe,pe,Fe,Ke,ct,Lt,Jt){let cr=this.bucketLayerIDs[F];if(pe&&!function(ui,yi){for(let vn=0;vn=0)return!0;return!1}(pe,cr))return;let mr=this.sourceLayerCoder.decode(W),Pr=this.vtLayers[mr].feature(te);if(fe.needGeometry){let ui=Sl(Pr,!0);if(!fe.filter(new rs(this.tileID.overscaledZ),ui,this.tileID.canonical))return}else if(!fe.filter(new rs(this.tileID.overscaledZ),Pr))return;let zr=this.getId(Pr,mr);for(let ui=0;ui{let Fe=S instanceof Ac?S.get(pe):null;return Fe&&Fe.evaluate?Fe.evaluate(F,W,te):Fe})}function VC(R){let S=1/0,F=1/0,W=-1/0,te=-1/0;for(let fe of R)S=Math.min(S,fe.x),F=Math.min(F,fe.y),W=Math.max(W,fe.x),te=Math.max(te,fe.y);return{minX:S,minY:F,maxX:W,maxY:te}}function rO(R,S){return S-R}function GC(R,S,F,W,te){let fe=[];for(let pe=0;pe=W&&Jt.x>=W||(Lt.x>=W?Lt=new u(W,Lt.y+(W-Lt.x)/(Jt.x-Lt.x)*(Jt.y-Lt.y))._round():Jt.x>=W&&(Jt=new u(W,Lt.y+(W-Lt.x)/(Jt.x-Lt.x)*(Jt.y-Lt.y))._round()),Lt.y>=te&&Jt.y>=te||(Lt.y>=te?Lt=new u(Lt.x+(te-Lt.y)/(Jt.y-Lt.y)*(Jt.x-Lt.x),te)._round():Jt.y>=te&&(Jt=new u(Lt.x+(te-Lt.y)/(Jt.y-Lt.y)*(Jt.x-Lt.x),te)._round()),Ke&&Lt.equals(Ke[Ke.length-1])||(Ke=[Lt],fe.push(Ke)),Ke.push(Jt)))))}}return fe}Fi("FeatureIndex",my,{omit:["rawTileData","sourceLayerCoder"]});class gg extends u{constructor(S,F,W,te){super(S,F),this.angle=W,te!==void 0&&(this.segment=te)}clone(){return new gg(this.x,this.y,this.angle,this.segment)}}function bS(R,S,F,W,te){if(S.segment===void 0||F===0)return!0;let fe=S,pe=S.segment+1,Fe=0;for(;Fe>-F/2;){if(pe--,pe<0)return!1;Fe-=R[pe].dist(fe),fe=R[pe]}Fe+=R[pe].dist(R[pe+1]),pe++;let Ke=[],ct=0;for(;FeW;)ct-=Ke.shift().angleDelta;if(ct>te)return!1;pe++,Fe+=Lt.dist(Jt)}return!0}function HC(R){let S=0;for(let F=0;Fct){let Pr=(ct-Ke)/mr,zr=Lo.number(Jt.x,cr.x,Pr),ui=Lo.number(Jt.y,cr.y,Pr),yi=new gg(zr,ui,cr.angleTo(Jt),Lt);return yi._round(),!pe||bS(R,yi,Fe,pe,S)?yi:void 0}Ke+=mr}}function nO(R,S,F,W,te,fe,pe,Fe,Ke){let ct=jC(W,fe,pe),Lt=WC(W,te),Jt=Lt*pe,cr=R[0].x===0||R[0].x===Ke||R[0].y===0||R[0].y===Ke;return S-Jt=0&&un=0&&Tn=0&&cr+ct<=Lt){let pa=new gg(un,Tn,vn,Pr);pa._round(),W&&!bS(R,pa,fe,W,te)||mr.push(pa)}}Jt+=yi}return Fe||mr.length||pe||(mr=XC(R,Jt/2,F,W,te,fe,pe,!0,Ke)),mr}Fi("Anchor",gg);let F1=Md;function ZC(R,S,F,W){let te=[],fe=R.image,pe=fe.pixelRatio,Fe=fe.paddedRect.w-2*F1,Ke=fe.paddedRect.h-2*F1,ct={x1:R.left,y1:R.top,x2:R.right,y2:R.bottom},Lt=fe.stretchX||[[0,Fe]],Jt=fe.stretchY||[[0,Ke]],cr=(Xn,Ro)=>Xn+Ro[1]-Ro[0],mr=Lt.reduce(cr,0),Pr=Jt.reduce(cr,0),zr=Fe-mr,ui=Ke-Pr,yi=0,vn=mr,zi=0,un=Pr,Tn=0,pa=zr,ro=0,Vo=ui;if(fe.content&&W){let Xn=fe.content,Ro=Xn[2]-Xn[0],uo=Xn[3]-Xn[1];(fe.textFitWidth||fe.textFitHeight)&&(ct=PC(R)),yi=mg(Lt,0,Xn[0]),zi=mg(Jt,0,Xn[1]),vn=mg(Lt,Xn[0],Xn[2]),un=mg(Jt,Xn[1],Xn[3]),Tn=Xn[0]-yi,ro=Xn[1]-zi,pa=Ro-vn,Vo=uo-un}let Xa=ct.x1,sa=ct.y1,Mo=ct.x2-Xa,fo=ct.y2-sa,lo=(Xn,Ro,uo,$o)=>{let Ju=Zw(Xn.stretch-yi,vn,Mo,Xa),qu=z1(Xn.fixed-Tn,pa,Xn.stretch,mr),kh=Zw(Ro.stretch-zi,un,fo,sa),Qv=z1(Ro.fixed-ro,Vo,Ro.stretch,Pr),ud=Zw(uo.stretch-yi,vn,Mo,Xa),Ch=z1(uo.fixed-Tn,pa,uo.stretch,mr),Vd=Zw($o.stretch-zi,un,fo,sa),Gd=z1($o.fixed-ro,Vo,$o.stretch,Pr),Hd=new u(Ju,kh),Af=new u(ud,kh),Lh=new u(ud,Vd),Ed=new u(Ju,Vd),cd=new u(qu/pe,Qv/pe),Yh=new u(Ch/pe,Gd/pe),Df=S*Math.PI/180;if(Df){let ru=Math.sin(Df),pc=Math.cos(Df),$u=[pc,-ru,ru,pc];Hd._matMult($u),Af._matMult($u),Ed._matMult($u),Lh._matMult($u)}let Fv=Xn.stretch+Xn.fixed,lv=Ro.stretch+Ro.fixed;return{tl:Hd,tr:Af,bl:Ed,br:Lh,tex:{x:fe.paddedRect.x+F1+Fv,y:fe.paddedRect.y+F1+lv,w:uo.stretch+uo.fixed-Fv,h:$o.stretch+$o.fixed-lv},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:cd,pixelOffsetBR:Yh,minFontScaleX:pa/pe/Mo,minFontScaleY:Vo/pe/fo,isSDF:F}};if(W&&(fe.stretchX||fe.stretchY)){let Xn=YC(Lt,zr,mr),Ro=YC(Jt,ui,Pr);for(let uo=0;uo0&&(zr=Math.max(10,zr),this.circleDiameter=zr)}else{let cr=!((Jt=pe.image)===null||Jt===void 0)&&Jt.content&&(pe.image.textFitWidth||pe.image.textFitHeight)?PC(pe):{x1:pe.left,y1:pe.top,x2:pe.right,y2:pe.bottom};cr.y1=cr.y1*Fe-Ke[0],cr.y2=cr.y2*Fe+Ke[2],cr.x1=cr.x1*Fe-Ke[3],cr.x2=cr.x2*Fe+Ke[1];let mr=pe.collisionPadding;if(mr&&(cr.x1-=mr[0]*Fe,cr.y1-=mr[1]*Fe,cr.x2+=mr[2]*Fe,cr.y2+=mr[3]*Fe),Lt){let Pr=new u(cr.x1,cr.y1),zr=new u(cr.x2,cr.y1),ui=new u(cr.x1,cr.y2),yi=new u(cr.x2,cr.y2),vn=Lt*Math.PI/180;Pr._rotate(vn),zr._rotate(vn),ui._rotate(vn),yi._rotate(vn),cr.x1=Math.min(Pr.x,zr.x,ui.x,yi.x),cr.x2=Math.max(Pr.x,zr.x,ui.x,yi.x),cr.y1=Math.min(Pr.y,zr.y,ui.y,yi.y),cr.y2=Math.max(Pr.y,zr.y,ui.y,yi.y)}S.emplaceBack(F.x,F.y,cr.x1,cr.y1,cr.x2,cr.y2,W,te,fe)}this.boxEndIndex=S.length}}class Vp{constructor(S=[],F=(W,te)=>Wte?1:0){if(this.data=S,this.length=this.data.length,this.compare=F,this.length>0)for(let W=(this.length>>1)-1;W>=0;W--)this._down(W)}push(S){this.data.push(S),this._up(this.length++)}pop(){if(this.length===0)return;let S=this.data[0],F=this.data.pop();return--this.length>0&&(this.data[0]=F,this._down(0)),S}peek(){return this.data[0]}_up(S){let{data:F,compare:W}=this,te=F[S];for(;S>0;){let fe=S-1>>1,pe=F[fe];if(W(te,pe)>=0)break;F[S]=pe,S=fe}F[S]=te}_down(S){let{data:F,compare:W}=this,te=this.length>>1,fe=F[S];for(;S=0)break;F[S]=F[pe],S=pe}F[S]=fe}}function aO(R,S=1,F=!1){let W=1/0,te=1/0,fe=-1/0,pe=-1/0,Fe=R[0];for(let mr=0;mrfe)&&(fe=Pr.x),(!mr||Pr.y>pe)&&(pe=Pr.y)}let Ke=Math.min(fe-W,pe-te),ct=Ke/2,Lt=new Vp([],oO);if(Ke===0)return new u(W,te);for(let mr=W;mrJt.d||!Jt.d)&&(Jt=mr,F&&console.log("found best %d after %d probes",Math.round(1e4*mr.d)/1e4,cr)),mr.max-Jt.d<=S||(ct=mr.h/2,Lt.push(new O1(mr.p.x-ct,mr.p.y-ct,ct,R)),Lt.push(new O1(mr.p.x+ct,mr.p.y-ct,ct,R)),Lt.push(new O1(mr.p.x-ct,mr.p.y+ct,ct,R)),Lt.push(new O1(mr.p.x+ct,mr.p.y+ct,ct,R)),cr+=4)}return F&&(console.log(`num probes: ${cr}`),console.log(`best distance: ${Jt.d}`)),Jt.p}function oO(R,S){return S.max-R.max}function O1(R,S,F,W){this.p=new u(R,S),this.h=F,this.d=function(te,fe){let pe=!1,Fe=1/0;for(let Ke=0;Kete.y!=Pr.y>te.y&&te.x<(Pr.x-mr.x)*(te.y-mr.y)/(Pr.y-mr.y)+mr.x&&(pe=!pe),Fe=Math.min(Fe,Gr(te,mr,Pr))}}return(pe?1:-1)*Math.sqrt(Fe)}(this.p,W),this.max=this.d+this.h*Math.SQRT2}var ld;i.aq=void 0,(ld=i.aq||(i.aq={}))[ld.center=1]="center",ld[ld.left=2]="left",ld[ld.right=3]="right",ld[ld.top=4]="top",ld[ld.bottom=5]="bottom",ld[ld["top-left"]=6]="top-left",ld[ld["top-right"]=7]="top-right",ld[ld["bottom-left"]=8]="bottom-left",ld[ld["bottom-right"]=9]="bottom-right";let vm=7,yy=Number.POSITIVE_INFINITY;function wS(R,S){return S[1]!==yy?function(F,W,te){let fe=0,pe=0;switch(W=Math.abs(W),te=Math.abs(te),F){case"top-right":case"top-left":case"top":pe=te-vm;break;case"bottom-right":case"bottom-left":case"bottom":pe=-te+vm}switch(F){case"top-right":case"bottom-right":case"right":fe=-W;break;case"top-left":case"bottom-left":case"left":fe=W}return[fe,pe]}(R,S[0],S[1]):function(F,W){let te=0,fe=0;W<0&&(W=0);let pe=W/Math.SQRT2;switch(F){case"top-right":case"top-left":fe=pe-vm;break;case"bottom-right":case"bottom-left":fe=-pe+vm;break;case"bottom":fe=-W+vm;break;case"top":fe=W-vm}switch(F){case"top-right":case"bottom-right":te=-pe;break;case"top-left":case"bottom-left":te=pe;break;case"left":te=W;break;case"right":te=-W}return[te,fe]}(R,S[0])}function KC(R,S,F){var W;let te=R.layout,fe=(W=te.get("text-variable-anchor-offset"))===null||W===void 0?void 0:W.evaluate(S,{},F);if(fe){let Fe=fe.values,Ke=[];for(let ct=0;ctcr*tu);Lt.startsWith("top")?Jt[1]-=vm:Lt.startsWith("bottom")&&(Jt[1]+=vm),Ke[ct+1]=Jt}return new $i(Ke)}let pe=te.get("text-variable-anchor");if(pe){let Fe;Fe=R._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[te.get("text-radial-offset").evaluate(S,{},F)*tu,yy]:te.get("text-offset").evaluate(S,{},F).map(ct=>ct*tu);let Ke=[];for(let ct of pe)Ke.push(ct,wS(ct,Fe));return new $i(Ke)}return null}function TS(R){switch(R){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function sO(R,S,F,W,te,fe,pe,Fe,Ke,ct,Lt){let Jt=fe.textMaxSize.evaluate(S,{});Jt===void 0&&(Jt=pe);let cr=R.layers[0].layout,mr=cr.get("icon-offset").evaluate(S,{},Lt),Pr=$C(F.horizontal),zr=pe/24,ui=R.tilePixelRatio*zr,yi=R.tilePixelRatio*Jt/24,vn=R.tilePixelRatio*Fe,zi=R.tilePixelRatio*cr.get("symbol-spacing"),un=cr.get("text-padding")*R.tilePixelRatio,Tn=function(Xn,Ro,uo,$o=1){let Ju=Xn.get("icon-padding").evaluate(Ro,{},uo),qu=Ju&&Ju.values;return[qu[0]*$o,qu[1]*$o,qu[2]*$o,qu[3]*$o]}(cr,S,Lt,R.tilePixelRatio),pa=cr.get("text-max-angle")/180*Math.PI,ro=cr.get("text-rotation-alignment")!=="viewport"&&cr.get("symbol-placement")!=="point",Vo=cr.get("icon-rotation-alignment")==="map"&&cr.get("symbol-placement")!=="point",Xa=cr.get("symbol-placement"),sa=zi/2,Mo=cr.get("icon-text-fit"),fo;W&&Mo!=="none"&&(R.allowVerticalPlacement&&F.vertical&&(fo=IC(W,F.vertical,Mo,cr.get("icon-text-fit-padding"),mr,zr)),Pr&&(W=IC(W,Pr,Mo,cr.get("icon-text-fit-padding"),mr,zr)));let lo=(Xn,Ro)=>{Ro.x<0||Ro.x>=ja||Ro.y<0||Ro.y>=ja||function(uo,$o,Ju,qu,kh,Qv,ud,Ch,Vd,Gd,Hd,Af,Lh,Ed,cd,Yh,Df,Fv,lv,ru,pc,$u,zv,ff,q1){let p0=uo.addToLineVertexArray($o,Ju),Gp,ep,Gc,Yf,tp=0,yg=0,uv=0,B1=0,kS=-1,$w=-1,g0={},_y=bi("");if(uo.allowVerticalPlacement&&qu.vertical){let kd=Ch.layout.get("text-rotate").evaluate(pc,{},ff)+90;Gc=new dm(Vd,$o,Gd,Hd,Af,qu.vertical,Lh,Ed,cd,kd),ud&&(Yf=new dm(Vd,$o,Gd,Hd,Af,ud,Df,Fv,cd,kd))}if(kh){let kd=Ch.layout.get("icon-rotate").evaluate(pc,{}),rp=Ch.layout.get("icon-text-fit")!=="none",pm=ZC(kh,kd,zv,rp),jd=ud?ZC(ud,kd,zv,rp):void 0;ep=new dm(Vd,$o,Gd,Hd,Af,kh,Df,Fv,!1,kd),tp=4*pm.length;let Cd=uo.iconSizeData,xp=null;Cd.kind==="source"?(xp=[v0*Ch.layout.get("icon-size").evaluate(pc,{})],xp[0]>fm&&A(`${uo.layerIds[0]}: Value for "icon-size" is >= ${tb}. Reduce your "icon-size".`)):Cd.kind==="composite"&&(xp=[v0*$u.compositeIconSizes[0].evaluate(pc,{},ff),v0*$u.compositeIconSizes[1].evaluate(pc,{},ff)],(xp[0]>fm||xp[1]>fm)&&A(`${uo.layerIds[0]}: Value for "icon-size" is >= ${tb}. Reduce your "icon-size".`)),uo.addSymbols(uo.icon,pm,xp,ru,lv,pc,i.ah.none,$o,p0.lineStartIndex,p0.lineLength,-1,ff),kS=uo.icon.placedSymbolArray.length-1,jd&&(yg=4*jd.length,uo.addSymbols(uo.icon,jd,xp,ru,lv,pc,i.ah.vertical,$o,p0.lineStartIndex,p0.lineLength,-1,ff),$w=uo.icon.placedSymbolArray.length-1)}let Kh=Object.keys(qu.horizontal);for(let kd of Kh){let rp=qu.horizontal[kd];if(!Gp){_y=bi(rp.text);let jd=Ch.layout.get("text-rotate").evaluate(pc,{},ff);Gp=new dm(Vd,$o,Gd,Hd,Af,rp,Lh,Ed,cd,jd)}let pm=rp.positionedLines.length===1;if(uv+=JC(uo,$o,rp,Qv,Ch,cd,pc,Yh,p0,qu.vertical?i.ah.horizontal:i.ah.horizontalOnly,pm?Kh:[kd],g0,kS,$u,ff),pm)break}qu.vertical&&(B1+=JC(uo,$o,qu.vertical,Qv,Ch,cd,pc,Yh,p0,i.ah.vertical,["vertical"],g0,$w,$u,ff));let cO=Gp?Gp.boxStartIndex:uo.collisionBoxArray.length,Qw=Gp?Gp.boxEndIndex:uo.collisionBoxArray.length,m0=Gc?Gc.boxStartIndex:uo.collisionBoxArray.length,cv=Gc?Gc.boxEndIndex:uo.collisionBoxArray.length,r6=ep?ep.boxStartIndex:uo.collisionBoxArray.length,fO=ep?ep.boxEndIndex:uo.collisionBoxArray.length,i6=Yf?Yf.boxStartIndex:uo.collisionBoxArray.length,hO=Yf?Yf.boxEndIndex:uo.collisionBoxArray.length,_p=-1,fb=(kd,rp)=>kd&&kd.circleDiameter?Math.max(kd.circleDiameter,rp):rp;_p=fb(Gp,_p),_p=fb(Gc,_p),_p=fb(ep,_p),_p=fb(Yf,_p);let e3=_p>-1?1:0;e3&&(_p*=q1/tu),uo.glyphOffsetArray.length>=R1.MAX_GLYPHS&&A("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),pc.sortKey!==void 0&&uo.addToSortKeyRanges(uo.symbolInstances.length,pc.sortKey);let CS=KC(Ch,pc,ff),[dO,vO]=function(kd,rp){let pm=kd.length,jd=rp==null?void 0:rp.values;if((jd==null?void 0:jd.length)>0)for(let Cd=0;Cd=0?g0.right:-1,g0.center>=0?g0.center:-1,g0.left>=0?g0.left:-1,g0.vertical||-1,kS,$w,_y,cO,Qw,m0,cv,r6,fO,i6,hO,Gd,uv,B1,tp,yg,e3,0,Lh,_p,dO,vO)}(R,Ro,Xn,F,W,te,fo,R.layers[0],R.collisionBoxArray,S.index,S.sourceLayerIndex,R.index,ui,[un,un,un,un],ro,Ke,vn,Tn,Vo,mr,S,fe,ct,Lt,pe)};if(Xa==="line")for(let Xn of GC(S.geometry,0,0,ja,ja)){let Ro=nO(Xn,zi,pa,F.vertical||Pr,W,24,yi,R.overscaling,ja);for(let uo of Ro)Pr&&lO(R,Pr.text,sa,uo)||lo(Xn,uo)}else if(Xa==="line-center"){for(let Xn of S.geometry)if(Xn.length>1){let Ro=iO(Xn,pa,F.vertical||Pr,W,24,yi);Ro&&lo(Xn,Ro)}}else if(S.type==="Polygon")for(let Xn of Cf(S.geometry,0)){let Ro=aO(Xn,16);lo(Xn[0],new gg(Ro.x,Ro.y,0))}else if(S.type==="LineString")for(let Xn of S.geometry)lo(Xn,new gg(Xn[0].x,Xn[0].y,0));else if(S.type==="Point")for(let Xn of S.geometry)for(let Ro of Xn)lo([Ro],new gg(Ro.x,Ro.y,0))}function JC(R,S,F,W,te,fe,pe,Fe,Ke,ct,Lt,Jt,cr,mr,Pr){let zr=function(vn,zi,un,Tn,pa,ro,Vo,Xa){let sa=Tn.layout.get("text-rotate").evaluate(ro,{})*Math.PI/180,Mo=[];for(let fo of zi.positionedLines)for(let lo of fo.positionedGlyphs){if(!lo.rect)continue;let Xn=lo.rect||{},Ro=EC+1,uo=!0,$o=1,Ju=0,qu=(pa||Xa)&&lo.vertical,kh=lo.metrics.advance*lo.scale/2;if(Xa&&zi.verticalizable&&(Ju=fo.lineOffset/2-(lo.imageName?-(tu-lo.metrics.width*lo.scale)/2:(lo.scale-1)*tu)),lo.imageName){let ru=Vo[lo.imageName];uo=ru.sdf,$o=ru.pixelRatio,Ro=Md/$o}let Qv=pa?[lo.x+kh,lo.y]:[0,0],ud=pa?[0,0]:[lo.x+kh+un[0],lo.y+un[1]-Ju],Ch=[0,0];qu&&(Ch=ud,ud=[0,0]);let Vd=lo.metrics.isDoubleResolution?2:1,Gd=(lo.metrics.left-Ro)*lo.scale-kh+ud[0],Hd=(-lo.metrics.top-Ro)*lo.scale+ud[1],Af=Gd+Xn.w/Vd*lo.scale/$o,Lh=Hd+Xn.h/Vd*lo.scale/$o,Ed=new u(Gd,Hd),cd=new u(Af,Hd),Yh=new u(Gd,Lh),Df=new u(Af,Lh);if(qu){let ru=new u(-kh,kh-Eh),pc=-Math.PI/2,$u=tu/2-kh,zv=new u(5-Eh-$u,-(lo.imageName?$u:0)),ff=new u(...Ch);Ed._rotateAround(pc,ru)._add(zv)._add(ff),cd._rotateAround(pc,ru)._add(zv)._add(ff),Yh._rotateAround(pc,ru)._add(zv)._add(ff),Df._rotateAround(pc,ru)._add(zv)._add(ff)}if(sa){let ru=Math.sin(sa),pc=Math.cos(sa),$u=[pc,-ru,ru,pc];Ed._matMult($u),cd._matMult($u),Yh._matMult($u),Df._matMult($u)}let Fv=new u(0,0),lv=new u(0,0);Mo.push({tl:Ed,tr:cd,bl:Yh,br:Df,tex:Xn,writingMode:zi.writingMode,glyphOffset:Qv,sectionIndex:lo.sectionIndex,isSDF:uo,pixelOffsetTL:Fv,pixelOffsetBR:lv,minFontScaleX:0,minFontScaleY:0})}return Mo}(0,F,Fe,te,fe,pe,W,R.allowVerticalPlacement),ui=R.textSizeData,yi=null;ui.kind==="source"?(yi=[v0*te.layout.get("text-size").evaluate(pe,{})],yi[0]>fm&&A(`${R.layerIds[0]}: Value for "text-size" is >= ${tb}. Reduce your "text-size".`)):ui.kind==="composite"&&(yi=[v0*mr.compositeTextSizes[0].evaluate(pe,{},Pr),v0*mr.compositeTextSizes[1].evaluate(pe,{},Pr)],(yi[0]>fm||yi[1]>fm)&&A(`${R.layerIds[0]}: Value for "text-size" is >= ${tb}. Reduce your "text-size".`)),R.addSymbols(R.text,zr,yi,Fe,fe,pe,ct,S,Ke.lineStartIndex,Ke.lineLength,cr,Pr);for(let vn of Lt)Jt[vn]=R.text.placedSymbolArray.length-1;return 4*zr.length}function $C(R){for(let S in R)return R[S];return null}function lO(R,S,F,W){let te=R.compareText;if(S in te){let fe=te[S];for(let pe=fe.length-1;pe>=0;pe--)if(W.dist(fe[pe])>4;if(te!==1)throw new Error(`Got v${te} data when expected v1.`);let fe=QC[15&W];if(!fe)throw new Error("Unrecognized array type.");let[pe]=new Uint16Array(S,2,1),[Fe]=new Uint32Array(S,4,1);return new AS(Fe,pe,fe,S)}constructor(S,F=64,W=Float64Array,te){if(isNaN(S)||S<0)throw new Error(`Unpexpected numItems value: ${S}.`);this.numItems=+S,this.nodeSize=Math.min(Math.max(+F,2),65535),this.ArrayType=W,this.IndexArrayType=S<65536?Uint16Array:Uint32Array;let fe=QC.indexOf(this.ArrayType),pe=2*S*this.ArrayType.BYTES_PER_ELEMENT,Fe=S*this.IndexArrayType.BYTES_PER_ELEMENT,Ke=(8-Fe%8)%8;if(fe<0)throw new Error(`Unexpected typed array class: ${W}.`);te&&te instanceof ArrayBuffer?(this.data=te,this.ids=new this.IndexArrayType(this.data,8,S),this.coords=new this.ArrayType(this.data,8+Fe+Ke,2*S),this._pos=2*S,this._finished=!0):(this.data=new ArrayBuffer(8+pe+Fe+Ke),this.ids=new this.IndexArrayType(this.data,8,S),this.coords=new this.ArrayType(this.data,8+Fe+Ke,2*S),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+fe]),new Uint16Array(this.data,2,1)[0]=F,new Uint32Array(this.data,4,1)[0]=S)}add(S,F){let W=this._pos>>1;return this.ids[W]=W,this.coords[this._pos++]=S,this.coords[this._pos++]=F,W}finish(){let S=this._pos>>1;if(S!==this.numItems)throw new Error(`Added ${S} items when expected ${this.numItems}.`);return Yw(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(S,F,W,te){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:fe,coords:pe,nodeSize:Fe}=this,Ke=[0,fe.length-1,0],ct=[];for(;Ke.length;){let Lt=Ke.pop()||0,Jt=Ke.pop()||0,cr=Ke.pop()||0;if(Jt-cr<=Fe){for(let ui=cr;ui<=Jt;ui++){let yi=pe[2*ui],vn=pe[2*ui+1];yi>=S&&yi<=W&&vn>=F&&vn<=te&&ct.push(fe[ui])}continue}let mr=cr+Jt>>1,Pr=pe[2*mr],zr=pe[2*mr+1];Pr>=S&&Pr<=W&&zr>=F&&zr<=te&&ct.push(fe[mr]),(Lt===0?S<=Pr:F<=zr)&&(Ke.push(cr),Ke.push(mr-1),Ke.push(1-Lt)),(Lt===0?W>=Pr:te>=zr)&&(Ke.push(mr+1),Ke.push(Jt),Ke.push(1-Lt))}return ct}within(S,F,W){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:te,coords:fe,nodeSize:pe}=this,Fe=[0,te.length-1,0],Ke=[],ct=W*W;for(;Fe.length;){let Lt=Fe.pop()||0,Jt=Fe.pop()||0,cr=Fe.pop()||0;if(Jt-cr<=pe){for(let ui=cr;ui<=Jt;ui++)t6(fe[2*ui],fe[2*ui+1],S,F)<=ct&&Ke.push(te[ui]);continue}let mr=cr+Jt>>1,Pr=fe[2*mr],zr=fe[2*mr+1];t6(Pr,zr,S,F)<=ct&&Ke.push(te[mr]),(Lt===0?S-W<=Pr:F-W<=zr)&&(Fe.push(cr),Fe.push(mr-1),Fe.push(1-Lt)),(Lt===0?S+W>=Pr:F+W>=zr)&&(Fe.push(mr+1),Fe.push(Jt),Fe.push(1-Lt))}return Ke}}function Yw(R,S,F,W,te,fe){if(te-W<=F)return;let pe=W+te>>1;e6(R,S,pe,W,te,fe),Yw(R,S,F,W,pe-1,1-fe),Yw(R,S,F,pe+1,te,1-fe)}function e6(R,S,F,W,te,fe){for(;te>W;){if(te-W>600){let ct=te-W+1,Lt=F-W+1,Jt=Math.log(ct),cr=.5*Math.exp(2*Jt/3),mr=.5*Math.sqrt(Jt*cr*(ct-cr)/ct)*(Lt-ct/2<0?-1:1);e6(R,S,F,Math.max(W,Math.floor(F-Lt*cr/ct+mr)),Math.min(te,Math.floor(F+(ct-Lt)*cr/ct+mr)),fe)}let pe=S[2*F+fe],Fe=W,Ke=te;for(ub(R,S,W,F),S[2*te+fe]>pe&&ub(R,S,W,te);Fepe;)Ke--}S[2*W+fe]===pe?ub(R,S,W,Ke):(Ke++,ub(R,S,Ke,te)),Ke<=F&&(W=Ke+1),F<=Ke&&(te=Ke-1)}}function ub(R,S,F,W){SS(R,F,W),SS(S,2*F,2*W),SS(S,2*F+1,2*W+1)}function SS(R,S,F){let W=R[S];R[S]=R[F],R[F]=W}function t6(R,S,F,W){let te=R-F,fe=S-W;return te*te+fe*fe}var Kw;i.bg=void 0,(Kw=i.bg||(i.bg={})).create="create",Kw.load="load",Kw.fullLoad="fullLoad";let cb=null,sh=[],MS=1e3/60,ES="loadTime",Jw="fullLoadTime",uO={mark(R){performance.mark(R)},frame(R){let S=R;cb!=null&&sh.push(S-cb),cb=S},clearMetrics(){cb=null,sh=[],performance.clearMeasures(ES),performance.clearMeasures(Jw);for(let R in i.bg)performance.clearMarks(i.bg[R])},getPerformanceMetrics(){performance.measure(ES,i.bg.create,i.bg.load),performance.measure(Jw,i.bg.create,i.bg.fullLoad);let R=performance.getEntriesByName(ES)[0].duration,S=performance.getEntriesByName(Jw)[0].duration,F=sh.length,W=1/(sh.reduce((fe,pe)=>fe+pe,0)/F/1e3),te=sh.filter(fe=>fe>MS).reduce((fe,pe)=>fe+(pe-MS)/MS,0);return{loadTime:R,fullLoadTime:S,fps:W,percentDroppedFrames:te/(F+te)*100,totalFrames:F}}};i.$=class extends Yt{},i.A=xi,i.B=dn,i.C=function(R){if(U==null){let S=R.navigator?R.navigator.userAgent:null;U=!!R.safari||!(!S||!(/\b(iPad|iPhone|iPod)\b/.test(S)||S.match("Safari")&&!S.match("Chrome")))}return U},i.D=Ua,i.E=De,i.F=class{constructor(R,S){this.target=R,this.mapId=S,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new mS(()=>this.process()),this.subscription=function(F,W,te,fe){return F.addEventListener(W,te,!1),{unsubscribe:()=>{F.removeEventListener(W,te,!1)}}}(this.target,"message",F=>this.receive(F)),this.globalScope=O(self)?R:window}registerMessageHandler(R,S){this.messageHandlers[R]=S}sendAsync(R,S){return new Promise((F,W)=>{let te=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[te]={resolve:F,reject:W},S&&S.signal.addEventListener("abort",()=>{delete this.resolveRejects[te];let Fe={id:te,type:"",origin:location.origin,targetMapId:R.targetMapId,sourceMapId:this.mapId};this.target.postMessage(Fe)},{once:!0});let fe=[],pe=Object.assign(Object.assign({},R),{id:te,sourceMapId:this.mapId,origin:location.origin,data:La(R.data,fe)});this.target.postMessage(pe,{transfer:fe})})}receive(R){let S=R.data,F=S.id;if(!(S.origin!=="file://"&&location.origin!=="file://"&&S.origin!=="resource://android"&&location.origin!=="resource://android"&&S.origin!==location.origin||S.targetMapId&&this.mapId!==S.targetMapId)){if(S.type===""){delete this.tasks[F];let W=this.abortControllers[F];return delete this.abortControllers[F],void(W&&W.abort())}if(O(self)||S.mustQueue)return this.tasks[F]=S,this.taskQueue.push(F),void this.invoker.trigger();this.processTask(F,S)}}process(){if(this.taskQueue.length===0)return;let R=this.taskQueue.shift(),S=this.tasks[R];delete this.tasks[R],this.taskQueue.length>0&&this.invoker.trigger(),S&&this.processTask(R,S)}processTask(R,S){return a(this,void 0,void 0,function*(){if(S.type===""){let te=this.resolveRejects[R];return delete this.resolveRejects[R],te?void(S.error?te.reject(Na(S.error)):te.resolve(Na(S.data))):void 0}if(!this.messageHandlers[S.type])return void this.completeTask(R,new Error(`Could not find a registered handler for ${S.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let F=Na(S.data),W=new AbortController;this.abortControllers[R]=W;try{let te=yield this.messageHandlers[S.type](S.sourceMapId,F,W);this.completeTask(R,null,te)}catch(te){this.completeTask(R,te)}})}completeTask(R,S,F){let W=[];delete this.abortControllers[R];let te={id:R,type:"",sourceMapId:this.mapId,origin:location.origin,error:S?La(S):null,data:La(F,W)};this.target.postMessage(te,{transfer:W})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},i.G=Le,i.H=function(){var R=new xi(16);return xi!=Float32Array&&(R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[11]=0,R[12]=0,R[13]=0,R[14]=0),R[0]=1,R[5]=1,R[10]=1,R[15]=1,R},i.I=Bw,i.J=function(R,S,F){var W,te,fe,pe,Fe,Ke,ct,Lt,Jt,cr,mr,Pr,zr=F[0],ui=F[1],yi=F[2];return S===R?(R[12]=S[0]*zr+S[4]*ui+S[8]*yi+S[12],R[13]=S[1]*zr+S[5]*ui+S[9]*yi+S[13],R[14]=S[2]*zr+S[6]*ui+S[10]*yi+S[14],R[15]=S[3]*zr+S[7]*ui+S[11]*yi+S[15]):(te=S[1],fe=S[2],pe=S[3],Fe=S[4],Ke=S[5],ct=S[6],Lt=S[7],Jt=S[8],cr=S[9],mr=S[10],Pr=S[11],R[0]=W=S[0],R[1]=te,R[2]=fe,R[3]=pe,R[4]=Fe,R[5]=Ke,R[6]=ct,R[7]=Lt,R[8]=Jt,R[9]=cr,R[10]=mr,R[11]=Pr,R[12]=W*zr+Fe*ui+Jt*yi+S[12],R[13]=te*zr+Ke*ui+cr*yi+S[13],R[14]=fe*zr+ct*ui+mr*yi+S[14],R[15]=pe*zr+Lt*ui+Pr*yi+S[15]),R},i.K=function(R,S,F){var W=F[0],te=F[1],fe=F[2];return R[0]=S[0]*W,R[1]=S[1]*W,R[2]=S[2]*W,R[3]=S[3]*W,R[4]=S[4]*te,R[5]=S[5]*te,R[6]=S[6]*te,R[7]=S[7]*te,R[8]=S[8]*fe,R[9]=S[9]*fe,R[10]=S[10]*fe,R[11]=S[11]*fe,R[12]=S[12],R[13]=S[13],R[14]=S[14],R[15]=S[15],R},i.L=ci,i.M=function(R,S){let F={};for(let W=0;W{let S=window.document.createElement("video");return S.muted=!0,new Promise(F=>{S.onloadstart=()=>{F(S)};for(let W of R){let te=window.document.createElement("source");Ee(W)||(S.crossOrigin="Anonymous"),te.src=W,S.appendChild(te)}})},i.a4=function(){return x++},i.a5=Cn,i.a6=R1,i.a7=Fc,i.a8=Sl,i.a9=xS,i.aA=function(R){if(R.type==="custom")return new gS(R);switch(R.type){case"background":return new tO(R);case"circle":return new hi(R);case"fill":return new yt(R);case"fill-extrusion":return new Lv(R);case"heatmap":return new oa(R);case"hillshade":return new Zs(R);case"line":return new hy(R);case"raster":return new ab(R);case"symbol":return new gy(R)}},i.aB=g,i.aC=function(R,S){if(!R)return[{command:"setStyle",args:[S]}];let F=[];try{if(!pt(R.version,S.version))return[{command:"setStyle",args:[S]}];pt(R.center,S.center)||F.push({command:"setCenter",args:[S.center]}),pt(R.zoom,S.zoom)||F.push({command:"setZoom",args:[S.zoom]}),pt(R.bearing,S.bearing)||F.push({command:"setBearing",args:[S.bearing]}),pt(R.pitch,S.pitch)||F.push({command:"setPitch",args:[S.pitch]}),pt(R.sprite,S.sprite)||F.push({command:"setSprite",args:[S.sprite]}),pt(R.glyphs,S.glyphs)||F.push({command:"setGlyphs",args:[S.glyphs]}),pt(R.transition,S.transition)||F.push({command:"setTransition",args:[S.transition]}),pt(R.light,S.light)||F.push({command:"setLight",args:[S.light]}),pt(R.terrain,S.terrain)||F.push({command:"setTerrain",args:[S.terrain]}),pt(R.sky,S.sky)||F.push({command:"setSky",args:[S.sky]}),pt(R.projection,S.projection)||F.push({command:"setProjection",args:[S.projection]});let W={},te=[];(function(pe,Fe,Ke,ct){let Lt;for(Lt in Fe=Fe||{},pe=pe||{})Object.prototype.hasOwnProperty.call(pe,Lt)&&(Object.prototype.hasOwnProperty.call(Fe,Lt)||ut(Lt,Ke,ct));for(Lt in Fe)Object.prototype.hasOwnProperty.call(Fe,Lt)&&(Object.prototype.hasOwnProperty.call(pe,Lt)?pt(pe[Lt],Fe[Lt])||(pe[Lt].type==="geojson"&&Fe[Lt].type==="geojson"&&Nt(pe,Fe,Lt)?Vt(Ke,{command:"setGeoJSONSourceData",args:[Lt,Fe[Lt].data]}):Wt(Lt,Fe,Ke,ct)):ot(Lt,Fe,Ke))})(R.sources,S.sources,te,W);let fe=[];R.layers&&R.layers.forEach(pe=>{"source"in pe&&W[pe.source]?F.push({command:"removeLayer",args:[pe.id]}):fe.push(pe)}),F=F.concat(te),function(pe,Fe,Ke){Fe=Fe||[];let ct=(pe=pe||[]).map(sr),Lt=Fe.map(sr),Jt=pe.reduce(Tr,{}),cr=Fe.reduce(Tr,{}),mr=ct.slice(),Pr=Object.create(null),zr,ui,yi,vn,zi;for(let un=0,Tn=0;un@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(F,W,te,fe)=>{let pe=te||fe;return S[W]=!pe||pe.toLowerCase(),""}),S["max-age"]){let F=parseInt(S["max-age"],10);isNaN(F)?delete S["max-age"]:S["max-age"]=F}return S},i.ab=function(R,S){let F=[];for(let W in R)W in S||F.push(W);return F},i.ac=E,i.ad=function(R,S,F){var W=Math.sin(F),te=Math.cos(F),fe=S[0],pe=S[1],Fe=S[2],Ke=S[3],ct=S[4],Lt=S[5],Jt=S[6],cr=S[7];return S!==R&&(R[8]=S[8],R[9]=S[9],R[10]=S[10],R[11]=S[11],R[12]=S[12],R[13]=S[13],R[14]=S[14],R[15]=S[15]),R[0]=fe*te+ct*W,R[1]=pe*te+Lt*W,R[2]=Fe*te+Jt*W,R[3]=Ke*te+cr*W,R[4]=ct*te-fe*W,R[5]=Lt*te-pe*W,R[6]=Jt*te-Fe*W,R[7]=cr*te-Ke*W,R},i.ae=function(R){var S=new xi(16);return S[0]=R[0],S[1]=R[1],S[2]=R[2],S[3]=R[3],S[4]=R[4],S[5]=R[5],S[6]=R[6],S[7]=R[7],S[8]=R[8],S[9]=R[9],S[10]=R[10],S[11]=R[11],S[12]=R[12],S[13]=R[13],S[14]=R[14],S[15]=R[15],S},i.af=Bn,i.ag=function(R,S){let F=0,W=0;if(R.kind==="constant")W=R.layoutSize;else if(R.kind!=="source"){let{interpolationType:te,minZoom:fe,maxZoom:pe}=R,Fe=te?E(ko.interpolationFactor(te,S,fe,pe),0,1):0;R.kind==="camera"?W=Lo.number(R.minSize,R.maxSize,Fe):F=Fe}return{uSizeT:F,uSize:W}},i.ai=function(R,{uSize:S,uSizeT:F},{lowerSize:W,upperSize:te}){return R.kind==="source"?W/v0:R.kind==="composite"?Lo.number(W/v0,te/v0,F):S},i.aj=hS,i.ak=function(R,S,F,W){let te=S.y-R.y,fe=S.x-R.x,pe=W.y-F.y,Fe=W.x-F.x,Ke=pe*fe-Fe*te;if(Ke===0)return null;let ct=(Fe*(R.y-F.y)-pe*(R.x-F.x))/Ke;return new u(R.x+ct*fe,R.y+ct*te)},i.al=GC,i.am=Sc,i.an=Ri,i.ao=function(R){let S=1/0,F=1/0,W=-1/0,te=-1/0;for(let fe of R)S=Math.min(S,fe.x),F=Math.min(F,fe.y),W=Math.max(W,fe.x),te=Math.max(te,fe.y);return[S,F,W,te]},i.ap=tu,i.ar=fS,i.as=function(R,S){var F=S[0],W=S[1],te=S[2],fe=S[3],pe=S[4],Fe=S[5],Ke=S[6],ct=S[7],Lt=S[8],Jt=S[9],cr=S[10],mr=S[11],Pr=S[12],zr=S[13],ui=S[14],yi=S[15],vn=F*Fe-W*pe,zi=F*Ke-te*pe,un=F*ct-fe*pe,Tn=W*Ke-te*Fe,pa=W*ct-fe*Fe,ro=te*ct-fe*Ke,Vo=Lt*zr-Jt*Pr,Xa=Lt*ui-cr*Pr,sa=Lt*yi-mr*Pr,Mo=Jt*ui-cr*zr,fo=Jt*yi-mr*zr,lo=cr*yi-mr*ui,Xn=vn*lo-zi*fo+un*Mo+Tn*sa-pa*Xa+ro*Vo;return Xn?(R[0]=(Fe*lo-Ke*fo+ct*Mo)*(Xn=1/Xn),R[1]=(te*fo-W*lo-fe*Mo)*Xn,R[2]=(zr*ro-ui*pa+yi*Tn)*Xn,R[3]=(cr*pa-Jt*ro-mr*Tn)*Xn,R[4]=(Ke*sa-pe*lo-ct*Xa)*Xn,R[5]=(F*lo-te*sa+fe*Xa)*Xn,R[6]=(ui*un-Pr*ro-yi*zi)*Xn,R[7]=(Lt*ro-cr*un+mr*zi)*Xn,R[8]=(pe*fo-Fe*sa+ct*Vo)*Xn,R[9]=(W*sa-F*fo-fe*Vo)*Xn,R[10]=(Pr*pa-zr*un+yi*vn)*Xn,R[11]=(Jt*un-Lt*pa-mr*vn)*Xn,R[12]=(Fe*Xa-pe*Mo-Ke*Vo)*Xn,R[13]=(F*Mo-W*Xa+te*Vo)*Xn,R[14]=(zr*zi-Pr*Tn-ui*vn)*Xn,R[15]=(Lt*Tn-Jt*zi+cr*vn)*Xn,R):null},i.at=TS,i.au=Gw,i.av=AS,i.aw=function(){let R={},S=ce.$version;for(let F in ce.$root){let W=ce.$root[F];if(W.required){let te=null;te=F==="version"?S:W.type==="array"?[]:{},te!=null&&(R[F]=te)}}return R},i.ax=Yn,i.ay=ie,i.az=function(R){R=R.slice();let S=Object.create(null);for(let F=0;F25||W<0||W>=1||F<0||F>=1)},i.bc=function(R,S){return R[0]=S[0],R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=S[1],R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=S[2],R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R},i.bd=class extends Tt{},i.be=yS,i.bf=uO,i.bh=ge,i.bi=function(R,S){_e.REGISTERED_PROTOCOLS[R]=S},i.bj=function(R){delete _e.REGISTERED_PROTOCOLS[R]},i.bk=function(R,S){let F={};for(let te=0;telo*tu)}let Xa=pe?"center":F.get("text-justify").evaluate(ct,{},R.canonical),sa=F.get("symbol-placement")==="point"?F.get("text-max-width").evaluate(ct,{},R.canonical)*tu:1/0,Mo=()=>{R.bucket.allowVerticalPlacement&&Ka(un)&&(Pr.vertical=Qx(zr,R.glyphMap,R.glyphPositions,R.imagePositions,Lt,sa,fe,ro,"left",pa,yi,i.ah.vertical,!0,cr,Jt))};if(!pe&&Vo){let fo=new Set;if(Xa==="auto")for(let Xn=0;Xna(void 0,void 0,void 0,function*(){if(R.byteLength===0)return createImageBitmap(new ImageData(1,1));let S=new Blob([new Uint8Array(R)],{type:"image/png"});try{return createImageBitmap(S)}catch(F){throw new Error(`Could not load image because of ${F.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),i.e=L,i.f=R=>new Promise((S,F)=>{let W=new Image;W.onload=()=>{S(W),URL.revokeObjectURL(W.src),W.onload=null,window.requestAnimationFrame(()=>{W.src=Z})},W.onerror=()=>F(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));let te=new Blob([new Uint8Array(R)],{type:"image/png"});W.src=R.byteLength?URL.createObjectURL(te):Z}),i.g=Ce,i.h=(R,S)=>Se(L(R,{type:"json"}),S),i.i=O,i.j=me,i.k=Pe,i.l=(R,S)=>Se(L(R,{type:"arrayBuffer"}),S),i.m=Se,i.n=function(R){return new lS(R).readFields(qQ,[])},i.o=na,i.p=cS,i.q=ue,i.r=Xi,i.s=Ee,i.t=Yi,i.u=ki,i.v=ce,i.w=A,i.x=function([R,S,F]){return S+=90,S*=Math.PI/180,F*=Math.PI/180,{x:R*Math.cos(S)*Math.sin(F),y:R*Math.sin(S)*Math.sin(F),z:R*Math.cos(F)}},i.y=Lo,i.z=rs}),r("worker",["./shared"],function(i){"use strict";class a{constructor(Ge){this.keyCache={},Ge&&this.replace(Ge)}replace(Ge){this._layerConfigs={},this._layers={},this.update(Ge,[])}update(Ge,Je){for(let tt of Ge){this._layerConfigs[tt.id]=tt;let xt=this._layers[tt.id]=i.aA(tt);xt._featureFilter=i.a7(xt.filter),this.keyCache[tt.id]&&delete this.keyCache[tt.id]}for(let tt of Je)delete this.keyCache[tt],delete this._layerConfigs[tt],delete this._layers[tt];this.familiesBySource={};let We=i.bk(Object.values(this._layerConfigs),this.keyCache);for(let tt of We){let xt=tt.map(ar=>this._layers[ar.id]),Ie=xt[0];if(Ie.visibility==="none")continue;let xe=Ie.source||"",ke=this.familiesBySource[xe];ke||(ke=this.familiesBySource[xe]={});let vt=Ie.sourceLayer||"_geojsonTileLayer",ir=ke[vt];ir||(ir=ke[vt]=[]),ir.push(xt)}}}class o{constructor(Ge){let Je={},We=[];for(let xe in Ge){let ke=Ge[xe],vt=Je[xe]={};for(let ir in ke){let ar=ke[+ir];if(!ar||ar.bitmap.width===0||ar.bitmap.height===0)continue;let vr={x:0,y:0,w:ar.bitmap.width+2,h:ar.bitmap.height+2};We.push(vr),vt[ir]={rect:vr,metrics:ar.metrics}}}let{w:tt,h:xt}=i.p(We),Ie=new i.o({width:tt||1,height:xt||1});for(let xe in Ge){let ke=Ge[xe];for(let vt in ke){let ir=ke[+vt];if(!ir||ir.bitmap.width===0||ir.bitmap.height===0)continue;let ar=Je[xe][vt].rect;i.o.copy(ir.bitmap,Ie,{x:0,y:0},{x:ar.x+1,y:ar.y+1},ir.bitmap)}}this.image=Ie,this.positions=Je}}i.bl("GlyphAtlas",o);class s{constructor(Ge){this.tileID=new i.S(Ge.tileID.overscaledZ,Ge.tileID.wrap,Ge.tileID.canonical.z,Ge.tileID.canonical.x,Ge.tileID.canonical.y),this.uid=Ge.uid,this.zoom=Ge.zoom,this.pixelRatio=Ge.pixelRatio,this.tileSize=Ge.tileSize,this.source=Ge.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Ge.showCollisionBoxes,this.collectResourceTiming=!!Ge.collectResourceTiming,this.returnDependencies=!!Ge.returnDependencies,this.promoteId=Ge.promoteId,this.inFlightDependencies=[]}parse(Ge,Je,We,tt){return i._(this,void 0,void 0,function*(){this.status="parsing",this.data=Ge,this.collisionBoxArray=new i.a5;let xt=new i.bm(Object.keys(Ge.layers).sort()),Ie=new i.bn(this.tileID,this.promoteId);Ie.bucketLayerIDs=[];let xe={},ke={featureIndex:Ie,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:We},vt=Je.familiesBySource[this.source];for(let qn in vt){let Fn=Ge.layers[qn];if(!Fn)continue;Fn.version===1&&i.w(`Vector tile source "${this.source}" layer "${qn}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let ra=xt.encode(qn),la=[];for(let Ut=0;Ut=wt.maxzoom||wt.visibility!=="none"&&(l(Ut,this.zoom,We),(xe[wt.id]=wt.createBucket({index:Ie.bucketLayerIDs.length,layers:Ut,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:ra,sourceID:this.source})).populate(la,ke,this.tileID.canonical),Ie.bucketLayerIDs.push(Ut.map(rr=>rr.id)))}}let ir=i.aF(ke.glyphDependencies,qn=>Object.keys(qn).map(Number));this.inFlightDependencies.forEach(qn=>qn==null?void 0:qn.abort()),this.inFlightDependencies=[];let ar=Promise.resolve({});if(Object.keys(ir).length){let qn=new AbortController;this.inFlightDependencies.push(qn),ar=tt.sendAsync({type:"GG",data:{stacks:ir,source:this.source,tileID:this.tileID,type:"glyphs"}},qn)}let vr=Object.keys(ke.iconDependencies),ii=Promise.resolve({});if(vr.length){let qn=new AbortController;this.inFlightDependencies.push(qn),ii=tt.sendAsync({type:"GI",data:{icons:vr,source:this.source,tileID:this.tileID,type:"icons"}},qn)}let pi=Object.keys(ke.patternDependencies),$r=Promise.resolve({});if(pi.length){let qn=new AbortController;this.inFlightDependencies.push(qn),$r=tt.sendAsync({type:"GI",data:{icons:pi,source:this.source,tileID:this.tileID,type:"patterns"}},qn)}let[di,ji,In]=yield Promise.all([ar,ii,$r]),wi=new o(di),On=new i.bo(ji,In);for(let qn in xe){let Fn=xe[qn];Fn instanceof i.a6?(l(Fn.layers,this.zoom,We),i.bp({bucket:Fn,glyphMap:di,glyphPositions:wi.positions,imageMap:ji,imagePositions:On.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):Fn.hasPattern&&(Fn instanceof i.bq||Fn instanceof i.br||Fn instanceof i.bs)&&(l(Fn.layers,this.zoom,We),Fn.addFeatures(ke,this.tileID.canonical,On.patternPositions))}return this.status="done",{buckets:Object.values(xe).filter(qn=>!qn.isEmpty()),featureIndex:Ie,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:wi.image,imageAtlas:On,glyphMap:this.returnDependencies?di:null,iconMap:this.returnDependencies?ji:null,glyphPositions:this.returnDependencies?wi.positions:null}})}}function l(dt,Ge,Je){let We=new i.z(Ge);for(let tt of dt)tt.recalculate(We,Je)}class u{constructor(Ge,Je,We){this.actor=Ge,this.layerIndex=Je,this.availableImages=We,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(Ge,Je){return i._(this,void 0,void 0,function*(){let We=yield i.l(Ge.request,Je);try{return{vectorTile:new i.bt.VectorTile(new i.bu(We.data)),rawData:We.data,cacheControl:We.cacheControl,expires:We.expires}}catch(tt){let xt=new Uint8Array(We.data),Ie=`Unable to parse the tile at ${Ge.request.url}, `;throw Ie+=xt[0]===31&&xt[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${tt.message}`,new Error(Ie)}})}loadTile(Ge){return i._(this,void 0,void 0,function*(){let Je=Ge.uid,We=!!(Ge&&Ge.request&&Ge.request.collectResourceTiming)&&new i.bv(Ge.request),tt=new s(Ge);this.loading[Je]=tt;let xt=new AbortController;tt.abort=xt;try{let Ie=yield this.loadVectorTile(Ge,xt);if(delete this.loading[Je],!Ie)return null;let xe=Ie.rawData,ke={};Ie.expires&&(ke.expires=Ie.expires),Ie.cacheControl&&(ke.cacheControl=Ie.cacheControl);let vt={};if(We){let ar=We.finish();ar&&(vt.resourceTiming=JSON.parse(JSON.stringify(ar)))}tt.vectorTile=Ie.vectorTile;let ir=tt.parse(Ie.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[Je]=tt,this.fetching[Je]={rawTileData:xe,cacheControl:ke,resourceTiming:vt};try{let ar=yield ir;return i.e({rawTileData:xe.slice(0)},ar,ke,vt)}finally{delete this.fetching[Je]}}catch(Ie){throw delete this.loading[Je],tt.status="done",this.loaded[Je]=tt,Ie}})}reloadTile(Ge){return i._(this,void 0,void 0,function*(){let Je=Ge.uid;if(!this.loaded||!this.loaded[Je])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");let We=this.loaded[Je];if(We.showCollisionBoxes=Ge.showCollisionBoxes,We.status==="parsing"){let tt=yield We.parse(We.vectorTile,this.layerIndex,this.availableImages,this.actor),xt;if(this.fetching[Je]){let{rawTileData:Ie,cacheControl:xe,resourceTiming:ke}=this.fetching[Je];delete this.fetching[Je],xt=i.e({rawTileData:Ie.slice(0)},tt,xe,ke)}else xt=tt;return xt}if(We.status==="done"&&We.vectorTile)return We.parse(We.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(Ge){return i._(this,void 0,void 0,function*(){let Je=this.loading,We=Ge.uid;Je&&Je[We]&&Je[We].abort&&(Je[We].abort.abort(),delete Je[We])})}removeTile(Ge){return i._(this,void 0,void 0,function*(){this.loaded&&this.loaded[Ge.uid]&&delete this.loaded[Ge.uid]})}}class c{constructor(){this.loaded={}}loadTile(Ge){return i._(this,void 0,void 0,function*(){let{uid:Je,encoding:We,rawImageData:tt,redFactor:xt,greenFactor:Ie,blueFactor:xe,baseShift:ke}=Ge,vt=tt.width+2,ir=tt.height+2,ar=i.b(tt)?new i.R({width:vt,height:ir},yield i.bw(tt,-1,-1,vt,ir)):tt,vr=new i.bx(Je,ar,We,xt,Ie,xe,ke);return this.loaded=this.loaded||{},this.loaded[Je]=vr,vr})}removeTile(Ge){let Je=this.loaded,We=Ge.uid;Je&&Je[We]&&delete Je[We]}}function f(dt,Ge){if(dt.length!==0){h(dt[0],Ge);for(var Je=1;Je=Math.abs(xe)?Je-ke+xe:xe-ke+Je,Je=ke}Je+We>=0!=!!Ge&&dt.reverse()}var d=i.by(function dt(Ge,Je){var We,tt=Ge&&Ge.type;if(tt==="FeatureCollection")for(We=0;We>31}function O(dt,Ge){for(var Je=dt.loadGeometry(),We=dt.type,tt=0,xt=0,Ie=Je.length,xe=0;xedt},j=Math.fround||(N=new Float32Array(1),dt=>(N[0]=+dt,N[0]));var N;let H=3,re=5,oe=6;class _e{constructor(Ge){this.options=Object.assign(Object.create(Z),Ge),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(Ge){let{log:Je,minZoom:We,maxZoom:tt}=this.options;Je&&console.time("total time");let xt=`prepare ${Ge.length} points`;Je&&console.time(xt),this.points=Ge;let Ie=[];for(let ke=0;ke=We;ke--){let vt=+Date.now();xe=this.trees[ke]=this._createTree(this._cluster(xe,ke)),Je&&console.log("z%d: %d clusters in %dms",ke,xe.numItems,+Date.now()-vt)}return Je&&console.timeEnd("total time"),this}getClusters(Ge,Je){let We=((Ge[0]+180)%360+360)%360-180,tt=Math.max(-90,Math.min(90,Ge[1])),xt=Ge[2]===180?180:((Ge[2]+180)%360+360)%360-180,Ie=Math.max(-90,Math.min(90,Ge[3]));if(Ge[2]-Ge[0]>=360)We=-180,xt=180;else if(We>xt){let ar=this.getClusters([We,tt,180,Ie],Je),vr=this.getClusters([-180,tt,xt,Ie],Je);return ar.concat(vr)}let xe=this.trees[this._limitZoom(Je)],ke=xe.range(ge(We),ie(Ie),ge(xt),ie(tt)),vt=xe.data,ir=[];for(let ar of ke){let vr=this.stride*ar;ir.push(vt[vr+re]>1?Ce(vt,vr,this.clusterProps):this.points[vt[vr+H]])}return ir}getChildren(Ge){let Je=this._getOriginId(Ge),We=this._getOriginZoom(Ge),tt="No cluster with the specified id.",xt=this.trees[We];if(!xt)throw new Error(tt);let Ie=xt.data;if(Je*this.stride>=Ie.length)throw new Error(tt);let xe=this.options.radius/(this.options.extent*Math.pow(2,We-1)),ke=xt.within(Ie[Je*this.stride],Ie[Je*this.stride+1],xe),vt=[];for(let ir of ke){let ar=ir*this.stride;Ie[ar+4]===Ge&&vt.push(Ie[ar+re]>1?Ce(Ie,ar,this.clusterProps):this.points[Ie[ar+H]])}if(vt.length===0)throw new Error(tt);return vt}getLeaves(Ge,Je,We){let tt=[];return this._appendLeaves(tt,Ge,Je=Je||10,We=We||0,0),tt}getTile(Ge,Je,We){let tt=this.trees[this._limitZoom(Ge)],xt=Math.pow(2,Ge),{extent:Ie,radius:xe}=this.options,ke=xe/Ie,vt=(We-ke)/xt,ir=(We+1+ke)/xt,ar={features:[]};return this._addTileFeatures(tt.range((Je-ke)/xt,vt,(Je+1+ke)/xt,ir),tt.data,Je,We,xt,ar),Je===0&&this._addTileFeatures(tt.range(1-ke/xt,vt,1,ir),tt.data,xt,We,xt,ar),Je===xt-1&&this._addTileFeatures(tt.range(0,vt,ke/xt,ir),tt.data,-1,We,xt,ar),ar.features.length?ar:null}getClusterExpansionZoom(Ge){let Je=this._getOriginZoom(Ge)-1;for(;Je<=this.options.maxZoom;){let We=this.getChildren(Ge);if(Je++,We.length!==1)break;Ge=We[0].properties.cluster_id}return Je}_appendLeaves(Ge,Je,We,tt,xt){let Ie=this.getChildren(Je);for(let xe of Ie){let ke=xe.properties;if(ke&&ke.cluster?xt+ke.point_count<=tt?xt+=ke.point_count:xt=this._appendLeaves(Ge,ke.cluster_id,We,tt,xt):xt1,ir,ar,vr;if(vt)ir=Le(Je,ke,this.clusterProps),ar=Je[ke],vr=Je[ke+1];else{let $r=this.points[Je[ke+H]];ir=$r.properties;let[di,ji]=$r.geometry.coordinates;ar=ge(di),vr=ie(ji)}let ii={type:1,geometry:[[Math.round(this.options.extent*(ar*xt-We)),Math.round(this.options.extent*(vr*xt-tt))]],tags:ir},pi;pi=vt||this.options.generateId?Je[ke+H]:this.points[Je[ke+H]].id,pi!==void 0&&(ii.id=pi),Ie.features.push(ii)}}_limitZoom(Ge){return Math.max(this.options.minZoom,Math.min(Math.floor(+Ge),this.options.maxZoom+1))}_cluster(Ge,Je){let{radius:We,extent:tt,reduce:xt,minPoints:Ie}=this.options,xe=We/(tt*Math.pow(2,Je)),ke=Ge.data,vt=[],ir=this.stride;for(let ar=0;arJe&&(di+=ke[In+re])}if(di>$r&&di>=Ie){let ji,In=vr*$r,wi=ii*$r,On=-1,qn=((ar/ir|0)<<5)+(Je+1)+this.points.length;for(let Fn of pi){let ra=Fn*ir;if(ke[ra+2]<=Je)continue;ke[ra+2]=Je;let la=ke[ra+re];In+=ke[ra]*la,wi+=ke[ra+1]*la,ke[ra+4]=qn,xt&&(ji||(ji=this._map(ke,ar,!0),On=this.clusterProps.length,this.clusterProps.push(ji)),xt(ji,this._map(ke,ra)))}ke[ar+4]=qn,vt.push(In/di,wi/di,1/0,qn,-1,di),xt&&vt.push(On)}else{for(let ji=0;ji1)for(let ji of pi){let In=ji*ir;if(!(ke[In+2]<=Je)){ke[In+2]=Je;for(let wi=0;wi>5}_getOriginZoom(Ge){return(Ge-this.points.length)%32}_map(Ge,Je,We){if(Ge[Je+re]>1){let Ie=this.clusterProps[Ge[Je+oe]];return We?Object.assign({},Ie):Ie}let tt=this.points[Ge[Je+H]].properties,xt=this.options.map(tt);return We&&xt===tt?Object.assign({},xt):xt}}function Ce(dt,Ge,Je){return{type:"Feature",id:dt[Ge+H],properties:Le(dt,Ge,Je),geometry:{type:"Point",coordinates:[(We=dt[Ge],360*(We-.5)),Se(dt[Ge+1])]}};var We}function Le(dt,Ge,Je){let We=dt[Ge+re],tt=We>=1e4?`${Math.round(We/1e3)}k`:We>=1e3?Math.round(We/100)/10+"k":We,xt=dt[Ge+oe],Ie=xt===-1?{}:Object.assign({},Je[xt]);return Object.assign(Ie,{cluster:!0,cluster_id:dt[Ge+H],point_count:We,point_count_abbreviated:tt})}function ge(dt){return dt/360+.5}function ie(dt){let Ge=Math.sin(dt*Math.PI/180),Je=.5-.25*Math.log((1+Ge)/(1-Ge))/Math.PI;return Je<0?0:Je>1?1:Je}function Se(dt){let Ge=(180-360*dt)*Math.PI/180;return 360*Math.atan(Math.exp(Ge))/Math.PI-90}function Ee(dt,Ge,Je,We){let tt=We,xt=Ge+(Je-Ge>>1),Ie,xe=Je-Ge,ke=dt[Ge],vt=dt[Ge+1],ir=dt[Je],ar=dt[Je+1];for(let vr=Ge+3;vrtt)Ie=vr,tt=ii;else if(ii===tt){let pi=Math.abs(vr-xt);piWe&&(Ie-Ge>3&&Ee(dt,Ge,Ie,We),dt[Ie+2]=tt,Je-Ie>3&&Ee(dt,Ie,Je,We))}function Ae(dt,Ge,Je,We,tt,xt){let Ie=tt-Je,xe=xt-We;if(Ie!==0||xe!==0){let ke=((dt-Je)*Ie+(Ge-We)*xe)/(Ie*Ie+xe*xe);ke>1?(Je=tt,We=xt):ke>0&&(Je+=Ie*ke,We+=xe*ke)}return Ie=dt-Je,xe=Ge-We,Ie*Ie+xe*xe}function Be(dt,Ge,Je,We){let tt={id:dt==null?null:dt,type:Ge,geometry:Je,tags:We,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(Ge==="Point"||Ge==="MultiPoint"||Ge==="LineString")Pe(tt,Je);else if(Ge==="Polygon")Pe(tt,Je[0]);else if(Ge==="MultiLineString")for(let xt of Je)Pe(tt,xt);else if(Ge==="MultiPolygon")for(let xt of Je)Pe(tt,xt[0]);return tt}function Pe(dt,Ge){for(let Je=0;Je0&&(Ie+=We?(tt*ir-vt*xt)/2:Math.sqrt(Math.pow(vt-tt,2)+Math.pow(ir-xt,2))),tt=vt,xt=ir}let xe=Ge.length-3;Ge[2]=1,Ee(Ge,0,xe,Je),Ge[xe+2]=1,Ge.size=Math.abs(Ie),Ge.start=0,Ge.end=Ge.size}function je(dt,Ge,Je,We){for(let tt=0;tt1?1:Je}function Vt(dt,Ge,Je,We,tt,xt,Ie,xe){if(We/=Ge,xt>=(Je/=Ge)&&Ie=We)return null;let ke=[];for(let vt of dt){let ir=vt.geometry,ar=vt.type,vr=tt===0?vt.minX:vt.minY,ii=tt===0?vt.maxX:vt.maxY;if(vr>=Je&&ii=We)continue;let pi=[];if(ar==="Point"||ar==="MultiPoint")ot(ir,pi,Je,We,tt);else if(ar==="LineString")ut(ir,pi,Je,We,tt,!1,xe.lineMetrics);else if(ar==="MultiLineString")Nt(ir,pi,Je,We,tt,!1);else if(ar==="Polygon")Nt(ir,pi,Je,We,tt,!0);else if(ar==="MultiPolygon")for(let $r of ir){let di=[];Nt($r,di,Je,We,tt,!0),di.length&&pi.push(di)}if(pi.length){if(xe.lineMetrics&&ar==="LineString"){for(let $r of pi)ke.push(Be(vt.id,ar,$r,vt.tags));continue}ar!=="LineString"&&ar!=="MultiLineString"||(pi.length===1?(ar="LineString",pi=pi[0]):ar="MultiLineString"),ar!=="Point"&&ar!=="MultiPoint"||(ar=pi.length===3?"Point":"MultiPoint"),ke.push(Be(vt.id,ar,pi,vt.tags))}}return ke.length?ke:null}function ot(dt,Ge,Je,We,tt){for(let xt=0;xt=Je&&Ie<=We&&$t(Ge,dt[xt],dt[xt+1],dt[xt+2])}}function ut(dt,Ge,Je,We,tt,xt,Ie){let xe=Wt(dt),ke=tt===0?sr:Tr,vt,ir,ar=dt.start;for(let di=0;diJe&&(ir=ke(xe,ji,In,On,qn,Je),Ie&&(xe.start=ar+vt*ir)):Fn>We?ra=Je&&(ir=ke(xe,ji,In,On,qn,Je),la=!0),ra>We&&Fn<=We&&(ir=ke(xe,ji,In,On,qn,We),la=!0),!xt&&la&&(Ie&&(xe.end=ar+vt*ir),Ge.push(xe),xe=Wt(dt)),Ie&&(ar+=vt)}let vr=dt.length-3,ii=dt[vr],pi=dt[vr+1],$r=tt===0?ii:pi;$r>=Je&&$r<=We&&$t(xe,ii,pi,dt[vr+2]),vr=xe.length-3,xt&&vr>=3&&(xe[vr]!==xe[0]||xe[vr+1]!==xe[1])&&$t(xe,xe[0],xe[1],xe[2]),xe.length&&Ge.push(xe)}function Wt(dt){let Ge=[];return Ge.size=dt.size,Ge.start=dt.start,Ge.end=dt.end,Ge}function Nt(dt,Ge,Je,We,tt,xt){for(let Ie of dt)ut(Ie,Ge,Je,We,tt,xt,!1)}function $t(dt,Ge,Je,We){dt.push(Ge,Je,We)}function sr(dt,Ge,Je,We,tt,xt){let Ie=(xt-Ge)/(We-Ge);return $t(dt,xt,Je+(tt-Je)*Ie,1),Ie}function Tr(dt,Ge,Je,We,tt,xt){let Ie=(xt-Je)/(tt-Je);return $t(dt,Ge+(We-Ge)*Ie,xt,1),Ie}function fr(dt,Ge){let Je=[];for(let We=0;We0&&Ge.size<(tt?Ie:We))return void(Je.numPoints+=Ge.length/3);let xe=[];for(let ke=0;keIe)&&(Je.numSimplified++,xe.push(Ge[ke],Ge[ke+1])),Je.numPoints++;tt&&function(ke,vt){let ir=0;for(let ar=0,vr=ke.length,ii=vr-2;ar0===vt)for(let ar=0,vr=ke.length;ar24)throw new Error("maxZoom should be in the 0-24 range");if(Je.promoteId&&Je.generateId)throw new Error("promoteId and generateId cannot be used together.");let tt=function(xt,Ie){let xe=[];if(xt.type==="FeatureCollection")for(let ke=0;ke1&&console.time("creation"),ii=this.tiles[vr]=Gt(Ge,Je,We,tt,vt),this.tileCoords.push({z:Je,x:We,y:tt}),ir)){ir>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Je,We,tt,ii.numFeatures,ii.numPoints,ii.numSimplified),console.timeEnd("creation"));let la=`z${Je}`;this.stats[la]=(this.stats[la]||0)+1,this.total++}if(ii.source=Ge,xt==null){if(Je===vt.indexMaxZoom||ii.numPoints<=vt.indexMaxPoints)continue}else{if(Je===vt.maxZoom||Je===xt)continue;if(xt!=null){let la=xt-Je;if(We!==Ie>>la||tt!==xe>>la)continue}}if(ii.source=null,Ge.length===0)continue;ir>1&&console.time("clipping");let pi=.5*vt.buffer/vt.extent,$r=.5-pi,di=.5+pi,ji=1+pi,In=null,wi=null,On=null,qn=null,Fn=Vt(Ge,ar,We-pi,We+di,0,ii.minX,ii.maxX,vt),ra=Vt(Ge,ar,We+$r,We+ji,0,ii.minX,ii.maxX,vt);Ge=null,Fn&&(In=Vt(Fn,ar,tt-pi,tt+di,1,ii.minY,ii.maxY,vt),wi=Vt(Fn,ar,tt+$r,tt+ji,1,ii.minY,ii.maxY,vt),Fn=null),ra&&(On=Vt(ra,ar,tt-pi,tt+di,1,ii.minY,ii.maxY,vt),qn=Vt(ra,ar,tt+$r,tt+ji,1,ii.minY,ii.maxY,vt),ra=null),ir>1&&console.timeEnd("clipping"),ke.push(In||[],Je+1,2*We,2*tt),ke.push(wi||[],Je+1,2*We,2*tt+1),ke.push(On||[],Je+1,2*We+1,2*tt),ke.push(qn||[],Je+1,2*We+1,2*tt+1)}}getTile(Ge,Je,We){Ge=+Ge,Je=+Je,We=+We;let tt=this.options,{extent:xt,debug:Ie}=tt;if(Ge<0||Ge>24)return null;let xe=1<1&&console.log("drilling down to z%d-%d-%d",Ge,Je,We);let vt,ir=Ge,ar=Je,vr=We;for(;!vt&&ir>0;)ir--,ar>>=1,vr>>=1,vt=this.tiles[lr(ir,ar,vr)];return vt&&vt.source?(Ie>1&&(console.log("found parent tile z%d-%d-%d",ir,ar,vr),console.time("drilling down")),this.splitTile(vt.source,ir,ar,vr,Ge,Je,We),Ie>1&&console.timeEnd("drilling down"),this.tiles[ke]?St(this.tiles[ke],xt):null):null}}function lr(dt,Ge,Je){return 32*((1<{ar.properties=ii;let pi={};for(let $r of vr)pi[$r]=ke[$r].evaluate(ir,ar);return pi},Ie.reduce=(ii,pi)=>{ar.properties=pi;for(let $r of vr)ir.accumulated=ii[$r],ii[$r]=vt[$r].evaluate(ir,ar)},Ie}(Ge)).load((yield this._pendingData).features):(tt=yield this._pendingData,new er(tt,Ge.geojsonVtOptions)),this.loaded={};let xt={};if(We){let Ie=We.finish();Ie&&(xt.resourceTiming={},xt.resourceTiming[Ge.source]=JSON.parse(JSON.stringify(Ie)))}return xt}catch(xt){if(delete this._pendingRequest,i.bB(xt))return{abandoned:!0};throw xt}var tt})}getData(){return i._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(Ge){let Je=this.loaded;return Je&&Je[Ge.uid]?super.reloadTile(Ge):this.loadTile(Ge)}loadAndProcessGeoJSON(Ge,Je){return i._(this,void 0,void 0,function*(){let We=yield this.loadGeoJSON(Ge,Je);if(delete this._pendingRequest,typeof We!="object")throw new Error(`Input data given to '${Ge.source}' is not a valid GeoJSON object.`);if(d(We,!0),Ge.filter){let tt=i.bC(Ge.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(tt.result==="error")throw new Error(tt.value.map(Ie=>`${Ie.key}: ${Ie.message}`).join(", "));We={type:"FeatureCollection",features:We.features.filter(Ie=>tt.value.evaluate({zoom:0},Ie))}}return We})}loadGeoJSON(Ge,Je){return i._(this,void 0,void 0,function*(){let{promoteId:We}=Ge;if(Ge.request){let tt=yield i.h(Ge.request,Je);return this._dataUpdateable=Lr(tt.data,We)?ti(tt.data,We):void 0,tt.data}if(typeof Ge.data=="string")try{let tt=JSON.parse(Ge.data);return this._dataUpdateable=Lr(tt,We)?ti(tt,We):void 0,tt}catch(tt){throw new Error(`Input data given to '${Ge.source}' is not a valid GeoJSON object.`)}if(!Ge.dataDiff)throw new Error(`Input data given to '${Ge.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${Ge.source}`);return function(tt,xt,Ie){var xe,ke,vt,ir;if(xt.removeAll&&tt.clear(),xt.remove)for(let ar of xt.remove)tt.delete(ar);if(xt.add)for(let ar of xt.add){let vr=wr(ar,Ie);vr!=null&&tt.set(vr,ar)}if(xt.update)for(let ar of xt.update){let vr=tt.get(ar.id);if(vr==null)continue;let ii=!ar.removeAllProperties&&(((xe=ar.removeProperties)===null||xe===void 0?void 0:xe.length)>0||((ke=ar.addOrUpdateProperties)===null||ke===void 0?void 0:ke.length)>0);if((ar.newGeometry||ar.removeAllProperties||ii)&&(vr=Object.assign({},vr),tt.set(ar.id,vr),ii&&(vr.properties=Object.assign({},vr.properties))),ar.newGeometry&&(vr.geometry=ar.newGeometry),ar.removeAllProperties)vr.properties={};else if(((vt=ar.removeProperties)===null||vt===void 0?void 0:vt.length)>0)for(let pi of ar.removeProperties)Object.prototype.hasOwnProperty.call(vr.properties,pi)&&delete vr.properties[pi];if(((ir=ar.addOrUpdateProperties)===null||ir===void 0?void 0:ir.length)>0)for(let{key:pi,value:$r}of ar.addOrUpdateProperties)vr.properties[pi]=$r}}(this._dataUpdateable,Ge.dataDiff,We),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(Ge){return i._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(Ge){return this._geoJSONIndex.getClusterExpansionZoom(Ge.clusterId)}getClusterChildren(Ge){return this._geoJSONIndex.getChildren(Ge.clusterId)}getClusterLeaves(Ge){return this._geoJSONIndex.getLeaves(Ge.clusterId,Ge.limit,Ge.offset)}}class Vr{constructor(Ge){this.self=Ge,this.actor=new i.F(Ge),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(Je,We)=>{if(this.externalWorkerSourceTypes[Je])throw new Error(`Worker source with name "${Je}" already registered.`);this.externalWorkerSourceTypes[Je]=We},this.self.addProtocol=i.bi,this.self.removeProtocol=i.bj,this.self.registerRTLTextPlugin=Je=>{if(i.bD.isParsed())throw new Error("RTL text plugin already registered.");i.bD.setMethods(Je)},this.actor.registerMessageHandler("LDT",(Je,We)=>this._getDEMWorkerSource(Je,We.source).loadTile(We)),this.actor.registerMessageHandler("RDT",(Je,We)=>i._(this,void 0,void 0,function*(){this._getDEMWorkerSource(Je,We.source).removeTile(We)})),this.actor.registerMessageHandler("GCEZ",(Je,We)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Je,We.type,We.source).getClusterExpansionZoom(We)})),this.actor.registerMessageHandler("GCC",(Je,We)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Je,We.type,We.source).getClusterChildren(We)})),this.actor.registerMessageHandler("GCL",(Je,We)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Je,We.type,We.source).getClusterLeaves(We)})),this.actor.registerMessageHandler("LD",(Je,We)=>this._getWorkerSource(Je,We.type,We.source).loadData(We)),this.actor.registerMessageHandler("GD",(Je,We)=>this._getWorkerSource(Je,We.type,We.source).getData()),this.actor.registerMessageHandler("LT",(Je,We)=>this._getWorkerSource(Je,We.type,We.source).loadTile(We)),this.actor.registerMessageHandler("RT",(Je,We)=>this._getWorkerSource(Je,We.type,We.source).reloadTile(We)),this.actor.registerMessageHandler("AT",(Je,We)=>this._getWorkerSource(Je,We.type,We.source).abortTile(We)),this.actor.registerMessageHandler("RMT",(Je,We)=>this._getWorkerSource(Je,We.type,We.source).removeTile(We)),this.actor.registerMessageHandler("RS",(Je,We)=>i._(this,void 0,void 0,function*(){if(!this.workerSources[Je]||!this.workerSources[Je][We.type]||!this.workerSources[Je][We.type][We.source])return;let tt=this.workerSources[Je][We.type][We.source];delete this.workerSources[Je][We.type][We.source],tt.removeSource!==void 0&&tt.removeSource(We)})),this.actor.registerMessageHandler("RM",Je=>i._(this,void 0,void 0,function*(){delete this.layerIndexes[Je],delete this.availableImages[Je],delete this.workerSources[Je],delete this.demWorkerSources[Je]})),this.actor.registerMessageHandler("SR",(Je,We)=>i._(this,void 0,void 0,function*(){this.referrer=We})),this.actor.registerMessageHandler("SRPS",(Je,We)=>this._syncRTLPluginState(Je,We)),this.actor.registerMessageHandler("IS",(Je,We)=>i._(this,void 0,void 0,function*(){this.self.importScripts(We)})),this.actor.registerMessageHandler("SI",(Je,We)=>this._setImages(Je,We)),this.actor.registerMessageHandler("UL",(Je,We)=>i._(this,void 0,void 0,function*(){this._getLayerIndex(Je).update(We.layers,We.removedIds)})),this.actor.registerMessageHandler("SL",(Je,We)=>i._(this,void 0,void 0,function*(){this._getLayerIndex(Je).replace(We)}))}_setImages(Ge,Je){return i._(this,void 0,void 0,function*(){this.availableImages[Ge]=Je;for(let We in this.workerSources[Ge]){let tt=this.workerSources[Ge][We];for(let xt in tt)tt[xt].availableImages=Je}})}_syncRTLPluginState(Ge,Je){return i._(this,void 0,void 0,function*(){if(i.bD.isParsed())return i.bD.getState();if(Je.pluginStatus!=="loading")return i.bD.setState(Je),Je;let We=Je.pluginURL;if(this.self.importScripts(We),i.bD.isParsed()){let tt={pluginStatus:"loaded",pluginURL:We};return i.bD.setState(tt),tt}throw i.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${We}`)})}_getAvailableImages(Ge){let Je=this.availableImages[Ge];return Je||(Je=[]),Je}_getLayerIndex(Ge){let Je=this.layerIndexes[Ge];return Je||(Je=this.layerIndexes[Ge]=new a),Je}_getWorkerSource(Ge,Je,We){if(this.workerSources[Ge]||(this.workerSources[Ge]={}),this.workerSources[Ge][Je]||(this.workerSources[Ge][Je]={}),!this.workerSources[Ge][Je][We]){let tt={sendAsync:(xt,Ie)=>(xt.targetMapId=Ge,this.actor.sendAsync(xt,Ie))};switch(Je){case"vector":this.workerSources[Ge][Je][We]=new u(tt,this._getLayerIndex(Ge),this._getAvailableImages(Ge));break;case"geojson":this.workerSources[Ge][Je][We]=new Br(tt,this._getLayerIndex(Ge),this._getAvailableImages(Ge));break;default:this.workerSources[Ge][Je][We]=new this.externalWorkerSourceTypes[Je](tt,this._getLayerIndex(Ge),this._getAvailableImages(Ge))}}return this.workerSources[Ge][Je][We]}_getDEMWorkerSource(Ge,Je){return this.demWorkerSources[Ge]||(this.demWorkerSources[Ge]={}),this.demWorkerSources[Ge][Je]||(this.demWorkerSources[Ge][Je]=new c),this.demWorkerSources[Ge][Je]}}return i.i(self)&&(self.worker=new Vr(self)),Vr}),r("index",["exports","./shared"],function(i,a){"use strict";var o="4.7.1";let s,l,u={now:typeof performance!="undefined"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:ue=>new Promise((w,B)=>{let Q=requestAnimationFrame(w);ue.signal.addEventListener("abort",()=>{cancelAnimationFrame(Q),B(a.c())})}),getImageData(ue,w=0){return this.getImageCanvasContext(ue).getImageData(-w,-w,ue.width+2*w,ue.height+2*w)},getImageCanvasContext(ue){let w=window.document.createElement("canvas"),B=w.getContext("2d",{willReadFrequently:!0});if(!B)throw new Error("failed to create canvas 2d context");return w.width=ue.width,w.height=ue.height,B.drawImage(ue,0,0,ue.width,ue.height),B},resolveURL:ue=>(s||(s=document.createElement("a")),s.href=ue,s.href),hardwareConcurrency:typeof navigator!="undefined"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(l==null&&(l=matchMedia("(prefers-reduced-motion: reduce)")),l.matches)}};class c{static testProp(w){if(!c.docStyle)return w[0];for(let B=0;B{window.removeEventListener("click",c.suppressClickInternal,!0)},0)}static getScale(w){let B=w.getBoundingClientRect();return{x:B.width/w.offsetWidth||1,y:B.height/w.offsetHeight||1,boundingClientRect:B}}static getPoint(w,B,Q){let ee=B.boundingClientRect;return new a.P((Q.clientX-ee.left)/B.x-w.clientLeft,(Q.clientY-ee.top)/B.y-w.clientTop)}static mousePos(w,B){let Q=c.getScale(w);return c.getPoint(w,Q,B)}static touchPos(w,B){let Q=[],ee=c.getScale(w);for(let le=0;le{h&&b(h),h=null,_=!0},d.onerror=()=>{v=!0,h=null},d.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(ue){let w,B,Q,ee;ue.resetRequestQueue=()=>{w=[],B=0,Q=0,ee={}},ue.addThrottleControl=st=>{let Tt=Q++;return ee[Tt]=st,Tt},ue.removeThrottleControl=st=>{delete ee[st],Oe()},ue.getImage=(st,Tt,Yt=!0)=>new Promise((Kt,xr)=>{f.supported&&(st.headers||(st.headers={}),st.headers.accept="image/webp,*/*"),a.e(st,{type:"image"}),w.push({abortController:Tt,requestParameters:st,supportImageRefresh:Yt,state:"queued",onError:Ir=>{xr(Ir)},onSuccess:Ir=>{Kt(Ir)}}),Oe()});let le=st=>a._(this,void 0,void 0,function*(){st.state="running";let{requestParameters:Tt,supportImageRefresh:Yt,onError:Kt,onSuccess:xr,abortController:Ir}=st,ve=Yt===!1&&!a.i(self)&&!a.g(Tt.url)&&(!Tt.headers||Object.keys(Tt.headers).reduce((qe,et)=>qe&&et==="accept",!0));B++;let be=ve?Ze(Tt,Ir):a.m(Tt,Ir);try{let qe=yield be;delete st.abortController,st.state="completed",qe.data instanceof HTMLImageElement||a.b(qe.data)?xr(qe):qe.data&&xr({data:yield(Re=qe.data,typeof createImageBitmap=="function"?a.d(Re):a.f(Re)),cacheControl:qe.cacheControl,expires:qe.expires})}catch(qe){delete st.abortController,Kt(qe)}finally{B--,Oe()}var Re}),Oe=()=>{let st=(()=>{for(let Tt of Object.keys(ee))if(ee[Tt]())return!0;return!1})()?a.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:a.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let Tt=B;Tt0;Tt++){let Yt=w.shift();Yt.abortController.signal.aborted?Tt--:le(Yt)}},Ze=(st,Tt)=>new Promise((Yt,Kt)=>{let xr=new Image,Ir=st.url,ve=st.credentials;ve&&ve==="include"?xr.crossOrigin="use-credentials":(ve&&ve==="same-origin"||!a.s(Ir))&&(xr.crossOrigin="anonymous"),Tt.signal.addEventListener("abort",()=>{xr.src="",Kt(a.c())}),xr.fetchPriority="high",xr.onload=()=>{xr.onerror=xr.onload=null,Yt({data:xr})},xr.onerror=()=>{xr.onerror=xr.onload=null,Tt.signal.aborted||Kt(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},xr.src=Ir})}(p||(p={})),p.resetRequestQueue();class k{constructor(w){this._transformRequestFn=w}transformRequest(w,B){return this._transformRequestFn&&this._transformRequestFn(w,B)||{url:w}}setTransformRequest(w){this._transformRequestFn=w}}function E(ue){var w=new a.A(3);return w[0]=ue[0],w[1]=ue[1],w[2]=ue[2],w}var T,L=function(ue,w,B){return ue[0]=w[0]-B[0],ue[1]=w[1]-B[1],ue[2]=w[2]-B[2],ue};T=new a.A(3),a.A!=Float32Array&&(T[0]=0,T[1]=0,T[2]=0);var x=function(ue){var w=ue[0],B=ue[1];return w*w+B*B};function C(ue){let w=[];if(typeof ue=="string")w.push({id:"default",url:ue});else if(ue&&ue.length>0){let B=[];for(let{id:Q,url:ee}of ue){let le=`${Q}${ee}`;B.indexOf(le)===-1&&(B.push(le),w.push({id:Q,url:ee}))}}return w}function M(ue,w,B){let Q=ue.split("?");return Q[0]+=`${w}${B}`,Q.join("?")}(function(){var ue=new a.A(2);a.A!=Float32Array&&(ue[0]=0,ue[1]=0)})();class g{constructor(w,B,Q,ee){this.context=w,this.format=Q,this.texture=w.gl.createTexture(),this.update(B,ee)}update(w,B,Q){let{width:ee,height:le}=w,Oe=!(this.size&&this.size[0]===ee&&this.size[1]===le||Q),{context:Ze}=this,{gl:st}=Ze;if(this.useMipmap=!!(B&&B.useMipmap),st.bindTexture(st.TEXTURE_2D,this.texture),Ze.pixelStoreUnpackFlipY.set(!1),Ze.pixelStoreUnpack.set(1),Ze.pixelStoreUnpackPremultiplyAlpha.set(this.format===st.RGBA&&(!B||B.premultiply!==!1)),Oe)this.size=[ee,le],w instanceof HTMLImageElement||w instanceof HTMLCanvasElement||w instanceof HTMLVideoElement||w instanceof ImageData||a.b(w)?st.texImage2D(st.TEXTURE_2D,0,this.format,this.format,st.UNSIGNED_BYTE,w):st.texImage2D(st.TEXTURE_2D,0,this.format,ee,le,0,this.format,st.UNSIGNED_BYTE,w.data);else{let{x:Tt,y:Yt}=Q||{x:0,y:0};w instanceof HTMLImageElement||w instanceof HTMLCanvasElement||w instanceof HTMLVideoElement||w instanceof ImageData||a.b(w)?st.texSubImage2D(st.TEXTURE_2D,0,Tt,Yt,st.RGBA,st.UNSIGNED_BYTE,w):st.texSubImage2D(st.TEXTURE_2D,0,Tt,Yt,ee,le,st.RGBA,st.UNSIGNED_BYTE,w.data)}this.useMipmap&&this.isSizePowerOfTwo()&&st.generateMipmap(st.TEXTURE_2D)}bind(w,B,Q){let{context:ee}=this,{gl:le}=ee;le.bindTexture(le.TEXTURE_2D,this.texture),Q!==le.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(Q=le.LINEAR),w!==this.filter&&(le.texParameteri(le.TEXTURE_2D,le.TEXTURE_MAG_FILTER,w),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_MIN_FILTER,Q||w),this.filter=w),B!==this.wrap&&(le.texParameteri(le.TEXTURE_2D,le.TEXTURE_WRAP_S,B),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_WRAP_T,B),this.wrap=B)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){let{gl:w}=this.context;w.deleteTexture(this.texture),this.texture=null}}function P(ue){let{userImage:w}=ue;return!!(w&&w.render&&w.render())&&(ue.data.replace(new Uint8Array(w.data.buffer)),!0)}class A extends a.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new a.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(w){if(this.loaded!==w&&(this.loaded=w,w)){for(let{ids:B,promiseResolve:Q}of this.requestors)Q(this._getImagesForIds(B));this.requestors=[]}}getImage(w){let B=this.images[w];if(B&&!B.data&&B.spriteData){let Q=B.spriteData;B.data=new a.R({width:Q.width,height:Q.height},Q.context.getImageData(Q.x,Q.y,Q.width,Q.height).data),B.spriteData=null}return B}addImage(w,B){if(this.images[w])throw new Error(`Image id ${w} already exist, use updateImage instead`);this._validate(w,B)&&(this.images[w]=B)}_validate(w,B){let Q=!0,ee=B.data||B.spriteData;return this._validateStretch(B.stretchX,ee&&ee.width)||(this.fire(new a.j(new Error(`Image "${w}" has invalid "stretchX" value`))),Q=!1),this._validateStretch(B.stretchY,ee&&ee.height)||(this.fire(new a.j(new Error(`Image "${w}" has invalid "stretchY" value`))),Q=!1),this._validateContent(B.content,B)||(this.fire(new a.j(new Error(`Image "${w}" has invalid "content" value`))),Q=!1),Q}_validateStretch(w,B){if(!w)return!0;let Q=0;for(let ee of w){if(ee[0]{let ee=!0;if(!this.isLoaded())for(let le of w)this.images[le]||(ee=!1);this.isLoaded()||ee?B(this._getImagesForIds(w)):this.requestors.push({ids:w,promiseResolve:B})})}_getImagesForIds(w){let B={};for(let Q of w){let ee=this.getImage(Q);ee||(this.fire(new a.k("styleimagemissing",{id:Q})),ee=this.getImage(Q)),ee?B[Q]={data:ee.data.clone(),pixelRatio:ee.pixelRatio,sdf:ee.sdf,version:ee.version,stretchX:ee.stretchX,stretchY:ee.stretchY,content:ee.content,textFitWidth:ee.textFitWidth,textFitHeight:ee.textFitHeight,hasRenderCallback:!!(ee.userImage&&ee.userImage.render)}:a.w(`Image "${Q}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return B}getPixelSize(){let{width:w,height:B}=this.atlasImage;return{width:w,height:B}}getPattern(w){let B=this.patterns[w],Q=this.getImage(w);if(!Q)return null;if(B&&B.position.version===Q.version)return B.position;if(B)B.position.version=Q.version;else{let ee={w:Q.data.width+2,h:Q.data.height+2,x:0,y:0},le=new a.I(ee,Q);this.patterns[w]={bin:ee,position:le}}return this._updatePatternAtlas(),this.patterns[w].position}bind(w){let B=w.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new g(w,this.atlasImage,B.RGBA),this.atlasTexture.bind(B.LINEAR,B.CLAMP_TO_EDGE)}_updatePatternAtlas(){let w=[];for(let le in this.patterns)w.push(this.patterns[le].bin);let{w:B,h:Q}=a.p(w),ee=this.atlasImage;ee.resize({width:B||1,height:Q||1});for(let le in this.patterns){let{bin:Oe}=this.patterns[le],Ze=Oe.x+1,st=Oe.y+1,Tt=this.getImage(le).data,Yt=Tt.width,Kt=Tt.height;a.R.copy(Tt,ee,{x:0,y:0},{x:Ze,y:st},{width:Yt,height:Kt}),a.R.copy(Tt,ee,{x:0,y:Kt-1},{x:Ze,y:st-1},{width:Yt,height:1}),a.R.copy(Tt,ee,{x:0,y:0},{x:Ze,y:st+Kt},{width:Yt,height:1}),a.R.copy(Tt,ee,{x:Yt-1,y:0},{x:Ze-1,y:st},{width:1,height:Kt}),a.R.copy(Tt,ee,{x:0,y:0},{x:Ze+Yt,y:st},{width:1,height:Kt})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(w){for(let B of w){if(this.callbackDispatchedThisFrame[B])continue;this.callbackDispatchedThisFrame[B]=!0;let Q=this.getImage(B);Q||a.w(`Image with ID: "${B}" was not found`),P(Q)&&this.updateImage(B,Q)}}}let z=1e20;function O(ue,w,B,Q,ee,le,Oe,Ze,st){for(let Tt=w;Tt-1);st++,le[st]=Ze,Oe[st]=Tt,Oe[st+1]=z}for(let Ze=0,st=0;Ze65535)throw new Error("glyphs > 65535 not supported");if(Q.ranges[le])return{stack:w,id:B,glyph:ee};if(!this.url)throw new Error("glyphsUrl is not set");if(!Q.requests[le]){let Ze=G.loadGlyphRange(w,le,this.url,this.requestManager);Q.requests[le]=Ze}let Oe=yield Q.requests[le];for(let Ze in Oe)this._doesCharSupportLocalGlyph(+Ze)||(Q.glyphs[+Ze]=Oe[+Ze]);return Q.ranges[le]=!0,{stack:w,id:B,glyph:Oe[B]||null}})}_doesCharSupportLocalGlyph(w){return!!this.localIdeographFontFamily&&new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(w))}_tinySDF(w,B,Q){let ee=this.localIdeographFontFamily;if(!ee||!this._doesCharSupportLocalGlyph(Q))return;let le=w.tinySDF;if(!le){let Ze="400";/bold/i.test(B)?Ze="900":/medium/i.test(B)?Ze="500":/light/i.test(B)&&(Ze="200"),le=w.tinySDF=new G.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:ee,fontWeight:Ze})}let Oe=le.draw(String.fromCharCode(Q));return{id:Q,bitmap:new a.o({width:Oe.width||60,height:Oe.height||60},Oe.data),metrics:{width:Oe.glyphWidth/2||24,height:Oe.glyphHeight/2||24,left:Oe.glyphLeft/2+.5||0,top:Oe.glyphTop/2-27.5||-8,advance:Oe.glyphAdvance/2||24,isDoubleResolution:!0}}}}G.loadGlyphRange=function(ue,w,B,Q){return a._(this,void 0,void 0,function*(){let ee=256*w,le=ee+255,Oe=Q.transformRequest(B.replace("{fontstack}",ue).replace("{range}",`${ee}-${le}`),"Glyphs"),Ze=yield a.l(Oe,new AbortController);if(!Ze||!Ze.data)throw new Error(`Could not load glyph range. range: ${w}, ${ee}-${le}`);let st={};for(let Tt of a.n(Ze.data))st[Tt.id]=Tt;return st})},G.TinySDF=class{constructor({fontSize:ue=24,buffer:w=3,radius:B=8,cutoff:Q=.25,fontFamily:ee="sans-serif",fontWeight:le="normal",fontStyle:Oe="normal"}={}){this.buffer=w,this.cutoff=Q,this.radius=B;let Ze=this.size=ue+4*w,st=this._createCanvas(Ze),Tt=this.ctx=st.getContext("2d",{willReadFrequently:!0});Tt.font=`${Oe} ${le} ${ue}px ${ee}`,Tt.textBaseline="alphabetic",Tt.textAlign="left",Tt.fillStyle="black",this.gridOuter=new Float64Array(Ze*Ze),this.gridInner=new Float64Array(Ze*Ze),this.f=new Float64Array(Ze),this.z=new Float64Array(Ze+1),this.v=new Uint16Array(Ze)}_createCanvas(ue){let w=document.createElement("canvas");return w.width=w.height=ue,w}draw(ue){let{width:w,actualBoundingBoxAscent:B,actualBoundingBoxDescent:Q,actualBoundingBoxLeft:ee,actualBoundingBoxRight:le}=this.ctx.measureText(ue),Oe=Math.ceil(B),Ze=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(le-ee))),st=Math.min(this.size-this.buffer,Oe+Math.ceil(Q)),Tt=Ze+2*this.buffer,Yt=st+2*this.buffer,Kt=Math.max(Tt*Yt,0),xr=new Uint8ClampedArray(Kt),Ir={data:xr,width:Tt,height:Yt,glyphWidth:Ze,glyphHeight:st,glyphTop:Oe,glyphLeft:0,glyphAdvance:w};if(Ze===0||st===0)return Ir;let{ctx:ve,buffer:be,gridInner:Re,gridOuter:qe}=this;ve.clearRect(be,be,Ze,st),ve.fillText(ue,be,be+Oe);let et=ve.getImageData(be,be,Ze,st);qe.fill(z,0,Kt),Re.fill(0,0,Kt);for(let Xe=0;Xe0?tr*tr:0,Re[Ht]=tr<0?tr*tr:0}}O(qe,0,0,Tt,Yt,Tt,this.f,this.v,this.z),O(Re,be,be,Ze,st,Tt,this.f,this.v,this.z);for(let Xe=0;Xe1&&(st=w[++Ze]);let Yt=Math.abs(Tt-st.left),Kt=Math.abs(Tt-st.right),xr=Math.min(Yt,Kt),Ir,ve=le/Q*(ee+1);if(st.isDash){let be=ee-Math.abs(ve);Ir=Math.sqrt(xr*xr+be*be)}else Ir=ee-Math.sqrt(xr*xr+ve*ve);this.data[Oe+Tt]=Math.max(0,Math.min(255,Ir+128))}}}addRegularDash(w){for(let Ze=w.length-1;Ze>=0;--Ze){let st=w[Ze],Tt=w[Ze+1];st.zeroLength?w.splice(Ze,1):Tt&&Tt.isDash===st.isDash&&(Tt.left=st.left,w.splice(Ze,1))}let B=w[0],Q=w[w.length-1];B.isDash===Q.isDash&&(B.left=Q.left-this.width,Q.right=B.right+this.width);let ee=this.width*this.nextRow,le=0,Oe=w[le];for(let Ze=0;Ze1&&(Oe=w[++le]);let st=Math.abs(Ze-Oe.left),Tt=Math.abs(Ze-Oe.right),Yt=Math.min(st,Tt);this.data[ee+Ze]=Math.max(0,Math.min(255,(Oe.isDash?Yt:-Yt)+128))}}addDash(w,B){let Q=B?7:0,ee=2*Q+1;if(this.nextRow+ee>this.height)return a.w("LineAtlas out of space"),null;let le=0;for(let Ze=0;Ze{B.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[_e]}numActive(){return Object.keys(this.active).length}}let Le=Math.floor(u.hardwareConcurrency/2),ge,ie;function Se(){return ge||(ge=new Ce),ge}Ce.workerCount=a.C(globalThis)?Math.max(Math.min(Le,3),1):1;class Ee{constructor(w,B){this.workerPool=w,this.actors=[],this.currentActor=0,this.id=B;let Q=this.workerPool.acquire(B);for(let ee=0;ee{B.remove()}),this.actors=[],w&&this.workerPool.release(this.id)}registerMessageHandler(w,B){for(let Q of this.actors)Q.registerMessageHandler(w,B)}}function Ae(){return ie||(ie=new Ee(Se(),a.G),ie.registerMessageHandler("GR",(ue,w,B)=>a.m(w,B))),ie}function Be(ue,w){let B=a.H();return a.J(B,B,[1,1,0]),a.K(B,B,[.5*ue.width,.5*ue.height,1]),a.L(B,B,ue.calculatePosMatrix(w.toUnwrapped()))}function Pe(ue,w,B,Q,ee,le){let Oe=function(Kt,xr,Ir){if(Kt)for(let ve of Kt){let be=xr[ve];if(be&&be.source===Ir&&be.type==="fill-extrusion")return!0}else for(let ve in xr){let be=xr[ve];if(be.source===Ir&&be.type==="fill-extrusion")return!0}return!1}(ee&&ee.layers,w,ue.id),Ze=le.maxPitchScaleFactor(),st=ue.tilesIn(Q,Ze,Oe);st.sort(me);let Tt=[];for(let Kt of st)Tt.push({wrappedTileID:Kt.tileID.wrapped().key,queryResults:Kt.tile.queryRenderedFeatures(w,B,ue._state,Kt.queryGeometry,Kt.cameraQueryGeometry,Kt.scale,ee,le,Ze,Be(ue.transform,Kt.tileID))});let Yt=function(Kt){let xr={},Ir={};for(let ve of Kt){let be=ve.queryResults,Re=ve.wrappedTileID,qe=Ir[Re]=Ir[Re]||{};for(let et in be){let Xe=be[et],it=qe[et]=qe[et]||{},Ft=xr[et]=xr[et]||[];for(let Ht of Xe)it[Ht.featureIndex]||(it[Ht.featureIndex]=!0,Ft.push(Ht))}}return xr}(Tt);for(let Kt in Yt)Yt[Kt].forEach(xr=>{let Ir=xr.feature,ve=ue.getFeatureState(Ir.layer["source-layer"],Ir.id);Ir.source=Ir.layer.source,Ir.layer["source-layer"]&&(Ir.sourceLayer=Ir.layer["source-layer"]),Ir.state=ve});return Yt}function me(ue,w){let B=ue.tileID,Q=w.tileID;return B.overscaledZ-Q.overscaledZ||B.canonical.y-Q.canonical.y||B.wrap-Q.wrap||B.canonical.x-Q.canonical.x}function De(ue,w,B){return a._(this,void 0,void 0,function*(){let Q=ue;if(ue.url?Q=(yield a.h(w.transformRequest(ue.url,"Source"),B)).data:yield u.frameAsync(B),!Q)return null;let ee=a.M(a.e(Q,ue),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in Q&&Q.vector_layers&&(ee.vectorLayerIds=Q.vector_layers.map(le=>le.id)),ee})}class ce{constructor(w,B){w&&(B?this.setSouthWest(w).setNorthEast(B):Array.isArray(w)&&(w.length===4?this.setSouthWest([w[0],w[1]]).setNorthEast([w[2],w[3]]):this.setSouthWest(w[0]).setNorthEast(w[1])))}setNorthEast(w){return this._ne=w instanceof a.N?new a.N(w.lng,w.lat):a.N.convert(w),this}setSouthWest(w){return this._sw=w instanceof a.N?new a.N(w.lng,w.lat):a.N.convert(w),this}extend(w){let B=this._sw,Q=this._ne,ee,le;if(w instanceof a.N)ee=w,le=w;else{if(!(w instanceof ce))return Array.isArray(w)?w.length===4||w.every(Array.isArray)?this.extend(ce.convert(w)):this.extend(a.N.convert(w)):w&&("lng"in w||"lon"in w)&&"lat"in w?this.extend(a.N.convert(w)):this;if(ee=w._sw,le=w._ne,!ee||!le)return this}return B||Q?(B.lng=Math.min(ee.lng,B.lng),B.lat=Math.min(ee.lat,B.lat),Q.lng=Math.max(le.lng,Q.lng),Q.lat=Math.max(le.lat,Q.lat)):(this._sw=new a.N(ee.lng,ee.lat),this._ne=new a.N(le.lng,le.lat)),this}getCenter(){return new a.N((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new a.N(this.getWest(),this.getNorth())}getSouthEast(){return new a.N(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(w){let{lng:B,lat:Q}=a.N.convert(w),ee=this._sw.lng<=B&&B<=this._ne.lng;return this._sw.lng>this._ne.lng&&(ee=this._sw.lng>=B&&B>=this._ne.lng),this._sw.lat<=Q&&Q<=this._ne.lat&&ee}static convert(w){return w instanceof ce?w:w&&new ce(w)}static fromLngLat(w,B=0){let Q=360*B/40075017,ee=Q/Math.cos(Math.PI/180*w.lat);return new ce(new a.N(w.lng-ee,w.lat-Q),new a.N(w.lng+ee,w.lat+Q))}adjustAntiMeridian(){let w=new a.N(this._sw.lng,this._sw.lat),B=new a.N(this._ne.lng,this._ne.lat);return new ce(w,w.lng>B.lng?new a.N(B.lng+360,B.lat):B)}}class je{constructor(w,B,Q){this.bounds=ce.convert(this.validateBounds(w)),this.minzoom=B||0,this.maxzoom=Q||24}validateBounds(w){return Array.isArray(w)&&w.length===4?[Math.max(-180,w[0]),Math.max(-90,w[1]),Math.min(180,w[2]),Math.min(90,w[3])]:[-180,-90,180,90]}contains(w){let B=Math.pow(2,w.z),Q=Math.floor(a.O(this.bounds.getWest())*B),ee=Math.floor(a.Q(this.bounds.getNorth())*B),le=Math.ceil(a.O(this.bounds.getEast())*B),Oe=Math.ceil(a.Q(this.bounds.getSouth())*B);return w.x>=Q&&w.x=ee&&w.y{this._options.tiles=w}),this}setUrl(w){return this.setSourceProperty(()=>{this.url=w,this._options.url=w}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return a.e({},this._options)}loadTile(w){return a._(this,void 0,void 0,function*(){let B=w.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Q={request:this.map._requestManager.transformRequest(B,"Tile"),uid:w.uid,tileID:w.tileID,zoom:w.tileID.overscaledZ,tileSize:this.tileSize*w.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};Q.request.collectResourceTiming=this._collectResourceTiming;let ee="RT";if(w.actor&&w.state!=="expired"){if(w.state==="loading")return new Promise((le,Oe)=>{w.reloadPromise={resolve:le,reject:Oe}})}else w.actor=this.dispatcher.getActor(),ee="LT";w.abortController=new AbortController;try{let le=yield w.actor.sendAsync({type:ee,data:Q},w.abortController);if(delete w.abortController,w.aborted)return;this._afterTileLoadWorkerResponse(w,le)}catch(le){if(delete w.abortController,w.aborted)return;if(le&&le.status!==404)throw le;this._afterTileLoadWorkerResponse(w,null)}})}_afterTileLoadWorkerResponse(w,B){if(B&&B.resourceTiming&&(w.resourceTiming=B.resourceTiming),B&&this.map._refreshExpiredTiles&&w.setExpiryData(B),w.loadVectorData(B,this.map.painter),w.reloadPromise){let Q=w.reloadPromise;w.reloadPromise=null,this.loadTile(w).then(Q.resolve).catch(Q.reject)}}abortTile(w){return a._(this,void 0,void 0,function*(){w.abortController&&(w.abortController.abort(),delete w.abortController),w.actor&&(yield w.actor.sendAsync({type:"AT",data:{uid:w.uid,type:this.type,source:this.id}}))})}unloadTile(w){return a._(this,void 0,void 0,function*(){w.unloadVectorData(),w.actor&&(yield w.actor.sendAsync({type:"RMT",data:{uid:w.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class pt extends a.E{constructor(w,B,Q,ee){super(),this.id=w,this.dispatcher=Q,this.setEventedParent(ee),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=a.e({type:"raster"},B),a.e(this,a.M(B,["url","scheme","tileSize"]))}load(){return a._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new a.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let w=yield De(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,w&&(a.e(this,w),w.bounds&&(this.tileBounds=new je(w.bounds,this.minzoom,this.maxzoom)),this.fire(new a.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new a.k("data",{dataType:"source",sourceDataType:"content"})))}catch(w){this._tileJSONRequest=null,this.fire(new a.j(w))}})}loaded(){return this._loaded}onAdd(w){this.map=w,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(w){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),w(),this.load()}setTiles(w){return this.setSourceProperty(()=>{this._options.tiles=w}),this}setUrl(w){return this.setSourceProperty(()=>{this.url=w,this._options.url=w}),this}serialize(){return a.e({},this._options)}hasTile(w){return!this.tileBounds||this.tileBounds.contains(w.canonical)}loadTile(w){return a._(this,void 0,void 0,function*(){let B=w.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);w.abortController=new AbortController;try{let Q=yield p.getImage(this.map._requestManager.transformRequest(B,"Tile"),w.abortController,this.map._refreshExpiredTiles);if(delete w.abortController,w.aborted)return void(w.state="unloaded");if(Q&&Q.data){this.map._refreshExpiredTiles&&Q.cacheControl&&Q.expires&&w.setExpiryData({cacheControl:Q.cacheControl,expires:Q.expires});let ee=this.map.painter.context,le=ee.gl,Oe=Q.data;w.texture=this.map.painter.getTileTexture(Oe.width),w.texture?w.texture.update(Oe,{useMipmap:!0}):(w.texture=new g(ee,Oe,le.RGBA,{useMipmap:!0}),w.texture.bind(le.LINEAR,le.CLAMP_TO_EDGE,le.LINEAR_MIPMAP_NEAREST)),w.state="loaded"}}catch(Q){if(delete w.abortController,w.aborted)w.state="unloaded";else if(Q)throw w.state="errored",Q}})}abortTile(w){return a._(this,void 0,void 0,function*(){w.abortController&&(w.abortController.abort(),delete w.abortController)})}unloadTile(w){return a._(this,void 0,void 0,function*(){w.texture&&this.map.painter.saveTileTexture(w.texture)})}hasTransition(){return!1}}class Vt extends pt{constructor(w,B,Q,ee){super(w,B,Q,ee),this.type="raster-dem",this.maxzoom=22,this._options=a.e({type:"raster-dem"},B),this.encoding=B.encoding||"mapbox",this.redFactor=B.redFactor,this.greenFactor=B.greenFactor,this.blueFactor=B.blueFactor,this.baseShift=B.baseShift}loadTile(w){return a._(this,void 0,void 0,function*(){let B=w.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Q=this.map._requestManager.transformRequest(B,"Tile");w.neighboringTiles=this._getNeighboringTiles(w.tileID),w.abortController=new AbortController;try{let ee=yield p.getImage(Q,w.abortController,this.map._refreshExpiredTiles);if(delete w.abortController,w.aborted)return void(w.state="unloaded");if(ee&&ee.data){let le=ee.data;this.map._refreshExpiredTiles&&ee.cacheControl&&ee.expires&&w.setExpiryData({cacheControl:ee.cacheControl,expires:ee.expires});let Oe=a.b(le)&&a.U()?le:yield this.readImageNow(le),Ze={type:this.type,uid:w.uid,source:this.id,rawImageData:Oe,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!w.actor||w.state==="expired"){w.actor=this.dispatcher.getActor();let st=yield w.actor.sendAsync({type:"LDT",data:Ze});w.dem=st,w.needsHillshadePrepare=!0,w.needsTerrainPrepare=!0,w.state="loaded"}}}catch(ee){if(delete w.abortController,w.aborted)w.state="unloaded";else if(ee)throw w.state="errored",ee}})}readImageNow(w){return a._(this,void 0,void 0,function*(){if(typeof VideoFrame!="undefined"&&a.V()){let B=w.width+2,Q=w.height+2;try{return new a.R({width:B,height:Q},yield a.W(w,-1,-1,B,Q))}catch(ee){}}return u.getImageData(w,1)})}_getNeighboringTiles(w){let B=w.canonical,Q=Math.pow(2,B.z),ee=(B.x-1+Q)%Q,le=B.x===0?w.wrap-1:w.wrap,Oe=(B.x+1+Q)%Q,Ze=B.x+1===Q?w.wrap+1:w.wrap,st={};return st[new a.S(w.overscaledZ,le,B.z,ee,B.y).key]={backfilled:!1},st[new a.S(w.overscaledZ,Ze,B.z,Oe,B.y).key]={backfilled:!1},B.y>0&&(st[new a.S(w.overscaledZ,le,B.z,ee,B.y-1).key]={backfilled:!1},st[new a.S(w.overscaledZ,w.wrap,B.z,B.x,B.y-1).key]={backfilled:!1},st[new a.S(w.overscaledZ,Ze,B.z,Oe,B.y-1).key]={backfilled:!1}),B.y+10&&a.e(le,{resourceTiming:ee}),this.fire(new a.k("data",Object.assign(Object.assign({},le),{sourceDataType:"metadata"}))),this.fire(new a.k("data",Object.assign(Object.assign({},le),{sourceDataType:"content"})))}catch(Q){if(this._pendingLoads--,this._removed)return void this.fire(new a.k("dataabort",{dataType:"source"}));this.fire(new a.j(Q))}})}loaded(){return this._pendingLoads===0}loadTile(w){return a._(this,void 0,void 0,function*(){let B=w.actor?"RT":"LT";w.actor=this.actor;let Q={type:this.type,uid:w.uid,tileID:w.tileID,zoom:w.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};w.abortController=new AbortController;let ee=yield this.actor.sendAsync({type:B,data:Q},w.abortController);delete w.abortController,w.unloadVectorData(),w.aborted||w.loadVectorData(ee,this.map.painter,B==="RT")})}abortTile(w){return a._(this,void 0,void 0,function*(){w.abortController&&(w.abortController.abort(),delete w.abortController),w.aborted=!0})}unloadTile(w){return a._(this,void 0,void 0,function*(){w.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:w.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return a.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var ut=a.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Wt extends a.E{constructor(w,B,Q,ee){super(),this.id=w,this.dispatcher=Q,this.coordinates=B.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(ee),this.options=B}load(w){return a._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new a.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let B=yield p.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,B&&B.data&&(this.image=B.data,w&&(this.coordinates=w),this._finishLoading())}catch(B){this._request=null,this._loaded=!0,this.fire(new a.j(B))}})}loaded(){return this._loaded}updateImage(w){return w.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=w.url,this.load(w.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new a.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(w){this.map=w,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(w){this.coordinates=w;let B=w.map(a.Z.fromLngLat);this.tileID=function(ee){let le=1/0,Oe=1/0,Ze=-1/0,st=-1/0;for(let xr of ee)le=Math.min(le,xr.x),Oe=Math.min(Oe,xr.y),Ze=Math.max(Ze,xr.x),st=Math.max(st,xr.y);let Tt=Math.max(Ze-le,st-Oe),Yt=Math.max(0,Math.floor(-Math.log(Tt)/Math.LN2)),Kt=Math.pow(2,Yt);return new a.a1(Yt,Math.floor((le+Ze)/2*Kt),Math.floor((Oe+st)/2*Kt))}(B),this.minzoom=this.maxzoom=this.tileID.z;let Q=B.map(ee=>this.tileID.getTilePoint(ee)._round());return this._boundsArray=new a.$,this._boundsArray.emplaceBack(Q[0].x,Q[0].y,0,0),this._boundsArray.emplaceBack(Q[1].x,Q[1].y,a.X,0),this._boundsArray.emplaceBack(Q[3].x,Q[3].y,0,a.X),this._boundsArray.emplaceBack(Q[2].x,Q[2].y,a.X,a.X),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new a.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let w=this.map.painter.context,B=w.gl;this.boundsBuffer||(this.boundsBuffer=w.createVertexBuffer(this._boundsArray,ut.members)),this.boundsSegments||(this.boundsSegments=a.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new g(w,this.image,B.RGBA),this.texture.bind(B.LINEAR,B.CLAMP_TO_EDGE));let Q=!1;for(let ee in this.tiles){let le=this.tiles[ee];le.state!=="loaded"&&(le.state="loaded",le.texture=this.texture,Q=!0)}Q&&this.fire(new a.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(w){return a._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(w.tileID.canonical)?(this.tiles[String(w.tileID.wrap)]=w,w.buckets={}):w.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class Nt extends Wt{constructor(w,B,Q,ee){super(w,B,Q,ee),this.roundZoom=!0,this.type="video",this.options=B}load(){return a._(this,void 0,void 0,function*(){this._loaded=!1;let w=this.options;this.urls=[];for(let B of w.urls)this.urls.push(this.map._requestManager.transformRequest(B,"Source").url);try{let B=yield a.a3(this.urls);if(this._loaded=!0,!B)return;this.video=B,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(B){this.fire(new a.j(B))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(w){if(this.video){let B=this.video.seekable;wB.end(0)?this.fire(new a.j(new a.a2(`sources.${this.id}`,null,`Playback for this video can be set only between the ${B.start(0)} and ${B.end(0)}-second mark.`))):this.video.currentTime=w}}getVideo(){return this.video}onAdd(w){this.map||(this.map=w,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let w=this.map.painter.context,B=w.gl;this.boundsBuffer||(this.boundsBuffer=w.createVertexBuffer(this._boundsArray,ut.members)),this.boundsSegments||(this.boundsSegments=a.a0.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(B.LINEAR,B.CLAMP_TO_EDGE),B.texSubImage2D(B.TEXTURE_2D,0,0,0,B.RGBA,B.UNSIGNED_BYTE,this.video)):(this.texture=new g(w,this.video,B.RGBA),this.texture.bind(B.LINEAR,B.CLAMP_TO_EDGE));let Q=!1;for(let ee in this.tiles){let le=this.tiles[ee];le.state!=="loaded"&&(le.state="loaded",le.texture=this.texture,Q=!0)}Q&&this.fire(new a.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class $t extends Wt{constructor(w,B,Q,ee){super(w,B,Q,ee),B.coordinates?Array.isArray(B.coordinates)&&B.coordinates.length===4&&!B.coordinates.some(le=>!Array.isArray(le)||le.length!==2||le.some(Oe=>typeof Oe!="number"))||this.fire(new a.j(new a.a2(`sources.${w}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new a.j(new a.a2(`sources.${w}`,null,'missing required property "coordinates"'))),B.animate&&typeof B.animate!="boolean"&&this.fire(new a.j(new a.a2(`sources.${w}`,null,'optional "animate" property must be a boolean value'))),B.canvas?typeof B.canvas=="string"||B.canvas instanceof HTMLCanvasElement||this.fire(new a.j(new a.a2(`sources.${w}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new a.j(new a.a2(`sources.${w}`,null,'missing required property "canvas"'))),this.options=B,this.animate=B.animate===void 0||B.animate}load(){return a._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new a.j(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())})}getCanvas(){return this.canvas}onAdd(w){this.map=w,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let w=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,w=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,w=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let B=this.map.painter.context,Q=B.gl;this.boundsBuffer||(this.boundsBuffer=B.createVertexBuffer(this._boundsArray,ut.members)),this.boundsSegments||(this.boundsSegments=a.a0.simpleSegment(0,0,4,2)),this.texture?(w||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new g(B,this.canvas,Q.RGBA,{premultiply:!0});let ee=!1;for(let le in this.tiles){let Oe=this.tiles[le];Oe.state!=="loaded"&&(Oe.state="loaded",Oe.texture=this.texture,ee=!0)}ee&&this.fire(new a.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let w of[this.canvas.width,this.canvas.height])if(isNaN(w)||w<=0)return!0;return!1}}let sr={},Tr=ue=>{switch(ue){case"geojson":return ot;case"image":return Wt;case"raster":return pt;case"raster-dem":return Vt;case"vector":return lt;case"video":return Nt;case"canvas":return $t}return sr[ue]},fr="RTLPluginLoaded";class $e extends a.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=Ae()}_syncState(w){return this.status=w,this.dispatcher.broadcast("SRPS",{pluginStatus:w,pluginURL:this.url}).catch(B=>{throw this.status="error",B})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(w){return a._(this,arguments,void 0,function*(B,Q=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=u.resolveURL(B),!this.url)throw new Error(`requested url ${B} is invalid`);if(this.status==="unavailable"){if(!Q)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return a._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new a.k(fr))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let St=null;function Qt(){return St||(St=new $e),St}class Gt{constructor(w,B){this.timeAdded=0,this.fadeEndTime=0,this.tileID=w,this.uid=a.a4(),this.uses=0,this.tileSize=B,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(w){let B=w+this.timeAdded;Ble.getLayer(Tt)).filter(Boolean);if(st.length!==0){Ze.layers=st,Ze.stateDependentLayerIds&&(Ze.stateDependentLayers=Ze.stateDependentLayerIds.map(Tt=>st.filter(Yt=>Yt.id===Tt)[0]));for(let Tt of st)Oe[Tt.id]=Ze}}return Oe}(w.buckets,B.style),this.hasSymbolBuckets=!1;for(let ee in this.buckets){let le=this.buckets[ee];if(le instanceof a.a6){if(this.hasSymbolBuckets=!0,!Q)break;le.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let ee in this.buckets){let le=this.buckets[ee];if(le instanceof a.a6&&le.hasRTLText){this.hasRTLText=!0,Qt().lazyLoad();break}}this.queryPadding=0;for(let ee in this.buckets){let le=this.buckets[ee];this.queryPadding=Math.max(this.queryPadding,B.style.getLayer(ee).queryRadius(le))}w.imageAtlas&&(this.imageAtlas=w.imageAtlas),w.glyphAtlasImage&&(this.glyphAtlasImage=w.glyphAtlasImage)}else this.collisionBoxArray=new a.a5}unloadVectorData(){for(let w in this.buckets)this.buckets[w].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(w){return this.buckets[w.id]}upload(w){for(let Q in this.buckets){let ee=this.buckets[Q];ee.uploadPending()&&ee.upload(w)}let B=w.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new g(w,this.imageAtlas.image,B.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new g(w,this.glyphAtlasImage,B.ALPHA),this.glyphAtlasImage=null)}prepare(w){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(w,this.imageAtlasTexture)}queryRenderedFeatures(w,B,Q,ee,le,Oe,Ze,st,Tt,Yt){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:ee,cameraQueryGeometry:le,scale:Oe,tileSize:this.tileSize,pixelPosMatrix:Yt,transform:st,params:Ze,queryPadding:this.queryPadding*Tt},w,B,Q):{}}querySourceFeatures(w,B){let Q=this.latestFeatureIndex;if(!Q||!Q.rawTileData)return;let ee=Q.loadVTLayers(),le=B&&B.sourceLayer?B.sourceLayer:"",Oe=ee._geojsonTileLayer||ee[le];if(!Oe)return;let Ze=a.a7(B&&B.filter),{z:st,x:Tt,y:Yt}=this.tileID.canonical,Kt={z:st,x:Tt,y:Yt};for(let xr=0;xrQ)ee=!1;else if(B)if(this.expirationTime{this.remove(w,le)},Q)),this.data[ee].push(le),this.order.push(ee),this.order.length>this.max){let Oe=this._getAndRemoveByKey(this.order[0]);Oe&&this.onRemove(Oe)}return this}has(w){return w.wrapped().key in this.data}getAndRemove(w){return this.has(w)?this._getAndRemoveByKey(w.wrapped().key):null}_getAndRemoveByKey(w){let B=this.data[w].shift();return B.timeout&&clearTimeout(B.timeout),this.data[w].length===0&&delete this.data[w],this.order.splice(this.order.indexOf(w),1),B.value}getByKey(w){let B=this.data[w];return B?B[0].value:null}get(w){return this.has(w)?this.data[w.wrapped().key][0].value:null}remove(w,B){if(!this.has(w))return this;let Q=w.wrapped().key,ee=B===void 0?0:this.data[Q].indexOf(B),le=this.data[Q][ee];return this.data[Q].splice(ee,1),le.timeout&&clearTimeout(le.timeout),this.data[Q].length===0&&delete this.data[Q],this.onRemove(le.value),this.order.splice(this.order.indexOf(Q),1),this}setMaxSize(w){for(this.max=w;this.order.length>this.max;){let B=this._getAndRemoveByKey(this.order[0]);B&&this.onRemove(B)}return this}filter(w){let B=[];for(let Q in this.data)for(let ee of this.data[Q])w(ee.value)||B.push(ee);for(let Q of B)this.remove(Q.value.tileID,Q)}}class It{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(w,B,Q){let ee=String(B);if(this.stateChanges[w]=this.stateChanges[w]||{},this.stateChanges[w][ee]=this.stateChanges[w][ee]||{},a.e(this.stateChanges[w][ee],Q),this.deletedStates[w]===null){this.deletedStates[w]={};for(let le in this.state[w])le!==ee&&(this.deletedStates[w][le]=null)}else if(this.deletedStates[w]&&this.deletedStates[w][ee]===null){this.deletedStates[w][ee]={};for(let le in this.state[w][ee])Q[le]||(this.deletedStates[w][ee][le]=null)}else for(let le in Q)this.deletedStates[w]&&this.deletedStates[w][ee]&&this.deletedStates[w][ee][le]===null&&delete this.deletedStates[w][ee][le]}removeFeatureState(w,B,Q){if(this.deletedStates[w]===null)return;let ee=String(B);if(this.deletedStates[w]=this.deletedStates[w]||{},Q&&B!==void 0)this.deletedStates[w][ee]!==null&&(this.deletedStates[w][ee]=this.deletedStates[w][ee]||{},this.deletedStates[w][ee][Q]=null);else if(B!==void 0)if(this.stateChanges[w]&&this.stateChanges[w][ee])for(Q in this.deletedStates[w][ee]={},this.stateChanges[w][ee])this.deletedStates[w][ee][Q]=null;else this.deletedStates[w][ee]=null;else this.deletedStates[w]=null}getState(w,B){let Q=String(B),ee=a.e({},(this.state[w]||{})[Q],(this.stateChanges[w]||{})[Q]);if(this.deletedStates[w]===null)return{};if(this.deletedStates[w]){let le=this.deletedStates[w][B];if(le===null)return{};for(let Oe in le)delete ee[Oe]}return ee}initializeTileState(w,B){w.setFeatureState(this.state,B)}coalesceChanges(w,B){let Q={};for(let ee in this.stateChanges){this.state[ee]=this.state[ee]||{};let le={};for(let Oe in this.stateChanges[ee])this.state[ee][Oe]||(this.state[ee][Oe]={}),a.e(this.state[ee][Oe],this.stateChanges[ee][Oe]),le[Oe]=this.state[ee][Oe];Q[ee]=le}for(let ee in this.deletedStates){this.state[ee]=this.state[ee]||{};let le={};if(this.deletedStates[ee]===null)for(let Oe in this.state[ee])le[Oe]={},this.state[ee][Oe]={};else for(let Oe in this.deletedStates[ee]){if(this.deletedStates[ee][Oe]===null)this.state[ee][Oe]={};else for(let Ze of Object.keys(this.deletedStates[ee][Oe]))delete this.state[ee][Oe][Ze];le[Oe]=this.state[ee][Oe]}Q[ee]=Q[ee]||{},a.e(Q[ee],le)}if(this.stateChanges={},this.deletedStates={},Object.keys(Q).length!==0)for(let ee in w)w[ee].setFeatureState(Q,B)}}class mt extends a.E{constructor(w,B,Q){super(),this.id=w,this.dispatcher=Q,this.on("data",ee=>this._dataHandler(ee)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((ee,le,Oe,Ze)=>{let st=new(Tr(le.type))(ee,le,Oe,Ze);if(st.id!==ee)throw new Error(`Expected Source id to be ${ee} instead of ${st.id}`);return st})(w,B,Q,this),this._tiles={},this._cache=new _t(0,ee=>this._unloadTile(ee)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new It,this._didEmitContent=!1,this._updated=!1}onAdd(w){this.map=w,this._maxTileCacheSize=w?w._maxTileCacheSize:null,this._maxTileCacheZoomLevels=w?w._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(w)}onRemove(w){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(w)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let w in this._tiles){let B=this._tiles[w];if(B.state!=="loaded"&&B.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;let w=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,w&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(w,B,Q){return a._(this,void 0,void 0,function*(){try{yield this._source.loadTile(w),this._tileLoaded(w,B,Q)}catch(ee){w.state="errored",ee.status!==404?this._source.fire(new a.j(ee,{tile:w})):this.update(this.transform,this.terrain)}})}_unloadTile(w){this._source.unloadTile&&this._source.unloadTile(w)}_abortTile(w){this._source.abortTile&&this._source.abortTile(w),this._source.fire(new a.k("dataabort",{tile:w,coord:w.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(w){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(let B in this._tiles){let Q=this._tiles[B];Q.upload(w),Q.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(w=>w.tileID).sort(er).map(w=>w.key)}getRenderableIds(w){let B=[];for(let Q in this._tiles)this._isIdRenderable(Q,w)&&B.push(this._tiles[Q]);return w?B.sort((Q,ee)=>{let le=Q.tileID,Oe=ee.tileID,Ze=new a.P(le.canonical.x,le.canonical.y)._rotate(this.transform.angle),st=new a.P(Oe.canonical.x,Oe.canonical.y)._rotate(this.transform.angle);return le.overscaledZ-Oe.overscaledZ||st.y-Ze.y||st.x-Ze.x}).map(Q=>Q.tileID.key):B.map(Q=>Q.tileID).sort(er).map(Q=>Q.key)}hasRenderableParent(w){let B=this.findLoadedParent(w,0);return!!B&&this._isIdRenderable(B.tileID.key)}_isIdRenderable(w,B){return this._tiles[w]&&this._tiles[w].hasData()&&!this._coveredTiles[w]&&(B||!this._tiles[w].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(let w in this._tiles)this._tiles[w].state!=="errored"&&this._reloadTile(w,"reloading")}}_reloadTile(w,B){return a._(this,void 0,void 0,function*(){let Q=this._tiles[w];Q&&(Q.state!=="loading"&&(Q.state=B),yield this._loadTile(Q,w,B))})}_tileLoaded(w,B,Q){w.timeAdded=u.now(),Q==="expired"&&(w.refreshedUponExpiration=!0),this._setTileReloadTimer(B,w),this.getSource().type==="raster-dem"&&w.dem&&this._backfillDEM(w),this._state.initializeTileState(w,this.map?this.map.painter:null),w.aborted||this._source.fire(new a.k("data",{dataType:"source",tile:w,coord:w.tileID}))}_backfillDEM(w){let B=this.getRenderableIds();for(let ee=0;ee1||(Math.abs(Oe)>1&&(Math.abs(Oe+st)===1?Oe+=st:Math.abs(Oe-st)===1&&(Oe-=st)),le.dem&&ee.dem&&(ee.dem.backfillBorder(le.dem,Oe,Ze),ee.neighboringTiles&&ee.neighboringTiles[Tt]&&(ee.neighboringTiles[Tt].backfilled=!0)))}}getTile(w){return this.getTileByID(w.key)}getTileByID(w){return this._tiles[w]}_retainLoadedChildren(w,B,Q,ee){for(let le in this._tiles){let Oe=this._tiles[le];if(ee[le]||!Oe.hasData()||Oe.tileID.overscaledZ<=B||Oe.tileID.overscaledZ>Q)continue;let Ze=Oe.tileID;for(;Oe&&Oe.tileID.overscaledZ>B+1;){let Tt=Oe.tileID.scaledTo(Oe.tileID.overscaledZ-1);Oe=this._tiles[Tt.key],Oe&&Oe.hasData()&&(Ze=Tt)}let st=Ze;for(;st.overscaledZ>B;)if(st=st.scaledTo(st.overscaledZ-1),w[st.key]){ee[Ze.key]=Ze;break}}}findLoadedParent(w,B){if(w.key in this._loadedParentTiles){let Q=this._loadedParentTiles[w.key];return Q&&Q.tileID.overscaledZ>=B?Q:null}for(let Q=w.overscaledZ-1;Q>=B;Q--){let ee=w.scaledTo(Q),le=this._getLoadedTile(ee);if(le)return le}}findLoadedSibling(w){return this._getLoadedTile(w)}_getLoadedTile(w){let B=this._tiles[w.key];return B&&B.hasData()?B:this._cache.getByKey(w.wrapped().key)}updateCacheSize(w){let B=Math.ceil(w.width/this._source.tileSize)+1,Q=Math.ceil(w.height/this._source.tileSize)+1,ee=Math.floor(B*Q*(this._maxTileCacheZoomLevels===null?a.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),le=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,ee):ee;this._cache.setMaxSize(le)}handleWrapJump(w){let B=Math.round((w-(this._prevLng===void 0?w:this._prevLng))/360);if(this._prevLng=w,B){let Q={};for(let ee in this._tiles){let le=this._tiles[ee];le.tileID=le.tileID.unwrapTo(le.tileID.wrap+B),Q[le.tileID.key]=le}this._tiles=Q;for(let ee in this._timers)clearTimeout(this._timers[ee]),delete this._timers[ee];for(let ee in this._tiles)this._setTileReloadTimer(ee,this._tiles[ee])}}_updateCoveredAndRetainedTiles(w,B,Q,ee,le,Oe){let Ze={},st={},Tt=Object.keys(w),Yt=u.now();for(let Kt of Tt){let xr=w[Kt],Ir=this._tiles[Kt];if(!Ir||Ir.fadeEndTime!==0&&Ir.fadeEndTime<=Yt)continue;let ve=this.findLoadedParent(xr,B),be=this.findLoadedSibling(xr),Re=ve||be||null;Re&&(this._addTile(Re.tileID),Ze[Re.tileID.key]=Re.tileID),st[Kt]=xr}this._retainLoadedChildren(st,ee,Q,w);for(let Kt in Ze)w[Kt]||(this._coveredTiles[Kt]=!0,w[Kt]=Ze[Kt]);if(Oe){let Kt={},xr={};for(let Ir of le)this._tiles[Ir.key].hasData()?Kt[Ir.key]=Ir:xr[Ir.key]=Ir;for(let Ir in xr){let ve=xr[Ir].children(this._source.maxzoom);this._tiles[ve[0].key]&&this._tiles[ve[1].key]&&this._tiles[ve[2].key]&&this._tiles[ve[3].key]&&(Kt[ve[0].key]=w[ve[0].key]=ve[0],Kt[ve[1].key]=w[ve[1].key]=ve[1],Kt[ve[2].key]=w[ve[2].key]=ve[2],Kt[ve[3].key]=w[ve[3].key]=ve[3],delete xr[Ir])}for(let Ir in xr){let ve=xr[Ir],be=this.findLoadedParent(ve,this._source.minzoom),Re=this.findLoadedSibling(ve),qe=be||Re||null;if(qe){Kt[qe.tileID.key]=w[qe.tileID.key]=qe.tileID;for(let et in Kt)Kt[et].isChildOf(qe.tileID)&&delete Kt[et]}}for(let Ir in this._tiles)Kt[Ir]||(this._coveredTiles[Ir]=!0)}}update(w,B){if(!this._sourceLoaded||this._paused)return;let Q;this.transform=w,this.terrain=B,this.updateCacheSize(w),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?Q=w.getVisibleUnwrappedCoordinates(this._source.tileID).map(Yt=>new a.S(Yt.canonical.z,Yt.wrap,Yt.canonical.z,Yt.canonical.x,Yt.canonical.y)):(Q=w.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:B}),this._source.hasTile&&(Q=Q.filter(Yt=>this._source.hasTile(Yt)))):Q=[];let ee=w.coveringZoomLevel(this._source),le=Math.max(ee-mt.maxOverzooming,this._source.minzoom),Oe=Math.max(ee+mt.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){let Yt={};for(let Kt of Q)if(Kt.canonical.z>this._source.minzoom){let xr=Kt.scaledTo(Kt.canonical.z-1);Yt[xr.key]=xr;let Ir=Kt.scaledTo(Math.max(this._source.minzoom,Math.min(Kt.canonical.z,5)));Yt[Ir.key]=Ir}Q=Q.concat(Object.values(Yt))}let Ze=Q.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,Ze&&this.fire(new a.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let st=this._updateRetainedTiles(Q,ee);lr(this._source.type)&&this._updateCoveredAndRetainedTiles(st,le,Oe,ee,Q,B);for(let Yt in st)this._tiles[Yt].clearFadeHold();let Tt=a.ab(this._tiles,st);for(let Yt of Tt){let Kt=this._tiles[Yt];Kt.hasSymbolBuckets&&!Kt.holdingForFade()?Kt.setHoldDuration(this.map._fadeDuration):Kt.hasSymbolBuckets&&!Kt.symbolFadeFinished()||this._removeTile(Yt)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(let w in this._tiles)this._tiles[w].holdingForFade()&&this._removeTile(w)}_updateRetainedTiles(w,B){var Q;let ee={},le={},Oe=Math.max(B-mt.maxOverzooming,this._source.minzoom),Ze=Math.max(B+mt.maxUnderzooming,this._source.minzoom),st={};for(let Tt of w){let Yt=this._addTile(Tt);ee[Tt.key]=Tt,Yt.hasData()||Bthis._source.maxzoom){let xr=Tt.children(this._source.maxzoom)[0],Ir=this.getTile(xr);if(Ir&&Ir.hasData()){ee[xr.key]=xr;continue}}else{let xr=Tt.children(this._source.maxzoom);if(ee[xr[0].key]&&ee[xr[1].key]&&ee[xr[2].key]&&ee[xr[3].key])continue}let Kt=Yt.wasRequested();for(let xr=Tt.overscaledZ-1;xr>=Oe;--xr){let Ir=Tt.scaledTo(xr);if(le[Ir.key])break;if(le[Ir.key]=!0,Yt=this.getTile(Ir),!Yt&&Kt&&(Yt=this._addTile(Ir)),Yt){let ve=Yt.hasData();if((ve||!(!((Q=this.map)===null||Q===void 0)&&Q.cancelPendingTileRequestsWhileZooming)||Kt)&&(ee[Ir.key]=Ir),Kt=Yt.wasRequested(),ve)break}}}return ee}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(let w in this._tiles){let B=[],Q,ee=this._tiles[w].tileID;for(;ee.overscaledZ>0;){if(ee.key in this._loadedParentTiles){Q=this._loadedParentTiles[ee.key];break}B.push(ee.key);let le=ee.scaledTo(ee.overscaledZ-1);if(Q=this._getLoadedTile(le),Q)break;ee=le}for(let le of B)this._loadedParentTiles[le]=Q}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(let w in this._tiles){let B=this._tiles[w].tileID,Q=this._getLoadedTile(B);this._loadedSiblingTiles[B.key]=Q}}_addTile(w){let B=this._tiles[w.key];if(B)return B;B=this._cache.getAndRemove(w),B&&(this._setTileReloadTimer(w.key,B),B.tileID=w,this._state.initializeTileState(B,this.map?this.map.painter:null),this._cacheTimers[w.key]&&(clearTimeout(this._cacheTimers[w.key]),delete this._cacheTimers[w.key],this._setTileReloadTimer(w.key,B)));let Q=B;return B||(B=new Gt(w,this._source.tileSize*w.overscaleFactor()),this._loadTile(B,w.key,B.state)),B.uses++,this._tiles[w.key]=B,Q||this._source.fire(new a.k("dataloading",{tile:B,coord:B.tileID,dataType:"source"})),B}_setTileReloadTimer(w,B){w in this._timers&&(clearTimeout(this._timers[w]),delete this._timers[w]);let Q=B.getExpiryTimeout();Q&&(this._timers[w]=setTimeout(()=>{this._reloadTile(w,"expired"),delete this._timers[w]},Q))}_removeTile(w){let B=this._tiles[w];B&&(B.uses--,delete this._tiles[w],this._timers[w]&&(clearTimeout(this._timers[w]),delete this._timers[w]),B.uses>0||(B.hasData()&&B.state!=="reloading"?this._cache.add(B.tileID,B,B.getExpiryTimeout()):(B.aborted=!0,this._abortTile(B),this._unloadTile(B))))}_dataHandler(w){let B=w.sourceDataType;w.dataType==="source"&&B==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&w.dataType==="source"&&B==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let w in this._tiles)this._removeTile(w);this._cache.reset()}tilesIn(w,B,Q){let ee=[],le=this.transform;if(!le)return ee;let Oe=Q?le.getCameraQueryGeometry(w):w,Ze=w.map(ve=>le.pointCoordinate(ve,this.terrain)),st=Oe.map(ve=>le.pointCoordinate(ve,this.terrain)),Tt=this.getIds(),Yt=1/0,Kt=1/0,xr=-1/0,Ir=-1/0;for(let ve of st)Yt=Math.min(Yt,ve.x),Kt=Math.min(Kt,ve.y),xr=Math.max(xr,ve.x),Ir=Math.max(Ir,ve.y);for(let ve=0;ve=0&&Xe[1].y+et>=0){let it=Ze.map(Ht=>Re.getTilePoint(Ht)),Ft=st.map(Ht=>Re.getTilePoint(Ht));ee.push({tile:be,tileID:Re,queryGeometry:it,cameraQueryGeometry:Ft,scale:qe})}}return ee}getVisibleCoordinates(w){let B=this.getRenderableIds(w).map(Q=>this._tiles[Q].tileID);for(let Q of B)Q.posMatrix=this.transform.calculatePosMatrix(Q.toUnwrapped());return B}hasTransition(){if(this._source.hasTransition())return!0;if(lr(this._source.type)){let w=u.now();for(let B in this._tiles)if(this._tiles[B].fadeEndTime>=w)return!0}return!1}setFeatureState(w,B,Q){this._state.updateState(w=w||"_geojsonTileLayer",B,Q)}removeFeatureState(w,B,Q){this._state.removeFeatureState(w=w||"_geojsonTileLayer",B,Q)}getFeatureState(w,B){return this._state.getState(w=w||"_geojsonTileLayer",B)}setDependencies(w,B,Q){let ee=this._tiles[w];ee&&ee.setDependencies(B,Q)}reloadTilesForDependencies(w,B){for(let Q in this._tiles)this._tiles[Q].hasDependency(w,B)&&this._reloadTile(Q,"reloading");this._cache.filter(Q=>!Q.hasDependency(w,B))}}function er(ue,w){let B=Math.abs(2*ue.wrap)-+(ue.wrap<0),Q=Math.abs(2*w.wrap)-+(w.wrap<0);return ue.overscaledZ-w.overscaledZ||Q-B||w.canonical.y-ue.canonical.y||w.canonical.x-ue.canonical.x}function lr(ue){return ue==="raster"||ue==="image"||ue==="video"}mt.maxOverzooming=10,mt.maxUnderzooming=3;class wr{constructor(w,B){this.reset(w,B)}reset(w,B){this.points=w||[],this._distances=[0];for(let Q=1;Q0?(ee-Oe)/Ze:0;return this.points[le].mult(1-st).add(this.points[B].mult(st))}}function Lr(ue,w){let B=!0;return ue==="always"||ue!=="never"&&w!=="never"||(B=!1),B}class ti{constructor(w,B,Q){let ee=this.boxCells=[],le=this.circleCells=[];this.xCellCount=Math.ceil(w/Q),this.yCellCount=Math.ceil(B/Q);for(let Oe=0;Oethis.width||ee<0||B>this.height)return[];let st=[];if(w<=0&&B<=0&&this.width<=Q&&this.height<=ee){if(le)return[{key:null,x1:w,y1:B,x2:Q,y2:ee}];for(let Tt=0;Tt0}hitTestCircle(w,B,Q,ee,le){let Oe=w-Q,Ze=w+Q,st=B-Q,Tt=B+Q;if(Ze<0||Oe>this.width||Tt<0||st>this.height)return!1;let Yt=[];return this._forEachCell(Oe,st,Ze,Tt,this._queryCellCircle,Yt,{hitTest:!0,overlapMode:ee,circle:{x:w,y:B,radius:Q},seenUids:{box:{},circle:{}}},le),Yt.length>0}_queryCell(w,B,Q,ee,le,Oe,Ze,st){let{seenUids:Tt,hitTest:Yt,overlapMode:Kt}=Ze,xr=this.boxCells[le];if(xr!==null){let ve=this.bboxes;for(let be of xr)if(!Tt.box[be]){Tt.box[be]=!0;let Re=4*be,qe=this.boxKeys[be];if(w<=ve[Re+2]&&B<=ve[Re+3]&&Q>=ve[Re+0]&&ee>=ve[Re+1]&&(!st||st(qe))&&(!Yt||!Lr(Kt,qe.overlapMode))&&(Oe.push({key:qe,x1:ve[Re],y1:ve[Re+1],x2:ve[Re+2],y2:ve[Re+3]}),Yt))return!0}}let Ir=this.circleCells[le];if(Ir!==null){let ve=this.circles;for(let be of Ir)if(!Tt.circle[be]){Tt.circle[be]=!0;let Re=3*be,qe=this.circleKeys[be];if(this._circleAndRectCollide(ve[Re],ve[Re+1],ve[Re+2],w,B,Q,ee)&&(!st||st(qe))&&(!Yt||!Lr(Kt,qe.overlapMode))){let et=ve[Re],Xe=ve[Re+1],it=ve[Re+2];if(Oe.push({key:qe,x1:et-it,y1:Xe-it,x2:et+it,y2:Xe+it}),Yt)return!0}}}return!1}_queryCellCircle(w,B,Q,ee,le,Oe,Ze,st){let{circle:Tt,seenUids:Yt,overlapMode:Kt}=Ze,xr=this.boxCells[le];if(xr!==null){let ve=this.bboxes;for(let be of xr)if(!Yt.box[be]){Yt.box[be]=!0;let Re=4*be,qe=this.boxKeys[be];if(this._circleAndRectCollide(Tt.x,Tt.y,Tt.radius,ve[Re+0],ve[Re+1],ve[Re+2],ve[Re+3])&&(!st||st(qe))&&!Lr(Kt,qe.overlapMode))return Oe.push(!0),!0}}let Ir=this.circleCells[le];if(Ir!==null){let ve=this.circles;for(let be of Ir)if(!Yt.circle[be]){Yt.circle[be]=!0;let Re=3*be,qe=this.circleKeys[be];if(this._circlesCollide(ve[Re],ve[Re+1],ve[Re+2],Tt.x,Tt.y,Tt.radius)&&(!st||st(qe))&&!Lr(Kt,qe.overlapMode))return Oe.push(!0),!0}}}_forEachCell(w,B,Q,ee,le,Oe,Ze,st){let Tt=this._convertToXCellCoord(w),Yt=this._convertToYCellCoord(B),Kt=this._convertToXCellCoord(Q),xr=this._convertToYCellCoord(ee);for(let Ir=Tt;Ir<=Kt;Ir++)for(let ve=Yt;ve<=xr;ve++)if(le.call(this,w,B,Q,ee,this.xCellCount*ve+Ir,Oe,Ze,st))return}_convertToXCellCoord(w){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(w*this.xScale)))}_convertToYCellCoord(w){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(w*this.yScale)))}_circlesCollide(w,B,Q,ee,le,Oe){let Ze=ee-w,st=le-B,Tt=Q+Oe;return Tt*Tt>Ze*Ze+st*st}_circleAndRectCollide(w,B,Q,ee,le,Oe,Ze){let st=(Oe-ee)/2,Tt=Math.abs(w-(ee+st));if(Tt>st+Q)return!1;let Yt=(Ze-le)/2,Kt=Math.abs(B-(le+Yt));if(Kt>Yt+Q)return!1;if(Tt<=st||Kt<=Yt)return!0;let xr=Tt-st,Ir=Kt-Yt;return xr*xr+Ir*Ir<=Q*Q}}function Br(ue,w,B,Q,ee){let le=a.H();return w?(a.K(le,le,[1/ee,1/ee,1]),B||a.ad(le,le,Q.angle)):a.L(le,Q.labelPlaneMatrix,ue),le}function Vr(ue,w,B,Q,ee){if(w){let le=a.ae(ue);return a.K(le,le,[ee,ee,1]),B||a.ad(le,le,-Q.angle),le}return Q.glCoordMatrix}function dt(ue,w,B,Q){let ee;Q?(ee=[ue,w,Q(ue,w),1],a.af(ee,ee,B)):(ee=[ue,w,0,1],$r(ee,ee,B));let le=ee[3];return{point:new a.P(ee[0]/le,ee[1]/le),signedDistanceFromCamera:le,isOccluded:!1}}function Ge(ue,w){return .5+ue/w*.5}function Je(ue,w){return ue.x>=-w[0]&&ue.x<=w[0]&&ue.y>=-w[1]&&ue.y<=w[1]}function We(ue,w,B,Q,ee,le,Oe,Ze,st,Tt,Yt,Kt,xr,Ir,ve){let be=Q?ue.textSizeData:ue.iconSizeData,Re=a.ag(be,B.transform.zoom),qe=[256/B.width*2+1,256/B.height*2+1],et=Q?ue.text.dynamicLayoutVertexArray:ue.icon.dynamicLayoutVertexArray;et.clear();let Xe=ue.lineVertexArray,it=Q?ue.text.placedSymbolArray:ue.icon.placedSymbolArray,Ft=B.transform.width/B.transform.height,Ht=!1;for(let tr=0;trMath.abs(B.x-w.x)*Q?{useVertical:!0}:(ue===a.ah.vertical?w.yB.x)?{needsFlipping:!0}:null}function Ie(ue,w,B,Q,ee,le,Oe,Ze,st,Tt,Yt){let Kt=B/24,xr=w.lineOffsetX*Kt,Ir=w.lineOffsetY*Kt,ve;if(w.numGlyphs>1){let be=w.glyphStartIndex+w.numGlyphs,Re=w.lineStartIndex,qe=w.lineStartIndex+w.lineLength,et=tt(Kt,Ze,xr,Ir,Q,w,Yt,ue);if(!et)return{notEnoughRoom:!0};let Xe=dt(et.first.point.x,et.first.point.y,Oe,ue.getElevation).point,it=dt(et.last.point.x,et.last.point.y,Oe,ue.getElevation).point;if(ee&&!Q){let Ft=xt(w.writingMode,Xe,it,Tt);if(Ft)return Ft}ve=[et.first];for(let Ft=w.glyphStartIndex+1;Ft0?Xe.point:function(Ht,tr,dr,Sr,Or,Wr){return xe(Ht,tr,dr,1,Or,Wr)}(ue.tileAnchorPoint,et,Re,0,le,ue),Ft=xt(w.writingMode,Re,it,Tt);if(Ft)return Ft}let be=vr(Kt*Ze.getoffsetX(w.glyphStartIndex),xr,Ir,Q,w.segment,w.lineStartIndex,w.lineStartIndex+w.lineLength,ue,Yt);if(!be||ue.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};ve=[be]}for(let be of ve)a.aj(st,be.point,be.angle);return{}}function xe(ue,w,B,Q,ee,le){let Oe=ue.add(ue.sub(w)._unit()),Ze=ee!==void 0?dt(Oe.x,Oe.y,ee,le.getElevation).point:vt(Oe.x,Oe.y,le).point,st=B.sub(Ze);return B.add(st._mult(Q/st.mag()))}function ke(ue,w,B){let Q=w.projectionCache;if(Q.projections[ue])return Q.projections[ue];let ee=new a.P(w.lineVertexArray.getx(ue),w.lineVertexArray.gety(ue)),le=vt(ee.x,ee.y,w);if(le.signedDistanceFromCamera>0)return Q.projections[ue]=le.point,Q.anyProjectionOccluded=Q.anyProjectionOccluded||le.isOccluded,le.point;let Oe=ue-B.direction;return function(Ze,st,Tt,Yt,Kt){return xe(Ze,st,Tt,Yt,void 0,Kt)}(B.distanceFromAnchor===0?w.tileAnchorPoint:new a.P(w.lineVertexArray.getx(Oe),w.lineVertexArray.gety(Oe)),ee,B.previousVertex,B.absOffsetX-B.distanceFromAnchor+1,w)}function vt(ue,w,B){let Q=ue+B.translation[0],ee=w+B.translation[1],le;return!B.pitchWithMap&&B.projection.useSpecialProjectionForSymbols?(le=B.projection.projectTileCoordinates(Q,ee,B.unwrappedTileID,B.getElevation),le.point.x=(.5*le.point.x+.5)*B.width,le.point.y=(.5*-le.point.y+.5)*B.height):(le=dt(Q,ee,B.labelPlaneMatrix,B.getElevation),le.isOccluded=!1),le}function ir(ue,w,B){return ue._unit()._perp()._mult(w*B)}function ar(ue,w,B,Q,ee,le,Oe,Ze,st){if(Ze.projectionCache.offsets[ue])return Ze.projectionCache.offsets[ue];let Tt=B.add(w);if(ue+st.direction=ee)return Ze.projectionCache.offsets[ue]=Tt,Tt;let Yt=ke(ue+st.direction,Ze,st),Kt=ir(Yt.sub(B),Oe,st.direction),xr=B.add(Kt),Ir=Yt.add(Kt);return Ze.projectionCache.offsets[ue]=a.ak(le,Tt,xr,Ir)||Tt,Ze.projectionCache.offsets[ue]}function vr(ue,w,B,Q,ee,le,Oe,Ze,st){let Tt=Q?ue-w:ue+w,Yt=Tt>0?1:-1,Kt=0;Q&&(Yt*=-1,Kt=Math.PI),Yt<0&&(Kt+=Math.PI);let xr,Ir=Yt>0?le+ee:le+ee+1;Ze.projectionCache.cachedAnchorPoint?xr=Ze.projectionCache.cachedAnchorPoint:(xr=vt(Ze.tileAnchorPoint.x,Ze.tileAnchorPoint.y,Ze).point,Ze.projectionCache.cachedAnchorPoint=xr);let ve,be,Re=xr,qe=xr,et=0,Xe=0,it=Math.abs(Tt),Ft=[],Ht;for(;et+Xe<=it;){if(Ir+=Yt,Ir=Oe)return null;et+=Xe,qe=Re,be=ve;let Sr={absOffsetX:it,direction:Yt,distanceFromAnchor:et,previousVertex:qe};if(Re=ke(Ir,Ze,Sr),B===0)Ft.push(qe),Ht=Re.sub(qe);else{let Or,Wr=Re.sub(qe);Or=Wr.mag()===0?ir(ke(Ir+Yt,Ze,Sr).sub(Re),B,Yt):ir(Wr,B,Yt),be||(be=qe.add(Or)),ve=ar(Ir,Or,Re,le,Oe,be,B,Ze,Sr),Ft.push(be),Ht=ve.sub(be)}Xe=Ht.mag()}let tr=Ht._mult((it-et)/Xe)._add(be||qe),dr=Kt+Math.atan2(Re.y-qe.y,Re.x-qe.x);return Ft.push(tr),{point:tr,angle:st?dr:0,path:Ft}}let ii=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function pi(ue,w){for(let B=0;B=1;fa--)Cn.push(cn.path[fa]);for(let fa=1;fa$a.signedDistanceFromCamera<=0)?[]:fa.map($a=>$a.point)}let Aa=[];if(Cn.length>0){let fa=Cn[0].clone(),$a=Cn[0].clone();for(let Co=1;Co=Wr.x&&$a.x<=ni.x&&fa.y>=Wr.y&&$a.y<=ni.y?[Cn]:$a.xni.x||$a.yni.y?[]:a.al([Cn],Wr.x,Wr.y,ni.x,ni.y)}for(let fa of Aa){Pi.reset(fa,.25*Or);let $a=0;$a=Pi.length<=.5*Or?1:Math.ceil(Pi.paddedLength/Kn)+1;for(let Co=0;Co<$a;Co++){let Qa=Co/Math.max($a-1,1),mo=Pi.lerp(Qa),Bo=mo.x+di,Ps=mo.y+di;qe.push(Bo,Ps,Or,0);let Ts=Bo-Or,wo=Ps-Or,To=Bo+Or,hl=Ps+Or;if(Sr=Sr&&this.isOffscreen(Ts,wo,To,hl),dr=dr||this.isInsideGrid(Ts,wo,To,hl),w!=="always"&&this.grid.hitTestCircle(Bo,Ps,Or,w,xr)&&(tr=!0,!Yt))return{circles:[],offscreen:!1,collisionDetected:tr}}}}return{circles:!Yt&&tr||!dr||Xedt(ee.x,ee.y,Q,B.getElevation))}queryRenderedSymbols(w){if(w.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let B=[],Q=1/0,ee=1/0,le=-1/0,Oe=-1/0;for(let Yt of w){let Kt=new a.P(Yt.x+di,Yt.y+di);Q=Math.min(Q,Kt.x),ee=Math.min(ee,Kt.y),le=Math.max(le,Kt.x),Oe=Math.max(Oe,Kt.y),B.push(Kt)}let Ze=this.grid.query(Q,ee,le,Oe).concat(this.ignoredGrid.query(Q,ee,le,Oe)),st={},Tt={};for(let Yt of Ze){let Kt=Yt.key;if(st[Kt.bucketInstanceId]===void 0&&(st[Kt.bucketInstanceId]={}),st[Kt.bucketInstanceId][Kt.featureIndex])continue;let xr=[new a.P(Yt.x1,Yt.y1),new a.P(Yt.x2,Yt.y1),new a.P(Yt.x2,Yt.y2),new a.P(Yt.x1,Yt.y2)];a.am(B,xr)&&(st[Kt.bucketInstanceId][Kt.featureIndex]=!0,Tt[Kt.bucketInstanceId]===void 0&&(Tt[Kt.bucketInstanceId]=[]),Tt[Kt.bucketInstanceId].push(Kt.featureIndex))}return Tt}insertCollisionBox(w,B,Q,ee,le,Oe){(Q?this.ignoredGrid:this.grid).insert({bucketInstanceId:ee,featureIndex:le,collisionGroupID:Oe,overlapMode:B},w[0],w[1],w[2],w[3])}insertCollisionCircles(w,B,Q,ee,le,Oe){let Ze=Q?this.ignoredGrid:this.grid,st={bucketInstanceId:ee,featureIndex:le,collisionGroupID:Oe,overlapMode:B};for(let Tt=0;Tt=this.screenRightBoundary||eethis.screenBottomBoundary}isInsideGrid(w,B,Q,ee){return Q>=0&&w=0&&Bthis.projectAndGetPerspectiveRatio(Q,Or.x,Or.y,ee,Tt));dr=Sr.some(Or=>!Or.isOccluded),tr=Sr.map(Or=>Or.point)}else dr=!0;return{box:a.ao(tr),allPointsOccluded:!dr}}}function In(ue,w,B){return w*(a.X/(ue.tileSize*Math.pow(2,B-ue.tileID.overscaledZ)))}class wi{constructor(w,B,Q,ee){this.opacity=w?Math.max(0,Math.min(1,w.opacity+(w.placed?B:-B))):ee&&Q?1:0,this.placed=Q}isHidden(){return this.opacity===0&&!this.placed}}class On{constructor(w,B,Q,ee,le){this.text=new wi(w?w.text:null,B,Q,le),this.icon=new wi(w?w.icon:null,B,ee,le)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class qn{constructor(w,B,Q){this.text=w,this.icon=B,this.skipFade=Q}}class Fn{constructor(){this.invProjMatrix=a.H(),this.viewportMatrix=a.H(),this.circles=[]}}class ra{constructor(w,B,Q,ee,le){this.bucketInstanceId=w,this.featureIndex=B,this.sourceLayerIndex=Q,this.bucketIndex=ee,this.tileID=le}}class la{constructor(w){this.crossSourceCollisions=w,this.maxGroupID=0,this.collisionGroups={}}get(w){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[w]){let B=++this.maxGroupID;this.collisionGroups[w]={ID:B,predicate:Q=>Q.collisionGroupID===B}}return this.collisionGroups[w]}}function Ut(ue,w,B,Q,ee){let{horizontalAlign:le,verticalAlign:Oe}=a.au(ue);return new a.P(-(le-.5)*w+Q[0]*ee,-(Oe-.5)*B+Q[1]*ee)}class wt{constructor(w,B,Q,ee,le,Oe){this.transform=w.clone(),this.terrain=Q,this.collisionIndex=new ji(this.transform,B),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=ee,this.retainedQueryData={},this.collisionGroups=new la(le),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=Oe,Oe&&(Oe.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(w){let B=this.terrain;return B?(Q,ee)=>B.getElevation(w,Q,ee):null}getBucketParts(w,B,Q,ee){let le=Q.getBucket(B),Oe=Q.latestFeatureIndex;if(!le||!Oe||B.id!==le.layerIds[0])return;let Ze=Q.collisionBoxArray,st=le.layers[0].layout,Tt=le.layers[0].paint,Yt=Math.pow(2,this.transform.zoom-Q.tileID.overscaledZ),Kt=Q.tileSize/a.X,xr=Q.tileID.toUnwrapped(),Ir=this.transform.calculatePosMatrix(xr),ve=st.get("text-pitch-alignment")==="map",be=st.get("text-rotation-alignment")==="map",Re=In(Q,1,this.transform.zoom),qe=this.collisionIndex.mapProjection.translatePosition(this.transform,Q,Tt.get("text-translate"),Tt.get("text-translate-anchor")),et=this.collisionIndex.mapProjection.translatePosition(this.transform,Q,Tt.get("icon-translate"),Tt.get("icon-translate-anchor")),Xe=Br(Ir,ve,be,this.transform,Re),it=null;if(ve){let Ht=Vr(Ir,ve,be,this.transform,Re);it=a.L([],this.transform.labelPlaneMatrix,Ht)}this.retainedQueryData[le.bucketInstanceId]=new ra(le.bucketInstanceId,Oe,le.sourceLayerIndex,le.index,Q.tileID);let Ft={bucket:le,layout:st,translationText:qe,translationIcon:et,posMatrix:Ir,unwrappedTileID:xr,textLabelPlaneMatrix:Xe,labelToScreenMatrix:it,scale:Yt,textPixelRatio:Kt,holdingForFade:Q.holdingForFade(),collisionBoxArray:Ze,partiallyEvaluatedTextSize:a.ag(le.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(le.sourceID)};if(ee)for(let Ht of le.sortKeyRanges){let{sortKey:tr,symbolInstanceStart:dr,symbolInstanceEnd:Sr}=Ht;w.push({sortKey:tr,symbolInstanceStart:dr,symbolInstanceEnd:Sr,parameters:Ft})}else w.push({symbolInstanceStart:0,symbolInstanceEnd:le.symbolInstances.length,parameters:Ft})}attemptAnchorPlacement(w,B,Q,ee,le,Oe,Ze,st,Tt,Yt,Kt,xr,Ir,ve,be,Re,qe,et,Xe){let it=a.aq[w.textAnchor],Ft=[w.textOffset0,w.textOffset1],Ht=Ut(it,Q,ee,Ft,le),tr=this.collisionIndex.placeCollisionBox(B,xr,st,Tt,Yt,Ze,Oe,Re,Kt.predicate,Xe,Ht);if((!et||this.collisionIndex.placeCollisionBox(et,xr,st,Tt,Yt,Ze,Oe,qe,Kt.predicate,Xe,Ht).placeable)&&tr.placeable){let dr;if(this.prevPlacement&&this.prevPlacement.variableOffsets[Ir.crossTileID]&&this.prevPlacement.placements[Ir.crossTileID]&&this.prevPlacement.placements[Ir.crossTileID].text&&(dr=this.prevPlacement.variableOffsets[Ir.crossTileID].anchor),Ir.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[Ir.crossTileID]={textOffset:Ft,width:Q,height:ee,anchor:it,textBoxScale:le,prevAnchor:dr},this.markUsedJustification(ve,it,Ir,be),ve.allowVerticalPlacement&&(this.markUsedOrientation(ve,be,Ir),this.placedOrientations[Ir.crossTileID]=be),{shift:Ht,placedGlyphBoxes:tr}}}placeLayerBucketPart(w,B,Q){let{bucket:ee,layout:le,translationText:Oe,translationIcon:Ze,posMatrix:st,unwrappedTileID:Tt,textLabelPlaneMatrix:Yt,labelToScreenMatrix:Kt,textPixelRatio:xr,holdingForFade:Ir,collisionBoxArray:ve,partiallyEvaluatedTextSize:be,collisionGroup:Re}=w.parameters,qe=le.get("text-optional"),et=le.get("icon-optional"),Xe=a.ar(le,"text-overlap","text-allow-overlap"),it=Xe==="always",Ft=a.ar(le,"icon-overlap","icon-allow-overlap"),Ht=Ft==="always",tr=le.get("text-rotation-alignment")==="map",dr=le.get("text-pitch-alignment")==="map",Sr=le.get("icon-text-fit")!=="none",Or=le.get("symbol-z-order")==="viewport-y",Wr=it&&(Ht||!ee.hasIconData()||et),ni=Ht&&(it||!ee.hasTextData()||qe);!ee.collisionArrays&&ve&&ee.deserializeCollisionBoxes(ve);let Pi=this._getTerrainElevationFunc(this.retainedQueryData[ee.bucketInstanceId].tileID),cn=(ln,Cn,Kn)=>{var Aa,fa;if(B[ln.crossTileID])return;if(Ir)return void(this.placements[ln.crossTileID]=new qn(!1,!1,!1));let $a=!1,Co=!1,Qa=!0,mo=null,Bo={box:null,placeable:!1,offscreen:null},Ps={box:null,placeable:!1,offscreen:null},Ts=null,wo=null,To=null,hl=0,Ul=0,Lu=0;Cn.textFeatureIndex?hl=Cn.textFeatureIndex:ln.useRuntimeCollisionCircles&&(hl=ln.featureIndex),Cn.verticalTextFeatureIndex&&(Ul=Cn.verticalTextFeatureIndex);let au=Cn.textBox;if(au){let Tl=Te=>{let Ne=a.ah.horizontal;if(ee.allowVerticalPlacement&&!Te&&this.prevPlacement){let He=this.prevPlacement.placedOrientations[ln.crossTileID];He&&(this.placedOrientations[ln.crossTileID]=He,Ne=He,this.markUsedOrientation(ee,Ne,ln))}return Ne},Al=(Te,Ne)=>{if(ee.allowVerticalPlacement&&ln.numVerticalGlyphVertices>0&&Cn.verticalTextBox){for(let He of ee.writingModes)if(He===a.ah.vertical?(Bo=Ne(),Ps=Bo):Bo=Te(),Bo&&Bo.placeable)break}else Bo=Te()},X=ln.textAnchorOffsetStartIndex,se=ln.textAnchorOffsetEndIndex;if(se===X){let Te=(Ne,He)=>{let Ye=this.collisionIndex.placeCollisionBox(Ne,Xe,xr,st,Tt,dr,tr,Oe,Re.predicate,Pi);return Ye&&Ye.placeable&&(this.markUsedOrientation(ee,He,ln),this.placedOrientations[ln.crossTileID]=He),Ye};Al(()=>Te(au,a.ah.horizontal),()=>{let Ne=Cn.verticalTextBox;return ee.allowVerticalPlacement&&ln.numVerticalGlyphVertices>0&&Ne?Te(Ne,a.ah.vertical):{box:null,offscreen:null}}),Tl(Bo&&Bo.placeable)}else{let Te=a.aq[(fa=(Aa=this.prevPlacement)===null||Aa===void 0?void 0:Aa.variableOffsets[ln.crossTileID])===null||fa===void 0?void 0:fa.anchor],Ne=(Ye,kt,nt)=>{let jt=Ye.x2-Ye.x1,gr=Ye.y2-Ye.y1,yr=ln.textBoxScale,Hr=Sr&&Ft==="never"?kt:null,qr=null,_i=Xe==="never"?1:2,bi="never";Te&&_i++;for(let Zr=0;Zr<_i;Zr++){for(let ai=X;aiNe(au,Cn.iconBox,a.ah.horizontal),()=>{let Ye=Cn.verticalTextBox;return ee.allowVerticalPlacement&&(!Bo||!Bo.placeable)&&ln.numVerticalGlyphVertices>0&&Ye?Ne(Ye,Cn.verticalIconBox,a.ah.vertical):{box:null,occluded:!0,offscreen:null}}),Bo&&($a=Bo.placeable,Qa=Bo.offscreen);let He=Tl(Bo&&Bo.placeable);if(!$a&&this.prevPlacement){let Ye=this.prevPlacement.variableOffsets[ln.crossTileID];Ye&&(this.variableOffsets[ln.crossTileID]=Ye,this.markUsedJustification(ee,Ye.anchor,ln,He))}}}if(Ts=Bo,$a=Ts&&Ts.placeable,Qa=Ts&&Ts.offscreen,ln.useRuntimeCollisionCircles){let Tl=ee.text.placedSymbolArray.get(ln.centerJustifiedTextSymbolIndex),Al=a.ai(ee.textSizeData,be,Tl),X=le.get("text-padding");wo=this.collisionIndex.placeCollisionCircles(Xe,Tl,ee.lineVertexArray,ee.glyphOffsetArray,Al,st,Tt,Yt,Kt,Q,dr,Re.predicate,ln.collisionCircleDiameter,X,Oe,Pi),wo.circles.length&&wo.collisionDetected&&!Q&&a.w("Collisions detected, but collision boxes are not shown"),$a=it||wo.circles.length>0&&!wo.collisionDetected,Qa=Qa&&wo.offscreen}if(Cn.iconFeatureIndex&&(Lu=Cn.iconFeatureIndex),Cn.iconBox){let Tl=Al=>this.collisionIndex.placeCollisionBox(Al,Ft,xr,st,Tt,dr,tr,Ze,Re.predicate,Pi,Sr&&mo?mo:void 0);Ps&&Ps.placeable&&Cn.verticalIconBox?(To=Tl(Cn.verticalIconBox),Co=To.placeable):(To=Tl(Cn.iconBox),Co=To.placeable),Qa=Qa&&To.offscreen}let Js=qe||ln.numHorizontalGlyphVertices===0&&ln.numVerticalGlyphVertices===0,eu=et||ln.numIconVertices===0;Js||eu?eu?Js||(Co=Co&&$a):$a=Co&&$a:Co=$a=Co&&$a;let dc=Co&&To.placeable;if($a&&Ts.placeable&&this.collisionIndex.insertCollisionBox(Ts.box,Xe,le.get("text-ignore-placement"),ee.bucketInstanceId,Ps&&Ps.placeable&&Ul?Ul:hl,Re.ID),dc&&this.collisionIndex.insertCollisionBox(To.box,Ft,le.get("icon-ignore-placement"),ee.bucketInstanceId,Lu,Re.ID),wo&&$a&&this.collisionIndex.insertCollisionCircles(wo.circles,Xe,le.get("text-ignore-placement"),ee.bucketInstanceId,hl,Re.ID),Q&&this.storeCollisionData(ee.bucketInstanceId,Kn,Cn,Ts,To,wo),ln.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(ee.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[ln.crossTileID]=new qn($a||Wr,Co||ni,Qa||ee.justReloaded),B[ln.crossTileID]=!0};if(Or){if(w.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let ln=ee.getSortedSymbolIndexes(this.transform.angle);for(let Cn=ln.length-1;Cn>=0;--Cn){let Kn=ln[Cn];cn(ee.symbolInstances.get(Kn),ee.collisionArrays[Kn],Kn)}}else for(let ln=w.symbolInstanceStart;ln=0&&(w.text.placedSymbolArray.get(Ze).crossTileID=le>=0&&Ze!==le?0:Q.crossTileID)}markUsedOrientation(w,B,Q){let ee=B===a.ah.horizontal||B===a.ah.horizontalOnly?B:0,le=B===a.ah.vertical?B:0,Oe=[Q.leftJustifiedTextSymbolIndex,Q.centerJustifiedTextSymbolIndex,Q.rightJustifiedTextSymbolIndex];for(let Ze of Oe)w.text.placedSymbolArray.get(Ze).placedOrientation=ee;Q.verticalPlacedTextSymbolIndex&&(w.text.placedSymbolArray.get(Q.verticalPlacedTextSymbolIndex).placedOrientation=le)}commit(w){this.commitTime=w,this.zoomAtLastRecencyCheck=this.transform.zoom;let B=this.prevPlacement,Q=!1;this.prevZoomAdjustment=B?B.zoomAdjustment(this.transform.zoom):0;let ee=B?B.symbolFadeChange(w):1,le=B?B.opacities:{},Oe=B?B.variableOffsets:{},Ze=B?B.placedOrientations:{};for(let st in this.placements){let Tt=this.placements[st],Yt=le[st];Yt?(this.opacities[st]=new On(Yt,ee,Tt.text,Tt.icon),Q=Q||Tt.text!==Yt.text.placed||Tt.icon!==Yt.icon.placed):(this.opacities[st]=new On(null,ee,Tt.text,Tt.icon,Tt.skipFade),Q=Q||Tt.text||Tt.icon)}for(let st in le){let Tt=le[st];if(!this.opacities[st]){let Yt=new On(Tt,ee,!1,!1);Yt.isHidden()||(this.opacities[st]=Yt,Q=Q||Tt.text.placed||Tt.icon.placed)}}for(let st in Oe)this.variableOffsets[st]||!this.opacities[st]||this.opacities[st].isHidden()||(this.variableOffsets[st]=Oe[st]);for(let st in Ze)this.placedOrientations[st]||!this.opacities[st]||this.opacities[st].isHidden()||(this.placedOrientations[st]=Ze[st]);if(B&&B.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");Q?this.lastPlacementChangeTime=w:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=B?B.lastPlacementChangeTime:w)}updateLayerOpacities(w,B){let Q={};for(let ee of B){let le=ee.getBucket(w);le&&ee.latestFeatureIndex&&w.id===le.layerIds[0]&&this.updateBucketOpacities(le,ee.tileID,Q,ee.collisionBoxArray)}}updateBucketOpacities(w,B,Q,ee){w.hasTextData()&&(w.text.opacityVertexArray.clear(),w.text.hasVisibleVertices=!1),w.hasIconData()&&(w.icon.opacityVertexArray.clear(),w.icon.hasVisibleVertices=!1),w.hasIconCollisionBoxData()&&w.iconCollisionBox.collisionVertexArray.clear(),w.hasTextCollisionBoxData()&&w.textCollisionBox.collisionVertexArray.clear();let le=w.layers[0],Oe=le.layout,Ze=new On(null,0,!1,!1,!0),st=Oe.get("text-allow-overlap"),Tt=Oe.get("icon-allow-overlap"),Yt=le._unevaluatedLayout.hasValue("text-variable-anchor")||le._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Kt=Oe.get("text-rotation-alignment")==="map",xr=Oe.get("text-pitch-alignment")==="map",Ir=Oe.get("icon-text-fit")!=="none",ve=new On(null,0,st&&(Tt||!w.hasIconData()||Oe.get("icon-optional")),Tt&&(st||!w.hasTextData()||Oe.get("text-optional")),!0);!w.collisionArrays&&ee&&(w.hasIconCollisionBoxData()||w.hasTextCollisionBoxData())&&w.deserializeCollisionBoxes(ee);let be=(qe,et,Xe)=>{for(let it=0;it0,dr=this.placedOrientations[et.crossTileID],Sr=dr===a.ah.vertical,Or=dr===a.ah.horizontal||dr===a.ah.horizontalOnly;if(Xe>0||it>0){let ni=tn(Ht.text);be(w.text,Xe,Sr?fn:ni),be(w.text,it,Or?fn:ni);let Pi=Ht.text.isHidden();[et.rightJustifiedTextSymbolIndex,et.centerJustifiedTextSymbolIndex,et.leftJustifiedTextSymbolIndex].forEach(Cn=>{Cn>=0&&(w.text.placedSymbolArray.get(Cn).hidden=Pi||Sr?1:0)}),et.verticalPlacedTextSymbolIndex>=0&&(w.text.placedSymbolArray.get(et.verticalPlacedTextSymbolIndex).hidden=Pi||Or?1:0);let cn=this.variableOffsets[et.crossTileID];cn&&this.markUsedJustification(w,cn.anchor,et,dr);let ln=this.placedOrientations[et.crossTileID];ln&&(this.markUsedJustification(w,"left",et,ln),this.markUsedOrientation(w,ln,et))}if(tr){let ni=tn(Ht.icon),Pi=!(Ir&&et.verticalPlacedIconSymbolIndex&&Sr);et.placedIconSymbolIndex>=0&&(be(w.icon,et.numIconVertices,Pi?ni:fn),w.icon.placedSymbolArray.get(et.placedIconSymbolIndex).hidden=Ht.icon.isHidden()),et.verticalPlacedIconSymbolIndex>=0&&(be(w.icon,et.numVerticalIconVertices,Pi?fn:ni),w.icon.placedSymbolArray.get(et.verticalPlacedIconSymbolIndex).hidden=Ht.icon.isHidden())}let Wr=Re&&Re.has(qe)?Re.get(qe):{text:null,icon:null};if(w.hasIconCollisionBoxData()||w.hasTextCollisionBoxData()){let ni=w.collisionArrays[qe];if(ni){let Pi=new a.P(0,0);if(ni.textBox||ni.verticalTextBox){let cn=!0;if(Yt){let ln=this.variableOffsets[Ft];ln?(Pi=Ut(ln.anchor,ln.width,ln.height,ln.textOffset,ln.textBoxScale),Kt&&Pi._rotate(xr?this.transform.angle:-this.transform.angle)):cn=!1}if(ni.textBox||ni.verticalTextBox){let ln;ni.textBox&&(ln=Sr),ni.verticalTextBox&&(ln=Or),rr(w.textCollisionBox.collisionVertexArray,Ht.text.placed,!cn||ln,Wr.text,Pi.x,Pi.y)}}if(ni.iconBox||ni.verticalIconBox){let cn=!!(!Or&&ni.verticalIconBox),ln;ni.iconBox&&(ln=cn),ni.verticalIconBox&&(ln=!cn),rr(w.iconCollisionBox.collisionVertexArray,Ht.icon.placed,ln,Wr.icon,Ir?Pi.x:0,Ir?Pi.y:0)}}}}if(w.sortFeatures(this.transform.angle),this.retainedQueryData[w.bucketInstanceId]&&(this.retainedQueryData[w.bucketInstanceId].featureSortOrder=w.featureSortOrder),w.hasTextData()&&w.text.opacityVertexBuffer&&w.text.opacityVertexBuffer.updateData(w.text.opacityVertexArray),w.hasIconData()&&w.icon.opacityVertexBuffer&&w.icon.opacityVertexBuffer.updateData(w.icon.opacityVertexArray),w.hasIconCollisionBoxData()&&w.iconCollisionBox.collisionVertexBuffer&&w.iconCollisionBox.collisionVertexBuffer.updateData(w.iconCollisionBox.collisionVertexArray),w.hasTextCollisionBoxData()&&w.textCollisionBox.collisionVertexBuffer&&w.textCollisionBox.collisionVertexBuffer.updateData(w.textCollisionBox.collisionVertexArray),w.text.opacityVertexArray.length!==w.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${w.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${w.text.layoutVertexArray.length}) / 4`);if(w.icon.opacityVertexArray.length!==w.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${w.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${w.icon.layoutVertexArray.length}) / 4`);if(w.bucketInstanceId in this.collisionCircleArrays){let qe=this.collisionCircleArrays[w.bucketInstanceId];w.placementInvProjMatrix=qe.invProjMatrix,w.placementViewportMatrix=qe.viewportMatrix,w.collisionCircleArray=qe.circles,delete this.collisionCircleArrays[w.bucketInstanceId]}}symbolFadeChange(w){return this.fadeDuration===0?1:(w-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(w){return Math.max(0,(this.transform.zoom-w)/1.5)}hasTransitions(w){return this.stale||w-this.lastPlacementChangeTimew}setStale(){this.stale=!0}}function rr(ue,w,B,Q,ee,le){Q&&Q.length!==0||(Q=[0,0,0,0]);let Oe=Q[0]-di,Ze=Q[1]-di,st=Q[2]-di,Tt=Q[3]-di;ue.emplaceBack(w?1:0,B?1:0,ee||0,le||0,Oe,Ze),ue.emplaceBack(w?1:0,B?1:0,ee||0,le||0,st,Ze),ue.emplaceBack(w?1:0,B?1:0,ee||0,le||0,st,Tt),ue.emplaceBack(w?1:0,B?1:0,ee||0,le||0,Oe,Tt)}let nr=Math.pow(2,25),Er=Math.pow(2,24),Xr=Math.pow(2,17),ri=Math.pow(2,16),Qr=Math.pow(2,9),Oi=Math.pow(2,8),$i=Math.pow(2,1);function tn(ue){if(ue.opacity===0&&!ue.placed)return 0;if(ue.opacity===1&&ue.placed)return 4294967295;let w=ue.placed?1:0,B=Math.floor(127*ue.opacity);return B*nr+w*Er+B*Xr+w*ri+B*Qr+w*Oi+B*$i+w}let fn=0;function yn(){return{isOccluded:(ue,w,B)=>!1,getPitchedTextCorrection:(ue,w,B)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(ue,w,B,Q){throw new Error("Not implemented.")},translatePosition:(ue,w,B,Q)=>function(ee,le,Oe,Ze,st=!1){if(!Oe[0]&&!Oe[1])return[0,0];let Tt=st?Ze==="map"?ee.angle:0:Ze==="viewport"?-ee.angle:0;if(Tt){let Yt=Math.sin(Tt),Kt=Math.cos(Tt);Oe=[Oe[0]*Kt-Oe[1]*Yt,Oe[0]*Yt+Oe[1]*Kt]}return[st?Oe[0]:In(le,Oe[0],ee.zoom),st?Oe[1]:In(le,Oe[1],ee.zoom)]}(ue,w,B,Q),getCircleRadiusCorrection:ue=>1}}class Sn{constructor(w){this._sortAcrossTiles=w.layout.get("symbol-z-order")!=="viewport-y"&&!w.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(w,B,Q,ee,le){let Oe=this._bucketParts;for(;this._currentTileIndexZe.sortKey-st.sortKey));this._currentPartIndex!this._forceFullPlacement&&u.now()-ee>2;for(;this._currentPlacementIndex>=0;){let Oe=B[w[this._currentPlacementIndex]],Ze=this.placement.collisionIndex.transform.zoom;if(Oe.type==="symbol"&&(!Oe.minzoom||Oe.minzoom<=Ze)&&(!Oe.maxzoom||Oe.maxzoom>Ze)){if(this._inProgressLayer||(this._inProgressLayer=new Sn(Oe)),this._inProgressLayer.continuePlacement(Q[Oe.source],this.placement,this._showCollisionBoxes,Oe,le))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(w){return this.placement.commit(w),this.placement}}let ua=512/a.X/2;class ma{constructor(w,B,Q){this.tileID=w,this.bucketInstanceId=Q,this._symbolsByKey={};let ee=new Map;for(let le=0;le({x:Math.floor(st.anchorX*ua),y:Math.floor(st.anchorY*ua)})),crossTileIDs:Oe.map(st=>st.crossTileID)};if(Ze.positions.length>128){let st=new a.av(Ze.positions.length,16,Uint16Array);for(let{x:Tt,y:Yt}of Ze.positions)st.add(Tt,Yt);st.finish(),delete Ze.positions,Ze.index=st}this._symbolsByKey[le]=Ze}}getScaledCoordinates(w,B){let{x:Q,y:ee,z:le}=this.tileID.canonical,{x:Oe,y:Ze,z:st}=B.canonical,Tt=ua/Math.pow(2,st-le),Yt=(Ze*a.X+w.anchorY)*Tt,Kt=ee*a.X*ua;return{x:Math.floor((Oe*a.X+w.anchorX)*Tt-Q*a.X*ua),y:Math.floor(Yt-Kt)}}findMatches(w,B,Q){let ee=this.tileID.canonical.zw)}}class Wa{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Fa{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(w){let B=Math.round((w-this.lng)/360);if(B!==0)for(let Q in this.indexes){let ee=this.indexes[Q],le={};for(let Oe in ee){let Ze=ee[Oe];Ze.tileID=Ze.tileID.unwrapTo(Ze.tileID.wrap+B),le[Ze.tileID.key]=Ze}this.indexes[Q]=le}this.lng=w}addBucket(w,B,Q){if(this.indexes[w.overscaledZ]&&this.indexes[w.overscaledZ][w.key]){if(this.indexes[w.overscaledZ][w.key].bucketInstanceId===B.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(w.overscaledZ,this.indexes[w.overscaledZ][w.key])}for(let le=0;lew.overscaledZ)for(let Ze in Oe){let st=Oe[Ze];st.tileID.isChildOf(w)&&st.findMatches(B.symbolInstances,w,ee)}else{let Ze=Oe[w.scaledTo(Number(le)).key];Ze&&Ze.findMatches(B.symbolInstances,w,ee)}}for(let le=0;le{B[Q]=!0});for(let Q in this.layerIndexes)B[Q]||delete this.layerIndexes[Q]}}let da=(ue,w)=>a.t(ue,w&&w.filter(B=>B.identifier!=="source.canvas")),Wn=a.aw();class Ha extends a.E{constructor(w,B={}){super(),this._rtlPluginLoaded=()=>{for(let Q in this.sourceCaches){let ee=this.sourceCaches[Q].getSource().type;ee!=="vector"&&ee!=="geojson"||this.sourceCaches[Q].reload()}},this.map=w,this.dispatcher=new Ee(Se(),w._getMapId()),this.dispatcher.registerMessageHandler("GG",(Q,ee)=>this.getGlyphs(Q,ee)),this.dispatcher.registerMessageHandler("GI",(Q,ee)=>this.getImages(Q,ee)),this.imageManager=new A,this.imageManager.setEventedParent(this),this.glyphManager=new G(w._requestManager,B.localIdeographFontFamily),this.lineAtlas=new oe(256,512),this.crossTileSymbolIndex=new Xo,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new a.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",a.ay()),Qt().on(fr,this._rtlPluginLoaded),this.on("data",Q=>{if(Q.dataType!=="source"||Q.sourceDataType!=="metadata")return;let ee=this.sourceCaches[Q.sourceId];if(!ee)return;let le=ee.getSource();if(le&&le.vectorLayerIds)for(let Oe in this._layers){let Ze=this._layers[Oe];Ze.source===le.id&&this._validateLayer(Ze)}})}loadURL(w,B={},Q){this.fire(new a.k("dataloading",{dataType:"style"})),B.validate=typeof B.validate!="boolean"||B.validate;let ee=this.map._requestManager.transformRequest(w,"Style");this._loadStyleRequest=new AbortController;let le=this._loadStyleRequest;a.h(ee,this._loadStyleRequest).then(Oe=>{this._loadStyleRequest=null,this._load(Oe.data,B,Q)}).catch(Oe=>{this._loadStyleRequest=null,Oe&&!le.signal.aborted&&this.fire(new a.j(Oe))})}loadJSON(w,B={},Q){this.fire(new a.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,u.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,B.validate=B.validate!==!1,this._load(w,B,Q)}).catch(()=>{})}loadEmpty(){this.fire(new a.k("dataloading",{dataType:"style"})),this._load(Wn,{validate:!1})}_load(w,B,Q){var ee;let le=B.transformStyle?B.transformStyle(Q,w):w;if(!B.validate||!da(this,a.u(le))){this._loaded=!0,this.stylesheet=le;for(let Oe in le.sources)this.addSource(Oe,le.sources[Oe],{validate:!1});le.sprite?this._loadSprite(le.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(le.glyphs),this._createLayers(),this.light=new N(this.stylesheet.light),this.sky=new re(this.stylesheet.sky),this.map.setTerrain((ee=this.stylesheet.terrain)!==null&&ee!==void 0?ee:null),this.fire(new a.k("data",{dataType:"style"})),this.fire(new a.k("style.load"))}}_createLayers(){let w=a.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",w),this._order=w.map(B=>B.id),this._layers={},this._serializedLayers=null;for(let B of w){let Q=a.aA(B);Q.setEventedParent(this,{layer:{id:B.id}}),this._layers[B.id]=Q}}_loadSprite(w,B=!1,Q=void 0){let ee;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(le,Oe,Ze,st){return a._(this,void 0,void 0,function*(){let Tt=C(le),Yt=Ze>1?"@2x":"",Kt={},xr={};for(let{id:Ir,url:ve}of Tt){let be=Oe.transformRequest(M(ve,Yt,".json"),"SpriteJSON");Kt[Ir]=a.h(be,st);let Re=Oe.transformRequest(M(ve,Yt,".png"),"SpriteImage");xr[Ir]=p.getImage(Re,st)}return yield Promise.all([...Object.values(Kt),...Object.values(xr)]),function(Ir,ve){return a._(this,void 0,void 0,function*(){let be={};for(let Re in Ir){be[Re]={};let qe=u.getImageCanvasContext((yield ve[Re]).data),et=(yield Ir[Re]).data;for(let Xe in et){let{width:it,height:Ft,x:Ht,y:tr,sdf:dr,pixelRatio:Sr,stretchX:Or,stretchY:Wr,content:ni,textFitWidth:Pi,textFitHeight:cn}=et[Xe];be[Re][Xe]={data:null,pixelRatio:Sr,sdf:dr,stretchX:Or,stretchY:Wr,content:ni,textFitWidth:Pi,textFitHeight:cn,spriteData:{width:it,height:Ft,x:Ht,y:tr,context:qe}}}}return be})}(Kt,xr)})}(w,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(le=>{if(this._spriteRequest=null,le)for(let Oe in le){this._spritesImagesIds[Oe]=[];let Ze=this._spritesImagesIds[Oe]?this._spritesImagesIds[Oe].filter(st=>!(st in le)):[];for(let st of Ze)this.imageManager.removeImage(st),this._changedImages[st]=!0;for(let st in le[Oe]){let Tt=Oe==="default"?st:`${Oe}:${st}`;this._spritesImagesIds[Oe].push(Tt),Tt in this.imageManager.images?this.imageManager.updateImage(Tt,le[Oe][st],!1):this.imageManager.addImage(Tt,le[Oe][st]),B&&(this._changedImages[Tt]=!0)}}}).catch(le=>{this._spriteRequest=null,ee=le,this.fire(new a.j(ee))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),B&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.k("data",{dataType:"style"})),Q&&Q(ee)})}_unloadSprite(){for(let w of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(w),this._changedImages[w]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.k("data",{dataType:"style"}))}_validateLayer(w){let B=this.sourceCaches[w.source];if(!B)return;let Q=w.sourceLayer;if(!Q)return;let ee=B.getSource();(ee.type==="geojson"||ee.vectorLayerIds&&ee.vectorLayerIds.indexOf(Q)===-1)&&this.fire(new a.j(new Error(`Source layer "${Q}" does not exist on source "${ee.id}" as specified by style layer "${w.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let w in this.sourceCaches)if(!this.sourceCaches[w].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(w,B=!1){let Q=this._serializedAllLayers();if(!w||w.length===0)return Object.values(B?a.aB(Q):Q);let ee=[];for(let le of w)if(Q[le]){let Oe=B?a.aB(Q[le]):Q[le];ee.push(Oe)}return ee}_serializedAllLayers(){let w=this._serializedLayers;if(w)return w;w=this._serializedLayers={};let B=Object.keys(this._layers);for(let Q of B){let ee=this._layers[Q];ee.type!=="custom"&&(w[Q]=ee.serialize())}return w}hasTransitions(){if(this.light&&this.light.hasTransition()||this.sky&&this.sky.hasTransition())return!0;for(let w in this.sourceCaches)if(this.sourceCaches[w].hasTransition())return!0;for(let w in this._layers)if(this._layers[w].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(w){if(!this._loaded)return;let B=this._changed;if(B){let ee=Object.keys(this._updatedLayers),le=Object.keys(this._removedLayers);(ee.length||le.length)&&this._updateWorkerLayers(ee,le);for(let Oe in this._updatedSources){let Ze=this._updatedSources[Oe];if(Ze==="reload")this._reloadSource(Oe);else{if(Ze!=="clear")throw new Error(`Invalid action ${Ze}`);this._clearSource(Oe)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let Oe in this._updatedPaintProps)this._layers[Oe].updateTransitions(w);this.light.updateTransitions(w),this.sky.updateTransitions(w),this._resetUpdates()}let Q={};for(let ee in this.sourceCaches){let le=this.sourceCaches[ee];Q[ee]=le.used,le.used=!1}for(let ee of this._order){let le=this._layers[ee];le.recalculate(w,this._availableImages),!le.isHidden(w.zoom)&&le.source&&(this.sourceCaches[le.source].used=!0)}for(let ee in Q){let le=this.sourceCaches[ee];!!Q[ee]!=!!le.used&&le.fire(new a.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:ee}))}this.light.recalculate(w),this.sky.recalculate(w),this.z=w.zoom,B&&this.fire(new a.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){let w=Object.keys(this._changedImages);if(w.length){for(let B in this.sourceCaches)this.sourceCaches[B].reloadTilesForDependencies(["icons","patterns"],w);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let w in this.sourceCaches)this.sourceCaches[w].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(w,B){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(w,!1),removedIds:B})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(w,B={}){var Q;this._checkLoaded();let ee=this.serialize();if(w=B.transformStyle?B.transformStyle(ee,w):w,((Q=B.validate)===null||Q===void 0||Q)&&da(this,a.u(w)))return!1;(w=a.aB(w)).layers=a.az(w.layers);let le=a.aC(ee,w),Oe=this._getOperationsToPerform(le);if(Oe.unimplemented.length>0)throw new Error(`Unimplemented: ${Oe.unimplemented.join(", ")}.`);if(Oe.operations.length===0)return!1;for(let Ze of Oe.operations)Ze();return this.stylesheet=w,this._serializedLayers=null,!0}_getOperationsToPerform(w){let B=[],Q=[];for(let ee of w)switch(ee.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":B.push(()=>this.addLayer.apply(this,ee.args));break;case"removeLayer":B.push(()=>this.removeLayer.apply(this,ee.args));break;case"setPaintProperty":B.push(()=>this.setPaintProperty.apply(this,ee.args));break;case"setLayoutProperty":B.push(()=>this.setLayoutProperty.apply(this,ee.args));break;case"setFilter":B.push(()=>this.setFilter.apply(this,ee.args));break;case"addSource":B.push(()=>this.addSource.apply(this,ee.args));break;case"removeSource":B.push(()=>this.removeSource.apply(this,ee.args));break;case"setLayerZoomRange":B.push(()=>this.setLayerZoomRange.apply(this,ee.args));break;case"setLight":B.push(()=>this.setLight.apply(this,ee.args));break;case"setGeoJSONSourceData":B.push(()=>this.setGeoJSONSourceData.apply(this,ee.args));break;case"setGlyphs":B.push(()=>this.setGlyphs.apply(this,ee.args));break;case"setSprite":B.push(()=>this.setSprite.apply(this,ee.args));break;case"setSky":B.push(()=>this.setSky.apply(this,ee.args));break;case"setTerrain":B.push(()=>this.map.setTerrain.apply(this,ee.args));break;case"setTransition":B.push(()=>{});break;default:Q.push(ee.command)}return{operations:B,unimplemented:Q}}addImage(w,B){if(this.getImage(w))return this.fire(new a.j(new Error(`An image named "${w}" already exists.`)));this.imageManager.addImage(w,B),this._afterImageUpdated(w)}updateImage(w,B){this.imageManager.updateImage(w,B)}getImage(w){return this.imageManager.getImage(w)}removeImage(w){if(!this.getImage(w))return this.fire(new a.j(new Error(`An image named "${w}" does not exist.`)));this.imageManager.removeImage(w),this._afterImageUpdated(w)}_afterImageUpdated(w){this._availableImages=this.imageManager.listImages(),this._changedImages[w]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(w,B,Q={}){if(this._checkLoaded(),this.sourceCaches[w]!==void 0)throw new Error(`Source "${w}" already exists.`);if(!B.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(B).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(B.type)>=0&&this._validate(a.u.source,`sources.${w}`,B,null,Q))return;this.map&&this.map._collectResourceTiming&&(B.collectResourceTiming=!0);let ee=this.sourceCaches[w]=new mt(w,B,this.dispatcher);ee.style=this,ee.setEventedParent(this,()=>({isSourceLoaded:ee.loaded(),source:ee.serialize(),sourceId:w})),ee.onAdd(this.map),this._changed=!0}removeSource(w){if(this._checkLoaded(),this.sourceCaches[w]===void 0)throw new Error("There is no source with this ID");for(let Q in this._layers)if(this._layers[Q].source===w)return this.fire(new a.j(new Error(`Source "${w}" cannot be removed while layer "${Q}" is using it.`)));let B=this.sourceCaches[w];delete this.sourceCaches[w],delete this._updatedSources[w],B.fire(new a.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:w})),B.setEventedParent(null),B.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(w,B){if(this._checkLoaded(),this.sourceCaches[w]===void 0)throw new Error(`There is no source with this ID=${w}`);let Q=this.sourceCaches[w].getSource();if(Q.type!=="geojson")throw new Error(`geojsonSource.type is ${Q.type}, which is !== 'geojson`);Q.setData(B),this._changed=!0}getSource(w){return this.sourceCaches[w]&&this.sourceCaches[w].getSource()}addLayer(w,B,Q={}){this._checkLoaded();let ee=w.id;if(this.getLayer(ee))return void this.fire(new a.j(new Error(`Layer "${ee}" already exists on this map.`)));let le;if(w.type==="custom"){if(da(this,a.aD(w)))return;le=a.aA(w)}else{if("source"in w&&typeof w.source=="object"&&(this.addSource(ee,w.source),w=a.aB(w),w=a.e(w,{source:ee})),this._validate(a.u.layer,`layers.${ee}`,w,{arrayIndex:-1},Q))return;le=a.aA(w),this._validateLayer(le),le.setEventedParent(this,{layer:{id:ee}})}let Oe=B?this._order.indexOf(B):this._order.length;if(B&&Oe===-1)this.fire(new a.j(new Error(`Cannot add layer "${ee}" before non-existing layer "${B}".`)));else{if(this._order.splice(Oe,0,ee),this._layerOrderChanged=!0,this._layers[ee]=le,this._removedLayers[ee]&&le.source&&le.type!=="custom"){let Ze=this._removedLayers[ee];delete this._removedLayers[ee],Ze.type!==le.type?this._updatedSources[le.source]="clear":(this._updatedSources[le.source]="reload",this.sourceCaches[le.source].pause())}this._updateLayer(le),le.onAdd&&le.onAdd(this.map)}}moveLayer(w,B){if(this._checkLoaded(),this._changed=!0,!this._layers[w])return void this.fire(new a.j(new Error(`The layer '${w}' does not exist in the map's style and cannot be moved.`)));if(w===B)return;let Q=this._order.indexOf(w);this._order.splice(Q,1);let ee=B?this._order.indexOf(B):this._order.length;B&&ee===-1?this.fire(new a.j(new Error(`Cannot move layer "${w}" before non-existing layer "${B}".`))):(this._order.splice(ee,0,w),this._layerOrderChanged=!0)}removeLayer(w){this._checkLoaded();let B=this._layers[w];if(!B)return void this.fire(new a.j(new Error(`Cannot remove non-existing layer "${w}".`)));B.setEventedParent(null);let Q=this._order.indexOf(w);this._order.splice(Q,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[w]=B,delete this._layers[w],this._serializedLayers&&delete this._serializedLayers[w],delete this._updatedLayers[w],delete this._updatedPaintProps[w],B.onRemove&&B.onRemove(this.map)}getLayer(w){return this._layers[w]}getLayersOrder(){return[...this._order]}hasLayer(w){return w in this._layers}setLayerZoomRange(w,B,Q){this._checkLoaded();let ee=this.getLayer(w);ee?ee.minzoom===B&&ee.maxzoom===Q||(B!=null&&(ee.minzoom=B),Q!=null&&(ee.maxzoom=Q),this._updateLayer(ee)):this.fire(new a.j(new Error(`Cannot set the zoom range of non-existing layer "${w}".`)))}setFilter(w,B,Q={}){this._checkLoaded();let ee=this.getLayer(w);if(ee){if(!a.aE(ee.filter,B))return B==null?(ee.filter=void 0,void this._updateLayer(ee)):void(this._validate(a.u.filter,`layers.${ee.id}.filter`,B,null,Q)||(ee.filter=a.aB(B),this._updateLayer(ee)))}else this.fire(new a.j(new Error(`Cannot filter non-existing layer "${w}".`)))}getFilter(w){return a.aB(this.getLayer(w).filter)}setLayoutProperty(w,B,Q,ee={}){this._checkLoaded();let le=this.getLayer(w);le?a.aE(le.getLayoutProperty(B),Q)||(le.setLayoutProperty(B,Q,ee),this._updateLayer(le)):this.fire(new a.j(new Error(`Cannot style non-existing layer "${w}".`)))}getLayoutProperty(w,B){let Q=this.getLayer(w);if(Q)return Q.getLayoutProperty(B);this.fire(new a.j(new Error(`Cannot get style of non-existing layer "${w}".`)))}setPaintProperty(w,B,Q,ee={}){this._checkLoaded();let le=this.getLayer(w);le?a.aE(le.getPaintProperty(B),Q)||(le.setPaintProperty(B,Q,ee)&&this._updateLayer(le),this._changed=!0,this._updatedPaintProps[w]=!0,this._serializedLayers=null):this.fire(new a.j(new Error(`Cannot style non-existing layer "${w}".`)))}getPaintProperty(w,B){return this.getLayer(w).getPaintProperty(B)}setFeatureState(w,B){this._checkLoaded();let Q=w.source,ee=w.sourceLayer,le=this.sourceCaches[Q];if(le===void 0)return void this.fire(new a.j(new Error(`The source '${Q}' does not exist in the map's style.`)));let Oe=le.getSource().type;Oe==="geojson"&&ee?this.fire(new a.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):Oe!=="vector"||ee?(w.id===void 0&&this.fire(new a.j(new Error("The feature id parameter must be provided."))),le.setFeatureState(ee,w.id,B)):this.fire(new a.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(w,B){this._checkLoaded();let Q=w.source,ee=this.sourceCaches[Q];if(ee===void 0)return void this.fire(new a.j(new Error(`The source '${Q}' does not exist in the map's style.`)));let le=ee.getSource().type,Oe=le==="vector"?w.sourceLayer:void 0;le!=="vector"||Oe?B&&typeof w.id!="string"&&typeof w.id!="number"?this.fire(new a.j(new Error("A feature id is required to remove its specific state property."))):ee.removeFeatureState(Oe,w.id,B):this.fire(new a.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(w){this._checkLoaded();let B=w.source,Q=w.sourceLayer,ee=this.sourceCaches[B];if(ee!==void 0)return ee.getSource().type!=="vector"||Q?(w.id===void 0&&this.fire(new a.j(new Error("The feature id parameter must be provided."))),ee.getFeatureState(Q,w.id)):void this.fire(new a.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new a.j(new Error(`The source '${B}' does not exist in the map's style.`)))}getTransition(){return a.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;let w=a.aF(this.sourceCaches,le=>le.serialize()),B=this._serializeByIds(this._order,!0),Q=this.map.getTerrain()||void 0,ee=this.stylesheet;return a.aG({version:ee.version,name:ee.name,metadata:ee.metadata,light:ee.light,sky:ee.sky,center:ee.center,zoom:ee.zoom,bearing:ee.bearing,pitch:ee.pitch,sprite:ee.sprite,glyphs:ee.glyphs,transition:ee.transition,sources:w,layers:B,terrain:Q},le=>le!==void 0)}_updateLayer(w){this._updatedLayers[w.id]=!0,w.source&&!this._updatedSources[w.source]&&this.sourceCaches[w.source].getSource().type!=="raster"&&(this._updatedSources[w.source]="reload",this.sourceCaches[w.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(w){let B=Oe=>this._layers[Oe].type==="fill-extrusion",Q={},ee=[];for(let Oe=this._order.length-1;Oe>=0;Oe--){let Ze=this._order[Oe];if(B(Ze)){Q[Ze]=Oe;for(let st of w){let Tt=st[Ze];if(Tt)for(let Yt of Tt)ee.push(Yt)}}}ee.sort((Oe,Ze)=>Ze.intersectionZ-Oe.intersectionZ);let le=[];for(let Oe=this._order.length-1;Oe>=0;Oe--){let Ze=this._order[Oe];if(B(Ze))for(let st=ee.length-1;st>=0;st--){let Tt=ee[st].feature;if(Q[Tt.layer.id]{let dr=qe.featureSortOrder;if(dr){let Sr=dr.indexOf(Ht.featureIndex);return dr.indexOf(tr.featureIndex)-Sr}return tr.featureIndex-Ht.featureIndex});for(let Ht of Ft)it.push(Ht)}}for(let qe in ve)ve[qe].forEach(et=>{let Xe=et.feature,it=Tt[Ze[qe].source].getFeatureState(Xe.layer["source-layer"],Xe.id);Xe.source=Xe.layer.source,Xe.layer["source-layer"]&&(Xe.sourceLayer=Xe.layer["source-layer"]),Xe.state=it});return ve}(this._layers,Oe,this.sourceCaches,w,B,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(le)}querySourceFeatures(w,B){B&&B.filter&&this._validate(a.u.filter,"querySourceFeatures.filter",B.filter,null,B);let Q=this.sourceCaches[w];return Q?function(ee,le){let Oe=ee.getRenderableIds().map(Tt=>ee.getTileByID(Tt)),Ze=[],st={};for(let Tt=0;Ttxr.getTileByID(Ir)).sort((Ir,ve)=>ve.tileID.overscaledZ-Ir.tileID.overscaledZ||(Ir.tileID.isLessThan(ve.tileID)?-1:1))}let Kt=this.crossTileSymbolIndex.addLayer(Yt,st[Yt.source],w.center.lng);Oe=Oe||Kt}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((le=le||this._layerOrderChanged||Q===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(u.now(),w.zoom))&&(this.pauseablePlacement=new Ba(w,this.map.terrain,this._order,le,B,Q,ee,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,st),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(u.now()),Ze=!0),Oe&&this.pauseablePlacement.placement.setStale()),Ze||Oe)for(let Tt of this._order){let Yt=this._layers[Tt];Yt.type==="symbol"&&this.placement.updateLayerOpacities(Yt,st[Yt.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(u.now())}_releaseSymbolFadeTiles(){for(let w in this.sourceCaches)this.sourceCaches[w].releaseSymbolFadeTiles()}getImages(w,B){return a._(this,void 0,void 0,function*(){let Q=yield this.imageManager.getImages(B.icons);this._updateTilesForChangedImages();let ee=this.sourceCaches[B.source];return ee&&ee.setDependencies(B.tileID.key,B.type,B.icons),Q})}getGlyphs(w,B){return a._(this,void 0,void 0,function*(){let Q=yield this.glyphManager.getGlyphs(B.stacks),ee=this.sourceCaches[B.source];return ee&&ee.setDependencies(B.tileID.key,B.type,[""]),Q})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(w,B={}){this._checkLoaded(),w&&this._validate(a.u.glyphs,"glyphs",w,null,B)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=w,this.glyphManager.entries={},this.glyphManager.setURL(w))}addSprite(w,B,Q={},ee){this._checkLoaded();let le=[{id:w,url:B}],Oe=[...C(this.stylesheet.sprite),...le];this._validate(a.u.sprite,"sprite",Oe,null,Q)||(this.stylesheet.sprite=Oe,this._loadSprite(le,!0,ee))}removeSprite(w){this._checkLoaded();let B=C(this.stylesheet.sprite);if(B.find(Q=>Q.id===w)){if(this._spritesImagesIds[w])for(let Q of this._spritesImagesIds[w])this.imageManager.removeImage(Q),this._changedImages[Q]=!0;B.splice(B.findIndex(Q=>Q.id===w),1),this.stylesheet.sprite=B.length>0?B:void 0,delete this._spritesImagesIds[w],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.k("data",{dataType:"style"}))}else this.fire(new a.j(new Error(`Sprite "${w}" doesn't exists on this map.`)))}getSprite(){return C(this.stylesheet.sprite)}setSprite(w,B={},Q){this._checkLoaded(),w&&this._validate(a.u.sprite,"sprite",w,null,B)||(this.stylesheet.sprite=w,w?this._loadSprite(w,!0,Q):(this._unloadSprite(),Q&&Q(null)))}}var vo=a.Y([{name:"a_pos",type:"Int16",components:2}]);let jn={prelude:Mt(`#ifdef GL_ES +{name:nonlatin}`,"text-max-width":8,"icon-image":"star_11","text-offset":[.4,0],"icon-size":.8,"text-anchor":"left",visibility:"visible"},paint:{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],layout:{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-3",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-2",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-1",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-continent",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",maxzoom:1,filter:["==","class","continent"],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase",visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],id:"qebnlkra6"}});var CHe=ye((cbr,kHe)=>{kHe.exports={version:8,name:"orto",metadata:{},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}}]}});var Px=ye((fbr,DHe)=>{"use strict";var YWt=t_(),KWt=EHe(),JWt=CHe(),$Wt='\xA9 OpenStreetMap contributors',LHe="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",PHe="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",s7="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",QWt="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",eXt="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",tXt="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",RHe={basic:s7,streets:s7,outdoors:s7,light:LHe,dark:PHe,satellite:JWt,"satellite-streets":KWt,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:$Wt,tiles:["https://tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":LHe,"carto-darkmatter":PHe,"carto-voyager":s7,"carto-positron-nolabels":QWt,"carto-darkmatter-nolabels":eXt,"carto-voyager-nolabels":tXt},IHe=YWt(RHe);DHe.exports={styleValueDflt:"basic",stylesMap:RHe,styleValuesMap:IHe,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",IHe.join(", "),"or use a tile service."].join(` +`),mapOnErrorMsg:"Map error."}});var Qk=ye((hbr,BHe)=>{"use strict";var FHe=Pr(),zHe=ka().defaultLine,rXt=Cc().attributes,iXt=ec(),nXt=pf().textposition,aXt=mc().overrideAll,oXt=vl().templatedArray,qHe=Px(),OHe=iXt({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});OHe.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var sXt=BHe.exports=aXt({_arrayAttrRegexps:[FHe.counterRegex("map",".layers",!0)],domain:rXt({name:"map"}),style:{valType:"any",values:qHe.styleValuesMap,dflt:qHe.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:oXt("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:zHe},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:zHe}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:OHe,textposition:FHe.extendFlat({},nXt,{arrayOk:!1})}})},"plot","from-root");sXt.uirevision={valType:"any",editType:"none"}});var l7=ye((dbr,GHe)=>{"use strict";var{hovertemplateAttrs:lXt,texttemplateAttrs:uXt,templatefallbackAttrs:NHe}=Ll(),cXt=Pg(),eC=ew(),P5=pf(),UHe=Qk(),fXt=Gl(),hXt=Tu(),vw=Ao().extendFlat,dXt=mc().overrideAll,vXt=Qk(),VHe=eC.line,I5=eC.marker;GHe.exports=dXt({lon:eC.lon,lat:eC.lat,cluster:{enabled:{valType:"boolean"},maxzoom:vw({},vXt.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:vw({},I5.opacity,{dflt:1})},mode:vw({},P5.mode,{dflt:"markers"}),text:vw({},P5.text,{}),texttemplate:uXt({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:NHe({editType:"plot"}),hovertext:vw({},P5.hovertext,{}),line:{color:VHe.color,width:VHe.width},connectgaps:P5.connectgaps,marker:vw({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:I5.opacity,size:I5.size,sizeref:I5.sizeref,sizemin:I5.sizemin,sizemode:I5.sizemode},hXt("marker")),fill:eC.fill,fillcolor:cXt(),textfont:UHe.layers.symbol.textfont,textposition:UHe.layers.symbol.textposition,below:{valType:"string"},selected:{marker:P5.selected.marker},unselected:{marker:P5.unselected.marker},hoverinfo:vw({},fXt.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:lXt(),hovertemplatefallback:NHe()},"calc","nested")});var CJ=ye((vbr,HHe)=>{"use strict";var pXt=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];HHe.exports={isSupportedFont:function(e){return pXt.indexOf(e)!==-1}}});var XHe=ye((pbr,WHe)=>{"use strict";var tC=Pr(),LJ=Ru(),gXt=$p(),mXt=D0(),yXt=F0(),_Xt=Fg(),jHe=l7(),xXt=CJ().isSupportedFont;WHe.exports=function(t,r,n,i){function a(p,k){return tC.coerce(t,r,jHe,p,k)}function o(p,k){return tC.coerce2(t,r,jHe,p,k)}var s=bXt(t,r,a);if(!s){r.visible=!1;return}if(a("text"),a("texttemplate"),a("texttemplatefallback"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("mode"),a("below"),LJ.hasMarkers(r)){gXt(t,r,n,i,a,{noLine:!0,noAngle:!0}),a("marker.allowoverlap"),a("marker.angle");var l=r.marker;l.symbol!=="circle"&&(tC.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),tC.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}LJ.hasLines(r)&&(mXt(t,r,n,i,a,{noDash:!0}),a("connectgaps"));var u=o("cluster.maxzoom"),c=o("cluster.step"),f=o("cluster.color",r.marker&&r.marker.color||n),h=o("cluster.size"),d=o("cluster.opacity"),v=u!==!1||c!==!1||f!==!1||h!==!1||d!==!1,m=a("cluster.enabled",v);if(m||LJ.hasText(r)){var b=i.font.family;yXt(t,r,i,a,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:xXt(b)?b:"Open Sans Regular",weight:i.font.weight,style:i.font.style,size:i.font.size,color:i.font.color}})}a("fill"),r.fill!=="none"&&_Xt(t,r,n,a),tC.coerceSelectionMarkerOpacity(r,a)};function bXt(e,t,r){var n=r("lon")||[],i=r("lat")||[],a=Math.min(n.length,i.length);return t._length=a,a}});var PJ=ye((gbr,YHe)=>{"use strict";var ZHe=ho();YHe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot,o=a.mockAxis,s=t.lonlat;return i.lonLabel=ZHe.tickText(o,o.c2l(s[0]),!0).text,i.latLabel=ZHe.tickText(o,o.c2l(s[1]),!0).text,i}});var IJ=ye((mbr,JHe)=>{"use strict";var KHe=Pr();JHe.exports=function(t,r){var n=t.split(" "),i=n[0],a=n[1],o=KHe.isArrayOrTypedArray(r)?KHe.mean(r):r,s=.5+o/100,l=1.5+o/100,u=["",""],c=[0,0];switch(i){case"top":u[0]="top",c[1]=-l;break;case"bottom":u[0]="bottom",c[1]=l;break}switch(a){case"left":u[1]="right",c[0]=-s;break;case"right":u[1]="left",c[0]=s;break}var f;return u[0]&&u[1]?f=u.join("-"):u[0]?f=u[0]:u[1]?f=u[1]:f="center",{anchor:f,offset:c}}});var ije=ye((ybr,rje)=>{"use strict";var eje=Eo(),ov=Pr(),wXt=fs().BADNUM,c7=cx(),$He=tc(),TXt=So(),AXt=O3(),f7=Ru(),SXt=CJ().isSupportedFont,MXt=IJ(),EXt=ip().appendArrayPointValue,kXt=Zl().NEWLINES,CXt=Zl().BR_TAG_ALL;rje.exports=function(t,r){var n=r[0].trace,i=n.visible===!0&&n._length!==0,a=n.fill!=="none",o=f7.hasLines(n),s=f7.hasMarkers(n),l=f7.hasText(n),u=s&&n.marker.symbol==="circle",c=s&&n.marker.symbol!=="circle",f=n.cluster&&n.cluster.enabled,h=u7("fill"),d=u7("line"),v=u7("circle"),m=u7("symbol"),b={fill:h,line:d,circle:v,symbol:m};if(!i)return b;var p;if((a||o)&&(p=c7.calcTraceToLineCoords(r)),a&&(h.geojson=c7.makePolygon(p),h.layout.visibility="visible",ov.extendFlat(h.paint,{"fill-color":n.fillcolor})),o&&(d.geojson=c7.makeLine(p),d.layout.visibility="visible",ov.extendFlat(d.paint,{"line-width":n.line.width,"line-color":n.line.color,"line-opacity":n.opacity})),u){var k=LXt(r);v.geojson=k.geojson,v.layout.visibility="visible",f&&(v.filter=["!",["has","point_count"]],b.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":DJ(n.cluster.color,n.cluster.step),"circle-radius":DJ(n.cluster.size,n.cluster.step),"circle-opacity":DJ(n.cluster.opacity,n.cluster.step)}},b.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":QHe(n),"text-size":12}}),ov.extendFlat(v.paint,{"circle-color":k.mcc,"circle-radius":k.mrc,"circle-opacity":k.mo})}if(u&&f&&(v.filter=["!",["has","point_count"]]),(c||l)&&(m.geojson=PXt(r,t),ov.extendFlat(m.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),c&&(ov.extendFlat(m.layout,{"icon-size":n.marker.size/10}),"angle"in n.marker&&n.marker.angle!=="auto"&&ov.extendFlat(m.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),m.layout["icon-allow-overlap"]=n.marker.allowoverlap,ov.extendFlat(m.paint,{"icon-opacity":n.opacity*n.marker.opacity,"icon-color":n.marker.color})),l)){var M=(n.marker||{}).size,T=MXt(n.textposition,M);ov.extendFlat(m.layout,{"text-size":n.textfont.size,"text-anchor":T.anchor,"text-offset":T.offset,"text-font":QHe(n)}),ov.extendFlat(m.paint,{"text-color":n.textfont.color,"text-opacity":n.opacity})}return b};function u7(e){return{type:e,geojson:c7.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function LXt(e){var t=e[0].trace,r=t.marker,n=t.selectedpoints,i=ov.isArrayOrTypedArray(r.color),a=ov.isArrayOrTypedArray(r.size),o=ov.isArrayOrTypedArray(r.opacity),s;function l(M){return t.opacity*M}function u(M){return M/2}var c;i&&($He.hasColorscale(t,"marker")?c=$He.makeColorScaleFuncFromTrace(r):c=ov.identity);var f;a&&(f=AXt(t));var h;o&&(h=function(M){var T=eje(M)?+ov.constrain(M,0,1):0;return l(T)});var d=[];for(s=0;s850?s+=" Black":i>750?s+=" Extra Bold":i>650?s+=" Bold":i>550?s+=" Semi Bold":i>450?s+=" Medium":i>350?s+=" Regular":i>250?s+=" Light":i>150?s+=" Extra Light":s+=" Thin"):a.slice(0,2).join(" ")==="Open Sans"?(s="Open Sans",i>750?s+=" Extrabold":i>650?s+=" Bold":i>550?s+=" Semibold":i>350?s+=" Regular":s+=" Light"):a.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(s="Klokantech Noto Sans",a[3]==="CJK"&&(s+=" CJK"),s+=i>500?" Bold":" Regular")),o&&(s+=" Italic"),s==="Open Sans Regular Italic"?s="Open Sans Italic":s==="Open Sans Regular Bold"?s="Open Sans Bold":s==="Open Sans Regular Bold Italic"?s="Open Sans Bold Italic":s==="Klokantech Noto Sans Regular Italic"&&(s="Klokantech Noto Sans Italic"),SXt(s)||(s=r);var l=s.split(", ");return l}});var sje=ye((_br,oje)=>{"use strict";var IXt=Pr(),nje=ije(),R5=Px().traceLayerPrefix,og={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function aje(e,t,r,n){this.type="scattermap",this.subplot=e,this.uid=t,this.clusterEnabled=r,this.isHidden=n,this.sourceIds={fill:"source-"+t+"-fill",line:"source-"+t+"-line",circle:"source-"+t+"-circle",symbol:"source-"+t+"-symbol",cluster:"source-"+t+"-circle",clusterCount:"source-"+t+"-circle"},this.layerIds={fill:R5+t+"-fill",line:R5+t+"-line",circle:R5+t+"-circle",symbol:R5+t+"-symbol",cluster:R5+t+"-cluster",clusterCount:R5+t+"-cluster-count"},this.below=null}var rC=aje.prototype;rC.addSource=function(e,t,r){var n={type:"geojson",data:t.geojson};r&&r.enabled&&IXt.extendFlat(n,{cluster:!0,clusterMaxZoom:r.maxzoom});var i=this.subplot.map.getSource(this.sourceIds[e]);i?i.setData(t.geojson):this.subplot.map.addSource(this.sourceIds[e],n)};rC.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};rC.addLayer=function(e,t,r){var n={type:t.type,id:this.layerIds[e],source:this.sourceIds[e],layout:t.layout,paint:t.paint};t.filter&&(n.filter=t.filter);for(var i=this.layerIds[e],a,o=this.subplot.getMapLayers(),s=0;s=0;L--){var x=T[L];i.removeLayer(u.layerIds[x])}M||i.removeSource(u.sourceIds.circle)}function h(M){for(var T=og.nonCluster,L=0;L=0;L--){var x=T[L];i.removeLayer(u.layerIds[x]),M||i.removeSource(u.sourceIds[x])}}function v(M){l?f(M):d(M)}function m(M){s?c(M):h(M)}function b(){for(var M=s?og.cluster:og.nonCluster,T=0;T=0;n--){var i=r[n];t.removeLayer(this.layerIds[i]),t.removeSource(this.sourceIds[i])}};oje.exports=function(t,r){var n=r[0].trace,i=n.cluster&&n.cluster.enabled,a=n.visible!==!0,o=new aje(t,n.uid,i,a),s=nje(t.gd,r),l=o.below=t.belowLookup["trace-"+n.uid],u,c,f;if(i)for(o.addSource("circle",s.circle,n.cluster),u=0;u{"use strict";var RXt=vf(),FJ=Pr(),DXt=mT(),FXt=FJ.fillText,zXt=fs().BADNUM,qXt=Px().traceLayerPrefix;function OXt(e,t,r){var n=e.cd,i=n[0].trace,a=e.xa,o=e.ya,s=e.subplot,l=[],u=qXt+i.uid+"-circle",c=i.cluster&&i.cluster.enabled;if(c){var f=s.map.queryRenderedFeatures(null,{layers:[u]});l=f.map(function(S){return S.id})}var h=t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360),d=h*360,v=t-d;function m(S){var g=S.lonlat;if(g[0]===zXt||c&&l.indexOf(S.i+1)===-1)return 1/0;var P=FJ.modHalf(g[0],360),E=g[1],z=s.project([P,E]),q=z.x-a.c2p([v,E]),U=z.y-o.c2p([P,r]),G=Math.max(3,S.mrc||0);return Math.max(Math.sqrt(q*q+U*U)-G,1-3/G)}if(RXt.getClosest(n,m,e),e.index!==!1){var b=n[e.index],p=b.lonlat,k=[FJ.modHalf(p[0],360)+d,p[1]],M=a.c2p(k),T=o.c2p(k),L=b.mrc||1;e.x0=M-L,e.x1=M+L,e.y0=T-L,e.y1=T+L;var x={};x[i.subplot]={_subplot:s};var C=i._module.formatLabels(b,i,x);return e.lonLabel=C.lonLabel,e.latLabel=C.latLabel,e.color=DXt(i,b),e.extraText=lje(i,b,n[0].t.labels),e.hovertemplate=i.hovertemplate,[e]}}function lje(e,t,r){if(e.hovertemplate)return;var n=t.hi||e.hoverinfo,i=n.split("+"),a=i.indexOf("all")!==-1,o=i.indexOf("lon")!==-1,s=i.indexOf("lat")!==-1,l=t.lonlat,u=[];function c(f){return f+"\xB0"}return a||o&&s?u.push("("+c(l[1])+", "+c(l[0])+")"):o?u.push(r.lon+c(l[0])):s&&u.push(r.lat+c(l[1])),(a||i.indexOf("text")!==-1)&&FXt(t,e,u),u.join("
")}uje.exports={hoverPoints:OXt,getExtraText:lje}});var fje=ye((bbr,cje)=>{"use strict";cje.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var dje=ye((wbr,hje)=>{"use strict";var BXt=Pr(),NXt=Ru(),UXt=fs().BADNUM;hje.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].trace,l;if(!NXt.hasMarkers(s))return[];if(r===!1)for(l=0;l{(function(e,t){typeof zJ=="object"&&typeof qJ!="undefined"?qJ.exports=t():(e=typeof globalThis!="undefined"?globalThis:e||self,e.maplibregl=t())})(zJ,function(){"use strict";var e={},t={};function r(i,a,o){if(t[i]=o,i==="index"){var s="var sharedModule = {}; ("+t.shared+")(sharedModule); ("+t.worker+")(sharedModule);",l={};return t.shared(l),t.index(e,l),typeof window!="undefined"&&e.setWorkerUrl(window.URL.createObjectURL(new Blob([s],{type:"text/javascript"}))),e}}r("shared",["exports"],function(i){"use strict";function a(R,A,F,W){return new(F||(F=Promise))(function(te,fe){function pe(ft){try{Ke(W.next(ft))}catch(Rt){fe(Rt)}}function Re(ft){try{Ke(W.throw(ft))}catch(Rt){fe(Rt)}}function Ke(ft){var Rt;ft.done?te(ft.value):(Rt=ft.value,Rt instanceof F?Rt:new F(function(tr){tr(Rt)})).then(pe,Re)}Ke((W=W.apply(R,A||[])).next())})}function o(R){return R&&R.__esModule&&Object.prototype.hasOwnProperty.call(R,"default")?R.default:R}typeof SuppressedError=="function"&&SuppressedError;var s=l;function l(R,A){this.x=R,this.y=A}l.prototype={clone:function(){return new l(this.x,this.y)},add:function(R){return this.clone()._add(R)},sub:function(R){return this.clone()._sub(R)},multByPoint:function(R){return this.clone()._multByPoint(R)},divByPoint:function(R){return this.clone()._divByPoint(R)},mult:function(R){return this.clone()._mult(R)},div:function(R){return this.clone()._div(R)},rotate:function(R){return this.clone()._rotate(R)},rotateAround:function(R,A){return this.clone()._rotateAround(R,A)},matMult:function(R){return this.clone()._matMult(R)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(R){return this.x===R.x&&this.y===R.y},dist:function(R){return Math.sqrt(this.distSqr(R))},distSqr:function(R){var A=R.x-this.x,F=R.y-this.y;return A*A+F*F},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(R){return Math.atan2(this.y-R.y,this.x-R.x)},angleWith:function(R){return this.angleWithSep(R.x,R.y)},angleWithSep:function(R,A){return Math.atan2(this.x*A-this.y*R,this.x*R+this.y*A)},_matMult:function(R){var A=R[2]*this.x+R[3]*this.y;return this.x=R[0]*this.x+R[1]*this.y,this.y=A,this},_add:function(R){return this.x+=R.x,this.y+=R.y,this},_sub:function(R){return this.x-=R.x,this.y-=R.y,this},_mult:function(R){return this.x*=R,this.y*=R,this},_div:function(R){return this.x/=R,this.y/=R,this},_multByPoint:function(R){return this.x*=R.x,this.y*=R.y,this},_divByPoint:function(R){return this.x/=R.x,this.y/=R.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var R=this.y;return this.y=this.x,this.x=-R,this},_rotate:function(R){var A=Math.cos(R),F=Math.sin(R),W=F*this.x+A*this.y;return this.x=A*this.x-F*this.y,this.y=W,this},_rotateAround:function(R,A){var F=Math.cos(R),W=Math.sin(R),te=A.y+W*(this.x-A.x)+F*(this.y-A.y);return this.x=A.x+F*(this.x-A.x)-W*(this.y-A.y),this.y=te,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},l.convert=function(R){return R instanceof l?R:Array.isArray(R)?new l(R[0],R[1]):R};var u=o(s),c=f;function f(R,A,F,W){this.cx=3*R,this.bx=3*(F-R)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*A,this.by=3*(W-A)-this.cy,this.ay=1-this.cy-this.by,this.p1x=R,this.p1y=A,this.p2x=F,this.p2y=W}f.prototype={sampleCurveX:function(R){return((this.ax*R+this.bx)*R+this.cx)*R},sampleCurveY:function(R){return((this.ay*R+this.by)*R+this.cy)*R},sampleCurveDerivativeX:function(R){return(3*this.ax*R+2*this.bx)*R+this.cx},solveCurveX:function(R,A){if(A===void 0&&(A=1e-6),R<0)return 0;if(R>1)return 1;for(var F=R,W=0;W<8;W++){var te=this.sampleCurveX(F)-R;if(Math.abs(te)te?pe=F:Re=F,F=.5*(Re-pe)+pe;return F},solve:function(R,A){return this.sampleCurveY(this.solveCurveX(R,A))}};var h=o(c);let d,v;function m(){return d==null&&(d=typeof OffscreenCanvas!="undefined"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),d}function b(){if(v==null&&(v=!1,m())){let A=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(A){for(let W=0;W<5*5;W++){let te=4*W;A.fillStyle=`rgb(${te},${te+1},${te+2})`,A.fillRect(W%5,Math.floor(W/5),1,1)}let F=A.getImageData(0,0,5,5).data;for(let W=0;W<5*5*4;W++)if(W%4!=3&&F[W]!==W){v=!0;break}}}return v||!1}function p(R,A,F,W){let te=new h(R,A,F,W);return fe=>te.solve(fe)}let k=p(.25,.1,.25,1);function M(R,A,F){return Math.min(F,Math.max(A,R))}function T(R,A,F){let W=F-A,te=((R-A)%W+W)%W+A;return te===A?F:te}function L(R,...A){for(let F of A)for(let W in F)R[W]=F[W];return R}let x=1;function C(R,A,F){let W={};for(let te in R)W[te]=A.call(this,R[te],te,R);return W}function S(R,A,F){let W={};for(let te in R)A.call(this,R[te],te,R)&&(W[te]=R[te]);return W}function g(R){return Array.isArray(R)?R.map(g):typeof R=="object"&&R?C(R,g):R}let P={};function E(R){P[R]||(typeof console!="undefined"&&console.warn(R),P[R]=!0)}function z(R,A,F){return(F.y-R.y)*(A.x-R.x)>(A.y-R.y)*(F.x-R.x)}function q(R){return typeof WorkerGlobalScope!="undefined"&&R!==void 0&&R instanceof WorkerGlobalScope}let U=null;function G(R){return typeof ImageBitmap!="undefined"&&R instanceof ImageBitmap}let Z="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function j(R,A,F,W,te){return a(this,void 0,void 0,function*(){if(typeof VideoFrame=="undefined")throw new Error("VideoFrame not supported");let fe=new VideoFrame(R,{timestamp:0});try{let pe=fe==null?void 0:fe.format;if(!pe||!pe.startsWith("BGR")&&!pe.startsWith("RGB"))throw new Error(`Unrecognized format ${pe}`);let Re=pe.startsWith("BGR"),Ke=new Uint8ClampedArray(W*te*4);if(yield fe.copyTo(Ke,function(ft,Rt,tr,ur,vr){let kr=4*Math.max(-Rt,0),Dr=(Math.max(0,tr)-tr)*ur*4+kr,li=4*ur,pi=Math.max(0,Rt),vn=Math.max(0,tr);return{rect:{x:pi,y:vn,width:Math.min(ft.width,Rt+ur)-pi,height:Math.min(ft.height,tr+vr)-vn},layout:[{offset:Dr,stride:li}]}}(R,A,F,W,te)),Re)for(let ft=0;ftq(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,Se=function(R,A){if(/:\/\//.test(R.url)&&!/^https?:|^file:/.test(R.url)){let W=ke(R.url);if(W)return W(R,A);if(q(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:R,targetMapId:Ce},A)}if(!(/^file:/.test(F=R.url)||/^file:/.test(ie())&&!/^\w+:/.test(F))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(W,te){return a(this,void 0,void 0,function*(){let fe=new Request(W.url,{method:W.method||"GET",body:W.body,credentials:W.credentials,headers:W.headers,cache:W.cache,referrer:ie(),signal:te.signal});W.type!=="json"||fe.headers.has("Accept")||fe.headers.set("Accept","application/json");let pe=yield fetch(fe);if(!pe.ok){let ft=yield pe.blob();throw new ge(pe.status,pe.statusText,W.url,ft)}let Re;Re=W.type==="arrayBuffer"||W.type==="image"?pe.arrayBuffer():W.type==="json"?pe.json():pe.text();let Ke=yield Re;if(te.signal.aborted)throw oe();return{data:Ke,cacheControl:pe.headers.get("Cache-Control"),expires:pe.headers.get("Expires")}})}(R,A);if(q(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:R,mustQueue:!0,targetMapId:Ce},A)}var F;return function(W,te){return new Promise((fe,pe)=>{var Re;let Ke=new XMLHttpRequest;Ke.open(W.method||"GET",W.url,!0),W.type!=="arrayBuffer"&&W.type!=="image"||(Ke.responseType="arraybuffer");for(let ft in W.headers)Ke.setRequestHeader(ft,W.headers[ft]);W.type==="json"&&(Ke.responseType="text",!((Re=W.headers)===null||Re===void 0)&&Re.Accept||Ke.setRequestHeader("Accept","application/json")),Ke.withCredentials=W.credentials==="include",Ke.onerror=()=>{pe(new Error(Ke.statusText))},Ke.onload=()=>{if(!te.signal.aborted)if((Ke.status>=200&&Ke.status<300||Ke.status===0)&&Ke.response!==null){let ft=Ke.response;if(W.type==="json")try{ft=JSON.parse(Ke.response)}catch(Rt){return void pe(Rt)}fe({data:ft,cacheControl:Ke.getResponseHeader("Cache-Control"),expires:Ke.getResponseHeader("Expires")})}else{let ft=new Blob([Ke.response],{type:Ke.getResponseHeader("Content-Type")});pe(new ge(Ke.status,Ke.statusText,W.url,ft))}},te.signal.addEventListener("abort",()=>{Ke.abort(),pe(oe())}),Ke.send(W.body)})}(R,A)};function Ee(R){if(!R||R.indexOf("://")<=0||R.indexOf("data:image/")===0||R.indexOf("blob:")===0)return!0;let A=new URL(R),F=window.location;return A.protocol===F.protocol&&A.host===F.host}function we(R,A,F){F[R]&&F[R].indexOf(A)!==-1||(F[R]=F[R]||[],F[R].push(A))}function De(R,A,F){if(F&&F[R]){let W=F[R].indexOf(A);W!==-1&&F[R].splice(W,1)}}class Le{constructor(A,F={}){L(this,F),this.type=A}}class me extends Le{constructor(A,F={}){super("error",L({error:A},F))}}class Pe{on(A,F){return this._listeners=this._listeners||{},we(A,F,this._listeners),this}off(A,F){return De(A,F,this._listeners),De(A,F,this._oneTimeListeners),this}once(A,F){return F?(this._oneTimeListeners=this._oneTimeListeners||{},we(A,F,this._oneTimeListeners),this):new Promise(W=>this.once(A,W))}fire(A,F){typeof A=="string"&&(A=new Le(A,F||{}));let W=A.type;if(this.listens(W)){A.target=this;let te=this._listeners&&this._listeners[W]?this._listeners[W].slice():[];for(let Re of te)Re.call(this,A);let fe=this._oneTimeListeners&&this._oneTimeListeners[W]?this._oneTimeListeners[W].slice():[];for(let Re of fe)De(W,Re,this._oneTimeListeners),Re.call(this,A);let pe=this._eventedParent;pe&&(L(A,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),pe.fire(A))}else A instanceof me&&console.error(A.error);return this}listens(A){return this._listeners&&this._listeners[A]&&this._listeners[A].length>0||this._oneTimeListeners&&this._oneTimeListeners[A]&&this._oneTimeListeners[A].length>0||this._eventedParent&&this._eventedParent.listens(A)}setEventedParent(A,F){return this._eventedParent=A,this._eventedParentData=F,this}}var ce={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"enum",default:"mercator",values:{mercator:{},globe:{}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};let He=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function lt(R,A){let F={};for(let W in R)W!=="ref"&&(F[W]=R[W]);return He.forEach(W=>{W in A&&(F[W]=A[W])}),F}function mt(R,A){if(Array.isArray(R)){if(!Array.isArray(A)||R.length!==A.length)return!1;for(let F=0;F`:R.itemType.kind==="value"?"array":`array<${A}>`}return R.kind}let We=[Tt,dt,Et,pt,Xt,ei,or,Ge(_r),qr,jr,gt];function et(R,A){if(A.kind==="error")return null;if(R.kind==="array"){if(A.kind==="array"&&(A.N===0&&A.itemType.kind==="value"||!et(R.itemType,A.itemType))&&(typeof R.N!="number"||R.N===A.N))return null}else{if(R.kind===A.kind)return null;if(R.kind==="value"){for(let F of We)if(!et(F,A))return null}}return`Expected ${Je(R)} but found ${Je(A)} instead.`}function xt(R,A){return A.some(F=>F.kind===R.kind)}function At(R,A){return A.some(F=>F==="null"?R===null:F==="array"?Array.isArray(R):F==="object"?R&&!Array.isArray(R)&&typeof R=="object":F===typeof R)}function Kt(R,A){return R.kind==="array"&&A.kind==="array"?R.itemType.kind===A.itemType.kind&&typeof R.N=="number":R.kind===A.kind}let er=.96422,Sr=.82521,Gr=4/29,Ir=6/29,Yr=3*Ir*Ir,_i=Ir*Ir*Ir,Pi=Math.PI/180,ai=180/Math.PI;function mi(R){return(R%=360)<0&&(R+=360),R}function un([R,A,F,W]){let te,fe,pe=An((.2225045*(R=Fn(R))+.7168786*(A=Fn(A))+.0606169*(F=Fn(F)))/1);R===A&&A===F?te=fe=pe:(te=An((.4360747*R+.3850649*A+.1430804*F)/er),fe=An((.0139322*R+.0971045*A+.7141733*F)/Sr));let Re=116*pe-16;return[Re<0?0:Re,500*(te-pe),200*(pe-fe),W]}function Fn(R){return R<=.04045?R/12.92:Math.pow((R+.055)/1.055,2.4)}function An(R){return R>_i?Math.pow(R,1/3):R/Yr+Gr}function Hn([R,A,F,W]){let te=(R+16)/116,fe=isNaN(A)?te:te+A/500,pe=isNaN(F)?te:te-F/200;return te=1*Vi(te),fe=er*Vi(fe),pe=Sr*Vi(pe),[Qn(3.1338561*fe-1.6168667*te-.4906146*pe),Qn(-.9787684*fe+1.9161415*te+.033454*pe),Qn(.0719453*fe-.2289914*te+1.4052427*pe),W]}function Qn(R){return(R=R<=.00304?12.92*R:1.055*Math.pow(R,1/2.4)-.055)<0?0:R>1?1:R}function Vi(R){return R>Ir?R*R*R:Yr*(R-Gr)}function Kn(R){return parseInt(R.padEnd(2,R),16)/255}function Jn(R,A){return Gt(A?R/100:R,0,1)}function Gt(R,A,F){return Math.min(Math.max(A,R),F)}function wt(R){return!R.some(Number.isNaN)}let rr={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]};class ir{constructor(A,F,W,te=1,fe=!0){this.r=A,this.g=F,this.b=W,this.a=te,fe||(this.r*=te,this.g*=te,this.b*=te,te||this.overwriteGetter("rgb",[A,F,W,te]))}static parse(A){if(A instanceof ir)return A;if(typeof A!="string")return;let F=function(W){if((W=W.toLowerCase().trim())==="transparent")return[0,0,0,0];let te=rr[W];if(te){let[pe,Re,Ke]=te;return[pe/255,Re/255,Ke/255,1]}if(W.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(W)){let pe=W.length<6?1:2,Re=1;return[Kn(W.slice(Re,Re+=pe)),Kn(W.slice(Re,Re+=pe)),Kn(W.slice(Re,Re+=pe)),Kn(W.slice(Re,Re+pe)||"ff")]}if(W.startsWith("rgb")){let pe=W.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(pe){let[Re,Ke,ft,Rt,tr,ur,vr,kr,Dr,li,pi,vn]=pe,zi=[Rt||" ",vr||" ",li].join("");if(zi===" "||zi===" /"||zi===",,"||zi===",,,"){let ln=[ft,ur,Dr].join(""),Tn=ln==="%%%"?100:ln===""?255:0;if(Tn){let pa=[Gt(+Ke/Tn,0,1),Gt(+tr/Tn,0,1),Gt(+kr/Tn,0,1),pi?Jn(+pi,vn):1];if(wt(pa))return pa}}return}}let fe=W.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(fe){let[pe,Re,Ke,ft,Rt,tr,ur,vr,kr]=fe,Dr=[Ke||" ",Rt||" ",ur].join("");if(Dr===" "||Dr===" /"||Dr===",,"||Dr===",,,"){let li=[+Re,Gt(+ft,0,100),Gt(+tr,0,100),vr?Jn(+vr,kr):1];if(wt(li))return function([pi,vn,zi,ln]){function Tn(pa){let ro=(pa+pi/30)%12,Vo=vn*Math.min(zi,1-zi);return zi-Vo*Math.max(-1,Math.min(ro-3,9-ro,1))}return pi=mi(pi),vn/=100,zi/=100,[Tn(0),Tn(8),Tn(4),ln]}(li)}}}(A);return F?new ir(...F,!1):void 0}get rgb(){let{r:A,g:F,b:W,a:te}=this,fe=te||1/0;return this.overwriteGetter("rgb",[A/fe,F/fe,W/fe,te])}get hcl(){return this.overwriteGetter("hcl",function(A){let[F,W,te,fe]=un(A),pe=Math.sqrt(W*W+te*te);return[Math.round(1e4*pe)?mi(Math.atan2(te,W)*ai):NaN,pe,F,fe]}(this.rgb))}get lab(){return this.overwriteGetter("lab",un(this.rgb))}overwriteGetter(A,F){return Object.defineProperty(this,A,{value:F}),F}toString(){let[A,F,W,te]=this.rgb;return`rgba(${[A,F,W].map(fe=>Math.round(255*fe)).join(",")},${te})`}}ir.black=new ir(0,0,0,1),ir.white=new ir(1,1,1,1),ir.transparent=new ir(0,0,0,0),ir.red=new ir(1,0,0,1);class wr{constructor(A,F,W){this.sensitivity=A?F?"variant":"case":F?"accent":"base",this.locale=W,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(A,F){return this.collator.compare(A,F)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Xr{constructor(A,F,W,te,fe){this.text=A,this.image=F,this.scale=W,this.fontStack=te,this.textColor=fe}}class ti{constructor(A){this.sections=A}static fromString(A){return new ti([new Xr(A,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(A=>A.text.length!==0||A.image&&A.image.name.length!==0)}static factory(A){return A instanceof ti?A:ti.fromString(A)}toString(){return this.sections.length===0?"":this.sections.map(A=>A.text).join("")}}class $r{constructor(A){this.values=A.slice()}static parse(A){if(A instanceof $r)return A;if(typeof A=="number")return new $r([A,A,A,A]);if(Array.isArray(A)&&!(A.length<1||A.length>4)){for(let F of A)if(typeof F!="number")return;switch(A.length){case 1:A=[A[0],A[0],A[0],A[0]];break;case 2:A=[A[0],A[1],A[0],A[1]];break;case 3:A=[A[0],A[1],A[2],A[1]]}return new $r(A)}}toString(){return JSON.stringify(this.values)}}let Ri=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Zi{constructor(A){this.values=A.slice()}static parse(A){if(A instanceof Zi)return A;if(Array.isArray(A)&&!(A.length<1)&&A.length%2==0){for(let F=0;F=0&&R<=255&&typeof A=="number"&&A>=0&&A<=255&&typeof F=="number"&&F>=0&&F<=255?W===void 0||typeof W=="number"&&W>=0&&W<=1?null:`Invalid rgba value [${[R,A,F,W].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof W=="number"?[R,A,F,W]:[R,A,F]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function yn(R){if(R===null||typeof R=="string"||typeof R=="boolean"||typeof R=="number"||R instanceof ir||R instanceof wr||R instanceof ti||R instanceof $r||R instanceof Zi||R instanceof en)return!0;if(Array.isArray(R)){for(let A of R)if(!yn(A))return!1;return!0}if(typeof R=="object"){for(let A in R)if(!yn(R[A]))return!1;return!0}return!1}function Mn(R){if(R===null)return Tt;if(typeof R=="string")return Et;if(typeof R=="boolean")return pt;if(typeof R=="number")return dt;if(R instanceof ir)return Xt;if(R instanceof wr)return Er;if(R instanceof ti)return ei;if(R instanceof $r)return qr;if(R instanceof Zi)return gt;if(R instanceof en)return jr;if(Array.isArray(R)){let A=R.length,F;for(let W of R){let te=Mn(W);if(F){if(F===te)continue;F=_r;break}F=te}return Ge(F||_r,A)}return or}function Ba(R){let A=typeof R;return R===null?"":A==="string"||A==="number"||A==="boolean"?String(R):R instanceof ir||R instanceof ti||R instanceof $r||R instanceof Zi||R instanceof en?R.toString():JSON.stringify(R)}class ua{constructor(A,F){this.type=A,this.value=F}static parse(A,F){if(A.length!==2)return F.error(`'literal' expression requires exactly one argument, but found ${A.length-1} instead.`);if(!yn(A[1]))return F.error("invalid value");let W=A[1],te=Mn(W),fe=F.expectedType;return te.kind!=="array"||te.N!==0||!fe||fe.kind!=="array"||typeof fe.N=="number"&&fe.N!==0||(te=fe),new ua(te,W)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class ma{constructor(A){this.name="ExpressionEvaluationError",this.message=A}toJSON(){return this.message}}let Wa={string:Et,number:dt,boolean:pt,object:or};class Fa{constructor(A,F){this.type=A,this.args=F}static parse(A,F){if(A.length<2)return F.error("Expected at least one argument.");let W,te=1,fe=A[0];if(fe==="array"){let Re,Ke;if(A.length>2){let ft=A[1];if(typeof ft!="string"||!(ft in Wa)||ft==="object")return F.error('The item type argument of "array" must be one of string, number, boolean',1);Re=Wa[ft],te++}else Re=_r;if(A.length>3){if(A[2]!==null&&(typeof A[2]!="number"||A[2]<0||A[2]!==Math.floor(A[2])))return F.error('The length argument to "array" must be a positive integer literal',2);Ke=A[2],te++}W=Ge(Re,Ke)}else{if(!Wa[fe])throw new Error(`Types doesn't contain name = ${fe}`);W=Wa[fe]}let pe=[];for(;teA.outputDefined())}}let Xo={"to-boolean":pt,"to-color":Xt,"to-number":dt,"to-string":Et};class da{constructor(A,F){this.type=A,this.args=F}static parse(A,F){if(A.length<2)return F.error("Expected at least one argument.");let W=A[0];if(!Xo[W])throw new Error(`Can't parse ${W} as it is not part of the known types`);if((W==="to-boolean"||W==="to-string")&&A.length!==2)return F.error("Expected one argument.");let te=Xo[W],fe=[];for(let pe=1;pe4?`Invalid rbga value ${JSON.stringify(F)}: expected an array containing either three or four numeric values.`:fn(F[0],F[1],F[2],F[3]),!W))return new ir(F[0]/255,F[1]/255,F[2]/255,F[3])}throw new ma(W||`Could not parse color from value '${typeof F=="string"?F:JSON.stringify(F)}'`)}case"padding":{let F;for(let W of this.args){F=W.evaluate(A);let te=$r.parse(F);if(te)return te}throw new ma(`Could not parse padding from value '${typeof F=="string"?F:JSON.stringify(F)}'`)}case"variableAnchorOffsetCollection":{let F;for(let W of this.args){F=W.evaluate(A);let te=Zi.parse(F);if(te)return te}throw new ma(`Could not parse variableAnchorOffsetCollection from value '${typeof F=="string"?F:JSON.stringify(F)}'`)}case"number":{let F=null;for(let W of this.args){if(F=W.evaluate(A),F===null)return 0;let te=Number(F);if(!isNaN(te))return te}throw new ma(`Could not convert ${JSON.stringify(F)} to number.`)}case"formatted":return ti.fromString(Ba(this.args[0].evaluate(A)));case"resolvedImage":return en.fromString(Ba(this.args[0].evaluate(A)));default:return Ba(this.args[0].evaluate(A))}}eachChild(A){this.args.forEach(A)}outputDefined(){return this.args.every(A=>A.outputDefined())}}let jn=["Unknown","Point","LineString","Polygon"];class Ha{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?jn[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(A){let F=this._parseColorCache[A];return F||(F=this._parseColorCache[A]=ir.parse(A)),F}}class vo{constructor(A,F,W=[],te,fe=new St,pe=[]){this.registry=A,this.path=W,this.key=W.map(Re=>`[${Re}]`).join(""),this.scope=fe,this.errors=pe,this.expectedType=te,this._isConstant=F}parse(A,F,W,te,fe={}){return F?this.concat(F,W,te)._parse(A,fe):this._parse(A,fe)}_parse(A,F){function W(te,fe,pe){return pe==="assert"?new Fa(fe,[te]):pe==="coerce"?new da(fe,[te]):te}if(A!==null&&typeof A!="string"&&typeof A!="boolean"&&typeof A!="number"||(A=["literal",A]),Array.isArray(A)){if(A.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let te=A[0];if(typeof te!="string")return this.error(`Expression name must be a string, but found ${typeof te} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let fe=this.registry[te];if(fe){let pe=fe.parse(A,this);if(!pe)return null;if(this.expectedType){let Re=this.expectedType,Ke=pe.type;if(Re.kind!=="string"&&Re.kind!=="number"&&Re.kind!=="boolean"&&Re.kind!=="object"&&Re.kind!=="array"||Ke.kind!=="value")if(Re.kind!=="color"&&Re.kind!=="formatted"&&Re.kind!=="resolvedImage"||Ke.kind!=="value"&&Ke.kind!=="string")if(Re.kind!=="padding"||Ke.kind!=="value"&&Ke.kind!=="number"&&Ke.kind!=="array")if(Re.kind!=="variableAnchorOffsetCollection"||Ke.kind!=="value"&&Ke.kind!=="array"){if(this.checkSubtype(Re,Ke))return null}else pe=W(pe,Re,F.typeAnnotation||"coerce");else pe=W(pe,Re,F.typeAnnotation||"coerce");else pe=W(pe,Re,F.typeAnnotation||"coerce");else pe=W(pe,Re,F.typeAnnotation||"assert")}if(!(pe instanceof ua)&&pe.type.kind!=="resolvedImage"&&this._isConstant(pe)){let Re=new Ha;try{pe=new ua(pe.type,pe.evaluate(Re))}catch(Ke){return this.error(Ke.message),null}}return pe}return this.error(`Unknown expression "${te}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(A===void 0?"'undefined' value invalid. Use null instead.":typeof A=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof A} instead.`)}concat(A,F,W){let te=typeof A=="number"?this.path.concat(A):this.path,fe=W?this.scope.concat(W):this.scope;return new vo(this.registry,this._isConstant,te,F||null,fe,this.errors)}error(A,...F){let W=`${this.key}${F.map(te=>`[${te}]`).join("")}`;this.errors.push(new rt(W,A))}checkSubtype(A,F){let W=et(A,F);return W&&this.error(W),W}}class Gn{constructor(A,F){this.type=F.type,this.bindings=[].concat(A),this.result=F}evaluate(A){return this.result.evaluate(A)}eachChild(A){for(let F of this.bindings)A(F[1]);A(this.result)}static parse(A,F){if(A.length<4)return F.error(`Expected at least 3 arguments, but found ${A.length-1} instead.`);let W=[];for(let fe=1;fe=W.length)throw new ma(`Array index out of bounds: ${F} > ${W.length-1}.`);if(F!==Math.floor(F))throw new ma(`Array index must be an integer, but found ${F} instead.`);return W[F]}eachChild(A){A(this.index),A(this.input)}outputDefined(){return!1}}class Jr{constructor(A,F){this.type=pt,this.needle=A,this.haystack=F}static parse(A,F){if(A.length!==3)return F.error(`Expected 2 arguments, but found ${A.length-1} instead.`);let W=F.parse(A[1],1,_r),te=F.parse(A[2],2,_r);return W&&te?xt(W.type,[pt,Et,dt,Tt,_r])?new Jr(W,te):F.error(`Expected first argument to be of type boolean, string, number or null, but found ${Je(W.type)} instead`):null}evaluate(A){let F=this.needle.evaluate(A),W=this.haystack.evaluate(A);if(!W)return!1;if(!At(F,["boolean","string","number","null"]))throw new ma(`Expected first argument to be of type boolean, string, number or null, but found ${Je(Mn(F))} instead.`);if(!At(W,["string","array"]))throw new ma(`Expected second argument to be of type array or string, but found ${Je(Mn(W))} instead.`);return W.indexOf(F)>=0}eachChild(A){A(this.needle),A(this.haystack)}outputDefined(){return!0}}class hi{constructor(A,F,W){this.type=dt,this.needle=A,this.haystack=F,this.fromIndex=W}static parse(A,F){if(A.length<=2||A.length>=5)return F.error(`Expected 3 or 4 arguments, but found ${A.length-1} instead.`);let W=F.parse(A[1],1,_r),te=F.parse(A[2],2,_r);if(!W||!te)return null;if(!xt(W.type,[pt,Et,dt,Tt,_r]))return F.error(`Expected first argument to be of type boolean, string, number or null, but found ${Je(W.type)} instead`);if(A.length===4){let fe=F.parse(A[3],3,dt);return fe?new hi(W,te,fe):null}return new hi(W,te)}evaluate(A){let F=this.needle.evaluate(A),W=this.haystack.evaluate(A);if(!At(F,["boolean","string","number","null"]))throw new ma(`Expected first argument to be of type boolean, string, number or null, but found ${Je(Mn(F))} instead.`);let te;if(this.fromIndex&&(te=this.fromIndex.evaluate(A)),At(W,["string"])){let fe=W.indexOf(F,te);return fe===-1?-1:[...W.slice(0,fe)].length}if(At(W,["array"]))return W.indexOf(F,te);throw new ma(`Expected second argument to be of type array or string, but found ${Je(Mn(W))} instead.`)}eachChild(A){A(this.needle),A(this.haystack),this.fromIndex&&A(this.fromIndex)}outputDefined(){return!1}}class hn{constructor(A,F,W,te,fe,pe){this.inputType=A,this.type=F,this.input=W,this.cases=te,this.outputs=fe,this.otherwise=pe}static parse(A,F){if(A.length<5)return F.error(`Expected at least 4 arguments, but found only ${A.length-1}.`);if(A.length%2!=1)return F.error("Expected an even number of arguments.");let W,te;F.expectedType&&F.expectedType.kind!=="value"&&(te=F.expectedType);let fe={},pe=[];for(let ft=2;ftNumber.MAX_SAFE_INTEGER)return ur.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof kr=="number"&&Math.floor(kr)!==kr)return ur.error("Numeric branch labels must be integer values.");if(W){if(ur.checkSubtype(W,Mn(kr)))return null}else W=Mn(kr);if(fe[String(kr)]!==void 0)return ur.error("Branch labels must be unique.");fe[String(kr)]=pe.length}let vr=F.parse(tr,ft,te);if(!vr)return null;te=te||vr.type,pe.push(vr)}let Re=F.parse(A[1],1,_r);if(!Re)return null;let Ke=F.parse(A[A.length-1],A.length-1,te);return Ke?Re.type.kind!=="value"&&F.concat(1).checkSubtype(W,Re.type)?null:new hn(W,te,Re,fe,pe,Ke):null}evaluate(A){let F=this.input.evaluate(A);return(Mn(F)===this.inputType&&this.outputs[this.cases[F]]||this.otherwise).evaluate(A)}eachChild(A){A(this.input),this.outputs.forEach(A),A(this.otherwise)}outputDefined(){return this.outputs.every(A=>A.outputDefined())&&this.otherwise.outputDefined()}}class Sn{constructor(A,F,W){this.type=A,this.branches=F,this.otherwise=W}static parse(A,F){if(A.length<4)return F.error(`Expected at least 3 arguments, but found only ${A.length-1}.`);if(A.length%2!=0)return F.error("Expected an odd number of arguments.");let W;F.expectedType&&F.expectedType.kind!=="value"&&(W=F.expectedType);let te=[];for(let pe=1;peF.outputDefined())&&this.otherwise.outputDefined()}}class En{constructor(A,F,W,te){this.type=A,this.input=F,this.beginIndex=W,this.endIndex=te}static parse(A,F){if(A.length<=2||A.length>=5)return F.error(`Expected 3 or 4 arguments, but found ${A.length-1} instead.`);let W=F.parse(A[1],1,_r),te=F.parse(A[2],2,dt);if(!W||!te)return null;if(!xt(W.type,[Ge(_r),Et,_r]))return F.error(`Expected first argument to be of type array or string, but found ${Je(W.type)} instead`);if(A.length===4){let fe=F.parse(A[3],3,dt);return fe?new En(W.type,W,te,fe):null}return new En(W.type,W,te)}evaluate(A){let F=this.input.evaluate(A),W=this.beginIndex.evaluate(A),te;if(this.endIndex&&(te=this.endIndex.evaluate(A)),At(F,["string"]))return[...F].slice(W,te).join("");if(At(F,["array"]))return F.slice(W,te);throw new ma(`Expected first argument to be of type array or string, but found ${Je(Mn(F))} instead.`)}eachChild(A){A(this.input),A(this.beginIndex),this.endIndex&&A(this.endIndex)}outputDefined(){return!1}}function ki(R,A){let F=R.length-1,W,te,fe=0,pe=F,Re=0;for(;fe<=pe;)if(Re=Math.floor((fe+pe)/2),W=R[Re],te=R[Re+1],W<=A){if(Re===F||AA))throw new ma("Input is not a number.");pe=Re-1}return 0}class _n{constructor(A,F,W){this.type=A,this.input=F,this.labels=[],this.outputs=[];for(let[te,fe]of W)this.labels.push(te),this.outputs.push(fe)}static parse(A,F){if(A.length-1<4)return F.error(`Expected at least 4 arguments, but found only ${A.length-1}.`);if((A.length-1)%2!=0)return F.error("Expected an even number of arguments.");let W=F.parse(A[1],1,dt);if(!W)return null;let te=[],fe=null;F.expectedType&&F.expectedType.kind!=="value"&&(fe=F.expectedType);for(let pe=1;pe=Re)return F.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',ft);let tr=F.parse(Ke,Rt,fe);if(!tr)return null;fe=fe||tr.type,te.push([Re,tr])}return new _n(fe,W,te)}evaluate(A){let F=this.labels,W=this.outputs;if(F.length===1)return W[0].evaluate(A);let te=this.input.evaluate(A);if(te<=F[0])return W[0].evaluate(A);let fe=F.length;return te>=F[fe-1]?W[fe-1].evaluate(A):W[ki(F,te)].evaluate(A)}eachChild(A){A(this.input);for(let F of this.outputs)A(F)}outputDefined(){return this.outputs.every(A=>A.outputDefined())}}function ya(R){return R&&R.__esModule&&Object.prototype.hasOwnProperty.call(R,"default")?R.default:R}var ea=Ma;function Ma(R,A,F,W){this.cx=3*R,this.bx=3*(F-R)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*A,this.by=3*(W-A)-this.cy,this.ay=1-this.cy-this.by,this.p1x=R,this.p1y=A,this.p2x=F,this.p2y=W}Ma.prototype={sampleCurveX:function(R){return((this.ax*R+this.bx)*R+this.cx)*R},sampleCurveY:function(R){return((this.ay*R+this.by)*R+this.cy)*R},sampleCurveDerivativeX:function(R){return(3*this.ax*R+2*this.bx)*R+this.cx},solveCurveX:function(R,A){if(A===void 0&&(A=1e-6),R<0)return 0;if(R>1)return 1;for(var F=R,W=0;W<8;W++){var te=this.sampleCurveX(F)-R;if(Math.abs(te)te?pe=F:Re=F,F=.5*(Re-pe)+pe;return F},solve:function(R,A){return this.sampleCurveY(this.solveCurveX(R,A))}};var _o=ya(ea);function No(R,A,F){return R+F*(A-R)}function po(R,A,F){return R.map((W,te)=>No(W,A[te],F))}let Lo={number:No,color:function(R,A,F,W="rgb"){switch(W){case"rgb":{let[te,fe,pe,Re]=po(R.rgb,A.rgb,F);return new ir(te,fe,pe,Re,!1)}case"hcl":{let[te,fe,pe,Re]=R.hcl,[Ke,ft,Rt,tr]=A.hcl,ur,vr;if(isNaN(te)||isNaN(Ke))isNaN(te)?isNaN(Ke)?ur=NaN:(ur=Ke,pe!==1&&pe!==0||(vr=ft)):(ur=te,Rt!==1&&Rt!==0||(vr=fe));else{let vn=Ke-te;Ke>te&&vn>180?vn-=360:Ke180&&(vn+=360),ur=te+F*vn}let[kr,Dr,li,pi]=function([vn,zi,ln,Tn]){return vn=isNaN(vn)?0:vn*Pi,Hn([ln,Math.cos(vn)*zi,Math.sin(vn)*zi,Tn])}([ur,vr!=null?vr:No(fe,ft,F),No(pe,Rt,F),No(Re,tr,F)]);return new ir(kr,Dr,li,pi,!1)}case"lab":{let[te,fe,pe,Re]=Hn(po(R.lab,A.lab,F));return new ir(te,fe,pe,Re,!1)}}},array:po,padding:function(R,A,F){return new $r(po(R.values,A.values,F))},variableAnchorOffsetCollection:function(R,A,F){let W=R.values,te=A.values;if(W.length!==te.length)throw new ma(`Cannot interpolate values of different length. from: ${R.toString()}, to: ${A.toString()}`);let fe=[];for(let pe=0;petypeof Rt!="number"||Rt<0||Rt>1))return F.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);te={name:"cubic-bezier",controlPoints:ft}}}if(A.length-1<4)return F.error(`Expected at least 4 arguments, but found only ${A.length-1}.`);if((A.length-1)%2!=0)return F.error("Expected an even number of arguments.");if(fe=F.parse(fe,2,dt),!fe)return null;let Re=[],Ke=null;W==="interpolate-hcl"||W==="interpolate-lab"?Ke=Xt:F.expectedType&&F.expectedType.kind!=="value"&&(Ke=F.expectedType);for(let ft=0;ft=Rt)return F.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',ur);let kr=F.parse(tr,vr,Ke);if(!kr)return null;Ke=Ke||kr.type,Re.push([Rt,kr])}return Kt(Ke,dt)||Kt(Ke,Xt)||Kt(Ke,qr)||Kt(Ke,gt)||Kt(Ke,Ge(dt))?new ko(Ke,W,te,fe,Re):F.error(`Type ${Je(Ke)} is not interpolatable.`)}evaluate(A){let F=this.labels,W=this.outputs;if(F.length===1)return W[0].evaluate(A);let te=this.input.evaluate(A);if(te<=F[0])return W[0].evaluate(A);let fe=F.length;if(te>=F[fe-1])return W[fe-1].evaluate(A);let pe=ki(F,te),Re=ko.interpolationFactor(this.interpolation,te,F[pe],F[pe+1]),Ke=W[pe].evaluate(A),ft=W[pe+1].evaluate(A);switch(this.operator){case"interpolate":return Lo[this.type.kind](Ke,ft,Re);case"interpolate-hcl":return Lo.color(Ke,ft,Re,"hcl");case"interpolate-lab":return Lo.color(Ke,ft,Re,"lab")}}eachChild(A){A(this.input);for(let F of this.outputs)A(F)}outputDefined(){return this.outputs.every(A=>A.outputDefined())}}function Ds(R,A,F,W){let te=W-F,fe=R-F;return te===0?0:A===1?fe/te:(Math.pow(A,fe)-1)/(Math.pow(A,te)-1)}class Fs{constructor(A,F){this.type=A,this.args=F}static parse(A,F){if(A.length<2)return F.error("Expectected at least one argument.");let W=null,te=F.expectedType;te&&te.kind!=="value"&&(W=te);let fe=[];for(let Re of A.slice(1)){let Ke=F.parse(Re,1+fe.length,W,void 0,{typeAnnotation:"omit"});if(!Ke)return null;W=W||Ke.type,fe.push(Ke)}if(!W)throw new Error("No output type");let pe=te&&fe.some(Re=>et(te,Re.type));return new Fs(pe?_r:W,fe)}evaluate(A){let F,W=null,te=0;for(let fe of this.args)if(te++,W=fe.evaluate(A),W&&W instanceof en&&!W.available&&(F||(F=W.name),W=null,te===this.args.length&&(W=F)),W!==null)break;return W}eachChild(A){this.args.forEach(A)}outputDefined(){return this.args.every(A=>A.outputDefined())}}function ll(R,A){return R==="=="||R==="!="?A.kind==="boolean"||A.kind==="string"||A.kind==="number"||A.kind==="null"||A.kind==="value":A.kind==="string"||A.kind==="number"||A.kind==="value"}function ul(R,A,F,W){return W.compare(A,F)===0}function zl(R,A,F){let W=R!=="=="&&R!=="!=";return class vje{constructor(fe,pe,Re){this.type=pt,this.lhs=fe,this.rhs=pe,this.collator=Re,this.hasUntypedArgument=fe.type.kind==="value"||pe.type.kind==="value"}static parse(fe,pe){if(fe.length!==3&&fe.length!==4)return pe.error("Expected two or three arguments.");let Re=fe[0],Ke=pe.parse(fe[1],1,_r);if(!Ke)return null;if(!ll(Re,Ke.type))return pe.concat(1).error(`"${Re}" comparisons are not supported for type '${Je(Ke.type)}'.`);let ft=pe.parse(fe[2],2,_r);if(!ft)return null;if(!ll(Re,ft.type))return pe.concat(2).error(`"${Re}" comparisons are not supported for type '${Je(ft.type)}'.`);if(Ke.type.kind!==ft.type.kind&&Ke.type.kind!=="value"&&ft.type.kind!=="value")return pe.error(`Cannot compare types '${Je(Ke.type)}' and '${Je(ft.type)}'.`);W&&(Ke.type.kind==="value"&&ft.type.kind!=="value"?Ke=new Fa(ft.type,[Ke]):Ke.type.kind!=="value"&&ft.type.kind==="value"&&(ft=new Fa(Ke.type,[ft])));let Rt=null;if(fe.length===4){if(Ke.type.kind!=="string"&&ft.type.kind!=="string"&&Ke.type.kind!=="value"&&ft.type.kind!=="value")return pe.error("Cannot use collator to compare non-string types.");if(Rt=pe.parse(fe[3],3,Er),!Rt)return null}return new vje(Ke,ft,Rt)}evaluate(fe){let pe=this.lhs.evaluate(fe),Re=this.rhs.evaluate(fe);if(W&&this.hasUntypedArgument){let Ke=Mn(pe),ft=Mn(Re);if(Ke.kind!==ft.kind||Ke.kind!=="string"&&Ke.kind!=="number")throw new ma(`Expected arguments for "${R}" to be (string, string) or (number, number), but found (${Ke.kind}, ${ft.kind}) instead.`)}if(this.collator&&!W&&this.hasUntypedArgument){let Ke=Mn(pe),ft=Mn(Re);if(Ke.kind!=="string"||ft.kind!=="string")return A(fe,pe,Re)}return this.collator?F(fe,pe,Re,this.collator.evaluate(fe)):A(fe,pe,Re)}eachChild(fe){fe(this.lhs),fe(this.rhs),this.collator&&fe(this.collator)}outputDefined(){return!0}}}let us=zl("==",function(R,A,F){return A===F},ul),il=zl("!=",function(R,A,F){return A!==F},function(R,A,F,W){return!ul(0,A,F,W)}),As=zl("<",function(R,A,F){return A",function(R,A,F){return A>F},function(R,A,F,W){return W.compare(A,F)>0}),Ks=zl("<=",function(R,A,F){return A<=F},function(R,A,F,W){return W.compare(A,F)<=0}),zs=zl(">=",function(R,A,F){return A>=F},function(R,A,F,W){return W.compare(A,F)>=0});class Io{constructor(A,F,W){this.type=Er,this.locale=W,this.caseSensitive=A,this.diacriticSensitive=F}static parse(A,F){if(A.length!==2)return F.error("Expected one argument.");let W=A[1];if(typeof W!="object"||Array.isArray(W))return F.error("Collator options argument must be an object.");let te=F.parse(W["case-sensitive"]!==void 0&&W["case-sensitive"],1,pt);if(!te)return null;let fe=F.parse(W["diacritic-sensitive"]!==void 0&&W["diacritic-sensitive"],1,pt);if(!fe)return null;let pe=null;return W.locale&&(pe=F.parse(W.locale,1,Et),!pe)?null:new Io(te,fe,pe)}evaluate(A){return new wr(this.caseSensitive.evaluate(A),this.diacriticSensitive.evaluate(A),this.locale?this.locale.evaluate(A):null)}eachChild(A){A(this.caseSensitive),A(this.diacriticSensitive),this.locale&&A(this.locale)}outputDefined(){return!1}}class ls{constructor(A,F,W,te,fe){this.type=Et,this.number=A,this.locale=F,this.currency=W,this.minFractionDigits=te,this.maxFractionDigits=fe}static parse(A,F){if(A.length!==3)return F.error("Expected two arguments.");let W=F.parse(A[1],1,dt);if(!W)return null;let te=A[2];if(typeof te!="object"||Array.isArray(te))return F.error("NumberFormat options argument must be an object.");let fe=null;if(te.locale&&(fe=F.parse(te.locale,1,Et),!fe))return null;let pe=null;if(te.currency&&(pe=F.parse(te.currency,1,Et),!pe))return null;let Re=null;if(te["min-fraction-digits"]&&(Re=F.parse(te["min-fraction-digits"],1,dt),!Re))return null;let Ke=null;return te["max-fraction-digits"]&&(Ke=F.parse(te["max-fraction-digits"],1,dt),!Ke)?null:new ls(W,fe,pe,Re,Ke)}evaluate(A){return new Intl.NumberFormat(this.locale?this.locale.evaluate(A):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(A):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(A):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(A):void 0}).format(this.number.evaluate(A))}eachChild(A){A(this.number),this.locale&&A(this.locale),this.currency&&A(this.currency),this.minFractionDigits&&A(this.minFractionDigits),this.maxFractionDigits&&A(this.maxFractionDigits)}outputDefined(){return!1}}class Yl{constructor(A){this.type=ei,this.sections=A}static parse(A,F){if(A.length<2)return F.error("Expected at least one argument.");let W=A[1];if(!Array.isArray(W)&&typeof W=="object")return F.error("First argument must be an image or text section.");let te=[],fe=!1;for(let pe=1;pe<=A.length-1;++pe){let Re=A[pe];if(fe&&typeof Re=="object"&&!Array.isArray(Re)){fe=!1;let Ke=null;if(Re["font-scale"]&&(Ke=F.parse(Re["font-scale"],1,dt),!Ke))return null;let ft=null;if(Re["text-font"]&&(ft=F.parse(Re["text-font"],1,Ge(Et)),!ft))return null;let Rt=null;if(Re["text-color"]&&(Rt=F.parse(Re["text-color"],1,Xt),!Rt))return null;let tr=te[te.length-1];tr.scale=Ke,tr.font=ft,tr.textColor=Rt}else{let Ke=F.parse(A[pe],1,_r);if(!Ke)return null;let ft=Ke.type.kind;if(ft!=="string"&&ft!=="value"&&ft!=="null"&&ft!=="resolvedImage")return F.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");fe=!0,te.push({content:Ke,scale:null,font:null,textColor:null})}}return new Yl(te)}evaluate(A){return new ti(this.sections.map(F=>{let W=F.content.evaluate(A);return Mn(W)===jr?new Xr("",W,null,null,null):new Xr(Ba(W),null,F.scale?F.scale.evaluate(A):null,F.font?F.font.evaluate(A).join(","):null,F.textColor?F.textColor.evaluate(A):null)}))}eachChild(A){for(let F of this.sections)A(F.content),F.scale&&A(F.scale),F.font&&A(F.font),F.textColor&&A(F.textColor)}outputDefined(){return!1}}class Su{constructor(A){this.type=jr,this.input=A}static parse(A,F){if(A.length!==2)return F.error("Expected two arguments.");let W=F.parse(A[1],1,Et);return W?new Su(W):F.error("No image name provided.")}evaluate(A){let F=this.input.evaluate(A),W=en.fromString(F);return W&&A.availableImages&&(W.available=A.availableImages.indexOf(F)>-1),W}eachChild(A){A(this.input)}outputDefined(){return!1}}class nc{constructor(A){this.type=dt,this.input=A}static parse(A,F){if(A.length!==2)return F.error(`Expected 1 argument, but found ${A.length-1} instead.`);let W=F.parse(A[1],1);return W?W.type.kind!=="array"&&W.type.kind!=="string"&&W.type.kind!=="value"?F.error(`Expected argument of type string or array, but found ${Je(W.type)} instead.`):new nc(W):null}evaluate(A){let F=this.input.evaluate(A);if(typeof F=="string")return[...F].length;if(Array.isArray(F))return F.length;throw new ma(`Expected value to be of type string or array, but found ${Je(Mn(F))} instead.`)}eachChild(A){A(this.input)}outputDefined(){return!1}}let bs=8192;function Rn(R,A){let F=(180+R[0])/360,W=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R[1]*Math.PI/360)))/360,te=Math.pow(2,A.z);return[Math.round(F*te*bs),Math.round(W*te*bs)]}function _a(R,A){let F=Math.pow(2,A.z);return[(te=(R[0]/bs+A.x)/F,360*te-180),(W=(R[1]/bs+A.y)/F,360/Math.PI*Math.atan(Math.exp((180-360*W)*Math.PI/180))-90)];var W,te}function Vu(R,A){R[0]=Math.min(R[0],A[0]),R[1]=Math.min(R[1],A[1]),R[2]=Math.max(R[2],A[0]),R[3]=Math.max(R[3],A[1])}function ql(R,A){return!(R[0]<=A[0]||R[2]>=A[2]||R[1]<=A[1]||R[3]>=A[3])}function xo(R,A,F){let W=R[0]-A[0],te=R[1]-A[1],fe=R[0]-F[0],pe=R[1]-F[1];return W*pe-fe*te==0&&W*fe<=0&&te*pe<=0}function Kl(R,A,F,W){return(te=[W[0]-F[0],W[1]-F[1]])[0]*(fe=[A[0]-R[0],A[1]-R[1]])[1]-te[1]*fe[0]!=0&&!(!Oo(R,A,F,W)||!Oo(F,W,R,A));var te,fe}function Ns(R,A,F){for(let W of F)for(let te=0;te(te=R)[1]!=(pe=Re[Ke+1])[1]>te[1]&&te[0]<(pe[0]-fe[0])*(te[1]-fe[1])/(pe[1]-fe[1])+fe[0]&&(W=!W)}var te,fe,pe;return W}function ac(R,A){for(let F of A)if(Hl(R,F))return!0;return!1}function oa(R,A){for(let F of R)if(!Hl(F,A))return!1;for(let F=0;F0&&Re<0||pe<0&&Re>0}function Ol(R,A,F){let W=[];for(let te=0;teF[2]){let te=.5*W,fe=R[0]-F[0]>te?-W:F[0]-R[0]>te?W:0;fe===0&&(fe=R[0]-F[2]>te?-W:F[2]-R[0]>te?W:0),R[0]+=fe}Vu(A,R)}function rf(R,A,F,W){let te=Math.pow(2,W.z)*bs,fe=[W.x*bs,W.y*bs],pe=[];for(let Re of R)for(let Ke of Re){let ft=[Ke.x+fe[0],Ke.y+fe[1]];Do(ft,A,F,te),pe.push(ft)}return pe}function Vf(R,A,F,W){let te=Math.pow(2,W.z)*bs,fe=[W.x*bs,W.y*bs],pe=[];for(let Ke of R){let ft=[];for(let Rt of Ke){let tr=[Rt.x+fe[0],Rt.y+fe[1]];Vu(A,tr),ft.push(tr)}pe.push(ft)}if(A[2]-A[0]<=te/2){(Re=A)[0]=Re[1]=1/0,Re[2]=Re[3]=-1/0;for(let Ke of pe)for(let ft of Ke)Do(ft,A,F,te)}var Re;return pe}class pl{constructor(A,F){this.type=pt,this.geojson=A,this.geometries=F}static parse(A,F){if(A.length!==2)return F.error(`'within' expression requires exactly one argument, but found ${A.length-1} instead.`);if(yn(A[1])){let W=A[1];if(W.type==="FeatureCollection"){let te=[];for(let fe of W.features){let{type:pe,coordinates:Re}=fe.geometry;pe==="Polygon"&&te.push(Re),pe==="MultiPolygon"&&te.push(...Re)}if(te.length)return new pl(W,{type:"MultiPolygon",coordinates:te})}else if(W.type==="Feature"){let te=W.geometry.type;if(te==="Polygon"||te==="MultiPolygon")return new pl(W,W.geometry)}else if(W.type==="Polygon"||W.type==="MultiPolygon")return new pl(W,W)}return F.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(A){if(A.geometry()!=null&&A.canonicalID()!=null){if(A.geometryType()==="Point")return function(F,W){let te=[1/0,1/0,-1/0,-1/0],fe=[1/0,1/0,-1/0,-1/0],pe=F.canonicalID();if(W.type==="Polygon"){let Re=Ol(W.coordinates,fe,pe),Ke=rf(F.geometry(),te,fe,pe);if(!ql(te,fe))return!1;for(let ft of Ke)if(!Hl(ft,Re))return!1}if(W.type==="MultiPolygon"){let Re=Pc(W.coordinates,fe,pe),Ke=rf(F.geometry(),te,fe,pe);if(!ql(te,fe))return!1;for(let ft of Ke)if(!ac(ft,Re))return!1}return!0}(A,this.geometries);if(A.geometryType()==="LineString")return function(F,W){let te=[1/0,1/0,-1/0,-1/0],fe=[1/0,1/0,-1/0,-1/0],pe=F.canonicalID();if(W.type==="Polygon"){let Re=Ol(W.coordinates,fe,pe),Ke=Vf(F.geometry(),te,fe,pe);if(!ql(te,fe))return!1;for(let ft of Ke)if(!oa(ft,Re))return!1}if(W.type==="MultiPolygon"){let Re=Pc(W.coordinates,fe,pe),Ke=Vf(F.geometry(),te,fe,pe);if(!ql(te,fe))return!1;for(let ft of Ke)if(!qo(ft,Re))return!1}return!0}(A,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Zc=class{constructor(R=[],A=(F,W)=>FW?1:0){if(this.data=R,this.length=this.data.length,this.compare=A,this.length>0)for(let F=(this.length>>1)-1;F>=0;F--)this._down(F)}push(R){this.data.push(R),this._up(this.length++)}pop(){if(this.length===0)return;let R=this.data[0],A=this.data.pop();return--this.length>0&&(this.data[0]=A,this._down(0)),R}peek(){return this.data[0]}_up(R){let{data:A,compare:F}=this,W=A[R];for(;R>0;){let te=R-1>>1,fe=A[te];if(F(W,fe)>=0)break;A[R]=fe,R=te}A[R]=W}_down(R){let{data:A,compare:F}=this,W=this.length>>1,te=A[R];for(;R=0)break;A[R]=A[fe],R=fe}A[R]=te}};function Jl(R,A,F,W,te){qs(R,A,F,W||R.length-1,te||oc)}function qs(R,A,F,W,te){for(;W>F;){if(W-F>600){var fe=W-F+1,pe=A-F+1,Re=Math.log(fe),Ke=.5*Math.exp(2*Re/3),ft=.5*Math.sqrt(Re*Ke*(fe-Ke)/fe)*(pe-fe/2<0?-1:1);qs(R,A,Math.max(F,Math.floor(A-pe*Ke/fe+ft)),Math.min(W,Math.floor(A+(fe-pe)*Ke/fe+ft)),te)}var Rt=R[A],tr=F,ur=W;for(yu(R,F,A),te(R[W],Rt)>0&&yu(R,F,W);tr0;)ur--}te(R[F],Rt)===0?yu(R,F,ur):yu(R,++ur,W),ur<=A&&(F=ur+1),A<=ur&&(W=ur-1)}}function yu(R,A,F){var W=R[A];R[A]=R[F],R[F]=W}function oc(R,A){return RA?1:0}function Cf(R,A){if(R.length<=1)return[R];let F=[],W,te;for(let fe of R){let pe=jh(fe);pe!==0&&(fe.area=Math.abs(pe),te===void 0&&(te=pe<0),te===pe<0?(W&&F.push(W),W=[fe]):W.push(fe))}if(W&&F.push(W),A>1)for(let fe=0;fe1?(ft=A[Ke+1][0],Rt=A[Ke+1][1]):vr>0&&(ft+=tr/this.kx*vr,Rt+=ur/this.ky*vr)),tr=this.wrap(F[0]-ft)*this.kx,ur=(F[1]-Rt)*this.ky;let kr=tr*tr+ur*ur;kr180;)A-=360;return A}}function $l(R,A){return A[0]-R[0]}function fl(R){return R[1]-R[0]+1}function lc(R,A){return R[1]>=R[0]&&R[1]R[1])return[null,null];let F=fl(R);if(A){if(F===2)return[R,null];let te=Math.floor(F/2);return[[R[0],R[0]+te],[R[0]+te,R[1]]]}if(F===1)return[R,null];let W=Math.floor(F/2)-1;return[[R[0],R[0]+W],[R[0]+W+1,R[1]]]}function Es(R,A){if(!lc(A,R.length))return[1/0,1/0,-1/0,-1/0];let F=[1/0,1/0,-1/0,-1/0];for(let W=A[0];W<=A[1];++W)Vu(F,R[W]);return F}function Hs(R){let A=[1/0,1/0,-1/0,-1/0];for(let F of R)for(let W of F)Vu(A,W);return A}function Go(R){return R[0]!==-1/0&&R[1]!==-1/0&&R[2]!==1/0&&R[3]!==1/0}function ps(R,A,F){if(!Go(R)||!Go(A))return NaN;let W=0,te=0;return R[2]A[2]&&(W=R[0]-A[2]),R[1]>A[3]&&(te=R[1]-A[3]),R[3]=W)return W;if(ql(te,fe)){if(sd(R,A))return 0}else if(sd(A,R))return 0;let pe=1/0;for(let Re of R)for(let Ke=0,ft=Re.length,Rt=ft-1;Ke0;){let Ke=pe.pop();if(Ke[0]>=fe)continue;let ft=Ke[1],Rt=A?50:100;if(fl(ft)<=Rt){if(!lc(ft,R.length))return NaN;if(A){let tr=Po(R,ft,F,W);if(isNaN(tr)||tr===0)return tr;fe=Math.min(fe,tr)}else for(let tr=ft[0];tr<=ft[1];++tr){let ur=od(R[tr],F,W);if(fe=Math.min(fe,ur),fe===0)return 0}}else{let tr=Fu(ft,A);Pa(pe,fe,W,R,Re,tr[0]),Pa(pe,fe,W,R,Re,tr[1])}}return fe}function bl(R,A,F,W,te,fe=1/0){let pe=Math.min(fe,te.distance(R[0],F[0]));if(pe===0)return pe;let Re=new Zc([[0,[0,R.length-1],[0,F.length-1]]],$l);for(;Re.length>0;){let Ke=Re.pop();if(Ke[0]>=pe)continue;let ft=Ke[1],Rt=Ke[2],tr=A?50:100,ur=W?50:100;if(fl(ft)<=tr&&fl(Rt)<=ur){if(!lc(ft,R.length)&&lc(Rt,F.length))return NaN;let vr;if(A&&W)vr=Gu(R,ft,F,Rt,te),pe=Math.min(pe,vr);else if(A&&!W){let kr=R.slice(ft[0],ft[1]+1);for(let Dr=Rt[0];Dr<=Rt[1];++Dr)if(vr=uc(F[Dr],kr,te),pe=Math.min(pe,vr),pe===0)return pe}else if(!A&&W){let kr=F.slice(Rt[0],Rt[1]+1);for(let Dr=ft[0];Dr<=ft[1];++Dr)if(vr=uc(R[Dr],kr,te),pe=Math.min(pe,vr),pe===0)return pe}else vr=Os(R,ft,F,Rt,te),pe=Math.min(pe,vr)}else{let vr=Fu(ft,A),kr=Fu(Rt,W);af(Re,pe,te,R,F,vr[0],kr[0]),af(Re,pe,te,R,F,vr[0],kr[1]),af(Re,pe,te,R,F,vr[1],kr[0]),af(Re,pe,te,R,F,vr[1],kr[1])}}return pe}function Hf(R){return R.type==="MultiPolygon"?R.coordinates.map(A=>({type:"Polygon",coordinates:A})):R.type==="MultiLineString"?R.coordinates.map(A=>({type:"LineString",coordinates:A})):R.type==="MultiPoint"?R.coordinates.map(A=>({type:"Point",coordinates:A})):[R]}class Ic{constructor(A,F){this.type=dt,this.geojson=A,this.geometries=F}static parse(A,F){if(A.length!==2)return F.error(`'distance' expression requires exactly one argument, but found ${A.length-1} instead.`);if(yn(A[1])){let W=A[1];if(W.type==="FeatureCollection")return new Ic(W,W.features.map(te=>Hf(te.geometry)).flat());if(W.type==="Feature")return new Ic(W,Hf(W.geometry));if("type"in W&&"coordinates"in W)return new Ic(W,Hf(W))}return F.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(A){if(A.geometry()!=null&&A.canonicalID()!=null){if(A.geometryType()==="Point")return function(F,W){let te=F.geometry(),fe=te.flat().map(Ke=>_a([Ke.x,Ke.y],F.canonical));if(te.length===0)return NaN;let pe=new Gf(fe[0][1]),Re=1/0;for(let Ke of W){switch(Ke.type){case"Point":Re=Math.min(Re,bl(fe,!1,[Ke.coordinates],!1,pe,Re));break;case"LineString":Re=Math.min(Re,bl(fe,!1,Ke.coordinates,!0,pe,Re));break;case"Polygon":Re=Math.min(Re,Hu(fe,!1,Ke.coordinates,pe,Re))}if(Re===0)return Re}return Re}(A,this.geometries);if(A.geometryType()==="LineString")return function(F,W){let te=F.geometry(),fe=te.flat().map(Ke=>_a([Ke.x,Ke.y],F.canonical));if(te.length===0)return NaN;let pe=new Gf(fe[0][1]),Re=1/0;for(let Ke of W){switch(Ke.type){case"Point":Re=Math.min(Re,bl(fe,!0,[Ke.coordinates],!1,pe,Re));break;case"LineString":Re=Math.min(Re,bl(fe,!0,Ke.coordinates,!0,pe,Re));break;case"Polygon":Re=Math.min(Re,Hu(fe,!0,Ke.coordinates,pe,Re))}if(Re===0)return Re}return Re}(A,this.geometries);if(A.geometryType()==="Polygon")return function(F,W){let te=F.geometry();if(te.length===0||te[0].length===0)return NaN;let fe=Cf(te,0).map(Ke=>Ke.map(ft=>ft.map(Rt=>_a([Rt.x,Rt.y],F.canonical)))),pe=new Gf(fe[0][0][0][1]),Re=1/0;for(let Ke of W)for(let ft of fe){switch(Ke.type){case"Point":Re=Math.min(Re,Hu([Ke.coordinates],!1,ft,pe,Re));break;case"LineString":Re=Math.min(Re,Hu(Ke.coordinates,!0,ft,pe,Re));break;case"Polygon":Re=Math.min(Re,Ko(ft,Ke.coordinates,pe,Re))}if(Re===0)return Re}return Re}(A,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}let yf={"==":us,"!=":il,">":cl,"<":As,">=":zs,"<=":Ks,array:Fa,at:Ar,boolean:Fa,case:Sn,coalesce:Fs,collator:Io,format:Yl,image:Su,in:Jr,"index-of":hi,interpolate:ko,"interpolate-hcl":ko,"interpolate-lab":ko,length:nc,let:Gn,literal:ua,match:hn,number:Fa,"number-format":ls,object:Fa,slice:En,step:_n,string:Fa,"to-boolean":da,"to-color":da,"to-number":da,"to-string":da,var:Ct,within:pl,distance:Ic};class Bl{constructor(A,F,W,te){this.name=A,this.type=F,this._evaluate=W,this.args=te}evaluate(A){return this._evaluate(A,this.args)}eachChild(A){this.args.forEach(A)}outputDefined(){return!1}static parse(A,F){let W=A[0],te=Bl.definitions[W];if(!te)return F.error(`Unknown expression "${W}". If you wanted a literal array, use ["literal", [...]].`,0);let fe=Array.isArray(te)?te[0]:te.type,pe=Array.isArray(te)?[[te[1],te[2]]]:te.overloads,Re=pe.filter(([ft])=>!Array.isArray(ft)||ft.length===A.length-1),Ke=null;for(let[ft,Rt]of Re){Ke=new vo(F.registry,eh,F.path,null,F.scope);let tr=[],ur=!1;for(let vr=1;vr{return ur=tr,Array.isArray(ur)?`(${ur.map(Je).join(", ")})`:`(${Je(ur.type)}...)`;var ur}).join(" | "),Rt=[];for(let tr=1;tr{F=A?F&&eh(W):F&&W instanceof ua}),!!F&&th(R)&&jf(R,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function th(R){if(R instanceof Bl&&(R.name==="get"&&R.args.length===1||R.name==="feature-state"||R.name==="has"&&R.args.length===1||R.name==="properties"||R.name==="geometry-type"||R.name==="id"||/^filter-/.test(R.name))||R instanceof pl||R instanceof Ic)return!1;let A=!0;return R.eachChild(F=>{A&&!th(F)&&(A=!1)}),A}function ju(R){if(R instanceof Bl&&R.name==="feature-state")return!1;let A=!0;return R.eachChild(F=>{A&&!ju(F)&&(A=!1)}),A}function jf(R,A){if(R instanceof Bl&&A.indexOf(R.name)>=0)return!1;let F=!0;return R.eachChild(W=>{F&&!jf(W,A)&&(F=!1)}),F}function cc(R){return{result:"success",value:R}}function of(R){return{result:"error",value:R}}function Nl(R){return R["property-type"]==="data-driven"||R["property-type"]==="cross-faded-data-driven"}function Kc(R){return!!R.expression&&R.expression.parameters.indexOf("zoom")>-1}function Rc(R){return!!R.expression&&R.expression.interpolated}function gs(R){return R instanceof Number?"number":R instanceof String?"string":R instanceof Boolean?"boolean":Array.isArray(R)?"array":R===null?"null":typeof R}function Wf(R){return typeof R=="object"&&R!==null&&!Array.isArray(R)}function Wh(R){return R}function rh(R,A){let F=A.type==="color",W=R.stops&&typeof R.stops[0][0]=="object",te=W||!(W||R.property!==void 0),fe=R.type||(Rc(A)?"exponential":"interval");if(F||A.type==="padding"){let Rt=F?ir.parse:$r.parse;(R=Ae({},R)).stops&&(R.stops=R.stops.map(tr=>[tr[0],Rt(tr[1])])),R.default=Rt(R.default?R.default:A.default)}if(R.colorSpace&&(pe=R.colorSpace)!=="rgb"&&pe!=="hcl"&&pe!=="lab")throw new Error(`Unknown color space: "${R.colorSpace}"`);var pe;let Re,Ke,ft;if(fe==="exponential")Re=ih;else if(fe==="interval")Re=Mu;else if(fe==="categorical"){Re=Sh,Ke=Object.create(null);for(let Rt of R.stops)Ke[Rt[0]]=Rt[1];ft=typeof R.stops[0][0]}else{if(fe!=="identity")throw new Error(`Unknown function type "${fe}"`);Re=js}if(W){let Rt={},tr=[];for(let kr=0;krkr[0]),evaluate:({zoom:kr},Dr)=>ih({stops:ur,base:R.base},A,kr).evaluate(kr,Dr)}}if(te){let Rt=fe==="exponential"?{name:"exponential",base:R.base!==void 0?R.base:1}:null;return{kind:"camera",interpolationType:Rt,interpolationFactor:ko.interpolationFactor.bind(void 0,Rt),zoomStops:R.stops.map(tr=>tr[0]),evaluate:({zoom:tr})=>Re(R,A,tr,Ke,ft)}}return{kind:"source",evaluate(Rt,tr){let ur=tr&&tr.properties?tr.properties[R.property]:void 0;return ur===void 0?sf(R.default,A.default):Re(R,A,ur,Ke,ft)}}}function sf(R,A,F){return R!==void 0?R:A!==void 0?A:F!==void 0?F:void 0}function Sh(R,A,F,W,te){return sf(typeof F===te?W[F]:void 0,R.default,A.default)}function Mu(R,A,F){if(gs(F)!=="number")return sf(R.default,A.default);let W=R.stops.length;if(W===1||F<=R.stops[0][0])return R.stops[0][1];if(F>=R.stops[W-1][0])return R.stops[W-1][1];let te=ki(R.stops.map(fe=>fe[0]),F);return R.stops[te][1]}function ih(R,A,F){let W=R.base!==void 0?R.base:1;if(gs(F)!=="number")return sf(R.default,A.default);let te=R.stops.length;if(te===1||F<=R.stops[0][0])return R.stops[0][1];if(F>=R.stops[te-1][0])return R.stops[te-1][1];let fe=ki(R.stops.map(Rt=>Rt[0]),F),pe=function(Rt,tr,ur,vr){let kr=vr-ur,Dr=Rt-ur;return kr===0?0:tr===1?Dr/kr:(Math.pow(tr,Dr)-1)/(Math.pow(tr,kr)-1)}(F,W,R.stops[fe][0],R.stops[fe+1][0]),Re=R.stops[fe][1],Ke=R.stops[fe+1][1],ft=Lo[A.type]||Wh;return typeof Re.evaluate=="function"?{evaluate(...Rt){let tr=Re.evaluate.apply(void 0,Rt),ur=Ke.evaluate.apply(void 0,Rt);if(tr!==void 0&&ur!==void 0)return ft(tr,ur,pe,R.colorSpace)}}:ft(Re,Ke,pe,R.colorSpace)}function js(R,A,F){switch(A.type){case"color":F=ir.parse(F);break;case"formatted":F=ti.fromString(F.toString());break;case"resolvedImage":F=en.fromString(F.toString());break;case"padding":F=$r.parse(F);break;default:gs(F)===A.type||A.type==="enum"&&A.values[F]||(F=void 0)}return sf(F,R.default,A.default)}Bl.register(yf,{error:[{kind:"error"},[Et],(R,[A])=>{throw new ma(A.evaluate(R))}],typeof:[Et,[_r],(R,[A])=>Je(Mn(A.evaluate(R)))],"to-rgba":[Ge(dt,4),[Xt],(R,[A])=>{let[F,W,te,fe]=A.evaluate(R).rgb;return[255*F,255*W,255*te,fe]}],rgb:[Xt,[dt,dt,dt],Ah],rgba:[Xt,[dt,dt,dt,dt],Ah],has:{type:pt,overloads:[[[Et],(R,[A])=>Qf(A.evaluate(R),R.properties())],[[Et,or],(R,[A,F])=>Qf(A.evaluate(R),F.evaluate(R))]]},get:{type:_r,overloads:[[[Et],(R,[A])=>_f(A.evaluate(R),R.properties())],[[Et,or],(R,[A,F])=>_f(A.evaluate(R),F.evaluate(R))]]},"feature-state":[_r,[Et],(R,[A])=>_f(A.evaluate(R),R.featureState||{})],properties:[or,[],R=>R.properties()],"geometry-type":[Et,[],R=>R.geometryType()],id:[_r,[],R=>R.id()],zoom:[dt,[],R=>R.globals.zoom],"heatmap-density":[dt,[],R=>R.globals.heatmapDensity||0],"line-progress":[dt,[],R=>R.globals.lineProgress||0],accumulated:[_r,[],R=>R.globals.accumulated===void 0?null:R.globals.accumulated],"+":[dt,Yc(dt),(R,A)=>{let F=0;for(let W of A)F+=W.evaluate(R);return F}],"*":[dt,Yc(dt),(R,A)=>{let F=1;for(let W of A)F*=W.evaluate(R);return F}],"-":{type:dt,overloads:[[[dt,dt],(R,[A,F])=>A.evaluate(R)-F.evaluate(R)],[[dt],(R,[A])=>-A.evaluate(R)]]},"/":[dt,[dt,dt],(R,[A,F])=>A.evaluate(R)/F.evaluate(R)],"%":[dt,[dt,dt],(R,[A,F])=>A.evaluate(R)%F.evaluate(R)],ln2:[dt,[],()=>Math.LN2],pi:[dt,[],()=>Math.PI],e:[dt,[],()=>Math.E],"^":[dt,[dt,dt],(R,[A,F])=>Math.pow(A.evaluate(R),F.evaluate(R))],sqrt:[dt,[dt],(R,[A])=>Math.sqrt(A.evaluate(R))],log10:[dt,[dt],(R,[A])=>Math.log(A.evaluate(R))/Math.LN10],ln:[dt,[dt],(R,[A])=>Math.log(A.evaluate(R))],log2:[dt,[dt],(R,[A])=>Math.log(A.evaluate(R))/Math.LN2],sin:[dt,[dt],(R,[A])=>Math.sin(A.evaluate(R))],cos:[dt,[dt],(R,[A])=>Math.cos(A.evaluate(R))],tan:[dt,[dt],(R,[A])=>Math.tan(A.evaluate(R))],asin:[dt,[dt],(R,[A])=>Math.asin(A.evaluate(R))],acos:[dt,[dt],(R,[A])=>Math.acos(A.evaluate(R))],atan:[dt,[dt],(R,[A])=>Math.atan(A.evaluate(R))],min:[dt,Yc(dt),(R,A)=>Math.min(...A.map(F=>F.evaluate(R)))],max:[dt,Yc(dt),(R,A)=>Math.max(...A.map(F=>F.evaluate(R)))],abs:[dt,[dt],(R,[A])=>Math.abs(A.evaluate(R))],round:[dt,[dt],(R,[A])=>{let F=A.evaluate(R);return F<0?-Math.round(-F):Math.round(F)}],floor:[dt,[dt],(R,[A])=>Math.floor(A.evaluate(R))],ceil:[dt,[dt],(R,[A])=>Math.ceil(A.evaluate(R))],"filter-==":[pt,[Et,_r],(R,[A,F])=>R.properties()[A.value]===F.value],"filter-id-==":[pt,[_r],(R,[A])=>R.id()===A.value],"filter-type-==":[pt,[Et],(R,[A])=>R.geometryType()===A.value],"filter-<":[pt,[Et,_r],(R,[A,F])=>{let W=R.properties()[A.value],te=F.value;return typeof W==typeof te&&W{let F=R.id(),W=A.value;return typeof F==typeof W&&F":[pt,[Et,_r],(R,[A,F])=>{let W=R.properties()[A.value],te=F.value;return typeof W==typeof te&&W>te}],"filter-id->":[pt,[_r],(R,[A])=>{let F=R.id(),W=A.value;return typeof F==typeof W&&F>W}],"filter-<=":[pt,[Et,_r],(R,[A,F])=>{let W=R.properties()[A.value],te=F.value;return typeof W==typeof te&&W<=te}],"filter-id-<=":[pt,[_r],(R,[A])=>{let F=R.id(),W=A.value;return typeof F==typeof W&&F<=W}],"filter->=":[pt,[Et,_r],(R,[A,F])=>{let W=R.properties()[A.value],te=F.value;return typeof W==typeof te&&W>=te}],"filter-id->=":[pt,[_r],(R,[A])=>{let F=R.id(),W=A.value;return typeof F==typeof W&&F>=W}],"filter-has":[pt,[_r],(R,[A])=>A.value in R.properties()],"filter-has-id":[pt,[],R=>R.id()!==null&&R.id()!==void 0],"filter-type-in":[pt,[Ge(Et)],(R,[A])=>A.value.indexOf(R.geometryType())>=0],"filter-id-in":[pt,[Ge(_r)],(R,[A])=>A.value.indexOf(R.id())>=0],"filter-in-small":[pt,[Et,Ge(_r)],(R,[A,F])=>F.value.indexOf(R.properties()[A.value])>=0],"filter-in-large":[pt,[Et,Ge(_r)],(R,[A,F])=>function(W,te,fe,pe){for(;fe<=pe;){let Re=fe+pe>>1;if(te[Re]===W)return!0;te[Re]>W?pe=Re-1:fe=Re+1}return!1}(R.properties()[A.value],F.value,0,F.value.length-1)],all:{type:pt,overloads:[[[pt,pt],(R,[A,F])=>A.evaluate(R)&&F.evaluate(R)],[Yc(pt),(R,A)=>{for(let F of A)if(!F.evaluate(R))return!1;return!0}]]},any:{type:pt,overloads:[[[pt,pt],(R,[A,F])=>A.evaluate(R)||F.evaluate(R)],[Yc(pt),(R,A)=>{for(let F of A)if(F.evaluate(R))return!0;return!1}]]},"!":[pt,[pt],(R,[A])=>!A.evaluate(R)],"is-supported-script":[pt,[Et],(R,[A])=>{let F=R.globals&&R.globals.isSupportedScript;return!F||F(A.evaluate(R))}],upcase:[Et,[Et],(R,[A])=>A.evaluate(R).toUpperCase()],downcase:[Et,[Et],(R,[A])=>A.evaluate(R).toLowerCase()],concat:[Et,Yc(_r),(R,A)=>A.map(F=>Ba(F.evaluate(R))).join("")],"resolved-locale":[Et,[Er],(R,[A])=>A.evaluate(R).resolvedLocale()]});class Eu{constructor(A,F){var W;this.expression=A,this._warningHistory={},this._evaluator=new Ha,this._defaultValue=F?(W=F).type==="color"&&Wf(W.default)?new ir(0,0,0,0):W.type==="color"?ir.parse(W.default)||null:W.type==="padding"?$r.parse(W.default)||null:W.type==="variableAnchorOffsetCollection"?Zi.parse(W.default)||null:W.default===void 0?null:W.default:null,this._enumValues=F&&F.type==="enum"?F.values:null}evaluateWithoutErrorHandling(A,F,W,te,fe,pe){return this._evaluator.globals=A,this._evaluator.feature=F,this._evaluator.featureState=W,this._evaluator.canonical=te,this._evaluator.availableImages=fe||null,this._evaluator.formattedSection=pe,this.expression.evaluate(this._evaluator)}evaluate(A,F,W,te,fe,pe){this._evaluator.globals=A,this._evaluator.feature=F||null,this._evaluator.featureState=W||null,this._evaluator.canonical=te,this._evaluator.availableImages=fe||null,this._evaluator.formattedSection=pe||null;try{let Re=this.expression.evaluate(this._evaluator);if(Re==null||typeof Re=="number"&&Re!=Re)return this._defaultValue;if(this._enumValues&&!(Re in this._enumValues))throw new ma(`Expected value to be one of ${Object.keys(this._enumValues).map(Ke=>JSON.stringify(Ke)).join(", ")}, but found ${JSON.stringify(Re)} instead.`);return Re}catch(Re){return this._warningHistory[Re.message]||(this._warningHistory[Re.message]=!0,typeof console!="undefined"&&console.warn(Re.message)),this._defaultValue}}}function Dc(R){return Array.isArray(R)&&R.length>0&&typeof R[0]=="string"&&R[0]in yf}function ks(R,A){let F=new vo(yf,eh,[],A?function(te){let fe={color:Xt,string:Et,number:dt,enum:Et,boolean:pt,formatted:ei,padding:qr,resolvedImage:jr,variableAnchorOffsetCollection:gt};return te.type==="array"?Ge(fe[te.value]||_r,te.length):fe[te.type]}(A):void 0),W=F.parse(R,void 0,void 0,void 0,A&&A.type==="string"?{typeAnnotation:"coerce"}:void 0);return W?cc(new Eu(W,A)):of(F.errors)}class bc{constructor(A,F){this.kind=A,this._styleExpression=F,this.isStateDependent=A!=="constant"&&!ju(F.expression)}evaluateWithoutErrorHandling(A,F,W,te,fe,pe){return this._styleExpression.evaluateWithoutErrorHandling(A,F,W,te,fe,pe)}evaluate(A,F,W,te,fe,pe){return this._styleExpression.evaluate(A,F,W,te,fe,pe)}}class hu{constructor(A,F,W,te){this.kind=A,this.zoomStops=W,this._styleExpression=F,this.isStateDependent=A!=="camera"&&!ju(F.expression),this.interpolationType=te}evaluateWithoutErrorHandling(A,F,W,te,fe,pe){return this._styleExpression.evaluateWithoutErrorHandling(A,F,W,te,fe,pe)}evaluate(A,F,W,te,fe,pe){return this._styleExpression.evaluate(A,F,W,te,fe,pe)}interpolationFactor(A,F,W){return this.interpolationType?ko.interpolationFactor(this.interpolationType,A,F,W):0}}function _u(R,A){let F=ks(R,A);if(F.result==="error")return F;let W=F.value.expression,te=th(W);if(!te&&!Nl(A))return of([new rt("","data expressions not supported")]);let fe=jf(W,["zoom"]);if(!fe&&!Kc(A))return of([new rt("","zoom expressions not supported")]);let pe=nh(W);return pe||fe?pe instanceof rt?of([pe]):pe instanceof ko&&!Rc(A)?of([new rt("",'"interpolate" expressions cannot be used with this property')]):cc(pe?new hu(te?"camera":"composite",F.value,pe.labels,pe instanceof ko?pe.interpolation:void 0):new bc(te?"constant":"source",F.value)):of([new rt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class nl{constructor(A,F){this._parameters=A,this._specification=F,Ae(this,rh(this._parameters,this._specification))}static deserialize(A){return new nl(A._parameters,A._specification)}static serialize(A){return{_parameters:A._parameters,_specification:A._specification}}}function nh(R){let A=null;if(R instanceof Gn)A=nh(R.result);else if(R instanceof Fs){for(let F of R.args)if(A=nh(F),A)break}else(R instanceof _n||R instanceof ko)&&R.input instanceof Bl&&R.input.name==="zoom"&&(A=R);return A instanceof rt||R.eachChild(F=>{let W=nh(F);W instanceof rt?A=W:!A&&W?A=new rt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):A&&W&&A!==W&&(A=new rt("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),A}function Mh(R){if(R===!0||R===!1)return!0;if(!Array.isArray(R)||R.length===0)return!1;switch(R[0]){case"has":return R.length>=2&&R[1]!=="$id"&&R[1]!=="$type";case"in":return R.length>=3&&(typeof R[1]!="string"||Array.isArray(R[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return R.length!==3||Array.isArray(R[1])||Array.isArray(R[2]);case"any":case"all":for(let A of R.slice(1))if(!Mh(A)&&typeof A!="boolean")return!1;return!0;default:return!0}}let zu={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Fc(R){if(R==null)return{filter:()=>!0,needGeometry:!1};Mh(R)||(R=xf(R));let A=ks(R,zu);if(A.result==="error")throw new Error(A.value.map(F=>`${F.key}: ${F.message}`).join(", "));return{filter:(F,W,te)=>A.value.evaluate(F,W,{},te),needGeometry:bd(R)}}function wc(R,A){return RA?1:0}function bd(R){if(!Array.isArray(R))return!1;if(R[0]==="within"||R[0]==="distance")return!0;for(let A=1;A"||A==="<="||A===">="?Pf(R[1],R[2],A):A==="any"?(F=R.slice(1),["any"].concat(F.map(xf))):A==="all"?["all"].concat(R.slice(1).map(xf)):A==="none"?["all"].concat(R.slice(1).map(xf).map(jl)):A==="in"?qu(R[1],R.slice(2)):A==="!in"?jl(qu(R[1],R.slice(2))):A==="has"?bf(R[1]):A!=="!has"||jl(bf(R[1]));var F}function Pf(R,A,F){switch(R){case"$type":return[`filter-type-${F}`,A];case"$id":return[`filter-id-${F}`,A];default:return[`filter-${F}`,R,A]}}function qu(R,A){if(A.length===0)return!1;switch(R){case"$type":return["filter-type-in",["literal",A]];case"$id":return["filter-id-in",["literal",A]];default:return A.length>200&&!A.some(F=>typeof F!=typeof A[0])?["filter-in-large",R,["literal",A.sort(wc)]]:["filter-in-small",R,["literal",A]]}}function bf(R){switch(R){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",R]}}function jl(R){return["!",R]}function lf(R){let A=typeof R;if(A==="number"||A==="boolean"||A==="string"||R==null)return JSON.stringify(R);if(Array.isArray(R)){let te="[";for(let fe of R)te+=`${lf(fe)},`;return`${te}]`}let F=Object.keys(R).sort(),W="{";for(let te=0;teW.maximum?[new Ue(A,F,`${F} is greater than the maximum value ${W.maximum}`)]:[]}function wf(R){let A=R.valueSpec,F=Cs(R.value.type),W,te,fe,pe={},Re=F!=="categorical"&&R.value.property===void 0,Ke=!Re,ft=gs(R.value.stops)==="array"&&gs(R.value.stops[0])==="array"&&gs(R.value.stops[0][0])==="object",Rt=ku({key:R.key,value:R.value,valueSpec:R.styleSpec.function,validateSpec:R.validateSpec,style:R.style,styleSpec:R.styleSpec,objectElementValidators:{stops:function(vr){if(F==="identity")return[new Ue(vr.key,vr.value,'identity function may not have a "stops" property')];let kr=[],Dr=vr.value;return kr=kr.concat(Xf({key:vr.key,value:Dr,valueSpec:vr.valueSpec,validateSpec:vr.validateSpec,style:vr.style,styleSpec:vr.styleSpec,arrayElementValidator:tr})),gs(Dr)==="array"&&Dr.length===0&&kr.push(new Ue(vr.key,Dr,"array must have at least one stop")),kr},default:function(vr){return vr.validateSpec({key:vr.key,value:vr.value,valueSpec:A,validateSpec:vr.validateSpec,style:vr.style,styleSpec:vr.styleSpec})}}});return F==="identity"&&Re&&Rt.push(new Ue(R.key,R.value,'missing required property "property"')),F==="identity"||R.value.stops||Rt.push(new Ue(R.key,R.value,'missing required property "stops"')),F==="exponential"&&R.valueSpec.expression&&!Rc(R.valueSpec)&&Rt.push(new Ue(R.key,R.value,"exponential functions not supported")),R.styleSpec.$version>=8&&(Ke&&!Nl(R.valueSpec)?Rt.push(new Ue(R.key,R.value,"property functions not supported")):Re&&!Kc(R.valueSpec)&&Rt.push(new Ue(R.key,R.value,"zoom functions not supported"))),F!=="categorical"&&!ft||R.value.property!==void 0||Rt.push(new Ue(R.key,R.value,'"property" property is required')),Rt;function tr(vr){let kr=[],Dr=vr.value,li=vr.key;if(gs(Dr)!=="array")return[new Ue(li,Dr,`array expected, ${gs(Dr)} found`)];if(Dr.length!==2)return[new Ue(li,Dr,`array length 2 expected, length ${Dr.length} found`)];if(ft){if(gs(Dr[0])!=="object")return[new Ue(li,Dr,`object expected, ${gs(Dr[0])} found`)];if(Dr[0].zoom===void 0)return[new Ue(li,Dr,"object stop key must have zoom")];if(Dr[0].value===void 0)return[new Ue(li,Dr,"object stop key must have value")];if(fe&&fe>Cs(Dr[0].zoom))return[new Ue(li,Dr[0].zoom,"stop zoom values must appear in ascending order")];Cs(Dr[0].zoom)!==fe&&(fe=Cs(Dr[0].zoom),te=void 0,pe={}),kr=kr.concat(ku({key:`${li}[0]`,value:Dr[0],valueSpec:{zoom:{}},validateSpec:vr.validateSpec,style:vr.style,styleSpec:vr.styleSpec,objectElementValidators:{zoom:Us,value:ur}}))}else kr=kr.concat(ur({key:`${li}[0]`,value:Dr[0],valueSpec:{},validateSpec:vr.validateSpec,style:vr.style,styleSpec:vr.styleSpec},Dr));return Dc(du(Dr[1]))?kr.concat([new Ue(`${li}[1]`,Dr[1],"expressions are not allowed in function stops.")]):kr.concat(vr.validateSpec({key:`${li}[1]`,value:Dr[1],valueSpec:A,validateSpec:vr.validateSpec,style:vr.style,styleSpec:vr.styleSpec}))}function ur(vr,kr){let Dr=gs(vr.value),li=Cs(vr.value),pi=vr.value!==null?vr.value:kr;if(W){if(Dr!==W)return[new Ue(vr.key,pi,`${Dr} stop domain type must match previous stop domain type ${W}`)]}else W=Dr;if(Dr!=="number"&&Dr!=="string"&&Dr!=="boolean")return[new Ue(vr.key,pi,"stop domain value must be a number, string, or boolean")];if(Dr!=="number"&&F!=="categorical"){let vn=`number expected, ${Dr} found`;return Nl(A)&&F===void 0&&(vn+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Ue(vr.key,pi,vn)]}return F!=="categorical"||Dr!=="number"||isFinite(li)&&Math.floor(li)===li?F!=="categorical"&&Dr==="number"&&te!==void 0&&linew Ue(`${R.key}${W.key}`,R.value,W.message));let F=A.value.expression||A.value._styleExpression.expression;if(R.expressionContext==="property"&&R.propertyKey==="text-font"&&!F.outputDefined())return[new Ue(R.key,R.value,`Invalid data expression for "${R.propertyKey}". Output values must be contained as literals within the expression.`)];if(R.expressionContext==="property"&&R.propertyType==="layout"&&!ju(F))return[new Ue(R.key,R.value,'"feature-state" data expressions are not supported with layout properties.')];if(R.expressionContext==="filter"&&!ju(F))return[new Ue(R.key,R.value,'"feature-state" data expressions are not supported with filters.')];if(R.expressionContext&&R.expressionContext.indexOf("cluster")===0){if(!jf(F,["zoom","feature-state"]))return[new Ue(R.key,R.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(R.expressionContext==="cluster-initial"&&!th(F))return[new Ue(R.key,R.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Wu(R){let A=R.key,F=R.value,W=R.valueSpec,te=[];return Array.isArray(W.values)?W.values.indexOf(Cs(F))===-1&&te.push(new Ue(A,F,`expected one of [${W.values.join(", ")}], ${JSON.stringify(F)} found`)):Object.keys(W.values).indexOf(Cs(F))===-1&&te.push(new Ue(A,F,`expected one of [${Object.keys(W.values).join(", ")}], ${JSON.stringify(F)} found`)),te}function Rf(R){return Mh(du(R.value))?zc(Ae({},R,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Xu(R)}function Xu(R){let A=R.value,F=R.key;if(gs(A)!=="array")return[new Ue(F,A,`array expected, ${gs(A)} found`)];let W=R.styleSpec,te,fe=[];if(A.length<1)return[new Ue(F,A,"filter array must have at least 1 element")];switch(fe=fe.concat(Wu({key:`${F}[0]`,value:A[0],valueSpec:W.filter_operator,style:R.style,styleSpec:R.styleSpec})),Cs(A[0])){case"<":case"<=":case">":case">=":A.length>=2&&Cs(A[1])==="$type"&&fe.push(new Ue(F,A,`"$type" cannot be use with operator "${A[0]}"`));case"==":case"!=":A.length!==3&&fe.push(new Ue(F,A,`filter array for operator "${A[0]}" must have 3 elements`));case"in":case"!in":A.length>=2&&(te=gs(A[1]),te!=="string"&&fe.push(new Ue(`${F}[1]`,A[1],`string expected, ${te} found`)));for(let pe=2;pe{ft in F&&A.push(new Ue(W,F[ft],`"${ft}" is prohibited for ref layers`))}),te.layers.forEach(ft=>{Cs(ft.id)===Re&&(Ke=ft)}),Ke?Ke.ref?A.push(new Ue(W,F.ref,"ref cannot reference another ref layer")):pe=Cs(Ke.type):A.push(new Ue(W,F.ref,`ref layer "${Re}" not found`))}else if(pe!=="background")if(F.source){let Ke=te.sources&&te.sources[F.source],ft=Ke&&Cs(Ke.type);Ke?ft==="vector"&&pe==="raster"?A.push(new Ue(W,F.source,`layer "${F.id}" requires a raster source`)):ft!=="raster-dem"&&pe==="hillshade"?A.push(new Ue(W,F.source,`layer "${F.id}" requires a raster-dem source`)):ft==="raster"&&pe!=="raster"?A.push(new Ue(W,F.source,`layer "${F.id}" requires a vector source`)):ft!=="vector"||F["source-layer"]?ft==="raster-dem"&&pe!=="hillshade"?A.push(new Ue(W,F.source,"raster-dem source can only be used with layer type 'hillshade'.")):pe!=="line"||!F.paint||!F.paint["line-gradient"]||ft==="geojson"&&Ke.lineMetrics||A.push(new Ue(W,F,`layer "${F.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):A.push(new Ue(W,F,`layer "${F.id}" must specify a "source-layer"`)):A.push(new Ue(W,F.source,`source "${F.source}" not found`))}else A.push(new Ue(W,F,'missing required property "source"'));return A=A.concat(ku({key:W,value:F,valueSpec:fe.layer,style:R.style,styleSpec:R.styleSpec,validateSpec:R.validateSpec,objectElementValidators:{"*":()=>[],type:()=>R.validateSpec({key:`${W}.type`,value:F.type,valueSpec:fe.layer.type,style:R.style,styleSpec:R.styleSpec,validateSpec:R.validateSpec,object:F,objectKey:"type"}),filter:Rf,layout:Ke=>ku({layer:F,key:Ke.key,value:Ke.value,style:Ke.style,styleSpec:Ke.styleSpec,validateSpec:Ke.validateSpec,objectElementValidators:{"*":ft=>Wl(Ae({layerType:pe},ft))}}),paint:Ke=>ku({layer:F,key:Ke.key,value:Ke.value,style:Ke.style,styleSpec:Ke.styleSpec,validateSpec:Ke.validateSpec,objectElementValidators:{"*":ft=>Zf(Ae({layerType:pe},ft))}})}})),A}function Zu(R){let A=R.value,F=R.key,W=gs(A);return W!=="string"?[new Ue(F,A,`string expected, ${W} found`)]:[]}let qc={promoteId:function({key:R,value:A}){if(gs(A)==="string")return Zu({key:R,value:A});{let F=[];for(let W in A)F.push(...Zu({key:`${R}.${W}`,value:A[W]}));return F}}};function Tc(R){let A=R.value,F=R.key,W=R.styleSpec,te=R.style,fe=R.validateSpec;if(!A.type)return[new Ue(F,A,'"type" is required')];let pe=Cs(A.type),Re;switch(pe){case"vector":case"raster":return Re=ku({key:F,value:A,valueSpec:W[`source_${pe.replace("-","_")}`],style:R.style,styleSpec:W,objectElementValidators:qc,validateSpec:fe}),Re;case"raster-dem":return Re=function(Ke){var ft;let Rt=(ft=Ke.sourceName)!==null&&ft!==void 0?ft:"",tr=Ke.value,ur=Ke.styleSpec,vr=ur.source_raster_dem,kr=Ke.style,Dr=[],li=gs(tr);if(tr===void 0)return Dr;if(li!=="object")return Dr.push(new Ue("source_raster_dem",tr,`object expected, ${li} found`)),Dr;let pi=Cs(tr.encoding)==="custom",vn=["redFactor","greenFactor","blueFactor","baseShift"],zi=Ke.value.encoding?`"${Ke.value.encoding}"`:"Default";for(let ln in tr)!pi&&vn.includes(ln)?Dr.push(new Ue(ln,tr[ln],`In "${Rt}": "${ln}" is only valid when "encoding" is set to "custom". ${zi} encoding found`)):vr[ln]?Dr=Dr.concat(Ke.validateSpec({key:ln,value:tr[ln],valueSpec:vr[ln],validateSpec:Ke.validateSpec,style:kr,styleSpec:ur})):Dr.push(new Ue(ln,tr[ln],`unknown property "${ln}"`));return Dr}({sourceName:F,value:A,style:R.style,styleSpec:W,validateSpec:fe}),Re;case"geojson":if(Re=ku({key:F,value:A,valueSpec:W.source_geojson,style:te,styleSpec:W,validateSpec:fe,objectElementValidators:qc}),A.cluster)for(let Ke in A.clusterProperties){let[ft,Rt]=A.clusterProperties[Ke],tr=typeof ft=="string"?[ft,["accumulated"],["get",Ke]]:ft;Re.push(...zc({key:`${F}.${Ke}.map`,value:Rt,validateSpec:fe,expressionContext:"cluster-map"})),Re.push(...zc({key:`${F}.${Ke}.reduce`,value:tr,validateSpec:fe,expressionContext:"cluster-reduce"}))}return Re;case"video":return ku({key:F,value:A,valueSpec:W.source_video,style:te,validateSpec:fe,styleSpec:W});case"image":return ku({key:F,value:A,valueSpec:W.source_image,style:te,validateSpec:fe,styleSpec:W});case"canvas":return[new Ue(F,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Wu({key:`${F}.type`,value:A.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:te,validateSpec:fe,styleSpec:W})}}function wl(R){let A=R.value,F=R.styleSpec,W=F.light,te=R.style,fe=[],pe=gs(A);if(A===void 0)return fe;if(pe!=="object")return fe=fe.concat([new Ue("light",A,`object expected, ${pe} found`)]),fe;for(let Re in A){let Ke=Re.match(/^(.*)-transition$/);fe=fe.concat(Ke&&W[Ke[1]]&&W[Ke[1]].transition?R.validateSpec({key:Re,value:A[Re],valueSpec:F.transition,validateSpec:R.validateSpec,style:te,styleSpec:F}):W[Re]?R.validateSpec({key:Re,value:A[Re],valueSpec:W[Re],validateSpec:R.validateSpec,style:te,styleSpec:F}):[new Ue(Re,A[Re],`unknown property "${Re}"`)])}return fe}function vu(R){let A=R.value,F=R.styleSpec,W=F.sky,te=R.style,fe=gs(A);if(A===void 0)return[];if(fe!=="object")return[new Ue("sky",A,`object expected, ${fe} found`)];let pe=[];for(let Re in A)pe=pe.concat(W[Re]?R.validateSpec({key:Re,value:A[Re],valueSpec:W[Re],style:te,styleSpec:F}):[new Ue(Re,A[Re],`unknown property "${Re}"`)]);return pe}function Oc(R){let A=R.value,F=R.styleSpec,W=F.terrain,te=R.style,fe=[],pe=gs(A);if(A===void 0)return fe;if(pe!=="object")return fe=fe.concat([new Ue("terrain",A,`object expected, ${pe} found`)]),fe;for(let Re in A)fe=fe.concat(W[Re]?R.validateSpec({key:Re,value:A[Re],valueSpec:W[Re],validateSpec:R.validateSpec,style:te,styleSpec:F}):[new Ue(Re,A[Re],`unknown property "${Re}"`)]);return fe}function cf(R){let A=[],F=R.value,W=R.key;if(Array.isArray(F)){let te=[],fe=[];for(let pe in F)F[pe].id&&te.includes(F[pe].id)&&A.push(new Ue(W,F,`all the sprites' ids must be unique, but ${F[pe].id} is duplicated`)),te.push(F[pe].id),F[pe].url&&fe.includes(F[pe].url)&&A.push(new Ue(W,F,`all the sprites' URLs must be unique, but ${F[pe].url} is duplicated`)),fe.push(F[pe].url),A=A.concat(ku({key:`${W}[${pe}]`,value:F[pe],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:R.validateSpec}));return A}return Zu({key:W,value:F})}let fc={"*":()=>[],array:Xf,boolean:function(R){let A=R.value,F=R.key,W=gs(A);return W!=="boolean"?[new Ue(F,A,`boolean expected, ${W} found`)]:[]},number:Us,color:function(R){let A=R.key,F=R.value,W=gs(F);return W!=="string"?[new Ue(A,F,`color expected, ${W} found`)]:ir.parse(String(F))?[]:[new Ue(A,F,`color expected, "${F}" found`)]},constants:If,enum:Wu,filter:Rf,function:wf,layer:ah,object:ku,source:Tc,light:wl,sky:vu,terrain:Oc,projection:function(R){let A=R.value,F=R.styleSpec,W=F.projection,te=R.style,fe=gs(A);if(A===void 0)return[];if(fe!=="object")return[new Ue("projection",A,`object expected, ${fe} found`)];let pe=[];for(let Re in A)pe=pe.concat(W[Re]?R.validateSpec({key:Re,value:A[Re],valueSpec:W[Re],style:te,styleSpec:F}):[new Ue(Re,A[Re],`unknown property "${Re}"`)]);return pe},string:Zu,formatted:function(R){return Zu(R).length===0?[]:zc(R)},resolvedImage:function(R){return Zu(R).length===0?[]:zc(R)},padding:function(R){let A=R.key,F=R.value;if(gs(F)==="array"){if(F.length<1||F.length>4)return[new Ue(A,F,`padding requires 1 to 4 values; ${F.length} values found`)];let W={type:"number"},te=[];for(let fe=0;fe[]}})),R.constants&&(F=F.concat(If({key:"constants",value:R.constants,style:R,styleSpec:A,validateSpec:Bc}))),xr(F)}function Mr(R){return function(A){return R(j1(_g({},A),{validateSpec:Bc}))}}function xr(R){return[].concat(R).sort((A,F)=>A.line-F.line)}function Kr(R){return function(...A){return xr(R.apply(this,A))}}Zt.source=Kr(Mr(Tc)),Zt.sprite=Kr(Mr(cf)),Zt.glyphs=Kr(Mr(kt)),Zt.light=Kr(Mr(wl)),Zt.sky=Kr(Mr(vu)),Zt.terrain=Kr(Mr(Oc)),Zt.layer=Kr(Mr(ah)),Zt.filter=Kr(Mr(Rf)),Zt.paintProperty=Kr(Mr(Zf)),Zt.layoutProperty=Kr(Mr(Wl));let Mi=Zt,Wi=Mi.light,dn=Mi.sky,wn=Mi.paintProperty,On=Mi.layoutProperty;function Yi(R,A){let F=!1;if(A&&A.length)for(let W of A)R.fire(new me(new Error(W.message))),F=!0;return F}class $i{constructor(A,F,W){let te=this.cells=[];if(A instanceof ArrayBuffer){this.arrayBuffer=A;let pe=new Int32Array(this.arrayBuffer);A=pe[0],this.d=(F=pe[1])+2*(W=pe[2]);for(let Ke=0;Ke=tr[kr+0]&&te>=tr[kr+1])?(Re[vr]=!0,pe.push(Rt[vr])):Re[vr]=!1}}}}_forEachCell(A,F,W,te,fe,pe,Re,Ke){let ft=this._convertToCellCoord(A),Rt=this._convertToCellCoord(F),tr=this._convertToCellCoord(W),ur=this._convertToCellCoord(te);for(let vr=ft;vr<=tr;vr++)for(let kr=Rt;kr<=ur;kr++){let Dr=this.d*kr+vr;if((!Ke||Ke(this._convertFromCellCoord(vr),this._convertFromCellCoord(kr),this._convertFromCellCoord(vr+1),this._convertFromCellCoord(kr+1)))&&fe.call(this,A,F,W,te,Dr,pe,Re,Ke))return}}_convertFromCellCoord(A){return(A-this.padding)/this.scale}_convertToCellCoord(A){return Math.max(0,Math.min(this.d-1,Math.floor(A*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let A=this.cells,F=3+this.cells.length+1+1,W=0;for(let pe=0;pe=0)continue;let pe=R[fe];te[fe]=an[F].shallow.indexOf(fe)>=0?pe:La(pe,A)}R instanceof Error&&(te.message=R.message)}if(te.$name)throw new Error("$name property is reserved for worker serialization logic.");return F!=="Object"&&(te.$name=F),te}function Na(R){if(Ra(R))return R;if(Array.isArray(R))return R.map(Na);if(typeof R!="object")throw new Error("can't deserialize object of type "+typeof R);let A=Ca(R)||"Object";if(!an[A])throw new Error(`can't deserialize unregistered class ${A}`);let{klass:F}=an[A];if(!F)throw new Error(`can't deserialize unregistered class ${A}`);if(F.deserialize)return F.deserialize(R);let W=Object.create(F.prototype);for(let te of Object.keys(R)){if(te==="$name")continue;let fe=R[te];W[te]=an[A].shallow.indexOf(te)>=0?fe:Na(fe)}return W}class Zn{constructor(){this.first=!0}update(A,F){let W=Math.floor(A);return this.first?(this.first=!1,this.lastIntegerZoom=W,this.lastIntegerZoomTime=0,this.lastZoom=A,this.lastFloorZoom=W,!0):(this.lastFloorZoom>W?(this.lastIntegerZoom=W+1,this.lastIntegerZoomTime=F):this.lastFloorZoomR>=128&&R<=255,"Hangul Jamo":R=>R>=4352&&R<=4607,Khmer:R=>R>=6016&&R<=6143,"General Punctuation":R=>R>=8192&&R<=8303,"Letterlike Symbols":R=>R>=8448&&R<=8527,"Number Forms":R=>R>=8528&&R<=8591,"Miscellaneous Technical":R=>R>=8960&&R<=9215,"Control Pictures":R=>R>=9216&&R<=9279,"Optical Character Recognition":R=>R>=9280&&R<=9311,"Enclosed Alphanumerics":R=>R>=9312&&R<=9471,"Geometric Shapes":R=>R>=9632&&R<=9727,"Miscellaneous Symbols":R=>R>=9728&&R<=9983,"Miscellaneous Symbols and Arrows":R=>R>=11008&&R<=11263,"Ideographic Description Characters":R=>R>=12272&&R<=12287,"CJK Symbols and Punctuation":R=>R>=12288&&R<=12351,Katakana:R=>R>=12448&&R<=12543,Kanbun:R=>R>=12688&&R<=12703,"CJK Strokes":R=>R>=12736&&R<=12783,"Enclosed CJK Letters and Months":R=>R>=12800&&R<=13055,"CJK Compatibility":R=>R>=13056&&R<=13311,"Yijing Hexagram Symbols":R=>R>=19904&&R<=19967,"Private Use Area":R=>R>=57344&&R<=63743,"Vertical Forms":R=>R>=65040&&R<=65055,"CJK Compatibility Forms":R=>R>=65072&&R<=65103,"Small Form Variants":R=>R>=65104&&R<=65135,"Halfwidth and Fullwidth Forms":R=>R>=65280&&R<=65519};function Ka(R){for(let A of R)if(Ho(A.charCodeAt(0)))return!0;return!1}function bo(R){for(let A of R)if(!as(A.charCodeAt(0)))return!1;return!0}function Zo(R){let A=R.map(F=>{try{return new RegExp(`\\p{sc=${F}}`,"u").source}catch(W){return null}}).filter(F=>F);return new RegExp(A.join("|"),"u")}let Ss=Zo(["Arab","Dupl","Mong","Ougr","Syrc"]);function as(R){return!Ss.test(String.fromCodePoint(R))}let ws=Zo(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function Ho(R){return!(R!==746&&R!==747&&(R<4352||!(Dn["CJK Compatibility Forms"](R)&&!(R>=65097&&R<=65103)||Dn["CJK Compatibility"](R)||Dn["CJK Strokes"](R)||!(!Dn["CJK Symbols and Punctuation"](R)||R>=12296&&R<=12305||R>=12308&&R<=12319||R===12336)||Dn["Enclosed CJK Letters and Months"](R)||Dn["Ideographic Description Characters"](R)||Dn.Kanbun(R)||Dn.Katakana(R)&&R!==12540||!(!Dn["Halfwidth and Fullwidth Forms"](R)||R===65288||R===65289||R===65293||R>=65306&&R<=65310||R===65339||R===65341||R===65343||R>=65371&&R<=65503||R===65507||R>=65512&&R<=65519)||!(!Dn["Small Form Variants"](R)||R>=65112&&R<=65118||R>=65123&&R<=65126)||Dn["Vertical Forms"](R)||Dn["Yijing Hexagram Symbols"](R)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(R))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(R))||ws.test(String.fromCodePoint(R)))))}function ml(R){return!(Ho(R)||function(A){return!!(Dn["Latin-1 Supplement"](A)&&(A===167||A===169||A===174||A===177||A===188||A===189||A===190||A===215||A===247)||Dn["General Punctuation"](A)&&(A===8214||A===8224||A===8225||A===8240||A===8241||A===8251||A===8252||A===8258||A===8263||A===8264||A===8265||A===8273)||Dn["Letterlike Symbols"](A)||Dn["Number Forms"](A)||Dn["Miscellaneous Technical"](A)&&(A>=8960&&A<=8967||A>=8972&&A<=8991||A>=8996&&A<=9e3||A===9003||A>=9085&&A<=9114||A>=9150&&A<=9165||A===9167||A>=9169&&A<=9179||A>=9186&&A<=9215)||Dn["Control Pictures"](A)&&A!==9251||Dn["Optical Character Recognition"](A)||Dn["Enclosed Alphanumerics"](A)||Dn["Geometric Shapes"](A)||Dn["Miscellaneous Symbols"](A)&&!(A>=9754&&A<=9759)||Dn["Miscellaneous Symbols and Arrows"](A)&&(A>=11026&&A<=11055||A>=11088&&A<=11097||A>=11192&&A<=11243)||Dn["CJK Symbols and Punctuation"](A)||Dn.Katakana(A)||Dn["Private Use Area"](A)||Dn["CJK Compatibility Forms"](A)||Dn["Small Form Variants"](A)||Dn["Halfwidth and Fullwidth Forms"](A)||A===8734||A===8756||A===8757||A>=9984&&A<=10087||A>=10102&&A<=10131||A===65532||A===65533)}(R))}let Ws=Zo(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function Ls(R){return Ws.test(String.fromCodePoint(R))}function va(R,A){return!(!A&&Ls(R)||R>=2304&&R<=3583||R>=3840&&R<=4255||Dn.Khmer(R))}function no(R){for(let A of R)if(Ls(A.charCodeAt(0)))return!0;return!1}let ys=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(R){this.pluginStatus=R.pluginStatus,this.pluginURL=R.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(R){this.applyArabicShaping=R.applyArabicShaping,this.processBidirectionalText=R.processBidirectionalText,this.processStyledBidirectionalText=R.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class rs{constructor(A,F){this.zoom=A,F?(this.now=F.now,this.fadeDuration=F.fadeDuration,this.zoomHistory=F.zoomHistory,this.transition=F.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Zn,this.transition={})}isSupportedScript(A){return function(F,W){for(let te of F)if(!va(te.charCodeAt(0),W))return!1;return!0}(A,ys.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let A=this.zoom,F=A-Math.floor(A),W=this.crossFadingFactor();return A>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:F+(1-F)*W}:{fromScale:.5,toScale:1,t:1-(1-W)*F}}}class Ql{constructor(A,F){this.property=A,this.value=F,this.expression=function(W,te){if(Wf(W))return new nl(W,te);if(Dc(W)){let fe=_u(W,te);if(fe.result==="error")throw new Error(fe.value.map(pe=>`${pe.key}: ${pe.message}`).join(", "));return fe.value}{let fe=W;return te.type==="color"&&typeof W=="string"?fe=ir.parse(W):te.type!=="padding"||typeof W!="number"&&!Array.isArray(W)?te.type==="variableAnchorOffsetCollection"&&Array.isArray(W)&&(fe=Zi.parse(W)):fe=$r.parse(W),{kind:"constant",evaluate:()=>fe}}}(F===void 0?A.specification.default:F,A.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(A,F,W){return this.property.possiblyEvaluate(this,A,F,W)}}class Cu{constructor(A){this.property=A,this.value=new Ql(A,void 0)}transitioned(A,F){return new Nc(this.property,this.value,F,L({},A.transition,this.transition),A.now)}untransitioned(){return new Nc(this.property,this.value,null,{},0)}}class Yu{constructor(A){this._properties=A,this._values=Object.create(A.defaultTransitionablePropertyValues)}getValue(A){return g(this._values[A].value.value)}setValue(A,F){Object.prototype.hasOwnProperty.call(this._values,A)||(this._values[A]=new Cu(this._values[A].property)),this._values[A].value=new Ql(this._values[A].property,F===null?void 0:g(F))}getTransition(A){return g(this._values[A].transition)}setTransition(A,F){Object.prototype.hasOwnProperty.call(this._values,A)||(this._values[A]=new Cu(this._values[A].property)),this._values[A].transition=g(F)||void 0}serialize(){let A={};for(let F of Object.keys(this._values)){let W=this.getValue(F);W!==void 0&&(A[F]=W);let te=this.getTransition(F);te!==void 0&&(A[`${F}-transition`]=te)}return A}transitioned(A,F){let W=new pu(this._properties);for(let te of Object.keys(this._values))W._values[te]=this._values[te].transitioned(A,F._values[te]);return W}untransitioned(){let A=new pu(this._properties);for(let F of Object.keys(this._values))A._values[F]=this._values[F].untransitioned();return A}}class Nc{constructor(A,F,W,te,fe){this.property=A,this.value=F,this.begin=fe+te.delay||0,this.end=this.begin+te.duration||0,A.specification.transition&&(te.delay||te.duration)&&(this.prior=W)}possiblyEvaluate(A,F,W){let te=A.now||0,fe=this.value.possiblyEvaluate(A,F,W),pe=this.prior;if(pe){if(te>this.end)return this.prior=null,fe;if(this.value.isDataDriven())return this.prior=null,fe;if(te=1)return 1;let ft=Ke*Ke,Rt=ft*Ke;return 4*(Ke<.5?Rt:3*(Ke-ft)+Rt-.75)}(Re))}}return fe}}class pu{constructor(A){this._properties=A,this._values=Object.create(A.defaultTransitioningPropertyValues)}possiblyEvaluate(A,F,W){let te=new Ac(this._properties);for(let fe of Object.keys(this._values))te._values[fe]=this._values[fe].possiblyEvaluate(A,F,W);return te}hasTransition(){for(let A of Object.keys(this._values))if(this._values[A].prior)return!0;return!1}}class Uc{constructor(A){this._properties=A,this._values=Object.create(A.defaultPropertyValues)}hasValue(A){return this._values[A].value!==void 0}getValue(A){return g(this._values[A].value)}setValue(A,F){this._values[A]=new Ql(this._values[A].property,F===null?void 0:g(F))}serialize(){let A={};for(let F of Object.keys(this._values)){let W=this.getValue(F);W!==void 0&&(A[F]=W)}return A}possiblyEvaluate(A,F,W){let te=new Ac(this._properties);for(let fe of Object.keys(this._values))te._values[fe]=this._values[fe].possiblyEvaluate(A,F,W);return te}}class xu{constructor(A,F,W){this.property=A,this.value=F,this.parameters=W}isConstant(){return this.value.kind==="constant"}constantOr(A){return this.value.kind==="constant"?this.value.value:A}evaluate(A,F,W,te){return this.property.evaluate(this.value,this.parameters,A,F,W,te)}}class Ac{constructor(A){this._properties=A,this._values=Object.create(A.defaultPossiblyEvaluatedValues)}get(A){return this._values[A]}}class Ua{constructor(A){this.specification=A}possiblyEvaluate(A,F){if(A.isDataDriven())throw new Error("Value should not be data driven");return A.expression.evaluate(F)}interpolate(A,F,W){let te=Lo[this.specification.type];return te?te(A,F,W):A}}class oo{constructor(A,F){this.specification=A,this.overrides=F}possiblyEvaluate(A,F,W,te){return new xu(this,A.expression.kind==="constant"||A.expression.kind==="camera"?{kind:"constant",value:A.expression.evaluate(F,null,{},W,te)}:A.expression,F)}interpolate(A,F,W){if(A.value.kind!=="constant"||F.value.kind!=="constant")return A;if(A.value.value===void 0||F.value.value===void 0)return new xu(this,{kind:"constant",value:void 0},A.parameters);let te=Lo[this.specification.type];if(te){let fe=te(A.value.value,F.value.value,W);return new xu(this,{kind:"constant",value:fe},A.parameters)}return A}evaluate(A,F,W,te,fe,pe){return A.kind==="constant"?A.value:A.evaluate(F,W,te,fe,pe)}}class Vc extends oo{possiblyEvaluate(A,F,W,te){if(A.value===void 0)return new xu(this,{kind:"constant",value:void 0},F);if(A.expression.kind==="constant"){let fe=A.expression.evaluate(F,null,{},W,te),pe=A.property.specification.type==="resolvedImage"&&typeof fe!="string"?fe.name:fe,Re=this._calculate(pe,pe,pe,F);return new xu(this,{kind:"constant",value:Re},F)}if(A.expression.kind==="camera"){let fe=this._calculate(A.expression.evaluate({zoom:F.zoom-1}),A.expression.evaluate({zoom:F.zoom}),A.expression.evaluate({zoom:F.zoom+1}),F);return new xu(this,{kind:"constant",value:fe},F)}return new xu(this,A.expression,F)}evaluate(A,F,W,te,fe,pe){if(A.kind==="source"){let Re=A.evaluate(F,W,te,fe,pe);return this._calculate(Re,Re,Re,F)}return A.kind==="composite"?this._calculate(A.evaluate({zoom:Math.floor(F.zoom)-1},W,te),A.evaluate({zoom:Math.floor(F.zoom)},W,te),A.evaluate({zoom:Math.floor(F.zoom)+1},W,te),F):A.value}_calculate(A,F,W,te){return te.zoom>te.zoomHistory.lastIntegerZoom?{from:A,to:F}:{from:W,to:F}}interpolate(A){return A}}class hc{constructor(A){this.specification=A}possiblyEvaluate(A,F,W,te){if(A.value!==void 0){if(A.expression.kind==="constant"){let fe=A.expression.evaluate(F,null,{},W,te);return this._calculate(fe,fe,fe,F)}return this._calculate(A.expression.evaluate(new rs(Math.floor(F.zoom-1),F)),A.expression.evaluate(new rs(Math.floor(F.zoom),F)),A.expression.evaluate(new rs(Math.floor(F.zoom+1),F)),F)}}_calculate(A,F,W,te){return te.zoom>te.zoomHistory.lastIntegerZoom?{from:A,to:F}:{from:W,to:F}}interpolate(A){return A}}class Ku{constructor(A){this.specification=A}possiblyEvaluate(A,F,W,te){return!!A.expression.evaluate(F,null,{},W,te)}interpolate(){return!1}}class ue{constructor(A){this.properties=A,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let F in A){let W=A[F];W.specification.overridable&&this.overridableProperties.push(F);let te=this.defaultPropertyValues[F]=new Ql(W,void 0),fe=this.defaultTransitionablePropertyValues[F]=new Cu(W);this.defaultTransitioningPropertyValues[F]=fe.untransitioned(),this.defaultPossiblyEvaluatedValues[F]=te.possiblyEvaluate({})}}}Fi("DataDrivenProperty",oo),Fi("DataConstantProperty",Ua),Fi("CrossFadedDataDrivenProperty",Vc),Fi("CrossFadedProperty",hc),Fi("ColorRampProperty",Ku);let w="-transition";class B extends Pe{constructor(A,F){if(super(),this.id=A.id,this.type=A.type,this._featureFilter={filter:()=>!0,needGeometry:!1},A.type!=="custom"&&(this.metadata=A.metadata,this.minzoom=A.minzoom,this.maxzoom=A.maxzoom,A.type!=="background"&&(this.source=A.source,this.sourceLayer=A["source-layer"],this.filter=A.filter),F.layout&&(this._unevaluatedLayout=new Uc(F.layout)),F.paint)){this._transitionablePaint=new Yu(F.paint);for(let W in A.paint)this.setPaintProperty(W,A.paint[W],{validate:!1});for(let W in A.layout)this.setLayoutProperty(W,A.layout[W],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Ac(F.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(A){return A==="visibility"?this.visibility:this._unevaluatedLayout.getValue(A)}setLayoutProperty(A,F,W={}){F!=null&&this._validate(On,`layers.${this.id}.layout.${A}`,A,F,W)||(A!=="visibility"?this._unevaluatedLayout.setValue(A,F):this.visibility=F)}getPaintProperty(A){return A.endsWith(w)?this._transitionablePaint.getTransition(A.slice(0,-11)):this._transitionablePaint.getValue(A)}setPaintProperty(A,F,W={}){if(F!=null&&this._validate(wn,`layers.${this.id}.paint.${A}`,A,F,W))return!1;if(A.endsWith(w))return this._transitionablePaint.setTransition(A.slice(0,-11),F||void 0),!1;{let te=this._transitionablePaint._values[A],fe=te.property.specification["property-type"]==="cross-faded-data-driven",pe=te.value.isDataDriven(),Re=te.value;this._transitionablePaint.setValue(A,F),this._handleSpecialPaintPropertyUpdate(A);let Ke=this._transitionablePaint._values[A].value;return Ke.isDataDriven()||pe||fe||this._handleOverridablePaintPropertyUpdate(A,Re,Ke)}}_handleSpecialPaintPropertyUpdate(A){}_handleOverridablePaintPropertyUpdate(A,F,W){return!1}isHidden(A){return!!(this.minzoom&&A=this.maxzoom)||this.visibility==="none"}updateTransitions(A){this._transitioningPaint=this._transitionablePaint.transitioned(A,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(A,F){A.getCrossfadeParameters&&(this._crossfadeParameters=A.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(A,void 0,F)),this.paint=this._transitioningPaint.possiblyEvaluate(A,void 0,F)}serialize(){let A={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(A.layout=A.layout||{},A.layout.visibility=this.visibility),S(A,(F,W)=>!(F===void 0||W==="layout"&&!Object.keys(F).length||W==="paint"&&!Object.keys(F).length))}_validate(A,F,W,te,fe={}){return(!fe||fe.validate!==!1)&&Yi(this,A.call(Mi,{key:F,layerType:this.type,objectKey:W,value:te,styleSpec:ce,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let A in this.paint._values){let F=this.paint.get(A);if(F instanceof xu&&Nl(F.property.specification)&&(F.value.kind==="source"||F.value.kind==="composite")&&F.value.isStateDependent)return!0}return!1}}let Q={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class ee{constructor(A,F){this._structArray=A,this._pos1=F*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class le{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(A,F){return A._trim(),F&&(A.isTransferred=!0,F.push(A.arrayBuffer)),{length:A.length,arrayBuffer:A.arrayBuffer}}static deserialize(A){let F=Object.create(this.prototype);return F.arrayBuffer=A.arrayBuffer,F.length=A.length,F.capacity=A.arrayBuffer.byteLength/F.bytesPerElement,F._refreshViews(),F}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(A){this.reserve(A),this.length=A}reserve(A){if(A>this.capacity){this.capacity=Math.max(A,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let F=this.uint8;this._refreshViews(),F&&this.uint8.set(F)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function ze(R,A=1){let F=0,W=0;return{members:R.map(te=>{let fe=Q[te.type].BYTES_PER_ELEMENT,pe=F=Ze(F,Math.max(A,fe)),Re=te.components||1;return W=Math.max(W,fe),F+=fe*Re,{name:te.name,type:te.type,components:Re,offset:pe}}),size:Ze(F,Math.max(W,A)),alignment:A}}function Ze(R,A){return Math.ceil(R/A)*A}class ut extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,F){let W=this.length;return this.resize(W+1),this.emplace(W,A,F)}emplace(A,F,W){let te=2*A;return this.int16[te+0]=F,this.int16[te+1]=W,A}}ut.prototype.bytesPerElement=4,Fi("StructArrayLayout2i4",ut);class Mt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,F,W){let te=this.length;return this.resize(te+1),this.emplace(te,A,F,W)}emplace(A,F,W,te){let fe=3*A;return this.int16[fe+0]=F,this.int16[fe+1]=W,this.int16[fe+2]=te,A}}Mt.prototype.bytesPerElement=6,Fi("StructArrayLayout3i6",Mt);class Jt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,F,W,te){let fe=this.length;return this.resize(fe+1),this.emplace(fe,A,F,W,te)}emplace(A,F,W,te,fe){let pe=4*A;return this.int16[pe+0]=F,this.int16[pe+1]=W,this.int16[pe+2]=te,this.int16[pe+3]=fe,A}}Jt.prototype.bytesPerElement=8,Fi("StructArrayLayout4i8",Jt);class $t extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,F,W,te,fe,pe){let Re=this.length;return this.resize(Re+1),this.emplace(Re,A,F,W,te,fe,pe)}emplace(A,F,W,te,fe,pe,Re){let Ke=6*A;return this.int16[Ke+0]=F,this.int16[Ke+1]=W,this.int16[Ke+2]=te,this.int16[Ke+3]=fe,this.int16[Ke+4]=pe,this.int16[Ke+5]=Re,A}}$t.prototype.bytesPerElement=12,Fi("StructArrayLayout2i4i12",$t);class mr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,F,W,te,fe,pe){let Re=this.length;return this.resize(Re+1),this.emplace(Re,A,F,W,te,fe,pe)}emplace(A,F,W,te,fe,pe,Re){let Ke=4*A,ft=8*A;return this.int16[Ke+0]=F,this.int16[Ke+1]=W,this.uint8[ft+4]=te,this.uint8[ft+5]=fe,this.uint8[ft+6]=pe,this.uint8[ft+7]=Re,A}}mr.prototype.bytesPerElement=8,Fi("StructArrayLayout2i4ub8",mr);class Cr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(A,F){let W=this.length;return this.resize(W+1),this.emplace(W,A,F)}emplace(A,F,W){let te=2*A;return this.float32[te+0]=F,this.float32[te+1]=W,A}}Cr.prototype.bytesPerElement=8,Fi("StructArrayLayout2f8",Cr);class ve extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(A,F,W,te,fe,pe,Re,Ke,ft,Rt){let tr=this.length;return this.resize(tr+1),this.emplace(tr,A,F,W,te,fe,pe,Re,Ke,ft,Rt)}emplace(A,F,W,te,fe,pe,Re,Ke,ft,Rt,tr){let ur=10*A;return this.uint16[ur+0]=F,this.uint16[ur+1]=W,this.uint16[ur+2]=te,this.uint16[ur+3]=fe,this.uint16[ur+4]=pe,this.uint16[ur+5]=Re,this.uint16[ur+6]=Ke,this.uint16[ur+7]=ft,this.uint16[ur+8]=Rt,this.uint16[ur+9]=tr,A}}ve.prototype.bytesPerElement=20,Fi("StructArrayLayout10ui20",ve);class xe extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(A,F,W,te,fe,pe,Re,Ke,ft,Rt,tr,ur){let vr=this.length;return this.resize(vr+1),this.emplace(vr,A,F,W,te,fe,pe,Re,Ke,ft,Rt,tr,ur)}emplace(A,F,W,te,fe,pe,Re,Ke,ft,Rt,tr,ur,vr){let kr=12*A;return this.int16[kr+0]=F,this.int16[kr+1]=W,this.int16[kr+2]=te,this.int16[kr+3]=fe,this.uint16[kr+4]=pe,this.uint16[kr+5]=Re,this.uint16[kr+6]=Ke,this.uint16[kr+7]=ft,this.int16[kr+8]=Rt,this.int16[kr+9]=tr,this.int16[kr+10]=ur,this.int16[kr+11]=vr,A}}xe.prototype.bytesPerElement=24,Fi("StructArrayLayout4i4ui4i24",xe);class Ie extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(A,F,W){let te=this.length;return this.resize(te+1),this.emplace(te,A,F,W)}emplace(A,F,W,te){let fe=3*A;return this.float32[fe+0]=F,this.float32[fe+1]=W,this.float32[fe+2]=te,A}}Ie.prototype.bytesPerElement=12,Fi("StructArrayLayout3f12",Ie);class qe extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(A){let F=this.length;return this.resize(F+1),this.emplace(F,A)}emplace(A,F){return this.uint32[1*A+0]=F,A}}qe.prototype.bytesPerElement=4,Fi("StructArrayLayout1ul4",qe);class Qe extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(A,F,W,te,fe,pe,Re,Ke,ft){let Rt=this.length;return this.resize(Rt+1),this.emplace(Rt,A,F,W,te,fe,pe,Re,Ke,ft)}emplace(A,F,W,te,fe,pe,Re,Ke,ft,Rt){let tr=10*A,ur=5*A;return this.int16[tr+0]=F,this.int16[tr+1]=W,this.int16[tr+2]=te,this.int16[tr+3]=fe,this.int16[tr+4]=pe,this.int16[tr+5]=Re,this.uint32[ur+3]=Ke,this.uint16[tr+8]=ft,this.uint16[tr+9]=Rt,A}}Qe.prototype.bytesPerElement=20,Fi("StructArrayLayout6i1ul2ui20",Qe);class Xe extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,F,W,te,fe,pe){let Re=this.length;return this.resize(Re+1),this.emplace(Re,A,F,W,te,fe,pe)}emplace(A,F,W,te,fe,pe,Re){let Ke=6*A;return this.int16[Ke+0]=F,this.int16[Ke+1]=W,this.int16[Ke+2]=te,this.int16[Ke+3]=fe,this.int16[Ke+4]=pe,this.int16[Ke+5]=Re,A}}Xe.prototype.bytesPerElement=12,Fi("StructArrayLayout2i2i2i12",Xe);class nt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,F,W,te,fe){let pe=this.length;return this.resize(pe+1),this.emplace(pe,A,F,W,te,fe)}emplace(A,F,W,te,fe,pe){let Re=4*A,Ke=8*A;return this.float32[Re+0]=F,this.float32[Re+1]=W,this.float32[Re+2]=te,this.int16[Ke+6]=fe,this.int16[Ke+7]=pe,A}}nt.prototype.bytesPerElement=16,Fi("StructArrayLayout2f1f2i16",nt);class qt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(A,F,W,te,fe,pe){let Re=this.length;return this.resize(Re+1),this.emplace(Re,A,F,W,te,fe,pe)}emplace(A,F,W,te,fe,pe,Re){let Ke=16*A,ft=4*A,Rt=8*A;return this.uint8[Ke+0]=F,this.uint8[Ke+1]=W,this.float32[ft+1]=te,this.float32[ft+2]=fe,this.int16[Rt+6]=pe,this.int16[Rt+7]=Re,A}}qt.prototype.bytesPerElement=16,Fi("StructArrayLayout2ub2f2i16",qt);class jt extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(A,F,W){let te=this.length;return this.resize(te+1),this.emplace(te,A,F,W)}emplace(A,F,W,te){let fe=3*A;return this.uint16[fe+0]=F,this.uint16[fe+1]=W,this.uint16[fe+2]=te,A}}jt.prototype.bytesPerElement=6,Fi("StructArrayLayout3ui6",jt);class ar extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(A,F,W,te,fe,pe,Re,Ke,ft,Rt,tr,ur,vr,kr,Dr,li,pi){let vn=this.length;return this.resize(vn+1),this.emplace(vn,A,F,W,te,fe,pe,Re,Ke,ft,Rt,tr,ur,vr,kr,Dr,li,pi)}emplace(A,F,W,te,fe,pe,Re,Ke,ft,Rt,tr,ur,vr,kr,Dr,li,pi,vn){let zi=24*A,ln=12*A,Tn=48*A;return this.int16[zi+0]=F,this.int16[zi+1]=W,this.uint16[zi+2]=te,this.uint16[zi+3]=fe,this.uint32[ln+2]=pe,this.uint32[ln+3]=Re,this.uint32[ln+4]=Ke,this.uint16[zi+10]=ft,this.uint16[zi+11]=Rt,this.uint16[zi+12]=tr,this.float32[ln+7]=ur,this.float32[ln+8]=vr,this.uint8[Tn+36]=kr,this.uint8[Tn+37]=Dr,this.uint8[Tn+38]=li,this.uint32[ln+10]=pi,this.int16[zi+22]=vn,A}}ar.prototype.bytesPerElement=48,Fi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",ar);class fr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(A,F,W,te,fe,pe,Re,Ke,ft,Rt,tr,ur,vr,kr,Dr,li,pi,vn,zi,ln,Tn,pa,ro,Vo,Xa,la,Mo,fo){let lo=this.length;return this.resize(lo+1),this.emplace(lo,A,F,W,te,fe,pe,Re,Ke,ft,Rt,tr,ur,vr,kr,Dr,li,pi,vn,zi,ln,Tn,pa,ro,Vo,Xa,la,Mo,fo)}emplace(A,F,W,te,fe,pe,Re,Ke,ft,Rt,tr,ur,vr,kr,Dr,li,pi,vn,zi,ln,Tn,pa,ro,Vo,Xa,la,Mo,fo,lo){let Wn=32*A,Ro=16*A;return this.int16[Wn+0]=F,this.int16[Wn+1]=W,this.int16[Wn+2]=te,this.int16[Wn+3]=fe,this.int16[Wn+4]=pe,this.int16[Wn+5]=Re,this.int16[Wn+6]=Ke,this.int16[Wn+7]=ft,this.uint16[Wn+8]=Rt,this.uint16[Wn+9]=tr,this.uint16[Wn+10]=ur,this.uint16[Wn+11]=vr,this.uint16[Wn+12]=kr,this.uint16[Wn+13]=Dr,this.uint16[Wn+14]=li,this.uint16[Wn+15]=pi,this.uint16[Wn+16]=vn,this.uint16[Wn+17]=zi,this.uint16[Wn+18]=ln,this.uint16[Wn+19]=Tn,this.uint16[Wn+20]=pa,this.uint16[Wn+21]=ro,this.uint16[Wn+22]=Vo,this.uint32[Ro+12]=Xa,this.float32[Ro+13]=la,this.float32[Ro+14]=Mo,this.uint16[Wn+30]=fo,this.uint16[Wn+31]=lo,A}}fr.prototype.bytesPerElement=64,Fi("StructArrayLayout8i15ui1ul2f2ui64",fr);class br extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(A){let F=this.length;return this.resize(F+1),this.emplace(F,A)}emplace(A,F){return this.float32[1*A+0]=F,A}}br.prototype.bytesPerElement=4,Fi("StructArrayLayout1f4",br);class Fr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(A,F,W){let te=this.length;return this.resize(te+1),this.emplace(te,A,F,W)}emplace(A,F,W,te){let fe=3*A;return this.uint16[6*A+0]=F,this.float32[fe+1]=W,this.float32[fe+2]=te,A}}Fr.prototype.bytesPerElement=12,Fi("StructArrayLayout1ui2f12",Fr);class Hr extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(A,F,W){let te=this.length;return this.resize(te+1),this.emplace(te,A,F,W)}emplace(A,F,W,te){let fe=4*A;return this.uint32[2*A+0]=F,this.uint16[fe+2]=W,this.uint16[fe+3]=te,A}}Hr.prototype.bytesPerElement=8,Fi("StructArrayLayout1ul2ui8",Hr);class ri extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(A,F){let W=this.length;return this.resize(W+1),this.emplace(W,A,F)}emplace(A,F,W){let te=2*A;return this.uint16[te+0]=F,this.uint16[te+1]=W,A}}ri.prototype.bytesPerElement=4,Fi("StructArrayLayout2ui4",ri);class Ci extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(A){let F=this.length;return this.resize(F+1),this.emplace(F,A)}emplace(A,F){return this.uint16[1*A+0]=F,A}}Ci.prototype.bytesPerElement=2,Fi("StructArrayLayout1ui2",Ci);class cn extends le{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(A,F,W,te){let fe=this.length;return this.resize(fe+1),this.emplace(fe,A,F,W,te)}emplace(A,F,W,te,fe){let pe=4*A;return this.float32[pe+0]=F,this.float32[pe+1]=W,this.float32[pe+2]=te,this.float32[pe+3]=fe,A}}cn.prototype.bytesPerElement=16,Fi("StructArrayLayout4f16",cn);class sn extends ee{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new u(this.anchorPointX,this.anchorPointY)}}sn.prototype.size=20;class Ln extends Qe{get(A){return new sn(this,A)}}Fi("CollisionBoxArray",Ln);class Yn extends ee{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(A){this._structArray.uint8[this._pos1+37]=A}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(A){this._structArray.uint8[this._pos1+38]=A}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(A){this._structArray.uint32[this._pos4+10]=A}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}Yn.prototype.size=48;class Aa extends ar{get(A){return new Yn(this,A)}}Fi("PlacedSymbolArray",Aa);class fa extends ee{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(A){this._structArray.uint32[this._pos4+12]=A}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}fa.prototype.size=64;class $a extends fr{get(A){return new fa(this,A)}}Fi("SymbolInstanceArray",$a);class Co extends br{getoffsetX(A){return this.float32[1*A+0]}}Fi("GlyphOffsetArray",Co);class Qa extends Mt{getx(A){return this.int16[3*A+0]}gety(A){return this.int16[3*A+1]}gettileUnitDistanceFromAnchor(A){return this.int16[3*A+2]}}Fi("SymbolLineVertexArray",Qa);class mo extends ee{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}mo.prototype.size=12;class Bo extends Fr{get(A){return new mo(this,A)}}Fi("TextAnchorOffsetArray",Bo);class Ps extends ee{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}Ps.prototype.size=8;class Ts extends Hr{get(A){return new Ps(this,A)}}Fi("FeatureIndexArray",Ts);class wo extends ut{}class To extends ut{}class hl extends ut{}class Ul extends $t{}class Lu extends mr{}class au extends Cr{}class Js extends ve{}class eu extends xe{}class dc extends Ie{}class Tl extends qe{}class Al extends Xe{}class X extends qt{}class se extends jt{}class Te extends ri{}let Oe=ze([{name:"a_pos",components:2,type:"Int16"}],4),{members:Ve}=Oe;class Ye{constructor(A=[]){this.segments=A}prepareSegment(A,F,W,te){let fe=this.segments[this.segments.length-1];return A>Ye.MAX_VERTEX_ARRAY_LENGTH&&E(`Max vertices per segment is ${Ye.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${A}`),(!fe||fe.vertexLength+A>Ye.MAX_VERTEX_ARRAY_LENGTH||fe.sortKey!==te)&&(fe={vertexOffset:F.length,primitiveOffset:W.length,vertexLength:0,primitiveLength:0},te!==void 0&&(fe.sortKey=te),this.segments.push(fe)),fe}get(){return this.segments}destroy(){for(let A of this.segments)for(let F in A.vaos)A.vaos[F].destroy()}static simpleSegment(A,F,W,te){return new Ye([{vertexOffset:A,primitiveOffset:F,vertexLength:W,primitiveLength:te,vaos:{},sortKey:0}])}}function Pt(R,A){return 256*(R=M(Math.floor(R),0,255))+M(Math.floor(A),0,255)}Ye.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Fi("SegmentVector",Ye);let at=ze([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var Wt={exports:{}},dr={exports:{}};dr.exports=function(R,A){var F,W,te,fe,pe,Re,Ke,ft;for(W=R.length-(F=3&R.length),te=A,pe=3432918353,Re=461845907,ft=0;ft>>16)*pe&65535)<<16)&4294967295)<<15|Ke>>>17))*Re+(((Ke>>>16)*Re&65535)<<16)&4294967295)<<13|te>>>19))+((5*(te>>>16)&65535)<<16)&4294967295))+((58964+(fe>>>16)&65535)<<16);switch(Ke=0,F){case 3:Ke^=(255&R.charCodeAt(ft+2))<<16;case 2:Ke^=(255&R.charCodeAt(ft+1))<<8;case 1:te^=Ke=(65535&(Ke=(Ke=(65535&(Ke^=255&R.charCodeAt(ft)))*pe+(((Ke>>>16)*pe&65535)<<16)&4294967295)<<15|Ke>>>17))*Re+(((Ke>>>16)*Re&65535)<<16)&4294967295}return te^=R.length,te=2246822507*(65535&(te^=te>>>16))+((2246822507*(te>>>16)&65535)<<16)&4294967295,te=3266489909*(65535&(te^=te>>>13))+((3266489909*(te>>>16)&65535)<<16)&4294967295,(te^=te>>>16)>>>0};var pr=dr.exports,Ur={exports:{}};Ur.exports=function(R,A){for(var F,W=R.length,te=A^W,fe=0;W>=4;)F=1540483477*(65535&(F=255&R.charCodeAt(fe)|(255&R.charCodeAt(++fe))<<8|(255&R.charCodeAt(++fe))<<16|(255&R.charCodeAt(++fe))<<24))+((1540483477*(F>>>16)&65535)<<16),te=1540483477*(65535&te)+((1540483477*(te>>>16)&65535)<<16)^(F=1540483477*(65535&(F^=F>>>24))+((1540483477*(F>>>16)&65535)<<16)),W-=4,++fe;switch(W){case 3:te^=(255&R.charCodeAt(fe+2))<<16;case 2:te^=(255&R.charCodeAt(fe+1))<<8;case 1:te=1540483477*(65535&(te^=255&R.charCodeAt(fe)))+((1540483477*(te>>>16)&65535)<<16)}return te=1540483477*(65535&(te^=te>>>13))+((1540483477*(te>>>16)&65535)<<16),(te^=te>>>15)>>>0};var zr=pr,gi=Ur.exports;Wt.exports=zr,Wt.exports.murmur3=zr,Wt.exports.murmur2=gi;var xi=o(Wt.exports);class Wr{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(A,F,W,te){this.ids.push(ii(A)),this.positions.push(F,W,te)}getPositions(A){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let F=ii(A),W=0,te=this.ids.length-1;for(;W>1;this.ids[pe]>=F?te=pe:W=pe+1}let fe=[];for(;this.ids[W]===F;)fe.push({index:this.positions[3*W],start:this.positions[3*W+1],end:this.positions[3*W+2]}),W++;return fe}static serialize(A,F){let W=new Float64Array(A.ids),te=new Uint32Array(A.positions);return di(W,te,0,W.length-1),F&&F.push(W.buffer,te.buffer),{ids:W,positions:te}}static deserialize(A){let F=new Wr;return F.ids=A.ids,F.positions=A.positions,F.indexed=!0,F}}function ii(R){let A=+R;return!isNaN(A)&&A<=Number.MAX_SAFE_INTEGER?A:xi(String(R))}function di(R,A,F,W){for(;F>1],fe=F-1,pe=W+1;for(;;){do fe++;while(R[fe]te);if(fe>=pe)break;Li(R,fe,pe),Li(A,3*fe,3*pe),Li(A,3*fe+1,3*pe+1),Li(A,3*fe+2,3*pe+2)}pe-F`u_${te}`),this.type=W}setUniform(A,F,W){A.set(W.constantOr(this.value))}getBinding(A,F,W){return this.type==="color"?new kn(A,F):new Qr(A,F)}}class Ia{constructor(A,F){this.uniformNames=F.map(W=>`u_${W}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(A,F){this.pixelRatioFrom=F.pixelRatio,this.pixelRatioTo=A.pixelRatio,this.patternFrom=F.tlbr,this.patternTo=A.tlbr}setUniform(A,F,W,te){let fe=te==="u_pattern_to"?this.patternTo:te==="u_pattern_from"?this.patternFrom:te==="u_pixel_ratio_to"?this.pixelRatioTo:te==="u_pixel_ratio_from"?this.pixelRatioFrom:null;fe&&A.set(fe)}getBinding(A,F,W){return W.substr(0,9)==="u_pattern"?new Pn(A,F):new Qr(A,F)}}class yo{constructor(A,F,W,te){this.expression=A,this.type=W,this.maxValue=0,this.paintVertexAttributes=F.map(fe=>({name:`a_${fe}`,type:"Float32",components:W==="color"?2:1,offset:0})),this.paintVertexArray=new te}populatePaintArray(A,F,W,te,fe){let pe=this.paintVertexArray.length,Re=this.expression.evaluate(new rs(0),F,{},te,[],fe);this.paintVertexArray.resize(A),this._setPaintValue(pe,A,Re)}updatePaintArray(A,F,W,te){let fe=this.expression.evaluate({zoom:0},W,te);this._setPaintValue(A,F,fe)}_setPaintValue(A,F,W){if(this.type==="color"){let te=na(W);for(let fe=A;fe`u_${Re}_t`),this.type=W,this.useIntegerZoom=te,this.zoom=fe,this.maxValue=0,this.paintVertexAttributes=F.map(Re=>({name:`a_${Re}`,type:"Float32",components:W==="color"?4:2,offset:0})),this.paintVertexArray=new pe}populatePaintArray(A,F,W,te,fe){let pe=this.expression.evaluate(new rs(this.zoom),F,{},te,[],fe),Re=this.expression.evaluate(new rs(this.zoom+1),F,{},te,[],fe),Ke=this.paintVertexArray.length;this.paintVertexArray.resize(A),this._setPaintValue(Ke,A,pe,Re)}updatePaintArray(A,F,W,te){let fe=this.expression.evaluate({zoom:this.zoom},W,te),pe=this.expression.evaluate({zoom:this.zoom+1},W,te);this._setPaintValue(A,F,fe,pe)}_setPaintValue(A,F,W,te){if(this.type==="color"){let fe=na(W),pe=na(te);for(let Re=A;Re`#define HAS_UNIFORM_${te}`))}return A}getBinderAttributes(){let A=[];for(let F in this.binders){let W=this.binders[F];if(W instanceof yo||W instanceof Da)for(let te=0;te!0){this.programConfigurations={};for(let te of A)this.programConfigurations[te.id]=new Is(te,F,W);this.needsUpload=!1,this._featureMap=new Wr,this._bufferOffset=0}populatePaintArrays(A,F,W,te,fe,pe){for(let Re in this.programConfigurations)this.programConfigurations[Re].populatePaintArrays(A,F,te,fe,pe);F.id!==void 0&&this._featureMap.add(F.id,W,this._bufferOffset,A),this._bufferOffset=A,this.needsUpload=!0}updatePaintArrays(A,F,W,te){for(let fe of W)this.needsUpload=this.programConfigurations[fe.id].updatePaintArrays(A,this._featureMap,F,fe,te)||this.needsUpload}get(A){return this.programConfigurations[A]}upload(A){if(this.needsUpload){for(let F in this.programConfigurations)this.programConfigurations[F].upload(A);this.needsUpload=!1}}destroy(){for(let A in this.programConfigurations)this.programConfigurations[A].destroy()}}function Xs(R,A){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[R]||[R.replace(`${A}-`,"").replace(/-/g,"_")]}function Un(R,A,F){let W={color:{source:Cr,composite:cn},number:{source:br,composite:Cr}},te=function(fe){return{"line-pattern":{source:Js,composite:Js},"fill-pattern":{source:Js,composite:Js},"fill-extrusion-pattern":{source:Js,composite:Js}}[fe]}(R);return te&&te[F]||W[A][F]}Fi("ConstantBinder",Ea),Fi("CrossFadedConstantBinder",Ia),Fi("SourceExpressionBinder",yo),Fi("CrossFadedCompositeBinder",go),Fi("CompositeExpressionBinder",Da),Fi("ProgramConfiguration",Is,{omit:["_buffers"]}),Fi("ProgramConfigurationSet",Ms);let ja=8192,Fo=Math.pow(2,14)-1,Uo=-Fo-1;function $s(R){let A=ja/R.extent,F=R.loadGeometry();for(let W=0;Wpe.x+1||Kepe.y+1)&&E("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return F}function Sl(R,A){return{type:R.type,id:R.id,properties:R.properties,geometry:A?$s(R):[]}}function bu(R,A,F,W,te){R.emplaceBack(2*A+(W+1)/2,2*F+(te+1)/2)}class dl{constructor(A){this.zoom=A.zoom,this.overscaling=A.overscaling,this.layers=A.layers,this.layerIds=this.layers.map(F=>F.id),this.index=A.index,this.hasPattern=!1,this.layoutVertexArray=new To,this.indexArray=new se,this.segments=new Ye,this.programConfigurations=new Ms(A.layers,A.zoom),this.stateDependentLayerIds=this.layers.filter(F=>F.isStateDependent()).map(F=>F.id)}populate(A,F,W){let te=this.layers[0],fe=[],pe=null,Re=!1;te.type==="circle"&&(pe=te.layout.get("circle-sort-key"),Re=!pe.isConstant());for(let{feature:Ke,id:ft,index:Rt,sourceLayerIndex:tr}of A){let ur=this.layers[0]._featureFilter.needGeometry,vr=Sl(Ke,ur);if(!this.layers[0]._featureFilter.filter(new rs(this.zoom),vr,W))continue;let kr=Re?pe.evaluate(vr,{},W):void 0,Dr={id:ft,properties:Ke.properties,type:Ke.type,sourceLayerIndex:tr,index:Rt,geometry:ur?vr.geometry:$s(Ke),patterns:{},sortKey:kr};fe.push(Dr)}Re&&fe.sort((Ke,ft)=>Ke.sortKey-ft.sortKey);for(let Ke of fe){let{geometry:ft,index:Rt,sourceLayerIndex:tr}=Ke,ur=A[Rt].feature;this.addFeature(Ke,ft,Rt,W),F.featureIndex.insert(ur,ft,Rt,tr,this.index)}}update(A,F,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(A,F,this.stateDependentLayers,W)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(A){this.uploaded||(this.layoutVertexBuffer=A.createVertexBuffer(this.layoutVertexArray,Ve),this.indexBuffer=A.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(A),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(A,F,W,te){for(let fe of F)for(let pe of fe){let Re=pe.x,Ke=pe.y;if(Re<0||Re>=ja||Ke<0||Ke>=ja)continue;let ft=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,A.sortKey),Rt=ft.vertexLength;bu(this.layoutVertexArray,Re,Ke,-1,-1),bu(this.layoutVertexArray,Re,Ke,1,-1),bu(this.layoutVertexArray,Re,Ke,1,1),bu(this.layoutVertexArray,Re,Ke,-1,1),this.indexArray.emplaceBack(Rt,Rt+1,Rt+2),this.indexArray.emplaceBack(Rt,Rt+3,Rt+2),ft.vertexLength+=4,ft.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,A,W,{},te)}}function Sc(R,A){for(let F=0;F1){if(Lr(R,A))return!0;for(let W=0;W1?F:F.sub(A)._mult(te)._add(A))}function vi(R,A){let F,W,te,fe=!1;for(let pe=0;peA.y!=te.y>A.y&&A.x<(te.x-W.x)*(A.y-W.y)/(te.y-W.y)+W.x&&(fe=!fe)}return fe}function Ni(R,A){let F=!1;for(let W=0,te=R.length-1;WA.y!=pe.y>A.y&&A.x<(pe.x-fe.x)*(A.y-fe.y)/(pe.y-fe.y)+fe.x&&(F=!F)}return F}function qi(R,A,F){let W=F[0],te=F[2];if(R.xte.x&&A.x>te.x||R.yte.y&&A.y>te.y)return!1;let fe=z(R,A,F[0]);return fe!==z(R,A,F[1])||fe!==z(R,A,F[2])||fe!==z(R,A,F[3])}function Si(R,A,F){let W=A.paint.get(R).value;return W.kind==="constant"?W.value:F.programConfigurations.get(A.id).getMaxValue(R)}function Vn(R){return Math.sqrt(R[0]*R[0]+R[1]*R[1])}function Qi(R,A,F,W,te){if(!A[0]&&!A[1])return R;let fe=u.convert(A)._mult(te);F==="viewport"&&fe._rotate(-W);let pe=[];for(let Re=0;Resi(li,Dr))}(ft,Ke),vr=tr?Rt*Re:Rt;for(let kr of te)for(let Dr of kr){let li=tr?Dr:si(Dr,Ke),pi=vr,vn=qn([],[Dr.x,Dr.y,0,1],Ke);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?pi*=vn[3]/pe.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(pi*=pe.cameraToCenterDistance/vn[3]),Me(ur,li,pi))return!0}return!1}}function si(R,A){let F=qn([],[R.x,R.y,0,1],A);return new u(F[0]/F[3],F[1]/F[3])}class mn extends dl{}let Ji;Fi("HeatmapBucket",mn,{omit:["layers"]});var Ui={get paint(){return Ji=Ji||new ue({"heatmap-radius":new oo(ce.paint_heatmap["heatmap-radius"]),"heatmap-weight":new oo(ce.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Ua(ce.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Ku(ce.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Ua(ce.paint_heatmap["heatmap-opacity"])})}};function Bi(R,{width:A,height:F},W,te){if(te){if(te instanceof Uint8ClampedArray)te=new Uint8Array(te.buffer);else if(te.length!==A*F*W)throw new RangeError(`mismatched image size. expected: ${te.length} but got: ${A*F*W}`)}else te=new Uint8Array(A*F*W);return R.width=A,R.height=F,R.data=te,R}function pn(R,{width:A,height:F},W){if(A===R.width&&F===R.height)return;let te=Bi({},{width:A,height:F},W);Nn(R,te,{x:0,y:0},{x:0,y:0},{width:Math.min(R.width,A),height:Math.min(R.height,F)},W),R.width=A,R.height=F,R.data=te.data}function Nn(R,A,F,W,te,fe){if(te.width===0||te.height===0)return A;if(te.width>R.width||te.height>R.height||F.x>R.width-te.width||F.y>R.height-te.height)throw new RangeError("out of range source coordinates for image copy");if(te.width>A.width||te.height>A.height||W.x>A.width-te.width||W.y>A.height-te.height)throw new RangeError("out of range destination coordinates for image copy");let pe=R.data,Re=A.data;if(pe===Re)throw new Error("srcData equals dstData, so image is already copied");for(let Ke=0;Ke{A[R.evaluationKey]=Ke;let ft=R.expression.evaluate(A);te.data[pe+Re+0]=Math.floor(255*ft.r/ft.a),te.data[pe+Re+1]=Math.floor(255*ft.g/ft.a),te.data[pe+Re+2]=Math.floor(255*ft.b/ft.a),te.data[pe+Re+3]=Math.floor(255*ft.a)};if(R.clips)for(let pe=0,Re=0;pe80*F){Re=1/0,Ke=1/0;let Rt=-1/0,tr=-1/0;for(let ur=F;urRt&&(Rt=vr),kr>tr&&(tr=kr)}ft=Math.max(Rt-Re,tr-Ke),ft=ft!==0?32767/ft:0}return Vl(fe,pe,F,Re,Ke,ft,0),pe}function Qs(R,A,F,W,te){let fe;if(te===function(pe,Re,Ke,ft){let Rt=0;for(let tr=Re,ur=Ke-ft;tr0)for(let pe=A;pe=A;pe-=W)fe=Nt(pe/W|0,R[pe],R[pe+1],fe);return fe&&ne(fe,fe.next)&&(Ne(fe),fe=fe.next),fe}function al(R,A){if(!R)return R;A||(A=R);let F,W=R;do if(F=!1,W.steiner||!ne(W,W.next)&&de(W.prev,W,W.next)!==0)W=W.next;else{if(Ne(W),W=A=W.prev,W===W.next)break;F=!0}while(F||W!==A);return A}function Vl(R,A,F,W,te,fe,pe){if(!R)return;!pe&&fe&&function(Ke,ft,Rt,tr){let ur=Ke;do ur.z===0&&(ur.z=D(ur.x,ur.y,ft,Rt,tr)),ur.prevZ=ur.prev,ur.nextZ=ur.next,ur=ur.next;while(ur!==Ke);ur.prevZ.nextZ=null,ur.prevZ=null,function(vr){let kr,Dr=1;do{let li,pi=vr;vr=null;let vn=null;for(kr=0;pi;){kr++;let zi=pi,ln=0;for(let pa=0;pa0||Tn>0&&zi;)ln!==0&&(Tn===0||!zi||pi.z<=zi.z)?(li=pi,pi=pi.nextZ,ln--):(li=zi,zi=zi.nextZ,Tn--),vn?vn.nextZ=li:vr=li,li.prevZ=vn,vn=li;pi=zi}vn.nextZ=null,Dr*=2}while(kr>1)}(ur)}(R,W,te,fe);let Re=R;for(;R.prev!==R.next;){let Ke=R.prev,ft=R.next;if(fe?Vs(R,W,te,fe):ss(R))A.push(Ke.i,R.i,ft.i),Ne(R),R=ft.next,Re=ft.next;else if((R=ft)===Re){pe?pe===1?Vl(R=Ys(al(R),A),A,F,W,te,fe,2):pe===2&&wa(R,A,F,W,te,fe):Vl(al(R),A,F,W,te,fe,1);break}}}function ss(R){let A=R.prev,F=R,W=R.next;if(de(A,F,W)>=0)return!1;let te=A.x,fe=F.x,pe=W.x,Re=A.y,Ke=F.y,ft=W.y,Rt=tefe?te>pe?te:pe:fe>pe?fe:pe,vr=Re>Ke?Re>ft?Re:ft:Ke>ft?Ke:ft,kr=W.next;for(;kr!==A;){if(kr.x>=Rt&&kr.x<=ur&&kr.y>=tr&&kr.y<=vr&&O(te,Re,fe,Ke,pe,ft,kr.x,kr.y)&&de(kr.prev,kr,kr.next)>=0)return!1;kr=kr.next}return!0}function Vs(R,A,F,W){let te=R.prev,fe=R,pe=R.next;if(de(te,fe,pe)>=0)return!1;let Re=te.x,Ke=fe.x,ft=pe.x,Rt=te.y,tr=fe.y,ur=pe.y,vr=ReKe?Re>ft?Re:ft:Ke>ft?Ke:ft,li=Rt>tr?Rt>ur?Rt:ur:tr>ur?tr:ur,pi=D(vr,kr,A,F,W),vn=D(Dr,li,A,F,W),zi=R.prevZ,ln=R.nextZ;for(;zi&&zi.z>=pi&&ln&&ln.z<=vn;){if(zi.x>=vr&&zi.x<=Dr&&zi.y>=kr&&zi.y<=li&&zi!==te&&zi!==pe&&O(Re,Rt,Ke,tr,ft,ur,zi.x,zi.y)&&de(zi.prev,zi,zi.next)>=0||(zi=zi.prevZ,ln.x>=vr&&ln.x<=Dr&&ln.y>=kr&&ln.y<=li&&ln!==te&&ln!==pe&&O(Re,Rt,Ke,tr,ft,ur,ln.x,ln.y)&&de(ln.prev,ln,ln.next)>=0))return!1;ln=ln.nextZ}for(;zi&&zi.z>=pi;){if(zi.x>=vr&&zi.x<=Dr&&zi.y>=kr&&zi.y<=li&&zi!==te&&zi!==pe&&O(Re,Rt,Ke,tr,ft,ur,zi.x,zi.y)&&de(zi.prev,zi,zi.next)>=0)return!1;zi=zi.prevZ}for(;ln&&ln.z<=vn;){if(ln.x>=vr&&ln.x<=Dr&&ln.y>=kr&&ln.y<=li&&ln!==te&&ln!==pe&&O(Re,Rt,Ke,tr,ft,ur,ln.x,ln.y)&&de(ln.prev,ln,ln.next)>=0)return!1;ln=ln.nextZ}return!0}function Ys(R,A){let F=R;do{let W=F.prev,te=F.next.next;!ne(W,te)&&be(W,F,F.next,te)&&Yt(W,te)&&Yt(te,W)&&(A.push(W.i,F.i,te.i),Ne(F),Ne(F.next),F=R=te),F=F.next}while(F!==R);return al(F)}function wa(R,A,F,W,te,fe){let pe=R;do{let Re=pe.next.next;for(;Re!==pe.prev;){if(pe.i!==Re.i&&K(pe,Re)){let Ke=cr(pe,Re);return pe=al(pe,pe.next),Ke=al(Ke,Ke.next),Vl(pe,A,F,W,te,fe,0),void Vl(Ke,A,F,W,te,fe,0)}Re=Re.next}pe=pe.next}while(pe!==R)}function ol(R,A){return R.x-A.x}function io(R,A){let F=function(te,fe){let pe=fe,Re=te.x,Ke=te.y,ft,Rt=-1/0;do{if(Ke<=pe.y&&Ke>=pe.next.y&&pe.next.y!==pe.y){let Dr=pe.x+(Ke-pe.y)*(pe.next.x-pe.x)/(pe.next.y-pe.y);if(Dr<=Re&&Dr>Rt&&(Rt=Dr,ft=pe.x=pe.x&&pe.x>=ur&&Re!==pe.x&&O(Keft.x||pe.x===ft.x&&Y(ft,pe)))&&(ft=pe,kr=Dr)}pe=pe.next}while(pe!==tr);return ft}(R,A);if(!F)return A;let W=cr(F,R);return al(W,W.next),al(F,F.next)}function Y(R,A){return de(R.prev,R,A.prev)<0&&de(A.next,R,R.next)<0}function D(R,A,F,W,te){return(R=1431655765&((R=858993459&((R=252645135&((R=16711935&((R=(R-F)*te|0)|R<<8))|R<<4))|R<<2))|R<<1))|(A=1431655765&((A=858993459&((A=252645135&((A=16711935&((A=(A-W)*te|0)|A<<8))|A<<4))|A<<2))|A<<1))<<1}function J(R){let A=R,F=R;do(A.x=(R-pe)*(fe-Re)&&(R-pe)*(W-Re)>=(F-pe)*(A-Re)&&(F-pe)*(fe-Re)>=(te-pe)*(W-Re)}function K(R,A){return R.next.i!==A.i&&R.prev.i!==A.i&&!function(F,W){let te=F;do{if(te.i!==F.i&&te.next.i!==F.i&&te.i!==W.i&&te.next.i!==W.i&&be(te,te.next,F,W))return!0;te=te.next}while(te!==F);return!1}(R,A)&&(Yt(R,A)&&Yt(A,R)&&function(F,W){let te=F,fe=!1,pe=(F.x+W.x)/2,Re=(F.y+W.y)/2;do te.y>Re!=te.next.y>Re&&te.next.y!==te.y&&pe<(te.next.x-te.x)*(Re-te.y)/(te.next.y-te.y)+te.x&&(fe=!fe),te=te.next;while(te!==F);return fe}(R,A)&&(de(R.prev,R,A.prev)||de(R,A.prev,A))||ne(R,A)&&de(R.prev,R,R.next)>0&&de(A.prev,A,A.next)>0)}function de(R,A,F){return(A.y-R.y)*(F.x-A.x)-(A.x-R.x)*(F.y-A.y)}function ne(R,A){return R.x===A.x&&R.y===A.y}function be(R,A,F,W){let te=ht(de(R,A,F)),fe=ht(de(R,A,W)),pe=ht(de(F,W,R)),Re=ht(de(F,W,A));return te!==fe&&pe!==Re||!(te!==0||!Be(R,F,A))||!(fe!==0||!Be(R,W,A))||!(pe!==0||!Be(F,R,W))||!(Re!==0||!Be(F,A,W))}function Be(R,A,F){return A.x<=Math.max(R.x,F.x)&&A.x>=Math.min(R.x,F.x)&&A.y<=Math.max(R.y,F.y)&&A.y>=Math.min(R.y,F.y)}function ht(R){return R>0?1:R<0?-1:0}function Yt(R,A){return de(R.prev,R,R.next)<0?de(R,A,R.next)>=0&&de(R,R.prev,A)>=0:de(R,A,R.prev)<0||de(R,R.next,A)<0}function cr(R,A){let F=$e(R.i,R.x,R.y),W=$e(A.i,A.x,A.y),te=R.next,fe=A.prev;return R.next=A,A.prev=R,F.next=te,te.prev=F,W.next=F,F.prev=W,fe.next=W,W.prev=fe,W}function Nt(R,A,F,W){let te=$e(R,A,F);return W?(te.next=W.next,te.prev=W,W.next.prev=te,W.next=te):(te.prev=te,te.next=te),te}function Ne(R){R.next.prev=R.prev,R.prev.next=R.next,R.prevZ&&(R.prevZ.nextZ=R.nextZ),R.nextZ&&(R.nextZ.prevZ=R.prevZ)}function $e(R,A,F){return{i:R,x:A,y:F,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function ot(R,A,F){let W=F.patternDependencies,te=!1;for(let fe of A){let pe=fe.paint.get(`${R}-pattern`);pe.isConstant()||(te=!0);let Re=pe.constantOr(null);Re&&(te=!0,W[Re.to]=!0,W[Re.from]=!0)}return te}function It(R,A,F,W,te){let fe=te.patternDependencies;for(let pe of A){let Re=pe.paint.get(`${R}-pattern`).value;if(Re.kind!=="constant"){let Ke=Re.evaluate({zoom:W-1},F,{},te.availableImages),ft=Re.evaluate({zoom:W},F,{},te.availableImages),Rt=Re.evaluate({zoom:W+1},F,{},te.availableImages);Ke=Ke&&Ke.name?Ke.name:Ke,ft=ft&&ft.name?ft.name:ft,Rt=Rt&&Rt.name?Rt.name:Rt,fe[Ke]=!0,fe[ft]=!0,fe[Rt]=!0,F.patterns[pe.id]={min:Ke,mid:ft,max:Rt}}}return F}class Bt{constructor(A){this.zoom=A.zoom,this.overscaling=A.overscaling,this.layers=A.layers,this.layerIds=this.layers.map(F=>F.id),this.index=A.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new hl,this.indexArray=new se,this.indexArray2=new Te,this.programConfigurations=new Ms(A.layers,A.zoom),this.segments=new Ye,this.segments2=new Ye,this.stateDependentLayerIds=this.layers.filter(F=>F.isStateDependent()).map(F=>F.id)}populate(A,F,W){this.hasPattern=ot("fill",this.layers,F);let te=this.layers[0].layout.get("fill-sort-key"),fe=!te.isConstant(),pe=[];for(let{feature:Re,id:Ke,index:ft,sourceLayerIndex:Rt}of A){let tr=this.layers[0]._featureFilter.needGeometry,ur=Sl(Re,tr);if(!this.layers[0]._featureFilter.filter(new rs(this.zoom),ur,W))continue;let vr=fe?te.evaluate(ur,{},W,F.availableImages):void 0,kr={id:Ke,properties:Re.properties,type:Re.type,sourceLayerIndex:Rt,index:ft,geometry:tr?ur.geometry:$s(Re),patterns:{},sortKey:vr};pe.push(kr)}fe&&pe.sort((Re,Ke)=>Re.sortKey-Ke.sortKey);for(let Re of pe){let{geometry:Ke,index:ft,sourceLayerIndex:Rt}=Re;if(this.hasPattern){let tr=It("fill",this.layers,Re,this.zoom,F);this.patternFeatures.push(tr)}else this.addFeature(Re,Ke,ft,W,{});F.featureIndex.insert(A[ft].feature,Ke,ft,Rt,this.index)}}update(A,F,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(A,F,this.stateDependentLayers,W)}addFeatures(A,F,W){for(let te of this.patternFeatures)this.addFeature(te,te.geometry,te.index,F,W)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(A){this.uploaded||(this.layoutVertexBuffer=A.createVertexBuffer(this.layoutVertexArray,Ml),this.indexBuffer=A.createIndexBuffer(this.indexArray),this.indexBuffer2=A.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(A),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(A,F,W,te,fe){for(let pe of Cf(F,500)){let Re=0;for(let vr of pe)Re+=vr.length;let Ke=this.segments.prepareSegment(Re,this.layoutVertexArray,this.indexArray),ft=Ke.vertexLength,Rt=[],tr=[];for(let vr of pe){if(vr.length===0)continue;vr!==pe[0]&&tr.push(Rt.length/2);let kr=this.segments2.prepareSegment(vr.length,this.layoutVertexArray,this.indexArray2),Dr=kr.vertexLength;this.layoutVertexArray.emplaceBack(vr[0].x,vr[0].y),this.indexArray2.emplaceBack(Dr+vr.length-1,Dr),Rt.push(vr[0].x),Rt.push(vr[0].y);for(let li=1;li>3}if(te--,W===1||W===2)fe+=R.readSVarint(),pe+=R.readSVarint(),W===1&&(A&&Re.push(A),A=[]),A.push(new Br(fe,pe));else{if(W!==7)throw new Error("unknown command "+W);A&&A.push(A[0].clone())}}return A&&Re.push(A),Re},ci.prototype.bbox=function(){var R=this._pbf;R.pos=this._geometry;for(var A=R.readVarint()+R.pos,F=1,W=0,te=0,fe=0,pe=1/0,Re=-1/0,Ke=1/0,ft=-1/0;R.pos>3}if(W--,F===1||F===2)(te+=R.readSVarint())Re&&(Re=te),(fe+=R.readSVarint())ft&&(ft=fe);else if(F!==7)throw new Error("unknown command "+F)}return[pe,Ke,Re,ft]},ci.prototype.toGeoJSON=function(R,A,F){var W,te,fe=this.extent*Math.pow(2,F),pe=this.extent*R,Re=this.extent*A,Ke=this.loadGeometry(),ft=ci.types[this.type];function Rt(vr){for(var kr=0;kr>3;te=pe===1?W.readString():pe===2?W.readFloat():pe===3?W.readDouble():pe===4?W.readVarint64():pe===5?W.readVarint():pe===6?W.readSVarint():pe===7?W.readBoolean():null}return te}(F))}Oi.prototype.feature=function(R){if(R<0||R>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[R];var A=this._pbf.readVarint()+this._pbf.pos;return new tn(this._pbf,A,this.extent,this._keys,this._values)};var on=Ei;function zn(R,A,F){if(R===3){var W=new on(F,F.readVarint()+F.pos);W.length&&(A[W.name]=W)}}yr.VectorTile=function(R,A){this.layers=R.readFields(zn,{},A)},yr.VectorTileFeature=Di,yr.VectorTileLayer=Ei;let Ja=yr.VectorTileFeature.types,co=Math.pow(2,13);function ts(R,A,F,W,te,fe,pe,Re){R.emplaceBack(A,F,2*Math.floor(W*co)+pe,te*co*2,fe*co*2,Math.round(Re))}class so{constructor(A){this.zoom=A.zoom,this.overscaling=A.overscaling,this.layers=A.layers,this.layerIds=this.layers.map(F=>F.id),this.index=A.index,this.hasPattern=!1,this.layoutVertexArray=new Ul,this.centroidVertexArray=new wo,this.indexArray=new se,this.programConfigurations=new Ms(A.layers,A.zoom),this.segments=new Ye,this.stateDependentLayerIds=this.layers.filter(F=>F.isStateDependent()).map(F=>F.id)}populate(A,F,W){this.features=[],this.hasPattern=ot("fill-extrusion",this.layers,F);for(let{feature:te,id:fe,index:pe,sourceLayerIndex:Re}of A){let Ke=this.layers[0]._featureFilter.needGeometry,ft=Sl(te,Ke);if(!this.layers[0]._featureFilter.filter(new rs(this.zoom),ft,W))continue;let Rt={id:fe,sourceLayerIndex:Re,index:pe,geometry:Ke?ft.geometry:$s(te),properties:te.properties,type:te.type,patterns:{}};this.hasPattern?this.features.push(It("fill-extrusion",this.layers,Rt,this.zoom,F)):this.addFeature(Rt,Rt.geometry,pe,W,{}),F.featureIndex.insert(te,Rt.geometry,pe,Re,this.index,!0)}}addFeatures(A,F,W){for(let te of this.features){let{geometry:fe}=te;this.addFeature(te,fe,te.index,F,W)}}update(A,F,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(A,F,this.stateDependentLayers,W)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(A){this.uploaded||(this.layoutVertexBuffer=A.createVertexBuffer(this.layoutVertexArray,lr),this.centroidVertexBuffer=A.createVertexBuffer(this.centroidVertexArray,vt.members,!0),this.indexBuffer=A.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(A),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(A,F,W,te,fe){for(let pe of Cf(F,500)){let Re={x:0,y:0,vertexCount:0},Ke=0;for(let kr of pe)Ke+=kr.length;let ft=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(let kr of pe){if(kr.length===0||ms(kr))continue;let Dr=0;for(let li=0;li=1){let vn=kr[li-1];if(!Yo(pi,vn)){ft.vertexLength+4>Ye.MAX_VERTEX_ARRAY_LENGTH&&(ft=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let zi=pi.sub(vn)._perp()._unit(),ln=vn.dist(pi);Dr+ln>32768&&(Dr=0),ts(this.layoutVertexArray,pi.x,pi.y,zi.x,zi.y,0,0,Dr),ts(this.layoutVertexArray,pi.x,pi.y,zi.x,zi.y,0,1,Dr),Re.x+=2*pi.x,Re.y+=2*pi.y,Re.vertexCount+=2,Dr+=ln,ts(this.layoutVertexArray,vn.x,vn.y,zi.x,zi.y,0,0,Dr),ts(this.layoutVertexArray,vn.x,vn.y,zi.x,zi.y,0,1,Dr),Re.x+=2*vn.x,Re.y+=2*vn.y,Re.vertexCount+=2;let Tn=ft.vertexLength;this.indexArray.emplaceBack(Tn,Tn+2,Tn+1),this.indexArray.emplaceBack(Tn+1,Tn+2,Tn+3),ft.vertexLength+=4,ft.primitiveLength+=2}}}}if(ft.vertexLength+Ke>Ye.MAX_VERTEX_ARRAY_LENGTH&&(ft=this.segments.prepareSegment(Ke,this.layoutVertexArray,this.indexArray)),Ja[A.type]!=="Polygon")continue;let Rt=[],tr=[],ur=ft.vertexLength;for(let kr of pe)if(kr.length!==0){kr!==pe[0]&&tr.push(Rt.length/2);for(let Dr=0;Drja)||R.y===A.y&&(R.y<0||R.y>ja)}function ms(R){return R.every(A=>A.x<0)||R.every(A=>A.x>ja)||R.every(A=>A.y<0)||R.every(A=>A.y>ja)}let ou;Fi("FillExtrusionBucket",so,{omit:["layers","features"]});var Cv={get paint(){return ou=ou||new ue({"fill-extrusion-opacity":new Ua(ce["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new oo(ce["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Ua(ce["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Ua(ce["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Vc(ce["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new oo(ce["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new oo(ce["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Ua(ce["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class Lv extends B{constructor(A){super(A,Cv)}createBucket(A){return new so(A)}queryRadius(){return Vn(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(A,F,W,te,fe,pe,Re,Ke){let ft=Qi(A,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),pe.angle,Re),Rt=this.paint.get("fill-extrusion-height").evaluate(F,W),tr=this.paint.get("fill-extrusion-base").evaluate(F,W),ur=function(kr,Dr,li,pi){let vn=[];for(let zi of kr){let ln=[zi.x,zi.y,0,1];qn(ln,ln,Dr),vn.push(new u(ln[0]/ln[3],ln[1]/ln[3]))}return vn}(ft,Ke),vr=function(kr,Dr,li,pi){let vn=[],zi=[],ln=pi[8]*Dr,Tn=pi[9]*Dr,pa=pi[10]*Dr,ro=pi[11]*Dr,Vo=pi[8]*li,Xa=pi[9]*li,la=pi[10]*li,Mo=pi[11]*li;for(let fo of kr){let lo=[],Wn=[];for(let Ro of fo){let uo=Ro.x,$o=Ro.y,Ju=pi[0]*uo+pi[4]*$o+pi[12],Ou=pi[1]*uo+pi[5]*$o+pi[13],kh=pi[2]*uo+pi[6]*$o+pi[14],Qv=pi[3]*uo+pi[7]*$o+pi[15],ud=kh+pa,Ch=Qv+ro,Vd=Ju+Vo,Gd=Ou+Xa,Hd=kh+la,Af=Qv+Mo,Lh=new u((Ju+ln)/Ch,(Ou+Tn)/Ch);Lh.z=ud/Ch,lo.push(Lh);let Ed=new u(Vd/Af,Gd/Af);Ed.z=Hd/Af,Wn.push(Ed)}vn.push(lo),zi.push(Wn)}return[vn,zi]}(te,tr,Rt,Ke);return function(kr,Dr,li){let pi=1/0;bt(li,Dr)&&(pi=Kv(li,Dr[0]));for(let vn=0;vnF.id),this.index=A.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(F=>{this.gradients[F.id]={}}),this.layoutVertexArray=new Lu,this.layoutVertexArray2=new au,this.indexArray=new se,this.programConfigurations=new Ms(A.layers,A.zoom),this.segments=new Ye,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(F=>F.isStateDependent()).map(F=>F.id)}populate(A,F,W){this.hasPattern=ot("line",this.layers,F);let te=this.layers[0].layout.get("line-sort-key"),fe=!te.isConstant(),pe=[];for(let{feature:Re,id:Ke,index:ft,sourceLayerIndex:Rt}of A){let tr=this.layers[0]._featureFilter.needGeometry,ur=Sl(Re,tr);if(!this.layers[0]._featureFilter.filter(new rs(this.zoom),ur,W))continue;let vr=fe?te.evaluate(ur,{},W):void 0,kr={id:Ke,properties:Re.properties,type:Re.type,sourceLayerIndex:Rt,index:ft,geometry:tr?ur.geometry:$s(Re),patterns:{},sortKey:vr};pe.push(kr)}fe&&pe.sort((Re,Ke)=>Re.sortKey-Ke.sortKey);for(let Re of pe){let{geometry:Ke,index:ft,sourceLayerIndex:Rt}=Re;if(this.hasPattern){let tr=It("line",this.layers,Re,this.zoom,F);this.patternFeatures.push(tr)}else this.addFeature(Re,Ke,ft,W,{});F.featureIndex.insert(A[ft].feature,Ke,ft,Rt,this.index)}}update(A,F,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(A,F,this.stateDependentLayers,W)}addFeatures(A,F,W){for(let te of this.patternFeatures)this.addFeature(te,te.geometry,te.index,F,W)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(A){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=A.createVertexBuffer(this.layoutVertexArray2,mp)),this.layoutVertexBuffer=A.createVertexBuffer(this.layoutVertexArray,gp),this.indexBuffer=A.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(A),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(A){if(A.properties&&Object.prototype.hasOwnProperty.call(A.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(A.properties,"mapbox_clip_end"))return{start:+A.properties.mapbox_clip_start,end:+A.properties.mapbox_clip_end}}addFeature(A,F,W,te,fe){let pe=this.layers[0].layout,Re=pe.get("line-join").evaluate(A,{}),Ke=pe.get("line-cap"),ft=pe.get("line-miter-limit"),Rt=pe.get("line-round-limit");this.lineClips=this.lineFeatureClips(A);for(let tr of F)this.addLine(tr,A,Re,Ke,ft,Rt);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,A,W,fe,te)}addLine(A,F,W,te,fe,pe){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let pi=0;pi=2&&A[Ke-1].equals(A[Ke-2]);)Ke--;let ft=0;for(;ft0;if(ro&&pi>ft){let Mo=ur.dist(vr);if(Mo>2*Rt){let fo=ur.sub(ur.sub(vr)._mult(Rt/Mo)._round());this.updateDistance(vr,fo),this.addCurrentVertex(fo,Dr,0,0,tr),vr=fo}}let Xa=vr&&kr,la=Xa?W:Re?"butt":te;if(Xa&&la==="round"&&(Tnfe&&(la="bevel"),la==="bevel"&&(Tn>2&&(la="flipbevel"),Tn100)vn=li.mult(-1);else{let Mo=Tn*Dr.add(li).mag()/Dr.sub(li).mag();vn._perp()._mult(Mo*(Vo?-1:1))}this.addCurrentVertex(ur,vn,0,0,tr),this.addCurrentVertex(ur,vn.mult(-1),0,0,tr)}else if(la==="bevel"||la==="fakeround"){let Mo=-Math.sqrt(Tn*Tn-1),fo=Vo?Mo:0,lo=Vo?0:Mo;if(vr&&this.addCurrentVertex(ur,Dr,fo,lo,tr),la==="fakeround"){let Wn=Math.round(180*pa/Math.PI/20);for(let Ro=1;Ro2*Rt){let fo=ur.add(kr.sub(ur)._mult(Rt/Mo)._round());this.updateDistance(ur,fo),this.addCurrentVertex(fo,li,0,0,tr),ur=fo}}}}addCurrentVertex(A,F,W,te,fe,pe=!1){let Re=F.y*te-F.x,Ke=-F.y-F.x*te;this.addHalfVertex(A,F.x+F.y*W,F.y-F.x*W,pe,!1,W,fe),this.addHalfVertex(A,Re,Ke,pe,!0,-te,fe),this.distance>Pv/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(A,F,W,te,fe,pe))}addHalfVertex({x:A,y:F},W,te,fe,pe,Re,Ke){let ft=.5*(this.lineClips?this.scaledDistance*(Pv-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((A<<1)+(fe?1:0),(F<<1)+(pe?1:0),Math.round(63*W)+128,Math.round(63*te)+128,1+(Re===0?0:Re<0?-1:1)|(63&ft)<<2,ft>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let Rt=Ke.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Rt),Ke.primitiveLength++),pe?this.e2=Rt:this.e1=Rt}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(A,F){this.distance+=A.dist(F),this.updateScaledDistance()}}let Iv,fy;Fi("LineBucket",Jv,{omit:["layers","patternFeatures"]});var dg={get paint(){return fy=fy||new ue({"line-opacity":new oo(ce.paint_line["line-opacity"]),"line-color":new oo(ce.paint_line["line-color"]),"line-translate":new Ua(ce.paint_line["line-translate"]),"line-translate-anchor":new Ua(ce.paint_line["line-translate-anchor"]),"line-width":new oo(ce.paint_line["line-width"]),"line-gap-width":new oo(ce.paint_line["line-gap-width"]),"line-offset":new oo(ce.paint_line["line-offset"]),"line-blur":new oo(ce.paint_line["line-blur"]),"line-dasharray":new hc(ce.paint_line["line-dasharray"]),"line-pattern":new Vc(ce.paint_line["line-pattern"]),"line-gradient":new Ku(ce.paint_line["line-gradient"])})},get layout(){return Iv=Iv||new ue({"line-cap":new Ua(ce.layout_line["line-cap"]),"line-join":new oo(ce.layout_line["line-join"]),"line-miter-limit":new Ua(ce.layout_line["line-miter-limit"]),"line-round-limit":new Ua(ce.layout_line["line-round-limit"]),"line-sort-key":new oo(ce.layout_line["line-sort-key"])})}};class oh extends oo{possiblyEvaluate(A,F){return F=new rs(Math.floor(F.zoom),{now:F.now,fadeDuration:F.fadeDuration,zoomHistory:F.zoomHistory,transition:F.transition}),super.possiblyEvaluate(A,F)}evaluate(A,F,W,te){return F=L({},F,{zoom:Math.floor(F.zoom)}),super.evaluate(A,F,W,te)}}let vg;class hy extends B{constructor(A){super(A,dg),this.gradientVersion=0,vg||(vg=new oh(dg.paint.properties["line-width"].specification),vg.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(A){if(A==="line-gradient"){let F=this.gradientExpression();this.stepInterpolant=!!function(W){return W._styleExpression!==void 0}(F)&&F._styleExpression.expression instanceof _n,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(A,F){super.recalculate(A,F),this.paint._values["line-floorwidth"]=vg.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,A)}createBucket(A){return new Jv(A)}queryRadius(A){let F=A,W=Zh(Si("line-width",this,F),Si("line-gap-width",this,F)),te=Si("line-offset",this,F);return W/2+Math.abs(te)+Vn(this.paint.get("line-translate"))}queryIntersectsFeature(A,F,W,te,fe,pe,Re){let Ke=Qi(A,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),pe.angle,Re),ft=Re/2*Zh(this.paint.get("line-width").evaluate(F,W),this.paint.get("line-gap-width").evaluate(F,W)),Rt=this.paint.get("line-offset").evaluate(F,W);return Rt&&(te=function(tr,ur){let vr=[];for(let kr=0;kr=3){for(let li=0;li0?A+2*R:R}let am=ze([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),k1=ze([{name:"a_projected_pos",components:3,type:"Float32"}],4);ze([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let C1=ze([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);ze([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);let dy=ze([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),om=ze([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function sm(R,A,F){return R.sections.forEach(W=>{W.text=function(te,fe,pe){let Re=fe.layout.get("text-transform").evaluate(pe,{});return Re==="uppercase"?te=te.toLocaleUpperCase():Re==="lowercase"&&(te=te.toLocaleLowerCase()),ys.applyArabicShaping&&(te=ys.applyArabicShaping(te)),te}(W.text,A,F)}),R}ze([{name:"triangle",components:3,type:"Uint16"}]),ze([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),ze([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),ze([{type:"Float32",name:"offsetX"}]),ze([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ze([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);let vc={"!":"\uFE15","#":"\uFF03",$:"\uFF04","%":"\uFF05","&":"\uFF06","(":"\uFE35",")":"\uFE36","*":"\uFF0A","+":"\uFF0B",",":"\uFE10","-":"\uFE32",".":"\u30FB","/":"\uFF0F",":":"\uFE13",";":"\uFE14","<":"\uFE3F","=":"\uFF1D",">":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"};var tu=24,Sd=wu,vy=function(R,A,F,W,te){var fe,pe,Re=8*te-W-1,Ke=(1<>1,Rt=-7,tr=F?te-1:0,ur=F?-1:1,vr=R[A+tr];for(tr+=ur,fe=vr&(1<<-Rt)-1,vr>>=-Rt,Rt+=Re;Rt>0;fe=256*fe+R[A+tr],tr+=ur,Rt-=8);for(pe=fe&(1<<-Rt)-1,fe>>=-Rt,Rt+=W;Rt>0;pe=256*pe+R[A+tr],tr+=ur,Rt-=8);if(fe===0)fe=1-ft;else{if(fe===Ke)return pe?NaN:1/0*(vr?-1:1);pe+=Math.pow(2,W),fe-=ft}return(vr?-1:1)*pe*Math.pow(2,fe-W)},L1=function(R,A,F,W,te,fe){var pe,Re,Ke,ft=8*fe-te-1,Rt=(1<>1,ur=te===23?Math.pow(2,-24)-Math.pow(2,-77):0,vr=W?0:fe-1,kr=W?1:-1,Dr=A<0||A===0&&1/A<0?1:0;for(A=Math.abs(A),isNaN(A)||A===1/0?(Re=isNaN(A)?1:0,pe=Rt):(pe=Math.floor(Math.log(A)/Math.LN2),A*(Ke=Math.pow(2,-pe))<1&&(pe--,Ke*=2),(A+=pe+tr>=1?ur/Ke:ur*Math.pow(2,1-tr))*Ke>=2&&(pe++,Ke/=2),pe+tr>=Rt?(Re=0,pe=Rt):pe+tr>=1?(Re=(A*Ke-1)*Math.pow(2,te),pe+=tr):(Re=A*Math.pow(2,tr-1)*Math.pow(2,te),pe=0));te>=8;R[F+vr]=255&Re,vr+=kr,Re/=256,te-=8);for(pe=pe<0;R[F+vr]=255&pe,vr+=kr,pe/=256,ft-=8);R[F+vr-kr]|=128*Dr};function wu(R){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(R)?R:new Uint8Array(R||0),this.pos=0,this.type=0,this.length=this.buf.length}wu.Varint=0,wu.Fixed64=1,wu.Bytes=2,wu.Fixed32=5;var Yx=4294967296,lm=1/Yx,Ow=typeof TextDecoder=="undefined"?null:new TextDecoder("utf-8");function Rv(R){return R.type===wu.Bytes?R.readVarint()+R.pos:R.pos+1}function um(R,A,F){return F?4294967296*A+(R>>>0):4294967296*(A>>>0)+(R>>>0)}function Bw(R,A,F){var W=A<=16383?1:A<=2097151?2:A<=268435455?3:Math.floor(Math.log(A)/(7*Math.LN2));F.realloc(W);for(var te=F.pos-1;te>=R;te--)F.buf[te+W]=F.buf[te]}function Kx(R,A){for(var F=0;F>>8,R[F+2]=A>>>16,R[F+3]=A>>>24}function SC(R,A){return(R[A]|R[A+1]<<8|R[A+2]<<16)+(R[A+3]<<24)}wu.prototype={destroy:function(){this.buf=null},readFields:function(R,A,F){for(F=F||this.length;this.pos>3,fe=this.pos;this.type=7&W,R(te,A,this),this.pos===fe&&this.skip(W)}return A},readMessage:function(R,A){return this.readFields(R,A,this.readVarint()+this.pos)},readFixed32:function(){var R=py(this.buf,this.pos);return this.pos+=4,R},readSFixed32:function(){var R=SC(this.buf,this.pos);return this.pos+=4,R},readFixed64:function(){var R=py(this.buf,this.pos)+py(this.buf,this.pos+4)*Yx;return this.pos+=8,R},readSFixed64:function(){var R=py(this.buf,this.pos)+SC(this.buf,this.pos+4)*Yx;return this.pos+=8,R},readFloat:function(){var R=vy(this.buf,this.pos,!0,23,4);return this.pos+=4,R},readDouble:function(){var R=vy(this.buf,this.pos,!0,52,8);return this.pos+=8,R},readVarint:function(R){var A,F,W=this.buf;return A=127&(F=W[this.pos++]),F<128?A:(A|=(127&(F=W[this.pos++]))<<7,F<128?A:(A|=(127&(F=W[this.pos++]))<<14,F<128?A:(A|=(127&(F=W[this.pos++]))<<21,F<128?A:function(te,fe,pe){var Re,Ke,ft=pe.buf;if(Re=(112&(Ke=ft[pe.pos++]))>>4,Ke<128||(Re|=(127&(Ke=ft[pe.pos++]))<<3,Ke<128)||(Re|=(127&(Ke=ft[pe.pos++]))<<10,Ke<128)||(Re|=(127&(Ke=ft[pe.pos++]))<<17,Ke<128)||(Re|=(127&(Ke=ft[pe.pos++]))<<24,Ke<128)||(Re|=(1&(Ke=ft[pe.pos++]))<<31,Ke<128))return um(te,Re,fe);throw new Error("Expected varint not more than 10 bytes")}(A|=(15&(F=W[this.pos]))<<28,R,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var R=this.readVarint();return R%2==1?(R+1)/-2:R/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var R=this.readVarint()+this.pos,A=this.pos;return this.pos=R,R-A>=12&&Ow?function(F,W,te){return Ow.decode(F.subarray(W,te))}(this.buf,A,R):function(F,W,te){for(var fe="",pe=W;pe239?4:Rt>223?3:Rt>191?2:1;if(pe+ur>te)break;ur===1?Rt<128&&(tr=Rt):ur===2?(192&(Re=F[pe+1]))==128&&(tr=(31&Rt)<<6|63&Re)<=127&&(tr=null):ur===3?(Ke=F[pe+2],(192&(Re=F[pe+1]))==128&&(192&Ke)==128&&((tr=(15&Rt)<<12|(63&Re)<<6|63&Ke)<=2047||tr>=55296&&tr<=57343)&&(tr=null)):ur===4&&(Ke=F[pe+2],ft=F[pe+3],(192&(Re=F[pe+1]))==128&&(192&Ke)==128&&(192&ft)==128&&((tr=(15&Rt)<<18|(63&Re)<<12|(63&Ke)<<6|63&ft)<=65535||tr>=1114112)&&(tr=null)),tr===null?(tr=65533,ur=1):tr>65535&&(tr-=65536,fe+=String.fromCharCode(tr>>>10&1023|55296),tr=56320|1023&tr),fe+=String.fromCharCode(tr),pe+=ur}return fe}(this.buf,A,R)},readBytes:function(){var R=this.readVarint()+this.pos,A=this.buf.subarray(this.pos,R);return this.pos=R,A},readPackedVarint:function(R,A){if(this.type!==wu.Bytes)return R.push(this.readVarint(A));var F=Rv(this);for(R=R||[];this.pos127;);else if(A===wu.Bytes)this.pos=this.readVarint()+this.pos;else if(A===wu.Fixed32)this.pos+=4;else{if(A!==wu.Fixed64)throw new Error("Unimplemented type: "+A);this.pos+=8}},writeTag:function(R,A){this.writeVarint(R<<3|A)},realloc:function(R){for(var A=this.length||16;A268435455||R<0?function(A,F){var W,te;if(A>=0?(W=A%4294967296|0,te=A/4294967296|0):(te=~(-A/4294967296),4294967295^(W=~(-A%4294967296))?W=W+1|0:(W=0,te=te+1|0)),A>=18446744073709552e3||A<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");F.realloc(10),function(fe,pe,Re){Re.buf[Re.pos++]=127&fe|128,fe>>>=7,Re.buf[Re.pos++]=127&fe|128,fe>>>=7,Re.buf[Re.pos++]=127&fe|128,fe>>>=7,Re.buf[Re.pos++]=127&fe|128,Re.buf[Re.pos]=127&(fe>>>=7)}(W,0,F),function(fe,pe){var Re=(7&fe)<<4;pe.buf[pe.pos++]|=Re|((fe>>>=3)?128:0),fe&&(pe.buf[pe.pos++]=127&fe|((fe>>>=7)?128:0),fe&&(pe.buf[pe.pos++]=127&fe|((fe>>>=7)?128:0),fe&&(pe.buf[pe.pos++]=127&fe|((fe>>>=7)?128:0),fe&&(pe.buf[pe.pos++]=127&fe|((fe>>>=7)?128:0),fe&&(pe.buf[pe.pos++]=127&fe)))))}(te,F)}(R,this):(this.realloc(4),this.buf[this.pos++]=127&R|(R>127?128:0),R<=127||(this.buf[this.pos++]=127&(R>>>=7)|(R>127?128:0),R<=127||(this.buf[this.pos++]=127&(R>>>=7)|(R>127?128:0),R<=127||(this.buf[this.pos++]=R>>>7&127))))},writeSVarint:function(R){this.writeVarint(R<0?2*-R-1:2*R)},writeBoolean:function(R){this.writeVarint(!!R)},writeString:function(R){R=String(R),this.realloc(4*R.length),this.pos++;var A=this.pos;this.pos=function(W,te,fe){for(var pe,Re,Ke=0;Ke55295&&pe<57344){if(!Re){pe>56319||Ke+1===te.length?(W[fe++]=239,W[fe++]=191,W[fe++]=189):Re=pe;continue}if(pe<56320){W[fe++]=239,W[fe++]=191,W[fe++]=189,Re=pe;continue}pe=Re-55296<<10|pe-56320|65536,Re=null}else Re&&(W[fe++]=239,W[fe++]=191,W[fe++]=189,Re=null);pe<128?W[fe++]=pe:(pe<2048?W[fe++]=pe>>6|192:(pe<65536?W[fe++]=pe>>12|224:(W[fe++]=pe>>18|240,W[fe++]=pe>>12&63|128),W[fe++]=pe>>6&63|128),W[fe++]=63&pe|128)}return fe}(this.buf,R,this.pos);var F=this.pos-A;F>=128&&Bw(A,F,this),this.pos=A-1,this.writeVarint(F),this.pos+=F},writeFloat:function(R){this.realloc(4),L1(this.buf,R,this.pos,!0,23,4),this.pos+=4},writeDouble:function(R){this.realloc(8),L1(this.buf,R,this.pos,!0,52,8),this.pos+=8},writeBytes:function(R){var A=R.length;this.writeVarint(A),this.realloc(A);for(var F=0;F=128&&Bw(F,W,this),this.pos=F-1,this.writeVarint(W),this.pos+=W},writeMessage:function(R,A,F){this.writeTag(R,wu.Bytes),this.writeRawMessage(A,F)},writePackedVarint:function(R,A){A.length&&this.writeMessage(R,Kx,A)},writePackedSVarint:function(R,A){A.length&&this.writeMessage(R,V9,A)},writePackedBoolean:function(R,A){A.length&&this.writeMessage(R,j9,A)},writePackedFloat:function(R,A){A.length&&this.writeMessage(R,G9,A)},writePackedDouble:function(R,A){A.length&&this.writeMessage(R,H9,A)},writePackedFixed32:function(R,A){A.length&&this.writeMessage(R,qQ,A)},writePackedSFixed32:function(R,A){A.length&&this.writeMessage(R,W9,A)},writePackedFixed64:function(R,A){A.length&&this.writeMessage(R,X9,A)},writePackedSFixed64:function(R,A){A.length&&this.writeMessage(R,Z9,A)},writeBytesField:function(R,A){this.writeTag(R,wu.Bytes),this.writeBytes(A)},writeFixed32Field:function(R,A){this.writeTag(R,wu.Fixed32),this.writeFixed32(A)},writeSFixed32Field:function(R,A){this.writeTag(R,wu.Fixed32),this.writeSFixed32(A)},writeFixed64Field:function(R,A){this.writeTag(R,wu.Fixed64),this.writeFixed64(A)},writeSFixed64Field:function(R,A){this.writeTag(R,wu.Fixed64),this.writeSFixed64(A)},writeVarintField:function(R,A){this.writeTag(R,wu.Varint),this.writeVarint(A)},writeSVarintField:function(R,A){this.writeTag(R,wu.Varint),this.writeSVarint(A)},writeStringField:function(R,A){this.writeTag(R,wu.Bytes),this.writeString(A)},writeFloatField:function(R,A){this.writeTag(R,wu.Fixed32),this.writeFloat(A)},writeDoubleField:function(R,A){this.writeTag(R,wu.Fixed64),this.writeDouble(A)},writeBooleanField:function(R,A){this.writeVarintField(R,!!A)}};var lS=o(Sd);let uS=3;function OQ(R,A,F){R===1&&F.readMessage(Y9,A)}function Y9(R,A,F){if(R===3){let{id:W,bitmap:te,width:fe,height:pe,left:Re,top:Ke,advance:ft}=F.readMessage(MC,{});A.push({id:W,bitmap:new aa({width:fe+2*uS,height:pe+2*uS},te),metrics:{width:fe,height:pe,left:Re,top:Ke,advance:ft}})}}function MC(R,A,F){R===1?A.id=F.readVarint():R===2?A.bitmap=F.readBytes():R===3?A.width=F.readVarint():R===4?A.height=F.readVarint():R===5?A.left=F.readSVarint():R===6?A.top=F.readSVarint():R===7&&(A.advance=F.readVarint())}let EC=uS;function cS(R){let A=0,F=0;for(let pe of R)A+=pe.w*pe.h,F=Math.max(F,pe.w);R.sort((pe,Re)=>Re.h-pe.h);let W=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(A/.95)),F),h:1/0}],te=0,fe=0;for(let pe of R)for(let Re=W.length-1;Re>=0;Re--){let Ke=W[Re];if(!(pe.w>Ke.w||pe.h>Ke.h)){if(pe.x=Ke.x,pe.y=Ke.y,fe=Math.max(fe,pe.y+pe.h),te=Math.max(te,pe.x+pe.w),pe.w===Ke.w&&pe.h===Ke.h){let ft=W.pop();Re=0&&W>=A&&Vw[this.text.charCodeAt(W)];W--)F--;this.text=this.text.substring(A,F),this.sectionIndex=this.sectionIndex.slice(A,F)}substring(A,F){let W=new P1;return W.text=this.text.substring(A,F),W.sectionIndex=this.sectionIndex.slice(A,F),W.sections=this.sections,W}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((A,F)=>Math.max(A,this.sections[F].scale),0)}addTextSection(A,F){this.text+=A.text,this.sections.push($x.forText(A.scale,A.fontStack||F));let W=this.sections.length-1;for(let te=0;te=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Qx(R,A,F,W,te,fe,pe,Re,Ke,ft,Rt,tr,ur,vr,kr){let Dr=P1.fromFeature(R,te),li;tr===i.ah.vertical&&Dr.verticalizePunctuation();let{processBidirectionalText:pi,processStyledBidirectionalText:vn}=ys;if(pi&&Dr.sections.length===1){li=[];let Tn=pi(Dr.toString(),I1(Dr,ft,fe,A,W,vr));for(let pa of Tn){let ro=new P1;ro.text=pa,ro.sections=Dr.sections;for(let Vo=0;Vo0&&tp>Df&&(Df=tp)}else{let Gc=ro[ru.fontStack],Yf=Gc&&Gc[$u];if(Yf&&Yf.rect)O1=Yf.rect,ff=Yf.metrics;else{let tp=pa[ru.fontStack],yg=tp&&tp[$u];if(!yg)continue;ff=yg.metrics}zv=(Lh-ru.scale)*tu}ep?(Tn.verticalizable=!0,Yh.push({glyph:$u,imageName:p0,x:$o,y:Ju+zv,vertical:ep,scale:ru.scale,fontStack:ru.fontStack,sectionIndex:pc,metrics:ff,rect:O1}),$o+=Gp*ru.scale+Wn):(Yh.push({glyph:$u,imageName:p0,x:$o,y:Ju+zv,vertical:ep,scale:ru.scale,fontStack:ru.fontStack,sectionIndex:pc,metrics:ff,rect:O1}),$o+=ff.advance*ru.scale+Wn)}Yh.length!==0&&(Ou=Math.max($o-Wn,Ou),cm(Yh,0,Yh.length-1,Qv,Df)),$o=0;let Fv=la*Lh+Df;cd.lineOffset=Math.max(Df,Ed),Ju+=Fv,kh=Math.max(Fv,kh),++ud}var Ch;let Vd=Ju-Eh,{horizontalAlign:Gd,verticalAlign:Hd}=Hw(Mo);(function(Af,Lh,Ed,cd,Yh,Df,Fv,lv,ru){let pc=(Lh-Ed)*Yh,$u=0;$u=Df!==Fv?-lv*cd-Eh:(-cd*ru+.5)*Fv;for(let zv of Af)for(let ff of zv.positionedGlyphs)ff.x+=pc,ff.y+=$u})(Tn.positionedLines,Qv,Gd,Hd,Ou,kh,la,Vd,Xa.length),Tn.top+=-Hd*Vd,Tn.bottom=Tn.top+Vd,Tn.left+=-Gd*Ou,Tn.right=Tn.left+Ou}(ln,A,F,W,li,pe,Re,Ke,tr,ft,ur,kr),!function(Tn){for(let pa of Tn)if(pa.positionedGlyphs.length!==0)return!1;return!0}(zi)&&ln}let Vw={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},K9={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},J9={40:!0};function kC(R,A,F,W,te,fe){if(A.imageName){let pe=W[A.imageName];return pe?pe.displaySize[0]*A.scale*tu/fe+te:0}{let pe=F[A.fontStack],Re=pe&&pe[R];return Re?Re.metrics.advance*A.scale+te:0}}function CC(R,A,F,W){let te=Math.pow(R-A,2);return W?R=0,ft=0;for(let tr=0;trft){let Rt=Math.ceil(fe/ft);te*=Rt/pe,pe=Rt}return{x1:W,y1:te,x2:W+fe,y2:te+pe}}function IC(R,A,F,W,te,fe){let pe=R.image,Re;if(pe.content){let li=pe.content,pi=pe.pixelRatio||1;Re=[li[0]/pi,li[1]/pi,pe.displaySize[0]-li[2]/pi,pe.displaySize[1]-li[3]/pi]}let Ke=A.left*fe,ft=A.right*fe,Rt,tr,ur,vr;F==="width"||F==="both"?(vr=te[0]+Ke-W[3],tr=te[0]+ft+W[1]):(vr=te[0]+(Ke+ft-pe.displaySize[0])/2,tr=vr+pe.displaySize[0]);let kr=A.top*fe,Dr=A.bottom*fe;return F==="height"||F==="both"?(Rt=te[1]+kr-W[0],ur=te[1]+Dr+W[2]):(Rt=te[1]+(kr+Dr-pe.displaySize[1])/2,ur=Rt+pe.displaySize[1]),{image:pe,top:Rt,right:tr,bottom:ur,left:vr,collisionPadding:Re}}let tb=255,v0=128,fm=tb*v0;function RC(R,A){let{expression:F}=A;if(F.kind==="constant")return{kind:"constant",layoutSize:F.evaluate(new rs(R+1))};if(F.kind==="source")return{kind:"source"};{let{zoomStops:W,interpolationType:te}=F,fe=0;for(;fepe.id),this.index=A.index,this.pixelRatio=A.pixelRatio,this.sourceLayerIndex=A.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Ii([]),this.placementViewportMatrix=Ii([]);let F=this.layers[0]._unevaluatedLayout._values;this.textSizeData=RC(this.zoom,F["text-size"]),this.iconSizeData=RC(this.zoom,F["icon-size"]);let W=this.layers[0].layout,te=W.get("symbol-sort-key"),fe=W.get("symbol-z-order");this.canOverlap=fS(W,"text-overlap","text-allow-overlap")!=="never"||fS(W,"icon-overlap","icon-allow-overlap")!=="never"||W.get("text-ignore-placement")||W.get("icon-ignore-placement"),this.sortFeaturesByKey=fe!=="viewport-y"&&!te.isConstant(),this.sortFeaturesByY=(fe==="viewport-y"||fe==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,W.get("symbol-placement")==="point"&&(this.writingModes=W.get("text-writing-mode").map(pe=>i.ah[pe])),this.stateDependentLayerIds=this.layers.filter(pe=>pe.isStateDependent()).map(pe=>pe.id),this.sourceID=A.sourceID}createArrays(){this.text=new vS(new Ms(this.layers,this.zoom,A=>/^text/.test(A))),this.icon=new vS(new Ms(this.layers,this.zoom,A=>/^icon/.test(A))),this.glyphOffsetArray=new Co,this.lineVertexArray=new Qa,this.symbolInstances=new $a,this.textAnchorOffsets=new Bo}calculateGlyphDependencies(A,F,W,te,fe){for(let pe=0;pe0)&&(pe.value.kind!=="constant"||pe.value.value.length>0),Rt=Ke.value.kind!=="constant"||!!Ke.value.value||Object.keys(Ke.parameters).length>0,tr=fe.get("symbol-sort-key");if(this.features=[],!ft&&!Rt)return;let ur=F.iconDependencies,vr=F.glyphDependencies,kr=F.availableImages,Dr=new rs(this.zoom);for(let{feature:li,id:pi,index:vn,sourceLayerIndex:zi}of A){let ln=te._featureFilter.needGeometry,Tn=Sl(li,ln);if(!te._featureFilter.filter(Dr,Tn,W))continue;let pa,ro;if(ln||(Tn.geometry=$s(li)),ft){let Xa=te.getValueAndResolveTokens("text-field",Tn,W,kr),la=ti.factory(Xa),Mo=this.hasRTLText=this.hasRTLText||dS(la);(!Mo||ys.getRTLTextPluginStatus()==="unavailable"||Mo&&ys.isParsed())&&(pa=sm(la,te,Tn))}if(Rt){let Xa=te.getValueAndResolveTokens("icon-image",Tn,W,kr);ro=Xa instanceof en?Xa:en.fromString(Xa)}if(!pa&&!ro)continue;let Vo=this.sortFeaturesByKey?tr.evaluate(Tn,{},W):void 0;if(this.features.push({id:pi,text:pa,icon:ro,index:vn,sourceLayerIndex:zi,geometry:Tn.geometry,properties:li.properties,type:Q9[li.type],sortKey:Vo}),ro&&(ur[ro.name]=!0),pa){let Xa=pe.evaluate(Tn,{},W).join(","),la=fe.get("text-rotation-alignment")!=="viewport"&&fe.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(i.ah.vertical)>=0;for(let Mo of pa.sections)if(Mo.image)ur[Mo.image.name]=!0;else{let fo=Ka(pa.toString()),lo=Mo.fontStack||Xa,Wn=vr[lo]=vr[lo]||{};this.calculateGlyphDependencies(Mo.text,Wn,la,this.allowVerticalPlacement,fo)}}}fe.get("symbol-placement")==="line"&&(this.features=function(li){let pi={},vn={},zi=[],ln=0;function Tn(Xa){zi.push(li[Xa]),ln++}function pa(Xa,la,Mo){let fo=vn[Xa];return delete vn[Xa],vn[la]=fo,zi[fo].geometry[0].pop(),zi[fo].geometry[0]=zi[fo].geometry[0].concat(Mo[0]),fo}function ro(Xa,la,Mo){let fo=pi[la];return delete pi[la],pi[Xa]=fo,zi[fo].geometry[0].shift(),zi[fo].geometry[0]=Mo[0].concat(zi[fo].geometry[0]),fo}function Vo(Xa,la,Mo){let fo=Mo?la[0][la[0].length-1]:la[0][0];return`${Xa}:${fo.x}:${fo.y}`}for(let Xa=0;XaXa.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((li,pi)=>li.sortKey-pi.sortKey)}update(A,F,W){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(A,F,this.layers,W),this.icon.programConfigurations.updatePaintArrays(A,F,this.layers,W))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(A){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(A),this.iconCollisionBox.upload(A)),this.text.upload(A,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(A,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(A,F){let W=this.lineVertexArray.length;if(A.segment!==void 0){let te=A.dist(F[A.segment+1]),fe=A.dist(F[A.segment]),pe={};for(let Re=A.segment+1;Re=0;Re--)pe[Re]={x:F[Re].x,y:F[Re].y,tileUnitDistanceFromAnchor:fe},Re>0&&(fe+=F[Re-1].dist(F[Re]));for(let Re=0;Re0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(A,F){let W=A.placedSymbolArray.get(F),te=W.vertexStartIndex+4*W.numGlyphs;for(let fe=W.vertexStartIndex;fete[Re]-te[Ke]||fe[Ke]-fe[Re]),pe}addToSortKeyRanges(A,F){let W=this.sortKeyRanges[this.sortKeyRanges.length-1];W&&W.sortKey===F?W.symbolInstanceEnd=A+1:this.sortKeyRanges.push({sortKey:F,symbolInstanceStart:A,symbolInstanceEnd:A+1})}sortFeatures(A){if(this.sortFeaturesByY&&this.sortedAngle!==A&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(A),this.sortedAngle=A,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let F of this.symbolInstanceIndexes){let W=this.symbolInstances.get(F);this.featureSortOrder.push(W.featureIndex),[W.rightJustifiedTextSymbolIndex,W.centerJustifiedTextSymbolIndex,W.leftJustifiedTextSymbolIndex].forEach((te,fe,pe)=>{te>=0&&pe.indexOf(te)===fe&&this.addIndicesForPlacedSymbol(this.text,te)}),W.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,W.verticalPlacedTextSymbolIndex),W.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,W.placedIconSymbolIndex),W.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,W.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let Tf,rb;Fi("SymbolBucket",R1,{omit:["layers","collisionBoxArray","features","compareText"]}),R1.MAX_GLYPHS=65535,R1.addDynamicAttributes=hS;var Ww={get paint(){return rb=rb||new ue({"icon-opacity":new oo(ce.paint_symbol["icon-opacity"]),"icon-color":new oo(ce.paint_symbol["icon-color"]),"icon-halo-color":new oo(ce.paint_symbol["icon-halo-color"]),"icon-halo-width":new oo(ce.paint_symbol["icon-halo-width"]),"icon-halo-blur":new oo(ce.paint_symbol["icon-halo-blur"]),"icon-translate":new Ua(ce.paint_symbol["icon-translate"]),"icon-translate-anchor":new Ua(ce.paint_symbol["icon-translate-anchor"]),"text-opacity":new oo(ce.paint_symbol["text-opacity"]),"text-color":new oo(ce.paint_symbol["text-color"],{runtimeType:Xt,getOverride:R=>R.textColor,hasOverride:R=>!!R.textColor}),"text-halo-color":new oo(ce.paint_symbol["text-halo-color"]),"text-halo-width":new oo(ce.paint_symbol["text-halo-width"]),"text-halo-blur":new oo(ce.paint_symbol["text-halo-blur"]),"text-translate":new Ua(ce.paint_symbol["text-translate"]),"text-translate-anchor":new Ua(ce.paint_symbol["text-translate-anchor"])})},get layout(){return Tf=Tf||new ue({"symbol-placement":new Ua(ce.layout_symbol["symbol-placement"]),"symbol-spacing":new Ua(ce.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Ua(ce.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new oo(ce.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Ua(ce.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Ua(ce.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Ua(ce.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Ua(ce.layout_symbol["icon-ignore-placement"]),"icon-optional":new Ua(ce.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Ua(ce.layout_symbol["icon-rotation-alignment"]),"icon-size":new oo(ce.layout_symbol["icon-size"]),"icon-text-fit":new Ua(ce.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Ua(ce.layout_symbol["icon-text-fit-padding"]),"icon-image":new oo(ce.layout_symbol["icon-image"]),"icon-rotate":new oo(ce.layout_symbol["icon-rotate"]),"icon-padding":new oo(ce.layout_symbol["icon-padding"]),"icon-keep-upright":new Ua(ce.layout_symbol["icon-keep-upright"]),"icon-offset":new oo(ce.layout_symbol["icon-offset"]),"icon-anchor":new oo(ce.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Ua(ce.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Ua(ce.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Ua(ce.layout_symbol["text-rotation-alignment"]),"text-field":new oo(ce.layout_symbol["text-field"]),"text-font":new oo(ce.layout_symbol["text-font"]),"text-size":new oo(ce.layout_symbol["text-size"]),"text-max-width":new oo(ce.layout_symbol["text-max-width"]),"text-line-height":new Ua(ce.layout_symbol["text-line-height"]),"text-letter-spacing":new oo(ce.layout_symbol["text-letter-spacing"]),"text-justify":new oo(ce.layout_symbol["text-justify"]),"text-radial-offset":new oo(ce.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Ua(ce.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new oo(ce.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new oo(ce.layout_symbol["text-anchor"]),"text-max-angle":new Ua(ce.layout_symbol["text-max-angle"]),"text-writing-mode":new Ua(ce.layout_symbol["text-writing-mode"]),"text-rotate":new oo(ce.layout_symbol["text-rotate"]),"text-padding":new Ua(ce.layout_symbol["text-padding"]),"text-keep-upright":new Ua(ce.layout_symbol["text-keep-upright"]),"text-transform":new oo(ce.layout_symbol["text-transform"]),"text-offset":new oo(ce.layout_symbol["text-offset"]),"text-allow-overlap":new Ua(ce.layout_symbol["text-allow-overlap"]),"text-overlap":new Ua(ce.layout_symbol["text-overlap"]),"text-ignore-placement":new Ua(ce.layout_symbol["text-ignore-placement"]),"text-optional":new Ua(ce.layout_symbol["text-optional"])})}};class ib{constructor(A){if(A.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=A.property.overrides?A.property.overrides.runtimeType:Tt,this.defaultValue=A}evaluate(A){if(A.formattedSection){let F=this.defaultValue.property.overrides;if(F&&F.hasOverride(A.formattedSection))return F.getOverride(A.formattedSection)}return A.feature&&A.featureState?this.defaultValue.evaluate(A.feature,A.featureState):this.defaultValue.property.specification.default}eachChild(A){this.defaultValue.isConstant()||A(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Fi("FormatSectionOverride",ib,{omit:["defaultValue"]});class gy extends B{constructor(A){super(A,Ww)}recalculate(A,F){if(super.recalculate(A,F),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){let W=this.layout.get("text-writing-mode");if(W){let te=[];for(let fe of W)te.indexOf(fe)<0&&te.push(fe);this.layout._values["text-writing-mode"]=te}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(A,F,W,te){let fe=this.layout.get(A).evaluate(F,{},W,te),pe=this._unevaluatedLayout._values[A];return pe.isDataDriven()||Dc(pe.value)||!fe?fe:function(Re,Ke){return Ke.replace(/{([^{}]+)}/g,(ft,Rt)=>Re&&Rt in Re?String(Re[Rt]):"")}(F.properties,fe)}createBucket(A){return new R1(A)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let A of Ww.paint.overridableProperties){if(!gy.hasPaintOverride(this.layout,A))continue;let F=this.paint.get(A),W=new ib(F),te=new Eu(W,F.property.specification),fe=null;fe=F.value.kind==="constant"||F.value.kind==="source"?new bc("source",te):new hu("composite",te,F.value.zoomStops),this.paint._values[A]=new xu(F.property,fe,F.parameters)}}_handleOverridablePaintPropertyUpdate(A,F,W){return!(!this.layout||F.isDataDriven()||W.isDataDriven())&&gy.hasPaintOverride(this.layout,A)}static hasPaintOverride(A,F){let W=A.get("text-field"),te=Ww.paint.properties[F],fe=!1,pe=Re=>{for(let Ke of Re)if(te.overrides&&te.overrides.hasOverride(Ke))return void(fe=!0)};if(W.value.kind==="constant"&&W.value.value instanceof ti)pe(W.value.value.sections);else if(W.value.kind==="source"){let Re=ft=>{fe||(ft instanceof ua&&Mn(ft.value)===ei?pe(ft.value.sections):ft instanceof Yl?pe(ft.sections):ft.eachChild(Re))},Ke=W.value;Ke._styleExpression&&Re(Ke._styleExpression.expression)}return fe}}let DC;var nb={get paint(){return DC=DC||new ue({"background-color":new Ua(ce.paint_background["background-color"]),"background-pattern":new hc(ce.paint_background["background-pattern"]),"background-opacity":new Ua(ce.paint_background["background-opacity"])})}};class tq extends B{constructor(A){super(A,nb)}}let pS;var FC={get paint(){return pS=pS||new ue({"raster-opacity":new Ua(ce.paint_raster["raster-opacity"]),"raster-hue-rotate":new Ua(ce.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Ua(ce.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Ua(ce.paint_raster["raster-brightness-max"]),"raster-saturation":new Ua(ce.paint_raster["raster-saturation"]),"raster-contrast":new Ua(ce.paint_raster["raster-contrast"]),"raster-resampling":new Ua(ce.paint_raster["raster-resampling"]),"raster-fade-duration":new Ua(ce.paint_raster["raster-fade-duration"])})}};class ab extends B{constructor(A){super(A,FC)}}class gS extends B{constructor(A){super(A,{}),this.onAdd=F=>{this.implementation.onAdd&&this.implementation.onAdd(F,F.painter.context.gl)},this.onRemove=F=>{this.implementation.onRemove&&this.implementation.onRemove(F,F.painter.context.gl)},this.implementation=A}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class mS{constructor(A){this._methodToThrottle=A,this._triggered=!1,typeof MessageChannel!="undefined"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._methodToThrottle()},0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let yS=63710088e-1;class pg{constructor(A,F){if(isNaN(A)||isNaN(F))throw new Error(`Invalid LngLat object: (${A}, ${F})`);if(this.lng=+A,this.lat=+F,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new pg(T(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(A){let F=Math.PI/180,W=this.lat*F,te=A.lat*F,fe=Math.sin(W)*Math.sin(te)+Math.cos(W)*Math.cos(te)*Math.cos((A.lng-this.lng)*F);return yS*Math.acos(Math.min(fe,1))}static convert(A){if(A instanceof pg)return A;if(Array.isArray(A)&&(A.length===2||A.length===3))return new pg(Number(A[0]),Number(A[1]));if(!Array.isArray(A)&&typeof A=="object"&&A!==null)return new pg(Number("lng"in A?A.lng:A.lon),Number(A.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}let D1=2*Math.PI*yS;function zC(R){return D1*Math.cos(R*Math.PI/180)}function Xw(R){return(180+R)/360}function qC(R){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R*Math.PI/360)))/360}function Zw(R,A){return R/zC(A)}function ob(R){return 360/Math.PI*Math.atan(Math.exp((180-360*R)*Math.PI/180))-90}class sb{constructor(A,F,W=0){this.x=+A,this.y=+F,this.z=+W}static fromLngLat(A,F=0){let W=pg.convert(A);return new sb(Xw(W.lng),qC(W.lat),Zw(F,W.lat))}toLngLat(){return new pg(360*this.x-180,ob(this.y))}toAltitude(){return this.z*zC(ob(this.y))}meterInMercatorCoordinateUnits(){return 1/D1*(A=ob(this.y),1/Math.cos(A*Math.PI/180));var A}}function yp(R,A,F){var W=2*Math.PI*6378137/256/Math.pow(2,F);return[R*W-2*Math.PI*6378137/2,A*W-2*Math.PI*6378137/2]}class _S{constructor(A,F,W){if(!function(te,fe,pe){return!(te<0||te>25||pe<0||pe>=Math.pow(2,te)||fe<0||fe>=Math.pow(2,te))}(A,F,W))throw new Error(`x=${F}, y=${W}, z=${A} outside of bounds. 0<=x<${Math.pow(2,A)}, 0<=y<${Math.pow(2,A)} 0<=z<=25 `);this.z=A,this.x=F,this.y=W,this.key=lb(0,A,A,F,W)}equals(A){return this.z===A.z&&this.x===A.x&&this.y===A.y}url(A,F,W){let te=(pe=this.y,Re=this.z,Ke=yp(256*(fe=this.x),256*(pe=Math.pow(2,Re)-pe-1),Re),ft=yp(256*(fe+1),256*(pe+1),Re),Ke[0]+","+Ke[1]+","+ft[0]+","+ft[1]);var fe,pe,Re,Ke,ft;let Rt=function(tr,ur,vr){let kr,Dr="";for(let li=tr;li>0;li--)kr=1<1?"@2x":"").replace(/{quadkey}/g,Rt).replace(/{bbox-epsg-3857}/g,te)}isChildOf(A){let F=this.z-A.z;return F>0&&A.x===this.x>>F&&A.y===this.y>>F}getTilePoint(A){let F=Math.pow(2,this.z);return new u((A.x*F-this.x)*ja,(A.y*F-this.y)*ja)}toString(){return`${this.z}/${this.x}/${this.y}`}}class OC{constructor(A,F){this.wrap=A,this.canonical=F,this.key=lb(A,F.z,F.z,F.x,F.y)}}class $v{constructor(A,F,W,te,fe){if(A= z; overscaledZ = ${A}; z = ${W}`);this.overscaledZ=A,this.wrap=F,this.canonical=new _S(W,+te,+fe),this.key=lb(F,A,W,te,fe)}clone(){return new $v(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(A){return this.overscaledZ===A.overscaledZ&&this.wrap===A.wrap&&this.canonical.equals(A.canonical)}scaledTo(A){if(A>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${A}; overscaledZ = ${this.overscaledZ}`);let F=this.canonical.z-A;return A>this.canonical.z?new $v(A,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new $v(A,this.wrap,A,this.canonical.x>>F,this.canonical.y>>F)}calculateScaledKey(A,F){if(A>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${A}; overscaledZ = ${this.overscaledZ}`);let W=this.canonical.z-A;return A>this.canonical.z?lb(this.wrap*+F,A,this.canonical.z,this.canonical.x,this.canonical.y):lb(this.wrap*+F,A,A,this.canonical.x>>W,this.canonical.y>>W)}isChildOf(A){if(A.wrap!==this.wrap)return!1;let F=this.canonical.z-A.canonical.z;return A.overscaledZ===0||A.overscaledZ>F&&A.canonical.y===this.canonical.y>>F}children(A){if(this.overscaledZ>=A)return[new $v(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let F=this.canonical.z+1,W=2*this.canonical.x,te=2*this.canonical.y;return[new $v(F,this.wrap,F,W,te),new $v(F,this.wrap,F,W+1,te),new $v(F,this.wrap,F,W,te+1),new $v(F,this.wrap,F,W+1,te+1)]}isLessThan(A){return this.wrapA.wrap)&&(this.overscaledZA.overscaledZ)&&(this.canonical.xA.canonical.x)&&this.canonical.ythis.max&&(this.max=tr),tr=this.dim+1||F<-1||F>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(F+1)*this.stride+(A+1)}unpack(A,F,W){return A*this.redFactor+F*this.greenFactor+W*this.blueFactor-this.baseShift}getPixels(){return new Ki({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(A,F,W){if(this.dim!==A.dim)throw new Error("dem dimension mismatch");let te=F*this.dim,fe=F*this.dim+this.dim,pe=W*this.dim,Re=W*this.dim+this.dim;switch(F){case-1:te=fe-1;break;case 1:fe=te+1}switch(W){case-1:pe=Re-1;break;case 1:Re=pe+1}let Ke=-F*this.dim,ft=-W*this.dim;for(let Rt=pe;Rt=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${A} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[A]}}class xS{constructor(A,F,W,te,fe){this.type="Feature",this._vectorTileFeature=A,A._z=F,A._x=W,A._y=te,this.properties=A.properties,this.id=fe}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(A){this._geometry=A}toJSON(){let A={geometry:this.geometry};for(let F in this)F!=="_geometry"&&F!=="_vectorTileFeature"&&(A[F]=this[F]);return A}}class my{constructor(A,F){this.tileID=A,this.x=A.canonical.x,this.y=A.canonical.y,this.z=A.canonical.z,this.grid=new $i(ja,16,0),this.grid3D=new $i(ja,16,0),this.featureIndexArray=new Ts,this.promoteId=F}insert(A,F,W,te,fe,pe){let Re=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(W,te,fe);let Ke=pe?this.grid3D:this.grid;for(let ft=0;ft=0&&tr[3]>=0&&Ke.insert(Re,tr[0],tr[1],tr[2],tr[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new yr.VectorTile(new lS(this.rawTileData)).layers,this.sourceLayerCoder=new NC(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(A,F,W,te){this.loadVTLayers();let fe=A.params||{},pe=ja/A.tileSize/A.scale,Re=Fc(fe.filter),Ke=A.queryGeometry,ft=A.queryPadding*pe,Rt=VC(Ke),tr=this.grid.query(Rt.minX-ft,Rt.minY-ft,Rt.maxX+ft,Rt.maxY+ft),ur=VC(A.cameraQueryGeometry),vr=this.grid3D.query(ur.minX-ft,ur.minY-ft,ur.maxX+ft,ur.maxY+ft,(li,pi,vn,zi)=>function(ln,Tn,pa,ro,Vo){for(let la of ln)if(Tn<=la.x&&pa<=la.y&&ro>=la.x&&Vo>=la.y)return!0;let Xa=[new u(Tn,pa),new u(Tn,Vo),new u(ro,Vo),new u(ro,pa)];if(ln.length>2){for(let la of Xa)if(Ni(ln,la))return!0}for(let la=0;la(zi||(zi=$s(ln)),Tn.queryIntersectsFeature(Ke,ln,pa,zi,this.z,A.transform,pe,A.pixelPosMatrix)))}return kr}loadMatchingFeature(A,F,W,te,fe,pe,Re,Ke,ft,Rt,tr){let ur=this.bucketLayerIDs[F];if(pe&&!function(li,pi){for(let vn=0;vn=0)return!0;return!1}(pe,ur))return;let vr=this.sourceLayerCoder.decode(W),kr=this.vtLayers[vr].feature(te);if(fe.needGeometry){let li=Sl(kr,!0);if(!fe.filter(new rs(this.tileID.overscaledZ),li,this.tileID.canonical))return}else if(!fe.filter(new rs(this.tileID.overscaledZ),kr))return;let Dr=this.getId(kr,vr);for(let li=0;li{let Re=A instanceof Ac?A.get(pe):null;return Re&&Re.evaluate?Re.evaluate(F,W,te):Re})}function VC(R){let A=1/0,F=1/0,W=-1/0,te=-1/0;for(let fe of R)A=Math.min(A,fe.x),F=Math.min(F,fe.y),W=Math.max(W,fe.x),te=Math.max(te,fe.y);return{minX:A,minY:F,maxX:W,maxY:te}}function rq(R,A){return A-R}function GC(R,A,F,W,te){let fe=[];for(let pe=0;pe=W&&tr.x>=W||(Rt.x>=W?Rt=new u(W,Rt.y+(W-Rt.x)/(tr.x-Rt.x)*(tr.y-Rt.y))._round():tr.x>=W&&(tr=new u(W,Rt.y+(W-Rt.x)/(tr.x-Rt.x)*(tr.y-Rt.y))._round()),Rt.y>=te&&tr.y>=te||(Rt.y>=te?Rt=new u(Rt.x+(te-Rt.y)/(tr.y-Rt.y)*(tr.x-Rt.x),te)._round():tr.y>=te&&(tr=new u(Rt.x+(te-Rt.y)/(tr.y-Rt.y)*(tr.x-Rt.x),te)._round()),Ke&&Rt.equals(Ke[Ke.length-1])||(Ke=[Rt],fe.push(Ke)),Ke.push(tr)))))}}return fe}Fi("FeatureIndex",my,{omit:["rawTileData","sourceLayerCoder"]});class gg extends u{constructor(A,F,W,te){super(A,F),this.angle=W,te!==void 0&&(this.segment=te)}clone(){return new gg(this.x,this.y,this.angle,this.segment)}}function bS(R,A,F,W,te){if(A.segment===void 0||F===0)return!0;let fe=A,pe=A.segment+1,Re=0;for(;Re>-F/2;){if(pe--,pe<0)return!1;Re-=R[pe].dist(fe),fe=R[pe]}Re+=R[pe].dist(R[pe+1]),pe++;let Ke=[],ft=0;for(;ReW;)ft-=Ke.shift().angleDelta;if(ft>te)return!1;pe++,Re+=Rt.dist(tr)}return!0}function HC(R){let A=0;for(let F=0;Fft){let kr=(ft-Ke)/vr,Dr=Lo.number(tr.x,ur.x,kr),li=Lo.number(tr.y,ur.y,kr),pi=new gg(Dr,li,ur.angleTo(tr),Rt);return pi._round(),!pe||bS(R,pi,Re,pe,A)?pi:void 0}Ke+=vr}}function nq(R,A,F,W,te,fe,pe,Re,Ke){let ft=jC(W,fe,pe),Rt=WC(W,te),tr=Rt*pe,ur=R[0].x===0||R[0].x===Ke||R[0].y===0||R[0].y===Ke;return A-tr=0&&ln=0&&Tn=0&&ur+ft<=Rt){let pa=new gg(ln,Tn,vn,kr);pa._round(),W&&!bS(R,pa,fe,W,te)||vr.push(pa)}}tr+=pi}return Re||vr.length||pe||(vr=XC(R,tr/2,F,W,te,fe,pe,!0,Ke)),vr}Fi("Anchor",gg);let F1=Md;function ZC(R,A,F,W){let te=[],fe=R.image,pe=fe.pixelRatio,Re=fe.paddedRect.w-2*F1,Ke=fe.paddedRect.h-2*F1,ft={x1:R.left,y1:R.top,x2:R.right,y2:R.bottom},Rt=fe.stretchX||[[0,Re]],tr=fe.stretchY||[[0,Ke]],ur=(Wn,Ro)=>Wn+Ro[1]-Ro[0],vr=Rt.reduce(ur,0),kr=tr.reduce(ur,0),Dr=Re-vr,li=Ke-kr,pi=0,vn=vr,zi=0,ln=kr,Tn=0,pa=Dr,ro=0,Vo=li;if(fe.content&&W){let Wn=fe.content,Ro=Wn[2]-Wn[0],uo=Wn[3]-Wn[1];(fe.textFitWidth||fe.textFitHeight)&&(ft=PC(R)),pi=mg(Rt,0,Wn[0]),zi=mg(tr,0,Wn[1]),vn=mg(Rt,Wn[0],Wn[2]),ln=mg(tr,Wn[1],Wn[3]),Tn=Wn[0]-pi,ro=Wn[1]-zi,pa=Ro-vn,Vo=uo-ln}let Xa=ft.x1,la=ft.y1,Mo=ft.x2-Xa,fo=ft.y2-la,lo=(Wn,Ro,uo,$o)=>{let Ju=Yw(Wn.stretch-pi,vn,Mo,Xa),Ou=z1(Wn.fixed-Tn,pa,Wn.stretch,vr),kh=Yw(Ro.stretch-zi,ln,fo,la),Qv=z1(Ro.fixed-ro,Vo,Ro.stretch,kr),ud=Yw(uo.stretch-pi,vn,Mo,Xa),Ch=z1(uo.fixed-Tn,pa,uo.stretch,vr),Vd=Yw($o.stretch-zi,ln,fo,la),Gd=z1($o.fixed-ro,Vo,$o.stretch,kr),Hd=new u(Ju,kh),Af=new u(ud,kh),Lh=new u(ud,Vd),Ed=new u(Ju,Vd),cd=new u(Ou/pe,Qv/pe),Yh=new u(Ch/pe,Gd/pe),Df=A*Math.PI/180;if(Df){let ru=Math.sin(Df),pc=Math.cos(Df),$u=[pc,-ru,ru,pc];Hd._matMult($u),Af._matMult($u),Ed._matMult($u),Lh._matMult($u)}let Fv=Wn.stretch+Wn.fixed,lv=Ro.stretch+Ro.fixed;return{tl:Hd,tr:Af,bl:Ed,br:Lh,tex:{x:fe.paddedRect.x+F1+Fv,y:fe.paddedRect.y+F1+lv,w:uo.stretch+uo.fixed-Fv,h:$o.stretch+$o.fixed-lv},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:cd,pixelOffsetBR:Yh,minFontScaleX:pa/pe/Mo,minFontScaleY:Vo/pe/fo,isSDF:F}};if(W&&(fe.stretchX||fe.stretchY)){let Wn=YC(Rt,Dr,vr),Ro=YC(tr,li,kr);for(let uo=0;uo0&&(Dr=Math.max(10,Dr),this.circleDiameter=Dr)}else{let ur=!((tr=pe.image)===null||tr===void 0)&&tr.content&&(pe.image.textFitWidth||pe.image.textFitHeight)?PC(pe):{x1:pe.left,y1:pe.top,x2:pe.right,y2:pe.bottom};ur.y1=ur.y1*Re-Ke[0],ur.y2=ur.y2*Re+Ke[2],ur.x1=ur.x1*Re-Ke[3],ur.x2=ur.x2*Re+Ke[1];let vr=pe.collisionPadding;if(vr&&(ur.x1-=vr[0]*Re,ur.y1-=vr[1]*Re,ur.x2+=vr[2]*Re,ur.y2+=vr[3]*Re),Rt){let kr=new u(ur.x1,ur.y1),Dr=new u(ur.x2,ur.y1),li=new u(ur.x1,ur.y2),pi=new u(ur.x2,ur.y2),vn=Rt*Math.PI/180;kr._rotate(vn),Dr._rotate(vn),li._rotate(vn),pi._rotate(vn),ur.x1=Math.min(kr.x,Dr.x,li.x,pi.x),ur.x2=Math.max(kr.x,Dr.x,li.x,pi.x),ur.y1=Math.min(kr.y,Dr.y,li.y,pi.y),ur.y2=Math.max(kr.y,Dr.y,li.y,pi.y)}A.emplaceBack(F.x,F.y,ur.x1,ur.y1,ur.x2,ur.y2,W,te,fe)}this.boxEndIndex=A.length}}class Vp{constructor(A=[],F=(W,te)=>Wte?1:0){if(this.data=A,this.length=this.data.length,this.compare=F,this.length>0)for(let W=(this.length>>1)-1;W>=0;W--)this._down(W)}push(A){this.data.push(A),this._up(this.length++)}pop(){if(this.length===0)return;let A=this.data[0],F=this.data.pop();return--this.length>0&&(this.data[0]=F,this._down(0)),A}peek(){return this.data[0]}_up(A){let{data:F,compare:W}=this,te=F[A];for(;A>0;){let fe=A-1>>1,pe=F[fe];if(W(te,pe)>=0)break;F[A]=pe,A=fe}F[A]=te}_down(A){let{data:F,compare:W}=this,te=this.length>>1,fe=F[A];for(;A=0)break;F[A]=F[pe],A=pe}F[A]=fe}}function aq(R,A=1,F=!1){let W=1/0,te=1/0,fe=-1/0,pe=-1/0,Re=R[0];for(let vr=0;vrfe)&&(fe=kr.x),(!vr||kr.y>pe)&&(pe=kr.y)}let Ke=Math.min(fe-W,pe-te),ft=Ke/2,Rt=new Vp([],oq);if(Ke===0)return new u(W,te);for(let vr=W;vrtr.d||!tr.d)&&(tr=vr,F&&console.log("found best %d after %d probes",Math.round(1e4*vr.d)/1e4,ur)),vr.max-tr.d<=A||(ft=vr.h/2,Rt.push(new q1(vr.p.x-ft,vr.p.y-ft,ft,R)),Rt.push(new q1(vr.p.x+ft,vr.p.y-ft,ft,R)),Rt.push(new q1(vr.p.x-ft,vr.p.y+ft,ft,R)),Rt.push(new q1(vr.p.x+ft,vr.p.y+ft,ft,R)),ur+=4)}return F&&(console.log(`num probes: ${ur}`),console.log(`best distance: ${tr.d}`)),tr.p}function oq(R,A){return A.max-R.max}function q1(R,A,F,W){this.p=new u(R,A),this.h=F,this.d=function(te,fe){let pe=!1,Re=1/0;for(let Ke=0;Kete.y!=kr.y>te.y&&te.x<(kr.x-vr.x)*(te.y-vr.y)/(kr.y-vr.y)+vr.x&&(pe=!pe),Re=Math.min(Re,Nr(te,vr,kr))}}return(pe?1:-1)*Math.sqrt(Re)}(this.p,W),this.max=this.d+this.h*Math.SQRT2}var ld;i.aq=void 0,(ld=i.aq||(i.aq={}))[ld.center=1]="center",ld[ld.left=2]="left",ld[ld.right=3]="right",ld[ld.top=4]="top",ld[ld.bottom=5]="bottom",ld[ld["top-left"]=6]="top-left",ld[ld["top-right"]=7]="top-right",ld[ld["bottom-left"]=8]="bottom-left",ld[ld["bottom-right"]=9]="bottom-right";let vm=7,yy=Number.POSITIVE_INFINITY;function wS(R,A){return A[1]!==yy?function(F,W,te){let fe=0,pe=0;switch(W=Math.abs(W),te=Math.abs(te),F){case"top-right":case"top-left":case"top":pe=te-vm;break;case"bottom-right":case"bottom-left":case"bottom":pe=-te+vm}switch(F){case"top-right":case"bottom-right":case"right":fe=-W;break;case"top-left":case"bottom-left":case"left":fe=W}return[fe,pe]}(R,A[0],A[1]):function(F,W){let te=0,fe=0;W<0&&(W=0);let pe=W/Math.SQRT2;switch(F){case"top-right":case"top-left":fe=pe-vm;break;case"bottom-right":case"bottom-left":fe=-pe+vm;break;case"bottom":fe=-W+vm;break;case"top":fe=W-vm}switch(F){case"top-right":case"bottom-right":te=-pe;break;case"top-left":case"bottom-left":te=pe;break;case"left":te=W;break;case"right":te=-W}return[te,fe]}(R,A[0])}function KC(R,A,F){var W;let te=R.layout,fe=(W=te.get("text-variable-anchor-offset"))===null||W===void 0?void 0:W.evaluate(A,{},F);if(fe){let Re=fe.values,Ke=[];for(let ft=0;ftur*tu);Rt.startsWith("top")?tr[1]-=vm:Rt.startsWith("bottom")&&(tr[1]+=vm),Ke[ft+1]=tr}return new Zi(Ke)}let pe=te.get("text-variable-anchor");if(pe){let Re;Re=R._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[te.get("text-radial-offset").evaluate(A,{},F)*tu,yy]:te.get("text-offset").evaluate(A,{},F).map(ft=>ft*tu);let Ke=[];for(let ft of pe)Ke.push(ft,wS(ft,Re));return new Zi(Ke)}return null}function TS(R){switch(R){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function sq(R,A,F,W,te,fe,pe,Re,Ke,ft,Rt){let tr=fe.textMaxSize.evaluate(A,{});tr===void 0&&(tr=pe);let ur=R.layers[0].layout,vr=ur.get("icon-offset").evaluate(A,{},Rt),kr=$C(F.horizontal),Dr=pe/24,li=R.tilePixelRatio*Dr,pi=R.tilePixelRatio*tr/24,vn=R.tilePixelRatio*Re,zi=R.tilePixelRatio*ur.get("symbol-spacing"),ln=ur.get("text-padding")*R.tilePixelRatio,Tn=function(Wn,Ro,uo,$o=1){let Ju=Wn.get("icon-padding").evaluate(Ro,{},uo),Ou=Ju&&Ju.values;return[Ou[0]*$o,Ou[1]*$o,Ou[2]*$o,Ou[3]*$o]}(ur,A,Rt,R.tilePixelRatio),pa=ur.get("text-max-angle")/180*Math.PI,ro=ur.get("text-rotation-alignment")!=="viewport"&&ur.get("symbol-placement")!=="point",Vo=ur.get("icon-rotation-alignment")==="map"&&ur.get("symbol-placement")!=="point",Xa=ur.get("symbol-placement"),la=zi/2,Mo=ur.get("icon-text-fit"),fo;W&&Mo!=="none"&&(R.allowVerticalPlacement&&F.vertical&&(fo=IC(W,F.vertical,Mo,ur.get("icon-text-fit-padding"),vr,Dr)),kr&&(W=IC(W,kr,Mo,ur.get("icon-text-fit-padding"),vr,Dr)));let lo=(Wn,Ro)=>{Ro.x<0||Ro.x>=ja||Ro.y<0||Ro.y>=ja||function(uo,$o,Ju,Ou,kh,Qv,ud,Ch,Vd,Gd,Hd,Af,Lh,Ed,cd,Yh,Df,Fv,lv,ru,pc,$u,zv,ff,O1){let p0=uo.addToLineVertexArray($o,Ju),Gp,ep,Gc,Yf,tp=0,yg=0,uv=0,B1=0,kS=-1,Qw=-1,g0={},_y=xi("");if(uo.allowVerticalPlacement&&Ou.vertical){let kd=Ch.layout.get("text-rotate").evaluate(pc,{},ff)+90;Gc=new dm(Vd,$o,Gd,Hd,Af,Ou.vertical,Lh,Ed,cd,kd),ud&&(Yf=new dm(Vd,$o,Gd,Hd,Af,ud,Df,Fv,cd,kd))}if(kh){let kd=Ch.layout.get("icon-rotate").evaluate(pc,{}),rp=Ch.layout.get("icon-text-fit")!=="none",pm=ZC(kh,kd,zv,rp),jd=ud?ZC(ud,kd,zv,rp):void 0;ep=new dm(Vd,$o,Gd,Hd,Af,kh,Df,Fv,!1,kd),tp=4*pm.length;let Cd=uo.iconSizeData,xp=null;Cd.kind==="source"?(xp=[v0*Ch.layout.get("icon-size").evaluate(pc,{})],xp[0]>fm&&E(`${uo.layerIds[0]}: Value for "icon-size" is >= ${tb}. Reduce your "icon-size".`)):Cd.kind==="composite"&&(xp=[v0*$u.compositeIconSizes[0].evaluate(pc,{},ff),v0*$u.compositeIconSizes[1].evaluate(pc,{},ff)],(xp[0]>fm||xp[1]>fm)&&E(`${uo.layerIds[0]}: Value for "icon-size" is >= ${tb}. Reduce your "icon-size".`)),uo.addSymbols(uo.icon,pm,xp,ru,lv,pc,i.ah.none,$o,p0.lineStartIndex,p0.lineLength,-1,ff),kS=uo.icon.placedSymbolArray.length-1,jd&&(yg=4*jd.length,uo.addSymbols(uo.icon,jd,xp,ru,lv,pc,i.ah.vertical,$o,p0.lineStartIndex,p0.lineLength,-1,ff),Qw=uo.icon.placedSymbolArray.length-1)}let Kh=Object.keys(Ou.horizontal);for(let kd of Kh){let rp=Ou.horizontal[kd];if(!Gp){_y=xi(rp.text);let jd=Ch.layout.get("text-rotate").evaluate(pc,{},ff);Gp=new dm(Vd,$o,Gd,Hd,Af,rp,Lh,Ed,cd,jd)}let pm=rp.positionedLines.length===1;if(uv+=JC(uo,$o,rp,Qv,Ch,cd,pc,Yh,p0,Ou.vertical?i.ah.horizontal:i.ah.horizontalOnly,pm?Kh:[kd],g0,kS,$u,ff),pm)break}Ou.vertical&&(B1+=JC(uo,$o,Ou.vertical,Qv,Ch,cd,pc,Yh,p0,i.ah.vertical,["vertical"],g0,Qw,$u,ff));let cq=Gp?Gp.boxStartIndex:uo.collisionBoxArray.length,e3=Gp?Gp.boxEndIndex:uo.collisionBoxArray.length,m0=Gc?Gc.boxStartIndex:uo.collisionBoxArray.length,cv=Gc?Gc.boxEndIndex:uo.collisionBoxArray.length,r6=ep?ep.boxStartIndex:uo.collisionBoxArray.length,fq=ep?ep.boxEndIndex:uo.collisionBoxArray.length,i6=Yf?Yf.boxStartIndex:uo.collisionBoxArray.length,hq=Yf?Yf.boxEndIndex:uo.collisionBoxArray.length,_p=-1,fb=(kd,rp)=>kd&&kd.circleDiameter?Math.max(kd.circleDiameter,rp):rp;_p=fb(Gp,_p),_p=fb(Gc,_p),_p=fb(ep,_p),_p=fb(Yf,_p);let t3=_p>-1?1:0;t3&&(_p*=O1/tu),uo.glyphOffsetArray.length>=R1.MAX_GLYPHS&&E("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),pc.sortKey!==void 0&&uo.addToSortKeyRanges(uo.symbolInstances.length,pc.sortKey);let CS=KC(Ch,pc,ff),[dq,vq]=function(kd,rp){let pm=kd.length,jd=rp==null?void 0:rp.values;if((jd==null?void 0:jd.length)>0)for(let Cd=0;Cd=0?g0.right:-1,g0.center>=0?g0.center:-1,g0.left>=0?g0.left:-1,g0.vertical||-1,kS,Qw,_y,cq,e3,m0,cv,r6,fq,i6,hq,Gd,uv,B1,tp,yg,t3,0,Lh,_p,dq,vq)}(R,Ro,Wn,F,W,te,fo,R.layers[0],R.collisionBoxArray,A.index,A.sourceLayerIndex,R.index,li,[ln,ln,ln,ln],ro,Ke,vn,Tn,Vo,vr,A,fe,ft,Rt,pe)};if(Xa==="line")for(let Wn of GC(A.geometry,0,0,ja,ja)){let Ro=nq(Wn,zi,pa,F.vertical||kr,W,24,pi,R.overscaling,ja);for(let uo of Ro)kr&&lq(R,kr.text,la,uo)||lo(Wn,uo)}else if(Xa==="line-center"){for(let Wn of A.geometry)if(Wn.length>1){let Ro=iq(Wn,pa,F.vertical||kr,W,24,pi);Ro&&lo(Wn,Ro)}}else if(A.type==="Polygon")for(let Wn of Cf(A.geometry,0)){let Ro=aq(Wn,16);lo(Wn[0],new gg(Ro.x,Ro.y,0))}else if(A.type==="LineString")for(let Wn of A.geometry)lo(Wn,new gg(Wn[0].x,Wn[0].y,0));else if(A.type==="Point")for(let Wn of A.geometry)for(let Ro of Wn)lo([Ro],new gg(Ro.x,Ro.y,0))}function JC(R,A,F,W,te,fe,pe,Re,Ke,ft,Rt,tr,ur,vr,kr){let Dr=function(vn,zi,ln,Tn,pa,ro,Vo,Xa){let la=Tn.layout.get("text-rotate").evaluate(ro,{})*Math.PI/180,Mo=[];for(let fo of zi.positionedLines)for(let lo of fo.positionedGlyphs){if(!lo.rect)continue;let Wn=lo.rect||{},Ro=EC+1,uo=!0,$o=1,Ju=0,Ou=(pa||Xa)&&lo.vertical,kh=lo.metrics.advance*lo.scale/2;if(Xa&&zi.verticalizable&&(Ju=fo.lineOffset/2-(lo.imageName?-(tu-lo.metrics.width*lo.scale)/2:(lo.scale-1)*tu)),lo.imageName){let ru=Vo[lo.imageName];uo=ru.sdf,$o=ru.pixelRatio,Ro=Md/$o}let Qv=pa?[lo.x+kh,lo.y]:[0,0],ud=pa?[0,0]:[lo.x+kh+ln[0],lo.y+ln[1]-Ju],Ch=[0,0];Ou&&(Ch=ud,ud=[0,0]);let Vd=lo.metrics.isDoubleResolution?2:1,Gd=(lo.metrics.left-Ro)*lo.scale-kh+ud[0],Hd=(-lo.metrics.top-Ro)*lo.scale+ud[1],Af=Gd+Wn.w/Vd*lo.scale/$o,Lh=Hd+Wn.h/Vd*lo.scale/$o,Ed=new u(Gd,Hd),cd=new u(Af,Hd),Yh=new u(Gd,Lh),Df=new u(Af,Lh);if(Ou){let ru=new u(-kh,kh-Eh),pc=-Math.PI/2,$u=tu/2-kh,zv=new u(5-Eh-$u,-(lo.imageName?$u:0)),ff=new u(...Ch);Ed._rotateAround(pc,ru)._add(zv)._add(ff),cd._rotateAround(pc,ru)._add(zv)._add(ff),Yh._rotateAround(pc,ru)._add(zv)._add(ff),Df._rotateAround(pc,ru)._add(zv)._add(ff)}if(la){let ru=Math.sin(la),pc=Math.cos(la),$u=[pc,-ru,ru,pc];Ed._matMult($u),cd._matMult($u),Yh._matMult($u),Df._matMult($u)}let Fv=new u(0,0),lv=new u(0,0);Mo.push({tl:Ed,tr:cd,bl:Yh,br:Df,tex:Wn,writingMode:zi.writingMode,glyphOffset:Qv,sectionIndex:lo.sectionIndex,isSDF:uo,pixelOffsetTL:Fv,pixelOffsetBR:lv,minFontScaleX:0,minFontScaleY:0})}return Mo}(0,F,Re,te,fe,pe,W,R.allowVerticalPlacement),li=R.textSizeData,pi=null;li.kind==="source"?(pi=[v0*te.layout.get("text-size").evaluate(pe,{})],pi[0]>fm&&E(`${R.layerIds[0]}: Value for "text-size" is >= ${tb}. Reduce your "text-size".`)):li.kind==="composite"&&(pi=[v0*vr.compositeTextSizes[0].evaluate(pe,{},kr),v0*vr.compositeTextSizes[1].evaluate(pe,{},kr)],(pi[0]>fm||pi[1]>fm)&&E(`${R.layerIds[0]}: Value for "text-size" is >= ${tb}. Reduce your "text-size".`)),R.addSymbols(R.text,Dr,pi,Re,fe,pe,ft,A,Ke.lineStartIndex,Ke.lineLength,ur,kr);for(let vn of Rt)tr[vn]=R.text.placedSymbolArray.length-1;return 4*Dr.length}function $C(R){for(let A in R)return R[A];return null}function lq(R,A,F,W){let te=R.compareText;if(A in te){let fe=te[A];for(let pe=fe.length-1;pe>=0;pe--)if(W.dist(fe[pe])>4;if(te!==1)throw new Error(`Got v${te} data when expected v1.`);let fe=QC[15&W];if(!fe)throw new Error("Unrecognized array type.");let[pe]=new Uint16Array(A,2,1),[Re]=new Uint32Array(A,4,1);return new AS(Re,pe,fe,A)}constructor(A,F=64,W=Float64Array,te){if(isNaN(A)||A<0)throw new Error(`Unpexpected numItems value: ${A}.`);this.numItems=+A,this.nodeSize=Math.min(Math.max(+F,2),65535),this.ArrayType=W,this.IndexArrayType=A<65536?Uint16Array:Uint32Array;let fe=QC.indexOf(this.ArrayType),pe=2*A*this.ArrayType.BYTES_PER_ELEMENT,Re=A*this.IndexArrayType.BYTES_PER_ELEMENT,Ke=(8-Re%8)%8;if(fe<0)throw new Error(`Unexpected typed array class: ${W}.`);te&&te instanceof ArrayBuffer?(this.data=te,this.ids=new this.IndexArrayType(this.data,8,A),this.coords=new this.ArrayType(this.data,8+Re+Ke,2*A),this._pos=2*A,this._finished=!0):(this.data=new ArrayBuffer(8+pe+Re+Ke),this.ids=new this.IndexArrayType(this.data,8,A),this.coords=new this.ArrayType(this.data,8+Re+Ke,2*A),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+fe]),new Uint16Array(this.data,2,1)[0]=F,new Uint32Array(this.data,4,1)[0]=A)}add(A,F){let W=this._pos>>1;return this.ids[W]=W,this.coords[this._pos++]=A,this.coords[this._pos++]=F,W}finish(){let A=this._pos>>1;if(A!==this.numItems)throw new Error(`Added ${A} items when expected ${this.numItems}.`);return Kw(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(A,F,W,te){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:fe,coords:pe,nodeSize:Re}=this,Ke=[0,fe.length-1,0],ft=[];for(;Ke.length;){let Rt=Ke.pop()||0,tr=Ke.pop()||0,ur=Ke.pop()||0;if(tr-ur<=Re){for(let li=ur;li<=tr;li++){let pi=pe[2*li],vn=pe[2*li+1];pi>=A&&pi<=W&&vn>=F&&vn<=te&&ft.push(fe[li])}continue}let vr=ur+tr>>1,kr=pe[2*vr],Dr=pe[2*vr+1];kr>=A&&kr<=W&&Dr>=F&&Dr<=te&&ft.push(fe[vr]),(Rt===0?A<=kr:F<=Dr)&&(Ke.push(ur),Ke.push(vr-1),Ke.push(1-Rt)),(Rt===0?W>=kr:te>=Dr)&&(Ke.push(vr+1),Ke.push(tr),Ke.push(1-Rt))}return ft}within(A,F,W){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:te,coords:fe,nodeSize:pe}=this,Re=[0,te.length-1,0],Ke=[],ft=W*W;for(;Re.length;){let Rt=Re.pop()||0,tr=Re.pop()||0,ur=Re.pop()||0;if(tr-ur<=pe){for(let li=ur;li<=tr;li++)t6(fe[2*li],fe[2*li+1],A,F)<=ft&&Ke.push(te[li]);continue}let vr=ur+tr>>1,kr=fe[2*vr],Dr=fe[2*vr+1];t6(kr,Dr,A,F)<=ft&&Ke.push(te[vr]),(Rt===0?A-W<=kr:F-W<=Dr)&&(Re.push(ur),Re.push(vr-1),Re.push(1-Rt)),(Rt===0?A+W>=kr:F+W>=Dr)&&(Re.push(vr+1),Re.push(tr),Re.push(1-Rt))}return Ke}}function Kw(R,A,F,W,te,fe){if(te-W<=F)return;let pe=W+te>>1;e6(R,A,pe,W,te,fe),Kw(R,A,F,W,pe-1,1-fe),Kw(R,A,F,pe+1,te,1-fe)}function e6(R,A,F,W,te,fe){for(;te>W;){if(te-W>600){let ft=te-W+1,Rt=F-W+1,tr=Math.log(ft),ur=.5*Math.exp(2*tr/3),vr=.5*Math.sqrt(tr*ur*(ft-ur)/ft)*(Rt-ft/2<0?-1:1);e6(R,A,F,Math.max(W,Math.floor(F-Rt*ur/ft+vr)),Math.min(te,Math.floor(F+(ft-Rt)*ur/ft+vr)),fe)}let pe=A[2*F+fe],Re=W,Ke=te;for(ub(R,A,W,F),A[2*te+fe]>pe&&ub(R,A,W,te);Repe;)Ke--}A[2*W+fe]===pe?ub(R,A,W,Ke):(Ke++,ub(R,A,Ke,te)),Ke<=F&&(W=Ke+1),F<=Ke&&(te=Ke-1)}}function ub(R,A,F,W){SS(R,F,W),SS(A,2*F,2*W),SS(A,2*F+1,2*W+1)}function SS(R,A,F){let W=R[A];R[A]=R[F],R[F]=W}function t6(R,A,F,W){let te=R-F,fe=A-W;return te*te+fe*fe}var Jw;i.bg=void 0,(Jw=i.bg||(i.bg={})).create="create",Jw.load="load",Jw.fullLoad="fullLoad";let cb=null,sh=[],MS=1e3/60,ES="loadTime",$w="fullLoadTime",uq={mark(R){performance.mark(R)},frame(R){let A=R;cb!=null&&sh.push(A-cb),cb=A},clearMetrics(){cb=null,sh=[],performance.clearMeasures(ES),performance.clearMeasures($w);for(let R in i.bg)performance.clearMarks(i.bg[R])},getPerformanceMetrics(){performance.measure(ES,i.bg.create,i.bg.load),performance.measure($w,i.bg.create,i.bg.fullLoad);let R=performance.getEntriesByName(ES)[0].duration,A=performance.getEntriesByName($w)[0].duration,F=sh.length,W=1/(sh.reduce((fe,pe)=>fe+pe,0)/F/1e3),te=sh.filter(fe=>fe>MS).reduce((fe,pe)=>fe+(pe-MS)/MS,0);return{loadTime:R,fullLoadTime:A,fps:W,percentDroppedFrames:te/(F+te)*100,totalFrames:F}}};i.$=class extends Jt{},i.A=yi,i.B=dn,i.C=function(R){if(U==null){let A=R.navigator?R.navigator.userAgent:null;U=!!R.safari||!(!A||!(/\b(iPad|iPhone|iPod)\b/.test(A)||A.match("Safari")&&!A.match("Chrome")))}return U},i.D=Ua,i.E=Pe,i.F=class{constructor(R,A){this.target=R,this.mapId=A,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new mS(()=>this.process()),this.subscription=function(F,W,te,fe){return F.addEventListener(W,te,!1),{unsubscribe:()=>{F.removeEventListener(W,te,!1)}}}(this.target,"message",F=>this.receive(F)),this.globalScope=q(self)?R:window}registerMessageHandler(R,A){this.messageHandlers[R]=A}sendAsync(R,A){return new Promise((F,W)=>{let te=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[te]={resolve:F,reject:W},A&&A.signal.addEventListener("abort",()=>{delete this.resolveRejects[te];let Re={id:te,type:"",origin:location.origin,targetMapId:R.targetMapId,sourceMapId:this.mapId};this.target.postMessage(Re)},{once:!0});let fe=[],pe=Object.assign(Object.assign({},R),{id:te,sourceMapId:this.mapId,origin:location.origin,data:La(R.data,fe)});this.target.postMessage(pe,{transfer:fe})})}receive(R){let A=R.data,F=A.id;if(!(A.origin!=="file://"&&location.origin!=="file://"&&A.origin!=="resource://android"&&location.origin!=="resource://android"&&A.origin!==location.origin||A.targetMapId&&this.mapId!==A.targetMapId)){if(A.type===""){delete this.tasks[F];let W=this.abortControllers[F];return delete this.abortControllers[F],void(W&&W.abort())}if(q(self)||A.mustQueue)return this.tasks[F]=A,this.taskQueue.push(F),void this.invoker.trigger();this.processTask(F,A)}}process(){if(this.taskQueue.length===0)return;let R=this.taskQueue.shift(),A=this.tasks[R];delete this.tasks[R],this.taskQueue.length>0&&this.invoker.trigger(),A&&this.processTask(R,A)}processTask(R,A){return a(this,void 0,void 0,function*(){if(A.type===""){let te=this.resolveRejects[R];return delete this.resolveRejects[R],te?void(A.error?te.reject(Na(A.error)):te.resolve(Na(A.data))):void 0}if(!this.messageHandlers[A.type])return void this.completeTask(R,new Error(`Could not find a registered handler for ${A.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let F=Na(A.data),W=new AbortController;this.abortControllers[R]=W;try{let te=yield this.messageHandlers[A.type](A.sourceMapId,F,W);this.completeTask(R,null,te)}catch(te){this.completeTask(R,te)}})}completeTask(R,A,F){let W=[];delete this.abortControllers[R];let te={id:R,type:"",sourceMapId:this.mapId,origin:location.origin,error:A?La(A):null,data:La(F,W)};this.target.postMessage(te,{transfer:W})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},i.G=Ce,i.H=function(){var R=new yi(16);return yi!=Float32Array&&(R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[11]=0,R[12]=0,R[13]=0,R[14]=0),R[0]=1,R[5]=1,R[10]=1,R[15]=1,R},i.I=Nw,i.J=function(R,A,F){var W,te,fe,pe,Re,Ke,ft,Rt,tr,ur,vr,kr,Dr=F[0],li=F[1],pi=F[2];return A===R?(R[12]=A[0]*Dr+A[4]*li+A[8]*pi+A[12],R[13]=A[1]*Dr+A[5]*li+A[9]*pi+A[13],R[14]=A[2]*Dr+A[6]*li+A[10]*pi+A[14],R[15]=A[3]*Dr+A[7]*li+A[11]*pi+A[15]):(te=A[1],fe=A[2],pe=A[3],Re=A[4],Ke=A[5],ft=A[6],Rt=A[7],tr=A[8],ur=A[9],vr=A[10],kr=A[11],R[0]=W=A[0],R[1]=te,R[2]=fe,R[3]=pe,R[4]=Re,R[5]=Ke,R[6]=ft,R[7]=Rt,R[8]=tr,R[9]=ur,R[10]=vr,R[11]=kr,R[12]=W*Dr+Re*li+tr*pi+A[12],R[13]=te*Dr+Ke*li+ur*pi+A[13],R[14]=fe*Dr+ft*li+vr*pi+A[14],R[15]=pe*Dr+Rt*li+kr*pi+A[15]),R},i.K=function(R,A,F){var W=F[0],te=F[1],fe=F[2];return R[0]=A[0]*W,R[1]=A[1]*W,R[2]=A[2]*W,R[3]=A[3]*W,R[4]=A[4]*te,R[5]=A[5]*te,R[6]=A[6]*te,R[7]=A[7]*te,R[8]=A[8]*fe,R[9]=A[9]*fe,R[10]=A[10]*fe,R[11]=A[11]*fe,R[12]=A[12],R[13]=A[13],R[14]=A[14],R[15]=A[15],R},i.L=ui,i.M=function(R,A){let F={};for(let W=0;W{let A=window.document.createElement("video");return A.muted=!0,new Promise(F=>{A.onloadstart=()=>{F(A)};for(let W of R){let te=window.document.createElement("source");Ee(W)||(A.crossOrigin="Anonymous"),te.src=W,A.appendChild(te)}})},i.a4=function(){return x++},i.a5=Ln,i.a6=R1,i.a7=Fc,i.a8=Sl,i.a9=xS,i.aA=function(R){if(R.type==="custom")return new gS(R);switch(R.type){case"background":return new tq(R);case"circle":return new fi(R);case"fill":return new _t(R);case"fill-extrusion":return new Lv(R);case"heatmap":return new sa(R);case"hillshade":return new Zs(R);case"line":return new hy(R);case"raster":return new ab(R);case"symbol":return new gy(R)}},i.aB=g,i.aC=function(R,A){if(!R)return[{command:"setStyle",args:[A]}];let F=[];try{if(!mt(R.version,A.version))return[{command:"setStyle",args:[A]}];mt(R.center,A.center)||F.push({command:"setCenter",args:[A.center]}),mt(R.zoom,A.zoom)||F.push({command:"setZoom",args:[A.zoom]}),mt(R.bearing,A.bearing)||F.push({command:"setBearing",args:[A.bearing]}),mt(R.pitch,A.pitch)||F.push({command:"setPitch",args:[A.pitch]}),mt(R.sprite,A.sprite)||F.push({command:"setSprite",args:[A.sprite]}),mt(R.glyphs,A.glyphs)||F.push({command:"setGlyphs",args:[A.glyphs]}),mt(R.transition,A.transition)||F.push({command:"setTransition",args:[A.transition]}),mt(R.light,A.light)||F.push({command:"setLight",args:[A.light]}),mt(R.terrain,A.terrain)||F.push({command:"setTerrain",args:[A.terrain]}),mt(R.sky,A.sky)||F.push({command:"setSky",args:[A.sky]}),mt(R.projection,A.projection)||F.push({command:"setProjection",args:[A.projection]});let W={},te=[];(function(pe,Re,Ke,ft){let Rt;for(Rt in Re=Re||{},pe=pe||{})Object.prototype.hasOwnProperty.call(pe,Rt)&&(Object.prototype.hasOwnProperty.call(Re,Rt)||ct(Rt,Ke,ft));for(Rt in Re)Object.prototype.hasOwnProperty.call(Re,Rt)&&(Object.prototype.hasOwnProperty.call(pe,Rt)?mt(pe[Rt],Re[Rt])||(pe[Rt].type==="geojson"&&Re[Rt].type==="geojson"&&Ht(pe,Re,Rt)?Vt(Ke,{command:"setGeoJSONSourceData",args:[Rt,Re[Rt].data]}):Qt(Rt,Re,Ke,ft)):st(Rt,Re,Ke))})(R.sources,A.sources,te,W);let fe=[];R.layers&&R.layers.forEach(pe=>{"source"in pe&&W[pe.source]?F.push({command:"removeLayer",args:[pe.id]}):fe.push(pe)}),F=F.concat(te),function(pe,Re,Ke){Re=Re||[];let ft=(pe=pe||[]).map(tt),Rt=Re.map(tt),tr=pe.reduce(je,{}),ur=Re.reduce(je,{}),vr=ft.slice(),kr=Object.create(null),Dr,li,pi,vn,zi;for(let ln=0,Tn=0;ln@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(F,W,te,fe)=>{let pe=te||fe;return A[W]=!pe||pe.toLowerCase(),""}),A["max-age"]){let F=parseInt(A["max-age"],10);isNaN(F)?delete A["max-age"]:A["max-age"]=F}return A},i.ab=function(R,A){let F=[];for(let W in R)W in A||F.push(W);return F},i.ac=M,i.ad=function(R,A,F){var W=Math.sin(F),te=Math.cos(F),fe=A[0],pe=A[1],Re=A[2],Ke=A[3],ft=A[4],Rt=A[5],tr=A[6],ur=A[7];return A!==R&&(R[8]=A[8],R[9]=A[9],R[10]=A[10],R[11]=A[11],R[12]=A[12],R[13]=A[13],R[14]=A[14],R[15]=A[15]),R[0]=fe*te+ft*W,R[1]=pe*te+Rt*W,R[2]=Re*te+tr*W,R[3]=Ke*te+ur*W,R[4]=ft*te-fe*W,R[5]=Rt*te-pe*W,R[6]=tr*te-Re*W,R[7]=ur*te-Ke*W,R},i.ae=function(R){var A=new yi(16);return A[0]=R[0],A[1]=R[1],A[2]=R[2],A[3]=R[3],A[4]=R[4],A[5]=R[5],A[6]=R[6],A[7]=R[7],A[8]=R[8],A[9]=R[9],A[10]=R[10],A[11]=R[11],A[12]=R[12],A[13]=R[13],A[14]=R[14],A[15]=R[15],A},i.af=qn,i.ag=function(R,A){let F=0,W=0;if(R.kind==="constant")W=R.layoutSize;else if(R.kind!=="source"){let{interpolationType:te,minZoom:fe,maxZoom:pe}=R,Re=te?M(ko.interpolationFactor(te,A,fe,pe),0,1):0;R.kind==="camera"?W=Lo.number(R.minSize,R.maxSize,Re):F=Re}return{uSizeT:F,uSize:W}},i.ai=function(R,{uSize:A,uSizeT:F},{lowerSize:W,upperSize:te}){return R.kind==="source"?W/v0:R.kind==="composite"?Lo.number(W/v0,te/v0,F):A},i.aj=hS,i.ak=function(R,A,F,W){let te=A.y-R.y,fe=A.x-R.x,pe=W.y-F.y,Re=W.x-F.x,Ke=pe*fe-Re*te;if(Ke===0)return null;let ft=(Re*(R.y-F.y)-pe*(R.x-F.x))/Ke;return new u(R.x+ft*fe,R.y+ft*te)},i.al=GC,i.am=Sc,i.an=Ii,i.ao=function(R){let A=1/0,F=1/0,W=-1/0,te=-1/0;for(let fe of R)A=Math.min(A,fe.x),F=Math.min(F,fe.y),W=Math.max(W,fe.x),te=Math.max(te,fe.y);return[A,F,W,te]},i.ap=tu,i.ar=fS,i.as=function(R,A){var F=A[0],W=A[1],te=A[2],fe=A[3],pe=A[4],Re=A[5],Ke=A[6],ft=A[7],Rt=A[8],tr=A[9],ur=A[10],vr=A[11],kr=A[12],Dr=A[13],li=A[14],pi=A[15],vn=F*Re-W*pe,zi=F*Ke-te*pe,ln=F*ft-fe*pe,Tn=W*Ke-te*Re,pa=W*ft-fe*Re,ro=te*ft-fe*Ke,Vo=Rt*Dr-tr*kr,Xa=Rt*li-ur*kr,la=Rt*pi-vr*kr,Mo=tr*li-ur*Dr,fo=tr*pi-vr*Dr,lo=ur*pi-vr*li,Wn=vn*lo-zi*fo+ln*Mo+Tn*la-pa*Xa+ro*Vo;return Wn?(R[0]=(Re*lo-Ke*fo+ft*Mo)*(Wn=1/Wn),R[1]=(te*fo-W*lo-fe*Mo)*Wn,R[2]=(Dr*ro-li*pa+pi*Tn)*Wn,R[3]=(ur*pa-tr*ro-vr*Tn)*Wn,R[4]=(Ke*la-pe*lo-ft*Xa)*Wn,R[5]=(F*lo-te*la+fe*Xa)*Wn,R[6]=(li*ln-kr*ro-pi*zi)*Wn,R[7]=(Rt*ro-ur*ln+vr*zi)*Wn,R[8]=(pe*fo-Re*la+ft*Vo)*Wn,R[9]=(W*la-F*fo-fe*Vo)*Wn,R[10]=(kr*pa-Dr*ln+pi*vn)*Wn,R[11]=(tr*ln-Rt*pa-vr*vn)*Wn,R[12]=(Re*Xa-pe*Mo-Ke*Vo)*Wn,R[13]=(F*Mo-W*Xa+te*Vo)*Wn,R[14]=(Dr*zi-kr*Tn-li*vn)*Wn,R[15]=(Rt*Tn-tr*zi+ur*vn)*Wn,R):null},i.at=TS,i.au=Hw,i.av=AS,i.aw=function(){let R={},A=ce.$version;for(let F in ce.$root){let W=ce.$root[F];if(W.required){let te=null;te=F==="version"?A:W.type==="array"?[]:{},te!=null&&(R[F]=te)}}return R},i.ax=Zn,i.ay=ie,i.az=function(R){R=R.slice();let A=Object.create(null);for(let F=0;F25||W<0||W>=1||F<0||F>=1)},i.bc=function(R,A){return R[0]=A[0],R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=A[1],R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=A[2],R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R},i.bd=class extends Mt{},i.be=yS,i.bf=uq,i.bh=ge,i.bi=function(R,A){_e.REGISTERED_PROTOCOLS[R]=A},i.bj=function(R){delete _e.REGISTERED_PROTOCOLS[R]},i.bk=function(R,A){let F={};for(let te=0;telo*tu)}let Xa=pe?"center":F.get("text-justify").evaluate(ft,{},R.canonical),la=F.get("symbol-placement")==="point"?F.get("text-max-width").evaluate(ft,{},R.canonical)*tu:1/0,Mo=()=>{R.bucket.allowVerticalPlacement&&Ka(ln)&&(kr.vertical=Qx(Dr,R.glyphMap,R.glyphPositions,R.imagePositions,Rt,la,fe,ro,"left",pa,pi,i.ah.vertical,!0,ur,tr))};if(!pe&&Vo){let fo=new Set;if(Xa==="auto")for(let Wn=0;Wna(void 0,void 0,void 0,function*(){if(R.byteLength===0)return createImageBitmap(new ImageData(1,1));let A=new Blob([new Uint8Array(R)],{type:"image/png"});try{return createImageBitmap(A)}catch(F){throw new Error(`Could not load image because of ${F.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),i.e=L,i.f=R=>new Promise((A,F)=>{let W=new Image;W.onload=()=>{A(W),URL.revokeObjectURL(W.src),W.onload=null,window.requestAnimationFrame(()=>{W.src=Z})},W.onerror=()=>F(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));let te=new Blob([new Uint8Array(R)],{type:"image/png"});W.src=R.byteLength?URL.createObjectURL(te):Z}),i.g=ke,i.h=(R,A)=>Se(L(R,{type:"json"}),A),i.i=q,i.j=me,i.k=Le,i.l=(R,A)=>Se(L(R,{type:"arrayBuffer"}),A),i.m=Se,i.n=function(R){return new lS(R).readFields(OQ,[])},i.o=aa,i.p=cS,i.q=ue,i.r=Wi,i.s=Ee,i.t=Yi,i.u=Mi,i.v=ce,i.w=E,i.x=function([R,A,F]){return A+=90,A*=Math.PI/180,F*=Math.PI/180,{x:R*Math.cos(A)*Math.sin(F),y:R*Math.sin(A)*Math.sin(F),z:R*Math.cos(F)}},i.y=Lo,i.z=rs}),r("worker",["./shared"],function(i){"use strict";class a{constructor(Ge){this.keyCache={},Ge&&this.replace(Ge)}replace(Ge){this._layerConfigs={},this._layers={},this.update(Ge,[])}update(Ge,Je){for(let et of Ge){this._layerConfigs[et.id]=et;let xt=this._layers[et.id]=i.aA(et);xt._featureFilter=i.a7(xt.filter),this.keyCache[et.id]&&delete this.keyCache[et.id]}for(let et of Je)delete this.keyCache[et],delete this._layerConfigs[et],delete this._layers[et];this.familiesBySource={};let We=i.bk(Object.values(this._layerConfigs),this.keyCache);for(let et of We){let xt=et.map(Ir=>this._layers[Ir.id]),At=xt[0];if(At.visibility==="none")continue;let Kt=At.source||"",er=this.familiesBySource[Kt];er||(er=this.familiesBySource[Kt]={});let Sr=At.sourceLayer||"_geojsonTileLayer",Gr=er[Sr];Gr||(Gr=er[Sr]=[]),Gr.push(xt)}}}class o{constructor(Ge){let Je={},We=[];for(let Kt in Ge){let er=Ge[Kt],Sr=Je[Kt]={};for(let Gr in er){let Ir=er[+Gr];if(!Ir||Ir.bitmap.width===0||Ir.bitmap.height===0)continue;let Yr={x:0,y:0,w:Ir.bitmap.width+2,h:Ir.bitmap.height+2};We.push(Yr),Sr[Gr]={rect:Yr,metrics:Ir.metrics}}}let{w:et,h:xt}=i.p(We),At=new i.o({width:et||1,height:xt||1});for(let Kt in Ge){let er=Ge[Kt];for(let Sr in er){let Gr=er[+Sr];if(!Gr||Gr.bitmap.width===0||Gr.bitmap.height===0)continue;let Ir=Je[Kt][Sr].rect;i.o.copy(Gr.bitmap,At,{x:0,y:0},{x:Ir.x+1,y:Ir.y+1},Gr.bitmap)}}this.image=At,this.positions=Je}}i.bl("GlyphAtlas",o);class s{constructor(Ge){this.tileID=new i.S(Ge.tileID.overscaledZ,Ge.tileID.wrap,Ge.tileID.canonical.z,Ge.tileID.canonical.x,Ge.tileID.canonical.y),this.uid=Ge.uid,this.zoom=Ge.zoom,this.pixelRatio=Ge.pixelRatio,this.tileSize=Ge.tileSize,this.source=Ge.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Ge.showCollisionBoxes,this.collectResourceTiming=!!Ge.collectResourceTiming,this.returnDependencies=!!Ge.returnDependencies,this.promoteId=Ge.promoteId,this.inFlightDependencies=[]}parse(Ge,Je,We,et){return i._(this,void 0,void 0,function*(){this.status="parsing",this.data=Ge,this.collisionBoxArray=new i.a5;let xt=new i.bm(Object.keys(Ge.layers).sort()),At=new i.bn(this.tileID,this.promoteId);At.bucketLayerIDs=[];let Kt={},er={featureIndex:At,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:We},Sr=Je.familiesBySource[this.source];for(let Qn in Sr){let Vi=Ge.layers[Qn];if(!Vi)continue;Vi.version===1&&i.w(`Vector tile source "${this.source}" layer "${Qn}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let Kn=xt.encode(Qn),Jn=[];for(let Gt=0;Gt=wt.maxzoom||wt.visibility!=="none"&&(l(Gt,this.zoom,We),(Kt[wt.id]=wt.createBucket({index:At.bucketLayerIDs.length,layers:Gt,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Kn,sourceID:this.source})).populate(Jn,er,this.tileID.canonical),At.bucketLayerIDs.push(Gt.map(rr=>rr.id)))}}let Gr=i.aF(er.glyphDependencies,Qn=>Object.keys(Qn).map(Number));this.inFlightDependencies.forEach(Qn=>Qn==null?void 0:Qn.abort()),this.inFlightDependencies=[];let Ir=Promise.resolve({});if(Object.keys(Gr).length){let Qn=new AbortController;this.inFlightDependencies.push(Qn),Ir=et.sendAsync({type:"GG",data:{stacks:Gr,source:this.source,tileID:this.tileID,type:"glyphs"}},Qn)}let Yr=Object.keys(er.iconDependencies),_i=Promise.resolve({});if(Yr.length){let Qn=new AbortController;this.inFlightDependencies.push(Qn),_i=et.sendAsync({type:"GI",data:{icons:Yr,source:this.source,tileID:this.tileID,type:"icons"}},Qn)}let Pi=Object.keys(er.patternDependencies),ai=Promise.resolve({});if(Pi.length){let Qn=new AbortController;this.inFlightDependencies.push(Qn),ai=et.sendAsync({type:"GI",data:{icons:Pi,source:this.source,tileID:this.tileID,type:"patterns"}},Qn)}let[mi,un,Fn]=yield Promise.all([Ir,_i,ai]),An=new o(mi),Hn=new i.bo(un,Fn);for(let Qn in Kt){let Vi=Kt[Qn];Vi instanceof i.a6?(l(Vi.layers,this.zoom,We),i.bp({bucket:Vi,glyphMap:mi,glyphPositions:An.positions,imageMap:un,imagePositions:Hn.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):Vi.hasPattern&&(Vi instanceof i.bq||Vi instanceof i.br||Vi instanceof i.bs)&&(l(Vi.layers,this.zoom,We),Vi.addFeatures(er,this.tileID.canonical,Hn.patternPositions))}return this.status="done",{buckets:Object.values(Kt).filter(Qn=>!Qn.isEmpty()),featureIndex:At,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:An.image,imageAtlas:Hn,glyphMap:this.returnDependencies?mi:null,iconMap:this.returnDependencies?un:null,glyphPositions:this.returnDependencies?An.positions:null}})}}function l(gt,Ge,Je){let We=new i.z(Ge);for(let et of gt)et.recalculate(We,Je)}class u{constructor(Ge,Je,We){this.actor=Ge,this.layerIndex=Je,this.availableImages=We,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(Ge,Je){return i._(this,void 0,void 0,function*(){let We=yield i.l(Ge.request,Je);try{return{vectorTile:new i.bt.VectorTile(new i.bu(We.data)),rawData:We.data,cacheControl:We.cacheControl,expires:We.expires}}catch(et){let xt=new Uint8Array(We.data),At=`Unable to parse the tile at ${Ge.request.url}, `;throw At+=xt[0]===31&&xt[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${et.message}`,new Error(At)}})}loadTile(Ge){return i._(this,void 0,void 0,function*(){let Je=Ge.uid,We=!!(Ge&&Ge.request&&Ge.request.collectResourceTiming)&&new i.bv(Ge.request),et=new s(Ge);this.loading[Je]=et;let xt=new AbortController;et.abort=xt;try{let At=yield this.loadVectorTile(Ge,xt);if(delete this.loading[Je],!At)return null;let Kt=At.rawData,er={};At.expires&&(er.expires=At.expires),At.cacheControl&&(er.cacheControl=At.cacheControl);let Sr={};if(We){let Ir=We.finish();Ir&&(Sr.resourceTiming=JSON.parse(JSON.stringify(Ir)))}et.vectorTile=At.vectorTile;let Gr=et.parse(At.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[Je]=et,this.fetching[Je]={rawTileData:Kt,cacheControl:er,resourceTiming:Sr};try{let Ir=yield Gr;return i.e({rawTileData:Kt.slice(0)},Ir,er,Sr)}finally{delete this.fetching[Je]}}catch(At){throw delete this.loading[Je],et.status="done",this.loaded[Je]=et,At}})}reloadTile(Ge){return i._(this,void 0,void 0,function*(){let Je=Ge.uid;if(!this.loaded||!this.loaded[Je])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");let We=this.loaded[Je];if(We.showCollisionBoxes=Ge.showCollisionBoxes,We.status==="parsing"){let et=yield We.parse(We.vectorTile,this.layerIndex,this.availableImages,this.actor),xt;if(this.fetching[Je]){let{rawTileData:At,cacheControl:Kt,resourceTiming:er}=this.fetching[Je];delete this.fetching[Je],xt=i.e({rawTileData:At.slice(0)},et,Kt,er)}else xt=et;return xt}if(We.status==="done"&&We.vectorTile)return We.parse(We.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(Ge){return i._(this,void 0,void 0,function*(){let Je=this.loading,We=Ge.uid;Je&&Je[We]&&Je[We].abort&&(Je[We].abort.abort(),delete Je[We])})}removeTile(Ge){return i._(this,void 0,void 0,function*(){this.loaded&&this.loaded[Ge.uid]&&delete this.loaded[Ge.uid]})}}class c{constructor(){this.loaded={}}loadTile(Ge){return i._(this,void 0,void 0,function*(){let{uid:Je,encoding:We,rawImageData:et,redFactor:xt,greenFactor:At,blueFactor:Kt,baseShift:er}=Ge,Sr=et.width+2,Gr=et.height+2,Ir=i.b(et)?new i.R({width:Sr,height:Gr},yield i.bw(et,-1,-1,Sr,Gr)):et,Yr=new i.bx(Je,Ir,We,xt,At,Kt,er);return this.loaded=this.loaded||{},this.loaded[Je]=Yr,Yr})}removeTile(Ge){let Je=this.loaded,We=Ge.uid;Je&&Je[We]&&delete Je[We]}}function f(gt,Ge){if(gt.length!==0){h(gt[0],Ge);for(var Je=1;Je=Math.abs(Kt)?Je-er+Kt:Kt-er+Je,Je=er}Je+We>=0!=!!Ge&>.reverse()}var d=i.by(function gt(Ge,Je){var We,et=Ge&&Ge.type;if(et==="FeatureCollection")for(We=0;We>31}function q(gt,Ge){for(var Je=gt.loadGeometry(),We=gt.type,et=0,xt=0,At=Je.length,Kt=0;Ktgt},j=Math.fround||(N=new Float32Array(1),gt=>(N[0]=+gt,N[0]));var N;let H=3,re=5,oe=6;class _e{constructor(Ge){this.options=Object.assign(Object.create(Z),Ge),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(Ge){let{log:Je,minZoom:We,maxZoom:et}=this.options;Je&&console.time("total time");let xt=`prepare ${Ge.length} points`;Je&&console.time(xt),this.points=Ge;let At=[];for(let er=0;er=We;er--){let Sr=+Date.now();Kt=this.trees[er]=this._createTree(this._cluster(Kt,er)),Je&&console.log("z%d: %d clusters in %dms",er,Kt.numItems,+Date.now()-Sr)}return Je&&console.timeEnd("total time"),this}getClusters(Ge,Je){let We=((Ge[0]+180)%360+360)%360-180,et=Math.max(-90,Math.min(90,Ge[1])),xt=Ge[2]===180?180:((Ge[2]+180)%360+360)%360-180,At=Math.max(-90,Math.min(90,Ge[3]));if(Ge[2]-Ge[0]>=360)We=-180,xt=180;else if(We>xt){let Ir=this.getClusters([We,et,180,At],Je),Yr=this.getClusters([-180,et,xt,At],Je);return Ir.concat(Yr)}let Kt=this.trees[this._limitZoom(Je)],er=Kt.range(ge(We),ie(At),ge(xt),ie(et)),Sr=Kt.data,Gr=[];for(let Ir of er){let Yr=this.stride*Ir;Gr.push(Sr[Yr+re]>1?ke(Sr,Yr,this.clusterProps):this.points[Sr[Yr+H]])}return Gr}getChildren(Ge){let Je=this._getOriginId(Ge),We=this._getOriginZoom(Ge),et="No cluster with the specified id.",xt=this.trees[We];if(!xt)throw new Error(et);let At=xt.data;if(Je*this.stride>=At.length)throw new Error(et);let Kt=this.options.radius/(this.options.extent*Math.pow(2,We-1)),er=xt.within(At[Je*this.stride],At[Je*this.stride+1],Kt),Sr=[];for(let Gr of er){let Ir=Gr*this.stride;At[Ir+4]===Ge&&Sr.push(At[Ir+re]>1?ke(At,Ir,this.clusterProps):this.points[At[Ir+H]])}if(Sr.length===0)throw new Error(et);return Sr}getLeaves(Ge,Je,We){let et=[];return this._appendLeaves(et,Ge,Je=Je||10,We=We||0,0),et}getTile(Ge,Je,We){let et=this.trees[this._limitZoom(Ge)],xt=Math.pow(2,Ge),{extent:At,radius:Kt}=this.options,er=Kt/At,Sr=(We-er)/xt,Gr=(We+1+er)/xt,Ir={features:[]};return this._addTileFeatures(et.range((Je-er)/xt,Sr,(Je+1+er)/xt,Gr),et.data,Je,We,xt,Ir),Je===0&&this._addTileFeatures(et.range(1-er/xt,Sr,1,Gr),et.data,xt,We,xt,Ir),Je===xt-1&&this._addTileFeatures(et.range(0,Sr,er/xt,Gr),et.data,-1,We,xt,Ir),Ir.features.length?Ir:null}getClusterExpansionZoom(Ge){let Je=this._getOriginZoom(Ge)-1;for(;Je<=this.options.maxZoom;){let We=this.getChildren(Ge);if(Je++,We.length!==1)break;Ge=We[0].properties.cluster_id}return Je}_appendLeaves(Ge,Je,We,et,xt){let At=this.getChildren(Je);for(let Kt of At){let er=Kt.properties;if(er&&er.cluster?xt+er.point_count<=et?xt+=er.point_count:xt=this._appendLeaves(Ge,er.cluster_id,We,et,xt):xt1,Gr,Ir,Yr;if(Sr)Gr=Ce(Je,er,this.clusterProps),Ir=Je[er],Yr=Je[er+1];else{let ai=this.points[Je[er+H]];Gr=ai.properties;let[mi,un]=ai.geometry.coordinates;Ir=ge(mi),Yr=ie(un)}let _i={type:1,geometry:[[Math.round(this.options.extent*(Ir*xt-We)),Math.round(this.options.extent*(Yr*xt-et))]],tags:Gr},Pi;Pi=Sr||this.options.generateId?Je[er+H]:this.points[Je[er+H]].id,Pi!==void 0&&(_i.id=Pi),At.features.push(_i)}}_limitZoom(Ge){return Math.max(this.options.minZoom,Math.min(Math.floor(+Ge),this.options.maxZoom+1))}_cluster(Ge,Je){let{radius:We,extent:et,reduce:xt,minPoints:At}=this.options,Kt=We/(et*Math.pow(2,Je)),er=Ge.data,Sr=[],Gr=this.stride;for(let Ir=0;IrJe&&(mi+=er[Fn+re])}if(mi>ai&&mi>=At){let un,Fn=Yr*ai,An=_i*ai,Hn=-1,Qn=((Ir/Gr|0)<<5)+(Je+1)+this.points.length;for(let Vi of Pi){let Kn=Vi*Gr;if(er[Kn+2]<=Je)continue;er[Kn+2]=Je;let Jn=er[Kn+re];Fn+=er[Kn]*Jn,An+=er[Kn+1]*Jn,er[Kn+4]=Qn,xt&&(un||(un=this._map(er,Ir,!0),Hn=this.clusterProps.length,this.clusterProps.push(un)),xt(un,this._map(er,Kn)))}er[Ir+4]=Qn,Sr.push(Fn/mi,An/mi,1/0,Qn,-1,mi),xt&&Sr.push(Hn)}else{for(let un=0;un1)for(let un of Pi){let Fn=un*Gr;if(!(er[Fn+2]<=Je)){er[Fn+2]=Je;for(let An=0;An>5}_getOriginZoom(Ge){return(Ge-this.points.length)%32}_map(Ge,Je,We){if(Ge[Je+re]>1){let At=this.clusterProps[Ge[Je+oe]];return We?Object.assign({},At):At}let et=this.points[Ge[Je+H]].properties,xt=this.options.map(et);return We&&xt===et?Object.assign({},xt):xt}}function ke(gt,Ge,Je){return{type:"Feature",id:gt[Ge+H],properties:Ce(gt,Ge,Je),geometry:{type:"Point",coordinates:[(We=gt[Ge],360*(We-.5)),Se(gt[Ge+1])]}};var We}function Ce(gt,Ge,Je){let We=gt[Ge+re],et=We>=1e4?`${Math.round(We/1e3)}k`:We>=1e3?Math.round(We/100)/10+"k":We,xt=gt[Ge+oe],At=xt===-1?{}:Object.assign({},Je[xt]);return Object.assign(At,{cluster:!0,cluster_id:gt[Ge+H],point_count:We,point_count_abbreviated:et})}function ge(gt){return gt/360+.5}function ie(gt){let Ge=Math.sin(gt*Math.PI/180),Je=.5-.25*Math.log((1+Ge)/(1-Ge))/Math.PI;return Je<0?0:Je>1?1:Je}function Se(gt){let Ge=(180-360*gt)*Math.PI/180;return 360*Math.atan(Math.exp(Ge))/Math.PI-90}function Ee(gt,Ge,Je,We){let et=We,xt=Ge+(Je-Ge>>1),At,Kt=Je-Ge,er=gt[Ge],Sr=gt[Ge+1],Gr=gt[Je],Ir=gt[Je+1];for(let Yr=Ge+3;Yret)At=Yr,et=_i;else if(_i===et){let Pi=Math.abs(Yr-xt);PiWe&&(At-Ge>3&&Ee(gt,Ge,At,We),gt[At+2]=et,Je-At>3&&Ee(gt,At,Je,We))}function we(gt,Ge,Je,We,et,xt){let At=et-Je,Kt=xt-We;if(At!==0||Kt!==0){let er=((gt-Je)*At+(Ge-We)*Kt)/(At*At+Kt*Kt);er>1?(Je=et,We=xt):er>0&&(Je+=At*er,We+=Kt*er)}return At=gt-Je,Kt=Ge-We,At*At+Kt*Kt}function De(gt,Ge,Je,We){let et={id:gt==null?null:gt,type:Ge,geometry:Je,tags:We,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(Ge==="Point"||Ge==="MultiPoint"||Ge==="LineString")Le(et,Je);else if(Ge==="Polygon")Le(et,Je[0]);else if(Ge==="MultiLineString")for(let xt of Je)Le(et,xt);else if(Ge==="MultiPolygon")for(let xt of Je)Le(et,xt[0]);return et}function Le(gt,Ge){for(let Je=0;Je0&&(At+=We?(et*Gr-Sr*xt)/2:Math.sqrt(Math.pow(Sr-et,2)+Math.pow(Gr-xt,2))),et=Sr,xt=Gr}let Kt=Ge.length-3;Ge[2]=1,Ee(Ge,0,Kt,Je),Ge[Kt+2]=1,Ge.size=Math.abs(At),Ge.start=0,Ge.end=Ge.size}function He(gt,Ge,Je,We){for(let et=0;et1?1:Je}function Vt(gt,Ge,Je,We,et,xt,At,Kt){if(We/=Ge,xt>=(Je/=Ge)&&At=We)return null;let er=[];for(let Sr of gt){let Gr=Sr.geometry,Ir=Sr.type,Yr=et===0?Sr.minX:Sr.minY,_i=et===0?Sr.maxX:Sr.maxY;if(Yr>=Je&&_i=We)continue;let Pi=[];if(Ir==="Point"||Ir==="MultiPoint")st(Gr,Pi,Je,We,et);else if(Ir==="LineString")ct(Gr,Pi,Je,We,et,!1,Kt.lineMetrics);else if(Ir==="MultiLineString")Ht(Gr,Pi,Je,We,et,!1);else if(Ir==="Polygon")Ht(Gr,Pi,Je,We,et,!0);else if(Ir==="MultiPolygon")for(let ai of Gr){let mi=[];Ht(ai,mi,Je,We,et,!0),mi.length&&Pi.push(mi)}if(Pi.length){if(Kt.lineMetrics&&Ir==="LineString"){for(let ai of Pi)er.push(De(Sr.id,Ir,ai,Sr.tags));continue}Ir!=="LineString"&&Ir!=="MultiLineString"||(Pi.length===1?(Ir="LineString",Pi=Pi[0]):Ir="MultiLineString"),Ir!=="Point"&&Ir!=="MultiPoint"||(Ir=Pi.length===3?"Point":"MultiPoint"),er.push(De(Sr.id,Ir,Pi,Sr.tags))}}return er.length?er:null}function st(gt,Ge,Je,We,et){for(let xt=0;xt=Je&&At<=We&&nr(Ge,gt[xt],gt[xt+1],gt[xt+2])}}function ct(gt,Ge,Je,We,et,xt,At){let Kt=Qt(gt),er=et===0?tt:je,Sr,Gr,Ir=gt.start;for(let mi=0;miJe&&(Gr=er(Kt,un,Fn,Hn,Qn,Je),At&&(Kt.start=Ir+Sr*Gr)):Vi>We?Kn=Je&&(Gr=er(Kt,un,Fn,Hn,Qn,Je),Jn=!0),Kn>We&&Vi<=We&&(Gr=er(Kt,un,Fn,Hn,Qn,We),Jn=!0),!xt&&Jn&&(At&&(Kt.end=Ir+Sr*Gr),Ge.push(Kt),Kt=Qt(gt)),At&&(Ir+=Sr)}let Yr=gt.length-3,_i=gt[Yr],Pi=gt[Yr+1],ai=et===0?_i:Pi;ai>=Je&&ai<=We&&nr(Kt,_i,Pi,gt[Yr+2]),Yr=Kt.length-3,xt&&Yr>=3&&(Kt[Yr]!==Kt[0]||Kt[Yr+1]!==Kt[1])&&nr(Kt,Kt[0],Kt[1],Kt[2]),Kt.length&&Ge.push(Kt)}function Qt(gt){let Ge=[];return Ge.size=gt.size,Ge.start=gt.start,Ge.end=gt.end,Ge}function Ht(gt,Ge,Je,We,et,xt){for(let At of gt)ct(At,Ge,Je,We,et,xt,!1)}function nr(gt,Ge,Je,We){gt.push(Ge,Je,We)}function tt(gt,Ge,Je,We,et,xt){let At=(xt-Ge)/(We-Ge);return nr(gt,xt,Je+(et-Je)*At,1),At}function je(gt,Ge,Je,We,et,xt){let At=(xt-Je)/(et-Je);return nr(gt,Ge+(We-Ge)*At,xt,1),At}function Ue(gt,Ge){let Je=[];for(let We=0;We0&&Ge.size<(et?At:We))return void(Je.numPoints+=Ge.length/3);let Kt=[];for(let er=0;erAt)&&(Je.numSimplified++,Kt.push(Ge[er],Ge[er+1])),Je.numPoints++;et&&function(er,Sr){let Gr=0;for(let Ir=0,Yr=er.length,_i=Yr-2;Ir0===Sr)for(let Ir=0,Yr=er.length;Ir24)throw new Error("maxZoom should be in the 0-24 range");if(Je.promoteId&&Je.generateId)throw new Error("promoteId and generateId cannot be used together.");let et=function(xt,At){let Kt=[];if(xt.type==="FeatureCollection")for(let er=0;er1&&console.time("creation"),_i=this.tiles[Yr]=Tt(Ge,Je,We,et,Sr),this.tileCoords.push({z:Je,x:We,y:et}),Gr)){Gr>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Je,We,et,_i.numFeatures,_i.numPoints,_i.numSimplified),console.timeEnd("creation"));let Jn=`z${Je}`;this.stats[Jn]=(this.stats[Jn]||0)+1,this.total++}if(_i.source=Ge,xt==null){if(Je===Sr.indexMaxZoom||_i.numPoints<=Sr.indexMaxPoints)continue}else{if(Je===Sr.maxZoom||Je===xt)continue;if(xt!=null){let Jn=xt-Je;if(We!==At>>Jn||et!==Kt>>Jn)continue}}if(_i.source=null,Ge.length===0)continue;Gr>1&&console.time("clipping");let Pi=.5*Sr.buffer/Sr.extent,ai=.5-Pi,mi=.5+Pi,un=1+Pi,Fn=null,An=null,Hn=null,Qn=null,Vi=Vt(Ge,Ir,We-Pi,We+mi,0,_i.minX,_i.maxX,Sr),Kn=Vt(Ge,Ir,We+ai,We+un,0,_i.minX,_i.maxX,Sr);Ge=null,Vi&&(Fn=Vt(Vi,Ir,et-Pi,et+mi,1,_i.minY,_i.maxY,Sr),An=Vt(Vi,Ir,et+ai,et+un,1,_i.minY,_i.maxY,Sr),Vi=null),Kn&&(Hn=Vt(Kn,Ir,et-Pi,et+mi,1,_i.minY,_i.maxY,Sr),Qn=Vt(Kn,Ir,et+ai,et+un,1,_i.minY,_i.maxY,Sr),Kn=null),Gr>1&&console.timeEnd("clipping"),er.push(Fn||[],Je+1,2*We,2*et),er.push(An||[],Je+1,2*We,2*et+1),er.push(Hn||[],Je+1,2*We+1,2*et),er.push(Qn||[],Je+1,2*We+1,2*et+1)}}getTile(Ge,Je,We){Ge=+Ge,Je=+Je,We=+We;let et=this.options,{extent:xt,debug:At}=et;if(Ge<0||Ge>24)return null;let Kt=1<1&&console.log("drilling down to z%d-%d-%d",Ge,Je,We);let Sr,Gr=Ge,Ir=Je,Yr=We;for(;!Sr&&Gr>0;)Gr--,Ir>>=1,Yr>>=1,Sr=this.tiles[or(Gr,Ir,Yr)];return Sr&&Sr.source?(At>1&&(console.log("found parent tile z%d-%d-%d",Gr,Ir,Yr),console.time("drilling down")),this.splitTile(Sr.source,Gr,Ir,Yr,Ge,Je,We),At>1&&console.timeEnd("drilling down"),this.tiles[er]?rt(this.tiles[er],xt):null):null}}function or(gt,Ge,Je){return 32*((1<{Ir.properties=_i;let Pi={};for(let ai of Yr)Pi[ai]=er[ai].evaluate(Gr,Ir);return Pi},At.reduce=(_i,Pi)=>{Ir.properties=Pi;for(let ai of Yr)Gr.accumulated=_i[ai],_i[ai]=Sr[ai].evaluate(Gr,Ir)},At}(Ge)).load((yield this._pendingData).features):(et=yield this._pendingData,new Xt(et,Ge.geojsonVtOptions)),this.loaded={};let xt={};if(We){let At=We.finish();At&&(xt.resourceTiming={},xt.resourceTiming[Ge.source]=JSON.parse(JSON.stringify(At)))}return xt}catch(xt){if(delete this._pendingRequest,i.bB(xt))return{abandoned:!0};throw xt}var et})}getData(){return i._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(Ge){let Je=this.loaded;return Je&&Je[Ge.uid]?super.reloadTile(Ge):this.loadTile(Ge)}loadAndProcessGeoJSON(Ge,Je){return i._(this,void 0,void 0,function*(){let We=yield this.loadGeoJSON(Ge,Je);if(delete this._pendingRequest,typeof We!="object")throw new Error(`Input data given to '${Ge.source}' is not a valid GeoJSON object.`);if(d(We,!0),Ge.filter){let et=i.bC(Ge.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(et.result==="error")throw new Error(et.value.map(At=>`${At.key}: ${At.message}`).join(", "));We={type:"FeatureCollection",features:We.features.filter(At=>et.value.evaluate({zoom:0},At))}}return We})}loadGeoJSON(Ge,Je){return i._(this,void 0,void 0,function*(){let{promoteId:We}=Ge;if(Ge.request){let et=yield i.h(Ge.request,Je);return this._dataUpdateable=Er(et.data,We)?ei(et.data,We):void 0,et.data}if(typeof Ge.data=="string")try{let et=JSON.parse(Ge.data);return this._dataUpdateable=Er(et,We)?ei(et,We):void 0,et}catch(et){throw new Error(`Input data given to '${Ge.source}' is not a valid GeoJSON object.`)}if(!Ge.dataDiff)throw new Error(`Input data given to '${Ge.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${Ge.source}`);return function(et,xt,At){var Kt,er,Sr,Gr;if(xt.removeAll&&et.clear(),xt.remove)for(let Ir of xt.remove)et.delete(Ir);if(xt.add)for(let Ir of xt.add){let Yr=_r(Ir,At);Yr!=null&&et.set(Yr,Ir)}if(xt.update)for(let Ir of xt.update){let Yr=et.get(Ir.id);if(Yr==null)continue;let _i=!Ir.removeAllProperties&&(((Kt=Ir.removeProperties)===null||Kt===void 0?void 0:Kt.length)>0||((er=Ir.addOrUpdateProperties)===null||er===void 0?void 0:er.length)>0);if((Ir.newGeometry||Ir.removeAllProperties||_i)&&(Yr=Object.assign({},Yr),et.set(Ir.id,Yr),_i&&(Yr.properties=Object.assign({},Yr.properties))),Ir.newGeometry&&(Yr.geometry=Ir.newGeometry),Ir.removeAllProperties)Yr.properties={};else if(((Sr=Ir.removeProperties)===null||Sr===void 0?void 0:Sr.length)>0)for(let Pi of Ir.removeProperties)Object.prototype.hasOwnProperty.call(Yr.properties,Pi)&&delete Yr.properties[Pi];if(((Gr=Ir.addOrUpdateProperties)===null||Gr===void 0?void 0:Gr.length)>0)for(let{key:Pi,value:ai}of Ir.addOrUpdateProperties)Yr.properties[Pi]=ai}}(this._dataUpdateable,Ge.dataDiff,We),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(Ge){return i._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(Ge){return this._geoJSONIndex.getClusterExpansionZoom(Ge.clusterId)}getClusterChildren(Ge){return this._geoJSONIndex.getChildren(Ge.clusterId)}getClusterLeaves(Ge){return this._geoJSONIndex.getLeaves(Ge.clusterId,Ge.limit,Ge.offset)}}class jr{constructor(Ge){this.self=Ge,this.actor=new i.F(Ge),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(Je,We)=>{if(this.externalWorkerSourceTypes[Je])throw new Error(`Worker source with name "${Je}" already registered.`);this.externalWorkerSourceTypes[Je]=We},this.self.addProtocol=i.bi,this.self.removeProtocol=i.bj,this.self.registerRTLTextPlugin=Je=>{if(i.bD.isParsed())throw new Error("RTL text plugin already registered.");i.bD.setMethods(Je)},this.actor.registerMessageHandler("LDT",(Je,We)=>this._getDEMWorkerSource(Je,We.source).loadTile(We)),this.actor.registerMessageHandler("RDT",(Je,We)=>i._(this,void 0,void 0,function*(){this._getDEMWorkerSource(Je,We.source).removeTile(We)})),this.actor.registerMessageHandler("GCEZ",(Je,We)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Je,We.type,We.source).getClusterExpansionZoom(We)})),this.actor.registerMessageHandler("GCC",(Je,We)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Je,We.type,We.source).getClusterChildren(We)})),this.actor.registerMessageHandler("GCL",(Je,We)=>i._(this,void 0,void 0,function*(){return this._getWorkerSource(Je,We.type,We.source).getClusterLeaves(We)})),this.actor.registerMessageHandler("LD",(Je,We)=>this._getWorkerSource(Je,We.type,We.source).loadData(We)),this.actor.registerMessageHandler("GD",(Je,We)=>this._getWorkerSource(Je,We.type,We.source).getData()),this.actor.registerMessageHandler("LT",(Je,We)=>this._getWorkerSource(Je,We.type,We.source).loadTile(We)),this.actor.registerMessageHandler("RT",(Je,We)=>this._getWorkerSource(Je,We.type,We.source).reloadTile(We)),this.actor.registerMessageHandler("AT",(Je,We)=>this._getWorkerSource(Je,We.type,We.source).abortTile(We)),this.actor.registerMessageHandler("RMT",(Je,We)=>this._getWorkerSource(Je,We.type,We.source).removeTile(We)),this.actor.registerMessageHandler("RS",(Je,We)=>i._(this,void 0,void 0,function*(){if(!this.workerSources[Je]||!this.workerSources[Je][We.type]||!this.workerSources[Je][We.type][We.source])return;let et=this.workerSources[Je][We.type][We.source];delete this.workerSources[Je][We.type][We.source],et.removeSource!==void 0&&et.removeSource(We)})),this.actor.registerMessageHandler("RM",Je=>i._(this,void 0,void 0,function*(){delete this.layerIndexes[Je],delete this.availableImages[Je],delete this.workerSources[Je],delete this.demWorkerSources[Je]})),this.actor.registerMessageHandler("SR",(Je,We)=>i._(this,void 0,void 0,function*(){this.referrer=We})),this.actor.registerMessageHandler("SRPS",(Je,We)=>this._syncRTLPluginState(Je,We)),this.actor.registerMessageHandler("IS",(Je,We)=>i._(this,void 0,void 0,function*(){this.self.importScripts(We)})),this.actor.registerMessageHandler("SI",(Je,We)=>this._setImages(Je,We)),this.actor.registerMessageHandler("UL",(Je,We)=>i._(this,void 0,void 0,function*(){this._getLayerIndex(Je).update(We.layers,We.removedIds)})),this.actor.registerMessageHandler("SL",(Je,We)=>i._(this,void 0,void 0,function*(){this._getLayerIndex(Je).replace(We)}))}_setImages(Ge,Je){return i._(this,void 0,void 0,function*(){this.availableImages[Ge]=Je;for(let We in this.workerSources[Ge]){let et=this.workerSources[Ge][We];for(let xt in et)et[xt].availableImages=Je}})}_syncRTLPluginState(Ge,Je){return i._(this,void 0,void 0,function*(){if(i.bD.isParsed())return i.bD.getState();if(Je.pluginStatus!=="loading")return i.bD.setState(Je),Je;let We=Je.pluginURL;if(this.self.importScripts(We),i.bD.isParsed()){let et={pluginStatus:"loaded",pluginURL:We};return i.bD.setState(et),et}throw i.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${We}`)})}_getAvailableImages(Ge){let Je=this.availableImages[Ge];return Je||(Je=[]),Je}_getLayerIndex(Ge){let Je=this.layerIndexes[Ge];return Je||(Je=this.layerIndexes[Ge]=new a),Je}_getWorkerSource(Ge,Je,We){if(this.workerSources[Ge]||(this.workerSources[Ge]={}),this.workerSources[Ge][Je]||(this.workerSources[Ge][Je]={}),!this.workerSources[Ge][Je][We]){let et={sendAsync:(xt,At)=>(xt.targetMapId=Ge,this.actor.sendAsync(xt,At))};switch(Je){case"vector":this.workerSources[Ge][Je][We]=new u(et,this._getLayerIndex(Ge),this._getAvailableImages(Ge));break;case"geojson":this.workerSources[Ge][Je][We]=new qr(et,this._getLayerIndex(Ge),this._getAvailableImages(Ge));break;default:this.workerSources[Ge][Je][We]=new this.externalWorkerSourceTypes[Je](et,this._getLayerIndex(Ge),this._getAvailableImages(Ge))}}return this.workerSources[Ge][Je][We]}_getDEMWorkerSource(Ge,Je){return this.demWorkerSources[Ge]||(this.demWorkerSources[Ge]={}),this.demWorkerSources[Ge][Je]||(this.demWorkerSources[Ge][Je]=new c),this.demWorkerSources[Ge][Je]}}return i.i(self)&&(self.worker=new jr(self)),jr}),r("index",["exports","./shared"],function(i,a){"use strict";var o="4.7.1";let s,l,u={now:typeof performance!="undefined"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:ue=>new Promise((w,B)=>{let Q=requestAnimationFrame(w);ue.signal.addEventListener("abort",()=>{cancelAnimationFrame(Q),B(a.c())})}),getImageData(ue,w=0){return this.getImageCanvasContext(ue).getImageData(-w,-w,ue.width+2*w,ue.height+2*w)},getImageCanvasContext(ue){let w=window.document.createElement("canvas"),B=w.getContext("2d",{willReadFrequently:!0});if(!B)throw new Error("failed to create canvas 2d context");return w.width=ue.width,w.height=ue.height,B.drawImage(ue,0,0,ue.width,ue.height),B},resolveURL:ue=>(s||(s=document.createElement("a")),s.href=ue,s.href),hardwareConcurrency:typeof navigator!="undefined"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(l==null&&(l=matchMedia("(prefers-reduced-motion: reduce)")),l.matches)}};class c{static testProp(w){if(!c.docStyle)return w[0];for(let B=0;B{window.removeEventListener("click",c.suppressClickInternal,!0)},0)}static getScale(w){let B=w.getBoundingClientRect();return{x:B.width/w.offsetWidth||1,y:B.height/w.offsetHeight||1,boundingClientRect:B}}static getPoint(w,B,Q){let ee=B.boundingClientRect;return new a.P((Q.clientX-ee.left)/B.x-w.clientLeft,(Q.clientY-ee.top)/B.y-w.clientTop)}static mousePos(w,B){let Q=c.getScale(w);return c.getPoint(w,Q,B)}static touchPos(w,B){let Q=[],ee=c.getScale(w);for(let le=0;le{h&&b(h),h=null,m=!0},d.onerror=()=>{v=!0,h=null},d.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(ue){let w,B,Q,ee;ue.resetRequestQueue=()=>{w=[],B=0,Q=0,ee={}},ue.addThrottleControl=ut=>{let Mt=Q++;return ee[Mt]=ut,Mt},ue.removeThrottleControl=ut=>{delete ee[ut],ze()},ue.getImage=(ut,Mt,Jt=!0)=>new Promise(($t,mr)=>{f.supported&&(ut.headers||(ut.headers={}),ut.headers.accept="image/webp,*/*"),a.e(ut,{type:"image"}),w.push({abortController:Mt,requestParameters:ut,supportImageRefresh:Jt,state:"queued",onError:Cr=>{mr(Cr)},onSuccess:Cr=>{$t(Cr)}}),ze()});let le=ut=>a._(this,void 0,void 0,function*(){ut.state="running";let{requestParameters:Mt,supportImageRefresh:Jt,onError:$t,onSuccess:mr,abortController:Cr}=ut,ve=Jt===!1&&!a.i(self)&&!a.g(Mt.url)&&(!Mt.headers||Object.keys(Mt.headers).reduce((qe,Qe)=>qe&&Qe==="accept",!0));B++;let xe=ve?Ze(Mt,Cr):a.m(Mt,Cr);try{let qe=yield xe;delete ut.abortController,ut.state="completed",qe.data instanceof HTMLImageElement||a.b(qe.data)?mr(qe):qe.data&&mr({data:yield(Ie=qe.data,typeof createImageBitmap=="function"?a.d(Ie):a.f(Ie)),cacheControl:qe.cacheControl,expires:qe.expires})}catch(qe){delete ut.abortController,$t(qe)}finally{B--,ze()}var Ie}),ze=()=>{let ut=(()=>{for(let Mt of Object.keys(ee))if(ee[Mt]())return!0;return!1})()?a.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:a.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let Mt=B;Mt0;Mt++){let Jt=w.shift();Jt.abortController.signal.aborted?Mt--:le(Jt)}},Ze=(ut,Mt)=>new Promise((Jt,$t)=>{let mr=new Image,Cr=ut.url,ve=ut.credentials;ve&&ve==="include"?mr.crossOrigin="use-credentials":(ve&&ve==="same-origin"||!a.s(Cr))&&(mr.crossOrigin="anonymous"),Mt.signal.addEventListener("abort",()=>{mr.src="",$t(a.c())}),mr.fetchPriority="high",mr.onload=()=>{mr.onerror=mr.onload=null,Jt({data:mr})},mr.onerror=()=>{mr.onerror=mr.onload=null,Mt.signal.aborted||$t(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},mr.src=Cr})}(p||(p={})),p.resetRequestQueue();class k{constructor(w){this._transformRequestFn=w}transformRequest(w,B){return this._transformRequestFn&&this._transformRequestFn(w,B)||{url:w}}setTransformRequest(w){this._transformRequestFn=w}}function M(ue){var w=new a.A(3);return w[0]=ue[0],w[1]=ue[1],w[2]=ue[2],w}var T,L=function(ue,w,B){return ue[0]=w[0]-B[0],ue[1]=w[1]-B[1],ue[2]=w[2]-B[2],ue};T=new a.A(3),a.A!=Float32Array&&(T[0]=0,T[1]=0,T[2]=0);var x=function(ue){var w=ue[0],B=ue[1];return w*w+B*B};function C(ue){let w=[];if(typeof ue=="string")w.push({id:"default",url:ue});else if(ue&&ue.length>0){let B=[];for(let{id:Q,url:ee}of ue){let le=`${Q}${ee}`;B.indexOf(le)===-1&&(B.push(le),w.push({id:Q,url:ee}))}}return w}function S(ue,w,B){let Q=ue.split("?");return Q[0]+=`${w}${B}`,Q.join("?")}(function(){var ue=new a.A(2);a.A!=Float32Array&&(ue[0]=0,ue[1]=0)})();class g{constructor(w,B,Q,ee){this.context=w,this.format=Q,this.texture=w.gl.createTexture(),this.update(B,ee)}update(w,B,Q){let{width:ee,height:le}=w,ze=!(this.size&&this.size[0]===ee&&this.size[1]===le||Q),{context:Ze}=this,{gl:ut}=Ze;if(this.useMipmap=!!(B&&B.useMipmap),ut.bindTexture(ut.TEXTURE_2D,this.texture),Ze.pixelStoreUnpackFlipY.set(!1),Ze.pixelStoreUnpack.set(1),Ze.pixelStoreUnpackPremultiplyAlpha.set(this.format===ut.RGBA&&(!B||B.premultiply!==!1)),ze)this.size=[ee,le],w instanceof HTMLImageElement||w instanceof HTMLCanvasElement||w instanceof HTMLVideoElement||w instanceof ImageData||a.b(w)?ut.texImage2D(ut.TEXTURE_2D,0,this.format,this.format,ut.UNSIGNED_BYTE,w):ut.texImage2D(ut.TEXTURE_2D,0,this.format,ee,le,0,this.format,ut.UNSIGNED_BYTE,w.data);else{let{x:Mt,y:Jt}=Q||{x:0,y:0};w instanceof HTMLImageElement||w instanceof HTMLCanvasElement||w instanceof HTMLVideoElement||w instanceof ImageData||a.b(w)?ut.texSubImage2D(ut.TEXTURE_2D,0,Mt,Jt,ut.RGBA,ut.UNSIGNED_BYTE,w):ut.texSubImage2D(ut.TEXTURE_2D,0,Mt,Jt,ee,le,ut.RGBA,ut.UNSIGNED_BYTE,w.data)}this.useMipmap&&this.isSizePowerOfTwo()&&ut.generateMipmap(ut.TEXTURE_2D)}bind(w,B,Q){let{context:ee}=this,{gl:le}=ee;le.bindTexture(le.TEXTURE_2D,this.texture),Q!==le.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(Q=le.LINEAR),w!==this.filter&&(le.texParameteri(le.TEXTURE_2D,le.TEXTURE_MAG_FILTER,w),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_MIN_FILTER,Q||w),this.filter=w),B!==this.wrap&&(le.texParameteri(le.TEXTURE_2D,le.TEXTURE_WRAP_S,B),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_WRAP_T,B),this.wrap=B)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){let{gl:w}=this.context;w.deleteTexture(this.texture),this.texture=null}}function P(ue){let{userImage:w}=ue;return!!(w&&w.render&&w.render())&&(ue.data.replace(new Uint8Array(w.data.buffer)),!0)}class E extends a.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new a.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(w){if(this.loaded!==w&&(this.loaded=w,w)){for(let{ids:B,promiseResolve:Q}of this.requestors)Q(this._getImagesForIds(B));this.requestors=[]}}getImage(w){let B=this.images[w];if(B&&!B.data&&B.spriteData){let Q=B.spriteData;B.data=new a.R({width:Q.width,height:Q.height},Q.context.getImageData(Q.x,Q.y,Q.width,Q.height).data),B.spriteData=null}return B}addImage(w,B){if(this.images[w])throw new Error(`Image id ${w} already exist, use updateImage instead`);this._validate(w,B)&&(this.images[w]=B)}_validate(w,B){let Q=!0,ee=B.data||B.spriteData;return this._validateStretch(B.stretchX,ee&&ee.width)||(this.fire(new a.j(new Error(`Image "${w}" has invalid "stretchX" value`))),Q=!1),this._validateStretch(B.stretchY,ee&&ee.height)||(this.fire(new a.j(new Error(`Image "${w}" has invalid "stretchY" value`))),Q=!1),this._validateContent(B.content,B)||(this.fire(new a.j(new Error(`Image "${w}" has invalid "content" value`))),Q=!1),Q}_validateStretch(w,B){if(!w)return!0;let Q=0;for(let ee of w){if(ee[0]{let ee=!0;if(!this.isLoaded())for(let le of w)this.images[le]||(ee=!1);this.isLoaded()||ee?B(this._getImagesForIds(w)):this.requestors.push({ids:w,promiseResolve:B})})}_getImagesForIds(w){let B={};for(let Q of w){let ee=this.getImage(Q);ee||(this.fire(new a.k("styleimagemissing",{id:Q})),ee=this.getImage(Q)),ee?B[Q]={data:ee.data.clone(),pixelRatio:ee.pixelRatio,sdf:ee.sdf,version:ee.version,stretchX:ee.stretchX,stretchY:ee.stretchY,content:ee.content,textFitWidth:ee.textFitWidth,textFitHeight:ee.textFitHeight,hasRenderCallback:!!(ee.userImage&&ee.userImage.render)}:a.w(`Image "${Q}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return B}getPixelSize(){let{width:w,height:B}=this.atlasImage;return{width:w,height:B}}getPattern(w){let B=this.patterns[w],Q=this.getImage(w);if(!Q)return null;if(B&&B.position.version===Q.version)return B.position;if(B)B.position.version=Q.version;else{let ee={w:Q.data.width+2,h:Q.data.height+2,x:0,y:0},le=new a.I(ee,Q);this.patterns[w]={bin:ee,position:le}}return this._updatePatternAtlas(),this.patterns[w].position}bind(w){let B=w.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new g(w,this.atlasImage,B.RGBA),this.atlasTexture.bind(B.LINEAR,B.CLAMP_TO_EDGE)}_updatePatternAtlas(){let w=[];for(let le in this.patterns)w.push(this.patterns[le].bin);let{w:B,h:Q}=a.p(w),ee=this.atlasImage;ee.resize({width:B||1,height:Q||1});for(let le in this.patterns){let{bin:ze}=this.patterns[le],Ze=ze.x+1,ut=ze.y+1,Mt=this.getImage(le).data,Jt=Mt.width,$t=Mt.height;a.R.copy(Mt,ee,{x:0,y:0},{x:Ze,y:ut},{width:Jt,height:$t}),a.R.copy(Mt,ee,{x:0,y:$t-1},{x:Ze,y:ut-1},{width:Jt,height:1}),a.R.copy(Mt,ee,{x:0,y:0},{x:Ze,y:ut+$t},{width:Jt,height:1}),a.R.copy(Mt,ee,{x:Jt-1,y:0},{x:Ze-1,y:ut},{width:1,height:$t}),a.R.copy(Mt,ee,{x:0,y:0},{x:Ze+Jt,y:ut},{width:1,height:$t})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(w){for(let B of w){if(this.callbackDispatchedThisFrame[B])continue;this.callbackDispatchedThisFrame[B]=!0;let Q=this.getImage(B);Q||a.w(`Image with ID: "${B}" was not found`),P(Q)&&this.updateImage(B,Q)}}}let z=1e20;function q(ue,w,B,Q,ee,le,ze,Ze,ut){for(let Mt=w;Mt-1);ut++,le[ut]=Ze,ze[ut]=Mt,ze[ut+1]=z}for(let Ze=0,ut=0;Ze65535)throw new Error("glyphs > 65535 not supported");if(Q.ranges[le])return{stack:w,id:B,glyph:ee};if(!this.url)throw new Error("glyphsUrl is not set");if(!Q.requests[le]){let Ze=G.loadGlyphRange(w,le,this.url,this.requestManager);Q.requests[le]=Ze}let ze=yield Q.requests[le];for(let Ze in ze)this._doesCharSupportLocalGlyph(+Ze)||(Q.glyphs[+Ze]=ze[+Ze]);return Q.ranges[le]=!0,{stack:w,id:B,glyph:ze[B]||null}})}_doesCharSupportLocalGlyph(w){return!!this.localIdeographFontFamily&&new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(w))}_tinySDF(w,B,Q){let ee=this.localIdeographFontFamily;if(!ee||!this._doesCharSupportLocalGlyph(Q))return;let le=w.tinySDF;if(!le){let Ze="400";/bold/i.test(B)?Ze="900":/medium/i.test(B)?Ze="500":/light/i.test(B)&&(Ze="200"),le=w.tinySDF=new G.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:ee,fontWeight:Ze})}let ze=le.draw(String.fromCharCode(Q));return{id:Q,bitmap:new a.o({width:ze.width||60,height:ze.height||60},ze.data),metrics:{width:ze.glyphWidth/2||24,height:ze.glyphHeight/2||24,left:ze.glyphLeft/2+.5||0,top:ze.glyphTop/2-27.5||-8,advance:ze.glyphAdvance/2||24,isDoubleResolution:!0}}}}G.loadGlyphRange=function(ue,w,B,Q){return a._(this,void 0,void 0,function*(){let ee=256*w,le=ee+255,ze=Q.transformRequest(B.replace("{fontstack}",ue).replace("{range}",`${ee}-${le}`),"Glyphs"),Ze=yield a.l(ze,new AbortController);if(!Ze||!Ze.data)throw new Error(`Could not load glyph range. range: ${w}, ${ee}-${le}`);let ut={};for(let Mt of a.n(Ze.data))ut[Mt.id]=Mt;return ut})},G.TinySDF=class{constructor({fontSize:ue=24,buffer:w=3,radius:B=8,cutoff:Q=.25,fontFamily:ee="sans-serif",fontWeight:le="normal",fontStyle:ze="normal"}={}){this.buffer=w,this.cutoff=Q,this.radius=B;let Ze=this.size=ue+4*w,ut=this._createCanvas(Ze),Mt=this.ctx=ut.getContext("2d",{willReadFrequently:!0});Mt.font=`${ze} ${le} ${ue}px ${ee}`,Mt.textBaseline="alphabetic",Mt.textAlign="left",Mt.fillStyle="black",this.gridOuter=new Float64Array(Ze*Ze),this.gridInner=new Float64Array(Ze*Ze),this.f=new Float64Array(Ze),this.z=new Float64Array(Ze+1),this.v=new Uint16Array(Ze)}_createCanvas(ue){let w=document.createElement("canvas");return w.width=w.height=ue,w}draw(ue){let{width:w,actualBoundingBoxAscent:B,actualBoundingBoxDescent:Q,actualBoundingBoxLeft:ee,actualBoundingBoxRight:le}=this.ctx.measureText(ue),ze=Math.ceil(B),Ze=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(le-ee))),ut=Math.min(this.size-this.buffer,ze+Math.ceil(Q)),Mt=Ze+2*this.buffer,Jt=ut+2*this.buffer,$t=Math.max(Mt*Jt,0),mr=new Uint8ClampedArray($t),Cr={data:mr,width:Mt,height:Jt,glyphWidth:Ze,glyphHeight:ut,glyphTop:ze,glyphLeft:0,glyphAdvance:w};if(Ze===0||ut===0)return Cr;let{ctx:ve,buffer:xe,gridInner:Ie,gridOuter:qe}=this;ve.clearRect(xe,xe,Ze,ut),ve.fillText(ue,xe,xe+ze);let Qe=ve.getImageData(xe,xe,Ze,ut);qe.fill(z,0,$t),Ie.fill(0,0,$t);for(let Xe=0;Xe0?ar*ar:0,Ie[jt]=ar<0?ar*ar:0}}q(qe,0,0,Mt,Jt,Mt,this.f,this.v,this.z),q(Ie,xe,xe,Ze,ut,Mt,this.f,this.v,this.z);for(let Xe=0;Xe<$t;Xe++){let nt=Math.sqrt(qe[Xe])-Math.sqrt(Ie[Xe]);mr[Xe]=Math.round(255-255*(nt/this.radius+this.cutoff))}return Cr}};class Z{constructor(){this.specification=a.v.light.position}possiblyEvaluate(w,B){return a.x(w.expression.evaluate(B))}interpolate(w,B,Q){return{x:a.y.number(w.x,B.x,Q),y:a.y.number(w.y,B.y,Q),z:a.y.number(w.z,B.z,Q)}}}let j;class N extends a.E{constructor(w){super(),j=j||new a.q({anchor:new a.D(a.v.light.anchor),position:new Z,color:new a.D(a.v.light.color),intensity:new a.D(a.v.light.intensity)}),this._transitionable=new a.T(j),this.setLight(w),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(w,B={}){if(!this._validate(a.r,w,B))for(let Q in w){let ee=w[Q];Q.endsWith("-transition")?this._transitionable.setTransition(Q.slice(0,-11),ee):this._transitionable.setValue(Q,ee)}}updateTransitions(w){this._transitioning=this._transitionable.transitioned(w,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(w){this.properties=this._transitioning.possiblyEvaluate(w)}_validate(w,B,Q){return(!Q||Q.validate!==!1)&&a.t(this,w.call(a.u,{value:B,style:{glyphs:!0,sprite:!0},styleSpec:a.v}))}}let H=new a.q({"sky-color":new a.D(a.v.sky["sky-color"]),"horizon-color":new a.D(a.v.sky["horizon-color"]),"fog-color":new a.D(a.v.sky["fog-color"]),"fog-ground-blend":new a.D(a.v.sky["fog-ground-blend"]),"horizon-fog-blend":new a.D(a.v.sky["horizon-fog-blend"]),"sky-horizon-blend":new a.D(a.v.sky["sky-horizon-blend"]),"atmosphere-blend":new a.D(a.v.sky["atmosphere-blend"])});class re extends a.E{constructor(w){super(),this._transitionable=new a.T(H),this.setSky(w),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new a.z(0))}setSky(w,B={}){if(!this._validate(a.B,w,B)){w||(w={"sky-color":"transparent","horizon-color":"transparent","fog-color":"transparent","fog-ground-blend":1,"atmosphere-blend":0});for(let Q in w){let ee=w[Q];Q.endsWith("-transition")?this._transitionable.setTransition(Q.slice(0,-11),ee):this._transitionable.setValue(Q,ee)}}}getSky(){return this._transitionable.serialize()}updateTransitions(w){this._transitioning=this._transitionable.transitioned(w,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(w){this.properties=this._transitioning.possiblyEvaluate(w)}_validate(w,B,Q={}){return(Q==null?void 0:Q.validate)!==!1&&a.t(this,w.call(a.u,a.e({value:B,style:{glyphs:!0,sprite:!0},styleSpec:a.v})))}calculateFogBlendOpacity(w){return w<60?0:w<70?(w-60)/10:1}}class oe{constructor(w,B){this.width=w,this.height=B,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(w,B){let Q=w.join(",")+String(B);return this.dashEntry[Q]||(this.dashEntry[Q]=this.addDash(w,B)),this.dashEntry[Q]}getDashRanges(w,B,Q){let ee=[],le=w.length%2==1?-w[w.length-1]*Q:0,ze=w[0]*Q,Ze=!0;ee.push({left:le,right:ze,isDash:Ze,zeroLength:w[0]===0});let ut=w[0];for(let Mt=1;Mt1&&(ut=w[++Ze]);let Jt=Math.abs(Mt-ut.left),$t=Math.abs(Mt-ut.right),mr=Math.min(Jt,$t),Cr,ve=le/Q*(ee+1);if(ut.isDash){let xe=ee-Math.abs(ve);Cr=Math.sqrt(mr*mr+xe*xe)}else Cr=ee-Math.sqrt(mr*mr+ve*ve);this.data[ze+Mt]=Math.max(0,Math.min(255,Cr+128))}}}addRegularDash(w){for(let Ze=w.length-1;Ze>=0;--Ze){let ut=w[Ze],Mt=w[Ze+1];ut.zeroLength?w.splice(Ze,1):Mt&&Mt.isDash===ut.isDash&&(Mt.left=ut.left,w.splice(Ze,1))}let B=w[0],Q=w[w.length-1];B.isDash===Q.isDash&&(B.left=Q.left-this.width,Q.right=B.right+this.width);let ee=this.width*this.nextRow,le=0,ze=w[le];for(let Ze=0;Ze1&&(ze=w[++le]);let ut=Math.abs(Ze-ze.left),Mt=Math.abs(Ze-ze.right),Jt=Math.min(ut,Mt);this.data[ee+Ze]=Math.max(0,Math.min(255,(ze.isDash?Jt:-Jt)+128))}}addDash(w,B){let Q=B?7:0,ee=2*Q+1;if(this.nextRow+ee>this.height)return a.w("LineAtlas out of space"),null;let le=0;for(let Ze=0;Ze{B.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[_e]}numActive(){return Object.keys(this.active).length}}let Ce=Math.floor(u.hardwareConcurrency/2),ge,ie;function Se(){return ge||(ge=new ke),ge}ke.workerCount=a.C(globalThis)?Math.max(Math.min(Ce,3),1):1;class Ee{constructor(w,B){this.workerPool=w,this.actors=[],this.currentActor=0,this.id=B;let Q=this.workerPool.acquire(B);for(let ee=0;ee{B.remove()}),this.actors=[],w&&this.workerPool.release(this.id)}registerMessageHandler(w,B){for(let Q of this.actors)Q.registerMessageHandler(w,B)}}function we(){return ie||(ie=new Ee(Se(),a.G),ie.registerMessageHandler("GR",(ue,w,B)=>a.m(w,B))),ie}function De(ue,w){let B=a.H();return a.J(B,B,[1,1,0]),a.K(B,B,[.5*ue.width,.5*ue.height,1]),a.L(B,B,ue.calculatePosMatrix(w.toUnwrapped()))}function Le(ue,w,B,Q,ee,le){let ze=function($t,mr,Cr){if($t)for(let ve of $t){let xe=mr[ve];if(xe&&xe.source===Cr&&xe.type==="fill-extrusion")return!0}else for(let ve in mr){let xe=mr[ve];if(xe.source===Cr&&xe.type==="fill-extrusion")return!0}return!1}(ee&&ee.layers,w,ue.id),Ze=le.maxPitchScaleFactor(),ut=ue.tilesIn(Q,Ze,ze);ut.sort(me);let Mt=[];for(let $t of ut)Mt.push({wrappedTileID:$t.tileID.wrapped().key,queryResults:$t.tile.queryRenderedFeatures(w,B,ue._state,$t.queryGeometry,$t.cameraQueryGeometry,$t.scale,ee,le,Ze,De(ue.transform,$t.tileID))});let Jt=function($t){let mr={},Cr={};for(let ve of $t){let xe=ve.queryResults,Ie=ve.wrappedTileID,qe=Cr[Ie]=Cr[Ie]||{};for(let Qe in xe){let Xe=xe[Qe],nt=qe[Qe]=qe[Qe]||{},qt=mr[Qe]=mr[Qe]||[];for(let jt of Xe)nt[jt.featureIndex]||(nt[jt.featureIndex]=!0,qt.push(jt))}}return mr}(Mt);for(let $t in Jt)Jt[$t].forEach(mr=>{let Cr=mr.feature,ve=ue.getFeatureState(Cr.layer["source-layer"],Cr.id);Cr.source=Cr.layer.source,Cr.layer["source-layer"]&&(Cr.sourceLayer=Cr.layer["source-layer"]),Cr.state=ve});return Jt}function me(ue,w){let B=ue.tileID,Q=w.tileID;return B.overscaledZ-Q.overscaledZ||B.canonical.y-Q.canonical.y||B.wrap-Q.wrap||B.canonical.x-Q.canonical.x}function Pe(ue,w,B){return a._(this,void 0,void 0,function*(){let Q=ue;if(ue.url?Q=(yield a.h(w.transformRequest(ue.url,"Source"),B)).data:yield u.frameAsync(B),!Q)return null;let ee=a.M(a.e(Q,ue),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in Q&&Q.vector_layers&&(ee.vectorLayerIds=Q.vector_layers.map(le=>le.id)),ee})}class ce{constructor(w,B){w&&(B?this.setSouthWest(w).setNorthEast(B):Array.isArray(w)&&(w.length===4?this.setSouthWest([w[0],w[1]]).setNorthEast([w[2],w[3]]):this.setSouthWest(w[0]).setNorthEast(w[1])))}setNorthEast(w){return this._ne=w instanceof a.N?new a.N(w.lng,w.lat):a.N.convert(w),this}setSouthWest(w){return this._sw=w instanceof a.N?new a.N(w.lng,w.lat):a.N.convert(w),this}extend(w){let B=this._sw,Q=this._ne,ee,le;if(w instanceof a.N)ee=w,le=w;else{if(!(w instanceof ce))return Array.isArray(w)?w.length===4||w.every(Array.isArray)?this.extend(ce.convert(w)):this.extend(a.N.convert(w)):w&&("lng"in w||"lon"in w)&&"lat"in w?this.extend(a.N.convert(w)):this;if(ee=w._sw,le=w._ne,!ee||!le)return this}return B||Q?(B.lng=Math.min(ee.lng,B.lng),B.lat=Math.min(ee.lat,B.lat),Q.lng=Math.max(le.lng,Q.lng),Q.lat=Math.max(le.lat,Q.lat)):(this._sw=new a.N(ee.lng,ee.lat),this._ne=new a.N(le.lng,le.lat)),this}getCenter(){return new a.N((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new a.N(this.getWest(),this.getNorth())}getSouthEast(){return new a.N(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(w){let{lng:B,lat:Q}=a.N.convert(w),ee=this._sw.lng<=B&&B<=this._ne.lng;return this._sw.lng>this._ne.lng&&(ee=this._sw.lng>=B&&B>=this._ne.lng),this._sw.lat<=Q&&Q<=this._ne.lat&&ee}static convert(w){return w instanceof ce?w:w&&new ce(w)}static fromLngLat(w,B=0){let Q=360*B/40075017,ee=Q/Math.cos(Math.PI/180*w.lat);return new ce(new a.N(w.lng-ee,w.lat-Q),new a.N(w.lng+ee,w.lat+Q))}adjustAntiMeridian(){let w=new a.N(this._sw.lng,this._sw.lat),B=new a.N(this._ne.lng,this._ne.lat);return new ce(w,w.lng>B.lng?new a.N(B.lng+360,B.lat):B)}}class He{constructor(w,B,Q){this.bounds=ce.convert(this.validateBounds(w)),this.minzoom=B||0,this.maxzoom=Q||24}validateBounds(w){return Array.isArray(w)&&w.length===4?[Math.max(-180,w[0]),Math.max(-90,w[1]),Math.min(180,w[2]),Math.min(90,w[3])]:[-180,-90,180,90]}contains(w){let B=Math.pow(2,w.z),Q=Math.floor(a.O(this.bounds.getWest())*B),ee=Math.floor(a.Q(this.bounds.getNorth())*B),le=Math.ceil(a.O(this.bounds.getEast())*B),ze=Math.ceil(a.Q(this.bounds.getSouth())*B);return w.x>=Q&&w.x=ee&&w.y{this._options.tiles=w}),this}setUrl(w){return this.setSourceProperty(()=>{this.url=w,this._options.url=w}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return a.e({},this._options)}loadTile(w){return a._(this,void 0,void 0,function*(){let B=w.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Q={request:this.map._requestManager.transformRequest(B,"Tile"),uid:w.uid,tileID:w.tileID,zoom:w.tileID.overscaledZ,tileSize:this.tileSize*w.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};Q.request.collectResourceTiming=this._collectResourceTiming;let ee="RT";if(w.actor&&w.state!=="expired"){if(w.state==="loading")return new Promise((le,ze)=>{w.reloadPromise={resolve:le,reject:ze}})}else w.actor=this.dispatcher.getActor(),ee="LT";w.abortController=new AbortController;try{let le=yield w.actor.sendAsync({type:ee,data:Q},w.abortController);if(delete w.abortController,w.aborted)return;this._afterTileLoadWorkerResponse(w,le)}catch(le){if(delete w.abortController,w.aborted)return;if(le&&le.status!==404)throw le;this._afterTileLoadWorkerResponse(w,null)}})}_afterTileLoadWorkerResponse(w,B){if(B&&B.resourceTiming&&(w.resourceTiming=B.resourceTiming),B&&this.map._refreshExpiredTiles&&w.setExpiryData(B),w.loadVectorData(B,this.map.painter),w.reloadPromise){let Q=w.reloadPromise;w.reloadPromise=null,this.loadTile(w).then(Q.resolve).catch(Q.reject)}}abortTile(w){return a._(this,void 0,void 0,function*(){w.abortController&&(w.abortController.abort(),delete w.abortController),w.actor&&(yield w.actor.sendAsync({type:"AT",data:{uid:w.uid,type:this.type,source:this.id}}))})}unloadTile(w){return a._(this,void 0,void 0,function*(){w.unloadVectorData(),w.actor&&(yield w.actor.sendAsync({type:"RMT",data:{uid:w.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class mt extends a.E{constructor(w,B,Q,ee){super(),this.id=w,this.dispatcher=Q,this.setEventedParent(ee),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=a.e({type:"raster"},B),a.e(this,a.M(B,["url","scheme","tileSize"]))}load(){return a._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new a.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let w=yield Pe(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,w&&(a.e(this,w),w.bounds&&(this.tileBounds=new He(w.bounds,this.minzoom,this.maxzoom)),this.fire(new a.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new a.k("data",{dataType:"source",sourceDataType:"content"})))}catch(w){this._tileJSONRequest=null,this.fire(new a.j(w))}})}loaded(){return this._loaded}onAdd(w){this.map=w,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(w){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),w(),this.load()}setTiles(w){return this.setSourceProperty(()=>{this._options.tiles=w}),this}setUrl(w){return this.setSourceProperty(()=>{this.url=w,this._options.url=w}),this}serialize(){return a.e({},this._options)}hasTile(w){return!this.tileBounds||this.tileBounds.contains(w.canonical)}loadTile(w){return a._(this,void 0,void 0,function*(){let B=w.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);w.abortController=new AbortController;try{let Q=yield p.getImage(this.map._requestManager.transformRequest(B,"Tile"),w.abortController,this.map._refreshExpiredTiles);if(delete w.abortController,w.aborted)return void(w.state="unloaded");if(Q&&Q.data){this.map._refreshExpiredTiles&&Q.cacheControl&&Q.expires&&w.setExpiryData({cacheControl:Q.cacheControl,expires:Q.expires});let ee=this.map.painter.context,le=ee.gl,ze=Q.data;w.texture=this.map.painter.getTileTexture(ze.width),w.texture?w.texture.update(ze,{useMipmap:!0}):(w.texture=new g(ee,ze,le.RGBA,{useMipmap:!0}),w.texture.bind(le.LINEAR,le.CLAMP_TO_EDGE,le.LINEAR_MIPMAP_NEAREST)),w.state="loaded"}}catch(Q){if(delete w.abortController,w.aborted)w.state="unloaded";else if(Q)throw w.state="errored",Q}})}abortTile(w){return a._(this,void 0,void 0,function*(){w.abortController&&(w.abortController.abort(),delete w.abortController)})}unloadTile(w){return a._(this,void 0,void 0,function*(){w.texture&&this.map.painter.saveTileTexture(w.texture)})}hasTransition(){return!1}}class Vt extends mt{constructor(w,B,Q,ee){super(w,B,Q,ee),this.type="raster-dem",this.maxzoom=22,this._options=a.e({type:"raster-dem"},B),this.encoding=B.encoding||"mapbox",this.redFactor=B.redFactor,this.greenFactor=B.greenFactor,this.blueFactor=B.blueFactor,this.baseShift=B.baseShift}loadTile(w){return a._(this,void 0,void 0,function*(){let B=w.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Q=this.map._requestManager.transformRequest(B,"Tile");w.neighboringTiles=this._getNeighboringTiles(w.tileID),w.abortController=new AbortController;try{let ee=yield p.getImage(Q,w.abortController,this.map._refreshExpiredTiles);if(delete w.abortController,w.aborted)return void(w.state="unloaded");if(ee&&ee.data){let le=ee.data;this.map._refreshExpiredTiles&&ee.cacheControl&&ee.expires&&w.setExpiryData({cacheControl:ee.cacheControl,expires:ee.expires});let ze=a.b(le)&&a.U()?le:yield this.readImageNow(le),Ze={type:this.type,uid:w.uid,source:this.id,rawImageData:ze,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!w.actor||w.state==="expired"){w.actor=this.dispatcher.getActor();let ut=yield w.actor.sendAsync({type:"LDT",data:Ze});w.dem=ut,w.needsHillshadePrepare=!0,w.needsTerrainPrepare=!0,w.state="loaded"}}}catch(ee){if(delete w.abortController,w.aborted)w.state="unloaded";else if(ee)throw w.state="errored",ee}})}readImageNow(w){return a._(this,void 0,void 0,function*(){if(typeof VideoFrame!="undefined"&&a.V()){let B=w.width+2,Q=w.height+2;try{return new a.R({width:B,height:Q},yield a.W(w,-1,-1,B,Q))}catch(ee){}}return u.getImageData(w,1)})}_getNeighboringTiles(w){let B=w.canonical,Q=Math.pow(2,B.z),ee=(B.x-1+Q)%Q,le=B.x===0?w.wrap-1:w.wrap,ze=(B.x+1+Q)%Q,Ze=B.x+1===Q?w.wrap+1:w.wrap,ut={};return ut[new a.S(w.overscaledZ,le,B.z,ee,B.y).key]={backfilled:!1},ut[new a.S(w.overscaledZ,Ze,B.z,ze,B.y).key]={backfilled:!1},B.y>0&&(ut[new a.S(w.overscaledZ,le,B.z,ee,B.y-1).key]={backfilled:!1},ut[new a.S(w.overscaledZ,w.wrap,B.z,B.x,B.y-1).key]={backfilled:!1},ut[new a.S(w.overscaledZ,Ze,B.z,ze,B.y-1).key]={backfilled:!1}),B.y+10&&a.e(le,{resourceTiming:ee}),this.fire(new a.k("data",Object.assign(Object.assign({},le),{sourceDataType:"metadata"}))),this.fire(new a.k("data",Object.assign(Object.assign({},le),{sourceDataType:"content"})))}catch(Q){if(this._pendingLoads--,this._removed)return void this.fire(new a.k("dataabort",{dataType:"source"}));this.fire(new a.j(Q))}})}loaded(){return this._pendingLoads===0}loadTile(w){return a._(this,void 0,void 0,function*(){let B=w.actor?"RT":"LT";w.actor=this.actor;let Q={type:this.type,uid:w.uid,tileID:w.tileID,zoom:w.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};w.abortController=new AbortController;let ee=yield this.actor.sendAsync({type:B,data:Q},w.abortController);delete w.abortController,w.unloadVectorData(),w.aborted||w.loadVectorData(ee,this.map.painter,B==="RT")})}abortTile(w){return a._(this,void 0,void 0,function*(){w.abortController&&(w.abortController.abort(),delete w.abortController),w.aborted=!0})}unloadTile(w){return a._(this,void 0,void 0,function*(){w.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:w.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return a.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var ct=a.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Qt extends a.E{constructor(w,B,Q,ee){super(),this.id=w,this.dispatcher=Q,this.coordinates=B.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(ee),this.options=B}load(w){return a._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new a.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let B=yield p.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,B&&B.data&&(this.image=B.data,w&&(this.coordinates=w),this._finishLoading())}catch(B){this._request=null,this._loaded=!0,this.fire(new a.j(B))}})}loaded(){return this._loaded}updateImage(w){return w.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=w.url,this.load(w.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new a.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(w){this.map=w,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(w){this.coordinates=w;let B=w.map(a.Z.fromLngLat);this.tileID=function(ee){let le=1/0,ze=1/0,Ze=-1/0,ut=-1/0;for(let mr of ee)le=Math.min(le,mr.x),ze=Math.min(ze,mr.y),Ze=Math.max(Ze,mr.x),ut=Math.max(ut,mr.y);let Mt=Math.max(Ze-le,ut-ze),Jt=Math.max(0,Math.floor(-Math.log(Mt)/Math.LN2)),$t=Math.pow(2,Jt);return new a.a1(Jt,Math.floor((le+Ze)/2*$t),Math.floor((ze+ut)/2*$t))}(B),this.minzoom=this.maxzoom=this.tileID.z;let Q=B.map(ee=>this.tileID.getTilePoint(ee)._round());return this._boundsArray=new a.$,this._boundsArray.emplaceBack(Q[0].x,Q[0].y,0,0),this._boundsArray.emplaceBack(Q[1].x,Q[1].y,a.X,0),this._boundsArray.emplaceBack(Q[3].x,Q[3].y,0,a.X),this._boundsArray.emplaceBack(Q[2].x,Q[2].y,a.X,a.X),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new a.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let w=this.map.painter.context,B=w.gl;this.boundsBuffer||(this.boundsBuffer=w.createVertexBuffer(this._boundsArray,ct.members)),this.boundsSegments||(this.boundsSegments=a.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new g(w,this.image,B.RGBA),this.texture.bind(B.LINEAR,B.CLAMP_TO_EDGE));let Q=!1;for(let ee in this.tiles){let le=this.tiles[ee];le.state!=="loaded"&&(le.state="loaded",le.texture=this.texture,Q=!0)}Q&&this.fire(new a.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(w){return a._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(w.tileID.canonical)?(this.tiles[String(w.tileID.wrap)]=w,w.buckets={}):w.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class Ht extends Qt{constructor(w,B,Q,ee){super(w,B,Q,ee),this.roundZoom=!0,this.type="video",this.options=B}load(){return a._(this,void 0,void 0,function*(){this._loaded=!1;let w=this.options;this.urls=[];for(let B of w.urls)this.urls.push(this.map._requestManager.transformRequest(B,"Source").url);try{let B=yield a.a3(this.urls);if(this._loaded=!0,!B)return;this.video=B,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(B){this.fire(new a.j(B))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(w){if(this.video){let B=this.video.seekable;wB.end(0)?this.fire(new a.j(new a.a2(`sources.${this.id}`,null,`Playback for this video can be set only between the ${B.start(0)} and ${B.end(0)}-second mark.`))):this.video.currentTime=w}}getVideo(){return this.video}onAdd(w){this.map||(this.map=w,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let w=this.map.painter.context,B=w.gl;this.boundsBuffer||(this.boundsBuffer=w.createVertexBuffer(this._boundsArray,ct.members)),this.boundsSegments||(this.boundsSegments=a.a0.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(B.LINEAR,B.CLAMP_TO_EDGE),B.texSubImage2D(B.TEXTURE_2D,0,0,0,B.RGBA,B.UNSIGNED_BYTE,this.video)):(this.texture=new g(w,this.video,B.RGBA),this.texture.bind(B.LINEAR,B.CLAMP_TO_EDGE));let Q=!1;for(let ee in this.tiles){let le=this.tiles[ee];le.state!=="loaded"&&(le.state="loaded",le.texture=this.texture,Q=!0)}Q&&this.fire(new a.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class nr extends Qt{constructor(w,B,Q,ee){super(w,B,Q,ee),B.coordinates?Array.isArray(B.coordinates)&&B.coordinates.length===4&&!B.coordinates.some(le=>!Array.isArray(le)||le.length!==2||le.some(ze=>typeof ze!="number"))||this.fire(new a.j(new a.a2(`sources.${w}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new a.j(new a.a2(`sources.${w}`,null,'missing required property "coordinates"'))),B.animate&&typeof B.animate!="boolean"&&this.fire(new a.j(new a.a2(`sources.${w}`,null,'optional "animate" property must be a boolean value'))),B.canvas?typeof B.canvas=="string"||B.canvas instanceof HTMLCanvasElement||this.fire(new a.j(new a.a2(`sources.${w}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new a.j(new a.a2(`sources.${w}`,null,'missing required property "canvas"'))),this.options=B,this.animate=B.animate===void 0||B.animate}load(){return a._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new a.j(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())})}getCanvas(){return this.canvas}onAdd(w){this.map=w,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let w=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,w=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,w=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let B=this.map.painter.context,Q=B.gl;this.boundsBuffer||(this.boundsBuffer=B.createVertexBuffer(this._boundsArray,ct.members)),this.boundsSegments||(this.boundsSegments=a.a0.simpleSegment(0,0,4,2)),this.texture?(w||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new g(B,this.canvas,Q.RGBA,{premultiply:!0});let ee=!1;for(let le in this.tiles){let ze=this.tiles[le];ze.state!=="loaded"&&(ze.state="loaded",ze.texture=this.texture,ee=!0)}ee&&this.fire(new a.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let w of[this.canvas.width,this.canvas.height])if(isNaN(w)||w<=0)return!0;return!1}}let tt={},je=ue=>{switch(ue){case"geojson":return st;case"image":return Qt;case"raster":return mt;case"raster-dem":return Vt;case"vector":return lt;case"video":return Ht;case"canvas":return nr}return tt[ue]},Ue="RTLPluginLoaded";class Ae extends a.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=we()}_syncState(w){return this.status=w,this.dispatcher.broadcast("SRPS",{pluginStatus:w,pluginURL:this.url}).catch(B=>{throw this.status="error",B})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(w){return a._(this,arguments,void 0,function*(B,Q=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=u.resolveURL(B),!this.url)throw new Error(`requested url ${B} is invalid`);if(this.status==="unavailable"){if(!Q)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return a._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new a.k(Ue))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let rt=null;function St(){return rt||(rt=new Ae),rt}class Tt{constructor(w,B){this.timeAdded=0,this.fadeEndTime=0,this.tileID=w,this.uid=a.a4(),this.uses=0,this.tileSize=B,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(w){let B=w+this.timeAdded;Ble.getLayer(Mt)).filter(Boolean);if(ut.length!==0){Ze.layers=ut,Ze.stateDependentLayerIds&&(Ze.stateDependentLayers=Ze.stateDependentLayerIds.map(Mt=>ut.filter(Jt=>Jt.id===Mt)[0]));for(let Mt of ut)ze[Mt.id]=Ze}}return ze}(w.buckets,B.style),this.hasSymbolBuckets=!1;for(let ee in this.buckets){let le=this.buckets[ee];if(le instanceof a.a6){if(this.hasSymbolBuckets=!0,!Q)break;le.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let ee in this.buckets){let le=this.buckets[ee];if(le instanceof a.a6&&le.hasRTLText){this.hasRTLText=!0,St().lazyLoad();break}}this.queryPadding=0;for(let ee in this.buckets){let le=this.buckets[ee];this.queryPadding=Math.max(this.queryPadding,B.style.getLayer(ee).queryRadius(le))}w.imageAtlas&&(this.imageAtlas=w.imageAtlas),w.glyphAtlasImage&&(this.glyphAtlasImage=w.glyphAtlasImage)}else this.collisionBoxArray=new a.a5}unloadVectorData(){for(let w in this.buckets)this.buckets[w].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(w){return this.buckets[w.id]}upload(w){for(let Q in this.buckets){let ee=this.buckets[Q];ee.uploadPending()&&ee.upload(w)}let B=w.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new g(w,this.imageAtlas.image,B.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new g(w,this.glyphAtlasImage,B.ALPHA),this.glyphAtlasImage=null)}prepare(w){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(w,this.imageAtlasTexture)}queryRenderedFeatures(w,B,Q,ee,le,ze,Ze,ut,Mt,Jt){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:ee,cameraQueryGeometry:le,scale:ze,tileSize:this.tileSize,pixelPosMatrix:Jt,transform:ut,params:Ze,queryPadding:this.queryPadding*Mt},w,B,Q):{}}querySourceFeatures(w,B){let Q=this.latestFeatureIndex;if(!Q||!Q.rawTileData)return;let ee=Q.loadVTLayers(),le=B&&B.sourceLayer?B.sourceLayer:"",ze=ee._geojsonTileLayer||ee[le];if(!ze)return;let Ze=a.a7(B&&B.filter),{z:ut,x:Mt,y:Jt}=this.tileID.canonical,$t={z:ut,x:Mt,y:Jt};for(let mr=0;mrQ)ee=!1;else if(B)if(this.expirationTime{this.remove(w,le)},Q)),this.data[ee].push(le),this.order.push(ee),this.order.length>this.max){let ze=this._getAndRemoveByKey(this.order[0]);ze&&this.onRemove(ze)}return this}has(w){return w.wrapped().key in this.data}getAndRemove(w){return this.has(w)?this._getAndRemoveByKey(w.wrapped().key):null}_getAndRemoveByKey(w){let B=this.data[w].shift();return B.timeout&&clearTimeout(B.timeout),this.data[w].length===0&&delete this.data[w],this.order.splice(this.order.indexOf(w),1),B.value}getByKey(w){let B=this.data[w];return B?B[0].value:null}get(w){return this.has(w)?this.data[w.wrapped().key][0].value:null}remove(w,B){if(!this.has(w))return this;let Q=w.wrapped().key,ee=B===void 0?0:this.data[Q].indexOf(B),le=this.data[Q][ee];return this.data[Q].splice(ee,1),le.timeout&&clearTimeout(le.timeout),this.data[Q].length===0&&delete this.data[Q],this.onRemove(le.value),this.order.splice(this.order.indexOf(Q),1),this}setMaxSize(w){for(this.max=w;this.order.length>this.max;){let B=this._getAndRemoveByKey(this.order[0]);B&&this.onRemove(B)}return this}filter(w){let B=[];for(let Q in this.data)for(let ee of this.data[Q])w(ee.value)||B.push(ee);for(let Q of B)this.remove(Q.value.tileID,Q)}}class Et{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(w,B,Q){let ee=String(B);if(this.stateChanges[w]=this.stateChanges[w]||{},this.stateChanges[w][ee]=this.stateChanges[w][ee]||{},a.e(this.stateChanges[w][ee],Q),this.deletedStates[w]===null){this.deletedStates[w]={};for(let le in this.state[w])le!==ee&&(this.deletedStates[w][le]=null)}else if(this.deletedStates[w]&&this.deletedStates[w][ee]===null){this.deletedStates[w][ee]={};for(let le in this.state[w][ee])Q[le]||(this.deletedStates[w][ee][le]=null)}else for(let le in Q)this.deletedStates[w]&&this.deletedStates[w][ee]&&this.deletedStates[w][ee][le]===null&&delete this.deletedStates[w][ee][le]}removeFeatureState(w,B,Q){if(this.deletedStates[w]===null)return;let ee=String(B);if(this.deletedStates[w]=this.deletedStates[w]||{},Q&&B!==void 0)this.deletedStates[w][ee]!==null&&(this.deletedStates[w][ee]=this.deletedStates[w][ee]||{},this.deletedStates[w][ee][Q]=null);else if(B!==void 0)if(this.stateChanges[w]&&this.stateChanges[w][ee])for(Q in this.deletedStates[w][ee]={},this.stateChanges[w][ee])this.deletedStates[w][ee][Q]=null;else this.deletedStates[w][ee]=null;else this.deletedStates[w]=null}getState(w,B){let Q=String(B),ee=a.e({},(this.state[w]||{})[Q],(this.stateChanges[w]||{})[Q]);if(this.deletedStates[w]===null)return{};if(this.deletedStates[w]){let le=this.deletedStates[w][B];if(le===null)return{};for(let ze in le)delete ee[ze]}return ee}initializeTileState(w,B){w.setFeatureState(this.state,B)}coalesceChanges(w,B){let Q={};for(let ee in this.stateChanges){this.state[ee]=this.state[ee]||{};let le={};for(let ze in this.stateChanges[ee])this.state[ee][ze]||(this.state[ee][ze]={}),a.e(this.state[ee][ze],this.stateChanges[ee][ze]),le[ze]=this.state[ee][ze];Q[ee]=le}for(let ee in this.deletedStates){this.state[ee]=this.state[ee]||{};let le={};if(this.deletedStates[ee]===null)for(let ze in this.state[ee])le[ze]={},this.state[ee][ze]={};else for(let ze in this.deletedStates[ee]){if(this.deletedStates[ee][ze]===null)this.state[ee][ze]={};else for(let Ze of Object.keys(this.deletedStates[ee][ze]))delete this.state[ee][ze][Ze];le[ze]=this.state[ee][ze]}Q[ee]=Q[ee]||{},a.e(Q[ee],le)}if(this.stateChanges={},this.deletedStates={},Object.keys(Q).length!==0)for(let ee in w)w[ee].setFeatureState(Q,B)}}class pt extends a.E{constructor(w,B,Q){super(),this.id=w,this.dispatcher=Q,this.on("data",ee=>this._dataHandler(ee)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((ee,le,ze,Ze)=>{let ut=new(je(le.type))(ee,le,ze,Ze);if(ut.id!==ee)throw new Error(`Expected Source id to be ${ee} instead of ${ut.id}`);return ut})(w,B,Q,this),this._tiles={},this._cache=new dt(0,ee=>this._unloadTile(ee)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new Et,this._didEmitContent=!1,this._updated=!1}onAdd(w){this.map=w,this._maxTileCacheSize=w?w._maxTileCacheSize:null,this._maxTileCacheZoomLevels=w?w._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(w)}onRemove(w){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(w)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let w in this._tiles){let B=this._tiles[w];if(B.state!=="loaded"&&B.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;let w=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,w&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(w,B,Q){return a._(this,void 0,void 0,function*(){try{yield this._source.loadTile(w),this._tileLoaded(w,B,Q)}catch(ee){w.state="errored",ee.status!==404?this._source.fire(new a.j(ee,{tile:w})):this.update(this.transform,this.terrain)}})}_unloadTile(w){this._source.unloadTile&&this._source.unloadTile(w)}_abortTile(w){this._source.abortTile&&this._source.abortTile(w),this._source.fire(new a.k("dataabort",{tile:w,coord:w.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(w){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(let B in this._tiles){let Q=this._tiles[B];Q.upload(w),Q.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(w=>w.tileID).sort(Xt).map(w=>w.key)}getRenderableIds(w){let B=[];for(let Q in this._tiles)this._isIdRenderable(Q,w)&&B.push(this._tiles[Q]);return w?B.sort((Q,ee)=>{let le=Q.tileID,ze=ee.tileID,Ze=new a.P(le.canonical.x,le.canonical.y)._rotate(this.transform.angle),ut=new a.P(ze.canonical.x,ze.canonical.y)._rotate(this.transform.angle);return le.overscaledZ-ze.overscaledZ||ut.y-Ze.y||ut.x-Ze.x}).map(Q=>Q.tileID.key):B.map(Q=>Q.tileID).sort(Xt).map(Q=>Q.key)}hasRenderableParent(w){let B=this.findLoadedParent(w,0);return!!B&&this._isIdRenderable(B.tileID.key)}_isIdRenderable(w,B){return this._tiles[w]&&this._tiles[w].hasData()&&!this._coveredTiles[w]&&(B||!this._tiles[w].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(let w in this._tiles)this._tiles[w].state!=="errored"&&this._reloadTile(w,"reloading")}}_reloadTile(w,B){return a._(this,void 0,void 0,function*(){let Q=this._tiles[w];Q&&(Q.state!=="loading"&&(Q.state=B),yield this._loadTile(Q,w,B))})}_tileLoaded(w,B,Q){w.timeAdded=u.now(),Q==="expired"&&(w.refreshedUponExpiration=!0),this._setTileReloadTimer(B,w),this.getSource().type==="raster-dem"&&w.dem&&this._backfillDEM(w),this._state.initializeTileState(w,this.map?this.map.painter:null),w.aborted||this._source.fire(new a.k("data",{dataType:"source",tile:w,coord:w.tileID}))}_backfillDEM(w){let B=this.getRenderableIds();for(let ee=0;ee1||(Math.abs(ze)>1&&(Math.abs(ze+ut)===1?ze+=ut:Math.abs(ze-ut)===1&&(ze-=ut)),le.dem&&ee.dem&&(ee.dem.backfillBorder(le.dem,ze,Ze),ee.neighboringTiles&&ee.neighboringTiles[Mt]&&(ee.neighboringTiles[Mt].backfilled=!0)))}}getTile(w){return this.getTileByID(w.key)}getTileByID(w){return this._tiles[w]}_retainLoadedChildren(w,B,Q,ee){for(let le in this._tiles){let ze=this._tiles[le];if(ee[le]||!ze.hasData()||ze.tileID.overscaledZ<=B||ze.tileID.overscaledZ>Q)continue;let Ze=ze.tileID;for(;ze&&ze.tileID.overscaledZ>B+1;){let Mt=ze.tileID.scaledTo(ze.tileID.overscaledZ-1);ze=this._tiles[Mt.key],ze&&ze.hasData()&&(Ze=Mt)}let ut=Ze;for(;ut.overscaledZ>B;)if(ut=ut.scaledTo(ut.overscaledZ-1),w[ut.key]){ee[Ze.key]=Ze;break}}}findLoadedParent(w,B){if(w.key in this._loadedParentTiles){let Q=this._loadedParentTiles[w.key];return Q&&Q.tileID.overscaledZ>=B?Q:null}for(let Q=w.overscaledZ-1;Q>=B;Q--){let ee=w.scaledTo(Q),le=this._getLoadedTile(ee);if(le)return le}}findLoadedSibling(w){return this._getLoadedTile(w)}_getLoadedTile(w){let B=this._tiles[w.key];return B&&B.hasData()?B:this._cache.getByKey(w.wrapped().key)}updateCacheSize(w){let B=Math.ceil(w.width/this._source.tileSize)+1,Q=Math.ceil(w.height/this._source.tileSize)+1,ee=Math.floor(B*Q*(this._maxTileCacheZoomLevels===null?a.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),le=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,ee):ee;this._cache.setMaxSize(le)}handleWrapJump(w){let B=Math.round((w-(this._prevLng===void 0?w:this._prevLng))/360);if(this._prevLng=w,B){let Q={};for(let ee in this._tiles){let le=this._tiles[ee];le.tileID=le.tileID.unwrapTo(le.tileID.wrap+B),Q[le.tileID.key]=le}this._tiles=Q;for(let ee in this._timers)clearTimeout(this._timers[ee]),delete this._timers[ee];for(let ee in this._tiles)this._setTileReloadTimer(ee,this._tiles[ee])}}_updateCoveredAndRetainedTiles(w,B,Q,ee,le,ze){let Ze={},ut={},Mt=Object.keys(w),Jt=u.now();for(let $t of Mt){let mr=w[$t],Cr=this._tiles[$t];if(!Cr||Cr.fadeEndTime!==0&&Cr.fadeEndTime<=Jt)continue;let ve=this.findLoadedParent(mr,B),xe=this.findLoadedSibling(mr),Ie=ve||xe||null;Ie&&(this._addTile(Ie.tileID),Ze[Ie.tileID.key]=Ie.tileID),ut[$t]=mr}this._retainLoadedChildren(ut,ee,Q,w);for(let $t in Ze)w[$t]||(this._coveredTiles[$t]=!0,w[$t]=Ze[$t]);if(ze){let $t={},mr={};for(let Cr of le)this._tiles[Cr.key].hasData()?$t[Cr.key]=Cr:mr[Cr.key]=Cr;for(let Cr in mr){let ve=mr[Cr].children(this._source.maxzoom);this._tiles[ve[0].key]&&this._tiles[ve[1].key]&&this._tiles[ve[2].key]&&this._tiles[ve[3].key]&&($t[ve[0].key]=w[ve[0].key]=ve[0],$t[ve[1].key]=w[ve[1].key]=ve[1],$t[ve[2].key]=w[ve[2].key]=ve[2],$t[ve[3].key]=w[ve[3].key]=ve[3],delete mr[Cr])}for(let Cr in mr){let ve=mr[Cr],xe=this.findLoadedParent(ve,this._source.minzoom),Ie=this.findLoadedSibling(ve),qe=xe||Ie||null;if(qe){$t[qe.tileID.key]=w[qe.tileID.key]=qe.tileID;for(let Qe in $t)$t[Qe].isChildOf(qe.tileID)&&delete $t[Qe]}}for(let Cr in this._tiles)$t[Cr]||(this._coveredTiles[Cr]=!0)}}update(w,B){if(!this._sourceLoaded||this._paused)return;let Q;this.transform=w,this.terrain=B,this.updateCacheSize(w),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?Q=w.getVisibleUnwrappedCoordinates(this._source.tileID).map(Jt=>new a.S(Jt.canonical.z,Jt.wrap,Jt.canonical.z,Jt.canonical.x,Jt.canonical.y)):(Q=w.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:B}),this._source.hasTile&&(Q=Q.filter(Jt=>this._source.hasTile(Jt)))):Q=[];let ee=w.coveringZoomLevel(this._source),le=Math.max(ee-pt.maxOverzooming,this._source.minzoom),ze=Math.max(ee+pt.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){let Jt={};for(let $t of Q)if($t.canonical.z>this._source.minzoom){let mr=$t.scaledTo($t.canonical.z-1);Jt[mr.key]=mr;let Cr=$t.scaledTo(Math.max(this._source.minzoom,Math.min($t.canonical.z,5)));Jt[Cr.key]=Cr}Q=Q.concat(Object.values(Jt))}let Ze=Q.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,Ze&&this.fire(new a.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let ut=this._updateRetainedTiles(Q,ee);or(this._source.type)&&this._updateCoveredAndRetainedTiles(ut,le,ze,ee,Q,B);for(let Jt in ut)this._tiles[Jt].clearFadeHold();let Mt=a.ab(this._tiles,ut);for(let Jt of Mt){let $t=this._tiles[Jt];$t.hasSymbolBuckets&&!$t.holdingForFade()?$t.setHoldDuration(this.map._fadeDuration):$t.hasSymbolBuckets&&!$t.symbolFadeFinished()||this._removeTile(Jt)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(let w in this._tiles)this._tiles[w].holdingForFade()&&this._removeTile(w)}_updateRetainedTiles(w,B){var Q;let ee={},le={},ze=Math.max(B-pt.maxOverzooming,this._source.minzoom),Ze=Math.max(B+pt.maxUnderzooming,this._source.minzoom),ut={};for(let Mt of w){let Jt=this._addTile(Mt);ee[Mt.key]=Mt,Jt.hasData()||Bthis._source.maxzoom){let mr=Mt.children(this._source.maxzoom)[0],Cr=this.getTile(mr);if(Cr&&Cr.hasData()){ee[mr.key]=mr;continue}}else{let mr=Mt.children(this._source.maxzoom);if(ee[mr[0].key]&&ee[mr[1].key]&&ee[mr[2].key]&&ee[mr[3].key])continue}let $t=Jt.wasRequested();for(let mr=Mt.overscaledZ-1;mr>=ze;--mr){let Cr=Mt.scaledTo(mr);if(le[Cr.key])break;if(le[Cr.key]=!0,Jt=this.getTile(Cr),!Jt&&$t&&(Jt=this._addTile(Cr)),Jt){let ve=Jt.hasData();if((ve||!(!((Q=this.map)===null||Q===void 0)&&Q.cancelPendingTileRequestsWhileZooming)||$t)&&(ee[Cr.key]=Cr),$t=Jt.wasRequested(),ve)break}}}return ee}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(let w in this._tiles){let B=[],Q,ee=this._tiles[w].tileID;for(;ee.overscaledZ>0;){if(ee.key in this._loadedParentTiles){Q=this._loadedParentTiles[ee.key];break}B.push(ee.key);let le=ee.scaledTo(ee.overscaledZ-1);if(Q=this._getLoadedTile(le),Q)break;ee=le}for(let le of B)this._loadedParentTiles[le]=Q}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(let w in this._tiles){let B=this._tiles[w].tileID,Q=this._getLoadedTile(B);this._loadedSiblingTiles[B.key]=Q}}_addTile(w){let B=this._tiles[w.key];if(B)return B;B=this._cache.getAndRemove(w),B&&(this._setTileReloadTimer(w.key,B),B.tileID=w,this._state.initializeTileState(B,this.map?this.map.painter:null),this._cacheTimers[w.key]&&(clearTimeout(this._cacheTimers[w.key]),delete this._cacheTimers[w.key],this._setTileReloadTimer(w.key,B)));let Q=B;return B||(B=new Tt(w,this._source.tileSize*w.overscaleFactor()),this._loadTile(B,w.key,B.state)),B.uses++,this._tiles[w.key]=B,Q||this._source.fire(new a.k("dataloading",{tile:B,coord:B.tileID,dataType:"source"})),B}_setTileReloadTimer(w,B){w in this._timers&&(clearTimeout(this._timers[w]),delete this._timers[w]);let Q=B.getExpiryTimeout();Q&&(this._timers[w]=setTimeout(()=>{this._reloadTile(w,"expired"),delete this._timers[w]},Q))}_removeTile(w){let B=this._tiles[w];B&&(B.uses--,delete this._tiles[w],this._timers[w]&&(clearTimeout(this._timers[w]),delete this._timers[w]),B.uses>0||(B.hasData()&&B.state!=="reloading"?this._cache.add(B.tileID,B,B.getExpiryTimeout()):(B.aborted=!0,this._abortTile(B),this._unloadTile(B))))}_dataHandler(w){let B=w.sourceDataType;w.dataType==="source"&&B==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&w.dataType==="source"&&B==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let w in this._tiles)this._removeTile(w);this._cache.reset()}tilesIn(w,B,Q){let ee=[],le=this.transform;if(!le)return ee;let ze=Q?le.getCameraQueryGeometry(w):w,Ze=w.map(ve=>le.pointCoordinate(ve,this.terrain)),ut=ze.map(ve=>le.pointCoordinate(ve,this.terrain)),Mt=this.getIds(),Jt=1/0,$t=1/0,mr=-1/0,Cr=-1/0;for(let ve of ut)Jt=Math.min(Jt,ve.x),$t=Math.min($t,ve.y),mr=Math.max(mr,ve.x),Cr=Math.max(Cr,ve.y);for(let ve=0;ve=0&&Xe[1].y+Qe>=0){let nt=Ze.map(jt=>Ie.getTilePoint(jt)),qt=ut.map(jt=>Ie.getTilePoint(jt));ee.push({tile:xe,tileID:Ie,queryGeometry:nt,cameraQueryGeometry:qt,scale:qe})}}return ee}getVisibleCoordinates(w){let B=this.getRenderableIds(w).map(Q=>this._tiles[Q].tileID);for(let Q of B)Q.posMatrix=this.transform.calculatePosMatrix(Q.toUnwrapped());return B}hasTransition(){if(this._source.hasTransition())return!0;if(or(this._source.type)){let w=u.now();for(let B in this._tiles)if(this._tiles[B].fadeEndTime>=w)return!0}return!1}setFeatureState(w,B,Q){this._state.updateState(w=w||"_geojsonTileLayer",B,Q)}removeFeatureState(w,B,Q){this._state.removeFeatureState(w=w||"_geojsonTileLayer",B,Q)}getFeatureState(w,B){return this._state.getState(w=w||"_geojsonTileLayer",B)}setDependencies(w,B,Q){let ee=this._tiles[w];ee&&ee.setDependencies(B,Q)}reloadTilesForDependencies(w,B){for(let Q in this._tiles)this._tiles[Q].hasDependency(w,B)&&this._reloadTile(Q,"reloading");this._cache.filter(Q=>!Q.hasDependency(w,B))}}function Xt(ue,w){let B=Math.abs(2*ue.wrap)-+(ue.wrap<0),Q=Math.abs(2*w.wrap)-+(w.wrap<0);return ue.overscaledZ-w.overscaledZ||Q-B||w.canonical.y-ue.canonical.y||w.canonical.x-ue.canonical.x}function or(ue){return ue==="raster"||ue==="image"||ue==="video"}pt.maxOverzooming=10,pt.maxUnderzooming=3;class _r{constructor(w,B){this.reset(w,B)}reset(w,B){this.points=w||[],this._distances=[0];for(let Q=1;Q0?(ee-ze)/Ze:0;return this.points[le].mult(1-ut).add(this.points[B].mult(ut))}}function Er(ue,w){let B=!0;return ue==="always"||ue!=="never"&&w!=="never"||(B=!1),B}class ei{constructor(w,B,Q){let ee=this.boxCells=[],le=this.circleCells=[];this.xCellCount=Math.ceil(w/Q),this.yCellCount=Math.ceil(B/Q);for(let ze=0;zethis.width||ee<0||B>this.height)return[];let ut=[];if(w<=0&&B<=0&&this.width<=Q&&this.height<=ee){if(le)return[{key:null,x1:w,y1:B,x2:Q,y2:ee}];for(let Mt=0;Mt0}hitTestCircle(w,B,Q,ee,le){let ze=w-Q,Ze=w+Q,ut=B-Q,Mt=B+Q;if(Ze<0||ze>this.width||Mt<0||ut>this.height)return!1;let Jt=[];return this._forEachCell(ze,ut,Ze,Mt,this._queryCellCircle,Jt,{hitTest:!0,overlapMode:ee,circle:{x:w,y:B,radius:Q},seenUids:{box:{},circle:{}}},le),Jt.length>0}_queryCell(w,B,Q,ee,le,ze,Ze,ut){let{seenUids:Mt,hitTest:Jt,overlapMode:$t}=Ze,mr=this.boxCells[le];if(mr!==null){let ve=this.bboxes;for(let xe of mr)if(!Mt.box[xe]){Mt.box[xe]=!0;let Ie=4*xe,qe=this.boxKeys[xe];if(w<=ve[Ie+2]&&B<=ve[Ie+3]&&Q>=ve[Ie+0]&&ee>=ve[Ie+1]&&(!ut||ut(qe))&&(!Jt||!Er($t,qe.overlapMode))&&(ze.push({key:qe,x1:ve[Ie],y1:ve[Ie+1],x2:ve[Ie+2],y2:ve[Ie+3]}),Jt))return!0}}let Cr=this.circleCells[le];if(Cr!==null){let ve=this.circles;for(let xe of Cr)if(!Mt.circle[xe]){Mt.circle[xe]=!0;let Ie=3*xe,qe=this.circleKeys[xe];if(this._circleAndRectCollide(ve[Ie],ve[Ie+1],ve[Ie+2],w,B,Q,ee)&&(!ut||ut(qe))&&(!Jt||!Er($t,qe.overlapMode))){let Qe=ve[Ie],Xe=ve[Ie+1],nt=ve[Ie+2];if(ze.push({key:qe,x1:Qe-nt,y1:Xe-nt,x2:Qe+nt,y2:Xe+nt}),Jt)return!0}}}return!1}_queryCellCircle(w,B,Q,ee,le,ze,Ze,ut){let{circle:Mt,seenUids:Jt,overlapMode:$t}=Ze,mr=this.boxCells[le];if(mr!==null){let ve=this.bboxes;for(let xe of mr)if(!Jt.box[xe]){Jt.box[xe]=!0;let Ie=4*xe,qe=this.boxKeys[xe];if(this._circleAndRectCollide(Mt.x,Mt.y,Mt.radius,ve[Ie+0],ve[Ie+1],ve[Ie+2],ve[Ie+3])&&(!ut||ut(qe))&&!Er($t,qe.overlapMode))return ze.push(!0),!0}}let Cr=this.circleCells[le];if(Cr!==null){let ve=this.circles;for(let xe of Cr)if(!Jt.circle[xe]){Jt.circle[xe]=!0;let Ie=3*xe,qe=this.circleKeys[xe];if(this._circlesCollide(ve[Ie],ve[Ie+1],ve[Ie+2],Mt.x,Mt.y,Mt.radius)&&(!ut||ut(qe))&&!Er($t,qe.overlapMode))return ze.push(!0),!0}}}_forEachCell(w,B,Q,ee,le,ze,Ze,ut){let Mt=this._convertToXCellCoord(w),Jt=this._convertToYCellCoord(B),$t=this._convertToXCellCoord(Q),mr=this._convertToYCellCoord(ee);for(let Cr=Mt;Cr<=$t;Cr++)for(let ve=Jt;ve<=mr;ve++)if(le.call(this,w,B,Q,ee,this.xCellCount*ve+Cr,ze,Ze,ut))return}_convertToXCellCoord(w){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(w*this.xScale)))}_convertToYCellCoord(w){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(w*this.yScale)))}_circlesCollide(w,B,Q,ee,le,ze){let Ze=ee-w,ut=le-B,Mt=Q+ze;return Mt*Mt>Ze*Ze+ut*ut}_circleAndRectCollide(w,B,Q,ee,le,ze,Ze){let ut=(ze-ee)/2,Mt=Math.abs(w-(ee+ut));if(Mt>ut+Q)return!1;let Jt=(Ze-le)/2,$t=Math.abs(B-(le+Jt));if($t>Jt+Q)return!1;if(Mt<=ut||$t<=Jt)return!0;let mr=Mt-ut,Cr=$t-Jt;return mr*mr+Cr*Cr<=Q*Q}}function qr(ue,w,B,Q,ee){let le=a.H();return w?(a.K(le,le,[1/ee,1/ee,1]),B||a.ad(le,le,Q.angle)):a.L(le,Q.labelPlaneMatrix,ue),le}function jr(ue,w,B,Q,ee){if(w){let le=a.ae(ue);return a.K(le,le,[ee,ee,1]),B||a.ad(le,le,-Q.angle),le}return Q.glCoordMatrix}function gt(ue,w,B,Q){let ee;Q?(ee=[ue,w,Q(ue,w),1],a.af(ee,ee,B)):(ee=[ue,w,0,1],ai(ee,ee,B));let le=ee[3];return{point:new a.P(ee[0]/le,ee[1]/le),signedDistanceFromCamera:le,isOccluded:!1}}function Ge(ue,w){return .5+ue/w*.5}function Je(ue,w){return ue.x>=-w[0]&&ue.x<=w[0]&&ue.y>=-w[1]&&ue.y<=w[1]}function We(ue,w,B,Q,ee,le,ze,Ze,ut,Mt,Jt,$t,mr,Cr,ve){let xe=Q?ue.textSizeData:ue.iconSizeData,Ie=a.ag(xe,B.transform.zoom),qe=[256/B.width*2+1,256/B.height*2+1],Qe=Q?ue.text.dynamicLayoutVertexArray:ue.icon.dynamicLayoutVertexArray;Qe.clear();let Xe=ue.lineVertexArray,nt=Q?ue.text.placedSymbolArray:ue.icon.placedSymbolArray,qt=B.transform.width/B.transform.height,jt=!1;for(let ar=0;arMath.abs(B.x-w.x)*Q?{useVertical:!0}:(ue===a.ah.vertical?w.yB.x)?{needsFlipping:!0}:null}function At(ue,w,B,Q,ee,le,ze,Ze,ut,Mt,Jt){let $t=B/24,mr=w.lineOffsetX*$t,Cr=w.lineOffsetY*$t,ve;if(w.numGlyphs>1){let xe=w.glyphStartIndex+w.numGlyphs,Ie=w.lineStartIndex,qe=w.lineStartIndex+w.lineLength,Qe=et($t,Ze,mr,Cr,Q,w,Jt,ue);if(!Qe)return{notEnoughRoom:!0};let Xe=gt(Qe.first.point.x,Qe.first.point.y,ze,ue.getElevation).point,nt=gt(Qe.last.point.x,Qe.last.point.y,ze,ue.getElevation).point;if(ee&&!Q){let qt=xt(w.writingMode,Xe,nt,Mt);if(qt)return qt}ve=[Qe.first];for(let qt=w.glyphStartIndex+1;qt0?Xe.point:function(jt,ar,fr,br,Fr,Hr){return Kt(jt,ar,fr,1,Fr,Hr)}(ue.tileAnchorPoint,Qe,Ie,0,le,ue),qt=xt(w.writingMode,Ie,nt,Mt);if(qt)return qt}let xe=Yr($t*Ze.getoffsetX(w.glyphStartIndex),mr,Cr,Q,w.segment,w.lineStartIndex,w.lineStartIndex+w.lineLength,ue,Jt);if(!xe||ue.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};ve=[xe]}for(let xe of ve)a.aj(ut,xe.point,xe.angle);return{}}function Kt(ue,w,B,Q,ee,le){let ze=ue.add(ue.sub(w)._unit()),Ze=ee!==void 0?gt(ze.x,ze.y,ee,le.getElevation).point:Sr(ze.x,ze.y,le).point,ut=B.sub(Ze);return B.add(ut._mult(Q/ut.mag()))}function er(ue,w,B){let Q=w.projectionCache;if(Q.projections[ue])return Q.projections[ue];let ee=new a.P(w.lineVertexArray.getx(ue),w.lineVertexArray.gety(ue)),le=Sr(ee.x,ee.y,w);if(le.signedDistanceFromCamera>0)return Q.projections[ue]=le.point,Q.anyProjectionOccluded=Q.anyProjectionOccluded||le.isOccluded,le.point;let ze=ue-B.direction;return function(Ze,ut,Mt,Jt,$t){return Kt(Ze,ut,Mt,Jt,void 0,$t)}(B.distanceFromAnchor===0?w.tileAnchorPoint:new a.P(w.lineVertexArray.getx(ze),w.lineVertexArray.gety(ze)),ee,B.previousVertex,B.absOffsetX-B.distanceFromAnchor+1,w)}function Sr(ue,w,B){let Q=ue+B.translation[0],ee=w+B.translation[1],le;return!B.pitchWithMap&&B.projection.useSpecialProjectionForSymbols?(le=B.projection.projectTileCoordinates(Q,ee,B.unwrappedTileID,B.getElevation),le.point.x=(.5*le.point.x+.5)*B.width,le.point.y=(.5*-le.point.y+.5)*B.height):(le=gt(Q,ee,B.labelPlaneMatrix,B.getElevation),le.isOccluded=!1),le}function Gr(ue,w,B){return ue._unit()._perp()._mult(w*B)}function Ir(ue,w,B,Q,ee,le,ze,Ze,ut){if(Ze.projectionCache.offsets[ue])return Ze.projectionCache.offsets[ue];let Mt=B.add(w);if(ue+ut.direction=ee)return Ze.projectionCache.offsets[ue]=Mt,Mt;let Jt=er(ue+ut.direction,Ze,ut),$t=Gr(Jt.sub(B),ze,ut.direction),mr=B.add($t),Cr=Jt.add($t);return Ze.projectionCache.offsets[ue]=a.ak(le,Mt,mr,Cr)||Mt,Ze.projectionCache.offsets[ue]}function Yr(ue,w,B,Q,ee,le,ze,Ze,ut){let Mt=Q?ue-w:ue+w,Jt=Mt>0?1:-1,$t=0;Q&&(Jt*=-1,$t=Math.PI),Jt<0&&($t+=Math.PI);let mr,Cr=Jt>0?le+ee:le+ee+1;Ze.projectionCache.cachedAnchorPoint?mr=Ze.projectionCache.cachedAnchorPoint:(mr=Sr(Ze.tileAnchorPoint.x,Ze.tileAnchorPoint.y,Ze).point,Ze.projectionCache.cachedAnchorPoint=mr);let ve,xe,Ie=mr,qe=mr,Qe=0,Xe=0,nt=Math.abs(Mt),qt=[],jt;for(;Qe+Xe<=nt;){if(Cr+=Jt,Cr=ze)return null;Qe+=Xe,qe=Ie,xe=ve;let br={absOffsetX:nt,direction:Jt,distanceFromAnchor:Qe,previousVertex:qe};if(Ie=er(Cr,Ze,br),B===0)qt.push(qe),jt=Ie.sub(qe);else{let Fr,Hr=Ie.sub(qe);Fr=Hr.mag()===0?Gr(er(Cr+Jt,Ze,br).sub(Ie),B,Jt):Gr(Hr,B,Jt),xe||(xe=qe.add(Fr)),ve=Ir(Cr,Fr,Ie,le,ze,xe,B,Ze,br),qt.push(xe),jt=ve.sub(xe)}Xe=jt.mag()}let ar=jt._mult((nt-Qe)/Xe)._add(xe||qe),fr=$t+Math.atan2(Ie.y-qe.y,Ie.x-qe.x);return qt.push(ar),{point:ar,angle:ut?fr:0,path:qt}}let _i=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Pi(ue,w){for(let B=0;B=1;fa--)Ln.push(cn.path[fa]);for(let fa=1;fa$a.signedDistanceFromCamera<=0)?[]:fa.map($a=>$a.point)}let Aa=[];if(Ln.length>0){let fa=Ln[0].clone(),$a=Ln[0].clone();for(let Co=1;Co=Hr.x&&$a.x<=ri.x&&fa.y>=Hr.y&&$a.y<=ri.y?[Ln]:$a.xri.x||$a.yri.y?[]:a.al([Ln],Hr.x,Hr.y,ri.x,ri.y)}for(let fa of Aa){Ci.reset(fa,.25*Fr);let $a=0;$a=Ci.length<=.5*Fr?1:Math.ceil(Ci.paddedLength/Yn)+1;for(let Co=0;Co<$a;Co++){let Qa=Co/Math.max($a-1,1),mo=Ci.lerp(Qa),Bo=mo.x+mi,Ps=mo.y+mi;qe.push(Bo,Ps,Fr,0);let Ts=Bo-Fr,wo=Ps-Fr,To=Bo+Fr,hl=Ps+Fr;if(br=br&&this.isOffscreen(Ts,wo,To,hl),fr=fr||this.isInsideGrid(Ts,wo,To,hl),w!=="always"&&this.grid.hitTestCircle(Bo,Ps,Fr,w,mr)&&(ar=!0,!Jt))return{circles:[],offscreen:!1,collisionDetected:ar}}}}return{circles:!Jt&&ar||!fr||Xegt(ee.x,ee.y,Q,B.getElevation))}queryRenderedSymbols(w){if(w.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let B=[],Q=1/0,ee=1/0,le=-1/0,ze=-1/0;for(let Jt of w){let $t=new a.P(Jt.x+mi,Jt.y+mi);Q=Math.min(Q,$t.x),ee=Math.min(ee,$t.y),le=Math.max(le,$t.x),ze=Math.max(ze,$t.y),B.push($t)}let Ze=this.grid.query(Q,ee,le,ze).concat(this.ignoredGrid.query(Q,ee,le,ze)),ut={},Mt={};for(let Jt of Ze){let $t=Jt.key;if(ut[$t.bucketInstanceId]===void 0&&(ut[$t.bucketInstanceId]={}),ut[$t.bucketInstanceId][$t.featureIndex])continue;let mr=[new a.P(Jt.x1,Jt.y1),new a.P(Jt.x2,Jt.y1),new a.P(Jt.x2,Jt.y2),new a.P(Jt.x1,Jt.y2)];a.am(B,mr)&&(ut[$t.bucketInstanceId][$t.featureIndex]=!0,Mt[$t.bucketInstanceId]===void 0&&(Mt[$t.bucketInstanceId]=[]),Mt[$t.bucketInstanceId].push($t.featureIndex))}return Mt}insertCollisionBox(w,B,Q,ee,le,ze){(Q?this.ignoredGrid:this.grid).insert({bucketInstanceId:ee,featureIndex:le,collisionGroupID:ze,overlapMode:B},w[0],w[1],w[2],w[3])}insertCollisionCircles(w,B,Q,ee,le,ze){let Ze=Q?this.ignoredGrid:this.grid,ut={bucketInstanceId:ee,featureIndex:le,collisionGroupID:ze,overlapMode:B};for(let Mt=0;Mt=this.screenRightBoundary||eethis.screenBottomBoundary}isInsideGrid(w,B,Q,ee){return Q>=0&&w=0&&Bthis.projectAndGetPerspectiveRatio(Q,Fr.x,Fr.y,ee,Mt));fr=br.some(Fr=>!Fr.isOccluded),ar=br.map(Fr=>Fr.point)}else fr=!0;return{box:a.ao(ar),allPointsOccluded:!fr}}}function Fn(ue,w,B){return w*(a.X/(ue.tileSize*Math.pow(2,B-ue.tileID.overscaledZ)))}class An{constructor(w,B,Q,ee){this.opacity=w?Math.max(0,Math.min(1,w.opacity+(w.placed?B:-B))):ee&&Q?1:0,this.placed=Q}isHidden(){return this.opacity===0&&!this.placed}}class Hn{constructor(w,B,Q,ee,le){this.text=new An(w?w.text:null,B,Q,le),this.icon=new An(w?w.icon:null,B,ee,le)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Qn{constructor(w,B,Q){this.text=w,this.icon=B,this.skipFade=Q}}class Vi{constructor(){this.invProjMatrix=a.H(),this.viewportMatrix=a.H(),this.circles=[]}}class Kn{constructor(w,B,Q,ee,le){this.bucketInstanceId=w,this.featureIndex=B,this.sourceLayerIndex=Q,this.bucketIndex=ee,this.tileID=le}}class Jn{constructor(w){this.crossSourceCollisions=w,this.maxGroupID=0,this.collisionGroups={}}get(w){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[w]){let B=++this.maxGroupID;this.collisionGroups[w]={ID:B,predicate:Q=>Q.collisionGroupID===B}}return this.collisionGroups[w]}}function Gt(ue,w,B,Q,ee){let{horizontalAlign:le,verticalAlign:ze}=a.au(ue);return new a.P(-(le-.5)*w+Q[0]*ee,-(ze-.5)*B+Q[1]*ee)}class wt{constructor(w,B,Q,ee,le,ze){this.transform=w.clone(),this.terrain=Q,this.collisionIndex=new un(this.transform,B),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=ee,this.retainedQueryData={},this.collisionGroups=new Jn(le),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=ze,ze&&(ze.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(w){let B=this.terrain;return B?(Q,ee)=>B.getElevation(w,Q,ee):null}getBucketParts(w,B,Q,ee){let le=Q.getBucket(B),ze=Q.latestFeatureIndex;if(!le||!ze||B.id!==le.layerIds[0])return;let Ze=Q.collisionBoxArray,ut=le.layers[0].layout,Mt=le.layers[0].paint,Jt=Math.pow(2,this.transform.zoom-Q.tileID.overscaledZ),$t=Q.tileSize/a.X,mr=Q.tileID.toUnwrapped(),Cr=this.transform.calculatePosMatrix(mr),ve=ut.get("text-pitch-alignment")==="map",xe=ut.get("text-rotation-alignment")==="map",Ie=Fn(Q,1,this.transform.zoom),qe=this.collisionIndex.mapProjection.translatePosition(this.transform,Q,Mt.get("text-translate"),Mt.get("text-translate-anchor")),Qe=this.collisionIndex.mapProjection.translatePosition(this.transform,Q,Mt.get("icon-translate"),Mt.get("icon-translate-anchor")),Xe=qr(Cr,ve,xe,this.transform,Ie),nt=null;if(ve){let jt=jr(Cr,ve,xe,this.transform,Ie);nt=a.L([],this.transform.labelPlaneMatrix,jt)}this.retainedQueryData[le.bucketInstanceId]=new Kn(le.bucketInstanceId,ze,le.sourceLayerIndex,le.index,Q.tileID);let qt={bucket:le,layout:ut,translationText:qe,translationIcon:Qe,posMatrix:Cr,unwrappedTileID:mr,textLabelPlaneMatrix:Xe,labelToScreenMatrix:nt,scale:Jt,textPixelRatio:$t,holdingForFade:Q.holdingForFade(),collisionBoxArray:Ze,partiallyEvaluatedTextSize:a.ag(le.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(le.sourceID)};if(ee)for(let jt of le.sortKeyRanges){let{sortKey:ar,symbolInstanceStart:fr,symbolInstanceEnd:br}=jt;w.push({sortKey:ar,symbolInstanceStart:fr,symbolInstanceEnd:br,parameters:qt})}else w.push({symbolInstanceStart:0,symbolInstanceEnd:le.symbolInstances.length,parameters:qt})}attemptAnchorPlacement(w,B,Q,ee,le,ze,Ze,ut,Mt,Jt,$t,mr,Cr,ve,xe,Ie,qe,Qe,Xe){let nt=a.aq[w.textAnchor],qt=[w.textOffset0,w.textOffset1],jt=Gt(nt,Q,ee,qt,le),ar=this.collisionIndex.placeCollisionBox(B,mr,ut,Mt,Jt,Ze,ze,Ie,$t.predicate,Xe,jt);if((!Qe||this.collisionIndex.placeCollisionBox(Qe,mr,ut,Mt,Jt,Ze,ze,qe,$t.predicate,Xe,jt).placeable)&&ar.placeable){let fr;if(this.prevPlacement&&this.prevPlacement.variableOffsets[Cr.crossTileID]&&this.prevPlacement.placements[Cr.crossTileID]&&this.prevPlacement.placements[Cr.crossTileID].text&&(fr=this.prevPlacement.variableOffsets[Cr.crossTileID].anchor),Cr.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[Cr.crossTileID]={textOffset:qt,width:Q,height:ee,anchor:nt,textBoxScale:le,prevAnchor:fr},this.markUsedJustification(ve,nt,Cr,xe),ve.allowVerticalPlacement&&(this.markUsedOrientation(ve,xe,Cr),this.placedOrientations[Cr.crossTileID]=xe),{shift:jt,placedGlyphBoxes:ar}}}placeLayerBucketPart(w,B,Q){let{bucket:ee,layout:le,translationText:ze,translationIcon:Ze,posMatrix:ut,unwrappedTileID:Mt,textLabelPlaneMatrix:Jt,labelToScreenMatrix:$t,textPixelRatio:mr,holdingForFade:Cr,collisionBoxArray:ve,partiallyEvaluatedTextSize:xe,collisionGroup:Ie}=w.parameters,qe=le.get("text-optional"),Qe=le.get("icon-optional"),Xe=a.ar(le,"text-overlap","text-allow-overlap"),nt=Xe==="always",qt=a.ar(le,"icon-overlap","icon-allow-overlap"),jt=qt==="always",ar=le.get("text-rotation-alignment")==="map",fr=le.get("text-pitch-alignment")==="map",br=le.get("icon-text-fit")!=="none",Fr=le.get("symbol-z-order")==="viewport-y",Hr=nt&&(jt||!ee.hasIconData()||Qe),ri=jt&&(nt||!ee.hasTextData()||qe);!ee.collisionArrays&&ve&&ee.deserializeCollisionBoxes(ve);let Ci=this._getTerrainElevationFunc(this.retainedQueryData[ee.bucketInstanceId].tileID),cn=(sn,Ln,Yn)=>{var Aa,fa;if(B[sn.crossTileID])return;if(Cr)return void(this.placements[sn.crossTileID]=new Qn(!1,!1,!1));let $a=!1,Co=!1,Qa=!0,mo=null,Bo={box:null,placeable:!1,offscreen:null},Ps={box:null,placeable:!1,offscreen:null},Ts=null,wo=null,To=null,hl=0,Ul=0,Lu=0;Ln.textFeatureIndex?hl=Ln.textFeatureIndex:sn.useRuntimeCollisionCircles&&(hl=sn.featureIndex),Ln.verticalTextFeatureIndex&&(Ul=Ln.verticalTextFeatureIndex);let au=Ln.textBox;if(au){let Tl=Te=>{let Oe=a.ah.horizontal;if(ee.allowVerticalPlacement&&!Te&&this.prevPlacement){let Ve=this.prevPlacement.placedOrientations[sn.crossTileID];Ve&&(this.placedOrientations[sn.crossTileID]=Ve,Oe=Ve,this.markUsedOrientation(ee,Oe,sn))}return Oe},Al=(Te,Oe)=>{if(ee.allowVerticalPlacement&&sn.numVerticalGlyphVertices>0&&Ln.verticalTextBox){for(let Ve of ee.writingModes)if(Ve===a.ah.vertical?(Bo=Oe(),Ps=Bo):Bo=Te(),Bo&&Bo.placeable)break}else Bo=Te()},X=sn.textAnchorOffsetStartIndex,se=sn.textAnchorOffsetEndIndex;if(se===X){let Te=(Oe,Ve)=>{let Ye=this.collisionIndex.placeCollisionBox(Oe,Xe,mr,ut,Mt,fr,ar,ze,Ie.predicate,Ci);return Ye&&Ye.placeable&&(this.markUsedOrientation(ee,Ve,sn),this.placedOrientations[sn.crossTileID]=Ve),Ye};Al(()=>Te(au,a.ah.horizontal),()=>{let Oe=Ln.verticalTextBox;return ee.allowVerticalPlacement&&sn.numVerticalGlyphVertices>0&&Oe?Te(Oe,a.ah.vertical):{box:null,offscreen:null}}),Tl(Bo&&Bo.placeable)}else{let Te=a.aq[(fa=(Aa=this.prevPlacement)===null||Aa===void 0?void 0:Aa.variableOffsets[sn.crossTileID])===null||fa===void 0?void 0:fa.anchor],Oe=(Ye,Pt,at)=>{let Wt=Ye.x2-Ye.x1,dr=Ye.y2-Ye.y1,pr=sn.textBoxScale,Ur=br&&qt==="never"?Pt:null,zr=null,gi=Xe==="never"?1:2,xi="never";Te&&gi++;for(let Wr=0;WrOe(au,Ln.iconBox,a.ah.horizontal),()=>{let Ye=Ln.verticalTextBox;return ee.allowVerticalPlacement&&(!Bo||!Bo.placeable)&&sn.numVerticalGlyphVertices>0&&Ye?Oe(Ye,Ln.verticalIconBox,a.ah.vertical):{box:null,occluded:!0,offscreen:null}}),Bo&&($a=Bo.placeable,Qa=Bo.offscreen);let Ve=Tl(Bo&&Bo.placeable);if(!$a&&this.prevPlacement){let Ye=this.prevPlacement.variableOffsets[sn.crossTileID];Ye&&(this.variableOffsets[sn.crossTileID]=Ye,this.markUsedJustification(ee,Ye.anchor,sn,Ve))}}}if(Ts=Bo,$a=Ts&&Ts.placeable,Qa=Ts&&Ts.offscreen,sn.useRuntimeCollisionCircles){let Tl=ee.text.placedSymbolArray.get(sn.centerJustifiedTextSymbolIndex),Al=a.ai(ee.textSizeData,xe,Tl),X=le.get("text-padding");wo=this.collisionIndex.placeCollisionCircles(Xe,Tl,ee.lineVertexArray,ee.glyphOffsetArray,Al,ut,Mt,Jt,$t,Q,fr,Ie.predicate,sn.collisionCircleDiameter,X,ze,Ci),wo.circles.length&&wo.collisionDetected&&!Q&&a.w("Collisions detected, but collision boxes are not shown"),$a=nt||wo.circles.length>0&&!wo.collisionDetected,Qa=Qa&&wo.offscreen}if(Ln.iconFeatureIndex&&(Lu=Ln.iconFeatureIndex),Ln.iconBox){let Tl=Al=>this.collisionIndex.placeCollisionBox(Al,qt,mr,ut,Mt,fr,ar,Ze,Ie.predicate,Ci,br&&mo?mo:void 0);Ps&&Ps.placeable&&Ln.verticalIconBox?(To=Tl(Ln.verticalIconBox),Co=To.placeable):(To=Tl(Ln.iconBox),Co=To.placeable),Qa=Qa&&To.offscreen}let Js=qe||sn.numHorizontalGlyphVertices===0&&sn.numVerticalGlyphVertices===0,eu=Qe||sn.numIconVertices===0;Js||eu?eu?Js||(Co=Co&&$a):$a=Co&&$a:Co=$a=Co&&$a;let dc=Co&&To.placeable;if($a&&Ts.placeable&&this.collisionIndex.insertCollisionBox(Ts.box,Xe,le.get("text-ignore-placement"),ee.bucketInstanceId,Ps&&Ps.placeable&&Ul?Ul:hl,Ie.ID),dc&&this.collisionIndex.insertCollisionBox(To.box,qt,le.get("icon-ignore-placement"),ee.bucketInstanceId,Lu,Ie.ID),wo&&$a&&this.collisionIndex.insertCollisionCircles(wo.circles,Xe,le.get("text-ignore-placement"),ee.bucketInstanceId,hl,Ie.ID),Q&&this.storeCollisionData(ee.bucketInstanceId,Yn,Ln,Ts,To,wo),sn.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(ee.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[sn.crossTileID]=new Qn($a||Hr,Co||ri,Qa||ee.justReloaded),B[sn.crossTileID]=!0};if(Fr){if(w.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let sn=ee.getSortedSymbolIndexes(this.transform.angle);for(let Ln=sn.length-1;Ln>=0;--Ln){let Yn=sn[Ln];cn(ee.symbolInstances.get(Yn),ee.collisionArrays[Yn],Yn)}}else for(let sn=w.symbolInstanceStart;sn=0&&(w.text.placedSymbolArray.get(Ze).crossTileID=le>=0&&Ze!==le?0:Q.crossTileID)}markUsedOrientation(w,B,Q){let ee=B===a.ah.horizontal||B===a.ah.horizontalOnly?B:0,le=B===a.ah.vertical?B:0,ze=[Q.leftJustifiedTextSymbolIndex,Q.centerJustifiedTextSymbolIndex,Q.rightJustifiedTextSymbolIndex];for(let Ze of ze)w.text.placedSymbolArray.get(Ze).placedOrientation=ee;Q.verticalPlacedTextSymbolIndex&&(w.text.placedSymbolArray.get(Q.verticalPlacedTextSymbolIndex).placedOrientation=le)}commit(w){this.commitTime=w,this.zoomAtLastRecencyCheck=this.transform.zoom;let B=this.prevPlacement,Q=!1;this.prevZoomAdjustment=B?B.zoomAdjustment(this.transform.zoom):0;let ee=B?B.symbolFadeChange(w):1,le=B?B.opacities:{},ze=B?B.variableOffsets:{},Ze=B?B.placedOrientations:{};for(let ut in this.placements){let Mt=this.placements[ut],Jt=le[ut];Jt?(this.opacities[ut]=new Hn(Jt,ee,Mt.text,Mt.icon),Q=Q||Mt.text!==Jt.text.placed||Mt.icon!==Jt.icon.placed):(this.opacities[ut]=new Hn(null,ee,Mt.text,Mt.icon,Mt.skipFade),Q=Q||Mt.text||Mt.icon)}for(let ut in le){let Mt=le[ut];if(!this.opacities[ut]){let Jt=new Hn(Mt,ee,!1,!1);Jt.isHidden()||(this.opacities[ut]=Jt,Q=Q||Mt.text.placed||Mt.icon.placed)}}for(let ut in ze)this.variableOffsets[ut]||!this.opacities[ut]||this.opacities[ut].isHidden()||(this.variableOffsets[ut]=ze[ut]);for(let ut in Ze)this.placedOrientations[ut]||!this.opacities[ut]||this.opacities[ut].isHidden()||(this.placedOrientations[ut]=Ze[ut]);if(B&&B.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");Q?this.lastPlacementChangeTime=w:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=B?B.lastPlacementChangeTime:w)}updateLayerOpacities(w,B){let Q={};for(let ee of B){let le=ee.getBucket(w);le&&ee.latestFeatureIndex&&w.id===le.layerIds[0]&&this.updateBucketOpacities(le,ee.tileID,Q,ee.collisionBoxArray)}}updateBucketOpacities(w,B,Q,ee){w.hasTextData()&&(w.text.opacityVertexArray.clear(),w.text.hasVisibleVertices=!1),w.hasIconData()&&(w.icon.opacityVertexArray.clear(),w.icon.hasVisibleVertices=!1),w.hasIconCollisionBoxData()&&w.iconCollisionBox.collisionVertexArray.clear(),w.hasTextCollisionBoxData()&&w.textCollisionBox.collisionVertexArray.clear();let le=w.layers[0],ze=le.layout,Ze=new Hn(null,0,!1,!1,!0),ut=ze.get("text-allow-overlap"),Mt=ze.get("icon-allow-overlap"),Jt=le._unevaluatedLayout.hasValue("text-variable-anchor")||le._unevaluatedLayout.hasValue("text-variable-anchor-offset"),$t=ze.get("text-rotation-alignment")==="map",mr=ze.get("text-pitch-alignment")==="map",Cr=ze.get("icon-text-fit")!=="none",ve=new Hn(null,0,ut&&(Mt||!w.hasIconData()||ze.get("icon-optional")),Mt&&(ut||!w.hasTextData()||ze.get("text-optional")),!0);!w.collisionArrays&&ee&&(w.hasIconCollisionBoxData()||w.hasTextCollisionBoxData())&&w.deserializeCollisionBoxes(ee);let xe=(qe,Qe,Xe)=>{for(let nt=0;nt0,fr=this.placedOrientations[Qe.crossTileID],br=fr===a.ah.vertical,Fr=fr===a.ah.horizontal||fr===a.ah.horizontalOnly;if(Xe>0||nt>0){let ri=en(jt.text);xe(w.text,Xe,br?fn:ri),xe(w.text,nt,Fr?fn:ri);let Ci=jt.text.isHidden();[Qe.rightJustifiedTextSymbolIndex,Qe.centerJustifiedTextSymbolIndex,Qe.leftJustifiedTextSymbolIndex].forEach(Ln=>{Ln>=0&&(w.text.placedSymbolArray.get(Ln).hidden=Ci||br?1:0)}),Qe.verticalPlacedTextSymbolIndex>=0&&(w.text.placedSymbolArray.get(Qe.verticalPlacedTextSymbolIndex).hidden=Ci||Fr?1:0);let cn=this.variableOffsets[Qe.crossTileID];cn&&this.markUsedJustification(w,cn.anchor,Qe,fr);let sn=this.placedOrientations[Qe.crossTileID];sn&&(this.markUsedJustification(w,"left",Qe,sn),this.markUsedOrientation(w,sn,Qe))}if(ar){let ri=en(jt.icon),Ci=!(Cr&&Qe.verticalPlacedIconSymbolIndex&&br);Qe.placedIconSymbolIndex>=0&&(xe(w.icon,Qe.numIconVertices,Ci?ri:fn),w.icon.placedSymbolArray.get(Qe.placedIconSymbolIndex).hidden=jt.icon.isHidden()),Qe.verticalPlacedIconSymbolIndex>=0&&(xe(w.icon,Qe.numVerticalIconVertices,Ci?fn:ri),w.icon.placedSymbolArray.get(Qe.verticalPlacedIconSymbolIndex).hidden=jt.icon.isHidden())}let Hr=Ie&&Ie.has(qe)?Ie.get(qe):{text:null,icon:null};if(w.hasIconCollisionBoxData()||w.hasTextCollisionBoxData()){let ri=w.collisionArrays[qe];if(ri){let Ci=new a.P(0,0);if(ri.textBox||ri.verticalTextBox){let cn=!0;if(Jt){let sn=this.variableOffsets[qt];sn?(Ci=Gt(sn.anchor,sn.width,sn.height,sn.textOffset,sn.textBoxScale),$t&&Ci._rotate(mr?this.transform.angle:-this.transform.angle)):cn=!1}if(ri.textBox||ri.verticalTextBox){let sn;ri.textBox&&(sn=br),ri.verticalTextBox&&(sn=Fr),rr(w.textCollisionBox.collisionVertexArray,jt.text.placed,!cn||sn,Hr.text,Ci.x,Ci.y)}}if(ri.iconBox||ri.verticalIconBox){let cn=!!(!Fr&&ri.verticalIconBox),sn;ri.iconBox&&(sn=cn),ri.verticalIconBox&&(sn=!cn),rr(w.iconCollisionBox.collisionVertexArray,jt.icon.placed,sn,Hr.icon,Cr?Ci.x:0,Cr?Ci.y:0)}}}}if(w.sortFeatures(this.transform.angle),this.retainedQueryData[w.bucketInstanceId]&&(this.retainedQueryData[w.bucketInstanceId].featureSortOrder=w.featureSortOrder),w.hasTextData()&&w.text.opacityVertexBuffer&&w.text.opacityVertexBuffer.updateData(w.text.opacityVertexArray),w.hasIconData()&&w.icon.opacityVertexBuffer&&w.icon.opacityVertexBuffer.updateData(w.icon.opacityVertexArray),w.hasIconCollisionBoxData()&&w.iconCollisionBox.collisionVertexBuffer&&w.iconCollisionBox.collisionVertexBuffer.updateData(w.iconCollisionBox.collisionVertexArray),w.hasTextCollisionBoxData()&&w.textCollisionBox.collisionVertexBuffer&&w.textCollisionBox.collisionVertexBuffer.updateData(w.textCollisionBox.collisionVertexArray),w.text.opacityVertexArray.length!==w.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${w.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${w.text.layoutVertexArray.length}) / 4`);if(w.icon.opacityVertexArray.length!==w.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${w.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${w.icon.layoutVertexArray.length}) / 4`);if(w.bucketInstanceId in this.collisionCircleArrays){let qe=this.collisionCircleArrays[w.bucketInstanceId];w.placementInvProjMatrix=qe.invProjMatrix,w.placementViewportMatrix=qe.viewportMatrix,w.collisionCircleArray=qe.circles,delete this.collisionCircleArrays[w.bucketInstanceId]}}symbolFadeChange(w){return this.fadeDuration===0?1:(w-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(w){return Math.max(0,(this.transform.zoom-w)/1.5)}hasTransitions(w){return this.stale||w-this.lastPlacementChangeTimew}setStale(){this.stale=!0}}function rr(ue,w,B,Q,ee,le){Q&&Q.length!==0||(Q=[0,0,0,0]);let ze=Q[0]-mi,Ze=Q[1]-mi,ut=Q[2]-mi,Mt=Q[3]-mi;ue.emplaceBack(w?1:0,B?1:0,ee||0,le||0,ze,Ze),ue.emplaceBack(w?1:0,B?1:0,ee||0,le||0,ut,Ze),ue.emplaceBack(w?1:0,B?1:0,ee||0,le||0,ut,Mt),ue.emplaceBack(w?1:0,B?1:0,ee||0,le||0,ze,Mt)}let ir=Math.pow(2,25),wr=Math.pow(2,24),Xr=Math.pow(2,17),ti=Math.pow(2,16),$r=Math.pow(2,9),Ri=Math.pow(2,8),Zi=Math.pow(2,1);function en(ue){if(ue.opacity===0&&!ue.placed)return 0;if(ue.opacity===1&&ue.placed)return 4294967295;let w=ue.placed?1:0,B=Math.floor(127*ue.opacity);return B*ir+w*wr+B*Xr+w*ti+B*$r+w*Ri+B*Zi+w}let fn=0;function yn(){return{isOccluded:(ue,w,B)=>!1,getPitchedTextCorrection:(ue,w,B)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(ue,w,B,Q){throw new Error("Not implemented.")},translatePosition:(ue,w,B,Q)=>function(ee,le,ze,Ze,ut=!1){if(!ze[0]&&!ze[1])return[0,0];let Mt=ut?Ze==="map"?ee.angle:0:Ze==="viewport"?-ee.angle:0;if(Mt){let Jt=Math.sin(Mt),$t=Math.cos(Mt);ze=[ze[0]*$t-ze[1]*Jt,ze[0]*Jt+ze[1]*$t]}return[ut?ze[0]:Fn(le,ze[0],ee.zoom),ut?ze[1]:Fn(le,ze[1],ee.zoom)]}(ue,w,B,Q),getCircleRadiusCorrection:ue=>1}}class Mn{constructor(w){this._sortAcrossTiles=w.layout.get("symbol-z-order")!=="viewport-y"&&!w.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(w,B,Q,ee,le){let ze=this._bucketParts;for(;this._currentTileIndexZe.sortKey-ut.sortKey));this._currentPartIndex!this._forceFullPlacement&&u.now()-ee>2;for(;this._currentPlacementIndex>=0;){let ze=B[w[this._currentPlacementIndex]],Ze=this.placement.collisionIndex.transform.zoom;if(ze.type==="symbol"&&(!ze.minzoom||ze.minzoom<=Ze)&&(!ze.maxzoom||ze.maxzoom>Ze)){if(this._inProgressLayer||(this._inProgressLayer=new Mn(ze)),this._inProgressLayer.continuePlacement(Q[ze.source],this.placement,this._showCollisionBoxes,ze,le))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(w){return this.placement.commit(w),this.placement}}let ua=512/a.X/2;class ma{constructor(w,B,Q){this.tileID=w,this.bucketInstanceId=Q,this._symbolsByKey={};let ee=new Map;for(let le=0;le({x:Math.floor(ut.anchorX*ua),y:Math.floor(ut.anchorY*ua)})),crossTileIDs:ze.map(ut=>ut.crossTileID)};if(Ze.positions.length>128){let ut=new a.av(Ze.positions.length,16,Uint16Array);for(let{x:Mt,y:Jt}of Ze.positions)ut.add(Mt,Jt);ut.finish(),delete Ze.positions,Ze.index=ut}this._symbolsByKey[le]=Ze}}getScaledCoordinates(w,B){let{x:Q,y:ee,z:le}=this.tileID.canonical,{x:ze,y:Ze,z:ut}=B.canonical,Mt=ua/Math.pow(2,ut-le),Jt=(Ze*a.X+w.anchorY)*Mt,$t=ee*a.X*ua;return{x:Math.floor((ze*a.X+w.anchorX)*Mt-Q*a.X*ua),y:Math.floor(Jt-$t)}}findMatches(w,B,Q){let ee=this.tileID.canonical.zw)}}class Wa{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Fa{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(w){let B=Math.round((w-this.lng)/360);if(B!==0)for(let Q in this.indexes){let ee=this.indexes[Q],le={};for(let ze in ee){let Ze=ee[ze];Ze.tileID=Ze.tileID.unwrapTo(Ze.tileID.wrap+B),le[Ze.tileID.key]=Ze}this.indexes[Q]=le}this.lng=w}addBucket(w,B,Q){if(this.indexes[w.overscaledZ]&&this.indexes[w.overscaledZ][w.key]){if(this.indexes[w.overscaledZ][w.key].bucketInstanceId===B.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(w.overscaledZ,this.indexes[w.overscaledZ][w.key])}for(let le=0;lew.overscaledZ)for(let Ze in ze){let ut=ze[Ze];ut.tileID.isChildOf(w)&&ut.findMatches(B.symbolInstances,w,ee)}else{let Ze=ze[w.scaledTo(Number(le)).key];Ze&&Ze.findMatches(B.symbolInstances,w,ee)}}for(let le=0;le{B[Q]=!0});for(let Q in this.layerIndexes)B[Q]||delete this.layerIndexes[Q]}}let da=(ue,w)=>a.t(ue,w&&w.filter(B=>B.identifier!=="source.canvas")),jn=a.aw();class Ha extends a.E{constructor(w,B={}){super(),this._rtlPluginLoaded=()=>{for(let Q in this.sourceCaches){let ee=this.sourceCaches[Q].getSource().type;ee!=="vector"&&ee!=="geojson"||this.sourceCaches[Q].reload()}},this.map=w,this.dispatcher=new Ee(Se(),w._getMapId()),this.dispatcher.registerMessageHandler("GG",(Q,ee)=>this.getGlyphs(Q,ee)),this.dispatcher.registerMessageHandler("GI",(Q,ee)=>this.getImages(Q,ee)),this.imageManager=new E,this.imageManager.setEventedParent(this),this.glyphManager=new G(w._requestManager,B.localIdeographFontFamily),this.lineAtlas=new oe(256,512),this.crossTileSymbolIndex=new Xo,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new a.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",a.ay()),St().on(Ue,this._rtlPluginLoaded),this.on("data",Q=>{if(Q.dataType!=="source"||Q.sourceDataType!=="metadata")return;let ee=this.sourceCaches[Q.sourceId];if(!ee)return;let le=ee.getSource();if(le&&le.vectorLayerIds)for(let ze in this._layers){let Ze=this._layers[ze];Ze.source===le.id&&this._validateLayer(Ze)}})}loadURL(w,B={},Q){this.fire(new a.k("dataloading",{dataType:"style"})),B.validate=typeof B.validate!="boolean"||B.validate;let ee=this.map._requestManager.transformRequest(w,"Style");this._loadStyleRequest=new AbortController;let le=this._loadStyleRequest;a.h(ee,this._loadStyleRequest).then(ze=>{this._loadStyleRequest=null,this._load(ze.data,B,Q)}).catch(ze=>{this._loadStyleRequest=null,ze&&!le.signal.aborted&&this.fire(new a.j(ze))})}loadJSON(w,B={},Q){this.fire(new a.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,u.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,B.validate=B.validate!==!1,this._load(w,B,Q)}).catch(()=>{})}loadEmpty(){this.fire(new a.k("dataloading",{dataType:"style"})),this._load(jn,{validate:!1})}_load(w,B,Q){var ee;let le=B.transformStyle?B.transformStyle(Q,w):w;if(!B.validate||!da(this,a.u(le))){this._loaded=!0,this.stylesheet=le;for(let ze in le.sources)this.addSource(ze,le.sources[ze],{validate:!1});le.sprite?this._loadSprite(le.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(le.glyphs),this._createLayers(),this.light=new N(this.stylesheet.light),this.sky=new re(this.stylesheet.sky),this.map.setTerrain((ee=this.stylesheet.terrain)!==null&&ee!==void 0?ee:null),this.fire(new a.k("data",{dataType:"style"})),this.fire(new a.k("style.load"))}}_createLayers(){let w=a.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",w),this._order=w.map(B=>B.id),this._layers={},this._serializedLayers=null;for(let B of w){let Q=a.aA(B);Q.setEventedParent(this,{layer:{id:B.id}}),this._layers[B.id]=Q}}_loadSprite(w,B=!1,Q=void 0){let ee;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(le,ze,Ze,ut){return a._(this,void 0,void 0,function*(){let Mt=C(le),Jt=Ze>1?"@2x":"",$t={},mr={};for(let{id:Cr,url:ve}of Mt){let xe=ze.transformRequest(S(ve,Jt,".json"),"SpriteJSON");$t[Cr]=a.h(xe,ut);let Ie=ze.transformRequest(S(ve,Jt,".png"),"SpriteImage");mr[Cr]=p.getImage(Ie,ut)}return yield Promise.all([...Object.values($t),...Object.values(mr)]),function(Cr,ve){return a._(this,void 0,void 0,function*(){let xe={};for(let Ie in Cr){xe[Ie]={};let qe=u.getImageCanvasContext((yield ve[Ie]).data),Qe=(yield Cr[Ie]).data;for(let Xe in Qe){let{width:nt,height:qt,x:jt,y:ar,sdf:fr,pixelRatio:br,stretchX:Fr,stretchY:Hr,content:ri,textFitWidth:Ci,textFitHeight:cn}=Qe[Xe];xe[Ie][Xe]={data:null,pixelRatio:br,sdf:fr,stretchX:Fr,stretchY:Hr,content:ri,textFitWidth:Ci,textFitHeight:cn,spriteData:{width:nt,height:qt,x:jt,y:ar,context:qe}}}}return xe})}($t,mr)})}(w,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(le=>{if(this._spriteRequest=null,le)for(let ze in le){this._spritesImagesIds[ze]=[];let Ze=this._spritesImagesIds[ze]?this._spritesImagesIds[ze].filter(ut=>!(ut in le)):[];for(let ut of Ze)this.imageManager.removeImage(ut),this._changedImages[ut]=!0;for(let ut in le[ze]){let Mt=ze==="default"?ut:`${ze}:${ut}`;this._spritesImagesIds[ze].push(Mt),Mt in this.imageManager.images?this.imageManager.updateImage(Mt,le[ze][ut],!1):this.imageManager.addImage(Mt,le[ze][ut]),B&&(this._changedImages[Mt]=!0)}}}).catch(le=>{this._spriteRequest=null,ee=le,this.fire(new a.j(ee))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),B&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.k("data",{dataType:"style"})),Q&&Q(ee)})}_unloadSprite(){for(let w of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(w),this._changedImages[w]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.k("data",{dataType:"style"}))}_validateLayer(w){let B=this.sourceCaches[w.source];if(!B)return;let Q=w.sourceLayer;if(!Q)return;let ee=B.getSource();(ee.type==="geojson"||ee.vectorLayerIds&&ee.vectorLayerIds.indexOf(Q)===-1)&&this.fire(new a.j(new Error(`Source layer "${Q}" does not exist on source "${ee.id}" as specified by style layer "${w.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let w in this.sourceCaches)if(!this.sourceCaches[w].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(w,B=!1){let Q=this._serializedAllLayers();if(!w||w.length===0)return Object.values(B?a.aB(Q):Q);let ee=[];for(let le of w)if(Q[le]){let ze=B?a.aB(Q[le]):Q[le];ee.push(ze)}return ee}_serializedAllLayers(){let w=this._serializedLayers;if(w)return w;w=this._serializedLayers={};let B=Object.keys(this._layers);for(let Q of B){let ee=this._layers[Q];ee.type!=="custom"&&(w[Q]=ee.serialize())}return w}hasTransitions(){if(this.light&&this.light.hasTransition()||this.sky&&this.sky.hasTransition())return!0;for(let w in this.sourceCaches)if(this.sourceCaches[w].hasTransition())return!0;for(let w in this._layers)if(this._layers[w].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(w){if(!this._loaded)return;let B=this._changed;if(B){let ee=Object.keys(this._updatedLayers),le=Object.keys(this._removedLayers);(ee.length||le.length)&&this._updateWorkerLayers(ee,le);for(let ze in this._updatedSources){let Ze=this._updatedSources[ze];if(Ze==="reload")this._reloadSource(ze);else{if(Ze!=="clear")throw new Error(`Invalid action ${Ze}`);this._clearSource(ze)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let ze in this._updatedPaintProps)this._layers[ze].updateTransitions(w);this.light.updateTransitions(w),this.sky.updateTransitions(w),this._resetUpdates()}let Q={};for(let ee in this.sourceCaches){let le=this.sourceCaches[ee];Q[ee]=le.used,le.used=!1}for(let ee of this._order){let le=this._layers[ee];le.recalculate(w,this._availableImages),!le.isHidden(w.zoom)&&le.source&&(this.sourceCaches[le.source].used=!0)}for(let ee in Q){let le=this.sourceCaches[ee];!!Q[ee]!=!!le.used&&le.fire(new a.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:ee}))}this.light.recalculate(w),this.sky.recalculate(w),this.z=w.zoom,B&&this.fire(new a.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){let w=Object.keys(this._changedImages);if(w.length){for(let B in this.sourceCaches)this.sourceCaches[B].reloadTilesForDependencies(["icons","patterns"],w);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let w in this.sourceCaches)this.sourceCaches[w].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(w,B){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(w,!1),removedIds:B})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(w,B={}){var Q;this._checkLoaded();let ee=this.serialize();if(w=B.transformStyle?B.transformStyle(ee,w):w,((Q=B.validate)===null||Q===void 0||Q)&&da(this,a.u(w)))return!1;(w=a.aB(w)).layers=a.az(w.layers);let le=a.aC(ee,w),ze=this._getOperationsToPerform(le);if(ze.unimplemented.length>0)throw new Error(`Unimplemented: ${ze.unimplemented.join(", ")}.`);if(ze.operations.length===0)return!1;for(let Ze of ze.operations)Ze();return this.stylesheet=w,this._serializedLayers=null,!0}_getOperationsToPerform(w){let B=[],Q=[];for(let ee of w)switch(ee.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":B.push(()=>this.addLayer.apply(this,ee.args));break;case"removeLayer":B.push(()=>this.removeLayer.apply(this,ee.args));break;case"setPaintProperty":B.push(()=>this.setPaintProperty.apply(this,ee.args));break;case"setLayoutProperty":B.push(()=>this.setLayoutProperty.apply(this,ee.args));break;case"setFilter":B.push(()=>this.setFilter.apply(this,ee.args));break;case"addSource":B.push(()=>this.addSource.apply(this,ee.args));break;case"removeSource":B.push(()=>this.removeSource.apply(this,ee.args));break;case"setLayerZoomRange":B.push(()=>this.setLayerZoomRange.apply(this,ee.args));break;case"setLight":B.push(()=>this.setLight.apply(this,ee.args));break;case"setGeoJSONSourceData":B.push(()=>this.setGeoJSONSourceData.apply(this,ee.args));break;case"setGlyphs":B.push(()=>this.setGlyphs.apply(this,ee.args));break;case"setSprite":B.push(()=>this.setSprite.apply(this,ee.args));break;case"setSky":B.push(()=>this.setSky.apply(this,ee.args));break;case"setTerrain":B.push(()=>this.map.setTerrain.apply(this,ee.args));break;case"setTransition":B.push(()=>{});break;default:Q.push(ee.command)}return{operations:B,unimplemented:Q}}addImage(w,B){if(this.getImage(w))return this.fire(new a.j(new Error(`An image named "${w}" already exists.`)));this.imageManager.addImage(w,B),this._afterImageUpdated(w)}updateImage(w,B){this.imageManager.updateImage(w,B)}getImage(w){return this.imageManager.getImage(w)}removeImage(w){if(!this.getImage(w))return this.fire(new a.j(new Error(`An image named "${w}" does not exist.`)));this.imageManager.removeImage(w),this._afterImageUpdated(w)}_afterImageUpdated(w){this._availableImages=this.imageManager.listImages(),this._changedImages[w]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(w,B,Q={}){if(this._checkLoaded(),this.sourceCaches[w]!==void 0)throw new Error(`Source "${w}" already exists.`);if(!B.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(B).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(B.type)>=0&&this._validate(a.u.source,`sources.${w}`,B,null,Q))return;this.map&&this.map._collectResourceTiming&&(B.collectResourceTiming=!0);let ee=this.sourceCaches[w]=new pt(w,B,this.dispatcher);ee.style=this,ee.setEventedParent(this,()=>({isSourceLoaded:ee.loaded(),source:ee.serialize(),sourceId:w})),ee.onAdd(this.map),this._changed=!0}removeSource(w){if(this._checkLoaded(),this.sourceCaches[w]===void 0)throw new Error("There is no source with this ID");for(let Q in this._layers)if(this._layers[Q].source===w)return this.fire(new a.j(new Error(`Source "${w}" cannot be removed while layer "${Q}" is using it.`)));let B=this.sourceCaches[w];delete this.sourceCaches[w],delete this._updatedSources[w],B.fire(new a.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:w})),B.setEventedParent(null),B.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(w,B){if(this._checkLoaded(),this.sourceCaches[w]===void 0)throw new Error(`There is no source with this ID=${w}`);let Q=this.sourceCaches[w].getSource();if(Q.type!=="geojson")throw new Error(`geojsonSource.type is ${Q.type}, which is !== 'geojson`);Q.setData(B),this._changed=!0}getSource(w){return this.sourceCaches[w]&&this.sourceCaches[w].getSource()}addLayer(w,B,Q={}){this._checkLoaded();let ee=w.id;if(this.getLayer(ee))return void this.fire(new a.j(new Error(`Layer "${ee}" already exists on this map.`)));let le;if(w.type==="custom"){if(da(this,a.aD(w)))return;le=a.aA(w)}else{if("source"in w&&typeof w.source=="object"&&(this.addSource(ee,w.source),w=a.aB(w),w=a.e(w,{source:ee})),this._validate(a.u.layer,`layers.${ee}`,w,{arrayIndex:-1},Q))return;le=a.aA(w),this._validateLayer(le),le.setEventedParent(this,{layer:{id:ee}})}let ze=B?this._order.indexOf(B):this._order.length;if(B&&ze===-1)this.fire(new a.j(new Error(`Cannot add layer "${ee}" before non-existing layer "${B}".`)));else{if(this._order.splice(ze,0,ee),this._layerOrderChanged=!0,this._layers[ee]=le,this._removedLayers[ee]&&le.source&&le.type!=="custom"){let Ze=this._removedLayers[ee];delete this._removedLayers[ee],Ze.type!==le.type?this._updatedSources[le.source]="clear":(this._updatedSources[le.source]="reload",this.sourceCaches[le.source].pause())}this._updateLayer(le),le.onAdd&&le.onAdd(this.map)}}moveLayer(w,B){if(this._checkLoaded(),this._changed=!0,!this._layers[w])return void this.fire(new a.j(new Error(`The layer '${w}' does not exist in the map's style and cannot be moved.`)));if(w===B)return;let Q=this._order.indexOf(w);this._order.splice(Q,1);let ee=B?this._order.indexOf(B):this._order.length;B&&ee===-1?this.fire(new a.j(new Error(`Cannot move layer "${w}" before non-existing layer "${B}".`))):(this._order.splice(ee,0,w),this._layerOrderChanged=!0)}removeLayer(w){this._checkLoaded();let B=this._layers[w];if(!B)return void this.fire(new a.j(new Error(`Cannot remove non-existing layer "${w}".`)));B.setEventedParent(null);let Q=this._order.indexOf(w);this._order.splice(Q,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[w]=B,delete this._layers[w],this._serializedLayers&&delete this._serializedLayers[w],delete this._updatedLayers[w],delete this._updatedPaintProps[w],B.onRemove&&B.onRemove(this.map)}getLayer(w){return this._layers[w]}getLayersOrder(){return[...this._order]}hasLayer(w){return w in this._layers}setLayerZoomRange(w,B,Q){this._checkLoaded();let ee=this.getLayer(w);ee?ee.minzoom===B&&ee.maxzoom===Q||(B!=null&&(ee.minzoom=B),Q!=null&&(ee.maxzoom=Q),this._updateLayer(ee)):this.fire(new a.j(new Error(`Cannot set the zoom range of non-existing layer "${w}".`)))}setFilter(w,B,Q={}){this._checkLoaded();let ee=this.getLayer(w);if(ee){if(!a.aE(ee.filter,B))return B==null?(ee.filter=void 0,void this._updateLayer(ee)):void(this._validate(a.u.filter,`layers.${ee.id}.filter`,B,null,Q)||(ee.filter=a.aB(B),this._updateLayer(ee)))}else this.fire(new a.j(new Error(`Cannot filter non-existing layer "${w}".`)))}getFilter(w){return a.aB(this.getLayer(w).filter)}setLayoutProperty(w,B,Q,ee={}){this._checkLoaded();let le=this.getLayer(w);le?a.aE(le.getLayoutProperty(B),Q)||(le.setLayoutProperty(B,Q,ee),this._updateLayer(le)):this.fire(new a.j(new Error(`Cannot style non-existing layer "${w}".`)))}getLayoutProperty(w,B){let Q=this.getLayer(w);if(Q)return Q.getLayoutProperty(B);this.fire(new a.j(new Error(`Cannot get style of non-existing layer "${w}".`)))}setPaintProperty(w,B,Q,ee={}){this._checkLoaded();let le=this.getLayer(w);le?a.aE(le.getPaintProperty(B),Q)||(le.setPaintProperty(B,Q,ee)&&this._updateLayer(le),this._changed=!0,this._updatedPaintProps[w]=!0,this._serializedLayers=null):this.fire(new a.j(new Error(`Cannot style non-existing layer "${w}".`)))}getPaintProperty(w,B){return this.getLayer(w).getPaintProperty(B)}setFeatureState(w,B){this._checkLoaded();let Q=w.source,ee=w.sourceLayer,le=this.sourceCaches[Q];if(le===void 0)return void this.fire(new a.j(new Error(`The source '${Q}' does not exist in the map's style.`)));let ze=le.getSource().type;ze==="geojson"&&ee?this.fire(new a.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):ze!=="vector"||ee?(w.id===void 0&&this.fire(new a.j(new Error("The feature id parameter must be provided."))),le.setFeatureState(ee,w.id,B)):this.fire(new a.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(w,B){this._checkLoaded();let Q=w.source,ee=this.sourceCaches[Q];if(ee===void 0)return void this.fire(new a.j(new Error(`The source '${Q}' does not exist in the map's style.`)));let le=ee.getSource().type,ze=le==="vector"?w.sourceLayer:void 0;le!=="vector"||ze?B&&typeof w.id!="string"&&typeof w.id!="number"?this.fire(new a.j(new Error("A feature id is required to remove its specific state property."))):ee.removeFeatureState(ze,w.id,B):this.fire(new a.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(w){this._checkLoaded();let B=w.source,Q=w.sourceLayer,ee=this.sourceCaches[B];if(ee!==void 0)return ee.getSource().type!=="vector"||Q?(w.id===void 0&&this.fire(new a.j(new Error("The feature id parameter must be provided."))),ee.getFeatureState(Q,w.id)):void this.fire(new a.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new a.j(new Error(`The source '${B}' does not exist in the map's style.`)))}getTransition(){return a.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;let w=a.aF(this.sourceCaches,le=>le.serialize()),B=this._serializeByIds(this._order,!0),Q=this.map.getTerrain()||void 0,ee=this.stylesheet;return a.aG({version:ee.version,name:ee.name,metadata:ee.metadata,light:ee.light,sky:ee.sky,center:ee.center,zoom:ee.zoom,bearing:ee.bearing,pitch:ee.pitch,sprite:ee.sprite,glyphs:ee.glyphs,transition:ee.transition,sources:w,layers:B,terrain:Q},le=>le!==void 0)}_updateLayer(w){this._updatedLayers[w.id]=!0,w.source&&!this._updatedSources[w.source]&&this.sourceCaches[w.source].getSource().type!=="raster"&&(this._updatedSources[w.source]="reload",this.sourceCaches[w.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(w){let B=ze=>this._layers[ze].type==="fill-extrusion",Q={},ee=[];for(let ze=this._order.length-1;ze>=0;ze--){let Ze=this._order[ze];if(B(Ze)){Q[Ze]=ze;for(let ut of w){let Mt=ut[Ze];if(Mt)for(let Jt of Mt)ee.push(Jt)}}}ee.sort((ze,Ze)=>Ze.intersectionZ-ze.intersectionZ);let le=[];for(let ze=this._order.length-1;ze>=0;ze--){let Ze=this._order[ze];if(B(Ze))for(let ut=ee.length-1;ut>=0;ut--){let Mt=ee[ut].feature;if(Q[Mt.layer.id]{let fr=qe.featureSortOrder;if(fr){let br=fr.indexOf(jt.featureIndex);return fr.indexOf(ar.featureIndex)-br}return ar.featureIndex-jt.featureIndex});for(let jt of qt)nt.push(jt)}}for(let qe in ve)ve[qe].forEach(Qe=>{let Xe=Qe.feature,nt=Mt[Ze[qe].source].getFeatureState(Xe.layer["source-layer"],Xe.id);Xe.source=Xe.layer.source,Xe.layer["source-layer"]&&(Xe.sourceLayer=Xe.layer["source-layer"]),Xe.state=nt});return ve}(this._layers,ze,this.sourceCaches,w,B,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(le)}querySourceFeatures(w,B){B&&B.filter&&this._validate(a.u.filter,"querySourceFeatures.filter",B.filter,null,B);let Q=this.sourceCaches[w];return Q?function(ee,le){let ze=ee.getRenderableIds().map(Mt=>ee.getTileByID(Mt)),Ze=[],ut={};for(let Mt=0;Mtmr.getTileByID(Cr)).sort((Cr,ve)=>ve.tileID.overscaledZ-Cr.tileID.overscaledZ||(Cr.tileID.isLessThan(ve.tileID)?-1:1))}let $t=this.crossTileSymbolIndex.addLayer(Jt,ut[Jt.source],w.center.lng);ze=ze||$t}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((le=le||this._layerOrderChanged||Q===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(u.now(),w.zoom))&&(this.pauseablePlacement=new Ba(w,this.map.terrain,this._order,le,B,Q,ee,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,ut),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(u.now()),Ze=!0),ze&&this.pauseablePlacement.placement.setStale()),Ze||ze)for(let Mt of this._order){let Jt=this._layers[Mt];Jt.type==="symbol"&&this.placement.updateLayerOpacities(Jt,ut[Jt.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(u.now())}_releaseSymbolFadeTiles(){for(let w in this.sourceCaches)this.sourceCaches[w].releaseSymbolFadeTiles()}getImages(w,B){return a._(this,void 0,void 0,function*(){let Q=yield this.imageManager.getImages(B.icons);this._updateTilesForChangedImages();let ee=this.sourceCaches[B.source];return ee&&ee.setDependencies(B.tileID.key,B.type,B.icons),Q})}getGlyphs(w,B){return a._(this,void 0,void 0,function*(){let Q=yield this.glyphManager.getGlyphs(B.stacks),ee=this.sourceCaches[B.source];return ee&&ee.setDependencies(B.tileID.key,B.type,[""]),Q})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(w,B={}){this._checkLoaded(),w&&this._validate(a.u.glyphs,"glyphs",w,null,B)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=w,this.glyphManager.entries={},this.glyphManager.setURL(w))}addSprite(w,B,Q={},ee){this._checkLoaded();let le=[{id:w,url:B}],ze=[...C(this.stylesheet.sprite),...le];this._validate(a.u.sprite,"sprite",ze,null,Q)||(this.stylesheet.sprite=ze,this._loadSprite(le,!0,ee))}removeSprite(w){this._checkLoaded();let B=C(this.stylesheet.sprite);if(B.find(Q=>Q.id===w)){if(this._spritesImagesIds[w])for(let Q of this._spritesImagesIds[w])this.imageManager.removeImage(Q),this._changedImages[Q]=!0;B.splice(B.findIndex(Q=>Q.id===w),1),this.stylesheet.sprite=B.length>0?B:void 0,delete this._spritesImagesIds[w],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new a.k("data",{dataType:"style"}))}else this.fire(new a.j(new Error(`Sprite "${w}" doesn't exists on this map.`)))}getSprite(){return C(this.stylesheet.sprite)}setSprite(w,B={},Q){this._checkLoaded(),w&&this._validate(a.u.sprite,"sprite",w,null,B)||(this.stylesheet.sprite=w,w?this._loadSprite(w,!0,Q):(this._unloadSprite(),Q&&Q(null)))}}var vo=a.Y([{name:"a_pos",type:"Int16",components:2}]);let Gn={prelude:Ct(`#ifdef GL_ES precision mediump float; #else #if !defined(lowp) @@ -3280,15 +3280,15 @@ vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=frac #else return 0.0; #endif -}`),background:Mt(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity; +}`),background:Ct(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:Mt(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity; +}`,"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:Ct(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,"uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:Mt(`varying vec3 v_data;varying float v_visibility; +}`,"uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:Ct(`varying vec3 v_data;varying float v_visibility; #pragma mapbox: define highp vec4 color #pragma mapbox: define mediump float radius #pragma mapbox: define lowp float blur @@ -3324,7 +3324,7 @@ void main(void) { #pragma mapbox: initialize highp vec4 stroke_color #pragma mapbox: initialize mediump float stroke_width #pragma mapbox: initialize lowp float stroke_opacity -vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:Mt("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:Mt(`uniform highp float u_intensity;varying vec2 v_extrude; +vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:Ct("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:Ct(`uniform highp float u_intensity;varying vec2 v_extrude; #pragma mapbox: define highp float weight #define GAUSS_COEF 0.3989422804014327 void main() { @@ -3341,11 +3341,11 @@ const highp float ZERO=1.0/255.0/16.0; void main(void) { #pragma mapbox: initialize highp float weight #pragma mapbox: initialize mediump float radius -vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,get_elevation(floor(a_pos*0.5)),1);gl_Position=u_matrix*pos;}`),heatmapTexture:Mt(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity; +vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,get_elevation(floor(a_pos*0.5)),1);gl_Position=u_matrix*pos;}`),heatmapTexture:Ct(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(0.0); #endif -}`,"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:Mt("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_anchor_pos;attribute vec2 a_placed;attribute vec2 a_box_real;uniform mat4 u_matrix;uniform vec2 u_pixel_extrude_scale;varying float v_placed;varying float v_notUsed;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:Mt("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:Mt("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}"),fill:Mt(`#pragma mapbox: define highp vec4 color +}`,"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:Ct("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_anchor_pos;attribute vec2 a_placed;attribute vec2 a_box_real;uniform mat4 u_matrix;uniform vec2 u_pixel_extrude_scale;varying float v_placed;varying float v_notUsed;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:Ct("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:Ct("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}"),fill:Ct(`#pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color @@ -3360,7 +3360,7 @@ gl_FragColor=vec4(1.0); void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float opacity -gl_Position=u_matrix*vec4(a_pos,0,1);}`),fillOutline:Mt(`varying vec2 v_pos; +gl_Position=u_matrix*vec4(a_pos,0,1);}`),fillOutline:Ct(`varying vec2 v_pos; #pragma mapbox: define highp vec4 outline_color #pragma mapbox: define lowp float opacity void main() { @@ -3376,7 +3376,7 @@ gl_FragColor=vec4(1.0); void main() { #pragma mapbox: initialize highp vec4 outline_color #pragma mapbox: initialize lowp float opacity -gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillOutlinePattern:Mt(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; +gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillOutlinePattern:Ct(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to @@ -3400,7 +3400,7 @@ void main() { #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillPattern:Mt(`#ifdef GL_ES +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillPattern:Ct(`#ifdef GL_ES precision highp float; #endif uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b; @@ -3427,7 +3427,7 @@ void main() { #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:Mt(`varying vec4 v_color;void main() {gl_FragColor=v_color; +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:Ct(`varying vec4 v_color;void main() {gl_FragColor=v_color; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif @@ -3449,7 +3449,7 @@ float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_off #else float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; #endif -base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),fillExtrusionPattern:Mt(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; +base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),fillExtrusionPattern:Ct(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern_from @@ -3493,20 +3493,20 @@ float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; #endif base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 ? a_pos -: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:Mt(`#ifdef GL_ES +: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:Ct(`#ifdef GL_ES precision highp float; #endif uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:Mt(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; +}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:Ct(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; #define PI 3.141592653589793 void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),line:Mt(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; +}`,"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),line:Ct(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity @@ -3540,7 +3540,7 @@ v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif -v_width2=vec2(outset,inset);}`),lineGradient:Mt(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv; +v_width2=vec2(outset,inset);}`),lineGradient:Ct(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { @@ -3570,7 +3570,7 @@ v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif -v_width2=vec2(outset,inset);}`),linePattern:Mt(`#ifdef GL_ES +v_width2=vec2(outset,inset);}`),linePattern:Ct(`#ifdef GL_ES precision highp float; #endif uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; @@ -3622,7 +3622,7 @@ v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif -v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:Mt(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; +v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:Ct(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity @@ -3663,11 +3663,11 @@ v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif -v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),raster:Mt(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); +v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),raster:Ct(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),symbolIcon:Mt(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; +}`,"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),symbolIcon:Ct(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity @@ -3681,7 +3681,7 @@ void main() { #pragma mapbox: initialize lowp float opacity vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : -u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:Mt(`#define SDF_PX 8.0 +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:Ct(`#define SDF_PX 8.0 uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color @@ -3712,7 +3712,7 @@ void main() { #pragma mapbox: initialize lowp float halo_blur vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : -u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:Mt(`#define SDF_PX 8.0 +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:Ct(`#define SDF_PX 8.0 #define SDF 1.0 #define ICON 0.0 uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1; @@ -3749,83 +3749,83 @@ void main() { #pragma mapbox: initialize lowp float halo_blur vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : -u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:Mt("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;varying vec2 v_texture_pos;varying float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture2D(u_texture,v_texture_pos);if (v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);gl_FragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {gl_FragColor=surface_color;}}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform mat4 u_fog_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:Mt("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:Mt("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);}"),sky:Mt("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform float u_horizon;uniform float u_sky_horizon_blend;void main() {float y=gl_FragCoord.y;if (y > u_horizon) {float blend=y-u_horizon;if (blend < u_sky_horizon_blend) {gl_FragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {gl_FragColor=u_sky_color;}}}","attribute vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function Mt(ue,w){let B=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,Q=w.match(/attribute ([\w]+) ([\w]+)/g),ee=ue.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),le=w.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Oe=le?le.concat(ee):ee,Ze={};return{fragmentSource:ue=ue.replace(B,(st,Tt,Yt,Kt,xr)=>(Ze[xr]=!0,Tt==="define"?` -#ifndef HAS_UNIFORM_u_${xr} -varying ${Yt} ${Kt} ${xr}; +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:Ct("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;varying vec2 v_texture_pos;varying float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture2D(u_texture,v_texture_pos);if (v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);gl_FragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {gl_FragColor=surface_color;}}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform mat4 u_fog_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:Ct("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:Ct("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);}"),sky:Ct("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform float u_horizon;uniform float u_sky_horizon_blend;void main() {float y=gl_FragCoord.y;if (y > u_horizon) {float blend=y-u_horizon;if (blend < u_sky_horizon_blend) {gl_FragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {gl_FragColor=u_sky_color;}}}","attribute vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function Ct(ue,w){let B=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,Q=w.match(/attribute ([\w]+) ([\w]+)/g),ee=ue.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),le=w.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),ze=le?le.concat(ee):ee,Ze={};return{fragmentSource:ue=ue.replace(B,(ut,Mt,Jt,$t,mr)=>(Ze[mr]=!0,Mt==="define"?` +#ifndef HAS_UNIFORM_u_${mr} +varying ${Jt} ${$t} ${mr}; #else -uniform ${Yt} ${Kt} u_${xr}; +uniform ${Jt} ${$t} u_${mr}; #endif `:` -#ifdef HAS_UNIFORM_u_${xr} - ${Yt} ${Kt} ${xr} = u_${xr}; -#endif -`)),vertexSource:w=w.replace(B,(st,Tt,Yt,Kt,xr)=>{let Ir=Kt==="float"?"vec2":"vec4",ve=xr.match(/color/)?"color":Ir;return Ze[xr]?Tt==="define"?` -#ifndef HAS_UNIFORM_u_${xr} -uniform lowp float u_${xr}_t; -attribute ${Yt} ${Ir} a_${xr}; -varying ${Yt} ${Kt} ${xr}; +#ifdef HAS_UNIFORM_u_${mr} + ${Jt} ${$t} ${mr} = u_${mr}; +#endif +`)),vertexSource:w=w.replace(B,(ut,Mt,Jt,$t,mr)=>{let Cr=$t==="float"?"vec2":"vec4",ve=mr.match(/color/)?"color":Cr;return Ze[mr]?Mt==="define"?` +#ifndef HAS_UNIFORM_u_${mr} +uniform lowp float u_${mr}_t; +attribute ${Jt} ${Cr} a_${mr}; +varying ${Jt} ${$t} ${mr}; #else -uniform ${Yt} ${Kt} u_${xr}; +uniform ${Jt} ${$t} u_${mr}; #endif `:ve==="vec4"?` -#ifndef HAS_UNIFORM_u_${xr} - ${xr} = a_${xr}; +#ifndef HAS_UNIFORM_u_${mr} + ${mr} = a_${mr}; #else - ${Yt} ${Kt} ${xr} = u_${xr}; + ${Jt} ${$t} ${mr} = u_${mr}; #endif `:` -#ifndef HAS_UNIFORM_u_${xr} - ${xr} = unpack_mix_${ve}(a_${xr}, u_${xr}_t); +#ifndef HAS_UNIFORM_u_${mr} + ${mr} = unpack_mix_${ve}(a_${mr}, u_${mr}_t); #else - ${Yt} ${Kt} ${xr} = u_${xr}; + ${Jt} ${$t} ${mr} = u_${mr}; #endif -`:Tt==="define"?` -#ifndef HAS_UNIFORM_u_${xr} -uniform lowp float u_${xr}_t; -attribute ${Yt} ${Ir} a_${xr}; +`:Mt==="define"?` +#ifndef HAS_UNIFORM_u_${mr} +uniform lowp float u_${mr}_t; +attribute ${Jt} ${Cr} a_${mr}; #else -uniform ${Yt} ${Kt} u_${xr}; +uniform ${Jt} ${$t} u_${mr}; #endif `:ve==="vec4"?` -#ifndef HAS_UNIFORM_u_${xr} - ${Yt} ${Kt} ${xr} = a_${xr}; +#ifndef HAS_UNIFORM_u_${mr} + ${Jt} ${$t} ${mr} = a_${mr}; #else - ${Yt} ${Kt} ${xr} = u_${xr}; + ${Jt} ${$t} ${mr} = u_${mr}; #endif `:` -#ifndef HAS_UNIFORM_u_${xr} - ${Yt} ${Kt} ${xr} = unpack_mix_${ve}(a_${xr}, u_${xr}_t); +#ifndef HAS_UNIFORM_u_${mr} + ${Jt} ${$t} ${mr} = unpack_mix_${ve}(a_${mr}, u_${mr}_t); #else - ${Yt} ${Kt} ${xr} = u_${xr}; + ${Jt} ${$t} ${mr} = u_${mr}; #endif -`}),staticAttributes:Q,staticUniforms:Oe}}class kr{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(w,B,Q,ee,le,Oe,Ze,st,Tt){this.context=w;let Yt=this.boundPaintVertexBuffers.length!==ee.length;for(let Kt=0;!Yt&&Kt({u_matrix:ue,u_texture:0,u_ele_delta:w,u_fog_matrix:B,u_fog_color:Q?Q.properties.get("fog-color"):a.aM.white,u_fog_ground_blend:Q?Q.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:Q?Q.calculateFogBlendOpacity(ee):0,u_horizon_color:Q?Q.properties.get("horizon-color"):a.aM.white,u_horizon_fog_blend:Q?Q.properties.get("horizon-fog-blend"):1});function vi(ue){let w=[];for(let B=0;B({u_depth:new a.aH(Ht,tr.u_depth),u_terrain:new a.aH(Ht,tr.u_terrain),u_terrain_dim:new a.aI(Ht,tr.u_terrain_dim),u_terrain_matrix:new a.aJ(Ht,tr.u_terrain_matrix),u_terrain_unpack:new a.aK(Ht,tr.u_terrain_unpack),u_terrain_exaggeration:new a.aI(Ht,tr.u_terrain_exaggeration)}))(w,Ft),this.binderUniforms=Q?Q.getUniforms(w,Ft):[]}draw(w,B,Q,ee,le,Oe,Ze,st,Tt,Yt,Kt,xr,Ir,ve,be,Re,qe,et){let Xe=w.gl;if(this.failedToCreate)return;if(w.program.set(this.program),w.setDepthMode(Q),w.setStencilMode(ee),w.setColorMode(le),w.setCullFace(Oe),st){w.activeTexture.set(Xe.TEXTURE2),Xe.bindTexture(Xe.TEXTURE_2D,st.depthTexture),w.activeTexture.set(Xe.TEXTURE3),Xe.bindTexture(Xe.TEXTURE_2D,st.texture);for(let Ft in this.terrainUniforms)this.terrainUniforms[Ft].set(st[Ft])}for(let Ft in this.fixedUniforms)this.fixedUniforms[Ft].set(Ze[Ft]);be&&be.setUniforms(w,this.binderUniforms,Ir,{zoom:ve});let it=0;switch(B){case Xe.LINES:it=2;break;case Xe.TRIANGLES:it=3;break;case Xe.LINE_STRIP:it=1}for(let Ft of xr.get()){let Ht=Ft.vaos||(Ft.vaos={});(Ht[Tt]||(Ht[Tt]=new kr)).bind(w,this,Yt,be?be.getPaintVertexBuffers():[],Kt,Ft.vertexOffset,Re,qe,et),Xe.drawElements(B,Ft.primitiveLength*it,Xe.UNSIGNED_SHORT,Ft.primitiveOffset*it*2)}}}function An(ue,w,B){let Q=1/In(B,1,w.transform.tileZoom),ee=Math.pow(2,B.tileID.overscaledZ),le=B.tileSize*Math.pow(2,w.transform.tileZoom)/ee,Oe=le*(B.tileID.canonical.x+B.tileID.wrap*ee),Ze=le*B.tileID.canonical.y;return{u_image:0,u_texsize:B.imageAtlasTexture.size,u_scale:[Q,ue.fromScale,ue.toScale],u_fade:ue.t,u_pixel_coord_upper:[Oe>>16,Ze>>16],u_pixel_coord_lower:[65535&Oe,65535&Ze]}}let Mn=(ue,w,B,Q)=>{let ee=w.style.light,le=ee.properties.get("position"),Oe=[le.x,le.y,le.z],Ze=function(){var Tt=new a.A(9);return a.A!=Float32Array&&(Tt[1]=0,Tt[2]=0,Tt[3]=0,Tt[5]=0,Tt[6]=0,Tt[7]=0),Tt[0]=1,Tt[4]=1,Tt[8]=1,Tt}();ee.properties.get("anchor")==="viewport"&&function(Tt,Yt){var Kt=Math.sin(Yt),xr=Math.cos(Yt);Tt[0]=xr,Tt[1]=Kt,Tt[2]=0,Tt[3]=-Kt,Tt[4]=xr,Tt[5]=0,Tt[6]=0,Tt[7]=0,Tt[8]=1}(Ze,-w.transform.angle),function(Tt,Yt,Kt){var xr=Yt[0],Ir=Yt[1],ve=Yt[2];Tt[0]=xr*Kt[0]+Ir*Kt[3]+ve*Kt[6],Tt[1]=xr*Kt[1]+Ir*Kt[4]+ve*Kt[7],Tt[2]=xr*Kt[2]+Ir*Kt[5]+ve*Kt[8]}(Oe,Oe,Ze);let st=ee.properties.get("color");return{u_matrix:ue,u_lightpos:Oe,u_lightintensity:ee.properties.get("intensity"),u_lightcolor:[st.r,st.g,st.b],u_vertical_gradient:+B,u_opacity:Q}},Li=(ue,w,B,Q,ee,le,Oe)=>a.e(Mn(ue,w,B,Q),An(le,w,Oe),{u_height_factor:-Math.pow(2,ee.overscaledZ)/Oe.tileSize/8}),_n=ue=>({u_matrix:ue}),ya=(ue,w,B,Q)=>a.e(_n(ue),An(B,w,Q)),$n=(ue,w)=>({u_matrix:ue,u_world:w}),Ma=(ue,w,B,Q,ee)=>a.e(ya(ue,w,B,Q),{u_world:ee}),_o=(ue,w,B,Q)=>{let ee=ue.transform,le,Oe;if(Q.paint.get("circle-pitch-alignment")==="map"){let Ze=In(B,1,ee.zoom);le=!0,Oe=[Ze,Ze]}else le=!1,Oe=ee.pixelsToGLUnits;return{u_camera_to_center_distance:ee.cameraToCenterDistance,u_scale_with_map:+(Q.paint.get("circle-pitch-scale")==="map"),u_matrix:ue.translatePosMatrix(w.posMatrix,B,Q.paint.get("circle-translate"),Q.paint.get("circle-translate-anchor")),u_pitch_with_map:+le,u_device_pixel_ratio:ue.pixelRatio,u_extrude_scale:Oe}},No=(ue,w,B)=>({u_matrix:ue,u_inv_matrix:w,u_camera_to_center_distance:B.cameraToCenterDistance,u_viewport_size:[B.width,B.height]}),po=(ue,w,B=1)=>({u_matrix:ue,u_color:w,u_overlay:0,u_overlay_scale:B}),Lo=ue=>({u_matrix:ue}),ko=(ue,w,B,Q)=>({u_matrix:ue,u_extrude_scale:In(w,1,B),u_intensity:Q}),Ds=(ue,w,B,Q)=>{let ee=a.H();a.aP(ee,0,ue.width,ue.height,0,0,1);let le=ue.context.gl;return{u_matrix:ee,u_world:[le.drawingBufferWidth,le.drawingBufferHeight],u_image:B,u_color_ramp:Q,u_opacity:w.paint.get("heatmap-opacity")}};function Fs(ue,w){let B=Math.pow(2,w.canonical.z),Q=w.canonical.y;return[new a.Z(0,Q/B).toLngLat().lat,new a.Z(0,(Q+1)/B).toLngLat().lat]}let ll=(ue,w,B,Q)=>{let ee=ue.transform;return{u_matrix:As(ue,w,B,Q),u_ratio:1/In(w,1,ee.zoom),u_device_pixel_ratio:ue.pixelRatio,u_units_to_pixels:[1/ee.pixelsToGLUnits[0],1/ee.pixelsToGLUnits[1]]}},ul=(ue,w,B,Q,ee)=>a.e(ll(ue,w,B,ee),{u_image:0,u_image_height:Q}),zl=(ue,w,B,Q,ee)=>{let le=ue.transform,Oe=il(w,le);return{u_matrix:As(ue,w,B,ee),u_texsize:w.imageAtlasTexture.size,u_ratio:1/In(w,1,le.zoom),u_device_pixel_ratio:ue.pixelRatio,u_image:0,u_scale:[Oe,Q.fromScale,Q.toScale],u_fade:Q.t,u_units_to_pixels:[1/le.pixelsToGLUnits[0],1/le.pixelsToGLUnits[1]]}},us=(ue,w,B,Q,ee,le)=>{let Oe=ue.lineAtlas,Ze=il(w,ue.transform),st=B.layout.get("line-cap")==="round",Tt=Oe.getDash(Q.from,st),Yt=Oe.getDash(Q.to,st),Kt=Tt.width*ee.fromScale,xr=Yt.width*ee.toScale;return a.e(ll(ue,w,B,le),{u_patternscale_a:[Ze/Kt,-Tt.height/2],u_patternscale_b:[Ze/xr,-Yt.height/2],u_sdfgamma:Oe.width/(256*Math.min(Kt,xr)*ue.pixelRatio)/2,u_image:0,u_tex_y_a:Tt.y,u_tex_y_b:Yt.y,u_mix:ee.t})};function il(ue,w){return 1/In(ue,1,w.tileZoom)}function As(ue,w,B,Q){return ue.translatePosMatrix(Q?Q.posMatrix:w.tileID.posMatrix,w,B.paint.get("line-translate"),B.paint.get("line-translate-anchor"))}let cl=(ue,w,B,Q,ee)=>{return{u_matrix:ue,u_tl_parent:w,u_scale_parent:B,u_buffer_scale:1,u_fade_t:Q.mix,u_opacity:Q.opacity*ee.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:ee.paint.get("raster-brightness-min"),u_brightness_high:ee.paint.get("raster-brightness-max"),u_saturation_factor:(Oe=ee.paint.get("raster-saturation"),Oe>0?1-1/(1.001-Oe):-Oe),u_contrast_factor:(le=ee.paint.get("raster-contrast"),le>0?1/(1-le):1+le),u_spin_weights:Ks(ee.paint.get("raster-hue-rotate"))};var le,Oe};function Ks(ue){ue*=Math.PI/180;let w=Math.sin(ue),B=Math.cos(ue);return[(2*B+1)/3,(-Math.sqrt(3)*w-B+1)/3,(Math.sqrt(3)*w-B+1)/3]}let zs=(ue,w,B,Q,ee,le,Oe,Ze,st,Tt,Yt,Kt,xr,Ir)=>{let ve=Oe.transform;return{u_is_size_zoom_constant:+(ue==="constant"||ue==="source"),u_is_size_feature_constant:+(ue==="constant"||ue==="camera"),u_size_t:w?w.uSizeT:0,u_size:w?w.uSize:0,u_camera_to_center_distance:ve.cameraToCenterDistance,u_pitch:ve.pitch/360*2*Math.PI,u_rotate_symbol:+B,u_aspect_ratio:ve.width/ve.height,u_fade_change:Oe.options.fadeDuration?Oe.symbolFadeChange:1,u_matrix:Ze,u_label_plane_matrix:st,u_coord_matrix:Tt,u_is_text:+Kt,u_pitch_with_map:+Q,u_is_along_line:ee,u_is_variable_anchor:le,u_texsize:xr,u_texture:0,u_translation:Yt,u_pitched_scale:Ir}},Io=(ue,w,B,Q,ee,le,Oe,Ze,st,Tt,Yt,Kt,xr,Ir,ve)=>{let be=Oe.transform;return a.e(zs(ue,w,B,Q,ee,le,Oe,Ze,st,Tt,Yt,Kt,xr,ve),{u_gamma_scale:Q?Math.cos(be._pitch)*be.cameraToCenterDistance:1,u_device_pixel_ratio:Oe.pixelRatio,u_is_halo:+Ir})},ls=(ue,w,B,Q,ee,le,Oe,Ze,st,Tt,Yt,Kt,xr,Ir)=>a.e(Io(ue,w,B,Q,ee,le,Oe,Ze,st,Tt,Yt,!0,Kt,!0,Ir),{u_texsize_icon:xr,u_texture_icon:1}),Yl=(ue,w,B)=>({u_matrix:ue,u_opacity:w,u_color:B}),Su=(ue,w,B,Q,ee,le)=>a.e(function(Oe,Ze,st,Tt){let Yt=st.imageManager.getPattern(Oe.from.toString()),Kt=st.imageManager.getPattern(Oe.to.toString()),{width:xr,height:Ir}=st.imageManager.getPixelSize(),ve=Math.pow(2,Tt.tileID.overscaledZ),be=Tt.tileSize*Math.pow(2,st.transform.tileZoom)/ve,Re=be*(Tt.tileID.canonical.x+Tt.tileID.wrap*ve),qe=be*Tt.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Yt.tl,u_pattern_br_a:Yt.br,u_pattern_tl_b:Kt.tl,u_pattern_br_b:Kt.br,u_texsize:[xr,Ir],u_mix:Ze.t,u_pattern_size_a:Yt.displaySize,u_pattern_size_b:Kt.displaySize,u_scale_a:Ze.fromScale,u_scale_b:Ze.toScale,u_tile_units_to_pixels:1/In(Tt,1,st.transform.tileZoom),u_pixel_coord_upper:[Re>>16,qe>>16],u_pixel_coord_lower:[65535&Re,65535&qe]}}(Q,le,B,ee),{u_matrix:ue,u_opacity:w}),nc={fillExtrusion:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_lightpos:new a.aN(ue,w.u_lightpos),u_lightintensity:new a.aI(ue,w.u_lightintensity),u_lightcolor:new a.aN(ue,w.u_lightcolor),u_vertical_gradient:new a.aI(ue,w.u_vertical_gradient),u_opacity:new a.aI(ue,w.u_opacity)}),fillExtrusionPattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_lightpos:new a.aN(ue,w.u_lightpos),u_lightintensity:new a.aI(ue,w.u_lightintensity),u_lightcolor:new a.aN(ue,w.u_lightcolor),u_vertical_gradient:new a.aI(ue,w.u_vertical_gradient),u_height_factor:new a.aI(ue,w.u_height_factor),u_image:new a.aH(ue,w.u_image),u_texsize:new a.aO(ue,w.u_texsize),u_pixel_coord_upper:new a.aO(ue,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(ue,w.u_pixel_coord_lower),u_scale:new a.aN(ue,w.u_scale),u_fade:new a.aI(ue,w.u_fade),u_opacity:new a.aI(ue,w.u_opacity)}),fill:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix)}),fillPattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_image:new a.aH(ue,w.u_image),u_texsize:new a.aO(ue,w.u_texsize),u_pixel_coord_upper:new a.aO(ue,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(ue,w.u_pixel_coord_lower),u_scale:new a.aN(ue,w.u_scale),u_fade:new a.aI(ue,w.u_fade)}),fillOutline:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_world:new a.aO(ue,w.u_world)}),fillOutlinePattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_world:new a.aO(ue,w.u_world),u_image:new a.aH(ue,w.u_image),u_texsize:new a.aO(ue,w.u_texsize),u_pixel_coord_upper:new a.aO(ue,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(ue,w.u_pixel_coord_lower),u_scale:new a.aN(ue,w.u_scale),u_fade:new a.aI(ue,w.u_fade)}),circle:(ue,w)=>({u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_scale_with_map:new a.aH(ue,w.u_scale_with_map),u_pitch_with_map:new a.aH(ue,w.u_pitch_with_map),u_extrude_scale:new a.aO(ue,w.u_extrude_scale),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_matrix:new a.aJ(ue,w.u_matrix)}),collisionBox:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_pixel_extrude_scale:new a.aO(ue,w.u_pixel_extrude_scale)}),collisionCircle:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_inv_matrix:new a.aJ(ue,w.u_inv_matrix),u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_viewport_size:new a.aO(ue,w.u_viewport_size)}),debug:(ue,w)=>({u_color:new a.aL(ue,w.u_color),u_matrix:new a.aJ(ue,w.u_matrix),u_overlay:new a.aH(ue,w.u_overlay),u_overlay_scale:new a.aI(ue,w.u_overlay_scale)}),clippingMask:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix)}),heatmap:(ue,w)=>({u_extrude_scale:new a.aI(ue,w.u_extrude_scale),u_intensity:new a.aI(ue,w.u_intensity),u_matrix:new a.aJ(ue,w.u_matrix)}),heatmapTexture:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_world:new a.aO(ue,w.u_world),u_image:new a.aH(ue,w.u_image),u_color_ramp:new a.aH(ue,w.u_color_ramp),u_opacity:new a.aI(ue,w.u_opacity)}),hillshade:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_image:new a.aH(ue,w.u_image),u_latrange:new a.aO(ue,w.u_latrange),u_light:new a.aO(ue,w.u_light),u_shadow:new a.aL(ue,w.u_shadow),u_highlight:new a.aL(ue,w.u_highlight),u_accent:new a.aL(ue,w.u_accent)}),hillshadePrepare:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_image:new a.aH(ue,w.u_image),u_dimension:new a.aO(ue,w.u_dimension),u_zoom:new a.aI(ue,w.u_zoom),u_unpack:new a.aK(ue,w.u_unpack)}),line:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_ratio:new a.aI(ue,w.u_ratio),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(ue,w.u_units_to_pixels)}),lineGradient:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_ratio:new a.aI(ue,w.u_ratio),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(ue,w.u_units_to_pixels),u_image:new a.aH(ue,w.u_image),u_image_height:new a.aI(ue,w.u_image_height)}),linePattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_texsize:new a.aO(ue,w.u_texsize),u_ratio:new a.aI(ue,w.u_ratio),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_image:new a.aH(ue,w.u_image),u_units_to_pixels:new a.aO(ue,w.u_units_to_pixels),u_scale:new a.aN(ue,w.u_scale),u_fade:new a.aI(ue,w.u_fade)}),lineSDF:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_ratio:new a.aI(ue,w.u_ratio),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(ue,w.u_units_to_pixels),u_patternscale_a:new a.aO(ue,w.u_patternscale_a),u_patternscale_b:new a.aO(ue,w.u_patternscale_b),u_sdfgamma:new a.aI(ue,w.u_sdfgamma),u_image:new a.aH(ue,w.u_image),u_tex_y_a:new a.aI(ue,w.u_tex_y_a),u_tex_y_b:new a.aI(ue,w.u_tex_y_b),u_mix:new a.aI(ue,w.u_mix)}),raster:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_tl_parent:new a.aO(ue,w.u_tl_parent),u_scale_parent:new a.aI(ue,w.u_scale_parent),u_buffer_scale:new a.aI(ue,w.u_buffer_scale),u_fade_t:new a.aI(ue,w.u_fade_t),u_opacity:new a.aI(ue,w.u_opacity),u_image0:new a.aH(ue,w.u_image0),u_image1:new a.aH(ue,w.u_image1),u_brightness_low:new a.aI(ue,w.u_brightness_low),u_brightness_high:new a.aI(ue,w.u_brightness_high),u_saturation_factor:new a.aI(ue,w.u_saturation_factor),u_contrast_factor:new a.aI(ue,w.u_contrast_factor),u_spin_weights:new a.aN(ue,w.u_spin_weights)}),symbolIcon:(ue,w)=>({u_is_size_zoom_constant:new a.aH(ue,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(ue,w.u_is_size_feature_constant),u_size_t:new a.aI(ue,w.u_size_t),u_size:new a.aI(ue,w.u_size),u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_pitch:new a.aI(ue,w.u_pitch),u_rotate_symbol:new a.aH(ue,w.u_rotate_symbol),u_aspect_ratio:new a.aI(ue,w.u_aspect_ratio),u_fade_change:new a.aI(ue,w.u_fade_change),u_matrix:new a.aJ(ue,w.u_matrix),u_label_plane_matrix:new a.aJ(ue,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(ue,w.u_coord_matrix),u_is_text:new a.aH(ue,w.u_is_text),u_pitch_with_map:new a.aH(ue,w.u_pitch_with_map),u_is_along_line:new a.aH(ue,w.u_is_along_line),u_is_variable_anchor:new a.aH(ue,w.u_is_variable_anchor),u_texsize:new a.aO(ue,w.u_texsize),u_texture:new a.aH(ue,w.u_texture),u_translation:new a.aO(ue,w.u_translation),u_pitched_scale:new a.aI(ue,w.u_pitched_scale)}),symbolSDF:(ue,w)=>({u_is_size_zoom_constant:new a.aH(ue,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(ue,w.u_is_size_feature_constant),u_size_t:new a.aI(ue,w.u_size_t),u_size:new a.aI(ue,w.u_size),u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_pitch:new a.aI(ue,w.u_pitch),u_rotate_symbol:new a.aH(ue,w.u_rotate_symbol),u_aspect_ratio:new a.aI(ue,w.u_aspect_ratio),u_fade_change:new a.aI(ue,w.u_fade_change),u_matrix:new a.aJ(ue,w.u_matrix),u_label_plane_matrix:new a.aJ(ue,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(ue,w.u_coord_matrix),u_is_text:new a.aH(ue,w.u_is_text),u_pitch_with_map:new a.aH(ue,w.u_pitch_with_map),u_is_along_line:new a.aH(ue,w.u_is_along_line),u_is_variable_anchor:new a.aH(ue,w.u_is_variable_anchor),u_texsize:new a.aO(ue,w.u_texsize),u_texture:new a.aH(ue,w.u_texture),u_gamma_scale:new a.aI(ue,w.u_gamma_scale),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_is_halo:new a.aH(ue,w.u_is_halo),u_translation:new a.aO(ue,w.u_translation),u_pitched_scale:new a.aI(ue,w.u_pitched_scale)}),symbolTextAndIcon:(ue,w)=>({u_is_size_zoom_constant:new a.aH(ue,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(ue,w.u_is_size_feature_constant),u_size_t:new a.aI(ue,w.u_size_t),u_size:new a.aI(ue,w.u_size),u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_pitch:new a.aI(ue,w.u_pitch),u_rotate_symbol:new a.aH(ue,w.u_rotate_symbol),u_aspect_ratio:new a.aI(ue,w.u_aspect_ratio),u_fade_change:new a.aI(ue,w.u_fade_change),u_matrix:new a.aJ(ue,w.u_matrix),u_label_plane_matrix:new a.aJ(ue,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(ue,w.u_coord_matrix),u_is_text:new a.aH(ue,w.u_is_text),u_pitch_with_map:new a.aH(ue,w.u_pitch_with_map),u_is_along_line:new a.aH(ue,w.u_is_along_line),u_is_variable_anchor:new a.aH(ue,w.u_is_variable_anchor),u_texsize:new a.aO(ue,w.u_texsize),u_texsize_icon:new a.aO(ue,w.u_texsize_icon),u_texture:new a.aH(ue,w.u_texture),u_texture_icon:new a.aH(ue,w.u_texture_icon),u_gamma_scale:new a.aI(ue,w.u_gamma_scale),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_is_halo:new a.aH(ue,w.u_is_halo),u_translation:new a.aO(ue,w.u_translation),u_pitched_scale:new a.aI(ue,w.u_pitched_scale)}),background:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_opacity:new a.aI(ue,w.u_opacity),u_color:new a.aL(ue,w.u_color)}),backgroundPattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_opacity:new a.aI(ue,w.u_opacity),u_image:new a.aH(ue,w.u_image),u_pattern_tl_a:new a.aO(ue,w.u_pattern_tl_a),u_pattern_br_a:new a.aO(ue,w.u_pattern_br_a),u_pattern_tl_b:new a.aO(ue,w.u_pattern_tl_b),u_pattern_br_b:new a.aO(ue,w.u_pattern_br_b),u_texsize:new a.aO(ue,w.u_texsize),u_mix:new a.aI(ue,w.u_mix),u_pattern_size_a:new a.aO(ue,w.u_pattern_size_a),u_pattern_size_b:new a.aO(ue,w.u_pattern_size_b),u_scale_a:new a.aI(ue,w.u_scale_a),u_scale_b:new a.aI(ue,w.u_scale_b),u_pixel_coord_upper:new a.aO(ue,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(ue,w.u_pixel_coord_lower),u_tile_units_to_pixels:new a.aI(ue,w.u_tile_units_to_pixels)}),terrain:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_texture:new a.aH(ue,w.u_texture),u_ele_delta:new a.aI(ue,w.u_ele_delta),u_fog_matrix:new a.aJ(ue,w.u_fog_matrix),u_fog_color:new a.aL(ue,w.u_fog_color),u_fog_ground_blend:new a.aI(ue,w.u_fog_ground_blend),u_fog_ground_blend_opacity:new a.aI(ue,w.u_fog_ground_blend_opacity),u_horizon_color:new a.aL(ue,w.u_horizon_color),u_horizon_fog_blend:new a.aI(ue,w.u_horizon_fog_blend)}),terrainDepth:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_ele_delta:new a.aI(ue,w.u_ele_delta)}),terrainCoords:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_texture:new a.aH(ue,w.u_texture),u_terrain_coords_id:new a.aI(ue,w.u_terrain_coords_id),u_ele_delta:new a.aI(ue,w.u_ele_delta)}),sky:(ue,w)=>({u_sky_color:new a.aL(ue,w.u_sky_color),u_horizon_color:new a.aL(ue,w.u_horizon_color),u_horizon:new a.aI(ue,w.u_horizon),u_sky_horizon_blend:new a.aI(ue,w.u_sky_horizon_blend)})};class bs{constructor(w,B,Q){this.context=w;let ee=w.gl;this.buffer=ee.createBuffer(),this.dynamicDraw=!!Q,this.context.unbindVAO(),w.bindElementBuffer.set(this.buffer),ee.bufferData(ee.ELEMENT_ARRAY_BUFFER,B.arrayBuffer,this.dynamicDraw?ee.DYNAMIC_DRAW:ee.STATIC_DRAW),this.dynamicDraw||delete B.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(w){let B=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),B.bufferSubData(B.ELEMENT_ARRAY_BUFFER,0,w.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Rn={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class _a{constructor(w,B,Q,ee){this.length=B.length,this.attributes=Q,this.itemSize=B.bytesPerElement,this.dynamicDraw=ee,this.context=w;let le=w.gl;this.buffer=le.createBuffer(),w.bindVertexBuffer.set(this.buffer),le.bufferData(le.ARRAY_BUFFER,B.arrayBuffer,this.dynamicDraw?le.DYNAMIC_DRAW:le.STATIC_DRAW),this.dynamicDraw||delete B.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(w){if(w.length!==this.length)throw new Error(`Length of new data is ${w.length}, which doesn't match current length of ${this.length}`);let B=this.context.gl;this.bind(),B.bufferSubData(B.ARRAY_BUFFER,0,w.arrayBuffer)}enableAttributes(w,B){for(let Q=0;Q0){let Ht=a.H();a.aQ(Ht,Xe.placementInvProjMatrix,ue.transform.glCoordMatrix),a.aQ(Ht,Ht,Xe.placementViewportMatrix),st.push({circleArray:Ft,circleOffset:Yt,transform:et.posMatrix,invTransform:Ht,coord:et}),Tt+=Ft.length/4,Yt=Tt}it&&Ze.draw(le,Oe.LINES,Po.disabled,Ko.disabled,ue.colorModeForRenderPass(),Pa.disabled,{u_matrix:et.posMatrix,u_pixel_extrude_scale:[1/(Kt=ue.transform).width,1/Kt.height]},ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(et),B.id,it.layoutVertexBuffer,it.indexBuffer,it.segments,null,ue.transform.zoom,null,null,it.collisionVertexBuffer)}var Kt;if(!ee||!st.length)return;let xr=ue.useProgram("collisionCircle"),Ir=new a.aR;Ir.resize(4*Tt),Ir._trim();let ve=0;for(let qe of st)for(let et=0;et=0&&(qe[Xe.associatedIconIndex]={shiftedAnchor:Kn,angle:Aa})}else pi(Xe.numGlyphs,be)}if(Tt){Re.clear();let et=ue.icon.placedSymbolArray;for(let Xe=0;Xeue.style.map.terrain.getElevation(Wr,nt,jt):null,kt=B.layout.get("text-rotation-alignment")==="map";We(Pi,Wr.posMatrix,ue,ee,Ul,au,qe,Tt,kt,be,Wr.toUnwrapped(),ve.width,ve.height,Js,Ye)}let Tl=Wr.posMatrix,Al=ee&&dr||dc,X=et||Al?bl:Ul,se=Lu,Te=Cn&&B.paint.get(ee?"text-halo-width":"icon-halo-width").constantOr(1)!==0,Ne;Ne=Cn?Pi.iconsInText?ls(Kn.kind,$a,Xe,qe,et,Al,ue,Tl,X,se,Js,Qa,Ts,Or):Io(Kn.kind,$a,Xe,qe,et,Al,ue,Tl,X,se,Js,ee,Qa,!0,Or):zs(Kn.kind,$a,Xe,qe,et,Al,ue,Tl,X,se,Js,ee,Qa,Or);let He={program:fa,buffers:cn,uniformValues:Ne,atlasTexture:mo,atlasTextureIcon:wo,atlasInterpolation:Bo,atlasInterpolationIcon:Ps,isSDF:Cn,hasHalo:Te};if(Ft&&Pi.canOverlap){Ht=!0;let Ye=cn.segments.get();for(let kt of Ye)Sr.push({segments:new a.a0([kt]),sortKey:kt.sortKey,state:He,terrainData:Co})}else Sr.push({segments:cn.segments,sortKey:0,state:He,terrainData:Co})}Ht&&Sr.sort((Wr,ni)=>Wr.sortKey-ni.sortKey);for(let Wr of Sr){let ni=Wr.state;if(xr.activeTexture.set(Ir.TEXTURE0),ni.atlasTexture.bind(ni.atlasInterpolation,Ir.CLAMP_TO_EDGE),ni.atlasTextureIcon&&(xr.activeTexture.set(Ir.TEXTURE1),ni.atlasTextureIcon&&ni.atlasTextureIcon.bind(ni.atlasInterpolationIcon,Ir.CLAMP_TO_EDGE)),ni.isSDF){let Pi=ni.uniformValues;ni.hasHalo&&(Pi.u_is_halo=1,Qf(ni.buffers,Wr.segments,B,ue,ni.program,tr,Yt,Kt,Pi,Wr.terrainData)),Pi.u_is_halo=0}Qf(ni.buffers,Wr.segments,B,ue,ni.program,tr,Yt,Kt,ni.uniformValues,Wr.terrainData)}}function Qf(ue,w,B,Q,ee,le,Oe,Ze,st,Tt){let Yt=Q.context;ee.draw(Yt,Yt.gl.TRIANGLES,le,Oe,Ze,Pa.disabled,st,Tt,B.id,ue.layoutVertexBuffer,ue.indexBuffer,w,B.paint,Q.transform.zoom,ue.programConfigurations.get(B.id),ue.dynamicLayoutVertexBuffer,ue.opacityVertexBuffer)}function _f(ue,w,B,Q){let ee=ue.context,le=ee.gl,Oe=Ko.disabled,Ze=new qs([le.ONE,le.ONE],a.aM.transparent,[!0,!0,!0,!0]),st=w.getBucket(B);if(!st)return;let Tt=Q.key,Yt=B.heatmapFbos.get(Tt);Yt||(Yt=eh(ee,w.tileSize,w.tileSize),B.heatmapFbos.set(Tt,Yt)),ee.bindFramebuffer.set(Yt.framebuffer),ee.viewport.set([0,0,w.tileSize,w.tileSize]),ee.clear({color:a.aM.transparent});let Kt=st.programConfigurations.get(B.id),xr=ue.useProgram("heatmap",Kt),Ir=ue.style.map.terrain.getTerrainData(Q);xr.draw(ee,le.TRIANGLES,Po.disabled,Oe,Ze,Pa.disabled,ko(Q.posMatrix,w,ue.transform.zoom,B.paint.get("heatmap-intensity")),Ir,B.id,st.layoutVertexBuffer,st.indexBuffer,st.segments,B.paint,ue.transform.zoom,Kt)}function Yc(ue,w,B){let Q=ue.context,ee=Q.gl;Q.setColorMode(ue.colorModeForRenderPass());let le=th(Q,w),Oe=B.key,Ze=w.heatmapFbos.get(Oe);Ze&&(Q.activeTexture.set(ee.TEXTURE0),ee.bindTexture(ee.TEXTURE_2D,Ze.colorAttachment.get()),Q.activeTexture.set(ee.TEXTURE1),le.bind(ee.LINEAR,ee.CLAMP_TO_EDGE),ue.useProgram("heatmapTexture").draw(Q,ee.TRIANGLES,Po.disabled,Ko.disabled,ue.colorModeForRenderPass(),Pa.disabled,Ds(ue,w,0,1),null,w.id,ue.rasterBoundsBuffer,ue.quadTriangleIndexBuffer,ue.rasterBoundsSegments,w.paint,ue.transform.zoom),Ze.destroy(),w.heatmapFbos.delete(Oe))}function eh(ue,w,B){var Q,ee;let le=ue.gl,Oe=le.createTexture();le.bindTexture(le.TEXTURE_2D,Oe),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_WRAP_S,le.CLAMP_TO_EDGE),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_WRAP_T,le.CLAMP_TO_EDGE),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_MIN_FILTER,le.LINEAR),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_MAG_FILTER,le.LINEAR);let Ze=(Q=ue.HALF_FLOAT)!==null&&Q!==void 0?Q:le.UNSIGNED_BYTE,st=(ee=ue.RGBA16F)!==null&&ee!==void 0?ee:le.RGBA;le.texImage2D(le.TEXTURE_2D,0,st,w,B,0,le.RGBA,Ze,null);let Tt=ue.createFramebuffer(w,B,!1,!1);return Tt.colorAttachment.set(Oe),Tt}function th(ue,w){return w.colorRampTexture||(w.colorRampTexture=new g(ue,w.colorRamp,ue.gl.RGBA)),w.colorRampTexture}function ju(ue,w,B,Q,ee){if(!B||!Q||!Q.imageAtlas)return;let le=Q.imageAtlas.patternPositions,Oe=le[B.to.toString()],Ze=le[B.from.toString()];if(!Oe&&Ze&&(Oe=Ze),!Ze&&Oe&&(Ze=Oe),!Oe||!Ze){let st=ee.getPaintProperty(w);Oe=le[st],Ze=le[st]}Oe&&Ze&&ue.setConstantPatternPositions(Oe,Ze)}function jf(ue,w,B,Q,ee,le,Oe){let Ze=ue.context.gl,st="fill-pattern",Tt=B.paint.get(st),Yt=Tt&&Tt.constantOr(1),Kt=B.getCrossfadeParameters(),xr,Ir,ve,be,Re;Oe?(Ir=Yt&&!B.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",xr=Ze.LINES):(Ir=Yt?"fillPattern":"fill",xr=Ze.TRIANGLES);let qe=Tt.constantOr(null);for(let et of Q){let Xe=w.getTile(et);if(Yt&&!Xe.patternsLoaded())continue;let it=Xe.getBucket(B);if(!it)continue;let Ft=it.programConfigurations.get(B.id),Ht=ue.useProgram(Ir,Ft),tr=ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(et);Yt&&(ue.context.activeTexture.set(Ze.TEXTURE0),Xe.imageAtlasTexture.bind(Ze.LINEAR,Ze.CLAMP_TO_EDGE),Ft.updatePaintBuffers(Kt)),ju(Ft,st,qe,Xe,B);let dr=tr?et:null,Sr=ue.translatePosMatrix(dr?dr.posMatrix:et.posMatrix,Xe,B.paint.get("fill-translate"),B.paint.get("fill-translate-anchor"));if(Oe){be=it.indexBuffer2,Re=it.segments2;let Or=[Ze.drawingBufferWidth,Ze.drawingBufferHeight];ve=Ir==="fillOutlinePattern"&&Yt?Ma(Sr,ue,Kt,Xe,Or):$n(Sr,Or)}else be=it.indexBuffer,Re=it.segments,ve=Yt?ya(Sr,ue,Kt,Xe):_n(Sr);Ht.draw(ue.context,xr,ee,ue.stencilModeForClipping(et),le,Pa.disabled,ve,tr,B.id,it.layoutVertexBuffer,be,Re,B.paint,ue.transform.zoom,Ft)}}function cc(ue,w,B,Q,ee,le,Oe){let Ze=ue.context,st=Ze.gl,Tt="fill-extrusion-pattern",Yt=B.paint.get(Tt),Kt=Yt.constantOr(1),xr=B.getCrossfadeParameters(),Ir=B.paint.get("fill-extrusion-opacity"),ve=Yt.constantOr(null);for(let be of Q){let Re=w.getTile(be),qe=Re.getBucket(B);if(!qe)continue;let et=ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(be),Xe=qe.programConfigurations.get(B.id),it=ue.useProgram(Kt?"fillExtrusionPattern":"fillExtrusion",Xe);Kt&&(ue.context.activeTexture.set(st.TEXTURE0),Re.imageAtlasTexture.bind(st.LINEAR,st.CLAMP_TO_EDGE),Xe.updatePaintBuffers(xr)),ju(Xe,Tt,ve,Re,B);let Ft=ue.translatePosMatrix(be.posMatrix,Re,B.paint.get("fill-extrusion-translate"),B.paint.get("fill-extrusion-translate-anchor")),Ht=B.paint.get("fill-extrusion-vertical-gradient"),tr=Kt?Li(Ft,ue,Ht,Ir,be,xr,Re):Mn(Ft,ue,Ht,Ir);it.draw(Ze,Ze.gl.TRIANGLES,ee,le,Oe,Pa.backCCW,tr,et,B.id,qe.layoutVertexBuffer,qe.indexBuffer,qe.segments,B.paint,ue.transform.zoom,Xe,ue.style.map.terrain&&qe.centroidVertexBuffer)}}function of(ue,w,B,Q,ee,le,Oe){let Ze=ue.context,st=Ze.gl,Tt=B.fbo;if(!Tt)return;let Yt=ue.useProgram("hillshade"),Kt=ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(w);Ze.activeTexture.set(st.TEXTURE0),st.bindTexture(st.TEXTURE_2D,Tt.colorAttachment.get()),Yt.draw(Ze,st.TRIANGLES,ee,le,Oe,Pa.disabled,((xr,Ir,ve,be)=>{let Re=ve.paint.get("hillshade-shadow-color"),qe=ve.paint.get("hillshade-highlight-color"),et=ve.paint.get("hillshade-accent-color"),Xe=ve.paint.get("hillshade-illumination-direction")*(Math.PI/180);ve.paint.get("hillshade-illumination-anchor")==="viewport"&&(Xe-=xr.transform.angle);let it=!xr.options.moving;return{u_matrix:be?be.posMatrix:xr.transform.calculatePosMatrix(Ir.tileID.toUnwrapped(),it),u_image:0,u_latrange:Fs(0,Ir.tileID),u_light:[ve.paint.get("hillshade-exaggeration"),Xe],u_shadow:Re,u_highlight:qe,u_accent:et}})(ue,B,Q,Kt?w:null),Kt,Q.id,ue.rasterBoundsBuffer,ue.quadTriangleIndexBuffer,ue.rasterBoundsSegments)}function Nl(ue,w,B,Q,ee,le){let Oe=ue.context,Ze=Oe.gl,st=w.dem;if(st&&st.data){let Tt=st.dim,Yt=st.stride,Kt=st.getPixels();if(Oe.activeTexture.set(Ze.TEXTURE1),Oe.pixelStoreUnpackPremultiplyAlpha.set(!1),w.demTexture=w.demTexture||ue.getTileTexture(Yt),w.demTexture){let Ir=w.demTexture;Ir.update(Kt,{premultiply:!1}),Ir.bind(Ze.NEAREST,Ze.CLAMP_TO_EDGE)}else w.demTexture=new g(Oe,Kt,Ze.RGBA,{premultiply:!1}),w.demTexture.bind(Ze.NEAREST,Ze.CLAMP_TO_EDGE);Oe.activeTexture.set(Ze.TEXTURE0);let xr=w.fbo;if(!xr){let Ir=new g(Oe,{width:Tt,height:Tt,data:null},Ze.RGBA);Ir.bind(Ze.LINEAR,Ze.CLAMP_TO_EDGE),xr=w.fbo=Oe.createFramebuffer(Tt,Tt,!0,!1),xr.colorAttachment.set(Ir.texture)}Oe.bindFramebuffer.set(xr.framebuffer),Oe.viewport.set([0,0,Tt,Tt]),ue.useProgram("hillshadePrepare").draw(Oe,Ze.TRIANGLES,Q,ee,le,Pa.disabled,((Ir,ve)=>{let be=ve.stride,Re=a.H();return a.aP(Re,0,a.X,-a.X,0,0,1),a.J(Re,Re,[0,-a.X,0]),{u_matrix:Re,u_image:1,u_dimension:[be,be],u_zoom:Ir.overscaledZ,u_unpack:ve.getUnpackVector()}})(w.tileID,st),null,B.id,ue.rasterBoundsBuffer,ue.quadTriangleIndexBuffer,ue.rasterBoundsSegments),w.needsHillshadePrepare=!1}}function Kc(ue,w,B,Q,ee,le){let Oe=Q.paint.get("raster-fade-duration");if(!le&&Oe>0){let Ze=u.now(),st=(Ze-ue.timeAdded)/Oe,Tt=w?(Ze-w.timeAdded)/Oe:-1,Yt=B.getSource(),Kt=ee.coveringZoomLevel({tileSize:Yt.tileSize,roundZoom:Yt.roundZoom}),xr=!w||Math.abs(w.tileID.overscaledZ-Kt)>Math.abs(ue.tileID.overscaledZ-Kt),Ir=xr&&ue.refreshedUponExpiration?1:a.ac(xr?st:1-Tt,0,1);return ue.refreshedUponExpiration&&st>=1&&(ue.refreshedUponExpiration=!1),w?{opacity:1,mix:1-Ir}:{opacity:Ir,mix:0}}return{opacity:1,mix:0}}let Rc=new a.aM(1,0,0,1),gs=new a.aM(0,1,0,1),Wf=new a.aM(0,0,1,1),Wh=new a.aM(1,0,1,1),rh=new a.aM(0,1,1,1);function sf(ue,w,B,Q){Mu(ue,0,w+B/2,ue.transform.width,B,Q)}function Sh(ue,w,B,Q){Mu(ue,w-B/2,0,B,ue.transform.height,Q)}function Mu(ue,w,B,Q,ee,le){let Oe=ue.context,Ze=Oe.gl;Ze.enable(Ze.SCISSOR_TEST),Ze.scissor(w*ue.pixelRatio,B*ue.pixelRatio,Q*ue.pixelRatio,ee*ue.pixelRatio),Oe.clear({color:le}),Ze.disable(Ze.SCISSOR_TEST)}function ih(ue,w,B){let Q=ue.context,ee=Q.gl,le=B.posMatrix,Oe=ue.useProgram("debug"),Ze=Po.disabled,st=Ko.disabled,Tt=ue.colorModeForRenderPass(),Yt="$debug",Kt=ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(B);Q.activeTexture.set(ee.TEXTURE0);let xr=w.getTileByID(B.key).latestRawTileData,Ir=Math.floor((xr&&xr.byteLength||0)/1024),ve=w.getTile(B).tileSize,be=512/Math.min(ve,512)*(B.overscaledZ/ue.transform.zoom)*.5,Re=B.canonical.toString();B.overscaledZ!==B.canonical.z&&(Re+=` => ${B.overscaledZ}`),function(qe,et){qe.initDebugOverlayCanvas();let Xe=qe.debugOverlayCanvas,it=qe.context.gl,Ft=qe.debugOverlayCanvas.getContext("2d");Ft.clearRect(0,0,Xe.width,Xe.height),Ft.shadowColor="white",Ft.shadowBlur=2,Ft.lineWidth=1.5,Ft.strokeStyle="white",Ft.textBaseline="top",Ft.font="bold 36px Open Sans, sans-serif",Ft.fillText(et,5,5),Ft.strokeText(et,5,5),qe.debugOverlayTexture.update(Xe),qe.debugOverlayTexture.bind(it.LINEAR,it.CLAMP_TO_EDGE)}(ue,`${Re} ${Ir}kB`),Oe.draw(Q,ee.TRIANGLES,Ze,st,qs.alphaBlended,Pa.disabled,po(le,a.aM.transparent,be),null,Yt,ue.debugBuffer,ue.quadTriangleIndexBuffer,ue.debugSegments),Oe.draw(Q,ee.LINE_STRIP,Ze,st,Tt,Pa.disabled,po(le,a.aM.red),Kt,Yt,ue.debugBuffer,ue.tileBorderIndexBuffer,ue.debugSegments)}function js(ue,w,B){let Q=ue.context,ee=Q.gl,le=ue.colorModeForRenderPass(),Oe=new Po(ee.LEQUAL,Po.ReadWrite,ue.depthRangeFor3D),Ze=ue.useProgram("terrain"),st=w.getTerrainMesh();Q.bindFramebuffer.set(null),Q.viewport.set([0,0,ue.width,ue.height]);for(let Tt of B){let Yt=ue.renderToTexture.getTexture(Tt),Kt=w.getTerrainData(Tt.tileID);Q.activeTexture.set(ee.TEXTURE0),ee.bindTexture(ee.TEXTURE_2D,Yt.texture);let xr=ue.transform.calculatePosMatrix(Tt.tileID.toUnwrapped()),Ir=w.getMeshFrameDelta(ue.transform.zoom),ve=ue.transform.calculateFogMatrix(Tt.tileID.toUnwrapped()),be=Jr(xr,Ir,ve,ue.style.sky,ue.transform.pitch);Ze.draw(Q,ee.TRIANGLES,Oe,Ko.disabled,le,Pa.backCCW,be,Kt,"terrain",st.vertexBuffer,st.indexBuffer,st.segments)}}class Eu{constructor(w,B,Q){this.vertexBuffer=w,this.indexBuffer=B,this.segments=Q}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class Dc{constructor(w,B){this.context=new od(w),this.transform=B,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:a.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=mt.maxUnderzooming+mt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Xo}resize(w,B,Q){if(this.width=Math.floor(w*Q),this.height=Math.floor(B*Q),this.pixelRatio=Q,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let ee of this.style._order)this.style._layers[ee].resize()}setup(){let w=this.context,B=new a.aX;B.emplaceBack(0,0),B.emplaceBack(a.X,0),B.emplaceBack(0,a.X),B.emplaceBack(a.X,a.X),this.tileExtentBuffer=w.createVertexBuffer(B,vo.members),this.tileExtentSegments=a.a0.simpleSegment(0,0,4,2);let Q=new a.aX;Q.emplaceBack(0,0),Q.emplaceBack(a.X,0),Q.emplaceBack(0,a.X),Q.emplaceBack(a.X,a.X),this.debugBuffer=w.createVertexBuffer(Q,vo.members),this.debugSegments=a.a0.simpleSegment(0,0,4,5);let ee=new a.$;ee.emplaceBack(0,0,0,0),ee.emplaceBack(a.X,0,a.X,0),ee.emplaceBack(0,a.X,0,a.X),ee.emplaceBack(a.X,a.X,a.X,a.X),this.rasterBoundsBuffer=w.createVertexBuffer(ee,ut.members),this.rasterBoundsSegments=a.a0.simpleSegment(0,0,4,2);let le=new a.aX;le.emplaceBack(0,0),le.emplaceBack(1,0),le.emplaceBack(0,1),le.emplaceBack(1,1),this.viewportBuffer=w.createVertexBuffer(le,vo.members),this.viewportSegments=a.a0.simpleSegment(0,0,4,2);let Oe=new a.aZ;Oe.emplaceBack(0),Oe.emplaceBack(1),Oe.emplaceBack(3),Oe.emplaceBack(2),Oe.emplaceBack(0),this.tileBorderIndexBuffer=w.createIndexBuffer(Oe);let Ze=new a.aY;Ze.emplaceBack(0,1,2),Ze.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=w.createIndexBuffer(Ze);let st=this.context.gl;this.stencilClearMode=new Ko({func:st.ALWAYS,mask:0},0,255,st.ZERO,st.ZERO,st.ZERO)}clearStencil(){let w=this.context,B=w.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let Q=a.H();a.aP(Q,0,this.width,this.height,0,0,1),a.K(Q,Q,[B.drawingBufferWidth,B.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(w,B.TRIANGLES,Po.disabled,this.stencilClearMode,qs.disabled,Pa.disabled,Lo(Q),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(w,B){if(this.currentStencilSource===w.source||!w.isTileClipped()||!B||!B.length)return;this.currentStencilSource=w.source;let Q=this.context,ee=Q.gl;this.nextStencilID+B.length>256&&this.clearStencil(),Q.setColorMode(qs.disabled),Q.setDepthMode(Po.disabled);let le=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(let Oe of B){let Ze=this._tileClippingMaskIDs[Oe.key]=this.nextStencilID++,st=this.style.map.terrain&&this.style.map.terrain.getTerrainData(Oe);le.draw(Q,ee.TRIANGLES,Po.disabled,new Ko({func:ee.ALWAYS,mask:0},Ze,255,ee.KEEP,ee.KEEP,ee.REPLACE),qs.disabled,Pa.disabled,Lo(Oe.posMatrix),st,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let w=this.nextStencilID++,B=this.context.gl;return new Ko({func:B.NOTEQUAL,mask:255},w,255,B.KEEP,B.KEEP,B.REPLACE)}stencilModeForClipping(w){let B=this.context.gl;return new Ko({func:B.EQUAL,mask:255},this._tileClippingMaskIDs[w.key],0,B.KEEP,B.KEEP,B.REPLACE)}stencilConfigForOverlap(w){let B=this.context.gl,Q=w.sort((Oe,Ze)=>Ze.overscaledZ-Oe.overscaledZ),ee=Q[Q.length-1].overscaledZ,le=Q[0].overscaledZ-ee+1;if(le>1){this.currentStencilSource=void 0,this.nextStencilID+le>256&&this.clearStencil();let Oe={};for(let Ze=0;Ze({u_sky_color:qe.properties.get("sky-color"),u_horizon_color:qe.properties.get("horizon-color"),u_horizon:(et.height/2+et.getHorizon())*Xe,u_sky_horizon_blend:qe.properties.get("sky-horizon-blend")*et.height/2*Xe}))(Tt,st.style.map.transform,st.pixelRatio),Ir=new Po(Kt.LEQUAL,Po.ReadWrite,[0,1]),ve=Ko.disabled,be=st.colorModeForRenderPass(),Re=st.useProgram("sky");if(!Tt.mesh){let qe=new a.aX;qe.emplaceBack(-1,-1),qe.emplaceBack(1,-1),qe.emplaceBack(1,1),qe.emplaceBack(-1,1);let et=new a.aY;et.emplaceBack(0,1,2),et.emplaceBack(0,2,3),Tt.mesh=new Eu(Yt.createVertexBuffer(qe,vo.members),Yt.createIndexBuffer(et),a.a0.simpleSegment(0,0,qe.length,et.length))}Re.draw(Yt,Kt.TRIANGLES,Ir,ve,be,Pa.disabled,xr,void 0,"sky",Tt.mesh.vertexBuffer,Tt.mesh.indexBuffer,Tt.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=B.showOverdrawInspector,this.depthRangeFor3D=[0,1-(w._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=Q.length-1;this.currentLayer>=0;this.currentLayer--){let st=this.style._layers[Q[this.currentLayer]],Tt=ee[st.source],Yt=le[st.source];this._renderTileClippingMasks(st,Yt),this.renderLayer(this,Tt,st,Yt)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayerRe.source&&!Re.isHidden(Yt)?[Tt.sourceCaches[Re.source]]:[]),Ir=xr.filter(Re=>Re.getSource().type==="vector"),ve=xr.filter(Re=>Re.getSource().type!=="vector"),be=Re=>{(!Kt||Kt.getSource().maxzoombe(Re)),Kt||ve.forEach(Re=>be(Re)),Kt}(this.style,this.transform.zoom);st&&function(Tt,Yt,Kt){for(let xr=0;xr0),ee&&(a.b0(B,Q),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(le,Oe){let Ze=le.context,st=Ze.gl,Tt=qs.unblended,Yt=new Po(st.LEQUAL,Po.ReadWrite,[0,1]),Kt=Oe.getTerrainMesh(),xr=Oe.sourceCache.getRenderableTiles(),Ir=le.useProgram("terrainDepth");Ze.bindFramebuffer.set(Oe.getFramebuffer("depth").framebuffer),Ze.viewport.set([0,0,le.width/devicePixelRatio,le.height/devicePixelRatio]),Ze.clear({color:a.aM.transparent,depth:1});for(let ve of xr){let be=Oe.getTerrainData(ve.tileID),Re={u_matrix:le.transform.calculatePosMatrix(ve.tileID.toUnwrapped()),u_ele_delta:Oe.getMeshFrameDelta(le.transform.zoom)};Ir.draw(Ze,st.TRIANGLES,Yt,Ko.disabled,Tt,Pa.backCCW,Re,be,"terrain",Kt.vertexBuffer,Kt.indexBuffer,Kt.segments)}Ze.bindFramebuffer.set(null),Ze.viewport.set([0,0,le.width,le.height])}(this,this.style.map.terrain),function(le,Oe){let Ze=le.context,st=Ze.gl,Tt=qs.unblended,Yt=new Po(st.LEQUAL,Po.ReadWrite,[0,1]),Kt=Oe.getTerrainMesh(),xr=Oe.getCoordsTexture(),Ir=Oe.sourceCache.getRenderableTiles(),ve=le.useProgram("terrainCoords");Ze.bindFramebuffer.set(Oe.getFramebuffer("coords").framebuffer),Ze.viewport.set([0,0,le.width/devicePixelRatio,le.height/devicePixelRatio]),Ze.clear({color:a.aM.transparent,depth:1}),Oe.coordsIndex=[];for(let be of Ir){let Re=Oe.getTerrainData(be.tileID);Ze.activeTexture.set(st.TEXTURE0),st.bindTexture(st.TEXTURE_2D,xr.texture);let qe={u_matrix:le.transform.calculatePosMatrix(be.tileID.toUnwrapped()),u_terrain_coords_id:(255-Oe.coordsIndex.length)/255,u_texture:0,u_ele_delta:Oe.getMeshFrameDelta(le.transform.zoom)};ve.draw(Ze,st.TRIANGLES,Yt,Ko.disabled,Tt,Pa.backCCW,qe,Re,"terrain",Kt.vertexBuffer,Kt.indexBuffer,Kt.segments),Oe.coordsIndex.push(be.tileID.key)}Ze.bindFramebuffer.set(null),Ze.viewport.set([0,0,le.width,le.height])}(this,this.style.map.terrain))}renderLayer(w,B,Q,ee){if(!Q.isHidden(this.transform.zoom)&&(Q.type==="background"||Q.type==="custom"||(ee||[]).length))switch(this.id=Q.id,Q.type){case"symbol":(function(le,Oe,Ze,st,Tt){if(le.renderPass!=="translucent")return;let Yt=Ko.disabled,Kt=le.colorModeForRenderPass();(Ze._unevaluatedLayout.hasValue("text-variable-anchor")||Ze._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(xr,Ir,ve,be,Re,qe,et,Xe,it){let Ft=Ir.transform,Ht=yn(),tr=Re==="map",dr=qe==="map";for(let Sr of xr){let Or=be.getTile(Sr),Wr=Or.getBucket(ve);if(!Wr||!Wr.text||!Wr.text.segments.get().length)continue;let ni=a.ag(Wr.textSizeData,Ft.zoom),Pi=In(Or,1,Ir.transform.zoom),cn=Br(Sr.posMatrix,dr,tr,Ir.transform,Pi),ln=ve.layout.get("icon-text-fit")!=="none"&&Wr.hasIconData();if(ni){let Cn=Math.pow(2,Ft.zoom-Or.tileID.overscaledZ),Kn=Ir.style.map.terrain?(fa,$a)=>Ir.style.map.terrain.getElevation(Sr,fa,$a):null,Aa=Ht.translatePosition(Ft,Or,et,Xe);yf(Wr,tr,dr,it,Ft,cn,Sr.posMatrix,Cn,ni,ln,Ht,Aa,Sr.toUnwrapped(),Kn)}}}(st,le,Ze,Oe,Ze.layout.get("text-rotation-alignment"),Ze.layout.get("text-pitch-alignment"),Ze.paint.get("text-translate"),Ze.paint.get("text-translate-anchor"),Tt),Ze.paint.get("icon-opacity").constantOr(1)!==0&&Ah(le,Oe,Ze,st,!1,Ze.paint.get("icon-translate"),Ze.paint.get("icon-translate-anchor"),Ze.layout.get("icon-rotation-alignment"),Ze.layout.get("icon-pitch-alignment"),Ze.layout.get("icon-keep-upright"),Yt,Kt),Ze.paint.get("text-opacity").constantOr(1)!==0&&Ah(le,Oe,Ze,st,!0,Ze.paint.get("text-translate"),Ze.paint.get("text-translate-anchor"),Ze.layout.get("text-rotation-alignment"),Ze.layout.get("text-pitch-alignment"),Ze.layout.get("text-keep-upright"),Yt,Kt),Oe.map.showCollisionBoxes&&(Hu(le,Oe,Ze,st,!0),Hu(le,Oe,Ze,st,!1))})(w,B,Q,ee,this.style.placement.variableOffsets);break;case"circle":(function(le,Oe,Ze,st){if(le.renderPass!=="translucent")return;let Tt=Ze.paint.get("circle-opacity"),Yt=Ze.paint.get("circle-stroke-width"),Kt=Ze.paint.get("circle-stroke-opacity"),xr=!Ze.layout.get("circle-sort-key").isConstant();if(Tt.constantOr(1)===0&&(Yt.constantOr(1)===0||Kt.constantOr(1)===0))return;let Ir=le.context,ve=Ir.gl,be=le.depthModeForSublayer(0,Po.ReadOnly),Re=Ko.disabled,qe=le.colorModeForRenderPass(),et=[];for(let Xe=0;XeXe.sortKey-it.sortKey);for(let Xe of et){let{programConfiguration:it,program:Ft,layoutVertexBuffer:Ht,indexBuffer:tr,uniformValues:dr,terrainData:Sr}=Xe.state;Ft.draw(Ir,ve.TRIANGLES,be,Re,qe,Pa.disabled,dr,Sr,Ze.id,Ht,tr,Xe.segments,Ze.paint,le.transform.zoom,it)}})(w,B,Q,ee);break;case"heatmap":(function(le,Oe,Ze,st){if(Ze.paint.get("heatmap-opacity")===0)return;let Tt=le.context;if(le.style.map.terrain){for(let Yt of st){let Kt=Oe.getTile(Yt);Oe.hasRenderableParent(Yt)||(le.renderPass==="offscreen"?_f(le,Kt,Ze,Yt):le.renderPass==="translucent"&&Yc(le,Ze,Yt))}Tt.viewport.set([0,0,le.width,le.height])}else le.renderPass==="offscreen"?function(Yt,Kt,xr,Ir){let ve=Yt.context,be=ve.gl,Re=Ko.disabled,qe=new qs([be.ONE,be.ONE],a.aM.transparent,[!0,!0,!0,!0]);(function(et,Xe,it){let Ft=et.gl;et.activeTexture.set(Ft.TEXTURE1),et.viewport.set([0,0,Xe.width/4,Xe.height/4]);let Ht=it.heatmapFbos.get(a.aU);Ht?(Ft.bindTexture(Ft.TEXTURE_2D,Ht.colorAttachment.get()),et.bindFramebuffer.set(Ht.framebuffer)):(Ht=eh(et,Xe.width/4,Xe.height/4),it.heatmapFbos.set(a.aU,Ht))})(ve,Yt,xr),ve.clear({color:a.aM.transparent});for(let et=0;et20&&Yt.texParameterf(Yt.TEXTURE_2D,Tt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Tt.extTextureFilterAnisotropicMax);let Wr=le.style.map.terrain&&le.style.map.terrain.getTerrainData(et),ni=Wr?et:null,Pi=ni?ni.posMatrix:le.transform.calculatePosMatrix(et.toUnwrapped(),qe),cn=cl(Pi,Sr||[0,0],dr||1,tr,Ze);Kt instanceof Wt?xr.draw(Tt,Yt.TRIANGLES,Xe,Ko.disabled,Ir,Pa.disabled,cn,Wr,Ze.id,Kt.boundsBuffer,le.quadTriangleIndexBuffer,Kt.boundsSegments):xr.draw(Tt,Yt.TRIANGLES,Xe,ve[et.overscaledZ],Ir,Pa.disabled,cn,Wr,Ze.id,le.rasterBoundsBuffer,le.quadTriangleIndexBuffer,le.rasterBoundsSegments)}})(w,B,Q,ee);break;case"background":(function(le,Oe,Ze,st){let Tt=Ze.paint.get("background-color"),Yt=Ze.paint.get("background-opacity");if(Yt===0)return;let Kt=le.context,xr=Kt.gl,Ir=le.transform,ve=Ir.tileSize,be=Ze.paint.get("background-pattern");if(le.isPatternMissing(be))return;let Re=!be&&Tt.a===1&&Yt===1&&le.opaquePassEnabledForLayer()?"opaque":"translucent";if(le.renderPass!==Re)return;let qe=Ko.disabled,et=le.depthModeForSublayer(0,Re==="opaque"?Po.ReadWrite:Po.ReadOnly),Xe=le.colorModeForRenderPass(),it=le.useProgram(be?"backgroundPattern":"background"),Ft=st||Ir.coveringTiles({tileSize:ve,terrain:le.style.map.terrain});be&&(Kt.activeTexture.set(xr.TEXTURE0),le.imageManager.bind(le.context));let Ht=Ze.getCrossfadeParameters();for(let tr of Ft){let dr=st?tr.posMatrix:le.transform.calculatePosMatrix(tr.toUnwrapped()),Sr=be?Su(dr,Yt,le,be,{tileID:tr,tileSize:ve},Ht):Yl(dr,Yt,Tt),Or=le.style.map.terrain&&le.style.map.terrain.getTerrainData(tr);it.draw(Kt,xr.TRIANGLES,et,qe,Xe,Pa.disabled,Sr,Or,Ze.id,le.tileExtentBuffer,le.quadTriangleIndexBuffer,le.tileExtentSegments)}})(w,0,Q,ee);break;case"custom":(function(le,Oe,Ze){let st=le.context,Tt=Ze.implementation;if(le.renderPass==="offscreen"){let Yt=Tt.prerender;Yt&&(le.setCustomLayerDefaults(),st.setColorMode(le.colorModeForRenderPass()),Yt.call(Tt,st.gl,le.transform.customLayerMatrix()),st.setDirty(),le.setBaseState())}else if(le.renderPass==="translucent"){le.setCustomLayerDefaults(),st.setColorMode(le.colorModeForRenderPass()),st.setStencilMode(Ko.disabled);let Yt=Tt.renderingMode==="3d"?new Po(le.context.gl.LEQUAL,Po.ReadWrite,le.depthRangeFor3D):le.depthModeForSublayer(0,Po.ReadOnly);st.setDepthMode(Yt),Tt.render(st.gl,le.transform.customLayerMatrix(),{farZ:le.transform.farZ,nearZ:le.transform.nearZ,fov:le.transform._fov,modelViewProjectionMatrix:le.transform.modelViewProjectionMatrix,projectionMatrix:le.transform.projectionMatrix}),st.setDirty(),le.setBaseState(),st.bindFramebuffer.set(null)}})(w,0,Q)}}translatePosMatrix(w,B,Q,ee,le){if(!Q[0]&&!Q[1])return w;let Oe=le?ee==="map"?this.transform.angle:0:ee==="viewport"?-this.transform.angle:0;if(Oe){let Tt=Math.sin(Oe),Yt=Math.cos(Oe);Q=[Q[0]*Yt-Q[1]*Tt,Q[0]*Tt+Q[1]*Yt]}let Ze=[le?Q[0]:In(B,Q[0],this.transform.zoom),le?Q[1]:In(B,Q[1],this.transform.zoom),0],st=new Float32Array(16);return a.J(st,w,Ze),st}saveTileTexture(w){let B=this._tileTextures[w.size[0]];B?B.push(w):this._tileTextures[w.size[0]]=[w]}getTileTexture(w){let B=this._tileTextures[w];return B&&B.length>0?B.pop():null}isPatternMissing(w){if(!w)return!1;if(!w.from||!w.to)return!0;let B=this.imageManager.getPattern(w.from.toString()),Q=this.imageManager.getPattern(w.to.toString());return!B||!Q}useProgram(w,B){this.cache=this.cache||{};let Q=w+(B?B.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[Q]||(this.cache[Q]=new hn(this.context,jn[w],B,nc[w],this._showOverdrawInspector,this.style.map.terrain)),this.cache[Q]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let w=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(w.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new g(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){let{drawingBufferWidth:w,drawingBufferHeight:B}=this.context.gl;return this.width!==w||this.height!==B}}class ks{constructor(w,B){this.points=w,this.planes=B}static fromInvProjectionMatrix(w,B,Q){let ee=Math.pow(2,Q),le=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(Ze=>{let st=1/(Ze=a.af([],Ze,w))[3]/B*ee;return a.b1(Ze,Ze,[st,st,1/Ze[3],st])}),Oe=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(Ze=>{let st=function(xr,Ir){var ve=Ir[0],be=Ir[1],Re=Ir[2],qe=ve*ve+be*be+Re*Re;return qe>0&&(qe=1/Math.sqrt(qe)),xr[0]=Ir[0]*qe,xr[1]=Ir[1]*qe,xr[2]=Ir[2]*qe,xr}([],function(xr,Ir,ve){var be=Ir[0],Re=Ir[1],qe=Ir[2],et=ve[0],Xe=ve[1],it=ve[2];return xr[0]=Re*it-qe*Xe,xr[1]=qe*et-be*it,xr[2]=be*Xe-Re*et,xr}([],L([],le[Ze[0]],le[Ze[1]]),L([],le[Ze[2]],le[Ze[1]]))),Tt=-((Yt=st)[0]*(Kt=le[Ze[1]])[0]+Yt[1]*Kt[1]+Yt[2]*Kt[2]);var Yt,Kt;return st.concat(Tt)});return new ks(le,Oe)}}class bc{constructor(w,B){this.min=w,this.max=B,this.center=function(Q,ee,le){return Q[0]=.5*ee[0],Q[1]=.5*ee[1],Q[2]=.5*ee[2],Q}([],function(Q,ee,le){return Q[0]=ee[0]+le[0],Q[1]=ee[1]+le[1],Q[2]=ee[2]+le[2],Q}([],this.min,this.max))}quadrant(w){let B=[w%2==0,w<2],Q=E(this.min),ee=E(this.max);for(let le=0;le=0&&Oe++;if(Oe===0)return 0;Oe!==B.length&&(Q=!1)}if(Q)return 2;for(let ee=0;ee<3;ee++){let le=Number.MAX_VALUE,Oe=-Number.MAX_VALUE;for(let Ze=0;Zethis.max[ee]-this.min[ee])return 0}return 1}}class hu{constructor(w=0,B=0,Q=0,ee=0){if(isNaN(w)||w<0||isNaN(B)||B<0||isNaN(Q)||Q<0||isNaN(ee)||ee<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=w,this.bottom=B,this.left=Q,this.right=ee}interpolate(w,B,Q){return B.top!=null&&w.top!=null&&(this.top=a.y.number(w.top,B.top,Q)),B.bottom!=null&&w.bottom!=null&&(this.bottom=a.y.number(w.bottom,B.bottom,Q)),B.left!=null&&w.left!=null&&(this.left=a.y.number(w.left,B.left,Q)),B.right!=null&&w.right!=null&&(this.right=a.y.number(w.right,B.right,Q)),this}getCenter(w,B){let Q=a.ac((this.left+w-this.right)/2,0,w),ee=a.ac((this.top+B-this.bottom)/2,0,B);return new a.P(Q,ee)}equals(w){return this.top===w.top&&this.bottom===w.bottom&&this.left===w.left&&this.right===w.right}clone(){return new hu(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}let _u=85.051129;class nl{constructor(w,B,Q,ee,le){this.tileSize=512,this._renderWorldCopies=le===void 0||!!le,this._minZoom=w||0,this._maxZoom=B||22,this._minPitch=Q==null?0:Q,this._maxPitch=ee==null?60:ee,this.setMaxBounds(),this.width=0,this.height=0,this._center=new a.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new hu,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){let w=new nl(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return w.apply(this),w}apply(w){this.tileSize=w.tileSize,this.latRange=w.latRange,this.lngRange=w.lngRange,this.width=w.width,this.height=w.height,this._center=w._center,this._elevation=w._elevation,this.minElevationForCurrentTile=w.minElevationForCurrentTile,this.zoom=w.zoom,this.angle=w.angle,this._fov=w._fov,this._pitch=w._pitch,this._unmodified=w._unmodified,this._edgeInsets=w._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(w){this._minZoom!==w&&(this._minZoom=w,this.zoom=Math.max(this.zoom,w))}get maxZoom(){return this._maxZoom}set maxZoom(w){this._maxZoom!==w&&(this._maxZoom=w,this.zoom=Math.min(this.zoom,w))}get minPitch(){return this._minPitch}set minPitch(w){this._minPitch!==w&&(this._minPitch=w,this.pitch=Math.max(this.pitch,w))}get maxPitch(){return this._maxPitch}set maxPitch(w){this._maxPitch!==w&&(this._maxPitch=w,this.pitch=Math.min(this.pitch,w))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(w){w===void 0?w=!0:w===null&&(w=!1),this._renderWorldCopies=w}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new a.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(w){let B=-a.b3(w,-180,180)*Math.PI/180;this.angle!==B&&(this._unmodified=!1,this.angle=B,this._calcMatrices(),this.rotationMatrix=function(){var Q=new a.A(4);return a.A!=Float32Array&&(Q[1]=0,Q[2]=0),Q[0]=1,Q[3]=1,Q}(),function(Q,ee,le){var Oe=ee[0],Ze=ee[1],st=ee[2],Tt=ee[3],Yt=Math.sin(le),Kt=Math.cos(le);Q[0]=Oe*Kt+st*Yt,Q[1]=Ze*Kt+Tt*Yt,Q[2]=Oe*-Yt+st*Kt,Q[3]=Ze*-Yt+Tt*Kt}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(w){let B=a.ac(w,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==B&&(this._unmodified=!1,this._pitch=B,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(w){w=Math.max(.01,Math.min(60,w)),this._fov!==w&&(this._unmodified=!1,this._fov=w/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(w){let B=Math.min(Math.max(w,this.minZoom),this.maxZoom);this._zoom!==B&&(this._unmodified=!1,this._zoom=B,this.tileZoom=Math.max(0,Math.floor(B)),this.scale=this.zoomScale(B),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(w){w.lat===this._center.lat&&w.lng===this._center.lng||(this._unmodified=!1,this._center=w,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(w){w!==this._elevation&&(this._elevation=w,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(w){this._edgeInsets.equals(w)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,w,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(w){return this._edgeInsets.equals(w)}interpolatePadding(w,B,Q){this._unmodified=!1,this._edgeInsets.interpolate(w,B,Q),this._constrain(),this._calcMatrices()}coveringZoomLevel(w){let B=(w.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/w.tileSize));return Math.max(0,B)}getVisibleUnwrappedCoordinates(w){let B=[new a.b4(0,w)];if(this._renderWorldCopies){let Q=this.pointCoordinate(new a.P(0,0)),ee=this.pointCoordinate(new a.P(this.width,0)),le=this.pointCoordinate(new a.P(this.width,this.height)),Oe=this.pointCoordinate(new a.P(0,this.height)),Ze=Math.floor(Math.min(Q.x,ee.x,le.x,Oe.x)),st=Math.floor(Math.max(Q.x,ee.x,le.x,Oe.x)),Tt=1;for(let Yt=Ze-Tt;Yt<=st+Tt;Yt++)Yt!==0&&B.push(new a.b4(Yt,w))}return B}coveringTiles(w){var B,Q;let ee=this.coveringZoomLevel(w),le=ee;if(w.minzoom!==void 0&&eew.maxzoom&&(ee=w.maxzoom);let Oe=this.pointCoordinate(this.getCameraPoint()),Ze=a.Z.fromLngLat(this.center),st=Math.pow(2,ee),Tt=[st*Oe.x,st*Oe.y,0],Yt=[st*Ze.x,st*Ze.y,0],Kt=ks.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,ee),xr=w.minzoom||0;!w.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(xr=ee);let Ir=w.terrain?2/Math.min(this.tileSize,w.tileSize)*this.tileSize:3,ve=Xe=>({aabb:new bc([Xe*st,0,0],[(Xe+1)*st,st,0]),zoom:0,x:0,y:0,wrap:Xe,fullyVisible:!1}),be=[],Re=[],qe=ee,et=w.reparseOverscaled?le:ee;if(this._renderWorldCopies)for(let Xe=1;Xe<=3;Xe++)be.push(ve(-Xe)),be.push(ve(Xe));for(be.push(ve(0));be.length>0;){let Xe=be.pop(),it=Xe.x,Ft=Xe.y,Ht=Xe.fullyVisible;if(!Ht){let Wr=Xe.aabb.intersects(Kt);if(Wr===0)continue;Ht=Wr===2}let tr=w.terrain?Tt:Yt,dr=Xe.aabb.distanceX(tr),Sr=Xe.aabb.distanceY(tr),Or=Math.max(Math.abs(dr),Math.abs(Sr));if(Xe.zoom===qe||Or>Ir+(1<=xr){let Wr=qe-Xe.zoom,ni=Tt[0]-.5-(it<>1),cn=Xe.zoom+1,ln=Xe.aabb.quadrant(Wr);if(w.terrain){let Cn=new a.S(cn,Xe.wrap,cn,ni,Pi),Kn=w.terrain.getMinMaxElevation(Cn),Aa=(B=Kn.minElevation)!==null&&B!==void 0?B:this.elevation,fa=(Q=Kn.maxElevation)!==null&&Q!==void 0?Q:this.elevation;ln=new bc([ln.min[0],ln.min[1],Aa],[ln.max[0],ln.max[1],fa])}be.push({aabb:ln,zoom:cn,x:ni,y:Pi,wrap:Xe.wrap,fullyVisible:Ht})}}return Re.sort((Xe,it)=>Xe.distanceSq-it.distanceSq).map(Xe=>Xe.tileID)}resize(w,B){this.width=w,this.height=B,this.pixelsToGLUnits=[2/w,-2/B],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(w){return Math.pow(2,w)}scaleZoom(w){return Math.log(w)/Math.LN2}project(w){let B=a.ac(w.lat,-85.051129,_u);return new a.P(a.O(w.lng)*this.worldSize,a.Q(B)*this.worldSize)}unproject(w){return new a.Z(w.x/this.worldSize,w.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(w){let B=this.elevation,Q=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,ee=this.pointLocation(this.centerPoint,w),le=w.getElevationForLngLatZoom(ee,this.tileZoom);if(!(this.elevation-le))return;let Oe=Q+B-le,Ze=Math.cos(this._pitch)*this.cameraToCenterDistance/Oe/a.b5(1,ee.lat),st=this.scaleZoom(Ze/this.tileSize);this._elevation=le,this._center=ee,this.zoom=st}setLocationAtPoint(w,B){let Q=this.pointCoordinate(B),ee=this.pointCoordinate(this.centerPoint),le=this.locationCoordinate(w),Oe=new a.Z(le.x-(Q.x-ee.x),le.y-(Q.y-ee.y));this.center=this.coordinateLocation(Oe),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(w,B){return B?this.coordinatePoint(this.locationCoordinate(w),B.getElevationForLngLatZoom(w,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(w))}pointLocation(w,B){return this.coordinateLocation(this.pointCoordinate(w,B))}locationCoordinate(w){return a.Z.fromLngLat(w)}coordinateLocation(w){return w&&w.toLngLat()}pointCoordinate(w,B){if(B){let xr=B.pointCoordinate(w);if(xr!=null)return xr}let Q=[w.x,w.y,0,1],ee=[w.x,w.y,1,1];a.af(Q,Q,this.pixelMatrixInverse),a.af(ee,ee,this.pixelMatrixInverse);let le=Q[3],Oe=ee[3],Ze=Q[1]/le,st=ee[1]/Oe,Tt=Q[2]/le,Yt=ee[2]/Oe,Kt=Tt===Yt?0:(0-Tt)/(Yt-Tt);return new a.Z(a.y.number(Q[0]/le,ee[0]/Oe,Kt)/this.worldSize,a.y.number(Ze,st,Kt)/this.worldSize)}coordinatePoint(w,B=0,Q=this.pixelMatrix){let ee=[w.x*this.worldSize,w.y*this.worldSize,B,1];return a.af(ee,ee,Q),new a.P(ee[0]/ee[3],ee[1]/ee[3])}getBounds(){let w=Math.max(0,this.height/2-this.getHorizon());return new ce().extend(this.pointLocation(new a.P(0,w))).extend(this.pointLocation(new a.P(this.width,w))).extend(this.pointLocation(new a.P(this.width,this.height))).extend(this.pointLocation(new a.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new ce([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(w){w?(this.lngRange=[w.getWest(),w.getEast()],this.latRange=[w.getSouth(),w.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,_u])}calculateTileMatrix(w){let B=w.canonical,Q=this.worldSize/this.zoomScale(B.z),ee=B.x+Math.pow(2,B.z)*w.wrap,le=a.an(new Float64Array(16));return a.J(le,le,[ee*Q,B.y*Q,0]),a.K(le,le,[Q/a.X,Q/a.X,1]),le}calculatePosMatrix(w,B=!1){let Q=w.key,ee=B?this._alignedPosMatrixCache:this._posMatrixCache;if(ee[Q])return ee[Q];let le=this.calculateTileMatrix(w);return a.L(le,B?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,le),ee[Q]=new Float32Array(le),ee[Q]}calculateFogMatrix(w){let B=w.key,Q=this._fogMatrixCache;if(Q[B])return Q[B];let ee=this.calculateTileMatrix(w);return a.L(ee,this.fogMatrix,ee),Q[B]=new Float32Array(ee),Q[B]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(w,B){B=a.ac(+B,this.minZoom,this.maxZoom);let Q={center:new a.N(w.lng,w.lat),zoom:B},ee=this.lngRange;if(!this._renderWorldCopies&&ee===null){let Xe=179.9999999999;ee=[-Xe,Xe]}let le=this.tileSize*this.zoomScale(Q.zoom),Oe=0,Ze=le,st=0,Tt=le,Yt=0,Kt=0,{x:xr,y:Ir}=this.size;if(this.latRange){let Xe=this.latRange;Oe=a.Q(Xe[1])*le,Ze=a.Q(Xe[0])*le,Ze-OeZe&&(qe=Ze-Xe)}if(ee){let Xe=(st+Tt)/2,it=ve;this._renderWorldCopies&&(it=a.b3(ve,Xe-le/2,Xe+le/2));let Ft=xr/2;it-FtTt&&(Re=Tt-Ft)}if(Re!==void 0||qe!==void 0){let Xe=new a.P(Re!=null?Re:ve,qe!=null?qe:be);Q.center=this.unproject.call({worldSize:le},Xe).wrap()}return Q}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let w=this._unmodified,{center:B,zoom:Q}=this.getConstrained(this.center,this.zoom);this.center=B,this.zoom=Q,this._unmodified=w,this._constraining=!1}_calcMatrices(){if(!this.height)return;let w=this.centerOffset,B=this.point.x,Q=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=a.b5(1,this.center.lat)*this.worldSize;let ee=a.an(new Float64Array(16));a.K(ee,ee,[this.width/2,-this.height/2,1]),a.J(ee,ee,[1,-1,0]),this.labelPlaneMatrix=ee,ee=a.an(new Float64Array(16)),a.K(ee,ee,[1,-1,1]),a.J(ee,ee,[-1,-1,0]),a.K(ee,ee,[2/this.width,2/this.height,1]),this.glCoordMatrix=ee;let le=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),Oe=Math.min(this.elevation,this.minElevationForCurrentTile),Ze=le-Oe*this._pixelPerMeter/Math.cos(this._pitch),st=Oe<0?Ze:le,Tt=Math.PI/2+this._pitch,Yt=this._fov*(.5+w.y/this.height),Kt=Math.sin(Yt)*st/Math.sin(a.ac(Math.PI-Tt-Yt,.01,Math.PI-.01)),xr=this.getHorizon(),Ir=2*Math.atan(xr/this.cameraToCenterDistance)*(.5+w.y/(2*xr)),ve=Math.sin(Ir)*st/Math.sin(a.ac(Math.PI-Tt-Ir,.01,Math.PI-.01)),be=Math.min(Kt,ve);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*be+st),this.nearZ=this.height/50,ee=new Float64Array(16),a.b6(ee,this._fov,this.width/this.height,this.nearZ,this.farZ),ee[8]=2*-w.x/this.width,ee[9]=2*w.y/this.height,this.projectionMatrix=a.ae(ee),a.K(ee,ee,[1,-1,1]),a.J(ee,ee,[0,0,-this.cameraToCenterDistance]),a.b7(ee,ee,this._pitch),a.ad(ee,ee,this.angle),a.J(ee,ee,[-B,-Q,0]),this.mercatorMatrix=a.K([],ee,[this.worldSize,this.worldSize,this.worldSize]),a.K(ee,ee,[1,1,this._pixelPerMeter]),this.pixelMatrix=a.L(new Float64Array(16),this.labelPlaneMatrix,ee),a.J(ee,ee,[0,0,-this.elevation]),this.modelViewProjectionMatrix=ee,this.invModelViewProjectionMatrix=a.as([],ee),this.fogMatrix=new Float64Array(16),a.b6(this.fogMatrix,this._fov,this.width/this.height,le,this.farZ),this.fogMatrix[8]=2*-w.x/this.width,this.fogMatrix[9]=2*w.y/this.height,a.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),a.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),a.b7(this.fogMatrix,this.fogMatrix,this._pitch),a.ad(this.fogMatrix,this.fogMatrix,this.angle),a.J(this.fogMatrix,this.fogMatrix,[-B,-Q,0]),a.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),a.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=a.L(new Float64Array(16),this.labelPlaneMatrix,ee);let Re=this.width%2/2,qe=this.height%2/2,et=Math.cos(this.angle),Xe=Math.sin(this.angle),it=B-Math.round(B)+et*Re+Xe*qe,Ft=Q-Math.round(Q)+et*qe+Xe*Re,Ht=new Float64Array(ee);if(a.J(Ht,Ht,[it>.5?it-1:it,Ft>.5?Ft-1:Ft,0]),this.alignedModelViewProjectionMatrix=Ht,ee=a.as(new Float64Array(16),this.pixelMatrix),!ee)throw new Error("failed to invert matrix");this.pixelMatrixInverse=ee,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;let w=this.pointCoordinate(new a.P(0,0)),B=[w.x*this.worldSize,w.y*this.worldSize,0,1];return a.af(B,B,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){let w=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new a.P(0,w))}getCameraQueryGeometry(w){let B=this.getCameraPoint();if(w.length===1)return[w[0],B];{let Q=B.x,ee=B.y,le=B.x,Oe=B.y;for(let Ze of w)Q=Math.min(Q,Ze.x),ee=Math.min(ee,Ze.y),le=Math.max(le,Ze.x),Oe=Math.max(Oe,Ze.y);return[new a.P(Q,ee),new a.P(le,ee),new a.P(le,Oe),new a.P(Q,Oe),new a.P(Q,ee)]}}lngLatToCameraDepth(w,B){let Q=this.locationCoordinate(w),ee=[Q.x*this.worldSize,Q.y*this.worldSize,B,1];return a.af(ee,ee,this.modelViewProjectionMatrix),ee[2]/ee[3]}}function nh(ue,w){let B,Q=!1,ee=null,le=null,Oe=()=>{ee=null,Q&&(ue.apply(le,B),ee=setTimeout(Oe,w),Q=!1)};return(...Ze)=>(Q=!0,le=this,B=Ze,ee||Oe(),ee)}class Mh{constructor(w){this._getCurrentHash=()=>{let B=window.location.hash.replace("#","");if(this._hashName){let Q;return B.split("&").map(ee=>ee.split("=")).forEach(ee=>{ee[0]===this._hashName&&(Q=ee)}),(Q&&Q[1]||"").split("/")}return B.split("/")},this._onHashChange=()=>{let B=this._getCurrentHash();if(B.length>=3&&!B.some(Q=>isNaN(Q))){let Q=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(B[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+B[2],+B[1]],zoom:+B[0],bearing:Q,pitch:+(B[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{let B=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,B)},this._removeHash=()=>{let B=this._getCurrentHash();if(B.length===0)return;let Q=B.join("/"),ee=Q;ee.split("&").length>0&&(ee=ee.split("&")[0]),this._hashName&&(ee=`${this._hashName}=${Q}`);let le=window.location.hash.replace(ee,"");le.startsWith("#&")?le=le.slice(0,1)+le.slice(2):le==="#"&&(le="");let Oe=window.location.href.replace(/(#.+)?$/,le);Oe=Oe.replace("&&","&"),window.history.replaceState(window.history.state,null,Oe)},this._updateHash=nh(this._updateHashUnthrottled,300),this._hashName=w&&encodeURIComponent(w)}addTo(w){return this._map=w,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(w){let B=this._map.getCenter(),Q=Math.round(100*this._map.getZoom())/100,ee=Math.ceil((Q*Math.LN2+Math.log(512/360/.5))/Math.LN10),le=Math.pow(10,ee),Oe=Math.round(B.lng*le)/le,Ze=Math.round(B.lat*le)/le,st=this._map.getBearing(),Tt=this._map.getPitch(),Yt="";if(Yt+=w?`/${Oe}/${Ze}/${Q}`:`${Q}/${Ze}/${Oe}`,(st||Tt)&&(Yt+="/"+Math.round(10*st)/10),Tt&&(Yt+=`/${Math.round(Tt)}`),this._hashName){let Kt=this._hashName,xr=!1,Ir=window.location.hash.slice(1).split("&").map(ve=>{let be=ve.split("=")[0];return be===Kt?(xr=!0,`${be}=${Yt}`):ve}).filter(ve=>ve);return xr||Ir.push(`${Kt}=${Yt}`),`#${Ir.join("&")}`}return`#${Yt}`}}let zu={linearity:.3,easing:a.b8(0,0,.3,1)},Fc=a.e({deceleration:2500,maxSpeed:1400},zu),wc=a.e({deceleration:20,maxSpeed:1400},zu),bd=a.e({deceleration:1e3,maxSpeed:360},zu),xf=a.e({deceleration:1e3,maxSpeed:90},zu);class Pf{constructor(w){this._map=w,this.clear()}clear(){this._inertiaBuffer=[]}record(w){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:u.now(),settings:w})}_drainInertiaBuffer(){let w=this._inertiaBuffer,B=u.now();for(;w.length>0&&B-w[0].time>160;)w.shift()}_onMoveEnd(w){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let B={zoom:0,bearing:0,pitch:0,pan:new a.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:le}of this._inertiaBuffer)B.zoom+=le.zoomDelta||0,B.bearing+=le.bearingDelta||0,B.pitch+=le.pitchDelta||0,le.panDelta&&B.pan._add(le.panDelta),le.around&&(B.around=le.around),le.pinchAround&&(B.pinchAround=le.pinchAround);let Q=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,ee={};if(B.pan.mag()){let le=bf(B.pan.mag(),Q,a.e({},Fc,w||{}));ee.offset=B.pan.mult(le.amount/B.pan.mag()),ee.center=this._map.transform.center,Ou(ee,le)}if(B.zoom){let le=bf(B.zoom,Q,wc);ee.zoom=this._map.transform.zoom+le.amount,Ou(ee,le)}if(B.bearing){let le=bf(B.bearing,Q,bd);ee.bearing=this._map.transform.bearing+a.ac(le.amount,-179,179),Ou(ee,le)}if(B.pitch){let le=bf(B.pitch,Q,xf);ee.pitch=this._map.transform.pitch+le.amount,Ou(ee,le)}if(ee.zoom||ee.bearing){let le=B.pinchAround===void 0?B.around:B.pinchAround;ee.around=le?this._map.unproject(le):this._map.getCenter()}return this.clear(),a.e(ee,{noMoveStart:!0})}}function Ou(ue,w){(!ue.duration||ue.durationB.unproject(st)),Ze=le.reduce((st,Tt,Yt,Kt)=>st.add(Tt.div(Kt.length)),new a.P(0,0));super(w,{points:le,point:Ze,lngLats:Oe,lngLat:B.unproject(Ze),originalEvent:Q}),this._defaultPrevented=!1}}class Xh extends a.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(w,B,Q){super(w,{originalEvent:Q}),this._defaultPrevented=!1}}class If{constructor(w,B){this._map=w,this._clickTolerance=B.clickTolerance}reset(){delete this._mousedownPos}wheel(w){return this._firePreventable(new Xh(w.type,this._map,w))}mousedown(w,B){return this._mousedownPos=B,this._firePreventable(new jl(w.type,this._map,w))}mouseup(w){this._map.fire(new jl(w.type,this._map,w))}click(w,B){this._mousedownPos&&this._mousedownPos.dist(B)>=this._clickTolerance||this._map.fire(new jl(w.type,this._map,w))}dblclick(w){return this._firePreventable(new jl(w.type,this._map,w))}mouseover(w){this._map.fire(new jl(w.type,this._map,w))}mouseout(w){this._map.fire(new jl(w.type,this._map,w))}touchstart(w){return this._firePreventable(new lf(w.type,this._map,w))}touchmove(w){this._map.fire(new lf(w.type,this._map,w))}touchend(w){this._map.fire(new lf(w.type,this._map,w))}touchcancel(w){this._map.fire(new lf(w.type,this._map,w))}_firePreventable(w){if(this._map.fire(w),w.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Cs{constructor(w){this._map=w}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(w){this._map.fire(new jl(w.type,this._map,w))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new jl("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(w){this._delayContextMenu?this._contextMenuEvent=w:this._ignoreContextMenu||this._map.fire(new jl(w.type,this._map,w)),this._map.listens("contextmenu")&&w.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class du{constructor(w){this._map=w}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(w){return this.transform.pointLocation(a.P.convert(w),this._map.terrain)}}class ku{constructor(w,B){this._map=w,this._tr=new du(w),this._el=w.getCanvasContainer(),this._container=w.getContainer(),this._clickTolerance=B.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(w,B){this.isEnabled()&&w.shiftKey&&w.button===0&&(c.disableDrag(),this._startPos=this._lastPos=B,this._active=!0)}mousemoveWindow(w,B){if(!this._active)return;let Q=B;if(this._lastPos.equals(Q)||!this._box&&Q.dist(this._startPos)le.fitScreenCoordinates(Q,ee,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",w)}keydown(w){this._active&&w.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",w))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(c.remove(this._box),this._box=null),c.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(w,B){return this._map.fire(new a.k(w,{originalEvent:B}))}}function Xf(ue,w){if(ue.length!==w.length)throw new Error(`The number of touches and points are not equal - touches ${ue.length}, points ${w.length}`);let B={};for(let Q=0;Qthis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=w.timeStamp),Q.length===this.numTouches&&(this.centroid=function(ee){let le=new a.P(0,0);for(let Oe of ee)le._add(Oe);return le.div(ee.length)}(B),this.touches=Xf(Q,B)))}touchmove(w,B,Q){if(this.aborted||!this.centroid)return;let ee=Xf(Q,B);for(let le in this.touches){let Oe=ee[le];(!Oe||Oe.dist(this.touches[le])>30)&&(this.aborted=!0)}}touchend(w,B,Q){if((!this.centroid||w.timeStamp-this.startTime>500)&&(this.aborted=!0),Q.length===0){let ee=!this.aborted&&this.centroid;if(this.reset(),ee)return ee}}}class wf{constructor(w){this.singleTap=new Us(w),this.numTaps=w.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(w,B,Q){this.singleTap.touchstart(w,B,Q)}touchmove(w,B,Q){this.singleTap.touchmove(w,B,Q)}touchend(w,B,Q){let ee=this.singleTap.touchend(w,B,Q);if(ee){let le=w.timeStamp-this.lastTime<500,Oe=!this.lastTap||this.lastTap.dist(ee)<30;if(le&&Oe||this.reset(),this.count++,this.lastTime=w.timeStamp,this.lastTap=ee,this.count===this.numTaps)return this.reset(),ee}}}class zc{constructor(w){this._tr=new du(w),this._zoomIn=new wf({numTouches:1,numTaps:2}),this._zoomOut=new wf({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(w,B,Q){this._zoomIn.touchstart(w,B,Q),this._zoomOut.touchstart(w,B,Q)}touchmove(w,B,Q){this._zoomIn.touchmove(w,B,Q),this._zoomOut.touchmove(w,B,Q)}touchend(w,B,Q){let ee=this._zoomIn.touchend(w,B,Q),le=this._zoomOut.touchend(w,B,Q),Oe=this._tr;return ee?(this._active=!0,w.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Ze=>Ze.easeTo({duration:300,zoom:Oe.zoom+1,around:Oe.unproject(ee)},{originalEvent:w})}):le?(this._active=!0,w.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Ze=>Ze.easeTo({duration:300,zoom:Oe.zoom-1,around:Oe.unproject(le)},{originalEvent:w})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Wu{constructor(w){this._enabled=!!w.enable,this._moveStateManager=w.moveStateManager,this._clickTolerance=w.clickTolerance||1,this._moveFunction=w.move,this._activateOnStart=!!w.activateOnStart,w.assignEvents(this),this.reset()}reset(w){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(w)}_move(...w){let B=this._moveFunction(...w);if(B.bearingDelta||B.pitchDelta||B.around||B.panDelta)return this._active=!0,B}dragStart(w,B){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(w)&&(this._moveStateManager.startMove(w),this._lastPoint=B.length?B[0]:B,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(w,B){if(!this.isEnabled())return;let Q=this._lastPoint;if(!Q)return;if(w.preventDefault(),!this._moveStateManager.isValidMoveEvent(w))return void this.reset(w);let ee=B.length?B[0]:B;return!this._moved&&ee.dist(Q){ue.mousedown=ue.dragStart,ue.mousemoveWindow=ue.dragMove,ue.mouseup=ue.dragEnd,ue.contextmenu=w=>{w.preventDefault()}},Wl=({enable:ue,clickTolerance:w,bearingDegreesPerPixelMoved:B=.8})=>{let Q=new Xu({checkCorrectEvent:ee=>c.mouseButton(ee)===0&&ee.ctrlKey||c.mouseButton(ee)===2});return new Wu({clickTolerance:w,move:(ee,le)=>({bearingDelta:(le.x-ee.x)*B}),moveStateManager:Q,enable:ue,assignEvents:Zf})},ah=({enable:ue,clickTolerance:w,pitchDegreesPerPixelMoved:B=-.5})=>{let Q=new Xu({checkCorrectEvent:ee=>c.mouseButton(ee)===0&&ee.ctrlKey||c.mouseButton(ee)===2});return new Wu({clickTolerance:w,move:(ee,le)=>({pitchDelta:(le.y-ee.y)*B}),moveStateManager:Q,enable:ue,assignEvents:Zf})};class Zu{constructor(w,B){this._clickTolerance=w.clickTolerance||1,this._map=B,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new a.P(0,0)}_shouldBePrevented(w){return w<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(w,B,Q){return this._calculateTransform(w,B,Q)}touchmove(w,B,Q){if(this._active){if(!this._shouldBePrevented(Q.length))return w.preventDefault(),this._calculateTransform(w,B,Q);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",w)}}touchend(w,B,Q){this._calculateTransform(w,B,Q),this._active&&this._shouldBePrevented(Q.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(w,B,Q){Q.length>0&&(this._active=!0);let ee=Xf(Q,B),le=new a.P(0,0),Oe=new a.P(0,0),Ze=0;for(let Tt in ee){let Yt=ee[Tt],Kt=this._touches[Tt];Kt&&(le._add(Yt),Oe._add(Yt.sub(Kt)),Ze++,ee[Tt]=Yt)}if(this._touches=ee,this._shouldBePrevented(Ze)||!Oe.mag())return;let st=Oe.div(Ze);return this._sum._add(st),this._sum.mag()Math.abs(ue.x)}class Bc extends Oc{constructor(w){super(),this._currentTouchCount=0,this._map=w}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(w,B,Q){super.touchstart(w,B,Q),this._currentTouchCount=Q.length}_start(w){this._lastPoints=w,fc(w[0].sub(w[1]))&&(this._valid=!1)}_move(w,B,Q){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let ee=w[0].sub(this._lastPoints[0]),le=w[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(ee,le,Q.timeStamp),this._valid?(this._lastPoints=w,this._active=!0,{pitchDelta:(ee.y+le.y)/2*-.5}):void 0}gestureBeginsVertically(w,B,Q){if(this._valid!==void 0)return this._valid;let ee=w.mag()>=2,le=B.mag()>=2;if(!ee&&!le)return;if(!ee||!le)return this._firstMove===void 0&&(this._firstMove=Q),Q-this._firstMove<100&&void 0;let Oe=w.y>0==B.y>0;return fc(w)&&fc(B)&&Oe}}let At={panStep:100,bearingStep:15,pitchStep:10};class Xt{constructor(w){this._tr=new du(w);let B=At;this._panStep=B.panStep,this._bearingStep=B.bearingStep,this._pitchStep=B.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(w){if(w.altKey||w.ctrlKey||w.metaKey)return;let B=0,Q=0,ee=0,le=0,Oe=0;switch(w.keyCode){case 61:case 107:case 171:case 187:B=1;break;case 189:case 109:case 173:B=-1;break;case 37:w.shiftKey?Q=-1:(w.preventDefault(),le=-1);break;case 39:w.shiftKey?Q=1:(w.preventDefault(),le=1);break;case 38:w.shiftKey?ee=1:(w.preventDefault(),Oe=-1);break;case 40:w.shiftKey?ee=-1:(w.preventDefault(),Oe=1);break;default:return}return this._rotationDisabled&&(Q=0,ee=0),{cameraAnimation:Ze=>{let st=this._tr;Ze.easeTo({duration:300,easeId:"keyboardHandler",easing:Cr,zoom:B?Math.round(st.zoom)+B*(w.shiftKey?2:1):st.zoom,bearing:st.bearing+Q*this._bearingStep,pitch:st.pitch+ee*this._pitchStep,offset:[-le*this._panStep,-Oe*this._panStep],center:st.center},{originalEvent:w})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function Cr(ue){return ue*(2-ue)}let Ar=4.000244140625;class Kr{constructor(w,B){this._onTimeout=Q=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(Q)},this._map=w,this._tr=new du(w),this._triggerRenderFrame=B,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(w){this._defaultZoomRate=w}setWheelZoomRate(w){this._wheelZoomRate=w}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(w){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!w&&w.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(w){return!!this._map.cooperativeGestures.isEnabled()&&!(w.ctrlKey||this._map.cooperativeGestures.isBypassed(w))}wheel(w){if(!this.isEnabled())return;if(this._shouldBePrevented(w))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",w);let B=w.deltaMode===WheelEvent.DOM_DELTA_LINE?40*w.deltaY:w.deltaY,Q=u.now(),ee=Q-(this._lastWheelEventTime||0);this._lastWheelEventTime=Q,B!==0&&B%Ar==0?this._type="wheel":B!==0&&Math.abs(B)<4?this._type="trackpad":ee>400?(this._type=null,this._lastValue=B,this._timeout=setTimeout(this._onTimeout,40,w)):this._type||(this._type=Math.abs(ee*B)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,B+=this._lastValue)),w.shiftKey&&B&&(B/=4),this._type&&(this._lastWheelEvent=w,this._delta-=B,this._active||this._start(w)),w.preventDefault()}_start(w){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let B=c.mousePos(this._map.getCanvas(),w),Q=this._tr;this._around=B.y>Q.transform.height/2-Q.transform.getHorizon()?a.N.convert(this._aroundCenter?Q.center:Q.unproject(B)):a.N.convert(Q.center),this._aroundPoint=Q.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;let w=this._tr.transform;if(this._delta!==0){let st=this._type==="wheel"&&Math.abs(this._delta)>Ar?this._wheelZoomRate:this._defaultZoomRate,Tt=2/(1+Math.exp(-Math.abs(this._delta*st)));this._delta<0&&Tt!==0&&(Tt=1/Tt);let Yt=typeof this._targetZoom=="number"?w.zoomScale(this._targetZoom):w.scale;this._targetZoom=Math.min(w.maxZoom,Math.max(w.minZoom,w.scaleZoom(Yt*Tt))),this._type==="wheel"&&(this._startZoom=w.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let B=typeof this._targetZoom=="number"?this._targetZoom:w.zoom,Q=this._startZoom,ee=this._easing,le,Oe=!1,Ze=u.now()-this._lastWheelEventTime;if(this._type==="wheel"&&Q&&ee&&Ze){let st=Math.min(Ze/200,1),Tt=ee(st);le=a.y.number(Q,B,Tt),st<1?this._frameId||(this._frameId=!0):Oe=!0}else le=B,Oe=!0;return this._active=!0,Oe&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!Oe,zoomDelta:le-w.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(w){let B=a.b9;if(this._prevEase){let Q=this._prevEase,ee=(u.now()-Q.start)/Q.duration,le=Q.easing(ee+.01)-Q.easing(ee),Oe=.27/Math.sqrt(le*le+1e-4)*.01,Ze=Math.sqrt(.0729-Oe*Oe);B=a.b8(Oe,Ze,.25,1)}return this._prevEase={start:u.now(),duration:w,easing:B},B}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class ki{constructor(w,B){this._clickZoom=w,this._tapZoom=B}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class Xi{constructor(w){this._tr=new du(w),this.reset()}reset(){this._active=!1}dblclick(w,B){return w.preventDefault(),{cameraAnimation:Q=>{Q.easeTo({duration:300,zoom:this._tr.zoom+(w.shiftKey?-1:1),around:this._tr.unproject(B)},{originalEvent:w})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class dn{constructor(){this._tap=new wf({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(w,B,Q){if(!this._swipePoint)if(this._tapTime){let ee=B[0],le=w.timeStamp-this._tapTime<500,Oe=this._tapPoint.dist(ee)<30;le&&Oe?Q.length>0&&(this._swipePoint=ee,this._swipeTouch=Q[0].identifier):this.reset()}else this._tap.touchstart(w,B,Q)}touchmove(w,B,Q){if(this._tapTime){if(this._swipePoint){if(Q[0].identifier!==this._swipeTouch)return;let ee=B[0],le=ee.y-this._swipePoint.y;return this._swipePoint=ee,w.preventDefault(),this._active=!0,{zoomDelta:le/128}}}else this._tap.touchmove(w,B,Q)}touchend(w,B,Q){if(this._tapTime)this._swipePoint&&Q.length===0&&this.reset();else{let ee=this._tap.touchend(w,B,Q);ee&&(this._tapTime=w.timeStamp,this._tapPoint=ee)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class wn{constructor(w,B,Q){this._el=w,this._mousePan=B,this._touchPan=Q}enable(w){this._inertiaOptions=w||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Nn{constructor(w,B,Q){this._pitchWithRotate=w.pitchWithRotate,this._mouseRotate=B,this._mousePitch=Q}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class Yi{constructor(w,B,Q,ee){this._el=w,this._touchZoom=B,this._touchRotate=Q,this._tapDragZoom=ee,this._rotationDisabled=!1,this._enabled=!0}enable(w){this._touchZoom.enable(w),this._rotationDisabled||this._touchRotate.enable(w),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class Qi{constructor(w,B){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=w,this._options=B,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let w=this._map.getCanvasContainer();w.classList.add("maplibregl-cooperative-gestures"),this._container=c.create("div","maplibregl-cooperative-gesture-screen",w);let B=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(B=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let Q=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),ee=document.createElement("div");ee.className="maplibregl-desktop-message",ee.textContent=B,this._container.appendChild(ee);let le=document.createElement("div");le.className="maplibregl-mobile-message",le.textContent=Q,this._container.appendChild(le),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(c.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(w){return w[this._bypassKey]}notifyGestureBlocked(w,B){this._enabled&&(this._map.fire(new a.k("cooperativegestureprevented",{gestureType:w,originalEvent:B})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let on=ue=>ue.zoom||ue.drag||ue.pitch||ue.rotate;class Fi extends a.k{}function Qn(ue){return ue.panDelta&&ue.panDelta.mag()||ue.zoomDelta||ue.bearingDelta||ue.pitchDelta}class Ca{constructor(w,B){this.handleWindowEvent=ee=>{this.handleEvent(ee,`${ee.type}Window`)},this.handleEvent=(ee,le)=>{if(ee.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let Oe=ee.type==="renderFrame"?void 0:ee,Ze={needsRenderFrame:!1},st={},Tt={},Yt=ee.touches,Kt=Yt?this._getMapTouches(Yt):void 0,xr=Kt?c.touchPos(this._map.getCanvas(),Kt):c.mousePos(this._map.getCanvas(),ee);for(let{handlerName:be,handler:Re,allowed:qe}of this._handlers){if(!Re.isEnabled())continue;let et;this._blockedByActive(Tt,qe,be)?Re.reset():Re[le||ee.type]&&(et=Re[le||ee.type](ee,xr,Kt),this.mergeHandlerResult(Ze,st,et,be,Oe),et&&et.needsRenderFrame&&this._triggerRenderFrame()),(et||Re.isActive())&&(Tt[be]=Re)}let Ir={};for(let be in this._previousActiveHandlers)Tt[be]||(Ir[be]=Oe);this._previousActiveHandlers=Tt,(Object.keys(Ir).length||Qn(Ze))&&(this._changes.push([Ze,st,Ir]),this._triggerRenderFrame()),(Object.keys(Tt).length||Qn(Ze))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:ve}=Ze;ve&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],ve(this._map))},this._map=w,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Pf(w),this._bearingSnap=B.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(B);let Q=this._el;this._listeners=[[Q,"touchstart",{passive:!0}],[Q,"touchmove",{passive:!1}],[Q,"touchend",void 0],[Q,"touchcancel",void 0],[Q,"mousedown",void 0],[Q,"mousemove",void 0],[Q,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[Q,"mouseover",void 0],[Q,"mouseout",void 0],[Q,"dblclick",void 0],[Q,"click",void 0],[Q,"keydown",{capture:!1}],[Q,"keyup",void 0],[Q,"wheel",{passive:!1}],[Q,"contextmenu",void 0],[window,"blur",void 0]];for(let[ee,le,Oe]of this._listeners)c.addEventListener(ee,le,ee===document?this.handleWindowEvent:this.handleEvent,Oe)}destroy(){for(let[w,B,Q]of this._listeners)c.removeEventListener(w,B,w===document?this.handleWindowEvent:this.handleEvent,Q)}_addDefaultHandlers(w){let B=this._map,Q=B.getCanvasContainer();this._add("mapEvent",new If(B,w));let ee=B.boxZoom=new ku(B,w);this._add("boxZoom",ee),w.interactive&&w.boxZoom&&ee.enable();let le=B.cooperativeGestures=new Qi(B,w.cooperativeGestures);this._add("cooperativeGestures",le),w.cooperativeGestures&&le.enable();let Oe=new zc(B),Ze=new Xi(B);B.doubleClickZoom=new ki(Ze,Oe),this._add("tapZoom",Oe),this._add("clickZoom",Ze),w.interactive&&w.doubleClickZoom&&B.doubleClickZoom.enable();let st=new dn;this._add("tapDragZoom",st);let Tt=B.touchPitch=new Bc(B);this._add("touchPitch",Tt),w.interactive&&w.touchPitch&&B.touchPitch.enable(w.touchPitch);let Yt=Wl(w),Kt=ah(w);B.dragRotate=new Nn(w,Yt,Kt),this._add("mouseRotate",Yt,["mousePitch"]),this._add("mousePitch",Kt,["mouseRotate"]),w.interactive&&w.dragRotate&&B.dragRotate.enable();let xr=(({enable:et,clickTolerance:Xe})=>{let it=new Xu({checkCorrectEvent:Ft=>c.mouseButton(Ft)===0&&!Ft.ctrlKey});return new Wu({clickTolerance:Xe,move:(Ft,Ht)=>({around:Ht,panDelta:Ht.sub(Ft)}),activateOnStart:!0,moveStateManager:it,enable:et,assignEvents:Zf})})(w),Ir=new Zu(w,B);B.dragPan=new wn(Q,xr,Ir),this._add("mousePan",xr),this._add("touchPan",Ir,["touchZoom","touchRotate"]),w.interactive&&w.dragPan&&B.dragPan.enable(w.dragPan);let ve=new cf,be=new vu;B.touchZoomRotate=new Yi(Q,be,ve,st),this._add("touchRotate",ve,["touchPan","touchZoom"]),this._add("touchZoom",be,["touchPan","touchRotate"]),w.interactive&&w.touchZoomRotate&&B.touchZoomRotate.enable(w.touchZoomRotate);let Re=B.scrollZoom=new Kr(B,()=>this._triggerRenderFrame());this._add("scrollZoom",Re,["mousePan"]),w.interactive&&w.scrollZoom&&B.scrollZoom.enable(w.scrollZoom);let qe=B.keyboard=new Xt(B);this._add("keyboard",qe),w.interactive&&w.keyboard&&B.keyboard.enable(),this._add("blockableMapEvent",new Cs(B))}_add(w,B,Q){this._handlers.push({handlerName:w,handler:B,allowed:Q}),this._handlersById[w]=B}stop(w){if(!this._updatingCamera){for(let{handler:B}of this._handlers)B.reset();this._inertia.clear(),this._fireEvents({},{},w),this._changes=[]}}isActive(){for(let{handler:w}of this._handlers)if(w.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!on(this._eventsInProgress)||this.isZooming()}_blockedByActive(w,B,Q){for(let ee in w)if(ee!==Q&&(!B||B.indexOf(ee)<0))return!0;return!1}_getMapTouches(w){let B=[];for(let Q of w)this._el.contains(Q.target)&&B.push(Q);return B}mergeHandlerResult(w,B,Q,ee,le){if(!Q)return;a.e(w,Q);let Oe={handlerName:ee,originalEvent:Q.originalEvent||le};Q.zoomDelta!==void 0&&(B.zoom=Oe),Q.panDelta!==void 0&&(B.drag=Oe),Q.pitchDelta!==void 0&&(B.pitch=Oe),Q.bearingDelta!==void 0&&(B.rotate=Oe)}_applyChanges(){let w={},B={},Q={};for(let[ee,le,Oe]of this._changes)ee.panDelta&&(w.panDelta=(w.panDelta||new a.P(0,0))._add(ee.panDelta)),ee.zoomDelta&&(w.zoomDelta=(w.zoomDelta||0)+ee.zoomDelta),ee.bearingDelta&&(w.bearingDelta=(w.bearingDelta||0)+ee.bearingDelta),ee.pitchDelta&&(w.pitchDelta=(w.pitchDelta||0)+ee.pitchDelta),ee.around!==void 0&&(w.around=ee.around),ee.pinchAround!==void 0&&(w.pinchAround=ee.pinchAround),ee.noInertia&&(w.noInertia=ee.noInertia),a.e(B,le),a.e(Q,Oe);this._updateMapTransform(w,B,Q),this._changes=[]}_updateMapTransform(w,B,Q){let ee=this._map,le=ee._getTransformForUpdate(),Oe=ee.terrain;if(!(Qn(w)||Oe&&this._terrainMovement))return this._fireEvents(B,Q,!0);let{panDelta:Ze,zoomDelta:st,bearingDelta:Tt,pitchDelta:Yt,around:Kt,pinchAround:xr}=w;xr!==void 0&&(Kt=xr),ee._stop(!0),Kt=Kt||ee.transform.centerPoint;let Ir=le.pointLocation(Ze?Kt.sub(Ze):Kt);Tt&&(le.bearing+=Tt),Yt&&(le.pitch+=Yt),st&&(le.zoom+=st),Oe?this._terrainMovement||!B.drag&&!B.zoom?B.drag&&this._terrainMovement?le.center=le.pointLocation(le.centerPoint.sub(Ze)):le.setLocationAtPoint(Ir,Kt):(this._terrainMovement=!0,this._map._elevationFreeze=!0,le.setLocationAtPoint(Ir,Kt)):le.setLocationAtPoint(Ir,Kt),ee._applyUpdatedTransform(le),this._map._update(),w.noInertia||this._inertia.record(w),this._fireEvents(B,Q,!0)}_fireEvents(w,B,Q){let ee=on(this._eventsInProgress),le=on(w),Oe={};for(let Kt in w){let{originalEvent:xr}=w[Kt];this._eventsInProgress[Kt]||(Oe[`${Kt}start`]=xr),this._eventsInProgress[Kt]=w[Kt]}!ee&&le&&this._fireEvent("movestart",le.originalEvent);for(let Kt in Oe)this._fireEvent(Kt,Oe[Kt]);le&&this._fireEvent("move",le.originalEvent);for(let Kt in w){let{originalEvent:xr}=w[Kt];this._fireEvent(Kt,xr)}let Ze={},st;for(let Kt in this._eventsInProgress){let{handlerName:xr,originalEvent:Ir}=this._eventsInProgress[Kt];this._handlersById[xr].isActive()||(delete this._eventsInProgress[Kt],st=B[xr]||Ir,Ze[`${Kt}end`]=st)}for(let Kt in Ze)this._fireEvent(Kt,Ze[Kt]);let Tt=on(this._eventsInProgress),Yt=(ee||le)&&!Tt;if(Yt&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Kt=this._map._getTransformForUpdate();Kt.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Kt)}if(Q&&Yt){this._updatingCamera=!0;let Kt=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),xr=Ir=>Ir!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new Fi("renderFrame",{timeStamp:w})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Ra extends a.E{constructor(w,B){super(),this._renderFrameCallback=()=>{let Q=Math.min((u.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(Q)),Q<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=w,this._bearingSnap=B.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new a.N(this.transform.center.lng,this.transform.center.lat)}setCenter(w,B){return this.jumpTo({center:w},B)}panBy(w,B,Q){return w=a.P.convert(w).mult(-1),this.panTo(this.transform.center,a.e({offset:w},B),Q)}panTo(w,B,Q){return this.easeTo(a.e({center:w},B),Q)}getZoom(){return this.transform.zoom}setZoom(w,B){return this.jumpTo({zoom:w},B),this}zoomTo(w,B,Q){return this.easeTo(a.e({zoom:w},B),Q)}zoomIn(w,B){return this.zoomTo(this.getZoom()+1,w,B),this}zoomOut(w,B){return this.zoomTo(this.getZoom()-1,w,B),this}getBearing(){return this.transform.bearing}setBearing(w,B){return this.jumpTo({bearing:w},B),this}getPadding(){return this.transform.padding}setPadding(w,B){return this.jumpTo({padding:w},B),this}rotateTo(w,B,Q){return this.easeTo(a.e({bearing:w},B),Q)}resetNorth(w,B){return this.rotateTo(0,a.e({duration:1e3},w),B),this}resetNorthPitch(w,B){return this.easeTo(a.e({bearing:0,pitch:0,duration:1e3},w),B),this}snapToNorth(w,B){return Math.abs(this.getBearing()){if(this._zooming&&(ee.zoom=a.y.number(le,Re,tr)),this._rotating&&(ee.bearing=a.y.number(Oe,Tt,tr)),this._pitching&&(ee.pitch=a.y.number(Ze,Yt,tr)),this._padding&&(ee.interpolatePadding(st,Kt,tr),Ir=ee.centerPoint.add(xr)),this.terrain&&!w.freezeElevation&&this._updateElevation(tr),it)ee.setLocationAtPoint(it,Ft);else{let dr=ee.zoomScale(ee.zoom-le),Sr=Re>le?Math.min(2,Xe):Math.max(.5,Xe),Or=Math.pow(Sr,1-tr),Wr=ee.unproject(qe.add(et.mult(tr*Or)).mult(dr));ee.setLocationAtPoint(ee.renderWorldCopies?Wr.wrap():Wr,Ir)}this._applyUpdatedTransform(ee),this._fireMoveEvents(B)},tr=>{this.terrain&&w.freezeElevation&&this._finalizeElevation(),this._afterEase(B,tr)},w),this}_prepareEase(w,B,Q={}){this._moving=!0,B||Q.moving||this.fire(new a.k("movestart",w)),this._zooming&&!Q.zooming&&this.fire(new a.k("zoomstart",w)),this._rotating&&!Q.rotating&&this.fire(new a.k("rotatestart",w)),this._pitching&&!Q.pitching&&this.fire(new a.k("pitchstart",w))}_prepareElevation(w){this._elevationCenter=w,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(w,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(w){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);let B=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(w<1&&B!==this._elevationTarget){let Q=this._elevationTarget-this._elevationStart;this._elevationStart+=w*(Q-(B-(Q*w+this._elevationStart))/(1-w)),this._elevationTarget=B}this.transform.elevation=a.y.number(this._elevationStart,this._elevationTarget,w)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(w){let B=w.getCameraPosition(),Q=this.terrain.getElevationForLngLatZoom(B.lngLat,w.zoom);if(B.altitudethis._elevateCameraIfInsideTerrain(ee)),this.transformCameraUpdate&&B.push(ee=>this.transformCameraUpdate(ee)),!B.length)return;let Q=w.clone();for(let ee of B){let le=Q.clone(),{center:Oe,zoom:Ze,pitch:st,bearing:Tt,elevation:Yt}=ee(le);Oe&&(le.center=Oe),Ze!==void 0&&(le.zoom=Ze),st!==void 0&&(le.pitch=st),Tt!==void 0&&(le.bearing=Tt),Yt!==void 0&&(le.elevation=Yt),Q.apply(le)}this.transform.apply(Q)}_fireMoveEvents(w){this.fire(new a.k("move",w)),this._zooming&&this.fire(new a.k("zoom",w)),this._rotating&&this.fire(new a.k("rotate",w)),this._pitching&&this.fire(new a.k("pitch",w))}_afterEase(w,B){if(this._easeId&&B&&this._easeId===B)return;delete this._easeId;let Q=this._zooming,ee=this._rotating,le=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Q&&this.fire(new a.k("zoomend",w)),ee&&this.fire(new a.k("rotateend",w)),le&&this.fire(new a.k("pitchend",w)),this.fire(new a.k("moveend",w))}flyTo(w,B){var Q;if(!w.essential&&u.prefersReducedMotion){let Cn=a.M(w,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Cn,B)}this.stop(),w=a.e({offset:[0,0],speed:1.2,curve:1.42,easing:a.b9},w);let ee=this._getTransformForUpdate(),le=ee.zoom,Oe=ee.bearing,Ze=ee.pitch,st=ee.padding,Tt="bearing"in w?this._normalizeBearing(w.bearing,Oe):Oe,Yt="pitch"in w?+w.pitch:Ze,Kt="padding"in w?w.padding:ee.padding,xr=a.P.convert(w.offset),Ir=ee.centerPoint.add(xr),ve=ee.pointLocation(Ir),{center:be,zoom:Re}=ee.getConstrained(a.N.convert(w.center||ve),(Q=w.zoom)!==null&&Q!==void 0?Q:le);this._normalizeCenter(be,ee);let qe=ee.zoomScale(Re-le),et=ee.project(ve),Xe=ee.project(be).sub(et),it=w.curve,Ft=Math.max(ee.width,ee.height),Ht=Ft/qe,tr=Xe.mag();if("minZoom"in w){let Cn=a.ac(Math.min(w.minZoom,le,Re),ee.minZoom,ee.maxZoom),Kn=Ft/ee.zoomScale(Cn-le);it=Math.sqrt(Kn/tr*2)}let dr=it*it;function Sr(Cn){let Kn=(Ht*Ht-Ft*Ft+(Cn?-1:1)*dr*dr*tr*tr)/(2*(Cn?Ht:Ft)*dr*tr);return Math.log(Math.sqrt(Kn*Kn+1)-Kn)}function Or(Cn){return(Math.exp(Cn)-Math.exp(-Cn))/2}function Wr(Cn){return(Math.exp(Cn)+Math.exp(-Cn))/2}let ni=Sr(!1),Pi=function(Cn){return Wr(ni)/Wr(ni+it*Cn)},cn=function(Cn){return Ft*((Wr(ni)*(Or(Kn=ni+it*Cn)/Wr(Kn))-Or(ni))/dr)/tr;var Kn},ln=(Sr(!0)-ni)/it;if(Math.abs(tr)<1e-6||!isFinite(ln)){if(Math.abs(Ft-Ht)<1e-6)return this.easeTo(w,B);let Cn=Ht0,Pi=Kn=>Math.exp(Cn*it*Kn)}return w.duration="duration"in w?+w.duration:1e3*ln/("screenSpeed"in w?+w.screenSpeed/it:+w.speed),w.maxDuration&&w.duration>w.maxDuration&&(w.duration=0),this._zooming=!0,this._rotating=Oe!==Tt,this._pitching=Yt!==Ze,this._padding=!ee.isPaddingEqual(Kt),this._prepareEase(B,!1),this.terrain&&this._prepareElevation(be),this._ease(Cn=>{let Kn=Cn*ln,Aa=1/Pi(Kn);ee.zoom=Cn===1?Re:le+ee.scaleZoom(Aa),this._rotating&&(ee.bearing=a.y.number(Oe,Tt,Cn)),this._pitching&&(ee.pitch=a.y.number(Ze,Yt,Cn)),this._padding&&(ee.interpolatePadding(st,Kt,Cn),Ir=ee.centerPoint.add(xr)),this.terrain&&!w.freezeElevation&&this._updateElevation(Cn);let fa=Cn===1?be:ee.unproject(et.add(Xe.mult(cn(Kn))).mult(Aa));ee.setLocationAtPoint(ee.renderWorldCopies?fa.wrap():fa,Ir),this._applyUpdatedTransform(ee),this._fireMoveEvents(B)},()=>{this.terrain&&w.freezeElevation&&this._finalizeElevation(),this._afterEase(B)},w),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(w,B){var Q;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let ee=this._onEaseEnd;delete this._onEaseEnd,ee.call(this,B)}return w||(Q=this.handlers)===null||Q===void 0||Q.stop(!1),this}_ease(w,B,Q){Q.animate===!1||Q.duration===0?(w(1),B()):(this._easeStart=u.now(),this._easeOptions=Q,this._onEaseFrame=w,this._onEaseEnd=B,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(w,B){w=a.b3(w,-180,180);let Q=Math.abs(w-B);return Math.abs(w-360-B)180?-360:Q<-180?360:0}queryTerrainElevation(w){return this.terrain?this.terrain.getElevationForLngLatZoom(a.N.convert(w),this.transform.tileZoom)-this.transform.elevation:null}}let La={compact:!0,customAttribution:'MapLibre'};class Na{constructor(w=La){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=B=>{!B||B.sourceDataType!=="metadata"&&B.sourceDataType!=="visibility"&&B.dataType!=="style"&&B.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=w}getDefaultPosition(){return"bottom-right"}onAdd(w){return this._map=w,this._compact=this.options.compact,this._container=c.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=c.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=c.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){c.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(w,B){let Q=this._map._getUIString(`AttributionControl.${B}`);w.title=Q,w.setAttribute("aria-label",Q)}_updateAttributions(){if(!this._map.style)return;let w=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?w=w.concat(this.options.customAttribution.map(ee=>typeof ee!="string"?"":ee)):typeof this.options.customAttribution=="string"&&w.push(this.options.customAttribution)),this._map.style.stylesheet){let ee=this._map.style.stylesheet;this.styleOwner=ee.owner,this.styleId=ee.id}let B=this._map.style.sourceCaches;for(let ee in B){let le=B[ee];if(le.used||le.usedForTerrain){let Oe=le.getSource();Oe.attribution&&w.indexOf(Oe.attribution)<0&&w.push(Oe.attribution)}}w=w.filter(ee=>String(ee).trim()),w.sort((ee,le)=>ee.length-le.length),w=w.filter((ee,le)=>{for(let Oe=le+1;Oe=0)return!1;return!0});let Q=w.join(" | ");Q!==this._attribHTML&&(this._attribHTML=Q,w.length?(this._innerContainer.innerHTML=Q,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class Yn{constructor(w={}){this._updateCompact=()=>{let B=this._container.children;if(B.length){let Q=B[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&Q.classList.add("maplibregl-compact"):Q.classList.remove("maplibregl-compact")}},this.options=w}getDefaultPosition(){return"bottom-left"}onAdd(w){this._map=w,this._compact=this.options&&this.options.compact,this._container=c.create("div","maplibregl-ctrl");let B=c.create("a","maplibregl-ctrl-logo");return B.target="_blank",B.rel="noopener nofollow",B.href="https://maplibre.org/",B.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),B.setAttribute("rel","noopener nofollow"),this._container.appendChild(B),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){c.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Dn{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(w){let B=++this._id;return this._queue.push({callback:w,id:B,cancelled:!1}),B}remove(w){let B=this._currentlyRunning,Q=B?this._queue.concat(B):this._queue;for(let ee of Q)if(ee.id===w)return void(ee.cancelled=!0)}run(w=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let B=this._currentlyRunning=this._queue;this._queue=[];for(let Q of B)if(!Q.cancelled&&(Q.callback(w),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Ka=a.Y([{name:"a_pos3d",type:"Int16",components:3}]);class bo extends a.E{constructor(w){super(),this.sourceCache=w,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,w.usedForTerrain=!0,w.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(w,B){this.sourceCache.update(w,B),this._renderableTilesKeys=[];let Q={};for(let ee of w.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:B}))Q[ee.key]=!0,this._renderableTilesKeys.push(ee.key),this._tiles[ee.key]||(ee.posMatrix=new Float64Array(16),a.aP(ee.posMatrix,0,a.X,0,a.X,0,1),this._tiles[ee.key]=new Gt(ee,this.tileSize));for(let ee in this._tiles)Q[ee]||delete this._tiles[ee]}freeRtt(w){for(let B in this._tiles){let Q=this._tiles[B];(!w||Q.tileID.equals(w)||Q.tileID.isChildOf(w)||w.isChildOf(Q.tileID))&&(Q.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(w=>this.getTileByID(w))}getTileByID(w){return this._tiles[w]}getTerrainCoords(w){let B={};for(let Q of this._renderableTilesKeys){let ee=this._tiles[Q].tileID;if(ee.canonical.equals(w.canonical)){let le=w.clone();le.posMatrix=new Float64Array(16),a.aP(le.posMatrix,0,a.X,0,a.X,0,1),B[Q]=le}else if(ee.canonical.isChildOf(w.canonical)){let le=w.clone();le.posMatrix=new Float64Array(16);let Oe=ee.canonical.z-w.canonical.z,Ze=ee.canonical.x-(ee.canonical.x>>Oe<>Oe<>Oe;a.aP(le.posMatrix,0,Tt,0,Tt,0,1),a.J(le.posMatrix,le.posMatrix,[-Ze*Tt,-st*Tt,0]),B[Q]=le}else if(w.canonical.isChildOf(ee.canonical)){let le=w.clone();le.posMatrix=new Float64Array(16);let Oe=w.canonical.z-ee.canonical.z,Ze=w.canonical.x-(w.canonical.x>>Oe<>Oe<>Oe;a.aP(le.posMatrix,0,a.X,0,a.X,0,1),a.J(le.posMatrix,le.posMatrix,[Ze*Tt,st*Tt,0]),a.K(le.posMatrix,le.posMatrix,[1/2**Oe,1/2**Oe,0]),B[Q]=le}}return B}getSourceTile(w,B){let Q=this.sourceCache._source,ee=w.overscaledZ-this.deltaZoom;if(ee>Q.maxzoom&&(ee=Q.maxzoom),ee=Q.minzoom&&(!le||!le.dem);)le=this.sourceCache.getTileByID(w.scaledTo(ee--).key);return le}tilesAfterTime(w=Date.now()){return Object.values(this._tiles).filter(B=>B.timeAdded>=w)}}class Zo{constructor(w,B,Q){this.painter=w,this.sourceCache=new bo(B),this.options=Q,this.exaggeration=typeof Q.exaggeration=="number"?Q.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(w,B,Q,ee=a.X){var le;if(!(B>=0&&B=0&&Qw.canonical.z&&(w.canonical.z>=ee?le=w.canonical.z-ee:a.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let Oe=w.canonical.x-(w.canonical.x>>le<>le<>8<<4|le>>8,B[Oe+3]=0;let Q=new a.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(B.buffer)),ee=new g(w,Q,w.gl.RGBA,{premultiply:!1});return ee.bind(w.gl.NEAREST,w.gl.CLAMP_TO_EDGE),this._coordsTexture=ee,ee}pointCoordinate(w){this.painter.maybeDrawDepthAndCoords(!0);let B=new Uint8Array(4),Q=this.painter.context,ee=Q.gl,le=Math.round(w.x*this.painter.pixelRatio/devicePixelRatio),Oe=Math.round(w.y*this.painter.pixelRatio/devicePixelRatio),Ze=Math.round(this.painter.height/devicePixelRatio);Q.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),ee.readPixels(le,Ze-Oe-1,1,1,ee.RGBA,ee.UNSIGNED_BYTE,B),Q.bindFramebuffer.set(null);let st=B[0]+(B[2]>>4<<8),Tt=B[1]+((15&B[2])<<8),Yt=this.coordsIndex[255-B[3]],Kt=Yt&&this.sourceCache.getTileByID(Yt);if(!Kt)return null;let xr=this._coordsTextureSize,Ir=(1<w.id!==B),this._recentlyUsed.push(w.id)}stampObject(w){w.stamp=++this._stamp}getOrCreateFreeObject(){for(let B of this._recentlyUsed)if(!this._objects[B].inUse)return this._objects[B];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let w=this._createObject(this._objects.length);return this._objects.push(w),w}freeObject(w){w.inUse=!1}freeAllObjects(){for(let w of this._objects)this.freeObject(w)}isFull(){return!(this._objects.length!w.inUse)===!1}}let as={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class ws{constructor(w,B){this.painter=w,this.terrain=B,this.pool=new Ss(w.context,30,B.sourceCache.tileSize*B.qualityFactor)}destruct(){this.pool.destruct()}getTexture(w){return this.pool.getObjectForId(w.rtt[this._stacks.length-1].id).texture}prepareForRender(w,B){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=w._order.filter(Q=>!w._layers[Q].isHidden(B)),this._coordsDescendingInv={};for(let Q in w.sourceCaches){this._coordsDescendingInv[Q]={};let ee=w.sourceCaches[Q].getVisibleCoordinates();for(let le of ee){let Oe=this.terrain.sourceCache.getTerrainCoords(le);for(let Ze in Oe)this._coordsDescendingInv[Q][Ze]||(this._coordsDescendingInv[Q][Ze]=[]),this._coordsDescendingInv[Q][Ze].push(Oe[Ze])}}this._coordsDescendingInvStr={};for(let Q of w._order){let ee=w._layers[Q],le=ee.source;if(as[ee.type]&&!this._coordsDescendingInvStr[le]){this._coordsDescendingInvStr[le]={};for(let Oe in this._coordsDescendingInv[le])this._coordsDescendingInvStr[le][Oe]=this._coordsDescendingInv[le][Oe].map(Ze=>Ze.key).sort().join()}}for(let Q of this._renderableTiles)for(let ee in this._coordsDescendingInvStr){let le=this._coordsDescendingInvStr[ee][Q.tileID.key];le&&le!==Q.rttCoords[ee]&&(Q.rtt=[])}}renderLayer(w){if(w.isHidden(this.painter.transform.zoom))return!1;let B=w.type,Q=this.painter,ee=this._renderableLayerIds[this._renderableLayerIds.length-1]===w.id;if(as[B]&&(this._prevType&&as[this._prevType]||this._stacks.push([]),this._prevType=B,this._stacks[this._stacks.length-1].push(w.id),!ee))return!0;if(as[this._prevType]||as[B]&&ee){this._prevType=B;let le=this._stacks.length-1,Oe=this._stacks[le]||[];for(let Ze of this._renderableTiles){if(this.pool.isFull()&&(js(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(Ze),Ze.rtt[le]){let Tt=this.pool.getObjectForId(Ze.rtt[le].id);if(Tt.stamp===Ze.rtt[le].stamp){this.pool.useObject(Tt);continue}}let st=this.pool.getOrCreateFreeObject();this.pool.useObject(st),this.pool.stampObject(st),Ze.rtt[le]={id:st.id,stamp:st.stamp},Q.context.bindFramebuffer.set(st.fbo.framebuffer),Q.context.clear({color:a.aM.transparent,stencil:0}),Q.currentStencilSource=void 0;for(let Tt=0;Tt{ue.touchstart=ue.dragStart,ue.touchmoveWindow=ue.dragMove,ue.touchend=ue.dragEnd},va={showCompass:!0,showZoom:!0,visualizePitch:!1};class no{constructor(w,B,Q=!1){this.mousedown=Oe=>{this.startMouse(a.e({},Oe,{ctrlKey:!0,preventDefault:()=>Oe.preventDefault()}),c.mousePos(this.element,Oe)),c.addEventListener(window,"mousemove",this.mousemove),c.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=Oe=>{this.moveMouse(Oe,c.mousePos(this.element,Oe))},this.mouseup=Oe=>{this.mouseRotate.dragEnd(Oe),this.mousePitch&&this.mousePitch.dragEnd(Oe),this.offTemp()},this.touchstart=Oe=>{Oe.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=c.touchPos(this.element,Oe.targetTouches)[0],this.startTouch(Oe,this._startPos),c.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),c.addEventListener(window,"touchend",this.touchend))},this.touchmove=Oe=>{Oe.targetTouches.length!==1?this.reset():(this._lastPos=c.touchPos(this.element,Oe.targetTouches)[0],this.moveTouch(Oe,this._lastPos))},this.touchend=Oe=>{Oe.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;let ee=w.dragRotate._mouseRotate.getClickTolerance(),le=w.dragRotate._mousePitch.getClickTolerance();this.element=B,this.mouseRotate=Wl({clickTolerance:ee,enable:!0}),this.touchRotate=(({enable:Oe,clickTolerance:Ze,bearingDegreesPerPixelMoved:st=.8})=>{let Tt=new uf;return new Wu({clickTolerance:Ze,move:(Yt,Kt)=>({bearingDelta:(Kt.x-Yt.x)*st}),moveStateManager:Tt,enable:Oe,assignEvents:Ls})})({clickTolerance:ee,enable:!0}),this.map=w,Q&&(this.mousePitch=ah({clickTolerance:le,enable:!0}),this.touchPitch=(({enable:Oe,clickTolerance:Ze,pitchDegreesPerPixelMoved:st=-.5})=>{let Tt=new uf;return new Wu({clickTolerance:Ze,move:(Yt,Kt)=>({pitchDelta:(Kt.y-Yt.y)*st}),moveStateManager:Tt,enable:Oe,assignEvents:Ls})})({clickTolerance:le,enable:!0})),c.addEventListener(B,"mousedown",this.mousedown),c.addEventListener(B,"touchstart",this.touchstart,{passive:!1}),c.addEventListener(B,"touchcancel",this.reset)}startMouse(w,B){this.mouseRotate.dragStart(w,B),this.mousePitch&&this.mousePitch.dragStart(w,B),c.disableDrag()}startTouch(w,B){this.touchRotate.dragStart(w,B),this.touchPitch&&this.touchPitch.dragStart(w,B),c.disableDrag()}moveMouse(w,B){let Q=this.map,{bearingDelta:ee}=this.mouseRotate.dragMove(w,B)||{};if(ee&&Q.setBearing(Q.getBearing()+ee),this.mousePitch){let{pitchDelta:le}=this.mousePitch.dragMove(w,B)||{};le&&Q.setPitch(Q.getPitch()+le)}}moveTouch(w,B){let Q=this.map,{bearingDelta:ee}=this.touchRotate.dragMove(w,B)||{};if(ee&&Q.setBearing(Q.getBearing()+ee),this.touchPitch){let{pitchDelta:le}=this.touchPitch.dragMove(w,B)||{};le&&Q.setPitch(Q.getPitch()+le)}}off(){let w=this.element;c.removeEventListener(w,"mousedown",this.mousedown),c.removeEventListener(w,"touchstart",this.touchstart,{passive:!1}),c.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),c.removeEventListener(window,"touchend",this.touchend),c.removeEventListener(w,"touchcancel",this.reset),this.offTemp()}offTemp(){c.enableDrag(),c.removeEventListener(window,"mousemove",this.mousemove),c.removeEventListener(window,"mouseup",this.mouseup),c.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),c.removeEventListener(window,"touchend",this.touchend)}}let ys;function rs(ue,w,B){let Q=new a.N(ue.lng,ue.lat);if(ue=new a.N(ue.lng,ue.lat),w){let ee=new a.N(ue.lng-360,ue.lat),le=new a.N(ue.lng+360,ue.lat),Oe=B.locationPoint(ue).distSqr(w);B.locationPoint(ee).distSqr(w)180;){let ee=B.locationPoint(ue);if(ee.x>=0&&ee.y>=0&&ee.x<=B.width&&ee.y<=B.height)break;ue.lng>B.center.lng?ue.lng-=360:ue.lng+=360}return ue.lng!==Q.lng&&B.locationPoint(ue).y>B.height/2-B.getHorizon()?ue:Q}let Ql={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Cu(ue,w,B){let Q=ue.classList;for(let ee in Ql)Q.remove(`maplibregl-${B}-anchor-${ee}`);Q.add(`maplibregl-${B}-anchor-${w}`)}class Yu extends a.E{constructor(w){if(super(),this._onKeyPress=B=>{let Q=B.code,ee=B.charCode||B.keyCode;Q!=="Space"&&Q!=="Enter"&&ee!==32&&ee!==13||this.togglePopup()},this._onMapClick=B=>{let Q=B.originalEvent.target,ee=this._element;this._popup&&(Q===ee||ee.contains(Q))&&this.togglePopup()},this._update=B=>{var Q;if(!this._map)return;let ee=this._map.loaded()&&!this._map.isMoving();((B==null?void 0:B.type)==="terrain"||(B==null?void 0:B.type)==="render"&&!ee)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?rs(this._lngLat,this._flatPos,this._map.transform):(Q=this._lngLat)===null||Q===void 0?void 0:Q.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let le="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?le=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(le=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let Oe="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?Oe="rotateX(0deg)":this._pitchAlignment==="map"&&(Oe=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||B&&B.type!=="moveend"||(this._pos=this._pos.round()),c.setTransform(this._element,`${Ql[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${Oe} ${le}`),u.frameAsync(new AbortController).then(()=>{this._updateOpacity(B&&B.type==="moveend")}).catch(()=>{})},this._onMove=B=>{if(!this._isDragging){let Q=this._clickTolerance||this._map._clickTolerance;this._isDragging=B.point.dist(this._pointerdownPos)>=Q}this._isDragging&&(this._pos=B.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new a.k("dragstart"))),this.fire(new a.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new a.k("dragend")),this._state="inactive"},this._addDragHandler=B=>{this._element.contains(B.originalEvent.target)&&(B.preventDefault(),this._positionDelta=B.point.sub(this._pos).add(this._offset),this._pointerdownPos=B.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=w&&w.anchor||"center",this._color=w&&w.color||"#3FB1CE",this._scale=w&&w.scale||1,this._draggable=w&&w.draggable||!1,this._clickTolerance=w&&w.clickTolerance||0,this._subpixelPositioning=w&&w.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=w&&w.rotation||0,this._rotationAlignment=w&&w.rotationAlignment||"auto",this._pitchAlignment=w&&w.pitchAlignment&&w.pitchAlignment!=="auto"?w.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(w==null?void 0:w.opacity,w==null?void 0:w.opacityWhenCovered),w&&w.element)this._element=w.element,this._offset=a.P.convert(w&&w.offset||[0,0]);else{this._defaultMarker=!0,this._element=c.create("div");let B=c.createNS("http://www.w3.org/2000/svg","svg"),Q=41,ee=27;B.setAttributeNS(null,"display","block"),B.setAttributeNS(null,"height",`${Q}px`),B.setAttributeNS(null,"width",`${ee}px`),B.setAttributeNS(null,"viewBox",`0 0 ${ee} ${Q}`);let le=c.createNS("http://www.w3.org/2000/svg","g");le.setAttributeNS(null,"stroke","none"),le.setAttributeNS(null,"stroke-width","1"),le.setAttributeNS(null,"fill","none"),le.setAttributeNS(null,"fill-rule","evenodd");let Oe=c.createNS("http://www.w3.org/2000/svg","g");Oe.setAttributeNS(null,"fill-rule","nonzero");let Ze=c.createNS("http://www.w3.org/2000/svg","g");Ze.setAttributeNS(null,"transform","translate(3.0, 29.0)"),Ze.setAttributeNS(null,"fill","#000000");let st=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(let qe of st){let et=c.createNS("http://www.w3.org/2000/svg","ellipse");et.setAttributeNS(null,"opacity","0.04"),et.setAttributeNS(null,"cx","10.5"),et.setAttributeNS(null,"cy","5.80029008"),et.setAttributeNS(null,"rx",qe.rx),et.setAttributeNS(null,"ry",qe.ry),Ze.appendChild(et)}let Tt=c.createNS("http://www.w3.org/2000/svg","g");Tt.setAttributeNS(null,"fill",this._color);let Yt=c.createNS("http://www.w3.org/2000/svg","path");Yt.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),Tt.appendChild(Yt);let Kt=c.createNS("http://www.w3.org/2000/svg","g");Kt.setAttributeNS(null,"opacity","0.25"),Kt.setAttributeNS(null,"fill","#000000");let xr=c.createNS("http://www.w3.org/2000/svg","path");xr.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Kt.appendChild(xr);let Ir=c.createNS("http://www.w3.org/2000/svg","g");Ir.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Ir.setAttributeNS(null,"fill","#FFFFFF");let ve=c.createNS("http://www.w3.org/2000/svg","g");ve.setAttributeNS(null,"transform","translate(8.0, 8.0)");let be=c.createNS("http://www.w3.org/2000/svg","circle");be.setAttributeNS(null,"fill","#000000"),be.setAttributeNS(null,"opacity","0.25"),be.setAttributeNS(null,"cx","5.5"),be.setAttributeNS(null,"cy","5.5"),be.setAttributeNS(null,"r","5.4999962");let Re=c.createNS("http://www.w3.org/2000/svg","circle");Re.setAttributeNS(null,"fill","#FFFFFF"),Re.setAttributeNS(null,"cx","5.5"),Re.setAttributeNS(null,"cy","5.5"),Re.setAttributeNS(null,"r","5.4999962"),ve.appendChild(be),ve.appendChild(Re),Oe.appendChild(Ze),Oe.appendChild(Tt),Oe.appendChild(Kt),Oe.appendChild(Ir),Oe.appendChild(ve),B.appendChild(Oe),B.setAttributeNS(null,"height",Q*this._scale+"px"),B.setAttributeNS(null,"width",ee*this._scale+"px"),this._element.appendChild(B),this._offset=a.P.convert(w&&w.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",B=>{B.preventDefault()}),this._element.addEventListener("mousedown",B=>{B.preventDefault()}),Cu(this._element,this._anchor,"marker"),w&&w.className)for(let B of w.className.split(" "))this._element.classList.add(B);this._popup=null}addTo(w){return this.remove(),this._map=w,this._element.setAttribute("aria-label",w._getUIString("Marker.Title")),w.getCanvasContainer().appendChild(this._element),w.on("move",this._update),w.on("moveend",this._update),w.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),c.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(w){return this._lngLat=a.N.convert(w),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(w){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),w){if(!("offset"in w.options)){let ee=Math.abs(13.5)/Math.SQRT2;w.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[ee,-1*(38.1-13.5+ee)],"bottom-right":[-ee,-1*(38.1-13.5+ee)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=w,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(w){return this._subpixelPositioning=w,this}getPopup(){return this._popup}togglePopup(){let w=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:w?(w.isOpen()?w.remove():(w.setLngLat(this._lngLat),w.addTo(this._map)),this):this}_updateOpacity(w=!1){var B,Q;if(!(!((B=this._map)===null||B===void 0)&&B.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(w)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let ee=this._map,le=ee.terrain.depthAtPoint(this._pos),Oe=ee.terrain.getElevationForLngLatZoom(this._lngLat,ee.transform.tileZoom);if(ee.transform.lngLatToCameraDepth(this._lngLat,Oe)-le<.006)return void(this._element.style.opacity=this._opacity);let Ze=-this._offset.y/ee.transform._pixelPerMeter,st=Math.sin(ee.getPitch()*Math.PI/180)*Ze,Tt=ee.terrain.depthAtPoint(new a.P(this._pos.x,this._pos.y-this._offset.y)),Yt=ee.transform.lngLatToCameraDepth(this._lngLat,Oe+st)-Tt>.006;!((Q=this._popup)===null||Q===void 0)&&Q.isOpen()&&Yt&&this._popup.remove(),this._element.style.opacity=Yt?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(w){return this._offset=a.P.convert(w),this._update(),this}addClassName(w){this._element.classList.add(w)}removeClassName(w){this._element.classList.remove(w)}toggleClassName(w){return this._element.classList.toggle(w)}setDraggable(w){return this._draggable=!!w,this._map&&(w?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(w){return this._rotation=w||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(w){return this._rotationAlignment=w||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(w){return this._pitchAlignment=w&&w!=="auto"?w:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(w,B){return w===void 0&&B===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),w!==void 0&&(this._opacity=w),B!==void 0&&(this._opacityWhenCovered=B),this._map&&this._updateOpacity(!0),this}}let Nc={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},pu=0,Uc=!1,xu={maxWidth:100,unit:"metric"};function Ac(ue,w,B){let Q=B&&B.maxWidth||100,ee=ue._container.clientHeight/2,le=ue.unproject([0,ee]),Oe=ue.unproject([Q,ee]),Ze=le.distanceTo(Oe);if(B&&B.unit==="imperial"){let st=3.2808*Ze;st>5280?Ua(w,Q,st/5280,ue._getUIString("ScaleControl.Miles")):Ua(w,Q,st,ue._getUIString("ScaleControl.Feet"))}else B&&B.unit==="nautical"?Ua(w,Q,Ze/1852,ue._getUIString("ScaleControl.NauticalMiles")):Ze>=1e3?Ua(w,Q,Ze/1e3,ue._getUIString("ScaleControl.Kilometers")):Ua(w,Q,Ze,ue._getUIString("ScaleControl.Meters"))}function Ua(ue,w,B,Q){let ee=function(le){let Oe=Math.pow(10,`${Math.floor(le)}`.length-1),Ze=le/Oe;return Ze=Ze>=10?10:Ze>=5?5:Ze>=3?3:Ze>=2?2:Ze>=1?1:function(st){let Tt=Math.pow(10,Math.ceil(-Math.log(st)/Math.LN10));return Math.round(st*Tt)/Tt}(Ze),Oe*Ze}(B);ue.style.width=w*(ee/B)+"px",ue.innerHTML=`${ee} ${Q}`}let oo={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},Vc=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function hc(ue){if(ue){if(typeof ue=="number"){let w=Math.round(Math.abs(ue)/Math.SQRT2);return{center:new a.P(0,0),top:new a.P(0,ue),"top-left":new a.P(w,w),"top-right":new a.P(-w,w),bottom:new a.P(0,-ue),"bottom-left":new a.P(w,-w),"bottom-right":new a.P(-w,-w),left:new a.P(ue,0),right:new a.P(-ue,0)}}if(ue instanceof a.P||Array.isArray(ue)){let w=a.P.convert(ue);return{center:w,top:w,"top-left":w,"top-right":w,bottom:w,"bottom-left":w,"bottom-right":w,left:w,right:w}}return{center:a.P.convert(ue.center||[0,0]),top:a.P.convert(ue.top||[0,0]),"top-left":a.P.convert(ue["top-left"]||[0,0]),"top-right":a.P.convert(ue["top-right"]||[0,0]),bottom:a.P.convert(ue.bottom||[0,0]),"bottom-left":a.P.convert(ue["bottom-left"]||[0,0]),"bottom-right":a.P.convert(ue["bottom-right"]||[0,0]),left:a.P.convert(ue.left||[0,0]),right:a.P.convert(ue.right||[0,0])}}return hc(new a.P(0,0))}let Ku=o;i.AJAXError=a.bh,i.Evented=a.E,i.LngLat=a.N,i.MercatorCoordinate=a.Z,i.Point=a.P,i.addProtocol=a.bi,i.config=a.a,i.removeProtocol=a.bj,i.AttributionControl=Na,i.BoxZoomHandler=ku,i.CanvasSource=$t,i.CooperativeGesturesHandler=Qi,i.DoubleClickZoomHandler=ki,i.DragPanHandler=wn,i.DragRotateHandler=Nn,i.EdgeInsets=hu,i.FullscreenControl=class extends a.E{constructor(ue={}){super(),this._onFullscreenChange=()=>{var w;let B=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((w=B==null?void 0:B.shadowRoot)===null||w===void 0)&&w.fullscreenElement;)B=B.shadowRoot.fullscreenElement;B===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,ue&&ue.container&&(ue.container instanceof HTMLElement?this._container=ue.container:a.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(ue){return this._map=ue,this._container||(this._container=this._map.getContainer()),this._controlContainer=c.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){c.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let ue=this._fullscreenButton=c.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);c.create("span","maplibregl-ctrl-icon",ue).setAttribute("aria-hidden","true"),ue.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let ue=this._getTitle();this._fullscreenButton.setAttribute("aria-label",ue),this._fullscreenButton.title=ue}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new a.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new a.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},i.GeoJSONSource=ot,i.GeolocateControl=class extends a.E{constructor(ue){super(),this._onSuccess=w=>{if(this._map){if(this._isOutOfMapMaxBounds(w))return this._setErrorState(),this.fire(new a.k("outofmaxbounds",w)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=w,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(w),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(w),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new a.k("geolocate",w)),this._finish()}},this._updateCamera=w=>{let B=new a.N(w.coords.longitude,w.coords.latitude),Q=w.coords.accuracy,ee=this._map.getBearing(),le=a.e({bearing:ee},this.options.fitBoundsOptions),Oe=ce.fromLngLat(B,Q);this._map.fitBounds(Oe,le,{geolocateSource:!0})},this._updateMarker=w=>{if(w){let B=new a.N(w.coords.longitude,w.coords.latitude);this._accuracyCircleMarker.setLngLat(B).addTo(this._map),this._userLocationDotMarker.setLngLat(B).addTo(this._map),this._accuracy=w.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=w=>{if(this._map){if(this.options.trackUserLocation)if(w.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;let B=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=B,this._geolocateButton.setAttribute("aria-label",B),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(w.code===3&&Uc)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new a.k("error",w)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",w=>w.preventDefault()),this._geolocateButton=c.create("button","maplibregl-ctrl-geolocate",this._container),c.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=w=>{if(this._map){if(w===!1){a.w("Geolocation support is not available so the GeolocateControl will be disabled.");let B=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=B,this._geolocateButton.setAttribute("aria-label",B)}else{let B=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=B,this._geolocateButton.setAttribute("aria-label",B)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=c.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Yu({element:this._dotElement}),this._circleElement=c.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Yu({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",B=>{B.geolocateSource||this._watchState!=="ACTIVE_LOCK"||B.originalEvent&&B.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new a.k("trackuserlocationend")),this.fire(new a.k("userlocationlostfocus")))})}},this.options=a.e({},Nc,ue)}onAdd(ue){return this._map=ue,this._container=c.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return a._(this,arguments,void 0,function*(w=!1){if(ys!==void 0&&!w)return ys;if(window.navigator.permissions===void 0)return ys=!!window.navigator.geolocation,ys;try{ys=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch(B){ys=!!window.navigator.geolocation}return ys})}().then(w=>this._finishSetupUI(w)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),c.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,pu=0,Uc=!1}_isOutOfMapMaxBounds(ue){let w=this._map.getMaxBounds(),B=ue.coords;return w&&(B.longitudew.getEast()||B.latitudew.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){let ue=this._map.getBounds(),w=ue.getSouthEast(),B=ue.getNorthEast(),Q=w.distanceTo(B),ee=Math.ceil(this._accuracy/(Q/this._map._container.clientHeight)*2);this._circleElement.style.width=`${ee}px`,this._circleElement.style.height=`${ee}px`}trigger(){if(!this._setup)return a.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new a.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":pu--,Uc=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new a.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new a.k("trackuserlocationstart")),this.fire(new a.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let ue;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),pu++,pu>1?(ue={maximumAge:6e5,timeout:0},Uc=!0):(ue=this.options.positionOptions,Uc=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,ue)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},i.Hash=Mh,i.ImageSource=Wt,i.KeyboardHandler=Xt,i.LngLatBounds=ce,i.LogoControl=Yn,i.Map=class extends Ra{constructor(ue){a.bf.mark(a.bg.create);let w=Object.assign(Object.assign({},Ws),ue);if(w.minZoom!=null&&w.maxZoom!=null&&w.minZoom>w.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(w.minPitch!=null&&w.maxPitch!=null&&w.minPitch>w.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(w.minPitch!=null&&w.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(w.maxPitch!=null&&w.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new nl(w.minZoom,w.maxZoom,w.minPitch,w.maxPitch,w.renderWorldCopies),{bearingSnap:w.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Dn,this._controls=[],this._mapId=a.a4(),this._contextLost=B=>{B.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new a.k("webglcontextlost",{originalEvent:B}))},this._contextRestored=B=>{this._setupPainter(),this.resize(),this._update(),this.fire(new a.k("webglcontextrestored",{originalEvent:B}))},this._onMapScroll=B=>{if(B.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=w.interactive,this._maxTileCacheSize=w.maxTileCacheSize,this._maxTileCacheZoomLevels=w.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=w.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=w.preserveDrawingBuffer===!0,this._antialias=w.antialias===!0,this._trackResize=w.trackResize===!0,this._bearingSnap=w.bearingSnap,this._refreshExpiredTiles=w.refreshExpiredTiles===!0,this._fadeDuration=w.fadeDuration,this._crossSourceCollisions=w.crossSourceCollisions===!0,this._collectResourceTiming=w.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Ho),w.locale),this._clickTolerance=w.clickTolerance,this._overridePixelRatio=w.pixelRatio,this._maxCanvasSize=w.maxCanvasSize,this.transformCameraUpdate=w.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=w.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=p.addThrottleControl(()=>this.isMoving()),this._requestManager=new k(w.transformRequest),typeof w.container=="string"){if(this._container=document.getElementById(w.container),!this._container)throw new Error(`Container '${w.container}' not found.`)}else{if(!(w.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=w.container}if(w.maxBounds&&this.setMaxBounds(w.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)).on("moveend",()=>this._update(!1)).on("zoom",()=>this._update(!0)).on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once("idle",()=>{this._idleTriggered=!0}),typeof window!="undefined"){addEventListener("online",this._onWindowOnline,!1);let B=!1,Q=nh(ee=>{this._trackResize&&!this._removed&&(this.resize(ee),this.redraw())},50);this._resizeObserver=new ResizeObserver(ee=>{B?Q(ee):B=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Ca(this,w),this._hash=w.hash&&new Mh(typeof w.hash=="string"&&w.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:w.center,zoom:w.zoom,bearing:w.bearing,pitch:w.pitch}),w.bounds&&(this.resize(),this.fitBounds(w.bounds,a.e({},w.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=w.localIdeographFontFamily,this._validateStyle=w.validateStyle,w.style&&this.setStyle(w.style,{localIdeographFontFamily:w.localIdeographFontFamily}),w.attributionControl&&this.addControl(new Na(typeof w.attributionControl=="boolean"?void 0:w.attributionControl)),w.maplibreLogo&&this.addControl(new Yn,w.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",B=>{this._update(B.dataType==="style"),this.fire(new a.k(`${B.dataType}data`,B))}),this.on("dataloading",B=>{this.fire(new a.k(`${B.dataType}dataloading`,B))}),this.on("dataabort",B=>{this.fire(new a.k("sourcedataabort",B))})}_getMapId(){return this._mapId}addControl(ue,w){if(w===void 0&&(w=ue.getDefaultPosition?ue.getDefaultPosition():"top-right"),!ue||!ue.onAdd)return this.fire(new a.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let B=ue.onAdd(this);this._controls.push(ue);let Q=this._controlPositions[w];return w.indexOf("bottom")!==-1?Q.insertBefore(B,Q.firstChild):Q.appendChild(B),this}removeControl(ue){if(!ue||!ue.onRemove)return this.fire(new a.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let w=this._controls.indexOf(ue);return w>-1&&this._controls.splice(w,1),ue.onRemove(this),this}hasControl(ue){return this._controls.indexOf(ue)>-1}calculateCameraOptionsFromTo(ue,w,B,Q){return Q==null&&this.terrain&&(Q=this.terrain.getElevationForLngLatZoom(B,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(ue,w,B,Q)}resize(ue){var w;let B=this._containerDimensions(),Q=B[0],ee=B[1],le=this._getClampedPixelRatio(Q,ee);if(this._resizeCanvas(Q,ee,le),this.painter.resize(Q,ee,le),this.painter.overLimit()){let Ze=this.painter.context.gl;this._maxCanvasSize=[Ze.drawingBufferWidth,Ze.drawingBufferHeight];let st=this._getClampedPixelRatio(Q,ee);this._resizeCanvas(Q,ee,st),this.painter.resize(Q,ee,st)}this.transform.resize(Q,ee),(w=this._requestedCameraState)===null||w===void 0||w.resize(Q,ee);let Oe=!this._moving;return Oe&&(this.stop(),this.fire(new a.k("movestart",ue)).fire(new a.k("move",ue))),this.fire(new a.k("resize",ue)),Oe&&this.fire(new a.k("moveend",ue)),this}_getClampedPixelRatio(ue,w){let{0:B,1:Q}=this._maxCanvasSize,ee=this.getPixelRatio(),le=ue*ee,Oe=w*ee;return Math.min(le>B?B/le:1,Oe>Q?Q/Oe:1)*ee}getPixelRatio(){var ue;return(ue=this._overridePixelRatio)!==null&&ue!==void 0?ue:devicePixelRatio}setPixelRatio(ue){this._overridePixelRatio=ue,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(ue){return this.transform.setMaxBounds(ce.convert(ue)),this._update()}setMinZoom(ue){if((ue=ue==null?-2:ue)>=-2&&ue<=this.transform.maxZoom)return this.transform.minZoom=ue,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=ue,this._update(),this.getZoom()>ue&&this.setZoom(ue),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(ue){if((ue=ue==null?0:ue)<0)throw new Error("minPitch must be greater than or equal to 0");if(ue>=0&&ue<=this.transform.maxPitch)return this.transform.minPitch=ue,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(ue>=this.transform.minPitch)return this.transform.maxPitch=ue,this._update(),this.getPitch()>ue&&this.setPitch(ue),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(ue){return this.transform.renderWorldCopies=ue,this._update()}project(ue){return this.transform.locationPoint(a.N.convert(ue),this.style&&this.terrain)}unproject(ue){return this.transform.pointLocation(a.P.convert(ue),this.terrain)}isMoving(){var ue;return this._moving||((ue=this.handlers)===null||ue===void 0?void 0:ue.isMoving())}isZooming(){var ue;return this._zooming||((ue=this.handlers)===null||ue===void 0?void 0:ue.isZooming())}isRotating(){var ue;return this._rotating||((ue=this.handlers)===null||ue===void 0?void 0:ue.isRotating())}_createDelegatedListener(ue,w,B){if(ue==="mouseenter"||ue==="mouseover"){let Q=!1;return{layers:w,listener:B,delegates:{mousemove:le=>{let Oe=w.filter(st=>this.getLayer(st)),Ze=Oe.length!==0?this.queryRenderedFeatures(le.point,{layers:Oe}):[];Ze.length?Q||(Q=!0,B.call(this,new jl(ue,this,le.originalEvent,{features:Ze}))):Q=!1},mouseout:()=>{Q=!1}}}}if(ue==="mouseleave"||ue==="mouseout"){let Q=!1;return{layers:w,listener:B,delegates:{mousemove:Oe=>{let Ze=w.filter(st=>this.getLayer(st));(Ze.length!==0?this.queryRenderedFeatures(Oe.point,{layers:Ze}):[]).length?Q=!0:Q&&(Q=!1,B.call(this,new jl(ue,this,Oe.originalEvent)))},mouseout:Oe=>{Q&&(Q=!1,B.call(this,new jl(ue,this,Oe.originalEvent)))}}}}{let Q=ee=>{let le=w.filter(Ze=>this.getLayer(Ze)),Oe=le.length!==0?this.queryRenderedFeatures(ee.point,{layers:le}):[];Oe.length&&(ee.features=Oe,B.call(this,ee),delete ee.features)};return{layers:w,listener:B,delegates:{[ue]:Q}}}}_saveDelegatedListener(ue,w){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[ue]=this._delegatedListeners[ue]||[],this._delegatedListeners[ue].push(w)}_removeDelegatedListener(ue,w,B){if(!this._delegatedListeners||!this._delegatedListeners[ue])return;let Q=this._delegatedListeners[ue];for(let ee=0;eew.includes(Oe))){for(let Oe in le.delegates)this.off(Oe,le.delegates[Oe]);return void Q.splice(ee,1)}}}on(ue,w,B){if(B===void 0)return super.on(ue,w);let Q=this._createDelegatedListener(ue,typeof w=="string"?[w]:w,B);this._saveDelegatedListener(ue,Q);for(let ee in Q.delegates)this.on(ee,Q.delegates[ee]);return this}once(ue,w,B){if(B===void 0)return super.once(ue,w);let Q=typeof w=="string"?[w]:w,ee=this._createDelegatedListener(ue,Q,B);for(let le in ee.delegates){let Oe=ee.delegates[le];ee.delegates[le]=(...Ze)=>{this._removeDelegatedListener(ue,Q,B),Oe(...Ze)}}this._saveDelegatedListener(ue,ee);for(let le in ee.delegates)this.once(le,ee.delegates[le]);return this}off(ue,w,B){return B===void 0?super.off(ue,w):(this._removeDelegatedListener(ue,typeof w=="string"?[w]:w,B),this)}queryRenderedFeatures(ue,w){if(!this.style)return[];let B,Q=ue instanceof a.P||Array.isArray(ue),ee=Q?ue:[[0,0],[this.transform.width,this.transform.height]];if(w=w||(Q?{}:ue)||{},ee instanceof a.P||typeof ee[0]=="number")B=[a.P.convert(ee)];else{let le=a.P.convert(ee[0]),Oe=a.P.convert(ee[1]);B=[le,new a.P(Oe.x,le.y),Oe,new a.P(le.x,Oe.y),le]}return this.style.queryRenderedFeatures(B,w,this.transform)}querySourceFeatures(ue,w){return this.style.querySourceFeatures(ue,w)}setStyle(ue,w){return(w=a.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},w)).diff!==!1&&w.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&ue?(this._diffStyle(ue,w),this):(this._localIdeographFontFamily=w.localIdeographFontFamily,this._updateStyle(ue,w))}setTransformRequest(ue){return this._requestManager.setTransformRequest(ue),this}_getUIString(ue){let w=this._locale[ue];if(w==null)throw new Error(`Missing UI string '${ue}'`);return w}_updateStyle(ue,w){if(w.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(ue,w));let B=this.style&&w.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!ue)),ue?(this.style=new Ha(this,w||{}),this.style.setEventedParent(this,{style:this.style}),typeof ue=="string"?this.style.loadURL(ue,w,B):this.style.loadJSON(ue,w,B),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Ha(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(ue,w){if(typeof ue=="string"){let B=this._requestManager.transformRequest(ue,"Style");a.h(B,new AbortController).then(Q=>{this._updateDiff(Q.data,w)}).catch(Q=>{Q&&this.fire(new a.j(Q))})}else typeof ue=="object"&&this._updateDiff(ue,w)}_updateDiff(ue,w){try{this.style.setState(ue,w)&&this._update(!0)}catch(B){a.w(`Unable to perform style diff: ${B.message||B.error||B}. Rebuilding the style from scratch.`),this._updateStyle(ue,w)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():a.w("There is no style added to the map.")}addSource(ue,w){return this._lazyInitEmptyStyle(),this.style.addSource(ue,w),this._update(!0)}isSourceLoaded(ue){let w=this.style&&this.style.sourceCaches[ue];if(w!==void 0)return w.loaded();this.fire(new a.j(new Error(`There is no source with ID '${ue}'`)))}setTerrain(ue){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),ue){let w=this.style.sourceCaches[ue.source];if(!w)throw new Error(`cannot load terrain, because there exists no source with ID: ${ue.source}`);this.terrain===null&&w.reload();for(let B in this.style._layers){let Q=this.style._layers[B];Q.type==="hillshade"&&Q.source===ue.source&&a.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Zo(this.painter,w,ue),this.painter.renderToTexture=new ws(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=B=>{B.dataType==="style"?this.terrain.sourceCache.freeRtt():B.dataType==="source"&&B.tile&&(B.sourceId!==ue.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(B.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new a.k("terrain",{terrain:ue})),this}getTerrain(){var ue,w;return(w=(ue=this.terrain)===null||ue===void 0?void 0:ue.options)!==null&&w!==void 0?w:null}areTilesLoaded(){let ue=this.style&&this.style.sourceCaches;for(let w in ue){let B=ue[w]._tiles;for(let Q in B){let ee=B[Q];if(ee.state!=="loaded"&&ee.state!=="errored")return!1}}return!0}removeSource(ue){return this.style.removeSource(ue),this._update(!0)}getSource(ue){return this.style.getSource(ue)}addImage(ue,w,B={}){let{pixelRatio:Q=1,sdf:ee=!1,stretchX:le,stretchY:Oe,content:Ze,textFitWidth:st,textFitHeight:Tt}=B;if(this._lazyInitEmptyStyle(),!(w instanceof HTMLImageElement||a.b(w))){if(w.width===void 0||w.height===void 0)return this.fire(new a.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{let{width:Yt,height:Kt,data:xr}=w,Ir=w;return this.style.addImage(ue,{data:new a.R({width:Yt,height:Kt},new Uint8Array(xr)),pixelRatio:Q,stretchX:le,stretchY:Oe,content:Ze,textFitWidth:st,textFitHeight:Tt,sdf:ee,version:0,userImage:Ir}),Ir.onAdd&&Ir.onAdd(this,ue),this}}{let{width:Yt,height:Kt,data:xr}=u.getImageData(w);this.style.addImage(ue,{data:new a.R({width:Yt,height:Kt},xr),pixelRatio:Q,stretchX:le,stretchY:Oe,content:Ze,textFitWidth:st,textFitHeight:Tt,sdf:ee,version:0})}}updateImage(ue,w){let B=this.style.getImage(ue);if(!B)return this.fire(new a.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let Q=w instanceof HTMLImageElement||a.b(w)?u.getImageData(w):w,{width:ee,height:le,data:Oe}=Q;if(ee===void 0||le===void 0)return this.fire(new a.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(ee!==B.data.width||le!==B.data.height)return this.fire(new a.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));let Ze=!(w instanceof HTMLImageElement||a.b(w));return B.data.replace(Oe,Ze),this.style.updateImage(ue,B),this}getImage(ue){return this.style.getImage(ue)}hasImage(ue){return ue?!!this.style.getImage(ue):(this.fire(new a.j(new Error("Missing required image id"))),!1)}removeImage(ue){this.style.removeImage(ue)}loadImage(ue){return p.getImage(this._requestManager.transformRequest(ue,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(ue,w){return this._lazyInitEmptyStyle(),this.style.addLayer(ue,w),this._update(!0)}moveLayer(ue,w){return this.style.moveLayer(ue,w),this._update(!0)}removeLayer(ue){return this.style.removeLayer(ue),this._update(!0)}getLayer(ue){return this.style.getLayer(ue)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(ue,w,B){return this.style.setLayerZoomRange(ue,w,B),this._update(!0)}setFilter(ue,w,B={}){return this.style.setFilter(ue,w,B),this._update(!0)}getFilter(ue){return this.style.getFilter(ue)}setPaintProperty(ue,w,B,Q={}){return this.style.setPaintProperty(ue,w,B,Q),this._update(!0)}getPaintProperty(ue,w){return this.style.getPaintProperty(ue,w)}setLayoutProperty(ue,w,B,Q={}){return this.style.setLayoutProperty(ue,w,B,Q),this._update(!0)}getLayoutProperty(ue,w){return this.style.getLayoutProperty(ue,w)}setGlyphs(ue,w={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(ue,w),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(ue,w,B={}){return this._lazyInitEmptyStyle(),this.style.addSprite(ue,w,B,Q=>{Q||this._update(!0)}),this}removeSprite(ue){return this._lazyInitEmptyStyle(),this.style.removeSprite(ue),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(ue,w={}){return this._lazyInitEmptyStyle(),this.style.setSprite(ue,w,B=>{B||this._update(!0)}),this}setLight(ue,w={}){return this._lazyInitEmptyStyle(),this.style.setLight(ue,w),this._update(!0)}getLight(){return this.style.getLight()}setSky(ue){return this._lazyInitEmptyStyle(),this.style.setSky(ue),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(ue,w){return this.style.setFeatureState(ue,w),this._update()}removeFeatureState(ue,w){return this.style.removeFeatureState(ue,w),this._update()}getFeatureState(ue){return this.style.getFeatureState(ue)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let ue=0,w=0;return this._container&&(ue=this._container.clientWidth||400,w=this._container.clientHeight||300),[ue,w]}_setupContainer(){let ue=this._container;ue.classList.add("maplibregl-map");let w=this._canvasContainer=c.create("div","maplibregl-canvas-container",ue);this._interactive&&w.classList.add("maplibregl-interactive"),this._canvas=c.create("canvas","maplibregl-canvas",w),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");let B=this._containerDimensions(),Q=this._getClampedPixelRatio(B[0],B[1]);this._resizeCanvas(B[0],B[1],Q);let ee=this._controlContainer=c.create("div","maplibregl-control-container",ue),le=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(Oe=>{le[Oe]=c.create("div",`maplibregl-ctrl-${Oe} `,ee)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(ue,w,B){this._canvas.width=Math.floor(B*ue),this._canvas.height=Math.floor(B*w),this._canvas.style.width=`${ue}px`,this._canvas.style.height=`${w}px`}_setupPainter(){let ue={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1},w=null;this._canvas.addEventListener("webglcontextcreationerror",Q=>{w={requestedAttributes:ue},Q&&(w.statusMessage=Q.statusMessage,w.type=Q.type)},{once:!0});let B=this._canvas.getContext("webgl2",ue)||this._canvas.getContext("webgl",ue);if(!B){let Q="Failed to initialize WebGL";throw w?(w.message=Q,new Error(JSON.stringify(w))):new Error(Q)}this.painter=new Dc(B,this.transform),f.testSupport(B)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(ue){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||ue,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(ue){return this._update(),this._renderTaskQueue.add(ue)}_cancelRenderFrame(ue){this._renderTaskQueue.remove(ue)}_render(ue){let w=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(ue),this._removed)return;let B=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let ee=this.transform.zoom,le=u.now();this.style.zoomHistory.update(ee,le);let Oe=new a.z(ee,{now:le,fadeDuration:w,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),Ze=Oe.crossFadingFactor();Ze===1&&Ze===this._crossFadingFactor||(B=!0,this._crossFadingFactor=Ze),this.style.update(Oe)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,w,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:w,showPadding:this.showPadding}),this.fire(new a.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,a.bf.mark(a.bg.load),this.fire(new a.k("load"))),this.style&&(this.style.hasTransitions()||B)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let Q=this._sourcesDirty||this._styleDirty||this._placementDirty;return Q||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new a.k("idle")),!this._loaded||this._fullyLoaded||Q||(this._fullyLoaded=!0,a.bf.mark(a.bg.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var ue;this._hash&&this._hash.remove();for(let B of this._controls)B.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window!="undefined"&&removeEventListener("online",this._onWindowOnline,!1),p.removeThrottleControl(this._imageQueueHandle),(ue=this._resizeObserver)===null||ue===void 0||ue.disconnect();let w=this.painter.context.gl.getExtension("WEBGL_lose_context");w!=null&&w.loseContext&&w.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),c.remove(this._canvasContainer),c.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),a.bf.clearMetrics(),this._removed=!0,this.fire(new a.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,u.frameAsync(this._frameRequest).then(ue=>{a.bf.frame(ue),this._frameRequest=null,this._render(ue)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(ue){this._showTileBoundaries!==ue&&(this._showTileBoundaries=ue,this._update())}get showPadding(){return!!this._showPadding}set showPadding(ue){this._showPadding!==ue&&(this._showPadding=ue,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(ue){this._showCollisionBoxes!==ue&&(this._showCollisionBoxes=ue,ue?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(ue){this._showOverdrawInspector!==ue&&(this._showOverdrawInspector=ue,this._update())}get repaint(){return!!this._repaint}set repaint(ue){this._repaint!==ue&&(this._repaint=ue,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(ue){this._vertices=ue,this._update()}get version(){return ml}getCameraTargetElevation(){return this.transform.elevation}},i.MapMouseEvent=jl,i.MapTouchEvent=lf,i.MapWheelEvent=Xh,i.Marker=Yu,i.NavigationControl=class{constructor(ue){this._updateZoomButtons=()=>{let w=this._map.getZoom(),B=w===this._map.getMaxZoom(),Q=w===this._map.getMinZoom();this._zoomInButton.disabled=B,this._zoomOutButton.disabled=Q,this._zoomInButton.setAttribute("aria-disabled",B.toString()),this._zoomOutButton.setAttribute("aria-disabled",Q.toString())},this._rotateCompassArrow=()=>{let w=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=w},this._setButtonTitle=(w,B)=>{let Q=this._map._getUIString(`NavigationControl.${B}`);w.title=Q,w.setAttribute("aria-label",Q)},this.options=a.e({},va,ue),this._container=c.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",w=>w.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",w=>this._map.zoomIn({},{originalEvent:w})),c.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",w=>this._map.zoomOut({},{originalEvent:w})),c.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",w=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:w}):this._map.resetNorth({},{originalEvent:w})}),this._compassIcon=c.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(ue){return this._map=ue,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new no(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){c.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(ue,w){let B=c.create("button",ue,this._container);return B.type="button",B.addEventListener("click",w),B}},i.Popup=class extends a.E{constructor(ue){super(),this.remove=()=>(this._content&&c.remove(this._content),this._container&&(c.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new a.k("close"))),this),this._onMouseUp=w=>{this._update(w.point)},this._onMouseMove=w=>{this._update(w.point)},this._onDrag=w=>{this._update(w.point)},this._update=w=>{var B;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=c.create("div","maplibregl-popup",this._map.getContainer()),this._tip=c.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let Ze of this.options.className.split(" "))this._container.classList.add(Ze);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?rs(this._lngLat,this._flatPos,this._map.transform):(B=this._lngLat)===null||B===void 0?void 0:B.wrap(),this._trackPointer&&!w)return;let Q=this._flatPos=this._pos=this._trackPointer&&w?w:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&w?w:this._map.transform.locationPoint(this._lngLat));let ee=this.options.anchor,le=hc(this.options.offset);if(!ee){let Ze=this._container.offsetWidth,st=this._container.offsetHeight,Tt;Tt=Q.y+le.bottom.ythis._map.transform.height-st?["bottom"]:[],Q.xthis._map.transform.width-Ze/2&&Tt.push("right"),ee=Tt.length===0?"bottom":Tt.join("-")}let Oe=Q.add(le[ee]);this.options.subpixelPositioning||(Oe=Oe.round()),c.setTransform(this._container,`${Ql[ee]} translate(${Oe.x}px,${Oe.y}px)`),Cu(this._container,ee,"popup")},this._onClose=()=>{this.remove()},this.options=a.e(Object.create(oo),ue)}addTo(ue){return this._map&&this.remove(),this._map=ue,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new a.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(ue){return this._lngLat=a.N.convert(ue),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(ue){return this.setDOMContent(document.createTextNode(ue))}setHTML(ue){let w=document.createDocumentFragment(),B=document.createElement("body"),Q;for(B.innerHTML=ue;Q=B.firstChild,Q;)w.appendChild(Q);return this.setDOMContent(w)}getMaxWidth(){var ue;return(ue=this._container)===null||ue===void 0?void 0:ue.style.maxWidth}setMaxWidth(ue){return this.options.maxWidth=ue,this._update(),this}setDOMContent(ue){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=c.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(ue),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(ue){return this._container&&this._container.classList.add(ue),this}removeClassName(ue){return this._container&&this._container.classList.remove(ue),this}setOffset(ue){return this.options.offset=ue,this._update(),this}toggleClassName(ue){if(this._container)return this._container.classList.toggle(ue)}setSubpixelPositioning(ue){this.options.subpixelPositioning=ue}_createCloseButton(){this.options.closeButton&&(this._closeButton=c.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let ue=this._container.querySelector(Vc);ue&&ue.focus()}},i.RasterDEMTileSource=Vt,i.RasterTileSource=pt,i.ScaleControl=class{constructor(ue){this._onMove=()=>{Ac(this._map,this._container,this.options)},this.setUnit=w=>{this.options.unit=w,Ac(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},xu),ue)}getDefaultPosition(){return"bottom-left"}onAdd(ue){return this._map=ue,this._container=c.create("div","maplibregl-ctrl maplibregl-ctrl-scale",ue.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){c.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},i.ScrollZoomHandler=Kr,i.Style=Ha,i.TerrainControl=class{constructor(ue){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=ue}onAdd(ue){return this._map=ue,this._container=c.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=c.create("button","maplibregl-ctrl-terrain",this._container),c.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){c.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},i.TwoFingersTouchPitchHandler=Bc,i.TwoFingersTouchRotateHandler=cf,i.TwoFingersTouchZoomHandler=vu,i.TwoFingersTouchZoomRotateHandler=Yi,i.VectorTileSource=lt,i.VideoSource=Nt,i.addSourceType=(ue,w)=>a._(void 0,void 0,void 0,function*(){if(Tr(ue))throw new Error(`A source type called "${ue}" already exists.`);((B,Q)=>{sr[B]=Q})(ue,w)}),i.clearPrewarmedResources=function(){let ue=ge;ue&&(ue.isPreloaded()&&ue.numActive()===1?(ue.release(_e),ge=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},i.getMaxParallelImageRequests=function(){return a.a.MAX_PARALLEL_IMAGE_REQUESTS},i.getRTLTextPluginStatus=function(){return Qt().getRTLTextPluginStatus()},i.getVersion=function(){return Ku},i.getWorkerCount=function(){return Ce.workerCount},i.getWorkerUrl=function(){return a.a.WORKER_URL},i.importScriptInWorkers=function(ue){return Ae().broadcast("IS",ue)},i.prewarm=function(){Se().acquire(_e)},i.setMaxParallelImageRequests=function(ue){a.a.MAX_PARALLEL_IMAGE_REQUESTS=ue},i.setRTLTextPlugin=function(ue,w){return Qt().setRTLTextPlugin(ue,w)},i.setWorkerCount=function(ue){Ce.workerCount=ue},i.setWorkerUrl=function(ue){a.a.WORKER_URL=ue}});var n=e;return n})});var yje=ye((Bbr,mje)=>{"use strict";var vw=Dr(),FXt=Zl().sanitizeHTML,zXt=IJ(),vje=Px();function pje(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=vje.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var sg=pje.prototype;sg.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=v7(t)};sg.needsNewImage=function(e){var t=this.subplot.map;return t.getSource(this.idSource)&&this.sourceType==="image"&&e.sourcetype==="image"&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))};sg.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type};sg.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]};sg.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]};sg.updateImage=function(e){var t=this.subplot.map;t.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var r=this.findFollowingMapLayerId(this.lookupBelow());r!==null&&this.subplot.map.moveLayer(this.idLayer,r)};sg.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,!!v7(e)){var r=OXt(e);t.addSource(this.idSource,r)}};sg.findFollowingMapLayerId=function(e){if(e==="traces")for(var t=this.subplot.getMapLayers(),r=0;r0){for(var r=0;r0}function gje(e){var t={},r={};switch(e.type){case"circle":vw.extendFlat(r,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":vw.extendFlat(r,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":vw.extendFlat(r,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var n=e.symbol,i=zXt(n.textposition,n.iconsize);vw.extendFlat(t,{"icon-image":n.icon+"-15","icon-size":n.iconsize/10,"text-field":n.text,"text-size":n.textfont.size,"text-anchor":i.anchor,"text-offset":i.offset,"symbol-placement":n.placement}),vw.extendFlat(r,{"icon-color":e.color,"text-color":n.textfont.color,"text-opacity":e.opacity});break;case"raster":vw.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":e.opacity});break}return{layout:t,paint:r}}function OXt(e){var t=e.sourcetype,r=e.source,n={type:t},i;return t==="geojson"?i="data":t==="vector"?i=typeof r=="string"?"url":"tiles":t==="raster"?(i="tiles",n.tileSize=256):t==="image"&&(i="url",n.coordinates=e.coordinates),n[i]=r,e.sourceattribution&&(n.attribution=FXt(e.sourceattribution)),n}mje.exports=function(t,r,n){var i=new pje(t,r);return i.update(n),i}});var Mje=ye((Nbr,Sje)=>{"use strict";var qJ=dje(),BJ=Dr(),bje=hx(),_je=qa(),qXt=ho(),BXt=yv(),p7=vf(),wje=Cg(),NXt=wje.drawMode,UXt=wje.selectMode,VXt=Of().prepSelect,GXt=Of().clearOutline,HXt=Of().clearSelectionsCache,jXt=Of().selectOnClick,pw=Px(),WXt=yje();function Tje(e,t){this.id=t,this.gd=e;var r=e._fullLayout,n=e._context;this.container=r._glcontainer.node(),this.isStatic=n.staticPlot,this.uid=r._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(r),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var Hh=Tje.prototype;Hh.plot=function(e,t,r){var n=this,i;n.map?i=new Promise(function(a,o){n.updateMap(e,t,a,o)}):i=new Promise(function(a,o){n.createMap(e,t,a,o)}),r.push(i)};Hh.createMap=function(e,t,r,n){var i=this,a=t[i.id],o=i.styleObj=Aje(a.style),s=a.bounds,l=s?[[s.west,s.south],[s.east,s.north]]:null,u=i.map=new qJ.Map({container:i.div,style:o.style,center:NJ(a.center),zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,maxBounds:l,interactive:!i.isStatic,preserveDrawingBuffer:i.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new qJ.AttributionControl({compact:!0})),c={};u.on("styleimagemissing",function(h){var d=h.id;if(!c[d]&&d.includes("-15")){c[d]=!0;var v=new Image(15,15);v.onload=function(){u.addImage(d,v)},v.crossOrigin="Anonymous",v.src="https://unpkg.com/maki@2.1.0/icons/"+d+".svg"}}),u.setTransformRequest(function(h){return h=h.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),h=h.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),h=h.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:h}}),u._canvas.style.left="0px",u._canvas.style.top="0px",i.rejectOnError(n),i.isStatic||i.initFx(e,t);var f=[];f.push(new Promise(function(h){u.once("load",h)})),f=f.concat(bje.fetchTraceGeoData(e)),Promise.all(f).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Hh.updateMap=function(e,t,r,n){var i=this,a=i.map,o=t[this.id];i.rejectOnError(n);var s=[],l=Aje(o.style);JSON.stringify(i.styleObj)!==JSON.stringify(l)&&(i.styleObj=l,a.setStyle(l.style),i.traceHash={},s.push(new Promise(function(u){a.once("styledata",u)}))),s=s.concat(bje.fetchTraceGeoData(e)),Promise.all(s).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Hh.fillBelowLookup=function(e,t){var r=t[this.id],n=r.layers,i,a,o=this.belowLookup={},s=!1;for(i=0;i1)for(i=0;i-1&&jXt(l.originalEvent,n,[r.xaxis],[r.yaxis],r.id,s),u.indexOf("event")>-1&&p7.click(n,l.originalEvent)}}};Hh.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(t.isStatic)return;function i(l){var u=t.map.unproject(l);return[u.lng,u.lat]}var a=e.dragmode,o;o=function(l,u){if(u.isRect){var c=l.range={};c[t.id]=[i([u.xmin,u.ymin]),i([u.xmax,u.ymax])]}else{var f=l.lassoPoints={};f[t.id]=u.map(i)}};var s=t.dragOptions;t.dragOptions=BJ.extendDeep(s||{},{dragmode:e.dragmode,element:t.div,gd:n,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:o},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),UXt(a)||NXt(a)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(l,u,c){VXt(l,u,c,t.dragOptions,a)},BXt.init(t.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener("touchstart",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on("click",t.onClickInPanHandler))};Hh.updateFramework=function(e){var t=e[this.id].domain,r=e._size,n=this.div.style;n.width=r.w*(t.x[1]-t.x[0])+"px",n.height=r.h*(t.y[1]-t.y[0])+"px",n.left=r.l+t.x[0]*r.w+"px",n.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])};Hh.updateLayers=function(e){var t=e[this.id],r=t.layers,n=this.layerList,i;if(r.length!==n.length){for(i=0;i{"use strict";var UJ=Dr(),ZXt=O_(),YXt=Zd(),Eje=Qk();kje.exports=function(t,r,n){ZXt(t,r,n,{type:"map",attributes:Eje,handleDefaults:KXt,partition:"y"})};function KXt(e,t,r){r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch");var n=r("bounds.west"),i=r("bounds.east"),a=r("bounds.south"),o=r("bounds.north");(n===void 0||i===void 0||a===void 0||o===void 0)&&delete t.bounds,YXt(e,t,{name:"layers",handleItemDefaults:JXt}),t._input=e}function JXt(e,t){function r(l,u){return UJ.coerce(e,t,Eje.layers,l,u)}var n=r("visible");if(n){var i=r("sourcetype"),a=i==="raster"||i==="image";r("source"),r("sourceattribution"),i==="vector"&&r("sourcelayer"),i==="image"&&r("coordinates");var o;a&&(o="raster");var s=r("type",o);a&&s!=="raster"&&(s=t.type="raster",UJ.log("Source types *raster* and *image* must drawn *raster* layer type.")),r("below"),r("color"),r("opacity"),r("minzoom"),r("maxzoom"),s==="circle"&&r("circle.radius"),s==="line"&&(r("line.width"),r("line.dash")),s==="fill"&&r("fill.outlinecolor"),s==="symbol"&&(r("symbol.icon"),r("symbol.iconsize"),r("symbol.text"),UJ.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}});var m7=ye(u0=>{"use strict";var g7=Dr(),Lje=g7.strTranslate,$Xt=g7.strScale,QXt=Id().getSubplotCalcData,eZt=Wp(),tZt=Oa(),Pje=So(),rZt=Zl(),iZt=Mje(),Ix="map";u0.name=Ix;u0.attr="subplot";u0.idRoot=Ix;u0.idRegex=u0.attrRegex=g7.counterRegex(Ix);u0.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}};u0.layoutAttributes=Qk();u0.supplyLayoutDefaults=Cje();u0.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,i=r._subplots[Ix],a=0;a_/2){var b=f.split("|").join("
");d.text(b).attr("data-unformatted",b).call(rZt.convertToTspans,e),v=Pje.bBox(d.node())}d.attr("transform",Lje(-3,-v.height+8)),h.insert("rect",".static-attribution").attr({x:-v.width-6,y:-v.height-3,width:v.width+6,height:v.height+3,fill:"rgba(255, 255, 255, 0.75)"});var p=1;v.width+6>_&&(p=_/(v.width+6));var k=[n.l+n.w*o.x[1],n.t+n.h*(1-o.y[0])];h.attr("transform",Lje(k[0],k[1])+$Xt(p))}};u0.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[Ix],n=0;n{"use strict";Ije.exports={attributes:l7(),supplyDefaults:jHe(),colorbar:$d(),formatLabels:PJ(),calc:_F(),plot:aje(),hoverPoints:d7().hoverPoints,eventData:uje(),selectPoints:fje(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:"trace",name:"scattermap",basePlotModule:m7(),categories:["map","gl","symbols","showLegend","scatter-like"],meta:{}}});var Fje=ye((Hbr,Dje)=>{"use strict";Dje.exports=Rje()});var VJ=ye((jbr,zje)=>{"use strict";var x1=a5(),nZt=Tu(),{hovertemplateAttrs:aZt,templatefallbackAttrs:oZt}=Ll(),sZt=Gl(),Rx=Ao().extendFlat;zje.exports=Rx({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:Rx({},x1.featureidkey,{}),below:{valType:"string",editType:"plot"},text:x1.text,hovertext:x1.hovertext,marker:{line:{color:Rx({},x1.marker.line.color,{editType:"plot"}),width:Rx({},x1.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:Rx({},x1.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:Rx({},x1.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:Rx({},x1.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:x1.hoverinfo,hovertemplate:aZt({},{keys:["properties"]}),hovertemplatefallback:oZt(),showlegend:Rx({},sZt.showlegend,{dflt:!1})},nZt("",{cLetter:"z",editTypeOverride:"calc"}))});var qje=ye((Wbr,Oje)=>{"use strict";var iC=Dr(),lZt=td(),uZt=VJ();Oje.exports=function(t,r,n,i){function a(c,f){return iC.coerce(t,r,uZt,c,f)}var o=a("locations"),s=a("z"),l=a("geojson");if(!iC.isArrayOrTypedArray(o)||!o.length||!iC.isArrayOrTypedArray(s)||!s.length||!(typeof l=="string"&&l!==""||iC.isPlainObject(l))){r.visible=!1;return}a("featureidkey"),r._length=Math.min(o.length,s.length),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var u=a("marker.line.width");u&&a("marker.line.color"),a("marker.opacity"),lZt(t,r,i,a,{prefix:"",cLetter:"z"}),iC.coerceSelectionMarkerOpacity(r,a)}});var GJ=ye((Xbr,Uje)=>{"use strict";var cZt=Eo(),b1=Dr(),fZt=tc(),hZt=So(),dZt=cx().makeBlank,Bje=hx();function vZt(e){var t=e[0].trace,r=t.visible===!0&&t._length!==0,n={layout:{visibility:"none"},paint:{}},i={layout:{visibility:"none"},paint:{}},a=t._opts={fill:n,line:i,geojson:dZt()};if(!r)return a;var o=Bje.extractTraceFeature(e);if(!o)return a;var s=fZt.makeColorScaleFuncFromTrace(t),l=t.marker,u=l.line||{},c;b1.isArrayOrTypedArray(l.opacity)&&(c=function(k){var E=k.mo;return cZt(E)?+b1.constrain(E,0,1):0});var f;b1.isArrayOrTypedArray(u.color)&&(f=function(k){return k.mlc});var h;b1.isArrayOrTypedArray(u.width)&&(h=function(k){return k.mlw});for(var d=0;d{"use strict";var Gje=GJ().convert,pZt=GJ().convertOnSelect,Vje=Px().traceLayerPrefix;function Hje(e,t){this.type="choroplethmap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",Vje+t+"-fill"],["line",Vje+t+"-line"]],this.below=null}var D5=Hje.prototype;D5.update=function(e){this._update(Gje(e)),e[0].trace._glTrace=this};D5.updateOnSelect=function(e){this._update(pZt(e))};D5._update=function(e){var t=this.subplot,r=this.layerList,n=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(e.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(e,n),this.below=n);for(var i=0;i=0;r--)e.removeLayer(t[r][1])};D5.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};jje.exports=function(t,r){var n=r[0].trace,i=new Hje(t,n.uid),a=i.sourceId,o=Gje(r),s=i.below=t.belowLookup["trace-"+n.uid];return t.map.addSource(a,{type:"geojson",data:o.geojson}),i._addLayers(o,s),r[0].trace._glTrace=i,i}});var Zje=ye((Ybr,Xje)=>{"use strict";Xje.exports={attributes:VJ(),supplyDefaults:qje(),colorbar:D_(),calc:NF(),plot:Wje(),hoverPoints:VF(),eventData:GF(),selectPoints:HF(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.updateOnSelect(t)}},getBelow:function(e,t){for(var r=t.getMapLayers(),n=r.length-2;n>=0;n--){var i=r[n].id;if(typeof i=="string"&&i.indexOf("water")===0){for(var a=n+1;a{"use strict";Yje.exports=Zje()});var jJ=ye((Jbr,$je)=>{"use strict";var gZt=Tu(),{hovertemplateAttrs:mZt,templatefallbackAttrs:yZt}=Ll(),Jje=Gl(),y7=l7(),HJ=Ao().extendFlat;$je.exports=HJ({lon:y7.lon,lat:y7.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:y7.text,hovertext:y7.hovertext,hoverinfo:HJ({},Jje.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:mZt(),hovertemplatefallback:yZt(),showlegend:HJ({},Jje.showlegend,{dflt:!1})},gZt("",{cLetter:"z",editTypeOverride:"calc"}))});var eWe=ye(($br,Qje)=>{"use strict";var _Zt=Dr(),xZt=td(),bZt=jJ();Qje.exports=function(t,r,n,i){function a(u,c){return _Zt.coerce(t,r,bZt,u,c)}var o=a("lon")||[],s=a("lat")||[],l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),xZt(t,r,i,a,{prefix:"",cLetter:"z"})}});var iWe=ye((Qbr,rWe)=>{"use strict";var WJ=Eo(),wZt=Dr().isArrayOrTypedArray,XJ=fs().BADNUM,TZt=gv(),tWe=Dr()._;rWe.exports=function(t,r){for(var n=r._length,i=new Array(n),a=r.z,o=wZt(a)&&a.length,s=0;s{"use strict";var AZt=Eo(),ZJ=Dr(),nWe=ka(),aWe=tc(),oWe=fs().BADNUM,SZt=cx().makeBlank;sWe.exports=function(t){var r=t[0].trace,n=r.visible===!0&&r._length!==0,i={layout:{visibility:"none"},paint:{}},a=r._opts={heatmap:i,geojson:SZt()};if(!n)return a;var o=[],s,l=r.z,u=r.radius,c=ZJ.isArrayOrTypedArray(l)&&l.length,f=ZJ.isArrayOrTypedArray(u);for(s=0;s0?+u[s]:0),o.push({type:"Feature",geometry:{type:"Point",coordinates:d},properties:v})}}var b=aWe.extractOpts(r),p=b.reversescale?aWe.flipScale(b.colorscale):b.colorscale,k=p[0][1],E=nWe.opacity(k)<1?k:nWe.addOpacity(k,0),T=["interpolate",["linear"],["heatmap-density"],0,E];for(s=1;s{"use strict";var uWe=lWe(),MZt=Px().traceLayerPrefix;function cWe(e,t){this.type="densitymap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",MZt+t+"-heatmap"]],this.below=null}var _7=cWe.prototype;_7.update=function(e){var t=this.subplot,r=this.layerList,n=uWe(e),i=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(n.geojson),i!==this.below&&(this._removeLayers(),this._addLayers(n,i),this.below=i);for(var a=0;a=0;r--)e.removeLayer(t[r][1])};_7.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};fWe.exports=function(t,r){var n=r[0].trace,i=new cWe(t,n.uid),a=i.sourceId,o=uWe(r),s=i.below=t.belowLookup["trace-"+n.uid];return t.map.addSource(a,{type:"geojson",data:o.geojson}),i._addLayers(o,s),i}});var vWe=ye((r2r,dWe)=>{"use strict";var EZt=ho(),kZt=d7().hoverPoints,CZt=d7().getExtraText;dWe.exports=function(t,r,n){var i=kZt(t,r,n);if(i){var a=i[0],o=a.cd,s=o[0].trace,l=o[a.index];if(delete a.color,"z"in l){var u=a.subplot.mockAxis;a.z=l.z,a.zLabel=EZt.tickText(u,u.c2l(l.z),"hover").text}return a.extraText=CZt(s,l,o[0].t.labels),[a]}}});var gWe=ye((i2r,pWe)=>{"use strict";pWe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var yWe=ye((n2r,mWe)=>{"use strict";mWe.exports={attributes:jJ(),supplyDefaults:eWe(),colorbar:D_(),formatLabels:PJ(),calc:iWe(),plot:hWe(),hoverPoints:vWe(),eventData:gWe(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n{"use strict";_We.exports=yWe()});var KJ=ye((s2r,SWe)=>{"use strict";var LZt=ec(),PZt=Gl(),bWe=Ih(),YJ=v3(),IZt=Cc().attributes,{hovertemplateAttrs:wWe,templatefallbackAttrs:TWe}=Ll(),RZt=Tu(),DZt=vl().templatedArray,FZt=df().descriptionOnlyNumbers,AWe=Ao().extendFlat,zZt=mc().overrideAll,o2r=SWe.exports=zZt({hoverinfo:AWe({},PZt.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:YJ.hoverlabel,domain:IZt({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:FZt("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:LZt({autoShadowDflt:!0}),customdata:void 0,node:{label:{valType:"data_array",dflt:[]},groups:{valType:"info_array",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:"number",editType:"calc"}},x:{valType:"data_array",dflt:[]},y:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:bWe.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:.5,arrayOk:!0}},pad:{valType:"number",arrayOk:!1,min:0,dflt:20},thickness:{valType:"number",arrayOk:!1,min:1,dflt:20},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:YJ.hoverlabel,hovertemplate:wWe({},{keys:["value","label"]}),hovertemplatefallback:TWe(),align:{valType:"enumerated",values:["justify","left","right","center"],dflt:"justify"}},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},hovercolor:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:bWe.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}},source:{valType:"data_array",dflt:[]},target:{valType:"data_array",dflt:[]},value:{valType:"data_array",dflt:[]},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:YJ.hoverlabel,hovertemplate:wWe({},{keys:["value","label"]}),hovertemplatefallback:TWe(),colorscales:DZt("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:AWe(RZt().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")});var LWe=ye((l2r,CWe)=>{"use strict";var F5=Dr(),x7=KJ(),OZt=ka(),MWe=fd(),qZt=Cc().defaults,EWe=_M(),kWe=vl(),BZt=Zd();CWe.exports=function(t,r,n,i){function a(T,L){return F5.coerce(t,r,x7,T,L)}var o=F5.extendDeep(i.hoverlabel,t.hoverlabel),s=t.node,l=kWe.newContainer(r,"node");function u(T,L){return F5.coerce(s,l,x7.node,T,L)}u("label"),u("groups"),u("x"),u("y"),u("pad"),u("thickness"),u("line.color"),u("line.width"),u("hoverinfo",t.hoverinfo),EWe(s,l,u,o),u("hovertemplate"),u("align");var c=i.colorway,f=function(T){return c[T%c.length]};u("color",l.label.map(function(T,L){return OZt.addOpacity(f(L),.8)})),u("customdata");var h=t.link||{},d=kWe.newContainer(r,"link");function v(T,L){return F5.coerce(h,d,x7.link,T,L)}v("label"),v("arrowlen"),v("source"),v("target"),v("value"),v("line.color"),v("line.width"),v("hoverinfo",t.hoverinfo),EWe(h,d,v,o),v("hovertemplate");var _=MWe(i.paper_bgcolor).getLuminance()<.333,b=_?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",p=v("color",b);function k(T){var L=MWe(T);if(!L.isValid())return T;var x=L.getAlpha();return x<=.8?L.setAlpha(x+.2):L=_?L.brighten():L.darken(),L.toRgbString()}v("hovercolor",Array.isArray(p)?p.map(k):k(p)),v("customdata"),BZt(h,d,{name:"colorscales",handleItemDefaults:NZt}),qZt(r,i,a),a("orientation"),a("valueformat"),a("valuesuffix");var E;l.x.length&&l.y.length&&(E="freeform"),a("arrangement",E),F5.coerceFont(a,"textfont",i.font,{autoShadowDflt:!0}),r._length=null};function NZt(e,t){function r(n,i){return F5.coerce(e,t,x7.link.colorscales,n,i)}r("label"),r("cmin"),r("cmax"),r("colorscale")}});var JJ=ye((u2r,PWe)=>{"use strict";PWe.exports=UZt;function UZt(e){for(var t=e.length,r=new Array(t),n=new Array(t),i=new Array(t),a=new Array(t),o=new Array(t),s=new Array(t),l=0;l0;){b=k[k.length-1];var E=e[b];if(a[b]=0&&s[b].push(o[L])}a[b]=T}else{if(n[b]===r[b]){for(var x=[],C=[],M=0,T=p.length-1;T>=0;--T){var g=p[T];if(i[g]=!1,x.push(g),C.push(s[g]),M+=s[g].length,o[g]=c.length,g===b){p.length=T;break}}c.push(x);for(var P=new Array(M),T=0;T{"use strict";var VZt=JJ(),z5=Dr(),GZt=iy().wrap,nC=z5.isArrayOrTypedArray,IWe=z5.isIndex,RWe=tc();function HZt(e){var t=e.node,r=e.link,n=[],i=nC(r.color),a=nC(r.hovercolor),o=nC(r.customdata),s={},l={},u=r.colorscales.length,c;for(c=0;cv&&(v=r.source[c]),r.target[c]>v&&(v=r.target[c]);var _=v+1;e.node._count=_;var b,p=e.node.groups,k={};for(c=0;c0&&IWe(M,_)&&IWe(g,_)&&!(k.hasOwnProperty(M)&&k.hasOwnProperty(g)&&k[M]===k[g])){k.hasOwnProperty(g)&&(g=k[g]),k.hasOwnProperty(M)&&(M=k[M]),M=+M,g=+g,s[M]=s[g]=!0;var P="";r.label&&r.label[c]&&(P=r.label[c]);var A=null;P&&l.hasOwnProperty(P)&&(A=l[P]),n.push({pointNumber:c,label:P,color:i?r.color[c]:r.color,hovercolor:a?r.hovercolor[c]:r.hovercolor,customdata:o?r.customdata[c]:r.customdata,concentrationscale:A,source:M,target:g,value:+C}),x.source.push(M),x.target.push(g)}}var z=_+p.length,O=nC(t.color),U=nC(t.customdata),G=[];for(c=0;c_-1,childrenNodes:[],pointNumber:c,label:Z,color:O?t.color[c]:t.color,customdata:U?t.customdata[c]:t.customdata})}var j=!1;return jZt(z,x.source,x.target)&&(j=!0),{circular:j,links:n,nodes:G,groups:p,groupLookup:k}}function jZt(e,t,r){for(var n=z5.init2dArray(e,0),i=0;i1})}DWe.exports=function(t,r){var n=HZt(r);return GZt({circular:n.circular,_nodes:n.nodes,_links:n.links,_groups:n.groups,_groupLookup:n.groupLookup})}});var OWe=ye((b7,zWe)=>{(function(e,t){typeof b7=="object"&&typeof zWe!="undefined"?t(b7):(e=e||self,t(e.d3=e.d3||{}))})(b7,function(e){"use strict";function t(C){var M=+this._x.call(null,C),g=+this._y.call(null,C);return r(this.cover(M,g),M,g,C)}function r(C,M,g,P){if(isNaN(M)||isNaN(g))return C;var A,z=C._root,O={data:P},U=C._x0,G=C._y0,Z=C._x1,j=C._y1,N,H,re,oe,_e,Ce,Le,ge;if(!z)return C._root=O,C;for(;z.length;)if((_e=M>=(N=(U+Z)/2))?U=N:Z=N,(Ce=g>=(H=(G+j)/2))?G=H:j=H,A=z,!(z=z[Le=Ce<<1|_e]))return A[Le]=O,C;if(re=+C._x.call(null,z.data),oe=+C._y.call(null,z.data),M===re&&g===oe)return O.next=z,A?A[Le]=O:C._root=O,C;do A=A?A[Le]=new Array(4):C._root=new Array(4),(_e=M>=(N=(U+Z)/2))?U=N:Z=N,(Ce=g>=(H=(G+j)/2))?G=H:j=H;while((Le=Ce<<1|_e)===(ge=(oe>=H)<<1|re>=N));return A[ge]=z,A[Le]=O,C}function n(C){var M,g,P=C.length,A,z,O=new Array(P),U=new Array(P),G=1/0,Z=1/0,j=-1/0,N=-1/0;for(g=0;gj&&(j=A),zN&&(N=z));if(G>j||Z>N)return this;for(this.cover(G,Z).cover(j,N),g=0;gC||C>=A||P>M||M>=z;)switch(Z=(Mj||(U=oe.y0)>N||(G=oe.x1)=Le)<<1|C>=Ce)&&(oe=H[H.length-1],H[H.length-1]=H[H.length-1-_e],H[H.length-1-_e]=oe)}else{var ge=C-+this._x.call(null,re.data),ie=M-+this._y.call(null,re.data),Se=ge*ge+ie*ie;if(Se=(H=(O+G)/2))?O=H:G=H,(_e=N>=(re=(U+Z)/2))?U=re:Z=re,M=g,!(g=g[Ce=_e<<1|oe]))return this;if(!g.length)break;(M[Ce+1&3]||M[Ce+2&3]||M[Ce+3&3])&&(P=M,Le=Ce)}for(;g.data!==C;)if(A=g,!(g=g.next))return this;return(z=g.next)&&delete g.next,A?(z?A.next=z:delete A.next,this):M?(z?M[Ce]=z:delete M[Ce],(g=M[0]||M[1]||M[2]||M[3])&&g===(M[3]||M[2]||M[1]||M[0])&&!g.length&&(P?P[Le]=g:this._root=g),this):(this._root=z,this)}function c(C){for(var M=0,g=C.length;M{(function(e,t){t(typeof w7=="object"&&typeof qWe!="undefined"?w7:e.d3=e.d3||{})})(w7,function(e){"use strict";var t="$";function r(){}r.prototype=n.prototype={constructor:r,has:function(_){return t+_ in this},get:function(_){return this[t+_]},set:function(_,b){return this[t+_]=b,this},remove:function(_){var b=t+_;return b in this&&delete this[b]},clear:function(){for(var _ in this)_[0]===t&&delete this[_]},keys:function(){var _=[];for(var b in this)b[0]===t&&_.push(b.slice(1));return _},values:function(){var _=[];for(var b in this)b[0]===t&&_.push(this[b]);return _},entries:function(){var _=[];for(var b in this)b[0]===t&&_.push({key:b.slice(1),value:this[b]});return _},size:function(){var _=0;for(var b in this)b[0]===t&&++_;return _},empty:function(){for(var _ in this)if(_[0]===t)return!1;return!0},each:function(_){for(var b in this)b[0]===t&&_(this[b],b.slice(1),this)}};function n(_,b){var p=new r;if(_ instanceof r)_.each(function(x,C){p.set(C,x)});else if(Array.isArray(_)){var k=-1,E=_.length,T;if(b==null)for(;++k=_.length)return p!=null&&x.sort(p),k!=null?k(x):x;for(var P=-1,A=x.length,z=_[C++],O,U,G=n(),Z,j=M();++P_.length)return x;var M,g=b[C-1];return k!=null&&C>=_.length?M=x.entries():(M=[],x.each(function(P,A){M.push({key:A,values:L(P,C)})})),g!=null?M.sort(function(P,A){return g(P.key,A.key)}):M}return E={object:function(x){return T(x,0,a,o)},map:function(x){return T(x,0,s,l)},entries:function(x){return L(T(x,0,s,l),0)},key:function(x){return _.push(x),E},sortKeys:function(x){return b[_.length-1]=x,E},sortValues:function(x){return p=x,E},rollup:function(x){return k=x,E}}}function a(){return{}}function o(_,b,p){_[b]=p}function s(){return n()}function l(_,b,p){_.set(b,p)}function u(){}var c=n.prototype;u.prototype=f.prototype={constructor:u,has:c.has,add:function(_){return _+="",this[t+_]=_,this},remove:c.remove,clear:c.clear,values:c.keys,size:c.size,empty:c.empty,each:c.each};function f(_,b){var p=new u;if(_ instanceof u)_.each(function(T){p.add(T)});else if(_){var k=-1,E=_.length;if(b==null)for(;++k{(function(e,t){typeof A7=="object"&&typeof BWe!="undefined"?t(A7):(e=e||self,t(e.d3=e.d3||{}))})(A7,function(e){"use strict";var t={value:function(){}};function r(){for(var s=0,l=arguments.length,u={},c;s=0&&(c=u.slice(f+1),u=u.slice(0,f)),u&&!l.hasOwnProperty(u))throw new Error("unknown type: "+u);return{type:u,name:c}})}n.prototype=r.prototype={constructor:n,on:function(s,l){var u=this._,c=i(s+"",u),f,h=-1,d=c.length;if(arguments.length<2){for(;++h0)for(var u=new Array(f),c=0,f,h;c{(function(e,t){typeof S7=="object"&&typeof UWe!="undefined"?t(S7):(e=e||self,t(e.d3=e.d3||{}))})(S7,function(e){"use strict";var t=0,r=0,n=0,i=1e3,a,o,s=0,l=0,u=0,c=typeof performance=="object"&&performance.now?performance:Date,f=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(C){setTimeout(C,17)};function h(){return l||(f(d),l=c.now()+u)}function d(){l=0}function v(){this._call=this._time=this._next=null}v.prototype=_.prototype={constructor:v,restart:function(C,M,g){if(typeof C!="function")throw new TypeError("callback is not a function");g=(g==null?h():+g)+(M==null?0:+M),!this._next&&o!==this&&(o?o._next=this:a=this,o=this),this._call=C,this._time=g,T()},stop:function(){this._call&&(this._call=null,this._time=1/0,T())}};function _(C,M,g){var P=new v;return P.restart(C,M,g),P}function b(){h(),++t;for(var C=a,M;C;)(M=l-C._time)>=0&&C._call.call(null,M),C=C._next;--t}function p(){l=(s=c.now())+u,t=r=0;try{b()}finally{t=0,E(),l=0}}function k(){var C=c.now(),M=C-s;M>i&&(u-=M,s=C)}function E(){for(var C,M=a,g,P=1/0;M;)M._call?(P>M._time&&(P=M._time),C=M,M=M._next):(g=M._next,M._next=null,M=C?C._next=g:a=g);o=C,T(P)}function T(C){if(!t){r&&(r=clearTimeout(r));var M=C-l;M>24?(C<1/0&&(r=setTimeout(p,C-c.now()-u)),n&&(n=clearInterval(n))):(n||(s=c.now(),n=setInterval(k,i)),t=1,f(p))}}function L(C,M,g){var P=new v;return M=M==null?0:+M,P.restart(function(A){P.stop(),C(A+M)},M,g),P}function x(C,M,g){var P=new v,A=M;return M==null?(P.restart(C,M,g),P):(M=+M,g=g==null?h():+g,P.restart(function z(O){O+=A,P.restart(z,A+=M,g),C(O)},M,g),P)}e.interval=x,e.now=h,e.timeout=L,e.timer=_,e.timerFlush=b,Object.defineProperty(e,"__esModule",{value:!0})})});var HWe=ye((M7,GWe)=>{(function(e,t){typeof M7=="object"&&typeof GWe!="undefined"?t(M7,OWe(),T7(),NWe(),VWe()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,e.d3)})(M7,function(e,t,r,n,i){"use strict";function a(C,M){var g;C==null&&(C=0),M==null&&(M=0);function P(){var A,z=g.length,O,U=0,G=0;for(A=0;AN.index){var De=H-Be.x-Be.vx,ce=re-Be.y-Be.vy,je=De*De+ce*ce;jeH+me||Eere+me||AeG.r&&(G.r=G[Z].r)}function U(){if(M){var G,Z=M.length,j;for(g=new Array(Z),G=0;G1?(_e==null?U.remove(oe):U.set(oe,re(_e)),M):U.get(oe)},find:function(oe,_e,Ce){var Le=0,ge=C.length,ie,Se,Ee,Ae,Be;for(Ce==null?Ce=1/0:Ce*=Ce,Le=0;Le1?(Z.on(oe,_e),M):Z.on(oe)}}}function E(){var C,M,g,P=o(-30),A,z=1,O=1/0,U=.81;function G(H){var re,oe=C.length,_e=t.quadtree(C,v,_).visitAfter(j);for(g=H,re=0;re=O)return;(H.data!==M||H.next)&&(Ce===0&&(Ce=s(),ie+=Ce*Ce),Le===0&&(Le=s(),ie+=Le*Le),ie{(function(e,t){typeof E7=="object"&&typeof jWe!="undefined"?t(E7):(e=e||self,t(e.d3=e.d3||{}))})(E7,function(e){"use strict";var t=Math.PI,r=2*t,n=1e-6,i=r-n;function a(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function o(){return new a}a.prototype=o.prototype={constructor:a,moveTo:function(s,l){this._+="M"+(this._x0=this._x1=+s)+","+(this._y0=this._y1=+l)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(s,l){this._+="L"+(this._x1=+s)+","+(this._y1=+l)},quadraticCurveTo:function(s,l,u,c){this._+="Q"+ +s+","+ +l+","+(this._x1=+u)+","+(this._y1=+c)},bezierCurveTo:function(s,l,u,c,f,h){this._+="C"+ +s+","+ +l+","+ +u+","+ +c+","+(this._x1=+f)+","+(this._y1=+h)},arcTo:function(s,l,u,c,f){s=+s,l=+l,u=+u,c=+c,f=+f;var h=this._x1,d=this._y1,v=u-s,_=c-l,b=h-s,p=d-l,k=b*b+p*p;if(f<0)throw new Error("negative radius: "+f);if(this._x1===null)this._+="M"+(this._x1=s)+","+(this._y1=l);else if(k>n)if(!(Math.abs(p*v-_*b)>n)||!f)this._+="L"+(this._x1=s)+","+(this._y1=l);else{var E=u-h,T=c-d,L=v*v+_*_,x=E*E+T*T,C=Math.sqrt(L),M=Math.sqrt(k),g=f*Math.tan((t-Math.acos((L+k-x)/(2*C*M)))/2),P=g/M,A=g/C;Math.abs(P-1)>n&&(this._+="L"+(s+P*b)+","+(l+P*p)),this._+="A"+f+","+f+",0,0,"+ +(p*E>b*T)+","+(this._x1=s+A*v)+","+(this._y1=l+A*_)}},arc:function(s,l,u,c,f,h){s=+s,l=+l,u=+u,h=!!h;var d=u*Math.cos(c),v=u*Math.sin(c),_=s+d,b=l+v,p=1^h,k=h?c-f:f-c;if(u<0)throw new Error("negative radius: "+u);this._x1===null?this._+="M"+_+","+b:(Math.abs(this._x1-_)>n||Math.abs(this._y1-b)>n)&&(this._+="L"+_+","+b),u&&(k<0&&(k=k%r+r),k>i?this._+="A"+u+","+u+",0,1,"+p+","+(s-d)+","+(l-v)+"A"+u+","+u+",0,1,"+p+","+(this._x1=_)+","+(this._y1=b):k>n&&(this._+="A"+u+","+u+",0,"+ +(k>=t)+","+p+","+(this._x1=s+u*Math.cos(f))+","+(this._y1=l+u*Math.sin(f))))},rect:function(s,l,u,c){this._+="M"+(this._x0=this._x1=+s)+","+(this._y0=this._y1=+l)+"h"+ +u+"v"+ +c+"h"+-u+"Z"},toString:function(){return this._}},e.path=o,Object.defineProperty(e,"__esModule",{value:!0})})});var $J=ye((k7,XWe)=>{(function(e,t){typeof k7=="object"&&typeof XWe!="undefined"?t(k7,WWe()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(k7,function(e,t){"use strict";function r(Mt){return function(){return Mt}}var n=Math.abs,i=Math.atan2,a=Math.cos,o=Math.max,s=Math.min,l=Math.sin,u=Math.sqrt,c=1e-12,f=Math.PI,h=f/2,d=2*f;function v(Mt){return Mt>1?0:Mt<-1?f:Math.acos(Mt)}function _(Mt){return Mt>=1?h:Mt<=-1?-h:Math.asin(Mt)}function b(Mt){return Mt.innerRadius}function p(Mt){return Mt.outerRadius}function k(Mt){return Mt.startAngle}function E(Mt){return Mt.endAngle}function T(Mt){return Mt&&Mt.padAngle}function L(Mt,kr,Jr,vi,hn,An,Mn,Li){var _n=Jr-Mt,ya=vi-kr,$n=Mn-hn,Ma=Li-An,_o=Ma*_n-$n*ya;if(!(_o*_oYl*Yl+Su*Su&&(As=Ks,cl=zs),{cx:As,cy:cl,x01:-$n,y01:-Ma,x11:As*(hn/zl-1),y11:cl*(hn/zl-1)}}function C(){var Mt=b,kr=p,Jr=r(0),vi=null,hn=k,An=E,Mn=T,Li=null;function _n(){var ya,$n,Ma=+Mt.apply(this,arguments),_o=+kr.apply(this,arguments),No=hn.apply(this,arguments)-h,po=An.apply(this,arguments)-h,Lo=n(po-No),ko=po>No;if(Li||(Li=ya=t.path()),_oc))Li.moveTo(0,0);else if(Lo>d-c)Li.moveTo(_o*a(No),_o*l(No)),Li.arc(0,0,_o,No,po,!ko),Ma>c&&(Li.moveTo(Ma*a(po),Ma*l(po)),Li.arc(0,0,Ma,po,No,ko));else{var Ds=No,Fs=po,ll=No,ul=po,zl=Lo,us=Lo,il=Mn.apply(this,arguments)/2,As=il>c&&(vi?+vi.apply(this,arguments):u(Ma*Ma+_o*_o)),cl=s(n(_o-Ma)/2,+Jr.apply(this,arguments)),Ks=cl,zs=cl,Io,ls;if(As>c){var Yl=_(As/Ma*l(il)),Su=_(As/_o*l(il));(zl-=Yl*2)>c?(Yl*=ko?1:-1,ll+=Yl,ul-=Yl):(zl=0,ll=ul=(No+po)/2),(us-=Su*2)>c?(Su*=ko?1:-1,Ds+=Su,Fs-=Su):(us=0,Ds=Fs=(No+po)/2)}var nc=_o*a(Ds),bs=_o*l(Ds),Rn=Ma*a(ul),_a=Ma*l(ul);if(cl>c){var Vu=_o*a(Fs),Ol=_o*l(Fs),xo=Ma*a(ll),Kl=Ma*l(ll),Ns;if(Loc?zs>c?(Io=x(xo,Kl,nc,bs,_o,zs,ko),ls=x(Vu,Ol,Rn,_a,_o,zs,ko),Li.moveTo(Io.cx+Io.x01,Io.cy+Io.y01),zsc)||!(zl>c)?Li.lineTo(Rn,_a):Ks>c?(Io=x(Rn,_a,Vu,Ol,Ma,-Ks,ko),ls=x(nc,bs,xo,Kl,Ma,-Ks,ko),Li.lineTo(Io.cx+Io.x01,Io.cy+Io.y01),Ks=_o;--No)Li.point(Fs[No],ll[No]);Li.lineEnd(),Li.areaEnd()}ko&&(Fs[Ma]=+Mt(Lo,Ma,$n),ll[Ma]=+Jr(Lo,Ma,$n),Li.point(kr?+kr(Lo,Ma,$n):Fs[Ma],vi?+vi(Lo,Ma,$n):ll[Ma]))}if(Ds)return Li=null,Ds+""||null}function ya(){return z().defined(hn).curve(Mn).context(An)}return _n.x=function($n){return arguments.length?(Mt=typeof $n=="function"?$n:r(+$n),kr=null,_n):Mt},_n.x0=function($n){return arguments.length?(Mt=typeof $n=="function"?$n:r(+$n),_n):Mt},_n.x1=function($n){return arguments.length?(kr=$n==null?null:typeof $n=="function"?$n:r(+$n),_n):kr},_n.y=function($n){return arguments.length?(Jr=typeof $n=="function"?$n:r(+$n),vi=null,_n):Jr},_n.y0=function($n){return arguments.length?(Jr=typeof $n=="function"?$n:r(+$n),_n):Jr},_n.y1=function($n){return arguments.length?(vi=$n==null?null:typeof $n=="function"?$n:r(+$n),_n):vi},_n.lineX0=_n.lineY0=function(){return ya().x(Mt).y(Jr)},_n.lineY1=function(){return ya().x(Mt).y(vi)},_n.lineX1=function(){return ya().x(kr).y(Jr)},_n.defined=function($n){return arguments.length?(hn=typeof $n=="function"?$n:r(!!$n),_n):hn},_n.curve=function($n){return arguments.length?(Mn=$n,An!=null&&(Li=Mn(An)),_n):Mn},_n.context=function($n){return arguments.length?($n==null?An=Li=null:Li=Mn(An=$n),_n):An},_n}function U(Mt,kr){return krMt?1:kr>=Mt?0:NaN}function G(Mt){return Mt}function Z(){var Mt=G,kr=U,Jr=null,vi=r(0),hn=r(d),An=r(0);function Mn(Li){var _n,ya=Li.length,$n,Ma,_o=0,No=new Array(ya),po=new Array(ya),Lo=+vi.apply(this,arguments),ko=Math.min(d,Math.max(-d,hn.apply(this,arguments)-Lo)),Ds,Fs=Math.min(Math.abs(ko)/ya,An.apply(this,arguments)),ll=Fs*(ko<0?-1:1),ul;for(_n=0;_n0&&(_o+=ul);for(kr!=null?No.sort(function(zl,us){return kr(po[zl],po[us])}):Jr!=null&&No.sort(function(zl,us){return Jr(Li[zl],Li[us])}),_n=0,Ma=_o?(ko-ya*ll)/_o:0;_n0?ul*Ma:0)+ll,po[$n]={data:Li[$n],index:_n,value:ul,startAngle:Lo,endAngle:Ds,padAngle:Fs};return po}return Mn.value=function(Li){return arguments.length?(Mt=typeof Li=="function"?Li:r(+Li),Mn):Mt},Mn.sortValues=function(Li){return arguments.length?(kr=Li,Jr=null,Mn):kr},Mn.sort=function(Li){return arguments.length?(Jr=Li,kr=null,Mn):Jr},Mn.startAngle=function(Li){return arguments.length?(vi=typeof Li=="function"?Li:r(+Li),Mn):vi},Mn.endAngle=function(Li){return arguments.length?(hn=typeof Li=="function"?Li:r(+Li),Mn):hn},Mn.padAngle=function(Li){return arguments.length?(An=typeof Li=="function"?Li:r(+Li),Mn):An},Mn}var j=H(g);function N(Mt){this._curve=Mt}N.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(Mt,kr){this._curve.point(kr*Math.sin(Mt),kr*-Math.cos(Mt))}};function H(Mt){function kr(Jr){return new N(Mt(Jr))}return kr._curve=Mt,kr}function re(Mt){var kr=Mt.curve;return Mt.angle=Mt.x,delete Mt.x,Mt.radius=Mt.y,delete Mt.y,Mt.curve=function(Jr){return arguments.length?kr(H(Jr)):kr()._curve},Mt}function oe(){return re(z().curve(j))}function _e(){var Mt=O().curve(j),kr=Mt.curve,Jr=Mt.lineX0,vi=Mt.lineX1,hn=Mt.lineY0,An=Mt.lineY1;return Mt.angle=Mt.x,delete Mt.x,Mt.startAngle=Mt.x0,delete Mt.x0,Mt.endAngle=Mt.x1,delete Mt.x1,Mt.radius=Mt.y,delete Mt.y,Mt.innerRadius=Mt.y0,delete Mt.y0,Mt.outerRadius=Mt.y1,delete Mt.y1,Mt.lineStartAngle=function(){return re(Jr())},delete Mt.lineX0,Mt.lineEndAngle=function(){return re(vi())},delete Mt.lineX1,Mt.lineInnerRadius=function(){return re(hn())},delete Mt.lineY0,Mt.lineOuterRadius=function(){return re(An())},delete Mt.lineY1,Mt.curve=function(Mn){return arguments.length?kr(H(Mn)):kr()._curve},Mt}function Ce(Mt,kr){return[(kr=+kr)*Math.cos(Mt-=Math.PI/2),kr*Math.sin(Mt)]}var Le=Array.prototype.slice;function ge(Mt){return Mt.source}function ie(Mt){return Mt.target}function Se(Mt){var kr=ge,Jr=ie,vi=P,hn=A,An=null;function Mn(){var Li,_n=Le.call(arguments),ya=kr.apply(this,_n),$n=Jr.apply(this,_n);if(An||(An=Li=t.path()),Mt(An,+vi.apply(this,(_n[0]=ya,_n)),+hn.apply(this,_n),+vi.apply(this,(_n[0]=$n,_n)),+hn.apply(this,_n)),Li)return An=null,Li+""||null}return Mn.source=function(Li){return arguments.length?(kr=Li,Mn):kr},Mn.target=function(Li){return arguments.length?(Jr=Li,Mn):Jr},Mn.x=function(Li){return arguments.length?(vi=typeof Li=="function"?Li:r(+Li),Mn):vi},Mn.y=function(Li){return arguments.length?(hn=typeof Li=="function"?Li:r(+Li),Mn):hn},Mn.context=function(Li){return arguments.length?(An=Li==null?null:Li,Mn):An},Mn}function Ee(Mt,kr,Jr,vi,hn){Mt.moveTo(kr,Jr),Mt.bezierCurveTo(kr=(kr+vi)/2,Jr,kr,hn,vi,hn)}function Ae(Mt,kr,Jr,vi,hn){Mt.moveTo(kr,Jr),Mt.bezierCurveTo(kr,Jr=(Jr+hn)/2,vi,Jr,vi,hn)}function Be(Mt,kr,Jr,vi,hn){var An=Ce(kr,Jr),Mn=Ce(kr,Jr=(Jr+hn)/2),Li=Ce(vi,Jr),_n=Ce(vi,hn);Mt.moveTo(An[0],An[1]),Mt.bezierCurveTo(Mn[0],Mn[1],Li[0],Li[1],_n[0],_n[1])}function Pe(){return Se(Ee)}function me(){return Se(Ae)}function De(){var Mt=Se(Be);return Mt.angle=Mt.x,delete Mt.x,Mt.radius=Mt.y,delete Mt.y,Mt}var ce={draw:function(Mt,kr){var Jr=Math.sqrt(kr/f);Mt.moveTo(Jr,0),Mt.arc(0,0,Jr,0,d)}},je={draw:function(Mt,kr){var Jr=Math.sqrt(kr/5)/2;Mt.moveTo(-3*Jr,-Jr),Mt.lineTo(-Jr,-Jr),Mt.lineTo(-Jr,-3*Jr),Mt.lineTo(Jr,-3*Jr),Mt.lineTo(Jr,-Jr),Mt.lineTo(3*Jr,-Jr),Mt.lineTo(3*Jr,Jr),Mt.lineTo(Jr,Jr),Mt.lineTo(Jr,3*Jr),Mt.lineTo(-Jr,3*Jr),Mt.lineTo(-Jr,Jr),Mt.lineTo(-3*Jr,Jr),Mt.closePath()}},lt=Math.sqrt(1/3),pt=lt*2,Vt={draw:function(Mt,kr){var Jr=Math.sqrt(kr/pt),vi=Jr*lt;Mt.moveTo(0,-Jr),Mt.lineTo(vi,0),Mt.lineTo(0,Jr),Mt.lineTo(-vi,0),Mt.closePath()}},ot=.8908130915292852,ut=Math.sin(f/10)/Math.sin(7*f/10),Wt=Math.sin(d/10)*ut,Nt=-Math.cos(d/10)*ut,$t={draw:function(Mt,kr){var Jr=Math.sqrt(kr*ot),vi=Wt*Jr,hn=Nt*Jr;Mt.moveTo(0,-Jr),Mt.lineTo(vi,hn);for(var An=1;An<5;++An){var Mn=d*An/5,Li=Math.cos(Mn),_n=Math.sin(Mn);Mt.lineTo(_n*Jr,-Li*Jr),Mt.lineTo(Li*vi-_n*hn,_n*vi+Li*hn)}Mt.closePath()}},sr={draw:function(Mt,kr){var Jr=Math.sqrt(kr),vi=-Jr/2;Mt.rect(vi,vi,Jr,Jr)}},Tr=Math.sqrt(3),fr={draw:function(Mt,kr){var Jr=-Math.sqrt(kr/(Tr*3));Mt.moveTo(0,Jr*2),Mt.lineTo(-Tr*Jr,-Jr),Mt.lineTo(Tr*Jr,-Jr),Mt.closePath()}},$e=-.5,St=Math.sqrt(3)/2,Qt=1/Math.sqrt(12),Gt=(Qt/2+1)*3,_t={draw:function(Mt,kr){var Jr=Math.sqrt(kr/Gt),vi=Jr/2,hn=Jr*Qt,An=vi,Mn=Jr*Qt+Jr,Li=-An,_n=Mn;Mt.moveTo(vi,hn),Mt.lineTo(An,Mn),Mt.lineTo(Li,_n),Mt.lineTo($e*vi-St*hn,St*vi+$e*hn),Mt.lineTo($e*An-St*Mn,St*An+$e*Mn),Mt.lineTo($e*Li-St*_n,St*Li+$e*_n),Mt.lineTo($e*vi+St*hn,$e*hn-St*vi),Mt.lineTo($e*An+St*Mn,$e*Mn-St*An),Mt.lineTo($e*Li+St*_n,$e*_n-St*Li),Mt.closePath()}},It=[ce,je,Vt,sr,$t,fr,_t];function mt(){var Mt=r(ce),kr=r(64),Jr=null;function vi(){var hn;if(Jr||(Jr=hn=t.path()),Mt.apply(this,arguments).draw(Jr,+kr.apply(this,arguments)),hn)return Jr=null,hn+""||null}return vi.type=function(hn){return arguments.length?(Mt=typeof hn=="function"?hn:r(hn),vi):Mt},vi.size=function(hn){return arguments.length?(kr=typeof hn=="function"?hn:r(+hn),vi):kr},vi.context=function(hn){return arguments.length?(Jr=hn==null?null:hn,vi):Jr},vi}function er(){}function lr(Mt,kr,Jr){Mt._context.bezierCurveTo((2*Mt._x0+Mt._x1)/3,(2*Mt._y0+Mt._y1)/3,(Mt._x0+2*Mt._x1)/3,(Mt._y0+2*Mt._y1)/3,(Mt._x0+4*Mt._x1+kr)/6,(Mt._y0+4*Mt._y1+Jr)/6)}function wr(Mt){this._context=Mt}wr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:lr(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Mt,kr){switch(Mt=+Mt,kr=+kr,this._point){case 0:this._point=1,this._line?this._context.lineTo(Mt,kr):this._context.moveTo(Mt,kr);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:lr(this,Mt,kr);break}this._x0=this._x1,this._x1=Mt,this._y0=this._y1,this._y1=kr}};function Lr(Mt){return new wr(Mt)}function ti(Mt){this._context=Mt}ti.prototype={areaStart:er,areaEnd:er,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(Mt,kr){switch(Mt=+Mt,kr=+kr,this._point){case 0:this._point=1,this._x2=Mt,this._y2=kr;break;case 1:this._point=2,this._x3=Mt,this._y3=kr;break;case 2:this._point=3,this._x4=Mt,this._y4=kr,this._context.moveTo((this._x0+4*this._x1+Mt)/6,(this._y0+4*this._y1+kr)/6);break;default:lr(this,Mt,kr);break}this._x0=this._x1,this._x1=Mt,this._y0=this._y1,this._y1=kr}};function Br(Mt){return new ti(Mt)}function Vr(Mt){this._context=Mt}Vr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(Mt,kr){switch(Mt=+Mt,kr=+kr,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var Jr=(this._x0+4*this._x1+Mt)/6,vi=(this._y0+4*this._y1+kr)/6;this._line?this._context.lineTo(Jr,vi):this._context.moveTo(Jr,vi);break;case 3:this._point=4;default:lr(this,Mt,kr);break}this._x0=this._x1,this._x1=Mt,this._y0=this._y1,this._y1=kr}};function dt(Mt){return new Vr(Mt)}function Ge(Mt,kr){this._basis=new wr(Mt),this._beta=kr}Ge.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var Mt=this._x,kr=this._y,Jr=Mt.length-1;if(Jr>0)for(var vi=Mt[0],hn=kr[0],An=Mt[Jr]-vi,Mn=kr[Jr]-hn,Li=-1,_n;++Li<=Jr;)_n=Li/Jr,this._basis.point(this._beta*Mt[Li]+(1-this._beta)*(vi+_n*An),this._beta*kr[Li]+(1-this._beta)*(hn+_n*Mn));this._x=this._y=null,this._basis.lineEnd()},point:function(Mt,kr){this._x.push(+Mt),this._y.push(+kr)}};var Je=function Mt(kr){function Jr(vi){return kr===1?new wr(vi):new Ge(vi,kr)}return Jr.beta=function(vi){return Mt(+vi)},Jr}(.85);function We(Mt,kr,Jr){Mt._context.bezierCurveTo(Mt._x1+Mt._k*(Mt._x2-Mt._x0),Mt._y1+Mt._k*(Mt._y2-Mt._y0),Mt._x2+Mt._k*(Mt._x1-kr),Mt._y2+Mt._k*(Mt._y1-Jr),Mt._x2,Mt._y2)}function tt(Mt,kr){this._context=Mt,this._k=(1-kr)/6}tt.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:We(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Mt,kr){switch(Mt=+Mt,kr=+kr,this._point){case 0:this._point=1,this._line?this._context.lineTo(Mt,kr):this._context.moveTo(Mt,kr);break;case 1:this._point=2,this._x1=Mt,this._y1=kr;break;case 2:this._point=3;default:We(this,Mt,kr);break}this._x0=this._x1,this._x1=this._x2,this._x2=Mt,this._y0=this._y1,this._y1=this._y2,this._y2=kr}};var xt=function Mt(kr){function Jr(vi){return new tt(vi,kr)}return Jr.tension=function(vi){return Mt(+vi)},Jr}(0);function Ie(Mt,kr){this._context=Mt,this._k=(1-kr)/6}Ie.prototype={areaStart:er,areaEnd:er,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(Mt,kr){switch(Mt=+Mt,kr=+kr,this._point){case 0:this._point=1,this._x3=Mt,this._y3=kr;break;case 1:this._point=2,this._context.moveTo(this._x4=Mt,this._y4=kr);break;case 2:this._point=3,this._x5=Mt,this._y5=kr;break;default:We(this,Mt,kr);break}this._x0=this._x1,this._x1=this._x2,this._x2=Mt,this._y0=this._y1,this._y1=this._y2,this._y2=kr}};var xe=function Mt(kr){function Jr(vi){return new Ie(vi,kr)}return Jr.tension=function(vi){return Mt(+vi)},Jr}(0);function ke(Mt,kr){this._context=Mt,this._k=(1-kr)/6}ke.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(Mt,kr){switch(Mt=+Mt,kr=+kr,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:We(this,Mt,kr);break}this._x0=this._x1,this._x1=this._x2,this._x2=Mt,this._y0=this._y1,this._y1=this._y2,this._y2=kr}};var vt=function Mt(kr){function Jr(vi){return new ke(vi,kr)}return Jr.tension=function(vi){return Mt(+vi)},Jr}(0);function ir(Mt,kr,Jr){var vi=Mt._x1,hn=Mt._y1,An=Mt._x2,Mn=Mt._y2;if(Mt._l01_a>c){var Li=2*Mt._l01_2a+3*Mt._l01_a*Mt._l12_a+Mt._l12_2a,_n=3*Mt._l01_a*(Mt._l01_a+Mt._l12_a);vi=(vi*Li-Mt._x0*Mt._l12_2a+Mt._x2*Mt._l01_2a)/_n,hn=(hn*Li-Mt._y0*Mt._l12_2a+Mt._y2*Mt._l01_2a)/_n}if(Mt._l23_a>c){var ya=2*Mt._l23_2a+3*Mt._l23_a*Mt._l12_a+Mt._l12_2a,$n=3*Mt._l23_a*(Mt._l23_a+Mt._l12_a);An=(An*ya+Mt._x1*Mt._l23_2a-kr*Mt._l12_2a)/$n,Mn=(Mn*ya+Mt._y1*Mt._l23_2a-Jr*Mt._l12_2a)/$n}Mt._context.bezierCurveTo(vi,hn,An,Mn,Mt._x2,Mt._y2)}function ar(Mt,kr){this._context=Mt,this._alpha=kr}ar.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Mt,kr){if(Mt=+Mt,kr=+kr,this._point){var Jr=this._x2-Mt,vi=this._y2-kr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Jr*Jr+vi*vi,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Mt,kr):this._context.moveTo(Mt,kr);break;case 1:this._point=2;break;case 2:this._point=3;default:ir(this,Mt,kr);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=Mt,this._y0=this._y1,this._y1=this._y2,this._y2=kr}};var vr=function Mt(kr){function Jr(vi){return kr?new ar(vi,kr):new tt(vi,0)}return Jr.alpha=function(vi){return Mt(+vi)},Jr}(.5);function ii(Mt,kr){this._context=Mt,this._alpha=kr}ii.prototype={areaStart:er,areaEnd:er,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(Mt,kr){if(Mt=+Mt,kr=+kr,this._point){var Jr=this._x2-Mt,vi=this._y2-kr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Jr*Jr+vi*vi,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=Mt,this._y3=kr;break;case 1:this._point=2,this._context.moveTo(this._x4=Mt,this._y4=kr);break;case 2:this._point=3,this._x5=Mt,this._y5=kr;break;default:ir(this,Mt,kr);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=Mt,this._y0=this._y1,this._y1=this._y2,this._y2=kr}};var pi=function Mt(kr){function Jr(vi){return kr?new ii(vi,kr):new Ie(vi,0)}return Jr.alpha=function(vi){return Mt(+vi)},Jr}(.5);function $r(Mt,kr){this._context=Mt,this._alpha=kr}$r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(Mt,kr){if(Mt=+Mt,kr=+kr,this._point){var Jr=this._x2-Mt,vi=this._y2-kr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Jr*Jr+vi*vi,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ir(this,Mt,kr);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=Mt,this._y0=this._y1,this._y1=this._y2,this._y2=kr}};var di=function Mt(kr){function Jr(vi){return kr?new $r(vi,kr):new ke(vi,0)}return Jr.alpha=function(vi){return Mt(+vi)},Jr}(.5);function ji(Mt){this._context=Mt}ji.prototype={areaStart:er,areaEnd:er,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(Mt,kr){Mt=+Mt,kr=+kr,this._point?this._context.lineTo(Mt,kr):(this._point=1,this._context.moveTo(Mt,kr))}};function In(Mt){return new ji(Mt)}function wi(Mt){return Mt<0?-1:1}function On(Mt,kr,Jr){var vi=Mt._x1-Mt._x0,hn=kr-Mt._x1,An=(Mt._y1-Mt._y0)/(vi||hn<0&&-0),Mn=(Jr-Mt._y1)/(hn||vi<0&&-0),Li=(An*hn+Mn*vi)/(vi+hn);return(wi(An)+wi(Mn))*Math.min(Math.abs(An),Math.abs(Mn),.5*Math.abs(Li))||0}function qn(Mt,kr){var Jr=Mt._x1-Mt._x0;return Jr?(3*(Mt._y1-Mt._y0)/Jr-kr)/2:kr}function Fn(Mt,kr,Jr){var vi=Mt._x0,hn=Mt._y0,An=Mt._x1,Mn=Mt._y1,Li=(An-vi)/3;Mt._context.bezierCurveTo(vi+Li,hn+Li*kr,An-Li,Mn-Li*Jr,An,Mn)}function ra(Mt){this._context=Mt}ra.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Fn(this,this._t0,qn(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Mt,kr){var Jr=NaN;if(Mt=+Mt,kr=+kr,!(Mt===this._x1&&kr===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Mt,kr):this._context.moveTo(Mt,kr);break;case 1:this._point=2;break;case 2:this._point=3,Fn(this,qn(this,Jr=On(this,Mt,kr)),Jr);break;default:Fn(this,this._t0,Jr=On(this,Mt,kr));break}this._x0=this._x1,this._x1=Mt,this._y0=this._y1,this._y1=kr,this._t0=Jr}}};function la(Mt){this._context=new Ut(Mt)}(la.prototype=Object.create(ra.prototype)).point=function(Mt,kr){ra.prototype.point.call(this,kr,Mt)};function Ut(Mt){this._context=Mt}Ut.prototype={moveTo:function(Mt,kr){this._context.moveTo(kr,Mt)},closePath:function(){this._context.closePath()},lineTo:function(Mt,kr){this._context.lineTo(kr,Mt)},bezierCurveTo:function(Mt,kr,Jr,vi,hn,An){this._context.bezierCurveTo(kr,Mt,vi,Jr,An,hn)}};function wt(Mt){return new ra(Mt)}function rr(Mt){return new la(Mt)}function nr(Mt){this._context=Mt}nr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var Mt=this._x,kr=this._y,Jr=Mt.length;if(Jr)if(this._line?this._context.lineTo(Mt[0],kr[0]):this._context.moveTo(Mt[0],kr[0]),Jr===2)this._context.lineTo(Mt[1],kr[1]);else for(var vi=Er(Mt),hn=Er(kr),An=0,Mn=1;Mn=0;--kr)hn[kr]=(Mn[kr]-hn[kr+1])/An[kr];for(An[Jr-1]=(Mt[Jr]+hn[Jr-1])/2,kr=0;kr=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(Mt,kr){switch(Mt=+Mt,kr=+kr,this._point){case 0:this._point=1,this._line?this._context.lineTo(Mt,kr):this._context.moveTo(Mt,kr);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,kr),this._context.lineTo(Mt,kr);else{var Jr=this._x*(1-this._t)+Mt*this._t;this._context.lineTo(Jr,this._y),this._context.lineTo(Jr,kr)}break}}this._x=Mt,this._y=kr}};function Qr(Mt){return new ri(Mt,.5)}function Oi(Mt){return new ri(Mt,0)}function $i(Mt){return new ri(Mt,1)}function tn(Mt,kr){if((Mn=Mt.length)>1)for(var Jr=1,vi,hn,An=Mt[kr[0]],Mn,Li=An.length;Jr=0;)Jr[kr]=kr;return Jr}function yn(Mt,kr){return Mt[kr]}function Sn(){var Mt=r([]),kr=fn,Jr=tn,vi=yn;function hn(An){var Mn=Mt.apply(this,arguments),Li,_n=An.length,ya=Mn.length,$n=new Array(ya),Ma;for(Li=0;Li0){for(var Jr,vi,hn=0,An=Mt[0].length,Mn;hn0)for(var Jr,vi=0,hn,An,Mn,Li,_n,ya=Mt[kr[0]].length;vi0?(hn[0]=Mn,hn[1]=Mn+=An):An<0?(hn[1]=Li,hn[0]=Li+=An):(hn[0]=0,hn[1]=An)}function ma(Mt,kr){if((hn=Mt.length)>0){for(var Jr=0,vi=Mt[kr[0]],hn,An=vi.length;Jr0)||!((An=(hn=Mt[kr[0]]).length)>0))){for(var Jr=0,vi=1,hn,An,Mn;viAn&&(An=hn,Jr=kr);return Jr}function da(Mt){var kr=Mt.map(Wn);return fn(Mt).sort(function(Jr,vi){return kr[Jr]-kr[vi]})}function Wn(Mt){for(var kr=0,Jr=-1,vi=Mt.length,hn;++Jr{(function(e,t){typeof C7=="object"&&typeof ZWe!="undefined"?t(C7,hk(),T7(),$J()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3)})(C7,function(e,t,r,n){"use strict";function i(g){return g.target.depth}function a(g){return g.depth}function o(g,P){return P-1-g.height}function s(g,P){return g.sourceLinks.length?g.depth:P-1}function l(g){return g.targetLinks.length?g.depth:g.sourceLinks.length?t.min(g.sourceLinks,i)-1:0}function u(g){return function(){return g}}function c(g,P){return h(g.source,P.source)||g.index-P.index}function f(g,P){return h(g.target,P.target)||g.index-P.index}function h(g,P){return g.y0-P.y0}function d(g){return g.value}function v(g){return(g.y0+g.y1)/2}function _(g){return v(g.source)*g.value}function b(g){return v(g.target)*g.value}function p(g){return g.index}function k(g){return g.nodes}function E(g){return g.links}function T(g,P){var A=g.get(P);if(!A)throw new Error("missing: "+P);return A}var L=function(){var g=0,P=0,A=1,z=1,O=24,U=8,G=p,Z=s,j=k,N=E,H=32,re=2/3;function oe(){var Se={nodes:j.apply(null,arguments),links:N.apply(null,arguments)};return _e(Se),Ce(Se),Le(Se),ge(Se,H),ie(Se),Se}oe.update=function(Se){return ie(Se),Se},oe.nodeId=function(Se){return arguments.length?(G=typeof Se=="function"?Se:u(Se),oe):G},oe.nodeAlign=function(Se){return arguments.length?(Z=typeof Se=="function"?Se:u(Se),oe):Z},oe.nodeWidth=function(Se){return arguments.length?(O=+Se,oe):O},oe.nodePadding=function(Se){return arguments.length?(U=+Se,oe):U},oe.nodes=function(Se){return arguments.length?(j=typeof Se=="function"?Se:u(Se),oe):j},oe.links=function(Se){return arguments.length?(N=typeof Se=="function"?Se:u(Se),oe):N},oe.size=function(Se){return arguments.length?(g=P=0,A=+Se[0],z=+Se[1],oe):[A-g,z-P]},oe.extent=function(Se){return arguments.length?(g=+Se[0][0],A=+Se[1][0],P=+Se[0][1],z=+Se[1][1],oe):[[g,P],[A,z]]},oe.iterations=function(Se){return arguments.length?(H=+Se,oe):H};function _e(Se){Se.nodes.forEach(function(Ae,Be){Ae.index=Be,Ae.sourceLinks=[],Ae.targetLinks=[]});var Ee=r.map(Se.nodes,G);Se.links.forEach(function(Ae,Be){Ae.index=Be;var Pe=Ae.source,me=Ae.target;typeof Pe!="object"&&(Pe=Ae.source=T(Ee,Pe)),typeof me!="object"&&(me=Ae.target=T(Ee,me)),Pe.sourceLinks.push(Ae),me.targetLinks.push(Ae)})}function Ce(Se){Se.nodes.forEach(function(Ee){Ee.value=Math.max(t.sum(Ee.sourceLinks,d),t.sum(Ee.targetLinks,d))})}function Le(Se){var Ee,Ae,Be;for(Ee=Se.nodes,Ae=[],Be=0;Ee.length;++Be,Ee=Ae,Ae=[])Ee.forEach(function(me){me.depth=Be,me.sourceLinks.forEach(function(De){Ae.indexOf(De.target)<0&&Ae.push(De.target)})});for(Ee=Se.nodes,Ae=[],Be=0;Ee.length;++Be,Ee=Ae,Ae=[])Ee.forEach(function(me){me.height=Be,me.targetLinks.forEach(function(De){Ae.indexOf(De.source)<0&&Ae.push(De.source)})});var Pe=(A-g-O)/(Be-1);Se.nodes.forEach(function(me){me.x1=(me.x0=g+Math.max(0,Math.min(Be-1,Math.floor(Z.call(null,me,Be))))*Pe)+O})}function ge(Se){var Ee=r.nest().key(function(je){return je.x0}).sortKeys(t.ascending).entries(Se.nodes).map(function(je){return je.values});Pe(),ce();for(var Ae=1,Be=H;Be>0;--Be)De(Ae*=.99),ce(),me(Ae),ce();function Pe(){var je=t.max(Ee,function(Vt){return Vt.length}),lt=re*(z-P)/(je-1);U>lt&&(U=lt);var pt=t.min(Ee,function(Vt){return(z-P-(Vt.length-1)*U)/t.sum(Vt,d)});Ee.forEach(function(Vt){Vt.forEach(function(ot,ut){ot.y1=(ot.y0=ut)+ot.value*pt})}),Se.links.forEach(function(Vt){Vt.width=Vt.value*pt})}function me(je){Ee.forEach(function(lt){lt.forEach(function(pt){if(pt.targetLinks.length){var Vt=(t.sum(pt.targetLinks,_)/t.sum(pt.targetLinks,d)-v(pt))*je;pt.y0+=Vt,pt.y1+=Vt}})})}function De(je){Ee.slice().reverse().forEach(function(lt){lt.forEach(function(pt){if(pt.sourceLinks.length){var Vt=(t.sum(pt.sourceLinks,b)/t.sum(pt.sourceLinks,d)-v(pt))*je;pt.y0+=Vt,pt.y1+=Vt}})})}function ce(){Ee.forEach(function(je){var lt,pt,Vt=P,ot=je.length,ut;for(je.sort(h),ut=0;ut0&&(lt.y0+=pt,lt.y1+=pt),Vt=lt.y1+U;if(pt=Vt-U-z,pt>0)for(Vt=lt.y0-=pt,lt.y1-=pt,ut=ot-2;ut>=0;--ut)lt=je[ut],pt=lt.y1+U-Vt,pt>0&&(lt.y0-=pt,lt.y1-=pt),Vt=lt.y0})}}function ie(Se){Se.nodes.forEach(function(Ee){Ee.sourceLinks.sort(f),Ee.targetLinks.sort(c)}),Se.nodes.forEach(function(Ee){var Ae=Ee.y0,Be=Ae;Ee.sourceLinks.forEach(function(Pe){Pe.y0=Ae+Pe.width/2,Ae+=Pe.width}),Ee.targetLinks.forEach(function(Pe){Pe.y1=Be+Pe.width/2,Be+=Pe.width})})}return oe};function x(g){return[g.source.x1,g.y0]}function C(g){return[g.target.x0,g.y1]}var M=function(){return n.linkHorizontal().source(x).target(C)};e.sankey=L,e.sankeyCenter=l,e.sankeyLeft=a,e.sankeyRight=o,e.sankeyJustify=s,e.sankeyLinkHorizontal=M,Object.defineProperty(e,"__esModule",{value:!0})})});var JWe=ye((f2r,KWe)=>{var WZt=JJ();KWe.exports=function(t,r){var n=[],i=[],a=[],o={},s=[],l;function u(E){a[E]=!1,o.hasOwnProperty(E)&&Object.keys(o[E]).forEach(function(T){delete o[E][T],a[T]&&u(T)})}function c(E){var T=!1;i.push(E),a[E]=!0;var L,x;for(L=0;L=E})}function d(E){h(E);for(var T=t,L=WZt(T),x=L.components.filter(function(O){return O.length>1}),C=1/0,M,g=0;g{(function(e,t){typeof L7=="object"&&typeof $We!="undefined"?t(L7,hk(),T7(),$J(),JWe()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,null)})(L7,function(e,t,r,n,i){"use strict";i=i&&i.hasOwnProperty("default")?i.default:i;function a(ot){return ot.target.depth}function o(ot){return ot.depth}function s(ot,ut){return ut-1-ot.height}function l(ot,ut){return ot.sourceLinks.length?ot.depth:ut-1}function u(ot){return ot.targetLinks.length?ot.depth:ot.sourceLinks.length?t.min(ot.sourceLinks,a)-1:0}function c(ot){return function(){return ot}}var f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ot){return typeof ot}:function(ot){return ot&&typeof Symbol=="function"&&ot.constructor===Symbol&&ot!==Symbol.prototype?"symbol":typeof ot};function h(ot,ut){return v(ot.source,ut.source)||ot.index-ut.index}function d(ot,ut){return v(ot.target,ut.target)||ot.index-ut.index}function v(ot,ut){return ot.partOfCycle===ut.partOfCycle?ot.y0-ut.y0:ot.circularLinkType==="top"||ut.circularLinkType==="bottom"?-1:1}function _(ot){return ot.value}function b(ot){return(ot.y0+ot.y1)/2}function p(ot){return b(ot.source)}function k(ot){return b(ot.target)}function E(ot){return ot.index}function T(ot){return ot.nodes}function L(ot){return ot.links}function x(ot,ut){var Wt=ot.get(ut);if(!Wt)throw new Error("missing: "+ut);return Wt}function C(ot,ut){return ut(ot)}var M=25,g=10,P=.3;function A(){var ot=0,ut=0,Wt=1,Nt=1,$t=24,sr,Tr=E,fr=l,$e=T,St=L,Qt=32,Gt=2,_t,It=null;function mt(){var dt={nodes:$e.apply(null,arguments),links:St.apply(null,arguments)};er(dt),z(dt,Tr,It),lr(dt),ti(dt),O(dt,Tr),Br(dt,Qt,Tr),Vr(dt);for(var Ge=4,Je=0;Je0?Ge+M+g:Ge,Je=Je>0?Je+M+g:Je,We=We>0?We+M+g:We,tt=tt>0?tt+M+g:tt,{top:Ge,bottom:Je,left:tt,right:We}}function Lr(dt,Ge){var Je=t.max(dt.nodes,function(vt){return vt.column}),We=Wt-ot,tt=Nt-ut,xt=We+Ge.right+Ge.left,Ie=tt+Ge.top+Ge.bottom,xe=We/xt,ke=tt/Ie;return ot=ot*xe+Ge.left,Wt=Ge.right==0?Wt:Wt*xe,ut=ut*ke+Ge.top,Nt=Nt*ke,dt.nodes.forEach(function(vt){vt.x0=ot+vt.column*((Wt-ot-$t)/Je),vt.x1=vt.x0+$t}),ke}function ti(dt){var Ge,Je,We;for(Ge=dt.nodes,Je=[],We=0;Ge.length;++We,Ge=Je,Je=[])Ge.forEach(function(tt){tt.depth=We,tt.sourceLinks.forEach(function(xt){Je.indexOf(xt.target)<0&&!xt.circular&&Je.push(xt.target)})});for(Ge=dt.nodes,Je=[],We=0;Ge.length;++We,Ge=Je,Je=[])Ge.forEach(function(tt){tt.height=We,tt.targetLinks.forEach(function(xt){Je.indexOf(xt.source)<0&&!xt.circular&&Je.push(xt.source)})});dt.nodes.forEach(function(tt){tt.column=Math.floor(fr.call(null,tt,We))})}function Br(dt,Ge,Je){var We=r.nest().key(function(vt){return vt.column}).sortKeys(t.ascending).entries(dt.nodes).map(function(vt){return vt.values});Ie(Je),ke();for(var tt=1,xt=Ge;xt>0;--xt)xe(tt*=.99,Je),ke();function Ie(vt){if(_t){var ir=1/0;We.forEach(function(pi){var $r=Nt*_t/(pi.length+1);ir=$r0))if(pi==0&&ii==1)di=$r.y1-$r.y0,$r.y0=Nt/2-di/2,$r.y1=Nt/2+di/2;else if(pi==ar-1&&ii==1)di=$r.y1-$r.y0,$r.y0=Nt/2-di/2,$r.y1=Nt/2+di/2;else{var ji=0,In=t.mean($r.sourceLinks,k),wi=t.mean($r.targetLinks,p);In&&wi?ji=(In+wi)/2:ji=In||wi;var On=(ji-b($r))*vt;$r.y0+=On,$r.y1+=On}})})}function ke(){We.forEach(function(vt){var ir,ar,vr=ut,ii=vt.length,pi;for(vt.sort(v),pi=0;pi0&&(ir.y0+=ar,ir.y1+=ar),vr=ir.y1+sr;if(ar=vr-sr-Nt,ar>0)for(vr=ir.y0-=ar,ir.y1-=ar,pi=ii-2;pi>=0;--pi)ir=vt[pi],ar=ir.y1+sr-vr,ar>0&&(ir.y0-=ar,ir.y1-=ar),vr=ir.y0})}}function Vr(dt){dt.nodes.forEach(function(Ge){Ge.sourceLinks.sort(d),Ge.targetLinks.sort(h)}),dt.nodes.forEach(function(Ge){var Je=Ge.y0,We=Je,tt=Ge.y1,xt=tt;Ge.sourceLinks.forEach(function(Ie){Ie.circular?(Ie.y0=tt-Ie.width/2,tt=tt-Ie.width):(Ie.y0=Je+Ie.width/2,Je+=Ie.width)}),Ge.targetLinks.forEach(function(Ie){Ie.circular?(Ie.y1=xt-Ie.width/2,xt=xt-Ie.width):(Ie.y1=We+Ie.width/2,We+=Ie.width)})})}return mt}function z(ot,ut,Wt){var Nt=0;if(Wt===null){for(var $t=[],sr=0;srut.source.column)}function Z(ot,ut){var Wt=0;ot.sourceLinks.forEach(function($t){Wt=$t.circular&&!pt($t,ut)?Wt+1:Wt});var Nt=0;return ot.targetLinks.forEach(function($t){Nt=$t.circular&&!pt($t,ut)?Nt+1:Nt}),Wt+Nt}function j(ot){var ut=ot.source.sourceLinks,Wt=0;ut.forEach(function(sr){Wt=sr.circular?Wt+1:Wt});var Nt=ot.target.targetLinks,$t=0;return Nt.forEach(function(sr){$t=sr.circular?$t+1:$t}),!(Wt>1||$t>1)}function N(ot,ut,Wt){return ot.sort(oe),ot.forEach(function(Nt,$t){var sr=0;if(pt(Nt,Wt)&&j(Nt))Nt.circularPathData.verticalBuffer=sr+Nt.width/2;else{var Tr=0;for(Tr;Tr<$t;Tr++)if(G(ot[$t],ot[Tr])){var fr=ot[Tr].circularPathData.verticalBuffer+ot[Tr].width/2+ut;sr=fr>sr?fr:sr}Nt.circularPathData.verticalBuffer=sr+Nt.width/2}}),ot}function H(ot,ut,Wt,Nt){var $t=5,sr=t.min(ot.links,function($e){return $e.source.y0});ot.links.forEach(function($e){$e.circular&&($e.circularPathData={})});var Tr=ot.links.filter(function($e){return $e.circularLinkType=="top"});N(Tr,ut,Nt);var fr=ot.links.filter(function($e){return $e.circularLinkType=="bottom"});N(fr,ut,Nt),ot.links.forEach(function($e){if($e.circular){if($e.circularPathData.arcRadius=$e.width+g,$e.circularPathData.leftNodeBuffer=$t,$e.circularPathData.rightNodeBuffer=$t,$e.circularPathData.sourceWidth=$e.source.x1-$e.source.x0,$e.circularPathData.sourceX=$e.source.x0+$e.circularPathData.sourceWidth,$e.circularPathData.targetX=$e.target.x0,$e.circularPathData.sourceY=$e.y0,$e.circularPathData.targetY=$e.y1,pt($e,Nt)&&j($e))$e.circularPathData.leftSmallArcRadius=g+$e.width/2,$e.circularPathData.leftLargeArcRadius=g+$e.width/2,$e.circularPathData.rightSmallArcRadius=g+$e.width/2,$e.circularPathData.rightLargeArcRadius=g+$e.width/2,$e.circularLinkType=="bottom"?($e.circularPathData.verticalFullExtent=$e.source.y1+M+$e.circularPathData.verticalBuffer,$e.circularPathData.verticalLeftInnerExtent=$e.circularPathData.verticalFullExtent-$e.circularPathData.leftLargeArcRadius,$e.circularPathData.verticalRightInnerExtent=$e.circularPathData.verticalFullExtent-$e.circularPathData.rightLargeArcRadius):($e.circularPathData.verticalFullExtent=$e.source.y0-M-$e.circularPathData.verticalBuffer,$e.circularPathData.verticalLeftInnerExtent=$e.circularPathData.verticalFullExtent+$e.circularPathData.leftLargeArcRadius,$e.circularPathData.verticalRightInnerExtent=$e.circularPathData.verticalFullExtent+$e.circularPathData.rightLargeArcRadius);else{var St=$e.source.column,Qt=$e.circularLinkType,Gt=ot.links.filter(function(mt){return mt.source.column==St&&mt.circularLinkType==Qt});$e.circularLinkType=="bottom"?Gt.sort(Ce):Gt.sort(_e);var _t=0;Gt.forEach(function(mt,er){mt.circularLinkID==$e.circularLinkID&&($e.circularPathData.leftSmallArcRadius=g+$e.width/2+_t,$e.circularPathData.leftLargeArcRadius=g+$e.width/2+er*ut+_t),_t=_t+mt.width}),St=$e.target.column,Gt=ot.links.filter(function(mt){return mt.target.column==St&&mt.circularLinkType==Qt}),$e.circularLinkType=="bottom"?Gt.sort(ge):Gt.sort(Le),_t=0,Gt.forEach(function(mt,er){mt.circularLinkID==$e.circularLinkID&&($e.circularPathData.rightSmallArcRadius=g+$e.width/2+_t,$e.circularPathData.rightLargeArcRadius=g+$e.width/2+er*ut+_t),_t=_t+mt.width}),$e.circularLinkType=="bottom"?($e.circularPathData.verticalFullExtent=Math.max(Wt,$e.source.y1,$e.target.y1)+M+$e.circularPathData.verticalBuffer,$e.circularPathData.verticalLeftInnerExtent=$e.circularPathData.verticalFullExtent-$e.circularPathData.leftLargeArcRadius,$e.circularPathData.verticalRightInnerExtent=$e.circularPathData.verticalFullExtent-$e.circularPathData.rightLargeArcRadius):($e.circularPathData.verticalFullExtent=sr-M-$e.circularPathData.verticalBuffer,$e.circularPathData.verticalLeftInnerExtent=$e.circularPathData.verticalFullExtent+$e.circularPathData.leftLargeArcRadius,$e.circularPathData.verticalRightInnerExtent=$e.circularPathData.verticalFullExtent+$e.circularPathData.rightLargeArcRadius)}$e.circularPathData.leftInnerExtent=$e.circularPathData.sourceX+$e.circularPathData.leftNodeBuffer,$e.circularPathData.rightInnerExtent=$e.circularPathData.targetX-$e.circularPathData.rightNodeBuffer,$e.circularPathData.leftFullExtent=$e.circularPathData.sourceX+$e.circularPathData.leftLargeArcRadius+$e.circularPathData.leftNodeBuffer,$e.circularPathData.rightFullExtent=$e.circularPathData.targetX-$e.circularPathData.rightLargeArcRadius-$e.circularPathData.rightNodeBuffer}if($e.circular)$e.path=re($e);else{var It=n.linkHorizontal().source(function(mt){var er=mt.source.x0+(mt.source.x1-mt.source.x0),lr=mt.y0;return[er,lr]}).target(function(mt){var er=mt.target.x0,lr=mt.y1;return[er,lr]});$e.path=It($e)}})}function re(ot){var ut="";return ot.circularLinkType=="top"?ut="M"+ot.circularPathData.sourceX+" "+ot.circularPathData.sourceY+" L"+ot.circularPathData.leftInnerExtent+" "+ot.circularPathData.sourceY+" A"+ot.circularPathData.leftLargeArcRadius+" "+ot.circularPathData.leftSmallArcRadius+" 0 0 0 "+ot.circularPathData.leftFullExtent+" "+(ot.circularPathData.sourceY-ot.circularPathData.leftSmallArcRadius)+" L"+ot.circularPathData.leftFullExtent+" "+ot.circularPathData.verticalLeftInnerExtent+" A"+ot.circularPathData.leftLargeArcRadius+" "+ot.circularPathData.leftLargeArcRadius+" 0 0 0 "+ot.circularPathData.leftInnerExtent+" "+ot.circularPathData.verticalFullExtent+" L"+ot.circularPathData.rightInnerExtent+" "+ot.circularPathData.verticalFullExtent+" A"+ot.circularPathData.rightLargeArcRadius+" "+ot.circularPathData.rightLargeArcRadius+" 0 0 0 "+ot.circularPathData.rightFullExtent+" "+ot.circularPathData.verticalRightInnerExtent+" L"+ot.circularPathData.rightFullExtent+" "+(ot.circularPathData.targetY-ot.circularPathData.rightSmallArcRadius)+" A"+ot.circularPathData.rightLargeArcRadius+" "+ot.circularPathData.rightSmallArcRadius+" 0 0 0 "+ot.circularPathData.rightInnerExtent+" "+ot.circularPathData.targetY+" L"+ot.circularPathData.targetX+" "+ot.circularPathData.targetY:ut="M"+ot.circularPathData.sourceX+" "+ot.circularPathData.sourceY+" L"+ot.circularPathData.leftInnerExtent+" "+ot.circularPathData.sourceY+" A"+ot.circularPathData.leftLargeArcRadius+" "+ot.circularPathData.leftSmallArcRadius+" 0 0 1 "+ot.circularPathData.leftFullExtent+" "+(ot.circularPathData.sourceY+ot.circularPathData.leftSmallArcRadius)+" L"+ot.circularPathData.leftFullExtent+" "+ot.circularPathData.verticalLeftInnerExtent+" A"+ot.circularPathData.leftLargeArcRadius+" "+ot.circularPathData.leftLargeArcRadius+" 0 0 1 "+ot.circularPathData.leftInnerExtent+" "+ot.circularPathData.verticalFullExtent+" L"+ot.circularPathData.rightInnerExtent+" "+ot.circularPathData.verticalFullExtent+" A"+ot.circularPathData.rightLargeArcRadius+" "+ot.circularPathData.rightLargeArcRadius+" 0 0 1 "+ot.circularPathData.rightFullExtent+" "+ot.circularPathData.verticalRightInnerExtent+" L"+ot.circularPathData.rightFullExtent+" "+(ot.circularPathData.targetY+ot.circularPathData.rightSmallArcRadius)+" A"+ot.circularPathData.rightLargeArcRadius+" "+ot.circularPathData.rightSmallArcRadius+" 0 0 1 "+ot.circularPathData.rightInnerExtent+" "+ot.circularPathData.targetY+" L"+ot.circularPathData.targetX+" "+ot.circularPathData.targetY,ut}function oe(ot,ut){return ie(ot)==ie(ut)?ot.circularLinkType=="bottom"?Ce(ot,ut):_e(ot,ut):ie(ut)-ie(ot)}function _e(ot,ut){return ot.y0-ut.y0}function Ce(ot,ut){return ut.y0-ot.y0}function Le(ot,ut){return ot.y1-ut.y1}function ge(ot,ut){return ut.y1-ot.y1}function ie(ot){return ot.target.column-ot.source.column}function Se(ot){return ot.target.x0-ot.source.x1}function Ee(ot,ut){var Wt=U(ot),Nt=Se(ut)/Math.tan(Wt),$t=lt(ot)=="up"?ot.y1+Nt:ot.y1-Nt;return $t}function Ae(ot,ut){var Wt=U(ot),Nt=Se(ut)/Math.tan(Wt),$t=lt(ot)=="up"?ot.y1-Nt:ot.y1+Nt;return $t}function Be(ot,ut,Wt,Nt){ot.links.forEach(function($t){if(!$t.circular&&$t.target.column-$t.source.column>1){var sr=$t.source.column+1,Tr=$t.target.column-1,fr=1,$e=Tr-sr+1;for(fr=1;sr<=Tr;sr++,fr++)ot.nodes.forEach(function(St){if(St.column==sr){var Qt=fr/($e+1),Gt=Math.pow(1-Qt,3),_t=3*Qt*Math.pow(1-Qt,2),It=3*Math.pow(Qt,2)*(1-Qt),mt=Math.pow(Qt,3),er=Gt*$t.y0+_t*$t.y0+It*$t.y1+mt*$t.y1,lr=er-$t.width/2,wr=er+$t.width/2,Lr;lr>St.y0&&lrSt.y0&&wrSt.y1&&me(ti,Lr,ut,Wt)})):lrSt.y1&&(Lr=wr-St.y0+10,St=me(St,Lr,ut,Wt),ot.nodes.forEach(function(ti){C(ti,Nt)==C(St,Nt)||ti.column!=St.column||ti.y0St.y1&&me(ti,Lr,ut,Wt)}))}})}})}function Pe(ot,ut){return ot.y0>ut.y0&&ot.y0ut.y0&&ot.y1ut.y1}function me(ot,ut,Wt,Nt){return ot.y0+ut>=Wt&&ot.y1+ut<=Nt&&(ot.y0=ot.y0+ut,ot.y1=ot.y1+ut,ot.targetLinks.forEach(function($t){$t.y1=$t.y1+ut}),ot.sourceLinks.forEach(function($t){$t.y0=$t.y0+ut})),ot}function De(ot,ut,Wt,Nt){ot.nodes.forEach(function($t){Nt&&$t.y+($t.y1-$t.y0)>ut&&($t.y=$t.y-($t.y+($t.y1-$t.y0)-ut));var sr=ot.links.filter(function($e){return C($e.source,Wt)==C($t,Wt)}),Tr=sr.length;Tr>1&&sr.sort(function($e,St){if(!$e.circular&&!St.circular){if($e.target.column==St.target.column)return $e.y1-St.y1;if(je($e,St)){if($e.target.column>St.target.column){var Qt=Ae(St,$e);return $e.y1-Qt}if(St.target.column>$e.target.column){var Gt=Ae($e,St);return Gt-St.y1}}else return $e.y1-St.y1}if($e.circular&&!St.circular)return $e.circularLinkType=="top"?-1:1;if(St.circular&&!$e.circular)return St.circularLinkType=="top"?1:-1;if($e.circular&&St.circular)return $e.circularLinkType===St.circularLinkType&&$e.circularLinkType=="top"?$e.target.column===St.target.column?$e.target.y1-St.target.y1:St.target.column-$e.target.column:$e.circularLinkType===St.circularLinkType&&$e.circularLinkType=="bottom"?$e.target.column===St.target.column?St.target.y1-$e.target.y1:$e.target.column-St.target.column:$e.circularLinkType=="top"?-1:1});var fr=$t.y0;sr.forEach(function($e){$e.y0=fr+$e.width/2,fr=fr+$e.width}),sr.forEach(function($e,St){if($e.circularLinkType=="bottom"){var Qt=St+1,Gt=0;for(Qt;Qt1&&$t.sort(function(fr,$e){if(!fr.circular&&!$e.circular){if(fr.source.column==$e.source.column)return fr.y0-$e.y0;if(je(fr,$e)){if($e.source.column0?"up":"down"}function pt(ot,ut){return C(ot.source,ut)==C(ot.target,ut)}function Vt(ot,ut,Wt){var Nt=ot.nodes,$t=ot.links,sr=!1,Tr=!1;if($t.forEach(function(_t){_t.circularLinkType=="top"?sr=!0:_t.circularLinkType=="bottom"&&(Tr=!0)}),sr==!1||Tr==!1){var fr=t.min(Nt,function(_t){return _t.y0}),$e=t.max(Nt,function(_t){return _t.y1}),St=$e-fr,Qt=Wt-ut,Gt=Qt/St;Nt.forEach(function(_t){var It=(_t.y1-_t.y0)*Gt;_t.y0=(_t.y0-fr)*Gt,_t.y1=_t.y0+It}),$t.forEach(function(_t){_t.y0=(_t.y0-fr)*Gt,_t.y1=(_t.y1-fr)*Gt,_t.width=_t.width*Gt})}}e.sankeyCircular=A,e.sankeyCenter=u,e.sankeyLeft=o,e.sankeyRight=s,e.sankeyJustify=l,Object.defineProperty(e,"__esModule",{value:!0})})});var QJ=ye((h2r,eXe)=>{"use strict";eXe.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}});var dXe=ye((d2r,hXe)=>{"use strict";var tXe=HWe(),XZt=(H2(),pb(G2)).interpolateNumber,O5=Oa(),aC=YWe(),ZZt=QWe(),Nu=QJ(),q5=fd(),gw=ka(),YZt=So(),w1=Dr(),r$=w1.strTranslate,KZt=w1.strRotate,i$=iy(),oC=i$.keyFun,P7=i$.repeat,sXe=i$.unwrap,rXe=Zl(),JZt=qa(),lXe=Dh(),$Zt=lXe.CAP_SHIFT,QZt=lXe.LINE_SPACING,eYt=3;function tYt(e,t,r){var n=sXe(t),i=n.trace,a=i.domain,o=i.orientation==="h",s=i.node.pad,l=i.node.thickness,u={justify:aC.sankeyJustify,left:aC.sankeyLeft,right:aC.sankeyRight,center:aC.sankeyCenter}[i.node.align],c=e.width*(a.x[1]-a.x[0]),f=e.height*(a.y[1]-a.y[0]),h=n._nodes,d=n._links,v=n.circular,_;v?_=ZZt.sankeyCircular().circularLinkGap(0):_=aC.sankey(),_.iterations(Nu.sankeyIterations).size(o?[c,f]:[f,c]).nodeWidth(l).nodePadding(s).nodeId(function(U){return U.pointNumber}).nodeAlign(u).nodes(h).links(d);var b=_();_.nodePadding()=N||(j=N-Z.y0,j>1e-6&&(Z.y0+=j,Z.y1+=j)),N=Z.y1+s})}function P(U){var G=U.map(function(_e,Ce){return{x0:_e.x0,index:Ce}}).sort(function(_e,Ce){return _e.x0-Ce.x0}),Z=[],j=-1,N,H=-1/0,re;for(p=0;pH+l&&(j+=1,N=oe.x0),H=oe.x0,Z[j]||(Z[j]=[]),Z[j].push(oe),re=N-oe.x0,oe.x0+=re,oe.x1+=re}return Z}if(i.node.x.length&&i.node.y.length){for(p=0;p0?" L "+i.targetX+" "+i.targetY:"")+"Z"):(r="M "+(i.targetX-t)+" "+(i.targetY-n)+" L "+(i.rightInnerExtent-t)+" "+(i.targetY-n)+" A "+(i.rightLargeArcRadius+n)+" "+(i.rightSmallArcRadius+n)+" 0 0 0 "+(i.rightFullExtent-n-t)+" "+(i.targetY+i.rightSmallArcRadius)+" L "+(i.rightFullExtent-n-t)+" "+i.verticalRightInnerExtent,a&&o?r+=" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.rightInnerExtent-n-t)+" "+(i.verticalFullExtent+n)+" L "+(i.rightFullExtent+n-t-(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent+n)+" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.leftFullExtent+n)+" "+i.verticalLeftInnerExtent:a?r+=" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.rightFullExtent-t-n-(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent-n)+" L "+(i.leftFullExtent+n+(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent-n)+" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.leftFullExtent+n)+" "+i.verticalLeftInnerExtent:r+=" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.rightInnerExtent-t)+" "+(i.verticalFullExtent+n)+" L "+i.leftInnerExtent+" "+(i.verticalFullExtent+n)+" A "+(i.leftLargeArcRadius+n)+" "+(i.leftLargeArcRadius+n)+" 0 0 0 "+(i.leftFullExtent+n)+" "+i.verticalLeftInnerExtent,r+=" L "+(i.leftFullExtent+n)+" "+(i.sourceY+i.leftSmallArcRadius)+" A "+(i.leftLargeArcRadius+n)+" "+(i.leftSmallArcRadius+n)+" 0 0 0 "+i.leftInnerExtent+" "+(i.sourceY-n)+" L "+i.sourceX+" "+(i.sourceY-n)+" L "+i.sourceX+" "+(i.sourceY+n)+" L "+i.leftInnerExtent+" "+(i.sourceY+n)+" A "+(i.leftLargeArcRadius-n)+" "+(i.leftSmallArcRadius-n)+" 0 0 1 "+(i.leftFullExtent-n)+" "+(i.sourceY+i.leftSmallArcRadius)+" L "+(i.leftFullExtent-n)+" "+i.verticalLeftInnerExtent,a&&o?r+=" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.leftFullExtent-n-(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent-n)+" L "+(i.rightFullExtent+n-t+(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent-n)+" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.rightFullExtent+n-t)+" "+i.verticalRightInnerExtent:a?r+=" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.leftFullExtent+n)+" "+(i.verticalFullExtent+n)+" L "+(i.rightFullExtent-t-n)+" "+(i.verticalFullExtent+n)+" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.rightFullExtent+n-t)+" "+i.verticalRightInnerExtent:r+=" A "+(i.leftLargeArcRadius-n)+" "+(i.leftLargeArcRadius-n)+" 0 0 1 "+i.leftInnerExtent+" "+(i.verticalFullExtent-n)+" L "+(i.rightInnerExtent-t)+" "+(i.verticalFullExtent-n)+" A "+(i.rightLargeArcRadius-n)+" "+(i.rightLargeArcRadius-n)+" 0 0 1 "+(i.rightFullExtent+n-t)+" "+i.verticalRightInnerExtent,r+=" L "+(i.rightFullExtent+n-t)+" "+(i.targetY+i.rightSmallArcRadius)+" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.rightInnerExtent-t)+" "+(i.targetY+n)+" L "+(i.targetX-t)+" "+(i.targetY+n)+(t>0?" L "+i.targetX+" "+i.targetY:"")+"Z"),r}function n$(){var e=.5;function t(r){var n=r.linkArrowLength;if(r.link.circular)return iYt(r.link,n);var i=Math.abs((r.link.target.x0-r.link.source.x1)/2);n>i&&(n=i);var a=r.link.source.x1,o=r.link.target.x0-n,s=XZt(a,o),l=s(e),u=s(1-e),c=r.link.y0-r.link.width/2,f=r.link.y0+r.link.width/2,h=r.link.y1-r.link.width/2,d=r.link.y1+r.link.width/2,v="M"+a+","+c,_="C"+l+","+c+" "+u+","+h+" "+o+","+h,b="C"+u+","+d+" "+l+","+f+" "+a+","+f,p=n>0?"L"+(o+n)+","+(h+r.link.width/2):"";return p+="L"+o+","+d,v+_+p+b+"Z"}return t}function nYt(e,t){var r=q5(t.color),n=Nu.nodePadAcross,i=e.nodePad/2;t.dx=t.x1-t.x0,t.dy=t.y1-t.y0;var a=t.dx,o=Math.max(.5,t.dy),s="node_"+t.pointNumber;return t.group&&(s=w1.randstr()),t.trace=e.trace,t.curveNumber=e.trace.index,{index:t.pointNumber,key:s,partOfGroup:t.partOfGroup||!1,group:t.group,traceId:e.key,trace:e.trace,node:t,nodePad:e.nodePad,nodeLineColor:e.nodeLineColor,nodeLineWidth:e.nodeLineWidth,textFont:e.textFont,size:e.horizontal?e.height:e.width,visibleWidth:Math.ceil(a),visibleHeight:o,zoneX:-n,zoneY:-i,zoneWidth:a+2*n,zoneHeight:o+2*i,labelY:e.horizontal?t.dy/2+1:t.dx/2+1,left:t.originalLayer===1,sizeAcross:e.width,forceLayouts:e.forceLayouts,horizontal:e.horizontal,darkBackground:r.getBrightness()<=128,tinyColorHue:gw.tinyRGB(r),tinyColorAlpha:r.getAlpha(),valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,graph:e.graph,arrangement:e.arrangement,uniqueNodeLabelPathId:[e.guid,e.key,s].join("_"),interactionState:e.interactionState,figure:e}}function t$(e){e.attr("transform",function(t){return r$(t.node.x0.toFixed(3),t.node.y0.toFixed(3))})}function aYt(e){e.call(t$)}function uXe(e,t){e.call(aYt),t.attr("d",n$())}function iXe(e){e.attr("width",function(t){return t.node.x1-t.node.x0}).attr("height",function(t){return t.visibleHeight})}function e$(e){return e.link.width>1||e.linkLineWidth>0}function nXe(e){var t=r$(e.translateX,e.translateY);return t+(e.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function aXe(e,t,r){e.on(".basic",null).on("mouseover.basic",function(n){!n.interactionState.dragInProgress&&!n.partOfGroup&&(r.hover(this,n,t),n.interactionState.hovered=[this,n])}).on("mousemove.basic",function(n){!n.interactionState.dragInProgress&&!n.partOfGroup&&(r.follow(this,n),n.interactionState.hovered=[this,n])}).on("mouseout.basic",function(n){!n.interactionState.dragInProgress&&!n.partOfGroup&&(r.unhover(this,n,t),n.interactionState.hovered=!1)}).on("click.basic",function(n){n.interactionState.hovered&&(r.unhover(this,n,t),n.interactionState.hovered=!1),!n.interactionState.dragInProgress&&!n.partOfGroup&&r.select(this,n,t)})}function oYt(e,t,r,n){var i=O5.behavior.drag().origin(function(a){return{x:a.node.x0+a.visibleWidth/2,y:a.node.y0+a.visibleHeight/2}}).on("dragstart",function(a){if(a.arrangement!=="fixed"&&(w1.ensureSingle(n._fullLayout._infolayer,"g","dragcover",function(s){n._fullLayout._dragCover=s}),w1.raiseToTop(this),a.interactionState.dragInProgress=a.node,oXe(a.node),a.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,a.interactionState.hovered),a.interactionState.hovered=!1),a.arrangement==="snap")){var o=a.traceId+"|"+a.key;a.forceLayouts[o]?a.forceLayouts[o].alpha(1):sYt(e,o,a,n),lYt(e,t,a,o,n)}}).on("drag",function(a){if(a.arrangement!=="fixed"){var o=O5.event.x,s=O5.event.y;a.arrangement==="snap"?(a.node.x0=o-a.visibleWidth/2,a.node.x1=o+a.visibleWidth/2,a.node.y0=s-a.visibleHeight/2,a.node.y1=s+a.visibleHeight/2):(a.arrangement==="freeform"&&(a.node.x0=o-a.visibleWidth/2,a.node.x1=o+a.visibleWidth/2),s=Math.max(0,Math.min(a.size-a.visibleHeight/2,s)),a.node.y0=s-a.visibleHeight/2,a.node.y1=s+a.visibleHeight/2),oXe(a.node),a.arrangement!=="snap"&&(a.sankey.update(a.graph),uXe(e.filter(fXe(a)),t))}}).on("dragend",function(a){if(a.arrangement!=="fixed"){a.interactionState.dragInProgress=!1;for(var o=0;o0)window.requestAnimationFrame(a);else{var l=r.node.originalX;r.node.x0=l-r.visibleWidth/2,r.node.x1=l+r.visibleWidth/2,cXe(r,i)}})}function uYt(e,t,r,n){return function(){for(var a=0,o=0;o0&&n.forceLayouts[t].alpha(0)}}function cXe(e,t){for(var r=[],n=[],i=0;i{"use strict";var Zv=Oa(),o$=Dr(),I7=o$.numberFormat,dYt=dXe(),B5=vf(),vYt=ka(),Dx=QJ().cn,sC=o$._;function vXe(e){return e!==""}function N5(e,t){return e.filter(function(r){return r.key===t.traceId})}function pXe(e,t){Zv.select(e).select("path").style("fill-opacity",t),Zv.select(e).select("rect").style("fill-opacity",t)}function gXe(e){Zv.select(e).select("text.name").style("fill","black")}function mXe(e){return function(t){return e.node.sourceLinks.indexOf(t.link)!==-1||e.node.targetLinks.indexOf(t.link)!==-1}}function yXe(e){return function(t){return t.node.sourceLinks.indexOf(e.link)!==-1||t.node.targetLinks.indexOf(e.link)!==-1}}function _Xe(e,t,r){t&&r&&N5(r,t).selectAll("."+Dx.sankeyLink).filter(mXe(t)).call(xXe.bind(0,t,r,!1))}function a$(e,t,r){t&&r&&N5(r,t).selectAll("."+Dx.sankeyLink).filter(mXe(t)).call(bXe.bind(0,t,r,!1))}function xXe(e,t,r,n){n.style("fill",function(i){if(!i.link.concentrationscale)return i.tinyColorHoverHue}).style("fill-opacity",function(i){if(!i.link.concentrationscale)return i.tinyColorHoverAlpha}),n.each(function(i){var a=i.link.label;a!==""&&N5(t,e).selectAll("."+Dx.sankeyLink).filter(function(o){return o.link.label===a}).style("fill",function(o){if(!o.link.concentrationscale)return o.tinyColorHoverHue}).style("fill-opacity",function(o){if(!o.link.concentrationscale)return o.tinyColorHoverAlpha})}),r&&N5(t,e).selectAll("."+Dx.sankeyNode).filter(yXe(e)).call(_Xe)}function bXe(e,t,r,n){n.style("fill",function(i){return i.tinyColorHue}).style("fill-opacity",function(i){return i.tinyColorAlpha}),n.each(function(i){var a=i.link.label;a!==""&&N5(t,e).selectAll("."+Dx.sankeyLink).filter(function(o){return o.link.label===a}).style("fill",function(o){return o.tinyColorHue}).style("fill-opacity",function(o){return o.tinyColorAlpha})}),r&&N5(t,e).selectAll(Dx.sankeyNode).filter(yXe(e)).call(a$)}function kf(e,t){var r=e.hoverlabel||{},n=o$.nestedProperty(r,t).get();return Array.isArray(n)?!1:n}wXe.exports=function(t,r){for(var n=t._fullLayout,i=n._paper,a=n._size,o=0;o"),color:kf(C,"bgcolor")||vYt.addOpacity(z.color,1),borderColor:kf(C,"bordercolor"),fontFamily:kf(C,"font.family"),fontSize:kf(C,"font.size"),fontColor:kf(C,"font.color"),fontWeight:kf(C,"font.weight"),fontStyle:kf(C,"font.style"),fontVariant:kf(C,"font.variant"),fontTextcase:kf(C,"font.textcase"),fontLineposition:kf(C,"font.lineposition"),fontShadow:kf(C,"font.shadow"),nameLength:kf(C,"namelength"),textAlign:kf(C,"align"),idealAlign:Zv.event.x"),color:kf(C,"bgcolor")||x.tinyColorHue,borderColor:kf(C,"bordercolor"),fontFamily:kf(C,"font.family"),fontSize:kf(C,"font.size"),fontColor:kf(C,"font.color"),fontWeight:kf(C,"font.weight"),fontStyle:kf(C,"font.style"),fontVariant:kf(C,"font.variant"),fontTextcase:kf(C,"font.textcase"),fontLineposition:kf(C,"font.lineposition"),fontShadow:kf(C,"font.shadow"),nameLength:kf(C,"namelength"),textAlign:kf(C,"align"),idealAlign:"left",hovertemplate:C.hovertemplate,hovertemplateLabels:U,eventData:[x.node]},{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:t});pXe(j,.85),gXe(j)}}},T=function(L,x,C){t._fullLayout.hovermode!==!1&&(Zv.select(L).call(a$,x,C),x.node.trace.node.hoverinfo!=="skip"&&(x.node.fullData=x.node.trace,t.emit("plotly_unhover",{event:Zv.event,points:[x.node]})),B5.loneUnhover(n._hoverlayer.node()))};dYt(t,i,r,{width:a.w,height:a.h,margin:{t:a.t,r:a.r,b:a.b,l:a.l}},{linkEvents:{hover:u,follow:_,unhover:b,select:l},nodeEvents:{hover:k,follow:E,unhover:T,select:p}})}});var TXe=ye(mw=>{"use strict";var pYt=mc().overrideAll,gYt=Id().getModuleCalcData,mYt=s$(),yYt=W1(),_Yt=Eg(),xYt=yv(),bYt=Of().prepSelect,l$=Dr(),wYt=qa(),R7="sankey";mw.name=R7;mw.baseLayoutAttrOverrides=pYt({hoverlabel:yYt.hoverlabel},"plot","nested");mw.plot=function(e){var t=gYt(e.calcdata,R7)[0];mYt(e,t),mw.updateFx(e)};mw.clean=function(e,t,r,n){var i=n._has&&n._has(R7),a=t._has&&t._has(R7);i&&!a&&(n._paperdiv.selectAll(".sankey").remove(),n._paperdiv.selectAll(".bgsankey").remove())};mw.updateFx=function(e){for(var t=0;t{"use strict";AXe.exports=function(t,r){for(var n=t.cd,i=[],a=n[0].trace,o=a._sankey.graph.nodes,s=0;s{"use strict";MXe.exports={attributes:KJ(),supplyDefaults:LWe(),calc:FWe(),plot:s$(),moduleType:"trace",name:"sankey",basePlotModule:TXe(),selectPoints:SXe(),categories:["noOpacity"],meta:{}}});var CXe=ye((y2r,kXe)=>{"use strict";kXe.exports=EXe()});var PXe=ye(U5=>{"use strict";var LXe=Mc();U5.name="indicator";U5.plot=function(e,t,r,n){LXe.plotBasePlot(U5.name,e,t,r,n)};U5.clean=function(e,t,r,n){LXe.cleanBasePlot(U5.name,e,t,r,n)}});var c$=ye((x2r,OXe)=>{"use strict";var Fx=Ao().extendFlat,RXe=Ao().extendDeep,AYt=mc().overrideAll,DXe=ec(),FXe=Ih(),SYt=Cc().attributes,Nf=Rd(),MYt=vl().templatedArray,D7=JT(),IXe=df().descriptionOnlyNumbers,u$=DXe({editType:"plot",colorEditType:"plot"}),lC={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:FXe.defaultLine,editType:"plot"},width:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},thickness:{valType:"number",min:0,max:1,dflt:1,editType:"plot"},editType:"calc"},zXe={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},EYt=MYt("step",RXe({},lC,{range:zXe}));OXe.exports={mode:{valType:"flaglist",editType:"calc",flags:["number","delta","gauge"],dflt:"number"},value:{valType:"number",editType:"calc",anim:!0},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},domain:SYt({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:Fx({},u$,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:IXe("value")},font:Fx({},u$,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"plot"},delta:{reference:{valType:"number",editType:"calc"},position:{valType:"enumerated",values:["top","bottom","left","right"],dflt:"bottom",editType:"plot"},relative:{valType:"boolean",editType:"plot",dflt:!1},valueformat:{valType:"string",editType:"plot",description:IXe("value")},increasing:{symbol:{valType:"string",dflt:D7.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:D7.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:D7.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:D7.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:Fx({},u$,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"calc"},gauge:{shape:{valType:"enumerated",editType:"plot",dflt:"angular",values:["angular","bullet"]},bar:RXe({},lC,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:FXe.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:AYt({range:zXe,visible:Fx({},Nf.visible,{dflt:!0}),tickmode:Nf.minor.tickmode,nticks:Nf.nticks,tick0:Nf.tick0,dtick:Nf.dtick,tickvals:Nf.tickvals,ticktext:Nf.ticktext,ticks:Fx({},Nf.ticks,{dflt:"outside"}),ticklen:Nf.ticklen,tickwidth:Nf.tickwidth,tickcolor:Nf.tickcolor,ticklabelstep:Nf.ticklabelstep,showticklabels:Nf.showticklabels,labelalias:Nf.labelalias,tickfont:DXe({}),tickangle:Nf.tickangle,tickformat:Nf.tickformat,tickformatstops:Nf.tickformatstops,tickprefix:Nf.tickprefix,showtickprefix:Nf.showtickprefix,ticksuffix:Nf.ticksuffix,showticksuffix:Nf.showticksuffix,separatethousands:Nf.separatethousands,exponentformat:Nf.exponentformat,minexponent:Nf.minexponent,showexponent:Nf.showexponent,editType:"plot"},"plot"),steps:EYt,threshold:{line:{color:Fx({},lC.line.color,{}),width:Fx({},lC.line.width,{dflt:1}),editType:"plot"},thickness:Fx({},lC.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}});var f$=ye((b2r,qXe)=>{"use strict";qXe.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}});var UXe=ye((w2r,NXe)=>{"use strict";var sy=Dr(),z7=c$(),kYt=Cc().defaults,BXe=vl(),CYt=Zd(),F7=f$(),LYt=Lb(),PYt=F3(),IYt=s_(),RYt=l_();function DYt(e,t,r,n){function i(x,C){return sy.coerce(e,t,z7,x,C)}kYt(t,n,i),i("mode"),t._hasNumber=t.mode.indexOf("number")!==-1,t._hasDelta=t.mode.indexOf("delta")!==-1,t._hasGauge=t.mode.indexOf("gauge")!==-1;var a=i("value");t._range=[0,typeof a=="number"?1.5*a:1];var o=new Array(2),s;if(t._hasNumber){i("number.valueformat");var l=sy.extendFlat({},n.font);l.size=void 0,sy.coerceFont(i,"number.font",l),t.number.font.size===void 0&&(t.number.font.size=F7.defaultNumberFontSize,o[0]=!0),i("number.prefix"),i("number.suffix"),s=t.number.font.size}var u;if(t._hasDelta){var c=sy.extendFlat({},n.font);c.size=void 0,sy.coerceFont(i,"delta.font",c),t.delta.font.size===void 0&&(t.delta.font.size=(t._hasNumber?.5:1)*(s||F7.defaultNumberFontSize),o[1]=!0),i("delta.reference",t.value),i("delta.relative"),i("delta.valueformat",t.delta.relative?"2%":""),i("delta.increasing.symbol"),i("delta.increasing.color"),i("delta.decreasing.symbol"),i("delta.decreasing.color"),i("delta.position"),i("delta.prefix"),i("delta.suffix"),u=t.delta.font.size}t._scaleNumbers=(!t._hasNumber||o[0])&&(!t._hasDelta||o[1])||!1;var f=sy.extendFlat({},n.font);f.size=.25*(s||u||F7.defaultNumberFontSize),sy.coerceFont(i,"title.font",f),i("title.text");var h,d,v,_;function b(x,C){return sy.coerce(h,d,z7.gauge,x,C)}function p(x,C){return sy.coerce(v,_,z7.gauge.axis,x,C)}if(t._hasGauge){h=e.gauge,h||(h={}),d=BXe.newContainer(t,"gauge"),b("shape");var k=t._isBullet=t.gauge.shape==="bullet";k||i("title.align","center");var E=t._isAngular=t.gauge.shape==="angular";E||i("align","center"),b("bgcolor",n.paper_bgcolor),b("borderwidth"),b("bordercolor"),b("bar.color"),b("bar.line.color"),b("bar.line.width");var T=F7.valueThickness*(t.gauge.shape==="bullet"?.5:1);b("bar.thickness",T),CYt(h,d,{name:"steps",handleItemDefaults:FYt}),b("threshold.value"),b("threshold.thickness"),b("threshold.line.width"),b("threshold.line.color"),v={},h&&(v=h.axis||{}),_=BXe.newContainer(d,"axis"),p("visible"),t._range=p("range",t._range);var L={font:n.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};LYt(v,_,p,"linear"),RYt(v,_,p,"linear",L),IYt(v,_,p,"linear",L),PYt(v,_,p,L)}else i("title.align","center"),i("align","center"),t._isAngular=t._isBullet=!1;t._length=null}function FYt(e,t){function r(n,i){return sy.coerce(e,t,z7.gauge.steps,n,i)}r("color"),r("line.color"),r("line.width"),r("range"),r("thickness")}NXe.exports={supplyDefaults:DYt}});var GXe=ye((T2r,VXe)=>{"use strict";function zYt(e,t){var r=[],n=t.value;typeof t._lastValue!="number"&&(t._lastValue=t.value);var i=t._lastValue,a=i;return t._hasDelta&&typeof t.delta.reference=="number"&&(a=t.delta.reference),r[0]={y:n,lastY:i,delta:n-a,relativeDelta:(n-a)/a},r}VXe.exports={calc:zYt}});var YXe=ye((A2r,ZXe)=>{"use strict";var ww=Oa(),OYt=(H2(),pb(G2)).interpolate,HXe=(H2(),pb(G2)).interpolateNumber,zx=Dr(),qYt=zx.strScale,cC=zx.strTranslate,BYt=zx.rad2deg,NYt=Dh().MID_SHIFT,bw=So(),yw=f$(),q7=Zl(),sv=ho(),UYt=f4(),VYt=dI(),GYt=Rd(),V5=ka(),h$={left:"start",center:"middle",right:"end"},_w={left:0,center:.5,right:1},jXe=/[yzafpnµmkMGTPEZY]/;function fC(e){return e&&e.duration>0}ZXe.exports=function(t,r,n,i){var a=t._fullLayout,o;fC(n)&&i&&(o=i()),zx.makeTraceGroups(a._indicatorlayer,r,"trace").each(function(s){var l=s[0],u=l.trace,c=ww.select(this),f=u._hasGauge,h=u._isAngular,d=u._isBullet,v=u.domain,_={w:a._size.w*(v.x[1]-v.x[0]),h:a._size.h*(v.y[1]-v.y[0]),l:a._size.l+a._size.w*v.x[0],r:a._size.r+a._size.w*(1-v.x[1]),t:a._size.t+a._size.h*(1-v.y[1]),b:a._size.b+a._size.h*v.y[0]},b=_.l+_.w/2,p=_.t+_.h/2,k=Math.min(_.w/2,_.h),E=yw.innerRadius*k,T,L,x,C=u.align||"center";if(L=p,!f)T=_.l+_w[C]*_.w,x=function(j){return WXe(j,_.w,_.h)};else if(h&&(T=b,L=p+k/2,x=function(j){return ZYt(j,.9*E)}),d){var M=yw.bulletPadding,g=1-yw.bulletNumberDomainSize+M;T=_.l+(g+(1-g)*_w[C])*_.w,x=function(j){return WXe(j,(yw.bulletNumberDomainSize-M)*_.w,_.h)}}WYt(t,c,s,{numbersX:T,numbersY:L,numbersScaler:x,transitionOpts:n,onComplete:o});var P,A;f&&(P={range:u.gauge.axis.range,color:u.gauge.bgcolor,line:{color:u.gauge.bordercolor,width:0},thickness:1},A={range:u.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:u.gauge.bordercolor,width:u.gauge.borderwidth},thickness:1});var z=c.selectAll("g.angular").data(h?s:[]);z.exit().remove();var O=c.selectAll("g.angularaxis").data(h?s:[]);O.exit().remove(),h&&jYt(t,c,s,{radius:k,innerRadius:E,gauge:z,layer:O,size:_,gaugeBg:P,gaugeOutline:A,transitionOpts:n,onComplete:o});var U=c.selectAll("g.bullet").data(d?s:[]);U.exit().remove();var G=c.selectAll("g.bulletaxis").data(d?s:[]);G.exit().remove(),d&&HYt(t,c,s,{gauge:U,layer:G,size:_,gaugeBg:P,gaugeOutline:A,transitionOpts:n,onComplete:o});var Z=c.selectAll("text.title").data(s);Z.exit().remove(),Z.enter().append("text").classed("title",!0),Z.attr("text-anchor",function(){return d?h$.right:h$[u.title.align]}).text(u.title.text).call(bw.font,u.title.font).call(q7.convertToTspans,t),Z.attr("transform",function(){var j=_.l+_.w*_w[u.title.align],N,H=yw.titlePadding,re=bw.bBox(Z.node());if(f){if(h)if(u.gauge.axis.visible){var oe=bw.bBox(O.node());N=oe.top-H-re.bottom}else N=_.t+_.h/2-k/2-re.bottom-H;d&&(N=L-(re.top+re.bottom)/2,j=_.l-yw.bulletPadding*_.w)}else N=u._numbersTop-H-re.bottom;return cC(j,N)})})};function HYt(e,t,r,n){var i=r[0].trace,a=n.gauge,o=n.layer,s=n.gaugeBg,l=n.gaugeOutline,u=n.size,c=i.domain,f=n.transitionOpts,h=n.onComplete,d,v,_,b,p;a.enter().append("g").classed("bullet",!0),a.attr("transform",cC(u.l,u.t)),o.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),o.selectAll("g.xbulletaxistick,path,text").remove();var k=u.h,E=i.gauge.bar.thickness*k,T=c.x[0],L=c.x[0]+(c.x[1]-c.x[0])*(i._hasNumber||i._hasDelta?1-yw.bulletNumberDomainSize:1);d=uC(e,i.gauge.axis),d._id="xbulletaxis",d.domain=[T,L],d.setScale(),v=sv.calcTicks(d),_=sv.makeTransTickFn(d),b=sv.getTickSigns(d)[2],p=u.t+u.h,d.visible&&(sv.drawTicks(e,d,{vals:d.ticks==="inside"?sv.clipEnds(d,v):v,layer:o,path:sv.makeTickPath(d,p,b),transFn:_}),sv.drawLabels(e,d,{vals:v,layer:o,transFn:_,labelFns:sv.makeLabelFns(d,p)}));function x(O){O.attr("width",function(U){return Math.max(0,d.c2p(U.range[1])-d.c2p(U.range[0]))}).attr("x",function(U){return d.c2p(U.range[0])}).attr("y",function(U){return .5*(1-U.thickness)*k}).attr("height",function(U){return U.thickness*k})}var C=[s].concat(i.gauge.steps),M=a.selectAll("g.bg-bullet").data(C);M.enter().append("g").classed("bg-bullet",!0).append("rect"),M.select("rect").call(x).call(xw),M.exit().remove();var g=a.selectAll("g.value-bullet").data([i.gauge.bar]);g.enter().append("g").classed("value-bullet",!0).append("rect"),g.select("rect").attr("height",E).attr("y",(k-E)/2).call(xw),fC(f)?g.select("rect").transition().duration(f.duration).ease(f.easing).each("end",function(){h&&h()}).each("interrupt",function(){h&&h()}).attr("width",Math.max(0,d.c2p(Math.min(i.gauge.axis.range[1],r[0].y)))):g.select("rect").attr("width",typeof r[0].y=="number"?Math.max(0,d.c2p(Math.min(i.gauge.axis.range[1],r[0].y))):0),g.exit().remove();var P=r.filter(function(){return i.gauge.threshold.value||i.gauge.threshold.value===0}),A=a.selectAll("g.threshold-bullet").data(P);A.enter().append("g").classed("threshold-bullet",!0).append("line"),A.select("line").attr("x1",d.c2p(i.gauge.threshold.value)).attr("x2",d.c2p(i.gauge.threshold.value)).attr("y1",(1-i.gauge.threshold.thickness)/2*k).attr("y2",(1-(1-i.gauge.threshold.thickness)/2)*k).call(V5.stroke,i.gauge.threshold.line.color).style("stroke-width",i.gauge.threshold.line.width),A.exit().remove();var z=a.selectAll("g.gauge-outline").data([l]);z.enter().append("g").classed("gauge-outline",!0).append("rect"),z.select("rect").call(x).call(xw),z.exit().remove()}function jYt(e,t,r,n){var i=r[0].trace,a=n.size,o=n.radius,s=n.innerRadius,l=n.gaugeBg,u=n.gaugeOutline,c=[a.l+a.w/2,a.t+a.h/2+o/2],f=n.gauge,h=n.layer,d=n.transitionOpts,v=n.onComplete,_=Math.PI/2;function b(_e){var Ce=i.gauge.axis.range[0],Le=i.gauge.axis.range[1],ge=(_e-Ce)/(Le-Ce)*Math.PI-_;return ge<-_?-_:ge>_?_:ge}function p(_e){return ww.svg.arc().innerRadius((s+o)/2-_e/2*(o-s)).outerRadius((s+o)/2+_e/2*(o-s)).startAngle(-_)}function k(_e){_e.attr("d",function(Ce){return p(Ce.thickness).startAngle(b(Ce.range[0])).endAngle(b(Ce.range[1]))()})}var E,T,L,x;f.enter().append("g").classed("angular",!0),f.attr("transform",cC(c[0],c[1])),h.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),h.selectAll("g.xangularaxistick,path,text").remove(),E=uC(e,i.gauge.axis),E.type="linear",E.range=i.gauge.axis.range,E._id="xangularaxis",E.ticklabeloverflow="allow",E.setScale();var C=function(_e){return(E.range[0]-_e.x)/(E.range[1]-E.range[0])*Math.PI+Math.PI},M={},g=sv.makeLabelFns(E,0),P=g.labelStandoff;M.xFn=function(_e){var Ce=C(_e);return Math.cos(Ce)*P},M.yFn=function(_e){var Ce=C(_e),Le=Math.sin(Ce)>0?.2:1;return-Math.sin(Ce)*(P+_e.fontSize*Le)+Math.abs(Math.cos(Ce))*(_e.fontSize*NYt)},M.anchorFn=function(_e){var Ce=C(_e),Le=Math.cos(Ce);return Math.abs(Le)<.1?"middle":Le>0?"start":"end"},M.heightFn=function(_e,Ce,Le){var ge=C(_e);return-.5*(1+Math.sin(ge))*Le};var A=function(_e){return cC(c[0]+o*Math.cos(_e),c[1]-o*Math.sin(_e))};L=function(_e){return A(C(_e))};var z=function(_e){var Ce=C(_e);return A(Ce)+"rotate("+-BYt(Ce)+")"};if(T=sv.calcTicks(E),x=sv.getTickSigns(E)[2],E.visible){x=E.ticks==="inside"?-1:1;var O=(E.linewidth||1)/2;sv.drawTicks(e,E,{vals:T,layer:h,path:"M"+x*O+",0h"+x*E.ticklen,transFn:z}),sv.drawLabels(e,E,{vals:T,layer:h,transFn:L,labelFns:M})}var U=[l].concat(i.gauge.steps),G=f.selectAll("g.bg-arc").data(U);G.enter().append("g").classed("bg-arc",!0).append("path"),G.select("path").call(k).call(xw),G.exit().remove();var Z=p(i.gauge.bar.thickness),j=f.selectAll("g.value-arc").data([i.gauge.bar]);j.enter().append("g").classed("value-arc",!0).append("path");var N=j.select("path");fC(d)?(N.transition().duration(d.duration).ease(d.easing).each("end",function(){v&&v()}).each("interrupt",function(){v&&v()}).attrTween("d",XYt(Z,b(r[0].lastY),b(r[0].y))),i._lastValue=r[0].y):N.attr("d",typeof r[0].y=="number"?Z.endAngle(b(r[0].y)):"M0,0Z"),N.call(xw),j.exit().remove(),U=[];var H=i.gauge.threshold.value;(H||H===0)&&U.push({range:[H,H],color:i.gauge.threshold.color,line:{color:i.gauge.threshold.line.color,width:i.gauge.threshold.line.width},thickness:i.gauge.threshold.thickness});var re=f.selectAll("g.threshold-arc").data(U);re.enter().append("g").classed("threshold-arc",!0).append("path"),re.select("path").call(k).call(xw),re.exit().remove();var oe=f.selectAll("g.gauge-outline").data([u]);oe.enter().append("g").classed("gauge-outline",!0).append("path"),oe.select("path").call(k).call(xw),oe.exit().remove()}function WYt(e,t,r,n){var i=r[0].trace,a=n.numbersX,o=n.numbersY,s=i.align||"center",l=h$[s],u=n.transitionOpts,c=n.onComplete,f=zx.ensureSingle(t,"g","numbers"),h,d,v,_=[];i._hasNumber&&_.push("number"),i._hasDelta&&(_.push("delta"),i.delta.position==="left"&&_.reverse());var b=f.selectAll("text").data(_);b.enter().append("text"),b.attr("text-anchor",function(){return l}).attr("class",function(A){return A}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),b.exit().remove();function p(A,z,O,U){if(A.match("s")&&O>=0!=U>=0&&!z(O).slice(-1).match(jXe)&&!z(U).slice(-1).match(jXe)){var G=A.slice().replace("s","f").replace(/\d+/,function(j){return parseInt(j)-1}),Z=uC(e,{tickformat:G});return function(j){return Math.abs(j)<1?sv.tickText(Z,j).text:z(j)}}else return z}function k(){var A=uC(e,{tickformat:i.number.valueformat},i._range);A.setScale(),sv.prepTicks(A);var z=function(j){return sv.tickText(A,j).text},O=i.number.suffix,U=i.number.prefix,G=f.select("text.number");function Z(){var j=typeof r[0].y=="number"?U+z(r[0].y)+O:"-";G.text(j).call(bw.font,i.number.font).call(q7.convertToTspans,e)}return fC(u)?G.transition().duration(u.duration).ease(u.easing).each("end",function(){Z(),c&&c()}).each("interrupt",function(){Z(),c&&c()}).attrTween("text",function(){var j=ww.select(this),N=HXe(r[0].lastY,r[0].y);i._lastValue=r[0].y;var H=p(i.number.valueformat,z,r[0].lastY,r[0].y);return function(re){j.text(U+H(N(re))+O)}}):Z(),h=XXe(U+z(r[0].y)+O,i.number.font,l,e),G}function E(){var A=uC(e,{tickformat:i.delta.valueformat},i._range);A.setScale(),sv.prepTicks(A);var z=function(re){return sv.tickText(A,re).text},O=i.delta.suffix,U=i.delta.prefix,G=function(re){var oe=i.delta.relative?re.relativeDelta:re.delta;return oe},Z=function(re,oe){return re===0||typeof re!="number"||isNaN(re)?"-":(re>0?i.delta.increasing.symbol:i.delta.decreasing.symbol)+U+oe(re)+O},j=function(re){return re.delta>=0?i.delta.increasing.color:i.delta.decreasing.color};i._deltaLastValue===void 0&&(i._deltaLastValue=G(r[0]));var N=f.select("text.delta");N.call(bw.font,i.delta.font).call(V5.fill,j({delta:i._deltaLastValue}));function H(){N.text(Z(G(r[0]),z)).call(V5.fill,j(r[0])).call(q7.convertToTspans,e)}return fC(u)?N.transition().duration(u.duration).ease(u.easing).tween("text",function(){var re=ww.select(this),oe=G(r[0]),_e=i._deltaLastValue,Ce=p(i.delta.valueformat,z,_e,oe),Le=HXe(_e,oe);return i._deltaLastValue=oe,function(ge){re.text(Z(Le(ge),Ce)),re.call(V5.fill,j({delta:Le(ge)}))}}).each("end",function(){H(),c&&c()}).each("interrupt",function(){H(),c&&c()}):H(),d=XXe(Z(G(r[0]),z),i.delta.font,l,e),N}var T=i.mode+i.align,L;if(i._hasDelta&&(L=E(),T+=i.delta.position+i.delta.font.size+i.delta.font.family+i.delta.valueformat,T+=i.delta.increasing.symbol+i.delta.decreasing.symbol,v=d),i._hasNumber&&(k(),T+=i.number.font.size+i.number.font.family+i.number.valueformat+i.number.suffix+i.number.prefix,v=h),i._hasDelta&&i._hasNumber){var x=[(h.left+h.right)/2,(h.top+h.bottom)/2],C=[(d.left+d.right)/2,(d.top+d.bottom)/2],M,g,P=.75*i.delta.font.size;i.delta.position==="left"&&(M=O7(i,"deltaPos",0,-1*(h.width*_w[i.align]+d.width*(1-_w[i.align])+P),T,Math.min),g=x[1]-C[1],v={width:h.width+d.width+P,height:Math.max(h.height,d.height),left:d.left+M,right:h.right,top:Math.min(h.top,d.top+g),bottom:Math.max(h.bottom,d.bottom+g)}),i.delta.position==="right"&&(M=O7(i,"deltaPos",0,h.width*(1-_w[i.align])+d.width*_w[i.align]+P,T,Math.max),g=x[1]-C[1],v={width:h.width+d.width+P,height:Math.max(h.height,d.height),left:h.left,right:d.right+M,top:Math.min(h.top,d.top+g),bottom:Math.max(h.bottom,d.bottom+g)}),i.delta.position==="bottom"&&(M=null,g=d.height,v={width:Math.max(h.width,d.width),height:h.height+d.height,left:Math.min(h.left,d.left),right:Math.max(h.right,d.right),top:h.bottom-h.height,bottom:h.bottom+d.height}),i.delta.position==="top"&&(M=null,g=h.top,v={width:Math.max(h.width,d.width),height:h.height+d.height,left:Math.min(h.left,d.left),right:Math.max(h.right,d.right),top:h.bottom-h.height-d.height,bottom:h.bottom}),L.attr({dx:M,dy:g})}(i._hasNumber||i._hasDelta)&&f.attr("transform",function(){var A=n.numbersScaler(v);T+=A[2];var z=O7(i,"numbersScale",1,A[0],T,Math.min),O;i._scaleNumbers||(z=1),i._isAngular?O=o-z*v.bottom:O=o-z*(v.top+v.bottom)/2,i._numbersTop=z*v.top+O;var U=v[s];s==="center"&&(U=(v.left+v.right)/2);var G=a-z*U;return G=O7(i,"numbersTranslate",0,G,T,Math.max),cC(G,O)+qYt(z)})}function xw(e){e.each(function(t){V5.stroke(ww.select(this),t.line.color)}).each(function(t){V5.fill(ww.select(this),t.color)}).style("stroke-width",function(t){return t.line.width})}function XYt(e,t,r){return function(){var n=OYt(t,r);return function(i){return e.endAngle(n(i))()}}}function uC(e,t,r){var n=e._fullLayout,i=zx.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},t),a={type:"linear",_id:"x"+t._id},o={letter:"x",font:n.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function s(l,u){return zx.coerce(i,a,GYt,l,u)}return UYt(i,a,s,o,n),VYt(i,a,s,o),a}function WXe(e,t,r){var n=Math.min(t/e.width,r/e.height);return[n,e,t+"x"+r]}function ZYt(e,t){var r=Math.sqrt(e.width/2*(e.width/2)+e.height*e.height),n=t/r;return[n,e,t]}function XXe(e,t,r,n){var i=document.createElementNS("http://www.w3.org/2000/svg","text"),a=ww.select(i);return a.text(e).attr("x",0).attr("y",0).attr("text-anchor",r).attr("data-unformatted",e).call(q7.convertToTspans,n).call(bw.font,t),bw.bBox(a.node())}function O7(e,t,r,n,i,a){var o="_cache"+t;e[o]&&e[o].key===i||(e[o]={key:i,value:r});var s=zx.aggNums(a,null,[e[o].value,n],2);return e[o].value=s,s}});var JXe=ye((S2r,KXe)=>{"use strict";KXe.exports={moduleType:"trace",name:"indicator",basePlotModule:PXe(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:c$(),supplyDefaults:UXe().supplyDefaults,calc:GXe().calc,plot:YXe(),meta:{}}});var QXe=ye((M2r,$Xe)=>{"use strict";$Xe.exports=JXe()});var d$=ye((k2r,iZe)=>{"use strict";var eZe=Jb(),B7=Ao().extendFlat,YYt=mc().overrideAll,tZe=ec(),KYt=Cc().attributes,rZe=df().descriptionOnlyNumbers,E2r=iZe.exports=YYt({domain:KYt({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null},columnorder:{valType:"data_array"},header:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:rZe("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:B7({},eZe.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:B7({},tZe({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:rZe("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:B7({},eZe.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:B7({},tZe({arrayOk:!0}))}},"calc","from-root")});var aZe=ye((C2r,nZe)=>{"use strict";var v$=Dr(),JYt=d$(),$Yt=Cc().defaults;function QYt(e,t){for(var r=e.columnorder||[],n=e.header.values.length,i=r.slice(0,n),a=i.slice().sort(function(l,u){return l-u}),o=i.map(function(l){return a.indexOf(l)}),s=o.length;s{"use strict";var eKt=iy().wrap;oZe.exports=function(){return eKt({})}});var p$=ye((P2r,lZe)=>{"use strict";lZe.exports={cellPad:8,columnExtentOffset:10,columnTitleOffset:28,emptyHeaderHeight:16,latexCheck:/^\$.*\$$/,goldenRatio:1.618,lineBreaker:"
",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}});var mZe=ye((I2r,gZe)=>{"use strict";var uZe=p$(),m$=Ao().extendFlat,tKt=Eo(),rKt=vv().isTypedArray,N7=vv().isArrayOrTypedArray;gZe.exports=function(t,r){var n=g$(r.cells.values),i=function(g){return g.slice(r.header.values.length,g.length)},a=g$(r.header.values);a.length&&!a[0].length&&(a[0]=[""],a=g$(a));var o=a.concat(i(n).map(function(){return pZe((a[0]||[""]).length)})),s=r.domain,l=Math.floor(t._fullLayout._size.w*(s.x[1]-s.x[0])),u=Math.floor(t._fullLayout._size.h*(s.y[1]-s.y[0])),c=r.header.values.length?o[0].map(function(){return r.header.height}):[uZe.emptyHeaderHeight],f=n.length?n[0].map(function(){return r.cells.height}):[],h=c.reduce(cZe,0),d=u-h,v=d+uZe.uplift,_=dZe(f,v),b=dZe(c,h),p=hZe(b,[]),k=hZe(_,p),E={},T=r._fullInput.columnorder;N7(T)&&(T=Array.from(T)),T=T.concat(i(n.map(function(g,P){return P})));var L=o.map(function(g,P){var A=N7(r.columnwidth)?r.columnwidth[Math.min(P,r.columnwidth.length-1)]:r.columnwidth;return tKt(A)?Number(A):1}),x=L.reduce(cZe,0);L=L.map(function(g){return g/x*l});var C=Math.max(y$(r.header.line.width),y$(r.cells.line.width)),M={key:r.uid+t._context.staticPlot,translateX:s.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-s.y[1]),size:t._fullLayout._size,width:l,maxLineWidth:C,height:u,columnOrder:T,groupHeight:u,rowBlocks:k,headerRowBlocks:p,scrollY:0,cells:m$({},r.cells,{values:n}),headerCells:m$({},r.header,{values:o}),gdColumns:o.map(function(g){return g[0]}),gdColumnsOriginalOrder:o.map(function(g){return g[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:o.map(function(g,P){var A=E[g];E[g]=(A||0)+1;var z=g+"__"+E[g];return{key:z,label:g,specIndex:P,xIndex:T[P],xScale:fZe,x:void 0,calcdata:void 0,columnWidth:L[P]}})};return M.columns.forEach(function(g){g.calcdata=M,g.x=fZe(g)}),M};function y$(e){if(N7(e)){for(var t=0,r=0;r=t||u===e.length-1)&&(r[i]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=u,o=vZe(),i+=a,s=u+1,a=0);return r}function vZe(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}});var yZe=ye(_$=>{"use strict";var U7=Ao().extendFlat;_$.splitToPanels=function(e){var t=[0,0],r=U7({},e,{key:"header",type:"header",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!0,values:e.calcdata.headerCells.values[e.specIndex],rowBlocks:e.calcdata.headerRowBlocks,calcdata:U7({},e.calcdata,{cells:e.calcdata.headerCells})}),n=U7({},e,{key:"cells1",type:"cells",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),i=U7({},e,{key:"cells2",type:"cells",page:1,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks});return[n,i,r]};_$.splitToCells=function(e){var t=iKt(e);return(e.values||[]).slice(t[0],t[1]).map(function(r,n){var i=typeof r=="string"&&r.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:n+i,key:t[0]+n,column:e,calcdata:e.calcdata,page:e.page,rowBlocks:e.rowBlocks,value:r}})};function iKt(e){var t=e.rowBlocks[e.page],r=t?t.rows[0].rowIndex:0,n=t?r+t.rows.length:0;return[r,n]}});var C$=ye((D2r,CZe)=>{"use strict";var Ya=p$(),tf=Oa(),x$=Dr(),nKt=x$.numberFormat,Uu=iy(),b$=So(),aKt=Zl(),oKt=Dr().raiseToTop,lg=Dr().strTranslate,sKt=Dr().cancelTransition,lKt=mZe(),SZe=yZe(),_Ze=ka();CZe.exports=function(t,r){var n=!t._context.staticPlot,i=t._fullLayout._paper.selectAll("."+Ya.cn.table).data(r.map(function(k){var E=Uu.unwrap(k),T=E.trace;return lKt(t,T)}),Uu.keyFun);i.exit().remove(),i.enter().append("g").classed(Ya.cn.table,!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","all"),i.attr("width",function(k){return k.width+k.size.l+k.size.r}).attr("height",function(k){return k.height+k.size.t+k.size.b}).attr("transform",function(k){return lg(k.translateX,k.translateY)});var a=i.selectAll("."+Ya.cn.tableControlView).data(Uu.repeat,Uu.keyFun),o=a.enter().append("g").classed(Ya.cn.tableControlView,!0).style("box-sizing","content-box");if(n){var s="onwheel"in document?"wheel":"mousewheel";o.on("mousemove",function(k){a.filter(function(E){return k===E}).call(hC,t)}).on(s,function(k){if(!k.scrollbarState.wheeling){k.scrollbarState.wheeling=!0;var E=k.scrollY+tf.event.deltaY,T=G7(t,a,null,E)(k);T||(tf.event.stopPropagation(),tf.event.preventDefault()),k.scrollbarState.wheeling=!1}}).call(hC,t,!0)}a.attr("transform",function(k){return lg(k.size.l,k.size.t)});var l=a.selectAll("."+Ya.cn.scrollBackground).data(Uu.repeat,Uu.keyFun);l.enter().append("rect").classed(Ya.cn.scrollBackground,!0).attr("fill","none"),l.attr("width",function(k){return k.width}).attr("height",function(k){return k.height}),a.each(function(k){b$.setClipUrl(tf.select(this),xZe(t,k),t)});var u=a.selectAll("."+Ya.cn.yColumn).data(function(k){return k.columns},Uu.keyFun);u.enter().append("g").classed(Ya.cn.yColumn,!0),u.exit().remove(),u.attr("transform",function(k){return lg(k.x,0)}),n&&u.call(tf.behavior.drag().origin(function(k){var E=tf.select(this);return TZe(E,k,-Ya.uplift),oKt(this),k.calcdata.columnDragInProgress=!0,hC(a.filter(function(T){return k.calcdata.key===T.key}),t),k}).on("drag",function(k){var E=tf.select(this),T=function(C){return(k===C?tf.event.x:C.x)+C.columnWidth/2};k.x=Math.max(-Ya.overdrag,Math.min(k.calcdata.width+Ya.overdrag-k.columnWidth,tf.event.x));var L=MZe(u).filter(function(C){return C.calcdata.key===k.calcdata.key}),x=L.sort(function(C,M){return T(C)-T(M)});x.forEach(function(C,M){C.xIndex=M,C.x=k===C?C.x:C.xScale(C)}),u.filter(function(C){return k!==C}).transition().ease(Ya.transitionEase).duration(Ya.transitionDuration).attr("transform",function(C){return lg(C.x,0)}),E.call(sKt).attr("transform",lg(k.x,-Ya.uplift))}).on("dragend",function(k){var E=tf.select(this),T=k.calcdata;k.x=k.xScale(k),k.calcdata.columnDragInProgress=!1,TZe(E,k,0),yKt(t,T,T.columns.map(function(L){return L.xIndex}))})),u.each(function(k){b$.setClipUrl(tf.select(this),bZe(t,k),t)});var c=u.selectAll("."+Ya.cn.columnBlock).data(SZe.splitToPanels,Uu.keyFun);c.enter().append("g").classed(Ya.cn.columnBlock,!0).attr("id",function(k){return k.key}),c.style("cursor",function(k){return k.dragHandle?"ew-resize":k.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var f=c.filter(_Kt),h=c.filter(M$);n&&h.call(tf.behavior.drag().origin(function(k){return tf.event.stopPropagation(),k}).on("drag",G7(t,a,-1)).on("dragend",function(){})),w$(t,a,f,c),w$(t,a,h,c);var d=a.selectAll("."+Ya.cn.scrollAreaClip).data(Uu.repeat,Uu.keyFun);d.enter().append("clipPath").classed(Ya.cn.scrollAreaClip,!0).attr("id",function(k){return xZe(t,k)});var v=d.selectAll("."+Ya.cn.scrollAreaClipRect).data(Uu.repeat,Uu.keyFun);v.enter().append("rect").classed(Ya.cn.scrollAreaClipRect,!0).attr("x",-Ya.overdrag).attr("y",-Ya.uplift).attr("fill","none"),v.attr("width",function(k){return k.width+2*Ya.overdrag}).attr("height",function(k){return k.height+Ya.uplift});var _=u.selectAll("."+Ya.cn.columnBoundary).data(Uu.repeat,Uu.keyFun);_.enter().append("g").classed(Ya.cn.columnBoundary,!0);var b=u.selectAll("."+Ya.cn.columnBoundaryClippath).data(Uu.repeat,Uu.keyFun);b.enter().append("clipPath").classed(Ya.cn.columnBoundaryClippath,!0),b.attr("id",function(k){return bZe(t,k)});var p=b.selectAll("."+Ya.cn.columnBoundaryRect).data(Uu.repeat,Uu.keyFun);p.enter().append("rect").classed(Ya.cn.columnBoundaryRect,!0).attr("fill","none"),p.attr("width",function(k){return k.columnWidth+2*V7(k)}).attr("height",function(k){return k.calcdata.height+2*V7(k)+Ya.uplift}).attr("x",function(k){return-V7(k)}).attr("y",function(k){return-V7(k)}),E$(null,h,a)};function V7(e){return Math.ceil(e.calcdata.maxLineWidth/2)}function xZe(e,t){return"clip"+e._fullLayout._uid+"_scrollAreaBottomClip_"+t.key}function bZe(e,t){return"clip"+e._fullLayout._uid+"_columnBoundaryClippath_"+t.calcdata.key+"_"+t.specIndex}function MZe(e){return[].concat.apply([],e.map(function(t){return t})).map(function(t){return t.__data__})}function hC(e,t,r){function n(u){var c=u.rowBlocks;return A$(c,c.length-1)+(c.length?H7(c[c.length-1],1/0):1)}var i=e.selectAll("."+Ya.cn.scrollbarKit).data(Uu.repeat,Uu.keyFun);i.enter().append("g").classed(Ya.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),i.each(function(u){var c=u.scrollbarState;c.totalHeight=n(u),c.scrollableAreaHeight=u.groupHeight-T$(u),c.currentlyVisibleHeight=Math.min(c.totalHeight,c.scrollableAreaHeight),c.ratio=c.currentlyVisibleHeight/c.totalHeight,c.barLength=Math.max(c.ratio*c.currentlyVisibleHeight,Ya.goldenRatio*Ya.scrollbarWidth),c.barWiggleRoom=c.currentlyVisibleHeight-c.barLength,c.wiggleRoom=Math.max(0,c.totalHeight-c.scrollableAreaHeight),c.topY=c.barWiggleRoom===0?0:u.scrollY/c.wiggleRoom*c.barWiggleRoom,c.bottomY=c.topY+c.barLength,c.dragMultiplier=c.wiggleRoom/c.barWiggleRoom}).attr("transform",function(u){var c=u.width+Ya.scrollbarWidth/2+Ya.scrollbarOffset;return lg(c,T$(u))});var a=i.selectAll("."+Ya.cn.scrollbar).data(Uu.repeat,Uu.keyFun);a.enter().append("g").classed(Ya.cn.scrollbar,!0);var o=a.selectAll("."+Ya.cn.scrollbarSlider).data(Uu.repeat,Uu.keyFun);o.enter().append("g").classed(Ya.cn.scrollbarSlider,!0),o.attr("transform",function(u){return lg(0,u.scrollbarState.topY||0)});var s=o.selectAll("."+Ya.cn.scrollbarGlyph).data(Uu.repeat,Uu.keyFun);s.enter().append("line").classed(Ya.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",Ya.scrollbarWidth).attr("stroke-linecap","round").attr("y1",Ya.scrollbarWidth/2),s.attr("y2",function(u){return u.scrollbarState.barLength-Ya.scrollbarWidth/2}).attr("stroke-opacity",function(u){return u.columnDragInProgress||!u.scrollbarState.barWiggleRoom||r?0:.4}),s.transition().delay(0).duration(0),s.transition().delay(Ya.scrollbarHideDelay).duration(Ya.scrollbarHideDuration).attr("stroke-opacity",0);var l=a.selectAll("."+Ya.cn.scrollbarCaptureZone).data(Uu.repeat,Uu.keyFun);l.enter().append("line").classed(Ya.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",Ya.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(u){var c=tf.event.y,f=this.getBoundingClientRect(),h=u.scrollbarState,d=c-f.top,v=tf.scale.linear().domain([0,h.scrollableAreaHeight]).range([0,h.totalHeight]).clamp(!0);h.topY<=d&&d<=h.bottomY||G7(t,e,null,v(d-h.barLength/2))(u)}).call(tf.behavior.drag().origin(function(u){return tf.event.stopPropagation(),u.scrollbarState.scrollbarScrollInProgress=!0,u}).on("drag",G7(t,e)).on("dragend",function(){})),l.attr("y2",function(u){return u.scrollbarState.scrollableAreaHeight}),t._context.staticPlot&&(s.remove(),l.remove())}function w$(e,t,r,n){var i=uKt(r),a=cKt(i);vKt(a);var o=fKt(a);gKt(o);var s=dKt(a),l=hKt(s);pKt(l),EZe(l,t,n,e),k$(a)}function uKt(e){var t=e.selectAll("."+Ya.cn.columnCells).data(Uu.repeat,Uu.keyFun);return t.enter().append("g").classed(Ya.cn.columnCells,!0),t.exit().remove(),t}function cKt(e){var t=e.selectAll("."+Ya.cn.columnCell).data(SZe.splitToCells,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Ya.cn.columnCell,!0),t.exit().remove(),t}function fKt(e){var t=e.selectAll("."+Ya.cn.cellRect).data(Uu.repeat,function(r){return r.keyWithinBlock});return t.enter().append("rect").classed(Ya.cn.cellRect,!0),t}function hKt(e){var t=e.selectAll("."+Ya.cn.cellText).data(Uu.repeat,function(r){return r.keyWithinBlock});return t.enter().append("text").classed(Ya.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){tf.event.stopPropagation()}),t}function dKt(e){var t=e.selectAll("."+Ya.cn.cellTextHolder).data(Uu.repeat,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Ya.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),t}function vKt(e){e.each(function(t,r){var n=t.calcdata.cells.font,i=t.column.specIndex,a={size:Yv(n.size,i,r),color:Yv(n.color,i,r),family:Yv(n.family,i,r),weight:Yv(n.weight,i,r),style:Yv(n.style,i,r),variant:Yv(n.variant,i,r),textcase:Yv(n.textcase,i,r),lineposition:Yv(n.lineposition,i,r),shadow:Yv(n.shadow,i,r)};t.rowNumber=t.key,t.align=Yv(t.calcdata.cells.align,i,r),t.cellBorderWidth=Yv(t.calcdata.cells.line.width,i,r),t.font=a})}function pKt(e){e.each(function(t){b$.font(tf.select(this),t.font)})}function gKt(e){e.attr("width",function(t){return t.column.columnWidth}).attr("stroke-width",function(t){return t.cellBorderWidth}).each(function(t){var r=tf.select(this);_Ze.stroke(r,Yv(t.calcdata.cells.line.color,t.column.specIndex,t.rowNumber)),_Ze.fill(r,Yv(t.calcdata.cells.fill.color,t.column.specIndex,t.rowNumber))})}function EZe(e,t,r,n){e.text(function(i){var a=i.column.specIndex,o=i.rowNumber,s=i.value,l=typeof s=="string",u=l&&s.match(/
/i),c=!l||u;i.mayHaveMarkup=l&&s.match(/[<&>]/);var f=mKt(s);i.latex=f;var h=f?"":Yv(i.calcdata.cells.prefix,a,o)||"",d=f?"":Yv(i.calcdata.cells.suffix,a,o)||"",v=f?null:Yv(i.calcdata.cells.format,a,o)||null,_=h+(v?nKt(v)(i.value):i.value)+d,b;i.wrappingNeeded=!i.wrapped&&!c&&!f&&(b=wZe(_)),i.cellHeightMayIncrease=u||f||i.mayHaveMarkup||(b===void 0?wZe(_):b),i.needsConvertToTspans=i.mayHaveMarkup||i.wrappingNeeded||i.latex;var p;if(i.wrappingNeeded){var k=Ya.wrapSplitCharacter===" "?_.replace(/i&&n.push(a),i+=l}return n}function E$(e,t,r){var n=MZe(t)[0];if(n!==void 0){var i=n.rowBlocks,a=n.calcdata,o=A$(i,i.length),s=n.calcdata.groupHeight-T$(n),l=a.scrollY=Math.max(0,Math.min(o-s,a.scrollY)),u=xKt(i,l,s);u.length===1&&(u[0]===i.length-1?u.unshift(u[0]-1):u.push(u[0]+1)),u[0]%2&&u.reverse(),t.each(function(c,f){c.page=u[f],c.scrollY=l}),t.attr("transform",function(c){var f=A$(c.rowBlocks,c.page)-c.scrollY;return lg(0,f)}),e&&(AZe(e,r,t,u,n.prevPages,n,0),AZe(e,r,t,u,n.prevPages,n,1),hC(r,e))}}function G7(e,t,r,n){return function(a){var o=a.calcdata?a.calcdata:a,s=t.filter(function(f){return o.key===f.key}),l=r||o.scrollbarState.dragMultiplier,u=o.scrollY;o.scrollY=n===void 0?o.scrollY+l*tf.event.dy:n;var c=s.selectAll("."+Ya.cn.yColumn).selectAll("."+Ya.cn.columnBlock).filter(M$);return E$(e,c,s),o.scrollY===u}}function AZe(e,t,r,n,i,a,o){var s=n[o]!==i[o];s&&(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout(function(){var l=r.filter(function(u,c){return c===o&&n[c]!==i[c]});w$(e,t,l,r),i[o]=n[o]}))}function bKt(e,t,r,n){return function(){var a=tf.select(t.parentNode);a.each(function(o){var s=o.fragments;a.selectAll("tspan.line").each(function(_,b){s[b].width=this.getComputedTextLength()});var l=s[s.length-1].width,u=s.slice(0,-1),c=[],f,h,d=0,v=o.column.columnWidth-2*Ya.cellPad;for(o.value="";u.length;)f=u.shift(),h=f.width+l,d+h>v&&(o.value+=c.join(Ya.wrapSpacer)+Ya.lineBreaker,c=[],d=0),c.push(f.text),d+=h;d&&(o.value+=c.join(Ya.wrapSpacer)),o.wrapped=!0}),a.selectAll("tspan.line").remove(),EZe(a.select("."+Ya.cn.cellText),r,e,n),tf.select(t.parentNode.parentNode).call(k$)}}function wKt(e,t,r,n,i){return function(){if(!i.settledY){var o=tf.select(t.parentNode),s=S$(i),l=i.key-s.firstRowIndex,u=s.rows[l].rowHeight,c=i.cellHeightMayIncrease?t.parentNode.getBoundingClientRect().height+2*Ya.cellPad:u,f=Math.max(c,u),h=f-s.rows[l].rowHeight;h&&(s.rows[l].rowHeight=f,e.selectAll("."+Ya.cn.columnCell).call(k$),E$(null,e.filter(M$),0),hC(r,n,!0)),o.attr("transform",function(){var d=this,v=d.parentNode,_=v.getBoundingClientRect(),b=tf.select(d.parentNode).select("."+Ya.cn.cellRect).node().getBoundingClientRect(),p=d.transform.baseVal.consolidate(),k=b.top-_.top+(p?p.matrix.f:Ya.cellPad);return lg(kZe(i,tf.select(d.parentNode).select("."+Ya.cn.cellTextHolder).node().getBoundingClientRect().width),k)}),i.settledY=!0}}}function kZe(e,t){switch(e.align){case"left":return Ya.cellPad;case"right":return e.column.columnWidth-(t||0)-Ya.cellPad;case"center":return(e.column.columnWidth-(t||0))/2;default:return Ya.cellPad}}function k$(e){e.attr("transform",function(t){var r=t.rowBlocks[0].auxiliaryBlocks.reduce(function(o,s){return o+H7(s,1/0)},0),n=S$(t),i=H7(n,t.key),a=i+r;return lg(0,a)}).selectAll("."+Ya.cn.cellRect).attr("height",function(t){return AKt(S$(t),t.key).rowHeight})}function A$(e,t){for(var r=0,n=t-1;n>=0;n--)r+=TKt(e[n]);return r}function H7(e,t){for(var r=0,n=0;n{"use strict";var SKt=Id().getModuleCalcData,MKt=C$(),j7="table";W7.name=j7;W7.plot=function(e){var t=SKt(e.calcdata,j7)[0];t.length&&MKt(e,t)};W7.clean=function(e,t,r,n){var i=n._has&&n._has(j7),a=t._has&&t._has(j7);i&&!a&&n._paperdiv.selectAll(".table").remove()}});var IZe=ye((z2r,PZe)=>{"use strict";PZe.exports={attributes:d$(),supplyDefaults:aZe(),calc:sZe(),plot:C$(),moduleType:"trace",name:"table",basePlotModule:LZe(),categories:["noOpacity"],meta:{}}});var DZe=ye((O2r,RZe)=>{"use strict";RZe.exports=IZe()});var BZe=ye((q2r,qZe)=>{"use strict";var FZe=ec(),zZe=Ih(),L$=Rd(),EKt=df().descriptionWithDates,kKt=mc().overrideAll,OZe=Pd().dash,P$=Ao().extendFlat;qZe.exports={color:{valType:"color",editType:"calc"},smoothing:{valType:"number",dflt:1,min:0,max:1.3,editType:"calc"},title:{text:{valType:"string",dflt:"",editType:"calc"},font:FZe({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:L$.autotypenumbers,autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"calc"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"calc"},range:{valType:"info_array",editType:"calc",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}]},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},cheatertype:{valType:"enumerated",values:["index","value"],dflt:"value",editType:"calc"},tickmode:{valType:"enumerated",values:["linear","array"],dflt:"array",editType:"calc"},nticks:{valType:"integer",min:0,dflt:0,editType:"calc"},tickvals:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},showticklabels:{valType:"enumerated",values:["start","end","both","none"],dflt:"start",editType:"calc"},labelalias:P$({},L$.labelalias,{editType:"calc"}),tickfont:FZe({editType:"calc"}),tickangle:{valType:"angle",dflt:"auto",editType:"calc"},tickprefix:{valType:"string",dflt:"",editType:"calc"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},ticksuffix:{valType:"string",dflt:"",editType:"calc"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B","SI extended"],dflt:"B",editType:"calc"},minexponent:{valType:"number",dflt:3,min:0,editType:"calc"},separatethousands:{valType:"boolean",dflt:!1,editType:"calc"},tickformat:{valType:"string",dflt:"",editType:"calc",description:EKt("tick label")},tickformatstops:kKt(L$.tickformatstops,"calc","from-root"),categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},labelpadding:{valType:"integer",dflt:10,editType:"calc"},labelprefix:{valType:"string",editType:"calc"},labelsuffix:{valType:"string",dflt:"",editType:"calc"},showline:{valType:"boolean",dflt:!1,editType:"calc"},linecolor:{valType:"color",dflt:zZe.defaultLine,editType:"calc"},linewidth:{valType:"number",min:0,dflt:1,editType:"calc"},gridcolor:{valType:"color",editType:"calc"},gridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},griddash:P$({},OZe,{editType:"calc"}),showgrid:{valType:"boolean",dflt:!0,editType:"calc"},minorgridcount:{valType:"integer",min:0,dflt:0,editType:"calc"},minorgridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},minorgriddash:P$({},OZe,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:zZe.lightLine,editType:"calc"},startline:{valType:"boolean",editType:"calc"},startlinecolor:{valType:"color",editType:"calc"},startlinewidth:{valType:"number",dflt:1,editType:"calc"},endline:{valType:"boolean",editType:"calc"},endlinewidth:{valType:"number",dflt:1,editType:"calc"},endlinecolor:{valType:"color",editType:"calc"},tick0:{valType:"number",min:0,dflt:0,editType:"calc"},dtick:{valType:"number",min:0,dflt:1,editType:"calc"},arraytick0:{valType:"integer",min:0,dflt:0,editType:"calc"},arraydtick:{valType:"integer",min:1,dflt:1,editType:"calc"},editType:"calc"}});var Z7=ye((B2r,VZe)=>{"use strict";var CKt=ec(),NZe=BZe(),UZe=Ih(),X7=CKt({editType:"calc"}),LKt=pf().zorder;X7.family.dflt='"Open Sans", verdana, arial, sans-serif';X7.size.dflt=12;X7.color.dflt=UZe.defaultLine;VZe.exports={carpet:{valType:"string",editType:"calc"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},a:{valType:"data_array",editType:"calc"},a0:{valType:"number",dflt:0,editType:"calc"},da:{valType:"number",dflt:1,editType:"calc"},b:{valType:"data_array",editType:"calc"},b0:{valType:"number",dflt:0,editType:"calc"},db:{valType:"number",dflt:1,editType:"calc"},cheaterslope:{valType:"number",dflt:1,editType:"calc"},aaxis:NZe,baxis:NZe,font:X7,color:{valType:"color",dflt:UZe.defaultLine,editType:"plot"},zorder:LKt}});var jZe=ye((N2r,HZe)=>{"use strict";var GZe=Dr().isArray1D;HZe.exports=function(t,r,n){var i=n("x"),a=i&&i.length,o=n("y"),s=o&&o.length;if(!a&&!s)return!1;if(r._cheater=!i,(!a||GZe(i))&&(!s||GZe(o))){var l=a?i.length:1/0;s&&(l=Math.min(l,o.length)),r.a&&r.a.length&&(l=Math.min(l,r.a.length)),r.b&&r.b.length&&(l=Math.min(l,r.b.length)),r._length=l}else r._length=null;return!0}});var ZZe=ye((U2r,XZe)=>{"use strict";var PKt=Z7(),WZe=ka().addOpacity,IKt=qa(),dC=Dr(),RKt=Lb(),DKt=s_(),FKt=l_(),zKt=cI(),OKt=xm(),qKt=V3();XZe.exports=function(t,r,n){var i=n.letter,a=n.font||{},o=PKt[i+"axis"];function s(g,P){return dC.coerce(t,r,o,g,P)}function l(g,P){return dC.coerce2(t,r,o,g,P)}n.name&&(r._name=n.name,r._id=n.name),s("autotypenumbers",n.autotypenumbersDflt);var u=s("type");if(u==="-"&&(n.data&&BKt(r,n.data),r.type==="-"?r.type="linear":u=t.type=r.type),s("smoothing"),s("cheatertype"),s("showticklabels"),s("labelprefix",i+" = "),s("labelsuffix"),s("showtickprefix"),s("showticksuffix"),s("separatethousands"),s("tickformat"),s("exponentformat"),s("minexponent"),s("showexponent"),s("categoryorder"),s("tickmode"),s("tickvals"),s("ticktext"),s("tick0"),s("dtick"),r.tickmode==="array"&&(s("arraytick0"),s("arraydtick")),s("labelpadding"),r._hovertitle=i,u==="date"){var c=IKt.getComponentMethod("calendars","handleDefaults");c(t,r,"calendar",n.calendar)}OKt(r,n.fullLayout),r.c2p=dC.identity;var f=s("color",n.dfltColor),h=f===t.color?f:a.color,d=s("title.text");d&&(dC.coerceFont(s,"title.font",a,{overrideDflt:{size:dC.bigFont(a.size),color:h}}),s("title.offset")),s("tickangle");var v=s("autorange",!r.isValidRange(t.range));v&&s("rangemode"),s("range"),r.cleanRange(),s("fixedrange"),RKt(t,r,s,u),FKt(t,r,s,u,n),DKt(t,r,s,u,n),zKt(t,r,s,{data:n.data,dataAttr:i});var _=l("gridcolor",WZe(f,.3)),b=l("gridwidth"),p=l("griddash"),k=s("showgrid");k||(delete r.gridcolor,delete r.gridwidth,delete r.griddash);var E=l("startlinecolor",f),T=l("startlinewidth",b),L=s("startline",r.showgrid||!!E||!!T);L||(delete r.startlinecolor,delete r.startlinewidth);var x=l("endlinecolor",f),C=l("endlinewidth",b),M=s("endline",r.showgrid||!!x||!!C);return M||(delete r.endlinecolor,delete r.endlinewidth),k?(s("minorgridcount"),s("minorgridwidth",b),s("minorgriddash",p),s("minorgridcolor",WZe(_,.06)),r.minorgridcount||(delete r.minorgridwidth,delete r.minorgriddash,delete r.minorgridcolor)):(delete r.gridcolor,delete r.gridwidth,delete r.griddash),r.showticklabels==="none"&&(delete r.tickfont,delete r.tickangle,delete r.showexponent,delete r.exponentformat,delete r.minexponent,delete r.tickformat,delete r.showticksuffix,delete r.showtickprefix),r.showticksuffix||delete r.ticksuffix,r.showtickprefix||delete r.tickprefix,s("tickmode"),r};function BKt(e,t){if(e.type==="-"){var r=e._id,n=r.charAt(0),i=n+"calendar",a=e[i];e.type=qKt(t,a,{autotypenumbers:e.autotypenumbers})}}});var KZe=ye((V2r,YZe)=>{"use strict";var NKt=ZZe(),UKt=vl();YZe.exports=function(t,r,n,i,a){var o=i("a");o||(i("da"),i("a0"));var s=i("b");s||(i("db"),i("b0")),VKt(t,r,n,a)};function VKt(e,t,r,n){var i=["aaxis","baxis"];i.forEach(function(a){var o=a.charAt(0),s=e[a]||{},l=UKt.newContainer(t,a),u={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,tickfont:"x",id:o+"axis",letter:o,font:t.font,name:a,data:e[o],calendar:t.calendar,dfltColor:n,bgColor:r.paper_bgcolor,autotypenumbersDflt:r.autotypenumbers,fullLayout:r};NKt(s,l,u),l._categories=l._categories||[],!e[a]&&s.type!=="-"&&(e[a]={type:s.type})})}});var QZe=ye((G2r,$Ze)=>{"use strict";var JZe=Dr(),GKt=jZe(),HKt=KZe(),jKt=Z7(),WKt=Ih();$Ze.exports=function(t,r,n,i){function a(l,u){return JZe.coerce(t,r,jKt,l,u)}r._clipPathId="clip"+r.uid+"carpet";var o=a("color",WKt.defaultLine);if(JZe.coerceFont(a,"font",i.font),a("carpet"),HKt(t,r,i,a,o),!r.a||!r.b){r.visible=!1;return}r.a.length<3&&(r.aaxis.smoothing=0),r.b.length<3&&(r.baxis.smoothing=0);var s=GKt(t,r,a);s||(r.visible=!1),r._cheater&&a("cheaterslope"),a("zorder")}});var I$=ye((H2r,eYe)=>{"use strict";var XKt=Dr().isArrayOrTypedArray;eYe.exports=function(t,r,n){var i;for(XKt(t)?t.length>r.length&&(t=t.slice(0,r.length)):t=[],i=0;i{"use strict";tYe.exports=function(t,r,n){if(t.length===0)return"";var i,a=[],o=n?3:1;for(i=0;i{"use strict";rYe.exports=function(t,r,n,i,a,o){var s=a[0]*t.dpdx(r),l=a[1]*t.dpdy(n),u=1,c=1;if(o){var f=Math.sqrt(a[0]*a[0]+a[1]*a[1]),h=Math.sqrt(o[0]*o[0]+o[1]*o[1]),d=(a[0]*o[0]+a[1]*o[1])/f/h;c=Math.max(0,d)}var v=Math.atan2(l,s)*180/Math.PI;return v<-90?(v+=180,u=-u):v>90&&(v-=180,u=-u),{angle:v,flip:u,p:t.c2p(i,r,n),offsetMultplier:c}}});var fYe=ye((X2r,cYe)=>{"use strict";var $7=Oa(),Y7=So(),K7=I$(),oYe=R$(),vC=iYe(),D$=Zl(),Up=Dr(),sYe=Up.strRotate,J7=Up.strTranslate,lYe=Dh();cYe.exports=function(t,r,n,i){var a=t._context.staticPlot,o=r.xaxis,s=r.yaxis,l=t._fullLayout,u=l._clips;Up.makeTraceGroups(i,n,"trace").each(function(c){var f=$7.select(this),h=c[0],d=h.trace,v=d.aaxis,_=d.baxis,b=Up.ensureSingle(f,"g","minorlayer"),p=Up.ensureSingle(f,"g","majorlayer"),k=Up.ensureSingle(f,"g","boundarylayer"),E=Up.ensureSingle(f,"g","labellayer");f.style("opacity",d.opacity),G5(o,s,p,v,"a",v._gridlines,!0,a),G5(o,s,p,_,"b",_._gridlines,!0,a),G5(o,s,b,v,"a",v._minorgridlines,!0,a),G5(o,s,b,_,"b",_._minorgridlines,!0,a),G5(o,s,k,v,"a-boundary",v._boundarylines,a),G5(o,s,k,_,"b-boundary",_._boundarylines,a);var T=nYe(t,o,s,d,h,E,v._labels,"a-label"),L=nYe(t,o,s,d,h,E,_._labels,"b-label");YKt(t,E,d,h,o,s,T,L),ZKt(d,h,u,o,s)})};function ZKt(e,t,r,n,i){var a,o,s,l,u=r.select("#"+e._clipPathId);u.size()||(u=r.append("clipPath").classed("carpetclip",!0));var c=Up.ensureSingle(u,"path","carpetboundary"),f=t.clipsegments,h=[];for(l=0;l0?"start":"end","data-notex":1}).call(Y7.font,f.font).text(f.text).call(D$.convertToTspans,e),p=Y7.bBox(this);b.attr("transform",J7(d.p[0],d.p[1])+sYe(d.angle)+J7(f.axis.labelpadding*_,p.height*.3)),u=Math.max(u,p.width+f.axis.labelpadding)}),l.exit().remove(),c.maxExtent=u,c}function YKt(e,t,r,n,i,a,o,s){var l,u,c,f,h=Up.aggNums(Math.min,null,r.a),d=Up.aggNums(Math.max,null,r.a),v=Up.aggNums(Math.min,null,r.b),_=Up.aggNums(Math.max,null,r.b);l=.5*(h+d),u=v,c=r.ab2xy(l,u,!0),f=r.dxyda_rough(l,u),o.angle===void 0&&Up.extendFlat(o,vC(r,i,a,c,r.dxydb_rough(l,u))),aYe(e,t,r,n,c,f,r.aaxis,i,a,o,"a-title"),l=h,u=.5*(v+_),c=r.ab2xy(l,u,!0),f=r.dxydb_rough(l,u),s.angle===void 0&&Up.extendFlat(s,vC(r,i,a,c,r.dxyda_rough(l,u))),aYe(e,t,r,n,c,f,r.baxis,i,a,s,"b-title")}var uYe=lYe.LINE_SPACING,KKt=(1-lYe.MID_SHIFT)/uYe+1;function aYe(e,t,r,n,i,a,o,s,l,u,c){var f=[];o.title.text&&f.push(o.title.text);var h=t.selectAll("text."+c).data(f),d=u.maxExtent;h.enter().append("text").classed(c,!0),h.each(function(){var v=vC(r,s,l,i,a);["start","both"].indexOf(o.showticklabels)===-1&&(d=0);var _=o.title.font.size;d+=_+o.title.offset;var b=u.angle+(u.flip<0?180:0),p=(b-v.angle+450)%360,k=p>90&&p<270,E=$7.select(this);E.text(o.title.text).call(D$.convertToTspans,e),k&&(d=(-D$.lineCount(E)+KKt)*uYe*_-d),E.attr("transform",J7(v.p[0],v.p[1])+sYe(v.angle)+J7(0,d)).attr("text-anchor","middle").call(Y7.font,o.title.font)}),h.exit().remove()}});var dYe=ye((Z2r,hYe)=>{"use strict";var Q7=Dr().isArrayOrTypedArray;hYe.exports=function(e,t,r){var n,i,a,o,s,l,u=[],c=Q7(e)?e.length:e,f=Q7(t)?t.length:t,h=Q7(e)?e:null,d=Q7(t)?t:null;h&&(a=(h.length-1)/(h[h.length-1]-h[0])/(c-1)),d&&(o=(d.length-1)/(d[d.length-1]-d[0])/(f-1));var v,_=1/0,b=-1/0;for(i=0;i{"use strict";var vYe=Dr().isArrayOrTypedArray;gYe.exports=function(e){return pYe(e,0)};function pYe(e,t){if(!vYe(e)||t>=10)return null;for(var r=1/0,n=-1/0,i=e.length,a=0;a{"use strict";var JKt=ho(),Ox=Ao().extendFlat;yYe.exports=function(t,r,n){var i,a,o,s,l,u,c,f,h,d,v,_,b,p,k=t["_"+r],E=t[r+"axis"],T=E._gridlines=[],L=E._minorgridlines=[],x=E._boundarylines=[],C=t["_"+n],M=t[n+"axis"];E.tickmode==="array"&&(E.tickvals=k.slice());var g=t._xctrl,P=t._yctrl,A=g[0].length,z=g.length,O=t._a.length,U=t._b.length;JKt.prepTicks(E),E.tickmode==="array"&&delete E.tickvals;var G=E.smoothing?3:1;function Z(N){var H,re,oe,_e,Ce,Le,ge,ie,Se,Ee,Ae,Be,Pe=[],me=[],De={};if(r==="b")for(re=t.b2j(N),oe=Math.floor(Math.max(0,Math.min(U-2,re))),_e=re-oe,De.length=U,De.crossLength=O,De.xy=function(ce){return t.evalxy([],ce,re)},De.dxy=function(ce,je){return t.dxydi([],ce,oe,je,_e)},H=0;H0&&(Se=t.dxydi([],H-1,oe,0,_e),Pe.push(Ce[0]+Se[0]/3),me.push(Ce[1]+Se[1]/3),Ee=t.dxydi([],H-1,oe,1,_e),Pe.push(ie[0]-Ee[0]/3),me.push(ie[1]-Ee[1]/3)),Pe.push(ie[0]),me.push(ie[1]),Ce=ie;else for(H=t.a2i(N),Le=Math.floor(Math.max(0,Math.min(O-2,H))),ge=H-Le,De.length=O,De.crossLength=U,De.xy=function(ce){return t.evalxy([],H,ce)},De.dxy=function(ce,je){return t.dxydj([],Le,ce,ge,je)},re=0;re0&&(Ae=t.dxydj([],Le,re-1,ge,0),Pe.push(Ce[0]+Ae[0]/3),me.push(Ce[1]+Ae[1]/3),Be=t.dxydj([],Le,re-1,ge,1),Pe.push(ie[0]-Be[0]/3),me.push(ie[1]-Be[1]/3)),Pe.push(ie[0]),me.push(ie[1]),Ce=ie;return De.axisLetter=r,De.axis=E,De.crossAxis=M,De.value=N,De.constvar=n,De.index=f,De.x=Pe,De.y=me,De.smoothing=M.smoothing,De}function j(N){var H,re,oe,_e,Ce,Le=[],ge=[],ie={};if(ie.length=k.length,ie.crossLength=C.length,r==="b")for(oe=Math.max(0,Math.min(U-2,N)),Ce=Math.min(1,Math.max(0,N-oe)),ie.xy=function(Se){return t.evalxy([],Se,N)},ie.dxy=function(Se,Ee){return t.dxydi([],Se,oe,Ee,Ce)},H=0;Hk.length-1)&&T.push(Ox(j(a),{color:E.gridcolor,width:E.gridwidth,dash:E.griddash}));for(f=u;fk.length-1)&&!(v<0||v>k.length-1))for(_=k[o],b=k[v],i=0;ik[k.length-1])&&L.push(Ox(Z(d),{color:E.minorgridcolor,width:E.minorgridwidth,dash:E.minorgriddash})));E.startline&&x.push(Ox(j(0),{color:E.startlinecolor,width:E.startlinewidth})),E.endline&&x.push(Ox(j(k.length-1),{color:E.endlinecolor,width:E.endlinewidth}))}else{for(s=5e-15,l=[Math.floor((k[k.length-1]-E.tick0)/E.dtick*(1+s)),Math.ceil((k[0]-E.tick0)/E.dtick/(1+s))].sort(function(N,H){return N-H}),u=l[0],c=l[1],f=u;f<=c;f++)h=E.tick0+E.dtick*f,T.push(Ox(Z(h),{color:E.gridcolor,width:E.gridwidth,dash:E.griddash}));for(f=u-1;fk[k.length-1])&&L.push(Ox(Z(d),{color:E.minorgridcolor,width:E.minorgridwidth,dash:E.minorgriddash}));E.startline&&x.push(Ox(Z(k[0]),{color:E.startlinecolor,width:E.startlinewidth})),E.endline&&x.push(Ox(Z(k[k.length-1]),{color:E.endlinecolor,width:E.endlinewidth}))}}});var TYe=ye((J2r,wYe)=>{"use strict";var xYe=ho(),bYe=Ao().extendFlat;wYe.exports=function(t,r){var n,i,a,o,s,l=r._labels=[],u=r._gridlines;for(n=0;n{"use strict";AYe.exports=function(t,r,n,i){var a,o,s,l=[],u=!!n.smoothing,c=!!i.smoothing,f=t[0].length-1,h=t.length-1;for(a=0,o=[],s=[];a<=f;a++)o[a]=t[0][a],s[a]=r[0][a];for(l.push({x:o,y:s,bicubic:u}),a=0,o=[],s=[];a<=h;a++)o[a]=t[a][f],s[a]=r[a][f];for(l.push({x:o,y:s,bicubic:c}),a=f,o=[],s=[];a>=0;a--)o[f-a]=t[h][a],s[f-a]=r[h][a];for(l.push({x:o,y:s,bicubic:u}),a=h,o=[],s=[];a>=0;a--)o[h-a]=t[a][0],s[h-a]=r[a][0];return l.push({x:o,y:s,bicubic:c}),l}});var EYe=ye((Q2r,MYe)=>{"use strict";var $Kt=Dr();MYe.exports=function(t,r,n){var i,a,o,s=[],l=[],u=t[0].length,c=t.length;function f(oe,_e){var Ce=0,Le,ge=0;return oe>0&&(Le=t[_e][oe-1])!==void 0&&(ge++,Ce+=Le),oe0&&(Le=t[_e-1][oe])!==void 0&&(ge++,Ce+=Le),_e0&&a0&&iM);return $Kt.log("Smoother converged to",g,"after",A,"iterations"),t}});var CYe=ye((ewr,kYe)=>{"use strict";kYe.exports={RELATIVE_CULL_TOLERANCE:1e-6}});var IYe=ye((twr,PYe)=>{"use strict";var LYe=.5;PYe.exports=function(t,r,n,i){var a=t[0]-r[0],o=t[1]-r[1],s=n[0]-r[0],l=n[1]-r[1],u=Math.pow(a*a+o*o,LYe/2),c=Math.pow(s*s+l*l,LYe/2),f=(c*c*a-u*u*s)*i,h=(c*c*o-u*u*l)*i,d=c*(u+c)*3,v=u*(u+c)*3;return[[r[0]+(d&&f/d),r[1]+(d&&h/d)],[r[0]-(v&&f/v),r[1]-(v&&h/v)]]}});var DYe=ye((rwr,RYe)=>{"use strict";var F$=IYe(),e9=Dr().ensureArray;function H5(e,t,r){var n=-.5*r[0]+1.5*t[0],i=-.5*r[1]+1.5*t[1];return[(2*n+e[0])/3,(2*i+e[1])/3]}RYe.exports=function(t,r,n,i,a,o){var s,l,u,c,f,h,d,v,_,b,p=n[0].length,k=n.length,E=a?3*p-2:p,T=o?3*k-2:k;for(t=e9(t,T),r=e9(r,T),u=0;u{"use strict";FYe.exports=function(e,t,r,n,i){var a=t-2,o=r-2;return n&&i?function(s,l,u){s||(s=[]);var c,f,h,d,v,_,b=Math.max(0,Math.min(Math.floor(l),a)),p=Math.max(0,Math.min(Math.floor(u),o)),k=Math.max(0,Math.min(1,l-b)),E=Math.max(0,Math.min(1,u-p));b*=3,p*=3;var T=k*k,L=T*k,x=1-k,C=x*x,M=C*x,g=E*E,P=g*E,A=1-E,z=A*A,O=z*A;for(_=0;_{"use strict";OYe.exports=function(e,t,r){return t&&r?function(n,i,a,o,s){n||(n=[]);var l,u,c,f,h,d;i*=3,a*=3;var v=o*o,_=1-o,b=_*_,p=_*o*2,k=-3*b,E=3*(b-p),T=3*(p-v),L=3*v,x=s*s,C=x*s,M=1-s,g=M*M,P=g*M;for(d=0;d{"use strict";BYe.exports=function(e,t,r){return t&&r?function(n,i,a,o,s){n||(n=[]);var l,u,c,f,h,d;i*=3,a*=3;var v=o*o,_=v*o,b=1-o,p=b*b,k=p*b,E=s*s,T=1-s,L=T*T,x=T*s*2,C=-3*L,M=3*(L-x),g=3*(x-E),P=3*E;for(d=0;d{"use strict";var UYe=CYe(),VYe=U6().findBin,QKt=DYe(),eJt=zYe(),tJt=qYe(),rJt=NYe();GYe.exports=function(t){var r=t._a,n=t._b,i=r.length,a=n.length,o=t.aaxis,s=t.baxis,l=r[0],u=r[i-1],c=n[0],f=n[a-1],h=r[r.length-1]-r[0],d=n[n.length-1]-n[0],v=h*UYe.RELATIVE_CULL_TOLERANCE,_=d*UYe.RELATIVE_CULL_TOLERANCE;l-=v,u+=v,c-=_,f+=_,t.isVisible=function(b,p){return b>l&&bc&&pu||pf},t.setScale=function(){var b=t._x,p=t._y,k=QKt(t._xctrl,t._yctrl,b,p,o.smoothing,s.smoothing);t._xctrl=k[0],t._yctrl=k[1],t.evalxy=eJt([t._xctrl,t._yctrl],i,a,o.smoothing,s.smoothing),t.dxydi=tJt([t._xctrl,t._yctrl],o.smoothing,s.smoothing),t.dxydj=rJt([t._xctrl,t._yctrl],o.smoothing,s.smoothing)},t.i2a=function(b){var p=Math.max(0,Math.floor(b[0]),i-2),k=b[0]-p;return(1-k)*r[p]+k*r[p+1]},t.j2b=function(b){var p=Math.max(0,Math.floor(b[1]),i-2),k=b[1]-p;return(1-k)*n[p]+k*n[p+1]},t.ij2ab=function(b){return[t.i2a(b[0]),t.j2b(b[1])]},t.a2i=function(b){var p=Math.max(0,Math.min(VYe(b,r),i-2)),k=r[p],E=r[p+1];return Math.max(0,Math.min(i-1,p+(b-k)/(E-k)))},t.b2j=function(b){var p=Math.max(0,Math.min(VYe(b,n),a-2)),k=n[p],E=n[p+1];return Math.max(0,Math.min(a-1,p+(b-k)/(E-k)))},t.ab2ij=function(b){return[t.a2i(b[0]),t.b2j(b[1])]},t.i2c=function(b,p){return t.evalxy([],b,p)},t.ab2xy=function(b,p,k){if(!k&&(br[i-1]|pn[a-1]))return[!1,!1];var E=t.a2i(b),T=t.b2j(p),L=t.evalxy([],E,T);if(k){var x=0,C=0,M=[],g,P,A,z;br[i-1]?(g=i-2,P=1,x=(b-r[i-1])/(r[i-1]-r[i-2])):(g=Math.max(0,Math.min(i-2,Math.floor(E))),P=E-g),pn[a-1]?(A=a-2,z=1,C=(p-n[a-1])/(n[a-1]-n[a-2])):(A=Math.max(0,Math.min(a-2,Math.floor(T))),z=T-A),x&&(t.dxydi(M,g,A,P,z),L[0]+=M[0]*x,L[1]+=M[1]*x),C&&(t.dxydj(M,g,A,P,z),L[0]+=M[0]*C,L[1]+=M[1]*C)}return L},t.c2p=function(b,p,k){return[p.c2p(b[0]),k.c2p(b[1])]},t.p2x=function(b,p,k){return[p.p2c(b[0]),k.p2c(b[1])]},t.dadi=function(b){var p=Math.max(0,Math.min(r.length-2,b));return r[p+1]-r[p]},t.dbdj=function(b){var p=Math.max(0,Math.min(n.length-2,b));return n[p+1]-n[p]},t.dxyda=function(b,p,k,E){var T=t.dxydi(null,b,p,k,E),L=t.dadi(b,k);return[T[0]/L,T[1]/L]},t.dxydb=function(b,p,k,E){var T=t.dxydj(null,b,p,k,E),L=t.dbdj(p,E);return[T[0]/L,T[1]/L]},t.dxyda_rough=function(b,p,k){var E=h*(k||.1),T=t.ab2xy(b+E,p,!0),L=t.ab2xy(b-E,p,!0);return[(T[0]-L[0])*.5/E,(T[1]-L[1])*.5/E]},t.dxydb_rough=function(b,p,k){var E=d*(k||.1),T=t.ab2xy(b,p+E,!0),L=t.ab2xy(b,p-E,!0);return[(T[0]-L[0])*.5/E,(T[1]-L[1])*.5/E]},t.dpdx=function(b){return b._m},t.dpdy=function(b){return b._m}}});var $Ye=ye((swr,JYe)=>{"use strict";var t9=ho(),jYe=Dr().isArray1D,iJt=dYe(),WYe=mYe(),XYe=_Ye(),ZYe=TYe(),nJt=SYe(),YYe=u8(),KYe=EYe(),aJt=s8(),oJt=HYe();JYe.exports=function(t,r){var n=t9.getFromId(t,r.xaxis),i=t9.getFromId(t,r.yaxis),a=r.aaxis,o=r.baxis,s=r.x,l=r.y,u=[];s&&jYe(s)&&u.push("x"),l&&jYe(l)&&u.push("y"),u.length&&aJt(r,a,o,"a","b",u);var c=r._a=r._a||r.a,f=r._b=r._b||r.b;s=r._x||r.x,l=r._y||r.y;var h={};if(r._cheater){var d=a.cheatertype==="index"?c.length:c,v=o.cheatertype==="index"?f.length:f;s=iJt(d,v,r.cheaterslope)}r._x=s=YYe(s),r._y=l=YYe(l),KYe(s,c,f),KYe(l,c,f),oJt(r),r.setScale();var _=WYe(s),b=WYe(l),p=.5*(_[1]-_[0]),k=.5*(_[1]+_[0]),E=.5*(b[1]-b[0]),T=.5*(b[1]+b[0]),L=1.3;return _=[k-p*L,k+p*L],b=[T-E*L,T+E*L],r._extremes[n._id]=t9.findExtremes(n,_,{padded:!0}),r._extremes[i._id]=t9.findExtremes(i,b,{padded:!0}),XYe(r,"a","b"),XYe(r,"b","a"),ZYe(r,a),ZYe(r,o),h.clipsegments=nJt(r._xctrl,r._yctrl,a,o),h.x=s,h.y=l,h.a=c,h.b=f,[h]}});var eKe=ye((lwr,QYe)=>{"use strict";QYe.exports={attributes:Z7(),supplyDefaults:QZe(),plot:fYe(),calc:$Ye(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:mh(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}});var rKe=ye((uwr,tKe)=>{"use strict";tKe.exports=eKe()});var z$=ye((cwr,oKe)=>{"use strict";var sJt=Pg(),c0=pf(),lJt=Gl(),{hovertemplateAttrs:uJt,texttemplateAttrs:cJt,templatefallbackAttrs:iKe}=Ll(),nKe=Tu(),qx=Ao().extendFlat,ug=c0.marker,j5=c0.line,aKe=ug.line;oKe.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:qx({},c0.mode,{dflt:"markers"}),text:qx({},c0.text,{}),texttemplate:cJt({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:iKe({editType:"plot"}),hovertext:qx({},c0.hovertext,{}),line:{color:j5.color,width:j5.width,dash:j5.dash,backoff:j5.backoff,shape:qx({},j5.shape,{values:["linear","spline"]}),smoothing:j5.smoothing,editType:"calc"},connectgaps:c0.connectgaps,fill:qx({},c0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:sJt(),marker:qx({symbol:ug.symbol,opacity:ug.opacity,maxdisplayed:ug.maxdisplayed,angle:ug.angle,angleref:ug.angleref,standoff:ug.standoff,size:ug.size,sizeref:ug.sizeref,sizemin:ug.sizemin,sizemode:ug.sizemode,line:qx({width:aKe.width,dash:aKe.dash,editType:"calc"},nKe("marker.line")),gradient:ug.gradient,editType:"calc"},nKe("marker")),textfont:c0.textfont,textposition:c0.textposition,selected:c0.selected,unselected:c0.unselected,hoverinfo:qx({},lJt.hoverinfo,{flags:["a","b","text","name"]}),hoveron:c0.hoveron,hovertemplate:uJt(),hovertemplatefallback:iKe(),zorder:c0.zorder}});var cKe=ye((fwr,uKe)=>{"use strict";var sKe=Dr(),fJt=Lm(),W5=Ru(),hJt=$p(),dJt=D0(),lKe=sT(),vJt=F0(),pJt=Fg(),gJt=z$();uKe.exports=function(t,r,n,i){function a(h,d){return sKe.coerce(t,r,gJt,h,d)}a("carpet"),r.xaxis="x",r.yaxis="y";var o=a("a"),s=a("b"),l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,a("text"),a("texttemplate"),a("texttemplatefallback"),a("hovertext");var u=l{"use strict";fKe.exports=function(t,r){var n={},i=r._carpet,a=i.ab2ij([t.a,t.b]),o=Math.floor(a[0]),s=a[0]-o,l=Math.floor(a[1]),u=a[1]-l,c=i.evalxy([],o,l,s,u);return n.yLabel=c[1].toFixed(3),n}});var r9=ye((dwr,dKe)=>{"use strict";dKe.exports=function(e,t){for(var r=e._fullData.length,n,i=0;i{"use strict";var vKe=Eo(),mJt=z0(),yJt=Rm(),_Jt=O0(),xJt=q0().calcMarkerSize,bJt=r9();pKe.exports=function(t,r){var n=r._carpetTrace=bJt(t,r);if(!(!n||!n.visible||n.visible==="legendonly")){var i;r.xaxis=n.xaxis,r.yaxis=n.yaxis;var a=r._length,o=new Array(a),s,l,u=!1;for(i=0;i{"use strict";var wJt=dT(),mKe=ho(),TJt=So();yKe.exports=function(t,r,n,i){var a,o,s,l=n[0][0].carpet,u=mKe.getFromId(t,l.xaxis||"x"),c=mKe.getFromId(t,l.yaxis||"y"),f={xaxis:u,yaxis:c,plot:r.plot};for(a=0;a{"use strict";var AJt=mT(),SJt=Dr().fillText;xKe.exports=function(t,r,n,i){var a=AJt(t,r,n,i);if(!a||a[0].index===!1)return;var o=a[0];if(o.index===void 0){var s=1-o.y0/t.ya._length,l=t.xa._length,u=l*s/2,c=l-u;return o.x0=Math.max(Math.min(o.x0,c),u),o.x1=Math.max(Math.min(o.x1,c),u),a}var f=o.cd[o.index];o.a=f.a,o.b=f.b,o.xLabelVal=void 0,o.yLabelVal=void 0;var h=o.trace,d=h._carpet,v=h._module.formatLabels(f,h);o.yLabel=v.yLabel,delete o.text;var _=[];function b(E,T){var L;E.labelprefix&&E.labelprefix.length>0?L=E.labelprefix.replace(/ = $/,""):L=E._hovertitle,_.push(L+": "+T.toFixed(3)+E.labelsuffix)}if(!h.hovertemplate){var p=f.hi||h.hoverinfo,k=p.split("+");k.indexOf("all")!==-1&&(k=["a","b","text"]),k.indexOf("a")!==-1&&b(d.aaxis,f.a),k.indexOf("b")!==-1&&b(d.baxis,f.b),_.push("y: "+o.yLabel),k.indexOf("text")!==-1&&SJt(f,h,_),o.extraText=_.join("
")}return a}});var TKe=ye((mwr,wKe)=>{"use strict";wKe.exports=function(t,r,n,i,a){var o=i[a];return t.a=o.a,t.b=o.b,t.y=o.y,t}});var SKe=ye((ywr,AKe)=>{"use strict";AKe.exports={attributes:z$(),supplyDefaults:cKe(),colorbar:$d(),formatLabels:hKe(),calc:gKe(),plot:_Ke(),style:sp().style,styleOnSelect:sp().styleOnSelect,hoverPoints:bKe(),selectPoints:yT(),eventData:TKe(),moduleType:"trace",name:"scattercarpet",basePlotModule:mh(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}});var EKe=ye((_wr,MKe)=>{"use strict";MKe.exports=SKe()});var O$=ye((xwr,kKe)=>{"use strict";var cg=FT(),T1=O4(),MJt=Tu(),EJt=Ao().extendFlat,ly=T1.contours;kKe.exports=EJt({carpet:{valType:"string",editType:"calc"},z:cg.z,a:cg.x,a0:cg.x0,da:cg.dx,b:cg.y,b0:cg.y0,db:cg.dy,text:cg.text,hovertext:cg.hovertext,transpose:cg.transpose,atype:cg.xtype,btype:cg.ytype,fillcolor:T1.fillcolor,autocontour:T1.autocontour,ncontours:T1.ncontours,contours:{type:ly.type,start:ly.start,end:ly.end,size:ly.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:ly.showlines,showlabels:ly.showlabels,labelfont:ly.labelfont,labelformat:ly.labelformat,operation:ly.operation,value:ly.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:T1.line.color,width:T1.line.width,dash:T1.line.dash,smoothing:T1.line.smoothing,editType:"plot"},zorder:T1.zorder},MJt("",{cLetter:"z",autoColorDflt:!1}))});var q$=ye((bwr,PKe)=>{"use strict";var CKe=Dr(),kJt=n8(),LKe=O$(),CJt=RG(),LJt=k8(),PJt=C8();PKe.exports=function(t,r,n,i){function a(u,c){return CKe.coerce(t,r,LKe,u,c)}function o(u){return CKe.coerce2(t,r,LKe,u)}if(a("carpet"),t.a&&t.b){var s=kJt(t,r,a,i,"a","b");if(!s){r.visible=!1;return}a("text");var l=a("contours.type")==="constraint";l?CJt(t,r,a,i,n,{hasHover:!1}):(LJt(t,r,a,o),PJt(t,r,a,i,{hasHover:!1}))}else r._defaultColor=n,r._length=null;a("zorder")}});var FKe=ye((wwr,DKe)=>{"use strict";var IJt=gv(),IKe=Dr(),RJt=s8(),DJt=u8(),FJt=c8(),zJt=f8(),RKe=rG(),OJt=q$(),qJt=r9(),BJt=bG();DKe.exports=function(t,r){var n=r._carpetTrace=qJt(t,r);if(!(!n||!n.visible||n.visible==="legendonly")){if(!r.a||!r.b){var i=t.data[n.index],a=t.data[r.index];a.a||(a.a=i.a),a.b||(a.b=i.b),OJt(a,r,r._defaultColor,t._fullLayout)}var o=NJt(t,r);return BJt(r,r._z),o}};function NJt(e,t){var r=t._carpetTrace,n=r.aaxis,i=r.baxis,a,o,s,l,u,c,f;n._minDtick=0,i._minDtick=0,IKe.isArray1D(t.z)&&RJt(t,n,i,"a","b",["z"]),a=t._a=t._a||t.a,l=t._b=t._b||t.b,a=a?n.makeCalcdata(t,"_a"):[],l=l?i.makeCalcdata(t,"_b"):[],o=t.a0||0,s=t.da||1,u=t.b0||0,c=t.db||1,f=t._z=DJt(t._z||t.z,t.transpose),t._emptypoints=zJt(f),FJt(f,t._emptypoints);var h=IKe.maxRowLength(f),d=t.xtype==="scaled"?"":a,v=RKe(t,d,o,s,h,n),_=t.ytype==="scaled"?"":l,b=RKe(t,_,u,c,f.length,i),p={a:v,b,z:f};return t.contours.type==="levels"&&t.contours.coloring!=="none"&&IJt(e,t,{vals:f,containerStr:"",cLetter:"z"}),[p]}});var OKe=ye((Twr,zKe)=>{"use strict";var UJt=Dr().isArrayOrTypedArray;zKe.exports=function(e,t,r,n){var i,a,o,s,l,u,c,f,h,d,v,_,b,p=UJt(r)?"a":"b",k=p==="a"?e.aaxis:e.baxis,E=k.smoothing,T=p==="a"?e.a2i:e.b2j,L=p==="a"?r:n,x=p==="a"?n:r,C=p==="a"?t.a.length:t.b.length,M=p==="a"?t.b.length:t.a.length,g=Math.floor(p==="a"?e.b2j(x):e.a2i(x)),P=p==="a"?function(_e){return e.evalxy([],_e,g)}:function(_e){return e.evalxy([],g,_e)};E&&(o=Math.max(0,Math.min(M-2,g)),s=g-o,a=p==="a"?function(_e,Ce){return e.dxydi([],_e,o,Ce,s)}:function(_e,Ce){return e.dxydj([],o,_e,s,Ce)});var A=T(L[0]),z=T(L[1]),O=A0?Math.floor:Math.ceil,Z=O>0?Math.ceil:Math.floor,j=O>0?Math.min:Math.max,N=O>0?Math.max:Math.min,H=G(A+U),re=Z(z-U);c=P(A);var oe=[[c]];for(i=H;i*O{"use strict";var n9=Oa(),a9=I$(),VKe=R$(),pC=So(),A1=Dr(),VJt=TG(),GJt=AG(),Tw=I8(),i9=B4(),HJt=kG(),jJt=EG(),WJt=CG(),XJt=r9(),qKe=OKe();GKe.exports=function(t,r,n,i){var a=r.xaxis,o=r.yaxis;A1.makeTraceGroups(i,n,"contour").each(function(s){var l=n9.select(this),u=s[0],c=u.trace,f=c._carpetTrace=XJt(t,c),h=t.calcdata[f.index][0];if(!f.visible||f.visible==="legendonly")return;var d=u.a,v=u.b,_=c.contours,b=jJt(_,r,u),p=_.type==="constraint",k=_._operation,E=p?k==="="?"lines":"fill":_.coloring;function T(G){var Z=f.ab2xy(G[0],G[1],!0);return[a.c2p(Z[0]),o.c2p(Z[1])]}var L=[[d[0],v[v.length-1]],[d[d.length-1],v[v.length-1]],[d[d.length-1],v[0]],[d[0],v[0]]];VJt(b);var x=(d[d.length-1]-d[0])*1e-8,C=(v[v.length-1]-v[0])*1e-8;GJt(b,x,C);var M=b;_.type==="constraint"&&(M=HJt(b,k)),ZJt(b,T);var g,P,A,z,O=[];for(z=h.clipsegments.length-1;z>=0;z--)g=h.clipsegments[z],P=a9([],g.x,a.c2p),A=a9([],g.y,o.c2p),P.reverse(),A.reverse(),O.push(VKe(P,A,g.bicubic));var U="M"+O.join("L")+"Z";JJt(l,h.clipsegments,a,o,p,E),$Jt(c,l,a,o,M,L,T,f,h,E,U),YJt(l,b,t,u,_,r,f),pC.setClipUrl(l,f._clipPathId,t)})};function ZJt(e,t){var r,n,i,a,o,s,l,u,c;for(r=0;rb&&(n.max=b),n.len=n.max-n.min}function BKe(e,t,r){var n=e.getPointAtLength(t),i=e.getPointAtLength(r),a=i.x-n.x,o=i.y-n.y,s=Math.sqrt(a*a+o*o);return[a/s,o/s]}function NKe(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]);return[e[0]/t,e[1]/t]}function UKe(e,t){var r=Math.abs(e[0]*t[0]+e[1]*t[1]),n=Math.sqrt(1-r*r);return n/r}function JJt(e,t,r,n,i,a){var o,s,l,u,c=A1.ensureSingle(e,"g","contourbg"),f=c.selectAll("path").data(a==="fill"&&!i?[0]:[]);f.enter().append("path"),f.exit().remove();var h=[];for(u=0;u=0&&(d=P,_=b):Math.abs(h[1]-d[1])=0&&(d=P,_=b):A1.log("endpt to newendpt is not vert. or horz.",h,d,P)}if(_>=0)break;u+=M(h,d),h=d}if(_===t.edgepaths.length){A1.log("unclosed perimeter path");break}l=_,f=c.indexOf(l)===-1,f&&(l=c[0],u+=M(h,d)+"Z",h=null)}for(l=0;l{"use strict";jKe.exports={attributes:O$(),supplyDefaults:q$(),colorbar:F8(),calc:FKe(),plot:HKe(),style:D8(),moduleType:"trace",name:"contourcarpet",basePlotModule:mh(),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}});var ZKe=ye((Mwr,XKe)=>{"use strict";XKe.exports=WKe()});var s9=ye((Ewr,QKe)=>{"use strict";var o9=Dr().extendFlat,gC=pf(),YKe=df().axisHoverFormat,{hovertemplateAttrs:e$t,templatefallbackAttrs:t$t}=Ll(),JKe=Pd().dash,r$t=v3(),$Ke=JT(),i$t=$Ke.INCREASING.COLOR,n$t=$Ke.DECREASING.COLOR,B$=gC.line;function KKe(e){return{line:{color:o9({},B$.color,{dflt:e}),width:B$.width,dash:JKe,editType:"style"},editType:"style"}}QKe.exports={xperiod:gC.xperiod,xperiod0:gC.xperiod0,xperiodalignment:gC.xperiodalignment,xhoverformat:YKe("x"),yhoverformat:YKe("y"),x:{valType:"data_array",editType:"calc+clearAxisTypes"},open:{valType:"data_array",editType:"calc"},high:{valType:"data_array",editType:"calc"},low:{valType:"data_array",editType:"calc"},close:{valType:"data_array",editType:"calc"},line:{width:o9({},B$.width,{}),dash:o9({},JKe,{}),editType:"style"},increasing:KKe(i$t),decreasing:KKe(n$t),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:e$t({},{keys:["open","high","low","close"]}),hovertemplatefallback:t$t(),tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:o9({},r$t.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:gC.zorder}});var N$=ye((kwr,eJe)=>{"use strict";var a$t=qa(),o$t=Dr();eJe.exports=function(t,r,n,i){var a=n("x"),o=n("open"),s=n("high"),l=n("low"),u=n("close");n("hoverlabel.split");var c=a$t.getComponentMethod("calendars","handleTraceDefaults");if(c(t,r,["x"],i),!!(o&&s&&l&&u)){var f=Math.min(o.length,s.length,l.length,u.length);return a&&(f=Math.min(f,o$t.minRowLength(a))),r._length=f,f}}});var iJe=ye((Cwr,rJe)=>{"use strict";var s$t=Dr(),l$t=N$(),u$t=Dg(),c$t=s9();rJe.exports=function(t,r,n,i){function a(s,l){return s$t.coerce(t,r,c$t,s,l)}var o=l$t(t,r,a,i);if(!o){r.visible=!1;return}u$t(t,r,i,a,{x:!0}),a("xhoverformat"),a("yhoverformat"),a("line.width"),a("line.dash"),tJe(t,r,a,"increasing"),tJe(t,r,a,"decreasing"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("tickwidth"),i._requestRangeslider[r.xaxis]=!0,a("zorder")};function tJe(e,t,r,n){r(n+".line.color"),r(n+".line.width",t.line.width),r(n+".line.dash",t.line.dash)}});var U$=ye((Lwr,aJe)=>{"use strict";var X5=Dr(),l9=X5._,u9=ho(),f$t=zg(),mC=fs().BADNUM;function h$t(e,t){var r=u9.getFromId(e,t.xaxis),n=u9.getFromId(e,t.yaxis),i=v$t(e,r,t),a=t._minDiff;t._minDiff=null;var o=t._origX;t._origX=null;var s=t._xcalc;t._xcalc=null;var l=nJe(e,t,o,s,n,d$t);return t._extremes[r._id]=u9.findExtremes(r,s,{vpad:a/2}),l.length?(X5.extendFlat(l[0].t,{wHover:a/2,tickLen:i}),l):[{t:{empty:!0}}]}function d$t(e,t,r,n){return{o:e,h:t,l:r,c:n}}function nJe(e,t,r,n,i,a){for(var o=i.makeCalcdata(t,"open"),s=i.makeCalcdata(t,"high"),l=i.makeCalcdata(t,"low"),u=i.makeCalcdata(t,"close"),c=X5.isArrayOrTypedArray(t.text),f=X5.isArrayOrTypedArray(t.hovertext),h=!0,d=null,v=!!t.xperiodalignment,_=[],b=0;bd):h=L>k,d=L;var x=a(k,E,T,L);x.pos=p,x.yc=(k+L)/2,x.i=b,x.dir=h?"increasing":"decreasing",x.x=x.pos,x.y=[T,E],v&&(x.orig_p=r[b]),c&&(x.tx=t.text[b]),f&&(x.htx=t.hovertext[b]),_.push(x)}else _.push({pos:p,empty:!0})}return t._extremes[i._id]=u9.findExtremes(i,X5.concat(l,s),{padded:!0}),_.length&&(_[0].t={labels:{open:l9(e,"open:")+" ",high:l9(e,"high:")+" ",low:l9(e,"low:")+" ",close:l9(e,"close:")+" "}}),_}function v$t(e,t,r){var n=r._minDiff;if(!n){var i=e._fullData,a=[];n=1/0;var o;for(o=0;o{"use strict";var p$t=Oa(),oJe=Dr();sJe.exports=function(t,r,n,i){var a=r.yaxis,o=r.xaxis,s=!!o.rangebreaks;oJe.makeTraceGroups(i,n,"trace ohlc").each(function(l){var u=p$t.select(this),c=l[0],f=c.t,h=c.trace;if(h.visible!==!0||f.empty){u.remove();return}var d=f.tickLen,v=u.selectAll("path").data(oJe.identity);v.enter().append("path"),v.exit().remove(),v.attr("d",function(_){if(_.empty)return"M0,0Z";var b=o.c2p(_.pos-d,!0),p=o.c2p(_.pos+d,!0),k=s?(b+p)/2:o.c2p(_.pos,!0),E=a.c2p(_.o,!0),T=a.c2p(_.h,!0),L=a.c2p(_.l,!0),x=a.c2p(_.c,!0);return"M"+b+","+E+"H"+k+"M"+k+","+T+"V"+L+"M"+p+","+x+"H"+k})})}});var cJe=ye((Iwr,uJe)=>{"use strict";var V$=Oa(),g$t=So(),m$t=ka();uJe.exports=function(t,r,n){var i=n||V$.select(t).selectAll("g.ohlclayer").selectAll("g.trace");i.style("opacity",function(a){return a[0].trace.opacity}),i.each(function(a){var o=a[0].trace;V$.select(this).selectAll("path").each(function(s){if(!s.empty){var l=o[s.dir].line;V$.select(this).style("fill","none").call(m$t.stroke,l.color).call(g$t.dashLine,l.dash,l.width).style("opacity",o.selectedpoints&&!s.selected?.3:1)}})})}});var H$=ye((Rwr,pJe)=>{"use strict";var G$=ho(),y$t=Dr(),c9=vf(),_$t=ka(),x$t=Dr().fillText,fJe=JT(),b$t={increasing:fJe.INCREASING.SYMBOL,decreasing:fJe.DECREASING.SYMBOL};function w$t(e,t,r,n){var i=e.cd,a=i[0].trace;return a.hoverlabel.split?dJe(e,t,r,n):vJe(e,t,r,n)}function hJe(e,t,r,n){var i=e.cd,a=e.xa,o=i[0].trace,s=i[0].t,l=o.type,u=l==="ohlc"?"l":"min",c=l==="ohlc"?"h":"max",f,h,d=s.bPos||0,v=function(P){return P.pos+d-t},_=s.bdPos||s.tickLen,b=s.wHover,p=Math.min(1,_/Math.abs(a.r2c(a.range[1])-a.r2c(a.range[0])));f=e.maxHoverDistance-p,h=e.maxSpikeDistance-p;function k(P){var A=v(P);return c9.inbox(A-b,A+b,f)}function E(P){var A=P[u],z=P[c];return A===z||c9.inbox(A-r,z-r,f)}function T(P){return(k(P)+E(P))/2}var L=c9.getDistanceFunction(n,k,E,T);if(c9.getClosest(i,L,e),e.index===!1)return null;var x=i[e.index];if(x.empty)return null;var C=x.dir,M=o[C],g=M.line.color;return _$t.opacity(g)&&M.line.width?e.color=g:e.color=M.fillcolor,e.x0=a.c2p(x.pos+d-_,!0),e.x1=a.c2p(x.pos+d+_,!0),e.xLabelVal=x.orig_p!==void 0?x.orig_p:x.pos,e.spikeDistance=T(x)*h/f,e.xSpike=a.c2p(x.pos,!0),e}function dJe(e,t,r,n){var i=e.cd,a=e.ya,o=i[0].trace,s=i[0].t,l=[],u=hJe(e,t,r,n);if(!u)return[];var c=i[u.index],f=c.hi||o.hoverinfo||"";if(f==="none"||f==="skip")return[];for(var h=["high","open","close","low"],d={},v=0;v"+s.labels[_]+G$.hoverLabelText(a,b,o.yhoverformat)):(k=y$t.extendFlat({},u),k.y0=k.y1=p,k.yLabelVal=b,k.yLabel=s.labels[_]+G$.hoverLabelText(a,b,o.yhoverformat),k.name="",l.push(k),d[b]=k)}return l}function vJe(e,t,r,n){var i=e.cd,a=e.ya,o=i[0].trace,s=i[0].t,l=hJe(e,t,r,n);if(!l)return[];var u=l.index,c=i[u],f=l.index=c.i,h=c.dir;function d(T){return s.labels[T]+G$.hoverLabelText(a,o[T][f],o.yhoverformat)}var v=c.hi||o.hoverinfo||"",_=v.split("+"),b=v==="all",p=b||_.indexOf("y")!==-1,k=b||_.indexOf("text")!==-1,E=p?[d("open"),d("high"),d("low"),d("close")+" "+b$t[h]]:[];return k&&x$t(c,o,E),l.extraText=E.join("
"),l.y0=l.y1=a.c2p(c.yc,!0),[l]}pJe.exports={hoverPoints:w$t,hoverSplit:dJe,hoverOnPoints:vJe}});var j$=ye((Dwr,gJe)=>{"use strict";gJe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s,l=n[0].t.bPos||0;if(r===!1)for(s=0;s{"use strict";mJe.exports={moduleType:"trace",name:"ohlc",basePlotModule:mh(),categories:["cartesian","svg","showLegend"],meta:{},attributes:s9(),supplyDefaults:iJe(),calc:U$().calc,plot:lJe(),style:cJe(),hoverPoints:H$().hoverPoints,selectPoints:j$()}});var xJe=ye((zwr,_Je)=>{"use strict";_Je.exports=yJe()});var X$=ye((Owr,TJe)=>{"use strict";var W$=Dr().extendFlat,bJe=df().axisHoverFormat,vp=s9(),Z5=k4();function wJe(e){return{line:{color:W$({},Z5.line.color,{dflt:e}),width:Z5.line.width,editType:"style"},fillcolor:Z5.fillcolor,editType:"style"}}TJe.exports={xperiod:vp.xperiod,xperiod0:vp.xperiod0,xperiodalignment:vp.xperiodalignment,xhoverformat:bJe("x"),yhoverformat:bJe("y"),x:vp.x,open:vp.open,high:vp.high,low:vp.low,close:vp.close,line:{width:W$({},Z5.line.width,{}),editType:"style"},increasing:wJe(vp.increasing.line.color.dflt),decreasing:wJe(vp.decreasing.line.color.dflt),text:vp.text,hovertext:vp.hovertext,hovertemplate:vp.hovertemplate,hovertemplatefallback:vp.hovertemplatefallback,whiskerwidth:W$({},Z5.whiskerwidth,{dflt:0}),hoverlabel:vp.hoverlabel,zorder:Z5.zorder}});var MJe=ye((qwr,SJe)=>{"use strict";var T$t=Dr(),A$t=ka(),S$t=N$(),M$t=Dg(),E$t=X$();SJe.exports=function(t,r,n,i){function a(s,l){return T$t.coerce(t,r,E$t,s,l)}var o=S$t(t,r,a,i);if(!o){r.visible=!1;return}M$t(t,r,i,a,{x:!0}),a("xhoverformat"),a("yhoverformat"),a("line.width"),AJe(t,r,a,"increasing"),AJe(t,r,a,"decreasing"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("whiskerwidth"),i._requestRangeslider[r.xaxis]=!0,a("zorder")};function AJe(e,t,r,n){var i=r(n+".line.color");r(n+".line.width",t.line.width),r(n+".fillcolor",A$t.addOpacity(i,.5))}});var LJe=ye((Bwr,CJe)=>{"use strict";var EJe=Dr(),kJe=ho(),k$t=zg(),C$t=U$().calcCommon;CJe.exports=function(e,t){var r=e._fullLayout,n=kJe.getFromId(e,t.xaxis),i=kJe.getFromId(e,t.yaxis),a=n.makeCalcdata(t,"x"),o=k$t(t,n,"x",a).vals,s=C$t(e,t,a,o,i,L$t);return s.length?(EJe.extendFlat(s[0].t,{num:r._numBoxes,dPos:EJe.distinctVals(o).minDiff/2,posLetter:"x",valLetter:"y"}),r._numBoxes++,s):[{t:{empty:!0}}]};function L$t(e,t,r,n){return{min:r,q1:Math.min(e,n),med:n,q3:Math.max(e,n),max:t}}});var IJe=ye((Nwr,PJe)=>{"use strict";PJe.exports={moduleType:"trace",name:"candlestick",basePlotModule:mh(),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:X$(),layoutAttributes:C4(),supplyLayoutDefaults:$I().supplyLayoutDefaults,crossTraceCalc:e8().crossTraceCalc,supplyDefaults:MJe(),calc:LJe(),plot:t8().plot,layerName:"boxlayer",style:r8().style,hoverPoints:H$().hoverPoints,selectPoints:j$()}});var DJe=ye((Uwr,RJe)=>{"use strict";RJe.exports=IJe()});var Y$=ye((Vwr,FJe)=>{"use strict";var h9=Dr(),P$t=xm(),f9=h9.deg2rad,Z$=h9.rad2deg;FJe.exports=function(t,r,n){switch(P$t(t,n),t._id){case"x":case"radialaxis":I$t(t,r);break;case"angularaxis":F$t(t,r);break}};function I$t(e,t){var r=t._subplot;e.setGeometry=function(){var n=e._rl[0],i=e._rl[1],a=r.innerRadius,o=(r.radius-a)/(i-n),s=a/o,l=n>i?function(u){return u<=0}:function(u){return u>=0};e.c2g=function(u){var c=e.c2l(u)-n;return(l(c)?c:0)+s},e.g2c=function(u){return e.l2c(u+n-s)},e.g2p=function(u){return u*o},e.c2p=function(u){return e.g2p(e.c2g(u))}}}function R$t(e,t){return t==="degrees"?f9(e):e}function D$t(e,t){return t==="degrees"?Z$(e):e}function F$t(e,t){var r=e.type;if(r==="linear"){var n=e.d2c,i=e.c2d;e.d2c=function(a,o){return R$t(n(a),o)},e.c2d=function(a,o){return i(D$t(a,o))}}e.makeCalcdata=function(a,o){var s=a[o],l=a._length,u,c,f=function(b){return e.d2c(b,a.thetaunit)};if(s)for(u=new Array(l),c=0;c{"use strict";zJe.exports={attr:"subplot",name:"polar",axisNames:["angularaxis","radialaxis"],axisName2dataArray:{angularaxis:"theta",radialaxis:"r"},layerNames:["draglayer","plotbg","backplot","angular-grid","radial-grid","frontplot","angular-line","radial-line","angular-axis","radial-axis"],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG:8,MINZOOM:20,OFFEDGE:20}});var p9=ye((Hwr,UJe)=>{"use strict";var Aw=Dr(),OJe=FM().tester,K$=Aw.findIndexOfMin,BJe=Aw.isAngleInsideSector,z$t=Aw.angleDelta,qJe=Aw.angleDist;function O$t(e,t,r,n,i){if(!BJe(t,n))return!1;var a,o;r[0]0?o:1/0},n=K$(t,r),i=Aw.mod(n+1,t.length);return[t[n],t[i]]}function v9(e){return Math.abs(e)>1e-10?e:0}function J$(e,t,r){t=t||0,r=r||0;for(var n=e.length,i=new Array(n),a=0;a{"use strict";function VJe(e){return e<0?-1:e>0?1:0}function K5(e){var t=e[0],r=e[1];if(!isFinite(t)||!isFinite(r))return[1,0];var n=(t+1)*(t+1)+r*r;return[(t*t+r*r-1)/n,2*r/n]}function J5(e,t){var r=t[0],n=t[1];return[r*e.radius+e.cx,-n*e.radius+e.cy]}function GJe(e,t){return t*e.radius}function j$t(e,t,r,n){var i=J5(e,K5([r,t])),a=i[0],o=i[1],s=J5(e,K5([n,t])),l=s[0],u=s[1];if(t===0)return["M"+a+","+o,"L"+l+","+u].join(" ");var c=GJe(e,1/Math.abs(t));return["M"+a+","+o,"A"+c+","+c+" 0 0,"+(t<0?1:0)+" "+l+","+u].join(" ")}function W$t(e,t,r,n){var i=GJe(e,1/(t+1)),a=J5(e,K5([t,r])),o=a[0],s=a[1],l=J5(e,K5([t,n])),u=l[0],c=l[1];if(VJe(r)!==VJe(n)){var f=J5(e,K5([t,0])),h=f[0],d=f[1];return["M"+o+","+s,"A"+i+","+i+" 0 0,"+(0{"use strict";var Sw=Oa(),X$t=fd(),Ew=qa(),Xc=Dr(),uy=Xc.strRotate,xd=Xc.strTranslate,Q$=ka(),yC=So(),Z$t=Mc(),pp=ho(),Y$t=xm(),K$t=Y$(),J$t=Mg().doAutoRange,S1=jN(),y9=yv(),jJe=vf(),$$t=zb(),Q$t=Of().prepSelect,eQt=Of().selectOnClick,eQ=Of().clearOutline,WJe=Eg(),XJe=bM(),ZJe=CM().redrawReglTraces,tQt=Dh().MID_SHIFT,Bx=d9(),M1=p9(),_9=$$(),g9=_9.smith,rQt=_9.reactanceArc,iQt=_9.resistanceArc,m9=_9.smithTransform,nQt=Xc._,YJe=Xc.mod,Nx=Xc.deg2rad,Mw=Xc.rad2deg;function KJe(e,t,r){this.isSmith=r||!1,this.id=t,this.gd=e,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var n=e._fullLayout,i="clip"+n._uid+t;this.clipIds.forTraces=i+"-for-traces",this.clipPaths.forTraces=n._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=n["_"+(r?"smith":"polar")+"layer"].append("g").attr("class",t),this.getHole=function(a){return this.isSmith?0:a.hole},this.getSector=function(a){return this.isSmith?[0,360]:a.sector},this.getRadial=function(a){return this.isSmith?a.realaxis:a.radialaxis},this.getAngular=function(a){return this.isSmith?a.imaginaryaxis:a.angularaxis},r||(this.radialTickLayout=null,this.angularTickLayout=null)}var Bd=KJe.prototype;QJe.exports=function(t,r,n){return new KJe(t,r,n)};Bd.plot=function(e,t){for(var r=this,n=t[r.id],i=!1,a=0;ab?(p=u,k=u*b,L=(c-k)/i.h/2,E=[s[0],s[1]],T=[l[0]+L,l[1]-L]):(p=c/b,k=c,L=(u-p)/i.w/2,E=[s[0]+L,s[1]-L],T=[l[0],l[1]]),r.xLength2=p,r.yLength2=k,r.xDomain2=E,r.yDomain2=T;var x=r.xOffset2=i.l+i.w*E[0],C=r.yOffset2=i.t+i.h*(1-T[1]),M=r.radius=p/d,g=r.innerRadius=r.getHole(t)*M,P=r.cx=x-M*h[0],A=r.cy=C+M*h[3],z=r.cxx=P-x,O=r.cyy=A-C,U=a.side,G;U==="counterclockwise"?(G=U,U="top"):U==="clockwise"&&(G=U,U="bottom"),r.radialAxis=r.mockAxis(e,t,a,{_id:"x",side:U,_trueSide:G,domain:[g/i.w,M/i.w]}),r.angularAxis=r.mockAxis(e,t,o,{side:"right",domain:[0,Math.PI],autorange:!1}),r.doAutoRange(e,t),r.updateAngularAxis(e,t),r.updateRadialAxis(e,t),r.updateRadialAxisTitle(e,t),r.xaxis=r.mockCartesianAxis(e,t,{_id:"x",domain:E}),r.yaxis=r.mockCartesianAxis(e,t,{_id:"y",domain:T});var Z=r.pathSubplot();r.clipPaths.forTraces.select("path").attr("d",Z).attr("transform",xd(z,O)),n.frontplot.attr("transform",xd(x,C)).call(yC.setClipUrl,r._hasClipOnAxisFalse?null:r.clipIds.forTraces,r.gd),n.bg.attr("d",Z).attr("transform",xd(P,A)).call(Q$.fill,t.bgcolor)};Bd.mockAxis=function(e,t,r,n){var i=Xc.extendFlat({},r,n);return K$t(i,t,e),i};Bd.mockCartesianAxis=function(e,t,r){var n=this,i=n.isSmith,a=r._id,o=Xc.extendFlat({type:"linear"},r);Y$t(o,e);var s={x:[0,2],y:[1,3]};return o.setRange=function(){var l=n.sectorBBox,u=s[a],c=n.radialAxis._rl,f=(c[1]-c[0])/(1-n.getHole(t));o.range=[l[u[0]]*f,l[u[1]]*f]},o.isPtWithinRange=a==="x"&&!i?function(l){return n.isPtInside(l)}:function(){return!0},o.setRange(),o.setScale(),o};Bd.doAutoRange=function(e,t){var r=this,n=r.gd,i=r.radialAxis,a=r.getRadial(t);J$t(n,i);var o=i.range;if(a.range=o.slice(),a._input.range=o.slice(),i._rl=[i.r2l(o[0],null,"gregorian"),i.r2l(o[1],null,"gregorian")],i.minallowed!==void 0){var s=i.r2l(i.minallowed);i._rl[0]>i._rl[1]?i._rl[1]=Math.max(i._rl[1],s):i._rl[0]=Math.max(i._rl[0],s)}if(i.maxallowed!==void 0){var l=i.r2l(i.maxallowed);i._rl[0]90&&c<=270&&(f.tickangle=180);var v=d?function(M){var g=m9(r,g9([M.x,0]));return xd(g[0]-s,g[1]-l)}:function(M){return xd(f.l2p(M.x)+o,0)},_=d?function(M){return iQt(r,M.x,-1/0,1/0)}:function(M){return r.pathArc(f.r2p(M.x)+o)},b=JJe(u);if(r.radialTickLayout!==b&&(i["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=b),h){f.setScale();var p=0,k=d?(f.tickvals||[]).filter(function(M){return M>=0}).map(function(M){return pp.tickText(f,M,!0,!1)}):pp.calcTicks(f),E=d?k:pp.clipEnds(f,k),T=pp.getTickSigns(f)[2];d&&((f.ticks==="top"&&f.side==="bottom"||f.ticks==="bottom"&&f.side==="top")&&(T=-T),f.ticks==="top"&&f.side==="top"&&(p=-f.ticklen),f.ticks==="bottom"&&f.side==="bottom"&&(p=f.ticklen)),pp.drawTicks(n,f,{vals:k,layer:i["radial-axis"],path:pp.makeTickPath(f,0,T),transFn:v,crisp:!1}),pp.drawGrid(n,f,{vals:E,layer:i["radial-grid"],path:_,transFn:Xc.noop,crisp:!1}),pp.drawLabels(n,f,{vals:k,layer:i["radial-axis"],transFn:v,labelFns:pp.makeLabelFns(f,p)})}var L=r.radialAxisAngle=r.vangles?Mw($Je(Nx(u.angle),r.vangles)):u.angle,x=xd(s,l),C=x+uy(-L);_C(i["radial-axis"],h&&(u.showticklabels||u.ticks),{transform:C}),_C(i["radial-grid"],h&&u.showgrid,{transform:d?"":x}),_C(i["radial-line"].select("line"),h&&u.showline,{x1:d?-a:o,y1:0,x2:a,y2:0,transform:C}).attr("stroke-width",u.linewidth).call(Q$.stroke,u.linecolor)};Bd.updateRadialAxisTitle=function(e,t,r){if(!this.isSmith){var n=this,i=n.gd,a=n.radius,o=n.cx,s=n.cy,l=n.getRadial(t),u=n.id+"title",c=0;if(l.title){var f=yC.bBox(n.layers["radial-axis"].node()).height,h=l.title.font.size,d=l.side;c=d==="top"?h:d==="counterclockwise"?-(f+h*.4):f+h*.8}var v=r!==void 0?r:n.radialAxisAngle,_=Nx(v),b=Math.cos(_),p=Math.sin(_),k=o+a/2*b+c*p,E=s-a/2*p+c*b;n.layers["radial-axis-title"]=$$t.draw(i,u,{propContainer:l,propName:n.id+".radialaxis.title.text",placeholder:nQt(i,"Click to enter radial axis title"),attributes:{x:k,y:E,"text-anchor":"middle"},transform:{rotate:-v}})}};Bd.updateAngularAxis=function(e,t){var r=this,n=r.gd,i=r.layers,a=r.radius,o=r.innerRadius,s=r.cx,l=r.cy,u=r.getAngular(t),c=r.angularAxis,f=r.isSmith;f||(r.fillViewInitialKey("angularaxis.rotation",u.rotation),c.setGeometry(),c.setScale());var h=f?function(g){var P=m9(r,g9([0,g.x]));return Math.atan2(P[0]-s,P[1]-l)-Math.PI/2}:function(g){return c.t2g(g.x)};c.type==="linear"&&c.thetaunit==="radians"&&(c.tick0=Mw(c.tick0),c.dtick=Mw(c.dtick));var d=function(g){return xd(s+a*Math.cos(g),l-a*Math.sin(g))},v=f?function(g){var P=m9(r,g9([0,g.x]));return xd(P[0],P[1])}:function(g){return d(h(g))},_=f?function(g){var P=m9(r,g9([0,g.x])),A=Math.atan2(P[0]-s,P[1]-l)-Math.PI/2;return xd(P[0],P[1])+uy(-Mw(A))}:function(g){var P=h(g);return d(P)+uy(-Mw(P))},b=f?function(g){return rQt(r,g.x,0,1/0)}:function(g){var P=h(g),A=Math.cos(P),z=Math.sin(P);return"M"+[s+o*A,l-o*z]+"L"+[s+a*A,l-a*z]},p=pp.makeLabelFns(c,0),k=p.labelStandoff,E={};E.xFn=function(g){var P=h(g);return Math.cos(P)*k},E.yFn=function(g){var P=h(g),A=Math.sin(P)>0?.2:1;return-Math.sin(P)*(k+g.fontSize*A)+Math.abs(Math.cos(P))*(g.fontSize*tQt)},E.anchorFn=function(g){var P=h(g),A=Math.cos(P);return Math.abs(A)<.1?"middle":A>0?"start":"end"},E.heightFn=function(g,P,A){var z=h(g);return-.5*(1+Math.sin(z))*A};var T=JJe(u);r.angularTickLayout!==T&&(i["angular-axis"].selectAll("."+c._id+"tick").remove(),r.angularTickLayout=T);var L=f?[1/0].concat(c.tickvals||[]).map(function(g){return pp.tickText(c,g,!0,!1)}):pp.calcTicks(c);f&&(L[0].text="\u221E",L[0].fontSize*=1.75);var x;if(t.gridshape==="linear"?(x=L.map(h),Xc.angleDelta(x[0],x[1])<0&&(x=x.slice().reverse())):x=null,r.vangles=x,c.type==="category"&&(L=L.filter(function(g){return Xc.isAngleInsideSector(h(g),r.sectorInRad)})),c.visible){var C=c.ticks==="inside"?-1:1,M=(c.linewidth||1)/2;pp.drawTicks(n,c,{vals:L,layer:i["angular-axis"],path:"M"+C*M+",0h"+C*c.ticklen,transFn:_,crisp:!1}),pp.drawGrid(n,c,{vals:L,layer:i["angular-grid"],path:b,transFn:Xc.noop,crisp:!1}),pp.drawLabels(n,c,{vals:L,layer:i["angular-axis"],repositionOnUpdate:!0,transFn:v,labelFns:E})}_C(i["angular-line"].select("path"),u.showline,{d:r.pathSubplot(),transform:xd(s,l)}).attr("stroke-width",u.linewidth).call(Q$.stroke,u.linecolor)};Bd.updateFx=function(e,t){if(!this.gd._context.staticPlot){var r=!this.isSmith;r&&(this.updateAngularDrag(e),this.updateRadialDrag(e,t,0),this.updateRadialDrag(e,t,1)),this.updateHoverAndMainDrag(e)}};Bd.updateHoverAndMainDrag=function(e){var t=this,r=t.isSmith,n=t.gd,i=t.layers,a=e._zoomlayer,o=Bx.MINZOOM,s=Bx.OFFEDGE,l=t.radius,u=t.innerRadius,c=t.cx,f=t.cy,h=t.cxx,d=t.cyy,v=t.sectorInRad,_=t.vangles,b=t.radialAxis,p=M1.clampTiny,k=M1.findXYatLength,E=M1.findEnclosingVertexAngles,T=Bx.cornerHalfWidth,L=Bx.cornerLen/2,x,C,M=S1.makeDragger(i,"path","maindrag",e.dragmode===!1?"none":"crosshair");Sw.select(M).attr("d",t.pathSubplot()).attr("transform",xd(c,f)),M.onmousemove=function(ce){jJe.hover(n,ce,t.id),n._fullLayout._lasthover=M,n._fullLayout._hoversubplot=t.id},M.onmouseout=function(ce){n._dragging||y9.unhover(n,ce)};var g={element:M,gd:n,subplot:t.id,plotinfo:{id:t.id,xaxis:t.xaxis,yaxis:t.yaxis},xaxes:[t.xaxis],yaxes:[t.yaxis]},P,A,z,O,U,G,Z,j,N;function H(ce,je){return Math.sqrt(ce*ce+je*je)}function re(ce,je){return H(ce-h,je-d)}function oe(ce,je){return Math.atan2(d-je,ce-h)}function _e(ce,je){return[ce*Math.cos(je),ce*Math.sin(-je)]}function Ce(ce,je){if(ce===0)return t.pathSector(2*T);var lt=L/ce,pt=je-lt,Vt=je+lt,ot=Math.max(0,Math.min(ce,l)),ut=ot-T,Wt=ot+T;return"M"+_e(ut,pt)+"A"+[ut,ut]+" 0,0,0 "+_e(ut,Vt)+"L"+_e(Wt,Vt)+"A"+[Wt,Wt]+" 0,0,1 "+_e(Wt,pt)+"Z"}function Le(ce,je,lt){if(ce===0)return t.pathSector(2*T);var pt=_e(ce,je),Vt=_e(ce,lt),ot=p((pt[0]+Vt[0])/2),ut=p((pt[1]+Vt[1])/2),Wt,Nt;if(ot&&ut){var $t=ut/ot,sr=-1/$t,Tr=k(T,$t,ot,ut);Wt=k(L,sr,Tr[0][0],Tr[0][1]),Nt=k(L,sr,Tr[1][0],Tr[1][1])}else{var fr,$e;ut?(fr=L,$e=T):(fr=T,$e=L),Wt=[[ot-fr,ut-$e],[ot+fr,ut-$e]],Nt=[[ot-fr,ut+$e],[ot+fr,ut+$e]]}return"M"+Wt.join("L")+"L"+Nt.reverse().join("L")+"Z"}function ge(){z=null,O=null,U=t.pathSubplot(),G=!1;var ce=n._fullLayout[t.id];Z=X$t(ce.bgcolor).getLuminance(),j=S1.makeZoombox(a,Z,c,f,U),j.attr("fill-rule","evenodd"),N=S1.makeCorners(a,c,f),eQ(n)}function ie(ce,je){return je=Math.max(Math.min(je,l),u),ceo?(ce-1&&ce===1&&eQt(je,n,[t.xaxis],[t.yaxis],t.id,g),lt.indexOf("event")>-1&&jJe.click(n,je,t.id)}g.prepFn=function(ce,je,lt){var pt=n._fullLayout.dragmode,Vt=M.getBoundingClientRect();n._fullLayout._calcInverseTransform(n);var ot=n._fullLayout._invTransform;x=n._fullLayout._invScaleX,C=n._fullLayout._invScaleY;var ut=Xc.apply3DTransform(ot)(je-Vt.left,lt-Vt.top);if(P=ut[0],A=ut[1],_){var Wt=M1.findPolygonOffset(l,v[0],v[1],_);P+=h+Wt[0],A+=d+Wt[1]}switch(pt){case"zoom":g.clickFn=De,r||(_?g.moveFn=Be:g.moveFn=Ee,g.doneFn=Pe,ge(ce,je,lt));break;case"select":case"lasso":Q$t(ce,je,lt,g,pt);break}},y9.init(g)};Bd.updateRadialDrag=function(e,t,r){var n=this,i=n.gd,a=n.layers,o=n.radius,s=n.innerRadius,l=n.cx,u=n.cy,c=n.radialAxis,f=Bx.radialDragBoxSize,h=f/2;if(!c.visible)return;var d=Nx(n.radialAxisAngle),v=c._rl,_=v[0],b=v[1],p=v[r],k=.75*(v[1]-v[0])/(1-n.getHole(t))/o,E,T,L;r?(E=l+(o+h)*Math.cos(d),T=u-(o+h)*Math.sin(d),L="radialdrag"):(E=l+(s-h)*Math.cos(d),T=u-(s-h)*Math.sin(d),L="radialdrag-inner");var x=S1.makeRectDragger(a,L,"crosshair",-h,-h,f,f),C={element:x,gd:i};e.dragmode===!1&&(C.dragmode=!1),_C(Sw.select(x),c.visible&&s0!=(r?P>_:P=90||i>90&&a>=450?d=1:s<=0&&u<=0?d=0:d=Math.max(s,u),i<=180&&a>=180||i>180&&a>=540?c=-1:o>=0&&l>=0?c=0:c=Math.min(o,l),i<=270&&a>=270||i>270&&a>=630?f=-1:s>=0&&u>=0?f=0:f=Math.min(s,u),a>=360?h=1:o<=0&&l<=0?h=0:h=Math.max(o,l),[c,f,h,d]}function $Je(e,t){var r=function(i){return Xc.angleDist(e,i)},n=Xc.findIndexOfMin(t,r);return t[n]}function _C(e,t,r){return t?(e.attr("display",null),e.attr(r)):e&&e.attr("display","none"),e}});var rQ=ye((Xwr,a$e)=>{"use strict";var oQt=Ih(),os=Rd(),sQt=Cc().attributes,f0=Dr().extendFlat,e$e=mc().overrideAll,t$e=e$e({color:os.color,showline:f0({},os.showline,{dflt:!0}),linecolor:os.linecolor,linewidth:os.linewidth,showgrid:f0({},os.showgrid,{dflt:!0}),gridcolor:os.gridcolor,gridwidth:os.gridwidth,griddash:os.griddash},"plot","from-root"),r$e=e$e({tickmode:os.minor.tickmode,nticks:os.nticks,tick0:os.tick0,dtick:os.dtick,tickvals:os.tickvals,ticktext:os.ticktext,ticks:os.ticks,ticklen:os.ticklen,tickwidth:os.tickwidth,tickcolor:os.tickcolor,ticklabelstep:os.ticklabelstep,showticklabels:os.showticklabels,labelalias:os.labelalias,minorloglabels:os.minorloglabels,showtickprefix:os.showtickprefix,tickprefix:os.tickprefix,showticksuffix:os.showticksuffix,ticksuffix:os.ticksuffix,showexponent:os.showexponent,exponentformat:os.exponentformat,minexponent:os.minexponent,separatethousands:os.separatethousands,tickfont:os.tickfont,tickangle:os.tickangle,tickformat:os.tickformat,tickformatstops:os.tickformatstops,layer:os.layer},"plot","from-root"),i$e={visible:f0({},os.visible,{dflt:!0}),type:f0({},os.type,{values:["-","linear","log","date","category"]}),autotypenumbers:os.autotypenumbers,autorangeoptions:{minallowed:os.autorangeoptions.minallowed,maxallowed:os.autorangeoptions.maxallowed,clipmin:os.autorangeoptions.clipmin,clipmax:os.autorangeoptions.clipmax,include:os.autorangeoptions.include,editType:"plot"},autorange:f0({},os.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:f0({},os.minallowed,{editType:"plot"}),maxallowed:f0({},os.maxallowed,{editType:"plot"}),range:f0({},os.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:os.categoryorder,categoryarray:os.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:os.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:f0({},os.title.text,{editType:"plot",dflt:""}),font:f0({},os.title.font,{editType:"plot"}),editType:"plot"},hoverformat:os.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};f0(i$e,t$e,r$e);var n$e={visible:f0({},os.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:os.autotypenumbers,categoryorder:os.categoryorder,categoryarray:os.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc"},period:{valType:"number",editType:"calc",min:0},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",editType:"calc"},hoverformat:os.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};f0(n$e,t$e,r$e);a$e.exports={domain:sQt({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],editType:"plot"},hole:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},bgcolor:{valType:"color",editType:"plot",dflt:oQt.background},radialaxis:i$e,angularaxis:n$e,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}});var u$e=ye((Zwr,l$e)=>{"use strict";var x9=Dr(),lQt=ka(),uQt=vl(),cQt=O_(),fQt=Id().getSubplotData,hQt=Lb(),dQt=F3(),vQt=s_(),pQt=l_(),gQt=cI(),mQt=u4(),yQt=TB(),_Qt=V3(),s$e=rQ(),xQt=Y$(),b9=d9(),o$e=b9.axisNames;function bQt(e,t,r,n){var i=r("bgcolor");n.bgColor=lQt.combine(i,n.paper_bgcolor);var a=r("sector");r("hole");var o=fQt(n.fullData,b9.name,n.id),s=n.layoutOut,l;function u(j,N){return r(l+"."+j,N)}for(var c=0;c{"use strict";var TQt=Id().getSubplotCalcData,AQt=Dr().counterRegex,SQt=tQ(),f$e=d9(),h$e=f$e.attr,kw=f$e.name,c$e=AQt(kw),d$e={};d$e[h$e]={valType:"subplotid",dflt:kw,editType:"calc"};function MQt(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[kw],i=0;i{"use strict";var{hovertemplateAttrs:kQt,texttemplateAttrs:CQt,templatefallbackAttrs:p$e}=Ll(),T9=Ao().extendFlat,LQt=Pg(),h0=pf(),PQt=Gl(),$5=h0.line;g$e.exports={mode:h0.mode,r:{valType:"data_array",editType:"calc+clearAxisTypes"},theta:{valType:"data_array",editType:"calc+clearAxisTypes"},r0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dr:{valType:"number",dflt:1,editType:"calc"},theta0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dtheta:{valType:"number",editType:"calc"},thetaunit:{valType:"enumerated",values:["radians","degrees","gradians"],dflt:"degrees",editType:"calc+clearAxisTypes"},text:h0.text,texttemplate:CQt({editType:"plot"},{keys:["r","theta","text"]}),texttemplatefallback:p$e({editType:"plot"}),hovertext:h0.hovertext,line:{color:$5.color,width:$5.width,dash:$5.dash,backoff:$5.backoff,shape:T9({},$5.shape,{values:["linear","spline"]}),smoothing:$5.smoothing,editType:"calc"},connectgaps:h0.connectgaps,marker:h0.marker,cliponaxis:T9({},h0.cliponaxis,{dflt:!1}),textposition:h0.textposition,textfont:h0.textfont,fill:T9({},h0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:LQt(),hoverinfo:T9({},PQt.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:h0.hoveron,hovertemplate:kQt(),hovertemplatefallback:p$e(),selected:h0.selected,unselected:h0.unselected}});var S9=ye((Jwr,_$e)=>{"use strict";var A9=Dr(),Q5=Ru(),IQt=$p(),RQt=D0(),m$e=sT(),DQt=F0(),FQt=Fg(),zQt=Lm().PTS_LINESONLY,OQt=xC();function qQt(e,t,r,n){function i(s,l){return A9.coerce(e,t,OQt,s,l)}var a=y$e(e,t,n,i);if(!a){t.visible=!1;return}i("thetaunit"),i("mode",a{"use strict";var BQt=Dr(),x$e=ho();b$e.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot,o,s;a?(o=a.radialAxis,s=a.angularAxis):(a=n[r.subplot],o=a.radialaxis,s=a.angularaxis);var l=o.c2l(t.r);i.rLabel=x$e.tickText(o,l,!0).text;var u=s.thetaunit==="degrees"?BQt.rad2deg(t.theta):t.theta;return i.thetaLabel=x$e.tickText(s,u,!0).text,i}});var A$e=ye((Qwr,T$e)=>{"use strict";var w$e=Eo(),NQt=fs().BADNUM,UQt=ho(),VQt=z0(),GQt=Rm(),HQt=O0(),jQt=q0().calcMarkerSize;T$e.exports=function(t,r){for(var n=t._fullLayout,i=r.subplot,a=n[i].radialaxis,o=n[i].angularaxis,s=a.makeCalcdata(r,"r"),l=o.makeCalcdata(r,"theta"),u=r._length,c=new Array(u),f=0;f{"use strict";var WQt=dT(),S$e=fs().BADNUM;M$e.exports=function(t,r,n){for(var i=r.layers.frontplot.select("g.scatterlayer"),a=r.xaxis,o=r.yaxis,s={xaxis:a,yaxis:o,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},l=r.radialAxis,u=r.angularAxis,c=0;c{"use strict";var XQt=mT();function ZQt(e,t,r,n){var i=XQt(e,t,r,n);if(!(!i||i[0].index===!1)){var a=i[0];if(a.index===void 0)return i;var o=e.subplot,s=a.cd[a.index],l=a.trace;if(o.isPtInside(s))return a.xLabelVal=void 0,a.yLabelVal=void 0,k$e(s,l,o,a),a.hovertemplate=l.hovertemplate,i}}function k$e(e,t,r,n){var i=r.radialAxis,a=r.angularAxis;i._hovertitle="r",a._hovertitle="\u03B8";var o={};o[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,o);n.rLabel=s.rLabel,n.thetaLabel=s.thetaLabel;var l=e.hi||t.hoverinfo,u=[];function c(h,d){u.push(h._hovertitle+": "+d)}if(!t.hovertemplate){var f=l.split("+");f.indexOf("all")!==-1&&(f=["r","theta","text"]),f.indexOf("r")!==-1&&c(i,n.rLabel),f.indexOf("theta")!==-1&&c(a,n.thetaLabel),f.indexOf("text")!==-1&&n.text&&(u.push(n.text),delete n.text),n.extraText=u.join("
")}}C$e.exports={hoverPoints:ZQt,makeHoverPointText:k$e}});var P$e=ye((r3r,L$e)=>{"use strict";L$e.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:w9(),categories:["polar","symbols","showLegend","scatter-like"],attributes:xC(),supplyDefaults:S9().supplyDefaults,colorbar:$d(),formatLabels:M9(),calc:A$e(),plot:E$e(),style:sp().style,styleOnSelect:sp().styleOnSelect,hoverPoints:E9().hoverPoints,selectPoints:yT(),meta:{}}});var R$e=ye((i3r,I$e)=>{"use strict";I$e.exports=P$e()});var iQ=ye((o3r,F$e)=>{"use strict";var D$e=xC(),{cliponaxis:n3r,hoveron:a3r}=D$e,YQt=gee(D$e,["cliponaxis","hoveron"]),{connectgaps:KQt,line:{color:JQt,dash:$Qt,width:QQt},fill:eer,fillcolor:ter,marker:rer,textfont:ier,textposition:ner}=gk();F$e.exports=j1(_g({},YQt),{connectgaps:KQt,fill:eer,fillcolor:ter,line:{color:JQt,dash:$Qt,editType:"calc",width:QQt},marker:rer,textfont:ier,textposition:ner})});var q$e=ye((l3r,O$e)=>{"use strict";var z$e=Dr(),nQ=Ru(),aer=S9().handleRThetaDefaults,oer=$p(),ser=D0(),ler=F0(),uer=Fg(),cer=Lm().PTS_LINESONLY,fer=iQ();O$e.exports=function(t,r,n,i){function a(s,l){return z$e.coerce(t,r,fer,s,l)}var o=aer(t,r,i,a);if(!o){r.visible=!1;return}a("thetaunit"),a("mode",o{"use strict";var her=M9();B$e.exports=function(t,r,n){var i=t.i;return"r"in t||(t.r=r._r[i]),"theta"in t||(t.theta=r._theta[i]),her(t,r,n)}});var V$e=ye((c3r,U$e)=>{"use strict";var der=z0(),ver=q0().calcMarkerSize,per=ow(),ger=ho(),mer=px().TOO_MANY_POINTS;U$e.exports=function(t,r){var n=t._fullLayout,i=r.subplot,a=n[i].radialaxis,o=n[i].angularaxis,s=r._r=a.makeCalcdata(r,"r"),l=r._theta=o.makeCalcdata(r,"theta"),u=r._length,c={};u{"use strict";var yer=jF(),_er=E9().makeHoverPointText;function xer(e,t,r,n){var i=e.cd,a=i[0].t,o=a.r,s=a.theta,l=yer.hoverPoints(e,t,r,n);if(!(!l||l[0].index===!1)){var u=l[0];if(u.index===void 0)return l;var c=e.subplot,f=u.cd[u.index],h=u.trace;if(f.r=o[u.index],f.theta=s[u.index],!!c.isPtInside(f))return u.xLabelVal=void 0,u.yLabelVal=void 0,_er(f,h,c,u),l}}G$e.exports={hoverPoints:xer}});var W$e=ye((h3r,j$e)=>{"use strict";j$e.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:w9(),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:iQ(),supplyDefaults:q$e(),colorbar:$d(),formatLabels:N$e(),calc:V$e(),hoverPoints:H$e().hoverPoints,selectPoints:gY(),meta:{}}});var X$e=ye((d3r,aQ)=>{"use strict";var ber=ZF(),wer=Eo(),Ter=xK(),Aer=dY(),k9=ow(),C9=Dr(),Ser=px().TOO_MANY_POINTS,Mer={};aQ.exports=function(t,r,n){if(n.length){var i=r.radialAxis,a=r.angularAxis,o=Aer(t,r);return n.forEach(function(s){if(!(!s||!s[0]||!s[0].trace)){var l=s[0],u=l.trace,c=l.t,f=u._length,h=c.r,d=c.theta,v=c.opts,_,b=h.slice(),p=d.slice();for(_=0;_=Ser&&(v.marker.cluster=c.tree),v.marker&&(v.markerSel.positions=v.markerUnsel.positions=v.marker.positions=k),v.line&&k.length>1&&C9.extendFlat(v.line,k9.linePositions(t,u,k)),v.text&&(C9.extendFlat(v.text,{positions:k},k9.textPosition(t,u,v.text,v.marker)),C9.extendFlat(v.textSel,{positions:k},k9.textPosition(t,u,v.text,v.markerSel)),C9.extendFlat(v.textUnsel,{positions:k},k9.textPosition(t,u,v.text,v.markerUnsel))),v.fill&&!o.fill2d&&(o.fill2d=!0),v.marker&&!o.scatter2d&&(o.scatter2d=!0),v.line&&!o.line2d&&(o.line2d=!0),v.text&&!o.glText&&(o.glText=!0),o.lineOptions.push(v.line),o.fillOptions.push(v.fill),o.markerOptions.push(v.marker),o.markerSelectedOptions.push(v.markerSel),o.markerUnselectedOptions.push(v.markerUnsel),o.textOptions.push(v.text),o.textSelectedOptions.push(v.textSel),o.textUnselectedOptions.push(v.textUnsel),o.selectBatch.push([]),o.unselectBatch.push([]),c.x=E,c.y=T,c.rawx=E,c.rawy=T,c.r=h,c.theta=d,c.positions=k,c._scene=o,c.index=o.count,o.count++}}),Ter(t,r,n)}};aQ.exports.reglPrecompiled=Mer});var K$e=ye((v3r,Y$e)=>{"use strict";var Z$e=W$e();Z$e.plot=X$e();Y$e.exports=Z$e});var $$e=ye((p3r,J$e)=>{"use strict";J$e.exports=K$e()});var oQ=ye((g3r,Q$e)=>{"use strict";var{hovertemplateAttrs:Eer,templatefallbackAttrs:ker}=Ll(),eS=Ao().extendFlat,Ux=xC(),Vx=zm();Q$e.exports={r:Ux.r,theta:Ux.theta,r0:Ux.r0,dr:Ux.dr,theta0:Ux.theta0,dtheta:Ux.dtheta,thetaunit:Ux.thetaunit,base:eS({},Vx.base,{}),offset:eS({},Vx.offset,{}),width:eS({},Vx.width,{}),text:eS({},Vx.text,{}),hovertext:eS({},Vx.hovertext,{}),marker:Cer(),hoverinfo:Ux.hoverinfo,hovertemplate:Eer(),hovertemplatefallback:ker(),selected:Vx.selected,unselected:Vx.unselected};function Cer(){var e=eS({},Vx.marker);return delete e.cornerradius,e}});var sQ=ye((m3r,eQe)=>{"use strict";eQe.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}});var iQe=ye((y3r,rQe)=>{"use strict";var tQe=Dr(),Ler=S9().handleRThetaDefaults,Per=WI(),Ier=oQ();rQe.exports=function(t,r,n,i){function a(s,l){return tQe.coerce(t,r,Ier,s,l)}var o=Ler(t,r,i,a);if(!o){r.visible=!1;return}a("thetaunit"),a("base"),a("offset"),a("width"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),Per(t,r,a,n,i),tQe.coerceSelectionMarkerOpacity(r,a)}});var aQe=ye((_3r,nQe)=>{"use strict";var Rer=Dr(),Der=sQ();nQe.exports=function(e,t,r){var n={},i;function a(l,u){return Rer.coerce(e[i]||{},t[i],Der,l,u)}for(var o=0;o{"use strict";var oQe=pv().hasColorscale,sQe=gv(),Fer=Dr().isArrayOrTypedArray,zer=A4(),Oer=t2().setGroupPositions,qer=O0(),Ber=qa().traceIs,Ner=Dr().extendFlat;function Uer(e,t){for(var r=e._fullLayout,n=t.subplot,i=r[n].radialaxis,a=r[n].angularaxis,o=i.makeCalcdata(t,"r"),s=a.makeCalcdata(t,"theta"),l=t._length,u=new Array(l),c=o,f=s,h=0;h{"use strict";var uQe=Oa(),L9=Eo(),tS=Dr(),Ger=So(),uQ=p9();cQe.exports=function(t,r,n){var i=t._context.staticPlot,a=r.xaxis,o=r.yaxis,s=r.radialAxis,l=r.angularAxis,u=Her(r),c=r.layers.frontplot.select("g.barlayer");tS.makeTraceGroups(c,n,"trace bars").each(function(){var f=uQe.select(this),h=tS.ensureSingle(f,"g","points"),d=h.selectAll("g.point").data(tS.identity);d.enter().append("g").style("vector-effect",i?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),d.exit().remove(),d.each(function(v){var _=uQe.select(this),b=v.rp0=s.c2p(v.s0),p=v.rp1=s.c2p(v.s1),k=v.thetag0=l.c2g(v.p0),E=v.thetag1=l.c2g(v.p1),T;if(!L9(b)||!L9(p)||!L9(k)||!L9(E)||b===p||k===E)T="M0,0Z";else{var L=s.c2g(v.s1),x=(k+E)/2;v.ct=[a.c2p(L*Math.cos(x)),o.c2p(L*Math.sin(x))],T=u(b,p,k,E)}tS.ensureSingle(_,"path").attr("d",T)}),Ger.setClipUrl(f,r._hasClipOnAxisFalse?r.clipIds.forTraces:null,t)})};function Her(e){var t=e.cxx,r=e.cyy;return e.vangles?function(n,i,a,o){var s,l;tS.angleDelta(a,o)>0?(s=a,l=o):(s=o,l=a);var u=uQ.findEnclosingVertexAngles(s,e.vangles)[0],c=uQ.findEnclosingVertexAngles(l,e.vangles)[1],f=[u,(s+l)/2,c];return uQ.pathPolygonAnnulus(n,i,s,l,f,t,r)}:function(n,i,a,o){return tS.pathAnnulus(n,i,a,o,t,r)}}});var dQe=ye((w3r,hQe)=>{"use strict";var jer=vf(),cQ=Dr(),Wer=PT().getTraceColor,Xer=cQ.fillText,Zer=E9().makeHoverPointText,Yer=p9().isPtInsidePolygon;hQe.exports=function(t,r,n){var i=t.cd,a=i[0].trace,o=t.subplot,s=o.radialAxis,l=o.angularAxis,u=o.vangles,c=u?Yer:cQ.isPtInsideSector,f=t.maxHoverDistance,h=l._period||2*Math.PI,d=Math.abs(s.g2p(Math.sqrt(r*r+n*n))),v=Math.atan2(n,r);s.range[0]>s.range[1]&&(v+=Math.PI);var _=function(E){return c(d,v,[E.rp0,E.rp1],[E.thetag0,E.thetag1],u)?f+Math.min(1,Math.abs(E.thetag1-E.thetag0)/h)-1+(E.rp1-d)/(E.rp1-E.rp0)-1:1/0};if(jer.getClosest(i,_,t),t.index!==!1){var b=t.index,p=i[b];t.x0=t.x1=p.ct[0],t.y0=t.y1=p.ct[1];var k=cQ.extendFlat({},p,{r:p.s,theta:p.p});return Xer(p,a,t),Zer(k,a,o,t),t.hovertemplate=a.hovertemplate,t.color=Wer(a,p),t.xLabelVal=t.yLabelVal=void 0,p.s<0&&(t.idealAlign="left"),[t]}}});var pQe=ye((T3r,vQe)=>{"use strict";vQe.exports={moduleType:"trace",name:"barpolar",basePlotModule:w9(),categories:["polar","bar","showLegend"],attributes:oQ(),layoutAttributes:sQ(),supplyDefaults:iQe(),supplyLayoutDefaults:aQe(),calc:lQ().calc,crossTraceCalc:lQ().crossTraceCalc,plot:fQe(),colorbar:$d(),formatLabels:M9(),style:V0().style,styleOnSelect:V0().styleOnSelect,hoverPoints:dQe(),selectPoints:IT(),meta:{}}});var mQe=ye((A3r,gQe)=>{"use strict";gQe.exports=pQe()});var fQ=ye((S3r,yQe)=>{"use strict";yQe.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}});var hQ=ye((M3r,wQe)=>{"use strict";var Ker=Ih(),Uf=Rd(),Jer=Cc().attributes,Gx=Dr().extendFlat,_Qe=mc().overrideAll,xQe=_Qe({color:Uf.color,showline:Gx({},Uf.showline,{dflt:!0}),linecolor:Uf.linecolor,linewidth:Uf.linewidth,showgrid:Gx({},Uf.showgrid,{dflt:!0}),gridcolor:Uf.gridcolor,gridwidth:Uf.gridwidth,griddash:Uf.griddash},"plot","from-root"),bQe=_Qe({ticklen:Uf.ticklen,tickwidth:Gx({},Uf.tickwidth,{dflt:2}),tickcolor:Uf.tickcolor,showticklabels:Uf.showticklabels,labelalias:Uf.labelalias,showtickprefix:Uf.showtickprefix,tickprefix:Uf.tickprefix,showticksuffix:Uf.showticksuffix,ticksuffix:Uf.ticksuffix,tickfont:Uf.tickfont,tickformat:Uf.tickformat,hoverformat:Uf.hoverformat,layer:Uf.layer},"plot","from-root"),$er=Gx({visible:Gx({},Uf.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:Gx({},Uf.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},xQe,bQe),Qer=Gx({visible:Gx({},Uf.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:Uf.ticks,editType:"calc"},xQe,bQe);wQe.exports={domain:Jer({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:Ker.background},realaxis:$er,imaginaryaxis:Qer,editType:"calc"}});var SQe=ye((E3r,AQe)=>{"use strict";var rS=Dr(),etr=ka(),ttr=vl(),rtr=O_(),itr=Id().getSubplotData,ntr=l_(),atr=s_(),otr=u4(),str=xm(),iS=hQ(),dQ=fQ(),TQe=dQ.axisNames,ltr=ctr(function(e){return rS.isTypedArray(e)&&(e=Array.from(e)),e.slice().reverse().map(function(t){return-t}).concat([0]).concat(e)},String);function utr(e,t,r,n){var i=r("bgcolor");n.bgColor=etr.combine(i,n.paper_bgcolor);var a=itr(n.fullData,dQ.name,n.id),o=n.layoutOut,s;function l(L,x){return r(s+"."+L,x)}for(var u=0;u{"use strict";var ftr=Id().getSubplotCalcData,htr=Dr().counterRegex,dtr=tQ(),EQe=fQ(),kQe=EQe.attr,Cw=EQe.name,MQe=htr(Cw),CQe={};CQe[kQe]={valType:"subplotid",dflt:Cw,editType:"calc"};function vtr(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[Cw],i=0;i{"use strict";var{hovertemplateAttrs:gtr,texttemplateAttrs:mtr,templatefallbackAttrs:IQe}=Ll(),P9=Ao().extendFlat,ytr=Pg(),d0=pf(),_tr=Gl(),nS=d0.line;RQe.exports={mode:d0.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:d0.text,texttemplate:mtr({editType:"plot"},{keys:["real","imag","text"]}),texttemplatefallback:IQe({editType:"plot"}),hovertext:d0.hovertext,line:{color:nS.color,width:nS.width,dash:nS.dash,backoff:nS.backoff,shape:P9({},nS.shape,{values:["linear","spline"]}),smoothing:nS.smoothing,editType:"calc"},connectgaps:d0.connectgaps,marker:d0.marker,cliponaxis:P9({},d0.cliponaxis,{dflt:!1}),textposition:d0.textposition,textfont:d0.textfont,fill:P9({},d0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:ytr(),hoverinfo:P9({},_tr.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:d0.hoveron,hovertemplate:gtr(),hovertemplatefallback:IQe(),selected:d0.selected,unselected:d0.unselected}});var zQe=ye((L3r,FQe)=>{"use strict";var I9=Dr(),aS=Ru(),xtr=$p(),btr=D0(),DQe=sT(),wtr=F0(),Ttr=Fg(),Atr=Lm().PTS_LINESONLY,Str=vQ();FQe.exports=function(t,r,n,i){function a(l,u){return I9.coerce(t,r,Str,l,u)}var o=Mtr(t,r,i,a);if(!o){r.visible=!1;return}a("mode",o{"use strict";var OQe=ho();qQe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot;return i.realLabel=OQe.tickText(a.radialAxis,t.real,!0).text,i.imagLabel=OQe.tickText(a.angularAxis,t.imag,!0).text,i}});var VQe=ye((I3r,UQe)=>{"use strict";var NQe=Eo(),Etr=fs().BADNUM,ktr=z0(),Ctr=Rm(),Ltr=O0(),Ptr=q0().calcMarkerSize;UQe.exports=function(t,r){for(var n=t._fullLayout,i=r.subplot,a=n[i].realaxis,o=n[i].imaginaryaxis,s=a.makeCalcdata(r,"real"),l=o.makeCalcdata(r,"imag"),u=r._length,c=new Array(u),f=0;f{"use strict";var Itr=dT(),GQe=fs().BADNUM,Rtr=$$(),Dtr=Rtr.smith;HQe.exports=function(t,r,n){for(var i=r.layers.frontplot.select("g.scatterlayer"),a=r.xaxis,o=r.yaxis,s={xaxis:a,yaxis:o,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},l=0;l{"use strict";var Ftr=mT();function ztr(e,t,r,n){var i=Ftr(e,t,r,n);if(!(!i||i[0].index===!1)){var a=i[0];if(a.index===void 0)return i;var o=e.subplot,s=a.cd[a.index],l=a.trace;if(o.isPtInside(s))return a.xLabelVal=void 0,a.yLabelVal=void 0,WQe(s,l,o,a),a.hovertemplate=l.hovertemplate,i}}function WQe(e,t,r,n){var i=r.radialAxis,a=r.angularAxis;i._hovertitle="real",a._hovertitle="imag";var o={};o[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,o);n.realLabel=s.realLabel,n.imagLabel=s.imagLabel;var l=e.hi||t.hoverinfo,u=[];function c(h,d){u.push(h._hovertitle+": "+d)}if(!t.hovertemplate){var f=l.split("+");f.indexOf("all")!==-1&&(f=["real","imag","text"]),f.indexOf("real")!==-1&&c(i,n.realLabel),f.indexOf("imag")!==-1&&c(a,n.imagLabel),f.indexOf("text")!==-1&&n.text&&(u.push(n.text),delete n.text),n.extraText=u.join("
")}}XQe.exports={hoverPoints:ztr,makeHoverPointText:WQe}});var KQe=ye((F3r,YQe)=>{"use strict";YQe.exports={moduleType:"trace",name:"scattersmith",basePlotModule:PQe(),categories:["smith","symbols","showLegend","scatter-like"],attributes:vQ(),supplyDefaults:zQe(),colorbar:$d(),formatLabels:BQe(),calc:VQe(),plot:jQe(),style:sp().style,styleOnSelect:sp().styleOnSelect,hoverPoints:ZQe().hoverPoints,selectPoints:yT(),meta:{}}});var $Qe=ye((z3r,JQe)=>{"use strict";JQe.exports=KQe()});var kv=ye((O3r,eet)=>{var D9=Nh();function QQe(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}D9(QQe.prototype,{instance:function(e,t){e=(e||"gregorian").toLowerCase(),t=t||"";var r=this._localCals[e+"-"+t];if(!r&&this.calendars[e]&&(r=new this.calendars[e](t),this._localCals[e+"-"+t]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return r},newDate:function(e,t,r,n,i){return n=(e!=null&&e.year?e.calendar():typeof n=="string"?this.instance(n,i):n)||this.instance(),n.newDate(e,t,r)},substituteDigits:function(e){return function(t){return(t+"").replace(/[0-9]/g,function(r){return e[r]})}},substituteChineseDigits:function(e,t){return function(r){for(var n="",i=0;r>0;){var a=r%10;n=(a===0?"":e[a]+t[i])+n,i++,r=Math.floor(r/10)}return n.indexOf(e[1]+t[1])===0&&(n=n.substr(1)),n||e[0]}}});function pQ(e,t,r,n){if(this._calendar=e,this._year=t,this._month=r,this._day=n,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function R9(e,t){return e=""+e,"000000".substring(0,t-e.length)+e}D9(pQ.prototype,{newDate:function(e,t,r){return this._calendar.newDate(e==null?this:e,t,r)},year:function(e){return arguments.length===0?this._year:this.set(e,"y")},month:function(e){return arguments.length===0?this._month:this.set(e,"m")},day:function(e){return arguments.length===0?this._day:this.set(e,"d")},date:function(e,t,r){if(!this._calendar.isValid(e,t,r))throw(Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=t,this._day=r,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(e,t){return this._calendar.add(this,e,t)},set:function(e,t){return this._calendar.set(this,e,t)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(Gs.local.differentCalendars||Gs.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var t=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return t===0?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(e){return this._calendar.fromJD(e)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(e){return this._calendar.fromJSDate(e)},toString:function(){return(this.year()<0?"-":"")+R9(Math.abs(this.year()),4)+"-"+R9(this.month(),2)+"-"+R9(this.day(),2)}});function gQ(){this.shortYearCutoff="+10"}D9(gQ.prototype,{_validateLevel:0,newDate:function(e,t,r){return e==null?this.today():(e.year&&(this._validate(e,t,r,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new pQ(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var t=this._validate(e,this.minMonth,this.minDay,Gs.local.invalidYear||Gs.regionalOptions[""].invalidYear);return t.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Gs.local.invalidYear||Gs.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+R9(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Gs.local.invalidYear||Gs.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,Gs.local.invalidMonth||Gs.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(e,t){var r=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,r,this.minDay,Gs.local.invalidMonth||Gs.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Gs.local.invalidYear||Gs.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var n=this._validate(e,t,r,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,t,r),t,r)},_add:function(e,t,r){if(this._validateLevel++,r==="d"||r==="w"){var n=e.toJD()+t*(r==="w"?this.daysInWeek():1),i=e.calendar().fromJD(n);return this._validateLevel--,[i.year(),i.month(),i.day()]}try{var a=e.year()+(r==="y"?t:0),o=e.monthOfYear()+(r==="m"?t:0),i=e.day(),s=function(c){for(;of-1+c.minMonth;)a++,o-=f,f=c.monthsInYear(a)};r==="y"?(e.month()!==this.fromMonthOfYear(a,o)&&(o=this.newDate(a,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(a)),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o)))):r==="m"&&(s(this),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o))));var l=[a,this.fromMonthOfYear(a,o),i];return this._validateLevel--,l}catch(u){throw this._validateLevel--,u}},_correctAdd:function(e,t,r,n){if(!this.hasYearZero&&(n==="y"||n==="m")&&(t[0]===0||e.year()>0!=t[0]>0)){var i={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],a=r<0?-1:1;t=this._add(e,r*i[0]+a*i[1],i[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,r){this._validate(e,this.minMonth,this.minDay,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate);var n=r==="y"?t:e.year(),i=r==="m"?t:e.month(),a=r==="d"?t:e.day();return(r==="y"||r==="m")&&(a=Math.min(a,this.daysInMonth(n,i))),e.date(n,i,a)},isValid:function(e,t,r){this._validateLevel++;var n=this.hasYearZero||e!==0;if(n){var i=this.newDate(e,t,this.minDay);n=t>=this.minMonth&&t-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),u=i-(l>2.5?4716:4715);return u<=0&&u--,this.newDate(u,l,s)},toJSDate:function(e,t,r){var n=this._validate(e,t,r,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate),i=new Date(n.year(),n.month()-1,n.day());return i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0),i.setHours(i.getHours()>12?i.getHours()+2:0),i},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var Gs=eet.exports=new QQe;Gs.cdate=pQ;Gs.baseCalendar=gQ;Gs.calendars.gregorian=mQ});var tet=ye(()=>{var yQ=Nh(),Nd=kv();yQ(Nd.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"});Nd.local=Nd.regionalOptions[""];yQ(Nd.cdate.prototype,{formatDate:function(e,t){return typeof e!="string"&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}});yQ(Nd.baseCalendar.prototype,{UNIX_EPOCH:Nd.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:Nd.instance().jdEpoch,TICKS_PER_DAY:24*60*60*1e7,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(e,t,r){if(typeof e!="string"&&(r=t,t=e,e=""),!t)return"";if(t.calendar()!==this)throw Nd.local.invalidFormat||Nd.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat,r=r||{};for(var n=r.dayNamesShort||this.local.dayNamesShort,i=r.dayNames||this.local.dayNames,a=r.monthNumbers||this.local.monthNumbers,o=r.monthNamesShort||this.local.monthNamesShort,s=r.monthNames||this.local.monthNames,l=r.calculateWeek||this.local.calculateWeek,u=function(T,L){for(var x=1;E+x1},c=function(T,L,x,C){var M=""+L;if(u(T,C))for(;M.length1},k=function(z,O){var U=p(z,O),G=[2,3,U?4:2,U?4:2,10,11,20]["oyYJ@!".indexOf(z)+1],Z=new RegExp("^-?\\d{1,"+G+"}"),j=t.substring(M).match(Z);if(!j)throw(Nd.local.missingNumberAt||Nd.regionalOptions[""].missingNumberAt).replace(/\{0\}/,M);return M+=j[0].length,parseInt(j[0],10)},E=this,T=function(){if(typeof s=="function"){p("m");var z=s.call(E,t.substring(M));return M+=z.length,z}return k("m")},L=function(z,O,U,G){for(var Z=p(z,G)?U:O,j=0;j-1){h=1,d=v;for(var A=this.daysInMonth(f,h);d>A;A=this.daysInMonth(f,h))h++,d-=A}return c>-1?this.fromJD(c):this.newDate(f,h,d)},determineDate:function(e,t,r,n,i){r&&typeof r!="object"&&(i=n,n=r,r=null),typeof n!="string"&&(i=n,n="");var a=this,o=function(s){try{return a.parseDate(n,s,i)}catch(f){}s=s.toLowerCase();for(var l=(s.match(/^c/)&&r?r.newDate():null)||a.today(),u=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,c=u.exec(s);c;)l.add(parseInt(c[1],10),c[2]||"d"),c=u.exec(s);return l};return t=t?t.newDate():null,e=e==null?t:typeof e=="string"?o(e):typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?t:a.today().add(e,"d"):a.newDate(e),e}})});var ret=ye(()=>{var Hx=kv(),Otr=Nh(),_Q=Hx.instance();function F9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}F9.prototype=new Hx.baseCalendar;Otr(F9.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,t){if(typeof e=="string"){var r=e.match(Btr);return r?r[0]:""}var n=this._validateYear(e),i=e.month(),a=""+this.toChineseMonth(n,i);return t&&a.length<2&&(a="0"+a),this.isIntercalaryMonth(n,i)&&(a+="i"),a},monthNames:function(e){if(typeof e=="string"){var t=e.match(Ntr);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),i=this.toChineseMonth(r,n),a=["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"][i-1];return this.isIntercalaryMonth(r,n)&&(a="\u95F0"+a),a},monthNamesShort:function(e){if(typeof e=="string"){var t=e.match(Utr);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),i=this.toChineseMonth(r,n),a=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][i-1];return this.isIntercalaryMonth(r,n)&&(a="\u95F0"+a),a},parseMonth:function(e,t){e=this._validateYear(e);var r=parseInt(t),n;if(isNaN(r))t[0]==="\u95F0"&&(n=!0,t=t.substring(1)),t[t.length-1]==="\u6708"&&(t=t.substring(0,t.length-1)),r=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(t);else{var i=t[t.length-1];n=i==="i"||i==="I"}var a=this.toMonthIndex(e,r,n);return a},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(e,t){if(e.year&&(e=e.year()),typeof e!="number"||e<1888||e>2111)throw t.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,t,r){var n=this.intercalaryMonth(e),i=r&&t!==n;if(i||t<1||t>12)throw Hx.local.invalidMonth.replace(/\{0\}/,this.local.name);var a;return n?!r&&t<=n?a=t-1:a=t:a=t-1,a},toChineseMonth:function(e,t){e.year&&(e=e.year(),t=e.month());var r=this.intercalaryMonth(e),n=r?12:11;if(t<0||t>n)throw Hx.local.invalidMonth.replace(/\{0\}/,this.local.name);var i;return r?t>13;return r},isIntercalaryMonth:function(e,t){e.year&&(e=e.year(),t=e.month());var r=this.intercalaryMonth(e);return!!r&&r===t},leapYear:function(e){return this.intercalaryMonth(e)!==0},weekOfYear:function(e,t,r){var n=this._validateYear(e,Hx.local.invalidyear),i=Wx[n-Wx[0]],a=i>>9&4095,o=i>>5&15,s=i&31,l;l=_Q.newDate(a,o,s),l.add(4-(l.dayOfWeek()||7),"d");var u=this.toJD(e,t,r)-l.toJD();return 1+Math.floor(u/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,t){e.year&&(t=e.month(),e=e.year()),e=this._validateYear(e);var r=jx[e-jx[0]],n=r>>13,i=n?12:11;if(t>i)throw Hx.local.invalidMonth.replace(/\{0\}/,this.local.name);var a=r&1<<12-t?30:29;return a},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,a,r,Hx.local.invalidDate);e=this._validateYear(n.year()),t=n.month(),r=n.day();var i=this.isIntercalaryMonth(e,t),a=this.toChineseMonth(e,t),o=Gtr(e,a,r,i);return _Q.toJD(o.year,o.month,o.day)},fromJD:function(e){var t=_Q.fromJD(e),r=Vtr(t.year(),t.month(),t.day()),n=this.toMonthIndex(r.year,r.month,r.isIntercalary);return this.newDate(r.year,n,r.day)},fromString:function(e){var t=e.match(qtr),r=this._validateYear(+t[1]),n=+t[2],i=!!t[3],a=this.toMonthIndex(r,n,i),o=+t[4];return this.newDate(r,a,o)},add:function(e,t,r){var n=e.year(),i=e.month(),a=this.isIntercalaryMonth(n,i),o=this.toChineseMonth(n,i),s=Object.getPrototypeOf(F9.prototype).add.call(this,e,t,r);if(r==="y"){var l=s.year(),u=s.month(),c=this.isIntercalaryMonth(l,o),f=a&&c?this.toMonthIndex(l,o,!0):this.toMonthIndex(l,o,!1);f!==u&&s.month(f)}return s}});var qtr=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,Btr=/^\d?\d[iI]?/m,Ntr=/^闰?十?[一二三四五六七八九]?月/m,Utr=/^闰?十?[一二三四五六七八九]?/m;Hx.calendars.chinese=F9;var jx=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],Wx=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904];function Vtr(e,t,r,n){var i,a;if(typeof e=="object")i=e,a=t||{};else{var o=typeof e=="number"&&e>=1888&&e<=2111;if(!o)throw new Error("Solar year outside range 1888-2111");var s=typeof t=="number"&&t>=1&&t<=12;if(!s)throw new Error("Solar month outside range 1 - 12");var l=typeof r=="number"&&r>=1&&r<=31;if(!l)throw new Error("Solar day outside range 1 - 31");i={year:e,month:t,day:r},a=n||{}}var u=Wx[i.year-Wx[0]],c=i.year<<9|i.month<<5|i.day;a.year=c>=u?i.year:i.year-1,u=Wx[a.year-Wx[0]];var f=u>>9&4095,h=u>>5&15,d=u&31,v,_=new Date(f,h-1,d),b=new Date(i.year,i.month-1,i.day);v=Math.round((b-_)/(24*3600*1e3));var p=jx[a.year-jx[0]],k;for(k=0;k<13;k++){var E=p&1<<12-k?30:29;if(v>13;return!T||k=1888&&e<=2111;if(!s)throw new Error("Lunar year outside range 1888-2111");var l=typeof t=="number"&&t>=1&&t<=12;if(!l)throw new Error("Lunar month outside range 1 - 12");var u=typeof r=="number"&&r>=1&&r<=30;if(!u)throw new Error("Lunar day outside range 1 - 30");var c;typeof n=="object"?(c=!1,a=n):(c=!!n,a=i||{}),o={year:e,month:t,day:r,isIntercalary:c}}var f;f=o.day-1;var h=jx[o.year-jx[0]],d=h>>13,v;d&&(o.month>d||o.isIntercalary)?v=o.month:v=o.month-1;for(var _=0;_>9&4095,E=p>>5&15,T=p&31,L=new Date(k,E-1,T+f);return a.year=L.getFullYear(),a.month=1+L.getMonth(),a.day=L.getDate(),a}});var iet=ye(()=>{var Lw=kv(),Htr=Nh();function xQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}xQ.prototype=new Lw.baseCalendar;Htr(xQ.prototype,{name:"Coptic",jdEpoch:18250295e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,Lw.local.invalidYear),r=t.year()+(t.year()<0?1:0);return r%4===3||r%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Lw.local.invalidYear||Lw.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Lw.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===13&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,Lw.local.invalidDate);return e=n.year(),e<0&&e++,n.day()+(n.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,i=t-(n-1)*30+1;return this.newDate(r,n,i)}});Lw.calendars.coptic=xQ});var net=ye(()=>{var E1=kv(),jtr=Nh();function bQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}bQ.prototype=new E1.baseCalendar;jtr(bQ.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,E1.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,E1.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,E1.local.invalidYear),400},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,E1.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,E1.local.invalidDate);return(n.day()+1)%8},weekDay:function(e,t,r){var n=this.dayOfWeek(e,t,r);return n>=2&&n<=6},extraInfo:function(e,t,r){var n=this._validate(e,t,r,E1.local.invalidDate);return{century:Wtr[Math.floor((n.year()-1)/100)+1]||""}},toJD:function(e,t,r){var n=this._validate(e,t,r,E1.local.invalidDate);return e=n.year()+(n.year()<0?1:0),t=n.month(),r=n.day(),r+(t>1?16:0)+(t>2?(t-2)*32:0)+(e-1)*400+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var t=Math.floor(e/400)+1;e-=(t-1)*400,e+=e>15?16:0;var r=Math.floor(e/32)+1,n=e-(r-1)*32+1;return this.newDate(t<=0?t-1:t,r,n)}});var Wtr={20:"Fruitbat",21:"Anchovy"};E1.calendars.discworld=bQ});var aet=ye(()=>{var Pw=kv(),Xtr=Nh();function wQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}wQ.prototype=new Pw.baseCalendar;Xtr(wQ.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,Pw.local.invalidYear),r=t.year()+(t.year()<0?1:0);return r%4===3||r%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Pw.local.invalidYear||Pw.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Pw.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===13&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,Pw.local.invalidDate);return e=n.year(),e<0&&e++,n.day()+(n.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,i=t-(n-1)*30+1;return this.newDate(r,n,i)}});Pw.calendars.ethiopian=wQ});var oet=ye(()=>{var Xx=kv(),Ztr=Nh();function TQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}TQ.prototype=new Xx.baseCalendar;Ztr(TQ.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Xx.local.invalidYear);return this._leapYear(t.year())},_leapYear:function(e){return e=e<0?e+1:e,z9(e*7+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Xx.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Xx.local.invalidYear);return e=t.year(),this.toJD(e===-1?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,Xx.local.invalidMonth),t===12&&this.leapYear(e)||t===8&&z9(this.daysInYear(e),10)===5?30:t===9&&z9(this.daysInYear(e),10)===3?29:this.daysPerMonth[t-1]},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==6},extraInfo:function(e,t,r){var n=this._validate(e,t,r,Xx.local.invalidDate);return{yearType:(this.leapYear(n)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(n)%10-3]}},toJD:function(e,t,r){var n=this._validate(e,t,r,Xx.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var i=e<=0?e+1:e,a=this.jdEpoch+this._delay1(i)+this._delay2(i)+r+1;if(t<7){for(var o=7;o<=this.monthsInYear(e);o++)a+=this.daysInMonth(e,o);for(var o=1;o=this.toJD(t===-1?1:t+1,7,1);)t++;for(var r=ethis.toJD(t,r,this.daysInMonth(t,r));)r++;var n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}});function z9(e,t){return e-t*Math.floor(e/t)}Xx.calendars.hebrew=TQ});var set=ye(()=>{var bC=kv(),Ytr=Nh();function AQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}AQ.prototype=new bC.baseCalendar;Ytr(AQ.prototype,{name:"Islamic",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-kham\u012Bs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,bC.local.invalidYear);return(t.year()*11+14)%30<11},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,bC.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,bC.local.invalidDate);return e=n.year(),t=n.month(),r=n.day(),e=e<=0?e+1:e,r+Math.ceil(29.5*(t-1))+(e-1)*354+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=Math.floor((30*(e-this.jdEpoch)+10646)/10631);t=t<=0?t-1:t;var r=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}});bC.calendars.islamic=AQ});var uet=ye(()=>{var wC=kv(),Ktr=Nh();function SQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}SQ.prototype=new wC.baseCalendar;Ktr(SQ.prototype,{name:"Julian",jdEpoch:17214235e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,wC.local.invalidYear),r=t.year()<0?t.year()+1:t.year();return r%4===0},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,wC.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,wC.local.invalidDate);return e=n.year(),t=n.month(),r=n.day(),e<0&&e++,t<=2&&(e--,t+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r-1524.5},fromJD:function(e){var t=Math.floor(e+.5),r=t+1524,n=Math.floor((r-122.1)/365.25),i=Math.floor(365.25*n),a=Math.floor((r-i)/30.6001),o=a-Math.floor(a<14?1:13),s=n-Math.floor(o>2?4716:4715),l=r-i-Math.floor(30.6001*a);return s<=0&&s--,this.newDate(s,o,l)}});wC.calendars.julian=SQ});var fet=ye(()=>{var fg=kv(),Jtr=Nh();function EQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}EQ.prototype=new fg.baseCalendar;Jtr(EQ.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,fg.local.invalidYear),!1},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,fg.local.invalidYear);e=t.year();var r=Math.floor(e/400);e=e%400,e+=e<0?400:0;var n=Math.floor(e/20);return r+"."+n+"."+e%20},forYear:function(e){if(e=e.split("."),e.length<3)throw"Invalid Mayan year";for(var t=0,r=0;r19||r>0&&n<0)throw"Invalid Mayan year";t=t*20+n}return t},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,fg.local.invalidYear),18},weekOfYear:function(e,t,r){return this._validate(e,t,r,fg.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,fg.local.invalidYear),360},daysInMonth:function(e,t){return this._validate(e,t,this.minDay,fg.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,fg.local.invalidDate);return n.day()},weekDay:function(e,t,r){return this._validate(e,t,r,fg.local.invalidDate),!0},extraInfo:function(e,t,r){var n=this._validate(e,t,r,fg.local.invalidDate),i=n.toJD(),a=this._toHaab(i),o=this._toTzolkin(i);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(e){e-=this.jdEpoch;var t=MQ(e+8+17*20,365);return[Math.floor(t/20)+1,MQ(t,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[cet(e+20,20),cet(e+4,13)]},toJD:function(e,t,r){var n=this._validate(e,t,r,fg.local.invalidDate);return n.day()+n.month()*20+n.year()*360+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var t=Math.floor(e/360);e=e%360,e+=e<0?360:0;var r=Math.floor(e/20),n=e%20;return this.newDate(t,r,n)}});function MQ(e,t){return e-t*Math.floor(e/t)}function cet(e,t){return MQ(e-1,t)+1}fg.calendars.mayan=EQ});var det=ye(()=>{var Iw=kv(),$tr=Nh();function kQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}kQ.prototype=new Iw.baseCalendar;var het=Iw.instance("gregorian");$tr(kQ.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Iw.local.invalidYear||Iw.regionalOptions[""].invalidYear);return het.leapYear(t.year()+(t.year()<1?1:0)+1469)},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Iw.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(i,t,r){var n=this._validate(i,t,r,Iw.local.invalidMonth),i=n.year();i<0&&i++;for(var a=n.day(),o=1;o=this.toJD(t+1,1,1);)t++;for(var r=e-Math.floor(this.toJD(t,1,1)+.5)+1,n=1;r>this.daysInMonth(t,n);)r-=this.daysInMonth(t,n),n++;return this.newDate(t,n,r)}});Iw.calendars.nanakshahi=kQ});var vet=ye(()=>{var Rw=kv(),Qtr=Nh();function CQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}CQ.prototype=new Rw.baseCalendar;Qtr(CQ.prototype,{name:"Nepali",jdEpoch:17007095e-1,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Rw.local.invalidYear);if(e=t.year(),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined")return this.daysPerYear;for(var r=0,n=this.minMonth;n<=12;n++)r+=this.NEPALI_CALENDAR_DATA[e][n];return r},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,Rw.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined"?this.daysPerMonth[t-1]:this.NEPALI_CALENDAR_DATA[e][t]},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==6},toJD:function(e,t,r){var n=this._validate(e,t,r,Rw.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var i=Rw.instance(),a=0,o=t,s=e;this._createMissingCalendarData(e);var l=e-(o>9||o===9&&r>=this.NEPALI_CALENDAR_DATA[s][0]?56:57);for(t!==9&&(a=r,o--);o!==9;)o<=0&&(o=12,s--),a+=this.NEPALI_CALENDAR_DATA[s][o],o--;return t===9?(a+=r-this.NEPALI_CALENDAR_DATA[s][0],a<0&&(a+=i.daysInYear(l))):a+=this.NEPALI_CALENDAR_DATA[s][9]-this.NEPALI_CALENDAR_DATA[s][0],i.newDate(l,1,1).add(a,"d").toJD()},fromJD:function(e){var t=Rw.instance(),r=t.fromJD(e),n=r.year(),i=r.dayOfYear(),a=n+56;this._createMissingCalendarData(a);for(var o=9,s=this.NEPALI_CALENDAR_DATA[a][0],l=this.NEPALI_CALENDAR_DATA[a][o]-s+1;i>l;)o++,o>12&&(o=1,a++),l+=this.NEPALI_CALENDAR_DATA[a][o];var u=this.NEPALI_CALENDAR_DATA[a][o]-(l-i);return this.newDate(a,o,u)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var r=e-1;r{var oS=kv(),err=Nh();function q9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function O9(e){var t=e-475;e<0&&t++;var r=.242197,n=r*t,i=r*(t+1),a=n-Math.floor(n),o=i-Math.floor(i);return a>o}q9.prototype=new oS.baseCalendar;err(q9.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chah\u0101rshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,oS.local.invalidYear);return O9(t.year())},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-((n.dayOfWeek()+1)%7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,oS.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,oS.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var i=0;if(e>0)for(var a=1;a0?e-1:e)*365+i+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=475+(e-this.toJD(475,1,1))/365.242197,r=Math.floor(t);r<=0&&r--,e>this.toJD(r,12,O9(r)?30:29)&&(r++,r===0&&r++);var n=e-this.toJD(r,1,1)+1,i=n<=186?Math.ceil(n/31):Math.ceil((n-6)/30),a=e-this.toJD(r,i,1)+1;return this.newDate(r,i,a)}});oS.calendars.persian=q9;oS.calendars.jalali=q9});var get=ye(()=>{var Dw=kv(),trr=Nh(),B9=Dw.instance();function LQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}LQ.prototype=new Dw.baseCalendar;trr(LQ.prototype,{name:"Taiwan",jdEpoch:24194025e-1,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,Dw.local.invalidYear),r=this._t2gYear(t.year());return B9.leapYear(r)},weekOfYear:function(i,t,r){var n=this._validate(i,this.minMonth,this.minDay,Dw.local.invalidYear),i=this._t2gYear(n.year());return B9.weekOfYear(i,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Dw.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(i,t,r){var n=this._validate(i,t,r,Dw.local.invalidDate),i=this._t2gYear(n.year());return B9.toJD(i,n.month(),n.day())},fromJD:function(e){var t=B9.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)},_g2tYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)}});Dw.calendars.taiwan=LQ});var met=ye(()=>{var Fw=kv(),rrr=Nh(),N9=Fw.instance();function PQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}PQ.prototype=new Fw.baseCalendar;rrr(PQ.prototype,{name:"Thai",jdEpoch:15230985e-1,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,Fw.local.invalidYear),r=this._t2gYear(t.year());return N9.leapYear(r)},weekOfYear:function(i,t,r){var n=this._validate(i,this.minMonth,this.minDay,Fw.local.invalidYear),i=this._t2gYear(n.year());return N9.weekOfYear(i,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Fw.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(i,t,r){var n=this._validate(i,t,r,Fw.local.invalidDate),i=this._t2gYear(n.year());return N9.toJD(i,n.month(),n.day())},fromJD:function(e){var t=N9.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)},_g2tYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)}});Fw.calendars.thai=PQ});var yet=ye(()=>{var zw=kv(),irr=Nh();function IQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}IQ.prototype=new zw.baseCalendar;irr(IQ.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thal\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012Bs","Yawm al-Jum\u2018a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,zw.local.invalidYear);return this.daysInYear(t.year())===355},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var t=0,r=1;r<=12;r++)t+=this.daysInMonth(e,r);return t},daysInMonth:function(e,t){for(var r=this._validate(e,t,this.minDay,zw.local.invalidMonth),n=r.toJD()-24e5+.5,i=0,a=0;an)return Zx[i]-Zx[i-1];i++}return 30},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,zw.local.invalidDate),i=12*(n.year()-1)+n.month()-15292,a=n.day()+Zx[i-1]-1;return a+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,r=0,n=0;nt);n++)r++;var i=r+15292,a=Math.floor((i-1)/12),o=a+1,s=i-12*a,l=t-Zx[r-1]+1;return this.newDate(o,s,l)},isValid:function(e,t,r){var n=zw.baseCalendar.prototype.isValid.apply(this,arguments);return n&&(e=e.year!=null?e.year:e,n=e>=1276&&e<=1500),n},_validate:function(e,t,r,n){var i=zw.baseCalendar.prototype._validate.apply(this,arguments);if(i.year<1276||i.year>1500)throw n.replace(/\{0\}/,this.local.name);return i}});zw.calendars.ummalqura=IQ;var Zx=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]});var xet=ye((vTr,_et)=>{"use strict";_et.exports=kv();tet();ret();iet();net();aet();oet();set();uet();fet();det();vet();pet();get();met();yet()});var ket=ye((pTr,Eet)=>{"use strict";var wet=xet(),TC=Dr(),Tet=fs(),nrr=Tet.EPOCHJD,arr=Tet.ONEDAY,FQ={valType:"enumerated",values:TC.sortObjectKeys(wet.calendars),editType:"calc",dflt:"gregorian"},Aet=function(e,t,r,n){var i={};return i[r]=FQ,TC.coerce(e,t,i,r,n)},orr=function(e,t,r,n){for(var i=0;i{"use strict";Cet.exports=ket()});var hrr=ye((mTr,Iet)=>{var Pet=uye();Pet.register([f1e(),$1e(),hxe(),Rxe(),Xxe(),Gbe(),r2e(),H2e(),_we(),t3e(),V3e(),eke(),Gke(),D6e(),wLe(),QLe(),TPe(),ZIe(),d8e(),P8e(),G8e(),iRe(),yRe(),DRe(),uFe(),CFe(),WBe(),WNe(),rVe(),kVe(),qGe(),QGe(),THe(),Fje(),Kje(),xWe(),CXe(),QXe(),DZe(),rKe(),EKe(),ZKe(),xJe(),DJe(),R$e(),$$e(),mQe(),$Qe(),Let()]);Iet.exports=Pet});return hrr();})(); -/*! - * pad-left - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT license. - */ -/*! - * repeat-string - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License. - */ -/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ +`}),staticAttributes:Q,staticUniforms:ze}}class Ar{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(w,B,Q,ee,le,ze,Ze,ut,Mt){this.context=w;let Jt=this.boundPaintVertexBuffers.length!==ee.length;for(let $t=0;!Jt&&$t({u_matrix:ue,u_texture:0,u_ele_delta:w,u_fog_matrix:B,u_fog_color:Q?Q.properties.get("fog-color"):a.aM.white,u_fog_ground_blend:Q?Q.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:Q?Q.calculateFogBlendOpacity(ee):0,u_horizon_color:Q?Q.properties.get("horizon-color"):a.aM.white,u_horizon_fog_blend:Q?Q.properties.get("horizon-fog-blend"):1});function hi(ue){let w=[];for(let B=0;B({u_depth:new a.aH(jt,ar.u_depth),u_terrain:new a.aH(jt,ar.u_terrain),u_terrain_dim:new a.aI(jt,ar.u_terrain_dim),u_terrain_matrix:new a.aJ(jt,ar.u_terrain_matrix),u_terrain_unpack:new a.aK(jt,ar.u_terrain_unpack),u_terrain_exaggeration:new a.aI(jt,ar.u_terrain_exaggeration)}))(w,qt),this.binderUniforms=Q?Q.getUniforms(w,qt):[]}draw(w,B,Q,ee,le,ze,Ze,ut,Mt,Jt,$t,mr,Cr,ve,xe,Ie,qe,Qe){let Xe=w.gl;if(this.failedToCreate)return;if(w.program.set(this.program),w.setDepthMode(Q),w.setStencilMode(ee),w.setColorMode(le),w.setCullFace(ze),ut){w.activeTexture.set(Xe.TEXTURE2),Xe.bindTexture(Xe.TEXTURE_2D,ut.depthTexture),w.activeTexture.set(Xe.TEXTURE3),Xe.bindTexture(Xe.TEXTURE_2D,ut.texture);for(let qt in this.terrainUniforms)this.terrainUniforms[qt].set(ut[qt])}for(let qt in this.fixedUniforms)this.fixedUniforms[qt].set(Ze[qt]);xe&&xe.setUniforms(w,this.binderUniforms,Cr,{zoom:ve});let nt=0;switch(B){case Xe.LINES:nt=2;break;case Xe.TRIANGLES:nt=3;break;case Xe.LINE_STRIP:nt=1}for(let qt of mr.get()){let jt=qt.vaos||(qt.vaos={});(jt[Mt]||(jt[Mt]=new Ar)).bind(w,this,Jt,xe?xe.getPaintVertexBuffers():[],$t,qt.vertexOffset,Ie,qe,Qe),Xe.drawElements(B,qt.primitiveLength*nt,Xe.UNSIGNED_SHORT,qt.primitiveOffset*nt*2)}}}function Sn(ue,w,B){let Q=1/Fn(B,1,w.transform.tileZoom),ee=Math.pow(2,B.tileID.overscaledZ),le=B.tileSize*Math.pow(2,w.transform.tileZoom)/ee,ze=le*(B.tileID.canonical.x+B.tileID.wrap*ee),Ze=le*B.tileID.canonical.y;return{u_image:0,u_texsize:B.imageAtlasTexture.size,u_scale:[Q,ue.fromScale,ue.toScale],u_fade:ue.t,u_pixel_coord_upper:[ze>>16,Ze>>16],u_pixel_coord_lower:[65535&ze,65535&Ze]}}let En=(ue,w,B,Q)=>{let ee=w.style.light,le=ee.properties.get("position"),ze=[le.x,le.y,le.z],Ze=function(){var Mt=new a.A(9);return a.A!=Float32Array&&(Mt[1]=0,Mt[2]=0,Mt[3]=0,Mt[5]=0,Mt[6]=0,Mt[7]=0),Mt[0]=1,Mt[4]=1,Mt[8]=1,Mt}();ee.properties.get("anchor")==="viewport"&&function(Mt,Jt){var $t=Math.sin(Jt),mr=Math.cos(Jt);Mt[0]=mr,Mt[1]=$t,Mt[2]=0,Mt[3]=-$t,Mt[4]=mr,Mt[5]=0,Mt[6]=0,Mt[7]=0,Mt[8]=1}(Ze,-w.transform.angle),function(Mt,Jt,$t){var mr=Jt[0],Cr=Jt[1],ve=Jt[2];Mt[0]=mr*$t[0]+Cr*$t[3]+ve*$t[6],Mt[1]=mr*$t[1]+Cr*$t[4]+ve*$t[7],Mt[2]=mr*$t[2]+Cr*$t[5]+ve*$t[8]}(ze,ze,Ze);let ut=ee.properties.get("color");return{u_matrix:ue,u_lightpos:ze,u_lightintensity:ee.properties.get("intensity"),u_lightcolor:[ut.r,ut.g,ut.b],u_vertical_gradient:+B,u_opacity:Q}},ki=(ue,w,B,Q,ee,le,ze)=>a.e(En(ue,w,B,Q),Sn(le,w,ze),{u_height_factor:-Math.pow(2,ee.overscaledZ)/ze.tileSize/8}),_n=ue=>({u_matrix:ue}),ya=(ue,w,B,Q)=>a.e(_n(ue),Sn(B,w,Q)),ea=(ue,w)=>({u_matrix:ue,u_world:w}),Ma=(ue,w,B,Q,ee)=>a.e(ya(ue,w,B,Q),{u_world:ee}),_o=(ue,w,B,Q)=>{let ee=ue.transform,le,ze;if(Q.paint.get("circle-pitch-alignment")==="map"){let Ze=Fn(B,1,ee.zoom);le=!0,ze=[Ze,Ze]}else le=!1,ze=ee.pixelsToGLUnits;return{u_camera_to_center_distance:ee.cameraToCenterDistance,u_scale_with_map:+(Q.paint.get("circle-pitch-scale")==="map"),u_matrix:ue.translatePosMatrix(w.posMatrix,B,Q.paint.get("circle-translate"),Q.paint.get("circle-translate-anchor")),u_pitch_with_map:+le,u_device_pixel_ratio:ue.pixelRatio,u_extrude_scale:ze}},No=(ue,w,B)=>({u_matrix:ue,u_inv_matrix:w,u_camera_to_center_distance:B.cameraToCenterDistance,u_viewport_size:[B.width,B.height]}),po=(ue,w,B=1)=>({u_matrix:ue,u_color:w,u_overlay:0,u_overlay_scale:B}),Lo=ue=>({u_matrix:ue}),ko=(ue,w,B,Q)=>({u_matrix:ue,u_extrude_scale:Fn(w,1,B),u_intensity:Q}),Ds=(ue,w,B,Q)=>{let ee=a.H();a.aP(ee,0,ue.width,ue.height,0,0,1);let le=ue.context.gl;return{u_matrix:ee,u_world:[le.drawingBufferWidth,le.drawingBufferHeight],u_image:B,u_color_ramp:Q,u_opacity:w.paint.get("heatmap-opacity")}};function Fs(ue,w){let B=Math.pow(2,w.canonical.z),Q=w.canonical.y;return[new a.Z(0,Q/B).toLngLat().lat,new a.Z(0,(Q+1)/B).toLngLat().lat]}let ll=(ue,w,B,Q)=>{let ee=ue.transform;return{u_matrix:As(ue,w,B,Q),u_ratio:1/Fn(w,1,ee.zoom),u_device_pixel_ratio:ue.pixelRatio,u_units_to_pixels:[1/ee.pixelsToGLUnits[0],1/ee.pixelsToGLUnits[1]]}},ul=(ue,w,B,Q,ee)=>a.e(ll(ue,w,B,ee),{u_image:0,u_image_height:Q}),zl=(ue,w,B,Q,ee)=>{let le=ue.transform,ze=il(w,le);return{u_matrix:As(ue,w,B,ee),u_texsize:w.imageAtlasTexture.size,u_ratio:1/Fn(w,1,le.zoom),u_device_pixel_ratio:ue.pixelRatio,u_image:0,u_scale:[ze,Q.fromScale,Q.toScale],u_fade:Q.t,u_units_to_pixels:[1/le.pixelsToGLUnits[0],1/le.pixelsToGLUnits[1]]}},us=(ue,w,B,Q,ee,le)=>{let ze=ue.lineAtlas,Ze=il(w,ue.transform),ut=B.layout.get("line-cap")==="round",Mt=ze.getDash(Q.from,ut),Jt=ze.getDash(Q.to,ut),$t=Mt.width*ee.fromScale,mr=Jt.width*ee.toScale;return a.e(ll(ue,w,B,le),{u_patternscale_a:[Ze/$t,-Mt.height/2],u_patternscale_b:[Ze/mr,-Jt.height/2],u_sdfgamma:ze.width/(256*Math.min($t,mr)*ue.pixelRatio)/2,u_image:0,u_tex_y_a:Mt.y,u_tex_y_b:Jt.y,u_mix:ee.t})};function il(ue,w){return 1/Fn(ue,1,w.tileZoom)}function As(ue,w,B,Q){return ue.translatePosMatrix(Q?Q.posMatrix:w.tileID.posMatrix,w,B.paint.get("line-translate"),B.paint.get("line-translate-anchor"))}let cl=(ue,w,B,Q,ee)=>{return{u_matrix:ue,u_tl_parent:w,u_scale_parent:B,u_buffer_scale:1,u_fade_t:Q.mix,u_opacity:Q.opacity*ee.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:ee.paint.get("raster-brightness-min"),u_brightness_high:ee.paint.get("raster-brightness-max"),u_saturation_factor:(ze=ee.paint.get("raster-saturation"),ze>0?1-1/(1.001-ze):-ze),u_contrast_factor:(le=ee.paint.get("raster-contrast"),le>0?1/(1-le):1+le),u_spin_weights:Ks(ee.paint.get("raster-hue-rotate"))};var le,ze};function Ks(ue){ue*=Math.PI/180;let w=Math.sin(ue),B=Math.cos(ue);return[(2*B+1)/3,(-Math.sqrt(3)*w-B+1)/3,(Math.sqrt(3)*w-B+1)/3]}let zs=(ue,w,B,Q,ee,le,ze,Ze,ut,Mt,Jt,$t,mr,Cr)=>{let ve=ze.transform;return{u_is_size_zoom_constant:+(ue==="constant"||ue==="source"),u_is_size_feature_constant:+(ue==="constant"||ue==="camera"),u_size_t:w?w.uSizeT:0,u_size:w?w.uSize:0,u_camera_to_center_distance:ve.cameraToCenterDistance,u_pitch:ve.pitch/360*2*Math.PI,u_rotate_symbol:+B,u_aspect_ratio:ve.width/ve.height,u_fade_change:ze.options.fadeDuration?ze.symbolFadeChange:1,u_matrix:Ze,u_label_plane_matrix:ut,u_coord_matrix:Mt,u_is_text:+$t,u_pitch_with_map:+Q,u_is_along_line:ee,u_is_variable_anchor:le,u_texsize:mr,u_texture:0,u_translation:Jt,u_pitched_scale:Cr}},Io=(ue,w,B,Q,ee,le,ze,Ze,ut,Mt,Jt,$t,mr,Cr,ve)=>{let xe=ze.transform;return a.e(zs(ue,w,B,Q,ee,le,ze,Ze,ut,Mt,Jt,$t,mr,ve),{u_gamma_scale:Q?Math.cos(xe._pitch)*xe.cameraToCenterDistance:1,u_device_pixel_ratio:ze.pixelRatio,u_is_halo:+Cr})},ls=(ue,w,B,Q,ee,le,ze,Ze,ut,Mt,Jt,$t,mr,Cr)=>a.e(Io(ue,w,B,Q,ee,le,ze,Ze,ut,Mt,Jt,!0,$t,!0,Cr),{u_texsize_icon:mr,u_texture_icon:1}),Yl=(ue,w,B)=>({u_matrix:ue,u_opacity:w,u_color:B}),Su=(ue,w,B,Q,ee,le)=>a.e(function(ze,Ze,ut,Mt){let Jt=ut.imageManager.getPattern(ze.from.toString()),$t=ut.imageManager.getPattern(ze.to.toString()),{width:mr,height:Cr}=ut.imageManager.getPixelSize(),ve=Math.pow(2,Mt.tileID.overscaledZ),xe=Mt.tileSize*Math.pow(2,ut.transform.tileZoom)/ve,Ie=xe*(Mt.tileID.canonical.x+Mt.tileID.wrap*ve),qe=xe*Mt.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Jt.tl,u_pattern_br_a:Jt.br,u_pattern_tl_b:$t.tl,u_pattern_br_b:$t.br,u_texsize:[mr,Cr],u_mix:Ze.t,u_pattern_size_a:Jt.displaySize,u_pattern_size_b:$t.displaySize,u_scale_a:Ze.fromScale,u_scale_b:Ze.toScale,u_tile_units_to_pixels:1/Fn(Mt,1,ut.transform.tileZoom),u_pixel_coord_upper:[Ie>>16,qe>>16],u_pixel_coord_lower:[65535&Ie,65535&qe]}}(Q,le,B,ee),{u_matrix:ue,u_opacity:w}),nc={fillExtrusion:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_lightpos:new a.aN(ue,w.u_lightpos),u_lightintensity:new a.aI(ue,w.u_lightintensity),u_lightcolor:new a.aN(ue,w.u_lightcolor),u_vertical_gradient:new a.aI(ue,w.u_vertical_gradient),u_opacity:new a.aI(ue,w.u_opacity)}),fillExtrusionPattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_lightpos:new a.aN(ue,w.u_lightpos),u_lightintensity:new a.aI(ue,w.u_lightintensity),u_lightcolor:new a.aN(ue,w.u_lightcolor),u_vertical_gradient:new a.aI(ue,w.u_vertical_gradient),u_height_factor:new a.aI(ue,w.u_height_factor),u_image:new a.aH(ue,w.u_image),u_texsize:new a.aO(ue,w.u_texsize),u_pixel_coord_upper:new a.aO(ue,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(ue,w.u_pixel_coord_lower),u_scale:new a.aN(ue,w.u_scale),u_fade:new a.aI(ue,w.u_fade),u_opacity:new a.aI(ue,w.u_opacity)}),fill:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix)}),fillPattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_image:new a.aH(ue,w.u_image),u_texsize:new a.aO(ue,w.u_texsize),u_pixel_coord_upper:new a.aO(ue,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(ue,w.u_pixel_coord_lower),u_scale:new a.aN(ue,w.u_scale),u_fade:new a.aI(ue,w.u_fade)}),fillOutline:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_world:new a.aO(ue,w.u_world)}),fillOutlinePattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_world:new a.aO(ue,w.u_world),u_image:new a.aH(ue,w.u_image),u_texsize:new a.aO(ue,w.u_texsize),u_pixel_coord_upper:new a.aO(ue,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(ue,w.u_pixel_coord_lower),u_scale:new a.aN(ue,w.u_scale),u_fade:new a.aI(ue,w.u_fade)}),circle:(ue,w)=>({u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_scale_with_map:new a.aH(ue,w.u_scale_with_map),u_pitch_with_map:new a.aH(ue,w.u_pitch_with_map),u_extrude_scale:new a.aO(ue,w.u_extrude_scale),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_matrix:new a.aJ(ue,w.u_matrix)}),collisionBox:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_pixel_extrude_scale:new a.aO(ue,w.u_pixel_extrude_scale)}),collisionCircle:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_inv_matrix:new a.aJ(ue,w.u_inv_matrix),u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_viewport_size:new a.aO(ue,w.u_viewport_size)}),debug:(ue,w)=>({u_color:new a.aL(ue,w.u_color),u_matrix:new a.aJ(ue,w.u_matrix),u_overlay:new a.aH(ue,w.u_overlay),u_overlay_scale:new a.aI(ue,w.u_overlay_scale)}),clippingMask:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix)}),heatmap:(ue,w)=>({u_extrude_scale:new a.aI(ue,w.u_extrude_scale),u_intensity:new a.aI(ue,w.u_intensity),u_matrix:new a.aJ(ue,w.u_matrix)}),heatmapTexture:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_world:new a.aO(ue,w.u_world),u_image:new a.aH(ue,w.u_image),u_color_ramp:new a.aH(ue,w.u_color_ramp),u_opacity:new a.aI(ue,w.u_opacity)}),hillshade:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_image:new a.aH(ue,w.u_image),u_latrange:new a.aO(ue,w.u_latrange),u_light:new a.aO(ue,w.u_light),u_shadow:new a.aL(ue,w.u_shadow),u_highlight:new a.aL(ue,w.u_highlight),u_accent:new a.aL(ue,w.u_accent)}),hillshadePrepare:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_image:new a.aH(ue,w.u_image),u_dimension:new a.aO(ue,w.u_dimension),u_zoom:new a.aI(ue,w.u_zoom),u_unpack:new a.aK(ue,w.u_unpack)}),line:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_ratio:new a.aI(ue,w.u_ratio),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(ue,w.u_units_to_pixels)}),lineGradient:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_ratio:new a.aI(ue,w.u_ratio),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(ue,w.u_units_to_pixels),u_image:new a.aH(ue,w.u_image),u_image_height:new a.aI(ue,w.u_image_height)}),linePattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_texsize:new a.aO(ue,w.u_texsize),u_ratio:new a.aI(ue,w.u_ratio),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_image:new a.aH(ue,w.u_image),u_units_to_pixels:new a.aO(ue,w.u_units_to_pixels),u_scale:new a.aN(ue,w.u_scale),u_fade:new a.aI(ue,w.u_fade)}),lineSDF:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_ratio:new a.aI(ue,w.u_ratio),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_units_to_pixels:new a.aO(ue,w.u_units_to_pixels),u_patternscale_a:new a.aO(ue,w.u_patternscale_a),u_patternscale_b:new a.aO(ue,w.u_patternscale_b),u_sdfgamma:new a.aI(ue,w.u_sdfgamma),u_image:new a.aH(ue,w.u_image),u_tex_y_a:new a.aI(ue,w.u_tex_y_a),u_tex_y_b:new a.aI(ue,w.u_tex_y_b),u_mix:new a.aI(ue,w.u_mix)}),raster:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_tl_parent:new a.aO(ue,w.u_tl_parent),u_scale_parent:new a.aI(ue,w.u_scale_parent),u_buffer_scale:new a.aI(ue,w.u_buffer_scale),u_fade_t:new a.aI(ue,w.u_fade_t),u_opacity:new a.aI(ue,w.u_opacity),u_image0:new a.aH(ue,w.u_image0),u_image1:new a.aH(ue,w.u_image1),u_brightness_low:new a.aI(ue,w.u_brightness_low),u_brightness_high:new a.aI(ue,w.u_brightness_high),u_saturation_factor:new a.aI(ue,w.u_saturation_factor),u_contrast_factor:new a.aI(ue,w.u_contrast_factor),u_spin_weights:new a.aN(ue,w.u_spin_weights)}),symbolIcon:(ue,w)=>({u_is_size_zoom_constant:new a.aH(ue,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(ue,w.u_is_size_feature_constant),u_size_t:new a.aI(ue,w.u_size_t),u_size:new a.aI(ue,w.u_size),u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_pitch:new a.aI(ue,w.u_pitch),u_rotate_symbol:new a.aH(ue,w.u_rotate_symbol),u_aspect_ratio:new a.aI(ue,w.u_aspect_ratio),u_fade_change:new a.aI(ue,w.u_fade_change),u_matrix:new a.aJ(ue,w.u_matrix),u_label_plane_matrix:new a.aJ(ue,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(ue,w.u_coord_matrix),u_is_text:new a.aH(ue,w.u_is_text),u_pitch_with_map:new a.aH(ue,w.u_pitch_with_map),u_is_along_line:new a.aH(ue,w.u_is_along_line),u_is_variable_anchor:new a.aH(ue,w.u_is_variable_anchor),u_texsize:new a.aO(ue,w.u_texsize),u_texture:new a.aH(ue,w.u_texture),u_translation:new a.aO(ue,w.u_translation),u_pitched_scale:new a.aI(ue,w.u_pitched_scale)}),symbolSDF:(ue,w)=>({u_is_size_zoom_constant:new a.aH(ue,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(ue,w.u_is_size_feature_constant),u_size_t:new a.aI(ue,w.u_size_t),u_size:new a.aI(ue,w.u_size),u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_pitch:new a.aI(ue,w.u_pitch),u_rotate_symbol:new a.aH(ue,w.u_rotate_symbol),u_aspect_ratio:new a.aI(ue,w.u_aspect_ratio),u_fade_change:new a.aI(ue,w.u_fade_change),u_matrix:new a.aJ(ue,w.u_matrix),u_label_plane_matrix:new a.aJ(ue,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(ue,w.u_coord_matrix),u_is_text:new a.aH(ue,w.u_is_text),u_pitch_with_map:new a.aH(ue,w.u_pitch_with_map),u_is_along_line:new a.aH(ue,w.u_is_along_line),u_is_variable_anchor:new a.aH(ue,w.u_is_variable_anchor),u_texsize:new a.aO(ue,w.u_texsize),u_texture:new a.aH(ue,w.u_texture),u_gamma_scale:new a.aI(ue,w.u_gamma_scale),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_is_halo:new a.aH(ue,w.u_is_halo),u_translation:new a.aO(ue,w.u_translation),u_pitched_scale:new a.aI(ue,w.u_pitched_scale)}),symbolTextAndIcon:(ue,w)=>({u_is_size_zoom_constant:new a.aH(ue,w.u_is_size_zoom_constant),u_is_size_feature_constant:new a.aH(ue,w.u_is_size_feature_constant),u_size_t:new a.aI(ue,w.u_size_t),u_size:new a.aI(ue,w.u_size),u_camera_to_center_distance:new a.aI(ue,w.u_camera_to_center_distance),u_pitch:new a.aI(ue,w.u_pitch),u_rotate_symbol:new a.aH(ue,w.u_rotate_symbol),u_aspect_ratio:new a.aI(ue,w.u_aspect_ratio),u_fade_change:new a.aI(ue,w.u_fade_change),u_matrix:new a.aJ(ue,w.u_matrix),u_label_plane_matrix:new a.aJ(ue,w.u_label_plane_matrix),u_coord_matrix:new a.aJ(ue,w.u_coord_matrix),u_is_text:new a.aH(ue,w.u_is_text),u_pitch_with_map:new a.aH(ue,w.u_pitch_with_map),u_is_along_line:new a.aH(ue,w.u_is_along_line),u_is_variable_anchor:new a.aH(ue,w.u_is_variable_anchor),u_texsize:new a.aO(ue,w.u_texsize),u_texsize_icon:new a.aO(ue,w.u_texsize_icon),u_texture:new a.aH(ue,w.u_texture),u_texture_icon:new a.aH(ue,w.u_texture_icon),u_gamma_scale:new a.aI(ue,w.u_gamma_scale),u_device_pixel_ratio:new a.aI(ue,w.u_device_pixel_ratio),u_is_halo:new a.aH(ue,w.u_is_halo),u_translation:new a.aO(ue,w.u_translation),u_pitched_scale:new a.aI(ue,w.u_pitched_scale)}),background:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_opacity:new a.aI(ue,w.u_opacity),u_color:new a.aL(ue,w.u_color)}),backgroundPattern:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_opacity:new a.aI(ue,w.u_opacity),u_image:new a.aH(ue,w.u_image),u_pattern_tl_a:new a.aO(ue,w.u_pattern_tl_a),u_pattern_br_a:new a.aO(ue,w.u_pattern_br_a),u_pattern_tl_b:new a.aO(ue,w.u_pattern_tl_b),u_pattern_br_b:new a.aO(ue,w.u_pattern_br_b),u_texsize:new a.aO(ue,w.u_texsize),u_mix:new a.aI(ue,w.u_mix),u_pattern_size_a:new a.aO(ue,w.u_pattern_size_a),u_pattern_size_b:new a.aO(ue,w.u_pattern_size_b),u_scale_a:new a.aI(ue,w.u_scale_a),u_scale_b:new a.aI(ue,w.u_scale_b),u_pixel_coord_upper:new a.aO(ue,w.u_pixel_coord_upper),u_pixel_coord_lower:new a.aO(ue,w.u_pixel_coord_lower),u_tile_units_to_pixels:new a.aI(ue,w.u_tile_units_to_pixels)}),terrain:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_texture:new a.aH(ue,w.u_texture),u_ele_delta:new a.aI(ue,w.u_ele_delta),u_fog_matrix:new a.aJ(ue,w.u_fog_matrix),u_fog_color:new a.aL(ue,w.u_fog_color),u_fog_ground_blend:new a.aI(ue,w.u_fog_ground_blend),u_fog_ground_blend_opacity:new a.aI(ue,w.u_fog_ground_blend_opacity),u_horizon_color:new a.aL(ue,w.u_horizon_color),u_horizon_fog_blend:new a.aI(ue,w.u_horizon_fog_blend)}),terrainDepth:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_ele_delta:new a.aI(ue,w.u_ele_delta)}),terrainCoords:(ue,w)=>({u_matrix:new a.aJ(ue,w.u_matrix),u_texture:new a.aH(ue,w.u_texture),u_terrain_coords_id:new a.aI(ue,w.u_terrain_coords_id),u_ele_delta:new a.aI(ue,w.u_ele_delta)}),sky:(ue,w)=>({u_sky_color:new a.aL(ue,w.u_sky_color),u_horizon_color:new a.aL(ue,w.u_horizon_color),u_horizon:new a.aI(ue,w.u_horizon),u_sky_horizon_blend:new a.aI(ue,w.u_sky_horizon_blend)})};class bs{constructor(w,B,Q){this.context=w;let ee=w.gl;this.buffer=ee.createBuffer(),this.dynamicDraw=!!Q,this.context.unbindVAO(),w.bindElementBuffer.set(this.buffer),ee.bufferData(ee.ELEMENT_ARRAY_BUFFER,B.arrayBuffer,this.dynamicDraw?ee.DYNAMIC_DRAW:ee.STATIC_DRAW),this.dynamicDraw||delete B.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(w){let B=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),B.bufferSubData(B.ELEMENT_ARRAY_BUFFER,0,w.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Rn={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class _a{constructor(w,B,Q,ee){this.length=B.length,this.attributes=Q,this.itemSize=B.bytesPerElement,this.dynamicDraw=ee,this.context=w;let le=w.gl;this.buffer=le.createBuffer(),w.bindVertexBuffer.set(this.buffer),le.bufferData(le.ARRAY_BUFFER,B.arrayBuffer,this.dynamicDraw?le.DYNAMIC_DRAW:le.STATIC_DRAW),this.dynamicDraw||delete B.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(w){if(w.length!==this.length)throw new Error(`Length of new data is ${w.length}, which doesn't match current length of ${this.length}`);let B=this.context.gl;this.bind(),B.bufferSubData(B.ARRAY_BUFFER,0,w.arrayBuffer)}enableAttributes(w,B){for(let Q=0;Q0){let jt=a.H();a.aQ(jt,Xe.placementInvProjMatrix,ue.transform.glCoordMatrix),a.aQ(jt,jt,Xe.placementViewportMatrix),ut.push({circleArray:qt,circleOffset:Jt,transform:Qe.posMatrix,invTransform:jt,coord:Qe}),Mt+=qt.length/4,Jt=Mt}nt&&Ze.draw(le,ze.LINES,Po.disabled,Ko.disabled,ue.colorModeForRenderPass(),Pa.disabled,{u_matrix:Qe.posMatrix,u_pixel_extrude_scale:[1/($t=ue.transform).width,1/$t.height]},ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(Qe),B.id,nt.layoutVertexBuffer,nt.indexBuffer,nt.segments,null,ue.transform.zoom,null,null,nt.collisionVertexBuffer)}var $t;if(!ee||!ut.length)return;let mr=ue.useProgram("collisionCircle"),Cr=new a.aR;Cr.resize(4*Mt),Cr._trim();let ve=0;for(let qe of ut)for(let Qe=0;Qe=0&&(qe[Xe.associatedIconIndex]={shiftedAnchor:Yn,angle:Aa})}else Pi(Xe.numGlyphs,xe)}if(Mt){Ie.clear();let Qe=ue.icon.placedSymbolArray;for(let Xe=0;Xeue.style.map.terrain.getElevation(Hr,at,Wt):null,Pt=B.layout.get("text-rotation-alignment")==="map";We(Ci,Hr.posMatrix,ue,ee,Ul,au,qe,Mt,Pt,xe,Hr.toUnwrapped(),ve.width,ve.height,Js,Ye)}let Tl=Hr.posMatrix,Al=ee&&fr||dc,X=Qe||Al?bl:Ul,se=Lu,Te=Ln&&B.paint.get(ee?"text-halo-width":"icon-halo-width").constantOr(1)!==0,Oe;Oe=Ln?Ci.iconsInText?ls(Yn.kind,$a,Xe,qe,Qe,Al,ue,Tl,X,se,Js,Qa,Ts,Fr):Io(Yn.kind,$a,Xe,qe,Qe,Al,ue,Tl,X,se,Js,ee,Qa,!0,Fr):zs(Yn.kind,$a,Xe,qe,Qe,Al,ue,Tl,X,se,Js,ee,Qa,Fr);let Ve={program:fa,buffers:cn,uniformValues:Oe,atlasTexture:mo,atlasTextureIcon:wo,atlasInterpolation:Bo,atlasInterpolationIcon:Ps,isSDF:Ln,hasHalo:Te};if(qt&&Ci.canOverlap){jt=!0;let Ye=cn.segments.get();for(let Pt of Ye)br.push({segments:new a.a0([Pt]),sortKey:Pt.sortKey,state:Ve,terrainData:Co})}else br.push({segments:cn.segments,sortKey:0,state:Ve,terrainData:Co})}jt&&br.sort((Hr,ri)=>Hr.sortKey-ri.sortKey);for(let Hr of br){let ri=Hr.state;if(mr.activeTexture.set(Cr.TEXTURE0),ri.atlasTexture.bind(ri.atlasInterpolation,Cr.CLAMP_TO_EDGE),ri.atlasTextureIcon&&(mr.activeTexture.set(Cr.TEXTURE1),ri.atlasTextureIcon&&ri.atlasTextureIcon.bind(ri.atlasInterpolationIcon,Cr.CLAMP_TO_EDGE)),ri.isSDF){let Ci=ri.uniformValues;ri.hasHalo&&(Ci.u_is_halo=1,Qf(ri.buffers,Hr.segments,B,ue,ri.program,ar,Jt,$t,Ci,Hr.terrainData)),Ci.u_is_halo=0}Qf(ri.buffers,Hr.segments,B,ue,ri.program,ar,Jt,$t,ri.uniformValues,Hr.terrainData)}}function Qf(ue,w,B,Q,ee,le,ze,Ze,ut,Mt){let Jt=Q.context;ee.draw(Jt,Jt.gl.TRIANGLES,le,ze,Ze,Pa.disabled,ut,Mt,B.id,ue.layoutVertexBuffer,ue.indexBuffer,w,B.paint,Q.transform.zoom,ue.programConfigurations.get(B.id),ue.dynamicLayoutVertexBuffer,ue.opacityVertexBuffer)}function _f(ue,w,B,Q){let ee=ue.context,le=ee.gl,ze=Ko.disabled,Ze=new Os([le.ONE,le.ONE],a.aM.transparent,[!0,!0,!0,!0]),ut=w.getBucket(B);if(!ut)return;let Mt=Q.key,Jt=B.heatmapFbos.get(Mt);Jt||(Jt=eh(ee,w.tileSize,w.tileSize),B.heatmapFbos.set(Mt,Jt)),ee.bindFramebuffer.set(Jt.framebuffer),ee.viewport.set([0,0,w.tileSize,w.tileSize]),ee.clear({color:a.aM.transparent});let $t=ut.programConfigurations.get(B.id),mr=ue.useProgram("heatmap",$t),Cr=ue.style.map.terrain.getTerrainData(Q);mr.draw(ee,le.TRIANGLES,Po.disabled,ze,Ze,Pa.disabled,ko(Q.posMatrix,w,ue.transform.zoom,B.paint.get("heatmap-intensity")),Cr,B.id,ut.layoutVertexBuffer,ut.indexBuffer,ut.segments,B.paint,ue.transform.zoom,$t)}function Yc(ue,w,B){let Q=ue.context,ee=Q.gl;Q.setColorMode(ue.colorModeForRenderPass());let le=th(Q,w),ze=B.key,Ze=w.heatmapFbos.get(ze);Ze&&(Q.activeTexture.set(ee.TEXTURE0),ee.bindTexture(ee.TEXTURE_2D,Ze.colorAttachment.get()),Q.activeTexture.set(ee.TEXTURE1),le.bind(ee.LINEAR,ee.CLAMP_TO_EDGE),ue.useProgram("heatmapTexture").draw(Q,ee.TRIANGLES,Po.disabled,Ko.disabled,ue.colorModeForRenderPass(),Pa.disabled,Ds(ue,w,0,1),null,w.id,ue.rasterBoundsBuffer,ue.quadTriangleIndexBuffer,ue.rasterBoundsSegments,w.paint,ue.transform.zoom),Ze.destroy(),w.heatmapFbos.delete(ze))}function eh(ue,w,B){var Q,ee;let le=ue.gl,ze=le.createTexture();le.bindTexture(le.TEXTURE_2D,ze),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_WRAP_S,le.CLAMP_TO_EDGE),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_WRAP_T,le.CLAMP_TO_EDGE),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_MIN_FILTER,le.LINEAR),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_MAG_FILTER,le.LINEAR);let Ze=(Q=ue.HALF_FLOAT)!==null&&Q!==void 0?Q:le.UNSIGNED_BYTE,ut=(ee=ue.RGBA16F)!==null&&ee!==void 0?ee:le.RGBA;le.texImage2D(le.TEXTURE_2D,0,ut,w,B,0,le.RGBA,Ze,null);let Mt=ue.createFramebuffer(w,B,!1,!1);return Mt.colorAttachment.set(ze),Mt}function th(ue,w){return w.colorRampTexture||(w.colorRampTexture=new g(ue,w.colorRamp,ue.gl.RGBA)),w.colorRampTexture}function ju(ue,w,B,Q,ee){if(!B||!Q||!Q.imageAtlas)return;let le=Q.imageAtlas.patternPositions,ze=le[B.to.toString()],Ze=le[B.from.toString()];if(!ze&&Ze&&(ze=Ze),!Ze&&ze&&(Ze=ze),!ze||!Ze){let ut=ee.getPaintProperty(w);ze=le[ut],Ze=le[ut]}ze&&Ze&&ue.setConstantPatternPositions(ze,Ze)}function jf(ue,w,B,Q,ee,le,ze){let Ze=ue.context.gl,ut="fill-pattern",Mt=B.paint.get(ut),Jt=Mt&&Mt.constantOr(1),$t=B.getCrossfadeParameters(),mr,Cr,ve,xe,Ie;ze?(Cr=Jt&&!B.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",mr=Ze.LINES):(Cr=Jt?"fillPattern":"fill",mr=Ze.TRIANGLES);let qe=Mt.constantOr(null);for(let Qe of Q){let Xe=w.getTile(Qe);if(Jt&&!Xe.patternsLoaded())continue;let nt=Xe.getBucket(B);if(!nt)continue;let qt=nt.programConfigurations.get(B.id),jt=ue.useProgram(Cr,qt),ar=ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(Qe);Jt&&(ue.context.activeTexture.set(Ze.TEXTURE0),Xe.imageAtlasTexture.bind(Ze.LINEAR,Ze.CLAMP_TO_EDGE),qt.updatePaintBuffers($t)),ju(qt,ut,qe,Xe,B);let fr=ar?Qe:null,br=ue.translatePosMatrix(fr?fr.posMatrix:Qe.posMatrix,Xe,B.paint.get("fill-translate"),B.paint.get("fill-translate-anchor"));if(ze){xe=nt.indexBuffer2,Ie=nt.segments2;let Fr=[Ze.drawingBufferWidth,Ze.drawingBufferHeight];ve=Cr==="fillOutlinePattern"&&Jt?Ma(br,ue,$t,Xe,Fr):ea(br,Fr)}else xe=nt.indexBuffer,Ie=nt.segments,ve=Jt?ya(br,ue,$t,Xe):_n(br);jt.draw(ue.context,mr,ee,ue.stencilModeForClipping(Qe),le,Pa.disabled,ve,ar,B.id,nt.layoutVertexBuffer,xe,Ie,B.paint,ue.transform.zoom,qt)}}function cc(ue,w,B,Q,ee,le,ze){let Ze=ue.context,ut=Ze.gl,Mt="fill-extrusion-pattern",Jt=B.paint.get(Mt),$t=Jt.constantOr(1),mr=B.getCrossfadeParameters(),Cr=B.paint.get("fill-extrusion-opacity"),ve=Jt.constantOr(null);for(let xe of Q){let Ie=w.getTile(xe),qe=Ie.getBucket(B);if(!qe)continue;let Qe=ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(xe),Xe=qe.programConfigurations.get(B.id),nt=ue.useProgram($t?"fillExtrusionPattern":"fillExtrusion",Xe);$t&&(ue.context.activeTexture.set(ut.TEXTURE0),Ie.imageAtlasTexture.bind(ut.LINEAR,ut.CLAMP_TO_EDGE),Xe.updatePaintBuffers(mr)),ju(Xe,Mt,ve,Ie,B);let qt=ue.translatePosMatrix(xe.posMatrix,Ie,B.paint.get("fill-extrusion-translate"),B.paint.get("fill-extrusion-translate-anchor")),jt=B.paint.get("fill-extrusion-vertical-gradient"),ar=$t?ki(qt,ue,jt,Cr,xe,mr,Ie):En(qt,ue,jt,Cr);nt.draw(Ze,Ze.gl.TRIANGLES,ee,le,ze,Pa.backCCW,ar,Qe,B.id,qe.layoutVertexBuffer,qe.indexBuffer,qe.segments,B.paint,ue.transform.zoom,Xe,ue.style.map.terrain&&qe.centroidVertexBuffer)}}function of(ue,w,B,Q,ee,le,ze){let Ze=ue.context,ut=Ze.gl,Mt=B.fbo;if(!Mt)return;let Jt=ue.useProgram("hillshade"),$t=ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(w);Ze.activeTexture.set(ut.TEXTURE0),ut.bindTexture(ut.TEXTURE_2D,Mt.colorAttachment.get()),Jt.draw(Ze,ut.TRIANGLES,ee,le,ze,Pa.disabled,((mr,Cr,ve,xe)=>{let Ie=ve.paint.get("hillshade-shadow-color"),qe=ve.paint.get("hillshade-highlight-color"),Qe=ve.paint.get("hillshade-accent-color"),Xe=ve.paint.get("hillshade-illumination-direction")*(Math.PI/180);ve.paint.get("hillshade-illumination-anchor")==="viewport"&&(Xe-=mr.transform.angle);let nt=!mr.options.moving;return{u_matrix:xe?xe.posMatrix:mr.transform.calculatePosMatrix(Cr.tileID.toUnwrapped(),nt),u_image:0,u_latrange:Fs(0,Cr.tileID),u_light:[ve.paint.get("hillshade-exaggeration"),Xe],u_shadow:Ie,u_highlight:qe,u_accent:Qe}})(ue,B,Q,$t?w:null),$t,Q.id,ue.rasterBoundsBuffer,ue.quadTriangleIndexBuffer,ue.rasterBoundsSegments)}function Nl(ue,w,B,Q,ee,le){let ze=ue.context,Ze=ze.gl,ut=w.dem;if(ut&&ut.data){let Mt=ut.dim,Jt=ut.stride,$t=ut.getPixels();if(ze.activeTexture.set(Ze.TEXTURE1),ze.pixelStoreUnpackPremultiplyAlpha.set(!1),w.demTexture=w.demTexture||ue.getTileTexture(Jt),w.demTexture){let Cr=w.demTexture;Cr.update($t,{premultiply:!1}),Cr.bind(Ze.NEAREST,Ze.CLAMP_TO_EDGE)}else w.demTexture=new g(ze,$t,Ze.RGBA,{premultiply:!1}),w.demTexture.bind(Ze.NEAREST,Ze.CLAMP_TO_EDGE);ze.activeTexture.set(Ze.TEXTURE0);let mr=w.fbo;if(!mr){let Cr=new g(ze,{width:Mt,height:Mt,data:null},Ze.RGBA);Cr.bind(Ze.LINEAR,Ze.CLAMP_TO_EDGE),mr=w.fbo=ze.createFramebuffer(Mt,Mt,!0,!1),mr.colorAttachment.set(Cr.texture)}ze.bindFramebuffer.set(mr.framebuffer),ze.viewport.set([0,0,Mt,Mt]),ue.useProgram("hillshadePrepare").draw(ze,Ze.TRIANGLES,Q,ee,le,Pa.disabled,((Cr,ve)=>{let xe=ve.stride,Ie=a.H();return a.aP(Ie,0,a.X,-a.X,0,0,1),a.J(Ie,Ie,[0,-a.X,0]),{u_matrix:Ie,u_image:1,u_dimension:[xe,xe],u_zoom:Cr.overscaledZ,u_unpack:ve.getUnpackVector()}})(w.tileID,ut),null,B.id,ue.rasterBoundsBuffer,ue.quadTriangleIndexBuffer,ue.rasterBoundsSegments),w.needsHillshadePrepare=!1}}function Kc(ue,w,B,Q,ee,le){let ze=Q.paint.get("raster-fade-duration");if(!le&&ze>0){let Ze=u.now(),ut=(Ze-ue.timeAdded)/ze,Mt=w?(Ze-w.timeAdded)/ze:-1,Jt=B.getSource(),$t=ee.coveringZoomLevel({tileSize:Jt.tileSize,roundZoom:Jt.roundZoom}),mr=!w||Math.abs(w.tileID.overscaledZ-$t)>Math.abs(ue.tileID.overscaledZ-$t),Cr=mr&&ue.refreshedUponExpiration?1:a.ac(mr?ut:1-Mt,0,1);return ue.refreshedUponExpiration&&ut>=1&&(ue.refreshedUponExpiration=!1),w?{opacity:1,mix:1-Cr}:{opacity:Cr,mix:0}}return{opacity:1,mix:0}}let Rc=new a.aM(1,0,0,1),gs=new a.aM(0,1,0,1),Wf=new a.aM(0,0,1,1),Wh=new a.aM(1,0,1,1),rh=new a.aM(0,1,1,1);function sf(ue,w,B,Q){Mu(ue,0,w+B/2,ue.transform.width,B,Q)}function Sh(ue,w,B,Q){Mu(ue,w-B/2,0,B,ue.transform.height,Q)}function Mu(ue,w,B,Q,ee,le){let ze=ue.context,Ze=ze.gl;Ze.enable(Ze.SCISSOR_TEST),Ze.scissor(w*ue.pixelRatio,B*ue.pixelRatio,Q*ue.pixelRatio,ee*ue.pixelRatio),ze.clear({color:le}),Ze.disable(Ze.SCISSOR_TEST)}function ih(ue,w,B){let Q=ue.context,ee=Q.gl,le=B.posMatrix,ze=ue.useProgram("debug"),Ze=Po.disabled,ut=Ko.disabled,Mt=ue.colorModeForRenderPass(),Jt="$debug",$t=ue.style.map.terrain&&ue.style.map.terrain.getTerrainData(B);Q.activeTexture.set(ee.TEXTURE0);let mr=w.getTileByID(B.key).latestRawTileData,Cr=Math.floor((mr&&mr.byteLength||0)/1024),ve=w.getTile(B).tileSize,xe=512/Math.min(ve,512)*(B.overscaledZ/ue.transform.zoom)*.5,Ie=B.canonical.toString();B.overscaledZ!==B.canonical.z&&(Ie+=` => ${B.overscaledZ}`),function(qe,Qe){qe.initDebugOverlayCanvas();let Xe=qe.debugOverlayCanvas,nt=qe.context.gl,qt=qe.debugOverlayCanvas.getContext("2d");qt.clearRect(0,0,Xe.width,Xe.height),qt.shadowColor="white",qt.shadowBlur=2,qt.lineWidth=1.5,qt.strokeStyle="white",qt.textBaseline="top",qt.font="bold 36px Open Sans, sans-serif",qt.fillText(Qe,5,5),qt.strokeText(Qe,5,5),qe.debugOverlayTexture.update(Xe),qe.debugOverlayTexture.bind(nt.LINEAR,nt.CLAMP_TO_EDGE)}(ue,`${Ie} ${Cr}kB`),ze.draw(Q,ee.TRIANGLES,Ze,ut,Os.alphaBlended,Pa.disabled,po(le,a.aM.transparent,xe),null,Jt,ue.debugBuffer,ue.quadTriangleIndexBuffer,ue.debugSegments),ze.draw(Q,ee.LINE_STRIP,Ze,ut,Mt,Pa.disabled,po(le,a.aM.red),$t,Jt,ue.debugBuffer,ue.tileBorderIndexBuffer,ue.debugSegments)}function js(ue,w,B){let Q=ue.context,ee=Q.gl,le=ue.colorModeForRenderPass(),ze=new Po(ee.LEQUAL,Po.ReadWrite,ue.depthRangeFor3D),Ze=ue.useProgram("terrain"),ut=w.getTerrainMesh();Q.bindFramebuffer.set(null),Q.viewport.set([0,0,ue.width,ue.height]);for(let Mt of B){let Jt=ue.renderToTexture.getTexture(Mt),$t=w.getTerrainData(Mt.tileID);Q.activeTexture.set(ee.TEXTURE0),ee.bindTexture(ee.TEXTURE_2D,Jt.texture);let mr=ue.transform.calculatePosMatrix(Mt.tileID.toUnwrapped()),Cr=w.getMeshFrameDelta(ue.transform.zoom),ve=ue.transform.calculateFogMatrix(Mt.tileID.toUnwrapped()),xe=Jr(mr,Cr,ve,ue.style.sky,ue.transform.pitch);Ze.draw(Q,ee.TRIANGLES,ze,Ko.disabled,le,Pa.backCCW,xe,$t,"terrain",ut.vertexBuffer,ut.indexBuffer,ut.segments)}}class Eu{constructor(w,B,Q){this.vertexBuffer=w,this.indexBuffer=B,this.segments=Q}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class Dc{constructor(w,B){this.context=new od(w),this.transform=B,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:a.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=pt.maxUnderzooming+pt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Xo}resize(w,B,Q){if(this.width=Math.floor(w*Q),this.height=Math.floor(B*Q),this.pixelRatio=Q,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let ee of this.style._order)this.style._layers[ee].resize()}setup(){let w=this.context,B=new a.aX;B.emplaceBack(0,0),B.emplaceBack(a.X,0),B.emplaceBack(0,a.X),B.emplaceBack(a.X,a.X),this.tileExtentBuffer=w.createVertexBuffer(B,vo.members),this.tileExtentSegments=a.a0.simpleSegment(0,0,4,2);let Q=new a.aX;Q.emplaceBack(0,0),Q.emplaceBack(a.X,0),Q.emplaceBack(0,a.X),Q.emplaceBack(a.X,a.X),this.debugBuffer=w.createVertexBuffer(Q,vo.members),this.debugSegments=a.a0.simpleSegment(0,0,4,5);let ee=new a.$;ee.emplaceBack(0,0,0,0),ee.emplaceBack(a.X,0,a.X,0),ee.emplaceBack(0,a.X,0,a.X),ee.emplaceBack(a.X,a.X,a.X,a.X),this.rasterBoundsBuffer=w.createVertexBuffer(ee,ct.members),this.rasterBoundsSegments=a.a0.simpleSegment(0,0,4,2);let le=new a.aX;le.emplaceBack(0,0),le.emplaceBack(1,0),le.emplaceBack(0,1),le.emplaceBack(1,1),this.viewportBuffer=w.createVertexBuffer(le,vo.members),this.viewportSegments=a.a0.simpleSegment(0,0,4,2);let ze=new a.aZ;ze.emplaceBack(0),ze.emplaceBack(1),ze.emplaceBack(3),ze.emplaceBack(2),ze.emplaceBack(0),this.tileBorderIndexBuffer=w.createIndexBuffer(ze);let Ze=new a.aY;Ze.emplaceBack(0,1,2),Ze.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=w.createIndexBuffer(Ze);let ut=this.context.gl;this.stencilClearMode=new Ko({func:ut.ALWAYS,mask:0},0,255,ut.ZERO,ut.ZERO,ut.ZERO)}clearStencil(){let w=this.context,B=w.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let Q=a.H();a.aP(Q,0,this.width,this.height,0,0,1),a.K(Q,Q,[B.drawingBufferWidth,B.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(w,B.TRIANGLES,Po.disabled,this.stencilClearMode,Os.disabled,Pa.disabled,Lo(Q),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(w,B){if(this.currentStencilSource===w.source||!w.isTileClipped()||!B||!B.length)return;this.currentStencilSource=w.source;let Q=this.context,ee=Q.gl;this.nextStencilID+B.length>256&&this.clearStencil(),Q.setColorMode(Os.disabled),Q.setDepthMode(Po.disabled);let le=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(let ze of B){let Ze=this._tileClippingMaskIDs[ze.key]=this.nextStencilID++,ut=this.style.map.terrain&&this.style.map.terrain.getTerrainData(ze);le.draw(Q,ee.TRIANGLES,Po.disabled,new Ko({func:ee.ALWAYS,mask:0},Ze,255,ee.KEEP,ee.KEEP,ee.REPLACE),Os.disabled,Pa.disabled,Lo(ze.posMatrix),ut,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let w=this.nextStencilID++,B=this.context.gl;return new Ko({func:B.NOTEQUAL,mask:255},w,255,B.KEEP,B.KEEP,B.REPLACE)}stencilModeForClipping(w){let B=this.context.gl;return new Ko({func:B.EQUAL,mask:255},this._tileClippingMaskIDs[w.key],0,B.KEEP,B.KEEP,B.REPLACE)}stencilConfigForOverlap(w){let B=this.context.gl,Q=w.sort((ze,Ze)=>Ze.overscaledZ-ze.overscaledZ),ee=Q[Q.length-1].overscaledZ,le=Q[0].overscaledZ-ee+1;if(le>1){this.currentStencilSource=void 0,this.nextStencilID+le>256&&this.clearStencil();let ze={};for(let Ze=0;Ze({u_sky_color:qe.properties.get("sky-color"),u_horizon_color:qe.properties.get("horizon-color"),u_horizon:(Qe.height/2+Qe.getHorizon())*Xe,u_sky_horizon_blend:qe.properties.get("sky-horizon-blend")*Qe.height/2*Xe}))(Mt,ut.style.map.transform,ut.pixelRatio),Cr=new Po($t.LEQUAL,Po.ReadWrite,[0,1]),ve=Ko.disabled,xe=ut.colorModeForRenderPass(),Ie=ut.useProgram("sky");if(!Mt.mesh){let qe=new a.aX;qe.emplaceBack(-1,-1),qe.emplaceBack(1,-1),qe.emplaceBack(1,1),qe.emplaceBack(-1,1);let Qe=new a.aY;Qe.emplaceBack(0,1,2),Qe.emplaceBack(0,2,3),Mt.mesh=new Eu(Jt.createVertexBuffer(qe,vo.members),Jt.createIndexBuffer(Qe),a.a0.simpleSegment(0,0,qe.length,Qe.length))}Ie.draw(Jt,$t.TRIANGLES,Cr,ve,xe,Pa.disabled,mr,void 0,"sky",Mt.mesh.vertexBuffer,Mt.mesh.indexBuffer,Mt.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=B.showOverdrawInspector,this.depthRangeFor3D=[0,1-(w._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=Q.length-1;this.currentLayer>=0;this.currentLayer--){let ut=this.style._layers[Q[this.currentLayer]],Mt=ee[ut.source],Jt=le[ut.source];this._renderTileClippingMasks(ut,Jt),this.renderLayer(this,Mt,ut,Jt)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayerIe.source&&!Ie.isHidden(Jt)?[Mt.sourceCaches[Ie.source]]:[]),Cr=mr.filter(Ie=>Ie.getSource().type==="vector"),ve=mr.filter(Ie=>Ie.getSource().type!=="vector"),xe=Ie=>{(!$t||$t.getSource().maxzoomxe(Ie)),$t||ve.forEach(Ie=>xe(Ie)),$t}(this.style,this.transform.zoom);ut&&function(Mt,Jt,$t){for(let mr=0;mr<$t.length;mr++)ih(Mt,Jt,$t[mr])}(this,ut,ut.getVisibleCoordinates())}this.options.showPadding&&function(ut){let Mt=ut.transform.padding;sf(ut,ut.transform.height-(Mt.top||0),3,Rc),sf(ut,Mt.bottom||0,3,gs),Sh(ut,Mt.left||0,3,Wf),Sh(ut,ut.transform.width-(Mt.right||0),3,Wh);let Jt=ut.transform.centerPoint;(function($t,mr,Cr,ve){Mu($t,mr-1,Cr-10,2,20,ve),Mu($t,mr-10,Cr-1,20,2,ve)})(ut,Jt.x,ut.transform.height-Jt.y,rh)}(this),this.context.setDefault()}maybeDrawDepthAndCoords(w){if(!this.style||!this.style.map||!this.style.map.terrain)return;let B=this.terrainFacilitator.matrix,Q=this.transform.modelViewProjectionMatrix,ee=this.terrainFacilitator.dirty;ee||(ee=w?!a.a_(B,Q):!a.a$(B,Q)),ee||(ee=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),ee&&(a.b0(B,Q),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(le,ze){let Ze=le.context,ut=Ze.gl,Mt=Os.unblended,Jt=new Po(ut.LEQUAL,Po.ReadWrite,[0,1]),$t=ze.getTerrainMesh(),mr=ze.sourceCache.getRenderableTiles(),Cr=le.useProgram("terrainDepth");Ze.bindFramebuffer.set(ze.getFramebuffer("depth").framebuffer),Ze.viewport.set([0,0,le.width/devicePixelRatio,le.height/devicePixelRatio]),Ze.clear({color:a.aM.transparent,depth:1});for(let ve of mr){let xe=ze.getTerrainData(ve.tileID),Ie={u_matrix:le.transform.calculatePosMatrix(ve.tileID.toUnwrapped()),u_ele_delta:ze.getMeshFrameDelta(le.transform.zoom)};Cr.draw(Ze,ut.TRIANGLES,Jt,Ko.disabled,Mt,Pa.backCCW,Ie,xe,"terrain",$t.vertexBuffer,$t.indexBuffer,$t.segments)}Ze.bindFramebuffer.set(null),Ze.viewport.set([0,0,le.width,le.height])}(this,this.style.map.terrain),function(le,ze){let Ze=le.context,ut=Ze.gl,Mt=Os.unblended,Jt=new Po(ut.LEQUAL,Po.ReadWrite,[0,1]),$t=ze.getTerrainMesh(),mr=ze.getCoordsTexture(),Cr=ze.sourceCache.getRenderableTiles(),ve=le.useProgram("terrainCoords");Ze.bindFramebuffer.set(ze.getFramebuffer("coords").framebuffer),Ze.viewport.set([0,0,le.width/devicePixelRatio,le.height/devicePixelRatio]),Ze.clear({color:a.aM.transparent,depth:1}),ze.coordsIndex=[];for(let xe of Cr){let Ie=ze.getTerrainData(xe.tileID);Ze.activeTexture.set(ut.TEXTURE0),ut.bindTexture(ut.TEXTURE_2D,mr.texture);let qe={u_matrix:le.transform.calculatePosMatrix(xe.tileID.toUnwrapped()),u_terrain_coords_id:(255-ze.coordsIndex.length)/255,u_texture:0,u_ele_delta:ze.getMeshFrameDelta(le.transform.zoom)};ve.draw(Ze,ut.TRIANGLES,Jt,Ko.disabled,Mt,Pa.backCCW,qe,Ie,"terrain",$t.vertexBuffer,$t.indexBuffer,$t.segments),ze.coordsIndex.push(xe.tileID.key)}Ze.bindFramebuffer.set(null),Ze.viewport.set([0,0,le.width,le.height])}(this,this.style.map.terrain))}renderLayer(w,B,Q,ee){if(!Q.isHidden(this.transform.zoom)&&(Q.type==="background"||Q.type==="custom"||(ee||[]).length))switch(this.id=Q.id,Q.type){case"symbol":(function(le,ze,Ze,ut,Mt){if(le.renderPass!=="translucent")return;let Jt=Ko.disabled,$t=le.colorModeForRenderPass();(Ze._unevaluatedLayout.hasValue("text-variable-anchor")||Ze._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(mr,Cr,ve,xe,Ie,qe,Qe,Xe,nt){let qt=Cr.transform,jt=yn(),ar=Ie==="map",fr=qe==="map";for(let br of mr){let Fr=xe.getTile(br),Hr=Fr.getBucket(ve);if(!Hr||!Hr.text||!Hr.text.segments.get().length)continue;let ri=a.ag(Hr.textSizeData,qt.zoom),Ci=Fn(Fr,1,Cr.transform.zoom),cn=qr(br.posMatrix,fr,ar,Cr.transform,Ci),sn=ve.layout.get("icon-text-fit")!=="none"&&Hr.hasIconData();if(ri){let Ln=Math.pow(2,qt.zoom-Fr.tileID.overscaledZ),Yn=Cr.style.map.terrain?(fa,$a)=>Cr.style.map.terrain.getElevation(br,fa,$a):null,Aa=jt.translatePosition(qt,Fr,Qe,Xe);yf(Hr,ar,fr,nt,qt,cn,br.posMatrix,Ln,ri,sn,jt,Aa,br.toUnwrapped(),Yn)}}}(ut,le,Ze,ze,Ze.layout.get("text-rotation-alignment"),Ze.layout.get("text-pitch-alignment"),Ze.paint.get("text-translate"),Ze.paint.get("text-translate-anchor"),Mt),Ze.paint.get("icon-opacity").constantOr(1)!==0&&Ah(le,ze,Ze,ut,!1,Ze.paint.get("icon-translate"),Ze.paint.get("icon-translate-anchor"),Ze.layout.get("icon-rotation-alignment"),Ze.layout.get("icon-pitch-alignment"),Ze.layout.get("icon-keep-upright"),Jt,$t),Ze.paint.get("text-opacity").constantOr(1)!==0&&Ah(le,ze,Ze,ut,!0,Ze.paint.get("text-translate"),Ze.paint.get("text-translate-anchor"),Ze.layout.get("text-rotation-alignment"),Ze.layout.get("text-pitch-alignment"),Ze.layout.get("text-keep-upright"),Jt,$t),ze.map.showCollisionBoxes&&(Hu(le,ze,Ze,ut,!0),Hu(le,ze,Ze,ut,!1))})(w,B,Q,ee,this.style.placement.variableOffsets);break;case"circle":(function(le,ze,Ze,ut){if(le.renderPass!=="translucent")return;let Mt=Ze.paint.get("circle-opacity"),Jt=Ze.paint.get("circle-stroke-width"),$t=Ze.paint.get("circle-stroke-opacity"),mr=!Ze.layout.get("circle-sort-key").isConstant();if(Mt.constantOr(1)===0&&(Jt.constantOr(1)===0||$t.constantOr(1)===0))return;let Cr=le.context,ve=Cr.gl,xe=le.depthModeForSublayer(0,Po.ReadOnly),Ie=Ko.disabled,qe=le.colorModeForRenderPass(),Qe=[];for(let Xe=0;XeXe.sortKey-nt.sortKey);for(let Xe of Qe){let{programConfiguration:nt,program:qt,layoutVertexBuffer:jt,indexBuffer:ar,uniformValues:fr,terrainData:br}=Xe.state;qt.draw(Cr,ve.TRIANGLES,xe,Ie,qe,Pa.disabled,fr,br,Ze.id,jt,ar,Xe.segments,Ze.paint,le.transform.zoom,nt)}})(w,B,Q,ee);break;case"heatmap":(function(le,ze,Ze,ut){if(Ze.paint.get("heatmap-opacity")===0)return;let Mt=le.context;if(le.style.map.terrain){for(let Jt of ut){let $t=ze.getTile(Jt);ze.hasRenderableParent(Jt)||(le.renderPass==="offscreen"?_f(le,$t,Ze,Jt):le.renderPass==="translucent"&&Yc(le,Ze,Jt))}Mt.viewport.set([0,0,le.width,le.height])}else le.renderPass==="offscreen"?function(Jt,$t,mr,Cr){let ve=Jt.context,xe=ve.gl,Ie=Ko.disabled,qe=new Os([xe.ONE,xe.ONE],a.aM.transparent,[!0,!0,!0,!0]);(function(Qe,Xe,nt){let qt=Qe.gl;Qe.activeTexture.set(qt.TEXTURE1),Qe.viewport.set([0,0,Xe.width/4,Xe.height/4]);let jt=nt.heatmapFbos.get(a.aU);jt?(qt.bindTexture(qt.TEXTURE_2D,jt.colorAttachment.get()),Qe.bindFramebuffer.set(jt.framebuffer)):(jt=eh(Qe,Xe.width/4,Xe.height/4),nt.heatmapFbos.set(a.aU,jt))})(ve,Jt,mr),ve.clear({color:a.aM.transparent});for(let Qe=0;Qe20&&Jt.texParameterf(Jt.TEXTURE_2D,Mt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Mt.extTextureFilterAnisotropicMax);let Hr=le.style.map.terrain&&le.style.map.terrain.getTerrainData(Qe),ri=Hr?Qe:null,Ci=ri?ri.posMatrix:le.transform.calculatePosMatrix(Qe.toUnwrapped(),qe),cn=cl(Ci,br||[0,0],fr||1,ar,Ze);$t instanceof Qt?mr.draw(Mt,Jt.TRIANGLES,Xe,Ko.disabled,Cr,Pa.disabled,cn,Hr,Ze.id,$t.boundsBuffer,le.quadTriangleIndexBuffer,$t.boundsSegments):mr.draw(Mt,Jt.TRIANGLES,Xe,ve[Qe.overscaledZ],Cr,Pa.disabled,cn,Hr,Ze.id,le.rasterBoundsBuffer,le.quadTriangleIndexBuffer,le.rasterBoundsSegments)}})(w,B,Q,ee);break;case"background":(function(le,ze,Ze,ut){let Mt=Ze.paint.get("background-color"),Jt=Ze.paint.get("background-opacity");if(Jt===0)return;let $t=le.context,mr=$t.gl,Cr=le.transform,ve=Cr.tileSize,xe=Ze.paint.get("background-pattern");if(le.isPatternMissing(xe))return;let Ie=!xe&&Mt.a===1&&Jt===1&&le.opaquePassEnabledForLayer()?"opaque":"translucent";if(le.renderPass!==Ie)return;let qe=Ko.disabled,Qe=le.depthModeForSublayer(0,Ie==="opaque"?Po.ReadWrite:Po.ReadOnly),Xe=le.colorModeForRenderPass(),nt=le.useProgram(xe?"backgroundPattern":"background"),qt=ut||Cr.coveringTiles({tileSize:ve,terrain:le.style.map.terrain});xe&&($t.activeTexture.set(mr.TEXTURE0),le.imageManager.bind(le.context));let jt=Ze.getCrossfadeParameters();for(let ar of qt){let fr=ut?ar.posMatrix:le.transform.calculatePosMatrix(ar.toUnwrapped()),br=xe?Su(fr,Jt,le,xe,{tileID:ar,tileSize:ve},jt):Yl(fr,Jt,Mt),Fr=le.style.map.terrain&&le.style.map.terrain.getTerrainData(ar);nt.draw($t,mr.TRIANGLES,Qe,qe,Xe,Pa.disabled,br,Fr,Ze.id,le.tileExtentBuffer,le.quadTriangleIndexBuffer,le.tileExtentSegments)}})(w,0,Q,ee);break;case"custom":(function(le,ze,Ze){let ut=le.context,Mt=Ze.implementation;if(le.renderPass==="offscreen"){let Jt=Mt.prerender;Jt&&(le.setCustomLayerDefaults(),ut.setColorMode(le.colorModeForRenderPass()),Jt.call(Mt,ut.gl,le.transform.customLayerMatrix()),ut.setDirty(),le.setBaseState())}else if(le.renderPass==="translucent"){le.setCustomLayerDefaults(),ut.setColorMode(le.colorModeForRenderPass()),ut.setStencilMode(Ko.disabled);let Jt=Mt.renderingMode==="3d"?new Po(le.context.gl.LEQUAL,Po.ReadWrite,le.depthRangeFor3D):le.depthModeForSublayer(0,Po.ReadOnly);ut.setDepthMode(Jt),Mt.render(ut.gl,le.transform.customLayerMatrix(),{farZ:le.transform.farZ,nearZ:le.transform.nearZ,fov:le.transform._fov,modelViewProjectionMatrix:le.transform.modelViewProjectionMatrix,projectionMatrix:le.transform.projectionMatrix}),ut.setDirty(),le.setBaseState(),ut.bindFramebuffer.set(null)}})(w,0,Q)}}translatePosMatrix(w,B,Q,ee,le){if(!Q[0]&&!Q[1])return w;let ze=le?ee==="map"?this.transform.angle:0:ee==="viewport"?-this.transform.angle:0;if(ze){let Mt=Math.sin(ze),Jt=Math.cos(ze);Q=[Q[0]*Jt-Q[1]*Mt,Q[0]*Mt+Q[1]*Jt]}let Ze=[le?Q[0]:Fn(B,Q[0],this.transform.zoom),le?Q[1]:Fn(B,Q[1],this.transform.zoom),0],ut=new Float32Array(16);return a.J(ut,w,Ze),ut}saveTileTexture(w){let B=this._tileTextures[w.size[0]];B?B.push(w):this._tileTextures[w.size[0]]=[w]}getTileTexture(w){let B=this._tileTextures[w];return B&&B.length>0?B.pop():null}isPatternMissing(w){if(!w)return!1;if(!w.from||!w.to)return!0;let B=this.imageManager.getPattern(w.from.toString()),Q=this.imageManager.getPattern(w.to.toString());return!B||!Q}useProgram(w,B){this.cache=this.cache||{};let Q=w+(B?B.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[Q]||(this.cache[Q]=new hn(this.context,Gn[w],B,nc[w],this._showOverdrawInspector,this.style.map.terrain)),this.cache[Q]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let w=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(w.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new g(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){let{drawingBufferWidth:w,drawingBufferHeight:B}=this.context.gl;return this.width!==w||this.height!==B}}class ks{constructor(w,B){this.points=w,this.planes=B}static fromInvProjectionMatrix(w,B,Q){let ee=Math.pow(2,Q),le=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(Ze=>{let ut=1/(Ze=a.af([],Ze,w))[3]/B*ee;return a.b1(Ze,Ze,[ut,ut,1/Ze[3],ut])}),ze=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(Ze=>{let ut=function(mr,Cr){var ve=Cr[0],xe=Cr[1],Ie=Cr[2],qe=ve*ve+xe*xe+Ie*Ie;return qe>0&&(qe=1/Math.sqrt(qe)),mr[0]=Cr[0]*qe,mr[1]=Cr[1]*qe,mr[2]=Cr[2]*qe,mr}([],function(mr,Cr,ve){var xe=Cr[0],Ie=Cr[1],qe=Cr[2],Qe=ve[0],Xe=ve[1],nt=ve[2];return mr[0]=Ie*nt-qe*Xe,mr[1]=qe*Qe-xe*nt,mr[2]=xe*Xe-Ie*Qe,mr}([],L([],le[Ze[0]],le[Ze[1]]),L([],le[Ze[2]],le[Ze[1]]))),Mt=-((Jt=ut)[0]*($t=le[Ze[1]])[0]+Jt[1]*$t[1]+Jt[2]*$t[2]);var Jt,$t;return ut.concat(Mt)});return new ks(le,ze)}}class bc{constructor(w,B){this.min=w,this.max=B,this.center=function(Q,ee,le){return Q[0]=.5*ee[0],Q[1]=.5*ee[1],Q[2]=.5*ee[2],Q}([],function(Q,ee,le){return Q[0]=ee[0]+le[0],Q[1]=ee[1]+le[1],Q[2]=ee[2]+le[2],Q}([],this.min,this.max))}quadrant(w){let B=[w%2==0,w<2],Q=M(this.min),ee=M(this.max);for(let le=0;le=0&&ze++;if(ze===0)return 0;ze!==B.length&&(Q=!1)}if(Q)return 2;for(let ee=0;ee<3;ee++){let le=Number.MAX_VALUE,ze=-Number.MAX_VALUE;for(let Ze=0;Zethis.max[ee]-this.min[ee])return 0}return 1}}class hu{constructor(w=0,B=0,Q=0,ee=0){if(isNaN(w)||w<0||isNaN(B)||B<0||isNaN(Q)||Q<0||isNaN(ee)||ee<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=w,this.bottom=B,this.left=Q,this.right=ee}interpolate(w,B,Q){return B.top!=null&&w.top!=null&&(this.top=a.y.number(w.top,B.top,Q)),B.bottom!=null&&w.bottom!=null&&(this.bottom=a.y.number(w.bottom,B.bottom,Q)),B.left!=null&&w.left!=null&&(this.left=a.y.number(w.left,B.left,Q)),B.right!=null&&w.right!=null&&(this.right=a.y.number(w.right,B.right,Q)),this}getCenter(w,B){let Q=a.ac((this.left+w-this.right)/2,0,w),ee=a.ac((this.top+B-this.bottom)/2,0,B);return new a.P(Q,ee)}equals(w){return this.top===w.top&&this.bottom===w.bottom&&this.left===w.left&&this.right===w.right}clone(){return new hu(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}let _u=85.051129;class nl{constructor(w,B,Q,ee,le){this.tileSize=512,this._renderWorldCopies=le===void 0||!!le,this._minZoom=w||0,this._maxZoom=B||22,this._minPitch=Q==null?0:Q,this._maxPitch=ee==null?60:ee,this.setMaxBounds(),this.width=0,this.height=0,this._center=new a.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new hu,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){let w=new nl(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return w.apply(this),w}apply(w){this.tileSize=w.tileSize,this.latRange=w.latRange,this.lngRange=w.lngRange,this.width=w.width,this.height=w.height,this._center=w._center,this._elevation=w._elevation,this.minElevationForCurrentTile=w.minElevationForCurrentTile,this.zoom=w.zoom,this.angle=w.angle,this._fov=w._fov,this._pitch=w._pitch,this._unmodified=w._unmodified,this._edgeInsets=w._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(w){this._minZoom!==w&&(this._minZoom=w,this.zoom=Math.max(this.zoom,w))}get maxZoom(){return this._maxZoom}set maxZoom(w){this._maxZoom!==w&&(this._maxZoom=w,this.zoom=Math.min(this.zoom,w))}get minPitch(){return this._minPitch}set minPitch(w){this._minPitch!==w&&(this._minPitch=w,this.pitch=Math.max(this.pitch,w))}get maxPitch(){return this._maxPitch}set maxPitch(w){this._maxPitch!==w&&(this._maxPitch=w,this.pitch=Math.min(this.pitch,w))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(w){w===void 0?w=!0:w===null&&(w=!1),this._renderWorldCopies=w}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new a.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(w){let B=-a.b3(w,-180,180)*Math.PI/180;this.angle!==B&&(this._unmodified=!1,this.angle=B,this._calcMatrices(),this.rotationMatrix=function(){var Q=new a.A(4);return a.A!=Float32Array&&(Q[1]=0,Q[2]=0),Q[0]=1,Q[3]=1,Q}(),function(Q,ee,le){var ze=ee[0],Ze=ee[1],ut=ee[2],Mt=ee[3],Jt=Math.sin(le),$t=Math.cos(le);Q[0]=ze*$t+ut*Jt,Q[1]=Ze*$t+Mt*Jt,Q[2]=ze*-Jt+ut*$t,Q[3]=Ze*-Jt+Mt*$t}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(w){let B=a.ac(w,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==B&&(this._unmodified=!1,this._pitch=B,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(w){w=Math.max(.01,Math.min(60,w)),this._fov!==w&&(this._unmodified=!1,this._fov=w/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(w){let B=Math.min(Math.max(w,this.minZoom),this.maxZoom);this._zoom!==B&&(this._unmodified=!1,this._zoom=B,this.tileZoom=Math.max(0,Math.floor(B)),this.scale=this.zoomScale(B),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(w){w.lat===this._center.lat&&w.lng===this._center.lng||(this._unmodified=!1,this._center=w,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(w){w!==this._elevation&&(this._elevation=w,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(w){this._edgeInsets.equals(w)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,w,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(w){return this._edgeInsets.equals(w)}interpolatePadding(w,B,Q){this._unmodified=!1,this._edgeInsets.interpolate(w,B,Q),this._constrain(),this._calcMatrices()}coveringZoomLevel(w){let B=(w.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/w.tileSize));return Math.max(0,B)}getVisibleUnwrappedCoordinates(w){let B=[new a.b4(0,w)];if(this._renderWorldCopies){let Q=this.pointCoordinate(new a.P(0,0)),ee=this.pointCoordinate(new a.P(this.width,0)),le=this.pointCoordinate(new a.P(this.width,this.height)),ze=this.pointCoordinate(new a.P(0,this.height)),Ze=Math.floor(Math.min(Q.x,ee.x,le.x,ze.x)),ut=Math.floor(Math.max(Q.x,ee.x,le.x,ze.x)),Mt=1;for(let Jt=Ze-Mt;Jt<=ut+Mt;Jt++)Jt!==0&&B.push(new a.b4(Jt,w))}return B}coveringTiles(w){var B,Q;let ee=this.coveringZoomLevel(w),le=ee;if(w.minzoom!==void 0&&eew.maxzoom&&(ee=w.maxzoom);let ze=this.pointCoordinate(this.getCameraPoint()),Ze=a.Z.fromLngLat(this.center),ut=Math.pow(2,ee),Mt=[ut*ze.x,ut*ze.y,0],Jt=[ut*Ze.x,ut*Ze.y,0],$t=ks.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,ee),mr=w.minzoom||0;!w.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(mr=ee);let Cr=w.terrain?2/Math.min(this.tileSize,w.tileSize)*this.tileSize:3,ve=Xe=>({aabb:new bc([Xe*ut,0,0],[(Xe+1)*ut,ut,0]),zoom:0,x:0,y:0,wrap:Xe,fullyVisible:!1}),xe=[],Ie=[],qe=ee,Qe=w.reparseOverscaled?le:ee;if(this._renderWorldCopies)for(let Xe=1;Xe<=3;Xe++)xe.push(ve(-Xe)),xe.push(ve(Xe));for(xe.push(ve(0));xe.length>0;){let Xe=xe.pop(),nt=Xe.x,qt=Xe.y,jt=Xe.fullyVisible;if(!jt){let Hr=Xe.aabb.intersects($t);if(Hr===0)continue;jt=Hr===2}let ar=w.terrain?Mt:Jt,fr=Xe.aabb.distanceX(ar),br=Xe.aabb.distanceY(ar),Fr=Math.max(Math.abs(fr),Math.abs(br));if(Xe.zoom===qe||Fr>Cr+(1<=mr){let Hr=qe-Xe.zoom,ri=Mt[0]-.5-(nt<>1),cn=Xe.zoom+1,sn=Xe.aabb.quadrant(Hr);if(w.terrain){let Ln=new a.S(cn,Xe.wrap,cn,ri,Ci),Yn=w.terrain.getMinMaxElevation(Ln),Aa=(B=Yn.minElevation)!==null&&B!==void 0?B:this.elevation,fa=(Q=Yn.maxElevation)!==null&&Q!==void 0?Q:this.elevation;sn=new bc([sn.min[0],sn.min[1],Aa],[sn.max[0],sn.max[1],fa])}xe.push({aabb:sn,zoom:cn,x:ri,y:Ci,wrap:Xe.wrap,fullyVisible:jt})}}return Ie.sort((Xe,nt)=>Xe.distanceSq-nt.distanceSq).map(Xe=>Xe.tileID)}resize(w,B){this.width=w,this.height=B,this.pixelsToGLUnits=[2/w,-2/B],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(w){return Math.pow(2,w)}scaleZoom(w){return Math.log(w)/Math.LN2}project(w){let B=a.ac(w.lat,-85.051129,_u);return new a.P(a.O(w.lng)*this.worldSize,a.Q(B)*this.worldSize)}unproject(w){return new a.Z(w.x/this.worldSize,w.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(w){let B=this.elevation,Q=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,ee=this.pointLocation(this.centerPoint,w),le=w.getElevationForLngLatZoom(ee,this.tileZoom);if(!(this.elevation-le))return;let ze=Q+B-le,Ze=Math.cos(this._pitch)*this.cameraToCenterDistance/ze/a.b5(1,ee.lat),ut=this.scaleZoom(Ze/this.tileSize);this._elevation=le,this._center=ee,this.zoom=ut}setLocationAtPoint(w,B){let Q=this.pointCoordinate(B),ee=this.pointCoordinate(this.centerPoint),le=this.locationCoordinate(w),ze=new a.Z(le.x-(Q.x-ee.x),le.y-(Q.y-ee.y));this.center=this.coordinateLocation(ze),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(w,B){return B?this.coordinatePoint(this.locationCoordinate(w),B.getElevationForLngLatZoom(w,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(w))}pointLocation(w,B){return this.coordinateLocation(this.pointCoordinate(w,B))}locationCoordinate(w){return a.Z.fromLngLat(w)}coordinateLocation(w){return w&&w.toLngLat()}pointCoordinate(w,B){if(B){let mr=B.pointCoordinate(w);if(mr!=null)return mr}let Q=[w.x,w.y,0,1],ee=[w.x,w.y,1,1];a.af(Q,Q,this.pixelMatrixInverse),a.af(ee,ee,this.pixelMatrixInverse);let le=Q[3],ze=ee[3],Ze=Q[1]/le,ut=ee[1]/ze,Mt=Q[2]/le,Jt=ee[2]/ze,$t=Mt===Jt?0:(0-Mt)/(Jt-Mt);return new a.Z(a.y.number(Q[0]/le,ee[0]/ze,$t)/this.worldSize,a.y.number(Ze,ut,$t)/this.worldSize)}coordinatePoint(w,B=0,Q=this.pixelMatrix){let ee=[w.x*this.worldSize,w.y*this.worldSize,B,1];return a.af(ee,ee,Q),new a.P(ee[0]/ee[3],ee[1]/ee[3])}getBounds(){let w=Math.max(0,this.height/2-this.getHorizon());return new ce().extend(this.pointLocation(new a.P(0,w))).extend(this.pointLocation(new a.P(this.width,w))).extend(this.pointLocation(new a.P(this.width,this.height))).extend(this.pointLocation(new a.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new ce([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(w){w?(this.lngRange=[w.getWest(),w.getEast()],this.latRange=[w.getSouth(),w.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,_u])}calculateTileMatrix(w){let B=w.canonical,Q=this.worldSize/this.zoomScale(B.z),ee=B.x+Math.pow(2,B.z)*w.wrap,le=a.an(new Float64Array(16));return a.J(le,le,[ee*Q,B.y*Q,0]),a.K(le,le,[Q/a.X,Q/a.X,1]),le}calculatePosMatrix(w,B=!1){let Q=w.key,ee=B?this._alignedPosMatrixCache:this._posMatrixCache;if(ee[Q])return ee[Q];let le=this.calculateTileMatrix(w);return a.L(le,B?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,le),ee[Q]=new Float32Array(le),ee[Q]}calculateFogMatrix(w){let B=w.key,Q=this._fogMatrixCache;if(Q[B])return Q[B];let ee=this.calculateTileMatrix(w);return a.L(ee,this.fogMatrix,ee),Q[B]=new Float32Array(ee),Q[B]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(w,B){B=a.ac(+B,this.minZoom,this.maxZoom);let Q={center:new a.N(w.lng,w.lat),zoom:B},ee=this.lngRange;if(!this._renderWorldCopies&&ee===null){let Xe=179.9999999999;ee=[-Xe,Xe]}let le=this.tileSize*this.zoomScale(Q.zoom),ze=0,Ze=le,ut=0,Mt=le,Jt=0,$t=0,{x:mr,y:Cr}=this.size;if(this.latRange){let Xe=this.latRange;ze=a.Q(Xe[1])*le,Ze=a.Q(Xe[0])*le,Ze-zeZe&&(qe=Ze-Xe)}if(ee){let Xe=(ut+Mt)/2,nt=ve;this._renderWorldCopies&&(nt=a.b3(ve,Xe-le/2,Xe+le/2));let qt=mr/2;nt-qtMt&&(Ie=Mt-qt)}if(Ie!==void 0||qe!==void 0){let Xe=new a.P(Ie!=null?Ie:ve,qe!=null?qe:xe);Q.center=this.unproject.call({worldSize:le},Xe).wrap()}return Q}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let w=this._unmodified,{center:B,zoom:Q}=this.getConstrained(this.center,this.zoom);this.center=B,this.zoom=Q,this._unmodified=w,this._constraining=!1}_calcMatrices(){if(!this.height)return;let w=this.centerOffset,B=this.point.x,Q=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=a.b5(1,this.center.lat)*this.worldSize;let ee=a.an(new Float64Array(16));a.K(ee,ee,[this.width/2,-this.height/2,1]),a.J(ee,ee,[1,-1,0]),this.labelPlaneMatrix=ee,ee=a.an(new Float64Array(16)),a.K(ee,ee,[1,-1,1]),a.J(ee,ee,[-1,-1,0]),a.K(ee,ee,[2/this.width,2/this.height,1]),this.glCoordMatrix=ee;let le=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),ze=Math.min(this.elevation,this.minElevationForCurrentTile),Ze=le-ze*this._pixelPerMeter/Math.cos(this._pitch),ut=ze<0?Ze:le,Mt=Math.PI/2+this._pitch,Jt=this._fov*(.5+w.y/this.height),$t=Math.sin(Jt)*ut/Math.sin(a.ac(Math.PI-Mt-Jt,.01,Math.PI-.01)),mr=this.getHorizon(),Cr=2*Math.atan(mr/this.cameraToCenterDistance)*(.5+w.y/(2*mr)),ve=Math.sin(Cr)*ut/Math.sin(a.ac(Math.PI-Mt-Cr,.01,Math.PI-.01)),xe=Math.min($t,ve);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*xe+ut),this.nearZ=this.height/50,ee=new Float64Array(16),a.b6(ee,this._fov,this.width/this.height,this.nearZ,this.farZ),ee[8]=2*-w.x/this.width,ee[9]=2*w.y/this.height,this.projectionMatrix=a.ae(ee),a.K(ee,ee,[1,-1,1]),a.J(ee,ee,[0,0,-this.cameraToCenterDistance]),a.b7(ee,ee,this._pitch),a.ad(ee,ee,this.angle),a.J(ee,ee,[-B,-Q,0]),this.mercatorMatrix=a.K([],ee,[this.worldSize,this.worldSize,this.worldSize]),a.K(ee,ee,[1,1,this._pixelPerMeter]),this.pixelMatrix=a.L(new Float64Array(16),this.labelPlaneMatrix,ee),a.J(ee,ee,[0,0,-this.elevation]),this.modelViewProjectionMatrix=ee,this.invModelViewProjectionMatrix=a.as([],ee),this.fogMatrix=new Float64Array(16),a.b6(this.fogMatrix,this._fov,this.width/this.height,le,this.farZ),this.fogMatrix[8]=2*-w.x/this.width,this.fogMatrix[9]=2*w.y/this.height,a.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),a.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),a.b7(this.fogMatrix,this.fogMatrix,this._pitch),a.ad(this.fogMatrix,this.fogMatrix,this.angle),a.J(this.fogMatrix,this.fogMatrix,[-B,-Q,0]),a.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),a.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=a.L(new Float64Array(16),this.labelPlaneMatrix,ee);let Ie=this.width%2/2,qe=this.height%2/2,Qe=Math.cos(this.angle),Xe=Math.sin(this.angle),nt=B-Math.round(B)+Qe*Ie+Xe*qe,qt=Q-Math.round(Q)+Qe*qe+Xe*Ie,jt=new Float64Array(ee);if(a.J(jt,jt,[nt>.5?nt-1:nt,qt>.5?qt-1:qt,0]),this.alignedModelViewProjectionMatrix=jt,ee=a.as(new Float64Array(16),this.pixelMatrix),!ee)throw new Error("failed to invert matrix");this.pixelMatrixInverse=ee,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;let w=this.pointCoordinate(new a.P(0,0)),B=[w.x*this.worldSize,w.y*this.worldSize,0,1];return a.af(B,B,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){let w=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new a.P(0,w))}getCameraQueryGeometry(w){let B=this.getCameraPoint();if(w.length===1)return[w[0],B];{let Q=B.x,ee=B.y,le=B.x,ze=B.y;for(let Ze of w)Q=Math.min(Q,Ze.x),ee=Math.min(ee,Ze.y),le=Math.max(le,Ze.x),ze=Math.max(ze,Ze.y);return[new a.P(Q,ee),new a.P(le,ee),new a.P(le,ze),new a.P(Q,ze),new a.P(Q,ee)]}}lngLatToCameraDepth(w,B){let Q=this.locationCoordinate(w),ee=[Q.x*this.worldSize,Q.y*this.worldSize,B,1];return a.af(ee,ee,this.modelViewProjectionMatrix),ee[2]/ee[3]}}function nh(ue,w){let B,Q=!1,ee=null,le=null,ze=()=>{ee=null,Q&&(ue.apply(le,B),ee=setTimeout(ze,w),Q=!1)};return(...Ze)=>(Q=!0,le=this,B=Ze,ee||ze(),ee)}class Mh{constructor(w){this._getCurrentHash=()=>{let B=window.location.hash.replace("#","");if(this._hashName){let Q;return B.split("&").map(ee=>ee.split("=")).forEach(ee=>{ee[0]===this._hashName&&(Q=ee)}),(Q&&Q[1]||"").split("/")}return B.split("/")},this._onHashChange=()=>{let B=this._getCurrentHash();if(B.length>=3&&!B.some(Q=>isNaN(Q))){let Q=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(B[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+B[2],+B[1]],zoom:+B[0],bearing:Q,pitch:+(B[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{let B=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,B)},this._removeHash=()=>{let B=this._getCurrentHash();if(B.length===0)return;let Q=B.join("/"),ee=Q;ee.split("&").length>0&&(ee=ee.split("&")[0]),this._hashName&&(ee=`${this._hashName}=${Q}`);let le=window.location.hash.replace(ee,"");le.startsWith("#&")?le=le.slice(0,1)+le.slice(2):le==="#"&&(le="");let ze=window.location.href.replace(/(#.+)?$/,le);ze=ze.replace("&&","&"),window.history.replaceState(window.history.state,null,ze)},this._updateHash=nh(this._updateHashUnthrottled,300),this._hashName=w&&encodeURIComponent(w)}addTo(w){return this._map=w,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(w){let B=this._map.getCenter(),Q=Math.round(100*this._map.getZoom())/100,ee=Math.ceil((Q*Math.LN2+Math.log(512/360/.5))/Math.LN10),le=Math.pow(10,ee),ze=Math.round(B.lng*le)/le,Ze=Math.round(B.lat*le)/le,ut=this._map.getBearing(),Mt=this._map.getPitch(),Jt="";if(Jt+=w?`/${ze}/${Ze}/${Q}`:`${Q}/${Ze}/${ze}`,(ut||Mt)&&(Jt+="/"+Math.round(10*ut)/10),Mt&&(Jt+=`/${Math.round(Mt)}`),this._hashName){let $t=this._hashName,mr=!1,Cr=window.location.hash.slice(1).split("&").map(ve=>{let xe=ve.split("=")[0];return xe===$t?(mr=!0,`${xe}=${Jt}`):ve}).filter(ve=>ve);return mr||Cr.push(`${$t}=${Jt}`),`#${Cr.join("&")}`}return`#${Jt}`}}let zu={linearity:.3,easing:a.b8(0,0,.3,1)},Fc=a.e({deceleration:2500,maxSpeed:1400},zu),wc=a.e({deceleration:20,maxSpeed:1400},zu),bd=a.e({deceleration:1e3,maxSpeed:360},zu),xf=a.e({deceleration:1e3,maxSpeed:90},zu);class Pf{constructor(w){this._map=w,this.clear()}clear(){this._inertiaBuffer=[]}record(w){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:u.now(),settings:w})}_drainInertiaBuffer(){let w=this._inertiaBuffer,B=u.now();for(;w.length>0&&B-w[0].time>160;)w.shift()}_onMoveEnd(w){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let B={zoom:0,bearing:0,pitch:0,pan:new a.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:le}of this._inertiaBuffer)B.zoom+=le.zoomDelta||0,B.bearing+=le.bearingDelta||0,B.pitch+=le.pitchDelta||0,le.panDelta&&B.pan._add(le.panDelta),le.around&&(B.around=le.around),le.pinchAround&&(B.pinchAround=le.pinchAround);let Q=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,ee={};if(B.pan.mag()){let le=bf(B.pan.mag(),Q,a.e({},Fc,w||{}));ee.offset=B.pan.mult(le.amount/B.pan.mag()),ee.center=this._map.transform.center,qu(ee,le)}if(B.zoom){let le=bf(B.zoom,Q,wc);ee.zoom=this._map.transform.zoom+le.amount,qu(ee,le)}if(B.bearing){let le=bf(B.bearing,Q,bd);ee.bearing=this._map.transform.bearing+a.ac(le.amount,-179,179),qu(ee,le)}if(B.pitch){let le=bf(B.pitch,Q,xf);ee.pitch=this._map.transform.pitch+le.amount,qu(ee,le)}if(ee.zoom||ee.bearing){let le=B.pinchAround===void 0?B.around:B.pinchAround;ee.around=le?this._map.unproject(le):this._map.getCenter()}return this.clear(),a.e(ee,{noMoveStart:!0})}}function qu(ue,w){(!ue.duration||ue.durationB.unproject(ut)),Ze=le.reduce((ut,Mt,Jt,$t)=>ut.add(Mt.div($t.length)),new a.P(0,0));super(w,{points:le,point:Ze,lngLats:ze,lngLat:B.unproject(Ze),originalEvent:Q}),this._defaultPrevented=!1}}class Xh extends a.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(w,B,Q){super(w,{originalEvent:Q}),this._defaultPrevented=!1}}class If{constructor(w,B){this._map=w,this._clickTolerance=B.clickTolerance}reset(){delete this._mousedownPos}wheel(w){return this._firePreventable(new Xh(w.type,this._map,w))}mousedown(w,B){return this._mousedownPos=B,this._firePreventable(new jl(w.type,this._map,w))}mouseup(w){this._map.fire(new jl(w.type,this._map,w))}click(w,B){this._mousedownPos&&this._mousedownPos.dist(B)>=this._clickTolerance||this._map.fire(new jl(w.type,this._map,w))}dblclick(w){return this._firePreventable(new jl(w.type,this._map,w))}mouseover(w){this._map.fire(new jl(w.type,this._map,w))}mouseout(w){this._map.fire(new jl(w.type,this._map,w))}touchstart(w){return this._firePreventable(new lf(w.type,this._map,w))}touchmove(w){this._map.fire(new lf(w.type,this._map,w))}touchend(w){this._map.fire(new lf(w.type,this._map,w))}touchcancel(w){this._map.fire(new lf(w.type,this._map,w))}_firePreventable(w){if(this._map.fire(w),w.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Cs{constructor(w){this._map=w}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(w){this._map.fire(new jl(w.type,this._map,w))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new jl("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(w){this._delayContextMenu?this._contextMenuEvent=w:this._ignoreContextMenu||this._map.fire(new jl(w.type,this._map,w)),this._map.listens("contextmenu")&&w.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class du{constructor(w){this._map=w}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(w){return this.transform.pointLocation(a.P.convert(w),this._map.terrain)}}class ku{constructor(w,B){this._map=w,this._tr=new du(w),this._el=w.getCanvasContainer(),this._container=w.getContainer(),this._clickTolerance=B.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(w,B){this.isEnabled()&&w.shiftKey&&w.button===0&&(c.disableDrag(),this._startPos=this._lastPos=B,this._active=!0)}mousemoveWindow(w,B){if(!this._active)return;let Q=B;if(this._lastPos.equals(Q)||!this._box&&Q.dist(this._startPos)le.fitScreenCoordinates(Q,ee,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",w)}keydown(w){this._active&&w.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",w))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(c.remove(this._box),this._box=null),c.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(w,B){return this._map.fire(new a.k(w,{originalEvent:B}))}}function Xf(ue,w){if(ue.length!==w.length)throw new Error(`The number of touches and points are not equal - touches ${ue.length}, points ${w.length}`);let B={};for(let Q=0;Qthis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=w.timeStamp),Q.length===this.numTouches&&(this.centroid=function(ee){let le=new a.P(0,0);for(let ze of ee)le._add(ze);return le.div(ee.length)}(B),this.touches=Xf(Q,B)))}touchmove(w,B,Q){if(this.aborted||!this.centroid)return;let ee=Xf(Q,B);for(let le in this.touches){let ze=ee[le];(!ze||ze.dist(this.touches[le])>30)&&(this.aborted=!0)}}touchend(w,B,Q){if((!this.centroid||w.timeStamp-this.startTime>500)&&(this.aborted=!0),Q.length===0){let ee=!this.aborted&&this.centroid;if(this.reset(),ee)return ee}}}class wf{constructor(w){this.singleTap=new Us(w),this.numTaps=w.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(w,B,Q){this.singleTap.touchstart(w,B,Q)}touchmove(w,B,Q){this.singleTap.touchmove(w,B,Q)}touchend(w,B,Q){let ee=this.singleTap.touchend(w,B,Q);if(ee){let le=w.timeStamp-this.lastTime<500,ze=!this.lastTap||this.lastTap.dist(ee)<30;if(le&&ze||this.reset(),this.count++,this.lastTime=w.timeStamp,this.lastTap=ee,this.count===this.numTaps)return this.reset(),ee}}}class zc{constructor(w){this._tr=new du(w),this._zoomIn=new wf({numTouches:1,numTaps:2}),this._zoomOut=new wf({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(w,B,Q){this._zoomIn.touchstart(w,B,Q),this._zoomOut.touchstart(w,B,Q)}touchmove(w,B,Q){this._zoomIn.touchmove(w,B,Q),this._zoomOut.touchmove(w,B,Q)}touchend(w,B,Q){let ee=this._zoomIn.touchend(w,B,Q),le=this._zoomOut.touchend(w,B,Q),ze=this._tr;return ee?(this._active=!0,w.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Ze=>Ze.easeTo({duration:300,zoom:ze.zoom+1,around:ze.unproject(ee)},{originalEvent:w})}):le?(this._active=!0,w.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Ze=>Ze.easeTo({duration:300,zoom:ze.zoom-1,around:ze.unproject(le)},{originalEvent:w})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Wu{constructor(w){this._enabled=!!w.enable,this._moveStateManager=w.moveStateManager,this._clickTolerance=w.clickTolerance||1,this._moveFunction=w.move,this._activateOnStart=!!w.activateOnStart,w.assignEvents(this),this.reset()}reset(w){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(w)}_move(...w){let B=this._moveFunction(...w);if(B.bearingDelta||B.pitchDelta||B.around||B.panDelta)return this._active=!0,B}dragStart(w,B){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(w)&&(this._moveStateManager.startMove(w),this._lastPoint=B.length?B[0]:B,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(w,B){if(!this.isEnabled())return;let Q=this._lastPoint;if(!Q)return;if(w.preventDefault(),!this._moveStateManager.isValidMoveEvent(w))return void this.reset(w);let ee=B.length?B[0]:B;return!this._moved&&ee.dist(Q){ue.mousedown=ue.dragStart,ue.mousemoveWindow=ue.dragMove,ue.mouseup=ue.dragEnd,ue.contextmenu=w=>{w.preventDefault()}},Wl=({enable:ue,clickTolerance:w,bearingDegreesPerPixelMoved:B=.8})=>{let Q=new Xu({checkCorrectEvent:ee=>c.mouseButton(ee)===0&&ee.ctrlKey||c.mouseButton(ee)===2});return new Wu({clickTolerance:w,move:(ee,le)=>({bearingDelta:(le.x-ee.x)*B}),moveStateManager:Q,enable:ue,assignEvents:Zf})},ah=({enable:ue,clickTolerance:w,pitchDegreesPerPixelMoved:B=-.5})=>{let Q=new Xu({checkCorrectEvent:ee=>c.mouseButton(ee)===0&&ee.ctrlKey||c.mouseButton(ee)===2});return new Wu({clickTolerance:w,move:(ee,le)=>({pitchDelta:(le.y-ee.y)*B}),moveStateManager:Q,enable:ue,assignEvents:Zf})};class Zu{constructor(w,B){this._clickTolerance=w.clickTolerance||1,this._map=B,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new a.P(0,0)}_shouldBePrevented(w){return w<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(w,B,Q){return this._calculateTransform(w,B,Q)}touchmove(w,B,Q){if(this._active){if(!this._shouldBePrevented(Q.length))return w.preventDefault(),this._calculateTransform(w,B,Q);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",w)}}touchend(w,B,Q){this._calculateTransform(w,B,Q),this._active&&this._shouldBePrevented(Q.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(w,B,Q){Q.length>0&&(this._active=!0);let ee=Xf(Q,B),le=new a.P(0,0),ze=new a.P(0,0),Ze=0;for(let Mt in ee){let Jt=ee[Mt],$t=this._touches[Mt];$t&&(le._add(Jt),ze._add(Jt.sub($t)),Ze++,ee[Mt]=Jt)}if(this._touches=ee,this._shouldBePrevented(Ze)||!ze.mag())return;let ut=ze.div(Ze);return this._sum._add(ut),this._sum.mag()Math.abs(ue.x)}class Bc extends qc{constructor(w){super(),this._currentTouchCount=0,this._map=w}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(w,B,Q){super.touchstart(w,B,Q),this._currentTouchCount=Q.length}_start(w){this._lastPoints=w,fc(w[0].sub(w[1]))&&(this._valid=!1)}_move(w,B,Q){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let ee=w[0].sub(this._lastPoints[0]),le=w[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(ee,le,Q.timeStamp),this._valid?(this._lastPoints=w,this._active=!0,{pitchDelta:(ee.y+le.y)/2*-.5}):void 0}gestureBeginsVertically(w,B,Q){if(this._valid!==void 0)return this._valid;let ee=w.mag()>=2,le=B.mag()>=2;if(!ee&&!le)return;if(!ee||!le)return this._firstMove===void 0&&(this._firstMove=Q),Q-this._firstMove<100&&void 0;let ze=w.y>0==B.y>0;return fc(w)&&fc(B)&&ze}}let kt={panStep:100,bearingStep:15,pitchStep:10};class Zt{constructor(w){this._tr=new du(w);let B=kt;this._panStep=B.panStep,this._bearingStep=B.bearingStep,this._pitchStep=B.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(w){if(w.altKey||w.ctrlKey||w.metaKey)return;let B=0,Q=0,ee=0,le=0,ze=0;switch(w.keyCode){case 61:case 107:case 171:case 187:B=1;break;case 189:case 109:case 173:B=-1;break;case 37:w.shiftKey?Q=-1:(w.preventDefault(),le=-1);break;case 39:w.shiftKey?Q=1:(w.preventDefault(),le=1);break;case 38:w.shiftKey?ee=1:(w.preventDefault(),ze=-1);break;case 40:w.shiftKey?ee=-1:(w.preventDefault(),ze=1);break;default:return}return this._rotationDisabled&&(Q=0,ee=0),{cameraAnimation:Ze=>{let ut=this._tr;Ze.easeTo({duration:300,easeId:"keyboardHandler",easing:Mr,zoom:B?Math.round(ut.zoom)+B*(w.shiftKey?2:1):ut.zoom,bearing:ut.bearing+Q*this._bearingStep,pitch:ut.pitch+ee*this._pitchStep,offset:[-le*this._panStep,-ze*this._panStep],center:ut.center},{originalEvent:w})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function Mr(ue){return ue*(2-ue)}let xr=4.000244140625;class Kr{constructor(w,B){this._onTimeout=Q=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(Q)},this._map=w,this._tr=new du(w),this._triggerRenderFrame=B,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(w){this._defaultZoomRate=w}setWheelZoomRate(w){this._wheelZoomRate=w}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(w){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!w&&w.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(w){return!!this._map.cooperativeGestures.isEnabled()&&!(w.ctrlKey||this._map.cooperativeGestures.isBypassed(w))}wheel(w){if(!this.isEnabled())return;if(this._shouldBePrevented(w))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",w);let B=w.deltaMode===WheelEvent.DOM_DELTA_LINE?40*w.deltaY:w.deltaY,Q=u.now(),ee=Q-(this._lastWheelEventTime||0);this._lastWheelEventTime=Q,B!==0&&B%xr==0?this._type="wheel":B!==0&&Math.abs(B)<4?this._type="trackpad":ee>400?(this._type=null,this._lastValue=B,this._timeout=setTimeout(this._onTimeout,40,w)):this._type||(this._type=Math.abs(ee*B)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,B+=this._lastValue)),w.shiftKey&&B&&(B/=4),this._type&&(this._lastWheelEvent=w,this._delta-=B,this._active||this._start(w)),w.preventDefault()}_start(w){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let B=c.mousePos(this._map.getCanvas(),w),Q=this._tr;this._around=B.y>Q.transform.height/2-Q.transform.getHorizon()?a.N.convert(this._aroundCenter?Q.center:Q.unproject(B)):a.N.convert(Q.center),this._aroundPoint=Q.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;let w=this._tr.transform;if(this._delta!==0){let ut=this._type==="wheel"&&Math.abs(this._delta)>xr?this._wheelZoomRate:this._defaultZoomRate,Mt=2/(1+Math.exp(-Math.abs(this._delta*ut)));this._delta<0&&Mt!==0&&(Mt=1/Mt);let Jt=typeof this._targetZoom=="number"?w.zoomScale(this._targetZoom):w.scale;this._targetZoom=Math.min(w.maxZoom,Math.max(w.minZoom,w.scaleZoom(Jt*Mt))),this._type==="wheel"&&(this._startZoom=w.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let B=typeof this._targetZoom=="number"?this._targetZoom:w.zoom,Q=this._startZoom,ee=this._easing,le,ze=!1,Ze=u.now()-this._lastWheelEventTime;if(this._type==="wheel"&&Q&&ee&&Ze){let ut=Math.min(Ze/200,1),Mt=ee(ut);le=a.y.number(Q,B,Mt),ut<1?this._frameId||(this._frameId=!0):ze=!0}else le=B,ze=!0;return this._active=!0,ze&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ze,zoomDelta:le-w.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(w){let B=a.b9;if(this._prevEase){let Q=this._prevEase,ee=(u.now()-Q.start)/Q.duration,le=Q.easing(ee+.01)-Q.easing(ee),ze=.27/Math.sqrt(le*le+1e-4)*.01,Ze=Math.sqrt(.0729-ze*ze);B=a.b8(ze,Ze,.25,1)}return this._prevEase={start:u.now(),duration:w,easing:B},B}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Mi{constructor(w,B){this._clickZoom=w,this._tapZoom=B}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class Wi{constructor(w){this._tr=new du(w),this.reset()}reset(){this._active=!1}dblclick(w,B){return w.preventDefault(),{cameraAnimation:Q=>{Q.easeTo({duration:300,zoom:this._tr.zoom+(w.shiftKey?-1:1),around:this._tr.unproject(B)},{originalEvent:w})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class dn{constructor(){this._tap=new wf({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(w,B,Q){if(!this._swipePoint)if(this._tapTime){let ee=B[0],le=w.timeStamp-this._tapTime<500,ze=this._tapPoint.dist(ee)<30;le&&ze?Q.length>0&&(this._swipePoint=ee,this._swipeTouch=Q[0].identifier):this.reset()}else this._tap.touchstart(w,B,Q)}touchmove(w,B,Q){if(this._tapTime){if(this._swipePoint){if(Q[0].identifier!==this._swipeTouch)return;let ee=B[0],le=ee.y-this._swipePoint.y;return this._swipePoint=ee,w.preventDefault(),this._active=!0,{zoomDelta:le/128}}}else this._tap.touchmove(w,B,Q)}touchend(w,B,Q){if(this._tapTime)this._swipePoint&&Q.length===0&&this.reset();else{let ee=this._tap.touchend(w,B,Q);ee&&(this._tapTime=w.timeStamp,this._tapPoint=ee)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class wn{constructor(w,B,Q){this._el=w,this._mousePan=B,this._touchPan=Q}enable(w){this._inertiaOptions=w||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class On{constructor(w,B,Q){this._pitchWithRotate=w.pitchWithRotate,this._mouseRotate=B,this._mousePitch=Q}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class Yi{constructor(w,B,Q,ee){this._el=w,this._touchZoom=B,this._touchRotate=Q,this._tapDragZoom=ee,this._rotationDisabled=!1,this._enabled=!0}enable(w){this._touchZoom.enable(w),this._rotationDisabled||this._touchRotate.enable(w),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class $i{constructor(w,B){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=w,this._options=B,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let w=this._map.getCanvasContainer();w.classList.add("maplibregl-cooperative-gestures"),this._container=c.create("div","maplibregl-cooperative-gesture-screen",w);let B=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(B=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let Q=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),ee=document.createElement("div");ee.className="maplibregl-desktop-message",ee.textContent=B,this._container.appendChild(ee);let le=document.createElement("div");le.className="maplibregl-mobile-message",le.textContent=Q,this._container.appendChild(le),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(c.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(w){return w[this._bypassKey]}notifyGestureBlocked(w,B){this._enabled&&(this._map.fire(new a.k("cooperativegestureprevented",{gestureType:w,originalEvent:B})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let an=ue=>ue.zoom||ue.drag||ue.pitch||ue.rotate;class Fi extends a.k{}function ta(ue){return ue.panDelta&&ue.panDelta.mag()||ue.zoomDelta||ue.bearingDelta||ue.pitchDelta}class Ca{constructor(w,B){this.handleWindowEvent=ee=>{this.handleEvent(ee,`${ee.type}Window`)},this.handleEvent=(ee,le)=>{if(ee.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let ze=ee.type==="renderFrame"?void 0:ee,Ze={needsRenderFrame:!1},ut={},Mt={},Jt=ee.touches,$t=Jt?this._getMapTouches(Jt):void 0,mr=$t?c.touchPos(this._map.getCanvas(),$t):c.mousePos(this._map.getCanvas(),ee);for(let{handlerName:xe,handler:Ie,allowed:qe}of this._handlers){if(!Ie.isEnabled())continue;let Qe;this._blockedByActive(Mt,qe,xe)?Ie.reset():Ie[le||ee.type]&&(Qe=Ie[le||ee.type](ee,mr,$t),this.mergeHandlerResult(Ze,ut,Qe,xe,ze),Qe&&Qe.needsRenderFrame&&this._triggerRenderFrame()),(Qe||Ie.isActive())&&(Mt[xe]=Ie)}let Cr={};for(let xe in this._previousActiveHandlers)Mt[xe]||(Cr[xe]=ze);this._previousActiveHandlers=Mt,(Object.keys(Cr).length||ta(Ze))&&(this._changes.push([Ze,ut,Cr]),this._triggerRenderFrame()),(Object.keys(Mt).length||ta(Ze))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:ve}=Ze;ve&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],ve(this._map))},this._map=w,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Pf(w),this._bearingSnap=B.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(B);let Q=this._el;this._listeners=[[Q,"touchstart",{passive:!0}],[Q,"touchmove",{passive:!1}],[Q,"touchend",void 0],[Q,"touchcancel",void 0],[Q,"mousedown",void 0],[Q,"mousemove",void 0],[Q,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[Q,"mouseover",void 0],[Q,"mouseout",void 0],[Q,"dblclick",void 0],[Q,"click",void 0],[Q,"keydown",{capture:!1}],[Q,"keyup",void 0],[Q,"wheel",{passive:!1}],[Q,"contextmenu",void 0],[window,"blur",void 0]];for(let[ee,le,ze]of this._listeners)c.addEventListener(ee,le,ee===document?this.handleWindowEvent:this.handleEvent,ze)}destroy(){for(let[w,B,Q]of this._listeners)c.removeEventListener(w,B,w===document?this.handleWindowEvent:this.handleEvent,Q)}_addDefaultHandlers(w){let B=this._map,Q=B.getCanvasContainer();this._add("mapEvent",new If(B,w));let ee=B.boxZoom=new ku(B,w);this._add("boxZoom",ee),w.interactive&&w.boxZoom&&ee.enable();let le=B.cooperativeGestures=new $i(B,w.cooperativeGestures);this._add("cooperativeGestures",le),w.cooperativeGestures&&le.enable();let ze=new zc(B),Ze=new Wi(B);B.doubleClickZoom=new Mi(Ze,ze),this._add("tapZoom",ze),this._add("clickZoom",Ze),w.interactive&&w.doubleClickZoom&&B.doubleClickZoom.enable();let ut=new dn;this._add("tapDragZoom",ut);let Mt=B.touchPitch=new Bc(B);this._add("touchPitch",Mt),w.interactive&&w.touchPitch&&B.touchPitch.enable(w.touchPitch);let Jt=Wl(w),$t=ah(w);B.dragRotate=new On(w,Jt,$t),this._add("mouseRotate",Jt,["mousePitch"]),this._add("mousePitch",$t,["mouseRotate"]),w.interactive&&w.dragRotate&&B.dragRotate.enable();let mr=(({enable:Qe,clickTolerance:Xe})=>{let nt=new Xu({checkCorrectEvent:qt=>c.mouseButton(qt)===0&&!qt.ctrlKey});return new Wu({clickTolerance:Xe,move:(qt,jt)=>({around:jt,panDelta:jt.sub(qt)}),activateOnStart:!0,moveStateManager:nt,enable:Qe,assignEvents:Zf})})(w),Cr=new Zu(w,B);B.dragPan=new wn(Q,mr,Cr),this._add("mousePan",mr),this._add("touchPan",Cr,["touchZoom","touchRotate"]),w.interactive&&w.dragPan&&B.dragPan.enable(w.dragPan);let ve=new cf,xe=new vu;B.touchZoomRotate=new Yi(Q,xe,ve,ut),this._add("touchRotate",ve,["touchPan","touchZoom"]),this._add("touchZoom",xe,["touchPan","touchRotate"]),w.interactive&&w.touchZoomRotate&&B.touchZoomRotate.enable(w.touchZoomRotate);let Ie=B.scrollZoom=new Kr(B,()=>this._triggerRenderFrame());this._add("scrollZoom",Ie,["mousePan"]),w.interactive&&w.scrollZoom&&B.scrollZoom.enable(w.scrollZoom);let qe=B.keyboard=new Zt(B);this._add("keyboard",qe),w.interactive&&w.keyboard&&B.keyboard.enable(),this._add("blockableMapEvent",new Cs(B))}_add(w,B,Q){this._handlers.push({handlerName:w,handler:B,allowed:Q}),this._handlersById[w]=B}stop(w){if(!this._updatingCamera){for(let{handler:B}of this._handlers)B.reset();this._inertia.clear(),this._fireEvents({},{},w),this._changes=[]}}isActive(){for(let{handler:w}of this._handlers)if(w.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!an(this._eventsInProgress)||this.isZooming()}_blockedByActive(w,B,Q){for(let ee in w)if(ee!==Q&&(!B||B.indexOf(ee)<0))return!0;return!1}_getMapTouches(w){let B=[];for(let Q of w)this._el.contains(Q.target)&&B.push(Q);return B}mergeHandlerResult(w,B,Q,ee,le){if(!Q)return;a.e(w,Q);let ze={handlerName:ee,originalEvent:Q.originalEvent||le};Q.zoomDelta!==void 0&&(B.zoom=ze),Q.panDelta!==void 0&&(B.drag=ze),Q.pitchDelta!==void 0&&(B.pitch=ze),Q.bearingDelta!==void 0&&(B.rotate=ze)}_applyChanges(){let w={},B={},Q={};for(let[ee,le,ze]of this._changes)ee.panDelta&&(w.panDelta=(w.panDelta||new a.P(0,0))._add(ee.panDelta)),ee.zoomDelta&&(w.zoomDelta=(w.zoomDelta||0)+ee.zoomDelta),ee.bearingDelta&&(w.bearingDelta=(w.bearingDelta||0)+ee.bearingDelta),ee.pitchDelta&&(w.pitchDelta=(w.pitchDelta||0)+ee.pitchDelta),ee.around!==void 0&&(w.around=ee.around),ee.pinchAround!==void 0&&(w.pinchAround=ee.pinchAround),ee.noInertia&&(w.noInertia=ee.noInertia),a.e(B,le),a.e(Q,ze);this._updateMapTransform(w,B,Q),this._changes=[]}_updateMapTransform(w,B,Q){let ee=this._map,le=ee._getTransformForUpdate(),ze=ee.terrain;if(!(ta(w)||ze&&this._terrainMovement))return this._fireEvents(B,Q,!0);let{panDelta:Ze,zoomDelta:ut,bearingDelta:Mt,pitchDelta:Jt,around:$t,pinchAround:mr}=w;mr!==void 0&&($t=mr),ee._stop(!0),$t=$t||ee.transform.centerPoint;let Cr=le.pointLocation(Ze?$t.sub(Ze):$t);Mt&&(le.bearing+=Mt),Jt&&(le.pitch+=Jt),ut&&(le.zoom+=ut),ze?this._terrainMovement||!B.drag&&!B.zoom?B.drag&&this._terrainMovement?le.center=le.pointLocation(le.centerPoint.sub(Ze)):le.setLocationAtPoint(Cr,$t):(this._terrainMovement=!0,this._map._elevationFreeze=!0,le.setLocationAtPoint(Cr,$t)):le.setLocationAtPoint(Cr,$t),ee._applyUpdatedTransform(le),this._map._update(),w.noInertia||this._inertia.record(w),this._fireEvents(B,Q,!0)}_fireEvents(w,B,Q){let ee=an(this._eventsInProgress),le=an(w),ze={};for(let $t in w){let{originalEvent:mr}=w[$t];this._eventsInProgress[$t]||(ze[`${$t}start`]=mr),this._eventsInProgress[$t]=w[$t]}!ee&&le&&this._fireEvent("movestart",le.originalEvent);for(let $t in ze)this._fireEvent($t,ze[$t]);le&&this._fireEvent("move",le.originalEvent);for(let $t in w){let{originalEvent:mr}=w[$t];this._fireEvent($t,mr)}let Ze={},ut;for(let $t in this._eventsInProgress){let{handlerName:mr,originalEvent:Cr}=this._eventsInProgress[$t];this._handlersById[mr].isActive()||(delete this._eventsInProgress[$t],ut=B[mr]||Cr,Ze[`${$t}end`]=ut)}for(let $t in Ze)this._fireEvent($t,Ze[$t]);let Mt=an(this._eventsInProgress),Jt=(ee||le)&&!Mt;if(Jt&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let $t=this._map._getTransformForUpdate();$t.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform($t)}if(Q&&Jt){this._updatingCamera=!0;let $t=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),mr=Cr=>Cr!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new Fi("renderFrame",{timeStamp:w})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Ra extends a.E{constructor(w,B){super(),this._renderFrameCallback=()=>{let Q=Math.min((u.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(Q)),Q<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=w,this._bearingSnap=B.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new a.N(this.transform.center.lng,this.transform.center.lat)}setCenter(w,B){return this.jumpTo({center:w},B)}panBy(w,B,Q){return w=a.P.convert(w).mult(-1),this.panTo(this.transform.center,a.e({offset:w},B),Q)}panTo(w,B,Q){return this.easeTo(a.e({center:w},B),Q)}getZoom(){return this.transform.zoom}setZoom(w,B){return this.jumpTo({zoom:w},B),this}zoomTo(w,B,Q){return this.easeTo(a.e({zoom:w},B),Q)}zoomIn(w,B){return this.zoomTo(this.getZoom()+1,w,B),this}zoomOut(w,B){return this.zoomTo(this.getZoom()-1,w,B),this}getBearing(){return this.transform.bearing}setBearing(w,B){return this.jumpTo({bearing:w},B),this}getPadding(){return this.transform.padding}setPadding(w,B){return this.jumpTo({padding:w},B),this}rotateTo(w,B,Q){return this.easeTo(a.e({bearing:w},B),Q)}resetNorth(w,B){return this.rotateTo(0,a.e({duration:1e3},w),B),this}resetNorthPitch(w,B){return this.easeTo(a.e({bearing:0,pitch:0,duration:1e3},w),B),this}snapToNorth(w,B){return Math.abs(this.getBearing()){if(this._zooming&&(ee.zoom=a.y.number(le,Ie,ar)),this._rotating&&(ee.bearing=a.y.number(ze,Mt,ar)),this._pitching&&(ee.pitch=a.y.number(Ze,Jt,ar)),this._padding&&(ee.interpolatePadding(ut,$t,ar),Cr=ee.centerPoint.add(mr)),this.terrain&&!w.freezeElevation&&this._updateElevation(ar),nt)ee.setLocationAtPoint(nt,qt);else{let fr=ee.zoomScale(ee.zoom-le),br=Ie>le?Math.min(2,Xe):Math.max(.5,Xe),Fr=Math.pow(br,1-ar),Hr=ee.unproject(qe.add(Qe.mult(ar*Fr)).mult(fr));ee.setLocationAtPoint(ee.renderWorldCopies?Hr.wrap():Hr,Cr)}this._applyUpdatedTransform(ee),this._fireMoveEvents(B)},ar=>{this.terrain&&w.freezeElevation&&this._finalizeElevation(),this._afterEase(B,ar)},w),this}_prepareEase(w,B,Q={}){this._moving=!0,B||Q.moving||this.fire(new a.k("movestart",w)),this._zooming&&!Q.zooming&&this.fire(new a.k("zoomstart",w)),this._rotating&&!Q.rotating&&this.fire(new a.k("rotatestart",w)),this._pitching&&!Q.pitching&&this.fire(new a.k("pitchstart",w))}_prepareElevation(w){this._elevationCenter=w,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(w,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(w){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);let B=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(w<1&&B!==this._elevationTarget){let Q=this._elevationTarget-this._elevationStart;this._elevationStart+=w*(Q-(B-(Q*w+this._elevationStart))/(1-w)),this._elevationTarget=B}this.transform.elevation=a.y.number(this._elevationStart,this._elevationTarget,w)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(w){let B=w.getCameraPosition(),Q=this.terrain.getElevationForLngLatZoom(B.lngLat,w.zoom);if(B.altitudethis._elevateCameraIfInsideTerrain(ee)),this.transformCameraUpdate&&B.push(ee=>this.transformCameraUpdate(ee)),!B.length)return;let Q=w.clone();for(let ee of B){let le=Q.clone(),{center:ze,zoom:Ze,pitch:ut,bearing:Mt,elevation:Jt}=ee(le);ze&&(le.center=ze),Ze!==void 0&&(le.zoom=Ze),ut!==void 0&&(le.pitch=ut),Mt!==void 0&&(le.bearing=Mt),Jt!==void 0&&(le.elevation=Jt),Q.apply(le)}this.transform.apply(Q)}_fireMoveEvents(w){this.fire(new a.k("move",w)),this._zooming&&this.fire(new a.k("zoom",w)),this._rotating&&this.fire(new a.k("rotate",w)),this._pitching&&this.fire(new a.k("pitch",w))}_afterEase(w,B){if(this._easeId&&B&&this._easeId===B)return;delete this._easeId;let Q=this._zooming,ee=this._rotating,le=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Q&&this.fire(new a.k("zoomend",w)),ee&&this.fire(new a.k("rotateend",w)),le&&this.fire(new a.k("pitchend",w)),this.fire(new a.k("moveend",w))}flyTo(w,B){var Q;if(!w.essential&&u.prefersReducedMotion){let Ln=a.M(w,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Ln,B)}this.stop(),w=a.e({offset:[0,0],speed:1.2,curve:1.42,easing:a.b9},w);let ee=this._getTransformForUpdate(),le=ee.zoom,ze=ee.bearing,Ze=ee.pitch,ut=ee.padding,Mt="bearing"in w?this._normalizeBearing(w.bearing,ze):ze,Jt="pitch"in w?+w.pitch:Ze,$t="padding"in w?w.padding:ee.padding,mr=a.P.convert(w.offset),Cr=ee.centerPoint.add(mr),ve=ee.pointLocation(Cr),{center:xe,zoom:Ie}=ee.getConstrained(a.N.convert(w.center||ve),(Q=w.zoom)!==null&&Q!==void 0?Q:le);this._normalizeCenter(xe,ee);let qe=ee.zoomScale(Ie-le),Qe=ee.project(ve),Xe=ee.project(xe).sub(Qe),nt=w.curve,qt=Math.max(ee.width,ee.height),jt=qt/qe,ar=Xe.mag();if("minZoom"in w){let Ln=a.ac(Math.min(w.minZoom,le,Ie),ee.minZoom,ee.maxZoom),Yn=qt/ee.zoomScale(Ln-le);nt=Math.sqrt(Yn/ar*2)}let fr=nt*nt;function br(Ln){let Yn=(jt*jt-qt*qt+(Ln?-1:1)*fr*fr*ar*ar)/(2*(Ln?jt:qt)*fr*ar);return Math.log(Math.sqrt(Yn*Yn+1)-Yn)}function Fr(Ln){return(Math.exp(Ln)-Math.exp(-Ln))/2}function Hr(Ln){return(Math.exp(Ln)+Math.exp(-Ln))/2}let ri=br(!1),Ci=function(Ln){return Hr(ri)/Hr(ri+nt*Ln)},cn=function(Ln){return qt*((Hr(ri)*(Fr(Yn=ri+nt*Ln)/Hr(Yn))-Fr(ri))/fr)/ar;var Yn},sn=(br(!0)-ri)/nt;if(Math.abs(ar)<1e-6||!isFinite(sn)){if(Math.abs(qt-jt)<1e-6)return this.easeTo(w,B);let Ln=jt0,Ci=Yn=>Math.exp(Ln*nt*Yn)}return w.duration="duration"in w?+w.duration:1e3*sn/("screenSpeed"in w?+w.screenSpeed/nt:+w.speed),w.maxDuration&&w.duration>w.maxDuration&&(w.duration=0),this._zooming=!0,this._rotating=ze!==Mt,this._pitching=Jt!==Ze,this._padding=!ee.isPaddingEqual($t),this._prepareEase(B,!1),this.terrain&&this._prepareElevation(xe),this._ease(Ln=>{let Yn=Ln*sn,Aa=1/Ci(Yn);ee.zoom=Ln===1?Ie:le+ee.scaleZoom(Aa),this._rotating&&(ee.bearing=a.y.number(ze,Mt,Ln)),this._pitching&&(ee.pitch=a.y.number(Ze,Jt,Ln)),this._padding&&(ee.interpolatePadding(ut,$t,Ln),Cr=ee.centerPoint.add(mr)),this.terrain&&!w.freezeElevation&&this._updateElevation(Ln);let fa=Ln===1?xe:ee.unproject(Qe.add(Xe.mult(cn(Yn))).mult(Aa));ee.setLocationAtPoint(ee.renderWorldCopies?fa.wrap():fa,Cr),this._applyUpdatedTransform(ee),this._fireMoveEvents(B)},()=>{this.terrain&&w.freezeElevation&&this._finalizeElevation(),this._afterEase(B)},w),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(w,B){var Q;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let ee=this._onEaseEnd;delete this._onEaseEnd,ee.call(this,B)}return w||(Q=this.handlers)===null||Q===void 0||Q.stop(!1),this}_ease(w,B,Q){Q.animate===!1||Q.duration===0?(w(1),B()):(this._easeStart=u.now(),this._easeOptions=Q,this._onEaseFrame=w,this._onEaseEnd=B,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(w,B){w=a.b3(w,-180,180);let Q=Math.abs(w-B);return Math.abs(w-360-B)180?-360:Q<-180?360:0}queryTerrainElevation(w){return this.terrain?this.terrain.getElevationForLngLatZoom(a.N.convert(w),this.transform.tileZoom)-this.transform.elevation:null}}let La={compact:!0,customAttribution:'
MapLibre'};class Na{constructor(w=La){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=B=>{!B||B.sourceDataType!=="metadata"&&B.sourceDataType!=="visibility"&&B.dataType!=="style"&&B.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=w}getDefaultPosition(){return"bottom-right"}onAdd(w){return this._map=w,this._compact=this.options.compact,this._container=c.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=c.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=c.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){c.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(w,B){let Q=this._map._getUIString(`AttributionControl.${B}`);w.title=Q,w.setAttribute("aria-label",Q)}_updateAttributions(){if(!this._map.style)return;let w=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?w=w.concat(this.options.customAttribution.map(ee=>typeof ee!="string"?"":ee)):typeof this.options.customAttribution=="string"&&w.push(this.options.customAttribution)),this._map.style.stylesheet){let ee=this._map.style.stylesheet;this.styleOwner=ee.owner,this.styleId=ee.id}let B=this._map.style.sourceCaches;for(let ee in B){let le=B[ee];if(le.used||le.usedForTerrain){let ze=le.getSource();ze.attribution&&w.indexOf(ze.attribution)<0&&w.push(ze.attribution)}}w=w.filter(ee=>String(ee).trim()),w.sort((ee,le)=>ee.length-le.length),w=w.filter((ee,le)=>{for(let ze=le+1;ze=0)return!1;return!0});let Q=w.join(" | ");Q!==this._attribHTML&&(this._attribHTML=Q,w.length?(this._innerContainer.innerHTML=Q,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class Zn{constructor(w={}){this._updateCompact=()=>{let B=this._container.children;if(B.length){let Q=B[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&Q.classList.add("maplibregl-compact"):Q.classList.remove("maplibregl-compact")}},this.options=w}getDefaultPosition(){return"bottom-left"}onAdd(w){this._map=w,this._compact=this.options&&this.options.compact,this._container=c.create("div","maplibregl-ctrl");let B=c.create("a","maplibregl-ctrl-logo");return B.target="_blank",B.rel="noopener nofollow",B.href="https://maplibre.org/",B.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),B.setAttribute("rel","noopener nofollow"),this._container.appendChild(B),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){c.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Dn{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(w){let B=++this._id;return this._queue.push({callback:w,id:B,cancelled:!1}),B}remove(w){let B=this._currentlyRunning,Q=B?this._queue.concat(B):this._queue;for(let ee of Q)if(ee.id===w)return void(ee.cancelled=!0)}run(w=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let B=this._currentlyRunning=this._queue;this._queue=[];for(let Q of B)if(!Q.cancelled&&(Q.callback(w),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Ka=a.Y([{name:"a_pos3d",type:"Int16",components:3}]);class bo extends a.E{constructor(w){super(),this.sourceCache=w,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,w.usedForTerrain=!0,w.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(w,B){this.sourceCache.update(w,B),this._renderableTilesKeys=[];let Q={};for(let ee of w.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:B}))Q[ee.key]=!0,this._renderableTilesKeys.push(ee.key),this._tiles[ee.key]||(ee.posMatrix=new Float64Array(16),a.aP(ee.posMatrix,0,a.X,0,a.X,0,1),this._tiles[ee.key]=new Tt(ee,this.tileSize));for(let ee in this._tiles)Q[ee]||delete this._tiles[ee]}freeRtt(w){for(let B in this._tiles){let Q=this._tiles[B];(!w||Q.tileID.equals(w)||Q.tileID.isChildOf(w)||w.isChildOf(Q.tileID))&&(Q.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(w=>this.getTileByID(w))}getTileByID(w){return this._tiles[w]}getTerrainCoords(w){let B={};for(let Q of this._renderableTilesKeys){let ee=this._tiles[Q].tileID;if(ee.canonical.equals(w.canonical)){let le=w.clone();le.posMatrix=new Float64Array(16),a.aP(le.posMatrix,0,a.X,0,a.X,0,1),B[Q]=le}else if(ee.canonical.isChildOf(w.canonical)){let le=w.clone();le.posMatrix=new Float64Array(16);let ze=ee.canonical.z-w.canonical.z,Ze=ee.canonical.x-(ee.canonical.x>>ze<>ze<>ze;a.aP(le.posMatrix,0,Mt,0,Mt,0,1),a.J(le.posMatrix,le.posMatrix,[-Ze*Mt,-ut*Mt,0]),B[Q]=le}else if(w.canonical.isChildOf(ee.canonical)){let le=w.clone();le.posMatrix=new Float64Array(16);let ze=w.canonical.z-ee.canonical.z,Ze=w.canonical.x-(w.canonical.x>>ze<>ze<>ze;a.aP(le.posMatrix,0,a.X,0,a.X,0,1),a.J(le.posMatrix,le.posMatrix,[Ze*Mt,ut*Mt,0]),a.K(le.posMatrix,le.posMatrix,[1/2**ze,1/2**ze,0]),B[Q]=le}}return B}getSourceTile(w,B){let Q=this.sourceCache._source,ee=w.overscaledZ-this.deltaZoom;if(ee>Q.maxzoom&&(ee=Q.maxzoom),ee=Q.minzoom&&(!le||!le.dem);)le=this.sourceCache.getTileByID(w.scaledTo(ee--).key);return le}tilesAfterTime(w=Date.now()){return Object.values(this._tiles).filter(B=>B.timeAdded>=w)}}class Zo{constructor(w,B,Q){this.painter=w,this.sourceCache=new bo(B),this.options=Q,this.exaggeration=typeof Q.exaggeration=="number"?Q.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(w,B,Q,ee=a.X){var le;if(!(B>=0&&B=0&&Qw.canonical.z&&(w.canonical.z>=ee?le=w.canonical.z-ee:a.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let ze=w.canonical.x-(w.canonical.x>>le<>le<>8<<4|le>>8,B[ze+3]=0;let Q=new a.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(B.buffer)),ee=new g(w,Q,w.gl.RGBA,{premultiply:!1});return ee.bind(w.gl.NEAREST,w.gl.CLAMP_TO_EDGE),this._coordsTexture=ee,ee}pointCoordinate(w){this.painter.maybeDrawDepthAndCoords(!0);let B=new Uint8Array(4),Q=this.painter.context,ee=Q.gl,le=Math.round(w.x*this.painter.pixelRatio/devicePixelRatio),ze=Math.round(w.y*this.painter.pixelRatio/devicePixelRatio),Ze=Math.round(this.painter.height/devicePixelRatio);Q.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),ee.readPixels(le,Ze-ze-1,1,1,ee.RGBA,ee.UNSIGNED_BYTE,B),Q.bindFramebuffer.set(null);let ut=B[0]+(B[2]>>4<<8),Mt=B[1]+((15&B[2])<<8),Jt=this.coordsIndex[255-B[3]],$t=Jt&&this.sourceCache.getTileByID(Jt);if(!$t)return null;let mr=this._coordsTextureSize,Cr=(1<<$t.tileID.canonical.z)*mr;return new a.Z(($t.tileID.canonical.x*mr+ut)/Cr+$t.tileID.wrap,($t.tileID.canonical.y*mr+Mt)/Cr,this.getElevation($t.tileID,ut,Mt,mr))}depthAtPoint(w){let B=new Uint8Array(4),Q=this.painter.context,ee=Q.gl;return Q.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),ee.readPixels(w.x,this.painter.height/devicePixelRatio-w.y-1,1,1,ee.RGBA,ee.UNSIGNED_BYTE,B),Q.bindFramebuffer.set(null),(B[0]/16777216+B[1]/65536+B[2]/256+B[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;let w=this.painter.context,B=new a.bd,Q=new a.aY,ee=this.meshSize,le=a.X/ee,ze=ee*ee;for(let $t=0;$t<=ee;$t++)for(let mr=0;mr<=ee;mr++)B.emplaceBack(mr*le,$t*le,0);for(let $t=0;$tw.id!==B),this._recentlyUsed.push(w.id)}stampObject(w){w.stamp=++this._stamp}getOrCreateFreeObject(){for(let B of this._recentlyUsed)if(!this._objects[B].inUse)return this._objects[B];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let w=this._createObject(this._objects.length);return this._objects.push(w),w}freeObject(w){w.inUse=!1}freeAllObjects(){for(let w of this._objects)this.freeObject(w)}isFull(){return!(this._objects.length!w.inUse)===!1}}let as={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class ws{constructor(w,B){this.painter=w,this.terrain=B,this.pool=new Ss(w.context,30,B.sourceCache.tileSize*B.qualityFactor)}destruct(){this.pool.destruct()}getTexture(w){return this.pool.getObjectForId(w.rtt[this._stacks.length-1].id).texture}prepareForRender(w,B){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=w._order.filter(Q=>!w._layers[Q].isHidden(B)),this._coordsDescendingInv={};for(let Q in w.sourceCaches){this._coordsDescendingInv[Q]={};let ee=w.sourceCaches[Q].getVisibleCoordinates();for(let le of ee){let ze=this.terrain.sourceCache.getTerrainCoords(le);for(let Ze in ze)this._coordsDescendingInv[Q][Ze]||(this._coordsDescendingInv[Q][Ze]=[]),this._coordsDescendingInv[Q][Ze].push(ze[Ze])}}this._coordsDescendingInvStr={};for(let Q of w._order){let ee=w._layers[Q],le=ee.source;if(as[ee.type]&&!this._coordsDescendingInvStr[le]){this._coordsDescendingInvStr[le]={};for(let ze in this._coordsDescendingInv[le])this._coordsDescendingInvStr[le][ze]=this._coordsDescendingInv[le][ze].map(Ze=>Ze.key).sort().join()}}for(let Q of this._renderableTiles)for(let ee in this._coordsDescendingInvStr){let le=this._coordsDescendingInvStr[ee][Q.tileID.key];le&&le!==Q.rttCoords[ee]&&(Q.rtt=[])}}renderLayer(w){if(w.isHidden(this.painter.transform.zoom))return!1;let B=w.type,Q=this.painter,ee=this._renderableLayerIds[this._renderableLayerIds.length-1]===w.id;if(as[B]&&(this._prevType&&as[this._prevType]||this._stacks.push([]),this._prevType=B,this._stacks[this._stacks.length-1].push(w.id),!ee))return!0;if(as[this._prevType]||as[B]&&ee){this._prevType=B;let le=this._stacks.length-1,ze=this._stacks[le]||[];for(let Ze of this._renderableTiles){if(this.pool.isFull()&&(js(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(Ze),Ze.rtt[le]){let Mt=this.pool.getObjectForId(Ze.rtt[le].id);if(Mt.stamp===Ze.rtt[le].stamp){this.pool.useObject(Mt);continue}}let ut=this.pool.getOrCreateFreeObject();this.pool.useObject(ut),this.pool.stampObject(ut),Ze.rtt[le]={id:ut.id,stamp:ut.stamp},Q.context.bindFramebuffer.set(ut.fbo.framebuffer),Q.context.clear({color:a.aM.transparent,stencil:0}),Q.currentStencilSource=void 0;for(let Mt=0;Mt{ue.touchstart=ue.dragStart,ue.touchmoveWindow=ue.dragMove,ue.touchend=ue.dragEnd},va={showCompass:!0,showZoom:!0,visualizePitch:!1};class no{constructor(w,B,Q=!1){this.mousedown=ze=>{this.startMouse(a.e({},ze,{ctrlKey:!0,preventDefault:()=>ze.preventDefault()}),c.mousePos(this.element,ze)),c.addEventListener(window,"mousemove",this.mousemove),c.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=ze=>{this.moveMouse(ze,c.mousePos(this.element,ze))},this.mouseup=ze=>{this.mouseRotate.dragEnd(ze),this.mousePitch&&this.mousePitch.dragEnd(ze),this.offTemp()},this.touchstart=ze=>{ze.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=c.touchPos(this.element,ze.targetTouches)[0],this.startTouch(ze,this._startPos),c.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),c.addEventListener(window,"touchend",this.touchend))},this.touchmove=ze=>{ze.targetTouches.length!==1?this.reset():(this._lastPos=c.touchPos(this.element,ze.targetTouches)[0],this.moveTouch(ze,this._lastPos))},this.touchend=ze=>{ze.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;let ee=w.dragRotate._mouseRotate.getClickTolerance(),le=w.dragRotate._mousePitch.getClickTolerance();this.element=B,this.mouseRotate=Wl({clickTolerance:ee,enable:!0}),this.touchRotate=(({enable:ze,clickTolerance:Ze,bearingDegreesPerPixelMoved:ut=.8})=>{let Mt=new uf;return new Wu({clickTolerance:Ze,move:(Jt,$t)=>({bearingDelta:($t.x-Jt.x)*ut}),moveStateManager:Mt,enable:ze,assignEvents:Ls})})({clickTolerance:ee,enable:!0}),this.map=w,Q&&(this.mousePitch=ah({clickTolerance:le,enable:!0}),this.touchPitch=(({enable:ze,clickTolerance:Ze,pitchDegreesPerPixelMoved:ut=-.5})=>{let Mt=new uf;return new Wu({clickTolerance:Ze,move:(Jt,$t)=>({pitchDelta:($t.y-Jt.y)*ut}),moveStateManager:Mt,enable:ze,assignEvents:Ls})})({clickTolerance:le,enable:!0})),c.addEventListener(B,"mousedown",this.mousedown),c.addEventListener(B,"touchstart",this.touchstart,{passive:!1}),c.addEventListener(B,"touchcancel",this.reset)}startMouse(w,B){this.mouseRotate.dragStart(w,B),this.mousePitch&&this.mousePitch.dragStart(w,B),c.disableDrag()}startTouch(w,B){this.touchRotate.dragStart(w,B),this.touchPitch&&this.touchPitch.dragStart(w,B),c.disableDrag()}moveMouse(w,B){let Q=this.map,{bearingDelta:ee}=this.mouseRotate.dragMove(w,B)||{};if(ee&&Q.setBearing(Q.getBearing()+ee),this.mousePitch){let{pitchDelta:le}=this.mousePitch.dragMove(w,B)||{};le&&Q.setPitch(Q.getPitch()+le)}}moveTouch(w,B){let Q=this.map,{bearingDelta:ee}=this.touchRotate.dragMove(w,B)||{};if(ee&&Q.setBearing(Q.getBearing()+ee),this.touchPitch){let{pitchDelta:le}=this.touchPitch.dragMove(w,B)||{};le&&Q.setPitch(Q.getPitch()+le)}}off(){let w=this.element;c.removeEventListener(w,"mousedown",this.mousedown),c.removeEventListener(w,"touchstart",this.touchstart,{passive:!1}),c.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),c.removeEventListener(window,"touchend",this.touchend),c.removeEventListener(w,"touchcancel",this.reset),this.offTemp()}offTemp(){c.enableDrag(),c.removeEventListener(window,"mousemove",this.mousemove),c.removeEventListener(window,"mouseup",this.mouseup),c.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),c.removeEventListener(window,"touchend",this.touchend)}}let ys;function rs(ue,w,B){let Q=new a.N(ue.lng,ue.lat);if(ue=new a.N(ue.lng,ue.lat),w){let ee=new a.N(ue.lng-360,ue.lat),le=new a.N(ue.lng+360,ue.lat),ze=B.locationPoint(ue).distSqr(w);B.locationPoint(ee).distSqr(w)180;){let ee=B.locationPoint(ue);if(ee.x>=0&&ee.y>=0&&ee.x<=B.width&&ee.y<=B.height)break;ue.lng>B.center.lng?ue.lng-=360:ue.lng+=360}return ue.lng!==Q.lng&&B.locationPoint(ue).y>B.height/2-B.getHorizon()?ue:Q}let Ql={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Cu(ue,w,B){let Q=ue.classList;for(let ee in Ql)Q.remove(`maplibregl-${B}-anchor-${ee}`);Q.add(`maplibregl-${B}-anchor-${w}`)}class Yu extends a.E{constructor(w){if(super(),this._onKeyPress=B=>{let Q=B.code,ee=B.charCode||B.keyCode;Q!=="Space"&&Q!=="Enter"&&ee!==32&&ee!==13||this.togglePopup()},this._onMapClick=B=>{let Q=B.originalEvent.target,ee=this._element;this._popup&&(Q===ee||ee.contains(Q))&&this.togglePopup()},this._update=B=>{var Q;if(!this._map)return;let ee=this._map.loaded()&&!this._map.isMoving();((B==null?void 0:B.type)==="terrain"||(B==null?void 0:B.type)==="render"&&!ee)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?rs(this._lngLat,this._flatPos,this._map.transform):(Q=this._lngLat)===null||Q===void 0?void 0:Q.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let le="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?le=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(le=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let ze="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?ze="rotateX(0deg)":this._pitchAlignment==="map"&&(ze=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||B&&B.type!=="moveend"||(this._pos=this._pos.round()),c.setTransform(this._element,`${Ql[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${ze} ${le}`),u.frameAsync(new AbortController).then(()=>{this._updateOpacity(B&&B.type==="moveend")}).catch(()=>{})},this._onMove=B=>{if(!this._isDragging){let Q=this._clickTolerance||this._map._clickTolerance;this._isDragging=B.point.dist(this._pointerdownPos)>=Q}this._isDragging&&(this._pos=B.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new a.k("dragstart"))),this.fire(new a.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new a.k("dragend")),this._state="inactive"},this._addDragHandler=B=>{this._element.contains(B.originalEvent.target)&&(B.preventDefault(),this._positionDelta=B.point.sub(this._pos).add(this._offset),this._pointerdownPos=B.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=w&&w.anchor||"center",this._color=w&&w.color||"#3FB1CE",this._scale=w&&w.scale||1,this._draggable=w&&w.draggable||!1,this._clickTolerance=w&&w.clickTolerance||0,this._subpixelPositioning=w&&w.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=w&&w.rotation||0,this._rotationAlignment=w&&w.rotationAlignment||"auto",this._pitchAlignment=w&&w.pitchAlignment&&w.pitchAlignment!=="auto"?w.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(w==null?void 0:w.opacity,w==null?void 0:w.opacityWhenCovered),w&&w.element)this._element=w.element,this._offset=a.P.convert(w&&w.offset||[0,0]);else{this._defaultMarker=!0,this._element=c.create("div");let B=c.createNS("http://www.w3.org/2000/svg","svg"),Q=41,ee=27;B.setAttributeNS(null,"display","block"),B.setAttributeNS(null,"height",`${Q}px`),B.setAttributeNS(null,"width",`${ee}px`),B.setAttributeNS(null,"viewBox",`0 0 ${ee} ${Q}`);let le=c.createNS("http://www.w3.org/2000/svg","g");le.setAttributeNS(null,"stroke","none"),le.setAttributeNS(null,"stroke-width","1"),le.setAttributeNS(null,"fill","none"),le.setAttributeNS(null,"fill-rule","evenodd");let ze=c.createNS("http://www.w3.org/2000/svg","g");ze.setAttributeNS(null,"fill-rule","nonzero");let Ze=c.createNS("http://www.w3.org/2000/svg","g");Ze.setAttributeNS(null,"transform","translate(3.0, 29.0)"),Ze.setAttributeNS(null,"fill","#000000");let ut=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(let qe of ut){let Qe=c.createNS("http://www.w3.org/2000/svg","ellipse");Qe.setAttributeNS(null,"opacity","0.04"),Qe.setAttributeNS(null,"cx","10.5"),Qe.setAttributeNS(null,"cy","5.80029008"),Qe.setAttributeNS(null,"rx",qe.rx),Qe.setAttributeNS(null,"ry",qe.ry),Ze.appendChild(Qe)}let Mt=c.createNS("http://www.w3.org/2000/svg","g");Mt.setAttributeNS(null,"fill",this._color);let Jt=c.createNS("http://www.w3.org/2000/svg","path");Jt.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),Mt.appendChild(Jt);let $t=c.createNS("http://www.w3.org/2000/svg","g");$t.setAttributeNS(null,"opacity","0.25"),$t.setAttributeNS(null,"fill","#000000");let mr=c.createNS("http://www.w3.org/2000/svg","path");mr.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),$t.appendChild(mr);let Cr=c.createNS("http://www.w3.org/2000/svg","g");Cr.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Cr.setAttributeNS(null,"fill","#FFFFFF");let ve=c.createNS("http://www.w3.org/2000/svg","g");ve.setAttributeNS(null,"transform","translate(8.0, 8.0)");let xe=c.createNS("http://www.w3.org/2000/svg","circle");xe.setAttributeNS(null,"fill","#000000"),xe.setAttributeNS(null,"opacity","0.25"),xe.setAttributeNS(null,"cx","5.5"),xe.setAttributeNS(null,"cy","5.5"),xe.setAttributeNS(null,"r","5.4999962");let Ie=c.createNS("http://www.w3.org/2000/svg","circle");Ie.setAttributeNS(null,"fill","#FFFFFF"),Ie.setAttributeNS(null,"cx","5.5"),Ie.setAttributeNS(null,"cy","5.5"),Ie.setAttributeNS(null,"r","5.4999962"),ve.appendChild(xe),ve.appendChild(Ie),ze.appendChild(Ze),ze.appendChild(Mt),ze.appendChild($t),ze.appendChild(Cr),ze.appendChild(ve),B.appendChild(ze),B.setAttributeNS(null,"height",Q*this._scale+"px"),B.setAttributeNS(null,"width",ee*this._scale+"px"),this._element.appendChild(B),this._offset=a.P.convert(w&&w.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",B=>{B.preventDefault()}),this._element.addEventListener("mousedown",B=>{B.preventDefault()}),Cu(this._element,this._anchor,"marker"),w&&w.className)for(let B of w.className.split(" "))this._element.classList.add(B);this._popup=null}addTo(w){return this.remove(),this._map=w,this._element.setAttribute("aria-label",w._getUIString("Marker.Title")),w.getCanvasContainer().appendChild(this._element),w.on("move",this._update),w.on("moveend",this._update),w.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),c.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(w){return this._lngLat=a.N.convert(w),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(w){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),w){if(!("offset"in w.options)){let ee=Math.abs(13.5)/Math.SQRT2;w.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[ee,-1*(38.1-13.5+ee)],"bottom-right":[-ee,-1*(38.1-13.5+ee)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=w,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(w){return this._subpixelPositioning=w,this}getPopup(){return this._popup}togglePopup(){let w=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:w?(w.isOpen()?w.remove():(w.setLngLat(this._lngLat),w.addTo(this._map)),this):this}_updateOpacity(w=!1){var B,Q;if(!(!((B=this._map)===null||B===void 0)&&B.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(w)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let ee=this._map,le=ee.terrain.depthAtPoint(this._pos),ze=ee.terrain.getElevationForLngLatZoom(this._lngLat,ee.transform.tileZoom);if(ee.transform.lngLatToCameraDepth(this._lngLat,ze)-le<.006)return void(this._element.style.opacity=this._opacity);let Ze=-this._offset.y/ee.transform._pixelPerMeter,ut=Math.sin(ee.getPitch()*Math.PI/180)*Ze,Mt=ee.terrain.depthAtPoint(new a.P(this._pos.x,this._pos.y-this._offset.y)),Jt=ee.transform.lngLatToCameraDepth(this._lngLat,ze+ut)-Mt>.006;!((Q=this._popup)===null||Q===void 0)&&Q.isOpen()&&Jt&&this._popup.remove(),this._element.style.opacity=Jt?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(w){return this._offset=a.P.convert(w),this._update(),this}addClassName(w){this._element.classList.add(w)}removeClassName(w){this._element.classList.remove(w)}toggleClassName(w){return this._element.classList.toggle(w)}setDraggable(w){return this._draggable=!!w,this._map&&(w?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(w){return this._rotation=w||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(w){return this._rotationAlignment=w||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(w){return this._pitchAlignment=w&&w!=="auto"?w:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(w,B){return w===void 0&&B===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),w!==void 0&&(this._opacity=w),B!==void 0&&(this._opacityWhenCovered=B),this._map&&this._updateOpacity(!0),this}}let Nc={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},pu=0,Uc=!1,xu={maxWidth:100,unit:"metric"};function Ac(ue,w,B){let Q=B&&B.maxWidth||100,ee=ue._container.clientHeight/2,le=ue.unproject([0,ee]),ze=ue.unproject([Q,ee]),Ze=le.distanceTo(ze);if(B&&B.unit==="imperial"){let ut=3.2808*Ze;ut>5280?Ua(w,Q,ut/5280,ue._getUIString("ScaleControl.Miles")):Ua(w,Q,ut,ue._getUIString("ScaleControl.Feet"))}else B&&B.unit==="nautical"?Ua(w,Q,Ze/1852,ue._getUIString("ScaleControl.NauticalMiles")):Ze>=1e3?Ua(w,Q,Ze/1e3,ue._getUIString("ScaleControl.Kilometers")):Ua(w,Q,Ze,ue._getUIString("ScaleControl.Meters"))}function Ua(ue,w,B,Q){let ee=function(le){let ze=Math.pow(10,`${Math.floor(le)}`.length-1),Ze=le/ze;return Ze=Ze>=10?10:Ze>=5?5:Ze>=3?3:Ze>=2?2:Ze>=1?1:function(ut){let Mt=Math.pow(10,Math.ceil(-Math.log(ut)/Math.LN10));return Math.round(ut*Mt)/Mt}(Ze),ze*Ze}(B);ue.style.width=w*(ee/B)+"px",ue.innerHTML=`${ee} ${Q}`}let oo={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},Vc=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function hc(ue){if(ue){if(typeof ue=="number"){let w=Math.round(Math.abs(ue)/Math.SQRT2);return{center:new a.P(0,0),top:new a.P(0,ue),"top-left":new a.P(w,w),"top-right":new a.P(-w,w),bottom:new a.P(0,-ue),"bottom-left":new a.P(w,-w),"bottom-right":new a.P(-w,-w),left:new a.P(ue,0),right:new a.P(-ue,0)}}if(ue instanceof a.P||Array.isArray(ue)){let w=a.P.convert(ue);return{center:w,top:w,"top-left":w,"top-right":w,bottom:w,"bottom-left":w,"bottom-right":w,left:w,right:w}}return{center:a.P.convert(ue.center||[0,0]),top:a.P.convert(ue.top||[0,0]),"top-left":a.P.convert(ue["top-left"]||[0,0]),"top-right":a.P.convert(ue["top-right"]||[0,0]),bottom:a.P.convert(ue.bottom||[0,0]),"bottom-left":a.P.convert(ue["bottom-left"]||[0,0]),"bottom-right":a.P.convert(ue["bottom-right"]||[0,0]),left:a.P.convert(ue.left||[0,0]),right:a.P.convert(ue.right||[0,0])}}return hc(new a.P(0,0))}let Ku=o;i.AJAXError=a.bh,i.Evented=a.E,i.LngLat=a.N,i.MercatorCoordinate=a.Z,i.Point=a.P,i.addProtocol=a.bi,i.config=a.a,i.removeProtocol=a.bj,i.AttributionControl=Na,i.BoxZoomHandler=ku,i.CanvasSource=nr,i.CooperativeGesturesHandler=$i,i.DoubleClickZoomHandler=Mi,i.DragPanHandler=wn,i.DragRotateHandler=On,i.EdgeInsets=hu,i.FullscreenControl=class extends a.E{constructor(ue={}){super(),this._onFullscreenChange=()=>{var w;let B=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((w=B==null?void 0:B.shadowRoot)===null||w===void 0)&&w.fullscreenElement;)B=B.shadowRoot.fullscreenElement;B===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,ue&&ue.container&&(ue.container instanceof HTMLElement?this._container=ue.container:a.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(ue){return this._map=ue,this._container||(this._container=this._map.getContainer()),this._controlContainer=c.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){c.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let ue=this._fullscreenButton=c.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);c.create("span","maplibregl-ctrl-icon",ue).setAttribute("aria-hidden","true"),ue.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let ue=this._getTitle();this._fullscreenButton.setAttribute("aria-label",ue),this._fullscreenButton.title=ue}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new a.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new a.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},i.GeoJSONSource=st,i.GeolocateControl=class extends a.E{constructor(ue){super(),this._onSuccess=w=>{if(this._map){if(this._isOutOfMapMaxBounds(w))return this._setErrorState(),this.fire(new a.k("outofmaxbounds",w)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=w,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(w),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(w),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new a.k("geolocate",w)),this._finish()}},this._updateCamera=w=>{let B=new a.N(w.coords.longitude,w.coords.latitude),Q=w.coords.accuracy,ee=this._map.getBearing(),le=a.e({bearing:ee},this.options.fitBoundsOptions),ze=ce.fromLngLat(B,Q);this._map.fitBounds(ze,le,{geolocateSource:!0})},this._updateMarker=w=>{if(w){let B=new a.N(w.coords.longitude,w.coords.latitude);this._accuracyCircleMarker.setLngLat(B).addTo(this._map),this._userLocationDotMarker.setLngLat(B).addTo(this._map),this._accuracy=w.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=w=>{if(this._map){if(this.options.trackUserLocation)if(w.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;let B=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=B,this._geolocateButton.setAttribute("aria-label",B),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(w.code===3&&Uc)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new a.k("error",w)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",w=>w.preventDefault()),this._geolocateButton=c.create("button","maplibregl-ctrl-geolocate",this._container),c.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=w=>{if(this._map){if(w===!1){a.w("Geolocation support is not available so the GeolocateControl will be disabled.");let B=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=B,this._geolocateButton.setAttribute("aria-label",B)}else{let B=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=B,this._geolocateButton.setAttribute("aria-label",B)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=c.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Yu({element:this._dotElement}),this._circleElement=c.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Yu({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",B=>{B.geolocateSource||this._watchState!=="ACTIVE_LOCK"||B.originalEvent&&B.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new a.k("trackuserlocationend")),this.fire(new a.k("userlocationlostfocus")))})}},this.options=a.e({},Nc,ue)}onAdd(ue){return this._map=ue,this._container=c.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return a._(this,arguments,void 0,function*(w=!1){if(ys!==void 0&&!w)return ys;if(window.navigator.permissions===void 0)return ys=!!window.navigator.geolocation,ys;try{ys=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch(B){ys=!!window.navigator.geolocation}return ys})}().then(w=>this._finishSetupUI(w)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),c.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,pu=0,Uc=!1}_isOutOfMapMaxBounds(ue){let w=this._map.getMaxBounds(),B=ue.coords;return w&&(B.longitudew.getEast()||B.latitudew.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){let ue=this._map.getBounds(),w=ue.getSouthEast(),B=ue.getNorthEast(),Q=w.distanceTo(B),ee=Math.ceil(this._accuracy/(Q/this._map._container.clientHeight)*2);this._circleElement.style.width=`${ee}px`,this._circleElement.style.height=`${ee}px`}trigger(){if(!this._setup)return a.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new a.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":pu--,Uc=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new a.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new a.k("trackuserlocationstart")),this.fire(new a.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let ue;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),pu++,pu>1?(ue={maximumAge:6e5,timeout:0},Uc=!0):(ue=this.options.positionOptions,Uc=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,ue)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},i.Hash=Mh,i.ImageSource=Qt,i.KeyboardHandler=Zt,i.LngLatBounds=ce,i.LogoControl=Zn,i.Map=class extends Ra{constructor(ue){a.bf.mark(a.bg.create);let w=Object.assign(Object.assign({},Ws),ue);if(w.minZoom!=null&&w.maxZoom!=null&&w.minZoom>w.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(w.minPitch!=null&&w.maxPitch!=null&&w.minPitch>w.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(w.minPitch!=null&&w.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(w.maxPitch!=null&&w.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new nl(w.minZoom,w.maxZoom,w.minPitch,w.maxPitch,w.renderWorldCopies),{bearingSnap:w.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Dn,this._controls=[],this._mapId=a.a4(),this._contextLost=B=>{B.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new a.k("webglcontextlost",{originalEvent:B}))},this._contextRestored=B=>{this._setupPainter(),this.resize(),this._update(),this.fire(new a.k("webglcontextrestored",{originalEvent:B}))},this._onMapScroll=B=>{if(B.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=w.interactive,this._maxTileCacheSize=w.maxTileCacheSize,this._maxTileCacheZoomLevels=w.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=w.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=w.preserveDrawingBuffer===!0,this._antialias=w.antialias===!0,this._trackResize=w.trackResize===!0,this._bearingSnap=w.bearingSnap,this._refreshExpiredTiles=w.refreshExpiredTiles===!0,this._fadeDuration=w.fadeDuration,this._crossSourceCollisions=w.crossSourceCollisions===!0,this._collectResourceTiming=w.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Ho),w.locale),this._clickTolerance=w.clickTolerance,this._overridePixelRatio=w.pixelRatio,this._maxCanvasSize=w.maxCanvasSize,this.transformCameraUpdate=w.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=w.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=p.addThrottleControl(()=>this.isMoving()),this._requestManager=new k(w.transformRequest),typeof w.container=="string"){if(this._container=document.getElementById(w.container),!this._container)throw new Error(`Container '${w.container}' not found.`)}else{if(!(w.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=w.container}if(w.maxBounds&&this.setMaxBounds(w.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)).on("moveend",()=>this._update(!1)).on("zoom",()=>this._update(!0)).on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once("idle",()=>{this._idleTriggered=!0}),typeof window!="undefined"){addEventListener("online",this._onWindowOnline,!1);let B=!1,Q=nh(ee=>{this._trackResize&&!this._removed&&(this.resize(ee),this.redraw())},50);this._resizeObserver=new ResizeObserver(ee=>{B?Q(ee):B=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Ca(this,w),this._hash=w.hash&&new Mh(typeof w.hash=="string"&&w.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:w.center,zoom:w.zoom,bearing:w.bearing,pitch:w.pitch}),w.bounds&&(this.resize(),this.fitBounds(w.bounds,a.e({},w.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=w.localIdeographFontFamily,this._validateStyle=w.validateStyle,w.style&&this.setStyle(w.style,{localIdeographFontFamily:w.localIdeographFontFamily}),w.attributionControl&&this.addControl(new Na(typeof w.attributionControl=="boolean"?void 0:w.attributionControl)),w.maplibreLogo&&this.addControl(new Zn,w.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",B=>{this._update(B.dataType==="style"),this.fire(new a.k(`${B.dataType}data`,B))}),this.on("dataloading",B=>{this.fire(new a.k(`${B.dataType}dataloading`,B))}),this.on("dataabort",B=>{this.fire(new a.k("sourcedataabort",B))})}_getMapId(){return this._mapId}addControl(ue,w){if(w===void 0&&(w=ue.getDefaultPosition?ue.getDefaultPosition():"top-right"),!ue||!ue.onAdd)return this.fire(new a.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let B=ue.onAdd(this);this._controls.push(ue);let Q=this._controlPositions[w];return w.indexOf("bottom")!==-1?Q.insertBefore(B,Q.firstChild):Q.appendChild(B),this}removeControl(ue){if(!ue||!ue.onRemove)return this.fire(new a.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let w=this._controls.indexOf(ue);return w>-1&&this._controls.splice(w,1),ue.onRemove(this),this}hasControl(ue){return this._controls.indexOf(ue)>-1}calculateCameraOptionsFromTo(ue,w,B,Q){return Q==null&&this.terrain&&(Q=this.terrain.getElevationForLngLatZoom(B,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(ue,w,B,Q)}resize(ue){var w;let B=this._containerDimensions(),Q=B[0],ee=B[1],le=this._getClampedPixelRatio(Q,ee);if(this._resizeCanvas(Q,ee,le),this.painter.resize(Q,ee,le),this.painter.overLimit()){let Ze=this.painter.context.gl;this._maxCanvasSize=[Ze.drawingBufferWidth,Ze.drawingBufferHeight];let ut=this._getClampedPixelRatio(Q,ee);this._resizeCanvas(Q,ee,ut),this.painter.resize(Q,ee,ut)}this.transform.resize(Q,ee),(w=this._requestedCameraState)===null||w===void 0||w.resize(Q,ee);let ze=!this._moving;return ze&&(this.stop(),this.fire(new a.k("movestart",ue)).fire(new a.k("move",ue))),this.fire(new a.k("resize",ue)),ze&&this.fire(new a.k("moveend",ue)),this}_getClampedPixelRatio(ue,w){let{0:B,1:Q}=this._maxCanvasSize,ee=this.getPixelRatio(),le=ue*ee,ze=w*ee;return Math.min(le>B?B/le:1,ze>Q?Q/ze:1)*ee}getPixelRatio(){var ue;return(ue=this._overridePixelRatio)!==null&&ue!==void 0?ue:devicePixelRatio}setPixelRatio(ue){this._overridePixelRatio=ue,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(ue){return this.transform.setMaxBounds(ce.convert(ue)),this._update()}setMinZoom(ue){if((ue=ue==null?-2:ue)>=-2&&ue<=this.transform.maxZoom)return this.transform.minZoom=ue,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=ue,this._update(),this.getZoom()>ue&&this.setZoom(ue),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(ue){if((ue=ue==null?0:ue)<0)throw new Error("minPitch must be greater than or equal to 0");if(ue>=0&&ue<=this.transform.maxPitch)return this.transform.minPitch=ue,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(ue>=this.transform.minPitch)return this.transform.maxPitch=ue,this._update(),this.getPitch()>ue&&this.setPitch(ue),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(ue){return this.transform.renderWorldCopies=ue,this._update()}project(ue){return this.transform.locationPoint(a.N.convert(ue),this.style&&this.terrain)}unproject(ue){return this.transform.pointLocation(a.P.convert(ue),this.terrain)}isMoving(){var ue;return this._moving||((ue=this.handlers)===null||ue===void 0?void 0:ue.isMoving())}isZooming(){var ue;return this._zooming||((ue=this.handlers)===null||ue===void 0?void 0:ue.isZooming())}isRotating(){var ue;return this._rotating||((ue=this.handlers)===null||ue===void 0?void 0:ue.isRotating())}_createDelegatedListener(ue,w,B){if(ue==="mouseenter"||ue==="mouseover"){let Q=!1;return{layers:w,listener:B,delegates:{mousemove:le=>{let ze=w.filter(ut=>this.getLayer(ut)),Ze=ze.length!==0?this.queryRenderedFeatures(le.point,{layers:ze}):[];Ze.length?Q||(Q=!0,B.call(this,new jl(ue,this,le.originalEvent,{features:Ze}))):Q=!1},mouseout:()=>{Q=!1}}}}if(ue==="mouseleave"||ue==="mouseout"){let Q=!1;return{layers:w,listener:B,delegates:{mousemove:ze=>{let Ze=w.filter(ut=>this.getLayer(ut));(Ze.length!==0?this.queryRenderedFeatures(ze.point,{layers:Ze}):[]).length?Q=!0:Q&&(Q=!1,B.call(this,new jl(ue,this,ze.originalEvent)))},mouseout:ze=>{Q&&(Q=!1,B.call(this,new jl(ue,this,ze.originalEvent)))}}}}{let Q=ee=>{let le=w.filter(Ze=>this.getLayer(Ze)),ze=le.length!==0?this.queryRenderedFeatures(ee.point,{layers:le}):[];ze.length&&(ee.features=ze,B.call(this,ee),delete ee.features)};return{layers:w,listener:B,delegates:{[ue]:Q}}}}_saveDelegatedListener(ue,w){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[ue]=this._delegatedListeners[ue]||[],this._delegatedListeners[ue].push(w)}_removeDelegatedListener(ue,w,B){if(!this._delegatedListeners||!this._delegatedListeners[ue])return;let Q=this._delegatedListeners[ue];for(let ee=0;eew.includes(ze))){for(let ze in le.delegates)this.off(ze,le.delegates[ze]);return void Q.splice(ee,1)}}}on(ue,w,B){if(B===void 0)return super.on(ue,w);let Q=this._createDelegatedListener(ue,typeof w=="string"?[w]:w,B);this._saveDelegatedListener(ue,Q);for(let ee in Q.delegates)this.on(ee,Q.delegates[ee]);return this}once(ue,w,B){if(B===void 0)return super.once(ue,w);let Q=typeof w=="string"?[w]:w,ee=this._createDelegatedListener(ue,Q,B);for(let le in ee.delegates){let ze=ee.delegates[le];ee.delegates[le]=(...Ze)=>{this._removeDelegatedListener(ue,Q,B),ze(...Ze)}}this._saveDelegatedListener(ue,ee);for(let le in ee.delegates)this.once(le,ee.delegates[le]);return this}off(ue,w,B){return B===void 0?super.off(ue,w):(this._removeDelegatedListener(ue,typeof w=="string"?[w]:w,B),this)}queryRenderedFeatures(ue,w){if(!this.style)return[];let B,Q=ue instanceof a.P||Array.isArray(ue),ee=Q?ue:[[0,0],[this.transform.width,this.transform.height]];if(w=w||(Q?{}:ue)||{},ee instanceof a.P||typeof ee[0]=="number")B=[a.P.convert(ee)];else{let le=a.P.convert(ee[0]),ze=a.P.convert(ee[1]);B=[le,new a.P(ze.x,le.y),ze,new a.P(le.x,ze.y),le]}return this.style.queryRenderedFeatures(B,w,this.transform)}querySourceFeatures(ue,w){return this.style.querySourceFeatures(ue,w)}setStyle(ue,w){return(w=a.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},w)).diff!==!1&&w.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&ue?(this._diffStyle(ue,w),this):(this._localIdeographFontFamily=w.localIdeographFontFamily,this._updateStyle(ue,w))}setTransformRequest(ue){return this._requestManager.setTransformRequest(ue),this}_getUIString(ue){let w=this._locale[ue];if(w==null)throw new Error(`Missing UI string '${ue}'`);return w}_updateStyle(ue,w){if(w.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(ue,w));let B=this.style&&w.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!ue)),ue?(this.style=new Ha(this,w||{}),this.style.setEventedParent(this,{style:this.style}),typeof ue=="string"?this.style.loadURL(ue,w,B):this.style.loadJSON(ue,w,B),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Ha(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(ue,w){if(typeof ue=="string"){let B=this._requestManager.transformRequest(ue,"Style");a.h(B,new AbortController).then(Q=>{this._updateDiff(Q.data,w)}).catch(Q=>{Q&&this.fire(new a.j(Q))})}else typeof ue=="object"&&this._updateDiff(ue,w)}_updateDiff(ue,w){try{this.style.setState(ue,w)&&this._update(!0)}catch(B){a.w(`Unable to perform style diff: ${B.message||B.error||B}. Rebuilding the style from scratch.`),this._updateStyle(ue,w)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():a.w("There is no style added to the map.")}addSource(ue,w){return this._lazyInitEmptyStyle(),this.style.addSource(ue,w),this._update(!0)}isSourceLoaded(ue){let w=this.style&&this.style.sourceCaches[ue];if(w!==void 0)return w.loaded();this.fire(new a.j(new Error(`There is no source with ID '${ue}'`)))}setTerrain(ue){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),ue){let w=this.style.sourceCaches[ue.source];if(!w)throw new Error(`cannot load terrain, because there exists no source with ID: ${ue.source}`);this.terrain===null&&w.reload();for(let B in this.style._layers){let Q=this.style._layers[B];Q.type==="hillshade"&&Q.source===ue.source&&a.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Zo(this.painter,w,ue),this.painter.renderToTexture=new ws(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=B=>{B.dataType==="style"?this.terrain.sourceCache.freeRtt():B.dataType==="source"&&B.tile&&(B.sourceId!==ue.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(B.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new a.k("terrain",{terrain:ue})),this}getTerrain(){var ue,w;return(w=(ue=this.terrain)===null||ue===void 0?void 0:ue.options)!==null&&w!==void 0?w:null}areTilesLoaded(){let ue=this.style&&this.style.sourceCaches;for(let w in ue){let B=ue[w]._tiles;for(let Q in B){let ee=B[Q];if(ee.state!=="loaded"&&ee.state!=="errored")return!1}}return!0}removeSource(ue){return this.style.removeSource(ue),this._update(!0)}getSource(ue){return this.style.getSource(ue)}addImage(ue,w,B={}){let{pixelRatio:Q=1,sdf:ee=!1,stretchX:le,stretchY:ze,content:Ze,textFitWidth:ut,textFitHeight:Mt}=B;if(this._lazyInitEmptyStyle(),!(w instanceof HTMLImageElement||a.b(w))){if(w.width===void 0||w.height===void 0)return this.fire(new a.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{let{width:Jt,height:$t,data:mr}=w,Cr=w;return this.style.addImage(ue,{data:new a.R({width:Jt,height:$t},new Uint8Array(mr)),pixelRatio:Q,stretchX:le,stretchY:ze,content:Ze,textFitWidth:ut,textFitHeight:Mt,sdf:ee,version:0,userImage:Cr}),Cr.onAdd&&Cr.onAdd(this,ue),this}}{let{width:Jt,height:$t,data:mr}=u.getImageData(w);this.style.addImage(ue,{data:new a.R({width:Jt,height:$t},mr),pixelRatio:Q,stretchX:le,stretchY:ze,content:Ze,textFitWidth:ut,textFitHeight:Mt,sdf:ee,version:0})}}updateImage(ue,w){let B=this.style.getImage(ue);if(!B)return this.fire(new a.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let Q=w instanceof HTMLImageElement||a.b(w)?u.getImageData(w):w,{width:ee,height:le,data:ze}=Q;if(ee===void 0||le===void 0)return this.fire(new a.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(ee!==B.data.width||le!==B.data.height)return this.fire(new a.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));let Ze=!(w instanceof HTMLImageElement||a.b(w));return B.data.replace(ze,Ze),this.style.updateImage(ue,B),this}getImage(ue){return this.style.getImage(ue)}hasImage(ue){return ue?!!this.style.getImage(ue):(this.fire(new a.j(new Error("Missing required image id"))),!1)}removeImage(ue){this.style.removeImage(ue)}loadImage(ue){return p.getImage(this._requestManager.transformRequest(ue,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(ue,w){return this._lazyInitEmptyStyle(),this.style.addLayer(ue,w),this._update(!0)}moveLayer(ue,w){return this.style.moveLayer(ue,w),this._update(!0)}removeLayer(ue){return this.style.removeLayer(ue),this._update(!0)}getLayer(ue){return this.style.getLayer(ue)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(ue,w,B){return this.style.setLayerZoomRange(ue,w,B),this._update(!0)}setFilter(ue,w,B={}){return this.style.setFilter(ue,w,B),this._update(!0)}getFilter(ue){return this.style.getFilter(ue)}setPaintProperty(ue,w,B,Q={}){return this.style.setPaintProperty(ue,w,B,Q),this._update(!0)}getPaintProperty(ue,w){return this.style.getPaintProperty(ue,w)}setLayoutProperty(ue,w,B,Q={}){return this.style.setLayoutProperty(ue,w,B,Q),this._update(!0)}getLayoutProperty(ue,w){return this.style.getLayoutProperty(ue,w)}setGlyphs(ue,w={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(ue,w),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(ue,w,B={}){return this._lazyInitEmptyStyle(),this.style.addSprite(ue,w,B,Q=>{Q||this._update(!0)}),this}removeSprite(ue){return this._lazyInitEmptyStyle(),this.style.removeSprite(ue),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(ue,w={}){return this._lazyInitEmptyStyle(),this.style.setSprite(ue,w,B=>{B||this._update(!0)}),this}setLight(ue,w={}){return this._lazyInitEmptyStyle(),this.style.setLight(ue,w),this._update(!0)}getLight(){return this.style.getLight()}setSky(ue){return this._lazyInitEmptyStyle(),this.style.setSky(ue),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(ue,w){return this.style.setFeatureState(ue,w),this._update()}removeFeatureState(ue,w){return this.style.removeFeatureState(ue,w),this._update()}getFeatureState(ue){return this.style.getFeatureState(ue)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let ue=0,w=0;return this._container&&(ue=this._container.clientWidth||400,w=this._container.clientHeight||300),[ue,w]}_setupContainer(){let ue=this._container;ue.classList.add("maplibregl-map");let w=this._canvasContainer=c.create("div","maplibregl-canvas-container",ue);this._interactive&&w.classList.add("maplibregl-interactive"),this._canvas=c.create("canvas","maplibregl-canvas",w),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");let B=this._containerDimensions(),Q=this._getClampedPixelRatio(B[0],B[1]);this._resizeCanvas(B[0],B[1],Q);let ee=this._controlContainer=c.create("div","maplibregl-control-container",ue),le=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(ze=>{le[ze]=c.create("div",`maplibregl-ctrl-${ze} `,ee)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(ue,w,B){this._canvas.width=Math.floor(B*ue),this._canvas.height=Math.floor(B*w),this._canvas.style.width=`${ue}px`,this._canvas.style.height=`${w}px`}_setupPainter(){let ue={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1},w=null;this._canvas.addEventListener("webglcontextcreationerror",Q=>{w={requestedAttributes:ue},Q&&(w.statusMessage=Q.statusMessage,w.type=Q.type)},{once:!0});let B=this._canvas.getContext("webgl2",ue)||this._canvas.getContext("webgl",ue);if(!B){let Q="Failed to initialize WebGL";throw w?(w.message=Q,new Error(JSON.stringify(w))):new Error(Q)}this.painter=new Dc(B,this.transform),f.testSupport(B)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(ue){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||ue,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(ue){return this._update(),this._renderTaskQueue.add(ue)}_cancelRenderFrame(ue){this._renderTaskQueue.remove(ue)}_render(ue){let w=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(ue),this._removed)return;let B=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let ee=this.transform.zoom,le=u.now();this.style.zoomHistory.update(ee,le);let ze=new a.z(ee,{now:le,fadeDuration:w,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),Ze=ze.crossFadingFactor();Ze===1&&Ze===this._crossFadingFactor||(B=!0,this._crossFadingFactor=Ze),this.style.update(ze)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,w,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:w,showPadding:this.showPadding}),this.fire(new a.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,a.bf.mark(a.bg.load),this.fire(new a.k("load"))),this.style&&(this.style.hasTransitions()||B)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let Q=this._sourcesDirty||this._styleDirty||this._placementDirty;return Q||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new a.k("idle")),!this._loaded||this._fullyLoaded||Q||(this._fullyLoaded=!0,a.bf.mark(a.bg.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var ue;this._hash&&this._hash.remove();for(let B of this._controls)B.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window!="undefined"&&removeEventListener("online",this._onWindowOnline,!1),p.removeThrottleControl(this._imageQueueHandle),(ue=this._resizeObserver)===null||ue===void 0||ue.disconnect();let w=this.painter.context.gl.getExtension("WEBGL_lose_context");w!=null&&w.loseContext&&w.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),c.remove(this._canvasContainer),c.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),a.bf.clearMetrics(),this._removed=!0,this.fire(new a.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,u.frameAsync(this._frameRequest).then(ue=>{a.bf.frame(ue),this._frameRequest=null,this._render(ue)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(ue){this._showTileBoundaries!==ue&&(this._showTileBoundaries=ue,this._update())}get showPadding(){return!!this._showPadding}set showPadding(ue){this._showPadding!==ue&&(this._showPadding=ue,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(ue){this._showCollisionBoxes!==ue&&(this._showCollisionBoxes=ue,ue?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(ue){this._showOverdrawInspector!==ue&&(this._showOverdrawInspector=ue,this._update())}get repaint(){return!!this._repaint}set repaint(ue){this._repaint!==ue&&(this._repaint=ue,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(ue){this._vertices=ue,this._update()}get version(){return ml}getCameraTargetElevation(){return this.transform.elevation}},i.MapMouseEvent=jl,i.MapTouchEvent=lf,i.MapWheelEvent=Xh,i.Marker=Yu,i.NavigationControl=class{constructor(ue){this._updateZoomButtons=()=>{let w=this._map.getZoom(),B=w===this._map.getMaxZoom(),Q=w===this._map.getMinZoom();this._zoomInButton.disabled=B,this._zoomOutButton.disabled=Q,this._zoomInButton.setAttribute("aria-disabled",B.toString()),this._zoomOutButton.setAttribute("aria-disabled",Q.toString())},this._rotateCompassArrow=()=>{let w=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=w},this._setButtonTitle=(w,B)=>{let Q=this._map._getUIString(`NavigationControl.${B}`);w.title=Q,w.setAttribute("aria-label",Q)},this.options=a.e({},va,ue),this._container=c.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",w=>w.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",w=>this._map.zoomIn({},{originalEvent:w})),c.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",w=>this._map.zoomOut({},{originalEvent:w})),c.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",w=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:w}):this._map.resetNorth({},{originalEvent:w})}),this._compassIcon=c.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(ue){return this._map=ue,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new no(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){c.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(ue,w){let B=c.create("button",ue,this._container);return B.type="button",B.addEventListener("click",w),B}},i.Popup=class extends a.E{constructor(ue){super(),this.remove=()=>(this._content&&c.remove(this._content),this._container&&(c.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new a.k("close"))),this),this._onMouseUp=w=>{this._update(w.point)},this._onMouseMove=w=>{this._update(w.point)},this._onDrag=w=>{this._update(w.point)},this._update=w=>{var B;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=c.create("div","maplibregl-popup",this._map.getContainer()),this._tip=c.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let Ze of this.options.className.split(" "))this._container.classList.add(Ze);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?rs(this._lngLat,this._flatPos,this._map.transform):(B=this._lngLat)===null||B===void 0?void 0:B.wrap(),this._trackPointer&&!w)return;let Q=this._flatPos=this._pos=this._trackPointer&&w?w:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&w?w:this._map.transform.locationPoint(this._lngLat));let ee=this.options.anchor,le=hc(this.options.offset);if(!ee){let Ze=this._container.offsetWidth,ut=this._container.offsetHeight,Mt;Mt=Q.y+le.bottom.ythis._map.transform.height-ut?["bottom"]:[],Q.xthis._map.transform.width-Ze/2&&Mt.push("right"),ee=Mt.length===0?"bottom":Mt.join("-")}let ze=Q.add(le[ee]);this.options.subpixelPositioning||(ze=ze.round()),c.setTransform(this._container,`${Ql[ee]} translate(${ze.x}px,${ze.y}px)`),Cu(this._container,ee,"popup")},this._onClose=()=>{this.remove()},this.options=a.e(Object.create(oo),ue)}addTo(ue){return this._map&&this.remove(),this._map=ue,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new a.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(ue){return this._lngLat=a.N.convert(ue),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(ue){return this.setDOMContent(document.createTextNode(ue))}setHTML(ue){let w=document.createDocumentFragment(),B=document.createElement("body"),Q;for(B.innerHTML=ue;Q=B.firstChild,Q;)w.appendChild(Q);return this.setDOMContent(w)}getMaxWidth(){var ue;return(ue=this._container)===null||ue===void 0?void 0:ue.style.maxWidth}setMaxWidth(ue){return this.options.maxWidth=ue,this._update(),this}setDOMContent(ue){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=c.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(ue),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(ue){return this._container&&this._container.classList.add(ue),this}removeClassName(ue){return this._container&&this._container.classList.remove(ue),this}setOffset(ue){return this.options.offset=ue,this._update(),this}toggleClassName(ue){if(this._container)return this._container.classList.toggle(ue)}setSubpixelPositioning(ue){this.options.subpixelPositioning=ue}_createCloseButton(){this.options.closeButton&&(this._closeButton=c.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let ue=this._container.querySelector(Vc);ue&&ue.focus()}},i.RasterDEMTileSource=Vt,i.RasterTileSource=mt,i.ScaleControl=class{constructor(ue){this._onMove=()=>{Ac(this._map,this._container,this.options)},this.setUnit=w=>{this.options.unit=w,Ac(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},xu),ue)}getDefaultPosition(){return"bottom-left"}onAdd(ue){return this._map=ue,this._container=c.create("div","maplibregl-ctrl maplibregl-ctrl-scale",ue.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){c.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},i.ScrollZoomHandler=Kr,i.Style=Ha,i.TerrainControl=class{constructor(ue){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=ue}onAdd(ue){return this._map=ue,this._container=c.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=c.create("button","maplibregl-ctrl-terrain",this._container),c.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){c.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},i.TwoFingersTouchPitchHandler=Bc,i.TwoFingersTouchRotateHandler=cf,i.TwoFingersTouchZoomHandler=vu,i.TwoFingersTouchZoomRotateHandler=Yi,i.VectorTileSource=lt,i.VideoSource=Ht,i.addSourceType=(ue,w)=>a._(void 0,void 0,void 0,function*(){if(je(ue))throw new Error(`A source type called "${ue}" already exists.`);((B,Q)=>{tt[B]=Q})(ue,w)}),i.clearPrewarmedResources=function(){let ue=ge;ue&&(ue.isPreloaded()&&ue.numActive()===1?(ue.release(_e),ge=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},i.getMaxParallelImageRequests=function(){return a.a.MAX_PARALLEL_IMAGE_REQUESTS},i.getRTLTextPluginStatus=function(){return St().getRTLTextPluginStatus()},i.getVersion=function(){return Ku},i.getWorkerCount=function(){return ke.workerCount},i.getWorkerUrl=function(){return a.a.WORKER_URL},i.importScriptInWorkers=function(ue){return we().broadcast("IS",ue)},i.prewarm=function(){Se().acquire(_e)},i.setMaxParallelImageRequests=function(ue){a.a.MAX_PARALLEL_IMAGE_REQUESTS=ue},i.setRTLTextPlugin=function(ue,w){return St().setRTLTextPlugin(ue,w)},i.setWorkerCount=function(ue){ke.workerCount=ue},i.setWorkerUrl=function(ue){a.a.WORKER_URL=ue}});var n=e;return n})});var xje=ye((Xbr,_je)=>{"use strict";var pw=Pr(),VXt=Zl().sanitizeHTML,GXt=IJ(),gje=Px();function mje(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=gje.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var sg=mje.prototype;sg.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=v7(t)};sg.needsNewImage=function(e){var t=this.subplot.map;return t.getSource(this.idSource)&&this.sourceType==="image"&&e.sourcetype==="image"&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))};sg.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type};sg.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]};sg.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]};sg.updateImage=function(e){var t=this.subplot.map;t.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var r=this.findFollowingMapLayerId(this.lookupBelow());r!==null&&this.subplot.map.moveLayer(this.idLayer,r)};sg.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,!!v7(e)){var r=HXt(e);t.addSource(this.idSource,r)}};sg.findFollowingMapLayerId=function(e){if(e==="traces")for(var t=this.subplot.getMapLayers(),r=0;r0){for(var r=0;r0}function yje(e){var t={},r={};switch(e.type){case"circle":pw.extendFlat(r,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":pw.extendFlat(r,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":pw.extendFlat(r,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var n=e.symbol,i=GXt(n.textposition,n.iconsize);pw.extendFlat(t,{"icon-image":n.icon+"-15","icon-size":n.iconsize/10,"text-field":n.text,"text-size":n.textfont.size,"text-anchor":i.anchor,"text-offset":i.offset,"symbol-placement":n.placement}),pw.extendFlat(r,{"icon-color":e.color,"text-color":n.textfont.color,"text-opacity":e.opacity});break;case"raster":pw.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":e.opacity});break}return{layout:t,paint:r}}function HXt(e){var t=e.sourcetype,r=e.source,n={type:t},i;return t==="geojson"?i="data":t==="vector"?i=typeof r=="string"?"url":"tiles":t==="raster"?(i="tiles",n.tileSize=256):t==="image"&&(i="url",n.coordinates=e.coordinates),n[i]=r,e.sourceattribution&&(n.attribution=VXt(e.sourceattribution)),n}_je.exports=function(t,r,n){var i=new mje(t,r);return i.update(n),i}});var kje=ye((Zbr,Eje)=>{"use strict";var OJ=pje(),BJ=Pr(),Tje=hx(),bje=Oa(),jXt=ho(),WXt=yv(),p7=vf(),Aje=Cg(),XXt=Aje.drawMode,ZXt=Aje.selectMode,YXt=qf().prepSelect,KXt=qf().clearOutline,JXt=qf().clearSelectionsCache,$Xt=qf().selectOnClick,gw=Px(),QXt=xje();function Sje(e,t){this.id=t,this.gd=e;var r=e._fullLayout,n=e._context;this.container=r._glcontainer.node(),this.isStatic=n.staticPlot,this.uid=r._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(r),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var Hh=Sje.prototype;Hh.plot=function(e,t,r){var n=this,i;n.map?i=new Promise(function(a,o){n.updateMap(e,t,a,o)}):i=new Promise(function(a,o){n.createMap(e,t,a,o)}),r.push(i)};Hh.createMap=function(e,t,r,n){var i=this,a=t[i.id],o=i.styleObj=Mje(a.style),s=a.bounds,l=s?[[s.west,s.south],[s.east,s.north]]:null,u=i.map=new OJ.Map({container:i.div,style:o.style,center:NJ(a.center),zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,maxBounds:l,interactive:!i.isStatic,preserveDrawingBuffer:i.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new OJ.AttributionControl({compact:!0})),c={};u.on("styleimagemissing",function(h){var d=h.id;if(!c[d]&&d.includes("-15")){c[d]=!0;var v=new Image(15,15);v.onload=function(){u.addImage(d,v)},v.crossOrigin="Anonymous",v.src="https://unpkg.com/maki@2.1.0/icons/"+d+".svg"}}),u.setTransformRequest(function(h){return h=h.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),h=h.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),h=h.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:h}}),u._canvas.style.left="0px",u._canvas.style.top="0px",i.rejectOnError(n),i.isStatic||i.initFx(e,t);var f=[];f.push(new Promise(function(h){u.once("load",h)})),f=f.concat(Tje.fetchTraceGeoData(e)),Promise.all(f).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Hh.updateMap=function(e,t,r,n){var i=this,a=i.map,o=t[this.id];i.rejectOnError(n);var s=[],l=Mje(o.style);JSON.stringify(i.styleObj)!==JSON.stringify(l)&&(i.styleObj=l,a.setStyle(l.style),i.traceHash={},s.push(new Promise(function(u){a.once("styledata",u)}))),s=s.concat(Tje.fetchTraceGeoData(e)),Promise.all(s).then(function(){i.fillBelowLookup(e,t),i.updateData(e),i.updateLayout(t),i.resolveOnRender(r)}).catch(n)};Hh.fillBelowLookup=function(e,t){var r=t[this.id],n=r.layers,i,a,o=this.belowLookup={},s=!1;for(i=0;i1)for(i=0;i-1&&$Xt(l.originalEvent,n,[r.xaxis],[r.yaxis],r.id,s),u.indexOf("event")>-1&&p7.click(n,l.originalEvent)}}};Hh.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(t.isStatic)return;function i(l){var u=t.map.unproject(l);return[u.lng,u.lat]}var a=e.dragmode,o;o=function(l,u){if(u.isRect){var c=l.range={};c[t.id]=[i([u.xmin,u.ymin]),i([u.xmax,u.ymax])]}else{var f=l.lassoPoints={};f[t.id]=u.map(i)}};var s=t.dragOptions;t.dragOptions=BJ.extendDeep(s||{},{dragmode:e.dragmode,element:t.div,gd:n,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:o},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),ZXt(a)||XXt(a)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(l,u,c){YXt(l,u,c,t.dragOptions,a)},WXt.init(t.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener("touchstart",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on("click",t.onClickInPanHandler))};Hh.updateFramework=function(e){var t=e[this.id].domain,r=e._size,n=this.div.style;n.width=r.w*(t.x[1]-t.x[0])+"px",n.height=r.h*(t.y[1]-t.y[0])+"px",n.left=r.l+t.x[0]*r.w+"px",n.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])};Hh.updateLayers=function(e){var t=e[this.id],r=t.layers,n=this.layerList,i;if(r.length!==n.length){for(i=0;i{"use strict";var UJ=Pr(),tZt=q_(),rZt=Zd(),Cje=Qk();Lje.exports=function(t,r,n){tZt(t,r,n,{type:"map",attributes:Cje,handleDefaults:iZt,partition:"y"})};function iZt(e,t,r){r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch");var n=r("bounds.west"),i=r("bounds.east"),a=r("bounds.south"),o=r("bounds.north");(n===void 0||i===void 0||a===void 0||o===void 0)&&delete t.bounds,rZt(e,t,{name:"layers",handleItemDefaults:nZt}),t._input=e}function nZt(e,t){function r(l,u){return UJ.coerce(e,t,Cje.layers,l,u)}var n=r("visible");if(n){var i=r("sourcetype"),a=i==="raster"||i==="image";r("source"),r("sourceattribution"),i==="vector"&&r("sourcelayer"),i==="image"&&r("coordinates");var o;a&&(o="raster");var s=r("type",o);a&&s!=="raster"&&(s=t.type="raster",UJ.log("Source types *raster* and *image* must drawn *raster* layer type.")),r("below"),r("color"),r("opacity"),r("minzoom"),r("maxzoom"),s==="circle"&&r("circle.radius"),s==="line"&&(r("line.width"),r("line.dash")),s==="fill"&&r("fill.outlinecolor"),s==="symbol"&&(r("symbol.icon"),r("symbol.iconsize"),r("symbol.text"),UJ.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}});var m7=ye(u0=>{"use strict";var g7=Pr(),Ije=g7.strTranslate,aZt=g7.strScale,oZt=Id().getSubplotCalcData,sZt=Wp(),lZt=qa(),Rje=So(),uZt=Zl(),cZt=kje(),Ix="map";u0.name=Ix;u0.attr="subplot";u0.idRoot=Ix;u0.idRegex=u0.attrRegex=g7.counterRegex(Ix);u0.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}};u0.layoutAttributes=Qk();u0.supplyLayoutDefaults=Pje();u0.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,i=r._subplots[Ix],a=0;am/2){var b=f.split("|").join("
");d.text(b).attr("data-unformatted",b).call(uZt.convertToTspans,e),v=Rje.bBox(d.node())}d.attr("transform",Ije(-3,-v.height+8)),h.insert("rect",".static-attribution").attr({x:-v.width-6,y:-v.height-3,width:v.width+6,height:v.height+3,fill:"rgba(255, 255, 255, 0.75)"});var p=1;v.width+6>m&&(p=m/(v.width+6));var k=[n.l+n.w*o.x[1],n.t+n.h*(1-o.y[0])];h.attr("transform",Ije(k[0],k[1])+aZt(p))}};u0.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[Ix],n=0;n{"use strict";Dje.exports={attributes:l7(),supplyDefaults:XHe(),colorbar:$d(),formatLabels:PJ(),calc:_F(),plot:sje(),hoverPoints:d7().hoverPoints,eventData:fje(),selectPoints:dje(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:"trace",name:"scattermap",basePlotModule:m7(),categories:["map","gl","symbols","showLegend","scatter-like"],meta:{}}});var qje=ye(($br,zje)=>{"use strict";zje.exports=Fje()});var VJ=ye((Qbr,Oje)=>{"use strict";var x1=a5(),fZt=Tu(),{hovertemplateAttrs:hZt,templatefallbackAttrs:dZt}=Ll(),vZt=Gl(),Rx=Ao().extendFlat;Oje.exports=Rx({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:Rx({},x1.featureidkey,{}),below:{valType:"string",editType:"plot"},text:x1.text,hovertext:x1.hovertext,marker:{line:{color:Rx({},x1.marker.line.color,{editType:"plot"}),width:Rx({},x1.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:Rx({},x1.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:Rx({},x1.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:Rx({},x1.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:x1.hoverinfo,hovertemplate:hZt({},{keys:["properties"]}),hovertemplatefallback:dZt(),showlegend:Rx({},vZt.showlegend,{dflt:!1})},fZt("",{cLetter:"z",editTypeOverride:"calc"}))});var Nje=ye((e2r,Bje)=>{"use strict";var iC=Pr(),pZt=td(),gZt=VJ();Bje.exports=function(t,r,n,i){function a(c,f){return iC.coerce(t,r,gZt,c,f)}var o=a("locations"),s=a("z"),l=a("geojson");if(!iC.isArrayOrTypedArray(o)||!o.length||!iC.isArrayOrTypedArray(s)||!s.length||!(typeof l=="string"&&l!==""||iC.isPlainObject(l))){r.visible=!1;return}a("featureidkey"),r._length=Math.min(o.length,s.length),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var u=a("marker.line.width");u&&a("marker.line.color"),a("marker.opacity"),pZt(t,r,i,a,{prefix:"",cLetter:"z"}),iC.coerceSelectionMarkerOpacity(r,a)}});var GJ=ye((t2r,Gje)=>{"use strict";var mZt=Eo(),b1=Pr(),yZt=tc(),_Zt=So(),xZt=cx().makeBlank,Uje=hx();function bZt(e){var t=e[0].trace,r=t.visible===!0&&t._length!==0,n={layout:{visibility:"none"},paint:{}},i={layout:{visibility:"none"},paint:{}},a=t._opts={fill:n,line:i,geojson:xZt()};if(!r)return a;var o=Uje.extractTraceFeature(e);if(!o)return a;var s=yZt.makeColorScaleFuncFromTrace(t),l=t.marker,u=l.line||{},c;b1.isArrayOrTypedArray(l.opacity)&&(c=function(k){var M=k.mo;return mZt(M)?+b1.constrain(M,0,1):0});var f;b1.isArrayOrTypedArray(u.color)&&(f=function(k){return k.mlc});var h;b1.isArrayOrTypedArray(u.width)&&(h=function(k){return k.mlw});for(var d=0;d{"use strict";var jje=GJ().convert,wZt=GJ().convertOnSelect,Hje=Px().traceLayerPrefix;function Wje(e,t){this.type="choroplethmap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",Hje+t+"-fill"],["line",Hje+t+"-line"]],this.below=null}var D5=Wje.prototype;D5.update=function(e){this._update(jje(e)),e[0].trace._glTrace=this};D5.updateOnSelect=function(e){this._update(wZt(e))};D5._update=function(e){var t=this.subplot,r=this.layerList,n=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(e.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(e,n),this.below=n);for(var i=0;i=0;r--)e.removeLayer(t[r][1])};D5.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};Xje.exports=function(t,r){var n=r[0].trace,i=new Wje(t,n.uid),a=i.sourceId,o=jje(r),s=i.below=t.belowLookup["trace-"+n.uid];return t.map.addSource(a,{type:"geojson",data:o.geojson}),i._addLayers(o,s),r[0].trace._glTrace=i,i}});var Kje=ye((i2r,Yje)=>{"use strict";Yje.exports={attributes:VJ(),supplyDefaults:Nje(),colorbar:D_(),calc:NF(),plot:Zje(),hoverPoints:VF(),eventData:GF(),selectPoints:HF(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.updateOnSelect(t)}},getBelow:function(e,t){for(var r=t.getMapLayers(),n=r.length-2;n>=0;n--){var i=r[n].id;if(typeof i=="string"&&i.indexOf("water")===0){for(var a=n+1;a{"use strict";Jje.exports=Kje()});var jJ=ye((a2r,eWe)=>{"use strict";var TZt=Tu(),{hovertemplateAttrs:AZt,templatefallbackAttrs:SZt}=Ll(),Qje=Gl(),y7=l7(),HJ=Ao().extendFlat;eWe.exports=HJ({lon:y7.lon,lat:y7.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:y7.text,hovertext:y7.hovertext,hoverinfo:HJ({},Qje.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:AZt(),hovertemplatefallback:SZt(),showlegend:HJ({},Qje.showlegend,{dflt:!1})},TZt("",{cLetter:"z",editTypeOverride:"calc"}))});var rWe=ye((o2r,tWe)=>{"use strict";var MZt=Pr(),EZt=td(),kZt=jJ();tWe.exports=function(t,r,n,i){function a(u,c){return MZt.coerce(t,r,kZt,u,c)}var o=a("lon")||[],s=a("lat")||[],l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),EZt(t,r,i,a,{prefix:"",cLetter:"z"})}});var aWe=ye((s2r,nWe)=>{"use strict";var WJ=Eo(),CZt=Pr().isArrayOrTypedArray,XJ=fs().BADNUM,LZt=gv(),iWe=Pr()._;nWe.exports=function(t,r){for(var n=r._length,i=new Array(n),a=r.z,o=CZt(a)&&a.length,s=0;s{"use strict";var PZt=Eo(),ZJ=Pr(),oWe=ka(),sWe=tc(),lWe=fs().BADNUM,IZt=cx().makeBlank;uWe.exports=function(t){var r=t[0].trace,n=r.visible===!0&&r._length!==0,i={layout:{visibility:"none"},paint:{}},a=r._opts={heatmap:i,geojson:IZt()};if(!n)return a;var o=[],s,l=r.z,u=r.radius,c=ZJ.isArrayOrTypedArray(l)&&l.length,f=ZJ.isArrayOrTypedArray(u);for(s=0;s0?+u[s]:0),o.push({type:"Feature",geometry:{type:"Point",coordinates:d},properties:v})}}var b=sWe.extractOpts(r),p=b.reversescale?sWe.flipScale(b.colorscale):b.colorscale,k=p[0][1],M=oWe.opacity(k)<1?k:oWe.addOpacity(k,0),T=["interpolate",["linear"],["heatmap-density"],0,M];for(s=1;s{"use strict";var fWe=cWe(),RZt=Px().traceLayerPrefix;function hWe(e,t){this.type="densitymap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",RZt+t+"-heatmap"]],this.below=null}var _7=hWe.prototype;_7.update=function(e){var t=this.subplot,r=this.layerList,n=fWe(e),i=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(n.geojson),i!==this.below&&(this._removeLayers(),this._addLayers(n,i),this.below=i);for(var a=0;a=0;r--)e.removeLayer(t[r][1])};_7.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};dWe.exports=function(t,r){var n=r[0].trace,i=new hWe(t,n.uid),a=i.sourceId,o=fWe(r),s=i.below=t.belowLookup["trace-"+n.uid];return t.map.addSource(a,{type:"geojson",data:o.geojson}),i._addLayers(o,s),i}});var gWe=ye((c2r,pWe)=>{"use strict";var DZt=ho(),FZt=d7().hoverPoints,zZt=d7().getExtraText;pWe.exports=function(t,r,n){var i=FZt(t,r,n);if(i){var a=i[0],o=a.cd,s=o[0].trace,l=o[a.index];if(delete a.color,"z"in l){var u=a.subplot.mockAxis;a.z=l.z,a.zLabel=DZt.tickText(u,u.c2l(l.z),"hover").text}return a.extraText=zZt(s,l,o[0].t.labels),[a]}}});var yWe=ye((f2r,mWe)=>{"use strict";mWe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var xWe=ye((h2r,_We)=>{"use strict";_We.exports={attributes:jJ(),supplyDefaults:rWe(),colorbar:D_(),formatLabels:PJ(),calc:aWe(),plot:vWe(),hoverPoints:gWe(),eventData:yWe(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n{"use strict";bWe.exports=xWe()});var KJ=ye((p2r,EWe)=>{"use strict";var qZt=ec(),OZt=Gl(),TWe=Ih(),YJ=p3(),BZt=Cc().attributes,{hovertemplateAttrs:AWe,templatefallbackAttrs:SWe}=Ll(),NZt=Tu(),UZt=vl().templatedArray,VZt=df().descriptionOnlyNumbers,MWe=Ao().extendFlat,GZt=mc().overrideAll,v2r=EWe.exports=GZt({hoverinfo:MWe({},OZt.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:YJ.hoverlabel,domain:BZt({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:VZt("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:qZt({autoShadowDflt:!0}),customdata:void 0,node:{label:{valType:"data_array",dflt:[]},groups:{valType:"info_array",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:"number",editType:"calc"}},x:{valType:"data_array",dflt:[]},y:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:TWe.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:.5,arrayOk:!0}},pad:{valType:"number",arrayOk:!1,min:0,dflt:20},thickness:{valType:"number",arrayOk:!1,min:1,dflt:20},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:YJ.hoverlabel,hovertemplate:AWe({},{keys:["value","label"]}),hovertemplatefallback:SWe(),align:{valType:"enumerated",values:["justify","left","right","center"],dflt:"justify"}},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},hovercolor:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:TWe.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}},source:{valType:"data_array",dflt:[]},target:{valType:"data_array",dflt:[]},value:{valType:"data_array",dflt:[]},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:YJ.hoverlabel,hovertemplate:AWe({},{keys:["value","label"]}),hovertemplatefallback:SWe(),colorscales:UZt("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:MWe(NZt().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")});var IWe=ye((g2r,PWe)=>{"use strict";var F5=Pr(),x7=KJ(),HZt=ka(),kWe=fd(),jZt=Cc().defaults,CWe=_M(),LWe=vl(),WZt=Zd();PWe.exports=function(t,r,n,i){function a(T,L){return F5.coerce(t,r,x7,T,L)}var o=F5.extendDeep(i.hoverlabel,t.hoverlabel),s=t.node,l=LWe.newContainer(r,"node");function u(T,L){return F5.coerce(s,l,x7.node,T,L)}u("label"),u("groups"),u("x"),u("y"),u("pad"),u("thickness"),u("line.color"),u("line.width"),u("hoverinfo",t.hoverinfo),CWe(s,l,u,o),u("hovertemplate"),u("align");var c=i.colorway,f=function(T){return c[T%c.length]};u("color",l.label.map(function(T,L){return HZt.addOpacity(f(L),.8)})),u("customdata");var h=t.link||{},d=LWe.newContainer(r,"link");function v(T,L){return F5.coerce(h,d,x7.link,T,L)}v("label"),v("arrowlen"),v("source"),v("target"),v("value"),v("line.color"),v("line.width"),v("hoverinfo",t.hoverinfo),CWe(h,d,v,o),v("hovertemplate");var m=kWe(i.paper_bgcolor).getLuminance()<.333,b=m?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",p=v("color",b);function k(T){var L=kWe(T);if(!L.isValid())return T;var x=L.getAlpha();return x<=.8?L.setAlpha(x+.2):L=m?L.brighten():L.darken(),L.toRgbString()}v("hovercolor",Array.isArray(p)?p.map(k):k(p)),v("customdata"),WZt(h,d,{name:"colorscales",handleItemDefaults:XZt}),jZt(r,i,a),a("orientation"),a("valueformat"),a("valuesuffix");var M;l.x.length&&l.y.length&&(M="freeform"),a("arrangement",M),F5.coerceFont(a,"textfont",i.font,{autoShadowDflt:!0}),r._length=null};function XZt(e,t){function r(n,i){return F5.coerce(e,t,x7.link.colorscales,n,i)}r("label"),r("cmin"),r("cmax"),r("colorscale")}});var JJ=ye((m2r,RWe)=>{"use strict";RWe.exports=ZZt;function ZZt(e){for(var t=e.length,r=new Array(t),n=new Array(t),i=new Array(t),a=new Array(t),o=new Array(t),s=new Array(t),l=0;l0;){b=k[k.length-1];var M=e[b];if(a[b]=0&&s[b].push(o[L])}a[b]=T}else{if(n[b]===r[b]){for(var x=[],C=[],S=0,T=p.length-1;T>=0;--T){var g=p[T];if(i[g]=!1,x.push(g),C.push(s[g]),S+=s[g].length,o[g]=c.length,g===b){p.length=T;break}}c.push(x);for(var P=new Array(S),T=0;T{"use strict";var YZt=JJ(),z5=Pr(),KZt=iy().wrap,nC=z5.isArrayOrTypedArray,DWe=z5.isIndex,FWe=tc();function JZt(e){var t=e.node,r=e.link,n=[],i=nC(r.color),a=nC(r.hovercolor),o=nC(r.customdata),s={},l={},u=r.colorscales.length,c;for(c=0;cv&&(v=r.source[c]),r.target[c]>v&&(v=r.target[c]);var m=v+1;e.node._count=m;var b,p=e.node.groups,k={};for(c=0;c0&&DWe(S,m)&&DWe(g,m)&&!(k.hasOwnProperty(S)&&k.hasOwnProperty(g)&&k[S]===k[g])){k.hasOwnProperty(g)&&(g=k[g]),k.hasOwnProperty(S)&&(S=k[S]),S=+S,g=+g,s[S]=s[g]=!0;var P="";r.label&&r.label[c]&&(P=r.label[c]);var E=null;P&&l.hasOwnProperty(P)&&(E=l[P]),n.push({pointNumber:c,label:P,color:i?r.color[c]:r.color,hovercolor:a?r.hovercolor[c]:r.hovercolor,customdata:o?r.customdata[c]:r.customdata,concentrationscale:E,source:S,target:g,value:+C}),x.source.push(S),x.target.push(g)}}var z=m+p.length,q=nC(t.color),U=nC(t.customdata),G=[];for(c=0;cm-1,childrenNodes:[],pointNumber:c,label:Z,color:q?t.color[c]:t.color,customdata:U?t.customdata[c]:t.customdata})}var j=!1;return $Zt(z,x.source,x.target)&&(j=!0),{circular:j,links:n,nodes:G,groups:p,groupLookup:k}}function $Zt(e,t,r){for(var n=z5.init2dArray(e,0),i=0;i1})}zWe.exports=function(t,r){var n=JZt(r);return KZt({circular:n.circular,_nodes:n.nodes,_links:n.links,_groups:n.groups,_groupLookup:n.groupLookup})}});var BWe=ye((b7,OWe)=>{(function(e,t){typeof b7=="object"&&typeof OWe!="undefined"?t(b7):(e=e||self,t(e.d3=e.d3||{}))})(b7,function(e){"use strict";function t(C){var S=+this._x.call(null,C),g=+this._y.call(null,C);return r(this.cover(S,g),S,g,C)}function r(C,S,g,P){if(isNaN(S)||isNaN(g))return C;var E,z=C._root,q={data:P},U=C._x0,G=C._y0,Z=C._x1,j=C._y1,N,H,re,oe,_e,ke,Ce,ge;if(!z)return C._root=q,C;for(;z.length;)if((_e=S>=(N=(U+Z)/2))?U=N:Z=N,(ke=g>=(H=(G+j)/2))?G=H:j=H,E=z,!(z=z[Ce=ke<<1|_e]))return E[Ce]=q,C;if(re=+C._x.call(null,z.data),oe=+C._y.call(null,z.data),S===re&&g===oe)return q.next=z,E?E[Ce]=q:C._root=q,C;do E=E?E[Ce]=new Array(4):C._root=new Array(4),(_e=S>=(N=(U+Z)/2))?U=N:Z=N,(ke=g>=(H=(G+j)/2))?G=H:j=H;while((Ce=ke<<1|_e)===(ge=(oe>=H)<<1|re>=N));return E[ge]=z,E[Ce]=q,C}function n(C){var S,g,P=C.length,E,z,q=new Array(P),U=new Array(P),G=1/0,Z=1/0,j=-1/0,N=-1/0;for(g=0;gj&&(j=E),zN&&(N=z));if(G>j||Z>N)return this;for(this.cover(G,Z).cover(j,N),g=0;gC||C>=E||P>S||S>=z;)switch(Z=(Sj||(U=oe.y0)>N||(G=oe.x1)=Ce)<<1|C>=ke)&&(oe=H[H.length-1],H[H.length-1]=H[H.length-1-_e],H[H.length-1-_e]=oe)}else{var ge=C-+this._x.call(null,re.data),ie=S-+this._y.call(null,re.data),Se=ge*ge+ie*ie;if(Se=(H=(q+G)/2))?q=H:G=H,(_e=N>=(re=(U+Z)/2))?U=re:Z=re,S=g,!(g=g[ke=_e<<1|oe]))return this;if(!g.length)break;(S[ke+1&3]||S[ke+2&3]||S[ke+3&3])&&(P=S,Ce=ke)}for(;g.data!==C;)if(E=g,!(g=g.next))return this;return(z=g.next)&&delete g.next,E?(z?E.next=z:delete E.next,this):S?(z?S[ke]=z:delete S[ke],(g=S[0]||S[1]||S[2]||S[3])&&g===(S[3]||S[2]||S[1]||S[0])&&!g.length&&(P?P[Ce]=g:this._root=g),this):(this._root=z,this)}function c(C){for(var S=0,g=C.length;S{(function(e,t){t(typeof w7=="object"&&typeof NWe!="undefined"?w7:e.d3=e.d3||{})})(w7,function(e){"use strict";var t="$";function r(){}r.prototype=n.prototype={constructor:r,has:function(m){return t+m in this},get:function(m){return this[t+m]},set:function(m,b){return this[t+m]=b,this},remove:function(m){var b=t+m;return b in this&&delete this[b]},clear:function(){for(var m in this)m[0]===t&&delete this[m]},keys:function(){var m=[];for(var b in this)b[0]===t&&m.push(b.slice(1));return m},values:function(){var m=[];for(var b in this)b[0]===t&&m.push(this[b]);return m},entries:function(){var m=[];for(var b in this)b[0]===t&&m.push({key:b.slice(1),value:this[b]});return m},size:function(){var m=0;for(var b in this)b[0]===t&&++m;return m},empty:function(){for(var m in this)if(m[0]===t)return!1;return!0},each:function(m){for(var b in this)b[0]===t&&m(this[b],b.slice(1),this)}};function n(m,b){var p=new r;if(m instanceof r)m.each(function(x,C){p.set(C,x)});else if(Array.isArray(m)){var k=-1,M=m.length,T;if(b==null)for(;++k=m.length)return p!=null&&x.sort(p),k!=null?k(x):x;for(var P=-1,E=x.length,z=m[C++],q,U,G=n(),Z,j=S();++Pm.length)return x;var S,g=b[C-1];return k!=null&&C>=m.length?S=x.entries():(S=[],x.each(function(P,E){S.push({key:E,values:L(P,C)})})),g!=null?S.sort(function(P,E){return g(P.key,E.key)}):S}return M={object:function(x){return T(x,0,a,o)},map:function(x){return T(x,0,s,l)},entries:function(x){return L(T(x,0,s,l),0)},key:function(x){return m.push(x),M},sortKeys:function(x){return b[m.length-1]=x,M},sortValues:function(x){return p=x,M},rollup:function(x){return k=x,M}}}function a(){return{}}function o(m,b,p){m[b]=p}function s(){return n()}function l(m,b,p){m.set(b,p)}function u(){}var c=n.prototype;u.prototype=f.prototype={constructor:u,has:c.has,add:function(m){return m+="",this[t+m]=m,this},remove:c.remove,clear:c.clear,values:c.keys,size:c.size,empty:c.empty,each:c.each};function f(m,b){var p=new u;if(m instanceof u)m.each(function(T){p.add(T)});else if(m){var k=-1,M=m.length;if(b==null)for(;++k{(function(e,t){typeof A7=="object"&&typeof UWe!="undefined"?t(A7):(e=e||self,t(e.d3=e.d3||{}))})(A7,function(e){"use strict";var t={value:function(){}};function r(){for(var s=0,l=arguments.length,u={},c;s=0&&(c=u.slice(f+1),u=u.slice(0,f)),u&&!l.hasOwnProperty(u))throw new Error("unknown type: "+u);return{type:u,name:c}})}n.prototype=r.prototype={constructor:n,on:function(s,l){var u=this._,c=i(s+"",u),f,h=-1,d=c.length;if(arguments.length<2){for(;++h0)for(var u=new Array(f),c=0,f,h;c{(function(e,t){typeof S7=="object"&&typeof GWe!="undefined"?t(S7):(e=e||self,t(e.d3=e.d3||{}))})(S7,function(e){"use strict";var t=0,r=0,n=0,i=1e3,a,o,s=0,l=0,u=0,c=typeof performance=="object"&&performance.now?performance:Date,f=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(C){setTimeout(C,17)};function h(){return l||(f(d),l=c.now()+u)}function d(){l=0}function v(){this._call=this._time=this._next=null}v.prototype=m.prototype={constructor:v,restart:function(C,S,g){if(typeof C!="function")throw new TypeError("callback is not a function");g=(g==null?h():+g)+(S==null?0:+S),!this._next&&o!==this&&(o?o._next=this:a=this,o=this),this._call=C,this._time=g,T()},stop:function(){this._call&&(this._call=null,this._time=1/0,T())}};function m(C,S,g){var P=new v;return P.restart(C,S,g),P}function b(){h(),++t;for(var C=a,S;C;)(S=l-C._time)>=0&&C._call.call(null,S),C=C._next;--t}function p(){l=(s=c.now())+u,t=r=0;try{b()}finally{t=0,M(),l=0}}function k(){var C=c.now(),S=C-s;S>i&&(u-=S,s=C)}function M(){for(var C,S=a,g,P=1/0;S;)S._call?(P>S._time&&(P=S._time),C=S,S=S._next):(g=S._next,S._next=null,S=C?C._next=g:a=g);o=C,T(P)}function T(C){if(!t){r&&(r=clearTimeout(r));var S=C-l;S>24?(C<1/0&&(r=setTimeout(p,C-c.now()-u)),n&&(n=clearInterval(n))):(n||(s=c.now(),n=setInterval(k,i)),t=1,f(p))}}function L(C,S,g){var P=new v;return S=S==null?0:+S,P.restart(function(E){P.stop(),C(E+S)},S,g),P}function x(C,S,g){var P=new v,E=S;return S==null?(P.restart(C,S,g),P):(S=+S,g=g==null?h():+g,P.restart(function z(q){q+=E,P.restart(z,E+=S,g),C(q)},S,g),P)}e.interval=x,e.now=h,e.timeout=L,e.timer=m,e.timerFlush=b,Object.defineProperty(e,"__esModule",{value:!0})})});var WWe=ye((M7,jWe)=>{(function(e,t){typeof M7=="object"&&typeof jWe!="undefined"?t(M7,BWe(),T7(),VWe(),HWe()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,e.d3)})(M7,function(e,t,r,n,i){"use strict";function a(C,S){var g;C==null&&(C=0),S==null&&(S=0);function P(){var E,z=g.length,q,U=0,G=0;for(E=0;EN.index){var Pe=H-De.x-De.vx,ce=re-De.y-De.vy,He=Pe*Pe+ce*ce;HeH+me||Eere+me||weG.r&&(G.r=G[Z].r)}function U(){if(S){var G,Z=S.length,j;for(g=new Array(Z),G=0;G1?(_e==null?U.remove(oe):U.set(oe,re(_e)),S):U.get(oe)},find:function(oe,_e,ke){var Ce=0,ge=C.length,ie,Se,Ee,we,De;for(ke==null?ke=1/0:ke*=ke,Ce=0;Ce1?(Z.on(oe,_e),S):Z.on(oe)}}}function M(){var C,S,g,P=o(-30),E,z=1,q=1/0,U=.81;function G(H){var re,oe=C.length,_e=t.quadtree(C,v,m).visitAfter(j);for(g=H,re=0;re=q)return;(H.data!==S||H.next)&&(ke===0&&(ke=s(),ie+=ke*ke),Ce===0&&(Ce=s(),ie+=Ce*Ce),ie{(function(e,t){typeof E7=="object"&&typeof XWe!="undefined"?t(E7):(e=e||self,t(e.d3=e.d3||{}))})(E7,function(e){"use strict";var t=Math.PI,r=2*t,n=1e-6,i=r-n;function a(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function o(){return new a}a.prototype=o.prototype={constructor:a,moveTo:function(s,l){this._+="M"+(this._x0=this._x1=+s)+","+(this._y0=this._y1=+l)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(s,l){this._+="L"+(this._x1=+s)+","+(this._y1=+l)},quadraticCurveTo:function(s,l,u,c){this._+="Q"+ +s+","+ +l+","+(this._x1=+u)+","+(this._y1=+c)},bezierCurveTo:function(s,l,u,c,f,h){this._+="C"+ +s+","+ +l+","+ +u+","+ +c+","+(this._x1=+f)+","+(this._y1=+h)},arcTo:function(s,l,u,c,f){s=+s,l=+l,u=+u,c=+c,f=+f;var h=this._x1,d=this._y1,v=u-s,m=c-l,b=h-s,p=d-l,k=b*b+p*p;if(f<0)throw new Error("negative radius: "+f);if(this._x1===null)this._+="M"+(this._x1=s)+","+(this._y1=l);else if(k>n)if(!(Math.abs(p*v-m*b)>n)||!f)this._+="L"+(this._x1=s)+","+(this._y1=l);else{var M=u-h,T=c-d,L=v*v+m*m,x=M*M+T*T,C=Math.sqrt(L),S=Math.sqrt(k),g=f*Math.tan((t-Math.acos((L+k-x)/(2*C*S)))/2),P=g/S,E=g/C;Math.abs(P-1)>n&&(this._+="L"+(s+P*b)+","+(l+P*p)),this._+="A"+f+","+f+",0,0,"+ +(p*M>b*T)+","+(this._x1=s+E*v)+","+(this._y1=l+E*m)}},arc:function(s,l,u,c,f,h){s=+s,l=+l,u=+u,h=!!h;var d=u*Math.cos(c),v=u*Math.sin(c),m=s+d,b=l+v,p=1^h,k=h?c-f:f-c;if(u<0)throw new Error("negative radius: "+u);this._x1===null?this._+="M"+m+","+b:(Math.abs(this._x1-m)>n||Math.abs(this._y1-b)>n)&&(this._+="L"+m+","+b),u&&(k<0&&(k=k%r+r),k>i?this._+="A"+u+","+u+",0,1,"+p+","+(s-d)+","+(l-v)+"A"+u+","+u+",0,1,"+p+","+(this._x1=m)+","+(this._y1=b):k>n&&(this._+="A"+u+","+u+",0,"+ +(k>=t)+","+p+","+(this._x1=s+u*Math.cos(f))+","+(this._y1=l+u*Math.sin(f))))},rect:function(s,l,u,c){this._+="M"+(this._x0=this._x1=+s)+","+(this._y0=this._y1=+l)+"h"+ +u+"v"+ +c+"h"+-u+"Z"},toString:function(){return this._}},e.path=o,Object.defineProperty(e,"__esModule",{value:!0})})});var $J=ye((k7,YWe)=>{(function(e,t){typeof k7=="object"&&typeof YWe!="undefined"?t(k7,ZWe()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(k7,function(e,t){"use strict";function r(Ct){return function(){return Ct}}var n=Math.abs,i=Math.atan2,a=Math.cos,o=Math.max,s=Math.min,l=Math.sin,u=Math.sqrt,c=1e-12,f=Math.PI,h=f/2,d=2*f;function v(Ct){return Ct>1?0:Ct<-1?f:Math.acos(Ct)}function m(Ct){return Ct>=1?h:Ct<=-1?-h:Math.asin(Ct)}function b(Ct){return Ct.innerRadius}function p(Ct){return Ct.outerRadius}function k(Ct){return Ct.startAngle}function M(Ct){return Ct.endAngle}function T(Ct){return Ct&&Ct.padAngle}function L(Ct,Ar,Jr,hi,hn,Sn,En,ki){var _n=Jr-Ct,ya=hi-Ar,ea=En-hn,Ma=ki-Sn,_o=Ma*_n-ea*ya;if(!(_o*_oYl*Yl+Su*Su&&(As=Ks,cl=zs),{cx:As,cy:cl,x01:-ea,y01:-Ma,x11:As*(hn/zl-1),y11:cl*(hn/zl-1)}}function C(){var Ct=b,Ar=p,Jr=r(0),hi=null,hn=k,Sn=M,En=T,ki=null;function _n(){var ya,ea,Ma=+Ct.apply(this,arguments),_o=+Ar.apply(this,arguments),No=hn.apply(this,arguments)-h,po=Sn.apply(this,arguments)-h,Lo=n(po-No),ko=po>No;if(ki||(ki=ya=t.path()),_oc))ki.moveTo(0,0);else if(Lo>d-c)ki.moveTo(_o*a(No),_o*l(No)),ki.arc(0,0,_o,No,po,!ko),Ma>c&&(ki.moveTo(Ma*a(po),Ma*l(po)),ki.arc(0,0,Ma,po,No,ko));else{var Ds=No,Fs=po,ll=No,ul=po,zl=Lo,us=Lo,il=En.apply(this,arguments)/2,As=il>c&&(hi?+hi.apply(this,arguments):u(Ma*Ma+_o*_o)),cl=s(n(_o-Ma)/2,+Jr.apply(this,arguments)),Ks=cl,zs=cl,Io,ls;if(As>c){var Yl=m(As/Ma*l(il)),Su=m(As/_o*l(il));(zl-=Yl*2)>c?(Yl*=ko?1:-1,ll+=Yl,ul-=Yl):(zl=0,ll=ul=(No+po)/2),(us-=Su*2)>c?(Su*=ko?1:-1,Ds+=Su,Fs-=Su):(us=0,Ds=Fs=(No+po)/2)}var nc=_o*a(Ds),bs=_o*l(Ds),Rn=Ma*a(ul),_a=Ma*l(ul);if(cl>c){var Vu=_o*a(Fs),ql=_o*l(Fs),xo=Ma*a(ll),Kl=Ma*l(ll),Ns;if(Loc?zs>c?(Io=x(xo,Kl,nc,bs,_o,zs,ko),ls=x(Vu,ql,Rn,_a,_o,zs,ko),ki.moveTo(Io.cx+Io.x01,Io.cy+Io.y01),zsc)||!(zl>c)?ki.lineTo(Rn,_a):Ks>c?(Io=x(Rn,_a,Vu,ql,Ma,-Ks,ko),ls=x(nc,bs,xo,Kl,Ma,-Ks,ko),ki.lineTo(Io.cx+Io.x01,Io.cy+Io.y01),Ks=_o;--No)ki.point(Fs[No],ll[No]);ki.lineEnd(),ki.areaEnd()}ko&&(Fs[Ma]=+Ct(Lo,Ma,ea),ll[Ma]=+Jr(Lo,Ma,ea),ki.point(Ar?+Ar(Lo,Ma,ea):Fs[Ma],hi?+hi(Lo,Ma,ea):ll[Ma]))}if(Ds)return ki=null,Ds+""||null}function ya(){return z().defined(hn).curve(En).context(Sn)}return _n.x=function(ea){return arguments.length?(Ct=typeof ea=="function"?ea:r(+ea),Ar=null,_n):Ct},_n.x0=function(ea){return arguments.length?(Ct=typeof ea=="function"?ea:r(+ea),_n):Ct},_n.x1=function(ea){return arguments.length?(Ar=ea==null?null:typeof ea=="function"?ea:r(+ea),_n):Ar},_n.y=function(ea){return arguments.length?(Jr=typeof ea=="function"?ea:r(+ea),hi=null,_n):Jr},_n.y0=function(ea){return arguments.length?(Jr=typeof ea=="function"?ea:r(+ea),_n):Jr},_n.y1=function(ea){return arguments.length?(hi=ea==null?null:typeof ea=="function"?ea:r(+ea),_n):hi},_n.lineX0=_n.lineY0=function(){return ya().x(Ct).y(Jr)},_n.lineY1=function(){return ya().x(Ct).y(hi)},_n.lineX1=function(){return ya().x(Ar).y(Jr)},_n.defined=function(ea){return arguments.length?(hn=typeof ea=="function"?ea:r(!!ea),_n):hn},_n.curve=function(ea){return arguments.length?(En=ea,Sn!=null&&(ki=En(Sn)),_n):En},_n.context=function(ea){return arguments.length?(ea==null?Sn=ki=null:ki=En(Sn=ea),_n):Sn},_n}function U(Ct,Ar){return ArCt?1:Ar>=Ct?0:NaN}function G(Ct){return Ct}function Z(){var Ct=G,Ar=U,Jr=null,hi=r(0),hn=r(d),Sn=r(0);function En(ki){var _n,ya=ki.length,ea,Ma,_o=0,No=new Array(ya),po=new Array(ya),Lo=+hi.apply(this,arguments),ko=Math.min(d,Math.max(-d,hn.apply(this,arguments)-Lo)),Ds,Fs=Math.min(Math.abs(ko)/ya,Sn.apply(this,arguments)),ll=Fs*(ko<0?-1:1),ul;for(_n=0;_n0&&(_o+=ul);for(Ar!=null?No.sort(function(zl,us){return Ar(po[zl],po[us])}):Jr!=null&&No.sort(function(zl,us){return Jr(ki[zl],ki[us])}),_n=0,Ma=_o?(ko-ya*ll)/_o:0;_n0?ul*Ma:0)+ll,po[ea]={data:ki[ea],index:_n,value:ul,startAngle:Lo,endAngle:Ds,padAngle:Fs};return po}return En.value=function(ki){return arguments.length?(Ct=typeof ki=="function"?ki:r(+ki),En):Ct},En.sortValues=function(ki){return arguments.length?(Ar=ki,Jr=null,En):Ar},En.sort=function(ki){return arguments.length?(Jr=ki,Ar=null,En):Jr},En.startAngle=function(ki){return arguments.length?(hi=typeof ki=="function"?ki:r(+ki),En):hi},En.endAngle=function(ki){return arguments.length?(hn=typeof ki=="function"?ki:r(+ki),En):hn},En.padAngle=function(ki){return arguments.length?(Sn=typeof ki=="function"?ki:r(+ki),En):Sn},En}var j=H(g);function N(Ct){this._curve=Ct}N.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(Ct,Ar){this._curve.point(Ar*Math.sin(Ct),Ar*-Math.cos(Ct))}};function H(Ct){function Ar(Jr){return new N(Ct(Jr))}return Ar._curve=Ct,Ar}function re(Ct){var Ar=Ct.curve;return Ct.angle=Ct.x,delete Ct.x,Ct.radius=Ct.y,delete Ct.y,Ct.curve=function(Jr){return arguments.length?Ar(H(Jr)):Ar()._curve},Ct}function oe(){return re(z().curve(j))}function _e(){var Ct=q().curve(j),Ar=Ct.curve,Jr=Ct.lineX0,hi=Ct.lineX1,hn=Ct.lineY0,Sn=Ct.lineY1;return Ct.angle=Ct.x,delete Ct.x,Ct.startAngle=Ct.x0,delete Ct.x0,Ct.endAngle=Ct.x1,delete Ct.x1,Ct.radius=Ct.y,delete Ct.y,Ct.innerRadius=Ct.y0,delete Ct.y0,Ct.outerRadius=Ct.y1,delete Ct.y1,Ct.lineStartAngle=function(){return re(Jr())},delete Ct.lineX0,Ct.lineEndAngle=function(){return re(hi())},delete Ct.lineX1,Ct.lineInnerRadius=function(){return re(hn())},delete Ct.lineY0,Ct.lineOuterRadius=function(){return re(Sn())},delete Ct.lineY1,Ct.curve=function(En){return arguments.length?Ar(H(En)):Ar()._curve},Ct}function ke(Ct,Ar){return[(Ar=+Ar)*Math.cos(Ct-=Math.PI/2),Ar*Math.sin(Ct)]}var Ce=Array.prototype.slice;function ge(Ct){return Ct.source}function ie(Ct){return Ct.target}function Se(Ct){var Ar=ge,Jr=ie,hi=P,hn=E,Sn=null;function En(){var ki,_n=Ce.call(arguments),ya=Ar.apply(this,_n),ea=Jr.apply(this,_n);if(Sn||(Sn=ki=t.path()),Ct(Sn,+hi.apply(this,(_n[0]=ya,_n)),+hn.apply(this,_n),+hi.apply(this,(_n[0]=ea,_n)),+hn.apply(this,_n)),ki)return Sn=null,ki+""||null}return En.source=function(ki){return arguments.length?(Ar=ki,En):Ar},En.target=function(ki){return arguments.length?(Jr=ki,En):Jr},En.x=function(ki){return arguments.length?(hi=typeof ki=="function"?ki:r(+ki),En):hi},En.y=function(ki){return arguments.length?(hn=typeof ki=="function"?ki:r(+ki),En):hn},En.context=function(ki){return arguments.length?(Sn=ki==null?null:ki,En):Sn},En}function Ee(Ct,Ar,Jr,hi,hn){Ct.moveTo(Ar,Jr),Ct.bezierCurveTo(Ar=(Ar+hi)/2,Jr,Ar,hn,hi,hn)}function we(Ct,Ar,Jr,hi,hn){Ct.moveTo(Ar,Jr),Ct.bezierCurveTo(Ar,Jr=(Jr+hn)/2,hi,Jr,hi,hn)}function De(Ct,Ar,Jr,hi,hn){var Sn=ke(Ar,Jr),En=ke(Ar,Jr=(Jr+hn)/2),ki=ke(hi,Jr),_n=ke(hi,hn);Ct.moveTo(Sn[0],Sn[1]),Ct.bezierCurveTo(En[0],En[1],ki[0],ki[1],_n[0],_n[1])}function Le(){return Se(Ee)}function me(){return Se(we)}function Pe(){var Ct=Se(De);return Ct.angle=Ct.x,delete Ct.x,Ct.radius=Ct.y,delete Ct.y,Ct}var ce={draw:function(Ct,Ar){var Jr=Math.sqrt(Ar/f);Ct.moveTo(Jr,0),Ct.arc(0,0,Jr,0,d)}},He={draw:function(Ct,Ar){var Jr=Math.sqrt(Ar/5)/2;Ct.moveTo(-3*Jr,-Jr),Ct.lineTo(-Jr,-Jr),Ct.lineTo(-Jr,-3*Jr),Ct.lineTo(Jr,-3*Jr),Ct.lineTo(Jr,-Jr),Ct.lineTo(3*Jr,-Jr),Ct.lineTo(3*Jr,Jr),Ct.lineTo(Jr,Jr),Ct.lineTo(Jr,3*Jr),Ct.lineTo(-Jr,3*Jr),Ct.lineTo(-Jr,Jr),Ct.lineTo(-3*Jr,Jr),Ct.closePath()}},lt=Math.sqrt(1/3),mt=lt*2,Vt={draw:function(Ct,Ar){var Jr=Math.sqrt(Ar/mt),hi=Jr*lt;Ct.moveTo(0,-Jr),Ct.lineTo(hi,0),Ct.lineTo(0,Jr),Ct.lineTo(-hi,0),Ct.closePath()}},st=.8908130915292852,ct=Math.sin(f/10)/Math.sin(7*f/10),Qt=Math.sin(d/10)*ct,Ht=-Math.cos(d/10)*ct,nr={draw:function(Ct,Ar){var Jr=Math.sqrt(Ar*st),hi=Qt*Jr,hn=Ht*Jr;Ct.moveTo(0,-Jr),Ct.lineTo(hi,hn);for(var Sn=1;Sn<5;++Sn){var En=d*Sn/5,ki=Math.cos(En),_n=Math.sin(En);Ct.lineTo(_n*Jr,-ki*Jr),Ct.lineTo(ki*hi-_n*hn,_n*hi+ki*hn)}Ct.closePath()}},tt={draw:function(Ct,Ar){var Jr=Math.sqrt(Ar),hi=-Jr/2;Ct.rect(hi,hi,Jr,Jr)}},je=Math.sqrt(3),Ue={draw:function(Ct,Ar){var Jr=-Math.sqrt(Ar/(je*3));Ct.moveTo(0,Jr*2),Ct.lineTo(-je*Jr,-Jr),Ct.lineTo(je*Jr,-Jr),Ct.closePath()}},Ae=-.5,rt=Math.sqrt(3)/2,St=1/Math.sqrt(12),Tt=(St/2+1)*3,dt={draw:function(Ct,Ar){var Jr=Math.sqrt(Ar/Tt),hi=Jr/2,hn=Jr*St,Sn=hi,En=Jr*St+Jr,ki=-Sn,_n=En;Ct.moveTo(hi,hn),Ct.lineTo(Sn,En),Ct.lineTo(ki,_n),Ct.lineTo(Ae*hi-rt*hn,rt*hi+Ae*hn),Ct.lineTo(Ae*Sn-rt*En,rt*Sn+Ae*En),Ct.lineTo(Ae*ki-rt*_n,rt*ki+Ae*_n),Ct.lineTo(Ae*hi+rt*hn,Ae*hn-rt*hi),Ct.lineTo(Ae*Sn+rt*En,Ae*En-rt*Sn),Ct.lineTo(Ae*ki+rt*_n,Ae*_n-rt*ki),Ct.closePath()}},Et=[ce,He,Vt,tt,nr,Ue,dt];function pt(){var Ct=r(ce),Ar=r(64),Jr=null;function hi(){var hn;if(Jr||(Jr=hn=t.path()),Ct.apply(this,arguments).draw(Jr,+Ar.apply(this,arguments)),hn)return Jr=null,hn+""||null}return hi.type=function(hn){return arguments.length?(Ct=typeof hn=="function"?hn:r(hn),hi):Ct},hi.size=function(hn){return arguments.length?(Ar=typeof hn=="function"?hn:r(+hn),hi):Ar},hi.context=function(hn){return arguments.length?(Jr=hn==null?null:hn,hi):Jr},hi}function Xt(){}function or(Ct,Ar,Jr){Ct._context.bezierCurveTo((2*Ct._x0+Ct._x1)/3,(2*Ct._y0+Ct._y1)/3,(Ct._x0+2*Ct._x1)/3,(Ct._y0+2*Ct._y1)/3,(Ct._x0+4*Ct._x1+Ar)/6,(Ct._y0+4*Ct._y1+Jr)/6)}function _r(Ct){this._context=Ct}_r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:or(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Ct,Ar){switch(Ct=+Ct,Ar=+Ar,this._point){case 0:this._point=1,this._line?this._context.lineTo(Ct,Ar):this._context.moveTo(Ct,Ar);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:or(this,Ct,Ar);break}this._x0=this._x1,this._x1=Ct,this._y0=this._y1,this._y1=Ar}};function Er(Ct){return new _r(Ct)}function ei(Ct){this._context=Ct}ei.prototype={areaStart:Xt,areaEnd:Xt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(Ct,Ar){switch(Ct=+Ct,Ar=+Ar,this._point){case 0:this._point=1,this._x2=Ct,this._y2=Ar;break;case 1:this._point=2,this._x3=Ct,this._y3=Ar;break;case 2:this._point=3,this._x4=Ct,this._y4=Ar,this._context.moveTo((this._x0+4*this._x1+Ct)/6,(this._y0+4*this._y1+Ar)/6);break;default:or(this,Ct,Ar);break}this._x0=this._x1,this._x1=Ct,this._y0=this._y1,this._y1=Ar}};function qr(Ct){return new ei(Ct)}function jr(Ct){this._context=Ct}jr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(Ct,Ar){switch(Ct=+Ct,Ar=+Ar,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var Jr=(this._x0+4*this._x1+Ct)/6,hi=(this._y0+4*this._y1+Ar)/6;this._line?this._context.lineTo(Jr,hi):this._context.moveTo(Jr,hi);break;case 3:this._point=4;default:or(this,Ct,Ar);break}this._x0=this._x1,this._x1=Ct,this._y0=this._y1,this._y1=Ar}};function gt(Ct){return new jr(Ct)}function Ge(Ct,Ar){this._basis=new _r(Ct),this._beta=Ar}Ge.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var Ct=this._x,Ar=this._y,Jr=Ct.length-1;if(Jr>0)for(var hi=Ct[0],hn=Ar[0],Sn=Ct[Jr]-hi,En=Ar[Jr]-hn,ki=-1,_n;++ki<=Jr;)_n=ki/Jr,this._basis.point(this._beta*Ct[ki]+(1-this._beta)*(hi+_n*Sn),this._beta*Ar[ki]+(1-this._beta)*(hn+_n*En));this._x=this._y=null,this._basis.lineEnd()},point:function(Ct,Ar){this._x.push(+Ct),this._y.push(+Ar)}};var Je=function Ct(Ar){function Jr(hi){return Ar===1?new _r(hi):new Ge(hi,Ar)}return Jr.beta=function(hi){return Ct(+hi)},Jr}(.85);function We(Ct,Ar,Jr){Ct._context.bezierCurveTo(Ct._x1+Ct._k*(Ct._x2-Ct._x0),Ct._y1+Ct._k*(Ct._y2-Ct._y0),Ct._x2+Ct._k*(Ct._x1-Ar),Ct._y2+Ct._k*(Ct._y1-Jr),Ct._x2,Ct._y2)}function et(Ct,Ar){this._context=Ct,this._k=(1-Ar)/6}et.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:We(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Ct,Ar){switch(Ct=+Ct,Ar=+Ar,this._point){case 0:this._point=1,this._line?this._context.lineTo(Ct,Ar):this._context.moveTo(Ct,Ar);break;case 1:this._point=2,this._x1=Ct,this._y1=Ar;break;case 2:this._point=3;default:We(this,Ct,Ar);break}this._x0=this._x1,this._x1=this._x2,this._x2=Ct,this._y0=this._y1,this._y1=this._y2,this._y2=Ar}};var xt=function Ct(Ar){function Jr(hi){return new et(hi,Ar)}return Jr.tension=function(hi){return Ct(+hi)},Jr}(0);function At(Ct,Ar){this._context=Ct,this._k=(1-Ar)/6}At.prototype={areaStart:Xt,areaEnd:Xt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(Ct,Ar){switch(Ct=+Ct,Ar=+Ar,this._point){case 0:this._point=1,this._x3=Ct,this._y3=Ar;break;case 1:this._point=2,this._context.moveTo(this._x4=Ct,this._y4=Ar);break;case 2:this._point=3,this._x5=Ct,this._y5=Ar;break;default:We(this,Ct,Ar);break}this._x0=this._x1,this._x1=this._x2,this._x2=Ct,this._y0=this._y1,this._y1=this._y2,this._y2=Ar}};var Kt=function Ct(Ar){function Jr(hi){return new At(hi,Ar)}return Jr.tension=function(hi){return Ct(+hi)},Jr}(0);function er(Ct,Ar){this._context=Ct,this._k=(1-Ar)/6}er.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(Ct,Ar){switch(Ct=+Ct,Ar=+Ar,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:We(this,Ct,Ar);break}this._x0=this._x1,this._x1=this._x2,this._x2=Ct,this._y0=this._y1,this._y1=this._y2,this._y2=Ar}};var Sr=function Ct(Ar){function Jr(hi){return new er(hi,Ar)}return Jr.tension=function(hi){return Ct(+hi)},Jr}(0);function Gr(Ct,Ar,Jr){var hi=Ct._x1,hn=Ct._y1,Sn=Ct._x2,En=Ct._y2;if(Ct._l01_a>c){var ki=2*Ct._l01_2a+3*Ct._l01_a*Ct._l12_a+Ct._l12_2a,_n=3*Ct._l01_a*(Ct._l01_a+Ct._l12_a);hi=(hi*ki-Ct._x0*Ct._l12_2a+Ct._x2*Ct._l01_2a)/_n,hn=(hn*ki-Ct._y0*Ct._l12_2a+Ct._y2*Ct._l01_2a)/_n}if(Ct._l23_a>c){var ya=2*Ct._l23_2a+3*Ct._l23_a*Ct._l12_a+Ct._l12_2a,ea=3*Ct._l23_a*(Ct._l23_a+Ct._l12_a);Sn=(Sn*ya+Ct._x1*Ct._l23_2a-Ar*Ct._l12_2a)/ea,En=(En*ya+Ct._y1*Ct._l23_2a-Jr*Ct._l12_2a)/ea}Ct._context.bezierCurveTo(hi,hn,Sn,En,Ct._x2,Ct._y2)}function Ir(Ct,Ar){this._context=Ct,this._alpha=Ar}Ir.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Ct,Ar){if(Ct=+Ct,Ar=+Ar,this._point){var Jr=this._x2-Ct,hi=this._y2-Ar;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Jr*Jr+hi*hi,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Ct,Ar):this._context.moveTo(Ct,Ar);break;case 1:this._point=2;break;case 2:this._point=3;default:Gr(this,Ct,Ar);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=Ct,this._y0=this._y1,this._y1=this._y2,this._y2=Ar}};var Yr=function Ct(Ar){function Jr(hi){return Ar?new Ir(hi,Ar):new et(hi,0)}return Jr.alpha=function(hi){return Ct(+hi)},Jr}(.5);function _i(Ct,Ar){this._context=Ct,this._alpha=Ar}_i.prototype={areaStart:Xt,areaEnd:Xt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(Ct,Ar){if(Ct=+Ct,Ar=+Ar,this._point){var Jr=this._x2-Ct,hi=this._y2-Ar;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Jr*Jr+hi*hi,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=Ct,this._y3=Ar;break;case 1:this._point=2,this._context.moveTo(this._x4=Ct,this._y4=Ar);break;case 2:this._point=3,this._x5=Ct,this._y5=Ar;break;default:Gr(this,Ct,Ar);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=Ct,this._y0=this._y1,this._y1=this._y2,this._y2=Ar}};var Pi=function Ct(Ar){function Jr(hi){return Ar?new _i(hi,Ar):new At(hi,0)}return Jr.alpha=function(hi){return Ct(+hi)},Jr}(.5);function ai(Ct,Ar){this._context=Ct,this._alpha=Ar}ai.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(Ct,Ar){if(Ct=+Ct,Ar=+Ar,this._point){var Jr=this._x2-Ct,hi=this._y2-Ar;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Jr*Jr+hi*hi,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Gr(this,Ct,Ar);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=Ct,this._y0=this._y1,this._y1=this._y2,this._y2=Ar}};var mi=function Ct(Ar){function Jr(hi){return Ar?new ai(hi,Ar):new er(hi,0)}return Jr.alpha=function(hi){return Ct(+hi)},Jr}(.5);function un(Ct){this._context=Ct}un.prototype={areaStart:Xt,areaEnd:Xt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(Ct,Ar){Ct=+Ct,Ar=+Ar,this._point?this._context.lineTo(Ct,Ar):(this._point=1,this._context.moveTo(Ct,Ar))}};function Fn(Ct){return new un(Ct)}function An(Ct){return Ct<0?-1:1}function Hn(Ct,Ar,Jr){var hi=Ct._x1-Ct._x0,hn=Ar-Ct._x1,Sn=(Ct._y1-Ct._y0)/(hi||hn<0&&-0),En=(Jr-Ct._y1)/(hn||hi<0&&-0),ki=(Sn*hn+En*hi)/(hi+hn);return(An(Sn)+An(En))*Math.min(Math.abs(Sn),Math.abs(En),.5*Math.abs(ki))||0}function Qn(Ct,Ar){var Jr=Ct._x1-Ct._x0;return Jr?(3*(Ct._y1-Ct._y0)/Jr-Ar)/2:Ar}function Vi(Ct,Ar,Jr){var hi=Ct._x0,hn=Ct._y0,Sn=Ct._x1,En=Ct._y1,ki=(Sn-hi)/3;Ct._context.bezierCurveTo(hi+ki,hn+ki*Ar,Sn-ki,En-ki*Jr,Sn,En)}function Kn(Ct){this._context=Ct}Kn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Vi(this,this._t0,Qn(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Ct,Ar){var Jr=NaN;if(Ct=+Ct,Ar=+Ar,!(Ct===this._x1&&Ar===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Ct,Ar):this._context.moveTo(Ct,Ar);break;case 1:this._point=2;break;case 2:this._point=3,Vi(this,Qn(this,Jr=Hn(this,Ct,Ar)),Jr);break;default:Vi(this,this._t0,Jr=Hn(this,Ct,Ar));break}this._x0=this._x1,this._x1=Ct,this._y0=this._y1,this._y1=Ar,this._t0=Jr}}};function Jn(Ct){this._context=new Gt(Ct)}(Jn.prototype=Object.create(Kn.prototype)).point=function(Ct,Ar){Kn.prototype.point.call(this,Ar,Ct)};function Gt(Ct){this._context=Ct}Gt.prototype={moveTo:function(Ct,Ar){this._context.moveTo(Ar,Ct)},closePath:function(){this._context.closePath()},lineTo:function(Ct,Ar){this._context.lineTo(Ar,Ct)},bezierCurveTo:function(Ct,Ar,Jr,hi,hn,Sn){this._context.bezierCurveTo(Ar,Ct,hi,Jr,Sn,hn)}};function wt(Ct){return new Kn(Ct)}function rr(Ct){return new Jn(Ct)}function ir(Ct){this._context=Ct}ir.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var Ct=this._x,Ar=this._y,Jr=Ct.length;if(Jr)if(this._line?this._context.lineTo(Ct[0],Ar[0]):this._context.moveTo(Ct[0],Ar[0]),Jr===2)this._context.lineTo(Ct[1],Ar[1]);else for(var hi=wr(Ct),hn=wr(Ar),Sn=0,En=1;En=0;--Ar)hn[Ar]=(En[Ar]-hn[Ar+1])/Sn[Ar];for(Sn[Jr-1]=(Ct[Jr]+hn[Jr-1])/2,Ar=0;Ar=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(Ct,Ar){switch(Ct=+Ct,Ar=+Ar,this._point){case 0:this._point=1,this._line?this._context.lineTo(Ct,Ar):this._context.moveTo(Ct,Ar);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,Ar),this._context.lineTo(Ct,Ar);else{var Jr=this._x*(1-this._t)+Ct*this._t;this._context.lineTo(Jr,this._y),this._context.lineTo(Jr,Ar)}break}}this._x=Ct,this._y=Ar}};function $r(Ct){return new ti(Ct,.5)}function Ri(Ct){return new ti(Ct,0)}function Zi(Ct){return new ti(Ct,1)}function en(Ct,Ar){if((En=Ct.length)>1)for(var Jr=1,hi,hn,Sn=Ct[Ar[0]],En,ki=Sn.length;Jr=0;)Jr[Ar]=Ar;return Jr}function yn(Ct,Ar){return Ct[Ar]}function Mn(){var Ct=r([]),Ar=fn,Jr=en,hi=yn;function hn(Sn){var En=Ct.apply(this,arguments),ki,_n=Sn.length,ya=En.length,ea=new Array(ya),Ma;for(ki=0;ki0){for(var Jr,hi,hn=0,Sn=Ct[0].length,En;hn0)for(var Jr,hi=0,hn,Sn,En,ki,_n,ya=Ct[Ar[0]].length;hi0?(hn[0]=En,hn[1]=En+=Sn):Sn<0?(hn[1]=ki,hn[0]=ki+=Sn):(hn[0]=0,hn[1]=Sn)}function ma(Ct,Ar){if((hn=Ct.length)>0){for(var Jr=0,hi=Ct[Ar[0]],hn,Sn=hi.length;Jr0)||!((Sn=(hn=Ct[Ar[0]]).length)>0))){for(var Jr=0,hi=1,hn,Sn,En;hiSn&&(Sn=hn,Jr=Ar);return Jr}function da(Ct){var Ar=Ct.map(jn);return fn(Ct).sort(function(Jr,hi){return Ar[Jr]-Ar[hi]})}function jn(Ct){for(var Ar=0,Jr=-1,hi=Ct.length,hn;++Jr{(function(e,t){typeof C7=="object"&&typeof KWe!="undefined"?t(C7,hk(),T7(),$J()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3)})(C7,function(e,t,r,n){"use strict";function i(g){return g.target.depth}function a(g){return g.depth}function o(g,P){return P-1-g.height}function s(g,P){return g.sourceLinks.length?g.depth:P-1}function l(g){return g.targetLinks.length?g.depth:g.sourceLinks.length?t.min(g.sourceLinks,i)-1:0}function u(g){return function(){return g}}function c(g,P){return h(g.source,P.source)||g.index-P.index}function f(g,P){return h(g.target,P.target)||g.index-P.index}function h(g,P){return g.y0-P.y0}function d(g){return g.value}function v(g){return(g.y0+g.y1)/2}function m(g){return v(g.source)*g.value}function b(g){return v(g.target)*g.value}function p(g){return g.index}function k(g){return g.nodes}function M(g){return g.links}function T(g,P){var E=g.get(P);if(!E)throw new Error("missing: "+P);return E}var L=function(){var g=0,P=0,E=1,z=1,q=24,U=8,G=p,Z=s,j=k,N=M,H=32,re=2/3;function oe(){var Se={nodes:j.apply(null,arguments),links:N.apply(null,arguments)};return _e(Se),ke(Se),Ce(Se),ge(Se,H),ie(Se),Se}oe.update=function(Se){return ie(Se),Se},oe.nodeId=function(Se){return arguments.length?(G=typeof Se=="function"?Se:u(Se),oe):G},oe.nodeAlign=function(Se){return arguments.length?(Z=typeof Se=="function"?Se:u(Se),oe):Z},oe.nodeWidth=function(Se){return arguments.length?(q=+Se,oe):q},oe.nodePadding=function(Se){return arguments.length?(U=+Se,oe):U},oe.nodes=function(Se){return arguments.length?(j=typeof Se=="function"?Se:u(Se),oe):j},oe.links=function(Se){return arguments.length?(N=typeof Se=="function"?Se:u(Se),oe):N},oe.size=function(Se){return arguments.length?(g=P=0,E=+Se[0],z=+Se[1],oe):[E-g,z-P]},oe.extent=function(Se){return arguments.length?(g=+Se[0][0],E=+Se[1][0],P=+Se[0][1],z=+Se[1][1],oe):[[g,P],[E,z]]},oe.iterations=function(Se){return arguments.length?(H=+Se,oe):H};function _e(Se){Se.nodes.forEach(function(we,De){we.index=De,we.sourceLinks=[],we.targetLinks=[]});var Ee=r.map(Se.nodes,G);Se.links.forEach(function(we,De){we.index=De;var Le=we.source,me=we.target;typeof Le!="object"&&(Le=we.source=T(Ee,Le)),typeof me!="object"&&(me=we.target=T(Ee,me)),Le.sourceLinks.push(we),me.targetLinks.push(we)})}function ke(Se){Se.nodes.forEach(function(Ee){Ee.value=Math.max(t.sum(Ee.sourceLinks,d),t.sum(Ee.targetLinks,d))})}function Ce(Se){var Ee,we,De;for(Ee=Se.nodes,we=[],De=0;Ee.length;++De,Ee=we,we=[])Ee.forEach(function(me){me.depth=De,me.sourceLinks.forEach(function(Pe){we.indexOf(Pe.target)<0&&we.push(Pe.target)})});for(Ee=Se.nodes,we=[],De=0;Ee.length;++De,Ee=we,we=[])Ee.forEach(function(me){me.height=De,me.targetLinks.forEach(function(Pe){we.indexOf(Pe.source)<0&&we.push(Pe.source)})});var Le=(E-g-q)/(De-1);Se.nodes.forEach(function(me){me.x1=(me.x0=g+Math.max(0,Math.min(De-1,Math.floor(Z.call(null,me,De))))*Le)+q})}function ge(Se){var Ee=r.nest().key(function(He){return He.x0}).sortKeys(t.ascending).entries(Se.nodes).map(function(He){return He.values});Le(),ce();for(var we=1,De=H;De>0;--De)Pe(we*=.99),ce(),me(we),ce();function Le(){var He=t.max(Ee,function(Vt){return Vt.length}),lt=re*(z-P)/(He-1);U>lt&&(U=lt);var mt=t.min(Ee,function(Vt){return(z-P-(Vt.length-1)*U)/t.sum(Vt,d)});Ee.forEach(function(Vt){Vt.forEach(function(st,ct){st.y1=(st.y0=ct)+st.value*mt})}),Se.links.forEach(function(Vt){Vt.width=Vt.value*mt})}function me(He){Ee.forEach(function(lt){lt.forEach(function(mt){if(mt.targetLinks.length){var Vt=(t.sum(mt.targetLinks,m)/t.sum(mt.targetLinks,d)-v(mt))*He;mt.y0+=Vt,mt.y1+=Vt}})})}function Pe(He){Ee.slice().reverse().forEach(function(lt){lt.forEach(function(mt){if(mt.sourceLinks.length){var Vt=(t.sum(mt.sourceLinks,b)/t.sum(mt.sourceLinks,d)-v(mt))*He;mt.y0+=Vt,mt.y1+=Vt}})})}function ce(){Ee.forEach(function(He){var lt,mt,Vt=P,st=He.length,ct;for(He.sort(h),ct=0;ct0&&(lt.y0+=mt,lt.y1+=mt),Vt=lt.y1+U;if(mt=Vt-U-z,mt>0)for(Vt=lt.y0-=mt,lt.y1-=mt,ct=st-2;ct>=0;--ct)lt=He[ct],mt=lt.y1+U-Vt,mt>0&&(lt.y0-=mt,lt.y1-=mt),Vt=lt.y0})}}function ie(Se){Se.nodes.forEach(function(Ee){Ee.sourceLinks.sort(f),Ee.targetLinks.sort(c)}),Se.nodes.forEach(function(Ee){var we=Ee.y0,De=we;Ee.sourceLinks.forEach(function(Le){Le.y0=we+Le.width/2,we+=Le.width}),Ee.targetLinks.forEach(function(Le){Le.y1=De+Le.width/2,De+=Le.width})})}return oe};function x(g){return[g.source.x1,g.y0]}function C(g){return[g.target.x0,g.y1]}var S=function(){return n.linkHorizontal().source(x).target(C)};e.sankey=L,e.sankeyCenter=l,e.sankeyLeft=a,e.sankeyRight=o,e.sankeyJustify=s,e.sankeyLinkHorizontal=S,Object.defineProperty(e,"__esModule",{value:!0})})});var QWe=ye((_2r,$We)=>{var QZt=JJ();$We.exports=function(t,r){var n=[],i=[],a=[],o={},s=[],l;function u(M){a[M]=!1,o.hasOwnProperty(M)&&Object.keys(o[M]).forEach(function(T){delete o[M][T],a[T]&&u(T)})}function c(M){var T=!1;i.push(M),a[M]=!0;var L,x;for(L=0;L=M})}function d(M){h(M);for(var T=t,L=QZt(T),x=L.components.filter(function(q){return q.length>1}),C=1/0,S,g=0;g{(function(e,t){typeof L7=="object"&&typeof eXe!="undefined"?t(L7,hk(),T7(),$J(),QWe()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,null)})(L7,function(e,t,r,n,i){"use strict";i=i&&i.hasOwnProperty("default")?i.default:i;function a(st){return st.target.depth}function o(st){return st.depth}function s(st,ct){return ct-1-st.height}function l(st,ct){return st.sourceLinks.length?st.depth:ct-1}function u(st){return st.targetLinks.length?st.depth:st.sourceLinks.length?t.min(st.sourceLinks,a)-1:0}function c(st){return function(){return st}}var f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(st){return typeof st}:function(st){return st&&typeof Symbol=="function"&&st.constructor===Symbol&&st!==Symbol.prototype?"symbol":typeof st};function h(st,ct){return v(st.source,ct.source)||st.index-ct.index}function d(st,ct){return v(st.target,ct.target)||st.index-ct.index}function v(st,ct){return st.partOfCycle===ct.partOfCycle?st.y0-ct.y0:st.circularLinkType==="top"||ct.circularLinkType==="bottom"?-1:1}function m(st){return st.value}function b(st){return(st.y0+st.y1)/2}function p(st){return b(st.source)}function k(st){return b(st.target)}function M(st){return st.index}function T(st){return st.nodes}function L(st){return st.links}function x(st,ct){var Qt=st.get(ct);if(!Qt)throw new Error("missing: "+ct);return Qt}function C(st,ct){return ct(st)}var S=25,g=10,P=.3;function E(){var st=0,ct=0,Qt=1,Ht=1,nr=24,tt,je=M,Ue=l,Ae=T,rt=L,St=32,Tt=2,dt,Et=null;function pt(){var gt={nodes:Ae.apply(null,arguments),links:rt.apply(null,arguments)};Xt(gt),z(gt,je,Et),or(gt),ei(gt),q(gt,je),qr(gt,St,je),jr(gt);for(var Ge=4,Je=0;Je0?Ge+S+g:Ge,Je=Je>0?Je+S+g:Je,We=We>0?We+S+g:We,et=et>0?et+S+g:et,{top:Ge,bottom:Je,left:et,right:We}}function Er(gt,Ge){var Je=t.max(gt.nodes,function(Sr){return Sr.column}),We=Qt-st,et=Ht-ct,xt=We+Ge.right+Ge.left,At=et+Ge.top+Ge.bottom,Kt=We/xt,er=et/At;return st=st*Kt+Ge.left,Qt=Ge.right==0?Qt:Qt*Kt,ct=ct*er+Ge.top,Ht=Ht*er,gt.nodes.forEach(function(Sr){Sr.x0=st+Sr.column*((Qt-st-nr)/Je),Sr.x1=Sr.x0+nr}),er}function ei(gt){var Ge,Je,We;for(Ge=gt.nodes,Je=[],We=0;Ge.length;++We,Ge=Je,Je=[])Ge.forEach(function(et){et.depth=We,et.sourceLinks.forEach(function(xt){Je.indexOf(xt.target)<0&&!xt.circular&&Je.push(xt.target)})});for(Ge=gt.nodes,Je=[],We=0;Ge.length;++We,Ge=Je,Je=[])Ge.forEach(function(et){et.height=We,et.targetLinks.forEach(function(xt){Je.indexOf(xt.source)<0&&!xt.circular&&Je.push(xt.source)})});gt.nodes.forEach(function(et){et.column=Math.floor(Ue.call(null,et,We))})}function qr(gt,Ge,Je){var We=r.nest().key(function(Sr){return Sr.column}).sortKeys(t.ascending).entries(gt.nodes).map(function(Sr){return Sr.values});At(Je),er();for(var et=1,xt=Ge;xt>0;--xt)Kt(et*=.99,Je),er();function At(Sr){if(dt){var Gr=1/0;We.forEach(function(Pi){var ai=Ht*dt/(Pi.length+1);Gr=ai0))if(Pi==0&&_i==1)mi=ai.y1-ai.y0,ai.y0=Ht/2-mi/2,ai.y1=Ht/2+mi/2;else if(Pi==Ir-1&&_i==1)mi=ai.y1-ai.y0,ai.y0=Ht/2-mi/2,ai.y1=Ht/2+mi/2;else{var un=0,Fn=t.mean(ai.sourceLinks,k),An=t.mean(ai.targetLinks,p);Fn&&An?un=(Fn+An)/2:un=Fn||An;var Hn=(un-b(ai))*Sr;ai.y0+=Hn,ai.y1+=Hn}})})}function er(){We.forEach(function(Sr){var Gr,Ir,Yr=ct,_i=Sr.length,Pi;for(Sr.sort(v),Pi=0;Pi<_i;++Pi)Gr=Sr[Pi],Ir=Yr-Gr.y0,Ir>0&&(Gr.y0+=Ir,Gr.y1+=Ir),Yr=Gr.y1+tt;if(Ir=Yr-tt-Ht,Ir>0)for(Yr=Gr.y0-=Ir,Gr.y1-=Ir,Pi=_i-2;Pi>=0;--Pi)Gr=Sr[Pi],Ir=Gr.y1+tt-Yr,Ir>0&&(Gr.y0-=Ir,Gr.y1-=Ir),Yr=Gr.y0})}}function jr(gt){gt.nodes.forEach(function(Ge){Ge.sourceLinks.sort(d),Ge.targetLinks.sort(h)}),gt.nodes.forEach(function(Ge){var Je=Ge.y0,We=Je,et=Ge.y1,xt=et;Ge.sourceLinks.forEach(function(At){At.circular?(At.y0=et-At.width/2,et=et-At.width):(At.y0=Je+At.width/2,Je+=At.width)}),Ge.targetLinks.forEach(function(At){At.circular?(At.y1=xt-At.width/2,xt=xt-At.width):(At.y1=We+At.width/2,We+=At.width)})})}return pt}function z(st,ct,Qt){var Ht=0;if(Qt===null){for(var nr=[],tt=0;ttct.source.column)}function Z(st,ct){var Qt=0;st.sourceLinks.forEach(function(nr){Qt=nr.circular&&!mt(nr,ct)?Qt+1:Qt});var Ht=0;return st.targetLinks.forEach(function(nr){Ht=nr.circular&&!mt(nr,ct)?Ht+1:Ht}),Qt+Ht}function j(st){var ct=st.source.sourceLinks,Qt=0;ct.forEach(function(tt){Qt=tt.circular?Qt+1:Qt});var Ht=st.target.targetLinks,nr=0;return Ht.forEach(function(tt){nr=tt.circular?nr+1:nr}),!(Qt>1||nr>1)}function N(st,ct,Qt){return st.sort(oe),st.forEach(function(Ht,nr){var tt=0;if(mt(Ht,Qt)&&j(Ht))Ht.circularPathData.verticalBuffer=tt+Ht.width/2;else{var je=0;for(je;jett?Ue:tt}Ht.circularPathData.verticalBuffer=tt+Ht.width/2}}),st}function H(st,ct,Qt,Ht){var nr=5,tt=t.min(st.links,function(Ae){return Ae.source.y0});st.links.forEach(function(Ae){Ae.circular&&(Ae.circularPathData={})});var je=st.links.filter(function(Ae){return Ae.circularLinkType=="top"});N(je,ct,Ht);var Ue=st.links.filter(function(Ae){return Ae.circularLinkType=="bottom"});N(Ue,ct,Ht),st.links.forEach(function(Ae){if(Ae.circular){if(Ae.circularPathData.arcRadius=Ae.width+g,Ae.circularPathData.leftNodeBuffer=nr,Ae.circularPathData.rightNodeBuffer=nr,Ae.circularPathData.sourceWidth=Ae.source.x1-Ae.source.x0,Ae.circularPathData.sourceX=Ae.source.x0+Ae.circularPathData.sourceWidth,Ae.circularPathData.targetX=Ae.target.x0,Ae.circularPathData.sourceY=Ae.y0,Ae.circularPathData.targetY=Ae.y1,mt(Ae,Ht)&&j(Ae))Ae.circularPathData.leftSmallArcRadius=g+Ae.width/2,Ae.circularPathData.leftLargeArcRadius=g+Ae.width/2,Ae.circularPathData.rightSmallArcRadius=g+Ae.width/2,Ae.circularPathData.rightLargeArcRadius=g+Ae.width/2,Ae.circularLinkType=="bottom"?(Ae.circularPathData.verticalFullExtent=Ae.source.y1+S+Ae.circularPathData.verticalBuffer,Ae.circularPathData.verticalLeftInnerExtent=Ae.circularPathData.verticalFullExtent-Ae.circularPathData.leftLargeArcRadius,Ae.circularPathData.verticalRightInnerExtent=Ae.circularPathData.verticalFullExtent-Ae.circularPathData.rightLargeArcRadius):(Ae.circularPathData.verticalFullExtent=Ae.source.y0-S-Ae.circularPathData.verticalBuffer,Ae.circularPathData.verticalLeftInnerExtent=Ae.circularPathData.verticalFullExtent+Ae.circularPathData.leftLargeArcRadius,Ae.circularPathData.verticalRightInnerExtent=Ae.circularPathData.verticalFullExtent+Ae.circularPathData.rightLargeArcRadius);else{var rt=Ae.source.column,St=Ae.circularLinkType,Tt=st.links.filter(function(pt){return pt.source.column==rt&&pt.circularLinkType==St});Ae.circularLinkType=="bottom"?Tt.sort(ke):Tt.sort(_e);var dt=0;Tt.forEach(function(pt,Xt){pt.circularLinkID==Ae.circularLinkID&&(Ae.circularPathData.leftSmallArcRadius=g+Ae.width/2+dt,Ae.circularPathData.leftLargeArcRadius=g+Ae.width/2+Xt*ct+dt),dt=dt+pt.width}),rt=Ae.target.column,Tt=st.links.filter(function(pt){return pt.target.column==rt&&pt.circularLinkType==St}),Ae.circularLinkType=="bottom"?Tt.sort(ge):Tt.sort(Ce),dt=0,Tt.forEach(function(pt,Xt){pt.circularLinkID==Ae.circularLinkID&&(Ae.circularPathData.rightSmallArcRadius=g+Ae.width/2+dt,Ae.circularPathData.rightLargeArcRadius=g+Ae.width/2+Xt*ct+dt),dt=dt+pt.width}),Ae.circularLinkType=="bottom"?(Ae.circularPathData.verticalFullExtent=Math.max(Qt,Ae.source.y1,Ae.target.y1)+S+Ae.circularPathData.verticalBuffer,Ae.circularPathData.verticalLeftInnerExtent=Ae.circularPathData.verticalFullExtent-Ae.circularPathData.leftLargeArcRadius,Ae.circularPathData.verticalRightInnerExtent=Ae.circularPathData.verticalFullExtent-Ae.circularPathData.rightLargeArcRadius):(Ae.circularPathData.verticalFullExtent=tt-S-Ae.circularPathData.verticalBuffer,Ae.circularPathData.verticalLeftInnerExtent=Ae.circularPathData.verticalFullExtent+Ae.circularPathData.leftLargeArcRadius,Ae.circularPathData.verticalRightInnerExtent=Ae.circularPathData.verticalFullExtent+Ae.circularPathData.rightLargeArcRadius)}Ae.circularPathData.leftInnerExtent=Ae.circularPathData.sourceX+Ae.circularPathData.leftNodeBuffer,Ae.circularPathData.rightInnerExtent=Ae.circularPathData.targetX-Ae.circularPathData.rightNodeBuffer,Ae.circularPathData.leftFullExtent=Ae.circularPathData.sourceX+Ae.circularPathData.leftLargeArcRadius+Ae.circularPathData.leftNodeBuffer,Ae.circularPathData.rightFullExtent=Ae.circularPathData.targetX-Ae.circularPathData.rightLargeArcRadius-Ae.circularPathData.rightNodeBuffer}if(Ae.circular)Ae.path=re(Ae);else{var Et=n.linkHorizontal().source(function(pt){var Xt=pt.source.x0+(pt.source.x1-pt.source.x0),or=pt.y0;return[Xt,or]}).target(function(pt){var Xt=pt.target.x0,or=pt.y1;return[Xt,or]});Ae.path=Et(Ae)}})}function re(st){var ct="";return st.circularLinkType=="top"?ct="M"+st.circularPathData.sourceX+" "+st.circularPathData.sourceY+" L"+st.circularPathData.leftInnerExtent+" "+st.circularPathData.sourceY+" A"+st.circularPathData.leftLargeArcRadius+" "+st.circularPathData.leftSmallArcRadius+" 0 0 0 "+st.circularPathData.leftFullExtent+" "+(st.circularPathData.sourceY-st.circularPathData.leftSmallArcRadius)+" L"+st.circularPathData.leftFullExtent+" "+st.circularPathData.verticalLeftInnerExtent+" A"+st.circularPathData.leftLargeArcRadius+" "+st.circularPathData.leftLargeArcRadius+" 0 0 0 "+st.circularPathData.leftInnerExtent+" "+st.circularPathData.verticalFullExtent+" L"+st.circularPathData.rightInnerExtent+" "+st.circularPathData.verticalFullExtent+" A"+st.circularPathData.rightLargeArcRadius+" "+st.circularPathData.rightLargeArcRadius+" 0 0 0 "+st.circularPathData.rightFullExtent+" "+st.circularPathData.verticalRightInnerExtent+" L"+st.circularPathData.rightFullExtent+" "+(st.circularPathData.targetY-st.circularPathData.rightSmallArcRadius)+" A"+st.circularPathData.rightLargeArcRadius+" "+st.circularPathData.rightSmallArcRadius+" 0 0 0 "+st.circularPathData.rightInnerExtent+" "+st.circularPathData.targetY+" L"+st.circularPathData.targetX+" "+st.circularPathData.targetY:ct="M"+st.circularPathData.sourceX+" "+st.circularPathData.sourceY+" L"+st.circularPathData.leftInnerExtent+" "+st.circularPathData.sourceY+" A"+st.circularPathData.leftLargeArcRadius+" "+st.circularPathData.leftSmallArcRadius+" 0 0 1 "+st.circularPathData.leftFullExtent+" "+(st.circularPathData.sourceY+st.circularPathData.leftSmallArcRadius)+" L"+st.circularPathData.leftFullExtent+" "+st.circularPathData.verticalLeftInnerExtent+" A"+st.circularPathData.leftLargeArcRadius+" "+st.circularPathData.leftLargeArcRadius+" 0 0 1 "+st.circularPathData.leftInnerExtent+" "+st.circularPathData.verticalFullExtent+" L"+st.circularPathData.rightInnerExtent+" "+st.circularPathData.verticalFullExtent+" A"+st.circularPathData.rightLargeArcRadius+" "+st.circularPathData.rightLargeArcRadius+" 0 0 1 "+st.circularPathData.rightFullExtent+" "+st.circularPathData.verticalRightInnerExtent+" L"+st.circularPathData.rightFullExtent+" "+(st.circularPathData.targetY+st.circularPathData.rightSmallArcRadius)+" A"+st.circularPathData.rightLargeArcRadius+" "+st.circularPathData.rightSmallArcRadius+" 0 0 1 "+st.circularPathData.rightInnerExtent+" "+st.circularPathData.targetY+" L"+st.circularPathData.targetX+" "+st.circularPathData.targetY,ct}function oe(st,ct){return ie(st)==ie(ct)?st.circularLinkType=="bottom"?ke(st,ct):_e(st,ct):ie(ct)-ie(st)}function _e(st,ct){return st.y0-ct.y0}function ke(st,ct){return ct.y0-st.y0}function Ce(st,ct){return st.y1-ct.y1}function ge(st,ct){return ct.y1-st.y1}function ie(st){return st.target.column-st.source.column}function Se(st){return st.target.x0-st.source.x1}function Ee(st,ct){var Qt=U(st),Ht=Se(ct)/Math.tan(Qt),nr=lt(st)=="up"?st.y1+Ht:st.y1-Ht;return nr}function we(st,ct){var Qt=U(st),Ht=Se(ct)/Math.tan(Qt),nr=lt(st)=="up"?st.y1-Ht:st.y1+Ht;return nr}function De(st,ct,Qt,Ht){st.links.forEach(function(nr){if(!nr.circular&&nr.target.column-nr.source.column>1){var tt=nr.source.column+1,je=nr.target.column-1,Ue=1,Ae=je-tt+1;for(Ue=1;tt<=je;tt++,Ue++)st.nodes.forEach(function(rt){if(rt.column==tt){var St=Ue/(Ae+1),Tt=Math.pow(1-St,3),dt=3*St*Math.pow(1-St,2),Et=3*Math.pow(St,2)*(1-St),pt=Math.pow(St,3),Xt=Tt*nr.y0+dt*nr.y0+Et*nr.y1+pt*nr.y1,or=Xt-nr.width/2,_r=Xt+nr.width/2,Er;or>rt.y0&&orrt.y0&&_rrt.y1&&me(ei,Er,ct,Qt)})):orrt.y1&&(Er=_r-rt.y0+10,rt=me(rt,Er,ct,Qt),st.nodes.forEach(function(ei){C(ei,Ht)==C(rt,Ht)||ei.column!=rt.column||ei.y0rt.y1&&me(ei,Er,ct,Qt)}))}})}})}function Le(st,ct){return st.y0>ct.y0&&st.y0ct.y0&&st.y1ct.y1}function me(st,ct,Qt,Ht){return st.y0+ct>=Qt&&st.y1+ct<=Ht&&(st.y0=st.y0+ct,st.y1=st.y1+ct,st.targetLinks.forEach(function(nr){nr.y1=nr.y1+ct}),st.sourceLinks.forEach(function(nr){nr.y0=nr.y0+ct})),st}function Pe(st,ct,Qt,Ht){st.nodes.forEach(function(nr){Ht&&nr.y+(nr.y1-nr.y0)>ct&&(nr.y=nr.y-(nr.y+(nr.y1-nr.y0)-ct));var tt=st.links.filter(function(Ae){return C(Ae.source,Qt)==C(nr,Qt)}),je=tt.length;je>1&&tt.sort(function(Ae,rt){if(!Ae.circular&&!rt.circular){if(Ae.target.column==rt.target.column)return Ae.y1-rt.y1;if(He(Ae,rt)){if(Ae.target.column>rt.target.column){var St=we(rt,Ae);return Ae.y1-St}if(rt.target.column>Ae.target.column){var Tt=we(Ae,rt);return Tt-rt.y1}}else return Ae.y1-rt.y1}if(Ae.circular&&!rt.circular)return Ae.circularLinkType=="top"?-1:1;if(rt.circular&&!Ae.circular)return rt.circularLinkType=="top"?1:-1;if(Ae.circular&&rt.circular)return Ae.circularLinkType===rt.circularLinkType&&Ae.circularLinkType=="top"?Ae.target.column===rt.target.column?Ae.target.y1-rt.target.y1:rt.target.column-Ae.target.column:Ae.circularLinkType===rt.circularLinkType&&Ae.circularLinkType=="bottom"?Ae.target.column===rt.target.column?rt.target.y1-Ae.target.y1:Ae.target.column-rt.target.column:Ae.circularLinkType=="top"?-1:1});var Ue=nr.y0;tt.forEach(function(Ae){Ae.y0=Ue+Ae.width/2,Ue=Ue+Ae.width}),tt.forEach(function(Ae,rt){if(Ae.circularLinkType=="bottom"){var St=rt+1,Tt=0;for(St;St1&&nr.sort(function(Ue,Ae){if(!Ue.circular&&!Ae.circular){if(Ue.source.column==Ae.source.column)return Ue.y0-Ae.y0;if(He(Ue,Ae)){if(Ae.source.column0?"up":"down"}function mt(st,ct){return C(st.source,ct)==C(st.target,ct)}function Vt(st,ct,Qt){var Ht=st.nodes,nr=st.links,tt=!1,je=!1;if(nr.forEach(function(dt){dt.circularLinkType=="top"?tt=!0:dt.circularLinkType=="bottom"&&(je=!0)}),tt==!1||je==!1){var Ue=t.min(Ht,function(dt){return dt.y0}),Ae=t.max(Ht,function(dt){return dt.y1}),rt=Ae-Ue,St=Qt-ct,Tt=St/rt;Ht.forEach(function(dt){var Et=(dt.y1-dt.y0)*Tt;dt.y0=(dt.y0-Ue)*Tt,dt.y1=dt.y0+Et}),nr.forEach(function(dt){dt.y0=(dt.y0-Ue)*Tt,dt.y1=(dt.y1-Ue)*Tt,dt.width=dt.width*Tt})}}e.sankeyCircular=E,e.sankeyCenter=u,e.sankeyLeft=o,e.sankeyRight=s,e.sankeyJustify=l,Object.defineProperty(e,"__esModule",{value:!0})})});var QJ=ye((x2r,rXe)=>{"use strict";rXe.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}});var pXe=ye((b2r,vXe)=>{"use strict";var iXe=WWe(),eYt=(H2(),pb(G2)).interpolateNumber,q5=qa(),aC=JWe(),tYt=tXe(),Nu=QJ(),O5=fd(),mw=ka(),rYt=So(),w1=Pr(),r$=w1.strTranslate,iYt=w1.strRotate,i$=iy(),oC=i$.keyFun,P7=i$.repeat,uXe=i$.unwrap,nXe=Zl(),nYt=Oa(),cXe=Dh(),aYt=cXe.CAP_SHIFT,oYt=cXe.LINE_SPACING,sYt=3;function lYt(e,t,r){var n=uXe(t),i=n.trace,a=i.domain,o=i.orientation==="h",s=i.node.pad,l=i.node.thickness,u={justify:aC.sankeyJustify,left:aC.sankeyLeft,right:aC.sankeyRight,center:aC.sankeyCenter}[i.node.align],c=e.width*(a.x[1]-a.x[0]),f=e.height*(a.y[1]-a.y[0]),h=n._nodes,d=n._links,v=n.circular,m;v?m=tYt.sankeyCircular().circularLinkGap(0):m=aC.sankey(),m.iterations(Nu.sankeyIterations).size(o?[c,f]:[f,c]).nodeWidth(l).nodePadding(s).nodeId(function(U){return U.pointNumber}).nodeAlign(u).nodes(h).links(d);var b=m();m.nodePadding()=N||(j=N-Z.y0,j>1e-6&&(Z.y0+=j,Z.y1+=j)),N=Z.y1+s})}function P(U){var G=U.map(function(_e,ke){return{x0:_e.x0,index:ke}}).sort(function(_e,ke){return _e.x0-ke.x0}),Z=[],j=-1,N,H=-1/0,re;for(p=0;pH+l&&(j+=1,N=oe.x0),H=oe.x0,Z[j]||(Z[j]=[]),Z[j].push(oe),re=N-oe.x0,oe.x0+=re,oe.x1+=re}return Z}if(i.node.x.length&&i.node.y.length){for(p=0;p0?" L "+i.targetX+" "+i.targetY:"")+"Z"):(r="M "+(i.targetX-t)+" "+(i.targetY-n)+" L "+(i.rightInnerExtent-t)+" "+(i.targetY-n)+" A "+(i.rightLargeArcRadius+n)+" "+(i.rightSmallArcRadius+n)+" 0 0 0 "+(i.rightFullExtent-n-t)+" "+(i.targetY+i.rightSmallArcRadius)+" L "+(i.rightFullExtent-n-t)+" "+i.verticalRightInnerExtent,a&&o?r+=" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.rightInnerExtent-n-t)+" "+(i.verticalFullExtent+n)+" L "+(i.rightFullExtent+n-t-(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent+n)+" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.leftFullExtent+n)+" "+i.verticalLeftInnerExtent:a?r+=" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.rightFullExtent-t-n-(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent-n)+" L "+(i.leftFullExtent+n+(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent-n)+" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.leftFullExtent+n)+" "+i.verticalLeftInnerExtent:r+=" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.rightInnerExtent-t)+" "+(i.verticalFullExtent+n)+" L "+i.leftInnerExtent+" "+(i.verticalFullExtent+n)+" A "+(i.leftLargeArcRadius+n)+" "+(i.leftLargeArcRadius+n)+" 0 0 0 "+(i.leftFullExtent+n)+" "+i.verticalLeftInnerExtent,r+=" L "+(i.leftFullExtent+n)+" "+(i.sourceY+i.leftSmallArcRadius)+" A "+(i.leftLargeArcRadius+n)+" "+(i.leftSmallArcRadius+n)+" 0 0 0 "+i.leftInnerExtent+" "+(i.sourceY-n)+" L "+i.sourceX+" "+(i.sourceY-n)+" L "+i.sourceX+" "+(i.sourceY+n)+" L "+i.leftInnerExtent+" "+(i.sourceY+n)+" A "+(i.leftLargeArcRadius-n)+" "+(i.leftSmallArcRadius-n)+" 0 0 1 "+(i.leftFullExtent-n)+" "+(i.sourceY+i.leftSmallArcRadius)+" L "+(i.leftFullExtent-n)+" "+i.verticalLeftInnerExtent,a&&o?r+=" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.leftFullExtent-n-(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent-n)+" L "+(i.rightFullExtent+n-t+(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent-n)+" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.rightFullExtent+n-t)+" "+i.verticalRightInnerExtent:a?r+=" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.leftFullExtent+n)+" "+(i.verticalFullExtent+n)+" L "+(i.rightFullExtent-t-n)+" "+(i.verticalFullExtent+n)+" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.rightFullExtent+n-t)+" "+i.verticalRightInnerExtent:r+=" A "+(i.leftLargeArcRadius-n)+" "+(i.leftLargeArcRadius-n)+" 0 0 1 "+i.leftInnerExtent+" "+(i.verticalFullExtent-n)+" L "+(i.rightInnerExtent-t)+" "+(i.verticalFullExtent-n)+" A "+(i.rightLargeArcRadius-n)+" "+(i.rightLargeArcRadius-n)+" 0 0 1 "+(i.rightFullExtent+n-t)+" "+i.verticalRightInnerExtent,r+=" L "+(i.rightFullExtent+n-t)+" "+(i.targetY+i.rightSmallArcRadius)+" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.rightInnerExtent-t)+" "+(i.targetY+n)+" L "+(i.targetX-t)+" "+(i.targetY+n)+(t>0?" L "+i.targetX+" "+i.targetY:"")+"Z"),r}function n$(){var e=.5;function t(r){var n=r.linkArrowLength;if(r.link.circular)return cYt(r.link,n);var i=Math.abs((r.link.target.x0-r.link.source.x1)/2);n>i&&(n=i);var a=r.link.source.x1,o=r.link.target.x0-n,s=eYt(a,o),l=s(e),u=s(1-e),c=r.link.y0-r.link.width/2,f=r.link.y0+r.link.width/2,h=r.link.y1-r.link.width/2,d=r.link.y1+r.link.width/2,v="M"+a+","+c,m="C"+l+","+c+" "+u+","+h+" "+o+","+h,b="C"+u+","+d+" "+l+","+f+" "+a+","+f,p=n>0?"L"+(o+n)+","+(h+r.link.width/2):"";return p+="L"+o+","+d,v+m+p+b+"Z"}return t}function fYt(e,t){var r=O5(t.color),n=Nu.nodePadAcross,i=e.nodePad/2;t.dx=t.x1-t.x0,t.dy=t.y1-t.y0;var a=t.dx,o=Math.max(.5,t.dy),s="node_"+t.pointNumber;return t.group&&(s=w1.randstr()),t.trace=e.trace,t.curveNumber=e.trace.index,{index:t.pointNumber,key:s,partOfGroup:t.partOfGroup||!1,group:t.group,traceId:e.key,trace:e.trace,node:t,nodePad:e.nodePad,nodeLineColor:e.nodeLineColor,nodeLineWidth:e.nodeLineWidth,textFont:e.textFont,size:e.horizontal?e.height:e.width,visibleWidth:Math.ceil(a),visibleHeight:o,zoneX:-n,zoneY:-i,zoneWidth:a+2*n,zoneHeight:o+2*i,labelY:e.horizontal?t.dy/2+1:t.dx/2+1,left:t.originalLayer===1,sizeAcross:e.width,forceLayouts:e.forceLayouts,horizontal:e.horizontal,darkBackground:r.getBrightness()<=128,tinyColorHue:mw.tinyRGB(r),tinyColorAlpha:r.getAlpha(),valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,graph:e.graph,arrangement:e.arrangement,uniqueNodeLabelPathId:[e.guid,e.key,s].join("_"),interactionState:e.interactionState,figure:e}}function t$(e){e.attr("transform",function(t){return r$(t.node.x0.toFixed(3),t.node.y0.toFixed(3))})}function hYt(e){e.call(t$)}function fXe(e,t){e.call(hYt),t.attr("d",n$())}function aXe(e){e.attr("width",function(t){return t.node.x1-t.node.x0}).attr("height",function(t){return t.visibleHeight})}function e$(e){return e.link.width>1||e.linkLineWidth>0}function oXe(e){var t=r$(e.translateX,e.translateY);return t+(e.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function sXe(e,t,r){e.on(".basic",null).on("mouseover.basic",function(n){!n.interactionState.dragInProgress&&!n.partOfGroup&&(r.hover(this,n,t),n.interactionState.hovered=[this,n])}).on("mousemove.basic",function(n){!n.interactionState.dragInProgress&&!n.partOfGroup&&(r.follow(this,n),n.interactionState.hovered=[this,n])}).on("mouseout.basic",function(n){!n.interactionState.dragInProgress&&!n.partOfGroup&&(r.unhover(this,n,t),n.interactionState.hovered=!1)}).on("click.basic",function(n){n.interactionState.hovered&&(r.unhover(this,n,t),n.interactionState.hovered=!1),!n.interactionState.dragInProgress&&!n.partOfGroup&&r.select(this,n,t)})}function dYt(e,t,r,n){var i=q5.behavior.drag().origin(function(a){return{x:a.node.x0+a.visibleWidth/2,y:a.node.y0+a.visibleHeight/2}}).on("dragstart",function(a){if(a.arrangement!=="fixed"&&(w1.ensureSingle(n._fullLayout._infolayer,"g","dragcover",function(s){n._fullLayout._dragCover=s}),w1.raiseToTop(this),a.interactionState.dragInProgress=a.node,lXe(a.node),a.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,a.interactionState.hovered),a.interactionState.hovered=!1),a.arrangement==="snap")){var o=a.traceId+"|"+a.key;a.forceLayouts[o]?a.forceLayouts[o].alpha(1):vYt(e,o,a,n),pYt(e,t,a,o,n)}}).on("drag",function(a){if(a.arrangement!=="fixed"){var o=q5.event.x,s=q5.event.y;a.arrangement==="snap"?(a.node.x0=o-a.visibleWidth/2,a.node.x1=o+a.visibleWidth/2,a.node.y0=s-a.visibleHeight/2,a.node.y1=s+a.visibleHeight/2):(a.arrangement==="freeform"&&(a.node.x0=o-a.visibleWidth/2,a.node.x1=o+a.visibleWidth/2),s=Math.max(0,Math.min(a.size-a.visibleHeight/2,s)),a.node.y0=s-a.visibleHeight/2,a.node.y1=s+a.visibleHeight/2),lXe(a.node),a.arrangement!=="snap"&&(a.sankey.update(a.graph),fXe(e.filter(dXe(a)),t))}}).on("dragend",function(a){if(a.arrangement!=="fixed"){a.interactionState.dragInProgress=!1;for(var o=0;o0)window.requestAnimationFrame(a);else{var l=r.node.originalX;r.node.x0=l-r.visibleWidth/2,r.node.x1=l+r.visibleWidth/2,hXe(r,i)}})}function gYt(e,t,r,n){return function(){for(var a=0,o=0;o0&&n.forceLayouts[t].alpha(0)}}function hXe(e,t){for(var r=[],n=[],i=0;i{"use strict";var Zv=qa(),o$=Pr(),I7=o$.numberFormat,xYt=pXe(),B5=vf(),bYt=ka(),Dx=QJ().cn,sC=o$._;function gXe(e){return e!==""}function N5(e,t){return e.filter(function(r){return r.key===t.traceId})}function mXe(e,t){Zv.select(e).select("path").style("fill-opacity",t),Zv.select(e).select("rect").style("fill-opacity",t)}function yXe(e){Zv.select(e).select("text.name").style("fill","black")}function _Xe(e){return function(t){return e.node.sourceLinks.indexOf(t.link)!==-1||e.node.targetLinks.indexOf(t.link)!==-1}}function xXe(e){return function(t){return t.node.sourceLinks.indexOf(e.link)!==-1||t.node.targetLinks.indexOf(e.link)!==-1}}function bXe(e,t,r){t&&r&&N5(r,t).selectAll("."+Dx.sankeyLink).filter(_Xe(t)).call(wXe.bind(0,t,r,!1))}function a$(e,t,r){t&&r&&N5(r,t).selectAll("."+Dx.sankeyLink).filter(_Xe(t)).call(TXe.bind(0,t,r,!1))}function wXe(e,t,r,n){n.style("fill",function(i){if(!i.link.concentrationscale)return i.tinyColorHoverHue}).style("fill-opacity",function(i){if(!i.link.concentrationscale)return i.tinyColorHoverAlpha}),n.each(function(i){var a=i.link.label;a!==""&&N5(t,e).selectAll("."+Dx.sankeyLink).filter(function(o){return o.link.label===a}).style("fill",function(o){if(!o.link.concentrationscale)return o.tinyColorHoverHue}).style("fill-opacity",function(o){if(!o.link.concentrationscale)return o.tinyColorHoverAlpha})}),r&&N5(t,e).selectAll("."+Dx.sankeyNode).filter(xXe(e)).call(bXe)}function TXe(e,t,r,n){n.style("fill",function(i){return i.tinyColorHue}).style("fill-opacity",function(i){return i.tinyColorAlpha}),n.each(function(i){var a=i.link.label;a!==""&&N5(t,e).selectAll("."+Dx.sankeyLink).filter(function(o){return o.link.label===a}).style("fill",function(o){return o.tinyColorHue}).style("fill-opacity",function(o){return o.tinyColorAlpha})}),r&&N5(t,e).selectAll(Dx.sankeyNode).filter(xXe(e)).call(a$)}function kf(e,t){var r=e.hoverlabel||{},n=o$.nestedProperty(r,t).get();return Array.isArray(n)?!1:n}AXe.exports=function(t,r){for(var n=t._fullLayout,i=n._paper,a=n._size,o=0;o"),color:kf(C,"bgcolor")||bYt.addOpacity(z.color,1),borderColor:kf(C,"bordercolor"),fontFamily:kf(C,"font.family"),fontSize:kf(C,"font.size"),fontColor:kf(C,"font.color"),fontWeight:kf(C,"font.weight"),fontStyle:kf(C,"font.style"),fontVariant:kf(C,"font.variant"),fontTextcase:kf(C,"font.textcase"),fontLineposition:kf(C,"font.lineposition"),fontShadow:kf(C,"font.shadow"),nameLength:kf(C,"namelength"),textAlign:kf(C,"align"),idealAlign:Zv.event.x"),color:kf(C,"bgcolor")||x.tinyColorHue,borderColor:kf(C,"bordercolor"),fontFamily:kf(C,"font.family"),fontSize:kf(C,"font.size"),fontColor:kf(C,"font.color"),fontWeight:kf(C,"font.weight"),fontStyle:kf(C,"font.style"),fontVariant:kf(C,"font.variant"),fontTextcase:kf(C,"font.textcase"),fontLineposition:kf(C,"font.lineposition"),fontShadow:kf(C,"font.shadow"),nameLength:kf(C,"namelength"),textAlign:kf(C,"align"),idealAlign:"left",hovertemplate:C.hovertemplate,hovertemplateLabels:U,eventData:[x.node]},{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:t});mXe(j,.85),yXe(j)}}},T=function(L,x,C){t._fullLayout.hovermode!==!1&&(Zv.select(L).call(a$,x,C),x.node.trace.node.hoverinfo!=="skip"&&(x.node.fullData=x.node.trace,t.emit("plotly_unhover",{event:Zv.event,points:[x.node]})),B5.loneUnhover(n._hoverlayer.node()))};xYt(t,i,r,{width:a.w,height:a.h,margin:{t:a.t,r:a.r,b:a.b,l:a.l}},{linkEvents:{hover:u,follow:m,unhover:b,select:l},nodeEvents:{hover:k,follow:M,unhover:T,select:p}})}});var SXe=ye(yw=>{"use strict";var wYt=mc().overrideAll,TYt=Id().getModuleCalcData,AYt=s$(),SYt=W1(),MYt=Eg(),EYt=yv(),kYt=qf().prepSelect,l$=Pr(),CYt=Oa(),R7="sankey";yw.name=R7;yw.baseLayoutAttrOverrides=wYt({hoverlabel:SYt.hoverlabel},"plot","nested");yw.plot=function(e){var t=TYt(e.calcdata,R7)[0];AYt(e,t),yw.updateFx(e)};yw.clean=function(e,t,r,n){var i=n._has&&n._has(R7),a=t._has&&t._has(R7);i&&!a&&(n._paperdiv.selectAll(".sankey").remove(),n._paperdiv.selectAll(".bgsankey").remove())};yw.updateFx=function(e){for(var t=0;t{"use strict";MXe.exports=function(t,r){for(var n=t.cd,i=[],a=n[0].trace,o=a._sankey.graph.nodes,s=0;s{"use strict";kXe.exports={attributes:KJ(),supplyDefaults:IWe(),calc:qWe(),plot:s$(),moduleType:"trace",name:"sankey",basePlotModule:SXe(),selectPoints:EXe(),categories:["noOpacity"],meta:{}}});var PXe=ye((M2r,LXe)=>{"use strict";LXe.exports=CXe()});var RXe=ye(U5=>{"use strict";var IXe=Mc();U5.name="indicator";U5.plot=function(e,t,r,n){IXe.plotBasePlot(U5.name,e,t,r,n)};U5.clean=function(e,t,r,n){IXe.cleanBasePlot(U5.name,e,t,r,n)}});var c$=ye((k2r,BXe)=>{"use strict";var Fx=Ao().extendFlat,FXe=Ao().extendDeep,PYt=mc().overrideAll,zXe=ec(),qXe=Ih(),IYt=Cc().attributes,Nf=Rd(),RYt=vl().templatedArray,D7=$T(),DXe=df().descriptionOnlyNumbers,u$=zXe({editType:"plot",colorEditType:"plot"}),lC={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:qXe.defaultLine,editType:"plot"},width:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},thickness:{valType:"number",min:0,max:1,dflt:1,editType:"plot"},editType:"calc"},OXe={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},DYt=RYt("step",FXe({},lC,{range:OXe}));BXe.exports={mode:{valType:"flaglist",editType:"calc",flags:["number","delta","gauge"],dflt:"number"},value:{valType:"number",editType:"calc",anim:!0},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},domain:IYt({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:Fx({},u$,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:DXe("value")},font:Fx({},u$,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"plot"},delta:{reference:{valType:"number",editType:"calc"},position:{valType:"enumerated",values:["top","bottom","left","right"],dflt:"bottom",editType:"plot"},relative:{valType:"boolean",editType:"plot",dflt:!1},valueformat:{valType:"string",editType:"plot",description:DXe("value")},increasing:{symbol:{valType:"string",dflt:D7.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:D7.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:D7.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:D7.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:Fx({},u$,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"calc"},gauge:{shape:{valType:"enumerated",editType:"plot",dflt:"angular",values:["angular","bullet"]},bar:FXe({},lC,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:qXe.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:PYt({range:OXe,visible:Fx({},Nf.visible,{dflt:!0}),tickmode:Nf.minor.tickmode,nticks:Nf.nticks,tick0:Nf.tick0,dtick:Nf.dtick,tickvals:Nf.tickvals,ticktext:Nf.ticktext,ticks:Fx({},Nf.ticks,{dflt:"outside"}),ticklen:Nf.ticklen,tickwidth:Nf.tickwidth,tickcolor:Nf.tickcolor,ticklabelstep:Nf.ticklabelstep,showticklabels:Nf.showticklabels,labelalias:Nf.labelalias,tickfont:zXe({}),tickangle:Nf.tickangle,tickformat:Nf.tickformat,tickformatstops:Nf.tickformatstops,tickprefix:Nf.tickprefix,showtickprefix:Nf.showtickprefix,ticksuffix:Nf.ticksuffix,showticksuffix:Nf.showticksuffix,separatethousands:Nf.separatethousands,exponentformat:Nf.exponentformat,minexponent:Nf.minexponent,showexponent:Nf.showexponent,editType:"plot"},"plot"),steps:DYt,threshold:{line:{color:Fx({},lC.line.color,{}),width:Fx({},lC.line.width,{dflt:1}),editType:"plot"},thickness:Fx({},lC.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}});var f$=ye((C2r,NXe)=>{"use strict";NXe.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}});var GXe=ye((L2r,VXe)=>{"use strict";var sy=Pr(),z7=c$(),FYt=Cc().defaults,UXe=vl(),zYt=Zd(),F7=f$(),qYt=Lb(),OYt=z3(),BYt=s_(),NYt=l_();function UYt(e,t,r,n){function i(x,C){return sy.coerce(e,t,z7,x,C)}FYt(t,n,i),i("mode"),t._hasNumber=t.mode.indexOf("number")!==-1,t._hasDelta=t.mode.indexOf("delta")!==-1,t._hasGauge=t.mode.indexOf("gauge")!==-1;var a=i("value");t._range=[0,typeof a=="number"?1.5*a:1];var o=new Array(2),s;if(t._hasNumber){i("number.valueformat");var l=sy.extendFlat({},n.font);l.size=void 0,sy.coerceFont(i,"number.font",l),t.number.font.size===void 0&&(t.number.font.size=F7.defaultNumberFontSize,o[0]=!0),i("number.prefix"),i("number.suffix"),s=t.number.font.size}var u;if(t._hasDelta){var c=sy.extendFlat({},n.font);c.size=void 0,sy.coerceFont(i,"delta.font",c),t.delta.font.size===void 0&&(t.delta.font.size=(t._hasNumber?.5:1)*(s||F7.defaultNumberFontSize),o[1]=!0),i("delta.reference",t.value),i("delta.relative"),i("delta.valueformat",t.delta.relative?"2%":""),i("delta.increasing.symbol"),i("delta.increasing.color"),i("delta.decreasing.symbol"),i("delta.decreasing.color"),i("delta.position"),i("delta.prefix"),i("delta.suffix"),u=t.delta.font.size}t._scaleNumbers=(!t._hasNumber||o[0])&&(!t._hasDelta||o[1])||!1;var f=sy.extendFlat({},n.font);f.size=.25*(s||u||F7.defaultNumberFontSize),sy.coerceFont(i,"title.font",f),i("title.text");var h,d,v,m;function b(x,C){return sy.coerce(h,d,z7.gauge,x,C)}function p(x,C){return sy.coerce(v,m,z7.gauge.axis,x,C)}if(t._hasGauge){h=e.gauge,h||(h={}),d=UXe.newContainer(t,"gauge"),b("shape");var k=t._isBullet=t.gauge.shape==="bullet";k||i("title.align","center");var M=t._isAngular=t.gauge.shape==="angular";M||i("align","center"),b("bgcolor",n.paper_bgcolor),b("borderwidth"),b("bordercolor"),b("bar.color"),b("bar.line.color"),b("bar.line.width");var T=F7.valueThickness*(t.gauge.shape==="bullet"?.5:1);b("bar.thickness",T),zYt(h,d,{name:"steps",handleItemDefaults:VYt}),b("threshold.value"),b("threshold.thickness"),b("threshold.line.width"),b("threshold.line.color"),v={},h&&(v=h.axis||{}),m=UXe.newContainer(d,"axis"),p("visible"),t._range=p("range",t._range);var L={font:n.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};qYt(v,m,p,"linear"),NYt(v,m,p,"linear",L),BYt(v,m,p,"linear",L),OYt(v,m,p,L)}else i("title.align","center"),i("align","center"),t._isAngular=t._isBullet=!1;t._length=null}function VYt(e,t){function r(n,i){return sy.coerce(e,t,z7.gauge.steps,n,i)}r("color"),r("line.color"),r("line.width"),r("range"),r("thickness")}VXe.exports={supplyDefaults:UYt}});var jXe=ye((P2r,HXe)=>{"use strict";function GYt(e,t){var r=[],n=t.value;typeof t._lastValue!="number"&&(t._lastValue=t.value);var i=t._lastValue,a=i;return t._hasDelta&&typeof t.delta.reference=="number"&&(a=t.delta.reference),r[0]={y:n,lastY:i,delta:n-a,relativeDelta:(n-a)/a},r}HXe.exports={calc:GYt}});var JXe=ye((I2r,KXe)=>{"use strict";var Tw=qa(),HYt=(H2(),pb(G2)).interpolate,WXe=(H2(),pb(G2)).interpolateNumber,zx=Pr(),jYt=zx.strScale,cC=zx.strTranslate,WYt=zx.rad2deg,XYt=Dh().MID_SHIFT,ww=So(),_w=f$(),O7=Zl(),sv=ho(),ZYt=f4(),YYt=dI(),KYt=Rd(),V5=ka(),h$={left:"start",center:"middle",right:"end"},xw={left:0,center:.5,right:1},XXe=/[yzafpnµmkMGTPEZY]/;function fC(e){return e&&e.duration>0}KXe.exports=function(t,r,n,i){var a=t._fullLayout,o;fC(n)&&i&&(o=i()),zx.makeTraceGroups(a._indicatorlayer,r,"trace").each(function(s){var l=s[0],u=l.trace,c=Tw.select(this),f=u._hasGauge,h=u._isAngular,d=u._isBullet,v=u.domain,m={w:a._size.w*(v.x[1]-v.x[0]),h:a._size.h*(v.y[1]-v.y[0]),l:a._size.l+a._size.w*v.x[0],r:a._size.r+a._size.w*(1-v.x[1]),t:a._size.t+a._size.h*(1-v.y[1]),b:a._size.b+a._size.h*v.y[0]},b=m.l+m.w/2,p=m.t+m.h/2,k=Math.min(m.w/2,m.h),M=_w.innerRadius*k,T,L,x,C=u.align||"center";if(L=p,!f)T=m.l+xw[C]*m.w,x=function(j){return ZXe(j,m.w,m.h)};else if(h&&(T=b,L=p+k/2,x=function(j){return tKt(j,.9*M)}),d){var S=_w.bulletPadding,g=1-_w.bulletNumberDomainSize+S;T=m.l+(g+(1-g)*xw[C])*m.w,x=function(j){return ZXe(j,(_w.bulletNumberDomainSize-S)*m.w,m.h)}}QYt(t,c,s,{numbersX:T,numbersY:L,numbersScaler:x,transitionOpts:n,onComplete:o});var P,E;f&&(P={range:u.gauge.axis.range,color:u.gauge.bgcolor,line:{color:u.gauge.bordercolor,width:0},thickness:1},E={range:u.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:u.gauge.bordercolor,width:u.gauge.borderwidth},thickness:1});var z=c.selectAll("g.angular").data(h?s:[]);z.exit().remove();var q=c.selectAll("g.angularaxis").data(h?s:[]);q.exit().remove(),h&&$Yt(t,c,s,{radius:k,innerRadius:M,gauge:z,layer:q,size:m,gaugeBg:P,gaugeOutline:E,transitionOpts:n,onComplete:o});var U=c.selectAll("g.bullet").data(d?s:[]);U.exit().remove();var G=c.selectAll("g.bulletaxis").data(d?s:[]);G.exit().remove(),d&&JYt(t,c,s,{gauge:U,layer:G,size:m,gaugeBg:P,gaugeOutline:E,transitionOpts:n,onComplete:o});var Z=c.selectAll("text.title").data(s);Z.exit().remove(),Z.enter().append("text").classed("title",!0),Z.attr("text-anchor",function(){return d?h$.right:h$[u.title.align]}).text(u.title.text).call(ww.font,u.title.font).call(O7.convertToTspans,t),Z.attr("transform",function(){var j=m.l+m.w*xw[u.title.align],N,H=_w.titlePadding,re=ww.bBox(Z.node());if(f){if(h)if(u.gauge.axis.visible){var oe=ww.bBox(q.node());N=oe.top-H-re.bottom}else N=m.t+m.h/2-k/2-re.bottom-H;d&&(N=L-(re.top+re.bottom)/2,j=m.l-_w.bulletPadding*m.w)}else N=u._numbersTop-H-re.bottom;return cC(j,N)})})};function JYt(e,t,r,n){var i=r[0].trace,a=n.gauge,o=n.layer,s=n.gaugeBg,l=n.gaugeOutline,u=n.size,c=i.domain,f=n.transitionOpts,h=n.onComplete,d,v,m,b,p;a.enter().append("g").classed("bullet",!0),a.attr("transform",cC(u.l,u.t)),o.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),o.selectAll("g.xbulletaxistick,path,text").remove();var k=u.h,M=i.gauge.bar.thickness*k,T=c.x[0],L=c.x[0]+(c.x[1]-c.x[0])*(i._hasNumber||i._hasDelta?1-_w.bulletNumberDomainSize:1);d=uC(e,i.gauge.axis),d._id="xbulletaxis",d.domain=[T,L],d.setScale(),v=sv.calcTicks(d),m=sv.makeTransTickFn(d),b=sv.getTickSigns(d)[2],p=u.t+u.h,d.visible&&(sv.drawTicks(e,d,{vals:d.ticks==="inside"?sv.clipEnds(d,v):v,layer:o,path:sv.makeTickPath(d,p,b),transFn:m}),sv.drawLabels(e,d,{vals:v,layer:o,transFn:m,labelFns:sv.makeLabelFns(d,p)}));function x(q){q.attr("width",function(U){return Math.max(0,d.c2p(U.range[1])-d.c2p(U.range[0]))}).attr("x",function(U){return d.c2p(U.range[0])}).attr("y",function(U){return .5*(1-U.thickness)*k}).attr("height",function(U){return U.thickness*k})}var C=[s].concat(i.gauge.steps),S=a.selectAll("g.bg-bullet").data(C);S.enter().append("g").classed("bg-bullet",!0).append("rect"),S.select("rect").call(x).call(bw),S.exit().remove();var g=a.selectAll("g.value-bullet").data([i.gauge.bar]);g.enter().append("g").classed("value-bullet",!0).append("rect"),g.select("rect").attr("height",M).attr("y",(k-M)/2).call(bw),fC(f)?g.select("rect").transition().duration(f.duration).ease(f.easing).each("end",function(){h&&h()}).each("interrupt",function(){h&&h()}).attr("width",Math.max(0,d.c2p(Math.min(i.gauge.axis.range[1],r[0].y)))):g.select("rect").attr("width",typeof r[0].y=="number"?Math.max(0,d.c2p(Math.min(i.gauge.axis.range[1],r[0].y))):0),g.exit().remove();var P=r.filter(function(){return i.gauge.threshold.value||i.gauge.threshold.value===0}),E=a.selectAll("g.threshold-bullet").data(P);E.enter().append("g").classed("threshold-bullet",!0).append("line"),E.select("line").attr("x1",d.c2p(i.gauge.threshold.value)).attr("x2",d.c2p(i.gauge.threshold.value)).attr("y1",(1-i.gauge.threshold.thickness)/2*k).attr("y2",(1-(1-i.gauge.threshold.thickness)/2)*k).call(V5.stroke,i.gauge.threshold.line.color).style("stroke-width",i.gauge.threshold.line.width),E.exit().remove();var z=a.selectAll("g.gauge-outline").data([l]);z.enter().append("g").classed("gauge-outline",!0).append("rect"),z.select("rect").call(x).call(bw),z.exit().remove()}function $Yt(e,t,r,n){var i=r[0].trace,a=n.size,o=n.radius,s=n.innerRadius,l=n.gaugeBg,u=n.gaugeOutline,c=[a.l+a.w/2,a.t+a.h/2+o/2],f=n.gauge,h=n.layer,d=n.transitionOpts,v=n.onComplete,m=Math.PI/2;function b(_e){var ke=i.gauge.axis.range[0],Ce=i.gauge.axis.range[1],ge=(_e-ke)/(Ce-ke)*Math.PI-m;return ge<-m?-m:ge>m?m:ge}function p(_e){return Tw.svg.arc().innerRadius((s+o)/2-_e/2*(o-s)).outerRadius((s+o)/2+_e/2*(o-s)).startAngle(-m)}function k(_e){_e.attr("d",function(ke){return p(ke.thickness).startAngle(b(ke.range[0])).endAngle(b(ke.range[1]))()})}var M,T,L,x;f.enter().append("g").classed("angular",!0),f.attr("transform",cC(c[0],c[1])),h.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),h.selectAll("g.xangularaxistick,path,text").remove(),M=uC(e,i.gauge.axis),M.type="linear",M.range=i.gauge.axis.range,M._id="xangularaxis",M.ticklabeloverflow="allow",M.setScale();var C=function(_e){return(M.range[0]-_e.x)/(M.range[1]-M.range[0])*Math.PI+Math.PI},S={},g=sv.makeLabelFns(M,0),P=g.labelStandoff;S.xFn=function(_e){var ke=C(_e);return Math.cos(ke)*P},S.yFn=function(_e){var ke=C(_e),Ce=Math.sin(ke)>0?.2:1;return-Math.sin(ke)*(P+_e.fontSize*Ce)+Math.abs(Math.cos(ke))*(_e.fontSize*XYt)},S.anchorFn=function(_e){var ke=C(_e),Ce=Math.cos(ke);return Math.abs(Ce)<.1?"middle":Ce>0?"start":"end"},S.heightFn=function(_e,ke,Ce){var ge=C(_e);return-.5*(1+Math.sin(ge))*Ce};var E=function(_e){return cC(c[0]+o*Math.cos(_e),c[1]-o*Math.sin(_e))};L=function(_e){return E(C(_e))};var z=function(_e){var ke=C(_e);return E(ke)+"rotate("+-WYt(ke)+")"};if(T=sv.calcTicks(M),x=sv.getTickSigns(M)[2],M.visible){x=M.ticks==="inside"?-1:1;var q=(M.linewidth||1)/2;sv.drawTicks(e,M,{vals:T,layer:h,path:"M"+x*q+",0h"+x*M.ticklen,transFn:z}),sv.drawLabels(e,M,{vals:T,layer:h,transFn:L,labelFns:S})}var U=[l].concat(i.gauge.steps),G=f.selectAll("g.bg-arc").data(U);G.enter().append("g").classed("bg-arc",!0).append("path"),G.select("path").call(k).call(bw),G.exit().remove();var Z=p(i.gauge.bar.thickness),j=f.selectAll("g.value-arc").data([i.gauge.bar]);j.enter().append("g").classed("value-arc",!0).append("path");var N=j.select("path");fC(d)?(N.transition().duration(d.duration).ease(d.easing).each("end",function(){v&&v()}).each("interrupt",function(){v&&v()}).attrTween("d",eKt(Z,b(r[0].lastY),b(r[0].y))),i._lastValue=r[0].y):N.attr("d",typeof r[0].y=="number"?Z.endAngle(b(r[0].y)):"M0,0Z"),N.call(bw),j.exit().remove(),U=[];var H=i.gauge.threshold.value;(H||H===0)&&U.push({range:[H,H],color:i.gauge.threshold.color,line:{color:i.gauge.threshold.line.color,width:i.gauge.threshold.line.width},thickness:i.gauge.threshold.thickness});var re=f.selectAll("g.threshold-arc").data(U);re.enter().append("g").classed("threshold-arc",!0).append("path"),re.select("path").call(k).call(bw),re.exit().remove();var oe=f.selectAll("g.gauge-outline").data([u]);oe.enter().append("g").classed("gauge-outline",!0).append("path"),oe.select("path").call(k).call(bw),oe.exit().remove()}function QYt(e,t,r,n){var i=r[0].trace,a=n.numbersX,o=n.numbersY,s=i.align||"center",l=h$[s],u=n.transitionOpts,c=n.onComplete,f=zx.ensureSingle(t,"g","numbers"),h,d,v,m=[];i._hasNumber&&m.push("number"),i._hasDelta&&(m.push("delta"),i.delta.position==="left"&&m.reverse());var b=f.selectAll("text").data(m);b.enter().append("text"),b.attr("text-anchor",function(){return l}).attr("class",function(E){return E}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),b.exit().remove();function p(E,z,q,U){if(E.match("s")&&q>=0!=U>=0&&!z(q).slice(-1).match(XXe)&&!z(U).slice(-1).match(XXe)){var G=E.slice().replace("s","f").replace(/\d+/,function(j){return parseInt(j)-1}),Z=uC(e,{tickformat:G});return function(j){return Math.abs(j)<1?sv.tickText(Z,j).text:z(j)}}else return z}function k(){var E=uC(e,{tickformat:i.number.valueformat},i._range);E.setScale(),sv.prepTicks(E);var z=function(j){return sv.tickText(E,j).text},q=i.number.suffix,U=i.number.prefix,G=f.select("text.number");function Z(){var j=typeof r[0].y=="number"?U+z(r[0].y)+q:"-";G.text(j).call(ww.font,i.number.font).call(O7.convertToTspans,e)}return fC(u)?G.transition().duration(u.duration).ease(u.easing).each("end",function(){Z(),c&&c()}).each("interrupt",function(){Z(),c&&c()}).attrTween("text",function(){var j=Tw.select(this),N=WXe(r[0].lastY,r[0].y);i._lastValue=r[0].y;var H=p(i.number.valueformat,z,r[0].lastY,r[0].y);return function(re){j.text(U+H(N(re))+q)}}):Z(),h=YXe(U+z(r[0].y)+q,i.number.font,l,e),G}function M(){var E=uC(e,{tickformat:i.delta.valueformat},i._range);E.setScale(),sv.prepTicks(E);var z=function(re){return sv.tickText(E,re).text},q=i.delta.suffix,U=i.delta.prefix,G=function(re){var oe=i.delta.relative?re.relativeDelta:re.delta;return oe},Z=function(re,oe){return re===0||typeof re!="number"||isNaN(re)?"-":(re>0?i.delta.increasing.symbol:i.delta.decreasing.symbol)+U+oe(re)+q},j=function(re){return re.delta>=0?i.delta.increasing.color:i.delta.decreasing.color};i._deltaLastValue===void 0&&(i._deltaLastValue=G(r[0]));var N=f.select("text.delta");N.call(ww.font,i.delta.font).call(V5.fill,j({delta:i._deltaLastValue}));function H(){N.text(Z(G(r[0]),z)).call(V5.fill,j(r[0])).call(O7.convertToTspans,e)}return fC(u)?N.transition().duration(u.duration).ease(u.easing).tween("text",function(){var re=Tw.select(this),oe=G(r[0]),_e=i._deltaLastValue,ke=p(i.delta.valueformat,z,_e,oe),Ce=WXe(_e,oe);return i._deltaLastValue=oe,function(ge){re.text(Z(Ce(ge),ke)),re.call(V5.fill,j({delta:Ce(ge)}))}}).each("end",function(){H(),c&&c()}).each("interrupt",function(){H(),c&&c()}):H(),d=YXe(Z(G(r[0]),z),i.delta.font,l,e),N}var T=i.mode+i.align,L;if(i._hasDelta&&(L=M(),T+=i.delta.position+i.delta.font.size+i.delta.font.family+i.delta.valueformat,T+=i.delta.increasing.symbol+i.delta.decreasing.symbol,v=d),i._hasNumber&&(k(),T+=i.number.font.size+i.number.font.family+i.number.valueformat+i.number.suffix+i.number.prefix,v=h),i._hasDelta&&i._hasNumber){var x=[(h.left+h.right)/2,(h.top+h.bottom)/2],C=[(d.left+d.right)/2,(d.top+d.bottom)/2],S,g,P=.75*i.delta.font.size;i.delta.position==="left"&&(S=q7(i,"deltaPos",0,-1*(h.width*xw[i.align]+d.width*(1-xw[i.align])+P),T,Math.min),g=x[1]-C[1],v={width:h.width+d.width+P,height:Math.max(h.height,d.height),left:d.left+S,right:h.right,top:Math.min(h.top,d.top+g),bottom:Math.max(h.bottom,d.bottom+g)}),i.delta.position==="right"&&(S=q7(i,"deltaPos",0,h.width*(1-xw[i.align])+d.width*xw[i.align]+P,T,Math.max),g=x[1]-C[1],v={width:h.width+d.width+P,height:Math.max(h.height,d.height),left:h.left,right:d.right+S,top:Math.min(h.top,d.top+g),bottom:Math.max(h.bottom,d.bottom+g)}),i.delta.position==="bottom"&&(S=null,g=d.height,v={width:Math.max(h.width,d.width),height:h.height+d.height,left:Math.min(h.left,d.left),right:Math.max(h.right,d.right),top:h.bottom-h.height,bottom:h.bottom+d.height}),i.delta.position==="top"&&(S=null,g=h.top,v={width:Math.max(h.width,d.width),height:h.height+d.height,left:Math.min(h.left,d.left),right:Math.max(h.right,d.right),top:h.bottom-h.height-d.height,bottom:h.bottom}),L.attr({dx:S,dy:g})}(i._hasNumber||i._hasDelta)&&f.attr("transform",function(){var E=n.numbersScaler(v);T+=E[2];var z=q7(i,"numbersScale",1,E[0],T,Math.min),q;i._scaleNumbers||(z=1),i._isAngular?q=o-z*v.bottom:q=o-z*(v.top+v.bottom)/2,i._numbersTop=z*v.top+q;var U=v[s];s==="center"&&(U=(v.left+v.right)/2);var G=a-z*U;return G=q7(i,"numbersTranslate",0,G,T,Math.max),cC(G,q)+jYt(z)})}function bw(e){e.each(function(t){V5.stroke(Tw.select(this),t.line.color)}).each(function(t){V5.fill(Tw.select(this),t.color)}).style("stroke-width",function(t){return t.line.width})}function eKt(e,t,r){return function(){var n=HYt(t,r);return function(i){return e.endAngle(n(i))()}}}function uC(e,t,r){var n=e._fullLayout,i=zx.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},t),a={type:"linear",_id:"x"+t._id},o={letter:"x",font:n.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function s(l,u){return zx.coerce(i,a,KYt,l,u)}return ZYt(i,a,s,o,n),YYt(i,a,s,o),a}function ZXe(e,t,r){var n=Math.min(t/e.width,r/e.height);return[n,e,t+"x"+r]}function tKt(e,t){var r=Math.sqrt(e.width/2*(e.width/2)+e.height*e.height),n=t/r;return[n,e,t]}function YXe(e,t,r,n){var i=document.createElementNS("http://www.w3.org/2000/svg","text"),a=Tw.select(i);return a.text(e).attr("x",0).attr("y",0).attr("text-anchor",r).attr("data-unformatted",e).call(O7.convertToTspans,n).call(ww.font,t),ww.bBox(a.node())}function q7(e,t,r,n,i,a){var o="_cache"+t;e[o]&&e[o].key===i||(e[o]={key:i,value:r});var s=zx.aggNums(a,null,[e[o].value,n],2);return e[o].value=s,s}});var QXe=ye((R2r,$Xe)=>{"use strict";$Xe.exports={moduleType:"trace",name:"indicator",basePlotModule:RXe(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:c$(),supplyDefaults:GXe().supplyDefaults,calc:jXe().calc,plot:JXe(),meta:{}}});var tZe=ye((D2r,eZe)=>{"use strict";eZe.exports=QXe()});var d$=ye((z2r,aZe)=>{"use strict";var rZe=Jb(),B7=Ao().extendFlat,rKt=mc().overrideAll,iZe=ec(),iKt=Cc().attributes,nZe=df().descriptionOnlyNumbers,F2r=aZe.exports=rKt({domain:iKt({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null},columnorder:{valType:"data_array"},header:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:nZe("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:B7({},rZe.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:B7({},iZe({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:nZe("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:B7({},rZe.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:B7({},iZe({arrayOk:!0}))}},"calc","from-root")});var sZe=ye((q2r,oZe)=>{"use strict";var v$=Pr(),nKt=d$(),aKt=Cc().defaults;function oKt(e,t){for(var r=e.columnorder||[],n=e.header.values.length,i=r.slice(0,n),a=i.slice().sort(function(l,u){return l-u}),o=i.map(function(l){return a.indexOf(l)}),s=o.length;s{"use strict";var sKt=iy().wrap;lZe.exports=function(){return sKt({})}});var p$=ye((B2r,cZe)=>{"use strict";cZe.exports={cellPad:8,columnExtentOffset:10,columnTitleOffset:28,emptyHeaderHeight:16,latexCheck:/^\$.*\$$/,goldenRatio:1.618,lineBreaker:"
",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}});var _Ze=ye((N2r,yZe)=>{"use strict";var fZe=p$(),m$=Ao().extendFlat,lKt=Eo(),uKt=vv().isTypedArray,N7=vv().isArrayOrTypedArray;yZe.exports=function(t,r){var n=g$(r.cells.values),i=function(g){return g.slice(r.header.values.length,g.length)},a=g$(r.header.values);a.length&&!a[0].length&&(a[0]=[""],a=g$(a));var o=a.concat(i(n).map(function(){return mZe((a[0]||[""]).length)})),s=r.domain,l=Math.floor(t._fullLayout._size.w*(s.x[1]-s.x[0])),u=Math.floor(t._fullLayout._size.h*(s.y[1]-s.y[0])),c=r.header.values.length?o[0].map(function(){return r.header.height}):[fZe.emptyHeaderHeight],f=n.length?n[0].map(function(){return r.cells.height}):[],h=c.reduce(hZe,0),d=u-h,v=d+fZe.uplift,m=pZe(f,v),b=pZe(c,h),p=vZe(b,[]),k=vZe(m,p),M={},T=r._fullInput.columnorder;N7(T)&&(T=Array.from(T)),T=T.concat(i(n.map(function(g,P){return P})));var L=o.map(function(g,P){var E=N7(r.columnwidth)?r.columnwidth[Math.min(P,r.columnwidth.length-1)]:r.columnwidth;return lKt(E)?Number(E):1}),x=L.reduce(hZe,0);L=L.map(function(g){return g/x*l});var C=Math.max(y$(r.header.line.width),y$(r.cells.line.width)),S={key:r.uid+t._context.staticPlot,translateX:s.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-s.y[1]),size:t._fullLayout._size,width:l,maxLineWidth:C,height:u,columnOrder:T,groupHeight:u,rowBlocks:k,headerRowBlocks:p,scrollY:0,cells:m$({},r.cells,{values:n}),headerCells:m$({},r.header,{values:o}),gdColumns:o.map(function(g){return g[0]}),gdColumnsOriginalOrder:o.map(function(g){return g[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:o.map(function(g,P){var E=M[g];M[g]=(E||0)+1;var z=g+"__"+M[g];return{key:z,label:g,specIndex:P,xIndex:T[P],xScale:dZe,x:void 0,calcdata:void 0,columnWidth:L[P]}})};return S.columns.forEach(function(g){g.calcdata=S,g.x=dZe(g)}),S};function y$(e){if(N7(e)){for(var t=0,r=0;r=t||u===e.length-1)&&(r[i]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=u,o=gZe(),i+=a,s=u+1,a=0);return r}function gZe(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}});var xZe=ye(_$=>{"use strict";var U7=Ao().extendFlat;_$.splitToPanels=function(e){var t=[0,0],r=U7({},e,{key:"header",type:"header",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!0,values:e.calcdata.headerCells.values[e.specIndex],rowBlocks:e.calcdata.headerRowBlocks,calcdata:U7({},e.calcdata,{cells:e.calcdata.headerCells})}),n=U7({},e,{key:"cells1",type:"cells",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),i=U7({},e,{key:"cells2",type:"cells",page:1,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks});return[n,i,r]};_$.splitToCells=function(e){var t=cKt(e);return(e.values||[]).slice(t[0],t[1]).map(function(r,n){var i=typeof r=="string"&&r.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:n+i,key:t[0]+n,column:e,calcdata:e.calcdata,page:e.page,rowBlocks:e.rowBlocks,value:r}})};function cKt(e){var t=e.rowBlocks[e.page],r=t?t.rows[0].rowIndex:0,n=t?r+t.rows.length:0;return[r,n]}});var C$=ye((V2r,PZe)=>{"use strict";var Ya=p$(),tf=qa(),x$=Pr(),fKt=x$.numberFormat,Uu=iy(),b$=So(),hKt=Zl(),dKt=Pr().raiseToTop,lg=Pr().strTranslate,vKt=Pr().cancelTransition,pKt=_Ze(),EZe=xZe(),bZe=ka();PZe.exports=function(t,r){var n=!t._context.staticPlot,i=t._fullLayout._paper.selectAll("."+Ya.cn.table).data(r.map(function(k){var M=Uu.unwrap(k),T=M.trace;return pKt(t,T)}),Uu.keyFun);i.exit().remove(),i.enter().append("g").classed(Ya.cn.table,!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","all"),i.attr("width",function(k){return k.width+k.size.l+k.size.r}).attr("height",function(k){return k.height+k.size.t+k.size.b}).attr("transform",function(k){return lg(k.translateX,k.translateY)});var a=i.selectAll("."+Ya.cn.tableControlView).data(Uu.repeat,Uu.keyFun),o=a.enter().append("g").classed(Ya.cn.tableControlView,!0).style("box-sizing","content-box");if(n){var s="onwheel"in document?"wheel":"mousewheel";o.on("mousemove",function(k){a.filter(function(M){return k===M}).call(hC,t)}).on(s,function(k){if(!k.scrollbarState.wheeling){k.scrollbarState.wheeling=!0;var M=k.scrollY+tf.event.deltaY,T=G7(t,a,null,M)(k);T||(tf.event.stopPropagation(),tf.event.preventDefault()),k.scrollbarState.wheeling=!1}}).call(hC,t,!0)}a.attr("transform",function(k){return lg(k.size.l,k.size.t)});var l=a.selectAll("."+Ya.cn.scrollBackground).data(Uu.repeat,Uu.keyFun);l.enter().append("rect").classed(Ya.cn.scrollBackground,!0).attr("fill","none"),l.attr("width",function(k){return k.width}).attr("height",function(k){return k.height}),a.each(function(k){b$.setClipUrl(tf.select(this),wZe(t,k),t)});var u=a.selectAll("."+Ya.cn.yColumn).data(function(k){return k.columns},Uu.keyFun);u.enter().append("g").classed(Ya.cn.yColumn,!0),u.exit().remove(),u.attr("transform",function(k){return lg(k.x,0)}),n&&u.call(tf.behavior.drag().origin(function(k){var M=tf.select(this);return SZe(M,k,-Ya.uplift),dKt(this),k.calcdata.columnDragInProgress=!0,hC(a.filter(function(T){return k.calcdata.key===T.key}),t),k}).on("drag",function(k){var M=tf.select(this),T=function(C){return(k===C?tf.event.x:C.x)+C.columnWidth/2};k.x=Math.max(-Ya.overdrag,Math.min(k.calcdata.width+Ya.overdrag-k.columnWidth,tf.event.x));var L=kZe(u).filter(function(C){return C.calcdata.key===k.calcdata.key}),x=L.sort(function(C,S){return T(C)-T(S)});x.forEach(function(C,S){C.xIndex=S,C.x=k===C?C.x:C.xScale(C)}),u.filter(function(C){return k!==C}).transition().ease(Ya.transitionEase).duration(Ya.transitionDuration).attr("transform",function(C){return lg(C.x,0)}),M.call(vKt).attr("transform",lg(k.x,-Ya.uplift))}).on("dragend",function(k){var M=tf.select(this),T=k.calcdata;k.x=k.xScale(k),k.calcdata.columnDragInProgress=!1,SZe(M,k,0),SKt(t,T,T.columns.map(function(L){return L.xIndex}))})),u.each(function(k){b$.setClipUrl(tf.select(this),TZe(t,k),t)});var c=u.selectAll("."+Ya.cn.columnBlock).data(EZe.splitToPanels,Uu.keyFun);c.enter().append("g").classed(Ya.cn.columnBlock,!0).attr("id",function(k){return k.key}),c.style("cursor",function(k){return k.dragHandle?"ew-resize":k.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var f=c.filter(MKt),h=c.filter(M$);n&&h.call(tf.behavior.drag().origin(function(k){return tf.event.stopPropagation(),k}).on("drag",G7(t,a,-1)).on("dragend",function(){})),w$(t,a,f,c),w$(t,a,h,c);var d=a.selectAll("."+Ya.cn.scrollAreaClip).data(Uu.repeat,Uu.keyFun);d.enter().append("clipPath").classed(Ya.cn.scrollAreaClip,!0).attr("id",function(k){return wZe(t,k)});var v=d.selectAll("."+Ya.cn.scrollAreaClipRect).data(Uu.repeat,Uu.keyFun);v.enter().append("rect").classed(Ya.cn.scrollAreaClipRect,!0).attr("x",-Ya.overdrag).attr("y",-Ya.uplift).attr("fill","none"),v.attr("width",function(k){return k.width+2*Ya.overdrag}).attr("height",function(k){return k.height+Ya.uplift});var m=u.selectAll("."+Ya.cn.columnBoundary).data(Uu.repeat,Uu.keyFun);m.enter().append("g").classed(Ya.cn.columnBoundary,!0);var b=u.selectAll("."+Ya.cn.columnBoundaryClippath).data(Uu.repeat,Uu.keyFun);b.enter().append("clipPath").classed(Ya.cn.columnBoundaryClippath,!0),b.attr("id",function(k){return TZe(t,k)});var p=b.selectAll("."+Ya.cn.columnBoundaryRect).data(Uu.repeat,Uu.keyFun);p.enter().append("rect").classed(Ya.cn.columnBoundaryRect,!0).attr("fill","none"),p.attr("width",function(k){return k.columnWidth+2*V7(k)}).attr("height",function(k){return k.calcdata.height+2*V7(k)+Ya.uplift}).attr("x",function(k){return-V7(k)}).attr("y",function(k){return-V7(k)}),E$(null,h,a)};function V7(e){return Math.ceil(e.calcdata.maxLineWidth/2)}function wZe(e,t){return"clip"+e._fullLayout._uid+"_scrollAreaBottomClip_"+t.key}function TZe(e,t){return"clip"+e._fullLayout._uid+"_columnBoundaryClippath_"+t.calcdata.key+"_"+t.specIndex}function kZe(e){return[].concat.apply([],e.map(function(t){return t})).map(function(t){return t.__data__})}function hC(e,t,r){function n(u){var c=u.rowBlocks;return A$(c,c.length-1)+(c.length?H7(c[c.length-1],1/0):1)}var i=e.selectAll("."+Ya.cn.scrollbarKit).data(Uu.repeat,Uu.keyFun);i.enter().append("g").classed(Ya.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),i.each(function(u){var c=u.scrollbarState;c.totalHeight=n(u),c.scrollableAreaHeight=u.groupHeight-T$(u),c.currentlyVisibleHeight=Math.min(c.totalHeight,c.scrollableAreaHeight),c.ratio=c.currentlyVisibleHeight/c.totalHeight,c.barLength=Math.max(c.ratio*c.currentlyVisibleHeight,Ya.goldenRatio*Ya.scrollbarWidth),c.barWiggleRoom=c.currentlyVisibleHeight-c.barLength,c.wiggleRoom=Math.max(0,c.totalHeight-c.scrollableAreaHeight),c.topY=c.barWiggleRoom===0?0:u.scrollY/c.wiggleRoom*c.barWiggleRoom,c.bottomY=c.topY+c.barLength,c.dragMultiplier=c.wiggleRoom/c.barWiggleRoom}).attr("transform",function(u){var c=u.width+Ya.scrollbarWidth/2+Ya.scrollbarOffset;return lg(c,T$(u))});var a=i.selectAll("."+Ya.cn.scrollbar).data(Uu.repeat,Uu.keyFun);a.enter().append("g").classed(Ya.cn.scrollbar,!0);var o=a.selectAll("."+Ya.cn.scrollbarSlider).data(Uu.repeat,Uu.keyFun);o.enter().append("g").classed(Ya.cn.scrollbarSlider,!0),o.attr("transform",function(u){return lg(0,u.scrollbarState.topY||0)});var s=o.selectAll("."+Ya.cn.scrollbarGlyph).data(Uu.repeat,Uu.keyFun);s.enter().append("line").classed(Ya.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",Ya.scrollbarWidth).attr("stroke-linecap","round").attr("y1",Ya.scrollbarWidth/2),s.attr("y2",function(u){return u.scrollbarState.barLength-Ya.scrollbarWidth/2}).attr("stroke-opacity",function(u){return u.columnDragInProgress||!u.scrollbarState.barWiggleRoom||r?0:.4}),s.transition().delay(0).duration(0),s.transition().delay(Ya.scrollbarHideDelay).duration(Ya.scrollbarHideDuration).attr("stroke-opacity",0);var l=a.selectAll("."+Ya.cn.scrollbarCaptureZone).data(Uu.repeat,Uu.keyFun);l.enter().append("line").classed(Ya.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",Ya.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(u){var c=tf.event.y,f=this.getBoundingClientRect(),h=u.scrollbarState,d=c-f.top,v=tf.scale.linear().domain([0,h.scrollableAreaHeight]).range([0,h.totalHeight]).clamp(!0);h.topY<=d&&d<=h.bottomY||G7(t,e,null,v(d-h.barLength/2))(u)}).call(tf.behavior.drag().origin(function(u){return tf.event.stopPropagation(),u.scrollbarState.scrollbarScrollInProgress=!0,u}).on("drag",G7(t,e)).on("dragend",function(){})),l.attr("y2",function(u){return u.scrollbarState.scrollableAreaHeight}),t._context.staticPlot&&(s.remove(),l.remove())}function w$(e,t,r,n){var i=gKt(r),a=mKt(i);bKt(a);var o=yKt(a);TKt(o);var s=xKt(a),l=_Kt(s);wKt(l),CZe(l,t,n,e),k$(a)}function gKt(e){var t=e.selectAll("."+Ya.cn.columnCells).data(Uu.repeat,Uu.keyFun);return t.enter().append("g").classed(Ya.cn.columnCells,!0),t.exit().remove(),t}function mKt(e){var t=e.selectAll("."+Ya.cn.columnCell).data(EZe.splitToCells,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Ya.cn.columnCell,!0),t.exit().remove(),t}function yKt(e){var t=e.selectAll("."+Ya.cn.cellRect).data(Uu.repeat,function(r){return r.keyWithinBlock});return t.enter().append("rect").classed(Ya.cn.cellRect,!0),t}function _Kt(e){var t=e.selectAll("."+Ya.cn.cellText).data(Uu.repeat,function(r){return r.keyWithinBlock});return t.enter().append("text").classed(Ya.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){tf.event.stopPropagation()}),t}function xKt(e){var t=e.selectAll("."+Ya.cn.cellTextHolder).data(Uu.repeat,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Ya.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),t}function bKt(e){e.each(function(t,r){var n=t.calcdata.cells.font,i=t.column.specIndex,a={size:Yv(n.size,i,r),color:Yv(n.color,i,r),family:Yv(n.family,i,r),weight:Yv(n.weight,i,r),style:Yv(n.style,i,r),variant:Yv(n.variant,i,r),textcase:Yv(n.textcase,i,r),lineposition:Yv(n.lineposition,i,r),shadow:Yv(n.shadow,i,r)};t.rowNumber=t.key,t.align=Yv(t.calcdata.cells.align,i,r),t.cellBorderWidth=Yv(t.calcdata.cells.line.width,i,r),t.font=a})}function wKt(e){e.each(function(t){b$.font(tf.select(this),t.font)})}function TKt(e){e.attr("width",function(t){return t.column.columnWidth}).attr("stroke-width",function(t){return t.cellBorderWidth}).each(function(t){var r=tf.select(this);bZe.stroke(r,Yv(t.calcdata.cells.line.color,t.column.specIndex,t.rowNumber)),bZe.fill(r,Yv(t.calcdata.cells.fill.color,t.column.specIndex,t.rowNumber))})}function CZe(e,t,r,n){e.text(function(i){var a=i.column.specIndex,o=i.rowNumber,s=i.value,l=typeof s=="string",u=l&&s.match(/
/i),c=!l||u;i.mayHaveMarkup=l&&s.match(/[<&>]/);var f=AKt(s);i.latex=f;var h=f?"":Yv(i.calcdata.cells.prefix,a,o)||"",d=f?"":Yv(i.calcdata.cells.suffix,a,o)||"",v=f?null:Yv(i.calcdata.cells.format,a,o)||null,m=h+(v?fKt(v)(i.value):i.value)+d,b;i.wrappingNeeded=!i.wrapped&&!c&&!f&&(b=AZe(m)),i.cellHeightMayIncrease=u||f||i.mayHaveMarkup||(b===void 0?AZe(m):b),i.needsConvertToTspans=i.mayHaveMarkup||i.wrappingNeeded||i.latex;var p;if(i.wrappingNeeded){var k=Ya.wrapSplitCharacter===" "?m.replace(/i&&n.push(a),i+=l}return n}function E$(e,t,r){var n=kZe(t)[0];if(n!==void 0){var i=n.rowBlocks,a=n.calcdata,o=A$(i,i.length),s=n.calcdata.groupHeight-T$(n),l=a.scrollY=Math.max(0,Math.min(o-s,a.scrollY)),u=EKt(i,l,s);u.length===1&&(u[0]===i.length-1?u.unshift(u[0]-1):u.push(u[0]+1)),u[0]%2&&u.reverse(),t.each(function(c,f){c.page=u[f],c.scrollY=l}),t.attr("transform",function(c){var f=A$(c.rowBlocks,c.page)-c.scrollY;return lg(0,f)}),e&&(MZe(e,r,t,u,n.prevPages,n,0),MZe(e,r,t,u,n.prevPages,n,1),hC(r,e))}}function G7(e,t,r,n){return function(a){var o=a.calcdata?a.calcdata:a,s=t.filter(function(f){return o.key===f.key}),l=r||o.scrollbarState.dragMultiplier,u=o.scrollY;o.scrollY=n===void 0?o.scrollY+l*tf.event.dy:n;var c=s.selectAll("."+Ya.cn.yColumn).selectAll("."+Ya.cn.columnBlock).filter(M$);return E$(e,c,s),o.scrollY===u}}function MZe(e,t,r,n,i,a,o){var s=n[o]!==i[o];s&&(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout(function(){var l=r.filter(function(u,c){return c===o&&n[c]!==i[c]});w$(e,t,l,r),i[o]=n[o]}))}function kKt(e,t,r,n){return function(){var a=tf.select(t.parentNode);a.each(function(o){var s=o.fragments;a.selectAll("tspan.line").each(function(m,b){s[b].width=this.getComputedTextLength()});var l=s[s.length-1].width,u=s.slice(0,-1),c=[],f,h,d=0,v=o.column.columnWidth-2*Ya.cellPad;for(o.value="";u.length;)f=u.shift(),h=f.width+l,d+h>v&&(o.value+=c.join(Ya.wrapSpacer)+Ya.lineBreaker,c=[],d=0),c.push(f.text),d+=h;d&&(o.value+=c.join(Ya.wrapSpacer)),o.wrapped=!0}),a.selectAll("tspan.line").remove(),CZe(a.select("."+Ya.cn.cellText),r,e,n),tf.select(t.parentNode.parentNode).call(k$)}}function CKt(e,t,r,n,i){return function(){if(!i.settledY){var o=tf.select(t.parentNode),s=S$(i),l=i.key-s.firstRowIndex,u=s.rows[l].rowHeight,c=i.cellHeightMayIncrease?t.parentNode.getBoundingClientRect().height+2*Ya.cellPad:u,f=Math.max(c,u),h=f-s.rows[l].rowHeight;h&&(s.rows[l].rowHeight=f,e.selectAll("."+Ya.cn.columnCell).call(k$),E$(null,e.filter(M$),0),hC(r,n,!0)),o.attr("transform",function(){var d=this,v=d.parentNode,m=v.getBoundingClientRect(),b=tf.select(d.parentNode).select("."+Ya.cn.cellRect).node().getBoundingClientRect(),p=d.transform.baseVal.consolidate(),k=b.top-m.top+(p?p.matrix.f:Ya.cellPad);return lg(LZe(i,tf.select(d.parentNode).select("."+Ya.cn.cellTextHolder).node().getBoundingClientRect().width),k)}),i.settledY=!0}}}function LZe(e,t){switch(e.align){case"left":return Ya.cellPad;case"right":return e.column.columnWidth-(t||0)-Ya.cellPad;case"center":return(e.column.columnWidth-(t||0))/2;default:return Ya.cellPad}}function k$(e){e.attr("transform",function(t){var r=t.rowBlocks[0].auxiliaryBlocks.reduce(function(o,s){return o+H7(s,1/0)},0),n=S$(t),i=H7(n,t.key),a=i+r;return lg(0,a)}).selectAll("."+Ya.cn.cellRect).attr("height",function(t){return PKt(S$(t),t.key).rowHeight})}function A$(e,t){for(var r=0,n=t-1;n>=0;n--)r+=LKt(e[n]);return r}function H7(e,t){for(var r=0,n=0;n{"use strict";var IKt=Id().getModuleCalcData,RKt=C$(),j7="table";W7.name=j7;W7.plot=function(e){var t=IKt(e.calcdata,j7)[0];t.length&&RKt(e,t)};W7.clean=function(e,t,r,n){var i=n._has&&n._has(j7),a=t._has&&t._has(j7);i&&!a&&n._paperdiv.selectAll(".table").remove()}});var DZe=ye((H2r,RZe)=>{"use strict";RZe.exports={attributes:d$(),supplyDefaults:sZe(),calc:uZe(),plot:C$(),moduleType:"trace",name:"table",basePlotModule:IZe(),categories:["noOpacity"],meta:{}}});var zZe=ye((j2r,FZe)=>{"use strict";FZe.exports=DZe()});var UZe=ye((W2r,NZe)=>{"use strict";var qZe=ec(),OZe=Ih(),L$=Rd(),DKt=df().descriptionWithDates,FKt=mc().overrideAll,BZe=Pd().dash,P$=Ao().extendFlat;NZe.exports={color:{valType:"color",editType:"calc"},smoothing:{valType:"number",dflt:1,min:0,max:1.3,editType:"calc"},title:{text:{valType:"string",dflt:"",editType:"calc"},font:qZe({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:L$.autotypenumbers,autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"calc"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"calc"},range:{valType:"info_array",editType:"calc",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}]},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},cheatertype:{valType:"enumerated",values:["index","value"],dflt:"value",editType:"calc"},tickmode:{valType:"enumerated",values:["linear","array"],dflt:"array",editType:"calc"},nticks:{valType:"integer",min:0,dflt:0,editType:"calc"},tickvals:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},showticklabels:{valType:"enumerated",values:["start","end","both","none"],dflt:"start",editType:"calc"},labelalias:P$({},L$.labelalias,{editType:"calc"}),tickfont:qZe({editType:"calc"}),tickangle:{valType:"angle",dflt:"auto",editType:"calc"},tickprefix:{valType:"string",dflt:"",editType:"calc"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},ticksuffix:{valType:"string",dflt:"",editType:"calc"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B","SI extended"],dflt:"B",editType:"calc"},minexponent:{valType:"number",dflt:3,min:0,editType:"calc"},separatethousands:{valType:"boolean",dflt:!1,editType:"calc"},tickformat:{valType:"string",dflt:"",editType:"calc",description:DKt("tick label")},tickformatstops:FKt(L$.tickformatstops,"calc","from-root"),categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},labelpadding:{valType:"integer",dflt:10,editType:"calc"},labelprefix:{valType:"string",editType:"calc"},labelsuffix:{valType:"string",dflt:"",editType:"calc"},showline:{valType:"boolean",dflt:!1,editType:"calc"},linecolor:{valType:"color",dflt:OZe.defaultLine,editType:"calc"},linewidth:{valType:"number",min:0,dflt:1,editType:"calc"},gridcolor:{valType:"color",editType:"calc"},gridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},griddash:P$({},BZe,{editType:"calc"}),showgrid:{valType:"boolean",dflt:!0,editType:"calc"},minorgridcount:{valType:"integer",min:0,dflt:0,editType:"calc"},minorgridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},minorgriddash:P$({},BZe,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:OZe.lightLine,editType:"calc"},startline:{valType:"boolean",editType:"calc"},startlinecolor:{valType:"color",editType:"calc"},startlinewidth:{valType:"number",dflt:1,editType:"calc"},endline:{valType:"boolean",editType:"calc"},endlinewidth:{valType:"number",dflt:1,editType:"calc"},endlinecolor:{valType:"color",editType:"calc"},tick0:{valType:"number",min:0,dflt:0,editType:"calc"},dtick:{valType:"number",min:0,dflt:1,editType:"calc"},arraytick0:{valType:"integer",min:0,dflt:0,editType:"calc"},arraydtick:{valType:"integer",min:1,dflt:1,editType:"calc"},editType:"calc"}});var Z7=ye((X2r,HZe)=>{"use strict";var zKt=ec(),VZe=UZe(),GZe=Ih(),X7=zKt({editType:"calc"}),qKt=pf().zorder;X7.family.dflt='"Open Sans", verdana, arial, sans-serif';X7.size.dflt=12;X7.color.dflt=GZe.defaultLine;HZe.exports={carpet:{valType:"string",editType:"calc"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},a:{valType:"data_array",editType:"calc"},a0:{valType:"number",dflt:0,editType:"calc"},da:{valType:"number",dflt:1,editType:"calc"},b:{valType:"data_array",editType:"calc"},b0:{valType:"number",dflt:0,editType:"calc"},db:{valType:"number",dflt:1,editType:"calc"},cheaterslope:{valType:"number",dflt:1,editType:"calc"},aaxis:VZe,baxis:VZe,font:X7,color:{valType:"color",dflt:GZe.defaultLine,editType:"plot"},zorder:qKt}});var XZe=ye((Z2r,WZe)=>{"use strict";var jZe=Pr().isArray1D;WZe.exports=function(t,r,n){var i=n("x"),a=i&&i.length,o=n("y"),s=o&&o.length;if(!a&&!s)return!1;if(r._cheater=!i,(!a||jZe(i))&&(!s||jZe(o))){var l=a?i.length:1/0;s&&(l=Math.min(l,o.length)),r.a&&r.a.length&&(l=Math.min(l,r.a.length)),r.b&&r.b.length&&(l=Math.min(l,r.b.length)),r._length=l}else r._length=null;return!0}});var KZe=ye((Y2r,YZe)=>{"use strict";var OKt=Z7(),ZZe=ka().addOpacity,BKt=Oa(),dC=Pr(),NKt=Lb(),UKt=s_(),VKt=l_(),GKt=cI(),HKt=xm(),jKt=G3();YZe.exports=function(t,r,n){var i=n.letter,a=n.font||{},o=OKt[i+"axis"];function s(g,P){return dC.coerce(t,r,o,g,P)}function l(g,P){return dC.coerce2(t,r,o,g,P)}n.name&&(r._name=n.name,r._id=n.name),s("autotypenumbers",n.autotypenumbersDflt);var u=s("type");if(u==="-"&&(n.data&&WKt(r,n.data),r.type==="-"?r.type="linear":u=t.type=r.type),s("smoothing"),s("cheatertype"),s("showticklabels"),s("labelprefix",i+" = "),s("labelsuffix"),s("showtickprefix"),s("showticksuffix"),s("separatethousands"),s("tickformat"),s("exponentformat"),s("minexponent"),s("showexponent"),s("categoryorder"),s("tickmode"),s("tickvals"),s("ticktext"),s("tick0"),s("dtick"),r.tickmode==="array"&&(s("arraytick0"),s("arraydtick")),s("labelpadding"),r._hovertitle=i,u==="date"){var c=BKt.getComponentMethod("calendars","handleDefaults");c(t,r,"calendar",n.calendar)}HKt(r,n.fullLayout),r.c2p=dC.identity;var f=s("color",n.dfltColor),h=f===t.color?f:a.color,d=s("title.text");d&&(dC.coerceFont(s,"title.font",a,{overrideDflt:{size:dC.bigFont(a.size),color:h}}),s("title.offset")),s("tickangle");var v=s("autorange",!r.isValidRange(t.range));v&&s("rangemode"),s("range"),r.cleanRange(),s("fixedrange"),NKt(t,r,s,u),VKt(t,r,s,u,n),UKt(t,r,s,u,n),GKt(t,r,s,{data:n.data,dataAttr:i});var m=l("gridcolor",ZZe(f,.3)),b=l("gridwidth"),p=l("griddash"),k=s("showgrid");k||(delete r.gridcolor,delete r.gridwidth,delete r.griddash);var M=l("startlinecolor",f),T=l("startlinewidth",b),L=s("startline",r.showgrid||!!M||!!T);L||(delete r.startlinecolor,delete r.startlinewidth);var x=l("endlinecolor",f),C=l("endlinewidth",b),S=s("endline",r.showgrid||!!x||!!C);return S||(delete r.endlinecolor,delete r.endlinewidth),k?(s("minorgridcount"),s("minorgridwidth",b),s("minorgriddash",p),s("minorgridcolor",ZZe(m,.06)),r.minorgridcount||(delete r.minorgridwidth,delete r.minorgriddash,delete r.minorgridcolor)):(delete r.gridcolor,delete r.gridwidth,delete r.griddash),r.showticklabels==="none"&&(delete r.tickfont,delete r.tickangle,delete r.showexponent,delete r.exponentformat,delete r.minexponent,delete r.tickformat,delete r.showticksuffix,delete r.showtickprefix),r.showticksuffix||delete r.ticksuffix,r.showtickprefix||delete r.tickprefix,s("tickmode"),r};function WKt(e,t){if(e.type==="-"){var r=e._id,n=r.charAt(0),i=n+"calendar",a=e[i];e.type=jKt(t,a,{autotypenumbers:e.autotypenumbers})}}});var $Ze=ye((K2r,JZe)=>{"use strict";var XKt=KZe(),ZKt=vl();JZe.exports=function(t,r,n,i,a){var o=i("a");o||(i("da"),i("a0"));var s=i("b");s||(i("db"),i("b0")),YKt(t,r,n,a)};function YKt(e,t,r,n){var i=["aaxis","baxis"];i.forEach(function(a){var o=a.charAt(0),s=e[a]||{},l=ZKt.newContainer(t,a),u={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,tickfont:"x",id:o+"axis",letter:o,font:t.font,name:a,data:e[o],calendar:t.calendar,dfltColor:n,bgColor:r.paper_bgcolor,autotypenumbersDflt:r.autotypenumbers,fullLayout:r};XKt(s,l,u),l._categories=l._categories||[],!e[a]&&s.type!=="-"&&(e[a]={type:s.type})})}});var tYe=ye((J2r,eYe)=>{"use strict";var QZe=Pr(),KKt=XZe(),JKt=$Ze(),$Kt=Z7(),QKt=Ih();eYe.exports=function(t,r,n,i){function a(l,u){return QZe.coerce(t,r,$Kt,l,u)}r._clipPathId="clip"+r.uid+"carpet";var o=a("color",QKt.defaultLine);if(QZe.coerceFont(a,"font",i.font),a("carpet"),JKt(t,r,i,a,o),!r.a||!r.b){r.visible=!1;return}r.a.length<3&&(r.aaxis.smoothing=0),r.b.length<3&&(r.baxis.smoothing=0);var s=KKt(t,r,a);s||(r.visible=!1),r._cheater&&a("cheaterslope"),a("zorder")}});var I$=ye(($2r,rYe)=>{"use strict";var eJt=Pr().isArrayOrTypedArray;rYe.exports=function(t,r,n){var i;for(eJt(t)?t.length>r.length&&(t=t.slice(0,r.length)):t=[],i=0;i{"use strict";iYe.exports=function(t,r,n){if(t.length===0)return"";var i,a=[],o=n?3:1;for(i=0;i{"use strict";nYe.exports=function(t,r,n,i,a,o){var s=a[0]*t.dpdx(r),l=a[1]*t.dpdy(n),u=1,c=1;if(o){var f=Math.sqrt(a[0]*a[0]+a[1]*a[1]),h=Math.sqrt(o[0]*o[0]+o[1]*o[1]),d=(a[0]*o[0]+a[1]*o[1])/f/h;c=Math.max(0,d)}var v=Math.atan2(l,s)*180/Math.PI;return v<-90?(v+=180,u=-u):v>90&&(v-=180,u=-u),{angle:v,flip:u,p:t.c2p(i,r,n),offsetMultplier:c}}});var dYe=ye((twr,hYe)=>{"use strict";var $7=qa(),Y7=So(),K7=I$(),lYe=R$(),vC=aYe(),D$=Zl(),Up=Pr(),uYe=Up.strRotate,J7=Up.strTranslate,cYe=Dh();hYe.exports=function(t,r,n,i){var a=t._context.staticPlot,o=r.xaxis,s=r.yaxis,l=t._fullLayout,u=l._clips;Up.makeTraceGroups(i,n,"trace").each(function(c){var f=$7.select(this),h=c[0],d=h.trace,v=d.aaxis,m=d.baxis,b=Up.ensureSingle(f,"g","minorlayer"),p=Up.ensureSingle(f,"g","majorlayer"),k=Up.ensureSingle(f,"g","boundarylayer"),M=Up.ensureSingle(f,"g","labellayer");f.style("opacity",d.opacity),G5(o,s,p,v,"a",v._gridlines,!0,a),G5(o,s,p,m,"b",m._gridlines,!0,a),G5(o,s,b,v,"a",v._minorgridlines,!0,a),G5(o,s,b,m,"b",m._minorgridlines,!0,a),G5(o,s,k,v,"a-boundary",v._boundarylines,a),G5(o,s,k,m,"b-boundary",m._boundarylines,a);var T=oYe(t,o,s,d,h,M,v._labels,"a-label"),L=oYe(t,o,s,d,h,M,m._labels,"b-label");rJt(t,M,d,h,o,s,T,L),tJt(d,h,u,o,s)})};function tJt(e,t,r,n,i){var a,o,s,l,u=r.select("#"+e._clipPathId);u.size()||(u=r.append("clipPath").classed("carpetclip",!0));var c=Up.ensureSingle(u,"path","carpetboundary"),f=t.clipsegments,h=[];for(l=0;l0?"start":"end","data-notex":1}).call(Y7.font,f.font).text(f.text).call(D$.convertToTspans,e),p=Y7.bBox(this);b.attr("transform",J7(d.p[0],d.p[1])+uYe(d.angle)+J7(f.axis.labelpadding*m,p.height*.3)),u=Math.max(u,p.width+f.axis.labelpadding)}),l.exit().remove(),c.maxExtent=u,c}function rJt(e,t,r,n,i,a,o,s){var l,u,c,f,h=Up.aggNums(Math.min,null,r.a),d=Up.aggNums(Math.max,null,r.a),v=Up.aggNums(Math.min,null,r.b),m=Up.aggNums(Math.max,null,r.b);l=.5*(h+d),u=v,c=r.ab2xy(l,u,!0),f=r.dxyda_rough(l,u),o.angle===void 0&&Up.extendFlat(o,vC(r,i,a,c,r.dxydb_rough(l,u))),sYe(e,t,r,n,c,f,r.aaxis,i,a,o,"a-title"),l=h,u=.5*(v+m),c=r.ab2xy(l,u,!0),f=r.dxydb_rough(l,u),s.angle===void 0&&Up.extendFlat(s,vC(r,i,a,c,r.dxyda_rough(l,u))),sYe(e,t,r,n,c,f,r.baxis,i,a,s,"b-title")}var fYe=cYe.LINE_SPACING,iJt=(1-cYe.MID_SHIFT)/fYe+1;function sYe(e,t,r,n,i,a,o,s,l,u,c){var f=[];o.title.text&&f.push(o.title.text);var h=t.selectAll("text."+c).data(f),d=u.maxExtent;h.enter().append("text").classed(c,!0),h.each(function(){var v=vC(r,s,l,i,a);["start","both"].indexOf(o.showticklabels)===-1&&(d=0);var m=o.title.font.size;d+=m+o.title.offset;var b=u.angle+(u.flip<0?180:0),p=(b-v.angle+450)%360,k=p>90&&p<270,M=$7.select(this);M.text(o.title.text).call(D$.convertToTspans,e),k&&(d=(-D$.lineCount(M)+iJt)*fYe*m-d),M.attr("transform",J7(v.p[0],v.p[1])+uYe(v.angle)+J7(0,d)).attr("text-anchor","middle").call(Y7.font,o.title.font)}),h.exit().remove()}});var pYe=ye((rwr,vYe)=>{"use strict";var Q7=Pr().isArrayOrTypedArray;vYe.exports=function(e,t,r){var n,i,a,o,s,l,u=[],c=Q7(e)?e.length:e,f=Q7(t)?t.length:t,h=Q7(e)?e:null,d=Q7(t)?t:null;h&&(a=(h.length-1)/(h[h.length-1]-h[0])/(c-1)),d&&(o=(d.length-1)/(d[d.length-1]-d[0])/(f-1));var v,m=1/0,b=-1/0;for(i=0;i{"use strict";var gYe=Pr().isArrayOrTypedArray;yYe.exports=function(e){return mYe(e,0)};function mYe(e,t){if(!gYe(e)||t>=10)return null;for(var r=1/0,n=-1/0,i=e.length,a=0;a{"use strict";var nJt=ho(),qx=Ao().extendFlat;xYe.exports=function(t,r,n){var i,a,o,s,l,u,c,f,h,d,v,m,b,p,k=t["_"+r],M=t[r+"axis"],T=M._gridlines=[],L=M._minorgridlines=[],x=M._boundarylines=[],C=t["_"+n],S=t[n+"axis"];M.tickmode==="array"&&(M.tickvals=k.slice());var g=t._xctrl,P=t._yctrl,E=g[0].length,z=g.length,q=t._a.length,U=t._b.length;nJt.prepTicks(M),M.tickmode==="array"&&delete M.tickvals;var G=M.smoothing?3:1;function Z(N){var H,re,oe,_e,ke,Ce,ge,ie,Se,Ee,we,De,Le=[],me=[],Pe={};if(r==="b")for(re=t.b2j(N),oe=Math.floor(Math.max(0,Math.min(U-2,re))),_e=re-oe,Pe.length=U,Pe.crossLength=q,Pe.xy=function(ce){return t.evalxy([],ce,re)},Pe.dxy=function(ce,He){return t.dxydi([],ce,oe,He,_e)},H=0;H0&&(Se=t.dxydi([],H-1,oe,0,_e),Le.push(ke[0]+Se[0]/3),me.push(ke[1]+Se[1]/3),Ee=t.dxydi([],H-1,oe,1,_e),Le.push(ie[0]-Ee[0]/3),me.push(ie[1]-Ee[1]/3)),Le.push(ie[0]),me.push(ie[1]),ke=ie;else for(H=t.a2i(N),Ce=Math.floor(Math.max(0,Math.min(q-2,H))),ge=H-Ce,Pe.length=q,Pe.crossLength=U,Pe.xy=function(ce){return t.evalxy([],H,ce)},Pe.dxy=function(ce,He){return t.dxydj([],Ce,ce,ge,He)},re=0;re0&&(we=t.dxydj([],Ce,re-1,ge,0),Le.push(ke[0]+we[0]/3),me.push(ke[1]+we[1]/3),De=t.dxydj([],Ce,re-1,ge,1),Le.push(ie[0]-De[0]/3),me.push(ie[1]-De[1]/3)),Le.push(ie[0]),me.push(ie[1]),ke=ie;return Pe.axisLetter=r,Pe.axis=M,Pe.crossAxis=S,Pe.value=N,Pe.constvar=n,Pe.index=f,Pe.x=Le,Pe.y=me,Pe.smoothing=S.smoothing,Pe}function j(N){var H,re,oe,_e,ke,Ce=[],ge=[],ie={};if(ie.length=k.length,ie.crossLength=C.length,r==="b")for(oe=Math.max(0,Math.min(U-2,N)),ke=Math.min(1,Math.max(0,N-oe)),ie.xy=function(Se){return t.evalxy([],Se,N)},ie.dxy=function(Se,Ee){return t.dxydi([],Se,oe,Ee,ke)},H=0;Hk.length-1)&&T.push(qx(j(a),{color:M.gridcolor,width:M.gridwidth,dash:M.griddash}));for(f=u;fk.length-1)&&!(v<0||v>k.length-1))for(m=k[o],b=k[v],i=0;ik[k.length-1])&&L.push(qx(Z(d),{color:M.minorgridcolor,width:M.minorgridwidth,dash:M.minorgriddash})));M.startline&&x.push(qx(j(0),{color:M.startlinecolor,width:M.startlinewidth})),M.endline&&x.push(qx(j(k.length-1),{color:M.endlinecolor,width:M.endlinewidth}))}else{for(s=5e-15,l=[Math.floor((k[k.length-1]-M.tick0)/M.dtick*(1+s)),Math.ceil((k[0]-M.tick0)/M.dtick/(1+s))].sort(function(N,H){return N-H}),u=l[0],c=l[1],f=u;f<=c;f++)h=M.tick0+M.dtick*f,T.push(qx(Z(h),{color:M.gridcolor,width:M.gridwidth,dash:M.griddash}));for(f=u-1;fk[k.length-1])&&L.push(qx(Z(d),{color:M.minorgridcolor,width:M.minorgridwidth,dash:M.minorgriddash}));M.startline&&x.push(qx(Z(k[0]),{color:M.startlinecolor,width:M.startlinewidth})),M.endline&&x.push(qx(Z(k[k.length-1]),{color:M.endlinecolor,width:M.endlinewidth}))}}});var SYe=ye((awr,AYe)=>{"use strict";var wYe=ho(),TYe=Ao().extendFlat;AYe.exports=function(t,r){var n,i,a,o,s,l=r._labels=[],u=r._gridlines;for(n=0;n{"use strict";MYe.exports=function(t,r,n,i){var a,o,s,l=[],u=!!n.smoothing,c=!!i.smoothing,f=t[0].length-1,h=t.length-1;for(a=0,o=[],s=[];a<=f;a++)o[a]=t[0][a],s[a]=r[0][a];for(l.push({x:o,y:s,bicubic:u}),a=0,o=[],s=[];a<=h;a++)o[a]=t[a][f],s[a]=r[a][f];for(l.push({x:o,y:s,bicubic:c}),a=f,o=[],s=[];a>=0;a--)o[f-a]=t[h][a],s[f-a]=r[h][a];for(l.push({x:o,y:s,bicubic:u}),a=h,o=[],s=[];a>=0;a--)o[h-a]=t[a][0],s[h-a]=r[a][0];return l.push({x:o,y:s,bicubic:c}),l}});var CYe=ye((swr,kYe)=>{"use strict";var aJt=Pr();kYe.exports=function(t,r,n){var i,a,o,s=[],l=[],u=t[0].length,c=t.length;function f(oe,_e){var ke=0,Ce,ge=0;return oe>0&&(Ce=t[_e][oe-1])!==void 0&&(ge++,ke+=Ce),oe0&&(Ce=t[_e-1][oe])!==void 0&&(ge++,ke+=Ce),_e0&&a0&&iS);return aJt.log("Smoother converged to",g,"after",E,"iterations"),t}});var PYe=ye((lwr,LYe)=>{"use strict";LYe.exports={RELATIVE_CULL_TOLERANCE:1e-6}});var DYe=ye((uwr,RYe)=>{"use strict";var IYe=.5;RYe.exports=function(t,r,n,i){var a=t[0]-r[0],o=t[1]-r[1],s=n[0]-r[0],l=n[1]-r[1],u=Math.pow(a*a+o*o,IYe/2),c=Math.pow(s*s+l*l,IYe/2),f=(c*c*a-u*u*s)*i,h=(c*c*o-u*u*l)*i,d=c*(u+c)*3,v=u*(u+c)*3;return[[r[0]+(d&&f/d),r[1]+(d&&h/d)],[r[0]-(v&&f/v),r[1]-(v&&h/v)]]}});var zYe=ye((cwr,FYe)=>{"use strict";var F$=DYe(),e9=Pr().ensureArray;function H5(e,t,r){var n=-.5*r[0]+1.5*t[0],i=-.5*r[1]+1.5*t[1];return[(2*n+e[0])/3,(2*i+e[1])/3]}FYe.exports=function(t,r,n,i,a,o){var s,l,u,c,f,h,d,v,m,b,p=n[0].length,k=n.length,M=a?3*p-2:p,T=o?3*k-2:k;for(t=e9(t,T),r=e9(r,T),u=0;u{"use strict";qYe.exports=function(e,t,r,n,i){var a=t-2,o=r-2;return n&&i?function(s,l,u){s||(s=[]);var c,f,h,d,v,m,b=Math.max(0,Math.min(Math.floor(l),a)),p=Math.max(0,Math.min(Math.floor(u),o)),k=Math.max(0,Math.min(1,l-b)),M=Math.max(0,Math.min(1,u-p));b*=3,p*=3;var T=k*k,L=T*k,x=1-k,C=x*x,S=C*x,g=M*M,P=g*M,E=1-M,z=E*E,q=z*E;for(m=0;m{"use strict";BYe.exports=function(e,t,r){return t&&r?function(n,i,a,o,s){n||(n=[]);var l,u,c,f,h,d;i*=3,a*=3;var v=o*o,m=1-o,b=m*m,p=m*o*2,k=-3*b,M=3*(b-p),T=3*(p-v),L=3*v,x=s*s,C=x*s,S=1-s,g=S*S,P=g*S;for(d=0;d{"use strict";UYe.exports=function(e,t,r){return t&&r?function(n,i,a,o,s){n||(n=[]);var l,u,c,f,h,d;i*=3,a*=3;var v=o*o,m=v*o,b=1-o,p=b*b,k=p*b,M=s*s,T=1-s,L=T*T,x=T*s*2,C=-3*L,S=3*(L-x),g=3*(x-M),P=3*M;for(d=0;d{"use strict";var GYe=PYe(),HYe=U6().findBin,oJt=zYe(),sJt=OYe(),lJt=NYe(),uJt=VYe();jYe.exports=function(t){var r=t._a,n=t._b,i=r.length,a=n.length,o=t.aaxis,s=t.baxis,l=r[0],u=r[i-1],c=n[0],f=n[a-1],h=r[r.length-1]-r[0],d=n[n.length-1]-n[0],v=h*GYe.RELATIVE_CULL_TOLERANCE,m=d*GYe.RELATIVE_CULL_TOLERANCE;l-=v,u+=v,c-=m,f+=m,t.isVisible=function(b,p){return b>l&&bc&&pu||pf},t.setScale=function(){var b=t._x,p=t._y,k=oJt(t._xctrl,t._yctrl,b,p,o.smoothing,s.smoothing);t._xctrl=k[0],t._yctrl=k[1],t.evalxy=sJt([t._xctrl,t._yctrl],i,a,o.smoothing,s.smoothing),t.dxydi=lJt([t._xctrl,t._yctrl],o.smoothing,s.smoothing),t.dxydj=uJt([t._xctrl,t._yctrl],o.smoothing,s.smoothing)},t.i2a=function(b){var p=Math.max(0,Math.floor(b[0]),i-2),k=b[0]-p;return(1-k)*r[p]+k*r[p+1]},t.j2b=function(b){var p=Math.max(0,Math.floor(b[1]),i-2),k=b[1]-p;return(1-k)*n[p]+k*n[p+1]},t.ij2ab=function(b){return[t.i2a(b[0]),t.j2b(b[1])]},t.a2i=function(b){var p=Math.max(0,Math.min(HYe(b,r),i-2)),k=r[p],M=r[p+1];return Math.max(0,Math.min(i-1,p+(b-k)/(M-k)))},t.b2j=function(b){var p=Math.max(0,Math.min(HYe(b,n),a-2)),k=n[p],M=n[p+1];return Math.max(0,Math.min(a-1,p+(b-k)/(M-k)))},t.ab2ij=function(b){return[t.a2i(b[0]),t.b2j(b[1])]},t.i2c=function(b,p){return t.evalxy([],b,p)},t.ab2xy=function(b,p,k){if(!k&&(br[i-1]|pn[a-1]))return[!1,!1];var M=t.a2i(b),T=t.b2j(p),L=t.evalxy([],M,T);if(k){var x=0,C=0,S=[],g,P,E,z;br[i-1]?(g=i-2,P=1,x=(b-r[i-1])/(r[i-1]-r[i-2])):(g=Math.max(0,Math.min(i-2,Math.floor(M))),P=M-g),pn[a-1]?(E=a-2,z=1,C=(p-n[a-1])/(n[a-1]-n[a-2])):(E=Math.max(0,Math.min(a-2,Math.floor(T))),z=T-E),x&&(t.dxydi(S,g,E,P,z),L[0]+=S[0]*x,L[1]+=S[1]*x),C&&(t.dxydj(S,g,E,P,z),L[0]+=S[0]*C,L[1]+=S[1]*C)}return L},t.c2p=function(b,p,k){return[p.c2p(b[0]),k.c2p(b[1])]},t.p2x=function(b,p,k){return[p.p2c(b[0]),k.p2c(b[1])]},t.dadi=function(b){var p=Math.max(0,Math.min(r.length-2,b));return r[p+1]-r[p]},t.dbdj=function(b){var p=Math.max(0,Math.min(n.length-2,b));return n[p+1]-n[p]},t.dxyda=function(b,p,k,M){var T=t.dxydi(null,b,p,k,M),L=t.dadi(b,k);return[T[0]/L,T[1]/L]},t.dxydb=function(b,p,k,M){var T=t.dxydj(null,b,p,k,M),L=t.dbdj(p,M);return[T[0]/L,T[1]/L]},t.dxyda_rough=function(b,p,k){var M=h*(k||.1),T=t.ab2xy(b+M,p,!0),L=t.ab2xy(b-M,p,!0);return[(T[0]-L[0])*.5/M,(T[1]-L[1])*.5/M]},t.dxydb_rough=function(b,p,k){var M=d*(k||.1),T=t.ab2xy(b,p+M,!0),L=t.ab2xy(b,p-M,!0);return[(T[0]-L[0])*.5/M,(T[1]-L[1])*.5/M]},t.dpdx=function(b){return b._m},t.dpdy=function(b){return b._m}}});var eKe=ye((pwr,QYe)=>{"use strict";var t9=ho(),XYe=Pr().isArray1D,cJt=pYe(),ZYe=_Ye(),YYe=bYe(),KYe=SYe(),fJt=EYe(),JYe=u8(),$Ye=CYe(),hJt=s8(),dJt=WYe();QYe.exports=function(t,r){var n=t9.getFromId(t,r.xaxis),i=t9.getFromId(t,r.yaxis),a=r.aaxis,o=r.baxis,s=r.x,l=r.y,u=[];s&&XYe(s)&&u.push("x"),l&&XYe(l)&&u.push("y"),u.length&&hJt(r,a,o,"a","b",u);var c=r._a=r._a||r.a,f=r._b=r._b||r.b;s=r._x||r.x,l=r._y||r.y;var h={};if(r._cheater){var d=a.cheatertype==="index"?c.length:c,v=o.cheatertype==="index"?f.length:f;s=cJt(d,v,r.cheaterslope)}r._x=s=JYe(s),r._y=l=JYe(l),$Ye(s,c,f),$Ye(l,c,f),dJt(r),r.setScale();var m=ZYe(s),b=ZYe(l),p=.5*(m[1]-m[0]),k=.5*(m[1]+m[0]),M=.5*(b[1]-b[0]),T=.5*(b[1]+b[0]),L=1.3;return m=[k-p*L,k+p*L],b=[T-M*L,T+M*L],r._extremes[n._id]=t9.findExtremes(n,m,{padded:!0}),r._extremes[i._id]=t9.findExtremes(i,b,{padded:!0}),YYe(r,"a","b"),YYe(r,"b","a"),KYe(r,a),KYe(r,o),h.clipsegments=fJt(r._xctrl,r._yctrl,a,o),h.x=s,h.y=l,h.a=c,h.b=f,[h]}});var rKe=ye((gwr,tKe)=>{"use strict";tKe.exports={attributes:Z7(),supplyDefaults:tYe(),plot:dYe(),calc:eKe(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:mh(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}});var nKe=ye((mwr,iKe)=>{"use strict";iKe.exports=rKe()});var z$=ye((ywr,lKe)=>{"use strict";var vJt=Pg(),c0=pf(),pJt=Gl(),{hovertemplateAttrs:gJt,texttemplateAttrs:mJt,templatefallbackAttrs:aKe}=Ll(),oKe=Tu(),Ox=Ao().extendFlat,ug=c0.marker,j5=c0.line,sKe=ug.line;lKe.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:Ox({},c0.mode,{dflt:"markers"}),text:Ox({},c0.text,{}),texttemplate:mJt({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:aKe({editType:"plot"}),hovertext:Ox({},c0.hovertext,{}),line:{color:j5.color,width:j5.width,dash:j5.dash,backoff:j5.backoff,shape:Ox({},j5.shape,{values:["linear","spline"]}),smoothing:j5.smoothing,editType:"calc"},connectgaps:c0.connectgaps,fill:Ox({},c0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:vJt(),marker:Ox({symbol:ug.symbol,opacity:ug.opacity,maxdisplayed:ug.maxdisplayed,angle:ug.angle,angleref:ug.angleref,standoff:ug.standoff,size:ug.size,sizeref:ug.sizeref,sizemin:ug.sizemin,sizemode:ug.sizemode,line:Ox({width:sKe.width,dash:sKe.dash,editType:"calc"},oKe("marker.line")),gradient:ug.gradient,editType:"calc"},oKe("marker")),textfont:c0.textfont,textposition:c0.textposition,selected:c0.selected,unselected:c0.unselected,hoverinfo:Ox({},pJt.hoverinfo,{flags:["a","b","text","name"]}),hoveron:c0.hoveron,hovertemplate:gJt(),hovertemplatefallback:aKe(),zorder:c0.zorder}});var hKe=ye((_wr,fKe)=>{"use strict";var uKe=Pr(),yJt=Lm(),W5=Ru(),_Jt=$p(),xJt=D0(),cKe=lT(),bJt=F0(),wJt=Fg(),TJt=z$();fKe.exports=function(t,r,n,i){function a(h,d){return uKe.coerce(t,r,TJt,h,d)}a("carpet"),r.xaxis="x",r.yaxis="y";var o=a("a"),s=a("b"),l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,a("text"),a("texttemplate"),a("texttemplatefallback"),a("hovertext");var u=l{"use strict";dKe.exports=function(t,r){var n={},i=r._carpet,a=i.ab2ij([t.a,t.b]),o=Math.floor(a[0]),s=a[0]-o,l=Math.floor(a[1]),u=a[1]-l,c=i.evalxy([],o,l,s,u);return n.yLabel=c[1].toFixed(3),n}});var r9=ye((bwr,pKe)=>{"use strict";pKe.exports=function(e,t){for(var r=e._fullData.length,n,i=0;i{"use strict";var gKe=Eo(),AJt=z0(),SJt=Rm(),MJt=q0(),EJt=O0().calcMarkerSize,kJt=r9();mKe.exports=function(t,r){var n=r._carpetTrace=kJt(t,r);if(!(!n||!n.visible||n.visible==="legendonly")){var i;r.xaxis=n.xaxis,r.yaxis=n.yaxis;var a=r._length,o=new Array(a),s,l,u=!1;for(i=0;i{"use strict";var CJt=vT(),_Ke=ho(),LJt=So();xKe.exports=function(t,r,n,i){var a,o,s,l=n[0][0].carpet,u=_Ke.getFromId(t,l.xaxis||"x"),c=_Ke.getFromId(t,l.yaxis||"y"),f={xaxis:u,yaxis:c,plot:r.plot};for(a=0;a{"use strict";var PJt=yT(),IJt=Pr().fillText;wKe.exports=function(t,r,n,i){var a=PJt(t,r,n,i);if(!a||a[0].index===!1)return;var o=a[0];if(o.index===void 0){var s=1-o.y0/t.ya._length,l=t.xa._length,u=l*s/2,c=l-u;return o.x0=Math.max(Math.min(o.x0,c),u),o.x1=Math.max(Math.min(o.x1,c),u),a}var f=o.cd[o.index];o.a=f.a,o.b=f.b,o.xLabelVal=void 0,o.yLabelVal=void 0;var h=o.trace,d=h._carpet,v=h._module.formatLabels(f,h);o.yLabel=v.yLabel,delete o.text;var m=[];function b(M,T){var L;M.labelprefix&&M.labelprefix.length>0?L=M.labelprefix.replace(/ = $/,""):L=M._hovertitle,m.push(L+": "+T.toFixed(3)+M.labelsuffix)}if(!h.hovertemplate){var p=f.hi||h.hoverinfo,k=p.split("+");k.indexOf("all")!==-1&&(k=["a","b","text"]),k.indexOf("a")!==-1&&b(d.aaxis,f.a),k.indexOf("b")!==-1&&b(d.baxis,f.b),m.push("y: "+o.yLabel),k.indexOf("text")!==-1&&IJt(f,h,m),o.extraText=m.join("
")}return a}});var SKe=ye((Swr,AKe)=>{"use strict";AKe.exports=function(t,r,n,i,a){var o=i[a];return t.a=o.a,t.b=o.b,t.y=o.y,t}});var EKe=ye((Mwr,MKe)=>{"use strict";MKe.exports={attributes:z$(),supplyDefaults:hKe(),colorbar:$d(),formatLabels:vKe(),calc:yKe(),plot:bKe(),style:sp().style,styleOnSelect:sp().styleOnSelect,hoverPoints:TKe(),selectPoints:_T(),eventData:SKe(),moduleType:"trace",name:"scattercarpet",basePlotModule:mh(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}});var CKe=ye((Ewr,kKe)=>{"use strict";kKe.exports=EKe()});var q$=ye((kwr,LKe)=>{"use strict";var cg=zT(),T1=q4(),RJt=Tu(),DJt=Ao().extendFlat,ly=T1.contours;LKe.exports=DJt({carpet:{valType:"string",editType:"calc"},z:cg.z,a:cg.x,a0:cg.x0,da:cg.dx,b:cg.y,b0:cg.y0,db:cg.dy,text:cg.text,hovertext:cg.hovertext,transpose:cg.transpose,atype:cg.xtype,btype:cg.ytype,fillcolor:T1.fillcolor,autocontour:T1.autocontour,ncontours:T1.ncontours,contours:{type:ly.type,start:ly.start,end:ly.end,size:ly.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:ly.showlines,showlabels:ly.showlabels,labelfont:ly.labelfont,labelformat:ly.labelformat,operation:ly.operation,value:ly.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:T1.line.color,width:T1.line.width,dash:T1.line.dash,smoothing:T1.line.smoothing,editType:"plot"},zorder:T1.zorder},RJt("",{cLetter:"z",autoColorDflt:!1}))});var O$=ye((Cwr,RKe)=>{"use strict";var PKe=Pr(),FJt=n8(),IKe=q$(),zJt=RG(),qJt=k8(),OJt=C8();RKe.exports=function(t,r,n,i){function a(u,c){return PKe.coerce(t,r,IKe,u,c)}function o(u){return PKe.coerce2(t,r,IKe,u)}if(a("carpet"),t.a&&t.b){var s=FJt(t,r,a,i,"a","b");if(!s){r.visible=!1;return}a("text");var l=a("contours.type")==="constraint";l?zJt(t,r,a,i,n,{hasHover:!1}):(qJt(t,r,a,o),OJt(t,r,a,i,{hasHover:!1}))}else r._defaultColor=n,r._length=null;a("zorder")}});var qKe=ye((Lwr,zKe)=>{"use strict";var BJt=gv(),DKe=Pr(),NJt=s8(),UJt=u8(),VJt=c8(),GJt=f8(),FKe=rG(),HJt=O$(),jJt=r9(),WJt=bG();zKe.exports=function(t,r){var n=r._carpetTrace=jJt(t,r);if(!(!n||!n.visible||n.visible==="legendonly")){if(!r.a||!r.b){var i=t.data[n.index],a=t.data[r.index];a.a||(a.a=i.a),a.b||(a.b=i.b),HJt(a,r,r._defaultColor,t._fullLayout)}var o=XJt(t,r);return WJt(r,r._z),o}};function XJt(e,t){var r=t._carpetTrace,n=r.aaxis,i=r.baxis,a,o,s,l,u,c,f;n._minDtick=0,i._minDtick=0,DKe.isArray1D(t.z)&&NJt(t,n,i,"a","b",["z"]),a=t._a=t._a||t.a,l=t._b=t._b||t.b,a=a?n.makeCalcdata(t,"_a"):[],l=l?i.makeCalcdata(t,"_b"):[],o=t.a0||0,s=t.da||1,u=t.b0||0,c=t.db||1,f=t._z=UJt(t._z||t.z,t.transpose),t._emptypoints=GJt(f),VJt(f,t._emptypoints);var h=DKe.maxRowLength(f),d=t.xtype==="scaled"?"":a,v=FKe(t,d,o,s,h,n),m=t.ytype==="scaled"?"":l,b=FKe(t,m,u,c,f.length,i),p={a:v,b,z:f};return t.contours.type==="levels"&&t.contours.coloring!=="none"&&BJt(e,t,{vals:f,containerStr:"",cLetter:"z"}),[p]}});var BKe=ye((Pwr,OKe)=>{"use strict";var ZJt=Pr().isArrayOrTypedArray;OKe.exports=function(e,t,r,n){var i,a,o,s,l,u,c,f,h,d,v,m,b,p=ZJt(r)?"a":"b",k=p==="a"?e.aaxis:e.baxis,M=k.smoothing,T=p==="a"?e.a2i:e.b2j,L=p==="a"?r:n,x=p==="a"?n:r,C=p==="a"?t.a.length:t.b.length,S=p==="a"?t.b.length:t.a.length,g=Math.floor(p==="a"?e.b2j(x):e.a2i(x)),P=p==="a"?function(_e){return e.evalxy([],_e,g)}:function(_e){return e.evalxy([],g,_e)};M&&(o=Math.max(0,Math.min(S-2,g)),s=g-o,a=p==="a"?function(_e,ke){return e.dxydi([],_e,o,ke,s)}:function(_e,ke){return e.dxydj([],o,_e,s,ke)});var E=T(L[0]),z=T(L[1]),q=E0?Math.floor:Math.ceil,Z=q>0?Math.ceil:Math.floor,j=q>0?Math.min:Math.max,N=q>0?Math.max:Math.min,H=G(E+U),re=Z(z-U);c=P(E);var oe=[[c]];for(i=H;i*q{"use strict";var n9=qa(),a9=I$(),HKe=R$(),pC=So(),A1=Pr(),YJt=TG(),KJt=AG(),Aw=I8(),i9=B4(),JJt=kG(),$Jt=EG(),QJt=CG(),e$t=r9(),NKe=BKe();jKe.exports=function(t,r,n,i){var a=r.xaxis,o=r.yaxis;A1.makeTraceGroups(i,n,"contour").each(function(s){var l=n9.select(this),u=s[0],c=u.trace,f=c._carpetTrace=e$t(t,c),h=t.calcdata[f.index][0];if(!f.visible||f.visible==="legendonly")return;var d=u.a,v=u.b,m=c.contours,b=$Jt(m,r,u),p=m.type==="constraint",k=m._operation,M=p?k==="="?"lines":"fill":m.coloring;function T(G){var Z=f.ab2xy(G[0],G[1],!0);return[a.c2p(Z[0]),o.c2p(Z[1])]}var L=[[d[0],v[v.length-1]],[d[d.length-1],v[v.length-1]],[d[d.length-1],v[0]],[d[0],v[0]]];YJt(b);var x=(d[d.length-1]-d[0])*1e-8,C=(v[v.length-1]-v[0])*1e-8;KJt(b,x,C);var S=b;m.type==="constraint"&&(S=JJt(b,k)),t$t(b,T);var g,P,E,z,q=[];for(z=h.clipsegments.length-1;z>=0;z--)g=h.clipsegments[z],P=a9([],g.x,a.c2p),E=a9([],g.y,o.c2p),P.reverse(),E.reverse(),q.push(HKe(P,E,g.bicubic));var U="M"+q.join("L")+"Z";n$t(l,h.clipsegments,a,o,p,M),a$t(c,l,a,o,S,L,T,f,h,M,U),r$t(l,b,t,u,m,r,f),pC.setClipUrl(l,f._clipPathId,t)})};function t$t(e,t){var r,n,i,a,o,s,l,u,c;for(r=0;rb&&(n.max=b),n.len=n.max-n.min}function UKe(e,t,r){var n=e.getPointAtLength(t),i=e.getPointAtLength(r),a=i.x-n.x,o=i.y-n.y,s=Math.sqrt(a*a+o*o);return[a/s,o/s]}function VKe(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]);return[e[0]/t,e[1]/t]}function GKe(e,t){var r=Math.abs(e[0]*t[0]+e[1]*t[1]),n=Math.sqrt(1-r*r);return n/r}function n$t(e,t,r,n,i,a){var o,s,l,u,c=A1.ensureSingle(e,"g","contourbg"),f=c.selectAll("path").data(a==="fill"&&!i?[0]:[]);f.enter().append("path"),f.exit().remove();var h=[];for(u=0;u=0&&(d=P,m=b):Math.abs(h[1]-d[1])=0&&(d=P,m=b):A1.log("endpt to newendpt is not vert. or horz.",h,d,P)}if(m>=0)break;u+=S(h,d),h=d}if(m===t.edgepaths.length){A1.log("unclosed perimeter path");break}l=m,f=c.indexOf(l)===-1,f&&(l=c[0],u+=S(h,d)+"Z",h=null)}for(l=0;l{"use strict";XKe.exports={attributes:q$(),supplyDefaults:O$(),colorbar:F8(),calc:qKe(),plot:WKe(),style:D8(),moduleType:"trace",name:"contourcarpet",basePlotModule:mh(),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}});var KKe=ye((Dwr,YKe)=>{"use strict";YKe.exports=ZKe()});var s9=ye((Fwr,tJe)=>{"use strict";var o9=Pr().extendFlat,gC=pf(),JKe=df().axisHoverFormat,{hovertemplateAttrs:s$t,templatefallbackAttrs:l$t}=Ll(),QKe=Pd().dash,u$t=p3(),eJe=$T(),c$t=eJe.INCREASING.COLOR,f$t=eJe.DECREASING.COLOR,B$=gC.line;function $Ke(e){return{line:{color:o9({},B$.color,{dflt:e}),width:B$.width,dash:QKe,editType:"style"},editType:"style"}}tJe.exports={xperiod:gC.xperiod,xperiod0:gC.xperiod0,xperiodalignment:gC.xperiodalignment,xhoverformat:JKe("x"),yhoverformat:JKe("y"),x:{valType:"data_array",editType:"calc+clearAxisTypes"},open:{valType:"data_array",editType:"calc"},high:{valType:"data_array",editType:"calc"},low:{valType:"data_array",editType:"calc"},close:{valType:"data_array",editType:"calc"},line:{width:o9({},B$.width,{}),dash:o9({},QKe,{}),editType:"style"},increasing:$Ke(c$t),decreasing:$Ke(f$t),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:s$t({},{keys:["open","high","low","close"]}),hovertemplatefallback:l$t(),tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:o9({},u$t.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:gC.zorder}});var N$=ye((zwr,rJe)=>{"use strict";var h$t=Oa(),d$t=Pr();rJe.exports=function(t,r,n,i){var a=n("x"),o=n("open"),s=n("high"),l=n("low"),u=n("close");n("hoverlabel.split");var c=h$t.getComponentMethod("calendars","handleTraceDefaults");if(c(t,r,["x"],i),!!(o&&s&&l&&u)){var f=Math.min(o.length,s.length,l.length,u.length);return a&&(f=Math.min(f,d$t.minRowLength(a))),r._length=f,f}}});var aJe=ye((qwr,nJe)=>{"use strict";var v$t=Pr(),p$t=N$(),g$t=Dg(),m$t=s9();nJe.exports=function(t,r,n,i){function a(s,l){return v$t.coerce(t,r,m$t,s,l)}var o=p$t(t,r,a,i);if(!o){r.visible=!1;return}g$t(t,r,i,a,{x:!0}),a("xhoverformat"),a("yhoverformat"),a("line.width"),a("line.dash"),iJe(t,r,a,"increasing"),iJe(t,r,a,"decreasing"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("tickwidth"),i._requestRangeslider[r.xaxis]=!0,a("zorder")};function iJe(e,t,r,n){r(n+".line.color"),r(n+".line.width",t.line.width),r(n+".line.dash",t.line.dash)}});var U$=ye((Owr,sJe)=>{"use strict";var X5=Pr(),l9=X5._,u9=ho(),y$t=zg(),mC=fs().BADNUM;function _$t(e,t){var r=u9.getFromId(e,t.xaxis),n=u9.getFromId(e,t.yaxis),i=b$t(e,r,t),a=t._minDiff;t._minDiff=null;var o=t._origX;t._origX=null;var s=t._xcalc;t._xcalc=null;var l=oJe(e,t,o,s,n,x$t);return t._extremes[r._id]=u9.findExtremes(r,s,{vpad:a/2}),l.length?(X5.extendFlat(l[0].t,{wHover:a/2,tickLen:i}),l):[{t:{empty:!0}}]}function x$t(e,t,r,n){return{o:e,h:t,l:r,c:n}}function oJe(e,t,r,n,i,a){for(var o=i.makeCalcdata(t,"open"),s=i.makeCalcdata(t,"high"),l=i.makeCalcdata(t,"low"),u=i.makeCalcdata(t,"close"),c=X5.isArrayOrTypedArray(t.text),f=X5.isArrayOrTypedArray(t.hovertext),h=!0,d=null,v=!!t.xperiodalignment,m=[],b=0;bd):h=L>k,d=L;var x=a(k,M,T,L);x.pos=p,x.yc=(k+L)/2,x.i=b,x.dir=h?"increasing":"decreasing",x.x=x.pos,x.y=[T,M],v&&(x.orig_p=r[b]),c&&(x.tx=t.text[b]),f&&(x.htx=t.hovertext[b]),m.push(x)}else m.push({pos:p,empty:!0})}return t._extremes[i._id]=u9.findExtremes(i,X5.concat(l,s),{padded:!0}),m.length&&(m[0].t={labels:{open:l9(e,"open:")+" ",high:l9(e,"high:")+" ",low:l9(e,"low:")+" ",close:l9(e,"close:")+" "}}),m}function b$t(e,t,r){var n=r._minDiff;if(!n){var i=e._fullData,a=[];n=1/0;var o;for(o=0;o{"use strict";var w$t=qa(),lJe=Pr();uJe.exports=function(t,r,n,i){var a=r.yaxis,o=r.xaxis,s=!!o.rangebreaks;lJe.makeTraceGroups(i,n,"trace ohlc").each(function(l){var u=w$t.select(this),c=l[0],f=c.t,h=c.trace;if(h.visible!==!0||f.empty){u.remove();return}var d=f.tickLen,v=u.selectAll("path").data(lJe.identity);v.enter().append("path"),v.exit().remove(),v.attr("d",function(m){if(m.empty)return"M0,0Z";var b=o.c2p(m.pos-d,!0),p=o.c2p(m.pos+d,!0),k=s?(b+p)/2:o.c2p(m.pos,!0),M=a.c2p(m.o,!0),T=a.c2p(m.h,!0),L=a.c2p(m.l,!0),x=a.c2p(m.c,!0);return"M"+b+","+M+"H"+k+"M"+k+","+T+"V"+L+"M"+p+","+x+"H"+k})})}});var hJe=ye((Nwr,fJe)=>{"use strict";var V$=qa(),T$t=So(),A$t=ka();fJe.exports=function(t,r,n){var i=n||V$.select(t).selectAll("g.ohlclayer").selectAll("g.trace");i.style("opacity",function(a){return a[0].trace.opacity}),i.each(function(a){var o=a[0].trace;V$.select(this).selectAll("path").each(function(s){if(!s.empty){var l=o[s.dir].line;V$.select(this).style("fill","none").call(A$t.stroke,l.color).call(T$t.dashLine,l.dash,l.width).style("opacity",o.selectedpoints&&!s.selected?.3:1)}})})}});var H$=ye((Uwr,mJe)=>{"use strict";var G$=ho(),S$t=Pr(),c9=vf(),M$t=ka(),E$t=Pr().fillText,dJe=$T(),k$t={increasing:dJe.INCREASING.SYMBOL,decreasing:dJe.DECREASING.SYMBOL};function C$t(e,t,r,n){var i=e.cd,a=i[0].trace;return a.hoverlabel.split?pJe(e,t,r,n):gJe(e,t,r,n)}function vJe(e,t,r,n){var i=e.cd,a=e.xa,o=i[0].trace,s=i[0].t,l=o.type,u=l==="ohlc"?"l":"min",c=l==="ohlc"?"h":"max",f,h,d=s.bPos||0,v=function(P){return P.pos+d-t},m=s.bdPos||s.tickLen,b=s.wHover,p=Math.min(1,m/Math.abs(a.r2c(a.range[1])-a.r2c(a.range[0])));f=e.maxHoverDistance-p,h=e.maxSpikeDistance-p;function k(P){var E=v(P);return c9.inbox(E-b,E+b,f)}function M(P){var E=P[u],z=P[c];return E===z||c9.inbox(E-r,z-r,f)}function T(P){return(k(P)+M(P))/2}var L=c9.getDistanceFunction(n,k,M,T);if(c9.getClosest(i,L,e),e.index===!1)return null;var x=i[e.index];if(x.empty)return null;var C=x.dir,S=o[C],g=S.line.color;return M$t.opacity(g)&&S.line.width?e.color=g:e.color=S.fillcolor,e.x0=a.c2p(x.pos+d-m,!0),e.x1=a.c2p(x.pos+d+m,!0),e.xLabelVal=x.orig_p!==void 0?x.orig_p:x.pos,e.spikeDistance=T(x)*h/f,e.xSpike=a.c2p(x.pos,!0),e}function pJe(e,t,r,n){var i=e.cd,a=e.ya,o=i[0].trace,s=i[0].t,l=[],u=vJe(e,t,r,n);if(!u)return[];var c=i[u.index],f=c.hi||o.hoverinfo||"";if(f==="none"||f==="skip")return[];for(var h=["high","open","close","low"],d={},v=0;v"+s.labels[m]+G$.hoverLabelText(a,b,o.yhoverformat)):(k=S$t.extendFlat({},u),k.y0=k.y1=p,k.yLabelVal=b,k.yLabel=s.labels[m]+G$.hoverLabelText(a,b,o.yhoverformat),k.name="",l.push(k),d[b]=k)}return l}function gJe(e,t,r,n){var i=e.cd,a=e.ya,o=i[0].trace,s=i[0].t,l=vJe(e,t,r,n);if(!l)return[];var u=l.index,c=i[u],f=l.index=c.i,h=c.dir;function d(T){return s.labels[T]+G$.hoverLabelText(a,o[T][f],o.yhoverformat)}var v=c.hi||o.hoverinfo||"",m=v.split("+"),b=v==="all",p=b||m.indexOf("y")!==-1,k=b||m.indexOf("text")!==-1,M=p?[d("open"),d("high"),d("low"),d("close")+" "+k$t[h]]:[];return k&&E$t(c,o,M),l.extraText=M.join("
"),l.y0=l.y1=a.c2p(c.yc,!0),[l]}mJe.exports={hoverPoints:C$t,hoverSplit:pJe,hoverOnPoints:gJe}});var j$=ye((Vwr,yJe)=>{"use strict";yJe.exports=function(t,r){var n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s,l=n[0].t.bPos||0;if(r===!1)for(s=0;s{"use strict";_Je.exports={moduleType:"trace",name:"ohlc",basePlotModule:mh(),categories:["cartesian","svg","showLegend"],meta:{},attributes:s9(),supplyDefaults:aJe(),calc:U$().calc,plot:cJe(),style:hJe(),hoverPoints:H$().hoverPoints,selectPoints:j$()}});var wJe=ye((Hwr,bJe)=>{"use strict";bJe.exports=xJe()});var X$=ye((jwr,SJe)=>{"use strict";var W$=Pr().extendFlat,TJe=df().axisHoverFormat,vp=s9(),Z5=k4();function AJe(e){return{line:{color:W$({},Z5.line.color,{dflt:e}),width:Z5.line.width,editType:"style"},fillcolor:Z5.fillcolor,editType:"style"}}SJe.exports={xperiod:vp.xperiod,xperiod0:vp.xperiod0,xperiodalignment:vp.xperiodalignment,xhoverformat:TJe("x"),yhoverformat:TJe("y"),x:vp.x,open:vp.open,high:vp.high,low:vp.low,close:vp.close,line:{width:W$({},Z5.line.width,{}),editType:"style"},increasing:AJe(vp.increasing.line.color.dflt),decreasing:AJe(vp.decreasing.line.color.dflt),text:vp.text,hovertext:vp.hovertext,hovertemplate:vp.hovertemplate,hovertemplatefallback:vp.hovertemplatefallback,whiskerwidth:W$({},Z5.whiskerwidth,{dflt:0}),hoverlabel:vp.hoverlabel,zorder:Z5.zorder}});var kJe=ye((Wwr,EJe)=>{"use strict";var L$t=Pr(),P$t=ka(),I$t=N$(),R$t=Dg(),D$t=X$();EJe.exports=function(t,r,n,i){function a(s,l){return L$t.coerce(t,r,D$t,s,l)}var o=I$t(t,r,a,i);if(!o){r.visible=!1;return}R$t(t,r,i,a,{x:!0}),a("xhoverformat"),a("yhoverformat"),a("line.width"),MJe(t,r,a,"increasing"),MJe(t,r,a,"decreasing"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("whiskerwidth"),i._requestRangeslider[r.xaxis]=!0,a("zorder")};function MJe(e,t,r,n){var i=r(n+".line.color");r(n+".line.width",t.line.width),r(n+".fillcolor",P$t.addOpacity(i,.5))}});var IJe=ye((Xwr,PJe)=>{"use strict";var CJe=Pr(),LJe=ho(),F$t=zg(),z$t=U$().calcCommon;PJe.exports=function(e,t){var r=e._fullLayout,n=LJe.getFromId(e,t.xaxis),i=LJe.getFromId(e,t.yaxis),a=n.makeCalcdata(t,"x"),o=F$t(t,n,"x",a).vals,s=z$t(e,t,a,o,i,q$t);return s.length?(CJe.extendFlat(s[0].t,{num:r._numBoxes,dPos:CJe.distinctVals(o).minDiff/2,posLetter:"x",valLetter:"y"}),r._numBoxes++,s):[{t:{empty:!0}}]};function q$t(e,t,r,n){return{min:r,q1:Math.min(e,n),med:n,q3:Math.max(e,n),max:t}}});var DJe=ye((Zwr,RJe)=>{"use strict";RJe.exports={moduleType:"trace",name:"candlestick",basePlotModule:mh(),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:X$(),layoutAttributes:C4(),supplyLayoutDefaults:$I().supplyLayoutDefaults,crossTraceCalc:e8().crossTraceCalc,supplyDefaults:kJe(),calc:IJe(),plot:t8().plot,layerName:"boxlayer",style:r8().style,hoverPoints:H$().hoverPoints,selectPoints:j$()}});var zJe=ye((Ywr,FJe)=>{"use strict";FJe.exports=DJe()});var Y$=ye((Kwr,qJe)=>{"use strict";var h9=Pr(),O$t=xm(),f9=h9.deg2rad,Z$=h9.rad2deg;qJe.exports=function(t,r,n){switch(O$t(t,n),t._id){case"x":case"radialaxis":B$t(t,r);break;case"angularaxis":V$t(t,r);break}};function B$t(e,t){var r=t._subplot;e.setGeometry=function(){var n=e._rl[0],i=e._rl[1],a=r.innerRadius,o=(r.radius-a)/(i-n),s=a/o,l=n>i?function(u){return u<=0}:function(u){return u>=0};e.c2g=function(u){var c=e.c2l(u)-n;return(l(c)?c:0)+s},e.g2c=function(u){return e.l2c(u+n-s)},e.g2p=function(u){return u*o},e.c2p=function(u){return e.g2p(e.c2g(u))}}}function N$t(e,t){return t==="degrees"?f9(e):e}function U$t(e,t){return t==="degrees"?Z$(e):e}function V$t(e,t){var r=e.type;if(r==="linear"){var n=e.d2c,i=e.c2d;e.d2c=function(a,o){return N$t(n(a),o)},e.c2d=function(a,o){return i(U$t(a,o))}}e.makeCalcdata=function(a,o){var s=a[o],l=a._length,u,c,f=function(b){return e.d2c(b,a.thetaunit)};if(s)for(u=new Array(l),c=0;c{"use strict";OJe.exports={attr:"subplot",name:"polar",axisNames:["angularaxis","radialaxis"],axisName2dataArray:{angularaxis:"theta",radialaxis:"r"},layerNames:["draglayer","plotbg","backplot","angular-grid","radial-grid","frontplot","angular-line","radial-line","angular-axis","radial-axis"],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG:8,MINZOOM:20,OFFEDGE:20}});var p9=ye(($wr,GJe)=>{"use strict";var Sw=Pr(),BJe=FM().tester,K$=Sw.findIndexOfMin,UJe=Sw.isAngleInsideSector,G$t=Sw.angleDelta,NJe=Sw.angleDist;function H$t(e,t,r,n,i){if(!UJe(t,n))return!1;var a,o;r[0]0?o:1/0},n=K$(t,r),i=Sw.mod(n+1,t.length);return[t[n],t[i]]}function v9(e){return Math.abs(e)>1e-10?e:0}function J$(e,t,r){t=t||0,r=r||0;for(var n=e.length,i=new Array(n),a=0;a{"use strict";function HJe(e){return e<0?-1:e>0?1:0}function K5(e){var t=e[0],r=e[1];if(!isFinite(t)||!isFinite(r))return[1,0];var n=(t+1)*(t+1)+r*r;return[(t*t+r*r-1)/n,2*r/n]}function J5(e,t){var r=t[0],n=t[1];return[r*e.radius+e.cx,-n*e.radius+e.cy]}function jJe(e,t){return t*e.radius}function $$t(e,t,r,n){var i=J5(e,K5([r,t])),a=i[0],o=i[1],s=J5(e,K5([n,t])),l=s[0],u=s[1];if(t===0)return["M"+a+","+o,"L"+l+","+u].join(" ");var c=jJe(e,1/Math.abs(t));return["M"+a+","+o,"A"+c+","+c+" 0 0,"+(t<0?1:0)+" "+l+","+u].join(" ")}function Q$t(e,t,r,n){var i=jJe(e,1/(t+1)),a=J5(e,K5([t,r])),o=a[0],s=a[1],l=J5(e,K5([t,n])),u=l[0],c=l[1];if(HJe(r)!==HJe(n)){var f=J5(e,K5([t,0])),h=f[0],d=f[1];return["M"+o+","+s,"A"+i+","+i+" 0 0,"+(0{"use strict";var Mw=qa(),eQt=fd(),kw=Oa(),Xc=Pr(),uy=Xc.strRotate,xd=Xc.strTranslate,Q$=ka(),yC=So(),tQt=Mc(),pp=ho(),rQt=xm(),iQt=Y$(),nQt=Mg().doAutoRange,S1=jN(),y9=yv(),XJe=vf(),aQt=zb(),oQt=qf().prepSelect,sQt=qf().selectOnClick,eQ=qf().clearOutline,ZJe=Eg(),YJe=bM(),KJe=CM().redrawReglTraces,lQt=Dh().MID_SHIFT,Bx=d9(),M1=p9(),_9=$$(),g9=_9.smith,uQt=_9.reactanceArc,cQt=_9.resistanceArc,m9=_9.smithTransform,fQt=Xc._,JJe=Xc.mod,Nx=Xc.deg2rad,Ew=Xc.rad2deg;function $Je(e,t,r){this.isSmith=r||!1,this.id=t,this.gd=e,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var n=e._fullLayout,i="clip"+n._uid+t;this.clipIds.forTraces=i+"-for-traces",this.clipPaths.forTraces=n._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=n["_"+(r?"smith":"polar")+"layer"].append("g").attr("class",t),this.getHole=function(a){return this.isSmith?0:a.hole},this.getSector=function(a){return this.isSmith?[0,360]:a.sector},this.getRadial=function(a){return this.isSmith?a.realaxis:a.radialaxis},this.getAngular=function(a){return this.isSmith?a.imaginaryaxis:a.angularaxis},r||(this.radialTickLayout=null,this.angularTickLayout=null)}var Bd=$Je.prototype;t$e.exports=function(t,r,n){return new $Je(t,r,n)};Bd.plot=function(e,t){for(var r=this,n=t[r.id],i=!1,a=0;ab?(p=u,k=u*b,L=(c-k)/i.h/2,M=[s[0],s[1]],T=[l[0]+L,l[1]-L]):(p=c/b,k=c,L=(u-p)/i.w/2,M=[s[0]+L,s[1]-L],T=[l[0],l[1]]),r.xLength2=p,r.yLength2=k,r.xDomain2=M,r.yDomain2=T;var x=r.xOffset2=i.l+i.w*M[0],C=r.yOffset2=i.t+i.h*(1-T[1]),S=r.radius=p/d,g=r.innerRadius=r.getHole(t)*S,P=r.cx=x-S*h[0],E=r.cy=C+S*h[3],z=r.cxx=P-x,q=r.cyy=E-C,U=a.side,G;U==="counterclockwise"?(G=U,U="top"):U==="clockwise"&&(G=U,U="bottom"),r.radialAxis=r.mockAxis(e,t,a,{_id:"x",side:U,_trueSide:G,domain:[g/i.w,S/i.w]}),r.angularAxis=r.mockAxis(e,t,o,{side:"right",domain:[0,Math.PI],autorange:!1}),r.doAutoRange(e,t),r.updateAngularAxis(e,t),r.updateRadialAxis(e,t),r.updateRadialAxisTitle(e,t),r.xaxis=r.mockCartesianAxis(e,t,{_id:"x",domain:M}),r.yaxis=r.mockCartesianAxis(e,t,{_id:"y",domain:T});var Z=r.pathSubplot();r.clipPaths.forTraces.select("path").attr("d",Z).attr("transform",xd(z,q)),n.frontplot.attr("transform",xd(x,C)).call(yC.setClipUrl,r._hasClipOnAxisFalse?null:r.clipIds.forTraces,r.gd),n.bg.attr("d",Z).attr("transform",xd(P,E)).call(Q$.fill,t.bgcolor)};Bd.mockAxis=function(e,t,r,n){var i=Xc.extendFlat({},r,n);return iQt(i,t,e),i};Bd.mockCartesianAxis=function(e,t,r){var n=this,i=n.isSmith,a=r._id,o=Xc.extendFlat({type:"linear"},r);rQt(o,e);var s={x:[0,2],y:[1,3]};return o.setRange=function(){var l=n.sectorBBox,u=s[a],c=n.radialAxis._rl,f=(c[1]-c[0])/(1-n.getHole(t));o.range=[l[u[0]]*f,l[u[1]]*f]},o.isPtWithinRange=a==="x"&&!i?function(l){return n.isPtInside(l)}:function(){return!0},o.setRange(),o.setScale(),o};Bd.doAutoRange=function(e,t){var r=this,n=r.gd,i=r.radialAxis,a=r.getRadial(t);nQt(n,i);var o=i.range;if(a.range=o.slice(),a._input.range=o.slice(),i._rl=[i.r2l(o[0],null,"gregorian"),i.r2l(o[1],null,"gregorian")],i.minallowed!==void 0){var s=i.r2l(i.minallowed);i._rl[0]>i._rl[1]?i._rl[1]=Math.max(i._rl[1],s):i._rl[0]=Math.max(i._rl[0],s)}if(i.maxallowed!==void 0){var l=i.r2l(i.maxallowed);i._rl[0]90&&c<=270&&(f.tickangle=180);var v=d?function(S){var g=m9(r,g9([S.x,0]));return xd(g[0]-s,g[1]-l)}:function(S){return xd(f.l2p(S.x)+o,0)},m=d?function(S){return cQt(r,S.x,-1/0,1/0)}:function(S){return r.pathArc(f.r2p(S.x)+o)},b=QJe(u);if(r.radialTickLayout!==b&&(i["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=b),h){f.setScale();var p=0,k=d?(f.tickvals||[]).filter(function(S){return S>=0}).map(function(S){return pp.tickText(f,S,!0,!1)}):pp.calcTicks(f),M=d?k:pp.clipEnds(f,k),T=pp.getTickSigns(f)[2];d&&((f.ticks==="top"&&f.side==="bottom"||f.ticks==="bottom"&&f.side==="top")&&(T=-T),f.ticks==="top"&&f.side==="top"&&(p=-f.ticklen),f.ticks==="bottom"&&f.side==="bottom"&&(p=f.ticklen)),pp.drawTicks(n,f,{vals:k,layer:i["radial-axis"],path:pp.makeTickPath(f,0,T),transFn:v,crisp:!1}),pp.drawGrid(n,f,{vals:M,layer:i["radial-grid"],path:m,transFn:Xc.noop,crisp:!1}),pp.drawLabels(n,f,{vals:k,layer:i["radial-axis"],transFn:v,labelFns:pp.makeLabelFns(f,p)})}var L=r.radialAxisAngle=r.vangles?Ew(e$e(Nx(u.angle),r.vangles)):u.angle,x=xd(s,l),C=x+uy(-L);_C(i["radial-axis"],h&&(u.showticklabels||u.ticks),{transform:C}),_C(i["radial-grid"],h&&u.showgrid,{transform:d?"":x}),_C(i["radial-line"].select("line"),h&&u.showline,{x1:d?-a:o,y1:0,x2:a,y2:0,transform:C}).attr("stroke-width",u.linewidth).call(Q$.stroke,u.linecolor)};Bd.updateRadialAxisTitle=function(e,t,r){if(!this.isSmith){var n=this,i=n.gd,a=n.radius,o=n.cx,s=n.cy,l=n.getRadial(t),u=n.id+"title",c=0;if(l.title){var f=yC.bBox(n.layers["radial-axis"].node()).height,h=l.title.font.size,d=l.side;c=d==="top"?h:d==="counterclockwise"?-(f+h*.4):f+h*.8}var v=r!==void 0?r:n.radialAxisAngle,m=Nx(v),b=Math.cos(m),p=Math.sin(m),k=o+a/2*b+c*p,M=s-a/2*p+c*b;n.layers["radial-axis-title"]=aQt.draw(i,u,{propContainer:l,propName:n.id+".radialaxis.title.text",placeholder:fQt(i,"Click to enter radial axis title"),attributes:{x:k,y:M,"text-anchor":"middle"},transform:{rotate:-v}})}};Bd.updateAngularAxis=function(e,t){var r=this,n=r.gd,i=r.layers,a=r.radius,o=r.innerRadius,s=r.cx,l=r.cy,u=r.getAngular(t),c=r.angularAxis,f=r.isSmith;f||(r.fillViewInitialKey("angularaxis.rotation",u.rotation),c.setGeometry(),c.setScale());var h=f?function(g){var P=m9(r,g9([0,g.x]));return Math.atan2(P[0]-s,P[1]-l)-Math.PI/2}:function(g){return c.t2g(g.x)};c.type==="linear"&&c.thetaunit==="radians"&&(c.tick0=Ew(c.tick0),c.dtick=Ew(c.dtick));var d=function(g){return xd(s+a*Math.cos(g),l-a*Math.sin(g))},v=f?function(g){var P=m9(r,g9([0,g.x]));return xd(P[0],P[1])}:function(g){return d(h(g))},m=f?function(g){var P=m9(r,g9([0,g.x])),E=Math.atan2(P[0]-s,P[1]-l)-Math.PI/2;return xd(P[0],P[1])+uy(-Ew(E))}:function(g){var P=h(g);return d(P)+uy(-Ew(P))},b=f?function(g){return uQt(r,g.x,0,1/0)}:function(g){var P=h(g),E=Math.cos(P),z=Math.sin(P);return"M"+[s+o*E,l-o*z]+"L"+[s+a*E,l-a*z]},p=pp.makeLabelFns(c,0),k=p.labelStandoff,M={};M.xFn=function(g){var P=h(g);return Math.cos(P)*k},M.yFn=function(g){var P=h(g),E=Math.sin(P)>0?.2:1;return-Math.sin(P)*(k+g.fontSize*E)+Math.abs(Math.cos(P))*(g.fontSize*lQt)},M.anchorFn=function(g){var P=h(g),E=Math.cos(P);return Math.abs(E)<.1?"middle":E>0?"start":"end"},M.heightFn=function(g,P,E){var z=h(g);return-.5*(1+Math.sin(z))*E};var T=QJe(u);r.angularTickLayout!==T&&(i["angular-axis"].selectAll("."+c._id+"tick").remove(),r.angularTickLayout=T);var L=f?[1/0].concat(c.tickvals||[]).map(function(g){return pp.tickText(c,g,!0,!1)}):pp.calcTicks(c);f&&(L[0].text="\u221E",L[0].fontSize*=1.75);var x;if(t.gridshape==="linear"?(x=L.map(h),Xc.angleDelta(x[0],x[1])<0&&(x=x.slice().reverse())):x=null,r.vangles=x,c.type==="category"&&(L=L.filter(function(g){return Xc.isAngleInsideSector(h(g),r.sectorInRad)})),c.visible){var C=c.ticks==="inside"?-1:1,S=(c.linewidth||1)/2;pp.drawTicks(n,c,{vals:L,layer:i["angular-axis"],path:"M"+C*S+",0h"+C*c.ticklen,transFn:m,crisp:!1}),pp.drawGrid(n,c,{vals:L,layer:i["angular-grid"],path:b,transFn:Xc.noop,crisp:!1}),pp.drawLabels(n,c,{vals:L,layer:i["angular-axis"],repositionOnUpdate:!0,transFn:v,labelFns:M})}_C(i["angular-line"].select("path"),u.showline,{d:r.pathSubplot(),transform:xd(s,l)}).attr("stroke-width",u.linewidth).call(Q$.stroke,u.linecolor)};Bd.updateFx=function(e,t){if(!this.gd._context.staticPlot){var r=!this.isSmith;r&&(this.updateAngularDrag(e),this.updateRadialDrag(e,t,0),this.updateRadialDrag(e,t,1)),this.updateHoverAndMainDrag(e)}};Bd.updateHoverAndMainDrag=function(e){var t=this,r=t.isSmith,n=t.gd,i=t.layers,a=e._zoomlayer,o=Bx.MINZOOM,s=Bx.OFFEDGE,l=t.radius,u=t.innerRadius,c=t.cx,f=t.cy,h=t.cxx,d=t.cyy,v=t.sectorInRad,m=t.vangles,b=t.radialAxis,p=M1.clampTiny,k=M1.findXYatLength,M=M1.findEnclosingVertexAngles,T=Bx.cornerHalfWidth,L=Bx.cornerLen/2,x,C,S=S1.makeDragger(i,"path","maindrag",e.dragmode===!1?"none":"crosshair");Mw.select(S).attr("d",t.pathSubplot()).attr("transform",xd(c,f)),S.onmousemove=function(ce){XJe.hover(n,ce,t.id),n._fullLayout._lasthover=S,n._fullLayout._hoversubplot=t.id},S.onmouseout=function(ce){n._dragging||y9.unhover(n,ce)};var g={element:S,gd:n,subplot:t.id,plotinfo:{id:t.id,xaxis:t.xaxis,yaxis:t.yaxis},xaxes:[t.xaxis],yaxes:[t.yaxis]},P,E,z,q,U,G,Z,j,N;function H(ce,He){return Math.sqrt(ce*ce+He*He)}function re(ce,He){return H(ce-h,He-d)}function oe(ce,He){return Math.atan2(d-He,ce-h)}function _e(ce,He){return[ce*Math.cos(He),ce*Math.sin(-He)]}function ke(ce,He){if(ce===0)return t.pathSector(2*T);var lt=L/ce,mt=He-lt,Vt=He+lt,st=Math.max(0,Math.min(ce,l)),ct=st-T,Qt=st+T;return"M"+_e(ct,mt)+"A"+[ct,ct]+" 0,0,0 "+_e(ct,Vt)+"L"+_e(Qt,Vt)+"A"+[Qt,Qt]+" 0,0,1 "+_e(Qt,mt)+"Z"}function Ce(ce,He,lt){if(ce===0)return t.pathSector(2*T);var mt=_e(ce,He),Vt=_e(ce,lt),st=p((mt[0]+Vt[0])/2),ct=p((mt[1]+Vt[1])/2),Qt,Ht;if(st&&ct){var nr=ct/st,tt=-1/nr,je=k(T,nr,st,ct);Qt=k(L,tt,je[0][0],je[0][1]),Ht=k(L,tt,je[1][0],je[1][1])}else{var Ue,Ae;ct?(Ue=L,Ae=T):(Ue=T,Ae=L),Qt=[[st-Ue,ct-Ae],[st+Ue,ct-Ae]],Ht=[[st-Ue,ct+Ae],[st+Ue,ct+Ae]]}return"M"+Qt.join("L")+"L"+Ht.reverse().join("L")+"Z"}function ge(){z=null,q=null,U=t.pathSubplot(),G=!1;var ce=n._fullLayout[t.id];Z=eQt(ce.bgcolor).getLuminance(),j=S1.makeZoombox(a,Z,c,f,U),j.attr("fill-rule","evenodd"),N=S1.makeCorners(a,c,f),eQ(n)}function ie(ce,He){return He=Math.max(Math.min(He,l),u),ceo?(ce-1&&ce===1&&sQt(He,n,[t.xaxis],[t.yaxis],t.id,g),lt.indexOf("event")>-1&&XJe.click(n,He,t.id)}g.prepFn=function(ce,He,lt){var mt=n._fullLayout.dragmode,Vt=S.getBoundingClientRect();n._fullLayout._calcInverseTransform(n);var st=n._fullLayout._invTransform;x=n._fullLayout._invScaleX,C=n._fullLayout._invScaleY;var ct=Xc.apply3DTransform(st)(He-Vt.left,lt-Vt.top);if(P=ct[0],E=ct[1],m){var Qt=M1.findPolygonOffset(l,v[0],v[1],m);P+=h+Qt[0],E+=d+Qt[1]}switch(mt){case"zoom":g.clickFn=Pe,r||(m?g.moveFn=De:g.moveFn=Ee,g.doneFn=Le,ge(ce,He,lt));break;case"select":case"lasso":oQt(ce,He,lt,g,mt);break}},y9.init(g)};Bd.updateRadialDrag=function(e,t,r){var n=this,i=n.gd,a=n.layers,o=n.radius,s=n.innerRadius,l=n.cx,u=n.cy,c=n.radialAxis,f=Bx.radialDragBoxSize,h=f/2;if(!c.visible)return;var d=Nx(n.radialAxisAngle),v=c._rl,m=v[0],b=v[1],p=v[r],k=.75*(v[1]-v[0])/(1-n.getHole(t))/o,M,T,L;r?(M=l+(o+h)*Math.cos(d),T=u-(o+h)*Math.sin(d),L="radialdrag"):(M=l+(s-h)*Math.cos(d),T=u-(s-h)*Math.sin(d),L="radialdrag-inner");var x=S1.makeRectDragger(a,L,"crosshair",-h,-h,f,f),C={element:x,gd:i};e.dragmode===!1&&(C.dragmode=!1),_C(Mw.select(x),c.visible&&s0!=(r?P>m:P=90||i>90&&a>=450?d=1:s<=0&&u<=0?d=0:d=Math.max(s,u),i<=180&&a>=180||i>180&&a>=540?c=-1:o>=0&&l>=0?c=0:c=Math.min(o,l),i<=270&&a>=270||i>270&&a>=630?f=-1:s>=0&&u>=0?f=0:f=Math.min(s,u),a>=360?h=1:o<=0&&l<=0?h=0:h=Math.max(o,l),[c,f,h,d]}function e$e(e,t){var r=function(i){return Xc.angleDist(e,i)},n=Xc.findIndexOfMin(t,r);return t[n]}function _C(e,t,r){return t?(e.attr("display",null),e.attr(r)):e&&e.attr("display","none"),e}});var rQ=ye((t3r,s$e)=>{"use strict";var dQt=Ih(),os=Rd(),vQt=Cc().attributes,f0=Pr().extendFlat,r$e=mc().overrideAll,i$e=r$e({color:os.color,showline:f0({},os.showline,{dflt:!0}),linecolor:os.linecolor,linewidth:os.linewidth,showgrid:f0({},os.showgrid,{dflt:!0}),gridcolor:os.gridcolor,gridwidth:os.gridwidth,griddash:os.griddash},"plot","from-root"),n$e=r$e({tickmode:os.minor.tickmode,nticks:os.nticks,tick0:os.tick0,dtick:os.dtick,tickvals:os.tickvals,ticktext:os.ticktext,ticks:os.ticks,ticklen:os.ticklen,tickwidth:os.tickwidth,tickcolor:os.tickcolor,ticklabelstep:os.ticklabelstep,showticklabels:os.showticklabels,labelalias:os.labelalias,minorloglabels:os.minorloglabels,showtickprefix:os.showtickprefix,tickprefix:os.tickprefix,showticksuffix:os.showticksuffix,ticksuffix:os.ticksuffix,showexponent:os.showexponent,exponentformat:os.exponentformat,minexponent:os.minexponent,separatethousands:os.separatethousands,tickfont:os.tickfont,tickangle:os.tickangle,tickformat:os.tickformat,tickformatstops:os.tickformatstops,layer:os.layer},"plot","from-root"),a$e={visible:f0({},os.visible,{dflt:!0}),type:f0({},os.type,{values:["-","linear","log","date","category"]}),autotypenumbers:os.autotypenumbers,autorangeoptions:{minallowed:os.autorangeoptions.minallowed,maxallowed:os.autorangeoptions.maxallowed,clipmin:os.autorangeoptions.clipmin,clipmax:os.autorangeoptions.clipmax,include:os.autorangeoptions.include,editType:"plot"},autorange:f0({},os.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:f0({},os.minallowed,{editType:"plot"}),maxallowed:f0({},os.maxallowed,{editType:"plot"}),range:f0({},os.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:os.categoryorder,categoryarray:os.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:os.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:f0({},os.title.text,{editType:"plot",dflt:""}),font:f0({},os.title.font,{editType:"plot"}),editType:"plot"},hoverformat:os.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};f0(a$e,i$e,n$e);var o$e={visible:f0({},os.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:os.autotypenumbers,categoryorder:os.categoryorder,categoryarray:os.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc"},period:{valType:"number",editType:"calc",min:0},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",editType:"calc"},hoverformat:os.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};f0(o$e,i$e,n$e);s$e.exports={domain:vQt({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],editType:"plot"},hole:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},bgcolor:{valType:"color",editType:"plot",dflt:dQt.background},radialaxis:a$e,angularaxis:o$e,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}});var f$e=ye((r3r,c$e)=>{"use strict";var x9=Pr(),pQt=ka(),gQt=vl(),mQt=q_(),yQt=Id().getSubplotData,_Qt=Lb(),xQt=z3(),bQt=s_(),wQt=l_(),TQt=cI(),AQt=u4(),SQt=TB(),MQt=G3(),u$e=rQ(),EQt=Y$(),b9=d9(),l$e=b9.axisNames;function kQt(e,t,r,n){var i=r("bgcolor");n.bgColor=pQt.combine(i,n.paper_bgcolor);var a=r("sector");r("hole");var o=yQt(n.fullData,b9.name,n.id),s=n.layoutOut,l;function u(j,N){return r(l+"."+j,N)}for(var c=0;c{"use strict";var LQt=Id().getSubplotCalcData,PQt=Pr().counterRegex,IQt=tQ(),d$e=d9(),v$e=d$e.attr,Cw=d$e.name,h$e=PQt(Cw),p$e={};p$e[v$e]={valType:"subplotid",dflt:Cw,editType:"calc"};function RQt(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[Cw],i=0;i{"use strict";var{hovertemplateAttrs:FQt,texttemplateAttrs:zQt,templatefallbackAttrs:m$e}=Ll(),T9=Ao().extendFlat,qQt=Pg(),h0=pf(),OQt=Gl(),$5=h0.line;y$e.exports={mode:h0.mode,r:{valType:"data_array",editType:"calc+clearAxisTypes"},theta:{valType:"data_array",editType:"calc+clearAxisTypes"},r0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dr:{valType:"number",dflt:1,editType:"calc"},theta0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dtheta:{valType:"number",editType:"calc"},thetaunit:{valType:"enumerated",values:["radians","degrees","gradians"],dflt:"degrees",editType:"calc+clearAxisTypes"},text:h0.text,texttemplate:zQt({editType:"plot"},{keys:["r","theta","text"]}),texttemplatefallback:m$e({editType:"plot"}),hovertext:h0.hovertext,line:{color:$5.color,width:$5.width,dash:$5.dash,backoff:$5.backoff,shape:T9({},$5.shape,{values:["linear","spline"]}),smoothing:$5.smoothing,editType:"calc"},connectgaps:h0.connectgaps,marker:h0.marker,cliponaxis:T9({},h0.cliponaxis,{dflt:!1}),textposition:h0.textposition,textfont:h0.textfont,fill:T9({},h0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:qQt(),hoverinfo:T9({},OQt.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:h0.hoveron,hovertemplate:FQt(),hovertemplatefallback:m$e(),selected:h0.selected,unselected:h0.unselected}});var S9=ye((a3r,b$e)=>{"use strict";var A9=Pr(),Q5=Ru(),BQt=$p(),NQt=D0(),_$e=lT(),UQt=F0(),VQt=Fg(),GQt=Lm().PTS_LINESONLY,HQt=xC();function jQt(e,t,r,n){function i(s,l){return A9.coerce(e,t,HQt,s,l)}var a=x$e(e,t,n,i);if(!a){t.visible=!1;return}i("thetaunit"),i("mode",a{"use strict";var WQt=Pr(),w$e=ho();T$e.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot,o,s;a?(o=a.radialAxis,s=a.angularAxis):(a=n[r.subplot],o=a.radialaxis,s=a.angularaxis);var l=o.c2l(t.r);i.rLabel=w$e.tickText(o,l,!0).text;var u=s.thetaunit==="degrees"?WQt.rad2deg(t.theta):t.theta;return i.thetaLabel=w$e.tickText(s,u,!0).text,i}});var M$e=ye((s3r,S$e)=>{"use strict";var A$e=Eo(),XQt=fs().BADNUM,ZQt=ho(),YQt=z0(),KQt=Rm(),JQt=q0(),$Qt=O0().calcMarkerSize;S$e.exports=function(t,r){for(var n=t._fullLayout,i=r.subplot,a=n[i].radialaxis,o=n[i].angularaxis,s=a.makeCalcdata(r,"r"),l=o.makeCalcdata(r,"theta"),u=r._length,c=new Array(u),f=0;f{"use strict";var QQt=vT(),E$e=fs().BADNUM;k$e.exports=function(t,r,n){for(var i=r.layers.frontplot.select("g.scatterlayer"),a=r.xaxis,o=r.yaxis,s={xaxis:a,yaxis:o,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},l=r.radialAxis,u=r.angularAxis,c=0;c{"use strict";var eer=yT();function ter(e,t,r,n){var i=eer(e,t,r,n);if(!(!i||i[0].index===!1)){var a=i[0];if(a.index===void 0)return i;var o=e.subplot,s=a.cd[a.index],l=a.trace;if(o.isPtInside(s))return a.xLabelVal=void 0,a.yLabelVal=void 0,L$e(s,l,o,a),a.hovertemplate=l.hovertemplate,i}}function L$e(e,t,r,n){var i=r.radialAxis,a=r.angularAxis;i._hovertitle="r",a._hovertitle="\u03B8";var o={};o[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,o);n.rLabel=s.rLabel,n.thetaLabel=s.thetaLabel;var l=e.hi||t.hoverinfo,u=[];function c(h,d){u.push(h._hovertitle+": "+d)}if(!t.hovertemplate){var f=l.split("+");f.indexOf("all")!==-1&&(f=["r","theta","text"]),f.indexOf("r")!==-1&&c(i,n.rLabel),f.indexOf("theta")!==-1&&c(a,n.thetaLabel),f.indexOf("text")!==-1&&n.text&&(u.push(n.text),delete n.text),n.extraText=u.join("
")}}P$e.exports={hoverPoints:ter,makeHoverPointText:L$e}});var R$e=ye((c3r,I$e)=>{"use strict";I$e.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:w9(),categories:["polar","symbols","showLegend","scatter-like"],attributes:xC(),supplyDefaults:S9().supplyDefaults,colorbar:$d(),formatLabels:M9(),calc:M$e(),plot:C$e(),style:sp().style,styleOnSelect:sp().styleOnSelect,hoverPoints:E9().hoverPoints,selectPoints:_T(),meta:{}}});var F$e=ye((f3r,D$e)=>{"use strict";D$e.exports=R$e()});var iQ=ye((v3r,q$e)=>{"use strict";var z$e=xC(),{cliponaxis:h3r,hoveron:d3r}=z$e,rer=gee(z$e,["cliponaxis","hoveron"]),{connectgaps:ier,line:{color:ner,dash:aer,width:oer},fill:ser,fillcolor:ler,marker:uer,textfont:cer,textposition:fer}=gk();q$e.exports=j1(_g({},rer),{connectgaps:ier,fill:ser,fillcolor:ler,line:{color:ner,dash:aer,editType:"calc",width:oer},marker:uer,textfont:cer,textposition:fer})});var N$e=ye((g3r,B$e)=>{"use strict";var O$e=Pr(),nQ=Ru(),her=S9().handleRThetaDefaults,der=$p(),ver=D0(),per=F0(),ger=Fg(),mer=Lm().PTS_LINESONLY,yer=iQ();B$e.exports=function(t,r,n,i){function a(s,l){return O$e.coerce(t,r,yer,s,l)}var o=her(t,r,i,a);if(!o){r.visible=!1;return}a("thetaunit"),a("mode",o{"use strict";var _er=M9();U$e.exports=function(t,r,n){var i=t.i;return"r"in t||(t.r=r._r[i]),"theta"in t||(t.theta=r._theta[i]),_er(t,r,n)}});var H$e=ye((y3r,G$e)=>{"use strict";var xer=z0(),ber=O0().calcMarkerSize,wer=sw(),Ter=ho(),Aer=px().TOO_MANY_POINTS;G$e.exports=function(t,r){var n=t._fullLayout,i=r.subplot,a=n[i].radialaxis,o=n[i].angularaxis,s=r._r=a.makeCalcdata(r,"r"),l=r._theta=o.makeCalcdata(r,"theta"),u=r._length,c={};u{"use strict";var Ser=jF(),Mer=E9().makeHoverPointText;function Eer(e,t,r,n){var i=e.cd,a=i[0].t,o=a.r,s=a.theta,l=Ser.hoverPoints(e,t,r,n);if(!(!l||l[0].index===!1)){var u=l[0];if(u.index===void 0)return l;var c=e.subplot,f=u.cd[u.index],h=u.trace;if(f.r=o[u.index],f.theta=s[u.index],!!c.isPtInside(f))return u.xLabelVal=void 0,u.yLabelVal=void 0,Mer(f,h,c,u),l}}j$e.exports={hoverPoints:Eer}});var Z$e=ye((x3r,X$e)=>{"use strict";X$e.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:w9(),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:iQ(),supplyDefaults:N$e(),colorbar:$d(),formatLabels:V$e(),calc:H$e(),hoverPoints:W$e().hoverPoints,selectPoints:gY(),meta:{}}});var Y$e=ye((b3r,aQ)=>{"use strict";var ker=ZF(),Cer=Eo(),Ler=xK(),Per=dY(),k9=sw(),C9=Pr(),Ier=px().TOO_MANY_POINTS,Rer={};aQ.exports=function(t,r,n){if(n.length){var i=r.radialAxis,a=r.angularAxis,o=Per(t,r);return n.forEach(function(s){if(!(!s||!s[0]||!s[0].trace)){var l=s[0],u=l.trace,c=l.t,f=u._length,h=c.r,d=c.theta,v=c.opts,m,b=h.slice(),p=d.slice();for(m=0;m=Ier&&(v.marker.cluster=c.tree),v.marker&&(v.markerSel.positions=v.markerUnsel.positions=v.marker.positions=k),v.line&&k.length>1&&C9.extendFlat(v.line,k9.linePositions(t,u,k)),v.text&&(C9.extendFlat(v.text,{positions:k},k9.textPosition(t,u,v.text,v.marker)),C9.extendFlat(v.textSel,{positions:k},k9.textPosition(t,u,v.text,v.markerSel)),C9.extendFlat(v.textUnsel,{positions:k},k9.textPosition(t,u,v.text,v.markerUnsel))),v.fill&&!o.fill2d&&(o.fill2d=!0),v.marker&&!o.scatter2d&&(o.scatter2d=!0),v.line&&!o.line2d&&(o.line2d=!0),v.text&&!o.glText&&(o.glText=!0),o.lineOptions.push(v.line),o.fillOptions.push(v.fill),o.markerOptions.push(v.marker),o.markerSelectedOptions.push(v.markerSel),o.markerUnselectedOptions.push(v.markerUnsel),o.textOptions.push(v.text),o.textSelectedOptions.push(v.textSel),o.textUnselectedOptions.push(v.textUnsel),o.selectBatch.push([]),o.unselectBatch.push([]),c.x=M,c.y=T,c.rawx=M,c.rawy=T,c.r=h,c.theta=d,c.positions=k,c._scene=o,c.index=o.count,o.count++}}),Ler(t,r,n)}};aQ.exports.reglPrecompiled=Rer});var $$e=ye((w3r,J$e)=>{"use strict";var K$e=Z$e();K$e.plot=Y$e();J$e.exports=K$e});var eQe=ye((T3r,Q$e)=>{"use strict";Q$e.exports=$$e()});var oQ=ye((A3r,tQe)=>{"use strict";var{hovertemplateAttrs:Der,templatefallbackAttrs:Fer}=Ll(),eS=Ao().extendFlat,Ux=xC(),Vx=zm();tQe.exports={r:Ux.r,theta:Ux.theta,r0:Ux.r0,dr:Ux.dr,theta0:Ux.theta0,dtheta:Ux.dtheta,thetaunit:Ux.thetaunit,base:eS({},Vx.base,{}),offset:eS({},Vx.offset,{}),width:eS({},Vx.width,{}),text:eS({},Vx.text,{}),hovertext:eS({},Vx.hovertext,{}),marker:zer(),hoverinfo:Ux.hoverinfo,hovertemplate:Der(),hovertemplatefallback:Fer(),selected:Vx.selected,unselected:Vx.unselected};function zer(){var e=eS({},Vx.marker);return delete e.cornerradius,e}});var sQ=ye((S3r,rQe)=>{"use strict";rQe.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}});var aQe=ye((M3r,nQe)=>{"use strict";var iQe=Pr(),qer=S9().handleRThetaDefaults,Oer=WI(),Ber=oQ();nQe.exports=function(t,r,n,i){function a(s,l){return iQe.coerce(t,r,Ber,s,l)}var o=qer(t,r,i,a);if(!o){r.visible=!1;return}a("thetaunit"),a("base"),a("offset"),a("width"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),Oer(t,r,a,n,i),iQe.coerceSelectionMarkerOpacity(r,a)}});var sQe=ye((E3r,oQe)=>{"use strict";var Ner=Pr(),Uer=sQ();oQe.exports=function(e,t,r){var n={},i;function a(l,u){return Ner.coerce(e[i]||{},t[i],Uer,l,u)}for(var o=0;o{"use strict";var lQe=pv().hasColorscale,uQe=gv(),Ver=Pr().isArrayOrTypedArray,Ger=A4(),Her=t2().setGroupPositions,jer=q0(),Wer=Oa().traceIs,Xer=Pr().extendFlat;function Zer(e,t){for(var r=e._fullLayout,n=t.subplot,i=r[n].radialaxis,a=r[n].angularaxis,o=i.makeCalcdata(t,"r"),s=a.makeCalcdata(t,"theta"),l=t._length,u=new Array(l),c=o,f=s,h=0;h{"use strict";var fQe=qa(),L9=Eo(),tS=Pr(),Ker=So(),uQ=p9();hQe.exports=function(t,r,n){var i=t._context.staticPlot,a=r.xaxis,o=r.yaxis,s=r.radialAxis,l=r.angularAxis,u=Jer(r),c=r.layers.frontplot.select("g.barlayer");tS.makeTraceGroups(c,n,"trace bars").each(function(){var f=fQe.select(this),h=tS.ensureSingle(f,"g","points"),d=h.selectAll("g.point").data(tS.identity);d.enter().append("g").style("vector-effect",i?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),d.exit().remove(),d.each(function(v){var m=fQe.select(this),b=v.rp0=s.c2p(v.s0),p=v.rp1=s.c2p(v.s1),k=v.thetag0=l.c2g(v.p0),M=v.thetag1=l.c2g(v.p1),T;if(!L9(b)||!L9(p)||!L9(k)||!L9(M)||b===p||k===M)T="M0,0Z";else{var L=s.c2g(v.s1),x=(k+M)/2;v.ct=[a.c2p(L*Math.cos(x)),o.c2p(L*Math.sin(x))],T=u(b,p,k,M)}tS.ensureSingle(m,"path").attr("d",T)}),Ker.setClipUrl(f,r._hasClipOnAxisFalse?r.clipIds.forTraces:null,t)})};function Jer(e){var t=e.cxx,r=e.cyy;return e.vangles?function(n,i,a,o){var s,l;tS.angleDelta(a,o)>0?(s=a,l=o):(s=o,l=a);var u=uQ.findEnclosingVertexAngles(s,e.vangles)[0],c=uQ.findEnclosingVertexAngles(l,e.vangles)[1],f=[u,(s+l)/2,c];return uQ.pathPolygonAnnulus(n,i,s,l,f,t,r)}:function(n,i,a,o){return tS.pathAnnulus(n,i,a,o,t,r)}}});var pQe=ye((L3r,vQe)=>{"use strict";var $er=vf(),cQ=Pr(),Qer=IT().getTraceColor,etr=cQ.fillText,ttr=E9().makeHoverPointText,rtr=p9().isPtInsidePolygon;vQe.exports=function(t,r,n){var i=t.cd,a=i[0].trace,o=t.subplot,s=o.radialAxis,l=o.angularAxis,u=o.vangles,c=u?rtr:cQ.isPtInsideSector,f=t.maxHoverDistance,h=l._period||2*Math.PI,d=Math.abs(s.g2p(Math.sqrt(r*r+n*n))),v=Math.atan2(n,r);s.range[0]>s.range[1]&&(v+=Math.PI);var m=function(M){return c(d,v,[M.rp0,M.rp1],[M.thetag0,M.thetag1],u)?f+Math.min(1,Math.abs(M.thetag1-M.thetag0)/h)-1+(M.rp1-d)/(M.rp1-M.rp0)-1:1/0};if($er.getClosest(i,m,t),t.index!==!1){var b=t.index,p=i[b];t.x0=t.x1=p.ct[0],t.y0=t.y1=p.ct[1];var k=cQ.extendFlat({},p,{r:p.s,theta:p.p});return etr(p,a,t),ttr(k,a,o,t),t.hovertemplate=a.hovertemplate,t.color=Qer(a,p),t.xLabelVal=t.yLabelVal=void 0,p.s<0&&(t.idealAlign="left"),[t]}}});var mQe=ye((P3r,gQe)=>{"use strict";gQe.exports={moduleType:"trace",name:"barpolar",basePlotModule:w9(),categories:["polar","bar","showLegend"],attributes:oQ(),layoutAttributes:sQ(),supplyDefaults:aQe(),supplyLayoutDefaults:sQe(),calc:lQ().calc,crossTraceCalc:lQ().crossTraceCalc,plot:dQe(),colorbar:$d(),formatLabels:M9(),style:V0().style,styleOnSelect:V0().styleOnSelect,hoverPoints:pQe(),selectPoints:RT(),meta:{}}});var _Qe=ye((I3r,yQe)=>{"use strict";yQe.exports=mQe()});var fQ=ye((R3r,xQe)=>{"use strict";xQe.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}});var hQ=ye((D3r,AQe)=>{"use strict";var itr=Ih(),Uf=Rd(),ntr=Cc().attributes,Gx=Pr().extendFlat,bQe=mc().overrideAll,wQe=bQe({color:Uf.color,showline:Gx({},Uf.showline,{dflt:!0}),linecolor:Uf.linecolor,linewidth:Uf.linewidth,showgrid:Gx({},Uf.showgrid,{dflt:!0}),gridcolor:Uf.gridcolor,gridwidth:Uf.gridwidth,griddash:Uf.griddash},"plot","from-root"),TQe=bQe({ticklen:Uf.ticklen,tickwidth:Gx({},Uf.tickwidth,{dflt:2}),tickcolor:Uf.tickcolor,showticklabels:Uf.showticklabels,labelalias:Uf.labelalias,showtickprefix:Uf.showtickprefix,tickprefix:Uf.tickprefix,showticksuffix:Uf.showticksuffix,ticksuffix:Uf.ticksuffix,tickfont:Uf.tickfont,tickformat:Uf.tickformat,hoverformat:Uf.hoverformat,layer:Uf.layer},"plot","from-root"),atr=Gx({visible:Gx({},Uf.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:Gx({},Uf.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},wQe,TQe),otr=Gx({visible:Gx({},Uf.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:Uf.ticks,editType:"calc"},wQe,TQe);AQe.exports={domain:ntr({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:itr.background},realaxis:atr,imaginaryaxis:otr,editType:"calc"}});var EQe=ye((F3r,MQe)=>{"use strict";var rS=Pr(),str=ka(),ltr=vl(),utr=q_(),ctr=Id().getSubplotData,ftr=l_(),htr=s_(),dtr=u4(),vtr=xm(),iS=hQ(),dQ=fQ(),SQe=dQ.axisNames,ptr=mtr(function(e){return rS.isTypedArray(e)&&(e=Array.from(e)),e.slice().reverse().map(function(t){return-t}).concat([0]).concat(e)},String);function gtr(e,t,r,n){var i=r("bgcolor");n.bgColor=str.combine(i,n.paper_bgcolor);var a=ctr(n.fullData,dQ.name,n.id),o=n.layoutOut,s;function l(L,x){return r(s+"."+L,x)}for(var u=0;u{"use strict";var ytr=Id().getSubplotCalcData,_tr=Pr().counterRegex,xtr=tQ(),CQe=fQ(),LQe=CQe.attr,Lw=CQe.name,kQe=_tr(Lw),PQe={};PQe[LQe]={valType:"subplotid",dflt:Lw,editType:"calc"};function btr(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[Lw],i=0;i{"use strict";var{hovertemplateAttrs:Ttr,texttemplateAttrs:Atr,templatefallbackAttrs:DQe}=Ll(),P9=Ao().extendFlat,Str=Pg(),d0=pf(),Mtr=Gl(),nS=d0.line;FQe.exports={mode:d0.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:d0.text,texttemplate:Atr({editType:"plot"},{keys:["real","imag","text"]}),texttemplatefallback:DQe({editType:"plot"}),hovertext:d0.hovertext,line:{color:nS.color,width:nS.width,dash:nS.dash,backoff:nS.backoff,shape:P9({},nS.shape,{values:["linear","spline"]}),smoothing:nS.smoothing,editType:"calc"},connectgaps:d0.connectgaps,marker:d0.marker,cliponaxis:P9({},d0.cliponaxis,{dflt:!1}),textposition:d0.textposition,textfont:d0.textfont,fill:P9({},d0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:Str(),hoverinfo:P9({},Mtr.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:d0.hoveron,hovertemplate:Ttr(),hovertemplatefallback:DQe(),selected:d0.selected,unselected:d0.unselected}});var OQe=ye((O3r,qQe)=>{"use strict";var I9=Pr(),aS=Ru(),Etr=$p(),ktr=D0(),zQe=lT(),Ctr=F0(),Ltr=Fg(),Ptr=Lm().PTS_LINESONLY,Itr=vQ();qQe.exports=function(t,r,n,i){function a(l,u){return I9.coerce(t,r,Itr,l,u)}var o=Rtr(t,r,i,a);if(!o){r.visible=!1;return}a("mode",o{"use strict";var BQe=ho();NQe.exports=function(t,r,n){var i={},a=n[r.subplot]._subplot;return i.realLabel=BQe.tickText(a.radialAxis,t.real,!0).text,i.imagLabel=BQe.tickText(a.angularAxis,t.imag,!0).text,i}});var HQe=ye((N3r,GQe)=>{"use strict";var VQe=Eo(),Dtr=fs().BADNUM,Ftr=z0(),ztr=Rm(),qtr=q0(),Otr=O0().calcMarkerSize;GQe.exports=function(t,r){for(var n=t._fullLayout,i=r.subplot,a=n[i].realaxis,o=n[i].imaginaryaxis,s=a.makeCalcdata(r,"real"),l=o.makeCalcdata(r,"imag"),u=r._length,c=new Array(u),f=0;f{"use strict";var Btr=vT(),jQe=fs().BADNUM,Ntr=$$(),Utr=Ntr.smith;WQe.exports=function(t,r,n){for(var i=r.layers.frontplot.select("g.scatterlayer"),a=r.xaxis,o=r.yaxis,s={xaxis:a,yaxis:o,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},l=0;l{"use strict";var Vtr=yT();function Gtr(e,t,r,n){var i=Vtr(e,t,r,n);if(!(!i||i[0].index===!1)){var a=i[0];if(a.index===void 0)return i;var o=e.subplot,s=a.cd[a.index],l=a.trace;if(o.isPtInside(s))return a.xLabelVal=void 0,a.yLabelVal=void 0,ZQe(s,l,o,a),a.hovertemplate=l.hovertemplate,i}}function ZQe(e,t,r,n){var i=r.radialAxis,a=r.angularAxis;i._hovertitle="real",a._hovertitle="imag";var o={};o[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,o);n.realLabel=s.realLabel,n.imagLabel=s.imagLabel;var l=e.hi||t.hoverinfo,u=[];function c(h,d){u.push(h._hovertitle+": "+d)}if(!t.hovertemplate){var f=l.split("+");f.indexOf("all")!==-1&&(f=["real","imag","text"]),f.indexOf("real")!==-1&&c(i,n.realLabel),f.indexOf("imag")!==-1&&c(a,n.imagLabel),f.indexOf("text")!==-1&&n.text&&(u.push(n.text),delete n.text),n.extraText=u.join("
")}}YQe.exports={hoverPoints:Gtr,makeHoverPointText:ZQe}});var $Qe=ye((G3r,JQe)=>{"use strict";JQe.exports={moduleType:"trace",name:"scattersmith",basePlotModule:RQe(),categories:["smith","symbols","showLegend","scatter-like"],attributes:vQ(),supplyDefaults:OQe(),colorbar:$d(),formatLabels:UQe(),calc:HQe(),plot:XQe(),style:sp().style,styleOnSelect:sp().styleOnSelect,hoverPoints:KQe().hoverPoints,selectPoints:_T(),meta:{}}});var eet=ye((H3r,QQe)=>{"use strict";QQe.exports=$Qe()});var kv=ye((j3r,ret)=>{var D9=Nh();function tet(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}D9(tet.prototype,{instance:function(e,t){e=(e||"gregorian").toLowerCase(),t=t||"";var r=this._localCals[e+"-"+t];if(!r&&this.calendars[e]&&(r=new this.calendars[e](t),this._localCals[e+"-"+t]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return r},newDate:function(e,t,r,n,i){return n=(e!=null&&e.year?e.calendar():typeof n=="string"?this.instance(n,i):n)||this.instance(),n.newDate(e,t,r)},substituteDigits:function(e){return function(t){return(t+"").replace(/[0-9]/g,function(r){return e[r]})}},substituteChineseDigits:function(e,t){return function(r){for(var n="",i=0;r>0;){var a=r%10;n=(a===0?"":e[a]+t[i])+n,i++,r=Math.floor(r/10)}return n.indexOf(e[1]+t[1])===0&&(n=n.substr(1)),n||e[0]}}});function pQ(e,t,r,n){if(this._calendar=e,this._year=t,this._month=r,this._day=n,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function R9(e,t){return e=""+e,"000000".substring(0,t-e.length)+e}D9(pQ.prototype,{newDate:function(e,t,r){return this._calendar.newDate(e==null?this:e,t,r)},year:function(e){return arguments.length===0?this._year:this.set(e,"y")},month:function(e){return arguments.length===0?this._month:this.set(e,"m")},day:function(e){return arguments.length===0?this._day:this.set(e,"d")},date:function(e,t,r){if(!this._calendar.isValid(e,t,r))throw(Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=t,this._day=r,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(e,t){return this._calendar.add(this,e,t)},set:function(e,t){return this._calendar.set(this,e,t)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(Gs.local.differentCalendars||Gs.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var t=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return t===0?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(e){return this._calendar.fromJD(e)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(e){return this._calendar.fromJSDate(e)},toString:function(){return(this.year()<0?"-":"")+R9(Math.abs(this.year()),4)+"-"+R9(this.month(),2)+"-"+R9(this.day(),2)}});function gQ(){this.shortYearCutoff="+10"}D9(gQ.prototype,{_validateLevel:0,newDate:function(e,t,r){return e==null?this.today():(e.year&&(this._validate(e,t,r,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new pQ(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var t=this._validate(e,this.minMonth,this.minDay,Gs.local.invalidYear||Gs.regionalOptions[""].invalidYear);return t.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Gs.local.invalidYear||Gs.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+R9(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Gs.local.invalidYear||Gs.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,Gs.local.invalidMonth||Gs.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(e,t){var r=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,r,this.minDay,Gs.local.invalidMonth||Gs.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Gs.local.invalidYear||Gs.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var n=this._validate(e,t,r,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,t,r),t,r)},_add:function(e,t,r){if(this._validateLevel++,r==="d"||r==="w"){var n=e.toJD()+t*(r==="w"?this.daysInWeek():1),i=e.calendar().fromJD(n);return this._validateLevel--,[i.year(),i.month(),i.day()]}try{var a=e.year()+(r==="y"?t:0),o=e.monthOfYear()+(r==="m"?t:0),i=e.day(),s=function(c){for(;of-1+c.minMonth;)a++,o-=f,f=c.monthsInYear(a)};r==="y"?(e.month()!==this.fromMonthOfYear(a,o)&&(o=this.newDate(a,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(a)),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o)))):r==="m"&&(s(this),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o))));var l=[a,this.fromMonthOfYear(a,o),i];return this._validateLevel--,l}catch(u){throw this._validateLevel--,u}},_correctAdd:function(e,t,r,n){if(!this.hasYearZero&&(n==="y"||n==="m")&&(t[0]===0||e.year()>0!=t[0]>0)){var i={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],a=r<0?-1:1;t=this._add(e,r*i[0]+a*i[1],i[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,r){this._validate(e,this.minMonth,this.minDay,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate);var n=r==="y"?t:e.year(),i=r==="m"?t:e.month(),a=r==="d"?t:e.day();return(r==="y"||r==="m")&&(a=Math.min(a,this.daysInMonth(n,i))),e.date(n,i,a)},isValid:function(e,t,r){this._validateLevel++;var n=this.hasYearZero||e!==0;if(n){var i=this.newDate(e,t,this.minDay);n=t>=this.minMonth&&t-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),u=i-(l>2.5?4716:4715);return u<=0&&u--,this.newDate(u,l,s)},toJSDate:function(e,t,r){var n=this._validate(e,t,r,Gs.local.invalidDate||Gs.regionalOptions[""].invalidDate),i=new Date(n.year(),n.month()-1,n.day());return i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0),i.setHours(i.getHours()>12?i.getHours()+2:0),i},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var Gs=ret.exports=new tet;Gs.cdate=pQ;Gs.baseCalendar=gQ;Gs.calendars.gregorian=mQ});var iet=ye(()=>{var yQ=Nh(),Nd=kv();yQ(Nd.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"});Nd.local=Nd.regionalOptions[""];yQ(Nd.cdate.prototype,{formatDate:function(e,t){return typeof e!="string"&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}});yQ(Nd.baseCalendar.prototype,{UNIX_EPOCH:Nd.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:Nd.instance().jdEpoch,TICKS_PER_DAY:24*60*60*1e7,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(e,t,r){if(typeof e!="string"&&(r=t,t=e,e=""),!t)return"";if(t.calendar()!==this)throw Nd.local.invalidFormat||Nd.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat,r=r||{};for(var n=r.dayNamesShort||this.local.dayNamesShort,i=r.dayNames||this.local.dayNames,a=r.monthNumbers||this.local.monthNumbers,o=r.monthNamesShort||this.local.monthNamesShort,s=r.monthNames||this.local.monthNames,l=r.calculateWeek||this.local.calculateWeek,u=function(T,L){for(var x=1;M+x1},c=function(T,L,x,C){var S=""+L;if(u(T,C))for(;S.length1},k=function(z,q){var U=p(z,q),G=[2,3,U?4:2,U?4:2,10,11,20]["oyYJ@!".indexOf(z)+1],Z=new RegExp("^-?\\d{1,"+G+"}"),j=t.substring(S).match(Z);if(!j)throw(Nd.local.missingNumberAt||Nd.regionalOptions[""].missingNumberAt).replace(/\{0\}/,S);return S+=j[0].length,parseInt(j[0],10)},M=this,T=function(){if(typeof s=="function"){p("m");var z=s.call(M,t.substring(S));return S+=z.length,z}return k("m")},L=function(z,q,U,G){for(var Z=p(z,G)?U:q,j=0;j-1){h=1,d=v;for(var E=this.daysInMonth(f,h);d>E;E=this.daysInMonth(f,h))h++,d-=E}return c>-1?this.fromJD(c):this.newDate(f,h,d)},determineDate:function(e,t,r,n,i){r&&typeof r!="object"&&(i=n,n=r,r=null),typeof n!="string"&&(i=n,n="");var a=this,o=function(s){try{return a.parseDate(n,s,i)}catch(f){}s=s.toLowerCase();for(var l=(s.match(/^c/)&&r?r.newDate():null)||a.today(),u=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,c=u.exec(s);c;)l.add(parseInt(c[1],10),c[2]||"d"),c=u.exec(s);return l};return t=t?t.newDate():null,e=e==null?t:typeof e=="string"?o(e):typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?t:a.today().add(e,"d"):a.newDate(e),e}})});var net=ye(()=>{var Hx=kv(),Htr=Nh(),_Q=Hx.instance();function F9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}F9.prototype=new Hx.baseCalendar;Htr(F9.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,t){if(typeof e=="string"){var r=e.match(Wtr);return r?r[0]:""}var n=this._validateYear(e),i=e.month(),a=""+this.toChineseMonth(n,i);return t&&a.length<2&&(a="0"+a),this.isIntercalaryMonth(n,i)&&(a+="i"),a},monthNames:function(e){if(typeof e=="string"){var t=e.match(Xtr);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),i=this.toChineseMonth(r,n),a=["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"][i-1];return this.isIntercalaryMonth(r,n)&&(a="\u95F0"+a),a},monthNamesShort:function(e){if(typeof e=="string"){var t=e.match(Ztr);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),i=this.toChineseMonth(r,n),a=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][i-1];return this.isIntercalaryMonth(r,n)&&(a="\u95F0"+a),a},parseMonth:function(e,t){e=this._validateYear(e);var r=parseInt(t),n;if(isNaN(r))t[0]==="\u95F0"&&(n=!0,t=t.substring(1)),t[t.length-1]==="\u6708"&&(t=t.substring(0,t.length-1)),r=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(t);else{var i=t[t.length-1];n=i==="i"||i==="I"}var a=this.toMonthIndex(e,r,n);return a},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(e,t){if(e.year&&(e=e.year()),typeof e!="number"||e<1888||e>2111)throw t.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,t,r){var n=this.intercalaryMonth(e),i=r&&t!==n;if(i||t<1||t>12)throw Hx.local.invalidMonth.replace(/\{0\}/,this.local.name);var a;return n?!r&&t<=n?a=t-1:a=t:a=t-1,a},toChineseMonth:function(e,t){e.year&&(e=e.year(),t=e.month());var r=this.intercalaryMonth(e),n=r?12:11;if(t<0||t>n)throw Hx.local.invalidMonth.replace(/\{0\}/,this.local.name);var i;return r?t>13;return r},isIntercalaryMonth:function(e,t){e.year&&(e=e.year(),t=e.month());var r=this.intercalaryMonth(e);return!!r&&r===t},leapYear:function(e){return this.intercalaryMonth(e)!==0},weekOfYear:function(e,t,r){var n=this._validateYear(e,Hx.local.invalidyear),i=Wx[n-Wx[0]],a=i>>9&4095,o=i>>5&15,s=i&31,l;l=_Q.newDate(a,o,s),l.add(4-(l.dayOfWeek()||7),"d");var u=this.toJD(e,t,r)-l.toJD();return 1+Math.floor(u/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,t){e.year&&(t=e.month(),e=e.year()),e=this._validateYear(e);var r=jx[e-jx[0]],n=r>>13,i=n?12:11;if(t>i)throw Hx.local.invalidMonth.replace(/\{0\}/,this.local.name);var a=r&1<<12-t?30:29;return a},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,a,r,Hx.local.invalidDate);e=this._validateYear(n.year()),t=n.month(),r=n.day();var i=this.isIntercalaryMonth(e,t),a=this.toChineseMonth(e,t),o=Ktr(e,a,r,i);return _Q.toJD(o.year,o.month,o.day)},fromJD:function(e){var t=_Q.fromJD(e),r=Ytr(t.year(),t.month(),t.day()),n=this.toMonthIndex(r.year,r.month,r.isIntercalary);return this.newDate(r.year,n,r.day)},fromString:function(e){var t=e.match(jtr),r=this._validateYear(+t[1]),n=+t[2],i=!!t[3],a=this.toMonthIndex(r,n,i),o=+t[4];return this.newDate(r,a,o)},add:function(e,t,r){var n=e.year(),i=e.month(),a=this.isIntercalaryMonth(n,i),o=this.toChineseMonth(n,i),s=Object.getPrototypeOf(F9.prototype).add.call(this,e,t,r);if(r==="y"){var l=s.year(),u=s.month(),c=this.isIntercalaryMonth(l,o),f=a&&c?this.toMonthIndex(l,o,!0):this.toMonthIndex(l,o,!1);f!==u&&s.month(f)}return s}});var jtr=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,Wtr=/^\d?\d[iI]?/m,Xtr=/^闰?十?[一二三四五六七八九]?月/m,Ztr=/^闰?十?[一二三四五六七八九]?/m;Hx.calendars.chinese=F9;var jx=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],Wx=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904];function Ytr(e,t,r,n){var i,a;if(typeof e=="object")i=e,a=t||{};else{var o=typeof e=="number"&&e>=1888&&e<=2111;if(!o)throw new Error("Solar year outside range 1888-2111");var s=typeof t=="number"&&t>=1&&t<=12;if(!s)throw new Error("Solar month outside range 1 - 12");var l=typeof r=="number"&&r>=1&&r<=31;if(!l)throw new Error("Solar day outside range 1 - 31");i={year:e,month:t,day:r},a=n||{}}var u=Wx[i.year-Wx[0]],c=i.year<<9|i.month<<5|i.day;a.year=c>=u?i.year:i.year-1,u=Wx[a.year-Wx[0]];var f=u>>9&4095,h=u>>5&15,d=u&31,v,m=new Date(f,h-1,d),b=new Date(i.year,i.month-1,i.day);v=Math.round((b-m)/(24*3600*1e3));var p=jx[a.year-jx[0]],k;for(k=0;k<13;k++){var M=p&1<<12-k?30:29;if(v>13;return!T||k=1888&&e<=2111;if(!s)throw new Error("Lunar year outside range 1888-2111");var l=typeof t=="number"&&t>=1&&t<=12;if(!l)throw new Error("Lunar month outside range 1 - 12");var u=typeof r=="number"&&r>=1&&r<=30;if(!u)throw new Error("Lunar day outside range 1 - 30");var c;typeof n=="object"?(c=!1,a=n):(c=!!n,a=i||{}),o={year:e,month:t,day:r,isIntercalary:c}}var f;f=o.day-1;var h=jx[o.year-jx[0]],d=h>>13,v;d&&(o.month>d||o.isIntercalary)?v=o.month:v=o.month-1;for(var m=0;m>9&4095,M=p>>5&15,T=p&31,L=new Date(k,M-1,T+f);return a.year=L.getFullYear(),a.month=1+L.getMonth(),a.day=L.getDate(),a}});var aet=ye(()=>{var Pw=kv(),Jtr=Nh();function xQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}xQ.prototype=new Pw.baseCalendar;Jtr(xQ.prototype,{name:"Coptic",jdEpoch:18250295e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,Pw.local.invalidYear),r=t.year()+(t.year()<0?1:0);return r%4===3||r%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Pw.local.invalidYear||Pw.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Pw.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===13&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,Pw.local.invalidDate);return e=n.year(),e<0&&e++,n.day()+(n.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,i=t-(n-1)*30+1;return this.newDate(r,n,i)}});Pw.calendars.coptic=xQ});var oet=ye(()=>{var E1=kv(),$tr=Nh();function bQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}bQ.prototype=new E1.baseCalendar;$tr(bQ.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,E1.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,E1.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,E1.local.invalidYear),400},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,E1.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,E1.local.invalidDate);return(n.day()+1)%8},weekDay:function(e,t,r){var n=this.dayOfWeek(e,t,r);return n>=2&&n<=6},extraInfo:function(e,t,r){var n=this._validate(e,t,r,E1.local.invalidDate);return{century:Qtr[Math.floor((n.year()-1)/100)+1]||""}},toJD:function(e,t,r){var n=this._validate(e,t,r,E1.local.invalidDate);return e=n.year()+(n.year()<0?1:0),t=n.month(),r=n.day(),r+(t>1?16:0)+(t>2?(t-2)*32:0)+(e-1)*400+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var t=Math.floor(e/400)+1;e-=(t-1)*400,e+=e>15?16:0;var r=Math.floor(e/32)+1,n=e-(r-1)*32+1;return this.newDate(t<=0?t-1:t,r,n)}});var Qtr={20:"Fruitbat",21:"Anchovy"};E1.calendars.discworld=bQ});var set=ye(()=>{var Iw=kv(),err=Nh();function wQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}wQ.prototype=new Iw.baseCalendar;err(wQ.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,Iw.local.invalidYear),r=t.year()+(t.year()<0?1:0);return r%4===3||r%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Iw.local.invalidYear||Iw.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Iw.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===13&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,Iw.local.invalidDate);return e=n.year(),e<0&&e++,n.day()+(n.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,i=t-(n-1)*30+1;return this.newDate(r,n,i)}});Iw.calendars.ethiopian=wQ});var uet=ye(()=>{var Xx=kv(),trr=Nh();function TQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}TQ.prototype=new Xx.baseCalendar;trr(TQ.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Xx.local.invalidYear);return this._leapYear(t.year())},_leapYear:function(e){return e=e<0?e+1:e,z9(e*7+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Xx.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Xx.local.invalidYear);return e=t.year(),this.toJD(e===-1?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,Xx.local.invalidMonth),t===12&&this.leapYear(e)||t===8&&z9(this.daysInYear(e),10)===5?30:t===9&&z9(this.daysInYear(e),10)===3?29:this.daysPerMonth[t-1]},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==6},extraInfo:function(e,t,r){var n=this._validate(e,t,r,Xx.local.invalidDate);return{yearType:(this.leapYear(n)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(n)%10-3]}},toJD:function(e,t,r){var n=this._validate(e,t,r,Xx.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var i=e<=0?e+1:e,a=this.jdEpoch+this._delay1(i)+this._delay2(i)+r+1;if(t<7){for(var o=7;o<=this.monthsInYear(e);o++)a+=this.daysInMonth(e,o);for(var o=1;o=this.toJD(t===-1?1:t+1,7,1);)t++;for(var r=ethis.toJD(t,r,this.daysInMonth(t,r));)r++;var n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}});function z9(e,t){return e-t*Math.floor(e/t)}Xx.calendars.hebrew=TQ});var cet=ye(()=>{var bC=kv(),rrr=Nh();function AQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}AQ.prototype=new bC.baseCalendar;rrr(AQ.prototype,{name:"Islamic",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-kham\u012Bs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,bC.local.invalidYear);return(t.year()*11+14)%30<11},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,bC.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,bC.local.invalidDate);return e=n.year(),t=n.month(),r=n.day(),e=e<=0?e+1:e,r+Math.ceil(29.5*(t-1))+(e-1)*354+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=Math.floor((30*(e-this.jdEpoch)+10646)/10631);t=t<=0?t-1:t;var r=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}});bC.calendars.islamic=AQ});var fet=ye(()=>{var wC=kv(),irr=Nh();function SQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}SQ.prototype=new wC.baseCalendar;irr(SQ.prototype,{name:"Julian",jdEpoch:17214235e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,wC.local.invalidYear),r=t.year()<0?t.year()+1:t.year();return r%4===0},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,wC.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,wC.local.invalidDate);return e=n.year(),t=n.month(),r=n.day(),e<0&&e++,t<=2&&(e--,t+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r-1524.5},fromJD:function(e){var t=Math.floor(e+.5),r=t+1524,n=Math.floor((r-122.1)/365.25),i=Math.floor(365.25*n),a=Math.floor((r-i)/30.6001),o=a-Math.floor(a<14?1:13),s=n-Math.floor(o>2?4716:4715),l=r-i-Math.floor(30.6001*a);return s<=0&&s--,this.newDate(s,o,l)}});wC.calendars.julian=SQ});var det=ye(()=>{var fg=kv(),nrr=Nh();function EQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}EQ.prototype=new fg.baseCalendar;nrr(EQ.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,fg.local.invalidYear),!1},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,fg.local.invalidYear);e=t.year();var r=Math.floor(e/400);e=e%400,e+=e<0?400:0;var n=Math.floor(e/20);return r+"."+n+"."+e%20},forYear:function(e){if(e=e.split("."),e.length<3)throw"Invalid Mayan year";for(var t=0,r=0;r19||r>0&&n<0)throw"Invalid Mayan year";t=t*20+n}return t},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,fg.local.invalidYear),18},weekOfYear:function(e,t,r){return this._validate(e,t,r,fg.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,fg.local.invalidYear),360},daysInMonth:function(e,t){return this._validate(e,t,this.minDay,fg.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,fg.local.invalidDate);return n.day()},weekDay:function(e,t,r){return this._validate(e,t,r,fg.local.invalidDate),!0},extraInfo:function(e,t,r){var n=this._validate(e,t,r,fg.local.invalidDate),i=n.toJD(),a=this._toHaab(i),o=this._toTzolkin(i);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(e){e-=this.jdEpoch;var t=MQ(e+8+17*20,365);return[Math.floor(t/20)+1,MQ(t,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[het(e+20,20),het(e+4,13)]},toJD:function(e,t,r){var n=this._validate(e,t,r,fg.local.invalidDate);return n.day()+n.month()*20+n.year()*360+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var t=Math.floor(e/360);e=e%360,e+=e<0?360:0;var r=Math.floor(e/20),n=e%20;return this.newDate(t,r,n)}});function MQ(e,t){return e-t*Math.floor(e/t)}function het(e,t){return MQ(e-1,t)+1}fg.calendars.mayan=EQ});var pet=ye(()=>{var Rw=kv(),arr=Nh();function kQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}kQ.prototype=new Rw.baseCalendar;var vet=Rw.instance("gregorian");arr(kQ.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Rw.local.invalidYear||Rw.regionalOptions[""].invalidYear);return vet.leapYear(t.year()+(t.year()<1?1:0)+1469)},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Rw.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(i,t,r){var n=this._validate(i,t,r,Rw.local.invalidMonth),i=n.year();i<0&&i++;for(var a=n.day(),o=1;o=this.toJD(t+1,1,1);)t++;for(var r=e-Math.floor(this.toJD(t,1,1)+.5)+1,n=1;r>this.daysInMonth(t,n);)r-=this.daysInMonth(t,n),n++;return this.newDate(t,n,r)}});Rw.calendars.nanakshahi=kQ});var get=ye(()=>{var Dw=kv(),orr=Nh();function CQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}CQ.prototype=new Dw.baseCalendar;orr(CQ.prototype,{name:"Nepali",jdEpoch:17007095e-1,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Dw.local.invalidYear);if(e=t.year(),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined")return this.daysPerYear;for(var r=0,n=this.minMonth;n<=12;n++)r+=this.NEPALI_CALENDAR_DATA[e][n];return r},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,Dw.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined"?this.daysPerMonth[t-1]:this.NEPALI_CALENDAR_DATA[e][t]},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==6},toJD:function(e,t,r){var n=this._validate(e,t,r,Dw.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var i=Dw.instance(),a=0,o=t,s=e;this._createMissingCalendarData(e);var l=e-(o>9||o===9&&r>=this.NEPALI_CALENDAR_DATA[s][0]?56:57);for(t!==9&&(a=r,o--);o!==9;)o<=0&&(o=12,s--),a+=this.NEPALI_CALENDAR_DATA[s][o],o--;return t===9?(a+=r-this.NEPALI_CALENDAR_DATA[s][0],a<0&&(a+=i.daysInYear(l))):a+=this.NEPALI_CALENDAR_DATA[s][9]-this.NEPALI_CALENDAR_DATA[s][0],i.newDate(l,1,1).add(a,"d").toJD()},fromJD:function(e){var t=Dw.instance(),r=t.fromJD(e),n=r.year(),i=r.dayOfYear(),a=n+56;this._createMissingCalendarData(a);for(var o=9,s=this.NEPALI_CALENDAR_DATA[a][0],l=this.NEPALI_CALENDAR_DATA[a][o]-s+1;i>l;)o++,o>12&&(o=1,a++),l+=this.NEPALI_CALENDAR_DATA[a][o];var u=this.NEPALI_CALENDAR_DATA[a][o]-(l-i);return this.newDate(a,o,u)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var r=e-1;r{var oS=kv(),srr=Nh();function O9(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function q9(e){var t=e-475;e<0&&t++;var r=.242197,n=r*t,i=r*(t+1),a=n-Math.floor(n),o=i-Math.floor(i);return a>o}O9.prototype=new oS.baseCalendar;srr(O9.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chah\u0101rshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,oS.local.invalidYear);return q9(t.year())},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-((n.dayOfWeek()+1)%7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,oS.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,oS.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var i=0;if(e>0)for(var a=1;a0?e-1:e)*365+i+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=475+(e-this.toJD(475,1,1))/365.242197,r=Math.floor(t);r<=0&&r--,e>this.toJD(r,12,q9(r)?30:29)&&(r++,r===0&&r++);var n=e-this.toJD(r,1,1)+1,i=n<=186?Math.ceil(n/31):Math.ceil((n-6)/30),a=e-this.toJD(r,i,1)+1;return this.newDate(r,i,a)}});oS.calendars.persian=O9;oS.calendars.jalali=O9});var yet=ye(()=>{var Fw=kv(),lrr=Nh(),B9=Fw.instance();function LQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}LQ.prototype=new Fw.baseCalendar;lrr(LQ.prototype,{name:"Taiwan",jdEpoch:24194025e-1,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,Fw.local.invalidYear),r=this._t2gYear(t.year());return B9.leapYear(r)},weekOfYear:function(i,t,r){var n=this._validate(i,this.minMonth,this.minDay,Fw.local.invalidYear),i=this._t2gYear(n.year());return B9.weekOfYear(i,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Fw.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(i,t,r){var n=this._validate(i,t,r,Fw.local.invalidDate),i=this._t2gYear(n.year());return B9.toJD(i,n.month(),n.day())},fromJD:function(e){var t=B9.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)},_g2tYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)}});Fw.calendars.taiwan=LQ});var _et=ye(()=>{var zw=kv(),urr=Nh(),N9=zw.instance();function PQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}PQ.prototype=new zw.baseCalendar;urr(PQ.prototype,{name:"Thai",jdEpoch:15230985e-1,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,zw.local.invalidYear),r=this._t2gYear(t.year());return N9.leapYear(r)},weekOfYear:function(i,t,r){var n=this._validate(i,this.minMonth,this.minDay,zw.local.invalidYear),i=this._t2gYear(n.year());return N9.weekOfYear(i,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,zw.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(i,t,r){var n=this._validate(i,t,r,zw.local.invalidDate),i=this._t2gYear(n.year());return N9.toJD(i,n.month(),n.day())},fromJD:function(e){var t=N9.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)},_g2tYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)}});zw.calendars.thai=PQ});var xet=ye(()=>{var qw=kv(),crr=Nh();function IQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}IQ.prototype=new qw.baseCalendar;crr(IQ.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thal\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012Bs","Yawm al-Jum\u2018a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,qw.local.invalidYear);return this.daysInYear(t.year())===355},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var t=0,r=1;r<=12;r++)t+=this.daysInMonth(e,r);return t},daysInMonth:function(e,t){for(var r=this._validate(e,t,this.minDay,qw.local.invalidMonth),n=r.toJD()-24e5+.5,i=0,a=0;an)return Zx[i]-Zx[i-1];i++}return 30},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,qw.local.invalidDate),i=12*(n.year()-1)+n.month()-15292,a=n.day()+Zx[i-1]-1;return a+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,r=0,n=0;nt);n++)r++;var i=r+15292,a=Math.floor((i-1)/12),o=a+1,s=i-12*a,l=t-Zx[r-1]+1;return this.newDate(o,s,l)},isValid:function(e,t,r){var n=qw.baseCalendar.prototype.isValid.apply(this,arguments);return n&&(e=e.year!=null?e.year:e,n=e>=1276&&e<=1500),n},_validate:function(e,t,r,n){var i=qw.baseCalendar.prototype._validate.apply(this,arguments);if(i.year<1276||i.year>1500)throw n.replace(/\{0\}/,this.local.name);return i}});qw.calendars.ummalqura=IQ;var Zx=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]});var wet=ye((wTr,bet)=>{"use strict";bet.exports=kv();iet();net();aet();oet();set();uet();cet();fet();det();pet();get();met();yet();_et();xet()});var Let=ye((TTr,Cet)=>{"use strict";var Aet=wet(),TC=Pr(),Met=fs(),frr=Met.EPOCHJD,hrr=Met.ONEDAY,FQ={valType:"enumerated",values:TC.sortObjectKeys(Aet.calendars),editType:"calc",dflt:"gregorian"},Eet=function(e,t,r,n){var i={};return i[r]=FQ,TC.coerce(e,t,i,r,n)},drr=function(e,t,r,n){for(var i=0;i{"use strict";Pet.exports=Let()});var _rr=ye((STr,Det)=>{var Ret=uye();Ret.register([f1e(),$1e(),hxe(),Rxe(),Xxe(),Gbe(),r2e(),H2e(),_we(),t3e(),V3e(),eke(),Gke(),D6e(),wLe(),QLe(),TPe(),ZIe(),d8e(),P8e(),G8e(),iRe(),yRe(),DRe(),fFe(),PFe(),ZBe(),ZNe(),nVe(),LVe(),NGe(),tHe(),SHe(),qje(),$je(),wWe(),PXe(),tZe(),zZe(),nKe(),CKe(),KKe(),wJe(),zJe(),F$e(),eQe(),_Qe(),eet(),Iet()]);Det.exports=Ret});return _rr();})(); /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ +/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ /*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT */ +/*! + * pad-left + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT license. + */ +/*! + * repeat-string + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ /*! Bundled license information: native-promise-only/lib/npo.src.js: diff --git a/plotly/validators/_validators.json b/plotly/validators/_validators.json index 33807c92e19..6ac53224b43 100644 --- a/plotly/validators/_validators.json +++ b/plotly/validators/_validators.json @@ -18556,6 +18556,14 @@ }, "superclass": "IntegerValidator" }, + "layout.hoveranywhere": { + "params": { + "plotly_name": "hoveranywhere", + "parent_name": "layout", + "edit_type": "none" + }, + "superclass": "BooleanValidator" + }, "layout.hidesources": { "params": { "plotly_name": "hidesources", @@ -20673,6 +20681,14 @@ }, "superclass": "FlaglistValidator" }, + "layout.clickanywhere": { + "params": { + "plotly_name": "clickanywhere", + "parent_name": "layout", + "edit_type": "none" + }, + "superclass": "BooleanValidator" + }, "layout.calendar": { "params": { "plotly_name": "calendar", From 1b7de492ead91eb28bfa3bd9208078ff453a1657 Mon Sep 17 00:00:00 2001 From: Cameron DeCoster Date: Thu, 9 Apr 2026 10:36:05 -0600 Subject: [PATCH 2/2] Update Jupyter support files --- plotly/labextension/package.json | 4 +-- .../static/1.9daa5160b7fc741623bf.js | 2 ++ ... => 1.9daa5160b7fc741623bf.js.LICENSE.txt} | 26 +++++++++---------- .../static/1.f29faa6937f75272d9d5.js | 2 -- ...js => remoteEntry.44d7a4ff90fee4a9d4bc.js} | 2 +- 5 files changed, 18 insertions(+), 18 deletions(-) create mode 100644 plotly/labextension/static/1.9daa5160b7fc741623bf.js rename plotly/labextension/static/{1.f29faa6937f75272d9d5.js.LICENSE.txt => 1.9daa5160b7fc741623bf.js.LICENSE.txt} (100%) delete mode 100644 plotly/labextension/static/1.f29faa6937f75272d9d5.js rename plotly/labextension/static/{remoteEntry.a90ef69e866c18565afe.js => remoteEntry.44d7a4ff90fee4a9d4bc.js} (79%) diff --git a/plotly/labextension/package.json b/plotly/labextension/package.json index 62e0b69ae82..64dc0a10421 100644 --- a/plotly/labextension/package.json +++ b/plotly/labextension/package.json @@ -19,7 +19,7 @@ }, "dependencies": { "lodash-es": "^4.17.21", - "plotly.js": "3.4.0", + "plotly.js": "3.5.0", "@lumino/widgets": "~2.4.0" }, "devDependencies": { @@ -33,7 +33,7 @@ "outputDir": "../plotly/labextension", "webpackConfig": "./webpack.config.js", "_build": { - "load": "static/remoteEntry.a90ef69e866c18565afe.js", + "load": "static/remoteEntry.44d7a4ff90fee4a9d4bc.js", "mimeExtension": "./mimeExtension" } } diff --git a/plotly/labextension/static/1.9daa5160b7fc741623bf.js b/plotly/labextension/static/1.9daa5160b7fc741623bf.js new file mode 100644 index 00000000000..063cea27a40 --- /dev/null +++ b/plotly/labextension/static/1.9daa5160b7fc741623bf.js @@ -0,0 +1,2 @@ +/*! For license information please see 1.9daa5160b7fc741623bf.js.LICENSE.txt */ +(self.webpackChunkjupyterlab_plotly=self.webpackChunkjupyterlab_plotly||[]).push([[1],[,,(e,t,r)=>{"use strict";r.r(t),r.d(t,{MIME_TYPE:()=>He,RenderedPlotly:()=>Ge,default:()=>Ze,rendererFactory:()=>We});var n,i,a,o,s,l,c=r(3),u=Object.create,h=Object.defineProperty,f=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,d=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty,g=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),y=(e,t,r)=>(r=null!=e?u(d(e)):{},((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let r of p(t))!m.call(e,r)&&undefined!==r&&h(e,r,{get:()=>t[r],enumerable:!(n=f(t,r))||n.enumerable});return e})(!t&&e&&e.__esModule?r:h(r,"default",{value:e,enumerable:!0}),e)),v=g(((e,t)=>{var n,i;n=e,i=function(e){function t(e,t){let r=0;for(let n of e)if(!1===t(n,r++))return!1;return!0}var r;e.ArrayExt=void 0,function(e){function t(e,t,r=0,n=-1){let i,a=e.length;if(0===a)return-1;r=r<0?Math.max(0,r+a):Math.min(r,a-1),i=(n=n<0?Math.max(0,n+a):Math.min(n,a-1))=r)return;let n=e[t];for(let n=t+1;n0;){let n=s>>1,i=o+n;r(e[i],t)<0?(o=i+1,s-=n+1):s=n}return o},e.upperBound=function(e,t,r,n=0,i=-1){let a=e.length;if(0===a)return 0;let o=n=n<0?Math.max(0,n+a):Math.min(n,a-1),s=(i=i<0?Math.max(0,i+a):Math.min(i,a-1))-n+1;for(;s>0;){let n=s>>1,i=o+n;r(e[i],t)>0?s=n:(o=i+1,s-=n+1)}return o},e.shallowEqual=function(e,t,r){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0,i=e.length;n=o&&(r=i<0?o-1:o),void 0===n?n=i<0?-1:o:n<0?n=Math.max(n+o,i<0?-1:0):n>=o&&(n=i<0?o-1:o),a=i<0&&n>=r||i>0&&r>=n?0:i<0?Math.floor((n-r+1)/i+1):Math.floor((n-r-1)/i+1);let s=[];for(let t=0;t=(n=n<0?Math.max(0,n+i):Math.min(n,i-1)))return;let o=n-r+1;if(t>0?t%=o:t<0&&(t=(t%o+o)%o),0===t)return;let s=r+t;a(e,r,s-1),a(e,s,n),a(e,r,n)},e.fill=function(e,t,r=0,n=-1){let i,a=e.length;if(0!==a){r=r<0?Math.max(0,r+a):Math.min(r,a-1),i=(n=n<0?Math.max(0,n+a):Math.min(n,a-1))t;--r)e[r]=e[r-1];e[t]=r},e.removeAt=o,e.removeFirstOf=function(e,r,n=0,i=-1){let a=t(e,r,n,i);return-1!==a&&o(e,a),a},e.removeLastOf=function(e,t,n=-1,i=0){let a=r(e,t,n,i);return-1!==a&&o(e,a),a},e.removeAllOf=function(e,t,r=0,n=-1){let i=e.length;if(0===i)return 0;r=r<0?Math.max(0,r+i):Math.min(r,i-1),n=n<0?Math.max(0,n+i):Math.min(n,i-1);let a=0;for(let o=0;o=r&&o<=n&&e[o]===t||n=r)&&e[o]===t?a++:a>0&&(e[o-a]=e[o]);return a>0&&(e.length=i-a),a},e.removeFirstWhere=function(e,t,r=0,i=-1){let a,s=n(e,t,r,i);return-1!==s&&(a=o(e,s)),{index:s,value:a}},e.removeLastWhere=function(e,t,r=-1,n=0){let a,s=i(e,t,r,n);return-1!==s&&(a=o(e,s)),{index:s,value:a}},e.removeAllWhere=function(e,t,r=0,n=-1){let i=e.length;if(0===i)return 0;r=r<0?Math.max(0,r+i):Math.min(r,i-1),n=n<0?Math.max(0,n+i):Math.min(n,i-1);let a=0;for(let o=0;o=r&&o<=n&&t(e[o],o)||n=r)&&t(e[o],o)?a++:a>0&&(e[o-a]=e[o]);return a>0&&(e.length=i-a),a}}(e.ArrayExt||(e.ArrayExt={})),(r||(r={})).rangeLength=function(e,t,r){return 0===r?1/0:e>t&&r>0||et?1:0}}(e.StringExt||(e.StringExt={})),e.chain=function*(...e){for(let t of e)yield*t},e.each=function(e,t){let r=0;for(let n of e)if(!1===t(n,r++))return},e.empty=function*(){},e.enumerate=function*(e,t=0){for(let r of e)yield[t++,r]},e.every=t,e.filter=function*(e,t){let r=0;for(let n of e)t(n,r++)&&(yield n)},e.find=function(e,t){let r=0;for(let n of e)if(t(n,r++))return n},e.findIndex=function(e,t){let r=0;for(let n of e)if(t(n,r++))return r-1;return-1},e.map=function*(e,t){let r=0;for(let n of e)yield t(n,r++)},e.max=function(e,t){let r;for(let n of e)void 0!==r?t(n,r)>0&&(r=n):r=n;return r},e.min=function(e,t){let r;for(let n of e)void 0!==r?t(n,r)<0&&(r=n):r=n;return r},e.minmax=function(e,t){let r,n,i=!0;for(let a of e)i?(r=a,n=a,i=!1):t(a,r)<0?r=a:t(a,n)>0&&(n=a);return i?void 0:[r,n]},e.once=function*(e){yield e},e.range=function*(e,t,n){void 0===t?(t=e,e=0,n=1):void 0===n&&(n=1);let i=r.rangeLength(e,t,n);for(let t=0;t-1;t--)yield e[t]},e.some=function(e,t){let r=0;for(let n of e)if(t(n,r++))return!0;return!1},e.stride=function*(e,t){let r=0;for(let n of e)r++%t==0&&(yield n)},e.take=function*(e,t){if(t<1)return;let r,n=e[Symbol.iterator]();for(;0e[Symbol.iterator]())),n=r.map((e=>e.next()));for(;t(n,(e=>!e.done));n=r.map((e=>e.next())))yield n.map((e=>e.value))}},"object"==typeof e&&typeof t<"u"?i(e):"function"==typeof define&&r.amdO?define(["exports"],i):i((n=typeof globalThis<"u"?globalThis:n||self).lumino_algorithm={})})),x=g(((e,t)=>{var n,i;n=e,i=function(e,t){var r;function n(e){let t=0;for(let r=0,n=e.length;r>>0),e[r]=255&t,t>>>=8}e.JSONExt=void 0,function(e){function t(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e}function r(e){return Array.isArray(e)}e.emptyObject=Object.freeze({}),e.emptyArray=Object.freeze([]),e.isPrimitive=t,e.isArray=r,e.isObject=function(e){return!t(e)&&!r(e)},e.deepEqual=function e(n,i){if(n===i)return!0;if(t(n)||t(i))return!1;let a=r(n),o=r(i);return a===o&&(a&&o?function(t,r){if(t===r)return!0;if(t.length!==r.length)return!1;for(let n=0,i=t.length;n{if(n===e.provides)return!0;let o=r.get(n);if(!o)return!1;let s=t.get(o),l=[...s.requires,...s.optional];return 0!==l.length&&(a.push(o),!!l.some(i)||(a.pop(),!1))};if(!e.provides||0===n.length)return;let a=[e.id];if(n.some(i))throw new ReferenceError(`Cycle detected: ${a.join(" -> ")}.`)},e.findDependents=function(e,r,n){let i=new Array,a=e=>{let t=r.get(e),a=[...t.requires,...t.optional];i.push(...a.reduce(((t,r)=>{let i=n.get(r);return i&&t.push([e,i]),t}),[]))};for(let e of r.keys())a(e);let o=i.filter((t=>t[1]===e)),s=0;for(;o.length>s;){let e=o.length,t=new Set(o.map((e=>e[0])));for(let e of t)i.filter((t=>t[1]===e)).forEach((e=>{o.includes(e)||o.push(e)}));s=e}let l=t.topologicSort(o),c=l.findIndex((t=>t===e));return-1===c?[e]:l.slice(0,c+1)},e.collectStartupPlugins=function(e,t){let r=new Set;for(let t of e.keys())!0===e.get(t).autoStart&&r.add(t);if(t.startPlugins)for(let e of t.startPlugins)r.add(e);if(t.ignorePlugins)for(let e of t.ignorePlugins)r.delete(e);return Array.from(r)}}(r||(r={})),e.Random=void 0,(e.Random||(e.Random={})).getRandomValues=(()=>{let e=typeof window<"u"&&(window.crypto||window.msCrypto)||null;return e&&"function"==typeof e.getRandomValues?function(t){return e.getRandomValues(t)}:n})(),e.UUID=void 0,(e.UUID||(e.UUID={})).uuid4=function(e){let t=new Uint8Array(16),r=new Array(256);for(let e=0;e<16;++e)r[e]="0"+e.toString(16);for(let e=16;e<256;++e)r[e]=e.toString(16);return function(){return e(t),t[6]=64|15&t[6],t[8]=128|63&t[8],r[t[0]]+r[t[1]]+r[t[2]]+r[t[3]]+"-"+r[t[4]]+r[t[5]]+"-"+r[t[6]]+r[t[7]]+"-"+r[t[8]]+r[t[9]]+"-"+r[t[10]]+r[t[11]]+r[t[12]]+r[t[13]]+r[t[14]]+r[t[15]]}}(e.Random.getRandomValues),e.MimeData=class{constructor(){this._types=[],this._values=[]}types(){return this._types.slice()}hasData(e){return-1!==this._types.indexOf(e)}getData(e){let t=this._types.indexOf(e);return-1!==t?this._values[t]:void 0}setData(e,t){this.clearData(e),this._types.push(e),this._values.push(t)}clearData(e){let t=this._types.indexOf(e);-1!==t&&(this._types.splice(t,1),this._values.splice(t,1))}clear(){this._types.length=0,this._values.length=0}},e.PluginRegistry=class{constructor(e={}){this._application=null,this._validatePlugin=()=>!0,this._plugins=new Map,this._services=new Map,e.validatePlugin&&(console.info("Plugins may be rejected by the custom validation plugin method."),this._validatePlugin=e.validatePlugin)}get application(){return this._application}set application(e){if(null!==this._application)throw Error("PluginRegistry.application is already set. It cannot be overridden.");this._application=e}get deferredPlugins(){return Array.from(this._plugins).filter((([e,t])=>"defer"===t.autoStart)).map((([e,t])=>e))}getPluginDescription(e){var t,r;return null!==(r=null===(t=this._plugins.get(e))||void 0===t?void 0:t.description)&&void 0!==r?r:""}hasPlugin(e){return this._plugins.has(e)}isPluginActivated(e){var t,r;return null!==(r=null===(t=this._plugins.get(e))||void 0===t?void 0:t.activated)&&void 0!==r&&r}listPlugins(){return Array.from(this._plugins.keys())}registerPlugin(e){if(this._plugins.has(e.id))throw new TypeError(`Plugin '${e.id}' is already registered.`);if(!this._validatePlugin(e))throw new Error(`Plugin '${e.id}' is not valid.`);let t=r.createPluginData(e);r.ensureNoCycle(t,this._plugins,this._services),t.provides&&this._services.set(t.provides,t.id),this._plugins.set(t.id,t)}registerPlugins(e){for(let t of e)this.registerPlugin(t)}deregisterPlugin(e,t){let r=this._plugins.get(e);if(r){if(r.activated&&!t)throw new Error(`Plugin '${e}' is still active.`);this._plugins.delete(e)}}async activatePlugin(e){let t=this._plugins.get(e);if(!t)throw new ReferenceError(`Plugin '${e}' is not registered.`);if(t.activated)return;if(t.promise)return t.promise;let r=t.requires.map((e=>this.resolveRequiredService(e))),n=t.optional.map((e=>this.resolveOptionalService(e)));return t.promise=Promise.all([...r,...n]).then((e=>t.activate.apply(void 0,[this.application,...e]))).then((e=>{t.service=e,t.activated=!0,t.promise=null})).catch((e=>{throw t.promise=null,e})),t.promise}async activatePlugins(e,t={}){switch(e){case"defer":{let e=this.deferredPlugins.filter((e=>this._plugins.get(e).autoStart)).map((e=>this.activatePlugin(e)));await Promise.all(e);break}case"startUp":{let e=r.collectStartupPlugins(this._plugins,t).map((async e=>{try{return await this.activatePlugin(e)}catch(t){console.error(`Plugin '${e}' failed to activate.`,t)}}));await Promise.all(e);break}}}async deactivatePlugin(e){let t=this._plugins.get(e);if(!t)throw new ReferenceError(`Plugin '${e}' is not registered.`);if(!t.activated)return[];if(!t.deactivate)throw new TypeError(`Plugin '${e}'#deactivate() method missing`);let n=r.findDependents(e,this._plugins,this._services),i=n.map((e=>this._plugins.get(e)));for(let t of i)if(!t.deactivate)throw new TypeError(`Plugin ${t.id}#deactivate() method missing (depends on ${e})`);for(let e of i){let t=[...e.requires,...e.optional].map((e=>{let t=this._services.get(e);return t?this._plugins.get(t).service:null}));await e.deactivate(this.application,...t),e.service=null,e.activated=!1}return n.pop(),n}async resolveRequiredService(e){let t=this._services.get(e);if(!t)throw new TypeError(`No provider for: ${e.name}.`);let r=this._plugins.get(t);return r.activated||await this.activatePlugin(t),r.service}async resolveOptionalService(e){let t=this._services.get(e);if(!t)return null;let r=this._plugins.get(t);if(!r.activated)try{await this.activatePlugin(t)}catch(e){return console.error(e),null}return r.service}},e.PromiseDelegate=class{constructor(){this.promise=new Promise(((e,t)=>{this._resolve=e,this._reject=t}))}resolve(e){(0,this._resolve)(e)}reject(e){(0,this._reject)(e)}},e.Token=class{constructor(e,t){this.name=e,this.description=t??"",this._tokenStructuralPropertyT=null}}},"object"==typeof e&&typeof t<"u"?i(e,v()):"function"==typeof define&&r.amdO?define(["exports","@lumino/algorithm"],i):i((n=typeof globalThis<"u"?globalThis:n||self).lumino_coreutils={},n.lumino_algorithm)})),_=g(((e,t)=>{var r,n;r=typeof self<"u"?self:e,n=()=>{var e=(()=>{var e=Object.create,t=Object.defineProperty,r=Object.defineProperties,n=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertyNames,o=Object.getOwnPropertySymbols,s=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,h=(e,r,n)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,f=(e,t)=>{for(var r in t||(t={}))l.call(t,r)&&h(e,r,t[r]);if(o)for(var r of o(t))u.call(t,r)&&h(e,r,t[r]);return e},p=(e,t)=>r(e,i(t)),d=(e,t)=>function(){return e&&(t=(0,e[a(e)[0]])(e=0)),t},m=(e,t)=>function(){return t||(0,e[a(e)[0]])((t={exports:{}}).exports,t),t.exports},g=(e,r)=>{for(var n in r)t(e,n,{get:r[n],enumerable:!0})},y=(e,r,i,o)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let s of a(r))!l.call(e,s)&&s!==i&&t(e,s,{get:()=>r[s],enumerable:!(o=n(r,s))||o.enumerable});return e},v=e=>y(t({},"__esModule",{value:!0}),e),x=m({"src/version.js"(e){e.version="3.5.0"}}),_=m({"node_modules/native-promise-only/lib/npo.src.js"(e,t){var r,n;r="Promise",(n=typeof window<"u"?window:e)[r]=n[r]||function(){var e,t,r,n=Object.prototype.toString,i=typeof setImmediate<"u"?function(e){return setImmediate(e)}:setTimeout;try{Object.defineProperty({},"x",{}),e=function(e,t,r,n){return Object.defineProperty(e,t,{value:r,writable:!0,configurable:!1!==n})}}catch{e=function(e,t,r){return e[t]=r,e}}function a(e,n){r.add(e,n),t||(t=i(r.drain))}function o(e){var t,r=typeof e;return null!=e&&("object"==r||"function"==r)&&(t=e.then),"function"==typeof t&&t}function s(){for(var e=0;e0&&a(s,r))}catch(e){u.call(new f(r),e)}}}function u(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&a(s,t))}function h(e,t,r,n){for(var i=0;it?1:e>=t?0:NaN}function p(e){return null===e?NaN:+e}function d(e){return!isNaN(e)}function m(e){return{left:function(t,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=t.length);n>>1;e(t[a],r)<0?n=a+1:i=a}return n},right:function(t,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=t.length);n>>1;e(t[a],r)>0?i=a:n=a+1}return n}}}e.ascending=f,e.descending=function(e,t){return te?1:t>=e?0:NaN},e.min=function(e,t){var r,n,i=-1,a=e.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++in&&(r=n)}else{for(;++i=n){r=n;break}for(;++in&&(r=n)}return r},e.max=function(e,t){var r,n,i=-1,a=e.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++ir&&(r=n)}else{for(;++i=n){r=n;break}for(;++ir&&(r=n)}return r},e.extent=function(e,t){var r,n,i,a=-1,o=e.length;if(1===arguments.length){for(;++a=n){r=i=n;break}for(;++an&&(r=n),i=n){r=i=n;break}for(;++an&&(r=n),i1)return o/(l-1)},e.deviation=function(){var t=e.variance.apply(this,arguments);return t&&Math.sqrt(t)};var g=m(f);function y(e){return e.length}e.bisectLeft=g.left,e.bisect=e.bisectRight=g.right,e.bisector=function(e){return m(1===e.length?function(t,r){return f(e(t),r)}:e)},e.shuffle=function(e,t,r){(a=arguments.length)<3&&(r=e.length,a<2&&(t=0));for(var n,i,a=r-t;a;)i=Math.random()*a--|0,n=e[a+t],e[a+t]=e[i+t],e[i+t]=n;return e},e.permute=function(e,t){for(var r=t.length,n=new Array(r);r--;)n[r]=e[t[r]];return n},e.pairs=function(e){for(var t=0,r=e.length-1,n=e[0],i=new Array(r<0?0:r);t=0;)for(t=(n=e[i]).length;--t>=0;)r[--o]=n[t];return r};var v=Math.abs;function x(e,t){for(var r in t)Object.defineProperty(e.prototype,r,{value:t[r],enumerable:!1})}function _(){this._=Object.create(null)}function b(e){return"__proto__"==(e+="")||"\0"===e[0]?"\0"+e:e}function w(e){return"\0"===(e+="")[0]?e.slice(1):e}function T(e){return b(e)in this._}function k(e){return(e=b(e))in this._&&delete this._[e]}function A(){var e=[];for(var t in this._)e.push(w(t));return e}function M(){var e=0;for(var t in this._)++e;return e}function S(){for(var e in this._)return!1;return!0}function E(){this._=Object.create(null)}function C(e){return e}function I(e,t,r){return function(){var n=r.apply(t,arguments);return n===t?e:n}}function L(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var r=0,n=P.length;rt;)i.push(n/a);else for(;(n=e+r*++o)=i.length)return r?r.call(n,a):t?a.sort(t):a;for(var l,c,u,h,f=-1,p=a.length,d=i[s++],m=new _;++f=i.length)return e;var r=[],n=a[t++];return e.forEach((function(e,n){r.push({key:e,values:s(n,t)})})),n?r.sort((function(e,t){return n(e.key,t.key)})):r}return n.map=function(e,t){return o(t,e,0)},n.entries=function(t){return s(o(e.map,t,0),0)},n.key=function(e){return i.push(e),n},n.sortKeys=function(e){return a[i.length-1]=e,n},n.sortValues=function(e){return t=e,n},n.rollup=function(e){return r=e,n},n},e.set=function(e){var t=new E;if(e)for(var r=0,n=e.length;r=0&&(n=e.slice(r+1),e=e.slice(0,r)),e)return arguments.length<2?this[e].on(n):this[e].on(n,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(n,null);return this}},e.event=null,e.requote=function(e){return e.replace(j,"\\$&")};var j=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,N={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)e[r]=t[r]};function U(e){return N(e,G),e}var V=function(e,t){return t.querySelector(e)},q=function(e,t){return t.querySelectorAll(e)},H=function(e,t){var r=e.matches||e[L(e,"matchesSelector")];return(H=function(e,t){return r.call(e,t)})(e,t)};"function"==typeof Sizzle&&(V=function(e,t){return Sizzle(e,t)[0]||null},q=Sizzle,H=Sizzle.matchesSelector),e.selection=function(){return e.select(i.documentElement)};var G=e.selection.prototype=[];function W(e){return"function"==typeof e?e:function(){return V(e,this)}}function Z(e){return"function"==typeof e?e:function(){return q(e,this)}}G.select=function(e){var t,r,n,i,a=[];e=W(e);for(var o=-1,s=this.length;++o=0&&"xmlns"!==(r=e.slice(0,t))&&(e=e.slice(t+1)),X.hasOwnProperty(r)?{space:X[r],local:e}:e}},G.attr=function(t,r){if(arguments.length<2){if("string"==typeof t){var n=this.node();return(t=e.ns.qualify(t)).local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}for(r in t)this.each($(r,t[r]));return this}return this.each($(t,r))},G.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var r=this.node(),n=(e=Q(e)).length,i=-1;if(t=r.classList){for(;++i=0;)(r=n[i])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},G.sort=function(e){e=le.apply(this,arguments);for(var t=-1,r=this.length;++t0&&(t=t.slice(0,o));var l=pe.get(t);function c(){var e=this[a];e&&(this.removeEventListener(t,e,e.$),delete this[a])}return l&&(t=l,s=me),o?r?function(){var e=s(r,n(arguments));c.call(this),this.addEventListener(t,this[a]=e,e.$=i),e._=r}:c:r?z:function(){var r,n=new RegExp("^__on([^.]+)"+e.requote(t)+"$");for(var i in this)if(r=i.match(n)){var a=this[i];this.removeEventListener(r[1],a,a.$),delete this[i]}}}e.selection.enter=ue,e.selection.enter.prototype=he,he.append=G.append,he.empty=G.empty,he.node=G.node,he.call=G.call,he.size=G.size,he.select=function(e){for(var t,r,n,i,a,o=[],s=-1,l=this.length;++s=t&&(t=i+1);!(o=s[t])&&++t1?Me:e<-1?-Me:Math.asin(e)}function Le(e){return((e=Math.exp(e))+1/e)/2}var Pe=Math.SQRT2;e.interpolateZoom=function(e,t){var r,n,i=e[0],a=e[1],o=e[2],s=t[0],l=t[1],c=t[2],u=s-i,h=l-a,f=u*u+h*h;if(f<1e-12)n=Math.log(c/o)/Pe,r=function(e){return[i+e*u,a+e*h,o*Math.exp(Pe*e*n)]};else{var p=Math.sqrt(f),d=(c*c-o*o+4*f)/(2*o*2*p),m=(c*c-o*o-4*f)/(2*c*2*p),g=Math.log(Math.sqrt(d*d+1)-d),y=Math.log(Math.sqrt(m*m+1)-m);n=(y-g)/Pe,r=function(e){var t=e*n,r=Le(g),s=o/(2*p)*(r*function(e){return((e=Math.exp(2*e))-1)/(e+1)}(Pe*t+g)-function(e){return((e=Math.exp(e))-1/e)/2}(g));return[i+s*u,a+s*h,o*r/Le(Pe*t+g)]}}return r.duration=1e3*n,r},e.behavior.zoom=function(){var t,r,n,a,s,l,c,u,h,f={x:0,y:0,k:1},p=[960,500],d=Oe,m=250,g=0,y="mousedown.zoom",v="mousemove.zoom",x="mouseup.zoom",_="touchstart.zoom",b=B(w,"zoomstart","zoom","zoomend");function w(e){e.on(y,L).on(De+".zoom",z).on("dblclick.zoom",D).on(_,P)}function T(e){return[(e[0]-f.x)/f.k,(e[1]-f.y)/f.k]}function k(e){f.k=Math.max(d[0],Math.min(d[1],e))}function A(e,t){t=function(e){return[e[0]*f.k+f.x,e[1]*f.k+f.y]}(t),f.x+=e[0]-t[0],f.y+=e[1]-t[1]}function M(t,n,i,a){t.__chart__={x:f.x,y:f.y,k:f.k},k(Math.pow(2,a)),A(r=n,i),t=e.select(t),m>0&&(t=t.transition().duration(m)),t.call(w.event)}function S(){c&&c.domain(l.range().map((function(e){return(e-f.x)/f.k})).map(l.invert)),h&&h.domain(u.range().map((function(e){return(e-f.y)/f.k})).map(u.invert))}function E(e){g++||e({type:"zoomstart"})}function C(e){S(),e({type:"zoom",scale:f.k,translate:[f.x,f.y]})}function I(e){--g||(e({type:"zoomend"}),r=null)}function L(){var t=this,r=b.of(t,arguments),n=0,i=e.select(o(t)).on(v,(function(){n=1,A(e.mouse(t),a),C(r)})).on(x,(function(){i.on(v,null).on(x,null),s(n),I(r)})),a=T(e.mouse(t)),s=ve(t);Wi.call(t),E(r)}function P(){var t,r=this,n=b.of(r,arguments),i={},a=0,o=".zoom-"+e.event.changedTouches[0].identifier,l="touchmove"+o,c="touchend"+o,u=[],h=e.select(r),p=ve(r);function d(){var n=e.touches(r);return t=f.k,n.forEach((function(e){e.identifier in i&&(i[e.identifier]=T(e))})),n}function m(){var t=e.event.target;e.select(t).on(l,g).on(c,v),u.push(t);for(var n=e.event.changedTouches,o=0,h=n.length;o1){y=p[0];var x=p[1],_=y[0]-x[0],b=y[1]-x[1];a=_*_+b*b}}function g(){var o,l,c,u,h=e.touches(r);Wi.call(r);for(var f=0,p=h.length;f360?e-=360:e<0&&(e+=360),e<60?n+(i-n)*e/60:e<180?i:e<240?n+(i-n)*(240-e)/60:n}(e))}return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)||t<0?0:t>1?1:t,n=2*(r=r<0?0:r>1?1:r)-(i=r<=.5?r*(1+t):r+t-r*t),new Qe(a(e+120),a(e),a(e-120))}function Ne(t,r,n){return this instanceof Ne?(this.h=+t,this.c=+r,void(this.l=+n)):arguments.length<2?t instanceof Ne?new Ne(t.h,t.c,t.l):function(e,t,r){return e>0?new Ne(Math.atan2(r,t)*Ee,Math.sqrt(t*t+r*r),e):new Ne(NaN,NaN,e)}(t instanceof qe?t.l:(t=ot((t=e.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new Ne(t,r,n)}Be.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new Fe(this.h,this.s,this.l/e)},Be.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new Fe(this.h,this.s,e*this.l)},Be.rgb=function(){return je(this.h,this.s,this.l)},e.hcl=Ne;var Ue=Ne.prototype=new Re;function Ve(e,t,r){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new qe(r,Math.cos(e*=Se)*t,Math.sin(e)*t)}function qe(e,t,r){return this instanceof qe?(this.l=+e,this.a=+t,void(this.b=+r)):arguments.length<2?e instanceof qe?new qe(e.l,e.a,e.b):e instanceof Ne?Ve(e.h,e.c,e.l):ot((e=Qe(e)).r,e.g,e.b):new qe(e,t,r)}Ue.brighter=function(e){return new Ne(this.h,this.c,Math.min(100,this.l+He*(arguments.length?e:1)))},Ue.darker=function(e){return new Ne(this.h,this.c,Math.max(0,this.l-He*(arguments.length?e:1)))},Ue.rgb=function(){return Ve(this.h,this.c,this.l).rgb()},e.lab=qe;var He=18,Ge=.95047,We=1,Ze=1.08883,Ye=qe.prototype=new Re;function Xe(e,t,r){var n=(e+16)/116,i=n+t/500,a=n-r/200;return new Qe(Je(3.2404542*(i=$e(i)*Ge)-1.5371385*(n=$e(n)*We)-.4985314*(a=$e(a)*Ze)),Je(-.969266*i+1.8760108*n+.041556*a),Je(.0556434*i-.2040259*n+1.0572252*a))}function $e(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function Ke(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function Je(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function Qe(e,t,r){return this instanceof Qe?(this.r=~~e,this.g=~~t,void(this.b=~~r)):arguments.length<2?e instanceof Qe?new Qe(e.r,e.g,e.b):it(""+e,Qe,je):new Qe(e,t,r)}function et(e){return new Qe(e>>16,e>>8&255,255&e)}function tt(e){return et(e)+""}Ye.brighter=function(e){return new qe(Math.min(100,this.l+He*(arguments.length?e:1)),this.a,this.b)},Ye.darker=function(e){return new qe(Math.max(0,this.l-He*(arguments.length?e:1)),this.a,this.b)},Ye.rgb=function(){return Xe(this.l,this.a,this.b)},e.rgb=Qe;var rt=Qe.prototype=new Re;function nt(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function it(e,t,r){var n,i,a,o=0,s=0,l=0;if(n=/([a-z]+)\((.*)\)/.exec(e=e.toLowerCase()))switch(i=n[2].split(","),n[1]){case"hsl":return r(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(lt(i[0]),lt(i[1]),lt(i[2]))}return(a=ct.get(e))?t(a.r,a.g,a.b):(null!=e&&"#"===e.charAt(0)&&!isNaN(a=parseInt(e.slice(1),16))&&(4===e.length?(o=(3840&a)>>4,o|=o>>4,s=240&a,s|=s>>4,l=15&a,l|=l<<4):7===e.length&&(o=(16711680&a)>>16,s=(65280&a)>>8,l=255&a)),t(o,s,l))}function at(e,t,r){var n,i,a=Math.min(e/=255,t/=255,r/=255),o=Math.max(e,t,r),s=o-a,l=(o+a)/2;return s?(i=l<.5?s/(o+a):s/(2-o-a),n=e==o?(t-r)/s+(t0&&l<1?0:n),new Fe(n,i,l)}function ot(e,t,r){var n=Ke((.4124564*(e=st(e))+.3575761*(t=st(t))+.1804375*(r=st(r)))/Ge),i=Ke((.2126729*e+.7151522*t+.072175*r)/We);return qe(116*i-16,500*(n-i),200*(i-Ke((.0193339*e+.119192*t+.9503041*r)/Ze)))}function st(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function lt(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}rt.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,r=this.g,n=this.b,i=30;return t||r||n?(t&&t=200&&t<300||304===t){try{e=i.call(o,c)}catch(e){return void s.error.call(o,e)}s.load.call(o,e)}else s.error.call(o,c)}return self.XDomainRequest&&!("withCredentials"in c)&&/^(http(s)?:)?\/\//.test(t)&&(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=h:c.onreadystatechange=function(){c.readyState>3&&h()},c.onprogress=function(t){var r=e.event;e.event=t;try{s.progress.call(o,c)}finally{e.event=r}},o.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?l[e]:(null==t?delete l[e]:l[e]=t+"",o)},o.mimeType=function(e){return arguments.length?(r=null==e?null:e+"",o):r},o.responseType=function(e){return arguments.length?(u=e,o):u},o.response=function(e){return i=e,o},["get","post"].forEach((function(e){o[e]=function(){return o.send.apply(o,[e].concat(n(arguments)))}})),o.send=function(e,n,i){if(2===arguments.length&&"function"==typeof n&&(i=n,n=null),c.open(e,t,!0),null!=r&&!("accept"in l)&&(l.accept=r+",*/*"),c.setRequestHeader)for(var a in l)c.setRequestHeader(a,l[a]);return null!=r&&c.overrideMimeType&&c.overrideMimeType(r),null!=u&&(c.responseType=u),null!=i&&o.on("error",i).on("load",(function(e){i(null,e)})),s.beforesend.call(o,c),c.send(n??null),o},o.abort=function(){return c.abort(),o},e.rebind(o,s,"on"),null==a?o:o.get(function(e){return 1===e.length?function(t,r){e(null==t?r:null)}:e}(a))}ct.forEach((function(e,t){ct.set(e,et(t))})),e.functor=ut,e.xhr=ht(C),e.dsv=function(e,t){var r=new RegExp('["'+e+"\n]"),n=e.charCodeAt(0);function i(e,r,n){arguments.length<3&&(n=r,r=null);var i=ft(e,t,null==r?a:o(r),n);return i.row=function(e){return arguments.length?i.response(null==(r=e)?a:o(e)):r},i}function a(e){return i.parse(e.responseText)}function o(e){return function(t){return i.parse(t.responseText,e)}}function s(t){return t.map(l).join(e)}function l(e){return r.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}return i.parse=function(e,t){var r;return i.parseRows(e,(function(e,n){if(r)return r(e,n-1);var i=function(t){for(var r={},n=e.length,i=0;i=l)return o;if(i)return i=!1,a;var t=c;if(34===e.charCodeAt(t)){for(var r=t;r++24?(isFinite(t)&&(clearTimeout(gt),gt=setTimeout(xt,t)),mt=0):(mt=1,yt(xt))}function _t(){for(var e=Date.now(),t=pt;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function bt(){for(var e,t=pt,r=1/0;t;)t.c?(t.t1&&Ce(e[r[n-2]],e[r[n-1]],e[i])<=0;)--n;r[n++]=i}return r.slice(0,n)}function At(e,t){return e[0]-t[0]||e[1]-t[1]}e.timer=function(){vt.apply(this,arguments)},e.timer.flush=function(){_t(),bt()},e.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},e.geom={},e.geom.hull=function(e){var t=wt,r=Tt;if(arguments.length)return n(e);function n(e){if(e.length<3)return[];var n,i=ut(t),a=ut(r),o=e.length,s=[],l=[];for(n=0;n=0;--n)p.push(e[s[c[n]][2]]);for(n=+h;nwe)s=s.L;else{if(!((i=a-qt(s,o))>we)){n>-we?(t=s.P,r=s):i>-we?(t=s,r=s.N):t=r=s;break}if(!s.R){t=s;break}s=s.R}var l=Bt(e);if(Pt.insert(t,l),t||r){if(t===r)return Yt(t),r=Bt(t.site),Pt.insert(l,r),l.edge=r.edge=Kt(t.site,l.site),Zt(t),void Zt(r);if(!r)return void(l.edge=Kt(t.site,l.site));Yt(t),Yt(r);var c=t.site,u=c.x,h=c.y,f=e.x-u,p=e.y-h,d=r.site,m=d.x-u,g=d.y-h,y=2*(f*g-p*m),v=f*f+p*p,x=m*m+g*g,_={x:(g*v-p*x)/y+u,y:(f*x-m*v)/y+h};Qt(r.edge,c,d,_),l.edge=Kt(c,e,null,_),r.edge=Kt(e,d,null,_),Zt(t),Zt(r)}}function Vt(e,t){var r=e.site,n=r.x,i=r.y,a=i-t;if(!a)return n;var o=e.P;if(!o)return-1/0;var s=(r=o.site).x,l=r.y,c=l-t;if(!c)return s;var u=s-n,h=1/a-1/c,f=u/c;return h?(-f+Math.sqrt(f*f-2*h*(u*u/(-2*c)-l+c/2+i-a/2)))/h+n:(n+s)/2}function qt(e,t){var r=e.N;if(r)return Vt(r,t);var n=e.site;return n.y===t?n.x:1/0}function Ht(e){this.site=e,this.edges=[]}function Gt(e,t){return t.angle-e.angle}function Wt(){rr(this),this.x=this.y=this.arc=this.site=this.cy=null}function Zt(e){var t=e.P,r=e.N;if(t&&r){var n=t.site,i=e.site,a=r.site;if(n!==a){var o=i.x,s=i.y,l=n.x-o,c=n.y-s,u=a.x-o,h=2*(l*(g=a.y-s)-c*u);if(!(h>=-1e-12)){var f=l*l+c*c,p=u*u+g*g,d=(g*f-c*p)/h,m=(l*p-u*f)/h,g=m+s,y=Rt.pop()||new Wt;y.arc=e,y.site=i,y.x=d+o,y.y=g+Math.sqrt(d*d+m*m),y.cy=g,e.circle=y;for(var v=null,x=Dt._;x;)if(y.y=s)return;if(f>d){if(a){if(a.y>=c)return}else a={x:g,y:l};r={x:g,y:c}}else{if(a){if(a.y1)if(f>d){if(a){if(a.y>=c)return}else a={x:(l-i)/n,y:l};r={x:(c-i)/n,y:c}}else{if(a){if(a.y=s)return}else a={x:o,y:n*o+i};r={x:s,y:n*s+i}}else{if(a){if(a.x0)){if(a/=f,f<0){if(a0){if(a>h)return;a>u&&(u=a)}if(a=r-l,f||!(a<0)){if(a/=f,f<0){if(a>h)return;a>u&&(u=a)}else if(f>0){if(a0)){if(a/=p,p<0){if(a0){if(a>h)return;a>u&&(u=a)}if(a=n-c,p||!(a<0)){if(a/=p,p<0){if(a>h)return;a>u&&(u=a)}else if(p>0){if(a0&&(i.a={x:l+u*f,y:c+u*p}),h<1&&(i.b={x:l+h*f,y:c+h*p}),i}}}}}}(e[0][0],e[0][1],e[1][0],e[1][1]),i=r.length;i--;)(!Xt(t=r[i],e)||!n(t)||v(t.a.x-t.b.x)we||v(i-r)>we)&&(s.splice(o,0,new er(Jt(a.site,u,v(n-h)we?{x:h,y:v(t-h)we?{x:v(r-d)we?{x:f,y:v(t-f)we?{x:v(r-p)=r&&c.x<=i&&c.y>=n&&c.y<=o?[[r,o],[i,o],[i,n],[r,n]]:[]).point=e[s]})),t}function s(e){return e.map((function(e,t){return{x:Math.round(n(e,t)/we)*we,y:Math.round(i(e,t)/we)*we,i:t}}))}return o.links=function(e){return or(s(e)).edges.filter((function(e){return e.l&&e.r})).map((function(t){return{source:e[t.l.i],target:e[t.r.i]}}))},o.triangles=function(e){var t=[];return or(s(e)).cells.forEach((function(r,n){for(var i,a=r.site,o=r.edges.sort(Gt),s=-1,l=o.length,c=o[l-1].edge,u=c.l===a?c.r:c.l;++sa&&(i=t.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:mr(r,n)})),a=vr.lastIndex;return am&&(m=l.x),l.y>g&&(g=l.y),c.push(l.x),u.push(l.y);else for(h=0;hm&&(m=_),b>g&&(g=b),c.push(_),u.push(b)}var w=m-p,T=g-d;function k(e,t,r,n,i,a,o,s){if(!isNaN(r)&&!isNaN(n))if(e.leaf){var l=e.x,c=e.y;if(null!=l)if(v(l-r)+v(c-n)<.01)A(e,t,r,n,i,a,o,s);else{var u=e.point;e.x=e.y=e.point=null,A(e,u,l,c,i,a,o,s),A(e,t,r,n,i,a,o,s)}else e.x=r,e.y=n,e.point=t}else A(e,t,r,n,i,a,o,s)}function A(e,t,r,n,i,a,o,s){var l=.5*(i+o),c=.5*(a+s),u=r>=l,h=n>=c,f=h<<1|u;e.leaf=!1,u?i=l:o=l,h?a=c:s=c,k(e=e.nodes[f]||(e.nodes[f]={leaf:!0,nodes:[],point:null,x:null,y:null}),t,r,n,i,a,o,s)}w>T?g=d+w:m=p+T;var M={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(e){k(M,e,+y(e,++h),+x(e,h),p,d,m,g)},visit:function(e){fr(e,M,p,d,m,g)},find:function(e){return function(e,t,r,n,i,a,o){var s,l=1/0;return function e(c,u,h,f,p){if(!(u>a||h>o||f=b)<<1|t>=_,T=w+4;w=0&&!(n=e.interpolators[i](t,r)););return n}function _r(e,t){var r,n=[],i=[],a=e.length,o=t.length,s=Math.min(e.length,t.length);for(r=0;r=1)return 1;var t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}function Cr(e){return 1-Math.cos(e*Me)}function Ir(e){return Math.pow(2,10*(e-1))}function Lr(e){return 1-Math.sqrt(1-e*e)}function Pr(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function zr(e,t){return t-=e,function(r){return Math.round(e+t*r)}}function Dr(e){var t=[e.a,e.b],r=[e.c,e.d],n=Rr(t),i=Or(t,r),a=Rr(function(e,t,r){return e[0]+=r*t[0],e[1]+=r*t[1],e}(r,t,-i))||0;t[0]*r[1]=0?e.slice(0,t):e,i=t>=0?e.slice(t+1):"in";return n=wr.get(n)||br,function(e){return function(t){return t<=0?0:t>=1?1:e(t)}}((i=Tr.get(i)||C)(n.apply(null,r.call(arguments,1))))},e.interpolateHcl=function(t,r){t=e.hcl(t),r=e.hcl(r);var n=t.h,i=t.c,a=t.l,o=r.h-n,s=r.c-i,l=r.l-a;return isNaN(s)&&(s=0,i=isNaN(i)?r.c:i),isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o>180?o-=360:o<-180&&(o+=360),function(e){return Ve(n+o*e,i+s*e,a+l*e)+""}},e.interpolateHsl=function(t,r){t=e.hsl(t),r=e.hsl(r);var n=t.h,i=t.s,a=t.l,o=r.h-n,s=r.s-i,l=r.l-a;return isNaN(s)&&(s=0,i=isNaN(i)?r.s:i),isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o>180?o-=360:o<-180&&(o+=360),function(e){return je(n+o*e,i+s*e,a+l*e)+""}},e.interpolateLab=function(t,r){t=e.lab(t),r=e.lab(r);var n=t.l,i=t.a,a=t.b,o=r.l-n,s=r.a-i,l=r.b-a;return function(e){return Xe(n+o*e,i+s*e,a+l*e)+""}},e.interpolateRound=zr,e.transform=function(t){var r=i.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(e){if(null!=e){r.setAttribute("transform",e);var t=r.transform.baseVal.consolidate()}return new Dr(t?t.matrix:Fr)})(t)},Dr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Fr={a:1,b:0,c:0,d:1,e:0,f:0};function Br(e){return e.length?e.pop()+",":""}function jr(t,r){var n=[],i=[];return t=e.transform(t),r=e.transform(r),function(e,t,r,n){if(e[0]!==t[0]||e[1]!==t[1]){var i=r.push("translate(",null,",",null,")");n.push({i:i-4,x:mr(e[0],t[0])},{i:i-2,x:mr(e[1],t[1])})}else(t[0]||t[1])&&r.push("translate("+t+")")}(t.translate,r.translate,n,i),function(e,t,r,n){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),n.push({i:r.push(Br(r)+"rotate(",null,")")-2,x:mr(e,t)})):t&&r.push(Br(r)+"rotate("+t+")")}(t.rotate,r.rotate,n,i),function(e,t,r,n){e!==t?n.push({i:r.push(Br(r)+"skewX(",null,")")-2,x:mr(e,t)}):t&&r.push(Br(r)+"skewX("+t+")")}(t.skew,r.skew,n,i),function(e,t,r,n){if(e[0]!==t[0]||e[1]!==t[1]){var i=r.push(Br(r)+"scale(",null,",",null,")");n.push({i:i-4,x:mr(e[0],t[0])},{i:i-2,x:mr(e[1],t[1])})}else(1!==t[0]||1!==t[1])&&r.push(Br(r)+"scale("+t+")")}(t.scale,r.scale,n,i),t=r=null,function(e){for(var t,r=-1,a=i.length;++r0?n=e:(t.c=null,t.t=NaN,t=null,l.end({type:"end",alpha:n=0})):e>0&&(l.start({type:"start",alpha:n=e}),t=vt(s.tick)),s):n},s.start=function(){var e,t,r,n=y.length,l=v.length,u=c[0],d=c[1];for(e=0;e=0;)r.push(i[n])}function en(e,t){for(var r=[e],n=[];null!=(e=r.pop());)if(n.push(e),(a=e.children)&&(i=a.length))for(var i,a,o=-1;++o=0;)o.push(u=c[l]),u.parent=a,u.depth=a.depth+1;r&&(a.value=0),a.children=c}else r&&(a.value=+r.call(n,a,a.depth)||0),delete a.children;return en(i,(function(t){var n,i;e&&(n=t.children)&&n.sort(e),r&&(i=t.parent)&&(i.value+=t.value)})),s}return n.sort=function(t){return arguments.length?(e=t,n):e},n.children=function(e){return arguments.length?(t=e,n):t},n.value=function(e){return arguments.length?(r=e,n):r},n.revalue=function(e){return r&&(Qr(e,(function(e){e.children&&(e.value=0)})),en(e,(function(e){var t;e.children||(e.value=+r.call(n,e,e.depth)||0),(t=e.parent)&&(t.value+=e.value)}))),e},n},e.layout.partition=function(){var t=e.layout.hierarchy(),r=[1,1];function n(e,t,r,i){var a=e.children;if(e.x=t,e.y=e.depth*i,e.dx=r,e.dy=i,a&&(o=a.length)){var o,s,l,c=-1;for(r=e.value?r/e.value:0;++cs&&(s=n),o.push(n)}for(r=0;ri&&(n=r,i=t);return n}function mn(e){return e.reduce(gn,0)}function gn(e,t){return e+t[1]}function yn(e,t){return vn(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function vn(e,t){for(var r=-1,n=+e[0],i=(e[1]-n)/t,a=[];++r<=t;)a[r]=i*r+n;return a}function xn(t){return[e.min(t),e.max(t)]}function _n(e,t){return e.value-t.value}function bn(e,t){var r=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=r,r._pack_prev=t}function wn(e,t){e._pack_next=t,t._pack_prev=e}function Tn(e,t){var r=t.x-e.x,n=t.y-e.y,i=e.r+t.r;return.999*i*i>r*r+n*n}function kn(e){if((t=e.children)&&(l=t.length)){var t,r,n,i,a,o,s,l,c=1/0,u=-1/0,h=1/0,f=-1/0;if(t.forEach(An),(r=t[0]).x=-r.r,r.y=0,x(r),l>1&&((n=t[1]).x=n.r,n.y=0,x(n),l>2))for(En(r,n,i=t[2]),x(i),bn(r,i),r._pack_prev=i,bn(i,n),n=r._pack_next,a=3;a0)for(o=-1;++o=h[0]&&l<=h[1]&&((s=c[e.bisect(f,l,1,d)-1]).y+=m,s.push(a[o]));return c}return a.value=function(e){return arguments.length?(r=e,a):r},a.range=function(e){return arguments.length?(n=ut(e),a):n},a.bins=function(e){return arguments.length?(i="number"==typeof e?function(t){return vn(t,e)}:ut(e),a):i},a.frequency=function(e){return arguments.length?(t=!!e,a):t},a},e.layout.pack=function(){var t,r=e.layout.hierarchy().sort(_n),n=0,i=[1,1];function a(e,a){var o=r.call(this,e,a),s=o[0],l=i[0],c=i[1],u=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(s.x=s.y=0,en(s,(function(e){e.r=+u(e.value)})),en(s,kn),n){var h=n*(t?1:Math.max(2*s.r/l,2*s.r/c))/2;en(s,(function(e){e.r+=h})),en(s,kn),en(s,(function(e){e.r-=h}))}return Sn(s,l/2,c/2,t?1:1/Math.max(2*s.r/l,2*s.r/c)),o}return a.size=function(e){return arguments.length?(i=e,a):i},a.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,a):t},a.padding=function(e){return arguments.length?(n=+e,a):n},Jr(a,r)},e.layout.tree=function(){var t=e.layout.hierarchy().sort(null).value(null),r=Cn,n=[1,1],i=null;function a(e,a){var c=t.call(this,e,a),u=c[0],h=function(e){for(var t,r={A:null,children:[e]},n=[r];null!=(t=n.pop());)for(var i,a=t.children,o=0,s=a.length;op.x&&(p=e),e.depth>d.depth&&(d=e)}));var m=r(f,p)/2-f.x,g=n[0]/(p.x+r(p,f)/2+m),y=n[1]/(d.depth||1);Qr(u,(function(e){e.x=(e.x+m)*g,e.y=e.depth*y}))}return c}function o(e){var t=e.children,n=e.parent.children,i=e.i?n[e.i-1]:null;if(t.length){!function(e){for(var t,r=0,n=0,i=e.children,a=i.length;--a>=0;)(t=i[a]).z+=r,t.m+=r,r+=t.s+(n+=t.c)}(e);var a=(t[0].z+t[t.length-1].z)/2;i?(e.z=i.z+r(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+r(e._,i._));e.parent.A=function(e,t,n){if(t){for(var i,a=e,o=e,s=t,l=a.parent.children[0],c=a.m,u=o.m,h=s.m,f=l.m;s=Ln(s),a=In(a),s&&a;)l=In(l),(o=Ln(o)).a=e,(i=s.z+h-a.z-c+r(s._,a._))>0&&(Pn(zn(s,e,n),e,i),c+=i,u+=i),h+=s.m,c+=a.m,f+=l.m,u+=o.m;s&&!Ln(o)&&(o.t=s,o.m+=h-u),a&&!In(l)&&(l.t=a,l.m+=c-f,n=e)}return n}(e,i,e.parent.A||n[0])}function s(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function l(e){e.x*=n[0],e.y=e.depth*n[1]}return a.separation=function(e){return arguments.length?(r=e,a):r},a.size=function(e){return arguments.length?(i=null==(n=e)?l:null,a):i?null:n},a.nodeSize=function(e){return arguments.length?(i=null==(n=e)?null:l,a):i?n:null},Jr(a,t)},e.layout.cluster=function(){var t=e.layout.hierarchy().sort(null).value(null),r=Cn,n=[1,1],i=!1;function a(a,o){var s,l=t.call(this,a,o),c=l[0],u=0;en(c,(function(t){var n=t.children;n&&n.length?(t.x=function(e){return e.reduce((function(e,t){return e+t.x}),0)/e.length}(n),t.y=function(t){return 1+e.max(t,(function(e){return e.y}))}(n)):(t.x=s?u+=r(t,s):0,t.y=0,s=t)}));var h=Dn(c),f=On(c),p=h.x-r(h,f)/2,d=f.x+r(f,h)/2;return en(c,i?function(e){e.x=(e.x-c.x)*n[0],e.y=(c.y-e.y)*n[1]}:function(e){e.x=(e.x-p)/(d-p)*n[0],e.y=(1-(c.y?e.y/c.y:1))*n[1]}),l}return a.separation=function(e){return arguments.length?(r=e,a):r},a.size=function(e){return arguments.length?(i=null==(n=e),a):i?null:n},a.nodeSize=function(e){return arguments.length?(i=null!=(n=e),a):i?n:null},Jr(a,t)},e.layout.treemap=function(){var t,r=e.layout.hierarchy(),n=Math.round,i=[1,1],a=null,o=Rn,s=!1,l="squarify",c=.5*(1+Math.sqrt(5));function u(e,t){for(var r,n,i=-1,a=e.length;++i0;)s.push(r=c[i-1]),s.area+=r.area,"squarify"!==l||(n=p(s,m))<=f?(c.pop(),f=n):(s.area-=s.pop().area,d(s,m,a,!1),m=Math.min(a.dx,a.dy),s.length=s.area=0,f=1/0);s.length&&(d(s,m,a,!0),s.length=s.area=0),t.forEach(h)}}function f(e){var t=e.children;if(t&&t.length){var r,n=o(e),i=t.slice(),a=[];for(u(i,n.dx*n.dy/e.value),a.area=0;r=i.pop();)a.push(r),a.area+=r.area,null!=r.z&&(d(a,r.z?n.dx:n.dy,n,!i.length),a.length=a.area=0);t.forEach(f)}}function p(e,t){for(var r,n=e.area,i=0,a=1/0,o=-1,s=e.length;++oi&&(i=r));return t*=t,(n*=n)?Math.max(t*i*c/n,n/(t*a*c)):1/0}function d(e,t,r,i){var a,o=-1,s=e.length,l=r.x,c=r.y,u=t?n(e.area/t):0;if(t==r.dx){for((i||u>r.dy)&&(u=r.dy);++or.dx)&&(u=r.dx);++o1);return e+t*r*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=e.random.normal.apply(e,arguments);return function(){return Math.exp(t())}},bates:function(t){var r=e.random.irwinHall(t);return function(){return r()/t}},irwinHall:function(e){return function(){for(var t=0,r=0;r2?Hn:Nn,l=n?Ur:Nr;return i=o(e,t,l,r),a=o(t,e,l,xr),s}function s(e){return i(e)}return s.invert=function(e){return a(e)},s.domain=function(t){return arguments.length?(e=t.map(Number),o()):e},s.range=function(e){return arguments.length?(t=e,o()):t},s.rangeRound=function(e){return s.range(e).interpolate(zr)},s.clamp=function(e){return arguments.length?(n=e,o()):n},s.interpolate=function(e){return arguments.length?(r=e,o()):r},s.ticks=function(t){return Xn(e,t)},s.tickFormat=function(t,r){return d3_scale_linearTickFormat(e,t,r)},s.nice=function(t){return Zn(e,t),o()},s.copy=function(){return Gn(e,t,r,n)},o()}function Wn(t,r){return e.rebind(t,r,"range","rangeRound","interpolate","clamp")}function Zn(e,t){return Un(e,Vn(Yn(e,t)[2])),Un(e,Vn(Yn(e,t)[2])),e}function Yn(e,t){null==t&&(t=10);var r=Bn(e),n=r[1]-r[0],i=Math.pow(10,Math.floor(Math.log(n/t)/Math.LN10)),a=t/n*i;return a<=.15?i*=10:a<=.35?i*=5:a<=.75&&(i*=2),r[0]=Math.ceil(r[0]/i)*i,r[1]=Math.floor(r[1]/i)*i+.5*i,r[2]=i,r}function Xn(t,r){return e.range.apply(e,Yn(t,r))}function $n(e,t,r,n){function i(e){return(r?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(t)}function a(e){return r?Math.pow(t,e):-Math.pow(t,-e)}function o(t){return e(i(t))}return o.invert=function(t){return a(e.invert(t))},o.domain=function(t){return arguments.length?(r=t[0]>=0,e.domain((n=t.map(Number)).map(i)),o):n},o.base=function(r){return arguments.length?(t=+r,e.domain(n.map(i)),o):t},o.nice=function(){var t=Un(n.map(i),r?Math:Kn);return e.domain(t),n=t.map(a),o},o.ticks=function(){var e=Bn(n),o=[],s=e[0],l=e[1],c=Math.floor(i(s)),u=Math.ceil(i(l)),h=t%1?2:t;if(isFinite(u-c)){if(r){for(;c0;f--)o.push(a(c)*f);for(c=0;o[c]l;u--);o=o.slice(c,u)}return o},o.copy=function(){return $n(e.copy(),t,r,n)},Wn(o,e)}e.scale.linear=function(){return Gn([0,1],[0,1],xr,!1)},e.scale.log=function(){return $n(e.scale.linear().domain([0,1]),10,!0,[1,10])};var Kn={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};function Jn(e,t,r){var n=Qn(t),i=Qn(1/t);function a(t){return e(n(t))}return a.invert=function(t){return i(e.invert(t))},a.domain=function(t){return arguments.length?(e.domain((r=t.map(Number)).map(n)),a):r},a.ticks=function(e){return Xn(r,e)},a.tickFormat=function(e,t){return d3_scale_linearTickFormat(r,e,t)},a.nice=function(e){return a.domain(Zn(r,e))},a.exponent=function(o){return arguments.length?(n=Qn(t=o),i=Qn(1/t),e.domain(r.map(n)),a):t},a.copy=function(){return Jn(e.copy(),t,r)},Wn(a,e)}function Qn(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function ei(t,r){var n,i,a;function o(e){return i[((n.get(e)||("range"===r.t?n.set(e,t.push(e)):NaN))-1)%i.length]}function s(r,n){return e.range(t.length).map((function(e){return r+n*e}))}return o.domain=function(e){if(!arguments.length)return t;t=[],n=new _;for(var i,a=-1,s=e.length;++a0?n[e-1]:t[0],eh?0:1;if(c=Ae)return l(c,p)+(s?l(s,1-p):"")+"Z";var d,m,g,y,v,x,_,b,w,T,k,A,M=0,S=0,E=[];if((y=(+o.apply(this,arguments)||0)/2)&&(g=n===ui?Math.sqrt(s*s+c*c):+n.apply(this,arguments),p||(S*=-1),c&&(S=Ie(g/c*Math.sin(y))),s&&(M=Ie(g/s*Math.sin(y)))),c){v=c*Math.cos(u+S),x=c*Math.sin(u+S),_=c*Math.cos(h-S),b=c*Math.sin(h-S);var C=Math.abs(h-u-2*S)<=Te?0:1;if(S&&gi(v,x,_,b)===p^C){var I=(u+h)/2;v=c*Math.cos(I),x=c*Math.sin(I),_=b=null}}else v=x=0;if(s){w=s*Math.cos(h-M),T=s*Math.sin(h-M),k=s*Math.cos(u+M),A=s*Math.sin(u+M);var L=Math.abs(u-h+2*M)<=Te?0:1;if(M&&gi(w,T,k,A)===1-p^L){var P=(u+h)/2;w=s*Math.cos(P),T=s*Math.sin(P),k=A=null}}else w=T=0;if(f>we&&(d=Math.min(Math.abs(c-s)/2,+r.apply(this,arguments)))>.001){m=s0?0:1}function yi(e,t,r,n,i){var a=e[0]-t[0],o=e[1]-t[1],s=(i?n:-n)/Math.sqrt(a*a+o*o),l=s*o,c=-s*a,u=e[0]+l,h=e[1]+c,f=t[0]+l,p=t[1]+c,d=(u+f)/2,m=(h+p)/2,g=f-u,y=p-h,v=g*g+y*y,x=r-n,_=u*p-f*h,b=(y<0?-1:1)*Math.sqrt(Math.max(0,x*x*v-_*_)),w=(_*y-g*b)/v,T=(-_*g-y*b)/v,k=(_*y+g*b)/v,A=(-_*g+y*b)/v,M=w-d,S=T-m,E=k-d,C=A-m;return M*M+S*S>E*E+C*C&&(w=k,T=A),[[w-l,T-c],[w*r/x,T*r/x]]}function vi(){return!0}function xi(e){var t=wt,r=Tt,n=vi,i=bi,a=i.key,o=.7;function s(a){var s,l=[],c=[],u=-1,h=a.length,f=ut(t),p=ut(r);function d(){l.push("M",i(e(c),o))}for(;++u1&&i.push("H",n[0]),i.join("")},"step-before":Ti,"step-after":ki,basis:Si,"basis-open":function(e){if(e.length<4)return bi(e);for(var t,r=[],n=-1,i=e.length,a=[0],o=[0];++n<3;)t=e[n],a.push(t[0]),o.push(t[1]);for(r.push(Ei(Li,a)+","+Ei(Li,o)),--n;++n9&&(i=3*t/Math.sqrt(i),o[s]=i*r,o[s+1]=i*n);for(s=-1;++s<=l;)i=(e[Math.min(l,s+1)][0]-e[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),a.push([i||0,o[s]*i||0]);return a}(e))}});function bi(e){return e.length>1?e.join("L"):e+"Z"}function wi(e){return e.join("L")+"Z"}function Ti(e){for(var t=0,r=e.length,n=e[0],i=[n[0],",",n[1]];++t1){s=t[1],a=e[l],l++,n+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(a[0]-s[0])+","+(a[1]-s[1])+","+a[0]+","+a[1];for(var c=2;cTe)+",1 "+t}function l(e,t,r,n){return"Q 0,0 "+n}return a.radius=function(e){return arguments.length?(r=ut(e),a):r},a.source=function(t){return arguments.length?(e=ut(t),a):e},a.target=function(e){return arguments.length?(t=ut(e),a):t},a.startAngle=function(e){return arguments.length?(n=ut(e),a):n},a.endAngle=function(e){return arguments.length?(i=ut(e),a):i},a},e.svg.diagonal=function(){var e=Ri,t=Fi,r=ji;function n(n,i){var a=e.call(this,n,i),o=t.call(this,n,i),s=(a.y+o.y)/2,l=[a,{x:a.x,y:s},{x:o.x,y:s},o];return"M"+(l=l.map(r))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}return n.source=function(t){return arguments.length?(e=ut(t),n):e},n.target=function(e){return arguments.length?(t=ut(e),n):t},n.projection=function(e){return arguments.length?(r=e,n):r},n},e.svg.diagonal.radial=function(){var t=e.svg.diagonal(),r=ji,n=t.projection;return t.projection=function(e){return arguments.length?n(function(e){return function(){var t=e.apply(this,arguments),r=t[0],n=t[1]-Me;return[r*Math.cos(n),r*Math.sin(n)]}}(r=e)):r},t},e.svg.symbol=function(){var e=Ui,t=Ni;function r(r,n){return(qi.get(e.call(this,r,n))||Vi)(t.call(this,r,n))}return r.type=function(t){return arguments.length?(e=ut(t),r):e},r.size=function(e){return arguments.length?(t=ut(e),r):t},r};var qi=e.map({circle:Vi,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*Gi)),r=t*Gi;return"M0,"+-t+"L"+r+",0 0,"+t+" "+-r+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/Hi),r=t*Hi/2;return"M0,"+r+"L"+t+","+-r+" "+-t+","+-r+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Hi),r=t*Hi/2;return"M0,"+-r+"L"+t+","+r+" "+-t+","+r+"Z"}});e.svg.symbolTypes=qi.keys();var Hi=Math.sqrt(3),Gi=Math.tan(30*Se);G.transition=function(e){for(var t,r,n=Xi||++Ji,i=ta(e),a=[],o=$i||{time:Date.now(),ease:Er,delay:0,duration:250},s=-1,l=this.length;++s0;)c[--f].call(e,o);if(a>=1)return h.event&&h.event.end.call(e,e.__data__,t),--u.count?delete u[n]:delete e[r],1}h||(a=i.time,o=vt((function(e){var t=h.delay;if(o.t=t+a,t<=e)return f(e-t);o.c=f}),0,a),h=u[n]={tween:new _,time:a,timer:o,delay:i.delay,duration:i.duration,ease:i.ease,index:t},i=null,++u.count)}Ki.call=G.call,Ki.empty=G.empty,Ki.node=G.node,Ki.size=G.size,e.transition=function(t,r){return t&&t.transition?Xi?t.transition(r):t:e.selection().transition(t)},e.transition.prototype=Ki,Ki.select=function(e){var t,r,n,i=this.id,a=this.namespace,o=[];e=W(e);for(var s=-1,l=this.length;++srect,.s>rect").attr("width",s[1]-s[0])}function m(e){e.select(".extent").attr("y",l[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",l[1]-l[0])}function g(){var h,g,y=this,v=e.select(e.event.target),x=n.of(y,arguments),_=e.select(y),b=v.datum(),w=!/^(n|s)$/.test(b)&&i,T=!/^(e|w)$/.test(b)&&a,k=v.classed("extent"),A=ve(y),M=e.mouse(y),S=e.select(o(y)).on("keydown.brush",(function(){32==e.event.keyCode&&(k||(h=null,M[0]-=s[1],M[1]-=l[1],k=2),R())})).on("keyup.brush",(function(){32==e.event.keyCode&&2==k&&(M[0]+=s[1],M[1]+=l[1],k=0,R())}));if(e.event.changedTouches?S.on("touchmove.brush",I).on("touchend.brush",P):S.on("mousemove.brush",I).on("mouseup.brush",P),_.interrupt().selectAll("*").interrupt(),k)M[0]=s[0]-M[0],M[1]=l[0]-M[1];else if(b){var E=+/w$/.test(b),C=+/^n/.test(b);g=[s[1-E]-M[0],l[1-C]-M[1]],M[0]=s[E],M[1]=l[C]}else e.event.altKey&&(h=M.slice());function I(){var t=e.mouse(y),r=!1;g&&(t[0]+=g[0],t[1]+=g[1]),k||(e.event.altKey?(h||(h=[(s[0]+s[1])/2,(l[0]+l[1])/2]),M[0]=s[+(t[0]0))return o;do{o.push(a=new Date(+t)),i(t,n),e(t)}while(a=r)for(;e(r),!t(r);)r.setTime(r-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;i(e,-1),!t(e););else for(;--r>=0;)for(;i(e,1),!t(e););}))},a&&(s.count=function(n,i){return t.setTime(+n),r.setTime(+i),e(t),e(r),Math.floor(a(t,r))},s.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?s.filter(o?function(t){return o(t)%e==0}:function(t){return s.count(0,t)%e==0}):s:null}),s}var i=n((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?n((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,r){t.setTime(+t+r*e)}),(function(t,r){return(r-t)/e})):i:null};var a=i.range,o=1e3,s=6e4,l=36e5,c=864e5,u=6048e5,h=n((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+t*o)}),(function(e,t){return(t-e)/o}),(function(e){return e.getUTCSeconds()})),f=h.range,p=n((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*o)}),(function(e,t){e.setTime(+e+t*s)}),(function(e,t){return(t-e)/s}),(function(e){return e.getMinutes()})),d=p.range,m=n((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*o-e.getMinutes()*s)}),(function(e,t){e.setTime(+e+t*l)}),(function(e,t){return(t-e)/l}),(function(e){return e.getHours()})),g=m.range,y=n((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*s)/c}),(function(e){return e.getDate()-1})),v=y.range;function x(e){return n((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*s)/u}))}var _=x(0),b=x(1),w=x(2),T=x(3),k=x(4),A=x(5),M=x(6),S=_.range,E=b.range,C=w.range,I=T.range,L=k.range,P=A.range,z=M.range,D=n((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()})),O=D.range,R=n((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));R.every=function(e){return isFinite(e=Math.floor(e))&&e>0?n((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,r){t.setFullYear(t.getFullYear()+r*e)})):null};var F=R.range,B=n((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*s)}),(function(e,t){return(t-e)/s}),(function(e){return e.getUTCMinutes()})),j=B.range,N=n((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*l)}),(function(e,t){return(t-e)/l}),(function(e){return e.getUTCHours()})),U=N.range,V=n((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/c}),(function(e){return e.getUTCDate()-1})),q=V.range;function H(e){return n((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/u}))}var G=H(0),W=H(1),Z=H(2),Y=H(3),X=H(4),$=H(5),K=H(6),J=G.range,Q=W.range,ee=Z.range,te=Y.range,re=X.range,ne=$.range,ie=K.range,ae=n((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()})),oe=ae.range,se=n((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));se.every=function(e){return isFinite(e=Math.floor(e))&&e>0?n((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,r){t.setUTCFullYear(t.getUTCFullYear()+r*e)})):null};var le=se.range;e.timeDay=y,e.timeDays=v,e.timeFriday=A,e.timeFridays=P,e.timeHour=m,e.timeHours=g,e.timeInterval=n,e.timeMillisecond=i,e.timeMilliseconds=a,e.timeMinute=p,e.timeMinutes=d,e.timeMonday=b,e.timeMondays=E,e.timeMonth=D,e.timeMonths=O,e.timeSaturday=M,e.timeSaturdays=z,e.timeSecond=h,e.timeSeconds=f,e.timeSunday=_,e.timeSundays=S,e.timeThursday=k,e.timeThursdays=L,e.timeTuesday=w,e.timeTuesdays=C,e.timeWednesday=T,e.timeWednesdays=I,e.timeWeek=_,e.timeWeeks=S,e.timeYear=R,e.timeYears=F,e.utcDay=V,e.utcDays=q,e.utcFriday=$,e.utcFridays=ne,e.utcHour=N,e.utcHours=U,e.utcMillisecond=i,e.utcMilliseconds=a,e.utcMinute=B,e.utcMinutes=j,e.utcMonday=W,e.utcMondays=Q,e.utcMonth=ae,e.utcMonths=oe,e.utcSaturday=K,e.utcSaturdays=ie,e.utcSecond=h,e.utcSeconds=f,e.utcSunday=G,e.utcSundays=J,e.utcThursday=X,e.utcThursdays=re,e.utcTuesday=Z,e.utcTuesdays=ee,e.utcWednesday=Y,e.utcWednesdays=te,e.utcWeek=G,e.utcWeeks=J,e.utcYear=se,e.utcYears=le,Object.defineProperty(e,"__esModule",{value:!0})},n("object"==typeof e&&typeof t<"u"?e:(r=r||self).d3=r.d3||{})}}),T=m({"node_modules/d3-time-format/dist/d3-time-format.js"(e,t){var r,n;r=e,n=function(e,t){function r(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function n(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function i(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function a(e){var a=e.dateTime,o=e.date,l=e.time,c=e.periods,u=e.days,h=e.shortDays,f=e.months,ve=e.shortMonths,xe=p(c),_e=d(c),be=p(u),we=d(u),Te=p(h),ke=d(h),Ae=p(f),Me=d(f),Se=p(ve),Ee=d(ve),Ce={a:function(e){return h[e.getDay()]},A:function(e){return u[e.getDay()]},b:function(e){return ve[e.getMonth()]},B:function(e){return f[e.getMonth()]},c:null,d:O,e:O,f:N,H:R,I:F,j:B,L:j,m:U,M:V,p:function(e){return c[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:ge,s:ye,S:q,u:H,U:G,V:W,w:Z,W:Y,x:null,X:null,y:X,Y:$,Z:K,"%":me},Ie={a:function(e){return h[e.getUTCDay()]},A:function(e){return u[e.getUTCDay()]},b:function(e){return ve[e.getUTCMonth()]},B:function(e){return f[e.getUTCMonth()]},c:null,d:J,e:J,f:ne,H:Q,I:ee,j:te,L:re,m:ie,M:ae,p:function(e){return c[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:ge,s:ye,S:oe,u:se,U:le,V:ce,w:ue,W:he,x:null,X:null,y:fe,Y:pe,Z:de,"%":me},Le={a:function(e,t,r){var n=Te.exec(t.slice(r));return n?(e.w=ke[n[0].toLowerCase()],r+n[0].length):-1},A:function(e,t,r){var n=be.exec(t.slice(r));return n?(e.w=we[n[0].toLowerCase()],r+n[0].length):-1},b:function(e,t,r){var n=Se.exec(t.slice(r));return n?(e.m=Ee[n[0].toLowerCase()],r+n[0].length):-1},B:function(e,t,r){var n=Ae.exec(t.slice(r));return n?(e.m=Me[n[0].toLowerCase()],r+n[0].length):-1},c:function(e,t,r){return De(e,a,t,r)},d:A,e:A,f:L,H:S,I:S,j:M,L:I,m:k,M:E,p:function(e,t,r){var n=xe.exec(t.slice(r));return n?(e.p=_e[n[0].toLowerCase()],r+n[0].length):-1},q:T,Q:z,s:D,S:C,u:g,U:y,V:v,w:m,W:x,x:function(e,t,r){return De(e,o,t,r)},X:function(e,t,r){return De(e,l,t,r)},y:b,Y:_,Z:w,"%":P};function Pe(e,t){return function(r){var n,i,a,o=[],l=-1,c=0,u=e.length;for(r instanceof Date||(r=new Date(+r));++l53)return null;"w"in c||(c.w=1),"Z"in c?(l=(s=n(i(c.y,0,1))).getUTCDay(),s=l>4||0===l?t.utcMonday.ceil(s):t.utcMonday(s),s=t.utcDay.offset(s,7*(c.V-1)),c.y=s.getUTCFullYear(),c.m=s.getUTCMonth(),c.d=s.getUTCDate()+(c.w+6)%7):(l=(s=r(i(c.y,0,1))).getDay(),s=l>4||0===l?t.timeMonday.ceil(s):t.timeMonday(s),s=t.timeDay.offset(s,7*(c.V-1)),c.y=s.getFullYear(),c.m=s.getMonth(),c.d=s.getDate()+(c.w+6)%7)}else("W"in c||"U"in c)&&("w"in c||(c.w="u"in c?c.u%7:"W"in c?1:0),l="Z"in c?n(i(c.y,0,1)).getUTCDay():r(i(c.y,0,1)).getDay(),c.m=0,c.d="W"in c?(c.w+6)%7+7*c.W-(l+5)%7:c.w+7*c.U-(l+6)%7);return"Z"in c?(c.H+=c.Z/100|0,c.M+=c.Z%100,n(c)):r(c)}}function De(e,t,r,n){for(var i,a,o=0,l=t.length,c=r.length;o=c)return-1;if(37===(i=t.charCodeAt(o++))){if(i=t.charAt(o++),!(a=Le[i in s?t.charAt(o++):i])||(n=a(e,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}return Ce.x=Pe(o,Ce),Ce.X=Pe(l,Ce),Ce.c=Pe(a,Ce),Ie.x=Pe(o,Ie),Ie.X=Pe(l,Ie),Ie.c=Pe(a,Ie),{format:function(e){var t=Pe(e+="",Ce);return t.toString=function(){return e},t},parse:function(e){var t=ze(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=Pe(e+="",Ie);return t.toString=function(){return e},t},utcParse:function(e){var t=ze(e+="",!0);return t.toString=function(){return e},t}}}var o,s={"-":"",_:" ",0:"0"},l=/^\s*\d+/,c=/^%/,u=/[\\^$*+?|[\]().{}]/g;function h(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a68?1900:2e3),r+n[0].length):-1}function w(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function T(e,t,r){var n=l.exec(t.slice(r,r+1));return n?(e.q=3*n[0]-3,r+n[0].length):-1}function k(e,t,r){var n=l.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function A(e,t,r){var n=l.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function M(e,t,r){var n=l.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function S(e,t,r){var n=l.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function E(e,t,r){var n=l.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function C(e,t,r){var n=l.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function I(e,t,r){var n=l.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function L(e,t,r){var n=l.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function P(e,t,r){var n=c.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function z(e,t,r){var n=l.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function D(e,t,r){var n=l.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function O(e,t){return h(e.getDate(),t,2)}function R(e,t){return h(e.getHours(),t,2)}function F(e,t){return h(e.getHours()%12||12,t,2)}function B(e,r){return h(1+t.timeDay.count(t.timeYear(e),e),r,3)}function j(e,t){return h(e.getMilliseconds(),t,3)}function N(e,t){return j(e,t)+"000"}function U(e,t){return h(e.getMonth()+1,t,2)}function V(e,t){return h(e.getMinutes(),t,2)}function q(e,t){return h(e.getSeconds(),t,2)}function H(e){var t=e.getDay();return 0===t?7:t}function G(e,r){return h(t.timeSunday.count(t.timeYear(e)-1,e),r,2)}function W(e,r){var n=e.getDay();return e=n>=4||0===n?t.timeThursday(e):t.timeThursday.ceil(e),h(t.timeThursday.count(t.timeYear(e),e)+(4===t.timeYear(e).getDay()),r,2)}function Z(e){return e.getDay()}function Y(e,r){return h(t.timeMonday.count(t.timeYear(e)-1,e),r,2)}function X(e,t){return h(e.getFullYear()%100,t,2)}function $(e,t){return h(e.getFullYear()%1e4,t,4)}function K(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+h(t/60|0,"0",2)+h(t%60,"0",2)}function J(e,t){return h(e.getUTCDate(),t,2)}function Q(e,t){return h(e.getUTCHours(),t,2)}function ee(e,t){return h(e.getUTCHours()%12||12,t,2)}function te(e,r){return h(1+t.utcDay.count(t.utcYear(e),e),r,3)}function re(e,t){return h(e.getUTCMilliseconds(),t,3)}function ne(e,t){return re(e,t)+"000"}function ie(e,t){return h(e.getUTCMonth()+1,t,2)}function ae(e,t){return h(e.getUTCMinutes(),t,2)}function oe(e,t){return h(e.getUTCSeconds(),t,2)}function se(e){var t=e.getUTCDay();return 0===t?7:t}function le(e,r){return h(t.utcSunday.count(t.utcYear(e)-1,e),r,2)}function ce(e,r){var n=e.getUTCDay();return e=n>=4||0===n?t.utcThursday(e):t.utcThursday.ceil(e),h(t.utcThursday.count(t.utcYear(e),e)+(4===t.utcYear(e).getUTCDay()),r,2)}function ue(e){return e.getUTCDay()}function he(e,r){return h(t.utcMonday.count(t.utcYear(e)-1,e),r,2)}function fe(e,t){return h(e.getUTCFullYear()%100,t,2)}function pe(e,t){return h(e.getUTCFullYear()%1e4,t,4)}function de(){return"+0000"}function me(){return"%"}function ge(e){return+e}function ye(e){return Math.floor(+e/1e3)}function ve(t){return o=a(t),e.timeFormat=o.format,e.timeParse=o.parse,e.utcFormat=o.utcFormat,e.utcParse=o.utcParse,o}ve({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var xe="%Y-%m-%dT%H:%M:%S.%LZ",_e=Date.prototype.toISOString?function(e){return e.toISOString()}:e.utcFormat(xe),be=+new Date("2000-01-01T00:00:00.000Z")?function(e){var t=new Date(e);return isNaN(t)?null:t}:e.utcParse(xe);e.isoFormat=_e,e.isoParse=be,e.timeFormatDefaultLocale=ve,e.timeFormatLocale=a,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof e&&typeof t<"u"?n(e,w()):n((r=r||self).d3=r.d3||{},r.d3)}}),k=m({"node_modules/d3-format/dist/d3-format.js"(e,t){var r,n;r=e,n=function(e){function t(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function r(e){return(e=t(Math.abs(e)))?e[1]:NaN}var n,i=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function a(e){if(!(t=i.exec(e)))throw new Error("invalid format: "+e);var t;return new o({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function o(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function s(e,r){var n=t(e,r);if(!n)return e+"";var i=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+i:i.length>a+1?i.slice(0,a+1)+"."+i.slice(a+1):i+new Array(a-i.length+2).join("0")}a.prototype=o.prototype,o.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 l={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return s(100*e,t)},r:s,s:function(e,r){var i=t(e,r);if(!i)return e+"";var a=i[0],o=i[1],s=o-(n=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,l=a.length;return s===l?a:s>l?a+new Array(s-l+1).join("0"):s>0?a.slice(0,s)+"."+a.slice(s):"0."+new Array(1-s).join("0")+t(e,Math.max(0,r+s-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function c(e){return e}var u,h=Array.prototype.map,f=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function p(e){var t=void 0===e.grouping||void 0===e.thousands?c:function(e,t){return function(r,n){for(var i=r.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),a.push(r.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}(h.call(e.grouping,Number),e.thousands+""),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",s=void 0===e.decimal?".":e.decimal+"",u=void 0===e.numerals?c:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(h.call(e.numerals,String)),p=void 0===e.percent?"%":e.percent+"",d=void 0===e.minus?"-":e.minus+"",m=void 0===e.nan?"NaN":e.nan+"";function g(e){var r=(e=a(e)).fill,c=e.align,h=e.sign,g=e.symbol,y=e.zero,v=e.width,x=e.comma,_=e.precision,b=e.trim,w=e.type;"n"===w?(x=!0,w="g"):l[w]||(void 0===_&&(_=12),b=!0,w="g"),(y||"0"===r&&"="===c)&&(y=!0,r="0",c="=");var T="$"===g?i:"#"===g&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",k="$"===g?o:/[%p]/.test(w)?p:"",A=l[w],M=/[defgprs%]/.test(w);function S(e){var i,a,o,l=T,p=k;if("c"===w)p=A(e)+p,e="";else{var g=(e=+e)<0||1/e<0;if(e=isNaN(e)?m:A(Math.abs(e),_),b&&(e=function(e){e:for(var t,r=e.length,n=1,i=-1;n0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),g&&0==+e&&"+"!==h&&(g=!1),l=(g?"("===h?h:d:"-"===h||"("===h?"":h)+l,p=("s"===w?f[8+n/3]:"")+p+(g&&"("===h?")":""),M)for(i=-1,a=e.length;++i(o=e.charCodeAt(i))||o>57){p=(46===o?s+e.slice(i+1):e.slice(i))+p,e=e.slice(0,i);break}}x&&!y&&(e=t(e,1/0));var S=l.length+e.length+p.length,E=S>1)+l+e+p+E.slice(S);break;default:e=E+l+e+p}return u(e)}return _=void 0===_?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_)),S.toString=function(){return e+""},S}return{format:g,formatPrefix:function(e,t){var n=g(((e=a(e)).type="f",e)),i=3*Math.max(-8,Math.min(8,Math.floor(r(t)/3))),o=Math.pow(10,-i),s=f[8+i/3];return function(e){return n(o*e)+s}}}}function d(t){return u=p(t),e.format=u.format,e.formatPrefix=u.formatPrefix,u}d({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),e.FormatSpecifier=o,e.formatDefaultLocale=d,e.formatLocale=p,e.formatSpecifier=a,e.precisionFixed=function(e){return Math.max(0,-r(Math.abs(e)))},e.precisionPrefix=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(r(t)/3)))-r(Math.abs(e)))},e.precisionRound=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,r(t)-r(e))+1},Object.defineProperty(e,"__esModule",{value:!0})},n("object"==typeof e&&typeof t<"u"?e:(r=typeof globalThis<"u"?globalThis:r||self).d3=r.d3||{})}}),A=m({"node_modules/is-string-blank/index.js"(e,t){t.exports=function(e){for(var t,r=e.length,n=0;n13)&&32!==t&&133!==t&&160!==t&&5760!==t&&6158!==t&&(t<8192||t>8205)&&8232!==t&&8233!==t&&8239!==t&&8287!==t&&8288!==t&&12288!==t&&65279!==t)return!1;return!0}}}),M=m({"node_modules/fast-isnumeric/index.js"(e,t){var r=A();t.exports=function(e){var t=typeof e;if("string"===t){var n=e;if(0==(e=+e)&&r(n))return!1}else if("number"!==t)return!1;return e-e<1}}}),S=m({"src/constants/numerical.js"(e,t){t.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:2440587.5,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"−"}}}),E=m({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(e,t){var r,n;r=e,n=function(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=typeof Uint8Array>"u"?[]:new Uint8Array(256),n=0;n<64;n++)r[t.charCodeAt(n)]=n;e.decode=function(e){var t,n,i,a,o,s=.75*e.length,l=e.length,c=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var u=new ArrayBuffer(s),h=new Uint8Array(u);for(t=0;t>4,h[c++]=(15&i)<<4|a>>2,h[c++]=(3&a)<<6|63&o;return u},e.encode=function(e){var r,n=new Uint8Array(e),i=n.length,a="";for(r=0;r>2],a+=t[(3&n[r])<<4|n[r+1]>>4],a+=t[(15&n[r+1])<<2|n[r+2]>>6],a+=t[63&n[r+2]];return i%3==2?a=a.substring(0,a.length-1)+"=":i%3==1&&(a=a.substring(0,a.length-2)+"=="),a},Object.defineProperty(e,"__esModule",{value:!0})},n("object"==typeof e&&typeof t<"u"?e:(r=typeof globalThis<"u"?globalThis:r||self)["base64-arraybuffer"]={})}}),C=m({"src/lib/is_plain_object.js"(e,t){t.exports=function(e){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(e):"[object Object]"===Object.prototype.toString.call(e)&&Object.getPrototypeOf(e).hasOwnProperty("hasOwnProperty")}}}),I=m({"src/lib/array.js"(e){var t=E().decode,r=C(),n=Array.isArray,i=ArrayBuffer,a=DataView;function o(e){return i.isView(e)&&!(e instanceof a)}function s(e){return n(e)||o(e)}e.isTypedArray=o,e.isArrayOrTypedArray=s,e.isArray1D=function(e){return!s(e[0])},e.ensureArray=function(e,t){return n(e)||(e=[]),e.length=t,e};var l={u1c:typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};function c(e){return e.constructor===ArrayBuffer}function u(e,t,r){if(s(e)){if(s(e[0])){for(var n=r,i=0;i2)return c[t]=2|c[t],f.set(e,null);if(h){for(o=t;o0)return Math.log(e)/Math.LN10;var n=Math.log(Math.min(t[0],t[1]))/Math.LN10;return r(n)||(n=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),n}}}),O=m({"src/lib/relink_private.js"(e,t){var r=I().isArrayOrTypedArray,n=C();t.exports=function e(t,i){for(var a in i){var o=i[a],s=t[a];if(s!==o)if("_"===a.charAt(0)||"function"==typeof o){if(a in t)continue;t[a]=o}else if(r(o)&&r(s)&&n(o[0])){if("customdata"===a||"ids"===a)continue;for(var l=Math.min(o.length,s.length),c=0;ct/2?e-Math.round(e/t)*t:e}}}}),F=m({"node_modules/tinycolor2/tinycolor.js"(e,t){!function(e){var r=/^\s+/,n=/\s+$/,i=0,a=e.round,o=e.min,s=e.max,l=e.random;function c(t,l){if(l=l||{},(t=t||"")instanceof c)return t;if(!(this instanceof c))return new c(t,l);var u=function(t){var i={r:0,g:0,b:0},a=1,l=null,c=null,u=null,h=!1,f=!1;return"string"==typeof t&&(t=function(e){e=e.replace(r,"").replace(n,"").toLowerCase();var t,i=!1;if(S[e])e=S[e],i=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=N.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=N.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=N.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=N.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=N.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=N.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=N.hex8.exec(e))?{r:P(t[1]),g:P(t[2]),b:P(t[3]),a:R(t[4]),format:i?"name":"hex8"}:(t=N.hex6.exec(e))?{r:P(t[1]),g:P(t[2]),b:P(t[3]),format:i?"name":"hex"}:(t=N.hex4.exec(e))?{r:P(t[1]+""+t[1]),g:P(t[2]+""+t[2]),b:P(t[3]+""+t[3]),a:R(t[4]+""+t[4]),format:i?"name":"hex8"}:!!(t=N.hex3.exec(e))&&{r:P(t[1]+""+t[1]),g:P(t[2]+""+t[2]),b:P(t[3]+""+t[3]),format:i?"name":"hex"}}(t)),"object"==typeof t&&(U(t.r)&&U(t.g)&&U(t.b)?(i=function(e,t,r){return{r:255*I(e,255),g:255*I(t,255),b:255*I(r,255)}}(t.r,t.g,t.b),h=!0,f="%"===String(t.r).substr(-1)?"prgb":"rgb"):U(t.h)&&U(t.s)&&U(t.v)?(l=D(t.s),c=D(t.v),i=function(t,r,n){t=6*I(t,360),r=I(r,100),n=I(n,100);var i=e.floor(t),a=t-i,o=n*(1-r),s=n*(1-a*r),l=n*(1-(1-a)*r),c=i%6;return{r:255*[n,s,o,o,l,n][c],g:255*[l,n,n,s,o,o][c],b:255*[o,o,l,n,n,s][c]}}(t.h,l,c),h=!0,f="hsv"):U(t.h)&&U(t.s)&&U(t.l)&&(l=D(t.s),u=D(t.l),i=function(e,t,r){var n,i,a;function o(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=I(e,360),t=I(t,100),r=I(r,100),0===t)n=i=a=r;else{var s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;n=o(l,s,e+1/3),i=o(l,s,e),a=o(l,s,e-1/3)}return{r:255*n,g:255*i,b:255*a}}(t.h,l,u),h=!0,f="hsl"),t.hasOwnProperty("a")&&(a=t.a)),a=C(a),{ok:h,format:t.format||f,r:o(255,s(i.r,0)),g:o(255,s(i.g,0)),b:o(255,s(i.b,0)),a}}(t);this._originalInput=t,this._r=u.r,this._g=u.g,this._b=u.b,this._a=u.a,this._roundA=a(100*this._a)/100,this._format=l.format||u.format,this._gradientType=l.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=u.ok,this._tc_id=i++}function u(e,t,r){e=I(e,255),t=I(t,255),r=I(r,255);var n,i,a=s(e,t,r),l=o(e,t,r),c=(a+l)/2;if(a==l)n=i=0;else{var u=a-l;switch(i=c>.5?u/(2-a-l):u/(a+l),a){case e:n=(t-r)/u+(t>1)+720)%360;--t;)n.h=(n.h+i)%360,a.push(c(n));return a}function M(e,t){t=t||6;for(var r=c(e).toHsv(),n=r.h,i=r.s,a=r.v,o=[],s=1/t;t--;)o.push(c({h:n,s:i,v:a})),a=(a+s)%1;return o}c.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var t,r,n,i=this.toRgb();return t=i.r/255,r=i.g/255,n=i.b/255,.2126*(t<=.03928?t/12.92:e.pow((t+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:e.pow((r+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:e.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=C(e),this._roundA=a(100*this._a)/100,this},toHsv:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=h(this._r,this._g,this._b),t=a(360*e.h),r=a(100*e.s),n=a(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=u(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=u(this._r,this._g,this._b),t=a(360*e.h),r=a(100*e.s),n=a(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return f(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,r,n,i){var o=[z(a(e).toString(16)),z(a(t).toString(16)),z(a(r).toString(16)),z(O(n))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+a(this._r)+", "+a(this._g)+", "+a(this._b)+")":"rgba("+a(this._r)+", "+a(this._g)+", "+a(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:a(100*I(this._r,255))+"%",g:a(100*I(this._g,255))+"%",b:a(100*I(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+a(100*I(this._r,255))+"%, "+a(100*I(this._g,255))+"%, "+a(100*I(this._b,255))+"%)":"rgba("+a(100*I(this._r,255))+"%, "+a(100*I(this._g,255))+"%, "+a(100*I(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(E[f(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+p(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var i=c(e);r="#"+p(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return t||!n||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),("hex"===e||"hex6"===e)&&(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return c(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(y,arguments)},brighten:function(){return this._applyModification(v,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(m,arguments)},greyscale:function(){return this._applyModification(g,arguments)},spin:function(){return this._applyModification(_,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(b,arguments)},monochromatic:function(){return this._applyCombination(M,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(T,arguments)}},c.fromRatio=function(e,t){if("object"==typeof e){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]="a"===n?e[n]:D(e[n]));e=r}return c(e,t)},c.equals=function(e,t){return!(!e||!t)&&c(e).toRgbString()==c(t).toRgbString()},c.random=function(){return c.fromRatio({r:l(),g:l(),b:l()})},c.mix=function(e,t,r){r=0===r?0:r||50;var n=c(e).toRgb(),i=c(t).toRgb(),a=r/100;return c({r:(i.r-n.r)*a+n.r,g:(i.g-n.g)*a+n.g,b:(i.b-n.b)*a+n.b,a:(i.a-n.a)*a+n.a})},c.readability=function(t,r){var n=c(t),i=c(r);return(e.max(n.getLuminance(),i.getLuminance())+.05)/(e.min(n.getLuminance(),i.getLuminance())+.05)},c.isReadable=function(e,t,r){var n,i,a=c.readability(e,t);switch(i=!1,n=function(e){var t,r;return"AA"!==(t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==t&&(t="AA"),"small"!==(r=(e.size||"small").toLowerCase())&&"large"!==r&&(r="small"),{level:t,size:r}}(r),n.level+n.size){case"AAsmall":case"AAAlarge":i=a>=4.5;break;case"AAlarge":i=a>=3;break;case"AAAsmall":i=a>=7}return i},c.mostReadable=function(e,t,r){var n,i,a,o,s=null,l=0;i=(r=r||{}).includeFallbackColors,a=r.level,o=r.size;for(var u=0;ul&&(l=n,s=c(t[u]));return c.isReadable(e,s,{level:a,size:o})||!i?s:(r.includeFallbackColors=!1,c.mostReadable(e,["#fff","#000"],r))};var S=c.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},E=c.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(S);function C(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function I(t,r){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(t)&&(t="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(t);return t=o(r,s(0,parseFloat(t))),n&&(t=parseInt(t*r,10)/100),e.abs(t-r)<1e-6?1:t%r/parseFloat(r)}function L(e){return o(1,s(0,e))}function P(e){return parseInt(e,16)}function z(e){return 1==e.length?"0"+e:""+e}function D(e){return e<=1&&(e=100*e+"%"),e}function O(t){return e.round(255*parseFloat(t)).toString(16)}function R(e){return P(e)/255}var F,B,j,N=(B="[\\s|\\(]+("+(F="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+F+")[,|\\s]+("+F+")\\s*\\)?",j="[\\s|\\(]+("+F+")[,|\\s]+("+F+")[,|\\s]+("+F+")[,|\\s]+("+F+")\\s*\\)?",{CSS_UNIT:new RegExp(F),rgb:new RegExp("rgb"+B),rgba:new RegExp("rgba"+j),hsl:new RegExp("hsl"+B),hsla:new RegExp("hsla"+j),hsv:new RegExp("hsv"+B),hsva:new RegExp("hsva"+j),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function U(e){return!!N.CSS_UNIT.exec(e)}typeof t<"u"&&t.exports?t.exports=c:window.tinycolor=c}(Math)}}),B=m({"src/lib/extend.js"(e){var t=C(),r=Array.isArray;function n(e,i,a,o){var s,l,c,u,h,f,p,d=e[0],m=e.length;if(2===m&&r(d)&&r(e[1])&&0===d.length){if(p=function(e,t){var r,n;for(r=0;r=0)))return e;if(3===o)i[o]>1&&(i[o]=1);else if(i[o]>=1)return e}var s=Math.round(255*i[0])+", "+Math.round(255*i[1])+", "+Math.round(255*i[2]);return a?"rgba("+s+", "+i[3]+")":"rgb("+s+")"}a.tinyRGB=function(e){var t=e.toRgb();return"rgb("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+")"},a.rgb=function(e){return a.tinyRGB(r(e))},a.opacity=function(e){return e?r(e).getAlpha():0},a.addOpacity=function(e,t){var n=r(e).toRgb();return"rgba("+Math.round(n.r)+", "+Math.round(n.g)+", "+Math.round(n.b)+", "+t+")"},a.combine=function(e,t){var n=r(e).toRgb();if(1===n.a)return r(e).toRgbString();var i=r(t||l).toRgb(),a=1===i.a?i:{r:255*(1-i.a)+i.r*i.a,g:255*(1-i.a)+i.g*i.a,b:255*(1-i.a)+i.b*i.a},o={r:a.r*(1-n.a)+n.r*n.a,g:a.g*(1-n.a)+n.g*n.a,b:a.b*(1-n.a)+n.b*n.a};return r(o).toRgbString()},a.interpolate=function(e,t,n){var i=r(e).toRgb(),a=r(t).toRgb(),o={r:n*i.r+(1-n)*a.r,g:n*i.g+(1-n)*a.g,b:n*i.b+(1-n)*a.b};return r(o).toRgbString()},a.contrast=function(e,t,n){var i=r(e);return 1!==i.getAlpha()&&(i=r(a.combine(e,l))),(i.isDark()?t?i.lighten(t):l:n?i.darken(n):s).toString()},a.stroke=function(e,t){var n=r(t);e.style({stroke:a.tinyRGB(n),"stroke-opacity":n.getAlpha()})},a.fill=function(e,t){var n=r(t);e.style({fill:a.tinyRGB(n),"fill-opacity":n.getAlpha()})},a.clean=function(e){if(e&&"object"==typeof e){var t,r,n,o,s=Object.keys(e);for(t=0;t!0===e||!1===e;i(e)||n.arrayOk&&Array.isArray(e)&&e.length>0&&e.every(i)?t.set(e):t.set(r)}},number:{coerceFunction:function(e,r,n,i){f(e)&&(e=p(e)),!t(e)||void 0!==i.min&&ei.max?r.set(n):r.set(+e)}},integer:{coerceFunction:function(e,r,n,i){-1===(i.extras||[]).indexOf(e)?(f(e)&&(e=p(e)),e%1||!t(e)||void 0!==i.min&&ei.max?r.set(n):r.set(+e)):r.set(e)}},string:{coerceFunction:function(e,t,r,n){if("string"!=typeof e){var i="number"==typeof e;!0!==n.strict&&i?t.set(String(e)):t.set(r)}else n.noBlank&&!e?t.set(r):t.set(e)}},color:{coerceFunction:function(e,t,n){f(e)&&(e=p(e)),r(e).isValid()?t.set(e):t.set(n)}},colorlist:{coerceFunction:function(e,t,n){Array.isArray(e)&&e.length&&e.every((function(e){return r(e).isValid()}))?t.set(e):t.set(n)}},colorscale:{coerceFunction:function(e,t,r){t.set(a.get(e,r))}},angle:{coerceFunction:function(e,r,n){f(e)&&(e=p(e)),"auto"===e?r.set("auto"):t(e)?r.set(u(+e,360)):r.set(n)}},subplotid:{coerceFunction:function(e,t,r,n){var i=n.regex||c(r);let a=e=>"string"==typeof e&&i.test(e);a(e)||n.arrayOk&&h(e)&&e.length>0&&e.every(a)?t.set(e):t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r||"string"==typeof e&&!!c(r).test(e)}},flaglist:{coerceFunction:function(e,t,r,n){if(-1===(n.extras||[]).indexOf(e))if("string"==typeof e){for(var i=e.split("+"),a=0;a/g),o=0;o1){var t=["LOG:"];for(e=0;e1){var i=[];for(e=0;e"),"long")}},i.warn=function(){var e;if(r.logging>0){var t=["WARN:"];for(e=0;e0){var i=[];for(e=0;e"),"stick")}},i.error=function(){var e;if(r.logging>0){var t=["ERROR:"];for(e=0;e0){var i=[];for(e=0;e"),"stick")}}}}),Q=m({"src/lib/noop.js"(e,t){t.exports=function(){}}}),ee=m({"src/lib/push_unique.js"(e,t){t.exports=function(e,t){if(t instanceof RegExp){for(var r=t.toString(),n=0;nf({valType:"string",dflt:"",editType:e},!1!==t?{arrayOk:!0}:{}),e.texttemplateAttrs=({editType:e="calc",arrayOk:t}={},r={})=>f({valType:"string",dflt:"",editType:e},!1!==t?{arrayOk:!0}:{}),e.shapeTexttemplateAttrs=({editType:e="arraydraw",newshape:t}={},r={})=>({valType:"string",dflt:"",editType:e}),e.templatefallbackAttrs=({editType:e="none"}={})=>({valType:"any",dflt:"-",editType:e})}}),Be=m({"src/components/shapes/label_texttemplate.js"(e,t){function r(e,t){return t?t.d2l(e):e}function n(e,t){return t?t.l2d(e):e}function i(e){return e.x0shift||0}function a(e){return e.x1shift||0}function o(e){return e.y0shift||0}function s(e){return e.y1shift||0}function l(e,t){return r(e.x1,t)+a(e)-r(e.x0,t)-i(e)}function c(e,t,n){return r(e.y1,n)+s(e)-r(e.y0,n)-o(e)}t.exports={x0:function(e){return e.x0},x1:function(e){return e.x1},y0:function(e){return e.y0},y1:function(e){return e.y1},slope:function(e,t,r){return"line"!==e.type?void 0:c(e,0,r)/l(e,t)},dx:l,dy:c,width:function(e,t){return Math.abs(l(e,t))},height:function(e,t,r){return Math.abs(c(e,0,r))},length:function(e,t,r){return"line"!==e.type?void 0:Math.sqrt(Math.pow(l(e,t),2)+Math.pow(c(e,0,r),2))},xcenter:function(e,t){return n((r(e.x1,t)+a(e)+r(e.x0,t)+i(e))/2,t)},ycenter:function(e,t,i){return n((r(e.y1,i)+s(e)+r(e.y0,i)+o(e))/2,i)},simpleXVariables:["x0","x1","y0","y1","dy","height","ycenter"],simpleYVariables:["x0","x1","y0","y1","dx","width","xcenter"]}}}),je=m({"src/components/shapes/draw_newshape/attributes.js"(e,t){var r=De().overrideAll,n=q(),i=j(),a=Oe().dash,o=B().extendFlat,{shapeTexttemplateAttrs:s,templatefallbackAttrs:l}=Fe(),c=Be();t.exports=r({newshape:{visible:o({},n.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:o({},n.legend,{}),legendgroup:o({},n.legendgroup,{}),legendgrouptitle:{text:o({},n.legendgrouptitle.text,{}),font:i({})},legendrank:o({},n.legendrank,{}),legendwidth:o({},n.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:o({},a,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:o({},n.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:s({newshape:!0},{keys:Object.keys(c)}),texttemplatefallback:l({editType:"arraydraw"}),font:i({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")}}),Ne=m({"src/components/selections/draw_newselection/attributes.js"(e,t){var r=Oe().dash,n=B().extendFlat;t.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:n({},r,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}}}),Ue=m({"src/plots/pad_attributes.js"(e,t){t.exports=function(e){var t=e.editType;return{t:{valType:"number",dflt:0,editType:t},r:{valType:"number",dflt:0,editType:t},b:{valType:"number",dflt:0,editType:t},l:{valType:"number",dflt:0,editType:t},editType:t}}}}),Ve=m({"src/plots/layout_attributes.js"(e,t){var r=j(),n=ze(),i=G(),a=je(),o=Ne(),s=Ue(),l=B().extendFlat,c=r({editType:"calc"});c.family.dflt='"Open Sans", verdana, arial, sans-serif',c.size.dflt=12,c.color.dflt=i.defaultLine,t.exports={font:c,title:{text:{valType:"string",editType:"layoutstyle"},font:r({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:r({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:l(s({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:i.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:i.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},hidesources:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:i.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:a.newshape,activeshape:a.activeshape,newselection:o.newselection,activeselection:o.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:l({},n.transition,{editType:"none"})}}}),qe=m({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){!function(){if(!document.getElementById("8431bff7cc77ea8693f8122c6e0981316b936a0a4930625e08b1512d134062bc")){var e=document.createElement("style");e.id="8431bff7cc77ea8693f8122c6e0981316b936a0a4930625e08b1512d134062bc",e.textContent=".maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E\")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E\")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E\")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E\")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E\")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E\")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E\")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E\");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E\")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:\"\";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:\"\";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}",document.head.appendChild(e)}}()}}),He=m({"src/registry.js"(e){var t=J(),r=Q(),n=ee(),i=C(),a=Pe().addStyleRule,o=B(),s=q(),l=Ve(),c=o.extendFlat,u=o.extendDeepAll;function h(r){var n=r.name,i=r.categories,o=r.meta;if(e.modules[n])t.log("Type "+n+" already registered");else{e.subplotsRegistry[r.basePlotModule.name]||function(r){var n=r.name;if(e.subplotsRegistry[n])t.log("Plot type "+n+" already registered.");else for(var i in m(r),e.subplotsRegistry[n]=r,e.componentsRegistry)y(i,r.name)}(r.basePlotModule);for(var s={},l=0;l=t&&n<=r?n:l}if("string"!=typeof n&&"number"!=typeof n)return l;n=String(n);var _=x(i),b=n.charAt(0);_&&("G"===b||"g"===b)&&(n=n.slice(1),i="");var w=_&&"chinese"===i.slice(0,7),T=n.match(w?y:g);if(!T)return l;var k=T[1],A=T[3]||"1",M=Number(T[5]||1),S=Number(T[7]||0),E=Number(T[9]||0),C=Number(T[11]||0);if(_){if(2===k.length)return l;var I;k=Number(k);try{var L=d.getComponentMethod("calendars","getCal")(i);if(w){var P="i"===A.charAt(A.length-1);A=parseInt(A,10),I=L.newDate(k,L.toMonthIndex(k,A,P),M)}else I=L.newDate(k,Number(A),M)}catch{return l}return I?(I.toJD()-p)*c+S*u+E*h+C*f:l}k=2===k.length?(Number(k)+2e3-v)%100+v:Number(k),A-=1;var z=new Date(Date.UTC(2e3,A,M,S,E));return z.setUTCFullYear(k),z.getUTCMonth()!==A||z.getUTCDate()!==M?l:z.getTime()+C*f},t=e.MIN_MS=e.dateTime2ms("-9999"),r=e.MAX_MS=e.dateTime2ms("9999-12-31 23:59:59.9999"),e.isDateTime=function(t,r){return e.dateTime2ms(t,r)!==l};var b=90*c,w=3*u,k=5*h;function A(e,t,r,n,i){if((t||r||n||i)&&(e+=" "+_(t,2)+":"+_(r,2),(n||i)&&(e+=":"+_(n,2),i))){for(var a=4;i%10==0;)a-=1,i/=10;e+="."+_(i,a)}return e}e.ms2DateTime=function(e,n,i){if("number"!=typeof e||!(e>=t&&e<=r))return l;n||(n=0);var a,s,g,y,v,_,T=Math.floor(10*o(e+.05,1)),M=Math.round(e-T/10);if(x(i)){var S=Math.floor(M/c)+p,E=Math.floor(o(e,c));try{a=d.getComponentMethod("calendars","getCal")(i).fromJD(S).formatDate("yyyy-mm-dd")}catch{a=m("G%Y-%m-%d")(new Date(M))}if("-"===a.charAt(0))for(;a.length<11;)a="-0"+a.slice(1);else for(;a.length<10;)a="0"+a;s=n=t+c&&e<=r-c))return l;var i=Math.floor(10*o(e+.05,1)),a=new Date(Math.round(e-i/10));return A(n("%Y-%m-%d")(a),a.getHours(),a.getMinutes(),a.getSeconds(),10*a.getUTCMilliseconds()+i)},e.cleanDate=function(t,r,n){if(t===l)return r;if(e.isJSDate(t)||"number"==typeof t&&isFinite(t)){if(x(n))return a.error("JS Dates and milliseconds are incompatible with world calendars",t),r;if(!(t=e.ms2DateTimeLocal(+t))&&void 0!==r)return r}else if(!e.isDateTime(t,n))return a.error("unrecognized date",t),r;return t};var E=/%\d?f/g,C=/%h/g,I={1:"1",2:"1",3:"2",4:"2"};function L(e,t,r,n){e=e.replace(E,(function(e){var r=Math.min(+e.charAt(1)||6,6);return(t/1e3%1+2).toFixed(r).slice(2).replace(/0+$/,"")||"0"}));var i=new Date(Math.floor(t+.05));if(e=e.replace(C,(function(){return I[r("%q")(i)]})),x(n))try{e=d.getComponentMethod("calendars","worldCalFmt")(e,t,n)}catch{return"Invalid"}return r(e)(i)}var P=[59,59.9,59.99,59.999,59.9999];e.formatDate=function(e,t,r,n,a,s){if(a=x(a)&&a,!t)if("y"===r)t=s.year;else if("m"===r)t=s.month;else{if("d"!==r)return function(e,t){var r=o(e+.05,c),n=_(Math.floor(r/u),2)+":"+_(o(Math.floor(r/h),60),2);if("M"!==t){i(t)||(t=0);var a=(100+Math.min(o(e/f,60),P[t])).toFixed(t).slice(1);t>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+a}return n}(e,r)+"\n"+L(s.dayMonthYear,e,n,a);t=s.dayMonth+"\n"+s.year}return L(t,e,n,a)};var z=3*c;e.incrementMonth=function(e,t,r){r=x(r)&&r;var n=o(e,c);if(e=Math.round(e-n),r)try{var i=Math.round(e/c)+p,s=d.getComponentMethod("calendars","getCal")(r),l=s.fromJD(i);return t%12?s.add(l,t,"m"):s.add(l,t/12,"y"),(l.toJD()-p)*c+n}catch{a.error("invalid ms "+e+" in calendar "+r)}var u=new Date(e+z);return u.setUTCMonth(u.getUTCMonth()+t)+n-z},e.findExactDates=function(e,t){for(var r,n,a=0,o=0,s=0,l=0,u=x(t)&&d.getComponentMethod("calendars","getCal")(t),h=0;ht}function c(e,t){return e>=t}e.findBin=function(e,n,i){if(t(n.start))return i?Math.ceil((e-n.start)/n.size-a)-1:Math.floor((e-n.start)/n.size+a);var u,h,f=0,p=n.length,d=0,m=p>1?(n[p-1]-n[0])/(p-1):1;for(h=m>=0?i?o:s:i?c:l,e+=m*a*(i?-1:1)*(m>=0?1:-1);f90&&r.log("Long binary search..."),f-1},e.sorterAsc=function(e,t){return e-t},e.sorterDes=function(e,t){return t-e},e.distinctVals=function(t){var r,n=t.slice();for(n.sort(e.sorterAsc),r=n.length-1;r>-1&&n[r]===i;r--);for(var a,o=n[r]-n[0]||1,s=o/(r||1)/1e4,l=[],c=0;c<=r;c++){var u=n[c],h=u-a;void 0===a?(l.push(u),a=u):h>s&&(o=Math.min(o,h),l.push(u),a=u)}return{vals:l,minDiff:o}},e.roundUp=function(e,t,r){for(var n,i=0,a=t.length-1,o=0,s=r?0:1,l=r?1:0,c=r?Math.ceil:Math.floor;i0&&(n=1),r&&n)return e.sort(t)}return n?e:e.reverse()},e.findIndexOfMin=function(e,t){t=t||n;for(var r,i=1/0,a=0;aa.length)&&(o=a.length),t(i)||(i=!1),r(a[0])){for(l=new Array(o),s=0;se.length-1)return e[e.length-1];var n=r%1;return n*e[Math.ceil(r)]+(1-n)*e[Math.floor(r)]}}}),$e=m({"src/lib/angles.js"(e,t){var r=R(),n=r.mod,i=r.modHalf,a=Math.PI,o=2*a;function s(e){return Math.abs(e[1]-e[0])>o-1e-14}function l(e,t){return i(t-e,o)}function c(e,t){if(s(t))return!0;var r,i;t[0](i=n(i,o))&&(i+=o);var a=n(e,o),l=a+o;return a>=r&&a<=i||l>=r&&l<=i}function u(e,t,r,n,i,l,c){i=i||0,l=l||0;var u,h,f,p,d,m=s([r,n]);function g(e,t){return[e*Math.cos(t)+i,l-e*Math.sin(t)]}m?(u=0,h=a,f=o):r=i&&e<=a);var i,a},pathArc:function(e,t,r,n,i){return u(null,e,t,r,n,i,0)},pathSector:function(e,t,r,n,i){return u(null,e,t,r,n,i,1)},pathAnnulus:function(e,t,r,n,i,a){return u(e,t,r,n,i,a,1)}}}}),Ke=m({"src/lib/anchor_utils.js"(e){e.isLeftAnchor=function(e){return"left"===e.xanchor||"auto"===e.xanchor&&e.x<=1/3},e.isCenterAnchor=function(e){return"center"===e.xanchor||"auto"===e.xanchor&&e.x>1/3&&e.x<2/3},e.isRightAnchor=function(e){return"right"===e.xanchor||"auto"===e.xanchor&&e.x>=2/3},e.isTopAnchor=function(e){return"top"===e.yanchor||"auto"===e.yanchor&&e.y>=2/3},e.isMiddleAnchor=function(e){return"middle"===e.yanchor||"auto"===e.yanchor&&e.y>1/3&&e.y<2/3},e.isBottomAnchor=function(e){return"bottom"===e.yanchor||"auto"===e.yanchor&&e.y<=1/3}}}),Je=m({"src/lib/geometry2d.js"(e){var t,r,n,i=R().mod;function a(e,t,r,n,i,a,o,s){var l=r-e,c=i-e,u=o-i,h=n-t,f=a-t,p=s-a,d=l*p-u*h;if(0===d)return null;var m=(c*p-u*f)/d,g=(c*h-l*f)/d;return g<0||g>1||m<0||m>1?null:{x:e+l*m,y:t+h*m}}function o(e,t,r,n,i){var a=n*e+i*t;if(a<0)return n*n+i*i;if(a>r){var o=n-e,s=i-t;return o*o+s*s}var l=n*t-i*e;return l*l/r}e.segmentsIntersect=a,e.segmentDistance=function(e,t,r,n,i,s,l,c){if(a(e,t,r,n,i,s,l,c))return 0;var u=r-e,h=n-t,f=l-i,p=c-s,d=u*u+h*h,m=f*f+p*p,g=Math.min(o(u,h,d,i-e,s-t),o(u,h,d,l-e,c-t),o(f,p,m,e-i,t-s),o(f,p,m,r-i,n-s));return Math.sqrt(g)},e.getTextLocation=function(e,a,o,s){if((e!==r||s!==n)&&(t={},r=e,n=s),t[o])return t[o];var l=e.getPointAtLength(i(o-s/2,a)),c=e.getPointAtLength(i(o+s/2,a)),u=Math.atan((c.y-l.y)/(c.x-l.x)),h=e.getPointAtLength(i(o,a)),f={x:(4*h.x+l.x+c.x)/6,y:(4*h.y+l.y+c.y)/6,theta:u};return t[o]=f,f},e.clearLocationCache=function(){r=null},e.getVisibleSegment=function(e,t,r){var n,i,a=t.left,o=t.right,s=t.top,l=t.bottom,c=0,u=e.getTotalLength(),h=u;function f(t){var r=e.getPointAtLength(t);0===t?n=r:t===u&&(i=r);var c=r.xo?r.x-o:0,h=r.yl?r.y-l:0;return Math.sqrt(c*c+h*h)}for(var p=f(c);p;){if((c+=p+r)>h)return;p=f(c)}for(p=f(h);p;){if(c>(h-=p+r))return;p=f(h)}return{min:c,max:h,len:h-c,total:u,isClosed:0===c&&h===u&&Math.abs(n.x-i.x)<.1&&Math.abs(n.y-i.y)<.1}},e.findPointOnPath=function(e,t,r,n){for(var i,a,o,s=(n=n||{}).pathLength||e.getTotalLength(),l=n.tolerance||.001,c=n.iterationLimit||30,u=e.getPointAtLength(0)[r]>e.getPointAtLength(s)[r]?-1:1,h=0,f=0,p=s;h0?p=i:f=i,h++}return a}}}),Qe=m({"src/lib/throttle.js"(e){var t={};function r(e){e&&null!==e.timer&&(clearTimeout(e.timer),e.timer=null)}e.throttle=function(e,n,i){var a=t[e],o=Date.now();if(!a){for(var s in t)t[s].tsa.ts+n?l():a.timer=setTimeout((function(){l(),a.timer=null}),n)},e.done=function(e){var r=t[e];return r&&r.timer?new Promise((function(e){var t=r.onDone;r.onDone=function(){t&&t(),e(),r.onDone=null}})):Promise.resolve()},e.clear=function(n){if(n)r(t[n]),delete t[n];else for(var i in t)e.clear(i)}}}),et=m({"src/lib/clear_responsive.js"(e,t){t.exports=function(e){e._responsiveChartHandler&&(window.removeEventListener("resize",e._responsiveChartHandler),delete e._responsiveChartHandler)}}}),tt=m({"node_modules/is-mobile/index.js"(e,t){t.exports=a,t.exports.isMobile=a,t.exports.default=a;var r=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,n=/CrOS/,i=/android|ipad|playbook|silk/i;function a(e){e||(e={});let t=e.ua;if(!t&&typeof navigator<"u"&&(t=navigator.userAgent),t&&t.headers&&"string"==typeof t.headers["user-agent"]&&(t=t.headers["user-agent"]),"string"!=typeof t)return!1;let a=r.test(t)&&!n.test(t)||!!e.tablet&&i.test(t);return!a&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==t.indexOf("Macintosh")&&-1!==t.indexOf("Safari")&&(a=!0),a}}}),rt=m({"src/lib/preserve_drawing_buffer.js"(e,t){var r=M(),n=tt();t.exports=function(e){var t,i;if(e&&e.hasOwnProperty("userAgent")?t=e.userAgent:(typeof navigator<"u"&&(i=navigator.userAgent),i&&i.headers&&"string"==typeof i.headers["user-agent"]&&(i=i.headers["user-agent"]),t=i),"string"!=typeof t)return!0;var a=n({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!a)for(var o=t.split(" "),s=1;s-1;l--){var c=o[l];if("Version/"===c.slice(0,8)){var u=c.slice(8).split(".")[0];if(r(u)&&(u=+u),u>=13)return!0}}return a}}}),nt=m({"src/lib/make_trace_groups.js"(e,t){var r=b();t.exports=function(e,t,n){var i=e.selectAll("g."+n.replace(/\s/g,".")).data(t,(function(e){return e[0].trace.uid}));i.exit().remove(),i.enter().append("g").attr("class",n),i.order();var a=e.classed("rangeplot")?"nodeRangePlot3":"node3";return i.each((function(e){e[0][a]=r.select(this)})),i}}}),it=m({"src/lib/localize.js"(e,t){var r=He();t.exports=function(e,t){for(var n=e._context.locale,i=0;i<2;i++){for(var a=e._context.locales,o=0;o<2;o++){var s=(a[n]||{}).dictionary;if(s){var l=s[t];if(l)return l}a=r.localeRegistry}var c=n.split("-")[0];if(c===n)break;n=c}return t}}}),at=m({"src/lib/filter_unique.js"(e,t){t.exports=function(e){for(var t={},r=[],n=0,i=0;i1?(r*e+r*t)/r:e+t,i=String(n).length;if(i>16){var a=String(t).length;if(i>=String(e).length+a){var o=parseFloat(n).toPrecision(12);-1===o.indexOf("e+")&&(n=+o)}}return n}}}),lt=m({"src/lib/clean_number.js"(e,t){var r=M(),n=S().BADNUM,i=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;t.exports=function(e){return"string"==typeof e&&(e=e.replace(i,"")),r(e)?Number(e):n}}}),ct=m({"src/lib/index.js"(e,t){var r=b(),n=T().utcFormat,i=k().format,a=M(),o=S(),s=o.FP_SAFE,l=-s,c=o.BADNUM,u=t.exports={};u.adjustFormat=function(e){return!e||/^\d[.]\df/.test(e)||/[.]\d%/.test(e)?e:"0.f"===e?"~f":/^\d%/.test(e)?"~%":/^\ds/.test(e)?"~s":!/^[~,.0$]/.test(e)&&/[&fps]/.test(e)?"~"+e:e};var h={};u.warnBadFormat=function(e){var t=String(e);h[t]||(h[t]=1,u.warn('encountered bad format: "'+t+'"'))},u.noFormat=function(e){return String(e)},u.numberFormat=function(e){var t;try{t=i(u.adjustFormat(e))}catch{return u.warnBadFormat(e),u.noFormat}return t},u.nestedProperty=L(),u.keyedContainer=P(),u.relativeAttr=z(),u.isPlainObject=C(),u.toLogRange=D(),u.relinkPrivateKeys=O();var d=I();u.isArrayBuffer=d.isArrayBuffer,u.isTypedArray=d.isTypedArray,u.isArrayOrTypedArray=d.isArrayOrTypedArray,u.isArray1D=d.isArray1D,u.ensureArray=d.ensureArray,u.concat=d.concat,u.maxRowLength=d.maxRowLength,u.minRowLength=d.minRowLength;var m=R();u.mod=m.mod,u.modHalf=m.modHalf;var g=X();u.valObjectMeta=g.valObjectMeta,u.coerce=g.coerce,u.coerce2=g.coerce2,u.coerceFont=g.coerceFont,u.coercePattern=g.coercePattern,u.coerceHoverinfo=g.coerceHoverinfo,u.coerceSelectionMarkerOpacity=g.coerceSelectionMarkerOpacity,u.validate=g.validate;var y=Ge();u.dateTime2ms=y.dateTime2ms,u.isDateTime=y.isDateTime,u.ms2DateTime=y.ms2DateTime,u.ms2DateTimeLocal=y.ms2DateTimeLocal,u.cleanDate=y.cleanDate,u.isJSDate=y.isJSDate,u.formatDate=y.formatDate,u.incrementMonth=y.incrementMonth,u.dateTick0=y.dateTick0,u.dfltRange=y.dfltRange,u.findExactDates=y.findExactDates,u.MIN_MS=y.MIN_MS,u.MAX_MS=y.MAX_MS;var v=Ze();u.findBin=v.findBin,u.sorterAsc=v.sorterAsc,u.sorterDes=v.sorterDes,u.distinctVals=v.distinctVals,u.roundUp=v.roundUp,u.sort=v.sort,u.findIndexOfMin=v.findIndexOfMin,u.sortObjectKeys=Ye();var x=Xe();u.aggNums=x.aggNums,u.len=x.len,u.mean=x.mean,u.geometricMean=x.geometricMean,u.median=x.median,u.midRange=x.midRange,u.variance=x.variance,u.stdev=x.stdev,u.interp=x.interp;var _=Le();u.init2dArray=_.init2dArray,u.transposeRagged=_.transposeRagged,u.dot=_.dot,u.translationMatrix=_.translationMatrix,u.rotationMatrix=_.rotationMatrix,u.rotationXYMatrix=_.rotationXYMatrix,u.apply3DTransform=_.apply3DTransform,u.apply2DTransform=_.apply2DTransform,u.apply2DTransform2=_.apply2DTransform2,u.convertCssMatrix=_.convertCssMatrix,u.inverseTransformMatrix=_.inverseTransformMatrix;var w=$e();u.deg2rad=w.deg2rad,u.rad2deg=w.rad2deg,u.angleDelta=w.angleDelta,u.angleDist=w.angleDist,u.isFullCircle=w.isFullCircle,u.isAngleInsideSector=w.isAngleInsideSector,u.isPtInsideSector=w.isPtInsideSector,u.pathArc=w.pathArc,u.pathSector=w.pathSector,u.pathAnnulus=w.pathAnnulus;var A=Ke();u.isLeftAnchor=A.isLeftAnchor,u.isCenterAnchor=A.isCenterAnchor,u.isRightAnchor=A.isRightAnchor,u.isTopAnchor=A.isTopAnchor,u.isMiddleAnchor=A.isMiddleAnchor,u.isBottomAnchor=A.isBottomAnchor;var E=Je();u.segmentsIntersect=E.segmentsIntersect,u.segmentDistance=E.segmentDistance,u.getTextLocation=E.getTextLocation,u.clearLocationCache=E.clearLocationCache,u.getVisibleSegment=E.getVisibleSegment,u.findPointOnPath=E.findPointOnPath;var F=B();u.extendFlat=F.extendFlat,u.extendDeep=F.extendDeep,u.extendDeepAll=F.extendDeepAll,u.extendDeepNoArrays=F.extendDeepNoArrays;var j=J();u.log=j.log,u.warn=j.warn,u.error=j.error;var N=Y();u.counterRegex=N.counter;var U=Qe();u.throttle=U.throttle,u.throttleDone=U.done,u.clearThrottle=U.clear;var V=Pe();function q(e){var t={};for(var r in e)for(var n=e[r],i=0;is||e=t)&&a(e)&&e>=0&&e%1==0},u.noop=Q(),u.identity=We(),u.repeat=function(e,t){for(var r=new Array(t),n=0;nr?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))},u.bBoxIntersect=function(e,t,r){return r=r||0,e.left<=t.right+r&&t.left<=e.right+r&&e.top<=t.bottom+r&&t.top<=e.bottom+r},u.simpleMap=function(e,t,r,n,i){for(var a=e.length,o=new Array(a),s=0;s=Math.pow(2,r)?i>10?(u.warn("randstr failed uniqueness"),l):e(t,r,n,(i||0)+1):l},u.OptionControl=function(e,t){e||(e={}),t||(t="opt");var r={optionList:[],_newoption:function(n){n[t]=e,r[n.name]=n,r.optionList.push(n)}};return r["_"+t]=e,r},u.smooth=function(e,t){if((t=Math.round(t)||0)<2)return e;var r,n,i,a,o=e.length,s=2*o,l=2*t-1,c=new Array(l),u=new Array(o);for(r=0;r=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=o&&(i=s-1-i),a+=e[i]*c[n];u[r]=a}return u},u.syncOrAsync=function(e,t,r){var n;function i(){return u.syncOrAsync(e,t,r)}for(;e.length;)if((n=(0,e.splice(0,1)[0])(t))&&n.then)return n.then(i);return r&&r(t)},u.stripTrailingSlash=function(e){return"/"===e.slice(-1)?e.slice(0,-1):e},u.noneOrAll=function(e,t,r){if(e){var n,i=!1,a=!0;for(n=0;n0?t:0}))},u.fillArray=function(e,t,r,n){if(n=n||u.identity,u.isArrayOrTypedArray(e))for(var i=0;iW.test(window.navigator.userAgent);var Z=/Firefox\/(\d+)\.\d+/;u.getFirefoxVersion=function(){var e=Z.exec(window.navigator.userAgent);if(e&&2===e.length){var t=parseInt(e[1]);if(!isNaN(t))return t}return null},u.isD3Selection=function(e){return e instanceof r.selection},u.ensureSingle=function(e,t,r,n){var i=e.select(t+(r?"."+r:""));if(i.size())return i;var a=e.append(t);return r&&a.classed(r,!0),n&&a.call(n),a},u.ensureSingleById=function(e,t,r,n){var i=e.select(t+"#"+r);if(i.size())return i;var a=e.append(t).attr("id",r);return n&&a.call(n),a},u.objectFromPath=function(e,t){for(var r,n=e.split("."),i=r={},a=0;a1?i+o[1]:"";if(a&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+a+"$2");return s+l},u.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var ne=/^\w*$/;u.templateString=function(e,t){var r={};return e.replace(u.TEMPLATE_STRING_REGEX,(function(e,n){var i;return ne.test(n)?i=t[n]:(r[n]=r[n]||u.nestedProperty(t,n).get,i=r[n](!0)),void 0!==i?i:""}))};var ie={max:10,count:0,name:"hovertemplate"};u.hovertemplateString=e=>ce(p(f({},e),{opts:ie}));var ae={max:10,count:0,name:"texttemplate"};u.texttemplateString=e=>ce(p(f({},e),{opts:ae}));var oe=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/,se={max:10,count:0,name:"texttemplate",parseMultDiv:!0};u.texttemplateStringForShapes=e=>ce(p(f({},e),{opts:se}));var le=/^[:|\|]/;function ce({data:e=[],locale:t,fallback:r,labels:i={},opts:a,template:o}){return o.replace(u.TEMPLATE_STRING_REGEX,((o,s,l)=>{let c=["xother","yother"].includes(s),h=["_xother","_yother"].includes(s),f=["_xother_","_yother_"].includes(s),p=["xother_","yother_"].includes(s),d=c||h||p||f;(h||f)&&(s=s.substring(1)),(p||f)&&(s=s.substring(0,s.length-1));let m,g=null,y=null;if(a.parseMultDiv){var v=function(e){var t=e.match(oe);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}(s);s=v.key,g=v.op,y=v.number}if(d){if(void 0===i[s])return"";m=i[s]}else for(let t of e)if(t){if(t.hasOwnProperty(s)){m=t[s];break}if(ne.test(s)||(m=u.nestedProperty(t,s).get(!0)),void 0!==m)break}if(void 0===m){let{count:e,max:t,name:n}=a,i=!1===r?o:r;return e=48&&o<=57,c=s>=48&&s<=57;if(l&&(n=10*n+o-48),c&&(i=10*i+s-48),!l||!c){if(n!==i)return n-i;if(o!==s)return o-s}}return i-n};var ue=2e9;u.seedPseudoRandom=function(){ue=2e9},u.pseudoRandom=function(){var e=ue;return ue=(69069*ue+1)%4294967296,Math.abs(ue-e)<429496729?u.pseudoRandom():ue/4294967296},u.fillText=function(e,t,r){var n=Array.isArray(r)?function(e){r.push(e)}:function(e){r.text=e},i=u.extractOption(e,t,"htx","hovertext");if(u.isValidTextValue(i))return n(i);var a=u.extractOption(e,t,"tx","text");return u.isValidTextValue(a)?n(a):void 0},u.isValidTextValue=function(e){return e||0===e},u.formatPercent=function(e,t){t=t||0;for(var r=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+"%",n=0;n1&&(c=1):c=0,u.strTranslate(i-c*(r+o),a-c*(n+s))+u.strScale(c)+(l?"rotate("+l+(t?"":" "+r+" "+n)+")":"")},u.setTransormAndDisplay=function(e,t){e.attr("transform",u.getTextTransform(t)),e.style("display",t.scale?null:"none")},u.ensureUniformFontSize=function(e,t){var r=u.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r},u.join2=function(e,t,r){var n=e.length;return n>1?e.slice(0,-1).join(t)+r+e[n-1]:e.join(t)},u.bigFont=function(e){return Math.round(1.2*e)};var he=u.getFirefoxVersion(),fe=null!==he&&he<86;u.getPositionFromD3Event=function(){return fe?[r.event.layerX,r.event.layerY]:[r.event.offsetX,r.event.offsetY]}}}),ut=m({"build/plotcss.js"(){var e,t,r=ct(),n={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;border:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(t in n)e=t.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),r.addStyleRule(e,n[t])}}),ht=m({"node_modules/is-browser/client.js"(e,t){t.exports=!0}}),ft=m({"node_modules/has-hover/index.js"(e,t){var r,n=ht();r="function"==typeof window.matchMedia?!window.matchMedia("(hover: none)").matches:n,t.exports=r}}),pt=m({"node_modules/events/events.js"(e,t){var r,n="object"==typeof Reflect?Reflect:null,i=n&&"function"==typeof n.apply?n.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};r=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,a),n(r)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}g(e,t,a,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){var i,a,o;if(l(r),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),o=a[t]),void 0===o)o=a[t]=r,++e._eventsCount;else if("function"==typeof o?o=a[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(i=c(e))>0&&o.length>i&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,function(e){console&&console.warn&&console.warn(e)}(s)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=h.bind(n);return i.listener=r,n.wrapFn=i,i}function p(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=a[e];if(void 0===l)return!1;if("function"==typeof l)i(l,this,t);else{var c=l.length,u=m(l,c);for(r=0;r=0;a--)if(r[a]===t||r[a].listener===t){o=r[a].listener,i=a;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return p(this,e,!0)},o.prototype.rawListeners=function(e){return p(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},o.prototype.listenerCount=d,o.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}}}),dt=m({"src/lib/events.js"(e,t){var r=pt().EventEmitter,n={init:function(e){if(e._ev instanceof r)return e;var t=new r,n=new r;return e._ev=t,e._internalEv=n,e.on=t.on.bind(t),e.once=t.once.bind(t),e.removeListener=t.removeListener.bind(t),e.removeAllListeners=t.removeAllListeners.bind(t),e._internalOn=n.on.bind(n),e._internalOnce=n.once.bind(n),e._removeInternalListener=n.removeListener.bind(n),e._removeAllInternalListeners=n.removeAllListeners.bind(n),e.emit=function(e,r){t.emit(e,r),n.emit(e,r)},"function"==typeof e.addEventListener&&e.addEventListener("wheel",(()=>{}),{passive:!0}),e},triggerHandler:function(e,t,r){var n=e._ev;if(n){var i=n._events[t];if(i){var a;for(i=Array.isArray(i)?i:[i],a=0;an.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--))},startSequence:function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0},stopSequence:function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1},undo:function(e){var t,r;if(!(void 0===e.undoQueue||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,r=0;r=e.undoQueue.queue.length)){for(t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,r=0;r=a.length)return!1;if(2===e.dimensions){if(r++,t.length===r)return e;var o=t[r];if(!x(o))return!1;e=a[i][o]}else e=a[i]}else e=a}}return e}function x(e){return e===Math.round(e)&&e>=0}function _(){var e,r,n={};for(e in c(n,i),t.subplotsRegistry)if((r=t.subplotsRegistry[e]).layoutAttributes)if(Array.isArray(r.attr))for(var a=0;a=a&&(i._input||{})._templateitemname;s&&(o=a);var l,c=r+"["+o+"]";function u(){l={},s&&(l[c]={},l[c][n]=s)}function h(e,r){s?t.nestedProperty(l[c],e).set(r):l[c+"."+e]=r}function f(){var e=l;return u(),e}return u(),{modifyBase:function(e,t){l[e]=t},modifyItem:h,getUpdateObj:f,applyUpdate:function(r,n){r&&h(r,n);var i=f();for(var a in i)t.nestedProperty(e,a).set(i[a])}}}}}),xt=m({"src/plots/cartesian/constants.js"(e,t){var r=Y().counter;t.exports={idRegex:{x:r("x","( domain)?"),y:r("y","( domain)?")},attrRegex:r("[xy]axis"),xAxisMatch:r("xaxis"),yAxisMatch:r("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"},zindexSeparator:"z"}}}),_t=m({"src/plots/cartesian/axis_ids.js"(e){var t=He(),r=xt();function n(e,t){if(t&&t.length)for(var r=0;rn?1:-1:+(e.slice(1)||1)-+(t.slice(1)||1)},e.ref2id=function(e){return!!/^[xyz]/.test(e)&&e.split(" ")[0]},e.isLinked=function(e,t){return n(t,e._axisMatchGroups)||n(t,e._axisConstraintGroups)}}}),bt=m({"src/components/shapes/handle_outline.js"(e,t){t.exports={clearOutlineControllers:function(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()},clearOutline:function(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}}}}),wt=m({"src/traces/scatter/layout_attributes.js"(e,t){t.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}}}),Tt=m({"src/plots/get_data.js"(e){var t=He();xt().SUBPLOT_PATTERN,e.getSubplotCalcData=function(e,r,n){var i=t.subplotsRegistry[r];if(!i)return[];for(var a=i.attr,o=[],s=0;s0?".":"")+a;r.isPlainObject(s)?o(s,t,l,i+1):t(l,a,s)}}))}e.manageCommandObserver=function(t,i,a,o){var s={},l=!0;i&&i._commandObserver&&(s=i._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var c=e.hasSimpleAPICommandBindings(t,a,s.lookupTable);if(i&&i._commandObserver){if(c)return s;if(i._commandObserver.remove)return i._commandObserver.remove(),i._commandObserver=null,s}if(c){n(t,c,s.cache),s.check=function(){if(l){var e=n(t,c,s.cache);return e.changed&&o&&void 0!==s.lookupTable[e.value]&&(s.disable(),Promise.resolve(o({value:e.value,type:c.type,prop:c.prop,traces:c.traces,index:s.lookupTable[e.value]})).then(s.enable,s.enable)),e.changed}};for(var u=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],h=0;h=t.width-20?(a["text-anchor"]="start",a.x=5):(a["text-anchor"]="end",a.x=t._paper.attr("width")-7),n.attr(a);var o=n.select(".js-link-to-tool"),s=n.select(".js-link-spacer"),l=n.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&function(e,t){t.text("");var r=t.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" »");if(e._context.sendData)r.on("click",(function(){w.sendDataToCloud(e)}));else{var n=window.location.pathname.split("/"),i=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+i})}}(e,o),s.text(o.text()&&l.text()?" - ":"")}},w.sendDataToCloud=function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(t){e.emit("plotly_beforeexport");var n=r.select(e).append("div").attr("id","hiddenform").style("display","none"),i=n.append("form").attr({action:t+"/external",method:"post",target:"_blank"});return i.append("input").attr({type:"text",name:"data"}).node().value=w.graphJson(e,!1,"keepdata"),i.node().submit(),n.remove(),e.emit("plotly_afterexport"),!1}};var C=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],I=["year","month","dayMonth","dayMonthYear"];function L(e,t){var r=e._context.locale;r||(r="en-US");var n=!1,i={};function a(e){for(var r=!0,a=0;a1&&z.length>1){for(s.getComponentMethod("grid","sizeDefaults")(c,l),o=0;o15&&z.length>15&&0===l.shapes.length&&0===l.images.length,w.linkSubplots(f,l,h,a),w.cleanPlot(f,l,h,a);var j=!(!a._has||!a._has("cartesian")),N=!(!l._has||!l._has("cartesian"));j&&!N?a._bgLayer.remove():N&&!j&&(l._shouldCreateBgLayer=!0),a._zoomlayer&&!e._dragging&&d({_fullLayout:a}),function(e,t){var r,n=[];t.meta&&(r=t._meta={meta:t.meta,layout:{meta:t.meta}});for(var i=0;i0){var h=1-2*s;n=Math.round(h*n),i=Math.round(h*i)}}var f=w.layoutAttributes.width.min,p=w.layoutAttributes.height.min;n1,m=!t.height&&Math.abs(r.height-i)>1;(m||d)&&(d&&(r.width=n),m&&(r.height=i)),e._initialAutoSize||(e._initialAutoSize={width:n,height:i}),w.sanitizeMargins(r)},w.supplyLayoutModuleDefaults=function(e,t,r,n){var i,a,o,l=s.componentsRegistry,c=t._basePlotModules,h=s.subplotsRegistry.cartesian;for(i in l)(o=l[i]).includeBasePlot&&o.includeBasePlot(e,t);for(var f in c.length||c.push(h),t._has("cartesian")&&(s.getComponentMethod("grid","contentDefaults")(e,t),h.finalizeSubplots(e,t)),t._subplots)t._subplots[f].sort(u.subplotSort);for(a=0;a1&&(r.l/=y,r.r/=y)}if(p){var v=(r.t+r.b)/p;v>1&&(r.t/=v,r.b/=v)}var x=void 0!==r.xl?r.xl:r.x,_=void 0!==r.xr?r.xr:r.x,b=void 0!==r.yt?r.yt:r.y,T=void 0!==r.yb?r.yb:r.y;d[t]={l:{val:x,size:r.l+g},r:{val:_,size:r.r+g},b:{val:T,size:r.b+g},t:{val:b,size:r.t+g}},m[t]=1}else delete d[t],delete m[t];if(!n._replotting)return w.doAutoMargin(e)}},w.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,n=t.height;t._size||(t._size={}),D(t);var i=t._size,o=t.margin,l={t:0,b:0,l:0,r:0},c=u.extendFlat({},i),h=o.l,f=o.r,d=o.t,m=o.b,g=t._pushmargin,y=t._pushmarginIds,v=t.minreducedwidth,x=t.minreducedheight;if(!1!==o.autoexpand){for(var _ in g)y[_]||delete g[_];var b=e._fullLayout._reservedMargin;for(var T in b)for(var k in b[T]){var A=b[T][k];l[k]=Math.max(l[k],A)}for(var M in g.base={l:{val:0,size:h},r:{val:1,size:f},t:{val:1,size:d},b:{val:0,size:m}},l){var S=0;for(var E in g)"base"!==E&&a(g[E][M].size)&&(S=g[E][M].size>S?g[E][M].size:S);var C=Math.max(0,o[M]-S);l[M]=Math.max(0,l[M]-C)}for(var I in g){var L=g[I].l||{},P=g[I].b||{},z=L.val,O=L.size,R=P.val,F=P.size,B=r-l.r-l.l,j=n-l.t-l.b;for(var N in g){if(a(O)&&g[N].r){var U=g[N].r.val,V=g[N].r.size;if(U>z){var q=(O*U+(V-B)*z)/(U-z),H=(V*(1-z)+(O-B)*(1-U))/(U-z);q+H>h+f&&(h=q,f=H)}}if(a(F)&&g[N].t){var G=g[N].t.val,W=g[N].t.size;if(G>R){var Z=(F*G+(W-j)*R)/(G-R),Y=(W*(1-R)+(F-j)*(1-G))/(G-R);Z+Y>m+d&&(m=Z,d=Y)}}}}}var X=u.constrain(r-o.l-o.r,2,v),$=u.constrain(n-o.t-o.b,2,x),K=Math.max(0,r-X),J=Math.max(0,n-$);if(K){var Q=(h+f)/K;Q>1&&(h/=Q,f/=Q)}if(J){var ee=(m+d)/J;ee>1&&(m/=ee,d/=ee)}if(i.l=Math.round(h)+l.l,i.r=Math.round(f)+l.r,i.t=Math.round(d)+l.t,i.b=Math.round(m)+l.b,i.p=Math.round(o.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!t._replotting&&(w.didMarginChange(c,i)||function(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=p.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var te=3*(1+Object.keys(y).length);if(t._redrawFromAutoMarginCount0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&e._transitionData._interruptCallbacks.push((function(){return s.call("redraw",e)})),e._transitionData._interruptCallbacks.push((function(){e.emit("plotly_transitioninterrupted",[])}));var a=0,o=0;function l(){return a++,function(){o++,!n&&o===a&&function(t){e._transitionData&&(function(e){if(e)for(;e.length;)e.shift()}(e._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return s.call("redraw",e)})).then((function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])})).then(t))}(i)}}r.runFn(l),setTimeout(l())}))}],a=u.syncOrAsync(i,e);return(!a||!a.then)&&(a=Promise.resolve()),a.then((function(){return e}))}w.didMarginChange=function(e,t){for(var r=0;r1)return!0}return!1},w.graphJson=function(e,t,r,n,i,a){(i&&t&&!e._fullData||i&&!t&&!e._fullLayout)&&w.supplyDefaults(e);var s=i?e._fullData:e.data,l=i?e._fullLayout:e.layout,c=(e._transitionData||{})._frames;function h(e,t){if("function"==typeof e)return t?"_function_":null;if(u.isPlainObject(e)){var n,i={};return Object.keys(e).sort().forEach((function(a){if(-1===["_","["].indexOf(a.charAt(0))){if("function"==typeof e[a])return void(t&&(i[a]="_function"));if("keepdata"===r){if("src"===a.slice(-3))return}else if("keepstream"===r){if("string"==typeof(n=e[a+"src"])&&n.indexOf(":")>0&&!u.isPlainObject(e.stream))return}else if("keepall"!==r&&"string"==typeof(n=e[a+"src"])&&n.indexOf(":")>0)return;i[a]=h(e[a],t)}})),i}var a=Array.isArray(e),s=u.isTypedArray(e);if((a||s)&&e.dtype&&e.shape){var l=e.bdata;return h({dtype:e.dtype,shape:e.shape,bdata:u.isArrayBuffer(l)?o.encode(l):l},t)}return a?e.map((function(e){return h(e,t)})):s?u.simpleMap(e,u.identity):u.isJSDate(e)?u.ms2DateTimeLocal(+e):e}var f={data:(s||[]).map((function(e){var r=h(e);return t&&delete r.fit,r}))};if(!t&&(f.layout=h(l),i)){var p=l._size;f.layout.computed={margin:{b:p.b,l:p.l,r:p.r,t:p.t}}}return c&&(f.frames=h(c)),a&&(f.config=h(e._context,!0)),"object"===n?f:JSON.stringify(f)},w.modifyFrames=function(e,t){var r,n,i,a=e._transitionData._frames,o=e._transitionData._frameHash;for(r=0;r=0;a--)if(s[a].enabled){r._indexToPoints=s[a]._indexToPoints;break}n&&n.calc&&(o=n.calc(e,r))}(!Array.isArray(o)||!o[0])&&(o=[{x:f,y:f}]),o[0].t||(o[0].t={}),o[0].trace=r,d[t]=o}}for(B(o,c,h),i=0;il||m>c)&&(o.style("overflow","hidden"),p=(f=o.node().getBoundingClientRect()).width,m=f.height);var g=+d.attr("x"),y=+d.attr("y"),v=-(i||d.node().getBoundingClientRect().height)/4;if("y"===P[0])s.attr({transform:"rotate("+[-90,g,y]+")"+n(-p/2,v-m/2)});else if("l"===P[0])y=v-m/2;else if("a"===P[0]&&0!==P.indexOf("atitle"))g=0,y=v;else{var x=d.attr("text-anchor");g-=p*("middle"===x?.5:"end"===x?1:0),y=y+v-m/2}o.attr({x:g,y}),M&&M.call(d,s),e(s)}))}))):z(),d}function z(){L.empty()||(P=d.attr("class")+"-math",L.select("svg."+P).remove()),d.text("").style("white-space","pre");var n=function(e,n){n=n.replace(m," ");var o,s=!1,l=[],c=-1;function d(){c++;var r=document.createElementNS(i.svg,"tspan");t.select(r).attr({class:"line",dy:c*a+"em"}),e.appendChild(r),o=r;var n=l;if(l=[{node:r}],n.length>1)for(var s=1;s doesnt match end tag <"+e+">. Pretending it did match.",n),o=l[l.length-1].node}else r.log("Ignoring unexpected end tag .",n)}v.test(n)?d():(o=e,l=[{node:e}]);for(var I=n.split(g),L=0;L|>|>)/g,c=[["$","$"],["\\(","\\)"]],u={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},h={sub:"0.3em",sup:"-0.6em"},f={sub:"-0.21em",sup:"0.42em"},p="​",d=["http:","https:","mailto:","",void 0,":"],m=e.NEWLINES=/(\r\n?|\n)/g,g=/(<[^<>]*>)/,y=/<(\/?)([^ >]*)(\s+(.*))?>/i,v=//i;e.BR_TAG_ALL=//gi;var x=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,_=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,w=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,T=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function k(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&E(n)}var A=/(^|;)\s*color:/;e.plainText=function(e,t){for(var r=void 0!==(t=t||{}).len&&-1!==t.len?t.len:1/0,n=void 0!==t.allowedTags?t.allowedTags:["br"],i=e.split(g),a=[],o="",s=0,l=0;l3?a.push(c.slice(0,Math.max(0,p-3))+"..."):a.push(c.slice(0,p));break}o=""}}return a.join("")};var M={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},S=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function E(e){return e.replace(S,(function(e,t){var r;return r="#"===t.charAt(0)?function(e){if(!(e>1114111)){var t=String.fromCodePoint;if(t)return t(e);var r=String.fromCharCode;return e<=65535?r(e):r(55232+(e>>10),e%1024+56320)}}("x"===t.charAt(1)?parseInt(t.slice(2),16):parseInt(t.slice(1),10)):M[t],r||e}))}function C(e){var t=encodeURI(decodeURI(e)),r=document.createElement("a"),n=document.createElement("a");r.href=e,n.href=t;var i=r.protocol,a=n.protocol;return-1!==d.indexOf(i)&&-1!==d.indexOf(a)?t:""}function I(e,t,n){var i,a,o,s=n.horizontalAlign,l=n.verticalAlign||"top",c=e.node().getBoundingClientRect(),u=t.node().getBoundingClientRect();return a="bottom"===l?function(){return c.bottom-i.height}:"middle"===l?function(){return c.top+(c.height-i.height)/2}:function(){return c.top},o="right"===s?function(){return c.right-i.width}:"center"===s?function(){return c.left+(c.width-i.width)/2}:function(){return c.left},function(){i=this.node().getBoundingClientRect();var e=o()-u.left,t=a()-u.top,s=n.gd||{};if(n.gd){s._fullLayout._calcInverseTransform(s);var l=r.apply3DTransform(s._fullLayout._invTransform)(e,t);e=l[0],t=l[1]}return this.style({top:t+"px",left:e+"px","z-index":1e3}),this}}e.convertEntities=E,e.sanitizeHTML=function(e){e=e.replace(m," ");for(var r=document.createElement("p"),n=r,i=[],a=e.split(g),o=0;o=0;n--,i++){var a=e[n];r[i]=[1-a[0],a[1]]}return r}function p(e,t){t=t||{};for(var a=e.domain,s=e.range,l=s.length,c=new Array(l),u=0;um-p?p=m-(d-m):d-m=0?s.colorscale.sequential:s.colorscale.sequentialminus,h._sync("colorscale",o))}}}),Yt=m({"src/components/colorscale/index.js"(e,t){var r=H(),n=Ct();t.exports={moduleType:"component",name:"colorscale",attributes:zt(),layoutAttributes:Dt(),supplyLayoutDefaults:Gt(),handleDefaults:Ht(),crossTraceDefaults:Wt(),calc:Zt(),scales:r.scales,defaultScale:r.defaultScale,getScale:r.get,isValidScale:r.isValid,hasColorscale:n.hasColorscale,extractOpts:n.extractOpts,extractScale:n.extractScale,flipScale:n.flipScale,makeColorScaleFunc:n.makeColorScaleFunc,makeColorScaleFuncFromTrace:n.makeColorScaleFuncFromTrace}}}),Xt=m({"src/traces/scatter/subtypes.js"(e,t){var r=ct(),n=I().isTypedArraySpec;t.exports={hasLines:function(e){return e.visible&&e.mode&&-1!==e.mode.indexOf("lines")},hasMarkers:function(e){return e.visible&&(e.mode&&-1!==e.mode.indexOf("markers")||"splom"===e.type)},hasText:function(e){return e.visible&&e.mode&&-1!==e.mode.indexOf("text")},isBubble:function(e){var t=e.marker;return r.isPlainObject(t)&&(r.isArrayOrTypedArray(t.size)||n(t.size))}}}}),$t=m({"src/traces/scatter/make_bubble_size_func.js"(e,t){var r=M();t.exports=function(e,t){t||(t=2);var n=e.marker,i=n.sizeref||1,a=n.sizemin||0,o="area"===n.sizemode?function(e){return Math.sqrt(e/i)}:function(e){return e/i};return function(e){var n=o(e/t);return r(n)&&n>0?Math.max(n,a):0}}}}),Kt=m({"src/components/fx/helpers.js"(e){var t=ct();e.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo},e.isTraceInSubplots=function(t,r){if("splom"===t.type){for(var n=t.xaxes||[],i=t.yaxes||[],a=0;a=0&&r.index2&&(t.push([n].concat(a.splice(0,2))),o="l",n="m"==n?"l":"L");;){if(a.length==r[o])return a.unshift(n),t.push(a);if(a.length=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}v.symbolNumber=function(e){if(a(e))e=+e;else if("string"==typeof e){var t=0;e.indexOf("-open")>0&&(t=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(t+=200,e=e.replace("-dot","")),(e=v.symbolNames.indexOf(e))>=0&&(e+=t)}return e%100>=k||e>=400?0:Math.floor(Math.max(e,0))};var S=i("~f"),E={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};function C(e,t,i,a,s,c,u,h,f,p){var d,m=s.length;"linear"===a?d={node:"linearGradient",attrs:{x1:u.x,y1:u.y,x2:h.x,y2:h.y,gradientUnits:f?"userSpaceOnUse":"objectBoundingBox"},reversed:p}:"radial"===a&&(d={node:"radialGradient",reversed:p});for(var g=new Array(m),y=0;y=0&&void 0===e.i&&(e.i=o.i),t.style("opacity",i.selectedOpacityFn?i.selectedOpacityFn(e):void 0===e.mo?s.opacity:e.mo),i.ms2mrc){var u;u="various"===e.ms||"various"===s.size?3:i.ms2mrc(e.ms),e.mrc=u,i.selectedSizeFn&&(u=e.mrc=i.selectedSizeFn(e));var h=v.symbolNumber(e.mx||s.symbol)||0;e.om=h%200>=100;var f=se(e,r),p=$(e,r);t.attr("d",A(h,u,f,p))}var d,m,g,y=!1;if(e.so)g=c.outlierwidth,m=c.outliercolor,d=s.outliercolor;else{var x=(c||{}).width;g=(e.mlw+1||x+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,m="mlc"in e?e.mlcc=i.lineScale(e.mlc):n.isArrayOrTypedArray(c.color)?l.defaultLine:c.color,n.isArrayOrTypedArray(s.color)&&(d=l.defaultLine,y=!0),d="mc"in e?e.mcc=i.markerScale(e.mc):s.color||s.colors||"rgba(0,0,0,0)",i.selectedColorFn&&(d=i.selectedColorFn(e))}let _=e.mld||(c||{}).dash;if(_&&v.dashLine(t,_,g),e.om)t.call(l.stroke,d).style({"stroke-width":(g||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:g)+"px");var b=s.gradient,w=e.mgt;w?y=!0:w=b&&b.type,n.isArrayOrTypedArray(w)&&(w=w[0],E[w]||(w=0));var T=s.pattern,k=v.getPatternAttr,M=T&&(k(T.shape,e.i,"")||k(T.path,e.i,""));if(w&&"none"!==w){var S=e.mgc;S?y=!0:S=b.color;var C=r.uid;y&&(C+="-"+e.i),v.gradient(t,a,C,w,[[0,S],[1,d]],"fill")}else if(M){var I=!1,L=T.fgcolor;!L&&o&&o.color&&(L=o.color,I=!0);var P=k(L,e.i,o&&o.color||null),z=k(T.bgcolor,e.i,null),D=T.fgopacity,O=k(T.size,e.i,8),R=k(T.solidity,e.i,.3);I=I||e.mcc||n.isArrayOrTypedArray(T.shape)||n.isArrayOrTypedArray(T.path)||n.isArrayOrTypedArray(T.bgcolor)||n.isArrayOrTypedArray(T.fgcolor)||n.isArrayOrTypedArray(T.size)||n.isArrayOrTypedArray(T.solidity);var F=r.uid;I&&(F+="-"+e.i),v.pattern(t,"point",a,F,M,O,R,e.mcc,T.fillmode,z,P,D)}else n.isArrayOrTypedArray(d)?l.fill(t,d[e.i]):l.fill(t,d);g&&l.stroke(t,m)}},v.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=v.tryColorscale(r,""),t.lineScale=v.tryColorscale(r,"line"),s.traceIs(e,"symbols")&&(t.ms2mrc=m.isBubble(e)?g(e):function(){return(r.size||6)/2}),e.selectedpoints&&n.extendFlat(t,v.makeSelectedPointStyleFns(e)),t},v.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},i=e.unselected||{},a=e.marker||{},o=r.marker||{},l=i.marker||{},c=a.opacity,u=o.opacity,h=l.opacity,f=void 0!==u,p=void 0!==h;(n.isArrayOrTypedArray(c)||f||p)&&(t.selectedOpacityFn=function(e){var t=void 0===e.mo?a.opacity:e.mo;return e.selected?f?u:t:p?h:d*t});var m=a.color,g=o.color,y=l.color;(g||y)&&(t.selectedColorFn=function(e){var t=e.mcc||m;return e.selected?g||t:y||t});var v=a.size,x=o.size,_=l.size,b=void 0!==x,w=void 0!==_;return s.traceIs(e,"symbols")&&(b||w)&&(t.selectedSizeFn=function(e){var t=e.mrc||v/2;return e.selected?b?x/2:t:w?_/2:t}),t},v.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},i=e.textfont||{},a=r.textfont||{},o=n.textfont||{},s=i.color,c=a.color,u=o.color;return t.selectedTextColorFn=function(e){var t=e.tc||s;return e.selected?c||t:u||(c?t:l.addOpacity(t,d))},t},v.selectedPointStyle=function(e,t){if(e.size()&&t.selectedpoints){var n=v.makeSelectedPointStyleFns(t),i=t.marker||{},a=[];n.selectedOpacityFn&&a.push((function(e,t){e.style("opacity",n.selectedOpacityFn(t))})),n.selectedColorFn&&a.push((function(e,t){l.fill(e,n.selectedColorFn(t))})),n.selectedSizeFn&&a.push((function(e,r){var a=r.mx||i.symbol||0,o=n.selectedSizeFn(r);e.attr("d",A(v.symbolNumber(a),o,se(r,t),$(r,t))),r.mrc2=o})),a.length&&e.each((function(e){for(var t=r.select(this),n=0;n0?r:0}function O(e,t,r){return r&&(e=V(e)),t?B(e[1]):R(e[0])}function R(e){var t=r.round(e,2);return I=t,t}function B(e){var t=r.round(e,2);return L=t,t}function j(e,t,r,n){var i=e[0]-t[0],a=e[1]-t[1],o=r[0]-t[0],s=r[1]-t[1],l=Math.pow(i*i+a*a,.25),c=Math.pow(o*o+s*s,.25),u=(c*c*i-l*l*o)*n,h=(c*c*a-l*l*s)*n,f=3*c*(l+c),p=3*l*(l+c);return[[R(t[0]+(f&&u/f)),B(t[1]+(f&&h/f))],[R(t[0]-(p&&u/p)),B(t[1]-(p&&h/p))]]}v.textPointStyle=function(e,t,i){if(e.size()){var a;if(t.selectedpoints){var o=v.makeSelectedTextStyleFns(t);a=o.selectedTextColorFn}var s=t.texttemplate,l=i._fullLayout;e.each((function(e){var o=r.select(this),c=s?n.extractOption(e,t,"txt","texttemplate"):n.extractOption(e,t,"tx","text");if(c||0===c){if(s){var u=t._module.formatLabels,f=u?u(e,t,l):{},p={};y(p,t,e.i),c=n.texttemplateString({data:[p,e,t._meta],fallback:t.texttemplatefallback,labels:f,locale:l._d3locale,template:c})}var d=e.tp||t.textposition,m=D(e,t),g=a?a(e):e.tc||t.textfont.color;o.call(v.font,{family:e.tf||t.textfont.family,weight:e.tw||t.textfont.weight,style:e.ty||t.textfont.style,variant:e.tv||t.textfont.variant,textcase:e.tC||t.textfont.textcase,lineposition:e.tE||t.textfont.lineposition,shadow:e.tS||t.textfont.shadow,size:m,color:g}).text(c).call(h.convertToTspans,i).call(z,d,m,e.mrc)}else o.remove()}))}},v.selectedTextStyle=function(e,t){if(e.size()&&t.selectedpoints){var n=v.makeSelectedTextStyleFns(t);e.each((function(e){var i=r.select(this),a=n.selectedTextColorFn(e),o=e.tp||t.textposition,c=D(e,t);l.fill(i,a);var u=s.traceIs(t,"bar-like");z(i,o,c,e.mrc2||e.mrc,u)}))}},v.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r,n="M"+e[0],i=[];for(r=1;r=c||w>=h&&w<=c)&&(T<=f&&T>=u||T>=f&&T<=u)&&(e=[w,T])}return e}v.steps=function(e){var t=N[e]||U;return function(e){for(var r="M"+R(e[0][0])+","+B(e[0][1]),n=e.length,i=1;i=1e4&&(v.savedBBoxes={},q=0),i&&(v.savedBBoxes[i]=g),q++,n.extendFlat({},g)},v.setClipUrl=function(e,t,r){e.attr("clip-path",G(t,r))},v.getTranslate=function(e){var t=(e[e.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,(function(e,t,r){return[t,r].join(" ")})).split(" ");return{x:+t[0]||0,y:+t[1]||0}},v.setTranslate=function(e,t,r){var n=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",a=e[n]("transform")||"";return t=t||0,r=r||0,a=a.replace(/(\btranslate\(.*?\);?)/,"").trim(),a=(a+=u(t,r)).trim(),e[i]("transform",a),a},v.getScale=function(e){var t=(e[e.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,(function(e,t,r){return[t,r].join(" ")})).split(" ");return{x:+t[0]||1,y:+t[1]||1}},v.setScale=function(e,t,r){var n=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",a=e[n]("transform")||"";return t=t||1,r=r||1,a=a.replace(/(\bscale\(.*?\);?)/,"").trim(),a=(a+="scale("+t+","+r+")").trim(),e[i]("transform",a),a};var Y=/\s*sc.*/;v.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,e){var n=1===t&&1===r?"":"scale("+t+","+r+")";e.each((function(){var e=(this.getAttribute("transform")||"").replace(Y,"");e=(e+=n).trim(),this.setAttribute("transform",e)}))}};var X=/translate\([^)]*\)\s*$/;function $(e,t){var r;return e&&(r=e.mf),void 0===r&&(r=t.marker&&t.marker.standoff||0),t._geo||t._xA?r:-r}v.setTextPointsScale=function(e,t,n){e&&e.each((function(){var e,i=r.select(this),a=i.select("text");if(a.node()){var o=parseFloat(a.attr("x")||0),s=parseFloat(a.attr("y")||0),l=(i.attr("transform")||"").match(X);e=1===t&&1===n?[]:[u(o,s),"scale("+t+","+n+")",u(-o,-s)],l&&e.push(l),i.attr("transform",e.join(""))}}))},v.getMarkerStandoff=$;var K,J,Q,ee,te,re,ne=Math.atan2,ie=Math.cos,ae=Math.sin;function oe(e,t){var r=t[0],n=t[1];return[r*ie(e)-n*ae(e),r*ae(e)+n*ie(e)]}function se(e,t){var r=e.ma;void 0===r&&(!(r=t.marker.angle)||n.isArrayOrTypedArray(r))&&(r=0);var i,o,s=t.marker.angleref;if("previous"===s||"north"===s){if(t._geo){var l=t._geo.project(e.lonlat);i=l[0],o=l[1]}else{var c=t._xA,u=t._yA;if(!c||!u)return 90;i=c.c2p(e.x),o=u.c2p(e.y)}if(t._geo){var h,f=e.lonlat[0],p=e.lonlat[1],d=t._geo.project([f,p+1e-5]),m=t._geo.project([f+1e-5,p]),g=ne(m[1]-o,m[0]-i),y=ne(d[1]-o,d[0]-i);if("north"===s)h=r/180*Math.PI;else if("previous"===s){var v=f/180*Math.PI,x=p/180*Math.PI,_=K/180*Math.PI,b=J/180*Math.PI,w=_-v,T=ie(b)*ae(w),k=ae(b)*ie(x)-ie(b)*ae(x)*ie(w);h=-ne(T,k)-Math.PI,K=f,J=p}var A=oe(g,[ie(h),0]),M=oe(y,[ae(h),0]);r=ne(A[1]+M[1],A[0]+M[0])/Math.PI*180,"previous"===s&&(re!==t.uid||e.i!==te+1)&&(r=null)}if("previous"===s&&!t._geo)if(re===t.uid&&e.i===te+1&&a(i)&&a(o)){var S=i-Q,E=o-ee,C=t.line&&t.line.shape||"",I=C.slice(C.length-1);"h"===I&&(E=0),"v"===I&&(S=0),r+=ne(E,S)/Math.PI*180+90}else r=null}return Q=i,ee=o,te=e.i,re=t.uid,r}v.getMarkerAngle=se}}),tr=m({"src/components/titles/index.js"(e,t){var r=b(),n=M(),i=At(),a=He(),o=ct(),s=o.strTranslate,l=er(),c=W(),u=Et(),h=Z(),f=St().OPPOSITE_SIDE,p=/ [XY][0-9]* /;t.exports={draw:function(e,t,d){var m,g=e._fullLayout,y=d.propContainer,v=d.propName,x=d.placeholder,_=d.traceIndex,b=d.avoid||{},w=d.attributes,T=d.transform,k=d.containerGroup,A=1,M=y.title,S=(M&&M.text?M.text:"").trim(),E=!1,C=M&&M.font?M.font:{},I=C.family,L=C.size,P=C.color,z=C.weight,D=C.style,O=C.variant,R=C.textcase,F=C.lineposition,B=C.shadow,j=!!d.subtitlePropName,N=d.subtitlePlaceholder,U=(y.title||{}).subtitle||{text:"",font:{}},V=(U.text||"").trim(),q=!1,H=1,G=U.font,W=G.family,Z=G.size,Y=G.color,X=G.weight,$=G.style,K=G.variant,J=G.textcase,Q=G.lineposition,ee=G.shadow;"title.text"===v?m="titleText":-1!==v.indexOf("axis")?m="axisTitleText":-1!==v.indexOf("colorbar")&&(m="colorbarTitleText");var te=e._context.edits[m];function re(e,t){return void 0!==e&&void 0!==t&&e.replace(p," % ")===t.replace(p," % ")}""===S?A=0:re(S,x)&&(te||(S=""),A=.2,E=!0),j&&(""===V?H=0:re(V,N)&&(te||(V=""),H=.2,q=!0)),d._meta?S=o.templateString(S,d._meta):g._meta&&(S=o.templateString(S,g._meta));var ne,ie=S||V||te;k||(k=o.ensureSingle(g._infolayer,"g","g-"+t),ne=g._hColorbarMoveTitle);var ae=k.selectAll("text."+t).data(ie?[0]:[]);ae.enter().append("text"),ae.text(S).attr("class",t),ae.exit().remove();var oe=null,se=t+"-subtitle",le=V||te;if(j&&((oe=k.selectAll("text."+se).data(le?[0]:[])).enter().append("text"),oe.text(V).attr("class",se),oe.exit().remove()),!ie)return k;function ce(e,t){o.syncOrAsync([ue,he],{title:e,subtitle:t})}function ue(n){var a,h=n.title,f=n.subtitle;if(!T&&ne&&(T={}),T?(a="",T.rotate&&(a+="rotate("+[T.rotate,w.x,w.y]+")"),(T.offset||ne)&&(a+=s(0,(T.offset||0)-(ne||0)))):a=null,h.attr("transform",a),h.style("opacity",A*c.opacity(P)).call(l.font,{color:c.rgb(P),size:r.round(L,2),family:I,weight:z,style:D,variant:O,textcase:R,shadow:B,lineposition:F}).attr(w).call(u.convertToTspans,e,(function(e){if(e){var t=r.select(e.node().parentNode).select("."+se);if(!t.empty()){var n=e.node().getBBox();if(n.height){var i=n.y+n.height+1.6*Z;t.attr("y",i)}}}})),f&&!f.empty()){var p=k.select("."+t+"-math-group"),d=h.node().getBBox(),m=p.node()?p.node().getBBox():void 0,g=m?m.y+m.height+1.6*Z:d.y+d.height+1.6*Z,y=o.extendFlat({},w,{y:g});f.attr("transform",a),f.style("opacity",H*c.opacity(Y)).call(l.font,{color:c.rgb(Y),size:r.round(Z,2),family:W,weight:X,style:$,variant:K,textcase:J,shadow:ee,lineposition:Q}).attr(y).call(u.convertToTspans,e)}return i.previousPromises(e)}function he(t){var i=t.title,a=r.select(i.node().parentNode);if(b&&b.selection&&b.side&&S){a.attr("transform",null);var c=f[b.side],u="left"===b.side||"top"===b.side?-1:1,h=n(b.pad)?b.pad:2,p=l.bBox(a.node()),d={t:0,b:0,l:0,r:0},m=e._fullLayout._reservedMargin;for(var v in m)for(var x in m[v]){var _=m[v][x];d[x]=Math.max(d[x],_)}var w={left:d.l,top:d.t,right:g.width-d.r,bottom:g.height-d.b},T=b.maxShift||u*(w[b.side]-p[b.side]),k=0;if(T<0)k=T;else{var A=b.offsetLeft||0,M=b.offsetTop||0;p.left-=A,p.right-=A,p.top-=M,p.bottom-=M,b.selection.each((function(){var e=l.bBox(this);o.bBoxIntersect(p,e,h)&&(k=Math.max(k,u*(e[b.side]-p[c])+h))})),k=Math.min(T,k),y._titleScoot=Math.abs(k)}if(k>0||T<0){var E={left:[-k,0],right:[k,0],top:[0,-k],bottom:[0,k]}[b.side];a.attr("transform",s(E[0],E[1]))}}}function fe(e,t){e.text(t).on("mouseover.opacity",(function(){r.select(this).transition().duration(h.SHOW_PLACEHOLDER).style("opacity",1)})).on("mouseout.opacity",(function(){r.select(this).transition().duration(h.HIDE_PLACEHOLDER).style("opacity",0)}))}if(ae.call(ce,oe),te&&(S?ae.on(".opacity",null):(fe(ae,x),E=!0),ae.call(u.makeEditable,{gd:e}).on("edit",(function(t){void 0!==_?a.call("_guiRestyle",e,v,t,_):a.call("_guiRelayout",e,v,t)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(ce)})).on("input",(function(e){this.text(e||" ").call(u.positionText,w.x,w.y)})),j)){if(j&&!S){var pe=ae.node().getBBox(),de=pe.y+pe.height+1.6*Z;oe.attr("y",de)}V?oe.on(".opacity",null):(fe(oe,N),q=!0),oe.call(u.makeEditable,{gd:e}).on("edit",(function(t){a.call("_guiRelayout",e,"title.subtitle.text",t)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(ce)})).on("input",(function(e){this.text(e||" ").call(u.positionText,oe.attr("x"),oe.attr("y"))}))}return ae.classed("js-placeholder",E),oe&&!oe.empty()&&oe.classed("js-placeholder",q),k},SUBTITLE_PADDING_EM:1.6,SUBTITLE_PADDING_MATHJAX_EM:1.6}}}),rr=m({"src/plots/cartesian/set_convert.js"(e,t){var r=b(),n=T().utcFormat,i=ct(),a=i.numberFormat,o=M(),s=i.cleanNumber,l=i.ms2DateTime,c=i.dateTime2ms,u=i.ensureNumber,h=i.isArrayOrTypedArray,f=S(),p=f.FP_SAFE,d=f.BADNUM,m=f.LOG_CLIP,g=f.ONEWEEK,y=f.ONEDAY,v=f.ONEHOUR,x=f.ONEMIN,_=f.ONESEC,w=_t(),k=xt(),A=k.HOUR_PATTERN,E=k.WEEKDAY_PATTERN;function C(e){return Math.pow(10,e)}function I(e){return null!=e}t.exports=function(e,t){t=t||{};var f=e._id||"x",b=f.charAt(0);function T(t,r){if(t>0)return Math.log(t)/Math.LN10;if(t<=0&&r&&e.range&&2===e.range.length){var n=e.range[0],i=e.range[1];return.5*(n+i-2*m*Math.abs(n-i))}return d}function M(t,r,n,a){if((a||{}).msUTC&&o(t))return+t;var s=c(t,n||e.calendar);if(s===d){if(!o(t))return d;t=+t;var l=Math.floor(10*i.mod(t+.05,1)),u=Math.round(t-l/10);s=c(new Date(u))+l/10}return s}function S(t,r,n){return l(t,r,n||e.calendar)}function L(t){return e._categories[Math.round(t)]}function P(t){if(I(t)){if(void 0===e._categoriesMap&&(e._categoriesMap={}),void 0!==e._categoriesMap[t])return e._categoriesMap[t];e._categories.push("number"==typeof t?String(t):t);var r=e._categories.length-1;return e._categoriesMap[t]=r,r}return d}function z(t){if(e._categoriesMap)return e._categoriesMap[t]}function D(e){var t=z(e);return void 0!==t?t:o(e)?+e:void 0}function O(e){return o(e)?+e:z(e)}function R(e,t,n){return r.round(n+t*e,2)}function F(e,t,r){return(e-r)/t}var B=function(t){return o(t)?R(t,e._m,e._b):d},j=function(t){return F(t,e._m,e._b)};if(e.rangebreaks){var N="y"===b;B=function(t){if(!o(t))return d;var r=e._rangebreaks.length;if(!r)return R(t,e._m,e._b);var n=N;e.range[0]>e.range[1]&&(n=!n);for(var i=n?-1:1,a=i*t,s=0,l=0;lu)){s=a<(c+u)/2?l:l+1;break}s=l+1}var h=e._B[s]||0;return isFinite(h)?R(t,e._m2,h):0},j=function(t){var r=e._rangebreaks.length;if(!r)return F(t,e._m,e._b);for(var n=0,i=0;ie._rangebreaks[i].pmax&&(n=i+1);return F(t,e._m2,e._B[n])}}e.c2l="log"===e.type?T:u,e.l2c="log"===e.type?C:u,e.l2p=B,e.p2l=j,e.c2p="log"===e.type?function(e,t){return B(T(e,t))}:B,e.p2c="log"===e.type?function(e){return C(j(e))}:j,-1!==["linear","-"].indexOf(e.type)?(e.d2r=e.r2d=e.d2c=e.r2c=e.d2l=e.r2l=s,e.c2d=e.c2r=e.l2d=e.l2r=u,e.d2p=e.r2p=function(t){return e.l2p(s(t))},e.p2d=e.p2r=j,e.cleanPos=u):"log"===e.type?(e.d2r=e.d2l=function(e,t){return T(s(e),t)},e.r2d=e.r2c=function(e){return C(s(e))},e.d2c=e.r2l=s,e.c2d=e.l2r=u,e.c2r=T,e.l2d=C,e.d2p=function(t,r){return e.l2p(e.d2r(t,r))},e.p2d=function(e){return C(j(e))},e.r2p=function(t){return e.l2p(s(t))},e.p2r=j,e.cleanPos=u):"date"===e.type?(e.d2r=e.r2d=i.identity,e.d2c=e.r2c=e.d2l=e.r2l=M,e.c2d=e.c2r=e.l2d=e.l2r=S,e.d2p=e.r2p=function(t,r,n){return e.l2p(M(t,0,n))},e.p2d=e.p2r=function(e,t,r){return S(j(e),t,r)},e.cleanPos=function(t){return i.cleanDate(t,d,e.calendar)}):"category"===e.type?(e.d2c=e.d2l=P,e.r2d=e.c2d=e.l2d=L,e.d2r=e.d2l_noadd=D,e.r2c=function(t){var r=O(t);return void 0!==r?r:e.fraction2r(.5)},e.l2r=e.c2r=u,e.r2l=O,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return L(j(e))},e.r2p=e.d2p,e.p2r=j,e.cleanPos=function(e){return"string"==typeof e&&""!==e?e:u(e)}):"multicategory"===e.type&&(e.r2d=e.c2d=e.l2d=L,e.d2r=e.d2l_noadd=D,e.r2c=function(t){var r=D(t);return void 0!==r?r:e.fraction2r(.5)},e.r2c_just_indices=z,e.l2r=e.c2r=u,e.r2l=D,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return L(j(e))},e.r2p=e.d2p,e.p2r=j,e.cleanPos=function(e){return Array.isArray(e)||"string"==typeof e&&""!==e?e:u(e)},e.setupMultiCategory=function(r){var n,a,o=e._traceIndices,s=e._matchGroup;if(s&&0===e._categories.length)for(var l in s)if(l!==f){var c=t[w.id2name(l)];o=o.concat(c._traceIndices)}var u=[[0,{}],[0,{}]],p=[];for(n=0;nl[1]&&(a[s?0:1]=n),a[0]===a[1]){var c=e.l2r(r),u=e.l2r(n);if(void 0!==r){var h=c+1;void 0!==n&&(h=Math.min(h,u)),a[s?1:0]=h}if(void 0!==n){var f=u+1;void 0!==r&&(f=Math.max(f,c)),a[s?0:1]=f}}}},e.cleanRange=function(t,r){e._cleanRange(t,r),e.limitRange(t)},e._cleanRange=function(t,r){r||(r={}),t||(t="range");var n,a,s=i.nestedProperty(e,t).get();if(a=(a="date"===e.type?i.dfltRange(e.calendar):"y"===b?k.DFLTRANGEY:"realaxis"===e._name?[0,1]:r.dfltRange||k.DFLTRANGEX).slice(),("tozero"===e.rangemode||"nonnegative"===e.rangemode)&&(a[0]=0),s&&2===s.length){var l=null===s[0],c=null===s[1];for("date"===e.type&&!e.autorange&&(s[0]=i.cleanDate(s[0],d,e.calendar),s[1]=i.cleanDate(s[1],d,e.calendar)),n=0;n<2;n++)if("date"===e.type){if(!i.isDateTime(s[n],e.calendar)){e[t]=a;break}if(e.r2l(s[0])===e.r2l(s[1])){var u=i.constrain(e.r2l(s[0]),i.MIN_MS+1e3,i.MAX_MS-1e3);s[0]=e.l2r(u-1e3),s[1]=e.l2r(u+1e3);break}}else{if(!o(s[n])){if(l||c||!o(s[1-n])){e[t]=a;break}s[n]=s[1-n]*(n?10:.1)}if(s[n]<-p?s[n]=-p:s[n]>p&&(s[n]=p),s[0]===s[1]){var h=Math.max(1,Math.abs(1e-6*s[0]));s[0]-=h,s[1]+=h}}}else i.nestedProperty(e,t).set(a)},e.setScale=function(r){var n=t._size;if(e.overlaying){var i=w.getFromId({_fullLayout:t},e.overlaying);e.domain=i.domain}var a=r&&e._r?"_r":"range",o=e.calendar;e.cleanRange(a);var s,l,c=e.r2l(e[a][0],o),u=e.r2l(e[a][1],o),h="y"===b;if(h?(e._offset=n.t+(1-e.domain[1])*n.h,e._length=n.h*(e.domain[1]-e.domain[0]),e._m=e._length/(c-u),e._b=-e._m*u):(e._offset=n.l+e.domain[0]*n.w,e._length=n.w*(e.domain[1]-e.domain[0]),e._m=e._length/(u-c),e._b=-e._m*c),e._rangebreaks=[],e._lBreaks=0,e._m2=0,e._B=[],e.rangebreaks&&(e._rangebreaks=e.locateBreaks(Math.min(c,u),Math.max(c,u)),e._rangebreaks.length)){for(s=0;su&&(f=!f),f&&e._rangebreaks.reverse();var p=f?-1:1;for(e._m2=p*e._length/(Math.abs(u-c)-e._lBreaks),e._B.push(-e._m2*(h?u:c)),s=0;sa&&(a+=7,oa&&(a+=24,o=n&&o=n&&t=s.min&&(es.max&&(s.max=n),a=!1)}a&&c.push({min:e,max:n})}};for(n=0;n2*s}(f,t))return"date";var y="strict"!==n.autotypenumbers;return function(e,t){for(var r=e.length,n=u(r),a=0,o=0,c={},h=0;h2*a}(f,y)?"category":function(e,t){for(var r=e.length,n=0;n0&&((A=I-s(_)-l(b))>L?M/A>P&&(w=_,k=b,P=M/A):M/I>P&&(w={val:_.val,nopad:1},k={val:b.val,nopad:1},P=M/I));if(m===g){var z=m-1,D=m+1;if(E)if(0===m)a=[0,1];else{var O=(m>0?h:u).reduce((function(e,t){return Math.max(e,l(t))}),0),R=m/(1-Math.min(.5,O/I));a=m>0?[0,R]:[R,0]}else a=C?[Math.max(0,z),Math.max(1,D)]:[z,D]}else E?(w.val>=0&&(w={val:0,nopad:1}),k.val<=0&&(k={val:0,nopad:1})):C&&(w.val-P*s(w)<0&&(w={val:0,nopad:1}),k.val<=0&&(k={val:1,nopad:1})),P=(k.val-w.val-f(t,_.val,b.val))/(I-s(w)-l(k)),a=[w.val-P*s(w),k.val+P*l(k)];return a=T(a,t),t.limitRange&&t.limitRange(),v&&a.reverse(),i.simpleMap(a,t.l2r||Number)}function f(e,t,r){var n=0;if(e.rangebreaks)for(var i=e.locateBreaks(t,r),a=0;a=r&&(c.extrapad||!o)){s=!1;break}i(t,c.val)&&c.pad<=r&&(o||!c.extrapad)&&(e.splice(l,1),l--)}if(s){var u=a&&0===t;e.push({val:t,pad:u?0:r,extrapad:!u&&o})}}function v(e){return n(e)&&Math.abs(e)=t}function w(e,t,r){return void 0===t||void 0===r||(t=e.d2l(t))=c&&(o=c,r=c),s<=c&&(s=c,n=c)}}return r=function(e,t){var r=t.autorangeoptions;return r&&void 0!==r.minallowed&&w(t,r.minallowed,r.maxallowed)?r.minallowed:r&&void 0!==r.clipmin&&w(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}(r,t),n=function(e,t){var r=t.autorangeoptions;return r&&void 0!==r.maxallowed&&w(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&void 0!==r.clipmax&&w(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}(n,t),[r,n]}t.exports={applyAutorangeOptions:T,getAutoRange:h,makePadFn:p,doAutoRange:function(e,t,r){if(t.setScale(),t.autorange){t.range=r?r.slice():h(e,t),t._r=t.range.slice(),t._rl=i.simpleMap(t._r,t.r2l);var n=t._input,a={};a[t._attr+".range"]=t.range,a[t._attr+".autorange"]=t.autorange,o.call("_storeDirectGUIEdit",e.layout,e._fullLayout._preGUI,a),n.range=t.range.slice(),n.autorange=t.autorange}var s=t._anchorAxis;if(s&&s.rangeslider){var l=s.rangeslider[t._name];l&&"auto"===l.rangemode&&(l.range=h(e,t)),s._input.rangeslider[t._name]=i.extendFlat({},l)}},findExtremes:function(e,t,r){r||(r={}),e._m||e.setScale();var i,o,s,l,c,u,h,f,p,d=[],y=[],x=t.length,_=r.padded||!1,b=r.tozero&&("linear"===e.type||"-"===e.type),w="log"===e.type,T=!1,k=r.vpadLinearized||!1;function A(e){if(Array.isArray(e))return T=!0,function(t){return Math.max(Number(e[t]||0),0)};var t=Math.max(Number(e||0),0);return function(){return t}}var M=A((e._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),S=A((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),E=A(r.vpadplus||r.vpad),C=A(r.vpadminus||r.vpad);if(!T){if(f=1/0,p=-1/0,w)for(i=0;i0&&(f=o),o>p&&o-a&&(f=o),o>p&&o=P;i--)L(i);return{min:d,max:y,opts:r}},concatExtremes:d}}}),ar=m({"src/plots/cartesian/axes.js"(e,t){var r=b(),n=M(),i=At(),a=He(),o=ct(),s=o.strTranslate,l=Et(),c=tr(),u=W(),h=er(),f=Lt(),p=Rt(),d=(xt(),S()),m=d.ONEMAXYEAR,g=d.ONEAVGYEAR,y=d.ONEMINYEAR,v=d.ONEMAXQUARTER,x=d.ONEAVGQUARTER,_=d.ONEMINQUARTER,w=d.ONEMAXMONTH,T=d.ONEAVGMONTH,k=d.ONEMINMONTH,A=d.ONEWEEK,E=d.ONEDAY,C=E/2,I=d.ONEHOUR,L=d.ONEMIN,P=d.ONESEC,z=d.ONEMILLI,D=d.ONEMICROSEC,O=d.MINUS_SIGN,R=d.BADNUM,F={K:"zeroline"},B={K:"gridline",L:"path"},j={K:"minor-gridline",L:"path"},N={K:"tick",L:"path"},U={K:"tick",L:"text"},V={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},q=St(),H=q.MID_SHIFT,G=q.CAP_SHIFT,Z=q.LINE_SPACING,Y=q.OPPOSITE_SIDE,X=t.exports={};X.setConvert=rr();var $=nr(),K=_t(),J=K.idSort,Q=K.isLinked;X.id2name=K.id2name,X.name2id=K.name2id,X.cleanId=K.cleanId,X.list=K.list,X.listIds=K.listIds,X.getFromId=K.getFromId,X.getFromTrace=K.getFromTrace;var ee=ir();function te(e){var t=1e-4*(e[1]-e[0]);return[e[0]-t,e[1]+t]}X.getAutoRange=ee.getAutoRange,X.findExtremes=ee.findExtremes,X.coerceRef=function(e,t,r,n,i,a){var s=n.charAt(n.length-1),l=r._fullLayout._subplots[s+"axis"],c=n+"ref",u={};return i||(i=l[0]||("string"==typeof a?a:a[0])),a||(a=i),l=l.concat(l.map((function(e){return e+" domain"}))),u[c]={valType:"enumerated",values:l.concat(a?"string"==typeof a?[a]:a:[]),dflt:i},o.coerce(e,t,u,c)},X.coerceRefArray=function(e,t,r,n,i,a,s){let l=n.charAt(n.length-1);var c=r._fullLayout._subplots[l+"axis"];let u=n+"ref";var h=e[u];i||(i=c[0]||("string"==typeof a?a:a[0])),c=(c=c.concat(c.map((e=>e+" domain")))).concat(a||[]),h.length>s?(o.warn("Array attribute "+u+" has more entries than expected, truncating to "+s),h=h.slice(0,s)):h.lengthn&&f2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0)):e._minDtick=0},X.saveRangeInitial=function(e,t){for(var r=X.list(e,"",!0),n=!1,i=0;i.3*f||u(i)||u(a))){var p=r.dtick/2;e+=e+p.8){var s=Number(r.slice(1));a.exactYears>.8&&s%12==0?e=X.tickIncrement(e,"M6","reverse")+1.5*E:a.exactMonths>.8?e=X.tickIncrement(e,"M1","reverse")+15.5*E:e-=C;var l=X.tickIncrement(e,r);if(l<=n)return l}return e}(v,e,y,c,a)),g=v;g<=u;)g=X.tickIncrement(g,y,!1,a);return{start:t.c2r(v,0,a),end:t.c2r(g,0,a),size:y,_dataSpan:u-c}},X.prepMinorTicks=function(e,t,r){if(!t.minor.dtick){delete e.dtick;var i,a=t.dtick&&n(t._tmin);if(a){var s=X.tickIncrement(t._tmin,t.dtick,!0);i=[t._tmin,.99*s+.01*t._tmin]}else{var l=o.simpleMap(t.range,t.r2l);i=[l[0],.8*l[0]+.2*l[1]]}if(e.range=o.simpleMap(i,t.l2r),e._isMinor=!0,X.prepTicks(e,r),a){var c=n(t.dtick),u=n(e.dtick),h=c?t.dtick:+t.dtick.substring(1),f=u?e.dtick:+e.dtick.substring(1);c&&u?ae(h,f)?h===2*A&&f===2*E&&(e.dtick=A):h===2*A&&f===3*E?e.dtick=A:h!==A||(t._input.minor||{}).nticks?oe(h/f,2.5)?e.dtick=h/2:e.dtick=h:e.dtick=E:"M"===String(t.dtick).charAt(0)?u?e.dtick="M1":ae(h,f)?h>=12&&2===f&&(e.dtick="M3"):e.dtick=t.dtick:"L"===String(e.dtick).charAt(0)?"L"===String(t.dtick).charAt(0)?ae(h,f)||(e.dtick=oe(h/f,2.5)?t.dtick/2:t.dtick):e.dtick="D1":"D2"===e.dtick&&+t.dtick>1&&(e.dtick=1)}e.range=t.range}void 0===t.minor._tick0Init&&(e.tick0=t.tick0)},X.prepTicks=function(e,t){var r=o.simpleMap(e.range,e.r2l,void 0,void 0,t);if("auto"===e.tickmode||!e.dtick){var i,a=e.nticks;a||("category"===e.type||"multicategory"===e.type?(i=e.tickfont?o.bigFont(e.tickfont.size||12):15,a=e._length/i):(i="y"===e._id.charAt(0)?40:80,a=o.constrain(e._length/i,4,9)+1),"radialaxis"===e._name&&(a*=2)),e.minor&&"array"!==e.minor.tickmode||"array"===e.tickmode&&(a*=100),e._roughDTick=Math.abs(r[1]-r[0])/a,X.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick<2*e._minDtick&&(e.dtick=e._minDtick,e.tick0=e.l2r(e._forceTick0))}"period"===e.ticklabelmode&&function(e){var t;function r(){return!(n(e.dtick)||"M"!==e.dtick.charAt(0))}var i=r(),a=X.getTickFormat(e);if(a){var o=e._dtickInit!==e.dtick;/%[fLQsSMX]/.test(a)||(/%[HI]/.test(a)?(t=I,o&&!i&&e.dticke.range[1],c=!e.ticklabelindex||o.isArrayOrTypedArray(e.ticklabelindex)?e.ticklabelindex:[e.ticklabelindex],u=o.simpleMap(e.range,e.r2l,void 0,void 0,t),h=u[1]=(B?0:1);j--){var N=!j;j?(e._dtickInit=e.dtick,e._tick0Init=e.tick0):(e.minor._dtickInit=e.minor.dtick,e.minor._tick0Init=e.minor.tick0);var U=j?e:o.extendFlat({},e,e.minor);if(N?X.prepMinorTicks(U,e,t):X.prepTicks(U,t),"array"!==U.tickmode)if("sync"!==U.tickmode){var V=te(u),q=V[0],H=V[1],G=n(U.dtick),W="log"===r&&!(G||"L"===U.dtick.charAt(0)),Z=X.tickFirst(U,t);if(j){if(e._tmin=Z,Z=H:J<=H;J=X.tickIncrement(J,Q,h,i)){if(j&&Y++,U.rangebreaks&&!h){if(J=p)break}if(S.length>d||J===K)break;K=J;var ee={value:J};j?(W&&J!==(0|J)&&(ee.simpleLabel=!0),a>1&&Y%a&&(ee.skipLabel=!0),S.push(ee)):(ee.minor=!0,O.push(ee))}}else S=[],b=ce(e);else j?(S=[],b=ue(e,!N)):(O=[],M=ue(e,!N))}var re;if(!O||O.length<2?c=!1:function(e,t){return/%f/.test(t)?e>=D:/%L/.test(t)?e>=z:/%[SX]/.test(t)?e>=P:/%M/.test(t)?e>=L:/%[HI]/.test(t)?e>=I:/%p/.test(t)?e>=C:/%[Aadejuwx]/.test(t)?e>=E:/%[UVW]/.test(t)?e>=A:/%[Bbm]/.test(t)?e>=k:/%[q]/.test(t)?e>=_:!/%[Yy]/.test(t)||e>=y}((O[1].value-O[0].value)*(l?-1:1),e.tickformat)||(c=!1),c){var ne=S.concat(O);s&&S.length&&(ne=ne.slice(1)),(ne=ne.sort((function(e,t){return e.value-t.value})).filter((function(e,t,r){return 0===t||e.value!==r[t-1].value}))).map((function(e,t){return void 0!==e.minor||e.skipLabel?null:t})).filter((function(e){return null!==e})).forEach((function(e){c.map((function(t){var r=e+t;r>=0&&r0?(a=n-1,o=n):(a=n,o=n);var s,l=e[a].value,c=e[o].value,u=Math.abs(c-l),h=r||u,f=0;h>=y?f=u>=y&&u<=m?u:g:r===x&&h>=_?f=u>=_&&u<=v?u:x:h>=k?f=u>=k&&u<=w?u:T:r===A&&h>=A?f=A:h>=E?f=E:r===C&&h>=C?f=C:r===I&&h>=I&&(f=I),f>=u&&(f=u,s=!0);var p=i+f;if(t.rangebreaks&&f>0){for(var d=0,b=0;b<84;b++){var M=(b+.5)/84;t.maskBreaks(i*(1-M)+M*p)!==R&&d++}(f*=d/84)||(e[n].drop=!0),s&&u>A&&(f=u)}(f>0||0===n)&&(e[n].periodX=i+f/2)}}(F,e,e._definedDelta),e.rangebreaks){var pe="y"===e._id.charAt(0),de=1;"auto"===e.tickmode&&(de=e.tickfont?e.tickfont.size:12);var me=NaN;for(re=S.length-1;re>-1;re--)if(S[re].drop)S.splice(re,1);else{S[re].value=Ue(S[re].value,e);var ge=e.c2p(S[re].value);(pe?me>ge-de:mep||np&&(r.periodX=p),n10||"01-01"!==i.slice(5)?e._tickround="d":e._tickround=+t.slice(1)%12==0?"y":"m";else if(t>=E&&a<=10||t>=15*E)e._tickround="d";else if(t>=L&&a<=16||t>=I)e._tickround="M";else if(t>=P&&a<=19||t>=L)e._tickround="S";else{var o=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(a,o)-20,e._tickround<0&&(e._tickround=4)}}else if(n(t)||"L"===t.charAt(0)){var s=e.range.map(e.r2d||Number);n(t)||(t=Number(t.slice(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),c=Math.floor(Math.log(l)/Math.LN10+.01),u=void 0===e.minexponent?3:e.minexponent;Math.abs(c)>u&&(Te(e.exponentformat)&&"SI extended"!==e.exponentformat&&!ke(c)||Te(e.exponentformat)&&"SI extended"===e.exponentformat&&!Ae(c)?e._tickexponent=3*Math.round((c-1)/3):e._tickexponent=c)}else e._tickround=null}function _e(e,t,r){var n=e.tickfont||{};return{x:t,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontWeight:n.weight,fontStyle:n.style,fontVariant:n.variant,fontTextcase:n.textcase,fontLineposition:n.lineposition,fontShadow:n.shadow,fontColor:n.color}}X.autoTicks=function(e,t,r){var i;function a(e){return Math.pow(e,Math.floor(Math.log(t)/Math.LN10))}if("date"===e.type){e.tick0=o.dateTick0(e.calendar,0);var s=2*t;if(s>g)t/=g,i=a(10),e.dtick="M"+12*ve(t,i,he);else if(s>T)t/=T,e.dtick="M"+ve(t,1,fe);else if(s>E){if(e.dtick=ve(t,E,e._hasDayOfWeekBreaks?[1,2,7,14]:de),!r){var l=X.getTickFormat(e),c="period"===e.ticklabelmode;c&&(e._rawTick0=e.tick0),/%[uVW]/.test(l)?e.tick0=o.dateTick0(e.calendar,2):e.tick0=o.dateTick0(e.calendar,1),c&&(e._dowTick0=e.tick0)}}else s>I?e.dtick=ve(t,I,fe):s>L?e.dtick=ve(t,L,pe):s>P?e.dtick=ve(t,P,pe):(i=a(10),e.dtick=ve(t,i,he))}else if("log"===e.type){e.tick0=0;var u=o.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(u[1]-u[0])<1){var h=1.5*Math.abs((u[1]-u[0])/t);t=Math.abs(Math.pow(10,u[1])-Math.pow(10,u[0]))/h,i=a(10),e.dtick="L"+ve(t,i,he)}else e.dtick=t>.3?"D2":"D1"}else"category"===e.type||"multicategory"===e.type?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):Ne(e)?(e.tick0=0,i=1,e.dtick=ve(t,i,ye)):(e.tick0=0,i=a(10),e.dtick=ve(t,i,he));if(0===e.dtick&&(e.dtick=1),!n(e.dtick)&&"string"!=typeof e.dtick){var f=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(f)}},X.tickIncrement=function(e,t,i,a){var s=i?-1:1;if(n(t))return o.increment(e,s*t);var l=t.charAt(0),c=s*Number(t.slice(1));if("M"===l)return o.incrementMonth(e,c,a);if("L"===l)return Math.log(Math.pow(10,e)+c)/Math.LN10;if("D"===l){var u="D2"===t?ge:me,h=e+.01*s,f=o.roundUp(o.mod(h,1),u,i);return Math.floor(h)+Math.log(r.round(Math.pow(10,f),1))/Math.LN10}throw"unrecognized dtick "+String(t)},X.tickFirst=function(e,t){var i=e.r2l||Number,a=o.simpleMap(e.range,i,void 0,void 0,t),s=a[1]=0&&r<=e._length?t:null};if(l&&o.isArrayOrTypedArray(e.ticktext)){var p=o.simpleMap(e.range,e.r2l),d=(Math.abs(p[1]-p[0])-(e._lBreaks||0))/1e4;for(a=0;a ")}else e._prevDateHead=l,c+="
"+l;t.text=c}(e,s,r,c):"log"===u?function(e,t,r,i,a){var s=e.dtick,l=t.x,c=e.tickformat,u="string"==typeof s&&s.charAt(0);if("never"===a&&(a=""),i&&"L"!==u&&(s="L3",u="L"),c||"L"===u)t.text=Me(Math.pow(10,l),e,a,i);else if(n(s)||"D"===u&&("complete"===e.minorloglabels||o.mod(l+.01,1)<.1)){"complete"===e.minorloglabels&&!(o.mod(l+.01,1)<.1)&&(t.fontSize*=.75);var h=Math.pow(10,l).toExponential(0).split("e"),f=+h[1],p=Math.abs(f),d=e.exponentformat;"power"===d||Te(d)&&"SI extended"!==d&&ke(f)||Te(d)&&"SI extended"===d&&Ae(f)?(t.text=h[0],p>0&&(t.text+="x10"),"1x10"===t.text&&(t.text="10"),0!==f&&1!==f&&(t.text+=""+(f>0?"":O)+p+""),t.fontSize*=1.25):("e"===d||"E"===d)&&p>2?t.text=h[0]+d+(f>0?"+":O)+p:(t.text=Me(Math.pow(10,l),e,"","fakehover"),"D1"===s&&"y"===e._id.charAt(0)&&(t.dy-=t.fontSize/6))}else{if("D"!==u)throw"unrecognized dtick "+String(s);t.text="none"===e.minorloglabels?"":String(Math.round(Math.pow(10,o.mod(l,1)))),t.fontSize*=.75}if("D1"===e.dtick){var m=String(t.text).charAt(0);("0"===m||"1"===m)&&("y"===e._id.charAt(0)?t.dx-=t.fontSize/4:(t.dy+=t.fontSize/2,t.dx+=(e.range[1]>e.range[0]?1:-1)*t.fontSize*(l<0?.5:.25)))}}(e,s,0,c,g):"category"===u?function(e,t){var r=e._categories[Math.round(t.x)];void 0===r&&(r=""),t.text=String(r)}(e,s):"multicategory"===u?function(e,t,r){var n=Math.round(t.x),i=e._categories[n]||[],a=void 0===i[1]?"":String(i[1]),o=void 0===i[0]?"":String(i[0]);r?t.text=o+" - "+a:(t.text=a,t.text2=o)}(e,s,r):Ne(e)?function(e,t,r,n,i){if("radians"!==e.thetaunit||r)t.text=Me(t.x,e,i,n);else{var a=t.x/180;if(0===a)t.text="0";else{var s=function(e){function t(e,t){return Math.abs(e-t)<=1e-6}var r=function(e){for(var r=1;!t(Math.round(e*r)/r,e);)r*=10;return r}(e),n=e*r,i=Math.abs(function e(r,n){return t(n,0)?r:e(n,r%n)}(n,r));return[Math.round(n/i),Math.round(r/i)]}(a);if(s[1]>=100)t.text=Me(o.deg2rad(t.x),e,i,n);else{var l=t.x<0;1===s[1]?1===s[0]?t.text="π":t.text=s[0]+"π":t.text=["",s[0],"","⁄","",s[1],"","π"].join(""),l&&(t.text=O+t.text)}}}}(e,s,r,c,g):function(e,t,r,n,i){"never"===i?i="":"all"===e.showexponent&&Math.abs(t.x/e.dtick)<1e-6&&(i="hide"),t.text=Me(t.x,e,i,n)}(e,s,0,c,g),i||(e.tickprefix&&!m(e.showtickprefix)&&(s.text=e.tickprefix+s.text),e.ticksuffix&&!m(e.showticksuffix)&&(s.text+=e.ticksuffix)),e.labelalias&&e.labelalias.hasOwnProperty(s.text)){var y=e.labelalias[s.text];"string"==typeof y&&(s.text=y)}return("boundaries"===e.tickson||e.showdividers)&&(s.xbnd=[f(s.x-.5),f(s.x+e.dtick-.5)]),s},X.hoverLabelText=function(e,t,r){r&&(e=o.extendFlat({},e,{hoverformat:r}));var n=o.isArrayOrTypedArray(t)?t[0]:t,i=o.isArrayOrTypedArray(t)?t[1]:void 0;if(void 0!==i&&i!==n)return X.hoverLabelText(e,n,r)+" - "+X.hoverLabelText(e,i,r);var a="log"===e.type&&n<=0,s=X.tickText(e,e.c2l(a?-n:n),"hover").text;return a?0===n?"0":O+s:s};var be=["f","p","n","μ","m","","k","M","G","T"],we=["q","r","y","z","a",...be,"P","E","Z","Y","R","Q"],Te=e=>["SI","SI extended","B"].includes(e);function ke(e){return e>14||e<-15}function Ae(e){return e>32||e<-30}function Me(e,t,r,i){var a=e<0,s=t._tickround,l=r||t.exponentformat||"B",c=t._tickexponent,u=X.getTickFormat(t),h=t.separatethousands;if(i){var f={exponentformat:l,minexponent:t.minexponent,dtick:"none"===t.showexponent?t.dtick:n(e)&&Math.abs(e)||1,range:"none"===t.showexponent?t.range.map(t.r2d):[0,e||1]};xe(f),s=(Number(f._tickround)||0)+4,c=f._tickexponent,t.hoverformat&&(u=t.hoverformat)}if(u)return t._numFormat(u)(e).replace(/-/g,O);var p,d=Math.pow(10,-s)/2;if("none"===l&&(c=0),(e=Math.abs(e))"+p+"":"B"===l&&9===c?e+="B":Te(l)&&(e+="SI extended"===l?we[c/3+10]:be[c/3+5])),a?O+e:e}function Se(e,t){if(e){var r=Object.keys(V).reduce((function(e,r){return-1!==t.indexOf(r)&&V[r].forEach((function(t){e[t]=1})),e}),{});Object.keys(e).forEach((function(t){r[t]||(1===t.length?e[t]=0:delete e[t])}))}}function Ee(e,t){for(var r=[],n={},i=0;i1&&r=i.min&&e=0,a=u(e,t[1])<=0;return(r||i)&&(n||a)}if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":for(t=0;t=o(i)))){r=n;break}break;case"log":for(t=0;t=0&&i.unshift(i.splice(n,1).shift())}}));var s={false:{left:0,right:0}};return o.syncOrAsync(i.map((function(t){return function(){if(t){var n=X.getFromId(e,t);r||(r={}),r.axShifts=s,r.overlayingShiftedAx=a;var i=X.drawOne(e,n,r);return n._shiftPusher&&Ge(n,n._fullDepth||0,s,!0),n._r=n.range.slice(),n._rl=o.simpleMap(n._r,n.r2l),i}}})))},X.drawOne=function(e,t,r){var n,s,f,p=(r=r||{}).axShifts||{},d=r.overlayingShiftedAx||[];t.setScale();var m=e._fullLayout,g=t._id,y=g.charAt(0),v=X.counterLetter(g),x=m._plots[t._mainSubplot],_="above traces"===t.zerolinelayer;if(x){if(t._shiftPusher=t.autoshift||-1!==d.indexOf(t._id)||-1!==d.indexOf(t.overlaying),t._shiftPusher&"free"===t.anchor){var b=t.linewidth/2||0;"inside"===t.ticks&&(b+=t.ticklen),Ge(t,b,p,!0),Ge(t,t.shift||0,p,!1)}(!0!==r.skipTitle||void 0===t._shift)&&(t._shift=function(e,t){return e.autoshift?t[e.overlaying][e.side]:e.shift||0}(t,p));var w=x[y+"axislayer"],T=t._mainLinePosition,k=T+=t._shift,A=t._mainMirrorPosition,M=t._vals=X.calcTicks(t),S=[t.mirror,k,A].join("_");for(n=0;n0?r.bottom-u:0,h))));var f=0,p=0;if(t._shiftPusher&&(f=Math.max(h,r.height>0?"l"===l?u-r.left:r.right-u:0),t.title.text!==m._dfltTitle[y]&&(p=(t._titleStandoff||0)+(t._titleScoot||0),"l"===l&&(p+=Le(t))),t._fullDepth=Math.max(f,p)),t.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var d=[0,1],g="number"==typeof t._shift?t._shift:0;if("x"===y){if("b"===l?n[l]=t._depth:(n[l]=t._depth=Math.max(r.width>0?u-r.top:0,h),d.reverse()),r.width>0){var x=r.right-(t._offset+t._length);x>0&&(n.xr=1,n.r=x);var _=t._offset-r.left;_>0&&(n.xl=0,n.l=_)}}else if("l"===l?(t._depth=Math.max(r.height>0?u-r.left:0,h),n[l]=t._depth-g):(t._depth=Math.max(r.height>0?r.right-u:0,h),n[l]=t._depth+g,d.reverse()),r.height>0){var b=r.bottom-(t._offset+t._length);b>0&&(n.yb=0,n.b=b);var w=t._offset-r.top;w>0&&(n.yt=1,n.t=w)}n[v]="free"===t.anchor?t.position:t._anchorAxis.domain[d[0]],t.title.text!==m._dfltTitle[y]&&(n[l]+=Le(t)+(t.title.standoff||0)),t.mirror&&"free"!==t.anchor&&((o={x:0,y:0,r:0,l:0,t:0,b:0})[c]=t.linewidth,t.mirror&&!0!==t.mirror&&(o[c]+=h),!0===t.mirror||"ticks"===t.mirror?o[v]=t._anchorAxis.domain[d[1]]:("all"===t.mirror||"allticks"===t.mirror)&&(o[v]=[t._counterDomainMin,t._counterDomainMax][d[1]]))}fe&&(s=a.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),"string"==typeof t.automargin&&(Se(n,t.automargin),Se(o,t.automargin)),i.autoMargin(e,De(t),n),i.autoMargin(e,Oe(t),o),i.autoMargin(e,Re(t),s)})),o.syncOrAsync(ue)}}function pe(e){var r=g+(e||"tick");return E[r]||(E[r]=function(e,t,r){var n,i,a,o;if(e._selections[t].size())n=1/0,i=-1/0,a=1/0,o=-1/0,e._selections[t].each((function(){var e=ze(this);if("none"!==e.node().style.display){var t=h.bBox(e.node().parentNode);n=Math.min(n,t.top),i=Math.max(i,t.bottom),a=Math.min(a,t.left),o=Math.max(o,t.right)}}));else{var s=X.makeLabelFns(e,r);n=i=s.yFn({dx:0,dy:0,fontSize:0}),a=o=s.xFn({dx:0,dy:0,fontSize:0})}return{top:n,bottom:i,left:a,right:o,height:i-n,width:o-a}}(t,r,k)),E[r]}},X.getTickSigns=function(e,t){var r=e._id.charAt(0),n={x:"top",y:"right"}[r],i=e.side===n?1:-1,a=[-1,1,i,-i];return"inside"!==(t?(e.minor||{}).ticks:e.ticks)==("x"===r)&&(a=a.map((function(e){return-e}))),e.side&&a.push({l:-1,t:-1,r:1,b:1}[e.side.charAt(0)]),a},X.makeTransTickFn=function(e){return"x"===e._id.charAt(0)?function(t){return s(e._offset+e.l2p(t.x),0)}:function(t){return s(0,e._offset+e.l2p(t.x))}},X.makeTransTickLabelFn=function(e){var t=function(e){var t=e.ticklabelposition||"",r=e.tickson||"",n=function(e){return-1!==t.indexOf(e)},i=n("top"),a=n("left"),o=n("right"),s=n("bottom"),l=n("inside"),c="boundaries"!==r&&(s||a||i||o);if(!c&&!l)return[0,0];var u=e.side,h=c?(e.tickwidth||0)/2:0,f=3,p=e.tickfont?e.tickfont.size:12;return(s||i)&&(h+=p*G,f+=(e.linewidth||0)/2),(a||o)&&(h+=(e.linewidth||0)/2,f+=3),l&&"top"===u&&(f-=p*(1-G)),(a||i)&&(h=-h),("bottom"===u||"right"===u)&&(f=-f),[c?h:0,l?f:0]}(e),r=e.ticklabelshift||0,n=e.ticklabelstandoff||0,i=t[0],a=t[1],o=e.range[0]>e.range[1],l=e.ticklabelposition&&-1!==e.ticklabelposition.indexOf("inside"),c=!l;if(r&&(r*=o?-1:1),n){var u=e.side;n*=l&&("top"===u||"left"===u)||c&&("bottom"===u||"right"===u)?1:-1}return"x"===e._id.charAt(0)?function(t){return s(i+e._offset+e.l2p(Ce(t))+r,a+n)}:function(t){return s(a+n,i+e._offset+e.l2p(Ce(t))+r)}},X.makeTickPath=function(e,t,r,n){n||(n={});var i=n.minor;if(i&&!e.minor)return"";var a=void 0!==n.len?n.len:i?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),s=(e.linewidth||1)/2;return"x"===o?"M0,"+(t+s*r)+"v"+a*r:"M"+(t+s*r)+",0h"+a*r},X.makeLabelFns=function(e,t,r){var i=e.ticklabelposition||"",a=e.tickson||"",s=function(e){return-1!==i.indexOf(e)},l=s("top"),c=s("left"),u=s("right"),h=s("bottom"),f="boundaries"!==a&&(h||c||l||u),p=s("inside"),d="inside"===i&&"inside"===e.ticks||!p&&"outside"===e.ticks&&"boundaries"!==a,m=0,g=0,y=d?e.ticklen:0;if(p?y*=-1:f&&(y=0),d&&(m+=y,r)){var v=o.deg2rad(r);m=y*Math.cos(v)+1,g=y*Math.sin(v)}e.showticklabels&&(d||e.showline)&&(m+=.2*e.tickfont.size);var x,_,b,w,T,k={labelStandoff:m+=(e.linewidth||1)/2*(p?-1:1),labelShift:g},A=0,M=e.side,S=e._id.charAt(0),E=e.tickangle;if("x"===S)w=(T=!p&&"bottom"===M||p&&"top"===M)?1:-1,p&&(w*=-1),x=g*w,_=t+m*w,b=T?1:-.2,90===Math.abs(E)&&(p?b+=H:b=-90===E&&"bottom"===M?G:90===E&&"top"===M?H:.5,A=H/2*(E/90)),k.xFn=function(e){return e.dx+x+A*e.fontSize},k.yFn=function(e){return e.dy+_+e.fontSize*b},k.anchorFn=function(e,t){if(f){if(c)return"end";if(u)return"start"}return n(t)&&0!==t&&180!==t?t*w<0!==p?"end":"start":"middle"},k.heightFn=function(t,r,n){return r<-60||r>60?-.5*n:"top"===e.side!==p?-n:0};else if("y"===S){if(w=(T=!p&&"left"===M||p&&"right"===M)?1:-1,p&&(w*=-1),x=m,_=g*w,b=0,!p&&90===Math.abs(E)&&(b=-90===E&&"left"===M||90===E&&"right"===M?G:.5),p){var C=n(E)?+E:0;if(0!==C){var I=o.deg2rad(C);A=Math.abs(Math.sin(I))*G*w,b=0}}k.xFn=function(e){return e.dx+t-(x+e.fontSize*b)*w+A*e.fontSize},k.yFn=function(e){return e.dy+_+e.fontSize*H},k.anchorFn=function(e,t){return n(t)&&90===Math.abs(t)?"middle":T?"end":"start"},k.heightFn=function(t,r,n){return"right"===e.side&&(r*=-1),r<-30?-n:r<30?-.5*n:0}}return k},X.drawTicks=function(e,t,n){n=n||{};var i=t._id+"tick",a=[].concat(t.minor&&t.minor.ticks?n.vals.filter((function(e){return e.minor&&!e.noTick})):[]).concat(t.ticks?n.vals.filter((function(e){return!e.minor&&!e.noTick})):[]),o=n.layer.selectAll("path."+i).data(a,Ie);o.exit().remove(),o.enter().append("path").classed(i,1).classed("ticks",1).classed("crisp",!1!==n.crisp).each((function(e){return u.stroke(r.select(this),e.minor?t.minor.tickcolor:t.tickcolor)})).style("stroke-width",(function(r){return h.crispRound(e,r.minor?t.minor.tickwidth:t.tickwidth,1)+"px"})).attr("d",n.path).style("display",null),qe(t,[N]),o.attr("transform",n.transFn)},X.drawGrid=function(e,t,n){if(n=n||{},"sync"!==t.tickmode){var i=t._id+"grid",a=t.minor&&t.minor.showgrid,o=a?n.vals.filter((function(e){return e.minor})):[],s=t.showgrid?n.vals.filter((function(e){return!e.minor})):[],l=n.counterAxis;if(l&&X.shouldShowZeroLine(e,t,l))for(var c="array"===t.tickmode,f=0;f=0;y--){var v=y?m:g;if(v){var x=v.selectAll("path."+i).data(y?s:o,Ie);x.exit().remove(),x.enter().append("path").classed(i,1).classed("crisp",!1!==n.crisp),x.attr("transform",n.transFn).attr("d",n.path).each((function(e){return u.stroke(r.select(this),e.minor?t.minor.gridcolor:t.gridcolor||"#ddd")})).style("stroke-dasharray",(function(e){return h.dashStyle(e.minor?t.minor.griddash:t.griddash,e.minor?t.minor.gridwidth:t.gridwidth)})).style("stroke-width",(function(e){return(e.minor?d:t._gw)+"px"})).style("display",null),"function"==typeof n.path&&x.attr("d",n.path)}}qe(t,[B,j])}},X.drawZeroLine=function(e,t,r){r=r||r;var n=t._id+"zl",i=X.shouldShowZeroLine(e,t,r.counterAxis),a=r.layer.selectAll("path."+n).data(i?[{x:0,id:t._id}]:[]);a.exit().remove(),a.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",!1!==r.crisp).each((function(){r.layer.selectAll("path").sort((function(e,t){return J(e.id,t.id)}))})),a.attr("transform",r.transFn).attr("d",r.path).call(u.stroke,t.zerolinecolor||u.defaultLine).style("stroke-width",h.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),qe(t,[F])},X.drawLabels=function(e,t,i){i=i||{};var a=e._fullLayout,c=t._id,u="above traces"===t.zerolinelayer,f=i.cls||c+"tick",p=i.vals.filter((function(e){return e.text})),d=i.labelFns,m=i.secondary?0:t.tickangle,g=(t._prevTickAngles||{})[f],y=i.layer.selectAll("g."+f).data(t.showticklabels?p:[],Ie),v=[];function x(e,a){e.each((function(e){var o=r.select(this),c=o.select(".text-math-group"),u=d.anchorFn(e,a),f=i.transFn.call(o.node(),e)+(n(a)&&0!=+a?" rotate("+a+","+d.xFn(e)+","+(d.yFn(e)-e.fontSize/2)+")":""),p=l.lineCount(o),m=Z*e.fontSize,g=d.heightFn(e,n(a)?+a:0,(p-1)*m);if(g&&(f+=s(0,g)),c.empty()){var y=o.select("text");y.attr({transform:f,"text-anchor":u}),y.style("display",null),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var v=h.bBox(c.node()).width*{end:-.5,start:.5}[u];c.attr("transform",f+s(v,0))}}))}y.enter().append("g").classed(f,1).append("text").attr("text-anchor","middle").each((function(t){var n=r.select(this),i=e._promises.length;n.call(l.positionText,d.xFn(t),d.yFn(t)).call(h.font,{family:t.font,size:t.fontSize,color:t.fontColor,weight:t.fontWeight,style:t.fontStyle,variant:t.fontVariant,textcase:t.fontTextcase,lineposition:t.fontLineposition,shadow:t.fontShadow}).text(t.text).call(l.convertToTspans,e),e._promises[i]?v.push(e._promises.pop().then((function(){x(n,m)}))):x(n,m)})),qe(t,[U]),y.exit().remove(),i.repositionOnUpdate&&y.each((function(e){r.select(this).select("text").call(l.positionText,d.xFn(e),d.yFn(e))})),t._adjustTickLabelsOverflow=function(){var n=t.ticklabeloverflow;if(n&&"allow"!==n){var i=-1!==n.indexOf("hide"),s="x"===t._id.charAt(0),l=0,c=s?e._fullLayout.width:e._fullLayout.height;if(-1!==n.indexOf("domain")){var u=o.simpleMap(t.range,t.r2l);l=t.l2p(u[0])+t._offset,c=t.l2p(u[1])+t._offset}var f=Math.min(l,c),p=Math.max(l,c),d=t.side,m=1/0,g=-1/0;for(var v in y.each((function(e){var n=r.select(this);if(n.select(".text-math-group").empty()){var a=h.bBox(n.node()),o=0;s?(a.right>p||a.leftp||a.top+(t.tickangle?0:e.fontSize/4)t["_visibleLabelMin_"+n._id]?l.style("display","none"):"tick"===e.K&&!i&&"none"!==l.node().style.display&&l.style("display",null)}))}))}))}))},x(y,g+1?g:m);var _=null;t._selections&&(t._selections[f]=y);var b=[function(){return v.length&&Promise.all(v)}];t.automargin&&a._redrawFromAutoMarginCount&&90===g?(_=g,b.push((function(){x(y,g)}))):b.push((function(){if(x(y,m),p.length&&t.autotickangles&&("log"!==t.type||"D"!==String(t.dtick).charAt(0))){_=t.autotickangles[0];var e,r=0,n=[],a=1;y.each((function(e){r=Math.max(r,e.fontSize);var i=t.l2p(e.x),o=ze(this),s=h.bBox(o.node());a=Math.max(a,l.lineCount(o)),n.push({top:0,bottom:10,height:10,left:i-s.width/2,right:i+s.width/2+2,width:s.width+2})}));var s=("boundaries"===t.tickson||t.showdividers)&&!i.secondary,c=p.length,u=Math.abs((p[c-1].x-p[0].x)*t._m)/(c-1),f=s?u/2:u,d=s?t.ticklen:1.25*r*a,g=f/Math.sqrt(Math.pow(f,2)+Math.pow(d,2)),v=t.autotickangles.map((function(e){return e*Math.PI/180})),b=v.find((function(e){return Math.abs(Math.cos(e))<=g}));void 0===b&&(b=v.reduce((function(e,t){return Math.abs(Math.cos(e))R*O&&(P=O,C[E]=I[E]=z[E])}var V=Math.abs(P-L);V-A>0?A*=1+A/(V-=A):A=0,"y"!==t._id.charAt(0)&&(A=-A),C[S]=T.p2r(T.r2p(I[S])+M*A),"min"===T.autorange||"max reversed"===T.autorange?(C[0]=null,T._rangeInitial0=void 0,T._rangeInitial1=void 0):("max"===T.autorange||"min reversed"===T.autorange)&&(C[1]=null,T._rangeInitial0=void 0,T._rangeInitial1=void 0),a._insideTickLabelsUpdaterange[T._name+".range"]=C}var q=o.syncOrAsync(b);return q&&q.then&&e._promises.push(q),q},X.getPxPosition=function(e,t){var r,n=e._fullLayout._size,i=t._id.charAt(0),a=t.side;return"free"!==t.anchor?r=t._anchorAxis:"x"===i?r={_offset:n.t+(1-(t.position||0))*n.h,_length:0}:"y"===i&&(r={_offset:n.l+(t.position||0)*n.w+t._shift,_length:0}),"top"===a||"left"===a?r._offset:"bottom"===a||"right"===a?r._offset+r._length:void 0},X.shouldShowZeroLine=function(e,t,r){var n=o.simpleMap(t.range,t.r2l);return n[0]*n[1]<=0&&t.zeroline&&("linear"===t.type||"-"===t.type)&&!(t.rangebreaks&&t.maskBreaks(0)===R)&&(Pe(t,0)||!function(e,t,r,n){var i=r._mainAxis;if(i){var a=e._fullLayout,o=t._id.charAt(0),s=X.counterLetter(t._id),l=t._offset+(Math.abs(n[0])1)for(n=1;n4/3-s?o:s}}}),hr=m({"src/components/dragelement/cursor.js"(e,t){var r=ct(),n=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];t.exports=function(e,t,i,a){return e="left"===i?0:"center"===i?1:"right"===i?2:r.constrain(Math.floor(3*e),0,2),t="bottom"===a?0:"middle"===a?1:"top"===a?2:r.constrain(Math.floor(3*t),0,2),n[t][e]}}}),fr=m({"src/components/dragelement/unhover.js"(e,t){var r=dt(),n=Qe(),i=Pe().getGraphDiv,a=N(),o=t.exports={};o.wrapped=function(e,t,r){(e=i(e))._fullLayout&&n.clear(e._fullLayout._uid+a.HOVERID),o.raw(e,t,r)},o.raw=function(e,t){var n=e._fullLayout,i=e._hoverdata;t||(t={}),(!t.target||e._dragged||!1!==r.triggerHandler(e,"plotly_beforehover",t))&&(n._hoverlayer.selectAll("g").remove(),n._hoverlayer.selectAll("line").remove(),n._hoverlayer.selectAll("circle").remove(),e._hoverdata=void 0,t.target&&i&&e.emit("plotly_unhover",{event:t,points:i}))}}}),pr=m({"src/components/dragelement/index.js"(e,t){var r=lr(),n=ft(),i=cr(),a=ct().removeElement,o=xt(),s=t.exports={};s.align=ur(),s.getCursor=hr();var l=fr();function c(){var e=document.createElement("div");e.className="dragcover";var t=e.style;return t.position="fixed",t.left=0,t.right=0,t.top=0,t.bottom=0,t.zIndex=999999999,t.background="none",document.body.appendChild(e),e}function u(e){return r(e.changedTouches?e.changedTouches[0]:e,document.body)}s.unhover=l.wrapped,s.unhoverRaw=l.raw,s.init=function(e){var t,r,l,h,f,p,d,m,g=e.gd,y=1,v=g._context.doubleClickDelay,x=e.element;g._mouseDownTime||(g._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=b,i?(x._ontouchstart&&x.removeEventListener("touchstart",x._ontouchstart),x._ontouchstart=b,x.addEventListener("touchstart",b,{passive:!1})):x.ontouchstart=b;var _=e.clampFn||function(e,t,r){return Math.abs(e)"u"&&typeof i.clientY>"u"&&(i.clientX=t,i.clientY=r),(l=(new Date).getTime())-g._mouseDownTimev&&(y=Math.max(y-1,1)),g._dragged?e.doneFn&&e.doneFn():(p.target===d?r=p:(r={target:d,srcElement:d,toElement:d},Object.keys(p).concat(Object.keys(p.__proto__)).forEach((e=>{var t=p[e];!r[e]&&"function"!=typeof t&&(r[e]=t)}))),e.clickFn&&e.clickFn(y,r),m||d.dispatchEvent(new MouseEvent("click",t))),g._dragging=!1,g._dragged=!1):g._dragged=!1}},s.coverSlip=c}}),dr=m({"src/lib/setcursor.js"(e,t){t.exports=function(e,t){(e.attr("class")||"").split(" ").forEach((function(t){0===t.indexOf("cursor-")&&e.classed(t,!1)})),t&&e.classed("cursor-"+t,!0)}}}),mr=m({"src/lib/override_cursor.js"(e,t){var r=dr(),n="data-savedcursor";t.exports=function(e,t){var i=e.attr(n);if(t){if(!i){for(var a=(e.attr("class")||"").split(" "),o=0;ot.legend.length)for(var n=t.legend.length;n("legend"===e?1:0));if(!1===S&&(c[e]=void 0),(!1!==S||f.uirevision)&&(d("uirevision",c.uirevision),!1!==S)){d("borderwidth");var E,C,I,L="h"===d("orientation"),P="paper"===d("yref"),z="paper"===d("xref"),D="left";if(L?(E=0,r.getComponentMethod("rangeslider","isVisible")(t.xaxis)?P?(C=1.1,I="bottom"):(C=1,I="top"):P?(C=-.1,I="top"):(C=0,I="bottom")):(C=1,I="auto",z?E=1.02:(E=1,D="right")),n.coerce(f,p,{x:{valType:"number",editType:"legend",min:z?-2:0,max:z?3:1,dflt:E}},"x"),n.coerce(f,p,{y:{valType:"number",editType:"legend",min:P?-2:0,max:P?3:1,dflt:C}},"y"),d("traceorder",w),l.isGrouped(c[e])&&d("tracegroupgap"),d("entrywidth"),d("entrywidthmode"),d("indentation"),d("itemsizing"),d("itemwidth"),d("itemclick"),d("itemdoubleclick"),d("groupclick"),d("xanchor",D),d("yanchor",I),d("maxheight"),d("valign"),n.noneOrAll(f,p,["x","y"]),d("title.text")){d("title.side",L?"left":"top");var O=n.extendFlat({},m,{size:n.bigFont(m.size)});n.coerceFont(d,"title.font",O);let e=h>1;d("titleclick",!!e&&"toggle"),d("titledoubleclick",!!e&&"toggleothers")}}}function R(e){return r.traceIs(e,"pie-like")&&null!=e._length&&(Array.isArray(e.legend)||Array.isArray(e.showlegend))}}t.exports=function(e,t,r){var i,a=r.slice(),o=t.shapes;if(o)for(i=0;iC&&(E=C)}M[a][0]._groupMinRank=E,M[a][0]._preGroupSort=a}var I=function(e,t){return e.trace.legendrank-t.trace.legendrank||e._preSort-t._preSort};for(M.forEach((function(e,t){e[0]._preGroupSort=t})),M.sort((function(e,t){return e[0]._groupMinRank-t[0]._groupMinRank||e[0]._preGroupSort-t[0]._preGroupSort})),a=0;ar?r:e}t.exports=function(e,t,g){var y=t._fullLayout;g||(g=y.legend);var v="constant"===g.itemsizing,x=g.itemwidth,_=(x+2*f.itemGap)/2,b=a(_,0),w=function(e,t,r,n){var i;if(e+1)i=e;else{if(!(t&&t.width>0))return 0;i=t.width}return v?n:Math.min(i,r)};function T(e,i,a){var c=e[0].trace,u=c.marker||{},h=u.line||{},f=u.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",p=a?c.visible&&c.type===a:n.traceIs(c,"bar"),d=r.select(i).select("g.legendpoints").selectAll("path.legend"+a).data(p?[e]:[]);d.enter().append("path").classed("legend"+a,!0).attr("d",f).attr("transform",b),d.exit().remove(),d.each((function(e){var n=r.select(this),i=e[0],a=w(i.mlw,u.line,5,2);n.style("stroke-width",a+"px");var f=i.mcc;if(!g._inHover&&"mc"in i){var p=l(u),d=p.mid;void 0===d&&(d=(p.max+p.min)/2),f=o.tryColorscale(u,"")(d)}var y=f||i.mc||u.color,v=u.pattern,x=o.getPatternAttr,_=v&&(x(v.shape,0,"")||x(v.path,0,""));if(_){var b=x(v.bgcolor,0,null),T=x(v.fgcolor,0,null),k=v.fgopacity,A=m(v.size,8,10),M=m(v.solidity,.5,1),S="legend-"+c.uid;n.call(o.pattern,"legend",t,S,_,A,M,f,v.fillmode,b,T,k)}else n.call(s.fill,y);a&&s.stroke(n,i.mlc||h.color)}))}function k(e,a,o){var s=e[0],l=s.trace,c=o?l.visible&&l.type===o:n.traceIs(l,o),f=r.select(a).select("g.legendpoints").selectAll("path.legend"+o).data(c?[e]:[]);if(f.enter().append("path").classed("legend"+o,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",b),f.exit().remove(),f.size()){var p=l.marker||{},d=w(h(p.line.width,s.pts),p.line,5,2),m="pieLike",g=i.minExtend(l,{marker:{line:{width:d}}},m),y=i.minExtend(s,{trace:g},m);u(f,y,g,t)}}e.each((function(e){var t=r.select(this),n=i.ensureSingle(t,"g","layers");n.style("opacity",e[0].trace.opacity);var o=g.indentation,s=g.valign,l=e[0].lineHeight,c=e[0].height;if("middle"===s&&0===o||!l||!c)n.attr("transform",null);else{var u={top:1,bottom:-1}[s]*(.5*(l-c+3))||0,h=g.indentation;n.attr("transform",a(h,u))}n.selectAll("g.legendfill").data([e]).enter().append("g").classed("legendfill",!0),n.selectAll("g.legendlines").data([e]).enter().append("g").classed("legendlines",!0);var f=n.selectAll("g.legendsymbols").data([e]);f.enter().append("g").classed("legendsymbols",!0),f.selectAll("g.legendpoints").data([e]).enter().append("g").classed("legendpoints",!0)})).each((function(e){var n,a=e[0].trace,c=[];if(a.visible)switch(a.type){case"histogram2d":case"heatmap":c=[["M-15,-2V4H15V-2Z"]],n=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":c=[["M-6,-6V6H6V-6Z"]],n=!0;break;case"densitymapbox":case"densitymap":c=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],n="radial";break;case"cone":c=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],n=!1;break;case"streamtube":c=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],n=!1;break;case"surface":c=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],n=!0;break;case"mesh3d":c=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],n=!1;break;case"volume":c=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],n=!0;break;case"isosurface":c=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],n=!1}var u=r.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(c);u.enter().append("path").classed("legend3dandfriends",!0).attr("transform",b).style("stroke-miterlimit",1),u.exit().remove(),u.each((function(e,c){var u,h=r.select(this),f=l(a),d=f.colorscale,m=f.reversescale;if(d){if(!n){var g=d.length;u=0===c?d[m?g-1:0][1]:1===c?d[m?0:g-1][1]:d[Math.floor((g-1)/2)][1]}}else{var y=a.vertexcolor||a.facecolor||a.color;u=i.isArrayOrTypedArray(y)?y[c]||y[0]:y}h.attr("d",e[0]),u?h.call(s.fill,u):h.call((function(e){if(e.size()){var r="legendfill-"+a.uid;o.gradient(e,t,r,p(m,"radial"===n),d,"fill")}}))}))})).each((function(e){var t=e[0].trace,n="waterfall"===t.type;if(e[0]._distinct&&n){var i=e[0].trace[e[0].dir].marker;return e[0].mc=i.color,e[0].mlw=i.line.width,e[0].mlc=i.line.color,T(e,this,"waterfall")}var a=[];t.visible&&n&&(a=e[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var o=r.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(a);o.enter().append("path").classed("legendwaterfall",!0).attr("transform",b).style("stroke-miterlimit",1),o.exit().remove(),o.each((function(e){var n=r.select(this),i=t[e[0]].marker,a=w(void 0,i.line,5,2);n.attr("d",e[1]).style("stroke-width",a+"px").call(s.fill,i.color),a&&n.call(s.stroke,i.line.color)}))})).each((function(e){T(e,this,"funnel")})).each((function(e){T(e,this)})).each((function(e){var a=e[0].trace,l=r.select(this).select("g.legendpoints").selectAll("path.legendbox").data(a.visible&&n.traceIs(a,"box-violin")?[e]:[]);l.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",b),l.exit().remove(),l.each((function(){var e=r.select(this);if("all"!==a.boxpoints&&"all"!==a.points||0!==s.opacity(a.fillcolor)||0!==s.opacity((a.line||{}).color)){var n=w(void 0,a.line,5,2);e.style("stroke-width",n+"px").call(s.fill,a.fillcolor),n&&s.stroke(e,a.line.color)}else{var c=i.minExtend(a,{marker:{size:v?12:i.constrain(a.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});l.call(o.pointStyle,c,t)}}))})).each((function(e){k(e,this,"funnelarea")})).each((function(e){k(e,this,"pie")})).each((function(e){var n,a,s=d(e),u=s.showFill,h=s.showLine,f=s.showGradientLine,m=s.showGradientFill,g=s.anyFill,y=s.anyLine,v=e[0],_=v.trace,b=l(_),T=b.colorscale,k=b.reversescale,A=c.hasMarkers(_)||!g?"M5,0":y?"M5,-2":"M5,-3",M=r.select(this),S=M.select(".legendfill").selectAll("path").data(u||m?[e]:[]);if(S.enter().append("path").classed("js-fill",!0),S.exit().remove(),S.attr("d",A+"h"+x+"v6h-"+x+"z").call((function(e){if(e.size())if(u)o.fillGroupStyle(e,t,!0);else{var r="legendfill-"+_.uid;o.gradient(e,t,r,p(k),T,"fill")}})),h||f){var E=w(void 0,_.line,10,5);a=i.minExtend(_,{line:{width:E}}),n=[i.minExtend(v,{trace:a})]}var C=M.select(".legendlines").selectAll("path").data(h||f?[n]:[]);C.enter().append("path").classed("js-line",!0),C.exit().remove(),C.attr("d",A+(f?"l"+x+",0.0001":"h"+x)).call(h?o.lineGroupStyle:function(e){if(e.size()){var r="legendline-"+_.uid;o.lineGroupStyle(e),o.gradient(e,t,r,p(k),T,"stroke")}})})).each((function(e){var n,a,s=d(e),l=s.anyFill,u=s.anyLine,h=s.showLine,f=s.showMarker,p=e[0],m=p.trace,g=!f&&!u&&!l&&c.hasText(m);function y(e,t,r,n){var a=i.nestedProperty(m,e).get(),o=i.isArrayOrTypedArray(a)&&t?t(a):a;if(v&&o&&void 0!==n&&(o=n),r){if(or[1])return r[1]}return o}function x(e){return p._distinct&&p.index&&e[p.index]?e[p.index]:e[0]}if(f||g||h){var _={},w={};if(f){_.mc=y("marker.color",x),_.mx=y("marker.symbol",x),_.mo=y("marker.opacity",i.mean,[.2,1]),_.mlc=y("marker.line.color",x),_.mlw=y("marker.line.width",i.mean,[0,5],2),_.mld=m._isShape?"solid":y("marker.line.dash",x),w.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var T=y("marker.size",i.mean,[2,16],12);_.ms=T,w.marker.size=T}h&&(w.line={width:y("line.width",x,[0,10],5)}),g&&(_.tx="Aa",_.tp=y("textposition",x),_.ts=10,_.tc=y("textfont.color",x),_.tf=y("textfont.family",x),_.tw=y("textfont.weight",x),_.ty=y("textfont.style",x),_.tv=y("textfont.variant",x),_.tC=y("textfont.textcase",x),_.tE=y("textfont.lineposition",x),_.tS=y("textfont.shadow",x)),n=[i.minExtend(p,_)],(a=i.minExtend(m,w)).selectedpoints=null,a.texttemplate=null}var k=r.select(this).select("g.legendpoints"),A=k.selectAll("path.scatterpts").data(f?n:[]);A.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",b),A.exit().remove(),A.call(o.pointStyle,a,t),f&&(n[0].mrc=3);var M=k.selectAll("g.pointtext").data(g?n:[]);M.enter().append("g").classed("pointtext",!0).append("text").attr("transform",b),M.exit().remove(),M.selectAll("text").call(o.textPointStyle,a,t)})).each((function(e){var t=e[0].trace,n=r.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(t.visible&&"candlestick"===t.type?[e,e]:[]);n.enter().append("path").classed("legendcandle",!0).attr("d",(function(e,t){return t?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"})).attr("transform",b).style("stroke-miterlimit",1),n.exit().remove(),n.each((function(e,n){var i=r.select(this),a=t[n?"increasing":"decreasing"],o=w(void 0,a.line,5,2);i.style("stroke-width",o+"px").call(s.fill,a.fillcolor),o&&s.stroke(i,a.line.color)}))})).each((function(e){var t=e[0].trace,n=r.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(t.visible&&"ohlc"===t.type?[e,e]:[]);n.enter().append("path").classed("legendohlc",!0).attr("d",(function(e,t){return t?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"})).attr("transform",b).style("stroke-miterlimit",1),n.exit().remove(),n.each((function(e,n){var i=r.select(this),a=t[n?"increasing":"decreasing"],l=w(void 0,a.line,5,2);i.style("fill","none").call(o.dashLine,a.line.dash,l),l&&s.stroke(i,a.line.color)}))}))}}}),Mr=m({"src/components/legend/draw.js"(e,t){var r=b(),n=ct(),i=At(),a=He(),o=dt(),s=pr(),l=er(),c=W(),u=Et(),h=xr().handleItemClick,f=xr().handleTitleClick,p=_r(),d=St(),m=d.LINE_SPACING,g=d.FROM_TL,y=d.FROM_BR,v=br(),x=Ar(),_=yr(),w=/^legend[0-9]*$/;function T(e,t){var h,d,b=t||{},w=e._fullLayout,T=_.getId(b),S=b._inHover;if(S?(d=b.layer,h="hover"):(d=w._infolayer,h=T),d){var P;if(h+=w._uid,e._legendMouseDownTime||(e._legendMouseDownTime=0),S){if(!b.entries)return;P=v(b.entries,b)}else{for(var z=(e.calcdata||[]).slice(),D=w.shapes,O=0;O1)}var B=w.hiddenlabels||[];if(!(S||w.showlegend&&P.length))return d.selectAll("."+T).remove(),w._topdefs.select("#"+h).remove(),i.autoMargin(e,T);var j=n.ensureSingle(d,"g",T,(function(e){S||e.attr("pointer-events","all")})),N=n.ensureSingleById(w._topdefs,"clipPath",h,(function(e){e.append("rect")})),U=n.ensureSingle(j,"rect","bg",(function(e){e.attr("shape-rendering","crispEdges")}));U.call(c.stroke,b.bordercolor).call(c.fill,b.bgcolor).style("stroke-width",b.borderwidth+"px");var V,q=n.ensureSingle(j,"g","scrollbox"),H=b.title;b._titleWidth=0,b._titleHeight=0,H.text?((V=n.ensureSingle(q,"text",T+"titletext")).attr("text-anchor","start").call(l.font,H.font).text(H.text),C(V,q,e,b,1),!S&&(b.titleclick||b.titledoubleclick)&&function(e,t,i,s){if(t._fullData.some((function(e){let t=e.legend||"legend";return(Array.isArray(t)?t.includes(s):t===s)&&a.traceIs(e,"pie-like")})))return;let l=t._context.doubleClickDelay;var u,h=1;let p=n.ensureSingle(e,"rect",s+"titletoggle",(function(e){t._context.staticPlot||e.style("cursor","pointer").attr("pointer-events","all"),e.call(c.fill,"rgba(0,0,0,0)")}));t._context.staticPlot||(p.on("mousedown",(function(){(u=(new Date).getTime())-t._legendMouseDownTimel&&(h=Math.max(h-1,1));let e={event:r.event,legendId:s,data:t.data,layout:t.layout,fullData:t._fullData,fullLayout:t._fullLayout};if(1===h&&i.titleclick){if(!1===o.triggerHandler(t,"plotly_legendtitleclick",e))return;i._titleClickTimeout=setTimeout((function(){t._fullLayout&&f(t,i,i.titleclick)}),l)}else 2===h&&(i._titleClickTimeout&&clearTimeout(i._titleClickTimeout),t._legendMouseDownTime=0,!1!==o.triggerHandler(t,"plotly_legendtitledoubleclick",e)&&i.titledoubleclick&&f(t,i,i.titledoubleclick))})))}(q,e,b,T)):(q.selectAll("."+T+"titletext").remove(),q.selectAll("."+T+"titletoggle").remove());var G=n.ensureSingle(j,"rect","scrollbar",(function(e){e.attr(p.scrollBarEnterAttrs).call(c.fill,p.scrollBarColor)})),W=q.selectAll("g.groups").data(P);W.enter().append("g").attr("class","groups"),W.exit().remove();var Z=W.selectAll("g.traces").data(n.identity);Z.enter().append("g").attr("class","traces"),Z.exit().remove(),Z.style("opacity",(function(t){let r=t[0],n=r.trace;if(r.groupTitle){let t=n.legendgroup,r=(w.shapes||[]).filter((function(e){return e.showlegend}));return e._fullData.concat(r).some((function(e){return e.legendgroup===t&&(e.legend||"legend")===T&&!0===e.visible}))?1:.5}return a.traceIs(n,"pie-like")?-1!==B.indexOf(t[0].label)?.5:1:"legendonly"===n.visible?.5:1})).each((function(){r.select(this).call(M,e,b)})).call(x,e,b).each((function(t){S||t[0].groupTitle&&"toggleitem"===b.groupclick||r.select(this).call(E,e,T)})),n.syncOrAsync([i.previousPromises,function(){return function(e,t,n,i,a){var o=e._fullLayout,s=_.getId(i);i||(i=o[s]);var c=o._size,h=_.isVertical(i),f=_.isGrouped(i),d="fraction"===i.entrywidthmode,g=i.borderwidth,y=2*g,v=p.itemGap,x=i.indentation+i.itemwidth+2*v,b=2*(g+v),w=L(i),T=i.y<0||0===i.y&&"top"===w,A=i.y>1||1===i.y&&"bottom"===w,M=i.tracegroupgap,S={};let{orientation:E,yref:C}=i,{maxheight:P}=i,z=T||A||"v"!==E||"paper"!==C;P||(P=z?.5:1);let D=z?o.height:c.h;i._maxHeight=Math.max(P>1?P:P*D,30);var O=0;i._width=0,i._height=0;var R=function(e){var t=0,r=0,n=e.title.side;return n&&(-1!==n.indexOf("left")&&(t=e._titleWidth),-1!==n.indexOf("top")&&(r=e._titleHeight)),[t,r]}(i);if(h)n.each((function(e){var t=e[0].height;l.setTranslate(this,g+R[0],g+R[1]+i._height+t/2+v),i._height+=t,i._width=Math.max(i._width,e[0].width)})),O=x+i._width,i._width+=v+x+y,i._height+=b,f&&(t.each((function(e,t){l.setTranslate(this,0,t*i.tracegroupgap)})),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var F=I(i),B=i.x<0||0===i.x&&"right"===F,j=i.x>1||1===i.x&&"left"===F,N=A||T,U=o.width/2;i._maxWidth=Math.max(B?N&&"left"===F?c.l+c.w:U:j?N&&"right"===F?c.r+c.w:U:c.w,2*x);var V=0,q=0;n.each((function(e){var t=k(e,i,x);V=Math.max(V,t),q+=t})),O=null;var H=0;if(f){var G=0,W=0,Z=0;t.each((function(){var e=0,t=0;r.select(this).selectAll("g.traces").each((function(r){var n=k(r,i,x),a=r[0].height;l.setTranslate(this,R[0],R[1]+g+v+a/2+t),t+=a,e=Math.max(e,n),S[r[0].trace.legendgroup]=e}));var n=e+v;W>0&&n+g+W>i._maxWidth?(H=Math.max(H,W),W=0,Z+=G+M,G=t):G=Math.max(G,t),l.setTranslate(this,W,Z),W+=n})),i._width=Math.max(H,W)+g,i._height=Z+G+b}else{var Y=n.size(),X=q+y+(Y-1)*v=i._maxWidth&&(H=Math.max(H,Q),K=0,J+=$,i._height+=$,$=0),l.setTranslate(this,R[0]+g+K,R[1]+g+J+t/2+v),Q=K+r+v,K+=n,$=Math.max($,t)})),X?(i._width=K+y,i._height=$+b):(i._width=Math.max(H,Q)+y,i._height+=$+b)}}i._width=Math.ceil(Math.max(i._width+R[0],i._titleWidth+2*(g+p.titlePad))),i._height=Math.ceil(Math.max(i._height+R[1],i._titleHeight+2*(g+p.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var ee=e._context.edits,te=ee.legendText||ee.legendPosition;n.each((function(e){var t=r.select(this).select("."+s+"toggle"),n=e[0].height,a=e[0].trace.legendgroup,o=k(e,i,x);f&&""!==a&&(o=S[a]);var c=te?x:O||o;!h&&!d&&(c+=v/2),l.setRect(t,0,-n/2,c,n)}));var re=a.select("."+s+"titletext");re.node()&&function(e,t,r){if("top center"===t.title.side||"top right"===t.title.side){var n=t.title.font.size*m,i=0,a=e.node(),o=l.bBox(a).width;"top center"===t.title.side?i=.5*(t._width-2*r-2*p.titlePad-o):"top right"===t.title.side&&(i=t._width-2*r-2*p.titlePad-o),u.positionText(e,r+p.titlePad+i,r+n)}}(re,i,g);var ne=a.select("."+s+"titletoggle");if(ne.size()&&re.node()){var ie=re.attr("x")||0,ae=p.titlePad;l.setRect(ne,ie-ae,g,i._titleWidth+2*ae,i._titleHeight+2*ae)}}(e,W,Z,b,q)},function(){var t,o,c,u,f=w._size,m=b.borderwidth,v="paper"===b.xref,x="paper"===b.yref;if(H.text){let t=(w.shapes||[]).filter((function(e){return e.showlegend})),r=e._fullData.concat(t).some((function(e){let t=e.legend||"legend";return(Array.isArray(t)?t.includes(T):t===T)&&!0===e.visible}));V.style("opacity",r?1:.5)}if(!S){var _,k;_=v?f.l+f.w*b.x-g[I(b)]*b._width:w.width*b.x-g[I(b)]*b._width,k=x?f.t+f.h*(1-b.y)-g[L(b)]*b._effHeight:w.height*(1-b.y)-g[L(b)]*b._effHeight;var M=function(e,t,r,n){var a=e._fullLayout,o=a[t],s=I(o),l=L(o),c="paper"===o.xref,u="paper"===o.yref;e._fullLayout._reservedMargin[t]={};var h=o.y<.5?"b":"t",f=o.x<.5?"l":"r",p={r:a.width-r,l:r+o._width,b:a.height-n,t:n+o._effHeight};if(c&&u)return i.autoMargin(e,t,{x:o.x,y:o.y,l:o._width*g[s],r:o._width*y[s],b:o._effHeight*y[l],t:o._effHeight*g[l]});c?e._fullLayout._reservedMargin[t][h]=p[h]:u||"v"===o.orientation?e._fullLayout._reservedMargin[t][f]=p[f]:e._fullLayout._reservedMargin[t][h]=p[h]}(e,T,_,k);if(M)return;if(w.margin.autoexpand){var E=_,C=k;_=v?n.constrain(_,0,w.width-b._width):E,k=x?n.constrain(k,0,w.height-b._effHeight):C,_!==E&&n.log("Constrain "+T+".x to make legend fit inside graph"),k!==C&&n.log("Constrain "+T+".y to make legend fit inside graph")}l.setTranslate(j,_,k)}if(G.on(".drag",null),j.on("wheel",null),S||b._height<=b._maxHeight||e._context.staticPlot){var P=b._effHeight;S&&(P=b._height),U.attr({width:b._width-m,height:P-m,x:m/2,y:m/2}),l.setTranslate(q,0,0),N.select("rect").attr({width:b._width-2*m,height:P-2*m,x:m,y:m}),l.setClipUrl(q,h,e),l.setRect(G,0,0,0,0),delete b._scrollY}else{var z=Math.max(p.scrollBarMinHeight,b._effHeight*b._effHeight/b._height),D=b._effHeight-z-2*p.scrollBarMargin,O=b._height-b._effHeight,R=D/O,F=Math.min(b._scrollY||0,O);U.attr({width:b._width-2*m+p.scrollBarWidth+p.scrollBarMargin,height:b._effHeight-m,x:m/2,y:m/2}),N.select("rect").attr({width:b._width-2*m+p.scrollBarWidth+p.scrollBarMargin,height:b._effHeight-2*m,x:m,y:m+F}),l.setClipUrl(q,h,e),$(F,z,R),j.on("wheel",(function(){$(F=n.constrain(b._scrollY+r.event.deltaY/O*D,0,O),z,R),0!==F&&F!==O&&r.event.preventDefault()}));var B,W,Z,Y=r.behavior.drag().on("dragstart",(function(){var e=r.event.sourceEvent;B="touchstart"===e.type?e.changedTouches[0].clientY:e.clientY,Z=F})).on("drag",(function(){var e=r.event.sourceEvent;2===e.buttons||e.ctrlKey||(W="touchmove"===e.type?e.changedTouches[0].clientY:e.clientY,F=function(e,t,r){var i=(r-t)/R+e;return n.constrain(i,0,O)}(Z,B,W),$(F,z,R))}));G.call(Y);var X=r.behavior.drag().on("dragstart",(function(){var e=r.event.sourceEvent;"touchstart"===e.type&&(B=e.changedTouches[0].clientY,Z=F)})).on("drag",(function(){var e=r.event.sourceEvent;"touchmove"===e.type&&(W=e.changedTouches[0].clientY,F=function(e,t,r){var i=(t-r)/R+e;return n.constrain(i,0,O)}(Z,B,W),$(F,z,R))}));q.call(X)}function $(t,r,n){b._scrollY=e._fullLayout[T]._scrollY=t,l.setTranslate(q,0,-t),l.setRect(G,b._width,p.scrollBarMargin+t*n,p.scrollBarWidth,r),N.select("rect").attr("y",m+t)}e._context.edits.legendPosition&&(j.classed("cursor-move",!0),s.init({element:j.node(),gd:e,prepFn:function(e){if(e.target!==G.node()){var t=l.getTranslate(j);c=t.x,u=t.y}},moveFn:function(e,r){if(void 0!==c&&void 0!==u){var n=c+e,i=u+r;l.setTranslate(j,n,i),t=s.align(n,b._width,f.l,f.l+f.w,b.xanchor),o=s.align(i+b._height,-b._height,f.t+f.h,f.t,b.yanchor)}},doneFn:function(){if(void 0!==t&&void 0!==o){var r={};r[T+".x"]=t,r[T+".y"]=o,a.call("_guiRelayout",e,r)}},clickFn:function(t,r){var n=d.selectAll("g.traces").filter((function(){var e=this.getBoundingClientRect();return r.clientX>=e.left&&r.clientX<=e.right&&r.clientY>=e.top&&r.clientY<=e.bottom}));n.size()>0&&A(e,b,n,t,r)}}))}],e)}}function k(e,t,r){var n=e[0],i=n.width,a=t.entrywidthmode,o=n.trace.legendwidth||t.entrywidth;return"fraction"===a?t._maxWidth*o:r+(o||i)}function A(e,t,r,n,i){var s=e._fullLayout,l=r.data()[0][0].trace,c=t.itemclick,u=t.itemdoubleclick,f={event:i,node:r.node(),curveNumber:l.index,expandedIndex:l.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:s};l._group&&(f.group=l._group),a.traceIs(l,"pie-like")&&(f.label=r.datum()[0].label);var p=o.triggerHandler(e,"plotly_legendclick",f);if(1===n){if(!1===p)return;t._clickTimeout=setTimeout((function(){e._fullLayout&&c&&h(r,e,t,c)}),e._context.doubleClickDelay)}else 2===n&&(t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0,!1!==o.triggerHandler(e,"plotly_legenddoubleclick",f)&&!1!==p&&u&&h(r,e,t,u))}function M(e,t,r){var i,o,s=_.getId(r),c=e.data()[0][0],h=c.trace,f=a.traceIs(h,"pie-like"),d=!r._inHover&&t._context.edits.legendText&&!f,m=r._maxNameLength;c.groupTitle?(i=c.groupTitle.text,o=c.groupTitle.font):(o=r.font,r.entries?i=c.text:(i=f?c.label:h.name,h._meta&&(i=n.templateString(i,h._meta))));var g=n.ensureSingle(e,"text",s+"text");g.attr("text-anchor","start").call(l.font,o).text(d?S(i,m):i);var y=r.indentation+r.itemwidth+2*p.itemGap;u.positionText(g,y,0),d?g.call(u.makeEditable,{gd:t,text:i}).call(C,e,t,r).on("edit",(function(n){this.text(S(n,m)).call(C,e,t,r);var i=c.trace._fullInput||{},o={};return o.name=n,i._isShape?a.call("_guiRelayout",t,"shapes["+h.index+"].name",o.name):a.call("_guiRestyle",t,o,h.index)})):C(g,e,t,r)}function S(e,t){var r=Math.max(4,t);if(e&&e.trim().length>=r/2)return e;for(var n=r-(e=e||"").length;n>0;n--)e+=" ";return e}function E(e,t,i){var a,o=t._context.doubleClickDelay,s=1,l=n.ensureSingle(e,"rect",i+"toggle",(function(e){t._context.staticPlot||e.style("cursor","pointer").attr("pointer-events","all"),e.call(c.fill,"rgba(0,0,0,0)")}));t._context.staticPlot||(l.on("mousedown",(function(){(a=(new Date).getTime())-t._legendMouseDownTimeo&&(s=Math.max(s-1,1)),A(t,n,e,s,r.event)}})))}function C(e,t,r,n,i){n._inHover&&e.attr("data-notex",!0),u.convertToTspans(e,r,(function(){!function(e,t,r,n){var i=e.data()[0][0],a=i&&i.trace.showlegend;if(Array.isArray(a)&&(a=!1!==a[i.i]),r._inHover||!i||a){var o=e.select("g[class*=math-group]"),s=o.node(),c=_.getId(r);r||(r=t._fullLayout[c]);var h,f,d=r.borderwidth,g=(1===n?r.title.font:i.groupTitle?i.groupTitle.font:r.font).size*m;if(s){var y=l.bBox(s);h=y.height,f=y.width,1===n?l.setTranslate(o,d,d+.75*h):l.setTranslate(o,0,.25*h)}else{var v="."+c+(1===n?"title":"")+"text",x=e.select(v),b=u.lineCount(x),w=x.node();if(h=g*b,f=w?l.bBox(w).width:0,1===n)"left"===r.title.side&&(f+=2*p.itemGap),u.positionText(x,d+p.titlePad,d+g);else{var T=2*p.itemGap+r.indentation+r.itemwidth;i.groupTitle&&(T=p.itemGap,f-=r.indentation+r.itemwidth),u.positionText(x,T,-g*((b-1)/2-.3))}}1===n?(r._titleWidth=f,r._titleHeight=h):(i.lineHeight=g,i.height=Math.max(h,16)+3,i.width=f)}else e.remove()}(t,r,n,i)}))}function I(e){return n.isRightAnchor(e)?"right":n.isCenterAnchor(e)?"center":"left"}function L(e){return n.isBottomAnchor(e)?"bottom":n.isMiddleAnchor(e)?"middle":"top"}t.exports=function(e,t){if(t)T(e,t);else{var n=e._fullLayout,i=n._legends;n._infolayer.selectAll('[class^="legend"]').each((function(){var e=r.select(this),t=e.attr("class").split(" ")[0];t.match(w)&&-1===i.indexOf(t)&&e.remove()}));for(var a=0;a$[0]._length||be<0||be>K[0]._length)return p.unhoverRaw(e,n)}else _e="xpx"in n?n.xpx:$[0]._length/2,be="ypx"in n?n.ypx:K[0]._length/2;if(n.pointerX=_e+$[0]._offset,n.pointerY=be+K[0]._offset,ne="xval"in n?y.flat(_,n.xval):y.p2c($,_e),ie="yval"in n?y.flat(_,n.yval):y.p2c(K,be),!r(ne[0])||!r(ie[0]))return i.warn("Fx.hover failed",n,e),p.unhoverRaw(e,n)}b.clickanywhere&&(e._hoverXVals=ne,e._hoverYVals=ie,e._hoverXAxes=$,e._hoverYAxes=K);var Ae=1/0;function Me(t,a){for(oe=0;oeme&&(ge.splice(0,me),Ae=ge[0].distance),M&&0!==re&&0===ge.length){de.distance=re,de.index=!1;var u=le._module.hoverPoints(de,fe,pe,"closest",{hoverLayer:b._hoverlayer});if(u&&(u=u.filter((function(e){return e.spikeDistance<=re}))),u&&u.length){var h,p=u.filter((function(e){return e.xa.showspikes&&"hovered data"!==e.xa.spikesnap}));if(p.length){var d=p[0];r(d.x0)&&r(d.y0)&&(h=Ee(d),(!ve.vLinePoint||ve.vLinePoint.spikeDistance>h.spikeDistance)&&(ve.vLinePoint=h))}var m=u.filter((function(e){return e.ya.showspikes&&"hovered data"!==e.ya.spikesnap}));if(m.length){var g=m[0];r(g.x0)&&r(g.y0)&&(h=Ee(g),(!ve.hLinePoint||ve.hLinePoint.spikeDistance>h.spikeDistance)&&(ve.hLinePoint=h))}}}}}function Se(e,t,r){for(var n,i=null,a=1/0,o=0;oe.trace.index===je.trace.index)):[je]).length;Me(G("x",je,b),G("y",je,b));var Ue,Ve=[],qe={},He=0,Ge=function(e){var t=I[e.trace.type]?z(e):e.trace.index;if(qe[t]){var r=qe[t]-1,n=Ve[r];r>0&&Math.abs(e.distance)Ne-1;Ue--)Ge(ge[Ue]);ge=Ve,Pe()}var We=e._hoverdata,Ze=[],Ye=Z(e),Xe=Y(e);for(let e of ge){var $e=y.makeEventData(e,e.trace,e.cd);if(!1!==e.hovertemplate){var Ke=!1;e.cd[e.index]&&e.cd[e.index].ht&&(Ke=e.cd[e.index].ht),e.hovertemplate=Ke||e.trace.hovertemplate||!1}if(e.xa&&e.ya){var Je=e.x0+e.xa._offset,Qe=e.x1+e.xa._offset,et=e.y0+e.ya._offset,tt=e.y1+e.ya._offset,rt=Math.min(Je,Qe),nt=Math.max(Je,Qe),it=Math.min(et,tt),at=Math.max(et,tt);$e.bbox={x0:rt+Xe,x1:nt+Xe,y0:it+Ye,y1:at+Ye},$e.xPixel=(Je+Qe)/2,$e.yPixel=(et+tt)/2}e.eventData=[$e],Ze.push($e)}e._hoverdata=Ze;var ot="y"===S&&(ye.length>1||ge.length>1)||"closest"===S&&xe&&ge.length>1,st=f.combine(b.plot_bgcolor||f.background,b.paper_bgcolor),lt=O(ge,{gd:e,hovermode:S,rotateLabels:ot,bgColor:st,container:b._hoverlayer,outerContainer:b._paper.node(),commonLabelOpts:b.hoverlabel,hoverdistance:b.hoverdistance}),ct=lt.hoverLabels;if(y.isUnifiedHover(S)||(function(e,t,r,n){var i,a,o,s,l,c,u,h=t?"xa":"ya",f=t?"ya":"xa",p=0,d=1,m=e.size(),g=new Array(m),y=0,v=n.minX,x=n.maxX,_=n.minY,b=n.maxY,w=function(e){return e*r._invScaleX},T=function(e){return e*r._invScaleY};function A(e){var t=e[0],r=e[e.length-1];if(a=t.pmin-t.pos-t.dp+t.size,o=r.pos+r.dp+r.size-t.pmax,a>.01){for(l=e.length-1;l>=0;l--)e[l].dp+=a;i=!1}if(!(o<.01)){if(a<-.01){for(l=e.length-1;l>=0;l--)e[l].dp-=o;i=!1}if(i){var n=0;for(s=0;st.pmax&&n++;for(s=e.length-1;s>=0&&!(n<=0);s--)(c=e[s]).pos>t.pmax-1&&(c.del=!0,n--);for(s=0;s=0;l--)e[l].dp-=o;for(s=e.length-1;s>=0&&!(n<=0);s--)(c=e[s]).pos+c.dp+c.size>t.pmax&&(c.del=!0,n--)}}}for(e.each((function(e){var n=e[h],i=e[f],a="x"===n._id.charAt(0),o=n.range;0===y&&o&&o[0]>o[1]!==a&&(d=-1);var s=0,l=a?r.width:r.height;if("x"===r.hovermode||"y"===r.hovermode){var c,u,p=B(e,t),m=e.anchor,A="end"===m?-1:1;if("middle"===m)u=(c=e.crossPos+(a?T(p.y-e.by/2):w(e.bx/2+e.tx2width/2)))+(a?T(e.by):w(e.bx));else if(a)u=(c=e.crossPos+T(E+p.y)-T(e.by/2-E))+T(e.by);else{var M=w(A*E+p.x),S=M+w(A*e.bx);c=e.crossPos+Math.min(M,S),u=e.crossPos+Math.max(M,S)}a?void 0!==_&&void 0!==b&&Math.min(u,b)-Math.max(c,_)>1&&("left"===i.side?(s=i._mainLinePosition,l=r.width):l=i._mainLinePosition):void 0!==v&&void 0!==x&&Math.min(u,x)-Math.max(c,v)>1&&("top"===i.side?(s=i._mainLinePosition,l=r.height):l=i._mainLinePosition)}g[y++]=[{datum:e,traceIndex:e.trace.index,dp:0,pos:e.pos,posref:e.posref,size:e.by*(a?k:1)/2,pmin:s,pmax:l}]})),g.sort((function(e,t){return e[0].posref-t[0].posref||d*(t[0].traceIndex-e[0].traceIndex)}));!i&&p<=m;){for(p++,i=!0,s=0;s.01){for(l=S.length-1;l>=0;l--)S[l].dp+=a;for(M.push.apply(M,S),g.splice(s+1,1),u=0,l=M.length-1;l>=0;l--)u+=M[l].dp;for(o=u/M.length,l=M.length-1;l>=0;l--)M[l].dp-=o;i=!1}else s++}g.forEach(A)}for(s=g.length-1;s>=0;s--){var L=g[s];for(l=L.length-1;l>=0;l--){var P=L[l],z=P.datum;z.offset=P.dp,z.del=P.del}}}(ct,ot,b,lt.commonLabelBoundingBox),j(ct,ot,b._invScaleX,b._invScaleY)),c&&c.tagName){var ut=g.getComponentMethod("annotations","hasClickToShow")(e,Ze);u(t.select(c),ut?"pointer":"")}var ht=function(e,t,r){if(!r||r.length!==e._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],a=e._hoverdata[n];if(i.curveNumber!==a.curveNumber||String(i.pointNumber)!==String(a.pointNumber)||String(i.pointNumbers)!==String(a.pointNumbers)||i.binNumber!==a.binNumber)return!0}return!1}(e,0,We);function ft(t){e.emit("plotly_hover",{event:n,points:t,xaxes:$,yaxes:K,xvals:ne,yvals:ie})}c&&!s&&(ht||b.hoveranywhere)&&(We&&ht&&e.emit("plotly_unhover",{event:n,points:We}),ft(e._hoverdata))}(e,n,o,s,c)}))},e.loneHover=function(e,r){var n=!0;Array.isArray(e)||(n=!1,e=[e]);var i=r.gd,a=Z(i),o=Y(i),s=!1,l=O(e.map((function(e){var t=e._x0||e.x0||e.x||0,n=e._x1||e.x1||e.x||0,s=e._y0||e.y0||e.y||0,l=e._y1||e.y1||e.y||0,c=e.eventData;if(c){var u=Math.min(t,n),h=Math.max(t,n),p=Math.min(s,l),d=Math.max(s,l),m=e.trace;if(g.traceIs(m,"gl3d")){var y=i._fullLayout[m.scene]._scene.container,v=y.offsetLeft,x=y.offsetTop;u+=v,h+=v,p+=x,d+=x}c.bbox={x0:u+o,x1:h+o,y0:p+a,y1:d+a},c.xPixel=(t+n)/2,c.yPixel=(s+l)/2,r.inOut_bbox&&r.inOut_bbox.push(c.bbox)}else c=!1;return{color:e.color||f.defaultLine,x0:e.x0||e.x||0,x1:e.x1||e.x||0,y0:e.y0||e.y||0,y1:e.y1||e.y||0,xLabel:e.xLabel,yLabel:e.yLabel,zLabel:e.zLabel,text:e.text,name:e.name,idealAlign:e.idealAlign,borderColor:e.borderColor,fontFamily:e.fontFamily,fontSize:e.fontSize,fontColor:e.fontColor,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontVariant:e.fontVariant,nameLength:e.nameLength,textAlign:e.textAlign,trace:e.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:e.hovertemplate||!1,hovertemplateLabels:e.hovertemplateLabels||!1,eventData:c}})),{gd:i,hovermode:"closest",rotateLabels:s,bgColor:r.bgColor||f.background,container:t.select(r.container),outerContainer:r.outerContainer||r.container}).hoverLabels,c=0,u=0;return l.sort((function(e,t){return e.y0-t.y0})).each((function(e,t){var n=e.y0-e.by/2;e.offset=n-5([\s\S]*)<\/extra>/;function O(e,r){var n=r.gd,a=n._fullLayout,l=r.hovermode,u=r.rotateLabels,p=r.bgColor,d=r.container,m=r.outerContainer,b=r.commonLabelOpts||{};if(0===e.length)return[[]];var T=r.fontFamily||v.HOVERFONT,k=r.fontSize||v.HOVERFONTSIZE,A=r.fontWeight||a.font.weight,M=r.fontStyle||a.font.style,S=r.fontVariant||a.font.variant,I=r.fontTextcase||a.font.textcase,L=r.fontLineposition||a.font.lineposition,P=r.fontShadow||a.font.shadow,D=e[0],O=D.xa,F=D.ya,B=l.charAt(0),j=B+"Label",N=D[j];if(void 0===N&&"multicategory"===O.type)for(var U=0;Ua.width-w&&(z=a.width-w),r.attr("d","M"+(y-z)+",0L"+(y-z+E)+","+_+E+"H"+w+"v"+_+(2*C+x.height)+"H"+-w+"V"+_+E+"H"+(y-z-E)+"Z"),y=z,Q.minX=y-w,Q.maxX=y+w,"top"===O.side?(Q.minY=v-(2*C+x.height),Q.maxY=v-C):(Q.minY=v+C,Q.maxY=v+(2*C+x.height))}else{var R,B,j;"right"===F.side?(R="start",B=1,j="",y=O._offset+O._length):(R="end",B=-1,j="-",y=O._offset),v=F._offset+(D.y0+D.y1)/2,s.attr("text-anchor",R),r.attr("d","M0,0L"+j+E+","+E+"V"+(C+x.height/2)+"h"+j+(2*C+x.width)+"V-"+(C+x.height/2)+"H"+j+E+"V-"+E+"Z"),Q.minY=v-(C+x.height/2),Q.maxY=v+(C+x.height/2),"right"===F.side?(Q.minX=y+E,Q.maxX=y+E+(2*C+x.width)):(Q.minX=y-E-(2*C+x.width),Q.maxX=y-E);var U,V=x.height/2,H=q-x.top-V,G="clip"+a._uid+"commonlabel"+F._id;if(y"none"!==e.hoverinfo));if(0===t.length)return[];var ee=a.hoverlabel,te=ee.font,re=t[0],ne=(("x unified"===l?re.xa:re.ya).unifiedhovertitle||{}).text,ie={showlegend:!0,legend:{title:{text:ne?i.hovertemplateString({data:"x unified"===l?[{xa:re.xa,x:re.xVal}]:[{ya:re.ya,y:re.yVal}],fallback:re.trace.hovertemplatefallback,locale:a._d3locale,template:ne}):N,font:te},font:te,bgcolor:ee.bgcolor,bordercolor:ee.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:a.legend?a.legend.traceorder:void 0,orientation:"v"}},ae={font:te};x(ie,ae,n._fullData);var oe=ae.legend;oe.entries=[];for(var se=0;se=0?me:ge+xe=0?ge:Se+xe=0?pe:de+_e=0?de:Ee+_e=0,"top"!==e.idealAlign&&K||!J?K?(j+=V/2,e.anchor="start"):e.anchor="middle":(j-=V/2,e.anchor="end"),e.crossPos=j;else{if(e.pos=j,K=B+U/2+Q<=H,J=B-U/2-Q>=0,"left"!==e.idealAlign&&K||!J)if(K)B+=U/2,e.anchor="start";else{e.anchor="middle";var ee=Q/2,te=B+ee-H,re=B-ee;te>0&&(B-=te),re<0&&(B+=-re)}else B-=U/2,e.anchor="end";e.crossPos=B}b.attr("text-anchor",e.anchor),D&&z.attr("text-anchor",e.anchor),r.attr("transform",o(B,j)+(u?s(w):""))})),{hoverLabels:Ce,commonLabelBoundingBox:Q}}function R(e,t,r,n,a,o){var s,l,c="",u="";void 0!==e.nameOverride&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=i.templateString(e.name,e.trace._meta)),c=H(e.name,e.nameLength));var h=r.charAt(0),f="x"===h?"y":"x";void 0!==e.zLabel?(void 0!==e.xLabel&&(u+="x: "+e.xLabel+"
"),void 0!==e.yLabel&&(u+="y: "+e.yLabel+"
"),"choropleth"!==e.trace.type&&"choroplethmapbox"!==e.trace.type&&"choroplethmap"!==e.trace.type&&(u+=(u?"z: ":"")+e.zLabel)):t&&e[h+"Label"]===a?u=e[f+"Label"]||"":void 0===e.xLabel?void 0!==e.yLabel&&"scattercarpet"!==e.trace.type&&(u=e.yLabel):u=void 0===e.yLabel?e.xLabel:"("+e.xLabel+", "+e.yLabel+")",(e.text||0===e.text)&&!Array.isArray(e.text)&&(u+=(u?"
":"")+e.text),void 0!==e.extraText&&(u+=(u?"
":"")+e.extraText),o&&""===u&&!e.hovertemplate&&(""===c&&o.remove(),u=c),null!=(l=null==(s=e.trace)?void 0:s.hoverlabel)&&l.split&&(e.hovertemplate="");let{hovertemplate:p=!1}=e;if(p){let t=e.hovertemplateLabels||e;e[h+"Label"]!==a&&(t[h+"other"]=t[h+"Val"],t[h+"otherLabel"]=t[h+"Label"]),u=(u=i.hovertemplateString({data:[e.eventData[0]||{},e.trace._meta],fallback:e.trace.hovertemplatefallback,labels:t,locale:n._d3locale,template:p})).replace(D,((t,r)=>(c=H(r,e.nameLength),"")))}return[u,c]}function B(e,t){var r=0,n=e.offset;return t&&(n*=-S,r=e.offset*A),{x:r,y:n}}function j(e,r,n,i){var a=function(e){return e*n},o=function(e){return e*i};e.each((function(e){var n=t.select(this);if(e.del)return n.remove();var i,s=n.select("text.nums"),l=e.anchor,u="end"===l?-1:1,f=function(e){var t={start:1,end:-1,middle:0}[e.anchor],r=t*(E+C),n=r+t*(e.txwidth+C);return"middle"===e.anchor&&(r-=e.tx2width/2,n+=e.txwidth/2+C),{alignShift:t,textShiftX:r,text2ShiftX:n}}(e),p=B(e,r),d=p.x,m=p.y,g="middle"===l,y=!("hoverlabel"in e.trace)||e.trace.hoverlabel.showarrow;i=g?"M-"+a(e.bx/2+e.tx2width/2)+","+o(m-e.by/2)+"h"+a(e.bx)+"v"+o(e.by)+"h-"+a(e.bx)+"Z":y?"M0,0L"+a(u*E+d)+","+o(E+m)+"v"+o(e.by/2-E)+"h"+a(u*e.bx)+"v-"+o(e.by)+"H"+a(u*E+d)+"V"+o(m-E)+"Z":"M"+a(u*E+d)+","+o(m-e.by/2)+"h"+a(u*e.bx)+"v"+o(e.by)+"h"+a(-u*e.bx)+"Z",n.select("path").attr("d",i);var v=d+f.textShiftX,x=m+e.ty0-e.by/2+C,_=e.textAlign||"auto";"auto"!==_&&("left"===_&&"start"!==l?(s.attr("text-anchor","start"),v=g?-e.bx/2-e.tx2width/2+C:-e.bx-C):"right"===_&&"end"!==l&&(s.attr("text-anchor","end"),v=g?e.bx/2-e.tx2width/2-C:e.bx+C)),s.call(c.positionText,a(v),o(x)),e.tx2width&&(n.select("text.name").call(c.positionText,a(f.text2ShiftX+f.alignShift*C+d),o(m+e.ty0-e.by/2+C)),n.select("rect").call(h.setRect,a(f.text2ShiftX+(f.alignShift-1)*e.tx2width/2+d),o(m-e.by/2-1),a(e.tx2width),o(e.by+2)))}))}function U(e,t){var n=e.index,a=e.trace||{},o=e.cd[0],s=e.cd[n]||{};function l(e){return e||r(e)&&0===e}var c=Array.isArray(n)?function(e,t){var r=i.castOption(o,n,e);return l(r)?r:i.extractOption({},a,"",t)}:function(e,t){return i.extractOption(s,a,e,t)};function u(t,r,n){var i=c(r,n);l(i)&&(e[t]=i)}if(u("hoverinfo","hi","hoverinfo"),u("bgcolor","hbg","hoverlabel.bgcolor"),u("borderColor","hbc","hoverlabel.bordercolor"),u("fontFamily","htf","hoverlabel.font.family"),u("fontSize","hts","hoverlabel.font.size"),u("fontColor","htc","hoverlabel.font.color"),u("fontWeight","htw","hoverlabel.font.weight"),u("fontStyle","hty","hoverlabel.font.style"),u("fontVariant","htv","hoverlabel.font.variant"),u("nameLength","hnl","hoverlabel.namelength"),u("textAlign","hta","hoverlabel.align"),e.posref="y"===t||"closest"===t&&"h"===a.orientation?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=i.constrain(e.x0,0,e.xa._length),e.x1=i.constrain(e.x1,0,e.xa._length),e.y0=i.constrain(e.y0,0,e.ya._length),e.y1=i.constrain(e.y1,0,e.ya._length),void 0!==e.xLabelVal&&(e.xLabel="xLabel"in e?e.xLabel:d.hoverLabelText(e.xa,e.xLabelVal,a.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),void 0!==e.yLabelVal&&(e.yLabel="yLabel"in e?e.yLabel:d.hoverLabelText(e.ya,e.yLabelVal,a.yhoverformat),e.yVal=e.ya.c2d(e.yLabelVal)),void 0!==e.zLabelVal&&void 0===e.zLabel&&(e.zLabel=String(e.zLabelVal)),!(isNaN(e.xerr)||"log"===e.xa.type&&e.xerr<=0)){var h=d.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;void 0!==e.xerrneg?e.xLabel+=" +"+h+" / -"+d.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" ± "+h,"x"===t&&(e.distance+=1)}if(!(isNaN(e.yerr)||"log"===e.ya.type&&e.yerr<=0)){var f=d.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;void 0!==e.yerrneg?e.yLabel+=" +"+f+" / -"+d.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" ± "+f,"y"===t&&(e.distance+=1)}var p=e.hoverinfo||e.trace.hoverinfo;return p&&"all"!==p&&(-1===(p=Array.isArray(p)?p:p.split("+")).indexOf("x")&&(e.xLabel=void 0),-1===p.indexOf("y")&&(e.yLabel=void 0),-1===p.indexOf("z")&&(e.zLabel=void 0),-1===p.indexOf("text")&&(e.text=void 0),-1===p.indexOf("name")&&(e.name=void 0)),e}function V(e,t,r){var i,a,o=r.container,s=r.fullLayout,l=s._size,c=r.event,u=!!t.hLinePoint,p=!!t.vLinePoint;if(o.selectAll(".spikeline").remove(),p||u){var m=f.combine(s.plot_bgcolor,s.paper_bgcolor);if(u){var g,y,v=t.hLinePoint;i=v&&v.xa,"cursor"===(a=v&&v.ya).spikesnap?(g=c.pointerX,y=c.pointerY):(g=i._offset+v.x,y=a._offset+v.y);var x,_,b=n.readability(v.color,m)<1.5?f.contrast(m):v.color,w=a.spikemode,T=a.spikethickness,k=a.spikecolor||b,A=d.getPxPosition(e,a);if(-1!==w.indexOf("toaxis")||-1!==w.indexOf("across")){if(-1!==w.indexOf("toaxis")&&(x=A,_=g),-1!==w.indexOf("across")){var M=a._counterDomainMin,S=a._counterDomainMax;"free"===a.anchor&&(M=Math.min(M,a.position),S=Math.max(S,a.position)),x=l.l+M*l.w,_=l.l+S*l.w}o.insert("line",":first-child").attr({x1:x,x2:_,y1:y,y2:y,"stroke-width":T,stroke:k,"stroke-dasharray":h.dashStyle(a.spikedash,T)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:x,x2:_,y1:y,y2:y,"stroke-width":T+2,stroke:m}).classed("spikeline",!0).classed("crisp",!0)}-1!==w.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:A+("right"!==a.side?T:-T),cy:y,r:T,fill:k}).classed("spikeline",!0)}if(p){var E,C,I=t.vLinePoint;i=I&&I.xa,a=I&&I.ya,"cursor"===i.spikesnap?(E=c.pointerX,C=c.pointerY):(E=i._offset+I.x,C=a._offset+I.y);var L,P,z=n.readability(I.color,m)<1.5?f.contrast(m):I.color,D=i.spikemode,O=i.spikethickness,R=i.spikecolor||z,F=d.getPxPosition(e,i);if(-1!==D.indexOf("toaxis")||-1!==D.indexOf("across")){if(-1!==D.indexOf("toaxis")&&(L=F,P=C),-1!==D.indexOf("across")){var B=i._counterDomainMin,j=i._counterDomainMax;"free"===i.anchor&&(B=Math.min(B,i.position),j=Math.max(j,i.position)),L=l.t+(1-j)*l.h,P=l.t+(1-B)*l.h}o.insert("line",":first-child").attr({x1:E,x2:E,y1:L,y2:P,"stroke-width":O,stroke:R,"stroke-dasharray":h.dashStyle(i.spikedash,O)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:E,x2:E,y1:L,y2:P,"stroke-width":O+2,stroke:m}).classed("spikeline",!0).classed("crisp",!0)}-1!==D.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:E,cy:F-("top"!==i.side?O:-O),r:O,fill:R}).classed("spikeline",!0)}}}function q(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function H(e,t){return c.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function G(e,t,r){var n=t[e+"a"],i=t[e+"Val"],a=t.cd[0];if("category"===n.type||"multicategory"===n.type)i=n._categoriesMap[i];else if("date"===n.type){var o=t.trace[e+"periodalignment"];if(o){var s=t.cd[t.index],l=s[e+"Start"];void 0===l&&(l=s[e]);var c=s[e+"End"];void 0===c&&(c=s[e]);var u=c-l;"end"===o?i+=u:"middle"===o&&(i+=u/2)}i=n.d2c(i)}return a&&a.t&&a.t.posLetter===n._id&&("group"===r.boxmode||"group"===r.violinmode)&&(i+=a.t.dPos),i}var Z=e=>e.offsetTop+e.clientTop,Y=e=>e.offsetLeft+e.clientLeft;function X(e,t){var r=e._fullLayout,n=t.getBoundingClientRect(),a=n.left,o=n.top,s=a+n.width,l=o+n.height,c=i.apply3DTransform(r._invTransform)(a,o),u=i.apply3DTransform(r._invTransform)(s,l),h=c[0],f=c[1],p=u[0],d=u[1];return{x:h,y:f,width:p-h,height:d-f,top:Math.min(f,d),left:Math.min(h,p),right:Math.max(h,p),bottom:Math.max(f,d)}}}}),Er=m({"src/components/fx/hoverlabel_defaults.js"(e,t){var r=ct(),n=W(),i=Kt().isUnifiedHover;t.exports=function(e,t,a,o){o=o||{};var s=t.legend;function l(e){o.font[e]||(o.font[e]=s?t.legend.font[e]:t.font[e])}t&&i(t.hovermode)&&(o.font||(o.font={}),l("size"),l("family"),l("color"),l("weight"),l("style"),l("variant"),s?(o.bgcolor||(o.bgcolor=n.combine(t.legend.bgcolor,t.paper_bgcolor)),o.bordercolor||(o.bordercolor=t.legend.bordercolor)):o.bgcolor||(o.bgcolor=t.paper_bgcolor)),a("hoverlabel.bgcolor",o.bgcolor),a("hoverlabel.bordercolor",o.bordercolor),a("hoverlabel.namelength",o.namelength),a("hoverlabel.showarrow",o.showarrow),r.coerceFont(a,"hoverlabel.font",o.font),a("hoverlabel.align",o.align)}}}),Cr=m({"src/components/fx/layout_global_defaults.js"(e,t){var r=ct(),n=Er(),i=U();t.exports=function(e,t){n(e,t,(function(n,a){return r.coerce(e,t,i,n,a)}))}}}),Ir=m({"src/components/fx/defaults.js"(e,t){var r=ct(),n=V(),i=Er();t.exports=function(e,t,a,o){var s=r.extendFlat({},o.hoverlabel);t.hovertemplate&&(s.namelength=-1),i(e,t,(function(i,a){return r.coerce(e,t,n,i,a)}),s)}}}),Lr=m({"src/components/fx/hovermode_defaults.js"(e,t){var r=ct(),n=U();t.exports=function(e,t){function i(i,a){return void 0!==t[i]?t[i]:r.coerce(e,t,n,i,a)}return i("clickmode"),i("hoversubplots"),i("hoveranywhere"),i("clickanywhere"),i("hovermode")}}}),Pr=m({"src/components/fx/layout_defaults.js"(e,t){var r=ct(),n=U(),i=Lr(),a=Er();t.exports=function(e,t){function o(i,a){return r.coerce(e,t,n,i,a)}i(e,t)&&(o("hoverdistance"),o("spikedistance")),"select"===o("dragmode")&&o("selectdirection");var s=t._has("mapbox"),l=t._has("map"),c=t._has("geo"),u=t._basePlotModules.length;"zoom"===t.dragmode&&((s||l||c)&&1===u||(s||l)&&c&&2===u)&&(t.dragmode="pan"),a(e,t,o),r.coerceFont(o,"hoverlabel.grouptitlefont",t.hoverlabel.font)}}}),zr=m({"src/components/fx/calc.js"(e,t){var r=ct(),n=He();function i(e,t,n,i){i=i||r.identity,Array.isArray(e)&&(t[0][n]=i(e))}t.exports=function(e){var t=e.calcdata,a=e._fullLayout;function o(e){return function(t){return r.coerceHoverinfo({hoverinfo:t},{_module:e._module},a)}}for(var s=0;s"," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}}}),jr=m({"src/components/shapes/draw_newshape/constants.js"(e,t){t.exports={CIRCLE_SIDES:32,i000:0,i090:8,i180:16,i270:24,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}}),Nr=m({"src/components/selections/helpers.js"(e,t){var r=ct().strTranslate;function n(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}t.exports={p2r:n,r2p:function(e,t){switch(e.type){case"log":return e.d2p(t);case"date":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}},axValue:function(e){var t="y"===e._id.charAt(0)?1:0;return function(r){return n(e,r[t])}},getTransform:function(e){return r(e.xaxis._offset,e.yaxis._offset)}}}}),Ur=m({"src/components/shapes/draw_newshape/helpers.js"(e){var t=Jt(),r=jr(),n=r.CIRCLE_SIDES,i=r.SQRT2,a=Nr(),o=a.p2r,s=a.r2p,l=[0,3,4,5,6,1,2],c=[0,3,4,1,2];function u(e,t){return Math.abs(e-t)<=1e-6}function h(e,t){var r=t[1]-e[1],n=t[2]-e[2];return Math.sqrt(r*r+n*n)}e.writePaths=function(e){var t=e.length;if(!t)return"M0,0Z";for(var r="",n=0;n0&&u{let r=t.charAt(0);return e+(void 0!==a[r].drawn?1:0)}),0)},e.getDataToPixel=function(t,r,n,a,o){var s,l=t._fullLayout._size;if(r)if("domain"===o)s=function(e){return r._length*(a?1-e:e)+r._offset};else{var c=e.shapePositionToRange(r);s=function(e){var t=i(r,n);return r._offset+r.r2p(c(e,!0))+t},"date"===r.type&&(s=e.decodeDate(s))}else s=a?function(e){return l.t+l.h*(1-e)}:function(e){return l.l+l.w*e};return s},e.getPixelToData=function(t,r,n,i){var a,o=t._fullLayout._size;if(r)if("domain"===i)a=function(e){var t=(e-r._offset)/r._length;return n?1-t:t};else{var s=e.rangeToShapePosition(r);a=function(e){return s(r.p2r(e-r._offset))}}else a=n?function(e){return 1-(e-o.t)/o.h}:function(e){return(e-o.l)/o.w};return a},e.roundPositionForSharpStrokeRendering=function(e,t){var r=1===Math.round(t%2),n=Math.round(e);return r?n+.5:n},e.makeShapesOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.shapes[t]||{},n=e._fullLayout._plots[r.xref+r.yref];return n?n._hadPlotinfo=!0:(n={},r.xref&&"paper"!==r.xref&&(n.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&"paper"!==r.yref&&(n.yaxis=e._fullLayout[r.yref+"axis"])),n.xsizemode=r.xsizemode,n.ysizemode=r.ysizemode,n.xanchor=r.xanchor,n.yanchor=r.yanchor,{options:r,plotinfo:n}},e.makeSelectionsOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.selections[t]||{},n=e._fullLayout._plots[r.xref+r.yref];return n?n._hadPlotinfo=!0:(n={},r.xref&&(n.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&(n.yaxis=e._fullLayout[r.yref+"axis"])),{options:r,plotinfo:n}},e.getPathString=function(a,o){let s=o.type,l=n.getRefType(o.xref),c=n.getRefType(o.yref),u=a._fullLayout._size;var h,f,p,d,m,g,y,v,x,_,b,w;function T(t,r,n,i){var a;if(t)if("domain"===r)a=i?function(e){return t._offset+t._length*(1-e)}:function(e){return t._offset+t._length*e};else{let r=e.shapePositionToRange(t);a=function(e){return t._offset+t.r2p(r(e,!0))},"path"===n&&"date"===t.type&&(a=e.decodeDate(a))}else a=i?function(e){return u.t+u.h*(1-e)}:function(e){return u.l+u.w*e};return a}if("array"===l?(y=[],h=o.xref.map((function(e){return n.getFromId(a,e)})),y=o.xref.map((function(e,t){return T(h[t],n.getRefType(e),s,!1)}))):y=T(h=n.getFromId(a,o.xref),l,s,!1),"array"===c?(v=[],f=o.yref.map((function(e){return n.getFromId(a,e)})),v=o.yref.map((function(e,t){return T(f[t],n.getRefType(e),s,!0)}))):v=T(f=n.getFromId(a,o.yref),c,s,!0),"path"===s)return function(e,n,i){let a=e.path,o=e.xsizemode,s=e.ysizemode,l=e.xanchor,c=e.yanchor,u=Array.isArray(e.xref),h=Array.isArray(e.yref);var f=0,p=0;return a.replace(t.segmentRE,(function(e){var a=0,d=e.charAt(0),m=t.paramIsX[d],g=t.paramIsY[d],y=t.numParams[d];let v=void 0!==m.drawn,x=void 0!==g.drawn,_=u?n[f]:n,b=h?i[p]:i;var w=e.slice(1).replace(t.paramRE,(function(e){return m[a]?e="pixel"===o?_(l)+Number(e):_(e):g[a]&&(e="pixel"===s?b(c)-Number(e):b(e)),++a>y&&(e="X"),e}));return a>y&&(w=w.replace(/[\s,]*X.*/,""),r.log("Ignoring extra params in segment "+e)),v&&f++,x&&p++,d+w}))}(o,y,v);if("array"===l)p=i(h[0],o.x0shift),d=i(h[1],o.x1shift),x=y[0](o.x0)+p,_=y[1](o.x1)+d;else if(p=i(h,o.x0shift),d=i(h,o.x1shift),"pixel"===o.xsizemode){let e=y(o.xanchor);x=e+o.x0+p,_=e+o.x1+d}else x=y(o.x0)+p,_=y(o.x1)+d;if("array"===c)m=i(f[0],o.y0shift),g=i(f[1],o.y1shift),b=v[0](o.y0)+m,w=v[1](o.y1)+g;else if(m=i(f,o.y0shift),g=i(f,o.y1shift),"pixel"===o.ysizemode){let e=v(o.yanchor);b=e-o.y0+m,w=e-o.y1+g}else b=v(o.y0)+m,w=v(o.y1)+g;if("line"===s)return"M"+x+","+b+"L"+_+","+w;if("rect"===s)return"M"+x+","+b+"H"+_+"V"+w+"H"+x+"Z";var k=(x+_)/2,A=(b+w)/2,M=Math.abs(k-x),S=Math.abs(A-b),E="A"+M+","+S,C=k+M+","+A;return"M"+C+E+" 0 1,1 "+k+","+(A-S)+E+" 0 0,1 "+C+"Z"}}}),Wr=m({"src/components/shapes/display_labels.js"(e,t){var r=ct(),n=ar(),i=Et(),a=er(),o=Ur().readPaths,s=Gr(),l=s.getPathString,c=Be(),u=St().FROM_TL;t.exports=function(e,t,h,f){if(f.selectAll(".shape-label").remove(),h.label.text||h.label.texttemplate){var p;if(h.label.texttemplate){var d={};if("path"!==h.type){var m=n.getFromId(e,h.xref),g=n.getFromId(e,h.yref);let t=Array.isArray(h.xref),r=Array.isArray(h.yref);for(var y in c){var v="function"==typeof c[y],x=!t||c.simpleXVariables.includes(y),_=!r||c.simpleYVariables.includes(y);if(v&&x&&_){var b=c[y](h,m,g);void 0!==b&&(d[y]=b)}}}p=r.texttemplateStringForShapes({data:[d],fallback:h.label.texttemplatefallback,locale:e._fullLayout._d3locale,template:h.label.texttemplate})}else p=h.label.text;var w,T,k,A,M={"data-index":t},S=h.label.font,E=f.append("g").attr(M).classed("shape-label",!0).append("text").attr({"data-notex":1}).classed("shape-label-text",!0).text(p);if(h.path){var C=l(e,h),I=o(C,e);w=1/0,k=1/0,T=-1/0,A=-1/0;for(var L=0;L=e?t-n:n-t,-180/Math.PI*Math.atan2(i,a)}(w,k,T,A):0),E.call((function(t){return t.call(a.font,S).attr({}),i.convertToTspans(t,e),t}));var B=function(e,t,r,n,i,a,o){var s,l,c,h,f=i.label.textposition,p=i.label.textangle,d=i.label.padding,m=i.type,g=Math.PI/180*a,y=Math.sin(g),v=Math.cos(g),x=i.label.xanchor,_=i.label.yanchor;if("line"===m){"start"===f?(s=e,l=t):"end"===f?(s=r,l=n):(s=(e+r)/2,l=(t+n)/2),"auto"===x&&(x="start"===f?"auto"===p?r>e?"left":re?"right":re?"right":re?"left":r1&&(2!==e.length||"Z"!==e[1][0])&&(0===I&&(e[0][0]="M"),t[C]=e,A(),M())}}()}}function V(e,r){(function(e,r){if(t.length)for(var n=0;nb?(M=v,I="y0",S=b,L="y1"):(M=b,I="y1",S=v,L="y0"),re(r),ae(c,o),function(e,t,r){var n=t.xref,i=t.yref,o=a.getFromId(r,n),s=a.getFromId(r,i),l="";"paper"!==n&&!o.autorange&&(l+=n),"paper"!==i&&!s.autorange&&(l+=i),h.setClipUrl(e,l?"clip"+r._fullLayout._uid+l:null,r)}(t,o,e),te.moveFn="move"===O?ne:ie,te.altKey=r.altKey)},doneFn:function(){x(e)||(d(t),oe(c),T(t,e,o),n.call("_guiRelayout",e,u.getUpdateObj()))},clickFn:function(){x(e)||oe(c)}};function re(r){if(x(e))O=null;else if(B)O="path"===r.target.tagName?"move":"start-point"===r.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var n=te.element.getBoundingClientRect(),i=n.right-n.left,a=n.bottom-n.top,o=r.clientX-n.left,s=r.clientY-n.top,l=!j&&i>10&&a>10&&!r.shiftKey?p.getCursor(o/i,1-s/a):"move";d(t,l),O=l.split("-")[0]}}function ne(r,n){if("path"===o.type){var i=function(e){return e},a=i,u=i;R?N("xanchor",o.xanchor=J(w+r)):(a=function(e){return J($(e)+r)},V&&"date"===V.type&&(a=g.encodeDate(a))),F?N("yanchor",o.yanchor=Q(A+n)):(u=function(e){return Q(K(e)+n)},H&&"date"===H.type&&(u=g.encodeDate(u))),N("path",o.path=k(D,a,u))}else R?N("xanchor",o.xanchor=J(w+r)):(N("x0",o.x0=J(f+r)),N("x1",o.x1=J(_+r))),F?N("yanchor",o.yanchor=Q(A+n)):(N("y0",o.y0=Q(v+n)),N("y1",o.y1=Q(b+n)));t.attr("d",y(e,o)),ae(c,o),l(e,s,o,U)}function ie(r,n){if(j){var i=function(e){return e},a=i,u=i;R?N("xanchor",o.xanchor=J(w+r)):(a=function(e){return J($(e)+r)},V&&"date"===V.type&&(a=g.encodeDate(a))),F?N("yanchor",o.yanchor=Q(A+n)):(u=function(e){return Q(K(e)+n)},H&&"date"===H.type&&(u=g.encodeDate(u))),N("path",o.path=k(D,a,u))}else if(B){if("resize-over-start-point"===O){var h=f+r,p=F?v-n:v+n;N("x0",o.x0=R?h:J(h)),N("y0",o.y0=F?p:Q(p))}else if("resize-over-end-point"===O){var d=_+r,m=F?b-n:b+n;N("x1",o.x1=R?d:J(d)),N("y1",o.y1=F?m:Q(m))}}else{var x=function(e){return-1!==O.indexOf(e)},T=x("n"),q=x("s"),G=x("w"),W=x("e"),Z=T?M+n:M,Y=q?S+n:S,X=G?E+r:E,ee=W?C+r:C;F&&(T&&(Z=M-n),q&&(Y=S-n)),(!F&&Y-Z>10||F&&Z-Y>10)&&(N(I,o[I]=F?Z:Q(Z)),N(L,o[L]=F?Y:Q(Y))),ee-X>10&&(N(P,o[P]=R?X:J(X)),N(z,o[z]=R?ee:J(ee)))}t.attr("d",y(e,o)),ae(c,o),l(e,s,o,U)}function ae(e,t){(R||F)&&function(){var r="path"!==t.type,n=e.selectAll(".visual-cue").data([0]);n.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var a=$(R?t.xanchor:i.midRange(r?[t.x0,t.x1]:g.extractPathCoords(t.path,m.paramIsX))),o=K(F?t.yanchor:i.midRange(r?[t.y0,t.y1]:g.extractPathCoords(t.path,m.paramIsY)));if(a=g.roundPositionForSharpStrokeRendering(a,1),o=g.roundPositionForSharpStrokeRendering(o,1),R&&F){var s="M"+(a-1-1)+","+(o-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";n.attr("d",s)}else if(R){var l="M"+(a-1-1)+","+(o-9-1)+"v18 h2 v-18 Z";n.attr("d",l)}else{var c="M"+(a-9-1)+","+(o-1-1)+"h18 v2 h-18 Z";n.attr("d",c)}}()}function oe(e){e.selectAll(".visual-cue").remove()}p.init(te),ee.node().onmousemove=re}(e,F,b,t,c,O):!0===b.editable&&F.style("pointer-events",z||u.opacity(C)*E<=.5?"stroke":"all");F.node().addEventListener("click",(function(){return function(e,t){if(_(e)){var r=+t.node().getAttribute("data-index");if(r>=0){if(r===e._fullLayout._activeShapeIndex)return void A(e);e._fullLayout._activeShapeIndex=r,e._fullLayout._deactivateShape=A,v(e)}}}(e,F)}))}"above"===b.layer?S(e._fullLayout._shapeUpperLayer):b.xref.includes("paper")||b.yref.includes("paper")?S(e._fullLayout._shapeLowerLayer):"between"!==b.layer||M?w._hadPlotinfo?S((w.mainplotinfo||w).shapelayer):S(e._fullLayout._shapeLowerLayer):S(w.shapelayerBetween)}function T(e,t,r){let n=r.xref,o=r.yref;if(Array.isArray(n)||Array.isArray(o)){let s="clip"+t._fullLayout._uid+"shape"+r._index,l=function(e,t,r){let n=e._fullLayout._size;function i(t,r){let i=(Array.isArray(t)?t:[t]).map((t=>a.getFromId(e,t))).filter(Boolean);if(!i.length)return r?[n.t,n.t+n.h]:[n.l,n.l+n.w];let o=i.map((function(e){return e._offset})),s=i.map((function(e){return e._offset+e._length}));return[Math.min(...o),Math.max(...s)]}let o=i(t,!1),s=i(r,!0);return{x:o[0],y:s[0],width:o[1]-o[0],height:s[1]-s[0]}}(t,n,o);i.ensureSingleById(t._fullLayout._clips,"clipPath",s,(function(e){e.append("rect")})).select("rect").attr(l),h.setClipUrl(e,s,t)}else{let r=(n+o).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");h.setClipUrl(e,r?"clip"+t._fullLayout._uid+r:null,t)}}function k(e,t,r){return e.replace(m.segmentRE,(function(e){var n=0,i=e.charAt(0),a=m.paramIsX[i],o=m.paramIsY[i],s=m.numParams[i];return i+e.slice(1).replace(m.paramRE,(function(e){return n>=s||(a[n]?e=t(e):o[n]&&(e=r(e)),n++),e}))}))}function A(e){_(e)&&e._fullLayout._activeShapeIndex>=0&&(c(e),delete e._fullLayout._activeShapeIndex,v(e))}t.exports={draw:v,drawOne:w,eraseActiveShape:function(e){if(_(e)){c(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t1?(P=["toggleHover"],z=["resetViews"]):y?(L=["zoomInGeo","zoomOutGeo"],P=["hoverClosestGeo"],z=["resetGeo"]):g?(P=["hoverClosest3d"],z=["resetCameraDefault3d","resetCameraLastSave3d"]):b?(L=["zoomInMapbox","zoomOutMapbox"],P=["toggleHover"],z=["resetViewMapbox"]):w?(L=["zoomInMap","zoomOutMap"],P=["toggleHover"],z=["resetViewMap"]):v?P=["hoverClosestPie"]:A?(P=["hoverClosestCartesian","hoverCompareCartesian"],z=["resetViewSankey"]):P=["toggleHover"],m&&P.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(function(e){for(var t=0;tn?i.slice(n):a.slice(r))+o:i+a+e*t:o}function d(e,t){for(var r=t._size,n=r.h/r.w,i={},a=Object.keys(e),o=0;os*x)||T)for(i=0;iz&&FL&&(L=F);f/=(L-I)/(2*P),I=c.l2r(I),L=c.l2r(L),c.range=c._input.range=S=e[1]||i[1]<=e[0])&&a[0]t[0])return!0}return!1}function _(r){var a,o,c,p,d,m,g=r._fullLayout,y=g._size,_=y.p,b=h.list(r,"",!0);if(g._paperdiv.style({width:r._context.responsive&&g.autosize&&!r._context._hasZeroWidth&&!r.layout.width?"100%":g.width+"px",height:r._context.responsive&&g.autosize&&!r._context._hasZeroHeight&&!r.layout.height?"100%":g.height+"px"}).selectAll(".main-svg").call(l.setSize,g.width,g.height),r._context.setBackground(r,g.paper_bgcolor),e.drawMainTitle(r),u.manage(r),!g._has("cartesian"))return n.previousPromises(r);function T(e,t,r){var n=e._lw/2;return"x"===e._id.charAt(0)?t?"top"===r?t._offset-_-n:t._offset+t._length+_+n:y.t+y.h*(1-(e.position||0))+n%1:t?"right"===r?t._offset+t._length+_+n:t._offset-_-n:y.l+y.w*(e.position||0)+n%1}for(a=0;a.5?"t":"b",o=e._fullLayout.margin[a],s=0;return"paper"===t.yref?s=r+t.pad.t+t.pad.b:"container"===t.yref&&(s=function(e,t,r,n,i){var a=0;return"middle"===r&&(a+=i/2),"t"===e?("top"===r&&(a+=i),a+=n-t*n):("bottom"===r&&(a+=i),a+=t*n),a}(a,n,i,e._fullLayout.height,r)+t.pad.t+t.pad.b),s>o?s:0}(e,r,m);if(g>0){(function(e,t,r,a){var o="title.automargin",s=e._fullLayout.title,l=s.y>.5?"t":"b",c={x:s.x,y:s.y,t:0,b:0},u={};"paper"===s.yref&&function(e,t,r,n,a){var o="paper"===t.yref?e._fullLayout._size.h:e._fullLayout.height,s=i.isTopAnchor(t)?n:n-a,l="b"===r?o-s:s;return!(i.isTopAnchor(t)&&"t"===r||i.isBottomAnchor(t)&&"b"===r)&&l=0;k--){var A=i.append("path").attr(g).style("opacity",k?.1:y).call(a.stroke,x).call(a.fill,v).call(o.dashLine,k?"solid":b,k?4+_:_);if(p(A,e,f),w){var M=s(e.layout,"selections",f);A.style({cursor:"move"});var S={element:A.node(),plotinfo:m,gd:e,editHelpers:M,isActiveSelection:!0},E=r(l,e);n(E,A,S)}else A.style("pointer-events",k?"all":"none");T[k]=A}var C=T[0];T[1].node().addEventListener("click",(function(){return function(e,t){if(h(e)){var r=+t.node().getAttribute("data-index");if(r>=0){if(r===e._fullLayout._activeSelectionIndex)return void d(e);e._fullLayout._activeSelectionIndex=r,e._fullLayout._deactivateSelection=d,u(e)}}}(e,C)}))}(e._fullLayout._selectionLayer)}function p(e,t,r){var n=r.xref+r.yref;o.setClipUrl(e,"clip"+t._fullLayout._uid+n,t)}function d(e){h(e)&&e._fullLayout._activeSelectionIndex>=0&&(i(e),delete e._fullLayout._activeSelectionIndex,u(e))}t.exports={draw:u,drawOne:f,activateLastSelection:function(e){if(h(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=d,u(e)}}}}}),sn=m({"node_modules/polybooljs/lib/build-log.js"(e,t){t.exports=function(){var e,t=0,r=!1;function n(t,r){return e.list.push({type:t,data:r?JSON.parse(JSON.stringify(r)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(e,t){return n("check",{seg1:e,seg2:t})},segmentChop:function(e,t){return n("div_seg",{seg:e,pt:t}),n("chop",{seg:e,pt:t})},statusRemove:function(e){return n("pop_seg",{seg:e})},segmentUpdate:function(e){return n("seg_update",{seg:e})},segmentNew:function(e,t){return n("new_seg",{seg:e,primary:t})},segmentRemove:function(e){return n("rem_seg",{seg:e})},tempStatus:function(e,t,r){return n("temp_status",{seg:e,above:t,below:r})},rewind:function(e){return n("rewind",{seg:e})},status:function(e,t,r){return n("status",{seg:e,above:t,below:r})},vert:function(t){return t===r?e:(r=t,n("vert",{x:t}))},log:function(e){return"string"!=typeof e&&(e=JSON.stringify(e,!1," ")),n("log",{txt:e})},reset:function(){return n("reset")},selected:function(e){return n("selected",{segs:e})},chainStart:function(e){return n("chain_start",{seg:e})},chainRemoveHead:function(e,t){return n("chain_rem_head",{index:e,pt:t})},chainRemoveTail:function(e,t){return n("chain_rem_tail",{index:e,pt:t})},chainNew:function(e,t){return n("chain_new",{pt1:e,pt2:t})},chainMatch:function(e){return n("chain_match",{index:e})},chainClose:function(e){return n("chain_close",{index:e})},chainAddHead:function(e,t){return n("chain_add_head",{index:e,pt:t})},chainAddTail:function(e,t){return n("chain_add_tail",{index:e,pt:t})},chainConnect:function(e,t){return n("chain_con",{index1:e,index2:t})},chainReverse:function(e){return n("chain_rev",{index:e})},chainJoin:function(e,t){return n("chain_join",{index1:e,index2:t})},done:function(){return n("done")}}}}}),ln=m({"node_modules/polybooljs/lib/epsilon.js"(e,t){t.exports=function(e){"number"!=typeof e&&(e=1e-10);var t={epsilon:function(t){return"number"==typeof t&&(e=t),e},pointAboveOrOnLine:function(t,r,n){var i=r[0],a=r[1],o=n[0],s=n[1],l=t[0];return(o-i)*(t[1]-a)-(s-a)*(l-i)>=-e},pointBetween:function(t,r,n){var i=t[1]-r[1],a=n[0]-r[0],o=t[0]-r[0],s=n[1]-r[1],l=o*a+i*s;return!(l-e)},pointsSameX:function(t,r){return Math.abs(t[0]-r[0])e!=o-i>e&&(a-c)*(i-u)/(o-u)+c-n>e&&(s=!s),a=c,o=u}return s}};return t}}}),cn=m({"node_modules/polybooljs/lib/linked-list.js"(e,t){t.exports={create:function(){var e={root:{root:!0,next:null},exists:function(t){return!(null===t||t===e.root)},isEmpty:function(){return null===e.root.next},getHead:function(){return e.root.next},insertBefore:function(t,r){for(var n=e.root,i=e.root.next;null!==i;){if(r(i))return t.prev=i.prev,t.next=i,i.prev.next=t,void(i.prev=t);n=i,i=i.next}n.next=t,t.prev=n,t.next=null},findTransition:function(t){for(var r=e.root,n=e.root.next;null!==n&&!t(n);)r=n,n=n.next;return{before:r===e.root?null:r,after:n,insert:function(e){return e.prev=r,e.next=n,r.next=e,null!==n&&(n.prev=e),e}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}}}}),un=m({"node_modules/polybooljs/lib/intersecter.js"(e,t){var r=cn();t.exports=function(e,t,n){function i(e,t){return{id:n?n.segmentId():-1,start:e,end:t,myFill:{above:null,below:null},otherFill:null}}function a(e,t,r){return{id:n?n.segmentId():-1,start:e,end:t,myFill:{above:r.myFill.above,below:r.myFill.below},otherFill:null}}var o=r.create();function s(e,r){o.insertBefore(e,(function(n){var i=function(e,r,n,i,a,o){var s=t.pointsCompare(r,a);return 0!==s?s:t.pointsSame(n,o)?0:e!==i?e?1:-1:t.pointAboveOrOnLine(n,i?a:o,i?o:a)?1:-1}(e.isStart,e.pt,r,n.isStart,n.pt,n.other.pt);return i<0}))}function l(e,t){var n=function(e,t){var n=r.node({isStart:!0,pt:e.start,seg:e,primary:t,other:null,status:null});return s(n,e.end),n}(e,t);return function(e,t,n){var i=r.node({isStart:!1,pt:t.end,seg:t,primary:n,other:e,status:null});e.other=i,s(i,e.pt)}(n,e,t),n}function c(e,t){var r=a(t,e.seg.end,e.seg);return function(e,t){n&&n.segmentChop(e.seg,t),e.other.remove(),e.seg.end=t,e.other.pt=t,s(e.other,e.pt)}(e,t),l(r,e.primary)}function u(i,a){var s=r.create();function l(e){return s.findTransition((function(r){var n=function(e,r){var n=e.seg.start,i=e.seg.end,a=r.seg.start,o=r.seg.end;return t.pointsCollinear(n,a,o)?t.pointsCollinear(i,a,o)||t.pointAboveOrOnLine(i,a,o)?1:-1:t.pointAboveOrOnLine(n,a,o)?1:-1}(e,r.ev);return n>0}))}function u(e,r){var i=e.seg,a=r.seg,o=i.start,s=i.end,l=a.start,u=a.end;n&&n.checkIntersection(i,a);var h=t.linesIntersect(o,s,l,u);if(!1===h){if(!t.pointsCollinear(o,s,l)||t.pointsSame(o,u)||t.pointsSame(s,l))return!1;var f=t.pointsSame(o,l),p=t.pointsSame(s,u);if(f&&p)return r;var d=!f&&t.pointBetween(o,l,u),m=!p&&t.pointBetween(s,l,u);if(f)return m?c(r,s):c(e,u),r;d&&(p||(m?c(r,s):c(e,u)),c(r,o))}else 0===h.alongA&&(-1===h.alongB?c(e,l):0===h.alongB?c(e,h.pt):1===h.alongB&&c(e,u)),0===h.alongB&&(-1===h.alongA?c(r,o):0===h.alongA?c(r,h.pt):1===h.alongA&&c(r,s));return!1}for(var h=[];!o.isEmpty();){var f=o.getHead();if(n&&n.vert(f.pt[0]),f.isStart){let t=function(){if(d){var e=u(f,d);if(e)return e}return!!m&&u(f,m)};n&&n.segmentNew(f.seg,f.primary);var p=l(f),d=p.before?p.before.ev:null,m=p.after?p.after.ev:null;n&&n.tempStatus(f.seg,!!d&&d.seg,!!m&&m.seg);var g,y=t();if(y&&(e?(g=null===f.seg.myFill.below||f.seg.myFill.above!==f.seg.myFill.below)&&(y.seg.myFill.above=!y.seg.myFill.above):y.seg.otherFill=f.seg.myFill,n&&n.segmentUpdate(y.seg),f.other.remove(),f.remove()),o.getHead()!==f){n&&n.rewind(f.seg);continue}if(e)g=null===f.seg.myFill.below||f.seg.myFill.above!==f.seg.myFill.below,f.seg.myFill.below=m?m.seg.myFill.above:i,f.seg.myFill.above=g?!f.seg.myFill.below:f.seg.myFill.below;else if(null===f.seg.otherFill){var v;v=m?f.primary===m.primary?m.seg.otherFill.above:m.seg.myFill.above:f.primary?a:i,f.seg.otherFill={above:v,below:v}}n&&n.status(f.seg,!!d&&d.seg,!!m&&m.seg),f.other.status=p.insert(r.node({ev:f}))}else{var x=f.status;if(null===x)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(s.exists(x.prev)&&s.exists(x.next)&&u(x.prev.ev,x.next.ev),n&&n.statusRemove(x.ev.seg),x.remove(),!f.primary){var _=f.seg.myFill;f.seg.myFill=f.seg.otherFill,f.seg.otherFill=_}h.push(f.seg)}o.getHead().remove()}return n&&n.done(),h}return e?{addRegion:function(e){for(var r,n=e[e.length-1],a=0;aa!=p>a&&i<(f-u)*(a-h)/(p-h)+u&&(o=!o)}return o}}}),gn=m({"src/lib/polygon.js"(e,t){var r=Le().dot,n=S().BADNUM,i=t.exports={};i.tester=function(e){var t,r=e.slice(),i=r[0][0],a=i,o=r[0][1],s=o;for((r[r.length-1][0]!==r[0][0]||r[r.length-1][1]!==r[0][1])&&r.push(r[0]),t=1;ta||c===n||cs||t&&l(e))}:function(e,t){var l=e[0],c=e[1];if(l===n||la||c===n||cs)return!1;var u,h,f,p,d,m=r.length,g=r[0][0],y=r[0][1],v=0;for(u=1;uMath.max(h,g)||c>Math.max(f,y)))if(cu||Math.abs(r(o,f))>i)return!0;return!1},i.filter=function(e,t){var r=[e[0]],n=0,a=0;function o(o){e.push(o);var s=r.length,l=n;r.splice(a+1);for(var c=l+1;c1&&o(e.pop()),{addPt:o,raw:e,filtered:r}}}}),yn=m({"src/components/selections/constants.js"(e,t){t.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}}),vn=m({"src/components/selections/select.js"(e,t){var r=dn(),n=mn(),i=He(),a=er().dashStyle,o=W(),s=Or(),l=Kt().makeEventData,c=Rr(),u=c.freeMode,h=c.rectMode,f=c.drawMode,p=c.openMode,d=c.selectMode,m=Gr(),g=Hr(),y=Zr(),v=bt().clearOutline,x=Ur(),_=x.handleEllipse,b=x.readPaths,w=Vr().newShapes,T=qr(),k=on().activateLastSelection,A=ct(),M=A.sorterAsc,S=gn(),E=Qe(),C=_t().getFromId,I=Fr(),L=an().redrawReglTraces,P=yn(),z=P.MINSELECT,D=S.filter,O=S.tester,R=Nr(),F=R.p2r,B=R.axValue,j=R.getTransform;function N(e){return void 0!==e.subplot}function U(e,t,r,n,i,a,o){var s,l,c,u,h,f,d,m,g,v=t._hoverdata,x=t._fullLayout.clickmode.indexOf("event")>-1,_=[];if(function(e){return e&&Array.isArray(e)&&!0!==e[0].hoverOnBox}(v)){G(e,t,a);var b=function(e,t){var r,n,i=e[0],a=-1,o=[];for(n=0;n0?function(e,t){var r,n,i,a=[];for(i=0;i0&&a.push(r);if(1===a.length&&a[0]===t.searchInfo&&(n=t.searchInfo.cd[0].trace).selectedpoints.length===t.pointNumbers.length){for(i=0;i1||(n+=t.selectedpoints.length)>1))return!1;return 1===n}(s)&&(f=K(b))){for(o&&o.remove(),g=0;g=0})(a)&&a._fullLayout._deactivateShape(a),function(e){return e._fullLayout._activeSelectionIndex>=0}(a)&&a._fullLayout._deactivateSelection(a);var o=a._fullLayout._zoomlayer,s=f(r),l=d(r);if(s||l){var c,u,h=o.selectAll(".select-outline-"+n.id);h&&a._fullLayout._outlining&&(s&&(c=w(h,e)),c&&i.call("_guiRelayout",a,{shapes:c}),l&&!N(e)&&(u=T(h,e)),u&&(a._fullLayout._noEmitSelectedAtStart=!0,i.call("_guiRelayout",a,{selections:u}).then((function(){t&&k(a)}))),a._fullLayout._outlining=!1)}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function Y(e){return e._id}function X(e,t,r,n){if(!e.calcdata)return[];var i,a,o,s=[],l=t.map(Y),c=r.map(Y);for(o=0;o0?n[0]:r;return!!t.selectedpoints&&t.selectedpoints.indexOf(i)>-1}function J(e,t,r){var n,a;for(n=0;n-1&&t;if(!a&&t){var te=oe(e,!0);if(te.length){var ne=te[0].xref,pe=te[0].yref;if(ne&&pe){var de=ce(te);ue([C(e,ne,"x"),C(e,pe,"y")])(Q,de)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:ee&&he(e,Q),p._reselect=!1}if(!a&&p._deselect){var me=p._deselect;(function(e,t,r){for(var n=0;n=0)k._fullLayout._deactivateShape(k);else if(!x){var r=M.clickmode;E.done(Me).then((function(){if(E.clear(Me),2===e){for(_e.remove(),K=0;K-1&&U(t,k,n.xaxes,n.yaxes,n.subplot,n,_e),"event"===r&&he(k,void 0);s.click(k,t,L.id)})).catch(A.error)}},n.doneFn=function(){ke.remove(),E.done(Me).then((function(){E.clear(Me),!S&&$&&n.selectionDefs&&($.subtract=xe,n.selectionDefs.push($),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,Y)),(S||x)&&Z(n,S),n.doneFnCompleted&&n.doneFnCompleted(Se),b&&he(k,ae)})).catch(A.error)}},clearOutline:v,clearSelectionsCache:Z,selectOnClick:U}}}),xn=m({"src/components/annotations/arrow_paths.js"(e,t){t.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]}}),_n=m({"src/constants/axis_placeable_objects.js"(e,t){t.exports={axisRefDescription:function(e,t,r){return["If set to a",e,"axis id (e.g. *"+e+"* or","*"+e+"2*), the `"+e+"` position refers to a",e,"coordinate. If set to *paper*, the `"+e+"`","position refers to the distance from the",t,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",t,"("+r+"). If set to a",e,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",t,"of the domain of that axis: e.g.,","*"+e+"2 domain* refers to the domain of the second",e," axis and a",e,"position of 0.5 refers to the","point between the",t,"and the",r,"of the domain of the","second",e,"axis."].join(" ")}}}}),bn=m({"src/components/annotations/attributes.js"(e,t){var r=xn(),n=j(),i=xt(),a=vt().templatedArray;_n(),t.exports=a("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:n({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:r.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:r.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",i.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",i.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:n({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})}}),wn=m({"src/traces/scatter/constants.js"(e,t){t.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}}}),Tn=m({"src/traces/scatter/fillcolor_attribute.js"(e,t){t.exports=function(e){return{valType:"color",editType:"style",anim:!0}}}}),kn=m({"src/traces/scatter/attributes.js"(e,t){var r=It().axisHoverFormat,{hovertemplateAttrs:n,texttemplateAttrs:i,templatefallbackAttrs:a}=Fe(),o=zt(),s=j(),l=Oe().dash,c=Oe().pattern,u=er(),h=wn(),f=B().extendFlat,p=Tn();t.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dx:{valType:"number",dflt:1,editType:"calc",anim:!0},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dy:{valType:"number",dflt:1,editType:"calc",anim:!0},xperiod:{valType:"any",dflt:0,editType:"calc"},yperiod:{valType:"any",dflt:0,editType:"calc"},xperiod0:{valType:"any",editType:"calc"},yperiod0:{valType:"any",editType:"calc"},xperiodalignment:{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"},yperiodalignment:{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"},xhoverformat:r("x"),yhoverformat:r("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc"},alignmentgroup:{valType:"string",dflt:"",editType:"calc"},stackgroup:{valType:"string",dflt:"",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc"},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},texttemplate:i(),texttemplatefallback:a({editType:"calc"}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc"},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style"},hovertemplate:n({},{keys:h.eventDataKeys}),hovertemplatefallback:a(),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:f({},l,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot"},simplify:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot"},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc"},fillcolor:p(!0),fillgradient:f({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc"},start:{valType:"number",editType:"calc"},stop:{valType:"number",editType:"calc"},colorscale:{valType:"colorscale",editType:"style"},editType:"calc"}),fillpattern:c,marker:f({symbol:{valType:"enumerated",values:u.symbolList,dflt:"circle",arrayOk:!0,editType:"style"},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot"},sizeref:{valType:"number",dflt:1,editType:"calc"},sizemin:{valType:"number",min:0,dflt:0,editType:"calc"},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc"},line:f({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},dash:f({},l,{arrayOk:!0}),editType:"calc"},o("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc"},color:{valType:"color",arrayOk:!0,editType:"calc"},editType:"calc"},editType:"calc"},o("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc"},textfont:s({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}}}),An=m({"src/components/selections/attributes.js"(e,t){var r=bn(),n=kn().line,i=Oe().dash,a=B().extendFlat,o=De().overrideAll,s=vt().templatedArray;_n(),t.exports=o(s("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:a({},r.xref,{}),yref:a({},r.yref,{}),x0:{valType:"any"},x1:{valType:"any"},y0:{valType:"any"},y1:{valType:"any"},path:{valType:"string",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw"},line:{color:n.color,width:a({},n.width,{min:1,dflt:1}),dash:a({},i,{dflt:"dot"})}}),"arraydraw","from-root")}}),Mn=m({"src/components/selections/defaults.js"(e,t){var r=ct(),n=ar(),i=Nt(),a=An(),o=Gr();function s(e,t,i){function s(n,i){return r.coerce(e,t,a,n,i)}var l=s("path"),c="path"!==s("type",l?"path":"rect");c&&delete t.path,s("opacity"),s("line.color"),s("line.width"),s("line.dash");for(var u=["x","y"],h=0;h<2;h++){var f,p,d,m=u[h],g={_fullLayout:i},y=n.coerceRef(e,t,g,m);if((f=n.getFromId(g,y))._selectionIndices.push(t._index),d=o.rangeToShapePosition(f),p=o.shapePositionToRange(f),c){var v=m+"0",x=m+"1",_=e[v],b=e[x];e[v]=p(e[v],!0),e[x]=p(e[x],!0),n.coercePosition(t,g,s,y,v),n.coercePosition(t,g,s,y,x);var w=t[v],T=t[x];void 0!==w&&void 0!==T&&(t[v]=d(w),t[x]=d(T),e[v]=_,e[x]=b)}}c&&r.noneOrAll(e,t,["x0","x1","y0","y1"])}t.exports=function(e,t){i(e,t,{name:"selections",handleItemDefaults:s});for(var r=t.selections,n=0;n=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function N(e,t,r,n,i){return e.append("path").attr("class","zoombox").style({fill:t>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",l(r,n)).attr("d",i+"Z")}function U(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:u.background,stroke:u.defaultLine,"stroke-width":1,opacity:0}).attr("transform",l(t,r)).attr("d","M0,0Z")}function V(e,t,r,n,i,a){e.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),q(e,t,i,a)}function q(e,t,r,n){r||(e.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function H(e){r.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function G(e){P&&e.data&&e._context.showTips&&(n.notifier(n._(e,"Double-click to zoom back out"),"long",e),P=!1)}function Z(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,L)/2);return"M"+(e.l-3.5)+","+(e.t-.5+t)+"h3v"+-t+"h"+t+"v-3h-"+(t+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+t)+"h-3v"+-t+"h"+-t+"v-3h"+(t+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-t)+"h-3v"+t+"h"+-t+"v3h"+(t+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-t)+"h3v"+t+"h"+t+"v3h-"+(t+3)+"Z"}function Y(e,t,r,i,a){for(var o,s,l,c,u=!1,h={},f={},p=(a||{}).xaHash,d=(a||{}).yaHash,m=0;m=0)o._fullLayout._deactivateShape(o);else{var l=o._fullLayout.clickmode;if(H(o),2===n&&!ye&&function(){if(!e._transitioningWithDuration){var t=e._context.doubleClick,r=[];ie&&(r=r.concat(W)),ae&&(r=r.concat(K)),ne.xaxes&&(r=r.concat(ne.xaxes)),ne.yaxes&&(r=r.concat(ne.yaxes));var n,i,a={};if("reset+autosize"===t)for(t="autosize",i=0;i-1&&S(a,o,W,K,t.id,Le),l.indexOf("event")>-1&&f.click(o,a,t.id);else if(1===n&&ye){var u=g?z:P,h="s"===g||"w"===b?0:1,p=u._name+".range["+h+"]",d=function(e,t){var r,n=e.range[t],a=Math.abs(n-e.range[1-t]);return"date"===e.type?n:"log"===e.type?(r=Math.ceil(Math.max(0,-Math.log(a)/Math.LN10))+3,i("."+r+"g")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(a)/Math.LN10)+4,i("."+String(r)+"g")(n))}(u,h),m="left",y="middle";if(u.fixedrange)return;g?(y="n"===g?"top":"bottom","right"===u.side&&(m="right")):"e"===b&&(m="right"),o._context.showAxisRangeEntryBoxes&&r.select(_e).call(c.makeEditable,{gd:o,immediate:!0,background:o._fullLayout.paper_bgcolor,text:String(d),fill:u.tickfont?u.tickfont.color:"#444",horizontalAlign:m,verticalAlign:y}).on("edit",(function(e){var t=u.d2r(e);void 0!==t&&s.call("_guiRelayout",o,p,t)}))}}}function De(t,r){if(e._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(ee,pe*t+be)),i=Math.max(0,Math.min(te,de*r+we)),a=Math.abs(n-be),o=Math.abs(i-we);function s(){Se="",Te.r=Te.l,Te.t=Te.b,Ce.attr("d","M0,0Z")}if(Te.l=Math.min(be,n),Te.r=Math.max(be,n),Te.t=Math.min(we,i),Te.b=Math.max(we,i),re.isSubplotConstrained)a>L||o>L?(Se="xy",a/ee>o/te?(o=a*te/ee,we>i?Te.t=we-o:Te.b=we+o):(a=o*ee/te,be>n?Te.l=be-a:Te.r=be+a),Ce.attr("d",Z(Te))):s();else if(ne.isSubplotConstrained)if(a>L||o>L){Se="xy";var l=Math.min(Te.l/ee,(te-Te.b)/te),c=Math.max(Te.r/ee,(te-Te.t)/te);Te.l=l*ee,Te.r=c*ee,Te.b=(1-l)*te,Te.t=(1-c)*te,Ce.attr("d",Z(Te))}else s();else!ae||o0){var u;if(ne.isSubplotConstrained||!ie&&1===ae.length){for(u=0;u1&&(void 0!==a.maxallowed&&se===(a.range[0]1&&(void 0!==o.maxallowed&&le===(o.range[0]1&&n.warn("Full array edits are incompatible with other edits",h);var v=l[""][""];if(s(v))t.set(null);else{if(!Array.isArray(v))return n.warn("Unrecognized full array edit value",h,v),!0;t.set(v)}return!m&&(f(g,y),p(e),!0)}var x,_,b,w,T,k,A,M,S=Object.keys(l).map(Number).sort(i),E=t.get(),C=E||[],I=u(y,h).get(),L=[],P=-1,z=C.length;for(x=0;xC.length-(A?0:1))n.warn("index out of range",h,b);else if(void 0!==k)T.length>1&&n.warn("Insertion & removal are incompatible with edits to the same index.",h,b),s(k)?L.push(b):A?("add"===k&&(k={}),C.splice(b,0,k),I&&I.splice(b,0,{})):n.warn("Unrecognized full object edit value",h,b,k),-1===P&&(P=b);else for(_=0;_=0;x--)C.splice(L[x],1),I&&I.splice(L[x],1);if(C.length?E||t.set(C):t.set(null),m)return!1;if(f(g,y),d!==r){var D;if(-1===P)D=S;else{for(z=Math.max(C.length,z),D=[],x=0;x=P);x++)D.push(b);for(x=P;x0&&n.log("Clearing previous rejected promises from queue."),e._promises=[]},e.cleanLayout=function(t){var r;t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var a=(i.subplotsRegistry.cartesian||{}).attrRegex,l=((i.subplotsRegistry.polar||{}).attrRegex,(i.subplotsRegistry.ternary||{}).attrRegex,(i.subplotsRegistry.gl3d||{}).attrRegex,Object.keys(t));for(r=0;r3?(x.x=1.02,x.xanchor="left"):x.x<-2&&(x.x=-.02,x.xanchor="right"),x.y>3?(x.y=1.02,x.yanchor="bottom"):x.y<-2&&(x.y=-.02,x.yanchor="top")),"rotate"===t.dragmode&&(t.dragmode="orbit"),o.clean(t),t.template&&t.template.layout&&e.cleanLayout(t.template.layout),t},e.cleanData=function(t){for(var a=0;a0)return e.slice(0,t)}e.hasParent=function(e,t){for(var r=y(t);r;){if(r in e)return!0;r=y(r)}return!1},e.clearAxisTypes=function(e,t,r){for(var i=0;i{let r=(...e)=>e.every((e=>n.isPlainObject(e)))||e.every((e=>Array.isArray(e)));if([e,t].every((e=>Array.isArray(e)))){if(e.length!==t.length)return!1;for(let n=0;nn.isPlainObject(e)))){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e){if(n.startsWith("_"))continue;let i=e[n],a=t[n];if(!(i===a||r(i,a)&&v(i,a)))return!1}return!0}return!1};e.collectionsAreEqual=v}}),On=m({"src/plot_api/plot_api.js"(e){var t=b(),r=M(),n=ft(),i=ct(),a=i.nestedProperty,o=dt(),s=mt(),l=He(),c=yt(),u=At(),h=ar(),f=sr(),p=Lt(),d=er(),m=W(),g=Ln().initInteractions,y=Mt(),v=Cn().clearOutline,x=$().dfltConfig,_=zn(),w=Dn(),T=an(),k=De(),A=xt().AX_NAME_PATTERN,S=0;function E(e){var t=e._fullLayout;t._redrawFromAutoMarginCount?t._redrawFromAutoMarginCount--:e.emit("plotly_afterplot")}function C(e,t){try{e._fullLayout._paper.style("background",t)}catch(e){i.error(e)}}function I(e,t){C(e,m.combine(t,"white"))}function L(e,r){if(!e._context){e._context=i.extendDeep({},x);var a=t.select("base");e._context._baseUrl=a.size()&&a.attr("href")?window.location.href.split("#")[0]:""}var o,s,l,c=e._context;if(r){for(s=Object.keys(r),o=0;o=e.data.length||i<-e.data.length)throw new Error(r+" must be valid indices for gd.data.");if(t.indexOf(i,n+1)>-1||i>=0&&t.indexOf(-e.data.length+i)>-1||i<0&&t.indexOf(e.data.length+i)>-1)throw new Error("each index in "+r+" must be unique.")}}function D(e,t,r){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof t>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(t)||(t=[t]),z(e,t,"currentIndices"),typeof r<"u"&&!Array.isArray(r)&&(r=[r]),typeof r<"u"&&z(e,r,"newIndices"),typeof r<"u"&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function O(e,t,n,o,s){!function(e,t,r,n){var a=i.isPlainObject(n);if(!Array.isArray(e.data))throw new Error("gd.data must be an array");if(!i.isPlainObject(t))throw new Error("update must be a key:value object");if(typeof r>"u")throw new Error("indices must be an integer or array of integers");for(var o in z(e,r,"indices"),t){if(!Array.isArray(t[o])||t[o].length!==r.length)throw new Error("attribute "+o+" must be an array of length equal to indices array length");if(a&&(!(o in n)||!Array.isArray(n[o])||n[o].length!==t[o].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 correspondence with the keys and number of traces in the update object")}}(e,t,n,o);for(var l=function(e,t,n,o){var s,l,c,u,h,f=i.isPlainObject(o),p=[];for(var d in Array.isArray(n)||(n=[n]),n=P(n,e.data.length-1),t)for(var m=0;m0&&"string"!=typeof z.parts[O];)O--;var R=z.parts[O],F=z.parts[O-1]+"."+R,N=z.parts.slice(0,O).join("."),U=a(e.layout,N).get(),V=a(u,N).get(),q=z.get();if(void 0!==D){M[P]=D,S[P]="reverse"===R?D:B(q);var H=c.getLayoutValObject(u,z.parts);if(H&&H.impliedEdits&&null!==D)for(var W in H.impliedEdits)E(i.relativeAttr(P,W),H.impliedEdits[W]);if(-1!==["width","height"].indexOf(P))if(D){E("autosize",null);var X="height"===P?"width":"height";E(X,u[X])}else u[P]=e._initialAutoSize[P];else if("autosize"===P)E("width",D?null:u.width),E("height",D?null:u.height);else if(F.match(G))L(F),a(u,N+"._inputRange").set(null);else if(F.match(Z)){L(F),a(u,N+"._inputRange").set(null);var $=a(u,N).get();$._inputDomain&&($._input.domain=$._inputDomain.slice())}else F.match(Y)&&a(u,N+"._inputDomain").set(null);if("type"===R){C=U;var J="linear"===V.type&&"log"===D,Q="log"===V.type&&"linear"===D;if(J||Q){if(C&&C.range)if(V.autorange)J&&(C.range=C.range[1]>C.range[0]?[1,2]:[2,1]);else{var ee=C.range[0],te=C.range[1];J?(ee<=0&&te<=0&&E(N+".autorange",!0),ee<=0?ee=te/1e6:te<=0&&(te=ee/1e6),E(N+".range[0]",Math.log(ee)/Math.LN10),E(N+".range[1]",Math.log(te)/Math.LN10)):(E(N+".range[0]",Math.pow(10,ee)),E(N+".range[1]",Math.pow(10,te)))}else E(N+".autorange",!0);Array.isArray(u._subplots.polar)&&u._subplots.polar.length&&u[z.parts[0]]&&"radialaxis"===z.parts[1]&&delete u[z.parts[0]]._subplot.viewInitial["radialaxis.range"],l.getComponentMethod("annotations","convertCoords")(e,V,D,E),l.getComponentMethod("images","convertCoords")(e,V,D,E)}else E(N+".autorange",!0),E(N+".range",null);a(u,N+"._inputRange").set(null)}else if(R.match(A)){var re=a(u,P).get(),ne=(D||{}).type;(!ne||"-"===ne)&&(ne="linear"),l.getComponentMethod("annotations","convertCoords")(e,re,ne,E),l.getComponentMethod("images","convertCoords")(e,re,ne,E)}var ie=_.containerArrayMatch(P);if(ie){r=ie.array,n=ie.index;var ae=ie.property,oe=H||{editType:"calc"};""!==n&&""===ae&&(_.isAddVal(D)?S[P]=null:_.isRemoveVal(D)?S[P]=(a(s,r).get()||[])[n]:i.warn("unrecognized full object value",t)),k.update(T,oe),y[r]||(y[r]={});var se=y[r][n];se||(se=y[r][n]={}),se[ae]=D,delete t[P]}else"reverse"===R?(U.range?U.range.reverse():(E(N+".autorange",!0),U.range=[1,0]),V.autorange?T.calc=!0:T.plot=!0):("dragmode"===P&&(!1===D&&!1!==q||!1!==D&&!1===q)||u._has("scatter-like")&&u._has("regl")&&"dragmode"===P&&("lasso"===D||"select"===D)&&"lasso"!==q&&"select"!==q?T.plot=!0:H?k.update(T,H):T.calc=!0,z.set(D))}}for(r in y)_.applyContainerArrayChanges(e,p(s,r),y[r],T,p)||(T.plot=!0);for(var le in I){var ce=(C=h.getFromId(e,le))&&C._constraintGroup;if(ce)for(var ue in T.calc=!0,ce)I[ue]||(h.getFromId(e,ue)._constraintShrinkable=!0)}(K(e)||t.height||t.width)&&(T.plot=!0);var he=u.shapes;for(n=0;n1;)if(n.pop(),void 0!==(r=a(t,n.join(".")+".uirevision").get()))return r;return t.uirevision}function ie(e,t){for(var r=0;r=a.length?a[0]:a[e]:a}function l(e){return Array.isArray(o)?e>=o.length?o[0]:o[e]:o}function c(e,t){var r=0;return function(){if(e&&++r===t)return e()}}return void 0===n._frameWaitingCnt&&(n._frameWaitingCnt=0),new Promise((function(o,h){var f=0;function p(e){return Array.isArray(a)?f>=a.length?e.transitionOpts=a[f]:e.transitionOpts=a[0]:e.transitionOpts=a,f++,e}var d,m,g=[],y=null==t,v=Array.isArray(t);if(y||v||!i.isPlainObject(t)){if(y||-1!==["string","number"].indexOf(typeof t))for(d=0;d0&&bb)&&T.push(m);g=T}}g.length>0?function(t){if(0!==t.length){for(var i=0;in._timeToNext&&function(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var t=n._currentFrame=n._frameQueue.shift();if(t){var r=t.name?t.name.toString():null;e._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=t.frameOpts.duration,u.transition(e,t.frame.data,t.frame.layout,w.coerceTraceIndices(e,t.frame.traces),t.frameOpts,t.transitionOpts).then((function(){t.onComplete&&t.onComplete()})),e.emit("plotly_animatingframe",{name:r,frame:t.frame,animation:{frame:t.frameOpts,transition:t.transitionOpts}})}else e.emit("plotly_animated"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}()};t()}()}}(g):(e.emit("plotly_animated"),o())}))},e.addFrames=function(e,t,r){if(e=i.getGraphDiv(e),null==t)return Promise.resolve();if(!i.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var n,a,o,l,c=e._transitionData._frames,h=e._transitionData._frameHash;if(!Array.isArray(t))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+t);var f=c.length+2*t.length,p=[],d={};for(n=t.length-1;n>=0;n--)if(i.isPlainObject(t[n])){var m=t[n].name,g=(h[m]||d[m]||{}).name,y=t[n].name,v=h[g]||d[g];g&&y&&"number"==typeof y&&v&&S<5&&(S++,i.warn('addFrames: overwriting frame "'+(h[g]||d[g]).name+'" with a frame whose name of type "number" also equates to "'+g+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===S&&i.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),d[m]={name:m},p.push({frame:u.supplyFrameDefaults(t[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:f+n})}p.sort((function(e,t){return e.index>t.index?-1:e.index=0;n--){if("number"==typeof(a=p[n].frame).name&&i.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;h[a.name="frame "+e._transitionData._counter++];);if(h[a.name]){for(o=0;o=0;r--)n=t[r],o.push({type:"delete",index:n}),l.unshift({type:"insert",index:n,value:a[n]});var c=u.modifyFrames,h=u.modifyFrames,f=[e,l],p=[e,o];return s&&s.add(e,c,f,h,p),u.modifyFrames(e,o)},e.addTraces=function t(r,n,a){r=i.getGraphDiv(r);var o,l,c=[],u=e.deleteTraces,h=t,f=[r,c],p=[r,n];for(function(e,t,r){var n,i;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof t>"u")throw new Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),n=0;n"u")return l=e.redraw(r),s.add(r,u,f,h,p),l;Array.isArray(a)||(a=[a]);try{D(r,c,a)}catch(e){throw r.data.splice(r.data.length-n.length,n.length),e}return s.startSequence(r),s.add(r,u,f,h,p),l=e.moveTraces(r,c,a),s.stopSequence(r),l},e.deleteTraces=function t(r,n){r=i.getGraphDiv(r);var a,o,l=[],c=e.addTraces,u=t,h=[r,l,n],f=[r,n];if(typeof n>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(n)||(n=[n]),z(r,n,"indices"),(n=P(n,r.data.length-1)).sort(i.sorterDes),a=0;a=0&&r"u")for(a=[],o=0;o=0&&r[e,t._ev.listeners(e)]));h=e.newPlot(t,r,n,o).then((()=>{for(let[e,r]of i)r.forEach((r=>t.on(e,r)));return e.react(t,r,n,o)}))}else{t.data=r||[],w.cleanData(t.data),t.layout=n||{},w.cleanLayout(t.layout),function(e,t,r,n){var o,s,l,c,u,h,f,p,d,m,g=n._preGUI,y=[],v={},x={};for(o in g){if(u=re(o,ee)){if(d=u.head,m=u.tail,s=u.attr||d+".uirevision",(c=(l=a(n,s).get())&&ne(s,t))&&c===l){if(null===(h=g[o])&&(h=void 0),oe(p=(f=a(t,o)).get(),h)){void 0===p&&"autorange"===m&&y.push(d),f.set(B(a(n,o).get()));continue}if("autorange"===m||"range["===m.slice(0,6)){var _=g[d+".range[0]"],b=g[d+".range[1]"],w=g[d+".autorange"];if(w||null===w&&null===_&&null===b){if(!(d in v)){var T=a(t,d).get();v[d]=T&&(T.autorange||!1!==T.autorange&&(!T.range||2!==T.range.length))}if(v[d]){f.set(B(a(n,o).get()));continue}}}}}else i.warn("unrecognized GUI edit: "+o);delete g[o],u&&"range["===u.tail.slice(0,6)&&(x[u.head]=1)}for(var k=0;k(m||t.emit("plotly_react",{config:o,data:r,layout:n}),t)))},e.redraw=function(t){if(t=i.getGraphDiv(t),!i.isPlotDiv(t))throw new Error("This element is not a Plotly plot: "+t);return w.cleanData(t.data),w.cleanLayout(t.layout),t.calcdata=void 0,e._doPlot(t).then((function(){return t.emit("plotly_redraw"),t}))},e.relayout=V,e.restyle=F,e.setPlotConfig=function(e){return i.extendFlat(x,e)},e.update=J,e._guiRelayout=Q(V),e._guiRestyle=Q(F),e._guiUpdate=Q(J),e._storeDirectGUIEdit=function(e,t,r){for(var n in r)N(n,a(e,n).get(),r[n],t)}}}),Rn=m({"src/snapshot/helpers.js"(e){var t=He();e.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("mapbox")||e._has("map"))?500:0},e.getRedrawFunc=function(e){return function(){t.getComponentMethod("colorbar","draw")(e)}},e.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)},e.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var r=window.URL||window.webkitURL;e.createObjectURL=function(e){return r.createObjectURL(e)},e.revokeObjectURL=function(e){return r.revokeObjectURL(e)},e.createBlob=function(e,t){if("svg"===t)return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if("full-json"===t)return new window.Blob([e],{type:"application/json;charset=utf-8"});var r=function(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),i=0;i")?"":t.html(e).text()}));return t.remove(),n}(_),(_=_.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(s,"'")}}}),Bn=m({"src/snapshot/svgtoimg.js"(e,t){var r=ct(),n=pt().EventEmitter,i=Rn();t.exports=function(e){var t=e.emitter||new n,a=new Promise((function(n,a){var o,s,l=window.Image,c=e.svg,u=e.format||"png",h=e.canvas,f=e.scale||1,p=e.width||300,d=e.height||150,m=f*p,g=f*d,y=h.getContext("2d",{willReadFrequently:!0}),v=new l;"svg"===u||r.isSafari()?s=i.encodeSVG(c):(o=i.createBlob(c,"svg"),s=i.createObjectURL(o)),h.width=m,h.height=g,v.onload=function(){var r;switch(o=null,i.revokeObjectURL(s),"svg"!==u&&y.drawImage(v,0,0,m,g),u){case"jpeg":r=h.toDataURL("image/jpeg");break;case"png":r=h.toDataURL("image/png");break;case"webp":r=h.toDataURL("image/webp");break;case"svg":r=s;break;default:var l="Image format is not jpeg, png, svg or webp.";if(a(new Error(l)),!e.promise)return t.emit("error",l)}n(r),e.promise||t.emit("success",r)},v.onerror=function(r){if(o=null,i.revokeObjectURL(s),a(r),!e.promise)return t.emit("error",r)},v.src=s}));return e.promise?a:t}}}),jn=m({"src/plot_api/to_image.js"(e,t){var r=M(),n=On(),i=At(),a=ct(),o=Rn(),s=Fn(),l=Bn(),c=x().version,u={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};t.exports=function(e,t){var h,f,p,d;function m(e){return!(e in t)||a.validate(t[e],u[e])}if(t=t||{},a.isPlainObject(e)?(h=e.data||[],f=e.layout||{},p=e.config||{},d={}):(e=a.getGraphDiv(e),h=a.extendDeep([],e.data),f=a.extendDeep({},e.layout),p=e._context,d=e._fullLayout||{}),!m("width")&&null!==t.width||!m("height")&&null!==t.height)throw new Error("Height and width should be pixel values.");if(!m("format"))throw new Error("Export format is not "+a.join2(u.format.values,", "," or ")+".");var g={};function y(e,r){return a.coerce(t,g,u,e,r)}var v=y("format"),x=y("width"),_=y("height"),b=y("scale"),w=y("setBackground"),T=y("imageDataOnly"),k=document.createElement("div");k.style.position="absolute",k.style.left="-5000px",document.body.appendChild(k);var A=a.extendFlat({},f);x?A.width=x:null===t.width&&r(d.width)&&(A.width=d.width),_?A.height=_:null===t.height&&r(d.height)&&(A.height=d.height);var M=a.extendFlat({},p,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),S=o.getRedrawFunc(k);function E(){return new Promise((function(e){setTimeout(e,o.getDelay(k._fullLayout))}))}function C(){return new Promise((function(e,t){var r=s(k,v,b),u=k._fullLayout.width,h=k._fullLayout.height;function f(){n.purge(k),document.body.removeChild(k)}if("full-json"===v){var p=i.graphJson(k,!1,"keepdata","object",!0,!0);return p.version=c,p=JSON.stringify(p),f(),e(T?p:o.encodeJSON(p))}if(f(),"svg"===v)return e(T?r:o.encodeSVG(r));var d=document.createElement("canvas");d.id=a.randstr(),l({format:v,width:u,height:h,scale:b,canvas:d,svg:r,promise:!0}).then(e).catch(t)}))}return new Promise((function(e,t){n.newPlot(k,h,A,M).then(S).then(E).then(C).then((function(t){e(function(e){return T?e.replace(o.IMAGE_URL_PREFIX,""):e}(t))})).catch((function(e){t(e)}))}))}}}),Nn=m({"src/plot_api/validate.js"(e,t){var r=ct(),n=At(),i=yt(),a=$().dfltConfig,o=r.isPlainObject,s=Array.isArray,l=r.isArrayOrTypedArray;function c(e,t,n,i,a,u){u=u||[];for(var h=Object.keys(e),m=0;mx.length&&i.push(f("unused",a,y.concat(x.length)));var A,M,S,E,C,I=x.length,L=Array.isArray(k);if(L&&(I=Math.min(I,k.length)),2===_.dimensions)for(M=0;Mx[M].length&&i.push(f("unused",a,y.concat(M,x[M].length)));var P=x[M].length;for(A=0;A<(L?Math.min(P,k[M].length):P);A++)S=L?k[M][A]:k,E=v[M][A],C=x[M][A],r.validate(E,S)?C!==E&&C!==+E&&i.push(f("dynamic",a,y.concat(M,A),E,C)):i.push(f("value",a,y.concat(M,A),E))}else i.push(f("array",a,y.concat(M),v[M]));else for(M=0;M1&&p.push(f("object","layout"))),n.supplyDefaults(d);for(var m=d._fullData,g=l.length,y=0;yT?h.push({code:"unused",traceType:v,templateCount:w,dataCount:T}):T>w&&h.push({code:"reused",traceType:v,templateCount:w,dataCount:T})}}else h.push({code:"data"});if(function e(t,n){for(var i in t)if("_"!==i.charAt(0)){var a=t[i],o=p(t,i,n);r(a)?(Array.isArray(t)&&!1===a._template&&a.templateitemname&&h.push({code:"missing",path:o,templateitemname:a.templateitemname}),e(a,o)):Array.isArray(a)&&d(a)&&e(a,o)}}({data:g,layout:f},""),h.length)return h.map(m)}}}),Hn=m({"src/plot_api/index.js"(e){var t=On();e._doPlot=t._doPlot,e.newPlot=t.newPlot,e.restyle=t.restyle,e.relayout=t.relayout,e.redraw=t.redraw,e.update=t.update,e._guiRestyle=t._guiRestyle,e._guiRelayout=t._guiRelayout,e._guiUpdate=t._guiUpdate,e._storeDirectGUIEdit=t._storeDirectGUIEdit,e.react=t.react,e.extendTraces=t.extendTraces,e.prependTraces=t.prependTraces,e.addTraces=t.addTraces,e.deleteTraces=t.deleteTraces,e.moveTraces=t.moveTraces,e.purge=t.purge,e.addFrames=t.addFrames,e.deleteFrames=t.deleteFrames,e.animate=t.animate,e.setPlotConfig=t.setPlotConfig;var r=Pe().getGraphDiv,n=Yr().eraseActiveShape;e.deleteActiveShape=function(e){return n(r(e))},e.toImage=jn(),e.validate=Nn(),e.downloadImage=Vn();var i=qn();e.makeTemplate=i.makeTemplate,e.validateTemplate=i.validateTemplate}}),Gn=m({"src/traces/scatter/xy_defaults.js"(e,t){var r=ct(),n=He();t.exports=function(e,t,i,a){var o,s=a("x"),l=a("y");if(n.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],i),s){var c=r.minRowLength(s);l?o=Math.min(c,r.minRowLength(l)):(o=c,a("y0"),a("dy"))}else{if(!l)return 0;o=r.minRowLength(l),a("x0"),a("dx")}return t._length=o,o}}}),Wn=m({"src/traces/scatter/period_defaults.js"(e,t){var r=ct().dateTick0,n=S().ONEWEEK;function i(e,t){return r(t,e%n==0?1:0)}t.exports=function(e,t,r,n,a){if(a||(a={x:!0,y:!0}),a.x){var o=n("xperiod");o&&(n("xperiod0",i(o,t.xcalendar)),n("xperiodalignment"))}if(a.y){var s=n("yperiod");s&&(n("yperiod0",i(s,t.ycalendar)),n("yperiodalignment"))}}}}),Zn=m({"src/traces/scatter/stack_defaults.js"(e,t){var r=["orientation","groupnorm","stackgaps"];t.exports=function(e,t,n,i){var a=n._scatterStackOpts,o=i("stackgroup");if(o){var s=t.xaxis+t.yaxis,l=a[s];l||(l=a[s]={});var c=l[o],u=!1;c?c.traces.push(t):(c=l[o]={traceIndices:[],traces:[t]},u=!0);for(var h={orientation:t.x&&!t.y?"h":"v"},f=0;f=0;f--){var p=e[f];if("scatter"===p.type&&p.xaxis===u.xaxis&&p.yaxis===u.yaxis){p.opacity=void 0;break}}}}}}}),ri=m({"src/traces/scatter/layout_defaults.js"(e,t){var r=ct(),n=wt();t.exports=function(e,t){var i,a="group"===t.barmode;"group"===t.scattermode&&(i=a?t.bargap:.2,r.coerce(e,t,n,"scattergap",i))}}}),ni=m({"src/plots/cartesian/align_period.js"(e,t){var r=M(),n=ct(),i=n.dateTime2ms,a=n.incrementMonth,o=S().ONEAVGMONTH;t.exports=function(e,t,n,s){if("date"!==t.type)return{vals:s};var l=e[n+"periodalignment"];if(!l)return{vals:s};var c,u=e[n+"period"];if(r(u)){if((u=+u)<=0)return{vals:s}}else if("string"==typeof u&&"M"===u.charAt(0)){var h=+u.substring(1);if(!(h>0&&Math.round(h)===h))return{vals:s};c=h}for(var f=t.calendar,p="start"===l,d="end"===l,m=e[n+"period0"],g=i(m,f)||0,y=[],v=[],x=[],_=s.length,b=0;b<_;b++){var w,T,k,A=s[b];if(c){for(w=Math.round((A-g)/(c*o)),k=a(g,c*w,f);k>A;)k=a(k,-c,f);for(;k<=A;)k=a(k,c,f);T=a(k,-c,f)}else{for(k=g+(w=Math.round((A-g)/u))*u;k>A;)k-=u;for(;k<=A;)k+=u;T=k-u}y[b]=p?T:d?k:(T+k)/2,v[b]=T,x[b]=k}return{vals:y,starts:v,ends:x}}}}),ii=m({"src/traces/scatter/colorscale_calc.js"(e,t){var r=Ct().hasColorscale,n=Zt(),i=Xt();t.exports=function(e,t){i.hasLines(t)&&r(t,"line")&&n(e,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),i.hasMarkers(t)&&(r(t,"marker")&&n(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),r(t,"marker.line")&&n(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}}),ai=m({"src/traces/scatter/arrays_to_calcdata.js"(e,t){var r=ct();t.exports=function(e,t){for(var n=0;nd&&I[y].gap;)y--;for(x=I[y].s,g=I.length-1;g>y;g--)I[g].s=x;for(;dh+c||!r(u))}for(var p=0;pi(e)))):i(e.text);let a=e.outsidetextfont.size*u*r+c;return{ppadplus:t.some((e=>e.s<0))?a:0,ppadminus:t.some((e=>e.s>=0))?a:0}}return{ppadplus:void 0,ppadminus:void 0}}function _(e){return e._id.charAt(0)}t.exports={crossTraceCalc:function(e,t){for(var r=t.xaxis,n=t.yaxis,i=e._fullLayout,o=e._fullData,s=e.calcdata,l=[],c=[],u=0;uS[h]&&h0?o:s)/(I._m*z*(I._m>0?o:s)))),a*=1e3}if(l===i){if(P&&(l=I.c2p(n.y,!0)),l===i)return!1;l*=1e3}return[a,l]}function Y(e,t,r,n){var i=r-e,a=n-t,o=.5-e,s=.5-t,l=i*i+a*a,c=i*o+a*s;if(c>0&&coe||e[1]le)return[u(e[0],ae,oe),u(e[1],se,le)]}function he(e,t){if(e[0]===t[0]&&(e[0]===ae||e[0]===oe)||e[1]===t[1]&&(e[1]===se||e[1]===le))return!0}function fe(e,t,r){return function(n,i){var a=ue(n),o=ue(i),s=[];if(a&&o&&he(a,o))return s;a&&s.push(a),o&&s.push(o);var c=2*l.constrain((n[e]+i[e])/2,t,r)-((a||n)[e]+(o||i)[e]);return c&&((a&&o?c>0==a[e]>o[e]?a:o:a||o)[e]+=c),s}}function pe(e){var t=e[0],r=e[1],n=t===G[W-1][0],i=r===G[W-1][1];if(!n||!i)if(W>1){var a=t===G[W-2][0],o=r===G[W-2][1];n&&(t===ae||t===oe)&&a?o?W--:G[W-1]=e:i&&(r===se||r===le)&&o?a?W--:G[W-1]=e:G[W++]=e}else G[W++]=e}function de(e){G[W-1][0]!==e[0]&&G[W-1][1]!==e[1]&&pe([Q,ee]),pe(e),te=null,Q=ee=0}"linear"===j||"spline"===j?ne=function(e,t){for(var r=[],n=0,i=0;i<4;i++){var a=ce[i],o=c(e[0],e[1],t[0],t[1],a[0],a[1],a[2],a[3]);o&&(!n||Math.abs(o.x-r[0][0])>1||Math.abs(o.y-r[0][1])>1)&&(o=[o.x,o.y],n&&$(o,e)<$(r[0],e)?r.unshift(o):r.push(o),n++)}return r}:"hv"===j||"vh"===j?ne=function(e,t){var r=[],n=ue(e),i=ue(t);return n&&i&&he(n,i)||(n&&r.push(n),i&&r.push(i)),r}:"hvh"===j?ne=fe(0,ae,oe):"vhv"===j&&(ne=fe(1,se,le));var me=l.isArrayOrTypedArray(R);function ge(t){if(t&&O&&(t.i=n,t.d=e,t.trace=E,t.marker=me?R[t.i]:R,t.backoff=O),M=t[0]/z,S=t[1]/D,K=t[0]oe?oe:0,J=t[1]le?le:0,K||J){if(W)if(te){var r=ne(te,t);r.length>1&&(de(r[0]),G[W++]=r[1])}else re=ne(G[W-1],t)[0],G[W++]=re;else G[W++]=[K||t[0],J||t[1]];var i=G[W-1];K&&J&&(i[0]!==K||i[1]!==J)?(te&&(Q!==K&&ee!==J?pe(Q&&ee?function(e,t){var r=t[0]-e[0],n=(t[1]-e[1])/r;return(e[1]*t[0]-t[1]*e[0])/r>0?[n>0?ae:oe,le]:[n>0?oe:ae,se]}(te,t):[Q||K,ee||J]):Q&&ee&&pe([Q,ee])),pe([K,J])):Q-K&&ee-J&&pe([K||Q,J||ee]),te=t,Q=K,ee=J}else te&&de(ne(te,t)[0]),G[W++]=t}for(n=0;nX(m,ye))break;f=m,(w=v[0]*y[0]+v[1]*y[1])>_?(_=w,p=m,g=!1):w=e.length||!m)break;ge(m),a=m}}else ge(p)}te&&pe([Q||te[0],ee||te[1]]),V.push(G.slice(0,W))}var ve=j.slice(j.length-1);if(O&&"h"!==ve&&"v"!==ve){for(var xe=!1,_e=-1,be=[],we=0;we=0?l=p:(l=p=f,f++),l=u[0]&&e.x<=u[1]&&e.y>=h[0]&&e.y<=h[1]})),m=Math.ceil(d.length/p),g=0;o.forEach((function(e,r){var n=e[0].trace;l.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;function x(e){return v?e.transition():e}var _=u.xaxis,b=u.yaxis,w=f[0].trace,T=w.line,k=r.select(d),A=a(k,"g","errorbars"),M=a(k,"g","lines"),S=a(k,"g","points"),E=a(k,"g","text");if(n.getComponentMethod("errorbars","plot")(e,A,u,m),!0===w.visible){x(k).style("opacity",w.opacity);var C,I,L,P,z=w.fill.charAt(w.fill.length-1);"x"!==z&&"y"!==z&&(z=""),"y"===z?(L=1,P=b.c2p(0,!0)):"x"===z&&(L=0,P=_.c2p(0,!0)),f[0][u.isRangePlot?"nodeRangePlot3":"node3"]=k;var D="",O=[],R=w._prevtrace,F=null,B=null;R&&(D=R._prevRevpath||"",I=R._nextFill,O=R._ownPolygons,F=R._fillsegments,B=R._fillElement);var j,N,U,V,q,H,G,W,Z="",Y="",X=[];w._polygons=[];var $=[],K=[],J=i.noop;if(C=w._ownFill,l.hasLines(w)||"none"!==w.fill){I&&I.datum(f),-1!==["hv","vh","hvh","vhv"].indexOf(T.shape)?(U=s.steps(T.shape),V=s.steps(T.shape.split("").reverse().join(""))):U=V="spline"===T.shape?function(e){var t=e[e.length-1];return e.length>1&&e[0][0]===t[0]&&e[0][1]===t[1]?s.smoothclosed(e.slice(1),T.smoothing):s.smoothopen(e,T.smoothing)}:function(e){return"M"+e.join("L")},q=function(e){return V(e.reverse())},K=c(f,{xaxis:_,yaxis:b,trace:w,connectGaps:w.connectgaps,baseTolerance:Math.max(T.width||1,3)/4,shape:T.shape,backoff:T.backoff,simplify:T.simplify,fill:w.fill}),$=new Array(K.length);var Q=0;for(g=0;g0,g=u(e,t,n);(h=i.selectAll("g.trace").data(g,(function(e){return e[0].trace.uid}))).enter().append("g").attr("class",(function(e){return"trace scatter trace"+e[0].trace.uid})).style("stroke-miterlimit",2),h.order(),function(e,t,n){t.each((function(t){var i=a(r.select(this),"g","fills");s.setClipUrl(i,n.layerClipId,e);var l=t[0].trace;l._ownFill=null,l._nextFill=null;var c=[];l._ownfill&&c.push("_ownFill"),l._nexttrace&&c.push("_nextFill");var u=i.selectAll("g").data(c,o);u.enter().append("g"),u.exit().remove(),u.order().each((function(e){l[e]=a(r.select(this),"path","js-fill")}))}))}(e,h,t),m?(c&&(p=c()),r.transition().duration(l.duration).ease(l.easing).each("end",(function(){p&&p()})).each("interrupt",(function(){p&&p()})).each((function(){i.selectAll("g.trace").each((function(r,n){f(e,n,t,r,g,this,l)}))}))):h.each((function(r,n){f(e,n,t,r,g,this,l)})),d&&h.exit().remove(),i.selectAll("path:not([d])").remove()}}}),mi=m({"src/traces/scatter/marker_colorbar.js"(e,t){t.exports={container:"marker",min:"cmin",max:"cmax"}}}),gi=m({"src/traces/scatter/format_labels.js"(e,t){var r=ar();t.exports=function(e,t,n){var i={},a={_fullLayout:n},o=r.getFromTrace(a,t,"x"),s=r.getFromTrace(a,t,"y"),l=e.orig_x;void 0===l&&(l=e.x);var c=e.orig_y;return void 0===c&&(c=e.y),i.xLabel=r.tickText(o,o.c2l(l),!0).text,i.yLabel=r.tickText(s,s.c2l(c),!0).text,i}}}),yi=m({"src/traces/scatter/style.js"(e,t){var r=b(),n=er(),i=He();function a(e,t,r){n.pointStyle(e.selectAll("path.point"),t,r)}function o(e,t,r){n.textPointStyle(e.selectAll("text"),t,r)}t.exports={style:function(e){var t=r.select(e).selectAll("g.trace.scatter");t.style("opacity",(function(e){return e[0].trace.opacity})),t.selectAll("g.points").each((function(t){a(r.select(this),t.trace||t[0].trace,e)})),t.selectAll("g.text").each((function(t){o(r.select(this),t.trace||t[0].trace,e)})),t.selectAll("g.trace path.js-line").call(n.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(n.fillGroupStyle,e,!1),i.getComponentMethod("errorbars","style")(t)},stylePoints:a,styleText:o,styleOnSelect:function(e,t,r){var i=t[0].trace;i.selectedpoints?(n.selectedPointStyle(r.selectAll("path.point"),i),n.selectedTextStyle(r.selectAll("text"),i)):(a(r,i,e),o(r,i,e))}}}}),vi=m({"src/traces/scatter/get_trace_color.js"(e,t){var r=W(),n=Xt();t.exports=function(e,t){var i,a;if("lines"===e.mode)return(i=e.line.color)&&r.opacity(i)?i:e.fillcolor;if("none"===e.mode)return e.fill?e.fillcolor:"";var o=t.mcc||(e.marker||{}).color,s=t.mlcc||((e.marker||{}).line||{}).color;return(a=o&&r.opacity(o)?o:s&&r.opacity(s)&&(t.mlw||((e.marker||{}).line||{}).width)?s:"")?r.opacity(a)<.3?r.addOpacity(a,.3):a:(i=(e.line||{}).color)&&r.opacity(i)&&n.hasLines(e)&&e.line.width?i:e.fillcolor}}}),xi=m({"src/traces/scatter/hover.js"(e,t){var r=ct(),n=Or(),i=He(),a=vi(),o=W(),s=r.fillText;t.exports=function(e,t,l,c){var u=e.cd,h=u[0].trace,f=e.xa,p=e.ya,d=f.c2p(t),m=p.c2p(l),g=[d,m],y=h.hoveron||"",v=-1!==h.mode.indexOf("markers")?3:.5,x=!!h.xperiodalignment,_=!!h.yperiodalignment;if(-1!==y.indexOf("points")){var b=function(e){var t=Math.max(v,e.mrc||0),r=f.c2p(e.x)-d,n=p.c2p(e.y)-m;return Math.max(Math.sqrt(r*r+n*n)-t,1-v/t)},w=n.getDistanceFunction(c,(function(e){if(x){var t=f.c2p(e.xStart),r=f.c2p(e.xEnd);return d>=Math.min(t,r)&&d<=Math.max(t,r)?0:1/0}var n=Math.max(3,e.mrc||0),i=1-1/n,a=Math.abs(f.c2p(e.x)-d);return a=Math.min(t,r)&&m<=Math.max(t,r)?0:1/0}var n=Math.max(3,e.mrc||0),i=1-1/n,a=Math.abs(p.c2p(e.y)-m);return ar!=(c=i[n][1])>=r&&(o=i[n-1][0],s=i[n][0],c-l&&(a=o+(s-o)*(r-l)/(c-l),h=Math.min(h,a),d=Math.max(d,a)));return{x0:h=Math.max(h,0),x1:d=Math.min(d,f._length),y0:r,y1:r}}(h._polygons);null===P&&(P={x0:g[0],x1:g[0],y0:g[1],y1:g[1]});var z=o.defaultLine;return o.opacity(h.fillcolor)?z=h.fillcolor:o.opacity((h.line||{}).color)&&(z=h.line.color),r.extendFlat(e,{distance:e.maxHoverDistance,x0:P.x0,x1:P.x1,y0:P.y0,y1:P.y1,color:z,hovertemplate:!1}),delete e.index,h.text&&!r.isArrayOrTypedArray(h.text)?e.text=String(h.text):e.text=h.name,[e]}}}}),_i=m({"src/traces/scatter/select.js"(e,t){var r=Xt();t.exports=function(e,t){var n,i,a,o,s=e.cd,l=e.xaxis,c=e.yaxis,u=[],h=s[0].trace;if(!r.hasMarkers(h)&&!r.hasText(h))return[];if(!1===t)for(n=0;n0&&(i["_"+r+"axes"]||{})[t])return i;if((i[r+"axis"]||r)===t){if(a(i,r))return i;if((i[r]||[]).length||i[r+"0"])return i}}}(t,s,l);if(c){if("histogram"===c.type&&l==={v:"y",h:"x"}[c.orientation||"v"])return void(e.type="linear");var u=l+"calendar",h=c[u],f={noMultiCategory:!r(c,"cartesian")||r(c,"noMultiCategory")};if("box"===c.type&&c._hasPreCompStats&&l==={h:"x",v:"y"}[c.orientation||"v"]&&(f.noMultiCategory=!0),f.autotypenumbers=e.autotypenumbers,a(c,l)){var p=i(c),d=[];for(o=0;o0||r(o);s&&(a="array");var l,c=n("categoryorder",a);"array"===c&&(l=n("categoryarray")),!s&&"array"===c&&(c=t.categoryorder="trace"),"trace"===c?t._initialCategories=[]:"array"===c?t._initialCategories=l.slice():(l=function(e,t){var r,n,i,a=t.dataAttr||e._id.charAt(0),o={};if(t.axData)r=t.axData;else for(r=[],n=0;n=2){var l,c,u="";if(2===o.length)for(l=0;l<2;l++)if(c=_(o[l])){u=g;break}var h=a("pattern",u);if(h===g)for(l=0;l<2;l++)(c=_(o[l]))&&(t.bounds[l]=o[l]=c-1);if(h)for(l=0;l<2;l++)switch(c=o[l],h){case g:if(!r(c))return void(t.enabled=!1);if((c=+c)!==Math.floor(c)||c<0||c>=7)return void(t.enabled=!1);t.bounds[l]=o[l]=c;break;case y:if(!r(c))return void(t.enabled=!1);if((c=+c)<0||c>24)return void(t.enabled=!1);t.bounds[l]=o[l]=c}if(!1===n.autorange){var f=n.range;if(f[0]f[1])return void(t.enabled=!1)}else if(o[0]>f[0]&&o[1]_[1]-1/4096&&(t.domain=s),n.noneOrAll(e.domain,t.domain,s),"sync"===t.tickmode&&(t.tickmode="auto")}return i("layer"),t}}}),Si=m({"src/plots/cartesian/layout_defaults.js"(e,t){var r=ct(),n=W(),i=Kt().isUnifiedHover,a=Lr(),o=vt(),s=Ve(),l=Lt(),c=wi(),u=Ai(),h=nn(),f=Mi(),p=_t(),d=p.id2name,m=p.name2id,g=xt().AX_ID_PATTERN,y=He(),v=y.traceIs,x=y.getComponentMethod;function _(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}t.exports=function(e,t,y){var b,w,T=t.autotypenumbers,k={},A={},M={},S={},E={},C={},I={},L={},P={},z={};for(b=0;bs.duration?(function(){for(var r={},i=0;i rect").call(a.setTranslate,0,0).call(a.setScale,1,1),e.plot.call(a.setTranslate,t._offset,r._offset).call(a.setScale,1,1);var n=e.plot.selectAll(".scatterlayer .trace");n.selectAll(".point").call(a.setPointGroupScale,1,1),n.selectAll(".textpoint").call(a.setTextPointsScale,1,1),n.call(a.hideOutsideRangePoints,e)}function g(t,r){var n=t.plotinfo,s=n.xaxis,l=n.yaxis,c=s._length,u=l._length,h=!!t.xr1,f=!!t.yr1,p=[];if(h){var d=i.simpleMap(t.xr0,s.r2l),m=i.simpleMap(t.xr1,s.r2l),g=d[1]-d[0],y=m[1]-m[0];p[0]=(d[0]*(1-r)+r*m[0]-d[0])/(d[1]-d[0])*c,p[2]=c*(1-r+r*y/g),s.range[0]=s.l2r(d[0]*(1-r)+r*m[0]),s.range[1]=s.l2r(d[1]*(1-r)+r*m[1])}else p[0]=0,p[2]=c;if(f){var v=i.simpleMap(t.yr0,l.r2l),x=i.simpleMap(t.yr1,l.r2l),_=v[1]-v[0],b=x[1]-x[0];p[1]=(v[1]*(1-r)+r*x[1]-v[1])/(v[0]-v[1])*u,p[3]=u*(1-r+r*b/_),l.range[0]=s.l2r(v[0]*(1-r)+r*x[0]),l.range[1]=l.l2r(v[1]*(1-r)+r*x[1])}else p[1]=0,p[3]=u;o.drawOne(e,s,{skipTitle:!0}),o.drawOne(e,l,{skipTitle:!0}),o.redrawComponents(e,[s._id,l._id]);var w=h?c/p[2]:1,T=f?u/p[3]:1,k=h?p[0]:0,A=f?p[1]:0,M=h?p[0]/p[2]*c:0,S=f?p[1]/p[3]*u:0,E=s._offset-M,C=l._offset-S;n.clipRect.call(a.setTranslate,k,A).call(a.setScale,1/w,1/T),n.plot.call(a.setTranslate,E,C).call(a.setScale,w,T),a.setPointGroupScale(n.zoomScalePts,1/w,1/T),a.setTextPointsScale(n.zoomScaleTxt,1/w,1/T)}o.redrawComponents(e)}}}),Ci=m({"src/plots/cartesian/index.js"(e){var t=b(),r=He(),n=ct(),i=At(),a=er(),o=Tt().getModuleCalcData,s=_t(),l=xt(),c=Mt(),u=n.ensureSingle;function h(e,t,r){return n.ensureSingle(e,t,r,(function(e){e.datum(r)}))}var f=l.zindexSeparator;function p(e,n,i,s,c){for(var u,h,f,p=l.traceLayerClasses,d=e._fullLayout,m=d._zindices,g=d._modules,y=[],v=[],x=0;x1,m=t.mainplotinfo;if(!t.mainplot||d)if(p)t.xlines=u(n,"path","xlines-above"),t.ylines=u(n,"path","ylines-above"),t.xaxislayer=u(n,"g","xaxislayer-above"),t.yaxislayer=u(n,"g","yaxislayer-above");else{if(!a){var g=u(n,"g","layer-subplot");t.shapelayer=u(g,"g","shapelayer"),t.imagelayer=u(g,"g","imagelayer"),m&&d?(t.minorGridlayer=m.minorGridlayer,t.gridlayer=m.gridlayer,t.zerolinelayer=m.zerolinelayer):(t.minorGridlayer=u(n,"g","minor-gridlayer"),t.gridlayer=u(n,"g","gridlayer"),t.zerolinelayer=u(n,"g","zerolinelayer"));var y=u(n,"g","layer-between");t.shapelayerBetween=u(y,"g","shapelayer"),t.imagelayerBetween=u(y,"g","imagelayer"),u(n,"path","xlines-below"),u(n,"path","ylines-below"),t.overlinesBelow=u(n,"g","overlines-below"),u(n,"g","xaxislayer-below"),u(n,"g","yaxislayer-below"),t.overaxesBelow=u(n,"g","overaxes-below")}t.overplot=u(n,"g","overplot"),t.plot=u(t.overplot,"g",i),t.zerolinelayerAbove=m&&d?m.zerolinelayerAbove:u(n,"g","zerolinelayer-above"),a||(t.xlines=u(n,"path","xlines-above"),t.ylines=u(n,"path","ylines-above"),t.overlinesAbove=u(n,"g","overlines-above"),u(n,"g","xaxislayer-above"),u(n,"g","yaxislayer-above"),t.overaxesAbove=u(n,"g","overaxes-above"),t.xlines=n.select(".xlines-"+o),t.ylines=n.select(".ylines-"+c),t.xaxislayer=n.select(".xaxislayer-"+o),t.yaxislayer=n.select(".yaxislayer-"+c))}else{var v=m.plotgroup,x=i+"-x",_=i+"-y";t.minorGridlayer=m.minorGridlayer,t.gridlayer=m.gridlayer,t.zerolinelayer=m.zerolinelayer,t.zerolinelayerAbove=m.zerolinelayerAbove,u(m.overlinesBelow,"path",x),u(m.overlinesBelow,"path",_),u(m.overaxesBelow,"g",x),u(m.overaxesBelow,"g",_),t.plot=u(m.overplot,"g",i),u(m.overlinesAbove,"path",x),u(m.overlinesAbove,"path",_),u(m.overaxesAbove,"g",x),u(m.overaxesAbove,"g",_),t.xlines=v.select(".overlines-"+o).select("."+x),t.ylines=v.select(".overlines-"+c).select("."+_),t.xaxislayer=v.select(".overaxes-"+o).select("."+x),t.yaxislayer=v.select(".overaxes-"+c).select("."+_)}a||(p||(h(t.minorGridlayer,"g",t.xaxis._id),h(t.minorGridlayer,"g",t.yaxis._id),t.minorGridlayer.selectAll("g").map((function(e){return e[0]})).sort(s.idSort),h(t.gridlayer,"g",t.xaxis._id),h(t.gridlayer,"g",t.yaxis._id),t.gridlayer.selectAll("g").map((function(e){return e[0]})).sort(s.idSort)),t.xlines.style("fill","none").classed("crisp",!0),t.ylines.style("fill","none").classed("crisp",!0))}function m(e,r){if(e){var n={};for(var i in e.each((function(e){var i=e[0];t.select(this).remove(),g(i,r),n[i]=!0})),r._plots)for(var a=r._plots[i].overlays||[],o=0;o0){var g=m.id;if(-1!==g.indexOf(f))continue;g+=f+(u+1),m=n.extendFlat({},m,{id:g,plot:o._cartesianlayer.selectAll(".subplot").select("."+g)})}for(var y,v=[],x=0;x1&&(w+=f+b),_.push(n+w),r=0;r=0,x=t.indexOf("end")>=0,_=d.backoff*g+a.standoff,b=m.backoff*y+a.startstandoff;if("line"===p.nodeName){c={x:+e.attr("x1"),y:+e.attr("y1")},u={x:+e.attr("x2"),y:+e.attr("y2")};var w=c.x-u.x,T=c.y-u.y;if(f=(h=Math.atan2(T,w))+Math.PI,_&&b&&_+b>Math.sqrt(w*w+T*T))return void D();if(_){if(_*_>w*w+T*T)return void D();var k=_*Math.cos(h),A=_*Math.sin(h);u.x+=k,u.y+=A,e.attr({x2:u.x,y2:u.y})}if(b){if(b*b>w*w+T*T)return void D();var M=b*Math.cos(h),S=b*Math.sin(h);c.x-=M,c.y-=S,e.attr({x1:c.x,y1:c.y})}}else if("path"===p.nodeName){var E=p.getTotalLength(),C="";if(E<_+b)return void D();var I=p.getPointAtLength(0),L=p.getPointAtLength(.1);h=Math.atan2(I.y-L.y,I.x-L.x),c=p.getPointAtLength(Math.min(b,E)),C="0px,"+b+"px,";var P=p.getPointAtLength(E),z=p.getPointAtLength(E-.1);f=Math.atan2(P.y-z.y,P.x-z.x),u=p.getPointAtLength(Math.max(0,E-_)),C+=E-(C?b+_:_)+"px,"+E+"px",e.style("stroke-dasharray",C)}function D(){e.style("stroke-dasharray","0px,100px")}function O(t,i,c,u){t.path&&(t.noRotate&&(c=0),r.select(p.parentNode).append("path").attr({class:e.attr("class"),d:t.path,transform:l(i.x,i.y)+s(180*c/Math.PI)+o(u)}).style({fill:n.rgb(a.arrowcolor),"stroke-width":0}))}v&&O(m,c,h,y),x&&O(d,u,f,g)}}}),Pi=m({"src/components/annotations/draw.js"(e,t){var r=b(),n=He(),i=At(),a=ct(),o=a.strTranslate,s=ar(),l=W(),c=er(),u=Or(),h=Et(),f=dr(),p=pr(),d=vt().arrayEditor,m=Li();function g(e,t){var r=e._fullLayout.annotations[t]||{},n=s.getFromId(e,r.xref),i=s.getFromId(e,r.yref);n&&n.setScale(),i&&i.setScale(),v(e,r,t,!1,n,i)}function y(e,t,r,n,i){var a=i[r],o=i[r+"ref"],l=-1!==r.indexOf("y"),c="domain"===s.getRefType(o),u=l?n.h:n.w;return e?c?a+(l?-t:t)/e._length:e.p2r(e.r2p(a)+t):a+(l?-t:t)/u}function v(e,t,i,g,v,x){var _,b,w=e._fullLayout,T=e._fullLayout._size,k=e._context.edits;g?(_="annotation-"+g,b=g+".annotations"):(_="annotation",b="annotations");var A=d(e.layout,b,t),M=A.modifyBase,S=A.modifyItem,E=A.getUpdateObj;w._infolayer.selectAll("."+_+'[data-index="'+i+'"]').remove();var C="clip"+w._uid+"_ann"+i;if(t._input&&!1!==t.visible){var I={x:{},y:{}},L=+t.textangle||0,P=w._infolayer.append("g").classed(_,!0).attr("data-index",String(i)).style("opacity",t.opacity),z=P.append("g").classed("annotation-text-g",!0),D=k[t.showarrow?"annotationTail":"annotationPosition"],O=t.captureevents||k.annotationText||D,R=z.append("g").style("pointer-events",O?"all":null).call(f,"pointer").on("click",(function(){e._dragging=!1,e.emit("plotly_clickannotation",W(r.event))}));t.hovertext&&R.on("mouseover",(function(){var r=t.hoverlabel,n=r.font,i=this.getBoundingClientRect(),a=e.getBoundingClientRect();u.loneHover({x0:i.left-a.left,x1:i.right-a.left,y:(i.top+i.bottom)/2-a.top,text:t.hovertext,color:r.bgcolor,borderColor:r.bordercolor,fontFamily:n.family,fontSize:n.size,fontColor:n.color,fontWeight:n.weight,fontStyle:n.style,fontVariant:n.variant,fontShadow:n.fontShadow,fontLineposition:n.fontLineposition,fontTextcase:n.fontTextcase},{container:w._hoverlayer.node(),outerContainer:w._paper.node(),gd:e})})).on("mouseout",(function(){u.loneUnhover(w._hoverlayer.node())}));var F=t.borderwidth,B=t.borderpad,j=F+B,N=R.append("rect").attr("class","bg").style("stroke-width",F+"px").call(l.stroke,t.bordercolor).call(l.fill,t.bgcolor),U=t.width||t.height,V=w._topclips.selectAll("#"+C).data(U?[0]:[]);V.enter().append("clipPath").classed("annclip",!0).attr("id",C).append("rect"),V.exit().remove();var q=t.font,H=w._meta?a.templateString(t.text,w._meta):t.text,G=R.append("text").classed("annotation-text",!0).text(H);k.annotationText?G.call(h.makeEditable,{delegate:R,gd:e}).call(Z).on("edit",(function(r){t.text=r,this.call(Z),S("text",r),v&&v.autorange&&M(v._name+".autorange",!0),x&&x.autorange&&M(x._name+".autorange",!0),n.call("_guiRelayout",e,E())})):G.call(Z)}else r.selectAll("#"+C).remove();function W(e){var r={index:i,annotation:t._input,fullAnnotation:t,event:e};return g&&(r.subplotId=g),r}function Z(r){return r.call(c.font,q).attr({"text-anchor":{left:"start",right:"end"}[t.align]||"middle"}),h.convertToTspans(r,e,Y),r}function Y(){var r=G.selectAll("a");1===r.size()&&r.text()===G.text()&&R.insert("a",":first-child").attr({"xlink:xlink:href":r.attr("xlink:href"),"xlink:xlink:show":r.attr("xlink:show")}).style({cursor:"pointer"}).node().appendChild(N.node());var i=R.select(".annotation-text-math-group"),u=!i.empty(),d=c.bBox((u?i:G).node()),_=d.width,b=d.height,A=t.width||_,O=t.height||b,B=Math.round(A+2*j),q=Math.round(O+2*j);function H(e,t){return"auto"===t&&(t=e<1/3?"left":e>2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[t]}for(var Z=!1,Y=["x","y"],X=0;X1)&&(ne===re?((pe=ie.r2fraction(t["a"+te]))<0||pe>1)&&(Z=!0):Z=!0),$=ie._offset+ie.r2p(t[te]),Q=.5}else{var de="domain"===fe;"x"===te?(J=t[te],$=de?ie._offset+ie._length*J:$=T.l+T.w*J):(J=1-t[te],$=de?ie._offset+ie._length*J:$=T.t+T.h*J),Q=t.showarrow?.5:J}if(t.showarrow){he.head=$;var me=t["a"+te];if(ee=oe*H(.5,t.xanchor)-se*H(.5,t.yanchor),ne===re){var ge=s.getRefType(ne);"domain"===ge?("y"===te&&(me=1-me),he.tail=ie._offset+ie._length*me):"paper"===ge?"y"===te?(me=1-me,he.tail=T.t+T.h*me):he.tail=T.l+T.w*me:he.tail=ie._offset+ie.r2p(me),K=ee}else he.tail=$+me,K=ee+me;he.text=he.tail+ee;var ye=w["x"===te?"width":"height"];if("paper"===re&&(he.head=a.constrain(he.head,1,ye-1)),"pixel"===ne){var ve=-Math.max(he.tail-3,he.text),xe=Math.min(he.tail+3,he.text)-ye;ve>0?(he.tail+=ve,he.text+=ve):xe>0&&(he.tail-=xe,he.text-=xe)}he.tail+=ue,he.head+=ue}else K=ee=le*H(Q,ce),he.text=$+ee;he.text+=ue,ee+=ue,K+=ue,t["_"+te+"padplus"]=le/2+K,t["_"+te+"padminus"]=le/2-K,t["_"+te+"size"]=le,t["_"+te+"shift"]=ee}if(Z)R.remove();else{var _e=0,be=0;if("left"!==t.align&&(_e=(A-_)*("center"===t.align?.5:1)),"top"!==t.valign&&(be=(O-b)*("middle"===t.valign?.5:1)),u)i.select("svg").attr({x:j+_e-1,y:j+be}).call(c.setClipUrl,U?C:null,e);else{var we=j+be-d.top,Te=j+_e-d.left;G.call(h.positionText,Te,we).call(c.setClipUrl,U?C:null,e)}V.select("rect").call(c.setRect,j,j,A,O),N.call(c.setRect,F/2,F/2,B-F,q-F),R.call(c.setTranslate,Math.round(I.x.text-B/2),Math.round(I.y.text-q/2)),z.attr({transform:"rotate("+L+","+I.x.text+","+I.y.text+")"});var ke,Ae=function(r,i){P.selectAll(".annotation-arrow-g").remove();var s=I.x.head,u=I.y.head,h=I.x.tail+r,f=I.y.tail+i,d=I.x.text+r,_=I.y.text+i,b=a.rotationXYMatrix(L,d,_),w=a.apply2DTransform(b),A=a.apply2DTransform2(b),C=+N.attr("width"),D=+N.attr("height"),O=d-.5*C,F=O+C,B=_-.5*D,j=B+D,U=[[O,B,O,j],[O,j,F,j],[F,j,F,B],[F,B,O,B]].map(A);if(!U.reduce((function(e,t){return e^!!a.segmentsIntersect(s,u,s+1e6,u+1e6,t[0],t[1],t[2],t[3])}),!1)){U.forEach((function(e){var t=a.segmentsIntersect(h,f,s,u,e[0],e[1],e[2],e[3]);t&&(h=t.x,f=t.y)}));var V=t.arrowwidth,q=t.arrowcolor,H=t.arrowside,G=P.append("g").style({opacity:l.opacity(q)}).classed("annotation-arrow-g",!0),W=G.append("path").attr("d","M"+h+","+f+"L"+s+","+u).style("stroke-width",V+"px").call(l.stroke,l.rgb(q));if(m(W,H,t),k.annotationPosition&&W.node().parentNode&&!g){var Z=s,Y=u;if(t.standoff){var X=Math.sqrt(Math.pow(s-h,2)+Math.pow(u-f,2));Z+=t.standoff*(h-s)/X,Y+=t.standoff*(f-u)/X}var $,K,J=G.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(h-Z)+","+(f-Y),transform:o(Z,Y)}).style("stroke-width",V+6+"px").call(l.stroke,"rgba(0,0,0,0)").call(l.fill,"rgba(0,0,0,0)");p.init({element:J.node(),gd:e,prepFn:function(){var e=c.getTranslate(R);$=e.x,K=e.y,v&&v.autorange&&M(v._name+".autorange",!0),x&&x.autorange&&M(x._name+".autorange",!0)},moveFn:function(e,r){var n=w($,K),i=n[0]+e,a=n[1]+r;R.call(c.setTranslate,i,a),S("x",y(v,e,"x",T,t)),S("y",y(x,r,"y",T,t)),t.axref===t.xref&&S("ax",y(v,e,"ax",T,t)),t.ayref===t.yref&&S("ay",y(x,r,"ay",T,t)),G.attr("transform",o(e,r)),z.attr({transform:"rotate("+L+","+i+","+a+")"})},doneFn:function(){n.call("_guiRelayout",e,E());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}};t.showarrow&&Ae(0,0),D&&p.init({element:R.node(),gd:e,prepFn:function(){ke=z.attr("transform")},moveFn:function(e,r){var n="pointer";if(t.showarrow)t.axref===t.xref?S("ax",y(v,e,"ax",T,t)):S("ax",t.ax+e),t.ayref===t.yref?S("ay",y(x,r,"ay",T.w,t)):S("ay",t.ay+r),Ae(e,r);else{if(g)return;var i,a;if(v)i=y(v,e,"x",T,t);else{var s=t._xsize/T.w,l=t.x+(t._xshift-t.xshift)/T.w-s/2;i=p.align(l+e/T.w,s,0,1,t.xanchor)}if(x)a=y(x,r,"y",T,t);else{var c=t._ysize/T.h,u=t.y-(t._yshift+t.yshift)/T.h-c/2;a=p.align(u-r/T.h,c,0,1,t.yanchor)}S("x",i),S("y",a),(!v||!x)&&(n=p.getCursor(v?.5:i,x?.5:a,t.xanchor,t.yanchor))}z.attr({transform:o(e,r)+ke}),f(R,n)},clickFn:function(r,n){t.captureevents&&e.emit("plotly_clickannotation",W(n))},doneFn:function(){f(R),n.call("_guiRelayout",e,E());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}}t.exports={draw:function(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r0||r.explicitOff.length>0},onClick:function(e,t){var o,s,l=a(e,t),c=l.on,u=l.off.concat(l.explicitOff),h={},f=e._fullLayout.annotations;if(c.length||u.length){for(o=0;o1){c=!0;break}}c?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+s+'"]').remove():(l._pdata=n(e.glplot.cameraParams,[t.xaxis.r2l(l.x)*a[0],t.yaxis.r2l(l.y)*a[1],t.zaxis.r2l(l.z)*a[2]]),r(e.graphDiv,l,s,e.id,l._xa,l._ya))}}}}),Hi=m({"src/components/annotations3d/index.js"(e,t){var r=He(),n=ct();t.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:ji()}}},layoutAttributes:ji(),handleDefaults:Ni(),includeBasePlot:function(e,t){var i=r.subplotsRegistry.gl3d;if(i)for(var a=i.attrRegex,o=Object.keys(e),s=0;s{var m,g,y,v,x=a+"anchor",_="x"===a?h:f,b={_fullLayout:i};let w=e[a+"ref"];if(Array.isArray(w)&&w.length>0){let r=o.countDefiningCoords(c,l,a);v=n.coerceRefArray(e,t,b,a,void 0,"paper",r),t["_"+a+"refArray"]=!0}else v=n.coerceRef(e,t,b,a,void 0,"paper");if(Array.isArray(v))v.forEach((function(e){"range"===n.getRefType(e)&&(m=n.getFromId(b,e))&&-1===m._shapeIndices.indexOf(t._index)&&m._shapeIndices.push(t._index)})),u&&[0,1].forEach((function(i){let l=v[i];"range"===n.getRefType(l)?(m=n.getFromId(b,l),g=o.shapePositionToRange(m),y=o.rangeToShapePosition(m),("category"===m.type||"multicategory"===m.type)&&s(a+i+"shift")):g=y=r.identity;let c=a+i,u=e[c];if(e[c]=g(e[c],!0),"pixel"===_?s(c,d[i]):n.coercePosition(t,b,s,l,c,p[i]),t[c]=y(t[c]),e[c]=u,0===i&&"pixel"===_){let r=e[x];e[x]=g(e[x],!0),n.coercePosition(t,b,s,l,x,.25),t[x]=y(t[x]),e[x]=r}}));else{if("range"===n.getRefType(v)?((m=n.getFromId(b,v))._shapeIndices.push(t._index),y=o.rangeToShapePosition(m),g=o.shapePositionToRange(m),u&&("category"===m.type||"multicategory"===m.type)&&(s(a+"0shift"),s(a+"1shift"))):g=y=r.identity,u){let r=a+"0",i=a+"1",o=e[r],l=e[i];e[r]=g(e[r],!0),e[i]=g(e[i],!0),"pixel"===_?(s(r,d[0]),s(i,d[1])):(n.coercePosition(t,b,s,v,r,p[0]),n.coercePosition(t,b,s,v,i,p[1])),t[r]=y(t[r]),t[i]=y(t[i]),e[r]=o,e[i]=l}if("pixel"===_){let r=e[x];e[x]=g(e[x],!0),n.coercePosition(t,b,s,v,x,.25),t[x]=y(t[x]),e[x]=r}}})),u&&r.noneOrAll(e,t,["x0","x1","y0","y1"]);var m,g,y="line"===c;if(u&&(m=s("label.texttemplate"),s("label.texttemplatefallback")),m||(g=s("label.text")),g||m){s("label.textangle");var v=s("label.textposition",y?"middle":"middle center");s("label.xanchor"),s("label.yanchor",function(e,t){return e?"bottom":-1!==t.indexOf("top")?"top":-1!==t.indexOf("bottom")?"bottom":"middle"}(y,v)),s("label.padding"),r.coerceFont(s,"label.font",i.font)}}t.exports=function(e,t){i(e,t,{name:"shapes",handleItemDefaults:s})}}}),Zi=m({"src/components/shapes/draw_newshape/defaults.js"(e,t){var r=W(),n=ct();t.exports=function(e,t,i){if(i("newshape.visible"),i("newshape.name"),i("newshape.showlegend"),i("newshape.legend"),i("newshape.legendwidth"),i("newshape.legendgroup"),i("newshape.legendgrouptitle.text"),n.coerceFont(i,"newshape.legendgrouptitle.font"),i("newshape.legendrank"),i("newshape.drawdirection"),i("newshape.layer"),i("newshape.fillcolor"),i("newshape.fillrule"),i("newshape.opacity"),i("newshape.line.width")){var a=(e||{}).plot_bgcolor||"#FFF";i("newshape.line.color",r.contrast(a)),i("newshape.line.dash")}var o="drawline"===e.dragmode,s=i("newshape.label.text"),l=i("newshape.label.texttemplate");if(i("newshape.label.texttemplatefallback"),s||l){i("newshape.label.textangle");var c=i("newshape.label.textposition",o?"middle":"middle center");i("newshape.label.xanchor"),i("newshape.label.yanchor",function(e,t){return e?"bottom":-1!==t.indexOf("top")?"top":-1!==t.indexOf("bottom")?"bottom":"middle"}(o,c)),i("newshape.label.padding"),n.coerceFont(i,"newshape.label.font",t.font)}i("activeshape.fillcolor"),i("activeshape.opacity")}}}),Yi=m({"src/components/shapes/calc_autorange.js"(e,t){var r=ct(),n=ar(),i=Hr(),a=Gr();function o(e,t,r){let o=t[r+"ref"],s="x"===r?i.paramIsX:i.paramIsY;function l(e,t){"paper"===e||"domain"===n.getRefType(e)||(c[e]||(c[e]=[]),c[e].push(t))}let c={};if("path"===t.type&&t.path){let e=t.path.match(i.segmentRE)||[];for(var u=0,h=0;hr&&(l(o[u],n[r]),u++)}}else l(o[0],t[r+"0"]),l(o[1],t[r+"1"]);let f={};for(let t in c){let r=n.getFromId(e,t);if(r){var p="category"===r.type||"multicategory"===r.type?r.r2c:r.d2c;"date"===r.type&&(p=a.decodeDate(p)),f[r._id]=c[t].map(p)}}return f}function s(e){return c(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function l(e){return c(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function c(e,t,n,o,s,l){var c=e/2,u=l;if("pixel"===t){var h=s?a.extractPathCoords(s,l?i.paramIsY:i.paramIsX):[n,o],f=r.aggNums(Math.max,null,h),p=r.aggNums(Math.min,null,h),d=p<0?Math.abs(p)+c:c,m=f>0?f+c:c;return{ppad:c,ppadplus:u?d:m,ppadminus:u?m:d}}return{ppad:c}}function u(e,t,r){var n,o,s="x"===e._id.charAt(0)?"x":"y",l="category"===e.type||"multicategory"===e.type,c=0,u=0,h=l?e.r2c:e.d2c;if("scaled"===t[s+"sizemode"]?(n=t[s+"0"],o=t[s+"1"],l&&(c=t[s+"0shift"],u=t[s+"1shift"])):(n=t[s+"anchor"],o=t[s+"anchor"]),void 0!==n)return[h(n)+c,h(o)+u];if(t.path){var f,p,d,m,g=1/0,y=-1/0,v=t.path.match(i.segmentRE);for("date"===e.type&&(h=a.decodeDate(h)),f=0;fy&&(y=m));if(y>=g)return[g,y]}}t.exports=function(e){var t=e._fullLayout,a=r.filterVisible(t.shapes);if(a.length&&e._fullData.length)for(var c=0;c{f=n.getFromId(e,t),h._extremes[f._id]=n.findExtremes(f,r,s(h))}))}else"paper"!==h.xref&&"domain"!==d&&(p=u(f=n.getFromId(e,h.xref),h,i.paramIsX))&&(h._extremes[f._id]=n.findExtremes(f,p,s(h)));if("array"===m){let t=o(e,h,"y");Object.entries(t).forEach((([t,r])=>{f=n.getFromId(e,t),h._extremes[f._id]=n.findExtremes(f,r,l(h))}))}else"paper"!==h.yref&&"domain"!==m&&(p=u(f=n.getFromId(e,h.yref),h,i.paramIsY))&&(h._extremes[f._id]=n.findExtremes(f,p,l(h)))}}}}),Xi=m({"src/components/shapes/index.js"(e,t){var r=Yr();t.exports={moduleType:"component",name:"shapes",layoutAttributes:Gi(),supplyLayoutDefaults:Wi(),supplyDrawNewShapeDefaults:Zi(),includeBasePlot:En()("shapes"),calcAutorange:Yi(),draw:r.draw,drawOne:r.drawOne}}}),$i=m({"src/components/images/attributes.js"(e,t){var r=xt(),n=vt().templatedArray;_n(),t.exports=n("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",r.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",r.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}}),Ki=m({"src/components/images/defaults.js"(e,t){var r=ct(),n=ar(),i=Nt(),a=$i();function o(e,t,i){function o(n,i){return r.coerce(e,t,a,n,i)}var s=o("source");if(!o("visible",!!s))return t;o("layer"),o("xanchor"),o("yanchor"),o("sizex"),o("sizey"),o("sizing"),o("opacity");for(var l={_fullLayout:i},c=["x","y"],u=0;u<2;u++){var h=c[u],f=n.coerceRef(e,t,l,h,"paper",void 0);"paper"!==f&&n.getFromId(l,f)._imgIndices.push(t._index),n.coercePosition(t,l,o,f,h,0)}return t}t.exports=function(e,t){i(e,t,{name:"images",handleItemDefaults:o})}}}),Ji=m({"src/components/images/draw.js"(e,t){var r=b(),n=er(),i=ar(),a=_t(),o=Mt();t.exports=function(e){var t,s,l=e._fullLayout,c=[],u={},h=[];for(s=0;s0)&&(o("active"),o("direction"),o("type"),o("showactive"),o("x"),o("y"),r.noneOrAll(e,t,["x","y"]),o("xanchor"),o("yanchor"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),r.coerceFont(o,"font",a.font),o("bgcolor",a.paper_bgcolor),o("bordercolor"),o("borderwidth"))}function l(e,t){function n(n,i){return r.coerce(e,t,o,n,i)}n("visible","skip"===e.method||Array.isArray(e.args))&&(n("method"),n("args"),n("args2"),n("label"),n("execute"))}t.exports=function(e,t){n(e,t,{name:a,handleItemDefaults:s})}}}),ia=m({"src/components/updatemenus/scrollbox.js"(e,t){t.exports=o;var r=b(),n=W(),i=er(),a=ct();function o(e,t,r){this.gd=e,this.container=t,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}o.barWidth=2,o.barLength=20,o.barRadius=2,o.barPad=1,o.barColor="#808BA4",o.prototype.enable=function(e,t,a){var s=this.gd._fullLayout,l=s.width,c=s.height;this.position=e;var u,h,f,p,d=this.position.l,m=this.position.w,g=this.position.t,y=this.position.h,v=this.position.direction,x="down"===v,_="left"===v,b="up"===v,w=m,T=y;!x&&!_&&!("right"===v)&&!b&&(this.position.direction="down",x=!0),x||b?(h=(u=d)+w,x?(f=g,T=(p=Math.min(f+T,c))-f):T=(p=g+T)-(f=Math.max(p-T,0))):(p=(f=g)+T,_?w=(h=d+w)-(u=Math.max(h-w,0)):(u=d,w=(h=Math.min(u+w,l))-u)),this._box={l:u,t:f,w,h:T};var k=m>w,A=o.barLength+2*o.barPad,M=o.barWidth+2*o.barPad,S=d,E=g+y;E+M>c&&(E=c-M);var C=this.container.selectAll("rect.scrollbar-horizontal").data(k?[0]:[]);C.exit().on(".drag",null).remove(),C.enter().append("rect").classed("scrollbar-horizontal",!0).call(n.fill,o.barColor),k?(this.hbar=C.attr({rx:o.barRadius,ry:o.barRadius,x:S,y:E,width:A,height:M}),this._hbarXMin=S+A/2,this._hbarTranslateMax=w-A):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var I=y>T,L=o.barWidth+2*o.barPad,P=o.barLength+2*o.barPad,z=d+m,D=g;z+L>l&&(z=l-L);var O=this.container.selectAll("rect.scrollbar-vertical").data(I?[0]:[]);O.exit().on(".drag",null).remove(),O.enter().append("rect").classed("scrollbar-vertical",!0).call(n.fill,o.barColor),I?(this.vbar=O.attr({rx:o.barRadius,ry:o.barRadius,x:z,y:D,width:L,height:P}),this._vbarYMin=D+P/2,this._vbarTranslateMax=T-P):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var R=this.id,F=u-.5,B=I?h+L+.5:h+.5,j=f-.5,N=k?p+M+.5:p+.5,U=s._topdefs.selectAll("#"+R).data(k||I?[0]:[]);if(U.exit().remove(),U.enter().append("clipPath").attr("id",R).append("rect"),k||I?(this._clipRect=U.select("rect").attr({x:Math.floor(F),y:Math.floor(j),width:Math.ceil(B)-Math.floor(F),height:Math.ceil(N)-Math.floor(j)}),this.container.call(i.setClipUrl,R,this.gd),this.bg.attr({x:d,y:g,width:m,height:y})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),k||I){var V=r.behavior.drag().on("dragstart",(function(){r.event.sourceEvent.preventDefault()})).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(V);var q=r.behavior.drag().on("dragstart",(function(){r.event.sourceEvent.preventDefault(),r.event.sourceEvent.stopPropagation()})).on("drag",this._onBarDrag.bind(this));k&&this.hbar.on(".drag",null).call(q),I&&this.vbar.on(".drag",null).call(q)}this.setTranslate(t,a)},o.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},o.prototype._onBoxDrag=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e-=r.event.dx),this.vbar&&(t-=r.event.dy),this.setTranslate(e,t)},o.prototype._onBoxWheel=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e+=r.event.deltaY),this.vbar&&(t+=r.event.deltaY),this.setTranslate(e,t)},o.prototype._onBarDrag=function(){var e=this.translateX,t=this.translateY;if(this.hbar){var n=e+this._hbarXMin,i=n+this._hbarTranslateMax;e=(a.constrain(r.event.x,n,i)-n)/(i-n)*(this.position.w-this._box.w)}if(this.vbar){var o=t+this._vbarYMin,s=o+this._vbarTranslateMax;t=(a.constrain(r.event.y,o,s)-o)/(s-o)*(this.position.h-this._box.h)}this.setTranslate(e,t)},o.prototype.setTranslate=function(e,t){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(e=a.constrain(e||0,0,r),t=a.constrain(t||0,0,n),this.translateX=e,this.translateY=t,this.container.call(i.setTranslate,this._box.l-this.position.l-e,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+e-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var o=e/r;this.hbar.call(i.setTranslate,e+o*this._hbarTranslateMax,t)}if(this.vbar){var s=t/n;this.vbar.call(i.setTranslate,e,t+s*this._vbarTranslateMax)}}}}),aa=m({"src/components/updatemenus/draw.js"(e,t){var r=b(),n=At(),i=W(),a=er(),o=ct(),s=Et(),l=vt().arrayEditor,c=St().LINE_SPACING,u=ta(),h=ia();function f(e){return e._index}function p(e,t){return+e.attr(u.menuIndexAttrName)===t._index}function d(e,t,r,n,i,a,o,s){t.active=o,l(e.layout,u.name,t).applyUpdate("active",o),"buttons"===t.type?g(e,n,null,null,t):"dropdown"===t.type&&(i.attr(u.menuIndexAttrName,"-1"),m(e,n,i,a,t),s||g(e,n,i,a,t))}function m(e,t,r,n,i){var s=o.ensureSingle(t,"g",u.headerClassName,(function(e){e.style("pointer-events","all")})),l=i._dims,c=i.active,h=i.buttons[c]||u.blankHeaderOpts,f={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},d={width:l.headerWidth,height:l.headerHeight};s.call(y,i,h,e).call(M,i,f,d),o.ensureSingle(t,"text",u.headerArrowClassName,(function(e){e.attr("text-anchor","end").call(a.font,i.font).text(u.arrowSymbol[i.direction])})).attr({x:l.headerWidth-u.arrowOffsetX+i.pad.l,y:l.headerHeight/2+u.textOffsetY+i.pad.t}),s.on("click",(function(){r.call(S,String(p(r,i)?-1:i._index)),g(e,t,r,n,i)})),s.on("mouseover",(function(){s.call(w)})),s.on("mouseout",(function(){s.call(T,i)})),a.setTranslate(t,l.lx,l.ly)}function g(e,t,i,a,s){i||(i=t).attr("pointer-events","all");var l=function(e){return-1==+e.attr(u.menuIndexAttrName)}(i)&&"buttons"!==s.type?[]:s.buttons,c="dropdown"===s.type?u.dropdownButtonClassName:u.buttonClassName,h=i.selectAll("g."+c).data(o.filterVisible(l)),f=h.enter().append("g").classed(c,!0),p=h.exit();"dropdown"===s.type?(f.attr("opacity","0").transition().attr("opacity","1"),p.transition().attr("opacity","0").remove()):p.remove();var m=0,g=0,v=s._dims,x=-1!==["up","down"].indexOf(s.direction);"dropdown"===s.type&&(x?g=v.headerHeight+u.gapButtonHeader:m=v.headerWidth+u.gapButtonHeader),"dropdown"===s.type&&"up"===s.direction&&(g=-u.gapButtonHeader+u.gapButton-v.openHeight),"dropdown"===s.type&&"left"===s.direction&&(m=-u.gapButtonHeader+u.gapButton-v.openWidth);var b={x:v.lx+m+s.pad.l,y:v.ly+g+s.pad.t,yPad:u.gapButton,xPad:u.gapButton,index:0},k={l:b.x+s.borderwidth,t:b.y+s.borderwidth};h.each((function(o,l){var c=r.select(this);c.call(y,s,o,e).call(M,s,b),c.on("click",(function(){r.event.defaultPrevented||(o.execute&&(o.args2&&s.active===l?(d(e,s,0,t,i,a,-1),n.executeAPICommand(e,o.method,o.args2)):(d(e,s,0,t,i,a,l),n.executeAPICommand(e,o.method,o.args))),e.emit("plotly_buttonclicked",{menu:s,button:o,active:s.active}))})),c.on("mouseover",(function(){c.call(w)})),c.on("mouseout",(function(){c.call(T,s),h.call(_,s)}))})),h.call(_,s),x?(k.w=Math.max(v.openWidth,v.headerWidth),k.h=b.y-k.t):(k.w=b.x-k.l,k.h=Math.max(v.openHeight,v.headerHeight)),k.direction=s.direction,a&&(h.size()?function(e,t,r,n,i,a){var o,s,l,c=i.direction,h="up"===c||"down"===c,f=i._dims,p=i.active;if(h)for(s=0,l=0;l0?[0]:[]);if(s.enter().append("g").classed(u.containerClassName,!0).style("cursor","pointer"),s.exit().each((function(){r.select(this).selectAll("g."+u.headerGroupClassName).each(a)})).remove(),0!==i.length){var l=s.selectAll("g."+u.headerGroupClassName).data(i,f);l.enter().append("g").classed(u.headerGroupClassName,!0);for(var c=o.ensureSingle(s,"g",u.dropdownButtonGroupClassName,(function(e){e.style("pointer-events","all")})),y=0;y0&&(l=l.transition().duration(t.transition.duration).ease(t.transition.easing)),l.attr("transform",s(o-.5*u.gripWidth,t._dims.currentValueTotalHeight))}}function E(e,t){var r=e._dims;return r.inputAreaStart+u.stepInset+(r.inputAreaLength-2*u.stepInset)*Math.min(1,Math.max(0,t))}function C(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-u.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*u.stepInset-2*r.inputAreaStart)))}function I(e,t,r){var n=r._dims,s=o.ensureSingle(e,"rect",u.railTouchRectClass,(function(n){n.call(A,t,e,r).style("pointer-events","all")}));s.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,u.tickOffset+r.ticklen+n.labelHeight)}).call(i.fill,r.bgcolor).attr("opacity",0),a.setTranslate(s,0,n.currentValueTotalHeight)}function L(e,t){var r=t._dims,n=r.inputAreaLength-2*u.railInset,s=o.ensureSingle(e,"rect",u.railRectClass);s.attr({width:n,height:u.railWidth,rx:u.railRadius,ry:u.railRadius,"shape-rendering":"crispEdges"}).call(i.stroke,t.bordercolor).call(i.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),a.setTranslate(s,u.railInset,.5*(r.inputAreaWidth-u.railWidth)+r.currentValueTotalHeight)}t.exports=function(e){var t=e._context.staticPlot,i=e._fullLayout,o=function(e,t){for(var r=e[u.name],n=[],i=0;i0?[0]:[]);function l(t){t._commandObserver&&(t._commandObserver.remove(),delete t._commandObserver),n.autoMargin(e,m(t))}if(s.enter().append("g").classed(u.containerClassName,!0).style("cursor",t?null:"ew-resize"),s.exit().each((function(){r.select(this).selectAll("g."+u.groupClassName).each(l)})).remove(),0!==o.length){var c=s.selectAll("g."+u.groupClassName).data(o,g);c.enter().append("g").classed(u.groupClassName,!0),c.exit().each(l).remove();for(var h=0;h0?e.touches[0].clientX:0}function g(e,t,r,n){var i=a.ensureSingle(e,"rect",d.bgClassName,(function(e){e.attr({x:0,y:0,"shape-rendering":"crispEdges"})})),c=n.borderwidth%2==0?n.borderwidth:n.borderwidth-1,u=-n._offsetShift,h=s.crispRound(t,n.borderwidth);i.attr({width:n._width+c,height:n._height+c,transform:o(u,u),"stroke-width":h}).call(l.stroke,n.bordercolor).call(l.fill,n.bgcolor)}function y(e,t,r,n){var i=t._fullLayout;a.ensureSingleById(i._topdefs,"clipPath",n._clipId,(function(e){e.append("rect").attr({x:0,y:0})})).select("rect").attr({width:n._width,height:n._height})}function v(e,t,n,o){var l,c=t.calcdata,f=e.selectAll("g."+d.rangePlotClassName).data(n._subplotsWith,a.identity);f.enter().append("g").attr("class",(function(e){return d.rangePlotClassName+" "+e})).call(s.setClipUrl,o._clipId,t),f.order(),f.exit().remove(),f.each((function(e,a){var s=r.select(this),f=0===a,p=h.getFromId(t,e,"y"),d=p._name,m=o[d],g={data:[],layout:{xaxis:{type:n.type,domain:[0,1],range:o.range.slice(),calendar:n.calendar},width:o._width,height:o._height,margin:{t:0,b:0,l:0,r:0}},_context:t._context};n.rangebreaks&&(g.layout.xaxis.rangebreaks=n.rangebreaks),g.layout[d]={type:p.type,domain:[0,1],range:"match"!==m.rangemode?m.range.slice():p.range.slice(),calendar:p.calendar},p.rangebreaks&&(g.layout[d].rangebreaks=p.rangebreaks),i.supplyDefaults(g);var y=g._fullLayout.xaxis,v=g._fullLayout[d];y.clearCalc(),y.setScale(),v.clearCalc(),v.setScale();var x={id:e,plotgroup:s,xaxis:y,yaxis:v,isRangePlot:!0};f?l=x:(x.mainplot="xy",x.mainplotinfo=l),u.rangePlot(t,x,function(e,t){for(var r=[],n=0;n=n.max)t=B[r+1];else if(e=n.pmax)t=B[r+1];else if(ei._length||v+b<0)return;u=y+b,f=v+b;break;case l:if(_="col-resize",y+b>i._length)return;u=y+b,f=v;break;case c:if(_="col-resize",v+b<0)return;u=y,f=v+b;break;default:_="ew-resize",u=g,f=g+b}if(f0)){var m=function(e,t,r){for(var n=r.filter((function(r){return t[r].anchor===e._id})),i=0,a=0;a1){f||p||d||"independent"===k("pattern")&&(f=!0),g._hasSubplotGrid=f;var x,_,b="top to bottom"===k("roworder"),w=f?.2:.1,T=f?.3:.1;m&&t._splomGridDflt&&(x=t._splomGridDflt.xside,_=t._splomGridDflt.yside),g._domains={x:c("x",k,w,x,v),y:c("y",k,T,_,y,b)}}else delete t.grid}function k(e,t){return r.coerce(n,g,s,e,t)}},contentDefaults:function(e,t){var r=t.grid;if(r&&r._domains){var n,i,a,o,s,c,h,f=e.grid||{},p=t._subplots,d=r._hasSubplotGrid,m=r.rows,g=r.columns,y="independent"===r.pattern,v=r._axisMap={};if(d){var x=f.subplots||[];c=r.subplots=new Array(m);var _=1;for(n=0;n0,h=e._context.staticPlot;t.each((function(t){var f,p=t[0].trace,d=p.error_x||{},m=p.error_y||{};p.ids&&(f=function(e){return e.id});var g=a.hasMarkers(p)&&p.marker.maxdisplayed>0;!m.visible&&!d.visible&&(t=[]);var y=r.select(this).selectAll("g.errorbar").data(t,f);if(y.exit().remove(),t.length){d.visible||y.selectAll("path.xerror").remove(),m.visible||y.selectAll("path.yerror").remove(),y.style("opacity",1);var v=y.enter().append("g").classed("errorbar",!0);u&&v.style("opacity",0).transition().duration(s.duration).style("opacity",1),i.setClipUrl(y,o.layerClipId,e),y.each((function(e){var t=r.select(this),i=function(e,t,r){var i={x:t.c2p(e.x),y:r.c2p(e.y)};return void 0!==e.yh&&(i.yh=r.c2p(e.yh),i.ys=r.c2p(e.ys),n(i.ys)||(i.noYS=!0,i.ys=r.c2p(e.ys,!0))),void 0!==e.xh&&(i.xh=t.c2p(e.xh),i.xs=t.c2p(e.xs),n(i.xs)||(i.noXS=!0,i.xs=t.c2p(e.xs,!0))),i}(e,l,c);if(!g||e.vis){var a,o=t.select("path.yerror");if(m.visible&&n(i.x)&&n(i.yh)&&n(i.ys)){var f=m.width;a="M"+(i.x-f)+","+i.yh+"h"+2*f+"m-"+f+",0V"+i.ys,i.noYS||(a+="m-"+f+",0h"+2*f),o.size()?u&&(o=o.transition().duration(s.duration).ease(s.easing)):o=t.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("yerror",!0),o.attr("d",a)}else o.remove();var p=t.select("path.xerror");if(d.visible&&n(i.y)&&n(i.xh)&&n(i.xs)){var y=(d.copy_ystyle?m:d).width;a="M"+i.xh+","+(i.y-y)+"v"+2*y+"m0,-"+y+"H"+i.xs,i.noXS||(a+="m0,-"+y+"v"+2*y),p.size()?u&&(p=p.transition().duration(s.duration).ease(s.easing)):p=t.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("xerror",!0),p.attr("d",a)}else p.remove()}}))}}))}}}),za=m({"src/components/errorbars/style.js"(e,t){var r=b(),n=W();t.exports=function(e){e.each((function(e){var t=e[0].trace,i=t.error_y||{},a=t.error_x||{},o=r.select(this);o.selectAll("path.yerror").style("stroke-width",i.thickness+"px").call(n.stroke,i.color),a.copy_ystyle&&(a=i),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(n.stroke,a.color)}))}}}),Da=m({"src/components/errorbars/index.js"(e,t){var r=ct(),n=De().overrideAll,i=Ea(),a={error_x:r.extendFlat({},i),error_y:r.extendFlat({},i)};delete a.error_x.copy_zstyle,delete a.error_y.copy_zstyle,delete a.error_y.copy_ystyle;var o={error_x:r.extendFlat({},i),error_y:r.extendFlat({},i),error_z:r.extendFlat({},i)};delete o.error_x.copy_ystyle,delete o.error_y.copy_ystyle,delete o.error_z.copy_ystyle,delete o.error_z.copy_zstyle,t.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:a,bar:a,histogram:a,scatter3d:n(o,"calc","nested"),scattergl:n(a,"calc","nested")}},supplyDefaults:Ca(),calc:La(),makeComputeError:Ia(),plot:Pa(),style:za(),hoverInfo:function(e,t,r){(t.error_y||{}).visible&&(r.yerr=e.yh-e.y,t.error_y.symmetric||(r.yerrneg=e.y-e.ys)),(t.error_x||{}).visible&&(r.xerr=e.xh-e.x,t.error_x.symmetric||(r.xerrneg=e.x-e.xs))}}}}),Oa=m({"src/components/colorbar/constants.js"(e,t){t.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}}}),Ra=m({"src/components/colorbar/draw.js"(e,t){var r=b(),n=F(),i=At(),a=He(),o=ar(),s=pr(),l=ct(),c=l.strTranslate,u=B().extendFlat,h=dr(),f=er(),p=W(),d=tr(),m=Et(),g=Ct().flipScale,y=Ai(),v=Mi(),x=Lt(),_=St(),w=_.LINE_SPACING,T=_.FROM_TL,k=_.FROM_BR,A=Oa().cn;t.exports={draw:function(e){var t=e._fullLayout._infolayer.selectAll("g."+A.colorbar).data(function(e){var t,r,n,i,a=e._fullLayout,o=e.calcdata,s=[];function l(e){return u(e,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function c(){"function"==typeof i.calc?i.calc(e,n,t):(t._fillgradient=r.reversescale?g(r.colorscale):r.colorscale,t._zrange=[r[i.min],r[i.max]])}for(var h=0;h0?n>=l:n<=l));i++)n>u&&n0?n>=l:n<=l));i++)n>r[0]&&n1){var pe=Math.pow(10,Math.floor(Math.log(fe)/Math.LN10));ue*=pe*l.roundUp(fe/pe,[2,5,10]),(Math.abs(W.start)/W.size+1e-6)%1<2e-6&&(le.tick0=0)}le.dtick=ue}le.domain=s?[oe+P/B.h,oe+Q-P/B.h]:[oe+L/B.w,oe+Q-L/B.w],le.setScale(),e.attr("transform",c(Math.round(B.l),Math.round(B.t)));var de,me=e.select("."+A.cbtitleunshift).attr("transform",c(-Math.round(B.l),-Math.round(B.t))),ge=le.ticklabelposition,ye=le.title.font.size,ve=e.select("."+A.cbaxis),xe=0,_e=0;function be(r,n){var i={propContainer:le,propName:t._propPrefix+"title.text",traceIndex:t._traceIndex,_meta:t._meta,placeholder:F._dfltTitle.colorbar,containerGroup:e.select("."+A.cbtitle)},o="h"===r.charAt(0)?r.slice(1):"h"+r;e.selectAll("."+o+",."+o+"-math-group").remove(),d.draw(a,r,u(i,n||{}))}return l.syncOrAsync([i.previousPromises,function(){var e,t;(s&&ce||!s&&!ce)&&("top"===V&&(e=L+B.l+ee*z,t=P+B.t+te*(1-oe-Q)+3+.75*ye),"bottom"===V&&(e=L+B.l+ee*z,t=P+B.t+te*(1-oe)-3-.25*ye),"right"===V&&(t=P+B.t+te*D+3+.75*ye,e=L+B.l+ee*oe),be(le._id+"title",{attributes:{x:e,y:t,"text-anchor":s?"start":"middle"}}))},function(){if(!s&&!ce||s&&ce){var i,u=e.select("."+A.cbtitle),h=u.select("text"),p=[-M/2,M/2],d=u.select(".h"+le._id+"title-math-group").node(),g=15.6;if(h.node()&&(g=parseInt(h.node().style.fontSize,10)*w),d?(i=f.bBox(d),_e=i.width,(xe=i.height)>g&&(p[1]-=(xe-g)/2)):h.node()&&!h.classed(A.jsPlaceholder)&&(i=f.bBox(h.node()),_e=i.width,xe=i.height),s){if(xe){if(xe+=5,"top"===V)le.domain[1]-=xe/B.h,p[1]*=-1;else{le.domain[0]+=xe/B.h;var y=m.lineCount(h);p[1]+=(1-y)*g}u.attr("transform",c(p[0],p[1])),le.setScale()}}else _e&&("right"===V&&(le.domain[0]+=(_e+ye/2)/B.w),u.attr("transform",c(p[0],p[1])),le.setScale())}e.selectAll("."+A.cbfills+",."+A.cblines).attr("transform",s?c(0,Math.round(B.h*(1-le.domain[1]))):c(Math.round(B.w*le.domain[0]),0)),ve.attr("transform",s?c(0,Math.round(-B.t)):c(Math.round(-B.l),0));var v=e.select("."+A.cbfills).selectAll("rect."+A.cbfill).attr("style","").data(Y);v.enter().append("rect").classed(A.cbfill,!0).attr("style",""),v.exit().remove();var x=q.map(le.c2p).map(Math.round).sort((function(e,t){return e-t}));v.each((function(e,i){var o=[0===i?q[0]:(Y[i]+Y[i-1])/2,i===Y.length-1?q[1]:(Y[i]+Y[i+1])/2].map(le.c2p).map(Math.round);s&&(o[1]=l.constrain(o[1]+(o[1]>o[0])?1:-1,x[0],x[1]));var c=r.select(this).attr(s?"x":"y",re).attr(s?"y":"x",r.min(o)).attr(s?"width":"height",Math.max($,2)).attr(s?"height":"width",Math.max(r.max(o)-r.min(o),2));if(t._fillgradient)f.gradient(c,a,t._id,s?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var u=G(e).replace("e-","");c.attr("fill",n(u).toHexString())}}));var _=e.select("."+A.cblines).selectAll("path."+A.cbline).data(N.color&&N.width?X:[]);_.enter().append("path").classed(A.cbline,!0),_.exit().remove(),_.each((function(e){var t=re,n=Math.round(le.c2p(e))+N.width/2%1;r.select(this).attr("d","M"+(s?t+","+n:n+","+t)+(s?"h":"v")+$).call(f.lineGroupStyle,N.width,H(e),N.dash)})),ve.selectAll("g."+le._id+"tick,path").remove();var b=re+$+(M||0)/2-("outside"===t.ticks?1:0),T=o.calcTicks(le),k=o.getTickSigns(le)[2];return o.drawTicks(a,le,{vals:"inside"===le.ticks?o.clipEnds(le,T):T,layer:ve,path:o.makeTickPath(le,b,k),transFn:o.makeTransTickFn(le)}),o.drawLabels(a,le,{vals:T,layer:ve,transFn:o.makeTransTickLabelFn(le),labelFns:o.makeLabelFns(le,b)})},function(){if(s&&!ce||!s&&ce){var e,n,i=le.position||0,o=le._offset+le._length/2;if("right"===V)n=o,e=B.l+ee*i+10+ye*(le.showticklabels?1:.5);else if(e=o,"bottom"===V&&(n=B.t+te*i+10+(-1===ge.indexOf("inside")?le.tickfont.size:0)+("inside"!==le.ticks&&t.ticklen||0)),"top"===V){var l=U.text.split("
").length;n=B.t+te*i+10-$-w*ye*l}be((s?"h":"v")+le._id+"title",{avoid:{selection:r.select(a).selectAll("g."+le._id+"tick"),side:V,offsetTop:s?0:B.t,offsetLeft:s?B.l:0,maxShift:s?F.width:F.height},attributes:{x:e,y:n,"text-anchor":"middle"},transform:{rotate:s?-90:0,offset:0}})}},i.previousPromises,function(){var r,o=$+M/2;-1===ge.indexOf("inside")&&(r=f.bBox(ve.node()),o+=s?r.width:r.height),de=me.select("text");var l=0,u=s&&"top"===V,d=!s&&"right"===V,m=0;if(de.node()&&!de.classed(A.jsPlaceholder)){var y,v=me.select(".h"+le._id+"title-math-group").node();v&&(s&&ce||!s&&!ce)?(l=(r=f.bBox(v)).width,y=r.height):(l=(r=f.bBox(me.node())).right-B.l-(s?re:se),y=r.bottom-B.t-(s?se:re),!s&&"top"===V&&(o+=r.height,m=r.height)),d&&(de.attr("transform",c(l/2+ye/2,0)),l*=2),o=Math.max(o,s?l:y)}var x=2*(s?L:P)+o+S+M/2,w=0;!s&&U.text&&"bottom"===I&&D<=0&&(x+=w=x/2,m+=w),F._hColorbarMoveTitle=w,F._hColorbarMoveCBTitle=m;var j=S+M,N=(s?re:se)-j/2-(s?L:0),q=(s?se:re)-(s?J:P+m-w);e.select("."+A.cbbg).attr("x",N).attr("y",q).attr(s?"width":"height",Math.max(x-w,2)).attr(s?"height":"width",Math.max(J+j,2)).call(p.fill,E).call(p.stroke,t.bordercolor).style("stroke-width",S);var H=d?Math.max(l-10,0):0;e.selectAll("."+A.cboutline).attr("x",(s?re:se+L)+H).attr("y",(s?se+P-J:re)+(u?xe:0)).attr(s?"width":"height",Math.max($,2)).attr(s?"height":"width",Math.max(J-(s?2*P+xe:2*L+H),2)).call(p.stroke,t.outlinecolor).style({fill:"none","stroke-width":M});var G=s?ne*x:0,W=s?0:(1-ie)*x-m;if(G=R?B.l-G:-G,W=O?B.t-W:-W,e.attr("transform",c(G,W)),!s&&(S||n(E).getAlpha()&&!n.equals(F.paper_bgcolor,E))){var Z=ve.selectAll("text"),Y=Z[0].length,X=e.select("."+A.cbbg).node(),K=f.bBox(X),Q=f.getTranslate(e);Z.each((function(e,t){var r=Y-1;if(0===t||t===r){var n,i=f.bBox(this),a=f.getTranslate(this);if(t===r){var o=i.right+a.x;(n=K.right+Q.x+se-S-2+z-o)>0&&(n=0)}else if(0===t){var s=i.left+a.x;(n=K.left+Q.x+se+S+2-s)<0&&(n=0)}n&&(Y<3?this.setAttribute("transform","translate("+n+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}}))}var ee={},te=T[C],ae=k[C],oe=T[I],ue=k[I],he=x-$;s?("pixels"===g?(ee.y=D,ee.t=J*oe,ee.b=J*ue):(ee.t=ee.b=0,ee.yt=D+h*oe,ee.yb=D-h*ue),"pixels"===b?(ee.x=z,ee.l=x*te,ee.r=x*ae):(ee.l=he*te,ee.r=he*ae,ee.xl=z-_*te,ee.xr=z+_*ae)):("pixels"===g?(ee.x=z,ee.l=J*te,ee.r=J*ae):(ee.l=ee.r=0,ee.xl=z+h*te,ee.xr=z-h*ae),"pixels"===b?(ee.y=1-D,ee.t=x*oe,ee.b=x*ue):(ee.t=he*oe,ee.b=he*ue,ee.yt=D-_*oe,ee.yb=D+_*ue));var fe=t.y<.5?"b":"t",pe=t.x<.5?"l":"r";a._fullLayout._reservedMargin[t._id]={};var _e={r:F.width-N-G,l:N+ee.r,b:F.height-q-W,t:q+ee.b};R&&O?i.autoMargin(a,t._id,ee):R?a._fullLayout._reservedMargin[t._id][fe]=_e[fe]:O||s?a._fullLayout._reservedMargin[t._id][pe]=_e[pe]:a._fullLayout._reservedMargin[t._id][fe]=_e[fe]}],a)}(g,t,e);_&&_.then&&(e._promises||[]).push(_),e._context.edits.colorbarPosition&&function(e,t,r){var n,i,o,l="v"===t.orientation,u=r._fullLayout._size;s.init({element:e.node(),gd:r,prepFn:function(){n=e.attr("transform"),h(e)},moveFn:function(r,a){e.attr("transform",n+c(r,a)),i=s.align((l?t._uFrac:t._vFrac)+r/u.w,l?t._thickFrac:t._lenFrac,0,1,t.xanchor),o=s.align((l?t._vFrac:1-t._uFrac)-a/u.h,l?t._lenFrac:t._thickFrac,0,1,t.yanchor);var f=s.getCursor(i,o,t.xanchor,t.yanchor);h(e,f)},doneFn:function(){if(h(e),void 0!==i&&void 0!==o){var n={};n[t._propPrefix+"x"]=i,n[t._propPrefix+"y"]=o,void 0!==t._traceIndex?a.call("_guiRestyle",r,n,t._traceIndex):a.call("_guiRelayout",r,n)}}})}(g,t,e)})),t.exit().each((function(t){i.autoMargin(e,t._id)})).remove(),t.order()}}}}),Fa=m({"src/components/colorbar/index.js"(e,t){t.exports={moduleType:"component",name:"colorbar",attributes:Pt(),supplyDefaults:qt(),draw:Ra().draw,hasColorbar:Ot()}}}),Ba=m({"src/components/legend/index.js"(e,t){t.exports={moduleType:"component",name:"legend",layoutAttributes:gr(),supplyLayoutDefaults:vr(),draw:Mr(),style:Ar()}}}),ja=m({"src/locale-en.js"(e,t){t.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}}}),Na=m({"src/locale-en-us.js"(e,t){t.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}}}),Ua=m({"src/snapshot/cloneplot.js"(e,t){var r=He(),n=ct(),i=n.extendFlat,a=n.extendDeep;function o(e){var t;switch(e){case"themes__thumb":t={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":t={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:t={}}return t}t.exports=function(e,t){var n,s,l=e.data,c=e.layout,u=a([],l),h=a({},c,o(t.tileClass)),f=e._context||{};if(t.width&&(h.width=t.width),t.height&&(h.height=t.height),"thumbnail"===t.tileClass||"themes__thumb"===t.tileClass){h.annotations=[];var p=Object.keys(h);for(n=0;n-1&&(h[p[n]].title={text:""});for(n=0;n=0)return e}else if("string"==typeof e&&"%"===(e=e.trim()).slice(-1)&&r(e.slice(0,-1))&&(e=+e.slice(0,-1))>=0)return e+"%"}function p(e,t,r,i,a,o){var s=!1!==(o=o||{}).moduleHasSelected,l=!1!==o.moduleHasUnselected,c=!1!==o.moduleHasConstrain,u=!1!==o.moduleHasCliponaxis,f=!1!==o.moduleHasTextangle,p=!1!==o.moduleHasInsideanchor,d=!!o.hasPathbar,m=Array.isArray(a)||"auto"===a,g=m||"inside"===a,y=m||"outside"===a;if(g||y){var v=h(i,"textfont",r.font),x=n.extendFlat({},v),_=!(e.textfont&&e.textfont.color);if(_&&delete x.color,h(i,"insidetextfont",x),d){var b=n.extendFlat({},v);_&&delete b.color,h(i,"pathbar.textfont",b)}y&&h(i,"outsidetextfont",v),s&&i("selected.textfont.color"),l&&i("unselected.textfont.color"),c&&i("constraintext"),u&&i("cliponaxis"),f&&i("textangle"),i("texttemplate"),i("texttemplatefallback")}g&&p&&i("insidetextanchor")}t.exports={supplyDefaults:function(e,t,r,c){function h(r,i){return n.coerce(e,t,u,r,i)}if(o(e,t,c,h)){s(e,t,c,h),h("xhoverformat"),h("yhoverformat"),h("zorder"),h("orientation",t.x&&!t.y?"h":"v"),h("base"),h("offset"),h("width"),h("text"),h("hovertext"),h("hovertemplate"),h("hovertemplatefallback");var f=h("textposition");p(e,0,c,h,f,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),l(e,t,h,r,c);var d=(t.marker.line||{}).color,m=a.getComponentMethod("errorbars","supplyDefaults");m(e,t,d||i.defaultLine,{axis:"y"}),m(e,t,d||i.defaultLine,{axis:"x",inherit:"y"}),n.coerceSelectionMarkerOpacity(t,h)}else t.visible=!1},crossTraceDefaults:function(e,t){var r,i;function a(e,t){return n.coerce(i._input,i,u,e,t)}for(var o=0;o0&&!f[y]&&(h=!0),f[y]=!0),g.visible&&"histogram"===g.type&&"category"!==n.getFromId({_fullLayout:t},g["v"===g.orientation?"xaxis":"yaxis"]).type&&(u=!0)}}if(c){"overlay"!==p&&l("barnorm"),l("bargap",u&&!h?0:.2),l("bargroupgap");var v=l("barcornerradius");t.barcornerradius=o(v)}else delete t.barmode}}}),Ka=m({"src/traces/bar/arrays_to_calcdata.js"(e,t){var r=ct();t.exports=function(e,t){for(var n=0;na))return r}return void 0!==n?n:e.dflt},e.coerceColor=function(e,t,n){return r(t).isValid()?t:void 0!==n?n:e.dflt},e.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),-1!==e.values.indexOf(t)?t:void 0!==r?r:e.dflt},e.getValue=function(e,t){var r;return n(e)?t1||0===i.bargap&&0===i.bargroupgap&&!e[0].trace.marker.line.width)&&r.select(this).attr("shape-rendering","crispEdges")})),t.selectAll("g.points").each((function(t){p(r.select(this),t[0].trace,e)})),o.getComponentMethod("errorbars","style")(t)},styleTextPoints:d,styleOnSelect:function(e,t,n){var s=t[0].trace;s.selectedpoints?function(e,t,n){i.selectedPointStyle(e.selectAll("path"),t),function(e,t,n){e.each((function(e){var o,s=r.select(this);if(e.selected){o=a.ensureUniformFontSize(n,m(s,e,t,n));var l=t.selected.textfont&&t.selected.textfont.color;l&&(o.color=l),i.font(s,o)}else i.selectedTextStyle(s,t)}))}(e.selectAll("text"),t,n)}(n,s,e):(p(n,s,e),o.getComponentMethod("errorbars","style")(n))},getInsideTextFont:y,getOutsideTextFont:v,getBarColor:_,resizeText:s}}}),ro=m({"src/traces/bar/plot.js"(e,t){var r=b(),n=M(),i=ct(),a=Et(),o=W(),s=er(),l=He(),c=ar().tickText,u=Qa(),h=u.recordMinTextSize,f=u.clearMinTextSize,p=to(),d=eo(),m=ci(),g=Wa(),y=g.text,v=g.textposition,x=Kt().appendArrayPointValue,_=m.TEXTPAD;function w(e){return e.id}function T(e){return(e>0)-(e<0)}function k(e,t){return e0}function E(e,t,r,n,i){return!(e<0||t<0)&&(r<=e&&n<=t||r<=t&&n<=e||(i?e>=r*(t/n):t>=n*(e/r)))}function C(e){return"auto"===e?0:e}function I(e,t){var r=Math.PI/180*t,n=Math.abs(Math.sin(r)),i=Math.abs(Math.cos(r));return{x:e.width*i+e.height*n,y:e.width*n+e.height*i}}function L(e,t,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,c=a.anchor,u="end"===c,h="start"===c,f=((a.leftToRight||0)+1)/2,p=1-f,d=a.hasB,m=a.r,g=a.overhead,y=i.width,v=i.height,x=Math.abs(t-e),b=Math.abs(n-r),w=x>2*_&&b>2*_?_:0;x-=2*w,b-=2*w;var T=C(l);"auto"===l&&!(y<=x&&v<=b)&&(y>x||v>b)&&(!(y>b||v>x)||y_){var E=function(e,t,r,n,i,a,o,s,l){var c,u,h,f,p=Math.max(0,Math.abs(t-e)-2*_),d=Math.max(0,Math.abs(n-r)-2*_),m=a-_,g=o?m-Math.sqrt(m*m-(m-o)*(m-o)):m,y=l?2*m:s?m-o:2*g,v=l?2*m:s?2*g:m-o;return i.y/i.x>=d/(p-y)?f=d/i.y:i.y/i.x<=(d-v)/p?f=p/i.x:!l&&s?(c=i.x*i.x+i.y*i.y/4,h=(p-m)*(p-m)+(d/2-m)*(d/2-m)-m*m,f=(-(u=-2*i.x*(p-m)-i.y*(d/2-m))+Math.sqrt(u*u-4*c*h))/(2*c)):l?(c=(i.x*i.x+i.y*i.y)/4,h=(p/2-m)*(p/2-m)+(d/2-m)*(d/2-m)-m*m,f=(-(u=-i.x*(p/2-m)-i.y*(d/2-m))+Math.sqrt(u*u-4*c*h))/(2*c)):(c=i.x*i.x/4+i.y*i.y,h=(p/2-m)*(p/2-m)+(d-m)*(d-m)-m*m,f=(-(u=-i.x*(p/2-m)-2*i.y*(d-m))+Math.sqrt(u*u-4*c*h))/(2*c)),{scale:f=Math.min(1,f),pad:s?Math.max(0,m-Math.sqrt(Math.max(0,m*m-(m-(d-i.y*f)/2)*(m-(d-i.y*f)/2)))-o):Math.max(0,m-Math.sqrt(Math.max(0,m*m-(m-(p-i.x*f)/2)*(m-(p-i.x*f)/2)))-o)}}(e,t,r,n,S,m,g,o,d);A=E.scale,M=E.pad}else A=1,s&&(A=Math.min(1,x/S.x,b/S.y)),M=0;var L=i.left*p+i.right*f,P=(i.top+i.bottom)/2,z=(e+_)*p+(t-_)*f,D=(r+n)/2,O=0,R=0;if(h||u){var F=(o?S.x:S.y)/2;m&&(u||d)&&(w+=M);var B=o?k(e,t):k(r,n);o?h?(z=e+B*w,O=-B*F):(z=t-B*w,O=B*F):h?(D=r+B*w,R=-B*F):(D=n-B*w,R=B*F)}return{textX:L,textY:P,targetX:z,targetY:D,anchorX:O,anchorY:R,scale:A,rotate:T}}t.exports={plot:function(e,t,u,m,g,b){var M=t.xaxis,P=t.yaxis,z=e._fullLayout,D=e._context.staticPlot;g||(g={mode:z.barmode,norm:z.barmode,gap:z.bargap,groupgap:z.bargroupgap},f("bar",z));var O=i.makeTraceGroups(m,u,"trace bars").each((function(l){var u=r.select(this),f=l[0].trace,m=l[0].t,O="waterfall"===f.type,R="funnel"===f.type,F="histogram"===f.type,B="bar"===f.type,j=B||R,N=0;O&&f.connector.visible&&"between"===f.connector.mode&&(N=f.connector.line.width/2);var U="h"===f.orientation,V=S(g),q=i.ensureSingle(u,"g","points"),H=function(e){if(e.ids)return w}(f),G=q.selectAll("g.point").data(i.identity,H);G.enter().append("g").classed("point",!0),G.exit().remove(),G.each((function(u,w){var S,O,R=r.select(this),q=function(e,t,r,n){var i=[],a=[],o=n?t:r,s=n?r:t;return i[0]=o.c2p(e.s0,!0),a[0]=s.c2p(e.p0,!0),i[1]=o.c2p(e.s1,!0),a[1]=s.c2p(e.p1,!0),n?[i,a]:[a,i]}(u,M,P,U),H=q[0][0],G=q[0][1],W=q[1][0],Z=q[1][1],Y=0==(U?G-H:Z-W);if(Y&&j&&d.getLineWidth(f,u)&&(Y=!1),Y||(Y=!(n(H)&&n(G)&&n(W)&&n(Z))),u.isBlank=Y,Y&&(U?G=H:Z=W),N&&!Y&&(U?(H-=k(H,G)*N,G+=k(H,G)*N):(W-=k(W,Z)*N,Z+=k(W,Z)*N)),"waterfall"===f.type){if(!Y){var X=f[u.dir].marker;S=X.line.width,O=X.color}}else S=d.getLineWidth(f,u),O=u.mc||f.marker.color;function $(e){var t=r.round(S/2%1,2);return 0===g.gap&&0===g.groupgap?r.round(Math.round(e)-t,2):e}var K=o.opacity(O)<1||S>.01?$:function(e,t,r){return r&&e===t?e:Math.abs(e-t)>=2?$(e):e>t?Math.ceil(e):Math.floor(e)};e._context.staticPlot||(H=K(H,G,U),G=K(G,H,U),W=K(W,Z,!U),Z=K(Z,W,!U));var J,Q=U?M.c2p:P.c2p;J=u.s0>0?u._sMax:u.s0<0?u._sMin:u.s1>0?u._sMax:u._sMin;var ee,te,re=B||F?function(e,t){if(!e)return 0;var r,n=Math.abs(U?Z-W:G-H),i=Math.abs(U?G-H:Z-W),a=K(Math.abs(Q(J,!0)-Q(0,!0))),o=u.hasB?Math.min(n/2,i/2):Math.min(n/2,a);return r="%"===t?n*(Math.min(50,e)/100):e,K(Math.max(Math.min(r,o),0))}(m.cornerradiusvalue,m.cornerradiusform):0,ne="M"+H+","+W+"V"+Z+"H"+G+"V"+W+"Z",ie=0;if(re&&u.s){var ae=0===T(u.s0)||T(u.s)===T(u.s0)?u.s1:u.s0;if((ie=K(u.hasB?0:Math.abs(Q(J,!0)-Q(ae,!0))))0?Math.sqrt(ie*(2*re-ie)):0,he=oe>0?Math.max:Math.min;ee="M"+H+","+W+"V"+(Z-ce*se)+"H"+he(G-(re-ie)*oe,H)+"A "+re+","+re+" 0 0 "+le+" "+G+","+(Z-re*se-ue)+"V"+(W+re*se+ue)+"A "+re+","+re+" 0 0 "+le+" "+he(G-(re-ie)*oe,H)+","+(W+ce*se)+"Z"}else if(u.hasB)ee="M"+(H+re*oe)+","+W+"A "+re+","+re+" 0 0 "+le+" "+H+","+(W+re*se)+"V"+(Z-re*se)+"A "+re+","+re+" 0 0 "+le+" "+(H+re*oe)+","+Z+"H"+(G-re*oe)+"A "+re+","+re+" 0 0 "+le+" "+G+","+(Z-re*se)+"V"+(W+re*se)+"A "+re+","+re+" 0 0 "+le+" "+(G-re*oe)+","+W+"Z";else{var fe=(te=Math.abs(Z-W)+ie)0?Math.sqrt(ie*(2*re-ie)):0,de=se>0?Math.max:Math.min;ee="M"+(H+fe*oe)+","+W+"V"+de(Z-(re-ie)*se,W)+"A "+re+","+re+" 0 0 "+le+" "+(H+re*oe-pe)+","+Z+"H"+(G-re*oe+pe)+"A "+re+","+re+" 0 0 "+le+" "+(G-fe*oe)+","+de(Z-(re-ie)*se,W)+"V"+W+"Z"}}else ee=ne}else ee=ne;var me=A(i.ensureSingle(R,"path"),z,g,b);if(me.style("vector-effect",D?"none":"non-scaling-stroke").attr("d",isNaN((G-H)*(Z-W))||Y&&e._context.staticPlot?"M0,0Z":ee).call(s.setClipUrl,t.layerClipId,e),!z.uniformtext.mode&&V){var ge=s.makePointStyleFns(f);s.singlePointStyle(u,me,f,ge,e)}(function(e,t,r,n,o,l,u,f,m,g,b,w,T){var M,S=t.xaxis,P=t.yaxis,z=e._fullLayout;function D(t,r,n){return i.ensureSingle(t,"text").text(r).attr({class:"bartext bartext-"+M,"text-anchor":"middle","data-notex":1}).call(s.font,n).call(a.convertToTspans,e)}var O=n[0].trace,R="h"===O.orientation,F=function(e,t,r,n,a){var o,s=t[0].trace;return o=s.texttemplate?function(e,t,r,n,a){var o=t[0].trace,s=i.castOption(o,r,"texttemplate");if(!s)return"";var l,u,h,f,p="histogram"===o.type,d="waterfall"===o.type,m="funnel"===o.type,g="h"===o.orientation;function y(e){return c(f,f.c2l(e),!0).text}g?(l="y",u=a,h="x",f=n):(l="x",u=n,h="y",f=a);var v=t[r],_={};_.label=v.p,_.labelLabel=_[l+"Label"]=function(e){return c(u,u.c2l(e),!0).text}(v.p);var b=i.castOption(o,v.i,"text");(0===b||b)&&(_.text=b),_.value=v.s,_.valueLabel=_[h+"Label"]=y(v.s);var w={};x(w,o,v.i),(p||void 0===w.x)&&(w.x=g?_.value:_.label),(p||void 0===w.y)&&(w.y=g?_.label:_.value),(p||void 0===w.xLabel)&&(w.xLabel=g?_.valueLabel:_.labelLabel),(p||void 0===w.yLabel)&&(w.yLabel=g?_.labelLabel:_.valueLabel),d&&(_.delta=+v.rawS||v.s,_.deltaLabel=y(_.delta),_.final=v.v,_.finalLabel=y(_.final),_.initial=_.final-_.delta,_.initialLabel=y(_.initial)),m&&(_.value=v.s,_.valueLabel=y(_.value),_.percentInitial=v.begR,_.percentInitialLabel=i.formatPercent(v.begR),_.percentPrevious=v.difR,_.percentPreviousLabel=i.formatPercent(v.difR),_.percentTotal=v.sumR,_.percenTotalLabel=i.formatPercent(v.sumR));var T=i.castOption(o,v.i,"customdata");return T&&(_.customdata=T),i.texttemplateString({data:[w,_,o._meta],fallback:o.texttemplatefallback,labels:_,locale:e._d3locale,template:s})}(e,t,r,n,a):s.textinfo?function(e,t,r,n){var a=e[0].trace,o="h"===a.orientation,s="waterfall"===a.type,l="funnel"===a.type;function u(e){return c(o?r:n,+e,!0).text}var h,f=a.textinfo,p=e[t],d=f.split("+"),m=[],g=function(e){return-1!==d.indexOf(e)};if(g("label")&&m.push(function(e){return c(o?n:r,e,!0).text}(e[t].p)),g("text")&&(0===(h=i.castOption(a,p.i,"text"))||h)&&m.push(h),s){var y=+p.rawS||p.s,v=p.v,x=v-y;g("initial")&&m.push(u(x)),g("delta")&&m.push(u(y)),g("final")&&m.push(u(v))}if(l){g("value")&&m.push(u(p.s));var _=0;g("percent initial")&&_++,g("percent previous")&&_++,g("percent total")&&_++;var b=_>1;g("percent initial")&&(h=i.formatPercent(p.begR),b&&(h+=" of initial"),m.push(h)),g("percent previous")&&(h=i.formatPercent(p.difR),b&&(h+=" of previous"),m.push(h)),g("percent total")&&(h=i.formatPercent(p.sumR),b&&(h+=" of total"),m.push(h))}return m.join("
")}(t,r,n,a):d.getValue(s.text,r),d.coerceString(y,o)}(z,n,o,S,P);M=function(e,t){var r=d.getValue(e.textposition,t);return d.coerceEnumerated(v,r)}(O,o);var B="stack"===w.mode||"relative"===w.mode,j=n[o],N=!B||j._outmost,U=j.hasB,V=g&&g-b>_;if(F&&"none"!==M&&(!j.isBlank&&l!==u&&f!==m||"auto"!==M&&"inside"!==M)){var q=z.font,H=p.getBarColor(n[o],O),G=p.getInsideTextFont(O,o,q,H),W=p.getOutsideTextFont(O,o,q),Z=O.insidetextanchor||"end",Y=r.datum();R?"log"===S.type&&Y.s0<=0&&(l=S.range[0]0&&J>0;ie=V?U?E(re-2*g,ne,K,J,R)||E(re,ne-2*g,K,J,R):R?E(re-(g-b),ne,K,J,R)||E(re,ne-2*(g-b),K,J,R):E(re,ne-(g-b),K,J,R)||E(re-2*(g-b),ne,K,J,R):E(re,ne,K,J,R),ae&&ie?M="inside":(M="outside",X.remove(),X=null)}else M="inside";if(!X){var oe=(X=D(r,F,Q=i.ensureUniformFontSize(e,"outside"===M?W:G))).attr("transform");if(X.attr("transform",""),K=($=s.bBox(X.node())).width,J=$.height,X.attr("transform",oe),K<=0||J<=0)return void X.remove()}var se,le=O.textangle;"outside"===M?se=function(e,t,r,n,i,a){var o,s=!!a.isHorizontal,l=!!a.constrained,c=a.angle||0,u=i.width,h=i.height,f=Math.abs(t-e),p=Math.abs(n-r);o=s?p>2*_?_:0:f>2*_?_:0;var d=1;l&&(d=s?Math.min(1,p/h):Math.min(1,f/u));var m=C(c),g=I(i,m),y=(s?g.x:g.y)/2,v=(i.left+i.right)/2,x=(i.top+i.bottom)/2,b=(e+t)/2,w=(r+n)/2,T=0,A=0,M=s?k(t,e):k(r,n);return s?(b=t-M*o,T=M*y):(w=n+M*o,A=-M*y),{textX:v,textY:x,targetX:b,targetY:w,anchorX:T,anchorY:A,scale:d,rotate:m}}(l,u,f,m,$,{isHorizontal:R,constrained:"both"===O.constraintext||"outside"===O.constraintext,angle:le}):se=L(l,u,f,m,$,{isHorizontal:R,constrained:"both"===O.constraintext||"inside"===O.constraintext,angle:le,anchor:Z,hasB:U,r:g,overhead:b}),se.fontSize=Q.size,h("histogram"===O.type?"bar":O.type,se,z),j.transform=se;var ce=A(X,z,w,T);i.setTransormAndDisplay(ce,se)}else r.select("text").remove()})(e,t,R,l,w,H,G,W,Z,re,ie,g,b),t.layerClipId&&s.hideOutsideRangePoint(u,R.select("text"),M,P,f.xcalendar,f.ycalendar)}));var W=!1===f.cliponaxis;s.setClipUrl(u,W?null:t.layerClipId,e)}));l.getComponentMethod("errorbars","plot")(e,O,t,g)},toMoveInsideBar:L}}}),no=m({"src/traces/bar/hover.js"(e,t){var r=Or(),n=He(),i=W(),a=ct().fillText,o=eo().getLineWidth,s=ar().hoverLabelText,l=S().BADNUM;function c(e,t,n,i,o){var c,u,h,f,p,d,m,g=e.cd,y=g[0].trace,v=g[0].t,x="closest"===i,_="waterfall"===y.type,b=e.maxHoverDistance,w=e.maxSpikeDistance;"h"===y.orientation?(c=n,u=t,h="y",f="x",p=D,d=P):(c=t,u=n,h="x",f="y",d=D,p=P);var T=y[h+"period"],k=x||T;function A(e){return S(e,-1)}function M(e){return S(e,1)}function S(e,t){var r=e.w;return e[h]+t*r/2}function E(e){return e[h+"End"]-e[h+"Start"]}var C=x?A:T?function(e){return e.p-E(e)/2}:function(e){return Math.min(A(e),e.p-v.bardelta/2)},I=x?M:T?function(e){return e.p+E(e)/2}:function(e){return Math.max(M(e),e.p+v.bardelta/2)};function L(e,t,n){return o.finiteRange&&(n=0),r.inbox(e-c,t-c,n+Math.min(1,Math.abs(t-e)/m)-1)}function P(e){return L(C(e),I(e),b)}function z(e){var t=e[f];if(_){var r=Math.abs(e.rawS)||0;u>0?t+=r:u<0&&(t-=r)}return t}function D(e){var t=u,n=e.b,i=z(e);return r.inbox(n-t,i-t,b+(i-t)/(i-n)-1)}var O=e[h+"a"],R=e[f+"a"];m=Math.abs(O.r2c(O.range[1])-O.r2c(O.range[0]));var F,B,j,N,U=r.getDistanceFunction(i,p,d,(function(e){return(p(e)+d(e))/2}));if(r.getClosest(g,U,e),!1!==e.index&&g[e.index].p!==l){k||(C=function(e){return Math.min(A(e),e.p-v.bargroupwidth/2)},I=function(e){return Math.max(M(e),e.p+v.bargroupwidth/2)});var V=g[e.index],q=y.base?V.b+V.s:V.s;e[f+"0"]=e[f+"1"]=R.c2p(V[f],!0),e[f+"LabelVal"]=q;var H=v.extents[v.extents.round(V.p)];e[h+"0"]=O.c2p(x?C(V):H[0],!0),e[h+"1"]=O.c2p(x?I(V):H[1],!0);var G=void 0!==V.orig_p;return e[h+"LabelVal"]=G?V.orig_p:V.p,e.labelLabel=s(O,e[h+"LabelVal"],y[h+"hoverformat"]),e.valueLabel=s(R,e[f+"LabelVal"],y[f+"hoverformat"]),e.baseLabel=s(R,V.b,y[f+"hoverformat"]),e.spikeDistance=(B=u,j=(F=V).b,N=z(F),(r.inbox(j-B,N-B,w+(N-B)/(N-j)-1)+function(e){return L(A(e),M(e),w)}(V))/2),e[h+"Spike"]=O.c2p(V.p,!0),a(V,y,e),e.hovertemplate=y.hovertemplate,e}}function u(e,t){var r=t.mcc||e.marker.color,n=t.mlcc||e.marker.line.color,a=o(e,t);return i.opacity(r)?r:i.opacity(n)&&a?n:void 0}t.exports={hoverPoints:function(e,t,r,i,a){var o=c(e,t,r,i,a);if(o){var s=o.cd,l=s[0].trace,h=s[o.index];return o.color=u(l,h),n.getComponentMethod("errorbars","hoverInfo")(h,l,o),[o]}},hoverOnBars:c,getTraceColor:u}}}),io=m({"src/traces/bar/event_data.js"(e,t){t.exports=function(e,t,r){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),"h"===r.orientation?(e.label=e.y,e.value=e.x):(e.label=e.x,e.value=e.y),e}}}),ao=m({"src/traces/bar/select.js"(e,t){function r(e,t,r,n,i){var a=t.c2p(n?e.s0:e.p0,!0),o=t.c2p(n?e.s1:e.p1,!0),s=r.c2p(n?e.p0:e.s0,!0),l=r.c2p(n?e.p1:e.s1,!0);return i?[(a+o)/2,(s+l)/2]:n?[o,(s+l)/2]:[(a+o)/2,l]}t.exports=function(e,t){var n,i=e.cd,a=e.xaxis,o=e.yaxis,s=i[0].trace,l="funnel"===s.type,c="h"===s.orientation,u=[];if(!1===t)for(n=0;n0?(g="v",y=x>0?Math.min(b,_):Math.min(_)):x>0?(g="h",y=Math.min(b)):y=0;if(y){t._length=y;var S=i("orientation",g);t._hasPreCompStats?"v"===S&&0===x?(i("x0",0),i("dx",1)):"h"===S&&0===v&&(i("y0",0),i("dy",1)):"v"===S&&0===x?i("x0"):"h"===S&&0===v&&i("y0"),n.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],a)}else t.visible=!1}function u(e,t,n,i){var a=i.prefix,o=r.coerce2(e,t,l,"marker.outliercolor"),s=n("marker.line.outliercolor"),c="outliers";t._hasPreCompStats?c="all":(o||s)&&(c="suspectedoutliers");var u=n(a+"points",c);u?(n("jitter","all"===u?.3:0),n("pointpos","all"===u?-1.5:0),n("marker.symbol"),n("marker.opacity"),n("marker.size"),n("marker.angle"),n("marker.color",t.line.color),n("marker.line.color"),n("marker.line.width"),"suspectedoutliers"===u&&(n("marker.line.outliercolor",t.marker.color),n("marker.line.outlierwidth")),n("selected.marker.color"),n("unselected.marker.color"),n("selected.marker.size"),n("unselected.marker.size"),n("text"),n("hovertext")):delete t.marker;var h=n("hoveron");("all"===h||-1!==h.indexOf("points"))&&(n("hovertemplate"),n("hovertemplatefallback")),r.coerceSelectionMarkerOpacity(t,n)}t.exports={supplyDefaults:function(e,t,n,o){function s(n,i){return r.coerce(e,t,l,n,i)}if(c(e,t,s,o),!1!==t.visible){a(e,t,o,s),s("xhoverformat"),s("yhoverformat");var h=t._hasPreCompStats;h&&(s("lowerfence"),s("upperfence")),s("line.color",(e.marker||{}).color||n),s("line.width"),s("fillcolor",i.addOpacity(t.line.color,.5));var f=!1;if(h){var p=s("mean"),d=s("sd");p&&p.length&&(f=!0,d&&d.length&&(f="sd"))}s("whiskerwidth");var m,g=s("sizemode");"quartiles"===g&&(m=s("boxmean",f)),s("showwhiskers","quartiles"===g),("sd"===g||"sd"===m)&&s("sdmultiple"),s("width"),s("quartilemethod");var y=!1;if(h){var v=s("notchspan");v&&v.length&&(y=!0)}else r.validate(e.notchwidth,l.notchwidth)&&(y=!0);s("notched",y)&&s("notchwidth"),u(e,t,s,{prefix:"box"}),s("zorder")}},crossTraceDefaults:function(e,t){var n,i;function a(e){return r.coerce(i._input,i,l,e)}for(var s=0;sE.uf};if(t._hasPreCompStats){var U=t[x],V=function(e){return v.d2c((t[e]||[])[l])},q=1/0,H=-1/0;for(l=0;l=E.q1&&E.q3>=E.med){var W=V("lowerfence");E.lf=W!==o&&W<=E.q1?W:f(E,I,L);var Z=V("upperfence");E.uf=Z!==o&&Z>=E.q3?Z:p(E,I,L);var Y=V("mean");E.mean=Y!==o?Y:L?a.mean(I,L):(E.q1+E.q3)/2;var X=V("sd");E.sd=Y!==o&&X>=0?X:L?a.stdev(I,L,E.mean):E.q3-E.q1,E.lo=d(E),E.uo=m(E);var $=V("notchspan");$=$!==o&&$>0?$:g(E,L),E.ln=E.med-$,E.un=E.med+$;var K=E.lf,J=E.uf;t.boxpoints&&I.length&&(K=Math.min(K,I[0]),J=Math.max(J,I[L-1])),t.notched&&(K=Math.min(K,E.ln),J=Math.max(J,E.un)),E.min=K,E.max=J}else{var Q;a.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+E.q1,"median = "+E.med,"q3 = "+E.q3].join("\n")),Q=E.med!==o?E.med:E.q1!==o?E.q3!==o?(E.q1+E.q3)/2:E.q1:E.q3!==o?E.q3:0,E.med=Q,E.q1=E.q3=Q,E.lf=E.uf=Q,E.mean=E.sd=Q,E.ln=E.un=Q,E.min=E.max=Q}q=Math.min(q,E.min),H=Math.max(H,E.max),E.pts2=C.filter(N),M.push(E)}}t._extremes[v._id]=n.findExtremes(v,[q,H],{padded:!0})}else{var ee=v.makeCalcdata(t,x),te=function(e,t){for(var r=e.length,n=new Array(r+1),i=0;i=0&&ie0){var ue,he;(E={}).pos=E[b]=B[l],C=E.pts=ne[l].sort(u),L=(I=E[x]=C.map(h)).length,E.min=I[0],E.max=I[L-1],E.mean=a.mean(I,L),E.sd=a.stdev(I,L,E.mean)*t.sdmultiple,E.med=a.interp(I,.5),L%2&&(le||ce)?(le?(ue=I.slice(0,L/2),he=I.slice(L/2+1)):ce&&(ue=I.slice(0,L/2+1),he=I.slice(L/2)),E.q1=a.interp(ue,.5),E.q3=a.interp(he,.5)):(E.q1=a.interp(I,.25),E.q3=a.interp(I,.75)),E.lf=f(E,I,L),E.uf=p(E,I,L),E.lo=d(E),E.uo=m(E);var fe=g(E,L);E.ln=E.med-fe,E.un=E.med+fe,ae=Math.min(ae,E.ln),oe=Math.max(oe,E.un),E.pts2=C.filter(N),M.push(E)}t.notched&&a.isTypedArray(ee)&&(ee=Array.from(ee)),t._extremes[v._id]=n.findExtremes(v,t.notched?ee.concat([ae,oe]):ee,{padded:!0})}return function(e,t){if(a.isArrayOrTypedArray(t.selectedpoints))for(var r=0;r0?(M[0].t={num:T[S],dPos:j,posLetter:b,valLetter:x,labels:{med:s(e,"median:"),min:s(e,"min:"),q1:s(e,"q1:"),q3:s(e,"q3:"),max:s(e,"max:"),mean:"sd"===t.boxmean||"sd"===t.sizemode?s(e,"mean ± σ:").replace("σ",1===t.sdmultiple?"σ":t.sdmultiple+"σ"):s(e,"mean:"),lf:s(e,"lower fence:"),uf:s(e,"upper fence:")}},T[S]++,M):[{t:{empty:!0}}]};var l={text:"tx",hovertext:"htx"};function c(e,t,r){for(var n in l)a.isArrayOrTypedArray(t[n])&&(Array.isArray(r)?a.isArrayOrTypedArray(t[n][r[0]])&&(e[l[n]]=t[n][r[0]][r[1]]):e[l[n]]=t[n][r])}function u(e,t){return e.v-t.v}function h(e){return e.v}function f(e,t,r){return 0===r?e.q1:Math.min(e.q1,t[Math.min(a.findBin(2.5*e.q1-1.5*e.q3,t,!0)+1,r-1)])}function p(e,t,r){return 0===r?e.q3:Math.max(e.q3,t[Math.max(a.findBin(2.5*e.q3-1.5*e.q1,t),0)])}function d(e){return 4*e.q1-3*e.q3}function m(e){return 4*e.q3-3*e.q1}function g(e,t){return 0===t?0:1.57*(e.q3-e.q1)/Math.sqrt(t)}}}),po=m({"src/traces/box/cross_trace_calc.js"(e,t){var r=ar(),n=ct(),i=nn().getAxisGroup,a=["v","h"];function o(e,t,a,o){var s,l,c,u=t.calcdata,h=t._fullLayout,f=o._id,p=f.charAt(0),d=[],m=0;for(s=0;s1,_=1-h[e+"gap"],b=1-h[e+"groupgap"];for(s=0;s0){var H=M.pointpos,G=M.jitter,W=M.marker.size/2,Z=0;H+G>=0&&((Z=V*(H+G))>D?(q=!0,N=W,B=Z):Z>R&&(N=W,B=D)),Z<=D&&(B=D);var Y=0;H-G<=0&&((Y=-V*(H-G))>O?(q=!0,U=W,j=Y):Y>F&&(U=W,j=O)),Y<=O&&(j=O)}else B=D,j=O;var X=new Array(c.length);for(l=0;le.lo&&(x.so=!0)}return a}));f.enter().append("path").classed("point",!0),f.exit().remove(),f.call(i.translatePoints,o,s)}function s(e,t,i,a){var o,s,l=t.val,c=t.pos,u=!!c.rangebreaks,h=a.bPos,f=a.bPosPxOffset||0,p=i.boxmean||(i.meanline||{}).visible;Array.isArray(a.bdPos)?(o=a.bdPos[0],s=a.bdPos[1]):(o=a.bdPos,s=a.bdPos);var d=e.selectAll("path.mean").data("box"===i.type&&i.boxmean||"violin"===i.type&&i.box.visible&&i.meanline.visible?n.identity:[]);d.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),d.exit().remove(),d.each((function(e){var t=c.c2l(e.pos+h,!0),n=c.l2p(t-o)+f,a=c.l2p(t+s)+f,d=u?(n+a)/2:c.l2p(t)+f,m=l.c2p(e.mean,!0),g=l.c2p(e.mean-e.sd,!0),y=l.c2p(e.mean+e.sd,!0);"h"===i.orientation?r.select(this).attr("d","M"+m+","+n+"V"+a+("sd"===p?"m0,0L"+g+","+d+"L"+m+","+n+"L"+y+","+d+"Z":"")):r.select(this).attr("d","M"+n+","+m+"H"+a+("sd"===p?"m0,0L"+d+","+g+"L"+n+","+m+"L"+d+","+y+"Z":""))}))}t.exports={plot:function(e,t,i,l){var c=e._context.staticPlot,u=t.xaxis,h=t.yaxis;n.makeTraceGroups(l,i,"trace boxes").each((function(e){var t,n,i=r.select(this),l=e[0],f=l.t,p=l.trace;f.wdPos=f.bdPos*p.whiskerwidth,!0!==p.visible||f.empty?i.remove():("h"===p.orientation?(t=h,n=u):(t=u,n=h),a(i,{pos:t,val:n},p,f,c),o(i,{x:u,y:h},p,f),s(i,{pos:t,val:n},p,f))}))},plotBoxAndWhiskers:a,plotPoints:o,plotBoxMean:s}}}),go=m({"src/traces/box/style.js"(e,t){var r=b(),n=W(),i=er();t.exports={style:function(e,t,a){var o=a||r.select(e).selectAll("g.trace.boxes");o.style("opacity",(function(e){return e[0].trace.opacity})),o.each((function(t){var a=r.select(this),o=t[0].trace,s=o.line.width;function l(e,t,r,i){e.style("stroke-width",t+"px").call(n.stroke,r).call(n.fill,i)}var c=a.selectAll("path.box");if("candlestick"===o.type)c.each((function(e){if(!e.empty){var t=r.select(this),n=o[e.dir];l(t,n.line.width,n.line.color,n.fillcolor),t.style("opacity",o.selectedpoints&&!e.selected?.3:1)}}));else{l(c,s,o.line.color,o.fillcolor),a.selectAll("path.mean").style({"stroke-width":s,"stroke-dasharray":2*s+"px,"+s+"px"}).call(n.stroke,o.line.color);var u=a.selectAll("path.point");i.pointStyle(u,o,e)}}))},styleOnSelect:function(e,t,r){var n=t[0].trace,a=r.selectAll("path.point");n.selectedpoints?i.selectedPointStyle(a,n):i.pointStyle(a,n,e)}}}}),yo=m({"src/traces/box/hover.js"(e,t){var r=ar(),n=ct(),i=Or(),a=W(),o=n.fillText;function s(e,t,o,s){var l,c,u,h,f,p,d,m,g,y,v,x,_,b,w=e.cd,T=e.xa,k=e.ya,A=w[0].trace,M=w[0].t,S="violin"===A.type,E=M.bdPos,C=M.wHover,I=function(e){return u.c2l(e.pos)+M.bPos-u.c2l(p)};S&&"both"!==A.side?("positive"===A.side&&(g=function(e){var t=I(e);return i.inbox(t,t+C,y)},x=E,_=0),"negative"===A.side&&(g=function(e){var t=I(e);return i.inbox(t-C,t,y)},x=0,_=E)):(g=function(e){var t=I(e);return i.inbox(t-C,t+C,y)},x=_=E),b=S?function(e){return i.inbox(e.span[0]-f,e.span[1]-f,y)}:function(e){return i.inbox(e.min-f,e.max-f,y)},"h"===A.orientation?(f=t,p=o,d=b,m=g,l="y",u=k,c="x",h=T):(f=o,p=t,d=g,m=b,l="x",u=T,c="y",h=k);var L=Math.min(1,E/Math.abs(u.r2c(u.range[1])-u.r2c(u.range[0])));function P(e){return(d(e)+m(e))/2}y=e.maxHoverDistance-L,v=e.maxSpikeDistance-L;var z=i.getDistanceFunction(s,d,m,P);if(i.getClosest(w,z,e),!1===e.index)return[];var D=w[e.index],O=A.line.color,R=(A.marker||{}).color;a.opacity(O)&&A.line.width?e.color=O:a.opacity(R)&&A.boxpoints?e.color=R:e.color=A.fillcolor,e[l+"0"]=u.c2p(D.pos+M.bPos-_,!0),e[l+"1"]=u.c2p(D.pos+M.bPos+x,!0),e[l+"LabelVal"]=void 0!==D.orig_p?D.orig_p:D.pos;var F=l+"Spike";e.spikeDistance=P(D)*v/y,e[F]=u.c2p(D.pos,!0);var B=A.boxmean||"sd"===A.sizemode||(A.meanline||{}).visible,j=A.boxpoints||A.points,N=j&&B?["max","uf","q3","med","mean","q1","lf","min"]:j&&!B?["max","uf","q3","med","q1","lf","min"]:!j&&B?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],U=h.range[1]0&&(a=!0);for(var l=0;la){var o=a-n[e];return n[e]=a,o}}return 0},max:function(e,t,n,i){var a=i[t];if(r(a)){if(a=Number(a),!r(n[e]))return n[e]=a,a;if(n[e]l?e>a?e>1.1*n?n:e>1.1*i?i:a:e>o?o:e>s?s:l:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function f(e,t,r,i,o,s){if(i&&e>a){var l=p(t,o,s),c=p(r,o,s),u=e===n?0:1;return l[u]!==c[u]}return Math.floor(r/e)-Math.floor(t/e)>.1}function p(e,t,r){var i=t.c2d(e,n,r).split("-");return""===i[0]&&(i.unshift(),i[0]="-"+i[0]),i}t.exports=function(e,t,r,i,o){var s,l,h=-1.1*t,f=-.1*t,p=e-f,d=r[0],m=r[1],g=Math.min(u(d+f,d+p,i,o),u(m+f,m+p,i,o)),y=Math.min(u(d+h,d+f,i,o),u(m+h,m+f,i,o));if(g>y&&ya){var v=s===n?1:6,x=s===n?"M12":"M1";return function(t,r){var a=i.c2d(t,n,o),s=a.indexOf("-",v);s>0&&(a=a.slice(0,s));var u=i.d2c(a,0,o);if(u"u"){if(l)return[L,d,!0];L=function(e,t,r,i,a){var o,s,l,c=e._fullLayout,u=function(e,t){for(var r=t.xaxis,n=t.yaxis,i=t.orientation,a=[],o=e._fullData,s=0;so.r2l(B)&&(N=a.tickIncrement(N,_.size,!0,f)),D.start=o.l2r(N),F||n.nestedProperty(t,y+".start").set(D.start)}var U=_.end,V=o.r2l(z.end),q=void 0!==V;if((_.endFound||q)&&V!==o.r2l(U)){var H=q?V:n.aggNums(Math.max,null,d);D.end=o.l2r(H),q||n.nestedProperty(t,y+".start").set(D.end)}var G="autobin"+s;return!1===t._input[G]&&(t._input[y]=n.extendFlat({},t[y]||{}),delete t._input[G],delete t[G]),[D,d]}t.exports={calc:function(e,t){var i,d,m,g,y=[],v=[],x="h"===t.orientation,_=a.getFromId(e,x?t.yaxis:t.xaxis),b=x?"y":"x",w={x:"y",y:"x"}[b],T=t[b+"calendar"],k=t.cumulative,A=p(e,t,_,b),M=A[0],S=A[1],E="string"==typeof M.size,C=[],I=E?C:M,L=[],P=[],z=[],D=0,O=t.histnorm,R=t.histfunc,F=-1!==O.indexOf("density");k.enabled&&F&&(O=O.replace(/ ?density$/,""),F=!1);var B,j="max"===R||"min"===R?null:0,N=c.count,U=u[O],V=!1,q=function(e){return _.r2c(e,0,T)};for(n.isArrayOrTypedArray(t[w])&&"count"!==R&&(B=t[w],V="avg"===R,N=c[R]),i=q(M.start),m=q(M.end)+(i-a.tickIncrement(i,M.size,!1,T))/1e6;i=0&&g=0;n--)s(n);else if("increasing"===t){for(n=1;n=0;n--)e[n]+=e[n+1];"exclude"===r&&(e.push(0),e.shift())}}(v,k.direction,k.currentbin);var Q=Math.min(y.length,v.length),ee=[],te=0,re=Q-1;for(i=0;i=te;i--)if(v[i]){re=i;break}for(i=te;i<=re;i++)if(r(y[i])&&r(v[i])){var ne={p:y[i],s:v[i],b:0};k.enabled||(ne.pts=z[i],Y?ne.ph0=ne.ph1=z[i].length?S[z[i][0]]:y[i]:(t._computePh=!0,ne.ph0=W(C[i]),ne.ph1=W(C[i+1],!0))),ee.push(ne)}return 1===ee.length&&(ee[0].width1=a.tickIncrement(ee[0].p,M.size,!1,T)-ee[0].p),o(t,"marker")&&s(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),o(t,"marker.line")&&s(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}),l(ee,t),n.isArrayOrTypedArray(t.selectedpoints)&&n.tagSelected(ee,t,K),ee},calcAllAutoBins:p}}}),Po=m({"src/traces/histogram2d/calc.js"(e,t){var r=ct(),n=ar(),i=So(),a=Eo(),o=Co(),s=Io(),l=Lo().calcAllAutoBins;function c(e,t,r,n){var i,a=new Array(e);if(n)for(i=0;iS&&T.splice(S,T.length-S),M.length>S&&M.splice(S,M.length-S);var E=[],C=[],I=[],L="string"==typeof w.size,P="string"==typeof A.size,z=[],D=[],O=L?z:w,R=P?D:A,F=0,B=[],j=[],N=t.histnorm,U=t.histfunc,V=-1!==N.indexOf("density"),q="max"===U||"min"===U?null:0,H=i.count,G=a[N],W=!1,Z=[],Y=[],X="z"in t?t.z:"marker"in t&&Array.isArray(t.marker.color)?t.marker.color:"";X&&"count"!==U&&(W="avg"===U,H=i[U]);var $=w.size,K=x(w.start),J=x(w.end)+(K-n.tickIncrement(K,$,!1,y))/1e6;for(s=K;s=0&&p=0&&dm&&(y=Math.max(y,Math.abs(e[a][o]-d)/(g-m))))}return y}t.exports=function(e,t){var n,a,o=1;for(i(e,t),n=0;n.01;n++)o=i(e,t,(a=o,.5-.25*Math.min(1,.5*a)));return o>.01&&r.log("interp2d didn't converge quickly",o),e}}}),Ro=m({"src/traces/heatmap/find_empties.js"(e,t){var r=ct().maxRowLength;t.exports=function(e){var t,n,i,a,o,s,l,c,u=[],h={},f=[],p=e[0],d=[],m=[0,0,0],g=r(e);for(n=0;n=0;o--)(s=((h[[(n=(a=f[o])[0])-1,i=a[1]]]||m)[2]+(h[[n+1,i]]||m)[2]+(h[[n,i-1]]||m)[2]+(h[[n,i+1]]||m)[2])/20)&&(l[a]=[n,i,s],f.splice(o,1),c=!0);if(!c)throw"findEmpties iterated with no new neighbors";for(a in l)h[a]=l[a],u.push(l[a])}return u.sort((function(e,t){return t[2]-e[2]}))}}}),Fo=m({"src/traces/heatmap/make_bound_array.js"(e,t){var r=He(),n=ct().isArrayOrTypedArray;t.exports=function(e,t,i,a,o,s){var l,c,u,h=[],f=r.traceIs(e,"contour"),p=r.traceIs(e,"histogram");if(n(t)&&t.length>1&&!p&&"category"!==s.type){var d=t.length;if(!(d<=o))return f?t.slice(0,o):t.slice(0,o+1);if(f)h=Array.from(t).slice(0,o);else if(1===o)h="log"===s.type?[.5*t[0],2*t[0]]:[t[0]-.5,t[0]+.5];else if("log"===s.type){for(h=[Math.pow(t[0],1.5)/Math.pow(t[1],.5)],u=1;u1){var t=(e[e.length-1]-e[0])/(e.length-1),r=Math.abs(t/100);for(k=0;kr)return!1}return!0}(M.rangebreaks||S.rangebreaks)&&(T=function(e,t,r){for(var n=[],i=-1,a=0;a0;)k=A.c2p(j[I]),I--;for(k0;)C=M.c2p(N[I]),I--;C=A._length||k<=0||E>=M._length||C<=0)return z.selectAll("image").data([]).exit().remove(),void x(z);"fast"===X?(K=W,J=G):(K=Q,J=ee);var te=document.createElement("canvas");te.width=K,te.height=J;var re,ne,ie=te.getContext("2d",{willReadFrequently:!0}),ae=f(O,{noNumericCheck:!0,returnArray:!0});"fast"===X?(re=Z?function(e){return W-1-e}:s.identity,ne=Y?function(e){return G-1-e}:s.identity):(re=function(e){return s.constrain(Math.round(A.c2p(j[e])-b),0,Q)},ne=function(e){return s.constrain(Math.round(M.c2p(N[e])-E),0,ee)});var oe,se,le,ce,ue=ne(0),he=[ue,ue],fe=Z?0:1,pe=Y?0:1,de=0,me=0,ge=0,ye=0;function ve(e,t){if(void 0!==e){var r=ae(e);return r[0]=Math.round(r[0]),r[1]=Math.round(r[1]),r[2]=Math.round(r[2]),de+=t,me+=r[0]*t,ge+=r[1]*t,ye+=r[2]*t,r}return[0,0,0,0]}function xe(e,t,r,n){var i=e[r.bin0];if(void 0===i)return ve(void 0,1);var a,o=e[r.bin1],s=t[r.bin0],l=t[r.bin1],c=o-i||0,u=s-i||0;return a=void 0===o?void 0===l?0:void 0===s?2*(l-i):2*(2*l-s-i)/3:void 0===l?void 0===s?0:2*(2*i-o-s)/3:void 0===s?2*(2*l-o-i)/3:l+i-o-s,ve(i+r.frac*c+n.frac*(u+r.frac*a))}if("default"!==X){var _e,be=0;try{_e=new Uint8Array(K*J*4)}catch{_e=new Array(K*J*4)}if("smooth"===X){var we,Te,ke,Ae=U||j,Me=V||N,Se=new Array(Ae.length),Ee=new Array(Me.length),Ce=new Array(Q),Ie=U?w:_,Le=V?w:_;for(I=0;IXe||Xe>M._length))for(L=Ge;LKe||Ke>A._length)){var Je=c({x:$e,y:Ye},O,e._fullLayout);Je.x=$e,Je.y=Ye;var Qe=D.z[I][L];void 0===Qe?(Je.z="",Je.zLabel=""):(Je.z=Qe,Je.zLabel=o.tickText(Ue,Qe,"hover").text);var et=D.text&&D.text[I]&&D.text[I][L];(void 0===et||!1===et)&&(et=""),Je.text=et;var tt=s.texttemplateString({data:[Je,O._meta],fallback:O.texttemplatefallback,labels:Je,locale:e._fullLayout._d3locale,template:je});if(tt){var rt=tt.split("
"),nt=rt.length,it=0;for(P=0;P=b[0].length||p<0||p>b.length)return}else{if(r.inbox(t-x[0],t-x[x.length-1],0)>0||r.inbox(s-_[0],s-_[_.length-1],0)>0)return;if(d){var E;for(M=[2*x[0]-x[1]],E=1;E=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}}),cs=m({"src/traces/contour/attributes.js"(e,t){var r=wo(),n=kn(),i=It(),a=i.axisHoverFormat,o=i.descriptionOnlyNumbers,s=zt(),l=Oe().dash,c=j(),u=B().extendFlat,h=ls(),f=h.COMPARISON_OPS2,p=h.INTERVAL_OPS,d=n.line;t.exports=u({z:r.z,x:r.x,x0:r.x0,dx:r.dx,y:r.y,y0:r.y0,dy:r.dy,xperiod:r.xperiod,yperiod:r.yperiod,xperiod0:n.xperiod0,yperiod0:n.yperiod0,xperiodalignment:r.xperiodalignment,yperiodalignment:r.yperiodalignment,text:r.text,hovertext:r.hovertext,transpose:r.transpose,xtype:r.xtype,ytype:r.ytype,xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z",1),hovertemplate:r.hovertemplate,hovertemplatefallback:r.hovertemplatefallback,texttemplate:u({},r.texttemplate,{}),texttemplatefallback:r.texttemplatefallback,textfont:u({},r.textfont,{}),hoverongaps:r.hoverongaps,connectgaps:u({},r.connectgaps,{}),fillcolor:{valType:"color",editType:"calc"},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0}},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc"},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc"},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1}},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc"},showlines:{valType:"boolean",dflt:!0,editType:"plot"},showlabels:{valType:"boolean",dflt:!1,editType:"plot"},labelfont:c({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:o("contour label")},operation:{valType:"enumerated",values:[].concat(f).concat(p),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:u({},d.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:l,smoothing:u({},d.smoothing,{}),editType:"plot"},zorder:n.zorder},s("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}}),us=m({"src/traces/histogram2dcontour/attributes.js"(e,t){var r=rs(),n=cs(),i=zt(),a=It().axisHoverFormat,o=B().extendFlat;t.exports=o({x:r.x,y:r.y,z:r.z,marker:r.marker,histnorm:r.histnorm,histfunc:r.histfunc,nbinsx:r.nbinsx,xbins:r.xbins,nbinsy:r.nbinsy,ybins:r.ybins,autobinx:r.autobinx,autobiny:r.autobiny,bingroup:r.bingroup,xbingroup:r.xbingroup,ybingroup:r.ybingroup,autocontour:n.autocontour,ncontours:n.ncontours,contours:n.contours,line:{color:n.line.color,width:o({},n.line.width,{dflt:.5}),dash:n.line.dash,smoothing:n.line.smoothing,editType:"plot"},xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z",1),hovertemplate:r.hovertemplate,hovertemplatefallback:r.hovertemplatefallback,texttemplate:n.texttemplate,texttemplatefallback:n.texttemplatefallback,textfont:n.textfont},i("",{cLetter:"z",editTypeOverride:"calc"}))}}),hs=m({"src/traces/contour/contours_defaults.js"(e,t){t.exports=function(e,t,r,n){var i=n("contours.start"),a=n("contours.end"),o=!1===i||!1===a,s=r("contours.size");((o?t.autocontour=!0:r("autocontour",!1))||!s)&&r("ncontours")}}}),fs=m({"src/traces/contour/label_defaults.js"(e,t){var r=ct();t.exports=function(e,t,n,i){if(i||(i={}),e("contours.showlabels")){var a=t.font;r.coerceFont(e,"contours.labelfont",a,{overrideDflt:{color:n}}),e("contours.labelformat")}!1!==i.hasHover&&e("zhoverformat")}}}),ps=m({"src/traces/contour/style_defaults.js"(e,t){var r=Ht(),n=fs();t.exports=function(e,t,i,a,o){var s,l=i("contours.coloring"),c="";"fill"===l&&(s=i("contours.showlines")),!1!==s&&("lines"!==l&&(c=i("line.color","#000")),i("line.width",.5),i("line.dash")),"none"!==l&&(!0!==e.showlegend&&(t.showlegend=!1),t._dfltShowLegend=!1,r(e,t,a,i,{prefix:"",cLetter:"z"})),i("line.smoothing"),n(i,a,c,o)}}}),ds=m({"src/traces/histogram2dcontour/defaults.js"(e,t){var r=ct(),n=ns(),i=hs(),a=ps(),o=ko(),s=us();t.exports=function(e,t,l,c){function u(n,i){return r.coerce(e,t,s,n,i)}n(e,t,u,c),!1!==t.visible&&(i(e,t,u,(function(n){return r.coerce2(e,t,s,n)})),a(e,t,u,c),u("xhoverformat"),u("yhoverformat"),u("hovertemplate"),u("hovertemplatefallback"),t.contours&&"heatmap"===t.contours.coloring&&o(u,c))}}}),ms=m({"src/traces/contour/set_contours.js"(e,t){var r=ar(),n=ct();function i(e,t,n){var i={type:"linear",range:[e,t]};return r.autoTicks(i,(t-e)/(n||15)),i}t.exports=function(e,t){var a=e.contours;if(e.autocontour){var o=e.zmin,s=e.zmax;(e.zauto||void 0===o)&&(o=n.aggNums(Math.min,null,t)),(e.zauto||void 0===s)&&(s=n.aggNums(Math.max,null,t));var l=i(o,s,e.ncontours);a.size=l.dtick,a.start=r.tickFirst(l),l.range.reverse(),a.end=r.tickFirst(l),a.start===o&&(a.start+=a.size),a.end===s&&(a.end-=a.size),a.start>a.end&&(a.start=a.end=(a.start+a.end)/2),e._input.contours||(e._input.contours={}),n.extendFlat(e._input.contours,{start:a.start,end:a.end,size:a.size}),e._input.autocontour=!0}else if("constraint"!==a.type){var c,u=a.start,h=a.end,f=e._input.contours;u>h&&(a.start=f.start=h,h=a.end=f.end=u,u=a.start),a.size>0||(c=u===h?1:i(u,h,e.ncontours).dtick,f.size=a.size=c)}}}}),gs=m({"src/traces/contour/end_plus.js"(e,t){t.exports=function(e){return e.end+e.size/1e6}}}),ys=m({"src/traces/contour/calc.js"(e,t){var r=Yt(),n=Bo(),i=ms(),a=gs();t.exports=function(e,t){var o=n(e,t),s=o[0].z;i(t,s);var l,c=t.contours,u=r.extractOpts(t);if("heatmap"===c.coloring&&u.auto&&!1===t.autocontour){var h=c.start,f=a(c),p=c.size||1,d=Math.floor((f-h)/p)+1;isFinite(p)||(p=1,d=1);var m=h-p/2;l=[m,m+d*p]}else l=s;return r.calc(e,t,{vals:l,cLetter:"z"}),o}}}),vs=m({"src/traces/contour/constants.js"(e,t){t.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}}}),xs=m({"src/traces/contour/make_crossings.js"(e,t){var r=vs();function n(e,t){var r=(t[0][0]>e?0:1)+(t[0][1]>e?0:2)+(t[1][1]>e?0:4)+(t[1][0]>e?0:8);return 5===r||10===r?e>(t[0][0]+t[0][1]+t[1][0]+t[1][1])/4?5===r?713:1114:5===r?104:208:15===r?0:r}t.exports=function(e){var t,i,a,o,s,l,c,u,h,f=e[0].z,p=f.length,d=f[0].length,m=2===p||2===d;for(i=0;i20&&t?208===e||1114===e?i=0===r[0]?1:-1:a=0===r[1]?1:-1:-1!==n.BOTTOMSTART.indexOf(e)?a=1:-1!==n.LEFTSTART.indexOf(e)?i=1:-1!==n.TOPSTART.indexOf(e)?a=-1:i=-1,[i,a]}(f,o,t),d=[s(e,t,[-p[0],-p[1]])],m=e.z.length,g=e.z[0].length,y=t.slice(),v=p.slice();for(u=0;u<1e4;u++){if(f>20?(f=n.CHOOSESADDLE[f][(p[0]||p[1])<0?0:1],e.crossings[h]=n.SADDLEREMAINDER[f]):delete e.crossings[h],!(p=n.NEWDELTA[f])){r.log("Found bad marching index:",f,t,e.level);break}d.push(s(e,t,p)),t[0]+=p[0],t[1]+=p[1],h=t.join(","),i(d[d.length-1],d[d.length-2],l,c)&&d.pop();var x=p[0]&&(t[0]<0||t[0]>g-2)||p[1]&&(t[1]<0||t[1]>m-2);if(t[0]===y[0]&&t[1]===y[1]&&p[0]===v[0]&&p[1]===v[1]||o&&x)break;f=e.crossings[h]}1e4===u&&r.log("Infinite loop in contour?");var _,b,w,T,k,A,M,S,E,C,I,L=i(d[0],d[d.length-1],l,c),P=0,z=.2*e.smoothing,D=[],O=0;for(u=1;u=O;u--)if((_=D[u])=O&&_+D[b]S&&E--,e.edgepaths[E]=I.concat(d,C));break}j||(e.edgepaths[S]=d.concat(C))}for(S=0;S":o(">"),"<":o("<"),"=":o("=")}}}),ws=m({"src/traces/contour/empty_pathinfo.js"(e,t){var r=ct(),n=bs(),i=gs();t.exports=function(e,t,a){for(var o="constraint"===e.type?n[e._operation](e.value):e,s=o.size,l=[],c=i(o),u=a.trace._carpetTrace,h=u?{xaxis:u.aaxis,yaxis:u.baxis,x:a.a,y:a.b}:{xaxis:t.xaxis,yaxis:t.yaxis,x:a.x,y:a.y},f=o.start;f1e3){r.warn("Too many contours, clipping at 1000",e);break}return l}}}),Ts=m({"src/traces/contour/convert_to_constraints.js"(e,t){var r=ct();function n(e){return r.extendFlat({},e,{edgepaths:r.extendDeep([],e.edgepaths),paths:r.extendDeep([],e.paths),starts:r.extendDeep([],e.starts)})}t.exports=function(e,t){var i,a,o,s=function(e){return e.reverse()},l=function(e){return e};switch(t){case"=":case"<":return e;case">":for(1!==e.length&&r.warn("Contour data invalid for the specified inequality operation."),a=e[0],i=0;io.level||o.starts.length&&a===o.level)}break;case"constraint":if(n.prefixBoundary=!1,n.edgepaths.length)return;var s=n.x.length,l=n.y.length,c=-1/0,u=1/0;for(r=0;r":p>c&&(n.prefixBoundary=!0);break;case"<":(pc||n.starts.length&&f===u)&&(n.prefixBoundary=!0);break;case"][":h=Math.min(p[0],p[1]),f=Math.max(p[0],p[1]),hc&&(n.prefixBoundary=!0)}}}}}),As=m({"src/traces/contour/plot.js"(e){var t=b(),r=ct(),n=er(),i=Yt(),a=Et(),o=ar(),s=rr(),l=Uo(),c=xs(),u=_s(),h=ws(),f=Ts(),p=ks(),d=vs(),m=d.LABELOPTIMIZER;function g(e,t){var i,a,o,s,l,c,u,h="",f=0,p=e.edgepaths.map((function(e,t){return t})),d=!0;function m(e){return Math.abs(e[1]-t[2][1])<.01}function g(e){return Math.abs(e[0]-t[0][0])<.01}function y(e){return Math.abs(e[0]-t[2][0])<.01}for(;p.length;){for(c=n.smoothopen(e.edgepaths[f],e.smoothing),h+=d?c:c.replace(/^M/,"L"),p.splice(p.indexOf(f),1),i=e.edgepaths[f][e.edgepaths[f].length-1],s=-1,o=0;o<4;o++){if(!i){r.log("Missing end?",f,e);break}for(u=i,Math.abs(u[1]-t[0][1])<.01&&!y(i)?a=t[1]:g(i)?a=t[0]:m(i)?a=t[3]:y(i)&&(a=t[2]),l=0;l=0&&(a=v,s=l):Math.abs(i[1]-a[1])<.01?Math.abs(i[1]-v[1])<.01&&(v[0]-i[0])*(a[0]-v[0])>=0&&(a=v,s=l):r.log("endpt to newendpt is not vert. or horz.",i,a,v)}if(i=a,s>=0)break;h+="L"+a}if(s===e.edgepaths.length){r.log("unclosed perimeter path");break}f=s,(d=-1===p.indexOf(f))&&(f=p[0],h+="Z")}for(f=0;fi.center?i.right-s:s-i.left)/(u+Math.abs(Math.sin(c)*o)),p=(l>i.middle?i.bottom-l:l-i.top)/(Math.abs(h)+Math.cos(c)*o);if(f<1||p<1)return 1/0;var d=m.EDGECOST*(1/(f-1)+1/(p-1));d+=m.ANGLECOST*c*c;for(var g=s-u,y=l-h,v=s+u,x=l+h,_=0;_2*m.MAXCOST)break;p&&(s/=2),l=(o=c-s/2)+1.5*s}if(f<=m.MAXCOST)return u},e.addLabelData=function(e,t,r,n){var i=t.fontSize,a=t.width+i/3,o=Math.max(0,t.height-i/3),s=e.x,l=e.y,c=e.theta,u=Math.sin(c),h=Math.cos(c),f=function(e,t){return[s+e*h-t*u,l+e*u+t*h]},p=[f(-a/2,-o/2),f(-a/2,o/2),f(a/2,o/2),f(a/2,-o/2)];r.push({text:t.text,x:s,y:l,dy:t.dy,theta:c,level:t.level,width:a,height:o}),n.push(p)},e.drawLabels=function(e,n,i,o,s){var l=e.selectAll("text").data(n,(function(e){return e.text+","+e.x+","+e.y+","+e.theta}));if(l.exit().remove(),l.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each((function(e){var r=e.x+Math.sin(e.theta)*e.dy,n=e.y-Math.cos(e.theta)*e.dy;t.select(this).text(e.text).attr({x:r,y:n,transform:"rotate("+180*e.theta/Math.PI+" "+r+" "+n+")"}).call(a.convertToTspans,i)})),s){for(var c="",u=0;u=v)&&(a<=y&&(a=y),o>=v&&(o=v),l=Math.floor((o-a)/s)+1,c=0),f=0;fy&&(m.unshift(y),g.unshift(g[0])),m[m.length-1]2?t.value=t.value.slice(2):0===t.length?t.value=[0,1]:t.length<2?(n=parseFloat(t.value[0]),t.value=[n,n+1]):t.value=[parseFloat(t.value[0]),parseFloat(t.value[1])]:r(t.value)&&(n=parseFloat(t.value),t.value=[n,n+1])):(e("contours.value",0),r(t.value)||(l(t.value)?t.value=parseFloat(t.value[0]):t.value=0))}(i,g),"="===y?p=g.showlines=!0:(p=i("contours.showlines"),m=i("fillcolor",a((e.line||{}).color||h,.5))),p&&(d=i("line.color",m&&o(m)?a(t.fillcolor,1):h),i("line.width",2),i("line.dash")),i("line.smoothing"),n(i,s,d,f)}}}),zs=m({"src/traces/contour/defaults.js"(e,t){var r=ct(),n=To(),i=Wn(),a=Ps(),o=hs(),s=ps(),l=ko(),c=cs();t.exports=function(e,t,u,h){function f(n,i){return r.coerce(e,t,c,n,i)}if(n(e,t,f,h)){i(e,t,h,f),f("xhoverformat"),f("yhoverformat"),f("text"),f("hovertext"),f("hoverongaps"),f("hovertemplate"),f("hovertemplatefallback");var p="constraint"===f("contours.type");f("connectgaps",r.isArray1D(t.z)),p?a(e,t,f,h,u):(o(e,t,f,(function(n){return r.coerce2(e,t,c,n)})),s(e,t,f,h)),t.contours&&"heatmap"===t.contours.coloring&&l(f,h),f("zorder")}else t.visible=!1}}}),Ds=m({"src/traces/contour/index.js"(e,t){t.exports={attributes:cs(),supplyDefaults:zs(),calc:ys(),plot:As().plot,style:Ss(),colorbar:Es(),hoverPoints:Cs(),moduleType:"trace",name:"contour",basePlotModule:Ci(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}}),Os=m({"lib/contour.js"(e,t){t.exports=Ds()}}),Rs=m({"src/traces/scatterternary/attributes.js"(e,t){var{hovertemplateAttrs:r,texttemplateAttrs:n,templatefallbackAttrs:i}=Fe(),a=Tn(),o=kn(),s=q(),l=zt(),c=Oe().dash,u=B().extendFlat,h=o.marker,f=o.line,p=h.line;t.exports={a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},c:{valType:"data_array",editType:"calc"},sum:{valType:"number",dflt:0,min:0,editType:"calc"},mode:u({},o.mode,{dflt:"markers"}),text:u({},o.text,{}),texttemplate:n({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:i({editType:"plot"}),hovertext:u({},o.hovertext,{}),line:{color:f.color,width:f.width,dash:c,backoff:f.backoff,shape:u({},f.shape,{values:["linear","spline"]}),smoothing:f.smoothing,editType:"calc"},connectgaps:o.connectgaps,cliponaxis:o.cliponaxis,fill:u({},o.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:a(),marker:u({symbol:h.symbol,opacity:h.opacity,angle:h.angle,angleref:h.angleref,standoff:h.standoff,maxdisplayed:h.maxdisplayed,size:h.size,sizeref:h.sizeref,sizemin:h.sizemin,sizemode:h.sizemode,line:u({width:p.width,dash:p.dash,editType:"calc"},l("marker.line")),gradient:h.gradient,editType:"calc"},l("marker")),textfont:o.textfont,textposition:o.textposition,selected:o.selected,unselected:o.unselected,hoverinfo:u({},s.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:o.hoveron,hovertemplate:r(),hovertemplatefallback:i()}}}),Fs=m({"src/traces/scatterternary/defaults.js"(e,t){var r=ct(),n=wn(),i=Xt(),a=Yn(),o=Xn(),s=$n(),l=Kn(),c=Jn(),u=Rs();t.exports=function(e,t,h,f){function p(n,i){return r.coerce(e,t,u,n,i)}var d,m=p("a"),g=p("b"),y=p("c");if(m?(d=m.length,g?(d=Math.min(d,g.length),y&&(d=Math.min(d,y.length))):d=y?Math.min(d,y.length):0):g&&y&&(d=Math.min(g.length,y.length)),d){t._length=d,p("sum"),p("text"),p("hovertext"),"fills"!==t.hoveron&&(p("hovertemplate"),p("hovertemplatefallback")),p("mode",d"),o.hovertemplate=f.hovertemplate,a}function x(e,t){y.push(e._hovertitle+": "+t)}}}}),Vs=m({"src/traces/scatterternary/event_data.js"(e,t){t.exports=function(e,t,r,n,i){if(t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),n[i]){var a=n[i];e.a=a.a,e.b=a.b,e.c=a.c}else e.a=t.a,e.b=t.b,e.c=t.c;return e}}}),qs=m({"src/plots/ternary/ternary.js"(e,t){var r=b(),n=F(),i=He(),a=ct(),o=a.strTranslate,s=a._,l=W(),c=er(),u=rr(),h=B().extendFlat,f=At(),p=ar(),d=pr(),m=Or(),g=Rr(),y=g.freeMode,v=g.rectMode,x=tr(),_=Cn().prepSelect,w=Cn().selectOnClick,T=Cn().clearOutline,k=Cn().clearSelectionsCache,A=xt();function M(e,t){this.id=e.id,this.graphDiv=e.graphDiv,this.init(t),this.makeFramework(t),this.updateFx(t),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}t.exports=M;var S=M.prototype;S.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}},S.plot=function(e,t){var r=this,n=t[r.id],i=t._size;r._hasClipOnAxisFalse=!1;for(var a=0;aE*_?i=(a=_)*E:a=(i=x)/E,s=y*i/x,f=v*a/_,r=t.l+t.w*m-i/2,n=t.t+t.h*(1-g)-a/2,p.x0=r,p.y0=n,p.w=i,p.h=a,p.sum=b,p.xaxis={type:"linear",range:[w+2*k-b,b-w-2*T],domain:[m-s/2,m+s/2],_id:"x"},u(p.xaxis,p.graphDiv._fullLayout),p.xaxis.setScale(),p.xaxis.isPtWithinRange=function(e){return e.a>=p.aaxis.range[0]&&e.a<=p.aaxis.range[1]&&e.b>=p.baxis.range[1]&&e.b<=p.baxis.range[0]&&e.c>=p.caxis.range[1]&&e.c<=p.caxis.range[0]},p.yaxis={type:"linear",range:[w,b-T-k],domain:[g-f/2,g+f/2],_id:"y"},u(p.yaxis,p.graphDiv._fullLayout),p.yaxis.setScale(),p.yaxis.isPtWithinRange=function(){return!0};var A=p.yaxis.domain[0],M=p.aaxis=h({},e.aaxis,{range:[w,b-T-k],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[A,A+f*E],anchor:"free",position:0,_id:"y",_length:i});u(M,p.graphDiv._fullLayout),M.setScale();var S=p.baxis=h({},e.baxis,{range:[b-w-k,T],side:"bottom",domain:p.xaxis.domain,anchor:"free",position:0,_id:"x",_length:i});u(S,p.graphDiv._fullLayout),S.setScale();var C=p.caxis=h({},e.caxis,{range:[b-w-T,k],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[A,A+f*E],anchor:"free",position:0,_id:"y",_length:i});u(C,p.graphDiv._fullLayout),C.setScale();var I="M"+r+","+(n+a)+"h"+i+"l-"+i/2+",-"+a+"Z";p.clipDef.select("path").attr("d",I),p.layers.plotbg.select("path").attr("d",I);var L="M0,"+a+"h"+i+"l-"+i/2+",-"+a+"Z";p.clipDefRelative.select("path").attr("d",L);var P=o(r,n);p.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",P),p.clipDefRelative.select("path").attr("transform",null);var z=o(r-S._offset,n+a);p.layers.baxis.attr("transform",z),p.layers.bgrid.attr("transform",z);var D=o(r+i/2,n)+"rotate(30)"+o(0,-M._offset);p.layers.aaxis.attr("transform",D),p.layers.agrid.attr("transform",D);var O=o(r+i/2,n)+"rotate(-30)"+o(0,-C._offset);p.layers.caxis.attr("transform",O),p.layers.cgrid.attr("transform",O),p.drawAxes(!0),p.layers.aline.select("path").attr("d",M.showline?"M"+r+","+(n+a)+"l"+i/2+",-"+a:"M0,0").call(l.stroke,M.linecolor||"#000").style("stroke-width",(M.linewidth||0)+"px"),p.layers.bline.select("path").attr("d",S.showline?"M"+r+","+(n+a)+"h"+i:"M0,0").call(l.stroke,S.linecolor||"#000").style("stroke-width",(S.linewidth||0)+"px"),p.layers.cline.select("path").attr("d",C.showline?"M"+(r+i/2)+","+n+"l"+i/2+","+a:"M0,0").call(l.stroke,C.linecolor||"#000").style("stroke-width",(C.linewidth||0)+"px"),p.graphDiv._context.staticPlot||p.initInteractions(),c.setClipUrl(p.layers.frontplot,p._hasClipOnAxisFalse?null:p.clipId,p.graphDiv)},S.drawAxes=function(e){var t=this,r=t.graphDiv,n=t.id.slice(7)+"title",i=t.layers,a=t.aaxis,o=t.baxis,l=t.caxis;if(t.drawAx(a),t.drawAx(o),t.drawAx(l),e){var c=Math.max(a.showticklabels?a.tickfont.size/2:0,(l.showticklabels?.75*l.tickfont.size:0)+("outside"===l.ticks?.87*l.ticklen:0)),u=(o.showticklabels?o.tickfont.size:0)+("outside"===o.ticks?o.ticklen:0)+3;i["a-title"]=x.draw(r,"a"+n,{propContainer:a,propName:t.id+".aaxis.title.text",placeholder:s(r,"Click to enter Component A title"),attributes:{x:t.x0+t.w/2,y:t.y0-a.title.font.size/3-c,"text-anchor":"middle"}}),i["b-title"]=x.draw(r,"b"+n,{propContainer:o,propName:t.id+".baxis.title.text",placeholder:s(r,"Click to enter Component B title"),attributes:{x:t.x0-u,y:t.y0+t.h+.83*o.title.font.size+u,"text-anchor":"middle"}}),i["c-title"]=x.draw(r,"c"+n,{propContainer:l,propName:t.id+".caxis.title.text",placeholder:s(r,"Click to enter Component C title"),attributes:{x:t.x0+t.w+u,y:t.y0+t.h+.83*l.title.font.size+u,"text-anchor":"middle"}})}},S.drawAx=function(e){var t=this,r=t.graphDiv,n=e._name,i=n.charAt(0),o=e._id,s=t.layers[n],l=i+"tickLayout",c=function(e){return e.ticks+String(e.ticklen)+String(e.showticklabels)}(e);t[l]!==c&&(s.selectAll("."+o+"tick").remove(),t[l]=c),e.setScale();var u=p.calcTicks(e),h=p.clipEnds(e,u),f=p.makeTransTickFn(e),d=p.getTickSigns(e)[2],m=a.deg2rad(30),g=d*(e.linewidth||1)/2,y=d*e.ticklen,v=t.w,x=t.h,_="b"===i?"M0,"+g+"l"+Math.sin(m)*y+","+Math.cos(m)*y:"M"+g+",0l"+Math.cos(m)*y+","+-Math.sin(m)*y,b={a:"M0,0l"+x+",-"+v/2,b:"M0,0l-"+v/2+",-"+x,c:"M0,0l-"+x+","+v/2}[i];p.drawTicks(r,e,{vals:"inside"===e.ticks?h:u,layer:s,path:_,transFn:f,crisp:!1}),p.drawGrid(r,e,{vals:h,layer:t.layers[i+"grid"],path:b,transFn:f,crisp:!1}),p.drawLabels(r,e,{vals:u,layer:s,transFn:f,labelFns:p.makeLabelFns(e,0,30)})};var C=A.MINZOOM/2+.87,I="m-0.87,.5h"+C+"v3h-"+(C+5.2)+"l"+(C/2+2.6)+",-"+(.87*C+4.5)+"l2.6,1.5l-"+C/2+","+.87*C+"Z",L="m0.87,.5h-"+C+"v3h"+(C+5.2)+"l-"+(C/2+2.6)+",-"+(.87*C+4.5)+"l-2.6,1.5l"+C/2+","+.87*C+"Z",P="m0,1l"+C/2+","+.87*C+"l2.6,-1.5l-"+(C/2+2.6)+",-"+(.87*C+4.5)+"l-"+(C/2+2.6)+","+(.87*C+4.5)+"l2.6,1.5l"+C/2+",-"+.87*C+"Z",z=!0;function D(e){r.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}S.clearOutline=function(){k(this.dragOptions),T(this.dragOptions.gd)},S.initInteractions=function(){var e,t,r,u,h,f,p,g,x,b,T,k,M=this,S=M.layers.plotbg.select("path").node(),C=M.graphDiv,O=C._fullLayout._zoomlayer;function R(e){var t={};return t[M.id+".aaxis.min"]=e.a,t[M.id+".baxis.min"]=e.b,t[M.id+".caxis.min"]=e.c,t}function F(e,t){var r=C._fullLayout.clickmode;D(C),2===e&&(C.emit("plotly_doubleclick",null),i.call("_guiRelayout",C,R({a:0,b:0,c:0}))),r.indexOf("select")>-1&&1===e&&w(t,C,[M.xaxis],[M.yaxis],M.id,M.dragOptions),r.indexOf("event")>-1&&m.click(C,t,M.id)}function B(e,t){return 1-t/M.h}function j(e,t){return 1-(e+(M.h-t)/Math.sqrt(3))/M.w}function N(e,t){return(e-(M.h-t)/Math.sqrt(3))/M.w}function U(n,i){var a=r+n*e,o=u+i*t,s=Math.max(0,Math.min(1,B(0,u),B(0,o))),l=Math.max(0,Math.min(1,j(r,u),j(a,o))),c=Math.max(0,Math.min(1,N(r,u),N(a,o))),d=(s/2+c)*M.w,m=(1-s/2-l)*M.w,y=(d+m)/2,v=m-d,_=(1-s)*M.h,w=_-v/E;v.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),k.transition().style("opacity",1).duration(200),b=!0),C.emit("plotly_relayouting",R(p))}function V(){D(C),p!==h&&(i.call("_guiRelayout",C,R(p)),z&&C.data&&C._context.showTips&&(a.notifier(s(C,"Double-click to zoom back out"),"long",C),z=!1))}function q(e,t){var r=e/M.xaxis._m,n=t/M.yaxis._m,i=[(p={a:h.a-n,b:h.b+(r+n)/2,c:h.c-(r-n)/2}).a,p.b,p.c].sort(a.sorterAsc),s=i.indexOf(p.a),l=i.indexOf(p.b),u=i.indexOf(p.c);i[0]<0&&(i[1]+i[0]/2<0?(i[2]+=i[0]+i[1],i[0]=i[1]=0):(i[2]+=i[0]/2,i[1]+=i[0]/2,i[0]=0),p={a:i[s],b:i[l],c:i[u]},t=(h.a-p.a)*M.yaxis._m,e=(h.c-p.c-h.b+p.b)*M.xaxis._m);var f=o(M.x0+e,M.y0+t);M.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",f);var d=o(-e,-t);M.clipDefRelative.select("path").attr("transform",d),M.aaxis.range=[p.a,M.sum-p.b-p.c],M.baxis.range=[M.sum-p.a-p.c,p.b],M.caxis.range=[M.sum-p.a-p.b,p.c],M.drawAxes(!1),M._hasClipOnAxisFalse&&M.plotContainer.select(".scatterlayer").selectAll(".trace").call(c.hideOutsideRangePoints,M),C.emit("plotly_relayouting",R(p))}function H(){i.call("_guiRelayout",C,R(p))}this.dragOptions={element:S,gd:C,plotinfo:{id:M.id,domain:C._fullLayout[M.id].domain,xaxis:M.xaxis,yaxis:M.yaxis},subplot:M.id,prepFn:function(i,s,c){M.dragOptions.xaxes=[M.xaxis],M.dragOptions.yaxes=[M.yaxis],e=C._fullLayout._invScaleX,t=C._fullLayout._invScaleY;var d=M.dragOptions.dragmode=C._fullLayout.dragmode;y(d)?M.dragOptions.minDrag=1:M.dragOptions.minDrag=void 0,"zoom"===d?(M.dragOptions.moveFn=U,M.dragOptions.clickFn=F,M.dragOptions.doneFn=V,function(e,t,i){var s=S.getBoundingClientRect();r=t-s.left,u=i-s.top,C._fullLayout._calcInverseTransform(C);var c=C._fullLayout._invTransform,d=a.apply3DTransform(c)(r,u);r=d[0],u=d[1],h={a:M.aaxis.range[0],b:M.baxis.range[1],c:M.caxis.range[1]},p=h,f=M.aaxis.range[1]-h.a,g=n(M.graphDiv._fullLayout[M.id].bgcolor).getLuminance(),x="M0,"+M.h+"L"+M.w/2+", 0L"+M.w+","+M.h+"Z",b=!1,T=O.append("path").attr("class","zoombox").attr("transform",o(M.x0,M.y0)).style({fill:g>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",x),k=O.append("path").attr("class","zoombox-corners").attr("transform",o(M.x0,M.y0)).style({fill:l.background,stroke:l.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),M.clearOutline(C)}(0,s,c)):"pan"===d?(M.dragOptions.moveFn=q,M.dragOptions.clickFn=F,M.dragOptions.doneFn=H,h={a:M.aaxis.range[0],b:M.baxis.range[1],c:M.caxis.range[1]},p=h,M.clearOutline(C)):(v(d)||y(d))&&_(i,s,c,M.dragOptions,d)}},S.onmousemove=function(e){m.hover(C,e,M.id),C._fullLayout._lasthover=S,C._fullLayout._hoversubplot=M.id},S.onmouseout=function(e){C._dragging||d.unhover(C,e)},d.init(this.dragOptions)}}}),Hs=m({"src/plots/ternary/layout_attributes.js"(e,t){var r=G(),n=Ma().attributes,i=Lt(),a=De().overrideAll,o=B().extendFlat,s={title:{text:i.title.text,font:i.title.font},color:i.color,tickmode:i.minor.tickmode,nticks:o({},i.nticks,{dflt:6,min:1}),tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,ticklabelstep:i.ticklabelstep,showticklabels:i.showticklabels,labelalias:i.labelalias,showtickprefix:i.showtickprefix,tickprefix:i.tickprefix,showticksuffix:i.showticksuffix,ticksuffix:i.ticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,minexponent:i.minexponent,separatethousands:i.separatethousands,tickfont:i.tickfont,tickangle:i.tickangle,tickformat:i.tickformat,tickformatstops:i.tickformatstops,hoverformat:i.hoverformat,showline:o({},i.showline,{dflt:!0}),linecolor:i.linecolor,linewidth:i.linewidth,showgrid:o({},i.showgrid,{dflt:!0}),gridcolor:i.gridcolor,gridwidth:i.gridwidth,griddash:i.griddash,layer:i.layer,min:{valType:"number",dflt:0,min:0}},l=t.exports=a({domain:n({name:"ternary"}),bgcolor:{valType:"color",dflt:r.background},sum:{valType:"number",dflt:1,min:0},aaxis:s,baxis:s,caxis:s},"plot","from-root");l.uirevision={valType:"any",editType:"none"},l.aaxis.uirevision=l.baxis.uirevision=l.caxis.uirevision={valType:"any",editType:"none"}}}),Gs=m({"src/plots/subplot_defaults.js"(e,t){var r=ct(),n=vt(),i=Ma().defaults;t.exports=function(e,t,a,o){var s,l,c=o.type,u=o.attributes,h=o.handleDefaults,f=o.partition||"x",p=t._subplots[c],d=p.length,m=d&&p[0].replace(/\d+$/,"");function g(e,t){return r.coerce(s,l,u,e,t)}for(var y=0;y=s&&(p.min=0,m.min=0,g.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}function d(e,t,r,n){var a=h[t._name];function f(r,n){return i.coerce(e,t,a,r,n)}f("uirevision",n.uirevision),t.type="linear";var p=f("color"),d=p!==a.color.dflt?p:r.font.color,m=t._name.charAt(0).toUpperCase(),g="Component "+m,y=f("title.text",g);t._hovertitle=y===g?y:m,i.coerceFont(f,"title.font",r.font,{overrideDflt:{size:i.bigFont(r.font.size),color:d}}),f("min"),c(e,t,f,"linear"),s(e,t,f,"linear"),o(e,t,f,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),l(e,t,f,{outerTicks:!0}),f("showticklabels")&&(i.coerceFont(f,"tickfont",r.font,{overrideDflt:{color:d}}),f("tickangle"),f("tickformat")),u(e,t,f,{dfltColor:p,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:a}),f("hoverformat"),f("layer")}t.exports=function(e,t,r){a(e,t,r,{type:"ternary",attributes:h,handleDefaults:p,font:t.font,paper_bgcolor:t.paper_bgcolor})}}}),Zs=m({"src/plots/ternary/index.js"(e){var t=qs(),r=Tt().getSubplotCalcData,n=ct().counterRegex,i="ternary";e.name=i;var a=e.attr="subplot";e.idRoot=i,e.idRegex=e.attrRegex=n(i),(e.attributes={})[a]={valType:"subplotid",dflt:"ternary",editType:"calc"},e.layoutAttributes=Hs(),e.supplyLayoutDefaults=Ws(),e.plot=function(e){for(var n=e._fullLayout,a=e.calcdata,o=n._subplots[i],s=0;s0){var _,b,w,T,k,A=e.xa,M=e.ya;"h"===d.orientation?(k=t,_="y",w=M,b="x",T=A):(k=s,_="x",w=A,b="y",T=M);var S=p[e.index];if(k>=S.span[0]&&k<=S.span[1]){var E=n.extendFlat({},e),C=T.c2p(k,!0),I=o.getKdeValue(S,d,k),L=o.getPositionOnKdePath(S,d,C),P=w._offset,z=w._length;E[_+"0"]=L[0],E[_+"1"]=L[1],E[b+"0"]=E[b+"1"]=C,E[b+"Label"]=b+": "+i.hoverLabelText(T,k,d[b+"hoverformat"])+", "+p[0].t.labels.kde+" "+I.toFixed(3);for(var D=0,O=0;O path").each((function(e){if(!e.isBlank){var t=s.marker;r.select(this).call(i.fill,e.mc||t.color).call(i.stroke,e.mlc||t.line.color).call(n.dashLine,t.line.dash,e.mlw||t.line.width).style("opacity",s.selectedpoints&&!e.selected?a:1)}})),l(o,s,e),o.selectAll(".regions").each((function(){r.select(this).selectAll("path").style("stroke-width",0).call(i.fill,s.connector.fillcolor)})),o.selectAll(".lines").each((function(){var e=s.connector.line;n.lineGroupStyle(r.select(this).selectAll("path"),e.width,e.color,e.dash)}))}))}}}}),xl=m({"src/traces/funnel/hover.js"(e,t){var r=W().opacity,n=no().hoverOnBars,i=ct().formatPercent;t.exports=function(e,t,a,o,s){var l=n(e,t,a,o,s);if(l){var c=l.cd,u=c[0].trace,h="h"===u.orientation,f=c[l.index];l[(h?"x":"y")+"LabelVal"]=f.s,l.percentInitial=f.begR,l.percentInitialLabel=i(f.begR,1),l.percentPrevious=f.difR,l.percentPreviousLabel=i(f.difR,1),l.percentTotal=f.sumR,l.percentTotalLabel=i(f.sumR,1);var p=f.hi||u.hoverinfo,d=[];if(p&&"none"!==p&&"skip"!==p){var m="all"===p,g=p.split("+"),y=function(e){return m||-1!==g.indexOf(e)};y("percent initial")&&d.push(l.percentInitialLabel+" of initial"),y("percent previous")&&d.push(l.percentPreviousLabel+" of previous"),y("percent total")&&d.push(l.percentTotalLabel+" of total")}return l.extraText=d.join("
"),l.color=function(e,t){var n=e.marker,i=t.mc||n.color,a=t.mlc||n.line.color,o=t.mlw||n.line.width;return r(i)?i:r(a)&&o?a:void 0}(u,f),[l]}}}}),_l=m({"src/traces/funnel/event_data.js"(e,t){t.exports=function(e,t){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,"percentInitial"in t&&(e.percentInitial=t.percentInitial),"percentPrevious"in t&&(e.percentPrevious=t.percentPrevious),"percentTotal"in t&&(e.percentTotal=t.percentTotal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e}}}),bl=m({"src/traces/funnel/index.js"(e,t){t.exports={attributes:cl(),layoutAttributes:ul(),supplyDefaults:hl().supplyDefaults,crossTraceDefaults:hl().crossTraceDefaults,supplyLayoutDefaults:fl(),calc:dl(),crossTraceCalc:ml(),plot:yl(),style:vl().style,hoverPoints:xl(),eventData:_l(),selectPoints:ao(),moduleType:"trace",name:"funnel",basePlotModule:Ci(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),wl=m({"lib/funnel.js"(e,t){t.exports=bl()}}),Tl=m({"src/traces/waterfall/constants.js"(e,t){t.exports={eventDataKeys:["initial","delta","final"]}}}),kl=m({"src/traces/waterfall/attributes.js"(e,t){var r=Wa(),n=kn().line,i=q(),a=It().axisHoverFormat,{hovertemplateAttrs:o,texttemplateAttrs:s,templatefallbackAttrs:l}=Fe(),c=Tl(),u=B().extendFlat,h=W();function f(e){return{marker:{color:u({},r.marker.color,{arrayOk:!1,editType:"style"}),line:{color:u({},r.marker.line.color,{arrayOk:!1,editType:"style"}),width:u({},r.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}t.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:r.x,x0:r.x0,dx:r.dx,y:r.y,y0:r.y0,dy:r.dy,xperiod:r.xperiod,yperiod:r.yperiod,xperiod0:r.xperiod0,yperiod0:r.yperiod0,xperiodalignment:r.xperiodalignment,yperiodalignment:r.yperiodalignment,xhoverformat:a("x"),yhoverformat:a("y"),hovertext:r.hovertext,hovertemplate:o({},{keys:c.eventDataKeys}),hovertemplatefallback:l(),hoverinfo:u({},i.hoverinfo,{flags:["name","x","y","text","initial","delta","final"]}),textinfo:{valType:"flaglist",flags:["label","text","initial","delta","final"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:s({editType:"plot"},{keys:c.eventDataKeys.concat(["label"])}),texttemplatefallback:l({editType:"plot"}),text:r.text,textposition:r.textposition,insidetextanchor:r.insidetextanchor,textangle:r.textangle,textfont:r.textfont,insidetextfont:r.insidetextfont,outsidetextfont:r.outsidetextfont,constraintext:r.constraintext,cliponaxis:r.cliponaxis,orientation:r.orientation,offset:r.offset,width:r.width,increasing:f(),decreasing:f(),totals:f(),connector:{line:{color:u({},n.color,{dflt:h.defaultLine}),width:u({},n.width,{editType:"plot"}),dash:n.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:r.offsetgroup,alignmentgroup:r.alignmentgroup,zorder:r.zorder}}}),Al=m({"src/traces/waterfall/layout_attributes.js"(e,t){t.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc"},waterfallgap:{valType:"number",min:0,max:1,editType:"calc"},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}}}),Ml=m({"src/constants/delta.js"(e,t){t.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}}}),Sl=m({"src/traces/waterfall/defaults.js"(e,t){var r=ct(),n=ei(),i=Xa().handleText,a=Gn(),o=Wn(),s=kl(),l=W(),c=Ml(),u=c.INCREASING.COLOR,h=c.DECREASING.COLOR;function f(e,t,r){e(t+".marker.color",r),e(t+".marker.line.color",l.defaultLine),e(t+".marker.line.width")}t.exports={supplyDefaults:function(e,t,n,l){function c(n,i){return r.coerce(e,t,s,n,i)}if(a(e,t,l,c)){o(e,t,l,c),c("xhoverformat"),c("yhoverformat"),c("measure"),c("orientation",t.x&&!t.y?"h":"v"),c("base"),c("offset"),c("width"),c("text"),c("hovertext"),c("hovertemplate"),c("hovertemplatefallback");var p=c("textposition");i(e,t,l,c,p,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),"none"!==t.textposition&&(c("texttemplate"),c("texttemplatefallback"),t.texttemplate||c("textinfo")),f(c,"increasing",u),f(c,"decreasing",h),f(c,"totals","#4499FF"),c("connector.visible")&&(c("connector.mode"),c("connector.line.width")&&(c("connector.line.color"),c("connector.line.dash"))),c("zorder")}else t.visible=!1},crossTraceDefaults:function(e,t){var i,a;function o(e){return r.coerce(a._input,a,s,e)}if("group"===t.waterfallmode)for(var l=0;l0&&(g+=f?"M"+h[0]+","+d[1]+"V"+d[0]:"M"+h[1]+","+d[0]+"H"+h[0]),"between"!==p&&(o.isSum||s path").each((function(e){if(!e.isBlank){var t=s[e.dir].marker;r.select(this).call(i.fill,t.color).call(i.stroke,t.line.color).call(n.dashLine,t.line.dash,t.line.width).style("opacity",s.selectedpoints&&!e.selected?a:1)}})),l(o,s,e),o.selectAll(".lines").each((function(){var e=s.connector.line;n.lineGroupStyle(r.select(this).selectAll("path"),e.width,e.color,e.dash)}))}))}}}}),zl=m({"src/traces/waterfall/hover.js"(e,t){var r=ar().hoverLabelText,n=W().opacity,i=no().hoverOnBars,a=Ml(),o=a.INCREASING.SYMBOL,s=a.DECREASING.SYMBOL;t.exports=function(e,t,a,l,c){var u=i(e,t,a,l,c);if(u){var h=u.cd,f=h[0].trace,p="h"===f.orientation,d=p?"x":"y",m=p?e.xa:e.ya,g=h[u.index],y=g.isSum?g.b+g.s:g.rawS;u.initial=g.b+g.s-y,u.delta=y,u.final=u.initial+u.delta;var v=k(Math.abs(u.delta));u.deltaLabel=y<0?"("+v+")":v,u.finalLabel=k(u.final),u.initialLabel=k(u.initial);var x=g.hi||f.hoverinfo,_=[];if(x&&"none"!==x&&"skip"!==x){var b="all"===x,w=x.split("+"),T=function(e){return b||-1!==w.indexOf(e)};g.isSum||(T("final")&&(p?!T("x"):!T("y"))&&_.push(u.finalLabel),T("delta")&&(y<0?_.push(u.deltaLabel+" "+s):_.push(u.deltaLabel+" "+o)),T("initial")&&_.push("Initial: "+u.initialLabel))}return _.length&&(u.extraText=_.join("
")),u.color=function(e,t){var r=e[t.dir].marker,i=r.color,a=r.line.color,o=r.line.width;return n(i)?i:n(a)&&o?a:void 0}(f,g),[u]}function k(e){return r(m,e,f[d+"hoverformat"])}}}}),Dl=m({"src/traces/waterfall/event_data.js"(e,t){t.exports=function(e,t){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,"initial"in t&&(e.initial=t.initial),"delta"in t&&(e.delta=t.delta),"final"in t&&(e.final=t.final),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e}}}),Ol=m({"src/traces/waterfall/index.js"(e,t){t.exports={attributes:kl(),layoutAttributes:Al(),supplyDefaults:Sl().supplyDefaults,crossTraceDefaults:Sl().crossTraceDefaults,supplyLayoutDefaults:El(),calc:Cl(),crossTraceCalc:Il(),plot:Ll(),style:Pl().style,hoverPoints:zl(),eventData:Dl(),selectPoints:ao(),moduleType:"trace",name:"waterfall",basePlotModule:Ci(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),Rl=m({"lib/waterfall.js"(e,t){t.exports=Ol()}}),Fl=m({"src/traces/image/constants.js"(e,t){t.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(e){return e.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:["","","",""]},rgba256:{colormodel:"rgba",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(e){var t=e.slice(0,3);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["°","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(e){var t=e.slice(0,4);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["°","%","%",""]}}}}}),Bl=m({"src/traces/image/attributes.js"(e,t){var r,n,i=q(),a=kn().zorder,{hovertemplateAttrs:o,templatefallbackAttrs:s}=Fe(),l=B().extendFlat,c=Fl().colormodel,u=["rgb","rgba","rgba256","hsl","hsla"],h=[],f=[];for(n=0;n0?s-4:s;for(r=0;r>16&255,c[u++]=t>>8&255,c[u++]=255&t;return 2===l&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[u++]=255&t),1===l&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t),c},e.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a=[],o=16383,s=0,c=n-i;sc?c:s+o));return 1===i?(t=e[n-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),a.join("")};var t,r=[],n=[],i=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(t=0;t<64;++t)r[t]=a[t],n[a.charCodeAt(t)]=t;function o(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function s(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function l(e,t,r){for(var n,i=[],a=t;a>1,u=-7,h=r?i-1:0,f=r?-1:1,p=e[t+h];for(h+=f,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=256*a+e[t+h],h+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=n;u>0;o=256*o+e[t+h],h+=f,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=c}return(p?-1:1)*o*Math.pow(2,a-n)},e.write=function(e,t,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+h>=1?f/l:f*Math.pow(2,1-h))*l>=2&&(o++,l/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(t*l-1)*Math.pow(2,i),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;e[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<0;e[r+p]=255&o,p+=d,o/=256,c-=8);e[r+p-d]|=128*m}}}),Hl=m({"node_modules/buffer/index.js"(e){var t=Vl(),r=ql(),n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=o,e.SlowBuffer=function(e){return+e!=e&&(e=0),o.alloc(+e)},e.INSPECT_MAX_BYTES=50;var i=2147483647;function a(e){if(e>i)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,o.prototype),t}function o(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}return s(e,t,r)}function s(e,t,r){if("string"==typeof e)return function(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!o.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=0|p(e,t),n=a(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Z(e,Uint8Array)){let t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return u(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Z(e,ArrayBuffer)||e&&Z(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Z(e,SharedArrayBuffer)||e&&Z(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return o.from(n,t,r);let i=function(e){if(o.isBuffer(e)){let t=0|f(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||Y(e.length)?a(0):u(e):"Buffer"===e.type&&Array.isArray(e.data)?u(e.data):void 0}(e);if(i)return i;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return o.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return l(e),a(e<0?0:0|f(e))}function u(e){let t=e.length<0?0:0|f(e.length),r=a(t);for(let n=0;n=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|e}function p(e,t){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Z(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(e).length;default:if(i)return n?-1:H(e).length;t=(""+t).toLowerCase(),i=!0}}function d(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0)||(r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return E(this,t,r);case"utf8":case"utf-8":return k(this,t,r);case"ascii":return M(this,t,r);case"latin1":case"binary":return S(this,t,r);case"base64":return T(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=o.from(t,n)),o.isBuffer(t))return 0===t.length?-1:y(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):y(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,r,n,i){let a,o=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){let n=-1;for(a=r;as&&(r=s-l),a=r;a>=0;a--){let r=!0;for(let n=0;ni&&(n=i):n=i;let a,o=t.length;for(n>o/2&&(n=o/2),a=0;a>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function T(e,r,n){return 0===r&&n===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(r,n))}function k(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+o<=r){let r,n,s,l;switch(o){case 1:t<128&&(a=t);break;case 2:r=e[i+1],128==(192&r)&&(l=(31&t)<<6|63&r,l>127&&(a=l));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(l=(15&t)<<12|(63&r)<<6|63&n,l>2047&&(l<55296||l>57343)&&(a=l));break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(l=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,l>65535&&l<1114112&&(a=l))}}null===a?(a=65533,o=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=o}return function(e){let t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn.length?(o.isBuffer(t)||(t=o.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!o.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},o.byteLength=p,o.prototype._isBuffer=!0,o.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(t+=" ... "),""},n&&(o.prototype[n]=o.prototype.inspect),o.prototype.compare=function(e,t,r,n,i){if(Z(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let a=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),l=Math.min(a,s),c=this.slice(n,i),u=e.slice(t,r);for(let e=0;e>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}let i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let a=!1;for(;;)switch(n){case"hex":return v(this,e,t,r);case"utf8":case"utf-8":return x(this,e,t,r);case"ascii":case"latin1":case"binary":return _(this,e,t,r);case"base64":return b(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function M(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;in)&&(r=n);let i="";for(let n=t;nr)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,r,n,i,a){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function P(e,t,r,n,i){N(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,r}function z(e,t,r,n,i){N(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r+7]=a,a>>=8,e[r+6]=a,a>>=8,e[r+5]=a,a>>=8,e[r+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o>>=8,e[r+2]=o,o>>=8,e[r+1]=o,o>>=8,e[r]=o,r+8}function D(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function O(e,t,n,i,a){return t=+t,n>>>=0,a||D(e,0,n,4),r.write(e,t,n,i,23,4),n+4}function R(e,t,n,i,a){return t=+t,n>>>=0,a||D(e,0,n,8),r.write(e,t,n,i,52,8),n+8}o.prototype.slice=function(e,t){let r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||I(e,t,this.length);let n=this[e],i=1,a=0;for(;++a>>=0,t>>>=0,r||I(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},o.prototype.readUint8=o.prototype.readUInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),this[e]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readBigUInt64LE=$((function(e){U(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&V(e,this.length-8);let n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&V(e,this.length-8);let n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||I(e,t,this.length);let n=this[e],i=1,a=0;for(;++a=i&&(n-=Math.pow(2,8*t)),n},o.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=t,i=1,a=this[e+--n];for(;n>0&&(i*=256);)a+=this[e+--n]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},o.prototype.readInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){e>>>=0,t||I(e,2,this.length);let r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(e,t){e>>>=0,t||I(e,2,this.length);let r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readBigInt64LE=$((function(e){U(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&V(e,this.length-8);let n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&V(e,this.length-8);let n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<>>=0,t||I(e,4,this.length),r.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e>>>=0,t||I(e,4,this.length),r.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e>>>=0,t||I(e,8,this.length),r.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e>>>=0,t||I(e,8,this.length),r.read(this,e,!1,52,8)},o.prototype.writeUintLE=o.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||L(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,a=0;for(this[t]=255&e;++a>>=0,r>>>=0,n||L(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+r},o.prototype.writeUint8=o.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,1,255,0),this[t]=255&e,t+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeBigUInt64LE=$((function(e,t=0){return P(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),o.prototype.writeBigUInt64BE=$((function(e,t=0){return z(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),o.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){let n=Math.pow(2,8*r-1);L(this,e,t,r,n-1,-n)}let i=0,a=1,o=0;for(this[t]=255&e;++i>>=0,!n){let n=Math.pow(2,8*r-1);L(this,e,t,r,n-1,-n)}let i=r-1,a=1,o=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/a|0)-o&255;return t+r},o.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeBigInt64LE=$((function(e,t=0){return P(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),o.prototype.writeBigInt64BE=$((function(e,t=0){return z(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),o.prototype.writeFloatLE=function(e,t,r){return O(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){return O(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){return R(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){return R(this,e,t,!1,r)},o.prototype.copy=function(e,t,r,n){if(!o.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&0!==n&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function N(e,t,r,n,i,a){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${i} and < 2${i} ** ${8*(a+1)}${i}`:`>= -(2${i} ** ${8*(a+1)-1}${i}) and < 2 ** ${8*(a+1)-1}${i}`:`>= ${t}${i} and <= ${r}${i}`,new F.ERR_OUT_OF_RANGE("value",n,e)}!function(e,t,r){U(t,"offset"),(void 0===e[t]||void 0===e[t+r])&&V(t,e.length-(r+1))}(n,i,a)}function U(e,t){if("number"!=typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function V(e,t,r){throw Math.floor(e)!==e?(U(e,r),new F.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new F.ERR_BUFFER_OUT_OF_BOUNDS:new F.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}B("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),B("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),B("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=j(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=j(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);var q=/[^+/0-9A-Za-z-_]/g;function H(e,t){t=t||1/0;let r,n=e.length,i=null,a=[];for(let o=0;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function G(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(q,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function W(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function Z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}var X=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function $(e){return typeof BigInt>"u"?K:e}function K(){throw new Error("BigInt not supported")}}}),Gl=m({"node_modules/has-symbols/shams.js"(e,t){t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var a=Object.getOwnPropertyDescriptor(e,t);if(42!==a.value||!0!==a.enumerable)return!1}return!0}}}),Wl=m({"node_modules/has-tostringtag/shams.js"(e,t){var r=Gl();t.exports=function(){return r()&&!!Symbol.toStringTag}}}),Zl=m({"node_modules/es-object-atoms/index.js"(e,t){t.exports=Object}}),Yl=m({"node_modules/es-errors/index.js"(e,t){t.exports=Error}}),Xl=m({"node_modules/es-errors/eval.js"(e,t){t.exports=EvalError}}),$l=m({"node_modules/es-errors/range.js"(e,t){t.exports=RangeError}}),Kl=m({"node_modules/es-errors/ref.js"(e,t){t.exports=ReferenceError}}),Jl=m({"node_modules/es-errors/syntax.js"(e,t){t.exports=SyntaxError}}),Ql=m({"node_modules/es-errors/type.js"(e,t){t.exports=TypeError}}),ec=m({"node_modules/es-errors/uri.js"(e,t){t.exports=URIError}}),tc=m({"node_modules/math-intrinsics/abs.js"(e,t){t.exports=Math.abs}}),rc=m({"node_modules/math-intrinsics/floor.js"(e,t){t.exports=Math.floor}}),nc=m({"node_modules/math-intrinsics/max.js"(e,t){t.exports=Math.max}}),ic=m({"node_modules/math-intrinsics/min.js"(e,t){t.exports=Math.min}}),ac=m({"node_modules/math-intrinsics/pow.js"(e,t){t.exports=Math.pow}}),oc=m({"node_modules/math-intrinsics/round.js"(e,t){t.exports=Math.round}}),sc=m({"node_modules/math-intrinsics/isNaN.js"(e,t){t.exports=Number.isNaN||function(e){return e!=e}}}),lc=m({"node_modules/math-intrinsics/sign.js"(e,t){var r=sc();t.exports=function(e){return r(e)||0===e?e:e<0?-1:1}}}),cc=m({"node_modules/gopd/gOPD.js"(e,t){t.exports=Object.getOwnPropertyDescriptor}}),uc=m({"node_modules/gopd/index.js"(e,t){var r=cc();if(r)try{r([],"length")}catch{r=null}t.exports=r}}),hc=m({"node_modules/es-define-property/index.js"(e,t){var r=Object.defineProperty||!1;if(r)try{r({},"a",{value:1})}catch{r=!1}t.exports=r}}),fc=m({"node_modules/has-symbols/index.js"(e,t){var r=typeof Symbol<"u"&&Symbol,n=Gl();t.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&n()}}}),pc=m({"node_modules/get-proto/Reflect.getPrototypeOf.js"(e,t){t.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}}),dc=m({"node_modules/get-proto/Object.getPrototypeOf.js"(e,t){var r=Zl();t.exports=r.getPrototypeOf||null}}),mc=m({"node_modules/function-bind/implementation.js"(e,t){var r=Object.prototype.toString,n=Math.max,i=function(e,t){for(var r=[],n=0;n"u"||!A?r:A(Uint8Array),P={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":k&&A?A([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":I,"%AsyncGenerator%":I,"%AsyncGeneratorFunction%":I,"%AsyncIteratorPrototype%":I,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":typeof Float16Array>"u"?r:Float16Array,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":I,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":k&&A?A(A([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!k||!A?r:A((new Map)[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":n,"%Object.getOwnPropertyDescriptor%":_,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!k||!A?r:A((new Set)[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":k&&A?A(""[Symbol.iterator]()):r,"%Symbol%":k?Symbol:r,"%SyntaxError%":l,"%ThrowTypeError%":T,"%TypedArray%":L,"%TypeError%":c,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet,"%Function.prototype.call%":C,"%Function.prototype.apply%":E,"%Object.defineProperty%":b,"%Object.getPrototypeOf%":M,"%Math.abs%":h,"%Math.floor%":f,"%Math.max%":p,"%Math.min%":d,"%Math.pow%":m,"%Math.round%":g,"%Math.sign%":y,"%Reflect.getPrototypeOf%":S};if(A)try{null.error}catch(e){z=A(A(e)),P["%Error.prototype%"]=z}var z,D=function e(t){var r;if("%AsyncFunction%"===t)r=x("async function () {}");else if("%GeneratorFunction%"===t)r=x("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=x("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&A&&(r=A(i.prototype))}return P[t]=r,r},O={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},R=gc(),F=kc(),B=R.call(C,Array.prototype.concat),j=R.call(E,Array.prototype.splice),N=R.call(C,String.prototype.replace),U=R.call(C,String.prototype.slice),V=R.call(C,RegExp.prototype.exec),q=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,H=/\\(\\)?/g,G=function(e,t){var r,n=e;if(F(O,n)&&(n="%"+(r=O[n])[0]+"%"),F(P,n)){var i=P[n];if(i===I&&(i=D(n)),typeof i>"u"&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new l("intrinsic "+e+" does not exist!")};t.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===V(/^%?[^%]*%?$/,e))throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=U(e,0,1),r=U(e,-1);if("%"===t&&"%"!==r)throw new l("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new l("invalid intrinsic syntax, expected opening `%`");var n=[];return N(e,q,(function(e,t,r,i){n[n.length]=r?N(i,H,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",i=G("%"+n+"%",t),a=i.name,o=i.value,s=!1,u=i.alias;u&&(n=u[0],j(r,B([0,1],u)));for(var h=1,f=!0;h=r.length){var g=_(o,p);o=(f=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:o[p]}else f=F(o,p),o=o[p];f&&!s&&(P[a]=o)}}return o}}}),Mc=m({"node_modules/define-data-property/index.js"(e,t){var r=hc(),n=Jl(),i=Ql(),a=uc();t.exports=function(e,t,o){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],h=!!a&&a(e,t);if(r)r(e,t,{configurable:null===c&&h?h.configurable:!c,enumerable:null===s&&h?h.enumerable:!s,value:o,writable:null===l&&h?h.writable:!l});else{if(!u&&(s||l||c))throw new n("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=o}}}}),Sc=m({"node_modules/has-property-descriptors/index.js"(e,t){var r=hc(),n=function(){return!!r};n.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch{return!0}},t.exports=n}}),Ec=m({"node_modules/set-function-length/index.js"(e,t){var r=Ac(),n=Mc(),i=Sc()(),a=uc(),o=Ql(),s=r("%Math.floor%");t.exports=function(e,t){if("function"!=typeof e)throw new o("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||s(t)!==t)throw new o("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],l=!0,c=!0;if("length"in e&&a){var u=a(e,"length");u&&!u.configurable&&(l=!1),u&&!u.writable&&(c=!1)}return(l||c||!r)&&(i?n(e,"length",t,!0,!0):n(e,"length",t)),e}}}),Cc=m({"node_modules/call-bind/index.js"(e,t){var r=gc(),n=Ac(),i=Ec(),a=Ql(),o=n("%Function.prototype.apply%"),s=n("%Function.prototype.call%"),l=n("%Reflect.apply%",!0)||r.call(s,o),c=hc(),u=n("%Math.max%");t.exports=function(e){if("function"!=typeof e)throw new a("a function is required");var t=l(r,s,arguments);return i(t,1+u(0,e.length-(arguments.length-1)),!0)};var h=function(){return l(r,o,arguments)};c?c(t.exports,"apply",{value:h}):t.exports.apply=h}}),Ic=m({"node_modules/call-bind/callBound.js"(e,t){var r=Ac(),n=Cc(),i=n(r("String.prototype.indexOf"));t.exports=function(e,t){var a=r(e,!!t);return"function"==typeof a&&i(e,".prototype.")>-1?n(a):a}}}),Lc=m({"node_modules/is-arguments/index.js"(e,t){var r=Wl()(),n=Ic()("Object.prototype.toString"),i=function(e){return!(r&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===n(e)},a=function(e){return!!i(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==n(e)&&"[object Function]"===n(e.callee)},o=function(){return i(arguments)}();i.isLegacyArguments=a,t.exports=o?i:a}}),Pc=m({"node_modules/is-generator-function/index.js"(e,t){var r,n=Object.prototype.toString,i=Function.prototype.toString,a=/^\s*(?:function)?\*/,o=Wl()(),s=Object.getPrototypeOf;t.exports=function(e){if("function"!=typeof e)return!1;if(a.test(i.call(e)))return!0;if(!o)return"[object GeneratorFunction]"===n.call(e);if(!s)return!1;if(typeof r>"u"){var t=function(){if(!o)return!1;try{return Function("return function*() {}")()}catch{}}();r=!!t&&s(t)}return s(e)===r}}}),zc=m({"node_modules/is-callable/index.js"(e,t){var r,n,i=Function.prototype.toString,a="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof a&&"function"==typeof Object.defineProperty)try{r=Object.defineProperty({},"length",{get:function(){throw n}}),n={},a((function(){throw 42}),null,r)}catch(e){e!==n&&(a=null)}else a=null;var o,s=/^\s*class\b/,l=function(e){try{var t=i.call(e);return s.test(t)}catch{return!1}},c=function(e){try{return!l(e)&&(i.call(e),!0)}catch{return!1}},u=Object.prototype.toString,h="function"==typeof Symbol&&!!Symbol.toStringTag,f=!(0 in[,]),p=function(){return!1};"object"==typeof document&&(o=document.all,u.call(o)===u.call(document.all)&&(p=function(e){if((f||!e)&&(typeof e>"u"||"object"==typeof e))try{var t=u.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch{}return!1})),t.exports=a?function(e){if(p(e))return!0;if(!e||"function"!=typeof e&&"object"!=typeof e)return!1;try{a(e,null,r)}catch(e){if(e!==n)return!1}return!l(e)&&c(e)}:function(e){if(p(e))return!0;if(!e||"function"!=typeof e&&"object"!=typeof e)return!1;if(h)return c(e);if(l(e))return!1;var t=u.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&c(e)}}}),Dc=m({"node_modules/for-each/index.js"(e,t){var r=zc(),n=Object.prototype.toString,i=Object.prototype.hasOwnProperty;t.exports=function(e,t,a){if(!r(t))throw new TypeError("iterator must be a function");var o;arguments.length>=3&&(o=a),"[object Array]"===n.call(e)?function(e,t,r){for(var n=0,a=e.length;n"u"?window:globalThis;t.exports=function(){for(var e=[],t=0;t"u"?window:globalThis,u=n(),h=a("String.prototype.slice"),f=Object.getPrototypeOf,p=a("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r-1?t:"Object"===t&&function(e){var t=!1;return r(d,(function(r,n){if(!t)try{r(e),t=h(n,1)}catch{}})),t}(e)}return o?function(e){var t=!1;return r(d,(function(r,n){if(!t)try{"$"+r(e)===n&&(t=h(n,1))}catch{}})),t}(e):null}}}),Fc=m({"node_modules/is-typed-array/index.js"(e,t){var r=Dc(),n=Oc(),i=Ic(),a=i("Object.prototype.toString"),o=Wl()(),s=uc(),l=typeof globalThis>"u"?window:globalThis,c=n(),u=i("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r-1}return!!s&&function(e){var t=!1;return r(f,(function(r,n){if(!t)try{t=r.call(e)===n}catch{}})),t}(e)}}}),Bc=m({"node_modules/util/support/types.js"(e){var t=Lc(),r=Pc(),n=Rc(),i=Fc();function a(e){return e.call.bind(e)}var o,s,l=typeof BigInt<"u",c=typeof Symbol<"u",u=a(Object.prototype.toString),h=a(Number.prototype.valueOf),f=a(String.prototype.valueOf),p=a(Boolean.prototype.valueOf);function d(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch{return!1}}function m(e){return"[object Map]"===u(e)}function g(e){return"[object Set]"===u(e)}function y(e){return"[object WeakMap]"===u(e)}function v(e){return"[object WeakSet]"===u(e)}function x(e){return"[object ArrayBuffer]"===u(e)}function _(e){return!(typeof ArrayBuffer>"u")&&(x.working?x(e):e instanceof ArrayBuffer)}function b(e){return"[object DataView]"===u(e)}function w(e){return!(typeof DataView>"u")&&(b.working?b(e):e instanceof DataView)}l&&(o=a(BigInt.prototype.valueOf)),c&&(s=a(Symbol.prototype.valueOf)),e.isArgumentsObject=t,e.isGeneratorFunction=r,e.isTypedArray=i,e.isPromise=function(e){return typeof Promise<"u"&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},e.isArrayBufferView=function(e){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(e):i(e)||w(e)},e.isUint8Array=function(e){return"Uint8Array"===n(e)},e.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===n(e)},e.isUint16Array=function(e){return"Uint16Array"===n(e)},e.isUint32Array=function(e){return"Uint32Array"===n(e)},e.isInt8Array=function(e){return"Int8Array"===n(e)},e.isInt16Array=function(e){return"Int16Array"===n(e)},e.isInt32Array=function(e){return"Int32Array"===n(e)},e.isFloat32Array=function(e){return"Float32Array"===n(e)},e.isFloat64Array=function(e){return"Float64Array"===n(e)},e.isBigInt64Array=function(e){return"BigInt64Array"===n(e)},e.isBigUint64Array=function(e){return"BigUint64Array"===n(e)},m.working=typeof Map<"u"&&m(new Map),e.isMap=function(e){return!(typeof Map>"u")&&(m.working?m(e):e instanceof Map)},g.working=typeof Set<"u"&&g(new Set),e.isSet=function(e){return!(typeof Set>"u")&&(g.working?g(e):e instanceof Set)},y.working=typeof WeakMap<"u"&&y(new WeakMap),e.isWeakMap=function(e){return!(typeof WeakMap>"u")&&(y.working?y(e):e instanceof WeakMap)},v.working=typeof WeakSet<"u"&&v(new WeakSet),e.isWeakSet=function(e){return v(e)},x.working=typeof ArrayBuffer<"u"&&x(new ArrayBuffer),e.isArrayBuffer=_,b.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&b(new DataView(new ArrayBuffer(1),0,1)),e.isDataView=w;var T=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function k(e){return"[object SharedArrayBuffer]"===u(e)}function A(e){return!(typeof T>"u")&&(typeof k.working>"u"&&(k.working=k(new T)),k.working?k(e):e instanceof T)}function M(e){return d(e,h)}function S(e){return d(e,f)}function E(e){return d(e,p)}function C(e){return l&&d(e,o)}function I(e){return c&&d(e,s)}e.isSharedArrayBuffer=A,e.isAsyncFunction=function(e){return"[object AsyncFunction]"===u(e)},e.isMapIterator=function(e){return"[object Map Iterator]"===u(e)},e.isSetIterator=function(e){return"[object Set Iterator]"===u(e)},e.isGeneratorObject=function(e){return"[object Generator]"===u(e)},e.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===u(e)},e.isNumberObject=M,e.isStringObject=S,e.isBooleanObject=E,e.isBigIntObject=C,e.isSymbolObject=I,e.isBoxedPrimitive=function(e){return M(e)||S(e)||E(e)||C(e)||I(e)},e.isAnyArrayBuffer=function(e){return typeof Uint8Array<"u"&&(_(e)||A(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})}))}}),jc=m({"node_modules/util/support/isBufferBrowser.js"(e,t){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}}}),Nc=m({"(disabled):node_modules/util/util.js"(e){var t=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n=a)return e;switch(e){case"%s":return String(i[n++]);case"%d":return Number(i[n++]);case"%j":try{return JSON.stringify(i[n++])}catch{return"[Circular]"}default:return e}})),l=i[n];n"u")return function(){return e.deprecate(t,r).apply(this,arguments)};var n=!1;return function(){if(!n){if(c.throwDeprecation)throw new Error(r);c.traceDeprecation?console.trace(r):console.error(r),n=!0}return t.apply(this,arguments)}};var n,i={},a=/^$/;function o(t,r){var n={seen:[],stylize:l};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(r)?n.showHidden=r:r&&e._extend(n,r),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=s),u(n,t,n.depth)}function s(e,t){var r=o.styles[t];return r?"["+o.colors[r][0]+"m"+e+"["+o.colors[r][1]+"m":e}function l(e,t){return e}function u(t,r,n){if(t.customInspect&&r&&T(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return y(i)||(i=u(t,i,n)),i}var a=function(e,t){if(v(t))return e.stylize("undefined","undefined");if(y(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return g(t)?e.stylize(""+t,"number"):d(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(t,r);if(a)return a;var o=Object.keys(r),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(r)),w(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return h(r);if(0===o.length){if(T(r)){var l=r.name?": "+r.name:"";return t.stylize("[Function"+l+"]","special")}if(x(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(b(r))return t.stylize(Date.prototype.toString.call(r),"date");if(w(r))return h(r)}var c,_="",k=!1,A=["{","}"];return p(r)&&(k=!0,A=["[","]"]),T(r)&&(_=" [Function"+(r.name?": "+r.name:"")+"]"),x(r)&&(_=" "+RegExp.prototype.toString.call(r)),b(r)&&(_=" "+Date.prototype.toUTCString.call(r)),w(r)&&(_=" "+h(r)),0!==o.length||k&&0!=r.length?n<0?x(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),c=k?function(e,t,r,n,i){for(var a=[],o=0,s=t.length;o60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(c,_,A)):A[0]+_+A[1]}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,r,n,i,a){var o,s,l;if((l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),S(n,i)||(o="["+i+"]"),s||(e.seen.indexOf(l.value)<0?(s=m(r)?u(e,l.value,null):u(e,l.value,r-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),v(o)){if(a&&i.match(/^\d+$/))return s;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function p(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function y(e){return"string"==typeof e}function v(e){return void 0===e}function x(e){return _(e)&&"[object RegExp]"===k(e)}function _(e){return"object"==typeof e&&null!==e}function b(e){return _(e)&&"[object Date]"===k(e)}function w(e){return _(e)&&("[object Error]"===k(e)||e instanceof Error)}function T(e){return"function"==typeof e}function k(e){return Object.prototype.toString.call(e)}function A(e){return e<10?"0"+e.toString(10):e.toString(10)}n=(n="false").replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),a=new RegExp("^"+n+"$","i"),e.debuglog=function(t){if(t=t.toUpperCase(),!i[t])if(a.test(t)){var r=c.pid;i[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else i[t]=function(){};return i[t]},e.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=Bc(),e.isArray=p,e.isBoolean=d,e.isNull=m,e.isNullOrUndefined=function(e){return null==e},e.isNumber=g,e.isString=y,e.isSymbol=function(e){return"symbol"==typeof e},e.isUndefined=v,e.isRegExp=x,e.types.isRegExp=x,e.isObject=_,e.isDate=b,e.types.isDate=b,e.isError=w,e.types.isNativeError=w,e.isFunction=T,e.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||typeof e>"u"},e.isBuffer=jc();var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.log=function(){var t,r;console.log("%s - %s",(r=[A((t=new Date).getHours()),A(t.getMinutes()),A(t.getSeconds())].join(":"),[t.getDate(),M[t.getMonth()],r].join(" ")),e.format.apply(e,arguments))},e.inherits=Nl(),e._extend=function(e,t){if(!t||!_(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var E=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function C(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}e.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(E&&e[E]){var r;if("function"!=typeof(r=e[E]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,E,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),i=[],a=0;a0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t=a.allocUnsafe(e>>>0),r=this.head,n=0;r;)l(r.data,t,n),n+=r.data.length,r=r.next;return t}},{key:"consume",value:function(e,t){var r;return ei.length?i.length:e;if(a===i.length?n+=i:n+=i.slice(0,e),0==(e-=a)){a===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(a));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:s,value:function(e,t){return o(this,function(e){for(var t=1;t2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}n("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(e,t,r){var n,a;if("string"==typeof t&&function(e,t){return e.substr(0,4)===t}(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-9,r)===t}(e," argument"))a="The ".concat(e," ").concat(n," ").concat(i(t,"type"));else{var o=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+1>e.length)&&-1!==e.indexOf(".",r)}(e)?"property":"argument";a='The "'.concat(e,'" ').concat(o," ").concat(n," ").concat(i(t,"type"))}return a+". Received type ".concat(typeof r)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=r}}),Hc=m({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/state.js"(e,t){var r=qc().codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,n,i){var a=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,n);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new r(i?n:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}}}}),Gc=m({"node_modules/util-deprecate/browser.js"(e,t){function r(e){try{if(!window.localStorage)return!1}catch{return!1}var t=window.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}t.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}}),Wc=m({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_writable.js"(e,t){function r(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t){var r=e.entry;for(e.entry=null;r;){var n=r.callback;t.pendingcb--,n(undefined),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}var n;t.exports=k,k.WritableState=T;var i,a={deprecate:Gc()},o=Ul(),s=Hl().Buffer,l=window.Uint8Array||function(){},u=Vc(),h=Hc().getHighWaterMark,f=qc().codes,p=f.ERR_INVALID_ARG_TYPE,d=f.ERR_METHOD_NOT_IMPLEMENTED,m=f.ERR_MULTIPLE_CALLBACK,g=f.ERR_STREAM_CANNOT_PIPE,y=f.ERR_STREAM_DESTROYED,v=f.ERR_STREAM_NULL_VALUES,x=f.ERR_STREAM_WRITE_AFTER_END,_=f.ERR_UNKNOWN_ENCODING,b=u.errorOrDestroy;function w(){}function T(e,t,i){n=n||Zc(),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=h(this,e,"writableHighWaterMark",i),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new m;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(c.nextTick(i,n),c.nextTick(I,e,t),e._writableState.errorEmitted=!0,b(e,n)):(i(n),e._writableState.errorEmitted=!0,b(e,n),I(e,t))}(e,r,n,t,i);else{var a=E(r)||e.destroyed;!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&S(e,r),n?c.nextTick(M,e,r,a,i):M(e,r,a,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}function k(e){var t=this instanceof(n=n||Zc());if(!t&&!i.call(k,this))return new k(e);this._writableState=new T(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),o.call(this)}function A(e,t,r,n,i,a,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new y("write")):r?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function M(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),I(e,t)}function S(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var i=t.bufferedRequestCount,a=new Array(i),o=t.corkedRequestsFree;o.entry=n;for(var s=0,l=!0;n;)a[s]=n,n.isBuf||(l=!1),n=n.next,s+=1;a.allBuffers=l,A(e,t,!0,t.length,a,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new r(t),t.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,u=n.encoding,h=n.callback;if(A(e,t,!1,t.objectMode?1:c.length,c,u,h),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function E(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function C(e,t){e._final((function(r){t.pendingcb--,r&&b(e,r),t.prefinished=!0,e.emit("prefinish"),I(e,t)}))}function I(e,t){var r=E(t);if(r&&(function(e,t){!t.prefinished&&!t.finalCalled&&("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,c.nextTick(C,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}Nl()(k,o),T.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(T.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(i=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:function(e){return!!i.call(this,e)||this===k&&e&&e._writableState instanceof T}})):i=function(e){return e instanceof this},k.prototype.pipe=function(){b(this,new g)},k.prototype.write=function(e,t,r){var n=this._writableState,i=!1,a=!n.objectMode&&function(e){return s.isBuffer(e)||e instanceof l}(e);return a&&!s.isBuffer(e)&&(e=function(e){return s.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=n.defaultEncoding),"function"!=typeof r&&(r=w),n.ending?function(e,t){var r=new x;b(e,r),c.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var i;return null===r?i=new v:"string"!=typeof r&&!t.objectMode&&(i=new p("chunk",["string","Buffer"],r)),!i||(b(e,i),c.nextTick(n,i),!1)}(this,n,e,r))&&(n.pendingcb++,i=function(e,t,r,n,i,a){if(!r){var o=function(e,t,r){return!e.objectMode&&!1!==e.decodeStrings&&"string"==typeof t&&(t=s.from(t,r)),t}(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var l=t.objectMode?1:n.length;t.length+=l;var c=t.length-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(e,t,r){r(new d("_write()"))},k.prototype._writev=null,k.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,I(e,t),r&&(t.finished?c.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),k.prototype.destroy=u.destroy,k.prototype._undestroy=u.undestroy,k.prototype._destroy=function(e,t){t(e)}}}),Zc=m({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_duplex.js"(e,t){var r=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=l;var n,i,a,o=Qc(),s=Wc();for(Nl()(l,o),n=r(s.prototype),a=0;a>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function o(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function s(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function u(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}e.StringDecoder=n,n.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(a>0&&(e.lastNeed=a-1),a):--n=0?(a>0&&(e.lastNeed=a-2),a):--n=0?(a>0&&(2===a?a=0:e.lastNeed=a-3),a):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},n.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}}}),$c=m({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(e,t){var r=qc().codes.ERR_STREAM_PREMATURE_CLOSE;function n(){}t.exports=function e(t,i,a){if("function"==typeof i)return e(t,null,i);i||(i={}),a=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i0)if("string"!=typeof t&&!c.objectMode&&Object.getPrototypeOf(t)!==o.prototype&&(t=function(e){return o.from(e)}(t)),i)c.endEmitted?b(e,new _):M(e,c,t,!0);else if(c.ended)b(e,new v);else{if(c.destroyed)return!1;c.reading=!1,c.decoder&&!r?(t=c.decoder.write(t),c.objectMode||0!==t.length?M(e,c,t,!1):L(e,c)):M(e,c,t,!1)}else i||(c.reading=!1,L(e,c));return!c.ended&&(c.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=S?e=S:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function C(e){var t=e._readableState;n("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(n("emitReadable",t.flowing),t.emittedReadable=!0,c.nextTick(I,e))}function I(e){var t=e._readableState;n("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,R(e)}function L(e,t){t.readingMore||(t.readingMore=!0,c.nextTick(P,e,t))}function P(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function D(e){n("readable nexttick read 0"),e.read(0)}function O(e,t){n("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),R(e),t.flowing&&!t.reading&&e.read(0)}function R(e){var t=e._readableState;for(n("flow",t.flowing);t.flowing&&null!==e.read(););}function F(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function B(e){var t=e._readableState;n("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,c.nextTick(j,t,e))}function j(e,t){if(n("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function N(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return n("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?B(this):C(this),null;if(0===(e=E(e,t))&&t.ended)return 0===t.length&&B(this),null;var i,a=t.needReadable;return n("need readable",a),(0===t.length||t.length-e0?F(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&B(this)),null!==i&&this.emit("data",i),i},k.prototype._read=function(e){b(this,new x("_read()"))},k.prototype.pipe=function(e,t){var r=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,n("pipe count=%d opts=%j",a.pipesCount,t);var o=t&&!1===t.end||e===c.stdout||e===c.stderr?m:s;function s(){n("onend"),e.end()}a.endEmitted?c.nextTick(o):r.once("end",o),e.on("unpipe",(function t(i,o){n("onunpipe"),i===r&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,n("cleanup"),e.removeListener("close",p),e.removeListener("finish",d),e.removeListener("drain",l),e.removeListener("error",f),e.removeListener("unpipe",t),r.removeListener("end",s),r.removeListener("end",m),r.removeListener("data",h),u=!0,a.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&l())}));var l=function(e){return function(){var t=e._readableState;n("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&i(e,"data")&&(t.flowing=!0,R(e))}}(r);e.on("drain",l);var u=!1;function h(t){n("ondata");var i=e.write(t);n("dest.write",i),!1===i&&((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==N(a.pipes,e))&&!u&&(n("false write response, pause",a.awaitDrain),a.awaitDrain++),r.pause())}function f(t){n("onerror",t),m(),e.removeListener("error",f),0===i(e,"error")&&b(e,t)}function p(){e.removeListener("finish",d),m()}function d(){n("onfinish"),e.removeListener("close",p),m()}function m(){n("unpipe"),r.unpipe(e)}return r.on("data",h),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",f),e.once("close",p),e.once("finish",d),e.emit("pipe",r),a.flowing||(n("pipe resume"),r.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a0,!1!==i.flowing&&this.resume()):"readable"===e&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,n("on readable",i.length,i.reading),i.length?C(this):i.reading||c.nextTick(D,this)),r},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(e,t){var r=a.prototype.removeListener.call(this,e,t);return"readable"===e&&c.nextTick(z,this),r},k.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return("readable"===e||void 0===e)&&c.nextTick(z,this),t},k.prototype.resume=function(){var e=this._readableState;return e.flowing||(n("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,c.nextTick(O,e,t))}(this,e)),e.paused=!1,this},k.prototype.pause=function(){return n("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(n("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;for(var a in e.on("end",(function(){if(n("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(a){n("wrapped data"),r.decoder&&(a=r.decoder.write(a)),r.objectMode&&null==a||!(r.objectMode||a&&a.length)||t.push(a)||(i=!0,e.pause())})),e)void 0===this[a]&&"function"==typeof e[a]&&(this[a]=function(t){return function(){return e[t].apply(e,arguments)}}(a));for(var o=0;o0,(function(e){u||(u=e),e&&h.forEach(s),!i&&(h.forEach(s),c(u))}))}));return t.reduce(l)}}}),nu=m({"node_modules/stream-browserify/index.js"(e,t){t.exports=n;var r=pt().EventEmitter;function n(){r.call(this)}Nl()(n,r),n.Readable=Qc(),n.Writable=Wc(),n.Duplex=Zc(),n.Transform=eu(),n.PassThrough=tu(),n.finished=$c(),n.pipeline=ru(),n.Stream=n,n.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function a(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",a),!e._isStdio&&(!t||!1!==t.end)&&(n.on("end",s),n.on("close",l));var o=!1;function s(){o||(o=!0,e.end())}function l(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(u(),0===r.listenerCount(this,"error"))throw e}function u(){n.removeListener("data",i),e.removeListener("drain",a),n.removeListener("end",s),n.removeListener("close",l),n.removeListener("error",c),e.removeListener("error",c),n.removeListener("end",u),n.removeListener("close",u),e.removeListener("close",u)}return n.on("error",c),e.on("error",c),n.on("end",u),n.on("close",u),e.on("close",u),e.emit("pipe",n),e}}}),iu=m({"node_modules/util/util.js"(e){var t=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n=a)return e;switch(e){case"%s":return String(i[n++]);case"%d":return Number(i[n++]);case"%j":try{return JSON.stringify(i[n++])}catch{return"[Circular]"}default:return e}})),l=i[n];n"u")return function(){return e.deprecate(t,r).apply(this,arguments)};var n=!1;return function(){if(!n){if(c.throwDeprecation)throw new Error(r);c.traceDeprecation?console.trace(r):console.error(r),n=!0}return t.apply(this,arguments)}};var n,i={},a=/^$/;function o(t,r){var n={seen:[],stylize:l};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(r)?n.showHidden=r:r&&e._extend(n,r),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=s),u(n,t,n.depth)}function s(e,t){var r=o.styles[t];return r?"["+o.colors[r][0]+"m"+e+"["+o.colors[r][1]+"m":e}function l(e,t){return e}function u(t,r,n){if(t.customInspect&&r&&T(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return y(i)||(i=u(t,i,n)),i}var a=function(e,t){if(v(t))return e.stylize("undefined","undefined");if(y(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return g(t)?e.stylize(""+t,"number"):d(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(t,r);if(a)return a;var o=Object.keys(r),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(r)),w(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return h(r);if(0===o.length){if(T(r)){var l=r.name?": "+r.name:"";return t.stylize("[Function"+l+"]","special")}if(x(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(b(r))return t.stylize(Date.prototype.toString.call(r),"date");if(w(r))return h(r)}var c,_="",k=!1,A=["{","}"];return p(r)&&(k=!0,A=["[","]"]),T(r)&&(_=" [Function"+(r.name?": "+r.name:"")+"]"),x(r)&&(_=" "+RegExp.prototype.toString.call(r)),b(r)&&(_=" "+Date.prototype.toUTCString.call(r)),w(r)&&(_=" "+h(r)),0!==o.length||k&&0!=r.length?n<0?x(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),c=k?function(e,t,r,n,i){for(var a=[],o=0,s=t.length;o60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(c,_,A)):A[0]+_+A[1]}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,r,n,i,a){var o,s,l;if((l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),S(n,i)||(o="["+i+"]"),s||(e.seen.indexOf(l.value)<0?(s=m(r)?u(e,l.value,null):u(e,l.value,r-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),v(o)){if(a&&i.match(/^\d+$/))return s;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function p(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function y(e){return"string"==typeof e}function v(e){return void 0===e}function x(e){return _(e)&&"[object RegExp]"===k(e)}function _(e){return"object"==typeof e&&null!==e}function b(e){return _(e)&&"[object Date]"===k(e)}function w(e){return _(e)&&("[object Error]"===k(e)||e instanceof Error)}function T(e){return"function"==typeof e}function k(e){return Object.prototype.toString.call(e)}function A(e){return e<10?"0"+e.toString(10):e.toString(10)}n=(n="false").replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),a=new RegExp("^"+n+"$","i"),e.debuglog=function(t){if(t=t.toUpperCase(),!i[t])if(a.test(t)){var r=c.pid;i[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else i[t]=function(){};return i[t]},e.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=Bc(),e.isArray=p,e.isBoolean=d,e.isNull=m,e.isNullOrUndefined=function(e){return null==e},e.isNumber=g,e.isString=y,e.isSymbol=function(e){return"symbol"==typeof e},e.isUndefined=v,e.isRegExp=x,e.types.isRegExp=x,e.isObject=_,e.isDate=b,e.types.isDate=b,e.isError=w,e.types.isNativeError=w,e.isFunction=T,e.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||typeof e>"u"},e.isBuffer=jc();var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.log=function(){var t,r;console.log("%s - %s",(r=[A((t=new Date).getHours()),A(t.getMinutes()),A(t.getSeconds())].join(":"),[t.getDate(),M[t.getMonth()],r].join(" ")),e.format.apply(e,arguments))},e.inherits=Nl(),e._extend=function(e,t){if(!t||!_(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var E=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function C(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}e.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(E&&e[E]){var r;if("function"!=typeof(r=e[E]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,E,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),i=[],a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,a=i(e);if(t){var o=i(this).constructor;n=Reflect.construct(a,arguments,o)}else n=a.apply(this,arguments);return function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}(s);function s(r,n,i){var a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),a=o.call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,n,i)),a.code=e,a}return function(e){return Object.defineProperty(e,"prototype",{writable:!1}),e}(s)}(a);s[e]=o}function c(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}l("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),l("ERR_INVALID_ARG_TYPE",(function(e,t,n){var i,o;if(void 0===a&&(a=wu()),a("string"==typeof e,"'name' must be a string"),"string"==typeof t&&function(e,t){return e.substr(0,4)===t}(t,"not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-9,r)===t}(e," argument"))o="The ".concat(e," ").concat(i," ").concat(c(t,"type"));else{var s=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+1>e.length)&&-1!==e.indexOf(".",r)}(e)?"property":"argument";o='The "'.concat(e,'" ').concat(s," ").concat(i," ").concat(c(t,"type"))}return o+". Received type ".concat(r(n))}),TypeError),l("ERR_INVALID_ARG_VALUE",(function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===o&&(o=iu());var n=o.inspect(t);return n.length>128&&(n="".concat(n.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(n)}),TypeError,RangeError),l("ERR_INVALID_RETURN_VALUE",(function(e,t,n){var i;return i=n&&n.constructor&&n.constructor.name?"instance of ".concat(n.constructor.name):"type ".concat(r(n)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(i,".")}),TypeError),l("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),r=0;r0,"At least one arg needs to be specified");var n="The ",i=t.length;switch(t=t.map((function(e){return'"'.concat(e,'"')})),i){case 1:n+="".concat(t[0]," argument");break;case 2:n+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:n+=t.slice(0,i-1).join(", "),n+=", and ".concat(t[i-1]," arguments")}return"".concat(n," must be specified")}),TypeError),t.exports.codes=s}}),ou=m({"node_modules/assert/build/internal/assert/assertion_error.js"(e,t){function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function n(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}function p(e,t){return(p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var g=iu().inspect,y=au().codes.ERR_INVALID_ARG_TYPE;function v(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}var x="",_="",b="",w="",T={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function k(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach((function(t){r[t]=e[t]})),Object.defineProperty(r,"message",{value:e.message}),r}function A(e){return g(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var M=function(e,t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(i,e);var r=function(e){var t=f();return function(){var r,n=d(e);if(t){var i=d(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return s(this,r)}}(i);function i(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),"object"!==m(e)||null===e)throw new y("options","Object",e);var n=e.message,a=e.operator,o=e.stackStartFn,u=e.actual,h=e.expected,f=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=n)t=r.call(this,String(n));else if(c.stderr&&c.stderr.isTTY&&(c.stderr&&c.stderr.getColorDepth&&1!==c.stderr.getColorDepth()?(x="",_="",w="",b=""):(x="",_="",w="",b="")),"object"===m(u)&&null!==u&&"object"===m(h)&&null!==h&&"stack"in u&&u instanceof Error&&"stack"in h&&h instanceof Error&&(u=k(u),h=k(h)),"deepStrictEqual"===a||"strictEqual"===a)t=r.call(this,function(e,t,r){var n="",i="",a=0,o="",s=!1,l=A(e),u=l.split("\n"),h=A(t).split("\n"),f=0,p="";if("strictEqual"===r&&"object"===m(e)&&"object"===m(t)&&null!==e&&null!==t&&(r="strictEqualObject"),1===u.length&&1===h.length&&u[0]!==h[0]){var d=u[0].length+h[0].length;if(d<=10){if(!("object"===m(e)&&null!==e||"object"===m(t)&&null!==t||0===e&&0===t))return"".concat(T[r],"\n\n")+"".concat(u[0]," !== ").concat(h[0],"\n")}else if("strictEqualObject"!==r&&d<(c.stderr&&c.stderr.isTTY?c.stderr.columns:80)){for(;u[0][f]===h[0][f];)f++;f>2&&(p="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,r-e.length)}(" ",f),"^"),f=0)}}for(var g=u[u.length-1],y=h[h.length-1];g===y&&(f++<2?o="\n ".concat(g).concat(o):n=g,u.pop(),h.pop(),0!==u.length&&0!==h.length);)g=u[u.length-1],y=h[h.length-1];var k=Math.max(u.length,h.length);if(0===k){var M=l.split("\n");if(M.length>30)for(M[26]="".concat(x,"...").concat(w);M.length>27;)M.pop();return"".concat(T.notIdentical,"\n\n").concat(M.join("\n"),"\n")}f>3&&(o="\n".concat(x,"...").concat(w).concat(o),s=!0),""!==n&&(o="\n ".concat(n).concat(o),n="");var S=0,E=T[r]+"\n".concat(_,"+ actual").concat(w," ").concat(b,"- expected").concat(w),C=" ".concat(x,"...").concat(w," Lines skipped");for(f=0;f1&&f>2&&(I>4?(i+="\n".concat(x,"...").concat(w),s=!0):I>3&&(i+="\n ".concat(h[f-2]),S++),i+="\n ".concat(h[f-1]),S++),a=f,n+="\n".concat(b,"-").concat(w," ").concat(h[f]),S++;else if(h.length1&&f>2&&(I>4?(i+="\n".concat(x,"...").concat(w),s=!0):I>3&&(i+="\n ".concat(u[f-2]),S++),i+="\n ".concat(u[f-1]),S++),a=f,i+="\n".concat(_,"+").concat(w," ").concat(u[f]),S++;else{var L=h[f],P=u[f],z=P!==L&&(!v(P,",")||P.slice(0,-1)!==L);z&&v(L,",")&&L.slice(0,-1)===P&&(z=!1,P+=","),z?(I>1&&f>2&&(I>4?(i+="\n".concat(x,"...").concat(w),s=!0):I>3&&(i+="\n ".concat(u[f-2]),S++),i+="\n ".concat(u[f-1]),S++),a=f,i+="\n".concat(_,"+").concat(w," ").concat(P),n+="\n".concat(b,"-").concat(w," ").concat(L),S+=2):(i+=n,n="",(1===I||0===f)&&(i+="\n ".concat(P),S++))}if(S>20&&f30)for(d[26]="".concat(x,"...").concat(w);d.length>27;)d.pop();t=1===d.length?r.call(this,"".concat(p," ").concat(d[0])):r.call(this,"".concat(p,"\n\n").concat(d.join("\n"),"\n"))}else{var g=A(u),M="",S=T[a];"notDeepEqual"===a||"notEqual"===a?(g="".concat(T[a],"\n\n").concat(g)).length>1024&&(g="".concat(g.slice(0,1021),"...")):(M="".concat(A(h)),g.length>512&&(g="".concat(g.slice(0,509),"...")),M.length>512&&(M="".concat(M.slice(0,509),"...")),"deepEqual"===a||"equal"===a?g="".concat(S,"\n\n").concat(g,"\n\nshould equal\n\n"):M=" ".concat(a," ").concat(M)),t=r.call(this,"".concat(g).concat(M))}return Error.stackTraceLimit=f,t.generatedMessage=!n,Object.defineProperty(l(t),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),t.code="ERR_ASSERTION",t.actual=u,t.expected=h,t.operator=a,Error.captureStackTrace&&Error.captureStackTrace(l(t),o),t.stack,t.name="AssertionError",s(t)}return function(e,t){t&&a(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1})}(i,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(e,t){return g(this,n(n({},t),{},{customInspect:!1,depth:0}))}}]),i}(u(Error),g.custom);t.exports=M}}),su=m({"node_modules/object-keys/isArguments.js"(e,t){var r=Object.prototype.toString;t.exports=function(e){var t=r.call(e),n="[object Arguments]"===t;return n||(n="[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===r.call(e.callee)),n}}}),lu=m({"node_modules/object-keys/implementation.js"(e,t){var r,n,i,a,o,s,l,c,u,h,f,p;Object.keys||(n=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=su(),o=Object.prototype.propertyIsEnumerable,s=!o.call({toString:null},"toString"),l=o.call((function(){}),"prototype"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(e){var t=e.constructor;return t&&t.prototype===e},h={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if(typeof window>"u")return!1;for(var e in window)try{if(!h["$"+e]&&n.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{u(window[e])}catch{return!0}}catch{return!0}return!1}(),p=function(e){if(typeof window>"u"||!f)return u(e);try{return u(e)}catch{return!1}},r=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===i.call(e),o=a(e),u=t&&"[object String]"===i.call(e),h=[];if(!t&&!r&&!o)throw new TypeError("Object.keys called on a non-object");var f=l&&r;if(u&&e.length>0&&!n.call(e,0))for(var d=0;d0)for(var m=0;m2?arguments[2]:{},o=r(t);n&&(o=a.call(o,Object.getOwnPropertySymbols(t)));for(var s=0;se.length)&&(t=e.length);for(var r=0,n=new Array(t);r10)return!0;for(var t=0;t57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function P(e){return Object.keys(e).filter(L).concat(c(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function z(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);i1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i0)return function(e){if(!((e=String(e)).length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var o=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"days":case"day":case"d":return o*a;case"hours":case"hour":case"hrs":case"hr":case"h":return o*i;case"minutes":case"minute":case"mins":case"min":case"m":return o*n;case"seconds":case"second":case"secs":case"sec":case"s":return o*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}(e);if("number"===s&&!1===isNaN(e))return t.long?function(e){return o(e,a,"day")||o(e,i,"hour")||o(e,n,"minute")||o(e,r,"second")||e+" ms"}(e):function(e){return e>=a?Math.round(e/a)+"d":e>=i?Math.round(e/i)+"h":e>=n?Math.round(e/n)+"m":e>=r?Math.round(e/r)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}}),ku=m({"node_modules/stream-parser/node_modules/debug/src/debug.js"(e,t){var r;function n(t){function n(){if(n.enabled){var t=n,i=+new Date,a=i-(r||i);t.diff=a,t.prev=r,t.curr=i,r=i;for(var o=new Array(arguments.length),s=0;s=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:function(){try{return window.localStorage}catch{}}(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},e.enable(r())}}),Mu=m({"node_modules/stream-parser/index.js"(e,t){var r=wu(),n=Au()("stream-parser");function i(e){n("initializing parser stream"),e._parserBytesLeft=0,e._parserBuffers=[],e._parserBuffered=0,e._parserState=-1,e._parserCallback=null,"function"==typeof e.push&&(e._parserOutput=e.push.bind(e)),e._parserInit=!0}function a(e,t){r(!this._parserCallback,'there is already a "callback" set!'),r(isFinite(e)&&e>0,'can only buffer a finite number of bytes > 0, got "'+e+'"'),this._parserInit||i(this),n("buffering %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=0}function o(e,t){r(!this._parserCallback,'there is already a "callback" set!'),r(e>0,'can only skip > 0 bytes, got "'+e+'"'),this._parserInit||i(this),n("skipping %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=1}function s(e,t){r(!this._parserCallback,'There is already a "callback" set!'),r(e>0,'can only pass through > 0 bytes, got "'+e+'"'),this._parserInit||i(this),n("passing through %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=2}function l(e,t,r){this._parserInit||i(this),n("write(%o bytes)",e.length),"function"==typeof t&&(r=t),h(this,e,null,r)}function c(e,t,r){this._parserInit||i(this),n("transform(%o bytes)",e.length),"function"!=typeof t&&(t=this._parserOutput),h(this,e,t,r)}function u(e,t,r,i){if(e._parserBytesLeft-=t.length,n("%o bytes left for stream piece",e._parserBytesLeft),0===e._parserState?(e._parserBuffers.push(t),e._parserBuffered+=t.length):2===e._parserState&&r(t),0!==e._parserBytesLeft)return i;var a=e._parserCallback;if(a&&0===e._parserState&&e._parserBuffers.length>1&&(t=Buffer.concat(e._parserBuffers,e._parserBuffered)),0!==e._parserState&&(t=null),e._parserCallback=null,e._parserBuffered=0,e._parserState=-1,e._parserBuffers.splice(0),a){var o=[];t&&o.push(t),r&&o.push(r);var s=a.length>o.length;s&&o.push(f(i));var l=a.apply(e,o);if(!s||i===l)return i}}t.exports=function(e){var t=e&&"function"==typeof e._transform,r=e&&"function"==typeof e._write;if(!t&&!r)throw new Error("must pass a Writable or Transform stream in");n("extending Parser into stream"),e._bytes=a,e._skipBytes=o,t&&(e._passthrough=s),t?e._transform=c:e._write=l};var h=f((function e(t,r,n,i){return t._parserBytesLeft<=0?i(new Error("got data but not currently parsing anything")):r.length<=t._parserBytesLeft?function(){return u(t,r,n,i)}:function(){var a=r.slice(0,t._parserBytesLeft);return u(t,a,n,(function(o){return o?i(o):r.length>a.length?function(){return e(t,r.slice(a.length),n,i)}:void 0}))}}));function f(e){return function(){for(var t=e.apply(this,arguments);"function"==typeof t;)t=t();return t}}}}),Su=m({"node_modules/probe-image-size/lib/common.js"(e){var t=nu().Transform,r=Mu();function n(){t.call(this,{readableObjectMode:!0})}function i(e,t,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||"",this.name=this.constructor.name,this.message=e,t&&(this.code=t),r&&(this.statusCode=r)}n.prototype=Object.create(t.prototype),n.prototype.constructor=n,r(n.prototype),e.ParserStream=n,e.sliceEq=function(e,t,r){for(var n=t,i=0;i>4&15,i=15&e[4],a=e[5]>>4&15,s=r(e,6),l=8,c=0;ct.width||e.width===t.width&&e.height>t.height?e:t})),r=e.reduce((function(e,t){return e.height>t.height||e.height===t.height&&e.width>t.width?e:t}));return t.width>r.height||t.width===r.height&&t.height>r.width?t:r}(t.sizes),n=1;t.transforms.forEach((function(e){var t={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},r={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if("imir"===e.type&&(n=0===e.value?r[n]:t[n=t[n=r[n]]]),"irot"===e.type)for(var i=0;i0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,e)}},i.prototype.read_uint16=function(e){var t=this.input;if(e+2>t.length)throw r("unexpected EOF","EBADDATA");return this.big_endian?256*t[e]+t[e+1]:t[e]+256*t[e+1]},i.prototype.read_uint32=function(e){var t=this.input;if(e+4>t.length)throw r("unexpected EOF","EBADDATA");return this.big_endian?16777216*t[e]+65536*t[e+1]+256*t[e+2]+t[e+3]:t[e]+256*t[e+1]+65536*t[e+2]+16777216*t[e+3]},i.prototype.is_subifd_link=function(e,t){return 0===e&&34665===t||0===e&&34853===t||34665===e&&40965===t},i.prototype.exif_format_length=function(e){switch(e){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},i.prototype.exif_format_read=function(e,t){var r;switch(e){case 1:case 2:return this.input[t];case 6:return(r=this.input[t])|33554430*(128&r);case 3:return this.read_uint16(t);case 8:return(r=this.read_uint16(t))|131070*(32768&r);case 4:return this.read_uint32(t);case 9:return 0|this.read_uint32(t);default:return null}},i.prototype.scan_ifd=function(e,t,i){var a=this.read_uint16(t);t+=2;for(var o=0;othis.input.length)throw r("unexpected EOF","EBADDATA");for(var d=[],m=f,g=0;g0&&(this.ifds_to_read.push({id:s,offset:d[0]}),p=!0),!1===i({is_big_endian:this.big_endian,ifd:e,tag:s,format:l,count:c,entry_offset:t+this.start,data_length:h,data_offset:f+this.start,value:d,is_subifd_link:p}))return void(this.aborted=!0);t+=12}0===e&&this.ifds_to_read.push({id:1,offset:this.read_uint32(t)})},t.exports.ExifParser=i,t.exports.get_orientation=function(e){var t=0;try{return new i(e,0,e.length).each((function(e){if(0===e.ifd&&274===e.tag&&Array.isArray(e.value))return t=e.value[0],!1})),t}catch{return-1}}}}),Iu=m({"node_modules/probe-image-size/lib/parse_sync/avif.js"(e,t){var r=Su().str2arr,n=Su().sliceEq,i=Su().readUInt32BE,a=Eu(),o=Cu(),s=r("ftyp");t.exports=function(e){if(n(e,4,s)){var t=a.unbox(e,0);if(t){var r=a.getMimeType(t.data);if(r){for(var l,c=t.end;;){var u=a.unbox(e,c);if(!u)break;if(c=u.end,"mdat"===u.boxtype)return;if("meta"===u.boxtype){l=u.data;break}}if(l){var h=a.readSizeFromMeta(l);if(h){var f={width:h.width,height:h.height,type:r.type,mime:r.mime,wUnits:"px",hUnits:"px"};if(h.variants.length>1&&(f.variants=h.variants),h.orientation&&(f.orientation=h.orientation),h.exif_location&&h.exif_location.offset+h.exif_location.length<=e.length){var p=i(e,h.exif_location.offset),d=e.slice(h.exif_location.offset+p+4,h.exif_location.offset+h.exif_location.length),m=o.get_orientation(d);m>0&&(f.orientation=m)}return f}}}}}}}}),Lu=m({"node_modules/probe-image-size/lib/parse_sync/bmp.js"(e,t){var r=Su().str2arr,n=Su().sliceEq,i=Su().readUInt16LE,a=r("BM");t.exports=function(e){if(!(e.length<26)&&n(e,0,a))return{width:i(e,18),height:i(e,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}}),Pu=m({"node_modules/probe-image-size/lib/parse_sync/gif.js"(e,t){var r=Su().str2arr,n=Su().sliceEq,i=Su().readUInt16LE,a=r("GIF87a"),o=r("GIF89a");t.exports=function(e){if(!(e.length<10)&&(n(e,0,a)||n(e,0,o)))return{width:i(e,6),height:i(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}}}),zu=m({"node_modules/probe-image-size/lib/parse_sync/ico.js"(e,t){var r=Su().readUInt16LE;t.exports=function(e){var t=r(e,0),n=r(e,2),i=r(e,4);if(0===t&&1===n&&i){for(var a=[],o={width:0,height:0},s=0;so.width||c>o.height)&&(o=u)}return{width:o.width,height:o.height,variants:a,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}}}),Du=m({"node_modules/probe-image-size/lib/parse_sync/jpeg.js"(e,t){var r=Su().readUInt16BE,n=Su().str2arr,i=Su().sliceEq,a=Cu(),o=n("Exif\0\0");t.exports=function(e){if(!(e.length<2)&&255===e[0]&&216===e[1]&&255===e[2])for(var t=2;;){for(;;){if(e.length-t<2)return;if(255===e[t++])break}for(var n,s=e[t++];255===s;)s=e[t++];if(208<=s&&s<=217||1===s)n=0;else{if(!(192<=s&&s<=254))return;if(e.length-t<2)return;n=r(e,t)-2,t+=2}if(217===s||218===s)return;var l;if(225===s&&n>=10&&i(e,t,o)&&(l=a.get_orientation(e.slice(t+6,t+n))),n>=5&&192<=s&&s<=207&&196!==s&&200!==s&&204!==s){if(e.length-t0&&(c.orientation=l),c}t+=n}}}}),Ou=m({"node_modules/probe-image-size/lib/parse_sync/png.js"(e,t){var r=Su().str2arr,n=Su().sliceEq,i=Su().readUInt32BE,a=r("‰PNG\r\n\n"),o=r("IHDR");t.exports=function(e){if(!(e.length<24)&&n(e,0,a)&&n(e,12,o))return{width:i(e,16),height:i(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}}}),Ru=m({"node_modules/probe-image-size/lib/parse_sync/psd.js"(e,t){var r=Su().str2arr,n=Su().sliceEq,i=Su().readUInt32BE,a=r("8BPS\0");t.exports=function(e){if(!(e.length<22)&&n(e,0,a))return{width:i(e,18),height:i(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}}}),Fu=m({"node_modules/probe-image-size/lib/parse_sync/svg.js"(e,t){function r(e){return 32===e||9===e||13===e||10===e}function n(e){return"number"==typeof e&&isFinite(e)&&e>0}var i=/<[-_.:a-zA-Z0-9][^>]*>/,a=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,o=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,s=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,l=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,c=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function u(e){return c.test(e)?e.match(c)[0]:"px"}t.exports=function(e){if(function(e){var t=0,n=e.length;for(239===e[0]&&187===e[1]&&191===e[2]&&(t=3);t>14&16383),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function h(e,t){return{width:1+(e[t+6]<<16|e[t+5]<<8|e[t+4]),height:1+(e[t+9]<e.length)){for(;t+8=10?r=r||c(e,t+8):"VP8L"===p&&d>=9?r=r||u(e,t+8):"VP8X"===p&&d>=10?r=r||h(e,t+8):"EXIF"===p&&(i=o.get_orientation(e.slice(t+8,t+8+d)),t=1/0),t+=8+d}else t++;if(r)return i>0&&(r.orientation=i),r}}}}}),Nu=m({"node_modules/probe-image-size/lib/parsers_sync.js"(e,t){t.exports={avif:Iu(),bmp:Lu(),gif:Pu(),ico:zu(),jpeg:Du(),png:Ou(),psd:Ru(),svg:Fu(),tiff:Bu(),webp:ju()}}}),Uu=m({"node_modules/probe-image-size/sync.js"(e,t){var r=Nu();t.exports=function(e){return function(e){for(var t=Object.keys(r),n=0;n0;)g=h.c2p(w+_*M),_--;for(_=0;void 0===v&&_0;)x=f.c2p(T+_*S),_--;if(gz[0];if(D||O){var R=m+E/2,F=v+C/2;L+="transform:"+i(R+"px",F+"px")+"scale("+(D?-1:1)+","+(O?-1:1)+")"+i(-R+"px",-F+"px")+";"}}I.attr("style",L);var B=new Promise((function(e){if(u._hasZ)e();else if(u._hasSource)if(u._canvas&&u._canvas.el.width===k&&u._canvas.el.height===A&&u._canvas.source===u.source)e();else{var t=document.createElement("canvas");t.width=k,t.height=A;var r=t.getContext("2d",{willReadFrequently:!0});u._image=u._image||new Image;var n=u._image;n.onload=function(){r.drawImage(n,0,0),u._canvas={el:t,source:u.source},e()},n.setAttribute("src",u.source)}})).then((function(){var e;if(u._hasZ)e=j((function(e,t){var r=b[t][e];return n.isTypedArray(r)&&(r=Array.from(r)),r})).toDataURL("image/png");else if(u._hasSource)if(d)e=u.source;else{var t=u._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,k,A).data;e=j((function(e,r){var n=4*(r*k+e);return[t[n],t[n+1],t[n+2],t[n+3]]})).toDataURL("image/png")}I.attr({"xlink:href":e,height:C,width:E,x:m,y:v})}));e._promises.push(B)}function j(e){var t=document.createElement("canvas");t.width=E,t.height=C;var r,i=t.getContext("2d",{willReadFrequently:!0}),a=function(e){return n.constrain(Math.round(h.c2p(w+e*M)-m),0,E)},s=function(e){return n.constrain(Math.round(f.c2p(T+e*S)-v),0,C)},l=o.colormodel[u.colormodel],p=l.colormodel||u.colormodel,d=l.fmt;for(_=0;_0||r.inbox(o-s.y0,o-(s.y0+s.h*l.dy),0)>0)){var h,f=Math.floor((t-s.x0)/l.dx),p=Math.floor(Math.abs(o-s.y0)/l.dy);if(l._hasZ?h=s.z[p][f]:l._hasSource&&(h=l._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(f,p,1,1).data),h){var d,m=s.hi||l.hoverinfo;if(m){var g=m.split("+");-1!==g.indexOf("all")&&(g=["color"]),-1!==g.indexOf("color")&&(d=!0)}var y,v=a.colormodel[l.colormodel],x=v.colormodel||l.colormodel,_=x.length,b=l._scaler(h),w=v.suffix,T=[];(l.hovertemplate||d)&&(T.push("["+[b[0]+w[0],b[1]+w[1],b[2]+w[2]].join(", ")),4===_&&T.push(", "+b[3]+w[3]),T.push("]"),T=T.join(""),e.extraText=x.toUpperCase()+": "+T),i(l.hovertext)&&i(l.hovertext[p])?y=l.hovertext[p][f]:i(l.text)&&i(l.text[p])&&(y=l.text[p][f]);var k=u.c2p(s.y0+(p+.5)*l.dy),A=s.x0+(f+.5)*l.dx,M=s.y0+(p+.5)*l.dy,S="["+h.slice(0,l.colormodel.length).join(", ")+"]";return[n.extendFlat(e,{index:[p,f],x0:c.c2p(s.x0+f*l.dx),x1:c.c2p(s.x0+(f+1)*l.dx),y0:k,y1:k,color:b,xVal:A,xLabelVal:A,yVal:M,yLabelVal:M,zLabelVal:S,text:y,hovertemplateLabels:{zLabel:S,colorLabel:T,"color[0]Label":b[0]+w[0],"color[1]Label":b[1]+w[1],"color[2]Label":b[2]+w[2],"color[3]Label":b[3]+w[3]}})]}}}}}),Zu=m({"src/traces/image/event_data.js"(e,t){t.exports=function(e,t){return"xVal"in t&&(e.x=t.xVal),"yVal"in t&&(e.y=t.yVal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e.color=t.color,e.colormodel=t.trace.colormodel,e.z||(e.z=t.color),e}}}),Yu=m({"src/traces/image/index.js"(e,t){t.exports={attributes:Bl(),supplyDefaults:jl(),calc:qu(),plot:Hu(),style:Gu(),hoverPoints:Wu(),eventData:Zu(),moduleType:"trace",name:"image",basePlotModule:Ci(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}}}),Xu=m({"lib/image.js"(e,t){t.exports=Yu()}}),$u=m({"src/traces/pie/attributes.js"(e,t){var r=q(),n=Ma().attributes,i=j(),a=G(),{hovertemplateAttrs:o,texttemplateAttrs:s,templatefallbackAttrs:l}=Fe(),c=B().extendFlat,u=Oe().pattern,h=i({editType:"plot",arrayOk:!0,colorEditType:"plot"});t.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:a.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:u,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:c({},r.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:o({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:l(),texttemplate:s({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:l({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:c({},h,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:c({},h,{}),outsidetextfont:c({},h,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:c({},r.showlegend,{arrayOk:!0}),legend:c({},r.legend,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:c({},h,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:n({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"}}}}),Ku=m({"src/traces/pie/defaults.js"(e,t){var r=M(),n=ct(),i=$u(),a=Ma().defaults,o=Xa().handleText,s=ct().coercePattern;function l(e,t){var i=n.isArrayOrTypedArray(e),a=n.isArrayOrTypedArray(t),o=Math.min(i?e.length:1/0,a?t.length:1/0);if(isFinite(o)||(o=0),o&&a){for(var s,l=0;l0){s=!0;break}}s||(o=0)}return{hasLabels:i,hasValues:a,len:o}}function c(e,t,r,n,i){n("marker.line.width")&&n("marker.line.color",i?void 0:r.paper_bgcolor);var a=n("marker.colors");s(n,"marker.pattern",a),e.marker&&!t.marker.pattern.fgcolor&&(t.marker.pattern.fgcolor=e.marker.colors),t.marker.pattern.bgcolor||(t.marker.pattern.bgcolor=r.paper_bgcolor)}t.exports={handleLabelsAndValues:l,handleMarkerDefaults:c,supplyDefaults:function(e,t,r,s){function u(r,a){return n.coerce(e,t,i,r,a)}var h=l(u("labels"),u("values")),f=h.len;if(t._hasLabels=h.hasLabels,t._hasValues=h.hasValues,!t._hasLabels&&t._hasValues&&(u("label0"),u("dlabel")),f){t._length=f,c(e,t,s,u,!0),u("scalegroup");var p,d=u("text"),m=u("texttemplate");if(u("texttemplatefallback"),m||(p=u("textinfo",n.isArrayOrTypedArray(d)?"text+percent":"percent")),u("hovertext"),u("hovertemplate"),u("hovertemplatefallback"),m||p&&"none"!==p){var g=u("textposition");o(e,t,s,u,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(g)||"auto"===g||"outside"===g)&&u("automargin"),("inside"===g||"auto"===g||Array.isArray(g))&&u("insidetextorientation")}else"none"===p&&u("textposition","none");a(t,s,u);var y=u("hole");if(u("title.text")){var v=u("title.position",y?"middle center":"top center");!y&&"middle center"===v&&(t.title.position="top center"),n.coerceFont(u,"title.font",s.font)}u("sort"),u("direction"),u("rotation"),u("pull")}else t.visible=!1}}}}),Ju=m({"src/traces/pie/layout_attributes.js"(e,t){t.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),Qu=m({"src/traces/pie/layout_defaults.js"(e,t){var r=ct(),n=Ju();t.exports=function(e,t){function i(i,a){return r.coerce(e,t,n,i,a)}i("hiddenlabels"),i("piecolorway",t.colorway),i("extendpiecolors")}}}),eh=m({"src/traces/pie/calc.js"(e,t){var r=M(),n=F(),i=W(),a={};function o(e){return function(t,r){return!(!t||(t=n(t),!t.isValid()))&&(t=i.addOpacity(t,t.getAlpha()),e[r]||(e[r]=t),t)}}function s(e,t){var r,i=JSON.stringify(e),a=t[i];if(!a){for(a=e.slice(),r=0;r=0})),("funnelarea"===t.type?y:t.sort)&&a.sort((function(e,t){return t.v-e.v})),a[0]&&(a[0].vTotal=g),a},crossTraceCalc:function(e,t){var r=(t||{}).type;r||(r="pie");var n=e._fullLayout,i=e.calcdata,o=n[r+"colorway"],l=n["_"+r+"colormap"];n["extend"+r+"colors"]&&(o=s(o,a));for(var c=0,u=0;u"),name:h.hovertemplate||-1!==f.indexOf("name")?h.name:void 0,idealAlign:e.pxmid[0]<0?"left":"right",color:m.castOption(b.bgcolor,e.pts)||e.color,borderColor:m.castOption(b.bordercolor,e.pts),fontFamily:m.castOption(w.family,e.pts),fontSize:m.castOption(w.size,e.pts),fontColor:m.castOption(w.color,e.pts),nameLength:m.castOption(b.namelength,e.pts),textAlign:m.castOption(b.align,e.pts),hovertemplate:m.castOption(h.hovertemplate,e.pts),hovertemplateLabels:e,eventData:[g(e,h)]},{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:t,inOut_bbox:T}),e.bbox=T[0],c._hasHoverLabel=!0}c._hasHoverEvent=!0,t.emit("plotly_hover",{points:[g(e,h)],event:r.event})}})),e.on("mouseout",(function(e){var n=t._fullLayout,a=t._fullData[c.index],o=r.select(this).datum();c._hasHoverEvent&&(e.originalEvent=r.event,t.emit("plotly_unhover",{points:[g(o,a)],event:r.event}),c._hasHoverEvent=!1),c._hasHoverLabel&&(i.loneUnhover(n._hoverlayer.node()),c._hasHoverLabel=!1)})),e.on("click",(function(e){var n=t._fullLayout,a=t._fullData[c.index];t._dragging||!1===n.hovermode||(t._hoverdata=[g(e,a)],i.click(t,r.event))}))}function x(e,t,r){var n=m.castOption(e.insidetextfont.color,t.pts);!n&&e._input.textfont&&(n=m.castOption(e._input.textfont.color,t.pts));var i=m.castOption(e.insidetextfont.family,t.pts)||m.castOption(e.textfont.family,t.pts)||r.family,o=m.castOption(e.insidetextfont.size,t.pts)||m.castOption(e.textfont.size,t.pts)||r.size,s=m.castOption(e.insidetextfont.weight,t.pts)||m.castOption(e.textfont.weight,t.pts)||r.weight,l=m.castOption(e.insidetextfont.style,t.pts)||m.castOption(e.textfont.style,t.pts)||r.style,c=m.castOption(e.insidetextfont.variant,t.pts)||m.castOption(e.textfont.variant,t.pts)||r.variant,u=m.castOption(e.insidetextfont.textcase,t.pts)||m.castOption(e.textfont.textcase,t.pts)||r.textcase,h=m.castOption(e.insidetextfont.lineposition,t.pts)||m.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=m.castOption(e.insidetextfont.shadow,t.pts)||m.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n||a.contrast(t.color),family:i,size:o,weight:s,style:l,variant:c,textcase:u,lineposition:h,shadow:f}}function _(e,t){for(var r,n,i=0;it&&t>n||r=-4;g-=2)y(Math.PI*g,"tan");for(g=4;g>=-4;g-=2)y(Math.PI*(g+1),"tan")}if(h||p){for(g=4;g>=-4;g-=2)y(Math.PI*(g+1.5),"rad");for(g=4;g>=-4;g-=2)y(Math.PI*(g+.5),"rad")}}if(s||d||h){var v=Math.sqrt(e.width*e.width+e.height*e.height);if((a={scale:i*n*2/v,rCenter:1-i,rotate:0}).textPosAngle=(t.startangle+t.stopangle)/2,a.scale>=1)return a;m.push(a)}(d||p)&&((a=T(e,n,o,l,c)).textPosAngle=(t.startangle+t.stopangle)/2,m.push(a)),(d||f)&&((a=k(e,n,o,l,c)).textPosAngle=(t.startangle+t.stopangle)/2,m.push(a));for(var x=0,_=0,b=0;b=1)break}return m[x]}function T(e,t,r,n,i){t=Math.max(0,t-2*d);var a=e.width/e.height,o=S(a,n,t,r);return{scale:2*o/e.height,rCenter:A(a,o/t),rotate:M(i)}}function k(e,t,r,n,i){t=Math.max(0,t-2*d);var a=e.height/e.width,o=S(a,n,t,r);return{scale:2*o/e.width,rCenter:A(a,o/t),rotate:M(i+Math.PI/2)}}function A(e,t){return Math.cos(t)-e*t}function M(e){return(180/Math.PI*e+720)%180-90}function S(e,t,r,n){var i=e+1/(2*Math.tan(t));return r*Math.min(1/(Math.sqrt(i*i+.5)+i),n/(Math.sqrt(e*e+n/2)+e))}function E(e,t){return e.v!==t.vTotal||t.trace.hole?Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2):1}function C(e,t){var r=t.pxmid[0],n=t.pxmid[1],i=e.width/2,a=e.height/2;return r<0&&(i*=-1),n<0&&(a*=-1),{scale:1,rCenter:1,rotate:0,x:i+Math.abs(a)*(i>0?1:-1)/2,y:a/(1+r*r/(n*n)),outside:!0}}function I(e,t){var r,n,i,a=e.trace,o={x:e.cx,y:e.cy},s={tx:0,ty:0};s.ty+=a.title.font.size,i=P(a),-1!==a.title.position.indexOf("top")?(o.y-=(1+i)*e.r,s.ty-=e.titleBox.height):-1!==a.title.position.indexOf("bottom")&&(o.y+=(1+i)*e.r);var l=function(e,t){return e/(void 0===t?1:t)}(e.r,e.trace.aspectratio),c=t.w*(a.domain.x[1]-a.domain.x[0])/2;return-1!==a.title.position.indexOf("left")?(c+=l,o.x-=(1+i)*l,s.tx+=e.titleBox.width/2):-1!==a.title.position.indexOf("center")?c*=2:-1!==a.title.position.indexOf("right")&&(c+=l,o.x+=(1+i)*l,s.tx-=e.titleBox.width/2),r=c/e.titleBox.width,n=L(e,t)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function L(e,t){var r=e.trace,n=t.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(e.titleBox.height,n/2)}function P(e){var t,r=e.pull;if(!r)return 0;if(s.isArrayOrTypedArray(r))for(r=0,t=0;tr&&(r=e.pull[t]);return r}function z(e,t){for(var r=[],n=0;n1?u=(c=r.r)/i.aspectratio:c=(u=r.r)*i.aspectratio,l=(c*=(1+i.baseratio)/2)*u}o=Math.min(o,l/r.vTotal)}for(n=0;n")}if(o){var _=s.castOption(a,t.i,"texttemplate");if(_){var b={label:(n=t).label,value:n.v,valueLabel:m.formatPieValue(n.v,i.separators),percent:n.v/r.vTotal,percentLabel:m.formatPiePercent(n.v/r.vTotal,i.separators),color:n.color,text:n.text,customdata:s.castOption(a,n.i,"customdata")},w=m.getFirstFilled(a.text,t.pts);(y(w)||""===w)&&(b.text=w),t.text=s.texttemplateString({data:[b,a._meta],fallback:a.texttemplatefallback,labels:b,locale:e._fullLayout._d3locale,template:_})}else t.text=""}}function R(e,t){var r=e.rotate*Math.PI/180,n=Math.cos(r),i=Math.sin(r),a=(t.left+t.right)/2,o=(t.top+t.bottom)/2;e.textX=a*n-o*i,e.textY=a*i+o*n,e.noCenter=!0}t.exports={plot:function(e,t){var i=e._context.staticPlot,h=e._fullLayout,d=h._size;p("pie",h),_(t,e),z(t,d);var g=s.makeTraceGroups(h._pielayer,t,"trace").each((function(t){var p=r.select(this),g=t[0],y=g.trace;(function(e){var t,r,n,i=e[0],a=i.r,o=i.trace,s=m.getRotationAngle(o.rotation),l=2*Math.PI/i.vTotal,c="px0",u="px1";if("counterclockwise"===o.direction){for(t=0;ti.vTotal/2?1:0,r.halfangle=Math.PI*Math.min(r.v/i.vTotal,.5),r.ring=1-o.hole,r.rInscribed=E(r,i))})(t),p.attr("stroke-linejoin","round"),p.each((function(){var _=r.select(this).selectAll("g.slice").data(t);_.enter().append("g").classed("slice",!0),_.exit().remove();var b=[[[],[]],[[],[]]],T=!1;_.each((function(n,a){if(n.hidden)r.select(this).selectAll("path,g").remove();else{n.pointNumber=n.i,n.curveNumber=y.index,b[n.pxmid[1]<0?0:1][n.pxmid[0]<0?0:1].push(n);var l=g.cx,c=g.cy,p=r.select(this),d=p.selectAll("path.surface").data([n]);if(d.enter().append("path").classed("surface",!0).style({"pointer-events":i?"none":"all"}),p.call(v,e,t),y.pull){var _=+m.castOption(y.pull,n.pts)||0;_>0&&(l+=_*n.pxmid[0],c+=_*n.pxmid[1])}n.cxFinal=l,n.cyFinal=c;var k=y.hole;if(n.v===g.vTotal){var A="M"+(l+n.px0[0])+","+(c+n.px0[1])+L(n.px0,n.pxmid,!0,1)+L(n.pxmid,n.px0,!0,1)+"Z";k?d.attr("d","M"+(l+k*n.px0[0])+","+(c+k*n.px0[1])+L(n.px0,n.pxmid,!1,k)+L(n.pxmid,n.px0,!1,k)+"Z"+A):d.attr("d",A)}else{var M=L(n.px0,n.px1,!0,1);if(k){var S=1-k;d.attr("d","M"+(l+k*n.px1[0])+","+(c+k*n.px1[1])+L(n.px1,n.px0,!1,k)+"l"+S*n.px0[0]+","+S*n.px0[1]+M+"Z")}else d.attr("d","M"+l+","+c+"l"+n.px0[0]+","+n.px0[1]+M+"Z")}O(e,n,g);var E=m.castOption(y.textposition,n.pts),I=p.selectAll("g.slicetext").data(n.text&&"none"!==E?[0]:[]);I.enter().append("g").classed("slicetext",!0),I.exit().remove(),I.each((function(){var i=s.ensureSingle(r.select(this),"text","",(function(e){e.attr("data-notex",1)})),p=s.ensureUniformFontSize(e,"outside"===E?function(e,t,r){return{color:m.castOption(e.outsidetextfont.color,t.pts)||m.castOption(e.textfont.color,t.pts)||r.color,family:m.castOption(e.outsidetextfont.family,t.pts)||m.castOption(e.textfont.family,t.pts)||r.family,size:m.castOption(e.outsidetextfont.size,t.pts)||m.castOption(e.textfont.size,t.pts)||r.size,weight:m.castOption(e.outsidetextfont.weight,t.pts)||m.castOption(e.textfont.weight,t.pts)||r.weight,style:m.castOption(e.outsidetextfont.style,t.pts)||m.castOption(e.textfont.style,t.pts)||r.style,variant:m.castOption(e.outsidetextfont.variant,t.pts)||m.castOption(e.textfont.variant,t.pts)||r.variant,textcase:m.castOption(e.outsidetextfont.textcase,t.pts)||m.castOption(e.textfont.textcase,t.pts)||r.textcase,lineposition:m.castOption(e.outsidetextfont.lineposition,t.pts)||m.castOption(e.textfont.lineposition,t.pts)||r.lineposition,shadow:m.castOption(e.outsidetextfont.shadow,t.pts)||m.castOption(e.textfont.shadow,t.pts)||r.shadow}}(y,n,h.font):x(y,n,h.font));i.text(n.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(o.font,p).call(u.convertToTspans,e);var d,v=o.bBox(i.node());if("outside"===E)d=C(v,n);else if(d=w(v,n,g),"auto"===E&&d.scale<1){var _=s.ensureUniformFontSize(e,y.outsidetextfont);i.call(o.font,_),d=C(v=o.bBox(i.node()),n)}var b=d.textPosAngle,k=void 0===b?n.pxmid:D(g.r,b);if(d.targetX=l+k[0]*d.rCenter+(d.x||0),d.targetY=c+k[1]*d.rCenter+(d.y||0),R(d,v),d.outside){var A=d.targetY;n.yLabelMin=A-v.height/2,n.yLabelMid=A,n.yLabelMax=A+v.height/2,n.labelExtraX=0,n.labelExtraY=0,T=!0}d.fontSize=p.size,f(y.type,d,h),t[a].transform=d,s.setTransormAndDisplay(i,d)}))}function L(e,t,r,i){var a=i*(t[0]-e[0]),o=i*(t[1]-e[1]);return"a"+i*g.r+","+i*g.r+" 0 "+n.largeArc+(r?" 1 ":" 0 ")+a+","+o}}));var k=r.select(this).selectAll("g.titletext").data(y.title.text?[0]:[]);if(k.enter().append("g").classed("titletext",!0),k.exit().remove(),k.each((function(){var t,n=s.ensureSingle(r.select(this),"text","",(function(e){e.attr("data-notex",1)})),i=y.title.text;y._meta&&(i=s.templateString(i,y._meta)),n.text(i).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(o.font,y.title.font).call(u.convertToTspans,e),t="middle center"===y.title.position?function(e){var t=Math.sqrt(e.titleBox.width*e.titleBox.width+e.titleBox.height*e.titleBox.height);return{x:e.cx,y:e.cy,scale:e.trace.hole*e.r*2/t,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}(g):I(g,d),n.attr("transform",c(t.x,t.y)+l(Math.min(1,t.scale))+c(t.tx,t.ty))})),T&&function(e,t){var r,n,i,a,o,l,c,u,h,f,p,d,g;function y(e,t){return e.pxmid[1]-t.pxmid[1]}function v(e,t){return t.pxmid[1]-e.pxmid[1]}function x(e,r){r||(r={});var i,u,h,p,d=r.labelExtraY+(n?r.yLabelMax:r.yLabelMin),g=n?e.yLabelMin:e.yLabelMax,y=n?e.yLabelMax:e.yLabelMin,v=e.cyFinal+o(e.px0[1],e.px1[1]),x=d-g;if(x*c>0&&(e.labelExtraY=x),s.isArrayOrTypedArray(t.pull))for(u=0;u=(m.castOption(t.pull,h.pts)||0))&&((e.pxmid[1]-h.pxmid[1])*c>0?(x=h.cyFinal+o(h.px0[1],h.px1[1])-g-e.labelExtraY)*c>0&&(e.labelExtraY+=x):(y+e.labelExtraY-v)*c>0&&(i=3*l*Math.abs(u-f.indexOf(e)),(p=h.cxFinal+a(h.px0[0],h.px1[0])+i-(e.cxFinal+e.pxmid[0])-e.labelExtraX)*l>0&&(e.labelExtraX+=p)))}for(n=0;n<2;n++)for(i=n?y:v,o=n?Math.max:Math.min,c=n?1:-1,r=0;r<2;r++){for(a=r?Math.max:Math.min,l=r?1:-1,(u=e[n][r]).sort(i),h=e[1-n][r],f=h.concat(u),d=[],p=0;pMath.abs(h)?l+="l"+h*e.pxmid[0]/e.pxmid[1]+","+h+"H"+(o+e.labelExtraX+c):l+="l"+e.labelExtraX+","+u+"v"+(h-u)+"h"+c}else l+="V"+(e.yLabelMid+e.labelExtraY)+"h"+c;s.ensureSingle(n,"path","textline").call(a.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:l,fill:"none"})}else n.select("path.textline").remove()}))}(_,y),T&&y.automargin){var A=o.bBox(p.node()),M=y.domain,S=d.w*(M.x[1]-M.x[0]),E=d.h*(M.y[1]-M.y[0]),L=(.5*S-g.r)/d.w,P=(.5*E-g.r)/d.h;n.autoMargin(e,"pie."+y.uid+".automargin",{xl:M.x[0]-L,xr:M.x[1]+L,yb:M.y[0]-P,yt:M.y[1]+P,l:Math.max(g.cx-g.r-A.left,0),r:Math.max(A.right-(g.cx+g.r),0),b:Math.max(A.bottom-(g.cy+g.r),0),t:Math.max(g.cy-g.r-A.top,0),pad:5})}}))}));setTimeout((function(){g.selectAll("tspan").each((function(){var e=r.select(this);e.attr("dy")&&e.attr("dy",e.attr("dy"))}))}),0)},formatSliceLabel:O,transformInsideText:w,determineInsideTextFont:x,positionTitleOutside:I,prerenderTitles:_,layoutAreas:z,attachFxHandlers:v,computeTransform:R}}}),nh=m({"src/traces/pie/style.js"(e,t){var r=b(),n=kr(),i=Qa().resizeText;t.exports=function(e){var t=e._fullLayout._pielayer.selectAll(".trace");i(e,t,"pie"),t.each((function(t){var i=t[0].trace,a=r.select(this);a.style({opacity:i.opacity}),a.selectAll("path.surface").each((function(t){r.select(this).call(n,t,i,e)}))}))}}}),ih=m({"src/traces/pie/base_plot.js"(e){var t=At();e.name="pie",e.plot=function(r,n,i,a){t.plotBasePlot(e.name,r,n,i,a)},e.clean=function(r,n,i,a){t.cleanBasePlot(e.name,r,n,i,a)}}}),ah=m({"src/traces/pie/index.js"(e,t){t.exports={attributes:$u(),supplyDefaults:Ku().supplyDefaults,supplyLayoutDefaults:Qu(),layoutAttributes:Ju(),calc:eh().calc,crossTraceCalc:eh().crossTraceCalc,plot:rh().plot,style:nh(),styleOne:kr(),moduleType:"trace",name:"pie",basePlotModule:ih(),categories:["pie-like","pie","showLegend"],meta:{}}}}),oh=m({"lib/pie.js"(e,t){t.exports=ah()}}),sh=m({"src/traces/sunburst/base_plot.js"(e){var t=At();e.name="sunburst",e.plot=function(r,n,i,a){t.plotBasePlot(e.name,r,n,i,a)},e.clean=function(r,n,i,a){t.cleanBasePlot(e.name,r,n,i,a)}}}),lh=m({"src/traces/sunburst/constants.js"(e,t){t.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}}}),ch=m({"src/traces/sunburst/attributes.js"(e,t){var r=q(),{hovertemplateAttrs:n,texttemplateAttrs:i,templatefallbackAttrs:a}=Fe(),o=zt(),s=Ma().attributes,l=$u(),c=lh(),u=B().extendFlat,h=Oe().pattern;t.exports={labels:{valType:"data_array",editType:"calc"},parents:{valType:"data_array",editType:"calc"},values:{valType:"data_array",editType:"calc"},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc"},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc"},level:{valType:"any",editType:"plot",anim:!0},maxdepth:{valType:"integer",editType:"plot",dflt:-1},marker:u({colors:{valType:"data_array",editType:"calc"},line:{color:u({},l.marker.line.color,{dflt:null}),width:u({},l.marker.line.width,{dflt:1}),editType:"calc"},pattern:h,editType:"calc"},o("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:l.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:i({editType:"plot"},{keys:c.eventDataKeys.concat(["label","value"])}),texttemplatefallback:a({editType:"plot"}),hovertext:l.hovertext,hoverinfo:u({},r.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:n({},{keys:c.eventDataKeys}),hovertemplatefallback:a(),textfont:l.textfont,insidetextorientation:l.insidetextorientation,insidetextfont:l.insidetextfont,outsidetextfont:u({},l.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:l.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:s({name:"sunburst",trace:!0,editType:"calc"})}}}),uh=m({"src/traces/sunburst/layout_attributes.js"(e,t){t.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),hh=m({"src/traces/sunburst/defaults.js"(e,t){var r=ct(),n=ch(),i=Ma().defaults,a=Xa().handleText,o=Ku().handleMarkerDefaults,s=Yt(),l=s.hasColorscale,c=s.handleDefaults;t.exports=function(e,t,s,u){function h(i,a){return r.coerce(e,t,n,i,a)}var f=h("labels"),p=h("parents");if(f&&f.length&&p&&p.length){var d=h("values");d&&d.length?h("branchvalues"):h("count"),h("level"),h("maxdepth"),o(e,t,u,h);var m=t._hasColorscale=l(e,"marker","colors")||(e.marker||{}).coloraxis;m&&c(e,t,u,h,{prefix:"marker.",cLetter:"c"}),h("leaf.opacity",m?1:.7);var g=h("text");h("texttemplate"),h("texttemplatefallback"),t.texttemplate||h("textinfo",r.isArrayOrTypedArray(g)?"text+label":"label"),h("hovertext"),h("hovertemplate"),h("hovertemplatefallback"),a(e,t,u,h,"auto",{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),h("insidetextorientation"),h("sort"),h("rotation"),h("root.color"),i(t,u,h),t._length=null}else t.visible=!1}}}),fh=m({"src/traces/sunburst/layout_defaults.js"(e,t){var r=ct(),n=uh();t.exports=function(e,t){function i(i,a){return r.coerce(e,t,n,i,a)}i("sunburstcolorway",t.colorway),i("extendsunburstcolors")}}}),ph=m({"node_modules/d3-hierarchy/dist/d3-hierarchy.js"(e,t){var r,n;r=e,n=function(e){function t(e,t){return e.parent===t.parent?1:2}function r(e,t){return e+t.x}function n(e,t){return Math.max(e,t.y)}function i(e){var t=0,r=e.children,n=r&&r.length;if(n)for(;--n>=0;)t+=r[n].value;else t=1;e.value=t}function a(e,t){var r,n,i,a,s,u=new c(e),h=+e.value&&(u.value=e.value),f=[u];for(null==t&&(t=o);r=f.pop();)if(h&&(r.value=+r.data.value),(i=t(r.data))&&(s=i.length))for(r.children=new Array(s),a=s-1;a>=0;--a)f.push(n=r.children[a]=new c(i[a])),n.parent=r,n.depth=r.depth+1;return u.eachBefore(l)}function o(e){return e.children}function s(e){e.data=e.data.data}function l(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function c(e){this.data=e,this.depth=this.height=0,this.parent=null}c.prototype=a.prototype={constructor:c,count:function(){return this.eachAfter(i)},each:function(e){var t,r,n,i,a=this,o=[a];do{for(t=o.reverse(),o=[];a=t.pop();)if(e(a),r=a.children)for(n=0,i=r.length;n=0;--r)i.push(t[r]);return this},sum:function(e){return this.eachAfter((function(t){for(var r=+e(t.data)||0,n=t.children,i=n&&n.length;--i>=0;)r+=n[i].value;t.value=r}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,r=function(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),i=null;for(e=r.pop(),t=n.pop();e===t;)i=e,e=r.pop(),t=n.pop();return i}(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var i=n.length;e!==r;)n.splice(i,0,e),e=e.parent;return n},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(r){r!==e&&t.push({source:r.parent,target:r})})),t},copy:function(){return a(this).eachBefore(s)}};var u=Array.prototype.slice;function h(e){for(var t,r,n=0,i=(e=function(e){for(var t,r,n=e.length;n;)r=Math.random()*n--|0,t=e[n],e[n]=e[r],e[r]=t;return e}(u.call(e))).length,a=[];n0&&r*r>n*n+i*i}function m(e,t){for(var r=0;r(o*=o)?(n=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-n*n)),r.x=e.x-n*s-a*l,r.y=e.y-n*l+a*s):(n=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-n*n)),r.x=t.x+n*s-a*l,r.y=t.y+n*l+a*s)):(r.x=t.x+r.r,r.y=t.y)}function _(e,t){var r=e.r+t.r-1e-6,n=t.x-e.x,i=t.y-e.y;return r>0&&r*r>n*n+i*i}function b(e){var t=e._,r=e.next._,n=t.r+r.r,i=(t.x*r.r+r.x*t.r)/n,a=(t.y*r.r+r.y*t.r)/n;return i*i+a*a}function w(e){this._=e,this.next=null,this.previous=null}function T(e){if(!(i=e.length))return 0;var t,r,n,i,a,o,s,l,c,u,f;if((t=e[0]).x=0,t.y=0,!(i>1))return t.r;if(r=e[1],t.x=-r.r,r.x=t.r,r.y=0,!(i>2))return t.r+r.r;x(r,t,n=e[2]),t=new w(t),r=new w(r),n=new w(n),t.next=n.previous=r,r.next=t.previous=n,n.next=r.previous=t;e:for(s=3;sf&&(f=s),g=u*u*m,(p=Math.max(f/g,g/h))>d){u-=s;break}d=p}y.push(o={value:u,dice:l1?t:1)},r}(H),Z=function e(t){function r(e,r,n,i,a){if((o=e._squarify)&&o.ratio===t)for(var o,s,l,c,u,h=-1,f=o.length,p=e.value;++h1?t:1)},r}(H);e.cluster=function(){var e=t,i=1,a=1,o=!1;function s(t){var s,l=0;t.eachAfter((function(t){var i=t.children;i?(t.x=function(e){return e.reduce(r,0)/e.length}(i),t.y=function(e){return 1+e.reduce(n,0)}(i)):(t.x=s?l+=e(t,s):0,t.y=0,s=t)}));var c=function(e){for(var t;t=e.children;)e=t[0];return e}(t),u=function(e){for(var t;t=e.children;)e=t[t.length-1];return e}(t),h=c.x-e(c,u)/2,f=u.x+e(u,c)/2;return t.eachAfter(o?function(e){e.x=(e.x-t.x)*i,e.y=(t.y-e.y)*a}:function(e){e.x=(e.x-h)/(f-h)*i,e.y=(1-(t.y?e.y/t.y:1))*a})}return s.separation=function(t){return arguments.length?(e=t,s):e},s.size=function(e){return arguments.length?(o=!1,i=+e[0],a=+e[1],s):o?null:[i,a]},s.nodeSize=function(e){return arguments.length?(o=!0,i=+e[0],a=+e[1],s):o?[i,a]:null},s},e.hierarchy=a,e.pack=function(){var e=null,t=1,r=1,n=A;function i(i){return i.x=t/2,i.y=r/2,e?i.eachBefore(E(e)).eachAfter(C(n,.5)).eachBefore(I(1)):i.eachBefore(E(S)).eachAfter(C(A,1)).eachAfter(C(n,i.r/Math.min(t,r))).eachBefore(I(Math.min(t,r)/(2*i.r))),i}return i.radius=function(t){return arguments.length?(e=function(e){return null==e?null:k(e)}(t),i):e},i.size=function(e){return arguments.length?(t=+e[0],r=+e[1],i):[t,r]},i.padding=function(e){return arguments.length?(n="function"==typeof e?e:M(+e),i):n},i},e.packEnclose=h,e.packSiblings=function(e){return T(e),e},e.partition=function(){var e=1,t=1,r=0,n=!1;function i(i){var a=i.height+1;return i.x0=i.y0=r,i.x1=e,i.y1=t/a,i.eachBefore(function(e,t){return function(n){n.children&&P(n,n.x0,e*(n.depth+1)/t,n.x1,e*(n.depth+2)/t);var i=n.x0,a=n.y0,o=n.x1-r,s=n.y1-r;o0)throw new Error("cycle");return a}return r.id=function(t){return arguments.length?(e=k(t),r):e},r.parentId=function(e){return arguments.length?(t=k(e),r):t},r},e.tree=function(){var e=F,t=1,r=1,n=null;function i(i){var l=function(e){for(var t,r,n,i,a,o=new V(e,0),s=[o];t=s.pop();)if(n=t._.children)for(t.children=new Array(a=n.length),i=a-1;i>=0;--i)s.push(r=t.children[i]=new V(n[i],i)),r.parent=t;return(o.parent=new V(null,0)).children=[o],o}(i);if(l.eachAfter(a),l.parent.m=-l.z,l.eachBefore(o),n)i.eachBefore(s);else{var c=i,u=i,h=i;i.eachBefore((function(e){e.xu.x&&(u=e),e.depth>h.depth&&(h=e)}));var f=c===u?1:e(c,u)/2,p=f-c.x,d=t/(u.x+f+p),m=r/(h.depth||1);i.eachBefore((function(e){e.x=(e.x+p)*d,e.y=e.depth*m}))}return i}function a(t){var r=t.children,n=t.parent.children,i=t.i?n[t.i-1]:null;if(r){!function(e){for(var t,r=0,n=0,i=e.children,a=i.length;--a>=0;)(t=i[a]).z+=r,t.m+=r,r+=t.s+(n+=t.c)}(t);var a=(r[0].z+r[r.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,r,n){if(r){for(var i,a=t,o=t,s=r,l=a.parent.children[0],c=a.m,u=o.m,h=s.m,f=l.m;s=j(s),a=B(a),s&&a;)l=B(l),(o=j(o)).a=t,(i=s.z+h-a.z-c+e(s._,a._))>0&&(N(U(s,t,n),t,i),c+=i,u+=i),h+=s.m,c+=a.m,f+=l.m,u+=o.m;s&&!j(o)&&(o.t=s,o.m+=h-u),a&&!B(l)&&(l.t=a,l.m+=c-f,n=t)}return n}(t,i,t.parent.A||n[0])}function o(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(e){e.x*=t,e.y=e.depth*r}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(n=!1,t=+e[0],r=+e[1],i):n?null:[t,r]},i.nodeSize=function(e){return arguments.length?(n=!0,t=+e[0],r=+e[1],i):n?[t,r]:null},i},e.treemap=function(){var e=W,t=!1,r=1,n=1,i=[0],a=A,o=A,s=A,l=A,c=A;function u(e){return e.x0=e.y0=0,e.x1=r,e.y1=n,e.eachBefore(h),i=[0],t&&e.eachBefore(L),e}function h(t){var r=i[t.depth],n=t.x0+r,u=t.y0+r,h=t.x1-r,f=t.y1-r;h=r-1){var u=s[t];return u.x0=i,u.y0=a,u.x1=o,void(u.y1=l)}for(var h=c[t],f=n/2+h,p=t+1,d=r-1;p>>1;c[m]l-a){var v=(i*y+o*g)/n;e(t,p,g,i,a,v,l),e(p,r,y,v,a,o,l)}else{var x=(a*y+l*g)/n;e(t,p,g,i,a,o,x),e(p,r,y,i,x,o,l)}}(0,l,e.value,t,r,n,i)},e.treemapDice=P,e.treemapResquarify=Z,e.treemapSlice=q,e.treemapSliceDice=function(e,t,r,n,i){(1&e.depth?q:P)(e,t,r,n,i)},e.treemapSquarify=W,Object.defineProperty(e,"__esModule",{value:!0})},n("object"==typeof e&&typeof t<"u"?e:(r=r||self).d3=r.d3||{})}}),dh=m({"src/traces/sunburst/calc.js"(e){var t=ph(),r=M(),n=ct(),i=Yt().makeColorScaleFuncFromTrace,a=eh().makePullColorFn,o=eh().generateExtendedColors,s=Yt().calc,l=S().ALMOST_EQUAL,c={},u={},h={};function f(e,t,r){var n=0,i=e.children;if(i){for(var a=i.length,o=0;o=0};v?(c=Math.min(y.length,_.length),u=function(e){return M(y[e])&&S(e)},h=function(e){return String(y[e])}):(c=Math.min(x.length,_.length),u=function(e){return M(x[e])&&S(e)},h=function(e){return String(x[e])}),w&&(c=Math.min(c,b.length));for(var E=0;E1){for(var P=n.randstr(),z=0;z>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Ah(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Ah(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Yh.exec(e))?new Eh(t[1],t[2],t[3],1):(t=Xh.exec(e))?new Eh(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=$h.exec(e))?Ah(t[1],t[2],t[3],t[4]):(t=Kh.exec(e))?Ah(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Jh.exec(e))?Oh(t[1],t[2]/100,t[3]/100,1):(t=Qh.exec(e))?Oh(t[1],t[2]/100,t[3]/100,t[4]):ef.hasOwnProperty(e)?kh(ef[e]):"transparent"===e?new Eh(NaN,NaN,NaN,0):null}function kh(e){return new Eh(e>>16&255,e>>8&255,255&e,1)}function Ah(e,t,r,n){return n<=0&&(e=t=r=NaN),new Eh(e,t,r,n)}function Mh(e){return e instanceof vh||(e=Th(e)),e?new Eh((e=e.rgb()).r,e.g,e.b,e.opacity):new Eh}function Sh(e,t,r,n){return 1===arguments.length?Mh(e):new Eh(e,t,r,n??1)}function Eh(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function Ch(){return`#${Dh(this.r)}${Dh(this.g)}${Dh(this.b)}`}function Ih(){return`#${Dh(this.r)}${Dh(this.g)}${Dh(this.b)}${Dh(255*(isNaN(this.opacity)?1:this.opacity))}`}function Lh(){let e=Ph(this.opacity);return`${1===e?"rgb(":"rgba("}${zh(this.r)}, ${zh(this.g)}, ${zh(this.b)}${1===e?")":`, ${e})`}`}function Ph(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function zh(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Dh(e){return((e=zh(e))<16?"0":"")+e.toString(16)}function Oh(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Bh(e,t,r,n)}function Rh(e){if(e instanceof Bh)return new Bh(e.h,e.s,e.l,e.opacity);if(e instanceof vh||(e=Th(e)),!e)return new Bh;if(e instanceof Bh)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,s=a-i,l=(a+i)/2;return s?(o=t===a?(r-n)/s+6*(r0&&l<1?0:o,new Bh(o,s,l,e.opacity)}function Fh(e,t,r,n){return 1===arguments.length?Rh(e):new Bh(e,t,r,n??1)}function Bh(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function jh(e){return(e=(e||0)%360)<0?e+360:e}function Nh(e){return Math.max(0,Math.min(1,e||0))}function Uh(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}var Vh,qh,Hh,Gh,Wh,Zh,Yh,Xh,$h,Kh,Jh,Qh,ef,tf,rf,nf=d({"node_modules/d3-color/src/color.js"(){yh(),qh=1/(Vh=.7),Hh="\\s*([+-]?\\d+)\\s*",Gh="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Wh="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Zh=/^#([0-9a-f]{3,8})$/,Yh=new RegExp(`^rgb\\(${Hh},${Hh},${Hh}\\)$`),Xh=new RegExp(`^rgb\\(${Wh},${Wh},${Wh}\\)$`),$h=new RegExp(`^rgba\\(${Hh},${Hh},${Hh},${Gh}\\)$`),Kh=new RegExp(`^rgba\\(${Wh},${Wh},${Wh},${Gh}\\)$`),Jh=new RegExp(`^hsl\\(${Gh},${Wh},${Wh}\\)$`),Qh=new RegExp(`^hsla\\(${Gh},${Wh},${Wh},${Gh}\\)$`),ef={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},mh(vh,Th,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:xh,formatHex:xh,formatHex8:_h,formatHsl:bh,formatRgb:wh,toString:wh}),mh(Eh,Sh,gh(vh,{brighter(e){return e=null==e?qh:Math.pow(qh,e),new Eh(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Vh:Math.pow(Vh,e),new Eh(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Eh(zh(this.r),zh(this.g),zh(this.b),Ph(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:Ch,formatHex:Ch,formatHex8:Ih,formatRgb:Lh,toString:Lh})),mh(Bh,Fh,gh(vh,{brighter(e){return e=null==e?qh:Math.pow(qh,e),new Bh(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Vh:Math.pow(Vh,e),new Bh(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Eh(Uh(e>=240?e-240:e+120,i,n),Uh(e,i,n),Uh(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Bh(jh(this.h),Nh(this.s),Nh(this.l),Ph(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=Ph(this.opacity);return`${1===e?"hsl(":"hsla("}${jh(this.h)}, ${100*Nh(this.s)}%, ${100*Nh(this.l)}%${1===e?")":`, ${e})`}`}}))}}),af=d({"node_modules/d3-color/src/math.js"(){tf=Math.PI/180,rf=180/Math.PI}});function of(e){if(e instanceof lf)return new lf(e.l,e.a,e.b,e.opacity);if(e instanceof df)return mf(e);e instanceof Eh||(e=Mh(e));var t,r,n=ff(e.r),i=ff(e.g),a=ff(e.b),o=cf((.2225045*n+.7168786*i+.0606169*a)/yf);return n===i&&i===a?t=r=o:(t=cf((.4360747*n+.3850649*i+.1430804*a)/gf),r=cf((.0139322*n+.0971045*i+.7141733*a)/vf)),new lf(116*o-16,500*(t-o),200*(o-r),e.opacity)}function sf(e,t,r,n){return 1===arguments.length?of(e):new lf(e,t,r,n??1)}function lf(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function cf(e){return e>wf?Math.pow(e,.3333333333333333):e/bf+xf}function uf(e){return e>_f?e*e*e:bf*(e-xf)}function hf(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,.4166666666666667)-.055)}function ff(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function pf(e,t,r,n){return 1===arguments.length?function(e){if(e instanceof df)return new df(e.h,e.c,e.l,e.opacity);if(e instanceof lf||(e=of(e)),0===e.a&&0===e.b)return new df(NaN,0=1?(r=1,t-1):Math.floor(r*t),i=e[n],a=e[n+1],o=n>0?e[n-1]:2*i-a,s=n()=>e}});function Vf(e,t){return function(r){return e+r*t}}function qf(e,t){var r=t-e;return r?Vf(e,r>180||r<-180?r-360*Math.round(r/360):r):jf(isNaN(e)?t:e)}function Hf(e,t){var r=t-e;return r?Vf(e,r):jf(isNaN(e)?t:e)}var Gf=d({"node_modules/d3-interpolate/src/color.js"(){Uf()}});function Wf(e){return function(t){var r,n,i=t.length,a=new Array(i),o=new Array(i),s=new Array(i);for(r=0;ra&&(i=t.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:ap(r,n)})),a=hp.lastIndex;return a180?t+=360:t-e>180&&(e+=360),a.push({i:r.push(i(r)+"rotate(",null,n)-2,x:ap(e,t)})):t&&r.push(i(r)+"rotate("+t+n)}(a.rotate,o.rotate,s,l),function(e,t,r,a){e!==t?a.push({i:r.push(i(r)+"skewX(",null,n)-2,x:ap(e,t)}):t&&r.push(i(r)+"skewX("+t+n)}(a.skewX,o.skewX,s,l),function(e,t,r,n,a,o){if(e!==r||t!==n){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:ap(e,r)},{i:s-2,x:ap(t,n)})}else(1!==r||1!==n)&&a.push(i(a)+"scale("+r+","+n+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,l),a=o=null,function(e){for(var t,r=-1,n=l.length;++rpp,interpolateArray:()=>ep,interpolateBasis:()=>Rf,interpolateBasisClosed:()=>Bf,interpolateCubehelix:()=>Zp,interpolateCubehelixLong:()=>Yp,interpolateDate:()=>np,interpolateDiscrete:()=>mp,interpolateHcl:()=>qp,interpolateHclLong:()=>Hp,interpolateHsl:()=>Fp,interpolateHslLong:()=>Bp,interpolateHue:()=>yp,interpolateLab:()=>Np,interpolateNumber:()=>ap,interpolateNumberArray:()=>Kf,interpolateObject:()=>sp,interpolateRgb:()=>Zf,interpolateRgbBasis:()=>Yf,interpolateRgbBasisClosed:()=>Xf,interpolateRound:()=>xp,interpolateString:()=>cp,interpolateTransformCss:()=>Ip,interpolateTransformSvg:()=>Lp,interpolateZoom:()=>Dp,piecewise:()=>$p,quantize:()=>Jp});var td=d({"node_modules/d3-interpolate/src/index.js"(){dp(),rp(),Ff(),Nf(),ip(),gp(),vp(),op(),Qf(),lp(),_p(),fp(),Pp(),Op(),$f(),jp(),Up(),Gp(),Xp(),Kp(),Qp()}}),rd=m({"src/traces/sunburst/fill_one.js"(e,t){var r=er(),n=W();t.exports=function(e,t,i,a,o){var s=t.data.data,l=s.i,c=o||s.color;if(l>=0){t.i=s.i;var u=i.marker;u.pattern?(!u.colors||!u.pattern.shape)&&(u.color=c,t.color=c):(u.color=c,t.color=c),r.pointStyle(e,i,a,t)}else n.fill(e,c)}}}),nd=m({"src/traces/sunburst/style.js"(e,t){var r=b(),n=W(),i=ct(),a=Qa().resizeText,o=rd();function s(e,t,r,a){var s=t.data.data,l=!t.children,c=s.i,u=i.castOption(r,c,"marker.line.color")||n.defaultLine,h=i.castOption(r,c,"marker.line.width")||0;e.call(o,t,r,a).style("stroke-width",h).call(n.stroke,u).style("opacity",l?r.leaf.opacity:null)}t.exports={style:function(e){var t=e._fullLayout._sunburstlayer.selectAll(".trace");a(e,t,"sunburst"),t.each((function(t){var n=r.select(this),i=t[0].trace;n.style("opacity",i.opacity),n.selectAll("path.surface").each((function(t){r.select(this).call(s,t,i,e)}))}))},styleOne:s}}}),id=m({"src/traces/sunburst/helpers.js"(e){var t=ct(),r=W(),n=dr(),i=wr();function a(e){return e.data.data.pid}e.findEntryWithLevel=function(t,r){var n;return r&&t.eachAfter((function(t){if(e.getPtId(t)===r)return n=t.copy()})),n||t},e.findEntryWithChild=function(t,r){var n;return t.eachAfter((function(t){for(var i=t.children||[],a=0;a0)},e.getMaxDepth=function(e){return e.maxdepth>=0?e.maxdepth:1/0},e.isHeader=function(t,r){return!(e.isLeaf(t)||t.depth===r._maxDepth-1)},e.getParent=function(t,r){return e.findEntryWithLevel(t,a(r))},e.listPath=function(t,r){var n=t.parent;if(!n)return[];var i=r?[n.data[r]]:[n];return e.listPath(n,r).concat(i)},e.getPath=function(t){return e.listPath(t,"label").join("/")+"/"},e.formatValue=i.formatPieValue,e.formatPercent=function(e,r){var n=t.formatPercent(e,0);return"0%"===n&&(n=i.formatPiePercent(e,r)),n}}}),ad=m({"src/traces/sunburst/fx.js"(e,t){var r=b(),n=He(),i=Kt().appendArrayPointValue,a=Or(),o=ct(),s=dt(),l=id(),c=wr().formatPieValue;function u(e,t,r){for(var n=e.data.data,a={curveNumber:t.index,pointNumber:n.i,data:t._input,fullData:t},o=0;o"),name:A||z("name")?v.name:void 0,color:k("hoverlabel.bgcolor")||x.color,borderColor:k("hoverlabel.bordercolor"),fontFamily:k("hoverlabel.font.family"),fontSize:k("hoverlabel.font.size"),fontColor:k("hoverlabel.font.color"),fontWeight:k("hoverlabel.font.weight"),fontStyle:k("hoverlabel.font.style"),fontVariant:k("hoverlabel.font.variant"),nameLength:k("hoverlabel.namelength"),textAlign:k("hoverlabel.align"),hovertemplate:A,hovertemplateLabels:I,eventData:h};g&&(F.x0=E-n.rInscribed*n.rpx1,F.x1=E+n.rInscribed*n.rpx1,F.idealAlign=n.pxmid[0]<0?"left":"right"),y&&(F.x=E,F.idealAlign=E<0?"left":"right");var B=[];a.loneHover(F,{container:s._hoverlayer.node(),outerContainer:s._paper.node(),gd:i,inOut_bbox:B}),h[0].bbox=B[0],d._hasHoverLabel=!0}if(y){var j=e.select("path.surface");f.styleOne(j,n,v,i,{hovered:!0})}d._hasHoverEvent=!0,i.emit("plotly_hover",{points:h||[u(n,v,f.eventDataKeys)],event:r.event})}})),e.on("mouseout",(function(t){var n=i._fullLayout,o=i._fullData[d.index],s=r.select(this).datum();if(d._hasHoverEvent&&(t.originalEvent=r.event,i.emit("plotly_unhover",{points:[u(s,o,f.eventDataKeys)],event:r.event}),d._hasHoverEvent=!1),d._hasHoverLabel&&(a.loneUnhover(n._hoverlayer.node()),d._hasHoverLabel=!1),y){var l=e.select("path.surface");f.styleOne(l,s,o,i,{hovered:!1})}})),e.on("click",(function(e){var t=i._fullLayout,o=i._fullData[d.index],c=g&&(l.isHierarchyRoot(e)||l.isLeaf(e)),h=l.getPtId(e),p=l.isEntry(e)?l.findEntryWithChild(m,h):l.findEntryWithLevel(m,h),y=l.getPtId(p),v={points:[u(e,o,f.eventDataKeys)],event:r.event};c||(v.nextLevel=y);var x=s.triggerHandler(i,"plotly_"+d.type+"click",v);if(!1!==x&&t.hovermode&&(i._hoverdata=[u(e,o,f.eventDataKeys)],a.click(i,r.event)),!c&&!1!==x&&!i._dragging&&!i._transitioning){n.call("_storeDirectGUIEdit",o,t._tracePreGUI[o.uid],{level:o.level});var _={data:[{level:y}],traces:[d.index]},b={frame:{redraw:!1,duration:f.transitionTime},transition:{duration:f.transitionTime,easing:f.transitionEasing},mode:"immediate",fromcurrent:!0};a.loneUnhover(t._hoverlayer.node()),n.call("animate",i,_,b)}}))}}}),od=m({"src/traces/sunburst/plot.js"(e){var t=b(),r=ph(),n=(td(),v(ed)).interpolate,i=er(),a=ct(),o=Et(),s=Qa(),l=s.recordMinTextSize,c=s.clearMinTextSize,u=rh(),h=wr().getRotationAngle,f=u.computeTransform,p=u.transformInsideText,d=nd().styleOne,m=to().resizeText,g=ad(),y=lh(),x=id();function _(s,c,u,m){var v=s._context.staticPlot,_=s._fullLayout,b=!_.uniformtext.mode&&x.hasTransition(m),T=t.select(u).selectAll("g.slice"),k=c[0],A=k.trace,M=k.hierarchy,S=x.findEntryWithLevel(M,A.level),E=x.getMaxDepth(A),C=_._size,I=A.domain,L=C.w*(I.x[1]-I.x[0]),P=C.h*(I.y[1]-I.y[0]),z=.5*Math.min(L,P),D=k.cx=C.l+C.w*(I.x[1]+I.x[0])/2,O=k.cy=C.t+C.h*(1-I.y[0])-P/2;if(!S)return T.remove();var R=null,F={};b&&T.each((function(e){F[x.getPtId(e)]={rpx0:e.rpx0,rpx1:e.rpx1,x0:e.x0,x1:e.x1,transform:e.transform},!R&&x.isEntry(e)&&(R=e)}));var B=function(e){return r.partition().size([2*Math.PI,e.height+1])(e)}(S).descendants(),j=S.height+1,N=0,U=E;k.hasMultipleRoots&&x.isHierarchyRoot(S)&&(B=B.slice(1),j-=1,N=1,U+=1),B=B.filter((function(e){return e.y1<=U}));var V=h(A.rotation);V&&B.forEach((function(e){e.x0+=V,e.x1+=V}));var q=Math.min(j,E),H=function(e){return(e-N)/q*z},G=function(e,t){return[e*Math.cos(t),-e*Math.sin(t)]},W=function(e){return a.pathAnnulus(e.rpx0,e.rpx1,e.x0,e.x1,D,O)},Z=function(e){return D+w(e)[0]*(e.transform.rCenter||0)+(e.transform.x||0)},Y=function(e){return O+w(e)[1]*(e.transform.rCenter||0)+(e.transform.y||0)};(T=T.data(B,x.getPtId)).enter().append("g").classed("slice",!0),b?T.exit().transition().each((function(){var e=t.select(this);e.select("path.surface").transition().attrTween("d",(function(e){var t=function(e){var t,r=x.getPtId(e),i=F[r],a=F[x.getPtId(S)];if(a){var o=(e.x1>a.x1?2*Math.PI:0)+V;t=e.rpx1X?2*Math.PI:0)+V;t={x0:o,x1:o}}else t={rpx0:z,rpx1:z},a.extendFlat(t,J(e));else t={rpx0:0,rpx1:0};else t={x0:V,x1:V};return n(t,i)}(e);return function(e){return W(t(e))}})):h.attr("d",W),u.call(g,S,s,c,{eventDataKeys:y.eventDataKeys,transitionTime:y.CLICK_TRANSITION_TIME,transitionEasing:y.CLICK_TRANSITION_EASING}).call(x.setSliceCursor,s,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:s._transitioning}),h.call(d,r,A,s);var m=a.ensureSingle(u,"g","slicetext"),w=a.ensureSingle(m,"text","",(function(e){e.attr("data-notex",1)})),T=a.ensureUniformFontSize(s,x.determineTextFont(A,r,_.font));w.text(e.formatSliceLabel(r,S,A,c,_)).classed("slicetext",!0).attr("text-anchor","middle").call(i.font,T).call(o.convertToTspans,s);var M=i.bBox(w.node());r.transform=p(M,r,k),r.transform.targetX=Z(r),r.transform.targetY=Y(r);var E=function(e,t){var r=e.transform;return f(r,t),r.fontSize=T.size,l(A.type,r,_),a.getTextTransform(r)};b?w.transition().attrTween("transform",(function(e){var t=function(e){var t,r=F[x.getPtId(e)],i=e.transform;if(r)t=r;else if(t={rpx1:e.rpx1,transform:{textPosAngle:i.textPosAngle,scale:0,rotate:i.rotate,rCenter:i.rCenter,x:i.x,y:i.y}},R)if(e.parent)if(X){var o=e.x1>X?2*Math.PI:0;t.x0=t.x1=o}else a.extendFlat(t,J(e));else t.x0=t.x1=V;else t.x0=t.x1=V;var s=n(t.transform.textPosAngle,e.transform.textPosAngle),c=n(t.rpx1,e.rpx1),u=n(t.x0,e.x0),h=n(t.x1,e.x1),f=n(t.transform.scale,i.scale),p=n(t.transform.rotate,i.rotate),d=0===i.rCenter?3:0===t.transform.rCenter?1/3:1,m=n(t.transform.rCenter,i.rCenter);return function(e){var t=c(e),r=u(e),n=h(e),a=function(e){return m(Math.pow(e,d))}(e),o={pxmid:G(t,(r+n)/2),rpx1:t,transform:{textPosAngle:s(e),rCenter:a,x:i.x,y:i.y}};return l(A.type,i,_),{transform:{targetX:Z(o),targetY:Y(o),scale:f(e),rotate:p(e),rCenter:a}}}}(e);return function(e){return E(t(e),M)}})):w.attr("transform",E(r,M))}))}function w(e){return function(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}(e.rpx1,e.transform.textPosAngle)}e.plot=function(e,r,n,i){var a,o,s=e._fullLayout,l=s._sunburstlayer,u=!n,h=!s.uniformtext.mode&&x.hasTransition(n);c("sunburst",s),(a=l.selectAll("g.trace.sunburst").data(r,(function(e){return e[0].trace.uid}))).enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),a.order(),h?(i&&(o=i()),t.transition().duration(n.duration).ease(n.easing).each("end",(function(){o&&o()})).each("interrupt",(function(){o&&o()})).each((function(){l.selectAll("g.trace").each((function(t){_(e,t,this,n)}))}))):(a.each((function(t){_(e,t,this,n)})),s.uniformtext.mode&&m(e,s._sunburstlayer.selectAll(".trace"),"sunburst")),u&&a.exit().remove()},e.formatSliceLabel=function(e,t,r,n,i){var o=r.texttemplate,s=r.textinfo;if(!(o||s&&"none"!==s))return"";var l=i.separators,c=n[0],u=e.data.data,h=c.hierarchy,f=x.isHierarchyRoot(e),p=x.getParent(h,e),d=x.getValue(e);if(!o){var m,g=s.split("+"),y=function(e){return-1!==g.indexOf(e)},v=[];if(y("label")&&u.label&&v.push(u.label),u.hasOwnProperty("v")&&y("value")&&v.push(x.formatValue(u.v,l)),!f){y("current path")&&v.push(x.getPath(e.data));var _=0;y("percent parent")&&_++,y("percent entry")&&_++,y("percent root")&&_++;var b=_>1;if(_){var w,T=function(e){m=x.formatPercent(w,l),b&&(m+=" of "+e),v.push(m)};y("percent parent")&&!f&&(w=d/x.getValue(p),T("parent")),y("percent entry")&&(w=d/x.getValue(t),T("entry")),y("percent root")&&(w=d/x.getValue(h),T("root"))}}return y("text")&&(m=a.castOption(r,u.i,"text"),a.isValidTextValue(m)&&v.push(m)),v.join("
")}var k=a.castOption(r,u.i,"texttemplate");if(!k)return"";var A={};u.label&&(A.label=u.label),u.hasOwnProperty("v")&&(A.value=u.v,A.valueLabel=x.formatValue(u.v,l)),A.currentPath=x.getPath(e.data),f||(A.percentParent=d/x.getValue(p),A.percentParentLabel=x.formatPercent(A.percentParent,l),A.parent=x.getPtLabel(p)),A.percentEntry=d/x.getValue(t),A.percentEntryLabel=x.formatPercent(A.percentEntry,l),A.entry=x.getPtLabel(t),A.percentRoot=d/x.getValue(h),A.percentRootLabel=x.formatPercent(A.percentRoot,l),A.root=x.getPtLabel(h),u.hasOwnProperty("color")&&(A.color=u.color);var M=a.castOption(r,u.i,"text");return(a.isValidTextValue(M)||""===M)&&(A.text=M),A.customdata=a.castOption(r,u.i,"customdata"),a.texttemplateString({data:[A,r._meta],fallback:r.texttemplatefallback,labels:A,locale:i._d3locale,template:k})}}}),sd=m({"src/traces/sunburst/index.js"(e,t){t.exports={moduleType:"trace",name:"sunburst",basePlotModule:sh(),categories:[],animatable:!0,attributes:ch(),layoutAttributes:uh(),supplyDefaults:hh(),supplyLayoutDefaults:fh(),calc:dh().calc,crossTraceCalc:dh().crossTraceCalc,plot:od().plot,style:nd().style,colorbar:mi(),meta:{}}}}),ld=m({"lib/sunburst.js"(e,t){t.exports=sd()}}),cd=m({"src/traces/treemap/base_plot.js"(e){var t=At();e.name="treemap",e.plot=function(r,n,i,a){t.plotBasePlot(e.name,r,n,i,a)},e.clean=function(r,n,i,a){t.cleanBasePlot(e.name,r,n,i,a)}}}),ud=m({"src/traces/treemap/constants.js"(e,t){t.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}}}),hd=m({"src/traces/treemap/attributes.js"(e,t){var{hovertemplateAttrs:r,texttemplateAttrs:n,templatefallbackAttrs:i}=Fe(),a=zt(),o=Ma().attributes,s=$u(),l=ch(),c=ud(),u=B().extendFlat,h=Oe().pattern;t.exports={labels:l.labels,parents:l.parents,values:l.values,branchvalues:l.branchvalues,count:l.count,level:l.level,maxdepth:l.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:u({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:l.marker.colors,pattern:h,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:l.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},a("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:u({},s.textfont,{}),editType:"calc"},text:s.text,textinfo:l.textinfo,texttemplate:n({editType:"plot"},{keys:c.eventDataKeys.concat(["label","value"])}),texttemplatefallback:i({editType:"plot"}),hovertext:s.hovertext,hoverinfo:l.hoverinfo,hovertemplate:r({},{keys:c.eventDataKeys}),hovertemplatefallback:i(),textfont:s.textfont,insidetextfont:s.insidetextfont,outsidetextfont:u({},s.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:s.sort,root:l.root,domain:o({name:"treemap",trace:!0,editType:"calc"})}}}),fd=m({"src/traces/treemap/layout_attributes.js"(e,t){t.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),pd=m({"src/traces/treemap/defaults.js"(e,t){var r=ct(),n=hd(),i=W(),a=Ma().defaults,o=Xa().handleText,s=ci().TEXTPAD,l=Ku().handleMarkerDefaults,c=Yt(),u=c.hasColorscale,h=c.handleDefaults;t.exports=function(e,t,c,f){function p(i,a){return r.coerce(e,t,n,i,a)}var d=p("labels"),m=p("parents");if(d&&d.length&&m&&m.length){var g=p("values");g&&g.length?p("branchvalues"):p("count"),p("level"),p("maxdepth"),"squarify"===p("tiling.packing")&&p("tiling.squarifyratio"),p("tiling.flip"),p("tiling.pad");var y=p("text");p("texttemplate"),p("texttemplatefallback"),t.texttemplate||p("textinfo",r.isArrayOrTypedArray(y)?"text+label":"label"),p("hovertext"),p("hovertemplate"),p("hovertemplatefallback");var v=p("pathbar.visible");o(e,t,f,p,"auto",{hasPathbar:v,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),p("textposition");var x=-1!==t.textposition.indexOf("bottom");l(e,t,f,p),(t._hasColorscale=u(e,"marker","colors")||(e.marker||{}).coloraxis)?h(e,t,f,p,{prefix:"marker.",cLetter:"c"}):p("marker.depthfade",!(t.marker.colors||[]).length);var _=2*t.textfont.size;p("marker.pad.t",x?_/4:_),p("marker.pad.l",_/4),p("marker.pad.r",_/4),p("marker.pad.b",x?_:_/4),p("marker.cornerradius"),t._hovered={marker:{line:{width:2,color:i.contrast(f.paper_bgcolor)}}},v&&(p("pathbar.thickness",t.pathbar.textfont.size+2*s),p("pathbar.side"),p("pathbar.edgeshape")),p("sort"),p("root.color"),a(t,f,p),t._length=null}else t.visible=!1}}}),dd=m({"src/traces/treemap/layout_defaults.js"(e,t){var r=ct(),n=fd();t.exports=function(e,t){function i(i,a){return r.coerce(e,t,n,i,a)}i("treemapcolorway",t.colorway),i("extendtreemapcolors")}}}),md=m({"src/traces/treemap/calc.js"(e){var t=dh();e.calc=function(e,r){return t.calc(e,r)},e.crossTraceCalc=function(e){return t._runCrossTraceCalc("treemap",e)}}}),gd=m({"src/traces/treemap/flip_tree.js"(e,t){t.exports=function e(t,r,n){var i;n.swapXY&&(i=t.x0,t.x0=t.y0,t.y0=i,i=t.x1,t.x1=t.y1,t.y1=i),n.flipX&&(i=t.x0,t.x0=r[0]-t.x1,t.x1=r[0]-i),n.flipY&&(i=t.y0,t.y0=r[1]-t.y1,t.y1=r[1]-i);var a=t.children;if(a)for(var o=0;o0)for(var b=0;b").join(" ")||"";var m=n.ensureSingle(p,"g","slicetext"),k=n.ensureSingle(m,"text","",(function(e){e.attr("data-notex",1)})),I=n.ensureUniformFontSize(e,c.determineTextFont(L,o,C.font,{onPathbar:!0}));k.text(o._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(i.font,I).call(a.convertToTspans,e),o.textBB=i.bBox(k.node()),o.transform=b(o,{fontSize:I.size,onPathbar:!0}),o.transform.fontSize=I.size,T?k.transition().attrTween("transform",(function(e){var t=M(e,h,S,[g,y]);return function(e){return w(t(e))}})):k.attr("transform",w(o))}))}}}),_d=m({"src/traces/treemap/plot_one.js"(e,t){var r=b(),n=(td(),v(ed)).interpolate,i=id(),a=ct(),o=ci().TEXTPAD,s=ro().toMoveInsideBar,l=Qa().recordMinTextSize,c=ud(),u=xd();function h(e){return i.isHierarchyRoot(e)?"":i.getPtId(e)}t.exports=function(e,t,f,p,d){var m=e._fullLayout,g=t[0],y=g.trace,v="icicle"===y.type,x=g.hierarchy,_=i.findEntryWithLevel(x,y.level),b=r.select(f),w=b.selectAll("g.pathbar"),T=b.selectAll("g.slice");if(!_)return w.remove(),void T.remove();var k=i.isHierarchyRoot(_),A=!m.uniformtext.mode&&i.hasTransition(p),M=i.getMaxDepth(y),S=m._size,E=y.domain,C=S.w*(E.x[1]-E.x[0]),I=S.h*(E.y[1]-E.y[0]),L=C,P=y.pathbar.thickness,z=y.marker.line.width+c.gapWithPathbar,D=y.pathbar.visible?y.pathbar.side.indexOf("bottom")>-1?I+z:-(P+z):0,O={x0:L,x1:L,y0:D,y1:D+P},R=function(e,t,r){var n=y.tiling.pad,i=function(e){return e-n<=t.x0},a=function(e){return e+n>=t.x1},o=function(e){return e-n<=t.y0},s=function(e){return e+n>=t.y1};return e.x0===t.x0&&e.x1===t.x1&&e.y0===t.y0&&e.y1===t.y1?{x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1}:{x0:i(e.x0-n)?0:a(e.x0-n)?r[0]:e.x0,x1:i(e.x1+n)?0:a(e.x1+n)?r[0]:e.x1,y0:o(e.y0-n)?0:s(e.y0-n)?r[1]:e.y0,y1:o(e.y1+n)?0:s(e.y1+n)?r[1]:e.y1}},F=null,B={},j={},N=null,U=function(e,t){return t?B[h(e)]:j[h(e)]};g.hasMultipleRoots&&k&&M++,y._maxDepth=M,y._backgroundColor=m.paper_bgcolor,y._entryDepth=_.data.depth,y._atRootLevel=k;var V=-C/2+S.l+S.w*(E.x[1]+E.x[0])/2,q=-I/2+S.t+S.h*(1-(E.y[1]+E.y[0])/2),H=function(e){return V+e},G=function(e){return q+e},W=G(0),Z=H(0),Y=function(e){return Z+e},X=function(e){return W+e};function $(e,t){return e+","+t}var K=Y(0),J=function(e){e.x=Math.max(K,e.x)},Q=y.pathbar.edgeshape,ee=y[v?"tiling":"marker"].pad,te=function(e){return-1!==y.textposition.indexOf(e)},re=te("top"),ne=te("left"),ie=te("right"),ae=te("bottom"),oe=function(e,t){var r=e.x0,n=e.x1,i=e.y0,a=e.y1,c=e.textBB,u=re||t.isHeader&&!ae?"start":ae?"end":"middle",h=te("right"),f=te("left")||t.onPathbar?-1:h?1:0;if(t.isHeader){if((r+=(v?ee:ee.l)-o)>=(n-=(v?ee:ee.r)-o)){var p=(r+n)/2;r=p,n=p}var d;ae?i<(d=a-(v?ee:ee.b))&&d"===Q?(l.x-=a,c.x-=a,u.x-=a,h.x-=a):"/"===Q?(u.x-=a,h.x-=a,o.x-=a/2,s.x-=a/2):"\\"===Q?(l.x-=a,c.x-=a,o.x-=a/2,s.x-=a/2):"<"===Q&&(o.x-=a,s.x-=a),J(l),J(h),J(o),J(c),J(u),J(s),"M"+$(l.x,l.y)+"L"+$(c.x,c.y)+"L"+$(s.x,s.y)+"L"+$(u.x,u.y)+"L"+$(h.x,h.y)+"L"+$(o.x,o.y)+"Z"},toMoveInsideSlice:oe,makeUpdateSliceInterpolator:le,makeUpdateTextInterpolator:ce,handleSlicesExit:ue,hasTransition:A,strTransform:he}):w.remove()}}}),bd=m({"src/traces/treemap/draw.js"(e,t){var r=b(),n=id(),i=Qa().clearMinTextSize,a=to().resizeText,o=_d();t.exports=function(e,t,s,l,c){var u,h,f=c.type,p=c.drawDescendants,d=e._fullLayout,m=d["_"+f+"layer"],g=!s;i(f,d),(u=m.selectAll("g.trace."+f).data(t,(function(e){return e[0].trace.uid}))).enter().append("g").classed("trace",!0).classed(f,!0),u.order(),!d.uniformtext.mode&&n.hasTransition(s)?(l&&(h=l()),r.transition().duration(s.duration).ease(s.easing).each("end",(function(){h&&h()})).each("interrupt",(function(){h&&h()})).each((function(){m.selectAll("g.trace").each((function(t){o(e,t,this,s,p)}))}))):(u.each((function(t){o(e,t,this,s,p)})),d.uniformtext.mode&&a(e,m.selectAll(".trace"),f)),g&&u.exit().remove()}}}),wd=m({"src/traces/treemap/draw_descendants.js"(e,t){var r=b(),n=ct(),i=er(),a=Et(),o=yd(),s=vd().styleOne,l=ud(),c=id(),u=ad(),h=od().formatSliceLabel,f=!1;t.exports=function(e,t,p,d,m){var g=m.width,y=m.height,v=m.viewX,x=m.viewY,_=m.pathSlice,b=m.toMoveInsideSlice,w=m.strTransform,T=m.hasTransition,k=m.handleSlicesExit,A=m.makeUpdateSliceInterpolator,M=m.makeUpdateTextInterpolator,S=m.prevEntry,E=e._context.staticPlot,C=e._fullLayout,I=t[0].trace,L=-1!==I.textposition.indexOf("left"),P=-1!==I.textposition.indexOf("right"),z=-1!==I.textposition.indexOf("bottom"),D=!z&&!I.marker.pad.t||z&&!I.marker.pad.b,O=o(p,[g,y],{packing:I.tiling.packing,squarifyratio:I.tiling.squarifyratio,flipX:I.tiling.flip.indexOf("x")>-1,flipY:I.tiling.flip.indexOf("y")>-1,pad:{inner:I.tiling.pad,top:I.marker.pad.t,left:I.marker.pad.l,right:I.marker.pad.r,bottom:I.marker.pad.b}}).descendants(),R=1/0,F=-1/0;O.forEach((function(e){var t=e.depth;t>=I._maxDepth?(e.x0=e.x1=(e.x0+e.x1)/2,e.y0=e.y1=(e.y0+e.y1)/2):(R=Math.min(R,t),F=Math.max(F,t))})),d=d.data(O,c.getPtId),I._maxVisibleLayers=isFinite(F)?F-R+1:0,d.enter().append("g").classed("slice",!0),k(d,f,{},[g,y],_),d.order();var B=null;if(T&&S){var j=c.getPtId(S);d.each((function(e){null===B&&c.getPtId(e)===j&&(B={x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1})}))}var N=function(){return B||{x0:0,x1:g,y0:0,y1:y}},U=d;return T&&(U=U.transition().each("end",(function(){var t=r.select(this);c.setSliceCursor(t,e,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),U.each((function(o){var d=c.isHeader(o,I);o._x0=v(o.x0),o._x1=v(o.x1),o._y0=x(o.y0),o._y1=x(o.y1),o._hoverX=v(o.x1-I.marker.pad.r),o._hoverY=x(z?o.y1-I.marker.pad.b/2:o.y0+I.marker.pad.t/2);var m=r.select(this),k=n.ensureSingle(m,"path","surface",(function(e){e.style("pointer-events",E?"none":"all")}));T?k.transition().attrTween("d",(function(e){var t=A(e,f,N(),[g,y]);return function(e){return _(t(e))}})):k.attr("d",_),m.call(u,p,e,t,{styleOne:s,eventDataKeys:l.eventDataKeys,transitionTime:l.CLICK_TRANSITION_TIME,transitionEasing:l.CLICK_TRANSITION_EASING}).call(c.setSliceCursor,e,{isTransitioning:e._transitioning}),k.call(s,o,I,e,{hovered:!1}),o.x0===o.x1||o.y0===o.y1?o._text="":o._text=d?D?"":c.getPtLabel(o)||"":h(o,p,I,t,C)||"";var S=n.ensureSingle(m,"g","slicetext"),O=n.ensureSingle(S,"text","",(function(e){e.attr("data-notex",1)})),R=n.ensureUniformFontSize(e,c.determineTextFont(I,o,C.font)),F=o._text||" ",B=d&&-1===F.indexOf("
");O.text(F).classed("slicetext",!0).attr("text-anchor",P?"end":L||B?"start":"middle").call(i.font,R).call(a.convertToTspans,e),o.textBB=i.bBox(O.node()),o.transform=b(o,{fontSize:R.size,isHeader:d}),o.transform.fontSize=R.size,T?O.transition().attrTween("transform",(function(e){var t=M(e,f,N(),[g,y]);return function(e){return w(t(e))}})):O.attr("transform",w(o))})),B}}}),Td=m({"src/traces/treemap/plot.js"(e,t){var r=bd(),n=wd();t.exports=function(e,t,i,a){return r(e,t,i,a,{type:"treemap",drawDescendants:n})}}}),kd=m({"src/traces/treemap/index.js"(e,t){t.exports={moduleType:"trace",name:"treemap",basePlotModule:cd(),categories:[],animatable:!0,attributes:hd(),layoutAttributes:fd(),supplyDefaults:pd(),supplyLayoutDefaults:dd(),calc:md().calc,crossTraceCalc:md().crossTraceCalc,plot:Td(),style:vd().style,colorbar:mi(),meta:{}}}}),Ad=m({"lib/treemap.js"(e,t){t.exports=kd()}}),Md=m({"src/traces/icicle/base_plot.js"(e){var t=At();e.name="icicle",e.plot=function(r,n,i,a){t.plotBasePlot(e.name,r,n,i,a)},e.clean=function(r,n,i,a){t.cleanBasePlot(e.name,r,n,i,a)}}}),Sd=m({"src/traces/icicle/attributes.js"(e,t){var{hovertemplateAttrs:r,texttemplateAttrs:n,templatefallbackAttrs:i}=Fe(),a=zt(),o=Ma().attributes,s=$u(),l=ch(),c=hd(),u=ud(),h=B().extendFlat,f=Oe().pattern;t.exports={labels:l.labels,parents:l.parents,values:l.values,branchvalues:l.branchvalues,count:l.count,level:l.level,maxdepth:l.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:c.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:h({colors:l.marker.colors,line:l.marker.line,pattern:f,editType:"calc"},a("marker",{colorAttr:"colors",anim:!1})),leaf:l.leaf,pathbar:c.pathbar,text:s.text,textinfo:l.textinfo,texttemplate:n({editType:"plot"},{keys:u.eventDataKeys.concat(["label","value"])}),texttemplatefallback:i({editType:"plot"}),hovertext:s.hovertext,hoverinfo:l.hoverinfo,hovertemplate:r({},{keys:u.eventDataKeys}),hovertemplatefallback:i(),textfont:s.textfont,insidetextfont:s.insidetextfont,outsidetextfont:c.outsidetextfont,textposition:c.textposition,sort:s.sort,root:l.root,domain:o({name:"icicle",trace:!0,editType:"calc"})}}}),Ed=m({"src/traces/icicle/layout_attributes.js"(e,t){t.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),Cd=m({"src/traces/icicle/defaults.js"(e,t){var r=ct(),n=Sd(),i=W(),a=Ma().defaults,o=Xa().handleText,s=ci().TEXTPAD,l=Ku().handleMarkerDefaults,c=Yt(),u=c.hasColorscale,h=c.handleDefaults;t.exports=function(e,t,c,f){function p(i,a){return r.coerce(e,t,n,i,a)}var d=p("labels"),m=p("parents");if(d&&d.length&&m&&m.length){var g=p("values");g&&g.length?p("branchvalues"):p("count"),p("level"),p("maxdepth"),p("tiling.orientation"),p("tiling.flip"),p("tiling.pad");var y=p("text");p("texttemplate"),p("texttemplatefallback"),t.texttemplate||p("textinfo",r.isArrayOrTypedArray(y)?"text+label":"label"),p("hovertext"),p("hovertemplate"),p("hovertemplatefallback");var v=p("pathbar.visible");o(e,t,f,p,"auto",{hasPathbar:v,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),p("textposition"),l(e,t,f,p);var x=t._hasColorscale=u(e,"marker","colors")||(e.marker||{}).coloraxis;x&&h(e,t,f,p,{prefix:"marker.",cLetter:"c"}),p("leaf.opacity",x?1:.7),t._hovered={marker:{line:{width:2,color:i.contrast(f.paper_bgcolor)}}},v&&(p("pathbar.thickness",t.pathbar.textfont.size+2*s),p("pathbar.side"),p("pathbar.edgeshape")),p("sort"),p("root.color"),a(t,f,p),t._length=null}else t.visible=!1}}}),Id=m({"src/traces/icicle/layout_defaults.js"(e,t){var r=ct(),n=Ed();t.exports=function(e,t){function i(i,a){return r.coerce(e,t,n,i,a)}i("iciclecolorway",t.colorway),i("extendiciclecolors")}}}),Ld=m({"src/traces/icicle/calc.js"(e){var t=dh();e.calc=function(e,r){return t.calc(e,r)},e.crossTraceCalc=function(e){return t._runCrossTraceCalc("icicle",e)}}}),Pd=m({"src/traces/icicle/partition.js"(e,t){var r=ph(),n=gd();t.exports=function(e,t,i){var a=i.flipX,o=i.flipY,s="h"===i.orientation,l=i.maxDepth,c=t[0],u=t[1];l&&(c=(e.height+1)*t[0]/Math.min(e.height+1,l),u=(e.height+1)*t[1]/Math.min(e.height+1,l));var h=r.partition().padding(i.pad.inner).size(s?[t[1],c]:[t[0],u])(e);return(s||a||o)&&n(h,t,{swapXY:s,flipX:a,flipY:o}),h}}}),zd=m({"src/traces/icicle/style.js"(e,t){var r=b(),n=W(),i=ct(),a=Qa().resizeText,o=rd();function s(e,t,r,a){var s=t.data.data,l=!t.children,c=s.i,u=i.castOption(r,c,"marker.line.color")||n.defaultLine,h=i.castOption(r,c,"marker.line.width")||0;e.call(o,t,r,a).style("stroke-width",h).call(n.stroke,u).style("opacity",l?r.leaf.opacity:null)}t.exports={style:function(e){var t=e._fullLayout._iciclelayer.selectAll(".trace");a(e,t,"icicle"),t.each((function(t){var n=r.select(this),i=t[0].trace;n.style("opacity",i.opacity),n.selectAll("path.surface").each((function(t){r.select(this).call(s,t,i,e)}))}))},styleOne:s}}}),Dd=m({"src/traces/icicle/draw_descendants.js"(e,t){var r=b(),n=ct(),i=er(),a=Et(),o=Pd(),s=zd().styleOne,l=ud(),c=id(),u=ad(),h=od().formatSliceLabel,f=!1;t.exports=function(e,t,p,d,m){var g=m.width,y=m.height,v=m.viewX,x=m.viewY,_=m.pathSlice,b=m.toMoveInsideSlice,w=m.strTransform,T=m.hasTransition,k=m.handleSlicesExit,A=m.makeUpdateSliceInterpolator,M=m.makeUpdateTextInterpolator,S=m.prevEntry,E=e._context.staticPlot,C=e._fullLayout,I=t[0].trace,L=-1!==I.textposition.indexOf("left"),P=-1!==I.textposition.indexOf("right"),z=-1!==I.textposition.indexOf("bottom"),D=o(p,[g,y],{flipX:I.tiling.flip.indexOf("x")>-1,flipY:I.tiling.flip.indexOf("y")>-1,orientation:I.tiling.orientation,pad:{inner:I.tiling.pad},maxDepth:I._maxDepth}).descendants(),O=1/0,R=-1/0;D.forEach((function(e){var t=e.depth;t>=I._maxDepth?(e.x0=e.x1=(e.x0+e.x1)/2,e.y0=e.y1=(e.y0+e.y1)/2):(O=Math.min(O,t),R=Math.max(R,t))})),d=d.data(D,c.getPtId),I._maxVisibleLayers=isFinite(R)?R-O+1:0,d.enter().append("g").classed("slice",!0),k(d,f,{},[g,y],_),d.order();var F=null;if(T&&S){var B=c.getPtId(S);d.each((function(e){null===F&&c.getPtId(e)===B&&(F={x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1})}))}var j=function(){return F||{x0:0,x1:g,y0:0,y1:y}},N=d;return T&&(N=N.transition().each("end",(function(){var t=r.select(this);c.setSliceCursor(t,e,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),N.each((function(o){o._x0=v(o.x0),o._x1=v(o.x1),o._y0=x(o.y0),o._y1=x(o.y1),o._hoverX=v(o.x1-I.tiling.pad),o._hoverY=x(z?o.y1-I.tiling.pad/2:o.y0+I.tiling.pad/2);var d=r.select(this),m=n.ensureSingle(d,"path","surface",(function(e){e.style("pointer-events",E?"none":"all")}));T?m.transition().attrTween("d",(function(e){var t=A(e,f,j(),[g,y],{orientation:I.tiling.orientation,flipX:I.tiling.flip.indexOf("x")>-1,flipY:I.tiling.flip.indexOf("y")>-1});return function(e){return _(t(e))}})):m.attr("d",_),d.call(u,p,e,t,{styleOne:s,eventDataKeys:l.eventDataKeys,transitionTime:l.CLICK_TRANSITION_TIME,transitionEasing:l.CLICK_TRANSITION_EASING}).call(c.setSliceCursor,e,{isTransitioning:e._transitioning}),m.call(s,o,I,e,{hovered:!1}),o.x0===o.x1||o.y0===o.y1?o._text="":o._text=h(o,p,I,t,C)||"";var k=n.ensureSingle(d,"g","slicetext"),S=n.ensureSingle(k,"text","",(function(e){e.attr("data-notex",1)})),D=n.ensureUniformFontSize(e,c.determineTextFont(I,o,C.font));S.text(o._text||" ").classed("slicetext",!0).attr("text-anchor",P?"end":L?"start":"middle").call(i.font,D).call(a.convertToTspans,e),o.textBB=i.bBox(S.node()),o.transform=b(o,{fontSize:D.size}),o.transform.fontSize=D.size,T?S.transition().attrTween("transform",(function(e){var t=M(e,f,j(),[g,y]);return function(e){return w(t(e))}})):S.attr("transform",w(o))})),F}}}),Od=m({"src/traces/icicle/plot.js"(e,t){var r=bd(),n=Dd();t.exports=function(e,t,i,a){return r(e,t,i,a,{type:"icicle",drawDescendants:n})}}}),Rd=m({"src/traces/icicle/index.js"(e,t){t.exports={moduleType:"trace",name:"icicle",basePlotModule:Md(),categories:[],animatable:!0,attributes:Sd(),layoutAttributes:Ed(),supplyDefaults:Cd(),supplyLayoutDefaults:Id(),calc:Ld().calc,crossTraceCalc:Ld().crossTraceCalc,plot:Od(),style:zd().style,colorbar:mi(),meta:{}}}}),Fd=m({"lib/icicle.js"(e,t){t.exports=Rd()}}),Bd=m({"src/traces/funnelarea/base_plot.js"(e){var t=At();e.name="funnelarea",e.plot=function(r,n,i,a){t.plotBasePlot(e.name,r,n,i,a)},e.clean=function(r,n,i,a){t.cleanBasePlot(e.name,r,n,i,a)}}}),jd=m({"src/traces/funnelarea/attributes.js"(e,t){var r=$u(),n=q(),i=Ma().attributes,{hovertemplateAttrs:a,texttemplateAttrs:o,templatefallbackAttrs:s}=Fe(),l=B().extendFlat;t.exports={labels:r.labels,label0:r.label0,dlabel:r.dlabel,values:r.values,marker:{colors:r.marker.colors,line:{color:l({},r.marker.line.color,{dflt:null}),width:l({},r.marker.line.width,{dflt:1}),editType:"calc"},pattern:r.marker.pattern,editType:"calc"},text:r.text,hovertext:r.hovertext,scalegroup:l({},r.scalegroup,{}),textinfo:l({},r.textinfo,{flags:["label","text","value","percent"]}),texttemplate:o({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:s({editType:"plot"}),hoverinfo:l({},n.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:a({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:s(),textposition:l({},r.textposition,{values:["inside","none"],dflt:"inside"}),textfont:r.textfont,insidetextfont:r.insidetextfont,title:{text:r.title.text,font:r.title.font,position:l({},r.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:i({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot"},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot"}}}}),Nd=m({"src/traces/funnelarea/layout_attributes.js"(e,t){var r=Ju().hiddenlabels;t.exports={hiddenlabels:r,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),Ud=m({"src/traces/funnelarea/defaults.js"(e,t){var r=ct(),n=jd(),i=Ma().defaults,a=Xa().handleText,o=Ku().handleLabelsAndValues,s=Ku().handleMarkerDefaults;t.exports=function(e,t,l,c){function u(i,a){return r.coerce(e,t,n,i,a)}var h=u("labels"),f=u("values"),p=o(h,f),d=p.len;if(t._hasLabels=p.hasLabels,t._hasValues=p.hasValues,!t._hasLabels&&t._hasValues&&(u("label0"),u("dlabel")),d){t._length=d,s(e,t,c,u),u("scalegroup");var m,g=u("text"),y=u("texttemplate");if(u("texttemplatefallback"),y||(m=u("textinfo",Array.isArray(g)?"text+percent":"percent")),u("hovertext"),u("hovertemplate"),u("hovertemplatefallback"),y||m&&"none"!==m){var v=u("textposition");a(e,t,c,u,v,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else"none"===m&&u("textposition","none");i(t,c,u),u("title.text")&&(u("title.position"),r.coerceFont(u,"title.font",c.font)),u("aspectratio"),u("baseratio")}else t.visible=!1}}}),Vd=m({"src/traces/funnelarea/layout_defaults.js"(e,t){var r=ct(),n=Nd();t.exports=function(e,t){function i(i,a){return r.coerce(e,t,n,i,a)}i("hiddenlabels"),i("funnelareacolorway",t.colorway),i("extendfunnelareacolors")}}}),qd=m({"src/traces/funnelarea/calc.js"(e,t){var r=eh();t.exports={calc:function(e,t){return r.calc(e,t)},crossTraceCalc:function(e){r.crossTraceCalc(e,{type:"funnelarea"})}}}}),Hd=m({"src/traces/funnelarea/plot.js"(e,t){var r=b(),n=er(),i=ct(),a=i.strScale,o=i.strTranslate,s=Et(),l=ro().toMoveInsideBar,c=Qa(),u=c.recordMinTextSize,h=c.clearMinTextSize,f=wr(),p=rh(),d=p.attachFxHandlers,m=p.determineInsideTextFont,g=p.layoutAreas,y=p.prerenderTitles,v=p.positionTitleOutside,x=p.formatSliceLabel;function _(e,t){return"l"+(t[0]-e[0])+","+(t[1]-e[1])}function w(e,t){return[.5*(e[0]+t[0]),.5*(e[1]+t[1])]}t.exports=function(e,t){var c=e._context.staticPlot,p=e._fullLayout;h("funnelarea",p),y(t,e),g(t,p._size),i.makeTraceGroups(p._funnelarealayer,t,"trace").each((function(t){var h=r.select(this),g=t[0],y=g.trace;(function(e){if(e.length){var t=e[0],r=t.trace,n=r.aspectratio,i=r.baseratio;i>.999&&(i=.999);var a,o,s,l=Math.pow(i,2),c=t.vTotal,u=c,h=c*l/(1-l)/c,f=[];for(f.push(S()),o=e.length-1;o>-1;o--)if(!(s=e[o]).hidden){var p=s.v/u;h+=p,f.push(S())}var d=1/0,m=-1/0;for(o=0;o-1;o--)if(!(s=e[o]).hidden){var A=f[k+=1][0],M=f[k][1];s.TL=[-A,M],s.TR=[A,M],s.BL=b,s.BR=T,s.pxmid=w(s.TR,s.BR),b=s.TL,T=s.TR}}function S(){var e=function(){var e=Math.sqrt(h);return{x:e,y:-e}}();return[e.x,e.y]}})(t),h.each((function(){var h=r.select(this).selectAll("g.slice").data(t);h.enter().append("g").classed("slice",!0),h.exit().remove(),h.each((function(a,o){if(a.hidden)r.select(this).selectAll("path,g").remove();else{a.pointNumber=a.i,a.curveNumber=y.index;var h=g.cx,v=g.cy,b=r.select(this),w=b.selectAll("path.surface").data([a]);w.enter().append("path").classed("surface",!0).style({"pointer-events":c?"none":"all"}),b.call(d,e,t);var T="M"+(h+a.TR[0])+","+(v+a.TR[1])+_(a.TR,a.BR)+_(a.BR,a.BL)+_(a.BL,a.TL)+"Z";w.attr("d",T),x(e,a,g);var k=f.castOption(y.textposition,a.pts),A=b.selectAll("g.slicetext").data(a.text&&"none"!==k?[0]:[]);A.enter().append("g").classed("slicetext",!0),A.exit().remove(),A.each((function(){var c=i.ensureSingle(r.select(this),"text","",(function(e){e.attr("data-notex",1)})),f=i.ensureUniformFontSize(e,m(y,a,p.font));c.text(a.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(n.font,f).call(s.convertToTspans,e);var d,g,x,_=n.bBox(c.node()),b=Math.min(a.BL[1],a.BR[1])+v,w=Math.max(a.TL[1],a.TR[1])+v;g=Math.max(a.TL[0],a.BL[0])+h,x=Math.min(a.TR[0],a.BR[0])+h,(d=l(g,x,b,w,_,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"})).fontSize=f.size,u(y.type,d,p),t[o].transform=d,i.setTransormAndDisplay(c,d)}))}}));var b=r.select(this).selectAll("g.titletext").data(y.title.text?[0]:[]);b.enter().append("g").classed("titletext",!0),b.exit().remove(),b.each((function(){var t=i.ensureSingle(r.select(this),"text","",(function(e){e.attr("data-notex",1)})),l=y.title.text;y._meta&&(l=i.templateString(l,y._meta)),t.text(l).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(n.font,y.title.font).call(s.convertToTspans,e);var c=v(g,p._size);t.attr("transform",o(c.x,c.y)+a(Math.min(1,c.scale))+o(c.tx,c.ty))}))}))}))}}}),Gd=m({"src/traces/funnelarea/style.js"(e,t){var r=b(),n=kr(),i=Qa().resizeText;t.exports=function(e){var t=e._fullLayout._funnelarealayer.selectAll(".trace");i(e,t,"funnelarea"),t.each((function(t){var i=t[0].trace,a=r.select(this);a.style({opacity:i.opacity}),a.selectAll("path.surface").each((function(t){r.select(this).call(n,t,i,e)}))}))}}}),Wd=m({"src/traces/funnelarea/index.js"(e,t){t.exports={moduleType:"trace",name:"funnelarea",basePlotModule:Bd(),categories:["pie-like","funnelarea","showLegend"],attributes:jd(),layoutAttributes:Nd(),supplyDefaults:Ud(),supplyLayoutDefaults:Vd(),calc:qd().calc,crossTraceCalc:qd().crossTraceCalc,plot:Hd(),style:Gd(),styleOne:kr(),meta:{}}}}),Zd=m({"lib/funnelarea.js"(e,t){t.exports=Wd()}}),Yd=m({"stackgl_modules/index.js"(e,t){!function(){var e={1964:function(e,t,r){e.exports={alpha_shape:r(3502),convex_hull:r(7352),delaunay_triangulate:r(7642),gl_cone3d:r(6405),gl_error3d:r(9165),gl_line3d:r(5714),gl_mesh3d:r(7201),gl_plot3d:r(4100),gl_scatter3d:r(8418),gl_streamtube3d:r(7815),gl_surface3d:r(9499),ndarray:r(9618),ndarray_linear_interpolate:r(4317)}},4793:function(e,t,r){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(7507),a=r(3778),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.hp=c,t.IS=50;var s=2147483647;function l(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e)return function(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|g(e,t),n=l(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(V(e,Uint8Array)){var t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return p(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+n(e));if(V(e,ArrayBuffer)||e&&V(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(V(e,SharedArrayBuffer)||e&&V(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var i=e.valueOf&&e.valueOf();if(null!=i&&i!==e)return c.from(i,t,r);var a=function(e){if(c.isBuffer(e)){var t=0|m(e.length),r=l(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||q(e.length)?l(0):p(e):"Buffer"===e.type&&Array.isArray(e.data)?p(e.data):void 0}(e);if(a)return a;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+n(e))}function h(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return h(e),l(e<0?0:0|m(e))}function p(e){for(var t=e.length<0?0:0|m(e.length),r=l(t),n=0;n=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function g(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||V(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+n(e));var r=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===r)return 0;for(var a=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return j(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return N(e).length;default:if(a)return i?-1:j(e).length;t=(""+t).toLowerCase(),a=!0}}function y(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0)||(r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return L(this,t,r);case"utf8":case"utf-8":return S(this,t,r);case"ascii":return C(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return M(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function v(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function x(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),q(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:_(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):_(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function _(e,t,r,n,i){var a,o=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var u=-1;for(a=r;as&&(r=s-l),a=r;a>=0;a--){for(var h=!0,f=0;fi&&(n=i):n=i;var a=t.length;n>a/2&&(n=a/2);for(var o=0;o>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function M(e,t,r){return 0===t&&r===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,r))}function S(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+h<=r)switch(h){case 1:c<128&&(u=c);break;case 2:128==(192&(a=e[i+1]))&&(l=(31&c)<<6|63&a)>127&&(u=l);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(l=(15&c)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(l=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,h=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=h}return function(e){var t=e.length;if(t<=E)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn.length?c.from(a).copy(n,i):Uint8Array.prototype.set.call(n,a,i);else{if(!c.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i)}i+=a.length}return n},c.byteLength=g,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tr&&(e+=" ... "),""},o&&(c.prototype[o]=c.prototype.inspect),c.prototype.compare=function(e,t,r,i,a){if(V(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+n(e));if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===a&&(a=this.length),t<0||r>e.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&t>=r)return 0;if(i>=a)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(a>>>=0)-(i>>>=0),s=(r>>>=0)-(t>>>=0),l=Math.min(o,s),u=this.slice(i,a),h=e.slice(t,r),f=0;f>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":case"latin1":case"binary":return T(this,e,t,r);case"base64":return k(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var E=4096;function C(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",a=t;ar)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,r,n,i,a){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function O(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function R(e,t,r,n,i){return t=+t,r>>>=0,i||O(e,0,r,4),a.write(e,t,r,n,23,4),r+4}function F(e,t,r,n,i){return t=+t,r>>>=0,i||O(e,0,r,8),a.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||z(e,t,this.length);for(var n=this[e],i=1,a=0;++a>>=0,t>>>=0,r||z(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||z(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||z(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||z(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||z(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||z(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||z(e,t,this.length);for(var n=this[e],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||z(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},c.prototype.readInt8=function(e,t){return e>>>=0,t||z(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||z(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||z(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||z(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||z(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return e>>>=0,t||z(e,4,this.length),a.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||z(e,4,this.length),a.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||z(e,8,this.length),a.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||z(e,8,this.length),a.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||D(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[t]=255&e;++a>>=0,r>>>=0,n||D(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);D(this,e,t,r,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>>=0,!n){var i=Math.pow(2,8*r-1);D(this,e,t,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o|0)-s&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeFloatLE=function(e,t,r){return R(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return R(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&0!==n&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function N(e){return i.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(B,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function U(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function V(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function q(e){return e!=e}var H=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},9216:function(e){e.exports=i,e.exports.isMobile=i,e.exports.default=i;var t=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,n=/android|ipad|playbook|silk/i;function i(e){e||(e={});var i=e.ua;if(!i&&typeof navigator<"u"&&(i=navigator.userAgent),i&&i.headers&&"string"==typeof i.headers["user-agent"]&&(i=i.headers["user-agent"]),"string"!=typeof i)return!1;var a=t.test(i)&&!r.test(i)||!!e.tablet&&n.test(i);return!a&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==i.indexOf("Macintosh")&&-1!==i.indexOf("Safari")&&(a=!0),a}},6296:function(e,t,r){e.exports=function(e){var t=(e=e||{}).eye||[0,0,1],r=e.center||[0,0,0],s=e.up||[0,1,0],l=e.distanceLimits||[0,1/0],c=e.mode||"turntable",u=n(),h=i(),f=a();return u.setDistanceLimits(l[0],l[1]),u.lookAt(0,t,r,s),h.setDistanceLimits(l[0],l[1]),h.lookAt(0,t,r,s),f.setDistanceLimits(l[0],l[1]),f.lookAt(0,t,r,s),new o({turntable:u,orbit:h,matrix:f},c)};var n=r(7261),i=r(9977),a=r(1811);function o(e,t){this._controllerNames=Object.keys(e),this._controllerList=this._controllerNames.map((function(t){return e[t]})),this._mode=t,this._active=e[t],this._active||(this._mode="turntable",this._active=e.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var s=o.prototype;s.flush=function(e){for(var t=this._controllerList,r=0;r"u"?r(1538):WeakMap,i=r(2762),a=r(8116),o=new n;e.exports=function(e){var t=o.get(e),r=t&&(t._triangleBuffer.handle||t._triangleBuffer.buffer);if(!r||!e.isBuffer(r)){var n=i(e,new Float32Array([-1,-1,-1,4,4,-1]));(t=a(e,[{buffer:n,type:e.FLOAT,size:2}]))._triangleBuffer=n,o.set(e,t)}t.bind(),e.drawArrays(e.TRIANGLES,0,3),t.unbind()}},1085:function(e,t,r){var n=r(1371);e.exports=function(e,t,r){t="number"==typeof t?t:1,r=r||": ";var i=e.split(/\r?\n/),a=String(i.length+t-1).length;return i.map((function(e,i){var o=i+t,s=String(o).length;return n(o,a-s)+r+e})).join("\n")}},3952:function(e,t,r){e.exports=function(e){var t=e.length;if(0===t)return[];if(1===t)return[0];for(var r=e[0].length,n=[e[0]],a=[0],o=1;o0?o-4:o;for(r=0;r>16&255,c[u++]=t>>8&255,c[u++]=255&t;return 2===l&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[u++]=255&t),1===l&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a=[],o=16383,s=0,l=n-i;sl?l:s+o));return 1===i?(t=e[n-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),a.join("")};for(var r=[],n=[],i=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)r[o]=a[o],n[a.charCodeAt(o)]=o;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function c(e,t,r){for(var n,i=[],a=t;a0?c=c.ushln(h):h<0&&(u=u.ushln(-h)),s(c,u)}},6330:function(e,t,r){var n=r(1533);e.exports=function(e){return Array.isArray(e)&&2===e.length&&n(e[0])&&n(e[1])}},5716:function(e,t,r){var n=r(6859);e.exports=function(e){return e.cmp(new n(0))}},1369:function(e,t,r){var n=r(5716);e.exports=function(e){var t=e.length,r=e.words,i=0;if(1===t)i=r[0];else if(2===t)i=r[0]+67108864*r[1];else for(var a=0;a20?52:r+32}},1533:function(e,t,r){r(6859),e.exports=function(e){return e&&"object"==typeof e&&!!e.words}},2651:function(e,t,r){var n=r(6859),i=r(2361);e.exports=function(e){var t=i.exponent(e);return t<52?new n(e):new n(e*Math.pow(2,52-t)).ushln(t-52)}},869:function(e,t,r){var n=r(2651),i=r(5716);e.exports=function(e,t){var r=i(e),a=i(t);if(0===r)return[n(0),n(1)];if(0===a)return[n(0),n(0)];a<0&&(e=e.neg(),t=t.neg());var o=e.gcd(t);return o.cmpn(1)?[e.div(o),t.div(o)]:[e,t]}},6768:function(e,t,r){var n=r(6859);e.exports=function(e){return new n(e)}},6504:function(e,t,r){var n=r(869);e.exports=function(e,t){return n(e[0].mul(t[0]),e[1].mul(t[1]))}},7721:function(e,t,r){var n=r(5716);e.exports=function(e){return n(e[0])*n(e[1])}},5572:function(e,t,r){var n=r(869);e.exports=function(e,t){return n(e[0].mul(t[1]).sub(e[1].mul(t[0])),e[1].mul(t[1]))}},946:function(e,t,r){var n=r(1369),i=r(4025);e.exports=function(e){var t=e[0],r=e[1];if(0===t.cmpn(0))return 0;var a=t.abs().divmod(r.abs()),o=a.div,s=n(o),l=a.mod,c=t.negative!==r.negative?-1:1;if(0===l.cmpn(0))return c*s;if(s){var u=i(s)+4;return c*(s+(f=n(l.ushln(u).divRound(r)))*Math.pow(2,-u))}var h=r.bitLength()-l.bitLength()+53,f=n(l.ushln(h).divRound(r));return h<1023?c*f*Math.pow(2,-h):c*(f*=Math.pow(2,-1023))*Math.pow(2,1023-h)}},2478:function(e){function t(e,t,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=e[o];(void 0!==r?r(s,t):s-t)>=0?(a=o,i=o-1):n=o+1}return a}function r(e,t,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=e[o];(void 0!==r?r(s,t):s-t)>0?(a=o,i=o-1):n=o+1}return a}function n(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o];(void 0!==r?r(s,t):s-t)<0?(a=o,n=o+1):i=o-1}return a}function i(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o];(void 0!==r?r(s,t):s-t)<=0?(a=o,n=o+1):i=o-1}return a}function a(e,t,r,n,i){for(;n<=i;){var a=n+i>>>1,o=e[a],s=void 0!==r?r(o,t):o-t;if(0===s)return a;s<=0?n=a+1:i=a-1}return-1}function o(e,t,r,n,i,a){return"function"==typeof r?a(e,t,r,void 0===n?0:0|n,void 0===i?e.length-1:0|i):a(e,t,void 0,void 0===r?0:0|r,void 0===n?e.length-1:0|n)}e.exports={ge:function(e,r,n,i,a){return o(e,r,n,i,a,t)},gt:function(e,t,n,i,a){return o(e,t,n,i,a,r)},lt:function(e,t,r,i,a){return o(e,t,r,i,a,n)},le:function(e,t,r,n,a){return o(e,t,r,n,a,i)},eq:function(e,t,r,n,i){return o(e,t,r,n,i,a)}}},8828:function(e,t){function r(e){var t=32;return(e&=-e)&&t--,65535&e&&(t-=16),16711935&e&&(t-=8),252645135&e&&(t-=4),858993459&e&&(t-=2),1431655765&e&&(t-=1),t}t.INT_BITS=32,t.INT_MAX=2147483647,t.INT_MIN=-1<<31,t.sign=function(e){return(e>0)-(e<0)},t.abs=function(e){var t=e>>31;return(e^t)-t},t.min=function(e,t){return t^(e^t)&-(e65535)<<4,t|=r=((e>>>=t)>255)<<3,t|=r=((e>>>=r)>15)<<2,(t|=r=((e>>>=r)>3)<<1)|(e>>>=r)>>1},t.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0},t.popCount=function(e){return 16843009*((e=(858993459&(e-=e>>>1&1431655765))+(e>>>2&858993459))+(e>>>4)&252645135)>>>24},t.countTrailingZeros=r,t.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,1+((e|=e>>>8)|e>>>16)},t.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},t.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var n=new Array(256);(function(e){for(var t=0;t<256;++t){var r=t,n=t,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;e[t]=n<>>8&255]<<16|n[e>>>16&255]<<8|n[e>>>24&255]},t.interleave2=function(e,t){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))<<1},t.deinterleave2=function(e,t){return(e=65535&((e=16711935&((e=252645135&((e=858993459&((e=e>>>t&1431655765)|e>>>1))|e>>>2))|e>>>4))|e>>>16))<<16>>16},t.interleave3=function(e,t,r){return e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2),(e|=(t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},t.deinterleave3=function(e,t){return(e=1023&((e=4278190335&((e=251719695&((e=3272356035&((e=e>>>t&1227133513)|e>>>2))|e>>>4))|e>>>8))|e>>>16))<<22>>22},t.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>r(e)+1}},6859:function(e,t,r){!function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&(("le"===t||"be"===t)&&(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"==typeof e?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{o=typeof window<"u"&&typeof window.Buffer<"u"?window.Buffer:r(7790).Buffer}catch{}function s(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function l(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function c(e,t,r,n){for(var i=0,a=Math.min(e.length,r),o=t;o=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(e){return e instanceof a||null!==e&&"object"==typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=l(e,t,n)<=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var a=e.length-r,o=a%n,s=Math.min(a,a-o)+r,l=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],a=0|t.words[0],o=i*a,s=67108863&o,l=o/67108864|0;r.words[0]=s;for(var c=1;c>>26,h=67108863&l,f=Math.min(c,t.length-1),p=Math.max(0,c-e.length+1);p<=f;p++){var d=c-p|0;u+=(o=(i=0|e.words[d])*(a=0|t.words[p])+h)/67108864|0,h=67108863&o}r.words[c]=0|h,l=0|u}return 0!==l?r.words[c]=0|l:r.length--,r.strip()}a.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,a=0,o=0;o>>24-i&16777215,(i+=2)>=26&&(i-=26,o--),r=0!==a||o!==this.length-1?u[6-l.length]+l+r:l+r}for(0!==a&&(r=a.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=h[e],p=f[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modn(p).toString(e);r=(d=d.idivn(p)).isZero()?m+r:u[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return n(typeof o<"u"),this.toArrayLike(o,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,l="le"===t,c=new e(a),u=this.clone();if(l){for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),c[s]=o;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ae.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var a=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==a&&o>26,this.words[o]=67108863&t;if(0===a&&o>>13,p=0|o[1],d=8191&p,m=p>>>13,g=0|o[2],y=8191&g,v=g>>>13,x=0|o[3],_=8191&x,b=x>>>13,w=0|o[4],T=8191&w,k=w>>>13,A=0|o[5],M=8191&A,S=A>>>13,E=0|o[6],C=8191&E,I=E>>>13,L=0|o[7],P=8191&L,z=L>>>13,D=0|o[8],O=8191&D,R=D>>>13,F=0|o[9],B=8191&F,j=F>>>13,N=0|s[0],U=8191&N,V=N>>>13,q=0|s[1],H=8191&q,G=q>>>13,W=0|s[2],Z=8191&W,Y=W>>>13,X=0|s[3],$=8191&X,K=X>>>13,J=0|s[4],Q=8191&J,ee=J>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],ae=8191&ie,oe=ie>>>13,se=0|s[7],le=8191&se,ce=se>>>13,ue=0|s[8],he=8191&ue,fe=ue>>>13,pe=0|s[9],de=8191&pe,me=pe>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(c+(n=Math.imul(h,U))|0)+((8191&(i=(i=Math.imul(h,V))+Math.imul(f,U)|0))<<13)|0;c=((a=Math.imul(f,V))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(d,U),i=(i=Math.imul(d,V))+Math.imul(m,U)|0,a=Math.imul(m,V);var ye=(c+(n=n+Math.imul(h,H)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(f,H)|0))<<13)|0;c=((a=a+Math.imul(f,G)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,U),i=(i=Math.imul(y,V))+Math.imul(v,U)|0,a=Math.imul(v,V),n=n+Math.imul(d,H)|0,i=(i=i+Math.imul(d,G)|0)+Math.imul(m,H)|0,a=a+Math.imul(m,G)|0;var ve=(c+(n=n+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,Y)|0)+Math.imul(f,Z)|0))<<13)|0;c=((a=a+Math.imul(f,Y)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(_,U),i=(i=Math.imul(_,V))+Math.imul(b,U)|0,a=Math.imul(b,V),n=n+Math.imul(y,H)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(v,H)|0,a=a+Math.imul(v,G)|0,n=n+Math.imul(d,Z)|0,i=(i=i+Math.imul(d,Y)|0)+Math.imul(m,Z)|0,a=a+Math.imul(m,Y)|0;var xe=(c+(n=n+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,K)|0)+Math.imul(f,$)|0))<<13)|0;c=((a=a+Math.imul(f,K)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(T,U),i=(i=Math.imul(T,V))+Math.imul(k,U)|0,a=Math.imul(k,V),n=n+Math.imul(_,H)|0,i=(i=i+Math.imul(_,G)|0)+Math.imul(b,H)|0,a=a+Math.imul(b,G)|0,n=n+Math.imul(y,Z)|0,i=(i=i+Math.imul(y,Y)|0)+Math.imul(v,Z)|0,a=a+Math.imul(v,Y)|0,n=n+Math.imul(d,$)|0,i=(i=i+Math.imul(d,K)|0)+Math.imul(m,$)|0,a=a+Math.imul(m,K)|0;var _e=(c+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(f,Q)|0))<<13)|0;c=((a=a+Math.imul(f,ee)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(M,U),i=(i=Math.imul(M,V))+Math.imul(S,U)|0,a=Math.imul(S,V),n=n+Math.imul(T,H)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(k,H)|0,a=a+Math.imul(k,G)|0,n=n+Math.imul(_,Z)|0,i=(i=i+Math.imul(_,Y)|0)+Math.imul(b,Z)|0,a=a+Math.imul(b,Y)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,K)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,K)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,ee)|0)+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0;var be=(c+(n=n+Math.imul(h,re)|0)|0)+((8191&(i=(i=i+Math.imul(h,ne)|0)+Math.imul(f,re)|0))<<13)|0;c=((a=a+Math.imul(f,ne)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(C,U),i=(i=Math.imul(C,V))+Math.imul(I,U)|0,a=Math.imul(I,V),n=n+Math.imul(M,H)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(S,H)|0,a=a+Math.imul(S,G)|0,n=n+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(k,Z)|0,a=a+Math.imul(k,Y)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,K)|0)+Math.imul(b,$)|0,a=a+Math.imul(b,K)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(v,Q)|0,a=a+Math.imul(v,ee)|0,n=n+Math.imul(d,re)|0,i=(i=i+Math.imul(d,ne)|0)+Math.imul(m,re)|0,a=a+Math.imul(m,ne)|0;var we=(c+(n=n+Math.imul(h,ae)|0)|0)+((8191&(i=(i=i+Math.imul(h,oe)|0)+Math.imul(f,ae)|0))<<13)|0;c=((a=a+Math.imul(f,oe)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(P,U),i=(i=Math.imul(P,V))+Math.imul(z,U)|0,a=Math.imul(z,V),n=n+Math.imul(C,H)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(I,H)|0,a=a+Math.imul(I,G)|0,n=n+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,Y)|0)+Math.imul(S,Z)|0,a=a+Math.imul(S,Y)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(k,$)|0,a=a+Math.imul(k,K)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(b,Q)|0,a=a+Math.imul(b,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(v,re)|0,a=a+Math.imul(v,ne)|0,n=n+Math.imul(d,ae)|0,i=(i=i+Math.imul(d,oe)|0)+Math.imul(m,ae)|0,a=a+Math.imul(m,oe)|0;var Te=(c+(n=n+Math.imul(h,le)|0)|0)+((8191&(i=(i=i+Math.imul(h,ce)|0)+Math.imul(f,le)|0))<<13)|0;c=((a=a+Math.imul(f,ce)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(O,U),i=(i=Math.imul(O,V))+Math.imul(R,U)|0,a=Math.imul(R,V),n=n+Math.imul(P,H)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(z,H)|0,a=a+Math.imul(z,G)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(I,Z)|0,a=a+Math.imul(I,Y)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,K)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,K)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(k,Q)|0,a=a+Math.imul(k,ee)|0,n=n+Math.imul(_,re)|0,i=(i=i+Math.imul(_,ne)|0)+Math.imul(b,re)|0,a=a+Math.imul(b,ne)|0,n=n+Math.imul(y,ae)|0,i=(i=i+Math.imul(y,oe)|0)+Math.imul(v,ae)|0,a=a+Math.imul(v,oe)|0,n=n+Math.imul(d,le)|0,i=(i=i+Math.imul(d,ce)|0)+Math.imul(m,le)|0,a=a+Math.imul(m,ce)|0;var ke=(c+(n=n+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,fe)|0)+Math.imul(f,he)|0))<<13)|0;c=((a=a+Math.imul(f,fe)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(B,U),i=(i=Math.imul(B,V))+Math.imul(j,U)|0,a=Math.imul(j,V),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(R,H)|0,a=a+Math.imul(R,G)|0,n=n+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(z,Z)|0,a=a+Math.imul(z,Y)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,K)|0)+Math.imul(I,$)|0,a=a+Math.imul(I,K)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(S,Q)|0,a=a+Math.imul(S,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(k,re)|0,a=a+Math.imul(k,ne)|0,n=n+Math.imul(_,ae)|0,i=(i=i+Math.imul(_,oe)|0)+Math.imul(b,ae)|0,a=a+Math.imul(b,oe)|0,n=n+Math.imul(y,le)|0,i=(i=i+Math.imul(y,ce)|0)+Math.imul(v,le)|0,a=a+Math.imul(v,ce)|0,n=n+Math.imul(d,he)|0,i=(i=i+Math.imul(d,fe)|0)+Math.imul(m,he)|0,a=a+Math.imul(m,fe)|0;var Ae=(c+(n=n+Math.imul(h,de)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(f,de)|0))<<13)|0;c=((a=a+Math.imul(f,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(B,H),i=(i=Math.imul(B,G))+Math.imul(j,H)|0,a=Math.imul(j,G),n=n+Math.imul(O,Z)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(R,Z)|0,a=a+Math.imul(R,Y)|0,n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,K)|0)+Math.imul(z,$)|0,a=a+Math.imul(z,K)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(I,Q)|0,a=a+Math.imul(I,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(S,re)|0,a=a+Math.imul(S,ne)|0,n=n+Math.imul(T,ae)|0,i=(i=i+Math.imul(T,oe)|0)+Math.imul(k,ae)|0,a=a+Math.imul(k,oe)|0,n=n+Math.imul(_,le)|0,i=(i=i+Math.imul(_,ce)|0)+Math.imul(b,le)|0,a=a+Math.imul(b,ce)|0,n=n+Math.imul(y,he)|0,i=(i=i+Math.imul(y,fe)|0)+Math.imul(v,he)|0,a=a+Math.imul(v,fe)|0;var Me=(c+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,me)|0)+Math.imul(m,de)|0))<<13)|0;c=((a=a+Math.imul(m,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(B,Z),i=(i=Math.imul(B,Y))+Math.imul(j,Z)|0,a=Math.imul(j,Y),n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(R,$)|0,a=a+Math.imul(R,K)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(z,Q)|0,a=a+Math.imul(z,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(I,re)|0,a=a+Math.imul(I,ne)|0,n=n+Math.imul(M,ae)|0,i=(i=i+Math.imul(M,oe)|0)+Math.imul(S,ae)|0,a=a+Math.imul(S,oe)|0,n=n+Math.imul(T,le)|0,i=(i=i+Math.imul(T,ce)|0)+Math.imul(k,le)|0,a=a+Math.imul(k,ce)|0,n=n+Math.imul(_,he)|0,i=(i=i+Math.imul(_,fe)|0)+Math.imul(b,he)|0,a=a+Math.imul(b,fe)|0;var Se=(c+(n=n+Math.imul(y,de)|0)|0)+((8191&(i=(i=i+Math.imul(y,me)|0)+Math.imul(v,de)|0))<<13)|0;c=((a=a+Math.imul(v,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(B,$),i=(i=Math.imul(B,K))+Math.imul(j,$)|0,a=Math.imul(j,K),n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,ee)|0,n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(z,re)|0,a=a+Math.imul(z,ne)|0,n=n+Math.imul(C,ae)|0,i=(i=i+Math.imul(C,oe)|0)+Math.imul(I,ae)|0,a=a+Math.imul(I,oe)|0,n=n+Math.imul(M,le)|0,i=(i=i+Math.imul(M,ce)|0)+Math.imul(S,le)|0,a=a+Math.imul(S,ce)|0,n=n+Math.imul(T,he)|0,i=(i=i+Math.imul(T,fe)|0)+Math.imul(k,he)|0,a=a+Math.imul(k,fe)|0;var Ee=(c+(n=n+Math.imul(_,de)|0)|0)+((8191&(i=(i=i+Math.imul(_,me)|0)+Math.imul(b,de)|0))<<13)|0;c=((a=a+Math.imul(b,me)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(B,Q),i=(i=Math.imul(B,ee))+Math.imul(j,Q)|0,a=Math.imul(j,ee),n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(R,re)|0,a=a+Math.imul(R,ne)|0,n=n+Math.imul(P,ae)|0,i=(i=i+Math.imul(P,oe)|0)+Math.imul(z,ae)|0,a=a+Math.imul(z,oe)|0,n=n+Math.imul(C,le)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(I,le)|0,a=a+Math.imul(I,ce)|0,n=n+Math.imul(M,he)|0,i=(i=i+Math.imul(M,fe)|0)+Math.imul(S,he)|0,a=a+Math.imul(S,fe)|0;var Ce=(c+(n=n+Math.imul(T,de)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(k,de)|0))<<13)|0;c=((a=a+Math.imul(k,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(B,re),i=(i=Math.imul(B,ne))+Math.imul(j,re)|0,a=Math.imul(j,ne),n=n+Math.imul(O,ae)|0,i=(i=i+Math.imul(O,oe)|0)+Math.imul(R,ae)|0,a=a+Math.imul(R,oe)|0,n=n+Math.imul(P,le)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(z,le)|0,a=a+Math.imul(z,ce)|0,n=n+Math.imul(C,he)|0,i=(i=i+Math.imul(C,fe)|0)+Math.imul(I,he)|0,a=a+Math.imul(I,fe)|0;var Ie=(c+(n=n+Math.imul(M,de)|0)|0)+((8191&(i=(i=i+Math.imul(M,me)|0)+Math.imul(S,de)|0))<<13)|0;c=((a=a+Math.imul(S,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(B,ae),i=(i=Math.imul(B,oe))+Math.imul(j,ae)|0,a=Math.imul(j,oe),n=n+Math.imul(O,le)|0,i=(i=i+Math.imul(O,ce)|0)+Math.imul(R,le)|0,a=a+Math.imul(R,ce)|0,n=n+Math.imul(P,he)|0,i=(i=i+Math.imul(P,fe)|0)+Math.imul(z,he)|0,a=a+Math.imul(z,fe)|0;var Le=(c+(n=n+Math.imul(C,de)|0)|0)+((8191&(i=(i=i+Math.imul(C,me)|0)+Math.imul(I,de)|0))<<13)|0;c=((a=a+Math.imul(I,me)|0)+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,n=Math.imul(B,le),i=(i=Math.imul(B,ce))+Math.imul(j,le)|0,a=Math.imul(j,ce),n=n+Math.imul(O,he)|0,i=(i=i+Math.imul(O,fe)|0)+Math.imul(R,he)|0,a=a+Math.imul(R,fe)|0;var Pe=(c+(n=n+Math.imul(P,de)|0)|0)+((8191&(i=(i=i+Math.imul(P,me)|0)+Math.imul(z,de)|0))<<13)|0;c=((a=a+Math.imul(z,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(B,he),i=(i=Math.imul(B,fe))+Math.imul(j,he)|0,a=Math.imul(j,fe);var ze=(c+(n=n+Math.imul(O,de)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(R,de)|0))<<13)|0;c=((a=a+Math.imul(R,me)|0)+(i>>>13)|0)+(ze>>>26)|0,ze&=67108863;var De=(c+(n=Math.imul(B,de))|0)+((8191&(i=(i=Math.imul(B,me))+Math.imul(j,de)|0))<<13)|0;return c=((a=Math.imul(j,me))+(i>>>13)|0)+(De>>>26)|0,De&=67108863,l[0]=ge,l[1]=ye,l[2]=ve,l[3]=xe,l[4]=_e,l[5]=be,l[6]=we,l[7]=Te,l[8]=ke,l[9]=Ae,l[10]=Me,l[11]=Se,l[12]=Ee,l[13]=Ce,l[14]=Ie,l[15]=Le,l[16]=Pe,l[17]=ze,l[18]=De,0!==c&&(l[19]=c,r.length++),r};function m(e,t,r){return(new g).mulp(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(d=p),a.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?d(this,e,t):n<63?p(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,a=0;a>>26)|0)>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,e,t):m(this,e,t),r},g.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n>=1;return n},g.prototype.permute=function(e,t,r,n,i,a){for(var o=0;o>>=1)i++;return 1<>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o>=26,t+=i/67108864|0,t+=a>>>26,this.words[r]=67108863&a}return 0!==t&&(this.words[r]=t,this.length++),this.length=0===e?1:this.length,this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new a(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var a=e%26,o=Math.min((e-a)/26,this.length),s=67108863^67108863>>>a<o)for(this.length-=o,c=0;c=0&&(0!==u||c>=i);c--){var h=0|this.words[c];this.words[c]=u<<26-a|h>>>a,u=h&s}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,o=0|i.words[i.length-1];0!=(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,l=n.length-i.length;if("mod"!==t){(s=new a(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c=0;h--){var f=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(f=Math.min(f/o|0,67108863),n._ishlnsubmul(i,f,h);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);s&&(s.words[h]=f)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):this.negative&e.negative?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,o,s},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},a.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new a(1),o=new a(0),s=new a(0),l=new a(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),h=t.clone();!t.isZero();){for(var f=0,p=1;!(t.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(u),o.isub(h)),i.iushrn(1),o.iushrn(1);for(var d=0,m=1;!(r.words[0]&m)&&d<26;++d,m<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(h)),s.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),o.isub(l)):(r.isub(t),s.isub(i),l.isub(o))}return{a:s,b:l,gcd:r.iushln(c)}},a.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t,r=this,i=e.clone();r=0!==r.negative?r.umod(e):r.clone();for(var o=new a(1),s=new a(0),l=i.clone();r.cmpn(1)>0&&i.cmpn(1)>0;){for(var c=0,u=1;!(r.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(r.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var h=0,f=1;!(i.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(i.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);r.cmp(i)>=0?(r.isub(i),o.isub(s)):(i.isub(r),s.isub(o))}return(t=0===r.cmpn(1)?o:s).cmpn(0)<0&&t.iadd(e),t},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var a=t;t=r,r=a}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return!(1&this.words[0])},a.prototype.isOdd=function(){return!(1&~this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new T(e)},a.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function b(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function T(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){T.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},i(x,v),x.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,a=o}a>>>=22,e.words[i-10]=a,0===a&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new x;else if("p224"===e)t=new _;else if("p192"===e)t=new b;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new w}return y[e]=t,t},T.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},T.prototype._verify2=function(e,t){n(!(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},T.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},T.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},T.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},T.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},T.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},T.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},T.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},T.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},T.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},T.prototype.isqr=function(e){return this.imul(e,e.clone())},T.prototype.sqr=function(e){return this.mul(e,e)},T.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var h=this.pow(u,i),f=this.pow(e,i.addn(1).iushrn(1)),p=this.pow(e,i),d=o;0!==p.cmp(s);){for(var m=p,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var c=t.words[n],u=l-1;u>=0;u--){var h=c>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==o?(o<<=1,o|=h,(4==++s||0===n&&0===u)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}l=26}return i},T.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},T.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new k(e)},i(k,T),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},6204:function(e){e.exports=function(e){var t,r,n,i=e.length,a=0;for(t=0;t>>1;if(!(u<=0)){var h,f=i.mallocDouble(2*u*s),p=i.mallocInt32(s);if((s=l(e,u,f,p))>0){if(1===u&&n)a.init(s),h=a.sweepComplete(u,r,0,s,f,p,0,s,f,p);else{var d=i.mallocDouble(2*u*c),m=i.mallocInt32(c);(c=l(t,u,d,m))>0&&(a.init(s+c),h=1===u?a.sweepBipartite(u,r,0,s,f,p,0,c,d,m):o(u,r,n,s,f,p,c,d,m),i.free(d),i.free(m))}i.free(f),i.free(p)}return h}}}function u(e,t){n.push([e,t])}},2455:function(e,t){function r(e){return e?function(e,t,r,n,i,a,o,s,l,c,u){return i-n>l-s?function(e,t,r,n,i,a,o,s,l,c,u){for(var h=2*e,f=n,p=h*n;fc-l?n?function(e,t,r,n,i,a,o,s,l,c,u){for(var h=2*e,f=n,p=h*n;f0;){var D=(P-=1)*_,O=w[D],R=w[D+1],F=w[D+2],B=w[D+3],j=w[D+4],N=w[D+5],U=P*b,V=T[U],q=T[U+1],H=1&N,G=!!(16&N),W=u,Z=S,Y=C,X=I;if(H&&(W=C,Z=I,Y=u,X=S),!(2&N&&(F=g(e,O,R,F,W,Z,q),R>=F)||4&N&&(R=y(e,O,R,F,W,Z,V),R>=F))){var $=F-R,K=j-B;if(G){if(e*$*($+K)=p0)&&!(p1>=hi)"),m=u("lo===p0"),g=u("lo>>1,f=2*e,p=h,d=s[f*h+t];c=x?(p=v,d=x):y>=b?(p=g,d=y):(p=_,d=b):x>=b?(p=v,d=x):b>=y?(p=g,d=y):(p=_,d=b);for(var w=f*(u-1),T=f*p,k=0;kr&&i[h+t]>c;--u,h-=o){for(var f=h,p=h+o,d=0;df;++f,l+=s)if(i[l+h]===o)if(u===f)u+=1,c+=s;else{for(var p=0;s>p;++p){var d=i[l+p];i[l+p]=i[c],i[c++]=d}var m=a[f];a[f]=a[u],a[u++]=m}return u},"lof;++f,l+=s)if(i[l+h]p;++p){var d=i[l+p];i[l+p]=i[c],i[c++]=d}var m=a[f];a[f]=a[u],a[u++]=m}return u},"lo<=p0":function(e,t,r,n,i,a,o){for(var s=2*e,l=s*r,c=l,u=r,h=e+t,f=r;n>f;++f,l+=s)if(i[l+h]<=o)if(u===f)u+=1,c+=s;else{for(var p=0;s>p;++p){var d=i[l+p];i[l+p]=i[c],i[c++]=d}var m=a[f];a[f]=a[u],a[u++]=m}return u},"hi<=p0":function(e,t,r,n,i,a,o){for(var s=2*e,l=s*r,c=l,u=r,h=e+t,f=r;n>f;++f,l+=s)if(i[l+h]<=o)if(u===f)u+=1,c+=s;else{for(var p=0;s>p;++p){var d=i[l+p];i[l+p]=i[c],i[c++]=d}var m=a[f];a[f]=a[u],a[u++]=m}return u},"lop;++p,l+=s){var d=i[l+h],m=i[l+f];if(dg;++g){var y=i[l+g];i[l+g]=i[c],i[c++]=y}var v=a[p];a[p]=a[u],a[u++]=v}}return u},"lo<=p0&&p0<=hi":function(e,t,r,n,i,a,o){for(var s=2*e,l=s*r,c=l,u=r,h=t,f=e+t,p=r;n>p;++p,l+=s){var d=i[l+h],m=i[l+f];if(d<=o&&o<=m)if(u===p)u+=1,c+=s;else{for(var g=0;s>g;++g){var y=i[l+g];i[l+g]=i[c],i[c++]=y}var v=a[p];a[p]=a[u],a[u++]=v}}return u},"!(lo>=p0)&&!(p1>=hi)":function(e,t,r,n,i,a,o,s){for(var l=2*e,c=l*r,u=c,h=r,f=t,p=e+t,d=r;n>d;++d,c+=l){var m=i[c+f],g=i[c+p];if(!(m>=o||s>=g))if(h===d)h+=1,u+=l;else{for(var y=0;l>y;++y){var v=i[c+y];i[c+y]=i[u],i[u++]=v}var x=a[d];a[d]=a[h],a[h++]=x}}return h}}},4192:function(e){e.exports=function(e,n){n<=4*t?r(0,n-1,e):c(0,n-1,e)};var t=32;function r(e,t,r){for(var n=2*(e+1),i=e+1;i<=t;++i){for(var a=r[n++],o=r[n++],s=i,l=n-2;s-- >e;){var c=r[l-2],u=r[l-1];if(cr[t+1])}function l(e,t,r,n){var i=n[e*=2];return i>1,g=m-f,y=m+f,v=p,x=g,_=m,b=y,w=d,T=e+1,k=u-1,A=0;s(v,x,h)&&(A=v,v=x,x=A),s(b,w,h)&&(A=b,b=w,w=A),s(v,_,h)&&(A=v,v=_,_=A),s(x,_,h)&&(A=x,x=_,_=A),s(v,b,h)&&(A=v,v=b,b=A),s(_,b,h)&&(A=_,_=b,b=A),s(x,w,h)&&(A=x,x=w,w=A),s(x,_,h)&&(A=x,x=_,_=A),s(b,w,h)&&(A=b,b=w,w=A);for(var M=h[2*x],S=h[2*x+1],E=h[2*b],C=h[2*b+1],I=2*v,L=2*_,P=2*w,z=2*p,D=2*m,O=2*d,R=0;R<2;++R){var F=h[I+R],B=h[L+R],j=h[P+R];h[z+R]=F,h[D+R]=B,h[O+R]=j}i(g,e,h),i(y,u,h);for(var N=T;N<=k;++N)if(l(N,M,S,h))N!==T&&n(N,T,h),++T;else if(!l(N,E,C,h))for(;;){if(l(k,E,C,h)){l(k,M,S,h)?(a(N,T,k,h),++T,--k):(n(N,k,h),--k);break}if(--k>>1;a(d,S);var E=0,C=0;for(T=0;T=o)m(u,h,C--,I=I-o|0);else if(I>=0)m(l,c,E--,I);else if(I<=-o){I=-I-o|0;for(var L=0;L>>1;a(d,E);var C=0,I=0,L=0;for(k=0;k>1==d[2*k+3]>>1&&(z=2,k+=1),P<0){for(var D=-(P>>1)-1,O=0;O>1)-1,0===z?m(l,c,C--,D):1===z?m(u,h,I--,D):2===z&&m(f,p,L--,D)}},scanBipartite:function(e,t,r,n,i,s,u,h,f,p,y,v){var x=0,_=2*e,b=t,w=t+e,T=1,k=1;n?k=o:T=o;for(var A=i;A>>1;a(d,C);var I=0;for(A=0;A=o?(P=!n,M-=o):(P=!!n,M-=1),P)g(l,c,I++,M);else{var z=v[M],D=_*M,O=y[D+t+1],R=y[D+t+1+e];e:for(var F=0;F>>1;a(d,T);var k=0;for(x=0;x=o)l[k++]=_-o;else{var M=p[_-=1],S=g*_,E=f[S+t+1],C=f[S+t+1+e];e:for(var I=0;I=0;--I)if(l[I]===_){for(D=I+1;D0;){for(var p=r.pop(),d=(u=-1,h=-1,l=o[s=r.pop()],1);d=0||(t.flip(s,p),i(e,t,r,u,s,h),i(e,t,r,s,h,u),i(e,t,r,h,p,u),i(e,t,r,p,u,h))}}},5023:function(e,t,r){var n,i=r(2478);function a(e,t,r,n,i,a,o){this.cells=e,this.neighbor=t,this.flags=n,this.constraint=r,this.active=i,this.next=a,this.boundary=o}function o(e,t){return e[0]-t[0]||e[1]-t[1]||e[2]-t[2]}e.exports=function(e,t,r){var n=function(e,t){for(var r=e.cells(),n=r.length,i=0;i0||l.length>0;){for(;s.length>0;){var p=s.pop();if(c[p]!==-i){c[p]=i,u[p];for(var d=0;d<3;++d){var m=f[3*p+d];m>=0&&0===c[m]&&(h[3*p+d]?l.push(m):(s.push(m),c[m]=i))}}}var g=l;l=s,s=g,l.length=0,i=-i}var y=function(e,t,r){for(var n=0,i=0;i1&&i(r[f[p-2]],r[f[p-1]],a)>0;)e.push([f[p-1],f[p-2],o]),p-=1;f.length=p,f.push(o);var d=h.upperIds;for(p=d.length;p>1&&i(r[d[p-2]],r[d[p-1]],a)<0;)e.push([d[p-2],d[p-1],o]),p-=1;d.length=p,d.push(o)}}function u(e,t){return(e.a[0]d[0]&&i.push(new o(d,p,2,l),new o(p,d,1,l))}i.sort(s);for(var m=i[0].a[0]-(1+Math.abs(i[0].a[0]))*Math.pow(2,-52),g=[new a([m,1],[m,0],-1,[],[],[],[])],y=[],v=(l=0,i.length);l=0}}(),a.removeTriangle=function(e,t,r){var n=this.stars;o(n[e],t,r),o(n[t],r,e),o(n[r],e,t)},a.addTriangle=function(e,t,r){var n=this.stars;n[e].push(t,r),n[t].push(r,e),n[r].push(e,t)},a.opposite=function(e,t){for(var r=this.stars[t],n=1,i=r.length;nt[2]?1:0)}function y(e,t,r){if(0!==e.length){if(t)for(var n=0;n=0;--a){var x=t[u=(S=n[a])[0]],_=x[0],b=x[1],w=e[_],T=e[b];if((w[0]-T[0]||w[1]-T[1])<0){var k=_;_=b,b=k}x[0]=_;var A,M=x[1]=S[1];for(i&&(A=x[2]);a>0&&n[a-1][0]===u;){var S,E=(S=n[--a])[1];i?t.push([M,E,A]):t.push([M,E]),M=E}i?t.push([M,b,A]):t.push([M,b])}return f}(e,t,f,m,r),v=d(e,g);return y(t,v,r),!!v||f.length>0||m.length>0}},3637:function(e,t,r){e.exports=function(e,t,r,n){var a=s(t,e),h=s(n,r),f=u(a,h);if(0===o(f))return null;var p=u(h,s(e,r)),d=i(p,f),m=c(a,d);return l(e,m)};var n=r(6504),i=r(8697),a=r(5572),o=r(7721),s=r(544),l=r(2653),c=r(8987);function u(e,t){return a(n(e[0],t[1]),n(e[1],t[0]))}},3642:function(e){e.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},6729:function(e,t,r){var n=r(3642),i=r(395);function a(e){return[e[0]/255,e[1]/255,e[2]/255,e[3]]}function o(e){for(var t,r="#",n=0;n<3;++n)r+=("00"+(t=(t=e[n]).toString(16))).substr(t.length);return r}function s(e){return"rgba("+e.join(",")+")"}e.exports=function(e){var t,r,l,c,u,h,f,p,d,m;if(e||(e={}),p=(e.nshades||72)-1,f=e.format||"hex",(h=e.colormap)||(h="jet"),"string"==typeof h){if(h=h.toLowerCase(),!n[h])throw Error(h+" not a supported colorscale");u=n[h]}else{if(!Array.isArray(h))throw Error("unsupported colormap option",h);u=h.slice()}if(u.length>p+1)throw new Error(h+" map requires nshades to be at least size "+u.length);d=Array.isArray(e.alpha)?2!==e.alpha.length?[1,1]:e.alpha.slice():"number"==typeof e.alpha?[e.alpha,e.alpha]:[1,1],t=u.map((function(e){return Math.round(e.index*p)})),d[0]=Math.min(Math.max(d[0],0),1),d[1]=Math.min(Math.max(d[1],0),1);var g=u.map((function(e,t){var r=u[t].index,n=u[t].rgb.slice();return 4===n.length&&n[3]>=0&&n[3]<=1||(n[3]=d[0]+(d[1]-d[0])*r),n})),y=[];for(m=0;m0||l(e,t,a)?-1:1:0===s?c>0||l(e,t,r)?1:-1:i(c-s)}var h=n(e,t,r);return h>0?o>0&&n(e,t,a)>0?1:-1:h<0?o>0||n(e,t,a)>0?1:-1:n(e,t,a)>0||l(e,t,r)?1:-1};var n=r(3250),i=r(8572),a=r(9362),o=r(5382),s=r(8210);function l(e,t,r){var n=a(e[0],-t[0]),i=a(e[1],-t[1]),l=a(r[0],-t[0]),c=a(r[1],-t[1]),u=s(o(n,l),o(i,c));return u[u.length-1]>=0}},8572:function(e){e.exports=function(e){return e<0?-1:e>0?1:0}},8507:function(e){e.exports=function(e,n){var i=e.length,a=e.length-n.length;if(a)return a;switch(i){case 0:return 0;case 1:return e[0]-n[0];case 2:return e[0]+e[1]-n[0]-n[1]||t(e[0],e[1])-t(n[0],n[1]);case 3:var o=e[0]+e[1],s=n[0]+n[1];if(a=o+e[2]-(s+n[2]))return a;var l=t(e[0],e[1]),c=t(n[0],n[1]);return t(l,e[2])-t(c,n[2])||t(l+e[2],o)-t(c+n[2],s);case 4:var u=e[0],h=e[1],f=e[2],p=e[3],d=n[0],m=n[1],g=n[2],y=n[3];return u+h+f+p-(d+m+g+y)||t(u,h,f,p)-t(d,m,g,y,d)||t(u+h,u+f,u+p,h+f,h+p,f+p)-t(d+m,d+g,d+y,m+g,m+y,g+y)||t(u+h+f,u+h+p,u+f+p,h+f+p)-t(d+m+g,d+m+y,d+g+y,m+g+y);default:for(var v=e.slice().sort(r),x=n.slice().sort(r),_=0;_e[r][0]&&(r=n);return tr?[[r],[t]]:[[t]]}},4750:function(e,t,r){e.exports=function(e){var t=n(e),r=t.length;if(r<=2)return[];for(var i=new Array(r),a=t[r-1],o=0;o=t[l]&&(s+=1);a[o]=s}}return e}(n(a,!0),r)}};var n=r(8954),i=r(3952)},4769:function(e){e.exports=function(e,t,r,n,i,a){var o=i-1,s=i*i,l=o*o,c=(1+2*i)*l,u=i*l,h=s*(3-2*i),f=s*o;if(e.length){a||(a=new Array(e.length));for(var p=e.length-1;p>=0;--p)a[p]=c*e[p]+u*t[p]+h*r[p]+f*n[p];return a}return c*e+u*t+h*r+f*n},e.exports.derivative=function(e,t,r,n,i,a){var o=6*i*i-6*i,s=3*i*i-4*i+1,l=-6*i*i+6*i,c=3*i*i-2*i;if(e.length){a||(a=new Array(e.length));for(var u=e.length-1;u>=0;--u)a[u]=o*e[u]+s*t[u]+l*r[u]+c*n[u];return a}return o*e+s*t+l*r[u]+c*n}},7642:function(e,t,r){var n=r(8954),i=r(1682);function a(e,t){this.point=e,this.index=t}function o(e,t){for(var r=e.point,n=t.point,i=r.length,a=0;a=2)return!1;e[r]=n}return!0})):b.filter((function(e){for(var t=0;t<=s;++t){var r=y[e[t]];if(r<0)return!1;e[t]=r}return!0})),1&s)for(u=0;u>>31},e.exports.exponent=function(t){return(e.exports.hi(t)<<1>>>21)-1023},e.exports.fraction=function(t){var r=e.exports.lo(t),n=e.exports.hi(t),i=1048575&n;return 2146435072&n&&(i+=1048576),[r,i]},e.exports.denormalized=function(t){return!(2146435072&e.exports.hi(t))}},1338:function(e){function t(e,r,n){var i=0|e[n];if(i<=0)return[];var a,o=new Array(i);if(n===e.length-1)for(a=0;a"u"&&(r=0),typeof e){case"number":if(e>0)return function(e,t){var r,n;for(r=new Array(e),n=0;n=r-1){f=l.length-1;var d=e-t[r-1];for(p=0;p=r-1)for(var u=s.length-1,h=(t[r-1],0);h=0;--r)if(e[--t])return!1;return!0},s.jump=function(e){var t=this.lastT(),r=this.dimension;if(!(e0;--h)n.push(a(l[h-1],c[h-1],arguments[h])),i.push(0)}},s.push=function(e){var t=this.lastT(),r=this.dimension;if(!(e1e-6?1/s:0;this._time.push(e);for(var f=r;f>0;--f){var p=a(c[f-1],u[f-1],arguments[f]);n.push(p),i.push((p-n[o++])*h)}}},s.set=function(e){var t=this.dimension;if(!(e0;--l)r.push(a(o[l-1],s[l-1],arguments[l])),n.push(0)}},s.move=function(e){var t=this.lastT(),r=this.dimension;if(!(e<=t||arguments.length!==r+1)){var n=this._state,i=this._velocity,o=n.length-this.dimension,s=this.bounds,l=s[0],c=s[1],u=e-t,h=u>1e-6?1/u:0;this._time.push(e);for(var f=r;f>0;--f){var p=arguments[f];n.push(a(l[f-1],c[f-1],n[o++]+p)),i.push(p*h)}}},s.idle=function(e){var t=this.lastT();if(!(e=0;--h)n.push(a(l[h],c[h],n[o]+u*i[o])),i.push(0),o+=1}}},3840:function(e){function t(e,t,r,n,i,a){this._color=e,this.key=t,this.value=r,this.left=n,this.right=i,this._count=a}function r(e){return new t(e._color,e.key,e.value,e.left,e.right,e._count)}function n(e,r){return new t(e,r.key,r.value,r.left,r.right,r._count)}function i(e){e._count=1+(e.left?e.left._count:0)+(e.right?e.right._count:0)}function a(e,t){this._compare=e,this.root=t}e.exports=function(e){return new a(e||p,null)};var o=a.prototype;function s(e,t){var r;return t.left&&(r=s(e,t.left))?r:(r=e(t.key,t.value))||(t.right?s(e,t.right):void 0)}function l(e,t,r,n){if(t(e,n.key)<=0){var i;if(n.left&&(i=l(e,t,r,n.left)))return i;if(i=r(n.key,n.value))return i}if(n.right)return l(e,t,r,n.right)}function c(e,t,r,n,i){var a,o=r(e,i.key),s=r(t,i.key);return o<=0&&(i.left&&(a=c(e,t,r,n,i.left))||s>0&&(a=n(i.key,i.value)))?a:s>0&&i.right?c(e,t,r,n,i.right):void 0}function u(e,t){this.tree=e,this._stack=t}Object.defineProperty(o,"keys",{get:function(){var e=[];return this.forEach((function(t,r){e.push(t)})),e}}),Object.defineProperty(o,"values",{get:function(){var e=[];return this.forEach((function(t,r){e.push(r)})),e}}),Object.defineProperty(o,"length",{get:function(){return this.root?this.root._count:0}}),o.insert=function(e,r){for(var o=this._compare,s=this.root,l=[],c=[];s;){var u=o(e,s.key);l.push(s),c.push(u),s=u<=0?s.left:s.right}l.push(new t(0,e,r,null,null,1));for(var h=l.length-2;h>=0;--h)s=l[h],c[h]<=0?l[h]=new t(s._color,s.key,s.value,l[h+1],s.right,s._count+1):l[h]=new t(s._color,s.key,s.value,s.left,l[h+1],s._count+1);for(h=l.length-1;h>1;--h){var f=l[h-1];if(s=l[h],1===f._color||1===s._color)break;var p=l[h-2];if(p.left===f)if(f.left===s){if(!(d=p.right)||0!==d._color){p._color=0,p.left=f.right,f._color=1,f.right=p,l[h-2]=f,l[h-1]=s,i(p),i(f),h>=3&&((m=l[h-3]).left===p?m.left=f:m.right=f);break}f._color=1,p.right=n(1,d),p._color=0,h-=1}else{if(!(d=p.right)||0!==d._color){f.right=s.left,p._color=0,p.left=s.right,s._color=1,s.left=f,s.right=p,l[h-2]=s,l[h-1]=f,i(p),i(f),i(s),h>=3&&((m=l[h-3]).left===p?m.left=s:m.right=s);break}f._color=1,p.right=n(1,d),p._color=0,h-=1}else if(f.right===s){if(!(d=p.left)||0!==d._color){p._color=0,p.right=f.left,f._color=1,f.left=p,l[h-2]=f,l[h-1]=s,i(p),i(f),h>=3&&((m=l[h-3]).right===p?m.right=f:m.left=f);break}f._color=1,p.left=n(1,d),p._color=0,h-=1}else{var d;if(!(d=p.left)||0!==d._color){var m;f.left=s.right,p._color=0,p.right=s.left,s._color=1,s.right=f,s.left=p,l[h-2]=s,l[h-1]=f,i(p),i(f),i(s),h>=3&&((m=l[h-3]).right===p?m.right=s:m.left=s);break}f._color=1,p.left=n(1,d),p._color=0,h-=1}}return l[0]._color=1,new a(o,l[0])},o.forEach=function(e,t,r){if(this.root)switch(arguments.length){case 1:return s(e,this.root);case 2:return l(t,this._compare,e,this.root);case 3:return this._compare(t,r)>=0?void 0:c(t,r,this._compare,e,this.root)}},Object.defineProperty(o,"begin",{get:function(){for(var e=[],t=this.root;t;)e.push(t),t=t.left;return new u(this,e)}}),Object.defineProperty(o,"end",{get:function(){for(var e=[],t=this.root;t;)e.push(t),t=t.right;return new u(this,e)}}),o.at=function(e){if(e<0)return new u(this,[]);for(var t=this.root,r=[];;){if(r.push(t),t.left){if(e=t.right._count)break;t=t.right}return new u(this,[])},o.ge=function(e){for(var t=this._compare,r=this.root,n=[],i=0;r;){var a=t(e,r.key);n.push(r),a<=0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new u(this,n)},o.gt=function(e){for(var t=this._compare,r=this.root,n=[],i=0;r;){var a=t(e,r.key);n.push(r),a<0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new u(this,n)},o.lt=function(e){for(var t=this._compare,r=this.root,n=[],i=0;r;){var a=t(e,r.key);n.push(r),a>0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new u(this,n)},o.le=function(e){for(var t=this._compare,r=this.root,n=[],i=0;r;){var a=t(e,r.key);n.push(r),a>=0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new u(this,n)},o.find=function(e){for(var t=this._compare,r=this.root,n=[];r;){var i=t(e,r.key);if(n.push(r),0===i)return new u(this,n);r=i<=0?r.left:r.right}return new u(this,[])},o.remove=function(e){var t=this.find(e);return t?t.remove():this},o.get=function(e){for(var t=this._compare,r=this.root;r;){var n=t(e,r.key);if(0===n)return r.value;r=n<=0?r.left:r.right}};var h=u.prototype;function f(e,t){e.key=t.key,e.value=t.value,e.left=t.left,e.right=t.right,e._color=t._color,e._count=t._count}function p(e,t){return et?1:0}Object.defineProperty(h,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(h,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),h.clone=function(){return new u(this.tree,this._stack.slice())},h.remove=function(){var e=this._stack;if(0===e.length)return this.tree;var o=new Array(e.length),s=e[e.length-1];o[o.length-1]=new t(s._color,s.key,s.value,s.left,s.right,s._count);for(var l=e.length-2;l>=0;--l)(s=e[l]).left===e[l+1]?o[l]=new t(s._color,s.key,s.value,o[l+1],s.right,s._count):o[l]=new t(s._color,s.key,s.value,s.left,o[l+1],s._count);if((s=o[o.length-1]).left&&s.right){var c=o.length;for(s=s.left;s.right;)o.push(s),s=s.right;var u=o[c-1];for(o.push(new t(s._color,u.key,u.value,s.left,s.right,s._count)),o[c-1].key=s.key,o[c-1].value=s.value,l=o.length-2;l>=c;--l)s=o[l],o[l]=new t(s._color,s.key,s.value,s.left,o[l+1],s._count);o[c-1].left=o[c]}if(0===(s=o[o.length-1])._color){var h=o[o.length-2];for(h.left===s?h.left=null:h.right===s&&(h.right=null),o.pop(),l=0;l=0;--l){if(t=e[l],0===l)return void(t._color=1);if((a=e[l-1]).left===t){if((o=a.right).right&&0===o.right._color)return s=(o=a.right=r(o)).right=r(o.right),a.right=o.left,o.left=a,o.right=s,o._color=a._color,t._color=1,a._color=1,s._color=1,i(a),i(o),l>1&&((c=e[l-2]).left===a?c.left=o:c.right=o),void(e[l-1]=o);if(o.left&&0===o.left._color)return s=(o=a.right=r(o)).left=r(o.left),a.right=s.left,o.left=s.right,s.left=a,s.right=o,s._color=a._color,a._color=1,o._color=1,t._color=1,i(a),i(o),i(s),l>1&&((c=e[l-2]).left===a?c.left=s:c.right=s),void(e[l-1]=s);if(1===o._color){if(0===a._color)return a._color=1,void(a.right=n(0,o));a.right=n(0,o);continue}o=r(o),a.right=o.left,o.left=a,o._color=a._color,a._color=0,i(a),i(o),l>1&&((c=e[l-2]).left===a?c.left=o:c.right=o),e[l-1]=o,e[l]=a,l+11&&((c=e[l-2]).right===a?c.right=o:c.left=o),void(e[l-1]=o);if(o.right&&0===o.right._color)return s=(o=a.left=r(o)).right=r(o.right),a.left=s.right,o.right=s.left,s.right=a,s.left=o,s._color=a._color,a._color=1,o._color=1,t._color=1,i(a),i(o),i(s),l>1&&((c=e[l-2]).right===a?c.right=s:c.left=s),void(e[l-1]=s);if(1===o._color){if(0===a._color)return a._color=1,void(a.left=n(0,o));a.left=n(0,o);continue}var c;o=r(o),a.left=o.right,o.right=a,o._color=a._color,a._color=0,i(a),i(o),l>1&&((c=e[l-2]).right===a?c.right=o:c.left=o),e[l-1]=o,e[l]=a,l+10)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(h,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(h,"index",{get:function(){var e=0,t=this._stack;if(0===t.length){var r=this.tree.root;return r?r._count:0}t[t.length-1].left&&(e=t[t.length-1].left._count);for(var n=t.length-2;n>=0;--n)t[n+1]===t[n].right&&(++e,t[n].left&&(e+=t[n].left._count));return e},enumerable:!0}),h.next=function(){var e=this._stack;if(0!==e.length){var t=e[e.length-1];if(t.right)for(t=t.right;t;)e.push(t),t=t.left;else for(e.pop();e.length>0&&e[e.length-1].right===t;)t=e[e.length-1],e.pop()}},Object.defineProperty(h,"hasNext",{get:function(){var e=this._stack;if(0===e.length)return!1;if(e[e.length-1].right)return!0;for(var t=e.length-1;t>0;--t)if(e[t-1].left===e[t])return!0;return!1}}),h.update=function(e){var r=this._stack;if(0===r.length)throw new Error("Can't update empty node!");var n=new Array(r.length),i=r[r.length-1];n[n.length-1]=new t(i._color,i.key,e,i.left,i.right,i._count);for(var o=r.length-2;o>=0;--o)(i=r[o]).left===r[o+1]?n[o]=new t(i._color,i.key,i.value,n[o+1],i.right,i._count):n[o]=new t(i._color,i.key,i.value,i.left,n[o+1],i._count);return new a(this.tree._compare,n[0])},h.prev=function(){var e=this._stack;if(0!==e.length){var t=e[e.length-1];if(t.left)for(t=t.left;t;)e.push(t),t=t.right;else for(e.pop();e.length>0&&e[e.length-1].left===t;)t=e[e.length-1],e.pop()}},Object.defineProperty(h,"hasPrev",{get:function(){var e=this._stack;if(0===e.length)return!1;if(e[e.length-1].left)return!0;for(var t=e.length-1;t>0;--t)if(e[t-1].right===e[t])return!0;return!1}})},3837:function(e,t,r){e.exports=function(e,t){var r=new p(e);return r.update(t),r};var n=r(4935),i=r(501),a=r(5304),o=r(6429),s=r(6444),l=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),c=ArrayBuffer,u=DataView;function h(e){return Array.isArray(e)||function(e){return c.isView(e)&&!(e instanceof u)}(e)}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function p(e){this.gl=e,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=a(e)}var d=p.prototype;function m(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}d.update=function(e){function t(t,r,n){if(n in e){var i,a=e[n],o=this[n];(t?h(a)&&h(a[0]):h(a))?this[n]=i=[r(a[0]),r(a[1]),r(a[2])]:this[n]=i=[r(a),r(a),r(a)];for(var s=0;s<3;++s)if(i[s]!==o[s])return!0}return!1}e=e||{};var r,a=t.bind(this,!1,Number),o=t.bind(this,!1,Boolean),l=t.bind(this,!1,String),c=t.bind(this,!0,(function(e){if(h(e)){if(3===e.length)return[+e[0],+e[1],+e[2],1];if(4===e.length)return[+e[0],+e[1],+e[2],+e[3]]}return[0,0,0,1]})),u=!1,f=!1;if("bounds"in e)for(var p=e.bounds,d=0;d<2;++d)for(var m=0;m<3;++m)p[d][m]!==this.bounds[d][m]&&(f=!0),this.bounds[d][m]=p[d][m];if("ticks"in e)for(r=e.ticks,u=!0,this.autoTicks=!1,d=0;d<3;++d)this.tickSpacing[d]=0;else a("tickSpacing")&&(this.autoTicks=!0,f=!0);if(this._firstInit&&("ticks"in e||"tickSpacing"in e||(this.autoTicks=!0),f=!0,u=!0,this._firstInit=!1),f&&this.autoTicks&&(r=s.create(this.bounds,this.tickSpacing),u=!0),u){for(d=0;d<3;++d)r[d].sort((function(e,t){return e.x-t.x}));s.equal(r,this.ticks)?u=!1:this.ticks=r}o("tickEnable"),l("tickFont")&&(u=!0),l("tickFontStyle")&&(u=!0),l("tickFontWeight")&&(u=!0),l("tickFontVariant")&&(u=!0),a("tickSize"),a("tickAngle"),a("tickPad"),c("tickColor");var g=l("labels");l("labelFont")&&(g=!0),l("labelFontStyle")&&(g=!0),l("labelFontWeight")&&(g=!0),l("labelFontVariant")&&(g=!0),o("labelEnable"),a("labelSize"),a("labelPad"),c("labelColor"),o("lineEnable"),o("lineMirror"),a("lineWidth"),c("lineColor"),o("lineTickEnable"),o("lineTickMirror"),a("lineTickLength"),a("lineTickWidth"),c("lineTickColor"),o("gridEnable"),a("gridWidth"),c("gridColor"),o("zeroEnable"),c("zeroLineColor"),a("zeroLineWidth"),o("backgroundEnable"),c("backgroundColor");var y=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],v=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(g||u)&&this._text.update(this.bounds,this.labels,y,this.ticks,v):this._text=n(this.gl,this.bounds,this.labels,y,this.ticks,v),this._lines&&u&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=i(this.gl,this.bounds,this.ticks))};var g=[new m,new m,new m];function y(e,t,r,n,i){for(var a=e.primalOffset,o=e.primalMinor,s=e.mirrorOffset,l=e.mirrorMinor,c=n[t],u=0;u<3;++u)if(t!==u){var h=a,f=s,p=o,d=l;c&1<0?(p[u]=-1,d[u]=0):(p[u]=0,d[u]=1)}}var v=[0,0,0],x={model:l,view:l,projection:l,_ortho:!1};d.isOpaque=function(){return!0},d.isTransparent=function(){return!1},d.drawTransparent=function(e){};var _=[0,0,0],b=[0,0,0],w=[0,0,0];d.draw=function(e){e=e||x;for(var t=this.gl,r=e.model||l,n=e.view||l,i=e.projection||l,a=this.bounds,s=e._ortho||!1,c=o(r,n,i,a,s),u=c.cubeEdges,h=c.axis,p=n[12],d=n[13],m=n[14],T=n[15],k=(s?2:1)*this.pixelRatio*(i[3]*p+i[7]*d+i[11]*m+i[15]*T)/t.drawingBufferHeight,A=0;A<3;++A)this.lastCubeProps.cubeEdges[A]=u[A],this.lastCubeProps.axis[A]=h[A];var M=g;for(A=0;A<3;++A)y(g[A],A,this.bounds,u,h);t=this.gl;var S,E,C,I,L,P,z,D,O,R,F,B,j=v;for(A=0;A<3;++A)this.backgroundEnable[A]?j[A]=h[A]:j[A]=0;for(this._background.draw(r,n,i,a,j,this.backgroundColor),this._lines.bind(r,n,i,this),A=0;A<3;++A){var N=[0,0,0];h[A]>0?N[A]=a[1][A]:N[A]=a[0][A];for(var U=0;U<2;++U){var V=(A+1+U)%3,q=(A+1+(1^U))%3;this.gridEnable[V]&&this._lines.drawGrid(V,q,this.bounds,N,this.gridColor[V],this.gridWidth[V]*this.pixelRatio)}for(U=0;U<2;++U)V=(A+1+U)%3,q=(A+1+(1^U))%3,this.zeroEnable[q]&&Math.min(a[0][q],a[1][q])<=0&&Math.max(a[0][q],a[1][q])>=0&&this._lines.drawZero(V,q,this.bounds,N,this.zeroLineColor[q],this.zeroLineWidth[q]*this.pixelRatio)}for(A=0;A<3;++A){this.lineEnable[A]&&this._lines.drawAxisLine(A,this.bounds,M[A].primalOffset,this.lineColor[A],this.lineWidth[A]*this.pixelRatio),this.lineMirror[A]&&this._lines.drawAxisLine(A,this.bounds,M[A].mirrorOffset,this.lineColor[A],this.lineWidth[A]*this.pixelRatio);var H=f(_,M[A].primalMinor),G=f(b,M[A].mirrorMinor),W=this.lineTickLength;for(U=0;U<3;++U){var Z=k/r[5*U];H[U]*=W[U]*Z,G[U]*=W[U]*Z}this.lineTickEnable[A]&&this._lines.drawAxisTicks(A,M[A].primalOffset,H,this.lineTickColor[A],this.lineTickWidth[A]*this.pixelRatio),this.lineTickMirror[A]&&this._lines.drawAxisTicks(A,M[A].mirrorOffset,G,this.lineTickColor[A],this.lineTickWidth[A]*this.pixelRatio)}function Y(e){(C=[0,0,0])[e]=1}for(this._lines.unbind(),this._text.bind(r,n,i,this.pixelRatio),A=0;A<3;++A){var X=M[A].primalMinor,$=M[A].mirrorMinor,K=f(w,M[A].primalOffset);for(U=0;U<3;++U)this.lineTickEnable[A]&&(K[U]+=k*X[U]*Math.max(this.lineTickLength[U],0)/r[5*U]);var J=[0,0,0];if(J[A]=1,this.tickEnable[A]){for(-3600===this.tickAngle[A]?(this.tickAngle[A]=0,this.tickAlign[A]="auto"):this.tickAlign[A]=-1,E=1,"auto"===(S=[this.tickAlign[A],.5,E])[0]?S[0]=0:S[0]=parseInt(""+S[0]),C=[0,0,0],P=$,void 0,void 0,void 0,void 0,void 0,void 0,D=((I=A)+2)%3,O=(L=X)[z=(I+1)%3],R=L[D],F=P[z],B=P[D],O>0&&B>0||O>0&&B<0||O<0&&B>0||O<0&&B<0?Y(z):(R>0&&F>0||R>0&&F<0||R<0&&F>0||R<0&&F<0)&&Y(D),U=0;U<3;++U)K[U]+=k*X[U]*this.tickPad[U]/r[5*U];this._text.drawTicks(A,this.tickSize[A],this.tickAngle[A],K,this.tickColor[A],J,C,S)}if(this.labelEnable[A]){for(E=0,C=[0,0,0],this.labels[A].length>4&&(Y(A),E=1),"auto"===(S=[this.labelAlign[A],.5,E])[0]?S[0]=0:S[0]=parseInt(""+S[0]),U=0;U<3;++U)K[U]+=k*X[U]*this.labelPad[U]/r[5*U];K[A]+=.5*(a[0][A]+a[1][A]),this._text.drawLabel(A,this.labelSize[A],this.labelAngle[A],K,this.labelColor[A],[0,0,0],C,S)}}this._text.unbind()},d.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},5304:function(e,t,r){e.exports=function(e){for(var t=[],r=[],s=0,l=0;l<3;++l)for(var c=(l+1)%3,u=(l+2)%3,h=[0,0,0],f=[0,0,0],p=-1;p<=1;p+=2){r.push(s,s+2,s+1,s+1,s+2,s+3),h[l]=p,f[l]=p;for(var d=-1;d<=1;d+=2){h[c]=d;for(var m=-1;m<=1;m+=2)h[u]=m,t.push(h[0],h[1],h[2],f[0],f[1],f[2]),s+=1}var g=c;c=u,u=g}var y=n(e,new Float32Array(t)),v=n(e,new Uint16Array(r),e.ELEMENT_ARRAY_BUFFER),x=i(e,[{buffer:y,type:e.FLOAT,size:3,offset:0,stride:24},{buffer:y,type:e.FLOAT,size:3,offset:12,stride:24}],v),_=a(e);return _.attributes.position.location=0,_.attributes.normal.location=1,new o(e,y,x,_)};var n=r(2762),i=r(8116),a=r(1879).bg;function o(e,t,r,n){this.gl=e,this.buffer=t,this.vao=r,this.shader=n}var s=o.prototype;s.draw=function(e,t,r,n,i,a){for(var o=!1,s=0;s<3;++s)o=o||i[s];if(o){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:e,view:t,projection:r,bounds:n,enable:i,colors:a},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),l.disable(l.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},6429:function(e,t,r){e.exports=function(e,t,r,a,p){i(s,t,e),i(s,r,s);for(var v=0,x=0;x<2;++x){u[2]=a[x][2];for(var _=0;_<2;++_){u[1]=a[_][1];for(var b=0;b<2;++b)u[0]=a[b][0],f(l[v],u,s),v+=1}}var w=-1;for(x=0;x<8;++x){for(var T=l[x][3],k=0;k<3;++k)c[x][k]=l[x][k]/T;p&&(c[x][2]*=-1),T<0&&(w<0||c[x][2]E&&(w|=1<E&&(w|=1<c[x][1])&&(R=x);var F=-1;for(x=0;x<3;++x)(j=R^1<c[B][0]&&(B=j))}var N=m;N[0]=N[1]=N[2]=0,N[n.log2(F^R)]=R&F,N[n.log2(R^B)]=R&B;var U=7^B;U===w||U===O?(U=7^F,N[n.log2(B^U)]=U&B):N[n.log2(F^U)]=U&F;var V=g,q=w;for(A=0;A<3;++A)V[A]=q&1< HALF_PI) && (b <= ONE_AND_HALF_PI)) ?\n b - PI :\n b;\n}\n\nfloat look_horizontal_or_vertical(float a, float ratio) {\n // ratio controls the ratio between being horizontal to (vertical + horizontal)\n // if ratio is set to 0.5 then it is 50%, 50%.\n // when using a higher ratio e.g. 0.75 the result would\n // likely be more horizontal than vertical.\n\n float b = positive_angle(a);\n\n return\n (b < ( ratio) * HALF_PI) ? 0.0 :\n (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI :\n (b < (2.0 + ratio) * HALF_PI) ? 0.0 :\n (b < (4.0 - ratio) * HALF_PI) ? HALF_PI :\n 0.0;\n}\n\nfloat roundTo(float a, float b) {\n return float(b * floor((a + 0.5 * b) / b));\n}\n\nfloat look_round_n_directions(float a, int n) {\n float b = positive_angle(a);\n float div = TWO_PI / float(n);\n float c = roundTo(b, div);\n return look_upwards(c);\n}\n\nfloat applyAlignOption(float rawAngle, float delta) {\n return\n (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions\n (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical\n (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis\n (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards\n (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal\n rawAngle; // otherwise return back raw input angle\n}\n\nbool isAxisTitle = (axis.x == 0.0) &&\n (axis.y == 0.0) &&\n (axis.z == 0.0);\n\nvoid main() {\n //Compute world offset\n float axisDistance = position.z;\n vec3 dataPosition = axisDistance * axis + offset;\n\n float beta = angle; // i.e. user defined attributes for each tick\n\n float axisAngle;\n float clipAngle;\n float flip;\n\n if (enableAlign) {\n axisAngle = (isAxisTitle) ? HALF_PI :\n computeViewAngle(dataPosition, dataPosition + axis);\n clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir);\n\n axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0;\n clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0;\n\n flip = (dot(vec2(cos(axisAngle), sin(axisAngle)),\n vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0;\n\n beta += applyAlignOption(clipAngle, flip * PI);\n }\n\n //Compute plane offset\n vec2 planeCoord = position.xy * pixelScale;\n\n mat2 planeXform = scale * mat2(\n cos(beta), sin(beta),\n -sin(beta), cos(beta)\n );\n\n vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;\n\n //Compute clip position\n vec3 clipPosition = project(dataPosition);\n\n //Apply text offset in clip coordinates\n clipPosition += vec3(viewOffset, 0.0);\n\n //Done\n gl_Position = vec4(clipPosition, 1.0);\n}\n"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 color;\nvoid main() {\n gl_FragColor = color;\n}"]);t.Q=function(e){return i(e,s,l,null,[{name:"position",type:"vec3"}])};var c=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec3 normal;\n\nuniform mat4 model, view, projection;\nuniform vec3 enable;\nuniform vec3 bounds[2];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n\n vec3 signAxis = sign(bounds[1] - bounds[0]);\n\n vec3 realNormal = signAxis * normal;\n\n if(dot(realNormal, enable) > 0.0) {\n vec3 minRange = min(bounds[0], bounds[1]);\n vec3 maxRange = max(bounds[0], bounds[1]);\n vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0));\n gl_Position = projection * (view * (model * vec4(nPosition, 1.0)));\n } else {\n gl_Position = vec4(0,0,0,0);\n }\n\n colorChannel = abs(realNormal);\n}\n"]),u=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 colors[3];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n gl_FragColor = colorChannel.x * colors[0] +\n colorChannel.y * colors[1] +\n colorChannel.z * colors[2];\n}"]);t.bg=function(e){return i(e,c,u,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},4935:function(e,t,r){e.exports=function(e,t,r,a,s,l){var c=n(e),h=i(e,[{buffer:c,size:3}]),f=o(e);f.attributes.position.location=0;var p=new u(e,f,c,h);return p.update(t,r,a,s,l),p};var n=r(2762),i=r(8116),a=r(4359),o=r(1879).Q,s=window||c.global||{},l=s.__TEXT_CACHE||{};function u(e,t,r,n){this.gl=e,this.shader=t,this.buffer=r,this.vao=n,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}s.__TEXT_CACHE={};var h=u.prototype,f=[0,0];h.bind=function(e,t,r,n){this.vao.bind(),this.shader.bind();var i=this.shader.uniforms;i.model=e,i.view=t,i.projection=r,i.pixelScale=n,f[0]=this.gl.drawingBufferWidth,f[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=f},h.unbind=function(){this.vao.unbind()},h.update=function(e,t,r,n,i){var o=[];function s(e,t,r,n,i,s){var c=[r.style,r.weight,r.variant,r.family].join("_"),u=l[c];u||(u=l[c]={});var h=u[t];h||(h=u[t]=function(e,t){try{return a(e,t)}catch(t){return console.warn('error vectorizing text:"'+e+'" error:',t),{cells:[],positions:[]}}}(t,{triangles:!0,font:r.family,fontStyle:r.style,fontWeight:r.weight,fontVariant:r.variant,textAlign:"center",textBaseline:"middle",lineSpacing:i,styletags:s}));for(var f=(n||12)/12,p=h.positions,d=h.cells,m=0,g=d.length;m=0;--v){var x=p[y[v]];o.push(f*x[0],-f*x[1],e)}}for(var c=[0,0,0],u=[0,0,0],h=[0,0,0],f=[0,0,0],p={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},d=0;d<3;++d){h[d]=o.length/3|0,s(.5*(e[0][d]+e[1][d]),t[d],r[d],12,1.25,p),f[d]=(o.length/3|0)-h[d],c[d]=o.length/3|0;for(var m=0;m=0&&(i=r.length-n-1);var a=Math.pow(10,i),o=Math.round(e*t*a),s=o+"";if(s.indexOf("e")>=0)return s;var l=o/a,c=o%a;o<0?(l=0|-Math.ceil(l),c=0|-c):(l=0|Math.floor(l),c|=0);var u=""+l;if(o<0&&(u="-"+u),i){for(var h=""+c;h.length=e[0][i];--o)a.push({x:o*t[i],text:r(t[i],o)});n.push(a)}return n},t.equal=function(e,t){for(var r=0;r<3;++r){if(e[r].length!==t[r].length)return!1;for(var n=0;nr)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return e.bufferSubData(t,a,i),r}function u(e,t){for(var r=n.malloc(e.length,t),i=e.length,a=0;a=0;--n){if(t[n]!==r)return!1;r*=e[n]}return!0}(e.shape,e.stride))0===e.offset&&e.data.length===e.shape[0]?this.length=c(this.gl,this.type,this.length,this.usage,e.data,t):this.length=c(this.gl,this.type,this.length,this.usage,e.data.subarray(e.offset,e.shape[0]),t);else{var s=n.malloc(e.size,r),l=a(s,e.shape);i.assign(l,e),this.length=c(this.gl,this.type,this.length,this.usage,t<0?s:s.subarray(0,e.size),t),n.free(s)}}else if(Array.isArray(e)){var h;h=this.type===this.gl.ELEMENT_ARRAY_BUFFER?u(e,"uint16"):u(e,"float32"),this.length=c(this.gl,this.type,this.length,this.usage,t<0?h:h.subarray(0,e.length),t),n.free(h)}else if("object"==typeof e&&"number"==typeof e.length)this.length=c(this.gl,this.type,this.length,this.usage,e,t);else{if("number"!=typeof e&&void 0!==e)throw new Error("gl-buffer: Invalid data type");if(t>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");(e|=0)<=0&&(e=1),this.gl.bufferData(this.type,0|e,this.usage),this.length=e}},e.exports=function(e,t,r,n){if(r=r||e.ARRAY_BUFFER,n=n||e.DYNAMIC_DRAW,r!==e.ARRAY_BUFFER&&r!==e.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(n!==e.DYNAMIC_DRAW&&n!==e.STATIC_DRAW&&n!==e.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var i=e.createBuffer(),a=new s(e,r,i,0,n);return a.update(t),a}},6405:function(e,t,r){var n=r(2931);e.exports=function(e,t){var r=e.positions,i=e.vectors,a={positions:[],vertexIntensity:[],vertexIntensityBounds:e.vertexIntensityBounds,vectors:[],cells:[],coneOffset:e.coneOffset,colormap:e.colormap};if(0===e.positions.length)return t&&(t[0]=[0,0,0],t[1]=[0,0,0]),a;for(var o=0,s=1/0,l=-1/0,c=1/0,u=-1/0,h=1/0,f=-1/0,p=null,d=null,m=[],g=1/0,y=!1,v="raw"===e.coneSizemode,x=0;xo&&(o=n.length(b)),x&&!v){var w=2*n.distance(p,_)/(n.length(d)+n.length(b));w?(g=Math.min(g,w),y=!1):y=!0}y||(p=_,d=b),m.push(b)}var T=[s,c,h],k=[l,u,f];t&&(t[0]=T,t[1]=k),0===o&&(o=1);var A=1/o;isFinite(g)||(g=1),a.vectorScale=g;var M=e.coneSize||(v?1:.5);e.absoluteConeSize&&(M=e.absoluteConeSize*A),a.coneScale=M,x=0;for(var S=0;x=1},p.isTransparent=function(){return this.opacity<1},p.pickSlots=1,p.setPickBase=function(e){this.pickId=e},p.update=function(e){e=e||{};var t=this.gl;this.dirty=!0,"lightPosition"in e&&(this.lightPosition=e.lightPosition),"opacity"in e&&(this.opacity=e.opacity),"ambient"in e&&(this.ambientLight=e.ambient),"diffuse"in e&&(this.diffuseLight=e.diffuse),"specular"in e&&(this.specularLight=e.specular),"roughness"in e&&(this.roughness=e.roughness),"fresnel"in e&&(this.fresnel=e.fresnel),void 0!==e.tubeScale&&(this.tubeScale=e.tubeScale),void 0!==e.vectorScale&&(this.vectorScale=e.vectorScale),void 0!==e.coneScale&&(this.coneScale=e.coneScale),void 0!==e.coneOffset&&(this.coneOffset=e.coneOffset),e.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=t.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=t.LINEAR,this.texture.setPixels(function(e){for(var t=u({colormap:e,nshades:256,format:"rgba"}),r=new Uint8Array(1024),n=0;n<256;++n){for(var i=t[n],a=0;a<3;++a)r[4*n+a]=i[a];r[4*n+3]=255*i[3]}return c(r,[256,256,4],[4,0,1])}(e.colormap)),this.texture.generateMipmap());var r=e.cells,n=e.positions,i=e.vectors;if(n&&r&&i){var a=[],o=[],s=[],l=[],h=[];this.cells=r,this.positions=n,this.vectors=i;var f=e.meshColor||[1,1,1,1],p=e.vertexIntensity,d=1/0,m=-1/0;if(p)if(e.vertexIntensityBounds)d=+e.vertexIntensityBounds[0],m=+e.vertexIntensityBounds[1];else for(var g=0;g0){var m=this.triShader;m.bind(),m.uniforms=c,this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},p.drawPick=function(e){e=e||{};for(var t=this.gl,r=e.model||h,n=e.view||h,i=e.projection||h,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[t.drawingBufferWidth,t.drawingBufferHeight];var s={model:r,view:n,projection:i,clipBounds:a,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},l=this.pickShader;l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind())},p.pick=function(e){if(!e||e.id!==this.pickId)return null;var t=e.value[0]+256*e.value[1]+65536*e.value[2],r=this.cells[t],n=this.positions[r[1]].slice(0,3),i={position:n,dataCoordinate:n,index:Math.floor(r[1]/48)};return"cone"===this.traceType?i.index=Math.floor(r[1]/48):"streamtube"===this.traceType&&(i.intensity=this.intensity[r[1]],i.velocity=this.vectors[r[1]].slice(0,3),i.divergence=this.vectors[r[1]][3],i.index=t),i},p.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()},e.exports=function(e,t,r){var s=r.shaders;1===arguments.length&&(e=(t=e).gl);var l=function(e,t){var r=n(e,t.meshShader.vertex,t.meshShader.fragment,null,t.meshShader.attributes);return r.attributes.position.location=0,r.attributes.color.location=2,r.attributes.uv.location=3,r.attributes.vector.location=4,r}(e,s),u=function(e,t){var r=n(e,t.pickShader.vertex,t.pickShader.fragment,null,t.pickShader.attributes);return r.attributes.position.location=0,r.attributes.id.location=1,r.attributes.vector.location=4,r}(e,s),h=o(e,c(new Uint8Array([255,255,255,255]),[1,1,4]));h.generateMipmap(),h.minFilter=e.LINEAR_MIPMAP_LINEAR,h.magFilter=e.LINEAR;var p=i(e),d=i(e),m=i(e),g=i(e),y=i(e),v=new f(e,h,l,u,p,d,y,m,g,a(e,[{buffer:p,type:e.FLOAT,size:4},{buffer:y,type:e.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:m,type:e.FLOAT,size:4},{buffer:g,type:e.FLOAT,size:2},{buffer:d,type:e.FLOAT,size:4}]),r.traceType||"cone");return v.update(t),v}},614:function(e,t,r){var n=r(3236),i=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec3 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\n\nuniform float vectorScale, coneScale, coneOffset;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 eyePosition, lightPosition;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * conePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(conePosition, 1.0);\n vec4 t_position = view * conePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = conePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),a=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),o=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float vectorScale, coneScale, coneOffset;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n gl_Position = projection * (view * conePosition);\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);t.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},t.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737:function(e){e.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},5171:function(e,t,r){var n=r(737);e.exports=function(e){return n[e]}},9165:function(e,t,r){e.exports=function(e){var t=e.gl,r=n(t),o=i(t,[{buffer:r,type:t.FLOAT,size:3,offset:0,stride:40},{buffer:r,type:t.FLOAT,size:4,offset:12,stride:40},{buffer:r,type:t.FLOAT,size:3,offset:28,stride:40}]),l=a(t);l.attributes.position.location=0,l.attributes.color.location=1,l.attributes.offset.location=2;var c=new s(t,r,o,l);return c.update(e),c};var n=r(2762),i=r(8116),a=r(3436),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(e,t,r,n){this.gl=e,this.shader=n,this.buffer=t,this.vao=r,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var l=s.prototype;function c(e,t){for(var r=0;r<3;++r)e[0][r]=Math.min(e[0][r],t[r]),e[1][r]=Math.max(e[1][r],t[r])}l.isOpaque=function(){return!this.hasAlpha},l.isTransparent=function(){return this.hasAlpha},l.drawTransparent=l.draw=function(e){var t=this.gl,r=this.shader.uniforms;this.shader.bind();var n=r.view=e.view||o,i=r.projection=e.projection||o;r.model=e.model||o,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var a=n[12],s=n[13],l=n[14],c=n[15],u=(e._ortho?2:1)*this.pixelRatio*(i[3]*a+i[7]*s+i[11]*l+i[15]*c)/t.drawingBufferHeight;this.vao.bind();for(var h=0;h<3;++h)t.lineWidth(this.lineWidth[h]*this.pixelRatio),r.capSize=this.capSize[h]*u,this.lineCount[h]&&t.drawArrays(t.LINES,this.lineOffset[h],this.lineCount[h]);this.vao.unbind()};var u=function(){for(var e=new Array(3),t=0;t<3;++t){for(var r=[],n=1;n<=2;++n)for(var i=-1;i<=1;i+=2){var a=[0,0,0];a[(n+t)%3]=i,r.push(a)}e[t]=r}return e}();function h(e,t,r,n){for(var i=u[n],a=0;a0&&((p=u.slice())[s]+=d[1][s],i.push(u[0],u[1],u[2],m[0],m[1],m[2],m[3],0,0,0,p[0],p[1],p[2],m[0],m[1],m[2],m[3],0,0,0),c(this.bounds,p),o+=2+h(i,p,m,s)))}this.lineCount[s]=o-this.lineOffset[s]}this.buffer.update(i)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},3436:function(e,t,r){var n=r(3236),i=r(9405),a=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, offset;\nattribute vec4 color;\nuniform mat4 model, view, projection;\nuniform float capSize;\nvarying vec4 fragColor;\nvarying vec3 fragPosition;\n\nvoid main() {\n vec4 worldPosition = model * vec4(position, 1.0);\n worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);\n gl_Position = projection * (view * worldPosition);\n fragColor = color;\n fragPosition = position;\n}"]),o=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float opacity;\nvarying vec3 fragPosition;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], fragPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n gl_FragColor = opacity * fragColor;\n}"]);e.exports=function(e){return i(e,a,o,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},2260:function(e,t,r){var n=r(7766);e.exports=function(e,t,r,n){i||(i=e.FRAMEBUFFER_UNSUPPORTED,a=e.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,o=e.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,s=e.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var c=e.getExtension("WEBGL_draw_buffers");if(!l&&c&&function(e,t){var r=e.getParameter(t.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(r+1);for(var n=0;n<=r;++n){for(var i=new Array(r),a=0;au||r<0||r>u)throw new Error("gl-fbo: Parameters are too large for FBO");var h=1;if("color"in(n=n||{})){if((h=Math.max(0|n.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(h>1){if(!c)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(h>e.getParameter(c.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+h+" draw buffers")}}var f=e.UNSIGNED_BYTE,p=e.getExtension("OES_texture_float");if(n.float&&h>0){if(!p)throw new Error("gl-fbo: Context does not support floating point textures");f=e.FLOAT}else n.preferFloat&&h>0&&p&&(f=e.FLOAT);var m=!0;"depth"in n&&(m=!!n.depth);var g=!1;return"stencil"in n&&(g=!!n.stencil),new d(e,t,r,f,h,m,g,c)};var i,a,o,s,l=null;function c(e){return[e.getParameter(e.FRAMEBUFFER_BINDING),e.getParameter(e.RENDERBUFFER_BINDING),e.getParameter(e.TEXTURE_BINDING_2D)]}function u(e,t){e.bindFramebuffer(e.FRAMEBUFFER,t[0]),e.bindRenderbuffer(e.RENDERBUFFER,t[1]),e.bindTexture(e.TEXTURE_2D,t[2])}function h(e){switch(e){case i:throw new Error("gl-fbo: Framebuffer unsupported");case a:throw new Error("gl-fbo: Framebuffer incomplete attachment");case o:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case s:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function f(e,t,r,i,a,o){if(!i)return null;var s=n(e,t,r,a,i);return s.magFilter=e.NEAREST,s.minFilter=e.NEAREST,s.mipSamples=1,s.bind(),e.framebufferTexture2D(e.FRAMEBUFFER,o,e.TEXTURE_2D,s.handle,0),s}function p(e,t,r,n,i){var a=e.createRenderbuffer();return e.bindRenderbuffer(e.RENDERBUFFER,a),e.renderbufferStorage(e.RENDERBUFFER,n,t,r),e.framebufferRenderbuffer(e.FRAMEBUFFER,i,e.RENDERBUFFER,a),a}function d(e,t,r,n,i,a,o,s){this.gl=e,this._shape=[0|t,0|r],this._destroyed=!1,this._ext=s,this.color=new Array(i);for(var d=0;d1&&s.drawBuffersWEBGL(l[o]);var v=r.getExtension("WEBGL_depth_texture");v?d?e.depth=f(r,i,a,v.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):m&&(e.depth=f(r,i,a,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):m&&d?e._depth_rb=p(r,i,a,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):m?e._depth_rb=p(r,i,a,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):d&&(e._depth_rb=p(r,i,a,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var x=r.checkFramebufferStatus(r.FRAMEBUFFER);if(x!==r.FRAMEBUFFER_COMPLETE){for(e._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(e.handle),e.handle=null,e.depth&&(e.depth.dispose(),e.depth=null),e._depth_rb&&(r.deleteRenderbuffer(e._depth_rb),e._depth_rb=null),y=0;yi||r<0||r>i)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");e._shape[0]=t,e._shape[1]=r;for(var a=c(n),o=0;o max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D dashTexture;\nuniform float dashScale;\nuniform float opacity;\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], worldPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;\n if(dashWeight < 0.5) {\n discard;\n }\n gl_FragColor = fragColor * opacity;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\n#define FLOAT_MAX 1.70141184e38\n#define FLOAT_MIN 1.17549435e-38\n\n// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl\nvec4 packFloat(float v) {\n float av = abs(v);\n\n //Handle special cases\n if(av < FLOAT_MIN) {\n return vec4(0.0, 0.0, 0.0, 0.0);\n } else if(v > FLOAT_MAX) {\n return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;\n }\n\n vec4 c = vec4(0,0,0,0);\n\n //Compute exponent and mantissa\n float e = floor(log2(av));\n float m = av * pow(2.0, -e) - 1.0;\n\n //Unpack mantissa\n c[1] = floor(128.0 * m);\n m -= c[1] / 128.0;\n c[2] = floor(32768.0 * m);\n m -= c[2] / 32768.0;\n c[3] = floor(8388608.0 * m);\n\n //Unpack exponent\n float ebias = e + 127.0;\n c[0] = floor(ebias / 2.0);\n ebias -= c[0] * 2.0;\n c[1] += floor(ebias) * 128.0;\n\n //Unpack sign bit\n c[0] += 128.0 * step(0.0, -v);\n\n //Scale back to range\n return c / 255.0;\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform float pickId;\nuniform vec3 clipBounds[2];\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;\n\n gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz);\n}"]),l=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];t.createShader=function(e){return i(e,a,o,null,l)},t.createPickShader=function(e){return i(e,a,s,null,l)}},5714:function(e,t,r){e.exports=function(e){var t=e.gl||e.scene&&e.scene.gl,r=h(t);r.attributes.position.location=0,r.attributes.nextPosition.location=1,r.attributes.arcLength.location=2,r.attributes.lineWidth.location=3,r.attributes.color.location=4;var o=f(t);o.attributes.position.location=0,o.attributes.nextPosition.location=1,o.attributes.arcLength.location=2,o.attributes.lineWidth.location=3,o.attributes.color.location=4;for(var s=n(t),l=i(t,[{buffer:s,size:3,offset:0,stride:48},{buffer:s,size:3,offset:12,stride:48},{buffer:s,size:1,offset:24,stride:48},{buffer:s,size:1,offset:28,stride:48},{buffer:s,size:4,offset:32,stride:48}]),u=c(new Array(1024),[256,1,4]),p=0;p<1024;++p)u.data[p]=255;var d=a(t,u);d.wrap=t.REPEAT;var m=new y(t,r,o,s,l,d);return m.update(e),m};var n=r(2762),i=r(8116),a=r(7766),o=new Uint8Array(4),s=new Float32Array(o.buffer),l=r(2478),c=r(9618),u=r(7319),h=u.createShader,f=u.createPickShader,p=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function d(e,t){for(var r=0,n=0;n<3;++n){var i=e[n]-t[n];r+=i*i}return Math.sqrt(r)}function m(e){for(var t=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],r=0;r<3;++r)t[0][r]=Math.max(e[0][r],t[0][r]),t[1][r]=Math.min(e[1][r],t[1][r]);return t}function g(e,t,r,n){this.arcLength=e,this.position=t,this.index=r,this.dataCoordinate=n}function y(e,t,r,n,i,a){this.gl=e,this.shader=t,this.pickShader=r,this.buffer=n,this.vao=i,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=a,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var v=y.prototype;v.isTransparent=function(){return this.hasAlpha},v.isOpaque=function(){return!this.hasAlpha},v.pickSlots=1,v.setPickBase=function(e){this.pickId=e},v.drawTransparent=v.draw=function(e){if(this.vertexCount){var t=this.gl,r=this.shader,n=this.vao;r.bind(),r.uniforms={model:e.model||p,view:e.view||p,projection:e.projection||p,clipBounds:m(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[t.drawingBufferWidth,t.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(t.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},v.drawPick=function(e){if(this.vertexCount){var t=this.gl,r=this.pickShader,n=this.vao;r.bind(),r.uniforms={model:e.model||p,view:e.view||p,projection:e.projection||p,pickId:this.pickId,clipBounds:m(this.clipBounds),screenShape:[t.drawingBufferWidth,t.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(t.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},v.update=function(e){var t,r;this.dirty=!0;var n=!!e.connectGaps;"dashScale"in e&&(this.dashScale=e.dashScale),this.hasAlpha=!1,"opacity"in e&&(this.opacity=+e.opacity,this.opacity<1&&(this.hasAlpha=!0));var i=[],a=[],o=[],s=0,u=0,h=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],f=e.position||e.positions;if(f){var p=e.color||e.colors||[0,0,0,1],m=e.lineWidth||1,g=!1;e:for(t=1;t0){for(var w=0;w<24;++w)i.push(i[i.length-12]);u+=2,g=!0}continue e}h[0][r]=Math.min(h[0][r],_[r],b[r]),h[1][r]=Math.max(h[1][r],_[r],b[r])}Array.isArray(p[0])?(y=p.length>t-1?p[t-1]:p.length>0?p[p.length-1]:[0,0,0,1],v=p.length>t?p[t]:p.length>0?p[p.length-1]:[0,0,0,1]):y=v=p,3===y.length&&(y=[y[0],y[1],y[2],1]),3===v.length&&(v=[v[0],v[1],v[2],1]),!this.hasAlpha&&y[3]<1&&(this.hasAlpha=!0),x=Array.isArray(m)?m.length>t-1?m[t-1]:m.length>0?m[m.length-1]:[0,0,0,1]:m;var T=s;if(s+=d(_,b),g){for(r=0;r<2;++r)i.push(_[0],_[1],_[2],b[0],b[1],b[2],T,x,y[0],y[1],y[2],y[3]);u+=2,g=!1}i.push(_[0],_[1],_[2],b[0],b[1],b[2],T,x,y[0],y[1],y[2],y[3],_[0],_[1],_[2],b[0],b[1],b[2],T,-x,y[0],y[1],y[2],y[3],b[0],b[1],b[2],_[0],_[1],_[2],s,-x,v[0],v[1],v[2],v[3],b[0],b[1],b[2],_[0],_[1],_[2],s,x,v[0],v[1],v[2],v[3]),u+=4}}if(this.buffer.update(i),a.push(s),o.push(f[f.length-1].slice()),this.bounds=h,this.vertexCount=u,this.points=o,this.arcLength=a,"dashes"in e){var k=e.dashes.slice();for(k.unshift(0),t=1;t1.0001)return null;y+=g[h]}return Math.abs(y-1)>.001?null:[f,s(e,g),g]}},840:function(e,t,r){var n=r(3236),i=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, normal;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model\n , view\n , projection\n , inverseModel;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvec4 project(vec3 p) {\n return projection * (view * (model * vec4(p, 1.0)));\n}\n\nvoid main() {\n gl_Position = project(position);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * vec4(position , 1.0);\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n f_color = color;\n f_data = position;\n f_uv = uv;\n}\n"]),a=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\n//#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n , fresnel\n , kambient\n , kdiffuse\n , kspecular;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (f_color.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], f_data)\n ) discard;\n\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d\n\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * f_color.a;\n}\n"]),o=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model, view, projection;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n gl_Position = projection * (view * (model * vec4(position, 1.0)));\n f_color = color;\n f_data = position;\n f_uv = uv;\n}"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;\n\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\nattribute float pointSize;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0);\n } else {\n gl_Position = projection * (view * (model * vec4(position, 1.0)));\n }\n gl_PointSize = pointSize;\n f_color = color;\n f_uv = uv;\n}"]),c=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5);\n if(dot(pointR, pointR) > 0.25) {\n discard;\n }\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),u=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n gl_Position = projection * (view * (model * vec4(position, 1.0)));\n f_id = id;\n f_position = position;\n}"]),h=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]),f=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute float pointSize;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0, 0.0, 0.0);\n } else {\n gl_Position = projection * (view * (model * vec4(position, 1.0)));\n gl_PointSize = pointSize;\n }\n f_id = id;\n f_position = position;\n}"]),p=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\n\nvoid main() {\n gl_Position = projection * (view * (model * vec4(position, 1.0)));\n}"]),d=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec3 contourColor;\n\nvoid main() {\n gl_FragColor = vec4(contourColor, 1.0);\n}\n"]);t.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},t.wireShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},t.pointShader={vertex:l,fragment:c,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},t.pickShader={vertex:u,fragment:h,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},t.pointPickShader={vertex:f,fragment:h,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},t.contourShader={vertex:p,fragment:d,attributes:[{name:"position",type:"vec3"}]}},7201:function(e,t,r){var n=r(9405),i=r(2762),a=r(8116),o=r(7766),s=r(8406),l=r(6760),c=r(7608),u=r(9618),h=r(6729),f=r(7765),p=r(1888),d=r(840),m=r(7626),g=d.meshShader,y=d.wireShader,v=d.pointShader,x=d.pickShader,_=d.pointPickShader,b=d.contourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function T(e,t,r,n,i,a,o,s,l,c,u,h,f,p,d,m,g,y,v,x,_,b,T,k,A,M,S){this.gl=e,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=t,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=a,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleColors=u,this.triangleNormals=f,this.triangleUVs=h,this.triangleIds=c,this.triangleVAO=p,this.triangleCount=0,this.lineWidth=1,this.edgePositions=d,this.edgeColors=g,this.edgeUVs=y,this.edgeIds=m,this.edgeVAO=v,this.edgeCount=0,this.pointPositions=x,this.pointColors=b,this.pointUVs=T,this.pointSizes=k,this.pointIds=_,this.pointVAO=A,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=M,this.contourVAO=S,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=w,this._view=w,this._projection=w,this._resolution=[1,1]}var k=T.prototype;function A(e,t){if(!t||!t.length)return 1;for(var r=0;re&&r>0){var n=(t[r][0]-e)/(t[r][0]-t[r-1][0]);return t[r][1]*(1-n)+n*t[r-1][1]}}return 1}k.isOpaque=function(){return!this.hasAlpha},k.isTransparent=function(){return this.hasAlpha},k.pickSlots=1,k.setPickBase=function(e){this.pickId=e},k.highlight=function(e){if(e&&this.contourEnable){for(var t=f(this.cells,this.intensity,e.intensity),r=t.cells,n=t.vertexIds,i=t.vertexWeights,a=r.length,o=p.mallocFloat32(6*a),s=0,l=0;l0&&((u=this.triShader).bind(),u.uniforms=s,this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&this.lineWidth>0&&((u=this.lineShader).bind(),u.uniforms=s,this.edgeVAO.bind(),t.lineWidth(this.lineWidth*this.pixelRatio),t.drawArrays(t.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((u=this.pointShader).bind(),u.uniforms=s,this.pointVAO.bind(),t.drawArrays(t.POINTS,0,this.pointCount),this.pointVAO.unbind()),this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((u=this.contourShader).bind(),u.uniforms=s,this.contourVAO.bind(),t.drawArrays(t.LINES,0,this.contourCount),this.contourVAO.unbind())},k.drawPick=function(e){e=e||{};for(var t=this.gl,r=e.model||w,n=e.view||w,i=e.projection||w,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[t.drawingBufferWidth,t.drawingBufferHeight];var s,l={model:r,view:n,projection:i,clipBounds:a,pickId:this.pickId/255};(s=this.pickShader).bind(),s.uniforms=l,this.triangleCount>0&&(this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),t.lineWidth(this.lineWidth*this.pixelRatio),t.drawArrays(t.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),t.drawArrays(t.POINTS,0,this.pointCount),this.pointVAO.unbind())},k.pick=function(e){if(!e||e.id!==this.pickId)return null;for(var t=e.value[0]+256*e.value[1]+65536*e.value[2],r=this.cells[t],n=this.positions,i=new Array(r.length),a=0;aMath.abs(t))c.rotate(a,0,0,-e*r*Math.PI*d.rotateSpeed/window.innerWidth);else if(!d._ortho){var o=-d.zoomSpeed*i*t/window.innerHeight*(a-c.lastT())/20;c.pan(a,0,0,h*(Math.exp(o)-1))}}}),!0)},d.enableMouseListeners(),d};var n=r(3025),i=r(6296),a=r(351),o=r(8512),s=r(24),l=r(7520)},799:function(e,t,r){var n=r(3236),i=r(9405),a=n(["precision mediump float;\n#define GLSLIFY 1\nattribute vec2 position;\nvarying vec2 uv;\nvoid main() {\n uv = position;\n gl_Position = vec4(position, 0, 1);\n}"]),o=n(["precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D accumBuffer;\nvarying vec2 uv;\n\nvoid main() {\n vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));\n gl_FragColor = min(vec4(1,1,1,1), accum);\n}"]);e.exports=function(e){return i(e,a,o,null,[{name:"position",type:"vec2"}])}},4100:function(e,t,r){var n=r(4437),i=r(3837),a=r(5445),o=r(4449),s=r(3589),l=r(2260),c=r(7169),u=r(351),h=r(4772),f=r(4040),p=r(799),d=r(9216)({tablet:!0,featureDetect:!0});function m(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function g(e){var t=Math.round(Math.log(Math.abs(e))/Math.log(10));if(t<0){var r=Math.round(Math.pow(10,-t));return Math.ceil(e*r)/r}return t>0?(r=Math.round(Math.pow(10,t)),Math.ceil(e/r)*r):Math.ceil(e)}function y(e){return"boolean"!=typeof e||e}e.exports={createScene:function(e){(e=e||{}).camera=e.camera||{};var t=e.canvas;t||(t=document.createElement("canvas"),e.container?e.container.appendChild(t):document.body.appendChild(t));var r=e.gl;if(r||(e.glOptions&&(d=!!e.glOptions.preserveDrawingBuffer),r=function(e,t){var r=null;try{(r=e.getContext("webgl",t))||(r=e.getContext("experimental-webgl",t))}catch{return null}return r}(t,e.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:d})),!r)throw new Error("webgl not supported");var v=e.bounds||[[-10,-10,-10],[10,10,10]],x=new m,_=l(r,r.drawingBufferWidth,r.drawingBufferHeight,{preferFloat:!d}),b=p(r),w=e.cameraObject&&!0===e.cameraObject._ortho||e.camera.projection&&"orthographic"===e.camera.projection.type||!1,T={eye:e.camera.eye||[2,0,0],center:e.camera.center||[0,0,0],up:e.camera.up||[0,1,0],zoomMin:e.camera.zoomMax||.1,zoomMax:e.camera.zoomMin||100,mode:e.camera.mode||"turntable",_ortho:w},k=e.axes||{},A=i(r,k);A.enable=!k.disable;var M=e.spikes||{},S=o(r,M),E=[],C=[],I=[],L=[],P=!0,z=!0,D={view:null,projection:new Array(16),model:new Array(16),_ortho:!1},O=(z=!0,[r.drawingBufferWidth,r.drawingBufferHeight]),R=e.cameraObject||n(t,T),F={gl:r,contextLost:!1,pixelRatio:e.pixelRatio||1,canvas:t,selection:x,camera:R,axes:A,axesPixels:null,spikes:S,bounds:v,objects:E,shape:O,aspect:e.aspectRatio||[1,1,1],pickRadius:e.pickRadius||10,zNear:e.zNear||.01,zFar:e.zFar||1e3,fovy:e.fovy||Math.PI/4,clearColor:e.clearColor||[0,0,0,0],autoResize:y(e.autoResize),autoBounds:y(e.autoBounds),autoScale:!!e.autoScale,autoCenter:y(e.autoCenter),clipToBounds:y(e.clipToBounds),snapToData:!!e.snapToData,onselect:e.onselect||null,onrender:e.onrender||null,onclick:e.onclick||null,cameraParams:D,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(e){this.aspect[0]=e.x,this.aspect[1]=e.y,this.aspect[2]=e.z,z=!0},setBounds:function(e,t){this.bounds[0][e]=t.min,this.bounds[1][e]=t.max},setClearColor:function(e){this.clearColor=e},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},B=[r.drawingBufferWidth/F.pixelRatio|0,r.drawingBufferHeight/F.pixelRatio|0];function j(){if(!F._stopped&&F.autoResize){var e=t.parentNode,r=1,n=1;e&&e!==document.body?(r=e.clientWidth,n=e.clientHeight):(r=window.innerWidth,n=window.innerHeight);var i=0|Math.ceil(r*F.pixelRatio),a=0|Math.ceil(n*F.pixelRatio);if(i!==t.width||a!==t.height){t.width=i,t.height=a;var o=t.style;o.position=o.position||"absolute",o.left="0px",o.top="0px",o.width=r+"px",o.height=n+"px",P=!0}}}function N(){for(var e=E.length,t=L.length,n=0;n0&&0===I[t-1];)I.pop(),L.pop().dispose()}function U(){if(F.contextLost)return!0;r.isContextLost()&&(F.contextLost=!0,F.mouseListener.enabled=!1,F.selection.object=null,F.oncontextloss&&F.oncontextloss())}F.autoResize&&j(),window.addEventListener("resize",j),F.update=function(e){F._stopped||(e=e||{},P=!0,z=!0)},F.add=function(e){F._stopped||(e.axes=A,E.push(e),C.push(-1),P=!0,z=!0,N())},F.remove=function(e){if(!F._stopped){var t=E.indexOf(e);t<0||(E.splice(t,1),C.pop(),P=!0,z=!0,N())}},F.dispose=function(){if(!F._stopped&&(F._stopped=!0,window.removeEventListener("resize",j),t.removeEventListener("webglcontextlost",U),F.mouseListener.enabled=!1,!F.contextLost)){A.dispose(),S.dispose();for(var e=0;ex.distance)continue;for(var c=0;c1e-6?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-n)*i)/o,l=Math.sin(n*i)/o):(s=1-n,l=n),e[0]=s*c+l*p,e[1]=s*u+l*d,e[2]=s*h+l*m,e[3]=s*f+l*g,e}},5964:function(e){e.exports=function(e){return e||0===e?e.toString():""}},9366:function(e,t,r){var n=r(4359);e.exports=function(e,t,r){var a=[t.style,t.weight,t.variant,t.family].join("_"),o=i[a];if(o||(o=i[a]={}),e in o)return o[e];var s={textAlign:"center",textBaseline:"middle",lineHeight:1,font:t.family,fontStyle:t.style,fontWeight:t.weight,fontVariant:t.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},triangles:!0},l=n(e,s);s.triangles=!1;var c,u,h=n(e,s);if(r&&1!==r){for(c=0;c max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform vec4 highlightId;\nuniform float highlightScale;\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = 1.0;\n if(distance(highlightId, id) < 0.0001) {\n scale = highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1);\n vec4 viewPosition = view * worldPosition;\n viewPosition = viewPosition / viewPosition.w;\n vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),o=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float highlightScale, pixelRatio;\nuniform vec4 highlightId;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = pixelRatio;\n if(distance(highlightId.bgr, id.bgr) < 0.001) {\n scale *= highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1.0);\n vec4 viewPosition = view * worldPosition;\n vec4 clipPosition = projection * viewPosition;\n clipPosition /= clipPosition.w;\n\n gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),s=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform float highlightScale;\nuniform vec4 highlightId;\nuniform vec3 axes[2];\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float scale, pixelRatio;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float lscale = pixelRatio * scale;\n if(distance(highlightId, id) < 0.0001) {\n lscale *= highlightScale;\n }\n\n vec4 clipCenter = projection * (view * (model * vec4(position, 1)));\n vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;\n vec4 clipPosition = projection * (view * (model * vec4(dataPosition, 1)));\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = dataPosition;\n }\n}\n"]),l=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float opacity;\n\nvarying vec4 interpColor;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (\n outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) ||\n interpColor.a * opacity == 0.\n ) discard;\n gl_FragColor = interpColor * opacity;\n}\n"]),c=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float pickGroup;\n\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;\n\n gl_FragColor = vec4(pickGroup, pickId.bgr);\n}"]),u=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],h={vertex:a,fragment:l,attributes:u},f={vertex:o,fragment:l,attributes:u},p={vertex:s,fragment:l,attributes:u},d={vertex:a,fragment:c,attributes:u},m={vertex:o,fragment:c,attributes:u},g={vertex:s,fragment:c,attributes:u};function y(e,t){var r=n(e,t),i=r.attributes;return i.position.location=0,i.color.location=1,i.glyph.location=2,i.id.location=3,r}t.createPerspective=function(e){return y(e,h)},t.createOrtho=function(e){return y(e,f)},t.createProject=function(e){return y(e,p)},t.createPickPerspective=function(e){return y(e,d)},t.createPickOrtho=function(e){return y(e,m)},t.createPickProject=function(e){return y(e,g)}},8418:function(e,t,r){var n=r(5219),i=r(2762),a=r(8116),o=r(1888),s=r(6760),l=r(1283),c=r(9366),u=r(5964),h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],f=ArrayBuffer,p=DataView;function d(e){return Array.isArray(e)||function(e){return f.isView(e)&&!(e instanceof p)}(e)}function m(e,t){var r=e[0],n=e[1],i=e[2],a=e[3];return e[0]=t[0]*r+t[4]*n+t[8]*i+t[12]*a,e[1]=t[1]*r+t[5]*n+t[9]*i+t[13]*a,e[2]=t[2]*r+t[6]*n+t[10]*i+t[14]*a,e[3]=t[3]*r+t[7]*n+t[11]*i+t[15]*a,e}function g(e,t,r,n){return m(n,n),m(n,n),m(n,n)}function y(e,t){this.index=e,this.dataCoordinate=this.position=t}function v(e){return!0===e||e>1?1:e}function x(e,t,r,n,i,a,o,s,l,c,u,h){this.gl=e,this.pixelRatio=1,this.shader=t,this.orthoShader=r,this.projectShader=n,this.pointBuffer=i,this.colorBuffer=a,this.glyphBuffer=o,this.idBuffer=s,this.vao=l,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[.6666666666666666,.6666666666666666,.6666666666666666],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=c,this.pickOrthoShader=u,this.pickProjectShader=h,this.points=[],this._selectResult=new y(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}e.exports=function(e){var t=e.gl,r=l.createPerspective(t),n=l.createOrtho(t),o=l.createProject(t),s=l.createPickPerspective(t),c=l.createPickOrtho(t),u=l.createPickProject(t),h=i(t),f=i(t),p=i(t),d=i(t),m=new x(t,r,n,o,h,f,p,d,a(t,[{buffer:h,size:3,type:t.FLOAT},{buffer:f,size:4,type:t.FLOAT},{buffer:p,size:2,type:t.FLOAT},{buffer:d,size:4,type:t.UNSIGNED_BYTE,normalized:!0}]),s,c,u);return m.update(e),m};var _=x.prototype;_.pickSlots=1,_.setPickBase=function(e){this.pickId=e},_.isTransparent=function(){if(this.hasAlpha)return!0;for(var e=0;e<3;++e)if(this.axesProject[e]&&this.projectHasAlpha)return!0;return!1},_.isOpaque=function(){if(!this.hasAlpha)return!0;for(var e=0;e<3;++e)if(this.axesProject[e]&&!this.projectHasAlpha)return!0;return!1};var b=[0,0],w=[0,0,0],T=[0,0,0],k=[0,0,0,1],A=[0,0,0,1],M=h.slice(),S=[0,0,0],E=[[0,0,0],[0,0,0]];function C(e){return e[0]=e[1]=e[2]=0,e}function I(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=1,e}function L(e,t,r,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[r]=n,e}var P=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function z(e,t,r,n,i,a,o){var l=r.gl;if((a===r.projectHasAlpha||o)&&function(e,t,r,n){var i,a=t.axesProject,o=t.gl,l=e.uniforms,c=r.model||h,u=r.view||h,f=r.projection||h,p=t.axesBounds,d=function(e){for(var t=E,r=0;r<2;++r)for(var n=0;n<3;++n)t[r][n]=Math.max(Math.min(e[r][n],1e8),-1e8);return t}(t.clipBounds);i=t.axes&&t.axes.lastCubeProps?t.axes.lastCubeProps.axis:[1,1,1],b[0]=2/o.drawingBufferWidth,b[1]=2/o.drawingBufferHeight,e.bind(),l.view=u,l.projection=f,l.screenSize=b,l.highlightId=t.highlightId,l.highlightScale=t.highlightScale,l.clipBounds=d,l.pickGroup=t.pickId/255,l.pixelRatio=n;for(var m=0;m<3;++m)if(a[m]){l.scale=t.projectScale[m],l.opacity=t.projectOpacity[m];for(var y=M,v=0;v<16;++v)y[v]=0;for(v=0;v<4;++v)y[5*v]=1;y[5*m]=0,i[m]<0?y[12+m]=p[0][m]:y[12+m]=p[1][m],s(y,c,y),l.model=y;var x=(m+1)%3,_=(m+2)%3,P=C(w),z=C(T);P[x]=1,z[_]=1;var D=g(0,0,0,I(k,P)),O=g(0,0,0,I(A,z));if(Math.abs(D[1])>Math.abs(O[1])){var R=D;D=O,O=R,R=P,P=z,z=R;var F=x;x=_,_=F}D[0]<0&&(P[x]=-1),O[1]>0&&(z[_]=-1);var B=0,j=0;for(v=0;v<4;++v)B+=Math.pow(c[4*x+v],2),j+=Math.pow(c[4*_+v],2);P[x]/=Math.sqrt(B),z[_]/=Math.sqrt(j),l.axes[0]=P,l.axes[1]=z,l.fragClipBounds[0]=L(S,d[0],m,-1e8),l.fragClipBounds[1]=L(S,d[1],m,1e8),t.vao.bind(),t.vao.draw(o.TRIANGLES,t.vertexCount),t.lineWidth>0&&(o.lineWidth(t.lineWidth*n),t.vao.draw(o.LINES,t.lineVertexCount,t.vertexCount)),t.vao.unbind()}}(t,r,n,i),a===r.hasAlpha||o){e.bind();var c=e.uniforms;c.model=n.model||h,c.view=n.view||h,c.projection=n.projection||h,b[0]=2/l.drawingBufferWidth,b[1]=2/l.drawingBufferHeight,c.screenSize=b,c.highlightId=r.highlightId,c.highlightScale=r.highlightScale,c.fragClipBounds=P,c.clipBounds=r.axes.bounds,c.opacity=r.opacity,c.pickGroup=r.pickId/255,c.pixelRatio=i,r.vao.bind(),r.vao.draw(l.TRIANGLES,r.vertexCount),r.lineWidth>0&&(l.lineWidth(r.lineWidth*i),r.vao.draw(l.LINES,r.lineVertexCount,r.vertexCount)),r.vao.unbind()}}function D(e,t,r,i){var a;a=d(e)?t=this.pointCount||t<0)return null;var r=this.points[t],n=this._selectResult;n.index=t;for(var i=0;i<3;++i)n.position[i]=n.dataCoordinate[i]=r[i];return n},_.highlight=function(e){if(e){var t=e.index,r=255&t,n=t>>8&255,i=t>>16&255;this.highlightId=[r/255,n/255,i/255,0]}else this.highlightId=[1,1,1,1]},_.update=function(e){if("perspective"in(e=e||{})&&(this.useOrtho=!e.perspective),"orthographic"in e&&(this.useOrtho=!!e.orthographic),"lineWidth"in e&&(this.lineWidth=e.lineWidth),"project"in e)if(d(e.project))this.axesProject=e.project;else{var t=!!e.project;this.axesProject=[t,t,t]}if("projectScale"in e)if(d(e.projectScale))this.projectScale=e.projectScale.slice();else{var r=+e.projectScale;this.projectScale=[r,r,r]}if(this.projectHasAlpha=!1,"projectOpacity"in e){d(e.projectOpacity)?this.projectOpacity=e.projectOpacity.slice():(r=+e.projectOpacity,this.projectOpacity=[r,r,r]);for(var n=0;n<3;++n)this.projectOpacity[n]=v(this.projectOpacity[n]),this.projectOpacity[n]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in e&&(this.opacity=v(e.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var i,a,s=e.position,l={family:e.font||"normal",style:e.fontStyle||"normal",weight:e.fontWeight||"normal",variant:e.fontVariant||"normal"},c=e.alignment||[0,0];if(2===c.length)i=c[0],a=c[1];else for(i=[],a=[],n=0;n0){var z=0,O=_,R=[0,0,0,1],F=[0,0,0,1],B=d(p)&&d(p[0]),j=d(y)&&d(y[0]);e:for(n=0;n0?1-S[0][0]:Z<0?1+S[1][0]:1,Y*=Y>0?1-S[0][1]:Y<0?1+S[1][1]:1],$=A.cells||[],K=A.positions||[];for(k=0;k<$.length;++k)for(var J=$[k],Q=0;Q<3;++Q){for(var ee=0;ee<3;++ee)C[3*z+ee]=T[ee];for(ee=0;ee<4;++ee)I[4*z+ee]=R[ee];P[z]=x;var te=K[J[Q]];L[2*z]=q*(G*te[0]-W*te[1]+X[0]),L[2*z+1]=q*(W*te[0]+G*te[1]+X[1]),z+=1}for($=M.edges,K=M.positions,k=0;k<$.length;++k)for(J=$[k],Q=0;Q<2;++Q){for(ee=0;ee<3;++ee)C[3*O+ee]=T[ee];for(ee=0;ee<4;++ee)I[4*O+ee]=F[ee];P[O]=x,te=K[J[Q]],L[2*O]=q*(G*te[0]-W*te[1]+X[0]),L[2*O+1]=q*(W*te[0]+G*te[1]+X[1]),O+=1}}}this.bounds=[u,h],this.points=s,this.pointCount=s.length,this.vertexCount=_,this.lineVertexCount=b,this.pointBuffer.update(C),this.colorBuffer.update(I),this.glyphBuffer.update(L),this.idBuffer.update(P),o.free(C),o.free(I),o.free(L),o.free(P)},_.dispose=function(){this.shader.dispose(),this.orthoShader.dispose(),this.pickPerspectiveShader.dispose(),this.pickOrthoShader.dispose(),this.vao.dispose(),this.pointBuffer.dispose(),this.colorBuffer.dispose(),this.glyphBuffer.dispose(),this.idBuffer.dispose()}},3589:function(e,t,r){e.exports=function(e,t){var r=t[0],a=t[1];return new l(e,n(e,r,a,{}),i.mallocUint8(r*a*4))};var n=r(2260),i=r(1888),a=r(9618),o=r(8828).nextPow2;function s(e,t,r,n,i){this.coord=[e,t],this.id=r,this.value=n,this.distance=i}function l(e,t,r){this.gl=e,this.fbo=t,this.buffer=r,this._readTimeout=null;var n=this;this._readCallback=function(){n.gl&&(t.bind(),e.readPixels(0,0,t.shape[0],t.shape[1],e.RGBA,e.UNSIGNED_BYTE,n.buffer),n._readTimeout=null)}}var c=l.prototype;Object.defineProperty(c,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(e){if(this.gl){this.fbo.shape=e;var t=this.fbo.shape[0],r=this.fbo.shape[1];if(r*t*4>this.buffer.length){i.free(this.buffer);for(var n=this.buffer=i.mallocUint8(o(r*t*4)),a=0;ar)for(e=r;et)for(e=t;e=0){for(var T=0|w.type.charAt(w.type.length-1),k=new Array(T),A=0;A=0;)M+=1;b[v]=M}var S=new Array(r.length);function E(){f.program=o.program(p,f._vref,f._fref,_,b);for(var e=0;e=0){if((d=f.charCodeAt(f.length-1)-48)<2||d>4)throw new n("","Invalid data type for attribute "+h+": "+f);s(e,t,p[0],i,d,a,h)}else{if(!(f.indexOf("mat")>=0))throw new n("","Unknown data type for attribute "+h+": "+f);var d;if((d=f.charCodeAt(f.length-1)-48)<2||d>4)throw new n("","Invalid data type for attribute "+h+": "+f);l(e,t,p,i,d,a,h)}}}return a};var n=r(8866);function i(e,t,r,n,i,a){this._gl=e,this._wrapper=t,this._index=r,this._locations=n,this._dimension=i,this._constFunc=a}var a=i.prototype;a.pointer=function(e,t,r,n){var i=this,a=i._gl,o=i._locations[i._index];a.vertexAttribPointer(o,i._dimension,e||a.FLOAT,!!t,r||0,n||0),a.enableVertexAttribArray(o)},a.set=function(e,t,r,n){return this._constFunc(this._locations[this._index],e,t,r,n)},Object.defineProperty(a,"location",{get:function(){return this._locations[this._index]},set:function(e){return e!==this._locations[this._index]&&(this._locations[this._index]=0|e,this._wrapper.program=null),0|e}});var o=[function(e,t,r){return void 0===r.length?e.vertexAttrib1f(t,r):e.vertexAttrib1fv(t,r)},function(e,t,r,n){return void 0===r.length?e.vertexAttrib2f(t,r,n):e.vertexAttrib2fv(t,r)},function(e,t,r,n,i){return void 0===r.length?e.vertexAttrib3f(t,r,n,i):e.vertexAttrib3fv(t,r)},function(e,t,r,n,i,a){return void 0===r.length?e.vertexAttrib4f(t,r,n,i,a):e.vertexAttrib4fv(t,r)}];function s(e,t,r,n,a,s,l){var c=o[a],u=new i(e,t,r,n,a,c);Object.defineProperty(s,l,{set:function(t){return e.disableVertexAttribArray(n[r]),c(e,n[r],t),t},get:function(){return u},enumerable:!0})}function l(e,t,r,n,i,a,o){for(var l=new Array(i),c=new Array(i),u=0;u4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+v);e["uniformMatrix"+y+"fv"](s[h],!1,f);break}throw new i("","Unknown uniform data type for "+name+": "+v)}if((y=v.charCodeAt(v.length-1)-48)<2||y>4)throw new i("","Invalid data type");switch(v.charAt(0)){case"b":case"i":e["uniform"+y+"iv"](s[h],f);break;case"v":e["uniform"+y+"fv"](s[h],f);break;default:throw new i("","Unrecognized data type for vector "+name+": "+v)}}}}}}function u(e,t){if("object"!=typeof t)return[[e,t]];var r=[];for(var n in t){var i=t[n],a=e;parseInt(n)+""===n?a+="["+n+"]":a+="."+n,"object"==typeof i?r.push.apply(r,u(a,i)):r.push([a,i])}return r}function h(e,t,n){if("object"==typeof n){var u=f(n);Object.defineProperty(e,t,{get:a(u),set:c(n),enumerable:!0,configurable:!1})}else s[n]?Object.defineProperty(e,t,{get:l(n),set:c(n),enumerable:!0,configurable:!1}):e[t]=function(e){switch(e){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":case"float":return 0;default:var t=e.indexOf("vec");if(0<=t&&t<=1&&e.length===4+t){if((r=e.charCodeAt(e.length-1)-48)<2||r>4)throw new i("","Invalid data type");return"b"===e.charAt(0)?o(r,!1):o(r,0)}if(0===e.indexOf("mat")&&4===e.length){var r;if((r=e.charCodeAt(e.length-1)-48)<2||r>4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+e);return o(r*r,0)}throw new i("","Unknown uniform data type for "+name+": "+e)}}(r[n].type)}function f(e){var t;if(Array.isArray(e)){t=new Array(e.length);for(var r=0;r1){s[0]in a||(a[s[0]]=[]),a=a[s[0]];for(var l=1;l1)for(var l=0;l"u"?r(606):WeakMap),o=0;function s(e,t,r,n,i,a,o){this.id=e,this.src=t,this.type=r,this.shader=n,this.count=a,this.programs=[],this.cache=o}function l(e){this.gl=e,this.shaders=[{},{}],this.programs={}}s.prototype.dispose=function(){if(0==--this.count){for(var e=this.cache,t=e.gl,r=this.programs,n=0,i=r.length;n 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\n\nuniform float vectorScale, tubeScale;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 eyePosition, lightPosition;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * tubePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(tubePosition, 1.0);\n vec4 t_position = view * tubePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = tubePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),a=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),o=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float tubeScale;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n gl_Position = projection * (view * tubePosition);\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);t.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},t.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7815:function(e,t,r){var n=r(2931),i=r(9970),a=["xyz","xzy","yxz","yzx","zxy","zyx"],o=function(e,t){var r,n=e.length;for(r=0;rt)return r-1}return r},s=function(e,t,r){return er?r:e},l=function(e){var t=1/0;e.sort((function(e,t){return e-t}));for(var r=e.length,n=1;nh-1||v>f-1||x>p-1)return n.create();var _,b,w,T,k,A,M=a[0][d],S=a[0][y],E=a[1][m],C=a[1][v],I=a[2][g],L=(l-M)/(S-M),P=(c-E)/(C-E),z=(u-I)/(a[2][x]-I);switch(isFinite(L)||(L=.5),isFinite(P)||(P=.5),isFinite(z)||(z=.5),r.reversedX&&(d=h-1-d,y=h-1-y),r.reversedY&&(m=f-1-m,v=f-1-v),r.reversedZ&&(g=p-1-g,x=p-1-x),r.filled){case 5:k=g,A=x,w=m*p,T=v*p,_=d*p*f,b=y*p*f;break;case 4:k=g,A=x,_=d*p,b=y*p,w=m*p*h,T=v*p*h;break;case 3:w=m,T=v,k=g*f,A=x*f,_=d*f*p,b=y*f*p;break;case 2:w=m,T=v,_=d*f,b=y*f,k=g*f*h,A=x*f*h;break;case 1:_=d,b=y,k=g*h,A=x*h,w=m*h*p,T=v*h*p;break;default:_=d,b=y,w=m*h,T=v*h,k=g*h*f,A=x*h*f}var D=i[_+w+k],O=i[_+w+A],R=i[_+T+k],F=i[_+T+A],B=i[b+w+k],j=i[b+w+A],N=i[b+T+k],U=i[b+T+A],V=n.create(),q=n.create(),H=n.create(),G=n.create();n.lerp(V,D,B,L),n.lerp(q,O,j,L),n.lerp(H,R,N,L),n.lerp(G,F,U,L);var W=n.create(),Z=n.create();n.lerp(W,V,H,P),n.lerp(Z,q,G,P);var Y=n.create();return n.lerp(Y,W,Z,z),Y}(t,e,p)},x=e.getDivergence||function(e,t){var r=n.create(),i=1e-4;n.add(r,e,[i,0,0]);var a=v(r);n.subtract(a,a,t),n.scale(a,a,1/i),n.add(r,e,[0,i,0]);var o=v(r);n.subtract(o,o,t),n.scale(o,o,1/i),n.add(r,e,[0,0,i]);var s=v(r);return n.subtract(s,s,t),n.scale(s,s,1/i),n.add(r,a,o),n.add(r,r,s),r},_=[],b=t[0][0],w=t[0][1],T=t[0][2],k=t[1][0],A=t[1][1],M=t[1][2],S=10*n.distance(t[0],t[1])/c,E=S*S,C=1,I=0,L=r.length;L>1&&(C=function(e){for(var t=[],r=[],n=[],i={},a={},o={},s=e.length,c=0;cI&&(I=N),B.push(N),_.push({points:D,velocities:O,divergences:B});for(var U=0;U<100*c&&D.lengthk||gA||yM));){U++;var V=n.clone(R),q=n.squaredLength(V);if(0===q)break;q>E&&n.scale(V,V,S/Math.sqrt(q)),n.add(V,V,z),R=v(V),n.squaredDistance(F,V)-E>-1e-4*E&&(D.push(V),F=V,O.push(R),j=x(V,R),N=n.length(j),isFinite(N)&&N>I&&(I=N),B.push(N)),z=V}}var H=function(e,t,r,a){for(var o=0,s=0;s0)for(T=0;T<8;T++){var k=(T+1)%8;c.push(f[T],p[T],p[k],p[k],f[k],f[T]),h.push(v,y,y,y,v,v),d.push(m,g,g,g,m,m);var A=c.length;u.push([A-6,A-5,A-4],[A-3,A-2,A-1])}var M=f;f=p,p=M;var S=v;v=y,y=S;var E=m;m=g,g=E}return{positions:c,cells:u,vectors:h,vertexIntensity:d}}(e,r,a,o)})),h=[],f=[],p=[],d=[];for(s=0;s max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 lowerBound, upperBound;\nuniform float contourTint;\nuniform vec4 contourColor;\nuniform sampler2D colormap;\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform float vertexColor;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n if (\n kill > 0.0 ||\n vColor.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], worldCoordinate)\n ) discard;\n\n vec3 N = normalize(surfaceNormal);\n vec3 V = normalize(eyeDirection);\n vec3 L = normalize(lightDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = max(beckmannSpecular(L, V, N, roughness), 0.);\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n //decide how to interpolate color — in vertex or in fragment\n vec4 surfaceColor =\n step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) +\n step(.5, vertexColor) * vColor;\n\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;\n}\n"]),s=i(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute float f;\n\nuniform vec3 objectOffset;\nuniform mat3 permutation;\nuniform mat4 model, view, projection;\nuniform float height, zOffset;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 dataCoordinate = permutation * vec3(uv.xy, height);\n worldCoordinate = objectOffset + dataCoordinate;\n mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0));\n vec4 worldPosition = (model * objectOffsetTranslation) * vec4(dataCoordinate, 1.0);\n\n vec4 clipPosition = projection * (view * worldPosition);\n clipPosition.z += zOffset;\n\n gl_Position = clipPosition;\n value = f + objectOffset.z;\n kill = -1.0;\n planeCoordinate = uv.zw;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Don't do lighting for contours\n surfaceNormal = vec3(1,0,0);\n eyeDirection = vec3(0,1,0);\n lightDirection = vec3(0,0,1);\n}\n"]),l=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec2 shape;\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 surfaceNormal;\n\nvec2 splitFloat(float v) {\n float vh = 255.0 * v;\n float upper = floor(vh);\n float lower = fract(vh);\n return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);\n}\n\nvoid main() {\n if ((kill > 0.0) ||\n (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\n\n vec2 ux = splitFloat(planeCoordinate.x / shape.x);\n vec2 uy = splitFloat(planeCoordinate.y / shape.y);\n gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));\n}\n"]);t.createShader=function(e){var t=n(e,a,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t.attributes.normal.location=2,t},t.createPickShader=function(e){var t=n(e,a,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t.attributes.normal.location=2,t},t.createContourShader=function(e){var t=n(e,s,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t},t.createPickContourShader=function(e){var t=n(e,s,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t}},9499:function(e,t,r){e.exports=function(e){var t=e.gl,r=v(t),n=_(t),s=x(t),l=b(t),c=i(t),u=a(t,[{buffer:c,size:4,stride:w,offset:0},{buffer:c,size:3,stride:w,offset:16},{buffer:c,size:3,stride:w,offset:28}]),h=i(t),f=a(t,[{buffer:h,size:4,stride:20,offset:0},{buffer:h,size:1,stride:20,offset:16}]),p=i(t),d=a(t,[{buffer:p,size:2,type:t.FLOAT}]),m=o(t,1,S,t.RGBA,t.UNSIGNED_BYTE);m.minFilter=t.LINEAR,m.magFilter=t.LINEAR;var g=new E(t,[0,0],[[0,0,0],[0,0,0]],r,n,c,u,m,s,l,h,f,p,d,[0,0,0]),y={levels:[[],[],[]]};for(var T in e)y[T]=e[T];return y.colormap=y.colormap||"jet",g.update(y),g};var n=r(8828),i=r(2762),a=r(8116),o=r(7766),s=r(1888),l=r(6729),c=r(5298),u=r(9994),h=r(9618),f=r(3711),p=r(6760),d=r(7608),m=r(2478),g=r(6199),y=r(990),v=y.createShader,x=y.createContourShader,_=y.createPickShader,b=y.createPickContourShader,w=40,T=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],k=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],A=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];function M(e,t,r,n,i){this.position=e,this.index=t,this.uv=r,this.level=n,this.dataCoordinate=i}!function(){for(var e=0;e<3;++e){var t=A[e],r=(e+2)%3;t[(e+1)%3+0]=1,t[r+3]=1,t[e+6]=1}}();var S=256;function E(e,t,r,n,i,a,o,l,c,u,f,p,d,m,g){this.gl=e,this.shape=t,this.bounds=r,this.objectOffset=g,this.intensityBounds=[],this._shader=n,this._pickShader=i,this._coordinateBuffer=a,this._vao=o,this._colorMap=l,this._contourShader=c,this._contourPickShader=u,this._contourBuffer=f,this._contourVAO=p,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new M([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=d,this._dynamicVAO=m,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[h(s.mallocFloat(1024),[0,0]),h(s.mallocFloat(1024),[0,0]),h(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var C=E.prototype;C.genColormap=function(e,t){var r=!1,n=u([l({colormap:e,nshades:S,format:"rgba"}).map((function(e,n){var i=t?function(e,t){if(!t||!t.length)return 1;for(var r=0;re&&r>0){var n=(t[r][0]-e)/(t[r][0]-t[r-1][0]);return t[r][1]*(1-n)+n*t[r-1][1]}}return 1}(n/255,t):e[3];return i<1&&(r=!0),[e[0],e[1],e[2],255*i]}))]);return c.divseq(n,255),this.hasAlphaScale=r,n},C.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},C.isOpaque=function(){return!this.isTransparent()},C.pickSlots=1,C.setPickBase=function(e){this.pickId=e};var I=[0,0,0],L={showSurface:!1,showContour:!1,projections:[T.slice(),T.slice(),T.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function P(e,t){var r,n,i,a=t.axes&&t.axes.lastCubeProps.axis||I,o=t.showSurface,s=t.showContour;for(r=0;r<3;++r)for(o=o||t.surfaceProject[r],n=0;n<3;++n)s=s||t.contourProject[r][n];for(r=0;r<3;++r){var l=L.projections[r];for(n=0;n<16;++n)l[n]=0;for(n=0;n<4;++n)l[5*n]=1;l[5*r]=0,l[12+r]=t.axesBounds[+(a[r]>0)][r],p(l,e.model,l);var c=L.clipBounds[r];for(i=0;i<2;++i)for(n=0;n<3;++n)c[i][n]=e.clipBounds[i][n];c[0][r]=-1e8,c[1][r]=1e8}return L.showSurface=o,L.showContour=s,L}var z={model:T,view:T,projection:T,inverseModel:T.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},D=T.slice(),O=[1,0,0,0,1,0,0,0,1];function R(e,t){e=e||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0);var n=z;n.model=e.model||T,n.view=e.view||T,n.projection=e.projection||T,n.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],n.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],n.objectOffset=this.objectOffset,n.contourColor=this.contourColor[0],n.inverseModel=d(n.inverseModel,n.model);for(var i=0;i<2;++i)for(var a=n.clipBounds[i],o=0;o<3;++o)a[o]=Math.min(Math.max(this.clipBounds[i][o],-1e8),1e8);n.kambient=this.ambientLight,n.kdiffuse=this.diffuseLight,n.kspecular=this.specularLight,n.roughness=this.roughness,n.fresnel=this.fresnel,n.opacity=this.opacity,n.height=0,n.permutation=O,n.vertexColor=this.vertexColor;var s=D;for(p(s,n.view,n.model),p(s,n.projection,s),d(s,s),i=0;i<3;++i)n.eyePosition[i]=s[12+i]/s[15];var l=s[15];for(i=0;i<3;++i)l+=this.lightPosition[i]*s[4*i+3];for(i=0;i<3;++i){var c=s[12+i];for(o=0;o<3;++o)c+=s[4*o+i]*this.lightPosition[o];n.lightPosition[i]=c/l}var u=P(n,this);if(u.showSurface){for(this._shader.bind(),this._shader.uniforms=n,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(r.TRIANGLES,this._vertexCount),i=0;i<3;++i)!this.surfaceProject[i]||!this.vertexCount||(this._shader.uniforms.model=u.projections[i],this._shader.uniforms.clipBounds=u.clipBounds[i],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(u.showContour){var h=this._contourShader;n.kambient=1,n.kdiffuse=0,n.kspecular=0,n.opacity=1,h.bind(),h.uniforms=n;var f=this._contourVAO;for(f.bind(),i=0;i<3;++i)for(h.uniforms.permutation=A[i],r.lineWidth(this.contourWidth[i]*this.pixelRatio),o=0;o>4)/16)/255,i=Math.floor(n),a=n-i,o=t[1]*(e.value[1]+(15&e.value[2])/16)/255,s=Math.floor(o),l=o-s;i+=1,s+=1;var c=r.position;c[0]=c[1]=c[2]=0;for(var u=0;u<2;++u)for(var h=u?a:1-a,f=0;f<2;++f)for(var p=i+u,d=s+f,g=h*(f?l:1-l),y=0;y<3;++y)c[y]+=this._field[y].get(p,d)*g;for(var v=this._pickResult.level,x=0;x<3;++x)if(v[x]=m.le(this.contourLevels[x],c[x]),v[x]<0)this.contourLevels[x].length>0&&(v[x]=0);else if(v[x]Math.abs(b-c[x])&&(v[x]+=1)}for(r.index[0]=a<.5?i:i+1,r.index[1]=l<.5?s:s+1,r.uv[0]=n/t[0],r.uv[1]=o/t[1],y=0;y<3;++y)r.dataCoordinate[y]=this._field[y].get(r.index[0],r.index[1]);return r},C.padField=function(e,t){var r=t.shape.slice(),n=e.shape.slice();c.assign(e.lo(1,1).hi(r[0],r[1]),t),c.assign(e.lo(1).hi(r[0],1),t.hi(r[0],1)),c.assign(e.lo(1,n[1]-1).hi(r[0],1),t.lo(0,r[1]-1).hi(r[0],1)),c.assign(e.lo(0,1).hi(1,r[1]),t.hi(1)),c.assign(e.lo(n[0]-1,1).hi(1,r[1]),t.lo(r[0]-1)),e.set(0,0,t.get(0,0)),e.set(0,n[1]-1,t.get(0,r[1]-1)),e.set(n[0]-1,0,t.get(r[0]-1,0)),e.set(n[0]-1,n[1]-1,t.get(r[0]-1,r[1]-1))},C.update=function(e){e=e||{},this.objectOffset=e.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in e&&(this.contourWidth=B(e.contourWidth,Number)),"showContour"in e&&(this.showContour=B(e.showContour,Boolean)),"showSurface"in e&&(this.showSurface=!!e.showSurface),"contourTint"in e&&(this.contourTint=B(e.contourTint,Boolean)),"contourColor"in e&&(this.contourColor=N(e.contourColor)),"contourProject"in e&&(this.contourProject=B(e.contourProject,(function(e){return B(e,Boolean)}))),"surfaceProject"in e&&(this.surfaceProject=e.surfaceProject),"dynamicColor"in e&&(this.dynamicColor=N(e.dynamicColor)),"dynamicTint"in e&&(this.dynamicTint=B(e.dynamicTint,Number)),"dynamicWidth"in e&&(this.dynamicWidth=B(e.dynamicWidth,Number)),"opacity"in e&&(this.opacity=e.opacity),"opacityscale"in e&&(this.opacityscale=e.opacityscale),"colorBounds"in e&&(this.colorBounds=e.colorBounds),"vertexColor"in e&&(this.vertexColor=e.vertexColor?1:0),"colormap"in e&&this._colorMap.setPixels(this.genColormap(e.colormap,this.opacityscale));var t=e.field||e.coords&&e.coords[2]||null,r=!1;if(t||(t=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),"field"in e||"coords"in e){var i=(t.shape[0]+2)*(t.shape[1]+2);i>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(n.nextPow2(i))),this._field[2]=h(this._field[2].data,[t.shape[0]+2,t.shape[1]+2]),this.padField(this._field[2],t),this.shape=t.shape.slice();for(var a=this.shape,o=0;o<2;++o)this._field[2].size>this._field[o].data.length&&(s.freeFloat(this._field[o].data),this._field[o].data=s.mallocFloat(this._field[2].size)),this._field[o]=h(this._field[o].data,[a[0]+2,a[1]+2]);if(e.coords){var l=e.coords;if(!Array.isArray(l)||3!==l.length)throw new Error("gl-surface: invalid coordinates for x/y");for(o=0;o<2;++o){var c=l[o];for(y=0;y<2;++y)if(c.shape[y]!==a[y])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[o],c)}}else if(e.ticks){var u=e.ticks;if(!Array.isArray(u)||2!==u.length)throw new Error("gl-surface: invalid ticks");for(o=0;o<2;++o){var p=u[o];if((Array.isArray(p)||p.length)&&(p=h(p)),p.shape[0]!==a[o])throw new Error("gl-surface: invalid tick length");var d=h(p.data,a);d.stride[o]=p.stride[0],d.stride[1^o]=0,this.padField(this._field[o],d)}}else{for(o=0;o<2;++o){var m=[0,0];m[o]=1,this._field[o]=h(this._field[o].data,[a[0]+2,a[1]+2],m,0)}this._field[0].set(0,0,0);for(var y=0;y0){for(var xe=0;xe<5;++xe)J.pop();U-=1}continue e}J.push(ne[0],ne[1],oe[0],oe[1],ne[2]),U+=1}}re.push(U)}this._contourOffsets[Q]=te,this._contourCounts[Q]=re}var _e=s.mallocFloat(J.length);for(o=0;os||o[1]<0||o[1]>s)throw new Error("gl-texture2d: Invalid texture size");var l=d(o,t.stride.slice()),c=0;"float32"===r?c=e.FLOAT:"float64"===r?(c=e.FLOAT,l=!1,r="float32"):"uint8"===r?c=e.UNSIGNED_BYTE:(c=e.UNSIGNED_BYTE,l=!1,r="uint8");var h=0;if(2===o.length)h=e.LUMINANCE,o=[o[0],o[1],1],t=n(t.data,o,[t.stride[0],t.stride[1],1],t.offset);else{if(3!==o.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===o[2])h=e.ALPHA;else if(2===o[2])h=e.LUMINANCE_ALPHA;else if(3===o[2])h=e.RGB;else{if(4!==o[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");h=e.RGBA}}c===e.FLOAT&&!e.getExtension("OES_texture_float")&&(c=e.UNSIGNED_BYTE,l=!1);var p,g,y=t.size;if(l)p=0===t.offset&&t.data.length===y?t.data:t.data.subarray(t.offset,t.offset+y);else{var v=[o[2],o[2]*o[0],1];g=a.malloc(y,r);var x=n(g,o,v,0);"float32"!==r&&"float64"!==r||c!==e.UNSIGNED_BYTE?i.assign(x,t):u(x,t),p=g.subarray(0,y)}var _=m(e);return e.texImage2D(e.TEXTURE_2D,0,h,o[0],o[1],0,h,c,p),l||a.free(g),new f(e,_,o[0],o[1],h,c)}(e,t)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")};var o=null,s=null,l=null;function c(e){return typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLVideoElement<"u"&&e instanceof HTMLVideoElement||typeof ImageData<"u"&&e instanceof ImageData}var u=function(e,t){i.muls(e,t,255)};function h(e,t,r){var n=e.gl,i=n.getParameter(n.MAX_TEXTURE_SIZE);if(t<0||t>i||r<0||r>i)throw new Error("gl-texture2d: Invalid texture size");return e._shape=[t,r],e.bind(),n.texImage2D(n.TEXTURE_2D,0,e.format,t,r,0,e.format,e.type,null),e._mipLevels=[0],e}function f(e,t,r,n,i,a){this.gl=e,this.handle=t,this.format=i,this.type=a,this._shape=[r,n],this._mipLevels=[0],this._magFilter=e.NEAREST,this._minFilter=e.NEAREST,this._wrapS=e.CLAMP_TO_EDGE,this._wrapT=e.CLAMP_TO_EDGE,this._anisoSamples=1;var o=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return o._wrapS},set:function(e){return o.wrapS=e}},{get:function(){return o._wrapT},set:function(e){return o.wrapT=e}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return o._shape[0]},set:function(e){return o.width=e}},{get:function(){return o._shape[1]},set:function(e){return o.height=e}}]),this._shapeVector=l}var p=f.prototype;function d(e,t){return 3===e.length?1===t[2]&&t[1]===e[0]*e[2]&&t[0]===e[2]:1===t[0]&&t[1]===e[0]}function m(e){var t=e.createTexture();return e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t}function g(e,t,r,n,i){var a=e.getParameter(e.MAX_TEXTURE_SIZE);if(t<0||t>a||r<0||r>a)throw new Error("gl-texture2d: Invalid texture shape");if(i===e.FLOAT&&!e.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var o=m(e);return e.texImage2D(e.TEXTURE_2D,0,n,t,r,0,n,i,null),new f(e,o,t,r,n,i)}Object.defineProperties(p,{minFilter:{get:function(){return this._minFilter},set:function(e){this.bind();var t=this.gl;if(this.type===t.FLOAT&&o.indexOf(e)>=0&&(t.getExtension("OES_texture_float_linear")||(e=t.NEAREST)),s.indexOf(e)<0)throw new Error("gl-texture2d: Unknown filter mode "+e);return t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,e),this._minFilter=e}},magFilter:{get:function(){return this._magFilter},set:function(e){this.bind();var t=this.gl;if(this.type===t.FLOAT&&o.indexOf(e)>=0&&(t.getExtension("OES_texture_float_linear")||(e=t.NEAREST)),s.indexOf(e)<0)throw new Error("gl-texture2d: Unknown filter mode "+e);return t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,e),this._magFilter=e}},mipSamples:{get:function(){return this._anisoSamples},set:function(e){var t=this._anisoSamples;if(this._anisoSamples=0|Math.max(e,1),t!==this._anisoSamples){var r=this.gl.getExtension("EXT_texture_filter_anisotropic");r&&this.gl.texParameterf(this.gl.TEXTURE_2D,r.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(e){if(this.bind(),l.indexOf(e)<0)throw new Error("gl-texture2d: Unknown wrap mode "+e);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,e),this._wrapS=e}},wrapT:{get:function(){return this._wrapT},set:function(e){if(this.bind(),l.indexOf(e)<0)throw new Error("gl-texture2d: Unknown wrap mode "+e);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,e),this._wrapT=e}},wrap:{get:function(){return this._wrapVector},set:function(e){if(Array.isArray(e)||(e=[e,e]),2!==e.length)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var t=0;t<2;++t)if(l.indexOf(e[t])<0)throw new Error("gl-texture2d: Unknown wrap mode "+e);this._wrapS=e[0],this._wrapT=e[1];var r=this.gl;return this.bind(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this._wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this._wrapT),e}},shape:{get:function(){return this._shapeVector},set:function(e){if(Array.isArray(e)){if(2!==e.length)throw new Error("gl-texture2d: Invalid texture shape")}else e=[0|e,0|e];return h(this,0|e[0],0|e[1]),[0|e[0],0|e[1]]}},width:{get:function(){return this._shape[0]},set:function(e){return h(this,e|=0,this._shape[1]),e}},height:{get:function(){return this._shape[1]},set:function(e){return e|=0,h(this,this._shape[0],e),e}}}),p.bind=function(e){var t=this.gl;return void 0!==e&&t.activeTexture(t.TEXTURE0+(0|e)),t.bindTexture(t.TEXTURE_2D,this.handle),void 0!==e?0|e:t.getParameter(t.ACTIVE_TEXTURE)-t.TEXTURE0},p.dispose=function(){this.gl.deleteTexture(this.handle)},p.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var e=Math.min(this._shape[0],this._shape[1]),t=0;e>0;++t,e>>>=1)this._mipLevels.indexOf(t)<0&&this._mipLevels.push(t)},p.setPixels=function(e,t,r,o){var s=this.gl;this.bind(),Array.isArray(t)?(o=r,r=0|t[1],t=0|t[0]):(t=t||0,r=r||0),o=o||0;var l=c(e)?e:e.raw;if(l)this._mipLevels.indexOf(o)<0?(s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,this.type,l),this._mipLevels.push(o)):s.texSubImage2D(s.TEXTURE_2D,o,t,r,this.format,this.type,l);else{if(!(e.shape&&e.stride&&e.data))throw new Error("gl-texture2d: Unsupported data type");if(e.shape.length<2||t+e.shape[1]>this._shape[1]>>>o||r+e.shape[0]>this._shape[0]>>>o||t<0||r<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");!function(e,t,r,o,s,l,c,h){var f=h.dtype,p=h.shape.slice();if(p.length<2||p.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var m=0,g=0,y=d(p,h.stride.slice());if("float32"===f?m=e.FLOAT:"float64"===f?(m=e.FLOAT,y=!1,f="float32"):"uint8"===f?m=e.UNSIGNED_BYTE:(m=e.UNSIGNED_BYTE,y=!1,f="uint8"),2===p.length)g=e.LUMINANCE,p=[p[0],p[1],1],h=n(h.data,p,[h.stride[0],h.stride[1],1],h.offset);else{if(3!==p.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===p[2])g=e.ALPHA;else if(2===p[2])g=e.LUMINANCE_ALPHA;else if(3===p[2])g=e.RGB;else{if(4!==p[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");g=e.RGBA}p[2]}if((g===e.LUMINANCE||g===e.ALPHA)&&(s===e.LUMINANCE||s===e.ALPHA)&&(g=s),g!==s)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var v=h.size,x=c.indexOf(o)<0;if(x&&c.push(o),m===l&&y)0===h.offset&&h.data.length===v?x?e.texImage2D(e.TEXTURE_2D,o,s,p[0],p[1],0,s,l,h.data):e.texSubImage2D(e.TEXTURE_2D,o,t,r,p[0],p[1],s,l,h.data):x?e.texImage2D(e.TEXTURE_2D,o,s,p[0],p[1],0,s,l,h.data.subarray(h.offset,h.offset+v)):e.texSubImage2D(e.TEXTURE_2D,o,t,r,p[0],p[1],s,l,h.data.subarray(h.offset,h.offset+v));else{var _;_=l===e.FLOAT?a.mallocFloat32(v):a.mallocUint8(v);var b=n(_,p,[p[2],p[2]*p[0],1]);m===e.FLOAT&&l===e.UNSIGNED_BYTE?u(b,h):i.assign(b,h),x?e.texImage2D(e.TEXTURE_2D,o,s,p[0],p[1],0,s,l,_.subarray(0,v)):e.texSubImage2D(e.TEXTURE_2D,o,t,r,p[0],p[1],s,l,_.subarray(0,v)),l===e.FLOAT?a.freeFloat32(_):a.freeUint8(_)}}(s,t,r,o,this.format,this.type,this._mipLevels,e)}}},1433:function(e){e.exports=function(e,t,r){t?t.bind():e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null);var n=0|e.getParameter(e.MAX_VERTEX_ATTRIBS);if(r){if(r.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var i=0;i1?0:Math.acos(s)};var n=r(2825),i=r(3536),a=r(244)},9226:function(e){e.exports=function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e}},3126:function(e){e.exports=function(e){var t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},3990:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},1091:function(e){e.exports=function(){var e=new Float32Array(3);return e[0]=0,e[1]=0,e[2]=0,e}},5911:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[0],s=r[1],l=r[2];return e[0]=i*l-a*s,e[1]=a*o-n*l,e[2]=n*s-i*o,e}},5455:function(e,t,r){e.exports=r(7056)},7056:function(e){e.exports=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(r*r+n*n+i*i)}},4008:function(e,t,r){e.exports=r(6690)},6690:function(e){e.exports=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}},244:function(e){e.exports=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}},2613:function(e){e.exports=1e-6},9922:function(e,t,r){e.exports=function(e,t){var r=e[0],i=e[1],a=e[2],o=t[0],s=t[1],l=t[2];return Math.abs(r-o)<=n*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-s)<=n*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(a-l)<=n*Math.max(1,Math.abs(a),Math.abs(l))};var n=r(2613)},9265:function(e){e.exports=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}},2681:function(e){e.exports=function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e}},5137:function(e,t,r){e.exports=function(e,t,r,i,a,o){var s,l;for(t||(t=3),r||(r=0),l=i?Math.min(i*t+r,e.length):e.length,s=r;s0&&(a=1/Math.sqrt(a),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a),e}},7636:function(e){e.exports=function(e,t){t=t||1;var r=2*Math.random()*Math.PI,n=2*Math.random()-1,i=Math.sqrt(1-n*n)*t;return e[0]=Math.cos(r)*i,e[1]=Math.sin(r)*i,e[2]=n*t,e}},6894:function(e){e.exports=function(e,t,r,n){var i=r[1],a=r[2],o=t[1]-i,s=t[2]-a,l=Math.sin(n),c=Math.cos(n);return e[0]=t[0],e[1]=i+o*c-s*l,e[2]=a+o*l+s*c,e}},109:function(e){e.exports=function(e,t,r,n){var i=r[0],a=r[2],o=t[0]-i,s=t[2]-a,l=Math.sin(n),c=Math.cos(n);return e[0]=i+s*l+o*c,e[1]=t[1],e[2]=a+s*c-o*l,e}},8692:function(e){e.exports=function(e,t,r,n){var i=r[0],a=r[1],o=t[0]-i,s=t[1]-a,l=Math.sin(n),c=Math.cos(n);return e[0]=i+o*c-s*l,e[1]=a+o*l+s*c,e[2]=t[2],e}},2447:function(e){e.exports=function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e}},6621:function(e){e.exports=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}},8489:function(e){e.exports=function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e}},1463:function(e){e.exports=function(e,t,r,n){return e[0]=t,e[1]=r,e[2]=n,e}},6141:function(e,t,r){e.exports=r(2953)},5486:function(e,t,r){e.exports=r(3066)},2953:function(e){e.exports=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return r*r+n*n+i*i}},3066:function(e){e.exports=function(e){var t=e[0],r=e[1],n=e[2];return t*t+r*r+n*n}},2229:function(e,t,r){e.exports=r(6843)},6843:function(e){e.exports=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}},492:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],a=t[2];return e[0]=n*r[0]+i*r[3]+a*r[6],e[1]=n*r[1]+i*r[4]+a*r[7],e[2]=n*r[2]+i*r[5]+a*r[8],e}},5673:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[3]*n+r[7]*i+r[11]*a+r[15];return o=o||1,e[0]=(r[0]*n+r[4]*i+r[8]*a+r[12])/o,e[1]=(r[1]*n+r[5]*i+r[9]*a+r[13])/o,e[2]=(r[2]*n+r[6]*i+r[10]*a+r[14])/o,e}},264:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[0],s=r[1],l=r[2],c=r[3],u=c*n+s*a-l*i,h=c*i+l*n-o*a,f=c*a+o*i-s*n,p=-o*n-s*i-l*a;return e[0]=u*c+p*-o+h*-l-f*-s,e[1]=h*c+p*-s+f*-o-u*-l,e[2]=f*c+p*-l+u*-s-h*-o,e}},4361:function(e){e.exports=function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}},2335:function(e){e.exports=function(e){var t=new Float32Array(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},2933:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},7536:function(e){e.exports=function(){var e=new Float32Array(4);return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e}},4691:function(e){e.exports=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],a=t[3]-e[3];return Math.sqrt(r*r+n*n+i*i+a*a)}},1373:function(e){e.exports=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}},3750:function(e){e.exports=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}},3390:function(e){e.exports=function(e,t,r,n){var i=new Float32Array(4);return i[0]=e,i[1]=t,i[2]=r,i[3]=n,i}},9970:function(e,t,r){e.exports={create:r(7536),clone:r(2335),fromValues:r(3390),copy:r(2933),set:r(4578),add:r(4361),subtract:r(6860),multiply:r(3576),divide:r(1373),min:r(2334),max:r(160),scale:r(9288),scaleAndAdd:r(4844),distance:r(4691),squaredDistance:r(7960),length:r(6808),squaredLength:r(483),negate:r(1498),inverse:r(4494),normalize:r(5177),dot:r(3750),lerp:r(2573),random:r(9131),transformMat4:r(5352),transformQuat:r(4041)}},4494:function(e){e.exports=function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e}},6808:function(e){e.exports=function(e){var t=e[0],r=e[1],n=e[2],i=e[3];return Math.sqrt(t*t+r*r+n*n+i*i)}},2573:function(e){e.exports=function(e,t,r,n){var i=t[0],a=t[1],o=t[2],s=t[3];return e[0]=i+n*(r[0]-i),e[1]=a+n*(r[1]-a),e[2]=o+n*(r[2]-o),e[3]=s+n*(r[3]-s),e}},160:function(e){e.exports=function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}},2334:function(e){e.exports=function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}},3576:function(e){e.exports=function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}},1498:function(e){e.exports=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e}},5177:function(e){e.exports=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r*r+n*n+i*i+a*a;return o>0&&(o=1/Math.sqrt(o),e[0]=r*o,e[1]=n*o,e[2]=i*o,e[3]=a*o),e}},9131:function(e,t,r){var n=r(5177),i=r(9288);e.exports=function(e,t){return t=t||1,e[0]=Math.random(),e[1]=Math.random(),e[2]=Math.random(),e[3]=Math.random(),n(e,e),i(e,e,t),e}},9288:function(e){e.exports=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}},4844:function(e){e.exports=function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e}},4578:function(e){e.exports=function(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}},7960:function(e){e.exports=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],a=t[3]-e[3];return r*r+n*n+i*i+a*a}},483:function(e){e.exports=function(e){var t=e[0],r=e[1],n=e[2],i=e[3];return t*t+r*r+n*n+i*i}},6860:function(e){e.exports=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}},5352:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3];return e[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,e[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,e[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,e[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,e}},4041:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[0],s=r[1],l=r[2],c=r[3],u=c*n+s*a-l*i,h=c*i+l*n-o*a,f=c*a+o*i-s*n,p=-o*n-s*i-l*a;return e[0]=u*c+p*-o+h*-l-f*-s,e[1]=h*c+p*-s+f*-o-u*-l,e[2]=f*c+p*-l+u*-s-h*-o,e[3]=t[3],e}},1848:function(e,t,r){var n=r(4905),i=r(6468);e.exports=function(e){for(var t=Array.isArray(e)?e:n(e),r=0;r0)continue;r=e.slice(0,1).join("")}return j(r),L+=r.length,(S=S.slice(r.length)).length}}function q(){if(/[^\d\w_]/.test(t)){var e=S.join("");return M=B[e]?v:F[e]?y:g,j(S.join("")),M=l,k}return S.push(t),r=t,k+1}};var n=r(620),i=r(7827),a=r(6852),o=r(7932),s=r(3508),l=999,c=9999,u=0,h=1,f=2,p=3,d=4,m=5,g=6,y=7,v=8,x=9,_=10,b=11,w=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},3508:function(e,t,r){var n=r(6852);n=n.slice().filter((function(e){return!/^(gl\_|texture)/.test(e)})),e.exports=n.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},6852:function(e){e.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},7932:function(e,t,r){var n=r(620);e.exports=n.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},620:function(e){e.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},7827:function(e){e.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(e,t,r){var n=r(5874);e.exports=function(e,t){var r=n(t),i=[];return(i=i.concat(r(e))).concat(r(null))}},3236:function(e){e.exports=function(e){"string"==typeof e&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],n=0;n>1,u=-7,h=r?i-1:0,f=r?-1:1,p=e[t+h];for(h+=f,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=256*a+e[t+h],h+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=n;u>0;o=256*o+e[t+h],h+=f,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=c}return(p?-1:1)*o*Math.pow(2,a-n)},t.write=function(e,t,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+h>=1?f/l:f*Math.pow(2,1-h))*l>=2&&(o++,l/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(t*l-1)*Math.pow(2,i),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;e[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<0;e[r+p]=255&o,p+=d,o/=256,c-=8);e[r+p-d]|=128*m}},8954:function(e,t,r){e.exports=function(e,t){var r=e.length;if(0===r)throw new Error("Must have at least d+1 points");var i=e[0].length;if(r<=i)throw new Error("Must input at least d+1 points");var o=e.slice(0,i+1),s=n.apply(void 0,o);if(0===s)throw new Error("Input not in general position");for(var l=new Array(i+1),u=0;u<=i;++u)l[u]=u;s<0&&(l[0]=1,l[1]=0);var h=new a(l,new Array(i+1),!1),f=h.adjacent,p=new Array(i+2);for(u=0;u<=i;++u){for(var d=l.slice(),m=0;m<=i;++m)m===u&&(d[m]=-1);var g=d[0];d[0]=d[1],d[1]=g;var y=new a(d,new Array(i+1),!0);f[u]=y,p[u]=y}for(p[i+1]=h,u=0;u<=i;++u){d=f[u].vertices;var v=f[u].adjacent;for(m=0;m<=i;++m){var x=d[m];if(x<0)v[m]=h;else for(var _=0;_<=i;++_)f[_].vertices.indexOf(x)<0&&(v[m]=f[_])}}var b=new c(i,o,p),w=!!t;for(u=i+1;u0;)for(var s=(e=o.pop()).adjacent,l=0;l<=r;++l){var c=s[l];if(c.boundary&&!(c.lastVisited<=-n)){for(var u=c.vertices,h=0;h<=r;++h){var f=u[h];i[h]=f<0?t:a[f]}var p=this.orient();if(p>0)return c;c.lastVisited=-n,0===p&&o.push(c)}}return null},u.walk=function(e,t){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,a=this.tuple,o=t?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[o];e:for(;!s.boundary;){for(var l=s.vertices,c=s.adjacent,u=0;u<=n;++u)a[u]=i[l[u]];for(s.lastVisited=r,u=0;u<=n;++u){var h=c[u];if(!(h.lastVisited>=r)){var f=a[u];a[u]=e;var p=this.orient();if(a[u]=f,p<0){s=h;continue e}h.boundary?h.lastVisited=-r:h.lastVisited=r}}return}return s},u.addPeaks=function(e,t){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,l=this.tuple,c=this.interior,u=this.simplices,h=[t];t.lastVisited=r,t.vertices[t.vertices.indexOf(-1)]=r,t.boundary=!1,c.push(t);for(var f=[];h.length>0;){var p=(t=h.pop()).vertices,d=t.adjacent,m=p.indexOf(r);if(!(m<0))for(var g=0;g<=n;++g)if(g!==m){var y=d[g];if(y.boundary&&!(y.lastVisited>=r)){var v=y.vertices;if(y.lastVisited!==-r){for(var x=0,_=0;_<=n;++_)v[_]<0?(x=_,l[_]=e):l[_]=i[v[_]];if(this.orient()>0){v[x]=r,y.boundary=!1,c.push(y),h.push(y),y.lastVisited=r;continue}y.lastVisited=-r}var b=y.adjacent,w=p.slice(),T=d.slice(),k=new a(w,T,!0);u.push(k);var A=b.indexOf(t);if(!(A<0))for(b[A]=k,T[m]=y,w[g]=-1,T[g]=t,d[g]=k,k.flip(),_=0;_<=n;++_){var M=w[_];if(!(M<0||M===r)){for(var S=new Array(n-1),E=0,C=0;C<=n;++C){var I=w[C];I<0||C===_||(S[E++]=I)}f.push(new o(S,k,_))}}}}}for(f.sort(s),g=0;g+1=0?o[l++]=s[u]:c=1&u;if(c===(1&e)){var h=o[0];o[0]=o[1],o[1]=h}t.push(o)}}return t}},3352:function(e,t,r){var n=r(2478);function i(e,t,r,n,i){this.mid=e,this.left=t,this.right=r,this.leftPoints=n,this.rightPoints=i,this.count=(t?t.count:0)+(r?r.count:0)+n.length}e.exports=function(e){return e&&0!==e.length?new y(g(e)):new y(null)};var a=i.prototype;function o(e,t){e.mid=t.mid,e.left=t.left,e.right=t.right,e.leftPoints=t.leftPoints,e.rightPoints=t.rightPoints,e.count=t.count}function s(e,t){var r=g(t);e.mid=r.mid,e.left=r.left,e.right=r.right,e.leftPoints=r.leftPoints,e.rightPoints=r.rightPoints,e.count=r.count}function l(e,t){var r=e.intervals([]);r.push(t),s(e,r)}function c(e,t){var r=e.intervals([]),n=r.indexOf(t);return n<0?0:(r.splice(n,1),s(e,r),1)}function u(e,t,r){for(var n=0;n=0&&e[n][1]>=t;--n){var i=r(e[n]);if(i)return i}}function f(e,t){for(var r=0;r>1],a=[],o=[],s=[];for(r=0;r3*(t+1)?l(this,e):this.left.insert(e):this.left=g([e]);else if(e[0]>this.mid)this.right?4*(this.right.count+1)>3*(t+1)?l(this,e):this.right.insert(e):this.right=g([e]);else{var r=n.ge(this.leftPoints,e,d),i=n.ge(this.rightPoints,e,m);this.leftPoints.splice(r,0,e),this.rightPoints.splice(i,0,e)}},a.remove=function(e){var t=this.count-this.leftPoints;if(e[1]3*(t-1)?c(this,e):2===(s=this.left.remove(e))?(this.left=null,this.count-=1,1):(1===s&&(this.count-=1),s):0;if(e[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(t-1)?c(this,e):2===(s=this.right.remove(e))?(this.right=null,this.count-=1,1):(1===s&&(this.count-=1),s):0;if(1===this.count)return this.leftPoints[0]===e?2:0;if(1===this.leftPoints.length&&this.leftPoints[0]===e){if(this.left&&this.right){for(var r=this,i=this.left;i.right;)r=i,i=i.right;if(r===this)i.right=this.right;else{var a=this.left,s=this.right;r.count-=i.count,r.right=i.left,i.left=a,i.right=s}o(this,i),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?o(this,this.left):o(this,this.right);return 1}for(a=n.ge(this.leftPoints,e,d);athis.mid?this.right&&(r=this.right.queryPoint(e,t))?r:h(this.rightPoints,e,t):f(this.leftPoints,t);var r},a.queryInterval=function(e,t,r){var n;return ethis.mid&&this.right&&(n=this.right.queryInterval(e,t,r))?n:tthis.mid?h(this.rightPoints,e,r):f(this.leftPoints,r)};var v=y.prototype;v.insert=function(e){this.root?this.root.insert(e):this.root=new i(e[0],null,null,[e],[e])},v.remove=function(e){if(this.root){var t=this.root.remove(e);return 2===t&&(this.root=null),0!==t}return!1},v.queryPoint=function(e,t){if(this.root)return this.root.queryPoint(e,t)},v.queryInterval=function(e,t,r){if(e<=t&&this.root)return this.root.queryInterval(e,t,r)},Object.defineProperty(v,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(v,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},9507:function(e){e.exports=!0},7163:function(e){function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},5219:function(e){e.exports=function(e){for(var t,r=e.length,n=0;n13)&&32!==t&&133!==t&&160!==t&&5760!==t&&6158!==t&&(t<8192||t>8205)&&8232!==t&&8233!==t&&8239!==t&&8287!==t&&8288!==t&&12288!==t&&65279!==t)return!1;return!0}},395:function(e){e.exports=function(e,t,r){return e*(1-r)+t*r}},2652:function(e,t,r){var n=r(4335),i=r(6864),a=r(1903),o=r(9921),s=r(7608),l=r(5665),c={length:r(1387),normalize:r(3536),dot:r(244),cross:r(5911)},u=i(),h=i(),f=[0,0,0,0],p=[[0,0,0],[0,0,0],[0,0,0]],d=[0,0,0];function m(e,t,r,n,i){e[0]=t[0]*n+r[0]*i,e[1]=t[1]*n+r[1]*i,e[2]=t[2]*n+r[2]*i}e.exports=function(e,t,r,i,g,y){if(t||(t=[0,0,0]),r||(r=[0,0,0]),i||(i=[0,0,0]),g||(g=[0,0,0,1]),y||(y=[0,0,0,1]),!n(u,e)||(a(h,u),h[3]=0,h[7]=0,h[11]=0,h[15]=1,Math.abs(o(h)<1e-8)))return!1;var v=u[3],x=u[7],_=u[11],b=u[12],w=u[13],T=u[14],k=u[15];if(0!==v||0!==x||0!==_){if(f[0]=v,f[1]=x,f[2]=_,f[3]=k,!s(h,h))return!1;l(h,h),function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3];e[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,e[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,e[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,e[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o}(g,f,h)}else g[0]=g[1]=g[2]=0,g[3]=1;if(t[0]=b,t[1]=w,t[2]=T,function(e,t){e[0][0]=t[0],e[0][1]=t[1],e[0][2]=t[2],e[1][0]=t[4],e[1][1]=t[5],e[1][2]=t[6],e[2][0]=t[8],e[2][1]=t[9],e[2][2]=t[10]}(p,u),r[0]=c.length(p[0]),c.normalize(p[0],p[0]),i[0]=c.dot(p[0],p[1]),m(p[1],p[1],p[0],1,-i[0]),r[1]=c.length(p[1]),c.normalize(p[1],p[1]),i[0]/=r[1],i[1]=c.dot(p[0],p[2]),m(p[2],p[2],p[0],1,-i[1]),i[2]=c.dot(p[1],p[2]),m(p[2],p[2],p[1],1,-i[2]),r[2]=c.length(p[2]),c.normalize(p[2],p[2]),i[1]/=r[2],i[2]/=r[2],c.cross(d,p[1],p[2]),c.dot(p[0],d)<0)for(var A=0;A<3;A++)r[A]*=-1,p[A][0]*=-1,p[A][1]*=-1,p[A][2]*=-1;return y[0]=.5*Math.sqrt(Math.max(1+p[0][0]-p[1][1]-p[2][2],0)),y[1]=.5*Math.sqrt(Math.max(1-p[0][0]+p[1][1]-p[2][2],0)),y[2]=.5*Math.sqrt(Math.max(1-p[0][0]-p[1][1]+p[2][2],0)),y[3]=.5*Math.sqrt(Math.max(1+p[0][0]+p[1][1]+p[2][2],0)),p[2][1]>p[1][2]&&(y[0]=-y[0]),p[0][2]>p[2][0]&&(y[1]=-y[1]),p[1][0]>p[0][1]&&(y[2]=-y[2]),!0}},4335:function(e){e.exports=function(e,t){var r=t[15];if(0===r)return!1;for(var n=1/r,i=0;i<16;i++)e[i]=t[i]*n;return!0}},7442:function(e,t,r){var n=r(6658),i=r(7182),a=r(2652),o=r(9921),s=r(8648),l=h(),c=h(),u=h();function h(){return{translate:f(),scale:f(1),skew:f(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function f(e){return[e||0,e||0,e||0]}e.exports=function(e,t,r,h){if(0===o(t)||0===o(r))return!1;var f=a(t,l.translate,l.scale,l.skew,l.perspective,l.quaternion),p=a(r,c.translate,c.scale,c.skew,c.perspective,c.quaternion);return!(!f||!p||(n(u.translate,l.translate,c.translate,h),n(u.skew,l.skew,c.skew,h),n(u.scale,l.scale,c.scale,h),n(u.perspective,l.perspective,c.perspective,h),s(u.quaternion,l.quaternion,c.quaternion,h),i(e,u.translate,u.scale,u.skew,u.perspective,u.quaternion),0))}},7182:function(e,t,r){var n={identity:r(7894),translate:r(7656),multiply:r(6760),create:r(6864),scale:r(2504),fromRotationTranslation:r(6743)},i=(n.create(),n.create());e.exports=function(e,t,r,a,o,s){return n.identity(e),n.fromRotationTranslation(e,s,t),e[3]=o[0],e[7]=o[1],e[11]=o[2],e[15]=o[3],n.identity(i),0!==a[2]&&(i[9]=a[2],n.multiply(e,e,i)),0!==a[1]&&(i[9]=0,i[8]=a[1],n.multiply(e,e,i)),0!==a[0]&&(i[8]=0,i[4]=a[0],n.multiply(e,e,i)),n.scale(e,e,r),e}},1811:function(e,t,r){var n=r(2478),i=r(7442),a=r(7608),o=r(5567),s=r(2408),l=r(7089),c=r(6582),u=r(7656),h=(r(2504),r(3536)),f=[0,0,0];function p(e){this._components=e.slice(),this._time=[0],this.prevMatrix=e.slice(),this.nextMatrix=e.slice(),this.computedMatrix=e.slice(),this.computedInverse=e.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}e.exports=function(e){return new p((e=e||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var d=p.prototype;d.recalcMatrix=function(e){var t=this._time,r=n.le(t,e),o=this.computedMatrix;if(!(r<0)){var s=this._components;if(r===t.length-1)for(var l=16*r,c=0;c<16;++c)o[c]=s[l++];else{var u=t[r+1]-t[r],f=(l=16*r,this.prevMatrix),p=!0;for(c=0;c<16;++c)f[c]=s[l++];var d=this.nextMatrix;for(c=0;c<16;++c)d[c]=s[l++],p=p&&f[c]===d[c];if(u<1e-6||p)for(c=0;c<16;++c)o[c]=f[c];else i(o,f,d,(e-t[r])/u)}var m=this.computedUp;m[0]=o[1],m[1]=o[5],m[2]=o[9],h(m,m);var g=this.computedInverse;a(g,o);var y=this.computedEye,v=g[15];y[0]=g[12]/v,y[1]=g[13]/v,y[2]=g[14]/v;var x=this.computedCenter,_=Math.exp(this.computedRadius[0]);for(c=0;c<3;++c)x[c]=y[c]-o[2+4*c]*_}},d.idle=function(e){if(!(e1&&n(e[o[u-2]],e[o[u-1]],c)<=0;)u-=1,o.pop();for(o.push(l),u=s.length;u>1&&n(e[s[u-2]],e[s[u-1]],c)>=0;)u-=1,s.pop();s.push(l)}r=new Array(s.length+o.length-2);for(var h=0,f=(i=0,o.length);i0;--p)r[h++]=s[p];return r};var n=r(3250)[3]},351:function(e,t,r){e.exports=function(e,t){t||(t=e,e=window);var r=0,i=0,a=0,o={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(e){var t=!1;return"altKey"in e&&(t=t||e.altKey!==o.alt,o.alt=!!e.altKey),"shiftKey"in e&&(t=t||e.shiftKey!==o.shift,o.shift=!!e.shiftKey),"ctrlKey"in e&&(t=t||e.ctrlKey!==o.control,o.control=!!e.ctrlKey),"metaKey"in e&&(t=t||e.metaKey!==o.meta,o.meta=!!e.metaKey),t}function c(e,s){var c=n.x(s),u=n.y(s);"buttons"in s&&(e=0|s.buttons),(e!==r||c!==i||u!==a||l(s))&&(r=0|e,i=c||0,a=u||0,t&&t(r,i,a,o))}function u(e){c(0,e)}function h(){(r||i||a||o.shift||o.alt||o.meta||o.control)&&(i=a=0,r=0,o.shift=o.alt=o.control=o.meta=!1,t&&t(0,0,0,o))}function f(e){l(e)&&t&&t(r,i,a,o)}function p(e){0===n.buttons(e)?c(0,e):c(r,e)}function d(e){c(r|n.buttons(e),e)}function m(e){c(r&~n.buttons(e),e)}function g(){s||(s=!0,e.addEventListener("mousemove",p),e.addEventListener("mousedown",d),e.addEventListener("mouseup",m),e.addEventListener("mouseleave",u),e.addEventListener("mouseenter",u),e.addEventListener("mouseout",u),e.addEventListener("mouseover",u),e.addEventListener("blur",h),e.addEventListener("keyup",f),e.addEventListener("keydown",f),e.addEventListener("keypress",f),e!==window&&(window.addEventListener("blur",h),window.addEventListener("keyup",f),window.addEventListener("keydown",f),window.addEventListener("keypress",f)))}g();var y={element:e};return Object.defineProperties(y,{enabled:{get:function(){return s},set:function(t){t?g():s&&(s=!1,e.removeEventListener("mousemove",p),e.removeEventListener("mousedown",d),e.removeEventListener("mouseup",m),e.removeEventListener("mouseleave",u),e.removeEventListener("mouseenter",u),e.removeEventListener("mouseout",u),e.removeEventListener("mouseover",u),e.removeEventListener("blur",h),e.removeEventListener("keyup",f),e.removeEventListener("keydown",f),e.removeEventListener("keypress",f),e!==window&&(window.removeEventListener("blur",h),window.removeEventListener("keyup",f),window.removeEventListener("keydown",f),window.removeEventListener("keypress",f)))},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return a},enumerable:!0},mods:{get:function(){return o},enumerable:!0}}),y};var n=r(4687)},24:function(e){var t={left:0,top:0};e.exports=function(e,r,n){r=r||e.currentTarget||e.srcElement,Array.isArray(n)||(n=[0,0]);var i=e.clientX||0,a=e.clientY||0,o=function(e){return e===window||e===document||e===document.body?t:e.getBoundingClientRect()}(r);return n[0]=i-o.left,n[1]=a-o.top,n}},4687:function(e,t){function r(e){return e.target||e.srcElement||window}t.buttons=function(e){if("object"==typeof e){if("buttons"in e)return e.buttons;if("which"in e){if(2===(t=e.which))return 4;if(3===t)return 2;if(t>0)return 1<=0)return 1< 0"),"function"!=typeof e.vertex&&t("Must specify vertex creation function"),"function"!=typeof e.cell&&t("Must specify cell creation function"),"function"!=typeof e.phase&&t("Must specify phase function");for(var o=e.getters||[],s=new Array(a),l=0;l=0?s[l]=!0:s[l]=!1;return function(e,t,r,a,o,s){var l=[s,o].join(",");return(0,i[l])(e,t,r,n.mallocUint32,n.freeUint32)}(e.vertex,e.cell,e.phase,0,r,s)};var i={"false,0,1":function(e,t,r,n,i){return function(a,o,s,l){var c,u=0|a.shape[0],h=0|a.shape[1],f=a.data,p=0|a.offset,d=0|a.stride[0],m=0|a.stride[1],g=p,y=0|-d,v=0,x=0|-m,_=0,b=-d-m|0,w=0,T=0|d,k=m-d*u|0,A=0,M=0,S=0,E=2*u|0,C=n(E),I=n(E),L=0,P=0,z=-1,D=-1,O=0,R=0|-u,F=0|u,B=0,j=-u-1|0,N=u-1|0,U=0,V=0,q=0;for(A=0;A0){if(M=1,C[L++]=r(f[g],o,s,l),g+=T,u>0)for(A=1,c=f[g],P=C[L]=r(c,o,s,l),O=C[L+z],B=C[L+R],U=C[L+j],(P!==O||P!==B||P!==U)&&(v=f[g+y],_=f[g+x],w=f[g+b],e(A,M,c,v,_,w,P,O,B,U,o,s,l),V=I[L]=S++),L+=1,g+=T,A=2;A0)for(A=1,c=f[g],P=C[L]=r(c,o,s,l),O=C[L+z],B=C[L+R],U=C[L+j],(P!==O||P!==B||P!==U)&&(v=f[g+y],_=f[g+x],w=f[g+b],e(A,M,c,v,_,w,P,O,B,U,o,s,l),V=I[L]=S++,U!==B&&t(I[L+R],V,_,w,B,U,o,s,l)),L+=1,g+=T,A=2;A0){if(A=1,C[L++]=r(f[g],o,s,l),g+=T,h>0)for(M=1,c=f[g],P=C[L]=r(c,o,s,l),B=C[L+R],O=C[L+z],U=C[L+j],(P!==B||P!==O||P!==U)&&(v=f[g+y],_=f[g+x],w=f[g+b],e(A,M,c,v,_,w,P,B,O,U,o,s,l),V=I[L]=S++),L+=1,g+=T,M=2;M0)for(M=1,c=f[g],P=C[L]=r(c,o,s,l),B=C[L+R],O=C[L+z],U=C[L+j],(P!==B||P!==O||P!==U)&&(v=f[g+y],_=f[g+x],w=f[g+b],e(A,M,c,v,_,w,P,B,O,U,o,s,l),V=I[L]=S++,U!==B&&t(I[L+R],V,w,v,U,B,o,s,l)),L+=1,g+=T,M=2;M2&&a[1]>2&&n(i.pick(-1,-1).lo(1,1).hi(a[0]-2,a[1]-2),e.pick(-1,-1,0).lo(1,1).hi(a[0]-2,a[1]-2),e.pick(-1,-1,1).lo(1,1).hi(a[0]-2,a[1]-2)),a[1]>2&&(r(i.pick(0,-1).lo(1).hi(a[1]-2),e.pick(0,-1,1).lo(1).hi(a[1]-2)),t(e.pick(0,-1,0).lo(1).hi(a[1]-2))),a[1]>2&&(r(i.pick(a[0]-1,-1).lo(1).hi(a[1]-2),e.pick(a[0]-1,-1,1).lo(1).hi(a[1]-2)),t(e.pick(a[0]-1,-1,0).lo(1).hi(a[1]-2))),a[0]>2&&(r(i.pick(-1,0).lo(1).hi(a[0]-2),e.pick(-1,0,0).lo(1).hi(a[0]-2)),t(e.pick(-1,0,1).lo(1).hi(a[0]-2))),a[0]>2&&(r(i.pick(-1,a[1]-1).lo(1).hi(a[0]-2),e.pick(-1,a[1]-1,0).lo(1).hi(a[0]-2)),t(e.pick(-1,a[1]-1,1).lo(1).hi(a[0]-2))),e.set(0,0,0,0),e.set(0,0,1,0),e.set(a[0]-1,0,0,0),e.set(a[0]-1,0,1,0),e.set(0,a[1]-1,0,0),e.set(0,a[1]-1,1,0),e.set(a[0]-1,a[1]-1,0,0),e.set(a[0]-1,a[1]-1,1,0),e}}e.exports=function(e,t,r){if(Array.isArray(r)||(r=n(t.dimension,"string"==typeof r?r:"clamp")),0===t.size)return e;if(0===t.dimension)return e.set(0),e;var i=function(e){var t=e.join();if(a=u[t])return a;for(var r=e.length,n=[h,f],i=1;i<=r;++i)n.push(p(i));var a=d.apply(void 0,n);return u[t]=a,a}(r);return i(e,t)}},4317:function(e){function t(e,t){var r=Math.floor(t),n=t-r,i=0<=r&&r0;){x<64?(l=x,x=0):(l=64,x-=64);for(var _=0|e[1];_>0;){_<64?(c=_,_=0):(c=64,_-=64),n=y+x*h+_*f,o=v+x*d+_*m;var b=0,w=0,T=0,k=p,A=h-u*p,M=f-l*h,S=g,E=d-u*g,C=m-l*d;for(T=0;T0;){m<64?(l=m,m=0):(l=64,m-=64);for(var g=0|e[0];g>0;){g<64?(s=g,g=0):(s=64,g-=64),n=p+m*u+g*c,o=d+m*f+g*h;var y=0,v=0,x=u,_=c-l*u,b=f,w=h-l*f;for(v=0;v0;){v<64?(c=v,v=0):(c=64,v-=64);for(var x=0|e[0];x>0;){x<64?(s=x,x=0):(s=64,x-=64);for(var _=0|e[1];_>0;){_<64?(l=_,_=0):(l=64,_-=64),n=g+v*f+x*u+_*h,o=y+v*m+x*p+_*d;var b=0,w=0,T=0,k=f,A=u-c*f,M=h-s*u,S=m,E=p-c*m,C=d-s*p;for(T=0;Tr;){y=0,v=m-o;t:for(g=0;g_)break t;v+=h,y+=f}for(y=m,v=m-o,g=0;g>1,H=q-N,G=q+N,W=U,Z=H,Y=q,X=G,$=V,K=i+1,J=a-1,Q=!0,ee=0,te=0,re=0,ne=h,ie=t(ne),ae=t(ne);A=l*W,M=l*Z,j=s;e:for(k=0;k0){g=W,W=Z,Z=g;break e}if(re<0)break e;j+=p}A=l*X,M=l*$,j=s;e:for(k=0;k0){g=X,X=$,$=g;break e}if(re<0)break e;j+=p}A=l*W,M=l*Y,j=s;e:for(k=0;k0){g=W,W=Y,Y=g;break e}if(re<0)break e;j+=p}A=l*Z,M=l*Y,j=s;e:for(k=0;k0){g=Z,Z=Y,Y=g;break e}if(re<0)break e;j+=p}A=l*W,M=l*X,j=s;e:for(k=0;k0){g=W,W=X,X=g;break e}if(re<0)break e;j+=p}A=l*Y,M=l*X,j=s;e:for(k=0;k0){g=Y,Y=X,X=g;break e}if(re<0)break e;j+=p}A=l*Z,M=l*$,j=s;e:for(k=0;k0){g=Z,Z=$,$=g;break e}if(re<0)break e;j+=p}A=l*Z,M=l*Y,j=s;e:for(k=0;k0){g=Z,Z=Y,Y=g;break e}if(re<0)break e;j+=p}A=l*X,M=l*$,j=s;e:for(k=0;k0){g=X,X=$,$=g;break e}if(re<0)break e;j+=p}for(A=l*W,M=l*Z,S=l*Y,E=l*X,C=l*$,I=l*U,L=l*q,P=l*V,B=0,j=s,k=0;k0)){if(re<0){for(A=l*_,M=l*K,S=l*J,j=s,k=0;k0)for(;;){for(b=s+J*l,B=0,k=0;k0)){for(b=s+J*l,B=0,k=0;kV){e:for(;;){for(b=s+K*l,B=0,j=s,k=0;k1&&n?s(r,n[0],n[1]):s(r)}(e,t,l);return n(l,c)}},446:function(e,t,r){var n=r(7640),i={};e.exports=function(e){var t=e.order,r=e.dtype,a=[t,r].join(":"),o=i[a];return o||(i[a]=o=n(t,r)),o(e),e}},9618:function(e,t,r){var n=r(7163),i=typeof Float64Array<"u";function a(e,t){return e[0]-t[0]}function o(){var e,t=this.stride,r=new Array(t.length);for(e=0;e=0&&(t+=a*(r=0|e),i-=r),new n(this.data,i,a,t)},i.step=function(e){var t=this.shape[0],r=this.stride[0],i=this.offset,a=0,o=Math.ceil;return"number"==typeof e&&((a=0|e)<0?(i+=r*(t-1),t=o(-t/a)):t=o(t/a),r*=a),new n(this.data,t,r,i)},i.transpose=function(e){e=void 0===e?0:0|e;var t=this.shape,r=this.stride;return new n(this.data,t[e],r[e],this.offset)},i.pick=function(e){var r=[],n=[],i=this.offset;return"number"==typeof e&&e>=0?i=i+this.stride[0]*e|0:(r.push(this.shape[0]),n.push(this.stride[0])),(0,t[r.length+1])(this.data,r,n,i)},function(e,t,r,i){return new n(e,t[0],r[0],i)}},2:function(e,t,r){function n(e,t,r,n,i,a){this.data=e,this.shape=[t,r],this.stride=[n,i],this.offset=0|a}var i=n.prototype;return i.dtype=e,i.dimension=2,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(i,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),i.set=function(t,r,n){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r,n):this.data[this.offset+this.stride[0]*t+this.stride[1]*r]=n},i.get=function(t,r){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r):this.data[this.offset+this.stride[0]*t+this.stride[1]*r]},i.index=function(e,t){return this.offset+this.stride[0]*e+this.stride[1]*t},i.hi=function(e,t){return new n(this.data,"number"!=typeof e||e<0?this.shape[0]:0|e,"number"!=typeof t||t<0?this.shape[1]:0|t,this.stride[0],this.stride[1],this.offset)},i.lo=function(e,t){var r=this.offset,i=0,a=this.shape[0],o=this.shape[1],s=this.stride[0],l=this.stride[1];return"number"==typeof e&&e>=0&&(r+=s*(i=0|e),a-=i),"number"==typeof t&&t>=0&&(r+=l*(i=0|t),o-=i),new n(this.data,a,o,s,l,r)},i.step=function(e,t){var r=this.shape[0],i=this.shape[1],a=this.stride[0],o=this.stride[1],s=this.offset,l=0,c=Math.ceil;return"number"==typeof e&&((l=0|e)<0?(s+=a*(r-1),r=c(-r/l)):r=c(r/l),a*=l),"number"==typeof t&&((l=0|t)<0?(s+=o*(i-1),i=c(-i/l)):i=c(i/l),o*=l),new n(this.data,r,i,a,o,s)},i.transpose=function(e,t){e=void 0===e?0:0|e,t=void 0===t?1:0|t;var r=this.shape,i=this.stride;return new n(this.data,r[e],r[t],i[e],i[t],this.offset)},i.pick=function(e,r){var n=[],i=[],a=this.offset;return"number"==typeof e&&e>=0?a=a+this.stride[0]*e|0:(n.push(this.shape[0]),i.push(this.stride[0])),"number"==typeof r&&r>=0?a=a+this.stride[1]*r|0:(n.push(this.shape[1]),i.push(this.stride[1])),(0,t[n.length+1])(this.data,n,i,a)},function(e,t,r,i){return new n(e,t[0],t[1],r[0],r[1],i)}},3:function(e,t,r){function n(e,t,r,n,i,a,o,s){this.data=e,this.shape=[t,r,n],this.stride=[i,a,o],this.offset=0|s}var i=n.prototype;return i.dtype=e,i.dimension=3,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(i,"order",{get:function(){var e=Math.abs(this.stride[0]),t=Math.abs(this.stride[1]),r=Math.abs(this.stride[2]);return e>t?t>r?[2,1,0]:e>r?[1,2,0]:[1,0,2]:e>r?[2,0,1]:r>t?[0,1,2]:[0,2,1]}}),i.set=function(t,r,n,i){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n,i):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n]=i},i.get=function(t,r,n){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n]},i.index=function(e,t,r){return this.offset+this.stride[0]*e+this.stride[1]*t+this.stride[2]*r},i.hi=function(e,t,r){return new n(this.data,"number"!=typeof e||e<0?this.shape[0]:0|e,"number"!=typeof t||t<0?this.shape[1]:0|t,"number"!=typeof r||r<0?this.shape[2]:0|r,this.stride[0],this.stride[1],this.stride[2],this.offset)},i.lo=function(e,t,r){var i=this.offset,a=0,o=this.shape[0],s=this.shape[1],l=this.shape[2],c=this.stride[0],u=this.stride[1],h=this.stride[2];return"number"==typeof e&&e>=0&&(i+=c*(a=0|e),o-=a),"number"==typeof t&&t>=0&&(i+=u*(a=0|t),s-=a),"number"==typeof r&&r>=0&&(i+=h*(a=0|r),l-=a),new n(this.data,o,s,l,c,u,h,i)},i.step=function(e,t,r){var i=this.shape[0],a=this.shape[1],o=this.shape[2],s=this.stride[0],l=this.stride[1],c=this.stride[2],u=this.offset,h=0,f=Math.ceil;return"number"==typeof e&&((h=0|e)<0?(u+=s*(i-1),i=f(-i/h)):i=f(i/h),s*=h),"number"==typeof t&&((h=0|t)<0?(u+=l*(a-1),a=f(-a/h)):a=f(a/h),l*=h),"number"==typeof r&&((h=0|r)<0?(u+=c*(o-1),o=f(-o/h)):o=f(o/h),c*=h),new n(this.data,i,a,o,s,l,c,u)},i.transpose=function(e,t,r){e=void 0===e?0:0|e,t=void 0===t?1:0|t,r=void 0===r?2:0|r;var i=this.shape,a=this.stride;return new n(this.data,i[e],i[t],i[r],a[e],a[t],a[r],this.offset)},i.pick=function(e,r,n){var i=[],a=[],o=this.offset;return"number"==typeof e&&e>=0?o=o+this.stride[0]*e|0:(i.push(this.shape[0]),a.push(this.stride[0])),"number"==typeof r&&r>=0?o=o+this.stride[1]*r|0:(i.push(this.shape[1]),a.push(this.stride[1])),"number"==typeof n&&n>=0?o=o+this.stride[2]*n|0:(i.push(this.shape[2]),a.push(this.stride[2])),(0,t[i.length+1])(this.data,i,a,o)},function(e,t,r,i){return new n(e,t[0],t[1],t[2],r[0],r[1],r[2],i)}},4:function(e,t,r){function n(e,t,r,n,i,a,o,s,l,c){this.data=e,this.shape=[t,r,n,i],this.stride=[a,o,s,l],this.offset=0|c}var i=n.prototype;return i.dtype=e,i.dimension=4,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(i,"order",{get:r}),i.set=function(t,r,n,i,a){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i,a):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i]=a},i.get=function(t,r,n,i){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i]},i.index=function(e,t,r,n){return this.offset+this.stride[0]*e+this.stride[1]*t+this.stride[2]*r+this.stride[3]*n},i.hi=function(e,t,r,i){return new n(this.data,"number"!=typeof e||e<0?this.shape[0]:0|e,"number"!=typeof t||t<0?this.shape[1]:0|t,"number"!=typeof r||r<0?this.shape[2]:0|r,"number"!=typeof i||i<0?this.shape[3]:0|i,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},i.lo=function(e,t,r,i){var a=this.offset,o=0,s=this.shape[0],l=this.shape[1],c=this.shape[2],u=this.shape[3],h=this.stride[0],f=this.stride[1],p=this.stride[2],d=this.stride[3];return"number"==typeof e&&e>=0&&(a+=h*(o=0|e),s-=o),"number"==typeof t&&t>=0&&(a+=f*(o=0|t),l-=o),"number"==typeof r&&r>=0&&(a+=p*(o=0|r),c-=o),"number"==typeof i&&i>=0&&(a+=d*(o=0|i),u-=o),new n(this.data,s,l,c,u,h,f,p,d,a)},i.step=function(e,t,r,i){var a=this.shape[0],o=this.shape[1],s=this.shape[2],l=this.shape[3],c=this.stride[0],u=this.stride[1],h=this.stride[2],f=this.stride[3],p=this.offset,d=0,m=Math.ceil;return"number"==typeof e&&((d=0|e)<0?(p+=c*(a-1),a=m(-a/d)):a=m(a/d),c*=d),"number"==typeof t&&((d=0|t)<0?(p+=u*(o-1),o=m(-o/d)):o=m(o/d),u*=d),"number"==typeof r&&((d=0|r)<0?(p+=h*(s-1),s=m(-s/d)):s=m(s/d),h*=d),"number"==typeof i&&((d=0|i)<0?(p+=f*(l-1),l=m(-l/d)):l=m(l/d),f*=d),new n(this.data,a,o,s,l,c,u,h,f,p)},i.transpose=function(e,t,r,i){e=void 0===e?0:0|e,t=void 0===t?1:0|t,r=void 0===r?2:0|r,i=void 0===i?3:0|i;var a=this.shape,o=this.stride;return new n(this.data,a[e],a[t],a[r],a[i],o[e],o[t],o[r],o[i],this.offset)},i.pick=function(e,r,n,i){var a=[],o=[],s=this.offset;return"number"==typeof e&&e>=0?s=s+this.stride[0]*e|0:(a.push(this.shape[0]),o.push(this.stride[0])),"number"==typeof r&&r>=0?s=s+this.stride[1]*r|0:(a.push(this.shape[1]),o.push(this.stride[1])),"number"==typeof n&&n>=0?s=s+this.stride[2]*n|0:(a.push(this.shape[2]),o.push(this.stride[2])),"number"==typeof i&&i>=0?s=s+this.stride[3]*i|0:(a.push(this.shape[3]),o.push(this.stride[3])),(0,t[a.length+1])(this.data,a,o,s)},function(e,t,r,i){return new n(e,t[0],t[1],t[2],t[3],r[0],r[1],r[2],r[3],i)}},5:function(e,t,r){function n(e,t,r,n,i,a,o,s,l,c,u,h){this.data=e,this.shape=[t,r,n,i,a],this.stride=[o,s,l,c,u],this.offset=0|h}var i=n.prototype;return i.dtype=e,i.dimension=5,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(i,"order",{get:r}),i.set=function(t,r,n,i,a,o){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a,o):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a]=o},i.get=function(t,r,n,i,a){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a]},i.index=function(e,t,r,n,i){return this.offset+this.stride[0]*e+this.stride[1]*t+this.stride[2]*r+this.stride[3]*n+this.stride[4]*i},i.hi=function(e,t,r,i,a){return new n(this.data,"number"!=typeof e||e<0?this.shape[0]:0|e,"number"!=typeof t||t<0?this.shape[1]:0|t,"number"!=typeof r||r<0?this.shape[2]:0|r,"number"!=typeof i||i<0?this.shape[3]:0|i,"number"!=typeof a||a<0?this.shape[4]:0|a,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},i.lo=function(e,t,r,i,a){var o=this.offset,s=0,l=this.shape[0],c=this.shape[1],u=this.shape[2],h=this.shape[3],f=this.shape[4],p=this.stride[0],d=this.stride[1],m=this.stride[2],g=this.stride[3],y=this.stride[4];return"number"==typeof e&&e>=0&&(o+=p*(s=0|e),l-=s),"number"==typeof t&&t>=0&&(o+=d*(s=0|t),c-=s),"number"==typeof r&&r>=0&&(o+=m*(s=0|r),u-=s),"number"==typeof i&&i>=0&&(o+=g*(s=0|i),h-=s),"number"==typeof a&&a>=0&&(o+=y*(s=0|a),f-=s),new n(this.data,l,c,u,h,f,p,d,m,g,y,o)},i.step=function(e,t,r,i,a){var o=this.shape[0],s=this.shape[1],l=this.shape[2],c=this.shape[3],u=this.shape[4],h=this.stride[0],f=this.stride[1],p=this.stride[2],d=this.stride[3],m=this.stride[4],g=this.offset,y=0,v=Math.ceil;return"number"==typeof e&&((y=0|e)<0?(g+=h*(o-1),o=v(-o/y)):o=v(o/y),h*=y),"number"==typeof t&&((y=0|t)<0?(g+=f*(s-1),s=v(-s/y)):s=v(s/y),f*=y),"number"==typeof r&&((y=0|r)<0?(g+=p*(l-1),l=v(-l/y)):l=v(l/y),p*=y),"number"==typeof i&&((y=0|i)<0?(g+=d*(c-1),c=v(-c/y)):c=v(c/y),d*=y),"number"==typeof a&&((y=0|a)<0?(g+=m*(u-1),u=v(-u/y)):u=v(u/y),m*=y),new n(this.data,o,s,l,c,u,h,f,p,d,m,g)},i.transpose=function(e,t,r,i,a){e=void 0===e?0:0|e,t=void 0===t?1:0|t,r=void 0===r?2:0|r,i=void 0===i?3:0|i,a=void 0===a?4:0|a;var o=this.shape,s=this.stride;return new n(this.data,o[e],o[t],o[r],o[i],o[a],s[e],s[t],s[r],s[i],s[a],this.offset)},i.pick=function(e,r,n,i,a){var o=[],s=[],l=this.offset;return"number"==typeof e&&e>=0?l=l+this.stride[0]*e|0:(o.push(this.shape[0]),s.push(this.stride[0])),"number"==typeof r&&r>=0?l=l+this.stride[1]*r|0:(o.push(this.shape[1]),s.push(this.stride[1])),"number"==typeof n&&n>=0?l=l+this.stride[2]*n|0:(o.push(this.shape[2]),s.push(this.stride[2])),"number"==typeof i&&i>=0?l=l+this.stride[3]*i|0:(o.push(this.shape[3]),s.push(this.stride[3])),"number"==typeof a&&a>=0?l=l+this.stride[4]*a|0:(o.push(this.shape[4]),s.push(this.stride[4])),(0,t[o.length+1])(this.data,o,s,l)},function(e,t,r,i){return new n(e,t[0],t[1],t[2],t[3],t[4],r[0],r[1],r[2],r[3],r[4],i)}}};function l(e,t){var r=-1===t?"T":String(t),n=s[r];return-1===t?n(e):0===t?n(e,c[e][0]):n(e,c[e],o)}var c={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};e.exports=function(e,t,r,a){if(void 0===e)return(0,c.array[0])([]);"number"==typeof e&&(e=[e]),void 0===t&&(t=[e.length]);var o=t.length;if(void 0===r){r=new Array(o);for(var s=o-1,u=1;s>=0;--s)r[s]=u,u*=t[s]}if(void 0===a)for(a=0,s=0;s>>0;e.exports=function(e,t){if(isNaN(e)||isNaN(t))return NaN;if(e===t)return e;if(0===e)return t<0?-i:i;var r=n.hi(e),o=n.lo(e);return t>e==e>0?o===a?(r+=1,o=0):o+=1:0===o?(o=a,r-=1):o-=1,n.pack(o,r)}},8406:function(e,t){t.vertexNormals=function(e,t,r){for(var n=t.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;oa){var _=i[c],b=1/Math.sqrt(g*v);for(x=0;x<3;++x){var w=(x+1)%3,T=(x+2)%3;_[x]+=b*(y[w]*m[T]-y[T]*m[w])}}}for(o=0;oa)for(b=1/Math.sqrt(k),x=0;x<3;++x)_[x]*=b;else for(x=0;x<3;++x)_[x]=0}return i},t.faceNormals=function(e,t,r){for(var n=e.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;oa?1/Math.sqrt(p):0,c=0;c<3;++c)f[c]*=p;i[o]=f}return i}},4081:function(e){e.exports=function(e,t,r,n,i,a,o,s,l,c){var u=t+a+c;if(h>0){var h=Math.sqrt(u+1);e[0]=.5*(o-l)/h,e[1]=.5*(s-n)/h,e[2]=.5*(r-a)/h,e[3]=.5*h}else{var f=Math.max(t,a,c);h=Math.sqrt(2*f-u+1),t>=f?(e[0]=.5*h,e[1]=.5*(i+r)/h,e[2]=.5*(s+n)/h,e[3]=.5*(o-l)/h):a>=f?(e[0]=.5*(r+i)/h,e[1]=.5*h,e[2]=.5*(l+o)/h,e[3]=.5*(s-n)/h):(e[0]=.5*(n+s)/h,e[1]=.5*(o+l)/h,e[2]=.5*h,e[3]=.5*(r-i)/h)}return e}},9977:function(e,t,r){e.exports=function(e){var t=(e=e||{}).center||[0,0,0],r=e.rotation||[0,0,0,1],n=e.radius||1;t=[].slice.call(t,0,3),u(r=[].slice.call(r,0,4),r);var i=new h(r,t,Math.log(n));return i.setDistanceLimits(e.zoomMin,e.zoomMax),("eye"in e||"up"in e)&&i.lookAt(0,e.eye,e.center,e.up),i};var n=r(9215),i=r(6582),a=r(7399),o=r(7608),s=r(4081);function l(e,t,r){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2)+Math.pow(r,2))}function c(e,t,r,n){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2)+Math.pow(r,2)+Math.pow(n,2))}function u(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=c(r,n,i,a);o>1e-6?(e[0]=r/o,e[1]=n/o,e[2]=i/o,e[3]=a/o):(e[0]=e[1]=e[2]=0,e[3]=1)}function h(e,t,r){this.radius=n([r]),this.center=n(t),this.rotation=n(e),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var f=h.prototype;f.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},f.recalcMatrix=function(e){this.radius.curve(e),this.center.curve(e),this.rotation.curve(e);var t=this.computedRotation;u(t,t);var r=this.computedMatrix;a(r,t);var n=this.computedCenter,i=this.computedEye,o=this.computedUp,s=Math.exp(this.computedRadius[0]);i[0]=n[0]+s*r[2],i[1]=n[1]+s*r[6],i[2]=n[2]+s*r[10],o[0]=r[1],o[1]=r[5],o[2]=r[9];for(var l=0;l<3;++l){for(var c=0,h=0;h<3;++h)c+=r[l+4*h]*i[h];r[12+l]=-c}},f.getMatrix=function(e,t){this.recalcMatrix(e);var r=this.computedMatrix;if(t){for(var n=0;n<16;++n)t[n]=r[n];return t}return r},f.idle=function(e){this.center.idle(e),this.radius.idle(e),this.rotation.idle(e)},f.flush=function(e){this.center.flush(e),this.radius.flush(e),this.rotation.flush(e)},f.pan=function(e,t,r,n){t=t||0,r=r||0,n=n||0,this.recalcMatrix(e);var i=this.computedMatrix,a=i[1],o=i[5],s=i[9],c=l(a,o,s);a/=c,o/=c,s/=c;var u=i[0],h=i[4],f=i[8],p=u*a+h*o+f*s,d=l(u-=a*p,h-=o*p,f-=s*p);u/=d,h/=d,f/=d;var m=i[2],g=i[6],y=i[10],v=m*a+g*o+y*s,x=m*u+g*h+y*f,_=l(m-=v*a+x*u,g-=v*o+x*h,y-=v*s+x*f);m/=_,g/=_,y/=_;var b=u*t+a*r,w=h*t+o*r,T=f*t+s*r;this.center.move(e,b,w,T);var k=Math.exp(this.computedRadius[0]);k=Math.max(1e-4,k+n),this.radius.set(e,Math.log(k))},f.rotate=function(e,t,r,n){this.recalcMatrix(e),t=t||0,r=r||0;var i=this.computedMatrix,a=i[0],o=i[4],s=i[8],u=i[1],h=i[5],f=i[9],p=i[2],d=i[6],m=i[10],g=t*a+r*u,y=t*o+r*h,v=t*s+r*f,x=-(d*v-m*y),_=-(m*g-p*v),b=-(p*y-d*g),w=Math.sqrt(Math.max(0,1-Math.pow(x,2)-Math.pow(_,2)-Math.pow(b,2))),T=c(x,_,b,w);T>1e-6?(x/=T,_/=T,b/=T,w/=T):(x=_=b=0,w=1);var k=this.computedRotation,A=k[0],M=k[1],S=k[2],E=k[3],C=A*w+E*x+M*b-S*_,I=M*w+E*_+S*x-A*b,L=S*w+E*b+A*_-M*x,P=E*w-A*x-M*_-S*b;if(n){x=p,_=d,b=m;var z=Math.sin(n)/l(x,_,b);x*=z,_*=z,b*=z,P=P*(w=Math.cos(t))-(C=C*w+P*x+I*b-L*_)*x-(I=I*w+P*_+L*x-C*b)*_-(L=L*w+P*b+C*_-I*x)*b}var D=c(C,I,L,P);D>1e-6?(C/=D,I/=D,L/=D,P/=D):(C=I=L=0,P=1),this.rotation.set(e,C,I,L,P)},f.lookAt=function(e,t,r,n){this.recalcMatrix(e),r=r||this.computedCenter,t=t||this.computedEye,n=n||this.computedUp;var a=this.computedMatrix;i(a,t,r,n);var o=this.computedRotation;s(o,a[0],a[1],a[2],a[4],a[5],a[6],a[8],a[9],a[10]),u(o,o),this.rotation.set(e,o[0],o[1],o[2],o[3]);for(var l=0,c=0;c<3;++c)l+=Math.pow(r[c]-t[c],2);this.radius.set(e,.5*Math.log(Math.max(l,1e-6))),this.center.set(e,r[0],r[1],r[2])},f.translate=function(e,t,r,n){this.center.move(e,t||0,r||0,n||0)},f.setMatrix=function(e,t){var r=this.computedRotation;s(r,t[0],t[1],t[2],t[4],t[5],t[6],t[8],t[9],t[10]),u(r,r),this.rotation.set(e,r[0],r[1],r[2],r[3]);var n=this.computedMatrix;o(n,t);var i=n[15];if(Math.abs(i)>1e-6){var a=n[12]/i,l=n[13]/i,c=n[14]/i;this.recalcMatrix(e);var h=Math.exp(this.computedRadius[0]);this.center.set(e,a-n[2]*h,l-n[6]*h,c-n[10]*h),this.radius.idle(e)}else this.center.idle(e),this.radius.idle(e)},f.setDistance=function(e,t){t>0&&this.radius.set(e,Math.log(t))},f.setDistanceLimits=function(e,t){e=e>0?Math.log(e):-1/0,t=t>0?Math.log(t):1/0,t=Math.max(t,e),this.radius.bounds[0][0]=e,this.radius.bounds[1][0]=t},f.getDistanceLimits=function(e){var t=this.radius.bounds;return e?(e[0]=Math.exp(t[0][0]),e[1]=Math.exp(t[1][0]),e):[Math.exp(t[0][0]),Math.exp(t[1][0])]},f.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},f.fromJSON=function(e){var t=this.lastT(),r=e.center;r&&this.center.set(t,r[0],r[1],r[2]);var n=e.rotation;n&&this.rotation.set(t,n[0],n[1],n[2],n[3]);var i=e.distance;i&&i>0&&this.radius.set(t,Math.log(i)),this.setDistanceLimits(e.zoomMin,e.zoomMax)}},1371:function(e,t,r){var n=r(3233);e.exports=function(e,t,r){return n(r=typeof r<"u"?r+"":" ",t)+e}},3202:function(e){e.exports=function(e,t){t||(t=[0,""]),e=String(e);var r=parseFloat(e,10);return t[0]=r,t[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t}},3088:function(e,t,r){e.exports=function(e,t){for(var r=0|t.length,i=e.length,a=[new Array(r),new Array(r)],o=0;o0){o=a[c][r][0],l=c;break}s=o[1^l];for(var h=0;h<2;++h)for(var f=a[h][r],p=0;p0&&(o=d,s=m,l=h)}return i||o&&u(o,l),s}function f(e,r){var i=a[r][e][0],o=[e];u(i,r);for(var s=i[1^r];;){for(;s!==e;)o.push(s),s=h(o[o.length-2],s,!1);if(a[0][e].length+a[1][e].length===0)break;var l=o[o.length-1],c=e,f=o[1],p=h(l,c,!0);if(n(t[l],t[c],t[f],t[p])<0)break;o.push(e),s=h(l,c)}return o}for(o=0;o0;){a[0][o].length;var m=f(o,p);(l=m)[1]===l[l.length-1]?d.push.apply(d,m):(d.length>0&&c.push(d),d=m)}d.length>0&&c.push(d)}return c};var n=r(3140)},5609:function(e,t,r){e.exports=function(e,t){for(var r=n(e,t.length),i=new Array(t.length),a=new Array(t.length),o=[],s=0;s0;){i[p=o.pop()]=!1;var c=r[p];for(s=0;s0}))).length,g=new Array(m),y=new Array(m);for(p=0;p0;){var B=R.pop(),j=E[B];l(j,(function(e,t){return e-t}));var N,U=j.length,V=F[B];for(0===V&&(N=[q=d[B]]),p=0;p=0||(F[H]=1^V,R.push(H),0!==V)||O(q=d[H])||(q.reverse(),N.push(q))}0===V&&r.push(N)}return r};var n=r(3134),i=r(3088),a=r(5085),o=r(5250),s=r(8210),l=r(1682),c=r(5609);function u(e,t){for(var r=new Array(e),n=0;n0&&t[i]===r[0]))return 1;a=e[i-1]}for(var s=1;a;){var l=a.key,c=n(r,l[0],l[1]);if(l[0][0]0))return 0;s=-1,a=a.right}else if(c>0)a=a.left;else{if(!(c<0))return 0;s=1,a=a.right}}return s}}(g.slabs,g.coordinates);return 0===a.length?y:function(e,t){return function(r){return e(r[0],r[1])?0:t(r)}}(l(a),y)};var n=r(3250)[3],i=r(4209),a=r(3352),o=r(2478);function s(){return!0}function l(e){for(var t={},r=0;r=c?(k=1,v=c+2*f+d):v=f*(k=-f/c)+d):(k=0,p>=0?(A=0,v=d):-p>=h?(A=1,v=h+2*p+d):v=p*(A=-p/h)+d);else if(A<0)A=0,f>=0?(k=0,v=d):-f>=c?(k=1,v=c+2*f+d):v=f*(k=-f/c)+d;else{var M=1/T;v=(k*=M)*(c*k+u*(A*=M)+2*f)+A*(u*k+h*A+2*p)+d}else k<0?(_=h+p)>(x=u+f)?(b=_-x)>=(w=c-2*u+h)?(k=1,A=0,v=c+2*f+d):v=(k=b/w)*(c*k+u*(A=1-k)+2*f)+A*(u*k+h*A+2*p)+d:(k=0,_<=0?(A=1,v=h+2*p+d):p>=0?(A=0,v=d):v=p*(A=-p/h)+d):A<0?(_=c+f)>(x=u+p)?(b=_-x)>=(w=c-2*u+h)?(A=1,k=0,v=h+2*p+d):v=(k=1-(A=b/w))*(c*k+u*A+2*f)+A*(u*k+h*A+2*p)+d:(A=0,_<=0?(k=1,v=c+2*f+d):f>=0?(k=0,v=d):v=f*(k=-f/c)+d):(b=h+p-u-f)<=0?(k=0,A=1,v=h+2*p+d):b>=(w=c-2*u+h)?(k=1,A=0,v=c+2*f+d):v=(k=b/w)*(c*k+u*(A=1-k)+2*f)+A*(u*k+h*A+2*p)+d;var S=1-k-A;for(l=0;l0){var c=e[r-1];if(0===n(s,c)&&a(c)!==l){r-=1;continue}}e[r++]=s}}return e.length=r,e}},3233:function(e){var t,r="";e.exports=function(e,n){if("string"!=typeof e)throw new TypeError("expected a string");if(1===n)return e;if(2===n)return e+e;var i=e.length*n;if(t!==e||typeof t>"u")t=e,r="";else if(r.length>=i)return r.substr(0,i);for(;i>r.length&&n>1;)1&n&&(r+=e),n>>=1,e+=e;return r=(r+=e).substr(0,i)}},3025:function(e,t,r){e.exports=r.g.performance&&r.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(e){e.exports=function(e){for(var t=e.length,r=e[e.length-1],n=t,i=t-2;i>=0;--i){var a=r;(l=(s=e[i])-((r=a+s)-a))&&(e[--n]=r,r=l)}var o=0;for(i=n;i0){if(a<=0)return o;n=i+a}else{if(!(i<0))return o;if(a>=0)return o;n=-(i+a)}var s=l*n;return o>=s||o<=-s?o:d(e,t,r)},function(e,t,r,n){var i=e[0]-n[0],a=t[0]-n[0],o=r[0]-n[0],s=e[1]-n[1],l=t[1]-n[1],u=r[1]-n[1],h=e[2]-n[2],f=t[2]-n[2],p=r[2]-n[2],d=a*u,g=o*l,y=o*s,v=i*u,x=i*l,_=a*s,b=h*(d-g)+f*(y-v)+p*(x-_),w=(Math.abs(d)+Math.abs(g))*Math.abs(h)+(Math.abs(y)+Math.abs(v))*Math.abs(f)+(Math.abs(x)+Math.abs(_))*Math.abs(p),T=c*w;return b>T||-b>T?b:m(e,t,r,n)}];function y(e){var t=g[e.length];return t||(t=g[e.length]=p(e.length)),t.apply(void 0,e)}function v(e,t,r,n,i,a,o){return function(t,r,s,l,c){switch(arguments.length){case 0:case 1:return 0;case 2:return n(t,r);case 3:return i(t,r,s);case 4:return a(t,r,s,l);case 5:return o(t,r,s,l,c)}for(var u=new Array(arguments.length),h=0;h0&&o>0||a<0&&o<0)return!1;var s=n(r,e,t),l=n(i,e,t);return!(s>0&&l>0||s<0&&l<0)&&(0!==a||0!==o||0!==s||0!==l||function(e,t,r,n){for(var i=0;i<2;++i){var a=e[i],o=t[i],s=Math.min(a,o),l=Math.max(a,o),c=r[i],u=n[i],h=Math.min(c,u);if(Math.max(c,u)=n?(i=h,(l+=1)=n?(i=h,(l+=1)"u"&&(s=function(e){for(var t=e.length,r=0,n=0;n>1,c=t[2*l+1];if(c===a)return l;a>1,c=t[2*l+1];if(c===a)return l;a>1,c=t[2*l+1];if(c===a)return l;a0)-(e<0)},t.abs=function(e){var t=e>>31;return(e^t)-t},t.min=function(e,t){return t^(e^t)&-(e65535)<<4,t|=r=((e>>>=t)>255)<<3,t|=r=((e>>>=r)>15)<<2,(t|=r=((e>>>=r)>3)<<1)|(e>>>=r)>>1},t.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0},t.popCount=function(e){return 16843009*((e=(858993459&(e-=e>>>1&1431655765))+(e>>>2&858993459))+(e>>>4)&252645135)>>>24},t.countTrailingZeros=r,t.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,1+((e|=e>>>8)|e>>>16)},t.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},t.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var n=new Array(256);(function(e){for(var t=0;t<256;++t){var r=t,n=t,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;e[t]=n<>>8&255]<<16|n[e>>>16&255]<<8|n[e>>>24&255]},t.interleave2=function(e,t){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))<<1},t.deinterleave2=function(e,t){return(e=65535&((e=16711935&((e=252645135&((e=858993459&((e=e>>>t&1431655765)|e>>>1))|e>>>2))|e>>>4))|e>>>16))<<16>>16},t.interleave3=function(e,t,r){return e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2),(e|=(t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},t.deinterleave3=function(e,t){return(e=1023&((e=4278190335&((e=251719695&((e=3272356035&((e=e>>>t&1227133513)|e>>>2))|e>>>4))|e>>>8))|e>>>16))<<22>>22},t.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>r(e)+1}},2014:function(e,t,r){var n=r(3105),i=r(4623);function a(e,t){var r=e.length,n=e.length-t.length,i=Math.min;if(n)return n;switch(r){case 0:return 0;case 1:return e[0]-t[0];case 2:return(s=e[0]+e[1]-t[0]-t[1])||i(e[0],e[1])-i(t[0],t[1]);case 3:var a=e[0]+e[1],o=t[0]+t[1];if(s=a+e[2]-(o+t[2]))return s;var s,l=i(e[0],e[1]),c=i(t[0],t[1]);return(s=i(l,e[2])-i(c,t[2]))||i(l+e[2],a)-i(c+t[2],o);default:var u=e.slice(0);u.sort();var h=t.slice(0);h.sort();for(var f=0;f>1,s=a(e[o],t);s<=0?(0===s&&(i=o),r=o+1):s>0&&(n=o-1)}return i}function u(e,t){for(var r=new Array(e.length),i=0,o=r.length;i=e.length||0!==a(e[g],s)););}return r}function h(e,t){if(t<0)return[];for(var r=[],i=(1<>>u&1&&c.push(i[u]);t.push(c)}return s(t)},t.skeleton=h,t.boundary=function(e){for(var t=[],r=0,n=e.length;r>1:(e>>1)-1}function x(e){for(var t=y(e);;){var r=t,n=2*e+1,i=2*(e+1),a=e;if(n0;){var r=v(e);if(!(r>=0&&t0){var e=k[0];return g(0,M-1),M-=1,x(0),e}return-1}function w(e,t){var r=k[e];return c[r]===t?e:(c[r]=-1/0,_(e),b(),c[r]=t,_((M+=1)-1))}function T(e){if(!u[e]){u[e]=!0;var t=s[e],r=l[e];s[r]>=0&&(s[r]=t),l[t]>=0&&(l[t]=r),A[t]>=0&&w(A[t],m(t)),A[r]>=0&&w(A[r],m(r))}}var k=[],A=new Array(a);for(h=0;h>1;h>=0;--h)x(h);for(;;){var S=b();if(S<0||c[S]>r)break;T(S)}var E=[];for(h=0;h=0&&r>=0&&t!==r){var n=A[t],i=A[r];n!==i&&I.push([n,i])}})),i.unique(i.normalize(I)),{positions:E,edges:I}};var n=r(3250),i=r(2014)},1303:function(e,t,r){e.exports=function(e,t){var r,a,o,s;if(t[0][0]t[1][0]))return i(t,e);r=t[1],a=t[0]}if(e[0][0]e[1][0]))return-i(e,t);o=e[1],s=e[0]}var l=n(r,a,s),c=n(r,a,o);if(l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;if(l=n(s,o,a),c=n(s,o,r),l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;return a[0]-s[0]};var n=r(3250);function i(e,t){var r,i,a,o;if(t[0][0]t[1][0])){var s=Math.min(e[0][1],e[1][1]),l=Math.max(e[0][1],e[1][1]),c=Math.min(t[0][1],t[1][1]),u=Math.max(t[0][1],t[1][1]);return lu?s-u:l-u}r=t[1],i=t[0]}e[0][1]0)if(t[0]!==o[1][0])r=e,e=e.right;else{if(l=c(e.right,t))return l;e=e.left}else{if(t[0]!==o[1][0])return e;var l;if(l=c(e.right,t))return l;e=e.left}}return r}function u(e,t,r,n){this.y=e,this.index=t,this.start=r,this.closed=n}function h(e,t,r,n){this.x=e,this.segment=t,this.create=r,this.index=n}s.prototype.castUp=function(e){var t=n.le(this.coordinates,e[0]);if(t<0)return-1;this.slabs[t];var r=c(this.slabs[t],e),i=-1;if(r&&(i=r.value),this.coordinates[t]===e[0]){var s=null;if(r&&(s=r.key),t>0){var u=c(this.slabs[t-1],e);u&&(s?o(u.key,s)>0&&(s=u.key,i=u.value):(i=u.value,s=u.key))}var h=this.horizontal[t];if(h.length>0){var f=n.ge(h,e[1],l);if(f=h.length)return i;p=h[f]}}if(p.start)if(s){var d=a(s[0],s[1],[e[0],p.y]);s[0][0]>s[1][0]&&(d=-d),d>0&&(i=p.index)}else i=p.index;else p.y!==e[1]&&(i=p.index)}}}return i}},5202:function(e,t,r){var n=r(1944),i=r(8210);function a(e,t){var r=i(n(e,t),[t[t.length-1]]);return r[r.length-1]}function o(e,t,r,n){var i=-t/(n-t);i<0?i=0:i>1&&(i=1);for(var a=1-i,o=e.length,s=new Array(o),l=0;l0||i>0&&u<0){var h=o(s,u,l,i);r.push(h),n.push(h.slice())}u<0?n.push(l.slice()):u>0?r.push(l.slice()):(r.push(l.slice()),n.push(l.slice())),i=u}return{positive:r,negative:n}},e.exports.positive=function(e,t){for(var r=[],n=a(e[e.length-1],t),i=e[e.length-1],s=e[0],l=0;l0||n>0&&c<0)&&r.push(o(i,c,s,n)),c>=0&&r.push(s.slice()),n=c}return r},e.exports.negative=function(e,t){for(var r=[],n=a(e[e.length-1],t),i=e[e.length-1],s=e[0],l=0;l0||n>0&&c<0)&&r.push(o(i,c,s,n)),c<=0&&r.push(s.slice()),n=c}return r}},3387:function(e,t,r){var n;!function(){var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function a(e){return function(e,t){var r,n,o,s,l,c,u,h,f,p=1,d=e.length,m="";for(n=0;n=0),s.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,s.width?parseInt(s.width):0);break;case"e":r=s.precision?parseFloat(r).toExponential(s.precision):parseFloat(r).toExponential();break;case"f":r=s.precision?parseFloat(r).toFixed(s.precision):parseFloat(r);break;case"g":r=s.precision?String(Number(r.toPrecision(s.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=s.precision?r.substring(0,s.precision):r;break;case"t":r=String(!!r),r=s.precision?r.substring(0,s.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=s.precision?r.substring(0,s.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=s.precision?r.substring(0,s.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?m+=r:(!i.number.test(s.type)||h&&!s.sign?f="":(f=h?"+":"-",r=r.toString().replace(i.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",u=s.width-(f+r).length,l=s.width&&u>0?c.repeat(u):"",m+=s.align?f+r+l:"0"===c?f+l+r:l+f+r)}return m}(function(e){if(s[e])return s[e];for(var t,r=e,n=[],a=0;r;){if(null!==(t=i.text.exec(r)))n.push(t[0]);else if(null!==(t=i.modulo.exec(r)))n.push("%");else{if(null===(t=i.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){a|=1;var o=[],l=t[2],c=[];if(null===(c=i.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(o.push(c[1]);""!==(l=l.substring(c[0].length));)if(null!==(c=i.key_access.exec(l)))o.push(c[1]);else{if(null===(c=i.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");o.push(c[1])}t[2]=o}else a|=2;if(3===a)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}r=r.substring(t[0].length)}return s[e]=n}(e),arguments)}function o(e,t){return a.apply(null,[e].concat(t||[]))}var s=Object.create(null);t.sprintf=a,t.vsprintf=o,typeof window<"u"&&(window.sprintf=a,window.vsprintf=o,void 0!==(n=function(){return{sprintf:a,vsprintf:o}}.call(t,r,t,e))&&(e.exports=n))}()},3711:function(e,t,r){e.exports=function(e,t){if(e.dimension<=0)return{positions:[],cells:[]};if(1===e.dimension)return function(e,t){for(var r=i(e,t),n=r.length,a=new Array(n),o=new Array(n),s=0;sn|0},vertex:function(e,t,r,n,i,a,o,s,l,c,u,h,f){var p=(0|o)+(s<<1)+(l<<2)+(c<<3)|0;if(0!==p&&15!==p)switch(p){case 0:case 15:u.push([e-.5,t-.5]);break;case 1:u.push([e-.25-.25*(n+r-2*f)/(r-n),t-.25-.25*(i+r-2*f)/(r-i)]);break;case 2:u.push([e-.75-.25*(-n-r+2*f)/(n-r),t-.25-.25*(a+n-2*f)/(n-a)]);break;case 3:u.push([e-.5,t-.5-.5*(i+r+a+n-4*f)/(r-i+n-a)]);break;case 4:u.push([e-.25-.25*(a+i-2*f)/(i-a),t-.75-.25*(-i-r+2*f)/(i-r)]);break;case 5:u.push([e-.5-.5*(n+r+a+i-4*f)/(r-n+i-a),t-.5]);break;case 6:u.push([e-.5-.25*(-n-r+a+i)/(n-r+i-a),t-.5-.25*(-i-r+a+n)/(i-r+n-a)]);break;case 7:u.push([e-.75-.25*(a+i-2*f)/(i-a),t-.75-.25*(a+n-2*f)/(n-a)]);break;case 8:u.push([e-.75-.25*(-a-i+2*f)/(a-i),t-.75-.25*(-a-n+2*f)/(a-n)]);break;case 9:u.push([e-.5-.25*(n+r+-a-i)/(r-n+a-i),t-.5-.25*(i+r+-a-n)/(r-i+a-n)]);break;case 10:u.push([e-.5-.5*(-n-r-a-i+4*f)/(n-r+a-i),t-.5]);break;case 11:u.push([e-.25-.25*(-a-i+2*f)/(a-i),t-.75-.25*(i+r-2*f)/(r-i)]);break;case 12:u.push([e-.5,t-.5-.5*(-i-r-a-n+4*f)/(i-r+a-n)]);break;case 13:u.push([e-.75-.25*(n+r-2*f)/(r-n),t-.25-.25*(-a-n+2*f)/(a-n)]);break;case 14:u.push([e-.25-.25*(-n-r+2*f)/(n-r),t-.25-.25*(-i-r+2*f)/(i-r)])}},cell:function(e,t,r,n,i,a,o,s,l){i?s.push([e,t]):s.push([t,e])}});return function(e,t){var r=[],i=[];return n(e,r,i,t),{positions:r,cells:i}}}},o={}},665:function(e,t,r){var n=r(3202);e.exports=o;var i=96;function a(e,t){var r=n(getComputedStyle(e).getPropertyValue(t));return r[0]*o(r[1],e)}function o(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":return function(e,t){var r=document.createElement("div");r.style["font-size"]="128"+e,t.appendChild(r);var n=a(r,"font-size")/128;return t.removeChild(r),n}(e,t);case"em":return a(t,"font-size");case"rem":return a(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return i;case"cm":return i/2.54;case"mm":return i/25.4;case"pt":return i/72;case"pc":return i/6}return 1}},7261:function(e,t,r){e.exports=function(e){var t=(e=e||{}).center||[0,0,0],r=e.up||[0,1,0],n=e.right||h(r),i=e.radius||1,a=e.theta||0,u=e.phi||0;if(t=[].slice.call(t,0,3),r=[].slice.call(r,0,3),s(r,r),n=[].slice.call(n,0,3),s(n,n),"eye"in e){var p=e.eye,d=[p[0]-t[0],p[1]-t[1],p[2]-t[2]];o(n,d,r),c(n[0],n[1],n[2])<1e-6?n=h(r):s(n,n),i=c(d[0],d[1],d[2]);var m=l(r,d)/i,g=l(n,d)/i;u=Math.acos(m),a=Math.acos(g)}return i=Math.log(i),new f(e.zoomMin,e.zoomMax,t,r,n,i,a,u)};var n=r(9215),i=r(7608),a=r(6079),o=r(5911),s=r(3536),l=r(244);function c(e,t,r){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2)+Math.pow(r,2))}function u(e){return Math.min(1,Math.max(-1,e))}function h(e){var t=Math.abs(e[0]),r=Math.abs(e[1]),n=Math.abs(e[2]),i=[0,0,0];t>Math.max(r,n)?i[2]=1:r>Math.max(t,n)?i[0]=1:i[1]=1;for(var a=0,o=0,l=0;l<3;++l)a+=e[l]*e[l],o+=i[l]*e[l];for(l=0;l<3;++l)i[l]-=o/a*e[l];return s(i,i),i}function f(e,t,r,i,a,o,s,l){this.center=n(r),this.up=n(i),this.right=n(a),this.radius=n([o]),this.angle=n([s,l]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(e,t),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var c=0;c<16;++c)this.computedMatrix[c]=.5;this.recalcMatrix(0)}var p=f.prototype;p.setDistanceLimits=function(e,t){e=e>0?Math.log(e):-1/0,t=t>0?Math.log(t):1/0,t=Math.max(t,e),this.radius.bounds[0][0]=e,this.radius.bounds[1][0]=t},p.getDistanceLimits=function(e){var t=this.radius.bounds[0];return e?(e[0]=Math.exp(t[0][0]),e[1]=Math.exp(t[1][0]),e):[Math.exp(t[0][0]),Math.exp(t[1][0])]},p.recalcMatrix=function(e){this.center.curve(e),this.up.curve(e),this.right.curve(e),this.radius.curve(e),this.angle.curve(e);for(var t=this.computedUp,r=this.computedRight,n=0,i=0,a=0;a<3;++a)i+=t[a]*r[a],n+=t[a]*t[a];var l=Math.sqrt(n),u=0;for(a=0;a<3;++a)r[a]-=t[a]*i/n,u+=r[a]*r[a],t[a]/=l;var h=Math.sqrt(u);for(a=0;a<3;++a)r[a]/=h;var f=this.computedToward;o(f,t,r),s(f,f);var p=Math.exp(this.computedRadius[0]),d=this.computedAngle[0],m=this.computedAngle[1],g=Math.cos(d),y=Math.sin(d),v=Math.cos(m),x=Math.sin(m),_=this.computedCenter,b=g*v,w=y*v,T=x,k=-g*x,A=-y*x,M=v,S=this.computedEye,E=this.computedMatrix;for(a=0;a<3;++a){var C=b*r[a]+w*f[a]+T*t[a];E[4*a+1]=k*r[a]+A*f[a]+M*t[a],E[4*a+2]=C,E[4*a+3]=0}var I=E[1],L=E[5],P=E[9],z=E[2],D=E[6],O=E[10],R=L*O-P*D,F=P*z-I*O,B=I*D-L*z,j=c(R,F,B);for(R/=j,F/=j,B/=j,E[0]=R,E[4]=F,E[8]=B,a=0;a<3;++a)S[a]=_[a]+E[2+4*a]*p;for(a=0;a<3;++a){u=0;for(var N=0;N<3;++N)u+=E[a+4*N]*S[N];E[12+a]=-u}E[15]=1},p.getMatrix=function(e,t){this.recalcMatrix(e);var r=this.computedMatrix;if(t){for(var n=0;n<16;++n)t[n]=r[n];return t}return r};var d=[0,0,0];p.rotate=function(e,t,r,n){if(this.angle.move(e,t,r),n){this.recalcMatrix(e);var i=this.computedMatrix;d[0]=i[2],d[1]=i[6],d[2]=i[10];for(var o=this.computedUp,s=this.computedRight,l=this.computedToward,c=0;c<3;++c)i[4*c]=o[c],i[4*c+1]=s[c],i[4*c+2]=l[c];for(a(i,i,n,d),c=0;c<3;++c)o[c]=i[4*c],s[c]=i[4*c+1];this.up.set(e,o[0],o[1],o[2]),this.right.set(e,s[0],s[1],s[2])}},p.pan=function(e,t,r,n){t=t||0,r=r||0,n=n||0,this.recalcMatrix(e);var i=this.computedMatrix,a=(Math.exp(this.computedRadius[0]),i[1]),o=i[5],s=i[9],l=c(a,o,s);a/=l,o/=l,s/=l;var u=i[0],h=i[4],f=i[8],p=u*a+h*o+f*s,d=c(u-=a*p,h-=o*p,f-=s*p),m=(u/=d)*t+a*r,g=(h/=d)*t+o*r,y=(f/=d)*t+s*r;this.center.move(e,m,g,y);var v=Math.exp(this.computedRadius[0]);v=Math.max(1e-4,v+n),this.radius.set(e,Math.log(v))},p.translate=function(e,t,r,n){this.center.move(e,t||0,r||0,n||0)},p.setMatrix=function(e,t,r,n){var a=1;"number"==typeof r&&(a=0|r),(a<0||a>3)&&(a=1);var o=(a+2)%3;t||(this.recalcMatrix(e),t=this.computedMatrix);var s=t[a],l=t[a+4],h=t[a+8];if(n){var f=Math.abs(s),p=Math.abs(l),d=Math.abs(h),m=Math.max(f,p,d);f===m?(s=s<0?-1:1,l=h=0):d===m?(h=h<0?-1:1,s=l=0):(l=l<0?-1:1,s=h=0)}else{var g=c(s,l,h);s/=g,l/=g,h/=g}var y,v,x=t[o],_=t[o+4],b=t[o+8],w=x*s+_*l+b*h,T=c(x-=s*w,_-=l*w,b-=h*w),k=l*(b/=T)-h*(_/=T),A=h*(x/=T)-s*b,M=s*_-l*x,S=c(k,A,M);if(k/=S,A/=S,M/=S,this.center.jump(e,H,G,W),this.radius.idle(e),this.up.jump(e,s,l,h),this.right.jump(e,x,_,b),2===a){var E=t[1],C=t[5],I=t[9],L=E*x+C*_+I*b,P=E*k+C*A+I*M;y=R<0?-Math.PI/2:Math.PI/2,v=Math.atan2(P,L)}else{var z=t[2],D=t[6],O=t[10],R=z*s+D*l+O*h,F=z*x+D*_+O*b,B=z*k+D*A+O*M;y=Math.asin(u(R)),v=Math.atan2(B,F)}this.angle.jump(e,v,y),this.recalcMatrix(e);var j=t[2],N=t[6],U=t[10],V=this.computedMatrix;i(V,t);var q=V[15],H=V[12]/q,G=V[13]/q,W=V[14]/q,Z=Math.exp(this.computedRadius[0]);this.center.jump(e,H-j*Z,G-N*Z,W-U*Z)},p.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},p.idle=function(e){this.center.idle(e),this.up.idle(e),this.right.idle(e),this.radius.idle(e),this.angle.idle(e)},p.flush=function(e){this.center.flush(e),this.up.flush(e),this.right.flush(e),this.radius.flush(e),this.angle.flush(e)},p.setDistance=function(e,t){t>0&&this.radius.set(e,Math.log(t))},p.lookAt=function(e,t,r,n){this.recalcMatrix(e),t=t||this.computedEye,r=r||this.computedCenter;var i=(n=n||this.computedUp)[0],a=n[1],o=n[2],s=c(i,a,o);if(!(s<1e-6)){i/=s,a/=s,o/=s;var l=t[0]-r[0],h=t[1]-r[1],f=t[2]-r[2],p=c(l,h,f);if(!(p<1e-6)){l/=p,h/=p,f/=p;var d=this.computedRight,m=d[0],g=d[1],y=d[2],v=i*m+a*g+o*y,x=c(m-=v*i,g-=v*a,y-=v*o);if(!(x<.01&&(m=a*f-o*h,g=o*l-i*f,y=i*h-a*l,x=c(m,g,y),x<1e-6))){m/=x,g/=x,y/=x,this.up.set(e,i,a,o),this.right.set(e,m,g,y),this.center.set(e,r[0],r[1],r[2]),this.radius.set(e,Math.log(p));var _=a*y-o*g,b=o*m-i*y,w=i*g-a*m,T=c(_,b,w),k=i*l+a*h+o*f,A=m*l+g*h+y*f,M=(_/=T)*l+(b/=T)*h+(w/=T)*f,S=Math.asin(u(k)),E=Math.atan2(M,A),C=this.angle._state,I=C[C.length-1],L=C[C.length-2];I%=2*Math.PI;var P=Math.abs(I+2*Math.PI-E),z=Math.abs(I-E),D=Math.abs(I-2*Math.PI-E);P0?r.pop():new ArrayBuffer(e)}function d(e){return new Uint8Array(p(e),0,e)}function m(e){return new Uint16Array(p(2*e),0,e)}function g(e){return new Uint32Array(p(4*e),0,e)}function y(e){return new Int8Array(p(e),0,e)}function v(e){return new Int16Array(p(2*e),0,e)}function x(e){return new Int32Array(p(4*e),0,e)}function _(e){return new Float32Array(p(4*e),0,e)}function b(e){return new Float64Array(p(8*e),0,e)}function w(e){return o?new Uint8ClampedArray(p(e),0,e):d(e)}function T(e){return s?new BigUint64Array(p(8*e),0,e):null}function k(e){return l?new BigInt64Array(p(8*e),0,e):null}function A(e){return new DataView(p(e),0,e)}function M(e){e=n.nextPow2(e);var t=n.log2(e),r=h[t];return r.length>0?r.pop():new a(e)}t.free=function(e){if(a.isBuffer(e))h[n.log2(e.length)].push(e);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(e)&&(e=e.buffer),!e)return;var t=e.length||e.byteLength,r=0|n.log2(t);u[r].push(e)}},t.freeUint8=t.freeUint16=t.freeUint32=t.freeBigUint64=t.freeInt8=t.freeInt16=t.freeInt32=t.freeBigInt64=t.freeFloat32=t.freeFloat=t.freeFloat64=t.freeDouble=t.freeUint8Clamped=t.freeDataView=function(e){f(e.buffer)},t.freeArrayBuffer=f,t.freeBuffer=function(e){h[n.log2(e.length)].push(e)},t.malloc=function(e,t){if(void 0===t||"arraybuffer"===t)return p(e);switch(t){case"uint8":return d(e);case"uint16":return m(e);case"uint32":return g(e);case"int8":return y(e);case"int16":return v(e);case"int32":return x(e);case"float":case"float32":return _(e);case"double":case"float64":return b(e);case"uint8_clamped":return w(e);case"bigint64":return k(e);case"biguint64":return T(e);case"buffer":return M(e);case"data":case"dataview":return A(e);default:return null}return null},t.mallocArrayBuffer=p,t.mallocUint8=d,t.mallocUint16=m,t.mallocUint32=g,t.mallocInt8=y,t.mallocInt16=v,t.mallocInt32=x,t.mallocFloat32=t.mallocFloat=_,t.mallocFloat64=t.mallocDouble=b,t.mallocUint8Clamped=w,t.mallocBigUint64=T,t.mallocBigInt64=k,t.mallocDataView=A,t.mallocBuffer=M,t.clearCache=function(){for(var e=0;e<32;++e)c.UINT8[e].length=0,c.UINT16[e].length=0,c.UINT32[e].length=0,c.INT8[e].length=0,c.INT16[e].length=0,c.INT32[e].length=0,c.FLOAT[e].length=0,c.DOUBLE[e].length=0,c.BIGUINT64[e].length=0,c.BIGINT64[e].length=0,c.UINT8C[e].length=0,u[e].length=0,h[e].length=0}},1755:function(e){function t(e){this.roots=new Array(e),this.ranks=new Array(e);for(var t=0;t0&&(a=n.size),n.lineSpacing&&n.lineSpacing>0&&(o=n.lineSpacing),n.styletags&&n.styletags.breaklines&&(s.breaklines=!!n.styletags.breaklines),n.styletags&&n.styletags.bolds&&(s.bolds=!!n.styletags.bolds),n.styletags&&n.styletags.italics&&(s.italics=!!n.styletags.italics),n.styletags&&n.styletags.subscripts&&(s.subscripts=!!n.styletags.subscripts),n.styletags&&n.styletags.superscripts&&(s.superscripts=!!n.styletags.superscripts)),r.font=[n.fontStyle,n.fontVariant,n.fontWeight,a+"px",n.font].filter((function(e){return e})).join(" "),r.textAlign="start",r.textBaseline="alphabetic",r.direction="ltr",b(function(e,t,r,n,a,o){r=r.replace(/\n/g,""),r=!0===o.breaklines?r.replace(/\/g,"\n"):r.replace(/\/g," ");var s="",l=[];for(I=0;I-1?parseInt(e[1+i]):0,l=a>-1?parseInt(r[1+a]):0;s!==l&&(n=n.replace(F(),"?px "),z*=Math.pow(.75,l-s),n=n.replace("?px ",F())),P+=.25*k*(l-s)}if(!0===o.superscripts){var c=e.indexOf(d),h=r.indexOf(d),p=c>-1?parseInt(e[1+c]):0,m=h>-1?parseInt(r[1+h]):0;p!==m&&(n=n.replace(F(),"?px "),z*=Math.pow(.75,m-p),n=n.replace("?px ",F())),P-=.25*k*(m-p)}if(!0===o.bolds){var g=e.indexOf(u)>-1,v=r.indexOf(u)>-1;!g&&v&&(n=x?n.replace("italic ","italic bold "):"bold "+n),g&&!v&&(n=n.replace("bold ",""))}if(!0===o.italics){var x=e.indexOf(f)>-1,_=r.indexOf(f)>-1;!x&&_&&(n="italic "+n),x&&!_&&(n=n.replace("italic ",""))}t.font=n}for(C=0;C",a="",o=i.length,s=a.length,l=t[0]===d||t[0]===y,c=0,u=-s;c>-1&&!(-1===(c=r.indexOf(i,c))||(u=r.indexOf(a,c+o),-1===u)||u<=c);){for(var h=c;h=u)n[h]=null,r=r.substr(0,h)+" "+r.substr(h+1);else if(null!==n[h]){var f=n[h].indexOf(t[0]);-1===f?n[h]+=t:l&&(n[h]=n[h].substr(0,f+1)+(1+parseInt(n[h][f+1]))+n[h].substr(f+2))}var p=c+o,m=r.substr(p,u-p).indexOf(i);c=-1!==m?m:u+s}return n}function _(e,t,r,i){var c=function(e,t){var r=n(e,128);return t?a(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}(e,i),u=function(e,t,r){for(var n=t.textAlign||"start",i=t.textBaseline||"alphabetic",a=[1<<30,1<<30],o=[0,0],s=e.length,l=0;l=0?t[a]:i}))},has___:{value:x((function(t){var n=v(t);return n?r in n:e.indexOf(t)>=0}))},set___:{value:x((function(n,i){var a,o=v(n);return o?o[r]=i:(a=e.indexOf(n))>=0?t[a]=i:(a=e.length,t[a]=i,e[a]=n),this}))},delete___:{value:x((function(n){var i,a,o=v(n);return o?r in o&&delete o[r]:!((i=e.indexOf(n))<0||(a=e.length-1,e[i]=void 0,t[i]=t[a],e[i]=e[a],e.length=a,t.length=a,0))}))}})};m.prototype=Object.create(Object.prototype,{get:{value:function(e,t){return this.get___(e,t)},writable:!0,configurable:!0},has:{value:function(e){return this.has___(e)},writable:!0,configurable:!0},set:{value:function(e,t){return this.set___(e,t)},writable:!0,configurable:!0},delete:{value:function(e){return this.delete___(e)},writable:!0,configurable:!0}}),"function"==typeof r?function(){function n(){this instanceof m||_();var e,n=new r,i=void 0,a=!1;return e=t?function(e,t){return n.set(e,t),n.has(e)||(i||(i=new m),i.set(e,t)),this}:function(e,t){if(a)try{n.set(e,t)}catch{i||(i=new m),i.set___(e,t)}else n.set(e,t);return this},Object.create(m.prototype,{get___:{value:x((function(e,t){return i?n.has(e)?n.get(e):i.get___(e,t):n.get(e,t)}))},has___:{value:x((function(e){return n.has(e)||!!i&&i.has___(e)}))},set___:{value:x(e)},delete___:{value:x((function(e){var t=!!n.delete(e);return i&&i.delete___(e)||t}))},permitHostObjects___:{value:x((function(e){if(e!==g)throw new Error("bogus call to permitHostObjects___");a=!0}))}})}t&&typeof Proxy<"u"&&(Proxy=void 0),n.prototype=m.prototype,e.exports=n,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),e.exports=m)}function g(e){e.permitHostObjects___&&e.permitHostObjects___(g)}function y(e){return!(e.substr(0,8)==l&&"___"===e.substr(e.length-3))}function v(e){if(e!==Object(e))throw new TypeError("Not an object: "+e);var t=e[c];if(t&&t.key===e)return t;if(s(e)){t={key:e};try{return o(e,c,{value:t,writable:!1,enumerable:!1,configurable:!1}),t}catch{return}}}function x(e){return e.prototype=null,Object.freeze(e)}function _(){!p&&typeof console<"u"&&(p=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}}()},236:function(e,t,r){var n=r(8284);e.exports=function(){var e={};return function(t){if(("object"!=typeof t||null===t)&&"function"!=typeof t)throw new Error("Weakmap-shim: Key must be object");var r=t.valueOf(e);return r&&r.identity===e?r:n(t,e)}}},8284:function(e){e.exports=function(e,t){var r={identity:t},n=e.valueOf;return Object.defineProperty(e,"valueOf",{value:function(e){return e!==t?n.apply(this,arguments):r},writable:!0}),r}},606:function(e,t,r){var n=r(236);e.exports=function(){var e=n();return{get:function(t,r){var n=e(t);return n.hasOwnProperty("value")?n.value:r},set:function(t,r){return e(t).value=r,this},has:function(t){return"value"in e(t)},delete:function(t){return delete e(t).value}}}},3349:function(e){var t,r,n=function(){return function(e,t,r,n,i,a){var o=e[0],s=r[0],l=[0],c=s;n|=0;var u=0,h=s;for(u=0;u=0!=p>=0&&i.push(l[0]+.5+.5*(f+p)/(f-p)),n+=h,++l[0]}}};e.exports=(t=n.bind(void 0,{funcName:"zeroCrossings"}),r={},function(e,n,i){var a=e.dtype,o=e.order,s=[a,o.join()].join(),l=r[s];return l||(r[s]=l=t([a,o])),l(e.shape.slice(0),e.data,e.stride,0|e.offset,n,i)})},781:function(e,t,r){e.exports=function(e,t){var r=[];return t=+t||0,n(e.hi(e.shape[0]-1),r,t),r};var n=r(3349)},7790:function(){}},r={};function n(t){var i=r[t];if(void 0!==i)return i.exports;var a=r[t]={id:t,loaded:!1,exports:{}};return e[t].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch{if("object"==typeof window)return window}}(),n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e};var i=n(1964);t.exports=i}()}}),Xd=m({"node_modules/color-name/index.js"(e,t){t.exports={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]}}}),$d=m({"node_modules/color-normalize/node_modules/color-parse/index.js"(e,t){var r=Xd();t.exports=function(e){var t,i,a=[],o=1;if("string"==typeof e)if(e=e.toLowerCase(),r[e])a=r[e].slice(),i="rgb";else if("transparent"===e)o=0,i="rgb",a=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var s=e.slice(1);o=1,(u=s.length)<=4?(a=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],4===u&&(o=parseInt(s[3]+s[3],16)/255)):(a=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],8===u&&(o=parseInt(s[6]+s[7],16)/255)),a[0]||(a[0]=0),a[1]||(a[1]=0),a[2]||(a[2]=0),i="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var l=t[1],c="rgb"===l;i=s=l.replace(/a$/,"");var u="cmyk"===s?4:"gray"===s?1:3;a=t[2].trim().split(/\s*[,\/]\s*|\s+/).map((function(e,t){if(/%$/.test(e))return t===u?parseFloat(e)/100:"rgb"===s?255*parseFloat(e)/100:parseFloat(e);if("h"===s[t]){if(/deg$/.test(e))return parseFloat(e);if(void 0!==n[e])return n[e]}return parseFloat(e)})),l===s&&a.push(1),o=c||void 0===a[u]?1:a[u],a=a.slice(0,u)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(a=e.match(/([0-9]+)/g).map((function(e){return parseFloat(e)})),i=e.match(/([a-z])/gi).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(a=[e[0],e[1],e[2]],i="rgb",o=4===e.length?e[3]:1):e instanceof Object&&(null!=e.r||null!=e.red||null!=e.R?(i="rgb",a=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(i="hsl",a=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),o=e.a||e.alpha||e.opacity||1,null!=e.opacity&&(o/=100)):(i="rgb",a=[e>>>16,(65280&e)>>>8,255&e]);return{space:i,values:a,alpha:o}};var n={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}}),Kd=m({"node_modules/color-normalize/node_modules/color-rgba/index.js"(e,t){var r=$d();t.exports=function(e){Array.isArray(e)&&e.raw&&(e=String.raw.apply(null,arguments));var t,n=r(e);if(!n.space)return[];var i=[0,0,0],a="h"===n.space[0]?[360,100,100]:[255,255,255];return(t=Array(3))[0]=Math.min(Math.max(n.values[0],i[0]),a[0]),t[1]=Math.min(Math.max(n.values[1],i[1]),a[1]),t[2]=Math.min(Math.max(n.values[2],i[2]),a[2]),"h"===n.space[0]&&(t=function(e){var t,r,n,i,a,o=e[0]/360,s=e[1]/100,l=e[2]/100,c=0;if(0===s)return[a=255*l,a,a];for(t=2*l-(r=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];c<3;)(n=o+1/3*-(c-1))<0?n++:n>1&&n--,a=6*n<1?t+6*(r-t)*n:2*n<1?r:3*n<2?t+(r-t)*(2/3-n)*6:t,i[c++]=255*a;return i}(t)),t.push(Math.min(Math.max(n.alpha,0),1)),t}}}),Jd=m({"node_modules/clamp/index.js"(e,t){t.exports=function(e,t,r){return tr?r:e:et?t:e}}}),Qd=m({"node_modules/dtype/index.js"(e,t){t.exports=function(e){switch(e){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}}}),em=m({"node_modules/color-normalize/index.js"(e,t){var r=Kd(),n=Jd(),i=Qd();t.exports=function(e,t){("float"===t||!t)&&(t="array"),"uint"===t&&(t="uint8"),"uint_clamped"===t&&(t="uint8_clamped");var a,o=new(i(t))(4),s="uint8"!==t&&"uint8_clamped"!==t;return(!e.length||"string"==typeof e)&&((e=r(e))[0]/=255,e[1]/=255,e[2]/=255),(a=e)instanceof Uint8Array||a instanceof Uint8ClampedArray||Array.isArray(a)&&(a[0]>1||0===a[0])&&(a[1]>1||0===a[1])&&(a[2]>1||0===a[2])&&(!a[3]||a[3]>1)?(o[0]=e[0],o[1]=e[1],o[2]=e[2],o[3]=null!=e[3]?e[3]:255,s&&(o[0]/=255,o[1]/=255,o[2]/=255,o[3]/=255),o):(s?(o[0]=e[0],o[1]=e[1],o[2]=e[2],o[3]=null!=e[3]?e[3]:1):(o[0]=n(Math.floor(255*e[0]),0,255),o[1]=n(Math.floor(255*e[1]),0,255),o[2]=n(Math.floor(255*e[2]),0,255),o[3]=null==e[3]?255:n(Math.floor(255*e[3]),0,255)),o)}}}),tm=m({"src/lib/str2rgbarray.js"(e,t){var r=em();t.exports=function(e){return e?r(e):[0,0,0,1]}}}),rm=m({"src/lib/gl_format_color.js"(e,t){var r=M(),n=F(),i=em(),a=Yt(),o=G().defaultLine,s=I().isArrayOrTypedArray,l=i(o);function c(e,t){var r=e;return r[3]*=t,r}function u(e){if(r(e))return l;var t=i(e);return t.length?t:l}function h(e){return r(e)?e:1}t.exports={formatColor:function(e,t,r){var n=e.color;n&&n._inputArray&&(n=n._inputArray);var o,f,p,d,m,g=s(n),y=s(t),v=a.extractOpts(e),x=[];if(o=void 0!==v.colorscale?a.makeColorScaleFuncFromTrace(e):u,f=g?function(e,t){return void 0===e[t]?l:i(o(e[t]))}:u,p=y?function(e,t){return void 0===e[t]?1:h(e[t])}:h,g||y)for(var _=0;_0){var f=i.c2l(u);i._lowerLogErrorBound||(i._lowerLogErrorBound=f),i._lowerErrorBound=Math.min(i._lowerLogErrorBound,f)}}else o[s]=[-l[0]*n,l[1]*n]}return o}t.exports=function(e,t,r){var i=[n(e.x,e.error_x,t[0],r.xaxis),n(e.y,e.error_y,t[1],r.yaxis),n(e.z,e.error_z,t[2],r.zaxis)],a=function(e){for(var t=0;t-1?-1:e.indexOf("right")>-1?1:0}function x(e){return null==e?0:e.indexOf("top")>-1?-1:e.indexOf("bottom")>-1?1:0}function _(e,t){return t(4*e)}function b(e){return f[e]}function w(e,t,r,n,i){var a=null;if(s.isArrayOrTypedArray(e)){a=[];for(var o=0;o=0){var E=function(e,t,r){var n,i=(r+1)%3,a=(r+2)%3,s=[],l=[];for(n=0;n=0&&h("surfacecolor",p||d);for(var m=["x","y","z"],g=0;g<3;++g){var y="projection."+m[g];h(y+".show")&&(h(y+".opacity"),h(y+".scale"))}var v=r.getComponentMethod("errorbars","supplyDefaults");v(e,t,p||d||c,{axis:"z"}),v(e,t,p||d||c,{axis:"y",inherit:"z"}),v(e,t,p||d||c,{axis:"x",inherit:"z"})}else t.visible=!1}}}),cm=m({"src/traces/scatter3d/calc.js"(e,t){var r=ai(),n=ii();t.exports=function(e,t){var i=[{x:!1,y:!1,trace:t,t:{}}];return r(i,t),n(e,t),i}}}),um=m({"node_modules/get-canvas-context/index.js"(e,t){t.exports=function(e,t){if("string"!=typeof e)throw new TypeError("must specify type string");if(t=t||{},typeof document>"u"&&!t.canvas)return null;var r=t.canvas||document.createElement("canvas");"number"==typeof t.width&&(r.width=t.width),"number"==typeof t.height&&(r.height=t.height);var n,i=t;try{var a=[e];0===e.indexOf("webgl")&&a.push("experimental-"+e);for(var o=0;o/g," "));l[c]=p,u.tickmode=h}}for(t.ticks=l,c=0;c<3;++c)for(a[c]=.5*(e.glplot.bounds[0][c]+e.glplot.bounds[1][c]),d=0;d<2;++d)t.bounds[d][c]=e.glplot.bounds[d][c];e.contourLevels=function(e){for(var t=new Array(3),r=0;r<3;++r){for(var n=e[r],i=new Array(n.length),a=0;ar.deltaY?1.1:.9090909090909091,a=e.glplot.getAspectratio();e.glplot.setAspectratio({x:n*a.x,y:n*a.y,z:n*a.z})}i(e)}}),!!l&&{passive:!1}),e.glplot.canvas.addEventListener("mousemove",(function(){if(!1!==e.fullSceneLayout.dragmode&&0!==e.camera.mouseListener.buttons){var t=n();e.graphDiv.emit("plotly_relayouting",t)}})),e.staticMode||e.glplot.canvas.addEventListener("webglcontextlost",(function(r){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:r,layer:e.id})}),!1)),e.glplot.oncontextloss=function(){e.recoverContext()},e.glplot.onrender=function(){e.render()},!0},T.render=function(){var e,t=this,r=t.graphDiv,n=t.svgContainer,i=t.container.getBoundingClientRect();r._fullLayout._calcInverseTransform(r);var a=r._fullLayout._invScaleX,o=r._fullLayout._invScaleY,s=i.width*a,l=i.height*o;n.setAttributeNS(null,"viewBox","0 0 "+s+" "+l),n.setAttributeNS(null,"width",s),n.setAttributeNS(null,"height",l),x(t),t.glplot.axes.update(t.axesOptions);for(var c=Object.keys(t.traces),h=null,d=t.glplot.selection,m=0;m")):"isosurface"===e.type||"volume"===e.type?(T.valueLabel=f.hoverLabelText(t._mockAxis,t._mockAxis.d2l(d.traceCoordinate[3]),e.valuehoverformat),E.push("value: "+T.valueLabel),d.textLabel&&E.push(d.textLabel),S=E.join("
")):S=d.textLabel;var C={x:d.traceCoordinate[0],y:d.traceCoordinate[1],z:d.traceCoordinate[2],data:_._input,fullData:_,curveNumber:_.index,pointNumber:w};p.appendArrayPointValue(C,_,w),e._module.eventData&&(C=_._module.eventData(C,d,_,{},w));var I={points:[C]};if(t.fullSceneLayout.hovermode){var L=[];p.loneHover({trace:_,x:(.5+.5*v[0]/v[3])*s,y:(.5-.5*v[1]/v[3])*l,xLabel:T.xLabel,yLabel:T.yLabel,zLabel:T.zLabel,text:S,name:h.name,color:p.castHoverOption(_,w,"bgcolor")||h.color,borderColor:p.castHoverOption(_,w,"bordercolor"),fontFamily:p.castHoverOption(_,w,"font.family"),fontSize:p.castHoverOption(_,w,"font.size"),fontColor:p.castHoverOption(_,w,"font.color"),nameLength:p.castHoverOption(_,w,"namelength"),textAlign:p.castHoverOption(_,w,"align"),hovertemplate:u.castOption(_,w,"hovertemplate"),hovertemplateLabels:u.extendFlat({},C,T),eventData:[C]},{container:n,gd:r,inOut_bbox:L}),C.bbox=L[0]}d.distance<5&&(d.buttons||b)?r.emit("plotly_click",I):r.emit("plotly_hover",I),this.oldEventData=I}else p.loneUnhover(n),this.oldEventData&&r.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;t.drawAnnotations(t)},T.recoverContext=function(){var e=this;e.glplot.dispose();var t=function(){e.glplot.gl.isContextLost()?requestAnimationFrame(t):e.initializeGLPlot()?e.plot.apply(e,e.plotArgs):u.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(t)};var A=["xaxis","yaxis","zaxis"];function M(e,t,r){for(var n=e.fullSceneLayout,i=0;i<3;i++){var a=A[i],o=a.charAt(0),s=n[a],l=t[o],c=t[o+"calendar"],h=t["_"+o+"length"];if(u.isArrayOrTypedArray(l))for(var f,p=0;p<(h||l.length);p++)if(u.isArrayOrTypedArray(l[p]))for(var d=0;dg[1][o])g[0][o]=-1,g[1][o]=1;else{var L=g[1][o]-g[0][o];g[0][o]-=L/32,g[1][o]+=L/32}if(x=[g[0][o],g[1][o]],x=_(x,l),g[0][o]=x[0],g[1][o]=x[1],l.isReversed()){var P=g[0][o];g[0][o]=g[1][o],g[1][o]=P}}else x=l.range,g[0][o]=l.r2l(x[0]),g[1][o]=l.r2l(x[1]);g[0][o]===g[1][o]&&(g[0][o]-=1,g[1][o]+=1),y[o]=g[1][o]-g[0][o],l.range=[g[0][o],g[1][o]],l.limitRange(),n.glplot.setBounds(o,{min:l.range[0]*p[o],max:l.range[1]*p[o]})}var z,D=u.aspectmode;if("cube"===D)z=[1,1,1];else if("manual"===D){var O=u.aspectratio;z=[O.x,O.y,O.z]}else{if("auto"!==D&&"data"!==D)throw new Error("scene.js aspectRatio was not one of the enumerated types");var R=[1,1,1];for(o=0;o<3;++o){var F=v[c=(l=u[A[o]]).type];R[o]=Math.pow(F.acc,1/F.count)/p[o]}z="data"===D||Math.max.apply(null,R)/Math.min.apply(null,R)<=4?R:[1,1,1]}u.aspectratio.x=h.aspectratio.x=z[0],u.aspectratio.y=h.aspectratio.y=z[1],u.aspectratio.z=h.aspectratio.z=z[2],n.glplot.setAspectratio(u.aspectratio),n.viewInitial.aspectratio||(n.viewInitial.aspectratio={x:u.aspectratio.x,y:u.aspectratio.y,z:u.aspectratio.z}),n.viewInitial.aspectmode||(n.viewInitial.aspectmode=u.aspectmode);var B=u.domain||null,j=t._size||null;if(B&&j){var N=n.container.style;N.position="absolute",N.left=j.l+B.x[0]*j.w+"px",N.top=j.t+(1-B.y[1])*j.h+"px",N.width=j.w*(B.x[1]-B.x[0])+"px",N.height=j.h*(B.y[1]-B.y[0])+"px"}n.glplot.redraw()}},T.destroy=function(){var e=this;e.glplot&&(e.camera.mouseListener.enabled=!1,e.container.removeEventListener("wheel",e.camera.wheelListener),e.camera=null,e.glplot.dispose(),e.container.parentNode.removeChild(e.container),e.glplot=null)},T.getCamera=function(){var e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),function(e){return{up:{x:e.up[0],y:e.up[1],z:e.up[2]},center:{x:e.center[0],y:e.center[1],z:e.center[2]},eye:{x:e.eye[0],y:e.eye[1],z:e.eye[2]},projection:{type:!0===e._ortho?"orthographic":"perspective"}}}(e.camera)},T.setViewport=function(e){var t=this,r=e.camera;t.camera.lookAt.apply(this,function(e){return[[e.eye.x,e.eye.y,e.eye.z],[e.center.x,e.center.y,e.center.z],[e.up.x,e.up.y,e.up.z]]}(r)),t.glplot.setAspectratio(e.aspectratio),"orthographic"===r.projection.type!==t.camera._ortho&&(t.glplot.redraw(),t.glplot.clearRGBA(),t.glplot.dispose(),t.initializeGLPlot())},T.isCameraChanged=function(e){var t,r,n,i,a,o,s=this.getCamera(),l=u.nestedProperty(e,this.id+".camera").get(),c=!1;if(void 0===l)c=!0;else{for(var h=0;h<3;h++)for(var f=0;f<3;f++)if(t=s,i=f,void 0,void 0,o=["x","y","z"],!(r=l)[(a=["up","center","eye"])[n=h]]||t[a[n]][o[i]]!==r[a[n]][o[i]]){c=!0;break}(!l.projection||s.projection&&s.projection.type!==l.projection.type)&&(c=!0)}return c},T.isAspectChanged=function(e){var t=this.glplot.getAspectratio(),r=u.nestedProperty(e,this.id+".aspectratio").get();return void 0===r||r.x!==t.x||r.y!==t.y||r.z!==t.z},T.saveLayout=function(e){var t,r,n,i,a,o,s=this,l=s.fullLayout,h=s.isCameraChanged(e),f=s.isAspectChanged(e),p=h||f;if(p){var d={};h&&(t=s.getCamera(),n=(r=u.nestedProperty(e,s.id+".camera")).get(),d[s.id+".camera"]=n),f&&(i=s.glplot.getAspectratio(),o=(a=u.nestedProperty(e,s.id+".aspectratio")).get(),d[s.id+".aspectratio"]=o),c.call("_storeDirectGUIEdit",e,l._preGUI,d),h&&(r.set(t),u.nestedProperty(l,s.id+".camera").set(t)),f&&(a.set(i),u.nestedProperty(l,s.id+".aspectratio").set(i),s.glplot.redraw())}return p},T.updateFx=function(e,t){var r=this,n=r.camera;if(n)if("orbit"===e)n.mode="orbit",n.keyBindingMode="rotate";else if("turntable"===e){n.up=[0,0,1],n.mode="turntable",n.keyBindingMode="rotate";var i=r.graphDiv,a=i._fullLayout,o=r.fullSceneLayout.camera,s=o.up.x,l=o.up.y,h=o.up.z;if(h/Math.sqrt(s*s+l*l+h*h)<.999){var f=r.id+".camera.up",p={x:0,y:0,z:1},d={};d[f]=p;var m=i.layout;c.call("_storeDirectGUIEdit",m,a._preGUI,d),o.up=p,u.nestedProperty(m,f).set(p)}}else n.keyBindingMode=e;r.fullSceneLayout.hovermode=t},T.toImage=function(e){var t=this;e||(e="png"),t.staticMode&&t.container.appendChild(r),t.glplot.redraw();var n=t.glplot.gl,i=n.drawingBufferWidth,a=n.drawingBufferHeight;n.bindFramebuffer(n.FRAMEBUFFER,null);var o=new Uint8Array(i*a*4);n.readPixels(0,0,i,a,n.RGBA,n.UNSIGNED_BYTE,o),function(e,t,r){for(var n=0,i=r-1;n0)for(var s=255/o,l=0;l<3;++l)e[a+l]=Math.min(s*e[a+l],255)}}(o,i,a);var s=document.createElement("canvas");s.width=i,s.height=a;var l,c=s.getContext("2d",{willReadFrequently:!0}),u=c.createImageData(i,a);switch(u.data.set(o),c.putImageData(u,0,0),e){case"jpeg":l=s.toDataURL("image/jpeg");break;case"webp":l=s.toDataURL("image/webp");break;default:l=s.toDataURL("image/png")}return t.staticMode&&t.container.removeChild(r),l},T.setConvert=function(){for(var e=0;e<3;e++){var t=this.fullSceneLayout[A[e]];f.setConvert(t,this.fullLayout),t.setScale=u.noop}},T.make4thDimension=function(){var e=this,t=e.graphDiv._fullLayout;e._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},f.setConvert(e._mockAxis,t)},t.exports=w}}),ym=m({"src/plots/gl3d/layout/attributes.js"(e,t){t.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}}),vm=m({"src/plots/gl3d/layout/axis_attributes.js"(e,t){var r=W(),n=Lt(),i=B().extendFlat,a=De().overrideAll;t.exports=a({visible:n.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:r.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:n.color,categoryorder:n.categoryorder,categoryarray:n.categoryarray,title:{text:n.title.text,font:n.title.font},type:i({},n.type,{values:["-","linear","log","date","category"]}),autotypenumbers:n.autotypenumbers,autorange:n.autorange,autorangeoptions:{minallowed:n.autorangeoptions.minallowed,maxallowed:n.autorangeoptions.maxallowed,clipmin:n.autorangeoptions.clipmin,clipmax:n.autorangeoptions.clipmax,include:n.autorangeoptions.include,editType:"plot"},rangemode:n.rangemode,minallowed:n.minallowed,maxallowed:n.maxallowed,range:i({},n.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:n.minor.tickmode,nticks:n.nticks,tick0:n.tick0,dtick:n.dtick,tickvals:n.tickvals,ticktext:n.ticktext,ticks:n.ticks,mirror:n.mirror,ticklen:n.ticklen,tickwidth:n.tickwidth,tickcolor:n.tickcolor,showticklabels:n.showticklabels,labelalias:n.labelalias,tickfont:n.tickfont,tickangle:n.tickangle,tickprefix:n.tickprefix,showtickprefix:n.showtickprefix,ticksuffix:n.ticksuffix,showticksuffix:n.showticksuffix,showexponent:n.showexponent,exponentformat:n.exponentformat,minexponent:n.minexponent,separatethousands:n.separatethousands,tickformat:n.tickformat,tickformatstops:n.tickformatstops,hoverformat:n.hoverformat,showline:n.showline,linecolor:n.linecolor,linewidth:n.linewidth,showgrid:n.showgrid,gridcolor:i({},n.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:n.gridwidth,zeroline:n.zeroline,zerolinecolor:n.zerolinecolor,zerolinewidth:n.zerolinewidth},"plot","from-root")}}),xm=m({"src/plots/gl3d/layout/layout_attributes.js"(e,t){var r=vm(),n=Ma().attributes,i=B().extendFlat,a=ct().counterRegex;function o(e,t,r){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}t.exports={_arrayAttrRegexps:[a("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:i(o(0,0,1),{}),center:i(o(0,0,0),{}),eye:i(o(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:n({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:r,yaxis:r,zaxis:r,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot"}}}),_m=m({"src/plots/gl3d/layout/axis_defaults.js"(e,t){var r=F().mix,n=ct(),i=vt(),a=vm(),o=wi(),s=Ai(),l=["xaxis","yaxis","zaxis"],c=13600/187;t.exports=function(e,t,u){var h,f;function p(e,t){return n.coerce(h,f,a,e,t)}for(var d=0;d.999)&&(g="turntable")}else g="turntable";r("dragmode",g),r("hovermode",a.getDfltFromLayout("hovermode"))}t.exports=function(e,t,n){var i=t._basePlotModules.length>1;a(e,t,n,{type:c,attributes:s,handleDefaults:u,fullLayout:t,font:t.font,fullData:n,getDfltFromLayout:function(t){if(!i&&r.validate(e[t],s[t]))return e[t]},autotypenumbersDflt:t.autotypenumbers,paper_bgcolor:t.paper_bgcolor,calendar:t.calendar})}}}),wm=m({"src/plots/gl3d/index.js"(e){var t=De().overrideAll,r=U(),n=gm(),i=Tt().getSubplotData,a=ct(),o=Mt(),s="gl3d",l="scene";e.name=s,e.attr=l,e.idRoot=l,e.idRegex=e.attrRegex=a.counterRegex("scene"),e.attributes=ym(),e.layoutAttributes=xm(),e.baseLayoutAttrOverrides=t({hoverlabel:r.hoverlabel},"plot","nested"),e.supplyLayoutDefaults=bm(),e.plot=function(e){for(var t=e._fullLayout,r=e._fullData,a=t._subplots[s],o=0;o0){r=p[n];break}return r}function y(e,t){if(!(e<1||t<1)){for(var r=m(e),n=m(t),i=1,a=0;a_;)r--,r/=g(r),++r1?n:1},f.refineCoords=function(e){for(var t=this.dataScaleX,r=this.dataScaleY,i=e[0].shape[0],a=e[0].shape[1],o=0|Math.floor(e[0].shape[0]*t+1),s=0|Math.floor(e[0].shape[1]*r+1),l=1+i+1,c=1+a+1,u=n(new Float32Array(l*c),[l,c]),h=[1/t,0,0,0,1/r,0,0,0,1],f=0;f0&&null!==this.contourStart[e]&&null!==this.contourEnd[e]&&this.contourEnd[e]>this.contourStart[e]))for(i[e]=!0,t=this.contourStart[e];tv&&(this.minValues[m]=v),this.maxValues[m]l&&(t.isomin=null,t.isomax=null);var c=o("x"),u=o("y"),h=o("z"),f=o("value");c&&c.length&&u&&u.length&&h&&h.length&&f&&f.length?(n.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y","z"],i),o("valuehoverformat"),["x","y","z"].forEach((function(e){o(e+"hoverformat");var t="caps."+e;o(t+".show")&&o(t+".fill");var r="slices."+e;o(r+".show")&&(o(r+".fill"),o(r+".locations"))})),o("spaceframe.show")&&o("spaceframe.fill"),o("surface.show")&&(o("surface.count"),o("surface.fill"),o("surface.pattern")),o("contour.show")&&(o("contour.color"),o("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach((function(e){o(e)})),a(e,t,i,o,{prefix:"",cLetter:"c"}),t._length=null):t.visible=!1}t.exports={supplyDefaults:function(e,t,n,a){o(e,t,0,a,(function(n,a){return r.coerce(e,t,i,n,a)}))},supplyIsoDefaults:o}}}),Dm=m({"src/traces/streamtube/calc.js"(e,t){var r=ct(),n=Zt();function i(e){var t,n,i,o,s,l,c,u,h,f,p,d,m=e._x,g=e._y,y=e._z,v=e._len,x=-1/0,_=1/0,b=-1/0,w=1/0,T=-1/0,k=1/0,A="";for(v&&(c=m[0],h=g[0],p=y[0]),v>1&&(u=m[v-1],f=g[v-1],d=y[v-1]),t=0;tu?"-":"+")+"x")).replace("y",(h>f?"-":"+")+"y")).replace("z",(p>d?"-":"+")+"z");var C=function(){v=0,M=[],S=[],E=[]};(!v||v0;r--){var n=Math.min(t[r],t[r-1]),i=Math.max(t[r],t[r-1]);if(i>n&&n-1}function F(e,t){return null===e?t:e}function B(e,t,r){I();var n=[t],i=[r];if(s>=1)n=[t],i=[r];else if(s>0){var a=function(e,t){var r=e[0],n=e[1],i=e[2],a=function(e,t,r){for(var n=[],i=0;i-1?r[c]:C(u,h,f);l[c]=d>-1?d:P(u,h,f,F(e,p))}z(l[0],l[1],l[2])}}function j(e,t,r,n){var i=e[3];in&&(i=n);for(var a=(e[3]-i)/(e[3]-t[3]+1e-9),o=[],s=0;s<4;s++)o[s]=(1-a)*e[s]+a*t[s];return o}function N(e,t,r){return e>=t&&e<=r}function U(e){var t=.001*(E-S);return e>=S-t&&e<=E+t}function V(t){for(var r=[],n=0;n<4;n++){var i=t[n];r.push([e._x[i],e._y[i],e._z[i],e._value[i]])}return r}function q(e,t,r,n,i,a){a||(a=1),r=[-1,-1,-1];var o=!1,s=[N(t[0][3],n,i),N(t[1][3],n,i),N(t[2][3],n,i)];if(!s[0]&&!s[1]&&!s[2])return!1;var l=function(e,t,r){return U(t[0][3])&&U(t[1][3])&&U(t[2][3])?(B(e,t,r),!0):a<3&&q(e,t,r,S,E,++a)};if(s[0]&&s[1]&&s[2])return l(e,t,r)||o;var c=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach((function(a){if(s[a[0]]&&s[a[1]]&&!s[a[2]]){var u=t[a[0]],h=t[a[1]],f=t[a[2]],p=j(f,u,n,i),d=j(f,h,n,i);o=l(e,[d,p,u],[-1,-1,r[a[0]]])||o,o=l(e,[u,h,d],[r[a[0]],r[a[1]],-1])||o,c=!0}})),c||[[0,1,2],[1,2,0],[2,0,1]].forEach((function(a){if(s[a[0]]&&!s[a[1]]&&!s[a[2]]){var u=t[a[0]],h=t[a[1]],f=t[a[2]],p=j(h,u,n,i),d=j(f,u,n,i);o=l(e,[d,p,u],[-1,-1,r[a[0]]])||o,c=!0}})),o}function H(e,t,r,n){var i=!1,a=V(t),o=[N(a[0][3],r,n),N(a[1][3],r,n),N(a[2][3],r,n),N(a[3][3],r,n)];if(!(o[0]||o[1]||o[2]||o[3]))return i;if(o[0]&&o[1]&&o[2]&&o[3])return m&&(i=function(e,t,r){var n=function(n,i,a){B(e,[t[n],t[i],t[a]],[r[n],r[i],r[a]])};n(0,1,2),n(3,0,1),n(2,3,0),n(1,2,3)}(e,a,t)||i),i;var s=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],h=a[l[2]],f=a[l[3]];if(m)i=B(e,[c,u,h],[t[l[0]],t[l[1]],t[l[2]]])||i;else{var p=j(f,c,r,n),d=j(f,u,r,n),g=j(f,h,r,n);i=B(null,[p,d,g],[-1,-1,-1])||i}s=!0}})),s||([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&!o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],h=a[l[2]],f=a[l[3]],p=j(h,c,r,n),d=j(h,u,r,n),g=j(f,u,r,n),y=j(f,c,r,n);m?(i=B(e,[c,y,p],[t[l[0]],-1,-1])||i,i=B(e,[u,d,g],[t[l[1]],-1,-1])||i):i=function(e,t,r){var n=function(e,n,i){B(null,[t[e],t[n],t[i]],[r[e],r[n],r[i]])};n(0,1,2),n(2,3,0)}(0,[p,d,g,y],[-1,-1,-1,-1])||i,s=!0}})),s)||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach((function(l){if(o[l[0]]&&!o[l[1]]&&!o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],h=a[l[2]],f=a[l[3]],p=j(u,c,r,n),d=j(h,c,r,n),g=j(f,c,r,n);m?(i=B(e,[c,p,d],[t[l[0]],-1,-1])||i,i=B(e,[c,d,g],[t[l[0]],-1,-1])||i,i=B(e,[c,g,p],[t[l[0]],-1,-1])||i):i=B(null,[p,d,g],[-1,-1,-1])||i,s=!0}})),i}function G(e,t,r,n,i,a,o,s,l,c,u){var h=!1;return d&&(R(e,"A")&&(h=H(null,[t,r,n,a],c,u)||h),R(e,"B")&&(h=H(null,[r,n,i,l],c,u)||h),R(e,"C")&&(h=H(null,[r,a,o,l],c,u)||h),R(e,"D")&&(h=H(null,[n,a,s,l],c,u)||h),R(e,"E")&&(h=H(null,[r,n,a,l],c,u)||h)),m&&(h=H(e,[r,n,a,l],c,u)||h),h}function W(e,t,r,n,i,a,o,s){return[!0===s[0]||q(e,V([t,r,n]),[t,r,n],a,o),!0===s[1]||q(e,V([n,i,t]),[n,i,t],a,o)]}function Z(e,t,r,n,i,a,o,s,l){return s?W(e,t,r,i,n,a,o,l):W(e,r,i,n,t,a,o,l)}function Y(e,t,r,n,i,a,o){var s,l,c,u,h=!1,f=function(){h=q(e,[s,l,c],[-1,-1,-1],i,a)||h,h=q(e,[c,u,s],[-1,-1,-1],i,a)||h},p=o[0],d=o[1],m=o[2];return p&&(s=D(V([k(t,r-0,n-0)])[0],V([k(t-1,r-0,n-0)])[0],p),l=D(V([k(t,r-0,n-1)])[0],V([k(t-1,r-0,n-1)])[0],p),c=D(V([k(t,r-1,n-1)])[0],V([k(t-1,r-1,n-1)])[0],p),u=D(V([k(t,r-1,n-0)])[0],V([k(t-1,r-1,n-0)])[0],p),f()),d&&(s=D(V([k(t-0,r,n-0)])[0],V([k(t-0,r-1,n-0)])[0],d),l=D(V([k(t-0,r,n-1)])[0],V([k(t-0,r-1,n-1)])[0],d),c=D(V([k(t-1,r,n-1)])[0],V([k(t-1,r-1,n-1)])[0],d),u=D(V([k(t-1,r,n-0)])[0],V([k(t-1,r-1,n-0)])[0],d),f()),m&&(s=D(V([k(t-0,r-0,n)])[0],V([k(t-0,r-0,n-1)])[0],m),l=D(V([k(t-0,r-1,n)])[0],V([k(t-0,r-1,n-1)])[0],m),c=D(V([k(t-1,r-1,n)])[0],V([k(t-1,r-1,n-1)])[0],m),u=D(V([k(t-1,r-0,n)])[0],V([k(t-1,r-0,n-1)])[0],m),f()),h}function X(e,t,r,n,i,a,o,s,l,c,u,h){var f=e;return h?(d&&"even"===e&&(f=null),G(f,t,r,n,i,a,o,s,l,c,u)):(d&&"odd"===e&&(f=null),G(f,l,s,o,a,i,n,r,t,c,u))}function $(e,t,r,n,i){for(var a=[],o=0,s=0;sMath.abs(T-M)?[A,T]:[T,M];ee(r,C[0],C[1])}}var I=[[Math.min(S,M),Math.max(S,M)],[Math.min(A,E),Math.max(A,E)]];["x","y","z"].forEach((function(r){for(var n=[],i=0;i0&&(h.push(d.id),"x"===r?f.push([d.distRatio,0,0]):"y"===r?f.push([0,d.distRatio,0]):f.push([0,0,d.distRatio]))}else u=ie(1,"x"===r?_-1:"y"===r?b-1:w-1);h.length>0&&(n[a]="x"===r?te(t,h,o,s,f,n[a]):"y"===r?re(t,h,o,s,f,n[a]):ne(t,h,o,s,f,n[a]),a++),u.length>0&&(n[a]="x"===r?$(t,u,o,s,n[a]):"y"===r?K(t,u,o,s,n[a]):J(t,u,o,s,n[a]),a++)}var m=e.caps[r];m.show&&m.fill&&(O(m.fill),n[a]="x"===r?$(t,[0,_-1],o,s,n[a]):"y"===r?K(t,[0,b-1],o,s,n[a]):J(t,[0,w-1],o,s,n[a]),a++)}})),0===g&&L(),e._meshX=n,e._meshY=i,e._meshZ=a,e._meshIntensity=o,e._Xs=y,e._Ys=v,e._Zs=x}(),e}t.exports={findNearestOnAxis:l,generateIsoMeshes:f,createIsosurfaceTrace:function(e,t){var n=e.glplot.gl,i=r({gl:n}),a=new c(e,i,t.uid);return i._trace=a,a.update(t),e.glplot.add(i),a}}}}),Bm=m({"src/traces/isosurface/index.js"(e,t){t.exports={attributes:Pm(),supplyDefaults:zm().supplyDefaults,calc:Om(),colorbar:{min:"cmin",max:"cmax"},plot:Fm().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:wm(),categories:["gl3d","showLegend"],meta:{}}}}),jm=m({"lib/isosurface.js"(e,t){t.exports=Bm()}}),Nm=m({"src/traces/volume/attributes.js"(e,t){var r=zt(),n=Pm(),i=Am(),a=q(),o=B().extendFlat,s=De().overrideAll,l=t.exports=s(o({x:n.x,y:n.y,z:n.z,value:n.value,isomin:n.isomin,isomax:n.isomax,surface:n.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:n.slices,caps:n.caps,text:n.text,hovertext:n.hovertext,xhoverformat:n.xhoverformat,yhoverformat:n.yhoverformat,zhoverformat:n.zhoverformat,valuehoverformat:n.valuehoverformat,hovertemplate:n.hovertemplate,hovertemplatefallback:n.hovertemplatefallback},r("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:n.colorbar,opacity:n.opacity,opacityscale:i.opacityscale,lightposition:n.lightposition,lighting:n.lighting,flatshading:n.flatshading,contour:n.contour,hoverinfo:o({},a.hoverinfo),showlegend:o({},a.showlegend,{dflt:!1})}),"calc","nested");l.x.editType=l.y.editType=l.z.editType=l.value.editType="calc+clearAxisTypes"}}),Um=m({"src/traces/volume/defaults.js"(e,t){var r=ct(),n=Nm(),i=zm().supplyIsoDefaults,a=Mm().opacityscaleDefaults;t.exports=function(e,t,o,s){function l(i,a){return r.coerce(e,t,n,i,a)}i(e,t,o,s,l),a(e,t,s,l)}}}),Vm=m({"src/traces/volume/convert.js"(e,t){var r=Yd().gl_mesh3d,n=rm().parseColorScale,i=ct().isArrayOrTypedArray,a=tm(),o=Yt().extractOpts,s=Rm(),l=Fm().findNearestOnAxis,c=Fm().generateIsoMeshes;function u(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.data=null,this.showContour=!1}var h=u.prototype;h.handlePick=function(e){if(e.object===this.mesh){var t=e.data.index,r=this.data._meshX[t],n=this.data._meshY[t],a=this.data._meshZ[t],o=this.data._Ys.length,s=this.data._Zs.length,c=l(r,this.data._Xs).id,u=l(n,this.data._Ys).id,h=l(a,this.data._Zs).id,f=e.index=h+s*u+s*o*c;e.traceCoordinate=[this.data._meshX[f],this.data._meshY[f],this.data._meshZ[f],this.data._value[f]];var p=this.data.hovertext||this.data.text;return i(p)&&void 0!==p[f]?e.textLabel=p[f]:p&&(e.textLabel=p),!0}},h.update=function(e){var t=this.scene,r=t.fullSceneLayout;function i(e,t,r,n){return t.map((function(t){return e.d2l(t,0,n)*r}))}this.data=c(e);var l={positions:s(i(r.xaxis,e._meshX,t.dataScale[0],e.xcalendar),i(r.yaxis,e._meshY,t.dataScale[1],e.ycalendar),i(r.zaxis,e._meshZ,t.dataScale[2],e.zcalendar)),cells:s(e._meshI,e._meshJ,e._meshK),lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,opacityscale:e.opacityscale,contourEnable:e.contour.show,contourColor:a(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},u=o(e);l.vertexIntensity=e._meshIntensity,l.vertexIntensityBounds=[u.min,u.max],l.colormap=n(e),this.mesh.update(l)},h.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},t.exports=function(e,t){var n=e.glplot.gl,i=r({gl:n}),a=new u(e,i,t.uid);return i._trace=a,a.update(t),e.glplot.add(i),a}}}),qm=m({"src/traces/volume/index.js"(e,t){t.exports={attributes:Nm(),supplyDefaults:Um(),calc:Om(),colorbar:{min:"cmin",max:"cmax"},plot:Vm(),moduleType:"trace",name:"volume",basePlotModule:wm(),categories:["gl3d","showLegend"],meta:{}}}}),Hm=m({"lib/volume.js"(e,t){t.exports=qm()}}),Gm=m({"src/traces/mesh3d/defaults.js"(e,t){var r=He(),n=ct(),i=Ht(),a=Lm();t.exports=function(e,t,o,s){function l(r,i){return n.coerce(e,t,a,r,i)}function c(e){var t=e.map((function(e){var t=l(e);return t&&n.isArrayOrTypedArray(t)?t:null}));return t.every((function(e){return e&&e.length===t[0].length}))&&t}c(["x","y","z"])?(c(["i","j","k"]),(!t.i||t.j&&t.k)&&(!t.j||t.k&&t.i)&&(!t.k||t.i&&t.j)?(r.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y","z"],s),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach((function(e){l(e)})),l("contour.show")&&(l("contour.color"),l("contour.width")),"intensity"in e?(l("intensity"),l("intensitymode"),i(e,t,s,l,{prefix:"",cLetter:"c"})):(t.showscale=!1,"facecolor"in e?l("facecolor"):"vertexcolor"in e?l("vertexcolor"):l("color",o)),l("text"),l("hovertext"),l("hovertemplate"),l("hovertemplatefallback"),l("xhoverformat"),l("yhoverformat"),l("zhoverformat"),t._length=null):t.visible=!1):t.visible=!1}}}),Wm=m({"src/traces/mesh3d/calc.js"(e,t){var r=Zt();t.exports=function(e,t){t.intensity&&r(e,t,{vals:t.intensity,containerStr:"",cLetter:"c"})}}}),Zm=m({"src/traces/mesh3d/convert.js"(e,t){var r=Yd().gl_mesh3d,n=Yd().delaunay_triangulate,i=Yd().alpha_shape,a=Yd().convex_hull,o=rm().parseColorScale,s=ct().isArrayOrTypedArray,l=tm(),c=Yt().extractOpts,u=Rm();function h(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var f=h.prototype;function p(e){for(var t=[],r=e.length,n=0;n=t-.5)return!1;return!0}f.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index;e.data._cellCenter?e.traceCoordinate=e.data.dataCoordinate:e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]];var r=this.data.hovertext||this.data.text;return s(r)&&void 0!==r[t]?e.textLabel=r[t]:r&&(e.textLabel=r),!0}},f.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=e;var s,h=e.x.length,f=u(d(r.xaxis,e.x,t.dataScale[0],e.xcalendar),d(r.yaxis,e.y,t.dataScale[1],e.ycalendar),d(r.zaxis,e.z,t.dataScale[2],e.zcalendar));if(e.i&&e.j&&e.k){if(e.i.length!==e.j.length||e.j.length!==e.k.length||!g(e.i,h)||!g(e.j,h)||!g(e.k,h))return;s=u(m(e.i),m(e.j),m(e.k))}else s=0===e.alphahull?a(f):e.alphahull>0?i(e.alphahull,f):function(e,t){for(var r=["x","y","z"].indexOf(e),i=[],a=t.length,o=0;o2?e.slice(1,t-1):2===t?[(e[0]+e[1])/2]:e}function f(e){var t=e.length;return 1===t?[.5,.5]:[e[1]-e[0],e[t-1]-e[t-2]]}function p(e,t){var n=e.fullSceneLayout,c=e.dataScale,u=t._len,p={};function d(e,t){var r=n[t],a=c[l[t]];return i.simpleMap(e,(function(e){return r.d2l(e)*a}))}if(p.vectors=s(d(t._u,"xaxis"),d(t._v,"yaxis"),d(t._w,"zaxis"),u),!u)return{positions:[],cells:[]};var m=d(t._Xs,"xaxis"),g=d(t._Ys,"yaxis"),y=d(t._Zs,"zaxis");if(p.meshgrid=[m,g,y],p.gridFill=t._gridFill,t._slen)p.startingPositions=s(d(t._startsX,"xaxis"),d(t._startsY,"yaxis"),d(t._startsZ,"zaxis"));else{for(var v=g[0],x=h(m),_=h(y),b=new Array(x.length*_.length),w=0,T=0;To&&(o=e[0]),e[1]s&&(s=e[1])}function c(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(c);break;case"Point":l(e.coordinates);break;case"MultiPoint":e.coordinates.forEach(l)}}for(t in e.arcs.forEach((function(e){for(var t,r=-1,l=e.length;++ro&&(o=t[0]),t[1]s&&(s=t[1])})),e.objects)c(e.objects[t]);return[i,a,o,s]}function i(e,t){var r=t.id,n=t.bbox,i=null==t.properties?{}:t.properties,o=a(e,t);return null==r&&null==n?{type:"Feature",properties:i,geometry:o}:null==n?{type:"Feature",id:r,properties:i,geometry:o}:{type:"Feature",id:r,bbox:n,properties:i,geometry:o}}function a(e,t){var n=r(e.transform),i=e.arcs;function a(e,t){t.length&&t.pop();for(var r=i[e<0?~e:e],a=0,o=r.length;a1)n=function(e,t,r){var n,i=[],a=[];function o(e){var t=e<0?~e:e;(a[t]||(a[t]=[])).push({i:e,g:n})}function s(e){e.forEach(o)}function l(e){e.forEach(s)}return function e(t){switch(n=t,t.type){case"GeometryCollection":t.geometries.forEach(e);break;case"LineString":s(t.arcs);break;case"MultiLineString":case"Polygon":l(t.arcs);break;case"MultiPolygon":!function(e){e.forEach(l)}(t.arcs)}}(t),a.forEach(null==r?function(e){i.push(e[0].i)}:function(e){r(e[0].g,e[e.length-1].g)&&i.push(e[0].i)}),i}(0,t,r);else for(i=0,n=new Array(a=e.arcs.length);i1)for(var a,s,c=1,u=l(i[0]);cu&&(s=i[0],i[0]=i[c],i[c]=s,u=a);return i})).filter((function(e){return e.length>0}))}}function c(e,t){for(var r=0,n=e.length;r>>1;e[i]=2))throw new Error("n must be ≥2");var r,i=(l=e.bbox||n(e))[0],a=l[1],o=l[2],s=l[3];t={scale:[o-i?(o-i)/(r-1):1,s-a?(s-a)/(r-1):1],translate:[i,a]}}var l,c,h=u(t),f=e.objects,p={};function d(e){return h(e)}function m(e){var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(m)};break;case"Point":t={type:"Point",coordinates:d(e.coordinates)};break;case"MultiPoint":t={type:"MultiPoint",coordinates:e.coordinates.map(d)};break;default:return e}return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}for(c in f)p[c]=m(f[c]);return{type:"Topology",bbox:l,transform:t,objects:p,arcs:e.arcs.map((function(e){var t,r=0,n=1,i=e.length,a=new Array(i);for(a[0]=h(e[0],0);++r0&&(n.push(i),i=[])}return i.length>0&&n.push(i),n},e.makeLine=function(e){return 1===e.length?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}},e.makePolygon=function(e){if(1===e.length)return{type:"Polygon",coordinates:e};for(var t=new Array(e.length),r=0;r180?e-360:e<-180?e+360:e},e.bearingToAzimuth=function(e){let t=e%360;return t<0&&(t+=360),t},e.convertArea=function(e,t="meters",r="kilometers"){if(!(e>=0))throw new Error("area must be a positive number");let i=n[t];if(!i)throw new Error("invalid original units");let a=n[r];if(!a)throw new Error("invalid final units");return e/i*a},e.convertLength=function(e,t="kilometers",r="kilometers"){if(!(e>=0))throw new Error("length must be a positive number");return f(p(e,t),r)},e.degreesToRadians=function(e){return e%360*Math.PI/180},e.earthRadius=t,e.factors=r,e.feature=i,e.featureCollection=l,e.geometry=function(e,t,r={}){switch(e){case"Point":return a(t).geometry;case"LineString":return s(t).geometry;case"Polygon":return o(t).geometry;case"MultiPoint":return u(t).geometry;case"MultiLineString":return c(t).geometry;case"MultiPolygon":return h(t).geometry;default:throw new Error(e+" is invalid")}},e.geometryCollection=function(e,t,r={}){return i({type:"GeometryCollection",geometries:e},t,r)},e.isNumber=m,e.isObject=function(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)},e.lengthToDegrees=function(e,t){return d(p(e,t))},e.lengthToRadians=p,e.lineString=s,e.lineStrings=function(e,t,r={}){return l(e.map((e=>s(e,t))),r)},e.multiLineString=c,e.multiPoint=u,e.multiPolygon=h,e.point=a,e.points=function(e,t,r={}){return l(e.map((e=>a(e,t))),r)},e.polygon=o,e.polygons=function(e,t,r={}){return l(e.map((e=>o(e,t))),r)},e.radiansToDegrees=d,e.radiansToLength=f,e.round=function(e,t=0){if(t&&!(t>=0))throw new Error("precision must be a positive number");let r=Math.pow(10,t||0);return Math.round(e*r)/r},e.validateBBox=function(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((e=>{if(!m(e))throw new Error("bbox must only contain numbers")}))},e.validateId=function(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}}}),yg=m({"node_modules/@turf/meta/dist/cjs/index.cjs"(e){Object.defineProperty(e,"__esModule",{value:!0});var t=gg();function r(e,t,n){if(null!==e)for(var i,a,o,s,l,c,u,h,f=0,p=0,d=e.type,m="FeatureCollection"===d,g="Feature"===d,y=m?e.features.length:1,v=0;vc||p>u||d>h)return l=r,c=i,u=p,h=d,void(o=0);var m=t.lineString.call(void 0,[l,r],e.properties);if(!1===n(m,i,a,d,o))return!1;o++,l=r})))return!1}}}))}function l(e,r){if(!e)throw new Error("geojson is required");o(e,(function(e,n,i){if(null!==e.geometry){var a=e.geometry.type,o=e.geometry.coordinates;switch(a){case"LineString":if(!1===r(e,n,i,0,0))return!1;break;case"Polygon":for(var s=0;se+function(e){let t,r=0;switch(e.type){case"Polygon":return i(e.coordinates);case"MultiPolygon":for(t=0;t0){t+=Math.abs(s(e[0]));for(let r=1;r=t?(n+2)%t:n+2],l=i[0]*o,c=a[1]*o;r+=(s[0]*o-l)*Math.sin(c),n++}return r*a}var l=n;e.area=n,e.default=l}}),xg=m({"node_modules/@turf/centroid/dist/cjs/index.cjs"(e){Object.defineProperty(e,"__esModule",{value:!0});var t=gg(),r=yg();function n(e,n={}){let i=0,a=0,o=0;return r.coordEach.call(void 0,e,(function(e){i+=e[0],a+=e[1],o++}),!0),t.point.call(void 0,[i/o,a/o],n.properties)}var i=n;e.centroid=n,e.default=i}}),_g=m({"node_modules/@turf/bbox/dist/cjs/index.cjs"(e){Object.defineProperty(e,"__esModule",{value:!0});var t=yg();function r(e,r={}){if(null!=e.bbox&&!0!==r.recompute)return e.bbox;let n=[1/0,1/0,-1/0,-1/0];return t.coordEach.call(void 0,e,(e=>{n[0]>e[0]&&(n[0]=e[0]),n[1]>e[1]&&(n[1]=e[1]),n[2]0&&e[t+1][0]<0)return t;return null}switch(t="RUS"===s||"FJI"===s?function(e){var t;if(null===c(e))t=e;else for(t=new Array(e.length),i=0;it?r[n++]=[e[i][0]+360,e[i][1]]:i===t?(r[n++]=e[i],r[n++]=[e[i][0],-90]):r[n++]=e[i];var a=h.tester(r);a.pts.pop(),l.push(a)}:function(e){l.push(h.tester(e))},a.type){case"MultiPolygon":for(r=0;r0?h.properties.ct=function(e){var t,r=e.geometry;if("MultiPolygon"===r.type)for(var n=r.coordinates,o=0,s=0;so&&(o=c,t=l)}else t=r;return a(t).geometry.coordinates}(h):h.properties.ct=[NaN,NaN],n.fIn=e,n.fOut=h,s.push(h)}else l.log(["Location",n.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete o[r]}switch(r.type){case"FeatureCollection":var f=r.features;for(n=0;n100?(clearInterval(a),n("Unexpected error while fetching from "+e)):void i++}),50)}))}for(var o=0;o")}function p(e){return e+"°"}}(c,m,e,l[0].t.labels),e.hovertemplate=c.hovertemplate,[e]}}}}),Mg=m({"src/traces/scattergeo/event_data.js"(e,t){t.exports=function(e,t,r,n,i){e.lon=t.lon,e.lat=t.lat,e.location=t.loc?t.loc:null;var a=n[i];return a.fIn&&a.fIn.properties&&(e.properties=a.fIn.properties),e}}}),Sg=m({"src/traces/scattergeo/select.js"(e,t){var r=Xt(),n=S().BADNUM;t.exports=function(e,t){var i,a,o,s,l,c=e.cd,u=e.xaxis,h=e.yaxis,f=[],p=c[0].trace;if(!r.hasMarkers(p)&&!r.hasText(p))return[];if(!1===t)for(l=0;lt?1:e>=t?0:NaN}function r(e){return 1===e.length&&(e=function(e){return function(r,n){return t(e(r),n)}}(e)),{left:function(t,r,n,i){for(null==n&&(n=0),null==i&&(i=t.length);n>>1;e(t[a],r)<0?n=a+1:i=a}return n},right:function(t,r,n,i){for(null==n&&(n=0),null==i&&(i=t.length);n>>1;e(t[a],r)>0?i=a:n=a+1}return n}}}var n=r(t),i=n.right,a=n.left;function o(e,t){return[e,t]}function s(e){return null===e?NaN:+e}function l(e,t){var r,n,i=e.length,a=0,o=-1,l=0,c=0;if(null==t)for(;++o1)return c/(a-1)}function c(e,t){var r=l(e,t);return r&&Math.sqrt(r)}function u(e,t){var r,n,i,a=e.length,o=-1;if(null==t){for(;++o=r)for(n=i=r;++or&&(n=r),i=r)for(n=i=r;++or&&(n=r),i=0?(a>=y?10:a>=v?5:a>=x?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=y?10:a>=v?5:a>=x?2:1)}function b(e,t,r){var n=Math.abs(t-e)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),a=n/i;return a>=y?i*=10:a>=v?i*=5:a>=x&&(i*=2),t=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e);return o+(+r(e[a+1],a+1,e)-o)*(i-a)}}function k(e,t){var r,n,i=e.length,a=-1;if(null==t){for(;++a=r)for(n=r;++ar&&(n=r)}else for(;++a=r)for(n=r;++ar&&(n=r);return n}function A(e){if(!(i=e.length))return[];for(var t=-1,r=k(e,M),n=new Array(r);++te?1:t>=e?0:NaN},e.deviation=c,e.extent=u,e.histogram=function(){var e=m,t=u,r=w;function n(n){var a,o,s=n.length,l=new Array(s);for(a=0;ah;)f.pop(),--p;var d,m=new Array(p+1);for(a=0;a<=p;++a)(d=m[a]=[]).x0=a>0?f[a-1]:u,d.x1=a=r)for(n=r;++an&&(n=r)}else for(;++a=r)for(n=r;++an&&(n=r);return n},e.mean=function(e,t){var r,n=e.length,i=n,a=-1,o=0;if(null==t)for(;++a=0;)for(t=(n=e[i]).length;--t>=0;)r[--o]=n[t];return r},e.min=k,e.pairs=function(e,t){null==t&&(t=o);for(var r=0,n=e.length-1,i=e[0],a=new Array(n<0?0:n);r0)return[e];if((n=t0)for(e=Math.ceil(e/o),t=Math.floor(t/o),a=new Array(i=Math.ceil(t-e+1));++s0?1:e<0?-1:0},k=Math.sqrt,A=Math.tan;function M(e){return e>1?0:e<-1?l:Math.acos(e)}function S(e){return e>1?c:e<-1?-c:Math.asin(e)}function E(e){return(e=w(e/2))*e}function C(){}function I(e,t){e&&P.hasOwnProperty(e.type)&&P[e.type](e,t)}var L={Feature:function(e,t){I(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,n=-1,i=r.length;++n=0?1:-1,i=n*r,a=y(t=(t*=p)/2+u),o=w(t),s=N*o,l=j*a+s*y(i),c=s*n*w(i);U.add(g(c,l)),B=e,j=a,N=o}function Y(e){return[g(e[1],e[0]),S(e[2])]}function X(e){var t=e[0],r=e[1],n=y(r);return[n*y(t),n*w(t),w(r)]}function $(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function K(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function J(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function Q(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function ee(e){var t=k(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var te,re,ne,ie,ae,oe,se,le,ce,ue,he=r(),fe={point:pe,lineStart:me,lineEnd:ge,polygonStart:function(){fe.point=ye,fe.lineStart=ve,fe.lineEnd=xe,he.reset(),q.polygonStart()},polygonEnd:function(){q.polygonEnd(),fe.point=pe,fe.lineStart=me,fe.lineEnd=ge,U<0?(te=-(ne=180),re=-(ie=90)):he>o?ie=90:he<-o&&(re=-90),ue[0]=te,ue[1]=ne},sphere:function(){te=-(ne=180),re=-(ie=90)}};function pe(e,t){ce.push(ue=[te=e,ne=e]),tie&&(ie=t)}function de(e,t){var r=X([e*p,t*p]);if(le){var n=K(le,r),i=K([n[1],-n[0],0],n);ee(i),i=Y(i);var a,o=e-ae,s=o>0?1:-1,l=i[0]*f*s,c=d(o)>180;c^(s*aeie&&(ie=a):c^(s*ae<(l=(l+360)%360-180)&&lie&&(ie=t)),c?e_e(te,ne)&&(ne=e):_e(e,ne)>_e(te,ne)&&(te=e):ne>=te?(ene&&(ne=e)):e>ae?_e(te,e)>_e(te,ne)&&(ne=e):_e(e,ne)>_e(te,ne)&&(te=e)}else ce.push(ue=[te=e,ne=e]);tie&&(ie=t),le=r,ae=e}function me(){fe.point=de}function ge(){ue[0]=te,ue[1]=ne,fe.point=pe,le=null}function ye(e,t){if(le){var r=e-ae;he.add(d(r)>180?r+(r>0?360:-360):r)}else oe=e,se=t;q.point(e,t),de(e,t)}function ve(){q.lineStart()}function xe(){ye(oe,se),q.lineEnd(),d(he)>o&&(te=-(ne=180)),ue[0]=te,ue[1]=ne,le=null}function _e(e,t){return(t-=e)<0?t+360:t}function be(e,t){return e[0]-t[0]}function we(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tl?e+Math.round(-e/h)*h:e,t]}function Qe(e,t,r){return(e%=h)?t||r?Ke(tt(e),rt(t,r)):tt(e):t||r?rt(t,r):Je}function et(e){return function(t,r){return[(t+=e)>l?t-h:t<-l?t+h:t,r]}}function tt(e){var t=et(e);return t.invert=et(-e),t}function rt(e,t){var r=y(e),n=w(e),i=y(t),a=w(t);function o(e,t){var o=y(t),s=y(e)*o,l=w(e)*o,c=w(t),u=c*r+s*n;return[g(l*i-u*a,s*r-c*n),S(u*i+l*a)]}return o.invert=function(e,t){var o=y(t),s=y(e)*o,l=w(e)*o,c=w(t),u=c*i-l*a;return[g(l*i+c*a,s*r+u*n),S(u*r-s*n)]},o}function nt(e){function t(t){return(t=e(t[0]*p,t[1]*p))[0]*=f,t[1]*=f,t}return e=Qe(e[0]*p,e[1]*p,e.length>2?e[2]*p:0),t.invert=function(t){return(t=e.invert(t[0]*p,t[1]*p))[0]*=f,t[1]*=f,t},t}function it(e,t,r,n,i,a){if(r){var o=y(t),s=w(t),l=n*r;null==i?(i=t+n*h,a=t-l/2):(i=at(o,i),a=at(o,a),(n>0?ia)&&(i+=n*h));for(var c,u=i;n>0?u>a:u1&&t.push(t.pop().concat(t.shift()))},result:function(){var r=t;return t=[],e=null,r}}}function st(e,t){return d(e[0]-t[0])=0;--a)i.point((h=u[a])[0],h[1]);else n(p.x,p.p.x,-1,i);p=p.p}u=(p=p.o).z,d=!d}while(!p.v);i.lineEnd()}}}function ut(e){if(t=e.length){for(var t,r,n=0,i=e[0];++n=0?1:-1,D=z*P,O=D>l,R=T*I;if(ht.add(g(R*z*w(D),k*L+R*y(D))),s+=O?P+z*h:P,O^_>=r^E>=r){var F=K(X(x),X(M));ee(F);var B=K(a,F);ee(B);var j=(O^P>=0?-1:1)*S(B[2]);(n>j||n===j&&(F[0]||F[1]))&&(f+=O^P>=0?1:-1)}}return(s<-o||s0){for(f||(a.polygonStart(),f=!0),a.lineStart(),e=0;e1&&2&i&&c.push(c.pop().concat(c.shift())),s.push(c.filter(mt))}}return p}}function mt(e){return e.length>1}function gt(e,t){return((e=e.x)[0]<0?e[1]-c-o:c-e[1])-((t=t.x)[0]<0?t[1]-c-o:c-t[1])}var yt=dt((function(){return!0}),(function(e){var t,r=NaN,n=NaN,i=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(a,s){var u=a>0?l:-l,h=d(a-r);d(h-l)0?c:-c),e.point(i,n),e.lineEnd(),e.lineStart(),e.point(u,n),e.point(a,n),t=0):i!==u&&h>=l&&(d(r-i)o?m((w(t)*(a=y(n))*w(r)-w(n)*(i=y(t))*w(e))/(i*a*s)):(t+n)/2}(r,n,a,s),e.point(i,n),e.lineEnd(),e.lineStart(),e.point(u,n),t=0),e.point(r=a,n=s),i=u},lineEnd:function(){e.lineEnd(),r=n=NaN},clean:function(){return 2-t}}}),(function(e,t,r,n){var i;if(null==e)i=r*c,n.point(-l,i),n.point(0,i),n.point(l,i),n.point(l,0),n.point(l,-i),n.point(0,-i),n.point(-l,-i),n.point(-l,0),n.point(-l,i);else if(d(e[0]-t[0])>o){var a=e[0]0,i=d(t)>o;function a(e,r){return y(e)*y(r)>t}function s(e,r,n){var i=[1,0,0],a=K(X(e),X(r)),s=$(a,a),c=a[0],u=s-c*c;if(!u)return!n&&e;var h=t*s/u,f=-t*c/u,p=K(i,a),m=Q(i,h);J(m,Q(a,f));var g=p,y=$(m,g),v=$(g,g),x=y*y-v*($(m,m)-1);if(!(x<0)){var _=k(x),b=Q(g,(-y-_)/v);if(J(b,m),b=Y(b),!n)return b;var w,T=e[0],A=r[0],M=e[1],S=r[1];A0^b[1]<(d(b[0]-T)l^(T<=b[0]&&b[0]<=A)){var I=Q(g,(-y+_)/v);return J(I,m),[b,Y(I)]}}}function c(t,r){var i=n?e:l-e,a=0;return t<-i?a|=1:t>i&&(a|=2),r<-i?a|=4:r>i&&(a|=8),a}return dt(a,(function(e){var t,r,o,u,h;return{lineStart:function(){u=o=!1,h=1},point:function(f,p){var d,m=[f,p],g=a(f,p),y=n?g?0:c(f,p):g?c(f+(f<0?l:-l),p):0;if(!t&&(u=o=g)&&e.lineStart(),g!==o&&(!(d=s(t,m))||st(t,d)||st(m,d))&&(m[2]=1),g!==o)h=0,g?(e.lineStart(),d=s(m,t),e.point(d[0],d[1])):(d=s(t,m),e.point(d[0],d[1],2),e.lineEnd()),t=d;else if(i&&t&&n^g){var v;!(y&r)&&(v=s(m,t,!0))&&(h=0,n?(e.lineStart(),e.point(v[0][0],v[0][1]),e.point(v[1][0],v[1][1]),e.lineEnd()):(e.point(v[1][0],v[1][1]),e.lineEnd(),e.lineStart(),e.point(v[0][0],v[0][1],3)))}g&&(!t||!st(t,m))&&e.point(m[0],m[1]),t=m,o=g,r=y},lineEnd:function(){o&&e.lineEnd(),t=null},clean:function(){return h|(u&&o)<<1}}}),(function(t,n,i,a){it(a,e,r,i,t,n)}),n?[0,-e]:[-l,e-l])}var xt=1e9,_t=-xt;function bt(e,r,n,i){function a(t,a){return e<=t&&t<=n&&r<=a&&a<=i}function s(t,a,o,s){var c=0,h=0;if(null==t||(c=l(t,o))!==(h=l(a,o))||u(t,a)<0^o>0)do{s.point(0===c||3===c?e:n,c>1?i:r)}while((c=(c+o+4)%4)!==h);else s.point(a[0],a[1])}function l(t,i){return d(t[0]-e)0?0:3:d(t[0]-n)0?2:1:d(t[1]-r)0?1:0:i>0?3:2}function c(e,t){return u(e.x,t.x)}function u(e,t){var r=l(e,1),n=l(t,1);return r!==n?r-n:0===r?t[1]-e[1]:1===r?e[0]-t[0]:2===r?e[1]-t[1]:t[0]-e[0]}return function(o){var l,u,h,f,p,d,m,g,y,v,x,_=o,b=ot(),w={point:T,lineStart:function(){w.point=k,u&&u.push(h=[]),v=!0,y=!1,m=g=NaN},lineEnd:function(){l&&(k(f,p),d&&y&&b.rejoin(),l.push(b.result())),w.point=T,y&&_.lineEnd()},polygonStart:function(){_=b,l=[],u=[],x=!0},polygonEnd:function(){var r=function(){for(var t=0,r=0,n=u.length;ri&&(f-a)*(i-o)>(p-o)*(e-a)&&++t:p<=i&&(f-a)*(i-o)<(p-o)*(e-a)&&--t;return t}(),n=x&&r,a=(l=t.merge(l)).length;(n||a)&&(o.polygonStart(),n&&(o.lineStart(),s(null,null,1,o),o.lineEnd()),a&&ct(l,c,r,s,o),o.polygonEnd()),_=o,l=u=h=null}};function T(e,t){a(e,t)&&_.point(e,t)}function k(t,o){var s=a(t,o);if(u&&h.push([t,o]),v)f=t,p=o,d=s,v=!1,s&&(_.lineStart(),_.point(t,o));else if(s&&y)_.point(t,o);else{var l=[m=Math.max(_t,Math.min(xt,m)),g=Math.max(_t,Math.min(xt,g))],c=[t=Math.max(_t,Math.min(xt,t)),o=Math.max(_t,Math.min(xt,o))];!function(e,t,r,n,i,a){var o,s=e[0],l=e[1],c=0,u=1,h=t[0]-s,f=t[1]-l;if(o=r-s,h||!(o>0)){if(o/=h,h<0){if(o0){if(o>u)return;o>c&&(c=o)}if(o=i-s,h||!(o<0)){if(o/=h,h<0){if(o>u)return;o>c&&(c=o)}else if(h>0){if(o0)){if(o/=f,f<0){if(o0){if(o>u)return;o>c&&(c=o)}if(o=a-l,f||!(o<0)){if(o/=f,f<0){if(o>u)return;o>c&&(c=o)}else if(f>0){if(o0&&(e[0]=s+c*h,e[1]=l+c*f),u<1&&(t[0]=s+u*h,t[1]=l+u*f),!0}}}}}(l,c,e,r,n,i)?s&&(_.lineStart(),_.point(t,o),x=!1):(y||(_.lineStart(),_.point(l[0],l[1])),_.point(c[0],c[1]),s||_.lineEnd(),x=!1)}m=t,g=o,y=s}return w}}var wt,Tt,kt,At=r(),Mt={sphere:C,point:C,lineStart:function(){Mt.point=Et,Mt.lineEnd=St},lineEnd:C,polygonStart:C,polygonEnd:C};function St(){Mt.point=Mt.lineEnd=C}function Et(e,t){wt=e*=p,Tt=w(t*=p),kt=y(t),Mt.point=Ct}function Ct(e,t){e*=p;var r=w(t*=p),n=y(t),i=d(e-wt),a=y(i),o=n*w(i),s=kt*r-Tt*n*a,l=Tt*r+kt*n*a;At.add(g(k(o*o+s*s),l)),wt=e,Tt=r,kt=n}function It(e){return At.reset(),O(e,Mt),+At}var Lt=[null,null],Pt={type:"LineString",coordinates:Lt};function zt(e,t){return Lt[0]=e,Lt[1]=t,It(Pt)}var Dt={Feature:function(e,t){return Rt(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,n=-1,i=r.length;++n0&&(i=zt(e[a],e[a-1]))>0&&r<=i&&n<=i&&(r+n-i)*(1-Math.pow((r-n)/i,2))o})).map(u)).concat(t.range(v(s/g)*g,a,g).filter((function(e){return d(e%x)>o})).map(h))}return b.lines=function(){return w().map((function(e){return{type:"LineString",coordinates:e}}))},b.outline=function(){return{type:"Polygon",coordinates:[f(i).concat(p(l).slice(1),f(n).reverse().slice(1),p(c).reverse().slice(1))]}},b.extent=function(e){return arguments.length?b.extentMajor(e).extentMinor(e):b.extentMinor()},b.extentMajor=function(e){return arguments.length?(i=+e[0][0],n=+e[1][0],c=+e[0][1],l=+e[1][1],i>n&&(e=i,i=n,n=e),c>l&&(e=c,c=l,l=e),b.precision(_)):[[i,c],[n,l]]},b.extentMinor=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],s=+t[0][1],a=+t[1][1],r>e&&(t=r,r=e,e=t),s>a&&(t=s,s=a,a=t),b.precision(_)):[[r,s],[e,a]]},b.step=function(e){return arguments.length?b.stepMajor(e).stepMinor(e):b.stepMinor()},b.stepMajor=function(e){return arguments.length?(y=+e[0],x=+e[1],b):[y,x]},b.stepMinor=function(e){return arguments.length?(m=+e[0],g=+e[1],b):[m,g]},b.precision=function(t){return arguments.length?(_=+t,u=Vt(s,a,90),h=qt(r,e,_),f=Vt(c,l,90),p=qt(i,n,_),b):_},b.extentMajor([[-180,-90+o],[180,90-o]]).extentMinor([[-180,-80-o],[180,80+o]])}function Gt(e){return e}var Wt,Zt,Yt,Xt,$t=r(),Kt=r(),Jt={point:C,lineStart:C,lineEnd:C,polygonStart:function(){Jt.lineStart=Qt,Jt.lineEnd=rr},polygonEnd:function(){Jt.lineStart=Jt.lineEnd=Jt.point=C,$t.add(d(Kt)),Kt.reset()},result:function(){var e=$t/2;return $t.reset(),e}};function Qt(){Jt.point=er}function er(e,t){Jt.point=tr,Wt=Yt=e,Zt=Xt=t}function tr(e,t){Kt.add(Xt*e-Yt*t),Yt=e,Xt=t}function rr(){tr(Wt,Zt)}var nr,ir,ar,or,sr=1/0,lr=sr,cr=-sr,ur=cr,hr={point:function(e,t){ecr&&(cr=e),tur&&(ur=t)},lineStart:C,lineEnd:C,polygonStart:C,polygonEnd:C,result:function(){var e=[[sr,lr],[cr,ur]];return cr=ur=-(lr=sr=1/0),e}},fr=0,pr=0,dr=0,mr=0,gr=0,yr=0,vr=0,xr=0,_r=0,br={point:wr,lineStart:Tr,lineEnd:Mr,polygonStart:function(){br.lineStart=Sr,br.lineEnd=Er},polygonEnd:function(){br.point=wr,br.lineStart=Tr,br.lineEnd=Mr},result:function(){var e=_r?[vr/_r,xr/_r]:yr?[mr/yr,gr/yr]:dr?[fr/dr,pr/dr]:[NaN,NaN];return fr=pr=dr=mr=gr=yr=vr=xr=_r=0,e}};function wr(e,t){fr+=e,pr+=t,++dr}function Tr(){br.point=kr}function kr(e,t){br.point=Ar,wr(ar=e,or=t)}function Ar(e,t){var r=e-ar,n=t-or,i=k(r*r+n*n);mr+=i*(ar+e)/2,gr+=i*(or+t)/2,yr+=i,wr(ar=e,or=t)}function Mr(){br.point=wr}function Sr(){br.point=Cr}function Er(){Ir(nr,ir)}function Cr(e,t){br.point=Ir,wr(nr=ar=e,ir=or=t)}function Ir(e,t){var r=e-ar,n=t-or,i=k(r*r+n*n);mr+=i*(ar+e)/2,gr+=i*(or+t)/2,yr+=i,vr+=(i=or*e-ar*t)*(ar+e),xr+=i*(or+t),_r+=3*i,wr(ar=e,or=t)}function Lr(e){this._context=e}Lr.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,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(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,h)}},result:C};var Pr,zr,Dr,Or,Rr,Fr=r(),Br={point:C,lineStart:function(){Br.point=jr},lineEnd:function(){Pr&&Nr(zr,Dr),Br.point=C},polygonStart:function(){Pr=!0},polygonEnd:function(){Pr=null},result:function(){var e=+Fr;return Fr.reset(),e}};function jr(e,t){Br.point=Nr,zr=Or=e,Dr=Rr=t}function Nr(e,t){Or-=e,Rr-=t,Fr.add(k(Or*Or+Rr*Rr)),Or=e,Rr=t}function Ur(){this._string=[]}function Vr(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function qr(e){return function(t){var r=new Hr;for(var n in e)r[n]=e[n];return r.stream=t,r}}function Hr(){}function Gr(e,t,r){var n=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=n&&e.clipExtent(null),O(r,e.stream(hr)),t(hr.result()),null!=n&&e.clipExtent(n),e}function Wr(e,t,r){return Gr(e,(function(r){var n=t[1][0]-t[0][0],i=t[1][1]-t[0][1],a=Math.min(n/(r[1][0]-r[0][0]),i/(r[1][1]-r[0][1])),o=+t[0][0]+(n-a*(r[1][0]+r[0][0]))/2,s=+t[0][1]+(i-a*(r[1][1]+r[0][1]))/2;e.scale(150*a).translate([o,s])}),r)}function Zr(e,t,r){return Wr(e,[[0,0],t],r)}function Yr(e,t,r){return Gr(e,(function(r){var n=+t,i=n/(r[1][0]-r[0][0]),a=(n-i*(r[1][0]+r[0][0]))/2,o=-i*r[0][1];e.scale(150*i).translate([a,o])}),r)}function Xr(e,t,r){return Gr(e,(function(r){var n=+t,i=n/(r[1][1]-r[0][1]),a=-i*r[0][0],o=(n-i*(r[1][1]+r[0][1]))/2;e.scale(150*i).translate([a,o])}),r)}Ur.prototype={_radius:4.5,_circle:Vr(4.5),pointRadius:function(e){return(e=+e)!==this._radius&&(this._radius=e,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(e,t){switch(this._point){case 0:this._string.push("M",e,",",t),this._point=1;break;case 1:this._string.push("L",e,",",t);break;default:null==this._circle&&(this._circle=Vr(this._radius)),this._string.push("M",e,",",t,this._circle)}},result:function(){if(this._string.length){var e=this._string.join("");return this._string=[],e}return null}},Hr.prototype={constructor:Hr,point:function(e,t){this.stream.point(e,t)},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 $r=y(30*p);function Kr(e,t){return+t?function(e,t){function r(n,i,a,s,l,c,u,h,f,p,m,y,v,x){var _=u-n,b=h-i,w=_*_+b*b;if(w>4*t&&v--){var T=s+p,A=l+m,M=c+y,E=k(T*T+A*A+M*M),C=S(M/=E),I=d(d(M)-1)t||d((_*D+b*O)/w-.5)>.3||s*p+l*m+c*y<$r)&&(r(n,i,a,s,l,c,P,z,I,T/=E,A/=E,M,v,x),x.point(P,z),r(P,z,I,T,A,M,u,h,f,p,m,y,v,x))}}return function(t){var n,i,a,o,s,l,c,u,h,f,p,d,m={point:g,lineStart:y,lineEnd:x,polygonStart:function(){t.polygonStart(),m.lineStart=_},polygonEnd:function(){t.polygonEnd(),m.lineStart=y}};function g(r,n){r=e(r,n),t.point(r[0],r[1])}function y(){u=NaN,m.point=v,t.lineStart()}function v(n,i){var a=X([n,i]),o=e(n,i);r(u,h,c,f,p,d,u=o[0],h=o[1],c=n,f=a[0],p=a[1],d=a[2],16,t),t.point(u,h)}function x(){m.point=g,t.lineEnd()}function _(){y(),m.point=b,m.lineEnd=w}function b(e,t){v(n=e,t),i=u,a=h,o=f,s=p,l=d,m.point=v}function w(){r(u,h,c,f,p,d,i,a,n,o,s,l,16,t),m.lineEnd=x,x()}return m}}(e,t):function(e){return qr({point:function(t,r){t=e(t,r),this.stream.point(t[0],t[1])}})}(e)}var Jr=qr({point:function(e,t){this.stream.point(e*p,t*p)}});function Qr(e,t,r,n,i){function a(a,o){return[t+e*(a*=n),r-e*(o*=i)]}return a.invert=function(a,o){return[(a-t)/e*n,(r-o)/e*i]},a}function en(e,t,r,n,i,a){var o=y(a),s=w(a),l=o*e,c=s*e,u=o/e,h=s/e,f=(s*r-o*t)/e,p=(s*t+o*r)/e;function d(e,a){return[l*(e*=n)-c*(a*=i)+t,r-c*e-l*a]}return d.invert=function(e,t){return[n*(u*e-h*t+f),i*(p-h*e-u*t)]},d}function tn(e){return rn((function(){return e}))()}function rn(e){var t,r,n,i,a,o,s,l,c,u,h=150,d=480,m=250,g=0,y=0,v=0,x=0,_=0,b=0,w=1,T=1,A=null,M=yt,S=null,E=Gt,C=.5;function I(e){return l(e[0]*p,e[1]*p)}function L(e){return(e=l.invert(e[0],e[1]))&&[e[0]*f,e[1]*f]}function P(){var e=en(h,0,0,w,T,b).apply(null,t(g,y)),n=(b?en:Qr)(h,d-e[0],m-e[1],w,T,b);return r=Qe(v,x,_),s=Ke(t,n),l=Ke(r,s),o=Kr(s,C),z()}function z(){return c=u=null,I}return I.stream=function(e){return c&&u===e?c:c=Jr(function(e){return qr({point:function(t,r){var n=e(t,r);return this.stream.point(n[0],n[1])}})}(r)(M(o(E(u=e)))))},I.preclip=function(e){return arguments.length?(M=e,A=void 0,z()):M},I.postclip=function(e){return arguments.length?(E=e,S=n=i=a=null,z()):E},I.clipAngle=function(e){return arguments.length?(M=+e?vt(A=e*p):(A=null,yt),z()):A*f},I.clipExtent=function(e){return arguments.length?(E=null==e?(S=n=i=a=null,Gt):bt(S=+e[0][0],n=+e[0][1],i=+e[1][0],a=+e[1][1]),z()):null==S?null:[[S,n],[i,a]]},I.scale=function(e){return arguments.length?(h=+e,P()):h},I.translate=function(e){return arguments.length?(d=+e[0],m=+e[1],P()):[d,m]},I.center=function(e){return arguments.length?(g=e[0]%360*p,y=e[1]%360*p,P()):[g*f,y*f]},I.rotate=function(e){return arguments.length?(v=e[0]%360*p,x=e[1]%360*p,_=e.length>2?e[2]%360*p:0,P()):[v*f,x*f,_*f]},I.angle=function(e){return arguments.length?(b=e%360*p,P()):b*f},I.reflectX=function(e){return arguments.length?(w=e?-1:1,P()):w<0},I.reflectY=function(e){return arguments.length?(T=e?-1:1,P()):T<0},I.precision=function(e){return arguments.length?(o=Kr(s,C=e*e),z()):k(C)},I.fitExtent=function(e,t){return Wr(I,e,t)},I.fitSize=function(e,t){return Zr(I,e,t)},I.fitWidth=function(e,t){return Yr(I,e,t)},I.fitHeight=function(e,t){return Xr(I,e,t)},function(){return t=e.apply(this,arguments),I.invert=t.invert&&L,P()}}function nn(e){var t=0,r=l/3,n=rn(e),i=n(t,r);return i.parallels=function(e){return arguments.length?n(t=e[0]*p,r=e[1]*p):[t*f,r*f]},i}function an(e,t){var r=w(e),n=(r+w(t))/2;if(d(n)0?t<-c+o&&(t=-c+o):t>c-o&&(t=c-o);var r=i/b(dn(t),n);return[r*w(n*e),i-r*y(n*e)]}return a.invert=function(e,t){var r=i-t,a=T(n)*k(e*e+r*r),o=g(e,d(r))*T(r);return r*n<0&&(o-=l*T(e)*T(r)),[o/n,2*m(b(i/a,1/n))-c]},a}function gn(e,t){return[e,t]}function yn(e,t){var r=y(e),n=e===t?w(e):(r-y(t))/(t-e),i=r/n+e;if(d(n)o&&--i>0);return[e/(.8707+(a=n*n)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),n]},Mn.invert=cn(S),Sn.invert=cn((function(e){return 2*m(e)})),En.invert=function(e,t){return[-t,2*m(x(e))-c]},e.geoAlbers=sn,e.geoAlbersUsa=function(){var e,t,r,n,i,a,s=sn(),l=on().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=on().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(e,t){a=[e,t]}};function h(e){var t=e[0],o=e[1];return a=null,r.point(t,o),a||(n.point(t,o),a)||(i.point(t,o),a)}function f(){return e=t=null,h}return h.invert=function(e){var t=s.scale(),r=s.translate(),n=(e[0]-r[0])/t,i=(e[1]-r[1])/t;return(i>=.12&&i<.234&&n>=-.425&&n<-.214?l:i>=.166&&i<.234&&n>=-.214&&n<-.115?c:s).invert(e)},h.stream=function(r){return e&&t===r?e:e=function(e){var t=e.length;return{point:function(r,n){for(var i=-1;++i_e(n[0],n[1])&&(n[1]=i[1]),_e(i[0],n[1])>_e(n[0],n[1])&&(n[0]=i[0])):a.push(n=i);for(o=-1/0,t=0,n=a[r=a.length-1];t<=r;n=i,++t)i=a[t],(s=_e(n[1],i[0]))>o&&(o=s,te=i[0],ne=n[1])}return ce=ue=null,te===1/0||re===1/0?[[NaN,NaN],[NaN,NaN]]:[[te,re],[ne,ie]]},e.geoCentroid=function(e){Te=ke=Ae=Me=Se=Ee=Ce=Ie=Le=Pe=ze=0,O(e,je);var t=Le,r=Pe,n=ze,i=t*t+r*r+n*n;return i2?e[2]+90:90]):[(e=r())[0],e[1],e[2]-90]},r([0,0,90]).scale(159.155)},e.geoTransverseMercatorRaw=En,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof e&&typeof t<"u"?n(e,Eg()):n((r=r||self).d3=r.d3||{},r.d3)}}),Ig=m({"node_modules/d3-geo-projection/dist/d3-geo-projection.js"(e,t){var r,n;r=e,n=function(e,t,r){var n=Math.abs,i=Math.atan,a=Math.atan2,o=Math.cos,s=Math.exp,l=Math.floor,c=Math.log,u=Math.max,h=Math.min,f=Math.pow,p=Math.round,d=Math.sign||function(e){return e>0?1:e<0?-1:0},m=Math.sin,g=Math.tan,y=1e-6,v=1e-12,x=Math.PI,_=x/2,b=x/4,w=Math.SQRT1_2,T=I(2),k=I(x),A=2*x,M=180/x,S=x/180;function E(e){return e>1?_:e<-1?-_:Math.asin(e)}function C(e){return e>1?0:e<-1?x:Math.acos(e)}function I(e){return e>0?Math.sqrt(e):0}function L(e){return(s(e)-s(-e))/2}function P(e){return(s(e)+s(-e))/2}function z(e){var t=g(e/2),r=2*c(o(e/2))/(t*t);function i(e,t){var n=o(e),i=o(t),a=m(t),s=i*n,l=-((1-s?c((1+s)/2)/(1-s):-.5)+r/(1+s));return[l*i*m(e),l*a]}return i.invert=function(t,i){var s,l=I(t*t+i*i),u=-e/2,h=50;if(!l)return[0,0];do{var f=u/2,p=o(f),d=m(f),g=d/p,v=-c(n(p));u-=s=(2/g*v-r*g-l)/(-v/(d*d)+1-r/(2*p*p))*(p<0?.7:1)}while(n(s)>y&&--h>0);var x=m(u);return[a(t*x,l*o(u)),E(i*x/l)]},i}function D(e,t){var r=o(t),n=function(e){return e?e/Math.sin(e):1}(C(r*o(e/=2)));return[2*r*m(e)*n,m(t)*n]}function O(e){var t=m(e),r=o(e),i=e>=0?1:-1,s=g(i*e),l=(1+t-r)/2;function c(e,n){var c=o(n),u=o(e/=2);return[(1+c)*m(e),(i*n>-a(u,s)-.001?0:10*-i)+l+m(n)*r-(1+c)*t*u]}return c.invert=function(e,c){var u=0,h=0,f=50;do{var p=o(u),d=m(u),g=o(h),v=m(h),x=1+g,_=x*d-e,b=l+v*r-x*t*p-c,w=x*p/2,T=-d*v,k=t*x*d/2,A=r*g+t*p*v,M=T*k-A*w,S=(b*T-_*A)/M/2,E=(_*k-b*w)/M;n(E)>2&&(E/=2),u-=S,h-=E}while((n(S)>y||n(E)>y)&&--f>0);return i*h>-a(o(u),s)-.001?[2*u,h]:null},c}function R(e,t){var r=g(t/2),n=I(1-r*r),i=1+n*o(e/=2),a=m(e)*n/i,s=r/i,l=a*a,c=s*s;return[4/3*a*(3+l-3*c),4/3*s*(3+3*l-c)]}D.invert=function(e,t){if(!(e*e+4*t*t>x*x+y)){var r=e,i=t,a=25;do{var s,l=m(r),c=m(r/2),u=o(r/2),h=m(i),f=o(i),p=m(2*i),d=h*h,g=f*f,v=c*c,_=1-g*u*u,b=_?C(f*u)*I(s=1/_):s=0,w=2*b*f*c-e,T=b*h-t,k=s*(g*v+b*f*u*d),A=s*(.5*l*p-2*b*h*c),M=.25*s*(p*c-b*h*g*l),S=s*(d*u+b*v*f),E=A*M-S*k;if(!E)break;var L=(T*A-w*S)/E,P=(w*M-T*k)/E;r-=L,i-=P}while((n(L)>y||n(P)>y)&&--a>0);return[r,i]}},R.invert=function(e,t){if(t*=3/8,!(e*=3/8)&&n(t)>1)return null;var r=1+e*e+t*t,i=I((r-I(r*r-4*t*t))/2),s=E(i)/3,l=i?function(e){return c(e+I(e*e-1))}(n(t/i))/3:function(e){return c(e+I(e*e+1))}(n(e))/3,u=o(s),h=P(l),f=h*h-u*u;return[2*d(e)*a(L(l)*u,.25-f),2*d(t)*a(h*m(s),.25+f)]};var F=I(8),B=c(1+T);function j(e,t){var r=n(t);return r_){var l=a(s[1],s[0]),c=I(s[0]*s[0]+s[1]*s[1]),u=r*p((l-_)/r)+_,h=a(m(l-=u),2-o(l));l=u+E(x/c*m(h))-h,s[0]=c*o(l),s[1]=c*m(l)}return s}return s.invert=function(e,n){var s=I(e*e+n*n);if(s>_){var l=a(n,e),c=r*p((l-_)/r)+_,u=l>c?-1:1,h=s*o(c-l),f=1/g(u*C((h-x)/I(x*(x-2*h)+s*s)));l=c+2*i((f+u*I(f*f-3))/3),e=s*o(l),n=s*m(l)}return t.geoAzimuthalEquidistantRaw.invert(e,n)},s}function U(e,r){if(arguments.length<2&&(r=e),1===r)return t.geoAzimuthalEqualAreaRaw;if(r===1/0)return V;function n(n,i){var a=t.geoAzimuthalEqualAreaRaw(n/r,i);return a[0]*=e,a}return n.invert=function(n,i){var a=t.geoAzimuthalEqualAreaRaw.invert(n/e,i);return a[0]*=r,a},n}function V(e,t){return[e*o(t)/o(t/=2),2*m(t)]}function q(e,t,r){var i,a,o,s=100;r=void 0===r?0:+r,t=+t;do{(a=e(r))===(o=e(r+y))&&(o=a+y),r-=i=-1*y*(a-t)/(a-o)}while(s-- >0&&n(i)>y);return s<0?NaN:r}function H(e,t,r){return void 0===t&&(t=40),void 0===r&&(r=v),function(i,a,o,s){var l,c,u;o=void 0===o?0:+o,s=void 0===s?0:+s;for(var h=0;hl)o-=c/=2,s-=u/=2;else{l=m;var g=(o>0?-1:1)*r,y=(s>0?-1:1)*r,v=e(o+g,s),x=e(o,s+y),_=(v[0]-f[0])/g,b=(v[1]-f[1])/g,w=(x[0]-f[0])/y,T=(x[1]-f[1])/y,k=T*_-b*w,A=(n(k)<.5?.5:1)/k;if(o+=c=(d*w-p*T)*A,s+=u=(p*b-d*_)*A,n(c)0&&(i[1]*=1+a/1.5*i[0]*i[0]),i}return t.invert=H(t),t}function W(e,t){var r,i=e*m(t),a=30;do{t-=r=(t+m(t)-i)/(1+o(t))}while(n(r)>y&&--a>0);return t/2}function Z(e,t,r){function n(n,i){return[e*n*o(i=W(r,i)),t*m(i)]}return n.invert=function(n,i){return i=E(i/t),[n/(e*o(i)),E((2*i+m(2*i))/r)]},n}j.invert=function(e,t){if((a=n(t))v&&--u>0);return[e/(o(l)*(F-1/m(l))),d(t)*l]},V.invert=function(e,t){var r=2*E(t/2);return[e*o(r/2)/o(r),r]};var Y=Z(T/_,T,x),X=2.00276,$=1.11072;function K(e,t){var r=W(x,t);return[X*e/(1/o(t)+$/o(r)),(t+T*m(r))/X]}function J(e){var r=0,n=t.geoProjectionMutator(e),i=n(r);return i.parallel=function(e){return arguments.length?n(r=e*S):r*M},i}function Q(e,t){return[e*o(t),t]}function ee(e){if(!e)return Q;var t=1/g(e);function r(r,n){var i=t+e-n,a=i&&r*o(n)/i;return[i*m(a),t-i*o(a)]}return r.invert=function(r,n){var i=I(r*r+(n=t-n)*n),s=t+e-i;return[i/o(s)*a(r,n),s]},r}function te(e){function t(t,r){var n=_-r,i=n&&t*e*m(n)/n;return[n*m(i)/e,_-n*o(i)]}return t.invert=function(t,r){var n=t*e,i=_-r,o=I(n*n+i*i),s=a(n,i);return[(o?o/m(o):1)*s/e,_-o]},t}K.invert=function(e,t){var r,i,a=X*t,s=t<0?-b:b,l=25;do{i=a-T*m(s),s-=r=(m(2*s)+2*s-x*m(i))/(2*o(2*s)+2+x*o(i)*T*o(s))}while(n(r)>y&&--l>0);return i=a-T*m(s),[e*(1/o(i)+$/o(s))/X,i]},Q.invert=function(e,t){return[e/o(t),t]};var re=Z(1,4/x,x);function ne(e,t,r,i,s,l){var c,u=o(l);if(n(e)>1||n(l)>1)c=C(r*s+t*i*u);else{var h=m(e/2),f=m(l/2);c=2*E(I(h*h+t*i*f*f))}return n(c)>y?[c,a(i*m(l),t*s-r*i*u)]:[0,0]}function ie(e,t,r){return C((e*e+t*t-r*r)/(2*e*t))}function ae(e){return e-2*x*l((e+x)/(2*x))}function oe(e,t,r){for(var n,i=[[e[0],e[1],m(e[1]),o(e[1])],[t[0],t[1],m(t[1]),o(t[1])],[r[0],r[1],m(r[1]),o(r[1])]],a=i[2],s=0;s<3;++s,a=n)n=i[s],a.v=ne(n[1]-a[1],a[3],a[2],n[3],n[2],n[0]-a[0]),a.point=[0,0];var l=ie(i[0].v[0],i[2].v[0],i[1].v[0]),c=ie(i[0].v[0],i[1].v[0],i[2].v[0]),u=x-l;i[2].point[1]=0,i[0].point[0]=-(i[1].point[0]=i[0].v[0]/2);var h=[i[2].point[0]=i[0].point[0]+i[2].v[0]*o(l),2*(i[0].point[1]=i[1].point[1]=i[2].v[0]*m(l))];return function(e,t){var r,n=m(t),a=o(t),s=new Array(3);for(r=0;r<3;++r){var l=i[r];if(s[r]=ne(t-l[1],l[3],l[2],a,n,e-l[0]),!s[r][0])return l.point;s[r][1]=ae(s[r][1]-l.v[1])}var f=h.slice();for(r=0;r<3;++r){var p=2==r?0:r+1,d=ie(i[r].v[0],s[r][0],s[p][0]);s[r][1]<0&&(d=-d),r?1==r?(d=c-d,f[0]-=s[r][0]*o(d),f[1]-=s[r][0]*m(d)):(d=u-d,f[0]+=s[r][0]*o(d),f[1]+=s[r][0]*m(d)):(f[0]+=s[r][0]*o(d),f[1]-=s[r][0]*m(d))}return f[0]/=3,f[1]/=3,f}}function se(e){return e[0]*=S,e[1]*=S,e}function le(e,r,n){var i=t.geoCentroid({type:"MultiPoint",coordinates:[e,r,n]}),a=[-i[0],-i[1]],o=t.geoRotation(a),s=oe(se(o(e)),se(o(r)),se(o(n)));s.invert=H(s);var l=t.geoProjection(s).rotate(a),c=l.center;return delete l.rotate,l.center=function(e){return arguments.length?c(o(e)):o.invert(c())},l.clipAngle(90)}function ce(e,t){var r=I(1-m(t));return[2/k*e*r,k*(1-r)]}function ue(e){var t=g(e);function r(e,r){return[e,(e?e/m(e):1)*(m(r)*o(e)-t*o(r))]}return r.invert=t?function(e,r){e&&(r*=m(e)/e);var n=o(e);return[e,2*a(I(n*n+t*t-r*r)-n,t-r)]}:function(e,t){return[e,E(e?t*g(e)/e:t)]},r}ce.invert=function(e,t){var r=(r=t/k-1)*r;return[r>0?e*I(x/r)/2:0,E(1-r)]};var he=I(3);function fe(e,t){return[he*e*(2*o(2*t/3)-1)/k,he*k*m(t/3)]}function pe(e){var t=o(e);function r(e,r){return[e*t,m(r)/t]}return r.invert=function(e,r){return[e/t,E(r*t)]},r}function de(e){var t=o(e);function r(e,r){return[e*t,(1+t)*g(r/2)]}return r.invert=function(e,r){return[e/t,2*i(r/(1+t))]},r}function me(e,t){var r=I(8/(3*x));return[r*e*(1-n(t)/x),r*t]}function ge(e,t){var r=I(4-3*m(n(t)));return[2/I(6*x)*e*r,d(t)*I(2*x/3)*(2-r)]}function ye(e,t){var r=I(x*(4+x));return[2/r*e*(1+I(1-4*t*t/(x*x))),4/r*t]}function ve(e,t){var r=(2+_)*m(t);t/=2;for(var i=0,a=1/0;i<10&&n(a)>y;i++){var s=o(t);t-=a=(t+m(t)*(s+2)-r)/(2*s*(1+s))}return[2/I(x*(4+x))*e*(1+o(t)),2*I(x/(4+x))*m(t)]}function xe(e,t){return[e*(1+o(t))/I(2+x),2*t/I(2+x)]}function _e(e,t){for(var r=(1+_)*m(t),i=0,a=1/0;i<10&&n(a)>y;i++)t-=a=(t+m(t)-r)/(1+o(t));return r=I(2+x),[e*(1+o(t))/r,2*t/r]}fe.invert=function(e,t){var r=3*E(t/(he*k));return[k*e/(he*(2*o(2*r/3)-1)),r]},me.invert=function(e,t){var r=I(8/(3*x)),i=t/r;return[e/(r*(1-n(i)/x)),i]},ge.invert=function(e,t){var r=2-n(t)/I(2*x/3);return[e*I(6*x)/(2*r),d(t)*E((4-r*r)/3)]},ye.invert=function(e,t){var r=I(x*(4+x))/2;return[e*r/(1+I(1-t*t*(4+x)/(4*x))),t*r/2]},ve.invert=function(e,t){var r=t*I((4+x)/x)/2,n=E(r),i=o(n);return[e/(2/I(x*(4+x))*(1+i)),E((n+r*(i+2))/(2+_))]},xe.invert=function(e,t){var r=I(2+x),n=t*r/2;return[r*e/(1+o(n)),n]},_e.invert=function(e,t){var r=1+_,n=I(r/2);return[2*e*n/(1+o(t*=n)),E((t+m(t))/r)]};var be=3+2*T;function we(e,t){var r=m(e/=2),n=o(e),a=I(o(t)),s=o(t/=2),l=m(t)/(s+T*n*a),u=I(2/(1+l*l)),h=I((T*s+(n+r)*a)/(T*s+(n-r)*a));return[be*(u*(h-1/h)-2*c(h)),be*(u*l*(h+1/h)-2*i(l))]}we.invert=function(e,t){if(!(r=R.invert(e/1.2,1.065*t)))return null;var r,a=r[0],s=r[1],l=20;e/=be,t/=be;do{var f=a/2,p=s/2,d=m(f),g=o(f),v=m(p),x=o(p),b=o(s),k=I(b),A=v/(x+T*g*k),M=A*A,S=I(2/(1+M)),E=(T*x+(g+d)*k)/(T*x+(g-d)*k),C=I(E),L=C-1/C,P=C+1/C,z=S*L-2*c(C)-e,D=S*A*P-2*i(A)-t,O=v&&w*k*d*M/v,F=(T*g*x+k)/(2*(x+T*g*k)*(x+T*g*k)*k),B=-.5*A*S*S*S,j=B*O,N=B*F,U=(U=2*x+T*k*(g-d))*U*C,V=(T*g*x*k+b)/U,q=-T*d*v/(k*U),H=L*j-2*V/C+S*(V+V/E),G=L*N-2*q/C+S*(q+q/E),W=A*P*j-2*O/(1+M)+S*P*O+S*A*(V-V/E),Z=A*P*N-2*F/(1+M)+S*P*F+S*A*(q-q/E),Y=G*W-Z*H;if(!Y)break;var X=(D*G-z*Z)/Y,$=(z*W-D*H)/Y;a-=X,s=u(-_,h(_,s-$))}while((n(X)>y||n($)>y)&&--l>0);return n(n(s)-_)s){var d=I(f),g=a(h,u),v=i*p(g/i),b=g-v,w=e*o(b),T=(e*m(b)-b*m(w))/(_-w),k=Ie(b,T),A=(x-e)/Le(k,w,x);u=d;var M,S=50;do{u-=M=(e+Le(k,w,u)*A-d)/(k(u)*A)}while(n(M)>y&&--S>0);h=b*m(u),u<_&&(h-=T*(u-_));var E=m(v),C=o(v);c[0]=u*C-h*E,c[1]=u*E+h*C}return c}return l.invert=function(r,l){var c=r*r+l*l;if(c>s){var u=I(c),h=a(l,r),f=i*p(h/i),d=h-f;r=u*o(d),l=u*m(d);for(var g=r-_,y=m(r),b=l/y,w=r<_?1/0:0,T=10;;){var k=e*m(b),A=e*o(b),M=m(A),S=_-A,E=(k-b*M)/S,C=Ie(b,E);if(n(w)y||n(p)>y)&&--v>0);return[d,g]},u}ke.invert=function(e,t){var r=t/(1+Te);return[e&&e/(Te*I(1-r*r)),2*i(r)]},Ae.invert=function(e,t){var r=i(t/k),n=o(r),a=2*r;return[e*k/2/(o(a)*n*n),a]};var ze=Pe(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555),De=Pe(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742),Oe=Pe(5/6*x,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Re(e,t){var r=e*e,n=t*t;return[e*(1-.162388*n)*(.87-952426e-9*r*r),t*(1+n/12)]}Re.invert=function(e,t){var r,i=e,a=t,o=50;do{var s=a*a;a-=r=(a*(1+s/12)-t)/(1+s/4)}while(n(r)>y&&--o>0);o=50,e/=1-.162388*s;do{var l=(l=i*i)*l;i-=r=(i*(.87-952426e-9*l)-e)/(.87-.00476213*l)}while(n(r)>y&&--o>0);return[i,a]};var Fe=Pe(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Be(e){var t=e(_,0)[0]-e(-_,0)[0];function r(r,n){var i=r>0?-.5:.5,a=e(r+i*x,n);return a[0]-=i*t,a}return e.invert&&(r.invert=function(r,n){var i=r>0?-.5:.5,a=e.invert(r+i*t,n),o=a[0]-i*x;return o<-x?o+=2*x:o>x&&(o-=2*x),a[0]=o,a}),r}function je(e,t){var r=d(e),i=d(t),s=o(t),l=o(e)*s,c=m(e)*s,u=m(i*t);e=n(a(c,u)),t=E(l),n(e-_)>y&&(e%=_);var h=function(e,t){if(t===_)return[0,0];var r,i,a=m(t),s=a*a,l=s*s,c=1+l,u=1+3*l,h=1-l,f=E(1/I(c)),p=h+s*c*f,d=(1-a)/p,g=I(d),v=d*c,b=I(v),w=g*h;if(0===e)return[0,-(w+s*b)];var T,k=o(t),A=1/k,M=2*a*k,S=(-p*k-(1-a)*((-3*s+f*u)*M))/(p*p),C=-A*M,L=-A*(s*c*S+d*u*M),P=-2*A*(h*(.5*S/g)-2*s*g*M),z=4*e/x;if(e>.222*x||t.175*x){if(r=(w+s*I(v*(1+l)-w*w))/(1+l),e>x/4)return[r,r];var D=r,O=.5*r;r=.5*(O+D),i=50;do{var R=r*(P+C*I(v-r*r))+L*E(r/b)-z;if(!R)break;R<0?O=r:D=r,r=.5*(O+D)}while(n(D-O)>y&&--i>0)}else{r=y,i=25;do{var F=r*r,B=I(v-F),j=P+C*B,N=r*j+L*E(r/b)-z;r-=T=B?N/(j+(L-C*F)/B):0}while(n(T)>y&&--i>0)}return[r,-w-s*I(v-r*r)]}(e>x/4?_-e:e,t);return e>x/4&&(u=h[0],h[0]=-h[1],h[1]=-u),h[0]*=r,h[1]*=-i,h}function Ne(e,t){var r,a,l,c,u;if(t=1-y)return r=(1-t)/4,a=P(e),c=function(e){return((e=s(2*e))-1)/(e+1)}(e),l=1/a,[c+r*((u=a*L(e))-e)/(a*a),l-r*c*l*(u-e),l+r*c*l*(u+e),2*i(s(e))-_+r*(u-e)/a];var h=[1,0,0,0,0,0,0,0,0],f=[I(t),0,0,0,0,0,0,0,0],p=0;for(a=I(1-t),u=1;n(f[p]/h[p])>y&&p<8;)r=h[p++],f[p]=(r-a)/2,h[p]=(r+a)/2,a=I(r*a),u*=2;l=u*h[p]*e;do{l=(E(c=f[p]*m(a=l)/h[p])+l)/2}while(--p);return[m(l),c=o(l),c/o(l-a),l]}function Ue(e,t){if(!t)return e;if(1===t)return c(g(e/2+b));for(var r=1,a=I(1-t),o=I(t),s=0;n(o)>y;s++){if(e%x){var l=i(a*g(e)/r);l<0&&(l+=x),e+=l+~~(e/x)*x}else e+=e;o=(r+a)/2,a=I(r*a),o=((r=o)-a)/2}return e/(f(2,s)*r)}function Ve(e,t){var r=(T-1)/(T+1),l=I(1-r*r),u=Ue(_,l*l),h=c(g(x/4+n(t)/2)),f=s(-1*h)/I(r),p=function(e,t){var r=e*e,n=t+1,i=1-r-t*t;return[.5*((e>=0?_:-_)-a(i,2*e)),-.25*c(i*i+4*r)+.5*c(n*n+r)]}(f*o(-1*e),f*m(-1*e)),y=function(e,t,r){var a=n(e),o=L(n(t));if(a){var s=1/m(a),l=1/(g(a)*g(a)),c=-(l+r*(o*o*s*s)-1+r),u=(-c+I(c*c-(r-1)*l*4))/2;return[Ue(i(1/I(u)),r)*d(e),Ue(i(I((u/l-1)/r)),1-r)*d(t)]}return[0,Ue(i(o),1-r)*d(t)]}(p[0],p[1],l*l);return[-y[1],(t>=0?1:-1)*(.5*u-y[0])]}function qe(e){var t=m(e),r=o(e),i=He(e);function s(e,a){var s=i(e,a);e=s[0],a=s[1];var l=m(a),c=o(a),u=o(e),h=C(t*l+r*c*u),f=m(h),p=n(f)>y?h/f:1;return[p*r*m(e),(n(e)>_?p:-p)*(t*c-r*l*u)]}return i.invert=He(-e),s.invert=function(e,r){var n=I(e*e+r*r),s=-m(n),l=o(n),c=n*l,u=-r*s,h=n*t,f=I(c*c+u*u-h*h),p=a(c*h+u*f,u*h-c*f),d=(n>_?-1:1)*a(e*s,n*o(p)*l+r*m(p)*s);return i.invert(d,p)},s}function He(e){var t=m(e),r=o(e);return function(e,n){var i=o(n),s=o(e)*i,l=m(e)*i,c=m(n);return[a(l,s*r-c*t),E(c*r+s*t)]}}je.invert=function(e,t){n(e)>1&&(e=2*d(e)-e),n(t)>1&&(t=2*d(t)-t);var r=d(e),i=d(t),s=-r*e,l=-i*t,c=l/s<1,u=function(e,t){for(var r=0,i=1,a=.5,s=50;;){var l=a*a,c=I(a),u=E(1/I(1+l)),h=1-l+a*(1+l)*u,f=(1-c)/h,p=I(f),d=f*(1+l),m=p*(1-l),g=I(d-e*e),y=t+m+a*g;if(n(i-r)0?r=a:i=a,a=.5*(r+i)}if(!s)return null;var _=E(c),b=o(_),w=1/b,T=2*c*b,k=(-h*b-(1-c)*((-3*a+u*(1+3*l))*T))/(h*h);return[x/4*(e*(-2*w*(.5*k/p*(1-l)-2*a*p*T)+-w*T*g)+-w*(a*(1+l)*k+f*(1+3*l)*T)*E(e/I(d))),_]}(c?l:s,c?s:l),h=u[0],f=u[1],p=o(f);return c&&(h=-_-h),[r*(a(m(h)*p,-m(f))+x),i*E(o(h)*p)]},Ve.invert=function(e,t){var r=(T-1)/(T+1),n=I(1-r*r),o=function(e,t,r){var n,i,a;return e?(n=Ne(e,r),t?(a=(i=Ne(t,1-r))[1]*i[1]+r*n[0]*n[0]*i[0]*i[0],[[n[0]*i[2]/a,n[1]*n[2]*i[0]*i[1]/a],[n[1]*i[1]/a,-n[0]*n[2]*i[0]*i[2]/a],[n[2]*i[1]*i[2]/a,-r*n[0]*n[1]*i[0]/a]]):[[n[0],0],[n[1],0],[n[2],0]]):[[0,(i=Ne(t,1-r))[0]/i[1]],[1/i[1],0],[i[2]/i[1],0]]}(.5*Ue(_,n*n)-t,-e,n*n),l=function(e,t){var r=t[0]*t[0]+t[1]*t[1];return[(e[0]*t[0]+e[1]*t[1])/r,(e[1]*t[0]-e[0]*t[1])/r]}(o[0],o[1]);return[a(l[1],l[0])/-1,2*i(s(-.5*c(r*l[0]*l[0]+r*l[1]*l[1])))-_]};var Ge=E(1-1/3)*M,We=pe(0);function Ze(e){var t=Ge*S,r=ce(x,t)[0]-ce(-x,t)[0],i=We(0,t)[1],a=ce(0,t)[1],o=k-a,s=A/e,c=4/A,f=i+o*o*4/A;function p(p,d){var m,g=n(d);if(g>t){var y=h(e-1,u(0,l((p+x)/s)));(m=ce(p+=x*(e-1)/e-y*s,g))[0]=m[0]*A/r-A*(e-1)/(2*e)+y*A/e,m[1]=i+4*(m[1]-a)*o/A,d<0&&(m[1]=-m[1])}else m=We(p,d);return m[0]*=c,m[1]/=f,m}return p.invert=function(t,p){t/=c;var d=n(p*=f);if(d>i){var m=h(e-1,u(0,l((t+x)/s)));t=(t+x*(e-1)/e-m*s)*r/A;var g=ce.invert(t,.25*(d-i)*A/o+a);return g[0]-=x*(e-1)/e-m*s,p<0&&(g[1]=-g[1]),g}return We.invert(t,p)},p}function Ye(e,t){return[e,1&t?90-y:Ge]}function Xe(e,t){return[e,1&t?-90+y:-Ge]}function $e(e){return[e[0]*(1-y),e[1]]}function Ke(e){var t,r=1+e,i=E(m(1/r)),s=2*I(x/(t=x+4*i*r)),l=.5*s*(r+I(e*(2+e))),c=e*e,u=r*r;function h(h,f){var p,d,g=1-m(f);if(g&&g<2){var y,b=_-f,w=25;do{var T=m(b),k=o(b),A=i+a(T,r-k),M=1+u-2*r*k;b-=y=(b-c*i-r*T+M*A-.5*g*t)/(2*r*T*A)}while(n(y)>v&&--w>0);p=s*I(M),d=h*A/x}else p=s*(e+g),d=h*i/x;return[p*m(d),l-p*o(d)]}return h.invert=function(e,n){var o=e*e+(n-=l)*n,h=(1+u-o/(s*s))/(2*r),f=C(h),p=m(f),d=i+a(p,r-h);return[E(e/I(o))*x/d,E(1-2*(f-c*i-r*p+(1+u-2*r*h)*d)/t)]},h}var Je=.7109889596207567,Qe=.0528035274542;function et(e,t){return t>-Je?((e=Y(e,t))[1]+=Qe,e):Q(e,t)}function tt(e,t){return n(t)>Je?((e=Y(e,t))[1]-=t>0?Qe:-Qe,e):Q(e,t)}function rt(e,t,r,n){var i=I(4*x/(2*r+(1+e-t/2)*m(2*r)+(e+t)/2*m(4*r)+t/2*m(6*r))),a=I(n*m(r)*I((1+e*o(2*r)+t*o(4*r))/(1+e+t))),s=r*c(1);function l(r){return I(1+e*o(2*r)+t*o(4*r))}function c(n){var i=n*r;return(2*i+(1+e-t/2)*m(2*i)+(e+t)/2*m(4*i)+t/2*m(6*i))/r}function u(e){return l(e)*m(e)}var h=function(e,t){var n=r*q(c,s*m(t)/r,t/x);isNaN(n)&&(n=r*d(t));var u=i*l(n);return[u*a*e/x*o(n),u/a*m(n)]};return h.invert=function(e,t){var n=q(u,t*a/i);return[e*x/(o(n)*i*a*l(n)),E(r*c(n/r)/s)]},0===r&&(i=I(n/x),(h=function(e,t){return[e*i,m(t)/i]}).invert=function(e,t){return[e/i,E(t*i)]}),h}function nt(e,t,r,n,i,a,o,s,l,c,u){if(u.nanEncountered)return NaN;var h,f,p,d,m,g,y,v,x,_;if(f=e(t+.25*(h=r-t)),p=e(r-.25*h),isNaN(f))u.nanEncountered=!0;else{if(!isNaN(p))return _=((g=(d=h*(n+4*f+i)/12)+(m=h*(i+4*p+a)/12))-o)/15,c>l?(u.maxDepthCount++,g+_):Math.abs(_)e?r=n:t=n,n=t+r>>1}while(n>t);var i=c[n+1]-c[n];return i&&(i=(e-c[n+1])/i),(n+1+i)/s}var p=2*h(1)/x*o/r,g=function(e,t){var r=h(n(m(t))),a=i(r)*e;return r/=p,[a,t>=0?r:-r]};return g.invert=function(e,t){var r;return n(t*=p)<1&&(r=d(t)*E(a(n(t))*o)),[e/i(n(t)),r]},g}function ot(e,t){return n(e[0]-t[0])a[o][2][0];++o);var l=e(t-a[o][1][0],r);return l[0]+=e(a[o][1][0],i*r>i*a[o][0][1]?a[o][0][1]:r)[0],l}i?s.invert=i(s):e.invert&&(s.invert=function(t,r){for(var i=o[+(r<0)],a=n[+(r<0)],l=0,c=i.length;l=0;--l)n=(t=e[1][l])[0][0],i=t[0][1],a=t[1][1],o=t[2][0],s=t[2][1],c.push(st([[o-y,s-y],[o-y,a+y],[n+y,a+y],[n+y,i-y]],30));return{type:"Polygon",coordinates:[r.merge(c)]}}(t),n=t.map((function(e){return e.map((function(e){return[[e[0][0]*S,e[0][1]*S],[e[1][0]*S,e[1][1]*S],[e[2][0]*S,e[2][1]*S]]}))})),o=n.map((function(t){return t.map((function(t){var r,n=e(t[0][0],t[0][1])[0],i=e(t[2][0],t[2][1])[0],a=e(t[1][0],t[0][1])[1],o=e(t[1][0],t[1][1])[1];return a>o&&(r=a,a=o,o=r),[[n,a],[i,o]]}))})),l):n.map((function(e){return e.map((function(e){return[[e[0][0]*M,e[0][1]*M],[e[1][0]*M,e[1][1]*M],[e[2][0]*M,e[2][1]*M]]}))}))},null!=n&&l.lobes(n),l}et.invert=function(e,t){return t>-Je?Y.invert(e,t-Qe):Q.invert(e,t)},tt.invert=function(e,t){return n(t)>Je?Y.invert(e,t+(t>0?Qe:-Qe)):Q.invert(e,t)};var ct=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]],ut=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]],ht=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]],ft=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]],pt=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]],dt=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function mt(e,t){return[3/A*e*I(x*x/3-t*t),t]}function gt(e){function t(t,r){if(n(n(r)-_)2)return null;var o=(t/=2)*t,s=(r/=2)*r,l=2*r/(1+o+s);return l=f((1+l)/(1-l),1/e),[a(2*t,1-o-s)/e,E((l-1)/(l+1))]},t}mt.invert=function(e,t){return[A/3*e/I(x*x/3-t*t),t]};var yt=x/T;function vt(e,t){return[e*(1+I(o(t)))/2,t/(o(t/2)*o(e/6))]}function xt(e,t){var r=e*e,n=t*t;return[e*(.975534+n*(-.0143059*r-.119161+-.0547009*n)),t*(1.00384+r*(.0802894+-.02855*n+199025e-9*r)+n*(.0998909+-.0491032*n))]}function _t(e,t){return[m(e)/o(t),g(t)*o(e)]}function bt(e){var t=o(e),r=g(b+e/2);function i(i,a){var o=a-e,s=n(o)=0;)f=(h=e[u])[0]+l*(i=f)-c*p,p=h[1]+l*p+c*i;return[f=l*(i=f)-c*p,p=l*p+c*i]}return r.invert=function(r,s){var l=20,c=r,u=s;do{for(var h,f=t,p=e[f],d=p[0],g=p[1],v=0,x=0;--f>=0;)v=d+c*(h=v)-u*x,x=g+c*x+u*h,d=(p=e[f])[0]+c*(h=d)-u*g,g=p[1]+c*g+u*h;var _,b,w=(v=d+c*(h=v)-u*x)*v+(x=g+c*x+u*h)*x;c-=_=((d=c*(h=d)-u*g-r)*v+(g=c*g+u*h-s)*x)/w,u-=b=(g*v-d*x)/w}while(n(_)+n(b)>y*y&&--l>0);if(l){var T=I(c*c+u*u),k=2*i(.5*T),A=m(k);return[a(c*A,T*o(k)),T?E(u*A/T):0]}},r}vt.invert=function(e,t){var r=n(e),i=n(t),a=y,s=_;iy||n(_)>y)&&--a>0);return a&&[r,i]},_t.invert=function(e,t){var r=e*e,n=t*t+1,i=r+n,a=e?w*I((i-I(i*i-4*r))/r):1/I(n);return[E(e*a),d(t)*C(a)]},wt.invert=function(e,t){return[e,2.5*i(s(.8*t))-.625*x]};var kt=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],At=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Mt=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],St=[[.9245,0],[0,0],[.01943,0]],Et=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Ct(e,r){var n=t.geoProjection(Tt(e)).rotate(r).clipAngle(90),i=t.geoRotation(r),a=n.center;return delete n.rotate,n.center=function(e){return arguments.length?a(i(e)):i.invert(a())},n}var It=I(6),Lt=I(7);function Pt(e,t){var r=E(7*m(t)/(3*It));return[It*e*(2*o(2*r/3)-1)/Lt,9*m(r/3)/Lt]}function zt(e,t){for(var r,i=(1+w)*m(t),a=t,s=0;s<25&&(a-=r=(m(a/2)+m(a)-i)/(.5*o(a/2)+o(a)),!(n(r)v&&--l>0);return[e/(.84719-.13063*(i=s*s)+(o=i*(a=i*i))*o*(.05494*i-.04515-.02326*a+.00331*o)),s]},Rt.invert=function(e,t){for(var r=t/2,i=0,a=1/0;i<10&&n(a)>y;++i){var s=o(t/2);t-=a=(t-g(t/2)-r)/(1-.5/(s*s))}return[2*e/(1+o(t)),t]};var Ft=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function Bt(e,t){var r=m(t),i=o(t),a=d(e);if(0===e||n(t)===_)return[0,t];if(0===t)return[e,0];if(n(e)===_)return[e*i,_*r];var s=x/(2*e)-2*e/x,l=2*t/x,c=(1-l*l)/(r-l),u=s*s,h=c*c,f=1+u/h,p=1+h/u,g=(s*r/c-s/2)/f,y=(h*r/u+c/2)/p,v=y*y-(h*r*r/u+c*r-1)/p;return[_*(g+I(g*g+i*i/f)*a),_*(y+I(v<0?0:v)*d(-t*s)*a)]}Bt.invert=function(e,t){var r=(e/=_)*e,n=r+(t/=_)*t,i=x*x;return[e?(n-1+I((1-n)*(1-n)+4*r))/(2*e)*_:0,q((function(e){return n*(x*m(e)-2*e)*x+4*e*e*(t-m(e))+2*x*e-i*t}),0)]};var jt=1.0148,Nt=.23185,Ut=-.14499,Vt=.02406,qt=jt,Ht=5*Nt,Gt=7*Ut,Wt=1.790857183;function Zt(e,t){var r=t*t;return[e,t*(jt+r*r*(Nt+r*(Ut+Vt*r)))]}function Yt(e,t){if(n(t)=0;)if(n=t[s],r[0]===n[0]&&r[1]===n[1]){if(a)return[a,r];a=r}}}(t.face,r.face),i=function(e,t){var r=$t(e[1],e[0]),n=$t(t[1],t[0]),i=function(e,t){return a(e[0]*t[1]-e[1]*t[0],e[0]*t[0]+e[1]*t[1])}(r,n),s=Kt(r)/Kt(n);return Xt([1,0,e[0][0],0,1,e[0][1]],Xt([s,0,0,0,s,0],Xt([o(i),m(i),0,-m(i),o(i),0],[1,0,-t[0][0],0,1,-t[0][1]])))}(n.map(r.project),n.map(t.project));t.transform=r.transform?Xt(r.transform,i):i;for(var s=r.edges,l=0,c=s.length;lWt?t=Wt:t<-Wt&&(t=-Wt);var r,i=t;do{var a=i*i;i-=r=(i*(jt+a*a*(Nt+a*(Ut+Vt*a)))-t)/(qt+a*a*(Ht+a*(Gt+.21654*a)))}while(n(r)>y);return[e,i]},Yt.invert=function(e,t){if(n(t)y&&--s>0);return l=g(a),[(n(t)n^p>n&&r<(f-c)*(n-u)/(p-u)+c&&(i=!i)}return i}(e[0],r))return e.push(t),!0}))||e.push([t])})),mr=[],e.length?e.length>1?{type:"MultiPolygon",coordinates:e}:{type:"Polygon",coordinates:e[0]}:null}};function xr(e){var r=e(_,0)[0]-e(-_,0)[0];function i(t,i){var a=n(t)<_,o=e(a?t:t>0?t-x:t+x,i),s=(o[0]-o[1])*w,l=(o[0]+o[1])*w;if(a)return[s,l];var c=r*w,u=s>0^l>0?-1:1;return[u*s-d(l)*c,u*l-d(s)*c]}return e.invert&&(i.invert=function(t,i){var a=(t+i)*w,o=(i-t)*w,s=n(a)<.5*r&&n(o)<.5*r;if(!s){var l=r*w,c=a>0^o>0?-1:1,u=-c*t+(o>0?1:-1)*l,h=-c*i+(a>0?1:-1)*l;a=(-u-h)*w,o=(u-h)*w}var f=e.invert(a,o);return s||(f[0]+=a>0?x:-x),f}),t.geoProjection(i).rotate([-90,-90,45]).clipAngle(179.999)}function _r(){return xr(Ve).scale(111.48)}function br(e){var t=m(e);function r(r,n){var a=t?g(r*t/2)/t:r/2;if(!n)return[2*a,-e];var s=2*i(a*m(n)),l=1/g(n);return[m(s)*l,n+(1-o(s))*l-e]}return r.invert=function(r,a){if(n(a+=e)y&&--u>0);var d=r*(h=g(c)),v=g(n(a)0?_:-_)*(f+o*(d-c)/2+o*o*(d-2*f+c)/2)]}function kr(e,t){var r=function(e){function t(t,r){var n=o(r),i=(e-1)/(e-n*o(t));return[i*n*m(t),i*m(r)]}return t.invert=function(t,r){var n=t*t+r*r,i=I(n),o=(e-I(1-n*(e+1)/(e-1)))/((e-1)/i+i/(e-1));return[a(t*o,i*I(1-o*o)),i?E(r*o/i):0]},t}(e);if(!t)return r;var n=o(t),i=m(t);function s(t,a){var o=r(t,a),s=o[1],l=s*i/(e-1)+n;return[o[0]*n/l,s/l]}return s.invert=function(t,a){var o=(e-1)/(e-1-a*i);return r.invert(o*t,o*a*n)},s}wr.forEach((function(e){e[1]*=1.0144})),Tr.invert=function(e,t){var r=t/_,i=90*r,a=h(18,n(i/5)),o=u(0,l(a));do{var s=wr[o][1],c=wr[o+1][1],f=wr[h(19,o+2)][1],p=f-s,d=f-2*c+s,m=2*(n(r)-c)/p,g=d/p,y=m*(1-g*m*(1-2*g*m));if(y>=0||1===o){i=(t>=0?5:-5)*(y+a);var x,b=50;do{y=(a=h(18,n(i)/5))-(o=l(a)),s=wr[o][1],c=wr[o+1][1],f=wr[h(19,o+2)][1],i-=(x=(t>=0?_:-_)*(c+y*(f-s)/2+y*y*(f-2*c+s)/2)-t)*M}while(n(x)>v&&--b>0);break}}while(--o>=0);var w=wr[o][0],T=wr[o+1][0],k=wr[h(19,o+2)][0];return[e/(T+y*(k-w)/2+y*y*(k-2*T+w)/2),i*S]};var Ar=1e-4,Mr=-180,Sr=Mr+Ar,Er=180-Ar,Cr=-90+Ar,Ir=90-Ar;function Lr(e){return e.length>0}function Pr(e){return Math.floor(1e4*e)/1e4}function zr(e){return-90===e||90===e?[0,e]:[Mr,Pr(e)]}function Dr(e){var t=e[0],r=e[1],n=!1;return t<=Sr?(t=Mr,n=!0):t>=Er&&(t=180,n=!0),r<=Cr?(r=-90,n=!0):r>=Ir&&(r=90,n=!0),n?[t,r]:e}function Or(e){return e.map(Dr)}function Rr(e,t,r){for(var n=0,i=e.length;n=Er||u<=Cr||u>=Ir){a[o]=Dr(l);for(var h=o+1;hSr&&pCr&&d=s)break;r.push({index:-1,polygon:t,ring:a=a.slice(h-1)}),a[0]=zr(a[0][1]),o=-1,s=a.length}}}}function Fr(e){var t,r,n,i,a,o,s=e.length,l={},c={};for(t=0;t0?x-l:l)*M],u=t.geoProjection(e(s)).rotate(c),h=t.geoRotation(c),f=u.center;return delete u.rotate,u.center=function(e){return arguments.length?f(h(e)):h.invert(f())},u.clipAngle(90)}function Vr(e){var r=o(e);function n(e,n){var i=t.geoGnomonicRaw(e,n);return i[0]*=r,i}return n.invert=function(e,n){return t.geoGnomonicRaw.invert(e/r,n)},n}function qr(e,t){return Ur(Vr,e,t)}function Hr(e){if(!(e*=2))return t.geoAzimuthalEquidistantRaw;var r=-e/2,n=-r,i=e*e,s=g(n),l=.5/m(n);function c(t,a){var s=C(o(a)*o(t-r)),l=C(o(a)*o(t-n));return[((s*=s)-(l*=l))/(2*e),(a<0?-1:1)*I(4*i*l-(i-s+l)*(i-s+l))/(2*e)]}return c.invert=function(e,t){var i,c,u=t*t,h=o(I(u+(i=e+r)*i)),f=o(I(u+(i=e+n)*i));return[a(c=h-f,i=(h+f)*s),(t<0?-1:1)*C(I(i*i+c*c)*l)]},c}function Gr(e,t){return Ur(Hr,e,t)}function Wr(e,t){if(n(t)y&&--l>0);return[d(e)*(I(a*a+4)+a)*x/4,_*s]};var Jr=4*x+3*I(3),Qr=2*I(2*x*I(3)/Jr),en=Z(Qr*I(3)/x,Qr,Jr/6);function tn(e,t){return[e*I(1-3*t*t/(x*x)),t]}function rn(e,t){var r=o(t),n=o(e)*r,i=1-n,s=o(e=a(m(e)*r,-m(t))),l=m(e);return[l*(r=I(1-n*n))-s*i,-s*r-l*i]}function nn(e,t){var r=D(e,t);return[(r[0]+e/_)/2,(r[1]+t)/2]}tn.invert=function(e,t){return[e/I(1-3*t*t/(x*x)),t]},rn.invert=function(e,t){var r=(e*e+t*t)/-2,n=I(-r*(2+r)),i=t*r+e*n,o=e*r-t*n,s=I(o*o+i*i);return[a(n*i,s*(1+r)),s?-E(n*o/s):0]},nn.invert=function(e,t){var r=e,i=t,a=25;do{var s,l=o(i),c=m(i),u=m(2*i),h=c*c,f=l*l,p=m(r),d=o(r/2),g=m(r/2),v=g*g,x=1-f*d*d,b=x?C(l*d)*I(s=1/x):s=0,w=.5*(2*b*l*g+r/_)-e,T=.5*(b*c+i)-t,k=.5*s*(f*v+b*l*d*h)+.5/_,A=s*(p*u/4-b*c*g),M=.125*s*(u*g-b*c*f*p),S=.5*s*(h*d+b*v*l)+.5,E=A*M-S*k,L=(T*A-w*S)/E,P=(w*M-T*k)/E;r-=L,i-=P}while((n(L)>y||n(P)>y)&&--a>0);return[r,i]},e.geoNaturalEarth=t.geoNaturalEarth1,e.geoNaturalEarthRaw=t.geoNaturalEarth1Raw,e.geoAiry=function(){var e=_,r=t.geoProjectionMutator(z),n=r(e);return n.radius=function(t){return arguments.length?r(e=t*S):e*M},n.scale(179.976).clipAngle(147)},e.geoAiryRaw=z,e.geoAitoff=function(){return t.geoProjection(D).scale(152.63)},e.geoAitoffRaw=D,e.geoArmadillo=function(){var e=20*S,r=e>=0?1:-1,n=g(r*e),i=t.geoProjectionMutator(O),s=i(e),l=s.stream;return s.parallel=function(t){return arguments.length?(n=g((r=(e=t*S)>=0?1:-1)*e),i(e)):e*M},s.stream=function(t){var i=s.rotate(),c=l(t),u=(s.rotate([0,0]),l(t)),h=s.precision();return s.rotate(i),c.sphere=function(){u.polygonStart(),u.lineStart();for(var t=-180*r;r*t<180;t+=90*r)u.point(t,90*r);if(e)for(;r*(t-=3*r*h)>=-180;)u.point(t,r*-a(o(t*S/2),n)*M);u.lineEnd(),u.polygonEnd()},c},s.scale(218.695).center([0,28.0974])},e.geoArmadilloRaw=O,e.geoAugust=function(){return t.geoProjection(R).scale(66.1603)},e.geoAugustRaw=R,e.geoBaker=function(){return t.geoProjection(j).scale(112.314)},e.geoBakerRaw=j,e.geoBerghaus=function(){var e=5,r=t.geoProjectionMutator(N),n=r(e),i=n.stream,s=.01,l=-o(s*S),c=m(s*S);return n.lobes=function(t){return arguments.length?r(e=+t):e},n.stream=function(t){var r=n.rotate(),u=i(t),h=(n.rotate([0,0]),i(t));return n.rotate(r),u.sphere=function(){h.polygonStart(),h.lineStart();for(var t=0,r=360/e,n=2*x/e,i=90-180/e,u=_;t=0;)e.point((t=r[i])[0],t[1]);e.lineEnd(),e.polygonEnd()},e},n.scale(79.4187).parallel(45).clipAngle(179.999)},e.geoHammerRetroazimuthalRaw=qe,e.geoHealpix=function(){var e=4,n=t.geoProjectionMutator(Ze),i=n(e),a=i.stream;return i.lobes=function(t){return arguments.length?n(e=+t):e},i.stream=function(n){var o=i.rotate(),s=a(n),l=(i.rotate([0,0]),a(n));return i.rotate(o),s.sphere=function(){t.geoStream(function(e){var t=[].concat(r.range(-180,180+e/2,e).map(Ye),r.range(180,-180-e/2,-e).map(Xe));return{type:"Polygon",coordinates:[180===e?t.map($e):t]}}(180/e),l)},s},i.scale(239.75)},e.geoHealpixRaw=Ze,e.geoHill=function(){var e=1,r=t.geoProjectionMutator(Ke),n=r(e);return n.ratio=function(t){return arguments.length?r(e=+t):e},n.scale(167.774).center([0,18.67])},e.geoHillRaw=Ke,e.geoHomolosine=function(){return t.geoProjection(tt).scale(152.63)},e.geoHomolosineRaw=tt,e.geoHufnagel=function(){var e=1,r=0,n=45*S,i=2,a=t.geoProjectionMutator(rt),o=a(e,r,n,i);return o.a=function(t){return arguments.length?a(e=+t,r,n,i):e},o.b=function(t){return arguments.length?a(e,r=+t,n,i):r},o.psiMax=function(t){return arguments.length?a(e,r,n=+t*S,i):n*M},o.ratio=function(t){return arguments.length?a(e,r,n,i=+t):i},o.scale(180.739)},e.geoHufnagelRaw=rt,e.geoHyperelliptical=function(){var e=0,r=2.5,n=1.183136,i=t.geoProjectionMutator(at),a=i(e,r,n);return a.alpha=function(t){return arguments.length?i(e=+t,r,n):e},a.k=function(t){return arguments.length?i(e,r=+t,n):r},a.gamma=function(t){return arguments.length?i(e,r,n=+t):n},a.scale(152.63)},e.geoHyperellipticalRaw=at,e.geoInterrupt=lt,e.geoInterruptedBoggs=function(){return lt(K,ct).scale(160.857)},e.geoInterruptedHomolosine=function(){return lt(tt,ut).scale(152.63)},e.geoInterruptedMollweide=function(){return lt(Y,ht).scale(169.529)},e.geoInterruptedMollweideHemispheres=function(){return lt(Y,ft).scale(169.529).rotate([20,0])},e.geoInterruptedSinuMollweide=function(){return lt(et,pt,H).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},e.geoInterruptedSinusoidal=function(){return lt(Q,dt).scale(152.63).rotate([-20,0])},e.geoKavrayskiy7=function(){return t.geoProjection(mt).scale(158.837)},e.geoKavrayskiy7Raw=mt,e.geoLagrange=function(){var e=.5,r=t.geoProjectionMutator(gt),n=r(e);return n.spacing=function(t){return arguments.length?r(e=+t):e},n.scale(124.75)},e.geoLagrangeRaw=gt,e.geoLarrivee=function(){return t.geoProjection(vt).scale(97.2672)},e.geoLarriveeRaw=vt,e.geoLaskowski=function(){return t.geoProjection(xt).scale(139.98)},e.geoLaskowskiRaw=xt,e.geoLittrow=function(){return t.geoProjection(_t).scale(144.049).clipAngle(89.999)},e.geoLittrowRaw=_t,e.geoLoximuthal=function(){return J(bt).parallel(40).scale(158.837)},e.geoLoximuthalRaw=bt,e.geoMiller=function(){return t.geoProjection(wt).scale(108.318)},e.geoMillerRaw=wt,e.geoModifiedStereographic=Ct,e.geoModifiedStereographicRaw=Tt,e.geoModifiedStereographicAlaska=function(){return Ct(kt,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)},e.geoModifiedStereographicGs48=function(){return Ct(At,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])},e.geoModifiedStereographicGs50=function(){return Ct(Mt,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])},e.geoModifiedStereographicMiller=function(){return Ct(St,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)},e.geoModifiedStereographicLee=function(){return Ct(Et,[165,10]).scale(250).clipAngle(130).center([-165,-10])},e.geoMollweide=function(){return t.geoProjection(Y).scale(169.529)},e.geoMollweideRaw=Y,e.geoMtFlatPolarParabolic=function(){return t.geoProjection(Pt).scale(164.859)},e.geoMtFlatPolarParabolicRaw=Pt,e.geoMtFlatPolarQuartic=function(){return t.geoProjection(zt).scale(188.209)},e.geoMtFlatPolarQuarticRaw=zt,e.geoMtFlatPolarSinusoidal=function(){return t.geoProjection(Dt).scale(166.518)},e.geoMtFlatPolarSinusoidalRaw=Dt,e.geoNaturalEarth2=function(){return t.geoProjection(Ot).scale(175.295)},e.geoNaturalEarth2Raw=Ot,e.geoNellHammer=function(){return t.geoProjection(Rt).scale(152.63)},e.geoNellHammerRaw=Rt,e.geoInterruptedQuarticAuthalic=function(){return lt(U(1/0),Ft).rotate([20,0]).scale(152.63)},e.geoNicolosi=function(){return t.geoProjection(Bt).scale(127.267)},e.geoNicolosiRaw=Bt,e.geoPatterson=function(){return t.geoProjection(Zt).scale(139.319)},e.geoPattersonRaw=Zt,e.geoPolyconic=function(){return t.geoProjection(Yt).scale(103.74)},e.geoPolyconicRaw=Yt,e.geoPolyhedral=Jt,e.geoPolyhedralButterfly=function(e){e=e||function(e){var r=t.geoCentroid({type:"MultiPoint",coordinates:e});return t.geoGnomonic().scale(1).translate([0,0]).rotate([-r[0],-r[1]])};var r=nr.map((function(t){return{face:t,project:e(t)}}));return[-1,0,0,1,0,1,4,5].forEach((function(e,t){var n=r[e];n&&(n.children||(n.children=[])).push(r[t])})),Jt(r[0],(function(e,t){return r[e<-x/2?t<0?6:4:e<0?t<0?2:0:e0?[-r[0],0]:[180-r[0],180])};var r=nr.map((function(t){return{face:t,project:e(t)}}));return[-1,0,0,1,0,1,4,5].forEach((function(e,t){var n=r[e];n&&(n.children||(n.children=[])).push(r[t])})),Jt(r[0],(function(e,t){return r[e<-x/2?t<0?6:4:e<0?t<0?2:0:e2||a[0]!=t[0]||a[1]!=t[1])&&(n.push(a),t=a)}return 1===n.length&&e.length>1&&n.push(r(e[e.length-1])),n}function a(e){return e.map(i)}function o(e){if(null==e)return e;var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(o)};break;case"Point":t={type:"Point",coordinates:r(e.coordinates)};break;case"MultiPoint":t={type:e.type,coordinates:n(e.coordinates)};break;case"LineString":t={type:e.type,coordinates:i(e.coordinates)};break;case"MultiLineString":case"Polygon":t={type:e.type,coordinates:a(e.coordinates)};break;case"MultiPolygon":t={type:"MultiPolygon",coordinates:e.coordinates.map(a)};break;default:return e}return null!=e.bbox&&(t.bbox=e.bbox),t}function s(e){var t={type:"Feature",properties:e.properties,geometry:o(e.geometry)};return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),t}if(null!=e)switch(e.type){case"Feature":return s(e);case"FeatureCollection":var l={type:"FeatureCollection",features:e.features.map(s)};return null!=e.bbox&&(l.bbox=e.bbox),l;default:return o(e)}return e},e.geoQuincuncial=xr,e.geoRectangularPolyconic=function(){return J(br).scale(131.215)},e.geoRectangularPolyconicRaw=br,e.geoRobinson=function(){return t.geoProjection(Tr).scale(152.63)},e.geoRobinsonRaw=Tr,e.geoSatellite=function(){var e=2,r=0,n=t.geoProjectionMutator(kr),i=n(e,r);return i.distance=function(t){return arguments.length?n(e=+t,r):e},i.tilt=function(t){return arguments.length?n(e,r=t*S):r*M},i.scale(432.147).clipAngle(C(1/e)*M-1e-6)},e.geoSatelliteRaw=kr,e.geoSinuMollweide=function(){return t.geoProjection(et).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},e.geoSinuMollweideRaw=et,e.geoSinusoidal=function(){return t.geoProjection(Q).scale(152.63)},e.geoSinusoidalRaw=Q,e.geoStitch=function(e){if(null==e)return e;switch(e.type){case"Feature":return Br(e);case"FeatureCollection":var t={type:"FeatureCollection",features:e.features.map(Br)};return null!=e.bbox&&(t.bbox=e.bbox),t;default:return jr(e)}},e.geoTimes=function(){return t.geoProjection(Nr).scale(146.153)},e.geoTimesRaw=Nr,e.geoTwoPointAzimuthal=qr,e.geoTwoPointAzimuthalRaw=Vr,e.geoTwoPointAzimuthalUsa=function(){return qr([-158,21.5],[-77,39]).clipAngle(60).scale(400)},e.geoTwoPointEquidistant=Gr,e.geoTwoPointEquidistantRaw=Hr,e.geoTwoPointEquidistantUsa=function(){return Gr([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)},e.geoVanDerGrinten=function(){return t.geoProjection(Wr).scale(79.4183)},e.geoVanDerGrintenRaw=Wr,e.geoVanDerGrinten2=function(){return t.geoProjection(Zr).scale(79.4183)},e.geoVanDerGrinten2Raw=Zr,e.geoVanDerGrinten3=function(){return t.geoProjection(Yr).scale(79.4183)},e.geoVanDerGrinten3Raw=Yr,e.geoVanDerGrinten4=function(){return t.geoProjection(Xr).scale(127.16)},e.geoVanDerGrinten4Raw=Xr,e.geoWagner=Kr,e.geoWagner7=function(){return Kr().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)},e.geoWagnerRaw=$r,e.geoWagner4=function(){return t.geoProjection(en).scale(176.84)},e.geoWagner4Raw=en,e.geoWagner6=function(){return t.geoProjection(tn).scale(152.63)},e.geoWagner6Raw=tn,e.geoWiechel=function(){return t.geoProjection(rn).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)},e.geoWiechelRaw=rn,e.geoWinkel3=function(){return t.geoProjection(nn).scale(158.837)},e.geoWinkel3Raw=nn,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof e&&typeof t<"u"?n(e,Cg(),Eg()):n(r.d3=r.d3||{},r.d3,r.d3)}}),Lg=m({"src/plots/geo/zoom.js"(e,t){var r=b(),n=ct(),i=He(),a=Math.PI/180,o=180/Math.PI,s={cursor:"pointer"},l={cursor:"auto"};function c(e,t){return r.behavior.zoom().translate(t.translate()).scale(t.scale())}function u(e,t,r){var a=e.id,o=e.graphDiv,s=o.layout,l=s[a],c=o._fullLayout,u=c[a],h={},f={};function p(e,t){h[a+"."+e]=n.nestedProperty(l,e).get(),i.call("_storeDirectGUIEdit",s,c._preGUI,h);var r=n.nestedProperty(u,e);r.get()!==t&&(r.set(t),n.nestedProperty(l,e).set(t),f[a+"."+e]=t)}r(p),p("projection.scale",t.scale()/e.fitScale),p("fitbounds",!1),o.emit("plotly_relayout",f)}function h(e,t){var n=c(0,t);function i(r){var n=t.invert(e.midPt);r("center.lon",n[0]),r("center.lat",n[1])}return n.on("zoomstart",(function(){r.select(this).style(s)})).on("zoom",(function(){t.scale(r.event.scale).translate(r.event.translate),e.render(!0);var n=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":n[0],"geo.center.lat":n[1]})})).on("zoomend",(function(){r.select(this).style(l),u(e,t,i)})),n}function f(e,t){var n,i,a,o,h,f,p,d,m,g=c(0,t);function y(e){return t.invert(e)}function v(r){var n=t.rotate(),i=t.invert(e.midPt);r("projection.rotation.lon",-n[0]),r("center.lon",i[0]),r("center.lat",i[1])}return g.on("zoomstart",(function(){r.select(this).style(s),n=r.mouse(this),i=t.rotate(),a=t.translate(),o=i,h=y(n)})).on("zoom",(function(){if(f=r.mouse(this),function(e){var r=y(e);if(!r)return!0;var n=t(r);return Math.abs(n[0]-e[0])>2||Math.abs(n[1]-e[1])>2}(n))return g.scale(t.scale()),void g.translate(t.translate());t.scale(r.event.scale),t.translate([a[0],r.event.translate[1]]),h?y(f)&&(d=y(f),p=[o[0]+(d[0]-h[0]),i[1],i[2]],t.rotate(p),o=p):h=y(n=f),m=!0,e.render(!0);var s=t.rotate(),l=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":l[0],"geo.center.lat":l[1],"geo.projection.rotation.lon":-s[0]})})).on("zoomend",(function(){r.select(this).style(l),m&&u(e,t,v)})),g}function p(e,t){var n,i={r:t.rotate(),k:t.scale()},h=c(0,t),f=function(e){for(var t=0,n=arguments.length,i=[];++td?(a=(h>0?90:-90)-p,i=0):(a=Math.asin(h/d)*o-p,i=Math.sqrt(d*d-h*h));var g=180-a-2*p,v=(Math.atan2(f,u)-Math.atan2(c,i))*o,x=(Math.atan2(f,u)-Math.atan2(c,-i))*o;return m(r[0],r[1],a,v)<=m(r[0],r[1],g,x)?[a,v,r[2]]:[g,x,r[2]]}(p,n,c);(!isFinite(g[0])||!isFinite(g[1])||!isFinite(g[2]))&&(g=c),t.rotate(g),c=g}}else n=d(t,e=a);!function(e){e({type:"zoom"})}(f.of(this,arguments))})),function(e){p++||e({type:"zoomstart"})}(f.of(this,arguments))})).on("zoomend",(function(){var n;r.select(this).style(l),g.call(h,"zoom",null),n=f.of(this,arguments),--p||n({type:"zoomend"}),u(e,t,x)})).on("zoom.redraw",(function(){e.render(!0);var r=t.rotate();e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.projection.rotation.lon":-r[0],"geo.projection.rotation.lat":-r[1]})})),r.rebind(h,f,"on")}function d(e,t){var r=e.invert(t);return r&&isFinite(r[0])&&isFinite(r[1])&&function(e){var t=e[0]*a,r=e[1]*a,n=Math.cos(r);return[n*Math.cos(t),n*Math.sin(t),Math.sin(r)]}(r)}function m(e,t,r,n){var i=g(r-e),a=g(n-t);return Math.sqrt(i*i+a*a)}function g(e){return(e%360+540)%360-180}function y(e,t,r){var n=r*a,i=e.slice(),o=0===t?1:0,s=2===t?1:2,l=Math.cos(n),c=Math.sin(n);return i[o]=e[o]*l-e[s]*c,i[s]=e[s]*l+e[o]*c,i}function v(e,t){for(var r=0,n=0,i=e.length;n0&&i<0&&(i+=360);var s=(i-n)/4;return{type:"Polygon",coordinates:[[[n,a],[n,o],[n+s,o],[n+2*s,o],[n+3*s,o],[i,o],[i,a],[i-s,a],[i-2*s,a],[i-3*s,a],[n,a]]]}}t.exports=function(e){return new M(e)},S.plot=function(e,t,r,n){var i=this;if(n)return i.update(e,t,!0);i._geoCalcData=e,i._fullLayout=t;var a=t[this.id],o=[],s=!1;for(var l in w.layerNameToAdjective)if("frame"!==l&&a["show"+l]){s=!0;break}for(var c=!1,u=0;u0&&o._module.calcGeoJSON(a,t)}if(!r){if(this.updateProjection(e,t))return;(!this.viewInitial||this.scope!==n.scope)&&this.saveViewInitial(n)}this.scope=n.scope,this.updateBaseLayers(t,n),this.updateDims(t,n),this.updateFx(t,n),p.generalUpdatePerTraceModule(this.graphDiv,this,e,n);var s=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=s.selectAll(".point"),this.dataPoints.text=s.selectAll("text"),this.dataPaths.line=s.selectAll(".js-line");var l=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=l.selectAll("path"),this._render()},S.updateProjection=function(e,t){var r=this.graphDiv,s=t[this.id],c=t._size,u=s.domain,h=s.projection,f=s.lonaxis,p=s.lataxis,d=f._ax,g=p._ax,y=this.projection=function(e){var t=e.projection,r=t.type,s=w.projNames[r];s="geo"+l.titleCase(s);for(var c=(n[s]||o[s])(),u=e._isSatellite?180*Math.acos(1/t.distance)/Math.PI:e._isClipped?w.lonaxisSpan[r]/2:null,h=["center","rotate","parallels","clipExtent"],f=function(e){return e?c:[]},p=0;pu*Math.PI/180}return!1},c.getPath=function(){return i().projection(c)},c.getBounds=function(e){return c.getPath().bounds(e)},c.precision(w.precision),e._isSatellite&&c.tilt(t.tilt).distance(t.distance),u&&c.clipAngle(u-w.clipPad),c}(s),v=[[c.l+c.w*u.x[0],c.t+c.h*(1-u.y[1])],[c.l+c.w*u.x[1],c.t+c.h*(1-u.y[0])]],x=s.center||{},_=h.rotation||{},b=f.range||[],T=p.range||[];if(s.fitbounds){d._length=v[1][0]-v[0][0],g._length=v[1][1]-v[0][1],d.range=m(r,d),g.range=m(r,g);var k=(d.range[0]+d.range[1])/2,A=(g.range[0]+g.range[1])/2;if(s._isScoped)x={lon:k,lat:A};else if(s._isClipped){x={lon:k,lat:A},_={lon:k,lat:A,roll:_.roll};var M=h.type,S=w.lonaxisSpan[M]/2||180,C=w.lataxisSpan[M]/2||90;b=[k-S,k+S],T=[A-C,A+C]}else x={lon:k,lat:A},_={lon:k,lat:_.lat,roll:_.roll}}y.center([x.lon-_.lon,x.lat-_.lat]).rotate([-_.lon,-_.lat,_.roll]).parallels(h.parallels);var I=E(b,T);y.fitExtent(v,I);var L=this.bounds=y.getBounds(I),P=this.fitScale=y.scale(),z=y.translate();if(s.fitbounds){var D=y.getBounds(E(d.range,g.range)),O=Math.min((L[1][0]-L[0][0])/(D[1][0]-D[0][0]),(L[1][1]-L[0][1])/(D[1][1]-D[0][1]));isFinite(O)?y.scale(O*P):l.warn("Something went wrong during"+this.id+"fitbounds computations.")}else y.scale(h.scale*P);var R=this.midPt=[(L[0][0]+L[1][0])/2,(L[0][1]+L[1][1])/2];if(y.translate([z[0]+(R[0]-z[0]),z[1]+(R[1]-z[1])]).clipExtent(L),s._isAlbersUsa){var F=y([x.lon,x.lat]),B=y.translate();y.translate([B[0]-(F[0]-B[0]),B[1]-(F[1]-B[1])])}},S.updateBaseLayers=function(e,t){var n=this,i=n.topojson,a=n.layers,o=n.basePaths;function s(e){return"lonaxis"===e||"lataxis"===e}function l(e){return!!w.lineLayers[e]}function c(e){return!!w.fillLayers[e]}var f=(this.hasChoropleth?w.layersForChoropleth:w.layers).filter((function(e){return l(e)||c(e)?t["show"+e]:!s(e)||t[e].showgrid})),p=n.framework.selectAll(".layer").data(f,String);p.exit().each((function(e){delete a[e],delete o[e],r.select(this).remove()})),p.enter().append("g").attr("class",(function(e){return"layer "+e})).each((function(e){var t=a[e]=r.select(this);"bg"===e?n.bgRect=t.append("rect").style("pointer-events","all"):s(e)?o[e]=t.append("path").style("fill","none"):"backplot"===e?t.append("g").classed("choroplethlayer",!0):"frontplot"===e?t.append("g").classed("scatterlayer",!0):l(e)?o[e]=t.append("path").style("fill","none").style("stroke-miterlimit",2):c(e)&&(o[e]=t.append("path").style("stroke","none"))})),p.order(),p.each((function(r){var n=o[r],a=w.layerNameToAdjective[r];"frame"===r?n.datum(w.sphereSVG):l(r)||c(r)?n.datum(A(i,i.objects[r])):s(r)&&n.datum(function(e,t,r){var n,i,a,o=t[e],s=w.scopeDefaults[t.scope];"lonaxis"===e?(n=s.lonaxisRange,i=s.lataxisRange,a=function(e,t){return[e,t]}):"lataxis"===e&&(n=s.lataxisRange,i=s.lonaxisRange,a=function(e,t){return[t,e]});var l={type:"linear",range:[n[0],n[1]-1e-6],tick0:o.tick0,dtick:o.dtick};d.setConvert(l,r);var c=d.calcTicks(l);!t.isScoped&&"lonaxis"===e&&c.pop();for(var u=c.length,h=new Array(u),f=0;f-1&&x(r.event,i,[n.xaxis],[n.yaxis],n.id,u),c.indexOf("event")>-1&&f.click(i,r.event))}))}function h(e){return n.projection.invert([e[0]+n.xaxis._offset,e[1]+n.yaxis._offset])}},S.makeFramework=function(){var e=this,t=e.graphDiv,n=t._fullLayout,i="clip"+n._uid+e.id;e.clipDef=n._clips.append("clipPath").attr("id",i),e.clipRect=e.clipDef.append("rect"),e.framework=r.select(e.container).append("g").attr("class","geo "+e.id).call(h.setClipUrl,i,t),e.project=function(t){var r=e.projection(t);return r?[r[0]-e.xaxis._offset,r[1]-e.yaxis._offset]:[null,null]},e.xaxis={_id:"x",c2p:function(t){return e.project(t)[0]}},e.yaxis={_id:"y",c2p:function(t){return e.project(t)[1]}},e.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},d.setConvert(e.mockAxis,n)},S.saveViewInitial=function(e){var t,r=e.center||{},n=e.projection,i=n.rotation||{};this.viewInitial={fitbounds:e.fitbounds,"projection.scale":n.scale},t=e._isScoped?{"center.lon":r.lon,"center.lat":r.lat}:e._isClipped?{"projection.rotation.lon":i.lon,"projection.rotation.lat":i.lat}:{"center.lon":r.lon,"center.lat":r.lat,"projection.rotation.lon":i.lon},l.extendFlat(this.viewInitial,t)},S.render=function(e){this._hasMarkerAngles&&e?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},S._render=function(){var e,t=this.projection,r=t.getPath();function n(e){var r=t(e.lonlat);return r?c(r[0],r[1]):null}function i(e){return t.isLonLatOverEdges(e.lonlat)?"none":null}for(e in this.basePaths)this.basePaths[e].attr("d",r);for(e in this.dataPaths)this.dataPaths[e].attr("d",(function(e){return r(e.geojson)}));for(e in this.dataPoints)this.dataPoints[e].attr("display",i).attr("transform",n)}}}),zg=m({"src/plots/geo/layout_attributes.js"(e,t){var r=G(),n=Ma().attributes,i=Oe().dash,a=hg(),o=De().overrideAll,s=Ye(),l={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},showgrid:{valType:"boolean",dflt:!1},tick0:{valType:"number",dflt:0},dtick:{valType:"number"},gridcolor:{valType:"color",dflt:r.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:i};(t.exports=o({domain:n({name:"geo"},{}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:!1,editType:"plot"},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:s(a.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:s(a.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:r.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:a.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:a.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:a.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:a.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:r.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:r.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:r.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:r.background},lonaxis:l,lataxis:l},"plot","from-root")).uirevision={valType:"any",editType:"none"}}}),Dg=m({"src/plots/geo/layout_defaults.js"(e,t){var r=ct(),n=Gs(),i=Tt().getSubplotData,a=hg(),o=zg(),s=a.axesNames;function l(e,t,n,o){var l=i(o.fullData,"geo",o.id).map((function(e){return e.index})),c=n("resolution"),u=n("scope"),h=a.scopeDefaults[u],f=n("projection.type",h.projType),p=t._isAlbersUsa="albers usa"===f;p&&(u=t.scope="usa");var d=t._isScoped="world"!==u,m=t._isSatellite="satellite"===f,g=t._isConic=-1!==f.indexOf("conic")||"albers"===f,y=t._isClipped=!!a.lonaxisSpan[f];if(!1===e.visible){var v=r.extendDeep({},t._template);v.showcoastlines=!1,v.showcountries=!1,v.showframe=!1,v.showlakes=!1,v.showland=!1,v.showocean=!1,v.showrivers=!1,v.showsubunits=!1,v.lonaxis&&(v.lonaxis.showgrid=!1),v.lataxis&&(v.lataxis.showgrid=!1),t._template=v}for(var x=n("visible"),_=0;_0&&L<0&&(L+=360);var P,z,D,O=(I+L)/2;if(!p){var R=d?h.projRotate:[O,0,0];P=n("projection.rotation.lon",R[0]),n("projection.rotation.lat",R[1]),n("projection.rotation.roll",R[2]),n("showcoastlines",!d&&x)&&(n("coastlinecolor"),n("coastlinewidth")),n("showocean",!!x&&void 0)&&n("oceancolor")}p?(z=-96.6,D=38.7):(z=d?O:P,D=(C[0]+C[1])/2),n("center.lon",z),n("center.lat",D),m&&(n("projection.tilt"),n("projection.distance")),g&&n("projection.parallels",h.projParallels||[0,60]),n("projection.scale"),n("showland",!!x&&void 0)&&n("landcolor"),n("showlakes",!!x&&void 0)&&n("lakecolor"),n("showrivers",!!x&&void 0)&&(n("rivercolor"),n("riverwidth")),n("showcountries",d&&"usa"!==u&&x)&&(n("countrycolor"),n("countrywidth")),("usa"===u||"north america"===u&&50===c)&&(n("showsubunits",x),n("subunitcolor"),n("subunitwidth")),d||n("showframe",x)&&(n("framecolor"),n("framewidth")),n("bgcolor"),n("fitbounds")&&(delete t.projection.scale,d?(delete t.center.lon,delete t.center.lat):y?(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon,delete t.projection.rotation.lat,delete t.lonaxis.range,delete t.lataxis.range):(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon))}t.exports=function(e,t,r){n(e,t,r,{type:"geo",attributes:o,handleDefaults:l,fullData:r,partition:"y"})}}}),Og=m({"src/plots/geo/index.js"(e,t){var r=Tt().getSubplotCalcData,n=ct().counterRegex,i=Pg(),a="geo",o=n(a),s={};s[a]={valType:"subplotid",dflt:a,editType:"calc"},t.exports={attr:a,name:a,idRoot:a,idRegex:o,attrRegex:o,attributes:s,layoutAttributes:zg(),supplyLayoutDefaults:Dg(),plot:function(e){for(var t=e._fullLayout,n=e.calcdata,o=t._subplots[a],s=0;s")}}(e,h,o),[e]}}}),Hg=m({"src/traces/choropleth/event_data.js"(e,t){t.exports=function(e,t,r,n,i){e.location=t.location,e.z=t.z;var a=n[i];return a.fIn&&a.fIn.properties&&(e.properties=a.fIn.properties),e.ct=a.ct,e}}}),Gg=m({"src/traces/choropleth/select.js"(e,t){t.exports=function(e,t){var r,n,i,a,o,s=e.cd,l=e.xaxis,c=e.yaxis,u=[];if(!1===t)for(r=0;r=Math.min(P,z)&&p<=Math.max(P,z)?0:1/0}if(A=Math.min(D,O)&&d<=Math.max(D,O)?0:1/0}E=Math.sqrt(A*A+M*M),b=i[k]}}}else for(k=i.length-1;k>-1;k--)w=h[_=i[k]],T=f[_],A=c.c2p(w)-p,M=u.c2p(T)-d,(S=Math.sqrt(A*A+M*M))100},e.isDotSymbol=function(e){return"string"==typeof e?t.DOT_RE.test(e):e>200}}}),Jg=m({"src/traces/scattergl/defaults.js"(e,t){var r=ct(),n=He(),i=Kg(),a=$g(),o=wn(),s=Xt(),l=Gn(),c=Wn(),u=Yn(),h=Xn(),f=Jn(),p=Kn();t.exports=function(e,t,d,m){function g(n,i){return r.coerce(e,t,a,n,i)}var y=!!e.marker&&i.isOpenSymbol(e.marker.symbol),v=s.isBubble(e),x=l(e,t,m,g);if(x){c(e,t,m,g),g("xhoverformat"),g("yhoverformat");var _=x>>1,s=e[o];(void 0!==r?r(s,t):s-t)>=0?(a=o,i=o-1):n=o+1}return a}function n(e,t,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=e[o];(void 0!==r?r(s,t):s-t)>0?(a=o,i=o-1):n=o+1}return a}function i(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o];(void 0!==r?r(s,t):s-t)<0?(a=o,n=o+1):i=o-1}return a}function a(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o];(void 0!==r?r(s,t):s-t)<=0?(a=o,n=o+1):i=o-1}return a}function o(e,t,r,n,i){for(;n<=i;){var a=n+i>>>1,o=e[a],s=void 0!==r?r(o,t):o-t;if(0===s)return a;s<=0?n=a+1:i=a-1}return-1}function s(e,t,r,n,i,a){return"function"==typeof r?a(e,t,r,void 0===n?0:0|n,void 0===i?e.length-1:0|i):a(e,t,void 0,void 0===r?0:0|r,void 0===n?e.length-1:0|n)}t.exports={ge:function(e,t,n,i,a){return s(e,t,n,i,a,r)},gt:function(e,t,r,i,a){return s(e,t,r,i,a,n)},lt:function(e,t,r,n,a){return s(e,t,r,n,a,i)},le:function(e,t,r,n,i){return s(e,t,r,n,i,a)},eq:function(e,t,r,n,i){return s(e,t,r,n,i,o)}}}}),ty=m({"node_modules/pick-by-alias/index.js"(e,t){t.exports=function(e,t,r){var i,a,o={};if("string"==typeof t&&(t=n(t)),Array.isArray(t)){var s={};for(a=0;a1&&(e=arguments),"string"==typeof e?e=e.split(/\s/).map(parseFloat):"number"==typeof e&&(e=[e]),e.length&&"number"==typeof e[0]?t=1===e.length?{width:e[0],height:e[0],x:0,y:0}:2===e.length?{width:e[0],height:e[1],x:0,y:0}:{x:e[0],y:e[1],width:e[2]-e[0]||0,height:e[3]-e[1]||0}:e&&(t={x:(e=r(e,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"})).left||0,y:e.top||0},null==e.width?e.right?t.width=e.right-t.x:t.width=0:t.width=e.width,null==e.height?e.bottom?t.height=e.bottom-t.y:t.height=0:t.height=e.height),t}}}),ny=m({"node_modules/array-bounds/index.js"(e,t){t.exports=function(e,t){if(!e||null==e.length)throw Error("Argument should be an array");t=null==t?1:Math.floor(t);for(var r=Array(2*t),n=0;ni&&(i=e[o]),e[o]>>1;t.dtype||(t.dtype="array"),"string"==typeof t.dtype?d=new(u(t.dtype))(g):t.dtype&&(d=t.dtype,Array.isArray(d)&&(d.length=g));for(let e=0;en||s>1073741824){for(let e=0;er+i||b>n+i||T=A||o===s)return;let c=y[a];void 0===s&&(s=c.length);for(let t=o;t=l&&n<=d&&i>=u&&i<=m&&M.push(r)}let h=v[a],f=h[4*o+0],p=h[4*o+1],x=h[4*o+2],_=h[4*o+3],w=function(e,t){let r=null,n=0;for(;null===r;)if(r=e[4*t+n],n++,n>e.length)return null;return r}(h,o+1),S=.5*i,E=a+1;t(r,n,S,E,f,p||x||_||w),t(r,n+S,S,E,p,x||_||w),t(r+S,n,S,E,x,_||w),t(r+S,n+S,S,E,_,w)}(0,0,1,0,0,1),M},d;function w(e,t,r){let n=1,i=.5,a=.5,o=.5;for(let s=0;s1&&(i=1),i<-1&&(i=-1),(e*n-t*r<0?-1:1)*Math.acos(i)};e.default=function(e){var t=e.px,o=e.py,s=e.cx,l=e.cy,c=e.rx,u=e.ry,h=e.xAxisRotation,f=void 0===h?0:h,p=e.largeArcFlag,d=void 0===p?0:p,m=e.sweepFlag,g=void 0===m?0:m,y=[];if(0===c||0===u)return[];var v=Math.sin(f*r/360),x=Math.cos(f*r/360),_=x*(t-s)/2+v*(o-l)/2,b=-v*(t-s)/2+x*(o-l)/2;if(0===_&&0===b)return[];c=Math.abs(c),u=Math.abs(u);var w=Math.pow(_,2)/Math.pow(c,2)+Math.pow(b,2)/Math.pow(u,2);w>1&&(c*=Math.sqrt(w),u*=Math.sqrt(w));var T=function(e,t,n,i,o,s,l,c,u,h,f,p){var d=Math.pow(o,2),m=Math.pow(s,2),g=Math.pow(f,2),y=Math.pow(p,2),v=d*m-d*y-m*g;v<0&&(v=0),v/=d*y+m*g;var x=(v=Math.sqrt(v)*(l===c?-1:1))*o/s*p,_=v*-s/o*f,b=h*x-u*_+(e+n)/2,w=u*x+h*_+(t+i)/2,T=(f-x)/o,k=(p-_)/s,A=(-f-x)/o,M=(-p-_)/s,S=a(1,0,T,k),E=a(T,k,A,M);return 0===c&&E>0&&(E-=r),1===c&&E<0&&(E+=r),[b,w,S,E]}(t,o,s,l,c,u,d,g,v,x,_,b),k=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw a}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(T,4),A=k[0],M=k[1],S=k[2],E=k[3],C=Math.abs(E)/(r/4);Math.abs(1-C)<1e-7&&(C=1);var I=Math.max(Math.ceil(C),1);E/=I;for(var L=0;L4?(o=g[g.length-4],s=g[g.length-3]):(o=f,s=p),a.push(g)}return a};var r=hy();function n(e,t,r,n){return["C",e,t,r,n,r,n]}function i(e,t,r,n,i,a){return["C",e/3+2/3*r,t/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}}}),py=m({"node_modules/is-svg-path/index.js"(e,t){t.exports=function(e){return"string"==typeof e&&(e=e.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(e)&&/[\dz]$/i.test(e)&&e.length>4))}}}),dy=m({"node_modules/svg-path-bounds/index.js"(e,t){var r=Jt(),n=uy(),i=fy(),a=py(),o=wu();t.exports=function(e){if(Array.isArray(e)&&1===e.length&&"string"==typeof e[0]&&(e=e[0]),"string"==typeof e&&(o(a(e),"String is not an SVG path."),e=r(e)),o(Array.isArray(e),"Argument should be a string or an array of path segments."),e=n(e),!(e=i(e)).length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],s=0,l=e.length;st[2]&&(t[2]=c[u+0]),c[u+1]>t[3]&&(t[3]=c[u+1]);return t}}}),my=m({"node_modules/normalize-svg-path/index.js"(e,t){var r=Math.PI,n=l(120);function i(e,t,r,n){return["C",e,t,r,n,r,n]}function a(e,t,r,n,i,a){return["C",e/3+2/3*r,t/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}function o(e,t,i,a,l,c,u,h,f,p){if(p)T=p[0],k=p[1],b=p[2],w=p[3];else{var d=s(e,t,-l);e=d.x,t=d.y;var m=(e-(h=(d=s(h,f,-l)).x))/2,g=(t-(f=d.y))/2,y=m*m/(i*i)+g*g/(a*a);y>1&&(i*=y=Math.sqrt(y),a*=y);var v=i*i,x=a*a,_=(c==u?-1:1)*Math.sqrt(Math.abs((v*x-v*g*g-x*m*m)/(v*g*g+x*m*m)));_==1/0&&(_=1);var b=_*i*g/a+(e+h)/2,w=_*-a*m/i+(t+f)/2,T=Math.asin(((t-w)/a).toFixed(9)),k=Math.asin(((f-w)/a).toFixed(9));(T=ek&&(T-=2*r),!u&&k>T&&(k-=2*r)}if(Math.abs(k-T)>n){var A=k,M=h,S=f;k=T+n*(u&&k>T?1:-1);var E=o(h=b+i*Math.cos(k),f=w+a*Math.sin(k),i,a,l,0,u,M,S,[k,A,b,w])}var C=Math.tan((k-T)/4),I=4/3*i*C,L=4/3*a*C,P=[2*e-(e+I*Math.sin(T)),2*t-(t-L*Math.cos(T)),h+I*Math.sin(k),f-L*Math.cos(k),h,f];if(p)return P;E&&(P=P.concat(E));for(var z=0;z7&&(r.push(y.splice(0,7)),y.unshift("C"));break;case"S":var x=p,_=d;("C"==t||"S"==t)&&(x+=x-n,_+=_-s),y=["C",x,_,y[1],y[2],y[3],y[4]];break;case"T":"Q"==t||"T"==t?(h=2*p-h,f=2*d-f):(h=p,f=d),y=a(p,d,h,f,y[1],y[2]);break;case"Q":h=y[1],f=y[2],y=a(p,d,y[1],y[2],y[3],y[4]);break;case"L":y=i(p,d,y[1],y[2]);break;case"H":y=i(p,d,y[1],d);break;case"V":y=i(p,d,p,y[1]);break;case"Z":y=i(p,d,c,u)}t=v,p=y[y.length-2],d=y[y.length-1],y.length>4?(n=y[y.length-4],s=y[y.length-3]):(n=p,s=d),r.push(y)}return r}}}),gy=m({"node_modules/draw-svg-path/index.js"(e,t){var r=uy(),n=my(),i={M:"moveTo",C:"bezierCurveTo"};t.exports=function(e,t){e.beginPath(),n(r(t)).forEach((function(t){var r=t[0],n=t.slice(1);e[i[r]].apply(e,n)})),e.closePath()}}}),yy=m({"node_modules/bitmap-sdf/index.js"(e,t){var r=Jd();t.exports=function(e,t){t||(t={});var a,o,s,l,c,u,h,f,p,d,m,g=null==t.cutoff?.25:t.cutoff,y=null==t.radius?8:t.radius,v=t.channel||0;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");a=t.width,o=t.height,l=e,u=t.stride?t.stride:Math.floor(e.length/a/o)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(h=(f=e).getContext("2d"),a=f.width,o=f.height,l=(p=h.getImageData(0,0,a,o)).data,u=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(h=e,a=(f=e.canvas).width,o=f.height,l=(p=h.getImageData(0,0,a,o)).data,u=4):window.ImageData&&e instanceof window.ImageData&&(p=e,a=e.width,o=e.height,l=p.data,u=4);if(s=Math.max(a,o),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(c=l,l=Array(a*o),d=0,m=c.length;d0?"white":"black",c.lineWidth=Math.abs(p)),c.translate(.5*u,.5*h),c.scale(g,g),function(){if(null!=r)return r;var e=document.createElement("canvas").getContext("2d");if(e.canvas.width=e.canvas.height=1,!window.Path2D)return r=!1;var t=new Path2D("M0,0h1v1h-1v-1Z");e.fillStyle="black",e.fill(t);var n=e.getImageData(0,0,1,1);return r=n&&n.data&&255===n.data[3]}()){var y=new Path2D(e);c.fill(y),p&&c.stroke(y)}else{var v=i(e);a(c,v),c.fill(),p&&c.stroke()}return c.setTransform(1,0,0,1,0,0),s(c,{cutoff:null!=t.cutoff?t.cutoff:.5,radius:null!=t.radius?t.radius:.5*f})}}}),xy=m({"src/traces/scattergl/convert.js"(e,t){var r=M(),n=vy(),i=em(),a=He(),o=ct(),s=o.isArrayOrTypedArray,l=er(),c=_t(),u=rm().formatColor,h=Xt(),f=$t(),p=Kg(),d=Xg(),m=Z().DESELECTDIM,g={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},y=Kt().appendArrayPointValue;function v(e,t){var n,i=e._fullLayout,a=t._length,l=t.textfont,c=t.textposition,u=s(c)?c:[c],h=l.color,f=l.size,p=l.family,d=l.weight,m=l.style,g=l.variant,v={},_=e._context.plotGlPixelRatio,b=t.texttemplate;if(b){v.text=[];var w=i._d3locale,T=Array.isArray(b),k=T?Math.min(b.length,a):a,A=T?function(e){return b[e]}:function(){return b};for(n=0;n500?"bold":"normal":e}function _(e,t){var r,n,a=t._length,o=t.marker,l={},c=s(o.symbol),h=s(o.angle),d=s(o.color),m=s(o.line.color),g=s(o.opacity),y=s(o.size),v=s(o.line.width);if(c||(n=p.isOpenSymbol(o.symbol)),c||d||m||g||h){l.symbols=new Array(a),l.angles=new Array(a),l.colors=new Array(a),l.borderColors=new Array(a);var x=o.symbol,_=o.angle,b=u(o,o.opacity,a),w=u(o.line,o.opacity,a);if(!s(w[0])){var T=w;for(w=Array(a),r=0;rd.TOO_MANY_POINTS||h.hasMarkers(t)?"rect":"round";if(c&&t.connectgaps){var f=n[0],p=n[1];for(i=0;i1?c[i]:c[0]:c,m=s(u)?u.length>1?u[i]:u[0]:u,y=g[d],v=g[m],x=f?f/.8+1:0,_=-v*x-.5*v;o.offset[i]=[y*x/p,_/p]}}return o}}}}),_y=m({"src/traces/scattergl/scene_update.js"(e,t){var r=ct();t.exports=function(e,t){var n=t._scene,i={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},a={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return t._scene||((n=t._scene={}).init=function(){r.extendFlat(n,a,i)},n.init(),n.update=function(e){var t=r.repeat(e,n.count);if(n.fill2d&&n.fill2d.update(t),n.scatter2d&&n.scatter2d.update(t),n.line2d&&n.line2d.update(t),n.error2d&&n.error2d.update(t.concat(t)),n.select2d&&n.select2d.update(t),n.glText)for(var i=0;i=m,w=2*_,T={},k=y.makeCalcdata(t,"x"),A=v.makeCalcdata(t,"y"),M=o(t,y,"x",k),S=o(t,v,"y",A),E=M.vals,C=S.vals;t._x=E,t._y=C,t.xperiodalignment&&(t._origX=k,t._xStarts=M.starts,t._xEnds=M.ends),t.yperiodalignment&&(t._origY=A,t._yStarts=S.starts,t._yEnds=S.ends);var I=new Array(w),L=new Array(_);for(a=0;a<_;a++)I[2*a]=E[a]===d?NaN:E[a],I[2*a+1]=C[a]===d?NaN:C[a],L[a]=a;if("log"===y.type)for(a=0;a1&&n.extendFlat(s.line,f.linePositions(e,r,i)),s.errorX||s.errorY){var l=f.errorBarPositions(e,r,i,a,o);s.errorX&&n.extendFlat(s.errorX,l.x),s.errorY&&n.extendFlat(s.errorY,l.y)}return s.text&&(n.extendFlat(s.text,{positions:i},f.textPosition(e,r,s.text,s.marker)),n.extendFlat(s.textSel,{positions:i},f.textPosition(e,r,s.text,s.markerSel)),n.extendFlat(s.textUnsel,{positions:i},f.textPosition(e,r,s.text,s.markerUnsel))),s}(e,0,t,I,E,C),D=p(e,x);return u(s,t),b?z.marker&&(P=z.marker.sizeAvg||Math.max(z.marker.size,3)):P=l(t,_),c(e,t,y,v,E,C,P),z.errorX&&g(t,y,z.errorX),z.errorY&&g(t,v,z.errorY),z.fill&&!D.fill2d&&(D.fill2d=!0),z.marker&&!D.scatter2d&&(D.scatter2d=!0),z.line&&!D.line2d&&(D.line2d=!0),(z.errorX||z.errorY)&&!D.error2d&&(D.error2d=!0),z.text&&!D.glText&&(D.glText=!0),z.marker&&(z.marker.snap=_),D.lineOptions.push(z.line),D.errorXOptions.push(z.errorX),D.errorYOptions.push(z.errorY),D.fillOptions.push(z.fill),D.markerOptions.push(z.marker),D.markerSelectedOptions.push(z.markerSel),D.markerUnselectedOptions.push(z.markerUnsel),D.textOptions.push(z.text),D.textSelectedOptions.push(z.textSel),D.textUnselectedOptions.push(z.textUnsel),D.selectBatch.push([]),D.unselectBatch.push([]),T._scene=D,T.index=D.count,T.x=E,T.y=C,T.positions=I,D.count++,[{x:!1,y:!1,t:T,trace:t}]}}}),wy=m({"src/traces/scattergl/edit_style.js"(e,t){var r=ct(),n=W(),i=Z().DESELECTDIM;t.exports={styleTextSelection:function(e){var t,a,o=e[0],s=o.trace,l=o.t,c=l._scene,u=l.index,h=c.selectBatch[u],f=c.unselectBatch[u],p=c.textOptions[u],d=c.textSelectedOptions[u]||{},m=c.textUnselectedOptions[u]||{},g=r.extendFlat({},p);if(h.length||f.length){var y=d.color,v=m.color,x=p.color,_=r.isArrayOrTypedArray(x);for(g.color=new Array(s._length),t=0;t>>24,n=(16711680&e)>>>16,i=(65280&e)>>>8,a=255&e;return!1===t?[r,n,i,a]:[r/255,n/255,i/255,a/255]}}}),My=m({"node_modules/object-assign/index.js"(e,t){var r=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch{return!1}}()?Object.assign:function(e,t){for(var a,o,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;le.length)&&(t=e.length);for(var r=0,n=new Array(t);r 1.0 + delta) {\n\t\tdiscard;\n\t}\n\n\talpha -= smoothstep(1.0 - delta, 1.0 + delta, radius);\n\n\tfloat borderRadius = fragBorderRadius;\n\tfloat ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius);\n\tvec4 color = mix(fragColor, fragBorderColor, ratio);\n\tcolor.a *= alpha * opacity;\n\tgl_FragColor = color;\n}\n"]),c.vert=h(["precision highp float;\n#define GLSLIFY 1\n\nattribute float x, y, xFract, yFract;\nattribute float size, borderSize;\nattribute vec4 colorId, borderColorId;\nattribute float isActive;\n\n// `invariant` effectively turns off optimizations for the position.\n// We need this because -fast-math on M1 Macs is re-ordering\n// floating point operations in a way that causes floating point\n// precision limits to put points in the wrong locations.\ninvariant gl_Position;\n\nuniform bool constPointSize;\nuniform float pixelRatio;\nuniform vec2 paletteSize, scale, scaleFract, translate, translateFract;\nuniform sampler2D paletteTexture;\n\nconst float maxSize = 100.;\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragBorderRadius, fragWidth;\n\nfloat pointSizeScale = (constPointSize) ? 2. : pixelRatio;\n\nbool isDirect = (paletteSize.x < 1.);\n\nvec4 getColor(vec4 id) {\n return isDirect ? id / 255. : texture2D(paletteTexture,\n vec2(\n (id.x + .5) / paletteSize.x,\n (id.y + .5) / paletteSize.y\n )\n );\n}\n\nvoid main() {\n // ignore inactive points\n if (isActive == 0.) return;\n\n vec2 position = vec2(x, y);\n vec2 positionFract = vec2(xFract, yFract);\n\n vec4 color = getColor(colorId);\n vec4 borderColor = getColor(borderColorId);\n\n float size = size * maxSize / 255.;\n float borderSize = borderSize * maxSize / 255.;\n\n gl_PointSize = (size + borderSize) * pointSizeScale;\n\n vec2 pos = (position + translate) * scale\n + (positionFract + translateFract) * scale\n + (position + translate) * scaleFract\n + (positionFract + translateFract) * scaleFract;\n\n gl_Position = vec4(pos * 2. - 1., 0., 1.);\n\n fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);\n fragColor = color;\n fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;\n fragWidth = 1. / gl_PointSize;\n}\n"]),m&&(c.frag=c.frag.replace("smoothstep","smoothStep"),l.frag=l.frag.replace("smoothstep","smoothStep")),this.drawCircle=e(c)}x.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4},x.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},x.prototype.draw=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;nn)?t.tree=c(e,{bounds:h}):n&&n.length&&(t.tree=n),t.tree){var f={primitive:"points",usage:"static",data:t.tree,type:"uint32"};t.elements?t.elements(f):t.elements=o.elements(f)}var p=g.float32(e);return i({data:p,usage:"dynamic"}),a({data:g.fract32(e,p),usage:"dynamic"}),l({data:new Uint8Array(u),type:"uint8",usage:"stream"}),e}},{marker:function(t,r,n){var i=r.activation;if(i.forEach((function(e){return e&&e.destroy&&e.destroy()})),i.length=0,t&&"number"!=typeof t[0]){for(var a=[],s=0,l=Math.min(t.length,r.count);s=0)return a;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)t=e;else{t=new Uint8Array(e.length);for(var o=0,s=e.length;o4*n&&(this.tooManyColors=!0),this.updatePalette(r),1===i.length?i[0]:i},x.prototype.updatePalette=function(e){if(!this.tooManyColors){var t=this.maxColors,r=this.paletteTexture,n=Math.ceil(.25*e.length/t);if(n>1)for(var i=.25*(e=e.slice()).length%t;i80*r){i=s=e[0],o=l=e[1];for(var x=r;xs&&(s=c),f>l&&(l=f);p=0!==(p=Math.max(s-i,l-o))?32767/p:0}return a(y,v,r,i,o,p,0),v}function n(e,t,r,n,i){var a,o;if(i===S(e,t,r,n)>0)for(a=t;a=t;a-=n)o=k(a,e[a],e[a+1],o);return o&&v(o,o.next)&&(A(o),o=o.next),o}function i(e,t){if(!e)return e;t||(t=e);var r,n=e;do{if(r=!1,n.steiner||!v(n,n.next)&&0!==y(n.prev,n,n.next))n=n.next;else{if(A(n),(n=t=n.prev)===n.next)break;r=!0}}while(r||n!==t);return t}function a(e,t,r,n,u,h,f){if(e){!f&&h&&function(e,t,r,n){var i=e;do{0===i.z&&(i.z=p(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,r,n,i,a,o,s,l,c=1;do{for(r=e,e=null,a=null,o=0;r;){for(o++,n=r,s=0,t=0;t0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;r=n}a.nextZ=null,c*=2}while(o>1)}(i)}(e,n,u,h);for(var d,m,g=e;e.prev!==e.next;)if(d=e.prev,m=e.next,h?s(e,n,u,h):o(e))t.push(d.i/r|0),t.push(e.i/r|0),t.push(m.i/r|0),A(e),e=m.next,g=m.next;else if((e=m)===g){f?1===f?a(e=l(i(e),t,r),t,r,n,u,h,2):2===f&&c(e,t,r,n,u,h):a(i(e),t,r,n,u,h,1);break}}}function o(e){var t=e.prev,r=e,n=e.next;if(y(t,r,n)>=0)return!1;for(var i=t.x,a=r.x,o=n.x,s=t.y,l=r.y,c=n.y,u=ia?i>o?i:o:a>o?a:o,p=s>l?s>c?s:c:l>c?l:c,d=n.next;d!==t;){if(d.x>=u&&d.x<=f&&d.y>=h&&d.y<=p&&m(i,s,a,l,o,c,d.x,d.y)&&y(d.prev,d,d.next)>=0)return!1;d=d.next}return!0}function s(e,t,r,n){var i=e.prev,a=e,o=e.next;if(y(i,a,o)>=0)return!1;for(var s=i.x,l=a.x,c=o.x,u=i.y,h=a.y,f=o.y,d=sl?s>c?s:c:l>c?l:c,x=u>h?u>f?u:f:h>f?h:f,_=p(d,g,t,r,n),b=p(v,x,t,r,n),w=e.prevZ,T=e.nextZ;w&&w.z>=_&&T&&T.z<=b;){if(w.x>=d&&w.x<=v&&w.y>=g&&w.y<=x&&w!==i&&w!==o&&m(s,u,l,h,c,f,w.x,w.y)&&y(w.prev,w,w.next)>=0||(w=w.prevZ,T.x>=d&&T.x<=v&&T.y>=g&&T.y<=x&&T!==i&&T!==o&&m(s,u,l,h,c,f,T.x,T.y)&&y(T.prev,T,T.next)>=0))return!1;T=T.nextZ}for(;w&&w.z>=_;){if(w.x>=d&&w.x<=v&&w.y>=g&&w.y<=x&&w!==i&&w!==o&&m(s,u,l,h,c,f,w.x,w.y)&&y(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;T&&T.z<=b;){if(T.x>=d&&T.x<=v&&T.y>=g&&T.y<=x&&T!==i&&T!==o&&m(s,u,l,h,c,f,T.x,T.y)&&y(T.prev,T,T.next)>=0)return!1;T=T.nextZ}return!0}function l(e,t,r){var n=e;do{var a=n.prev,o=n.next.next;!v(a,o)&&x(a,n,n.next,o)&&w(a,o)&&w(o,a)&&(t.push(a.i/r|0),t.push(n.i/r|0),t.push(o.i/r|0),A(n),A(n.next),n=e=o),n=n.next}while(n!==e);return i(n)}function c(e,t,r,n,o,s){var l=e;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&g(l,c)){var u=T(l,c);return l=i(l,l.next),u=i(u,u.next),a(l,t,r,n,o,s,0),void a(u,t,r,n,o,s,0)}c=c.next}l=l.next}while(l!==e)}function u(e,t){return e.x-t.x}function h(e,t){var r=function(e,t){var r,n=t,i=e.x,a=e.y,o=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>o&&(o=s,r=n.x=n.x&&n.x>=u&&i!==n.x&&m(ar.x||n.x===r.x&&f(r,n)))&&(r=n,p=l)),n=n.next}while(n!==c);return r}(e,t);if(!r)return t;var n=T(r,e);return i(n,n.next),i(r,r.next)}function f(e,t){return y(e.prev,e,t.prev)<0&&y(t.next,e,e.next)<0}function p(e,t,r,n,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function d(e){var t=e,r=e;do{(t.x=(e-o)*(a-s)&&(e-o)*(n-s)>=(r-o)*(t-s)&&(r-o)*(a-s)>=(i-o)*(n-s)}function g(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&x(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(e,t)&&(w(e,t)&&w(t,e)&&function(e,t){var r=e,n=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do{r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}(e,t)&&(y(e.prev,e,t.prev)||y(e,t.prev,t))||v(e,t)&&y(e.prev,e,e.next)>0&&y(t.prev,t,t.next)>0)}function y(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function v(e,t){return e.x===t.x&&e.y===t.y}function x(e,t,r,n){var i=b(y(e,t,r)),a=b(y(e,t,n)),o=b(y(r,n,e)),s=b(y(r,n,t));return!!(i!==a&&o!==s||0===i&&_(e,r,t)||0===a&&_(e,n,t)||0===o&&_(r,e,n)||0===s&&_(r,t,n))}function _(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function b(e){return e>0?1:e<0?-1:0}function w(e,t){return y(e.prev,e,e.next)<0?y(e,t,e.next)>=0&&y(e,e.prev,t)>=0:y(e,t,e.prev)<0||y(e,e.next,t)<0}function T(e,t){var r=new M(e.i,e.x,e.y),n=new M(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function k(e,t,r,n){var i=new M(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function A(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function M(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function S(e,t,r,n){for(var i=0,a=t,o=r-n;a0&&(n+=e[i-1].length,r.holes.push(n))}return r}}}),zy=m({"node_modules/array-normalize/index.js"(e,t){var r=ny();t.exports=function(e,t,n){if(!e||null==e.length)throw Error("Argument should be an array");null==t&&(t=1),null==n&&(n=r(e,t));for(var i=0;i-1}}}),av=m({"node_modules/es5-ext/string/#/contains/index.js"(e,t){t.exports=nv()()?String.prototype.contains:iv()}}),ov=m({"node_modules/d/index.js"(e,t){var r=Gy(),n=Xy(),i=tv(),a=rv(),o=av(),s=t.exports=function(e,t){var n,s,l,c,u;return arguments.length<2||"string"!=typeof e?(c=t,t=e,e=null):c=arguments[2],r(e)?(n=o.call(e,"c"),s=o.call(e,"e"),l=o.call(e,"w")):(n=l=!0,s=!1),u={value:t,configurable:n,enumerable:s,writable:l},c?i(a(c),u):u};s.gs=function(e,t,s){var l,c,u,h;return"string"!=typeof e?(u=s,s=t,t=e,e=null):u=arguments[3],r(t)?n(t)?r(s)?n(s)||(u=s,s=void 0):s=void 0:(u=t,t=s=void 0):t=void 0,r(e)?(l=o.call(e,"c"),c=o.call(e,"e")):(l=!0,c=!1),h={get:t,set:s,configurable:l,enumerable:c},u?i(a(u),h):h}}}),sv=m({"node_modules/es5-ext/function/is-arguments.js"(e,t){var r=Object.prototype.toString,n=r.call(function(){return arguments}());t.exports=function(e){return r.call(e)===n}}}),lv=m({"node_modules/es5-ext/string/is-string.js"(e,t){var r=Object.prototype.toString,n=r.call("");t.exports=function(e){return"string"==typeof e||e&&"object"==typeof e&&(e instanceof String||r.call(e)===n)||!1}}}),cv=m({"node_modules/ext/global-this/is-implemented.js"(e,t){t.exports=function(){return!("object"!=typeof globalThis||!globalThis)&&globalThis.Array===Array}}}),uv=m({"node_modules/ext/global-this/implementation.js"(e,t){var r=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")};t.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return r()}try{return __global__||r()}finally{delete Object.prototype.__global__}}()}}),hv=m({"node_modules/ext/global-this/index.js"(e,t){t.exports=cv()()?globalThis:uv()}}),fv=m({"node_modules/es6-symbol/is-implemented.js"(e,t){var r=hv(),n={object:!0,symbol:!0};t.exports=function(){var e,t=r.Symbol;if("function"!=typeof t)return!1;e=t("test symbol");try{String(e)}catch{return!1}return!(!n[typeof t.iterator]||!n[typeof t.toPrimitive]||!n[typeof t.toStringTag])}}}),pv=m({"node_modules/es6-symbol/is-symbol.js"(e,t){t.exports=function(e){return!(!e||"symbol"!=typeof e&&(!e.constructor||"Symbol"!==e.constructor.name||"Symbol"!==e[e.constructor.toStringTag]))}}}),dv=m({"node_modules/es6-symbol/validate-symbol.js"(e,t){var r=pv();t.exports=function(e){if(!r(e))throw new TypeError(e+" is not a symbol");return e}}}),mv=m({"node_modules/es6-symbol/lib/private/generate-name.js"(e,t){var r=ov(),n=Object.create,i=Object.defineProperty,a=Object.prototype,o=n(null);t.exports=function(e){for(var t,n,s=0;o[e+(s||"")];)++s;return o[e+=s||""]=!0,i(a,t="@@"+e,r.gs(null,(function(e){n||(n=!0,i(this,t,r(e)),n=!1)}))),t}}}),gv=m({"node_modules/es6-symbol/lib/private/setup/standard-symbols.js"(e,t){var r=ov(),n=hv().Symbol;t.exports=function(e){return Object.defineProperties(e,{hasInstance:r("",n&&n.hasInstance||e("hasInstance")),isConcatSpreadable:r("",n&&n.isConcatSpreadable||e("isConcatSpreadable")),iterator:r("",n&&n.iterator||e("iterator")),match:r("",n&&n.match||e("match")),replace:r("",n&&n.replace||e("replace")),search:r("",n&&n.search||e("search")),species:r("",n&&n.species||e("species")),split:r("",n&&n.split||e("split")),toPrimitive:r("",n&&n.toPrimitive||e("toPrimitive")),toStringTag:r("",n&&n.toStringTag||e("toStringTag")),unscopables:r("",n&&n.unscopables||e("unscopables"))})}}}),yv=m({"node_modules/es6-symbol/lib/private/setup/symbol-registry.js"(e,t){var r=ov(),n=dv(),i=Object.create(null);t.exports=function(e){return Object.defineProperties(e,{for:r((function(t){return i[t]?i[t]:i[t]=e(String(t))})),keyFor:r((function(e){var t;for(t in n(e),i)if(i[t]===e)return t}))})}}}),vv=m({"node_modules/es6-symbol/polyfill.js"(e,t){var r,n,i,a=ov(),o=dv(),s=hv().Symbol,l=mv(),c=gv(),u=yv(),h=Object.create,f=Object.defineProperties,p=Object.defineProperty;if("function"==typeof s)try{String(s()),i=!0}catch{}else s=null;n=function(e){if(this instanceof n)throw new TypeError("Symbol is not a constructor");return r(e)},t.exports=r=function e(t){var r;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return i?s(t):(r=h(n.prototype),t=void 0===t?"":String(t),f(r,{__description__:a("",t),__name__:a("",l(t))}))},c(r),u(r),f(n.prototype,{constructor:a(r),toString:a("",(function(){return this.__name__}))}),f(r.prototype,{toString:a((function(){return"Symbol ("+o(this).__description__+")"})),valueOf:a((function(){return o(this)}))}),p(r.prototype,r.toPrimitive,a("",(function(){var e=o(this);return"symbol"==typeof e?e:e.toString()}))),p(r.prototype,r.toStringTag,a("c","Symbol")),p(n.prototype,r.toStringTag,a("c",r.prototype[r.toStringTag])),p(n.prototype,r.toPrimitive,a("c",r.prototype[r.toPrimitive]))}}),xv=m({"node_modules/es6-symbol/index.js"(e,t){t.exports=fv()()?hv().Symbol:vv()}}),_v=m({"node_modules/es5-ext/array/#/clear.js"(e,t){var r=jy();t.exports=function(){return r(this).length=0,this}}}),bv=m({"node_modules/es5-ext/object/valid-callable.js"(e,t){t.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}}}),wv=m({"node_modules/type/string/coerce.js"(e,t){var r=Gy(),n=Wy(),i=Object.prototype.toString;t.exports=function(e){if(!r(e))return null;if(n(e)){var t=e.toString;if("function"!=typeof t||t===i)return null}try{return""+e}catch{return null}}}}),Tv=m({"node_modules/type/lib/safe-to-string.js"(e,t){t.exports=function(e){try{return e.toString()}catch{try{return String(e)}catch{return null}}}}}),kv=m({"node_modules/type/lib/to-short-string.js"(e,t){var r=Tv(),n=/[\n\r\u2028\u2029]/g;t.exports=function(e){var t=r(e);return null===t?"":(t.length>100&&(t=t.slice(0,99)+"…"),t=t.replace(n,(function(e){switch(e){case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}})))}}}),Av=m({"node_modules/type/lib/resolve-exception.js"(e,t){var r=Gy(),n=Wy(),i=wv(),a=kv(),o=function(e,t){return e.replace("%v",a(t))};t.exports=function(e,t,a){if(!n(a))throw new TypeError(o(t,e));if(!r(e)){if("default"in a)return a.default;if(a.isOptional)return null}var s=i(a.errorMessage);throw r(s)||(s=t),new TypeError(o(s,e))}}}),Mv=m({"node_modules/type/value/ensure.js"(e,t){var r=Av(),n=Gy();t.exports=function(e){return n(e)?e:r(e,"Cannot use %v",arguments[1])}}}),Sv=m({"node_modules/type/plain-function/ensure.js"(e,t){var r=Av(),n=Xy();t.exports=function(e){return n(e)?e:r(e,"%v is not a plain function",arguments[1])}}}),Ev=m({"node_modules/es5-ext/array/from/is-implemented.js"(e,t){t.exports=function(){var e,t,r=Array.from;return"function"==typeof r&&!(!(t=r(e=["raz","dwa"]))||t===e||"dwa"!==t[1])}}}),Cv=m({"node_modules/es5-ext/function/is-function.js"(e,t){var r=Object.prototype.toString,n=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);t.exports=function(e){return"function"==typeof e&&n(r.call(e))}}}),Iv=m({"node_modules/es5-ext/math/sign/is-implemented.js"(e,t){t.exports=function(){var e=Math.sign;return"function"==typeof e&&1===e(10)&&-1===e(-20)}}}),Lv=m({"node_modules/es5-ext/math/sign/shim.js"(e,t){t.exports=function(e){return e=Number(e),isNaN(e)||0===e?e:e>0?1:-1}}}),Pv=m({"node_modules/es5-ext/math/sign/index.js"(e,t){t.exports=Iv()()?Math.sign:Lv()}}),zv=m({"node_modules/es5-ext/number/to-integer.js"(e,t){var r=Pv(),n=Math.abs,i=Math.floor;t.exports=function(e){return isNaN(e)?0:0!==(e=Number(e))&&isFinite(e)?r(e)*i(n(e)):e}}}),Dv=m({"node_modules/es5-ext/number/to-pos-integer.js"(e,t){var r=zv(),n=Math.max;t.exports=function(e){return n(0,r(e))}}}),Ov=m({"node_modules/es5-ext/array/from/shim.js"(e,t){var r=xv().iterator,n=sv(),i=Cv(),a=Dv(),o=bv(),s=jy(),l=Ry(),c=lv(),u=Array.isArray,h=Function.prototype.call,f={configurable:!0,enumerable:!0,writable:!0,value:null},p=Object.defineProperty;t.exports=function(e){var t,d,m,g,y,v,x,_,b,w,T=arguments[1],k=arguments[2];if(e=Object(s(e)),l(T)&&o(T),this&&this!==Array&&i(this))t=this;else{if(!T){if(n(e))return 1!==(y=e.length)?Array.apply(null,e):((g=new Array(1))[0]=e[0],g);if(u(e)){for(g=new Array(y=e.length),d=0;d=55296&&v<=56319&&(w+=e[++d]),w=T?h.call(T,k,w,m):w,t?(f.value=w,p(g,m,f)):g[m]=w,++m;y=m}if(void 0===y)for(y=a(e.length),t&&(g=new t(y)),d=0;d=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__)return void u(this,"__redo__",s("c",[e]));this.__redo__.forEach((function(t,r){t>=e&&(this.__redo__[r]=++t)}),this),this.__redo__.push(e)}})),_onDelete:s((function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(t=this.__redo__.indexOf(e))&&this.__redo__.splice(t,1),this.__redo__.forEach((function(t,r){t>e&&(this.__redo__[r]=--t)}),this)))})),_onClear:s((function(){this.__redo__&&n.call(this.__redo__),this.__nextIndex__=0}))}))),u(r.prototype,c.iterator,s((function(){return this})))}}),qv=m({"node_modules/es6-iterator/array.js"(e,t){var r,n=Vy(),i=av(),a=ov(),o=xv(),s=Vv(),l=Object.defineProperty;r=t.exports=function(e,t){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");s.call(this,e),t=t?i.call(t,"key+value")?"key+value":i.call(t,"key")?"key":"value":"value",l(this,"__kind__",a("",t))},n&&n(r,s),delete r.prototype.constructor,r.prototype=Object.create(s.prototype,{_resolve:a((function(e){return"value"===this.__kind__?this.__list__[e]:"key+value"===this.__kind__?[e,this.__list__[e]]:e}))}),l(r.prototype,o.toStringTag,a("c","Array Iterator"))}}),Hv=m({"node_modules/es6-iterator/string.js"(e,t){var r,n=Vy(),i=ov(),a=xv(),o=Vv(),s=Object.defineProperty;r=t.exports=function(e){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");e=String(e),o.call(this,e),s(this,"__length__",i("",e.length))},n&&n(r,o),delete r.prototype.constructor,r.prototype=Object.create(o.prototype,{_next:i((function(){if(this.__list__){if(this.__nextIndex__=55296&&t<=56319?r+this.__list__[this.__nextIndex__++]:r}))}),s(r.prototype,a.toStringTag,i("c","String Iterator"))}}),Gv=m({"node_modules/es6-iterator/is-iterable.js"(e,t){var r=sv(),n=Ry(),i=lv(),a=xv().iterator,o=Array.isArray;t.exports=function(e){return!(!n(e)||!(o(e)||i(e)||r(e))&&"function"!=typeof e[a])}}}),Wv=m({"node_modules/es6-iterator/valid-iterable.js"(e,t){var r=Gv();t.exports=function(e){if(!r(e))throw new TypeError(e+" is not iterable");return e}}}),Zv=m({"node_modules/es6-iterator/get.js"(e,t){var r=sv(),n=lv(),i=qv(),a=Hv(),o=Wv(),s=xv().iterator;t.exports=function(e){return"function"==typeof o(e)[s]?e[s]():r(e)?new i(e):n(e)?new a(e):new i(e)}}}),Yv=m({"node_modules/es6-iterator/for-of.js"(e,t){var r=sv(),n=bv(),i=lv(),a=Zv(),o=Array.isArray,s=Function.prototype.call,l=Array.prototype.some;t.exports=function(e,t){var c,u,h,f,p,d,m,g,y=arguments[2];if(o(e)||r(e)?c="array":i(e)?c="string":e=a(e),n(t),h=function(){f=!0},"array"!==c)if("string"!==c)for(u=e.next();!u.done;){if(s.call(t,y,u.value,h),f)return;u=e.next()}else for(d=e.length,p=0;p=55296&&g<=56319&&(m+=e[++p]),s.call(t,y,m,h),!f);++p);else l.call(e,(function(e){return s.call(t,y,e,h),f}))}}}),Xv=m({"node_modules/es6-weak-map/is-native-implemented.js"(e,t){t.exports="function"==typeof WeakMap&&"[object WeakMap]"===Object.prototype.toString.call(new WeakMap)}}),$v=m({"node_modules/es6-weak-map/polyfill.js"(e,t){var r,n=Ry(),i=Vy(),a=qy(),o=jy(),s=Hy(),l=ov(),c=Zv(),u=Yv(),h=xv().toStringTag,f=Xv(),p=Array.isArray,d=Object.defineProperty,m=Object.prototype.hasOwnProperty,g=Object.getPrototypeOf;t.exports=r=function(){var e,t=arguments[0];if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");return e=f&&i&&WeakMap!==r?i(new WeakMap,g(this)):this,n(t)&&(p(t)||(t=c(t))),d(e,"__weakMapData__",l("c","$weakMap$"+s())),t&&u(t,(function(t){o(t),e.set(t[0],t[1])})),e},f&&(i&&i(r,WeakMap),r.prototype=Object.create(WeakMap.prototype,{constructor:l(r)})),Object.defineProperties(r.prototype,{delete:l((function(e){return!!m.call(a(e),this.__weakMapData__)&&(delete e[this.__weakMapData__],!0)})),get:l((function(e){if(m.call(a(e),this.__weakMapData__))return e[this.__weakMapData__]})),has:l((function(e){return m.call(a(e),this.__weakMapData__)})),set:l((function(e,t){return d(a(e),this.__weakMapData__,l("c",t)),this})),toString:l((function(){return"[object WeakMap]"}))}),d(r.prototype,h,l("c","WeakMap"))}}),Kv=m({"node_modules/es6-weak-map/index.js"(e,t){t.exports=Dy()()?WeakMap:$v()}}),Jv=m({"node_modules/array-find-index/index.js"(e,t){t.exports=function(e,t,r){if("function"==typeof Array.prototype.findIndex)return e.findIndex(t,r);if("function"!=typeof t)throw new TypeError("predicate must be a function");var n=Object(e),i=n.length;if(0===i)return-1;for(var a=0;a"round"===t.join?2:1,miterLimit:e.prop("miterLimit"),scale:e.prop("scale"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),thickness:e.prop("thickness"),dashTexture:e.prop("dashTexture"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),dashLength:e.prop("dashLength"),viewport:(e,t)=>[t.viewport.x,t.viewport.y,e.viewportWidth,e.viewportHeight],depth:e.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:(e,t)=>!t.overlay},stencil:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport")},a=e(i({vert:"\nprecision highp float;\n\nattribute vec2 aCoord, bCoord, aCoordFract, bCoordFract;\nattribute vec4 color;\nattribute float lineEnd, lineTop;\n\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float thickness, pixelRatio, id, depth;\nuniform vec4 viewport;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\n\nvec2 project(vec2 position, vec2 positionFract, vec2 scale, vec2 scaleFract, vec2 translate, vec2 translateFract) {\n\t// the order is important\n\treturn position * scale + translate\n + positionFract * scale + translateFract\n + position * scaleFract\n + positionFract * scaleFract;\n}\n\nvoid main() {\n\tfloat lineStart = 1. - lineEnd;\n\tfloat lineOffset = lineTop * 2. - 1.;\n\n\tvec2 diff = (bCoord + bCoordFract - aCoord - aCoordFract);\n\ttangent = normalize(diff * scale * viewport.zw);\n\tvec2 normal = vec2(-tangent.y, tangent.x);\n\n\tvec2 position = project(aCoord, aCoordFract, scale, scaleFract, translate, translateFract) * lineStart\n\t\t+ project(bCoord, bCoordFract, scale, scaleFract, translate, translateFract) * lineEnd\n\n\t\t+ thickness * normal * .5 * lineOffset / viewport.zw;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tfragColor = color / 255.;\n}\n",frag:"\nprecision highp float;\n\nuniform float dashLength, pixelRatio, thickness, opacity, id;\nuniform sampler2D dashTexture;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\n\nvoid main() {\n\tfloat alpha = 1.;\n\n\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;\n\tfloat dash = texture2D(dashTexture, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n",attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},n));try{t=e(i({cull:{enable:!0,face:"back"},vert:"\nprecision highp float;\n\nattribute vec2 aCoord, bCoord, nextCoord, prevCoord;\nattribute vec4 aColor, bColor;\nattribute float lineEnd, lineTop;\n\nuniform vec2 scale, translate;\nuniform float thickness, pixelRatio, id, depth;\nuniform vec4 viewport;\nuniform float miterLimit, miterMode;\n\nvarying vec4 fragColor;\nvarying vec4 startCutoff, endCutoff;\nvarying vec2 tangent;\nvarying vec2 startCoord, endCoord;\nvarying float enableStartMiter, enableEndMiter;\n\nconst float REVERSE_THRESHOLD = -.875;\nconst float MIN_DIFF = 1e-6;\n\n// TODO: possible optimizations: avoid overcalculating all for vertices and calc just one instead\n// TODO: precalculate dot products, normalize things beforehead etc.\n// TODO: refactor to rectangular algorithm\n\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\n\tvec2 diff = b - a;\n\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n\treturn dot(p - a, perp);\n}\n\nbool isNaN( float val ){\n return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true;\n}\n\nvoid main() {\n\tvec2 aCoord = aCoord, bCoord = bCoord, prevCoord = prevCoord, nextCoord = nextCoord;\n\n vec2 adjustedScale;\n adjustedScale.x = (abs(scale.x) < MIN_DIFF) ? MIN_DIFF : scale.x;\n adjustedScale.y = (abs(scale.y) < MIN_DIFF) ? MIN_DIFF : scale.y;\n\n vec2 scaleRatio = adjustedScale * viewport.zw;\n\tvec2 normalWidth = thickness / scaleRatio;\n\n\tfloat lineStart = 1. - lineEnd;\n\tfloat lineBot = 1. - lineTop;\n\n\tfragColor = (lineStart * aColor + lineEnd * bColor) / 255.;\n\n\tif (isNaN(aCoord.x) || isNaN(aCoord.y) || isNaN(bCoord.x) || isNaN(bCoord.y)) return;\n\n\tif (aCoord == prevCoord) prevCoord = aCoord + normalize(bCoord - aCoord);\n\tif (bCoord == nextCoord) nextCoord = bCoord - normalize(bCoord - aCoord);\n\n\n\tvec2 prevDiff = aCoord - prevCoord;\n\tvec2 currDiff = bCoord - aCoord;\n\tvec2 nextDiff = nextCoord - bCoord;\n\n\tvec2 prevTangent = normalize(prevDiff * scaleRatio);\n\tvec2 currTangent = normalize(currDiff * scaleRatio);\n\tvec2 nextTangent = normalize(nextDiff * scaleRatio);\n\n\tvec2 prevNormal = vec2(-prevTangent.y, prevTangent.x);\n\tvec2 currNormal = vec2(-currTangent.y, currTangent.x);\n\tvec2 nextNormal = vec2(-nextTangent.y, nextTangent.x);\n\n\tvec2 startJoinDirection = normalize(prevTangent - currTangent);\n\tvec2 endJoinDirection = normalize(currTangent - nextTangent);\n\n\t// collapsed/unidirectional segment cases\n\t// FIXME: there should be more elegant solution\n\tvec2 prevTanDiff = abs(prevTangent - currTangent);\n\tvec2 nextTanDiff = abs(nextTangent - currTangent);\n\tif (max(prevTanDiff.x, prevTanDiff.y) < MIN_DIFF) {\n\t\tstartJoinDirection = currNormal;\n\t}\n\tif (max(nextTanDiff.x, nextTanDiff.y) < MIN_DIFF) {\n\t\tendJoinDirection = currNormal;\n\t}\n\tif (aCoord == bCoord) {\n\t\tendJoinDirection = startJoinDirection;\n\t\tcurrNormal = prevNormal;\n\t\tcurrTangent = prevTangent;\n\t}\n\n\ttangent = currTangent;\n\n\t//calculate join shifts relative to normals\n\tfloat startJoinShift = dot(currNormal, startJoinDirection);\n\tfloat endJoinShift = dot(currNormal, endJoinDirection);\n\n\tfloat startMiterRatio = abs(1. / startJoinShift);\n\tfloat endMiterRatio = abs(1. / endJoinShift);\n\n\tvec2 startJoin = startJoinDirection * startMiterRatio;\n\tvec2 endJoin = endJoinDirection * endMiterRatio;\n\n\tvec2 startTopJoin, startBotJoin, endTopJoin, endBotJoin;\n\tstartTopJoin = sign(startJoinShift) * startJoin * .5;\n\tstartBotJoin = -startTopJoin;\n\n\tendTopJoin = sign(endJoinShift) * endJoin * .5;\n\tendBotJoin = -endTopJoin;\n\n\tvec2 aTopCoord = aCoord + normalWidth * startTopJoin;\n\tvec2 bTopCoord = bCoord + normalWidth * endTopJoin;\n\tvec2 aBotCoord = aCoord + normalWidth * startBotJoin;\n\tvec2 bBotCoord = bCoord + normalWidth * endBotJoin;\n\n\t//miter anti-clipping\n\tfloat baClipping = distToLine(bCoord, aCoord, aBotCoord) / dot(normalize(normalWidth * endBotJoin), normalize(normalWidth.yx * vec2(-startBotJoin.y, startBotJoin.x)));\n\tfloat abClipping = distToLine(aCoord, bCoord, bTopCoord) / dot(normalize(normalWidth * startBotJoin), normalize(normalWidth.yx * vec2(-endBotJoin.y, endBotJoin.x)));\n\n\t//prevent close to reverse direction switch\n\tbool prevReverse = dot(currTangent, prevTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, prevNormal)) * min(length(prevDiff), length(currDiff)) < length(normalWidth * currNormal);\n\tbool nextReverse = dot(currTangent, nextTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, nextNormal)) * min(length(nextDiff), length(currDiff)) < length(normalWidth * currNormal);\n\n\tif (prevReverse) {\n\t\t//make join rectangular\n\t\tvec2 miterShift = normalWidth * startJoinDirection * miterLimit * .5;\n\t\tfloat normalAdjust = 1. - min(miterLimit / startMiterRatio, 1.);\n\t\taBotCoord = aCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n\t\taTopCoord = aCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n\t}\n\telse if (!nextReverse && baClipping > 0. && baClipping < length(normalWidth * endBotJoin)) {\n\t\t//handle miter clipping\n\t\tbTopCoord -= normalWidth * endTopJoin;\n\t\tbTopCoord += normalize(endTopJoin * normalWidth) * baClipping;\n\t}\n\n\tif (nextReverse) {\n\t\t//make join rectangular\n\t\tvec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;\n\t\tfloat normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);\n\t\tbBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n\t\tbTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n\t}\n\telse if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) {\n\t\t//handle miter clipping\n\t\taBotCoord -= normalWidth * startBotJoin;\n\t\taBotCoord += normalize(startBotJoin * normalWidth) * abClipping;\n\t}\n\n\tvec2 aTopPosition = (aTopCoord) * adjustedScale + translate;\n\tvec2 aBotPosition = (aBotCoord) * adjustedScale + translate;\n\n\tvec2 bTopPosition = (bTopCoord) * adjustedScale + translate;\n\tvec2 bBotPosition = (bBotCoord) * adjustedScale + translate;\n\n\t//position is normalized 0..1 coord on the screen\n\tvec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;\n\n\tstartCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\tendCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tenableStartMiter = step(dot(currTangent, prevTangent), .5);\n\tenableEndMiter = step(dot(currTangent, nextTangent), .5);\n\n\t//bevel miter cutoffs\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n\n\t//round miter cutoffs\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n}\n",frag:"\nprecision highp float;\n\nuniform float dashLength, pixelRatio, thickness, opacity, id, miterMode;\nuniform sampler2D dashTexture;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\nvarying vec4 startCutoff, endCutoff;\nvarying vec2 startCoord, endCoord;\nvarying float enableStartMiter, enableEndMiter;\n\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\n\tvec2 diff = b - a;\n\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n\treturn dot(p - a, perp);\n}\n\nvoid main() {\n\tfloat alpha = 1., distToStart, distToEnd;\n\tfloat cutoff = thickness * .5;\n\n\t//bevel miter\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToStart + 1., 0.), 1.);\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToEnd + 1., 0.), 1.);\n\t\t}\n\t}\n\n\t// round miter\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - startCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - endCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\t}\n\n\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;\n\tfloat dash = texture2D(dashTexture, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n",attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aColor:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:e.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},n))}catch{t=a}return{fill:e({primitive:"triangle",elements:(e,t)=>t.triangles,offset:0,vert:"\nprecision highp float;\n\nattribute vec2 position, positionFract;\n\nuniform vec4 color;\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float pixelRatio, id;\nuniform vec4 viewport;\nuniform float opacity;\n\nvarying vec4 fragColor;\n\nconst float MAX_LINES = 256.;\n\nvoid main() {\n\tfloat depth = (MAX_LINES - 4. - id) / (MAX_LINES);\n\n\tvec2 position = position * scale + translate\n + positionFract * scale + translateFract\n + position * scaleFract\n + positionFract * scaleFract;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tfragColor = color / 255.;\n\tfragColor.a *= opacity;\n}\n",frag:"\nprecision highp float;\nvarying vec4 fragColor;\n\nvoid main() {\n\tgl_FragColor = fragColor;\n}\n",uniforms:{scale:e.prop("scale"),color:e.prop("fill"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),viewport:(e,t)=>[t.viewport.x,t.viewport.y,e.viewportWidth,e.viewportHeight]},attributes:{position:{buffer:e.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8}},blend:n.blend,depth:{enable:!1},scissor:n.scissor,stencil:n.stencil,viewport:n.viewport}),rect:a,miter:t}},d.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},d.prototype.render=function(...e){e.length&&this.update(...e),this.draw()},d.prototype.draw=function(...e){return(e.length?e:this.passes).forEach(((e,t)=>{if(e&&Array.isArray(e))return this.draw(...e);"number"==typeof e&&(e=this.passes[e]),e&&e.count>1&&e.opacity&&(this.regl._refresh(),e.fill&&e.triangles&&e.triangles.length>2&&this.shaders.fill(e),e.thickness&&(e.scale[0]*e.viewport.width>d.precisionThreshold||e.scale[1]*e.viewport.height>d.precisionThreshold||"rect"===e.join||!e.join&&(e.thickness<=2||e.count>=d.maxPoints)?this.shaders.rect(e):this.shaders.miter(e)))})),this},d.prototype.update=function(e){if(!e)return;null!=e.length?"number"==typeof e[0]&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);let{regl:t,gl:h}=this;if(e.forEach(((e,m)=>{let g=this.passes[m];if(void 0!==e){if(null===e)return void(this.passes[m]=null);if("number"==typeof e[0]&&(e={positions:e}),e=a(e,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),g||(this.passes[m]=g={id:m,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:t.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:t.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},e=i({},d.defaults,e)),null!=e.thickness&&(g.thickness=parseFloat(e.thickness)),null!=e.opacity&&(g.opacity=parseFloat(e.opacity)),null!=e.miterLimit&&(g.miterLimit=parseFloat(e.miterLimit)),null!=e.overlay&&(g.overlay=!!e.overlay,me-t)),t=[],i=0,a=null!=g.hole?g.hole[0]:null;if(null!=a){let t=p(e,(e=>e>=a));e=e.slice(0,t),e.push(a)}for(let n=0;nt-a+(e[n]-i))),c=s(o,l);c=c.map((t=>t+i+(t+i{e.colorBuffer.destroy(),e.positionBuffer.destroy(),e.dashTexture.destroy()})),this.passes.length=0,this}}}),ex=m({"node_modules/regl-error2d/index.js"(e,t){var r=ny(),n=em(),i=Ey(),a=ty(),o=My(),s=ay(),{float32:l,fract32:c}=Iy();t.exports=function(e,t){if("function"==typeof e?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),!(e=t.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let h,f,p,d,m,g,y=e._gl,v={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},x=[];return d=e.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),f=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),p=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),m=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),g=e.buffer({usage:"static",type:"float",data:u}),T(t),h=e({vert:"\n\t\tprecision highp float;\n\n\t\tattribute vec2 position, positionFract;\n\t\tattribute vec4 error;\n\t\tattribute vec4 color;\n\n\t\tattribute vec2 direction, lineOffset, capOffset;\n\n\t\tuniform vec4 viewport;\n\t\tuniform float lineWidth, capSize;\n\t\tuniform vec2 scale, scaleFract, translate, translateFract;\n\n\t\tvarying vec4 fragColor;\n\n\t\tvoid main() {\n\t\t\tfragColor = color / 255.;\n\n\t\t\tvec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset;\n\n\t\t\tvec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw;\n\n\t\t\tvec2 position = position + dxy;\n\n\t\t\tvec2 pos = (position + translate) * scale\n\t\t\t\t+ (positionFract + translateFract) * scale\n\t\t\t\t+ (position + translate) * scaleFract\n\t\t\t\t+ (positionFract + translateFract) * scaleFract;\n\n\t\t\tpos += pixelOffset / viewport.zw;\n\n\t\t\tgl_Position = vec4(pos * 2. - 1., 0, 1);\n\t\t}\n\t\t",frag:"\n\t\tprecision highp float;\n\n\t\tvarying vec4 fragColor;\n\n\t\tuniform float opacity;\n\n\t\tvoid main() {\n\t\t\tgl_FragColor = fragColor;\n\t\t\tgl_FragColor.a *= opacity;\n\t\t}\n\t\t",uniforms:{range:e.prop("range"),lineWidth:e.prop("lineWidth"),capSize:e.prop("capSize"),opacity:e.prop("opacity"),scale:e.prop("scale"),translate:e.prop("translate"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),viewport:(e,t)=>[t.viewport.x,t.viewport.y,e.viewportWidth,e.viewportHeight]},attributes:{color:{buffer:d,offset:(e,t)=>4*t.offset,divisor:1},position:{buffer:f,offset:(e,t)=>8*t.offset,divisor:1},positionFract:{buffer:p,offset:(e,t)=>8*t.offset,divisor:1},error:{buffer:m,offset:(e,t)=>16*t.offset,divisor:1},direction:{buffer:g,stride:24,offset:0},lineOffset:{buffer:g,stride:24,offset:8},capOffset:{buffer:g,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport"),stencil:!1,instances:e.prop("count"),count:u.length}),o(_,{update:T,draw:b,destroy:k,regl:e,gl:y,canvas:y.canvas,groups:x}),_;function _(e){e?T(e):null===e&&k(),b()}function b(t){if("number"==typeof t)return w(t);t&&!Array.isArray(t)&&(t=[t]),e._refresh(),x.forEach(((e,r)=>{if(e){if(t&&(t[r]?e.draw=!0:e.draw=!1),!e.draw)return void(e.draw=!0);w(r)}}))}function w(e){"number"==typeof e&&(e=x[e]),null!=e&&e&&e.count&&e.color&&e.opacity&&e.positions&&e.positions.length>1&&(e.scaleRatio=[e.scale[0]*e.viewport.width,e.scale[1]*e.viewport.height],h(e),e.after&&e.after(e))}function T(e){if(!e)return;null!=e.length?"number"==typeof e[0]&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);let t=0,u=0;if(_.groups=x=e.map(((e,l)=>{let h=x[l];return e?("function"==typeof e?e={after:e}:"number"==typeof e[0]&&(e={positions:e}),e=a(e,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),h||(x[l]=h={id:l,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},e=o({},v,e)),i(h,e,[{lineWidth:e=>.5*+e,capSize:e=>.5*+e,opacity:parseFloat,errors:e=>(e=s(e),u+=e.length,e),positions:(e,n)=>(e=s(e,"float64"),n.count=Math.floor(e.length/2),n.bounds=r(e,2),n.offset=t,t+=n.count,e)},{color:(e,t)=>{let r=t.count;if(e||(e="transparent"),!Array.isArray(e)||"number"==typeof e[0]){let t=e;e=Array(r);for(let n=0;n{let n=t.bounds;return e||(e=n),t.scale=[1/(e[2]-e[0]),1/(e[3]-e[1])],t.translate=[-e[0],-e[1]],t.scaleFract=c(t.scale),t.translateFract=c(t.translate),e},viewport:e=>{let t;return Array.isArray(e)?t={x:e[0],y:e[1],width:e[2]-e[0],height:e[3]-e[1]}:e?(t={x:e.x||e.left||0,y:e.y||e.top||0},e.right?t.width=e.right-t.x:t.width=e.w||e.width||0,e.bottom?t.height=e.bottom-t.y:t.height=e.h||e.height||0):t={x:0,y:0,width:y.drawingBufferWidth,height:y.drawingBufferHeight},t}}]),h):h})),t||u){let e=x.reduce(((e,t,r)=>e+(t?t.count:0)),0),t=new Float64Array(2*e),r=new Uint8Array(4*e),n=new Float32Array(4*e);x.forEach(((e,i)=>{if(!e)return;let{positions:a,count:o,offset:s,color:l,errors:c}=e;o&&(r.set(l,4*s),n.set(c,4*s),t.set(a,2*s))}));var h=l(t);f(h);var g=c(t,h);p(g),d(r),m(n)}}function k(){f.destroy(),p.destroy(),d.destroy(),m.destroy(),g.destroy()}};var u=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]]}}),tx=m({"node_modules/unquote/index.js"(e,t){var r=/[\'\"]/;t.exports=function(e){return e?(r.test(e.charAt(0))&&(e=e.substr(1)),r.test(e.charAt(e.length-1))&&(e=e.substr(0,e.length-1)),e):""}}}),rx=m({"node_modules/css-global-keywords/index.json"(e,t){t.exports=["inherit","initial","unset"]}}),nx=m({"node_modules/css-system-font-keywords/index.json"(e,t){t.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}}),ix=m({"node_modules/css-font-weight-keywords/index.json"(e,t){t.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]}}),ax=m({"node_modules/css-font-style-keywords/index.json"(e,t){t.exports=["normal","italic","oblique"]}}),ox=m({"node_modules/css-font-stretch-keywords/index.json"(e,t){t.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}}),sx=m({"node_modules/parenthesis/index.js"(e,t){function r(e,t){if("string"!=typeof e)return[e];var r=[e];"string"==typeof t||Array.isArray(t)?t={brackets:t}:t||(t={});var n=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],i=t.escape||"___",a=!!t.flat;n.forEach((function(e){var t=new RegExp(["\\",e[0],"[^\\",e[0],"\\",e[1],"]*\\",e[1]].join("")),n=[];function a(t,a,o){var s=r.push(t.slice(e[0].length,-e[1].length))-1;return n.push(s),i+s+i}r.forEach((function(e,n){for(var i,o=0;e!=i;)if(i=e,e=e.replace(t,a),o++>1e4)throw Error("References have circular dependency. Please, check them.");r[n]=e})),n=n.reverse(),r=r.map((function(t){return n.forEach((function(r){t=t.replace(new RegExp("(\\"+i+r+"\\"+i+")","g"),e[0]+"$1"+e[1])})),t}))}));var o=new RegExp("\\"+i+"([0-9]+)\\"+i);return a?r:function e(t,r,n){for(var i,a=[],s=0;i=o.exec(t);){if(s++>1e4)throw Error("Circular references in parenthesis");a.push(t.slice(0,i.index)),a.push(e(r[i[1]],r)),t=t.slice(i.index+i[0].length)}return a.push(t),a}(r[0],r)}function n(e,t){if(t&&t.flat){var r,n=t&&t.escape||"___",i=e[0];if(!i)return"";for(var a=new RegExp("\\"+n+"([0-9]+)\\"+n),o=0;i!=r;){if(o++>1e4)throw Error("Circular references in "+e);r=i,i=i.replace(a,s)}return i}return e.reduce((function e(t,r){return Array.isArray(r)&&(r=r.reduce(e,"")),t+r}),"");function s(t,r){if(null==e[r])throw Error("Reference "+r+"is undefined");return e[r]}}function i(e,t){return Array.isArray(e)?n(e,t):r(e,t)}i.parse=r,i.stringify=n,t.exports=i}}),lx=m({"node_modules/string-split-by/index.js"(e,t){var r=sx();t.exports=function(e,t,n){if(null==e)throw Error("First argument should be a string");if(null==t)throw Error("Separator should be a string or a RegExp");n?("string"==typeof n||Array.isArray(n))&&(n={ignore:n}):n={},null==n.escape&&(n.escape=!0),null==n.ignore?n.ignore=["[]","()","{}","<>",'""',"''","``","“”","«»"]:("string"==typeof n.ignore&&(n.ignore=[n.ignore]),n.ignore=n.ignore.map((function(e){return 1===e.length&&(e+=e),e})));var i=r.parse(e,{flat:!0,brackets:n.ignore}),a=i[0].split(t);if(n.escape){for(var o=[],s=0;s1&&t===r&&('"'===t||"'"===t))return['"'+n(e.substr(1,e.length-2))+'"'];var a=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(e);if(a)return i(e.substr(0,a.index)).concat(i(a[1])).concat(i(e.substr(a.index+a[0].length)));var o=e.split(".");if(1===o.length)return['"'+n(e)+'"'];for(var s=[],l=0;l65535)<<4,t|=r=((e>>>=t)>255)<<3,t|=r=((e>>>=r)>15)<<2,(t|=r=((e>>>=r)>3)<<1)|(e>>>=r)>>1}function p(){var e=h(8,(function(){return[]}));function t(t){var r=function(e){for(var t=16;t<=1<<28;t*=16)if(e<=t)return t;return 0}(t),n=e[f(r)>>2];return n.length>0?n.pop():new ArrayBuffer(r)}function r(t){e[f(t.byteLength)>>2].push(t)}return{alloc:t,free:r,allocType:function(e,r){var n=null;switch(e){case 5120:n=new Int8Array(t(r),0,r);break;case 5121:n=new Uint8Array(t(r),0,r);break;case 5122:n=new Int16Array(t(2*r),0,r);break;case 5123:n=new Uint16Array(t(2*r),0,r);break;case 5124:n=new Int32Array(t(4*r),0,r);break;case 5125:n=new Uint32Array(t(4*r),0,r);break;case 5126:n=new Float32Array(t(4*r),0,r);break;default:return null}return n.length!==r?n.subarray(0,r):n},freeType:function(e){r(e.buffer)}}}var d=p();d.zero=p();var m=3553,g=6408,y=5126,v=36160,x=function(e){return e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Float32Array||e instanceof Float64Array||e instanceof Uint8ClampedArray};function _(e){return!!e&&"object"==typeof e&&Array.isArray(e.shape)&&Array.isArray(e.stride)&&"number"==typeof e.offset&&e.shape.length===e.stride.length&&(Array.isArray(e.data)||x(e.data))}var b=function(e){return Object.keys(e).map((function(t){return e[t]}))},w=function(e){for(var t=[],r=e;r.length;r=r[0])t.push(r.length);return t},T=function(e,t,r,n){var i=1;if(t.length)for(var a=0;a>>31<<15,a=(n<<1>>>24)-127,o=n>>13&1023;if(a<-24)t[r]=i;else if(a<-14){var s=-14-a;t[r]=i+(o+1024>>s)}else t[r]=a>15?i+31744:i+(a+15<<10)+o}return t}function G(e){return Array.isArray(e)||x(e)}var W=3553,Z=34067,Y=34069,X=6408,$=6406,K=6407,J=6409,Q=6410,ee=32855,te=6402,re=34041,ne=35904,ie=35906,ae=36193,oe=33776,se=33777,le=33778,ce=5121,ue=5123,he=5125,fe=5126,pe=33071,de=9728,me=9984,ge=9987,ye=4352,ve=33984,xe=[me,9986,9985,ge],_e=[0,J,Q,K,X],be={};function we(e){return"[object "+e+"]"}be[J]=be[$]=be[te]=1,be[re]=be[Q]=2,be[K]=be[ne]=3,be[X]=be[ie]=4;var Te=we("HTMLCanvasElement"),ke=we("OffscreenCanvas"),Ae=we("CanvasRenderingContext2D"),Me=we("ImageBitmap"),Se=we("HTMLImageElement"),Ee=we("HTMLVideoElement"),Ce=Object.keys(M).concat([Te,ke,Ae,Me,Se,Ee]),Ie=[];Ie[ce]=1,Ie[fe]=4,Ie[ae]=2,Ie[ue]=2,Ie[he]=4;var Le=[];function Pe(e){return Array.isArray(e)&&(0===e.length||"number"==typeof e[0])}function ze(e){return!!Array.isArray(e)&&!(0===e.length||!G(e[0]))}function De(e){return Object.prototype.toString.call(e)}function Oe(e){return De(e)===Te}function Re(e){return De(e)===ke}function Fe(e){if(!e)return!1;var t=De(e);return Ce.indexOf(t)>=0||Pe(e)||ze(e)||_(e)}function Be(e){return 0|M[Object.prototype.toString.call(e)]}function je(e,t){return d.allocType(e.type===ae?fe:e.type,t)}function Ne(e,t){e.type===ae?(e.data=H(t),d.freeType(t)):e.data=t}function Ue(e,t,r,n,i,a){var o;if(o=typeof Le[e]<"u"?Le[e]:be[e]*Ie[t],a&&(o*=6),i){for(var s=0,l=r;l>=1;)s+=o*l*l,l/=2;return s}return o*r*n}Le[32854]=2,Le[ee]=2,Le[36194]=2,Le[re]=4,Le[oe]=.5,Le[se]=.5,Le[le]=1,Le[33779]=1,Le[35986]=.5,Le[35987]=1,Le[34798]=1,Le[35840]=.5,Le[35841]=.25,Le[35842]=.5,Le[35843]=.25,Le[36196]=.5;var Ve=36161,qe=32854,He=[];function Ge(e,t,r){return He[e]*t*r}He[qe]=2,He[32855]=2,He[36194]=2,He[33189]=2,He[36168]=1,He[34041]=4,He[35907]=4,He[34836]=16,He[34842]=8,He[34843]=6;var We=36160,Ze=36161,Ye=3553,Xe=[];Xe[6408]=4,Xe[6407]=3;var $e=[];$e[5121]=1,$e[5126]=4,$e[36193]=2;var Ke=34963;function Je(){this.state=0,this.x=0,this.y=0,this.z=0,this.w=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.offset=0,this.stride=0,this.divisor=0}function Qe(e){return function(e){for(var t,r="0123456789abcdef",n="",i=0;i>>4&15)+r.charAt(15&t);return n}(function(e){return function(e){for(var t="",r=0;r<32*e.length;r+=8)t+=String.fromCharCode(e[r>>5]>>>24-r%32&255);return t}(function(e,t){var r,n,i,a,o,s,l,c,u,h,f,p,d=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),m=new Array(64);for(e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t,u=0;u>2),r=0;r>5]|=(255&e.charCodeAt(r/8))<<24-r%32;return t}(e),8*e.length))}(function(e){for(var t,r,n="",i=-1;++i>>6&31,128|63&t):t<=65535?n+=String.fromCharCode(224|t>>>12&15,128|t>>>6&63,128|63&t):t<=2097151&&(n+=String.fromCharCode(240|t>>>18&7,128|t>>>12&63,128|t>>>6&63,128|63&t));return n}(e)))}function et(e,t){return e>>>t|e<<32-t}function tt(e,t){return e>>>t}function rt(e,t,r){return e&t^~e&r}function nt(e,t,r){return e&t^e&r^t&r}function it(e){return et(e,2)^et(e,13)^et(e,22)}function at(e){return et(e,6)^et(e,11)^et(e,25)}function ot(e){return et(e,7)^et(e,18)^tt(e,3)}function st(e){return et(e,17)^et(e,19)^tt(e,10)}var lt=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function ct(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function ut(e){return Array.prototype.slice.call(e)}function ht(e){return ut(e).join("")}var ft="xyzw".split(""),pt="dither",dt="blend.enable",mt="blend.color",gt="blend.equation",yt="blend.func",vt="depth.enable",xt="depth.func",_t="depth.range",bt="depth.mask",wt="colorMask",Tt="cull.enable",kt="cull.face",At="frontFace",Mt="lineWidth",St="polygonOffset.enable",Et="polygonOffset.offset",Ct="sample.alpha",It="sample.enable",Lt="sample.coverage",Pt="stencil.enable",zt="stencil.mask",Dt="stencil.func",Ot="stencil.opFront",Rt="stencil.opBack",Ft="scissor.enable",Bt="scissor.box",jt="viewport",Nt="profile",Ut="framebuffer",Vt="vert",qt="frag",Ht="elements",Gt="primitive",Wt="count",Zt="offset",Yt="instances",Xt="vao",$t="Width",Kt="Height",Jt=Ut+$t,Qt=Ut+Kt,er=jt+$t,tr=jt+Kt,rr="drawingBuffer",nr=rr+$t,ir=rr+Kt,ar=[yt,gt,Dt,Ot,Rt,Lt,jt,Bt,Et],or=34962,sr=34963,lr=35664,cr=35665,ur=35666,hr=35667,fr=35668,pr=35669,dr=35671,mr=35672,gr=35673,yr=35674,vr=35675,xr=35676,_r=35678,br=35680,wr=1028,Tr=1029,kr=2305,Ar=7680,Mr={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Sr={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Er={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Cr={cw:2304,ccw:kr};function Ir(e){return Array.isArray(e)||x(e)||_(e)}function Lr(e){return e.sort((function(e,t){return e===jt?-1:t===jt?1:e=1,n>=2,t)}if(4===r){var i=e.data;return new Pr(i.thisDep,i.contextDep,i.propDep,t)}if(5===r)return new Pr(!1,!1,!1,t);if(6===r){for(var a=!1,o=!1,s=!1,l=0;l=1&&(o=!0),u>=2&&(s=!0)}else 4===c.type&&(a=a||c.data.thisDep,o=o||c.data.contextDep,s=s||c.data.propDep)}return new Pr(a,o,s,t)}return new Pr(3===r,2===r,1===r,t)}var Rr=new Pr(!1,!1,!1,(function(){}));function Fr(t,r,n,i,a,s,l,c,u,f,p,d,m,g,y,v){var x=f.Record,_={add:32774,subtract:32778,"reverse subtract":32779};n.ext_blend_minmax&&(_.min=32775,_.max=32776);var b=n.angle_instanced_arrays,w=n.webgl_draw_buffers,T=n.oes_vertex_array_object,k={dirty:!0,profile:v.profile},A={},M=[],E={},C={};function I(e){return e.replace(".","_")}function L(e,t,r){var n=I(e);M.push(e),A[n]=k[n]=!!r,E[n]=t}function P(e,t,r){var n=I(e);M.push(e),Array.isArray(r)?(k[n]=r.slice(),A[n]=r.slice()):k[n]=A[n]=r,C[n]=t}function z(e){return!!isNaN(e)}L(pt,3024),L(dt,3042),P(mt,"blendColor",[0,0,0,0]),P(gt,"blendEquationSeparate",[32774,32774]),P(yt,"blendFuncSeparate",[1,0,1,0]),L(vt,2929,!0),P(xt,"depthFunc",513),P(_t,"depthRange",[0,1]),P(bt,"depthMask",!0),P(wt,wt,[!0,!0,!0,!0]),L(Tt,2884),P(kt,"cullFace",Tr),P(At,At,kr),P(Mt,Mt,1),L(St,32823),P(Et,"polygonOffset",[0,0]),L(Ct,32926),L(It,32928),P(Lt,"sampleCoverage",[1,!1]),L(Pt,2960),P(zt,"stencilMask",-1),P(Dt,"stencilFunc",[519,0,-1]),P(Ot,"stencilOpSeparate",[wr,Ar,Ar,Ar]),P(Rt,"stencilOpSeparate",[Tr,Ar,Ar,Ar]),L(Ft,3089),P(Bt,"scissor",[0,0,t.drawingBufferWidth,t.drawingBufferHeight]),P(jt,jt,[0,0,t.drawingBufferWidth,t.drawingBufferHeight]);var D={gl:t,context:m,strings:r,next:A,current:k,draw:d,elements:s,buffer:a,shader:p,attributes:f.state,vao:f,uniforms:u,framebuffer:c,extensions:n,timer:g,isBufferArgs:Ir},O={primTypes:F,compareFuncs:Sr,blendFuncs:Mr,blendEquations:_,stencilOps:Er,glTypes:S,orientationType:Cr};w&&(O.backBuffer=[Tr],O.drawBuffer=h(i.maxDrawbuffers,(function(e){return 0===e?[0]:h(e,(function(e){return 36064+e}))})));var R=0;function B(){var t=function(t){var r=t&&t.cache,n=0,i=[],a=[],o=[];function s(){var t=[],r=[];return e((function(){t.push.apply(t,ut(arguments))}),{def:function(){var e="v"+n++;return r.push(e),arguments.length>0&&(t.push(e,"="),t.push.apply(t,ut(arguments)),t.push(";")),e},toString:function(){return ht([r.length>0?"var "+r.join(",")+";":"",ht(t)])}})}function l(){var t=s(),r=s(),n=t.toString,i=r.toString;function a(e,n){r(e,n,"=",t.def(e,n),";")}return e((function(){t.apply(t,ut(arguments))}),{def:t.def,entry:t,exit:r,save:a,set:function(e,r,n){a(e,r),t(e,r,"=",n,";")},toString:function(){return n()+i()}})}var c=s(),u={};return{global:c,link:function(e,t){var r=t&&t.stable;if(!r)for(var s=0;s"u"?"Date.now()":"performance.now()"}function d(e){e(a=t.def(),"=",p(),";"),"string"==typeof i?e(c,".count+=",i,";"):e(c,".count++;"),g&&(n?e(o=t.def(),"=",h,".getNumPendingQueries();"):e(h,".beginQuery(",c,");"))}function m(e){e(c,".cpuTime+=",p(),"-",a,";"),g&&(n?e(h,".pushScopeStats(",o,",",h,".getNumPendingQueries(),",c,");"):e(h,".endQuery();"))}function y(e){var r=t.def(u,".profile");t(u,".profile=",e,";"),t.exit(u,".profile=",r,";")}if(f){if(zr(f))return void(f.enable?(d(t),m(t.exit),y("true")):y("false"));y(s=f.append(e,t))}else s=t.def(u,".profile");var v=e.block();d(v),t("if(",s,"){",v,"}");var x=e.block();m(x),t.exit("if(",s,"){",x,"}")}function W(e,t,r,n,i){var a=e.shared;n.forEach((function(n){var o,s=n.name,l=r.attributes[s];if(l){if(!i(l))return;o=l.append(e,t)}else{if(!i(Rr))return;var c=e.scopeAttrib(s);o={},Object.keys(new x).forEach((function(e){o[e]=t.def(c,".",e)}))}!function(r,n,i){var o=a.gl,s=t.def(r,".location"),l=t.def(a.attributes,"[",s,"]"),c=i.state,u=i.buffer,h=[i.x,i.y,i.z,i.w],f=["buffer","normalized","offset","stride"];function p(){t("if(!",l,".buffer){",o,".enableVertexAttribArray(",s,");}");var r,a=i.type;if(r=i.size?t.def(i.size,"||",n):n,t("if(",l,".type!==",a,"||",l,".size!==",r,"||",f.map((function(e){return l+"."+e+"!=="+i[e]})).join("||"),"){",o,".bindBuffer(",or,",",u,".buffer);",o,".vertexAttribPointer(",[s,r,a,i.normalized,i.stride,i.offset],");",l,".type=",a,";",l,".size=",r,";",f.map((function(e){return l+"."+e+"="+i[e]+";"})).join(""),"}"),b){var c=i.divisor;t("if(",l,".divisor!==",c,"){",e.instancing,".vertexAttribDivisorANGLE(",[s,c],");",l,".divisor=",c,";}")}}function d(){t("if(",l,".buffer){",o,".disableVertexAttribArray(",s,");",l,".buffer=null;","}if(",ft.map((function(e,t){return l+"."+e+"!=="+h[t]})).join("||"),"){",o,".vertexAttrib4f(",s,",",h,");",ft.map((function(e,t){return l+"."+e+"="+h[t]+";"})).join(""),"}")}1===c?p():2===c?d():(t("if(",c,"===",1,"){"),p(),t("}else{"),d(),t("}"))}(e.link(n),function(e){switch(e){case lr:case hr:case dr:return 2;case cr:case fr:case mr:return 3;case ur:case pr:case gr:return 4;default:return 1}}(n.info.type),o)}))}function Z(e,t,n,i,a,o){for(var s,l=e.shared,c=l.gl,u=0;u1){for(var M=[],S=[],E=0;E>1)",p],");")}function t(){r(d,".drawArraysInstancedANGLE(",[m,g,y,p],");")}h&&"null"!==h?x?e():(r("if(",h,"){"),e(),r("}else{"),t(),r("}")):t()}function w(){function e(){r(l+".drawElements("+[m,y,v,g+"<<(("+v+"-5121)>>1)"]+");")}function t(){r(l+".drawArrays("+[m,g,y]+");")}h&&"null"!==h?x?e():(r("if(",h,"){"),e(),r("}else{"),t(),r("}")):t()}b&&("number"!=typeof p||p>=0)?"string"==typeof p?(r("if(",p,">0){"),_(),r("}else if(",p,"<0){"),w(),r("}")):_():w()}function X(e,t,r,n,i){var a=B(),o=a.proc("body",i);return b&&(a.instancing=o.def(a.shared.extensions,".angle_instanced_arrays")),e(a,o,r,n),a.compile().body}function $(e,t,r,n){q(e,t),r.useVAO?r.drawVAO?t(e.shared.vao,".setVAO(",r.drawVAO.append(e,t),");"):t(e.shared.vao,".setVAO(",e.shared.vao,".targetVAO);"):(t(e.shared.vao,".setVAO(null);"),W(e,t,r,n.attributes,(function(){return!0}))),Z(e,t,r,n.uniforms,(function(){return!0}),!1),Y(e,t,t,r)}function K(e,t,r,n){function i(){return!0}e.batchId="a1",q(e,t),W(e,t,r,n.attributes,i),Z(e,t,r,n.uniforms,i,!1),Y(e,t,t,r)}function J(e,t,r,n){q(e,t);var i=r.contextDep,a=t.def(),o=t.def();e.shared.props=o,e.batchId=a;var s=e.scope(),l=e.scope();function c(e){return e.contextDep&&i||e.propDep}function u(e){return!c(e)}if(t(s.entry,"for(",a,"=0;",a,"<","a1",";++",a,"){",o,"=","a0","[",a,"];",l,"}",s.exit),r.needsContext&&j(e,l,r.context),r.needsFramebuffer&&N(e,l,r.framebuffer),V(e,l,r.state,c),r.profile&&c(r.profile)&&H(e,l,r,!1,!0),n)r.useVAO?r.drawVAO?c(r.drawVAO)?l(e.shared.vao,".setVAO(",r.drawVAO.append(e,l),");"):s(e.shared.vao,".setVAO(",r.drawVAO.append(e,s),");"):s(e.shared.vao,".setVAO(",e.shared.vao,".targetVAO);"):(s(e.shared.vao,".setVAO(null);"),W(e,s,r,n.attributes,u),W(e,l,r,n.attributes,c)),Z(e,s,r,n.uniforms,u,!1),Z(e,l,r,n.uniforms,c,!0),Y(e,s,l,r);else{var h=e.global.def("{}"),f=r.shader.progVar.append(e,l),p=l.def(f,".id"),d=l.def(h,"[",p,"]");l(e.shared.gl,".useProgram(",f,".program);","if(!",d,"){",d,"=",h,"[",p,"]=",e.link((function(e){return X(K,0,r,e,2)})),"(",f,");}",d,".call(this,a0[",a,"],",a,");")}}function Q(e,t,r){var n=t.static[r];if(n&&function(e){if("object"==typeof e&&!G(e)){for(var t=Object.keys(e),r=0;r0)return null;var n=t.static,i=Object.keys(n);if(i.length>0&&"number"==typeof n[i[0]]){for(var a=[],o=0;o0,w={framebuffer:u,draw:m,shader:y,state:g,dirty:b,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(w.profile=function(e){var t,r=e.static,n=e.dynamic;if(Nt in r){var i=!!r[Nt];(t=Dr((function(e,t){return i}))).enable=i}else if(Nt in n){var a=n[Nt];t=Or(a,(function(e,t){return e.invoke(t,a)}))}return t}(e),w.uniforms=function(e){var t=e.static,r=e.dynamic,n={};return Object.keys(t).forEach((function(e){var r,i=t[e];if("number"==typeof i||"boolean"==typeof i)r=Dr((function(){return i}));else if("function"==typeof i){var a=i._reglType;"texture2d"===a||"textureCube"===a?r=Dr((function(e){return e.link(i)})):("framebuffer"===a||"framebufferCube"===a)&&(r=Dr((function(e){return e.link(i.color[0])})))}else G(i)&&(r=Dr((function(e){return e.global.def("[",h(i.length,(function(e){return i[e]})),"]")})));r.value=i,n[e]=r})),Object.keys(r).forEach((function(e){var t=r[e];n[e]=Or(t,(function(e,r){return e.invoke(r,t)}))})),n}(i),w.drawVAO=w.scopeVAO=m.vao,!w.drawVAO&&y.program&&!l&&n.angle_instanced_arrays&&m.static.elements){var T=!0,k=y.program.attributes.map((function(e){var r=t.static[e];return T=T&&!!r,r}));if(T&&k.length>0){var A=f.getVAO(f.createVAO({attributes:k,elements:m.static.elements}));w.drawVAO=new Pr(null,null,null,(function(e,t){return e.link(A)})),w.useVAO=!0}}return l?w.useVAO=!0:w.attributes=function(e){var t=e.static,n=e.dynamic,i={};return Object.keys(t).forEach((function(e){var n=t[e],o=r.id(e),s=new x;if(Ir(n))s.state=1,s.buffer=a.getBuffer(a.create(n,or,!1,!0)),s.type=0;else{var l=a.getBuffer(n);if(l)s.state=1,s.buffer=l,s.type=0;else if("constant"in n){var c=n.constant;s.buffer="null",s.state=2,"number"==typeof c?s.x=c:ft.forEach((function(e,t){t"+t+"?"+n+".constant["+t+"]:0;"})).join(""),"}}else{","if(",o,"(",n,".buffer)){",u,"=",s,".createStream(",or,",",n,".buffer);","}else{",u,"=",s,".getBuffer(",n,".buffer);","}",h,'="type" in ',n,"?",a.glTypes,"[",n,".type]:",u,".dtype;",l.normalized,"=!!",n,".normalized;"),f("size"),f("offset"),f("stride"),f("divisor"),r("}}"),r.exit("if(",l.isStream,"){",s,".destroyStream(",u,");","}"),l}))})),i}(t),w.context=function(e){var t=e.static,r=e.dynamic,n={};return Object.keys(t).forEach((function(e){var r=t[e];n[e]=Dr((function(e,t){return"number"==typeof r||"boolean"==typeof r?""+r:e.link(r)}))})),Object.keys(r).forEach((function(e){var t=r[e];n[e]=Or(t,(function(e,r){return e.invoke(r,t)}))})),n}(o),w}(t,i,o,l);return m.shader.program&&(m.shader.program.attributes.sort((function(e,t){return e.name0&&r(e.shared.current,".dirty=true;"),e.shared.vao&&r(e.shared.vao,".setVAO(null);")}(d,m),function(e,t){var n=e.proc("scope",3);e.batchId="a2";var i=e.shared,a=i.current;if(j(e,n,t.context),t.framebuffer&&t.framebuffer.append(e,n),Lr(Object.keys(t.state)).forEach((function(r){var a=t.state[r],o=a.append(e,n);G(o)?o.forEach((function(t,i){z(t)?n.set(e.next[r],"["+i+"]",t):n.set(e.next[r],"["+i+"]",e.link(t,{stable:!0}))})):zr(a)?n.set(i.next,"."+r,e.link(o,{stable:!0})):n.set(i.next,"."+r,o)})),H(e,n,t,!0,!0),[Ht,Zt,Wt,Yt,Gt].forEach((function(r){var a=t.draw[r];if(a){var o=a.append(e,n);z(o)?n.set(i.draw,"."+r,o):n.set(i.draw,"."+r,e.link(o),{stable:!0})}})),Object.keys(t.uniforms).forEach((function(a){var o=t.uniforms[a].append(e,n);Array.isArray(o)&&(o="["+o.map((function(t){return z(t)?t:e.link(t,{stable:!0})}))+"]"),n.set(i.uniforms,"["+e.link(r.id(a),{stable:!0})+"]",o)})),Object.keys(t.attributes).forEach((function(r){var i=t.attributes[r].append(e,n),a=e.scopeAttrib(r);Object.keys(new x).forEach((function(e){n.set(a,"."+e,i[e])}))})),t.scopeVAO){var o=t.scopeVAO.append(e,n);z(o)?n.set(i.vao,".targetVAO",o):n.set(i.vao,".targetVAO",e.link(o,{stable:!0}))}function s(r){var a=t.shader[r];if(a){var o=a.append(e,n);z(o)?n.set(i.shader,"."+r,o):n.set(i.shader,"."+r,e.link(o,{stable:!0}))}}s(Vt),s(qt),Object.keys(t.state).length>0&&(n(a,".dirty=true;"),n.exit(a,".dirty=true;")),n("a1(",e.shared.context,",a0,",e.batchId,");")}(d,m),function(e,t){var r=e.proc("batch",2);e.batchId="0",q(e,r);var n=!1,i=!0;Object.keys(t.context).forEach((function(e){n=n||t.context[e].propDep})),n||(j(e,r,t.context),i=!1);var a=t.framebuffer,o=!1;function s(e){return e.contextDep&&n||e.propDep}a?(a.propDep?n=o=!0:a.contextDep&&n&&(o=!0),o||N(e,r,a)):N(e,r,null),t.state.viewport&&t.state.viewport.propDep&&(n=!0),U(e,r,t),V(e,r,t.state,(function(e){return!s(e)})),(!t.profile||!s(t.profile))&&H(e,r,t,!1,"a1"),t.contextDep=n,t.needsContext=i,t.needsFramebuffer=o;var l=t.shader.progVar;if(l.contextDep&&n||l.propDep)J(e,r,t,null);else{var c=l.append(e,r);if(r(e.shared.gl,".useProgram(",c,".program);"),t.shader.program)J(e,r,t,t.shader.program);else{r(e.shared.vao,".setVAO(null);");var u=e.global.def("{}"),h=r.def(c,".id"),f=r.def(u,"[",h,"]");r(e.cond(f).then(f,".call(this,a0,a1);").else(f,"=",u,"[",h,"]=",e.link((function(e){return X(J,0,t,e,2)})),"(",c,");",f,".call(this,a0,a1);"))}}Object.keys(t.state).length>0&&r(e.shared.current,".dirty=true;"),e.shared.vao&&r(e.shared.vao,".setVAO(null);")}(d,m),e(d.compile(),{destroy:function(){m.shader.program.destroy()}})}}}var Br="webglcontextlost",jr="webglcontextrestored";function Nr(e,t){for(var r=0;r"u"?1:window.devicePixelRatio,p=!1,d={},m=function(e){},g=function(){};if("string"==typeof o?r=document.querySelector(o):"object"==typeof o&&(function(e){return"string"==typeof e.nodeName&&"function"==typeof e.appendChild&&"function"==typeof e.getBoundingClientRect}(o)?r=o:function(e){return"function"==typeof e.drawArrays||"function"==typeof e.drawElements}(o)?i=(a=o).canvas:("gl"in o?a=o.gl:"canvas"in o?i=u(o.canvas):"container"in o&&(n=u(o.container)),"attributes"in o&&(s=o.attributes),"extensions"in o&&(l=c(o.extensions)),"optionalExtensions"in o&&(h=c(o.optionalExtensions)),"onDone"in o&&(m=o.onDone),"profile"in o&&(p=!!o.profile),"pixelRatio"in o&&(f=+o.pixelRatio),"cachedCode"in o&&(d=o.cachedCode))),r&&("canvas"===r.nodeName.toLowerCase()?i=r:n=r),!a){if(!i){var y=function(t,r,n){var i,a=document.createElement("canvas");function o(){var e=window.innerWidth,r=window.innerHeight;if(t!==document.body){var i=a.getBoundingClientRect();e=i.right-i.left,r=i.bottom-i.top}a.width=n*e,a.height=n*r}return e(a.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),t.appendChild(a),t===document.body&&(a.style.position="absolute",e(t.style,{margin:0,padding:0})),t!==document.body&&"function"==typeof ResizeObserver?(i=new ResizeObserver((function(){setTimeout(o)}))).observe(t):window.addEventListener("resize",o,!1),o(),{canvas:a,onDestroy:function(){i?i.disconnect():window.removeEventListener("resize",o),t.removeChild(a)}}}(n||document.body,0,f);if(!y)return null;i=y.canvas,g=y.onDestroy}void 0===s.premultipliedAlpha&&(s.premultipliedAlpha=!0),a=function(e,t){function r(r){try{return e.getContext(r,t)}catch{return null}}return r("webgl")||r("experimental-webgl")||r("webgl-experimental")}(i,s)}return a?{gl:a,canvas:i,container:n,extensions:l,optionalExtensions:h,pixelRatio:f,profile:p,cachedCode:d,onDone:m,onDestroy:g}:(g(),m("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}(t);if(!r)return null;var n=r.gl,i=n.getContextAttributes(),a=(n.isContextLost(),function(e,t){var r={};function n(t){var n,i=t.toLowerCase();try{n=r[i]=e.getExtension(i)}catch{}return!!n}for(var i=0;i0)if(Array.isArray(t[0])){o=I(t);for(var c=1,u=1;u0)if("number"==typeof e[0]){var i=d.allocType(h.dtype,e.length);O(i,e),p(i,n),d.freeType(i)}else if(Array.isArray(e[0])||x(e[0])){r=I(e);var a=C(e,r,h.dtype);p(a,n),d.freeType(a)}}else if(_(e)){r=e.shape;var o=e.stride,s=0,l=0,c=0,u=0;1===r.length?(s=r[0],l=1,c=o[0],u=0):2===r.length&&(s=r[0],l=r[1],c=o[0],u=o[1]);var m=Array.isArray(e.data)?h.dtype:D(e.data),g=d.allocType(m,s*l);R(g,e.data,s,l,c,u,e.offset),p(g,n),d.freeType(g)}return f},r.profile&&(f.stats=h.stats),f.destroy=function(){c(h)},f},createStream:function(e,t){var r=o.pop();return r||(r=new a(e)),r.bind(),l(r,t,35040,0,1,!1),r},destroyStream:function(e){o.push(e)},clear:function(){b(i).forEach(c),o.forEach(c)},getBuffer:function(e){return e&&e._buffer instanceof a?e._buffer:null},restore:function(){b(i).forEach((function(t){t.buffer=e.createBuffer(),e.bindBuffer(t.type,t.buffer),e.bufferData(t.type,t.persistentData||t.byteLength,t.usage)}))},_initBuffer:l}}(n,f,r),Ie=function(e,t,r,n){var i={},a=0,o={uint8:B,uint16:j};function s(e){this.id=a++,i[this.id]=this,this.buffer=e,this.primType=4,this.vertCount=0,this.type=0}t.oes_element_index_uint&&(o.uint32=N),s.prototype.bind=function(){this.buffer.bind()};var l=[];function c(n,i,a,o,s,l,c){var u;if(n.buffer.bind(),i){var h=c;!c&&(!x(i)||_(i)&&!x(i.data))&&(h=t.oes_element_index_uint?N:j),r._initBuffer(n.buffer,i,a,h,3)}else e.bufferData(U,l,a),n.buffer.dtype=u||B,n.buffer.usage=a,n.buffer.dimension=3,n.buffer.byteLength=l;if(u=c,!c){switch(n.buffer.dtype){case B:case 5120:u=B;break;case j:case 5122:u=j;break;case N:case 5124:u=N}n.buffer.dtype=u}n.type=u;var f=s;f<0&&(f=n.buffer.byteLength,u===j?f>>=1:u===N&&(f>>=2)),n.vertCount=f;var p=o;if(o<0){p=4;var d=n.buffer.dimension;1===d&&(p=0),2===d&&(p=1),3===d&&(p=4)}n.primType=p}function u(e){n.elementsCount--,delete i[e.id],e.buffer.destroy(),e.buffer=null}return{create:function(e,t){var i=r.create(null,U,!0),a=new s(i._buffer);function l(e){if(e)if("number"==typeof e)i(e),a.primType=4,a.vertCount=0|e,a.type=B;else{var t=null,r=35044,n=-1,s=-1,u=0,h=0;Array.isArray(e)||x(e)||_(e)?t=e:("data"in e&&(t=e.data),"usage"in e&&(r=E[e.usage]),"primitive"in e&&(n=F[e.primitive]),"count"in e&&(s=0|e.count),"type"in e&&(h=o[e.type]),"length"in e?u=0|e.length:(u=s,h===j||5122===h?u*=2:(h===N||5124===h)&&(u*=4))),c(a,t,r,n,s,u,h)}else i(),a.primType=4,a.vertCount=0,a.type=B;return l}return n.elementsCount++,l(e),l._reglType="elements",l._elements=a,l.subdata=function(e,t){return i.subdata(e,t),l},l.destroy=function(){u(a)},l},createStream:function(e){var t=l.pop();return t||(t=new s(r.create(null,U,!0,!1)._buffer)),c(t,e,35040,-1,-1,0,0),t},destroyStream:function(e){l.push(e)},getElements:function(e){return"function"==typeof e&&e._elements instanceof s?e._elements:null},clear:function(){b(i).forEach(u)}}}(n,k,Ce,f),Le=function(e,t,r,n,i,a,o){for(var s=r.maxAttributes,l=new Array(s),c=0;c=p.byteLength?u.subdata(p):(u.destroy(),t.buffers[c]=null)),t.buffers[c]||(u=t.buffers[c]=i.create(h,34962,!1,!0)),f.buffer=i.getBuffer(u),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1,s[c]=1):i.getBuffer(h)?(f.buffer=i.getBuffer(h),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1):i.getBuffer(h.buffer)?(f.buffer=i.getBuffer(h.buffer),f.size=0|(+h.size||f.buffer.dimension),f.normalized=!!h.normalized||!1,f.type="type"in h?S[h.type]:f.buffer.dtype,f.offset=0|(h.offset||0),f.stride=0|(h.stride||0),f.divisor=0|(h.divisor||0),f.state=1):"x"in h&&(f.x=+h.x||0,f.y=+h.y||0,f.z=+h.z||0,f.w=+h.w||0,f.state=2)}for(var d=0;d1)for(var y=0;ye&&(e=t.stats.uniformsCount)})),e},n.getMaxAttributesCount=function(){var e=0;return h.forEach((function(t){t.stats.attributesCount>e&&(e=t.stats.attributesCount)})),e}),{clear:function(){var e=t.deleteShader.bind(t);b(a).forEach(e),a={},b(o).forEach(e),o={},h.forEach((function(e){t.deleteProgram(e.program)})),h.length=0,u={},n.shaderCount=0},program:function(r,i,s,l){var c=u[i];c||(c=u[i]={});var f=c[r];if(f&&(f.refCount++,!l))return f;var m=new p(i,r);return n.shaderCount++,d(m,0,l),f||(c[r]=m),h.push(m),e(m,{destroy:function(){if(m.refCount--,m.refCount<=0){t.deleteProgram(m.program);var e=h.indexOf(m);h.splice(e,1),n.shaderCount--}c[m.vertId].refCount<=0&&(t.deleteShader(o[m.vertId]),delete o[m.vertId],delete u[m.fragId][m.vertId]),Object.keys(u[m.fragId]).length||(t.deleteShader(a[m.fragId]),delete a[m.fragId],delete u[m.fragId])}})},restore:function(){a={},o={};for(var e=0;e=0&&(m[e]=t)}));var v=Object.keys(m);n.textureFormats=v;var k=[];Object.keys(m).forEach((function(e){var t=m[e];k[t]=e}));var A=[];Object.keys(p).forEach((function(e){var t=p[e];A[t]=e}));var M=[];Object.keys(u).forEach((function(e){M[u[e]]=e}));var S=[];Object.keys(h).forEach((function(e){var t=h[e];S[t]=e}));var E=[];Object.keys(c).forEach((function(e){E[c[e]]=e}));var C=v.reduce((function(e,t){var n=m[t];return n===J||n===$||n===J||n===Q||n===te||n===re||r.ext_srgb&&(n===ne||n===ie)?e[n]=n:n===ee||t.indexOf("rgba")>=0?e[n]=X:e[n]=K,e}),{});function I(){this.internalformat=X,this.format=X,this.type=ce,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=37444,this.width=0,this.height=0,this.channels=0}function L(e,t){e.internalformat=t.internalformat,e.format=t.format,e.type=t.type,e.compressed=t.compressed,e.premultiplyAlpha=t.premultiplyAlpha,e.flipY=t.flipY,e.unpackAlignment=t.unpackAlignment,e.colorSpace=t.colorSpace,e.width=t.width,e.height=t.height,e.channels=t.channels}function P(e,t){if("object"==typeof t&&t){if("premultiplyAlpha"in t&&(e.premultiplyAlpha=t.premultiplyAlpha),"flipY"in t&&(e.flipY=t.flipY),"alignment"in t&&(e.unpackAlignment=t.alignment),"colorSpace"in t&&(e.colorSpace=f[t.colorSpace]),"type"in t){var r=t.type;e.type=p[r]}var n=e.width,i=e.height,a=e.channels,o=!1;"shape"in t?(n=t.shape[0],i=t.shape[1],3===t.shape.length&&(a=t.shape[2],o=!0)):("radius"in t&&(n=i=t.radius),"width"in t&&(n=t.width),"height"in t&&(i=t.height),"channels"in t&&(a=t.channels,o=!0)),e.width=0|n,e.height=0|i,e.channels=0|a;var s=!1;if("format"in t){var l=t.format,c=e.internalformat=m[l];e.format=C[c],l in p&&("type"in t||(e.type=p[l])),l in g&&(e.compressed=!0),s=!0}!o&&s?e.channels=be[e.format]:o&&!s&&e.channels!==_e[e.format]&&(e.format=e.internalformat=_e[e.channels])}}function z(e){t.pixelStorei(37440,e.flipY),t.pixelStorei(37441,e.premultiplyAlpha),t.pixelStorei(37443,e.colorSpace),t.pixelStorei(3317,e.unpackAlignment)}function D(){I.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function O(e,t){var r=null;if(Fe(t)?r=t:t&&(P(e,t),"x"in t&&(e.xOffset=0|t.x),"y"in t&&(e.yOffset=0|t.y),Fe(t.data)&&(r=t.data)),t.copy){var n=a.viewportWidth,i=a.viewportHeight;e.width=e.width||n-e.xOffset,e.height=e.height||i-e.yOffset,e.needsCopy=!0}else if(r){if(x(r))e.channels=e.channels||4,e.data=r,!("type"in t)&&e.type===ce&&(e.type=Be(r));else if(Pe(r))e.channels=e.channels||4,function(e,t){var r=t.length;switch(e.type){case ce:case ue:case he:case fe:var n=d.allocType(e.type,r);n.set(t),e.data=n;break;case ae:e.data=H(t)}}(e,r),e.alignment=1,e.needsFree=!0;else if(_(r)){var o=r.data;!Array.isArray(o)&&e.type===ce&&(e.type=Be(o));var s,l,c,u,h,f,p=r.shape,m=r.stride;3===p.length?(c=p[2],f=m[2]):(c=1,f=1),s=p[0],l=p[1],u=m[0],h=m[1],e.alignment=1,e.width=s,e.height=l,e.channels=c,e.format=e.internalformat=_e[c],e.needsFree=!0,function(e,t,r,n,i,a){for(var o=e.width,s=e.height,l=e.channels,c=je(e,o*s*l),u=0,h=0;h>=i,r.height>>=i,O(r,n[i]),e.mipmask|=1<=0&&!("faces"in t)&&(e.genMipmaps=!0)}if("mag"in t){var n=t.mag;e.magFilter=u[n]}var i=e.wrapS,a=e.wrapT;if("wrap"in t){var o=t.wrap;"string"==typeof o?i=a=c[o]:Array.isArray(o)&&(i=c[o[0]],a=c[o[1]])}else{if("wrapS"in t){var s=t.wrapS;i=c[s]}if("wrapT"in t){var f=t.wrapT;a=c[f]}}if(e.wrapS=i,e.wrapT=a,"anisotropic"in t&&(t.anisotropic,e.anisotropic=t.anisotropic),"mipmap"in t){var p=!1;switch(typeof t.mipmap){case"string":e.mipmapHint=l[t.mipmap],e.genMipmaps=!0,p=!0;break;case"boolean":p=e.genMipmaps=t.mipmap;break;case"object":e.genMipmaps=!1,p=!0}p&&!("min"in t)&&(e.minFilter=me)}}function Ve(e,n){t.texParameteri(n,10241,e.minFilter),t.texParameteri(n,10240,e.magFilter),t.texParameteri(n,10242,e.wrapS),t.texParameteri(n,10243,e.wrapT),r.ext_texture_filter_anisotropic&&t.texParameteri(n,34046,e.anisotropic),e.genMipmaps&&(t.hint(33170,e.mipmapHint),t.generateMipmap(n))}var qe=0,He={},Ge=n.maxTextureUnits,We=Array(Ge).map((function(){return null}));function Ze(e){I.call(this),this.mipmask=0,this.internalformat=X,this.id=qe++,this.refCount=1,this.target=e,this.texture=t.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new Ie,s.profile&&(this.stats={size:0})}function Ye(e){t.activeTexture(ve),t.bindTexture(e.target,e.texture)}function Xe(){var e=We[0];e?t.bindTexture(e.target,e.texture):t.bindTexture(W,null)}function $e(e){var r=e.texture,n=e.unit,i=e.target;n>=0&&(t.activeTexture(ve+n),t.bindTexture(i,null),We[n]=null),t.deleteTexture(r),e.texture=null,e.params=null,e.pixels=null,e.refCount=0,delete He[e.id],o.textureCount--}return e(Ze.prototype,{bind:function(){var e=this;e.bindCount+=1;var r=e.unit;if(r<0){for(var n=0;n0)continue;i.unit=-1}We[n]=e,r=n;break}s.profile&&o.maxTextureUnits>l)-o,c.height=c.height||(n.height>>l)-s,Ye(n),F(c,W,o,s,l),Xe(),N(c),i},i.resize=function(e,r){var a=0|e,o=0|r||a;if(a===n.width&&o===n.height)return i;i.width=n.width=a,i.height=n.height=o,Ye(n);for(var l=0;n.mipmask>>l;++l){var c=a>>l,u=o>>l;if(!c||!u)break;t.texImage2D(W,l,n.format,c,u,0,n.format,n.type,null)}return Xe(),s.profile&&(n.stats.size=Ue(n.internalformat,n.type,a,o,!1,!1)),i},i._reglType="texture2d",i._texture=n,s.profile&&(i.stats=n.stats),i.destroy=function(){n.decRef()},i},createCube:function(e,r,n,i,a,l){var c=new Ze(Z);He[c.id]=c,o.cubeCount++;var u=new Array(6);function h(e,t,r,n,i,a){var o,l=c.texInfo;for(Ie.call(l),o=0;o<6;++o)u[o]=ke();if("number"!=typeof e&&e){if("object"==typeof e)if(t)q(u[0],e),q(u[1],t),q(u[2],r),q(u[3],n),q(u[4],i),q(u[5],a);else if(Le(l,e),P(c,e),"faces"in e){var f=e.faces;for(o=0;o<6;++o)L(u[o],c),q(u[o],f[o])}else for(o=0;o<6;++o)q(u[o],e)}else{var p=0|e||1;for(o=0;o<6;++o)V(u[o],p,p)}for(L(c,u[0]),l.genMipmaps?c.mipmask=(u[0].width<<1)-1:c.mipmask=u[0].mipmask,c.internalformat=u[0].internalformat,h.width=u[0].width,h.height=u[0].height,Ye(c),o=0;o<6;++o)we(u[o],Y+o);for(Ve(l,Z),Xe(),s.profile&&(c.stats.size=Ue(c.internalformat,c.type,h.width,h.height,l.genMipmaps,!0)),h.format=k[c.internalformat],h.type=A[c.type],h.mag=M[l.magFilter],h.min=S[l.minFilter],h.wrapS=E[l.wrapS],h.wrapT=E[l.wrapT],o=0;o<6;++o)Ce(u[o]);return h}return h(e,r,n,i,a,l),h.subimage=function(e,t,r,n,i){var a=0|r,o=0|n,s=0|i,l=j();return L(l,c),l.width=0,l.height=0,O(l,t),l.width=l.width||(c.width>>s)-a,l.height=l.height||(c.height>>s)-o,Ye(c),F(l,Y+e,a,o,s),Xe(),N(l),h},h.resize=function(e){var r=0|e;if(r!==c.width){h.width=c.width=r,h.height=c.height=r,Ye(c);for(var n=0;n<6;++n)for(var i=0;c.mipmask>>i;++i)t.texImage2D(Y+n,i,c.format,r>>i,r>>i,0,c.format,c.type,null);return Xe(),s.profile&&(c.stats.size=Ue(c.internalformat,c.type,h.width,h.height,!1,!0)),h}},h._reglType="textureCube",h._texture=c,s.profile&&(h.stats=c.stats),h.destroy=function(){c.decRef()},h},clear:function(){for(var e=0;e>r,e.height>>r,0,e.internalformat,e.type,null);else for(var n=0;n<6;++n)t.texImage2D(Y+n,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);Ve(e.texInfo,e.target)}))},refresh:function(){for(var e=0;e=0?f=!0:c.indexOf(d)>=0&&(f=!1))),("depthTexture"in M||"depthStencilTexture"in M)&&(k=!(!M.depthTexture&&!M.depthStencilTexture)),"depth"in M&&("boolean"==typeof M.depth?s=M.depth:(_=M.depth,u=!1)),"stencil"in M&&("boolean"==typeof M.stencil?u=M.stencil:(b=M.stencil,s=!1)),"depthStencil"in M&&("boolean"==typeof M.depthStencil?s=u=M.depthStencil:(w=M.depthStencil,s=!1,u=!1))}else a=o=1;var E=null,C=null,I=null,L=null;if(Array.isArray(h))E=h.map(m);else if(h)E=[m(h)];else for(E=new Array(x),r=0;r0&&(s.depth=r[0].depth,s.stencil=r[0].stencil,s.depthStencil=r[0].depthStencil),r[a]?r[a](s):r[a]=M(s)}return e(n,{width:l,height:l,color:o})}return n(t),e(n,{faces:r,resize:function(e){var t,i=0|e;if(i===n.width)return n;var a=n.color;for(t=0;t=0;--e){var t=ot[e];t&&t(we,null,0)}n.flush(),A&&A.update()}function ft(){!ut&&ot.length>0&&(ut=s.next(ht))}function pt(){ut&&(s.cancel(ht),ut=null)}function dt(e){e.preventDefault(),pt(),st.forEach((function(e){e()}))}function mt(e){n.getError(),a.restore(),He.restore(),Ce.restore(),Qe.restore(),et.restore(),tt.restore(),Le.restore(),A&&A.restore(),rt.procs.refresh(),ft(),lt.forEach((function(e){e()}))}function gt(t){function r(e,t){var r={},n={};return Object.keys(e).forEach((function(i){var a=e[i];if(o.isDynamic(a))n[i]=o.unbox(a,i);else{if(t&&Array.isArray(a))for(var s=0;s0)return h.call(this,function(e){for(;p.length=0},read:nt,destroy:function(){ot.length=0,pt(),at&&(at.removeEventListener(Br,dt),at.removeEventListener(jr,mt)),He.clear(),tt.clear(),et.clear(),Le.clear(),Qe.clear(),Ie.clear(),Ce.clear(),A&&A.clear(),ct.forEach((function(e){e()}))},_gl:n,_refresh:wt,poll:function(){bt(),A&&A.update()},now:Tt,stats:f,getCachedCode:function(){return p},preloadCachedCode:function(e){Object.entries(e).forEach((function(e){p[e[0]]=e[1]}))}});return r.onDone(null,kt),kt}},"object"==typeof e&&typeof t<"u"?t.exports=n():r.createREGL=n()}}),mx=m({"node_modules/gl-util/context.js"(e,t){var r=ty();function n(e){if(e.container)if(e.container==document.body)document.body.style.width||(e.canvas.width=e.width||e.pixelRatio*window.innerWidth),document.body.style.height||(e.canvas.height=e.height||e.pixelRatio*window.innerHeight);else{var t=e.container.getBoundingClientRect();e.canvas.width=e.width||t.right-t.left,e.canvas.height=e.height||t.bottom-t.top}}function i(e){return"function"==typeof e.getContext&&"width"in e&&"height"in e}function a(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top=0,e.style.left=0,e}t.exports=function(e){if(e?"string"==typeof e&&(e={container:e}):e={},(e=i(e)||"string"==typeof(t=e).nodeName&&"function"==typeof t.appendChild&&"function"==typeof t.getBoundingClientRect?{container:e}:function(e){return"function"==typeof e.drawArrays||"function"==typeof e.drawElements}(e)?{gl:e}:r(e,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0)).pixelRatio||(e.pixelRatio=window.pixelRatio||1),e.gl)return e.gl;var t;if(e.canvas&&(e.container=e.canvas.parentNode),e.container){if("string"==typeof e.container){var o=document.querySelector(e.container);if(!o)throw Error("Element "+e.container+" is not found");e.container=o}i(e.container)?(e.canvas=e.container,e.container=e.canvas.parentNode):e.canvas||(e.canvas=a(),e.container.appendChild(e.canvas),n(e))}else if(!e.canvas){if(!(typeof document<"u"))throw Error("Not DOM environment. Use headless-gl.");e.container=document.body||document.documentElement,e.canvas=a(),e.container.appendChild(e.canvas),n(e)}return e.gl||["webgl","experimental-webgl","webgl-experimental"].some((function(t){try{e.gl=e.canvas.getContext(t,e.attrs)}catch{}return e.gl})),e.gl}}}),gx=m({"node_modules/font-atlas/index.js"(e,t){var r=fx(),n=[32,126];t.exports=function(e){var t=(e=e||{}).shape?e.shape:e.canvas?[e.canvas.width,e.canvas.height]:[512,512],i=e.canvas||document.createElement("canvas"),a=e.font,o="number"==typeof e.step?[e.step,e.step]:e.step||[32,32],s=e.chars||n;if(a&&"string"!=typeof a&&(a=r(a)),Array.isArray(s)){if(2===s.length&&"number"==typeof s[0]&&"number"==typeof s[1]){for(var l=[],c=s[0],u=0;c<=s[1];c++)l[u++]=String.fromCharCode(c);s=l}}else s=String(s).split("");t=t.slice(),i.width=t[0],i.height=t[1];var h=i.getContext("2d");h.fillStyle="#000",h.fillRect(0,0,i.width,i.height),h.font=a,h.textAlign="center",h.textBaseline="middle",h.fillStyle="#fff";var f=o[0]/2,p=o[1]/2;for(c=0;ct[0]-o[0]/2&&(f=o[0]/2,p+=o[1]);return i}}}),yx=m({"node_modules/bit-twiddle/twiddle.js"(e){function t(e){var t=32;return(e&=-e)&&t--,65535&e&&(t-=16),16711935&e&&(t-=8),252645135&e&&(t-=4),858993459&e&&(t-=2),1431655765&e&&(t-=1),t}e.INT_BITS=32,e.INT_MAX=2147483647,e.INT_MIN=-1<<31,e.sign=function(e){return(e>0)-(e<0)},e.abs=function(e){var t=e>>31;return(e^t)-t},e.min=function(e,t){return t^(e^t)&-(e65535)<<4,t|=r=((e>>>=t)>255)<<3,t|=r=((e>>>=r)>15)<<2,(t|=r=((e>>>=r)>3)<<1)|(e>>>=r)>>1},e.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0},e.popCount=function(e){return 16843009*((e=(858993459&(e-=e>>>1&1431655765))+(e>>>2&858993459))+(e>>>4)&252645135)>>>24},e.countTrailingZeros=t,e.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,1+((e|=e>>>8)|e>>>16)},e.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},e.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var r=new Array(256);(function(e){for(var t=0;t<256;++t){var r=t,n=t,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;e[t]=n<>>8&255]<<16|r[e>>>16&255]<<8|r[e>>>24&255]},e.interleave2=function(e,t){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))<<1},e.deinterleave2=function(e,t){return(e=65535&((e=16711935&((e=252645135&((e=858993459&((e=e>>>t&1431655765)|e>>>1))|e>>>2))|e>>>4))|e>>>16))<<16>>16},e.interleave3=function(e,t,r){return e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2),(e|=(t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},e.deinterleave3=function(e,t){return(e=1023&((e=4278190335&((e=251719695&((e=3272356035&((e=e>>>t&1227133513)|e>>>2))|e>>>4))|e>>>8))|e>>>16))<<22>>22},e.nextCombination=function(e){var r=e|e-1;return r+1|(~r&-~r)-1>>>t(e)+1}}}),vx=m({"node_modules/dup/dup.js"(e,t){function r(e,t,n){var i=0|e[n];if(i<=0)return[];var a,o=new Array(i);if(n===e.length-1)for(a=0;a"u"&&(t=0),typeof e){case"number":if(e>0)return function(e,t){var r,n;for(r=new Array(e),n=0;n0?n.pop():new ArrayBuffer(e)}function f(e){return new Uint8Array(h(e),0,e)}function p(e){return new Uint16Array(h(2*e),0,e)}function d(e){return new Uint32Array(h(4*e),0,e)}function m(e){return new Int8Array(h(e),0,e)}function g(e){return new Int16Array(h(2*e),0,e)}function y(e){return new Int32Array(h(4*e),0,e)}function v(e){return new Float32Array(h(4*e),0,e)}function x(e){return new Float64Array(h(8*e),0,e)}function _(e){return i?new Uint8ClampedArray(h(e),0,e):f(e)}function b(e){return a?new BigUint64Array(h(8*e),0,e):null}function w(e){return o?new BigInt64Array(h(8*e),0,e):null}function T(e){return new DataView(h(e),0,e)}function k(e){e=t.nextPow2(e);var r=t.log2(e),i=c[r];return i.length>0?i.pop():new n(e)}e.free=function(e){if(n.isBuffer(e))c[t.log2(e.length)].push(e);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(e)&&(e=e.buffer),!e)return;var r=e.length||e.byteLength,i=0|t.log2(r);l[i].push(e)}},e.freeUint8=e.freeUint16=e.freeUint32=e.freeBigUint64=e.freeInt8=e.freeInt16=e.freeInt32=e.freeBigInt64=e.freeFloat32=e.freeFloat=e.freeFloat64=e.freeDouble=e.freeUint8Clamped=e.freeDataView=function(e){u(e.buffer)},e.freeArrayBuffer=u,e.freeBuffer=function(e){c[t.log2(e.length)].push(e)},e.malloc=function(e,t){if(void 0===t||"arraybuffer"===t)return h(e);switch(t){case"uint8":return f(e);case"uint16":return p(e);case"uint32":return d(e);case"int8":return m(e);case"int16":return g(e);case"int32":return y(e);case"float":case"float32":return v(e);case"double":case"float64":return x(e);case"uint8_clamped":return _(e);case"bigint64":return w(e);case"biguint64":return b(e);case"buffer":return k(e);case"data":case"dataview":return T(e);default:return null}return null},e.mallocArrayBuffer=h,e.mallocUint8=f,e.mallocUint16=p,e.mallocUint32=d,e.mallocInt8=m,e.mallocInt16=g,e.mallocInt32=y,e.mallocFloat32=e.mallocFloat=v,e.mallocFloat64=e.mallocDouble=x,e.mallocUint8Clamped=_,e.mallocBigUint64=b,e.mallocBigInt64=w,e.mallocDataView=T,e.mallocBuffer=k,e.clearCache=function(){for(var e=0;e<32;++e)s.UINT8[e].length=0,s.UINT16[e].length=0,s.UINT32[e].length=0,s.INT8[e].length=0,s.INT16[e].length=0,s.INT32[e].length=0,s.FLOAT[e].length=0,s.DOUBLE[e].length=0,s.BIGUINT64[e].length=0,s.BIGINT64[e].length=0,s.UINT8C[e].length=0,l[e].length=0,c[e].length=0}}}),_x=m({"node_modules/is-plain-obj/index.js"(e,t){var r=Object.prototype.toString;t.exports=function(e){var t;return"[object Object]"===r.call(e)&&(null===(t=Object.getPrototypeOf(e))||t===Object.getPrototypeOf({}))}}}),bx=m({"node_modules/parse-unit/index.js"(e,t){t.exports=function(e,t){t||(t=[0,""]),e=String(e);var r=parseFloat(e,10);return t[0]=r,t[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t}}}),wx=m({"node_modules/to-px/topx.js"(e,t){var r=bx();function n(e,t){var n=r(getComputedStyle(e).getPropertyValue(t));return n[0]*i(n[1],e)}function i(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":return function(e,t){var r=document.createElement("div");r.style["font-size"]="128"+e,t.appendChild(r);var i=n(r,"font-size")/128;return t.removeChild(r),i}(e,t);case"em":return n(t,"font-size");case"rem":return n(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return 96;case"cm":return 96/2.54;case"mm":return 96/25.4;case"pt":return 96/72;case"pc":return 16}return 1}t.exports=i}}),Tx=m({"node_modules/detect-kerning/index.js"(e,t){t.exports=i;var r=(i.canvas=document.createElement("canvas")).getContext("2d"),n=a([32,126]);function i(e,t){Array.isArray(e)&&(e=e.join(", "));var i,o={},s=16,l=.05;t&&(2===t.length&&"number"==typeof t[0]?i=a(t):Array.isArray(t)?i=t:(t.o?i=a(t.o):t.pairs&&(i=t.pairs),t.fontSize&&(s=t.fontSize),null!=t.threshold&&(l=t.threshold))),i||(i=n),r.font=s+"px "+e;for(var c=0;cs*l){var p=(f-h)/s;o[u]=1e3*p}}return o}function a(e){for(var t=[],r=e[0];r<=e[1];r++)for(var n=String.fromCharCode(r),i=e[0];i0;n-=4)if(0!==r[n])return Math.floor(.25*(n-3)/t)}t.exports=r,r.canvas=document.createElement("canvas"),r.cache={}}}),Ax=m({"node_modules/gl-text/dist.js"(e,t){var r=px(),n=ty(),i=dx(),a=mx(),o=Kv(),s=em(),l=gx(),c=xx(),u=ry(),h=_x(),f=bx(),p=wx(),d=Tx(),m=My(),g=kx(),y=ay(),v=yx().nextPow2,x=new o,_=!1;document.body&&((b=document.body.appendChild(document.createElement("div"))).style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(b).fontStretch&&(_=!0),document.body.removeChild(b));var b,w=function(e){var t;"function"==typeof(t=e)&&t._gl&&t.prop&&t.texture&&t.buffer?(e={regl:e},this.gl=e.regl._gl):this.gl=a(e),this.shader=x.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=e.regl||i({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),x.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(h(e)?e:{})};w.prototype.createShader=function(){var e=this.regl,t=e({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:e.prop("count"),offset:e.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:e.this("sizeBuffer")},width:{offset:0,stride:8,buffer:e.this("sizeBuffer")},char:e.this("charBuffer"),position:e.this("position")},uniforms:{atlasSize:function(e,t){return[t.atlas.width,t.atlas.height]},atlasDim:function(e,t){return[t.atlas.cols,t.atlas.rows]},atlas:function(e,t){return t.atlas.texture},charStep:function(e,t){return t.atlas.step},em:function(e,t){return t.atlas.em},color:e.prop("color"),opacity:e.prop("opacity"),viewport:e.this("viewportArray"),scale:e.this("scale"),align:e.prop("align"),baseline:e.prop("baseline"),translate:e.this("translate"),positionOffset:e.prop("positionOffset")},primitive:"points",viewport:e.this("viewport"),vert:"\n\t\t\tprecision highp float;\n\t\t\tattribute float width, charOffset, char;\n\t\t\tattribute vec2 position;\n\t\t\tuniform float fontSize, charStep, em, align, baseline;\n\t\t\tuniform vec4 viewport;\n\t\t\tuniform vec4 color;\n\t\t\tuniform vec2 atlasSize, atlasDim, scale, translate, positionOffset;\n\t\t\tvarying vec2 charCoord, charId;\n\t\t\tvarying float charWidth;\n\t\t\tvarying vec4 fontColor;\n\t\t\tvoid main () {\n\t\t\t\tvec2 offset = floor(em * (vec2(align + charOffset, baseline)\n\t\t\t\t\t+ vec2(positionOffset.x, -positionOffset.y)))\n\t\t\t\t\t/ (viewport.zw * scale.xy);\n\n\t\t\t\tvec2 position = (position + translate) * scale;\n\t\t\t\tposition += offset * scale;\n\n\t\t\t\tcharCoord = position * viewport.zw + viewport.xy;\n\n\t\t\t\tgl_Position = vec4(position * 2. - 1., 0, 1);\n\n\t\t\t\tgl_PointSize = charStep;\n\n\t\t\t\tcharId.x = mod(char, atlasDim.x);\n\t\t\t\tcharId.y = floor(char / atlasDim.x);\n\n\t\t\t\tcharWidth = width * em;\n\n\t\t\t\tfontColor = color / 255.;\n\t\t\t}",frag:"\n\t\t\tprecision highp float;\n\t\t\tuniform float fontSize, charStep, opacity;\n\t\t\tuniform vec2 atlasSize;\n\t\t\tuniform vec4 viewport;\n\t\t\tuniform sampler2D atlas;\n\t\t\tvarying vec4 fontColor;\n\t\t\tvarying vec2 charCoord, charId;\n\t\t\tvarying float charWidth;\n\n\t\t\tfloat lightness(vec4 color) {\n\t\t\t\treturn color.r * 0.299 + color.g * 0.587 + color.b * 0.114;\n\t\t\t}\n\n\t\t\tvoid main () {\n\t\t\t\tvec2 uv = gl_FragCoord.xy - charCoord + charStep * .5;\n\t\t\t\tfloat halfCharStep = floor(charStep * .5 + .5);\n\n\t\t\t\t// invert y and shift by 1px (FF expecially needs that)\n\t\t\t\tuv.y = charStep - uv.y;\n\n\t\t\t\t// ignore points outside of character bounding box\n\t\t\t\tfloat halfCharWidth = ceil(charWidth * .5);\n\t\t\t\tif (floor(uv.x) > halfCharStep + halfCharWidth ||\n\t\t\t\t\tfloor(uv.x) < halfCharStep - halfCharWidth) return;\n\n\t\t\t\tuv += charId * charStep;\n\t\t\t\tuv = uv / atlasSize;\n\n\t\t\t\tvec4 color = fontColor;\n\t\t\t\tvec4 mask = texture2D(atlas, uv);\n\n\t\t\t\tfloat maskY = lightness(mask);\n\t\t\t\t// float colorY = lightness(color);\n\t\t\t\tcolor.a *= maskY;\n\t\t\t\tcolor.a *= opacity;\n\n\t\t\t\t// color.a += .1;\n\n\t\t\t\t// antialiasing, see yiq color space y-channel formula\n\t\t\t\t// color.rgb += (1. - color.rgb) * (1. - mask.rgb);\n\n\t\t\t\tgl_FragColor = color;\n\t\t\t}"});return{regl:e,draw:t,atlas:{}}},w.prototype.update=function(e){var t=this;if("string"==typeof e)e={text:e};else if(!e)return;null!=(e=n(e,{position:"position positions coord coords coordinates",font:"font fontFace fontface typeface cssFont css-font family fontFamily",fontSize:"fontSize fontsize size font-size",text:"text texts chars characters value values symbols",align:"align alignment textAlign textbaseline",baseline:"baseline textBaseline textbaseline",direction:"dir direction textDirection",color:"color colour fill fill-color fillColor textColor textcolor",kerning:"kerning kern",range:"range dataBox",viewport:"vp viewport viewBox viewbox viewPort",opacity:"opacity alpha transparency visible visibility opaque",offset:"offset positionOffset padding shift indent indentation"},!0)).opacity&&(Array.isArray(e.opacity)?this.opacity=e.opacity.map((function(e){return parseFloat(e)})):this.opacity=parseFloat(e.opacity)),null!=e.viewport&&(this.viewport=u(e.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null==this.viewport&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null!=e.kerning&&(this.kerning=e.kerning),null!=e.offset&&("number"==typeof e.offset&&(e.offset=[e.offset,0]),this.positionOffset=y(e.offset)),e.direction&&(this.direction=e.direction),e.range&&(this.range=e.range,this.scale=[1/(e.range[2]-e.range[0]),1/(e.range[3]-e.range[1])],this.translate=[-e.range[0],-e.range[1]]),e.scale&&(this.scale=e.scale),e.translate&&(this.translate=e.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!e.font&&(e.font=w.baseFontSize+"px sans-serif");var i,a=!1,o=!1;if(e.font&&(Array.isArray(e.font)?e.font:[e.font]).forEach((function(e,n){if("string"==typeof e)try{e=r.parse(e)}catch{e=r.parse(w.baseFontSize+"px "+e)}else{var i=e.style,s=e.weight,l=e.stretch,c=e.variant;e=r.parse(r.stringify(e)),i&&(e.style=i),s&&(e.weight=s),l&&(e.stretch=l),c&&(e.variant=c)}var u=r.stringify({size:w.baseFontSize,family:e.family,stretch:_?e.stretch:void 0,variant:e.variant,weight:e.weight,style:e.style}),h=f(e.size),d=Math.round(h[0]*p(h[1]));if(d!==t.fontSize[n]&&(o=!0,t.fontSize[n]=d),!(t.font[n]&&u==t.font[n].baseString||(a=!0,t.font[n]=w.fonts[u],t.font[n]))){var m=e.family.join(", "),y=[e.style];e.style!=e.variant&&y.push(e.variant),e.variant!=e.weight&&y.push(e.weight),_&&e.weight!=e.stretch&&y.push(e.stretch),t.font[n]={baseString:u,family:m,weight:e.weight,stretch:e.stretch,style:e.style,variant:e.variant,width:{},kerning:{},metrics:g(m,{origin:"top",fontSize:w.baseFontSize,fontStyle:y.join(" ")})},w.fonts[u]=t.font[n]}})),(a||o)&&this.font.forEach((function(n,i){var a=r.stringify({size:t.fontSize[i],family:n.family,stretch:_?n.stretch:void 0,variant:n.variant,weight:n.weight,style:n.style});if(t.fontAtlas[i]=t.shader.atlas[a],!t.fontAtlas[i]){var o=n.metrics;t.shader.atlas[a]=t.fontAtlas[i]={fontString:a,step:2*Math.ceil(t.fontSize[i]*o.bottom*.5),em:t.fontSize[i],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:t.regl.texture()}}null==e.text&&(e.text=t.text)})),"string"==typeof e.text&&e.position&&e.position.length>2){for(var h=Array(.5*e.position.length),x=0;x2){for(var T=!e.position[0].length,k=c.mallocFloat(2*this.count),A=0,M=0;A1?t.align[r]:t.align[0]:t.align;if("number"==typeof n)return n;switch(n){case"right":case"end":return-e;case"center":case"centre":case"middle":return.5*-e}return 0}))),null==this.baseline&&null==e.baseline&&(e.baseline=0),null!=e.baseline&&(this.baseline=e.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map((function(e,r){var n=(t.font[r]||t.font[0]).metrics,i=0;return i+=.5*n.bottom,-1*(i+="number"==typeof e?e-n.baseline:-n[e])}))),null!=e.color)if(e.color||(e.color="transparent"),"string"!=typeof e.color&&isNaN(e.color)){var H;if("number"==typeof e.color[0]&&e.color.length>this.counts.length){var G=e.color.length;H=c.mallocUint8(G);for(var W=(e.color.subarray||e.color.slice).bind(e.color),Z=0;Z4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var $=Math.max(.5*this.position.length||0,.25*this.color.length||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,.5*this.positionOffset.length||0);this.batch=Array($);for(var K=0;K1?this.counts[K]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[K]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*K,4*K+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[K]:this.opacity,baseline:null!=this.baselineOffset[K]?this.baselineOffset[K]:this.baselineOffset[0],align:this.align?null!=this.alignOffset[K]?this.alignOffset[K]:this.alignOffset[0]:0,atlas:this.fontAtlas[K]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*K,2*K+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]},w.prototype.destroy=function(){},w.prototype.kerning=!0,w.prototype.position={constant:new Float32Array(2)},w.prototype.translate=null,w.prototype.scale=null,w.prototype.font=null,w.prototype.text="",w.prototype.positionOffset=[0,0],w.prototype.opacity=1,w.prototype.color=new Uint8Array([0,0,0,255]),w.prototype.alignOffset=[0,0],w.maxAtlasSize=1024,w.atlasCanvas=document.createElement("canvas"),w.atlasContext=w.atlasCanvas.getContext("2d",{alpha:!1}),w.baseFontSize=64,w.fonts={},t.exports=w}}),Mx=m({"node_modules/@plotly/regl/dist/regl.unchecked.js"(e,t){var r,n;r=e,n=function(){var e=function(e,t){for(var r=Object.keys(t),n=0;n1&&t===r&&('"'===t||"'"===t))return['"'+n(e.substr(1,e.length-2))+'"'];var a=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(e);if(a)return i(e.substr(0,a.index)).concat(i(a[1])).concat(i(e.substr(a.index+a[0].length)));var o=e.split(".");if(1===o.length)return['"'+n(e)+'"'];for(var s=[],l=0;l65535)<<4,t|=r=((e>>>=t)>255)<<3,t|=r=((e>>>=r)>15)<<2,(t|=r=((e>>>=r)>3)<<1)|(e>>>=r)>>1}function p(){var e=h(8,(function(){return[]}));function t(t){var r=function(e){for(var t=16;t<=1<<28;t*=16)if(e<=t)return t;return 0}(t),n=e[f(r)>>2];return n.length>0?n.pop():new ArrayBuffer(r)}function r(t){e[f(t.byteLength)>>2].push(t)}return{alloc:t,free:r,allocType:function(e,r){var n=null;switch(e){case 5120:n=new Int8Array(t(r),0,r);break;case 5121:n=new Uint8Array(t(r),0,r);break;case 5122:n=new Int16Array(t(2*r),0,r);break;case 5123:n=new Uint16Array(t(2*r),0,r);break;case 5124:n=new Int32Array(t(4*r),0,r);break;case 5125:n=new Uint32Array(t(4*r),0,r);break;case 5126:n=new Float32Array(t(4*r),0,r);break;default:return null}return n.length!==r?n.subarray(0,r):n},freeType:function(e){r(e.buffer)}}}var d=p();d.zero=p();var m=3553,g=6408,y=5126,v=36160,x=function(e){return e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Float32Array||e instanceof Float64Array||e instanceof Uint8ClampedArray};function _(e){return!!e&&"object"==typeof e&&Array.isArray(e.shape)&&Array.isArray(e.stride)&&"number"==typeof e.offset&&e.shape.length===e.stride.length&&(Array.isArray(e.data)||x(e.data))}var b=function(e){return Object.keys(e).map((function(t){return e[t]}))},w=function(e){for(var t=[],r=e;r.length;r=r[0])t.push(r.length);return t},T=function(e,t,r,n){var i=1;if(t.length)for(var a=0;a>>31<<15,a=(n<<1>>>24)-127,o=n>>13&1023;if(a<-24)t[r]=i;else if(a<-14){var s=-14-a;t[r]=i+(o+1024>>s)}else t[r]=a>15?i+31744:i+(a+15<<10)+o}return t}function G(e){return Array.isArray(e)||x(e)}var W=3553,Z=34067,Y=34069,X=6408,$=6406,K=6407,J=6409,Q=6410,ee=32855,te=6402,re=34041,ne=35904,ie=35906,ae=36193,oe=33776,se=33777,le=33778,ce=5121,ue=5123,he=5125,fe=5126,pe=33071,de=9728,me=9984,ge=9987,ye=4352,ve=33984,xe=[me,9986,9985,ge],_e=[0,J,Q,K,X],be={};function we(e){return"[object "+e+"]"}be[J]=be[$]=be[te]=1,be[re]=be[Q]=2,be[K]=be[ne]=3,be[X]=be[ie]=4;var Te=we("HTMLCanvasElement"),ke=we("OffscreenCanvas"),Ae=we("CanvasRenderingContext2D"),Me=we("ImageBitmap"),Se=we("HTMLImageElement"),Ee=we("HTMLVideoElement"),Ce=Object.keys(M).concat([Te,ke,Ae,Me,Se,Ee]),Ie=[];Ie[ce]=1,Ie[fe]=4,Ie[ae]=2,Ie[ue]=2,Ie[he]=4;var Le=[];function Pe(e){return Array.isArray(e)&&(0===e.length||"number"==typeof e[0])}function ze(e){return!!Array.isArray(e)&&!(0===e.length||!G(e[0]))}function De(e){return Object.prototype.toString.call(e)}function Oe(e){return De(e)===Te}function Re(e){return De(e)===ke}function Fe(e){if(!e)return!1;var t=De(e);return Ce.indexOf(t)>=0||Pe(e)||ze(e)||_(e)}function Be(e){return 0|M[Object.prototype.toString.call(e)]}function je(e,t){return d.allocType(e.type===ae?fe:e.type,t)}function Ne(e,t){e.type===ae?(e.data=H(t),d.freeType(t)):e.data=t}function Ue(e,t,r,n,i,a){var o;if(o=typeof Le[e]<"u"?Le[e]:be[e]*Ie[t],a&&(o*=6),i){for(var s=0,l=r;l>=1;)s+=o*l*l,l/=2;return s}return o*r*n}Le[32854]=2,Le[ee]=2,Le[36194]=2,Le[re]=4,Le[oe]=.5,Le[se]=.5,Le[le]=1,Le[33779]=1,Le[35986]=.5,Le[35987]=1,Le[34798]=1,Le[35840]=.5,Le[35841]=.25,Le[35842]=.5,Le[35843]=.25,Le[36196]=.5;var Ve=36161,qe=32854,He=[];function Ge(e,t,r){return He[e]*t*r}He[qe]=2,He[32855]=2,He[36194]=2,He[33189]=2,He[36168]=1,He[34041]=4,He[35907]=4,He[34836]=16,He[34842]=8,He[34843]=6;var We=36160,Ze=36161,Ye=3553,Xe=[];Xe[6408]=4,Xe[6407]=3;var $e=[];$e[5121]=1,$e[5126]=4,$e[36193]=2;var Ke=34963;function Je(){this.state=0,this.x=0,this.y=0,this.z=0,this.w=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.offset=0,this.stride=0,this.divisor=0}function Qe(e){return function(e){for(var t,r="0123456789abcdef",n="",i=0;i>>4&15)+r.charAt(15&t);return n}(function(e){return function(e){for(var t="",r=0;r<32*e.length;r+=8)t+=String.fromCharCode(e[r>>5]>>>24-r%32&255);return t}(function(e,t){var r,n,i,a,o,s,l,c,u,h,f,p,d=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),m=new Array(64);for(e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t,u=0;u>2),r=0;r>5]|=(255&e.charCodeAt(r/8))<<24-r%32;return t}(e),8*e.length))}(function(e){for(var t,r,n="",i=-1;++i>>6&31,128|63&t):t<=65535?n+=String.fromCharCode(224|t>>>12&15,128|t>>>6&63,128|63&t):t<=2097151&&(n+=String.fromCharCode(240|t>>>18&7,128|t>>>12&63,128|t>>>6&63,128|63&t));return n}(e)))}function et(e,t){return e>>>t|e<<32-t}function tt(e,t){return e>>>t}function rt(e,t,r){return e&t^~e&r}function nt(e,t,r){return e&t^e&r^t&r}function it(e){return et(e,2)^et(e,13)^et(e,22)}function at(e){return et(e,6)^et(e,11)^et(e,25)}function ot(e){return et(e,7)^et(e,18)^tt(e,3)}function st(e){return et(e,17)^et(e,19)^tt(e,10)}var lt=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function ct(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function ut(e){return Array.prototype.slice.call(e)}function ht(e){return ut(e).join("")}var ft="xyzw".split(""),pt="dither",dt="blend.enable",mt="blend.color",gt="blend.equation",yt="blend.func",vt="depth.enable",xt="depth.func",_t="depth.range",bt="depth.mask",wt="colorMask",Tt="cull.enable",kt="cull.face",At="frontFace",Mt="lineWidth",St="polygonOffset.enable",Et="polygonOffset.offset",Ct="sample.alpha",It="sample.enable",Lt="sample.coverage",Pt="stencil.enable",zt="stencil.mask",Dt="stencil.func",Ot="stencil.opFront",Rt="stencil.opBack",Ft="scissor.enable",Bt="scissor.box",jt="viewport",Nt="profile",Ut="framebuffer",Vt="vert",qt="frag",Ht="elements",Gt="primitive",Wt="count",Zt="offset",Yt="instances",Xt="vao",$t="Width",Kt="Height",Jt=Ut+$t,Qt=Ut+Kt,er=jt+$t,tr=jt+Kt,rr="drawingBuffer",nr=rr+$t,ir=rr+Kt,ar=[yt,gt,Dt,Ot,Rt,Lt,jt,Bt,Et],or=34962,sr=34963,lr=35664,cr=35665,ur=35666,hr=35667,fr=35668,pr=35669,dr=35671,mr=35672,gr=35673,yr=35674,vr=35675,xr=35676,_r=35678,br=35680,wr=1028,Tr=1029,kr=2305,Ar=7680,Mr={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Sr={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Er={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Cr={cw:2304,ccw:kr};function Ir(e){return Array.isArray(e)||x(e)||_(e)}function Lr(e){return e.sort((function(e,t){return e===jt?-1:t===jt?1:e=1,n>=2,t)}if(4===r){var i=e.data;return new Pr(i.thisDep,i.contextDep,i.propDep,t)}if(5===r)return new Pr(!1,!1,!1,t);if(6===r){for(var a=!1,o=!1,s=!1,l=0;l=1&&(o=!0),u>=2&&(s=!0)}else 4===c.type&&(a=a||c.data.thisDep,o=o||c.data.contextDep,s=s||c.data.propDep)}return new Pr(a,o,s,t)}return new Pr(3===r,2===r,1===r,t)}var Rr=new Pr(!1,!1,!1,(function(){}));function Fr(t,r,n,i,a,s,l,c,u,f,p,d,m,g,y,v){var x=f.Record,_={add:32774,subtract:32778,"reverse subtract":32779};n.ext_blend_minmax&&(_.min=32775,_.max=32776);var b=n.angle_instanced_arrays,w=n.webgl_draw_buffers,T=n.oes_vertex_array_object,k={dirty:!0,profile:v.profile},A={},M=[],E={},C={};function I(e){return e.replace(".","_")}function L(e,t,r){var n=I(e);M.push(e),A[n]=k[n]=!!r,E[n]=t}function P(e,t,r){var n=I(e);M.push(e),Array.isArray(r)?(k[n]=r.slice(),A[n]=r.slice()):k[n]=A[n]=r,C[n]=t}function z(e){return!!isNaN(e)}L(pt,3024),L(dt,3042),P(mt,"blendColor",[0,0,0,0]),P(gt,"blendEquationSeparate",[32774,32774]),P(yt,"blendFuncSeparate",[1,0,1,0]),L(vt,2929,!0),P(xt,"depthFunc",513),P(_t,"depthRange",[0,1]),P(bt,"depthMask",!0),P(wt,wt,[!0,!0,!0,!0]),L(Tt,2884),P(kt,"cullFace",Tr),P(At,At,kr),P(Mt,Mt,1),L(St,32823),P(Et,"polygonOffset",[0,0]),L(Ct,32926),L(It,32928),P(Lt,"sampleCoverage",[1,!1]),L(Pt,2960),P(zt,"stencilMask",-1),P(Dt,"stencilFunc",[519,0,-1]),P(Ot,"stencilOpSeparate",[wr,Ar,Ar,Ar]),P(Rt,"stencilOpSeparate",[Tr,Ar,Ar,Ar]),L(Ft,3089),P(Bt,"scissor",[0,0,t.drawingBufferWidth,t.drawingBufferHeight]),P(jt,jt,[0,0,t.drawingBufferWidth,t.drawingBufferHeight]);var D={gl:t,context:m,strings:r,next:A,current:k,draw:d,elements:s,buffer:a,shader:p,attributes:f.state,vao:f,uniforms:u,framebuffer:c,extensions:n,timer:g,isBufferArgs:Ir},O={primTypes:F,compareFuncs:Sr,blendFuncs:Mr,blendEquations:_,stencilOps:Er,glTypes:S,orientationType:Cr};w&&(O.backBuffer=[Tr],O.drawBuffer=h(i.maxDrawbuffers,(function(e){return 0===e?[0]:h(e,(function(e){return 36064+e}))})));var R=0;function B(){var t=function(t){var r=t&&t.cache,n=0,i=[],a=[],o=[];function s(){var t=[],r=[];return e((function(){t.push.apply(t,ut(arguments))}),{def:function(){var e="v"+n++;return r.push(e),arguments.length>0&&(t.push(e,"="),t.push.apply(t,ut(arguments)),t.push(";")),e},toString:function(){return ht([r.length>0?"var "+r.join(",")+";":"",ht(t)])}})}function l(){var t=s(),r=s(),n=t.toString,i=r.toString;function a(e,n){r(e,n,"=",t.def(e,n),";")}return e((function(){t.apply(t,ut(arguments))}),{def:t.def,entry:t,exit:r,save:a,set:function(e,r,n){a(e,r),t(e,r,"=",n,";")},toString:function(){return n()+i()}})}var c=s(),u={};return{global:c,link:function(e,t){var r=t&&t.stable;if(!r)for(var s=0;s"u"?"Date.now()":"performance.now()"}function d(e){e(a=t.def(),"=",p(),";"),"string"==typeof i?e(c,".count+=",i,";"):e(c,".count++;"),g&&(n?e(o=t.def(),"=",h,".getNumPendingQueries();"):e(h,".beginQuery(",c,");"))}function m(e){e(c,".cpuTime+=",p(),"-",a,";"),g&&(n?e(h,".pushScopeStats(",o,",",h,".getNumPendingQueries(),",c,");"):e(h,".endQuery();"))}function y(e){var r=t.def(u,".profile");t(u,".profile=",e,";"),t.exit(u,".profile=",r,";")}if(f){if(zr(f))return void(f.enable?(d(t),m(t.exit),y("true")):y("false"));y(s=f.append(e,t))}else s=t.def(u,".profile");var v=e.block();d(v),t("if(",s,"){",v,"}");var x=e.block();m(x),t.exit("if(",s,"){",x,"}")}function W(e,t,r,n,i){var a=e.shared;n.forEach((function(n){var o,s=n.name,l=r.attributes[s];if(l){if(!i(l))return;o=l.append(e,t)}else{if(!i(Rr))return;var c=e.scopeAttrib(s);o={},Object.keys(new x).forEach((function(e){o[e]=t.def(c,".",e)}))}!function(r,n,i){var o=a.gl,s=t.def(r,".location"),l=t.def(a.attributes,"[",s,"]"),c=i.state,u=i.buffer,h=[i.x,i.y,i.z,i.w],f=["buffer","normalized","offset","stride"];function p(){t("if(!",l,".buffer){",o,".enableVertexAttribArray(",s,");}");var r,a=i.type;if(r=i.size?t.def(i.size,"||",n):n,t("if(",l,".type!==",a,"||",l,".size!==",r,"||",f.map((function(e){return l+"."+e+"!=="+i[e]})).join("||"),"){",o,".bindBuffer(",or,",",u,".buffer);",o,".vertexAttribPointer(",[s,r,a,i.normalized,i.stride,i.offset],");",l,".type=",a,";",l,".size=",r,";",f.map((function(e){return l+"."+e+"="+i[e]+";"})).join(""),"}"),b){var c=i.divisor;t("if(",l,".divisor!==",c,"){",e.instancing,".vertexAttribDivisorANGLE(",[s,c],");",l,".divisor=",c,";}")}}function d(){t("if(",l,".buffer){",o,".disableVertexAttribArray(",s,");",l,".buffer=null;","}if(",ft.map((function(e,t){return l+"."+e+"!=="+h[t]})).join("||"),"){",o,".vertexAttrib4f(",s,",",h,");",ft.map((function(e,t){return l+"."+e+"="+h[t]+";"})).join(""),"}")}1===c?p():2===c?d():(t("if(",c,"===",1,"){"),p(),t("}else{"),d(),t("}"))}(e.link(n),function(e){switch(e){case lr:case hr:case dr:return 2;case cr:case fr:case mr:return 3;case ur:case pr:case gr:return 4;default:return 1}}(n.info.type),o)}))}function Z(e,t,n,i,a,o){for(var s,l=e.shared,c=l.gl,u=0;u1){for(var M=[],S=[],E=0;E>1)",p],");")}function t(){r(d,".drawArraysInstancedANGLE(",[m,g,y,p],");")}h&&"null"!==h?x?e():(r("if(",h,"){"),e(),r("}else{"),t(),r("}")):t()}function w(){function e(){r(l+".drawElements("+[m,y,v,g+"<<(("+v+"-5121)>>1)"]+");")}function t(){r(l+".drawArrays("+[m,g,y]+");")}h&&"null"!==h?x?e():(r("if(",h,"){"),e(),r("}else{"),t(),r("}")):t()}b&&("number"!=typeof p||p>=0)?"string"==typeof p?(r("if(",p,">0){"),_(),r("}else if(",p,"<0){"),w(),r("}")):_():w()}function X(e,t,r,n,i){var a=B(),o=a.proc("body",i);return b&&(a.instancing=o.def(a.shared.extensions,".angle_instanced_arrays")),e(a,o,r,n),a.compile().body}function $(e,t,r,n){q(e,t),r.useVAO?r.drawVAO?t(e.shared.vao,".setVAO(",r.drawVAO.append(e,t),");"):t(e.shared.vao,".setVAO(",e.shared.vao,".targetVAO);"):(t(e.shared.vao,".setVAO(null);"),W(e,t,r,n.attributes,(function(){return!0}))),Z(e,t,r,n.uniforms,(function(){return!0}),!1),Y(e,t,t,r)}function K(e,t,r,n){function i(){return!0}e.batchId="a1",q(e,t),W(e,t,r,n.attributes,i),Z(e,t,r,n.uniforms,i,!1),Y(e,t,t,r)}function J(e,t,r,n){q(e,t);var i=r.contextDep,a=t.def(),o=t.def();e.shared.props=o,e.batchId=a;var s=e.scope(),l=e.scope();function c(e){return e.contextDep&&i||e.propDep}function u(e){return!c(e)}if(t(s.entry,"for(",a,"=0;",a,"<","a1",";++",a,"){",o,"=","a0","[",a,"];",l,"}",s.exit),r.needsContext&&j(e,l,r.context),r.needsFramebuffer&&N(e,l,r.framebuffer),V(e,l,r.state,c),r.profile&&c(r.profile)&&H(e,l,r,!1,!0),n)r.useVAO?r.drawVAO?c(r.drawVAO)?l(e.shared.vao,".setVAO(",r.drawVAO.append(e,l),");"):s(e.shared.vao,".setVAO(",r.drawVAO.append(e,s),");"):s(e.shared.vao,".setVAO(",e.shared.vao,".targetVAO);"):(s(e.shared.vao,".setVAO(null);"),W(e,s,r,n.attributes,u),W(e,l,r,n.attributes,c)),Z(e,s,r,n.uniforms,u,!1),Z(e,l,r,n.uniforms,c,!0),Y(e,s,l,r);else{var h=e.global.def("{}"),f=r.shader.progVar.append(e,l),p=l.def(f,".id"),d=l.def(h,"[",p,"]");l(e.shared.gl,".useProgram(",f,".program);","if(!",d,"){",d,"=",h,"[",p,"]=",e.link((function(e){return X(K,0,r,e,2)})),"(",f,");}",d,".call(this,a0[",a,"],",a,");")}}function Q(e,t,r){var n=t.static[r];if(n&&function(e){if("object"==typeof e&&!G(e)){for(var t=Object.keys(e),r=0;r0)return null;var n=t.static,i=Object.keys(n);if(i.length>0&&"number"==typeof n[i[0]]){for(var a=[],o=0;o0,w={framebuffer:u,draw:m,shader:y,state:g,dirty:b,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(w.profile=function(e){var t,r=e.static,n=e.dynamic;if(Nt in r){var i=!!r[Nt];(t=Dr((function(e,t){return i}))).enable=i}else if(Nt in n){var a=n[Nt];t=Or(a,(function(e,t){return e.invoke(t,a)}))}return t}(e),w.uniforms=function(e){var t=e.static,r=e.dynamic,n={};return Object.keys(t).forEach((function(e){var r,i=t[e];if("number"==typeof i||"boolean"==typeof i)r=Dr((function(){return i}));else if("function"==typeof i){var a=i._reglType;"texture2d"===a||"textureCube"===a?r=Dr((function(e){return e.link(i)})):("framebuffer"===a||"framebufferCube"===a)&&(r=Dr((function(e){return e.link(i.color[0])})))}else G(i)&&(r=Dr((function(e){return e.global.def("[",h(i.length,(function(e){return i[e]})),"]")})));r.value=i,n[e]=r})),Object.keys(r).forEach((function(e){var t=r[e];n[e]=Or(t,(function(e,r){return e.invoke(r,t)}))})),n}(i),w.drawVAO=w.scopeVAO=m.vao,!w.drawVAO&&y.program&&!l&&n.angle_instanced_arrays&&m.static.elements){var T=!0,k=y.program.attributes.map((function(e){var r=t.static[e];return T=T&&!!r,r}));if(T&&k.length>0){var A=f.getVAO(f.createVAO({attributes:k,elements:m.static.elements}));w.drawVAO=new Pr(null,null,null,(function(e,t){return e.link(A)})),w.useVAO=!0}}return l?w.useVAO=!0:w.attributes=function(e){var t=e.static,n=e.dynamic,i={};return Object.keys(t).forEach((function(e){var n=t[e],o=r.id(e),s=new x;if(Ir(n))s.state=1,s.buffer=a.getBuffer(a.create(n,or,!1,!0)),s.type=0;else{var l=a.getBuffer(n);if(l)s.state=1,s.buffer=l,s.type=0;else if("constant"in n){var c=n.constant;s.buffer="null",s.state=2,"number"==typeof c?s.x=c:ft.forEach((function(e,t){t"+t+"?"+n+".constant["+t+"]:0;"})).join(""),"}}else{","if(",o,"(",n,".buffer)){",u,"=",s,".createStream(",or,",",n,".buffer);","}else{",u,"=",s,".getBuffer(",n,".buffer);","}",h,'="type" in ',n,"?",a.glTypes,"[",n,".type]:",u,".dtype;",l.normalized,"=!!",n,".normalized;"),f("size"),f("offset"),f("stride"),f("divisor"),r("}}"),r.exit("if(",l.isStream,"){",s,".destroyStream(",u,");","}"),l}))})),i}(t),w.context=function(e){var t=e.static,r=e.dynamic,n={};return Object.keys(t).forEach((function(e){var r=t[e];n[e]=Dr((function(e,t){return"number"==typeof r||"boolean"==typeof r?""+r:e.link(r)}))})),Object.keys(r).forEach((function(e){var t=r[e];n[e]=Or(t,(function(e,r){return e.invoke(r,t)}))})),n}(o),w}(t,i,o,l);return m.shader.program&&(m.shader.program.attributes.sort((function(e,t){return e.name0&&r(e.shared.current,".dirty=true;"),e.shared.vao&&r(e.shared.vao,".setVAO(null);")}(d,m),function(e,t){var n=e.proc("scope",3);e.batchId="a2";var i=e.shared,a=i.current;if(j(e,n,t.context),t.framebuffer&&t.framebuffer.append(e,n),Lr(Object.keys(t.state)).forEach((function(r){var a=t.state[r],o=a.append(e,n);G(o)?o.forEach((function(t,i){z(t)?n.set(e.next[r],"["+i+"]",t):n.set(e.next[r],"["+i+"]",e.link(t,{stable:!0}))})):zr(a)?n.set(i.next,"."+r,e.link(o,{stable:!0})):n.set(i.next,"."+r,o)})),H(e,n,t,!0,!0),[Ht,Zt,Wt,Yt,Gt].forEach((function(r){var a=t.draw[r];if(a){var o=a.append(e,n);z(o)?n.set(i.draw,"."+r,o):n.set(i.draw,"."+r,e.link(o),{stable:!0})}})),Object.keys(t.uniforms).forEach((function(a){var o=t.uniforms[a].append(e,n);Array.isArray(o)&&(o="["+o.map((function(t){return z(t)?t:e.link(t,{stable:!0})}))+"]"),n.set(i.uniforms,"["+e.link(r.id(a),{stable:!0})+"]",o)})),Object.keys(t.attributes).forEach((function(r){var i=t.attributes[r].append(e,n),a=e.scopeAttrib(r);Object.keys(new x).forEach((function(e){n.set(a,"."+e,i[e])}))})),t.scopeVAO){var o=t.scopeVAO.append(e,n);z(o)?n.set(i.vao,".targetVAO",o):n.set(i.vao,".targetVAO",e.link(o,{stable:!0}))}function s(r){var a=t.shader[r];if(a){var o=a.append(e,n);z(o)?n.set(i.shader,"."+r,o):n.set(i.shader,"."+r,e.link(o,{stable:!0}))}}s(Vt),s(qt),Object.keys(t.state).length>0&&(n(a,".dirty=true;"),n.exit(a,".dirty=true;")),n("a1(",e.shared.context,",a0,",e.batchId,");")}(d,m),function(e,t){var r=e.proc("batch",2);e.batchId="0",q(e,r);var n=!1,i=!0;Object.keys(t.context).forEach((function(e){n=n||t.context[e].propDep})),n||(j(e,r,t.context),i=!1);var a=t.framebuffer,o=!1;function s(e){return e.contextDep&&n||e.propDep}a?(a.propDep?n=o=!0:a.contextDep&&n&&(o=!0),o||N(e,r,a)):N(e,r,null),t.state.viewport&&t.state.viewport.propDep&&(n=!0),U(e,r,t),V(e,r,t.state,(function(e){return!s(e)})),(!t.profile||!s(t.profile))&&H(e,r,t,!1,"a1"),t.contextDep=n,t.needsContext=i,t.needsFramebuffer=o;var l=t.shader.progVar;if(l.contextDep&&n||l.propDep)J(e,r,t,null);else{var c=l.append(e,r);if(r(e.shared.gl,".useProgram(",c,".program);"),t.shader.program)J(e,r,t,t.shader.program);else{r(e.shared.vao,".setVAO(null);");var u=e.global.def("{}"),h=r.def(c,".id"),f=r.def(u,"[",h,"]");r(e.cond(f).then(f,".call(this,a0,a1);").else(f,"=",u,"[",h,"]=",e.link((function(e){return X(J,0,t,e,2)})),"(",c,");",f,".call(this,a0,a1);"))}}Object.keys(t.state).length>0&&r(e.shared.current,".dirty=true;"),e.shared.vao&&r(e.shared.vao,".setVAO(null);")}(d,m),e(d.compile(),{destroy:function(){m.shader.program.destroy()}})}}}var Br="webglcontextlost",jr="webglcontextrestored";function Nr(e,t){for(var r=0;r"u"?1:window.devicePixelRatio,p=!1,d={},m=function(e){},g=function(){};if("string"==typeof o?r=document.querySelector(o):"object"==typeof o&&(function(e){return"string"==typeof e.nodeName&&"function"==typeof e.appendChild&&"function"==typeof e.getBoundingClientRect}(o)?r=o:function(e){return"function"==typeof e.drawArrays||"function"==typeof e.drawElements}(o)?i=(a=o).canvas:("gl"in o?a=o.gl:"canvas"in o?i=u(o.canvas):"container"in o&&(n=u(o.container)),"attributes"in o&&(s=o.attributes),"extensions"in o&&(l=c(o.extensions)),"optionalExtensions"in o&&(h=c(o.optionalExtensions)),"onDone"in o&&(m=o.onDone),"profile"in o&&(p=!!o.profile),"pixelRatio"in o&&(f=+o.pixelRatio),"cachedCode"in o&&(d=o.cachedCode))),r&&("canvas"===r.nodeName.toLowerCase()?i=r:n=r),!a){if(!i){var y=function(t,r,n){var i,a=document.createElement("canvas");function o(){var e=window.innerWidth,r=window.innerHeight;if(t!==document.body){var i=a.getBoundingClientRect();e=i.right-i.left,r=i.bottom-i.top}a.width=n*e,a.height=n*r}return e(a.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),t.appendChild(a),t===document.body&&(a.style.position="absolute",e(t.style,{margin:0,padding:0})),t!==document.body&&"function"==typeof ResizeObserver?(i=new ResizeObserver((function(){setTimeout(o)}))).observe(t):window.addEventListener("resize",o,!1),o(),{canvas:a,onDestroy:function(){i?i.disconnect():window.removeEventListener("resize",o),t.removeChild(a)}}}(n||document.body,0,f);if(!y)return null;i=y.canvas,g=y.onDestroy}void 0===s.premultipliedAlpha&&(s.premultipliedAlpha=!0),a=function(e,t){function r(r){try{return e.getContext(r,t)}catch{return null}}return r("webgl")||r("experimental-webgl")||r("webgl-experimental")}(i,s)}return a?{gl:a,canvas:i,container:n,extensions:l,optionalExtensions:h,pixelRatio:f,profile:p,cachedCode:d,onDone:m,onDestroy:g}:(g(),m("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}(t);if(!r)return null;var n=r.gl,i=n.getContextAttributes(),a=(n.isContextLost(),function(e,t){var r={};function n(t){var n,i=t.toLowerCase();try{n=r[i]=e.getExtension(i)}catch{}return!!n}for(var i=0;i0)if(Array.isArray(t[0])){o=I(t);for(var c=1,u=1;u0)if("number"==typeof e[0]){var i=d.allocType(h.dtype,e.length);O(i,e),p(i,n),d.freeType(i)}else if(Array.isArray(e[0])||x(e[0])){r=I(e);var a=C(e,r,h.dtype);p(a,n),d.freeType(a)}}else if(_(e)){r=e.shape;var o=e.stride,s=0,l=0,c=0,u=0;1===r.length?(s=r[0],l=1,c=o[0],u=0):2===r.length&&(s=r[0],l=r[1],c=o[0],u=o[1]);var m=Array.isArray(e.data)?h.dtype:D(e.data),g=d.allocType(m,s*l);R(g,e.data,s,l,c,u,e.offset),p(g,n),d.freeType(g)}return f},r.profile&&(f.stats=h.stats),f.destroy=function(){c(h)},f},createStream:function(e,t){var r=o.pop();return r||(r=new a(e)),r.bind(),l(r,t,35040,0,1,!1),r},destroyStream:function(e){o.push(e)},clear:function(){b(i).forEach(c),o.forEach(c)},getBuffer:function(e){return e&&e._buffer instanceof a?e._buffer:null},restore:function(){b(i).forEach((function(t){t.buffer=e.createBuffer(),e.bindBuffer(t.type,t.buffer),e.bufferData(t.type,t.persistentData||t.byteLength,t.usage)}))},_initBuffer:l}}(n,f,r),Ie=function(e,t,r,n){var i={},a=0,o={uint8:B,uint16:j};function s(e){this.id=a++,i[this.id]=this,this.buffer=e,this.primType=4,this.vertCount=0,this.type=0}t.oes_element_index_uint&&(o.uint32=N),s.prototype.bind=function(){this.buffer.bind()};var l=[];function c(n,i,a,o,s,l,c){var u;if(n.buffer.bind(),i){var h=c;!c&&(!x(i)||_(i)&&!x(i.data))&&(h=t.oes_element_index_uint?N:j),r._initBuffer(n.buffer,i,a,h,3)}else e.bufferData(U,l,a),n.buffer.dtype=u||B,n.buffer.usage=a,n.buffer.dimension=3,n.buffer.byteLength=l;if(u=c,!c){switch(n.buffer.dtype){case B:case 5120:u=B;break;case j:case 5122:u=j;break;case N:case 5124:u=N}n.buffer.dtype=u}n.type=u;var f=s;f<0&&(f=n.buffer.byteLength,u===j?f>>=1:u===N&&(f>>=2)),n.vertCount=f;var p=o;if(o<0){p=4;var d=n.buffer.dimension;1===d&&(p=0),2===d&&(p=1),3===d&&(p=4)}n.primType=p}function u(e){n.elementsCount--,delete i[e.id],e.buffer.destroy(),e.buffer=null}return{create:function(e,t){var i=r.create(null,U,!0),a=new s(i._buffer);function l(e){if(e)if("number"==typeof e)i(e),a.primType=4,a.vertCount=0|e,a.type=B;else{var t=null,r=35044,n=-1,s=-1,u=0,h=0;Array.isArray(e)||x(e)||_(e)?t=e:("data"in e&&(t=e.data),"usage"in e&&(r=E[e.usage]),"primitive"in e&&(n=F[e.primitive]),"count"in e&&(s=0|e.count),"type"in e&&(h=o[e.type]),"length"in e?u=0|e.length:(u=s,h===j||5122===h?u*=2:(h===N||5124===h)&&(u*=4))),c(a,t,r,n,s,u,h)}else i(),a.primType=4,a.vertCount=0,a.type=B;return l}return n.elementsCount++,l(e),l._reglType="elements",l._elements=a,l.subdata=function(e,t){return i.subdata(e,t),l},l.destroy=function(){u(a)},l},createStream:function(e){var t=l.pop();return t||(t=new s(r.create(null,U,!0,!1)._buffer)),c(t,e,35040,-1,-1,0,0),t},destroyStream:function(e){l.push(e)},getElements:function(e){return"function"==typeof e&&e._elements instanceof s?e._elements:null},clear:function(){b(i).forEach(u)}}}(n,k,Ce,f),Le=function(e,t,r,n,i,a,o){for(var s=r.maxAttributes,l=new Array(s),c=0;c=p.byteLength?u.subdata(p):(u.destroy(),t.buffers[c]=null)),t.buffers[c]||(u=t.buffers[c]=i.create(h,34962,!1,!0)),f.buffer=i.getBuffer(u),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1,s[c]=1):i.getBuffer(h)?(f.buffer=i.getBuffer(h),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1):i.getBuffer(h.buffer)?(f.buffer=i.getBuffer(h.buffer),f.size=0|(+h.size||f.buffer.dimension),f.normalized=!!h.normalized||!1,f.type="type"in h?S[h.type]:f.buffer.dtype,f.offset=0|(h.offset||0),f.stride=0|(h.stride||0),f.divisor=0|(h.divisor||0),f.state=1):"x"in h&&(f.x=+h.x||0,f.y=+h.y||0,f.z=+h.z||0,f.w=+h.w||0,f.state=2)}for(var d=0;d1)for(var y=0;ye&&(e=t.stats.uniformsCount)})),e},n.getMaxAttributesCount=function(){var e=0;return h.forEach((function(t){t.stats.attributesCount>e&&(e=t.stats.attributesCount)})),e}),{clear:function(){var e=t.deleteShader.bind(t);b(a).forEach(e),a={},b(o).forEach(e),o={},h.forEach((function(e){t.deleteProgram(e.program)})),h.length=0,u={},n.shaderCount=0},program:function(r,i,s,l){var c=u[i];c||(c=u[i]={});var f=c[r];if(f&&(f.refCount++,!l))return f;var m=new p(i,r);return n.shaderCount++,d(m,0,l),f||(c[r]=m),h.push(m),e(m,{destroy:function(){if(m.refCount--,m.refCount<=0){t.deleteProgram(m.program);var e=h.indexOf(m);h.splice(e,1),n.shaderCount--}c[m.vertId].refCount<=0&&(t.deleteShader(o[m.vertId]),delete o[m.vertId],delete u[m.fragId][m.vertId]),Object.keys(u[m.fragId]).length||(t.deleteShader(a[m.fragId]),delete a[m.fragId],delete u[m.fragId])}})},restore:function(){a={},o={};for(var e=0;e=0&&(m[e]=t)}));var v=Object.keys(m);n.textureFormats=v;var k=[];Object.keys(m).forEach((function(e){var t=m[e];k[t]=e}));var A=[];Object.keys(p).forEach((function(e){var t=p[e];A[t]=e}));var M=[];Object.keys(u).forEach((function(e){M[u[e]]=e}));var S=[];Object.keys(h).forEach((function(e){var t=h[e];S[t]=e}));var E=[];Object.keys(c).forEach((function(e){E[c[e]]=e}));var C=v.reduce((function(e,t){var n=m[t];return n===J||n===$||n===J||n===Q||n===te||n===re||r.ext_srgb&&(n===ne||n===ie)?e[n]=n:n===ee||t.indexOf("rgba")>=0?e[n]=X:e[n]=K,e}),{});function I(){this.internalformat=X,this.format=X,this.type=ce,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=37444,this.width=0,this.height=0,this.channels=0}function L(e,t){e.internalformat=t.internalformat,e.format=t.format,e.type=t.type,e.compressed=t.compressed,e.premultiplyAlpha=t.premultiplyAlpha,e.flipY=t.flipY,e.unpackAlignment=t.unpackAlignment,e.colorSpace=t.colorSpace,e.width=t.width,e.height=t.height,e.channels=t.channels}function P(e,t){if("object"==typeof t&&t){if("premultiplyAlpha"in t&&(e.premultiplyAlpha=t.premultiplyAlpha),"flipY"in t&&(e.flipY=t.flipY),"alignment"in t&&(e.unpackAlignment=t.alignment),"colorSpace"in t&&(e.colorSpace=f[t.colorSpace]),"type"in t){var r=t.type;e.type=p[r]}var n=e.width,i=e.height,a=e.channels,o=!1;"shape"in t?(n=t.shape[0],i=t.shape[1],3===t.shape.length&&(a=t.shape[2],o=!0)):("radius"in t&&(n=i=t.radius),"width"in t&&(n=t.width),"height"in t&&(i=t.height),"channels"in t&&(a=t.channels,o=!0)),e.width=0|n,e.height=0|i,e.channels=0|a;var s=!1;if("format"in t){var l=t.format,c=e.internalformat=m[l];e.format=C[c],l in p&&("type"in t||(e.type=p[l])),l in g&&(e.compressed=!0),s=!0}!o&&s?e.channels=be[e.format]:o&&!s&&e.channels!==_e[e.format]&&(e.format=e.internalformat=_e[e.channels])}}function z(e){t.pixelStorei(37440,e.flipY),t.pixelStorei(37441,e.premultiplyAlpha),t.pixelStorei(37443,e.colorSpace),t.pixelStorei(3317,e.unpackAlignment)}function D(){I.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function O(e,t){var r=null;if(Fe(t)?r=t:t&&(P(e,t),"x"in t&&(e.xOffset=0|t.x),"y"in t&&(e.yOffset=0|t.y),Fe(t.data)&&(r=t.data)),t.copy){var n=a.viewportWidth,i=a.viewportHeight;e.width=e.width||n-e.xOffset,e.height=e.height||i-e.yOffset,e.needsCopy=!0}else if(r){if(x(r))e.channels=e.channels||4,e.data=r,!("type"in t)&&e.type===ce&&(e.type=Be(r));else if(Pe(r))e.channels=e.channels||4,function(e,t){var r=t.length;switch(e.type){case ce:case ue:case he:case fe:var n=d.allocType(e.type,r);n.set(t),e.data=n;break;case ae:e.data=H(t)}}(e,r),e.alignment=1,e.needsFree=!0;else if(_(r)){var o=r.data;!Array.isArray(o)&&e.type===ce&&(e.type=Be(o));var s,l,c,u,h,f,p=r.shape,m=r.stride;3===p.length?(c=p[2],f=m[2]):(c=1,f=1),s=p[0],l=p[1],u=m[0],h=m[1],e.alignment=1,e.width=s,e.height=l,e.channels=c,e.format=e.internalformat=_e[c],e.needsFree=!0,function(e,t,r,n,i,a){for(var o=e.width,s=e.height,l=e.channels,c=je(e,o*s*l),u=0,h=0;h>=i,r.height>>=i,O(r,n[i]),e.mipmask|=1<=0&&!("faces"in t)&&(e.genMipmaps=!0)}if("mag"in t){var n=t.mag;e.magFilter=u[n]}var i=e.wrapS,a=e.wrapT;if("wrap"in t){var o=t.wrap;"string"==typeof o?i=a=c[o]:Array.isArray(o)&&(i=c[o[0]],a=c[o[1]])}else{if("wrapS"in t){var s=t.wrapS;i=c[s]}if("wrapT"in t){var f=t.wrapT;a=c[f]}}if(e.wrapS=i,e.wrapT=a,"anisotropic"in t&&(t.anisotropic,e.anisotropic=t.anisotropic),"mipmap"in t){var p=!1;switch(typeof t.mipmap){case"string":e.mipmapHint=l[t.mipmap],e.genMipmaps=!0,p=!0;break;case"boolean":p=e.genMipmaps=t.mipmap;break;case"object":e.genMipmaps=!1,p=!0}p&&!("min"in t)&&(e.minFilter=me)}}function Ve(e,n){t.texParameteri(n,10241,e.minFilter),t.texParameteri(n,10240,e.magFilter),t.texParameteri(n,10242,e.wrapS),t.texParameteri(n,10243,e.wrapT),r.ext_texture_filter_anisotropic&&t.texParameteri(n,34046,e.anisotropic),e.genMipmaps&&(t.hint(33170,e.mipmapHint),t.generateMipmap(n))}var qe=0,He={},Ge=n.maxTextureUnits,We=Array(Ge).map((function(){return null}));function Ze(e){I.call(this),this.mipmask=0,this.internalformat=X,this.id=qe++,this.refCount=1,this.target=e,this.texture=t.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new Ie,s.profile&&(this.stats={size:0})}function Ye(e){t.activeTexture(ve),t.bindTexture(e.target,e.texture)}function Xe(){var e=We[0];e?t.bindTexture(e.target,e.texture):t.bindTexture(W,null)}function $e(e){var r=e.texture,n=e.unit,i=e.target;n>=0&&(t.activeTexture(ve+n),t.bindTexture(i,null),We[n]=null),t.deleteTexture(r),e.texture=null,e.params=null,e.pixels=null,e.refCount=0,delete He[e.id],o.textureCount--}return e(Ze.prototype,{bind:function(){var e=this;e.bindCount+=1;var r=e.unit;if(r<0){for(var n=0;n0)continue;i.unit=-1}We[n]=e,r=n;break}s.profile&&o.maxTextureUnits>l)-o,c.height=c.height||(n.height>>l)-s,Ye(n),F(c,W,o,s,l),Xe(),N(c),i},i.resize=function(e,r){var a=0|e,o=0|r||a;if(a===n.width&&o===n.height)return i;i.width=n.width=a,i.height=n.height=o,Ye(n);for(var l=0;n.mipmask>>l;++l){var c=a>>l,u=o>>l;if(!c||!u)break;t.texImage2D(W,l,n.format,c,u,0,n.format,n.type,null)}return Xe(),s.profile&&(n.stats.size=Ue(n.internalformat,n.type,a,o,!1,!1)),i},i._reglType="texture2d",i._texture=n,s.profile&&(i.stats=n.stats),i.destroy=function(){n.decRef()},i},createCube:function(e,r,n,i,a,l){var c=new Ze(Z);He[c.id]=c,o.cubeCount++;var u=new Array(6);function h(e,t,r,n,i,a){var o,l=c.texInfo;for(Ie.call(l),o=0;o<6;++o)u[o]=ke();if("number"!=typeof e&&e){if("object"==typeof e)if(t)q(u[0],e),q(u[1],t),q(u[2],r),q(u[3],n),q(u[4],i),q(u[5],a);else if(Le(l,e),P(c,e),"faces"in e){var f=e.faces;for(o=0;o<6;++o)L(u[o],c),q(u[o],f[o])}else for(o=0;o<6;++o)q(u[o],e)}else{var p=0|e||1;for(o=0;o<6;++o)V(u[o],p,p)}for(L(c,u[0]),l.genMipmaps?c.mipmask=(u[0].width<<1)-1:c.mipmask=u[0].mipmask,c.internalformat=u[0].internalformat,h.width=u[0].width,h.height=u[0].height,Ye(c),o=0;o<6;++o)we(u[o],Y+o);for(Ve(l,Z),Xe(),s.profile&&(c.stats.size=Ue(c.internalformat,c.type,h.width,h.height,l.genMipmaps,!0)),h.format=k[c.internalformat],h.type=A[c.type],h.mag=M[l.magFilter],h.min=S[l.minFilter],h.wrapS=E[l.wrapS],h.wrapT=E[l.wrapT],o=0;o<6;++o)Ce(u[o]);return h}return h(e,r,n,i,a,l),h.subimage=function(e,t,r,n,i){var a=0|r,o=0|n,s=0|i,l=j();return L(l,c),l.width=0,l.height=0,O(l,t),l.width=l.width||(c.width>>s)-a,l.height=l.height||(c.height>>s)-o,Ye(c),F(l,Y+e,a,o,s),Xe(),N(l),h},h.resize=function(e){var r=0|e;if(r!==c.width){h.width=c.width=r,h.height=c.height=r,Ye(c);for(var n=0;n<6;++n)for(var i=0;c.mipmask>>i;++i)t.texImage2D(Y+n,i,c.format,r>>i,r>>i,0,c.format,c.type,null);return Xe(),s.profile&&(c.stats.size=Ue(c.internalformat,c.type,h.width,h.height,!1,!0)),h}},h._reglType="textureCube",h._texture=c,s.profile&&(h.stats=c.stats),h.destroy=function(){c.decRef()},h},clear:function(){for(var e=0;e>r,e.height>>r,0,e.internalformat,e.type,null);else for(var n=0;n<6;++n)t.texImage2D(Y+n,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);Ve(e.texInfo,e.target)}))},refresh:function(){for(var e=0;e=0?f=!0:c.indexOf(d)>=0&&(f=!1))),("depthTexture"in M||"depthStencilTexture"in M)&&(k=!(!M.depthTexture&&!M.depthStencilTexture)),"depth"in M&&("boolean"==typeof M.depth?s=M.depth:(_=M.depth,u=!1)),"stencil"in M&&("boolean"==typeof M.stencil?u=M.stencil:(b=M.stencil,s=!1)),"depthStencil"in M&&("boolean"==typeof M.depthStencil?s=u=M.depthStencil:(w=M.depthStencil,s=!1,u=!1))}else a=o=1;var E=null,C=null,I=null,L=null;if(Array.isArray(h))E=h.map(m);else if(h)E=[m(h)];else for(E=new Array(x),r=0;r0&&(s.depth=r[0].depth,s.stencil=r[0].stencil,s.depthStencil=r[0].depthStencil),r[a]?r[a](s):r[a]=M(s)}return e(n,{width:l,height:l,color:o})}return n(t),e(n,{faces:r,resize:function(e){var t,i=0|e;if(i===n.width)return n;var a=n.color;for(t=0;t=0;--e){var t=ot[e];t&&t(we,null,0)}n.flush(),A&&A.update()}function ft(){!ut&&ot.length>0&&(ut=s.next(ht))}function pt(){ut&&(s.cancel(ht),ut=null)}function dt(e){e.preventDefault(),pt(),st.forEach((function(e){e()}))}function mt(e){n.getError(),a.restore(),He.restore(),Ce.restore(),Qe.restore(),et.restore(),tt.restore(),Le.restore(),A&&A.restore(),rt.procs.refresh(),ft(),lt.forEach((function(e){e()}))}function gt(t){function r(e,t){var r={},n={};return Object.keys(e).forEach((function(i){var a=e[i];if(o.isDynamic(a))n[i]=o.unbox(a,i);else{if(t&&Array.isArray(a))for(var s=0;s0)return h.call(this,function(e){for(;p.length=0},read:nt,destroy:function(){ot.length=0,pt(),at&&(at.removeEventListener(Br,dt),at.removeEventListener(jr,mt)),He.clear(),tt.clear(),et.clear(),Le.clear(),Qe.clear(),Ie.clear(),Ce.clear(),A&&A.clear(),ct.forEach((function(e){e()}))},_gl:n,_refresh:wt,poll:function(){bt(),A&&A.update()},now:Tt,stats:f,getCachedCode:function(){return p},preloadCachedCode:function(e){Object.entries(e).forEach((function(e){p[e[0]]=e[1]}))}});return r.onDone(null,kt),kt}},"object"==typeof e&&typeof t<"u"?t.exports=n():r.createREGL=n()}}),Sx=m({"src/lib/prepare_regl.js"(e,t){var r=fm(),n=Mx();t.exports=function(e,t,i){var a=e._fullLayout,o=!0;return a._glcanvas.each((function(r){if(r.regl)r.regl.preloadCachedCode(i);else if(!r.pick||a._has("parcoords")){try{r.regl=n({canvas:this,attributes:{antialias:!r.pick,preserveDrawingBuffer:!0},pixelRatio:e._context.plotGlPixelRatio||window.devicePixelRatio,extensions:t||[],cachedCode:i||{}})}catch{o=!1}r.regl||(o=!1),o&&this.addEventListener("webglcontextlost",(function(t){e&&e.emit&&e.emit("plotly_webglcontextlost",{event:t,layer:r.key})}),!1)}})),o||r({container:a._glcontainer.node()}),o}}}),Ex=m({"src/traces/scattergl/plot.js"(e,t){var r=Ly(),n=Qv(),i=ex(),a=Ax(),o=ct(),s=Rr().selectMode,l=Sx(),c=Xt(),u=pi(),h=wy().styleTextSelection,f={};function p(e,t,r,n){var i=e._size,a=e.width*n,o=e.height*n,s=i.l*n,l=i.b*n,c=i.r*n,u=i.t*n,h=i.w*n,f=i.h*n;return[s+t.domain[0]*h,l+r.domain[0]*f,a-c-(1-t.domain[1])*h,o-u-(1-r.domain[1])*f]}(t.exports=function(e,t,d){if(d.length){var m,g,y=e._fullLayout,v=t._scene,x=t.xaxis,_=t.yaxis;if(v){if(!l(e,["ANGLE_instanced_arrays","OES_element_index_uint"],f))return void v.init();var b=v.count,w=y._glcanvas.data()[0].regl;if(u(e,t,d),v.dirty){if((v.line2d||v.error2d)&&!(v.scatter2d||v.fill2d||v.glText)&&w.clear({color:!0,depth:!0}),!0===v.error2d&&(v.error2d=i(w)),!0===v.line2d&&(v.line2d=n(w)),!0===v.scatter2d&&(v.scatter2d=r(w)),!0===v.fill2d&&(v.fill2d=n(w)),!0===v.glText)for(v.glText=new Array(b),m=0;mv.glText.length){var T=b-v.glText.length;for(m=0;mr&&(isNaN(t[n])||isNaN(t[n+1]));)n-=2;e.positions=t.slice(r,n+2)}return e})),v.line2d.update(v.lineOptions)),v.error2d){var A=(v.errorXOptions||[]).concat(v.errorYOptions||[]);v.error2d.update(A)}v.scatter2d&&v.scatter2d.update(v.markerOptions),v.fillOrder=o.repeat(null,b),v.fill2d&&(v.fillOptions=v.fillOptions.map((function(e,t){var r=d[t];if(e&&r&&r[0]&&r[0].trace){var n,i,a=r[0],o=a.trace,s=a.t,l=v.lineOptions[t],c=[];o._ownfill&&c.push(t),o._nexttrace&&c.push(t+1),c.length&&(v.fillOrder[t]=c);var u,h,f=[],p=l&&l.positions||s.positions;if("tozeroy"===o.fill){for(u=0;uu&&isNaN(p[h+1]);)h-=2;0!==p[u+1]&&(f=[p[u],0]),f=f.concat(p.slice(u,h+2)),0!==p[h+1]&&(f=f.concat([p[h],0]))}else if("tozerox"===o.fill){for(u=0;uu&&isNaN(p[h]);)h-=2;0!==p[u]&&(f=[0,p[u+1]]),f=f.concat(p.slice(u,h+2)),0!==p[h]&&(f=f.concat([0,p[h+1]]))}else if("toself"===o.fill||"tonext"===o.fill){for(f=[],n=0,e.splitNull=!0,i=0;i-1;for(let[e]of d)if(e){var C=e.trace,I=e.t,L=I.index,P=C._length,z=I.x,D=I.y;if(C.selectedpoints||S||E){if(S||(S=!0),C.selectedpoints){var O=v.selectBatch[L]=o.selIndices2selPoints(C),R={};for(g=0;ga&&l||ih?_.sizeAvg||Math.max(_.size,3):i(t,x),p=0;p2?(n=h[0],a=h[2],i=h[1],o=h[3]):h.length?(n=i=h[0],a=o=h[1]):(n=h.x,i=h.y,a=h.x+h.width,o=h.y+h.height),f.length>2?(s=f[0],c=f[2],l=f[1],u=f[3]):f.length?(s=l=f[0],c=u=f[1]):(s=f.x,l=f.y,c=f.x+f.width,u=f.y+f.height),[s,i,c,o]}function f(e){if("number"==typeof e)return[e,e,e,e];if(2===e.length)return[e[0],e[1],e[0],e[1]];{let t=s(e);return[t.x,t.y,t.x+t.width,t.y+t.height]}}t.exports=c,c.prototype.render=function(...e){return e.length&&this.update(...e),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?null==this.planned&&(this.planned=a((()=>{this.draw(),this.dirty=!0,this.planned=null}))):(this.draw(),this.dirty=!0,a((()=>{this.dirty=!1}))),this)},c.prototype.update=function(...e){if(!e.length)return;for(let t=0;tt||!c.lower&&e{t[a+r]=n}))}this.scatter.draw(...t)}else this.scatter.draw();return this},c.prototype.destroy=function(){return this.traces.forEach((e=>{e.buffer&&e.buffer.destroy&&e.buffer.destroy()})),this.traces=null,this.passes=null,this.scatter.destroy(),this}}}),Nx=m({"src/traces/splom/plot.js"(e,t){var r=jx(),n=ct(),i=_t(),a=Rr().selectMode;function o(e,t){var o,s,l,c,u,h=e._fullLayout,f=h._size,p=t.trace,d=t.t,m=h._splomScenes[p.uid],g=m.matrixOptions,y=g.cdata,v=h._glcanvas.data()[0].regl,x=h.dragmode;if(0!==y.length){g.lower=p.showupperhalf,g.upper=p.showlowerhalf,g.diagonal=p.diagonal.visible;var _=p._visibleDims,b=y.length,w=m.viewOpts={};for(w.ranges=new Array(b),w.domains=new Array(b),u=0;u<_.length;u++){l=_[u];var T=w.ranges[u]=new Array(4),k=w.domains[u]=new Array(4);(o=i.getFromId(e,p._diag[l][0]))&&(T[0]=o._rl[0],T[2]=o._rl[1],k[0]=o.domain[0],k[2]=o.domain[1]),(s=i.getFromId(e,p._diag[l][1]))&&(T[1]=s._rl[0],T[3]=s._rl[1],k[1]=s.domain[0],k[3]=s.domain[1])}var A=e._context.plotGlPixelRatio,M=f.l*A,S=f.b*A,E=f.w*A,C=f.h*A;w.viewport=[M,S,E+M,C+S],!0===m.matrix&&(m.matrix=r(v));var I=h.clickmode.indexOf("select")>-1,L=!0;if(a(x)||p.selectedpoints||I){var P=p._length;if(p.selectedpoints){m.selectBatch=p.selectedpoints;var z=p.selectedpoints,D={};for(l=0;l=t[r][0]&&e<=t[r][1])return!0;return!1}(r,n))return r;var i=e?-1:1,a=0,o=t.length-1;if(i<0){var s=a;a=o,o=s}for(var l=t[a],u=l,f=a;i*ft){f=n;break}}if(a=u,isNaN(a)&&(a=isNaN(h)||isNaN(f)?isNaN(h)?f:h:t-c[h][1]e[1]+n||t=.9*e[1]+.1*e[0]?"n":t<=.9*e[0]+.1*e[1]?"s":"ns"}(d,t);m&&(o.interval=l[a],o.intervalPix=d,o.region=m)}}if(e.ordinal&&!o.region){var y=e.unitTickvals,v=e.unitToPaddedPx.invert(t);for(n=0;n=x[0]&&v<=x[1]){o.clickableOrdinalRange=x;break}}}return o}function w(e,t){n.event.sourceEvent.stopPropagation();var i=t.height-n.mouse(e)[1]-2*r.verticalPadding,a=t.brush.svgBrush;a.wasDragged=!0,a._dragging=!0,a.grabbingBar?a.newExtent=[i-a.grabPoint,i+a.barLength-a.grabPoint].map(t.unitToPaddedPx.invert):a.newExtent=[a.startExtent,t.unitToPaddedPx.invert(i)].sort(o),t.brush.filterSpecified=!0,a.extent=a.stayingIntervals.concat([a.newExtent]),a.brushCallback(t),x(e.parentNode)}function T(e,t){var i=_(t,t.height-n.mouse(e)[1]-2*r.verticalPadding),a="crosshair";i.clickableOrdinalRange?a="pointer":i.region&&(a=i.region+"-resize"),n.select(document.body).style("cursor",a)}function k(e){e.on("mousemove",(function(e){n.event.preventDefault(),e.parent.inBrushDrag||T(this,e)})).on("mouseleave",(function(e){e.parent.inBrushDrag||y()})).call(n.behavior.drag().on("dragstart",(function(e){!function(e,t){n.event.sourceEvent.stopPropagation();var i=t.height-n.mouse(e)[1]-2*r.verticalPadding,a=t.unitToPaddedPx.invert(i),o=t.brush,s=_(t,i),l=s.interval,c=o.svgBrush;if(c.wasDragged=!1,c.grabbingBar="ns"===s.region,c.grabbingBar){var u=l.map(t.unitToPaddedPx);c.grabPoint=i-u[0]-r.verticalPadding,c.barLength=u[1]-u[0]}c.clickableOrdinalRange=s.clickableOrdinalRange,c.stayingIntervals=t.multiselect&&o.filterSpecified?o.filter.getConsolidated():[],l&&(c.stayingIntervals=c.stayingIntervals.filter((function(e){return e[0]!==l[0]&&e[1]!==l[1]}))),c.startExtent=s.region?l["s"===s.region?1:0]:a,t.parent.inBrushDrag=!0,c.brushStartCallback()}(this,e)})).on("drag",(function(e){w(this,e)})).on("dragend",(function(e){!function(e,t){var r=t.brush,i=r.filter,a=r.svgBrush;a._dragging||(T(e,t),w(e,t),t.brush.svgBrush.wasDragged=!1),a._dragging=!1,n.event.sourceEvent.stopPropagation();var o=a.grabbingBar;if(a.grabbingBar=!1,a.grabLocation=void 0,t.parent.inBrushDrag=!1,y(),!a.wasDragged)return a.wasDragged=void 0,a.clickableOrdinalRange?r.filterSpecified&&t.multiselect?a.extent.push(a.clickableOrdinalRange):(a.extent=[a.clickableOrdinalRange],r.filterSpecified=!0):o?(a.extent=a.stayingIntervals,0===a.extent.length&&M(r)):M(r),a.brushCallback(t),x(e.parentNode),void a.brushEndCallback(r.filterSpecified?i.getConsolidated():[]);var s=function(){i.set(i.getConsolidated())};if(t.ordinal){var l=t.unitTickvals;l[l.length-1]a.newExtent[0];a.extent=a.stayingIntervals.concat(c?[a.newExtent]:[]),a.extent.length||M(r),a.brushCallback(t),c?x(e.parentNode,s):(s(),x(e.parentNode))}else s();a.brushEndCallback(r.filterSpecified?i.getConsolidated():[])}(this,e)})))}function A(e,t){return e[0]-t[0]}function M(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function S(e){return function(t){var r=t.brush,n=function(e){return e.svgBrush.extent.map((function(e){return e.slice()}))}(r),i=n.slice();r.filter.set(i),e()}}function E(e){for(var t,r=e.slice(),n=[],i=r.shift();i;){for(t=i.slice();(i=r.shift())&&i[0]<=t[1];)t[1]=Math.max(t[1],i[1]);n.push(t)}return 1===n.length&&n[0][0]>n[0][1]&&(n=[]),n}t.exports={makeBrush:function(e,t,r,n,i,a){var s=function(){var e,t,r=[];return{set:function(n){1===(r=n.map((function(e){return e.slice().sort(o)})).sort(A)).length&&r[0][0]===-1/0&&r[0][1]===1/0&&(r=[[0,-1]]),e=E(r),t=r.reduce((function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}),[1/0,-1/0])},get:function(){return r.slice()},getConsolidated:function(){return e},getBounds:function(){return t}}}();return s.set(r),{filter:s,filterSpecified:t,svgBrush:{extent:[],brushStartCallback:n,brushCallback:S(i),brushEndCallback:a}}},ensureAxisBrush:function(e,t,n){var o=e.selectAll("."+r.cn.axisBrush).data(a,i);o.enter().append("g").classed(r.cn.axisBrush,!0),function(e,t,n){var i=n._context.staticPlot,o=e.selectAll(".background").data(a);o.enter().append("rect").classed("background",!0).call(p).call(d).style("pointer-events",i?"none":"auto").attr("transform",s(0,r.verticalPadding)),o.call(k).attr("height",(function(e){return e.height-r.verticalPadding}));var l=e.selectAll(".highlight-shadow").data(a);l.enter().append("line").classed("highlight-shadow",!0).attr("x",-r.bar.width/2).attr("stroke-width",r.bar.width+r.bar.strokeWidth).attr("stroke",t).attr("opacity",r.bar.strokeOpacity).attr("stroke-linecap","butt"),l.attr("y1",(function(e){return e.height})).call(v);var c=e.selectAll(".highlight").data(a);c.enter().append("line").classed("highlight",!0).attr("x",-r.bar.width/2).attr("stroke-width",r.bar.width-r.bar.strokeWidth).attr("stroke",r.bar.fillColor).attr("opacity",r.bar.fillOpacity).attr("stroke-linecap","butt"),c.attr("y1",(function(e){return e.height})).call(v)}(o,t,n)},cleanRanges:function(e,t){if(Array.isArray(e[0])?(e=e.map((function(e){return e.sort(o)})),e=t.multiselect?E(e.sort(A)):[e[0]]):e=[e.sort(o)],t.tickvals){var r=t.tickvals.slice().sort(o);if(!(e=e.map((function(e){var t=[f(0,r,e[0],[]),f(1,r,e[1],[])];if(t[1]>t[0])return t})).filter((function(e){return e}))).length)return}return e.length>1?e:e[0]}}}}),Qx=m({"src/traces/parcoords/defaults.js"(e,t){var r=ct(),n=Ct().hasColorscale,i=Ht(),a=Ma().defaults,o=Nt(),s=ar(),l=Xx(),c=Jx(),u=$x().maxDimensionCount,h=Px();function f(e,t,n,i){function a(n,i){return r.coerce(e,t,l.dimensions,n,i)}var o=a("values"),u=a("visible");if(o&&o.length||(u=t.visible=!1),u){a("label"),a("tickvals"),a("ticktext"),a("tickformat");var h=a("range");t._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:h},s.setConvert(t._ax,i.layout),a("multiselect");var f=a("constraintrange");f&&(t.constraintrange=c.cleanRanges(f,t))}}t.exports=function(e,t,s,c){function p(n,i){return r.coerce(e,t,l,n,i)}var d=e.dimensions;Array.isArray(d)&&d.length>u&&(r.log("parcoords traces support up to "+u+" dimensions at the moment"),d.splice(u));var m=o(e,t,{name:"dimensions",layout:c,handleItemDefaults:f}),g=function(e,t,a,o,s){var l=s("line.color",a);if(n(e,"line")&&r.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),i(e,t,o,s,{prefix:"line.",cLetter:"c"}),l.length;t.line.color=a}return 1/0}(e,t,s,c,p);a(t,c,p),(!Array.isArray(m)||!m.length)&&(t.visible=!1),h(t,m,"values",g);var y=r.extendFlat({},c.font,{size:Math.round(c.font.size/1.2)});r.coerceFont(p,"labelfont",y),r.coerceFont(p,"tickfont",y,{autoShadowDflt:!0}),r.coerceFont(p,"rangefont",y),p("labelangle"),p("labelside"),p("unselected.line.color"),p("unselected.line.opacity")}}}),e_=m({"src/traces/parcoords/calc.js"(e,t){var r=ct().isArrayOrTypedArray,n=Yt(),i=Kx().wrap;t.exports=function(e,t){var a,o;return n.hasColorscale(t,"line")&&r(t.line.color)?(a=t.line.color,o=n.extractOpts(t.line).colorscale,n.calc(e,t,{vals:a,containerStr:"line",cLetter:"c"})):(a=function(e){for(var t=new Array(e),r=0;r>>16,(65280&e)>>>8,255&e],alpha:1};if("number"==typeof e)return{space:"rgb",values:[e>>>16,(65280&e)>>>8,255&e],alpha:1};if(e=String(e).toLowerCase(),r_.default[e])a=r_.default[e].slice(),i="rgb";else if("transparent"===e)o=0,i="rgb",a=[0,0,0];else if("#"===e[0]){var s=e.slice(1),l=s.length;o=1,l<=4?(a=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],4===l&&(o=parseInt(s[3]+s[3],16)/255)):(a=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],8===l&&(o=parseInt(s[6]+s[7],16)/255)),a[0]||(a[0]=0),a[1]||(a[1]=0),a[2]||(a[2]=0),i="rgb"}else if(n=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(e)){var c=n[1],u="cmyk"===(i=c.replace(/a$/,""))?4:"gray"===i?1:3;a=n[2].trim().split(/\s*[,\/]\s*|\s+/),"color"===i&&(i=a.shift()),o=(a=a.map((function(e,t){if("%"===e[e.length-1])return e=parseFloat(e)/100,3===t?e:"rgb"===i?255*e:"h"===i[0]||"l"===i[0]&&!t?100*e:"lab"===i?125*e:"lch"===i?t<2?150*e:360*e:"o"!==i[0]||t?"oklab"===i?.4*e:"oklch"===i?t<2?.4*e:360*e:e:e;if("h"===i[t]||2===t&&"h"===i[i.length-1]){if(void 0!==i_[e])return i_[e];if(e.endsWith("deg"))return parseFloat(e);if(e.endsWith("turn"))return 360*parseFloat(e);if(e.endsWith("grad"))return 360*parseFloat(e)/400;if(e.endsWith("rad"))return 180*parseFloat(e)/Math.PI}return"none"===e?0:parseFloat(e)}))).length>u?a.pop():1}else/[0-9](?:\s|\/|,)/.test(e)&&(a=e.match(/([0-9]+)/g).map((function(e){return parseFloat(e)})),i=(null==(r=null==(t=e.match(/([a-z])/gi))?void 0:t.join(""))?void 0:r.toLowerCase())||"rgb");return{space:i,values:a,alpha:o}}var r_,n_,i_,a_,o_,s_=d({"node_modules/color-parse/index.js"(){var r,n;n=null!=(r=Xd())?e(s(r)):{},r_=y(t(n,"default",{value:r,enumerable:!0}),r),n_=t_,i_={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}}),l_=d({"node_modules/color-space/rgb.js"(){a_={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}}}),c_=d({"node_modules/color-space/hsl.js"(){l_(),o_={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(e){var t,r,n,i,a,o=e[0]/360,s=e[1]/100,l=e[2]/100,c=0;if(0===s)return[a=255*l,a,a];for(t=2*l-(r=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];c<3;)(n=o+1/3*-(c-1))<0?n++:n>1&&n--,a=6*n<1?t+6*(r-t)*n:2*n<1?r:3*n<2?t+(r-t)*(2/3-n)*6:t,i[c++]=255*a;return i}},a_.hsl=function(e){var t,r,n=e[0]/255,i=e[1]/255,a=e[2]/255,o=Math.min(n,i,a),s=Math.max(n,i,a),l=s-o;return s===o?t=0:n===s?t=(i-a)/l:i===s?t=2+(a-n)/l:a===s&&(t=4+(n-i)/l),(t=Math.min(60*t,360))<0&&(t+=360),r=(o+s)/2,[t,100*(s===o?0:r<=.5?l/(s+o):l/(2-s-o)),100*r]}}}),u_={};function h_(e){Array.isArray(e)&&e.raw&&(e=String.raw(...arguments)),e instanceof Number&&(e=+e);var t,r=n_(e);if(!r.space)return[];let n="h"===r.space[0]?o_.min:a_.min,i="h"===r.space[0]?o_.max:a_.max;return(t=Array(3))[0]=Math.min(Math.max(r.values[0],n[0]),i[0]),t[1]=Math.min(Math.max(r.values[1],n[1]),i[1]),t[2]=Math.min(Math.max(r.values[2],n[2]),i[2]),"h"===r.space[0]&&(t=o_.rgb(t)),t.push(Math.min(Math.max(r.alpha,0),1)),t}g(u_,{default:()=>h_});var f_=d({"node_modules/color-rgba/index.js"(){s_(),l_(),c_()}}),p_=m({"src/traces/parcoords/helpers.js"(e){var t=ct().isTypedArray;e.convertTypedArray=function(e){return t(e)?Array.prototype.slice.call(e):e},e.isOrdinal=function(e){return!!e.tickvals},e.isVisible=function(e){return e.visible||!("visible"in e)}}}),d_=m({"src/traces/parcoords/lines.js"(e,t){var r=["precision highp float;","","varying vec4 fragColor;","","attribute vec4 p01_04, p05_08, p09_12, p13_16,"," p17_20, p21_24, p25_28, p29_32,"," p33_36, p37_40, p41_44, p45_48,"," p49_52, p53_56, p57_60, colors;","","uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,"," loA, hiA, loB, hiB, loC, hiC, loD, hiD;","","uniform vec2 resolution, viewBoxPos, viewBoxSize;","uniform float maskHeight;","uniform float drwLayer; // 0: context, 1: focus, 2: pick","uniform vec4 contextColor;","uniform sampler2D maskTexture, palette;","","bool isPick = (drwLayer > 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {"," return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {"," float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);"," float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);"," return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {"," return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {"," return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {"," return ("," fOutside(p[0], lo[0], hi[0]) ||"," fOutside(p[1], lo[1], hi[1]) ||"," fOutside(p[2], lo[2], hi[2]) ||"," fOutside(p[3], lo[3], hi[3])"," );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {"," return ("," vOutside(p[0], lo[0], hi[0]) ||"," vOutside(p[1], lo[1], hi[1]) ||"," vOutside(p[2], lo[2], hi[2]) ||"," vOutside(p[3], lo[3], hi[3])"," );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {"," return mOutside(A, loA, hiA) ||"," mOutside(B, loB, hiB) ||"," mOutside(C, loC, hiC) ||"," mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {"," mat4 pnts[4];"," pnts[0] = A;"," pnts[1] = B;"," pnts[2] = C;"," pnts[3] = D;",""," for(int i = 0; i < 4; ++i) {"," for(int j = 0; j < 4; ++j) {"," for(int k = 0; k < 4; ++k) {"," if(0 == iMod("," int(255.0 * texture2D(maskTexture,"," vec2("," (float(i * 2 + j / 2) + 0.5) / 8.0,"," (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight"," ))[3]"," ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),"," 2"," )) return true;"," }"," }"," }"," return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {"," float x = 0.5 * sign(v) + 0.5;"," float y = axisY(x, A, B, C, D);"," float z = 1.0 - abs(v);",""," z += isContext ? 0.0 : 2.0 * float("," outsideBoundingBox(A, B, C, D) ||"," outsideRasterMask(A, B, C, D)"," );",""," return vec4("," 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,"," z,"," 1.0"," );","}","","void main() {"," mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);"," mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);"," mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);"," mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);",""," float v = colors[3];",""," gl_Position = position(isContext, v, A, B, C, D);",""," fragColor ="," isContext ? vec4(contextColor) :"," isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join("\n"),n=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join("\n"),i=$x().maxDimensionCount,a=ct(),o=1e-6,s=2048,l=new Uint8Array(4),c=new Uint8Array(4),u={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function h(e,t,r,n,i){var a=e._gl;a.enable(a.SCISSOR_TEST),a.scissor(t,r,n,i),e.clear({color:[0,0,0,0],depth:1})}function f(e,t,r,n,i,a){var o=a.key;r.drawCompleted||(function(e){e.read({x:0,y:0,width:1,height:1,data:l})}(e),r.drawCompleted=!0),function s(l){var c=Math.min(n,i-l*n);0===l&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],h(e,a.scissorX,a.scissorY,a.scissorWidth,a.viewBoxSize[1])),!r.clearOnly&&(a.count=2*c,a.offset=2*l*n,t(a),l*n+c>>8*t)%256/255}function g(e,t,r){for(var n=new Array(8*t),i=0,a=0;au&&(u=e[n].dim1.canvasX,a=n);0===l&&h(A,0,0,o.canvasWidth,o.canvasHeight);var p=function(e){var t,r,n,i=[[],[]];for(n=0;n<64;n++){var a=!e&&ns._length&&(M=M.slice(0,s._length));var C,L=s.tickvals;function P(e,t){return{val:e,text:C[t]}}function z(e,t){return e.val-t.val}if(i(L)&&L.length){n.isTypedArray(L)&&(L=Array.from(L)),C=s.ticktext,i(C)&&C.length?C.length>L.length?C=C.slice(0,L.length):L.length>C.length&&(L=L.slice(0,C.length)):C=L.map(a(s.tickformat));for(var D=1;D=n||l>=i)return;var c=e.lineLayer.readPixel(s,i-1-l),u=0!==c[3],h=u?c[2]+256*(c[1]+256*c[0]):null,f={x:s,y:l,clientX:t.clientX,clientY:t.clientY,dataIndex:e.model.key,curveNumber:h};h!==C&&(u?a.hover(f):a.unhover&&a.unhover(f),C=h)}})),E.style("opacity",(function(e){return e.pick?0:1})),p.style("background","rgba(255, 255, 255, 0)");var B=p.selectAll("."+x.cn.parcoords).data(S,d);B.exit().remove(),B.enter().append("g").classed(x.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),B.attr("transform",(function(e){return c(e.model.translateX,e.model.translateY)}));var j=B.selectAll("."+x.cn.parcoordsControlView).data(m,d);j.enter().append("g").classed(x.cn.parcoordsControlView,!0),j.attr("transform",(function(e){return c(e.model.pad.l,e.model.pad.t)}));var N=j.selectAll("."+x.cn.yAxis).data((function(e){return e.dimensions}),d);N.enter().append("g").classed(x.cn.yAxis,!0),j.each((function(e){O(N,e,b)})),E.each((function(e){if(e.viewModel){!e.lineLayer||a?e.lineLayer=w(this,e):e.lineLayer.update(e),(e.key||0===e.key)&&(e.viewModel[e.key]=e.lineLayer);var t=!e.context||a;e.lineLayer.render(e.viewModel.panels,t)}})),N.attr("transform",(function(e){return c(e.xScale(e.xIndex),0)})),N.call(r.behavior.drag().origin((function(e){return e})).on("drag",(function(e){var t=e.parent;A.linePickActive(!1),e.x=Math.max(-x.overdrag,Math.min(e.model.width+x.overdrag,r.event.x)),e.canvasX=e.x*e.model.canvasPixelRatio,N.sort((function(e,t){return e.x-t.x})).each((function(t,r){t.xIndex=r,t.x=e===t?t.x:t.xScale(t.xIndex),t.canvasX=t.x*t.model.canvasPixelRatio})),O(N,t,b),N.filter((function(t){return 0!==Math.abs(e.xIndex-t.xIndex)})).attr("transform",(function(e){return c(e.xScale(e.xIndex),0)})),r.select(this).attr("transform",c(e.x,0)),N.each((function(r,n,i){i===e.parent.key&&(t.dimensions[n]=r)})),t.contextLayer&&t.contextLayer.render(t.panels,!1,!I(t)),t.focusLayer.render&&t.focusLayer.render(t.panels)})).on("dragend",(function(e){var t=e.parent;e.x=e.xScale(e.xIndex),e.canvasX=e.x*e.model.canvasPixelRatio,O(N,t,b),r.select(this).attr("transform",(function(e){return c(e.x,0)})),t.contextLayer&&t.contextLayer.render(t.panels,!1,!I(t)),t.focusLayer&&t.focusLayer.render(t.panels),t.pickLayer&&t.pickLayer.render(t.panels,!0),A.linePickActive(!0),a&&a.axesMoved&&a.axesMoved(t.key,t.dimensions.map((function(e){return e.crossfilterDimensionIndex})))}))),N.exit().remove();var U=N.selectAll("."+x.cn.axisOverlays).data(m,d);U.enter().append("g").classed(x.cn.axisOverlays,!0),U.selectAll("."+x.cn.axis).remove();var V=U.selectAll("."+x.cn.axis).data(m,d);V.enter().append("g").classed(x.cn.axis,!0),V.each((function(e){var t=e.model.height/e.model.tickDistance,n=e.domainScale,i=n.domain();r.select(this).call(r.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(t,e.tickFormat).tickValues(e.ordinal?i:null).tickFormat((function(t){return y.isOrdinal(e)?t:R(e.model.dimensions[e.visibleIndex],t)})).scale(n)),h.font(V.selectAll("text"),e.model.tickFont)})),V.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),V.selectAll("text").style("cursor","default");var q=U.selectAll("."+x.cn.axisHeading).data(m,d);q.enter().append("g").classed(x.cn.axisHeading,!0);var H=q.selectAll("."+x.cn.axisTitle).data(m,d);H.enter().append("text").classed(x.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",o?"none":"auto"),H.text((function(e){return e.label})).each((function(t){var n=r.select(this);h.font(n,t.model.labelFont),u.convertToTspans(n,e)})).attr("transform",(function(e){var t=D(e.model.labelAngle,e.model.labelSide),r=x.axisTitleOffset;return(t.dir>0?"":c(0,2*r+e.model.height))+l(t.degrees)+c(-r*t.dx,-r*t.dy)})).attr("text-anchor",(function(e){var t=D(e.model.labelAngle,e.model.labelSide);return 2*Math.abs(t.dx)>Math.abs(t.dy)?t.dir*t.dx<0?"start":"end":"middle"}));var G=U.selectAll("."+x.cn.axisExtent).data(m,d);G.enter().append("g").classed(x.cn.axisExtent,!0);var W=G.selectAll("."+x.cn.axisExtentTop).data(m,d);W.enter().append("g").classed(x.cn.axisExtentTop,!0),W.attr("transform",c(0,-x.axisExtentOffset));var Z=W.selectAll("."+x.cn.axisExtentTopText).data(m,d);Z.enter().append("text").classed(x.cn.axisExtentTopText,!0).call(z),Z.text((function(e){return F(e,!0)})).each((function(e){h.font(r.select(this),e.model.rangeFont)}));var Y=G.selectAll("."+x.cn.axisExtentBottom).data(m,d);Y.enter().append("g").classed(x.cn.axisExtentBottom,!0),Y.attr("transform",(function(e){return c(0,e.model.height+x.axisExtentOffset)}));var X=Y.selectAll("."+x.cn.axisExtentBottomText).data(m,d);X.enter().append("text").classed(x.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(z),X.text((function(e){return F(e,!1)})).each((function(e){h.font(r.select(this),e.model.rangeFont)})),_.ensureAxisBrush(U,T,e)}}}),g_=m({"src/traces/parcoords/plot.js"(e,t){var r=m_(),n=Sx(),i=p_().isVisible,a={};function o(e,t,r){var n=t.indexOf(r),i=e.indexOf(n);return-1===i&&(i+=t.length),i}(t.exports=function(e,t){var s=e._fullLayout;if(n(e,[],a)){var l={},c={},u={},h={},f=s._size;t.forEach((function(t,r){var n=t[0].trace;u[r]=n.index;var i=h[r]=n.index;l[r]=e.data[i].dimensions,c[r]=e.data[i].dimensions.slice()})),r(e,t,{width:f.w,height:f.h,margin:{t:f.t,r:f.r,b:f.b,l:f.l}},{filterChanged:function(t,r,n){var i=c[t][r],a=n.map((function(e){return e.slice()})),o="dimensions["+r+"].constraintrange",l=s._tracePreGUI[e._fullData[u[t]]._fullInput.uid];if(void 0===l[o]){var f=i.constraintrange;l[o]=f||null}var p=e._fullData[u[t]].dimensions[r];a.length?(1===a.length&&(a=a[0]),i.constraintrange=a,p.constraintrange=a.slice(),a=[a]):(delete i.constraintrange,delete p.constraintrange,a=null);var d={};d[o]=a,e.emit("plotly_restyle",[d,[h[t]]])},hover:function(t){e.emit("plotly_hover",t)},unhover:function(t){e.emit("plotly_unhover",t)},axesMoved:function(t,r){var n=function(e,t){return function(r,n){return o(e,t,r)-o(e,t,n)}}(r,c[t].filter(i));l[t].sort(n),c[t].filter((function(e){return!i(e)})).sort((function(e){return c[t].indexOf(e)})).forEach((function(e){l[t].splice(l[t].indexOf(e),1),l[t].splice(c[t].indexOf(e),0,e)})),e.emit("plotly_restyle",[{dimensions:[l[t]]},[h[t]]])}})}}).reglPrecompiled=a}}),y_=m({"src/traces/parcoords/base_plot.js"(e){var t=b(),r=Tt().getModuleCalcData,n=g_(),i=Mt();e.name="parcoords",e.plot=function(e){var t=r(e.calcdata,"parcoords")[0];t.length&&n(e,t)},e.clean=function(e,t,r,n){var i=n._has&&n._has("parcoords"),a=t._has&&t._has("parcoords");i&&!a&&(n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())},e.toSVG=function(e){var r=e._fullLayout._glimages,n=t.select(e).selectAll(".svg-container");n.filter((function(e,t){return t===n.size()-1})).selectAll(".gl-canvas-context, .gl-canvas-focus").each((function(){var e=this,t=e.toDataURL("image/png");r.append("svg:image").attr({xmlns:i.svg,"xlink:href":t,preserveAspectRatio:"none",x:0,y:0,width:e.style.width,height:e.style.height})})),window.setTimeout((function(){t.selectAll("#filterBarPattern").attr("id","filterBarPattern")}),60)}}}),v_=m({"src/traces/parcoords/base_index.js"(e,t){t.exports={attributes:Xx(),supplyDefaults:Qx(),calc:e_(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:y_(),categories:["gl","regl","noOpacity","noHover"],meta:{}}}}),x_=m({"src/traces/parcoords/index.js"(e,t){var r=v_();r.plot=g_(),t.exports=r}}),__=m({"lib/parcoords.js"(e,t){t.exports=x_()}}),b_=m({"src/traces/parcats/attributes.js"(e,t){var r=B().extendFlat,n=q(),i=j(),a=zt(),{hovertemplateAttrs:o,templatefallbackAttrs:s}=Fe(),l=Ma().attributes,c=r({editType:"calc"},a("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:o({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:s({editType:"plot"})});t.exports={domain:l({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:r({},n.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:o({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:s({editType:"plot"}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:i({editType:"calc"}),tickfont:i({autoShadowDflt:!0,editType:"calc"}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},values:{valType:"data_array",dflt:[],editType:"calc"},displayindex:{valType:"integer",editType:"calc"},editType:"calc",visible:{valType:"boolean",dflt:!0,editType:"calc"}},line:c,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc"},customdata:void 0,hoverlabel:void 0,ids:void 0,legend:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}}}),w_=m({"src/traces/parcats/defaults.js"(e,t){var r=ct(),n=Ct().hasColorscale,i=Ht(),a=Ma().defaults,o=Nt(),s=b_(),l=Px(),c=I().isTypedArraySpec;function u(e,t){function n(n,i){return r.coerce(e,t,s.dimensions,n,i)}var i=n("values"),a=n("visible");if(i&&i.length||(a=t.visible=!1),a){n("label"),n("displayindex",t._index);var o,l=e.categoryarray,u=r.isArrayOrTypedArray(l)&&l.length>0||c(l);u&&(o="array");var h=n("categoryorder",o);"array"===h?(n("categoryarray"),n("ticktext")):(delete e.categoryarray,delete e.ticktext),!u&&"array"===h&&(t.categoryorder="trace")}}t.exports=function(e,t,c,h){function f(n,i){return r.coerce(e,t,s,n,i)}var p=o(e,t,{name:"dimensions",handleItemDefaults:u}),d=function(e,t,a,o,s){s("line.shape"),s("line.hovertemplate"),s("line.hovertemplatefallback");var l=s("line.color",o.colorway[0]);if(n(e,"line")&&r.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),i(e,t,o,s,{prefix:"line.",cLetter:"c"}),l.length;t.line.color=a}return 1/0}(e,t,c,h,f);a(t,h,f),(!Array.isArray(p)||!p.length)&&(t.visible=!1),l(t,p,"values",d),f("hoveron"),f("hovertemplate"),f("hovertemplatefallback"),f("arrangement"),f("bundlecolors"),f("sortpaths"),f("counts");var m=h.font;r.coerceFont(f,"labelfont",m,{overrideDflt:{size:Math.round(m.size)}}),r.coerceFont(f,"tickfont",m,{autoShadowDflt:!0,overrideDflt:{size:Math.round(m.size/1.2)}})}}}),T_=m({"src/traces/parcats/calc.js"(e,t){var r=Kx().wrap,n=Ct().hasColorscale,i=Zt(),a=at(),o=er(),s=ct(),l=M();function c(e,t,r,n){return{dimensionInd:e,categoryInd:t,categoryValue:r,displayInd:t,categoryLabel:n,valueInds:[],count:0,dragY:null}}function u(e,t,r){e.valueInds.push(t),e.count+=r}function h(e,t,r){return{categoryInds:e,color:t,rawColor:r,valueInds:[],count:0}}function f(e,t,r){e.valueInds.push(t),e.count+=r}t.exports=function(e,t){var p=s.filterVisible(t.dimensions);if(0===p.length)return[];var d,m,g,y=p.map((function(e){var t;if("trace"===e.categoryorder)t=null;else if("array"===e.categoryorder)t=e.categoryarray;else{t=a(e.values);for(var r=!0,n=0;n=e.length||void 0!==t[e[r]])return!1;t[e[r]]=!0}return!0}(r))for(t=0;tt.model.rawColor?1:e.model.rawColor"),C=r.mouse(h)[0];a.loneHover({trace:f,x:_-d.left+m.left,y:b-d.top+m.top,text:E,color:e.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:w,idealAlign:C<_?"right":"left",hovertemplate:(f.line||{}).hovertemplate,hovertemplateLabels:M,eventData:[{data:f._input,fullData:f,count:k,probability:A}]},{container:p._hoverlayer.node(),outerContainer:p._paper.node(),gd:h})}}}function g(e){if(!e.parcatsViewModel.dragDimension&&(w(r.select(this)),a.loneUnhover(e.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),e.parcatsViewModel.pathSelection.sort(d),-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip"))){var t=y(e),n=x(e);e.parcatsViewModel.graphDiv.emit("plotly_unhover",{points:t,event:r.event,constraints:n})}}function y(e){for(var t=[],r=O(e.parcatsViewModel),n=0;n1&&f.displayInd===h.dimensions.length-1?(i=c.left,a="left"):(i=c.left+c.width,a="right");var m=u.model.count,g=u.model.categoryLabel,y=m/u.parcatsViewModel.model.count,v={countLabel:m,categoryLabel:g,probabilityLabel:y.toFixed(3)},x=[];-1!==u.parcatsViewModel.hoverinfoItems.indexOf("count")&&x.push(["Count:",v.countLabel].join(" ")),-1!==u.parcatsViewModel.hoverinfoItems.indexOf("probability")&&x.push(["P("+v.categoryLabel+"):",v.probabilityLabel].join(" "));var _=x.join("
");return{trace:p,x:o*(i-t.left),y:s*(d-t.top),text:_,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:a,hovertemplate:p.hovertemplate,hovertemplateLabels:v,eventData:[{data:p._input,fullData:p,count:m,category:g,probability:y}]}}function I(e){if(!e.parcatsViewModel.dragDimension&&-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip")){if(r.mouse(this)[1]<-1)return;var t,n=e.parcatsViewModel.graphDiv,i=n._fullLayout,s=i._paperdiv.node().getBoundingClientRect(),l=e.parcatsViewModel.hoveron,u=this;"color"===l?(function(e){var t=r.select(e).datum(),n=M(t);T(n),n.each((function(){o.raiseToTop(this)})),r.select(e.parentNode).selectAll("rect.bandrect").filter((function(e){return e.color===t.color})).each((function(){o.raiseToTop(this),function(e){e.attr("stroke","black").attr("stroke-width",1.5)}(r.select(this))}))}(u),E(u,"plotly_hover",r.event)):(function(e){r.select(e.parentNode).selectAll("rect.bandrect").each((function(e){var t=M(e);T(t),t.each((function(){o.raiseToTop(this)}))})),function(e){e.select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}(r.select(e.parentNode))}(u),S(u,"plotly_hover",r.event)),-1===e.parcatsViewModel.hoverinfoItems.indexOf("none")&&("category"===l?t=C(n,s,u):"color"===l?t=function(e,t,n){e._fullLayout._calcInverseTransform(e);var i,a,o=e._fullLayout._invScaleX,s=e._fullLayout._invScaleY,l=n.getBoundingClientRect(),u=r.select(n).datum(),h=u.categoryViewModel,f=h.parcatsViewModel,p=f.model.dimensions[h.model.dimensionInd],d=f.trace,m=l.y+l.height/2;f.dimensions.length>1&&p.displayInd===f.dimensions.length-1?(i=l.left,a="left"):(i=l.left+l.width,a="right");var g=h.model.categoryLabel,y=u.parcatsViewModel.model.count,v=0;u.categoryViewModel.bands.forEach((function(e){e.color===u.color&&(v+=e.count)}));var x=h.model.count,_=0;f.pathSelection.each((function(e){e.model.color===u.color&&(_+=e.model.count)}));var b=v/y,w=v/_,T=v/x,k={countLabel:v,categoryLabel:g,probabilityLabel:b.toFixed(3)},A=[];-1!==h.parcatsViewModel.hoverinfoItems.indexOf("count")&&A.push(["Count:",k.countLabel].join(" ")),-1!==h.parcatsViewModel.hoverinfoItems.indexOf("probability")&&(A.push("P(color ∩ "+g+"): "+k.probabilityLabel),A.push("P("+g+" | color): "+w.toFixed(3)),A.push("P(color | "+g+"): "+T.toFixed(3)));var M=A.join("
"),S=c.mostReadable(u.color,["black","white"]);return{trace:d,x:o*(i-t.left),y:s*(m-t.top),text:M,color:u.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:S,fontSize:10,idealAlign:a,hovertemplate:d.hovertemplate,hovertemplateLabels:k,eventData:[{data:d._input,fullData:d,category:g,count:y,probability:b,categorycount:x,colorcount:_,bandcolorcount:v}]}}(n,s,u):"dimension"===l&&(t=function(e,t,n){var i=[];return r.select(n.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each((function(){i.push(C(e,t,this))})),i}(n,s,u)),t&&a.loneHover(t,{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:n}))}}function L(e){var t=e.parcatsViewModel;t.dragDimension||(w(t.pathSelection),k(t.dimensionSelection.selectAll("g.category")),A(t.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),a.loneUnhover(t.graphDiv._fullLayout._hoverlayer.node()),t.pathSelection.sort(d),-1!==t.hoverinfoItems.indexOf("skip"))||("color"===e.parcatsViewModel.hoveron?E(this,"plotly_unhover",r.event):S(this,"plotly_unhover",r.event))}function P(e){"fixed"!==e.parcatsViewModel.arrangement&&(e.dragDimensionDisplayInd=e.model.displayInd,e.initialDragDimensionDisplayInds=e.parcatsViewModel.model.dimensions.map((function(e){return e.displayInd})),e.dragHasMoved=!1,e.dragCategoryDisplayInd=null,r.select(this).selectAll("g.category").select("rect.catrect").each((function(t){var n=r.mouse(this)[0],i=r.mouse(this)[1];-2<=n&&n<=t.width+2&&-2<=i&&i<=t.height+2&&(e.dragCategoryDisplayInd=t.model.displayInd,e.initialDragCategoryDisplayInds=e.model.categories.map((function(e){return e.displayInd})),t.model.dragY=t.y,o.raiseToTop(this.parentNode),r.select(this.parentNode).selectAll("rect.bandrect").each((function(t){t.yh.y+h.height/2&&(o.model.displayInd=h.model.displayInd,h.model.displayInd=l),e.dragCategoryDisplayInd=o.model.displayInd}if(null===e.dragCategoryDisplayInd||"freeform"===e.parcatsViewModel.arrangement){a.model.dragX=r.event.x;var f=e.parcatsViewModel.dimensions[n],p=e.parcatsViewModel.dimensions[i];void 0!==f&&a.model.dragXp.x&&(a.model.displayInd=p.model.displayInd,p.model.displayInd=e.dragDimensionDisplayInd),e.dragDimensionDisplayInd=a.model.displayInd}V(e.parcatsViewModel),U(e.parcatsViewModel),B(e.parcatsViewModel),R(e.parcatsViewModel)}}function D(e){if("fixed"!==e.parcatsViewModel.arrangement&&null!==e.dragDimensionDisplayInd){r.select(this).selectAll("text").attr("font-weight","normal");var t={},n=O(e.parcatsViewModel),a=e.parcatsViewModel.model.dimensions.map((function(e){return e.displayInd})),o=e.initialDragDimensionDisplayInds.some((function(e,t){return e!==a[t]}));o&&a.forEach((function(r,n){var i=e.parcatsViewModel.model.dimensions[n].containerInd;t["dimensions["+i+"].displayindex"]=r}));var s=!1;if(null!==e.dragCategoryDisplayInd){var l=e.model.categories.map((function(e){return e.displayInd}));if(s=e.initialDragCategoryDisplayInds.some((function(e,t){return e!==l[t]}))){var c=e.model.categories.slice().sort((function(e,t){return e.displayInd-t.displayInd})),u=c.map((function(e){return e.categoryValue})),h=c.map((function(e){return e.categoryLabel}));t["dimensions["+e.model.containerInd+"].categoryarray"]=[u],t["dimensions["+e.model.containerInd+"].ticktext"]=[h],t["dimensions["+e.model.containerInd+"].categoryorder"]="array"}}-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip")&&!e.dragHasMoved&&e.potentialClickBand&&("color"===e.parcatsViewModel.hoveron?E(e.potentialClickBand,"plotly_click",r.event.sourceEvent):S(e.potentialClickBand,"plotly_click",r.event.sourceEvent)),e.model.dragX=null,null!==e.dragCategoryDisplayInd&&(e.parcatsViewModel.dimensions[e.dragDimensionDisplayInd].categories[e.dragCategoryDisplayInd].model.dragY=null,e.dragCategoryDisplayInd=null),e.dragDimensionDisplayInd=null,e.parcatsViewModel.dragDimension=null,e.dragHasMoved=null,e.potentialClickBand=null,V(e.parcatsViewModel),U(e.parcatsViewModel),r.transition().duration(300).ease("cubic-in-out").each((function(){B(e.parcatsViewModel,!0),R(e.parcatsViewModel,!0)})).each("end",(function(){(o||s)&&i.restyle(e.parcatsViewModel.graphDiv,t,[n])}))}}function O(e){for(var t,r=e.graphDiv._fullData,n=0;n=0;s--)u+="C"+c[s]+","+(t[s+1]+i)+" "+l[s]+","+(t[s]+i)+" "+(e[s]+r[s])+","+(t[s]+i),u+="l-"+r[s]+",0 ";return u+"Z"}function U(e){var t=e.dimensions,r=e.model,n=t.map((function(e){return e.categories.map((function(e){return e.y}))})),i=e.model.dimensions.map((function(e){return e.categories.map((function(e){return e.displayInd}))})),a=e.model.dimensions.map((function(e){return e.displayInd})),o=e.dimensions.map((function(e){return e.model.dimensionInd})),s=t.map((function(e){return e.x})),l=t.map((function(e){return e.width})),c=[];for(var u in r.paths)r.paths.hasOwnProperty(u)&&c.push(r.paths[u]);function h(e){var t=e.categoryInds.map((function(e,t){return i[t][e]}));return o.map((function(e){return t[e]}))}c.sort((function(t,r){var n=h(t),i=h(r);return"backward"===e.sortpaths&&(n.reverse(),i.reverse()),n.push(t.valueInds[0]),i.push(r.valueInds[0]),e.bundlecolors&&(n.unshift(t.rawColor),i.unshift(r.rawColor)),ni?1:0}));for(var f=new Array(c.length),p=t[0].model.count,d=t[0].categories.map((function(e){return e.height})).reduce((function(e,t){return e+t})),m=0;m0?d*(v.count/p):0;for(var x=new Array(n.length),_=0;_1?(e.width-80-16)/(n-1):0)*i;var a,o,s,l,c,u=[],h=e.model.maxCats,f=t.categories.length,p=t.count,d=e.height-8*(h-1),m=8*(h-f)/2,g=t.categories.map((function(e){return{displayInd:e.displayInd,categoryInd:e.categoryInd}}));for(g.sort((function(e,t){return e.displayInd-t.displayInd})),c=0;c0?o.count/p*d:0,s={key:o.valueInds[0],model:o,width:16,height:a,y:null!==o.dragY?o.dragY:m,bands:[],parcatsViewModel:e},m=m+a+8,u.push(s);return{key:t.dimensionInd,x:null!==t.dragX?t.dragX:r,y:0,width:16,model:t,categories:u,parcatsViewModel:e,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}t.exports=function(e,t,r,n){h(r,e,n,t)}}}),A_=m({"src/traces/parcats/plot.js"(e,t){var r=k_();t.exports=function(e,t,n,i){var a=e._fullLayout,o=a._paper,s=a._size;r(e,o,t,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},n,i)}}}),M_=m({"src/traces/parcats/base_plot.js"(e){var t=Tt().getModuleCalcData,r=A_(),n="parcats";e.name=n,e.plot=function(e,i,a,o){var s=t(e.calcdata,n);if(s.length){var l=s[0];r(e,l,a,o)}},e.clean=function(e,t,r,n){var i=n._has&&n._has("parcats"),a=t._has&&t._has("parcats");i&&!a&&n._paperdiv.selectAll(".parcats").remove()}}}),S_=m({"src/traces/parcats/index.js"(e,t){t.exports={attributes:b_(),supplyDefaults:w_(),calc:T_(),plot:A_(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:M_(),categories:["noOpacity"],meta:{}}}}),E_=m({"lib/parcats.js"(e,t){t.exports=S_()}}),C_=m({"src/plots/mapbox/constants.js"(e,t){var r=Ye(),n="1.13.4",i='©
OpenStreetMap contributors',a=['© Carto',i].join(" "),o=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),s={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:i,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:a,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:a,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:o,tiles:["https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:o,tiles:["https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),tiles:["https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"}},l=r(s);t.exports={requiredVersion:n,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:s,styleValuesNonMapbox:l,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install @plotly/mapbox-gl@"+n+"."].join("\n"),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:"," Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });","More info here: https://www.mapbox.com/help/define-access-token/"].join("\n"),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",l.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join("\n"),multipleTokensErrorMsg:["Set multiple mapbox access token across different mapbox subplot,","using first token found as mapbox-gl does not allow multipleaccess tokens on the same page."].join("\n"),mapOnErrorMsg:"Mapbox error.",mapboxLogo:{path0:"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z",path1:"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z",path2:"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z",polygon:"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34"},styleRules:{map:"overflow:hidden;position:relative;","missing-css":"display:none;",canary:"background-color:salmon;","ctrl-bottom-left":"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;","ctrl-bottom-right":"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;",ctrl:"clear: both; pointer-events: auto; transform: translate(0, 0);","ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner":"display: none;","ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner":"display: block; margin-top:2px","ctrl-attrib.mapboxgl-compact:hover":"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;","ctrl-attrib.mapboxgl-compact::after":'content: ""; cursor: pointer; position: absolute; background-image: url(\'data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E\'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;',"ctrl-attrib.mapboxgl-compact":"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;","ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":'display:block; width: 21px; height: 21px; background-image: url(\'data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E\')'}}}}),I_=m({"src/plots/mapbox/layout_attributes.js"(e,t){var r=ct(),n=W().defaultLine,i=Ma().attributes,a=j(),o=kn().textposition,s=De().overrideAll,l=vt().templatedArray,c=C_(),u=a({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});u.family.dflt="Open Sans Regular, Arial Unicode MS Regular",(t.exports=s({_arrayAttrRegexps:[r.counterRegex("mapbox",".layers",!0)],domain:i({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:c.styleValuesMapbox.concat(c.styleValuesNonMapbox),dflt:c.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:l("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:n},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:n}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:u,textposition:r.extendFlat({},o,{arrayOk:!1})}})},"plot","from-root")).uirevision={valType:"any",editType:"none"}}}),L_=m({"src/traces/scattermapbox/attributes.js"(e,t){var{hovertemplateAttrs:r,texttemplateAttrs:n,templatefallbackAttrs:i}=Fe(),a=Tn(),o=sg(),s=kn(),l=I_(),c=q(),u=zt(),h=B().extendFlat,f=De().overrideAll,p=I_(),d=o.line,m=o.marker;t.exports=f({lon:o.lon,lat:o.lat,cluster:{enabled:{valType:"boolean"},maxzoom:h({},p.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:h({},m.opacity,{dflt:1})},mode:h({},s.mode,{dflt:"markers"}),text:h({},s.text,{}),texttemplate:n({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:i({editType:"plot"}),hovertext:h({},s.hovertext,{}),line:{color:d.color,width:d.width},connectgaps:s.connectgaps,marker:h({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:m.opacity,size:m.size,sizeref:m.sizeref,sizemin:m.sizemin,sizemode:m.sizemode},u("marker")),fill:o.fill,fillcolor:a(),textfont:l.layers.symbol.textfont,textposition:l.layers.symbol.textposition,below:{valType:"string"},selected:{marker:s.selected.marker},unselected:{marker:s.unselected.marker},hoverinfo:h({},c.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:r(),hovertemplatefallback:i()},"calc","nested")}}),P_=m({"src/traces/scattermapbox/constants.js"(e,t){var r=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];t.exports={isSupportedFont:function(e){return-1!==r.indexOf(e)}}}}),z_=m({"src/traces/scattermapbox/defaults.js"(e,t){var r=ct(),n=Xt(),i=Yn(),a=Xn(),o=Kn(),s=Jn(),l=L_(),c=P_().isSupportedFont;t.exports=function(e,t,u,h){function f(n,i){return r.coerce(e,t,l,n,i)}function p(n,i){return r.coerce2(e,t,l,n,i)}var d=function(e,t,r){var n=r("lon")||[],i=r("lat")||[],a=Math.min(n.length,i.length);return t._length=a,a}(0,t,f);if(d){if(f("text"),f("texttemplate"),f("texttemplatefallback"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback"),f("mode"),f("below"),n.hasMarkers(t)){i(e,t,u,h,f,{noLine:!0,noAngle:!0}),f("marker.allowoverlap"),f("marker.angle");var m=t.marker;"circle"!==m.symbol&&(r.isArrayOrTypedArray(m.size)&&(m.size=m.size[0]),r.isArrayOrTypedArray(m.color)&&(m.color=m.color[0]))}n.hasLines(t)&&(a(e,t,u,h,f,{noDash:!0}),f("connectgaps"));var g=p("cluster.maxzoom"),y=p("cluster.step"),v=p("cluster.color",t.marker&&t.marker.color||u),x=p("cluster.size"),_=p("cluster.opacity");if(f("cluster.enabled",!1!==g||!1!==y||!1!==v||!1!==x||!1!==_)||n.hasText(t)){var b=h.font.family;o(e,t,h,f,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:c(b)?b:"Open Sans Regular",weight:h.font.weight,style:h.font.style,size:h.font.size,color:h.font.color}})}f("fill"),"none"!==t.fill&&s(e,t,u,f),r.coerceSelectionMarkerOpacity(t,f)}else t.visible=!1}}}),D_=m({"src/traces/scattermapbox/format_labels.js"(e,t){var r=ar();t.exports=function(e,t,n){var i={},a=n[t.subplot]._subplot.mockAxis,o=e.lonlat;return i.lonLabel=r.tickText(a,a.c2l(o[0]),!0).text,i.latLabel=r.tickText(a,a.c2l(o[1]),!0).text,i}}}),O_=m({"src/plots/mapbox/convert_text_opts.js"(e,t){var r=ct();t.exports=function(e,t){var n=e.split(" "),i=n[0],a=n[1],o=r.isArrayOrTypedArray(t)?r.mean(t):t,s=.5+o/100,l=1.5+o/100,c=["",""],u=[0,0];switch(i){case"top":c[0]="top",u[1]=-l;break;case"bottom":c[0]="bottom",u[1]=l}switch(a){case"left":c[1]="right",u[0]=-s;break;case"right":c[1]="left",u[0]=s}return{anchor:c[0]&&c[1]?c.join("-"):c[0]?c[0]:c[1]?c[1]:"center",offset:u}}}}),R_=m({"src/traces/scattermapbox/convert.js"(e,t){var r=M(),n=ct(),i=S().BADNUM,a=dg(),o=Yt(),s=er(),l=$t(),c=Xt(),u=P_().isSupportedFont,h=O_(),f=Kt().appendArrayPointValue,p=Et().NEWLINES,d=Et().BR_TAG_ALL;function m(e){return{type:e,geojson:a.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function g(e,t){return n.isArrayOrTypedArray(e)?t?function(t){return r(e[t])?+e[t]:0}:function(t){return e[t]}:e?function(){return e}:y}function y(){return""}function v(e){return e[0]===i}function x(e,t){var r;if(n.isArrayOrTypedArray(e)&&n.isArrayOrTypedArray(t)){r=["step",["get","point_count"],e[0]];for(var i=1;i850?" Black":i>750?" Extra Bold":i>650?" Bold":i>550?" Semi Bold":i>450?" Medium":i>350?" Regular":i>250?" Light":i>150?" Extra Light":" Thin"):"Open Sans"===a.slice(0,2).join(" ")?(s="Open Sans",s+=i>750?" Extrabold":i>650?" Bold":i>550?" Semibold":i>350?" Regular":" Light"):"Klokantech Noto Sans"===a.slice(0,3).join(" ")&&(s="Klokantech Noto Sans","CJK"===a[3]&&(s+=" CJK"),s+=i>500?" Bold":" Regular")),o&&(s+=" Italic"),"Open Sans Regular Italic"===s?s="Open Sans Italic":"Open Sans Regular Bold"===s?s="Open Sans Bold":"Open Sans Regular Bold Italic"===s?s="Open Sans Bold Italic":"Klokantech Noto Sans Regular Italic"===s&&(s="Klokantech Noto Sans Italic"),u(s)||(s=r),s.split(", ")}t.exports=function(e,t){var i,u=t[0].trace,b=!0===u.visible&&0!==u._length,w="none"!==u.fill,T=c.hasLines(u),k=c.hasMarkers(u),A=c.hasText(u),M=k&&"circle"===u.marker.symbol,S=k&&"circle"!==u.marker.symbol,E=u.cluster&&u.cluster.enabled,C=m("fill"),I=m("line"),L=m("circle"),P=m("symbol"),z={fill:C,line:I,circle:L,symbol:P};if(!b)return z;if((w||T)&&(i=a.calcTraceToLineCoords(t)),w&&(C.geojson=a.makePolygon(i),C.layout.visibility="visible",n.extendFlat(C.paint,{"fill-color":u.fillcolor})),T&&(I.geojson=a.makeLine(i),I.layout.visibility="visible",n.extendFlat(I.paint,{"line-width":u.line.width,"line-color":u.line.color,"line-opacity":u.opacity})),M){var D=function(e){var t,i,a,c,u=e[0].trace,h=u.marker,f=u.selectedpoints,p=n.isArrayOrTypedArray(h.color),d=n.isArrayOrTypedArray(h.size),m=n.isArrayOrTypedArray(h.opacity);function g(e){return u.opacity*e}p&&(i=o.hasColorscale(u,"marker")?o.makeColorScaleFuncFromTrace(h):n.identity),d&&(a=l(u)),m&&(c=function(e){return g(r(e)?+n.constrain(e,0,1):0)});var y,x=[];for(t=0;t=0;r--){var n=t[r];i.removeLayer(u.layerIds[n])}e||i.removeSource(u.sourceIds.circle)}(e):function(e){for(var t=a.nonCluster,r=t.length-1;r>=0;r--){var n=t[r];i.removeLayer(u.layerIds[n]),e||i.removeSource(u.sourceIds[n])}}(e)}function f(e){l?function(e){e||u.addSource("circle",o.circle,t.cluster);for(var r=a.cluster,n=0;n=0;r--){var n=t[r];e.removeLayer(this.layerIds[n]),e.removeSource(this.sourceIds[n])}},t.exports=function(e,t){var r,i,s,l=t[0].trace,c=l.cluster&&l.cluster.enabled,u=!0!==l.visible,h=new o(e,l.uid,c,u),f=n(e.gd,t),p=h.below=e.belowLookup["trace-"+l.uid];if(c)for(h.addSource("circle",f.circle,l.cluster),r=0;r")}function u(e){return e+"°"}}t.exports={hoverPoints:function(e,t,a){var c=e.cd,u=c[0].trace,h=e.xa,f=e.ya,p=e.subplot,d=[],m=s+u.uid+"-circle",g=u.cluster&&u.cluster.enabled;if(g){var y=p.map.queryRenderedFeatures(null,{layers:[m]});d=y.map((function(e){return e.id}))}var v=360*(t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360)),x=t-v;if(r.getClosest(c,(function(e){var t=e.lonlat;if(t[0]===o||g&&-1===d.indexOf(e.i+1))return 1/0;var r=n.modHalf(t[0],360),i=t[1],s=p.project([r,i]),l=s.x-h.c2p([x,i]),c=s.y-f.c2p([r,a]),u=Math.max(3,e.mrc||0);return Math.max(Math.sqrt(l*l+c*c)-u,1-3/u)}),e),!1!==e.index){var _=c[e.index],b=_.lonlat,w=[n.modHalf(b[0],360)+v,b[1]],T=h.c2p(w),k=f.c2p(w),A=_.mrc||1;e.x0=T-A,e.x1=T+A,e.y0=k-A,e.y1=k+A;var M={};M[u.subplot]={_subplot:p};var S=u._module.formatLabels(_,u,M);return e.lonLabel=S.lonLabel,e.latLabel=S.latLabel,e.color=i(u,_),e.extraText=l(u,_,c[0].t.labels),e.hovertemplate=u.hovertemplate,[e]}},getExtraText:l}}}),j_=m({"src/traces/scattermapbox/event_data.js"(e,t){t.exports=function(e,t){return e.lon=t.lon,e.lat=t.lat,e}}}),N_=m({"src/traces/scattermapbox/select.js"(e,t){var r=ct(),n=Xt(),i=S().BADNUM;t.exports=function(e,t){var a,o=e.cd,s=e.xaxis,l=e.yaxis,c=[],u=o[0].trace;if(!n.hasMarkers(u))return[];if(!1===t)for(a=0;a"u"&&(t=1e-6),i=e,o=0;o<8;o++){if(a=this.sampleCurveX(i)-e,Math.abs(a)(n=1))return n;for(;ra?r=i:n=i,i=.5*(n-r)+r}return i},i.prototype.solve=function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))};var a=o;function o(e,t){this.x=e,this.y=t}o.prototype={clone:function(){return new o(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,r=e.y-this.y;return t*t+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[0]*this.x+e[1]*this.y,r=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=r,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),r=Math.sin(e),n=t*this.x-r*this.y,i=r*this.x+t*this.y;return this.x=n,this.y=i,this},_rotateAround:function(e,t){var r=Math.cos(e),n=Math.sin(e),i=t.x+r*(this.x-t.x)-n*(this.y-t.y),a=t.y+n*(this.x-t.x)+r*(this.y-t.y);return this.x=i,this.y=a,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},o.convert=function(e){return e instanceof o?e:Array.isArray(e)?new o(e[0],e[1]):e};var s=typeof self<"u"?self:{},l=Math.pow(2,53)-1;function c(e,t,r,i){var a=new n(e,t,r,i);return function(e){return a.solve(e)}}var u=c(.25,.1,.25,1);function h(e,t,r){return Math.min(r,Math.max(t,e))}function f(e,t,r){var n=r-t,i=((e-t)%n+n)%n+t;return i===t?r:i}function p(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];for(var n=0,i=t;n>t/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,e)}()}function y(e){return!!e&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)}function v(e,t){e.forEach((function(e){t[e]&&(t[e]=t[e].bind(t))}))}function x(e,t){return-1!==e.indexOf(t,e.length-t.length)}function _(e,t,r){var n={};for(var i in e)n[i]=t.call(r||this,e[i],i,e);return n}function b(e,t,r){var n={};for(var i in e)t.call(r||this,e[i],i,e)&&(n[i]=e[i]);return n}function w(e){return Array.isArray(e)?e.map(w):"object"==typeof e&&e?_(e,w):e}var T={};function k(e){T[e]||(typeof console<"u"&&console.warn(e),T[e]=!0)}function A(e,t,r){return(r.y-e.y)*(t.x-e.x)>(t.y-e.y)*(r.x-e.x)}function M(e){for(var t=0,r=0,n=e.length,i=n-1,a=void 0,o=void 0;r@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(function(e,r,n,i){var a=n||i;return t[r]=!a||a.toLowerCase(),""})),t["max-age"]){var r=parseInt(t["max-age"],10);isNaN(r)?delete t["max-age"]:t["max-age"]=r}return t}var C=null;function I(e){if(null==C){var t=e.navigator?e.navigator.userAgent:null;C=!!e.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return C}function L(e){try{var t=s[e];return t.setItem("_mapbox_test_",1),t.removeItem("_mapbox_test_"),!0}catch{return!1}}var P,z,D,O,R=s.performance&&s.performance.now?s.performance.now.bind(s.performance):Date.now.bind(Date),F=s.requestAnimationFrame||s.mozRequestAnimationFrame||s.webkitRequestAnimationFrame||s.msRequestAnimationFrame,B=s.cancelAnimationFrame||s.mozCancelAnimationFrame||s.webkitCancelAnimationFrame||s.msCancelAnimationFrame,j={now:R,frame:function(e){var t=F(e);return{cancel:function(){return B(t)}}},getImageData:function(e,t){void 0===t&&(t=0);var r=s.document.createElement("canvas"),n=r.getContext("2d");if(!n)throw new Error("failed to create canvas 2d context");return r.width=e.width,r.height=e.height,n.drawImage(e,0,0,e.width,e.height),n.getImageData(-t,-t,e.width+2*t,e.height+2*t)},resolveURL:function(e){return P||(P=s.document.createElement("a")),P.href=e,P.href},hardwareConcurrency:s.navigator&&s.navigator.hardwareConcurrency||4,get devicePixelRatio(){return s.devicePixelRatio},get prefersReducedMotion(){return!!s.matchMedia&&(null==z&&(z=s.matchMedia("(prefers-reduced-motion: reduce)")),z.matches)}},N={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf("https://api.mapbox.cn")?"https://events.mapbox.cn/events/v2":0===this.API_URL.indexOf("https://api.mapbox.com")?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},U={supported:!1,testSupport:function(e){V||!O||(q?H(e):D=e)}},V=!1,q=!1;function H(e){var t=e.createTexture();e.bindTexture(e.TEXTURE_2D,t);try{if(e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,O),e.isContextLost())return;U.supported=!0}catch{}e.deleteTexture(t),V=!0}s.document&&((O=s.document.createElement("img")).onload=function(){D&&H(D),D=null,q=!0},O.onerror=function(){V=!0,D=null},O.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var G="01",W=function(e,t){this._transformRequestFn=e,this._customAccessToken=t,this._createSkuToken()};function Z(e){return 0===e.indexOf("mapbox:")}W.prototype._createSkuToken=function(){var e=function(){for(var e="",t=0;t<10;t++)e+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",G,e].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=e.token,this._skuTokenExpiresAt=e.tokenExpiresAt},W.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},W.prototype.transformRequest=function(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}},W.prototype.normalizeStyleURL=function(e,t){if(!Z(e))return e;var r=K(e);return r.path="/styles/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||t)},W.prototype.normalizeGlyphsURL=function(e,t){if(!Z(e))return e;var r=K(e);return r.path="/fonts/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||t)},W.prototype.normalizeSourceURL=function(e,t){if(!Z(e))return e;var r=K(e);return r.path="/v4/"+r.authority+".json",r.params.push("secure"),this._makeAPIURL(r,this._customAccessToken||t)},W.prototype.normalizeSpriteURL=function(e,t,r,n){var i=K(e);return Z(e)?(i.path="/styles/v1"+i.path+"/sprite"+t+r,this._makeAPIURL(i,this._customAccessToken||n)):(i.path+=""+t+r,J(i))},W.prototype.normalizeTileURL=function(e,t){if(this._isSkuTokenExpired()&&this._createSkuToken(),e&&!Z(e))return e;var r=K(e),n=j.devicePixelRatio>=2||512===t?"@2x":"",i=U.supported?".webp":"$1";r.path=r.path.replace(/(\.(png|jpg)\d*)(?=$)/,""+n+i),r.path=r.path.replace(/^.+\/v4\//,"/"),r.path="/v4"+r.path;var a=this._customAccessToken||function(e){for(var t=0,r=e;t=0&&e.params.splice(i,1)}if("/"!==n.path&&(e.path=""+n.path+e.path),!N.REQUIRE_ACCESS_TOKEN)return J(e);if(!(t=t||N.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+r);if("s"===t[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+r);return e.params=e.params.filter((function(e){return-1===e.indexOf("access_token")})),e.params.push("access_token="+t),J(e)};var Y=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function X(e){return Y.test(e)}var $=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function K(e){var t=e.match($);if(!t)throw new Error("Unable to parse URL object");return{protocol:t[1],authority:t[2],path:t[3]||"/",params:t[4]?t[4].split("&"):[]}}function J(e){var t=e.params.length?"?"+e.params.join("&"):"";return e.protocol+"://"+e.authority+e.path+t}var Q="mapbox.eventData";function ee(e){if(!e)return null;var t=e.split(".");if(!t||3!==t.length)return null;try{var r=JSON.parse(function(e){return decodeURIComponent(s.atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}(t[1]));return r}catch{return null}}var te=function(e){this.type=e,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};te.prototype.getStorageKey=function(e){var t,r=ee(N.ACCESS_TOKEN),n="";return r&&r.u?(t=r.u,n=s.btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode(+("0x"+t))})))):n=N.ACCESS_TOKEN||"",e?Q+"."+e+":"+n:Q+":"+n},te.prototype.fetchEventData=function(){var e=L("localStorage"),t=this.getStorageKey(),r=this.getStorageKey("uuid");if(e)try{var n=s.localStorage.getItem(t);n&&(this.eventData=JSON.parse(n));var i=s.localStorage.getItem(r);i&&(this.anonId=i)}catch{k("Unable to read from LocalStorage")}},te.prototype.saveEventData=function(){var e=L("localStorage"),t=this.getStorageKey(),r=this.getStorageKey("uuid");if(e)try{s.localStorage.setItem(r,this.anonId),Object.keys(this.eventData).length>=1&&s.localStorage.setItem(t,JSON.stringify(this.eventData))}catch{k("Unable to write to LocalStorage")}},te.prototype.processRequests=function(e){},te.prototype.postEvent=function(e,t,n,i){var a=this;if(N.EVENTS_URL){var o=K(N.EVENTS_URL);o.params.push("access_token="+(i||N.ACCESS_TOKEN||""));var s={event:this.type,created:new Date(e).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:r,skuId:G,userId:this.anonId},l=t?p(s,t):s,c={url:J(o),headers:{"Content-Type":"text/plain"},body:JSON.stringify([l])};this.pendingRequest=ke(c,(function(e){a.pendingRequest=null,n(e),a.saveEventData(),a.processRequests(i)}))}},te.prototype.queueRequest=function(e,t){this.queue.push(e),this.processRequests(t)};var re,ne,ie=function(e){function t(){e.call(this,"map.load"),this.success={},this.skuToken=""}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.postMapLoadEvent=function(e,t,r,n){this.skuToken=r,(N.EVENTS_URL&&n||N.ACCESS_TOKEN&&Array.isArray(e)&&e.some((function(e){return Z(e)||X(e)})))&&this.queueRequest({id:t,timestamp:Date.now()},n)},t.prototype.processRequests=function(e){var t=this;if(!this.pendingRequest&&0!==this.queue.length){var r=this.queue.shift(),n=r.id,i=r.timestamp;n&&this.success[n]||(this.anonId||this.fetchEventData(),y(this.anonId)||(this.anonId=g()),this.postEvent(i,{skuToken:this.skuToken},(function(e){e||n&&(t.success[n]=!0)}),e))}},t}(te),ae=function(e){function t(t){e.call(this,"appUserTurnstile"),this._customAccessToken=t}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.postTurnstileEvent=function(e,t){N.EVENTS_URL&&N.ACCESS_TOKEN&&Array.isArray(e)&&e.some((function(e){return Z(e)||X(e)}))&&this.queueRequest(Date.now(),t)},t.prototype.processRequests=function(e){var t=this;if(!this.pendingRequest&&0!==this.queue.length){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var r=ee(N.ACCESS_TOKEN),n=r?r.u:N.ACCESS_TOKEN,i=n!==this.eventData.tokenU;y(this.anonId)||(this.anonId=g(),i=!0);var a=this.queue.shift();if(this.eventData.lastSuccess){var o=new Date(this.eventData.lastSuccess),s=new Date(a),l=(a-this.eventData.lastSuccess)/864e5;i=i||l>=1||l<-1||o.getDate()!==s.getDate()}else i=!0;if(!i)return this.processRequests();this.postEvent(a,{"enabled.telemetry":!1},(function(e){e||(t.eventData.lastSuccess=a,t.eventData.tokenU=n)}),e)}},t}(te),oe=new ae,se=oe.postTurnstileEvent.bind(oe),le=new ie,ce=le.postMapLoadEvent.bind(le),ue="mapbox-tiles",he=500,fe=50;function pe(){s.caches&&!re&&(re=s.caches.open(ue))}function de(e){var t=e.indexOf("?");return t<0?e:e.slice(0,t)}var me,ge=1/0;function ye(){return null==me&&(me=s.OffscreenCanvas&&new s.OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof s.createImageBitmap),me}var ve={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(ve);var xe=function(e){function t(t,r,n){401===r&&X(n)&&(t+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),e.call(this,t),this.status=r,this.url=n,this.name=this.constructor.name,this.message=t}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},t}(Error),_e=S()?function(){return self.worker&&self.worker.referrer}:function(){return("blob:"===s.location.protocol?s.parent:s).location.href};function be(e,t){var r=new s.AbortController,n=new s.Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,referrer:_e(),signal:r.signal}),i=!1,a=!1,o=function(e){return e.indexOf("sku=")>0&&X(e)}(n.url);"json"===e.type&&n.headers.set("Accept","application/json");var l=function(r,i,l){if(!a){if(r&&"SecurityError"!==r.message&&k(r),i&&l)return c(i);var u=Date.now();s.fetch(n).then((function(r){if(r.ok){var n=o?r.clone():null;return c(r,n,u)}return t(new xe(r.statusText,r.status,e.url))})).catch((function(e){20!==e.code&&t(new Error(e.message))}))}},c=function(r,o,l){("arrayBuffer"===e.type?r.arrayBuffer():"json"===e.type?r.json():r.text()).then((function(e){a||(o&&l&&function(e,t,r){if(pe(),re){var n={status:t.status,statusText:t.statusText,headers:new s.Headers};t.headers.forEach((function(e,t){return n.headers.set(t,e)}));var i=E(t.headers.get("Cache-Control")||"");i["no-store"]||(i["max-age"]&&n.headers.set("Expires",new Date(r+1e3*i["max-age"]).toUTCString()),new Date(n.headers.get("Expires")).getTime()-r<42e4||function(e,t){if(void 0===ne)try{new Response(new ReadableStream),ne=!0}catch{ne=!1}ne?t(e.body):e.blob().then(t)}(t,(function(t){var r=new s.Response(t,n);pe(),re&&re.then((function(t){return t.put(de(e.url),r)})).catch((function(e){return k(e.message)}))})))}}(n,o,l),i=!0,t(null,e,r.headers.get("Cache-Control"),r.headers.get("Expires")))})).catch((function(e){a||t(new Error(e.message))}))};return o?function(e,t){if(pe(),!re)return t(null);var r=de(e.url);re.then((function(e){e.match(r).then((function(n){var i=function(e){if(!e)return!1;var t=new Date(e.headers.get("Expires")||0),r=E(e.headers.get("Cache-Control")||"");return t>Date.now()&&!r["no-cache"]}(n);e.delete(r),i&&e.put(r,n.clone()),t(null,n,i)})).catch(t)})).catch(t)}(n,l):l(null,null),{cancel:function(){a=!0,i||r.abort()}}}var we=function(e,t){if(!function(e){return/^file:/.test(e)||/^file:/.test(_e())&&!/^\w+:/.test(e)}(e.url)){if(s.fetch&&s.Request&&s.AbortController&&s.Request.prototype.hasOwnProperty("signal"))return be(e,t);if(S()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",e,t,void 0,!0)}return function(e,t){var r=new s.XMLHttpRequest;for(var n in r.open(e.method||"GET",e.url,!0),"arrayBuffer"===e.type&&(r.responseType="arraybuffer"),e.headers)r.setRequestHeader(n,e.headers[n]);return"json"===e.type&&(r.responseType="text",r.setRequestHeader("Accept","application/json")),r.withCredentials="include"===e.credentials,r.onerror=function(){t(new Error(r.statusText))},r.onload=function(){if((r.status>=200&&r.status<300||0===r.status)&&null!==r.response){var n=r.response;if("json"===e.type)try{n=JSON.parse(r.response)}catch(e){return t(e)}t(null,n,r.getResponseHeader("Cache-Control"),r.getResponseHeader("Expires"))}else t(new xe(r.statusText,r.status,e.url))},r.send(e.body),{cancel:function(){return r.abort()}}}(e,t)},Te=function(e,t){return we(p(e,{type:"arrayBuffer"}),t)},ke=function(e,t){return we(p(e,{method:"POST"}),t)};function Ae(e){var t=s.document.createElement("a");return t.href=e,t.protocol===s.document.location.protocol&&t.host===s.document.location.host}var Me,Se,Ee="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";Me=[],Se=0;var Ce=function(e,t){if(U.supported&&(e.headers||(e.headers={}),e.headers.accept="image/webp,*/*"),Se>=N.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:e,callback:t,cancelled:!1,cancel:function(){this.cancelled=!0}};return Me.push(r),r}Se++;var n=!1,i=function(){if(!n)for(n=!0,Se--;Me.length&&Se0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e)},De.prototype.setEventedParent=function(e,t){return this._eventedParent=e,this._eventedParentData=t,this};var Oe={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}},Re=function(e,t,r,n){this.message=(e?e+": ":"")+r,n&&(this.identifier=n),null!=t&&t.__line__&&(this.line=t.__line__)};function Fe(e){var t=e.key,r=e.value;return r?[new Re(t,r,"constants have been deprecated as of v8")]:[]}function Be(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];for(var n=0,i=t;n":"value"===e.itemType.kind?"array":"array<"+t+">"}return e.kind}var tt=[qe,He,Ge,We,Ze,Ke,Ye,Qe(Xe),Je];function rt(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!rt(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(var r=0,n=tt;r255?255:e}function i(e){return e<0?0:e>1?1:e}function a(e){return"%"===e[e.length-1]?n(parseFloat(e)/100*255):n(parseInt(e))}function o(e){return"%"===e[e.length-1]?i(parseFloat(e)/100):i(parseFloat(e))}function s(e,t,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?e+(t-e)*r*6:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}try{t.parseCSSColor=function(e){var t,i=e.replace(/ /g,"").toLowerCase();if(i in r)return r[i].slice();if("#"===i[0])return 4===i.length?(t=parseInt(i.substr(1),16))>=0&&t<=4095?[(3840&t)>>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===i.length&&(t=parseInt(i.substr(1),16))>=0&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var l=i.indexOf("("),c=i.indexOf(")");if(-1!==l&&c+1===i.length){var u=i.substr(0,l),h=i.substr(l+1,c-(l+1)).split(","),f=1;switch(u){case"rgba":if(4!==h.length)return null;f=o(h.pop());case"rgb":return 3!==h.length?null:[a(h[0]),a(h[1]),a(h[2]),f];case"hsla":if(4!==h.length)return null;f=o(h.pop());case"hsl":if(3!==h.length)return null;var p=(parseFloat(h[0])%360+360)%360/360,d=o(h[1]),m=o(h[2]),g=m<=.5?m*(d+1):m+d-m*d,y=2*m-g;return[n(255*s(y,g,p+1/3)),n(255*s(y,g,p)),n(255*s(y,g,p-1/3)),f];default:return null}}return null}}catch{}})).parseCSSColor,ot=function(e,t,r,n){void 0===n&&(n=1),this.r=e,this.g=t,this.b=r,this.a=n};ot.parse=function(e){if(e){if(e instanceof ot)return e;if("string"==typeof e){var t=at(e);if(t)return new ot(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3])}}},ot.prototype.toString=function(){var e=this.toArray(),t=e[0],r=e[1],n=e[2],i=e[3];return"rgba("+Math.round(t)+","+Math.round(r)+","+Math.round(n)+","+i+")"},ot.prototype.toArray=function(){var e=this,t=e.r,r=e.g,n=e.b,i=e.a;return 0===i?[0,0,0,0]:[255*t/i,255*r/i,255*n/i,i]},ot.black=new ot(0,0,0,1),ot.white=new ot(1,1,1,1),ot.transparent=new ot(0,0,0,0),ot.red=new ot(1,0,0,1);var st=function(e,t,r){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};st.prototype.compare=function(e,t){return this.collator.compare(e,t)},st.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var lt=function(e,t,r,n,i){this.text=e,this.image=t,this.scale=r,this.fontStack=n,this.textColor=i},ct=function(e){this.sections=e};ct.fromString=function(e){return new ct([new lt(e,null,null,null,null)])},ct.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(e){return 0!==e.text.length||e.image&&0!==e.image.name.length}))},ct.factory=function(e){return e instanceof ct?e:ct.fromString(e)},ct.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(e){return e.text})).join("")},ct.prototype.serialize=function(){for(var e=["format"],t=0,r=this.sections;t=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof r&&r>=0&&r<=255?typeof n>"u"||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[e,t,r,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[e,t,r,n]:[e,t,r]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function ft(e){if(null===e)return!0;if("string"==typeof e)return!0;if("boolean"==typeof e)return!0;if("number"==typeof e)return!0;if(e instanceof ot)return!0;if(e instanceof st)return!0;if(e instanceof ct)return!0;if(e instanceof ut)return!0;if(Array.isArray(e)){for(var t=0,r=e;t2){var s=e[1];if("string"!=typeof s||!(s in yt)||"object"===s)return t.error('The item type argument of "array" must be one of string, number, boolean',1);a=yt[s],n++}else a=Xe;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);o=e[2],n++}r=Qe(a,o)}else r=yt[i];for(var l=[];n1)&&t.push(n)}}return t.concat(this.args.map((function(e){return e.serialize()})))};var xt=function(e){this.type=Ke,this.sections=e};xt.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var r=e[1];if(!Array.isArray(r)&&"object"==typeof r)return t.error("First argument must be an image or text section.");for(var n=[],i=!1,a=1;a<=e.length-1;++a){var o=e[a];if(i&&"object"==typeof o&&!Array.isArray(o)){i=!1;var s=null;if(o["font-scale"]&&!(s=t.parse(o["font-scale"],1,He)))return null;var l=null;if(o["text-font"]&&!(l=t.parse(o["text-font"],1,Qe(Ge))))return null;var c=null;if(o["text-color"]&&!(c=t.parse(o["text-color"],1,Ze)))return null;var u=n[n.length-1];u.scale=s,u.font=l,u.textColor=c}else{var h=t.parse(e[a],1,Xe);if(!h)return null;var f=h.type.kind;if("string"!==f&&"value"!==f&&"null"!==f&&"resolvedImage"!==f)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,n.push({content:h,scale:null,font:null,textColor:null})}}return new xt(n)},xt.prototype.evaluate=function(e){return new ct(this.sections.map((function(t){var r=t.content.evaluate(e);return pt(r)===Je?new lt("",r,null,null,null):new lt(dt(r),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)})))},xt.prototype.eachChild=function(e){for(var t=0,r=this.sections;t-1),r},_t.prototype.eachChild=function(e){e(this.input)},_t.prototype.outputDefined=function(){return!1},_t.prototype.serialize=function(){return["image",this.input.serialize()]};var bt={"to-boolean":We,"to-color":Ze,"to-number":He,"to-string":Ge},wt=function(e,t){this.type=e,this.args=t};wt.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var r=e[0];if(("to-boolean"===r||"to-string"===r)&&2!==e.length)return t.error("Expected one argument.");for(var n=bt[r],i=[],a=1;a4?"Invalid rbga value "+JSON.stringify(t)+": expected an array containing either three or four numeric values.":ht(t[0],t[1],t[2],t[3])))return new ot(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new gt(r||"Could not parse color from value '"+("string"==typeof t?t:String(JSON.stringify(t)))+"'")}if("number"===this.type.kind){for(var o=null,s=0,l=this.args;s=t[2]||e[1]<=t[1]||e[3]>=t[3])}function It(e,t){var r=function(e){return(180+e)/360}(e[0]),n=function(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}(e[1]),i=Math.pow(2,t.z);return[Math.round(r*i*St),Math.round(n*i*St)]}function Lt(e,t,r){var n=e[0]-t[0],i=e[1]-t[1],a=e[0]-r[0],o=e[1]-r[1];return n*o-a*i==0&&n*a<=0&&i*o<=0}function Pt(e,t,r){return t[1]>e[1]!=r[1]>e[1]&&e[0]<(r[0]-t[0])*(e[1]-t[1])/(r[1]-t[1])+t[0]}function zt(e,t){for(var r=!1,n=0,i=t.length;n0&&h<0||u<0&&h>0}function Rt(e,t,r,n){var i=[t[0]-e[0],t[1]-e[1]];return 0!==function(e,t){return e[0]*t[1]-e[1]*t[0]}([n[0]-r[0],n[1]-r[1]],i)&&!(!Ot(e,t,r,n)||!Ot(r,n,e,t))}function Ft(e,t,r){for(var n=0,i=r;nr[2]){var i=.5*n,a=e[0]-r[0]>i?-n:r[0]-e[0]>i?n:0;0===a&&(a=e[0]-r[2]>i?-n:r[2]-e[0]>i?n:0),e[0]+=a}Et(t,e)}function qt(e,t,r,n){for(var i=Math.pow(2,n.z)*St,a=[n.x*St,n.y*St],o=[],s=0,l=e;s=0)return!1;var r=!0;return e.eachChild((function(e){r&&!Yt(e,t)&&(r=!1)})),r}Gt.parse=function(e,t){if(2!==e.length)return t.error("'within' expression requires exactly one argument, but found "+(e.length-1)+" instead.");if(ft(e[1])){var r=e[1];if("FeatureCollection"===r.type)for(var n=0;nt))throw new gt("Input is not a number.");o=s-1}return 0}$t.prototype.parse=function(e,t,r,n,i){return void 0===i&&(i={}),t?this.concat(t,r,n)._parse(e,i):this._parse(e,i)},$t.prototype._parse=function(e,t){function r(e,t,r){return"assert"===r?new vt(t,[e]):"coerce"===r?new wt(t,[e]):e}if((null===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e)&&(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=e[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var i=this.registry[n];if(i){var a=i.parse(e,this);if(!a)return null;if(this.expectedType){var o=this.expectedType,s=a.type;if("string"!==o.kind&&"number"!==o.kind&&"boolean"!==o.kind&&"object"!==o.kind&&"array"!==o.kind||"value"!==s.kind)if("color"!==o.kind&&"formatted"!==o.kind&&"resolvedImage"!==o.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(o,s))return null}else a=r(a,o,t.typeAnnotation||"coerce");else a=r(a,o,t.typeAnnotation||"assert")}if(!(a instanceof mt)&&"resolvedImage"!==a.type.kind&&Kt(a)){var l=new kt;try{a=new mt(a.type,a.evaluate(l))}catch(e){return this.error(e.message),null}}return a}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return typeof e>"u"?this.error("'undefined' value invalid. Use null instead."):"object"==typeof e?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof e+" instead.")},$t.prototype.concat=function(e,t,r){var n="number"==typeof e?this.path.concat(e):this.path,i=r?this.scope.concat(r):this.scope;return new $t(this.registry,n,t||null,i,this.errors)},$t.prototype.error=function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];var n=""+this.key+t.map((function(e){return"["+e+"]"})).join("");this.errors.push(new Ue(n,e))},$t.prototype.checkSubtype=function(e,t){var r=rt(e,t);return r&&this.error(r),r};var Qt=function(e,t,r){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(var n=0,i=r;n=o)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var u=t.parse(s,c,i);if(!u)return null;i=i||u.type,n.push([o,u])}return new Qt(i,r,n)},Qt.prototype.evaluate=function(e){var t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);var i=t.length;return n>=t[i-1]?r[i-1].evaluate(e):r[Jt(t,n)].evaluate(e)},Qt.prototype.eachChild=function(e){e(this.input);for(var t=0,r=this.outputs;t0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e};var tr=Object.freeze({__proto__:null,number:er,color:function(e,t,r){return new ot(er(e.r,t.r,r),er(e.g,t.g,r),er(e.b,t.b,r),er(e.a,t.a,r))},array:function(e,t,r){return e.map((function(e,n){return er(e,t[n],r)}))}}),rr=.95047,nr=1.08883,ir=4/29,ar=6/29,or=3*ar*ar,sr=ar*ar*ar,lr=Math.PI/180,cr=180/Math.PI;function ur(e){return e>sr?Math.pow(e,1/3):e/or+ir}function hr(e){return e>ar?e*e*e:or*(e-ir)}function fr(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function pr(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function dr(e){var t=pr(e.r),r=pr(e.g),n=pr(e.b),i=ur((.4124564*t+.3575761*r+.1804375*n)/rr),a=ur((.2126729*t+.7151522*r+.072175*n)/1);return{l:116*a-16,a:500*(i-a),b:200*(a-ur((.0193339*t+.119192*r+.9503041*n)/nr)),alpha:e.a}}function mr(e){var t=(e.l+16)/116,r=isNaN(e.a)?t:t+e.a/500,n=isNaN(e.b)?t:t-e.b/200;return t=1*hr(t),r=rr*hr(r),n=nr*hr(n),new ot(fr(3.2404542*r-1.5371385*t-.4985314*n),fr(-.969266*r+1.8760108*t+.041556*n),fr(.0556434*r-.2040259*t+1.0572252*n),e.alpha)}function gr(e,t,r){var n=t-e;return e+r*(n>180||n<-180?n-360*Math.round(n/360):n)}var yr={forward:dr,reverse:mr,interpolate:function(e,t,r){return{l:er(e.l,t.l,r),a:er(e.a,t.a,r),b:er(e.b,t.b,r),alpha:er(e.alpha,t.alpha,r)}}},vr={forward:function(e){var t=dr(e),r=t.l,n=t.a,i=t.b,a=Math.atan2(i,n)*cr;return{h:a<0?a+360:a,c:Math.sqrt(n*n+i*i),l:r,alpha:e.a}},reverse:function(e){var t=e.h*lr,r=e.c;return mr({l:e.l,a:Math.cos(t)*r,b:Math.sin(t)*r,alpha:e.alpha})},interpolate:function(e,t,r){return{h:gr(e.h,t.h,r),c:er(e.c,t.c,r),l:er(e.l,t.l,r),alpha:er(e.alpha,t.alpha,r)}}},xr=Object.freeze({__proto__:null,lab:yr,hcl:vr}),_r=function(e,t,r,n,i){this.type=e,this.operator=t,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(var a=0,o=i;a1})))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:s}}if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(!(i=t.parse(i,2,He)))return null;var l=[],c=null;"interpolate-hcl"===r||"interpolate-lab"===r?c=Ze:t.expectedType&&"value"!==t.expectedType.kind&&(c=t.expectedType);for(var u=0;u=h)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',p);var m=t.parse(f,d,c);if(!m)return null;c=c||m.type,l.push([h,m])}return"number"===c.kind||"color"===c.kind||"array"===c.kind&&"number"===c.itemType.kind&&"number"==typeof c.N?new _r(c,r,n,i,l):t.error("Type "+et(c)+" is not interpolatable.")},_r.prototype.evaluate=function(e){var t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);var i=t.length;if(n>=t[i-1])return r[i-1].evaluate(e);var a=Jt(t,n),o=t[a],s=t[a+1],l=_r.interpolationFactor(this.interpolation,n,o,s),c=r[a].evaluate(e),u=r[a+1].evaluate(e);return"interpolate"===this.operator?tr[this.type.kind.toLowerCase()](c,u,l):"interpolate-hcl"===this.operator?vr.reverse(vr.interpolate(vr.forward(c),vr.forward(u),l)):yr.reverse(yr.interpolate(yr.forward(c),yr.forward(u),l))},_r.prototype.eachChild=function(e){e(this.input);for(var t=0,r=this.outputs;t=r.length)throw new gt("Array index out of bounds: "+t+" > "+(r.length-1)+".");if(t!==Math.floor(t))throw new gt("Array index must be an integer, but found "+t+" instead.");return r[t]},kr.prototype.eachChild=function(e){e(this.index),e(this.input)},kr.prototype.outputDefined=function(){return!1},kr.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Ar=function(e,t){this.type=We,this.needle=e,this.haystack=t};Ar.parse=function(e,t){if(3!==e.length)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1,Xe),n=t.parse(e[2],2,Xe);return r&&n?nt(r.type,[We,Ge,He,qe,Xe])?new Ar(r,n):t.error("Expected first argument to be of type boolean, string, number or null, but found "+et(r.type)+" instead"):null},Ar.prototype.evaluate=function(e){var t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!r)return!1;if(!it(t,["boolean","string","number","null"]))throw new gt("Expected first argument to be of type boolean, string, number or null, but found "+et(pt(t))+" instead.");if(!it(r,["string","array"]))throw new gt("Expected second argument to be of type array or string, but found "+et(pt(r))+" instead.");return r.indexOf(t)>=0},Ar.prototype.eachChild=function(e){e(this.needle),e(this.haystack)},Ar.prototype.outputDefined=function(){return!0},Ar.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var Mr=function(e,t,r){this.type=He,this.needle=e,this.haystack=t,this.fromIndex=r};Mr.parse=function(e,t){if(e.length<=2||e.length>=5)return t.error("Expected 3 or 4 arguments, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1,Xe),n=t.parse(e[2],2,Xe);if(!r||!n)return null;if(!nt(r.type,[We,Ge,He,qe,Xe]))return t.error("Expected first argument to be of type boolean, string, number or null, but found "+et(r.type)+" instead");if(4===e.length){var i=t.parse(e[3],3,He);return i?new Mr(r,n,i):null}return new Mr(r,n)},Mr.prototype.evaluate=function(e){var t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!it(t,["boolean","string","number","null"]))throw new gt("Expected first argument to be of type boolean, string, number or null, but found "+et(pt(t))+" instead.");if(!it(r,["string","array"]))throw new gt("Expected second argument to be of type array or string, but found "+et(pt(r))+" instead.");if(this.fromIndex){var n=this.fromIndex.evaluate(e);return r.indexOf(t,n)}return r.indexOf(t)},Mr.prototype.eachChild=function(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)},Mr.prototype.outputDefined=function(){return!1},Mr.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Sr=function(e,t,r,n,i,a){this.inputType=e,this.type=t,this.input=r,this.cases=n,this.outputs=i,this.otherwise=a};Sr.parse=function(e,t){if(e.length<5)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if(e.length%2!=1)return t.error("Expected an even number of arguments.");var r,n;t.expectedType&&"value"!==t.expectedType.kind&&(n=t.expectedType);for(var i={},a=[],o=2;oNumber.MAX_SAFE_INTEGER)return c.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof f&&Math.floor(f)!==f)return c.error("Numeric branch labels must be integer values.");if(r){if(c.checkSubtype(r,pt(f)))return null}else r=pt(f);if(typeof i[String(f)]<"u")return c.error("Branch labels must be unique.");i[String(f)]=a.length}var p=t.parse(l,o,n);if(!p)return null;n=n||p.type,a.push(p)}var d=t.parse(e[1],1,Xe);if(!d)return null;var m=t.parse(e[e.length-1],e.length-1,n);return!m||"value"!==d.type.kind&&t.concat(1).checkSubtype(r,d.type)?null:new Sr(r,n,d,i,a,m)},Sr.prototype.evaluate=function(e){var t=this.input.evaluate(e);return(pt(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)},Sr.prototype.eachChild=function(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)},Sr.prototype.outputDefined=function(){return this.outputs.every((function(e){return e.outputDefined()}))&&this.otherwise.outputDefined()},Sr.prototype.serialize=function(){for(var e=this,t=["match",this.input.serialize()],r=[],n={},i=0,a=Object.keys(this.cases).sort();i=5)return t.error("Expected 3 or 4 arguments, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1,Xe),n=t.parse(e[2],2,He);if(!r||!n)return null;if(!nt(r.type,[Qe(Xe),Ge,Xe]))return t.error("Expected first argument to be of type array or string, but found "+et(r.type)+" instead");if(4===e.length){var i=t.parse(e[3],3,He);return i?new Cr(r.type,r,n,i):null}return new Cr(r.type,r,n)},Cr.prototype.evaluate=function(e){var t=this.input.evaluate(e),r=this.beginIndex.evaluate(e);if(!it(t,["string","array"]))throw new gt("Expected first argument to be of type array or string, but found "+et(pt(t))+" instead.");if(this.endIndex){var n=this.endIndex.evaluate(e);return t.slice(r,n)}return t.slice(r)},Cr.prototype.eachChild=function(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)},Cr.prototype.outputDefined=function(){return!1},Cr.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var zr=Pr("==",(function(e,t,r){return t===r}),Lr),Dr=Pr("!=",(function(e,t,r){return t!==r}),(function(e,t,r,n){return!Lr(0,t,r,n)})),Or=Pr("<",(function(e,t,r){return t",(function(e,t,r){return t>r}),(function(e,t,r,n){return n.compare(t,r)>0})),Fr=Pr("<=",(function(e,t,r){return t<=r}),(function(e,t,r,n){return n.compare(t,r)<=0})),Br=Pr(">=",(function(e,t,r){return t>=r}),(function(e,t,r,n){return n.compare(t,r)>=0})),jr=function(e,t,r,n,i){this.type=Ge,this.number=e,this.locale=t,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=i};jr.parse=function(e,t){if(3!==e.length)return t.error("Expected two arguments.");var r=t.parse(e[1],1,He);if(!r)return null;var n=e[2];if("object"!=typeof n||Array.isArray(n))return t.error("NumberFormat options argument must be an object.");var i=null;if(n.locale&&!(i=t.parse(n.locale,1,Ge)))return null;var a=null;if(n.currency&&!(a=t.parse(n.currency,1,Ge)))return null;var o=null;if(n["min-fraction-digits"]&&!(o=t.parse(n["min-fraction-digits"],1,He)))return null;var s=null;return n["max-fraction-digits"]&&!(s=t.parse(n["max-fraction-digits"],1,He))?null:new jr(r,i,a,o,s)},jr.prototype.evaluate=function(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))},jr.prototype.eachChild=function(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)},jr.prototype.outputDefined=function(){return!1},jr.prototype.serialize=function(){var e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]};var Nr=function(e){this.type=He,this.input=e};Nr.parse=function(e,t){if(2!==e.length)return t.error("Expected 1 argument, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?t.error("Expected argument of type string or array, but found "+et(r.type)+" instead."):new Nr(r):null},Nr.prototype.evaluate=function(e){var t=this.input.evaluate(e);if("string"==typeof t)return t.length;if(Array.isArray(t))return t.length;throw new gt("Expected value to be of type string or array, but found "+et(pt(t))+" instead.")},Nr.prototype.eachChild=function(e){e(this.input)},Nr.prototype.outputDefined=function(){return!1},Nr.prototype.serialize=function(){var e=["length"];return this.eachChild((function(t){e.push(t.serialize())})),e};var Ur={"==":zr,"!=":Dr,">":Rr,"<":Or,">=":Br,"<=":Fr,array:vt,at:kr,boolean:vt,case:Er,coalesce:wr,collator:Mt,format:xt,image:_t,in:Ar,"index-of":Mr,interpolate:_r,"interpolate-hcl":_r,"interpolate-lab":_r,length:Nr,let:Tr,literal:mt,match:Sr,number:vt,"number-format":jr,object:vt,slice:Cr,step:Qt,string:vt,"to-boolean":wt,"to-color":wt,"to-number":wt,"to-string":wt,var:Xt,within:Gt};function Vr(e,t){var r=t[0],n=t[1],i=t[2],a=t[3];r=r.evaluate(e),n=n.evaluate(e),i=i.evaluate(e);var o=a?a.evaluate(e):1,s=ht(r,n,i,o);if(s)throw new gt(s);return new ot(r/255*o,n/255*o,i/255*o,o)}function qr(e,t){return e in t}function Hr(e,t){var r=t[e];return typeof r>"u"?null:r}function Gr(e){return{type:e}}function Wr(e){return{result:"success",value:e}}function Zr(e){return{result:"error",value:e}}function Yr(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function Xr(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function $r(e){return!!e.expression&&e.expression.interpolated}function Kr(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}function Jr(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function Qr(e){return e}function en(e,t){var r,n,i,a="color"===t.type,o=e.stops&&"object"==typeof e.stops[0][0],s=o||void 0!==e.property,l=o||!s,c=e.type||($r(t)?"exponential":"interval");if(a&&((e=Be({},e)).stops&&(e.stops=e.stops.map((function(e){return[e[0],ot.parse(e[1])]}))),e.default?e.default=ot.parse(e.default):e.default=ot.parse(t.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!xr[e.colorSpace])throw new Error("Unknown color space: "+e.colorSpace);if("exponential"===c)r=an;else if("interval"===c)r=nn;else if("categorical"===c){r=rn,n=Object.create(null);for(var u=0,h=e.stops;u=e.stops[n-1][0])return e.stops[n-1][1];var i=Jt(e.stops.map((function(e){return e[0]})),r);return e.stops[i][1]}function an(e,t,r){var n=void 0!==e.base?e.base:1;if("number"!==Kr(r))return tn(e.default,t.default);var i=e.stops.length;if(1===i||r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[i-1][0])return e.stops[i-1][1];var a=Jt(e.stops.map((function(e){return e[0]})),r),o=function(e,t,r,n){var i=n-r,a=e-r;return 0===i?0:1===t?a/i:(Math.pow(t,a)-1)/(Math.pow(t,i)-1)}(r,n,e.stops[a][0],e.stops[a+1][0]),s=e.stops[a][1],l=e.stops[a+1][1],c=tr[t.type]||Qr;if(e.colorSpace&&"rgb"!==e.colorSpace){var u=xr[e.colorSpace];c=function(e,t){return u.reverse(u.interpolate(u.forward(e),u.forward(t),o))}}return"function"==typeof s.evaluate?{evaluate:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=s.evaluate.apply(void 0,e),n=l.evaluate.apply(void 0,e);if(void 0!==r&&void 0!==n)return c(r,n,o)}}:c(s,l,o)}function on(e,t,r){return"color"===t.type?r=ot.parse(r):"formatted"===t.type?r=ct.fromString(r.toString()):"resolvedImage"===t.type?r=ut.fromString(r.toString()):Kr(r)!==t.type&&("enum"!==t.type||!t.values[r])&&(r=void 0),tn(r,e.default,t.default)}At.register(Ur,{error:[{kind:"error"},[Ge],function(e,t){var r=t[0];throw new gt(r.evaluate(e))}],typeof:[Ge,[Xe],function(e,t){return et(pt(t[0].evaluate(e)))}],"to-rgba":[Qe(He,4),[Ze],function(e,t){return t[0].evaluate(e).toArray()}],rgb:[Ze,[He,He,He],Vr],rgba:[Ze,[He,He,He,He],Vr],has:{type:We,overloads:[[[Ge],function(e,t){return qr(t[0].evaluate(e),e.properties())}],[[Ge,Ye],function(e,t){var r=t[0],n=t[1];return qr(r.evaluate(e),n.evaluate(e))}]]},get:{type:Xe,overloads:[[[Ge],function(e,t){return Hr(t[0].evaluate(e),e.properties())}],[[Ge,Ye],function(e,t){var r=t[0],n=t[1];return Hr(r.evaluate(e),n.evaluate(e))}]]},"feature-state":[Xe,[Ge],function(e,t){return Hr(t[0].evaluate(e),e.featureState||{})}],properties:[Ye,[],function(e){return e.properties()}],"geometry-type":[Ge,[],function(e){return e.geometryType()}],id:[Xe,[],function(e){return e.id()}],zoom:[He,[],function(e){return e.globals.zoom}],"heatmap-density":[He,[],function(e){return e.globals.heatmapDensity||0}],"line-progress":[He,[],function(e){return e.globals.lineProgress||0}],accumulated:[Xe,[],function(e){return void 0===e.globals.accumulated?null:e.globals.accumulated}],"+":[He,Gr(He),function(e,t){for(var r=0,n=0,i=t;n":[We,[Ge,Xe],function(e,t){var r=t[0],n=t[1],i=e.properties()[r.value],a=n.value;return typeof i==typeof a&&i>a}],"filter-id->":[We,[Xe],function(e,t){var r=t[0],n=e.id(),i=r.value;return typeof n==typeof i&&n>i}],"filter-<=":[We,[Ge,Xe],function(e,t){var r=t[0],n=t[1],i=e.properties()[r.value],a=n.value;return typeof i==typeof a&&i<=a}],"filter-id-<=":[We,[Xe],function(e,t){var r=t[0],n=e.id(),i=r.value;return typeof n==typeof i&&n<=i}],"filter->=":[We,[Ge,Xe],function(e,t){var r=t[0],n=t[1],i=e.properties()[r.value],a=n.value;return typeof i==typeof a&&i>=a}],"filter-id->=":[We,[Xe],function(e,t){var r=t[0],n=e.id(),i=r.value;return typeof n==typeof i&&n>=i}],"filter-has":[We,[Xe],function(e,t){return t[0].value in e.properties()}],"filter-has-id":[We,[],function(e){return null!==e.id()&&void 0!==e.id()}],"filter-type-in":[We,[Qe(Ge)],function(e,t){return t[0].value.indexOf(e.geometryType())>=0}],"filter-id-in":[We,[Qe(Xe)],function(e,t){return t[0].value.indexOf(e.id())>=0}],"filter-in-small":[We,[Ge,Qe(Xe)],function(e,t){var r=t[0];return t[1].value.indexOf(e.properties()[r.value])>=0}],"filter-in-large":[We,[Ge,Qe(Xe)],function(e,t){var r=t[0],n=t[1];return function(e,t,r,n){for(;r<=n;){var i=r+n>>1;if(t[i]===e)return!0;t[i]>e?n=i-1:r=i+1}return!1}(e.properties()[r.value],n.value,0,n.value.length-1)}],all:{type:We,overloads:[[[We,We],function(e,t){var r=t[0],n=t[1];return r.evaluate(e)&&n.evaluate(e)}],[Gr(We),function(e,t){for(var r=0,n=t;r0&&"string"==typeof e[0]&&e[0]in Ur}function cn(e,t){var r=new $t(Ur,[],t?function(e){var t={color:Ze,string:Ge,number:He,enum:Ge,boolean:We,formatted:Ke,resolvedImage:Je};return"array"===e.type?Qe(t[e.value]||Xe,e.length):t[e.type]}(t):void 0),n=r.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return n?Wr(new sn(n,t)):Zr(r.errors)}sn.prototype.evaluateWithoutErrorHandling=function(e,t,r,n,i,a){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=r,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)},sn.prototype.evaluate=function(e,t,r,n,i,a){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=r||null,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a||null;try{var o=this.expression.evaluate(this._evaluator);if(null==o||"number"==typeof o&&o!=o)return this._defaultValue;if(this._enumValues&&!(o in this._enumValues))throw new gt("Expected value to be one of "+Object.keys(this._enumValues).map((function(e){return JSON.stringify(e)})).join(", ")+", but found "+JSON.stringify(o)+" instead.");return o}catch(e){return this._warningHistory[e.message]||(this._warningHistory[e.message]=!0,typeof console<"u"&&console.warn(e.message)),this._defaultValue}};var un=function(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!Zt(t.expression)};un.prototype.evaluateWithoutErrorHandling=function(e,t,r,n,i,a){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,n,i,a)},un.prototype.evaluate=function(e,t,r,n,i,a){return this._styleExpression.evaluate(e,t,r,n,i,a)};var hn=function(e,t,r,n){this.kind=e,this.zoomStops=r,this._styleExpression=t,this.isStateDependent="camera"!==e&&!Zt(t.expression),this.interpolationType=n};function fn(e,t){if("error"===(e=cn(e,t)).result)return e;var r=e.value.expression,n=Wt(r);if(!n&&!Yr(t))return Zr([new Ue("","data expressions not supported")]);var i=Yt(r,["zoom"]);if(!i&&!Xr(t))return Zr([new Ue("","zoom expressions not supported")]);var a=dn(r);if(!a&&!i)return Zr([new Ue("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(a instanceof Ue)return Zr([a]);if(a instanceof _r&&!$r(t))return Zr([new Ue("",'"interpolate" expressions cannot be used with this property')]);if(!a)return Wr(new un(n?"constant":"source",e.value));var o=a instanceof _r?a.interpolation:void 0;return Wr(new hn(n?"camera":"composite",e.value,a.labels,o))}hn.prototype.evaluateWithoutErrorHandling=function(e,t,r,n,i,a){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,n,i,a)},hn.prototype.evaluate=function(e,t,r,n,i,a){return this._styleExpression.evaluate(e,t,r,n,i,a)},hn.prototype.interpolationFactor=function(e,t,r){return this.interpolationType?_r.interpolationFactor(this.interpolationType,e,t,r):0};var pn=function(e,t){this._parameters=e,this._specification=t,Be(this,en(this._parameters,this._specification))};function dn(e){var t=null;if(e instanceof Tr)t=dn(e.result);else if(e instanceof wr)for(var r=0,n=e.args;rn.maximum?[new Re(t,r,r+" is greater than the maximum value "+n.maximum)]:[]}function vn(e){var t,r,n,i=e.valueSpec,a=je(e.value.type),o={},s="categorical"!==a&&void 0===e.value.property,l=!s,c="array"===Kr(e.value.stops)&&"array"===Kr(e.value.stops[0])&&"object"===Kr(e.value.stops[0][0]),u=mn({key:e.key,value:e.value,valueSpec:e.styleSpec.function,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:function(e){if("identity"===a)return[new Re(e.key,e.value,'identity function may not have a "stops" property')];var t=[],r=e.value;return t=t.concat(gn({key:e.key,value:r,valueSpec:e.valueSpec,style:e.style,styleSpec:e.styleSpec,arrayElementValidator:h})),"array"===Kr(r)&&0===r.length&&t.push(new Re(e.key,r,"array must have at least one stop")),t},default:function(e){return Vn({key:e.key,value:e.value,valueSpec:i,style:e.style,styleSpec:e.styleSpec})}}});return"identity"===a&&s&&u.push(new Re(e.key,e.value,'missing required property "property"')),"identity"!==a&&!e.value.stops&&u.push(new Re(e.key,e.value,'missing required property "stops"')),"exponential"===a&&e.valueSpec.expression&&!$r(e.valueSpec)&&u.push(new Re(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(l&&!Yr(e.valueSpec)?u.push(new Re(e.key,e.value,"property functions not supported")):s&&!Xr(e.valueSpec)&&u.push(new Re(e.key,e.value,"zoom functions not supported"))),("categorical"===a||c)&&void 0===e.value.property&&u.push(new Re(e.key,e.value,'"property" property is required')),u;function h(e){var t=[],a=e.value,s=e.key;if("array"!==Kr(a))return[new Re(s,a,"array expected, "+Kr(a)+" found")];if(2!==a.length)return[new Re(s,a,"array length 2 expected, length "+a.length+" found")];if(c){if("object"!==Kr(a[0]))return[new Re(s,a,"object expected, "+Kr(a[0])+" found")];if(void 0===a[0].zoom)return[new Re(s,a,"object stop key must have zoom")];if(void 0===a[0].value)return[new Re(s,a,"object stop key must have value")];if(n&&n>je(a[0].zoom))return[new Re(s,a[0].zoom,"stop zoom values must appear in ascending order")];je(a[0].zoom)!==n&&(n=je(a[0].zoom),r=void 0,o={}),t=t.concat(mn({key:s+"[0]",value:a[0],valueSpec:{zoom:{}},style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:yn,value:f}}))}else t=t.concat(f({key:s+"[0]",value:a[0],valueSpec:{},style:e.style,styleSpec:e.styleSpec},a));return ln(Ne(a[1]))?t.concat([new Re(s+"[1]",a[1],"expressions are not allowed in function stops.")]):t.concat(Vn({key:s+"[1]",value:a[1],valueSpec:i,style:e.style,styleSpec:e.styleSpec}))}function f(e,n){var s=Kr(e.value),l=je(e.value),c=null!==e.value?e.value:n;if(t){if(s!==t)return[new Re(e.key,c,s+" stop domain type must match previous stop domain type "+t)]}else t=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new Re(e.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==a){var u="number expected, "+s+" found";return Yr(i)&&void 0===a&&(u+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Re(e.key,c,u)]}return"categorical"!==a||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==a&&"number"===s&&void 0!==r&&l=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&("string"!=typeof e[1]||Array.isArray(e[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(var t=0,r=e.slice(1);tt?1:0}function An(e){if(!Array.isArray(e))return!1;if("within"===e[0])return!0;for(var t=1;t"===t||"<="===t||">="===t?Sn(e[1],e[2],t):"any"===t?function(e){return["any"].concat(e.map(Mn))}(e.slice(1)):"all"===t?["all"].concat(e.slice(1).map(Mn)):"none"===t?["all"].concat(e.slice(1).map(Mn).map(In)):"in"===t?En(e[1],e.slice(2)):"!in"===t?In(En(e[1],e.slice(2))):"has"===t?Cn(e[1]):"!has"===t?In(Cn(e[1])):"within"!==t||e}function Sn(e,t,r){switch(e){case"$type":return["filter-type-"+r,t];case"$id":return["filter-id-"+r,t];default:return["filter-"+r,e,t]}}function En(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((function(e){return typeof e!=typeof t[0]}))?["filter-in-large",e,["literal",t.sort(kn)]]:["filter-in-small",e,["literal",t]]}}function Cn(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function In(e){return["!",e]}function Ln(e){return bn(Ne(e.value))?xn(Be({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Pn(e)}function Pn(e){var t=e.value,r=e.key;if("array"!==Kr(t))return[new Re(r,t,"array expected, "+Kr(t)+" found")];var n,i=e.styleSpec,a=[];if(t.length<1)return[new Re(r,t,"filter array must have at least 1 element")];switch(a=a.concat(_n({key:r+"[0]",value:t[0],valueSpec:i.filter_operator,style:e.style,styleSpec:e.styleSpec})),je(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&"$type"===je(t[1])&&a.push(new Re(r,t,'"$type" cannot be use with operator "'+t[0]+'"'));case"==":case"!=":3!==t.length&&a.push(new Re(r,t,'filter array for operator "'+t[0]+'" must have 3 elements'));case"in":case"!in":t.length>=2&&"string"!==(n=Kr(t[1]))&&a.push(new Re(r+"[1]",t[1],"string expected, "+n+" found"));for(var o=2;o=u[p+0]&&n>=u[p+1])?(o[f]=!0,a.push(c[f])):o[f]=!1}}},ei.prototype._forEachCell=function(e,t,r,n,i,a,o,s){for(var l=this._convertToCellCoord(e),c=this._convertToCellCoord(t),u=this._convertToCellCoord(r),h=this._convertToCellCoord(n),f=l;f<=u;f++)for(var p=c;p<=h;p++){var d=this.d*p+f;if((!s||s(this._convertFromCellCoord(f),this._convertFromCellCoord(p),this._convertFromCellCoord(f+1),this._convertFromCellCoord(p+1)))&&i.call(this,e,t,r,n,d,a,o,s))return}},ei.prototype._convertFromCellCoord=function(e){return(e-this.padding)/this.scale},ei.prototype._convertToCellCoord=function(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))},ei.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var e=this.cells,t=Qn+this.cells.length+1+1,r=0,n=0;n=0)){var h=e[u];c[u]=ni[l].shallow.indexOf(u)>=0?h:li(h,t)}e instanceof Error&&(c.message=e.message)}if(c.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==l&&(c.$name=l),c}throw new Error("can't serialize object of type "+typeof e)}function ci(e){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||oi(e)||si(e)||ArrayBuffer.isView(e)||e instanceof ti)return e;if(Array.isArray(e))return e.map(ci);if("object"==typeof e){var t=e.$name||"Object",r=ni[t].klass;if(!r)throw new Error("can't deserialize unregistered class "+t);if(r.deserialize)return r.deserialize(e);for(var n=Object.create(r.prototype),i=0,a=Object.keys(e);i=0?s:ci(s)}}return n}throw new Error("can't deserialize object of type "+typeof e)}var ui=function(){this.first=!0};ui.prototype.update=function(e,t){var r=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=t):this.lastFloorZoom=128&&e<=255},Arabic:function(e){return e>=1536&&e<=1791},"Arabic Supplement":function(e){return e>=1872&&e<=1919},"Arabic Extended-A":function(e){return e>=2208&&e<=2303},"Hangul Jamo":function(e){return e>=4352&&e<=4607},"Unified Canadian Aboriginal Syllabics":function(e){return e>=5120&&e<=5759},Khmer:function(e){return e>=6016&&e<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(e){return e>=6320&&e<=6399},"General Punctuation":function(e){return e>=8192&&e<=8303},"Letterlike Symbols":function(e){return e>=8448&&e<=8527},"Number Forms":function(e){return e>=8528&&e<=8591},"Miscellaneous Technical":function(e){return e>=8960&&e<=9215},"Control Pictures":function(e){return e>=9216&&e<=9279},"Optical Character Recognition":function(e){return e>=9280&&e<=9311},"Enclosed Alphanumerics":function(e){return e>=9312&&e<=9471},"Geometric Shapes":function(e){return e>=9632&&e<=9727},"Miscellaneous Symbols":function(e){return e>=9728&&e<=9983},"Miscellaneous Symbols and Arrows":function(e){return e>=11008&&e<=11263},"CJK Radicals Supplement":function(e){return e>=11904&&e<=12031},"Kangxi Radicals":function(e){return e>=12032&&e<=12255},"Ideographic Description Characters":function(e){return e>=12272&&e<=12287},"CJK Symbols and Punctuation":function(e){return e>=12288&&e<=12351},Hiragana:function(e){return e>=12352&&e<=12447},Katakana:function(e){return e>=12448&&e<=12543},Bopomofo:function(e){return e>=12544&&e<=12591},"Hangul Compatibility Jamo":function(e){return e>=12592&&e<=12687},Kanbun:function(e){return e>=12688&&e<=12703},"Bopomofo Extended":function(e){return e>=12704&&e<=12735},"CJK Strokes":function(e){return e>=12736&&e<=12783},"Katakana Phonetic Extensions":function(e){return e>=12784&&e<=12799},"Enclosed CJK Letters and Months":function(e){return e>=12800&&e<=13055},"CJK Compatibility":function(e){return e>=13056&&e<=13311},"CJK Unified Ideographs Extension A":function(e){return e>=13312&&e<=19903},"Yijing Hexagram Symbols":function(e){return e>=19904&&e<=19967},"CJK Unified Ideographs":function(e){return e>=19968&&e<=40959},"Yi Syllables":function(e){return e>=40960&&e<=42127},"Yi Radicals":function(e){return e>=42128&&e<=42191},"Hangul Jamo Extended-A":function(e){return e>=43360&&e<=43391},"Hangul Syllables":function(e){return e>=44032&&e<=55215},"Hangul Jamo Extended-B":function(e){return e>=55216&&e<=55295},"Private Use Area":function(e){return e>=57344&&e<=63743},"CJK Compatibility Ideographs":function(e){return e>=63744&&e<=64255},"Arabic Presentation Forms-A":function(e){return e>=64336&&e<=65023},"Vertical Forms":function(e){return e>=65040&&e<=65055},"CJK Compatibility Forms":function(e){return e>=65072&&e<=65103},"Small Form Variants":function(e){return e>=65104&&e<=65135},"Arabic Presentation Forms-B":function(e){return e>=65136&&e<=65279},"Halfwidth and Fullwidth Forms":function(e){return e>=65280&&e<=65519}};function fi(e){for(var t=0,r=e;t=65097&&e<=65103)||hi["CJK Compatibility Ideographs"](e)||hi["CJK Compatibility"](e)||hi["CJK Radicals Supplement"](e)||hi["CJK Strokes"](e)||hi["CJK Symbols and Punctuation"](e)&&!(e>=12296&&e<=12305)&&!(e>=12308&&e<=12319)&&12336!==e||hi["CJK Unified Ideographs Extension A"](e)||hi["CJK Unified Ideographs"](e)||hi["Enclosed CJK Letters and Months"](e)||hi["Hangul Compatibility Jamo"](e)||hi["Hangul Jamo Extended-A"](e)||hi["Hangul Jamo Extended-B"](e)||hi["Hangul Jamo"](e)||hi["Hangul Syllables"](e)||hi.Hiragana(e)||hi["Ideographic Description Characters"](e)||hi.Kanbun(e)||hi["Kangxi Radicals"](e)||hi["Katakana Phonetic Extensions"](e)||hi.Katakana(e)&&12540!==e||!(!hi["Halfwidth and Fullwidth Forms"](e)||65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||!(!hi["Small Form Variants"](e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||hi["Unified Canadian Aboriginal Syllabics"](e)||hi["Unified Canadian Aboriginal Syllabics Extended"](e)||hi["Vertical Forms"](e)||hi["Yijing Hexagram Symbols"](e)||hi["Yi Syllables"](e)||hi["Yi Radicals"](e))}function gi(e){return!(mi(e)||function(e){return!!(hi["Latin-1 Supplement"](e)&&(167===e||169===e||174===e||177===e||188===e||189===e||190===e||215===e||247===e)||hi["General Punctuation"](e)&&(8214===e||8224===e||8225===e||8240===e||8241===e||8251===e||8252===e||8258===e||8263===e||8264===e||8265===e||8273===e)||hi["Letterlike Symbols"](e)||hi["Number Forms"](e)||hi["Miscellaneous Technical"](e)&&(e>=8960&&e<=8967||e>=8972&&e<=8991||e>=8996&&e<=9e3||9003===e||e>=9085&&e<=9114||e>=9150&&e<=9165||9167===e||e>=9169&&e<=9179||e>=9186&&e<=9215)||hi["Control Pictures"](e)&&9251!==e||hi["Optical Character Recognition"](e)||hi["Enclosed Alphanumerics"](e)||hi["Geometric Shapes"](e)||hi["Miscellaneous Symbols"](e)&&!(e>=9754&&e<=9759)||hi["Miscellaneous Symbols and Arrows"](e)&&(e>=11026&&e<=11055||e>=11088&&e<=11097||e>=11192&&e<=11243)||hi["CJK Symbols and Punctuation"](e)||hi.Katakana(e)||hi["Private Use Area"](e)||hi["CJK Compatibility Forms"](e)||hi["Small Form Variants"](e)||hi["Halfwidth and Fullwidth Forms"](e)||8734===e||8756===e||8757===e||e>=9984&&e<=10087||e>=10102&&e<=10131||65532===e||65533===e)}(e))}function yi(e){return hi.Arabic(e)||hi["Arabic Supplement"](e)||hi["Arabic Extended-A"](e)||hi["Arabic Presentation Forms-A"](e)||hi["Arabic Presentation Forms-B"](e)}function vi(e){return e>=1424&&e<=2303||hi["Arabic Presentation Forms-A"](e)||hi["Arabic Presentation Forms-B"](e)}function xi(e,t){return!(!t&&vi(e)||e>=2304&&e<=3583||e>=3840&&e<=4255||hi.Khmer(e))}function _i(e){for(var t=0,r=e;t-1&&(Ai="error"),ki&&ki(e)};function Ei(){Ci.fire(new Pe("pluginStateChange",{pluginStatus:Ai,pluginURL:Mi}))}var Ci=new De,Ii=function(){return Ai},Li=function(){if(Ai!==bi||!Mi)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Ai=wi,Ei(),Mi&&Te({url:Mi},(function(e){e?Si(e):(Ai=Ti,Ei())}))},Pi={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Ai===Ti||null!=Pi.applyArabicShaping},isLoading:function(){return Ai===wi},setState:function(e){Ai=e.pluginStatus,Mi=e.pluginURL},isParsed:function(){return null!=Pi.applyArabicShaping&&null!=Pi.processBidirectionalText&&null!=Pi.processStyledBidirectionalText},getPluginURL:function(){return Mi}},zi=function(e,t){this.zoom=e,t?(this.now=t.now,this.fadeDuration=t.fadeDuration,this.zoomHistory=t.zoomHistory,this.transition=t.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new ui,this.transition={})};zi.prototype.isSupportedScript=function(e){return function(e,t){for(var r=0,n=e;rthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*t}};var Di=function(e,t){this.property=e,this.value=t,this.expression=function(e,t){if(Jr(e))return new pn(e,t);if(ln(e)){var r=fn(e,t);if("error"===r.result)throw new Error(r.value.map((function(e){return e.key+": "+e.message})).join(", "));return r.value}var n=e;return"string"==typeof e&&"color"===t.type&&(n=ot.parse(e)),{kind:"constant",evaluate:function(){return n}}}(void 0===t?e.specification.default:t,e.specification)};Di.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},Di.prototype.possiblyEvaluate=function(e,t,r){return this.property.possiblyEvaluate(this,e,t,r)};var Oi=function(e){this.property=e,this.value=new Di(e,void 0)};Oi.prototype.transitioned=function(e,t){return new Fi(this.property,this.value,t,p({},e.transition,this.transition),e.now)},Oi.prototype.untransitioned=function(){return new Fi(this.property,this.value,null,{},0)};var Ri=function(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)};Ri.prototype.getValue=function(e){return w(this._values[e].value.value)},Ri.prototype.setValue=function(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new Oi(this._values[e].property)),this._values[e].value=new Di(this._values[e].property,null===t?void 0:w(t))},Ri.prototype.getTransition=function(e){return w(this._values[e].transition)},Ri.prototype.setTransition=function(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new Oi(this._values[e].property)),this._values[e].transition=w(t)||void 0},Ri.prototype.serialize=function(){for(var e={},t=0,r=Object.keys(this._values);tthis.end)return this.prior=null,i;if(this.value.isDataDriven())return this.prior=null,i;if(n=1)return 1;var t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}(o))}return i};var Bi=function(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)};Bi.prototype.possiblyEvaluate=function(e,t,r){for(var n=new Ui(this._properties),i=0,a=Object.keys(this._values);in.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}},t.prototype.interpolate=function(e){return e},t}(qi),Gi=function(e){this.specification=e};Gi.prototype.possiblyEvaluate=function(e,t,r,n){if(void 0!==e.value){if("constant"===e.expression.kind){var i=e.expression.evaluate(t,null,{},r,n);return this._calculate(i,i,i,t)}return this._calculate(e.expression.evaluate(new zi(Math.floor(t.zoom-1),t)),e.expression.evaluate(new zi(Math.floor(t.zoom),t)),e.expression.evaluate(new zi(Math.floor(t.zoom+1),t)),t)}},Gi.prototype._calculate=function(e,t,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}},Gi.prototype.interpolate=function(e){return e};var Wi=function(e){this.specification=e};Wi.prototype.possiblyEvaluate=function(e,t,r,n){return!!e.expression.evaluate(t,null,{},r,n)},Wi.prototype.interpolate=function(){return!1};var Zi=function(e){for(var t in this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],e){var r=e[t];r.specification.overridable&&this.overridableProperties.push(t);var n=this.defaultPropertyValues[t]=new Di(r,void 0),i=this.defaultTransitionablePropertyValues[t]=new Oi(r);this.defaultTransitioningPropertyValues[t]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=n.possiblyEvaluate({})}};ii("DataDrivenProperty",qi),ii("DataConstantProperty",Vi),ii("CrossFadedDataDrivenProperty",Hi),ii("CrossFadedProperty",Gi),ii("ColorRampProperty",Wi);var Yi="-transition",Xi=function(e){function t(t,r){if(e.call(this),this.id=t.id,this.type=t.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},"custom"!==t.type&&(this.metadata=t.metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,"background"!==t.type&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter),r.layout&&(this._unevaluatedLayout=new ji(r.layout)),r.paint)){for(var n in this._transitionablePaint=new Ri(r.paint),t.paint)this.setPaintProperty(n,t.paint[n],{validate:!1});for(var i in t.layout)this.setLayoutProperty(i,t.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Ui(r.paint)}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},t.prototype.getLayoutProperty=function(e){return"visibility"===e?this.visibility:this._unevaluatedLayout.getValue(e)},t.prototype.setLayoutProperty=function(e,t,r){if(void 0===r&&(r={}),null!=t){var n="layers."+this.id+".layout."+e;if(this._validate($n,n,e,t,r))return}"visibility"!==e?this._unevaluatedLayout.setValue(e,t):this.visibility=t},t.prototype.getPaintProperty=function(e){return x(e,Yi)?this._transitionablePaint.getTransition(e.slice(0,-11)):this._transitionablePaint.getValue(e)},t.prototype.setPaintProperty=function(e,t,r){if(void 0===r&&(r={}),null!=t){var n="layers."+this.id+".paint."+e;if(this._validate(Xn,n,e,t,r))return!1}if(x(e,Yi))return this._transitionablePaint.setTransition(e.slice(0,-11),t||void 0),!1;var i=this._transitionablePaint._values[e],a="cross-faded-data-driven"===i.property.specification["property-type"],o=i.value.isDataDriven(),s=i.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);var l=this._transitionablePaint._values[e].value;return l.isDataDriven()||o||a||this._handleOverridablePaintPropertyUpdate(e,s,l)},t.prototype._handleSpecialPaintPropertyUpdate=function(e){},t.prototype._handleOverridablePaintPropertyUpdate=function(e,t,r){return!1},t.prototype.isHidden=function(e){return!!(this.minzoom&&e=this.maxzoom)||"none"===this.visibility},t.prototype.updateTransitions=function(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)},t.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},t.prototype.recalculate=function(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,void 0,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,void 0,t)},t.prototype.serialize=function(){var e={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),b(e,(function(e,t){return!(void 0===e||"layout"===t&&!Object.keys(e).length||"paint"===t&&!Object.keys(e).length)}))},t.prototype._validate=function(e,t,r,n,i){return void 0===i&&(i={}),(!i||!1!==i.validate)&&Kn(this,e.call(Zn,{key:t,layerType:this.type,objectKey:r,value:n,styleSpec:Oe,style:{glyphs:!0,sprite:!0}}))},t.prototype.is3D=function(){return!1},t.prototype.isTileClipped=function(){return!1},t.prototype.hasOffscreenPass=function(){return!1},t.prototype.resize=function(){},t.prototype.isStateDependent=function(){for(var e in this.paint._values){var t=this.paint.get(e);if(t instanceof Ni&&Yr(t.property.specification)&&("source"===t.value.kind||"composite"===t.value.kind)&&t.value.isStateDependent)return!0}return!1},t}(De),$i={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Ki=function(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Ji=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Qi(e,t){void 0===t&&(t=1);var r=0,n=0;return{members:e.map((function(e){var i=function(e){return $i[e].BYTES_PER_ELEMENT}(e.type),a=r=ea(r,Math.max(t,i)),o=e.components||1;return n=Math.max(n,i),r+=i*o,{name:e.name,type:e.type,components:o,offset:a}})),size:ea(r,Math.max(n,t)),alignment:t}}function ea(e,t){return Math.ceil(e/t)*t}Ji.serialize=function(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}},Ji.deserialize=function(e){var t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t},Ji.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Ji.prototype.clear=function(){this.length=0},Ji.prototype.resize=function(e){this.reserve(e),this.length=e},Ji.prototype.reserve=function(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var t=this.uint8;this._refreshViews(),t&&this.uint8.set(t)}},Ji.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var ta=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var r=this.length;return this.resize(r+1),this.emplace(r,e,t)},t.prototype.emplace=function(e,t,r){var n=2*e;return this.int16[n+0]=t,this.int16[n+1]=r,e},t}(Ji);ta.prototype.bytesPerElement=4,ii("StructArrayLayout2i4",ta);var ra=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,e,t,r,n)},t.prototype.emplace=function(e,t,r,n,i){var a=4*e;return this.int16[a+0]=t,this.int16[a+1]=r,this.int16[a+2]=n,this.int16[a+3]=i,e},t}(Ji);ra.prototype.bytesPerElement=8,ii("StructArrayLayout4i8",ra);var na=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,a){var o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n,i,a)},t.prototype.emplace=function(e,t,r,n,i,a,o){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,e},t}(Ji);na.prototype.bytesPerElement=12,ii("StructArrayLayout2i4i12",na);var ia=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,a){var o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n,i,a)},t.prototype.emplace=function(e,t,r,n,i,a,o){var s=4*e,l=8*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.uint8[l+4]=n,this.uint8[l+5]=i,this.uint8[l+6]=a,this.uint8[l+7]=o,e},t}(Ji);ia.prototype.bytesPerElement=8,ii("StructArrayLayout2i4ub8",ia);var aa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var r=this.length;return this.resize(r+1),this.emplace(r,e,t)},t.prototype.emplace=function(e,t,r){var n=2*e;return this.float32[n+0]=t,this.float32[n+1]=r,e},t}(Ji);aa.prototype.bytesPerElement=8,ii("StructArrayLayout2f8",aa);var oa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,a,o,s,l,c){var u=this.length;return this.resize(u+1),this.emplace(u,e,t,r,n,i,a,o,s,l,c)},t.prototype.emplace=function(e,t,r,n,i,a,o,s,l,c,u){var h=10*e;return this.uint16[h+0]=t,this.uint16[h+1]=r,this.uint16[h+2]=n,this.uint16[h+3]=i,this.uint16[h+4]=a,this.uint16[h+5]=o,this.uint16[h+6]=s,this.uint16[h+7]=l,this.uint16[h+8]=c,this.uint16[h+9]=u,e},t}(Ji);oa.prototype.bytesPerElement=20,ii("StructArrayLayout10ui20",oa);var sa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,a,o,s,l,c,u,h){var f=this.length;return this.resize(f+1),this.emplace(f,e,t,r,n,i,a,o,s,l,c,u,h)},t.prototype.emplace=function(e,t,r,n,i,a,o,s,l,c,u,h,f){var p=12*e;return this.int16[p+0]=t,this.int16[p+1]=r,this.int16[p+2]=n,this.int16[p+3]=i,this.uint16[p+4]=a,this.uint16[p+5]=o,this.uint16[p+6]=s,this.uint16[p+7]=l,this.int16[p+8]=c,this.int16[p+9]=u,this.int16[p+10]=h,this.int16[p+11]=f,e},t}(Ji);sa.prototype.bytesPerElement=24,ii("StructArrayLayout4i4ui4i24",sa);var la=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)},t.prototype.emplace=function(e,t,r,n){var i=3*e;return this.float32[i+0]=t,this.float32[i+1]=r,this.float32[i+2]=n,e},t}(Ji);la.prototype.bytesPerElement=12,ii("StructArrayLayout3f12",la);var ca=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var r=1*e;return this.uint32[r+0]=t,e},t}(Ji);ca.prototype.bytesPerElement=4,ii("StructArrayLayout1ul4",ca);var ua=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,a,o,s,l){var c=this.length;return this.resize(c+1),this.emplace(c,e,t,r,n,i,a,o,s,l)},t.prototype.emplace=function(e,t,r,n,i,a,o,s,l,c){var u=10*e,h=5*e;return this.int16[u+0]=t,this.int16[u+1]=r,this.int16[u+2]=n,this.int16[u+3]=i,this.int16[u+4]=a,this.int16[u+5]=o,this.uint32[h+3]=s,this.uint16[u+8]=l,this.uint16[u+9]=c,e},t}(Ji);ua.prototype.bytesPerElement=20,ii("StructArrayLayout6i1ul2ui20",ua);var ha=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,a){var o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n,i,a)},t.prototype.emplace=function(e,t,r,n,i,a,o){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,e},t}(Ji);ha.prototype.bytesPerElement=12,ii("StructArrayLayout2i2i2i12",ha);var fa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,r,n,i)},t.prototype.emplace=function(e,t,r,n,i,a){var o=4*e,s=8*e;return this.float32[o+0]=t,this.float32[o+1]=r,this.float32[o+2]=n,this.int16[s+6]=i,this.int16[s+7]=a,e},t}(Ji);fa.prototype.bytesPerElement=16,ii("StructArrayLayout2f1f2i16",fa);var pa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,e,t,r,n)},t.prototype.emplace=function(e,t,r,n,i){var a=12*e,o=3*e;return this.uint8[a+0]=t,this.uint8[a+1]=r,this.float32[o+1]=n,this.float32[o+2]=i,e},t}(Ji);pa.prototype.bytesPerElement=12,ii("StructArrayLayout2ub2f12",pa);var da=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)},t.prototype.emplace=function(e,t,r,n){var i=3*e;return this.uint16[i+0]=t,this.uint16[i+1]=r,this.uint16[i+2]=n,e},t}(Ji);da.prototype.bytesPerElement=6,ii("StructArrayLayout3ui6",da);var ma=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,a,o,s,l,c,u,h,f,p,d,m,g){var y=this.length;return this.resize(y+1),this.emplace(y,e,t,r,n,i,a,o,s,l,c,u,h,f,p,d,m,g)},t.prototype.emplace=function(e,t,r,n,i,a,o,s,l,c,u,h,f,p,d,m,g,y){var v=24*e,x=12*e,_=48*e;return this.int16[v+0]=t,this.int16[v+1]=r,this.uint16[v+2]=n,this.uint16[v+3]=i,this.uint32[x+2]=a,this.uint32[x+3]=o,this.uint32[x+4]=s,this.uint16[v+10]=l,this.uint16[v+11]=c,this.uint16[v+12]=u,this.float32[x+7]=h,this.float32[x+8]=f,this.uint8[_+36]=p,this.uint8[_+37]=d,this.uint8[_+38]=m,this.uint32[x+10]=g,this.int16[v+22]=y,e},t}(Ji);ma.prototype.bytesPerElement=48,ii("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",ma);var ga=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,a,o,s,l,c,u,h,f,p,d,m,g,y,v,x,_,b,w,T,k,A,M,S){var E=this.length;return this.resize(E+1),this.emplace(E,e,t,r,n,i,a,o,s,l,c,u,h,f,p,d,m,g,y,v,x,_,b,w,T,k,A,M,S)},t.prototype.emplace=function(e,t,r,n,i,a,o,s,l,c,u,h,f,p,d,m,g,y,v,x,_,b,w,T,k,A,M,S,E){var C=34*e,I=17*e;return this.int16[C+0]=t,this.int16[C+1]=r,this.int16[C+2]=n,this.int16[C+3]=i,this.int16[C+4]=a,this.int16[C+5]=o,this.int16[C+6]=s,this.int16[C+7]=l,this.uint16[C+8]=c,this.uint16[C+9]=u,this.uint16[C+10]=h,this.uint16[C+11]=f,this.uint16[C+12]=p,this.uint16[C+13]=d,this.uint16[C+14]=m,this.uint16[C+15]=g,this.uint16[C+16]=y,this.uint16[C+17]=v,this.uint16[C+18]=x,this.uint16[C+19]=_,this.uint16[C+20]=b,this.uint16[C+21]=w,this.uint16[C+22]=T,this.uint32[I+12]=k,this.float32[I+13]=A,this.float32[I+14]=M,this.float32[I+15]=S,this.float32[I+16]=E,e},t}(Ji);ga.prototype.bytesPerElement=68,ii("StructArrayLayout8i15ui1ul4f68",ga);var ya=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var r=1*e;return this.float32[r+0]=t,e},t}(Ji);ya.prototype.bytesPerElement=4,ii("StructArrayLayout1f4",ya);var va=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)},t.prototype.emplace=function(e,t,r,n){var i=3*e;return this.int16[i+0]=t,this.int16[i+1]=r,this.int16[i+2]=n,e},t}(Ji);va.prototype.bytesPerElement=6,ii("StructArrayLayout3i6",va);var xa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)},t.prototype.emplace=function(e,t,r,n){var i=2*e,a=4*e;return this.uint32[i+0]=t,this.uint16[a+2]=r,this.uint16[a+3]=n,e},t}(Ji);xa.prototype.bytesPerElement=8,ii("StructArrayLayout1ul2ui8",xa);var _a=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var r=this.length;return this.resize(r+1),this.emplace(r,e,t)},t.prototype.emplace=function(e,t,r){var n=2*e;return this.uint16[n+0]=t,this.uint16[n+1]=r,e},t}(Ji);_a.prototype.bytesPerElement=4,ii("StructArrayLayout2ui4",_a);var ba=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var r=1*e;return this.uint16[r+0]=t,e},t}(Ji);ba.prototype.bytesPerElement=2,ii("StructArrayLayout1ui2",ba);var wa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,e,t,r,n)},t.prototype.emplace=function(e,t,r,n,i){var a=4*e;return this.float32[a+0]=t,this.float32[a+1]=r,this.float32[a+2]=n,this.float32[a+3]=i,e},t}(Ji);wa.prototype.bytesPerElement=16,ii("StructArrayLayout4f16",wa);var Ta=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.anchorPoint.get=function(){return new a(this.anchorPointX,this.anchorPointY)},Object.defineProperties(t.prototype,r),t}(Ki);Ta.prototype.size=20;var ka=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new Ta(this,e)},t}(ua);ii("CollisionBoxArray",ka);var Aa=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},r.placedOrientation.set=function(e){this._structArray.uint8[this._pos1+37]=e},r.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},r.hidden.set=function(e){this._structArray.uint8[this._pos1+38]=e},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},r.crossTileID.set=function(e){this._structArray.uint32[this._pos4+10]=e},r.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(t.prototype,r),t}(Ki);Aa.prototype.size=48;var Ma=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new Aa(this,e)},t}(ma);ii("PlacedSymbolArray",Ma);var Sa=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},r.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},r.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},r.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},r.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},r.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},r.key.get=function(){return this._structArray.uint16[this._pos2+8]},r.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},r.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},r.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},r.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},r.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},r.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},r.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},r.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},r.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},r.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},r.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},r.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},r.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},r.crossTileID.set=function(e){this._structArray.uint32[this._pos4+12]=e},r.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},r.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},r.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},r.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(t.prototype,r),t}(Ki);Sa.prototype.size=68;var Ea=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new Sa(this,e)},t}(ga);ii("SymbolInstanceArray",Ea);var Ca=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getoffsetX=function(e){return this.float32[1*e+0]},t}(ya);ii("GlyphOffsetArray",Ca);var Ia=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getx=function(e){return this.int16[3*e+0]},t.prototype.gety=function(e){return this.int16[3*e+1]},t.prototype.gettileUnitDistanceFromAnchor=function(e){return this.int16[3*e+2]},t}(va);ii("SymbolLineVertexArray",Ia);var La=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(t.prototype,r),t}(Ki);La.prototype.size=8;var Pa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new La(this,e)},t}(xa);ii("FeatureIndexArray",Pa);var za=Qi([{name:"a_pos",components:2,type:"Int16"}],4).members,Da=function(e){void 0===e&&(e=[]),this.segments=e};function Oa(e,t){return 256*(e=h(Math.floor(e),0,255))+h(Math.floor(t),0,255)}Da.prototype.prepareSegment=function(e,t,r,n){var i=this.segments[this.segments.length-1];return e>Da.MAX_VERTEX_ARRAY_LENGTH&&k("Max vertices per segment is "+Da.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+e),(!i||i.vertexLength+e>Da.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==n)&&(i={vertexOffset:t.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==n&&(i.sortKey=n),this.segments.push(i)),i},Da.prototype.get=function(){return this.segments},Da.prototype.destroy=function(){for(var e=0,t=this.segments;e>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(a>>>16)&65535)<<16);switch(l=0,r){case 3:l^=(255&e.charCodeAt(c+2))<<16;case 2:l^=(255&e.charCodeAt(c+1))<<8;case 1:i^=l=(65535&(l=(l=(65535&(l^=255&e.charCodeAt(c)))*o+(((l>>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return i^=e.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0}})),Ba=t((function(e){e.exports=function(e,t){for(var r,n=e.length,i=t^n,a=0;n>=4;)r=1540483477*(65535&(r=255&e.charCodeAt(a)|(255&e.charCodeAt(++a))<<8|(255&e.charCodeAt(++a))<<16|(255&e.charCodeAt(++a))<<24))+((1540483477*(r>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),n-=4,++a;switch(n){case 3:i^=(255&e.charCodeAt(a+2))<<16;case 2:i^=(255&e.charCodeAt(a+1))<<8;case 1:i=1540483477*(65535&(i^=255&e.charCodeAt(a)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0}})),ja=Fa,Na=Fa,Ua=Ba;ja.murmur3=Na,ja.murmur2=Ua;var Va=function(){this.ids=[],this.positions=[],this.indexed=!1};Va.prototype.add=function(e,t,r,n){this.ids.push(Ha(e)),this.positions.push(t,r,n)},Va.prototype.getPositions=function(e){for(var t=Ha(e),r=0,n=this.ids.length-1;r>1;this.ids[i]>=t?n=i:r=i+1}for(var a=[];this.ids[r]===t;){var o=this.positions[3*r],s=this.positions[3*r+1],l=this.positions[3*r+2];a.push({index:o,start:s,end:l}),r++}return a},Va.serialize=function(e,t){var r=new Float64Array(e.ids),n=new Uint32Array(e.positions);return Ga(r,n,0,r.length-1),t&&t.push(r.buffer,n.buffer),{ids:r,positions:n}},Va.deserialize=function(e){var t=new Va;return t.ids=e.ids,t.positions=e.positions,t.indexed=!0,t};var qa=Math.pow(2,53)-1;function Ha(e){var t=+e;return!isNaN(t)&&t<=qa?t:ja(String(e))}function Ga(e,t,r,n){for(;r>1],a=r-1,o=n+1;;){do{a++}while(e[a]i);if(a>=o)break;Wa(e,a,o),Wa(t,3*a,3*o),Wa(t,3*a+1,3*o+1),Wa(t,3*a+2,3*o+2)}o-ro.x+1||lo.y+1)&&k("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return r}function yo(e,t){return{type:e.type,id:e.id,properties:e.properties,geometry:t?go(e):[]}}function vo(e,t,r,n,i){e.emplaceBack(2*t+(n+1)/2,2*r+(i+1)/2)}var xo=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new ta,this.indexArray=new da,this.segments=new Da,this.programConfigurations=new co(e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};function _o(e,t){for(var r=0;r1){if(ko(e,t))return!0;for(var n=0;n1?e.distSqr(r):e.distSqr(r.sub(t)._mult(i)._add(t))}function Eo(e,t){for(var r,n,i,a=!1,o=0;ot.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(a=!a);return a}function Co(e,t){for(var r=!1,n=0,i=e.length-1;nt.y!=o.y>t.y&&t.x<(o.x-a.x)*(t.y-a.y)/(o.y-a.y)+a.x&&(r=!r)}return r}function Io(e,t,r){var n=r[0],i=r[2];if(e.xi.x&&t.x>i.x||e.yi.y&&t.y>i.y)return!1;var a=A(e,t,r[0]);return a!==A(e,t,r[1])||a!==A(e,t,r[2])||a!==A(e,t,r[3])}function Lo(e,t,r){var n=t.paint.get(e).value;return"constant"===n.kind?n.value:r.programConfigurations.get(t.id).getMaxValue(e)}function Po(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function zo(e,t,r,n,i){if(!t[0]&&!t[1])return e;var o=a.convert(t)._mult(i);"viewport"===r&&o._rotate(-n);for(var s=[],l=0;l=fo||u<0||u>=fo)){var h=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),f=h.vertexLength;vo(this.layoutVertexArray,c,u,-1,-1),vo(this.layoutVertexArray,c,u,1,-1),vo(this.layoutVertexArray,c,u,1,1),vo(this.layoutVertexArray,c,u,-1,1),this.indexArray.emplaceBack(f,f+1,f+2),this.indexArray.emplaceBack(f,f+3,f+2),h.vertexLength+=4,h.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{},n)},ii("CircleBucket",xo,{omit:["layers"]});var Do=new Zi({"circle-sort-key":new qi(Oe.layout_circle["circle-sort-key"])}),Oo={paint:new Zi({"circle-radius":new qi(Oe.paint_circle["circle-radius"]),"circle-color":new qi(Oe.paint_circle["circle-color"]),"circle-blur":new qi(Oe.paint_circle["circle-blur"]),"circle-opacity":new qi(Oe.paint_circle["circle-opacity"]),"circle-translate":new Vi(Oe.paint_circle["circle-translate"]),"circle-translate-anchor":new Vi(Oe.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Vi(Oe.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Vi(Oe.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new qi(Oe.paint_circle["circle-stroke-width"]),"circle-stroke-color":new qi(Oe.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new qi(Oe.paint_circle["circle-stroke-opacity"])}),layout:Do},Ro=typeof Float32Array<"u"?Float32Array:Array;function Fo(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function Bo(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],h=t[8],f=t[9],p=t[10],d=t[11],m=t[12],g=t[13],y=t[14],v=t[15],x=r[0],_=r[1],b=r[2],w=r[3];return e[0]=x*n+_*s+b*h+w*m,e[1]=x*i+_*l+b*f+w*g,e[2]=x*a+_*c+b*p+w*y,e[3]=x*o+_*u+b*d+w*v,x=r[4],_=r[5],b=r[6],w=r[7],e[4]=x*n+_*s+b*h+w*m,e[5]=x*i+_*l+b*f+w*g,e[6]=x*a+_*c+b*p+w*y,e[7]=x*o+_*u+b*d+w*v,x=r[8],_=r[9],b=r[10],w=r[11],e[8]=x*n+_*s+b*h+w*m,e[9]=x*i+_*l+b*f+w*g,e[10]=x*a+_*c+b*p+w*y,e[11]=x*o+_*u+b*d+w*v,x=r[12],_=r[13],b=r[14],w=r[15],e[12]=x*n+_*s+b*h+w*m,e[13]=x*i+_*l+b*f+w*g,e[14]=x*a+_*c+b*p+w*y,e[15]=x*o+_*u+b*d+w*v,e}Math.hypot||(Math.hypot=function(){for(var e=arguments,t=0,r=arguments.length;r--;)t+=e[r]*e[r];return Math.sqrt(t)});var jo,No=Bo;function Uo(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3];return e[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,e[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,e[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,e[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,e}jo=new Ro(3),Ro!=Float32Array&&(jo[0]=0,jo[1]=0,jo[2]=0),function(){var e=new Ro(4);Ro!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0)}();var Vo=(function(){var e=new Ro(2);Ro!=Float32Array&&(e[0]=0,e[1]=0)}(),function(e){function t(t){e.call(this,t,Oo)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.createBucket=function(e){return new xo(e)},t.prototype.queryRadius=function(e){var t=e;return Lo("circle-radius",this,t)+Lo("circle-stroke-width",this,t)+Po(this.paint.get("circle-translate"))},t.prototype.queryIntersectsFeature=function(e,t,r,n,i,a,o,s){for(var l=zo(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),a.angle,o),c=this.paint.get("circle-radius").evaluate(t,r)+this.paint.get("circle-stroke-width").evaluate(t,r),u="map"===this.paint.get("circle-pitch-alignment"),h=u?l:function(e,t){return e.map((function(e){return qo(e,t)}))}(l,s),f=u?c*o:c,p=0,d=n;pe.width||i.height>e.height||r.x>e.width-i.width||r.y>e.height-i.height)throw new RangeError("out of range source coordinates for image copy");if(i.width>t.width||i.height>t.height||n.x>t.width-i.width||n.y>t.height-i.height)throw new RangeError("out of range destination coordinates for image copy");for(var o=e.data,s=t.data,l=0;l80*r){n=a=e[0],i=o=e[1];for(var d=r;da&&(a=s),l>o&&(o=l);c=0!==(c=Math.max(a-n,o-i))?1/c:0}return ss(f,p,r,n,i,c),p}function as(e,t,r,n,i){var a,o;if(i===Cs(e,t,r,n)>0)for(a=t;a=t;a-=n)o=Ms(a,e[a],e[a+1],o);return o&&_s(o,o.next)&&(Ss(o),o=o.next),o}function os(e,t){if(!e)return e;t||(t=e);var r,n=e;do{if(r=!1,n.steiner||!_s(n,n.next)&&0!==xs(n.prev,n,n.next))n=n.next;else{if(Ss(n),(n=t=n.prev)===n.next)break;r=!0}}while(r||n!==t);return t}function ss(e,t,r,n,i,a,o){if(e){!o&&a&&function(e,t,r,n){var i=e;do{null===i.z&&(i.z=ms(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,r,n,i,a,o,s,l,c=1;do{for(r=e,e=null,a=null,o=0;r;){for(o++,n=r,s=0,t=0;t0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;r=n}a.nextZ=null,c*=2}while(o>1)}(i)}(e,n,i,a);for(var s,l,c=e;e.prev!==e.next;)if(s=e.prev,l=e.next,a?cs(e,n,i,a):ls(e))t.push(s.i/r),t.push(e.i/r),t.push(l.i/r),Ss(e),e=l.next,c=l.next;else if((e=l)===c){o?1===o?ss(e=us(os(e),t,r),t,r,n,i,a,2):2===o&&hs(e,t,r,n,i,a):ss(os(e),t,r,n,i,a,1);break}}}function ls(e){var t=e.prev,r=e,n=e.next;if(xs(t,r,n)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(ys(t.x,t.y,r.x,r.y,n.x,n.y,i.x,i.y)&&xs(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function cs(e,t,r,n){var i=e.prev,a=e,o=e.next;if(xs(i,a,o)>=0)return!1;for(var s=i.xa.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,u=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,h=ms(s,l,t,r,n),f=ms(c,u,t,r,n),p=e.prevZ,d=e.nextZ;p&&p.z>=h&&d&&d.z<=f;){if(p!==e.prev&&p!==e.next&&ys(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&xs(p.prev,p,p.next)>=0||(p=p.prevZ,d!==e.prev&&d!==e.next&&ys(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&xs(d.prev,d,d.next)>=0))return!1;d=d.nextZ}for(;p&&p.z>=h;){if(p!==e.prev&&p!==e.next&&ys(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&xs(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;d&&d.z<=f;){if(d!==e.prev&&d!==e.next&&ys(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&xs(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function us(e,t,r){var n=e;do{var i=n.prev,a=n.next.next;!_s(i,a)&&bs(i,n,n.next,a)&&ks(i,a)&&ks(a,i)&&(t.push(i.i/r),t.push(n.i/r),t.push(a.i/r),Ss(n),Ss(n.next),n=e=a),n=n.next}while(n!==e);return os(n)}function hs(e,t,r,n,i,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&vs(o,s)){var l=As(o,s);return o=os(o,o.next),l=os(l,l.next),ss(o,t,r,n,i,a),void ss(l,t,r,n,i,a)}s=s.next}o=o.next}while(o!==e)}function fs(e,t){return e.x-t.x}function ps(e,t){if(t=function(e,t){var r,n=t,i=e.x,a=e.y,o=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>o){if(o=s,s===i){if(a===n.y)return n;if(a===n.next.y)return n.next}r=n.x=n.x&&n.x>=u&&i!==n.x&&ys(ar.x||n.x===r.x&&ds(r,n)))&&(r=n,f=l)),n=n.next}while(n!==c);return r}(e,t),t){var r=As(t,e);os(t,t.next),os(r,r.next)}}function ds(e,t){return xs(e.prev,e,t.prev)<0&&xs(t.next,e,e.next)<0}function ms(e,t,r,n,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function gs(e){var t=e,r=e;do{(t.x=0&&(e-o)*(n-s)-(r-o)*(t-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function vs(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&bs(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(e,t)&&(ks(e,t)&&ks(t,e)&&function(e,t){var r=e,n=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do{r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}(e,t)&&(xs(e.prev,e,t.prev)||xs(e,t.prev,t))||_s(e,t)&&xs(e.prev,e,e.next)>0&&xs(t.prev,t,t.next)>0)}function xs(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function _s(e,t){return e.x===t.x&&e.y===t.y}function bs(e,t,r,n){var i=Ts(xs(e,t,r)),a=Ts(xs(e,t,n)),o=Ts(xs(r,n,e)),s=Ts(xs(r,n,t));return!!(i!==a&&o!==s||0===i&&ws(e,r,t)||0===a&&ws(e,n,t)||0===o&&ws(r,e,n)||0===s&&ws(r,t,n))}function ws(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function Ts(e){return e>0?1:e<0?-1:0}function ks(e,t){return xs(e.prev,e,e.next)<0?xs(e,t,e.next)>=0&&xs(e,e.prev,t)>=0:xs(e,t,e.prev)<0||xs(e,e.next,t)<0}function As(e,t){var r=new Es(e.i,e.x,e.y),n=new Es(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function Ms(e,t,r,n){var i=new Es(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function Ss(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Es(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Cs(e,t,r,n){for(var i=0,a=t,o=r-n;ar;){if(n-r>600){var a=n-r+1,o=t-r+1,s=Math.log(a),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(a-l)/a)*(o-a/2<0?-1:1);Ls(e,t,Math.max(r,Math.floor(t-o*l/a+c)),Math.min(n,Math.floor(t+(a-o)*l/a+c)),i)}var u=e[t],h=r,f=n;for(Ps(e,r,t),i(e[n],u)>0&&Ps(e,r,n);h0;)f--}0===i(e[r],u)?Ps(e,r,f):Ps(e,++f,n),f<=t&&(r=f+1),t<=f&&(n=f-1)}}function Ps(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function zs(e,t){return et?1:0}function Ds(e,t){var r=e.length;if(r<=1)return[e];for(var n,i,a=[],o=0;o1)for(var l=0;l0&&(n+=e[i-1].length,r.holes.push(n))}return r},rs.default=ns;var Bs=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new ta,this.indexArray=new da,this.indexArray2=new _a,this.programConfigurations=new co(e.layers,e.zoom),this.segments=new Da,this.segments2=new Da,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};Bs.prototype.populate=function(e,t,r){this.hasPattern=Rs("fill",this.layers,t);for(var n=this.layers[0].layout.get("fill-sort-key"),i=[],a=0,o=e;a>3}if(i--,1===n||2===n)o+=e.readSVarint(),s+=e.readSVarint(),1===n&&(t&&l.push(t),t=[]),t.push(new a(o,s));else{if(7!==n)throw new Error("unknown command "+n);t&&t.push(t[0].clone())}}return t&&l.push(t),l},Hs.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,r=1,n=0,i=0,a=0,o=1/0,s=-1/0,l=1/0,c=-1/0;e.pos>3}if(n--,1===r||2===r)(i+=e.readSVarint())s&&(s=i),(a+=e.readSVarint())c&&(c=a);else if(7!==r)throw new Error("unknown command "+r)}return[o,l,s,c]},Hs.prototype.toGeoJSON=function(e,t,r){var n,i,a=this.extent*Math.pow(2,r),o=this.extent*e,s=this.extent*t,l=this.loadGeometry(),c=Hs.types[this.type];function u(e){for(var t=0;t>3;t=1===n?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null}return t}(r))}Ys.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new qs(this._pbf,t,this.extent,this._keys,this._values)};function $s(e,t,r){if(3===e){var n=new Zs(r,r.readVarint()+r.pos);n.length&&(t[n.name]=n)}}var Ks={VectorTile:function(e,t){this.layers=e.readFields($s,{},t)},VectorTileFeature:qs,VectorTileLayer:Zs},Js=Ks.VectorTileFeature.types,Qs=Math.pow(2,13);function el(e,t,r,n,i,a,o,s){e.emplaceBack(t,r,2*Math.floor(n*Qs)+o,i*Qs*2,a*Qs*2,Math.round(s))}var tl=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new na,this.indexArray=new da,this.programConfigurations=new co(e.layers,e.zoom),this.segments=new Da,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};function rl(e,t){return e.x===t.x&&(e.x<0||e.x>fo)||e.y===t.y&&(e.y<0||e.y>fo)}function nl(e){return e.every((function(e){return e.x<0}))||e.every((function(e){return e.x>fo}))||e.every((function(e){return e.y<0}))||e.every((function(e){return e.y>fo}))}tl.prototype.populate=function(e,t,r){this.features=[],this.hasPattern=Rs("fill-extrusion",this.layers,t);for(var n=0,i=e;n=1){var v=d[g-1];if(!rl(y,v)){h.vertexLength+4>Da.MAX_VERTEX_ARRAY_LENGTH&&(h=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var x=y.sub(v)._perp()._unit(),_=v.dist(y);m+_>32768&&(m=0),el(this.layoutVertexArray,y.x,y.y,x.x,x.y,0,0,m),el(this.layoutVertexArray,y.x,y.y,x.x,x.y,0,1,m),m+=_,el(this.layoutVertexArray,v.x,v.y,x.x,x.y,0,0,m),el(this.layoutVertexArray,v.x,v.y,x.x,x.y,0,1,m);var b=h.vertexLength;this.indexArray.emplaceBack(b,b+2,b+1),this.indexArray.emplaceBack(b+1,b+2,b+3),h.vertexLength+=4,h.primitiveLength+=2}}}}if(h.vertexLength+l>Da.MAX_VERTEX_ARRAY_LENGTH&&(h=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray)),"Polygon"===Js[e.type]){for(var w=[],T=[],k=h.vertexLength,A=0,M=s;A=2&&e[l-1].equals(e[l-2]);)l--;for(var c=0;c0;if(T&&y>c){var A=u.dist(p);if(A>2*h){var M=u.sub(u.sub(p)._mult(h/A)._round());this.updateDistance(p,M),this.addCurrentVertex(M,m,0,0,f),p=M}}var S=p&&d,E=S?r:s?"butt":n;if(S&&"round"===E&&(bi&&(E="bevel"),"bevel"===E&&(b>2&&(E="flipbevel"),b100)v=g.mult(-1);else{var C=b*m.add(g).mag()/m.sub(g).mag();v._perp()._mult(C*(k?-1:1))}this.addCurrentVertex(u,v,0,0,f),this.addCurrentVertex(u,v.mult(-1),0,0,f)}else if("bevel"===E||"fakeround"===E){var I=-Math.sqrt(b*b-1),L=k?I:0,P=k?0:I;if(p&&this.addCurrentVertex(u,m,L,P,f),"fakeround"===E)for(var z=Math.round(180*w/Math.PI/20),D=1;D2*h){var N=u.add(d.sub(u)._mult(h/j)._round());this.updateDistance(u,N),this.addCurrentVertex(N,g,0,0,f),u=N}}}}},pl.prototype.addCurrentVertex=function(e,t,r,n,i,a){void 0===a&&(a=!1);var o=t.x+t.y*r,s=t.y-t.x*r,l=-t.x+t.y*n,c=-t.y-t.x*n;this.addHalfVertex(e,o,s,a,!1,r,i),this.addHalfVertex(e,l,c,a,!0,-n,i),this.distance>fl/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(e,t,r,n,i,a))},pl.prototype.addHalfVertex=function(e,t,r,n,i,a,o){var s=e.x,l=e.y,c=.5*(this.lineClips?this.scaledDistance*(fl-1):this.scaledDistance);if(this.layoutVertexArray.emplaceBack((s<<1)+(n?1:0),(l<<1)+(i?1:0),Math.round(63*t)+128,Math.round(63*r)+128,1+(0===a?0:a<0?-1:1)|(63&c)<<2,c>>6),this.lineClips){var u=(this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start);this.layoutVertexArray2.emplaceBack(u,this.lineClipsArray.length)}var h=o.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,h),o.primitiveLength++),i?this.e2=h:this.e1=h},pl.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},pl.prototype.updateDistance=function(e,t){this.distance+=e.dist(t),this.updateScaledDistance()},ii("LineBucket",pl,{omit:["layers","patternFeatures"]});var dl=new Zi({"line-cap":new Vi(Oe.layout_line["line-cap"]),"line-join":new qi(Oe.layout_line["line-join"]),"line-miter-limit":new Vi(Oe.layout_line["line-miter-limit"]),"line-round-limit":new Vi(Oe.layout_line["line-round-limit"]),"line-sort-key":new qi(Oe.layout_line["line-sort-key"])}),ml={paint:new Zi({"line-opacity":new qi(Oe.paint_line["line-opacity"]),"line-color":new qi(Oe.paint_line["line-color"]),"line-translate":new Vi(Oe.paint_line["line-translate"]),"line-translate-anchor":new Vi(Oe.paint_line["line-translate-anchor"]),"line-width":new qi(Oe.paint_line["line-width"]),"line-gap-width":new qi(Oe.paint_line["line-gap-width"]),"line-offset":new qi(Oe.paint_line["line-offset"]),"line-blur":new qi(Oe.paint_line["line-blur"]),"line-dasharray":new Gi(Oe.paint_line["line-dasharray"]),"line-pattern":new Hi(Oe.paint_line["line-pattern"]),"line-gradient":new Wi(Oe.paint_line["line-gradient"])}),layout:dl},gl=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.possiblyEvaluate=function(t,r){return r=new zi(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),e.prototype.possiblyEvaluate.call(this,t,r)},t.prototype.evaluate=function(t,r,n,i){return r=p({},r,{zoom:Math.floor(r.zoom)}),e.prototype.evaluate.call(this,t,r,n,i)},t}(qi),yl=new gl(ml.paint.properties["line-width"].specification);yl.useIntegerZoom=!0;var vl=function(e){function t(t){e.call(this,t,ml),this.gradientVersion=0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._handleSpecialPaintPropertyUpdate=function(e){if("line-gradient"===e){var t=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=t._styleExpression.expression instanceof Qt,this.gradientVersion=(this.gradientVersion+1)%l}},t.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},t.prototype.recalculate=function(t,r){e.prototype.recalculate.call(this,t,r),this.paint._values["line-floorwidth"]=yl.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)},t.prototype.createBucket=function(e){return new pl(e)},t.prototype.queryRadius=function(e){var t=e,r=xl(Lo("line-width",this,t),Lo("line-gap-width",this,t)),n=Lo("line-offset",this,t);return r/2+Math.abs(n)+Po(this.paint.get("line-translate"))},t.prototype.queryIntersectsFeature=function(e,t,r,n,i,o,s){var l=zo(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),o.angle,s),c=s/2*xl(this.paint.get("line-width").evaluate(t,r),this.paint.get("line-gap-width").evaluate(t,r)),u=this.paint.get("line-offset").evaluate(t,r);return u&&(n=function(e,t){for(var r=[],n=new a(0,0),i=0;i=3)for(var a=0;a0?t+2*e:e}var _l=Qi([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),bl=Qi([{name:"a_projected_pos",components:3,type:"Float32"}],4),wl=(Qi([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Qi([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),Tl=(Qi([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]),Qi([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),kl=Qi([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function Al(e,t,r){return e.sections.forEach((function(e){e.text=function(e,t,r){var n=t.layout.get("text-transform").evaluate(r,{});return"uppercase"===n?e=e.toLocaleUpperCase():"lowercase"===n&&(e=e.toLocaleLowerCase()),Pi.applyArabicShaping&&(e=Pi.applyArabicShaping(e)),e}(e.text,t,r)})),e}Qi([{name:"triangle",components:3,type:"Uint16"}]),Qi([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),Qi([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),Qi([{type:"Float32",name:"offsetX"}]),Qi([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var Ml={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},Sl=24,El=function(e,t,r,n,i){var a,o,s=8*i-n-1,l=(1<>1,u=-7,h=r?i-1:0,f=r?-1:1,p=e[t+h];for(h+=f,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=256*a+e[t+h],h+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=n;u>0;o=256*o+e[t+h],h+=f,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=c}return(p?-1:1)*o*Math.pow(2,a-n)},Cl=function(e,t,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+h>=1?f/l:f*Math.pow(2,1-h))*l>=2&&(o++,l/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(t*l-1)*Math.pow(2,i),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;e[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<0;e[r+p]=255&o,p+=d,o/=256,c-=8);e[r+p-d]|=128*m},Il=Ll;function Ll(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}Ll.Varint=0,Ll.Fixed64=1,Ll.Bytes=2,Ll.Fixed32=5;var Pl=4294967296,zl=1/Pl,Dl=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function Ol(e){return e.type===Ll.Bytes?e.readVarint()+e.pos:e.pos+1}function Rl(e,t,r){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i>=e;i--)r.buf[i+n]=r.buf[i]}function Fl(e,t){for(var r=0;r>>8,e[r+2]=t>>>16,e[r+3]=t>>>24}function Yl(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}function Xl(e,t,r){1===e&&r.readMessage($l,t)}function $l(e,t,r){if(3===e){var n=r.readMessage(Kl,{}),i=n.id,a=n.bitmap,o=n.width,s=n.height,l=n.left,c=n.top,u=n.advance;t.push({id:i,bitmap:new Yo({width:o+6,height:s+6},a),metrics:{width:o,height:s,left:l,top:c,advance:u}})}}function Kl(e,t,r){1===e?t.id=r.readVarint():2===e?t.bitmap=r.readBytes():3===e?t.width=r.readVarint():4===e?t.height=r.readVarint():5===e?t.left=r.readSVarint():6===e?t.top=r.readSVarint():7===e&&(t.advance=r.readVarint())}function Jl(e){for(var t=0,r=0,n=0,i=e;n=0;f--){var p=o[f];if(!(h.w>p.w||h.h>p.h)){if(h.x=p.x,h.y=p.y,l=Math.max(l,h.y+h.h),s=Math.max(s,h.x+h.w),h.w===p.w&&h.h===p.h){var d=o.pop();f>3,a=this.pos;this.type=7&n,e(i,t,this),this.pos===a&&this.skip(n)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=Wl(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=Yl(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=Wl(this.buf,this.pos)+Wl(this.buf,this.pos+4)*Pl;return this.pos+=8,e},readSFixed64:function(){var e=Wl(this.buf,this.pos)+Yl(this.buf,this.pos+4)*Pl;return this.pos+=8,e},readFloat:function(){var e=El(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=El(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,r,n=this.buf;return t=127&(r=n[this.pos++]),r<128||(t|=(127&(r=n[this.pos++]))<<7,r<128)||(t|=(127&(r=n[this.pos++]))<<14,r<128)||(t|=(127&(r=n[this.pos++]))<<21,r<128)?t:function(e,t,r){var n,i,a=r.buf;if(n=(112&(i=a[r.pos++]))>>4,i<128||(n|=(127&(i=a[r.pos++]))<<3,i<128)||(n|=(127&(i=a[r.pos++]))<<10,i<128)||(n|=(127&(i=a[r.pos++]))<<17,i<128)||(n|=(127&(i=a[r.pos++]))<<24,i<128)||(n|=(1&(i=a[r.pos++]))<<31,i<128))return function(e,t,r){return r?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}(e,n,t);throw new Error("Expected varint not more than 10 bytes")}(t|=(15&(r=n[this.pos]))<<28,e,this)},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=12&&Dl?function(e,t,r){return Dl.decode(e.subarray(t,r))}(this.buf,t,e):function(e,t,r){for(var n="",i=t;i239?4:l>223?3:l>191?2:1;if(i+u>r)break;1===u?l<128&&(c=l):2===u?128==(192&(a=e[i+1]))&&(c=(31&l)<<6|63&a)<=127&&(c=null):3===u?(a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&((c=(15&l)<<12|(63&a)<<6|63&o)<=2047||c>=55296&&c<=57343)&&(c=null)):4===u&&(a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&((c=(15&l)<<18|(63&a)<<12|(63&o)<<6|63&s)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,u=1):c>65535&&(c-=65536,n+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),n+=String.fromCharCode(c),i+=u}return n}(this.buf,t,e)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==Ll.Bytes)return e.push(this.readVarint(t));var r=Ol(this);for(e=e||[];this.pos127;);else if(t===Ll.Bytes)this.pos=this.readVarint()+this.pos;else if(t===Ll.Fixed32)this.pos+=4;else{if(t!==Ll.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t268435455||e<0?function(e,t){var r,n;if(e>=0?(r=e%4294967296|0,n=e/4294967296|0):(n=~(-e/4294967296),4294967295^(r=~(-e%4294967296))?r=r+1|0:(r=0,n=n+1|0)),e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),function(e,t,r){r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos]=127&e}(r,0,t),function(e,t){var r=(7&e)<<4;t.buf[t.pos++]|=r|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e)))))}(n,t)}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(!!e)},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=function(e,t,r){for(var n,i,a=0;a55295&&n<57344){if(!i){n>56319||a+1===t.length?(e[r++]=239,e[r++]=191,e[r++]=189):i=n;continue}if(n<56320){e[r++]=239,e[r++]=191,e[r++]=189,i=n;continue}n=i-55296<<10|n-56320|65536,i=null}else i&&(e[r++]=239,e[r++]=191,e[r++]=189,i=null);n<128?e[r++]=n:(n<2048?e[r++]=n>>6|192:(n<65536?e[r++]=n>>12|224:(e[r++]=n>>18|240,e[r++]=n>>12&63|128),e[r++]=n>>6&63|128),e[r++]=63&n|128)}return r}(this.buf,e,this.pos);var r=this.pos-t;r>=128&&Rl(t,r,this),this.pos=t-1,this.writeVarint(r),this.pos+=r},writeFloat:function(e){this.realloc(4),Cl(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),Cl(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var r=0;r=128&&Rl(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(e,t,r){this.writeTag(e,Ll.Bytes),this.writeRawMessage(t,r)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,Fl,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,Bl,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,Ul,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,jl,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,Nl,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,Vl,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,ql,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,Hl,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,Gl,t)},writeBytesField:function(e,t){this.writeTag(e,Ll.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,Ll.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,Ll.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,Ll.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,Ll.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,Ll.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,Ll.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,Ll.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,Ll.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,Ll.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,!!t)}};var Ql=function(e,t){var r=t.pixelRatio,n=t.version,i=t.stretchX,a=t.stretchY,o=t.content;this.paddedRect=e,this.pixelRatio=r,this.stretchX=i,this.stretchY=a,this.content=o,this.version=n},ec={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};ec.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},ec.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},ec.tlbr.get=function(){return this.tl.concat(this.br)},ec.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(Ql.prototype,ec);var tc=function(e,t){var r={},n={};this.haveRenderCallbacks=[];var i=[];this.addImages(e,r,i),this.addImages(t,n,i);var a=Jl(i),o=a.w,s=a.h,l=new Xo({width:o||1,height:s||1});for(var c in e){var u=e[c],h=r[c].paddedRect;Xo.copy(u.data,l,{x:0,y:0},{x:h.x+1,y:h.y+1},u.data)}for(var f in t){var p=t[f],d=n[f].paddedRect,m=d.x+1,g=d.y+1,y=p.data.width,v=p.data.height;Xo.copy(p.data,l,{x:0,y:0},{x:m,y:g},p.data),Xo.copy(p.data,l,{x:0,y:v-1},{x:m,y:g-1},{width:y,height:1}),Xo.copy(p.data,l,{x:0,y:0},{x:m,y:g+v},{width:y,height:1}),Xo.copy(p.data,l,{x:y-1,y:0},{x:m-1,y:g},{width:1,height:v}),Xo.copy(p.data,l,{x:0,y:0},{x:m+y,y:g},{width:1,height:v})}this.image=l,this.iconPositions=r,this.patternPositions=n};tc.prototype.addImages=function(e,t,r){for(var n in e){var i=e[n],a={x:0,y:0,w:i.data.width+2,h:i.data.height+2};r.push(a),t[n]=new Ql(a,i),i.hasRenderCallback&&this.haveRenderCallbacks.push(n)}},tc.prototype.patchUpdatedImages=function(e,t){for(var r in e.dispatchRenderCallbacks(this.haveRenderCallbacks),e.updatedImages)this.patchUpdatedImage(this.iconPositions[r],e.getImage(r),t),this.patchUpdatedImage(this.patternPositions[r],e.getImage(r),t)},tc.prototype.patchUpdatedImage=function(e,t,r){if(e&&t&&e.version!==t.version){e.version=t.version;var n=e.tl,i=n[0],a=n[1];r.update(t.data,void 0,{x:i,y:a})}},ii("ImagePosition",Ql),ii("ImageAtlas",tc);var rc={horizontal:1,vertical:2,horizontalOnly:3},nc=-17,ic=function(){this.scale=1,this.fontStack="",this.imageName=null};ic.forText=function(e,t){var r=new ic;return r.scale=e||1,r.fontStack=t,r},ic.forImage=function(e){var t=new ic;return t.imageName=e,t};var ac=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};function oc(e,t,r,n,i,a,o,s,l,c,u,h,f,p,d,m){var g=ac.fromFeature(e,i);h===rc.vertical&&g.verticalizePunctuation();var y,v=Pi.processBidirectionalText,x=Pi.processStyledBidirectionalText;if(v&&1===g.sections.length){y=[];for(var _=0,b=v(g.toString(),dc(g,c,a,t,n,p,d));_0&&B>A&&(A=B)}else{var j=r[S.fontStack],N=j&&j[C];if(N&&N.rect)P=N.rect,L=N.metrics;else{var U=t[S.fontStack],V=U&&U[C];if(!V)continue;L=V.metrics}I=(b-S.scale)*Sl}O?(e.verticalizable=!0,k.push({glyph:C,imageName:z,x:f,y:p+I,vertical:O,scale:S.scale,fontStack:S.fontStack,sectionIndex:E,metrics:L,rect:P}),f+=D*S.scale+c):(k.push({glyph:C,imageName:z,x:f,y:p+I,vertical:O,scale:S.scale,fontStack:S.fontStack,sectionIndex:E,metrics:L,rect:P}),f+=L.advance*S.scale+c)}if(0!==k.length){var q=f-c;d=Math.max(q,d),gc(k,0,k.length-1,g,A)}f=0;var H=a*b+A;T.lineOffset=Math.max(A,w),p+=H,m=Math.max(H,m),++y}else p+=a,++y}var G=p-nc,W=mc(o),Z=W.horizontalAlign,Y=W.verticalAlign;(function(e,t,r,n,i,a,o,s,l){var c,u=(t-r)*i;c=a!==o?-s*n-nc:(-n*l+.5)*o;for(var h=0,f=e;h=0&&n>=e&&sc[this.text.charCodeAt(n)];n--)r--;this.text=this.text.substring(e,r),this.sectionIndex=this.sectionIndex.slice(e,r)},ac.prototype.substring=function(e,t){var r=new ac;return r.text=this.text.substring(e,t),r.sectionIndex=this.sectionIndex.slice(e,t),r.sections=this.sections,r},ac.prototype.toString=function(){return this.text},ac.prototype.getMaxScale=function(){var e=this;return this.sectionIndex.reduce((function(t,r){return Math.max(t,e.sections[r].scale)}),0)},ac.prototype.addTextSection=function(e,t){this.text+=e.text,this.sections.push(ic.forText(e.scale,e.fontStack||t));for(var r=this.sections.length-1,n=0;n=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var sc={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},lc={};function cc(e,t,r,n,i,a){if(t.imageName){var o=n[t.imageName];return o?o.displaySize[0]*t.scale*Sl/a+i:0}var s=r[t.fontStack],l=s&&s[e];return l?l.metrics.advance*t.scale+i:0}function uc(e,t,r,n){var i=Math.pow(e-t,2);return n?e=0,u=0,h=0;h-r/2;){if(--o<0)return!1;s-=e[o].dist(a),a=e[o]}s+=e[o].dist(e[o+1]),o++;for(var l=[],c=0;sn;)c-=l.shift().angleDelta;if(c>i)return!1;o++,s+=h.dist(f)}return!0}function Ac(e){for(var t=0,r=0;rc){var d=(c-l)/p,m=er(h.x,f.x,d),g=er(h.y,f.y,d),y=new vc(m,g,f.angleTo(h),u);return y._round(),!o||kc(e,y,s,o,t)?y:void 0}l+=p}}function Cc(e,t,r,n,i,a,o,s,l){var c=Mc(n,a,o),u=Sc(n,i),h=u*o,f=0===e[0].x||e[0].x===l||0===e[0].y||e[0].y===l;return t-h=0&&_=0&&b=0&&f+c<=u){var w=new vc(_,b,v,d);w._round(),(!n||kc(e,w,a,n,i))&&p.push(w)}}h+=y}return!s&&!p.length&&!o&&(p=Ic(e,h/2,r,n,i,a,o,!0,l)),p}function Lc(e,t,r,n,i){for(var o=[],s=0;s=n&&f.x>=n)&&(h.x>=n?h=new a(n,h.y+(f.y-h.y)*((n-h.x)/(f.x-h.x)))._round():f.x>=n&&(f=new a(n,h.y+(f.y-h.y)*((n-h.x)/(f.x-h.x)))._round()),!(h.y>=i&&f.y>=i)&&(h.y>=i?h=new a(h.x+(f.x-h.x)*((i-h.y)/(f.y-h.y)),i)._round():f.y>=i&&(f=new a(h.x+(f.x-h.x)*((i-h.y)/(f.y-h.y)),i)._round()),(!c||!h.equals(c[c.length-1]))&&(c=[h],o.push(c)),c.push(f)))))}return o}function Pc(e,t,r,n){var i=[],o=e.image,s=o.pixelRatio,l=o.paddedRect.w-2,c=o.paddedRect.h-2,u=e.right-e.left,h=e.bottom-e.top,f=o.stretchX||[[0,l]],p=o.stretchY||[[0,c]],d=function(e,t){return e+t[1]-t[0]},m=f.reduce(d,0),g=p.reduce(d,0),y=l-m,v=c-g,x=0,_=m,b=0,w=g,T=0,k=y,A=0,M=v;if(o.content&&n){var S=o.content;x=zc(f,0,S[0]),b=zc(p,0,S[1]),_=zc(f,S[0],S[2]),w=zc(p,S[1],S[3]),T=S[0]-x,A=S[1]-b,k=S[2]-S[0]-_,M=S[3]-S[1]-w}var E=function(n,i,l,c){var f=Oc(n.stretch-x,_,u,e.left),p=Rc(n.fixed-T,k,n.stretch,m),d=Oc(i.stretch-b,w,h,e.top),y=Rc(i.fixed-A,M,i.stretch,g),v=Oc(l.stretch-x,_,u,e.left),S=Rc(l.fixed-T,k,l.stretch,m),E=Oc(c.stretch-b,w,h,e.top),C=Rc(c.fixed-A,M,c.stretch,g),I=new a(f,d),L=new a(v,d),P=new a(v,E),z=new a(f,E),D=new a(p/s,y/s),O=new a(S/s,C/s),R=t*Math.PI/180;if(R){var F=Math.sin(R),B=Math.cos(R),j=[B,-F,F,B];I._matMult(j),L._matMult(j),z._matMult(j),P._matMult(j)}var N=n.stretch+n.fixed,U=l.stretch+l.fixed,V=i.stretch+i.fixed,q=c.stretch+c.fixed;return{tl:I,tr:L,bl:z,br:P,tex:{x:o.paddedRect.x+1+N,y:o.paddedRect.y+1+V,w:U-N,h:q-V},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:D,pixelOffsetBR:O,minFontScaleX:k/s/u,minFontScaleY:M/s/h,isSDF:r}};if(n&&(o.stretchX||o.stretchY))for(var C=Dc(f,y,m),I=Dc(p,v,g),L=0;L0&&(d=Math.max(10,d),this.circleDiameter=d)}else{var m=o.top*s-l,g=o.bottom*s+l,y=o.left*s-l,v=o.right*s+l,x=o.collisionPadding;if(x&&(y-=x[0]*s,m-=x[1]*s,v+=x[2]*s,g+=x[3]*s),u){var _=new a(y,m),b=new a(v,m),w=new a(y,g),T=new a(v,g),k=u*Math.PI/180;_._rotate(k),b._rotate(k),w._rotate(k),T._rotate(k),y=Math.min(_.x,b.x,w.x,T.x),v=Math.max(_.x,b.x,w.x,T.x),m=Math.min(_.y,b.y,w.y,T.y),g=Math.max(_.y,b.y,w.y,T.y)}e.emplaceBack(t.x,t.y,y,m,v,g,r,n,i)}this.boxEndIndex=e.length},Bc=function(e,t){if(void 0===e&&(e=[]),void 0===t&&(t=jc),this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)};function jc(e,t){return et?1:0}function Nc(e,t,r){void 0===t&&(t=1),void 0===r&&(r=!1);for(var n=1/0,i=1/0,o=-1/0,s=-1/0,l=e[0],c=0;co)&&(o=u.x),(!c||u.y>s)&&(s=u.y)}var h=o-n,f=s-i,p=Math.min(h,f),d=p/2,m=new Bc([],Uc);if(0===p)return new a(n,i);for(var g=n;gv.d||!v.d)&&(v=_,r&&console.log("found best %d after %d probes",Math.round(1e4*_.d)/1e4,x)),!(_.max-v.d<=t)&&(d=_.h/2,m.push(new Vc(_.p.x-d,_.p.y-d,d,e)),m.push(new Vc(_.p.x+d,_.p.y-d,d,e)),m.push(new Vc(_.p.x-d,_.p.y+d,d,e)),m.push(new Vc(_.p.x+d,_.p.y+d,d,e)),x+=4)}return r&&(console.log("num probes: "+x),console.log("best distance: "+v.d)),v.p}function Uc(e,t){return t.max-e.max}function Vc(e,t,r,n){this.p=new a(e,t),this.h=r,this.d=function(e,t){for(var r=!1,n=1/0,i=0;ie.y!=u.y>e.y&&e.x<(u.x-c.x)*(e.y-c.y)/(u.y-c.y)+c.x&&(r=!r),n=Math.min(n,So(e,c,u))}return(r?1:-1)*Math.sqrt(n)}(this.p,n),this.max=this.d+this.h*Math.SQRT2}Bc.prototype.push=function(e){this.data.push(e),this.length++,this._up(this.length-1)},Bc.prototype.pop=function(){if(0!==this.length){var e=this.data[0],t=this.data.pop();return this.length--,this.length>0&&(this.data[0]=t,this._down(0)),e}},Bc.prototype.peek=function(){return this.data[0]},Bc.prototype._up=function(e){for(var t=this.data,r=this.compare,n=t[e];e>0;){var i=e-1>>1,a=t[i];if(r(n,a)>=0)break;t[e]=a,e=i}t[e]=n},Bc.prototype._down=function(e){for(var t=this.data,r=this.compare,n=this.length>>1,i=t[e];e=0)break;t[e]=o,e=a}t[e]=i};var qc=Number.POSITIVE_INFINITY;function Hc(e,t){return t[1]!==qc?function(e,t,r){var n=0,i=0;switch(t=Math.abs(t),r=Math.abs(r),e){case"top-right":case"top-left":case"top":i=r-7;break;case"bottom-right":case"bottom-left":case"bottom":i=7-r}switch(e){case"top-right":case"bottom-right":case"right":n=-t;break;case"top-left":case"bottom-left":case"left":n=t}return[n,i]}(e,t[0],t[1]):function(e,t){var r=0,n=0;t<0&&(t=0);var i=t/Math.sqrt(2);switch(e){case"top-right":case"top-left":n=i-7;break;case"bottom-right":case"bottom-left":n=7-i;break;case"bottom":n=7-t;break;case"top":n=t-7}switch(e){case"top-right":case"bottom-right":r=-i;break;case"top-left":case"bottom-left":r=i;break;case"left":r=t;break;case"right":r=-t}return[r,n]}(e,t[0])}function Gc(e){switch(e){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}var Wc=255,Zc=32640;function Yc(e,t,r,n,i,o,s,l,c,u,h,f,p,d,m){var g=function(e,t,r,n,i,o,s,l){for(var c=n.layout.get("text-rotate").evaluate(o,{})*Math.PI/180,u=[],h=0,f=t.positionedLines;hZc&&k(e.layerIds[0]+': Value for "text-size" is >= '+Wc+'. Reduce your "text-size".'):"composite"===y.kind&&((v=[xc*d.compositeTextSizes[0].evaluate(s,{},m),xc*d.compositeTextSizes[1].evaluate(s,{},m)])[0]>Zc||v[1]>Zc)&&k(e.layerIds[0]+': Value for "text-size" is >= '+Wc+'. Reduce your "text-size".'),e.addSymbols(e.text,g,v,l,o,s,u,t,c.lineStartIndex,c.lineLength,p,m);for(var x=0,_=h;x<_.length;x+=1)f[_[x]]=e.text.placedSymbolArray.length-1;return 4*g.length}function Xc(e){for(var t in e)return e[t];return null}function $c(e,t,r,n){var i=e.compareText;if(t in i){for(var a=i[t],o=a.length-1;o>=0;o--)if(n.dist(a[o])0)&&("constant"!==a.value.kind||a.value.value.length>0),c="constant"!==s.value.kind||!!s.value.value||Object.keys(s.parameters).length>0,u=i.get("symbol-sort-key");if(this.features=[],l||c){for(var h=t.iconDependencies,f=t.glyphDependencies,p=t.availableImages,d=new zi(this.zoom),m=0,g=e;m=0;for(var z=0,D=k.sections;z=0;s--)a[s]={x:t[s].x,y:t[s].y,tileUnitDistanceFromAnchor:i},s>0&&(i+=t[s-1].dist(t[s]));for(var l=0;l0},iu.prototype.hasIconData=function(){return this.icon.segments.get().length>0},iu.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},iu.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},iu.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},iu.prototype.addIndicesForPlacedSymbol=function(e,t){for(var r=e.placedSymbolArray.get(t),n=r.vertexStartIndex+4*r.numGlyphs,i=r.vertexStartIndex;i1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var r=0,n=this.symbolInstanceIndexes;r=0&&n.indexOf(e)===r&&t.addIndicesForPlacedSymbol(t.text,e)})),a.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,a.verticalPlacedTextSymbolIndex),a.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.placedIconSymbolIndex),a.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},ii("SymbolBucket",iu,{omit:["layers","collisionBoxArray","features","compareText"]}),iu.MAX_GLYPHS=65535,iu.addDynamicAttributes=eu;var au=new Zi({"symbol-placement":new Vi(Oe.layout_symbol["symbol-placement"]),"symbol-spacing":new Vi(Oe.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Vi(Oe.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new qi(Oe.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Vi(Oe.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Vi(Oe.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Vi(Oe.layout_symbol["icon-ignore-placement"]),"icon-optional":new Vi(Oe.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Vi(Oe.layout_symbol["icon-rotation-alignment"]),"icon-size":new qi(Oe.layout_symbol["icon-size"]),"icon-text-fit":new Vi(Oe.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Vi(Oe.layout_symbol["icon-text-fit-padding"]),"icon-image":new qi(Oe.layout_symbol["icon-image"]),"icon-rotate":new qi(Oe.layout_symbol["icon-rotate"]),"icon-padding":new Vi(Oe.layout_symbol["icon-padding"]),"icon-keep-upright":new Vi(Oe.layout_symbol["icon-keep-upright"]),"icon-offset":new qi(Oe.layout_symbol["icon-offset"]),"icon-anchor":new qi(Oe.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Vi(Oe.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Vi(Oe.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Vi(Oe.layout_symbol["text-rotation-alignment"]),"text-field":new qi(Oe.layout_symbol["text-field"]),"text-font":new qi(Oe.layout_symbol["text-font"]),"text-size":new qi(Oe.layout_symbol["text-size"]),"text-max-width":new qi(Oe.layout_symbol["text-max-width"]),"text-line-height":new Vi(Oe.layout_symbol["text-line-height"]),"text-letter-spacing":new qi(Oe.layout_symbol["text-letter-spacing"]),"text-justify":new qi(Oe.layout_symbol["text-justify"]),"text-radial-offset":new qi(Oe.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Vi(Oe.layout_symbol["text-variable-anchor"]),"text-anchor":new qi(Oe.layout_symbol["text-anchor"]),"text-max-angle":new Vi(Oe.layout_symbol["text-max-angle"]),"text-writing-mode":new Vi(Oe.layout_symbol["text-writing-mode"]),"text-rotate":new qi(Oe.layout_symbol["text-rotate"]),"text-padding":new Vi(Oe.layout_symbol["text-padding"]),"text-keep-upright":new Vi(Oe.layout_symbol["text-keep-upright"]),"text-transform":new qi(Oe.layout_symbol["text-transform"]),"text-offset":new qi(Oe.layout_symbol["text-offset"]),"text-allow-overlap":new Vi(Oe.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Vi(Oe.layout_symbol["text-ignore-placement"]),"text-optional":new Vi(Oe.layout_symbol["text-optional"])}),ou=new Zi({"icon-opacity":new qi(Oe.paint_symbol["icon-opacity"]),"icon-color":new qi(Oe.paint_symbol["icon-color"]),"icon-halo-color":new qi(Oe.paint_symbol["icon-halo-color"]),"icon-halo-width":new qi(Oe.paint_symbol["icon-halo-width"]),"icon-halo-blur":new qi(Oe.paint_symbol["icon-halo-blur"]),"icon-translate":new Vi(Oe.paint_symbol["icon-translate"]),"icon-translate-anchor":new Vi(Oe.paint_symbol["icon-translate-anchor"]),"text-opacity":new qi(Oe.paint_symbol["text-opacity"]),"text-color":new qi(Oe.paint_symbol["text-color"],{runtimeType:Ze,getOverride:function(e){return e.textColor},hasOverride:function(e){return!!e.textColor}}),"text-halo-color":new qi(Oe.paint_symbol["text-halo-color"]),"text-halo-width":new qi(Oe.paint_symbol["text-halo-width"]),"text-halo-blur":new qi(Oe.paint_symbol["text-halo-blur"]),"text-translate":new Vi(Oe.paint_symbol["text-translate"]),"text-translate-anchor":new Vi(Oe.paint_symbol["text-translate-anchor"])}),su={paint:ou,layout:au},lu=function(e){this.type=e.property.overrides?e.property.overrides.runtimeType:qe,this.defaultValue=e};lu.prototype.evaluate=function(e){if(e.formattedSection){var t=this.defaultValue.property.overrides;if(t&&t.hasOverride(e.formattedSection))return t.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default},lu.prototype.eachChild=function(e){this.defaultValue.isConstant()||e(this.defaultValue.value._styleExpression.expression)},lu.prototype.outputDefined=function(){return!1},lu.prototype.serialize=function(){return null},ii("FormatSectionOverride",lu,{omit:["defaultValue"]});var cu=function(e){function t(t){e.call(this,t,su)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.recalculate=function(t,r){if(e.prototype.recalculate.call(this,t,r),"auto"===this.layout.get("icon-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){var n=this.layout.get("text-writing-mode");if(n){for(var i=[],a=0,o=n;a",targetMapId:n,sourceMapId:a.mapId})}}},Tu.prototype.receive=function(e){var t=e.data,r=t.id;if(r&&(!t.targetMapId||this.mapId===t.targetMapId))if(""===t.type){delete this.tasks[r];var n=this.cancelCallbacks[r];delete this.cancelCallbacks[r],n&&n()}else S()||t.mustQueue?(this.tasks[r]=t,this.taskQueue.push(r),this.invoker.trigger()):this.processTask(r,t)},Tu.prototype.process=function(){if(this.taskQueue.length){var e=this.taskQueue.shift(),t=this.tasks[e];delete this.tasks[e],this.taskQueue.length&&this.invoker.trigger(),t&&this.processTask(e,t)}},Tu.prototype.processTask=function(e,t){var r=this;if(""===t.type){var n=this.callbacks[e];delete this.callbacks[e],n&&(t.error?n(ci(t.error)):n(null,ci(t.data)))}else{var i=!1,a=I(this.globalScope)?void 0:[],o=t.hasCallback?function(t,n){i=!0,delete r.cancelCallbacks[e],r.target.postMessage({id:e,type:"",sourceMapId:r.mapId,error:t?li(t):null,data:li(n,a)},a)}:function(e){i=!0},s=null,l=ci(t.data);if(this.parent[t.type])s=this.parent[t.type](t.sourceMapId,l,o);else if(this.parent.getWorkerSource){var c=t.type.split(".");s=this.parent.getWorkerSource(t.sourceMapId,c[0],l.source)[c[1]](l,o)}else o(new Error("Could not find function "+t.type));!i&&s&&s.cancel&&(this.cancelCallbacks[e]=s.cancel)}},Tu.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var Au=function(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1]))};Au.prototype.setNorthEast=function(e){return this._ne=e instanceof Su?new Su(e.lng,e.lat):Su.convert(e),this},Au.prototype.setSouthWest=function(e){return this._sw=e instanceof Su?new Su(e.lng,e.lat):Su.convert(e),this},Au.prototype.extend=function(e){var t,r,n=this._sw,i=this._ne;if(e instanceof Su)t=e,r=e;else{if(!(e instanceof Au)){if(Array.isArray(e)){if(4===e.length||e.every(Array.isArray)){var a=e;return this.extend(Au.convert(a))}var o=e;return this.extend(Su.convert(o))}return this}if(t=e._sw,r=e._ne,!t||!r)return this}return n||i?(n.lng=Math.min(t.lng,n.lng),n.lat=Math.min(t.lat,n.lat),i.lng=Math.max(r.lng,i.lng),i.lat=Math.max(r.lat,i.lat)):(this._sw=new Su(t.lng,t.lat),this._ne=new Su(r.lng,r.lat)),this},Au.prototype.getCenter=function(){return new Su((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Au.prototype.getSouthWest=function(){return this._sw},Au.prototype.getNorthEast=function(){return this._ne},Au.prototype.getNorthWest=function(){return new Su(this.getWest(),this.getNorth())},Au.prototype.getSouthEast=function(){return new Su(this.getEast(),this.getSouth())},Au.prototype.getWest=function(){return this._sw.lng},Au.prototype.getSouth=function(){return this._sw.lat},Au.prototype.getEast=function(){return this._ne.lng},Au.prototype.getNorth=function(){return this._ne.lat},Au.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Au.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Au.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Au.prototype.contains=function(e){var t=Su.convert(e),r=t.lng,n=t.lat,i=this._sw.lat<=n&&n<=this._ne.lat,a=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(a=this._sw.lng>=r&&r>=this._ne.lng),i&&a},Au.convert=function(e){return!e||e instanceof Au?e:new Au(e)};var Mu=6371008.8,Su=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid LngLat object: ("+e+", "+t+")");if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Su.prototype.wrap=function(){return new Su(f(this.lng,-180,180),this.lat)},Su.prototype.toArray=function(){return[this.lng,this.lat]},Su.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Su.prototype.distanceTo=function(e){var t=Math.PI/180,r=this.lat*t,n=e.lat*t,i=Math.sin(r)*Math.sin(n)+Math.cos(r)*Math.cos(n)*Math.cos((e.lng-this.lng)*t);return Mu*Math.acos(Math.min(i,1))},Su.prototype.toBounds=function(e){void 0===e&&(e=0);var t=360*e/40075017,r=t/Math.cos(Math.PI/180*this.lat);return new Au(new Su(this.lng-r,this.lat-t),new Su(this.lng+r,this.lat+t))},Su.convert=function(e){if(e instanceof Su)return e;if(Array.isArray(e)&&(2===e.length||3===e.length))return new Su(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&"object"==typeof e&&null!==e)return new Su(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var Eu=2*Math.PI*Mu;function Cu(e){return Eu*Math.cos(e*Math.PI/180)}function Iu(e){return(180+e)/360}function Lu(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function Pu(e,t){return e/Cu(t)}function zu(e){var t=180-360*e;return 360/Math.PI*Math.atan(Math.exp(t*Math.PI/180))-90}var Du=function(e,t,r){void 0===r&&(r=0),this.x=+e,this.y=+t,this.z=+r};Du.fromLngLat=function(e,t){void 0===t&&(t=0);var r=Su.convert(e);return new Du(Iu(r.lng),Lu(r.lat),Pu(t,r.lat))},Du.prototype.toLngLat=function(){return new Su(function(e){return 360*e-180}(this.x),zu(this.y))},Du.prototype.toAltitude=function(){return function(e,t){return e*Cu(zu(t))}(this.z,this.y)},Du.prototype.meterInMercatorCoordinateUnits=function(){return 1/Eu*function(e){return 1/Math.cos(e*Math.PI/180)}(zu(this.y))};var Ou=function(e,t,r){this.z=e,this.x=t,this.y=r,this.key=Bu(0,e,e,t,r)};Ou.prototype.equals=function(e){return this.z===e.z&&this.x===e.x&&this.y===e.y},Ou.prototype.url=function(e,t){var r=function(e,t,r){var n=ku(256*e,256*(t=Math.pow(2,r)-t-1),r),i=ku(256*(e+1),256*(t+1),r);return n[0]+","+n[1]+","+i[0]+","+i[1]}(this.x,this.y,this.z),n=function(e,t,r){for(var n,i="",a=e;a>0;a--)i+=(t&(n=1<this.canonical.z?new Fu(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Fu(e,this.wrap,e,this.canonical.x>>t,this.canonical.y>>t)},Fu.prototype.calculateScaledKey=function(e,t){var r=this.canonical.z-e;return e>this.canonical.z?Bu(this.wrap*+t,e,this.canonical.z,this.canonical.x,this.canonical.y):Bu(this.wrap*+t,e,e,this.canonical.x>>r,this.canonical.y>>r)},Fu.prototype.isChildOf=function(e){if(e.wrap!==this.wrap)return!1;var t=this.canonical.z-e.canonical.z;return 0===e.overscaledZ||e.overscaledZ>t&&e.canonical.y===this.canonical.y>>t},Fu.prototype.children=function(e){if(this.overscaledZ>=e)return[new Fu(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var t=this.canonical.z+1,r=2*this.canonical.x,n=2*this.canonical.y;return[new Fu(t,this.wrap,t,r,n),new Fu(t,this.wrap,t,r+1,n),new Fu(t,this.wrap,t,r,n+1),new Fu(t,this.wrap,t,r+1,n+1)]},Fu.prototype.isLessThan=function(e){return this.wrape.wrap)&&(this.overscaledZe.overscaledZ)&&(this.canonical.xe.canonical.x)&&this.canonical.y=this.dim+1||t<-1||t>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(t+1)*this.stride+(e+1)},ju.prototype._unpackMapbox=function(e,t,r){return(256*e*256+256*t+r)/10-1e4},ju.prototype._unpackTerrarium=function(e,t,r){return 256*e+t+r/256-32768},ju.prototype.getPixels=function(){return new Xo({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},ju.prototype.backfillBorder=function(e,t,r){if(this.dim!==e.dim)throw new Error("dem dimension mismatch");var n=t*this.dim,i=t*this.dim+this.dim,a=r*this.dim,o=r*this.dim+this.dim;switch(t){case-1:n=i-1;break;case 1:i=n+1}switch(r){case-1:a=o-1;break;case 1:o=a+1}for(var s=-t*this.dim,l=-r*this.dim,c=a;c=0&&u[3]>=0&&s.insert(o,u[0],u[1],u[2],u[3])}},Hu.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Ks.VectorTile(new Il(this.rawTileData)).layers,this.sourceLayerCoder=new Nu(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Hu.prototype.query=function(e,t,r,n){var i=this;this.loadVTLayers();for(var o=e.params||{},s=fo/e.tileSize/e.scale,l=Tn(o.filter),c=e.queryGeometry,u=e.queryPadding*s,h=Wu(c),f=this.grid.query(h.minX-u,h.minY-u,h.maxX+u,h.maxY+u),p=Wu(e.cameraQueryGeometry),d=this.grid3D.query(p.minX-u,p.minY-u,p.maxX+u,p.maxY+u,(function(t,r,n,i){return function(e,t,r,n,i){for(var o=0,s=e;o=l.x&&i>=l.y)return!0}var c=[new a(t,r),new a(t,i),new a(n,i),new a(n,r)];if(e.length>2)for(var u=0,h=c;u=0)return!0;return!1}(a,h)){var f=this.sourceLayerCoder.decode(r),d=this.vtLayers[f].feature(n);if(i.needGeometry){var m=yo(d,!0);if(!i.filter(new zi(this.tileID.overscaledZ),m,this.tileID.canonical))return}else if(!i.filter(new zi(this.tileID.overscaledZ),d))return;for(var g=this.getId(d,f),y=0;yn)i=!1;else if(t)if(this.expirationTimefe&&(e.getActor().send("enforceCacheSizeLimit",he),ge=0)},e.clamp=h,e.clearTileCache=function(e){var t=s.caches.delete(ue);e&&t.catch(e).then((function(){return e()}))},e.clipLine=Lc,e.clone=function(e){var t=new Ro(16);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},e.clone$1=w,e.clone$2=function(e){var t=new Ro(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},e.collisionCircleLayout=kl,e.config=N,e.create=function(){var e=new Ro(16);return Ro!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e},e.create$1=function(){var e=new Ro(9);return Ro!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e},e.create$2=function(){var e=new Ro(4);return Ro!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e},e.createCommonjsModule=t,e.createExpression=cn,e.createLayout=Qi,e.createStyleLayer=function(e){return"custom"===e.type?new du(e):new mu[e.type](e)},e.cross=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[0],s=r[1],l=r[2];return e[0]=i*l-a*s,e[1]=a*o-n*l,e[2]=n*s-i*o,e},e.deepEqual=function e(t,r){if(Array.isArray(t)){if(!Array.isArray(r)||t.length!==r.length)return!1;for(var n=0;n0&&(a=1/Math.sqrt(a)),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a,e},e.number=er,e.offscreenCanvasSupported=ye,e.ortho=function(e,t,r,n,i,a,o){var s=1/(t-r),l=1/(n-i),c=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*s,e[13]=(i+n)*l,e[14]=(o+a)*c,e[15]=1,e},e.parseGlyphPBF=function(e){return new Il(e).readFields(Xl,[])},e.pbf=Il,e.performSymbolLayout=function(e,t,r,n,i,a,o){e.createArrays();var s=512*e.overscaling;e.tilePixelRatio=fo/s,e.compareText={},e.iconsNeedLinear=!1;var l=e.layers[0].layout,c=e.layers[0]._unevaluatedLayout._values,u={};if("composite"===e.textSizeData.kind){var h=e.textSizeData,f=h.minZoom,p=h.maxZoom;u.compositeTextSizes=[c["text-size"].possiblyEvaluate(new zi(f),o),c["text-size"].possiblyEvaluate(new zi(p),o)]}if("composite"===e.iconSizeData.kind){var d=e.iconSizeData,m=d.minZoom,g=d.maxZoom;u.compositeIconSizes=[c["icon-size"].possiblyEvaluate(new zi(m),o),c["icon-size"].possiblyEvaluate(new zi(g),o)]}u.layoutTextSize=c["text-size"].possiblyEvaluate(new zi(e.zoom+1),o),u.layoutIconSize=c["icon-size"].possiblyEvaluate(new zi(e.zoom+1),o),u.textMaxSize=c["text-size"].possiblyEvaluate(new zi(18));for(var y=l.get("text-line-height")*Sl,v="map"===l.get("text-rotation-alignment")&&"point"!==l.get("symbol-placement"),x=l.get("text-keep-upright"),_=l.get("text-size"),b=function(){var a=T[w],s=l.get("text-font").evaluate(a,{},o).join(","),c=_.evaluate(a,{},o),h=u.layoutTextSize.evaluate(a,{},o),f=u.layoutIconSize.evaluate(a,{},o),p={horizontal:{},vertical:void 0},d=a.text,m=[0,0];if(d){var g=d.toString(),b=l.get("text-letter-spacing").evaluate(a,{},o)*Sl,A=function(e){for(var t=0,r=e;t=fo||h.y<0||h.y>=fo||function(e,t,r,n,i,a,o,s,l,c,u,h,f,p,d,m,g,y,v,x,_,b,w,T,A){var M,S,E,C,I,L=e.addToLineVertexArray(t,r),P=0,z=0,D=0,O=0,R=-1,F=-1,B={},j=ja(""),N=0,U=0;if(void 0===s._unevaluatedLayout.getValue("text-radial-offset")?(N=(M=s.layout.get("text-offset").evaluate(_,{},T).map((function(e){return e*Sl})))[0],U=M[1]):(N=s.layout.get("text-radial-offset").evaluate(_,{},T)*Sl,U=qc),e.allowVerticalPlacement&&n.vertical){var V=s.layout.get("text-rotate").evaluate(_,{},T)+90,q=n.vertical;C=new Fc(l,t,c,u,h,q,f,p,d,V),o&&(I=new Fc(l,t,c,u,h,o,g,y,d,V))}if(i){var H=s.layout.get("icon-rotate").evaluate(_,{}),G="none"!==s.layout.get("icon-text-fit"),W=Pc(i,H,w,G),Z=o?Pc(o,H,w,G):void 0;E=new Fc(l,t,c,u,h,i,g,y,!1,H),P=4*W.length;var Y=e.iconSizeData,X=null;"source"===Y.kind?(X=[xc*s.layout.get("icon-size").evaluate(_,{})])[0]>Zc&&k(e.layerIds[0]+': Value for "icon-size" is >= '+Wc+'. Reduce your "icon-size".'):"composite"===Y.kind&&((X=[xc*b.compositeIconSizes[0].evaluate(_,{},T),xc*b.compositeIconSizes[1].evaluate(_,{},T)])[0]>Zc||X[1]>Zc)&&k(e.layerIds[0]+': Value for "icon-size" is >= '+Wc+'. Reduce your "icon-size".'),e.addSymbols(e.icon,W,X,x,v,_,!1,t,L.lineStartIndex,L.lineLength,-1,T),R=e.icon.placedSymbolArray.length-1,Z&&(z=4*Z.length,e.addSymbols(e.icon,Z,X,x,v,_,rc.vertical,t,L.lineStartIndex,L.lineLength,-1,T),F=e.icon.placedSymbolArray.length-1)}for(var $ in n.horizontal){var K=n.horizontal[$];if(!S){j=ja(K.text);var J=s.layout.get("text-rotate").evaluate(_,{},T);S=new Fc(l,t,c,u,h,K,f,p,d,J)}var Q=1===K.positionedLines.length;if(D+=Yc(e,t,K,a,s,d,_,m,L,n.vertical?rc.horizontal:rc.horizontalOnly,Q?Object.keys(n.horizontal):[$],B,R,b,T),Q)break}n.vertical&&(O+=Yc(e,t,n.vertical,a,s,d,_,m,L,rc.vertical,["vertical"],B,F,b,T));var ee=S?S.boxStartIndex:e.collisionBoxArray.length,te=S?S.boxEndIndex:e.collisionBoxArray.length,re=C?C.boxStartIndex:e.collisionBoxArray.length,ne=C?C.boxEndIndex:e.collisionBoxArray.length,ie=E?E.boxStartIndex:e.collisionBoxArray.length,ae=E?E.boxEndIndex:e.collisionBoxArray.length,oe=I?I.boxStartIndex:e.collisionBoxArray.length,se=I?I.boxEndIndex:e.collisionBoxArray.length,le=-1,ce=function(e,t){return e&&e.circleDiameter?Math.max(e.circleDiameter,t):t};le=ce(S,le),le=ce(C,le),le=ce(E,le);var ue=(le=ce(I,le))>-1?1:0;ue&&(le*=A/Sl),e.glyphOffsetArray.length>=iu.MAX_GLYPHS&&k("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==_.sortKey&&e.addToSortKeyRanges(e.symbolInstances.length,_.sortKey),e.symbolInstances.emplaceBack(t.x,t.y,B.right>=0?B.right:-1,B.center>=0?B.center:-1,B.left>=0?B.left:-1,B.vertical||-1,R,F,j,ee,te,re,ne,ie,ae,oe,se,c,D,O,P,z,ue,0,f,N,U,le)}(e,h,s,r,n,i,f,e.layers[0],e.collisionBoxArray,t.index,t.sourceLayerIndex,e.index,y,b,A,l,x,w,M,d,t,a,c,u,o)};if("line"===S)for(var L=0,P=Lc(t.geometry,0,0,fo,fo);L1){var N=Ec(j,T,r.vertical||m,n,24,v);N&&I(j,N)}}else if("Polygon"===t.type)for(var U=0,V=Ds(t.geometry,0);U=k.maxzoom||"none"===k.visibility||(o(T,this.zoom,n),(h[k.id]=k.createBucket({index:u.bucketLayerIDs.length,layers:T,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:g,sourceID:this.source})).populate(y,f,this.tileID.canonical),u.bucketLayerIDs.push(T.map((function(e){return e.id}))))}}}var A,M,S,E,C=e.mapObject(f.glyphDependencies,(function(e){return Object.keys(e).map(Number)}));Object.keys(C).length?a.send("getGlyphs",{uid:this.uid,stacks:C},(function(e,t){A||(A=e,M=t,P.call(l))})):M={};var I=Object.keys(f.iconDependencies);I.length?a.send("getImages",{icons:I,source:this.source,tileID:this.tileID,type:"icons"},(function(e,t){A||(A=e,S=t,P.call(l))})):S={};var L=Object.keys(f.patternDependencies);function P(){if(A)return s(A);if(M&&S&&E){var t=new i(M),r=new e.ImageAtlas(S,E);for(var a in h){var l=h[a];l instanceof e.SymbolBucket?(o(l.layers,this.zoom,n),e.performSymbolLayout(l,M,t.positions,S,r.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):l.hasPattern&&(l instanceof e.LineBucket||l instanceof e.FillBucket||l instanceof e.FillExtrusionBucket)&&(o(l.layers,this.zoom,n),l.addFeatures(f,this.tileID.canonical,r.patternPositions))}this.status="done",s(null,{buckets:e.values(h).filter((function(e){return!e.isEmpty()})),featureIndex:u,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:t.image,imageAtlas:r,glyphMap:this.returnDependencies?M:null,iconMap:this.returnDependencies?S:null,glyphPositions:this.returnDependencies?t.positions:null})}}L.length?a.send("getImages",{icons:L,source:this.source,tileID:this.tileID,type:"patterns"},(function(e,t){A||(A=e,E=t,P.call(l))})):E={},P.call(this)};var l=function(e,t,r,n){this.actor=e,this.layerIndex=t,this.availableImages=r,this.loadVectorData=n||s,this.loading={},this.loaded={}};l.prototype.loadTile=function(t,r){var n=this,i=t.uid;this.loading||(this.loading={});var o=!!(t&&t.request&&t.request.collectResourceTiming)&&new e.RequestPerformance(t.request),s=this.loading[i]=new a(t);s.abort=this.loadVectorData(t,(function(t,a){if(delete n.loading[i],t||!a)return s.status="done",n.loaded[i]=s,r(t);var l=a.rawData,c={};a.expires&&(c.expires=a.expires),a.cacheControl&&(c.cacheControl=a.cacheControl);var u={};if(o){var h=o.finish();h&&(u.resourceTiming=JSON.parse(JSON.stringify(h)))}s.vectorTile=a.vectorTile,s.parse(a.vectorTile,n.layerIndex,n.availableImages,n.actor,(function(t,n){if(t||!n)return r(t);r(null,e.extend({rawTileData:l.slice(0)},n,c,u))})),n.loaded=n.loaded||{},n.loaded[i]=s}))},l.prototype.reloadTile=function(e,t){var r=this,n=this.loaded,i=e.uid,a=this;if(n&&n[i]){var o=n[i];o.showCollisionBoxes=e.showCollisionBoxes;var s=function(e,n){var i=o.reloadCallback;i&&(delete o.reloadCallback,o.parse(o.vectorTile,a.layerIndex,r.availableImages,a.actor,i)),t(e,n)};"parsing"===o.status?o.reloadCallback=s:"done"===o.status&&(o.vectorTile?o.parse(o.vectorTile,this.layerIndex,this.availableImages,this.actor,s):s())}},l.prototype.abortTile=function(e,t){var r=this.loading,n=e.uid;r&&r[n]&&r[n].abort&&(r[n].abort(),delete r[n]),t()},l.prototype.removeTile=function(e,t){var r=this.loaded,n=e.uid;r&&r[n]&&delete r[n],t()};var c=e.window.ImageBitmap,u=function(){this.loaded={}};u.prototype.loadTile=function(t,r){var n=t.uid,i=t.encoding,a=t.rawImageData,o=c&&a instanceof c?this.getImageData(a):a,s=new e.DEMData(n,o,i);this.loaded=this.loaded||{},this.loaded[n]=s,r(null,s)},u.prototype.getImageData=function(t){(!this.offscreenCanvas||!this.offscreenCanvasContext)&&(this.offscreenCanvas=new OffscreenCanvas(t.width,t.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=t.width,this.offscreenCanvas.height=t.height,this.offscreenCanvasContext.drawImage(t,0,0,t.width,t.height);var r=this.offscreenCanvasContext.getImageData(-1,-1,t.width+2,t.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new e.RGBAImage({width:r.width,height:r.height},r.data)},u.prototype.removeTile=function(e){var t=this.loaded,r=e.uid;t&&t[r]&&delete t[r]};var h=function e(t,r){var n,i=t&&t.type;if("FeatureCollection"===i)for(n=0;n=0!=!!t&&e.reverse()}var d=e.vectorTile.VectorTileFeature.prototype.toGeoJSON,m=function(t){this._feature=t,this.extent=e.EXTENT,this.type=t.type,this.properties=t.tags,"id"in t&&!isNaN(t.id)&&(this.id=parseInt(t.id,10))};m.prototype.loadGeometry=function(){if(1===this._feature.type){for(var t=[],r=0,n=this._feature.geometry;r"u"&&(n.push(s),l=n.length-1,a[s]=l),t.writeVarint(l);var c=r.properties[s],u=typeof c;"string"!==u&&"boolean"!==u&&"number"!==u&&(c=JSON.stringify(c));var h=u+":"+c,f=o[h];typeof f>"u"&&(i.push(c),f=i.length-1,o[h]=f),t.writeVarint(f)}}function E(e,t){return(t<<3)+(7&e)}function C(e){return e<<1^e>>31}function I(e,t){for(var r=e.loadGeometry(),n=e.type,i=0,a=0,o=r.length,s=0;s>1;z(e,t,o,n,i,a%2),P(e,t,r,n,o-1,a+1),P(e,t,r,o+1,i,a+1)}}function z(e,t,r,n,i,a){for(;i>n;){if(i-n>600){var o=i-n+1,s=r-n+1,l=Math.log(o),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(o-c)/o)*(s-o/2<0?-1:1);z(e,t,r,Math.max(n,Math.floor(r-s*c/o+u)),Math.min(i,Math.floor(r+(o-s)*c/o+u)),a)}var h=t[2*r+a],f=n,p=i;for(D(e,t,n,r),t[2*i+a]>h&&D(e,t,n,i);fh;)p--}t[2*n+a]===h?D(e,t,n,p):D(e,t,++p,i),p<=r&&(n=p+1),r<=p&&(i=p-1)}}function D(e,t,r,n){O(e,r,n),O(t,2*r,2*n),O(t,2*r+1,2*n+1)}function O(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function R(e,t,r,n){var i=e-r,a=t-n;return i*i+a*a}b.fromVectorTileJs=w,b.fromGeojsonVt=function(e,t){t=t||{};var r={};for(var n in e)r[n]=new v(e[n].features,t),r[n].name=n,r[n].version=t.version,r[n].extent=t.extent;return k({layers:r})},b.GeoJSONWrapper=T;var F=function(e){return e[0]},B=function(e){return e[1]},j=function(e,t,r,n,i){void 0===t&&(t=F),void 0===r&&(r=B),void 0===n&&(n=64),void 0===i&&(i=Float64Array),this.nodeSize=n,this.points=e;for(var a=e.length<65536?Uint16Array:Uint32Array,o=this.ids=new a(e.length),s=this.coords=new i(2*e.length),l=0;l=r&&s<=i&&l>=n&&l<=a&&u.push(e[d]);else{var m=Math.floor((p+f)/2);s=t[2*m],l=t[2*m+1],s>=r&&s<=i&&l>=n&&l<=a&&u.push(e[m]);var g=(h+1)%2;(0===h?r<=s:n<=l)&&(c.push(p),c.push(m-1),c.push(g)),(0===h?i>=s:a>=l)&&(c.push(m+1),c.push(f),c.push(g))}}return u}(this.ids,this.coords,e,t,r,n,this.nodeSize)},j.prototype.within=function(e,t,r){return function(e,t,r,n,i,a){for(var o=[0,e.length-1,0],s=[],l=i*i;o.length;){var c=o.pop(),u=o.pop(),h=o.pop();if(u-h<=a)for(var f=h;f<=u;f++)R(t[2*f],t[2*f+1],r,n)<=l&&s.push(e[f]);else{var p=Math.floor((h+u)/2),d=t[2*p],m=t[2*p+1];R(d,m,r,n)<=l&&s.push(e[p]);var g=(c+1)%2;(0===c?r-i<=d:n-i<=m)&&(o.push(h),o.push(p-1),o.push(g)),(0===c?r+i>=d:n+i>=m)&&(o.push(p+1),o.push(u),o.push(g))}}return s}(this.ids,this.coords,e,t,r,this.nodeSize)};var N={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(e){return e}},U=function(e){this.options=$(Object.create(N),e),this.trees=new Array(this.options.maxZoom+1)};function V(e,t,r,n,i){return{x:e,y:t,zoom:1/0,id:r,parentId:-1,numPoints:n,properties:i}}function q(e,t){var r=e.geometry.coordinates,n=r[0],i=r[1];return{x:W(n),y:Z(i),zoom:1/0,index:t,parentId:-1}}function H(e){return{type:"Feature",id:e.id,properties:G(e),geometry:{type:"Point",coordinates:[Y(e.x),X(e.y)]}}}function G(e){var t=e.numPoints,r=t>=1e4?Math.round(t/1e3)+"k":t>=1e3?Math.round(t/100)/10+"k":t;return $($({},e.properties),{cluster:!0,cluster_id:e.id,point_count:t,point_count_abbreviated:r})}function W(e){return e/360+.5}function Z(e){var t=Math.sin(e*Math.PI/180),r=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return r<0?0:r>1?1:r}function Y(e){return 360*(e-.5)}function X(e){var t=(180-360*e)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}function $(e,t){for(var r in t)e[r]=t[r];return e}function K(e){return e.x}function J(e){return e.y}function Q(e,t,r,n){for(var i,a=n,o=r-t>>1,s=r-t,l=e[t],c=e[t+1],u=e[r],h=e[r+1],f=t+3;fa)i=f,a=p;else if(p===a){var d=Math.abs(f-o);dn&&(i-t>3&&Q(e,t,i,n),e[i+2]=a,r-i>3&&Q(e,i,r,n))}function ee(e,t,r,n,i,a){var o=i-r,s=a-n;if(0!==o||0!==s){var l=((e-r)*o+(t-n)*s)/(o*o+s*s);l>1?(r=i,n=a):l>0&&(r+=o*l,n+=s*l)}return(o=e-r)*o+(s=t-n)*s}function te(e,t,r,n){var i={id:typeof e>"u"?null:e,type:t,geometry:r,tags:n,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(e){var t=e.geometry,r=e.type;if("Point"===r||"MultiPoint"===r||"LineString"===r)re(e,t);else if("Polygon"===r||"MultiLineString"===r)for(var n=0;n0&&(o+=n?(i*c-l*a)/2:Math.sqrt(Math.pow(l-i,2)+Math.pow(c-a,2))),i=l,a=c}var u=t.length-3;t[2]=1,Q(t,0,u,r),t[u+2]=1,t.size=Math.abs(o),t.start=0,t.end=t.size}function oe(e,t,r,n){for(var i=0;i1?1:r}function ce(e,t,r,n,i,a,o,s){if(n/=t,a>=(r/=t)&&o=n)return null;for(var l=[],c=0;c=r&&d=n)){var m=[];if("Point"===f||"MultiPoint"===f)ue(h,m,r,n,i);else if("LineString"===f)he(h,m,r,n,i,!1,s.lineMetrics);else if("MultiLineString"===f)pe(h,m,r,n,i,!1);else if("Polygon"===f)pe(h,m,r,n,i,!0);else if("MultiPolygon"===f)for(var g=0;g=r&&o<=n&&(t.push(e[a]),t.push(e[a+1]),t.push(e[a+2]))}}function he(e,t,r,n,i,a,o){for(var s,l,c=fe(e),u=0===i?me:ge,h=e.start,f=0;fr&&(l=u(c,p,d,g,y,r),o&&(c.start=h+s*l)):v>n?x=r&&(l=u(c,p,d,g,y,r),_=!0),x>n&&v<=n&&(l=u(c,p,d,g,y,n),_=!0),!a&&_&&(o&&(c.end=h+s*l),t.push(c),c=fe(e)),o&&(h+=s)}var b=e.length-3;p=e[b],d=e[b+1],m=e[b+2],(v=0===i?p:d)>=r&&v<=n&&de(c,p,d,m),b=c.length-3,a&&b>=3&&(c[b]!==c[0]||c[b+1]!==c[1])&&de(c,c[0],c[1],c[2]),c.length&&t.push(c)}function fe(e){var t=[];return t.size=e.size,t.start=e.start,t.end=e.end,t}function pe(e,t,r,n,i,a){for(var o=0;oo.maxX&&(o.maxX=u),h>o.maxY&&(o.maxY=h)}return o}function we(e,t,r,n){var i=t.geometry,a=t.type,o=[];if("Point"===a||"MultiPoint"===a)for(var s=0;s0&&t.size<(i?o:n))r.numPoints+=t.length/3;else{for(var s=[],l=0;lo)&&(r.numSimplified++,s.push(t[l]),s.push(t[l+1])),r.numPoints++;i&&function(e,t){for(var r=0,n=0,i=e.length,a=i-2;n0===t)for(n=0,i=e.length;n24)throw new Error("maxZoom should be in the 0-24 range");if(t.promoteId&&t.generateId)throw new Error("promoteId and generateId cannot be used together.");var n=function(e,t){var r=[];if("FeatureCollection"===e.type)for(var n=0;n=n;c--){var u=+Date.now();s=this._cluster(s,c),this.trees[c]=new j(s,K,J,a,Float32Array),r&&console.log("z%d: %d clusters in %dms",c,s.length,+Date.now()-u)}return r&&console.timeEnd("total time"),this},U.prototype.getClusters=function(e,t){var r=((e[0]+180)%360+360)%360-180,n=Math.max(-90,Math.min(90,e[1])),i=180===e[2]?180:((e[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,i=180;else if(r>i){var o=this.getClusters([r,n,180,a],t),s=this.getClusters([-180,n,i,a],t);return o.concat(s)}for(var l=this.trees[this._limitZoom(t)],c=[],u=0,h=l.range(W(r),Z(a),W(i),Z(n));ut&&(d+=v.numPoints||1)}if(d>=s){for(var x=u.x*p,_=u.y*p,b=o&&p>1?this._map(u,!0):null,w=(c<<5)+(t+1)+this.points.length,T=0,k=f;T1)for(var E=0,C=f;E>5},U.prototype._getOriginZoom=function(e){return(e-this.points.length)%32},U.prototype._map=function(e,t){if(e.numPoints)return t?$({},e.properties):e.properties;var r=this.points[e.index].properties,n=this.options.map(r);return t&&n===r?$({},n):n},ke.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},ke.prototype.splitTile=function(e,t,r,n,i,a,o){for(var s=[e,t,r,n],l=this.options,c=l.debug;s.length;){n=s.pop(),r=s.pop(),t=s.pop(),e=s.pop();var u=1<1&&console.time("creation"),f=this.tiles[h]=be(e,t,r,n,l),this.tileCoords.push({z:t,x:r,y:n}),c)){c>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",t,r,n,f.numFeatures,f.numPoints,f.numSimplified),console.timeEnd("creation"));var p="z"+t;this.stats[p]=(this.stats[p]||0)+1,this.total++}if(f.source=e,i){if(t===l.maxZoom||t===i)continue;var d=1<1&&console.time("clipping");var m,g,y,v,x,_,b=.5*l.buffer/l.extent,w=.5-b,T=.5+b,k=1+b;m=g=y=v=null,x=ce(e,u,r-b,r+T,0,f.minX,f.maxX,l),_=ce(e,u,r+w,r+k,0,f.minX,f.maxX,l),e=null,x&&(m=ce(x,u,n-b,n+T,1,f.minY,f.maxY,l),g=ce(x,u,n+w,n+k,1,f.minY,f.maxY,l),x=null),_&&(y=ce(_,u,n-b,n+T,1,f.minY,f.maxY,l),v=ce(_,u,n+w,n+k,1,f.minY,f.maxY,l),_=null),c>1&&console.timeEnd("clipping"),s.push(m||[],t+1,2*r,2*n),s.push(g||[],t+1,2*r,2*n+1),s.push(y||[],t+1,2*r+1,2*n),s.push(v||[],t+1,2*r+1,2*n+1)}}},ke.prototype.getTile=function(e,t,r){var n=this.options,i=n.extent,a=n.debug;if(e<0||e>24)return null;var o=1<1&&console.log("drilling down to z%d-%d-%d",e,t,r);for(var l,c=e,u=t,h=r;!l&&c>0;)c--,u=Math.floor(u/2),h=Math.floor(h/2),l=this.tiles[Ae(c,u,h)];return l&&l.source?(a>1&&console.log("found parent tile z%d-%d-%d",c,u,h),a>1&&console.time("drilling down"),this.splitTile(l.source,c,u,h,e,t,r),a>1&&console.timeEnd("drilling down"),this.tiles[s]?xe(this.tiles[s],i):null):null};var Se=function(t){function r(e,r,n,i){t.call(this,e,r,n,Me),i&&(this.loadGeoJSON=i)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.loadData=function(e,t){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=t,this._pendingLoadDataParams=e,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},r.prototype._loadData=function(){var t=this;if(this._pendingCallback&&this._pendingLoadDataParams){var r=this._pendingCallback,n=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var i=!!(n&&n.request&&n.request.collectResourceTiming)&&new e.RequestPerformance(n.request);this.loadGeoJSON(n,(function(a,o){if(a||!o)return r(a);if("object"!=typeof o)return r(new Error("Input data given to '"+n.source+"' is not a valid GeoJSON object."));h(o,!0);try{if(n.filter){var s=e.createExpression(n.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===s.result)throw new Error(s.value.map((function(e){return e.key+": "+e.message})).join(", "));var l=o.features.filter((function(e){return s.value.evaluate({zoom:0},e)}));o={type:"FeatureCollection",features:l}}t._geoJSONIndex=n.cluster?new U(function(t){var r=t.superclusterOptions,n=t.clusterProperties;if(!n||!r)return r;for(var i={},a={},o={accumulated:null,zoom:0},s={properties:null},l=Object.keys(n),c=0,u=l;c=0?0:t.button},r.remove=function(e){e.parentNode&&e.parentNode.removeChild(e)};var f=function(t){function r(){t.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.RGBAImage({width:1,height:1}),this.dirty=!0}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.isLoaded=function(){return this.loaded},r.prototype.setLoaded=function(e){if(this.loaded!==e&&(this.loaded=e,e)){for(var t=0,r=this.requestors;t=0?1.2:1))}function y(e,t,r,n,i,a,o){for(var s=0;s65535)t(new Error("glyphs > 65535 not supported"));else if(a.ranges[s])t(null,{stack:r,id:i,glyph:o});else{var l=a.requests[s];l||(l=a.requests[s]=[],x.loadGlyphRange(r,s,n.url,n.requestManager,(function(e,t){if(t){for(var r in t)n._doesCharSupportLocalGlyph(+r)||(a.glyphs[+r]=t[+r]);a.ranges[s]=!0}for(var i=0,o=l;i1&&(l=e[++s]);var u=Math.abs(c-l.left),h=Math.abs(c-l.right),f=Math.min(u,h),p=void 0,d=i/r*(n+1);if(l.isDash){var m=n-Math.abs(d);p=Math.sqrt(f*f+m*m)}else p=n-Math.sqrt(f*f+d*d);this.data[o+c]=Math.max(0,Math.min(255,p+128))}},T.prototype.addRegularDash=function(e){for(var t=e.length-1;t>=0;--t){var r=e[t],n=e[t+1];r.zeroLength?e.splice(t,1):n&&n.isDash===r.isDash&&(n.left=r.left,e.splice(t,1))}var i=e[0],a=e[e.length-1];i.isDash===a.isDash&&(i.left=a.left-this.width,a.right=i.right+this.width);for(var o=this.width*this.nextRow,s=0,l=e[s],c=0;c1&&(l=e[++s]);var u=Math.abs(c-l.left),h=Math.abs(c-l.right),f=Math.min(u,h),p=l.isDash?f:-f;this.data[o+c]=Math.max(0,Math.min(255,p+128))}},T.prototype.addDash=function(t,r){var n=r?7:0,i=2*n+1;if(this.nextRow+i>this.height)return e.warnOnce("LineAtlas out of space"),null;for(var a=0,o=0;o=n&&t.x=i&&t.y0&&(l[new e.OverscaledTileID(t.overscaledZ,a,r.z,i,r.y-1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,t.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,s,r.z,o,r.y-1).key]={backfilled:!1}),r.y+10&&(n.resourceTiming=t._resourceTiming,t._resourceTiming=[]),t.fire(new e.Event("data",n))}}))},r.prototype.onAdd=function(e){this.map=e,this.load()},r.prototype.setData=function(t){var r=this;return this._data=t,this.fire(new e.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(t){if(t)r.fire(new e.ErrorEvent(t));else{var n={dataType:"source",sourceDataType:"content"};r._collectResourceTiming&&r._resourceTiming&&r._resourceTiming.length>0&&(n.resourceTiming=r._resourceTiming,r._resourceTiming=[]),r.fire(new e.Event("data",n))}})),this},r.prototype.getClusterExpansionZoom=function(e,t){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:e,source:this.id},t),this},r.prototype.getClusterChildren=function(e,t){return this.actor.send("geojson.getClusterChildren",{clusterId:e,source:this.id},t),this},r.prototype.getClusterLeaves=function(e,t,r,n){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:e,limit:t,offset:r},n),this},r.prototype._updateWorkerData=function(t){var r=this;this._loaded=!1;var n=e.extend({},this.workerOptions),i=this._data;"string"==typeof i?(n.request=this.map._requestManager.transformRequest(e.browser.resolveURL(i),e.ResourceType.Source),n.request.collectResourceTiming=this._collectResourceTiming):n.data=JSON.stringify(i),this.actor.send(this.type+".loadData",n,(function(e,i){r._removed||i&&i.abandoned||(r._loaded=!0,i&&i.resourceTiming&&i.resourceTiming[r.id]&&(r._resourceTiming=i.resourceTiming[r.id].slice(0)),r.actor.send(r.type+".coalesce",{source:n.source},null),t(e))}))},r.prototype.loaded=function(){return this._loaded},r.prototype.loadTile=function(t,r){var n=this,i=t.actor?"reloadTile":"loadTile";t.actor=this.actor;var a={type:this.type,uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:e.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};t.request=this.actor.send(i,a,(function(e,a){return delete t.request,t.unloadVectorData(),t.aborted?r(null):e?r(e):(t.loadVectorData(a,n.map.painter,"reloadTile"===i),r(null))}))},r.prototype.abortTile=function(e){e.request&&(e.request.cancel(),delete e.request),e.aborted=!0},r.prototype.unloadTile=function(e){e.unloadVectorData(),this.actor.send("removeTile",{uid:e.uid,type:this.type,source:this.id})},r.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},r.prototype.serialize=function(){return e.extend({},this._options,{type:this.type,data:this._data})},r.prototype.hasTransition=function(){return!1},r}(e.Evented),L=e.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),P=function(t){function r(e,r,n,i){t.call(this),this.id=e,this.dispatcher=n,this.coordinates=r.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(i),this.options=r}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.load=function(t,r){var n=this;this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this.url=this.options.url,e.getImage(this.map._requestManager.transformRequest(this.url,e.ResourceType.Image),(function(i,a){n._loaded=!0,i?n.fire(new e.ErrorEvent(i)):a&&(n.image=a,t&&(n.coordinates=t),r&&r(),n._finishLoading())}))},r.prototype.loaded=function(){return this._loaded},r.prototype.updateImage=function(e){var t=this;return this.image&&e.url?(this.options.url=e.url,this.load(e.coordinates,(function(){t.texture=null})),this):this},r.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})))},r.prototype.onAdd=function(e){this.map=e,this.load()},r.prototype.setCoordinates=function(t){var r=this;this.coordinates=t;var n=t.map(e.MercatorCoordinate.fromLngLat);this.tileID=function(t){for(var r=1/0,n=1/0,i=-1/0,a=-1/0,o=0,s=t;or.end(0)?this.fire(new e.ErrorEvent(new e.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+r.start(0)+" and "+r.end(0)+"-second mark."))):this.video.currentTime=t}},r.prototype.getVideo=function(){return this.video},r.prototype.onAdd=function(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},r.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var t=this.map.painter.context,r=t.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,L.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new e.Texture(t,this.video,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this.tiles){var i=this.tiles[n];"loaded"!==i.state&&(i.state="loaded",i.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this.video&&!this.video.paused},r}(P),D=function(t){function r(r,n,i,a){t.call(this,r,n,i,a),n.coordinates?(!Array.isArray(n.coordinates)||4!==n.coordinates.length||n.coordinates.some((function(e){return!Array.isArray(e)||2!==e.length||e.some((function(e){return"number"!=typeof e}))})))&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+r,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.ErrorEvent(new e.ValidationError("sources."+r,null,'missing required property "coordinates"'))),n.animate&&"boolean"!=typeof n.animate&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+r,null,'optional "animate" property must be a boolean value'))),n.canvas?"string"!=typeof n.canvas&&!(n.canvas instanceof e.window.HTMLCanvasElement)&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+r,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new e.ErrorEvent(new e.ValidationError("sources."+r,null,'missing required property "canvas"'))),this.options=n,this.animate=void 0===n.animate||n.animate}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof e.window.HTMLCanvasElement?this.options.canvas:e.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new e.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},r.prototype.getCanvas=function(){return this.canvas},r.prototype.onAdd=function(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()},r.prototype.onRemove=function(){this.pause()},r.prototype.prepare=function(){var t=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,t=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,t=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var r=this.map.painter.context,n=r.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=r.createVertexBuffer(this._boundsArray,L.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(t||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new e.Texture(r,this.canvas,n.RGBA,{premultiply:!0}),this.tiles){var a=this.tiles[i];"loaded"!==a.state&&(a.state="loaded",a.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this._playing},r.prototype._hasInvalidDimensions=function(){for(var e=0,t=[this.canvas.width,this.canvas.height];ethis.max){var o=this._getAndRemoveByKey(this.order[0]);o&&this.onRemove(o)}return this},j.prototype.has=function(e){return e.wrapped().key in this.data},j.prototype.getAndRemove=function(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null},j.prototype._getAndRemoveByKey=function(e){var t=this.data[e].shift();return t.timeout&&clearTimeout(t.timeout),0===this.data[e].length&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),t.value},j.prototype.getByKey=function(e){var t=this.data[e];return t?t[0].value:null},j.prototype.get=function(e){return this.has(e)?this.data[e.wrapped().key][0].value:null},j.prototype.remove=function(e,t){if(!this.has(e))return this;var r=e.wrapped().key,n=void 0===t?0:this.data[r].indexOf(t),i=this.data[r][n];return this.data[r].splice(n,1),i.timeout&&clearTimeout(i.timeout),0===this.data[r].length&&delete this.data[r],this.onRemove(i.value),this.order.splice(this.order.indexOf(r),1),this},j.prototype.setMaxSize=function(e){for(this.max=e;this.order.length>this.max;){var t=this._getAndRemoveByKey(this.order[0]);t&&this.onRemove(t)}return this},j.prototype.filter=function(e){var t=[];for(var r in this.data)for(var n=0,i=this.data[r];n1||(Math.abs(r)>1&&(1===Math.abs(r+i)?r+=i:1===Math.abs(r-i)&&(r-=i)),t.dem&&e.dem&&(e.dem.backfillBorder(t.dem,r,n),e.neighboringTiles&&e.neighboringTiles[a]&&(e.neighboringTiles[a].backfilled=!0)))}},r.prototype.getTile=function(e){return this.getTileByID(e.key)},r.prototype.getTileByID=function(e){return this._tiles[e]},r.prototype._retainLoadedChildren=function(e,t,r,n){for(var i in this._tiles){var a=this._tiles[i];if(!(n[i]||!a.hasData()||a.tileID.overscaledZ<=t||a.tileID.overscaledZ>r)){for(var o=a.tileID;a&&a.tileID.overscaledZ>t+1;){var s=a.tileID.scaledTo(a.tileID.overscaledZ-1);(a=this._tiles[s.key])&&a.hasData()&&(o=s)}for(var l=o;l.overscaledZ>t;)if(e[(l=l.scaledTo(l.overscaledZ-1)).key]){n[o.key]=o;break}}}},r.prototype.findLoadedParent=function(e,t){if(e.key in this._loadedParentTiles){var r=this._loadedParentTiles[e.key];return r&&r.tileID.overscaledZ>=t?r:null}for(var n=e.overscaledZ-1;n>=t;n--){var i=e.scaledTo(n),a=this._getLoadedTile(i);if(a)return a}},r.prototype._getLoadedTile=function(e){var t=this._tiles[e.key];return t&&t.hasData()?t:this._cache.getByKey(e.wrapped().key)},r.prototype.updateCacheSize=function(e){var t=(Math.ceil(e.width/this._source.tileSize)+1)*(Math.ceil(e.height/this._source.tileSize)+1),r=Math.floor(5*t),n="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,r):r;this._cache.setMaxSize(n)},r.prototype.handleWrapJump=function(e){var t=(e-(void 0===this._prevLng?e:this._prevLng))/360,r=Math.round(t);if(this._prevLng=e,r){var n={};for(var i in this._tiles){var a=this._tiles[i];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+r),n[a.tileID.key]=a}for(var o in this._tiles=n,this._timers)clearTimeout(this._timers[o]),delete this._timers[o];for(var s in this._tiles){var l=this._tiles[s];this._setTileReloadTimer(s,l)}}},r.prototype.update=function(t){var n=this;if(this.transform=t,this._sourceLoaded&&!this._paused){var i;this.updateCacheSize(t),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?i=t.getVisibleUnwrappedCoordinates(this._source.tileID).map((function(t){return new e.OverscaledTileID(t.canonical.z,t.wrap,t.canonical.z,t.canonical.x,t.canonical.y)})):(i=t.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(i=i.filter((function(e){return n._source.hasTile(e)})))):i=[];var a=t.coveringZoomLevel(this._source),o=Math.max(a-r.maxOverzooming,this._source.minzoom),s=Math.max(a+r.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(i,a);if(ze(this._source.type)){for(var c={},u={},h=0,f=Object.keys(l);hthis._source.maxzoom){var g=d.children(this._source.maxzoom)[0],y=this.getTile(g);if(y&&y.hasData()){n[g.key]=g;continue}}else{var v=d.children(this._source.maxzoom);if(n[v[0].key]&&n[v[1].key]&&n[v[2].key]&&n[v[3].key])continue}for(var x=m.wasRequested(),_=d.overscaledZ-1;_>=a;--_){var b=d.scaledTo(_);if(i[b.key]||(i[b.key]=!0,!(m=this.getTile(b))&&x&&(m=this._addTile(b)),m&&(n[b.key]=b,x=m.wasRequested(),m.hasData())))break}}}return n},r.prototype._updateLoadedParentTileCache=function(){for(var e in this._loadedParentTiles={},this._tiles){for(var t=[],r=void 0,n=this._tiles[e].tileID;n.overscaledZ>0;){if(n.key in this._loadedParentTiles){r=this._loadedParentTiles[n.key];break}t.push(n.key);var i=n.scaledTo(n.overscaledZ-1);if(r=this._getLoadedTile(i))break;n=i}for(var a=0,o=t;a0)&&(t.hasData()&&"reloading"!==t.state?this._cache.add(t.tileID,t,t.getExpiryTimeout()):(t.aborted=!0,this._abortTile(t),this._unloadTile(t))))},r.prototype.clearTiles=function(){for(var e in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(e);this._cache.reset()},r.prototype.tilesIn=function(t,r,n){var i=this,a=[],o=this.transform;if(!o)return a;for(var s=n?o.getCameraQueryGeometry(t):t,l=t.map((function(e){return o.pointCoordinate(e)})),c=s.map((function(e){return o.pointCoordinate(e)})),u=this.getIds(),h=1/0,f=1/0,p=-1/0,d=-1/0,m=0,g=c;m=0&&y[1].y+g>=0){var v=l.map((function(e){return s.getTilePoint(e)})),x=c.map((function(e){return s.getTilePoint(e)}));a.push({tile:n,tileID:s,queryGeometry:v,cameraQueryGeometry:x,scale:m})}}},x=0;x=e.browser.now())return!0}return!1},r.prototype.setFeatureState=function(e,t,r){e=e||"_geojsonTileLayer",this._state.updateState(e,t,r)},r.prototype.removeFeatureState=function(e,t,r){e=e||"_geojsonTileLayer",this._state.removeFeatureState(e,t,r)},r.prototype.getFeatureState=function(e,t){return e=e||"_geojsonTileLayer",this._state.getState(e,t)},r.prototype.setDependencies=function(e,t,r){var n=this._tiles[e];n&&n.setDependencies(t,r)},r.prototype.reloadTilesForDependencies=function(e,t){for(var r in this._tiles)this._tiles[r].hasDependency(e,t)&&this._reloadTile(r,"reloading");this._cache.filter((function(r){return!r.hasDependency(e,t)}))},r}(e.Evented);function Pe(e,t){var r=Math.abs(2*e.wrap)-+(e.wrap<0),n=Math.abs(2*t.wrap)-+(t.wrap<0);return e.overscaledZ-t.overscaledZ||n-r||t.canonical.y-e.canonical.y||t.canonical.x-e.canonical.x}function ze(e){return"raster"===e||"image"===e||"video"===e}function De(){return new e.window.Worker(na.workerUrl)}Le.maxOverzooming=10,Le.maxUnderzooming=3;var Oe="mapboxgl_preloaded_worker_pool",Re=function(){this.active={}};Re.prototype.acquire=function(e){if(!this.workers)for(this.workers=[];this.workers.length0?(i-o)/s:0;return this.points[a].mult(1-l).add(this.points[r].mult(l))};var Ke=function(e,t,r){var n=this.boxCells=[],i=this.circleCells=[];this.xCellCount=Math.ceil(e/r),this.yCellCount=Math.ceil(t/r);for(var a=0;a=-t[0]&&r<=t[0]&&n>=-t[1]&&n<=t[1]}function nt(t,r,n,i,a,o,s,l){var c=i?t.textSizeData:t.iconSizeData,u=e.evaluateSizeForZoom(c,n.transform.zoom),h=[256/n.width*2+1,256/n.height*2+1],f=i?t.text.dynamicLayoutVertexArray:t.icon.dynamicLayoutVertexArray;f.clear();for(var p=t.lineVertexArray,d=i?t.text.placedSymbolArray:t.icon.placedSymbolArray,m=n.transform.width/n.transform.height,g=!1,y=0;yMath.abs(n.x-r.x)*i?{useVertical:!0}:(t===e.WritingMode.vertical?r.yn.x)?{needsFlipping:!0}:null}function ot(t,r,n,i,a,o,s,l,c,u,h,f,p,d){var m,g=r/24,y=t.lineOffsetX*g,v=t.lineOffsetY*g;if(t.numGlyphs>1){var x=t.glyphStartIndex+t.numGlyphs,_=t.lineStartIndex,b=t.lineStartIndex+t.lineLength,w=it(g,l,y,v,n,h,f,t,c,o,p);if(!w)return{notEnoughRoom:!0};var T=et(w.first.point,s).point,k=et(w.last.point,s).point;if(i&&!n){var A=at(t.writingMode,T,k,d);if(A)return A}m=[w.first];for(var M=t.glyphStartIndex+1;M0?I.point:st(f,C,S,1,a),P=at(t.writingMode,S,L,d);if(P)return P}var z=lt(g*l.getoffsetX(t.glyphStartIndex),y,v,n,h,f,t.segment,t.lineStartIndex,t.lineStartIndex+t.lineLength,c,o,p);if(!z)return{notEnoughRoom:!0};m=[z]}for(var D=0,O=m;D0?1:-1,m=0;i&&(d*=-1,m=Math.PI),d<0&&(m+=Math.PI);for(var g=d>0?l+s:l+s+1,y=a,v=a,x=0,_=0,b=Math.abs(p),w=[];x+_<=b;){if((g+=d)=c)return null;if(v=y,w.push(y),void 0===(y=f[g])){var T=new e.Point(u.getx(g),u.gety(g)),k=et(T,h);if(k.signedDistanceFromCamera>0)y=f[g]=k.point;else{var A=g-d;y=st(0===x?o:new e.Point(u.getx(A),u.gety(A)),T,v,b-x+1,h)}}x+=_,_=v.dist(y)}var M=(b-x)/_,S=y.sub(v),E=S.mult(M)._add(v);E._add(S._unit()._perp()._mult(n*d));var C=m+Math.atan2(y.y-v.y,y.x-v.x);return w.push(E),{point:E,angle:C,path:w}}Ke.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Ke.prototype.insert=function(e,t,r,n,i){this._forEachCell(t,r,n,i,this._insertBoxCell,this.boxUid++),this.boxKeys.push(e),this.bboxes.push(t),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(i)},Ke.prototype.insertCircle=function(e,t,r,n){this._forEachCell(t-n,r-n,t+n,r+n,this._insertCircleCell,this.circleUid++),this.circleKeys.push(e),this.circles.push(t),this.circles.push(r),this.circles.push(n)},Ke.prototype._insertBoxCell=function(e,t,r,n,i,a){this.boxCells[i].push(a)},Ke.prototype._insertCircleCell=function(e,t,r,n,i,a){this.circleCells[i].push(a)},Ke.prototype._query=function(e,t,r,n,i,a){if(r<0||e>this.width||n<0||t>this.height)return!i&&[];var o=[];if(e<=0&&t<=0&&this.width<=r&&this.height<=n){if(i)return!0;for(var s=0;s0:o},Ke.prototype._queryCircle=function(e,t,r,n,i){var a=e-r,o=e+r,s=t-r,l=t+r;if(o<0||a>this.width||l<0||s>this.height)return!n&&[];var c=[],u={hitTest:n,circle:{x:e,y:t,radius:r},seenUids:{box:{},circle:{}}};return this._forEachCell(a,s,o,l,this._queryCellCircle,c,u,i),n?c.length>0:c},Ke.prototype.query=function(e,t,r,n,i){return this._query(e,t,r,n,!1,i)},Ke.prototype.hitTest=function(e,t,r,n,i){return this._query(e,t,r,n,!0,i)},Ke.prototype.hitTestCircle=function(e,t,r,n){return this._queryCircle(e,t,r,!0,n)},Ke.prototype._queryCell=function(e,t,r,n,i,a,o,s){var l=o.seenUids,c=this.boxCells[i];if(null!==c)for(var u=this.bboxes,h=0,f=c;h=u[d+0]&&n>=u[d+1]&&(!s||s(this.boxKeys[p]))){if(o.hitTest)return a.push(!0),!0;a.push({key:this.boxKeys[p],x1:u[d],y1:u[d+1],x2:u[d+2],y2:u[d+3]})}}}var m=this.circleCells[i];if(null!==m)for(var g=this.circles,y=0,v=m;yo*o+s*s},Ke.prototype._circleAndRectCollide=function(e,t,r,n,i,a,o){var s=(a-n)/2,l=Math.abs(e-(n+s));if(l>s+r)return!1;var c=(o-i)/2,u=Math.abs(t-(i+c));if(u>c+r)return!1;if(l<=s||u<=c)return!0;var h=l-s,f=u-c;return h*h+f*f<=r*r};var ct=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ut(e,t){for(var r=0;r=1;L--)I.push(E.path[L]);for(var P=1;P0){for(var R=I[0].clone(),F=I[0].clone(),B=1;B=A.x&&F.x<=M.x&&R.y>=A.y&&F.y<=M.y?[I]:F.xM.x||F.yM.y?[]:e.clipLine([I],A.x,A.y,M.x,M.y)}for(var j=0,N=O;j=this.screenRightBoundary||nthis.screenBottomBoundary},pt.prototype.isInsideGrid=function(e,t,r,n){return r>=0&&e=0&&t0?(this.prevPlacement&&this.prevPlacement.variableOffsets[h.crossTileID]&&this.prevPlacement.placements[h.crossTileID]&&this.prevPlacement.placements[h.crossTileID].text&&(m=this.prevPlacement.variableOffsets[h.crossTileID].anchor),this.variableOffsets[h.crossTileID]={textOffset:g,width:r,height:n,anchor:e,textBoxScale:i,prevAnchor:m},this.markUsedJustification(f,e,h,p),f.allowVerticalPlacement&&(this.markUsedOrientation(f,p,h),this.placedOrientations[h.crossTileID]=p),{shift:y,placedGlyphBoxes:v}):void 0},Tt.prototype.placeLayerBucketPart=function(t,r,n){var i=this,a=t.parameters,o=a.bucket,s=a.layout,l=a.posMatrix,c=a.textLabelPlaneMatrix,u=a.labelToScreenMatrix,h=a.textPixelRatio,f=a.holdingForFade,p=a.collisionBoxArray,d=a.partiallyEvaluatedTextSize,m=a.collisionGroup,g=s.get("text-optional"),y=s.get("icon-optional"),v=s.get("text-allow-overlap"),x=s.get("icon-allow-overlap"),_="map"===s.get("text-rotation-alignment"),b="map"===s.get("text-pitch-alignment"),w="none"!==s.get("icon-text-fit"),T="viewport-y"===s.get("symbol-z-order"),k=v&&(x||!o.hasIconData()||y),A=x&&(v||!o.hasTextData()||g);!o.collisionArrays&&p&&o.deserializeCollisionBoxes(p);var M=function(t,a){if(!r[t.crossTileID]){if(f)return void(i.placements[t.crossTileID]=new yt(!1,!1,!1));var p,T=!1,M=!1,S=!0,E=null,C={box:null,offscreen:null},I={box:null,offscreen:null},L=null,P=null,z=0,D=0,O=0;a.textFeatureIndex?z=a.textFeatureIndex:t.useRuntimeCollisionCircles&&(z=t.featureIndex),a.verticalTextFeatureIndex&&(D=a.verticalTextFeatureIndex);var R=a.textBox;if(R){var F=function(r){var n=e.WritingMode.horizontal;if(o.allowVerticalPlacement&&!r&&i.prevPlacement){var a=i.prevPlacement.placedOrientations[t.crossTileID];a&&(i.placedOrientations[t.crossTileID]=a,n=a,i.markUsedOrientation(o,n,t))}return n},B=function(r,n){if(o.allowVerticalPlacement&&t.numVerticalGlyphVertices>0&&a.verticalTextBox)for(var i=0,s=o.writingModes;i0&&(j=j.filter((function(e){return e!==N.anchor}))).unshift(N.anchor)}var U=function(e,r,n){for(var a=e.x2-e.x1,s=e.y2-e.y1,c=t.textBoxScale,u=w&&!x?r:null,f={box:[],offscreen:!1},p=v?2*j.length:j.length,d=0;d=j.length,k=i.attemptAnchorPlacement(g,e,a,s,c,_,b,h,l,m,y,t,o,n,u);if(k&&(f=k.placedGlyphBoxes)&&f.box&&f.box.length){T=!0,E=k.shift;break}}return f};B((function(){return U(R,a.iconBox,e.WritingMode.horizontal)}),(function(){var r=a.verticalTextBox,n=C&&C.box&&C.box.length;return o.allowVerticalPlacement&&!n&&t.numVerticalGlyphVertices>0&&r?U(r,a.verticalIconBox,e.WritingMode.vertical):{box:null,offscreen:null}})),C&&(T=C.box,S=C.offscreen);var V=F(C&&C.box);if(!T&&i.prevPlacement){var q=i.prevPlacement.variableOffsets[t.crossTileID];q&&(i.variableOffsets[t.crossTileID]=q,i.markUsedJustification(o,q.anchor,t,V))}}else{var H=function(e,r){var n=i.collisionIndex.placeCollisionBox(e,v,h,l,m.predicate);return n&&n.box&&n.box.length&&(i.markUsedOrientation(o,r,t),i.placedOrientations[t.crossTileID]=r),n};B((function(){return H(R,e.WritingMode.horizontal)}),(function(){var r=a.verticalTextBox;return o.allowVerticalPlacement&&t.numVerticalGlyphVertices>0&&r?H(r,e.WritingMode.vertical):{box:null,offscreen:null}})),F(C&&C.box&&C.box.length)}}if(T=(p=C)&&p.box&&p.box.length>0,S=p&&p.offscreen,t.useRuntimeCollisionCircles){var G=o.text.placedSymbolArray.get(t.centerJustifiedTextSymbolIndex),W=e.evaluateSizeForFeature(o.textSizeData,d,G),Z=s.get("text-padding"),Y=t.collisionCircleDiameter;L=i.collisionIndex.placeCollisionCircles(v,G,o.lineVertexArray,o.glyphOffsetArray,W,l,c,u,n,b,m.predicate,Y,Z),T=v||L.circles.length>0&&!L.collisionDetected,S=S&&L.offscreen}if(a.iconFeatureIndex&&(O=a.iconFeatureIndex),a.iconBox){var X=function(e){var t=w&&E?wt(e,E.x,E.y,_,b,i.transform.angle):e;return i.collisionIndex.placeCollisionBox(t,x,h,l,m.predicate)};M=I&&I.box&&I.box.length&&a.verticalIconBox?(P=X(a.verticalIconBox)).box.length>0:(P=X(a.iconBox)).box.length>0,S=S&&P.offscreen}var $=g||0===t.numHorizontalGlyphVertices&&0===t.numVerticalGlyphVertices,K=y||0===t.numIconVertices;if($||K?K?$||(M=M&&T):T=M&&T:M=T=M&&T,T&&p&&p.box&&(I&&I.box&&D?i.collisionIndex.insertCollisionBox(p.box,s.get("text-ignore-placement"),o.bucketInstanceId,D,m.ID):i.collisionIndex.insertCollisionBox(p.box,s.get("text-ignore-placement"),o.bucketInstanceId,z,m.ID)),M&&P&&i.collisionIndex.insertCollisionBox(P.box,s.get("icon-ignore-placement"),o.bucketInstanceId,O,m.ID),L&&(T&&i.collisionIndex.insertCollisionCircles(L.circles,s.get("text-ignore-placement"),o.bucketInstanceId,z,m.ID),n)){var J=o.bucketInstanceId,Q=i.collisionCircleArrays[J];void 0===Q&&(Q=i.collisionCircleArrays[J]=new vt);for(var ee=0;ee=0;--E){var C=S[E];M(o.symbolInstances.get(C),o.collisionArrays[C])}else for(var I=t.symbolInstanceStart;I=0&&(t.text.placedSymbolArray.get(c).crossTileID=a>=0&&c!==a?0:n.crossTileID)}},Tt.prototype.markUsedOrientation=function(t,r,n){for(var i=r===e.WritingMode.horizontal||r===e.WritingMode.horizontalOnly?r:0,a=r===e.WritingMode.vertical?r:0,o=0,s=[n.leftJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.rightJustifiedTextSymbolIndex];o0||l>0,x=a.numIconVertices>0,_=i.placedOrientations[a.crossTileID],b=_===e.WritingMode.vertical,w=_===e.WritingMode.horizontal||_===e.WritingMode.horizontalOnly;if(v){var T=Pt(y.text),k=b?zt:T;d(t.text,s,k);var A=w?zt:T;d(t.text,l,A);var M=y.text.isHidden();[a.rightJustifiedTextSymbolIndex,a.centerJustifiedTextSymbolIndex,a.leftJustifiedTextSymbolIndex].forEach((function(e){e>=0&&(t.text.placedSymbolArray.get(e).hidden=M||b?1:0)})),a.verticalPlacedTextSymbolIndex>=0&&(t.text.placedSymbolArray.get(a.verticalPlacedTextSymbolIndex).hidden=M||w?1:0);var S=i.variableOffsets[a.crossTileID];S&&i.markUsedJustification(t,S.anchor,a,_);var E=i.placedOrientations[a.crossTileID];E&&(i.markUsedJustification(t,"left",a,E),i.markUsedOrientation(t,E,a))}if(x){var C=Pt(y.icon),I=!(f&&a.verticalPlacedIconSymbolIndex&&b);if(a.placedIconSymbolIndex>=0){var L=I?C:zt;d(t.icon,a.numIconVertices,L),t.icon.placedSymbolArray.get(a.placedIconSymbolIndex).hidden=y.icon.isHidden()}if(a.verticalPlacedIconSymbolIndex>=0){var P=I?zt:C;d(t.icon,a.numVerticalIconVertices,P),t.icon.placedSymbolArray.get(a.verticalPlacedIconSymbolIndex).hidden=y.icon.isHidden()}}if(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData()){var z=t.collisionArrays[n];if(z){var D=new e.Point(0,0);if(z.textBox||z.verticalTextBox){var O=!0;if(c){var R=i.variableOffsets[m];R?(D=bt(R.anchor,R.width,R.height,R.textOffset,R.textBoxScale),u&&D._rotate(h?i.transform.angle:-i.transform.angle)):O=!1}z.textBox&&kt(t.textCollisionBox.collisionVertexArray,y.text.placed,!O||b,D.x,D.y),z.verticalTextBox&&kt(t.textCollisionBox.collisionVertexArray,y.text.placed,!O||w,D.x,D.y)}var F=!(w||!z.verticalIconBox);z.iconBox&&kt(t.iconCollisionBox.collisionVertexArray,y.icon.placed,F,f?D.x:0,f?D.y:0),z.verticalIconBox&&kt(t.iconCollisionBox.collisionVertexArray,y.icon.placed,!F,f?D.x:0,f?D.y:0)}}},g=0;ge},Tt.prototype.setStale=function(){this.stale=!0};var At=Math.pow(2,25),Mt=Math.pow(2,24),St=Math.pow(2,17),Et=Math.pow(2,16),Ct=Math.pow(2,9),It=Math.pow(2,8),Lt=Math.pow(2,1);function Pt(e){if(0===e.opacity&&!e.placed)return 0;if(1===e.opacity&&e.placed)return 4294967295;var t=e.placed?1:0,r=Math.floor(127*e.opacity);return r*At+t*Mt+r*St+t*Et+r*Ct+t*It+r*Lt+t}var zt=0,Dt=function(e){this._sortAcrossTiles="viewport-y"!==e.layout.get("symbol-z-order")&&void 0!==e.layout.get("symbol-sort-key").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Dt.prototype.continuePlacement=function(e,t,r,n,i){for(var a=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var s=r[t[this._currentPlacementIndex]],l=this.placement.collisionIndex.transform.zoom;if("symbol"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(this._inProgressLayer||(this._inProgressLayer=new Dt(s)),this._inProgressLayer.continuePlacement(n[s.source],this.placement,this._showCollisionBoxes,s,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Ot.prototype.commit=function(e){return this.placement.commit(e),this.placement};var Rt=512/e.EXTENT/2,Ft=function(e,t,r){this.tileID=e,this.indexedSymbolInstances={},this.bucketInstanceId=r;for(var n=0;ne.overscaledZ)for(var s in o){var l=o[s];l.tileID.isChildOf(e)&&l.findMatches(t.symbolInstances,e,i)}else{var c=o[e.scaledTo(Number(a)).key];c&&c.findMatches(t.symbolInstances,e,i)}}for(var u=0;u1?"@2x":"",l=e.getJSON(r.transformRequest(r.normalizeSpriteURL(t,s,".json"),e.ResourceType.SpriteJSON),(function(e,t){l=null,o||(o=e,i=t,u())})),c=e.getImage(r.transformRequest(r.normalizeSpriteURL(t,s,".png"),e.ResourceType.SpriteImage),(function(e,t){c=null,o||(o=e,a=t,u())}));function u(){if(o)n(o);else if(i&&a){var t=e.browser.getImageData(a),r={};for(var s in i){var l=i[s],c=l.width,u=l.height,h=l.x,f=l.y,p=l.sdf,d=l.pixelRatio,m=l.stretchX,g=l.stretchY,y=l.content,v=new e.RGBAImage({width:c,height:u});e.RGBAImage.copy(t,v,{x:h,y:f},{x:0,y:0},{width:c,height:u}),r[s]={data:v,pixelRatio:d,sdf:p,stretchX:m,stretchY:g,content:y}}n(null,r)}}return{cancel:function(){l&&(l.cancel(),l=null),c&&(c.cancel(),c=null)}}}(t,this.map._requestManager,(function(t,n){if(r._spriteRequest=null,t)r.fire(new e.ErrorEvent(t));else if(n)for(var i in n)r.imageManager.addImage(i,n[i]);r.imageManager.setLoaded(!0),r._availableImages=r.imageManager.listImages(),r.dispatcher.broadcast("setImages",r._availableImages),r.fire(new e.Event("data",{dataType:"style"}))}))},r.prototype._validateLayer=function(t){var r=this.sourceCaches[t.source];if(r){var n=t.sourceLayer;if(n){var i=r.getSource();("geojson"===i.type||i.vectorLayerIds&&-1===i.vectorLayerIds.indexOf(n))&&this.fire(new e.ErrorEvent(new Error('Source layer "'+n+'" does not exist on source "'+i.id+'" as specified by style layer "'+t.id+'"')))}}},r.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var e in this.sourceCaches)if(!this.sourceCaches[e].loaded())return!1;return!!this.imageManager.isLoaded()},r.prototype._serializeLayers=function(e){for(var t=[],r=0,n=e;r0)throw new Error("Unimplemented: "+i.map((function(e){return e.command})).join(", ")+".");return n.forEach((function(e){"setTransition"!==e.command&&r[e.command].apply(r,e.args)})),this.stylesheet=t,!0},r.prototype.addImage=function(t,r){if(this.getImage(t))return this.fire(new e.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(t,r),this._afterImageUpdated(t)},r.prototype.updateImage=function(e,t){this.imageManager.updateImage(e,t)},r.prototype.getImage=function(e){return this.imageManager.getImage(e)},r.prototype.removeImage=function(t){if(!this.getImage(t))return this.fire(new e.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(t),this._afterImageUpdated(t)},r.prototype._afterImageUpdated=function(t){this._availableImages=this.imageManager.listImages(),this._changedImages[t]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new e.Event("data",{dataType:"style"}))},r.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},r.prototype.addSource=function(t,r,n){var i=this;if(void 0===n&&(n={}),this._checkLoaded(),void 0!==this.sourceCaches[t])throw new Error("There is already a source with this ID");if(!r.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(r).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(r.type)>=0&&this._validate(e.validateStyle.source,"sources."+t,r,null,n))){this.map&&this.map._collectResourceTiming&&(r.collectResourceTiming=!0);var a=this.sourceCaches[t]=new Le(t,r,this.dispatcher);a.style=this,a.setEventedParent(this,(function(){return{isSourceLoaded:i.loaded(),source:a.serialize(),sourceId:t}})),a.onAdd(this.map),this._changed=!0}},r.prototype.removeSource=function(t){if(this._checkLoaded(),void 0===this.sourceCaches[t])throw new Error("There is no source with this ID");for(var r in this._layers)if(this._layers[r].source===t)return this.fire(new e.ErrorEvent(new Error('Source "'+t+'" cannot be removed while layer "'+r+'" is using it.')));var n=this.sourceCaches[t];delete this.sourceCaches[t],delete this._updatedSources[t],n.fire(new e.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:t})),n.setEventedParent(null),n.clearTiles(),n.onRemove&&n.onRemove(this.map),this._changed=!0},r.prototype.setGeoJSONSourceData=function(e,t){this._checkLoaded(),this.sourceCaches[e].getSource().setData(t),this._changed=!0},r.prototype.getSource=function(e){return this.sourceCaches[e]&&this.sourceCaches[e].getSource()},r.prototype.addLayer=function(t,r,n){void 0===n&&(n={}),this._checkLoaded();var i=t.id;if(this.getLayer(i))this.fire(new e.ErrorEvent(new Error('Layer with id "'+i+'" already exists on this map')));else{var a;if("custom"===t.type){if(Ut(this,e.validateCustomStyleLayer(t)))return;a=e.createStyleLayer(t)}else{if("object"==typeof t.source&&(this.addSource(i,t.source),t=e.clone$1(t),t=e.extend(t,{source:i})),this._validate(e.validateStyle.layer,"layers."+i,t,{arrayIndex:-1},n))return;a=e.createStyleLayer(t),this._validateLayer(a),a.setEventedParent(this,{layer:{id:i}}),this._serializedLayers[a.id]=a.serialize()}var o=r?this._order.indexOf(r):this._order.length;if(r&&-1===o)this.fire(new e.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.')));else{if(this._order.splice(o,0,i),this._layerOrderChanged=!0,this._layers[i]=a,this._removedLayers[i]&&a.source&&"custom"!==a.type){var s=this._removedLayers[i];delete this._removedLayers[i],s.type!==a.type?this._updatedSources[a.source]="clear":(this._updatedSources[a.source]="reload",this.sourceCaches[a.source].pause())}this._updateLayer(a),a.onAdd&&a.onAdd(this.map)}}},r.prototype.moveLayer=function(t,r){if(this._checkLoaded(),this._changed=!0,this._layers[t]){if(t!==r){var n=this._order.indexOf(t);this._order.splice(n,1);var i=r?this._order.indexOf(r):this._order.length;if(r&&-1===i)return void this.fire(new e.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.')));this._order.splice(i,0,t),this._layerOrderChanged=!0}}else this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be moved.")))},r.prototype.removeLayer=function(t){this._checkLoaded();var r=this._layers[t];if(r){r.setEventedParent(null);var n=this._order.indexOf(t);this._order.splice(n,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[t]=r,delete this._layers[t],delete this._serializedLayers[t],delete this._updatedLayers[t],delete this._updatedPaintProps[t],r.onRemove&&r.onRemove(this.map)}else this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be removed.")))},r.prototype.getLayer=function(e){return this._layers[e]},r.prototype.hasLayer=function(e){return e in this._layers},r.prototype.setLayerZoomRange=function(t,r,n){this._checkLoaded();var i=this.getLayer(t);i?i.minzoom===r&&i.maxzoom===n||(null!=r&&(i.minzoom=r),null!=n&&(i.maxzoom=n),this._updateLayer(i)):this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot have zoom extent.")))},r.prototype.setFilter=function(t,r,n){void 0===n&&(n={}),this._checkLoaded();var i=this.getLayer(t);if(i){if(!e.deepEqual(i.filter,r)){if(null==r)return i.filter=void 0,void this._updateLayer(i);this._validate(e.validateStyle.filter,"layers."+i.id+".filter",r,null,n)||(i.filter=e.clone$1(r),this._updateLayer(i))}}else this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be filtered.")))},r.prototype.getFilter=function(t){return e.clone$1(this.getLayer(t).filter)},r.prototype.setLayoutProperty=function(t,r,n,i){void 0===i&&(i={}),this._checkLoaded();var a=this.getLayer(t);a?e.deepEqual(a.getLayoutProperty(r),n)||(a.setLayoutProperty(r,n,i),this._updateLayer(a)):this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getLayoutProperty=function(t,r){var n=this.getLayer(t);if(n)return n.getLayoutProperty(r);this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style.")))},r.prototype.setPaintProperty=function(t,r,n,i){void 0===i&&(i={}),this._checkLoaded();var a=this.getLayer(t);a?e.deepEqual(a.getPaintProperty(r),n)||(a.setPaintProperty(r,n,i)&&this._updateLayer(a),this._changed=!0,this._updatedPaintProps[t]=!0):this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getPaintProperty=function(e,t){return this.getLayer(e).getPaintProperty(t)},r.prototype.setFeatureState=function(t,r){this._checkLoaded();var n=t.source,i=t.sourceLayer,a=this.sourceCaches[n];if(void 0!==a){var o=a.getSource().type;"geojson"===o&&i?this.fire(new e.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==o||i?(void 0===t.id&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),a.setFeatureState(i,t.id,r)):this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},r.prototype.removeFeatureState=function(t,r){this._checkLoaded();var n=t.source,i=this.sourceCaches[n];if(void 0!==i){var a=i.getSource().type,o="vector"===a?t.sourceLayer:void 0;"vector"!==a||o?r&&"string"!=typeof t.id&&"number"!=typeof t.id?this.fire(new e.ErrorEvent(new Error("A feature id is required to remove its specific state property."))):i.removeFeatureState(o,t.id,r):this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},r.prototype.getFeatureState=function(t){this._checkLoaded();var r=t.source,n=t.sourceLayer,i=this.sourceCaches[r];if(void 0!==i){if("vector"!==i.getSource().type||n)return void 0===t.id&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),i.getFeatureState(n,t.id);this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},r.prototype.getTransition=function(){return e.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},r.prototype.serialize=function(){return e.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:e.mapObject(this.sourceCaches,(function(e){return e.serialize()})),layers:this._serializeLayers(this._order)},(function(e){return void 0!==e}))},r.prototype._updateLayer=function(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&"raster"!==this.sourceCaches[e.source].getSource().type&&(this._updatedSources[e.source]="reload",this.sourceCaches[e.source].pause()),this._changed=!0},r.prototype._flattenAndSortRenderedFeatures=function(e){for(var t=this,r=function(e){return"fill-extrusion"===t._layers[e].type},n={},i=[],a=this._order.length-1;a>=0;a--){var o=this._order[a];if(r(o)){n[o]=a;for(var s=0,l=e;s=0;d--){var m=this._order[d];if(r(m))for(var g=i.length-1;g>=0;g--){var y=i[g].feature;if(n[y.layer.id] 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),tr=xr("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),rr=xr("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}"),nr=xr("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_FragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);}"),ir=xr("varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),ar=xr("uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),or=xr("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}"),sr=xr("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}"),lr=xr("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}"),cr=xr("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),ur=xr("uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\n#define PI 3.141592653589793\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),hr=xr("uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),fr=xr("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),pr=xr("uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}"),dr=xr("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}"),mr=xr("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),gr=xr("uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}"),yr=xr("#define SDF_PX 8.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}"),vr=xr("#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}");function xr(e,t){var r=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,n=t.match(/attribute ([\w]+) ([\w]+)/g),i=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),a=t.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),o=a?a.concat(i):i,s={};return{fragmentSource:e=e.replace(r,(function(e,t,r,n,i){return s[i]=!0,"define"===t?"\n#ifndef HAS_UNIFORM_u_"+i+"\nvarying "+r+" "+n+" "+i+";\n#else\nuniform "+r+" "+n+" u_"+i+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+i+"\n "+r+" "+n+" "+i+" = u_"+i+";\n#endif\n"})),vertexSource:t=t.replace(r,(function(e,t,r,n,i){var a="float"===n?"vec2":"vec4",o=i.match(/color/)?"color":a;return s[i]?"define"===t?"\n#ifndef HAS_UNIFORM_u_"+i+"\nuniform lowp float u_"+i+"_t;\nattribute "+r+" "+a+" a_"+i+";\nvarying "+r+" "+n+" "+i+";\n#else\nuniform "+r+" "+n+" u_"+i+";\n#endif\n":"vec4"===o?"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+i+" = a_"+i+";\n#else\n "+r+" "+n+" "+i+" = u_"+i+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+i+" = unpack_mix_"+o+"(a_"+i+", u_"+i+"_t);\n#else\n "+r+" "+n+" "+i+" = u_"+i+";\n#endif\n":"define"===t?"\n#ifndef HAS_UNIFORM_u_"+i+"\nuniform lowp float u_"+i+"_t;\nattribute "+r+" "+a+" a_"+i+";\n#else\nuniform "+r+" "+n+" u_"+i+";\n#endif\n":"vec4"===o?"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+r+" "+n+" "+i+" = a_"+i+";\n#else\n "+r+" "+n+" "+i+" = u_"+i+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+r+" "+n+" "+i+" = unpack_mix_"+o+"(a_"+i+", u_"+i+"_t);\n#else\n "+r+" "+n+" "+i+" = u_"+i+";\n#endif\n"})),staticAttributes:n,staticUniforms:o}}var _r=Object.freeze({__proto__:null,prelude:Zt,background:Yt,backgroundPattern:Xt,circle:$t,clippingMask:Kt,heatmap:Jt,heatmapTexture:Qt,collisionBox:er,collisionCircle:tr,debug:rr,fill:nr,fillOutline:ir,fillOutlinePattern:ar,fillPattern:or,fillExtrusion:sr,fillExtrusionPattern:lr,hillshadePrepare:cr,hillshade:ur,line:hr,lineGradient:fr,linePattern:pr,lineSDF:dr,raster:mr,symbolIcon:gr,symbolSDF:yr,symbolTextAndIcon:vr}),br=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};function wr(e){for(var t=[],r=0;r>16,s>>16],u_pixel_coord_lower:[65535&o,65535&s]}}Tr.prototype.draw=function(e,t,r,n,i,a,o,s,l,c,u,h,f,p,d,m){var g,y=e.gl;if(!this.failedToCreate){for(var v in e.program.set(this.program),e.setDepthMode(r),e.setStencilMode(n),e.setColorMode(i),e.setCullFace(a),this.fixedUniforms)this.fixedUniforms[v].set(o[v]);p&&p.setUniforms(e,this.binderUniforms,h,{zoom:f});for(var x=(g={},g[y.LINES]=2,g[y.TRIANGLES]=3,g[y.LINE_STRIP]=1,g)[t],_=0,b=u.get();_0?1/(1-e):1+e}function Zr(e){return e>0?1-1/(1.001-e):-e}var Yr,Xr=function(e,t,r,n,i,a,o,s,l,c){var u=i.transform;return{u_is_size_zoom_constant:+("constant"===e||"source"===e),u_is_size_feature_constant:+("constant"===e||"camera"===e),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:u.cameraToCenterDistance,u_pitch:u.pitch/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:u.width/u.height,u_fade_change:i.options.fadeDuration?i.symbolFadeChange:1,u_matrix:a,u_label_plane_matrix:o,u_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+n,u_texsize:c,u_texture:0}},$r=function(t,r,n,i,a,o,s,l,c,u,h){var f=a.transform;return e.extend(Xr(t,r,n,i,a,o,s,l,c,u),{u_gamma_scale:i?Math.cos(f._pitch)*f.cameraToCenterDistance:1,u_device_pixel_ratio:e.browser.devicePixelRatio,u_is_halo:+h})},Kr=function(t,r,n,i,a,o,s,l,c,u){return e.extend($r(t,r,n,i,a,o,s,l,!0,c,!0),{u_texsize_icon:u,u_texture_icon:1})},Jr=function(e,t,r){return{u_matrix:e,u_opacity:t,u_color:r}},Qr=function(t,r,n,i,a,o){return e.extend(function(e,t,r,n){var i=r.imageManager.getPattern(e.from.toString()),a=r.imageManager.getPattern(e.to.toString()),o=r.imageManager.getPixelSize(),s=o.width,l=o.height,c=Math.pow(2,n.tileID.overscaledZ),u=n.tileSize*Math.pow(2,r.transform.tileZoom)/c,h=u*(n.tileID.canonical.x+n.tileID.wrap*c),f=u*n.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:i.tl,u_pattern_br_a:i.br,u_pattern_tl_b:a.tl,u_pattern_br_b:a.br,u_texsize:[s,l],u_mix:t.t,u_pattern_size_a:i.displaySize,u_pattern_size_b:a.displaySize,u_scale_a:t.fromScale,u_scale_b:t.toScale,u_tile_units_to_pixels:1/dt(n,1,r.transform.tileZoom),u_pixel_coord_upper:[h>>16,f>>16],u_pixel_coord_lower:[65535&h,65535&f]}}(i,o,n,a),{u_matrix:t,u_opacity:r})},en={fillExtrusion:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_lightpos:new e.Uniform3f(t,r.u_lightpos),u_lightintensity:new e.Uniform1f(t,r.u_lightintensity),u_lightcolor:new e.Uniform3f(t,r.u_lightcolor),u_vertical_gradient:new e.Uniform1f(t,r.u_vertical_gradient),u_opacity:new e.Uniform1f(t,r.u_opacity)}},fillExtrusionPattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_lightpos:new e.Uniform3f(t,r.u_lightpos),u_lightintensity:new e.Uniform1f(t,r.u_lightintensity),u_lightcolor:new e.Uniform3f(t,r.u_lightcolor),u_vertical_gradient:new e.Uniform1f(t,r.u_vertical_gradient),u_height_factor:new e.Uniform1f(t,r.u_height_factor),u_image:new e.Uniform1i(t,r.u_image),u_texsize:new e.Uniform2f(t,r.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,r.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,r.u_pixel_coord_lower),u_scale:new e.Uniform3f(t,r.u_scale),u_fade:new e.Uniform1f(t,r.u_fade),u_opacity:new e.Uniform1f(t,r.u_opacity)}},fill:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix)}},fillPattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_image:new e.Uniform1i(t,r.u_image),u_texsize:new e.Uniform2f(t,r.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,r.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,r.u_pixel_coord_lower),u_scale:new e.Uniform3f(t,r.u_scale),u_fade:new e.Uniform1f(t,r.u_fade)}},fillOutline:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_world:new e.Uniform2f(t,r.u_world)}},fillOutlinePattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_world:new e.Uniform2f(t,r.u_world),u_image:new e.Uniform1i(t,r.u_image),u_texsize:new e.Uniform2f(t,r.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,r.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,r.u_pixel_coord_lower),u_scale:new e.Uniform3f(t,r.u_scale),u_fade:new e.Uniform1f(t,r.u_fade)}},circle:function(t,r){return{u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_scale_with_map:new e.Uniform1i(t,r.u_scale_with_map),u_pitch_with_map:new e.Uniform1i(t,r.u_pitch_with_map),u_extrude_scale:new e.Uniform2f(t,r.u_extrude_scale),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_matrix:new e.UniformMatrix4f(t,r.u_matrix)}},collisionBox:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_pixels_to_tile_units:new e.Uniform1f(t,r.u_pixels_to_tile_units),u_extrude_scale:new e.Uniform2f(t,r.u_extrude_scale),u_overscale_factor:new e.Uniform1f(t,r.u_overscale_factor)}},collisionCircle:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_inv_matrix:new e.UniformMatrix4f(t,r.u_inv_matrix),u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_viewport_size:new e.Uniform2f(t,r.u_viewport_size)}},debug:function(t,r){return{u_color:new e.UniformColor(t,r.u_color),u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_overlay:new e.Uniform1i(t,r.u_overlay),u_overlay_scale:new e.Uniform1f(t,r.u_overlay_scale)}},clippingMask:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix)}},heatmap:function(t,r){return{u_extrude_scale:new e.Uniform1f(t,r.u_extrude_scale),u_intensity:new e.Uniform1f(t,r.u_intensity),u_matrix:new e.UniformMatrix4f(t,r.u_matrix)}},heatmapTexture:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_world:new e.Uniform2f(t,r.u_world),u_image:new e.Uniform1i(t,r.u_image),u_color_ramp:new e.Uniform1i(t,r.u_color_ramp),u_opacity:new e.Uniform1f(t,r.u_opacity)}},hillshade:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_image:new e.Uniform1i(t,r.u_image),u_latrange:new e.Uniform2f(t,r.u_latrange),u_light:new e.Uniform2f(t,r.u_light),u_shadow:new e.UniformColor(t,r.u_shadow),u_highlight:new e.UniformColor(t,r.u_highlight),u_accent:new e.UniformColor(t,r.u_accent)}},hillshadePrepare:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_image:new e.Uniform1i(t,r.u_image),u_dimension:new e.Uniform2f(t,r.u_dimension),u_zoom:new e.Uniform1f(t,r.u_zoom),u_unpack:new e.Uniform4f(t,r.u_unpack)}},line:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_ratio:new e.Uniform1f(t,r.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,r.u_units_to_pixels)}},lineGradient:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_ratio:new e.Uniform1f(t,r.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,r.u_units_to_pixels),u_image:new e.Uniform1i(t,r.u_image),u_image_height:new e.Uniform1f(t,r.u_image_height)}},linePattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_texsize:new e.Uniform2f(t,r.u_texsize),u_ratio:new e.Uniform1f(t,r.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_image:new e.Uniform1i(t,r.u_image),u_units_to_pixels:new e.Uniform2f(t,r.u_units_to_pixels),u_scale:new e.Uniform3f(t,r.u_scale),u_fade:new e.Uniform1f(t,r.u_fade)}},lineSDF:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_ratio:new e.Uniform1f(t,r.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,r.u_units_to_pixels),u_patternscale_a:new e.Uniform2f(t,r.u_patternscale_a),u_patternscale_b:new e.Uniform2f(t,r.u_patternscale_b),u_sdfgamma:new e.Uniform1f(t,r.u_sdfgamma),u_image:new e.Uniform1i(t,r.u_image),u_tex_y_a:new e.Uniform1f(t,r.u_tex_y_a),u_tex_y_b:new e.Uniform1f(t,r.u_tex_y_b),u_mix:new e.Uniform1f(t,r.u_mix)}},raster:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_tl_parent:new e.Uniform2f(t,r.u_tl_parent),u_scale_parent:new e.Uniform1f(t,r.u_scale_parent),u_buffer_scale:new e.Uniform1f(t,r.u_buffer_scale),u_fade_t:new e.Uniform1f(t,r.u_fade_t),u_opacity:new e.Uniform1f(t,r.u_opacity),u_image0:new e.Uniform1i(t,r.u_image0),u_image1:new e.Uniform1i(t,r.u_image1),u_brightness_low:new e.Uniform1f(t,r.u_brightness_low),u_brightness_high:new e.Uniform1f(t,r.u_brightness_high),u_saturation_factor:new e.Uniform1f(t,r.u_saturation_factor),u_contrast_factor:new e.Uniform1f(t,r.u_contrast_factor),u_spin_weights:new e.Uniform3f(t,r.u_spin_weights)}},symbolIcon:function(t,r){return{u_is_size_zoom_constant:new e.Uniform1i(t,r.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,r.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,r.u_size_t),u_size:new e.Uniform1f(t,r.u_size),u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,r.u_pitch),u_rotate_symbol:new e.Uniform1i(t,r.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,r.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,r.u_fade_change),u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,r.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,r.u_coord_matrix),u_is_text:new e.Uniform1i(t,r.u_is_text),u_pitch_with_map:new e.Uniform1i(t,r.u_pitch_with_map),u_texsize:new e.Uniform2f(t,r.u_texsize),u_texture:new e.Uniform1i(t,r.u_texture)}},symbolSDF:function(t,r){return{u_is_size_zoom_constant:new e.Uniform1i(t,r.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,r.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,r.u_size_t),u_size:new e.Uniform1f(t,r.u_size),u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,r.u_pitch),u_rotate_symbol:new e.Uniform1i(t,r.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,r.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,r.u_fade_change),u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,r.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,r.u_coord_matrix),u_is_text:new e.Uniform1i(t,r.u_is_text),u_pitch_with_map:new e.Uniform1i(t,r.u_pitch_with_map),u_texsize:new e.Uniform2f(t,r.u_texsize),u_texture:new e.Uniform1i(t,r.u_texture),u_gamma_scale:new e.Uniform1f(t,r.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(t,r.u_is_halo)}},symbolTextAndIcon:function(t,r){return{u_is_size_zoom_constant:new e.Uniform1i(t,r.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,r.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,r.u_size_t),u_size:new e.Uniform1f(t,r.u_size),u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,r.u_pitch),u_rotate_symbol:new e.Uniform1i(t,r.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,r.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,r.u_fade_change),u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,r.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,r.u_coord_matrix),u_is_text:new e.Uniform1i(t,r.u_is_text),u_pitch_with_map:new e.Uniform1i(t,r.u_pitch_with_map),u_texsize:new e.Uniform2f(t,r.u_texsize),u_texsize_icon:new e.Uniform2f(t,r.u_texsize_icon),u_texture:new e.Uniform1i(t,r.u_texture),u_texture_icon:new e.Uniform1i(t,r.u_texture_icon),u_gamma_scale:new e.Uniform1f(t,r.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(t,r.u_is_halo)}},background:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_opacity:new e.Uniform1f(t,r.u_opacity),u_color:new e.UniformColor(t,r.u_color)}},backgroundPattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_opacity:new e.Uniform1f(t,r.u_opacity),u_image:new e.Uniform1i(t,r.u_image),u_pattern_tl_a:new e.Uniform2f(t,r.u_pattern_tl_a),u_pattern_br_a:new e.Uniform2f(t,r.u_pattern_br_a),u_pattern_tl_b:new e.Uniform2f(t,r.u_pattern_tl_b),u_pattern_br_b:new e.Uniform2f(t,r.u_pattern_br_b),u_texsize:new e.Uniform2f(t,r.u_texsize),u_mix:new e.Uniform1f(t,r.u_mix),u_pattern_size_a:new e.Uniform2f(t,r.u_pattern_size_a),u_pattern_size_b:new e.Uniform2f(t,r.u_pattern_size_b),u_scale_a:new e.Uniform1f(t,r.u_scale_a),u_scale_b:new e.Uniform1f(t,r.u_scale_b),u_pixel_coord_upper:new e.Uniform2f(t,r.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,r.u_pixel_coord_lower),u_tile_units_to_pixels:new e.Uniform1f(t,r.u_tile_units_to_pixels)}}};function tn(t,r,n,i,a,o,s){for(var l=t.context,c=l.gl,u=t.useProgram("collisionBox"),h=[],f=0,p=0,d=0;d0){var b=e.create(),w=v;e.mul(b,y.placementInvProjMatrix,t.transform.glCoordMatrix),e.mul(b,b,y.placementViewportMatrix),h.push({circleArray:_,circleOffset:p,transform:w,invTransform:b}),p=f+=_.length/4}x&&u.draw(l,c.LINES,Ae.disabled,Se.disabled,t.colorModeForRenderPass(),Ce.disabled,Pr(v,t.transform,g),n.id,x.layoutVertexBuffer,x.indexBuffer,x.segments,null,t.transform.zoom,null,null,x.collisionVertexBuffer)}}if(s&&h.length){var T=t.useProgram("collisionCircle"),k=new e.StructArrayLayout2f1f2i16;k.resize(4*f),k._trim();for(var A=0,M=0,S=h;M=0&&(m[y.associatedIconIndex]={shiftedAnchor:S,angle:E})}else ut(y.numGlyphs,p)}if(h){d.clear();for(var I=t.icon.placedSymbolArray,L=0;L0){var s=e.browser.now(),l=(s-t.timeAdded)/o,c=r?(s-r.timeAdded)/o:-1,u=n.getSource(),h=a.coveringZoomLevel({tileSize:u.tileSize,roundZoom:u.roundZoom}),f=!r||Math.abs(r.tileID.overscaledZ-h)>Math.abs(t.tileID.overscaledZ-h),p=f&&t.refreshedUponExpiration?1:e.clamp(f?l:1-c,0,1);return t.refreshedUponExpiration&&l>=1&&(t.refreshedUponExpiration=!1),r?{opacity:1,mix:1-p}:{opacity:p,mix:0}}return{opacity:1,mix:0}}var dn=new e.Color(1,0,0,1),mn=new e.Color(0,1,0,1),gn=new e.Color(0,0,1,1),yn=new e.Color(1,0,1,1),vn=new e.Color(0,1,1,1);function xn(e,t,r,n){bn(e,0,t+r/2,e.transform.width,r,n)}function _n(e,t,r,n){bn(e,t-r/2,0,r,e.transform.height,n)}function bn(t,r,n,i,a,o){var s=t.context,l=s.gl;l.enable(l.SCISSOR_TEST),l.scissor(r*e.browser.devicePixelRatio,n*e.browser.devicePixelRatio,i*e.browser.devicePixelRatio,a*e.browser.devicePixelRatio),s.clear({color:o}),l.disable(l.SCISSOR_TEST)}function wn(t,r,n){var i=t.context,a=i.gl,o=n.posMatrix,s=t.useProgram("debug"),l=Ae.disabled,c=Se.disabled,u=t.colorModeForRenderPass(),h="$debug";i.activeTexture.set(a.TEXTURE0),t.emptyTexture.bind(a.LINEAR,a.CLAMP_TO_EDGE),s.draw(i,a.LINE_STRIP,l,c,u,Ce.disabled,Dr(o,e.Color.red),h,t.debugBuffer,t.tileBorderIndexBuffer,t.debugSegments);var f=r.getTileByID(n.key).latestRawTileData,p=f&&f.byteLength||0,d=Math.floor(p/1024),m=r.getTile(n).tileSize,g=512/Math.min(m,512)*(n.overscaledZ/t.transform.zoom)*.5,y=n.canonical.toString();n.overscaledZ!==n.canonical.z&&(y+=" => "+n.overscaledZ),function(e,t){e.initDebugOverlayCanvas();var r=e.debugOverlayCanvas,n=e.context.gl,i=e.debugOverlayCanvas.getContext("2d");i.clearRect(0,0,r.width,r.height),i.shadowColor="white",i.shadowBlur=2,i.lineWidth=1.5,i.strokeStyle="white",i.textBaseline="top",i.font="bold 36px Open Sans, sans-serif",i.fillText(t,5,5),i.strokeText(t,5,5),e.debugOverlayTexture.update(r),e.debugOverlayTexture.bind(n.LINEAR,n.CLAMP_TO_EDGE)}(t,y+" "+d+"kb"),s.draw(i,a.TRIANGLES,l,c,Ee.alphaBlended,Ce.disabled,Dr(o,e.Color.transparent,g),h,t.debugBuffer,t.quadTriangleIndexBuffer,t.debugSegments)}var Tn={symbol:function(t,r,n,i,a){if("translucent"===t.renderPass){var o=Se.disabled,s=t.colorModeForRenderPass();n.layout.get("text-variable-anchor")&&function(t,r,n,i,a,o,s){for(var l=r.transform,c="map"===a,u="map"===o,h=0,f=t;h256&&this.clearStencil(),r.setColorMode(Ee.disabled),r.setDepthMode(Ae.disabled);var i=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var a=0,o=t;a256&&this.clearStencil();var e=this.nextStencilID++,t=this.context.gl;return new Se({func:t.NOTEQUAL,mask:255},e,255,t.KEEP,t.KEEP,t.REPLACE)},kn.prototype.stencilModeForClipping=function(e){var t=this.context.gl;return new Se({func:t.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,t.KEEP,t.KEEP,t.REPLACE)},kn.prototype.stencilConfigForOverlap=function(e){var t,r=this.context.gl,n=e.sort((function(e,t){return t.overscaledZ-e.overscaledZ})),i=n[n.length-1].overscaledZ,a=n[0].overscaledZ-i+1;if(a>1){this.currentStencilSource=void 0,this.nextStencilID+a>256&&this.clearStencil();for(var o={},s=0;s=0;this.currentLayer--){var w=this.style._layers[i[this.currentLayer]],T=a[w.source],k=u[w.source];this._renderTileClippingMasks(w,k),this.renderLayer(this,T,w,k)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?t.pop():null},kn.prototype.isPatternMissing=function(e){if(!e)return!1;if(!e.from||!e.to)return!0;var t=this.imageManager.getPattern(e.from.toString()),r=this.imageManager.getPattern(e.to.toString());return!t||!r},kn.prototype.useProgram=function(e,t){this.cache=this.cache||{};var r=""+e+(t?t.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[r]||(this.cache[r]=new Tr(this.context,e,_r[e],t,en[e],this._showOverdrawInspector)),this.cache[r]},kn.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},kn.prototype.setBaseState=function(){var e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)},kn.prototype.initDebugOverlayCanvas=function(){if(null==this.debugOverlayCanvas){this.debugOverlayCanvas=e.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var t=this.context.gl;this.debugOverlayTexture=new e.Texture(this.context,this.debugOverlayCanvas,t.RGBA)}},kn.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var An=function(e,t){this.points=e,this.planes=t};An.fromInvProjectionMatrix=function(t,r,n){var i=Math.pow(2,n),a=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map((function(r){return e.transformMat4([],r,t)})).map((function(t){return e.scale$1([],t,1/t[3]/r*i)})),o=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((function(t){var r=e.sub([],a[t[0]],a[t[1]]),n=e.sub([],a[t[2]],a[t[1]]),i=e.normalize([],e.cross([],r,n)),o=-e.dot(i,a[t[1]]);return i.concat(o)}));return new An(a,o)};var Mn=function(t,r){this.min=t,this.max=r,this.center=e.scale$2([],e.add([],this.min,this.max),.5)};Mn.prototype.quadrant=function(t){for(var r=[t%2==0,t<2],n=e.clone$2(this.min),i=e.clone$2(this.max),a=0;a=0;if(0===o)return 0;o!==r.length&&(n=!1)}if(n)return 2;for(var l=0;l<3;l++){for(var c=Number.MAX_VALUE,u=-Number.MAX_VALUE,h=0;hthis.max[l]-this.min[l])return 0}return 1};var Sn=function(e,t,r,n){if(void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0),void 0===n&&(n=0),isNaN(e)||e<0||isNaN(t)||t<0||isNaN(r)||r<0||isNaN(n)||n<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=e,this.bottom=t,this.left=r,this.right=n};Sn.prototype.interpolate=function(t,r,n){return null!=r.top&&null!=t.top&&(this.top=e.number(t.top,r.top,n)),null!=r.bottom&&null!=t.bottom&&(this.bottom=e.number(t.bottom,r.bottom,n)),null!=r.left&&null!=t.left&&(this.left=e.number(t.left,r.left,n)),null!=r.right&&null!=t.right&&(this.right=e.number(t.right,r.right,n)),this},Sn.prototype.getCenter=function(t,r){var n=e.clamp((this.left+t-this.right)/2,0,t),i=e.clamp((this.top+r-this.bottom)/2,0,r);return new e.Point(n,i)},Sn.prototype.equals=function(e){return this.top===e.top&&this.bottom===e.bottom&&this.left===e.left&&this.right===e.right},Sn.prototype.clone=function(){return new Sn(this.top,this.bottom,this.left,this.right)},Sn.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var En=function(t,r,n,i,a){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===a||a,this._minZoom=t||0,this._maxZoom=r||22,this._minPitch=n??0,this._maxPitch=i??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new e.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Sn,this._posMatrixCache={},this._alignedPosMatrixCache={}},Cn={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};En.prototype.clone=function(){var e=new En(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return e.tileSize=this.tileSize,e.latRange=this.latRange,e.width=this.width,e.height=this.height,e._center=this._center,e.zoom=this.zoom,e.angle=this.angle,e._fov=this._fov,e._pitch=this._pitch,e._unmodified=this._unmodified,e._edgeInsets=this._edgeInsets.clone(),e._calcMatrices(),e},Cn.minZoom.get=function(){return this._minZoom},Cn.minZoom.set=function(e){this._minZoom!==e&&(this._minZoom=e,this.zoom=Math.max(this.zoom,e))},Cn.maxZoom.get=function(){return this._maxZoom},Cn.maxZoom.set=function(e){this._maxZoom!==e&&(this._maxZoom=e,this.zoom=Math.min(this.zoom,e))},Cn.minPitch.get=function(){return this._minPitch},Cn.minPitch.set=function(e){this._minPitch!==e&&(this._minPitch=e,this.pitch=Math.max(this.pitch,e))},Cn.maxPitch.get=function(){return this._maxPitch},Cn.maxPitch.set=function(e){this._maxPitch!==e&&(this._maxPitch=e,this.pitch=Math.min(this.pitch,e))},Cn.renderWorldCopies.get=function(){return this._renderWorldCopies},Cn.renderWorldCopies.set=function(e){void 0===e?e=!0:null===e&&(e=!1),this._renderWorldCopies=e},Cn.worldSize.get=function(){return this.tileSize*this.scale},Cn.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Cn.size.get=function(){return new e.Point(this.width,this.height)},Cn.bearing.get=function(){return-this.angle/Math.PI*180},Cn.bearing.set=function(t){var r=-e.wrap(t,-180,180)*Math.PI/180;this.angle!==r&&(this._unmodified=!1,this.angle=r,this._calcMatrices(),this.rotationMatrix=e.create$2(),e.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Cn.pitch.get=function(){return this._pitch/Math.PI*180},Cn.pitch.set=function(t){var r=e.clamp(t,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())},Cn.fov.get=function(){return this._fov/Math.PI*180},Cn.fov.set=function(e){e=Math.max(.01,Math.min(60,e)),this._fov!==e&&(this._unmodified=!1,this._fov=e/180*Math.PI,this._calcMatrices())},Cn.zoom.get=function(){return this._zoom},Cn.zoom.set=function(e){var t=Math.min(Math.max(e,this.minZoom),this.maxZoom);this._zoom!==t&&(this._unmodified=!1,this._zoom=t,this.scale=this.zoomScale(t),this.tileZoom=Math.floor(t),this.zoomFraction=t-this.tileZoom,this._constrain(),this._calcMatrices())},Cn.center.get=function(){return this._center},Cn.center.set=function(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this._constrain(),this._calcMatrices())},Cn.padding.get=function(){return this._edgeInsets.toJSON()},Cn.padding.set=function(e){this._edgeInsets.equals(e)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,e,1),this._calcMatrices())},Cn.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},En.prototype.isPaddingEqual=function(e){return this._edgeInsets.equals(e)},En.prototype.interpolatePadding=function(e,t,r){this._unmodified=!1,this._edgeInsets.interpolate(e,t,r),this._constrain(),this._calcMatrices()},En.prototype.coveringZoomLevel=function(e){var t=(e.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/e.tileSize));return Math.max(0,t)},En.prototype.getVisibleUnwrappedCoordinates=function(t){var r=[new e.UnwrappedTileID(0,t)];if(this._renderWorldCopies)for(var n=this.pointCoordinate(new e.Point(0,0)),i=this.pointCoordinate(new e.Point(this.width,0)),a=this.pointCoordinate(new e.Point(this.width,this.height)),o=this.pointCoordinate(new e.Point(0,this.height)),s=Math.floor(Math.min(n.x,i.x,a.x,o.x)),l=Math.floor(Math.max(n.x,i.x,a.x,o.x)),c=s-1;c<=l+1;c++)0!==c&&r.push(new e.UnwrappedTileID(c,t));return r},En.prototype.coveringTiles=function(t){var r=this.coveringZoomLevel(t),n=r;if(void 0!==t.minzoom&&rt.maxzoom&&(r=t.maxzoom);var i=e.MercatorCoordinate.fromLngLat(this.center),a=Math.pow(2,r),o=[a*i.x,a*i.y,0],s=An.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,r),l=t.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(l=r);var c=function(e){return{aabb:new Mn([e*a,0,0],[(e+1)*a,a,0]),zoom:0,x:0,y:0,wrap:e,fullyVisible:!1}},u=[],h=[],f=r,p=t.reparseOverscaled?n:r;if(this._renderWorldCopies)for(var d=1;d<=3;d++)u.push(c(-d)),u.push(c(d));for(u.push(c(0));u.length>0;){var m=u.pop(),g=m.x,y=m.y,v=m.fullyVisible;if(!v){var x=m.aabb.intersects(s);if(0===x)continue;v=2===x}var _=m.aabb.distanceX(o),b=m.aabb.distanceY(o),w=Math.max(Math.abs(_),Math.abs(b)),T=3+(1<T&&m.zoom>=l)h.push({tileID:new e.OverscaledTileID(m.zoom===f?p:m.zoom,m.wrap,m.zoom,g,y),distanceSq:e.sqrLen([o[0]-.5-g,o[1]-.5-y])});else for(var k=0;k<4;k++){var A=(g<<1)+k%2,M=(y<<1)+(k>>1);u.push({aabb:m.aabb.quadrant(k),zoom:m.zoom+1,x:A,y:M,wrap:m.wrap,fullyVisible:v})}}return h.sort((function(e,t){return e.distanceSq-t.distanceSq})).map((function(e){return e.tileID}))},En.prototype.resize=function(e,t){this.width=e,this.height=t,this.pixelsToGLUnits=[2/e,-2/t],this._constrain(),this._calcMatrices()},Cn.unmodified.get=function(){return this._unmodified},En.prototype.zoomScale=function(e){return Math.pow(2,e)},En.prototype.scaleZoom=function(e){return Math.log(e)/Math.LN2},En.prototype.project=function(t){var r=e.clamp(t.lat,-this.maxValidLatitude,this.maxValidLatitude);return new e.Point(e.mercatorXfromLng(t.lng)*this.worldSize,e.mercatorYfromLat(r)*this.worldSize)},En.prototype.unproject=function(t){return new e.MercatorCoordinate(t.x/this.worldSize,t.y/this.worldSize).toLngLat()},Cn.point.get=function(){return this.project(this.center)},En.prototype.setLocationAtPoint=function(t,r){var n=this.pointCoordinate(r),i=this.pointCoordinate(this.centerPoint),a=this.locationCoordinate(t),o=new e.MercatorCoordinate(a.x-(n.x-i.x),a.y-(n.y-i.y));this.center=this.coordinateLocation(o),this._renderWorldCopies&&(this.center=this.center.wrap())},En.prototype.locationPoint=function(e){return this.coordinatePoint(this.locationCoordinate(e))},En.prototype.pointLocation=function(e){return this.coordinateLocation(this.pointCoordinate(e))},En.prototype.locationCoordinate=function(t){return e.MercatorCoordinate.fromLngLat(t)},En.prototype.coordinateLocation=function(e){return e.toLngLat()},En.prototype.pointCoordinate=function(t){var r=[t.x,t.y,0,1],n=[t.x,t.y,1,1];e.transformMat4(r,r,this.pixelMatrixInverse),e.transformMat4(n,n,this.pixelMatrixInverse);var i=r[3],a=n[3],o=r[0]/i,s=n[0]/a,l=r[1]/i,c=n[1]/a,u=r[2]/i,h=n[2]/a,f=u===h?0:(0-u)/(h-u);return new e.MercatorCoordinate(e.number(o,s,f)/this.worldSize,e.number(l,c,f)/this.worldSize)},En.prototype.coordinatePoint=function(t){var r=[t.x*this.worldSize,t.y*this.worldSize,0,1];return e.transformMat4(r,r,this.pixelMatrix),new e.Point(r[0]/r[3],r[1]/r[3])},En.prototype.getBounds=function(){return(new e.LngLatBounds).extend(this.pointLocation(new e.Point(0,0))).extend(this.pointLocation(new e.Point(this.width,0))).extend(this.pointLocation(new e.Point(this.width,this.height))).extend(this.pointLocation(new e.Point(0,this.height)))},En.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new e.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},En.prototype.setMaxBounds=function(e){e?(this.lngRange=[e.getWest(),e.getEast()],this.latRange=[e.getSouth(),e.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},En.prototype.calculatePosMatrix=function(t,r){void 0===r&&(r=!1);var n=t.key,i=r?this._alignedPosMatrixCache:this._posMatrixCache;if(i[n])return i[n];var a=t.canonical,o=this.worldSize/this.zoomScale(a.z),s=a.x+Math.pow(2,a.z)*t.wrap,l=e.identity(new Float64Array(16));return e.translate(l,l,[s*o,a.y*o,0]),e.scale(l,l,[o/e.EXTENT,o/e.EXTENT,1]),e.multiply(l,r?this.alignedProjMatrix:this.projMatrix,l),i[n]=new Float32Array(l),i[n]},En.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},En.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var t,r,n,i,a=-90,o=90,s=-180,l=180,c=this.size,u=this._unmodified;if(this.latRange){var h=this.latRange;a=e.mercatorYfromLat(h[1])*this.worldSize,t=(o=e.mercatorYfromLat(h[0])*this.worldSize)-ao&&(i=o-g)}if(this.lngRange){var y=p.x,v=c.x/2;y-vl&&(n=l-v)}(void 0!==n||void 0!==i)&&(this.center=this.unproject(new e.Point(void 0!==n?n:p.x,void 0!==i?i:p.y))),this._unmodified=u,this._constraining=!1}},En.prototype._calcMatrices=function(){if(this.height){var t=this._fov/2,r=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(t)*this.height;var n=Math.PI/2+this._pitch,i=this._fov*(.5+r.y/this.height),a=Math.sin(i)*this.cameraToCenterDistance/Math.sin(e.clamp(Math.PI-n-i,.01,Math.PI-.01)),o=this.point,s=o.x,l=o.y,c=1.01*(Math.cos(Math.PI/2-this._pitch)*a+this.cameraToCenterDistance),u=this.height/50,h=new Float64Array(16);e.perspective(h,this._fov,this.width/this.height,u,c),h[8]=2*-r.x/this.width,h[9]=2*r.y/this.height,e.scale(h,h,[1,-1,1]),e.translate(h,h,[0,0,-this.cameraToCenterDistance]),e.rotateX(h,h,this._pitch),e.rotateZ(h,h,this.angle),e.translate(h,h,[-s,-l,0]),this.mercatorMatrix=e.scale([],h,[this.worldSize,this.worldSize,this.worldSize]),e.scale(h,h,[1,1,e.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=h,this.invProjMatrix=e.invert([],this.projMatrix);var f=this.width%2/2,p=this.height%2/2,d=Math.cos(this.angle),m=Math.sin(this.angle),g=s-Math.round(s)+d*f+m*p,y=l-Math.round(l)+d*p+m*f,v=new Float64Array(h);if(e.translate(v,v,[g>.5?g-1:g,y>.5?y-1:y,0]),this.alignedProjMatrix=v,h=e.create(),e.scale(h,h,[this.width/2,-this.height/2,1]),e.translate(h,h,[1,-1,0]),this.labelPlaneMatrix=h,h=e.create(),e.scale(h,h,[1,-1,1]),e.translate(h,h,[-1,-1,0]),e.scale(h,h,[2/this.width,2/this.height,1]),this.glCoordMatrix=h,this.pixelMatrix=e.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(h=e.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=h,this._posMatrixCache={},this._alignedPosMatrixCache={}}},En.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var t=this.pointCoordinate(new e.Point(0,0)),r=[t.x*this.worldSize,t.y*this.worldSize,0,1];return e.transformMat4(r,r,this.pixelMatrix)[3]/this.cameraToCenterDistance},En.prototype.getCameraPoint=function(){var t=this._pitch,r=Math.tan(t)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.Point(0,r))},En.prototype.getCameraQueryGeometry=function(t){var r=this.getCameraPoint();if(1===t.length)return[t[0],r];for(var n=r.x,i=r.y,a=r.x,o=r.y,s=0,l=t;s=3&&!e.some((function(e){return isNaN(e)}))){var t=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(e[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:t,pitch:+(e[4]||0)}),!0}return!1},In.prototype._updateHashUnthrottled=function(){var t=e.window.location.href.replace(/(#.+)?$/,this.getHashString());try{e.window.history.replaceState(e.window.history.state,null,t)}catch{}};var Ln={linearity:.3,easing:e.bezier(0,0,.3,1)},Pn=e.extend({deceleration:2500,maxSpeed:1400},Ln),zn=e.extend({deceleration:20,maxSpeed:1400},Ln),Dn=e.extend({deceleration:1e3,maxSpeed:360},Ln),On=e.extend({deceleration:1e3,maxSpeed:90},Ln),Rn=function(e){this._map=e,this.clear()};function Fn(e,t){(!e.duration||e.duration0&&r-t[0].time>160;)t.shift()},Rn.prototype._onMoveEnd=function(t){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var r={zoom:0,bearing:0,pitch:0,pan:new e.Point(0,0),pinchAround:void 0,around:void 0},n=0,i=this._inertiaBuffer;n=this._clickTolerance||this._map.fire(new jn(e.type,this._map,e))},Vn.prototype.dblclick=function(e){return this._firePreventable(new jn(e.type,this._map,e))},Vn.prototype.mouseover=function(e){this._map.fire(new jn(e.type,this._map,e))},Vn.prototype.mouseout=function(e){this._map.fire(new jn(e.type,this._map,e))},Vn.prototype.touchstart=function(e){return this._firePreventable(new Nn(e.type,this._map,e))},Vn.prototype.touchmove=function(e){this._map.fire(new Nn(e.type,this._map,e))},Vn.prototype.touchend=function(e){this._map.fire(new Nn(e.type,this._map,e))},Vn.prototype.touchcancel=function(e){this._map.fire(new Nn(e.type,this._map,e))},Vn.prototype._firePreventable=function(e){if(this._map.fire(e),e.defaultPrevented)return{}},Vn.prototype.isEnabled=function(){return!0},Vn.prototype.isActive=function(){return!1},Vn.prototype.enable=function(){},Vn.prototype.disable=function(){};var qn=function(e){this._map=e};qn.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},qn.prototype.mousemove=function(e){this._map.fire(new jn(e.type,this._map,e))},qn.prototype.mousedown=function(){this._delayContextMenu=!0},qn.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new jn("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},qn.prototype.contextmenu=function(e){this._delayContextMenu?this._contextMenuEvent=e:this._map.fire(new jn(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()},qn.prototype.isEnabled=function(){return!0},qn.prototype.isActive=function(){return!1},qn.prototype.enable=function(){},qn.prototype.disable=function(){};var Hn=function(e,t){this._map=e,this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=t.clickTolerance||1};function Gn(e,t){for(var r={},n=0;nthis.numTouches)&&(this.aborted=!0),!this.aborted&&(void 0===this.startTime&&(this.startTime=t.timeStamp),n.length===this.numTouches&&(this.centroid=function(t){for(var r=new e.Point(0,0),n=0,i=t;n30)&&(this.aborted=!0)}}},Wn.prototype.touchend=function(e,t,r){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),0===r.length){var n=!this.aborted&&this.centroid;if(this.reset(),n)return n}};var Zn=function(e){this.singleTap=new Wn(e),this.numTaps=e.numTaps,this.reset()};Zn.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Zn.prototype.touchstart=function(e,t,r){this.singleTap.touchstart(e,t,r)},Zn.prototype.touchmove=function(e,t,r){this.singleTap.touchmove(e,t,r)},Zn.prototype.touchend=function(e,t,r){var n=this.singleTap.touchend(e,t,r);if(n){var i=e.timeStamp-this.lastTime<500,a=!this.lastTap||this.lastTap.dist(n)<30;if((!i||!a)&&this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=n,this.count===this.numTaps)return this.reset(),n}};var Yn=function(){this._zoomIn=new Zn({numTouches:1,numTaps:2}),this._zoomOut=new Zn({numTouches:2,numTaps:1}),this.reset()};Yn.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Yn.prototype.touchstart=function(e,t,r){this._zoomIn.touchstart(e,t,r),this._zoomOut.touchstart(e,t,r)},Yn.prototype.touchmove=function(e,t,r){this._zoomIn.touchmove(e,t,r),this._zoomOut.touchmove(e,t,r)},Yn.prototype.touchend=function(e,t,r){var n=this,i=this._zoomIn.touchend(e,t,r),a=this._zoomOut.touchend(e,t,r);return i?(this._active=!0,e.preventDefault(),setTimeout((function(){return n.reset()}),0),{cameraAnimation:function(t){return t.easeTo({duration:300,zoom:t.getZoom()+1,around:t.unproject(i)},{originalEvent:e})}}):a?(this._active=!0,e.preventDefault(),setTimeout((function(){return n.reset()}),0),{cameraAnimation:function(t){return t.easeTo({duration:300,zoom:t.getZoom()-1,around:t.unproject(a)},{originalEvent:e})}}):void 0},Yn.prototype.touchcancel=function(){this.reset()},Yn.prototype.enable=function(){this._enabled=!0},Yn.prototype.disable=function(){this._enabled=!1,this.reset()},Yn.prototype.isEnabled=function(){return this._enabled},Yn.prototype.isActive=function(){return this._active};var Xn={0:1,2:2},$n=function(e){this.reset(),this._clickTolerance=e.clickTolerance||1};$n.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},$n.prototype._correctButton=function(e,t){return!1},$n.prototype._move=function(e,t){return{}},$n.prototype.mousedown=function(e,t){if(!this._lastPoint){var n=r.mouseButton(e);this._correctButton(e,n)&&(this._lastPoint=t,this._eventButton=n)}},$n.prototype.mousemoveWindow=function(e,t){var r=this._lastPoint;if(r){if(e.preventDefault(),function(e,t){var r=Xn[t];return void 0===e.buttons||(e.buttons&r)!==r}(e,this._eventButton))return void this.reset();if(this._moved||!(t.dist(r)0&&(this._active=!0);var i=Gn(n,r),a=new e.Point(0,0),o=new e.Point(0,0),s=0;for(var l in i){var c=i[l],u=this._touches[l];u&&(a._add(c),o._add(c.sub(u)),s++,i[l]=c)}if(this._touches=i,!(sMath.abs(e.x)}var li=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.reset=function(){e.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},t.prototype._start=function(e){this._lastPoints=e,si(e[0].sub(e[1]))&&(this._valid=!1)},t.prototype._move=function(e,t,r){var n=e[0].sub(this._lastPoints[0]),i=e[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(n,i,r.timeStamp),this._valid)return this._lastPoints=e,this._active=!0,{pitchDelta:(n.y+i.y)/2*-.5}},t.prototype.gestureBeginsVertically=function(e,t,r){if(void 0!==this._valid)return this._valid;var n=e.mag()>=2,i=t.mag()>=2;if(n||i){if(!n||!i)return void 0===this._firstMove&&(this._firstMove=r),r-this._firstMove<100&&void 0;var a=e.y>0==t.y>0;return si(e)&&si(t)&&a}},t}(ti),ci={panStep:100,bearingStep:15,pitchStep:10},ui=function(){var e=ci;this._panStep=e.panStep,this._bearingStep=e.bearingStep,this._pitchStep=e.pitchStep,this._rotationDisabled=!1};function hi(e){return e*(2-e)}ui.prototype.reset=function(){this._active=!1},ui.prototype.keydown=function(e){var t=this;if(!(e.altKey||e.ctrlKey||e.metaKey)){var r=0,n=0,i=0,a=0,o=0;switch(e.keyCode){case 61:case 107:case 171:case 187:r=1;break;case 189:case 109:case 173:r=-1;break;case 37:e.shiftKey?n=-1:(e.preventDefault(),a=-1);break;case 39:e.shiftKey?n=1:(e.preventDefault(),a=1);break;case 38:e.shiftKey?i=1:(e.preventDefault(),o=-1);break;case 40:e.shiftKey?i=-1:(e.preventDefault(),o=1);break;default:return}return this._rotationDisabled&&(n=0,i=0),{cameraAnimation:function(s){var l=s.getZoom();s.easeTo({duration:300,easeId:"keyboardHandler",easing:hi,zoom:r?Math.round(l)+r*(e.shiftKey?2:1):l,bearing:s.getBearing()+n*t._bearingStep,pitch:s.getPitch()+i*t._pitchStep,offset:[-a*t._panStep,-o*t._panStep],center:s.getCenter()},{originalEvent:e})}}}},ui.prototype.enable=function(){this._enabled=!0},ui.prototype.disable=function(){this._enabled=!1,this.reset()},ui.prototype.isEnabled=function(){return this._enabled},ui.prototype.isActive=function(){return this._active},ui.prototype.disableRotation=function(){this._rotationDisabled=!0},ui.prototype.enableRotation=function(){this._rotationDisabled=!1};var fi=4.000244140625,pi=1/450,di=function(t,r){this._map=t,this._el=t.getCanvasContainer(),this._handler=r,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=pi,e.bindAll(["_onTimeout"],this)};di.prototype.setZoomRate=function(e){this._defaultZoomRate=e},di.prototype.setWheelZoomRate=function(e){this._wheelZoomRate=e},di.prototype.isEnabled=function(){return!!this._enabled},di.prototype.isActive=function(){return!!this._active||void 0!==this._finishTimeout},di.prototype.isZooming=function(){return!!this._zooming},di.prototype.enable=function(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=e&&"center"===e.around)},di.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},di.prototype.wheel=function(t){if(this.isEnabled()){var r=t.deltaMode===e.window.WheelEvent.DOM_DELTA_LINE?40*t.deltaY:t.deltaY,n=e.browser.now(),i=n-(this._lastWheelEventTime||0);this._lastWheelEventTime=n,0!==r&&r%fi==0?this._type="wheel":0!==r&&Math.abs(r)<4?this._type="trackpad":i>400?(this._type=null,this._lastValue=r,this._timeout=setTimeout(this._onTimeout,40,t)):this._type||(this._type=Math.abs(i*r)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,r+=this._lastValue)),t.shiftKey&&r&&(r/=4),this._type&&(this._lastWheelEvent=t,this._delta-=r,this._active||this._start(t)),t.preventDefault()}},di.prototype._onTimeout=function(e){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(e)},di.prototype._start=function(t){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var n=r.mousePos(this._el,t);this._around=e.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(n)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},di.prototype.renderFrame=function(){var t=this;if(this._frameId&&(this._frameId=null,this.isActive())){var r=this._map.transform;if(0!==this._delta){var n="wheel"===this._type&&Math.abs(this._delta)>fi?this._wheelZoomRate:this._defaultZoomRate,i=2/(1+Math.exp(-Math.abs(this._delta*n)));this._delta<0&&0!==i&&(i=1/i);var a="number"==typeof this._targetZoom?r.zoomScale(this._targetZoom):r.scale;this._targetZoom=Math.min(r.maxZoom,Math.max(r.minZoom,r.scaleZoom(a*i))),"wheel"===this._type&&(this._startZoom=r.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var o,s="number"==typeof this._targetZoom?this._targetZoom:r.zoom,l=this._startZoom,c=this._easing,u=!1;if("wheel"===this._type&&l&&c){var h=Math.min((e.browser.now()-this._lastWheelEventTime)/200,1),f=c(h);o=e.number(l,s,f),h<1?this._frameId||(this._frameId=!0):u=!0}else o=s,u=!0;return this._active=!0,u&&(this._active=!1,this._finishTimeout=setTimeout((function(){t._zooming=!1,t._handler._triggerRenderFrame(),delete t._targetZoom,delete t._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!u,zoomDelta:o-r.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},di.prototype._smoothOutEasing=function(t){var r=e.ease;if(this._prevEase){var n=this._prevEase,i=(e.browser.now()-n.start)/n.duration,a=n.easing(i+.01)-n.easing(i),o=.27/Math.sqrt(a*a+1e-4)*.01,s=Math.sqrt(.0729-o*o);r=e.bezier(o,s,.25,1)}return this._prevEase={start:e.browser.now(),duration:t,easing:r},r},di.prototype.reset=function(){this._active=!1};var mi=function(e,t){this._clickZoom=e,this._tapZoom=t};mi.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},mi.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},mi.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},mi.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var gi=function(){this.reset()};gi.prototype.reset=function(){this._active=!1},gi.prototype.dblclick=function(e,t){return e.preventDefault(),{cameraAnimation:function(r){r.easeTo({duration:300,zoom:r.getZoom()+(e.shiftKey?-1:1),around:r.unproject(t)},{originalEvent:e})}}},gi.prototype.enable=function(){this._enabled=!0},gi.prototype.disable=function(){this._enabled=!1,this.reset()},gi.prototype.isEnabled=function(){return this._enabled},gi.prototype.isActive=function(){return this._active};var yi=function(){this._tap=new Zn({numTouches:1,numTaps:1}),this.reset()};yi.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},yi.prototype.touchstart=function(e,t,r){this._swipePoint||(this._tapTime&&e.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?r.length>0&&(this._swipePoint=t[0],this._swipeTouch=r[0].identifier):this._tap.touchstart(e,t,r))},yi.prototype.touchmove=function(e,t,r){if(this._tapTime){if(this._swipePoint){if(r[0].identifier!==this._swipeTouch)return;var n=t[0],i=n.y-this._swipePoint.y;return this._swipePoint=n,e.preventDefault(),this._active=!0,{zoomDelta:i/128}}}else this._tap.touchmove(e,t,r)},yi.prototype.touchend=function(e,t,r){this._tapTime?this._swipePoint&&0===r.length&&this.reset():this._tap.touchend(e,t,r)&&(this._tapTime=e.timeStamp)},yi.prototype.touchcancel=function(){this.reset()},yi.prototype.enable=function(){this._enabled=!0},yi.prototype.disable=function(){this._enabled=!1,this.reset()},yi.prototype.isEnabled=function(){return this._enabled},yi.prototype.isActive=function(){return this._active};var vi=function(e,t,r){this._el=e,this._mousePan=t,this._touchPan=r};vi.prototype.enable=function(e){this._inertiaOptions=e||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},vi.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},vi.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},vi.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var xi=function(e,t,r){this._pitchWithRotate=e.pitchWithRotate,this._mouseRotate=t,this._mousePitch=r};xi.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},xi.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},xi.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},xi.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var _i=function(e,t,r,n){this._el=e,this._touchZoom=t,this._touchRotate=r,this._tapDragZoom=n,this._rotationDisabled=!1,this._enabled=!0};_i.prototype.enable=function(e){this._touchZoom.enable(e),this._rotationDisabled||this._touchRotate.enable(e),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},_i.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},_i.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},_i.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},_i.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},_i.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var bi=function(e){return e.zoom||e.drag||e.pitch||e.rotate},wi=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(e.Event);function Ti(e){return e.panDelta&&e.panDelta.mag()||e.zoomDelta||e.bearingDelta||e.pitchDelta}var ki=function(t,n){this._map=t,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Rn(t),this._bearingSnap=n.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(n),e.bindAll(["handleEvent","handleWindowEvent"],this);var i=this._el;this._listeners=[[i,"touchstart",{passive:!0}],[i,"touchmove",{passive:!1}],[i,"touchend",void 0],[i,"touchcancel",void 0],[i,"mousedown",void 0],[i,"mousemove",void 0],[i,"mouseup",void 0],[e.window.document,"mousemove",{capture:!0}],[e.window.document,"mouseup",void 0],[i,"mouseover",void 0],[i,"mouseout",void 0],[i,"dblclick",void 0],[i,"click",void 0],[i,"keydown",{capture:!1}],[i,"keyup",void 0],[i,"wheel",{passive:!1}],[i,"contextmenu",void 0],[e.window,"blur",void 0]];for(var a=0,o=this._listeners;aa?Math.min(2,b):Math.max(.5,b),w=Math.pow(g,1-t),T=i.unproject(x.add(_.mult(t*w)).mult(m));i.setLocationAtPoint(i.renderWorldCopies?T.wrap():T,d)}n._fireMoveEvents(r)}),(function(e){n._afterEase(r,e)}),t),this},r.prototype._prepareEase=function(t,r,n){void 0===n&&(n={}),this._moving=!0,!r&&!n.moving&&this.fire(new e.Event("movestart",t)),this._zooming&&!n.zooming&&this.fire(new e.Event("zoomstart",t)),this._rotating&&!n.rotating&&this.fire(new e.Event("rotatestart",t)),this._pitching&&!n.pitching&&this.fire(new e.Event("pitchstart",t))},r.prototype._fireMoveEvents=function(t){this.fire(new e.Event("move",t)),this._zooming&&this.fire(new e.Event("zoom",t)),this._rotating&&this.fire(new e.Event("rotate",t)),this._pitching&&this.fire(new e.Event("pitch",t))},r.prototype._afterEase=function(t,r){if(!this._easeId||!r||this._easeId!==r){delete this._easeId;var n=this._zooming,i=this._rotating,a=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,n&&this.fire(new e.Event("zoomend",t)),i&&this.fire(new e.Event("rotateend",t)),a&&this.fire(new e.Event("pitchend",t)),this.fire(new e.Event("moveend",t))}},r.prototype.flyTo=function(t,r){var n=this;if(!t.essential&&e.browser.prefersReducedMotion){var i=e.pick(t,["center","zoom","bearing","pitch","around"]);return this.jumpTo(i,r)}this.stop(),t=e.extend({offset:[0,0],speed:1.2,curve:1.42,easing:e.ease},t);var a=this.transform,o=this.getZoom(),s=this.getBearing(),l=this.getPitch(),c=this.getPadding(),u="zoom"in t?e.clamp(+t.zoom,a.minZoom,a.maxZoom):o,h="bearing"in t?this._normalizeBearing(t.bearing,s):s,f="pitch"in t?+t.pitch:l,p="padding"in t?t.padding:a.padding,d=a.zoomScale(u-o),m=e.Point.convert(t.offset),g=a.centerPoint.add(m),y=a.pointLocation(g),v=e.LngLat.convert(t.center||y);this._normalizeCenter(v);var x=a.project(y),_=a.project(v).sub(x),b=t.curve,w=Math.max(a.width,a.height),T=w/d,k=_.mag();if("minZoom"in t){var A=e.clamp(Math.min(t.minZoom,o,u),a.minZoom,a.maxZoom),M=w/a.zoomScale(A-o);b=Math.sqrt(M/k*2)}var S=b*b;function E(e){var t=(T*T-w*w+(e?-1:1)*S*S*k*k)/(2*(e?T:w)*S*k);return Math.log(Math.sqrt(t*t+1)-t)}function C(e){return(Math.exp(e)-Math.exp(-e))/2}function I(e){return(Math.exp(e)+Math.exp(-e))/2}var L=E(0),P=function(e){return I(L)/I(L+b*e)},z=function(e){return w*((I(L)*function(e){return C(e)/I(e)}(L+b*e)-C(L))/S)/k},D=(E(1)-L)/b;if(Math.abs(k)<1e-6||!isFinite(D)){if(Math.abs(w-T)<1e-6)return this.easeTo(t,r);var O=Tt.maxDuration&&(t.duration=0),this._zooming=!0,this._rotating=s!==h,this._pitching=f!==l,this._padding=!a.isPaddingEqual(p),this._prepareEase(r,!1),this._ease((function(t){var i=t*D,d=1/P(i);a.zoom=1===t?u:o+a.scaleZoom(d),n._rotating&&(a.bearing=e.number(s,h,t)),n._pitching&&(a.pitch=e.number(l,f,t)),n._padding&&(a.interpolatePadding(c,p,t),g=a.centerPoint.add(m));var y=1===t?v:a.unproject(x.add(_.mult(z(i))).mult(d));a.setLocationAtPoint(a.renderWorldCopies?y.wrap():y,g),n._fireMoveEvents(r)}),(function(){return n._afterEase(r)}),t),this},r.prototype.isEasing=function(){return!!this._easeFrameId},r.prototype.stop=function(){return this._stop()},r.prototype._stop=function(e,t){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var r=this._onEaseEnd;delete this._onEaseEnd,r.call(this,t)}if(!e){var n=this.handlers;n&&n.stop(!1)}return this},r.prototype._ease=function(t,r,n){!1===n.animate||0===n.duration?(t(1),r()):(this._easeStart=e.browser.now(),this._easeOptions=n,this._onEaseFrame=t,this._onEaseEnd=r,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},r.prototype._renderFrameCallback=function(){var t=Math.min((e.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(t)),t<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},r.prototype._normalizeBearing=function(t,r){t=e.wrap(t,-180,180);var n=Math.abs(t-r);return Math.abs(t-360-r)180?-360:r<-180?360:0}},r}(e.Evented),Mi=function(t){void 0===t&&(t={}),this.options=t,e.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};Mi.prototype.getDefaultPosition=function(){return"bottom-right"},Mi.prototype.onAdd=function(e){var t=this.options&&this.options.compact;return this._map=e,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=r.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=r.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),t&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),void 0===t&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Mi.prototype.onRemove=function(){r.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},Mi.prototype._setElementTitle=function(e,t){var r=this._map._getUIString("AttributionControl."+t);e.title=r,e.setAttribute("aria-label",r)},Mi.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},Mi.prototype._updateEditLink=function(){var t=this._editLink;t||(t=this._editLink=this._container.querySelector(".mapbox-improve-map"));var r=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||e.config.ACCESS_TOKEN}];if(t){var n=r.reduce((function(e,t,n){return t.value&&(e+=t.key+"="+t.value+(n=0)return!1;return!0}))).join(" | ");o!==this._attribHTML&&(this._attribHTML=o,e.length?(this._innerContainer.innerHTML=o,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Mi.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var Si=function(){e.bindAll(["_updateLogo"],this),e.bindAll(["_updateCompact"],this)};Si.prototype.onAdd=function(e){this._map=e,this._container=r.create("div","mapboxgl-ctrl");var t=r.create("a","mapboxgl-ctrl-logo");return t.target="_blank",t.rel="noopener nofollow",t.href="https://www.mapbox.com/",t.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),t.setAttribute("rel","noopener nofollow"),this._container.appendChild(t),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Si.prototype.onRemove=function(){r.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Si.prototype.getDefaultPosition=function(){return"bottom-left"},Si.prototype._updateLogo=function(e){(!e||"metadata"===e.sourceDataType)&&(this._container.style.display=this._logoRequired()?"block":"none")},Si.prototype._logoRequired=function(){if(this._map.style){var e=this._map.style.sourceCaches;for(var t in e)if(e[t].getSource().mapbox_logo)return!0;return!1}},Si.prototype._updateCompact=function(){var e=this._container.children;if(e.length){var t=e[0];this._map.getCanvasContainer().offsetWidth<250?t.classList.add("mapboxgl-compact"):t.classList.remove("mapboxgl-compact")}};var Ei=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Ei.prototype.add=function(e){var t=++this._id;return this._queue.push({callback:e,id:t,cancelled:!1}),t},Ei.prototype.remove=function(e){for(var t=this._currentlyRunning,r=0,n=t?this._queue.concat(t):this._queue;rt.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=t.minPitch&&null!=t.maxPitch&&t.minPitch>t.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=t.minPitch&&t.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=t.maxPitch&&t.maxPitch>60)throw new Error("maxPitch must be less than or equal to 60");var i=new En(t.minZoom,t.maxZoom,t.minPitch,t.maxPitch,t.renderWorldCopies);if(n.call(this,i,t),this._interactive=t.interactive,this._maxTileCacheSize=t.maxTileCacheSize,this._failIfMajorPerformanceCaveat=t.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=t.preserveDrawingBuffer,this._antialias=t.antialias,this._trackResize=t.trackResize,this._bearingSnap=t.bearingSnap,this._refreshExpiredTiles=t.refreshExpiredTiles,this._fadeDuration=t.fadeDuration,this._crossSourceCollisions=t.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=t.collectResourceTiming,this._renderTaskQueue=new Ei,this._controls=[],this._mapId=e.uniqueId(),this._locale=e.extend({},Ci,t.locale),this._clickTolerance=t.clickTolerance,this._requestManager=new e.RequestManager(t.transformRequest,t.accessToken),"string"==typeof t.container){if(this._container=e.window.document.getElementById(t.container),!this._container)throw new Error("Container '"+t.container+"' not found.")}else{if(!(t.container instanceof Li))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=t.container}if(t.maxBounds&&this.setMaxBounds(t.maxBounds),e.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",(function(){return r._update(!1)})),this.on("moveend",(function(){return r._update(!1)})),this.on("zoom",(function(){return r._update(!0)})),typeof e.window<"u"&&(e.window.addEventListener("online",this._onWindowOnline,!1),e.window.addEventListener("resize",this._onWindowResize,!1),e.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new ki(this,t);var a="string"==typeof t.hash&&t.hash||void 0;this._hash=t.hash&&new In(a).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:t.center,zoom:t.zoom,bearing:t.bearing,pitch:t.pitch}),t.bounds&&(this.resize(),this.fitBounds(t.bounds,e.extend({},t.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=t.localIdeographFontFamily,t.style&&this.setStyle(t.style,{localIdeographFontFamily:t.localIdeographFontFamily}),t.attributionControl&&this.addControl(new Mi({customAttribution:t.customAttribution})),this.addControl(new Si,t.logoPosition),this.on("style.load",(function(){r.transform.unmodified&&r.jumpTo(r.style.stylesheet)})),this.on("data",(function(t){r._update("style"===t.dataType),r.fire(new e.Event(t.dataType+"data",t))})),this.on("dataloading",(function(t){r.fire(new e.Event(t.dataType+"dataloading",t))}))}n&&(i.__proto__=n),i.prototype=Object.create(n&&n.prototype),i.prototype.constructor=i;var a={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return i.prototype._getMapId=function(){return this._mapId},i.prototype.addControl=function(t,r){if(void 0===r&&(r=t.getDefaultPosition?t.getDefaultPosition():"top-right"),!t||!t.onAdd)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var n=t.onAdd(this);this._controls.push(t);var i=this._controlPositions[r];return-1!==r.indexOf("bottom")?i.insertBefore(n,i.firstChild):i.appendChild(n),this},i.prototype.removeControl=function(t){if(!t||!t.onRemove)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var r=this._controls.indexOf(t);return r>-1&&this._controls.splice(r,1),t.onRemove(this),this},i.prototype.hasControl=function(e){return this._controls.indexOf(e)>-1},i.prototype.resize=function(t){var r=this._containerDimensions(),n=r[0],i=r[1];this._resizeCanvas(n,i),this.transform.resize(n,i),this.painter.resize(n,i);var a=!this._moving;return a&&(this.stop(),this.fire(new e.Event("movestart",t)).fire(new e.Event("move",t))),this.fire(new e.Event("resize",t)),a&&this.fire(new e.Event("moveend",t)),this},i.prototype.getBounds=function(){return this.transform.getBounds()},i.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},i.prototype.setMaxBounds=function(t){return this.transform.setMaxBounds(e.LngLatBounds.convert(t)),this._update()},i.prototype.setMinZoom=function(e){if((e=e??-2)>=-2&&e<=this.transform.maxZoom)return this.transform.minZoom=e,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=e,this._update(),this.getZoom()>e&&this.setZoom(e),this;throw new Error("maxZoom must be greater than the current minZoom")},i.prototype.getMaxZoom=function(){return this.transform.maxZoom},i.prototype.setMinPitch=function(e){if((e=e??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(e>=0&&e<=this.transform.maxPitch)return this.transform.minPitch=e,this._update(),this.getPitch()60)throw new Error("maxPitch must be less than or equal to 60");if(e>=this.transform.minPitch)return this.transform.maxPitch=e,this._update(),this.getPitch()>e&&this.setPitch(e),this;throw new Error("maxPitch must be greater than the current minPitch")},i.prototype.getMaxPitch=function(){return this.transform.maxPitch},i.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},i.prototype.setRenderWorldCopies=function(e){return this.transform.renderWorldCopies=e,this._update()},i.prototype.project=function(t){return this.transform.locationPoint(e.LngLat.convert(t))},i.prototype.unproject=function(t){return this.transform.pointLocation(e.Point.convert(t))},i.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},i.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},i.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},i.prototype._createDelegatedListener=function(e,t,r){var n,i=this;if("mouseenter"===e||"mouseover"===e){var a=!1;return{layer:t,listener:r,delegates:{mousemove:function(n){var o=i.getLayer(t)?i.queryRenderedFeatures(n.point,{layers:[t]}):[];o.length?a||(a=!0,r.call(i,new jn(e,i,n.originalEvent,{features:o}))):a=!1},mouseout:function(){a=!1}}}}if("mouseleave"===e||"mouseout"===e){var o=!1;return{layer:t,listener:r,delegates:{mousemove:function(n){(i.getLayer(t)?i.queryRenderedFeatures(n.point,{layers:[t]}):[]).length?o=!0:o&&(o=!1,r.call(i,new jn(e,i,n.originalEvent)))},mouseout:function(t){o&&(o=!1,r.call(i,new jn(e,i,t.originalEvent)))}}}}return{layer:t,listener:r,delegates:(n={},n[e]=function(e){var n=i.getLayer(t)?i.queryRenderedFeatures(e.point,{layers:[t]}):[];n.length&&(e.features=n,r.call(i,e),delete e.features)},n)}},i.prototype.on=function(e,t,r){if(void 0===r)return n.prototype.on.call(this,e,t);var i=this._createDelegatedListener(e,t,r);for(var a in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[e]=this._delegatedListeners[e]||[],this._delegatedListeners[e].push(i),i.delegates)this.on(a,i.delegates[a]);return this},i.prototype.once=function(e,t,r){if(void 0===r)return n.prototype.once.call(this,e,t);var i=this._createDelegatedListener(e,t,r);for(var a in i.delegates)this.once(a,i.delegates[a]);return this},i.prototype.off=function(e,t,r){var i=this;return void 0===r?n.prototype.off.call(this,e,t):(this._delegatedListeners&&this._delegatedListeners[e]&&function(n){for(var a=n[e],o=0;o180;){var s=n.locationPoint(t);if(s.x>=0&&s.y>=0&&s.x<=n.width&&s.y<=n.height)break;t.lng>n.center.lng?t.lng-=360:t.lng+=360}return t}Bi.prototype.down=function(e,t){this.mouseRotate.mousedown(e,t),this.mousePitch&&this.mousePitch.mousedown(e,t),r.disableDrag()},Bi.prototype.move=function(e,t){var r=this.map,n=this.mouseRotate.mousemoveWindow(e,t);if(n&&n.bearingDelta&&r.setBearing(r.getBearing()+n.bearingDelta),this.mousePitch){var i=this.mousePitch.mousemoveWindow(e,t);i&&i.pitchDelta&&r.setPitch(r.getPitch()+i.pitchDelta)}},Bi.prototype.off=function(){var e=this.element;r.removeEventListener(e,"mousedown",this.mousedown),r.removeEventListener(e,"touchstart",this.touchstart,{passive:!1}),r.removeEventListener(e,"touchmove",this.touchmove),r.removeEventListener(e,"touchend",this.touchend),r.removeEventListener(e,"touchcancel",this.reset),this.offTemp()},Bi.prototype.offTemp=function(){r.enableDrag(),r.removeEventListener(e.window,"mousemove",this.mousemove),r.removeEventListener(e.window,"mouseup",this.mouseup)},Bi.prototype.mousedown=function(t){this.down(e.extend({},t,{ctrlKey:!0,preventDefault:function(){return t.preventDefault()}}),r.mousePos(this.element,t)),r.addEventListener(e.window,"mousemove",this.mousemove),r.addEventListener(e.window,"mouseup",this.mouseup)},Bi.prototype.mousemove=function(e){this.move(e,r.mousePos(this.element,e))},Bi.prototype.mouseup=function(e){this.mouseRotate.mouseupWindow(e),this.mousePitch&&this.mousePitch.mouseupWindow(e),this.offTemp()},Bi.prototype.touchstart=function(e){1!==e.targetTouches.length?this.reset():(this._startPos=this._lastPos=r.touchPos(this.element,e.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return e.preventDefault()}},this._startPos))},Bi.prototype.touchmove=function(e){1!==e.targetTouches.length?this.reset():(this._lastPos=r.touchPos(this.element,e.targetTouches)[0],this.move({preventDefault:function(){return e.preventDefault()}},this._lastPos))},Bi.prototype.touchend=function(e){0===e.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)=r}this._isDragging&&(this._pos=t.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new e.Event("dragstart"))),this.fire(new e.Event("drag")))},n.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new e.Event("dragend")),this._state="inactive"},n.prototype._addDragHandler=function(e){this._element.contains(e.originalEvent.target)&&(e.preventDefault(),this._positionDelta=e.point.sub(this._pos).add(this._offset),this._pointerdownPos=e.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},n.prototype.setDraggable=function(e){return this._draggable=!!e,this._map&&(e?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},n.prototype.isDraggable=function(){return this._draggable},n.prototype.setRotation=function(e){return this._rotation=e||0,this._update(),this},n.prototype.getRotation=function(){return this._rotation},n.prototype.setRotationAlignment=function(e){return this._rotationAlignment=e||"auto",this._update(),this},n.prototype.getRotationAlignment=function(){return this._rotationAlignment},n.prototype.setPitchAlignment=function(e){return this._pitchAlignment=e&&"auto"!==e?e:this._rotationAlignment,this._update(),this},n.prototype.getPitchAlignment=function(){return this._pitchAlignment},n}(e.Evented),Hi={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Gi=0,Wi=!1,Zi=function(t){function n(r){t.call(this),this.options=e.extend({},Hi,r),e.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.onAdd=function(t){return this._map=t,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),function(t){void 0!==Vi?t(Vi):void 0!==e.window.navigator.permissions?e.window.navigator.permissions.query({name:"geolocation"}).then((function(e){Vi="denied"!==e.state,t(Vi)})):(Vi=!!e.window.navigator.geolocation,t(Vi))}(this._setupUI),this._container},n.prototype.onRemove=function(){void 0!==this._geolocationWatchID&&(e.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),r.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Gi=0,Wi=!1},n.prototype._isOutOfMapMaxBounds=function(e){var t=this._map.getMaxBounds(),r=e.coords;return t&&(r.longitudet.getEast()||r.latitudet.getNorth())},n.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}},n.prototype._onSuccess=function(t){if(this._map){if(this._isOutOfMapMaxBounds(t))return this._setErrorState(),this.fire(new e.Event("outofmaxbounds",t)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=t,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(t),(!this.options.trackUserLocation||"ACTIVE_LOCK"===this._watchState)&&this._updateCamera(t),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("geolocate",t)),this._finish()}},n.prototype._updateCamera=function(t){var r=new e.LngLat(t.coords.longitude,t.coords.latitude),n=t.coords.accuracy,i=this._map.getBearing(),a=e.extend({bearing:i},this.options.fitBoundsOptions);this._map.fitBounds(r.toBounds(n),a,{geolocateSource:!0})},n.prototype._updateMarker=function(t){if(t){var r=new e.LngLat(t.coords.longitude,t.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=t.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},n.prototype._updateCircleRadius=function(){var e=this._map._container.clientHeight/2,t=this._map.unproject([0,e]),r=this._map.unproject([1,e]),n=t.distanceTo(r),i=Math.ceil(2*this._accuracy/n);this._circleElement.style.width=i+"px",this._circleElement.style.height=i+"px"},n.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},n.prototype._onError=function(t){if(this._map){if(this.options.trackUserLocation)if(1===t.code){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var r=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=r,this._geolocateButton.setAttribute("aria-label",r),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===t.code&&Wi)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("error",t)),this._finish()}},n.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},n.prototype._setupUI=function(t){var n=this;if(this._container.addEventListener("contextmenu",(function(e){return e.preventDefault()})),this._geolocateButton=r.create("button","mapboxgl-ctrl-geolocate",this._container),r.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",!1===t){e.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var i=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=i,this._geolocateButton.setAttribute("aria-label",i)}else{var a=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=a,this._geolocateButton.setAttribute("aria-label",a)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=r.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new qi(this._dotElement),this._circleElement=r.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new qi({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(function(t){var r=t.originalEvent&&"resize"===t.originalEvent.type;!t.geolocateSource&&"ACTIVE_LOCK"===n._watchState&&!r&&(n._watchState="BACKGROUND",n._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),n._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),n.fire(new e.Event("trackuserlocationend")))}))},n.prototype.trigger=function(){if(!this._setup)return e.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new e.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Gi--,Wi=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new e.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new e.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){var t;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++Gi>1?(t={maximumAge:6e5,timeout:0},Wi=!0):(t=this.options.positionOptions,Wi=!1),this._geolocationWatchID=e.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,t)}}else e.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},n.prototype._clearWatch=function(){e.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},n}(e.Evented),Yi={maxWidth:100,unit:"metric"},Xi=function(t){this.options=e.extend({},Yi,t),e.bindAll(["_onMove","setUnit"],this)};function $i(e,t,r){var n=r&&r.maxWidth||100,i=e._container.clientHeight/2,a=e.unproject([0,i]),o=e.unproject([n,i]),s=a.distanceTo(o);if(r&&"imperial"===r.unit){var l=3.2808*s;l>5280?Ki(t,n,l/5280,e._getUIString("ScaleControl.Miles")):Ki(t,n,l,e._getUIString("ScaleControl.Feet"))}else r&&"nautical"===r.unit?Ki(t,n,s/1852,e._getUIString("ScaleControl.NauticalMiles")):s>=1e3?Ki(t,n,s/1e3,e._getUIString("ScaleControl.Kilometers")):Ki(t,n,s,e._getUIString("ScaleControl.Meters"))}function Ki(e,t,r,n){var i=function(e){var t=Math.pow(10,(""+Math.floor(e)).length-1),r=e/t;return r=r>=10?10:r>=5?5:r>=3?3:r>=2?2:r>=1?1:function(e){var t=Math.pow(10,Math.ceil(-Math.log(e)/Math.LN10));return Math.round(e*t)/t}(r),t*r}(r),a=i/r;e.style.width=t*a+"px",e.innerHTML=i+" "+n}Xi.prototype.getDefaultPosition=function(){return"bottom-left"},Xi.prototype._onMove=function(){$i(this._map,this._container,this.options)},Xi.prototype.onAdd=function(e){return this._map=e,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",e.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Xi.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Xi.prototype.setUnit=function(e){this.options.unit=e,$i(this._map,this._container,this.options)};var Ji=function(t){this._fullscreen=!1,t&&t.container&&(t.container instanceof e.window.HTMLElement?this._container=t.container:e.warnOnce("Full screen control 'container' must be a DOM element.")),e.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in e.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in e.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in e.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in e.window.document&&(this._fullscreenchange="MSFullscreenChange")};Ji.prototype.onAdd=function(t){return this._map=t,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",e.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Ji.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,e.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Ji.prototype._checkFullscreenSupport=function(){return!!(e.window.document.fullscreenEnabled||e.window.document.mozFullScreenEnabled||e.window.document.msFullscreenEnabled||e.window.document.webkitFullscreenEnabled)},Ji.prototype._setupUI=function(){var t=this._fullscreenButton=r.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);r.create("span","mapboxgl-ctrl-icon",t).setAttribute("aria-hidden",!0),t.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),e.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Ji.prototype._updateTitle=function(){var e=this._getTitle();this._fullscreenButton.setAttribute("aria-label",e),this._fullscreenButton.title=e},Ji.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Ji.prototype._isFullscreen=function(){return this._fullscreen},Ji.prototype._changeIcon=function(){(e.window.document.fullscreenElement||e.window.document.mozFullScreenElement||e.window.document.webkitFullscreenElement||e.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},Ji.prototype._onClickFullscreen=function(){this._isFullscreen()?e.window.document.exitFullscreen?e.window.document.exitFullscreen():e.window.document.mozCancelFullScreen?e.window.document.mozCancelFullScreen():e.window.document.msExitFullscreen?e.window.document.msExitFullscreen():e.window.document.webkitCancelFullScreen&&e.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Qi={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},ea=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),ta=function(t){function n(r){t.call(this),this.options=e.extend(Object.create(Qi),r),e.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.addTo=function(t){return this._map&&this.remove(),this._map=t,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new e.Event("open")),this},n.prototype.isOpen=function(){return!!this._map},n.prototype.remove=function(){return this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new e.Event("close")),this},n.prototype.getLngLat=function(){return this._lngLat},n.prototype.setLngLat=function(t){return this._lngLat=e.LngLat.convert(t),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},n.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},n.prototype.getElement=function(){return this._container},n.prototype.setText=function(t){return this.setDOMContent(e.window.document.createTextNode(t))},n.prototype.setHTML=function(t){var r,n=e.window.document.createDocumentFragment(),i=e.window.document.createElement("body");for(i.innerHTML=t;r=i.firstChild;)n.appendChild(r);return this.setDOMContent(n)},n.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},n.prototype.setMaxWidth=function(e){return this.options.maxWidth=e,this._update(),this},n.prototype.setDOMContent=function(e){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=r.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(e),this._createCloseButton(),this._update(),this._focusFirstElement(),this},n.prototype.addClassName=function(e){this._container&&this._container.classList.add(e)},n.prototype.removeClassName=function(e){this._container&&this._container.classList.remove(e)},n.prototype.setOffset=function(e){return this.options.offset=e,this._update(),this},n.prototype.toggleClassName=function(e){if(this._container)return this._container.classList.toggle(e)},n.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=r.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},n.prototype._onMouseUp=function(e){this._update(e.point)},n.prototype._onMouseMove=function(e){this._update(e.point)},n.prototype._onDrag=function(e){this._update(e.point)},n.prototype._update=function(e){var t=this,n=this._lngLat||this._trackPointer;if(this._map&&n&&this._content&&(this._container||(this._container=r.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=r.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach((function(e){return t._container.classList.add(e)})),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=ji(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||e)){var i=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat),a=this.options.anchor,o=ra(this.options.offset);if(!a){var s,l=this._container.offsetWidth,c=this._container.offsetHeight;s=i.y+o.bottom.ythis._map.transform.height-c?["bottom"]:[],i.xthis._map.transform.width-l/2&&s.push("right"),a=0===s.length?"bottom":s.join("-")}var u=i.add(o[a]).round();r.setTransform(this._container,Ni[a]+" translate("+u.x+"px,"+u.y+"px)"),Ui(this._container,a,"popup")}},n.prototype._focusFirstElement=function(){if(this.options.focusAfterOpen&&this._container){var e=this._container.querySelector(ea);e&&e.focus()}},n.prototype._onClose=function(){this.remove()},n}(e.Evented);function ra(t){if(t){if("number"==typeof t){var r=Math.round(Math.sqrt(.5*Math.pow(t,2)));return{center:new e.Point(0,0),top:new e.Point(0,t),"top-left":new e.Point(r,r),"top-right":new e.Point(-r,r),bottom:new e.Point(0,-t),"bottom-left":new e.Point(r,-r),"bottom-right":new e.Point(-r,-r),left:new e.Point(t,0),right:new e.Point(-t,0)}}if(t instanceof e.Point||Array.isArray(t)){var n=e.Point.convert(t);return{center:n,top:n,"top-left":n,"top-right":n,bottom:n,"bottom-left":n,"bottom-right":n,left:n,right:n}}return{center:e.Point.convert(t.center||[0,0]),top:e.Point.convert(t.top||[0,0]),"top-left":e.Point.convert(t["top-left"]||[0,0]),"top-right":e.Point.convert(t["top-right"]||[0,0]),bottom:e.Point.convert(t.bottom||[0,0]),"bottom-left":e.Point.convert(t["bottom-left"]||[0,0]),"bottom-right":e.Point.convert(t["bottom-right"]||[0,0]),left:e.Point.convert(t.left||[0,0]),right:e.Point.convert(t.right||[0,0])}}return ra(new e.Point(0,0))}var na={version:e.version,supported:t,setRTLTextPlugin:e.setRTLTextPlugin,getRTLTextPluginStatus:e.getRTLTextPluginStatus,Map:Di,NavigationControl:Fi,GeolocateControl:Zi,AttributionControl:Mi,ScaleControl:Xi,FullscreenControl:Ji,Popup:ta,Marker:qi,Style:Gt,LngLat:e.LngLat,LngLatBounds:e.LngLatBounds,Point:e.Point,MercatorCoordinate:e.MercatorCoordinate,Evented:e.Evented,config:e.config,prewarm:function(){je().acquire(Oe)},clearPrewarmedResources:function(){var e=Fe;e&&(e.isPreloaded()&&1===e.numActive()?(e.release(Oe),Fe=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return e.config.ACCESS_TOKEN},set accessToken(t){e.config.ACCESS_TOKEN=t},get baseApiUrl(){return e.config.API_URL},set baseApiUrl(t){e.config.API_URL=t},get workerCount(){return Re.workerCount},set workerCount(e){Re.workerCount=e},get maxParallelImageRequests(){return e.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(t){e.config.MAX_PARALLEL_IMAGE_REQUESTS=t},clearStorage:function(t){e.clearTileCache(t)},workerUrl:""};return na})),r},"object"==typeof e&&typeof t<"u"?t.exports=n():(r=r||self).mapboxgl=n()}}),V_=m({"src/plots/mapbox/layers.js"(e,t){var r=ct(),n=Et().sanitizeHTML,i=O_(),a=C_();function o(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=a.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var s=o.prototype;function l(e){if(!e.visible)return!1;var t=e.source;if(Array.isArray(t)&&t.length>0){for(var n=0;n0}function c(e){var t={},n={};switch(e.type){case"circle":r.extendFlat(n,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":r.extendFlat(n,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":r.extendFlat(n,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var a=e.symbol,o=i(a.textposition,a.iconsize);r.extendFlat(t,{"icon-image":a.icon+"-15","icon-size":a.iconsize/10,"text-field":a.text,"text-size":a.textfont.size,"text-anchor":o.anchor,"text-offset":o.offset,"symbol-placement":a.placement}),r.extendFlat(n,{"icon-color":e.color,"text-color":a.textfont.color,"text-opacity":e.opacity});break;case"raster":r.extendFlat(n,{"raster-fade-duration":0,"raster-opacity":e.opacity})}return{layout:t,paint:n}}s.update=function(e){this.visible?this.needsNewImage(e)?this.updateImage(e):this.needsNewSource(e)?(this.removeLayer(),this.updateSource(e),this.updateLayer(e)):this.needsNewLayer(e)?this.updateLayer(e):this.updateStyle(e):(this.updateSource(e),this.updateLayer(e)),this.visible=l(e)},s.needsNewImage=function(e){return this.subplot.map.getSource(this.idSource)&&"image"===this.sourceType&&"image"===e.sourcetype&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))},s.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type},s.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},s.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},s.updateImage=function(e){this.subplot.map.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var t=this.findFollowingMapboxLayerId(this.lookupBelow());null!==t&&this.subplot.map.moveLayer(this.idLayer,t)},s.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,l(e)){var r=function(e){var t,r=e.sourcetype,i=e.source,a={type:r};return"geojson"===r?t="data":"vector"===r?t="string"==typeof i?"url":"tiles":"raster"===r?(t="tiles",a.tileSize=256):"image"===r&&(t="url",a.coordinates=e.coordinates),a[t]=i,e.sourceattribution&&(a.attribution=n(e.sourceattribution)),a}(e);t.addSource(this.idSource,r)}},s.findFollowingMapboxLayerId=function(e){if("traces"===e)for(var t=this.subplot.getMapLayers(),r=0;r1)for(r=0;r-1&&m(t.originalEvent,n,[r.xaxis],[r.yaxis],r.id,e),i.indexOf("event")>-1&&l.click(n,t.originalEvent)}}},x.updateFx=function(e){var t=this,r=t.map,i=t.gd;if(!t.isStatic){var a,o=e.dragmode;a=function(e,r){r.isRect?(e.range={})[t.id]=[c([r.xmin,r.ymin]),c([r.xmax,r.ymax])]:(e.lassoPoints={})[t.id]=r.map(c)};var l=t.dragOptions;t.dragOptions=n.extendDeep(l||{},{dragmode:e.dragmode,element:t.div,gd:i,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:a},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),h(o)||u(o)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(e,r,n){f(e,r,n,t.dragOptions,o)},s.init(t.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener("touchstart",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on("click",t.onClickInPanHandler))}function c(e){var r=t.map.unproject(e);return[r.lng,r.lat]}},x.updateFramework=function(e){var t=e[this.id].domain,r=e._size,n=this.div.style;n.width=r.w*(t.x[1]-t.x[0])+"px",n.height=r.h*(t.y[1]-t.y[0])+"px",n.left=r.l+t.x[0]*r.w+"px",n.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])},x.updateLayers=function(e){var t,r=e[this.id].layers,n=this.layerList;if(r.length!==n.length){for(t=0;t1&&r.warn(f.multipleTokensErrorMsg),i[0]):(a.length&&r.log(["Listed mapbox access token(s)",a.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}(e,o);t.accessToken=s;for(var l=0;lw/2){var T=v.split("|").join("
");_.text(T).attr("data-unformatted",T).call(c.convertToTspans,e),b=l.bBox(_.node())}_.attr("transform",n(-3,8-b.height)),x.insert("rect",".static-attribution").attr({x:-b.width-6,y:-b.height-3,width:b.width+6,height:b.height+3,fill:"rgba(255, 255, 255, 0.75)"});var k=1;b.width+6>w&&(k=w/(b.width+6));var A=[a.l+a.w*d.x[1],a.t+a.h*(1-d.y[0])];x.attr("transform",n(A[0],A[1])+i(k))}},e.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[h],n=0;n=0;r--)e.removeLayer(t[r][1])},o.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},t.exports=function(e,t){var n=t[0].trace,i=new a(e,n.uid),o=i.sourceId,s=r(t),l=i.below=e.belowLookup["trace-"+n.uid];return e.map.addSource(o,{type:"geojson",data:s.geojson}),i._addLayers(s,l),t[0].trace._glTrace=i,i}}}),J_=m({"src/traces/choroplethmapbox/index.js"(e,t){["*choroplethmapbox* trace is deprecated!","Please consider switching to the *choroplethmap* trace type and `map` subplots.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" "),t.exports={attributes:Y_(),supplyDefaults:X_(),colorbar:Vo(),calc:Ng(),plot:K_(),hoverPoints:qg(),eventData:Hg(),selectPoints:Gg(),styleOnSelect:function(e,t){t&&t[0].trace._glTrace.updateOnSelect(t)},getBelow:function(e,t){for(var r=t.getMapLayers(),n=r.length-2;n>=0;n--){var i=r[n].id;if("string"==typeof i&&0===i.indexOf("water"))for(var a=n+1;a0?+p[u]:0),h.push({type:"Feature",geometry:{type:"Point",coordinates:y},properties:v})}}var _=a.extractOpts(t),b=_.reversescale?a.flipScale(_.colorscale):_.colorscale,w=b[0][1],T=["interpolate",["linear"],["heatmap-density"],0,i.opacity(w)<1?w:i.addOpacity(w,0)];for(u=1;u=0;r--)e.removeLayer(t[r][1])},a.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},t.exports=function(e,t){var n=t[0].trace,a=new i(e,n.uid),o=a.sourceId,s=r(t),l=a.below=e.belowLookup["trace-"+n.uid];return e.map.addSource(o,{type:"geojson",data:s.geojson}),a._addLayers(s,l),a}}}),ab=m({"src/traces/densitymapbox/hover.js"(e,t){var r=ar(),n=B_().hoverPoints,i=B_().getExtraText;t.exports=function(e,t,a){var o=n(e,t,a);if(o){var s=o[0],l=s.cd,c=l[0].trace,u=l[s.index];if(delete s.color,"z"in u){var h=s.subplot.mockAxis;s.z=u.z,s.zLabel=r.tickText(h,h.c2l(u.z),"hover").text}return s.extraText=i(c,u,l[0].t.labels),[s]}}}}),ob=m({"src/traces/densitymapbox/event_data.js"(e,t){t.exports=function(e,t){return e.lon=t.lon,e.lat=t.lat,e.z=t.z,e}}}),sb=m({"src/traces/densitymapbox/index.js"(e,t){["*densitymapbox* trace is deprecated!","Please consider switching to the *densitymap* trace type and `map` subplots.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" "),t.exports={attributes:eb(),supplyDefaults:tb(),colorbar:Vo(),formatLabels:D_(),calc:rb(),plot:ib(),hoverPoints:ab(),eventData:ob(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;nESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}},{id:"waterway_tunnel",type:"line",source:"openmaptiles","source-layer":"waterway",minzoom:14,filter:["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]},"line-dasharray":[2,4]}},{id:"waterway-other",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["!in","class","canal","river","stream"],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,2]]}}},{id:"waterway-stream-canal",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]}}},{id:"waterway-river",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["==","class","river"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.2,stops:[[10,.8],[20,4]]},"line-opacity":.5}},{id:"water-offset",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",maxzoom:8,filter:["==","$type","Polygon"],layout:{visibility:"visible"},paint:{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{base:1,stops:[[6,[2,0]],[8,[0,0]]]}}},{id:"water",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{id:"water-pattern",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{id:"landcover-ice-shelf",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"landcover",filter:["==","subclass","ice_shelf"],layout:{visibility:"visible"},paint:{"fill-color":"#fff","fill-opacity":{base:1,stops:[[0,.9],[10,.3]]}}},{id:"tunnel-service-track-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[15,1],[16,4],[20,11]]}}},{id:"tunnel-minor-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,1]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"tunnel-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"tunnel-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.7}},{id:"tunnel-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"tunnel-path",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"tunnel-service-track",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-width":{base:1.2,stops:[[15.5,0],[16,2],[20,7.5]]}}},{id:"tunnel-minor",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor_road"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-opacity":1,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"tunnel-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,10]]}}},{id:"tunnel-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-motorway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#ffdaa6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-railway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]},"line-dasharray":[2,2]}},{id:"ferry",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["in","class","ferry"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{id:"aeroway-taxiway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","taxiway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,2],[17,12]]},"line-opacity":1}},{id:"aeroway-runway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","runway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,5],[17,55]]},"line-opacity":1}},{id:"aeroway-taxiway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","taxiway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,1],[17,10]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"aeroway-runway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","runway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,4],[17,50]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"highway-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-minor-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,0]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"highway-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":.5,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"highway-primary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[7,0],[8,.6]]},"line-width":{base:1.2,stops:[[7,0],[8,.6],[9,1.5],[20,22]]}}},{id:"highway-trunk-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[5,0],[6,.5]]},"line-width":{base:1.2,stops:[[5,0],[6,.6],[7,1.5],[20,22]]}}},{id:"highway-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:4,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[4,0],[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":{stops:[[4,0],[5,.5]]}}},{id:"highway-path",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"highway-motorway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-minor",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fff","line-opacity":.5,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"highway-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[8,.5],[20,13]]},"line-opacity":.5}},{id:"highway-primary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[8.5,0],[9,.5],[20,18]]},"line-opacity":0}},{id:"highway-trunk",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"highway-motorway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"railway-transit",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-transit-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway-service",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-service-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"railway-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"bridge-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,28]]}}},{id:"bridge-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"hsl(28, 76%, 67%)","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,26]]}}},{id:"bridge-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"bridge-path-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#f8f4f0","line-width":{base:1.2,stops:[[15,1.2],[20,18]]}}},{id:"bridge-path",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#cba","line-width":{base:1.2,stops:[[15,1.2],[20,4]]},"line-dasharray":[1.5,.75]}},{id:"bridge-motorway-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,20]]}}},{id:"bridge-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]}}},{id:"bridge-motorway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"bridge-railway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"bridge-railway-hatching",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"cablecar",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,1],[19,2.5]]}}},{id:"cablecar-dash",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{id:"boundary-land-level-4",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],layout:{"line-join":"round"},paint:{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{base:1.4,stops:[[4,.4],[5,1],[12,3]]},"line-opacity":.6}},{id:"boundary-land-level-2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 66%)","line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,2]]}}},{id:"boundary-land-disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=","maritime",1],["==","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,8]]}}},{id:"boundary-water",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["in","admin_level",2,4],["==","maritime",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(154, 189, 214, 1)","line-width":{base:1,stops:[[0,.6],[4,1],[5,1],[12,1]]},"line-opacity":{stops:[[6,0],[10,0]]}}},{id:"waterway-name",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:13,filter:["all",["==","$type","LineString"],["has","name"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":.2,"symbol-spacing":350},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-lakeline",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==","$type","LineString"],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}\n{name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-ocean",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["==","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-other",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["!in","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":{stops:[[0,10],[6,14]]},"text-field":"{name:latin}\n{name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2,visibility:"visible"},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"poi-level-3",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:16,filter:["all",["==","$type","Point"],[">=","rank",25]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\n{name:nonlatin}","text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-2",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:15,filter:["all",["==","$type","Point"],["<=","rank",24],[">=","rank",15]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\n{name:nonlatin}","text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-1",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:14,filter:["all",["==","$type","Point"],["<=","rank",14],["has","name"]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\n{name:nonlatin}","text-offset":[0,.6],"text-size":11,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"rgba(191, 228, 172, 1)","text-halo-width":1,"text-halo-color":"rgba(30, 29, 29, 1)"}},{id:"poi-railway",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:13,filter:["all",["==","$type","Point"],["has","name"],["==","class","railway"],["==","subclass","station"]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\n{name:nonlatin}","text-offset":[0,.6],"text-size":12,"text-max-width":9,"icon-optional":!1,"icon-ignore-placement":!1,"icon-allow-overlap":!1,"text-ignore-placement":!1,"text-allow-overlap":!1,"text-optional":!0},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"road_oneway",type:"symbol",source:"openmaptiles","source-layer":"transportation",minzoom:15,filter:["all",["==","oneway",1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],layout:{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":90,"icon-size":{stops:[[15,.5],[19,1]]}},paint:{"icon-opacity":.5}},{id:"road_oneway_opposite",type:"symbol",source:"openmaptiles","source-layer":"transportation",minzoom:15,filter:["all",["==","oneway",-1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],layout:{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":-90,"icon-size":{stops:[[15,.5],[19,1]]}},paint:{"icon-opacity":.5}},{id:"highway-name-path",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15.5,filter:["==","class","path"],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-color":"#f8f4f0","text-color":"hsl(30, 23%, 62%)","text-halo-width":.5}},{id:"highway-name-minor",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15,filter:["all",["==","$type","LineString"],["in","class","minor","service","track"]],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-blur":.5,"text-color":"#765","text-halo-width":1}},{id:"highway-name-major",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12.2,filter:["in","class","primary","secondary","tertiary","trunk"],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-blur":.5,"text-color":"#765","text-halo-width":1}},{id:"highway-shield",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:8,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["!in","network","us-interstate","us-highway","us-state"]],layout:{"text-size":10,"icon-image":"road_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-opacity":1,"text-color":"rgba(20, 19, 19, 1)","text-halo-color":"rgba(230, 221, 221, 0)","text-halo-width":2,"icon-color":"rgba(183, 18, 18, 1)","icon-opacity":.3,"icon-halo-color":"rgba(183, 55, 55, 0)"}},{id:"highway-shield-us-interstate",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:7,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-interstate"]],layout:{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[7,"point"],[7,"line"],[8,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-color":"rgba(0, 0, 0, 1)"}},{id:"highway-shield-us-other",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:9,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-highway","us-state"]],layout:{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-color":"rgba(0, 0, 0, 1)"}},{id:"place-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",minzoom:12,filter:["!in","class","city","town","village","country","continent"],layout:{"text-letter-spacing":.1,"text-size":{base:1.2,stops:[[12,10],[15,14]]},"text-font":["Noto Sans Bold"],"text-field":"{name:latin}\n{name:nonlatin}","text-transform":"uppercase","text-max-width":9,visibility:"visible"},paint:{"text-color":"rgba(255,255,255,1)","text-halo-width":1.2,"text-halo-color":"rgba(57, 28, 28, 1)"}},{id:"place-village",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",minzoom:10,filter:["==","class","village"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,12],[15,16]]},"text-field":"{name:latin}\n{name:nonlatin}","text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(10, 9, 9, 0.8)"}},{id:"place-town",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["==","class","town"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,14],[15,24]]},"text-field":"{name:latin}\n{name:nonlatin}","text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(22, 22, 22, 0.8)"}},{id:"place-city",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["!=","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":"{name:latin}\n{name:nonlatin}","text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-city-capital",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":"{name:latin}\n{name:nonlatin}","text-max-width":8,"icon-image":"star_11","text-offset":[.4,0],"icon-size":.8,"text-anchor":"left",visibility:"visible"},paint:{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],layout:{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-3",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-2",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-1",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-continent",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",maxzoom:1,filter:["==","class","continent"],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase",visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],id:"qebnlkra6"}}}),ub=m({"src/plots/map/styles/arcgis-sat.js"(e,t){t.exports={version:8,name:"orto",metadata:{},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}}]}}}),hb=m({"src/plots/map/constants.js"(e,t){var r=Ye(),n=cb(),i="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",a="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",o="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",s={basic:o,streets:o,outdoors:o,light:i,dark:a,satellite:ub(),"satellite-streets":n,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:'© OpenStreetMap contributors',tiles:["https://tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":i,"carto-darkmatter":a,"carto-voyager":o,"carto-positron-nolabels":"https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json","carto-darkmatter-nolabels":"https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json","carto-voyager-nolabels":"https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json"},l=r(s);t.exports={styleValueDflt:"basic",stylesMap:s,styleValuesMap:l,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",l.join(", "),"or use a tile service."].join("\n"),mapOnErrorMsg:"Map error."}}}),fb=m({"src/plots/map/layout_attributes.js"(e,t){var r=ct(),n=W().defaultLine,i=Ma().attributes,a=j(),o=kn().textposition,s=De().overrideAll,l=vt().templatedArray,c=hb(),u=a({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});u.family.dflt="Open Sans Regular, Arial Unicode MS Regular",(t.exports=s({_arrayAttrRegexps:[r.counterRegex("map",".layers",!0)],domain:i({name:"map"}),style:{valType:"any",values:c.styleValuesMap,dflt:c.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:l("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:n},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:n}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:u,textposition:r.extendFlat({},o,{arrayOk:!1})}})},"plot","from-root")).uirevision={valType:"any",editType:"none"}}}),pb=m({"src/traces/scattermap/attributes.js"(e,t){var{hovertemplateAttrs:r,texttemplateAttrs:n,templatefallbackAttrs:i}=Fe(),a=Tn(),o=sg(),s=kn(),l=fb(),c=q(),u=zt(),h=B().extendFlat,f=De().overrideAll,p=fb(),d=o.line,m=o.marker;t.exports=f({lon:o.lon,lat:o.lat,cluster:{enabled:{valType:"boolean"},maxzoom:h({},p.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:h({},m.opacity,{dflt:1})},mode:h({},s.mode,{dflt:"markers"}),text:h({},s.text,{}),texttemplate:n({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:i({editType:"plot"}),hovertext:h({},s.hovertext,{}),line:{color:d.color,width:d.width},connectgaps:s.connectgaps,marker:h({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:m.opacity,size:m.size,sizeref:m.sizeref,sizemin:m.sizemin,sizemode:m.sizemode},u("marker")),fill:o.fill,fillcolor:a(),textfont:l.layers.symbol.textfont,textposition:l.layers.symbol.textposition,below:{valType:"string"},selected:{marker:s.selected.marker},unselected:{marker:s.unselected.marker},hoverinfo:h({},c.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:r(),hovertemplatefallback:i()},"calc","nested")}}),db=m({"src/traces/scattermap/constants.js"(e,t){var r=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];t.exports={isSupportedFont:function(e){return-1!==r.indexOf(e)}}}}),mb=m({"src/traces/scattermap/defaults.js"(e,t){var r=ct(),n=Xt(),i=Yn(),a=Xn(),o=Kn(),s=Jn(),l=pb(),c=db().isSupportedFont;t.exports=function(e,t,u,h){function f(n,i){return r.coerce(e,t,l,n,i)}function p(n,i){return r.coerce2(e,t,l,n,i)}var d=function(e,t,r){var n=r("lon")||[],i=r("lat")||[],a=Math.min(n.length,i.length);return t._length=a,a}(0,t,f);if(d){if(f("text"),f("texttemplate"),f("texttemplatefallback"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback"),f("mode"),f("below"),n.hasMarkers(t)){i(e,t,u,h,f,{noLine:!0,noAngle:!0}),f("marker.allowoverlap"),f("marker.angle");var m=t.marker;"circle"!==m.symbol&&(r.isArrayOrTypedArray(m.size)&&(m.size=m.size[0]),r.isArrayOrTypedArray(m.color)&&(m.color=m.color[0]))}n.hasLines(t)&&(a(e,t,u,h,f,{noDash:!0}),f("connectgaps"));var g=p("cluster.maxzoom"),y=p("cluster.step"),v=p("cluster.color",t.marker&&t.marker.color||u),x=p("cluster.size"),_=p("cluster.opacity");if(f("cluster.enabled",!1!==g||!1!==y||!1!==v||!1!==x||!1!==_)||n.hasText(t)){var b=h.font.family;o(e,t,h,f,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:c(b)?b:"Open Sans Regular",weight:h.font.weight,style:h.font.style,size:h.font.size,color:h.font.color}})}f("fill"),"none"!==t.fill&&s(e,t,u,f),r.coerceSelectionMarkerOpacity(t,f)}else t.visible=!1}}}),gb=m({"src/traces/scattermap/format_labels.js"(e,t){var r=ar();t.exports=function(e,t,n){var i={},a=n[t.subplot]._subplot.mockAxis,o=e.lonlat;return i.lonLabel=r.tickText(a,a.c2l(o[0]),!0).text,i.latLabel=r.tickText(a,a.c2l(o[1]),!0).text,i}}}),yb=m({"src/plots/map/convert_text_opts.js"(e,t){var r=ct();t.exports=function(e,t){var n=e.split(" "),i=n[0],a=n[1],o=r.isArrayOrTypedArray(t)?r.mean(t):t,s=.5+o/100,l=1.5+o/100,c=["",""],u=[0,0];switch(i){case"top":c[0]="top",u[1]=-l;break;case"bottom":c[0]="bottom",u[1]=l}switch(a){case"left":c[1]="right",u[0]=-s;break;case"right":c[1]="left",u[0]=s}return{anchor:c[0]&&c[1]?c.join("-"):c[0]?c[0]:c[1]?c[1]:"center",offset:u}}}}),vb=m({"src/traces/scattermap/convert.js"(e,t){var r=M(),n=ct(),i=S().BADNUM,a=dg(),o=Yt(),s=er(),l=$t(),c=Xt(),u=db().isSupportedFont,h=yb(),f=Kt().appendArrayPointValue,p=Et().NEWLINES,d=Et().BR_TAG_ALL;function m(e){return{type:e,geojson:a.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function g(e,t){return n.isArrayOrTypedArray(e)?t?function(t){return r(e[t])?+e[t]:0}:function(t){return e[t]}:e?function(){return e}:y}function y(){return""}function v(e){return e[0]===i}function x(e,t){var r;if(n.isArrayOrTypedArray(e)&&n.isArrayOrTypedArray(t)){r=["step",["get","point_count"],e[0]];for(var i=1;i850?" Black":i>750?" Extra Bold":i>650?" Bold":i>550?" Semi Bold":i>450?" Medium":i>350?" Regular":i>250?" Light":i>150?" Extra Light":" Thin"):"Open Sans"===a.slice(0,2).join(" ")?(s="Open Sans",s+=i>750?" Extrabold":i>650?" Bold":i>550?" Semibold":i>350?" Regular":" Light"):"Klokantech Noto Sans"===a.slice(0,3).join(" ")&&(s="Klokantech Noto Sans","CJK"===a[3]&&(s+=" CJK"),s+=i>500?" Bold":" Regular")),o&&(s+=" Italic"),"Open Sans Regular Italic"===s?s="Open Sans Italic":"Open Sans Regular Bold"===s?s="Open Sans Bold":"Open Sans Regular Bold Italic"===s?s="Open Sans Bold Italic":"Klokantech Noto Sans Regular Italic"===s&&(s="Klokantech Noto Sans Italic"),u(s)||(s=r),s.split(", ")}t.exports=function(e,t){var i,u=t[0].trace,b=!0===u.visible&&0!==u._length,w="none"!==u.fill,T=c.hasLines(u),k=c.hasMarkers(u),A=c.hasText(u),M=k&&"circle"===u.marker.symbol,S=k&&"circle"!==u.marker.symbol,E=u.cluster&&u.cluster.enabled,C=m("fill"),I=m("line"),L=m("circle"),P=m("symbol"),z={fill:C,line:I,circle:L,symbol:P};if(!b)return z;if((w||T)&&(i=a.calcTraceToLineCoords(t)),w&&(C.geojson=a.makePolygon(i),C.layout.visibility="visible",n.extendFlat(C.paint,{"fill-color":u.fillcolor})),T&&(I.geojson=a.makeLine(i),I.layout.visibility="visible",n.extendFlat(I.paint,{"line-width":u.line.width,"line-color":u.line.color,"line-opacity":u.opacity})),M){var D=function(e){var t,i,a,c,u=e[0].trace,h=u.marker,f=u.selectedpoints,p=n.isArrayOrTypedArray(h.color),d=n.isArrayOrTypedArray(h.size),m=n.isArrayOrTypedArray(h.opacity);function g(e){return u.opacity*e}p&&(i=o.hasColorscale(u,"marker")?o.makeColorScaleFuncFromTrace(h):n.identity),d&&(a=l(u)),m&&(c=function(e){return g(r(e)?+n.constrain(e,0,1):0)});var y,x=[];for(t=0;t=0;r--){var n=t[r];i.removeLayer(u.layerIds[n])}e||i.removeSource(u.sourceIds.circle)}(e):function(e){for(var t=a.nonCluster,r=t.length-1;r>=0;r--){var n=t[r];i.removeLayer(u.layerIds[n]),e||i.removeSource(u.sourceIds[n])}}(e)}function f(e){l?function(e){e||u.addSource("circle",o.circle,t.cluster);for(var r=a.cluster,n=0;n=0;r--){var n=t[r];e.removeLayer(this.layerIds[n]),e.removeSource(this.sourceIds[n])}},t.exports=function(e,t){var r,i,s,l=t[0].trace,c=l.cluster&&l.cluster.enabled,u=!0!==l.visible,h=new o(e,l.uid,c,u),f=n(e.gd,t),p=h.below=e.belowLookup["trace-"+l.uid];if(c)for(h.addSource("circle",f.circle,l.cluster),r=0;r")}function u(e){return e+"°"}}t.exports={hoverPoints:function(e,t,a){var c=e.cd,u=c[0].trace,h=e.xa,f=e.ya,p=e.subplot,d=[],m=s+u.uid+"-circle",g=u.cluster&&u.cluster.enabled;if(g){var y=p.map.queryRenderedFeatures(null,{layers:[m]});d=y.map((function(e){return e.id}))}var v=360*(t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360)),x=t-v;if(r.getClosest(c,(function(e){var t=e.lonlat;if(t[0]===o||g&&-1===d.indexOf(e.i+1))return 1/0;var r=n.modHalf(t[0],360),i=t[1],s=p.project([r,i]),l=s.x-h.c2p([x,i]),c=s.y-f.c2p([r,a]),u=Math.max(3,e.mrc||0);return Math.max(Math.sqrt(l*l+c*c)-u,1-3/u)}),e),!1!==e.index){var _=c[e.index],b=_.lonlat,w=[n.modHalf(b[0],360)+v,b[1]],T=h.c2p(w),k=f.c2p(w),A=_.mrc||1;e.x0=T-A,e.x1=T+A,e.y0=k-A,e.y1=k+A;var M={};M[u.subplot]={_subplot:p};var S=u._module.formatLabels(_,u,M);return e.lonLabel=S.lonLabel,e.latLabel=S.latLabel,e.color=i(u,_),e.extraText=l(u,_,c[0].t.labels),e.hovertemplate=u.hovertemplate,[e]}},getExtraText:l}}}),bb=m({"src/traces/scattermap/event_data.js"(e,t){t.exports=function(e,t){return e.lon=t.lon,e.lat=t.lat,e}}}),wb=m({"src/traces/scattermap/select.js"(e,t){var r=ct(),n=Xt(),i=S().BADNUM;t.exports=function(e,t){var a,o=e.cd,s=e.xaxis,l=e.yaxis,c=[],u=o[0].trace;if(!n.hasMarkers(u))return[];if(!1===t)for(a=0;a1)return 1;for(var r=e,n=0;n<8;n++){var i=this.sampleCurveX(r)-e;if(Math.abs(i)i?o=r:s=r,r=.5*(s-o)+o;return r},solve:function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))}};var l=r(o);let c,u;function h(){return null==c&&(c=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof createImageBitmap),c}function d(){if(null==u&&(u=!1,h())){let e=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(e){for(let t=0;t<25;t++){let r=4*t;e.fillStyle=`rgb(${r},${r+1},${r+2})`,e.fillRect(t%5,Math.floor(t/5),1,1)}let t=e.getImageData(0,0,5,5).data;for(let e=0;e<100;e++)if(e%4!=3&&t[e]!==e){u=!0;break}}}return u||!1}function m(e,t,r,n){let i=new l(e,t,r,n);return e=>i.solve(e)}let g=m(.25,.1,.25,1);function y(e,t,r){return Math.min(r,Math.max(t,e))}function v(e,t,r){let n=r-t,i=((e-t)%n+n)%n+t;return i===t?r:i}function x(e,...t){for(let r of t)for(let t in r)e[t]=r[t];return e}let _=1;function b(e,t,r){let n={};for(let r in e)n[r]=t.call(this,e[r],r,e);return n}function w(e,t,r){let n={};for(let r in e)t.call(this,e[r],r,e)&&(n[r]=e[r]);return n}function T(e){return Array.isArray(e)?e.map(T):"object"==typeof e&&e?b(e,T):e}let k={};function A(e){k[e]||(typeof console<"u"&&console.warn(e),k[e]=!0)}function M(e,t,r){return(r.y-e.y)*(t.x-e.x)>(t.y-e.y)*(r.x-e.x)}function S(e){return typeof WorkerGlobalScope<"u"&&void 0!==e&&e instanceof WorkerGlobalScope}let E=null;function C(e){return typeof ImageBitmap<"u"&&e instanceof ImageBitmap}let I="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function L(e,r,n,i,a){return t(this,void 0,void 0,(function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");let t=new VideoFrame(e,{timestamp:0});try{let o=t?.format;if(!o||!o.startsWith("BGR")&&!o.startsWith("RGB"))throw new Error(`Unrecognized format ${o}`);let s=o.startsWith("BGR"),l=new Uint8ClampedArray(i*a*4);if(yield t.copyTo(l,function(e,t,r,n,i){let a=4*Math.max(-t,0),o=(Math.max(0,r)-r)*n*4+a,s=4*n,l=Math.max(0,t),c=Math.max(0,r);return{rect:{x:l,y:c,width:Math.min(e.width,t+n)-l,height:Math.min(e.height,r+i)-c},layout:[{offset:o,stride:s}]}}(e,r,n,i,a)),s)for(let e=0;eS(self)?self.worker&&self.worker.referrer:("blob:"===window.location.protocol?window.parent:window).location.href,U=function(e,r){if(/:\/\//.test(e.url)&&!/^https?:|^file:/.test(e.url)){let t=F(e.url);if(t)return t(e,r);if(S(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:e,targetMapId:B},r)}if(!(/^file:/.test(n=e.url)||/^file:/.test(N())&&!/^\w+:/.test(n))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(e,r){return t(this,void 0,void 0,(function*(){let t=new Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,cache:e.cache,referrer:N(),signal:r.signal});"json"!==e.type||t.headers.has("Accept")||t.headers.set("Accept","application/json");let n,i=yield fetch(t);if(!i.ok){let t=yield i.blob();throw new j(i.status,i.statusText,e.url,t)}n="arrayBuffer"===e.type||"image"===e.type?i.arrayBuffer():"json"===e.type?i.json():i.text();let a=yield n;if(r.signal.aborted)throw O();return{data:a,cacheControl:i.headers.get("Cache-Control"),expires:i.headers.get("Expires")}}))}(e,r);if(S(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:e,mustQueue:!0,targetMapId:B},r)}var n,i,a;return i=e,a=r,new Promise(((e,t)=>{var r;let n=new XMLHttpRequest;n.open(i.method||"GET",i.url,!0),"arrayBuffer"!==i.type&&"image"!==i.type||(n.responseType="arraybuffer");for(let e in i.headers)n.setRequestHeader(e,i.headers[e]);"json"===i.type&&(n.responseType="text",!(null===(r=i.headers)||void 0===r)&&r.Accept||n.setRequestHeader("Accept","application/json")),n.withCredentials="include"===i.credentials,n.onerror=()=>{t(new Error(n.statusText))},n.onload=()=>{if(!a.signal.aborted)if((n.status>=200&&n.status<300||0===n.status)&&null!==n.response){let r=n.response;if("json"===i.type)try{r=JSON.parse(n.response)}catch(e){return void t(e)}e({data:r,cacheControl:n.getResponseHeader("Cache-Control"),expires:n.getResponseHeader("Expires")})}else{let e=new Blob([n.response],{type:n.getResponseHeader("Content-Type")});t(new j(n.status,n.statusText,i.url,e))}},a.signal.addEventListener("abort",(()=>{n.abort(),t(O())})),n.send(i.body)}))};function V(e){if(!e||e.indexOf("://")<=0||0===e.indexOf("data:image/")||0===e.indexOf("blob:"))return!0;let t=new URL(e),r=window.location;return t.protocol===r.protocol&&t.host===r.host}function q(e,t,r){r[e]&&-1!==r[e].indexOf(t)||(r[e]=r[e]||[],r[e].push(t))}function H(e,t,r){if(r&&r[e]){let n=r[e].indexOf(t);-1!==n&&r[e].splice(n,1)}}class G{constructor(e,t={}){x(this,t),this.type=e}}class W extends G{constructor(e,t={}){super("error",x({error:e},t))}}class Z{on(e,t){return this._listeners=this._listeners||{},q(e,t,this._listeners),this}off(e,t){return H(e,t,this._listeners),H(e,t,this._oneTimeListeners),this}once(e,t){return t?(this._oneTimeListeners=this._oneTimeListeners||{},q(e,t,this._oneTimeListeners),this):new Promise((t=>this.once(e,t)))}fire(e,t){"string"==typeof e&&(e=new G(e,t||{}));let r=e.type;if(this.listens(r)){e.target=this;let t=this._listeners&&this._listeners[r]?this._listeners[r].slice():[];for(let r of t)r.call(this,e);let n=this._oneTimeListeners&&this._oneTimeListeners[r]?this._oneTimeListeners[r].slice():[];for(let t of n)H(r,t,this._oneTimeListeners),t.call(this,e);let i=this._eventedParent;i&&(x(e,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),i.fire(e))}else e instanceof W&&console.error(e.error);return this}listens(e){return this._listeners&&this._listeners[e]&&this._listeners[e].length>0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e)}setEventedParent(e,t){return this._eventedParent=e,this._eventedParentData=t,this}}var Y={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"enum",default:"mercator",values:{mercator:{},globe:{}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};let X=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function $(e,t){let r={};for(let t in e)"ref"!==t&&(r[t]=e[t]);return X.forEach((e=>{e in t&&(r[e]=t[e])})),r}function K(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r`:"value"===e.itemType.kind?"array":`array<${t}>`}return e.kind}let ke=[ue,he,fe,pe,de,ve,me,we(ge),xe,_e,be];function Ae(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!Ae(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(let e of ke)if(!Ae(e,t))return null}return`Expected ${Te(e)} but found ${Te(t)} instead.`}function Me(e,t){return t.some((t=>t.kind===e.kind))}function Se(e,t){return t.some((t=>"null"===t?null===e:"array"===t?Array.isArray(e):"object"===t?e&&!Array.isArray(e)&&"object"==typeof e:t===typeof e))}function Ee(e,t){return"array"===e.kind&&"array"===t.kind?e.itemType.kind===t.itemType.kind&&"number"==typeof e.N:e.kind===t.kind}let Ce=.96422,Ie=.82521,Le=4/29,Pe=6/29,ze=3*Pe*Pe,De=Pe*Pe*Pe,Oe=Math.PI/180,Re=180/Math.PI;function Fe(e){return(e%=360)<0&&(e+=360),e}function Be([e,t,r,n]){let i,a,o=Ne((.2225045*(e=je(e))+.7168786*(t=je(t))+.0606169*(r=je(r)))/1);e===t&&t===r?i=a=o:(i=Ne((.4360747*e+.3850649*t+.1430804*r)/Ce),a=Ne((.0139322*e+.0971045*t+.7141733*r)/Ie));let s=116*o-16;return[s<0?0:s,500*(i-o),200*(o-a),n]}function je(e){return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ne(e){return e>De?Math.pow(e,1/3):e/ze+Le}function Ue([e,t,r,n]){let i=(e+16)/116,a=isNaN(t)?i:i+t/500,o=isNaN(r)?i:i-r/200;return i=1*qe(i),a=Ce*qe(a),o=Ie*qe(o),[Ve(3.1338561*a-1.6168667*i-.4906146*o),Ve(-.9787684*a+1.9161415*i+.033454*o),Ve(.0719453*a-.2289914*i+1.4052427*o),n]}function Ve(e){return(e=e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055)<0?0:e>1?1:e}function qe(e){return e>Pe?e*e*e:ze*(e-Le)}function He(e){return parseInt(e.padEnd(2,e),16)/255}function Ge(e,t){return We(t?e/100:e,0,1)}function We(e,t,r){return Math.min(Math.max(t,e),r)}function Ze(e){return!e.some(Number.isNaN)}let Ye={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]};class Xe{constructor(e,t,r,n=1,i=!0){this.r=e,this.g=t,this.b=r,this.a=n,i||(this.r*=n,this.g*=n,this.b*=n,n||this.overwriteGetter("rgb",[e,t,r,n]))}static parse(e){if(e instanceof Xe)return e;if("string"!=typeof e)return;let t=function(e){if("transparent"===(e=e.toLowerCase().trim()))return[0,0,0,0];let t=Ye[e];if(t){let[e,r,n]=t;return[e/255,r/255,n/255,1]}if(e.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(e)){let t=e.length<6?1:2,r=1;return[He(e.slice(r,r+=t)),He(e.slice(r,r+=t)),He(e.slice(r,r+=t)),He(e.slice(r,r+t)||"ff")]}if(e.startsWith("rgb")){let t=e.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(t){let[e,r,n,i,a,o,s,l,c,u,h,f]=t,p=[i||" ",s||" ",u].join("");if(" "===p||" /"===p||",,"===p||",,,"===p){let e=[n,o,c].join(""),t="%%%"===e?100:""===e?255:0;if(t){let e=[We(+r/t,0,1),We(+a/t,0,1),We(+l/t,0,1),h?Ge(+h,f):1];if(Ze(e))return e}}return}}let r=e.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(r){let[e,t,n,i,a,o,s,l,c]=r,u=[n||" ",a||" ",s].join("");if(" "===u||" /"===u||",,"===u||",,,"===u){let e=[+t,We(+i,0,100),We(+o,0,100),l?Ge(+l,c):1];if(Ze(e))return function([e,t,r,n]){function i(n){let i=(n+e/30)%12,a=t*Math.min(r,1-r);return r-a*Math.max(-1,Math.min(i-3,9-i,1))}return e=Fe(e),t/=100,r/=100,[i(0),i(8),i(4),n]}(e)}}}(e);return t?new Xe(...t,!1):void 0}get rgb(){let{r:e,g:t,b:r,a:n}=this,i=n||1/0;return this.overwriteGetter("rgb",[e/i,t/i,r/i,n])}get hcl(){return this.overwriteGetter("hcl",function(e){let[t,r,n,i]=Be(e),a=Math.sqrt(r*r+n*n);return[Math.round(1e4*a)?Fe(Math.atan2(n,r)*Re):NaN,a,t,i]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Be(this.rgb))}overwriteGetter(e,t){return Object.defineProperty(this,e,{value:t}),t}toString(){let[e,t,r,n]=this.rgb;return`rgba(${[e,t,r].map((e=>Math.round(255*e))).join(",")},${n})`}}Xe.black=new Xe(0,0,0,1),Xe.white=new Xe(1,1,1,1),Xe.transparent=new Xe(0,0,0,0),Xe.red=new Xe(1,0,0,1);class $e{constructor(e,t,r){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,t){return this.collator.compare(e,t)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Ke{constructor(e,t,r,n,i){this.text=e,this.image=t,this.scale=r,this.fontStack=n,this.textColor=i}}class Je{constructor(e){this.sections=e}static fromString(e){return new Je([new Ke(e,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some((e=>0!==e.text.length||e.image&&0!==e.image.name.length))}static factory(e){return e instanceof Je?e:Je.fromString(e)}toString(){return 0===this.sections.length?"":this.sections.map((e=>e.text)).join("")}}class Qe{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof Qe)return e;if("number"==typeof e)return new Qe([e,e,e,e]);if(Array.isArray(e)&&!(e.length<1||e.length>4)){for(let t of e)if("number"!=typeof t)return;switch(e.length){case 1:e=[e[0],e[0],e[0],e[0]];break;case 2:e=[e[0],e[1],e[0],e[1]];break;case 3:e=[e[0],e[1],e[2],e[1]]}return new Qe(e)}}toString(){return JSON.stringify(this.values)}}let et=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class tt{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof tt)return e;if(Array.isArray(e)&&!(e.length<1)&&e.length%2==0){for(let t=0;t=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:`Invalid rgba value [${[e,t,r,n].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof n?[e,t,r,n]:[e,t,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function it(e){if(null===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e||e instanceof Xe||e instanceof $e||e instanceof Je||e instanceof Qe||e instanceof tt||e instanceof rt)return!0;if(Array.isArray(e)){for(let t of e)if(!it(t))return!1;return!0}if("object"==typeof e){for(let t in e)if(!it(e[t]))return!1;return!0}return!1}function at(e){if(null===e)return ue;if("string"==typeof e)return fe;if("boolean"==typeof e)return pe;if("number"==typeof e)return he;if(e instanceof Xe)return de;if(e instanceof $e)return ye;if(e instanceof Je)return ve;if(e instanceof Qe)return xe;if(e instanceof tt)return be;if(e instanceof rt)return _e;if(Array.isArray(e)){let t,r=e.length;for(let r of e){let e=at(r);if(t){if(t===e)continue;t=ge;break}t=e}return we(t||ge,r)}return me}function ot(e){let t=typeof e;return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof Xe||e instanceof Je||e instanceof Qe||e instanceof tt||e instanceof rt?e.toString():JSON.stringify(e)}class st{constructor(e,t){this.type=e,this.value=t}static parse(e,t){if(2!==e.length)return t.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!it(e[1]))return t.error("invalid value");let r=e[1],n=at(r),i=t.expectedType;return"array"!==n.kind||0!==n.N||!i||"array"!==i.kind||"number"==typeof i.N&&0!==i.N||(n=i),new st(n,r)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class lt{constructor(e){this.name="ExpressionEvaluationError",this.message=e}toJSON(){return this.message}}let ct={string:fe,number:he,boolean:pe,object:me};class ut{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r,n=1,i=e[0];if("array"===i){let i,a;if(e.length>2){let r=e[1];if("string"!=typeof r||!(r in ct)||"object"===r)return t.error('The item type argument of "array" must be one of string, number, boolean',1);i=ct[r],n++}else i=ge;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);a=e[2],n++}r=we(i,a)}else{if(!ct[i])throw new Error(`Types doesn't contain name = ${i}`);r=ct[i]}let a=[];for(;ne.outputDefined()))}}let ht={"to-boolean":pe,"to-color":de,"to-number":he,"to-string":fe};class ft{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r=e[0];if(!ht[r])throw new Error(`Can't parse ${r} as it is not part of the known types`);if(("to-boolean"===r||"to-string"===r)&&2!==e.length)return t.error("Expected one argument.");let n=ht[r],i=[];for(let r=1;r4?`Invalid rbga value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.`:nt(t[0],t[1],t[2],t[3]),!r))return new Xe(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new lt(r||`Could not parse color from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"padding":{let t;for(let r of this.args){t=r.evaluate(e);let n=Qe.parse(t);if(n)return n}throw new lt(`Could not parse padding from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"variableAnchorOffsetCollection":{let t;for(let r of this.args){t=r.evaluate(e);let n=tt.parse(t);if(n)return n}throw new lt(`Could not parse variableAnchorOffsetCollection from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"number":{let t=null;for(let r of this.args){if(t=r.evaluate(e),null===t)return 0;let n=Number(t);if(!isNaN(n))return n}throw new lt(`Could not convert ${JSON.stringify(t)} to number.`)}case"formatted":return Je.fromString(ot(this.args[0].evaluate(e)));case"resolvedImage":return rt.fromString(ot(this.args[0].evaluate(e)));default:return ot(this.args[0].evaluate(e))}}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every((e=>e.outputDefined()))}}let pt=["Unknown","Point","LineString","Polygon"];class dt{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?"number"==typeof this.feature.type?pt[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(e){let t=this._parseColorCache[e];return t||(t=this._parseColorCache[e]=Xe.parse(e)),t}}class mt{constructor(e,t,r=[],n,i=new ce,a=[]){this.registry=e,this.path=r,this.key=r.map((e=>`[${e}]`)).join(""),this.scope=i,this.errors=a,this.expectedType=n,this._isConstant=t}parse(e,t,r,n,i={}){return t?this.concat(t,r,n)._parse(e,i):this._parse(e,i)}_parse(e,t){function r(e,t,r){return"assert"===r?new ut(t,[e]):"coerce"===r?new ft(t,[e]):e}if(null!==e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e||(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let n=e[0];if("string"!=typeof n)return this.error(`Expression name must be a string, but found ${typeof n} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let i=this.registry[n];if(i){let n=i.parse(e,this);if(!n)return null;if(this.expectedType){let e=this.expectedType,i=n.type;if("string"!==e.kind&&"number"!==e.kind&&"boolean"!==e.kind&&"object"!==e.kind&&"array"!==e.kind||"value"!==i.kind)if("color"!==e.kind&&"formatted"!==e.kind&&"resolvedImage"!==e.kind||"value"!==i.kind&&"string"!==i.kind)if("padding"!==e.kind||"value"!==i.kind&&"number"!==i.kind&&"array"!==i.kind)if("variableAnchorOffsetCollection"!==e.kind||"value"!==i.kind&&"array"!==i.kind){if(this.checkSubtype(e,i))return null}else n=r(n,e,t.typeAnnotation||"coerce");else n=r(n,e,t.typeAnnotation||"coerce");else n=r(n,e,t.typeAnnotation||"coerce");else n=r(n,e,t.typeAnnotation||"assert")}if(!(n instanceof st)&&"resolvedImage"!==n.type.kind&&this._isConstant(n)){let e=new dt;try{n=new st(n.type,n.evaluate(e))}catch(e){return this.error(e.message),null}}return n}return this.error(`Unknown expression "${n}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(void 0===e?"'undefined' value invalid. Use null instead.":"object"==typeof e?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof e} instead.`)}concat(e,t,r){let n="number"==typeof e?this.path.concat(e):this.path,i=r?this.scope.concat(r):this.scope;return new mt(this.registry,this._isConstant,n,t||null,i,this.errors)}error(e,...t){let r=`${this.key}${t.map((e=>`[${e}]`)).join("")}`;this.errors.push(new le(r,e))}checkSubtype(e,t){let r=Ae(e,t);return r&&this.error(r),r}}class gt{constructor(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(let t of this.bindings)e(t[1]);e(this.result)}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);let r=[];for(let n=1;n=r.length)throw new lt(`Array index out of bounds: ${t} > ${r.length-1}.`);if(t!==Math.floor(t))throw new lt(`Array index must be an integer, but found ${t} instead.`);return r[t]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}}class xt{constructor(e,t){this.type=pe,this.needle=e,this.haystack=t}static parse(e,t){if(3!==e.length)return t.error(`Expected 2 arguments, but found ${e.length-1} instead.`);let r=t.parse(e[1],1,ge),n=t.parse(e[2],2,ge);return r&&n?Me(r.type,[pe,fe,he,ue,ge])?new xt(r,n):t.error(`Expected first argument to be of type boolean, string, number or null, but found ${Te(r.type)} instead`):null}evaluate(e){let t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!r)return!1;if(!Se(t,["boolean","string","number","null"]))throw new lt(`Expected first argument to be of type boolean, string, number or null, but found ${Te(at(t))} instead.`);if(!Se(r,["string","array"]))throw new lt(`Expected second argument to be of type array or string, but found ${Te(at(r))} instead.`);return r.indexOf(t)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}}class _t{constructor(e,t,r){this.type=he,this.needle=e,this.haystack=t,this.fromIndex=r}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);let r=t.parse(e[1],1,ge),n=t.parse(e[2],2,ge);if(!r||!n)return null;if(!Me(r.type,[pe,fe,he,ue,ge]))return t.error(`Expected first argument to be of type boolean, string, number or null, but found ${Te(r.type)} instead`);if(4===e.length){let i=t.parse(e[3],3,he);return i?new _t(r,n,i):null}return new _t(r,n)}evaluate(e){let t,r=this.needle.evaluate(e),n=this.haystack.evaluate(e);if(!Se(r,["boolean","string","number","null"]))throw new lt(`Expected first argument to be of type boolean, string, number or null, but found ${Te(at(r))} instead.`);if(this.fromIndex&&(t=this.fromIndex.evaluate(e)),Se(n,["string"])){let e=n.indexOf(r,t);return-1===e?-1:[...n.slice(0,e)].length}if(Se(n,["array"]))return n.indexOf(r,t);throw new lt(`Expected second argument to be of type array or string, but found ${Te(at(n))} instead.`)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}}class bt{constructor(e,t,r,n,i,a){this.inputType=e,this.type=t,this.input=r,this.cases=n,this.outputs=i,this.otherwise=a}static parse(e,t){if(e.length<5)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!=1)return t.error("Expected an even number of arguments.");let r,n;t.expectedType&&"value"!==t.expectedType.kind&&(n=t.expectedType);let i={},a=[];for(let o=2;oNumber.MAX_SAFE_INTEGER)return c.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof e&&Math.floor(e)!==e)return c.error("Numeric branch labels must be integer values.");if(r){if(c.checkSubtype(r,at(e)))return null}else r=at(e);if(void 0!==i[String(e)])return c.error("Branch labels must be unique.");i[String(e)]=a.length}let u=t.parse(l,o,n);if(!u)return null;n=n||u.type,a.push(u)}let o=t.parse(e[1],1,ge);if(!o)return null;let s=t.parse(e[e.length-1],e.length-1,n);return s?"value"!==o.type.kind&&t.concat(1).checkSubtype(r,o.type)?null:new bt(r,n,o,i,a,s):null}evaluate(e){let t=this.input.evaluate(e);return(at(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every((e=>e.outputDefined()))&&this.otherwise.outputDefined()}}class wt{constructor(e,t,r){this.type=e,this.branches=t,this.otherwise=r}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!=0)return t.error("Expected an odd number of arguments.");let r;t.expectedType&&"value"!==t.expectedType.kind&&(r=t.expectedType);let n=[];for(let i=1;it.outputDefined()))&&this.otherwise.outputDefined()}}class Tt{constructor(e,t,r,n){this.type=e,this.input=t,this.beginIndex=r,this.endIndex=n}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);let r=t.parse(e[1],1,ge),n=t.parse(e[2],2,he);if(!r||!n)return null;if(!Me(r.type,[we(ge),fe,ge]))return t.error(`Expected first argument to be of type array or string, but found ${Te(r.type)} instead`);if(4===e.length){let i=t.parse(e[3],3,he);return i?new Tt(r.type,r,n,i):null}return new Tt(r.type,r,n)}evaluate(e){let t,r=this.input.evaluate(e),n=this.beginIndex.evaluate(e);if(this.endIndex&&(t=this.endIndex.evaluate(e)),Se(r,["string"]))return[...r].slice(n,t).join("");if(Se(r,["array"]))return r.slice(n,t);throw new lt(`Expected first argument to be of type array or string, but found ${Te(at(r))} instead.`)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}}function kt(e,t){let r,n,i=e.length-1,a=0,o=i,s=0;for(;a<=o;)if(s=Math.floor((a+o)/2),r=e[s],n=e[s+1],r<=t){if(s===i||tt))throw new lt("Input is not a number.");o=s-1}return 0}class At{constructor(e,t,r){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(let[e,t]of r)this.labels.push(e),this.outputs.push(t)}static parse(e,t){if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");let r=t.parse(e[1],1,he);if(!r)return null;let n=[],i=null;t.expectedType&&"value"!==t.expectedType.kind&&(i=t.expectedType);for(let r=1;r=a)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',s);let c=t.parse(o,l,i);if(!c)return null;i=i||c.type,n.push([a,c])}return new At(i,r,n)}evaluate(e){let t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);let n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);let i=t.length;return n>=t[i-1]?r[i-1].evaluate(e):r[kt(t,n)].evaluate(e)}eachChild(e){e(this.input);for(let t of this.outputs)e(t)}outputDefined(){return this.outputs.every((e=>e.outputDefined()))}}var Mt=St;function St(e,t,r,n){this.cx=3*e,this.bx=3*(r-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(n-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=t,this.p2x=r,this.p2y=n}St.prototype={sampleCurveX:function(e){return((this.ax*e+this.bx)*e+this.cx)*e},sampleCurveY:function(e){return((this.ay*e+this.by)*e+this.cy)*e},sampleCurveDerivativeX:function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},solveCurveX:function(e,t){if(void 0===t&&(t=1e-6),e<0)return 0;if(e>1)return 1;for(var r=e,n=0;n<8;n++){var i=this.sampleCurveX(r)-e;if(Math.abs(i)i?o=r:s=r,r=.5*(s-o)+o;return r},solve:function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))}};var Et,Ct=(Et=Mt)&&Et.__esModule&&Object.prototype.hasOwnProperty.call(Et,"default")?Et.default:Et;function It(e,t,r){return e+r*(t-e)}function Lt(e,t,r){return e.map(((e,n)=>It(e,t[n],r)))}let Pt={number:It,color:function(e,t,r,n="rgb"){switch(n){case"rgb":{let[n,i,a,o]=Lt(e.rgb,t.rgb,r);return new Xe(n,i,a,o,!1)}case"hcl":{let n,i,[a,o,s,l]=e.hcl,[c,u,h,f]=t.hcl;if(isNaN(a)||isNaN(c))isNaN(a)?isNaN(c)?n=NaN:(n=c,1!==s&&0!==s||(i=u)):(n=a,1!==h&&0!==h||(i=o));else{let e=c-a;c>a&&e>180?e-=360:c180&&(e+=360),n=a+r*e}let[p,d,m,g]=function([e,t,r,n]){return e=isNaN(e)?0:e*Oe,Ue([r,Math.cos(e)*t,Math.sin(e)*t,n])}([n,i??It(o,u,r),It(s,h,r),It(l,f,r)]);return new Xe(p,d,m,g,!1)}case"lab":{let[n,i,a,o]=Ue(Lt(e.lab,t.lab,r));return new Xe(n,i,a,o,!1)}}},array:Lt,padding:function(e,t,r){return new Qe(Lt(e.values,t.values,r))},variableAnchorOffsetCollection:function(e,t,r){let n=e.values,i=t.values;if(n.length!==i.length)throw new lt(`Cannot interpolate values of different length. from: ${e.toString()}, to: ${t.toString()}`);let a=[];for(let e=0;e"number"!=typeof e||e<0||e>1)))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:e}}}if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(i=t.parse(i,2,he),!i)return null;let o=[],s=null;"interpolate-hcl"===r||"interpolate-lab"===r?s=de:t.expectedType&&"value"!==t.expectedType.kind&&(s=t.expectedType);for(let e=0;e=r)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',i);let c=t.parse(n,l,s);if(!c)return null;s=s||c.type,o.push([r,c])}return Ee(s,he)||Ee(s,de)||Ee(s,xe)||Ee(s,be)||Ee(s,we(he))?new zt(s,r,n,i,o):t.error(`Type ${Te(s)} is not interpolatable.`)}evaluate(e){let t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);let n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);let i=t.length;if(n>=t[i-1])return r[i-1].evaluate(e);let a=kt(t,n),o=zt.interpolationFactor(this.interpolation,n,t[a],t[a+1]),s=r[a].evaluate(e),l=r[a+1].evaluate(e);switch(this.operator){case"interpolate":return Pt[this.type.kind](s,l,o);case"interpolate-hcl":return Pt.color(s,l,o,"hcl");case"interpolate-lab":return Pt.color(s,l,o,"lab")}}eachChild(e){e(this.input);for(let t of this.outputs)e(t)}outputDefined(){return this.outputs.every((e=>e.outputDefined()))}}function Dt(e,t,r,n){let i=n-r,a=e-r;return 0===i?0:1===t?a/i:(Math.pow(t,a)-1)/(Math.pow(t,i)-1)}class Ot{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expectected at least one argument.");let r=null,n=t.expectedType;n&&"value"!==n.kind&&(r=n);let i=[];for(let n of e.slice(1)){let e=t.parse(n,1+i.length,r,void 0,{typeAnnotation:"omit"});if(!e)return null;r=r||e.type,i.push(e)}if(!r)throw new Error("No output type");let a=n&&i.some((e=>Ae(n,e.type)));return new Ot(a?ge:r,i)}evaluate(e){let t,r=null,n=0;for(let i of this.args)if(n++,r=i.evaluate(e),r&&r instanceof rt&&!r.available&&(t||(t=r.name),r=null,n===this.args.length&&(r=t)),null!==r)break;return r}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every((e=>e.outputDefined()))}}function Rt(e,t){return"=="===e||"!="===e?"boolean"===t.kind||"string"===t.kind||"number"===t.kind||"null"===t.kind||"value"===t.kind:"string"===t.kind||"number"===t.kind||"value"===t.kind}function Ft(e,t,r,n){return 0===n.compare(t,r)}function Bt(e,t,r){let n="=="!==e&&"!="!==e;return class i{constructor(e,t,r){this.type=pe,this.lhs=e,this.rhs=t,this.collator=r,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}static parse(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");let r=e[0],a=t.parse(e[1],1,ge);if(!a)return null;if(!Rt(r,a.type))return t.concat(1).error(`"${r}" comparisons are not supported for type '${Te(a.type)}'.`);let o=t.parse(e[2],2,ge);if(!o)return null;if(!Rt(r,o.type))return t.concat(2).error(`"${r}" comparisons are not supported for type '${Te(o.type)}'.`);if(a.type.kind!==o.type.kind&&"value"!==a.type.kind&&"value"!==o.type.kind)return t.error(`Cannot compare types '${Te(a.type)}' and '${Te(o.type)}'.`);n&&("value"===a.type.kind&&"value"!==o.type.kind?a=new ut(o.type,[a]):"value"!==a.type.kind&&"value"===o.type.kind&&(o=new ut(a.type,[o])));let s=null;if(4===e.length){if("string"!==a.type.kind&&"string"!==o.type.kind&&"value"!==a.type.kind&&"value"!==o.type.kind)return t.error("Cannot use collator to compare non-string types.");if(s=t.parse(e[3],3,ye),!s)return null}return new i(a,o,s)}evaluate(i){let a=this.lhs.evaluate(i),o=this.rhs.evaluate(i);if(n&&this.hasUntypedArgument){let t=at(a),r=at(o);if(t.kind!==r.kind||"string"!==t.kind&&"number"!==t.kind)throw new lt(`Expected arguments for "${e}" to be (string, string) or (number, number), but found (${t.kind}, ${r.kind}) instead.`)}if(this.collator&&!n&&this.hasUntypedArgument){let e=at(a),r=at(o);if("string"!==e.kind||"string"!==r.kind)return t(i,a,o)}return this.collator?r(i,a,o,this.collator.evaluate(i)):t(i,a,o)}eachChild(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)}outputDefined(){return!0}}}let jt=Bt("==",(function(e,t,r){return t===r}),Ft),Nt=Bt("!=",(function(e,t,r){return t!==r}),(function(e,t,r,n){return!Ft(0,t,r,n)})),Ut=Bt("<",(function(e,t,r){return t",(function(e,t,r){return t>r}),(function(e,t,r,n){return n.compare(t,r)>0})),qt=Bt("<=",(function(e,t,r){return t<=r}),(function(e,t,r,n){return n.compare(t,r)<=0})),Ht=Bt(">=",(function(e,t,r){return t>=r}),(function(e,t,r,n){return n.compare(t,r)>=0}));class Gt{constructor(e,t,r){this.type=ye,this.locale=r,this.caseSensitive=e,this.diacriticSensitive=t}static parse(e,t){if(2!==e.length)return t.error("Expected one argument.");let r=e[1];if("object"!=typeof r||Array.isArray(r))return t.error("Collator options argument must be an object.");let n=t.parse(void 0!==r["case-sensitive"]&&r["case-sensitive"],1,pe);if(!n)return null;let i=t.parse(void 0!==r["diacritic-sensitive"]&&r["diacritic-sensitive"],1,pe);if(!i)return null;let a=null;return r.locale&&(a=t.parse(r.locale,1,fe),!a)?null:new Gt(n,i,a)}evaluate(e){return new $e(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}}class Wt{constructor(e,t,r,n,i){this.type=fe,this.number=e,this.locale=t,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=i}static parse(e,t){if(3!==e.length)return t.error("Expected two arguments.");let r=t.parse(e[1],1,he);if(!r)return null;let n=e[2];if("object"!=typeof n||Array.isArray(n))return t.error("NumberFormat options argument must be an object.");let i=null;if(n.locale&&(i=t.parse(n.locale,1,fe),!i))return null;let a=null;if(n.currency&&(a=t.parse(n.currency,1,fe),!a))return null;let o=null;if(n["min-fraction-digits"]&&(o=t.parse(n["min-fraction-digits"],1,he),!o))return null;let s=null;return n["max-fraction-digits"]&&(s=t.parse(n["max-fraction-digits"],1,he),!s)?null:new Wt(r,i,a,o,s)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}}class Zt{constructor(e){this.type=ve,this.sections=e}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r=e[1];if(!Array.isArray(r)&&"object"==typeof r)return t.error("First argument must be an image or text section.");let n=[],i=!1;for(let r=1;r<=e.length-1;++r){let a=e[r];if(i&&"object"==typeof a&&!Array.isArray(a)){i=!1;let e=null;if(a["font-scale"]&&(e=t.parse(a["font-scale"],1,he),!e))return null;let r=null;if(a["text-font"]&&(r=t.parse(a["text-font"],1,we(fe)),!r))return null;let o=null;if(a["text-color"]&&(o=t.parse(a["text-color"],1,de),!o))return null;let s=n[n.length-1];s.scale=e,s.font=r,s.textColor=o}else{let a=t.parse(e[r],1,ge);if(!a)return null;let o=a.type.kind;if("string"!==o&&"value"!==o&&"null"!==o&&"resolvedImage"!==o)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,n.push({content:a,scale:null,font:null,textColor:null})}}return new Zt(n)}evaluate(e){return new Je(this.sections.map((t=>{let r=t.content.evaluate(e);return at(r)===_e?new Ke("",r,null,null,null):new Ke(ot(r),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)})))}eachChild(e){for(let t of this.sections)e(t.content),t.scale&&e(t.scale),t.font&&e(t.font),t.textColor&&e(t.textColor)}outputDefined(){return!1}}class Yt{constructor(e){this.type=_e,this.input=e}static parse(e,t){if(2!==e.length)return t.error("Expected two arguments.");let r=t.parse(e[1],1,fe);return r?new Yt(r):t.error("No image name provided.")}evaluate(e){let t=this.input.evaluate(e),r=rt.fromString(t);return r&&e.availableImages&&(r.available=e.availableImages.indexOf(t)>-1),r}eachChild(e){e(this.input)}outputDefined(){return!1}}class Xt{constructor(e){this.type=he,this.input=e}static parse(e,t){if(2!==e.length)return t.error(`Expected 1 argument, but found ${e.length-1} instead.`);let r=t.parse(e[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?t.error(`Expected argument of type string or array, but found ${Te(r.type)} instead.`):new Xt(r):null}evaluate(e){let t=this.input.evaluate(e);if("string"==typeof t)return[...t].length;if(Array.isArray(t))return t.length;throw new lt(`Expected value to be of type string or array, but found ${Te(at(t))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}}let $t=8192;function Kt(e,t){let r=(180+e[0])/360,n=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e[1]*Math.PI/360)))/360,i=Math.pow(2,t.z);return[Math.round(r*i*$t),Math.round(n*i*$t)]}function Jt(e,t){let r=Math.pow(2,t.z);return[(i=(e[0]/$t+t.x)/r,360*i-180),(n=(e[1]/$t+t.y)/r,360/Math.PI*Math.atan(Math.exp((180-360*n)*Math.PI/180))-90)];var n,i}function Qt(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.max(e[2],t[0]),e[3]=Math.max(e[3],t[1])}function er(e,t){return!(e[0]<=t[0]||e[2]>=t[2]||e[1]<=t[1]||e[3]>=t[3])}function tr(e,t,r){let n=e[0]-t[0],i=e[1]-t[1],a=e[0]-r[0],o=e[1]-r[1];return n*o-a*i==0&&n*a<=0&&i*o<=0}function rr(e,t,r,n){return(i=[n[0]-r[0],n[1]-r[1]])[0]*(a=[t[0]-e[0],t[1]-e[1]])[1]-i[1]*a[0]!=0&&!(!lr(e,t,r,n)||!lr(r,n,e,t));var i,a}function nr(e,t,r){for(let n of r)for(let r=0;r(i=e)[1]!=(o=s[t+1])[1]>i[1]&&i[0]<(o[0]-a[0])*(i[1]-a[1])/(o[1]-a[1])+a[0]&&(n=!n)}var i,a,o;return n}function ar(e,t){for(let r of t)if(ir(e,r))return!0;return!1}function or(e,t){for(let r of e)if(!ir(r,t))return!1;for(let r=0;r0&&s<0||o<0&&s>0}function cr(e,t,r){let n=[];for(let i=0;ir[2]){let t=.5*n,i=e[0]-r[0]>t?-n:r[0]-e[0]>t?n:0;0===i&&(i=e[0]-r[2]>t?-n:r[2]-e[0]>t?n:0),e[0]+=i}Qt(t,e)}function fr(e,t,r,n){let i=Math.pow(2,n.z)*$t,a=[n.x*$t,n.y*$t],o=[];for(let n of e)for(let e of n){let n=[e.x+a[0],e.y+a[1]];hr(n,t,r,i),o.push(n)}return o}function pr(e,t,r,n){let i=Math.pow(2,n.z)*$t,a=[n.x*$t,n.y*$t],o=[];for(let r of e){let e=[];for(let n of r){let r=[n.x+a[0],n.y+a[1]];Qt(t,r),e.push(r)}o.push(e)}if(t[2]-t[0]<=i/2){(s=t)[0]=s[1]=1/0,s[2]=s[3]=-1/0;for(let e of o)for(let n of e)hr(n,t,r,i)}var s;return o}class dr{constructor(e,t){this.type=pe,this.geojson=e,this.geometries=t}static parse(e,t){if(2!==e.length)return t.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(it(e[1])){let t=e[1];if("FeatureCollection"===t.type){let e=[];for(let r of t.features){let{type:t,coordinates:n}=r.geometry;"Polygon"===t&&e.push(n),"MultiPolygon"===t&&e.push(...n)}if(e.length)return new dr(t,{type:"MultiPolygon",coordinates:e})}else if("Feature"===t.type){let e=t.geometry.type;if("Polygon"===e||"MultiPolygon"===e)return new dr(t,t.geometry)}else if("Polygon"===t.type||"MultiPolygon"===t.type)return new dr(t,t)}return t.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(null!=e.geometry()&&null!=e.canonicalID()){if("Point"===e.geometryType())return function(e,t){let r=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=e.canonicalID();if("Polygon"===t.type){let a=cr(t.coordinates,n,i),o=fr(e.geometry(),r,n,i);if(!er(r,n))return!1;for(let e of o)if(!ir(e,a))return!1}if("MultiPolygon"===t.type){let a=ur(t.coordinates,n,i),o=fr(e.geometry(),r,n,i);if(!er(r,n))return!1;for(let e of o)if(!ar(e,a))return!1}return!0}(e,this.geometries);if("LineString"===e.geometryType())return function(e,t){let r=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=e.canonicalID();if("Polygon"===t.type){let a=cr(t.coordinates,n,i),o=pr(e.geometry(),r,n,i);if(!er(r,n))return!1;for(let e of o)if(!or(e,a))return!1}if("MultiPolygon"===t.type){let a=ur(t.coordinates,n,i),o=pr(e.geometry(),r,n,i);if(!er(r,n))return!1;for(let e of o)if(!sr(e,a))return!1}return!0}(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let mr=class{constructor(e=[],t=(e,t)=>et?1:0){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let e=(this.length>>1)-1;e>=0;e--)this._down(e)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(0===this.length)return;let e=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){let{data:t,compare:r}=this,n=t[e];for(;e>0;){let i=e-1>>1,a=t[i];if(r(n,a)>=0)break;t[e]=a,e=i}t[e]=n}_down(e){let{data:t,compare:r}=this,n=this.length>>1,i=t[e];for(;e=0)break;t[e]=t[n],e=n}t[e]=i}};function gr(e,t,r,n,i){yr(e,t,r,n||e.length-1,i||xr)}function yr(e,t,r,n,i){for(;n>r;){if(n-r>600){var a=n-r+1,o=t-r+1,s=Math.log(a),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(a-l)/a)*(o-a/2<0?-1:1);yr(e,t,Math.max(r,Math.floor(t-o*l/a+c)),Math.min(n,Math.floor(t+(a-o)*l/a+c)),i)}var u=e[t],h=r,f=n;for(vr(e,r,t),i(e[n],u)>0&&vr(e,r,n);h0;)f--}0===i(e[r],u)?vr(e,r,f):vr(e,++f,n),f<=t&&(r=f+1),t<=f&&(n=f-1)}}function vr(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function xr(e,t){return et?1:0}function _r(e,t){if(e.length<=1)return[e];let r,n,i=[];for(let t of e){let e=wr(t);0!==e&&(t.area=Math.abs(e),void 0===n&&(n=e<0),n===e<0?(r&&i.push(r),r=[t]):r.push(t))}if(r&&i.push(r),t>1)for(let e=0;e1?(l=e[s+1][0],c=e[s+1][1]):f>0&&(l+=u/this.kx*f,c+=h/this.ky*f)),u=this.wrap(t[0]-l)*this.kx,h=(t[1]-c)*this.ky;let p=u*u+h*h;p180;)e-=360;return e}}function Sr(e,t){return t[0]-e[0]}function Er(e){return e[1]-e[0]+1}function Cr(e,t){return e[1]>=e[0]&&e[1]e[1])return[null,null];let r=Er(e);if(t){if(2===r)return[e,null];let t=Math.floor(r/2);return[[e[0],e[0]+t],[e[0]+t,e[1]]]}if(1===r)return[e,null];let n=Math.floor(r/2)-1;return[[e[0],e[0]+n],[e[0]+n+1,e[1]]]}function Lr(e,t){if(!Cr(t,e.length))return[1/0,1/0,-1/0,-1/0];let r=[1/0,1/0,-1/0,-1/0];for(let n=t[0];n<=t[1];++n)Qt(r,e[n]);return r}function Pr(e){let t=[1/0,1/0,-1/0,-1/0];for(let r of e)for(let e of r)Qt(t,e);return t}function zr(e){return e[0]!==-1/0&&e[1]!==-1/0&&e[2]!==1/0&&e[3]!==1/0}function Dr(e,t,r){if(!zr(e)||!zr(t))return NaN;let n=0,i=0;return e[2]t[2]&&(n=e[0]-t[2]),e[1]>t[3]&&(i=e[1]-t[3]),e[3]=n)return n;if(er(i,a)){if(Ur(e,t))return 0}else if(Ur(t,e))return 0;let o=1/0;for(let n of e)for(let e=0,i=n.length,a=i-1;e0;){let i=o.pop();if(i[0]>=a)continue;let l=i[1],c=t?50:100;if(Er(l)<=c){if(!Cr(l,e.length))return NaN;if(t){let t=Nr(e,l,r,n);if(isNaN(t)||0===t)return t;a=Math.min(a,t)}else for(let t=l[0];t<=l[1];++t){let i=jr(e[t],r,n);if(a=Math.min(a,i),0===a)return 0}}else{let r=Ir(l,t);qr(o,a,n,e,s,r[0]),qr(o,a,n,e,s,r[1])}}return a}function Wr(e,t,r,n,i,a=1/0){let o=Math.min(a,i.distance(e[0],r[0]));if(0===o)return o;let s=new mr([[0,[0,e.length-1],[0,r.length-1]]],Sr);for(;s.length>0;){let a=s.pop();if(a[0]>=o)continue;let l=a[1],c=a[2],u=t?50:100,h=n?50:100;if(Er(l)<=u&&Er(c)<=h){if(!Cr(l,e.length)&&Cr(c,r.length))return NaN;let a;if(t&&n)a=Fr(e,l,r,c,i),o=Math.min(o,a);else if(t&&!n){let t=e.slice(l[0],l[1]+1);for(let e=c[0];e<=c[1];++e)if(a=Or(r[e],t,i),o=Math.min(o,a),0===o)return o}else if(!t&&n){let t=r.slice(c[0],c[1]+1);for(let r=l[0];r<=l[1];++r)if(a=Or(e[r],t,i),o=Math.min(o,a),0===o)return o}else a=Br(e,l,r,c,i),o=Math.min(o,a)}else{let a=Ir(l,t),u=Ir(c,n);Hr(s,o,i,e,r,a[0],u[0]),Hr(s,o,i,e,r,a[0],u[1]),Hr(s,o,i,e,r,a[1],u[0]),Hr(s,o,i,e,r,a[1],u[1])}}return o}function Zr(e){return"MultiPolygon"===e.type?e.coordinates.map((e=>({type:"Polygon",coordinates:e}))):"MultiLineString"===e.type?e.coordinates.map((e=>({type:"LineString",coordinates:e}))):"MultiPoint"===e.type?e.coordinates.map((e=>({type:"Point",coordinates:e}))):[e]}class Yr{constructor(e,t){this.type=he,this.geojson=e,this.geometries=t}static parse(e,t){if(2!==e.length)return t.error(`'distance' expression requires exactly one argument, but found ${e.length-1} instead.`);if(it(e[1])){let t=e[1];if("FeatureCollection"===t.type)return new Yr(t,t.features.map((e=>Zr(e.geometry))).flat());if("Feature"===t.type)return new Yr(t,Zr(t.geometry));if("type"in t&&"coordinates"in t)return new Yr(t,Zr(t))}return t.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(null!=e.geometry()&&null!=e.canonicalID()){if("Point"===e.geometryType())return function(e,t){let r=e.geometry(),n=r.flat().map((t=>Jt([t.x,t.y],e.canonical)));if(0===r.length)return NaN;let i=new Mr(n[0][1]),a=1/0;for(let e of t){switch(e.type){case"Point":a=Math.min(a,Wr(n,!1,[e.coordinates],!1,i,a));break;case"LineString":a=Math.min(a,Wr(n,!1,e.coordinates,!0,i,a));break;case"Polygon":a=Math.min(a,Gr(n,!1,e.coordinates,i,a))}if(0===a)return a}return a}(e,this.geometries);if("LineString"===e.geometryType())return function(e,t){let r=e.geometry(),n=r.flat().map((t=>Jt([t.x,t.y],e.canonical)));if(0===r.length)return NaN;let i=new Mr(n[0][1]),a=1/0;for(let e of t){switch(e.type){case"Point":a=Math.min(a,Wr(n,!0,[e.coordinates],!1,i,a));break;case"LineString":a=Math.min(a,Wr(n,!0,e.coordinates,!0,i,a));break;case"Polygon":a=Math.min(a,Gr(n,!0,e.coordinates,i,a))}if(0===a)return a}return a}(e,this.geometries);if("Polygon"===e.geometryType())return function(e,t){let r=e.geometry();if(0===r.length||0===r[0].length)return NaN;let n=_r(r,0).map((t=>t.map((t=>t.map((t=>Jt([t.x,t.y],e.canonical))))))),i=new Mr(n[0][0][0][1]),a=1/0;for(let e of t)for(let t of n){switch(e.type){case"Point":a=Math.min(a,Gr([e.coordinates],!1,t,i,a));break;case"LineString":a=Math.min(a,Gr(e.coordinates,!0,t,i,a));break;case"Polygon":a=Math.min(a,Vr(t,e.coordinates,i,a))}if(0===a)return a}return a}(e,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}let Xr={"==":jt,"!=":Nt,">":Vt,"<":Ut,">=":Ht,"<=":qt,array:ut,at:vt,boolean:ut,case:wt,coalesce:Ot,collator:Gt,format:Zt,image:Yt,in:xt,"index-of":_t,interpolate:zt,"interpolate-hcl":zt,"interpolate-lab":zt,length:Xt,let:gt,literal:st,match:bt,number:ut,"number-format":Wt,object:ut,slice:Tt,step:At,string:ut,"to-boolean":ft,"to-color":ft,"to-number":ft,"to-string":ft,var:yt,within:dr,distance:Yr};class $r{constructor(e,t,r,n){this.name=e,this.type=t,this._evaluate=r,this.args=n}evaluate(e){return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}static parse(e,t){let r=e[0],n=$r.definitions[r];if(!n)return t.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0);let i=Array.isArray(n)?n[0]:n.type,a=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,o=a.filter((([t])=>!Array.isArray(t)||t.length===e.length-1)),s=null;for(let[n,a]of o){s=new mt(t.registry,tn,t.path,null,t.scope);let o=[],l=!1;for(let t=1;t{return t=e,Array.isArray(t)?`(${t.map(Te).join(", ")})`:`(${Te(t.type)}...)`;var t})).join(" | "),n=[];for(let r=1;r{r=t?r&&tn(e):r&&e instanceof st})),!!r&&rn(e)&&an(e,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function rn(e){if(e instanceof $r&&("get"===e.name&&1===e.args.length||"feature-state"===e.name||"has"===e.name&&1===e.args.length||"properties"===e.name||"geometry-type"===e.name||"id"===e.name||/^filter-/.test(e.name))||e instanceof dr||e instanceof Yr)return!1;let t=!0;return e.eachChild((e=>{t&&!rn(e)&&(t=!1)})),t}function nn(e){if(e instanceof $r&&"feature-state"===e.name)return!1;let t=!0;return e.eachChild((e=>{t&&!nn(e)&&(t=!1)})),t}function an(e,t){if(e instanceof $r&&t.indexOf(e.name)>=0)return!1;let r=!0;return e.eachChild((e=>{r&&!an(e,t)&&(r=!1)})),r}function on(e){return{result:"success",value:e}}function sn(e){return{result:"error",value:e}}function ln(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function cn(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function un(e){return!!e.expression&&e.expression.interpolated}function hn(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}function fn(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function pn(e){return e}function dn(e,t){let r="color"===t.type,n=e.stops&&"object"==typeof e.stops[0][0],i=n||!(n||void 0!==e.property),a=e.type||(un(t)?"exponential":"interval");if(r||"padding"===t.type){let n=r?Xe.parse:Qe.parse;(e=se({},e)).stops&&(e.stops=e.stops.map((e=>[e[0],n(e[1])]))),e.default=n(e.default?e.default:t.default)}if(e.colorSpace&&"rgb"!==(o=e.colorSpace)&&"hcl"!==o&&"lab"!==o)throw new Error(`Unknown color space: "${e.colorSpace}"`);var o;let s,l,c;if("exponential"===a)s=vn;else if("interval"===a)s=yn;else if("categorical"===a){s=gn,l=Object.create(null);for(let t of e.stops)l[t[0]]=t[1];c=typeof e.stops[0][0]}else{if("identity"!==a)throw new Error(`Unknown function type "${a}"`);s=xn}if(n){let r={},n=[];for(let t=0;te[0])),evaluate:({zoom:r},n)=>vn({stops:i,base:e.base},t,r).evaluate(r,n)}}if(i){let r="exponential"===a?{name:"exponential",base:void 0!==e.base?e.base:1}:null;return{kind:"camera",interpolationType:r,interpolationFactor:zt.interpolationFactor.bind(void 0,r),zoomStops:e.stops.map((e=>e[0])),evaluate:({zoom:r})=>s(e,t,r,l,c)}}return{kind:"source",evaluate(r,n){let i=n&&n.properties?n.properties[e.property]:void 0;return void 0===i?mn(e.default,t.default):s(e,t,i,l,c)}}}function mn(e,t,r){return void 0!==e?e:void 0!==t?t:void 0!==r?r:void 0}function gn(e,t,r,n,i){return mn(typeof r===i?n[r]:void 0,e.default,t.default)}function yn(e,t,r){if("number"!==hn(r))return mn(e.default,t.default);let n=e.stops.length;if(1===n||r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[n-1][0])return e.stops[n-1][1];let i=kt(e.stops.map((e=>e[0])),r);return e.stops[i][1]}function vn(e,t,r){let n=void 0!==e.base?e.base:1;if("number"!==hn(r))return mn(e.default,t.default);let i=e.stops.length;if(1===i||r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[i-1][0])return e.stops[i-1][1];let a=kt(e.stops.map((e=>e[0])),r),o=function(e,t,r,n){let i=n-r,a=e-r;return 0===i?0:1===t?a/i:(Math.pow(t,a)-1)/(Math.pow(t,i)-1)}(r,n,e.stops[a][0],e.stops[a+1][0]),s=e.stops[a][1],l=e.stops[a+1][1],c=Pt[t.type]||pn;return"function"==typeof s.evaluate?{evaluate(...t){let r=s.evaluate.apply(void 0,t),n=l.evaluate.apply(void 0,t);if(void 0!==r&&void 0!==n)return c(r,n,o,e.colorSpace)}}:c(s,l,o,e.colorSpace)}function xn(e,t,r){switch(t.type){case"color":r=Xe.parse(r);break;case"formatted":r=Je.fromString(r.toString());break;case"resolvedImage":r=rt.fromString(r.toString());break;case"padding":r=Qe.parse(r);break;default:hn(r)===t.type||"enum"===t.type&&t.values[r]||(r=void 0)}return mn(r,e.default,t.default)}$r.register(Xr,{error:[{kind:"error"},[fe],(e,[t])=>{throw new lt(t.evaluate(e))}],typeof:[fe,[ge],(e,[t])=>Te(at(t.evaluate(e)))],"to-rgba":[we(he,4),[de],(e,[t])=>{let[r,n,i,a]=t.evaluate(e).rgb;return[255*r,255*n,255*i,a]}],rgb:[de,[he,he,he],Kr],rgba:[de,[he,he,he,he],Kr],has:{type:pe,overloads:[[[fe],(e,[t])=>Jr(t.evaluate(e),e.properties())],[[fe,me],(e,[t,r])=>Jr(t.evaluate(e),r.evaluate(e))]]},get:{type:ge,overloads:[[[fe],(e,[t])=>Qr(t.evaluate(e),e.properties())],[[fe,me],(e,[t,r])=>Qr(t.evaluate(e),r.evaluate(e))]]},"feature-state":[ge,[fe],(e,[t])=>Qr(t.evaluate(e),e.featureState||{})],properties:[me,[],e=>e.properties()],"geometry-type":[fe,[],e=>e.geometryType()],id:[ge,[],e=>e.id()],zoom:[he,[],e=>e.globals.zoom],"heatmap-density":[he,[],e=>e.globals.heatmapDensity||0],"line-progress":[he,[],e=>e.globals.lineProgress||0],accumulated:[ge,[],e=>void 0===e.globals.accumulated?null:e.globals.accumulated],"+":[he,en(he),(e,t)=>{let r=0;for(let n of t)r+=n.evaluate(e);return r}],"*":[he,en(he),(e,t)=>{let r=1;for(let n of t)r*=n.evaluate(e);return r}],"-":{type:he,overloads:[[[he,he],(e,[t,r])=>t.evaluate(e)-r.evaluate(e)],[[he],(e,[t])=>-t.evaluate(e)]]},"/":[he,[he,he],(e,[t,r])=>t.evaluate(e)/r.evaluate(e)],"%":[he,[he,he],(e,[t,r])=>t.evaluate(e)%r.evaluate(e)],ln2:[he,[],()=>Math.LN2],pi:[he,[],()=>Math.PI],e:[he,[],()=>Math.E],"^":[he,[he,he],(e,[t,r])=>Math.pow(t.evaluate(e),r.evaluate(e))],sqrt:[he,[he],(e,[t])=>Math.sqrt(t.evaluate(e))],log10:[he,[he],(e,[t])=>Math.log(t.evaluate(e))/Math.LN10],ln:[he,[he],(e,[t])=>Math.log(t.evaluate(e))],log2:[he,[he],(e,[t])=>Math.log(t.evaluate(e))/Math.LN2],sin:[he,[he],(e,[t])=>Math.sin(t.evaluate(e))],cos:[he,[he],(e,[t])=>Math.cos(t.evaluate(e))],tan:[he,[he],(e,[t])=>Math.tan(t.evaluate(e))],asin:[he,[he],(e,[t])=>Math.asin(t.evaluate(e))],acos:[he,[he],(e,[t])=>Math.acos(t.evaluate(e))],atan:[he,[he],(e,[t])=>Math.atan(t.evaluate(e))],min:[he,en(he),(e,t)=>Math.min(...t.map((t=>t.evaluate(e))))],max:[he,en(he),(e,t)=>Math.max(...t.map((t=>t.evaluate(e))))],abs:[he,[he],(e,[t])=>Math.abs(t.evaluate(e))],round:[he,[he],(e,[t])=>{let r=t.evaluate(e);return r<0?-Math.round(-r):Math.round(r)}],floor:[he,[he],(e,[t])=>Math.floor(t.evaluate(e))],ceil:[he,[he],(e,[t])=>Math.ceil(t.evaluate(e))],"filter-==":[pe,[fe,ge],(e,[t,r])=>e.properties()[t.value]===r.value],"filter-id-==":[pe,[ge],(e,[t])=>e.id()===t.value],"filter-type-==":[pe,[fe],(e,[t])=>e.geometryType()===t.value],"filter-<":[pe,[fe,ge],(e,[t,r])=>{let n=e.properties()[t.value],i=r.value;return typeof n==typeof i&&n{let r=e.id(),n=t.value;return typeof r==typeof n&&r":[pe,[fe,ge],(e,[t,r])=>{let n=e.properties()[t.value],i=r.value;return typeof n==typeof i&&n>i}],"filter-id->":[pe,[ge],(e,[t])=>{let r=e.id(),n=t.value;return typeof r==typeof n&&r>n}],"filter-<=":[pe,[fe,ge],(e,[t,r])=>{let n=e.properties()[t.value],i=r.value;return typeof n==typeof i&&n<=i}],"filter-id-<=":[pe,[ge],(e,[t])=>{let r=e.id(),n=t.value;return typeof r==typeof n&&r<=n}],"filter->=":[pe,[fe,ge],(e,[t,r])=>{let n=e.properties()[t.value],i=r.value;return typeof n==typeof i&&n>=i}],"filter-id->=":[pe,[ge],(e,[t])=>{let r=e.id(),n=t.value;return typeof r==typeof n&&r>=n}],"filter-has":[pe,[ge],(e,[t])=>t.value in e.properties()],"filter-has-id":[pe,[],e=>null!==e.id()&&void 0!==e.id()],"filter-type-in":[pe,[we(fe)],(e,[t])=>t.value.indexOf(e.geometryType())>=0],"filter-id-in":[pe,[we(ge)],(e,[t])=>t.value.indexOf(e.id())>=0],"filter-in-small":[pe,[fe,we(ge)],(e,[t,r])=>r.value.indexOf(e.properties()[t.value])>=0],"filter-in-large":[pe,[fe,we(ge)],(e,[t,r])=>function(e,t,r,n){for(;r<=n;){let i=r+n>>1;if(t[i]===e)return!0;t[i]>e?n=i-1:r=i+1}return!1}(e.properties()[t.value],r.value,0,r.value.length-1)],all:{type:pe,overloads:[[[pe,pe],(e,[t,r])=>t.evaluate(e)&&r.evaluate(e)],[en(pe),(e,t)=>{for(let r of t)if(!r.evaluate(e))return!1;return!0}]]},any:{type:pe,overloads:[[[pe,pe],(e,[t,r])=>t.evaluate(e)||r.evaluate(e)],[en(pe),(e,t)=>{for(let r of t)if(r.evaluate(e))return!0;return!1}]]},"!":[pe,[pe],(e,[t])=>!t.evaluate(e)],"is-supported-script":[pe,[fe],(e,[t])=>{let r=e.globals&&e.globals.isSupportedScript;return!r||r(t.evaluate(e))}],upcase:[fe,[fe],(e,[t])=>t.evaluate(e).toUpperCase()],downcase:[fe,[fe],(e,[t])=>t.evaluate(e).toLowerCase()],concat:[fe,en(ge),(e,t)=>t.map((t=>ot(t.evaluate(e)))).join("")],"resolved-locale":[fe,[ye],(e,[t])=>t.evaluate(e).resolvedLocale()]});class _n{constructor(e,t){var r;this.expression=e,this._warningHistory={},this._evaluator=new dt,this._defaultValue=t?"color"===(r=t).type&&fn(r.default)?new Xe(0,0,0,0):"color"===r.type?Xe.parse(r.default)||null:"padding"===r.type?Qe.parse(r.default)||null:"variableAnchorOffsetCollection"===r.type?tt.parse(r.default)||null:void 0===r.default?null:r.default:null,this._enumValues=t&&"enum"===t.type?t.values:null}evaluateWithoutErrorHandling(e,t,r,n,i,a){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=r,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)}evaluate(e,t,r,n,i,a){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=r||null,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a||null;try{let e=this.expression.evaluate(this._evaluator);if(null==e||"number"==typeof e&&e!=e)return this._defaultValue;if(this._enumValues&&!(e in this._enumValues))throw new lt(`Expected value to be one of ${Object.keys(this._enumValues).map((e=>JSON.stringify(e))).join(", ")}, but found ${JSON.stringify(e)} instead.`);return e}catch(e){return this._warningHistory[e.message]||(this._warningHistory[e.message]=!0,typeof console<"u"&&console.warn(e.message)),this._defaultValue}}}function bn(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&e[0]in Xr}function wn(e,t){let r=new mt(Xr,tn,[],t?function(e){let t={color:de,string:fe,number:he,enum:fe,boolean:pe,formatted:ve,padding:xe,resolvedImage:_e,variableAnchorOffsetCollection:be};return"array"===e.type?we(t[e.value]||ge,e.length):t[e.type]}(t):void 0),n=r.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return n?on(new _n(n,t)):sn(r.errors)}class Tn{constructor(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!nn(t.expression)}evaluateWithoutErrorHandling(e,t,r,n,i,a){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,n,i,a)}evaluate(e,t,r,n,i,a){return this._styleExpression.evaluate(e,t,r,n,i,a)}}class kn{constructor(e,t,r,n){this.kind=e,this.zoomStops=r,this._styleExpression=t,this.isStateDependent="camera"!==e&&!nn(t.expression),this.interpolationType=n}evaluateWithoutErrorHandling(e,t,r,n,i,a){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,n,i,a)}evaluate(e,t,r,n,i,a){return this._styleExpression.evaluate(e,t,r,n,i,a)}interpolationFactor(e,t,r){return this.interpolationType?zt.interpolationFactor(this.interpolationType,e,t,r):0}}function An(e,t){let r=wn(e,t);if("error"===r.result)return r;let n=r.value.expression,i=rn(n);if(!i&&!ln(t))return sn([new le("","data expressions not supported")]);let a=an(n,["zoom"]);if(!a&&!cn(t))return sn([new le("","zoom expressions not supported")]);let o=Sn(n);return o||a?o instanceof le?sn([o]):o instanceof zt&&!un(t)?sn([new le("",'"interpolate" expressions cannot be used with this property')]):on(o?new kn(i?"camera":"composite",r.value,o.labels,o instanceof zt?o.interpolation:void 0):new Tn(i?"constant":"source",r.value)):sn([new le("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Mn{constructor(e,t){this._parameters=e,this._specification=t,se(this,dn(this._parameters,this._specification))}static deserialize(e){return new Mn(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function Sn(e){let t=null;if(e instanceof gt)t=Sn(e.result);else if(e instanceof Ot){for(let r of e.args)if(t=Sn(r),t)break}else(e instanceof At||e instanceof zt)&&e.input instanceof $r&&"zoom"===e.input.name&&(t=e);return t instanceof le||e.eachChild((e=>{let r=Sn(e);r instanceof le?t=r:!t&&r?t=new le("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&r&&t!==r&&(t=new le("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),t}function En(e){if(!0===e||!1===e)return!0;if(!Array.isArray(e)||0===e.length)return!1;switch(e[0]){case"has":return e.length>=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&("string"!=typeof e[1]||Array.isArray(e[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(let t of e.slice(1))if(!En(t)&&"boolean"!=typeof t)return!1;return!0;default:return!0}}let Cn={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function In(e){if(null==e)return{filter:()=>!0,needGeometry:!1};En(e)||(e=zn(e));let t=wn(e,Cn);if("error"===t.result)throw new Error(t.value.map((e=>`${e.key}: ${e.message}`)).join(", "));return{filter:(e,r,n)=>t.value.evaluate(e,r,{},n),needGeometry:Pn(e)}}function Ln(e,t){return et?1:0}function Pn(e){if(!Array.isArray(e))return!1;if("within"===e[0]||"distance"===e[0])return!0;for(let t=1;t"===t||"<="===t||">="===t?Dn(e[1],e[2],t):"any"===t?(r=e.slice(1),["any"].concat(r.map(zn))):"all"===t?["all"].concat(e.slice(1).map(zn)):"none"===t?["all"].concat(e.slice(1).map(zn).map(Fn)):"in"===t?On(e[1],e.slice(2)):"!in"===t?Fn(On(e[1],e.slice(2))):"has"===t?Rn(e[1]):"!has"!==t||Fn(Rn(e[1]));var r}function Dn(e,t,r){switch(e){case"$type":return[`filter-type-${r}`,t];case"$id":return[`filter-id-${r}`,t];default:return[`filter-${r}`,e,t]}}function On(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((e=>typeof e!=typeof t[0]))?["filter-in-large",e,["literal",t.sort(Ln)]]:["filter-in-small",e,["literal",t]]}}function Rn(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function Fn(e){return["!",e]}function Bn(e){let t=typeof e;if("number"===t||"boolean"===t||"string"===t||null==e)return JSON.stringify(e);if(Array.isArray(e)){let t="[";for(let r of e)t+=`${Bn(r)},`;return`${t}]`}let r=Object.keys(e).sort(),n="{";for(let t=0;tn.maximum?[new oe(t,r,`${r} is greater than the maximum value ${n.maximum}`)]:[]}function Wn(e){let t,r,n,i=e.valueSpec,a=Un(e.value.type),o={},s="categorical"!==a&&void 0===e.value.property,l=!s,c="array"===hn(e.value.stops)&&"array"===hn(e.value.stops[0])&&"object"===hn(e.value.stops[0][0]),u=qn({key:e.key,value:e.value,valueSpec:e.styleSpec.function,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:function(e){if("identity"===a)return[new oe(e.key,e.value,'identity function may not have a "stops" property')];let t=[],r=e.value;return t=t.concat(Hn({key:e.key,value:r,valueSpec:e.valueSpec,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,arrayElementValidator:h})),"array"===hn(r)&&0===r.length&&t.push(new oe(e.key,r,"array must have at least one stop")),t},default:function(e){return e.validateSpec({key:e.key,value:e.value,valueSpec:i,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec})}}});return"identity"===a&&s&&u.push(new oe(e.key,e.value,'missing required property "property"')),"identity"===a||e.value.stops||u.push(new oe(e.key,e.value,'missing required property "stops"')),"exponential"===a&&e.valueSpec.expression&&!un(e.valueSpec)&&u.push(new oe(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(l&&!ln(e.valueSpec)?u.push(new oe(e.key,e.value,"property functions not supported")):s&&!cn(e.valueSpec)&&u.push(new oe(e.key,e.value,"zoom functions not supported"))),"categorical"!==a&&!c||void 0!==e.value.property||u.push(new oe(e.key,e.value,'"property" property is required')),u;function h(e){let t=[],a=e.value,s=e.key;if("array"!==hn(a))return[new oe(s,a,`array expected, ${hn(a)} found`)];if(2!==a.length)return[new oe(s,a,`array length 2 expected, length ${a.length} found`)];if(c){if("object"!==hn(a[0]))return[new oe(s,a,`object expected, ${hn(a[0])} found`)];if(void 0===a[0].zoom)return[new oe(s,a,"object stop key must have zoom")];if(void 0===a[0].value)return[new oe(s,a,"object stop key must have value")];if(n&&n>Un(a[0].zoom))return[new oe(s,a[0].zoom,"stop zoom values must appear in ascending order")];Un(a[0].zoom)!==n&&(n=Un(a[0].zoom),r=void 0,o={}),t=t.concat(qn({key:`${s}[0]`,value:a[0],valueSpec:{zoom:{}},validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:Gn,value:f}}))}else t=t.concat(f({key:`${s}[0]`,value:a[0],valueSpec:{},validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec},a));return bn(Vn(a[1]))?t.concat([new oe(`${s}[1]`,a[1],"expressions are not allowed in function stops.")]):t.concat(e.validateSpec({key:`${s}[1]`,value:a[1],valueSpec:i,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec}))}function f(e,n){let s=hn(e.value),l=Un(e.value),c=null!==e.value?e.value:n;if(t){if(s!==t)return[new oe(e.key,c,`${s} stop domain type must match previous stop domain type ${t}`)]}else t=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new oe(e.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==a){let t=`number expected, ${s} found`;return ln(i)&&void 0===a&&(t+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new oe(e.key,c,t)]}return"categorical"!==a||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==a&&"number"===s&&void 0!==r&&lnew oe(`${e.key}${t.key}`,e.value,t.message)));let r=t.value.expression||t.value._styleExpression.expression;if("property"===e.expressionContext&&"text-font"===e.propertyKey&&!r.outputDefined())return[new oe(e.key,e.value,`Invalid data expression for "${e.propertyKey}". Output values must be contained as literals within the expression.`)];if("property"===e.expressionContext&&"layout"===e.propertyType&&!nn(r))return[new oe(e.key,e.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===e.expressionContext&&!nn(r))return[new oe(e.key,e.value,'"feature-state" data expressions are not supported with filters.')];if(e.expressionContext&&0===e.expressionContext.indexOf("cluster")){if(!an(r,["zoom","feature-state"]))return[new oe(e.key,e.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===e.expressionContext&&!rn(r))return[new oe(e.key,e.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Yn(e){let t=e.key,r=e.value,n=e.valueSpec,i=[];return Array.isArray(n.values)?-1===n.values.indexOf(Un(r))&&i.push(new oe(t,r,`expected one of [${n.values.join(", ")}], ${JSON.stringify(r)} found`)):-1===Object.keys(n.values).indexOf(Un(r))&&i.push(new oe(t,r,`expected one of [${Object.keys(n.values).join(", ")}], ${JSON.stringify(r)} found`)),i}function Xn(e){return En(Vn(e.value))?Zn(se({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}})):$n(e)}function $n(e){let t=e.value,r=e.key;if("array"!==hn(t))return[new oe(r,t,`array expected, ${hn(t)} found`)];let n,i=e.styleSpec,a=[];if(t.length<1)return[new oe(r,t,"filter array must have at least 1 element")];switch(a=a.concat(Yn({key:`${r}[0]`,value:t[0],valueSpec:i.filter_operator,style:e.style,styleSpec:e.styleSpec})),Un(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&"$type"===Un(t[1])&&a.push(new oe(r,t,`"$type" cannot be use with operator "${t[0]}"`));case"==":case"!=":3!==t.length&&a.push(new oe(r,t,`filter array for operator "${t[0]}" must have 3 elements`));case"in":case"!in":t.length>=2&&(n=hn(t[1]),"string"!==n&&a.push(new oe(`${r}[1]`,t[1],`string expected, ${n} found`)));for(let o=2;o{e in r&&t.push(new oe(n,r[e],`"${e}" is prohibited for ref layers`))})),i.layers.forEach((t=>{Un(t.id)===s&&(e=t)})),e?e.ref?t.push(new oe(n,r.ref,"ref cannot reference another ref layer")):o=Un(e.type):t.push(new oe(n,r.ref,`ref layer "${s}" not found`))}else if("background"!==o)if(r.source){let e=i.sources&&i.sources[r.source],a=e&&Un(e.type);e?"vector"===a&&"raster"===o?t.push(new oe(n,r.source,`layer "${r.id}" requires a raster source`)):"raster-dem"!==a&&"hillshade"===o?t.push(new oe(n,r.source,`layer "${r.id}" requires a raster-dem source`)):"raster"===a&&"raster"!==o?t.push(new oe(n,r.source,`layer "${r.id}" requires a vector source`)):"vector"!==a||r["source-layer"]?"raster-dem"===a&&"hillshade"!==o?t.push(new oe(n,r.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==o||!r.paint||!r.paint["line-gradient"]||"geojson"===a&&e.lineMetrics||t.push(new oe(n,r,`layer "${r.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):t.push(new oe(n,r,`layer "${r.id}" must specify a "source-layer"`)):t.push(new oe(n,r.source,`source "${r.source}" not found`))}else t.push(new oe(n,r,'missing required property "source"'));return t=t.concat(qn({key:n,value:r,valueSpec:a.layer,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":()=>[],type:()=>e.validateSpec({key:`${n}.type`,value:r.type,valueSpec:a.layer.type,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,object:r,objectKey:"type"}),filter:Xn,layout:e=>qn({layer:r,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":e=>Qn(se({layerType:o},e))}}),paint:e=>qn({layer:r,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":e=>Jn(se({layerType:o},e))}})}})),t}function ti(e){let t=e.value,r=e.key,n=hn(t);return"string"!==n?[new oe(r,t,`string expected, ${n} found`)]:[]}let ri={promoteId:function({key:e,value:t}){if("string"===hn(t))return ti({key:e,value:t});{let r=[];for(let n in t)r.push(...ti({key:`${e}.${n}`,value:t[n]}));return r}}};function ni(e){let t=e.value,r=e.key,n=e.styleSpec,i=e.style,a=e.validateSpec;if(!t.type)return[new oe(r,t,'"type" is required')];let o,s=Un(t.type);switch(s){case"vector":case"raster":return o=qn({key:r,value:t,valueSpec:n[`source_${s.replace("-","_")}`],style:e.style,styleSpec:n,objectElementValidators:ri,validateSpec:a}),o;case"raster-dem":return o=function(e){var t;let r=null!==(t=e.sourceName)&&void 0!==t?t:"",n=e.value,i=e.styleSpec,a=i.source_raster_dem,o=e.style,s=[],l=hn(n);if(void 0===n)return s;if("object"!==l)return s.push(new oe("source_raster_dem",n,`object expected, ${l} found`)),s;let c="custom"===Un(n.encoding),u=["redFactor","greenFactor","blueFactor","baseShift"],h=e.value.encoding?`"${e.value.encoding}"`:"Default";for(let t in n)!c&&u.includes(t)?s.push(new oe(t,n[t],`In "${r}": "${t}" is only valid when "encoding" is set to "custom". ${h} encoding found`)):a[t]?s=s.concat(e.validateSpec({key:t,value:n[t],valueSpec:a[t],validateSpec:e.validateSpec,style:o,styleSpec:i})):s.push(new oe(t,n[t],`unknown property "${t}"`));return s}({sourceName:r,value:t,style:e.style,styleSpec:n,validateSpec:a}),o;case"geojson":if(o=qn({key:r,value:t,valueSpec:n.source_geojson,style:i,styleSpec:n,validateSpec:a,objectElementValidators:ri}),t.cluster)for(let e in t.clusterProperties){let[n,i]=t.clusterProperties[e],s="string"==typeof n?[n,["accumulated"],["get",e]]:n;o.push(...Zn({key:`${r}.${e}.map`,value:i,validateSpec:a,expressionContext:"cluster-map"})),o.push(...Zn({key:`${r}.${e}.reduce`,value:s,validateSpec:a,expressionContext:"cluster-reduce"}))}return o;case"video":return qn({key:r,value:t,valueSpec:n.source_video,style:i,validateSpec:a,styleSpec:n});case"image":return qn({key:r,value:t,valueSpec:n.source_image,style:i,validateSpec:a,styleSpec:n});case"canvas":return[new oe(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Yn({key:`${r}.type`,value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:i,validateSpec:a,styleSpec:n})}}function ii(e){let t=e.value,r=e.styleSpec,n=r.light,i=e.style,a=[],o=hn(t);if(void 0===t)return a;if("object"!==o)return a=a.concat([new oe("light",t,`object expected, ${o} found`)]),a;for(let o in t){let s=o.match(/^(.*)-transition$/);a=a.concat(s&&n[s[1]]&&n[s[1]].transition?e.validateSpec({key:o,value:t[o],valueSpec:r.transition,validateSpec:e.validateSpec,style:i,styleSpec:r}):n[o]?e.validateSpec({key:o,value:t[o],valueSpec:n[o],validateSpec:e.validateSpec,style:i,styleSpec:r}):[new oe(o,t[o],`unknown property "${o}"`)])}return a}function ai(e){let t=e.value,r=e.styleSpec,n=r.sky,i=e.style,a=hn(t);if(void 0===t)return[];if("object"!==a)return[new oe("sky",t,`object expected, ${a} found`)];let o=[];for(let a in t)o=o.concat(n[a]?e.validateSpec({key:a,value:t[a],valueSpec:n[a],style:i,styleSpec:r}):[new oe(a,t[a],`unknown property "${a}"`)]);return o}function oi(e){let t=e.value,r=e.styleSpec,n=r.terrain,i=e.style,a=[],o=hn(t);if(void 0===t)return a;if("object"!==o)return a=a.concat([new oe("terrain",t,`object expected, ${o} found`)]),a;for(let o in t)a=a.concat(n[o]?e.validateSpec({key:o,value:t[o],valueSpec:n[o],validateSpec:e.validateSpec,style:i,styleSpec:r}):[new oe(o,t[o],`unknown property "${o}"`)]);return a}function si(e){let t=[],r=e.value,n=e.key;if(Array.isArray(r)){let i=[],a=[];for(let o in r)r[o].id&&i.includes(r[o].id)&&t.push(new oe(n,r,`all the sprites' ids must be unique, but ${r[o].id} is duplicated`)),i.push(r[o].id),r[o].url&&a.includes(r[o].url)&&t.push(new oe(n,r,`all the sprites' URLs must be unique, but ${r[o].url} is duplicated`)),a.push(r[o].url),t=t.concat(qn({key:`${n}[${o}]`,value:r[o],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:e.validateSpec}));return t}return ti({key:n,value:r})}let li={"*":()=>[],array:Hn,boolean:function(e){let t=e.value,r=e.key,n=hn(t);return"boolean"!==n?[new oe(r,t,`boolean expected, ${n} found`)]:[]},number:Gn,color:function(e){let t=e.key,r=e.value,n=hn(r);return"string"!==n?[new oe(t,r,`color expected, ${n} found`)]:Xe.parse(String(r))?[]:[new oe(t,r,`color expected, "${r}" found`)]},constants:Nn,enum:Yn,filter:Xn,function:Wn,layer:ei,object:qn,source:ni,light:ii,sky:ai,terrain:oi,projection:function(e){let t=e.value,r=e.styleSpec,n=r.projection,i=e.style,a=hn(t);if(void 0===t)return[];if("object"!==a)return[new oe("projection",t,`object expected, ${a} found`)];let o=[];for(let a in t)o=o.concat(n[a]?e.validateSpec({key:a,value:t[a],valueSpec:n[a],style:i,styleSpec:r}):[new oe(a,t[a],`unknown property "${a}"`)]);return o},string:ti,formatted:function(e){return 0===ti(e).length?[]:Zn(e)},resolvedImage:function(e){return 0===ti(e).length?[]:Zn(e)},padding:function(e){let t=e.key,r=e.value;if("array"===hn(r)){if(r.length<1||r.length>4)return[new oe(t,r,`padding requires 1 to 4 values; ${r.length} values found`)];let n={type:"number"},i=[];for(let a=0;a[]}})),e.constants&&(r=r.concat(Nn({key:"constants",value:e.constants,style:e,styleSpec:t,validateSpec:ci}))),pi(r)}function fi(e){return function(t){return e(p(f({},t),{validateSpec:ci}))}}function pi(e){return[].concat(e).sort(((e,t)=>e.line-t.line))}function di(e){return function(...t){return pi(e.apply(this,t))}}hi.source=di(fi(ni)),hi.sprite=di(fi(si)),hi.glyphs=di(fi(ui)),hi.light=di(fi(ii)),hi.sky=di(fi(ai)),hi.terrain=di(fi(oi)),hi.layer=di(fi(ei)),hi.filter=di(fi(Xn)),hi.paintProperty=di(fi(Jn)),hi.layoutProperty=di(fi(Qn));let mi=hi,gi=mi.light,yi=mi.sky,vi=mi.paintProperty,xi=mi.layoutProperty;function _i(e,t){let r=!1;if(t&&t.length)for(let n of t)e.fire(new W(new Error(n.message))),r=!0;return r}class bi{constructor(e,t,r){let n=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;let i=new Int32Array(this.arrayBuffer);e=i[0],this.d=(t=i[1])+2*(r=i[2]);for(let e=0;e=c[l+0]&&n>=c[l+1])?(o[h]=!0,a.push(i[h])):o[h]=!1}}}}_forEachCell(e,t,r,n,i,a,o,s){let l=this._convertToCellCoord(e),c=this._convertToCellCoord(t),u=this._convertToCellCoord(r),h=this._convertToCellCoord(n);for(let f=l;f<=u;f++)for(let l=c;l<=h;l++){let c=this.d*l+f;if((!s||s(this._convertFromCellCoord(f),this._convertFromCellCoord(l),this._convertFromCellCoord(f+1),this._convertFromCellCoord(l+1)))&&i.call(this,e,t,r,n,c,a,o,s))return}}_convertFromCellCoord(e){return(e-this.padding)/this.scale}_convertToCellCoord(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let e=this.cells,t=3+this.cells.length+1+1,r=0;for(let e=0;e=0)continue;let a=e[n];i[n]=wi[r].shallow.indexOf(n)>=0?a:Si(a,t)}e instanceof Error&&(i.message=e.message)}if(i.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==r&&(i.$name=r),i}function Ei(e){if(Mi(e))return e;if(Array.isArray(e))return e.map(Ei);if("object"!=typeof e)throw new Error("can't deserialize object of type "+typeof e);let t=Ai(e)||"Object";if(!wi[t])throw new Error(`can't deserialize unregistered class ${t}`);let{klass:r}=wi[t];if(!r)throw new Error(`can't deserialize unregistered class ${t}`);if(r.deserialize)return r.deserialize(e);let n=Object.create(r.prototype);for(let r of Object.keys(e)){if("$name"===r)continue;let i=e[r];n[r]=wi[t].shallow.indexOf(r)>=0?i:Ei(i)}return n}class Ci{constructor(){this.first=!0}update(e,t){let r=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=t):this.lastFloorZoome>=12272&&e<=12287,Li=e=>e>=12288&&e<=12351,Pi=e=>e>=12448&&e<=12543,zi=e=>e>=12736&&e<=12783,Di=e=>e>=12800&&e<=13055,Oi=e=>e>=13056&&e<=13311,Ri=e=>e>=65040&&e<=65055,Fi=e=>e>=65072&&e<=65103,Bi=e=>e>=65104&&e<=65135,ji=e=>e>=65280&&e<=65519;function Ni(e){for(let t of e)if(Wi(t.charCodeAt(0)))return!0;return!1}function Ui(e){for(let t of e)if(!Hi(t.charCodeAt(0)))return!1;return!0}function Vi(e){let t=e.map((e=>{try{return new RegExp(`\\p{sc=${e}}`,"u").source}catch{return null}})).filter((e=>e));return new RegExp(t.join("|"),"u")}let qi=Vi(["Arab","Dupl","Mong","Ougr","Syrc"]);function Hi(e){return!qi.test(String.fromCodePoint(e))}let Gi=Vi(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function Wi(e){return!(746!==e&&747!==e&&(e<4352||!(Fi(e)&&!(e>=65097&&e<=65103)||Oi(e)||zi(e)||!(!Li(e)||e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||Di(e)||Ii(e)||(e=>e>=12688&&e<=12703)(e)||Pi(e)&&12540!==e||!(!ji(e)||65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||!(!Bi(e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||Ri(e)||(e=>e>=19904&&e<=19967)(e)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(e))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(e))||Gi.test(String.fromCodePoint(e)))))}function Zi(e){return!(Wi(e)||(t=e,(e=>e>=128&&e<=255)(t)&&(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||(e=>e>=8192&&e<=8303)(t)&&(8214===t||8224===t||8225===t||8240===t||8241===t||8251===t||8252===t||8258===t||8263===t||8264===t||8265===t||8273===t)||(e=>e>=8448&&e<=8527)(t)||(e=>e>=8528&&e<=8591)(t)||(e=>e>=8960&&e<=9215)(t)&&(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||9003===t||t>=9085&&t<=9114||t>=9150&&t<=9165||9167===t||t>=9169&&t<=9179||t>=9186&&t<=9215)||(e=>e>=9216&&e<=9279)(t)&&9251!==t||(e=>e>=9280&&e<=9311)(t)||(e=>e>=9312&&e<=9471)(t)||(e=>e>=9632&&e<=9727)(t)||(e=>e>=9728&&e<=9983)(t)&&!(t>=9754&&t<=9759)||(e=>e>=11008&&e<=11263)(t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||Li(t)||Pi(t)||(e=>e>=57344&&e<=63743)(t)||Fi(t)||Bi(t)||ji(t)||8734===t||8756===t||8757===t||t>=9984&&t<=10087||t>=10102&&t<=10131||65532===t||65533===t));var t}let Yi=Vi(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function Xi(e){return Yi.test(String.fromCodePoint(e))}function $i(e,t){return!(!t&&Xi(e)||e>=2304&&e<=3583||e>=3840&&e<=4255||(e=>e>=6016&&e<=6143)(e))}function Ki(e){for(let t of e)if(Xi(t.charCodeAt(0)))return!0;return!1}let Ji=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(e){this.pluginStatus=e.pluginStatus,this.pluginURL=e.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(e){this.applyArabicShaping=e.applyArabicShaping,this.processBidirectionalText=e.processBidirectionalText,this.processStyledBidirectionalText=e.processStyledBidirectionalText}isParsed(){return null!=this.applyArabicShaping&&null!=this.processBidirectionalText&&null!=this.processStyledBidirectionalText}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class Qi{constructor(e,t){this.zoom=e,t?(this.now=t.now,this.fadeDuration=t.fadeDuration,this.zoomHistory=t.zoomHistory,this.transition=t.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Ci,this.transition={})}isSupportedScript(e){return function(e,t){for(let r of e)if(!$i(r.charCodeAt(0),t))return!1;return!0}(e,"loaded"===Ji.getRTLTextPluginStatus())}crossFadingFactor(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let e=this.zoom,t=e-Math.floor(e),r=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*t}}}class ea{constructor(e,t){this.property=e,this.value=t,this.expression=function(e,t){if(fn(e))return new Mn(e,t);if(bn(e)){let r=An(e,t);if("error"===r.result)throw new Error(r.value.map((e=>`${e.key}: ${e.message}`)).join(", "));return r.value}{let r=e;return"color"===t.type&&"string"==typeof e?r=Xe.parse(e):"padding"!==t.type||"number"!=typeof e&&!Array.isArray(e)?"variableAnchorOffsetCollection"===t.type&&Array.isArray(e)&&(r=tt.parse(e)):r=Qe.parse(e),{kind:"constant",evaluate:()=>r}}}(void 0===t?e.specification.default:t,e.specification)}isDataDriven(){return"source"===this.expression.kind||"composite"===this.expression.kind}possiblyEvaluate(e,t,r){return this.property.possiblyEvaluate(this,e,t,r)}}class ta{constructor(e){this.property=e,this.value=new ea(e,void 0)}transitioned(e,t){return new na(this.property,this.value,t,x({},e.transition,this.transition),e.now)}untransitioned(){return new na(this.property,this.value,null,{},0)}}class ra{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)}getValue(e){return T(this._values[e].value.value)}setValue(e,t){Object.prototype.hasOwnProperty.call(this._values,e)||(this._values[e]=new ta(this._values[e].property)),this._values[e].value=new ea(this._values[e].property,null===t?void 0:T(t))}getTransition(e){return T(this._values[e].transition)}setTransition(e,t){Object.prototype.hasOwnProperty.call(this._values,e)||(this._values[e]=new ta(this._values[e].property)),this._values[e].transition=T(t)||void 0}serialize(){let e={};for(let t of Object.keys(this._values)){let r=this.getValue(t);void 0!==r&&(e[t]=r);let n=this.getTransition(t);void 0!==n&&(e[`${t}-transition`]=n)}return e}transitioned(e,t){let r=new ia(this._properties);for(let n of Object.keys(this._values))r._values[n]=this._values[n].transitioned(e,t._values[n]);return r}untransitioned(){let e=new ia(this._properties);for(let t of Object.keys(this._values))e._values[t]=this._values[t].untransitioned();return e}}class na{constructor(e,t,r,n,i){this.property=e,this.value=t,this.begin=i+n.delay||0,this.end=this.begin+n.duration||0,e.specification.transition&&(n.delay||n.duration)&&(this.prior=r)}possiblyEvaluate(e,t,r){let n=e.now||0,i=this.value.possiblyEvaluate(e,t,r),a=this.prior;if(a){if(n>this.end)return this.prior=null,i;if(this.value.isDataDriven())return this.prior=null,i;if(n=1)return 1;let t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}(o))}}return i}}class ia{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)}possiblyEvaluate(e,t,r){let n=new sa(this._properties);for(let i of Object.keys(this._values))n._values[i]=this._values[i].possiblyEvaluate(e,t,r);return n}hasTransition(){for(let e of Object.keys(this._values))if(this._values[e].prior)return!0;return!1}}class aa{constructor(e){this._properties=e,this._values=Object.create(e.defaultPropertyValues)}hasValue(e){return void 0!==this._values[e].value}getValue(e){return T(this._values[e].value)}setValue(e,t){this._values[e]=new ea(this._values[e].property,null===t?void 0:T(t))}serialize(){let e={};for(let t of Object.keys(this._values)){let r=this.getValue(t);void 0!==r&&(e[t]=r)}return e}possiblyEvaluate(e,t,r){let n=new sa(this._properties);for(let i of Object.keys(this._values))n._values[i]=this._values[i].possiblyEvaluate(e,t,r);return n}}class oa{constructor(e,t,r){this.property=e,this.value=t,this.parameters=r}isConstant(){return"constant"===this.value.kind}constantOr(e){return"constant"===this.value.kind?this.value.value:e}evaluate(e,t,r,n){return this.property.evaluate(this.value,this.parameters,e,t,r,n)}}class sa{constructor(e){this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)}get(e){return this._values[e]}}class la{constructor(e){this.specification=e}possiblyEvaluate(e,t){if(e.isDataDriven())throw new Error("Value should not be data driven");return e.expression.evaluate(t)}interpolate(e,t,r){let n=Pt[this.specification.type];return n?n(e,t,r):e}}class ca{constructor(e,t){this.specification=e,this.overrides=t}possiblyEvaluate(e,t,r,n){return new oa(this,"constant"===e.expression.kind||"camera"===e.expression.kind?{kind:"constant",value:e.expression.evaluate(t,null,{},r,n)}:e.expression,t)}interpolate(e,t,r){if("constant"!==e.value.kind||"constant"!==t.value.kind)return e;if(void 0===e.value.value||void 0===t.value.value)return new oa(this,{kind:"constant",value:void 0},e.parameters);let n=Pt[this.specification.type];if(n){let i=n(e.value.value,t.value.value,r);return new oa(this,{kind:"constant",value:i},e.parameters)}return e}evaluate(e,t,r,n,i,a){return"constant"===e.kind?e.value:e.evaluate(t,r,n,i,a)}}class ua extends ca{possiblyEvaluate(e,t,r,n){if(void 0===e.value)return new oa(this,{kind:"constant",value:void 0},t);if("constant"===e.expression.kind){let i=e.expression.evaluate(t,null,{},r,n),a="resolvedImage"===e.property.specification.type&&"string"!=typeof i?i.name:i,o=this._calculate(a,a,a,t);return new oa(this,{kind:"constant",value:o},t)}if("camera"===e.expression.kind){let r=this._calculate(e.expression.evaluate({zoom:t.zoom-1}),e.expression.evaluate({zoom:t.zoom}),e.expression.evaluate({zoom:t.zoom+1}),t);return new oa(this,{kind:"constant",value:r},t)}return new oa(this,e.expression,t)}evaluate(e,t,r,n,i,a){if("source"===e.kind){let o=e.evaluate(t,r,n,i,a);return this._calculate(o,o,o,t)}return"composite"===e.kind?this._calculate(e.evaluate({zoom:Math.floor(t.zoom)-1},r,n),e.evaluate({zoom:Math.floor(t.zoom)},r,n),e.evaluate({zoom:Math.floor(t.zoom)+1},r,n),t):e.value}_calculate(e,t,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}}interpolate(e){return e}}class ha{constructor(e){this.specification=e}possiblyEvaluate(e,t,r,n){if(void 0!==e.value){if("constant"===e.expression.kind){let i=e.expression.evaluate(t,null,{},r,n);return this._calculate(i,i,i,t)}return this._calculate(e.expression.evaluate(new Qi(Math.floor(t.zoom-1),t)),e.expression.evaluate(new Qi(Math.floor(t.zoom),t)),e.expression.evaluate(new Qi(Math.floor(t.zoom+1),t)),t)}}_calculate(e,t,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}}interpolate(e){return e}}class fa{constructor(e){this.specification=e}possiblyEvaluate(e,t,r,n){return!!e.expression.evaluate(t,null,{},r,n)}interpolate(){return!1}}class pa{constructor(e){this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let t in e){let r=e[t];r.specification.overridable&&this.overridableProperties.push(t);let n=this.defaultPropertyValues[t]=new ea(r,void 0),i=this.defaultTransitionablePropertyValues[t]=new ta(r);this.defaultTransitioningPropertyValues[t]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=n.possiblyEvaluate({})}}}Ti("DataDrivenProperty",ca),Ti("DataConstantProperty",la),Ti("CrossFadedDataDrivenProperty",ua),Ti("CrossFadedProperty",ha),Ti("ColorRampProperty",fa);let da="-transition";class ma extends Z{constructor(e,t){if(super(),this.id=e.id,this.type=e.type,this._featureFilter={filter:()=>!0,needGeometry:!1},"custom"!==e.type&&(this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),t.layout&&(this._unevaluatedLayout=new aa(t.layout)),t.paint)){this._transitionablePaint=new ra(t.paint);for(let t in e.paint)this.setPaintProperty(t,e.paint[t],{validate:!1});for(let t in e.layout)this.setLayoutProperty(t,e.layout[t],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new sa(t.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(e){return"visibility"===e?this.visibility:this._unevaluatedLayout.getValue(e)}setLayoutProperty(e,t,r={}){null!=t&&this._validate(xi,`layers.${this.id}.layout.${e}`,e,t,r)||("visibility"!==e?this._unevaluatedLayout.setValue(e,t):this.visibility=t)}getPaintProperty(e){return e.endsWith(da)?this._transitionablePaint.getTransition(e.slice(0,-11)):this._transitionablePaint.getValue(e)}setPaintProperty(e,t,r={}){if(null!=t&&this._validate(vi,`layers.${this.id}.paint.${e}`,e,t,r))return!1;if(e.endsWith(da))return this._transitionablePaint.setTransition(e.slice(0,-11),t||void 0),!1;{let r=this._transitionablePaint._values[e],n="cross-faded-data-driven"===r.property.specification["property-type"],i=r.value.isDataDriven(),a=r.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);let o=this._transitionablePaint._values[e].value;return o.isDataDriven()||i||n||this._handleOverridablePaintPropertyUpdate(e,a,o)}}_handleSpecialPaintPropertyUpdate(e){}_handleOverridablePaintPropertyUpdate(e,t,r){return!1}isHidden(e){return!!(this.minzoom&&e=this.maxzoom)||"none"===this.visibility}updateTransitions(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,void 0,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,void 0,t)}serialize(){let e={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),w(e,((e,t)=>!(void 0===e||"layout"===t&&!Object.keys(e).length||"paint"===t&&!Object.keys(e).length)))}_validate(e,t,r,n,i={}){return(!i||!1!==i.validate)&&_i(this,e.call(mi,{key:t,layerType:this.type,objectKey:r,value:n,styleSpec:Y,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let e in this.paint._values){let t=this.paint.get(e);if(t instanceof oa&&ln(t.property.specification)&&("source"===t.value.kind||"composite"===t.value.kind)&&t.value.isStateDependent)return!0}return!1}}let ga={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class ya{constructor(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class va{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}}static deserialize(e){let t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(e){this.reserve(e),this.length=e}reserve(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let t=this.uint8;this._refreshViews(),t&&this.uint8.set(t)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function xa(e,t=1){let r=0,n=0;return{members:e.map((e=>{let i=ga[e.type].BYTES_PER_ELEMENT,a=r=_a(r,Math.max(t,i)),o=e.components||1;return n=Math.max(n,i),r+=i*o,{name:e.name,type:e.type,components:o,offset:a}})),size:_a(r,Math.max(n,t)),alignment:t}}function _a(e,t){return Math.ceil(e/t)*t}class ba extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t){let r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){let n=2*e;return this.int16[n+0]=t,this.int16[n+1]=r,e}}ba.prototype.bytesPerElement=4,Ti("StructArrayLayout2i4",ba);class wa extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)}emplace(e,t,r,n){let i=3*e;return this.int16[i+0]=t,this.int16[i+1]=r,this.int16[i+2]=n,e}}wa.prototype.bytesPerElement=6,Ti("StructArrayLayout3i6",wa);class Ta extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r,n)}emplace(e,t,r,n,i){let a=4*e;return this.int16[a+0]=t,this.int16[a+1]=r,this.int16[a+2]=n,this.int16[a+3]=i,e}}Ta.prototype.bytesPerElement=8,Ti("StructArrayLayout4i8",Ta);class ka extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n,i,a)}emplace(e,t,r,n,i,a,o){let s=6*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,e}}ka.prototype.bytesPerElement=12,Ti("StructArrayLayout2i4i12",ka);class Aa extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n,i,a)}emplace(e,t,r,n,i,a,o){let s=4*e,l=8*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.uint8[l+4]=n,this.uint8[l+5]=i,this.uint8[l+6]=a,this.uint8[l+7]=o,e}}Aa.prototype.bytesPerElement=8,Ti("StructArrayLayout2i4ub8",Aa);class Ma extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t){let r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){let n=2*e;return this.float32[n+0]=t,this.float32[n+1]=r,e}}Ma.prototype.bytesPerElement=8,Ti("StructArrayLayout2f8",Ma);class Sa extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a,o,s,l,c){let u=this.length;return this.resize(u+1),this.emplace(u,e,t,r,n,i,a,o,s,l,c)}emplace(e,t,r,n,i,a,o,s,l,c,u){let h=10*e;return this.uint16[h+0]=t,this.uint16[h+1]=r,this.uint16[h+2]=n,this.uint16[h+3]=i,this.uint16[h+4]=a,this.uint16[h+5]=o,this.uint16[h+6]=s,this.uint16[h+7]=l,this.uint16[h+8]=c,this.uint16[h+9]=u,e}}Sa.prototype.bytesPerElement=20,Ti("StructArrayLayout10ui20",Sa);class Ea extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a,o,s,l,c,u,h){let f=this.length;return this.resize(f+1),this.emplace(f,e,t,r,n,i,a,o,s,l,c,u,h)}emplace(e,t,r,n,i,a,o,s,l,c,u,h,f){let p=12*e;return this.int16[p+0]=t,this.int16[p+1]=r,this.int16[p+2]=n,this.int16[p+3]=i,this.uint16[p+4]=a,this.uint16[p+5]=o,this.uint16[p+6]=s,this.uint16[p+7]=l,this.int16[p+8]=c,this.int16[p+9]=u,this.int16[p+10]=h,this.int16[p+11]=f,e}}Ea.prototype.bytesPerElement=24,Ti("StructArrayLayout4i4ui4i24",Ea);class Ca extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)}emplace(e,t,r,n){let i=3*e;return this.float32[i+0]=t,this.float32[i+1]=r,this.float32[i+2]=n,e}}Ca.prototype.bytesPerElement=12,Ti("StructArrayLayout3f12",Ca);class Ia extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.uint32[1*e+0]=t,e}}Ia.prototype.bytesPerElement=4,Ti("StructArrayLayout1ul4",Ia);class La extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a,o,s,l){let c=this.length;return this.resize(c+1),this.emplace(c,e,t,r,n,i,a,o,s,l)}emplace(e,t,r,n,i,a,o,s,l,c){let u=10*e,h=5*e;return this.int16[u+0]=t,this.int16[u+1]=r,this.int16[u+2]=n,this.int16[u+3]=i,this.int16[u+4]=a,this.int16[u+5]=o,this.uint32[h+3]=s,this.uint16[u+8]=l,this.uint16[u+9]=c,e}}La.prototype.bytesPerElement=20,Ti("StructArrayLayout6i1ul2ui20",La);class Pa extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n,i,a)}emplace(e,t,r,n,i,a,o){let s=6*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,e}}Pa.prototype.bytesPerElement=12,Ti("StructArrayLayout2i2i2i12",Pa);class za extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i){let a=this.length;return this.resize(a+1),this.emplace(a,e,t,r,n,i)}emplace(e,t,r,n,i,a){let o=4*e,s=8*e;return this.float32[o+0]=t,this.float32[o+1]=r,this.float32[o+2]=n,this.int16[s+6]=i,this.int16[s+7]=a,e}}za.prototype.bytesPerElement=16,Ti("StructArrayLayout2f1f2i16",za);class Da extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n,i,a)}emplace(e,t,r,n,i,a,o){let s=16*e,l=4*e,c=8*e;return this.uint8[s+0]=t,this.uint8[s+1]=r,this.float32[l+1]=n,this.float32[l+2]=i,this.int16[c+6]=a,this.int16[c+7]=o,e}}Da.prototype.bytesPerElement=16,Ti("StructArrayLayout2ub2f2i16",Da);class Oa extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)}emplace(e,t,r,n){let i=3*e;return this.uint16[i+0]=t,this.uint16[i+1]=r,this.uint16[i+2]=n,e}}Oa.prototype.bytesPerElement=6,Ti("StructArrayLayout3ui6",Oa);class Ra extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a,o,s,l,c,u,h,f,p,d,m,g){let y=this.length;return this.resize(y+1),this.emplace(y,e,t,r,n,i,a,o,s,l,c,u,h,f,p,d,m,g)}emplace(e,t,r,n,i,a,o,s,l,c,u,h,f,p,d,m,g,y){let v=24*e,x=12*e,_=48*e;return this.int16[v+0]=t,this.int16[v+1]=r,this.uint16[v+2]=n,this.uint16[v+3]=i,this.uint32[x+2]=a,this.uint32[x+3]=o,this.uint32[x+4]=s,this.uint16[v+10]=l,this.uint16[v+11]=c,this.uint16[v+12]=u,this.float32[x+7]=h,this.float32[x+8]=f,this.uint8[_+36]=p,this.uint8[_+37]=d,this.uint8[_+38]=m,this.uint32[x+10]=g,this.int16[v+22]=y,e}}Ra.prototype.bytesPerElement=48,Ti("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Ra);class Fa extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a,o,s,l,c,u,h,f,p,d,m,g,y,v,x,_,b,w,T,k,A,M,S){let E=this.length;return this.resize(E+1),this.emplace(E,e,t,r,n,i,a,o,s,l,c,u,h,f,p,d,m,g,y,v,x,_,b,w,T,k,A,M,S)}emplace(e,t,r,n,i,a,o,s,l,c,u,h,f,p,d,m,g,y,v,x,_,b,w,T,k,A,M,S,E){let C=32*e,I=16*e;return this.int16[C+0]=t,this.int16[C+1]=r,this.int16[C+2]=n,this.int16[C+3]=i,this.int16[C+4]=a,this.int16[C+5]=o,this.int16[C+6]=s,this.int16[C+7]=l,this.uint16[C+8]=c,this.uint16[C+9]=u,this.uint16[C+10]=h,this.uint16[C+11]=f,this.uint16[C+12]=p,this.uint16[C+13]=d,this.uint16[C+14]=m,this.uint16[C+15]=g,this.uint16[C+16]=y,this.uint16[C+17]=v,this.uint16[C+18]=x,this.uint16[C+19]=_,this.uint16[C+20]=b,this.uint16[C+21]=w,this.uint16[C+22]=T,this.uint32[I+12]=k,this.float32[I+13]=A,this.float32[I+14]=M,this.uint16[C+30]=S,this.uint16[C+31]=E,e}}Fa.prototype.bytesPerElement=64,Ti("StructArrayLayout8i15ui1ul2f2ui64",Fa);class Ba extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.float32[1*e+0]=t,e}}Ba.prototype.bytesPerElement=4,Ti("StructArrayLayout1f4",Ba);class ja extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)}emplace(e,t,r,n){let i=3*e;return this.uint16[6*e+0]=t,this.float32[i+1]=r,this.float32[i+2]=n,e}}ja.prototype.bytesPerElement=12,Ti("StructArrayLayout1ui2f12",ja);class Na extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)}emplace(e,t,r,n){let i=4*e;return this.uint32[2*e+0]=t,this.uint16[i+2]=r,this.uint16[i+3]=n,e}}Na.prototype.bytesPerElement=8,Ti("StructArrayLayout1ul2ui8",Na);class Ua extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t){let r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){let n=2*e;return this.uint16[n+0]=t,this.uint16[n+1]=r,e}}Ua.prototype.bytesPerElement=4,Ti("StructArrayLayout2ui4",Ua);class Va extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.uint16[1*e+0]=t,e}}Va.prototype.bytesPerElement=2,Ti("StructArrayLayout1ui2",Va);class qa extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,n){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r,n)}emplace(e,t,r,n,i){let a=4*e;return this.float32[a+0]=t,this.float32[a+1]=r,this.float32[a+2]=n,this.float32[a+3]=i,e}}qa.prototype.bytesPerElement=16,Ti("StructArrayLayout4f16",qa);class Ha extends ya{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new a(this.anchorPointX,this.anchorPointY)}}Ha.prototype.size=20;class Ga extends La{get(e){return new Ha(this,e)}}Ti("CollisionBoxArray",Ga);class Wa extends ya{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(e){this._structArray.uint8[this._pos1+37]=e}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(e){this._structArray.uint8[this._pos1+38]=e}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(e){this._structArray.uint32[this._pos4+10]=e}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}Wa.prototype.size=48;class Za extends Ra{get(e){return new Wa(this,e)}}Ti("PlacedSymbolArray",Za);class Ya extends ya{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(e){this._structArray.uint32[this._pos4+12]=e}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}Ya.prototype.size=64;class Xa extends Fa{get(e){return new Ya(this,e)}}Ti("SymbolInstanceArray",Xa);class $a extends Ba{getoffsetX(e){return this.float32[1*e+0]}}Ti("GlyphOffsetArray",$a);class Ka extends wa{getx(e){return this.int16[3*e+0]}gety(e){return this.int16[3*e+1]}gettileUnitDistanceFromAnchor(e){return this.int16[3*e+2]}}Ti("SymbolLineVertexArray",Ka);class Ja extends ya{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}Ja.prototype.size=12;class Qa extends ja{get(e){return new Ja(this,e)}}Ti("TextAnchorOffsetArray",Qa);class eo extends ya{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}eo.prototype.size=8;class to extends Na{get(e){return new eo(this,e)}}Ti("FeatureIndexArray",to);class ro extends ba{}class no extends ba{}class io extends ba{}class ao extends ka{}class oo extends Aa{}class so extends Ma{}class lo extends Sa{}class co extends Ea{}class uo extends Ca{}class ho extends Ia{}class fo extends Pa{}class po extends Da{}class mo extends Oa{}class go extends Ua{}let yo=xa([{name:"a_pos",components:2,type:"Int16"}],4),{members:vo}=yo;class xo{constructor(e=[]){this.segments=e}prepareSegment(e,t,r,n){let i=this.segments[this.segments.length-1];return e>xo.MAX_VERTEX_ARRAY_LENGTH&&A(`Max vertices per segment is ${xo.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${e}`),(!i||i.vertexLength+e>xo.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==n)&&(i={vertexOffset:t.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==n&&(i.sortKey=n),this.segments.push(i)),i}get(){return this.segments}destroy(){for(let e of this.segments)for(let t in e.vaos)e.vaos[t].destroy()}static simpleSegment(e,t,r,n){return new xo([{vertexOffset:e,primitiveOffset:t,vertexLength:r,primitiveLength:n,vaos:{},sortKey:0}])}}function _o(e,t){return 256*(e=y(Math.floor(e),0,255))+y(Math.floor(t),0,255)}xo.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Ti("SegmentVector",xo);let bo=xa([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var wo={exports:{}},To=function(e,t){var r,n,i,a,o,s,l,c;for(n=e.length-(r=3&e.length),i=t,o=3432918353,s=461845907,c=0;c>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(a>>>16)&65535)<<16);switch(l=0,r){case 3:l^=(255&e.charCodeAt(c+2))<<16;case 2:l^=(255&e.charCodeAt(c+1))<<8;case 1:i^=l=(65535&(l=(l=(65535&(l^=255&e.charCodeAt(c)))*o+(((l>>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return i^=e.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0},ko=function(e,t){for(var r,n=e.length,i=t^n,a=0;n>=4;)r=1540483477*(65535&(r=255&e.charCodeAt(a)|(255&e.charCodeAt(++a))<<8|(255&e.charCodeAt(++a))<<16|(255&e.charCodeAt(++a))<<24))+((1540483477*(r>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),n-=4,++a;switch(n){case 3:i^=(255&e.charCodeAt(a+2))<<16;case 2:i^=(255&e.charCodeAt(a+1))<<8;case 1:i=1540483477*(65535&(i^=255&e.charCodeAt(a)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0};wo.exports=To,wo.exports.murmur3=To,wo.exports.murmur2=ko;var Ao=r(wo.exports);class Mo{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(e,t,r,n){this.ids.push(So(e)),this.positions.push(t,r,n)}getPositions(e){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let t=So(e),r=0,n=this.ids.length-1;for(;r>1;this.ids[e]>=t?n=e:r=e+1}let i=[];for(;this.ids[r]===t;)i.push({index:this.positions[3*r],start:this.positions[3*r+1],end:this.positions[3*r+2]}),r++;return i}static serialize(e,t){let r=new Float64Array(e.ids),n=new Uint32Array(e.positions);return Eo(r,n,0,r.length-1),t&&t.push(r.buffer,n.buffer),{ids:r,positions:n}}static deserialize(e){let t=new Mo;return t.ids=e.ids,t.positions=e.positions,t.indexed=!0,t}}function So(e){let t=+e;return!isNaN(t)&&t<=Number.MAX_SAFE_INTEGER?t:Ao(String(e))}function Eo(e,t,r,n){for(;r>1],a=r-1,o=n+1;for(;;){do{a++}while(e[a]i);if(a>=o)break;Co(e,a,o),Co(t,3*a,3*o),Co(t,3*a+1,3*o+1),Co(t,3*a+2,3*o+2)}o-r`u_${e}`)),this.type=r}setUniform(e,t,r){e.set(r.constantOr(this.value))}getBinding(e,t,r){return"color"===this.type?new zo(e,t):new Lo(e,t)}}class Fo{constructor(e,t){this.uniformNames=t.map((e=>`u_${e}`)),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(e,t){this.pixelRatioFrom=t.pixelRatio,this.pixelRatioTo=e.pixelRatio,this.patternFrom=t.tlbr,this.patternTo=e.tlbr}setUniform(e,t,r,n){let i="u_pattern_to"===n?this.patternTo:"u_pattern_from"===n?this.patternFrom:"u_pixel_ratio_to"===n?this.pixelRatioTo:"u_pixel_ratio_from"===n?this.pixelRatioFrom:null;i&&e.set(i)}getBinding(e,t,r){return"u_pattern"===r.substr(0,9)?new Po(e,t):new Lo(e,t)}}class Bo{constructor(e,t,r,n){this.expression=e,this.type=r,this.maxValue=0,this.paintVertexAttributes=t.map((e=>({name:`a_${e}`,type:"Float32",components:"color"===r?2:1,offset:0}))),this.paintVertexArray=new n}populatePaintArray(e,t,r,n,i){let a=this.paintVertexArray.length,o=this.expression.evaluate(new Qi(0),t,{},n,[],i);this.paintVertexArray.resize(e),this._setPaintValue(a,e,o)}updatePaintArray(e,t,r,n){let i=this.expression.evaluate({zoom:0},r,n);this._setPaintValue(e,t,i)}_setPaintValue(e,t,r){if("color"===this.type){let n=Oo(r);for(let r=e;r`u_${e}_t`)),this.type=r,this.useIntegerZoom=n,this.zoom=i,this.maxValue=0,this.paintVertexAttributes=t.map((e=>({name:`a_${e}`,type:"Float32",components:"color"===r?4:2,offset:0}))),this.paintVertexArray=new a}populatePaintArray(e,t,r,n,i){let a=this.expression.evaluate(new Qi(this.zoom),t,{},n,[],i),o=this.expression.evaluate(new Qi(this.zoom+1),t,{},n,[],i),s=this.paintVertexArray.length;this.paintVertexArray.resize(e),this._setPaintValue(s,e,a,o)}updatePaintArray(e,t,r,n){let i=this.expression.evaluate({zoom:this.zoom},r,n),a=this.expression.evaluate({zoom:this.zoom+1},r,n);this._setPaintValue(e,t,i,a)}_setPaintValue(e,t,r,n){if("color"===this.type){let i=Oo(r),a=Oo(n);for(let r=e;r`#define HAS_UNIFORM_${e}`)))}return e}getBinderAttributes(){let e=[];for(let t in this.binders){let r=this.binders[t];if(r instanceof Bo||r instanceof jo)for(let t=0;t!0){this.programConfigurations={};for(let n of e)this.programConfigurations[n.id]=new Uo(n,t,r);this.needsUpload=!1,this._featureMap=new Mo,this._bufferOffset=0}populatePaintArrays(e,t,r,n,i,a){for(let r in this.programConfigurations)this.programConfigurations[r].populatePaintArrays(e,t,n,i,a);void 0!==t.id&&this._featureMap.add(t.id,r,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,t,r,n){for(let i of r)this.needsUpload=this.programConfigurations[i.id].updatePaintArrays(e,this._featureMap,t,i,n)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(let t in this.programConfigurations)this.programConfigurations[t].upload(e);this.needsUpload=!1}}destroy(){for(let e in this.programConfigurations)this.programConfigurations[e].destroy()}}function qo(e,t){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[e]||[e.replace(`${t}-`,"").replace(/-/g,"_")]}function Ho(e,t,r){let n={color:{source:Ma,composite:qa},number:{source:Ba,composite:Ma}},i={"line-pattern":{source:lo,composite:lo},"fill-pattern":{source:lo,composite:lo},"fill-extrusion-pattern":{source:lo,composite:lo}}[e];return i&&i[r]||n[t][r]}Ti("ConstantBinder",Ro),Ti("CrossFadedConstantBinder",Fo),Ti("SourceExpressionBinder",Bo),Ti("CrossFadedCompositeBinder",No),Ti("CompositeExpressionBinder",jo),Ti("ProgramConfiguration",Uo,{omit:["_buffers"]}),Ti("ProgramConfigurationSet",Vo);let Go,Wo,Zo=8192,Yo=Math.pow(2,14)-1,Xo=-Yo-1;function $o(e){let t=Zo/e.extent,r=e.loadGeometry();for(let e=0;er.x+1||ar.y+1)&&A("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return r}function Ko(e,t){return{type:e.type,id:e.id,properties:e.properties,geometry:t?$o(e):[]}}function Jo(e,t,r,n,i){e.emplaceBack(2*t+(n+1)/2,2*r+(i+1)/2)}class Qo{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((e=>e.id)),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new no,this.indexArray=new mo,this.segments=new xo,this.programConfigurations=new Vo(e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter((e=>e.isStateDependent())).map((e=>e.id))}populate(e,t,r){let n=this.layers[0],i=[],a=null,o=!1;"circle"===n.type&&(a=n.layout.get("circle-sort-key"),o=!a.isConstant());for(let{feature:t,id:n,index:s,sourceLayerIndex:l}of e){let e=this.layers[0]._featureFilter.needGeometry,c=Ko(t,e);if(!this.layers[0]._featureFilter.filter(new Qi(this.zoom),c,r))continue;let u=o?a.evaluate(c,{},r):void 0,h={id:n,properties:t.properties,type:t.type,sourceLayerIndex:l,index:s,geometry:e?c.geometry:$o(t),patterns:{},sortKey:u};i.push(h)}o&&i.sort(((e,t)=>e.sortKey-t.sortKey));for(let n of i){let{geometry:i,index:a,sourceLayerIndex:o}=n,s=e[a].feature;this.addFeature(n,i,a,r),t.featureIndex.insert(s,i,a,o,this.index)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,vo),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(e,t,r,n){for(let r of t)for(let t of r){let r=t.x,n=t.y;if(r<0||r>=Zo||n<0||n>=Zo)continue;let i=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),a=i.vertexLength;Jo(this.layoutVertexArray,r,n,-1,-1),Jo(this.layoutVertexArray,r,n,1,-1),Jo(this.layoutVertexArray,r,n,1,1),Jo(this.layoutVertexArray,r,n,-1,1),this.indexArray.emplaceBack(a,a+1,a+2),this.indexArray.emplaceBack(a,a+3,a+2),i.vertexLength+=4,i.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{},n)}}function es(e,t){for(let r=0;r1){if(is(e,t))return!0;for(let n=0;n1?r:r.sub(t)._mult(i)._add(t))}function ls(e,t){let r,n,i,a=!1;for(let o=0;ot.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(a=!a)}return a}function cs(e,t){let r=!1;for(let n=0,i=e.length-1;nt.y!=o.y>t.y&&t.x<(o.x-a.x)*(t.y-a.y)/(o.y-a.y)+a.x&&(r=!r)}return r}function us(e,t,r){let n=r[0],i=r[2];if(e.xi.x&&t.x>i.x||e.yi.y&&t.y>i.y)return!1;let a=M(e,t,r[0]);return a!==M(e,t,r[1])||a!==M(e,t,r[2])||a!==M(e,t,r[3])}function hs(e,t,r){let n=t.paint.get(e).value;return"constant"===n.kind?n.value:r.programConfigurations.get(t.id).getMaxValue(e)}function fs(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function ps(e,t,r,n,i){if(!t[0]&&!t[1])return e;let o=a.convert(t)._mult(i);"viewport"===r&&o._rotate(-n);let s=[];for(let t=0;tTs(e,p)))),f=u?c*o:c;var p;for(let e of n)for(let t of e){let e=u?t:Ts(t,s),r=f,n=bs([],[t.x,t.y,0,1],s);if("viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")?r*=n[3]/a.cameraToCenterDistance:"map"===this.paint.get("circle-pitch-scale")&&"viewport"===this.paint.get("circle-pitch-alignment")&&(r*=a.cameraToCenterDistance/n[3]),ts(h,e,r))return!0}return!1}}function Ts(e,t){let r=bs([],[e.x,e.y,0,1],t);return new a(r[0]/r[3],r[1]/r[3])}class ks extends Qo{}let As;Ti("HeatmapBucket",ks,{omit:["layers"]});var Ms={get paint(){return As=As||new pa({"heatmap-radius":new ca(Y.paint_heatmap["heatmap-radius"]),"heatmap-weight":new ca(Y.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new la(Y.paint_heatmap["heatmap-intensity"]),"heatmap-color":new fa(Y.paint_heatmap["heatmap-color"]),"heatmap-opacity":new la(Y.paint_heatmap["heatmap-opacity"])})}};function Ss(e,{width:t,height:r},n,i){if(i){if(i instanceof Uint8ClampedArray)i=new Uint8Array(i.buffer);else if(i.length!==t*r*n)throw new RangeError(`mismatched image size. expected: ${i.length} but got: ${t*r*n}`)}else i=new Uint8Array(t*r*n);return e.width=t,e.height=r,e.data=i,e}function Es(e,{width:t,height:r},n){if(t===e.width&&r===e.height)return;let i=Ss({},{width:t,height:r},n);Cs(e,i,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,t),height:Math.min(e.height,r)},n),e.width=t,e.height=r,e.data=i.data}function Cs(e,t,r,n,i,a){if(0===i.width||0===i.height)return t;if(i.width>e.width||i.height>e.height||r.x>e.width-i.width||r.y>e.height-i.height)throw new RangeError("out of range source coordinates for image copy");if(i.width>t.width||i.height>t.height||n.x>t.width-i.width||n.y>t.height-i.height)throw new RangeError("out of range destination coordinates for image copy");let o=e.data,s=t.data;if(o===s)throw new Error("srcData equals dstData, so image is already copied");for(let l=0;l{t[e.evaluationKey]=a;let o=e.expression.evaluate(t);i.data[r+n+0]=Math.floor(255*o.r/o.a),i.data[r+n+1]=Math.floor(255*o.g/o.a),i.data[r+n+2]=Math.floor(255*o.b/o.a),i.data[r+n+3]=Math.floor(255*o.a)};if(e.clips)for(let t=0,i=0;t80*r){n=1/0,i=1/0;let t=-1/0,o=-1/0;for(let a=r;at&&(t=r),s>o&&(o=s)}a=Math.max(t-n,o-i),a=0!==a?32767/a:0}return Gs(l,c,r,n,i,a,0),c}function qs(e,t,r,n,i){let a;if(i===function(e,t,r,n){let i=0;for(let a=t,o=r-n;a0)for(let i=t;i=t;i-=n)a=ul(i/n|0,e[i],e[i+1],a);return a&&il(a,a.next)&&(hl(a),a=a.next),a}function Hs(e,t){if(!e)return e;t||(t=e);let r,n=e;do{if(r=!1,n.steiner||!il(n,n.next)&&0!==nl(n.prev,n,n.next))n=n.next;else{if(hl(n),n=t=n.prev,n===n.next)break;r=!0}}while(r||n!==t);return t}function Gs(e,t,r,n,i,a,o){if(!e)return;!o&&a&&function(e,t,r,n){let i=e;do{0===i.z&&(i.z=Qs(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){let t,r=1;do{let n,i=e;e=null;let a=null;for(t=0;i;){t++;let o=i,s=0;for(let e=0;e0||l>0&&o;)0!==s&&(0===l||!o||i.z<=o.z)?(n=i,i=i.nextZ,s--):(n=o,o=o.nextZ,l--),a?a.nextZ=n:e=n,n.prevZ=a,a=n;i=o}a.nextZ=null,r*=2}while(t>1)}(i)}(e,n,i,a);let s=e;for(;e.prev!==e.next;){let l=e.prev,c=e.next;if(a?Zs(e,n,i,a):Ws(e))t.push(l.i,e.i,c.i),hl(e),e=c.next,s=c.next;else if((e=c)===s){o?1===o?Gs(e=Ys(Hs(e),t),t,r,n,i,a,2):2===o&&Xs(e,t,r,n,i,a):Gs(Hs(e),t,r,n,i,a,1);break}}}function Ws(e){let t=e.prev,r=e,n=e.next;if(nl(t,r,n)>=0)return!1;let i=t.x,a=r.x,o=n.x,s=t.y,l=r.y,c=n.y,u=ia?i>o?i:o:a>o?a:o,p=s>l?s>c?s:c:l>c?l:c,d=n.next;for(;d!==t;){if(d.x>=u&&d.x<=f&&d.y>=h&&d.y<=p&&tl(i,s,a,l,o,c,d.x,d.y)&&nl(d.prev,d,d.next)>=0)return!1;d=d.next}return!0}function Zs(e,t,r,n){let i=e.prev,a=e,o=e.next;if(nl(i,a,o)>=0)return!1;let s=i.x,l=a.x,c=o.x,u=i.y,h=a.y,f=o.y,p=sl?s>c?s:c:l>c?l:c,g=u>h?u>f?u:f:h>f?h:f,y=Qs(p,d,t,r,n),v=Qs(m,g,t,r,n),x=e.prevZ,_=e.nextZ;for(;x&&x.z>=y&&_&&_.z<=v;){if(x.x>=p&&x.x<=m&&x.y>=d&&x.y<=g&&x!==i&&x!==o&&tl(s,u,l,h,c,f,x.x,x.y)&&nl(x.prev,x,x.next)>=0||(x=x.prevZ,_.x>=p&&_.x<=m&&_.y>=d&&_.y<=g&&_!==i&&_!==o&&tl(s,u,l,h,c,f,_.x,_.y)&&nl(_.prev,_,_.next)>=0))return!1;_=_.nextZ}for(;x&&x.z>=y;){if(x.x>=p&&x.x<=m&&x.y>=d&&x.y<=g&&x!==i&&x!==o&&tl(s,u,l,h,c,f,x.x,x.y)&&nl(x.prev,x,x.next)>=0)return!1;x=x.prevZ}for(;_&&_.z<=v;){if(_.x>=p&&_.x<=m&&_.y>=d&&_.y<=g&&_!==i&&_!==o&&tl(s,u,l,h,c,f,_.x,_.y)&&nl(_.prev,_,_.next)>=0)return!1;_=_.nextZ}return!0}function Ys(e,t){let r=e;do{let n=r.prev,i=r.next.next;!il(n,i)&&al(n,r,r.next,i)&&ll(n,i)&&ll(i,n)&&(t.push(n.i,r.i,i.i),hl(r),hl(r.next),r=e=i),r=r.next}while(r!==e);return Hs(r)}function Xs(e,t,r,n,i,a){let o=e;do{let e=o.next.next;for(;e!==o.prev;){if(o.i!==e.i&&rl(o,e)){let s=cl(o,e);return o=Hs(o,o.next),s=Hs(s,s.next),Gs(o,t,r,n,i,a,0),void Gs(s,t,r,n,i,a,0)}e=e.next}o=o.next}while(o!==e)}function $s(e,t){return e.x-t.x}function Ks(e,t){let r=function(e,t){let r,n=t,i=e.x,a=e.y,o=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){let e=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(e<=i&&e>o&&(o=e,r=n.x=n.x&&n.x>=l&&i!==n.x&&tl(ar.x||n.x===r.x&&Js(r,n)))&&(r=n,u=t)}n=n.next}while(n!==s);return r}(e,t);if(!r)return t;let n=cl(r,e);return Hs(n,n.next),Hs(r,r.next)}function Js(e,t){return nl(e.prev,e,t.prev)<0&&nl(t.next,e,e.next)<0}function Qs(e,t,r,n,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function el(e){let t=e,r=e;do{(t.x=(e-o)*(a-s)&&(e-o)*(n-s)>=(r-o)*(t-s)&&(r-o)*(a-s)>=(i-o)*(n-s)}function rl(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){let r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&al(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(e,t)&&(ll(e,t)&&ll(t,e)&&function(e,t){let r=e,n=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do{r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}(e,t)&&(nl(e.prev,e,t.prev)||nl(e,t.prev,t))||il(e,t)&&nl(e.prev,e,e.next)>0&&nl(t.prev,t,t.next)>0)}function nl(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function il(e,t){return e.x===t.x&&e.y===t.y}function al(e,t,r,n){let i=sl(nl(e,t,r)),a=sl(nl(e,t,n)),o=sl(nl(r,n,e)),s=sl(nl(r,n,t));return i!==a&&o!==s||!(0!==i||!ol(e,r,t))||!(0!==a||!ol(e,n,t))||!(0!==o||!ol(r,e,n))||!(0!==s||!ol(r,t,n))}function ol(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function sl(e){return e>0?1:e<0?-1:0}function ll(e,t){return nl(e.prev,e,e.next)<0?nl(e,t,e.next)>=0&&nl(e,e.prev,t)>=0:nl(e,t,e.prev)<0||nl(e,e.next,t)<0}function cl(e,t){let r=fl(e.i,e.x,e.y),n=fl(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function ul(e,t,r,n){let i=fl(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function hl(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function fl(e,t,r){return{i:e,x:t,y:r,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function pl(e,t,r){let n=r.patternDependencies,i=!1;for(let r of t){let t=r.paint.get(`${e}-pattern`);t.isConstant()||(i=!0);let a=t.constantOr(null);a&&(i=!0,n[a.to]=!0,n[a.from]=!0)}return i}function dl(e,t,r,n,i){let a=i.patternDependencies;for(let o of t){let t=o.paint.get(`${e}-pattern`).value;if("constant"!==t.kind){let e=t.evaluate({zoom:n-1},r,{},i.availableImages),s=t.evaluate({zoom:n},r,{},i.availableImages),l=t.evaluate({zoom:n+1},r,{},i.availableImages);e=e&&e.name?e.name:e,s=s&&s.name?s.name:s,l=l&&l.name?l.name:l,a[e]=!0,a[s]=!0,a[l]=!0,r.patterns[o.id]={min:e,mid:s,max:l}}}return r}class ml{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((e=>e.id)),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new io,this.indexArray=new mo,this.indexArray2=new go,this.programConfigurations=new Vo(e.layers,e.zoom),this.segments=new xo,this.segments2=new xo,this.stateDependentLayerIds=this.layers.filter((e=>e.isStateDependent())).map((e=>e.id))}populate(e,t,r){this.hasPattern=pl("fill",this.layers,t);let n=this.layers[0].layout.get("fill-sort-key"),i=!n.isConstant(),a=[];for(let{feature:o,id:s,index:l,sourceLayerIndex:c}of e){let e=this.layers[0]._featureFilter.needGeometry,u=Ko(o,e);if(!this.layers[0]._featureFilter.filter(new Qi(this.zoom),u,r))continue;let h=i?n.evaluate(u,{},r,t.availableImages):void 0,f={id:s,properties:o.properties,type:o.type,sourceLayerIndex:c,index:l,geometry:e?u.geometry:$o(o),patterns:{},sortKey:h};a.push(f)}i&&a.sort(((e,t)=>e.sortKey-t.sortKey));for(let n of a){let{geometry:i,index:a,sourceLayerIndex:o}=n;if(this.hasPattern){let e=dl("fill",this.layers,n,this.zoom,t);this.patternFeatures.push(e)}else this.addFeature(n,i,a,r,{});t.featureIndex.insert(e[a].feature,i,a,o,this.index)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r)}addFeatures(e,t,r){for(let e of this.patternFeatures)this.addFeature(e,e.geometry,e.index,t,r)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Us),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.indexBuffer2=e.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(e,t,r,n,i){for(let e of _r(t,500)){let t=0;for(let r of e)t+=r.length;let r=this.segments.prepareSegment(t,this.layoutVertexArray,this.indexArray),n=r.vertexLength,i=[],a=[];for(let t of e){if(0===t.length)continue;t!==e[0]&&a.push(i.length/2);let r=this.segments2.prepareSegment(t.length,this.layoutVertexArray,this.indexArray2),n=r.vertexLength;this.layoutVertexArray.emplaceBack(t[0].x,t[0].y),this.indexArray2.emplaceBack(n+t.length-1,n),i.push(t[0].x),i.push(t[0].y);for(let e=1;e>3}if(i--,1===n||2===n)a+=e.readSVarint(),o+=e.readSVarint(),1===n&&(t&&s.push(t),t=[]),t.push(new wl(a,o));else{if(7!==n)throw new Error("unknown command "+n);t&&t.push(t[0].clone())}}return t&&s.push(t),s},kl.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,r=1,n=0,i=0,a=0,o=1/0,s=-1/0,l=1/0,c=-1/0;e.pos>3}if(n--,1===r||2===r)(i+=e.readSVarint())s&&(s=i),(a+=e.readSVarint())c&&(c=a);else if(7!==r)throw new Error("unknown command "+r)}return[o,l,s,c]},kl.prototype.toGeoJSON=function(e,t,r){var n,i,a=this.extent*Math.pow(2,r),o=this.extent*e,s=this.extent*t,l=this.loadGeometry(),c=kl.types[this.type];function u(e){for(var t=0;t>3;t=1===n?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null}return t}(r))}Cl.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new Sl(this._pbf,t,this.extent,this._keys,this._values)};var Ll=El;function Pl(e,t,r){if(3===e){var n=new Ll(r,r.readVarint()+r.pos);n.length&&(t[n.name]=n)}}bl.VectorTile=function(e,t){this.layers=e.readFields(Pl,{},t)},bl.VectorTileFeature=Tl,bl.VectorTileLayer=El;let zl,Dl=bl.VectorTileFeature.types,Ol=Math.pow(2,13);function Rl(e,t,r,n,i,a,o,s){e.emplaceBack(t,r,2*Math.floor(n*Ol)+o,i*Ol*2,a*Ol*2,Math.round(s))}class Fl{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((e=>e.id)),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new ao,this.centroidVertexArray=new ro,this.indexArray=new mo,this.programConfigurations=new Vo(e.layers,e.zoom),this.segments=new xo,this.stateDependentLayerIds=this.layers.filter((e=>e.isStateDependent())).map((e=>e.id))}populate(e,t,r){this.features=[],this.hasPattern=pl("fill-extrusion",this.layers,t);for(let{feature:n,id:i,index:a,sourceLayerIndex:o}of e){let e=this.layers[0]._featureFilter.needGeometry,s=Ko(n,e);if(!this.layers[0]._featureFilter.filter(new Qi(this.zoom),s,r))continue;let l={id:i,sourceLayerIndex:o,index:a,geometry:e?s.geometry:$o(n),properties:n.properties,type:n.type,patterns:{}};this.hasPattern?this.features.push(dl("fill-extrusion",this.layers,l,this.zoom,t)):this.addFeature(l,l.geometry,a,r,{}),t.featureIndex.insert(n,l.geometry,a,o,this.index,!0)}}addFeatures(e,t,r){for(let e of this.features){let{geometry:n}=e;this.addFeature(e,n,e.index,t,r)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r)}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.centroidVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,_l),this.centroidVertexBuffer=e.createVertexBuffer(this.centroidVertexArray,xl.members,!0),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(e,t,r,n,i){for(let r of _r(t,500)){let t={x:0,y:0,vertexCount:0},n=0;for(let e of r)n+=e.length;let i=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(let e of r){if(0===e.length||jl(e))continue;let r=0;for(let n=0;n=1){let o=e[n-1];if(!Bl(a,o)){i.vertexLength+4>xo.MAX_VERTEX_ARRAY_LENGTH&&(i=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let e=a.sub(o)._perp()._unit(),n=o.dist(a);r+n>32768&&(r=0),Rl(this.layoutVertexArray,a.x,a.y,e.x,e.y,0,0,r),Rl(this.layoutVertexArray,a.x,a.y,e.x,e.y,0,1,r),t.x+=2*a.x,t.y+=2*a.y,t.vertexCount+=2,r+=n,Rl(this.layoutVertexArray,o.x,o.y,e.x,e.y,0,0,r),Rl(this.layoutVertexArray,o.x,o.y,e.x,e.y,0,1,r),t.x+=2*o.x,t.y+=2*o.y,t.vertexCount+=2;let s=i.vertexLength;this.indexArray.emplaceBack(s,s+2,s+1),this.indexArray.emplaceBack(s+1,s+2,s+3),i.vertexLength+=4,i.primitiveLength+=2}}}}if(i.vertexLength+n>xo.MAX_VERTEX_ARRAY_LENGTH&&(i=this.segments.prepareSegment(n,this.layoutVertexArray,this.indexArray)),"Polygon"!==Dl[e.type])continue;let a=[],o=[],s=i.vertexLength;for(let e of r)if(0!==e.length){e!==r[0]&&o.push(a.length/2);for(let r=0;rZo)||e.y===t.y&&(e.y<0||e.y>Zo)}function jl(e){return e.every((e=>e.x<0))||e.every((e=>e.x>Zo))||e.every((e=>e.y<0))||e.every((e=>e.y>Zo))}Ti("FillExtrusionBucket",Fl,{omit:["layers","features"]});var Nl={get paint(){return zl=zl||new pa({"fill-extrusion-opacity":new la(Y["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new ca(Y["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new la(Y["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new la(Y["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new ua(Y["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new ca(Y["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new ca(Y["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new la(Y["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class Ul extends ma{constructor(e){super(e,Nl)}createBucket(e){return new Fl(e)}queryRadius(){return fs(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(e,t,r,n,i,o,s,l){let c=ps(e,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),o.angle,s),u=this.paint.get("fill-extrusion-height").evaluate(t,r),h=this.paint.get("fill-extrusion-base").evaluate(t,r),f=function(e,t){let r=[];for(let n of e){let e=[n.x,n.y,0,1];bs(e,e,t),r.push(new a(e[0]/e[3],e[1]/e[3]))}return r}(c,l),p=function(e,t,r,n){let i=[],o=[],s=n[8]*t,l=n[9]*t,c=n[10]*t,u=n[11]*t,h=n[8]*r,f=n[9]*r,p=n[10]*r,d=n[11]*r;for(let t of e){let e=[],r=[];for(let i of t){let t=i.x,o=i.y,m=n[0]*t+n[4]*o+n[12],g=n[1]*t+n[5]*o+n[13],y=n[2]*t+n[6]*o+n[14],v=n[3]*t+n[7]*o+n[15],x=y+c,_=v+u,b=m+h,w=g+f,T=y+p,k=v+d,A=new a((m+s)/_,(g+l)/_);A.z=x/_,e.push(A);let M=new a(b/k,w/k);M.z=T/k,r.push(M)}i.push(e),o.push(r)}return[i,o]}(n,h,u,l);return function(e,t,r){let n=1/0;rs(r,t)&&(n=ql(r,t[0]));for(let i=0;ie.id)),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach((e=>{this.gradients[e.id]={}})),this.layoutVertexArray=new oo,this.layoutVertexArray2=new so,this.indexArray=new mo,this.programConfigurations=new Vo(e.layers,e.zoom),this.segments=new xo,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter((e=>e.isStateDependent())).map((e=>e.id))}populate(e,t,r){this.hasPattern=pl("line",this.layers,t);let n=this.layers[0].layout.get("line-sort-key"),i=!n.isConstant(),a=[];for(let{feature:t,id:o,index:s,sourceLayerIndex:l}of e){let e=this.layers[0]._featureFilter.needGeometry,c=Ko(t,e);if(!this.layers[0]._featureFilter.filter(new Qi(this.zoom),c,r))continue;let u=i?n.evaluate(c,{},r):void 0,h={id:o,properties:t.properties,type:t.type,sourceLayerIndex:l,index:s,geometry:e?c.geometry:$o(t),patterns:{},sortKey:u};a.push(h)}i&&a.sort(((e,t)=>e.sortKey-t.sortKey));for(let n of a){let{geometry:i,index:a,sourceLayerIndex:o}=n;if(this.hasPattern){let e=dl("line",this.layers,n,this.zoom,t);this.patternFeatures.push(e)}else this.addFeature(n,i,a,r,{});t.featureIndex.insert(e[a].feature,i,a,o,this.index)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r)}addFeatures(e,t,r){for(let e of this.patternFeatures)this.addFeature(e,e.geometry,e.index,t,r)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=e.createVertexBuffer(this.layoutVertexArray2,Xl)),this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Zl),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(e){if(e.properties&&Object.prototype.hasOwnProperty.call(e.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(e.properties,"mapbox_clip_end"))return{start:+e.properties.mapbox_clip_start,end:+e.properties.mapbox_clip_end}}addFeature(e,t,r,n,i){let a=this.layers[0].layout,o=a.get("line-join").evaluate(e,{}),s=a.get("line-cap"),l=a.get("line-miter-limit"),c=a.get("line-round-limit");this.lineClips=this.lineFeatureClips(e);for(let r of t)this.addLine(r,e,o,s,l,c);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,i,n)}addLine(e,t,r,n,i,a){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let t=0;t=2&&e[s-1].equals(e[s-2]);)s--;let l=0;for(;l0;if(b&&t>l){let e=c.dist(u);if(e>2*d){let t=c.sub(c.sub(u)._mult(d/e)._round());this.updateDistance(u,t),this.addCurrentVertex(t,f,0,0,m),u=t}}let T=u&&h,k=T?r:o?"butt":n;if(T&&"round"===k&&(xi&&(k="bevel"),"bevel"===k&&(x>2&&(k="flipbevel"),x100)g=p.mult(-1);else{let e=x*f.add(p).mag()/f.sub(p).mag();g._perp()._mult(e*(w?-1:1))}this.addCurrentVertex(c,g,0,0,m),this.addCurrentVertex(c,g.mult(-1),0,0,m)}else if("bevel"===k||"fakeround"===k){let e=-Math.sqrt(x*x-1),t=w?e:0,r=w?0:e;if(u&&this.addCurrentVertex(c,f,t,r,m),"fakeround"===k){let e=Math.round(180*_/Math.PI/20);for(let t=1;t2*d){let t=c.add(h.sub(c)._mult(d/e)._round());this.updateDistance(c,t),this.addCurrentVertex(t,p,0,0,m),c=t}}}}addCurrentVertex(e,t,r,n,i,a=!1){let o=t.y*n-t.x,s=-t.y-t.x*n;this.addHalfVertex(e,t.x+t.y*r,t.y-t.x*r,a,!1,r,i),this.addHalfVertex(e,o,s,a,!0,-n,i),this.distance>Jl/2&&0===this.totalDistance&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(e,t,r,n,i,a))}addHalfVertex({x:e,y:t},r,n,i,a,o,s){let l=.5*(this.lineClips?this.scaledDistance*(Jl-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((e<<1)+(i?1:0),(t<<1)+(a?1:0),Math.round(63*r)+128,Math.round(63*n)+128,1+(0===o?0:o<0?-1:1)|(63&l)<<2,l>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let c=s.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,c),s.primitiveLength++),a?this.e2=c:this.e1=c}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(e,t){this.distance+=e.dist(t),this.updateScaledDistance()}}Ti("LineBucket",Ql,{omit:["layers","patternFeatures"]});var ec={get paint(){return Gl=Gl||new pa({"line-opacity":new ca(Y.paint_line["line-opacity"]),"line-color":new ca(Y.paint_line["line-color"]),"line-translate":new la(Y.paint_line["line-translate"]),"line-translate-anchor":new la(Y.paint_line["line-translate-anchor"]),"line-width":new ca(Y.paint_line["line-width"]),"line-gap-width":new ca(Y.paint_line["line-gap-width"]),"line-offset":new ca(Y.paint_line["line-offset"]),"line-blur":new ca(Y.paint_line["line-blur"]),"line-dasharray":new ha(Y.paint_line["line-dasharray"]),"line-pattern":new ua(Y.paint_line["line-pattern"]),"line-gradient":new fa(Y.paint_line["line-gradient"])})},get layout(){return Hl=Hl||new pa({"line-cap":new la(Y.layout_line["line-cap"]),"line-join":new ca(Y.layout_line["line-join"]),"line-miter-limit":new la(Y.layout_line["line-miter-limit"]),"line-round-limit":new la(Y.layout_line["line-round-limit"]),"line-sort-key":new ca(Y.layout_line["line-sort-key"])})}};class tc extends ca{possiblyEvaluate(e,t){return t=new Qi(Math.floor(t.zoom),{now:t.now,fadeDuration:t.fadeDuration,zoomHistory:t.zoomHistory,transition:t.transition}),super.possiblyEvaluate(e,t)}evaluate(e,t,r,n){return t=x({},t,{zoom:Math.floor(t.zoom)}),super.evaluate(e,t,r,n)}}let rc;class nc extends ma{constructor(e){super(e,ec),this.gradientVersion=0,rc||(rc=new tc(ec.paint.properties["line-width"].specification),rc.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(e){if("line-gradient"===e){let e=this.gradientExpression();this.stepInterpolant=!(void 0===e._styleExpression)&&e._styleExpression.expression instanceof At,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(e,t){super.recalculate(e,t),this.paint._values["line-floorwidth"]=rc.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)}createBucket(e){return new Ql(e)}queryRadius(e){let t=e,r=ic(hs("line-width",this,t),hs("line-gap-width",this,t)),n=hs("line-offset",this,t);return r/2+Math.abs(n)+fs(this.paint.get("line-translate"))}queryIntersectsFeature(e,t,r,n,i,o,s){let l=ps(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),o.angle,s),c=s/2*ic(this.paint.get("line-width").evaluate(t,r),this.paint.get("line-gap-width").evaluate(t,r)),u=this.paint.get("line-offset").evaluate(t,r);return u&&(n=function(e,t){let r=[];for(let n=0;n=3)for(let t=0;t0?t+2*e:e}let ac=xa([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),oc=xa([{name:"a_projected_pos",components:3,type:"Float32"}],4);xa([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let sc=xa([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);xa([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);let lc=xa([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),cc=xa([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function uc(e,t,r){return e.sections.forEach((e=>{e.text=function(e,t,r){let n=t.layout.get("text-transform").evaluate(r,{});return"uppercase"===n?e=e.toLocaleUpperCase():"lowercase"===n&&(e=e.toLocaleLowerCase()),Ji.applyArabicShaping&&(e=Ji.applyArabicShaping(e)),e}(e.text,t,r)})),e}xa([{name:"triangle",components:3,type:"Uint16"}]),xa([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),xa([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),xa([{type:"Float32",name:"offsetX"}]),xa([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),xa([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);let hc={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var fc=24,pc=gc,dc=function(e,t,r,n,i){var a,o,s=8*i-n-1,l=(1<>1,u=-7,h=r?i-1:0,f=r?-1:1,p=e[t+h];for(h+=f,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=256*a+e[t+h],h+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=n;u>0;o=256*o+e[t+h],h+=f,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=c}return(p?-1:1)*o*Math.pow(2,a-n)},mc=function(e,t,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+h>=1?f/l:f*Math.pow(2,1-h))*l>=2&&(o++,l/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(t*l-1)*Math.pow(2,i),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;e[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<0;e[r+p]=255&o,p+=d,o/=256,c-=8);e[r+p-d]|=128*m};function gc(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}gc.Varint=0,gc.Fixed64=1,gc.Bytes=2,gc.Fixed32=5;var yc=4294967296,vc=1/yc,xc=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function _c(e){return e.type===gc.Bytes?e.readVarint()+e.pos:e.pos+1}function bc(e,t,r){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i>=e;i--)r.buf[i+n]=r.buf[i]}function wc(e,t){for(var r=0;r>>8,e[r+2]=t>>>16,e[r+3]=t>>>24}function zc(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}gc.prototype={destroy:function(){this.buf=null},readFields:function(e,t,r){for(r=r||this.length;this.pos>3,a=this.pos;this.type=7&n,e(i,t,this),this.pos===a&&this.skip(n)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=Lc(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=zc(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=Lc(this.buf,this.pos)+Lc(this.buf,this.pos+4)*yc;return this.pos+=8,e},readSFixed64:function(){var e=Lc(this.buf,this.pos)+zc(this.buf,this.pos+4)*yc;return this.pos+=8,e},readFloat:function(){var e=dc(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=dc(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,r,n=this.buf;return t=127&(r=n[this.pos++]),r<128?t:(t|=(127&(r=n[this.pos++]))<<7,r<128?t:(t|=(127&(r=n[this.pos++]))<<14,r<128?t:(t|=(127&(r=n[this.pos++]))<<21,r<128?t:function(e,t,r){var n,i,a=r.buf;if(n=(112&(i=a[r.pos++]))>>4,i<128||(n|=(127&(i=a[r.pos++]))<<3,i<128)||(n|=(127&(i=a[r.pos++]))<<10,i<128)||(n|=(127&(i=a[r.pos++]))<<17,i<128)||(n|=(127&(i=a[r.pos++]))<<24,i<128)||(n|=(1&(i=a[r.pos++]))<<31,i<128))return function(e,t,r){return r?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}(e,n,t);throw new Error("Expected varint not more than 10 bytes")}(t|=(15&(r=n[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var e,t,r,n=this.readVarint()+this.pos,i=this.pos;return this.pos=n,n-i>=12&&xc?(e=this.buf,t=i,r=n,xc.decode(e.subarray(t,r))):function(e,t,r){for(var n="",i=t;i239?4:l>223?3:l>191?2:1;if(i+u>r)break;1===u?l<128&&(c=l):2===u?128==(192&(a=e[i+1]))&&(c=(31&l)<<6|63&a)<=127&&(c=null):3===u?(o=e[i+2],128==(192&(a=e[i+1]))&&128==(192&o)&&((c=(15&l)<<12|(63&a)<<6|63&o)<=2047||c>=55296&&c<=57343)&&(c=null)):4===u&&(o=e[i+2],s=e[i+3],128==(192&(a=e[i+1]))&&128==(192&o)&&128==(192&s)&&((c=(15&l)<<18|(63&a)<<12|(63&o)<<6|63&s)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,u=1):c>65535&&(c-=65536,n+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),n+=String.fromCharCode(c),i+=u}return n}(this.buf,i,n)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==gc.Bytes)return e.push(this.readVarint(t));var r=_c(this);for(e=e||[];this.pos127;);else if(t===gc.Bytes)this.pos=this.readVarint()+this.pos;else if(t===gc.Fixed32)this.pos+=4;else{if(t!==gc.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t268435455||e<0?function(e,t){var r,n,i,a;if(e>=0?(r=e%4294967296|0,n=e/4294967296|0):(n=~(-e/4294967296),4294967295^(r=~(-e%4294967296))?r=r+1|0:(r=0,n=n+1|0)),e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),i=r,(a=t).buf[a.pos++]=127&i|128,i>>>=7,a.buf[a.pos++]=127&i|128,i>>>=7,a.buf[a.pos++]=127&i|128,i>>>=7,a.buf[a.pos++]=127&i|128,a.buf[a.pos]=127&(i>>>=7),function(e,t){var r=(7&e)<<4;t.buf[t.pos++]|=r|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e)))))}(n,t)}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(!!e)},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=function(e,t,r){for(var n,i,a=0;a55295&&n<57344){if(!i){n>56319||a+1===t.length?(e[r++]=239,e[r++]=191,e[r++]=189):i=n;continue}if(n<56320){e[r++]=239,e[r++]=191,e[r++]=189,i=n;continue}n=i-55296<<10|n-56320|65536,i=null}else i&&(e[r++]=239,e[r++]=191,e[r++]=189,i=null);n<128?e[r++]=n:(n<2048?e[r++]=n>>6|192:(n<65536?e[r++]=n>>12|224:(e[r++]=n>>18|240,e[r++]=n>>12&63|128),e[r++]=n>>6&63|128),e[r++]=63&n|128)}return r}(this.buf,e,this.pos);var r=this.pos-t;r>=128&&bc(t,r,this),this.pos=t-1,this.writeVarint(r),this.pos+=r},writeFloat:function(e){this.realloc(4),mc(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),mc(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var r=0;r=128&&bc(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(e,t,r){this.writeTag(e,gc.Bytes),this.writeRawMessage(t,r)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,wc,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,Tc,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,Mc,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,kc,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,Ac,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,Sc,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,Ec,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,Cc,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,Ic,t)},writeBytesField:function(e,t){this.writeTag(e,gc.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,gc.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,gc.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,gc.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,gc.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,gc.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,gc.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,gc.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,gc.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,gc.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,!!t)}};var Dc,Oc=r(pc);function Rc(e,t,r){1===e&&r.readMessage(Fc,t)}function Fc(e,t,r){if(3===e){let{id:e,bitmap:n,width:i,height:a,left:o,top:s,advance:l}=r.readMessage(Bc,{});t.push({id:e,bitmap:new Is({width:i+6,height:a+6},n),metrics:{width:i,height:a,left:o,top:s,advance:l}})}}function Bc(e,t,r){1===e?t.id=r.readVarint():2===e?t.bitmap=r.readBytes():3===e?t.width=r.readVarint():4===e?t.height=r.readVarint():5===e?t.left=r.readSVarint():6===e?t.top=r.readSVarint():7===e&&(t.advance=r.readVarint())}function jc(e){let t=0,r=0;for(let n of e)t+=n.w*n.h,r=Math.max(r,n.w);e.sort(((e,t)=>t.h-e.h));let n=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),r),h:1/0}],i=0,a=0;for(let t of e)for(let e=n.length-1;e>=0;e--){let r=n[e];if(!(t.w>r.w||t.h>r.h)){if(t.x=r.x,t.y=r.y,a=Math.max(a,t.y+t.h),i=Math.max(i,t.x+t.w),t.w===r.w&&t.h===r.h){let t=n.pop();e=0&&r>=e&&Wc[this.text.charCodeAt(r)];r--)t--;this.text=this.text.substring(e,t),this.sectionIndex=this.sectionIndex.slice(e,t)}substring(e,t){let r=new Hc;return r.text=this.text.substring(e,t),r.sectionIndex=this.sectionIndex.slice(e,t),r.sections=this.sections,r}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce(((e,t)=>Math.max(e,this.sections[t].scale)),0)}addTextSection(e,t){this.text+=e.text,this.sections.push(qc.forText(e.scale,e.fontStack||t));let r=this.sections.length-1;for(let t=0;t=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Gc(t,r,n,i,a,o,s,l,c,u,h,f,p,d,m){let g,y=Hc.fromFeature(t,a);f===e.ah.vertical&&y.verticalizePunctuation();let{processBidirectionalText:v,processStyledBidirectionalText:x}=Ji;if(v&&1===y.sections.length){g=[];let e=v(y.toString(),eu(y,u,o,r,i,d));for(let t of e){let e=new Hc;e.text=t,e.sections=y.sections;for(let r=0;r0&&n>w&&(w=n)}else{let e=n[m.fontStack],t=e&&e[y];if(t&&t.rect)T=t.rect,_=t.metrics;else{let e=r[m.fontStack],t=e&&e[y];if(!t)continue;_=t.metrics}v=(a-m.scale)*fc}M?(t.verticalizable=!0,b.push({glyph:y,imageName:k,x:p,y:d+v,vertical:M,scale:m.scale,fontStack:m.fontStack,sectionIndex:g,metrics:_,rect:T}),p+=A*m.scale+u):(b.push({glyph:y,imageName:k,x:p,y:d+v,vertical:M,scale:m.scale,fontStack:m.fontStack,sectionIndex:g,metrics:_,rect:T}),p+=_.advance*m.scale+u)}0!==b.length&&(m=Math.max(p-u,m),ru(b,0,b.length-1,y,w)),p=0;let T=o*a+w;_.lineOffset=Math.max(w,l),d+=T,g=Math.max(T,g),++v}var x;let _=d-Vc,{horizontalAlign:b,verticalAlign:w}=tu(s);(function(e,t,r,n,i,a,o,s,l){let c=(t-r)*i,u=0;u=a!==o?-s*n-Vc:(-n*l+.5)*o;for(let t of e)for(let e of t.positionedGlyphs)e.x+=c,e.y+=u})(t.positionedLines,y,b,w,m,g,o,_,a.length),t.top+=-w*_,t.bottom=t.top+_,t.left+=-b*m,t.right=t.left+m}(b,r,n,i,g,s,l,c,f,u,p,m),!function(e){for(let t of e)if(0!==t.positionedGlyphs.length)return!1;return!0}(_)&&b}let Wc={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Zc={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},Yc={40:!0};function Xc(e,t,r,n,i,a){if(t.imageName){let e=n[t.imageName];return e?e.displaySize[0]*t.scale*fc/a+i:0}{let n=r[t.fontStack],a=n&&n[e];return a?a.metrics.advance*t.scale+i:0}}function $c(e,t,r,n){let i=Math.pow(e-t,2);return n?e=0,c=0;for(let r=0;rc){let e=Math.ceil(a/c);i*=e/o,o=e}return{x1:n,y1:i,x2:n+a,y2:i+o}}function au(e,t,r,n,i,a){let o,s=e.image;if(s.content){let e=s.content,t=s.pixelRatio||1;o=[e[0]/t,e[1]/t,s.displaySize[0]-e[2]/t,s.displaySize[1]-e[3]/t]}let l,c,u,h,f=t.left*a,p=t.right*a;"width"===r||"both"===r?(h=i[0]+f-n[3],c=i[0]+p+n[1]):(h=i[0]+(f+p-s.displaySize[0])/2,c=h+s.displaySize[0]);let d=t.top*a,m=t.bottom*a;return"height"===r||"both"===r?(l=i[1]+d-n[0],u=i[1]+m+n[2]):(l=i[1]+(d+m-s.displaySize[1])/2,u=l+s.displaySize[1]),{image:s,top:l,right:c,bottom:u,left:h,collisionPadding:o}}let ou=128,su=32640;function lu(e,t){let{expression:r}=t;if("constant"===r.kind)return{kind:"constant",layoutSize:r.evaluate(new Qi(e+1))};if("source"===r.kind)return{kind:"source"};{let{zoomStops:t,interpolationType:n}=r,i=0;for(;ie.id)),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=ys([]),this.placementViewportMatrix=ys([]);let r=this.layers[0]._unevaluatedLayout._values;this.textSizeData=lu(this.zoom,r["text-size"]),this.iconSizeData=lu(this.zoom,r["icon-size"]);let n=this.layers[0].layout,i=n.get("symbol-sort-key"),a=n.get("symbol-z-order");this.canOverlap="never"!==cu(n,"text-overlap","text-allow-overlap")||"never"!==cu(n,"icon-overlap","icon-allow-overlap")||n.get("text-ignore-placement")||n.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==a&&!i.isConstant(),this.sortFeaturesByY=("viewport-y"===a||"auto"===a&&!this.sortFeaturesByKey)&&this.canOverlap,"point"===n.get("symbol-placement")&&(this.writingModes=n.get("text-writing-mode").map((t=>e.ah[t]))),this.stateDependentLayerIds=this.layers.filter((e=>e.isStateDependent())).map((e=>e.id)),this.sourceID=t.sourceID}createArrays(){this.text=new yu(new Vo(this.layers,this.zoom,(e=>/^text/.test(e)))),this.icon=new yu(new Vo(this.layers,this.zoom,(e=>/^icon/.test(e)))),this.glyphOffsetArray=new $a,this.lineVertexArray=new Ka,this.symbolInstances=new Xa,this.textAnchorOffsets=new Qa}calculateGlyphDependencies(e,t,r,n,i){for(let a=0;a0)&&("constant"!==o.value.kind||o.value.value.length>0),u="constant"!==l.value.kind||!!l.value.value||Object.keys(l.parameters).length>0,h=a.get("symbol-sort-key");if(this.features=[],!c&&!u)return;let f=r.iconDependencies,p=r.glyphDependencies,d=r.availableImages,m=new Qi(this.zoom);for(let{feature:r,id:s,index:l,sourceLayerIndex:g}of t){let t,y,v=i._featureFilter.needGeometry,x=Ko(r,v);if(!i._featureFilter.filter(m,x,n))continue;if(v||(x.geometry=$o(r)),c){let e=i.getValueAndResolveTokens("text-field",x,n,d),r=Je.factory(e),a=this.hasRTLText=this.hasRTLText||gu(r);(!a||"unavailable"===Ji.getRTLTextPluginStatus()||a&&Ji.isParsed())&&(t=uc(r,i,x))}if(u){let e=i.getValueAndResolveTokens("icon-image",x,n,d);y=e instanceof rt?e:rt.fromString(e)}if(!t&&!y)continue;let _=this.sortFeaturesByKey?h.evaluate(x,{},n):void 0;if(this.features.push({id:s,text:t,icon:y,index:l,sourceLayerIndex:g,geometry:x.geometry,properties:r.properties,type:fu[r.type],sortKey:_}),y&&(f[y.name]=!0),t){let r=o.evaluate(x,{},n).join(","),i="viewport"!==a.get("text-rotation-alignment")&&"point"!==a.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(e.ah.vertical)>=0;for(let e of t.sections)if(e.image)f[e.image.name]=!0;else{let n=Ni(t.toString()),a=e.fontStack||r,o=p[a]=p[a]||{};this.calculateGlyphDependencies(e.text,o,i,this.allowVerticalPlacement,n)}}}"line"===a.get("symbol-placement")&&(this.features=function(e){let t={},r={},n=[],i=0;function a(t){n.push(e[t]),i++}function o(e,t,i){let a=r[e];return delete r[e],r[t]=a,n[a].geometry[0].pop(),n[a].geometry[0]=n[a].geometry[0].concat(i[0]),a}function s(e,r,i){let a=t[r];return delete t[r],t[e]=a,n[a].geometry[0].shift(),n[a].geometry[0]=i[0].concat(n[a].geometry[0]),a}function l(e,t,r){let n=r?t[0][t[0].length-1]:t[0][0];return`${e}:${n.x}:${n.y}`}for(let c=0;ce.geometry))}(this.features)),this.sortFeaturesByKey&&this.features.sort(((e,t)=>e.sortKey-t.sortKey))}update(e,t,r){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,t,this.layers,r),this.icon.programConfigurations.updatePaintArrays(e,t,this.layers,r))}isEmpty(){return 0===this.symbolInstances.length&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(e){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(e),this.iconCollisionBox.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(e,t){let r=this.lineVertexArray.length;if(void 0!==e.segment){let r=e.dist(t[e.segment+1]),n=e.dist(t[e.segment]),i={};for(let n=e.segment+1;n=0;r--)i[r]={x:t[r].x,y:t[r].y,tileUnitDistanceFromAnchor:n},r>0&&(n+=t[r-1].dist(t[r]));for(let e=0;e0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(e,t){let r=e.placedSymbolArray.get(t),n=r.vertexStartIndex+4*r.numGlyphs;for(let t=r.vertexStartIndex;tn[e]-n[t]||i[t]-i[e])),a}addToSortKeyRanges(e,t){let r=this.sortKeyRanges[this.sortKeyRanges.length-1];r&&r.sortKey===t?r.symbolInstanceEnd=e+1:this.sortKeyRanges.push({sortKey:t,symbolInstanceStart:e,symbolInstanceEnd:e+1})}sortFeatures(e){if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let e of this.symbolInstanceIndexes){let t=this.symbolInstances.get(e);this.featureSortOrder.push(t.featureIndex),[t.rightJustifiedTextSymbolIndex,t.centerJustifiedTextSymbolIndex,t.leftJustifiedTextSymbolIndex].forEach(((e,t,r)=>{e>=0&&r.indexOf(e)===t&&this.addIndicesForPlacedSymbol(this.text,e)})),t.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,t.verticalPlacedTextSymbolIndex),t.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,t.placedIconSymbolIndex),t.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,t.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}Ti("SymbolBucket",xu,{omit:["layers","collisionBoxArray","features","compareText"]}),xu.MAX_GLYPHS=65535,xu.addDynamicAttributes=mu;var _u={get paint(){return hu=hu||new pa({"icon-opacity":new ca(Y.paint_symbol["icon-opacity"]),"icon-color":new ca(Y.paint_symbol["icon-color"]),"icon-halo-color":new ca(Y.paint_symbol["icon-halo-color"]),"icon-halo-width":new ca(Y.paint_symbol["icon-halo-width"]),"icon-halo-blur":new ca(Y.paint_symbol["icon-halo-blur"]),"icon-translate":new la(Y.paint_symbol["icon-translate"]),"icon-translate-anchor":new la(Y.paint_symbol["icon-translate-anchor"]),"text-opacity":new ca(Y.paint_symbol["text-opacity"]),"text-color":new ca(Y.paint_symbol["text-color"],{runtimeType:de,getOverride:e=>e.textColor,hasOverride:e=>!!e.textColor}),"text-halo-color":new ca(Y.paint_symbol["text-halo-color"]),"text-halo-width":new ca(Y.paint_symbol["text-halo-width"]),"text-halo-blur":new ca(Y.paint_symbol["text-halo-blur"]),"text-translate":new la(Y.paint_symbol["text-translate"]),"text-translate-anchor":new la(Y.paint_symbol["text-translate-anchor"])})},get layout(){return uu=uu||new pa({"symbol-placement":new la(Y.layout_symbol["symbol-placement"]),"symbol-spacing":new la(Y.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new la(Y.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new ca(Y.layout_symbol["symbol-sort-key"]),"symbol-z-order":new la(Y.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new la(Y.layout_symbol["icon-allow-overlap"]),"icon-overlap":new la(Y.layout_symbol["icon-overlap"]),"icon-ignore-placement":new la(Y.layout_symbol["icon-ignore-placement"]),"icon-optional":new la(Y.layout_symbol["icon-optional"]),"icon-rotation-alignment":new la(Y.layout_symbol["icon-rotation-alignment"]),"icon-size":new ca(Y.layout_symbol["icon-size"]),"icon-text-fit":new la(Y.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new la(Y.layout_symbol["icon-text-fit-padding"]),"icon-image":new ca(Y.layout_symbol["icon-image"]),"icon-rotate":new ca(Y.layout_symbol["icon-rotate"]),"icon-padding":new ca(Y.layout_symbol["icon-padding"]),"icon-keep-upright":new la(Y.layout_symbol["icon-keep-upright"]),"icon-offset":new ca(Y.layout_symbol["icon-offset"]),"icon-anchor":new ca(Y.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new la(Y.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new la(Y.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new la(Y.layout_symbol["text-rotation-alignment"]),"text-field":new ca(Y.layout_symbol["text-field"]),"text-font":new ca(Y.layout_symbol["text-font"]),"text-size":new ca(Y.layout_symbol["text-size"]),"text-max-width":new ca(Y.layout_symbol["text-max-width"]),"text-line-height":new la(Y.layout_symbol["text-line-height"]),"text-letter-spacing":new ca(Y.layout_symbol["text-letter-spacing"]),"text-justify":new ca(Y.layout_symbol["text-justify"]),"text-radial-offset":new ca(Y.layout_symbol["text-radial-offset"]),"text-variable-anchor":new la(Y.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new ca(Y.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new ca(Y.layout_symbol["text-anchor"]),"text-max-angle":new la(Y.layout_symbol["text-max-angle"]),"text-writing-mode":new la(Y.layout_symbol["text-writing-mode"]),"text-rotate":new ca(Y.layout_symbol["text-rotate"]),"text-padding":new la(Y.layout_symbol["text-padding"]),"text-keep-upright":new la(Y.layout_symbol["text-keep-upright"]),"text-transform":new ca(Y.layout_symbol["text-transform"]),"text-offset":new ca(Y.layout_symbol["text-offset"]),"text-allow-overlap":new la(Y.layout_symbol["text-allow-overlap"]),"text-overlap":new la(Y.layout_symbol["text-overlap"]),"text-ignore-placement":new la(Y.layout_symbol["text-ignore-placement"]),"text-optional":new la(Y.layout_symbol["text-optional"])})}};class bu{constructor(e){if(void 0===e.property.overrides)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=e.property.overrides?e.property.overrides.runtimeType:ue,this.defaultValue=e}evaluate(e){if(e.formattedSection){let t=this.defaultValue.property.overrides;if(t&&t.hasOverride(e.formattedSection))return t.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default}eachChild(e){this.defaultValue.isConstant()||e(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Ti("FormatSectionOverride",bu,{omit:["defaultValue"]});class wu extends ma{constructor(e){super(e,_u)}recalculate(e,t){if(super.recalculate(e,t),"auto"===this.layout.get("icon-rotation-alignment")&&(this.layout._values["icon-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]="map"===this.layout.get("text-rotation-alignment")?"map":"viewport"),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){let e=this.layout.get("text-writing-mode");if(e){let t=[];for(let r of e)t.indexOf(r)<0&&t.push(r);this.layout._values["text-writing-mode"]=t}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(e,t,r,n){let i=this.layout.get(e).evaluate(t,{},r,n),a=this._unevaluatedLayout._values[e];return a.isDataDriven()||bn(a.value)||!i?i:(o=t.properties,i.replace(/{([^{}]+)}/g,((e,t)=>o&&t in o?String(o[t]):"")));var o}createBucket(e){return new xu(e)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let e of _u.paint.overridableProperties){if(!wu.hasPaintOverride(this.layout,e))continue;let t=this.paint.get(e),r=new bu(t),n=new _n(r,t.property.specification),i=null;i="constant"===t.value.kind||"source"===t.value.kind?new Tn("source",n):new kn("composite",n,t.value.zoomStops),this.paint._values[e]=new oa(t.property,i,t.parameters)}}_handleOverridablePaintPropertyUpdate(e,t,r){return!(!this.layout||t.isDataDriven()||r.isDataDriven())&&wu.hasPaintOverride(this.layout,e)}static hasPaintOverride(e,t){let r=e.get("text-field"),n=_u.paint.properties[t],i=!1,a=e=>{for(let t of e)if(n.overrides&&n.overrides.hasOverride(t))return void(i=!0)};if("constant"===r.value.kind&&r.value.value instanceof Je)a(r.value.value.sections);else if("source"===r.value.kind){let e=t=>{i||(t instanceof st&&at(t.value)===ve?a(t.value.sections):t instanceof Zt?a(t.sections):t.eachChild(e))},t=r.value;t._styleExpression&&e(t._styleExpression.expression)}return i}}let Tu;var ku={get paint(){return Tu=Tu||new pa({"background-color":new la(Y.paint_background["background-color"]),"background-pattern":new ha(Y.paint_background["background-pattern"]),"background-opacity":new la(Y.paint_background["background-opacity"])})}};class Au extends ma{constructor(e){super(e,ku)}}let Mu;var Su={get paint(){return Mu=Mu||new pa({"raster-opacity":new la(Y.paint_raster["raster-opacity"]),"raster-hue-rotate":new la(Y.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new la(Y.paint_raster["raster-brightness-min"]),"raster-brightness-max":new la(Y.paint_raster["raster-brightness-max"]),"raster-saturation":new la(Y.paint_raster["raster-saturation"]),"raster-contrast":new la(Y.paint_raster["raster-contrast"]),"raster-resampling":new la(Y.paint_raster["raster-resampling"]),"raster-fade-duration":new la(Y.paint_raster["raster-fade-duration"])})}};class Eu extends ma{constructor(e){super(e,Su)}}class Cu extends ma{constructor(e){super(e,{}),this.onAdd=e=>{this.implementation.onAdd&&this.implementation.onAdd(e,e.painter.context.gl)},this.onRemove=e=>{this.implementation.onRemove&&this.implementation.onRemove(e,e.painter.context.gl)},this.implementation=e}is3D(){return"3d"===this.implementation.renderingMode}hasOffscreenPass(){return void 0!==this.implementation.prerender}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class Iu{constructor(e){this._methodToThrottle=e,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((()=>{this._triggered=!1,this._methodToThrottle()}),0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let Lu=6371008.8;class Pu{constructor(e,t){if(isNaN(e)||isNaN(t))throw new Error(`Invalid LngLat object: (${e}, ${t})`);if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Pu(v(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(e){let t=Math.PI/180,r=this.lat*t,n=e.lat*t,i=Math.sin(r)*Math.sin(n)+Math.cos(r)*Math.cos(n)*Math.cos((e.lng-this.lng)*t);return Lu*Math.acos(Math.min(i,1))}static convert(e){if(e instanceof Pu)return e;if(Array.isArray(e)&&(2===e.length||3===e.length))return new Pu(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&"object"==typeof e&&null!==e)return new Pu(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}let zu=2*Math.PI*Lu;function Du(e){return zu*Math.cos(e*Math.PI/180)}function Ou(e){return(180+e)/360}function Ru(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function Fu(e,t){return e/Du(t)}function Bu(e){return 360/Math.PI*Math.atan(Math.exp((180-360*e)*Math.PI/180))-90}class ju{constructor(e,t,r=0){this.x=+e,this.y=+t,this.z=+r}static fromLngLat(e,t=0){let r=Pu.convert(e);return new ju(Ou(r.lng),Ru(r.lat),Fu(t,r.lat))}toLngLat(){return new Pu(360*this.x-180,Bu(this.y))}toAltitude(){return this.z*Du(Bu(this.y))}meterInMercatorCoordinateUnits(){return 1/zu*(e=Bu(this.y),1/Math.cos(e*Math.PI/180));var e}}function Nu(e,t,r){var n=2*Math.PI*6378137/256/Math.pow(2,r);return[e*n-2*Math.PI*6378137/2,t*n-2*Math.PI*6378137/2]}class Uu{constructor(e,t,r){if(i=t,a=r,(n=e)<0||n>25||a<0||a>=Math.pow(2,n)||i<0||i>=Math.pow(2,n))throw new Error(`x=${t}, y=${r}, z=${e} outside of bounds. 0<=x<${Math.pow(2,e)}, 0<=y<${Math.pow(2,e)} 0<=z<=25 `);var n,i,a;this.z=e,this.x=t,this.y=r,this.key=Hu(0,e,e,t,r)}equals(e){return this.z===e.z&&this.x===e.x&&this.y===e.y}url(e,t,r){let n=(a=this.y,o=this.z,s=Nu(256*(i=this.x),256*(a=Math.pow(2,o)-a-1),o),l=Nu(256*(i+1),256*(a+1),o),s[0]+","+s[1]+","+l[0]+","+l[1]);var i,a,o,s,l;let c=function(e,t,r){let n,i="";for(let a=e;a>0;a--)n=1<1?"@2x":"").replace(/{quadkey}/g,c).replace(/{bbox-epsg-3857}/g,n)}isChildOf(e){let t=this.z-e.z;return t>0&&e.x===this.x>>t&&e.y===this.y>>t}getTilePoint(e){let t=Math.pow(2,this.z);return new a((e.x*t-this.x)*Zo,(e.y*t-this.y)*Zo)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Vu{constructor(e,t){this.wrap=e,this.canonical=t,this.key=Hu(e,t.z,t.z,t.x,t.y)}}class qu{constructor(e,t,r,n,i){if(e= z; overscaledZ = ${e}; z = ${r}`);this.overscaledZ=e,this.wrap=t,this.canonical=new Uu(r,+n,+i),this.key=Hu(t,e,r,n,i)}clone(){return new qu(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(e){return this.overscaledZ===e.overscaledZ&&this.wrap===e.wrap&&this.canonical.equals(e.canonical)}scaledTo(e){if(e>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);let t=this.canonical.z-e;return e>this.canonical.z?new qu(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new qu(e,this.wrap,e,this.canonical.x>>t,this.canonical.y>>t)}calculateScaledKey(e,t){if(e>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);let r=this.canonical.z-e;return e>this.canonical.z?Hu(this.wrap*+t,e,this.canonical.z,this.canonical.x,this.canonical.y):Hu(this.wrap*+t,e,e,this.canonical.x>>r,this.canonical.y>>r)}isChildOf(e){if(e.wrap!==this.wrap)return!1;let t=this.canonical.z-e.canonical.z;return 0===e.overscaledZ||e.overscaledZ>t&&e.canonical.y===this.canonical.y>>t}children(e){if(this.overscaledZ>=e)return[new qu(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let t=this.canonical.z+1,r=2*this.canonical.x,n=2*this.canonical.y;return[new qu(t,this.wrap,t,r,n),new qu(t,this.wrap,t,r+1,n),new qu(t,this.wrap,t,r,n+1),new qu(t,this.wrap,t,r+1,n+1)]}isLessThan(e){return this.wrape.wrap)&&(this.overscaledZe.overscaledZ)&&(this.canonical.xe.canonical.x)&&this.canonical.ythis.max&&(this.max=r),r=this.dim+1||t<-1||t>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(t+1)*this.stride+(e+1)}unpack(e,t,r){return e*this.redFactor+t*this.greenFactor+r*this.blueFactor-this.baseShift}getPixels(){return new Ls({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(e,t,r){if(this.dim!==e.dim)throw new Error("dem dimension mismatch");let n=t*this.dim,i=t*this.dim+this.dim,a=r*this.dim,o=r*this.dim+this.dim;switch(t){case-1:n=i-1;break;case 1:i=n+1}switch(r){case-1:a=o-1;break;case 1:o=a+1}let s=-t*this.dim,l=-r*this.dim;for(let t=a;t=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${e} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[e]}}class Zu{constructor(e,t,r,n,i){this.type="Feature",this._vectorTileFeature=e,e._z=t,e._x=r,e._y=n,this.properties=e.properties,this.id=i}get geometry(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(e){this._geometry=e}toJSON(){let e={geometry:this.geometry};for(let t in this)"_geometry"!==t&&"_vectorTileFeature"!==t&&(e[t]=this[t]);return e}}class Yu{constructor(e,t){this.tileID=e,this.x=e.canonical.x,this.y=e.canonical.y,this.z=e.canonical.z,this.grid=new bi(Zo,16,0),this.grid3D=new bi(Zo,16,0),this.featureIndexArray=new to,this.promoteId=t}insert(e,t,r,n,i,a){let o=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,n,i);let s=a?this.grid3D:this.grid;for(let e=0;e=0&&n[3]>=0&&s.insert(o,n[0],n[1],n[2],n[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new bl.VectorTile(new Oc(this.rawTileData)).layers,this.sourceLayerCoder=new Wu(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(e,t,r,n){this.loadVTLayers();let i=e.params||{},o=Zo/e.tileSize/e.scale,s=In(i.filter),l=e.queryGeometry,c=e.queryPadding*o,u=$u(l),h=this.grid.query(u.minX-c,u.minY-c,u.maxX+c,u.maxY+c),f=$u(e.cameraQueryGeometry),p=this.grid3D.query(f.minX-c,f.minY-c,f.maxX+c,f.maxY+c,((t,r,n,i)=>function(e,t,r,n,i){for(let a of e)if(t<=a.x&&r<=a.y&&n>=a.x&&i>=a.y)return!0;let o=[new a(t,r),new a(t,i),new a(n,i),new a(n,r)];if(e.length>2)for(let t of o)if(cs(e,t))return!0;for(let t=0;t(f||(f=$o(t)),r.queryIntersectsFeature(l,t,n,f,this.z,e.transform,o,e.pixelPosMatrix))))}return m}loadMatchingFeature(e,t,r,n,i,a,o,s,l,c,u){let h=this.bucketLayerIDs[t];if(a&&!function(e,t){for(let r=0;r=0)return!0;return!1}(a,h))return;let f=this.sourceLayerCoder.decode(r),p=this.vtLayers[f].feature(n);if(i.needGeometry){let e=Ko(p,!0);if(!i.filter(new Qi(this.tileID.overscaledZ),e,this.tileID.canonical))return}else if(!i.filter(new Qi(this.tileID.overscaledZ),p))return;let d=this.getId(p,f);for(let t=0;t{let o=t instanceof sa?t.get(a):null;return o&&o.evaluate?o.evaluate(r,n,i):o}))}function $u(e){let t=1/0,r=1/0,n=-1/0,i=-1/0;for(let a of e)t=Math.min(t,a.x),r=Math.min(r,a.y),n=Math.max(n,a.x),i=Math.max(i,a.y);return{minX:t,minY:r,maxX:n,maxY:i}}function Ku(e,t){return t-e}function Ju(e,t,r,n,i){let o=[];for(let s=0;s=n&&u.x>=n||(s.x>=n?s=new a(n,s.y+(n-s.x)/(u.x-s.x)*(u.y-s.y))._round():u.x>=n&&(u=new a(n,s.y+(n-s.x)/(u.x-s.x)*(u.y-s.y))._round()),s.y>=i&&u.y>=i||(s.y>=i?s=new a(s.x+(i-s.y)/(u.y-s.y)*(u.x-s.x),i)._round():u.y>=i&&(u=new a(s.x+(i-s.y)/(u.y-s.y)*(u.x-s.x),i)._round()),l&&s.equals(l[l.length-1])||(l=[s],o.push(l)),l.push(u)))))}}return o}Ti("FeatureIndex",Yu,{omit:["rawTileData","sourceLayerCoder"]});class Qu extends a{constructor(e,t,r,n){super(e,t),this.angle=r,void 0!==n&&(this.segment=n)}clone(){return new Qu(this.x,this.y,this.angle,this.segment)}}function eh(e,t,r,n,i){if(void 0===t.segment||0===r)return!0;let a=t,o=t.segment+1,s=0;for(;s>-r/2;){if(o--,o<0)return!1;s-=e[o].dist(a),a=e[o]}s+=e[o].dist(e[o+1]),o++;let l=[],c=0;for(;sn;)c-=l.shift().angleDelta;if(c>i)return!1;o++,s+=t.dist(r)}return!0}function th(e){let t=0;for(let r=0;rc){let u=(c-l)/a,h=Pt.number(n.x,i.x,u),f=Pt.number(n.y,i.y,u),p=new Qu(h,f,i.angleTo(n),r);return p._round(),!o||eh(e,p,s,o,t)?p:void 0}l+=a}}function ah(e,t,r,n,i,a,o,s,l){let c=rh(n,a,o),u=nh(n,i),h=u*o,f=0===e[0].x||e[0].x===l||0===e[0].y||e[0].y===l;return t-h=0&&y=0&&v=0&&f+c<=u){let r=new Qu(y,v,m,t);r._round(),n&&!eh(e,r,a,n,i)||p.push(r)}}h+=d}return s||p.length||o||(p=oh(e,h/2,r,n,i,a,o,!0,l)),p}function sh(e,t,r,n){let i=[],o=e.image,s=o.pixelRatio,l=o.paddedRect.w-2,c=o.paddedRect.h-2,u={x1:e.left,y1:e.top,x2:e.right,y2:e.bottom},h=o.stretchX||[[0,l]],f=o.stretchY||[[0,c]],p=(e,t)=>e+t[1]-t[0],d=h.reduce(p,0),m=f.reduce(p,0),g=l-d,y=c-m,v=0,x=d,_=0,b=m,w=0,T=g,k=0,A=y;if(o.content&&n){let t=o.content,r=t[2]-t[0],n=t[3]-t[1];(o.textFitWidth||o.textFitHeight)&&(u=iu(e)),v=lh(h,0,t[0]),_=lh(f,0,t[1]),x=lh(h,t[0],t[2]),b=lh(f,t[1],t[3]),w=t[0]-v,k=t[1]-_,T=r-x,A=n-b}let M=u.x1,S=u.y1,E=u.x2-M,C=u.y2-S,I=(e,n,i,l)=>{let c=uh(e.stretch-v,x,E,M),u=hh(e.fixed-w,T,e.stretch,d),h=uh(n.stretch-_,b,C,S),f=hh(n.fixed-k,A,n.stretch,m),p=uh(i.stretch-v,x,E,M),g=hh(i.fixed-w,T,i.stretch,d),y=uh(l.stretch-_,b,C,S),I=hh(l.fixed-k,A,l.stretch,m),L=new a(c,h),P=new a(p,h),z=new a(p,y),D=new a(c,y),O=new a(u/s,f/s),R=new a(g/s,I/s),F=t*Math.PI/180;if(F){let e=Math.sin(F),t=Math.cos(F),r=[t,-e,e,t];L._matMult(r),P._matMult(r),D._matMult(r),z._matMult(r)}let B=e.stretch+e.fixed,j=n.stretch+n.fixed;return{tl:L,tr:P,bl:D,br:z,tex:{x:o.paddedRect.x+1+B,y:o.paddedRect.y+1+j,w:i.stretch+i.fixed-B,h:l.stretch+l.fixed-j},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:O,pixelOffsetBR:R,minFontScaleX:T/s/E,minFontScaleY:A/s/C,isSDF:r}};if(n&&(o.stretchX||o.stretchY)){let e=ch(h,g,d),t=ch(f,y,m);for(let r=0;r0&&(n=Math.max(10,n),this.circleDiameter=n)}else{let c=null!==(h=o.image)&&void 0!==h&&h.content&&(o.image.textFitWidth||o.image.textFitHeight)?iu(o):{x1:o.left,y1:o.top,x2:o.right,y2:o.bottom};c.y1=c.y1*s-l[0],c.y2=c.y2*s+l[2],c.x1=c.x1*s-l[3],c.x2=c.x2*s+l[1];let f=o.collisionPadding;if(f&&(c.x1-=f[0]*s,c.y1-=f[1]*s,c.x2+=f[2]*s,c.y2+=f[3]*s),u){let e=new a(c.x1,c.y1),t=new a(c.x2,c.y1),r=new a(c.x1,c.y2),n=new a(c.x2,c.y2),i=u*Math.PI/180;e._rotate(i),t._rotate(i),r._rotate(i),n._rotate(i),c.x1=Math.min(e.x,t.x,r.x,n.x),c.x2=Math.max(e.x,t.x,r.x,n.x),c.y1=Math.min(e.y,t.y,r.y,n.y),c.y2=Math.max(e.y,t.y,r.y,n.y)}e.emplaceBack(t.x,t.y,c.x1,c.y1,c.x2,c.y2,r,n,i)}this.boxEndIndex=e.length}}class ph{constructor(e=[],t=(e,t)=>et?1:0){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let e=(this.length>>1)-1;e>=0;e--)this._down(e)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(0===this.length)return;let e=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){let{data:t,compare:r}=this,n=t[e];for(;e>0;){let i=e-1>>1,a=t[i];if(r(n,a)>=0)break;t[e]=a,e=i}t[e]=n}_down(e){let{data:t,compare:r}=this,n=this.length>>1,i=t[e];for(;e=0)break;t[e]=t[n],e=n}t[e]=i}}function dh(e,t=1,r=!1){let n=1/0,i=1/0,o=-1/0,s=-1/0,l=e[0];for(let e=0;eo)&&(o=t.x),(!e||t.y>s)&&(s=t.y)}let c=Math.min(o-n,s-i),u=c/2,h=new ph([],mh);if(0===c)return new a(n,i);for(let t=n;tf.d||!f.d)&&(f=n,r&&console.log("found best %d after %d probes",Math.round(1e4*n.d)/1e4,p)),n.max-f.d<=t||(u=n.h/2,h.push(new gh(n.p.x-u,n.p.y-u,u,e)),h.push(new gh(n.p.x+u,n.p.y-u,u,e)),h.push(new gh(n.p.x-u,n.p.y+u,u,e)),h.push(new gh(n.p.x+u,n.p.y+u,u,e)),p+=4)}return r&&(console.log(`num probes: ${p}`),console.log(`best distance: ${f.d}`)),f.p}function mh(e,t){return t.max-e.max}function gh(e,t,r,n){this.p=new a(e,t),this.h=r,this.d=function(e,t){let r=!1,n=1/0;for(let i=0;ie.y!=s.y>e.y&&e.x<(s.x-i.x)*(e.y-i.y)/(s.y-i.y)+i.x&&(r=!r),n=Math.min(n,ss(e,i,s))}}return(r?1:-1)*Math.sqrt(n)}(this.p,n),this.max=this.d+this.h*Math.SQRT2}var yh;e.aq=void 0,(yh=e.aq||(e.aq={}))[yh.center=1]="center",yh[yh.left=2]="left",yh[yh.right=3]="right",yh[yh.top=4]="top",yh[yh.bottom=5]="bottom",yh[yh["top-left"]=6]="top-left",yh[yh["top-right"]=7]="top-right",yh[yh["bottom-left"]=8]="bottom-left",yh[yh["bottom-right"]=9]="bottom-right";let vh=Number.POSITIVE_INFINITY;function xh(e,t){return t[1]!==vh?function(e,t,r){let n=0,i=0;switch(t=Math.abs(t),r=Math.abs(r),e){case"top-right":case"top-left":case"top":i=r-7;break;case"bottom-right":case"bottom-left":case"bottom":i=7-r}switch(e){case"top-right":case"bottom-right":case"right":n=-t;break;case"top-left":case"bottom-left":case"left":n=t}return[n,i]}(e,t[0],t[1]):function(e,t){let r=0,n=0;t<0&&(t=0);let i=t/Math.SQRT2;switch(e){case"top-right":case"top-left":n=i-7;break;case"bottom-right":case"bottom-left":n=7-i;break;case"bottom":n=7-t;break;case"top":n=t-7}switch(e){case"top-right":case"bottom-right":r=-i;break;case"top-left":case"bottom-left":r=i;break;case"left":r=t;break;case"right":r=-t}return[r,n]}(e,t[0])}function _h(e,t,r){var n;let i=e.layout,a=null===(n=i.get("text-variable-anchor-offset"))||void 0===n?void 0:n.evaluate(t,{},r);if(a){let e=a.values,t=[];for(let r=0;re*fc));n.startsWith("top")?i[1]-=7:n.startsWith("bottom")&&(i[1]+=7),t[r+1]=i}return new tt(t)}let o=i.get("text-variable-anchor");if(o){let n;n=void 0!==e._unevaluatedLayout.getValue("text-radial-offset")?[i.get("text-radial-offset").evaluate(t,{},r)*fc,vh]:i.get("text-offset").evaluate(t,{},r).map((e=>e*fc));let a=[];for(let e of o)a.push(e,xh(e,n));return new tt(a)}return null}function bh(e){switch(e){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function wh(t,r,n,i,a,o,s,l,c,u,h){let f=o.textMaxSize.evaluate(r,{});void 0===f&&(f=s);let p,d=t.layers[0].layout,m=d.get("icon-offset").evaluate(r,{},h),g=kh(n.horizontal),y=s/24,v=t.tilePixelRatio*y,x=t.tilePixelRatio*f/24,_=t.tilePixelRatio*l,b=t.tilePixelRatio*d.get("symbol-spacing"),w=d.get("text-padding")*t.tilePixelRatio,T=function(e,t,r,n=1){let i=e.get("icon-padding").evaluate(t,{},r),a=i&&i.values;return[a[0]*n,a[1]*n,a[2]*n,a[3]*n]}(d,r,h,t.tilePixelRatio),k=d.get("text-max-angle")/180*Math.PI,M="viewport"!==d.get("text-rotation-alignment")&&"point"!==d.get("symbol-placement"),S="map"===d.get("icon-rotation-alignment")&&"point"!==d.get("symbol-placement"),E=d.get("symbol-placement"),C=b/2,I=d.get("icon-text-fit");i&&"none"!==I&&(t.allowVerticalPlacement&&n.vertical&&(p=au(i,n.vertical,I,d.get("icon-text-fit-padding"),m,y)),g&&(i=au(i,g,I,d.get("icon-text-fit-padding"),m,y)));let L=(l,f)=>{f.x<0||f.x>=Zo||f.y<0||f.y>=Zo||function(t,r,n,i,a,o,s,l,c,u,h,f,p,d,m,g,y,v,x,_,b,w,T,k,M){let S,E,C,I,L=t.addToLineVertexArray(r,n),P=0,z=0,D=0,O=0,R=-1,F=-1,B={},j=Ao("");if(t.allowVerticalPlacement&&i.vertical){let e=l.layout.get("text-rotate").evaluate(b,{},k)+90;C=new fh(c,r,u,h,f,i.vertical,p,d,m,e),s&&(I=new fh(c,r,u,h,f,s,y,v,m,e))}if(a){let n=l.layout.get("icon-rotate").evaluate(b,{}),i="none"!==l.layout.get("icon-text-fit"),o=sh(a,n,T,i),p=s?sh(s,n,T,i):void 0;E=new fh(c,r,u,h,f,a,y,v,!1,n),P=4*o.length;let d=t.iconSizeData,m=null;"source"===d.kind?(m=[ou*l.layout.get("icon-size").evaluate(b,{})],m[0]>su&&A(`${t.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):"composite"===d.kind&&(m=[ou*w.compositeIconSizes[0].evaluate(b,{},k),ou*w.compositeIconSizes[1].evaluate(b,{},k)],(m[0]>su||m[1]>su)&&A(`${t.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),t.addSymbols(t.icon,o,m,_,x,b,e.ah.none,r,L.lineStartIndex,L.lineLength,-1,k),R=t.icon.placedSymbolArray.length-1,p&&(z=4*p.length,t.addSymbols(t.icon,p,m,_,x,b,e.ah.vertical,r,L.lineStartIndex,L.lineLength,-1,k),F=t.icon.placedSymbolArray.length-1)}let N=Object.keys(i.horizontal);for(let n of N){let a=i.horizontal[n];if(!S){j=Ao(a.text);let e=l.layout.get("text-rotate").evaluate(b,{},k);S=new fh(c,r,u,h,f,a,p,d,m,e)}let s=1===a.positionedLines.length;if(D+=Th(t,r,a,o,l,m,b,g,L,i.vertical?e.ah.horizontal:e.ah.horizontalOnly,s?N:[n],B,R,w,k),s)break}i.vertical&&(O+=Th(t,r,i.vertical,o,l,m,b,g,L,e.ah.vertical,["vertical"],B,F,w,k));let U=S?S.boxStartIndex:t.collisionBoxArray.length,V=S?S.boxEndIndex:t.collisionBoxArray.length,q=C?C.boxStartIndex:t.collisionBoxArray.length,H=C?C.boxEndIndex:t.collisionBoxArray.length,G=E?E.boxStartIndex:t.collisionBoxArray.length,W=E?E.boxEndIndex:t.collisionBoxArray.length,Z=I?I.boxStartIndex:t.collisionBoxArray.length,Y=I?I.boxEndIndex:t.collisionBoxArray.length,X=-1,$=(e,t)=>e&&e.circleDiameter?Math.max(e.circleDiameter,t):t;X=$(S,X),X=$(C,X),X=$(E,X),X=$(I,X);let K=X>-1?1:0;K&&(X*=M/fc),t.glyphOffsetArray.length>=xu.MAX_GLYPHS&&A("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==b.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,b.sortKey);let J=_h(l,b,k),[Q,ee]=function(t,r){let n=t.length,i=r?.values;if(i?.length>0)for(let r=0;r=0?B.right:-1,B.center>=0?B.center:-1,B.left>=0?B.left:-1,B.vertical||-1,R,F,j,U,V,q,H,G,W,Z,Y,u,D,O,P,z,K,0,p,X,Q,ee)}(t,f,l,n,i,a,p,t.layers[0],t.collisionBoxArray,r.index,r.sourceLayerIndex,t.index,v,[w,w,w,w],M,c,_,T,S,m,r,o,u,h,s)};if("line"===E)for(let e of Ju(r.geometry,0,0,Zo,Zo)){let r=ah(e,b,k,n.vertical||g,i,24,x,t.overscaling,Zo);for(let n of r)g&&Ah(t,g.text,C,n)||L(e,n)}else if("line-center"===E){for(let e of r.geometry)if(e.length>1){let t=ih(e,k,n.vertical||g,i,24,x);t&&L(e,t)}}else if("Polygon"===r.type)for(let e of _r(r.geometry,0)){let t=dh(e,16);L(e[0],new Qu(t.x,t.y,0))}else if("LineString"===r.type)for(let e of r.geometry)L(e,new Qu(e[0].x,e[0].y,0));else if("Point"===r.type)for(let e of r.geometry)for(let t of e)L([t],new Qu(t.x,t.y,0))}function Th(e,t,r,n,i,o,s,l,c,u,h,f,p,d,m){let g=function(e,t,r,n,i,o,s,l){let c=n.layout.get("text-rotate").evaluate(o,{})*Math.PI/180,u=[];for(let e of t.positionedLines)for(let n of e.positionedGlyphs){if(!n.rect)continue;let o=n.rect||{},h=4,f=!0,p=1,d=0,m=(i||l)&&n.vertical,g=n.metrics.advance*n.scale/2;if(l&&t.verticalizable&&(d=e.lineOffset/2-(n.imageName?-(fc-n.metrics.width*n.scale)/2:(n.scale-1)*fc)),n.imageName){let e=s[n.imageName];f=e.sdf,p=e.pixelRatio,h=1/p}let y=i?[n.x+g,n.y]:[0,0],v=i?[0,0]:[n.x+g+r[0],n.y+r[1]-d],x=[0,0];m&&(x=v,v=[0,0]);let _=n.metrics.isDoubleResolution?2:1,b=(n.metrics.left-h)*n.scale-g+v[0],w=(-n.metrics.top-h)*n.scale+v[1],T=b+o.w/_*n.scale/p,k=w+o.h/_*n.scale/p,A=new a(b,w),M=new a(T,w),S=new a(b,k),E=new a(T,k);if(m){let e=new a(-g,g-Vc),t=-Math.PI/2,r=12-g,i=new a(22-r,-(n.imageName?r:0)),o=new a(...x);A._rotateAround(t,e)._add(i)._add(o),M._rotateAround(t,e)._add(i)._add(o),S._rotateAround(t,e)._add(i)._add(o),E._rotateAround(t,e)._add(i)._add(o)}if(c){let e=Math.sin(c),t=Math.cos(c),r=[t,-e,e,t];A._matMult(r),M._matMult(r),S._matMult(r),E._matMult(r)}let C=new a(0,0),I=new a(0,0);u.push({tl:A,tr:M,bl:S,br:E,tex:o,writingMode:t.writingMode,glyphOffset:y,sectionIndex:n.sectionIndex,isSDF:f,pixelOffsetTL:C,pixelOffsetBR:I,minFontScaleX:0,minFontScaleY:0})}return u}(0,r,l,i,o,s,n,e.allowVerticalPlacement),y=e.textSizeData,v=null;"source"===y.kind?(v=[ou*i.layout.get("text-size").evaluate(s,{})],v[0]>su&&A(`${e.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):"composite"===y.kind&&(v=[ou*d.compositeTextSizes[0].evaluate(s,{},m),ou*d.compositeTextSizes[1].evaluate(s,{},m)],(v[0]>su||v[1]>su)&&A(`${e.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),e.addSymbols(e.text,g,v,l,o,s,u,t,c.lineStartIndex,c.lineLength,p,m);for(let t of h)f[t]=e.text.placedSymbolArray.length-1;return 4*g.length}function kh(e){for(let t in e)return e[t];return null}function Ah(e,t,r,n){let i=e.compareText;if(t in i){let e=i[t];for(let t=e.length-1;t>=0;t--)if(n.dist(e[t])>4;if(1!==n)throw new Error(`Got v${n} data when expected v1.`);let i=Mh[15&r];if(!i)throw new Error("Unrecognized array type.");let[a]=new Uint16Array(e,2,1),[o]=new Uint32Array(e,4,1);return new Sh(o,a,i,e)}constructor(e,t=64,r=Float64Array,n){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.ArrayType=r,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;let i=Mh.indexOf(this.ArrayType),a=2*e*this.ArrayType.BYTES_PER_ELEMENT,o=e*this.IndexArrayType.BYTES_PER_ELEMENT,s=(8-o%8)%8;if(i<0)throw new Error(`Unexpected typed array class: ${r}.`);n&&n instanceof ArrayBuffer?(this.data=n,this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+o+s,2*e),this._pos=2*e,this._finished=!0):(this.data=new ArrayBuffer(8+a+o+s),this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+o+s,2*e),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+i]),new Uint16Array(this.data,2,1)[0]=t,new Uint32Array(this.data,4,1)[0]=e)}add(e,t){let r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=e,this.coords[this._pos++]=t,r}finish(){let e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return Eh(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,r,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:i,coords:a,nodeSize:o}=this,s=[0,i.length-1,0],l=[];for(;s.length;){let c=s.pop()||0,u=s.pop()||0,h=s.pop()||0;if(u-h<=o){for(let o=h;o<=u;o++){let s=a[2*o],c=a[2*o+1];s>=e&&s<=r&&c>=t&&c<=n&&l.push(i[o])}continue}let f=h+u>>1,p=a[2*f],d=a[2*f+1];p>=e&&p<=r&&d>=t&&d<=n&&l.push(i[f]),(0===c?e<=p:t<=d)&&(s.push(h),s.push(f-1),s.push(1-c)),(0===c?r>=p:n>=d)&&(s.push(f+1),s.push(u),s.push(1-c))}return l}within(e,t,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:n,coords:i,nodeSize:a}=this,o=[0,n.length-1,0],s=[],l=r*r;for(;o.length;){let c=o.pop()||0,u=o.pop()||0,h=o.pop()||0;if(u-h<=a){for(let r=h;r<=u;r++)Ph(i[2*r],i[2*r+1],e,t)<=l&&s.push(n[r]);continue}let f=h+u>>1,p=i[2*f],d=i[2*f+1];Ph(p,d,e,t)<=l&&s.push(n[f]),(0===c?e-r<=p:t-r<=d)&&(o.push(h),o.push(f-1),o.push(1-c)),(0===c?e+r>=p:t+r>=d)&&(o.push(f+1),o.push(u),o.push(1-c))}return s}}function Eh(e,t,r,n,i,a){if(i-n<=r)return;let o=n+i>>1;Ch(e,t,o,n,i,a),Eh(e,t,r,n,o-1,1-a),Eh(e,t,r,o+1,i,1-a)}function Ch(e,t,r,n,i,a){for(;i>n;){if(i-n>600){let o=i-n+1,s=r-n+1,l=Math.log(o),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(o-c)/o)*(s-o/2<0?-1:1);Ch(e,t,r,Math.max(n,Math.floor(r-s*c/o+u)),Math.min(i,Math.floor(r+(o-s)*c/o+u)),a)}let o=t[2*r+a],s=n,l=i;for(Ih(e,t,n,r),t[2*i+a]>o&&Ih(e,t,n,i);so;)l--}t[2*n+a]===o?Ih(e,t,n,l):(l++,Ih(e,t,l,i)),l<=r&&(n=l+1),r<=l&&(i=l-1)}}function Ih(e,t,r,n){Lh(e,r,n),Lh(t,2*r,2*n),Lh(t,2*r+1,2*n+1)}function Lh(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}function Ph(e,t,r,n){let i=e-r,a=t-n;return i*i+a*a}var zh;e.bg=void 0,(zh=e.bg||(e.bg={})).create="create",zh.load="load",zh.fullLoad="fullLoad";let Dh=null,Oh=[],Rh=1e3/60,Fh="loadTime",Bh="fullLoadTime",jh={mark(e){performance.mark(e)},frame(e){let t=e;null!=Dh&&Oh.push(t-Dh),Dh=t},clearMetrics(){Dh=null,Oh=[],performance.clearMeasures(Fh),performance.clearMeasures(Bh);for(let t in e.bg)performance.clearMarks(e.bg[t])},getPerformanceMetrics(){performance.measure(Fh,e.bg.create,e.bg.load),performance.measure(Bh,e.bg.create,e.bg.fullLoad);let t=performance.getEntriesByName(Fh)[0].duration,r=performance.getEntriesByName(Bh)[0].duration,n=Oh.length,i=1/(Oh.reduce(((e,t)=>e+t),0)/n/1e3),a=Oh.filter((e=>e>Rh)).reduce(((e,t)=>e+(t-Rh)/Rh),0);return{loadTime:t,fullLoadTime:r,fps:i,percentDroppedFrames:a/(n+a)*100,totalFrames:n}}};e.$=class extends Ta{},e.A=gs,e.B=yi,e.C=function(e){if(null==E){let t=e.navigator?e.navigator.userAgent:null;E=!!e.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return E},e.D=la,e.E=Z,e.F=class{constructor(e,t){var r,n,i;this.target=e,this.mapId=t,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new Iu((()=>this.process())),this.subscription=(r=this.target,n="message",i=e=>this.receive(e),r.addEventListener(n,i,!1),{unsubscribe:()=>{r.removeEventListener(n,i,!1)}}),this.globalScope=S(self)?e:window}registerMessageHandler(e,t){this.messageHandlers[e]=t}sendAsync(e,t){return new Promise(((r,n)=>{let i=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[i]={resolve:r,reject:n},t&&t.signal.addEventListener("abort",(()=>{delete this.resolveRejects[i];let t={id:i,type:"",origin:location.origin,targetMapId:e.targetMapId,sourceMapId:this.mapId};this.target.postMessage(t)}),{once:!0});let a=[],o=Object.assign(Object.assign({},e),{id:i,sourceMapId:this.mapId,origin:location.origin,data:Si(e.data,a)});this.target.postMessage(o,{transfer:a})}))}receive(e){let t=e.data,r=t.id;if(!("file://"!==t.origin&&"file://"!==location.origin&&"resource://android"!==t.origin&&"resource://android"!==location.origin&&t.origin!==location.origin||t.targetMapId&&this.mapId!==t.targetMapId)){if(""===t.type){delete this.tasks[r];let e=this.abortControllers[r];return delete this.abortControllers[r],void(e&&e.abort())}if(S(self)||t.mustQueue)return this.tasks[r]=t,this.taskQueue.push(r),void this.invoker.trigger();this.processTask(r,t)}}process(){if(0===this.taskQueue.length)return;let e=this.taskQueue.shift(),t=this.tasks[e];delete this.tasks[e],this.taskQueue.length>0&&this.invoker.trigger(),t&&this.processTask(e,t)}processTask(e,r){return t(this,void 0,void 0,(function*(){if(""===r.type){let t=this.resolveRejects[e];return delete this.resolveRejects[e],t?void(r.error?t.reject(Ei(r.error)):t.resolve(Ei(r.data))):void 0}if(!this.messageHandlers[r.type])return void this.completeTask(e,new Error(`Could not find a registered handler for ${r.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let t=Ei(r.data),n=new AbortController;this.abortControllers[e]=n;try{let i=yield this.messageHandlers[r.type](r.sourceMapId,t,n);this.completeTask(e,null,i)}catch(t){this.completeTask(e,t)}}))}completeTask(e,t,r){let n=[];delete this.abortControllers[e];let i={id:e,type:"",sourceMapId:this.mapId,origin:location.origin,error:t?Si(t):null,data:Si(r,n)};this.target.postMessage(i,{transfer:n})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},e.G=B,e.H=function(){var e=new gs(16);return gs!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e},e.I=Nc,e.J=function(e,t,r){var n,i,a,o,s,l,c,u,h,f,p,d,m=r[0],g=r[1],y=r[2];return t===e?(e[12]=t[0]*m+t[4]*g+t[8]*y+t[12],e[13]=t[1]*m+t[5]*g+t[9]*y+t[13],e[14]=t[2]*m+t[6]*g+t[10]*y+t[14],e[15]=t[3]*m+t[7]*g+t[11]*y+t[15]):(i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],h=t[8],f=t[9],p=t[10],d=t[11],e[0]=n=t[0],e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e[6]=c,e[7]=u,e[8]=h,e[9]=f,e[10]=p,e[11]=d,e[12]=n*m+s*g+h*y+t[12],e[13]=i*m+l*g+f*y+t[13],e[14]=a*m+c*g+p*y+t[14],e[15]=o*m+u*g+d*y+t[15]),e},e.K=function(e,t,r){var n=r[0],i=r[1],a=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},e.L=vs,e.M=function(e,t){let r={};for(let n=0;n{let t=window.document.createElement("video");return t.muted=!0,new Promise((r=>{t.onloadstart=()=>{r(t)};for(let r of e){let e=window.document.createElement("source");V(r)||(t.crossOrigin="Anonymous"),e.src=r,t.appendChild(e)}}))},e.a4=function(){return _++},e.a5=Ga,e.a6=xu,e.a7=In,e.a8=Ko,e.a9=Zu,e.aA=function(e){if("custom"===e.type)return new Cu(e);switch(e.type){case"background":return new Au(e);case"circle":return new ws(e);case"fill":return new yl(e);case"fill-extrusion":return new Ul(e);case"heatmap":return new Os(e);case"hillshade":return new Fs(e);case"line":return new nc(e);case"raster":return new Eu(e);case"symbol":return new wu(e)}},e.aB=T,e.aC=function(e,t){if(!e)return[{command:"setStyle",args:[t]}];let r=[];try{if(!K(e.version,t.version))return[{command:"setStyle",args:[t]}];K(e.center,t.center)||r.push({command:"setCenter",args:[t.center]}),K(e.zoom,t.zoom)||r.push({command:"setZoom",args:[t.zoom]}),K(e.bearing,t.bearing)||r.push({command:"setBearing",args:[t.bearing]}),K(e.pitch,t.pitch)||r.push({command:"setPitch",args:[t.pitch]}),K(e.sprite,t.sprite)||r.push({command:"setSprite",args:[t.sprite]}),K(e.glyphs,t.glyphs)||r.push({command:"setGlyphs",args:[t.glyphs]}),K(e.transition,t.transition)||r.push({command:"setTransition",args:[t.transition]}),K(e.light,t.light)||r.push({command:"setLight",args:[t.light]}),K(e.terrain,t.terrain)||r.push({command:"setTerrain",args:[t.terrain]}),K(e.sky,t.sky)||r.push({command:"setSky",args:[t.sky]}),K(e.projection,t.projection)||r.push({command:"setProjection",args:[t.projection]});let n={},i=[];!function(e,t,r,n){let i;for(i in t=t||{},e=e||{})Object.prototype.hasOwnProperty.call(e,i)&&(Object.prototype.hasOwnProperty.call(t,i)||ee(i,r,n));for(i in t)Object.prototype.hasOwnProperty.call(t,i)&&(Object.prototype.hasOwnProperty.call(e,i)?K(e[i],t[i])||("geojson"===e[i].type&&"geojson"===t[i].type&&re(e,t,i)?J(r,{command:"setGeoJSONSourceData",args:[i,t[i].data]}):te(i,t,r,n)):Q(i,t,r))}(e.sources,t.sources,i,n);let a=[];e.layers&&e.layers.forEach((e=>{"source"in e&&n[e.source]?r.push({command:"removeLayer",args:[e.id]}):a.push(e)})),r=r.concat(i),function(e,t,r){t=t||[];let n,i,a,o,s,l=(e=e||[]).map(ie),c=t.map(ie),u=e.reduce(ae,{}),h=t.reduce(ae,{}),f=l.slice(),p=Object.create(null);for(let e=0,t=0;e@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((e,r,n,i)=>{let a=n||i;return t[r]=!a||a.toLowerCase(),""})),t["max-age"]){let e=parseInt(t["max-age"],10);isNaN(e)?delete t["max-age"]:t["max-age"]=e}return t},e.ab=function(e,t){let r=[];for(let n in e)n in t||r.push(n);return r},e.ac=y,e.ad=function(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],c=t[4],u=t[5],h=t[6],f=t[7];return t!==e&&(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[0]=a*i+c*n,e[1]=o*i+u*n,e[2]=s*i+h*n,e[3]=l*i+f*n,e[4]=c*i-a*n,e[5]=u*i-o*n,e[6]=h*i-s*n,e[7]=f*i-l*n,e},e.ae=function(e){var t=new gs(16);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},e.af=bs,e.ag=function(e,t){let r=0,n=0;if("constant"===e.kind)n=e.layoutSize;else if("source"!==e.kind){let{interpolationType:i,minZoom:a,maxZoom:o}=e,s=i?y(zt.interpolationFactor(i,t,a,o),0,1):0;"camera"===e.kind?n=Pt.number(e.minSize,e.maxSize,s):r=s}return{uSizeT:r,uSize:n}},e.ai=function(e,{uSize:t,uSizeT:r},{lowerSize:n,upperSize:i}){return"source"===e.kind?n/ou:"composite"===e.kind?Pt.number(n/ou,i/ou,r):t},e.aj=mu,e.ak=function(e,t,r,n){let i=t.y-e.y,o=t.x-e.x,s=n.y-r.y,l=n.x-r.x,c=s*o-l*i;if(0===c)return null;let u=(l*(e.y-r.y)-s*(e.x-r.x))/c;return new a(e.x+u*o,e.y+u*i)},e.al=Ju,e.am=es,e.an=ys,e.ao=function(e){let t=1/0,r=1/0,n=-1/0,i=-1/0;for(let a of e)t=Math.min(t,a.x),r=Math.min(r,a.y),n=Math.max(n,a.x),i=Math.max(i,a.y);return[t,r,n,i]},e.ap=fc,e.ar=cu,e.as=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],h=t[9],f=t[10],p=t[11],d=t[12],m=t[13],g=t[14],y=t[15],v=r*s-n*o,x=r*l-i*o,_=r*c-a*o,b=n*l-i*s,w=n*c-a*s,T=i*c-a*l,k=u*m-h*d,A=u*g-f*d,M=u*y-p*d,S=h*g-f*m,E=h*y-p*m,C=f*y-p*g,I=v*C-x*E+_*S+b*M-w*A+T*k;return I?(e[0]=(s*C-l*E+c*S)*(I=1/I),e[1]=(i*E-n*C-a*S)*I,e[2]=(m*T-g*w+y*b)*I,e[3]=(f*w-h*T-p*b)*I,e[4]=(l*M-o*C-c*A)*I,e[5]=(r*C-i*M+a*A)*I,e[6]=(g*_-d*T-y*x)*I,e[7]=(u*T-f*_+p*x)*I,e[8]=(o*E-s*M+c*k)*I,e[9]=(n*M-r*E-a*k)*I,e[10]=(d*w-m*_+y*v)*I,e[11]=(h*_-u*w-p*v)*I,e[12]=(s*A-o*S-l*k)*I,e[13]=(r*S-n*A+i*k)*I,e[14]=(m*x-d*b-g*v)*I,e[15]=(u*b-h*x+f*v)*I,e):null},e.at=bh,e.au=tu,e.av=Sh,e.aw=function(){let e={},t=Y.$version;for(let r in Y.$root){let n=Y.$root[r];if(n.required){let i=null;i="version"===r?t:"array"===n.type?[]:{},null!=i&&(e[r]=i)}}return e},e.ax=Ci,e.ay=N,e.az=function(e){e=e.slice();let t=Object.create(null);for(let r=0;r25||n<0||n>=1||r<0||r>=1)},e.bc=function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},e.bd=class extends wa{},e.be=Lu,e.bf=jh,e.bh=j,e.bi=function(e,t){R.REGISTERED_PROTOCOLS[e]=t},e.bj=function(e){delete R.REGISTERED_PROTOCOLS[e]},e.bk=function(e,t){let r={};for(let n=0;ne*fc))}let x=s?"center":n.get("text-justify").evaluate(i,{},t.canonical),_="point"===n.get("symbol-placement")?n.get("text-max-width").evaluate(i,{},t.canonical)*fc:1/0,b=()=>{t.bucket.allowVerticalPlacement&&Ni(a)&&(m.vertical=Gc(g,t.glyphMap,t.glyphPositions,t.imagePositions,h,_,o,d,"left",u,y,e.ah.vertical,!0,p,f))};if(!s&&v){let r=new Set;if("auto"===x)for(let e=0;et(void 0,void 0,void 0,(function*(){if(0===e.byteLength)return createImageBitmap(new ImageData(1,1));let t=new Blob([new Uint8Array(e)],{type:"image/png"});try{return createImageBitmap(t)}catch(e){throw new Error(`Could not load image because of ${e.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}})),e.e=x,e.f=e=>new Promise(((t,r)=>{let n=new Image;n.onload=()=>{t(n),URL.revokeObjectURL(n.src),n.onload=null,window.requestAnimationFrame((()=>{n.src=I}))},n.onerror=()=>r(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));let i=new Blob([new Uint8Array(e)],{type:"image/png"});n.src=e.byteLength?URL.createObjectURL(i):I})),e.g=F,e.h=(e,t)=>U(x(e,{type:"json"}),t),e.i=S,e.j=W,e.k=G,e.l=(e,t)=>U(x(e,{type:"arrayBuffer"}),t),e.m=U,e.n=function(e){return new Oc(e).readFields(Rc,[])},e.o=Is,e.p=jc,e.q=pa,e.r=gi,e.s=V,e.t=_i,e.u=mi,e.v=Y,e.w=A,e.x=function([e,t,r]){return t+=90,t*=Math.PI/180,r*=Math.PI/180,{x:e*Math.cos(t)*Math.sin(r),y:e*Math.sin(t)*Math.sin(r),z:e*Math.cos(r)}},e.y=Pt,e.z=Qi})),r("worker",0,(function(e){class t{constructor(e){this.keyCache={},e&&this.replace(e)}replace(e){this._layerConfigs={},this._layers={},this.update(e,[])}update(t,r){for(let r of t){this._layerConfigs[r.id]=r;let t=this._layers[r.id]=e.aA(r);t._featureFilter=e.a7(t.filter),this.keyCache[r.id]&&delete this.keyCache[r.id]}for(let e of r)delete this.keyCache[e],delete this._layerConfigs[e],delete this._layers[e];this.familiesBySource={};let n=e.bk(Object.values(this._layerConfigs),this.keyCache);for(let e of n){let t=e.map((e=>this._layers[e.id])),r=t[0];if("none"===r.visibility)continue;let n=r.source||"",i=this.familiesBySource[n];i||(i=this.familiesBySource[n]={});let a=r.sourceLayer||"_geojsonTileLayer",o=i[a];o||(o=i[a]=[]),o.push(t)}}}class r{constructor(t){let r={},n=[];for(let e in t){let i=t[e],a=r[e]={};for(let e in i){let t=i[+e];if(!t||0===t.bitmap.width||0===t.bitmap.height)continue;let r={x:0,y:0,w:t.bitmap.width+2,h:t.bitmap.height+2};n.push(r),a[e]={rect:r,metrics:t.metrics}}}let{w:i,h:a}=e.p(n),o=new e.o({width:i||1,height:a||1});for(let n in t){let i=t[n];for(let t in i){let a=i[+t];if(!a||0===a.bitmap.width||0===a.bitmap.height)continue;let s=r[n][t].rect;e.o.copy(a.bitmap,o,{x:0,y:0},{x:s.x+1,y:s.y+1},a.bitmap)}}this.image=o,this.positions=r}}e.bl("GlyphAtlas",r);class n{constructor(t){this.tileID=new e.S(t.tileID.overscaledZ,t.tileID.wrap,t.tileID.canonical.z,t.tileID.canonical.x,t.tileID.canonical.y),this.uid=t.uid,this.zoom=t.zoom,this.pixelRatio=t.pixelRatio,this.tileSize=t.tileSize,this.source=t.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=t.showCollisionBoxes,this.collectResourceTiming=!!t.collectResourceTiming,this.returnDependencies=!!t.returnDependencies,this.promoteId=t.promoteId,this.inFlightDependencies=[]}parse(t,n,a,o){return e._(this,void 0,void 0,(function*(){this.status="parsing",this.data=t,this.collisionBoxArray=new e.a5;let s=new e.bm(Object.keys(t.layers).sort()),l=new e.bn(this.tileID,this.promoteId);l.bucketLayerIDs=[];let c={},u={featureIndex:l,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:a},h=n.familiesBySource[this.source];for(let r in h){let n=t.layers[r];if(!n)continue;1===n.version&&e.w(`Vector tile source "${this.source}" layer "${r}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let o=s.encode(r),f=[];for(let e=0;e=r.maxzoom||"none"!==r.visibility&&(i(t,this.zoom,a),(c[r.id]=r.createBucket({index:l.bucketLayerIDs.length,layers:t,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:o,sourceID:this.source})).populate(f,u,this.tileID.canonical),l.bucketLayerIDs.push(t.map((e=>e.id))))}}let f=e.aF(u.glyphDependencies,(e=>Object.keys(e).map(Number)));this.inFlightDependencies.forEach((e=>e?.abort())),this.inFlightDependencies=[];let p=Promise.resolve({});if(Object.keys(f).length){let e=new AbortController;this.inFlightDependencies.push(e),p=o.sendAsync({type:"GG",data:{stacks:f,source:this.source,tileID:this.tileID,type:"glyphs"}},e)}let d=Object.keys(u.iconDependencies),m=Promise.resolve({});if(d.length){let e=new AbortController;this.inFlightDependencies.push(e),m=o.sendAsync({type:"GI",data:{icons:d,source:this.source,tileID:this.tileID,type:"icons"}},e)}let g=Object.keys(u.patternDependencies),y=Promise.resolve({});if(g.length){let e=new AbortController;this.inFlightDependencies.push(e),y=o.sendAsync({type:"GI",data:{icons:g,source:this.source,tileID:this.tileID,type:"patterns"}},e)}let[v,x,_]=yield Promise.all([p,m,y]),b=new r(v),w=new e.bo(x,_);for(let t in c){let r=c[t];r instanceof e.a6?(i(r.layers,this.zoom,a),e.bp({bucket:r,glyphMap:v,glyphPositions:b.positions,imageMap:x,imagePositions:w.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):r.hasPattern&&(r instanceof e.bq||r instanceof e.br||r instanceof e.bs)&&(i(r.layers,this.zoom,a),r.addFeatures(u,this.tileID.canonical,w.patternPositions))}return this.status="done",{buckets:Object.values(c).filter((e=>!e.isEmpty())),featureIndex:l,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:b.image,imageAtlas:w,glyphMap:this.returnDependencies?v:null,iconMap:this.returnDependencies?x:null,glyphPositions:this.returnDependencies?b.positions:null}}))}}function i(t,r,n){let i=new e.z(r);for(let e of t)e.recalculate(i,n)}class a{constructor(e,t,r){this.actor=e,this.layerIndex=t,this.availableImages=r,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(t,r){return e._(this,void 0,void 0,(function*(){let n=yield e.l(t.request,r);try{return{vectorTile:new e.bt.VectorTile(new e.bu(n.data)),rawData:n.data,cacheControl:n.cacheControl,expires:n.expires}}catch(e){let r=new Uint8Array(n.data),i=`Unable to parse the tile at ${t.request.url}, `;throw i+=31===r[0]&&139===r[1]?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${e.message}`,new Error(i)}}))}loadTile(t){return e._(this,void 0,void 0,(function*(){let r=t.uid,i=!!(t&&t.request&&t.request.collectResourceTiming)&&new e.bv(t.request),a=new n(t);this.loading[r]=a;let o=new AbortController;a.abort=o;try{let n=yield this.loadVectorTile(t,o);if(delete this.loading[r],!n)return null;let s=n.rawData,l={};n.expires&&(l.expires=n.expires),n.cacheControl&&(l.cacheControl=n.cacheControl);let c={};if(i){let e=i.finish();e&&(c.resourceTiming=JSON.parse(JSON.stringify(e)))}a.vectorTile=n.vectorTile;let u=a.parse(n.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[r]=a,this.fetching[r]={rawTileData:s,cacheControl:l,resourceTiming:c};try{let t=yield u;return e.e({rawTileData:s.slice(0)},t,l,c)}finally{delete this.fetching[r]}}catch(e){throw delete this.loading[r],a.status="done",this.loaded[r]=a,e}}))}reloadTile(t){return e._(this,void 0,void 0,(function*(){let r=t.uid;if(!this.loaded||!this.loaded[r])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");let n=this.loaded[r];if(n.showCollisionBoxes=t.showCollisionBoxes,"parsing"===n.status){let t,i=yield n.parse(n.vectorTile,this.layerIndex,this.availableImages,this.actor);if(this.fetching[r]){let{rawTileData:n,cacheControl:a,resourceTiming:o}=this.fetching[r];delete this.fetching[r],t=e.e({rawTileData:n.slice(0)},i,a,o)}else t=i;return t}if("done"===n.status&&n.vectorTile)return n.parse(n.vectorTile,this.layerIndex,this.availableImages,this.actor)}))}abortTile(t){return e._(this,void 0,void 0,(function*(){let e=this.loading,r=t.uid;e&&e[r]&&e[r].abort&&(e[r].abort.abort(),delete e[r])}))}removeTile(t){return e._(this,void 0,void 0,(function*(){this.loaded&&this.loaded[t.uid]&&delete this.loaded[t.uid]}))}}class o{constructor(){this.loaded={}}loadTile(t){return e._(this,void 0,void 0,(function*(){let{uid:r,encoding:n,rawImageData:i,redFactor:a,greenFactor:o,blueFactor:s,baseShift:l}=t,c=i.width+2,u=i.height+2,h=e.b(i)?new e.R({width:c,height:u},yield e.bw(i,-1,-1,c,u)):i,f=new e.bx(r,h,n,a,o,s,l);return this.loaded=this.loaded||{},this.loaded[r]=f,f}))}removeTile(e){let t=this.loaded,r=e.uid;t&&t[r]&&delete t[r]}}function s(e,t){if(0!==e.length){l(e[0],t);for(var r=1;r=Math.abs(s)?r-l+s:s-l+r,r=l}r+n>=0!=!!t&&e.reverse()}var c=e.by((function e(t,r){var n,i=t&&t.type;if("FeatureCollection"===i)for(n=0;n>31}function A(e,t){for(var r=e.loadGeometry(),n=e.type,i=0,a=0,o=r.length,s=0;se},C=Math.fround||(I=new Float32Array(1),e=>(I[0]=+e,I[0]));var I;class L{constructor(e){this.options=Object.assign(Object.create(E),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){let{log:t,minZoom:r,maxZoom:n}=this.options;t&&console.time("total time");let i=`prepare ${e.length} points`;t&&console.time(i),this.points=e;let a=[];for(let t=0;t=r;e--){let r=+Date.now();o=this.trees[e]=this._createTree(this._cluster(o,e)),t&&console.log("z%d: %d clusters in %dms",e,o.numItems,+Date.now()-r)}return t&&console.timeEnd("total time"),this}getClusters(e,t){let r=((e[0]+180)%360+360)%360-180,n=Math.max(-90,Math.min(90,e[1])),i=180===e[2]?180:((e[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,i=180;else if(r>i){let e=this.getClusters([r,n,180,a],t),o=this.getClusters([-180,n,i,a],t);return e.concat(o)}let o=this.trees[this._limitZoom(t)],s=o.range(D(r),O(a),D(i),O(n)),l=o.data,c=[];for(let e of s){let t=this.stride*e;c.push(l[t+5]>1?P(l,t,this.clusterProps):this.points[l[t+3]])}return c}getChildren(e){let t=this._getOriginId(e),r=this._getOriginZoom(e),n="No cluster with the specified id.",i=this.trees[r];if(!i)throw new Error(n);let a=i.data;if(t*this.stride>=a.length)throw new Error(n);let o=this.options.radius/(this.options.extent*Math.pow(2,r-1)),s=i.within(a[t*this.stride],a[t*this.stride+1],o),l=[];for(let t of s){let r=t*this.stride;a[r+4]===e&&l.push(a[r+5]>1?P(a,r,this.clusterProps):this.points[a[r+3]])}if(0===l.length)throw new Error(n);return l}getLeaves(e,t,r){let n=[];return this._appendLeaves(n,e,t=t||10,r=r||0,0),n}getTile(e,t,r){let n=this.trees[this._limitZoom(e)],i=Math.pow(2,e),{extent:a,radius:o}=this.options,s=o/a,l=(r-s)/i,c=(r+1+s)/i,u={features:[]};return this._addTileFeatures(n.range((t-s)/i,l,(t+1+s)/i,c),n.data,t,r,i,u),0===t&&this._addTileFeatures(n.range(1-s/i,l,1,c),n.data,i,r,i,u),t===i-1&&this._addTileFeatures(n.range(0,l,s/i,c),n.data,-1,r,i,u),u.features.length?u:null}getClusterExpansionZoom(e){let t=this._getOriginZoom(e)-1;for(;t<=this.options.maxZoom;){let r=this.getChildren(e);if(t++,1!==r.length)break;e=r[0].properties.cluster_id}return t}_appendLeaves(e,t,r,n,i){let a=this.getChildren(t);for(let t of a){let a=t.properties;if(a&&a.cluster?i+a.point_count<=n?i+=a.point_count:i=this._appendLeaves(e,a.cluster_id,r,n,i):i1;if(u)e=z(t,c,this.clusterProps),s=t[c],l=t[c+1];else{let r=this.points[t[c+3]];e=r.properties;let[n,i]=r.geometry.coordinates;s=D(n),l=O(i)}let h,f={type:1,geometry:[[Math.round(this.options.extent*(s*i-r)),Math.round(this.options.extent*(l*i-n))]],tags:e};h=u||this.options.generateId?t[c+3]:this.points[t[c+3]].id,void 0!==h&&(f.id=h),a.features.push(f)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,t){let{radius:r,extent:n,reduce:i,minPoints:a}=this.options,o=r/(n*Math.pow(2,t)),s=e.data,l=[],c=this.stride;for(let r=0;rt&&(p+=s[r+5])}if(p>f&&p>=a){let e,a=n*f,o=u*f,d=-1,m=(r/c<<5)+(t+1)+this.points.length;for(let n of h){let l=n*c;if(s[l+2]<=t)continue;s[l+2]=t;let u=s[l+5];a+=s[l]*u,o+=s[l+1]*u,s[l+4]=m,i&&(e||(e=this._map(s,r,!0),d=this.clusterProps.length,this.clusterProps.push(e)),i(e,this._map(s,l)))}s[r+4]=m,l.push(a/p,o/p,1/0,m,-1,p),i&&l.push(d)}else{for(let e=0;e1)for(let e of h){let r=e*c;if(!(s[r+2]<=t)){s[r+2]=t;for(let e=0;e>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t,r){if(e[t+5]>1){let n=this.clusterProps[e[t+6]];return r?Object.assign({},n):n}let n=this.points[e[t+3]].properties,i=this.options.map(n);return r&&i===n?Object.assign({},i):i}}function P(e,t,r){return{type:"Feature",id:e[t+3],properties:z(e,t,r),geometry:{type:"Point",coordinates:[(n=e[t],360*(n-.5)),R(e[t+1])]}};var n}function z(e,t,r){let n=e[t+5],i=n>=1e4?`${Math.round(n/1e3)}k`:n>=1e3?Math.round(n/100)/10+"k":n,a=e[t+6],o=-1===a?{}:Object.assign({},r[a]);return Object.assign(o,{cluster:!0,cluster_id:e[t+3],point_count:n,point_count_abbreviated:i})}function D(e){return e/360+.5}function O(e){let t=Math.sin(e*Math.PI/180),r=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return r<0?0:r>1?1:r}function R(e){let t=(180-360*e)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}function F(e,t,r,n){let i,a=n,o=t+(r-t>>1),s=r-t,l=e[t],c=e[t+1],u=e[r],h=e[r+1];for(let n=t+3;na)i=n,a=t;else if(t===a){let e=Math.abs(n-o);en&&(i-t>3&&F(e,t,i,n),e[i+2]=a,r-i>3&&F(e,i,r,n))}function B(e,t,r,n,i,a){let o=i-r,s=a-n;if(0!==o||0!==s){let l=((e-r)*o+(t-n)*s)/(o*o+s*s);l>1?(r=i,n=a):l>0&&(r+=o*l,n+=s*l)}return o=e-r,s=t-n,o*o+s*s}function j(e,t,r,n){let i={id:e??null,type:t,geometry:r,tags:n,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if("Point"===t||"MultiPoint"===t||"LineString"===t)N(i,r);else if("Polygon"===t)N(i,r[0]);else if("MultiLineString"===t)for(let e of r)N(i,e);else if("MultiPolygon"===t)for(let e of r)N(i,e[0]);return i}function N(e,t){for(let r=0;r0&&(o+=n?(i*l-s*a)/2:Math.sqrt(Math.pow(s-i,2)+Math.pow(l-a,2))),i=s,a=l}let s=t.length-3;t[2]=1,F(t,0,s,r),t[s+2]=1,t.size=Math.abs(o),t.start=0,t.end=t.size}function H(e,t,r,n){for(let i=0;i1?1:r}function Z(e,t,r,n,i,a,o,s){if(n/=t,a>=(r/=t)&&o=n)return null;let l=[];for(let t of e){let e=t.geometry,a=t.type,o=0===i?t.minX:t.minY,c=0===i?t.maxX:t.maxY;if(o>=r&&c=n)continue;let u=[];if("Point"===a||"MultiPoint"===a)Y(e,u,r,n,i);else if("LineString"===a)X(e,u,r,n,i,!1,s.lineMetrics);else if("MultiLineString"===a)K(e,u,r,n,i,!1);else if("Polygon"===a)K(e,u,r,n,i,!0);else if("MultiPolygon"===a)for(let t of e){let e=[];K(t,e,r,n,i,!0),e.length&&u.push(e)}if(u.length){if(s.lineMetrics&&"LineString"===a){for(let e of u)l.push(j(t.id,a,e,t.tags));continue}"LineString"!==a&&"MultiLineString"!==a||(1===u.length?(a="LineString",u=u[0]):a="MultiLineString"),"Point"!==a&&"MultiPoint"!==a||(a=3===u.length?"Point":"MultiPoint"),l.push(j(t.id,a,u,t.tags))}}return l.length?l:null}function Y(e,t,r,n,i){for(let a=0;a=r&&o<=n&&J(t,e[a],e[a+1],e[a+2])}}function X(e,t,r,n,i,a,o){let s,l,c=$(e),u=0===i?Q:ee,h=e.start;for(let f=0;fr&&(l=u(c,p,d,g,y,r),o&&(c.start=h+s*l)):v>n?x=r&&(l=u(c,p,d,g,y,r),_=!0),x>n&&v<=n&&(l=u(c,p,d,g,y,n),_=!0),!a&&_&&(o&&(c.end=h+s*l),t.push(c),c=$(e)),o&&(h+=s)}let f=e.length-3,p=e[f],d=e[f+1],m=0===i?p:d;m>=r&&m<=n&&J(c,p,d,e[f+2]),f=c.length-3,a&&f>=3&&(c[f]!==c[0]||c[f+1]!==c[1])&&J(c,c[0],c[1],c[2]),c.length&&t.push(c)}function $(e){let t=[];return t.size=e.size,t.start=e.start,t.end=e.end,t}function K(e,t,r,n,i,a){for(let o of e)X(o,t,r,n,i,a,!1)}function J(e,t,r,n){e.push(t,r,n)}function Q(e,t,r,n,i,a){let o=(a-t)/(n-t);return J(e,a,r+(i-r)*o,1),o}function ee(e,t,r,n,i,a){let o=(a-r)/(i-r);return J(e,t+(n-t)*o,a,1),o}function te(e,t){let r=[];for(let n=0;n0&&t.size<(i?o:n))return void(r.numPoints+=t.length/3);let s=[];for(let e=0;eo)&&(r.numSimplified++,s.push(t[e],t[e+1])),r.numPoints++;i&&function(e,t){let r=0;for(let t=0,n=e.length,i=n-2;t0===t)for(let t=0,r=e.length;t24)throw new Error("maxZoom should be in the 0-24 range");if(t.promoteId&&t.generateId)throw new Error("promoteId and generateId cannot be used together.");let n=function(e,t){let r=[];if("FeatureCollection"===e.type)for(let n=0;n1&&console.time("creation"),f=this.tiles[h]=ae(e,t,r,n,l),this.tileCoords.push({z:t,x:r,y:n}),c)){c>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",t,r,n,f.numFeatures,f.numPoints,f.numSimplified),console.timeEnd("creation"));let e=`z${t}`;this.stats[e]=(this.stats[e]||0)+1,this.total++}if(f.source=e,null==i){if(t===l.indexMaxZoom||f.numPoints<=l.indexMaxPoints)continue}else{if(t===l.maxZoom||t===i)continue;if(null!=i){let e=i-t;if(r!==a>>e||n!==o>>e)continue}}if(f.source=null,0===e.length)continue;c>1&&console.time("clipping");let p=.5*l.buffer/l.extent,d=.5-p,m=.5+p,g=1+p,y=null,v=null,x=null,_=null,b=Z(e,u,r-p,r+m,0,f.minX,f.maxX,l),w=Z(e,u,r+d,r+g,0,f.minX,f.maxX,l);e=null,b&&(y=Z(b,u,n-p,n+m,1,f.minY,f.maxY,l),v=Z(b,u,n+d,n+g,1,f.minY,f.maxY,l),b=null),w&&(x=Z(w,u,n-p,n+m,1,f.minY,f.maxY,l),_=Z(w,u,n+d,n+g,1,f.minY,f.maxY,l),w=null),c>1&&console.timeEnd("clipping"),s.push(y||[],t+1,2*r,2*n),s.push(v||[],t+1,2*r,2*n+1),s.push(x||[],t+1,2*r+1,2*n),s.push(_||[],t+1,2*r+1,2*n+1)}}getTile(e,t,r){e=+e,t=+t,r=+r;let n=this.options,{extent:i,debug:a}=n;if(e<0||e>24)return null;let o=1<1&&console.log("drilling down to z%d-%d-%d",e,t,r);let l,c=e,u=t,h=r;for(;!l&&c>0;)c--,u>>=1,h>>=1,l=this.tiles[ue(c,u,h)];return l&&l.source?(a>1&&(console.log("found parent tile z%d-%d-%d",c,u,h),console.time("drilling down")),this.splitTile(l.source,c,u,h,e,t,r),a>1&&console.timeEnd("drilling down"),this.tiles[s]?ne(this.tiles[s],i):null):null}}function ue(e,t,r){return 32*((1<{o.properties=e;let t={};for(let e of s)t[e]=n[e].evaluate(a,o);return t},t.reduce=(e,t)=>{o.properties=t;for(let t of s)a.accumulated=e[t],e[t]=i[t].evaluate(a,o)},t}(t)).load((yield this._pendingData).features):(i=yield this._pendingData,new ce(i,t.geojsonVtOptions)),this.loaded={};let r={};if(n){let e=n.finish();e&&(r.resourceTiming={},r.resourceTiming[t.source]=JSON.parse(JSON.stringify(e)))}return r}catch(t){if(delete this._pendingRequest,e.bB(t))return{abandoned:!0};throw t}var i}))}getData(){return e._(this,void 0,void 0,(function*(){return this._pendingData}))}reloadTile(e){let t=this.loaded;return t&&t[e.uid]?super.reloadTile(e):this.loadTile(e)}loadAndProcessGeoJSON(t,r){return e._(this,void 0,void 0,(function*(){let n=yield this.loadGeoJSON(t,r);if(delete this._pendingRequest,"object"!=typeof n)throw new Error(`Input data given to '${t.source}' is not a valid GeoJSON object.`);if(c(n,!0),t.filter){let r=e.bC(t.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===r.result)throw new Error(r.value.map((e=>`${e.key}: ${e.message}`)).join(", "));n={type:"FeatureCollection",features:n.features.filter((e=>r.value.evaluate({zoom:0},e)))}}return n}))}loadGeoJSON(t,r){return e._(this,void 0,void 0,(function*(){let{promoteId:n}=t;if(t.request){let i=yield e.h(t.request,r);return this._dataUpdateable=fe(i.data,n)?pe(i.data,n):void 0,i.data}if("string"==typeof t.data)try{let e=JSON.parse(t.data);return this._dataUpdateable=fe(e,n)?pe(e,n):void 0,e}catch{throw new Error(`Input data given to '${t.source}' is not a valid GeoJSON object.`)}if(!t.dataDiff)throw new Error(`Input data given to '${t.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${t.source}`);return function(e,t,r){var n,i,a,o;if(t.removeAll&&e.clear(),t.remove)for(let r of t.remove)e.delete(r);if(t.add)for(let n of t.add){let t=he(n,r);null!=t&&e.set(t,n)}if(t.update)for(let r of t.update){let t=e.get(r.id);if(null==t)continue;let s=!r.removeAllProperties&&((null===(n=r.removeProperties)||void 0===n?void 0:n.length)>0||(null===(i=r.addOrUpdateProperties)||void 0===i?void 0:i.length)>0);if((r.newGeometry||r.removeAllProperties||s)&&(t=Object.assign({},t),e.set(r.id,t),s&&(t.properties=Object.assign({},t.properties))),r.newGeometry&&(t.geometry=r.newGeometry),r.removeAllProperties)t.properties={};else if((null===(a=r.removeProperties)||void 0===a?void 0:a.length)>0)for(let e of r.removeProperties)Object.prototype.hasOwnProperty.call(t.properties,e)&&delete t.properties[e];if((null===(o=r.addOrUpdateProperties)||void 0===o?void 0:o.length)>0)for(let{key:e,value:n}of r.addOrUpdateProperties)t.properties[e]=n}}(this._dataUpdateable,t.dataDiff,n),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}}))}removeSource(t){return e._(this,void 0,void 0,(function*(){this._pendingRequest&&this._pendingRequest.abort()}))}getClusterExpansionZoom(e){return this._geoJSONIndex.getClusterExpansionZoom(e.clusterId)}getClusterChildren(e){return this._geoJSONIndex.getChildren(e.clusterId)}getClusterLeaves(e){return this._geoJSONIndex.getLeaves(e.clusterId,e.limit,e.offset)}}class me{constructor(t){this.self=t,this.actor=new e.F(t),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(e,t)=>{if(this.externalWorkerSourceTypes[e])throw new Error(`Worker source with name "${e}" already registered.`);this.externalWorkerSourceTypes[e]=t},this.self.addProtocol=e.bi,this.self.removeProtocol=e.bj,this.self.registerRTLTextPlugin=t=>{if(e.bD.isParsed())throw new Error("RTL text plugin already registered.");e.bD.setMethods(t)},this.actor.registerMessageHandler("LDT",((e,t)=>this._getDEMWorkerSource(e,t.source).loadTile(t))),this.actor.registerMessageHandler("RDT",((t,r)=>e._(this,void 0,void 0,(function*(){this._getDEMWorkerSource(t,r.source).removeTile(r)})))),this.actor.registerMessageHandler("GCEZ",((t,r)=>e._(this,void 0,void 0,(function*(){return this._getWorkerSource(t,r.type,r.source).getClusterExpansionZoom(r)})))),this.actor.registerMessageHandler("GCC",((t,r)=>e._(this,void 0,void 0,(function*(){return this._getWorkerSource(t,r.type,r.source).getClusterChildren(r)})))),this.actor.registerMessageHandler("GCL",((t,r)=>e._(this,void 0,void 0,(function*(){return this._getWorkerSource(t,r.type,r.source).getClusterLeaves(r)})))),this.actor.registerMessageHandler("LD",((e,t)=>this._getWorkerSource(e,t.type,t.source).loadData(t))),this.actor.registerMessageHandler("GD",((e,t)=>this._getWorkerSource(e,t.type,t.source).getData())),this.actor.registerMessageHandler("LT",((e,t)=>this._getWorkerSource(e,t.type,t.source).loadTile(t))),this.actor.registerMessageHandler("RT",((e,t)=>this._getWorkerSource(e,t.type,t.source).reloadTile(t))),this.actor.registerMessageHandler("AT",((e,t)=>this._getWorkerSource(e,t.type,t.source).abortTile(t))),this.actor.registerMessageHandler("RMT",((e,t)=>this._getWorkerSource(e,t.type,t.source).removeTile(t))),this.actor.registerMessageHandler("RS",((t,r)=>e._(this,void 0,void 0,(function*(){if(!this.workerSources[t]||!this.workerSources[t][r.type]||!this.workerSources[t][r.type][r.source])return;let e=this.workerSources[t][r.type][r.source];delete this.workerSources[t][r.type][r.source],void 0!==e.removeSource&&e.removeSource(r)})))),this.actor.registerMessageHandler("RM",(t=>e._(this,void 0,void 0,(function*(){delete this.layerIndexes[t],delete this.availableImages[t],delete this.workerSources[t],delete this.demWorkerSources[t]})))),this.actor.registerMessageHandler("SR",((t,r)=>e._(this,void 0,void 0,(function*(){this.referrer=r})))),this.actor.registerMessageHandler("SRPS",((e,t)=>this._syncRTLPluginState(e,t))),this.actor.registerMessageHandler("IS",((t,r)=>e._(this,void 0,void 0,(function*(){this.self.importScripts(r)})))),this.actor.registerMessageHandler("SI",((e,t)=>this._setImages(e,t))),this.actor.registerMessageHandler("UL",((t,r)=>e._(this,void 0,void 0,(function*(){this._getLayerIndex(t).update(r.layers,r.removedIds)})))),this.actor.registerMessageHandler("SL",((t,r)=>e._(this,void 0,void 0,(function*(){this._getLayerIndex(t).replace(r)}))))}_setImages(t,r){return e._(this,void 0,void 0,(function*(){this.availableImages[t]=r;for(let e in this.workerSources[t]){let n=this.workerSources[t][e];for(let e in n)n[e].availableImages=r}}))}_syncRTLPluginState(t,r){return e._(this,void 0,void 0,(function*(){if(e.bD.isParsed())return e.bD.getState();if("loading"!==r.pluginStatus)return e.bD.setState(r),r;let t=r.pluginURL;if(this.self.importScripts(t),e.bD.isParsed()){let r={pluginStatus:"loaded",pluginURL:t};return e.bD.setState(r),r}throw e.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${t}`)}))}_getAvailableImages(e){let t=this.availableImages[e];return t||(t=[]),t}_getLayerIndex(e){let r=this.layerIndexes[e];return r||(r=this.layerIndexes[e]=new t),r}_getWorkerSource(e,t,r){if(this.workerSources[e]||(this.workerSources[e]={}),this.workerSources[e][t]||(this.workerSources[e][t]={}),!this.workerSources[e][t][r]){let n={sendAsync:(t,r)=>(t.targetMapId=e,this.actor.sendAsync(t,r))};switch(t){case"vector":this.workerSources[e][t][r]=new a(n,this._getLayerIndex(e),this._getAvailableImages(e));break;case"geojson":this.workerSources[e][t][r]=new de(n,this._getLayerIndex(e),this._getAvailableImages(e));break;default:this.workerSources[e][t][r]=new this.externalWorkerSourceTypes[t](n,this._getLayerIndex(e),this._getAvailableImages(e))}}return this.workerSources[e][t][r]}_getDEMWorkerSource(e,t){return this.demWorkerSources[e]||(this.demWorkerSources[e]={}),this.demWorkerSources[e][t]||(this.demWorkerSources[e][t]=new o),this.demWorkerSources[e][t]}}return e.i(self)&&(self.worker=new me(self)),me})),r("index",0,(function(e,t){var r="4.7.1";let n,i,a={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:e=>new Promise(((r,n)=>{let i=requestAnimationFrame(r);e.signal.addEventListener("abort",(()=>{cancelAnimationFrame(i),n(t.c())}))})),getImageData(e,t=0){return this.getImageCanvasContext(e).getImageData(-t,-t,e.width+2*t,e.height+2*t)},getImageCanvasContext(e){let t=window.document.createElement("canvas"),r=t.getContext("2d",{willReadFrequently:!0});if(!r)throw new Error("failed to create canvas 2d context");return t.width=e.width,t.height=e.height,r.drawImage(e,0,0,e.width,e.height),r},resolveURL:e=>(n||(n=document.createElement("a")),n.href=e,n.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(null==i&&(i=matchMedia("(prefers-reduced-motion: reduce)")),i.matches)}};class o{static testProp(e){if(!o.docStyle)return e[0];for(let t=0;t{window.removeEventListener("click",o.suppressClickInternal,!0)}),0)}static getScale(e){let t=e.getBoundingClientRect();return{x:t.width/e.offsetWidth||1,y:t.height/e.offsetHeight||1,boundingClientRect:t}}static getPoint(e,r,n){let i=r.boundingClientRect;return new t.P((n.clientX-i.left)/r.x-e.clientLeft,(n.clientY-i.top)/r.y-e.clientTop)}static mousePos(e,t){let r=o.getScale(e);return o.getPoint(e,r,t)}static touchPos(e,t){let r=[],n=o.getScale(e);for(let i=0;i{s&&f(s),s=null,h=!0},l.onerror=()=>{u=!0,s=null},l.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(e){let r,n,i,a;e.resetRequestQueue=()=>{r=[],n=0,i=0,a={}},e.addThrottleControl=e=>{let t=i++;return a[t]=e,t},e.removeThrottleControl=e=>{delete a[e],s()},e.getImage=(e,n,i=!0)=>new Promise(((a,o)=>{c.supported&&(e.headers||(e.headers={}),e.headers.accept="image/webp,*/*"),t.e(e,{type:"image"}),r.push({abortController:n,requestParameters:e,supportImageRefresh:i,state:"queued",onError:e=>{o(e)},onSuccess:e=>{a(e)}}),s()}));let o=e=>t._(this,void 0,void 0,(function*(){e.state="running";let{requestParameters:r,supportImageRefresh:i,onError:a,onSuccess:o,abortController:c}=e,u=!1===i&&!t.i(self)&&!t.g(r.url)&&(!r.headers||Object.keys(r.headers).reduce(((e,t)=>e&&"accept"===t),!0));n++;let h=u?l(r,c):t.m(r,c);try{let r=yield h;delete e.abortController,e.state="completed",r.data instanceof HTMLImageElement||t.b(r.data)?o(r):r.data&&o({data:yield(f=r.data,"function"==typeof createImageBitmap?t.d(f):t.f(f)),cacheControl:r.cacheControl,expires:r.expires})}catch(t){delete e.abortController,a(t)}finally{n--,s()}var f})),s=()=>{let e=(()=>{for(let e of Object.keys(a))if(a[e]())return!0;return!1})()?t.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:t.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let t=n;t0;t++){let e=r.shift();e.abortController.signal.aborted?t--:o(e)}},l=(e,r)=>new Promise(((n,i)=>{let a=new Image,o=e.url,s=e.credentials;s&&"include"===s?a.crossOrigin="use-credentials":(s&&"same-origin"===s||!t.s(o))&&(a.crossOrigin="anonymous"),r.signal.addEventListener("abort",(()=>{a.src="",i(t.c())})),a.fetchPriority="high",a.onload=()=>{a.onerror=a.onload=null,n({data:a})},a.onerror=()=>{a.onerror=a.onload=null,r.signal.aborted||i(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},a.src=o}))}(p||(p={})),p.resetRequestQueue();class d{constructor(e){this._transformRequestFn=e}transformRequest(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}}setTransformRequest(e){this._transformRequestFn=e}}function m(e){var r=new t.A(3);return r[0]=e[0],r[1]=e[1],r[2]=e[2],r}var g,y=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e};g=new t.A(3),t.A!=Float32Array&&(g[0]=0,g[1]=0,g[2]=0);var v,x=function(e){var t=e[0],r=e[1];return t*t+r*r};function _(e){let t=[];if("string"==typeof e)t.push({id:"default",url:e});else if(e&&e.length>0){let r=[];for(let{id:n,url:i}of e){let e=`${n}${i}`;-1===r.indexOf(e)&&(r.push(e),t.push({id:n,url:i}))}}return t}function b(e,t,r){let n=e.split("?");return n[0]+=`${t}${r}`,n.join("?")}v=new t.A(2),t.A!=Float32Array&&(v[0]=0,v[1]=0);class w{constructor(e,t,r,n){this.context=e,this.format=r,this.texture=e.gl.createTexture(),this.update(t,n)}update(e,r,n){let{width:i,height:a}=e,o=!(this.size&&this.size[0]===i&&this.size[1]===a||n),{context:s}=this,{gl:l}=s;if(this.useMipmap=!(!r||!r.useMipmap),l.bindTexture(l.TEXTURE_2D,this.texture),s.pixelStoreUnpackFlipY.set(!1),s.pixelStoreUnpack.set(1),s.pixelStoreUnpackPremultiplyAlpha.set(this.format===l.RGBA&&(!r||!1!==r.premultiply)),o)this.size=[i,a],e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof ImageData||t.b(e)?l.texImage2D(l.TEXTURE_2D,0,this.format,this.format,l.UNSIGNED_BYTE,e):l.texImage2D(l.TEXTURE_2D,0,this.format,i,a,0,this.format,l.UNSIGNED_BYTE,e.data);else{let{x:r,y:o}=n||{x:0,y:0};e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof ImageData||t.b(e)?l.texSubImage2D(l.TEXTURE_2D,0,r,o,l.RGBA,l.UNSIGNED_BYTE,e):l.texSubImage2D(l.TEXTURE_2D,0,r,o,i,a,l.RGBA,l.UNSIGNED_BYTE,e.data)}this.useMipmap&&this.isSizePowerOfTwo()&&l.generateMipmap(l.TEXTURE_2D)}bind(e,t,r){let{context:n}=this,{gl:i}=n;i.bindTexture(i.TEXTURE_2D,this.texture),r!==i.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(r=i.LINEAR),e!==this.filter&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,e),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,r||e),this.filter=e),t!==this.wrap&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,t),this.wrap=t)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){let{gl:e}=this.context;e.deleteTexture(this.texture),this.texture=null}}function T(e){let{userImage:t}=e;return!!(t&&t.render&&t.render())&&(e.data.replace(new Uint8Array(t.data.buffer)),!0)}class k extends t.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(e){if(this.loaded!==e&&(this.loaded=e,e)){for(let{ids:e,promiseResolve:t}of this.requestors)t(this._getImagesForIds(e));this.requestors=[]}}getImage(e){let r=this.images[e];if(r&&!r.data&&r.spriteData){let e=r.spriteData;r.data=new t.R({width:e.width,height:e.height},e.context.getImageData(e.x,e.y,e.width,e.height).data),r.spriteData=null}return r}addImage(e,t){if(this.images[e])throw new Error(`Image id ${e} already exist, use updateImage instead`);this._validate(e,t)&&(this.images[e]=t)}_validate(e,r){let n=!0,i=r.data||r.spriteData;return this._validateStretch(r.stretchX,i&&i.width)||(this.fire(new t.j(new Error(`Image "${e}" has invalid "stretchX" value`))),n=!1),this._validateStretch(r.stretchY,i&&i.height)||(this.fire(new t.j(new Error(`Image "${e}" has invalid "stretchY" value`))),n=!1),this._validateContent(r.content,r)||(this.fire(new t.j(new Error(`Image "${e}" has invalid "content" value`))),n=!1),n}_validateStretch(e,t){if(!e)return!0;let r=0;for(let n of e){if(n[0]{let n=!0;if(!this.isLoaded())for(let t of e)this.images[t]||(n=!1);this.isLoaded()||n?t(this._getImagesForIds(e)):this.requestors.push({ids:e,promiseResolve:t})}))}_getImagesForIds(e){let r={};for(let n of e){let e=this.getImage(n);e||(this.fire(new t.k("styleimagemissing",{id:n})),e=this.getImage(n)),e?r[n]={data:e.data.clone(),pixelRatio:e.pixelRatio,sdf:e.sdf,version:e.version,stretchX:e.stretchX,stretchY:e.stretchY,content:e.content,textFitWidth:e.textFitWidth,textFitHeight:e.textFitHeight,hasRenderCallback:!(!e.userImage||!e.userImage.render)}:t.w(`Image "${n}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return r}getPixelSize(){let{width:e,height:t}=this.atlasImage;return{width:e,height:t}}getPattern(e){let r=this.patterns[e],n=this.getImage(e);if(!n)return null;if(r&&r.position.version===n.version)return r.position;if(r)r.position.version=n.version;else{let r={w:n.data.width+2,h:n.data.height+2,x:0,y:0},i=new t.I(r,n);this.patterns[e]={bin:r,position:i}}return this._updatePatternAtlas(),this.patterns[e].position}bind(e){let t=e.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new w(e,this.atlasImage,t.RGBA),this.atlasTexture.bind(t.LINEAR,t.CLAMP_TO_EDGE)}_updatePatternAtlas(){let e=[];for(let t in this.patterns)e.push(this.patterns[t].bin);let{w:r,h:n}=t.p(e),i=this.atlasImage;i.resize({width:r||1,height:n||1});for(let e in this.patterns){let{bin:r}=this.patterns[e],n=r.x+1,a=r.y+1,o=this.getImage(e).data,s=o.width,l=o.height;t.R.copy(o,i,{x:0,y:0},{x:n,y:a},{width:s,height:l}),t.R.copy(o,i,{x:0,y:l-1},{x:n,y:a-1},{width:s,height:1}),t.R.copy(o,i,{x:0,y:0},{x:n,y:a+l},{width:s,height:1}),t.R.copy(o,i,{x:s-1,y:0},{x:n-1,y:a},{width:1,height:l}),t.R.copy(o,i,{x:0,y:0},{x:n+s,y:a},{width:1,height:l})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(e){for(let r of e){if(this.callbackDispatchedThisFrame[r])continue;this.callbackDispatchedThisFrame[r]=!0;let e=this.getImage(r);e||t.w(`Image with ID: "${r}" was not found`),T(e)&&this.updateImage(r,e)}}}let A,M=1e20;function S(e,t,r,n,i,a,o,s,l){for(let c=t;c-1);l++,a[l]=s,o[l]=c,o[l+1]=M}for(let s=0,l=0;s65535)throw new Error("glyphs > 65535 not supported");if(t.ranges[i])return{stack:e,id:r,glyph:n};if(!this.url)throw new Error("glyphsUrl is not set");if(!t.requests[i]){let r=C.loadGlyphRange(e,i,this.url,this.requestManager);t.requests[i]=r}let a=yield t.requests[i];for(let e in a)this._doesCharSupportLocalGlyph(+e)||(t.glyphs[+e]=a[+e]);return t.ranges[i]=!0,{stack:e,id:r,glyph:a[r]||null}}))}_doesCharSupportLocalGlyph(e){return!!this.localIdeographFontFamily&&new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(e))}_tinySDF(e,r,n){let i=this.localIdeographFontFamily;if(!i||!this._doesCharSupportLocalGlyph(n))return;let a=e.tinySDF;if(!a){let t="400";/bold/i.test(r)?t="900":/medium/i.test(r)?t="500":/light/i.test(r)&&(t="200"),a=e.tinySDF=new C.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:i,fontWeight:t})}let o=a.draw(String.fromCharCode(n));return{id:n,bitmap:new t.o({width:o.width||60,height:o.height||60},o.data),metrics:{width:o.glyphWidth/2||24,height:o.glyphHeight/2||24,left:o.glyphLeft/2+.5||0,top:o.glyphTop/2-27.5||-8,advance:o.glyphAdvance/2||24,isDoubleResolution:!0}}}}C.loadGlyphRange=function(e,r,n,i){return t._(this,void 0,void 0,(function*(){let a=256*r,o=a+255,s=i.transformRequest(n.replace("{fontstack}",e).replace("{range}",`${a}-${o}`),"Glyphs"),l=yield t.l(s,new AbortController);if(!l||!l.data)throw new Error(`Could not load glyph range. range: ${r}, ${a}-${o}`);let c={};for(let e of t.n(l.data))c[e.id]=e;return c}))},C.TinySDF=class{constructor({fontSize:e=24,buffer:t=3,radius:r=8,cutoff:n=.25,fontFamily:i="sans-serif",fontWeight:a="normal",fontStyle:o="normal"}={}){this.buffer=t,this.cutoff=n,this.radius=r;let s=this.size=e+4*t,l=this._createCanvas(s),c=this.ctx=l.getContext("2d",{willReadFrequently:!0});c.font=`${o} ${a} ${e}px ${i}`,c.textBaseline="alphabetic",c.textAlign="left",c.fillStyle="black",this.gridOuter=new Float64Array(s*s),this.gridInner=new Float64Array(s*s),this.f=new Float64Array(s),this.z=new Float64Array(s+1),this.v=new Uint16Array(s)}_createCanvas(e){let t=document.createElement("canvas");return t.width=t.height=e,t}draw(e){let{width:t,actualBoundingBoxAscent:r,actualBoundingBoxDescent:n,actualBoundingBoxLeft:i,actualBoundingBoxRight:a}=this.ctx.measureText(e),o=Math.ceil(r),s=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(a-i))),l=Math.min(this.size-this.buffer,o+Math.ceil(n)),c=s+2*this.buffer,u=l+2*this.buffer,h=Math.max(c*u,0),f=new Uint8ClampedArray(h),p={data:f,width:c,height:u,glyphWidth:s,glyphHeight:l,glyphTop:o,glyphLeft:0,glyphAdvance:t};if(0===s||0===l)return p;let{ctx:d,buffer:m,gridInner:g,gridOuter:y}=this;d.clearRect(m,m,s,l),d.fillText(e,m,m+o);let v=d.getImageData(m,m,s,l);y.fill(M,0,h),g.fill(0,0,h);for(let e=0;e0?e*e:0,g[n]=e<0?e*e:0}}S(y,0,0,c,u,c,this.f,this.v,this.z),S(g,m,m,s,l,c,this.f,this.v,this.z);for(let e=0;e1&&(o=e[++a]);let l,c=Math.abs(s-o.left),u=Math.abs(s-o.right),h=Math.min(c,u),f=t/r*(n+1);if(o.isDash){let e=n-Math.abs(f);l=Math.sqrt(h*h+e*e)}else l=n-Math.sqrt(h*h+f*f);this.data[i+s]=Math.max(0,Math.min(255,l+128))}}}addRegularDash(e){for(let t=e.length-1;t>=0;--t){let r=e[t],n=e[t+1];r.zeroLength?e.splice(t,1):n&&n.isDash===r.isDash&&(n.left=r.left,e.splice(t,1))}let t=e[0],r=e[e.length-1];t.isDash===r.isDash&&(t.left=r.left-this.width,r.right=t.right+this.width);let n=this.width*this.nextRow,i=0,a=e[i];for(let t=0;t1&&(a=e[++i]);let r=Math.abs(t-a.left),o=Math.abs(t-a.right),s=Math.min(r,o);this.data[n+t]=Math.max(0,Math.min(255,(a.isDash?s:-s)+128))}}addDash(e,r){let n=r?7:0,i=2*n+1;if(this.nextRow+i>this.height)return t.w("LineAtlas out of space"),null;let a=0;for(let t=0;t{e.terminate()})),this.workers=null)}isPreloaded(){return!!this.active[O]}numActive(){return Object.keys(this.active).length}}let F,B,j=Math.floor(a.hardwareConcurrency/2);function N(){return F||(F=new R),F}R.workerCount=t.C(globalThis)?Math.max(Math.min(j,3),1):1;class U{constructor(e,r){this.workerPool=e,this.actors=[],this.currentActor=0,this.id=r;let n=this.workerPool.acquire(r);for(let e=0;e{e.remove()})),this.actors=[],e&&this.workerPool.release(this.id)}registerMessageHandler(e,t){for(let r of this.actors)r.registerMessageHandler(e,t)}}function V(){return B||(B=new U(N(),t.G),B.registerMessageHandler("GR",((e,r,n)=>t.m(r,n)))),B}function q(e,r){let n=t.H();return t.J(n,n,[1,1,0]),t.K(n,n,[.5*e.width,.5*e.height,1]),t.L(n,n,e.calculatePosMatrix(r.toUnwrapped()))}function H(e,t,r,n,i,a){let o=function(e,t,r){if(e)for(let n of e){let e=t[n];if(e&&e.source===r&&"fill-extrusion"===e.type)return!0}else for(let e in t){let n=t[e];if(n.source===r&&"fill-extrusion"===n.type)return!0}return!1}(i&&i.layers,t,e.id),s=a.maxPitchScaleFactor(),l=e.tilesIn(n,s,o);l.sort(G);let c=[];for(let n of l)c.push({wrappedTileID:n.tileID.wrapped().key,queryResults:n.tile.queryRenderedFeatures(t,r,e._state,n.queryGeometry,n.cameraQueryGeometry,n.scale,i,a,s,q(e.transform,n.tileID))});let u=function(e){let t={},r={};for(let n of e){let e=n.queryResults,i=n.wrappedTileID,a=r[i]=r[i]||{};for(let r in e){let n=e[r],i=a[r]=a[r]||{},o=t[r]=t[r]||[];for(let e of n)i[e.featureIndex]||(i[e.featureIndex]=!0,o.push(e))}}return t}(c);for(let t in u)u[t].forEach((t=>{let r=t.feature,n=e.getFeatureState(r.layer["source-layer"],r.id);r.source=r.layer.source,r.layer["source-layer"]&&(r.sourceLayer=r.layer["source-layer"]),r.state=n}));return u}function G(e,t){let r=e.tileID,n=t.tileID;return r.overscaledZ-n.overscaledZ||r.canonical.y-n.canonical.y||r.wrap-n.wrap||r.canonical.x-n.canonical.x}function W(e,r,n){return t._(this,void 0,void 0,(function*(){let i=e;if(e.url?i=(yield t.h(r.transformRequest(e.url,"Source"),n)).data:yield a.frameAsync(n),!i)return null;let o=t.M(t.e(i,e),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in i&&i.vector_layers&&(o.vectorLayerIds=i.vector_layers.map((e=>e.id))),o}))}class Z{constructor(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):Array.isArray(e)&&(4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1])))}setNorthEast(e){return this._ne=e instanceof t.N?new t.N(e.lng,e.lat):t.N.convert(e),this}setSouthWest(e){return this._sw=e instanceof t.N?new t.N(e.lng,e.lat):t.N.convert(e),this}extend(e){let r,n,i=this._sw,a=this._ne;if(e instanceof t.N)r=e,n=e;else{if(!(e instanceof Z))return Array.isArray(e)?4===e.length||e.every(Array.isArray)?this.extend(Z.convert(e)):this.extend(t.N.convert(e)):e&&("lng"in e||"lon"in e)&&"lat"in e?this.extend(t.N.convert(e)):this;if(r=e._sw,n=e._ne,!r||!n)return this}return i||a?(i.lng=Math.min(r.lng,i.lng),i.lat=Math.min(r.lat,i.lat),a.lng=Math.max(n.lng,a.lng),a.lat=Math.max(n.lat,a.lat)):(this._sw=new t.N(r.lng,r.lat),this._ne=new t.N(n.lng,n.lat)),this}getCenter(){return new t.N((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new t.N(this.getWest(),this.getNorth())}getSouthEast(){return new t.N(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(e){let{lng:r,lat:n}=t.N.convert(e),i=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(i=this._sw.lng>=r&&r>=this._ne.lng),this._sw.lat<=n&&n<=this._ne.lat&&i}static convert(e){return e instanceof Z?e:e&&new Z(e)}static fromLngLat(e,r=0){let n=360*r/40075017,i=n/Math.cos(Math.PI/180*e.lat);return new Z(new t.N(e.lng-i,e.lat-n),new t.N(e.lng+i,e.lat+n))}adjustAntiMeridian(){let e=new t.N(this._sw.lng,this._sw.lat),r=new t.N(this._ne.lng,this._ne.lat);return new Z(e,e.lng>r.lng?new t.N(r.lng+360,r.lat):r)}}class Y{constructor(e,t,r){this.bounds=Z.convert(this.validateBounds(e)),this.minzoom=t||0,this.maxzoom=r||24}validateBounds(e){return Array.isArray(e)&&4===e.length?[Math.max(-180,e[0]),Math.max(-90,e[1]),Math.min(180,e[2]),Math.min(90,e[3])]:[-180,-90,180,90]}contains(e){let r=Math.pow(2,e.z),n=Math.floor(t.O(this.bounds.getWest())*r),i=Math.floor(t.Q(this.bounds.getNorth())*r),a=Math.ceil(t.O(this.bounds.getEast())*r),o=Math.ceil(t.Q(this.bounds.getSouth())*r);return e.x>=n&&e.x=i&&e.y{this._options.tiles=e})),this}setUrl(e){return this.setSourceProperty((()=>{this.url=e,this._options.url=e})),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return t.e({},this._options)}loadTile(e){return t._(this,void 0,void 0,(function*(){let t=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),r={request:this.map._requestManager.transformRequest(t,"Tile"),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};r.request.collectResourceTiming=this._collectResourceTiming;let n="RT";if(e.actor&&"expired"!==e.state){if("loading"===e.state)return new Promise(((t,r)=>{e.reloadPromise={resolve:t,reject:r}}))}else e.actor=this.dispatcher.getActor(),n="LT";e.abortController=new AbortController;try{let t=yield e.actor.sendAsync({type:n,data:r},e.abortController);if(delete e.abortController,e.aborted)return;this._afterTileLoadWorkerResponse(e,t)}catch(t){if(delete e.abortController,e.aborted)return;if(t&&404!==t.status)throw t;this._afterTileLoadWorkerResponse(e,null)}}))}_afterTileLoadWorkerResponse(e,t){if(t&&t.resourceTiming&&(e.resourceTiming=t.resourceTiming),t&&this.map._refreshExpiredTiles&&e.setExpiryData(t),e.loadVectorData(t,this.map.painter),e.reloadPromise){let t=e.reloadPromise;e.reloadPromise=null,this.loadTile(e).then(t.resolve).catch(t.reject)}}abortTile(e){return t._(this,void 0,void 0,(function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.actor&&(yield e.actor.sendAsync({type:"AT",data:{uid:e.uid,type:this.type,source:this.id}}))}))}unloadTile(e){return t._(this,void 0,void 0,(function*(){e.unloadVectorData(),e.actor&&(yield e.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}}))}))}hasTransition(){return!1}}class $ extends t.E{constructor(e,r,n,i){super(),this.id=e,this.dispatcher=n,this.setEventedParent(i),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=t.e({type:"raster"},r),t.e(this,t.M(r,["url","scheme","tileSize"]))}load(){return t._(this,void 0,void 0,(function*(){this._loaded=!1,this.fire(new t.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let e=yield W(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,e&&(t.e(this,e),e.bounds&&(this.tileBounds=new Y(e.bounds,this.minzoom,this.maxzoom)),this.fire(new t.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new t.k("data",{dataType:"source",sourceDataType:"content"})))}catch(e){this._tileJSONRequest=null,this.fire(new t.j(e))}}))}loaded(){return this._loaded}onAdd(e){this.map=e,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(e){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),e(),this.load()}setTiles(e){return this.setSourceProperty((()=>{this._options.tiles=e})),this}setUrl(e){return this.setSourceProperty((()=>{this.url=e,this._options.url=e})),this}serialize(){return t.e({},this._options)}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}loadTile(e){return t._(this,void 0,void 0,(function*(){let t=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);e.abortController=new AbortController;try{let r=yield p.getImage(this.map._requestManager.transformRequest(t,"Tile"),e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(r&&r.data){this.map._refreshExpiredTiles&&r.cacheControl&&r.expires&&e.setExpiryData({cacheControl:r.cacheControl,expires:r.expires});let t=this.map.painter.context,n=t.gl,i=r.data;e.texture=this.map.painter.getTileTexture(i.width),e.texture?e.texture.update(i,{useMipmap:!0}):(e.texture=new w(t,i,n.RGBA,{useMipmap:!0}),e.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE,n.LINEAR_MIPMAP_NEAREST)),e.state="loaded"}}catch(t){if(delete e.abortController,e.aborted)e.state="unloaded";else if(t)throw e.state="errored",t}}))}abortTile(e){return t._(this,void 0,void 0,(function*(){e.abortController&&(e.abortController.abort(),delete e.abortController)}))}unloadTile(e){return t._(this,void 0,void 0,(function*(){e.texture&&this.map.painter.saveTileTexture(e.texture)}))}hasTransition(){return!1}}class K extends ${constructor(e,r,n,i){super(e,r,n,i),this.type="raster-dem",this.maxzoom=22,this._options=t.e({type:"raster-dem"},r),this.encoding=r.encoding||"mapbox",this.redFactor=r.redFactor,this.greenFactor=r.greenFactor,this.blueFactor=r.blueFactor,this.baseShift=r.baseShift}loadTile(e){return t._(this,void 0,void 0,(function*(){let r=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),n=this.map._requestManager.transformRequest(r,"Tile");e.neighboringTiles=this._getNeighboringTiles(e.tileID),e.abortController=new AbortController;try{let r=yield p.getImage(n,e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(r&&r.data){let n=r.data;this.map._refreshExpiredTiles&&r.cacheControl&&r.expires&&e.setExpiryData({cacheControl:r.cacheControl,expires:r.expires});let i=t.b(n)&&t.U()?n:yield this.readImageNow(n),a={type:this.type,uid:e.uid,source:this.id,rawImageData:i,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!e.actor||"expired"===e.state){e.actor=this.dispatcher.getActor();let t=yield e.actor.sendAsync({type:"LDT",data:a});e.dem=t,e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0,e.state="loaded"}}}catch(t){if(delete e.abortController,e.aborted)e.state="unloaded";else if(t)throw e.state="errored",t}}))}readImageNow(e){return t._(this,void 0,void 0,(function*(){if(typeof VideoFrame<"u"&&t.V()){let r=e.width+2,n=e.height+2;try{return new t.R({width:r,height:n},yield t.W(e,-1,-1,r,n))}catch{}}return a.getImageData(e,1)}))}_getNeighboringTiles(e){let r=e.canonical,n=Math.pow(2,r.z),i=(r.x-1+n)%n,a=0===r.x?e.wrap-1:e.wrap,o=(r.x+1+n)%n,s=r.x+1===n?e.wrap+1:e.wrap,l={};return l[new t.S(e.overscaledZ,a,r.z,i,r.y).key]={backfilled:!1},l[new t.S(e.overscaledZ,s,r.z,o,r.y).key]={backfilled:!1},r.y>0&&(l[new t.S(e.overscaledZ,a,r.z,i,r.y-1).key]={backfilled:!1},l[new t.S(e.overscaledZ,e.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},l[new t.S(e.overscaledZ,s,r.z,o,r.y-1).key]={backfilled:!1}),r.y+10&&t.e(i,{resourceTiming:n}),this.fire(new t.k("data",Object.assign(Object.assign({},i),{sourceDataType:"metadata"}))),this.fire(new t.k("data",Object.assign(Object.assign({},i),{sourceDataType:"content"})))}catch(e){if(this._pendingLoads--,this._removed)return void this.fire(new t.k("dataabort",{dataType:"source"}));this.fire(new t.j(e))}}))}loaded(){return 0===this._pendingLoads}loadTile(e){return t._(this,void 0,void 0,(function*(){let t=e.actor?"RT":"LT";e.actor=this.actor;let r={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};e.abortController=new AbortController;let n=yield this.actor.sendAsync({type:t,data:r},e.abortController);delete e.abortController,e.unloadVectorData(),e.aborted||e.loadVectorData(n,this.map.painter,"RT"===t)}))}abortTile(e){return t._(this,void 0,void 0,(function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.aborted=!0}))}unloadTile(e){return t._(this,void 0,void 0,(function*(){e.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}})}))}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return t.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var Q=t.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class ee extends t.E{constructor(e,t,r,n){super(),this.id=e,this.dispatcher=r,this.coordinates=t.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(n),this.options=t}load(e){return t._(this,void 0,void 0,(function*(){this._loaded=!1,this.fire(new t.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let t=yield p.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,t&&t.data&&(this.image=t.data,e&&(this.coordinates=e),this._finishLoading())}catch(e){this._request=null,this._loaded=!0,this.fire(new t.j(e))}}))}loaded(){return this._loaded}updateImage(e){return e.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=e.url,this.load(e.coordinates).finally((()=>{this.texture=null})),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(e){this.map=e,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(e){this.coordinates=e;let r=e.map(t.Z.fromLngLat);this.tileID=function(e){let r=1/0,n=1/0,i=-1/0,a=-1/0;for(let t of e)r=Math.min(r,t.x),n=Math.min(n,t.y),i=Math.max(i,t.x),a=Math.max(a,t.y);let o=Math.max(i-r,a-n),s=Math.max(0,Math.floor(-Math.log(o)/Math.LN2)),l=Math.pow(2,s);return new t.a1(s,Math.floor((r+i)/2*l),Math.floor((n+a)/2*l))}(r),this.minzoom=this.maxzoom=this.tileID.z;let n=r.map((e=>this.tileID.getTilePoint(e)._round()));return this._boundsArray=new t.$,this._boundsArray.emplaceBack(n[0].x,n[0].y,0,0),this._boundsArray.emplaceBack(n[1].x,n[1].y,t.X,0),this._boundsArray.emplaceBack(n[3].x,n[3].y,0,t.X),this._boundsArray.emplaceBack(n[2].x,n[2].y,t.X,t.X),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new t.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(0===Object.keys(this.tiles).length||!this.image)return;let e=this.map.painter.context,r=e.gl;this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,Q.members)),this.boundsSegments||(this.boundsSegments=t.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new w(e,this.image,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE));let n=!1;for(let e in this.tiles){let t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture,n=!0)}n&&this.fire(new t.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(e){return t._(this,void 0,void 0,(function*(){this.tileID&&this.tileID.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={}):e.state="errored"}))}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class te extends ee{constructor(e,t,r,n){super(e,t,r,n),this.roundZoom=!0,this.type="video",this.options=t}load(){return t._(this,void 0,void 0,(function*(){this._loaded=!1;let e=this.options;this.urls=[];for(let t of e.urls)this.urls.push(this.map._requestManager.transformRequest(t,"Source").url);try{let e=yield t.a3(this.urls);if(this._loaded=!0,!e)return;this.video=e,this.video.loop=!0,this.video.addEventListener("playing",(()=>{this.map.triggerRepaint()})),this.map&&this.video.play(),this._finishLoading()}catch(e){this.fire(new t.j(e))}}))}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(e){if(this.video){let r=this.video.seekable;er.end(0)?this.fire(new t.j(new t.a2(`sources.${this.id}`,null,`Playback for this video can be set only between the ${r.start(0)} and ${r.end(0)}-second mark.`))):this.video.currentTime=e}}getVideo(){return this.video}onAdd(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(0===Object.keys(this.tiles).length||this.video.readyState<2)return;let e=this.map.painter.context,r=e.gl;this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,Q.members)),this.boundsSegments||(this.boundsSegments=t.a0.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new w(e,this.video,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE));let n=!1;for(let e in this.tiles){let t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture,n=!0)}n&&this.fire(new t.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class re extends ee{constructor(e,r,n,i){super(e,r,n,i),r.coordinates?Array.isArray(r.coordinates)&&4===r.coordinates.length&&!r.coordinates.some((e=>!Array.isArray(e)||2!==e.length||e.some((e=>"number"!=typeof e))))||this.fire(new t.j(new t.a2(`sources.${e}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.j(new t.a2(`sources.${e}`,null,'missing required property "coordinates"'))),r.animate&&"boolean"!=typeof r.animate&&this.fire(new t.j(new t.a2(`sources.${e}`,null,'optional "animate" property must be a boolean value'))),r.canvas?"string"==typeof r.canvas||r.canvas instanceof HTMLCanvasElement||this.fire(new t.j(new t.a2(`sources.${e}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.j(new t.a2(`sources.${e}`,null,'missing required property "canvas"'))),this.options=r,this.animate=void 0===r.animate||r.animate}load(){return t._(this,void 0,void 0,(function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new t.j(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())}))}getCanvas(){return this.canvas}onAdd(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),this._hasInvalidDimensions()||0===Object.keys(this.tiles).length)return;let r=this.map.painter.context,n=r.gl;this.boundsBuffer||(this.boundsBuffer=r.createVertexBuffer(this._boundsArray,Q.members)),this.boundsSegments||(this.boundsSegments=t.a0.simpleSegment(0,0,4,2)),this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new w(r,this.canvas,n.RGBA,{premultiply:!0});let i=!1;for(let e in this.tiles){let t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture,i=!0)}i&&this.fire(new t.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let e of[this.canvas.width,this.canvas.height])if(isNaN(e)||e<=0)return!0;return!1}}let ne={},ie=e=>{switch(e){case"geojson":return J;case"image":return ee;case"raster":return $;case"raster-dem":return K;case"vector":return X;case"video":return te;case"canvas":return re}return ne[e]},ae="RTLPluginLoaded";class oe extends t.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=V()}_syncState(e){return this.status=e,this.dispatcher.broadcast("SRPS",{pluginStatus:e,pluginURL:this.url}).catch((e=>{throw this.status="error",e}))}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(e){return t._(this,arguments,void 0,(function*(e,t=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=a.resolveURL(e),!this.url)throw new Error(`requested url ${e} is invalid`);if("unavailable"===this.status){if(!t)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if("requested"===this.status)return this._requestImport()}))}_requestImport(){return t._(this,void 0,void 0,(function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new t.k(ae))}))}lazyLoad(){"unavailable"===this.status?this.status="requested":"deferred"===this.status&&this._requestImport()}}let se=null;function le(){return se||(se=new oe),se}class ce{constructor(e,r){this.timeAdded=0,this.fadeEndTime=0,this.tileID=e,this.uid=t.a4(),this.uses=0,this.tileSize=r,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(e){let t=e+this.timeAdded;tt.getLayer(e))).filter(Boolean);if(0!==e.length){n.layers=e,n.stateDependentLayerIds&&(n.stateDependentLayers=n.stateDependentLayerIds.map((t=>e.filter((e=>e.id===t))[0])));for(let t of e)r[t.id]=n}}return r}(e.buckets,r.style),this.hasSymbolBuckets=!1;for(let e in this.buckets){let r=this.buckets[e];if(r instanceof t.a6){if(this.hasSymbolBuckets=!0,!n)break;r.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let e in this.buckets){let r=this.buckets[e];if(r instanceof t.a6&&r.hasRTLText){this.hasRTLText=!0,le().lazyLoad();break}}this.queryPadding=0;for(let e in this.buckets){let t=this.buckets[e];this.queryPadding=Math.max(this.queryPadding,r.style.getLayer(e).queryRadius(t))}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage)}else this.collisionBoxArray=new t.a5}unloadVectorData(){for(let e in this.buckets)this.buckets[e].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(e){return this.buckets[e.id]}upload(e){for(let t in this.buckets){let r=this.buckets[t];r.uploadPending()&&r.upload(e)}let t=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new w(e,this.imageAtlas.image,t.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new w(e,this.glyphAtlasImage,t.ALPHA),this.glyphAtlasImage=null)}prepare(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture)}queryRenderedFeatures(e,t,r,n,i,a,o,s,l,c){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:n,cameraQueryGeometry:i,scale:a,tileSize:this.tileSize,pixelPosMatrix:c,transform:s,params:o,queryPadding:this.queryPadding*l},e,t,r):{}}querySourceFeatures(e,r){let n=this.latestFeatureIndex;if(!n||!n.rawTileData)return;let i=n.loadVTLayers(),a=r&&r.sourceLayer?r.sourceLayer:"",o=i._geojsonTileLayer||i[a];if(!o)return;let s=t.a7(r&&r.filter),{z:l,x:c,y:u}=this.tileID.canonical,h={z:l,x:c,y:u};for(let r=0;re)t=!1;else if(r)if(this.expirationTime{this.remove(e,i)}),r)),this.data[n].push(i),this.order.push(n),this.order.length>this.max){let e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this}has(e){return e.wrapped().key in this.data}getAndRemove(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null}_getAndRemoveByKey(e){let t=this.data[e].shift();return t.timeout&&clearTimeout(t.timeout),0===this.data[e].length&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),t.value}getByKey(e){let t=this.data[e];return t?t[0].value:null}get(e){return this.has(e)?this.data[e.wrapped().key][0].value:null}remove(e,t){if(!this.has(e))return this;let r=e.wrapped().key,n=void 0===t?0:this.data[r].indexOf(t),i=this.data[r][n];return this.data[r].splice(n,1),i.timeout&&clearTimeout(i.timeout),0===this.data[r].length&&delete this.data[r],this.onRemove(i.value),this.order.splice(this.order.indexOf(r),1),this}setMaxSize(e){for(this.max=e;this.order.length>this.max;){let e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this}filter(e){let t=[];for(let r in this.data)for(let n of this.data[r])e(n.value)||t.push(n);for(let e of t)this.remove(e.value.tileID,e)}}class he{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(e,r,n){let i=String(r);if(this.stateChanges[e]=this.stateChanges[e]||{},this.stateChanges[e][i]=this.stateChanges[e][i]||{},t.e(this.stateChanges[e][i],n),null===this.deletedStates[e]){this.deletedStates[e]={};for(let t in this.state[e])t!==i&&(this.deletedStates[e][t]=null)}else if(this.deletedStates[e]&&null===this.deletedStates[e][i]){this.deletedStates[e][i]={};for(let t in this.state[e][i])n[t]||(this.deletedStates[e][i][t]=null)}else for(let t in n)this.deletedStates[e]&&this.deletedStates[e][i]&&null===this.deletedStates[e][i][t]&&delete this.deletedStates[e][i][t]}removeFeatureState(e,t,r){if(null===this.deletedStates[e])return;let n=String(t);if(this.deletedStates[e]=this.deletedStates[e]||{},r&&void 0!==t)null!==this.deletedStates[e][n]&&(this.deletedStates[e][n]=this.deletedStates[e][n]||{},this.deletedStates[e][n][r]=null);else if(void 0!==t)if(this.stateChanges[e]&&this.stateChanges[e][n])for(r in this.deletedStates[e][n]={},this.stateChanges[e][n])this.deletedStates[e][n][r]=null;else this.deletedStates[e][n]=null;else this.deletedStates[e]=null}getState(e,r){let n=String(r),i=t.e({},(this.state[e]||{})[n],(this.stateChanges[e]||{})[n]);if(null===this.deletedStates[e])return{};if(this.deletedStates[e]){let t=this.deletedStates[e][r];if(null===t)return{};for(let e in t)delete i[e]}return i}initializeTileState(e,t){e.setFeatureState(this.state,t)}coalesceChanges(e,r){let n={};for(let e in this.stateChanges){this.state[e]=this.state[e]||{};let r={};for(let n in this.stateChanges[e])this.state[e][n]||(this.state[e][n]={}),t.e(this.state[e][n],this.stateChanges[e][n]),r[n]=this.state[e][n];n[e]=r}for(let e in this.deletedStates){this.state[e]=this.state[e]||{};let r={};if(null===this.deletedStates[e])for(let t in this.state[e])r[t]={},this.state[e][t]={};else for(let t in this.deletedStates[e]){if(null===this.deletedStates[e][t])this.state[e][t]={};else for(let r of Object.keys(this.deletedStates[e][t]))delete this.state[e][t][r];r[t]=this.state[e][t]}n[e]=n[e]||{},t.e(n[e],r)}if(this.stateChanges={},this.deletedStates={},0!==Object.keys(n).length)for(let t in e)e[t].setFeatureState(n,r)}}class fe extends t.E{constructor(e,t,r){super(),this.id=e,this.dispatcher=r,this.on("data",(e=>this._dataHandler(e))),this.on("dataloading",(()=>{this._sourceErrored=!1})),this.on("error",(()=>{this._sourceErrored=this._source.loaded()})),this._source=((e,t,r,n)=>{let i=new(ie(t.type))(e,t,r,n);if(i.id!==e)throw new Error(`Expected Source id to be ${e} instead of ${i.id}`);return i})(e,t,r,this),this._tiles={},this._cache=new ue(0,(e=>this._unloadTile(e))),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new he,this._didEmitContent=!1,this._updated=!1}onAdd(e){this.map=e,this._maxTileCacheSize=e?e._maxTileCacheSize:null,this._maxTileCacheZoomLevels=e?e._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(e)}onRemove(e){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(e)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(void 0===this.used&&void 0===this.usedForTerrain||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let e in this._tiles){let t=this._tiles[e];if("loaded"!==t.state&&"errored"!==t.state)return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;let e=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,e&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(e,r,n){return t._(this,void 0,void 0,(function*(){try{yield this._source.loadTile(e),this._tileLoaded(e,r,n)}catch(r){e.state="errored",404!==r.status?this._source.fire(new t.j(r,{tile:e})):this.update(this.transform,this.terrain)}}))}_unloadTile(e){this._source.unloadTile&&this._source.unloadTile(e)}_abortTile(e){this._source.abortTile&&this._source.abortTile(e),this._source.fire(new t.k("dataabort",{tile:e,coord:e.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(e){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(let t in this._tiles){let r=this._tiles[t];r.upload(e),r.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map((e=>e.tileID)).sort(pe).map((e=>e.key))}getRenderableIds(e){let r=[];for(let t in this._tiles)this._isIdRenderable(t,e)&&r.push(this._tiles[t]);return e?r.sort(((e,r)=>{let n=e.tileID,i=r.tileID,a=new t.P(n.canonical.x,n.canonical.y)._rotate(this.transform.angle),o=new t.P(i.canonical.x,i.canonical.y)._rotate(this.transform.angle);return n.overscaledZ-i.overscaledZ||o.y-a.y||o.x-a.x})).map((e=>e.tileID.key)):r.map((e=>e.tileID)).sort(pe).map((e=>e.key))}hasRenderableParent(e){let t=this.findLoadedParent(e,0);return!!t&&this._isIdRenderable(t.tileID.key)}_isIdRenderable(e,t){return this._tiles[e]&&this._tiles[e].hasData()&&!this._coveredTiles[e]&&(t||!this._tiles[e].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(let e in this._tiles)"errored"!==this._tiles[e].state&&this._reloadTile(e,"reloading")}}_reloadTile(e,r){return t._(this,void 0,void 0,(function*(){let t=this._tiles[e];t&&("loading"!==t.state&&(t.state=r),yield this._loadTile(t,e,r))}))}_tileLoaded(e,r,n){e.timeAdded=a.now(),"expired"===n&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(r,e),"raster-dem"===this.getSource().type&&e.dem&&this._backfillDEM(e),this._state.initializeTileState(e,this.map?this.map.painter:null),e.aborted||this._source.fire(new t.k("data",{dataType:"source",tile:e,coord:e.tileID}))}_backfillDEM(e){let t=this.getRenderableIds();for(let n=0;n1||(Math.abs(r)>1&&(1===Math.abs(r+i)?r+=i:1===Math.abs(r-i)&&(r-=i)),t.dem&&e.dem&&(e.dem.backfillBorder(t.dem,r,n),e.neighboringTiles&&e.neighboringTiles[a]&&(e.neighboringTiles[a].backfilled=!0)))}}getTile(e){return this.getTileByID(e.key)}getTileByID(e){return this._tiles[e]}_retainLoadedChildren(e,t,r,n){for(let i in this._tiles){let a=this._tiles[i];if(n[i]||!a.hasData()||a.tileID.overscaledZ<=t||a.tileID.overscaledZ>r)continue;let o=a.tileID;for(;a&&a.tileID.overscaledZ>t+1;){let e=a.tileID.scaledTo(a.tileID.overscaledZ-1);a=this._tiles[e.key],a&&a.hasData()&&(o=e)}let s=o;for(;s.overscaledZ>t;)if(s=s.scaledTo(s.overscaledZ-1),e[s.key]){n[o.key]=o;break}}}findLoadedParent(e,t){if(e.key in this._loadedParentTiles){let r=this._loadedParentTiles[e.key];return r&&r.tileID.overscaledZ>=t?r:null}for(let r=e.overscaledZ-1;r>=t;r--){let t=e.scaledTo(r),n=this._getLoadedTile(t);if(n)return n}}findLoadedSibling(e){return this._getLoadedTile(e)}_getLoadedTile(e){let t=this._tiles[e.key];return t&&t.hasData()?t:this._cache.getByKey(e.wrapped().key)}updateCacheSize(e){let r=Math.ceil(e.width/this._source.tileSize)+1,n=Math.ceil(e.height/this._source.tileSize)+1,i=Math.floor(r*n*(null===this._maxTileCacheZoomLevels?t.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),a="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,i):i;this._cache.setMaxSize(a)}handleWrapJump(e){let t=Math.round((e-(void 0===this._prevLng?e:this._prevLng))/360);if(this._prevLng=e,t){let e={};for(let r in this._tiles){let n=this._tiles[r];n.tileID=n.tileID.unwrapTo(n.tileID.wrap+t),e[n.tileID.key]=n}this._tiles=e;for(let e in this._timers)clearTimeout(this._timers[e]),delete this._timers[e];for(let e in this._tiles)this._setTileReloadTimer(e,this._tiles[e])}}_updateCoveredAndRetainedTiles(e,t,r,n,i,o){let s={},l={},c=Object.keys(e),u=a.now();for(let r of c){let n=e[r],i=this._tiles[r];if(!i||0!==i.fadeEndTime&&i.fadeEndTime<=u)continue;let a=this.findLoadedParent(n,t),o=this.findLoadedSibling(n),c=a||o||null;c&&(this._addTile(c.tileID),s[c.tileID.key]=c.tileID),l[r]=n}this._retainLoadedChildren(l,n,r,e);for(let t in s)e[t]||(this._coveredTiles[t]=!0,e[t]=s[t]);if(o){let t={},r={};for(let e of i)this._tiles[e.key].hasData()?t[e.key]=e:r[e.key]=e;for(let n in r){let i=r[n].children(this._source.maxzoom);this._tiles[i[0].key]&&this._tiles[i[1].key]&&this._tiles[i[2].key]&&this._tiles[i[3].key]&&(t[i[0].key]=e[i[0].key]=i[0],t[i[1].key]=e[i[1].key]=i[1],t[i[2].key]=e[i[2].key]=i[2],t[i[3].key]=e[i[3].key]=i[3],delete r[n])}for(let n in r){let i=r[n],a=this.findLoadedParent(i,this._source.minzoom),o=this.findLoadedSibling(i),s=a||o||null;if(s){t[s.tileID.key]=e[s.tileID.key]=s.tileID;for(let e in t)t[e].isChildOf(s.tileID)&&delete t[e]}}for(let e in this._tiles)t[e]||(this._coveredTiles[e]=!0)}}update(e,r){if(!this._sourceLoaded||this._paused)return;let n;this.transform=e,this.terrain=r,this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?n=e.getVisibleUnwrappedCoordinates(this._source.tileID).map((e=>new t.S(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y))):(n=e.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:r}),this._source.hasTile&&(n=n.filter((e=>this._source.hasTile(e))))):n=[];let i=e.coveringZoomLevel(this._source),a=Math.max(i-fe.maxOverzooming,this._source.minzoom),o=Math.max(i+fe.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){let e={};for(let t of n)if(t.canonical.z>this._source.minzoom){let r=t.scaledTo(t.canonical.z-1);e[r.key]=r;let n=t.scaledTo(Math.max(this._source.minzoom,Math.min(t.canonical.z,5)));e[n.key]=n}n=n.concat(Object.values(e))}let s=0===n.length&&!this._updated&&this._didEmitContent;this._updated=!0,s&&this.fire(new t.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let l=this._updateRetainedTiles(n,i);de(this._source.type)&&this._updateCoveredAndRetainedTiles(l,a,o,i,n,r);for(let e in l)this._tiles[e].clearFadeHold();let c=t.ab(this._tiles,l);for(let e of c){let t=this._tiles[e];t.hasSymbolBuckets&&!t.holdingForFade()?t.setHoldDuration(this.map._fadeDuration):t.hasSymbolBuckets&&!t.symbolFadeFinished()||this._removeTile(e)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(let e in this._tiles)this._tiles[e].holdingForFade()&&this._removeTile(e)}_updateRetainedTiles(e,t){var r;let n={},i={},a=Math.max(t-fe.maxOverzooming,this._source.minzoom),o=Math.max(t+fe.maxUnderzooming,this._source.minzoom),s={};for(let r of e){let e=this._addTile(r);n[r.key]=r,e.hasData()||tthis._source.maxzoom){let e=o.children(this._source.maxzoom)[0],t=this.getTile(e);if(t&&t.hasData()){n[e.key]=e;continue}}else{let e=o.children(this._source.maxzoom);if(n[e[0].key]&&n[e[1].key]&&n[e[2].key]&&n[e[3].key])continue}let s=e.wasRequested();for(let t=o.overscaledZ-1;t>=a;--t){let a=o.scaledTo(t);if(i[a.key])break;if(i[a.key]=!0,e=this.getTile(a),!e&&s&&(e=this._addTile(a)),e){let t=e.hasData();if((t||!(null!==(r=this.map)&&void 0!==r&&r.cancelPendingTileRequestsWhileZooming)||s)&&(n[a.key]=a),s=e.wasRequested(),t)break}}}return n}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(let e in this._tiles){let t,r=[],n=this._tiles[e].tileID;for(;n.overscaledZ>0;){if(n.key in this._loadedParentTiles){t=this._loadedParentTiles[n.key];break}r.push(n.key);let e=n.scaledTo(n.overscaledZ-1);if(t=this._getLoadedTile(e),t)break;n=e}for(let e of r)this._loadedParentTiles[e]=t}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(let e in this._tiles){let t=this._tiles[e].tileID,r=this._getLoadedTile(t);this._loadedSiblingTiles[t.key]=r}}_addTile(e){let r=this._tiles[e.key];if(r)return r;r=this._cache.getAndRemove(e),r&&(this._setTileReloadTimer(e.key,r),r.tileID=e,this._state.initializeTileState(r,this.map?this.map.painter:null),this._cacheTimers[e.key]&&(clearTimeout(this._cacheTimers[e.key]),delete this._cacheTimers[e.key],this._setTileReloadTimer(e.key,r)));let n=r;return r||(r=new ce(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(r,e.key,r.state)),r.uses++,this._tiles[e.key]=r,n||this._source.fire(new t.k("dataloading",{tile:r,coord:r.tileID,dataType:"source"})),r}_setTileReloadTimer(e,t){e in this._timers&&(clearTimeout(this._timers[e]),delete this._timers[e]);let r=t.getExpiryTimeout();r&&(this._timers[e]=setTimeout((()=>{this._reloadTile(e,"expired"),delete this._timers[e]}),r))}_removeTile(e){let t=this._tiles[e];t&&(t.uses--,delete this._tiles[e],this._timers[e]&&(clearTimeout(this._timers[e]),delete this._timers[e]),t.uses>0||(t.hasData()&&"reloading"!==t.state?this._cache.add(t.tileID,t,t.getExpiryTimeout()):(t.aborted=!0,this._abortTile(t),this._unloadTile(t))))}_dataHandler(e){let t=e.sourceDataType;"source"===e.dataType&&"metadata"===t&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&"source"===e.dataType&&"content"===t&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let e in this._tiles)this._removeTile(e);this._cache.reset()}tilesIn(e,r,n){let i=[],a=this.transform;if(!a)return i;let o=n?a.getCameraQueryGeometry(e):e,s=e.map((e=>a.pointCoordinate(e,this.terrain))),l=o.map((e=>a.pointCoordinate(e,this.terrain))),c=this.getIds(),u=1/0,h=1/0,f=-1/0,p=-1/0;for(let e of l)u=Math.min(u,e.x),h=Math.min(h,e.y),f=Math.max(f,e.x),p=Math.max(p,e.y);for(let e=0;e=0&&g[1].y+m>=0){let e=s.map((e=>o.getTilePoint(e))),t=l.map((e=>o.getTilePoint(e)));i.push({tile:n,tileID:o,queryGeometry:e,cameraQueryGeometry:t,scale:d})}}return i}getVisibleCoordinates(e){let t=this.getRenderableIds(e).map((e=>this._tiles[e].tileID));for(let e of t)e.posMatrix=this.transform.calculatePosMatrix(e.toUnwrapped());return t}hasTransition(){if(this._source.hasTransition())return!0;if(de(this._source.type)){let e=a.now();for(let t in this._tiles)if(this._tiles[t].fadeEndTime>=e)return!0}return!1}setFeatureState(e,t,r){this._state.updateState(e=e||"_geojsonTileLayer",t,r)}removeFeatureState(e,t,r){this._state.removeFeatureState(e=e||"_geojsonTileLayer",t,r)}getFeatureState(e,t){return this._state.getState(e=e||"_geojsonTileLayer",t)}setDependencies(e,t,r){let n=this._tiles[e];n&&n.setDependencies(t,r)}reloadTilesForDependencies(e,t){for(let r in this._tiles)this._tiles[r].hasDependency(e,t)&&this._reloadTile(r,"reloading");this._cache.filter((r=>!r.hasDependency(e,t)))}}function pe(e,t){let r=Math.abs(2*e.wrap)-+(e.wrap<0),n=Math.abs(2*t.wrap)-+(t.wrap<0);return e.overscaledZ-t.overscaledZ||n-r||t.canonical.y-e.canonical.y||t.canonical.x-e.canonical.x}function de(e){return"raster"===e||"image"===e||"video"===e}fe.maxOverzooming=10,fe.maxUnderzooming=3;class me{constructor(e,t){this.reset(e,t)}reset(e,t){this.points=e||[],this._distances=[0];for(let e=1;e0?(i-o)/s:0;return this.points[a].mult(1-l).add(this.points[r].mult(l))}}function ge(e,t){let r=!0;return"always"===e||"never"!==e&&"never"!==t||(r=!1),r}class ye{constructor(e,t,r){let n=this.boxCells=[],i=this.circleCells=[];this.xCellCount=Math.ceil(e/r),this.yCellCount=Math.ceil(t/r);for(let e=0;ethis.width||n<0||t>this.height)return[];let s=[];if(e<=0&&t<=0&&this.width<=r&&this.height<=n){if(i)return[{key:null,x1:e,y1:t,x2:r,y2:n}];for(let e=0;e0}hitTestCircle(e,t,r,n,i){let a=e-r,o=e+r,s=t-r,l=t+r;if(o<0||a>this.width||l<0||s>this.height)return!1;let c=[];return this._forEachCell(a,s,o,l,this._queryCellCircle,c,{hitTest:!0,overlapMode:n,circle:{x:e,y:t,radius:r},seenUids:{box:{},circle:{}}},i),c.length>0}_queryCell(e,t,r,n,i,a,o,s){let{seenUids:l,hitTest:c,overlapMode:u}=o,h=this.boxCells[i];if(null!==h){let i=this.bboxes;for(let o of h)if(!l.box[o]){l.box[o]=!0;let h=4*o,f=this.boxKeys[o];if(e<=i[h+2]&&t<=i[h+3]&&r>=i[h+0]&&n>=i[h+1]&&(!s||s(f))&&(!c||!ge(u,f.overlapMode))&&(a.push({key:f,x1:i[h],y1:i[h+1],x2:i[h+2],y2:i[h+3]}),c))return!0}}let f=this.circleCells[i];if(null!==f){let i=this.circles;for(let o of f)if(!l.circle[o]){l.circle[o]=!0;let h=3*o,f=this.circleKeys[o];if(this._circleAndRectCollide(i[h],i[h+1],i[h+2],e,t,r,n)&&(!s||s(f))&&(!c||!ge(u,f.overlapMode))){let e=i[h],t=i[h+1],r=i[h+2];if(a.push({key:f,x1:e-r,y1:t-r,x2:e+r,y2:t+r}),c)return!0}}}return!1}_queryCellCircle(e,t,r,n,i,a,o,s){let{circle:l,seenUids:c,overlapMode:u}=o,h=this.boxCells[i];if(null!==h){let e=this.bboxes;for(let t of h)if(!c.box[t]){c.box[t]=!0;let r=4*t,n=this.boxKeys[t];if(this._circleAndRectCollide(l.x,l.y,l.radius,e[r+0],e[r+1],e[r+2],e[r+3])&&(!s||s(n))&&!ge(u,n.overlapMode))return a.push(!0),!0}}let f=this.circleCells[i];if(null!==f){let e=this.circles;for(let t of f)if(!c.circle[t]){c.circle[t]=!0;let r=3*t,n=this.circleKeys[t];if(this._circlesCollide(e[r],e[r+1],e[r+2],l.x,l.y,l.radius)&&(!s||s(n))&&!ge(u,n.overlapMode))return a.push(!0),!0}}}_forEachCell(e,t,r,n,i,a,o,s){let l=this._convertToXCellCoord(e),c=this._convertToYCellCoord(t),u=this._convertToXCellCoord(r),h=this._convertToYCellCoord(n);for(let f=l;f<=u;f++)for(let l=c;l<=h;l++)if(i.call(this,e,t,r,n,this.xCellCount*l+f,a,o,s))return}_convertToXCellCoord(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}_convertToYCellCoord(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}_circlesCollide(e,t,r,n,i,a){let o=n-e,s=i-t,l=r+a;return l*l>o*o+s*s}_circleAndRectCollide(e,t,r,n,i,a,o){let s=(a-n)/2,l=Math.abs(e-(n+s));if(l>s+r)return!1;let c=(o-i)/2,u=Math.abs(t-(i+c));if(u>c+r)return!1;if(l<=s||u<=c)return!0;let h=l-s,f=u-c;return h*h+f*f<=r*r}}function ve(e,r,n,i,a){let o=t.H();return r?(t.K(o,o,[1/a,1/a,1]),n||t.ad(o,o,i.angle)):t.L(o,i.labelPlaneMatrix,e),o}function xe(e,r,n,i,a){if(r){let r=t.ae(e);return t.K(r,r,[a,a,1]),n||t.ad(r,r,-i.angle),r}return i.glCoordMatrix}function _e(e,r,n,i){let a;i?(a=[e,r,i(e,r),1],t.af(a,a,n)):(a=[e,r,0,1],Oe(a,a,n));let o=a[3];return{point:new t.P(a[0]/o,a[1]/o),signedDistanceFromCamera:o,isOccluded:!1}}function be(e,t){return.5+e/t*.5}function we(e,t){return e.x>=-t[0]&&e.x<=t[0]&&e.y>=-t[1]&&e.y<=t[1]}function Te(e,r,n,i,a,o,s,l,c,u,h,f,p,d,m){let g=i?e.textSizeData:e.iconSizeData,y=t.ag(g,n.transform.zoom),v=[256/n.width*2+1,256/n.height*2+1],x=i?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;x.clear();let _=e.lineVertexArray,b=i?e.text.placedSymbolArray:e.icon.placedSymbolArray,w=n.transform.width/n.transform.height,T=!1;for(let i=0;iMath.abs(n.x-r.x)*i?{useVertical:!0}:(e===t.ah.vertical?r.yn.x)?{needsFlipping:!0}:null}function Me(e,r,n,i,a,o,s,l,c,u,h){let f,p=n/24,d=r.lineOffsetX*p,m=r.lineOffsetY*p;if(r.numGlyphs>1){let t=r.glyphStartIndex+r.numGlyphs,n=r.lineStartIndex,o=r.lineStartIndex+r.lineLength,c=ke(p,l,d,m,i,r,h,e);if(!c)return{notEnoughRoom:!0};let g=_e(c.first.point.x,c.first.point.y,s,e.getElevation).point,y=_e(c.last.point.x,c.last.point.y,s,e.getElevation).point;if(a&&!i){let e=Ae(r.writingMode,g,y,u);if(e)return e}f=[c.first];for(let a=r.glyphStartIndex+1;a0?s.point:Se(e.tileAnchorPoint,a,n,1,o,e),c=Ae(r.writingMode,n,l,u);if(c)return c}let n=Pe(p*l.getoffsetX(r.glyphStartIndex),d,m,i,r.segment,r.lineStartIndex,r.lineStartIndex+r.lineLength,e,h);if(!n||e.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};f=[n]}for(let e of f)t.aj(c,e.point,e.angle);return{}}function Se(e,t,r,n,i,a){let o=e.add(e.sub(t)._unit()),s=void 0!==i?_e(o.x,o.y,i,a.getElevation).point:Ce(o.x,o.y,a).point,l=r.sub(s);return r.add(l._mult(n/l.mag()))}function Ee(e,r,n){let i=r.projectionCache;if(i.projections[e])return i.projections[e];let a=new t.P(r.lineVertexArray.getx(e),r.lineVertexArray.gety(e)),o=Ce(a.x,a.y,r);if(o.signedDistanceFromCamera>0)return i.projections[e]=o.point,i.anyProjectionOccluded=i.anyProjectionOccluded||o.isOccluded,o.point;let s=e-n.direction;return Se(0===n.distanceFromAnchor?r.tileAnchorPoint:new t.P(r.lineVertexArray.getx(s),r.lineVertexArray.gety(s)),a,n.previousVertex,n.absOffsetX-n.distanceFromAnchor+1,void 0,r)}function Ce(e,t,r){let n,i=e+r.translation[0],a=t+r.translation[1];return!r.pitchWithMap&&r.projection.useSpecialProjectionForSymbols?(n=r.projection.projectTileCoordinates(i,a,r.unwrappedTileID,r.getElevation),n.point.x=(.5*n.point.x+.5)*r.width,n.point.y=(.5*-n.point.y+.5)*r.height):(n=_e(i,a,r.labelPlaneMatrix,r.getElevation),n.isOccluded=!1),n}function Ie(e,t,r){return e._unit()._perp()._mult(t*r)}function Le(e,r,n,i,a,o,s,l,c){if(l.projectionCache.offsets[e])return l.projectionCache.offsets[e];let u=n.add(r);if(e+c.direction=a)return l.projectionCache.offsets[e]=u,u;let h=Ee(e+c.direction,l,c),f=Ie(h.sub(n),s,c.direction),p=n.add(f),d=h.add(f);return l.projectionCache.offsets[e]=t.ak(o,u,p,d)||u,l.projectionCache.offsets[e]}function Pe(e,t,r,n,i,a,o,s,l){let c=n?e-t:e+t,u=c>0?1:-1,h=0;n&&(u*=-1,h=Math.PI),u<0&&(h+=Math.PI);let f,p=u>0?a+i:a+i+1;s.projectionCache.cachedAnchorPoint?f=s.projectionCache.cachedAnchorPoint:(f=Ce(s.tileAnchorPoint.x,s.tileAnchorPoint.y,s).point,s.projectionCache.cachedAnchorPoint=f);let d,m,g,y=f,v=f,x=0,_=0,b=Math.abs(c),w=[];for(;x+_<=b;){if(p+=u,p=o)return null;x+=_,v=y,m=d;let e={absOffsetX:b,direction:u,distanceFromAnchor:x,previousVertex:v};if(y=Ee(p,s,e),0===r)w.push(v),g=y.sub(v);else{let t,n=y.sub(v);t=0===n.mag()?Ie(Ee(p+u,s,e).sub(y),r,u):Ie(n,r,u),m||(m=v.add(t)),d=Le(p,t,y,a,o,m,r,s,e),w.push(m),g=d.sub(m)}_=g.mag()}let T=g._mult((b-x)/_)._add(m||v),k=h+Math.atan2(y.y-v.y,y.x-v.x);return w.push(T),{point:T,angle:l?k:0,path:w}}let ze=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function De(e,t){for(let r=0;r=1;e--)l.push(o.path[e]);for(let e=1;ee.signedDistanceFromCamera<=0))?[]:e.map((e=>e.point))}let m=[];if(l.length>0){let e=l[0].clone(),r=l[0].clone();for(let t=1;t=n.x&&r.x<=i.x&&e.y>=n.y&&r.y<=i.y?[l]:r.xi.x||r.yi.y?[]:t.al([l],n.x,n.y,i.x,i.y)}for(let t of m){a.reset(t,.25*r);let n=0;n=a.length<=.5*r?1:Math.ceil(a.paddedLength/h)+1;for(let t=0;t_e(e.x,e.y,r,t.getElevation)))}queryRenderedSymbols(e){if(0===e.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};let r=[],n=1/0,i=1/0,a=-1/0,o=-1/0;for(let s of e){let e=new t.P(s.x+Re,s.y+Re);n=Math.min(n,e.x),i=Math.min(i,e.y),a=Math.max(a,e.x),o=Math.max(o,e.y),r.push(e)}let s=this.grid.query(n,i,a,o).concat(this.ignoredGrid.query(n,i,a,o)),l={},c={};for(let e of s){let n=e.key;if(void 0===l[n.bucketInstanceId]&&(l[n.bucketInstanceId]={}),l[n.bucketInstanceId][n.featureIndex])continue;let i=[new t.P(e.x1,e.y1),new t.P(e.x2,e.y1),new t.P(e.x2,e.y2),new t.P(e.x1,e.y2)];t.am(r,i)&&(l[n.bucketInstanceId][n.featureIndex]=!0,void 0===c[n.bucketInstanceId]&&(c[n.bucketInstanceId]=[]),c[n.bucketInstanceId].push(n.featureIndex))}return c}insertCollisionBox(e,t,r,n,i,a){(r?this.ignoredGrid:this.grid).insert({bucketInstanceId:n,featureIndex:i,collisionGroupID:a,overlapMode:t},e[0],e[1],e[2],e[3])}insertCollisionCircles(e,t,r,n,i,a){let o=r?this.ignoredGrid:this.grid,s={bucketInstanceId:n,featureIndex:i,collisionGroupID:a,overlapMode:t};for(let t=0;t=this.screenRightBoundary||nthis.screenBottomBoundary}isInsideGrid(e,t,r,n){return r>=0&&e=0&&tthis.projectAndGetPerspectiveRatio(n,e.x,e.y,i,c)));k=e.some((e=>!e.isOccluded)),T=e.map((e=>e.point))}else k=!0;return{box:t.ao(T),allPointsOccluded:!k}}}function Be(e,r,n){return r*(t.X/(e.tileSize*Math.pow(2,n-e.tileID.overscaledZ)))}class je{constructor(e,t,r,n){this.opacity=e?Math.max(0,Math.min(1,e.opacity+(e.placed?t:-t))):n&&r?1:0,this.placed=r}isHidden(){return 0===this.opacity&&!this.placed}}class Ne{constructor(e,t,r,n,i){this.text=new je(e?e.text:null,t,r,i),this.icon=new je(e?e.icon:null,t,n,i)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Ue{constructor(e,t,r){this.text=e,this.icon=t,this.skipFade=r}}class Ve{constructor(){this.invProjMatrix=t.H(),this.viewportMatrix=t.H(),this.circles=[]}}class qe{constructor(e,t,r,n,i){this.bucketInstanceId=e,this.featureIndex=t,this.sourceLayerIndex=r,this.bucketIndex=n,this.tileID=i}}class He{constructor(e){this.crossSourceCollisions=e,this.maxGroupID=0,this.collisionGroups={}}get(e){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[e]){let t=++this.maxGroupID;this.collisionGroups[e]={ID:t,predicate:e=>e.collisionGroupID===t}}return this.collisionGroups[e]}}function Ge(e,r,n,i,a){let{horizontalAlign:o,verticalAlign:s}=t.au(e);return new t.P(-(o-.5)*r+i[0]*a,-(s-.5)*n+i[1]*a)}class We{constructor(e,t,r,n,i,a){this.transform=e.clone(),this.terrain=r,this.collisionIndex=new Fe(this.transform,t),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=n,this.retainedQueryData={},this.collisionGroups=new He(i),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=a,a&&(a.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(e){let t=this.terrain;return t?(r,n)=>t.getElevation(e,r,n):null}getBucketParts(e,r,n,i){let a=n.getBucket(r),o=n.latestFeatureIndex;if(!a||!o||r.id!==a.layerIds[0])return;let s=n.collisionBoxArray,l=a.layers[0].layout,c=a.layers[0].paint,u=Math.pow(2,this.transform.zoom-n.tileID.overscaledZ),h=n.tileSize/t.X,f=n.tileID.toUnwrapped(),p=this.transform.calculatePosMatrix(f),d="map"===l.get("text-pitch-alignment"),m="map"===l.get("text-rotation-alignment"),g=Be(n,1,this.transform.zoom),y=this.collisionIndex.mapProjection.translatePosition(this.transform,n,c.get("text-translate"),c.get("text-translate-anchor")),v=this.collisionIndex.mapProjection.translatePosition(this.transform,n,c.get("icon-translate"),c.get("icon-translate-anchor")),x=ve(p,d,m,this.transform,g),_=null;if(d){let e=xe(p,d,m,this.transform,g);_=t.L([],this.transform.labelPlaneMatrix,e)}this.retainedQueryData[a.bucketInstanceId]=new qe(a.bucketInstanceId,o,a.sourceLayerIndex,a.index,n.tileID);let b={bucket:a,layout:l,translationText:y,translationIcon:v,posMatrix:p,unwrappedTileID:f,textLabelPlaneMatrix:x,labelToScreenMatrix:_,scale:u,textPixelRatio:h,holdingForFade:n.holdingForFade(),collisionBoxArray:s,partiallyEvaluatedTextSize:t.ag(a.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(a.sourceID)};if(i)for(let t of a.sortKeyRanges){let{sortKey:r,symbolInstanceStart:n,symbolInstanceEnd:i}=t;e.push({sortKey:r,symbolInstanceStart:n,symbolInstanceEnd:i,parameters:b})}else e.push({symbolInstanceStart:0,symbolInstanceEnd:a.symbolInstances.length,parameters:b})}attemptAnchorPlacement(e,r,n,i,a,o,s,l,c,u,h,f,p,d,m,g,y,v,x){let _=t.aq[e.textAnchor],b=[e.textOffset0,e.textOffset1],w=Ge(_,n,i,b,a),T=this.collisionIndex.placeCollisionBox(r,f,l,c,u,s,o,g,h.predicate,x,w);if((!v||this.collisionIndex.placeCollisionBox(v,f,l,c,u,s,o,y,h.predicate,x,w).placeable)&&T.placeable){let e;if(this.prevPlacement&&this.prevPlacement.variableOffsets[p.crossTileID]&&this.prevPlacement.placements[p.crossTileID]&&this.prevPlacement.placements[p.crossTileID].text&&(e=this.prevPlacement.variableOffsets[p.crossTileID].anchor),0===p.crossTileID)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[p.crossTileID]={textOffset:b,width:n,height:i,anchor:_,textBoxScale:a,prevAnchor:e},this.markUsedJustification(d,_,p,m),d.allowVerticalPlacement&&(this.markUsedOrientation(d,m,p),this.placedOrientations[p.crossTileID]=m),{shift:w,placedGlyphBoxes:T}}}placeLayerBucketPart(e,r,n){let{bucket:i,layout:a,translationText:o,translationIcon:s,posMatrix:l,unwrappedTileID:c,textLabelPlaneMatrix:u,labelToScreenMatrix:h,textPixelRatio:f,holdingForFade:p,collisionBoxArray:d,partiallyEvaluatedTextSize:m,collisionGroup:g}=e.parameters,y=a.get("text-optional"),v=a.get("icon-optional"),x=t.ar(a,"text-overlap","text-allow-overlap"),_="always"===x,b=t.ar(a,"icon-overlap","icon-allow-overlap"),w="always"===b,T="map"===a.get("text-rotation-alignment"),k="map"===a.get("text-pitch-alignment"),A="none"!==a.get("icon-text-fit"),M="viewport-y"===a.get("symbol-z-order"),S=_&&(w||!i.hasIconData()||v),E=w&&(_||!i.hasTextData()||y);!i.collisionArrays&&d&&i.deserializeCollisionBoxes(d);let C=this._getTerrainElevationFunc(this.retainedQueryData[i.bucketInstanceId].tileID),I=(e,d,w)=>{var M,I;if(r[e.crossTileID])return;if(p)return void(this.placements[e.crossTileID]=new Ue(!1,!1,!1));let L=!1,P=!1,z=!0,D=null,O={box:null,placeable:!1,offscreen:null},R={box:null,placeable:!1,offscreen:null},F=null,B=null,j=null,N=0,U=0,V=0;d.textFeatureIndex?N=d.textFeatureIndex:e.useRuntimeCollisionCircles&&(N=e.featureIndex),d.verticalTextFeatureIndex&&(U=d.verticalTextFeatureIndex);let q=d.textBox;if(q){let r=r=>{let n=t.ah.horizontal;if(i.allowVerticalPlacement&&!r&&this.prevPlacement){let t=this.prevPlacement.placedOrientations[e.crossTileID];t&&(this.placedOrientations[e.crossTileID]=t,n=t,this.markUsedOrientation(i,n,e))}return n},a=(r,n)=>{if(i.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&d.verticalTextBox){for(let e of i.writingModes)if(e===t.ah.vertical?(O=n(),R=O):O=r(),O&&O.placeable)break}else O=r()},u=e.textAnchorOffsetStartIndex,h=e.textAnchorOffsetEndIndex;if(h===u){let n=(t,r)=>{let n=this.collisionIndex.placeCollisionBox(t,x,f,l,c,k,T,o,g.predicate,C);return n&&n.placeable&&(this.markUsedOrientation(i,r,e),this.placedOrientations[e.crossTileID]=r),n};a((()=>n(q,t.ah.horizontal)),(()=>{let r=d.verticalTextBox;return i.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&r?n(r,t.ah.vertical):{box:null,offscreen:null}})),r(O&&O.placeable)}else{let p=t.aq[null===(I=null===(M=this.prevPlacement)||void 0===M?void 0:M.variableOffsets[e.crossTileID])||void 0===I?void 0:I.anchor],m=(r,a,d)=>{let m=r.x2-r.x1,y=r.y2-r.y1,v=e.textBoxScale,_=A&&"never"===b?a:null,w=null,M="never"===x?1:2,S="never";p&&M++;for(let t=0;tm(q,d.iconBox,t.ah.horizontal)),(()=>{let r=d.verticalTextBox;return i.allowVerticalPlacement&&(!O||!O.placeable)&&e.numVerticalGlyphVertices>0&&r?m(r,d.verticalIconBox,t.ah.vertical):{box:null,occluded:!0,offscreen:null}})),O&&(L=O.placeable,z=O.offscreen);let y=r(O&&O.placeable);if(!L&&this.prevPlacement){let t=this.prevPlacement.variableOffsets[e.crossTileID];t&&(this.variableOffsets[e.crossTileID]=t,this.markUsedJustification(i,t.anchor,e,y))}}}if(F=O,L=F&&F.placeable,z=F&&F.offscreen,e.useRuntimeCollisionCircles){let r=i.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex),s=t.ai(i.textSizeData,m,r),f=a.get("text-padding");B=this.collisionIndex.placeCollisionCircles(x,r,i.lineVertexArray,i.glyphOffsetArray,s,l,c,u,h,n,k,g.predicate,e.collisionCircleDiameter,f,o,C),B.circles.length&&B.collisionDetected&&!n&&t.w("Collisions detected, but collision boxes are not shown"),L=_||B.circles.length>0&&!B.collisionDetected,z=z&&B.offscreen}if(d.iconFeatureIndex&&(V=d.iconFeatureIndex),d.iconBox){let e=e=>this.collisionIndex.placeCollisionBox(e,b,f,l,c,k,T,s,g.predicate,C,A&&D?D:void 0);R&&R.placeable&&d.verticalIconBox?(j=e(d.verticalIconBox),P=j.placeable):(j=e(d.iconBox),P=j.placeable),z=z&&j.offscreen}let H=y||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,G=v||0===e.numIconVertices;H||G?G?H||(P=P&&L):L=P&&L:P=L=P&&L;let W=P&&j.placeable;if(L&&F.placeable&&this.collisionIndex.insertCollisionBox(F.box,x,a.get("text-ignore-placement"),i.bucketInstanceId,R&&R.placeable&&U?U:N,g.ID),W&&this.collisionIndex.insertCollisionBox(j.box,b,a.get("icon-ignore-placement"),i.bucketInstanceId,V,g.ID),B&&L&&this.collisionIndex.insertCollisionCircles(B.circles,x,a.get("text-ignore-placement"),i.bucketInstanceId,N,g.ID),n&&this.storeCollisionData(i.bucketInstanceId,w,d,F,j,B),0===e.crossTileID)throw new Error("symbolInstance.crossTileID can't be 0");if(0===i.bucketInstanceId)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[e.crossTileID]=new Ue(L||S,P||E,z||i.justReloaded),r[e.crossTileID]=!0};if(M){if(0!==e.symbolInstanceStart)throw new Error("bucket.bucketInstanceId should be 0");let t=i.getSortedSymbolIndexes(this.transform.angle);for(let e=t.length-1;e>=0;--e){let r=t[e];I(i.symbolInstances.get(r),i.collisionArrays[r],r)}}else for(let t=e.symbolInstanceStart;t=0&&(e.text.placedSymbolArray.get(t).crossTileID=a>=0&&t!==a?0:n.crossTileID)}markUsedOrientation(e,r,n){let i=r===t.ah.horizontal||r===t.ah.horizontalOnly?r:0,a=r===t.ah.vertical?r:0,o=[n.leftJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.rightJustifiedTextSymbolIndex];for(let t of o)e.text.placedSymbolArray.get(t).placedOrientation=i;n.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(n.verticalPlacedTextSymbolIndex).placedOrientation=a)}commit(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;let t=this.prevPlacement,r=!1;this.prevZoomAdjustment=t?t.zoomAdjustment(this.transform.zoom):0;let n=t?t.symbolFadeChange(e):1,i=t?t.opacities:{},a=t?t.variableOffsets:{},o=t?t.placedOrientations:{};for(let e in this.placements){let t=this.placements[e],a=i[e];a?(this.opacities[e]=new Ne(a,n,t.text,t.icon),r=r||t.text!==a.text.placed||t.icon!==a.icon.placed):(this.opacities[e]=new Ne(null,n,t.text,t.icon,t.skipFade),r=r||t.text||t.icon)}for(let e in i){let t=i[e];if(!this.opacities[e]){let i=new Ne(t,n,!1,!1);i.isHidden()||(this.opacities[e]=i,r=r||t.text.placed||t.icon.placed)}}for(let e in a)this.variableOffsets[e]||!this.opacities[e]||this.opacities[e].isHidden()||(this.variableOffsets[e]=a[e]);for(let e in o)this.placedOrientations[e]||!this.opacities[e]||this.opacities[e].isHidden()||(this.placedOrientations[e]=o[e]);if(t&&void 0===t.lastPlacementChangeTime)throw new Error("Last placement time for previous placement is not defined");r?this.lastPlacementChangeTime=e:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)}updateLayerOpacities(e,t){let r={};for(let n of t){let t=n.getBucket(e);t&&n.latestFeatureIndex&&e.id===t.layerIds[0]&&this.updateBucketOpacities(t,n.tileID,r,n.collisionBoxArray)}}updateBucketOpacities(e,r,n,i){e.hasTextData()&&(e.text.opacityVertexArray.clear(),e.text.hasVisibleVertices=!1),e.hasIconData()&&(e.icon.opacityVertexArray.clear(),e.icon.hasVisibleVertices=!1),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexArray.clear(),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexArray.clear();let a=e.layers[0],o=a.layout,s=new Ne(null,0,!1,!1,!0),l=o.get("text-allow-overlap"),c=o.get("icon-allow-overlap"),u=a._unevaluatedLayout.hasValue("text-variable-anchor")||a._unevaluatedLayout.hasValue("text-variable-anchor-offset"),h="map"===o.get("text-rotation-alignment"),f="map"===o.get("text-pitch-alignment"),p="none"!==o.get("icon-text-fit"),d=new Ne(null,0,l&&(c||!e.hasIconData()||o.get("icon-optional")),c&&(l||!e.hasTextData()||o.get("text-optional")),!0);!e.collisionArrays&&i&&(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData())&&e.deserializeCollisionBoxes(i);let m=(e,t,r)=>{for(let n=0;n0,v=this.placedOrientations[i.crossTileID],x=v===t.ah.vertical,_=v===t.ah.horizontal||v===t.ah.horizontalOnly;if(a>0||o>0){let t=tt(c.text);m(e.text,a,x?rt:t),m(e.text,o,_?rt:t);let r=c.text.isHidden();[i.rightJustifiedTextSymbolIndex,i.centerJustifiedTextSymbolIndex,i.leftJustifiedTextSymbolIndex].forEach((t=>{t>=0&&(e.text.placedSymbolArray.get(t).hidden=r||x?1:0)})),i.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(i.verticalPlacedTextSymbolIndex).hidden=r||_?1:0);let n=this.variableOffsets[i.crossTileID];n&&this.markUsedJustification(e,n.anchor,i,v);let s=this.placedOrientations[i.crossTileID];s&&(this.markUsedJustification(e,"left",i,s),this.markUsedOrientation(e,s,i))}if(y){let t=tt(c.icon),r=!(p&&i.verticalPlacedIconSymbolIndex&&x);i.placedIconSymbolIndex>=0&&(m(e.icon,i.numIconVertices,r?t:rt),e.icon.placedSymbolArray.get(i.placedIconSymbolIndex).hidden=c.icon.isHidden()),i.verticalPlacedIconSymbolIndex>=0&&(m(e.icon,i.numVerticalIconVertices,r?rt:t),e.icon.placedSymbolArray.get(i.verticalPlacedIconSymbolIndex).hidden=c.icon.isHidden())}let b=g&&g.has(r)?g.get(r):{text:null,icon:null};if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){let n=e.collisionArrays[r];if(n){let r=new t.P(0,0);if(n.textBox||n.verticalTextBox){let t=!0;if(u){let e=this.variableOffsets[l];e?(r=Ge(e.anchor,e.width,e.height,e.textOffset,e.textBoxScale),h&&r._rotate(f?this.transform.angle:-this.transform.angle)):t=!1}if(n.textBox||n.verticalTextBox){let i;n.textBox&&(i=x),n.verticalTextBox&&(i=_),Ze(e.textCollisionBox.collisionVertexArray,c.text.placed,!t||i,b.text,r.x,r.y)}}if(n.iconBox||n.verticalIconBox){let t,i=!(_||!n.verticalIconBox);n.iconBox&&(t=i),n.verticalIconBox&&(t=!i),Ze(e.iconCollisionBox.collisionVertexArray,c.icon.placed,t,b.icon,p?r.x:0,p?r.y:0)}}}}if(e.sortFeatures(this.transform.angle),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexBuffer&&e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexBuffer&&e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray),e.text.opacityVertexArray.length!==e.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${e.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${e.text.layoutVertexArray.length}) / 4`);if(e.icon.opacityVertexArray.length!==e.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${e.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${e.icon.layoutVertexArray.length}) / 4`);if(e.bucketInstanceId in this.collisionCircleArrays){let t=this.collisionCircleArrays[e.bucketInstanceId];e.placementInvProjMatrix=t.invProjMatrix,e.placementViewportMatrix=t.viewportMatrix,e.collisionCircleArray=t.circles,delete this.collisionCircleArrays[e.bucketInstanceId]}}symbolFadeChange(e){return 0===this.fadeDuration?1:(e-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(e){return Math.max(0,(this.transform.zoom-e)/1.5)}hasTransitions(e){return this.stale||e-this.lastPlacementChangeTimee}setStale(){this.stale=!0}}function Ze(e,t,r,n,i,a){n&&0!==n.length||(n=[0,0,0,0]);let o=n[0]-Re,s=n[1]-Re,l=n[2]-Re,c=n[3]-Re;e.emplaceBack(t?1:0,r?1:0,i||0,a||0,o,s),e.emplaceBack(t?1:0,r?1:0,i||0,a||0,l,s),e.emplaceBack(t?1:0,r?1:0,i||0,a||0,l,c),e.emplaceBack(t?1:0,r?1:0,i||0,a||0,o,c)}let Ye=Math.pow(2,25),Xe=Math.pow(2,24),$e=Math.pow(2,17),Ke=Math.pow(2,16),Je=Math.pow(2,9),Qe=Math.pow(2,8),et=Math.pow(2,1);function tt(e){if(0===e.opacity&&!e.placed)return 0;if(1===e.opacity&&e.placed)return 4294967295;let t=e.placed?1:0,r=Math.floor(127*e.opacity);return r*Ye+t*Xe+r*$e+t*Ke+r*Je+t*Qe+r*et+t}let rt=0;function nt(){return{isOccluded:(e,t,r)=>!1,getPitchedTextCorrection:(e,t,r)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(e,t,r,n){throw new Error("Not implemented.")},translatePosition:(e,t,r,n)=>function(e,t,r,n,i=!1){if(!r[0]&&!r[1])return[0,0];let a=i?"map"===n?e.angle:0:"viewport"===n?-e.angle:0;if(a){let e=Math.sin(a),t=Math.cos(a);r=[r[0]*t-r[1]*e,r[0]*e+r[1]*t]}return[i?r[0]:Be(t,r[0],e.zoom),i?r[1]:Be(t,r[1],e.zoom)]}(e,t,r,n),getCircleRadiusCorrection:e=>1}}class it{constructor(e){this._sortAcrossTiles="viewport-y"!==e.layout.get("symbol-z-order")&&!e.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(e,t,r,n,i){let a=this._bucketParts;for(;this._currentTileIndexe.sortKey-t.sortKey)));this._currentPartIndex!this._forceFullPlacement&&a.now()-n>2;for(;this._currentPlacementIndex>=0;){let n=t[e[this._currentPlacementIndex]],a=this.placement.collisionIndex.transform.zoom;if("symbol"===n.type&&(!n.minzoom||n.minzoom<=a)&&(!n.maxzoom||n.maxzoom>a)){if(this._inProgressLayer||(this._inProgressLayer=new it(n)),this._inProgressLayer.continuePlacement(r[n.source],this.placement,this._showCollisionBoxes,n,i))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(e){return this.placement.commit(e),this.placement}}let ot=512/t.X/2;class st{constructor(e,r,n){this.tileID=e,this.bucketInstanceId=n,this._symbolsByKey={};let i=new Map;for(let e=0;e({x:Math.floor(e.anchorX*ot),y:Math.floor(e.anchorY*ot)}))),crossTileIDs:r.map((e=>e.crossTileID))};if(n.positions.length>128){let e=new t.av(n.positions.length,16,Uint16Array);for(let{x:t,y:r}of n.positions)e.add(t,r);e.finish(),delete n.positions,n.index=e}this._symbolsByKey[e]=n}}getScaledCoordinates(e,r){let{x:n,y:i,z:a}=this.tileID.canonical,{x:o,y:s,z:l}=r.canonical,c=ot/Math.pow(2,l-a),u=(s*t.X+e.anchorY)*c,h=i*t.X*ot;return{x:Math.floor((o*t.X+e.anchorX)*c-n*t.X*ot),y:Math.floor(u-h)}}findMatches(e,t,r){let n=this.tileID.canonical.ze))}}class lt{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class ct{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(e){let t=Math.round((e-this.lng)/360);if(0!==t)for(let e in this.indexes){let r=this.indexes[e],n={};for(let e in r){let i=r[e];i.tileID=i.tileID.unwrapTo(i.tileID.wrap+t),n[i.tileID.key]=i}this.indexes[e]=n}this.lng=e}addBucket(e,t,r){if(this.indexes[e.overscaledZ]&&this.indexes[e.overscaledZ][e.key]){if(this.indexes[e.overscaledZ][e.key].bucketInstanceId===t.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(e.overscaledZ,this.indexes[e.overscaledZ][e.key])}for(let e=0;ee.overscaledZ)for(let r in i){let a=i[r];a.tileID.isChildOf(e)&&a.findMatches(t.symbolInstances,e,n)}else{let a=i[e.scaledTo(Number(r)).key];a&&a.findMatches(t.symbolInstances,e,n)}}for(let e=0;e{t[e]=!0}));for(let e in this.layerIndexes)t[e]||delete this.layerIndexes[e]}}let ht=(e,r)=>t.t(e,r&&r.filter((e=>"source.canvas"!==e.identifier))),ft=t.aw();class pt extends t.E{constructor(e,r={}){super(),this._rtlPluginLoaded=()=>{for(let e in this.sourceCaches){let t=this.sourceCaches[e].getSource().type;"vector"!==t&&"geojson"!==t||this.sourceCaches[e].reload()}},this.map=e,this.dispatcher=new U(N(),e._getMapId()),this.dispatcher.registerMessageHandler("GG",((e,t)=>this.getGlyphs(e,t))),this.dispatcher.registerMessageHandler("GI",((e,t)=>this.getImages(e,t))),this.imageManager=new k,this.imageManager.setEventedParent(this),this.glyphManager=new C(e._requestManager,r.localIdeographFontFamily),this.lineAtlas=new D(256,512),this.crossTileSymbolIndex=new ut,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new t.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",t.ay()),le().on(ae,this._rtlPluginLoaded),this.on("data",(e=>{if("source"!==e.dataType||"metadata"!==e.sourceDataType)return;let t=this.sourceCaches[e.sourceId];if(!t)return;let r=t.getSource();if(r&&r.vectorLayerIds)for(let e in this._layers){let t=this._layers[e];t.source===r.id&&this._validateLayer(t)}}))}loadURL(e,r={},n){this.fire(new t.k("dataloading",{dataType:"style"})),r.validate="boolean"!=typeof r.validate||r.validate;let i=this.map._requestManager.transformRequest(e,"Style");this._loadStyleRequest=new AbortController;let a=this._loadStyleRequest;t.h(i,this._loadStyleRequest).then((e=>{this._loadStyleRequest=null,this._load(e.data,r,n)})).catch((e=>{this._loadStyleRequest=null,e&&!a.signal.aborted&&this.fire(new t.j(e))}))}loadJSON(e,r={},n){this.fire(new t.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,a.frameAsync(this._frameRequest).then((()=>{this._frameRequest=null,r.validate=!1!==r.validate,this._load(e,r,n)})).catch((()=>{}))}loadEmpty(){this.fire(new t.k("dataloading",{dataType:"style"})),this._load(ft,{validate:!1})}_load(e,r,n){var i;let a=r.transformStyle?r.transformStyle(n,e):e;if(!r.validate||!ht(this,t.u(a))){this._loaded=!0,this.stylesheet=a;for(let e in a.sources)this.addSource(e,a.sources[e],{validate:!1});a.sprite?this._loadSprite(a.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(a.glyphs),this._createLayers(),this.light=new L(this.stylesheet.light),this.sky=new z(this.stylesheet.sky),this.map.setTerrain(null!==(i=this.stylesheet.terrain)&&void 0!==i?i:null),this.fire(new t.k("data",{dataType:"style"})),this.fire(new t.k("style.load"))}}_createLayers(){let e=t.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",e),this._order=e.map((e=>e.id)),this._layers={},this._serializedLayers=null;for(let r of e){let e=t.aA(r);e.setEventedParent(this,{layer:{id:r.id}}),this._layers[r.id]=e}}_loadSprite(e,r=!1,n=void 0){let i;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(e,r,n,i){return t._(this,void 0,void 0,(function*(){let o=_(e),s=n>1?"@2x":"",l={},c={};for(let{id:e,url:n}of o){let a=r.transformRequest(b(n,s,".json"),"SpriteJSON");l[e]=t.h(a,i);let o=r.transformRequest(b(n,s,".png"),"SpriteImage");c[e]=p.getImage(o,i)}return yield Promise.all([...Object.values(l),...Object.values(c)]),function(e,r){return t._(this,void 0,void 0,(function*(){let t={};for(let n in e){t[n]={};let i=a.getImageCanvasContext((yield r[n]).data),o=(yield e[n]).data;for(let e in o){let{width:r,height:a,x:s,y:l,sdf:c,pixelRatio:u,stretchX:h,stretchY:f,content:p,textFitWidth:d,textFitHeight:m}=o[e];t[n][e]={data:null,pixelRatio:u,sdf:c,stretchX:h,stretchY:f,content:p,textFitWidth:d,textFitHeight:m,spriteData:{width:r,height:a,x:s,y:l,context:i}}}}return t}))}(l,c)}))}(e,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then((e=>{if(this._spriteRequest=null,e)for(let t in e){this._spritesImagesIds[t]=[];let n=this._spritesImagesIds[t]?this._spritesImagesIds[t].filter((t=>!(t in e))):[];for(let e of n)this.imageManager.removeImage(e),this._changedImages[e]=!0;for(let n in e[t]){let i="default"===t?n:`${t}:${n}`;this._spritesImagesIds[t].push(i),i in this.imageManager.images?this.imageManager.updateImage(i,e[t][n],!1):this.imageManager.addImage(i,e[t][n]),r&&(this._changedImages[i]=!0)}}})).catch((e=>{this._spriteRequest=null,i=e,this.fire(new t.j(i))})).finally((()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),r&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.k("data",{dataType:"style"})),n&&n(i)}))}_unloadSprite(){for(let e of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(e),this._changedImages[e]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.k("data",{dataType:"style"}))}_validateLayer(e){let r=this.sourceCaches[e.source];if(!r)return;let n=e.sourceLayer;if(!n)return;let i=r.getSource();("geojson"===i.type||i.vectorLayerIds&&-1===i.vectorLayerIds.indexOf(n))&&this.fire(new t.j(new Error(`Source layer "${n}" does not exist on source "${i.id}" as specified by style layer "${e.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let e in this.sourceCaches)if(!this.sourceCaches[e].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(e,r=!1){let n=this._serializedAllLayers();if(!e||0===e.length)return Object.values(r?t.aB(n):n);let i=[];for(let a of e)if(n[a]){let e=r?t.aB(n[a]):n[a];i.push(e)}return i}_serializedAllLayers(){let e=this._serializedLayers;if(e)return e;e=this._serializedLayers={};let t=Object.keys(this._layers);for(let r of t){let t=this._layers[r];"custom"!==t.type&&(e[r]=t.serialize())}return e}hasTransitions(){if(this.light&&this.light.hasTransition()||this.sky&&this.sky.hasTransition())return!0;for(let e in this.sourceCaches)if(this.sourceCaches[e].hasTransition())return!0;for(let e in this._layers)if(this._layers[e].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(e){if(!this._loaded)return;let r=this._changed;if(r){let t=Object.keys(this._updatedLayers),r=Object.keys(this._removedLayers);(t.length||r.length)&&this._updateWorkerLayers(t,r);for(let e in this._updatedSources){let t=this._updatedSources[e];if("reload"===t)this._reloadSource(e);else{if("clear"!==t)throw new Error(`Invalid action ${t}`);this._clearSource(e)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let t in this._updatedPaintProps)this._layers[t].updateTransitions(e);this.light.updateTransitions(e),this.sky.updateTransitions(e),this._resetUpdates()}let n={};for(let e in this.sourceCaches){let t=this.sourceCaches[e];n[e]=t.used,t.used=!1}for(let t of this._order){let r=this._layers[t];r.recalculate(e,this._availableImages),!r.isHidden(e.zoom)&&r.source&&(this.sourceCaches[r.source].used=!0)}for(let e in n){let r=this.sourceCaches[e];!!n[e]!=!!r.used&&r.fire(new t.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:e}))}this.light.recalculate(e),this.sky.recalculate(e),this.z=e.zoom,r&&this.fire(new t.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){let e=Object.keys(this._changedImages);if(e.length){for(let t in this.sourceCaches)this.sourceCaches[t].reloadTilesForDependencies(["icons","patterns"],e);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let e in this.sourceCaches)this.sourceCaches[e].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(e,t){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(e,!1),removedIds:t})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(e,r={}){var n;this._checkLoaded();let i=this.serialize();if(e=r.transformStyle?r.transformStyle(i,e):e,(null===(n=r.validate)||void 0===n||n)&&ht(this,t.u(e)))return!1;(e=t.aB(e)).layers=t.az(e.layers);let a=t.aC(i,e),o=this._getOperationsToPerform(a);if(o.unimplemented.length>0)throw new Error(`Unimplemented: ${o.unimplemented.join(", ")}.`);if(0===o.operations.length)return!1;for(let e of o.operations)e();return this.stylesheet=e,this._serializedLayers=null,!0}_getOperationsToPerform(e){let t=[],r=[];for(let n of e)switch(n.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":t.push((()=>this.addLayer.apply(this,n.args)));break;case"removeLayer":t.push((()=>this.removeLayer.apply(this,n.args)));break;case"setPaintProperty":t.push((()=>this.setPaintProperty.apply(this,n.args)));break;case"setLayoutProperty":t.push((()=>this.setLayoutProperty.apply(this,n.args)));break;case"setFilter":t.push((()=>this.setFilter.apply(this,n.args)));break;case"addSource":t.push((()=>this.addSource.apply(this,n.args)));break;case"removeSource":t.push((()=>this.removeSource.apply(this,n.args)));break;case"setLayerZoomRange":t.push((()=>this.setLayerZoomRange.apply(this,n.args)));break;case"setLight":t.push((()=>this.setLight.apply(this,n.args)));break;case"setGeoJSONSourceData":t.push((()=>this.setGeoJSONSourceData.apply(this,n.args)));break;case"setGlyphs":t.push((()=>this.setGlyphs.apply(this,n.args)));break;case"setSprite":t.push((()=>this.setSprite.apply(this,n.args)));break;case"setSky":t.push((()=>this.setSky.apply(this,n.args)));break;case"setTerrain":t.push((()=>this.map.setTerrain.apply(this,n.args)));break;case"setTransition":t.push((()=>{}));break;default:r.push(n.command)}return{operations:t,unimplemented:r}}addImage(e,r){if(this.getImage(e))return this.fire(new t.j(new Error(`An image named "${e}" already exists.`)));this.imageManager.addImage(e,r),this._afterImageUpdated(e)}updateImage(e,t){this.imageManager.updateImage(e,t)}getImage(e){return this.imageManager.getImage(e)}removeImage(e){if(!this.getImage(e))return this.fire(new t.j(new Error(`An image named "${e}" does not exist.`)));this.imageManager.removeImage(e),this._afterImageUpdated(e)}_afterImageUpdated(e){this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(e,r,n={}){if(this._checkLoaded(),void 0!==this.sourceCaches[e])throw new Error(`Source "${e}" already exists.`);if(!r.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(r).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(r.type)>=0&&this._validate(t.u.source,`sources.${e}`,r,null,n))return;this.map&&this.map._collectResourceTiming&&(r.collectResourceTiming=!0);let i=this.sourceCaches[e]=new fe(e,r,this.dispatcher);i.style=this,i.setEventedParent(this,(()=>({isSourceLoaded:i.loaded(),source:i.serialize(),sourceId:e}))),i.onAdd(this.map),this._changed=!0}removeSource(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error("There is no source with this ID");for(let r in this._layers)if(this._layers[r].source===e)return this.fire(new t.j(new Error(`Source "${e}" cannot be removed while layer "${r}" is using it.`)));let r=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],r.fire(new t.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),r.setEventedParent(null),r.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(e,t){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error(`There is no source with this ID=${e}`);let r=this.sourceCaches[e].getSource();if("geojson"!==r.type)throw new Error(`geojsonSource.type is ${r.type}, which is !== 'geojson`);r.setData(t),this._changed=!0}getSource(e){return this.sourceCaches[e]&&this.sourceCaches[e].getSource()}addLayer(e,r,n={}){this._checkLoaded();let i,a=e.id;if(this.getLayer(a))return void this.fire(new t.j(new Error(`Layer "${a}" already exists on this map.`)));if("custom"===e.type){if(ht(this,t.aD(e)))return;i=t.aA(e)}else{if("source"in e&&"object"==typeof e.source&&(this.addSource(a,e.source),e=t.aB(e),e=t.e(e,{source:a})),this._validate(t.u.layer,`layers.${a}`,e,{arrayIndex:-1},n))return;i=t.aA(e),this._validateLayer(i),i.setEventedParent(this,{layer:{id:a}})}let o=r?this._order.indexOf(r):this._order.length;if(r&&-1===o)this.fire(new t.j(new Error(`Cannot add layer "${a}" before non-existing layer "${r}".`)));else{if(this._order.splice(o,0,a),this._layerOrderChanged=!0,this._layers[a]=i,this._removedLayers[a]&&i.source&&"custom"!==i.type){let e=this._removedLayers[a];delete this._removedLayers[a],e.type!==i.type?this._updatedSources[i.source]="clear":(this._updatedSources[i.source]="reload",this.sourceCaches[i.source].pause())}this._updateLayer(i),i.onAdd&&i.onAdd(this.map)}}moveLayer(e,r){if(this._checkLoaded(),this._changed=!0,!this._layers[e])return void this.fire(new t.j(new Error(`The layer '${e}' does not exist in the map's style and cannot be moved.`)));if(e===r)return;let n=this._order.indexOf(e);this._order.splice(n,1);let i=r?this._order.indexOf(r):this._order.length;r&&-1===i?this.fire(new t.j(new Error(`Cannot move layer "${e}" before non-existing layer "${r}".`))):(this._order.splice(i,0,e),this._layerOrderChanged=!0)}removeLayer(e){this._checkLoaded();let r=this._layers[e];if(!r)return void this.fire(new t.j(new Error(`Cannot remove non-existing layer "${e}".`)));r.setEventedParent(null);let n=this._order.indexOf(e);this._order.splice(n,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=r,delete this._layers[e],this._serializedLayers&&delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],r.onRemove&&r.onRemove(this.map)}getLayer(e){return this._layers[e]}getLayersOrder(){return[...this._order]}hasLayer(e){return e in this._layers}setLayerZoomRange(e,r,n){this._checkLoaded();let i=this.getLayer(e);i?i.minzoom===r&&i.maxzoom===n||(null!=r&&(i.minzoom=r),null!=n&&(i.maxzoom=n),this._updateLayer(i)):this.fire(new t.j(new Error(`Cannot set the zoom range of non-existing layer "${e}".`)))}setFilter(e,r,n={}){this._checkLoaded();let i=this.getLayer(e);if(i){if(!t.aE(i.filter,r))return null==r?(i.filter=void 0,void this._updateLayer(i)):void(this._validate(t.u.filter,`layers.${i.id}.filter`,r,null,n)||(i.filter=t.aB(r),this._updateLayer(i)))}else this.fire(new t.j(new Error(`Cannot filter non-existing layer "${e}".`)))}getFilter(e){return t.aB(this.getLayer(e).filter)}setLayoutProperty(e,r,n,i={}){this._checkLoaded();let a=this.getLayer(e);a?t.aE(a.getLayoutProperty(r),n)||(a.setLayoutProperty(r,n,i),this._updateLayer(a)):this.fire(new t.j(new Error(`Cannot style non-existing layer "${e}".`)))}getLayoutProperty(e,r){let n=this.getLayer(e);if(n)return n.getLayoutProperty(r);this.fire(new t.j(new Error(`Cannot get style of non-existing layer "${e}".`)))}setPaintProperty(e,r,n,i={}){this._checkLoaded();let a=this.getLayer(e);a?t.aE(a.getPaintProperty(r),n)||(a.setPaintProperty(r,n,i)&&this._updateLayer(a),this._changed=!0,this._updatedPaintProps[e]=!0,this._serializedLayers=null):this.fire(new t.j(new Error(`Cannot style non-existing layer "${e}".`)))}getPaintProperty(e,t){return this.getLayer(e).getPaintProperty(t)}setFeatureState(e,r){this._checkLoaded();let n=e.source,i=e.sourceLayer,a=this.sourceCaches[n];if(void 0===a)return void this.fire(new t.j(new Error(`The source '${n}' does not exist in the map's style.`)));let o=a.getSource().type;"geojson"===o&&i?this.fire(new t.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==o||i?(void 0===e.id&&this.fire(new t.j(new Error("The feature id parameter must be provided."))),a.setFeatureState(i,e.id,r)):this.fire(new t.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(e,r){this._checkLoaded();let n=e.source,i=this.sourceCaches[n];if(void 0===i)return void this.fire(new t.j(new Error(`The source '${n}' does not exist in the map's style.`)));let a=i.getSource().type,o="vector"===a?e.sourceLayer:void 0;"vector"!==a||o?r&&"string"!=typeof e.id&&"number"!=typeof e.id?this.fire(new t.j(new Error("A feature id is required to remove its specific state property."))):i.removeFeatureState(o,e.id,r):this.fire(new t.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(e){this._checkLoaded();let r=e.source,n=e.sourceLayer,i=this.sourceCaches[r];if(void 0!==i)return"vector"!==i.getSource().type||n?(void 0===e.id&&this.fire(new t.j(new Error("The feature id parameter must be provided."))),i.getFeatureState(n,e.id)):void this.fire(new t.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new t.j(new Error(`The source '${r}' does not exist in the map's style.`)))}getTransition(){return t.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;let e=t.aF(this.sourceCaches,(e=>e.serialize())),r=this._serializeByIds(this._order,!0),n=this.map.getTerrain()||void 0,i=this.stylesheet;return t.aG({version:i.version,name:i.name,metadata:i.metadata,light:i.light,sky:i.sky,center:i.center,zoom:i.zoom,bearing:i.bearing,pitch:i.pitch,sprite:i.sprite,glyphs:i.glyphs,transition:i.transition,sources:e,layers:r,terrain:n},(e=>void 0!==e))}_updateLayer(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&"raster"!==this.sourceCaches[e.source].getSource().type&&(this._updatedSources[e.source]="reload",this.sourceCaches[e.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(e){let t=e=>"fill-extrusion"===this._layers[e].type,r={},n=[];for(let i=this._order.length-1;i>=0;i--){let a=this._order[i];if(t(a)){r[a]=i;for(let t of e){let e=t[a];if(e)for(let t of e)n.push(t)}}}n.sort(((e,t)=>t.intersectionZ-e.intersectionZ));let i=[];for(let a=this._order.length-1;a>=0;a--){let o=this._order[a];if(t(o))for(let e=n.length-1;e>=0;e--){let t=n[e].feature;if(r[t.layer.id]{let n=r.featureSortOrder;if(n){let r=n.indexOf(e.featureIndex);return n.indexOf(t.featureIndex)-r}return t.featureIndex-e.featureIndex}));for(let e of i)t.push(e)}}for(let t in s)s[t].forEach((n=>{let i=n.feature,a=r[e[t].source].getFeatureState(i.layer["source-layer"],i.id);i.source=i.layer.source,i.layer["source-layer"]&&(i.sourceLayer=i.layer["source-layer"]),i.state=a}));return s}(this._layers,o,this.sourceCaches,e,r,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(a)}querySourceFeatures(e,r){r&&r.filter&&this._validate(t.u.filter,"querySourceFeatures.filter",r.filter,null,r);let n=this.sourceCaches[e];return n?function(e,t){let r=e.getRenderableIds().map((t=>e.getTileByID(t))),n=[],i={};for(let e=0;ee.getTileByID(t))).sort(((e,t)=>t.tileID.overscaledZ-e.tileID.overscaledZ||(e.tileID.isLessThan(t.tileID)?-1:1)))}let n=this.crossTileSymbolIndex.addLayer(r,l[r.source],e.center.lng);o=o||n}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((i=i||this._layerOrderChanged||0===r)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(a.now(),e.zoom))&&(this.pauseablePlacement=new at(e,this.map.terrain,this._order,i,t,r,n,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,l),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(a.now()),s=!0),o&&this.pauseablePlacement.placement.setStale()),s||o)for(let e of this._order){let t=this._layers[e];"symbol"===t.type&&this.placement.updateLayerOpacities(t,l[t.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(a.now())}_releaseSymbolFadeTiles(){for(let e in this.sourceCaches)this.sourceCaches[e].releaseSymbolFadeTiles()}getImages(e,r){return t._(this,void 0,void 0,(function*(){let e=yield this.imageManager.getImages(r.icons);this._updateTilesForChangedImages();let t=this.sourceCaches[r.source];return t&&t.setDependencies(r.tileID.key,r.type,r.icons),e}))}getGlyphs(e,r){return t._(this,void 0,void 0,(function*(){let e=yield this.glyphManager.getGlyphs(r.stacks),t=this.sourceCaches[r.source];return t&&t.setDependencies(r.tileID.key,r.type,[""]),e}))}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(e,r={}){this._checkLoaded(),e&&this._validate(t.u.glyphs,"glyphs",e,null,r)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=e,this.glyphManager.entries={},this.glyphManager.setURL(e))}addSprite(e,r,n={},i){this._checkLoaded();let a=[{id:e,url:r}],o=[..._(this.stylesheet.sprite),...a];this._validate(t.u.sprite,"sprite",o,null,n)||(this.stylesheet.sprite=o,this._loadSprite(a,!0,i))}removeSprite(e){this._checkLoaded();let r=_(this.stylesheet.sprite);if(r.find((t=>t.id===e))){if(this._spritesImagesIds[e])for(let t of this._spritesImagesIds[e])this.imageManager.removeImage(t),this._changedImages[t]=!0;r.splice(r.findIndex((t=>t.id===e)),1),this.stylesheet.sprite=r.length>0?r:void 0,delete this._spritesImagesIds[e],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.k("data",{dataType:"style"}))}else this.fire(new t.j(new Error(`Sprite "${e}" doesn't exists on this map.`)))}getSprite(){return _(this.stylesheet.sprite)}setSprite(e,r={},n){this._checkLoaded(),e&&this._validate(t.u.sprite,"sprite",e,null,r)||(this.stylesheet.sprite=e,e?this._loadSprite(e,!0,n):(this._unloadSprite(),n&&n(null)))}}var dt=t.Y([{name:"a_pos",type:"Int16",components:2}]);let mt={prelude:gt("#ifdef GL_ES\nprecision mediump float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\n","#ifdef GL_ES\nprecision highp float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}\n#ifdef TERRAIN3D\nuniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth;\n#endif\nconst highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) {\n#ifdef TERRAIN3D\nhighp float d=unpack(texture2D(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0));\n#else\nreturn 1.0;\n#endif\n}float calculate_visibility(vec4 pos) {\n#ifdef TERRAIN3D\nvec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0;\n#else\nreturn 1.0;\n#endif\n}float ele(vec2 pos) {\n#ifdef TERRAIN3D\nvec4 rgb=(texture2D(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;\n#else\nreturn 0.0;\n#endif\n}float get_elevation(vec2 pos) {\n#ifdef TERRAIN3D\nvec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration;\n#else\nreturn 0.0;\n#endif\n}"),background:gt("uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:gt("uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:gt("varying vec3 v_data;varying float v_visibility;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;varying float v_visibility;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main(void) {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}"),clippingMask:gt("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:gt("uniform highp float u_intensity;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n#pragma mapbox: initialize highp float weight\nfloat d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\nconst highp float ZERO=1.0/255.0/16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n#pragma mapbox: initialize highp float weight\n#pragma mapbox: initialize mediump float radius\nvec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,get_elevation(floor(a_pos*0.5)),1);gl_Position=u_matrix*pos;}"),heatmapTexture:gt("uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(0.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:gt("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_anchor_pos;attribute vec2 a_placed;attribute vec2 a_box_real;uniform mat4 u_matrix;uniform vec2 u_pixel_extrude_scale;varying float v_placed;varying float v_notUsed;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:gt("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:gt("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}"),fill:gt("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_FragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);}"),fillOutline:gt("varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),fillOutlinePattern:gt("uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),fillPattern:gt("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}"),fillExtrusion:gt("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;\n#ifdef TERRAIN3D\nattribute vec2 a_centroid;\n#endif\nvarying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;\n#ifdef TERRAIN3D\nfloat height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);\n#else\nfloat height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;\n#endif\nbase=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}"),fillExtrusionPattern:gt("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;\n#ifdef TERRAIN3D\nattribute vec2 a_centroid;\n#endif\nvarying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;\n#ifdef TERRAIN3D\nfloat height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);\n#else\nfloat height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;\n#endif\nbase=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}"),hillshadePrepare:gt("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:gt("uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\n#define PI 3.141592653589793\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),line:gt("uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_width2=vec2(outset,inset);}"),lineGradient:gt("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_width2=vec2(outset,inset);}"),linePattern:gt("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}"),lineSDF:gt("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}"),raster:gt("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),symbolIcon:gt("uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_tex;varying float v_fade_opacity;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}"),symbolSDF:gt("#define SDF_PX 8.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_data0;varying vec3 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}"),symbolTextAndIcon:gt("#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec4 v_data0;varying vec4 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}"),terrain:gt("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;varying vec2 v_texture_pos;varying float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture2D(u_texture,v_texture_pos);if (v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);gl_FragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {gl_FragColor=surface_color;}}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform mat4 u_fog_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:gt("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:gt("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);}"),sky:gt("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform float u_horizon;uniform float u_sky_horizon_blend;void main() {float y=gl_FragCoord.y;if (y > u_horizon) {float blend=y-u_horizon;if (blend < u_sky_horizon_blend) {gl_FragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {gl_FragColor=u_sky_color;}}}","attribute vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function gt(e,t){let r=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,n=t.match(/attribute ([\w]+) ([\w]+)/g),i=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),a=t.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),o=a?a.concat(i):i,s={};return{fragmentSource:e=e.replace(r,((e,t,r,n,i)=>(s[i]=!0,"define"===t?`\n#ifndef HAS_UNIFORM_u_${i}\nvarying ${r} ${n} ${i};\n#else\nuniform ${r} ${n} u_${i};\n#endif\n`:`\n#ifdef HAS_UNIFORM_u_${i}\n ${r} ${n} ${i} = u_${i};\n#endif\n`))),vertexSource:t=t.replace(r,((e,t,r,n,i)=>{let a="float"===n?"vec2":"vec4",o=i.match(/color/)?"color":a;return s[i]?"define"===t?`\n#ifndef HAS_UNIFORM_u_${i}\nuniform lowp float u_${i}_t;\nattribute ${r} ${a} a_${i};\nvarying ${r} ${n} ${i};\n#else\nuniform ${r} ${n} u_${i};\n#endif\n`:"vec4"===o?`\n#ifndef HAS_UNIFORM_u_${i}\n ${i} = a_${i};\n#else\n ${r} ${n} ${i} = u_${i};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${i}\n ${i} = unpack_mix_${o}(a_${i}, u_${i}_t);\n#else\n ${r} ${n} ${i} = u_${i};\n#endif\n`:"define"===t?`\n#ifndef HAS_UNIFORM_u_${i}\nuniform lowp float u_${i}_t;\nattribute ${r} ${a} a_${i};\n#else\nuniform ${r} ${n} u_${i};\n#endif\n`:"vec4"===o?`\n#ifndef HAS_UNIFORM_u_${i}\n ${r} ${n} ${i} = a_${i};\n#else\n ${r} ${n} ${i} = u_${i};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${i}\n ${r} ${n} ${i} = unpack_mix_${o}(a_${i}, u_${i}_t);\n#else\n ${r} ${n} ${i} = u_${i};\n#endif\n`})),staticAttributes:n,staticUniforms:o}}class yt{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(e,t,r,n,i,a,o,s,l){this.context=e;let c=this.boundPaintVertexBuffers.length!==n.length;for(let e=0;!c&&e({u_matrix:e,u_texture:0,u_ele_delta:r,u_fog_matrix:n,u_fog_color:i?i.properties.get("fog-color"):t.aM.white,u_fog_ground_blend:i?i.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:i?i.calculateFogBlendOpacity(a):0,u_horizon_color:i?i.properties.get("horizon-color"):t.aM.white,u_horizon_fog_blend:i?i.properties.get("horizon-fog-blend"):1});function xt(e){let t=[];for(let r=0;r>16,s>>16],u_pixel_coord_lower:[65535&o,65535&s]}}let wt=(e,r,n,i)=>{let a=r.style.light,o=a.properties.get("position"),s=[o.x,o.y,o.z],l=(c=new t.A(9),t.A!=Float32Array&&(c[1]=0,c[2]=0,c[3]=0,c[5]=0,c[6]=0,c[7]=0),c[0]=1,c[4]=1,c[8]=1,c);var c;"viewport"===a.properties.get("anchor")&&function(e,t){var r=Math.sin(t),n=Math.cos(t);e[0]=n,e[1]=r,e[2]=0,e[3]=-r,e[4]=n,e[5]=0,e[6]=0,e[7]=0,e[8]=1}(l,-r.transform.angle),function(e,t,r){var n=t[0],i=t[1],a=t[2];e[0]=n*r[0]+i*r[3]+a*r[6],e[1]=n*r[1]+i*r[4]+a*r[7],e[2]=n*r[2]+i*r[5]+a*r[8]}(s,s,l);let u=a.properties.get("color");return{u_matrix:e,u_lightpos:s,u_lightintensity:a.properties.get("intensity"),u_lightcolor:[u.r,u.g,u.b],u_vertical_gradient:+n,u_opacity:i}},Tt=(e,r,n,i,a,o,s)=>t.e(wt(e,r,n,i),bt(o,r,s),{u_height_factor:-Math.pow(2,a.overscaledZ)/s.tileSize/8}),kt=e=>({u_matrix:e}),At=(e,r,n,i)=>t.e(kt(e),bt(n,r,i)),Mt=(e,t)=>({u_matrix:e,u_world:t}),St=(e,r,n,i,a)=>t.e(At(e,r,n,i),{u_world:a}),Et=(e,t,r,n)=>{let i,a,o=e.transform;if("map"===n.paint.get("circle-pitch-alignment")){let e=Be(r,1,o.zoom);i=!0,a=[e,e]}else i=!1,a=o.pixelsToGLUnits;return{u_camera_to_center_distance:o.cameraToCenterDistance,u_scale_with_map:+("map"===n.paint.get("circle-pitch-scale")),u_matrix:e.translatePosMatrix(t.posMatrix,r,n.paint.get("circle-translate"),n.paint.get("circle-translate-anchor")),u_pitch_with_map:+i,u_device_pixel_ratio:e.pixelRatio,u_extrude_scale:a}},Ct=(e,t,r)=>({u_matrix:e,u_inv_matrix:t,u_camera_to_center_distance:r.cameraToCenterDistance,u_viewport_size:[r.width,r.height]}),It=(e,t,r=1)=>({u_matrix:e,u_color:t,u_overlay:0,u_overlay_scale:r}),Lt=e=>({u_matrix:e}),Pt=(e,t,r,n)=>({u_matrix:e,u_extrude_scale:Be(t,1,r),u_intensity:n}),zt=(e,r,n,i)=>{let a=t.H();t.aP(a,0,e.width,e.height,0,0,1);let o=e.context.gl;return{u_matrix:a,u_world:[o.drawingBufferWidth,o.drawingBufferHeight],u_image:n,u_color_ramp:i,u_opacity:r.paint.get("heatmap-opacity")}};function Dt(e,r){let n=Math.pow(2,r.canonical.z),i=r.canonical.y;return[new t.Z(0,i/n).toLngLat().lat,new t.Z(0,(i+1)/n).toLngLat().lat]}let Ot=(e,t,r,n)=>{let i=e.transform;return{u_matrix:Nt(e,t,r,n),u_ratio:1/Be(t,1,i.zoom),u_device_pixel_ratio:e.pixelRatio,u_units_to_pixels:[1/i.pixelsToGLUnits[0],1/i.pixelsToGLUnits[1]]}},Rt=(e,r,n,i,a)=>t.e(Ot(e,r,n,a),{u_image:0,u_image_height:i}),Ft=(e,t,r,n,i)=>{let a=e.transform,o=jt(t,a);return{u_matrix:Nt(e,t,r,i),u_texsize:t.imageAtlasTexture.size,u_ratio:1/Be(t,1,a.zoom),u_device_pixel_ratio:e.pixelRatio,u_image:0,u_scale:[o,n.fromScale,n.toScale],u_fade:n.t,u_units_to_pixels:[1/a.pixelsToGLUnits[0],1/a.pixelsToGLUnits[1]]}},Bt=(e,r,n,i,a,o)=>{let s=e.lineAtlas,l=jt(r,e.transform),c="round"===n.layout.get("line-cap"),u=s.getDash(i.from,c),h=s.getDash(i.to,c),f=u.width*a.fromScale,p=h.width*a.toScale;return t.e(Ot(e,r,n,o),{u_patternscale_a:[l/f,-u.height/2],u_patternscale_b:[l/p,-h.height/2],u_sdfgamma:s.width/(256*Math.min(f,p)*e.pixelRatio)/2,u_image:0,u_tex_y_a:u.y,u_tex_y_b:h.y,u_mix:a.t})};function jt(e,t){return 1/Be(e,1,t.tileZoom)}function Nt(e,t,r,n){return e.translatePosMatrix(n?n.posMatrix:t.tileID.posMatrix,t,r.paint.get("line-translate"),r.paint.get("line-translate-anchor"))}let Ut=(e,t,r,n,i)=>{return{u_matrix:e,u_tl_parent:t,u_scale_parent:r,u_buffer_scale:1,u_fade_t:n.mix,u_opacity:n.opacity*i.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:i.paint.get("raster-brightness-min"),u_brightness_high:i.paint.get("raster-brightness-max"),u_saturation_factor:(o=i.paint.get("raster-saturation"),o>0?1-1/(1.001-o):-o),u_contrast_factor:(a=i.paint.get("raster-contrast"),a>0?1/(1-a):1+a),u_spin_weights:Vt(i.paint.get("raster-hue-rotate"))};var a,o};function Vt(e){e*=Math.PI/180;let t=Math.sin(e),r=Math.cos(e);return[(2*r+1)/3,(-Math.sqrt(3)*t-r+1)/3,(Math.sqrt(3)*t-r+1)/3]}let qt=(e,t,r,n,i,a,o,s,l,c,u,h,f,p)=>{let d=o.transform;return{u_is_size_zoom_constant:+("constant"===e||"source"===e),u_is_size_feature_constant:+("constant"===e||"camera"===e),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:d.cameraToCenterDistance,u_pitch:d.pitch/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:d.width/d.height,u_fade_change:o.options.fadeDuration?o.symbolFadeChange:1,u_matrix:s,u_label_plane_matrix:l,u_coord_matrix:c,u_is_text:+h,u_pitch_with_map:+n,u_is_along_line:i,u_is_variable_anchor:a,u_texsize:f,u_texture:0,u_translation:u,u_pitched_scale:p}},Ht=(e,r,n,i,a,o,s,l,c,u,h,f,p,d,m)=>{let g=s.transform;return t.e(qt(e,r,n,i,a,o,s,l,c,u,h,f,p,m),{u_gamma_scale:i?Math.cos(g._pitch)*g.cameraToCenterDistance:1,u_device_pixel_ratio:s.pixelRatio,u_is_halo:+d})},Gt=(e,r,n,i,a,o,s,l,c,u,h,f,p,d)=>t.e(Ht(e,r,n,i,a,o,s,l,c,u,h,!0,f,!0,d),{u_texsize_icon:p,u_texture_icon:1}),Wt=(e,t,r)=>({u_matrix:e,u_opacity:t,u_color:r}),Zt=(e,r,n,i,a,o)=>t.e(function(e,t,r,n){let i=r.imageManager.getPattern(e.from.toString()),a=r.imageManager.getPattern(e.to.toString()),{width:o,height:s}=r.imageManager.getPixelSize(),l=Math.pow(2,n.tileID.overscaledZ),c=n.tileSize*Math.pow(2,r.transform.tileZoom)/l,u=c*(n.tileID.canonical.x+n.tileID.wrap*l),h=c*n.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:i.tl,u_pattern_br_a:i.br,u_pattern_tl_b:a.tl,u_pattern_br_b:a.br,u_texsize:[o,s],u_mix:t.t,u_pattern_size_a:i.displaySize,u_pattern_size_b:a.displaySize,u_scale_a:t.fromScale,u_scale_b:t.toScale,u_tile_units_to_pixels:1/Be(n,1,r.transform.tileZoom),u_pixel_coord_upper:[u>>16,h>>16],u_pixel_coord_lower:[65535&u,65535&h]}}(i,o,n,a),{u_matrix:e,u_opacity:r}),Yt={fillExtrusion:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_lightpos:new t.aN(e,r.u_lightpos),u_lightintensity:new t.aI(e,r.u_lightintensity),u_lightcolor:new t.aN(e,r.u_lightcolor),u_vertical_gradient:new t.aI(e,r.u_vertical_gradient),u_opacity:new t.aI(e,r.u_opacity)}),fillExtrusionPattern:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_lightpos:new t.aN(e,r.u_lightpos),u_lightintensity:new t.aI(e,r.u_lightintensity),u_lightcolor:new t.aN(e,r.u_lightcolor),u_vertical_gradient:new t.aI(e,r.u_vertical_gradient),u_height_factor:new t.aI(e,r.u_height_factor),u_image:new t.aH(e,r.u_image),u_texsize:new t.aO(e,r.u_texsize),u_pixel_coord_upper:new t.aO(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(e,r.u_pixel_coord_lower),u_scale:new t.aN(e,r.u_scale),u_fade:new t.aI(e,r.u_fade),u_opacity:new t.aI(e,r.u_opacity)}),fill:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix)}),fillPattern:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_image:new t.aH(e,r.u_image),u_texsize:new t.aO(e,r.u_texsize),u_pixel_coord_upper:new t.aO(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(e,r.u_pixel_coord_lower),u_scale:new t.aN(e,r.u_scale),u_fade:new t.aI(e,r.u_fade)}),fillOutline:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_world:new t.aO(e,r.u_world)}),fillOutlinePattern:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_world:new t.aO(e,r.u_world),u_image:new t.aH(e,r.u_image),u_texsize:new t.aO(e,r.u_texsize),u_pixel_coord_upper:new t.aO(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(e,r.u_pixel_coord_lower),u_scale:new t.aN(e,r.u_scale),u_fade:new t.aI(e,r.u_fade)}),circle:(e,r)=>({u_camera_to_center_distance:new t.aI(e,r.u_camera_to_center_distance),u_scale_with_map:new t.aH(e,r.u_scale_with_map),u_pitch_with_map:new t.aH(e,r.u_pitch_with_map),u_extrude_scale:new t.aO(e,r.u_extrude_scale),u_device_pixel_ratio:new t.aI(e,r.u_device_pixel_ratio),u_matrix:new t.aJ(e,r.u_matrix)}),collisionBox:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_pixel_extrude_scale:new t.aO(e,r.u_pixel_extrude_scale)}),collisionCircle:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_inv_matrix:new t.aJ(e,r.u_inv_matrix),u_camera_to_center_distance:new t.aI(e,r.u_camera_to_center_distance),u_viewport_size:new t.aO(e,r.u_viewport_size)}),debug:(e,r)=>({u_color:new t.aL(e,r.u_color),u_matrix:new t.aJ(e,r.u_matrix),u_overlay:new t.aH(e,r.u_overlay),u_overlay_scale:new t.aI(e,r.u_overlay_scale)}),clippingMask:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix)}),heatmap:(e,r)=>({u_extrude_scale:new t.aI(e,r.u_extrude_scale),u_intensity:new t.aI(e,r.u_intensity),u_matrix:new t.aJ(e,r.u_matrix)}),heatmapTexture:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_world:new t.aO(e,r.u_world),u_image:new t.aH(e,r.u_image),u_color_ramp:new t.aH(e,r.u_color_ramp),u_opacity:new t.aI(e,r.u_opacity)}),hillshade:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_image:new t.aH(e,r.u_image),u_latrange:new t.aO(e,r.u_latrange),u_light:new t.aO(e,r.u_light),u_shadow:new t.aL(e,r.u_shadow),u_highlight:new t.aL(e,r.u_highlight),u_accent:new t.aL(e,r.u_accent)}),hillshadePrepare:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_image:new t.aH(e,r.u_image),u_dimension:new t.aO(e,r.u_dimension),u_zoom:new t.aI(e,r.u_zoom),u_unpack:new t.aK(e,r.u_unpack)}),line:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_ratio:new t.aI(e,r.u_ratio),u_device_pixel_ratio:new t.aI(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.aO(e,r.u_units_to_pixels)}),lineGradient:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_ratio:new t.aI(e,r.u_ratio),u_device_pixel_ratio:new t.aI(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.aO(e,r.u_units_to_pixels),u_image:new t.aH(e,r.u_image),u_image_height:new t.aI(e,r.u_image_height)}),linePattern:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_texsize:new t.aO(e,r.u_texsize),u_ratio:new t.aI(e,r.u_ratio),u_device_pixel_ratio:new t.aI(e,r.u_device_pixel_ratio),u_image:new t.aH(e,r.u_image),u_units_to_pixels:new t.aO(e,r.u_units_to_pixels),u_scale:new t.aN(e,r.u_scale),u_fade:new t.aI(e,r.u_fade)}),lineSDF:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_ratio:new t.aI(e,r.u_ratio),u_device_pixel_ratio:new t.aI(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.aO(e,r.u_units_to_pixels),u_patternscale_a:new t.aO(e,r.u_patternscale_a),u_patternscale_b:new t.aO(e,r.u_patternscale_b),u_sdfgamma:new t.aI(e,r.u_sdfgamma),u_image:new t.aH(e,r.u_image),u_tex_y_a:new t.aI(e,r.u_tex_y_a),u_tex_y_b:new t.aI(e,r.u_tex_y_b),u_mix:new t.aI(e,r.u_mix)}),raster:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_tl_parent:new t.aO(e,r.u_tl_parent),u_scale_parent:new t.aI(e,r.u_scale_parent),u_buffer_scale:new t.aI(e,r.u_buffer_scale),u_fade_t:new t.aI(e,r.u_fade_t),u_opacity:new t.aI(e,r.u_opacity),u_image0:new t.aH(e,r.u_image0),u_image1:new t.aH(e,r.u_image1),u_brightness_low:new t.aI(e,r.u_brightness_low),u_brightness_high:new t.aI(e,r.u_brightness_high),u_saturation_factor:new t.aI(e,r.u_saturation_factor),u_contrast_factor:new t.aI(e,r.u_contrast_factor),u_spin_weights:new t.aN(e,r.u_spin_weights)}),symbolIcon:(e,r)=>({u_is_size_zoom_constant:new t.aH(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(e,r.u_is_size_feature_constant),u_size_t:new t.aI(e,r.u_size_t),u_size:new t.aI(e,r.u_size),u_camera_to_center_distance:new t.aI(e,r.u_camera_to_center_distance),u_pitch:new t.aI(e,r.u_pitch),u_rotate_symbol:new t.aH(e,r.u_rotate_symbol),u_aspect_ratio:new t.aI(e,r.u_aspect_ratio),u_fade_change:new t.aI(e,r.u_fade_change),u_matrix:new t.aJ(e,r.u_matrix),u_label_plane_matrix:new t.aJ(e,r.u_label_plane_matrix),u_coord_matrix:new t.aJ(e,r.u_coord_matrix),u_is_text:new t.aH(e,r.u_is_text),u_pitch_with_map:new t.aH(e,r.u_pitch_with_map),u_is_along_line:new t.aH(e,r.u_is_along_line),u_is_variable_anchor:new t.aH(e,r.u_is_variable_anchor),u_texsize:new t.aO(e,r.u_texsize),u_texture:new t.aH(e,r.u_texture),u_translation:new t.aO(e,r.u_translation),u_pitched_scale:new t.aI(e,r.u_pitched_scale)}),symbolSDF:(e,r)=>({u_is_size_zoom_constant:new t.aH(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(e,r.u_is_size_feature_constant),u_size_t:new t.aI(e,r.u_size_t),u_size:new t.aI(e,r.u_size),u_camera_to_center_distance:new t.aI(e,r.u_camera_to_center_distance),u_pitch:new t.aI(e,r.u_pitch),u_rotate_symbol:new t.aH(e,r.u_rotate_symbol),u_aspect_ratio:new t.aI(e,r.u_aspect_ratio),u_fade_change:new t.aI(e,r.u_fade_change),u_matrix:new t.aJ(e,r.u_matrix),u_label_plane_matrix:new t.aJ(e,r.u_label_plane_matrix),u_coord_matrix:new t.aJ(e,r.u_coord_matrix),u_is_text:new t.aH(e,r.u_is_text),u_pitch_with_map:new t.aH(e,r.u_pitch_with_map),u_is_along_line:new t.aH(e,r.u_is_along_line),u_is_variable_anchor:new t.aH(e,r.u_is_variable_anchor),u_texsize:new t.aO(e,r.u_texsize),u_texture:new t.aH(e,r.u_texture),u_gamma_scale:new t.aI(e,r.u_gamma_scale),u_device_pixel_ratio:new t.aI(e,r.u_device_pixel_ratio),u_is_halo:new t.aH(e,r.u_is_halo),u_translation:new t.aO(e,r.u_translation),u_pitched_scale:new t.aI(e,r.u_pitched_scale)}),symbolTextAndIcon:(e,r)=>({u_is_size_zoom_constant:new t.aH(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(e,r.u_is_size_feature_constant),u_size_t:new t.aI(e,r.u_size_t),u_size:new t.aI(e,r.u_size),u_camera_to_center_distance:new t.aI(e,r.u_camera_to_center_distance),u_pitch:new t.aI(e,r.u_pitch),u_rotate_symbol:new t.aH(e,r.u_rotate_symbol),u_aspect_ratio:new t.aI(e,r.u_aspect_ratio),u_fade_change:new t.aI(e,r.u_fade_change),u_matrix:new t.aJ(e,r.u_matrix),u_label_plane_matrix:new t.aJ(e,r.u_label_plane_matrix),u_coord_matrix:new t.aJ(e,r.u_coord_matrix),u_is_text:new t.aH(e,r.u_is_text),u_pitch_with_map:new t.aH(e,r.u_pitch_with_map),u_is_along_line:new t.aH(e,r.u_is_along_line),u_is_variable_anchor:new t.aH(e,r.u_is_variable_anchor),u_texsize:new t.aO(e,r.u_texsize),u_texsize_icon:new t.aO(e,r.u_texsize_icon),u_texture:new t.aH(e,r.u_texture),u_texture_icon:new t.aH(e,r.u_texture_icon),u_gamma_scale:new t.aI(e,r.u_gamma_scale),u_device_pixel_ratio:new t.aI(e,r.u_device_pixel_ratio),u_is_halo:new t.aH(e,r.u_is_halo),u_translation:new t.aO(e,r.u_translation),u_pitched_scale:new t.aI(e,r.u_pitched_scale)}),background:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_opacity:new t.aI(e,r.u_opacity),u_color:new t.aL(e,r.u_color)}),backgroundPattern:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_opacity:new t.aI(e,r.u_opacity),u_image:new t.aH(e,r.u_image),u_pattern_tl_a:new t.aO(e,r.u_pattern_tl_a),u_pattern_br_a:new t.aO(e,r.u_pattern_br_a),u_pattern_tl_b:new t.aO(e,r.u_pattern_tl_b),u_pattern_br_b:new t.aO(e,r.u_pattern_br_b),u_texsize:new t.aO(e,r.u_texsize),u_mix:new t.aI(e,r.u_mix),u_pattern_size_a:new t.aO(e,r.u_pattern_size_a),u_pattern_size_b:new t.aO(e,r.u_pattern_size_b),u_scale_a:new t.aI(e,r.u_scale_a),u_scale_b:new t.aI(e,r.u_scale_b),u_pixel_coord_upper:new t.aO(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(e,r.u_pixel_coord_lower),u_tile_units_to_pixels:new t.aI(e,r.u_tile_units_to_pixels)}),terrain:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_texture:new t.aH(e,r.u_texture),u_ele_delta:new t.aI(e,r.u_ele_delta),u_fog_matrix:new t.aJ(e,r.u_fog_matrix),u_fog_color:new t.aL(e,r.u_fog_color),u_fog_ground_blend:new t.aI(e,r.u_fog_ground_blend),u_fog_ground_blend_opacity:new t.aI(e,r.u_fog_ground_blend_opacity),u_horizon_color:new t.aL(e,r.u_horizon_color),u_horizon_fog_blend:new t.aI(e,r.u_horizon_fog_blend)}),terrainDepth:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_ele_delta:new t.aI(e,r.u_ele_delta)}),terrainCoords:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_texture:new t.aH(e,r.u_texture),u_terrain_coords_id:new t.aI(e,r.u_terrain_coords_id),u_ele_delta:new t.aI(e,r.u_ele_delta)}),sky:(e,r)=>({u_sky_color:new t.aL(e,r.u_sky_color),u_horizon_color:new t.aL(e,r.u_horizon_color),u_horizon:new t.aI(e,r.u_horizon),u_sky_horizon_blend:new t.aI(e,r.u_sky_horizon_blend)})};class Xt{constructor(e,t,r){this.context=e;let n=e.gl;this.buffer=n.createBuffer(),this.dynamicDraw=!!r,this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),n.bufferData(n.ELEMENT_ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),this.dynamicDraw||delete t.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(e){let t=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let $t={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Kt{constructor(e,t,r,n){this.length=t.length,this.attributes=r,this.itemSize=t.bytesPerElement,this.dynamicDraw=n,this.context=e;let i=e.gl;this.buffer=i.createBuffer(),e.bindVertexBuffer.set(this.buffer),i.bufferData(i.ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||delete t.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(e){if(e.length!==this.length)throw new Error(`Length of new data is ${e.length}, which doesn't match current length of ${this.length}`);let t=this.context.gl;this.bind(),t.bufferSubData(t.ARRAY_BUFFER,0,e.arrayBuffer)}enableAttributes(e,t){for(let r=0;r0){let r=t.H();t.aQ(r,m.placementInvProjMatrix,e.transform.glCoordMatrix),t.aQ(r,r,m.placementViewportMatrix),c.push({circleArray:y,circleOffset:h,transform:d.posMatrix,invTransform:r,coord:d}),u+=y.length/4,h=u}g&&l.draw(o,s.LINES,jr.disabled,Vr.disabled,e.colorModeForRenderPass(),qr.disabled,{u_matrix:d.posMatrix,u_pixel_extrude_scale:[1/(f=e.transform).width,1/f.height]},e.style.map.terrain&&e.style.map.terrain.getTerrainData(d),n.id,g.layoutVertexBuffer,g.indexBuffer,g.segments,null,e.transform.zoom,null,null,g.collisionVertexBuffer)}var f;if(!a||!c.length)return;let p=e.useProgram("collisionCircle"),d=new t.aR;d.resize(4*u),d._trim();let m=0;for(let e of c)for(let t=0;t=0&&(v[x.associatedIconIndex]={shiftedAnchor:I,angle:L})}else De(x.numGlyphs,g)}if(u){y.clear();let r=e.icon.placedSymbolArray;for(let e=0;ee.style.map.terrain.getElevation(l,t,r):null,r="map"===n.layout.get("text-rotation-alignment");Te(c,l.posMatrix,e,a,N,V,v,u,r,g,l.toUnwrapped(),m.width,m.height,q,t)}let W,Z=l.posMatrix,Y=a&&A||G,X=x||Y?Gr:N,$=U,K=I&&0!==n.paint.get(a?"text-halo-width":"icon-halo-width").constantOr(1);W=I?c.iconsInText?Gt(L.kind,D,_,v,x,Y,e,Z,X,$,q,f,R,S):Ht(L.kind,D,_,v,x,Y,e,Z,X,$,q,a,f,!0,S):qt(L.kind,D,_,v,x,Y,e,Z,X,$,q,a,f,S);let J={program:z,buffers:h,uniformValues:W,atlasTexture:p,atlasTextureIcon:F,atlasInterpolation:k,atlasInterpolationIcon:E,isSDF:I,hasHalo:K};if(w&&c.canOverlap){T=!0;let e=h.segments.get();for(let r of e)M.push({segments:new t.a0([r]),sortKey:r.sortKey,state:J,terrainData:O})}else M.push({segments:h.segments,sortKey:0,state:J,terrainData:O})}T&&M.sort(((e,t)=>e.sortKey-t.sortKey));for(let t of M){let r=t.state;if(p.activeTexture.set(d.TEXTURE0),r.atlasTexture.bind(r.atlasInterpolation,d.CLAMP_TO_EDGE),r.atlasTextureIcon&&(p.activeTexture.set(d.TEXTURE1),r.atlasTextureIcon&&r.atlasTextureIcon.bind(r.atlasInterpolationIcon,d.CLAMP_TO_EDGE)),r.isSDF){let i=r.uniformValues;r.hasHalo&&(i.u_is_halo=1,Kr(r.buffers,t.segments,n,e,r.program,k,h,f,i,t.terrainData)),i.u_is_halo=0}Kr(r.buffers,t.segments,n,e,r.program,k,h,f,r.uniformValues,t.terrainData)}}function Kr(e,t,r,n,i,a,o,s,l,c){let u=n.context;i.draw(u,u.gl.TRIANGLES,a,o,s,qr.disabled,l,c,r.id,e.layoutVertexBuffer,e.indexBuffer,t,r.paint,n.transform.zoom,e.programConfigurations.get(r.id),e.dynamicLayoutVertexBuffer,e.opacityVertexBuffer)}function Jr(e,r,n,i){let a=e.context,o=a.gl,s=Vr.disabled,l=new Fr([o.ONE,o.ONE],t.aM.transparent,[!0,!0,!0,!0]),c=r.getBucket(n);if(!c)return;let u=i.key,h=n.heatmapFbos.get(u);h||(h=en(a,r.tileSize,r.tileSize),n.heatmapFbos.set(u,h)),a.bindFramebuffer.set(h.framebuffer),a.viewport.set([0,0,r.tileSize,r.tileSize]),a.clear({color:t.aM.transparent});let f=c.programConfigurations.get(n.id),p=e.useProgram("heatmap",f),d=e.style.map.terrain.getTerrainData(i);p.draw(a,o.TRIANGLES,jr.disabled,s,l,qr.disabled,Pt(i.posMatrix,r,e.transform.zoom,n.paint.get("heatmap-intensity")),d,n.id,c.layoutVertexBuffer,c.indexBuffer,c.segments,n.paint,e.transform.zoom,f)}function Qr(e,t,r){let n=e.context,i=n.gl;n.setColorMode(e.colorModeForRenderPass());let a=tn(n,t),o=r.key,s=t.heatmapFbos.get(o);s&&(n.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,s.colorAttachment.get()),n.activeTexture.set(i.TEXTURE1),a.bind(i.LINEAR,i.CLAMP_TO_EDGE),e.useProgram("heatmapTexture").draw(n,i.TRIANGLES,jr.disabled,Vr.disabled,e.colorModeForRenderPass(),qr.disabled,zt(e,t,0,1),null,t.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments,t.paint,e.transform.zoom),s.destroy(),t.heatmapFbos.delete(o))}function en(e,t,r){var n,i;let a=e.gl,o=a.createTexture();a.bindTexture(a.TEXTURE_2D,o),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR);let s=null!==(n=e.HALF_FLOAT)&&void 0!==n?n:a.UNSIGNED_BYTE,l=null!==(i=e.RGBA16F)&&void 0!==i?i:a.RGBA;a.texImage2D(a.TEXTURE_2D,0,l,t,r,0,a.RGBA,s,null);let c=e.createFramebuffer(t,r,!1,!1);return c.colorAttachment.set(o),c}function tn(e,t){return t.colorRampTexture||(t.colorRampTexture=new w(e,t.colorRamp,e.gl.RGBA)),t.colorRampTexture}function rn(e,t,r,n,i){if(!r||!n||!n.imageAtlas)return;let a=n.imageAtlas.patternPositions,o=a[r.to.toString()],s=a[r.from.toString()];if(!o&&s&&(o=s),!s&&o&&(s=o),!o||!s){let e=i.getPaintProperty(t);o=a[e],s=a[e]}o&&s&&e.setConstantPatternPositions(o,s)}function nn(e,t,r,n,i,a,o){let s,l,c,u,h,f=e.context.gl,p="fill-pattern",d=r.paint.get(p),m=d&&d.constantOr(1),g=r.getCrossfadeParameters();o?(l=m&&!r.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",s=f.LINES):(l=m?"fillPattern":"fill",s=f.TRIANGLES);let y=d.constantOr(null);for(let d of n){let n=t.getTile(d);if(m&&!n.patternsLoaded())continue;let v=n.getBucket(r);if(!v)continue;let x=v.programConfigurations.get(r.id),_=e.useProgram(l,x),b=e.style.map.terrain&&e.style.map.terrain.getTerrainData(d);m&&(e.context.activeTexture.set(f.TEXTURE0),n.imageAtlasTexture.bind(f.LINEAR,f.CLAMP_TO_EDGE),x.updatePaintBuffers(g)),rn(x,p,y,n,r);let w=b?d:null,T=e.translatePosMatrix(w?w.posMatrix:d.posMatrix,n,r.paint.get("fill-translate"),r.paint.get("fill-translate-anchor"));if(o){u=v.indexBuffer2,h=v.segments2;let t=[f.drawingBufferWidth,f.drawingBufferHeight];c="fillOutlinePattern"===l&&m?St(T,e,g,n,t):Mt(T,t)}else u=v.indexBuffer,h=v.segments,c=m?At(T,e,g,n):kt(T);_.draw(e.context,s,i,e.stencilModeForClipping(d),a,qr.disabled,c,b,r.id,v.layoutVertexBuffer,u,h,r.paint,e.transform.zoom,x)}}function an(e,t,r,n,i,a,o){let s=e.context,l=s.gl,c="fill-extrusion-pattern",u=r.paint.get(c),h=u.constantOr(1),f=r.getCrossfadeParameters(),p=r.paint.get("fill-extrusion-opacity"),d=u.constantOr(null);for(let u of n){let n=t.getTile(u),m=n.getBucket(r);if(!m)continue;let g=e.style.map.terrain&&e.style.map.terrain.getTerrainData(u),y=m.programConfigurations.get(r.id),v=e.useProgram(h?"fillExtrusionPattern":"fillExtrusion",y);h&&(e.context.activeTexture.set(l.TEXTURE0),n.imageAtlasTexture.bind(l.LINEAR,l.CLAMP_TO_EDGE),y.updatePaintBuffers(f)),rn(y,c,d,n,r);let x=e.translatePosMatrix(u.posMatrix,n,r.paint.get("fill-extrusion-translate"),r.paint.get("fill-extrusion-translate-anchor")),_=r.paint.get("fill-extrusion-vertical-gradient"),b=h?Tt(x,e,_,p,u,f,n):wt(x,e,_,p);v.draw(s,s.gl.TRIANGLES,i,a,o,qr.backCCW,b,g,r.id,m.layoutVertexBuffer,m.indexBuffer,m.segments,r.paint,e.transform.zoom,y,e.style.map.terrain&&m.centroidVertexBuffer)}}function on(e,t,r,n,i,a,o){let s=e.context,l=s.gl,c=r.fbo;if(!c)return;let u=e.useProgram("hillshade"),h=e.style.map.terrain&&e.style.map.terrain.getTerrainData(t);s.activeTexture.set(l.TEXTURE0),l.bindTexture(l.TEXTURE_2D,c.colorAttachment.get()),u.draw(s,l.TRIANGLES,i,a,o,qr.disabled,((e,t,r,n)=>{let i=r.paint.get("hillshade-shadow-color"),a=r.paint.get("hillshade-highlight-color"),o=r.paint.get("hillshade-accent-color"),s=r.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===r.paint.get("hillshade-illumination-anchor")&&(s-=e.transform.angle);let l=!e.options.moving;return{u_matrix:n?n.posMatrix:e.transform.calculatePosMatrix(t.tileID.toUnwrapped(),l),u_image:0,u_latrange:Dt(0,t.tileID),u_light:[r.paint.get("hillshade-exaggeration"),s],u_shadow:i,u_highlight:a,u_accent:o}})(e,r,n,h?t:null),h,n.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments)}function sn(e,r,n,i,a,o){let s=e.context,l=s.gl,c=r.dem;if(c&&c.data){let u=c.dim,h=c.stride,f=c.getPixels();if(s.activeTexture.set(l.TEXTURE1),s.pixelStoreUnpackPremultiplyAlpha.set(!1),r.demTexture=r.demTexture||e.getTileTexture(h),r.demTexture){let e=r.demTexture;e.update(f,{premultiply:!1}),e.bind(l.NEAREST,l.CLAMP_TO_EDGE)}else r.demTexture=new w(s,f,l.RGBA,{premultiply:!1}),r.demTexture.bind(l.NEAREST,l.CLAMP_TO_EDGE);s.activeTexture.set(l.TEXTURE0);let p=r.fbo;if(!p){let e=new w(s,{width:u,height:u,data:null},l.RGBA);e.bind(l.LINEAR,l.CLAMP_TO_EDGE),p=r.fbo=s.createFramebuffer(u,u,!0,!1),p.colorAttachment.set(e.texture)}s.bindFramebuffer.set(p.framebuffer),s.viewport.set([0,0,u,u]),e.useProgram("hillshadePrepare").draw(s,l.TRIANGLES,i,a,o,qr.disabled,((e,r)=>{let n=r.stride,i=t.H();return t.aP(i,0,t.X,-t.X,0,0,1),t.J(i,i,[0,-t.X,0]),{u_matrix:i,u_image:1,u_dimension:[n,n],u_zoom:e.overscaledZ,u_unpack:r.getUnpackVector()}})(r.tileID,c),null,n.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments),r.needsHillshadePrepare=!1}}function ln(e,r,n,i,o,s){let l=i.paint.get("raster-fade-duration");if(!s&&l>0){let i=a.now(),s=(i-e.timeAdded)/l,c=r?(i-r.timeAdded)/l:-1,u=n.getSource(),h=o.coveringZoomLevel({tileSize:u.tileSize,roundZoom:u.roundZoom}),f=!r||Math.abs(r.tileID.overscaledZ-h)>Math.abs(e.tileID.overscaledZ-h),p=f&&e.refreshedUponExpiration?1:t.ac(f?s:1-c,0,1);return e.refreshedUponExpiration&&s>=1&&(e.refreshedUponExpiration=!1),r?{opacity:1,mix:1-p}:{opacity:p,mix:0}}return{opacity:1,mix:0}}let cn=new t.aM(1,0,0,1),un=new t.aM(0,1,0,1),hn=new t.aM(0,0,1,1),fn=new t.aM(1,0,1,1),pn=new t.aM(0,1,1,1);function dn(e,t,r,n){gn(e,0,t+r/2,e.transform.width,r,n)}function mn(e,t,r,n){gn(e,t-r/2,0,r,e.transform.height,n)}function gn(e,t,r,n,i,a){let o=e.context,s=o.gl;s.enable(s.SCISSOR_TEST),s.scissor(t*e.pixelRatio,r*e.pixelRatio,n*e.pixelRatio,i*e.pixelRatio),o.clear({color:a}),s.disable(s.SCISSOR_TEST)}function yn(e,r,n){let i=e.context,a=i.gl,o=n.posMatrix,s=e.useProgram("debug"),l=jr.disabled,c=Vr.disabled,u=e.colorModeForRenderPass(),h="$debug",f=e.style.map.terrain&&e.style.map.terrain.getTerrainData(n);i.activeTexture.set(a.TEXTURE0);let p=r.getTileByID(n.key).latestRawTileData,d=Math.floor((p&&p.byteLength||0)/1024),m=r.getTile(n).tileSize,g=512/Math.min(m,512)*(n.overscaledZ/e.transform.zoom)*.5,y=n.canonical.toString();n.overscaledZ!==n.canonical.z&&(y+=` => ${n.overscaledZ}`),function(e,t){e.initDebugOverlayCanvas();let r=e.debugOverlayCanvas,n=e.context.gl,i=e.debugOverlayCanvas.getContext("2d");i.clearRect(0,0,r.width,r.height),i.shadowColor="white",i.shadowBlur=2,i.lineWidth=1.5,i.strokeStyle="white",i.textBaseline="top",i.font="bold 36px Open Sans, sans-serif",i.fillText(t,5,5),i.strokeText(t,5,5),e.debugOverlayTexture.update(r),e.debugOverlayTexture.bind(n.LINEAR,n.CLAMP_TO_EDGE)}(e,`${y} ${d}kB`),s.draw(i,a.TRIANGLES,l,c,Fr.alphaBlended,qr.disabled,It(o,t.aM.transparent,g),null,h,e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments),s.draw(i,a.LINE_STRIP,l,c,u,qr.disabled,It(o,t.aM.red),f,h,e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments)}function vn(e,t,r){let n=e.context,i=n.gl,a=e.colorModeForRenderPass(),o=new jr(i.LEQUAL,jr.ReadWrite,e.depthRangeFor3D),s=e.useProgram("terrain"),l=t.getTerrainMesh();n.bindFramebuffer.set(null),n.viewport.set([0,0,e.width,e.height]);for(let c of r){let r=e.renderToTexture.getTexture(c),u=t.getTerrainData(c.tileID);n.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,r.texture);let h=e.transform.calculatePosMatrix(c.tileID.toUnwrapped()),f=t.getMeshFrameDelta(e.transform.zoom),p=e.transform.calculateFogMatrix(c.tileID.toUnwrapped()),d=vt(h,f,p,e.style.sky,e.transform.pitch);s.draw(n,i.TRIANGLES,o,Vr.disabled,a,qr.backCCW,d,u,"terrain",l.vertexBuffer,l.indexBuffer,l.segments)}}class xn{constructor(e,t,r){this.vertexBuffer=e,this.indexBuffer=t,this.segments=r}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class _n{constructor(e,r){this.context=new Br(e),this.transform=r,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:t.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=fe.maxUnderzooming+fe.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new ut}resize(e,t,r){if(this.width=Math.floor(e*r),this.height=Math.floor(t*r),this.pixelRatio=r,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let e of this.style._order)this.style._layers[e].resize()}setup(){let e=this.context,r=new t.aX;r.emplaceBack(0,0),r.emplaceBack(t.X,0),r.emplaceBack(0,t.X),r.emplaceBack(t.X,t.X),this.tileExtentBuffer=e.createVertexBuffer(r,dt.members),this.tileExtentSegments=t.a0.simpleSegment(0,0,4,2);let n=new t.aX;n.emplaceBack(0,0),n.emplaceBack(t.X,0),n.emplaceBack(0,t.X),n.emplaceBack(t.X,t.X),this.debugBuffer=e.createVertexBuffer(n,dt.members),this.debugSegments=t.a0.simpleSegment(0,0,4,5);let i=new t.$;i.emplaceBack(0,0,0,0),i.emplaceBack(t.X,0,t.X,0),i.emplaceBack(0,t.X,0,t.X),i.emplaceBack(t.X,t.X,t.X,t.X),this.rasterBoundsBuffer=e.createVertexBuffer(i,Q.members),this.rasterBoundsSegments=t.a0.simpleSegment(0,0,4,2);let a=new t.aX;a.emplaceBack(0,0),a.emplaceBack(1,0),a.emplaceBack(0,1),a.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(a,dt.members),this.viewportSegments=t.a0.simpleSegment(0,0,4,2);let o=new t.aZ;o.emplaceBack(0),o.emplaceBack(1),o.emplaceBack(3),o.emplaceBack(2),o.emplaceBack(0),this.tileBorderIndexBuffer=e.createIndexBuffer(o);let s=new t.aY;s.emplaceBack(0,1,2),s.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(s);let l=this.context.gl;this.stencilClearMode=new Vr({func:l.ALWAYS,mask:0},0,255,l.ZERO,l.ZERO,l.ZERO)}clearStencil(){let e=this.context,r=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let n=t.H();t.aP(n,0,this.width,this.height,0,0,1),t.K(n,n,[r.drawingBufferWidth,r.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(e,r.TRIANGLES,jr.disabled,this.stencilClearMode,Fr.disabled,qr.disabled,Lt(n),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(e,t){if(this.currentStencilSource===e.source||!e.isTileClipped()||!t||!t.length)return;this.currentStencilSource=e.source;let r=this.context,n=r.gl;this.nextStencilID+t.length>256&&this.clearStencil(),r.setColorMode(Fr.disabled),r.setDepthMode(jr.disabled);let i=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(let e of t){let t=this._tileClippingMaskIDs[e.key]=this.nextStencilID++,a=this.style.map.terrain&&this.style.map.terrain.getTerrainData(e);i.draw(r,n.TRIANGLES,jr.disabled,new Vr({func:n.ALWAYS,mask:0},t,255,n.KEEP,n.KEEP,n.REPLACE),Fr.disabled,qr.disabled,Lt(e.posMatrix),a,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let e=this.nextStencilID++,t=this.context.gl;return new Vr({func:t.NOTEQUAL,mask:255},e,255,t.KEEP,t.KEEP,t.REPLACE)}stencilModeForClipping(e){let t=this.context.gl;return new Vr({func:t.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,t.KEEP,t.KEEP,t.REPLACE)}stencilConfigForOverlap(e){let t=this.context.gl,r=e.sort(((e,t)=>t.overscaledZ-e.overscaledZ)),n=r[r.length-1].overscaledZ,i=r[0].overscaledZ-n+1;if(i>1){this.currentStencilSource=void 0,this.nextStencilID+i>256&&this.clearStencil();let e={};for(let r=0;r=0;this.currentLayer--){let e=this.style._layers[n[this.currentLayer]],t=i[e.source],r=o[e.source];this._renderTileClippingMasks(e,r),this.renderLayer(this,t,e,r)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayerr.source&&!r.isHidden(t)?[e.sourceCaches[r.source]]:[])),i=n.filter((e=>"vector"===e.getSource().type)),a=n.filter((e=>"vector"!==e.getSource().type)),o=e=>{(!r||r.getSource().maxzoomo(e))),r||a.forEach((e=>o(e))),r}(this.style,this.transform.zoom);e&&function(e,t,r){for(let n=0;n0),i&&(t.b0(r,n),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(e,r){let n=e.context,i=n.gl,a=Fr.unblended,o=new jr(i.LEQUAL,jr.ReadWrite,[0,1]),s=r.getTerrainMesh(),l=r.sourceCache.getRenderableTiles(),c=e.useProgram("terrainDepth");n.bindFramebuffer.set(r.getFramebuffer("depth").framebuffer),n.viewport.set([0,0,e.width/devicePixelRatio,e.height/devicePixelRatio]),n.clear({color:t.aM.transparent,depth:1});for(let t of l){let l=r.getTerrainData(t.tileID),u={u_matrix:e.transform.calculatePosMatrix(t.tileID.toUnwrapped()),u_ele_delta:r.getMeshFrameDelta(e.transform.zoom)};c.draw(n,i.TRIANGLES,o,Vr.disabled,a,qr.backCCW,u,l,"terrain",s.vertexBuffer,s.indexBuffer,s.segments)}n.bindFramebuffer.set(null),n.viewport.set([0,0,e.width,e.height])}(this,this.style.map.terrain),function(e,r){let n=e.context,i=n.gl,a=Fr.unblended,o=new jr(i.LEQUAL,jr.ReadWrite,[0,1]),s=r.getTerrainMesh(),l=r.getCoordsTexture(),c=r.sourceCache.getRenderableTiles(),u=e.useProgram("terrainCoords");n.bindFramebuffer.set(r.getFramebuffer("coords").framebuffer),n.viewport.set([0,0,e.width/devicePixelRatio,e.height/devicePixelRatio]),n.clear({color:t.aM.transparent,depth:1}),r.coordsIndex=[];for(let t of c){let c=r.getTerrainData(t.tileID);n.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,l.texture);let h={u_matrix:e.transform.calculatePosMatrix(t.tileID.toUnwrapped()),u_terrain_coords_id:(255-r.coordsIndex.length)/255,u_texture:0,u_ele_delta:r.getMeshFrameDelta(e.transform.zoom)};u.draw(n,i.TRIANGLES,o,Vr.disabled,a,qr.backCCW,h,c,"terrain",s.vertexBuffer,s.indexBuffer,s.segments),r.coordsIndex.push(t.tileID.key)}n.bindFramebuffer.set(null),n.viewport.set([0,0,e.width,e.height])}(this,this.style.map.terrain))}renderLayer(e,r,n,i){if(!n.isHidden(this.transform.zoom)&&("background"===n.type||"custom"===n.type||(i||[]).length))switch(this.id=n.id,n.type){case"symbol":!function(e,r,n,i,a){if("translucent"!==e.renderPass)return;let o=Vr.disabled,s=e.colorModeForRenderPass();(n._unevaluatedLayout.hasValue("text-variable-anchor")||n._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(e,r,n,i,a,o,s,l,c){let u=r.transform,h=nt(),f="map"===a,p="map"===o;for(let a of e){let e=i.getTile(a),o=e.getBucket(n);if(!o||!o.text||!o.text.segments.get().length)continue;let d=t.ag(o.textSizeData,u.zoom),m=Be(e,1,r.transform.zoom),g=ve(a.posMatrix,p,f,r.transform,m),y="none"!==n.layout.get("icon-text-fit")&&o.hasIconData();if(d){let t=Math.pow(2,u.zoom-e.tileID.overscaledZ),n=r.style.map.terrain?(e,t)=>r.style.map.terrain.getElevation(a,e,t):null,i=h.translatePosition(u,e,s,l);Yr(o,f,p,c,u,g,a.posMatrix,t,d,y,h,i,a.toUnwrapped(),n)}}}(i,e,n,r,n.layout.get("text-rotation-alignment"),n.layout.get("text-pitch-alignment"),n.paint.get("text-translate"),n.paint.get("text-translate-anchor"),a),0!==n.paint.get("icon-opacity").constantOr(1)&&$r(e,r,n,i,!1,n.paint.get("icon-translate"),n.paint.get("icon-translate-anchor"),n.layout.get("icon-rotation-alignment"),n.layout.get("icon-pitch-alignment"),n.layout.get("icon-keep-upright"),o,s),0!==n.paint.get("text-opacity").constantOr(1)&&$r(e,r,n,i,!0,n.paint.get("text-translate"),n.paint.get("text-translate-anchor"),n.layout.get("text-rotation-alignment"),n.layout.get("text-pitch-alignment"),n.layout.get("text-keep-upright"),o,s),r.map.showCollisionBoxes&&(Hr(e,r,n,i,!0),Hr(e,r,n,i,!1))}(e,r,n,i,this.style.placement.variableOffsets);break;case"circle":!function(e,r,n,i){if("translucent"!==e.renderPass)return;let a=n.paint.get("circle-opacity"),o=n.paint.get("circle-stroke-width"),s=n.paint.get("circle-stroke-opacity"),l=!n.layout.get("circle-sort-key").isConstant();if(0===a.constantOr(1)&&(0===o.constantOr(1)||0===s.constantOr(1)))return;let c=e.context,u=c.gl,h=e.depthModeForSublayer(0,jr.ReadOnly),f=Vr.disabled,p=e.colorModeForRenderPass(),d=[];for(let a=0;ae.sortKey-t.sortKey));for(let t of d){let{programConfiguration:r,program:i,layoutVertexBuffer:a,indexBuffer:o,uniformValues:s,terrainData:l}=t.state;i.draw(c,u.TRIANGLES,h,f,p,qr.disabled,s,l,n.id,a,o,t.segments,n.paint,e.transform.zoom,r)}}(e,r,n,i);break;case"heatmap":!function(e,r,n,i){if(0===n.paint.get("heatmap-opacity"))return;let a=e.context;if(e.style.map.terrain){for(let t of i){let i=r.getTile(t);r.hasRenderableParent(t)||("offscreen"===e.renderPass?Jr(e,i,n,t):"translucent"===e.renderPass&&Qr(e,n,t))}a.viewport.set([0,0,e.width,e.height])}else"offscreen"===e.renderPass?function(e,r,n,i){let a=e.context,o=a.gl,s=Vr.disabled,l=new Fr([o.ONE,o.ONE],t.aM.transparent,[!0,!0,!0,!0]);(function(e,r,n){let i=e.gl;e.activeTexture.set(i.TEXTURE1),e.viewport.set([0,0,r.width/4,r.height/4]);let a=n.heatmapFbos.get(t.aU);a?(i.bindTexture(i.TEXTURE_2D,a.colorAttachment.get()),e.bindFramebuffer.set(a.framebuffer)):(a=en(e,r.width/4,r.height/4),n.heatmapFbos.set(t.aU,a))})(a,e,n),a.clear({color:t.aM.transparent});for(let t=0;t20&&a.texParameterf(a.TEXTURE_2D,i.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,i.extTextureFilterAnisotropicMax);let _=e.style.map.terrain&&e.style.map.terrain.getTerrainData(n),b=_?n:null,w=b?b.posMatrix:e.transform.calculatePosMatrix(n.toUnwrapped(),f),T=Ut(w,m||[0,0],d||1,v,r);o instanceof ee?s.draw(i,a.TRIANGLES,u,Vr.disabled,l,qr.disabled,T,_,r.id,o.boundsBuffer,e.quadTriangleIndexBuffer,o.boundsSegments):s.draw(i,a.TRIANGLES,u,c[n.overscaledZ],l,qr.disabled,T,_,r.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments)}}(e,r,n,i);break;case"background":!function(e,t,r,n){let i=r.paint.get("background-color"),a=r.paint.get("background-opacity");if(0===a)return;let o=e.context,s=o.gl,l=e.transform,c=l.tileSize,u=r.paint.get("background-pattern");if(e.isPatternMissing(u))return;let h=!u&&1===i.a&&1===a&&e.opaquePassEnabledForLayer()?"opaque":"translucent";if(e.renderPass!==h)return;let f=Vr.disabled,p=e.depthModeForSublayer(0,"opaque"===h?jr.ReadWrite:jr.ReadOnly),d=e.colorModeForRenderPass(),m=e.useProgram(u?"backgroundPattern":"background"),g=n||l.coveringTiles({tileSize:c,terrain:e.style.map.terrain});u&&(o.activeTexture.set(s.TEXTURE0),e.imageManager.bind(e.context));let y=r.getCrossfadeParameters();for(let t of g){let l=n?t.posMatrix:e.transform.calculatePosMatrix(t.toUnwrapped()),h=u?Zt(l,a,e,u,{tileID:t,tileSize:c},y):Wt(l,a,i),g=e.style.map.terrain&&e.style.map.terrain.getTerrainData(t);m.draw(o,s.TRIANGLES,p,f,d,qr.disabled,h,g,r.id,e.tileExtentBuffer,e.quadTriangleIndexBuffer,e.tileExtentSegments)}}(e,0,n,i);break;case"custom":!function(e,t,r){let n=e.context,i=r.implementation;if("offscreen"===e.renderPass){let t=i.prerender;t&&(e.setCustomLayerDefaults(),n.setColorMode(e.colorModeForRenderPass()),t.call(i,n.gl,e.transform.customLayerMatrix()),n.setDirty(),e.setBaseState())}else if("translucent"===e.renderPass){e.setCustomLayerDefaults(),n.setColorMode(e.colorModeForRenderPass()),n.setStencilMode(Vr.disabled);let t="3d"===i.renderingMode?new jr(e.context.gl.LEQUAL,jr.ReadWrite,e.depthRangeFor3D):e.depthModeForSublayer(0,jr.ReadOnly);n.setDepthMode(t),i.render(n.gl,e.transform.customLayerMatrix(),{farZ:e.transform.farZ,nearZ:e.transform.nearZ,fov:e.transform._fov,modelViewProjectionMatrix:e.transform.modelViewProjectionMatrix,projectionMatrix:e.transform.projectionMatrix}),n.setDirty(),e.setBaseState(),n.bindFramebuffer.set(null)}}(e,0,n)}}translatePosMatrix(e,r,n,i,a){if(!n[0]&&!n[1])return e;let o=a?"map"===i?this.transform.angle:0:"viewport"===i?-this.transform.angle:0;if(o){let e=Math.sin(o),t=Math.cos(o);n=[n[0]*t-n[1]*e,n[0]*e+n[1]*t]}let s=[a?n[0]:Be(r,n[0],this.transform.zoom),a?n[1]:Be(r,n[1],this.transform.zoom),0],l=new Float32Array(16);return t.J(l,e,s),l}saveTileTexture(e){let t=this._tileTextures[e.size[0]];t?t.push(e):this._tileTextures[e.size[0]]=[e]}getTileTexture(e){let t=this._tileTextures[e];return t&&t.length>0?t.pop():null}isPatternMissing(e){if(!e)return!1;if(!e.from||!e.to)return!0;let t=this.imageManager.getPattern(e.from.toString()),r=this.imageManager.getPattern(e.to.toString());return!t||!r}useProgram(e,t){this.cache=this.cache||{};let r=e+(t?t.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[r]||(this.cache[r]=new _t(this.context,mt[e],t,Yt[e],this._showOverdrawInspector,this.style.map.terrain)),this.cache[r]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)}initDebugOverlayCanvas(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new w(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){let{drawingBufferWidth:e,drawingBufferHeight:t}=this.context.gl;return this.width!==e||this.height!==t}}class bn{constructor(e,t){this.points=e,this.planes=t}static fromInvProjectionMatrix(e,r,n){let i=Math.pow(2,n),a=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map((n=>{let a=1/(n=t.af([],n,e))[3]/r*i;return t.b1(n,n,[a,a,1/n[3],a])})),o=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((e=>{let t=function(e,t){var r=t[0],n=t[1],i=t[2],a=r*r+n*n+i*i;return a>0&&(a=1/Math.sqrt(a)),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a,e}([],(n=[],i=y([],a[e[0]],a[e[1]]),o=y([],a[e[2]],a[e[1]]),s=i[0],l=i[1],c=i[2],u=o[0],h=o[1],f=o[2],n[0]=l*f-c*h,n[1]=c*u-s*f,n[2]=s*h-l*u,n)),r=-((p=t)[0]*(d=a[e[1]])[0]+p[1]*d[1]+p[2]*d[2]);var n,i,o,s,l,c,u,h,f,p,d;return t.concat(r)}));return new bn(a,o)}}class wn{constructor(e,t){var r,n,i;this.min=e,this.max=t,this.center=function(e,t){return e[0]=.5*t[0],e[1]=.5*t[1],e[2]=.5*t[2],e}([],(r=[],n=this.min,i=this.max,r[0]=n[0]+i[0],r[1]=n[1]+i[1],r[2]=n[2]+i[2],r))}quadrant(e){let t=[e%2==0,e<2],r=m(this.min),n=m(this.max);for(let e=0;e=0&&o++;if(0===o)return 0;o!==r.length&&(n=!1)}if(n)return 2;for(let t=0;t<3;t++){let r=Number.MAX_VALUE,n=-Number.MAX_VALUE;for(let i=0;ithis.max[t]-this.min[t])return 0}return 1}}class Tn{constructor(e=0,t=0,r=0,n=0){if(isNaN(e)||e<0||isNaN(t)||t<0||isNaN(r)||r<0||isNaN(n)||n<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=e,this.bottom=t,this.left=r,this.right=n}interpolate(e,r,n){return null!=r.top&&null!=e.top&&(this.top=t.y.number(e.top,r.top,n)),null!=r.bottom&&null!=e.bottom&&(this.bottom=t.y.number(e.bottom,r.bottom,n)),null!=r.left&&null!=e.left&&(this.left=t.y.number(e.left,r.left,n)),null!=r.right&&null!=e.right&&(this.right=t.y.number(e.right,r.right,n)),this}getCenter(e,r){let n=t.ac((this.left+e-this.right)/2,0,e),i=t.ac((this.top+r-this.bottom)/2,0,r);return new t.P(n,i)}equals(e){return this.top===e.top&&this.bottom===e.bottom&&this.left===e.left&&this.right===e.right}clone(){return new Tn(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}let kn=85.051129;class An{constructor(e,r,n,i,a){this.tileSize=512,this._renderWorldCopies=void 0===a||!!a,this._minZoom=e||0,this._maxZoom=r||22,this._minPitch=n??0,this._maxPitch=i??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Tn,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){let e=new An(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return e.apply(this),e}apply(e){this.tileSize=e.tileSize,this.latRange=e.latRange,this.lngRange=e.lngRange,this.width=e.width,this.height=e.height,this._center=e._center,this._elevation=e._elevation,this.minElevationForCurrentTile=e.minElevationForCurrentTile,this.zoom=e.zoom,this.angle=e.angle,this._fov=e._fov,this._pitch=e._pitch,this._unmodified=e._unmodified,this._edgeInsets=e._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(e){this._minZoom!==e&&(this._minZoom=e,this.zoom=Math.max(this.zoom,e))}get maxZoom(){return this._maxZoom}set maxZoom(e){this._maxZoom!==e&&(this._maxZoom=e,this.zoom=Math.min(this.zoom,e))}get minPitch(){return this._minPitch}set minPitch(e){this._minPitch!==e&&(this._minPitch=e,this.pitch=Math.max(this.pitch,e))}get maxPitch(){return this._maxPitch}set maxPitch(e){this._maxPitch!==e&&(this._maxPitch=e,this.pitch=Math.min(this.pitch,e))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(e){void 0===e?e=!0:null===e&&(e=!1),this._renderWorldCopies=e}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new t.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(e){let r=-t.b3(e,-180,180)*Math.PI/180;var n;this.angle!==r&&(this._unmodified=!1,this.angle=r,this._calcMatrices(),this.rotationMatrix=(n=new t.A(4),t.A!=Float32Array&&(n[1]=0,n[2]=0),n[0]=1,n[3]=1,n),function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(r),l=Math.cos(r);e[0]=n*l+a*s,e[1]=i*l+o*s,e[2]=n*-s+a*l,e[3]=i*-s+o*l}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(e){let r=t.ac(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(e){e=Math.max(.01,Math.min(60,e)),this._fov!==e&&(this._unmodified=!1,this._fov=e/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(e){let t=Math.min(Math.max(e,this.minZoom),this.maxZoom);this._zoom!==t&&(this._unmodified=!1,this._zoom=t,this.tileZoom=Math.max(0,Math.floor(t)),this.scale=this.zoomScale(t),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(e){e!==this._elevation&&(this._elevation=e,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(e){this._edgeInsets.equals(e)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,e,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(e){return this._edgeInsets.equals(e)}interpolatePadding(e,t,r){this._unmodified=!1,this._edgeInsets.interpolate(e,t,r),this._constrain(),this._calcMatrices()}coveringZoomLevel(e){let t=(e.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/e.tileSize));return Math.max(0,t)}getVisibleUnwrappedCoordinates(e){let r=[new t.b4(0,e)];if(this._renderWorldCopies){let n=this.pointCoordinate(new t.P(0,0)),i=this.pointCoordinate(new t.P(this.width,0)),a=this.pointCoordinate(new t.P(this.width,this.height)),o=this.pointCoordinate(new t.P(0,this.height)),s=Math.floor(Math.min(n.x,i.x,a.x,o.x)),l=Math.floor(Math.max(n.x,i.x,a.x,o.x)),c=1;for(let n=s-c;n<=l+c;n++)0!==n&&r.push(new t.b4(n,e))}return r}coveringTiles(e){var r,n;let i=this.coveringZoomLevel(e),a=i;if(void 0!==e.minzoom&&ie.maxzoom&&(i=e.maxzoom);let o=this.pointCoordinate(this.getCameraPoint()),s=t.Z.fromLngLat(this.center),l=Math.pow(2,i),c=[l*o.x,l*o.y,0],u=[l*s.x,l*s.y,0],h=bn.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,i),f=e.minzoom||0;!e.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(f=i);let p=e.terrain?2/Math.min(this.tileSize,e.tileSize)*this.tileSize:3,d=e=>({aabb:new wn([e*l,0,0],[(e+1)*l,l,0]),zoom:0,x:0,y:0,wrap:e,fullyVisible:!1}),m=[],g=[],y=i,v=e.reparseOverscaled?a:i;if(this._renderWorldCopies)for(let e=1;e<=3;e++)m.push(d(-e)),m.push(d(e));for(m.push(d(0));m.length>0;){let i=m.pop(),a=i.x,o=i.y,s=i.fullyVisible;if(!s){let e=i.aabb.intersects(h);if(0===e)continue;s=2===e}let l=e.terrain?c:u,d=i.aabb.distanceX(l),_=i.aabb.distanceY(l),b=Math.max(Math.abs(d),Math.abs(_));if(i.zoom===y||b>p+(1<=f){let e=y-i.zoom,r=c[0]-.5-(a<>1),h=i.zoom+1,f=i.aabb.quadrant(l);if(e.terrain){let a=new t.S(h,i.wrap,h,c,u),o=e.terrain.getMinMaxElevation(a),s=null!==(r=o.minElevation)&&void 0!==r?r:this.elevation,l=null!==(n=o.maxElevation)&&void 0!==n?n:this.elevation;f=new wn([f.min[0],f.min[1],s],[f.max[0],f.max[1],l])}m.push({aabb:f,zoom:h,x:c,y:u,wrap:i.wrap,fullyVisible:s})}}return g.sort(((e,t)=>e.distanceSq-t.distanceSq)).map((e=>e.tileID))}resize(e,t){this.width=e,this.height=t,this.pixelsToGLUnits=[2/e,-2/t],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(e){return Math.pow(2,e)}scaleZoom(e){return Math.log(e)/Math.LN2}project(e){let r=t.ac(e.lat,-85.051129,kn);return new t.P(t.O(e.lng)*this.worldSize,t.Q(r)*this.worldSize)}unproject(e){return new t.Z(e.x/this.worldSize,e.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(e){let r=this.elevation,n=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,i=this.pointLocation(this.centerPoint,e),a=e.getElevationForLngLatZoom(i,this.tileZoom);if(!(this.elevation-a))return;let o=n+r-a,s=Math.cos(this._pitch)*this.cameraToCenterDistance/o/t.b5(1,i.lat),l=this.scaleZoom(s/this.tileSize);this._elevation=a,this._center=i,this.zoom=l}setLocationAtPoint(e,r){let n=this.pointCoordinate(r),i=this.pointCoordinate(this.centerPoint),a=this.locationCoordinate(e),o=new t.Z(a.x-(n.x-i.x),a.y-(n.y-i.y));this.center=this.coordinateLocation(o),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(e,t){return t?this.coordinatePoint(this.locationCoordinate(e),t.getElevationForLngLatZoom(e,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(e))}pointLocation(e,t){return this.coordinateLocation(this.pointCoordinate(e,t))}locationCoordinate(e){return t.Z.fromLngLat(e)}coordinateLocation(e){return e&&e.toLngLat()}pointCoordinate(e,r){if(r){let t=r.pointCoordinate(e);if(null!=t)return t}let n=[e.x,e.y,0,1],i=[e.x,e.y,1,1];t.af(n,n,this.pixelMatrixInverse),t.af(i,i,this.pixelMatrixInverse);let a=n[3],o=i[3],s=n[1]/a,l=i[1]/o,c=n[2]/a,u=i[2]/o,h=c===u?0:(0-c)/(u-c);return new t.Z(t.y.number(n[0]/a,i[0]/o,h)/this.worldSize,t.y.number(s,l,h)/this.worldSize)}coordinatePoint(e,r=0,n=this.pixelMatrix){let i=[e.x*this.worldSize,e.y*this.worldSize,r,1];return t.af(i,i,n),new t.P(i[0]/i[3],i[1]/i[3])}getBounds(){let e=Math.max(0,this.height/2-this.getHorizon());return(new Z).extend(this.pointLocation(new t.P(0,e))).extend(this.pointLocation(new t.P(this.width,e))).extend(this.pointLocation(new t.P(this.width,this.height))).extend(this.pointLocation(new t.P(0,this.height)))}getMaxBounds(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new Z([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(e){e?(this.lngRange=[e.getWest(),e.getEast()],this.latRange=[e.getSouth(),e.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,kn])}calculateTileMatrix(e){let r=e.canonical,n=this.worldSize/this.zoomScale(r.z),i=r.x+Math.pow(2,r.z)*e.wrap,a=t.an(new Float64Array(16));return t.J(a,a,[i*n,r.y*n,0]),t.K(a,a,[n/t.X,n/t.X,1]),a}calculatePosMatrix(e,r=!1){let n=e.key,i=r?this._alignedPosMatrixCache:this._posMatrixCache;if(i[n])return i[n];let a=this.calculateTileMatrix(e);return t.L(a,r?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,a),i[n]=new Float32Array(a),i[n]}calculateFogMatrix(e){let r=e.key,n=this._fogMatrixCache;if(n[r])return n[r];let i=this.calculateTileMatrix(e);return t.L(i,this.fogMatrix,i),n[r]=new Float32Array(i),n[r]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(e,r){r=t.ac(+r,this.minZoom,this.maxZoom);let n={center:new t.N(e.lng,e.lat),zoom:r},i=this.lngRange;if(!this._renderWorldCopies&&null===i){let e=179.9999999999;i=[-e,e]}let a=this.tileSize*this.zoomScale(n.zoom),o=0,s=a,l=0,c=a,u=0,h=0,{x:f,y:p}=this.size;if(this.latRange){let e=this.latRange;o=t.Q(e[1])*a,s=t.Q(e[0])*a,s-os&&(m=s-e)}if(i){let e=(l+c)/2,r=g;this._renderWorldCopies&&(r=t.b3(g,e-a/2,e+a/2));let n=f/2;r-nc&&(d=c-n)}if(void 0!==d||void 0!==m){let e=new t.P(d??g,m??y);n.center=this.unproject.call({worldSize:a},e).wrap()}return n}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let e=this._unmodified,{center:t,zoom:r}=this.getConstrained(this.center,this.zoom);this.center=t,this.zoom=r,this._unmodified=e,this._constraining=!1}_calcMatrices(){if(!this.height)return;let e=this.centerOffset,r=this.point.x,n=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=t.b5(1,this.center.lat)*this.worldSize;let i=t.an(new Float64Array(16));t.K(i,i,[this.width/2,-this.height/2,1]),t.J(i,i,[1,-1,0]),this.labelPlaneMatrix=i,i=t.an(new Float64Array(16)),t.K(i,i,[1,-1,1]),t.J(i,i,[-1,-1,0]),t.K(i,i,[2/this.width,2/this.height,1]),this.glCoordMatrix=i;let a=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),o=Math.min(this.elevation,this.minElevationForCurrentTile),s=a-o*this._pixelPerMeter/Math.cos(this._pitch),l=o<0?s:a,c=Math.PI/2+this._pitch,u=this._fov*(.5+e.y/this.height),h=Math.sin(u)*l/Math.sin(t.ac(Math.PI-c-u,.01,Math.PI-.01)),f=this.getHorizon(),p=2*Math.atan(f/this.cameraToCenterDistance)*(.5+e.y/(2*f)),d=Math.sin(p)*l/Math.sin(t.ac(Math.PI-c-p,.01,Math.PI-.01)),m=Math.min(h,d);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*m+l),this.nearZ=this.height/50,i=new Float64Array(16),t.b6(i,this._fov,this.width/this.height,this.nearZ,this.farZ),i[8]=2*-e.x/this.width,i[9]=2*e.y/this.height,this.projectionMatrix=t.ae(i),t.K(i,i,[1,-1,1]),t.J(i,i,[0,0,-this.cameraToCenterDistance]),t.b7(i,i,this._pitch),t.ad(i,i,this.angle),t.J(i,i,[-r,-n,0]),this.mercatorMatrix=t.K([],i,[this.worldSize,this.worldSize,this.worldSize]),t.K(i,i,[1,1,this._pixelPerMeter]),this.pixelMatrix=t.L(new Float64Array(16),this.labelPlaneMatrix,i),t.J(i,i,[0,0,-this.elevation]),this.modelViewProjectionMatrix=i,this.invModelViewProjectionMatrix=t.as([],i),this.fogMatrix=new Float64Array(16),t.b6(this.fogMatrix,this._fov,this.width/this.height,a,this.farZ),this.fogMatrix[8]=2*-e.x/this.width,this.fogMatrix[9]=2*e.y/this.height,t.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),t.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),t.b7(this.fogMatrix,this.fogMatrix,this._pitch),t.ad(this.fogMatrix,this.fogMatrix,this.angle),t.J(this.fogMatrix,this.fogMatrix,[-r,-n,0]),t.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),t.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=t.L(new Float64Array(16),this.labelPlaneMatrix,i);let g=this.width%2/2,y=this.height%2/2,v=Math.cos(this.angle),x=Math.sin(this.angle),_=r-Math.round(r)+v*g+x*y,b=n-Math.round(n)+v*y+x*g,w=new Float64Array(i);if(t.J(w,w,[_>.5?_-1:_,b>.5?b-1:b,0]),this.alignedModelViewProjectionMatrix=w,i=t.as(new Float64Array(16),this.pixelMatrix),!i)throw new Error("failed to invert matrix");this.pixelMatrixInverse=i,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;let e=this.pointCoordinate(new t.P(0,0)),r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.af(r,r,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){let e=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.P(0,e))}getCameraQueryGeometry(e){let r=this.getCameraPoint();if(1===e.length)return[e[0],r];{let n=r.x,i=r.y,a=r.x,o=r.y;for(let t of e)n=Math.min(n,t.x),i=Math.min(i,t.y),a=Math.max(a,t.x),o=Math.max(o,t.y);return[new t.P(n,i),new t.P(a,i),new t.P(a,o),new t.P(n,o),new t.P(n,i)]}}lngLatToCameraDepth(e,r){let n=this.locationCoordinate(e),i=[n.x*this.worldSize,n.y*this.worldSize,r,1];return t.af(i,i,this.modelViewProjectionMatrix),i[2]/i[3]}}function Mn(e,t){let r,n=!1,i=null,a=null,o=()=>{i=null,n&&(e.apply(a,r),i=setTimeout(o,t),n=!1)};return(...e)=>(n=!0,a=this,r=e,i||o(),i)}class Sn{constructor(e){this._getCurrentHash=()=>{let e=window.location.hash.replace("#","");if(this._hashName){let t;return e.split("&").map((e=>e.split("="))).forEach((e=>{e[0]===this._hashName&&(t=e)})),(t&&t[1]||"").split("/")}return e.split("/")},this._onHashChange=()=>{let e=this._getCurrentHash();if(e.length>=3&&!e.some((e=>isNaN(e)))){let t=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(e[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:t,pitch:+(e[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{let e=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,e)},this._removeHash=()=>{let e=this._getCurrentHash();if(0===e.length)return;let t=e.join("/"),r=t;r.split("&").length>0&&(r=r.split("&")[0]),this._hashName&&(r=`${this._hashName}=${t}`);let n=window.location.hash.replace(r,"");n.startsWith("#&")?n=n.slice(0,1)+n.slice(2):"#"===n&&(n="");let i=window.location.href.replace(/(#.+)?$/,n);i=i.replace("&&","&"),window.history.replaceState(window.history.state,null,i)},this._updateHash=Mn(this._updateHashUnthrottled,300),this._hashName=e&&encodeURIComponent(e)}addTo(e){return this._map=e,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(e){let t=this._map.getCenter(),r=Math.round(100*this._map.getZoom())/100,n=Math.ceil((r*Math.LN2+Math.log(512/360/.5))/Math.LN10),i=Math.pow(10,n),a=Math.round(t.lng*i)/i,o=Math.round(t.lat*i)/i,s=this._map.getBearing(),l=this._map.getPitch(),c="";if(c+=e?`/${a}/${o}/${r}`:`${r}/${o}/${a}`,(s||l)&&(c+="/"+Math.round(10*s)/10),l&&(c+=`/${Math.round(l)}`),this._hashName){let e=this._hashName,t=!1,r=window.location.hash.slice(1).split("&").map((r=>{let n=r.split("=")[0];return n===e?(t=!0,`${n}=${c}`):r})).filter((e=>e));return t||r.push(`${e}=${c}`),`#${r.join("&")}`}return`#${c}`}}let En={linearity:.3,easing:t.b8(0,0,.3,1)},Cn=t.e({deceleration:2500,maxSpeed:1400},En),In=t.e({deceleration:20,maxSpeed:1400},En),Ln=t.e({deceleration:1e3,maxSpeed:360},En),Pn=t.e({deceleration:1e3,maxSpeed:90},En);class zn{constructor(e){this._map=e,this.clear()}clear(){this._inertiaBuffer=[]}record(e){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:a.now(),settings:e})}_drainInertiaBuffer(){let e=this._inertiaBuffer,t=a.now();for(;e.length>0&&t-e[0].time>160;)e.shift()}_onMoveEnd(e){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let r={zoom:0,bearing:0,pitch:0,pan:new t.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:e}of this._inertiaBuffer)r.zoom+=e.zoomDelta||0,r.bearing+=e.bearingDelta||0,r.pitch+=e.pitchDelta||0,e.panDelta&&r.pan._add(e.panDelta),e.around&&(r.around=e.around),e.pinchAround&&(r.pinchAround=e.pinchAround);let n=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,i={};if(r.pan.mag()){let a=On(r.pan.mag(),n,t.e({},Cn,e||{}));i.offset=r.pan.mult(a.amount/r.pan.mag()),i.center=this._map.transform.center,Dn(i,a)}if(r.zoom){let e=On(r.zoom,n,In);i.zoom=this._map.transform.zoom+e.amount,Dn(i,e)}if(r.bearing){let e=On(r.bearing,n,Ln);i.bearing=this._map.transform.bearing+t.ac(e.amount,-179,179),Dn(i,e)}if(r.pitch){let e=On(r.pitch,n,Pn);i.pitch=this._map.transform.pitch+e.amount,Dn(i,e)}if(i.zoom||i.bearing){let e=void 0===r.pinchAround?r.around:r.pinchAround;i.around=e?this._map.unproject(e):this._map.getCenter()}return this.clear(),t.e(i,{noMoveStart:!0})}}function Dn(e,t){(!e.duration||e.durationr.unproject(e))),l=a.reduce(((e,t,r,n)=>e.add(t.div(n.length))),new t.P(0,0));super(e,{points:a,point:l,lngLats:s,lngLat:r.unproject(l),originalEvent:n}),this._defaultPrevented=!1}}class Bn extends t.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,t,r){super(e,{originalEvent:r}),this._defaultPrevented=!1}}class jn{constructor(e,t){this._map=e,this._clickTolerance=t.clickTolerance}reset(){delete this._mousedownPos}wheel(e){return this._firePreventable(new Bn(e.type,this._map,e))}mousedown(e,t){return this._mousedownPos=t,this._firePreventable(new Rn(e.type,this._map,e))}mouseup(e){this._map.fire(new Rn(e.type,this._map,e))}click(e,t){this._mousedownPos&&this._mousedownPos.dist(t)>=this._clickTolerance||this._map.fire(new Rn(e.type,this._map,e))}dblclick(e){return this._firePreventable(new Rn(e.type,this._map,e))}mouseover(e){this._map.fire(new Rn(e.type,this._map,e))}mouseout(e){this._map.fire(new Rn(e.type,this._map,e))}touchstart(e){return this._firePreventable(new Fn(e.type,this._map,e))}touchmove(e){this._map.fire(new Fn(e.type,this._map,e))}touchend(e){this._map.fire(new Fn(e.type,this._map,e))}touchcancel(e){this._map.fire(new Fn(e.type,this._map,e))}_firePreventable(e){if(this._map.fire(e),e.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Nn{constructor(e){this._map=e}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(e){this._map.fire(new Rn(e.type,this._map,e))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Rn("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(e){this._delayContextMenu?this._contextMenuEvent=e:this._ignoreContextMenu||this._map.fire(new Rn(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Un{constructor(e){this._map=e}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(e){return this.transform.pointLocation(t.P.convert(e),this._map.terrain)}}class Vn{constructor(e,t){this._map=e,this._tr=new Un(e),this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=t.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(e,t){this.isEnabled()&&e.shiftKey&&0===e.button&&(o.disableDrag(),this._startPos=this._lastPos=t,this._active=!0)}mousemoveWindow(e,t){if(!this._active)return;let r=t;if(this._lastPos.equals(r)||!this._box&&r.dist(this._startPos)e.fitScreenCoordinates(n,i,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",e)}keydown(e){this._active&&27===e.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",e))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(o.remove(this._box),this._box=null),o.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(e,r){return this._map.fire(new t.k(e,{originalEvent:r}))}}function qn(e,t){if(e.length!==t.length)throw new Error(`The number of touches and points are not equal - touches ${e.length}, points ${t.length}`);let r={};for(let n=0;nthis.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),n.length===this.numTouches&&(this.centroid=function(e){let r=new t.P(0,0);for(let t of e)r._add(t);return r.div(e.length)}(r),this.touches=qn(n,r)))}touchmove(e,t,r){if(this.aborted||!this.centroid)return;let n=qn(r,t);for(let e in this.touches){let t=n[e];(!t||t.dist(this.touches[e])>30)&&(this.aborted=!0)}}touchend(e,t,r){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),0===r.length){let e=!this.aborted&&this.centroid;if(this.reset(),e)return e}}}class Gn{constructor(e){this.singleTap=new Hn(e),this.numTaps=e.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(e,t,r){this.singleTap.touchstart(e,t,r)}touchmove(e,t,r){this.singleTap.touchmove(e,t,r)}touchend(e,t,r){let n=this.singleTap.touchend(e,t,r);if(n){let t=e.timeStamp-this.lastTime<500,r=!this.lastTap||this.lastTap.dist(n)<30;if(t&&r||this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=n,this.count===this.numTaps)return this.reset(),n}}}class Wn{constructor(e){this._tr=new Un(e),this._zoomIn=new Gn({numTouches:1,numTaps:2}),this._zoomOut=new Gn({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(e,t,r){this._zoomIn.touchstart(e,t,r),this._zoomOut.touchstart(e,t,r)}touchmove(e,t,r){this._zoomIn.touchmove(e,t,r),this._zoomOut.touchmove(e,t,r)}touchend(e,t,r){let n=this._zoomIn.touchend(e,t,r),i=this._zoomOut.touchend(e,t,r),a=this._tr;return n?(this._active=!0,e.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:t=>t.easeTo({duration:300,zoom:a.zoom+1,around:a.unproject(n)},{originalEvent:e})}):i?(this._active=!0,e.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:t=>t.easeTo({duration:300,zoom:a.zoom-1,around:a.unproject(i)},{originalEvent:e})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Zn{constructor(e){this._enabled=!!e.enable,this._moveStateManager=e.moveStateManager,this._clickTolerance=e.clickTolerance||1,this._moveFunction=e.move,this._activateOnStart=!!e.activateOnStart,e.assignEvents(this),this.reset()}reset(e){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(e)}_move(...e){let t=this._moveFunction(...e);if(t.bearingDelta||t.pitchDelta||t.around||t.panDelta)return this._active=!0,t}dragStart(e,t){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(e)&&(this._moveStateManager.startMove(e),this._lastPoint=t.length?t[0]:t,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(e,t){if(!this.isEnabled())return;let r=this._lastPoint;if(!r)return;if(e.preventDefault(),!this._moveStateManager.isValidMoveEvent(e))return void this.reset(e);let n=t.length?t[0]:t;return!this._moved&&n.dist(r){e.mousedown=e.dragStart,e.mousemoveWindow=e.dragMove,e.mouseup=e.dragEnd,e.contextmenu=e=>{e.preventDefault()}},Jn=({enable:e,clickTolerance:t,bearingDegreesPerPixelMoved:r=.8})=>{let n=new Xn({checkCorrectEvent:e=>0===o.mouseButton(e)&&e.ctrlKey||2===o.mouseButton(e)});return new Zn({clickTolerance:t,move:(e,t)=>({bearingDelta:(t.x-e.x)*r}),moveStateManager:n,enable:e,assignEvents:Kn})},Qn=({enable:e,clickTolerance:t,pitchDegreesPerPixelMoved:r=-.5})=>{let n=new Xn({checkCorrectEvent:e=>0===o.mouseButton(e)&&e.ctrlKey||2===o.mouseButton(e)});return new Zn({clickTolerance:t,move:(e,t)=>({pitchDelta:(t.y-e.y)*r}),moveStateManager:n,enable:e,assignEvents:Kn})};class ei{constructor(e,t){this._clickTolerance=e.clickTolerance||1,this._map=t,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new t.P(0,0)}_shouldBePrevented(e){return e<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(e,t,r){return this._calculateTransform(e,t,r)}touchmove(e,t,r){if(this._active){if(!this._shouldBePrevented(r.length))return e.preventDefault(),this._calculateTransform(e,t,r);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",e)}}touchend(e,t,r){this._calculateTransform(e,t,r),this._active&&this._shouldBePrevented(r.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(e,r,n){n.length>0&&(this._active=!0);let i=qn(n,r),a=new t.P(0,0),o=new t.P(0,0),s=0;for(let e in i){let t=i[e],r=this._touches[e];r&&(a._add(t),o._add(t.sub(r)),s++,i[e]=t)}if(this._touches=i,this._shouldBePrevented(s)||!o.mag())return;let l=o.div(s);return this._sum._add(l),this._sum.mag()Math.abs(e.x)}class li extends ti{constructor(e){super(),this._currentTouchCount=0,this._map=e}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(e,t,r){super.touchstart(e,t,r),this._currentTouchCount=r.length}_start(e){this._lastPoints=e,si(e[0].sub(e[1]))&&(this._valid=!1)}_move(e,t,r){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let n=e[0].sub(this._lastPoints[0]),i=e[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(n,i,r.timeStamp),this._valid?(this._lastPoints=e,this._active=!0,{pitchDelta:(n.y+i.y)/2*-.5}):void 0}gestureBeginsVertically(e,t,r){if(void 0!==this._valid)return this._valid;let n=e.mag()>=2,i=t.mag()>=2;if(!n&&!i)return;if(!n||!i)return void 0===this._firstMove&&(this._firstMove=r),r-this._firstMove<100&&void 0;let a=e.y>0==t.y>0;return si(e)&&si(t)&&a}}let ci={panStep:100,bearingStep:15,pitchStep:10};class ui{constructor(e){this._tr=new Un(e);let t=ci;this._panStep=t.panStep,this._bearingStep=t.bearingStep,this._pitchStep=t.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let t=0,r=0,n=0,i=0,a=0;switch(e.keyCode){case 61:case 107:case 171:case 187:t=1;break;case 189:case 109:case 173:t=-1;break;case 37:e.shiftKey?r=-1:(e.preventDefault(),i=-1);break;case 39:e.shiftKey?r=1:(e.preventDefault(),i=1);break;case 38:e.shiftKey?n=1:(e.preventDefault(),a=-1);break;case 40:e.shiftKey?n=-1:(e.preventDefault(),a=1);break;default:return}return this._rotationDisabled&&(r=0,n=0),{cameraAnimation:o=>{let s=this._tr;o.easeTo({duration:300,easeId:"keyboardHandler",easing:hi,zoom:t?Math.round(s.zoom)+t*(e.shiftKey?2:1):s.zoom,bearing:s.bearing+r*this._bearingStep,pitch:s.pitch+n*this._pitchStep,offset:[-i*this._panStep,-a*this._panStep],center:s.center},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function hi(e){return e*(2-e)}let fi=4.000244140625;class pi{constructor(e,t){this._onTimeout=e=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(e)},this._map=e,this._tr=new Un(e),this._triggerRenderFrame=t,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(e){this._defaultZoomRate=e}setWheelZoomRate(e){this._wheelZoomRate=e}isEnabled(){return!!this._enabled}isActive(){return!!this._active||void 0!==this._finishTimeout}isZooming(){return!!this._zooming}enable(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!e&&"center"===e.around)}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(e){return!!this._map.cooperativeGestures.isEnabled()&&!(e.ctrlKey||this._map.cooperativeGestures.isBypassed(e))}wheel(e){if(!this.isEnabled())return;if(this._shouldBePrevented(e))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",e);let t=e.deltaMode===WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,r=a.now(),n=r-(this._lastWheelEventTime||0);this._lastWheelEventTime=r,0!==t&&t%fi==0?this._type="wheel":0!==t&&Math.abs(t)<4?this._type="trackpad":n>400?(this._type=null,this._lastValue=t,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(n*t)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,t+=this._lastValue)),e.shiftKey&&t&&(t/=4),this._type&&(this._lastWheelEvent=e,this._delta-=t,this._active||this._start(e)),e.preventDefault()}_start(e){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let r=o.mousePos(this._map.getCanvas(),e),n=this._tr;this._around=r.y>n.transform.height/2-n.transform.getHorizon()?t.N.convert(this._aroundCenter?n.center:n.unproject(r)):t.N.convert(n.center),this._aroundPoint=n.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;let e=this._tr.transform;if(0!==this._delta){let t="wheel"===this._type&&Math.abs(this._delta)>fi?this._wheelZoomRate:this._defaultZoomRate,r=2/(1+Math.exp(-Math.abs(this._delta*t)));this._delta<0&&0!==r&&(r=1/r);let n="number"==typeof this._targetZoom?e.zoomScale(this._targetZoom):e.scale;this._targetZoom=Math.min(e.maxZoom,Math.max(e.minZoom,e.scaleZoom(n*r))),"wheel"===this._type&&(this._startZoom=e.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let r,n="number"==typeof this._targetZoom?this._targetZoom:e.zoom,i=this._startZoom,o=this._easing,s=!1,l=a.now()-this._lastWheelEventTime;if("wheel"===this._type&&i&&o&&l){let e=Math.min(l/200,1),a=o(e);r=t.y.number(i,n,a),e<1?this._frameId||(this._frameId=!0):s=!0}else r=n,s=!0;return this._active=!0,s&&(this._active=!1,this._finishTimeout=setTimeout((()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!s,zoomDelta:r-e.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(e){let r=t.b9;if(this._prevEase){let e=this._prevEase,n=(a.now()-e.start)/e.duration,i=e.easing(n+.01)-e.easing(n),o=.27/Math.sqrt(i*i+1e-4)*.01,s=Math.sqrt(.0729-o*o);r=t.b8(o,s,.25,1)}return this._prevEase={start:a.now(),duration:e,easing:r},r}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class di{constructor(e,t){this._clickZoom=e,this._tapZoom=t}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class mi{constructor(e){this._tr=new Un(e),this.reset()}reset(){this._active=!1}dblclick(e,t){return e.preventDefault(),{cameraAnimation:r=>{r.easeTo({duration:300,zoom:this._tr.zoom+(e.shiftKey?-1:1),around:this._tr.unproject(t)},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class gi{constructor(){this._tap=new Gn({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(e,t,r){if(!this._swipePoint)if(this._tapTime){let n=t[0],i=e.timeStamp-this._tapTime<500,a=this._tapPoint.dist(n)<30;i&&a?r.length>0&&(this._swipePoint=n,this._swipeTouch=r[0].identifier):this.reset()}else this._tap.touchstart(e,t,r)}touchmove(e,t,r){if(this._tapTime){if(this._swipePoint){if(r[0].identifier!==this._swipeTouch)return;let n=t[0],i=n.y-this._swipePoint.y;return this._swipePoint=n,e.preventDefault(),this._active=!0,{zoomDelta:i/128}}}else this._tap.touchmove(e,t,r)}touchend(e,t,r){if(this._tapTime)this._swipePoint&&0===r.length&&this.reset();else{let n=this._tap.touchend(e,t,r);n&&(this._tapTime=e.timeStamp,this._tapPoint=n)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class yi{constructor(e,t,r){this._el=e,this._mousePan=t,this._touchPan=r}enable(e){this._inertiaOptions=e||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class vi{constructor(e,t,r){this._pitchWithRotate=e.pitchWithRotate,this._mouseRotate=t,this._mousePitch=r}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class xi{constructor(e,t,r,n){this._el=e,this._touchZoom=t,this._touchRotate=r,this._tapDragZoom=n,this._rotationDisabled=!1,this._enabled=!0}enable(e){this._touchZoom.enable(e),this._rotationDisabled||this._touchRotate.enable(e),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class _i{constructor(e,t){this._bypassKey=-1!==navigator.userAgent.indexOf("Mac")?"metaKey":"ctrlKey",this._map=e,this._options=t,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let e=this._map.getCanvasContainer();e.classList.add("maplibregl-cooperative-gestures"),this._container=o.create("div","maplibregl-cooperative-gesture-screen",e);let t=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");"metaKey"===this._bypassKey&&(t=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let r=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),n=document.createElement("div");n.className="maplibregl-desktop-message",n.textContent=t,this._container.appendChild(n);let i=document.createElement("div");i.className="maplibregl-mobile-message",i.textContent=r,this._container.appendChild(i),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(o.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(e){return e[this._bypassKey]}notifyGestureBlocked(e,r){this._enabled&&(this._map.fire(new t.k("cooperativegestureprevented",{gestureType:e,originalEvent:r})),this._container.classList.add("maplibregl-show"),setTimeout((()=>{this._container.classList.remove("maplibregl-show")}),100))}}let bi=e=>e.zoom||e.drag||e.pitch||e.rotate;class wi extends t.k{}function Ti(e){return e.panDelta&&e.panDelta.mag()||e.zoomDelta||e.bearingDelta||e.pitchDelta}class ki{constructor(e,t){this.handleWindowEvent=e=>{this.handleEvent(e,`${e.type}Window`)},this.handleEvent=(e,t)=>{if("blur"===e.type)return void this.stop(!0);this._updatingCamera=!0;let r="renderFrame"===e.type?void 0:e,n={needsRenderFrame:!1},i={},a={},s=e.touches,l=s?this._getMapTouches(s):void 0,c=l?o.touchPos(this._map.getCanvas(),l):o.mousePos(this._map.getCanvas(),e);for(let{handlerName:o,handler:s,allowed:u}of this._handlers){if(!s.isEnabled())continue;let h;this._blockedByActive(a,u,o)?s.reset():s[t||e.type]&&(h=s[t||e.type](e,c,l),this.mergeHandlerResult(n,i,h,o,r),h&&h.needsRenderFrame&&this._triggerRenderFrame()),(h||s.isActive())&&(a[o]=s)}let u={};for(let e in this._previousActiveHandlers)a[e]||(u[e]=r);this._previousActiveHandlers=a,(Object.keys(u).length||Ti(n))&&(this._changes.push([n,i,u]),this._triggerRenderFrame()),(Object.keys(a).length||Ti(n))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:h}=n;h&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],h(this._map))},this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new zn(e),this._bearingSnap=t.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(t);let r=this._el;this._listeners=[[r,"touchstart",{passive:!0}],[r,"touchmove",{passive:!1}],[r,"touchend",void 0],[r,"touchcancel",void 0],[r,"mousedown",void 0],[r,"mousemove",void 0],[r,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[r,"mouseover",void 0],[r,"mouseout",void 0],[r,"dblclick",void 0],[r,"click",void 0],[r,"keydown",{capture:!1}],[r,"keyup",void 0],[r,"wheel",{passive:!1}],[r,"contextmenu",void 0],[window,"blur",void 0]];for(let[e,t,r]of this._listeners)o.addEventListener(e,t,e===document?this.handleWindowEvent:this.handleEvent,r)}destroy(){for(let[e,t,r]of this._listeners)o.removeEventListener(e,t,e===document?this.handleWindowEvent:this.handleEvent,r)}_addDefaultHandlers(e){let t=this._map,r=t.getCanvasContainer();this._add("mapEvent",new jn(t,e));let n=t.boxZoom=new Vn(t,e);this._add("boxZoom",n),e.interactive&&e.boxZoom&&n.enable();let i=t.cooperativeGestures=new _i(t,e.cooperativeGestures);this._add("cooperativeGestures",i),e.cooperativeGestures&&i.enable();let a=new Wn(t),s=new mi(t);t.doubleClickZoom=new di(s,a),this._add("tapZoom",a),this._add("clickZoom",s),e.interactive&&e.doubleClickZoom&&t.doubleClickZoom.enable();let l=new gi;this._add("tapDragZoom",l);let c=t.touchPitch=new li(t);this._add("touchPitch",c),e.interactive&&e.touchPitch&&t.touchPitch.enable(e.touchPitch);let u=Jn(e),h=Qn(e);t.dragRotate=new vi(e,u,h),this._add("mouseRotate",u,["mousePitch"]),this._add("mousePitch",h,["mouseRotate"]),e.interactive&&e.dragRotate&&t.dragRotate.enable();let f=(({enable:e,clickTolerance:t})=>{let r=new Xn({checkCorrectEvent:e=>0===o.mouseButton(e)&&!e.ctrlKey});return new Zn({clickTolerance:t,move:(e,t)=>({around:t,panDelta:t.sub(e)}),activateOnStart:!0,moveStateManager:r,enable:e,assignEvents:Kn})})(e),p=new ei(e,t);t.dragPan=new yi(r,f,p),this._add("mousePan",f),this._add("touchPan",p,["touchZoom","touchRotate"]),e.interactive&&e.dragPan&&t.dragPan.enable(e.dragPan);let d=new oi,m=new ii;t.touchZoomRotate=new xi(r,m,d,l),this._add("touchRotate",d,["touchPan","touchZoom"]),this._add("touchZoom",m,["touchPan","touchRotate"]),e.interactive&&e.touchZoomRotate&&t.touchZoomRotate.enable(e.touchZoomRotate);let g=t.scrollZoom=new pi(t,(()=>this._triggerRenderFrame()));this._add("scrollZoom",g,["mousePan"]),e.interactive&&e.scrollZoom&&t.scrollZoom.enable(e.scrollZoom);let y=t.keyboard=new ui(t);this._add("keyboard",y),e.interactive&&e.keyboard&&t.keyboard.enable(),this._add("blockableMapEvent",new Nn(t))}_add(e,t,r){this._handlers.push({handlerName:e,handler:t,allowed:r}),this._handlersById[e]=t}stop(e){if(!this._updatingCamera){for(let{handler:e}of this._handlers)e.reset();this._inertia.clear(),this._fireEvents({},{},e),this._changes=[]}}isActive(){for(let{handler:e}of this._handlers)if(e.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!bi(this._eventsInProgress)||this.isZooming()}_blockedByActive(e,t,r){for(let n in e)if(n!==r&&(!t||t.indexOf(n)<0))return!0;return!1}_getMapTouches(e){let t=[];for(let r of e)this._el.contains(r.target)&&t.push(r);return t}mergeHandlerResult(e,r,n,i,a){if(!n)return;t.e(e,n);let o={handlerName:i,originalEvent:n.originalEvent||a};void 0!==n.zoomDelta&&(r.zoom=o),void 0!==n.panDelta&&(r.drag=o),void 0!==n.pitchDelta&&(r.pitch=o),void 0!==n.bearingDelta&&(r.rotate=o)}_applyChanges(){let e={},r={},n={};for(let[i,a,o]of this._changes)i.panDelta&&(e.panDelta=(e.panDelta||new t.P(0,0))._add(i.panDelta)),i.zoomDelta&&(e.zoomDelta=(e.zoomDelta||0)+i.zoomDelta),i.bearingDelta&&(e.bearingDelta=(e.bearingDelta||0)+i.bearingDelta),i.pitchDelta&&(e.pitchDelta=(e.pitchDelta||0)+i.pitchDelta),void 0!==i.around&&(e.around=i.around),void 0!==i.pinchAround&&(e.pinchAround=i.pinchAround),i.noInertia&&(e.noInertia=i.noInertia),t.e(r,a),t.e(n,o);this._updateMapTransform(e,r,n),this._changes=[]}_updateMapTransform(e,t,r){let n=this._map,i=n._getTransformForUpdate(),a=n.terrain;if(!(Ti(e)||a&&this._terrainMovement))return this._fireEvents(t,r,!0);let{panDelta:o,zoomDelta:s,bearingDelta:l,pitchDelta:c,around:u,pinchAround:h}=e;void 0!==h&&(u=h),n._stop(!0),u=u||n.transform.centerPoint;let f=i.pointLocation(o?u.sub(o):u);l&&(i.bearing+=l),c&&(i.pitch+=c),s&&(i.zoom+=s),a?this._terrainMovement||!t.drag&&!t.zoom?t.drag&&this._terrainMovement?i.center=i.pointLocation(i.centerPoint.sub(o)):i.setLocationAtPoint(f,u):(this._terrainMovement=!0,this._map._elevationFreeze=!0,i.setLocationAtPoint(f,u)):i.setLocationAtPoint(f,u),n._applyUpdatedTransform(i),this._map._update(),e.noInertia||this._inertia.record(e),this._fireEvents(t,r,!0)}_fireEvents(e,r,n){let i=bi(this._eventsInProgress),o=bi(e),s={};for(let t in e){let{originalEvent:r}=e[t];this._eventsInProgress[t]||(s[`${t}start`]=r),this._eventsInProgress[t]=e[t]}!i&&o&&this._fireEvent("movestart",o.originalEvent);for(let e in s)this._fireEvent(e,s[e]);o&&this._fireEvent("move",o.originalEvent);for(let t in e){let{originalEvent:r}=e[t];this._fireEvent(t,r)}let l,c={};for(let e in this._eventsInProgress){let{handlerName:t,originalEvent:n}=this._eventsInProgress[e];this._handlersById[t].isActive()||(delete this._eventsInProgress[e],l=r[t]||n,c[`${e}end`]=l)}for(let e in c)this._fireEvent(e,c[e]);let u=bi(this._eventsInProgress),h=(i||o)&&!u;if(h&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let e=this._map._getTransformForUpdate();e.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(e)}if(n&&h){this._updatingCamera=!0;let e=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),r=e=>0!==e&&-this._bearingSnap{delete this._frameId,this.handleEvent(new wi("renderFrame",{timeStamp:e})),this._applyChanges()}))}_triggerRenderFrame(){void 0===this._frameId&&(this._frameId=this._requestFrame())}}class Ai extends t.E{constructor(e,t){super(),this._renderFrameCallback=()=>{let e=Math.min((a.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=e,this._bearingSnap=t.bearingSnap,this.on("moveend",(()=>{delete this._requestedCameraState}))}getCenter(){return new t.N(this.transform.center.lng,this.transform.center.lat)}setCenter(e,t){return this.jumpTo({center:e},t)}panBy(e,r,n){return e=t.P.convert(e).mult(-1),this.panTo(this.transform.center,t.e({offset:e},r),n)}panTo(e,r,n){return this.easeTo(t.e({center:e},r),n)}getZoom(){return this.transform.zoom}setZoom(e,t){return this.jumpTo({zoom:e},t),this}zoomTo(e,r,n){return this.easeTo(t.e({zoom:e},r),n)}zoomIn(e,t){return this.zoomTo(this.getZoom()+1,e,t),this}zoomOut(e,t){return this.zoomTo(this.getZoom()-1,e,t),this}getBearing(){return this.transform.bearing}setBearing(e,t){return this.jumpTo({bearing:e},t),this}getPadding(){return this.transform.padding}setPadding(e,t){return this.jumpTo({padding:e},t),this}rotateTo(e,r,n){return this.easeTo(t.e({bearing:e},r),n)}resetNorth(e,r){return this.rotateTo(0,t.e({duration:1e3},e),r),this}resetNorthPitch(e,r){return this.easeTo(t.e({bearing:0,pitch:0,duration:1e3},e),r),this}snapToNorth(e,t){return Math.abs(this.getBearing()){if(this._zooming&&(i.zoom=t.y.number(o,y,n)),this._rotating&&(i.bearing=t.y.number(s,u,n)),this._pitching&&(i.pitch=t.y.number(l,h,n)),this._padding&&(i.interpolatePadding(c,f,n),d=i.centerPoint.add(p)),this.terrain&&!e.freezeElevation&&this._updateElevation(n),v)i.setLocationAtPoint(v,x);else{let e=i.zoomScale(i.zoom-o),t=y>o?Math.min(2,w):Math.max(.5,w),r=Math.pow(t,1-n),a=i.unproject(_.add(b.mult(n*r)).mult(e));i.setLocationAtPoint(i.renderWorldCopies?a.wrap():a,d)}this._applyUpdatedTransform(i),this._fireMoveEvents(r)}),(t=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(r,t)}),e),this}_prepareEase(e,r,n={}){this._moving=!0,r||n.moving||this.fire(new t.k("movestart",e)),this._zooming&&!n.zooming&&this.fire(new t.k("zoomstart",e)),this._rotating&&!n.rotating&&this.fire(new t.k("rotatestart",e)),this._pitching&&!n.pitching&&this.fire(new t.k("pitchstart",e))}_prepareElevation(e){this._elevationCenter=e,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(e,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(e){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);let r=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(e<1&&r!==this._elevationTarget){let t=this._elevationTarget-this._elevationStart;this._elevationStart+=e*(t-(r-(t*e+this._elevationStart))/(1-e)),this._elevationTarget=r}this.transform.elevation=t.y.number(this._elevationStart,this._elevationTarget,e)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(e){let t=e.getCameraPosition(),r=this.terrain.getElevationForLngLatZoom(t.lngLat,e.zoom);if(t.altitudethis._elevateCameraIfInsideTerrain(e))),this.transformCameraUpdate&&t.push((e=>this.transformCameraUpdate(e))),!t.length)return;let r=e.clone();for(let e of t){let t=r.clone(),{center:n,zoom:i,pitch:a,bearing:o,elevation:s}=e(t);n&&(t.center=n),void 0!==i&&(t.zoom=i),void 0!==a&&(t.pitch=a),void 0!==o&&(t.bearing=o),void 0!==s&&(t.elevation=s),r.apply(t)}this.transform.apply(r)}_fireMoveEvents(e){this.fire(new t.k("move",e)),this._zooming&&this.fire(new t.k("zoom",e)),this._rotating&&this.fire(new t.k("rotate",e)),this._pitching&&this.fire(new t.k("pitch",e))}_afterEase(e,r){if(this._easeId&&r&&this._easeId===r)return;delete this._easeId;let n=this._zooming,i=this._rotating,a=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,n&&this.fire(new t.k("zoomend",e)),i&&this.fire(new t.k("rotateend",e)),a&&this.fire(new t.k("pitchend",e)),this.fire(new t.k("moveend",e))}flyTo(e,r){var n;if(!e.essential&&a.prefersReducedMotion){let n=t.M(e,["center","zoom","bearing","pitch","around"]);return this.jumpTo(n,r)}this.stop(),e=t.e({offset:[0,0],speed:1.2,curve:1.42,easing:t.b9},e);let i=this._getTransformForUpdate(),o=i.zoom,s=i.bearing,l=i.pitch,c=i.padding,u="bearing"in e?this._normalizeBearing(e.bearing,s):s,h="pitch"in e?+e.pitch:l,f="padding"in e?e.padding:i.padding,p=t.P.convert(e.offset),d=i.centerPoint.add(p),m=i.pointLocation(d),{center:g,zoom:y}=i.getConstrained(t.N.convert(e.center||m),null!==(n=e.zoom)&&void 0!==n?n:o);this._normalizeCenter(g,i);let v=i.zoomScale(y-o),x=i.project(m),_=i.project(g).sub(x),b=e.curve,w=Math.max(i.width,i.height),T=w/v,k=_.mag();if("minZoom"in e){let r=t.ac(Math.min(e.minZoom,o,y),i.minZoom,i.maxZoom),n=w/i.zoomScale(r-o);b=Math.sqrt(n/k*2)}let A=b*b;function M(e){let t=(T*T-w*w+(e?-1:1)*A*A*k*k)/(2*(e?T:w)*A*k);return Math.log(Math.sqrt(t*t+1)-t)}function S(e){return(Math.exp(e)-Math.exp(-e))/2}function E(e){return(Math.exp(e)+Math.exp(-e))/2}let C=M(!1),I=function(e){return E(C)/E(C+b*e)},L=function(e){return w*((E(C)*(S(t=C+b*e)/E(t))-S(C))/A)/k;var t},P=(M(!0)-C)/b;if(Math.abs(k)<1e-6||!isFinite(P)){if(Math.abs(w-T)<1e-6)return this.easeTo(e,r);let t=T0,I=e=>Math.exp(t*b*e)}return e.duration="duration"in e?+e.duration:1e3*P/("screenSpeed"in e?+e.screenSpeed/b:+e.speed),e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=s!==u,this._pitching=h!==l,this._padding=!i.isPaddingEqual(f),this._prepareEase(r,!1),this.terrain&&this._prepareElevation(g),this._ease((n=>{let a=n*P,m=1/I(a);i.zoom=1===n?y:o+i.scaleZoom(m),this._rotating&&(i.bearing=t.y.number(s,u,n)),this._pitching&&(i.pitch=t.y.number(l,h,n)),this._padding&&(i.interpolatePadding(c,f,n),d=i.centerPoint.add(p)),this.terrain&&!e.freezeElevation&&this._updateElevation(n);let v=1===n?g:i.unproject(x.add(_.mult(L(a))).mult(m));i.setLocationAtPoint(i.renderWorldCopies?v.wrap():v,d),this._applyUpdatedTransform(i),this._fireMoveEvents(r)}),(()=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(r)}),e),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(e,t){var r;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let e=this._onEaseEnd;delete this._onEaseEnd,e.call(this,t)}return e||null===(r=this.handlers)||void 0===r||r.stop(!1),this}_ease(e,t,r){!1===r.animate||0===r.duration?(e(1),t()):(this._easeStart=a.now(),this._easeOptions=r,this._onEaseFrame=e,this._onEaseEnd=t,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(e,r){e=t.b3(e,-180,180);let n=Math.abs(e-r);return Math.abs(e-360-r)180?-360:r<-180?360:0}queryTerrainElevation(e){return this.terrain?this.terrain.getElevationForLngLatZoom(t.N.convert(e),this.transform.tileZoom)-this.transform.elevation:null}}let Mi={compact:!0,customAttribution:'MapLibre'};class Si{constructor(e=Mi){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=e=>{!e||"metadata"!==e.sourceDataType&&"visibility"!==e.sourceDataType&&"style"!==e.dataType&&"terrain"!==e.type||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1===this._compact?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=e}getDefaultPosition(){return"bottom-right"}onAdd(e){return this._map=e,this._compact=this.options.compact,this._container=o.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=o.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=o.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){o.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(e,t){let r=this._map._getUIString(`AttributionControl.${t}`);e.title=r,e.setAttribute("aria-label",r)}_updateAttributions(){if(!this._map.style)return;let e=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?e=e.concat(this.options.customAttribution.map((e=>"string"!=typeof e?"":e))):"string"==typeof this.options.customAttribution&&e.push(this.options.customAttribution)),this._map.style.stylesheet){let e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id}let t=this._map.style.sourceCaches;for(let r in t){let n=t[r];if(n.used||n.usedForTerrain){let t=n.getSource();t.attribution&&e.indexOf(t.attribution)<0&&e.push(t.attribution)}}e=e.filter((e=>String(e).trim())),e.sort(((e,t)=>e.length-t.length)),e=e.filter(((t,r)=>{for(let n=r+1;n=0)return!1;return!0}));let r=e.join(" | ");r!==this._attribHTML&&(this._attribHTML=r,e.length?(this._innerContainer.innerHTML=r,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class Ei{constructor(e={}){this._updateCompact=()=>{let e=this._container.children;if(e.length){let t=e[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1!==this._compact&&t.classList.add("maplibregl-compact"):t.classList.remove("maplibregl-compact")}},this.options=e}getDefaultPosition(){return"bottom-left"}onAdd(e){this._map=e,this._compact=this.options&&this.options.compact,this._container=o.create("div","maplibregl-ctrl");let t=o.create("a","maplibregl-ctrl-logo");return t.target="_blank",t.rel="noopener nofollow",t.href="https://maplibre.org/",t.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),t.setAttribute("rel","noopener nofollow"),this._container.appendChild(t),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){o.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Ci{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(e){let t=++this._id;return this._queue.push({callback:e,id:t,cancelled:!1}),t}remove(e){let t=this._currentlyRunning,r=t?this._queue.concat(t):this._queue;for(let t of r)if(t.id===e)return void(t.cancelled=!0)}run(e=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let t=this._currentlyRunning=this._queue;this._queue=[];for(let r of t)if(!r.cancelled&&(r.callback(e),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Ii=t.Y([{name:"a_pos3d",type:"Int16",components:3}]);class Li extends t.E{constructor(e){super(),this.sourceCache=e,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,e.usedForTerrain=!0,e.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(e,r){this.sourceCache.update(e,r),this._renderableTilesKeys=[];let n={};for(let i of e.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:r}))n[i.key]=!0,this._renderableTilesKeys.push(i.key),this._tiles[i.key]||(i.posMatrix=new Float64Array(16),t.aP(i.posMatrix,0,t.X,0,t.X,0,1),this._tiles[i.key]=new ce(i,this.tileSize));for(let e in this._tiles)n[e]||delete this._tiles[e]}freeRtt(e){for(let t in this._tiles){let r=this._tiles[t];(!e||r.tileID.equals(e)||r.tileID.isChildOf(e)||e.isChildOf(r.tileID))&&(r.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map((e=>this.getTileByID(e)))}getTileByID(e){return this._tiles[e]}getTerrainCoords(e){let r={};for(let n of this._renderableTilesKeys){let i=this._tiles[n].tileID;if(i.canonical.equals(e.canonical)){let i=e.clone();i.posMatrix=new Float64Array(16),t.aP(i.posMatrix,0,t.X,0,t.X,0,1),r[n]=i}else if(i.canonical.isChildOf(e.canonical)){let a=e.clone();a.posMatrix=new Float64Array(16);let o=i.canonical.z-e.canonical.z,s=i.canonical.x-(i.canonical.x>>o<>o<>o;t.aP(a.posMatrix,0,c,0,c,0,1),t.J(a.posMatrix,a.posMatrix,[-s*c,-l*c,0]),r[n]=a}else if(e.canonical.isChildOf(i.canonical)){let a=e.clone();a.posMatrix=new Float64Array(16);let o=e.canonical.z-i.canonical.z,s=e.canonical.x-(e.canonical.x>>o<>o<>o;t.aP(a.posMatrix,0,t.X,0,t.X,0,1),t.J(a.posMatrix,a.posMatrix,[s*c,l*c,0]),t.K(a.posMatrix,a.posMatrix,[1/2**o,1/2**o,0]),r[n]=a}}return r}getSourceTile(e,t){let r=this.sourceCache._source,n=e.overscaledZ-this.deltaZoom;if(n>r.maxzoom&&(n=r.maxzoom),n=r.minzoom&&(!i||!i.dem);)i=this.sourceCache.getTileByID(e.scaledTo(n--).key);return i}tilesAfterTime(e=Date.now()){return Object.values(this._tiles).filter((t=>t.timeAdded>=e))}}class Pi{constructor(e,t,r){this.painter=e,this.sourceCache=new Li(t),this.options=r,this.exaggeration="number"==typeof r.exaggeration?r.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(e,r,n,i=t.X){var a;if(!(r>=0&&r=0&&ne.canonical.z&&(e.canonical.z>=n?i=e.canonical.z-n:t.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let a=e.canonical.x-(e.canonical.x>>i<>i<>8<<4|e>>8,r[t+3]=0;let n=new t.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(r.buffer)),i=new w(e,n,e.gl.RGBA,{premultiply:!1});return i.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),this._coordsTexture=i,i}pointCoordinate(e){this.painter.maybeDrawDepthAndCoords(!0);let r=new Uint8Array(4),n=this.painter.context,i=n.gl,a=Math.round(e.x*this.painter.pixelRatio/devicePixelRatio),o=Math.round(e.y*this.painter.pixelRatio/devicePixelRatio),s=Math.round(this.painter.height/devicePixelRatio);n.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),i.readPixels(a,s-o-1,1,1,i.RGBA,i.UNSIGNED_BYTE,r),n.bindFramebuffer.set(null);let l=r[0]+(r[2]>>4<<8),c=r[1]+((15&r[2])<<8),u=this.coordsIndex[255-r[3]],h=u&&this.sourceCache.getTileByID(u);if(!h)return null;let f=this._coordsTextureSize,p=(1<e.id!==t)),this._recentlyUsed.push(e.id)}stampObject(e){e.stamp=++this._stamp}getOrCreateFreeObject(){for(let e of this._recentlyUsed)if(!this._objects[e].inUse)return this._objects[e];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let e=this._createObject(this._objects.length);return this._objects.push(e),e}freeObject(e){e.inUse=!1}freeAllObjects(){for(let e of this._objects)this.freeObject(e)}isFull(){return!(this._objects.length!e.inUse))}}let Di={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Oi{constructor(e,t){this.painter=e,this.terrain=t,this.pool=new zi(e.context,30,t.sourceCache.tileSize*t.qualityFactor)}destruct(){this.pool.destruct()}getTexture(e){return this.pool.getObjectForId(e.rtt[this._stacks.length-1].id).texture}prepareForRender(e,t){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=e._order.filter((r=>!e._layers[r].isHidden(t))),this._coordsDescendingInv={};for(let t in e.sourceCaches){this._coordsDescendingInv[t]={};let r=e.sourceCaches[t].getVisibleCoordinates();for(let e of r){let r=this.terrain.sourceCache.getTerrainCoords(e);for(let e in r)this._coordsDescendingInv[t][e]||(this._coordsDescendingInv[t][e]=[]),this._coordsDescendingInv[t][e].push(r[e])}}this._coordsDescendingInvStr={};for(let t of e._order){let r=e._layers[t],n=r.source;if(Di[r.type]&&!this._coordsDescendingInvStr[n]){this._coordsDescendingInvStr[n]={};for(let e in this._coordsDescendingInv[n])this._coordsDescendingInvStr[n][e]=this._coordsDescendingInv[n][e].map((e=>e.key)).sort().join()}}for(let e of this._renderableTiles)for(let t in this._coordsDescendingInvStr){let r=this._coordsDescendingInvStr[t][e.tileID.key];r&&r!==e.rttCoords[t]&&(e.rtt=[])}}renderLayer(e){if(e.isHidden(this.painter.transform.zoom))return!1;let r=e.type,n=this.painter,i=this._renderableLayerIds[this._renderableLayerIds.length-1]===e.id;if(Di[r]&&(this._prevType&&Di[this._prevType]||this._stacks.push([]),this._prevType=r,this._stacks[this._stacks.length-1].push(e.id),!i))return!0;if(Di[this._prevType]||Di[r]&&i){this._prevType=r;let e=this._stacks.length-1,i=this._stacks[e]||[];for(let r of this._renderableTiles){if(this.pool.isFull()&&(vn(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(r),r.rtt[e]){let t=this.pool.getObjectForId(r.rtt[e].id);if(t.stamp===r.rtt[e].stamp){this.pool.useObject(t);continue}}let a=this.pool.getOrCreateFreeObject();this.pool.useObject(a),this.pool.stampObject(a),r.rtt[e]={id:a.id,stamp:a.stamp},n.context.bindFramebuffer.set(a.fbo.framebuffer),n.context.clear({color:t.aM.transparent,stencil:0}),n.currentStencilSource=void 0;for(let e=0;e{e.touchstart=e.dragStart,e.touchmoveWindow=e.dragMove,e.touchend=e.dragEnd},Ui={showCompass:!0,showZoom:!0,visualizePitch:!1};class Vi{constructor(e,r,n=!1){this.mousedown=e=>{this.startMouse(t.e({},e,{ctrlKey:!0,preventDefault:()=>e.preventDefault()}),o.mousePos(this.element,e)),o.addEventListener(window,"mousemove",this.mousemove),o.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=e=>{this.moveMouse(e,o.mousePos(this.element,e))},this.mouseup=e=>{this.mouseRotate.dragEnd(e),this.mousePitch&&this.mousePitch.dragEnd(e),this.offTemp()},this.touchstart=e=>{1!==e.targetTouches.length?this.reset():(this._startPos=this._lastPos=o.touchPos(this.element,e.targetTouches)[0],this.startTouch(e,this._startPos),o.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),o.addEventListener(window,"touchend",this.touchend))},this.touchmove=e=>{1!==e.targetTouches.length?this.reset():(this._lastPos=o.touchPos(this.element,e.targetTouches)[0],this.moveTouch(e,this._lastPos))},this.touchend=e=>{0===e.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;let i=e.dragRotate._mouseRotate.getClickTolerance(),a=e.dragRotate._mousePitch.getClickTolerance();this.element=r,this.mouseRotate=Jn({clickTolerance:i,enable:!0}),this.touchRotate=(({enable:e,clickTolerance:t,bearingDegreesPerPixelMoved:r=.8})=>{let n=new $n;return new Zn({clickTolerance:t,move:(e,t)=>({bearingDelta:(t.x-e.x)*r}),moveStateManager:n,enable:e,assignEvents:Ni})})({clickTolerance:i,enable:!0}),this.map=e,n&&(this.mousePitch=Qn({clickTolerance:a,enable:!0}),this.touchPitch=(({enable:e,clickTolerance:t,pitchDegreesPerPixelMoved:r=-.5})=>{let n=new $n;return new Zn({clickTolerance:t,move:(e,t)=>({pitchDelta:(t.y-e.y)*r}),moveStateManager:n,enable:e,assignEvents:Ni})})({clickTolerance:a,enable:!0})),o.addEventListener(r,"mousedown",this.mousedown),o.addEventListener(r,"touchstart",this.touchstart,{passive:!1}),o.addEventListener(r,"touchcancel",this.reset)}startMouse(e,t){this.mouseRotate.dragStart(e,t),this.mousePitch&&this.mousePitch.dragStart(e,t),o.disableDrag()}startTouch(e,t){this.touchRotate.dragStart(e,t),this.touchPitch&&this.touchPitch.dragStart(e,t),o.disableDrag()}moveMouse(e,t){let r=this.map,{bearingDelta:n}=this.mouseRotate.dragMove(e,t)||{};if(n&&r.setBearing(r.getBearing()+n),this.mousePitch){let{pitchDelta:n}=this.mousePitch.dragMove(e,t)||{};n&&r.setPitch(r.getPitch()+n)}}moveTouch(e,t){let r=this.map,{bearingDelta:n}=this.touchRotate.dragMove(e,t)||{};if(n&&r.setBearing(r.getBearing()+n),this.touchPitch){let{pitchDelta:n}=this.touchPitch.dragMove(e,t)||{};n&&r.setPitch(r.getPitch()+n)}}off(){let e=this.element;o.removeEventListener(e,"mousedown",this.mousedown),o.removeEventListener(e,"touchstart",this.touchstart,{passive:!1}),o.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),o.removeEventListener(window,"touchend",this.touchend),o.removeEventListener(e,"touchcancel",this.reset),this.offTemp()}offTemp(){o.enableDrag(),o.removeEventListener(window,"mousemove",this.mousemove),o.removeEventListener(window,"mouseup",this.mouseup),o.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),o.removeEventListener(window,"touchend",this.touchend)}}function qi(e,r,n){let i=new t.N(e.lng,e.lat);if(e=new t.N(e.lng,e.lat),r){let i=new t.N(e.lng-360,e.lat),a=new t.N(e.lng+360,e.lat),o=n.locationPoint(e).distSqr(r);n.locationPoint(i).distSqr(r)180;){let t=n.locationPoint(e);if(t.x>=0&&t.y>=0&&t.x<=n.width&&t.y<=n.height)break;e.lng>n.center.lng?e.lng-=360:e.lng+=360}return e.lng!==i.lng&&n.locationPoint(e).y>n.height/2-n.getHorizon()?e:i}let Hi={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Gi(e,t,r){let n=e.classList;for(let e in Hi)n.remove(`maplibregl-${r}-anchor-${e}`);n.add(`maplibregl-${r}-anchor-${t}`)}class Wi extends t.E{constructor(e){if(super(),this._onKeyPress=e=>{let t=e.code,r=e.charCode||e.keyCode;"Space"!==t&&"Enter"!==t&&32!==r&&13!==r||this.togglePopup()},this._onMapClick=e=>{let t=e.originalEvent.target,r=this._element;this._popup&&(t===r||r.contains(t))&&this.togglePopup()},this._update=e=>{var t;if(!this._map)return;let r=this._map.loaded()&&!this._map.isMoving();("terrain"===e?.type||"render"===e?.type&&!r)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?qi(this._lngLat,this._flatPos,this._map.transform):null===(t=this._lngLat)||void 0===t?void 0:t.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let n="";"viewport"===this._rotationAlignment||"auto"===this._rotationAlignment?n=`rotateZ(${this._rotation}deg)`:"map"===this._rotationAlignment&&(n=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let i="";"viewport"===this._pitchAlignment||"auto"===this._pitchAlignment?i="rotateX(0deg)":"map"===this._pitchAlignment&&(i=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||e&&"moveend"!==e.type||(this._pos=this._pos.round()),o.setTransform(this._element,`${Hi[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${i} ${n}`),a.frameAsync(new AbortController).then((()=>{this._updateOpacity(e&&"moveend"===e.type)})).catch((()=>{}))},this._onMove=e=>{if(!this._isDragging){let t=this._clickTolerance||this._map._clickTolerance;this._isDragging=e.point.dist(this._pointerdownPos)>=t}this._isDragging&&(this._pos=e.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new t.k("dragstart"))),this.fire(new t.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new t.k("dragend")),this._state="inactive"},this._addDragHandler=e=>{this._element.contains(e.originalEvent.target)&&(e.preventDefault(),this._positionDelta=e.point.sub(this._pos).add(this._offset),this._pointerdownPos=e.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=e&&e.anchor||"center",this._color=e&&e.color||"#3FB1CE",this._scale=e&&e.scale||1,this._draggable=e&&e.draggable||!1,this._clickTolerance=e&&e.clickTolerance||0,this._subpixelPositioning=e&&e.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=e&&e.rotation||0,this._rotationAlignment=e&&e.rotationAlignment||"auto",this._pitchAlignment=e&&e.pitchAlignment&&"auto"!==e.pitchAlignment?e.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(e?.opacity,e?.opacityWhenCovered),e&&e.element)this._element=e.element,this._offset=t.P.convert(e&&e.offset||[0,0]);else{this._defaultMarker=!0,this._element=o.create("div");let r=o.createNS("http://www.w3.org/2000/svg","svg"),n=41,i=27;r.setAttributeNS(null,"display","block"),r.setAttributeNS(null,"height",`${n}px`),r.setAttributeNS(null,"width",`${i}px`),r.setAttributeNS(null,"viewBox",`0 0 ${i} ${n}`);let a=o.createNS("http://www.w3.org/2000/svg","g");a.setAttributeNS(null,"stroke","none"),a.setAttributeNS(null,"stroke-width","1"),a.setAttributeNS(null,"fill","none"),a.setAttributeNS(null,"fill-rule","evenodd");let s=o.createNS("http://www.w3.org/2000/svg","g");s.setAttributeNS(null,"fill-rule","nonzero");let l=o.createNS("http://www.w3.org/2000/svg","g");l.setAttributeNS(null,"transform","translate(3.0, 29.0)"),l.setAttributeNS(null,"fill","#000000");let c=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(let e of c){let t=o.createNS("http://www.w3.org/2000/svg","ellipse");t.setAttributeNS(null,"opacity","0.04"),t.setAttributeNS(null,"cx","10.5"),t.setAttributeNS(null,"cy","5.80029008"),t.setAttributeNS(null,"rx",e.rx),t.setAttributeNS(null,"ry",e.ry),l.appendChild(t)}let u=o.createNS("http://www.w3.org/2000/svg","g");u.setAttributeNS(null,"fill",this._color);let h=o.createNS("http://www.w3.org/2000/svg","path");h.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),u.appendChild(h);let f=o.createNS("http://www.w3.org/2000/svg","g");f.setAttributeNS(null,"opacity","0.25"),f.setAttributeNS(null,"fill","#000000");let p=o.createNS("http://www.w3.org/2000/svg","path");p.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),f.appendChild(p);let d=o.createNS("http://www.w3.org/2000/svg","g");d.setAttributeNS(null,"transform","translate(6.0, 7.0)"),d.setAttributeNS(null,"fill","#FFFFFF");let m=o.createNS("http://www.w3.org/2000/svg","g");m.setAttributeNS(null,"transform","translate(8.0, 8.0)");let g=o.createNS("http://www.w3.org/2000/svg","circle");g.setAttributeNS(null,"fill","#000000"),g.setAttributeNS(null,"opacity","0.25"),g.setAttributeNS(null,"cx","5.5"),g.setAttributeNS(null,"cy","5.5"),g.setAttributeNS(null,"r","5.4999962");let y=o.createNS("http://www.w3.org/2000/svg","circle");y.setAttributeNS(null,"fill","#FFFFFF"),y.setAttributeNS(null,"cx","5.5"),y.setAttributeNS(null,"cy","5.5"),y.setAttributeNS(null,"r","5.4999962"),m.appendChild(g),m.appendChild(y),s.appendChild(l),s.appendChild(u),s.appendChild(f),s.appendChild(d),s.appendChild(m),r.appendChild(s),r.setAttributeNS(null,"height",n*this._scale+"px"),r.setAttributeNS(null,"width",i*this._scale+"px"),this._element.appendChild(r),this._offset=t.P.convert(e&&e.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",(e=>{e.preventDefault()})),this._element.addEventListener("mousedown",(e=>{e.preventDefault()})),Gi(this._element,this._anchor,"marker"),e&&e.className)for(let t of e.className.split(" "))this._element.classList.add(t);this._popup=null}addTo(e){return this.remove(),this._map=e,this._element.setAttribute("aria-label",e._getUIString("Marker.Title")),e.getCanvasContainer().appendChild(this._element),e.on("move",this._update),e.on("moveend",this._update),e.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),o.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=t.N.convert(e),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(e){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),e){if(!("offset"in e.options)){let t=Math.abs(13.5)/Math.SQRT2;e.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[t,-1*(24.6+t)],"bottom-right":[-t,-1*(24.6+t)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=e,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(e){return this._subpixelPositioning=e,this}getPopup(){return this._popup}togglePopup(){let e=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:e?(e.isOpen()?e.remove():(e.setLngLat(this._lngLat),e.addTo(this._map)),this):this}_updateOpacity(e=!1){var r,n;if(null===(r=this._map)||void 0===r||!r.terrain)return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(e)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout((()=>{this._opacityTimeout=null}),100)}let i=this._map,a=i.terrain.depthAtPoint(this._pos),o=i.terrain.getElevationForLngLatZoom(this._lngLat,i.transform.tileZoom);if(i.transform.lngLatToCameraDepth(this._lngLat,o)-a<.006)return void(this._element.style.opacity=this._opacity);let s=-this._offset.y/i.transform._pixelPerMeter,l=Math.sin(i.getPitch()*Math.PI/180)*s,c=i.terrain.depthAtPoint(new t.P(this._pos.x,this._pos.y-this._offset.y)),u=i.transform.lngLatToCameraDepth(this._lngLat,o+l)-c>.006;!(null===(n=this._popup)||void 0===n)&&n.isOpen()&&u&&this._popup.remove(),this._element.style.opacity=u?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(e){return this._offset=t.P.convert(e),this._update(),this}addClassName(e){this._element.classList.add(e)}removeClassName(e){this._element.classList.remove(e)}toggleClassName(e){return this._element.classList.toggle(e)}setDraggable(e){return this._draggable=!!e,this._map&&(e?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(e){return this._rotation=e||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(e){return this._rotationAlignment=e||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(e){return this._pitchAlignment=e&&"auto"!==e?e:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(e,t){return void 0===e&&void 0===t&&(this._opacity="1",this._opacityWhenCovered="0.2"),void 0!==e&&(this._opacity=e),void 0!==t&&(this._opacityWhenCovered=t),this._map&&this._updateOpacity(!0),this}}let Zi={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Yi=0,Xi=!1,$i={maxWidth:100,unit:"metric"};function Ki(e,t,r){let n=r&&r.maxWidth||100,i=e._container.clientHeight/2,a=e.unproject([0,i]),o=e.unproject([n,i]),s=a.distanceTo(o);if(r&&"imperial"===r.unit){let r=3.2808*s;r>5280?Ji(t,n,r/5280,e._getUIString("ScaleControl.Miles")):Ji(t,n,r,e._getUIString("ScaleControl.Feet"))}else r&&"nautical"===r.unit?Ji(t,n,s/1852,e._getUIString("ScaleControl.NauticalMiles")):s>=1e3?Ji(t,n,s/1e3,e._getUIString("ScaleControl.Kilometers")):Ji(t,n,s,e._getUIString("ScaleControl.Meters"))}function Ji(e,t,r,n){let i=function(e){let t=Math.pow(10,`${Math.floor(e)}`.length-1),r=e/t;return r=r>=10?10:r>=5?5:r>=3?3:r>=2?2:r>=1?1:function(e){let t=Math.pow(10,Math.ceil(-Math.log(e)/Math.LN10));return Math.round(e*t)/t}(r),t*r}(r);e.style.width=t*(i/r)+"px",e.innerHTML=`${i} ${n}`}let Qi={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},ea=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function ta(e){if(e){if("number"==typeof e){let r=Math.round(Math.abs(e)/Math.SQRT2);return{center:new t.P(0,0),top:new t.P(0,e),"top-left":new t.P(r,r),"top-right":new t.P(-r,r),bottom:new t.P(0,-e),"bottom-left":new t.P(r,-r),"bottom-right":new t.P(-r,-r),left:new t.P(e,0),right:new t.P(-e,0)}}if(e instanceof t.P||Array.isArray(e)){let r=t.P.convert(e);return{center:r,top:r,"top-left":r,"top-right":r,bottom:r,"bottom-left":r,"bottom-right":r,left:r,right:r}}return{center:t.P.convert(e.center||[0,0]),top:t.P.convert(e.top||[0,0]),"top-left":t.P.convert(e["top-left"]||[0,0]),"top-right":t.P.convert(e["top-right"]||[0,0]),bottom:t.P.convert(e.bottom||[0,0]),"bottom-left":t.P.convert(e["bottom-left"]||[0,0]),"bottom-right":t.P.convert(e["bottom-right"]||[0,0]),left:t.P.convert(e.left||[0,0]),right:t.P.convert(e.right||[0,0])}}return ta(new t.P(0,0))}let ra=r;e.AJAXError=t.bh,e.Evented=t.E,e.LngLat=t.N,e.MercatorCoordinate=t.Z,e.Point=t.P,e.addProtocol=t.bi,e.config=t.a,e.removeProtocol=t.bj,e.AttributionControl=Si,e.BoxZoomHandler=Vn,e.CanvasSource=re,e.CooperativeGesturesHandler=_i,e.DoubleClickZoomHandler=di,e.DragPanHandler=yi,e.DragRotateHandler=vi,e.EdgeInsets=Tn,e.FullscreenControl=class extends t.E{constructor(e={}){super(),this._onFullscreenChange=()=>{var e;let t=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;null!==(e=t?.shadowRoot)&&void 0!==e&&e.fullscreenElement;)t=t.shadowRoot.fullscreenElement;t===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,e&&e.container&&(e.container instanceof HTMLElement?this._container=e.container:t.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=o.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){o.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let e=this._fullscreenButton=o.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);o.create("span","maplibregl-ctrl-icon",e).setAttribute("aria-hidden","true"),e.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let e=this._getTitle();this._fullscreenButton.setAttribute("aria-label",e),this._fullscreenButton.title=e}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new t.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new t.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},e.GeoJSONSource=J,e.GeolocateControl=class extends t.E{constructor(e){super(),this._onSuccess=e=>{if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new t.k("outofmaxbounds",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(e),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new t.k("geolocate",e)),this._finish()}},this._updateCamera=e=>{let r=new t.N(e.coords.longitude,e.coords.latitude),n=e.coords.accuracy,i=this._map.getBearing(),a=t.e({bearing:i},this.options.fitBoundsOptions),o=Z.fromLngLat(r,n);this._map.fitBounds(o,a,{geolocateSource:!0})},this._updateMarker=e=>{if(e){let r=new t.N(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=e.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=e=>{if(this._map){if(this.options.trackUserLocation)if(1===e.code){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;let e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===e.code&&Xi)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new t.k("error",e)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",(e=>e.preventDefault())),this._geolocateButton=o.create("button","maplibregl-ctrl-geolocate",this._container),o.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=e=>{if(this._map){if(!1===e){t.w("Geolocation support is not available so the GeolocateControl will be disabled.");let e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e)}else{let e=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=o.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Wi({element:this._dotElement}),this._circleElement=o.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Wi({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",(()=>this.trigger())),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(e=>{e.geolocateSource||"ACTIVE_LOCK"!==this._watchState||e.originalEvent&&"resize"===e.originalEvent.type||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new t.k("trackuserlocationend")),this.fire(new t.k("userlocationlostfocus")))}))}},this.options=t.e({},Zi,e)}onAdd(e){return this._map=e,this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return t._(this,arguments,void 0,(function*(e=!1){if(void 0!==Ri&&!e)return Ri;if(void 0===window.navigator.permissions)return Ri=!!window.navigator.geolocation,Ri;try{Ri="denied"!==(yield window.navigator.permissions.query({name:"geolocation"})).state}catch{Ri=!!window.navigator.geolocation}return Ri}))}().then((e=>this._finishSetupUI(e))),this._container}onRemove(){void 0!==this._geolocationWatchID&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),o.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Yi=0,Xi=!1}_isOutOfMapMaxBounds(e){let t=this._map.getMaxBounds(),r=e.coords;return t&&(r.longitudet.getEast()||r.latitudet.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){let e=this._map.getBounds(),t=e.getSouthEast(),r=e.getNorthEast(),n=t.distanceTo(r),i=Math.ceil(this._accuracy/(n/this._map._container.clientHeight)*2);this._circleElement.style.width=`${i}px`,this._circleElement.style.height=`${i}px`}trigger(){if(!this._setup)return t.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new t.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Yi--,Xi=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new t.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.k("trackuserlocationstart")),this.fire(new t.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){let e;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Yi++,Yi>1?(e={maximumAge:6e5,timeout:0},Xi=!0):(e=this.options.positionOptions,Xi=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},e.Hash=Sn,e.ImageSource=ee,e.KeyboardHandler=ui,e.LngLatBounds=Z,e.LogoControl=Ei,e.Map=class extends Ai{constructor(e){t.bf.mark(t.bg.create);let r=Object.assign(Object.assign({},ji),e);if(null!=r.minZoom&&null!=r.maxZoom&&r.minZoom>r.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=r.minPitch&&null!=r.maxPitch&&r.minPitch>r.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=r.minPitch&&r.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=r.maxPitch&&r.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new An(r.minZoom,r.maxZoom,r.minPitch,r.maxPitch,r.renderWorldCopies),{bearingSnap:r.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Ci,this._controls=[],this._mapId=t.a4(),this._contextLost=e=>{e.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new t.k("webglcontextlost",{originalEvent:e}))},this._contextRestored=e=>{this._setupPainter(),this.resize(),this._update(),this.fire(new t.k("webglcontextrestored",{originalEvent:e}))},this._onMapScroll=e=>{if(e.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=r.interactive,this._maxTileCacheSize=r.maxTileCacheSize,this._maxTileCacheZoomLevels=r.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=!0===r.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=!0===r.preserveDrawingBuffer,this._antialias=!0===r.antialias,this._trackResize=!0===r.trackResize,this._bearingSnap=r.bearingSnap,this._refreshExpiredTiles=!0===r.refreshExpiredTiles,this._fadeDuration=r.fadeDuration,this._crossSourceCollisions=!0===r.crossSourceCollisions,this._collectResourceTiming=!0===r.collectResourceTiming,this._locale=Object.assign(Object.assign({},Fi),r.locale),this._clickTolerance=r.clickTolerance,this._overridePixelRatio=r.pixelRatio,this._maxCanvasSize=r.maxCanvasSize,this.transformCameraUpdate=r.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=!0===r.cancelPendingTileRequestsWhileZooming,this._imageQueueHandle=p.addThrottleControl((()=>this.isMoving())),this._requestManager=new d(r.transformRequest),"string"==typeof r.container){if(this._container=document.getElementById(r.container),!this._container)throw new Error(`Container '${r.container}' not found.`)}else{if(!(r.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=r.container}if(r.maxBounds&&this.setMaxBounds(r.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",(()=>this._update(!1))).on("moveend",(()=>this._update(!1))).on("zoom",(()=>this._update(!0))).on("terrain",(()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)})).once("idle",(()=>{this._idleTriggered=!0})),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let e=!1,t=Mn((e=>{this._trackResize&&!this._removed&&(this.resize(e),this.redraw())}),50);this._resizeObserver=new ResizeObserver((r=>{e?t(r):e=!0})),this._resizeObserver.observe(this._container)}this.handlers=new ki(this,r),this._hash=r.hash&&new Sn("string"==typeof r.hash&&r.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:r.center,zoom:r.zoom,bearing:r.bearing,pitch:r.pitch}),r.bounds&&(this.resize(),this.fitBounds(r.bounds,t.e({},r.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=r.localIdeographFontFamily,this._validateStyle=r.validateStyle,r.style&&this.setStyle(r.style,{localIdeographFontFamily:r.localIdeographFontFamily}),r.attributionControl&&this.addControl(new Si("boolean"==typeof r.attributionControl?void 0:r.attributionControl)),r.maplibreLogo&&this.addControl(new Ei,r.logoPosition),this.on("style.load",(()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)})),this.on("data",(e=>{this._update("style"===e.dataType),this.fire(new t.k(`${e.dataType}data`,e))})),this.on("dataloading",(e=>{this.fire(new t.k(`${e.dataType}dataloading`,e))})),this.on("dataabort",(e=>{this.fire(new t.k("sourcedataabort",e))}))}_getMapId(){return this._mapId}addControl(e,r){if(void 0===r&&(r=e.getDefaultPosition?e.getDefaultPosition():"top-right"),!e||!e.onAdd)return this.fire(new t.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let n=e.onAdd(this);this._controls.push(e);let i=this._controlPositions[r];return-1!==r.indexOf("bottom")?i.insertBefore(n,i.firstChild):i.appendChild(n),this}removeControl(e){if(!e||!e.onRemove)return this.fire(new t.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let r=this._controls.indexOf(e);return r>-1&&this._controls.splice(r,1),e.onRemove(this),this}hasControl(e){return this._controls.indexOf(e)>-1}calculateCameraOptionsFromTo(e,t,r,n){return null==n&&this.terrain&&(n=this.terrain.getElevationForLngLatZoom(r,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(e,t,r,n)}resize(e){var r;let n=this._containerDimensions(),i=n[0],a=n[1],o=this._getClampedPixelRatio(i,a);if(this._resizeCanvas(i,a,o),this.painter.resize(i,a,o),this.painter.overLimit()){let e=this.painter.context.gl;this._maxCanvasSize=[e.drawingBufferWidth,e.drawingBufferHeight];let t=this._getClampedPixelRatio(i,a);this._resizeCanvas(i,a,t),this.painter.resize(i,a,t)}this.transform.resize(i,a),null===(r=this._requestedCameraState)||void 0===r||r.resize(i,a);let s=!this._moving;return s&&(this.stop(),this.fire(new t.k("movestart",e)).fire(new t.k("move",e))),this.fire(new t.k("resize",e)),s&&this.fire(new t.k("moveend",e)),this}_getClampedPixelRatio(e,t){let{0:r,1:n}=this._maxCanvasSize,i=this.getPixelRatio(),a=e*i,o=t*i;return Math.min(a>r?r/a:1,o>n?n/o:1)*i}getPixelRatio(){var e;return null!==(e=this._overridePixelRatio)&&void 0!==e?e:devicePixelRatio}setPixelRatio(e){this._overridePixelRatio=e,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(e){return this.transform.setMaxBounds(Z.convert(e)),this._update()}setMinZoom(e){if((e=e??-2)>=-2&&e<=this.transform.maxZoom)return this.transform.minZoom=e,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=e,this._update(),this.getZoom()>e&&this.setZoom(e),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(e){if((e=e??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(e>=0&&e<=this.transform.maxPitch)return this.transform.minPitch=e,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(e>=this.transform.minPitch)return this.transform.maxPitch=e,this._update(),this.getPitch()>e&&this.setPitch(e),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(e){return this.transform.renderWorldCopies=e,this._update()}project(e){return this.transform.locationPoint(t.N.convert(e),this.style&&this.terrain)}unproject(e){return this.transform.pointLocation(t.P.convert(e),this.terrain)}isMoving(){var e;return this._moving||(null===(e=this.handlers)||void 0===e?void 0:e.isMoving())}isZooming(){var e;return this._zooming||(null===(e=this.handlers)||void 0===e?void 0:e.isZooming())}isRotating(){var e;return this._rotating||(null===(e=this.handlers)||void 0===e?void 0:e.isRotating())}_createDelegatedListener(e,t,r){if("mouseenter"===e||"mouseover"===e){let n=!1;return{layers:t,listener:r,delegates:{mousemove:i=>{let a=t.filter((e=>this.getLayer(e))),o=0!==a.length?this.queryRenderedFeatures(i.point,{layers:a}):[];o.length?n||(n=!0,r.call(this,new Rn(e,this,i.originalEvent,{features:o}))):n=!1},mouseout:()=>{n=!1}}}}if("mouseleave"===e||"mouseout"===e){let n=!1;return{layers:t,listener:r,delegates:{mousemove:i=>{let a=t.filter((e=>this.getLayer(e)));(0!==a.length?this.queryRenderedFeatures(i.point,{layers:a}):[]).length?n=!0:n&&(n=!1,r.call(this,new Rn(e,this,i.originalEvent)))},mouseout:t=>{n&&(n=!1,r.call(this,new Rn(e,this,t.originalEvent)))}}}}{let n=e=>{let n=t.filter((e=>this.getLayer(e))),i=0!==n.length?this.queryRenderedFeatures(e.point,{layers:n}):[];i.length&&(e.features=i,r.call(this,e),delete e.features)};return{layers:t,listener:r,delegates:{[e]:n}}}}_saveDelegatedListener(e,t){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[e]=this._delegatedListeners[e]||[],this._delegatedListeners[e].push(t)}_removeDelegatedListener(e,t,r){if(!this._delegatedListeners||!this._delegatedListeners[e])return;let n=this._delegatedListeners[e];for(let e=0;et.includes(e)))){for(let e in i.delegates)this.off(e,i.delegates[e]);return void n.splice(e,1)}}}on(e,t,r){if(void 0===r)return super.on(e,t);let n=this._createDelegatedListener(e,"string"==typeof t?[t]:t,r);this._saveDelegatedListener(e,n);for(let e in n.delegates)this.on(e,n.delegates[e]);return this}once(e,t,r){if(void 0===r)return super.once(e,t);let n="string"==typeof t?[t]:t,i=this._createDelegatedListener(e,n,r);for(let t in i.delegates){let a=i.delegates[t];i.delegates[t]=(...t)=>{this._removeDelegatedListener(e,n,r),a(...t)}}this._saveDelegatedListener(e,i);for(let e in i.delegates)this.once(e,i.delegates[e]);return this}off(e,t,r){return void 0===r?super.off(e,t):(this._removeDelegatedListener(e,"string"==typeof t?[t]:t,r),this)}queryRenderedFeatures(e,r){if(!this.style)return[];let n,i=e instanceof t.P||Array.isArray(e),a=i?e:[[0,0],[this.transform.width,this.transform.height]];if(r=r||(i?{}:e)||{},a instanceof t.P||"number"==typeof a[0])n=[t.P.convert(a)];else{let e=t.P.convert(a[0]),r=t.P.convert(a[1]);n=[e,new t.P(r.x,e.y),r,new t.P(e.x,r.y),e]}return this.style.queryRenderedFeatures(n,r,this.transform)}querySourceFeatures(e,t){return this.style.querySourceFeatures(e,t)}setStyle(e,r){return!1!==(r=t.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},r)).diff&&r.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&e?(this._diffStyle(e,r),this):(this._localIdeographFontFamily=r.localIdeographFontFamily,this._updateStyle(e,r))}setTransformRequest(e){return this._requestManager.setTransformRequest(e),this}_getUIString(e){let t=this._locale[e];if(null==t)throw new Error(`Missing UI string '${e}'`);return t}_updateStyle(e,t){if(t.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",(()=>this._updateStyle(e,t)));let r=this.style&&t.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!e)),e?(this.style=new pt(this,t||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof e?this.style.loadURL(e,t,r):this.style.loadJSON(e,t,r),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new pt(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(e,r){if("string"==typeof e){let n=this._requestManager.transformRequest(e,"Style");t.h(n,new AbortController).then((e=>{this._updateDiff(e.data,r)})).catch((e=>{e&&this.fire(new t.j(e))}))}else"object"==typeof e&&this._updateDiff(e,r)}_updateDiff(e,r){try{this.style.setState(e,r)&&this._update(!0)}catch(n){t.w(`Unable to perform style diff: ${n.message||n.error||n}. Rebuilding the style from scratch.`),this._updateStyle(e,r)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():t.w("There is no style added to the map.")}addSource(e,t){return this._lazyInitEmptyStyle(),this.style.addSource(e,t),this._update(!0)}isSourceLoaded(e){let r=this.style&&this.style.sourceCaches[e];if(void 0!==r)return r.loaded();this.fire(new t.j(new Error(`There is no source with ID '${e}'`)))}setTerrain(e){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),e){let r=this.style.sourceCaches[e.source];if(!r)throw new Error(`cannot load terrain, because there exists no source with ID: ${e.source}`);null===this.terrain&&r.reload();for(let r in this.style._layers){let n=this.style._layers[r];"hillshade"===n.type&&n.source===e.source&&t.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Pi(this.painter,r,e),this.painter.renderToTexture=new Oi(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=t=>{"style"===t.dataType?this.terrain.sourceCache.freeRtt():"source"===t.dataType&&t.tile&&(t.sourceId!==e.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(t.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new t.k("terrain",{terrain:e})),this}getTerrain(){var e,t;return null!==(t=null===(e=this.terrain)||void 0===e?void 0:e.options)&&void 0!==t?t:null}areTilesLoaded(){let e=this.style&&this.style.sourceCaches;for(let t in e){let r=e[t]._tiles;for(let e in r){let t=r[e];if("loaded"!==t.state&&"errored"!==t.state)return!1}}return!0}removeSource(e){return this.style.removeSource(e),this._update(!0)}getSource(e){return this.style.getSource(e)}addImage(e,r,n={}){let{pixelRatio:i=1,sdf:o=!1,stretchX:s,stretchY:l,content:c,textFitWidth:u,textFitHeight:h}=n;if(this._lazyInitEmptyStyle(),!(r instanceof HTMLImageElement||t.b(r))){if(void 0===r.width||void 0===r.height)return this.fire(new t.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{let{width:n,height:a,data:f}=r,p=r;return this.style.addImage(e,{data:new t.R({width:n,height:a},new Uint8Array(f)),pixelRatio:i,stretchX:s,stretchY:l,content:c,textFitWidth:u,textFitHeight:h,sdf:o,version:0,userImage:p}),p.onAdd&&p.onAdd(this,e),this}}{let{width:n,height:f,data:p}=a.getImageData(r);this.style.addImage(e,{data:new t.R({width:n,height:f},p),pixelRatio:i,stretchX:s,stretchY:l,content:c,textFitWidth:u,textFitHeight:h,sdf:o,version:0})}}updateImage(e,r){let n=this.style.getImage(e);if(!n)return this.fire(new t.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let i=r instanceof HTMLImageElement||t.b(r)?a.getImageData(r):r,{width:o,height:s,data:l}=i;if(void 0===o||void 0===s)return this.fire(new t.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(o!==n.data.width||s!==n.data.height)return this.fire(new t.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));let c=!(r instanceof HTMLImageElement||t.b(r));return n.data.replace(l,c),this.style.updateImage(e,n),this}getImage(e){return this.style.getImage(e)}hasImage(e){return e?!!this.style.getImage(e):(this.fire(new t.j(new Error("Missing required image id"))),!1)}removeImage(e){this.style.removeImage(e)}loadImage(e){return p.getImage(this._requestManager.transformRequest(e,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(e,t){return this._lazyInitEmptyStyle(),this.style.addLayer(e,t),this._update(!0)}moveLayer(e,t){return this.style.moveLayer(e,t),this._update(!0)}removeLayer(e){return this.style.removeLayer(e),this._update(!0)}getLayer(e){return this.style.getLayer(e)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(e,t,r){return this.style.setLayerZoomRange(e,t,r),this._update(!0)}setFilter(e,t,r={}){return this.style.setFilter(e,t,r),this._update(!0)}getFilter(e){return this.style.getFilter(e)}setPaintProperty(e,t,r,n={}){return this.style.setPaintProperty(e,t,r,n),this._update(!0)}getPaintProperty(e,t){return this.style.getPaintProperty(e,t)}setLayoutProperty(e,t,r,n={}){return this.style.setLayoutProperty(e,t,r,n),this._update(!0)}getLayoutProperty(e,t){return this.style.getLayoutProperty(e,t)}setGlyphs(e,t={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(e,t),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(e,t,r={}){return this._lazyInitEmptyStyle(),this.style.addSprite(e,t,r,(e=>{e||this._update(!0)})),this}removeSprite(e){return this._lazyInitEmptyStyle(),this.style.removeSprite(e),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(e,t={}){return this._lazyInitEmptyStyle(),this.style.setSprite(e,t,(e=>{e||this._update(!0)})),this}setLight(e,t={}){return this._lazyInitEmptyStyle(),this.style.setLight(e,t),this._update(!0)}getLight(){return this.style.getLight()}setSky(e){return this._lazyInitEmptyStyle(),this.style.setSky(e),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(e,t){return this.style.setFeatureState(e,t),this._update()}removeFeatureState(e,t){return this.style.removeFeatureState(e,t),this._update()}getFeatureState(e){return this.style.getFeatureState(e)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let e=0,t=0;return this._container&&(e=this._container.clientWidth||400,t=this._container.clientHeight||300),[e,t]}_setupContainer(){let e=this._container;e.classList.add("maplibregl-map");let t=this._canvasContainer=o.create("div","maplibregl-canvas-container",e);this._interactive&&t.classList.add("maplibregl-interactive"),this._canvas=o.create("canvas","maplibregl-canvas",t),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");let r=this._containerDimensions(),n=this._getClampedPixelRatio(r[0],r[1]);this._resizeCanvas(r[0],r[1],n);let i=this._controlContainer=o.create("div","maplibregl-control-container",e),a=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach((e=>{a[e]=o.create("div",`maplibregl-ctrl-${e} `,i)})),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(e,t,r){this._canvas.width=Math.floor(r*e),this._canvas.height=Math.floor(r*t),this._canvas.style.width=`${e}px`,this._canvas.style.height=`${t}px`}_setupPainter(){let e={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1},t=null;this._canvas.addEventListener("webglcontextcreationerror",(r=>{t={requestedAttributes:e},r&&(t.statusMessage=r.statusMessage,t.type=r.type)}),{once:!0});let r=this._canvas.getContext("webgl2",e)||this._canvas.getContext("webgl",e);if(!r){let e="Failed to initialize WebGL";throw t?(t.message=e,new Error(JSON.stringify(t))):new Error(e)}this.painter=new _n(r,this.transform),c.testSupport(r)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(e){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||e,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(e){return this._update(),this._renderTaskQueue.add(e)}_cancelRenderFrame(e){this._renderTaskQueue.remove(e)}_render(e){let r=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(e),this._removed)return;let n=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let e=this.transform.zoom,i=a.now();this.style.zoomHistory.update(e,i);let o=new t.z(e,{now:i,fadeDuration:r,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),s=o.crossFadingFactor();1===s&&s===this._crossFadingFactor||(n=!0,this._crossFadingFactor=s),this.style.update(o)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,r,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:r,showPadding:this.showPadding}),this.fire(new t.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,t.bf.mark(t.bg.load),this.fire(new t.k("load"))),this.style&&(this.style.hasTransitions()||n)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let i=this._sourcesDirty||this._styleDirty||this._placementDirty;return i||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new t.k("idle")),!this._loaded||this._fullyLoaded||i||(this._fullyLoaded=!0,t.bf.mark(t.bg.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var e;this._hash&&this._hash.remove();for(let e of this._controls)e.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),p.removeThrottleControl(this._imageQueueHandle),null===(e=this._resizeObserver)||void 0===e||e.disconnect();let r=this.painter.context.gl.getExtension("WEBGL_lose_context");r?.loseContext&&r.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),o.remove(this._canvasContainer),o.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),t.bf.clearMetrics(),this._removed=!0,this.fire(new t.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,a.frameAsync(this._frameRequest).then((e=>{t.bf.frame(e),this._frameRequest=null,this._render(e)})).catch((()=>{})))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(e){this._showTileBoundaries!==e&&(this._showTileBoundaries=e,this._update())}get showPadding(){return!!this._showPadding}set showPadding(e){this._showPadding!==e&&(this._showPadding=e,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(e){this._showCollisionBoxes!==e&&(this._showCollisionBoxes=e,e?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(e){this._showOverdrawInspector!==e&&(this._showOverdrawInspector=e,this._update())}get repaint(){return!!this._repaint}set repaint(e){this._repaint!==e&&(this._repaint=e,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(e){this._vertices=e,this._update()}get version(){return Bi}getCameraTargetElevation(){return this.transform.elevation}},e.MapMouseEvent=Rn,e.MapTouchEvent=Fn,e.MapWheelEvent=Bn,e.Marker=Wi,e.NavigationControl=class{constructor(e){this._updateZoomButtons=()=>{let e=this._map.getZoom(),t=e===this._map.getMaxZoom(),r=e===this._map.getMinZoom();this._zoomInButton.disabled=t,this._zoomOutButton.disabled=r,this._zoomInButton.setAttribute("aria-disabled",t.toString()),this._zoomOutButton.setAttribute("aria-disabled",r.toString())},this._rotateCompassArrow=()=>{let e=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=e},this._setButtonTitle=(e,t)=>{let r=this._map._getUIString(`NavigationControl.${t}`);e.title=r,e.setAttribute("aria-label",r)},this.options=t.e({},Ui,e),this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",(e=>e.preventDefault())),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",(e=>this._map.zoomIn({},{originalEvent:e}))),o.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",(e=>this._map.zoomOut({},{originalEvent:e}))),o.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",(e=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:e}):this._map.resetNorth({},{originalEvent:e})})),this._compassIcon=o.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(e){return this._map=e,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Vi(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){o.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(e,t){let r=o.create("button",e,this._container);return r.type="button",r.addEventListener("click",t),r}},e.Popup=class extends t.E{constructor(e){super(),this.remove=()=>(this._content&&o.remove(this._content),this._container&&(o.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new t.k("close"))),this),this._onMouseUp=e=>{this._update(e.point)},this._onMouseMove=e=>{this._update(e.point)},this._onDrag=e=>{this._update(e.point)},this._update=e=>{var t;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=o.create("div","maplibregl-popup",this._map.getContainer()),this._tip=o.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let e of this.options.className.split(" "))this._container.classList.add(e);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?qi(this._lngLat,this._flatPos,this._map.transform):null===(t=this._lngLat)||void 0===t?void 0:t.wrap(),this._trackPointer&&!e)return;let r=this._flatPos=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&e?e:this._map.transform.locationPoint(this._lngLat));let n=this.options.anchor,i=ta(this.options.offset);if(!n){let e,t=this._container.offsetWidth,a=this._container.offsetHeight;e=r.y+i.bottom.ythis._map.transform.height-a?["bottom"]:[],r.xthis._map.transform.width-t/2&&e.push("right"),n=0===e.length?"bottom":e.join("-")}let a=r.add(i[n]);this.options.subpixelPositioning||(a=a.round()),o.setTransform(this._container,`${Hi[n]} translate(${a.x}px,${a.y}px)`),Gi(this._container,n,"popup")},this._onClose=()=>{this.remove()},this.options=t.e(Object.create(Qi),e)}addTo(e){return this._map&&this.remove(),this._map=e,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new t.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=t.N.convert(e),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(e){return this.setDOMContent(document.createTextNode(e))}setHTML(e){let t,r=document.createDocumentFragment(),n=document.createElement("body");for(n.innerHTML=e;t=n.firstChild,t;)r.appendChild(t);return this.setDOMContent(r)}getMaxWidth(){var e;return null===(e=this._container)||void 0===e?void 0:e.style.maxWidth}setMaxWidth(e){return this.options.maxWidth=e,this._update(),this}setDOMContent(e){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=o.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(e),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(e){return this._container&&this._container.classList.add(e),this}removeClassName(e){return this._container&&this._container.classList.remove(e),this}setOffset(e){return this.options.offset=e,this._update(),this}toggleClassName(e){if(this._container)return this._container.classList.toggle(e)}setSubpixelPositioning(e){this.options.subpixelPositioning=e}_createCloseButton(){this.options.closeButton&&(this._closeButton=o.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let e=this._container.querySelector(ea);e&&e.focus()}},e.RasterDEMTileSource=K,e.RasterTileSource=$,e.ScaleControl=class{constructor(e){this._onMove=()=>{Ki(this._map,this._container,this.options)},this.setUnit=e=>{this.options.unit=e,Ki(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},$i),e)}getDefaultPosition(){return"bottom-left"}onAdd(e){return this._map=e,this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-scale",e.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){o.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},e.ScrollZoomHandler=pi,e.Style=pt,e.TerrainControl=class{constructor(e){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=e}onAdd(e){return this._map=e,this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=o.create("button","maplibregl-ctrl-terrain",this._container),o.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){o.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},e.TwoFingersTouchPitchHandler=li,e.TwoFingersTouchRotateHandler=oi,e.TwoFingersTouchZoomHandler=ii,e.TwoFingersTouchZoomRotateHandler=xi,e.VectorTileSource=X,e.VideoSource=te,e.addSourceType=(e,r)=>t._(void 0,void 0,void 0,(function*(){if(ie(e))throw new Error(`A source type called "${e}" already exists.`);var t;t=r,ne[e]=t})),e.clearPrewarmedResources=function(){let e=F;e&&(e.isPreloaded()&&1===e.numActive()?(e.release(O),F=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},e.getMaxParallelImageRequests=function(){return t.a.MAX_PARALLEL_IMAGE_REQUESTS},e.getRTLTextPluginStatus=function(){return le().getRTLTextPluginStatus()},e.getVersion=function(){return ra},e.getWorkerCount=function(){return R.workerCount},e.getWorkerUrl=function(){return t.a.WORKER_URL},e.importScriptInWorkers=function(e){return V().broadcast("IS",e)},e.prewarm=function(){N().acquire(O)},e.setMaxParallelImageRequests=function(e){t.a.MAX_PARALLEL_IMAGE_REQUESTS=e},e.setRTLTextPlugin=function(e,t){return le().setRTLTextPlugin(e,t)},e.setWorkerCount=function(e){R.workerCount=e},e.setWorkerUrl=function(e){t.a.WORKER_URL=e}})),e},"object"==typeof e&&typeof t<"u"?t.exports=n():(r=typeof globalThis<"u"?globalThis:r||self).maplibregl=n()}}),kb=m({"src/plots/map/layers.js"(e,t){var r=ct(),n=Et().sanitizeHTML,i=yb(),a=hb();function o(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=a.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var s=o.prototype;function l(e){if(!e.visible)return!1;var t=e.source;if(Array.isArray(t)&&t.length>0){for(var n=0;n0}function c(e){var t={},n={};switch(e.type){case"circle":r.extendFlat(n,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":r.extendFlat(n,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":r.extendFlat(n,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var a=e.symbol,o=i(a.textposition,a.iconsize);r.extendFlat(t,{"icon-image":a.icon+"-15","icon-size":a.iconsize/10,"text-field":a.text,"text-size":a.textfont.size,"text-anchor":o.anchor,"text-offset":o.offset,"symbol-placement":a.placement}),r.extendFlat(n,{"icon-color":e.color,"text-color":a.textfont.color,"text-opacity":e.opacity});break;case"raster":r.extendFlat(n,{"raster-fade-duration":0,"raster-opacity":e.opacity})}return{layout:t,paint:n}}s.update=function(e){this.visible?this.needsNewImage(e)?this.updateImage(e):this.needsNewSource(e)?(this.removeLayer(),this.updateSource(e),this.updateLayer(e)):this.needsNewLayer(e)?this.updateLayer(e):this.updateStyle(e):(this.updateSource(e),this.updateLayer(e)),this.visible=l(e)},s.needsNewImage=function(e){return this.subplot.map.getSource(this.idSource)&&"image"===this.sourceType&&"image"===e.sourcetype&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))},s.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type},s.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},s.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},s.updateImage=function(e){this.subplot.map.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var t=this.findFollowingMapLayerId(this.lookupBelow());null!==t&&this.subplot.map.moveLayer(this.idLayer,t)},s.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,l(e)){var r=function(e){var t,r=e.sourcetype,i=e.source,a={type:r};return"geojson"===r?t="data":"vector"===r?t="string"==typeof i?"url":"tiles":"raster"===r?(t="tiles",a.tileSize=256):"image"===r&&(t="url",a.coordinates=e.coordinates),a[t]=i,e.sourceattribution&&(a.attribution=n(e.sourceattribution)),a}(e);t.addSource(this.idSource,r)}},s.findFollowingMapLayerId=function(e){if("traces"===e)for(var t=this.subplot.getMapLayers(),r=0;r1)for(r=0;r-1&&m(t.originalEvent,n,[r.xaxis],[r.yaxis],r.id,e),i.indexOf("event")>-1&&l.click(n,t.originalEvent)}}},x.updateFx=function(e){var t=this,r=t.map,i=t.gd;if(!t.isStatic){var a,o=e.dragmode;a=function(e,r){r.isRect?(e.range={})[t.id]=[c([r.xmin,r.ymin]),c([r.xmax,r.ymax])]:(e.lassoPoints={})[t.id]=r.map(c)};var l=t.dragOptions;t.dragOptions=n.extendDeep(l||{},{dragmode:e.dragmode,element:t.div,gd:i,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:a},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),h(o)||u(o)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(e,r,n){f(e,r,n,t.dragOptions,o)},s.init(t.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener("touchstart",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on("click",t.onClickInPanHandler))}function c(e){var r=t.map.unproject(e);return[r.lng,r.lat]}},x.updateFramework=function(e){var t=e[this.id].domain,r=e._size,n=this.div.style;n.width=r.w*(t.x[1]-t.x[0])+"px",n.height=r.h*(t.y[1]-t.y[0])+"px",n.left=r.l+t.x[0]*r.w+"px",n.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])},x.updateLayers=function(e){var t,r=e[this.id].layers,n=this.layerList;if(r.length!==n.length){for(t=0;tx/2){var _=m.split("|").join("
");y.text(_).attr("data-unformatted",_).call(l.convertToTspans,e),v=s.bBox(y.node())}y.attr("transform",r(-3,8-v.height)),g.insert("rect",".static-attribution").attr({x:-v.width-6,y:-v.height-3,width:v.width+6,height:v.height+3,fill:"rgba(255, 255, 255, 0.75)"});var b=1;v.width+6>x&&(b=x/(v.width+6));var w=[c.l+c.w*p.x[1],c.t+c.h*(1-p.y[0])];g.attr("transform",r(w[0],w[1])+n(b))}},e.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[u],n=0;n=0;r--)e.removeLayer(t[r][1])},o.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},t.exports=function(e,t){var n=t[0].trace,i=new a(e,n.uid),o=i.sourceId,s=r(t),l=i.below=e.belowLookup["trace-"+n.uid];return e.map.addSource(o,{type:"geojson",data:s.geojson}),i._addLayers(s,l),t[0].trace._glTrace=i,i}}}),Db=m({"src/traces/choroplethmap/index.js"(e,t){t.exports={attributes:Ib(),supplyDefaults:Lb(),colorbar:Vo(),calc:Ng(),plot:zb(),hoverPoints:qg(),eventData:Hg(),selectPoints:Gg(),styleOnSelect:function(e,t){t&&t[0].trace._glTrace.updateOnSelect(t)},getBelow:function(e,t){for(var r=t.getMapLayers(),n=r.length-2;n>=0;n--){var i=r[n].id;if("string"==typeof i&&0===i.indexOf("water"))for(var a=n+1;a0?+p[u]:0),h.push({type:"Feature",geometry:{type:"Point",coordinates:y},properties:v})}}var _=a.extractOpts(t),b=_.reversescale?a.flipScale(_.colorscale):_.colorscale,w=b[0][1],T=["interpolate",["linear"],["heatmap-density"],0,i.opacity(w)<1?w:i.addOpacity(w,0)];for(u=1;u=0;r--)e.removeLayer(t[r][1])},a.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},t.exports=function(e,t){var n=t[0].trace,a=new i(e,n.uid),o=a.sourceId,s=r(t),l=a.below=e.belowLookup["trace-"+n.uid];return e.map.addSource(o,{type:"geojson",data:s.geojson}),a._addLayers(s,l),a}}}),Ub=m({"src/traces/densitymap/hover.js"(e,t){var r=ar(),n=_b().hoverPoints,i=_b().getExtraText;t.exports=function(e,t,a){var o=n(e,t,a);if(o){var s=o[0],l=s.cd,c=l[0].trace,u=l[s.index];if(delete s.color,"z"in u){var h=s.subplot.mockAxis;s.z=u.z,s.zLabel=r.tickText(h,h.c2l(u.z),"hover").text}return s.extraText=i(c,u,l[0].t.labels),[s]}}}}),Vb=m({"src/traces/densitymap/event_data.js"(e,t){t.exports=function(e,t){return e.lon=t.lon,e.lat=t.lat,e.z=t.z,e}}}),qb=m({"src/traces/densitymap/index.js"(e,t){t.exports={attributes:Rb(),supplyDefaults:Fb(),colorbar:Vo(),formatLabels:gb(),calc:Bb(),plot:Nb(),hoverPoints:Ub(),eventData:Vb(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n0;){t=c[c.length-1];var p=e[t];if(a[t]=0&&s[t].push(o[m])}a[t]=d}else{if(n[t]===r[t]){var g=[],y=[],v=0;for(d=l.length-1;d>=0;--d){var x=l[d];if(i[x]=!1,g.push(x),y.push(s[x]),v+=s[x].length,o[x]=h.length,x===t){l.length=d;break}}h.push(g);var _=new Array(v);for(d=0;dx&&(x=l.source[t]),l.target[t]>x&&(x=l.target[t]);var _=x+1;e.node._count=_;var b,w=e.node.groups,T={};for(t=0;t0&&o(C,_)&&o(I,_)&&(!T.hasOwnProperty(C)||!T.hasOwnProperty(I)||T[C]!==T[I])){T.hasOwnProperty(I)&&(I=T[I]),T.hasOwnProperty(C)&&(C=T[C]),I=+I,p[C=+C]=p[I]=!0;var L="";l.label&&l.label[t]&&(L=l.label[t]);var P=null;L&&d.hasOwnProperty(L)&&(P=d[L]),c.push({pointNumber:t,label:L,color:u?l.color[t]:l.color,hovercolor:h?l.hovercolor[t]:l.hovercolor,customdata:f?l.customdata[t]:l.customdata,concentrationscale:P,source:C,target:I,value:+E}),S.source.push(C),S.target.push(I)}}var z=_+w.length,D=a(i.color),O=a(i.customdata),R=[];for(t=0;t_-1,childrenNodes:[],pointNumber:t,label:F,color:D?i.color[t]:i.color,customdata:O?i.customdata[t]:i.customdata})}var B=!1;return function(e,t,i){for(var a=n.init2dArray(e,0),o=0;o1}))}(z,S.source,S.target)&&(B=!0),{circular:B,links:c,nodes:R,groups:w,groupLookup:T}}(t);return i({circular:l.circular,_nodes:l.nodes,_links:l.links,_groups:l.groups,_groupLookup:l.groupLookup})}}}),Xb=m({"node_modules/d3-quadtree/dist/d3-quadtree.js"(e,t){var r,n;r=e,n=function(e){function t(e,t,r,n){if(isNaN(t)||isNaN(r))return e;var i,a,o,s,l,c,u,h,f,p=e._root,d={data:n},m=e._x0,g=e._y0,y=e._x1,v=e._y1;if(!p)return e._root=d,e;for(;p.length;)if((c=t>=(a=(m+y)/2))?m=a:y=a,(u=r>=(o=(g+v)/2))?g=o:v=o,i=p,!(p=p[h=u<<1|c]))return i[h]=d,e;if(s=+e._x.call(null,p.data),l=+e._y.call(null,p.data),t===s&&r===l)return d.next=p,i?i[h]=d:e._root=d,e;do{i=i?i[h]=new Array(4):e._root=new Array(4),(c=t>=(a=(m+y)/2))?m=a:y=a,(u=r>=(o=(g+v)/2))?g=o:v=o}while((h=u<<1|c)==(f=(l>=o)<<1|s>=a));return i[f]=p,i[h]=d,e}function r(e,t,r,n,i){this.node=e,this.x0=t,this.y0=r,this.x1=n,this.y1=i}function n(e){return e[0]}function i(e){return e[1]}function a(e,t,r){var a=new o(t??n,r??i,NaN,NaN,NaN,NaN);return null==e?a:a.addAll(e)}function o(e,t,r,n,i,a){this._x=e,this._y=t,this._x0=r,this._y0=n,this._x1=i,this._y1=a,this._root=void 0}function s(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}var l=a.prototype=o.prototype;l.copy=function(){var e,t,r=new o(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root;if(!n)return r;if(!n.length)return r._root=s(n),r;for(e=[{source:n,target:r._root=new Array(4)}];n=e.pop();)for(var i=0;i<4;++i)(t=n.source[i])&&(t.length?e.push({source:t,target:n.target[i]=new Array(4)}):n.target[i]=s(t));return r},l.add=function(e){var r=+this._x.call(null,e),n=+this._y.call(null,e);return t(this.cover(r,n),r,n,e)},l.addAll=function(e){var r,n,i,a,o=e.length,s=new Array(o),l=new Array(o),c=1/0,u=1/0,h=-1/0,f=-1/0;for(n=0;nh&&(h=i),af&&(f=a));if(c>h||u>f)return this;for(this.cover(c,u).cover(h,f),n=0;ne||e>=i||n>t||t>=a;)switch(s=(tp||(o=c.y0)>d||(s=c.x1)=v)<<1|e>=y)&&(c=m[m.length-1],m[m.length-1]=m[m.length-1-u],m[m.length-1-u]=c)}else{var x=e-+this._x.call(null,g.data),_=t-+this._y.call(null,g.data),b=x*x+_*_;if(b=(s=(d+g)/2))?d=s:g=s,(u=o>=(l=(m+y)/2))?m=l:y=l,t=p,!(p=p[h=u<<1|c]))return this;if(!p.length)break;(t[h+1&3]||t[h+2&3]||t[h+3&3])&&(r=t,f=h)}for(;p.data!==e;)if(n=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,n?(i?n.next=i:delete n.next,this):t?(i?t[h]=i:delete t[h],(p=t[0]||t[1]||t[2]||t[3])&&p===(t[3]||t[2]||t[1]||t[0])&&!p.length&&(r?r[f]=p:this._root=p),this):(this._root=i,this)},l.removeAll=function(e){for(var t=0,r=e.length;t=l.length)return null!=e&&r.sort(e),null!=t?t(r):r;for(var s,c,h,f=-1,p=r.length,d=l[i++],m=n(),g=a();++fl.length)return e;var n,i=c[r-1];return null!=t&&r>=l.length?n=e.entries():(n=[],e.each((function(e,t){n.push({key:t,values:h(e,r)})}))),null!=i?n.sort((function(e,t){return i(e.key,t.key)})):n}return r={object:function(e){return u(e,0,i,a)},map:function(e){return u(e,0,o,s)},entries:function(e){return h(u(e,0,o,s),0)},key:function(e){return l.push(e),r},sortKeys:function(e){return c[l.length-1]=e,r},sortValues:function(t){return e=t,r},rollup:function(e){return t=e,r}}},e.set=u,e.map=n,e.keys=function(e){var t=[];for(var r in e)t.push(r);return t},e.values=function(e){var t=[];for(var r in e)t.push(e[r]);return t},e.entries=function(e){var t=[];for(var r in e)t.push({key:r,value:e[r]});return t},Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof e&&typeof t<"u"?e:r.d3=r.d3||{})}}),Kb=m({"node_modules/d3-dispatch/dist/d3-dispatch.js"(e,t){var r,n;r=e,n=function(e){var t={value:function(){}};function r(){for(var e,t=0,r=arguments.length,i={};t=0&&(r=e.slice(n+1),e=e.slice(0,n)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:r}}))}(e+"",n),s=-1,l=o.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++s0)for(var r,n,i=new Array(r),a=0;a=0&&r._call.call(null,e),r=r._next;--n}function g(){s=(o=c.now())+l,n=i=0;try{m()}finally{n=0,function(){for(var e,n,i=t,a=1/0;i;)i._call?(a>i._time&&(a=i._time),e=i,i=i._next):(n=i._next,i._next=null,i=e?e._next=n:t=n);r=e,v(a)}(),s=0}}function y(){var e=c.now(),t=e-o;t>1e3&&(l-=t,o=e)}function v(e){n||(i&&(i=clearTimeout(i)),e-s>24?(e<1/0&&(i=setTimeout(g,e-c.now()-l)),a&&(a=clearInterval(a))):(a||(o=c.now(),a=setInterval(y,1e3)),n=1,u(g)))}p.prototype=d.prototype={constructor:p,restart:function(e,n,i){if("function"!=typeof e)throw new TypeError("callback is not a function");i=(null==i?h():+i)+(null==n?0:+n),!this._next&&r!==this&&(r?r._next=this:t=this,r=this),this._call=e,this._time=i,v()},stop:function(){this._call&&(this._call=null,this._time=1/0,v())}},e.interval=function(e,t,r){var n=new p,i=t;return null==t?(n.restart(e,t,r),n):(t=+t,r=null==r?h():+r,n.restart((function a(o){o+=i,n.restart(a,i+=t,r),e(o)}),t,r),n)},e.now=h,e.timeout=function(e,t,r){var n=new p;return t=null==t?0:+t,n.restart((function(r){n.stop(),e(r+t)}),t,r),n},e.timer=d,e.timerFlush=m,Object.defineProperty(e,"__esModule",{value:!0})},n("object"==typeof e&&typeof t<"u"?e:(r=r||self).d3=r.d3||{})}}),Qb=m({"node_modules/d3-force/dist/d3-force.js"(e,t){var r,n;r=e,n=function(e,t,r,n,i){function a(e){return function(){return e}}function o(){return 1e-6*(Math.random()-.5)}function s(e){return e.x+e.vx}function l(e){return e.y+e.vy}function c(e){return e.index}function u(e,t){var r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function h(e){return e.x}function f(e){return e.y}var p=Math.PI*(3-Math.sqrt(5));e.forceCenter=function(e,t){var r;function n(){var n,i,a=r.length,o=0,s=0;for(n=0;nf+c||np+c||au.index){var h=f-s.x-s.vx,g=p-s.y-s.vy,y=h*h+g*g;ye.r&&(e.r=e[t].r)}function f(){if(r){var t,i,a=r.length;for(n=new Array(a),t=0;t=c)){(e.data!==r||e.next)&&(0===h&&(d+=(h=o())*h),0===f&&(d+=(f=o())*f),d1?(null==r?u.remove(e):u.set(e,y(r)),t):u.get(e)},find:function(t,r,n){var i,a,o,s,l,c=0,u=e.length;for(null==n?n=1/0:n*=n,c=0;c1?(f.on(e,r),t):f.on(e)}}},e.forceX=function(e){var t,r,n,i=a(.1);function o(e){for(var i,a=0,o=t.length;an)if(Math.abs(f*c-u*h)>n&&o){var d=i-s,m=a-l,g=c*c+u*u,y=d*d+m*m,v=Math.sqrt(g),x=Math.sqrt(p),_=o*Math.tan((t-Math.acos((g+p-y)/(2*v*x)))/2),b=_/x,w=_/v;Math.abs(b-1)>n&&(this._+="L"+(e+b*h)+","+(r+b*f)),this._+="A"+o+","+o+",0,0,"+ +(f*d>h*m)+","+(this._x1=e+w*c)+","+(this._y1=r+w*u)}else this._+="L"+(this._x1=e)+","+(this._y1=r)},arc:function(e,a,o,s,l,c){e=+e,a=+a,c=!!c;var u=(o=+o)*Math.cos(s),h=o*Math.sin(s),f=e+u,p=a+h,d=1^c,m=c?s-l:l-s;if(o<0)throw new Error("negative radius: "+o);null===this._x1?this._+="M"+f+","+p:(Math.abs(this._x1-f)>n||Math.abs(this._y1-p)>n)&&(this._+="L"+f+","+p),o&&(m<0&&(m=m%r+r),m>i?this._+="A"+o+","+o+",0,1,"+d+","+(e-u)+","+(a-h)+"A"+o+","+o+",0,1,"+d+","+(this._x1=f)+","+(this._y1=p):m>n&&(this._+="A"+o+","+o+",0,"+ +(m>=t)+","+d+","+(this._x1=e+o*Math.cos(l))+","+(this._y1=a+o*Math.sin(l))))},rect:function(e,t,r,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}},e.path=o,Object.defineProperty(e,"__esModule",{value:!0})},n("object"==typeof e&&typeof t<"u"?e:(r=r||self).d3=r.d3||{})}}),tw=m({"node_modules/d3-shape/dist/d3-shape.js"(e,t){var r,n;r=e,n=function(e,t){function r(e){return function(){return e}}var n=Math.abs,i=Math.atan2,a=Math.cos,o=Math.max,s=Math.min,l=Math.sin,c=Math.sqrt,u=1e-12,h=Math.PI,f=h/2,p=2*h;function d(e){return e>=1?f:e<=-1?-f:Math.asin(e)}function m(e){return e.innerRadius}function g(e){return e.outerRadius}function y(e){return e.startAngle}function v(e){return e.endAngle}function x(e){return e&&e.padAngle}function _(e,t,r,n,i,a,s){var l=e-r,u=t-n,h=(s?a:-a)/c(l*l+u*u),f=h*u,p=-h*l,d=e+f,m=t+p,g=r+f,y=n+p,v=(d+g)/2,x=(m+y)/2,_=g-d,b=y-m,w=_*_+b*b,T=i-a,k=d*y-g*m,A=(b<0?-1:1)*c(o(0,T*T*w-k*k)),M=(k*b-_*A)/w,S=(-k*_-b*A)/w,E=(k*b+_*A)/w,C=(-k*_+b*A)/w,I=M-v,L=S-x,P=E-v,z=C-x;return I*I+L*L>P*P+z*z&&(M=E,S=C),{cx:M,cy:S,x01:-f,y01:-p,x11:M*(i/T-1),y11:S*(i/T-1)}}function b(e){this._context=e}function w(e){return new b(e)}function T(e){return e[0]}function k(e){return e[1]}function A(){var e=T,n=k,i=r(!0),a=null,o=w,s=null;function l(r){var l,c,u,h=r.length,f=!1;for(null==a&&(s=o(u=t.path())),l=0;l<=h;++l)!(l=h;--f)c.point(y[f],v[f]);c.lineEnd(),c.areaEnd()}g&&(y[u]=+e(p,u,r),v[u]=+i(p,u,r),c.point(n?+n(p,u,r):y[u],a?+a(p,u,r):v[u]))}if(d)return c=null,d+""||null}function h(){return A().defined(o).curve(l).context(s)}return u.x=function(t){return arguments.length?(e="function"==typeof t?t:r(+t),n=null,u):e},u.x0=function(t){return arguments.length?(e="function"==typeof t?t:r(+t),u):e},u.x1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:r(+e),u):n},u.y=function(e){return arguments.length?(i="function"==typeof e?e:r(+e),a=null,u):i},u.y0=function(e){return arguments.length?(i="function"==typeof e?e:r(+e),u):i},u.y1=function(e){return arguments.length?(a=null==e?null:"function"==typeof e?e:r(+e),u):a},u.lineX0=u.lineY0=function(){return h().x(e).y(i)},u.lineY1=function(){return h().x(e).y(a)},u.lineX1=function(){return h().x(n).y(i)},u.defined=function(e){return arguments.length?(o="function"==typeof e?e:r(!!e),u):o},u.curve=function(e){return arguments.length?(l=e,null!=s&&(c=l(s)),u):l},u.context=function(e){return arguments.length?(null==e?s=c=null:c=l(s=e),u):s},u}function S(e,t){return te?1:t>=e?0:NaN}function E(e){return e}b.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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var C=L(w);function I(e){this._curve=e}function L(e){function t(t){return new I(e(t))}return t._curve=e,t}function P(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(e){return arguments.length?t(L(e)):t()._curve},e}function z(){return P(A().curve(C))}function D(){var e=M().curve(C),t=e.curve,r=e.lineX0,n=e.lineX1,i=e.lineY0,a=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return P(r())},delete e.lineX0,e.lineEndAngle=function(){return P(n())},delete e.lineX1,e.lineInnerRadius=function(){return P(i())},delete e.lineY0,e.lineOuterRadius=function(){return P(a())},delete e.lineY1,e.curve=function(e){return arguments.length?t(L(e)):t()._curve},e}function O(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}I.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};var R=Array.prototype.slice;function F(e){return e.source}function B(e){return e.target}function j(e){var n=F,i=B,a=T,o=k,s=null;function l(){var r,l=R.call(arguments),c=n.apply(this,l),u=i.apply(this,l);if(s||(s=r=t.path()),e(s,+a.apply(this,(l[0]=c,l)),+o.apply(this,l),+a.apply(this,(l[0]=u,l)),+o.apply(this,l)),r)return s=null,r+""||null}return l.source=function(e){return arguments.length?(n=e,l):n},l.target=function(e){return arguments.length?(i=e,l):i},l.x=function(e){return arguments.length?(a="function"==typeof e?e:r(+e),l):a},l.y=function(e){return arguments.length?(o="function"==typeof e?e:r(+e),l):o},l.context=function(e){return arguments.length?(s=e??null,l):s},l}function N(e,t,r,n,i){e.moveTo(t,r),e.bezierCurveTo(t=(t+n)/2,r,t,i,n,i)}function U(e,t,r,n,i){e.moveTo(t,r),e.bezierCurveTo(t,r=(r+i)/2,n,r,n,i)}function V(e,t,r,n,i){var a=O(t,r),o=O(t,r=(r+i)/2),s=O(n,r),l=O(n,i);e.moveTo(a[0],a[1]),e.bezierCurveTo(o[0],o[1],s[0],s[1],l[0],l[1])}var q={draw:function(e,t){var r=Math.sqrt(t/h);e.moveTo(r,0),e.arc(0,0,r,0,p)}},H={draw:function(e,t){var r=Math.sqrt(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},G=Math.sqrt(1/3),W=2*G,Z={draw:function(e,t){var r=Math.sqrt(t/W),n=r*G;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},Y=Math.sin(h/10)/Math.sin(7*h/10),X=Math.sin(p/10)*Y,$=-Math.cos(p/10)*Y,K={draw:function(e,t){var r=Math.sqrt(.8908130915292852*t),n=X*r,i=$*r;e.moveTo(0,-r),e.lineTo(n,i);for(var a=1;a<5;++a){var o=p*a/5,s=Math.cos(o),l=Math.sin(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*i,l*n+s*i)}e.closePath()}},J={draw:function(e,t){var r=Math.sqrt(t),n=-r/2;e.rect(n,n,r,r)}},Q=Math.sqrt(3),ee={draw:function(e,t){var r=-Math.sqrt(t/(3*Q));e.moveTo(0,2*r),e.lineTo(-Q*r,-r),e.lineTo(Q*r,-r),e.closePath()}},te=-.5,re=Math.sqrt(3)/2,ne=1/Math.sqrt(12),ie=3*(ne/2+1),ae={draw:function(e,t){var r=Math.sqrt(t/ie),n=r/2,i=r*ne,a=n,o=r*ne+r,s=-a,l=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(s,l),e.lineTo(te*n-re*i,re*n+te*i),e.lineTo(te*a-re*o,re*a+te*o),e.lineTo(te*s-re*l,re*s+te*l),e.lineTo(te*n+re*i,te*i-re*n),e.lineTo(te*a+re*o,te*o-re*a),e.lineTo(te*s+re*l,te*l-re*s),e.closePath()}},oe=[q,H,Z,J,K,ee,ae];function se(){}function le(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function ce(e){this._context=e}function ue(e){this._context=e}function he(e){this._context=e}function fe(e,t){this._basis=new ce(e),this._beta=t}ce.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:le(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:le(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},ue.prototype={areaStart:se,areaEnd:se,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:le(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},he.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:le(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},fe.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var n,i=e[0],a=t[0],o=e[r]-i,s=t[r]-a,l=-1;++l<=r;)n=l/r,this._basis.point(this._beta*e[l]+(1-this._beta)*(i+n*o),this._beta*t[l]+(1-this._beta)*(a+n*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var pe=function e(t){function r(e){return 1===t?new ce(e):new fe(e,t)}return r.beta=function(t){return e(+t)},r}(.85);function de(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function me(e,t){this._context=e,this._k=(1-t)/6}me.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:de(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:de(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ge=function e(t){function r(e){return new me(e,t)}return r.tension=function(t){return e(+t)},r}(0);function ye(e,t){this._context=e,this._k=(1-t)/6}ye.prototype={areaStart:se,areaEnd:se,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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:de(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ve=function e(t){function r(e){return new ye(e,t)}return r.tension=function(t){return e(+t)},r}(0);function xe(e,t){this._context=e,this._k=(1-t)/6}xe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:de(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var _e=function e(t){function r(e){return new xe(e,t)}return r.tension=function(t){return e(+t)},r}(0);function be(e,t,r){var n=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>u){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);n=(n*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>u){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/h,o=(o*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(n,i,a,o,e._x2,e._y2)}function we(e,t){this._context=e,this._alpha=t}we.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(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:be(this,e,t)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Te=function e(t){function r(e){return t?new we(e,t):new me(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function ke(e,t){this._context=e,this._alpha=t}ke.prototype={areaStart:se,areaEnd:se,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(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:be(this,e,t)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Ae=function e(t){function r(e){return t?new ke(e,t):new ye(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function Me(e,t){this._context=e,this._alpha=t}Me.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:be(this,e,t)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Se=function e(t){function r(e){return t?new Me(e,t):new xe(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function Ee(e){this._context=e}function Ce(e){return e<0?-1:1}function Ie(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(Ce(a)+Ce(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Le(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Pe(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-n)/3;e._context.bezierCurveTo(n+s,i+s*t,a-s,o-s*r,a,o)}function ze(e){this._context=e}function De(e){this._context=new Oe(e)}function Oe(e){this._context=e}function Re(e){this._context=e}function Fe(e){var t,r,n=e.length-1,i=new Array(n),a=new Array(n),o=new Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t1)for(var r,n,i,a=1,o=e[t[0]],s=o.length;a=0;)r[t]=t;return r}function Ue(e,t){return e[t]}function Ve(e){var t=e.map(qe);return Ne(e).sort((function(e,r){return t[e]-t[r]}))}function qe(e){for(var t,r=-1,n=0,i=e.length,a=-1/0;++ra&&(a=t,n=r);return n}function He(e){var t=e.map(Ge);return Ne(e).sort((function(e,r){return t[e]-t[r]}))}function Ge(e){for(var t,r=0,n=-1,i=e.length;++n=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}}this._x=e,this._y=t}},e.arc=function(){var e=m,o=g,b=r(0),w=null,T=y,k=v,A=x,M=null;function S(){var r,m,g=+e.apply(this,arguments),y=+o.apply(this,arguments),v=T.apply(this,arguments)-f,x=k.apply(this,arguments)-f,S=n(x-v),E=x>v;if(M||(M=r=t.path()),yu)if(S>p-u)M.moveTo(y*a(v),y*l(v)),M.arc(0,0,y,v,x,!E),g>u&&(M.moveTo(g*a(x),g*l(x)),M.arc(0,0,g,x,v,E));else{var C,I,L=v,P=x,z=v,D=x,O=S,R=S,F=A.apply(this,arguments)/2,B=F>u&&(w?+w.apply(this,arguments):c(g*g+y*y)),j=s(n(y-g)/2,+b.apply(this,arguments)),N=j,U=j;if(B>u){var V=d(B/g*l(F)),q=d(B/y*l(F));(O-=2*V)>u?(z+=V*=E?1:-1,D-=V):(O=0,z=D=(v+x)/2),(R-=2*q)>u?(L+=q*=E?1:-1,P-=q):(R=0,L=P=(v+x)/2)}var H=y*a(L),G=y*l(L),W=g*a(D),Z=g*l(D);if(j>u){var Y,X=y*a(P),$=y*l(P),K=g*a(z),J=g*l(z);if(S1?0:e<-1?h:Math.acos(e)}((Q*te+ee*re)/(c(Q*Q+ee*ee)*c(te*te+re*re)))/2),ie=c(Y[0]*Y[0]+Y[1]*Y[1]);N=s(j,(g-ie)/(ne-1)),U=s(j,(y-ie)/(ne+1))}}R>u?U>u?(C=_(K,J,H,G,y,U,E),I=_(X,$,W,Z,y,U,E),M.moveTo(C.cx+C.x01,C.cy+C.y01),Uu&&O>u?N>u?(C=_(W,Z,X,$,g,-N,E),I=_(H,G,K,J,g,-N,E),M.lineTo(C.cx+C.x01,C.cy+C.y01),N0&&(d+=h);for(null!=t?m.sort((function(e,r){return t(g[e],g[r])})):null!=n&&m.sort((function(e,t){return n(r[e],r[t])})),s=0,c=d?(v-f*_)/d:0;s0?h*c:0)+_,g[l]={data:r[l],index:s,value:h,startAngle:y,endAngle:u,padAngle:x};return g}return s.value=function(t){return arguments.length?(e="function"==typeof t?t:r(+t),s):e},s.sortValues=function(e){return arguments.length?(t=e,n=null,s):t},s.sort=function(e){return arguments.length?(n=e,t=null,s):n},s.startAngle=function(e){return arguments.length?(i="function"==typeof e?e:r(+e),s):i},s.endAngle=function(e){return arguments.length?(a="function"==typeof e?e:r(+e),s):a},s.padAngle=function(e){return arguments.length?(o="function"==typeof e?e:r(+e),s):o},s},e.pointRadial=O,e.radialArea=D,e.radialLine=z,e.stack=function(){var e=r([]),t=Ne,n=je,i=Ue;function a(r){var a,o,s=e.apply(this,arguments),l=r.length,c=s.length,u=new Array(c);for(a=0;a0)for(var r,n,i,a,o,s,l=0,c=e[t[0]].length;l0?(n[0]=a,n[1]=a+=i):i<0?(n[1]=o,n[0]=o+=i):(n[0]=0,n[1]=i)},e.stackOffsetExpand=function(e,t){if((n=e.length)>0){for(var r,n,i,a=0,o=e[0].length;a0){for(var r,n=0,i=e[t[0]],a=i.length;n0&&(n=(r=e[t[0]]).length)>0){for(var r,n,i,a=0,o=1;oa&&(_=a);var o=t.min(i,(function(e){return(v-n-(e.length-1)*_)/t.sum(e,u)}));i.forEach((function(e){e.forEach((function(e,t){e.y1=(e.y0=t)+e.value*o}))})),e.links.forEach((function(e){e.width=e.value*o}))})(),d();for(var a=1,o=A;o>0;--o)l(a*=.99),d(),s(a),d();function s(e){i.forEach((function(r){r.forEach((function(r){if(r.targetLinks.length){var n=(t.sum(r.targetLinks,f)/t.sum(r.targetLinks,u)-h(r))*e;r.y0+=n,r.y1+=n}}))}))}function l(e){i.slice().reverse().forEach((function(r){r.forEach((function(r){if(r.sourceLinks.length){var n=(t.sum(r.sourceLinks,p)/t.sum(r.sourceLinks,u)-h(r))*e;r.y0+=n,r.y1+=n}}))}))}function d(){i.forEach((function(e){var t,r,i,a=n,o=e.length;for(e.sort(c),i=0;i0&&(t.y0+=r,t.y1+=r),a=t.y1+_;if((r=a-_-v)>0)for(a=t.y0-=r,t.y1-=r,i=o-2;i>=0;--i)(r=(t=e[i]).y1+_-a)>0&&(t.y0-=r,t.y1-=r),a=t.y0}))}}(a),E(a),a}function E(e){e.nodes.forEach((function(e){e.sourceLinks.sort(l),e.targetLinks.sort(s)})),e.nodes.forEach((function(e){var t=e.y0,r=t;e.sourceLinks.forEach((function(e){e.y0=t+e.width/2,t+=e.width})),e.targetLinks.forEach((function(e){e.y1=r+e.width/2,r+=e.width}))}))}return S.update=function(e){return E(e),e},S.nodeId=function(e){return arguments.length?(b="function"==typeof e?e:o(e),S):b},S.nodeAlign=function(e){return arguments.length?(w="function"==typeof e?e:o(e),S):w},S.nodeWidth=function(e){return arguments.length?(x=+e,S):x},S.nodePadding=function(e){return arguments.length?(_=+e,S):_},S.nodes=function(e){return arguments.length?(T="function"==typeof e?e:o(e),S):T},S.links=function(e){return arguments.length?(k="function"==typeof e?e:o(e),S):k},S.size=function(t){return arguments.length?(e=n=0,i=+t[0],v=+t[1],S):[i-e,v-n]},S.extent=function(t){return arguments.length?(e=+t[0][0],i=+t[1][0],n=+t[0][1],v=+t[1][1],S):[[e,n],[i,v]]},S.iterations=function(e){return arguments.length?(A=+e,S):A},S},e.sankeyCenter=function(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?t.min(e.sourceLinks,i)-1:0},e.sankeyLeft=function(e){return e.depth},e.sankeyRight=function(e,t){return t-1-e.height},e.sankeyJustify=a,e.sankeyLinkHorizontal=function(){return n.linkHorizontal().source(v).target(x)},Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof e&&typeof t<"u"?n(e,Eg(),$b(),tw()):n(r.d3=r.d3||{},r.d3,r.d3,r.d3)}}),nw=m({"node_modules/elementary-circuits-directed-graph/johnson.js"(e,t){var r=Zb();t.exports=function(e,t){var n,i=[],a=[],o=[],s={},l=[];function c(e){o[e]=!1,s.hasOwnProperty(e)&&Object.keys(s[e]).forEach((function(t){delete s[e][t],o[t]&&c(t)}))}function u(e){var t,r,i=!1;for(a.push(e),o[e]=!0,t=0;t=t}))}(t);for(var n,i=r(e).components.filter((function(e){return e.length>1})),a=1/0,o=0;ot.source.column)}function M(e,t){var r=0;e.sourceLinks.forEach((function(e){r=e.circular&&!W(e,t)?r+1:r}));var n=0;return e.targetLinks.forEach((function(e){n=e.circular&&!W(e,t)?n+1:n})),r+n}function S(e){var t=e.source.sourceLinks,r=0;t.forEach((function(e){r=e.circular?r+1:r}));var n=e.target.targetLinks,i=0;return n.forEach((function(e){i=e.circular?i+1:i})),!(r>1||i>1)}function E(e,t,r){return e.sort(I),e.forEach((function(n,i){var a=0;if(W(n,r)&&S(n))n.circularPathData.verticalBuffer=a+n.width/2;else{for(var o=0;oa?s:a}n.circularPathData.verticalBuffer=a+n.width/2}})),e}function C(e,r,i,a){var o=t.min(e.links,(function(e){return e.source.y0}));e.links.forEach((function(e){e.circular&&(e.circularPathData={})})),E(e.links.filter((function(e){return"top"==e.circularLinkType})),r,a),E(e.links.filter((function(e){return"bottom"==e.circularLinkType})),r,a),e.links.forEach((function(t){if(t.circular){if(t.circularPathData.arcRadius=t.width+w,t.circularPathData.leftNodeBuffer=5,t.circularPathData.rightNodeBuffer=5,t.circularPathData.sourceWidth=t.source.x1-t.source.x0,t.circularPathData.sourceX=t.source.x0+t.circularPathData.sourceWidth,t.circularPathData.targetX=t.target.x0,t.circularPathData.sourceY=t.y0,t.circularPathData.targetY=t.y1,W(t,a)&&S(t))t.circularPathData.leftSmallArcRadius=w+t.width/2,t.circularPathData.leftLargeArcRadius=w+t.width/2,t.circularPathData.rightSmallArcRadius=w+t.width/2,t.circularPathData.rightLargeArcRadius=w+t.width/2,"bottom"==t.circularLinkType?(t.circularPathData.verticalFullExtent=t.source.y1+b+t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.rightLargeArcRadius):(t.circularPathData.verticalFullExtent=t.source.y0-b-t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.rightLargeArcRadius);else{var s=t.source.column,l=t.circularLinkType,c=e.links.filter((function(e){return e.source.column==s&&e.circularLinkType==l}));"bottom"==t.circularLinkType?c.sort(P):c.sort(L);var u=0;c.forEach((function(e,n){e.circularLinkID==t.circularLinkID&&(t.circularPathData.leftSmallArcRadius=w+t.width/2+u,t.circularPathData.leftLargeArcRadius=w+t.width/2+n*r+u),u+=e.width})),s=t.target.column,c=e.links.filter((function(e){return e.target.column==s&&e.circularLinkType==l})),"bottom"==t.circularLinkType?c.sort(D):c.sort(z),u=0,c.forEach((function(e,n){e.circularLinkID==t.circularLinkID&&(t.circularPathData.rightSmallArcRadius=w+t.width/2+u,t.circularPathData.rightLargeArcRadius=w+t.width/2+n*r+u),u+=e.width})),"bottom"==t.circularLinkType?(t.circularPathData.verticalFullExtent=Math.max(i,t.source.y1,t.target.y1)+b+t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.rightLargeArcRadius):(t.circularPathData.verticalFullExtent=o-b-t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.rightLargeArcRadius)}t.circularPathData.leftInnerExtent=t.circularPathData.sourceX+t.circularPathData.leftNodeBuffer,t.circularPathData.rightInnerExtent=t.circularPathData.targetX-t.circularPathData.rightNodeBuffer,t.circularPathData.leftFullExtent=t.circularPathData.sourceX+t.circularPathData.leftLargeArcRadius+t.circularPathData.leftNodeBuffer,t.circularPathData.rightFullExtent=t.circularPathData.targetX-t.circularPathData.rightLargeArcRadius-t.circularPathData.rightNodeBuffer}if(t.circular)t.path=function(e){return"top"==e.circularLinkType?"M"+e.circularPathData.sourceX+" "+e.circularPathData.sourceY+" L"+e.circularPathData.leftInnerExtent+" "+e.circularPathData.sourceY+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftSmallArcRadius+" 0 0 0 "+e.circularPathData.leftFullExtent+" "+(e.circularPathData.sourceY-e.circularPathData.leftSmallArcRadius)+" L"+e.circularPathData.leftFullExtent+" "+e.circularPathData.verticalLeftInnerExtent+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftLargeArcRadius+" 0 0 0 "+e.circularPathData.leftInnerExtent+" "+e.circularPathData.verticalFullExtent+" L"+e.circularPathData.rightInnerExtent+" "+e.circularPathData.verticalFullExtent+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightLargeArcRadius+" 0 0 0 "+e.circularPathData.rightFullExtent+" "+e.circularPathData.verticalRightInnerExtent+" L"+e.circularPathData.rightFullExtent+" "+(e.circularPathData.targetY-e.circularPathData.rightSmallArcRadius)+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightSmallArcRadius+" 0 0 0 "+e.circularPathData.rightInnerExtent+" "+e.circularPathData.targetY+" L"+e.circularPathData.targetX+" "+e.circularPathData.targetY:"M"+e.circularPathData.sourceX+" "+e.circularPathData.sourceY+" L"+e.circularPathData.leftInnerExtent+" "+e.circularPathData.sourceY+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftSmallArcRadius+" 0 0 1 "+e.circularPathData.leftFullExtent+" "+(e.circularPathData.sourceY+e.circularPathData.leftSmallArcRadius)+" L"+e.circularPathData.leftFullExtent+" "+e.circularPathData.verticalLeftInnerExtent+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftLargeArcRadius+" 0 0 1 "+e.circularPathData.leftInnerExtent+" "+e.circularPathData.verticalFullExtent+" L"+e.circularPathData.rightInnerExtent+" "+e.circularPathData.verticalFullExtent+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightLargeArcRadius+" 0 0 1 "+e.circularPathData.rightFullExtent+" "+e.circularPathData.verticalRightInnerExtent+" L"+e.circularPathData.rightFullExtent+" "+(e.circularPathData.targetY+e.circularPathData.rightSmallArcRadius)+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightSmallArcRadius+" 0 0 1 "+e.circularPathData.rightInnerExtent+" "+e.circularPathData.targetY+" L"+e.circularPathData.targetX+" "+e.circularPathData.targetY}(t);else{var h=n.linkHorizontal().source((function(e){return[e.source.x0+(e.source.x1-e.source.x0),e.y0]})).target((function(e){return[e.target.x0,e.y1]}));t.path=h(t)}}))}function I(e,t){return O(e)==O(t)?"bottom"==e.circularLinkType?P(e,t):L(e,t):O(t)-O(e)}function L(e,t){return e.y0-t.y0}function P(e,t){return t.y0-e.y0}function z(e,t){return e.y1-t.y1}function D(e,t){return t.y1-e.y1}function O(e){return e.target.column-e.source.column}function R(e){return e.target.x0-e.source.x1}function F(e,t){var r=k(e),n=R(t)/Math.tan(r);return"up"==G(e)?e.y1+n:e.y1-n}function B(e,t){var r=k(e),n=R(t)/Math.tan(r);return"up"==G(e)?e.y1-n:e.y1+n}function j(e,t,r,n){e.links.forEach((function(i){if(!i.circular&&i.target.column-i.source.column>1){var a=i.source.column+1,o=i.target.column-1,s=1,l=o-a+1;for(s=1;a<=o;a++,s++)e.nodes.forEach((function(o){if(o.column==a){var c,u=s/(l+1),h=Math.pow(1-u,3),f=3*u*Math.pow(1-u,2),p=3*Math.pow(u,2)*(1-u),d=Math.pow(u,3),m=h*i.y0+f*i.y0+p*i.y1+d*i.y1,g=m-i.width/2,y=m+i.width/2;g>o.y0&&go.y0&&yo.y1)&&(c=y-o.y0+10,o=U(o,c,t,r),e.nodes.forEach((function(e){_(e,n)==_(o,n)||e.column!=o.column||e.y0o.y1&&U(e,c,t,r)})))}}))}}))}function N(e,t){return e.y0>t.y0&&e.y0t.y0&&e.y1t.y1}function U(e,t,r,n){return e.y0+t>=r&&e.y1+t<=n&&(e.y0=e.y0+t,e.y1=e.y1+t,e.targetLinks.forEach((function(e){e.y1=e.y1+t})),e.sourceLinks.forEach((function(e){e.y0=e.y0+t}))),e}function V(e,t,r,n){e.nodes.forEach((function(i){n&&i.y+(i.y1-i.y0)>t&&(i.y=i.y-(i.y+(i.y1-i.y0)-t));var a=e.links.filter((function(e){return _(e.source,r)==_(i,r)})),o=a.length;o>1&&a.sort((function(e,t){if(!e.circular&&!t.circular){if(e.target.column==t.target.column)return e.y1-t.y1;if(!H(e,t))return e.y1-t.y1;if(e.target.column>t.target.column){var r=B(t,e);return e.y1-r}if(t.target.column>e.target.column)return B(e,t)-t.y1}return e.circular&&!t.circular?"top"==e.circularLinkType?-1:1:t.circular&&!e.circular?"top"==t.circularLinkType?1:-1:e.circular&&t.circular?e.circularLinkType===t.circularLinkType&&"top"==e.circularLinkType?e.target.column===t.target.column?e.target.y1-t.target.y1:t.target.column-e.target.column:e.circularLinkType===t.circularLinkType&&"bottom"==e.circularLinkType?e.target.column===t.target.column?t.target.y1-e.target.y1:e.target.column-t.target.column:"top"==e.circularLinkType?-1:1:void 0}));var s=i.y0;a.forEach((function(e){e.y0=s+e.width/2,s+=e.width})),a.forEach((function(e,t){if("bottom"==e.circularLinkType){for(var r=t+1,n=0;r1&&n.sort((function(e,t){if(!e.circular&&!t.circular){if(e.source.column==t.source.column)return e.y0-t.y0;if(!H(e,t))return e.y0-t.y0;if(t.source.column0?"up":"down"}function W(e,t){return _(e.source,t)==_(e.target,t)}e.sankeyCircular=function(){var e,n,a=0,_=0,k=1,A=1,S=24,E=g,I=o,L=y,P=v,z=32,D=2,O=null;function R(){var o={nodes:L.apply(null,arguments),links:P.apply(null,arguments)};(function(e){e.nodes.forEach((function(e,t){e.index=t,e.sourceLinks=[],e.targetLinks=[]}));var t=r.map(e.nodes,E);e.links.forEach((function(e,r){e.index=r;var n=e.source,i=e.target;"object"!==(typeof n>"u"?"undefined":l(n))&&(n=e.source=x(t,n)),"object"!==(typeof i>"u"?"undefined":l(i))&&(i=e.target=x(t,i)),n.sourceLinks.push(e),i.targetLinks.push(e)}))})(o),function(e,t,r){var n=0;if(null===r){for(var a=[],o=0;o0?r+b+w:r,bottom:n=n>0?n+b+w:n,left:a=a>0?a+b+w:a,right:i=i>0?i+b+w:i}}(i),u=function(e,r){var n=t.max(e.nodes,(function(e){return e.column})),i=k-a,o=A-_,s=i/(i+r.right+r.left),l=o/(o+r.top+r.bottom);return a=a*s+r.left,k=0==r.right?k:k*s,_=_*l+r.top,A*=l,e.nodes.forEach((function(e){e.x0=a+e.column*((k-a-S)/n),e.x1=e.x0+S})),l}(i,c);s*=u,i.links.forEach((function(e){e.width=e.value*s})),l.forEach((function(e){var t=e.length;e.forEach((function(e,n){e.depth==l.length-1&&1==t||0==e.depth&&1==t?(e.y0=A/2-e.value*s,e.y1=e.y0+e.value*s):e.partOfCycle?0==M(e,r)?(e.y0=A/2+n,e.y1=e.y0+e.value*s):"top"==e.circularLinkType?(e.y0=_+n,e.y1=e.y0+e.value*s):(e.y0=A-e.value*s-n,e.y1=e.y0+e.value*s):0==c.top||0==c.bottom?(e.y0=(A-_)/t*n,e.y1=e.y0+e.value*s):(e.y0=(A-_)/2-t/2+n,e.y1=e.y0+e.value*s)}))}))})(s),y();for(var c=1,u=o;u>0;--u)g(c*=.99,s),y();function g(e,r){var n=l.length;l.forEach((function(i){var a=i.length,o=i[0].depth;i.forEach((function(i){var s;if((i.sourceLinks.length||i.targetLinks.length)&&!(i.partOfCycle&&M(i,r)>0))if(0==o&&1==a)s=i.y1-i.y0,i.y0=A/2-s/2,i.y1=A/2+s/2;else if(o==n-1&&1==a)s=i.y1-i.y0,i.y0=A/2-s/2,i.y1=A/2+s/2;else{var l=t.mean(i.sourceLinks,m),c=t.mean(i.targetLinks,d),u=((l&&c?(l+c)/2:l||c)-p(i))*e;i.y0+=u,i.y1+=u}}))}))}function y(){l.forEach((function(t){var r,n,i,a=_,o=t.length;for(t.sort(h),i=0;i0&&(r.y0+=n,r.y1+=n),a=r.y1+e;if((n=a-e-A)>0)for(a=r.y0-=n,r.y1-=n,i=o-2;i>=0;--i)(n=(r=t[i]).y1+e-a)>0&&(r.y0-=n,r.y1-=n),a=r.y0}))}}(o,z,E),F(o);for(var s=0;s<4;s++)V(o,A,E),q(o,0,E),j(o,_,A,E),V(o,A,E),q(o,0,E);return function(e,r,n){var i=e.nodes,a=e.links,o=!1,s=!1;if(a.forEach((function(e){"top"==e.circularLinkType?o=!0:"bottom"==e.circularLinkType&&(s=!0)})),0==o||0==s){var l=t.min(i,(function(e){return e.y0})),c=t.max(i,(function(e){return e.y1})),u=(n-r)/(c-l);i.forEach((function(e){var t=(e.y1-e.y0)*u;e.y0=(e.y0-l)*u,e.y1=e.y0+t})),a.forEach((function(e){e.y0=(e.y0-l)*u,e.y1=(e.y1-l)*u,e.width=e.width*u}))}}(o,_,A),C(o,D,A,E),o}function F(e){e.nodes.forEach((function(e){e.sourceLinks.sort(u),e.targetLinks.sort(c)})),e.nodes.forEach((function(e){var t=e.y0,r=t,n=e.y1,i=n;e.sourceLinks.forEach((function(e){e.circular?(e.y0=n-e.width/2,n-=e.width):(e.y0=t+e.width/2,t+=e.width)})),e.targetLinks.forEach((function(e){e.circular?(e.y1=i-e.width/2,i-=e.width):(e.y1=r+e.width/2,r+=e.width)}))}))}return R.nodeId=function(e){return arguments.length?(E="function"==typeof e?e:s(e),R):E},R.nodeAlign=function(e){return arguments.length?(I="function"==typeof e?e:s(e),R):I},R.nodeWidth=function(e){return arguments.length?(S=+e,R):S},R.nodePadding=function(t){return arguments.length?(e=+t,R):e},R.nodes=function(e){return arguments.length?(L="function"==typeof e?e:s(e),R):L},R.links=function(e){return arguments.length?(P="function"==typeof e?e:s(e),R):P},R.size=function(e){return arguments.length?(a=_=0,k=+e[0],A=+e[1],R):[k-a,A-_]},R.extent=function(e){return arguments.length?(a=+e[0][0],k=+e[1][0],_=+e[0][1],A=+e[1][1],R):[[a,_],[k,A]]},R.iterations=function(e){return arguments.length?(z=+e,R):z},R.circularLinkGap=function(e){return arguments.length?(D=+e,R):D},R.nodePaddingRatio=function(e){return arguments.length?(n=+e,R):n},R.sortNodes=function(e){return arguments.length?(O=e,R):O},R.update=function(e){return T(e,E),F(e),e.links.forEach((function(e){e.circular&&(e.circularLinkType=e.y0+e.y1o+d&&(a+=1,t=s.x0),o=s.x0,i[a]||(i[a]=[]),i[a].push(s),r=t-s.x0,s.x0+=r,s.x1+=r}return i})(x=A.nodes).forEach((function(e){var t,r,n,i=0,a=e.length;for(e.sort((function(e,t){return e.y0-t.y0})),n=0;n=i||(r=i-t.y0)>1e-6&&(t.y0+=r,t.y1+=r),i=t.y1+p}));n.update(A)}return{circular:b,key:r,trace:c,guid:h.randstr(),horizontal:f,width:g,height:v,nodePad:c.node.pad,nodeLineColor:c.node.line.color,nodeLineWidth:c.node.line.width,linkLineColor:c.link.line.color,linkLineWidth:c.link.line.width,linkArrowLength:c.link.arrowlen,valueFormat:c.valueformat,valueSuffix:c.valuesuffix,textFont:c.textfont,translateX:u.x[0]*e.width+e.margin.l,translateY:e.height-u.y[1]*e.height+e.margin.t,dragParallel:f?v:g,dragPerpendicular:f?g:v,arrangement:c.arrangement,sankey:n,graph:A,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function M(e,t,r){var n=l(t.color),i=l(t.hovercolor),a=t.source.label+"|"+t.target.label+"__"+r;return t.trace=e.trace,t.curveNumber=e.trace.index,{circular:e.circular,key:a,traceId:e.key,pointNumber:t.pointNumber,link:t,tinyColorHue:c.tinyRGB(n),tinyColorAlpha:n.getAlpha(),tinyColorHoverHue:c.tinyRGB(i),tinyColorHoverAlpha:i.getAlpha(),linkPath:S,linkLineColor:e.linkLineColor,linkLineWidth:e.linkLineWidth,linkArrowLength:e.linkArrowLength,valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,parent:e,interactionState:e.interactionState,flow:t.flow}}function S(){return function(e){var t=e.linkArrowLength;if(e.link.circular)return function(e,t){var r="",n=e.width/2,i=e.circularPathData,a=i.sourceX+i.verticalBuffer0?" L "+i.targetX+" "+i.targetY:"")+"Z"):(r="M "+(i.targetX-t)+" "+(i.targetY-n)+" L "+(i.rightInnerExtent-t)+" "+(i.targetY-n)+" A "+(i.rightLargeArcRadius+n)+" "+(i.rightSmallArcRadius+n)+" 0 0 0 "+(i.rightFullExtent-n-t)+" "+(i.targetY+i.rightSmallArcRadius)+" L "+(i.rightFullExtent-n-t)+" "+i.verticalRightInnerExtent,r+=a&&o?" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.rightInnerExtent-n-t)+" "+(i.verticalFullExtent+n)+" L "+(i.rightFullExtent+n-t-(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent+n)+" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.leftFullExtent+n)+" "+i.verticalLeftInnerExtent:a?" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.rightFullExtent-t-n-(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent-n)+" L "+(i.leftFullExtent+n+(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent-n)+" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.leftFullExtent+n)+" "+i.verticalLeftInnerExtent:" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.rightInnerExtent-t)+" "+(i.verticalFullExtent+n)+" L "+i.leftInnerExtent+" "+(i.verticalFullExtent+n)+" A "+(i.leftLargeArcRadius+n)+" "+(i.leftLargeArcRadius+n)+" 0 0 0 "+(i.leftFullExtent+n)+" "+i.verticalLeftInnerExtent,r+=" L "+(i.leftFullExtent+n)+" "+(i.sourceY+i.leftSmallArcRadius)+" A "+(i.leftLargeArcRadius+n)+" "+(i.leftSmallArcRadius+n)+" 0 0 0 "+i.leftInnerExtent+" "+(i.sourceY-n)+" L "+i.sourceX+" "+(i.sourceY-n)+" L "+i.sourceX+" "+(i.sourceY+n)+" L "+i.leftInnerExtent+" "+(i.sourceY+n)+" A "+(i.leftLargeArcRadius-n)+" "+(i.leftSmallArcRadius-n)+" 0 0 1 "+(i.leftFullExtent-n)+" "+(i.sourceY+i.leftSmallArcRadius)+" L "+(i.leftFullExtent-n)+" "+i.verticalLeftInnerExtent,r+=a&&o?" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.leftFullExtent-n-(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent-n)+" L "+(i.rightFullExtent+n-t+(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent-n)+" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.rightFullExtent+n-t)+" "+i.verticalRightInnerExtent:a?" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.leftFullExtent+n)+" "+(i.verticalFullExtent+n)+" L "+(i.rightFullExtent-t-n)+" "+(i.verticalFullExtent+n)+" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.rightFullExtent+n-t)+" "+i.verticalRightInnerExtent:" A "+(i.leftLargeArcRadius-n)+" "+(i.leftLargeArcRadius-n)+" 0 0 1 "+i.leftInnerExtent+" "+(i.verticalFullExtent-n)+" L "+(i.rightInnerExtent-t)+" "+(i.verticalFullExtent-n)+" A "+(i.rightLargeArcRadius-n)+" "+(i.rightLargeArcRadius-n)+" 0 0 1 "+(i.rightFullExtent+n-t)+" "+i.verticalRightInnerExtent,r+=" L "+(i.rightFullExtent+n-t)+" "+(i.targetY+i.rightSmallArcRadius)+" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.rightInnerExtent-t)+" "+(i.targetY+n)+" L "+(i.targetX-t)+" "+(i.targetY+n)+(t>0?" L "+i.targetX+" "+i.targetY:"")+"Z"),r}(e.link,t);var r=Math.abs((e.link.target.x0-e.link.source.x1)/2);t>r&&(t=r);var i=e.link.source.x1,a=e.link.target.x0-t,o=n(i,a),s=o(.5),l=o(.5),c=e.link.y0-e.link.width/2,u=e.link.y0+e.link.width/2,h=e.link.y1-e.link.width/2,f=e.link.y1+e.link.width/2,p="M"+i+","+c,d="C"+s+","+c+" "+l+","+h+" "+a+","+h,m="C"+l+","+f+" "+s+","+u+" "+i+","+u,g=t>0?"L"+(a+t)+","+(h+e.link.width/2):"";return p+d+(g+="L"+a+","+f)+m+"Z"}}function E(e,t){var r=l(t.color),n=s.nodePadAcross,i=e.nodePad/2;t.dx=t.x1-t.x0,t.dy=t.y1-t.y0;var a=t.dx,o=Math.max(.5,t.dy),u="node_"+t.pointNumber;return t.group&&(u=h.randstr()),t.trace=e.trace,t.curveNumber=e.trace.index,{index:t.pointNumber,key:u,partOfGroup:t.partOfGroup||!1,group:t.group,traceId:e.key,trace:e.trace,node:t,nodePad:e.nodePad,nodeLineColor:e.nodeLineColor,nodeLineWidth:e.nodeLineWidth,textFont:e.textFont,size:e.horizontal?e.height:e.width,visibleWidth:Math.ceil(a),visibleHeight:o,zoneX:-n,zoneY:-i,zoneWidth:a+2*n,zoneHeight:o+2*i,labelY:e.horizontal?t.dy/2+1:t.dx/2+1,left:1===t.originalLayer,sizeAcross:e.width,forceLayouts:e.forceLayouts,horizontal:e.horizontal,darkBackground:r.getBrightness()<=128,tinyColorHue:c.tinyRGB(r),tinyColorAlpha:r.getAlpha(),valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,graph:e.graph,arrangement:e.arrangement,uniqueNodeLabelPathId:[e.guid,e.key,u].join("_"),interactionState:e.interactionState,figure:e}}function C(e){e.attr("transform",(function(e){return f(e.node.x0.toFixed(3),e.node.y0.toFixed(3))}))}function I(e){e.call(C)}function L(e,t){e.call(I),t.attr("d",S())}function P(e){e.attr("width",(function(e){return e.node.x1-e.node.x0})).attr("height",(function(e){return e.visibleHeight}))}function z(e){return e.link.width>1||e.linkLineWidth>0}function D(e){return f(e.translateX,e.translateY)+(e.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function O(e,t,r){e.on(".basic",null).on("mouseover.basic",(function(e){!e.interactionState.dragInProgress&&!e.partOfGroup&&(r.hover(this,e,t),e.interactionState.hovered=[this,e])})).on("mousemove.basic",(function(e){!e.interactionState.dragInProgress&&!e.partOfGroup&&(r.follow(this,e),e.interactionState.hovered=[this,e])})).on("mouseout.basic",(function(e){!e.interactionState.dragInProgress&&!e.partOfGroup&&(r.unhover(this,e,t),e.interactionState.hovered=!1)})).on("click.basic",(function(e){e.interactionState.hovered&&(r.unhover(this,e,t),e.interactionState.hovered=!1),!e.interactionState.dragInProgress&&!e.partOfGroup&&r.select(this,e,t)}))}function R(e,t,n,a){var o=i.behavior.drag().origin((function(e){return{x:e.node.x0+e.visibleWidth/2,y:e.node.y0+e.visibleHeight/2}})).on("dragstart",(function(i){if("fixed"!==i.arrangement&&(h.ensureSingle(a._fullLayout._infolayer,"g","dragcover",(function(e){a._fullLayout._dragCover=e})),h.raiseToTop(this),i.interactionState.dragInProgress=i.node,j(i.node),i.interactionState.hovered&&(n.nodeEvents.unhover.apply(0,i.interactionState.hovered),i.interactionState.hovered=!1),"snap"===i.arrangement)){var o=i.traceId+"|"+i.key;i.forceLayouts[o]?i.forceLayouts[o].alpha(1):function(e,t,n){!function(e){for(var t=0;t0&&n.forceLayouts[t].alpha(0)}}(0,t,i,n)).stop()}(0,o,i),function(e,t,r,n,i){window.requestAnimationFrame((function a(){var o;for(o=0;o0)window.requestAnimationFrame(a);else{var l=r.node.originalX;r.node.x0=l-r.visibleWidth/2,r.node.x1=l+r.visibleWidth/2,B(r,i)}}))}(e,t,i,o,a)}})).on("drag",(function(r){if("fixed"!==r.arrangement){var n=i.event.x,a=i.event.y;"snap"===r.arrangement?(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2,r.node.y0=a-r.visibleHeight/2,r.node.y1=a+r.visibleHeight/2):("freeform"===r.arrangement&&(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2),a=Math.max(0,Math.min(r.size-r.visibleHeight/2,a)),r.node.y0=a-r.visibleHeight/2,r.node.y1=a+r.visibleHeight/2),j(r.node),"snap"!==r.arrangement&&(r.sankey.update(r.graph),L(e.filter(N(r)),t))}})).on("dragend",(function(e){if("fixed"!==e.arrangement){e.interactionState.dragInProgress=!1;for(var t=0;t"),color:_(l,"bgcolor")||s.addOpacity(m.color,1),borderColor:_(l,"bordercolor"),fontFamily:_(l,"font.family"),fontSize:_(l,"font.size"),fontColor:_(l,"font.color"),fontWeight:_(l,"font.weight"),fontStyle:_(l,"font.style"),fontVariant:_(l,"font.variant"),fontTextcase:_(l,"font.textcase"),fontLineposition:_(l,"font.lineposition"),fontShadow:_(l,"font.shadow"),nameLength:_(l,"namelength"),textAlign:_(l,"align"),idealAlign:r.event.x"),color:_(s,"bgcolor")||a.tinyColorHue,borderColor:_(s,"bordercolor"),fontFamily:_(s,"font.family"),fontSize:_(s,"font.size"),fontColor:_(s,"font.color"),fontWeight:_(s,"font.weight"),fontStyle:_(s,"font.style"),fontVariant:_(s,"font.variant"),fontTextcase:_(s,"font.textcase"),fontLineposition:_(s,"font.lineposition"),fontShadow:_(s,"font.shadow"),nameLength:_(s,"namelength"),textAlign:_(s,"align"),idealAlign:"left",hovertemplate:s.hovertemplate,hovertemplateLabels:v,eventData:[a.node]},{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:e});f(w,.85),p(w)}}},unhover:function(t,i,a){!1!==e._fullLayout.hovermode&&(r.select(t).call(y,i,a),"skip"!==i.node.trace.node.hoverinfo&&(i.node.fullData=i.node.trace,e.emit("plotly_unhover",{event:r.event,points:[i.node]})),o.loneUnhover(n._hoverlayer.node()))},select:function(t,n,i){var a=n.node;a.originalEvent=r.event,e._hoverdata=[a],r.select(t).call(y,n,i),o.click(e,{target:!0})}}})}}}),lw=m({"src/traces/sankey/base_plot.js"(e){var t=De().overrideAll,r=Tt().getModuleCalcData,n=sw(),i=U(),a=dr(),o=pr(),s=Cn().prepSelect,l=ct(),c=He(),u="sankey";function h(e,t){var r=e._fullData[t],n=e._fullLayout,i=n.dragmode,u="pan"===n.dragmode?"move":"crosshair",h=r._bgRect;if(h&&"pan"!==i&&"zoom"!==i){a(h,u);var f={_id:"x",c2p:l.identity,_offset:r._sankey.translateX,_length:r._sankey.width},p={_id:"y",c2p:l.identity,_offset:r._sankey.translateY,_length:r._sankey.height},d={gd:e,element:h.node(),plotinfo:{id:t,xaxis:f,yaxis:p,fillRangeItems:l.noop},subplot:t,xaxes:[f],yaxes:[p],doneFnCompleted:function(r){var n,i=e._fullData[t],a=i.node.groups.slice(),o=[];function s(e){for(var t=i._sankey.graph.nodes,r=0;r0}function k(e){e.each((function(e){y.stroke(r.select(this),e.line.color)})).each((function(e){y.fill(r.select(this),e.color)})).style("stroke-width",(function(e){return e.line.width}))}function A(e,t,r){var n=e._fullLayout,i=a.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},t),o={type:"linear",_id:"x"+t._id},s={letter:"x",font:n.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function l(e,t){return a.coerce(i,o,g,e,t)}return d(i,o,l,s,n),m(i,o,l,s),o}function M(e,t,r){return[Math.min(t/e.width,r/e.height),e,t+"x"+r]}function S(e,t,n,i){var a=document.createElementNS("http://www.w3.org/2000/svg","text"),o=r.select(a);return o.text(e).attr("x",0).attr("y",0).attr("text-anchor",n).attr("data-unformatted",e).call(f.convertToTspans,i).call(u.font,t),u.bBox(o.node())}function E(e,t,r,n,i,o){var s="_cache"+t;e[s]&&e[s].key===i||(e[s]={key:i,value:r});var l=a.aggNums(o,null,[e[s].value,n],2);return e[s].value=l,l}t.exports=function(e,t,d,m){var g,v=e._fullLayout;T(d)&&m&&(g=m()),a.makeTraceGroups(v._indicatorlayer,t,"trace").each((function(t){var m,b,C,I,L,P=t[0].trace,z=r.select(this),D=P._hasGauge,O=P._isAngular,R=P._isBullet,F=P.domain,B={w:v._size.w*(F.x[1]-F.x[0]),h:v._size.h*(F.y[1]-F.y[0]),l:v._size.l+v._size.w*F.x[0],r:v._size.r+v._size.w*(1-F.x[1]),t:v._size.t+v._size.h*(1-F.y[1]),b:v._size.b+v._size.h*F.y[0]},j=B.l+B.w/2,N=B.t+B.h/2,U=Math.min(B.w/2,B.h),V=h.innerRadius*U,q=P.align||"center";if(b=N,D){if(O&&(m=j,b=N+U/2,C=function(e){return function(e,t){return[t/Math.sqrt(e.width/2*(e.width/2)+e.height*e.height),e,t]}(e,.9*V)}),R){var H=h.bulletPadding,G=1-h.bulletNumberDomainSize+H;m=B.l+(G+(1-G)*_[q])*B.w,C=function(e){return M(e,(h.bulletNumberDomainSize-H)*B.w,B.h)}}}else m=B.l+_[q]*B.w,C=function(e){return M(e,B.w,B.h)};!function(e,t,n,l){var c,h,d,m=n[0].trace,g=l.numbersX,v=l.numbersY,b=m.align||"center",k=x[b],M=l.transitionOpts,C=l.onComplete,I=a.ensureSingle(t,"g","numbers"),L=[];m._hasNumber&&L.push("number"),m._hasDelta&&(L.push("delta"),"left"===m.delta.position&&L.reverse());var P=I.selectAll("text").data(L);function z(t,r,n,i){if(!t.match("s")||n>=0==i>=0||r(n).slice(-1).match(w)||r(i).slice(-1).match(w))return r;var a=t.slice().replace("s","f").replace(/\d+/,(function(e){return parseInt(e)-1})),o=A(e,{tickformat:a});return function(e){return Math.abs(e)<1?p.tickText(o,e).text:r(e)}}P.enter().append("text"),P.attr("text-anchor",(function(){return k})).attr("class",(function(e){return e})).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),P.exit().remove();var D,O=m.mode+m.align;if(m._hasDelta&&(D=function(){var t=A(e,{tickformat:m.delta.valueformat},m._range);t.setScale(),p.prepTicks(t);var a=function(e){return p.tickText(t,e).text},o=m.delta.suffix,s=m.delta.prefix,l=function(e){return m.delta.relative?e.relativeDelta:e.delta},c=function(e,t){return 0===e||"number"!=typeof e||isNaN(e)?"-":(e>0?m.delta.increasing.symbol:m.delta.decreasing.symbol)+s+t(e)+o},d=function(e){return e.delta>=0?m.delta.increasing.color:m.delta.decreasing.color};void 0===m._deltaLastValue&&(m._deltaLastValue=l(n[0]));var g=I.select("text.delta");function v(){g.text(c(l(n[0]),a)).call(y.fill,d(n[0])).call(f.convertToTspans,e)}return g.call(u.font,m.delta.font).call(y.fill,d({delta:m._deltaLastValue})),T(M)?g.transition().duration(M.duration).ease(M.easing).tween("text",(function(){var e=r.select(this),t=l(n[0]),o=m._deltaLastValue,s=z(m.delta.valueformat,a,o,t),u=i(o,t);return m._deltaLastValue=t,function(t){e.text(c(u(t),s)),e.call(y.fill,d({delta:u(t)}))}})).each("end",(function(){v(),C&&C()})).each("interrupt",(function(){v(),C&&C()})):v(),h=S(c(l(n[0]),a),m.delta.font,k,e),g}(),O+=m.delta.position+m.delta.font.size+m.delta.font.family+m.delta.valueformat,O+=m.delta.increasing.symbol+m.delta.decreasing.symbol,d=h),m._hasNumber&&(function(){var t=A(e,{tickformat:m.number.valueformat},m._range);t.setScale(),p.prepTicks(t);var a=function(e){return p.tickText(t,e).text},o=m.number.suffix,s=m.number.prefix,l=I.select("text.number");function h(){var t="number"==typeof n[0].y?s+a(n[0].y)+o:"-";l.text(t).call(u.font,m.number.font).call(f.convertToTspans,e)}T(M)?l.transition().duration(M.duration).ease(M.easing).each("end",(function(){h(),C&&C()})).each("interrupt",(function(){h(),C&&C()})).attrTween("text",(function(){var e=r.select(this),t=i(n[0].lastY,n[0].y);m._lastValue=n[0].y;var l=z(m.number.valueformat,a,n[0].lastY,n[0].y);return function(r){e.text(s+l(t(r))+o)}})):h(),c=S(s+a(n[0].y)+o,m.number.font,k,e)}(),O+=m.number.font.size+m.number.font.family+m.number.valueformat+m.number.suffix+m.number.prefix,d=c),m._hasDelta&&m._hasNumber){var R,F,B=[(c.left+c.right)/2,(c.top+c.bottom)/2],j=[(h.left+h.right)/2,(h.top+h.bottom)/2],N=.75*m.delta.font.size;"left"===m.delta.position&&(R=E(m,"deltaPos",0,-1*(c.width*_[m.align]+h.width*(1-_[m.align])+N),O,Math.min),F=B[1]-j[1],d={width:c.width+h.width+N,height:Math.max(c.height,h.height),left:h.left+R,right:c.right,top:Math.min(c.top,h.top+F),bottom:Math.max(c.bottom,h.bottom+F)}),"right"===m.delta.position&&(R=E(m,"deltaPos",0,c.width*(1-_[m.align])+h.width*_[m.align]+N,O,Math.max),F=B[1]-j[1],d={width:c.width+h.width+N,height:Math.max(c.height,h.height),left:c.left,right:h.right+R,top:Math.min(c.top,h.top+F),bottom:Math.max(c.bottom,h.bottom+F)}),"bottom"===m.delta.position&&(R=null,F=h.height,d={width:Math.max(c.width,h.width),height:c.height+h.height,left:Math.min(c.left,h.left),right:Math.max(c.right,h.right),top:c.bottom-c.height,bottom:c.bottom+h.height}),"top"===m.delta.position&&(R=null,F=c.top,d={width:Math.max(c.width,h.width),height:c.height+h.height,left:Math.min(c.left,h.left),right:Math.max(c.right,h.right),top:c.bottom-c.height-h.height,bottom:c.bottom}),D.attr({dx:R,dy:F})}(m._hasNumber||m._hasDelta)&&I.attr("transform",(function(){var e=l.numbersScaler(d);O+=e[2];var t,r=E(m,"numbersScale",1,e[0],O,Math.min);m._scaleNumbers||(r=1),t=m._isAngular?v-r*d.bottom:v-r*(d.top+d.bottom)/2,m._numbersTop=r*d.top+t;var n=d[b];"center"===b&&(n=(d.left+d.right)/2);var i=g-r*n;return i=E(m,"numbersTranslate",0,i,O,Math.max),s(i,t)+o(r)}))}(e,z,t,{numbersX:m,numbersY:b,numbersScaler:C,transitionOpts:d,onComplete:g}),D&&(I={range:P.gauge.axis.range,color:P.gauge.bgcolor,line:{color:P.gauge.bordercolor,width:0},thickness:1},L={range:P.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:P.gauge.bordercolor,width:P.gauge.borderwidth},thickness:1});var W=z.selectAll("g.angular").data(O?t:[]);W.exit().remove();var Z=z.selectAll("g.angularaxis").data(O?t:[]);Z.exit().remove(),O&&function(e,t,i,a){var o,u,h,f,d=i[0].trace,m=a.size,g=a.radius,y=a.innerRadius,v=a.gaugeBg,x=a.gaugeOutline,_=[m.l+m.w/2,m.t+m.h/2+g/2],b=a.gauge,w=a.layer,M=a.transitionOpts,S=a.onComplete,E=Math.PI/2;function C(e){var t=d.gauge.axis.range[0],r=(e-t)/(d.gauge.axis.range[1]-t)*Math.PI-E;return r<-E?-E:r>E?E:r}function I(e){return r.svg.arc().innerRadius((y+g)/2-e/2*(g-y)).outerRadius((y+g)/2+e/2*(g-y)).startAngle(-E)}function L(e){e.attr("d",(function(e){return I(e.thickness).startAngle(C(e.range[0])).endAngle(C(e.range[1]))()}))}b.enter().append("g").classed("angular",!0),b.attr("transform",s(_[0],_[1])),w.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),w.selectAll("g.xangularaxistick,path,text").remove(),(o=A(e,d.gauge.axis)).type="linear",o.range=d.gauge.axis.range,o._id="xangularaxis",o.ticklabeloverflow="allow",o.setScale();var P=function(e){return(o.range[0]-e.x)/(o.range[1]-o.range[0])*Math.PI+Math.PI},z={},D=p.makeLabelFns(o,0).labelStandoff;z.xFn=function(e){var t=P(e);return Math.cos(t)*D},z.yFn=function(e){var t=P(e),r=Math.sin(t)>0?.2:1;return-Math.sin(t)*(D+e.fontSize*r)+Math.abs(Math.cos(t))*(e.fontSize*c)},z.anchorFn=function(e){var t=P(e),r=Math.cos(t);return Math.abs(r)<.1?"middle":r>0?"start":"end"},z.heightFn=function(e,t,r){var n=P(e);return-.5*(1+Math.sin(n))*r};var O=function(e){return s(_[0]+g*Math.cos(e),_[1]-g*Math.sin(e))};h=function(e){return O(P(e))};if(u=p.calcTicks(o),f=p.getTickSigns(o)[2],o.visible){f="inside"===o.ticks?-1:1;var R=(o.linewidth||1)/2;p.drawTicks(e,o,{vals:u,layer:w,path:"M"+f*R+",0h"+f*o.ticklen,transFn:function(e){var t=P(e);return O(t)+"rotate("+-l(t)+")"}}),p.drawLabels(e,o,{vals:u,layer:w,transFn:h,labelFns:z})}var F=[v].concat(d.gauge.steps),B=b.selectAll("g.bg-arc").data(F);B.enter().append("g").classed("bg-arc",!0).append("path"),B.select("path").call(L).call(k),B.exit().remove();var j=I(d.gauge.bar.thickness),N=b.selectAll("g.value-arc").data([d.gauge.bar]);N.enter().append("g").classed("value-arc",!0).append("path");var U=N.select("path");T(M)?(U.transition().duration(M.duration).ease(M.easing).each("end",(function(){S&&S()})).each("interrupt",(function(){S&&S()})).attrTween("d",function(e,t,r){return function(){var i=n(t,r);return function(t){return e.endAngle(i(t))()}}}(j,C(i[0].lastY),C(i[0].y))),d._lastValue=i[0].y):U.attr("d","number"==typeof i[0].y?j.endAngle(C(i[0].y)):"M0,0Z"),U.call(k),N.exit().remove(),F=[];var V=d.gauge.threshold.value;(V||0===V)&&F.push({range:[V,V],color:d.gauge.threshold.color,line:{color:d.gauge.threshold.line.color,width:d.gauge.threshold.line.width},thickness:d.gauge.threshold.thickness});var q=b.selectAll("g.threshold-arc").data(F);q.enter().append("g").classed("threshold-arc",!0).append("path"),q.select("path").call(L).call(k),q.exit().remove();var H=b.selectAll("g.gauge-outline").data([x]);H.enter().append("g").classed("gauge-outline",!0).append("path"),H.select("path").call(L).call(k),H.exit().remove()}(e,0,t,{radius:U,innerRadius:V,gauge:W,layer:Z,size:B,gaugeBg:I,gaugeOutline:L,transitionOpts:d,onComplete:g});var Y=z.selectAll("g.bullet").data(R?t:[]);Y.exit().remove();var X=z.selectAll("g.bulletaxis").data(R?t:[]);X.exit().remove(),R&&function(e,t,r,n){var i,a,o,l,c,u=r[0].trace,f=n.gauge,d=n.layer,m=n.gaugeBg,g=n.gaugeOutline,v=n.size,x=u.domain,_=n.transitionOpts,b=n.onComplete;f.enter().append("g").classed("bullet",!0),f.attr("transform",s(v.l,v.t)),d.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),d.selectAll("g.xbulletaxistick,path,text").remove();var w=v.h,M=u.gauge.bar.thickness*w,S=x.x[0],E=x.x[0]+(x.x[1]-x.x[0])*(u._hasNumber||u._hasDelta?1-h.bulletNumberDomainSize:1);function C(e){e.attr("width",(function(e){return Math.max(0,i.c2p(e.range[1])-i.c2p(e.range[0]))})).attr("x",(function(e){return i.c2p(e.range[0])})).attr("y",(function(e){return.5*(1-e.thickness)*w})).attr("height",(function(e){return e.thickness*w}))}(i=A(e,u.gauge.axis))._id="xbulletaxis",i.domain=[S,E],i.setScale(),a=p.calcTicks(i),o=p.makeTransTickFn(i),l=p.getTickSigns(i)[2],c=v.t+v.h,i.visible&&(p.drawTicks(e,i,{vals:"inside"===i.ticks?p.clipEnds(i,a):a,layer:d,path:p.makeTickPath(i,c,l),transFn:o}),p.drawLabels(e,i,{vals:a,layer:d,transFn:o,labelFns:p.makeLabelFns(i,c)}));var I=[m].concat(u.gauge.steps),L=f.selectAll("g.bg-bullet").data(I);L.enter().append("g").classed("bg-bullet",!0).append("rect"),L.select("rect").call(C).call(k),L.exit().remove();var P=f.selectAll("g.value-bullet").data([u.gauge.bar]);P.enter().append("g").classed("value-bullet",!0).append("rect"),P.select("rect").attr("height",M).attr("y",(w-M)/2).call(k),T(_)?P.select("rect").transition().duration(_.duration).ease(_.easing).each("end",(function(){b&&b()})).each("interrupt",(function(){b&&b()})).attr("width",Math.max(0,i.c2p(Math.min(u.gauge.axis.range[1],r[0].y)))):P.select("rect").attr("width","number"==typeof r[0].y?Math.max(0,i.c2p(Math.min(u.gauge.axis.range[1],r[0].y))):0),P.exit().remove();var z=r.filter((function(){return u.gauge.threshold.value||0===u.gauge.threshold.value})),D=f.selectAll("g.threshold-bullet").data(z);D.enter().append("g").classed("threshold-bullet",!0).append("line"),D.select("line").attr("x1",i.c2p(u.gauge.threshold.value)).attr("x2",i.c2p(u.gauge.threshold.value)).attr("y1",(1-u.gauge.threshold.thickness)/2*w).attr("y2",(1-(1-u.gauge.threshold.thickness)/2)*w).call(y.stroke,u.gauge.threshold.line.color).style("stroke-width",u.gauge.threshold.line.width),D.exit().remove();var O=f.selectAll("g.gauge-outline").data([g]);O.enter().append("g").classed("gauge-outline",!0).append("rect"),O.select("rect").call(C).call(k),O.exit().remove()}(e,0,t,{gauge:Y,layer:X,size:B,gaugeBg:I,gaugeOutline:L,transitionOpts:d,onComplete:g});var $=z.selectAll("text.title").data(t);$.exit().remove(),$.enter().append("text").classed("title",!0),$.attr("text-anchor",(function(){return R?x.right:x[P.title.align]})).text(P.title.text).call(u.font,P.title.font).call(f.convertToTspans,e),$.attr("transform",(function(){var e,t=B.l+B.w*_[P.title.align],r=h.titlePadding,n=u.bBox($.node());return D?(O&&(e=P.gauge.axis.visible?u.bBox(Z.node()).top-r-n.bottom:B.t+B.h/2-U/2-n.bottom-r),R&&(e=b-(n.top+n.bottom)/2,t=B.l-h.bulletPadding*B.w)):e=P._numbersTop-r-n.bottom,s(t,e)}))}))}}}),vw=m({"src/traces/indicator/index.js"(e,t){t.exports={moduleType:"trace",name:"indicator",basePlotModule:fw(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:pw(),supplyDefaults:mw().supplyDefaults,calc:gw().calc,plot:yw(),meta:{}}}}),xw=m({"lib/indicator.js"(e,t){t.exports=vw()}}),_w=m({"src/traces/table/attributes.js"(e,t){var r=bn(),n=B().extendFlat,i=De().overrideAll,a=j(),o=Ma().attributes,s=It().descriptionOnlyNumbers;t.exports=i({domain:o({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null},columnorder:{valType:"data_array"},header:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:s("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:n({},r.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:n({},a({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:s("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:n({},r.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:n({},a({arrayOk:!0}))}},"calc","from-root")}}),bw=m({"src/traces/table/defaults.js"(e,t){var r=ct(),n=_w(),i=Ma().defaults;t.exports=function(e,t,a,o){function s(i,a){return r.coerce(e,t,n,i,a)}i(t,o,s),s("columnwidth"),s("header.values"),s("header.format"),s("header.align"),s("header.prefix"),s("header.suffix"),s("header.height"),s("header.line.width"),s("header.line.color"),s("header.fill.color"),r.coerceFont(s,"header.font",o.font),function(e,t){for(var r=e.columnorder||[],n=e.header.values.length,i=r.slice(0,n),a=i.slice().sort((function(e,t){return e-t})),o=i.map((function(e){return a.indexOf(e)})),s=o.length;s",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}}}),kw=m({"src/traces/table/data_preparation_helper.js"(e,t){var r=Tw(),n=B().extendFlat,i=M(),a=I().isTypedArray,o=I().isArrayOrTypedArray;function s(e){if(o(e)){for(var t=0,r=0;r=t||c===e.length-1)&&(n[i]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=c,o={firstRowIndex:null,lastRowIndex:null,rows:[]},i+=a,s=c+1,a=0);return n}t.exports=function(e,t){var a=c(t.cells.values),d=function(e){return e.slice(t.header.values.length,e.length)},m=c(t.header.values);m.length&&!m[0].length&&(m[0]=[""],m=c(m));var g=m.concat(d(a).map((function(){return u((m[0]||[""]).length)}))),y=t.domain,v=Math.floor(e._fullLayout._size.w*(y.x[1]-y.x[0])),x=Math.floor(e._fullLayout._size.h*(y.y[1]-y.y[0])),_=t.header.values.length?g[0].map((function(){return t.header.height})):[r.emptyHeaderHeight],b=a.length?a[0].map((function(){return t.cells.height})):[],w=_.reduce(l,0),T=p(b,x-w+r.uplift),k=f(p(_,w),[]),A=f(T,k),M={},S=t._fullInput.columnorder;o(S)&&(S=Array.from(S)),S=S.concat(d(a.map((function(e,t){return t}))));var E=g.map((function(e,r){var n=o(t.columnwidth)?t.columnwidth[Math.min(r,t.columnwidth.length-1)]:t.columnwidth;return i(n)?Number(n):1})),C=E.reduce(l,0);E=E.map((function(e){return e/C*v}));var I=Math.max(s(t.header.line.width),s(t.cells.line.width)),L={key:t.uid+e._context.staticPlot,translateX:y.x[0]*e._fullLayout._size.w,translateY:e._fullLayout._size.h*(1-y.y[1]),size:e._fullLayout._size,width:v,maxLineWidth:I,height:x,columnOrder:S,groupHeight:x,rowBlocks:A,headerRowBlocks:k,scrollY:0,cells:n({},t.cells,{values:a}),headerCells:n({},t.header,{values:g}),gdColumns:g.map((function(e){return e[0]})),gdColumnsOriginalOrder:g.map((function(e){return e[0]})),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:g.map((function(e,t){var r=M[e];return M[e]=(r||0)+1,{key:e+"__"+M[e],label:e,specIndex:t,xIndex:S[t],xScale:h,x:void 0,calcdata:void 0,columnWidth:E[t]}}))};return L.columns.forEach((function(e){e.calcdata=L,e.x=h(e)})),L}}}),Aw=m({"src/traces/table/data_split_helpers.js"(e){var t=B().extendFlat;e.splitToPanels=function(e){var r=[0,0],n=t({},e,{key:"header",type:"header",page:0,prevPages:r,currentRepaint:[null,null],dragHandle:!0,values:e.calcdata.headerCells.values[e.specIndex],rowBlocks:e.calcdata.headerRowBlocks,calcdata:t({},e.calcdata,{cells:e.calcdata.headerCells})});return[t({},e,{key:"cells1",type:"cells",page:0,prevPages:r,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),t({},e,{key:"cells2",type:"cells",page:1,prevPages:r,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),n]},e.splitToCells=function(e){var t=function(e){var t=e.rowBlocks[e.page],r=t?t.rows[0].rowIndex:0;return[r,t?r+t.rows.length:0]}(e);return(e.values||[]).slice(t[0],t[1]).map((function(r,n){return{keyWithinBlock:n+("string"==typeof r&&r.match(/[<$&> ]/)?"_keybuster_"+Math.random():""),key:t[0]+n,column:e,calcdata:e.calcdata,page:e.page,rowBlocks:e.rowBlocks,value:r}}))}}}),Mw=m({"src/traces/table/plot.js"(e,t){var r=Tw(),n=b(),i=ct(),a=i.numberFormat,o=Kx(),s=er(),l=Et(),c=ct().raiseToTop,u=ct().strTranslate,h=ct().cancelTransition,f=kw(),p=Aw(),d=W();function m(e){return Math.ceil(e.calcdata.maxLineWidth/2)}function g(e,t){return"clip"+e._fullLayout._uid+"_scrollAreaBottomClip_"+t.key}function y(e,t){return"clip"+e._fullLayout._uid+"_columnBoundaryClippath_"+t.calcdata.key+"_"+t.specIndex}function v(e){return[].concat.apply([],e.map((function(e){return e}))).map((function(e){return e.__data__}))}function x(e,t,i){var a=e.selectAll("."+r.cn.scrollbarKit).data(o.repeat,o.keyFun);a.enter().append("g").classed(r.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),a.each((function(e){var t=e.scrollbarState;t.totalHeight=function(e){var t=e.rowBlocks;return R(t,t.length-1)+(t.length?F(t[t.length-1],1/0):1)}(e),t.scrollableAreaHeight=e.groupHeight-E(e),t.currentlyVisibleHeight=Math.min(t.totalHeight,t.scrollableAreaHeight),t.ratio=t.currentlyVisibleHeight/t.totalHeight,t.barLength=Math.max(t.ratio*t.currentlyVisibleHeight,r.goldenRatio*r.scrollbarWidth),t.barWiggleRoom=t.currentlyVisibleHeight-t.barLength,t.wiggleRoom=Math.max(0,t.totalHeight-t.scrollableAreaHeight),t.topY=0===t.barWiggleRoom?0:e.scrollY/t.wiggleRoom*t.barWiggleRoom,t.bottomY=t.topY+t.barLength,t.dragMultiplier=t.wiggleRoom/t.barWiggleRoom})).attr("transform",(function(e){var t=e.width+r.scrollbarWidth/2+r.scrollbarOffset;return u(t,E(e))}));var s=a.selectAll("."+r.cn.scrollbar).data(o.repeat,o.keyFun);s.enter().append("g").classed(r.cn.scrollbar,!0);var l=s.selectAll("."+r.cn.scrollbarSlider).data(o.repeat,o.keyFun);l.enter().append("g").classed(r.cn.scrollbarSlider,!0),l.attr("transform",(function(e){return u(0,e.scrollbarState.topY||0)}));var c=l.selectAll("."+r.cn.scrollbarGlyph).data(o.repeat,o.keyFun);c.enter().append("line").classed(r.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",r.scrollbarWidth).attr("stroke-linecap","round").attr("y1",r.scrollbarWidth/2),c.attr("y2",(function(e){return e.scrollbarState.barLength-r.scrollbarWidth/2})).attr("stroke-opacity",(function(e){return e.columnDragInProgress||!e.scrollbarState.barWiggleRoom||i?0:.4})),c.transition().delay(0).duration(0),c.transition().delay(r.scrollbarHideDelay).duration(r.scrollbarHideDuration).attr("stroke-opacity",0);var h=s.selectAll("."+r.cn.scrollbarCaptureZone).data(o.repeat,o.keyFun);h.enter().append("line").classed(r.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",r.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",(function(r){var i=n.event.y,a=this.getBoundingClientRect(),o=r.scrollbarState,s=i-a.top,l=n.scale.linear().domain([0,o.scrollableAreaHeight]).range([0,o.totalHeight]).clamp(!0);o.topY<=s&&s<=o.bottomY||I(t,e,null,l(s-o.barLength/2))(r)})).call(n.behavior.drag().origin((function(e){return n.event.stopPropagation(),e.scrollbarState.scrollbarScrollInProgress=!0,e})).on("drag",I(t,e)).on("dragend",(function(){}))),h.attr("y2",(function(e){return e.scrollbarState.scrollableAreaHeight})),t._context.staticPlot&&(c.remove(),h.remove())}function _(e,t,i,a){var l=function(e){var t=e.selectAll("."+r.cn.columnCells).data(o.repeat,o.keyFun);return t.enter().append("g").classed(r.cn.columnCells,!0),t.exit().remove(),t}(i),c=function(e){var t=e.selectAll("."+r.cn.columnCell).data(p.splitToCells,(function(e){return e.keyWithinBlock}));return t.enter().append("g").classed(r.cn.columnCell,!0),t.exit().remove(),t}(l);!function(e){e.each((function(e,t){var r=e.calcdata.cells.font,n=e.column.specIndex,i={size:k(r.size,n,t),color:k(r.color,n,t),family:k(r.family,n,t),weight:k(r.weight,n,t),style:k(r.style,n,t),variant:k(r.variant,n,t),textcase:k(r.textcase,n,t),lineposition:k(r.lineposition,n,t),shadow:k(r.shadow,n,t)};e.rowNumber=e.key,e.align=k(e.calcdata.cells.align,n,t),e.cellBorderWidth=k(e.calcdata.cells.line.width,n,t),e.font=i}))}(c);var u=function(e){var t=e.selectAll("."+r.cn.cellRect).data(o.repeat,(function(e){return e.keyWithinBlock}));return t.enter().append("rect").classed(r.cn.cellRect,!0),t}(c);!function(e){e.attr("width",(function(e){return e.column.columnWidth})).attr("stroke-width",(function(e){return e.cellBorderWidth})).each((function(e){var t=n.select(this);d.stroke(t,k(e.calcdata.cells.line.color,e.column.specIndex,e.rowNumber)),d.fill(t,k(e.calcdata.cells.fill.color,e.column.specIndex,e.rowNumber))}))}(u);var h=function(e){var t=e.selectAll("."+r.cn.cellTextHolder).data(o.repeat,(function(e){return e.keyWithinBlock}));return t.enter().append("g").classed(r.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),t}(c),f=function(e){var t=e.selectAll("."+r.cn.cellText).data(o.repeat,(function(e){return e.keyWithinBlock}));return t.enter().append("text").classed(r.cn.cellText,!0).style("cursor",(function(){return"auto"})).on("mousedown",(function(){n.event.stopPropagation()})),t}(h);(function(e){e.each((function(e){s.font(n.select(this),e.font)}))})(f),w(f,t,a,e),O(c)}function w(e,t,i,o){e.text((function(e){var t=e.column.specIndex,n=e.rowNumber,i=e.value,o="string"==typeof i,s=o&&i.match(/
/i),l=!o||s;e.mayHaveMarkup=o&&i.match(/[<&>]/);var c=function(e){return"string"==typeof e&&e.match(r.latexCheck)}(i);e.latex=c;var u,h,f=c?"":k(e.calcdata.cells.prefix,t,n)||"",p=c?"":k(e.calcdata.cells.suffix,t,n)||"",d=c?null:k(e.calcdata.cells.format,t,n)||null,m=f+(d?a(d)(e.value):e.value)+p;if(e.wrappingNeeded=!e.wrapped&&!l&&!c&&(u=T(m)),e.cellHeightMayIncrease=s||c||e.mayHaveMarkup||(void 0===u?T(m):u),e.needsConvertToTspans=e.mayHaveMarkup||e.wrappingNeeded||e.latex,e.wrappingNeeded){var g=(" "===r.wrapSplitCharacter?m.replace(/i&&n.push(a),i+=l}return n}(i,l,s);1===c.length&&(c[0]===i.length-1?c.unshift(c[0]-1):c.push(c[0]+1)),c[0]%2&&c.reverse(),t.each((function(e,t){e.page=c[t],e.scrollY=l})),t.attr("transform",(function(e){var t=R(e.rowBlocks,e.page)-e.scrollY;return u(0,t)})),e&&(L(e,r,t,c,n.prevPages,n,0),L(e,r,t,c,n.prevPages,n,1),x(r,e))}}function I(e,t,i,a){return function(o){var s=o.calcdata?o.calcdata:o,l=t.filter((function(e){return s.key===e.key})),c=i||s.scrollbarState.dragMultiplier,u=s.scrollY;s.scrollY=void 0===a?s.scrollY+c*n.event.dy:a;var h=l.selectAll("."+r.cn.yColumn).selectAll("."+r.cn.columnBlock).filter(M);return C(e,h,l),s.scrollY===u}}function L(e,t,r,n,i,a,o){n[o]!==i[o]&&(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout((function(){var a=r.filter((function(e,t){return t===o&&n[t]!==i[t]}));_(e,t,a,r),i[o]=n[o]})))}function P(e,t,i,a){return function(){var o=n.select(t.parentNode);o.each((function(e){var t=e.fragments;o.selectAll("tspan.line").each((function(e,r){t[r].width=this.getComputedTextLength()}));var n,i,a=t[t.length-1].width,s=t.slice(0,-1),l=[],c=0,u=e.column.columnWidth-2*r.cellPad;for(e.value="";s.length;)c+(i=(n=s.shift()).width+a)>u&&(e.value+=l.join(r.wrapSpacer)+r.lineBreaker,l=[],c=0),l.push(n.text),c+=i;c&&(e.value+=l.join(r.wrapSpacer)),e.wrapped=!0})),o.selectAll("tspan.line").remove(),w(o.select("."+r.cn.cellText),i,e,a),n.select(t.parentNode.parentNode).call(O)}}function z(e,t,i,a,o){return function(){if(!o.settledY){var s=n.select(t.parentNode),l=j(o),c=o.key-l.firstRowIndex,h=l.rows[c].rowHeight,f=o.cellHeightMayIncrease?t.parentNode.getBoundingClientRect().height+2*r.cellPad:h,p=Math.max(f,h);p-l.rows[c].rowHeight&&(l.rows[c].rowHeight=p,e.selectAll("."+r.cn.columnCell).call(O),C(null,e.filter(M),0),x(i,a,!0)),s.attr("transform",(function(){var e=this,t=e.parentNode.getBoundingClientRect(),i=n.select(e.parentNode).select("."+r.cn.cellRect).node().getBoundingClientRect(),a=e.transform.baseVal.consolidate(),s=i.top-t.top+(a?a.matrix.f:r.cellPad);return u(D(o,n.select(e.parentNode).select("."+r.cn.cellTextHolder).node().getBoundingClientRect().width),s)})),o.settledY=!0}}}function D(e,t){switch(e.align){case"left":default:return r.cellPad;case"right":return e.column.columnWidth-(t||0)-r.cellPad;case"center":return(e.column.columnWidth-(t||0))/2}}function O(e){e.attr("transform",(function(e){var t=e.rowBlocks[0].auxiliaryBlocks.reduce((function(e,t){return e+F(t,1/0)}),0),r=F(j(e),e.key);return u(0,r+t)})).selectAll("."+r.cn.cellRect).attr("height",(function(e){return function(e,t){return e.rows[t-e.firstRowIndex]}(j(e),e.key).rowHeight}))}function R(e,t){for(var r=0,n=t-1;n>=0;n--)r+=B(e[n]);return r}function F(e,t){for(var r=0,n=0;nt.length&&(e=e.slice(0,t.length)):e=[],i=0;i90&&(p-=180,l=-l),{angle:p,flip:l,p:e.c2p(n,t,r),offsetMultplier:c}}}}),jw=m({"src/traces/carpet/plot.js"(e,t){var r=b(),n=er(),i=Rw(),a=Fw(),o=Bw(),s=Et(),l=ct(),c=l.strRotate,u=l.strTranslate,h=St();function f(e,t,o,s,l,c,u){var h="const-"+l+"-lines",f=o.selectAll("."+h).data(c);f.enter().append("path").classed(h,!0).style("vector-effect",u?"none":"non-scaling-stroke"),f.each((function(o){var s=o,l=s.x,c=s.y,u=i([],l,e.c2p),h=i([],c,t.c2p),f="M"+a(u,h,s.smoothing);r.select(this).attr("d",f).style("stroke-width",s.width).style("stroke",s.color).style("stroke-dasharray",n.dashStyle(s.dash,s.width)).style("fill","none")})),f.exit().remove()}function p(e,t,i,a,l,h,f,p){var d=h.selectAll("text."+p).data(f);d.enter().append("text").classed(p,!0);var m=0,g={};return d.each((function(l,h){var f;if("auto"===l.axis.tickangle)f=o(a,t,i,l.xy,l.dxy);else{var p=(l.axis.tickangle+180)*Math.PI/180;f=o(a,t,i,l.xy,[Math.cos(p),Math.sin(p)])}h||(g={angle:f.angle,flip:f.flip});var d=(l.endAnchor?-1:1)*f.flip,y=r.select(this).attr({"text-anchor":d>0?"start":"end","data-notex":1}).call(n.font,l.font).text(l.text).call(s.convertToTspans,e),v=n.bBox(this);y.attr("transform",u(f.p[0],f.p[1])+c(f.angle)+u(l.axis.labelpadding*d,.3*v.height)),m=Math.max(m,v.width+l.axis.labelpadding)})),d.exit().remove(),g.maxExtent=m,g}t.exports=function(e,t,n,s){var c=e._context.staticPlot,u=t.xaxis,h=t.yaxis,d=e._fullLayout._clips;l.makeTraceGroups(s,n,"trace").each((function(t){var n=r.select(this),s=t[0],m=s.trace,y=m.aaxis,v=m.baxis,x=l.ensureSingle(n,"g","minorlayer"),_=l.ensureSingle(n,"g","majorlayer"),b=l.ensureSingle(n,"g","boundarylayer"),w=l.ensureSingle(n,"g","labellayer");n.style("opacity",m.opacity),f(u,h,_,0,"a",y._gridlines,!0),f(u,h,_,0,"b",v._gridlines,!0),f(u,h,x,0,"a",y._minorgridlines,!0),f(u,h,x,0,"b",v._minorgridlines,!0),f(u,h,b,0,"a-boundary",y._boundarylines,c),f(u,h,b,0,"b-boundary",v._boundarylines,c);var T=p(e,u,h,m,0,w,y._labels,"a-label"),k=p(e,u,h,m,0,w,v._labels,"b-label");(function(e,t,r,n,i,a,s,c){var u,h,f,p,d=l.aggNums(Math.min,null,r.a),m=l.aggNums(Math.max,null,r.a),y=l.aggNums(Math.min,null,r.b),v=l.aggNums(Math.max,null,r.b);u=.5*(d+m),h=y,f=r.ab2xy(u,h,!0),p=r.dxyda_rough(u,h),void 0===s.angle&&l.extendFlat(s,o(r,i,a,f,r.dxydb_rough(u,h))),g(e,t,r,0,f,p,r.aaxis,i,a,s,"a-title"),u=d,h=.5*(y+v),f=r.ab2xy(u,h,!0),p=r.dxydb_rough(u,h),void 0===c.angle&&l.extendFlat(c,o(r,i,a,f,r.dxyda_rough(u,h))),g(e,t,r,0,f,p,r.baxis,i,a,c,"b-title")})(e,w,m,0,u,h,T,k),function(e,t,r,n,o){var s,c,u,h,f=r.select("#"+e._clipPathId);f.size()||(f=r.append("clipPath").classed("carpetclip",!0));var p=l.ensureSingle(f,"path","carpetboundary"),d=t.clipsegments,m=[];for(h=0;h90&&v<270,_=r.select(this);_.text(f.title.text).call(s.convertToTspans,e),x&&(b=(-s.lineCount(_)+m)*d*a-b),_.attr("transform",u(t.p[0],t.p[1])+c(t.angle)+u(0,b)).attr("text-anchor","middle").call(n.font,f.title.font)})),_.exit().remove()}}}),Nw=m({"src/traces/carpet/cheater_basis.js"(e,t){var r=ct().isArrayOrTypedArray;t.exports=function(e,t,n){var i,a,o,s,l,c=[],u=r(e)?e.length:e,h=r(t)?t.length:t,f=r(e)?e:null,p=r(t)?t:null;f&&(o=(f.length-1)/(f[f.length-1]-f[0])/(u-1)),p&&(s=(p.length-1)/(p[p.length-1]-p[0])/(h-1));var d,m=1/0,g=-1/0;for(a=0;a=10)return null;for(var i=1/0,a=-1/0,o=e.length,s=0;s0&&(p=e.dxydi([],n-1,o,0,s),y.push(l[0]+p[0]/3),v.push(l[1]+p[1]/3),d=e.dxydi([],n-1,o,1,s),y.push(h[0]-d[0]/3),v.push(h[1]-d[1]/3)),y.push(h[0]),v.push(h[1]),l=h;else for(n=e.a2i(r),c=Math.floor(Math.max(0,Math.min(I-2,n))),u=n-c,x.length=I,x.crossLength=L,x.xy=function(t){return e.evalxy([],n,t)},x.dxy=function(t,r){return e.dxydj([],c,t,u,r)},a=0;a0&&(m=e.dxydj([],c,a-1,u,0),y.push(l[0]+m[0]/3),v.push(l[1]+m[1]/3),g=e.dxydj([],c,a-1,u,1),y.push(h[0]-g[0]/3),v.push(h[1]-g[1]/3)),y.push(h[0]),v.push(h[1]),l=h;return x.axisLetter=t,x.axis=_,x.crossAxis=A,x.value=r,x.constvar=i,x.index=f,x.x=y,x.y=v,x.smoothing=A.smoothing,x}function D(r){var n,a,o,s,l,c=[],u=[],h={};if(h.length=x.length,h.crossLength=k.length,"b"===t)for(o=Math.max(0,Math.min(L-2,r)),l=Math.min(1,Math.max(0,r-o)),h.xy=function(t){return e.evalxy([],t,r)},h.dxy=function(t,r){return e.dxydi([],t,o,r,l)},n=0;nx.length-1)&&b.push(n(D(o),{color:_.gridcolor,width:_.gridwidth,dash:_.griddash}));for(f=u;fx.length-1||m<0||m>x.length-1))for(g=x[s],y=x[m],a=0;a<_.minorgridcount;a++)!((v=m-s)<=0)&&!((d=g+(y-g)*(a+1)/(_.minorgridcount+1)*(_.arraydtick/v))x[x.length-1])&&w.push(n(z(d),{color:_.minorgridcolor,width:_.minorgridwidth,dash:_.minorgriddash}));_.startline&&T.push(n(D(0),{color:_.startlinecolor,width:_.startlinewidth})),_.endline&&T.push(n(D(x.length-1),{color:_.endlinecolor,width:_.endlinewidth}))}else{for(l=5e-15,u=(c=[Math.floor((x[x.length-1]-_.tick0)/_.dtick*(1+l)),Math.ceil((x[0]-_.tick0)/_.dtick/(1+l))].sort((function(e,t){return e-t})))[0],h=c[1],f=u;f<=h;f++)p=_.tick0+_.dtick*f,b.push(n(z(p),{color:_.gridcolor,width:_.gridwidth,dash:_.griddash}));for(f=u-1;fx[x.length-1])&&w.push(n(z(d),{color:_.minorgridcolor,width:_.minorgridwidth,dash:_.minorgriddash}));_.startline&&T.push(n(z(x[0]),{color:_.startlinecolor,width:_.startlinewidth})),_.endline&&T.push(n(z(x[x.length-1]),{color:_.endlinecolor,width:_.endlinewidth}))}}}}),qw=m({"src/traces/carpet/calc_labels.js"(e,t){var r=ar(),n=B().extendFlat;t.exports=function(e,t){var i,a,o,s=t._labels=[],l=t._gridlines;for(i=0;i=0;i--)a[u-i]=e[h][i],o[u-i]=t[h][i];for(s.push({x:a,y:o,bicubic:l}),i=h,a=[],o=[];i>=0;i--)a[h-i]=e[i][0],o[h-i]=t[i][0];return s.push({x:a,y:o,bicubic:c}),s}}}),Gw=m({"src/traces/carpet/smooth_fill_2d_array.js"(e,t){var r=ct();t.exports=function(e,t,n){var i,a,o,s,l,c,u,h,f=[],p=[],d=e[0].length,m=e.length,g=0;for(i=0;i0&&void 0!==(c=e[l][s-1])&&(h++,u+=c),s0&&void 0!==(c=e[l-1][s])&&(h++,u+=c),l0&&a0&&i1e-5);return r.log("Smoother converged to",E,"after",C,"iterations"),e}}}),Ww=m({"src/traces/carpet/constants.js"(e,t){t.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),Zw=m({"src/traces/carpet/catmull_rom.js"(e,t){t.exports=function(e,t,r,n){var i=e[0]-t[0],a=e[1]-t[1],o=r[0]-t[0],s=r[1]-t[1],l=Math.pow(i*i+a*a,.25),c=Math.pow(o*o+s*s,.25),u=(c*c*i-l*l*o)*n,h=(c*c*a-l*l*s)*n,f=c*(l+c)*3,p=l*(l+c)*3;return[[t[0]+(f&&u/f),t[1]+(f&&h/f)],[t[0]-(p&&u/p),t[1]-(p&&h/p)]]}}}),Yw=m({"src/traces/carpet/compute_control_points.js"(e,t){var r=Zw(),n=ct().ensureArray;function i(e,t,r){var n=-.5*r[0]+1.5*t[0],i=-.5*r[1]+1.5*t[1];return[(2*n+e[0])/3,(2*i+e[1])/3]}t.exports=function(e,t,a,o,s,l){var c,u,h,f,p,d,m,g,y,v,x=a[0].length,_=a.length,b=s?3*x-2:x,w=l?3*_-2:_;for(e=n(e,w),t=n(t,w),h=0;hp&&em&&td||tg},e.setScale=function(){var t=e._x,r=e._y,n=i(e._xctrl,e._yctrl,t,r,h.smoothing,f.smoothing);e._xctrl=n[0],e._yctrl=n[1],e.evalxy=a([e._xctrl,e._yctrl],c,u,h.smoothing,f.smoothing),e.dxydi=o([e._xctrl,e._yctrl],h.smoothing,f.smoothing),e.dxydj=s([e._xctrl,e._yctrl],h.smoothing,f.smoothing)},e.i2a=function(e){var r=Math.max(0,Math.floor(e[0]),c-2),n=e[0]-r;return(1-n)*t[r]+n*t[r+1]},e.j2b=function(e){var t=Math.max(0,Math.floor(e[1]),c-2),r=e[1]-t;return(1-r)*l[t]+r*l[t+1]},e.ij2ab=function(t){return[e.i2a(t[0]),e.j2b(t[1])]},e.a2i=function(e){var r=Math.max(0,Math.min(n(e,t),c-2)),i=t[r],a=t[r+1];return Math.max(0,Math.min(c-1,r+(e-i)/(a-i)))},e.b2j=function(e){var t=Math.max(0,Math.min(n(e,l),u-2)),r=l[t],i=l[t+1];return Math.max(0,Math.min(u-1,t+(e-r)/(i-r)))},e.ab2ij=function(t){return[e.a2i(t[0]),e.b2j(t[1])]},e.i2c=function(t,r){return e.evalxy([],t,r)},e.ab2xy=function(r,n,i){if(!i&&(rt[c-1]|nl[u-1]))return[!1,!1];var a=e.a2i(r),o=e.b2j(n),s=e.evalxy([],a,o);if(i){var h,f,p,d,m=0,g=0,y=[];rt[c-1]?(h=c-2,f=1,m=(r-t[c-1])/(t[c-1]-t[c-2])):f=a-(h=Math.max(0,Math.min(c-2,Math.floor(a)))),nl[u-1]?(p=u-2,d=1,g=(n-l[u-1])/(l[u-1]-l[u-2])):d=o-(p=Math.max(0,Math.min(u-2,Math.floor(o)))),m&&(e.dxydi(y,h,p,f,d),s[0]+=y[0]*m,s[1]+=y[1]*m),g&&(e.dxydj(y,h,p,f,d),s[0]+=y[0]*g,s[1]+=y[1]*g)}return s},e.c2p=function(e,t,r){return[t.c2p(e[0]),r.c2p(e[1])]},e.p2x=function(e,t,r){return[t.p2c(e[0]),r.p2c(e[1])]},e.dadi=function(e){var r=Math.max(0,Math.min(t.length-2,e));return t[r+1]-t[r]},e.dbdj=function(e){var t=Math.max(0,Math.min(l.length-2,e));return l[t+1]-l[t]},e.dxyda=function(t,r,n,i){var a=e.dxydi(null,t,r,n,i),o=e.dadi(t,n);return[a[0]/o,a[1]/o]},e.dxydb=function(t,r,n,i){var a=e.dxydj(null,t,r,n,i),o=e.dbdj(r,i);return[a[0]/o,a[1]/o]},e.dxyda_rough=function(t,r,n){var i=y*(n||.1),a=e.ab2xy(t+i,r,!0),o=e.ab2xy(t-i,r,!0);return[.5*(a[0]-o[0])/i,.5*(a[1]-o[1])/i]},e.dxydb_rough=function(t,r,n){var i=v*(n||.1),a=e.ab2xy(t,r+i,!0),o=e.ab2xy(t,r-i,!0);return[.5*(a[0]-o[0])/i,.5*(a[1]-o[1])/i]},e.dpdx=function(e){return e._m},e.dpdy=function(e){return e._m}}}}),Qw=m({"src/traces/carpet/calc.js"(e,t){var r=ar(),n=ct().isArray1D,i=Nw(),a=Uw(),o=Vw(),s=qw(),l=Hw(),c=Do(),u=Gw(),h=zo(),f=Jw();t.exports=function(e,t){var p=r.getFromId(e,t.xaxis),d=r.getFromId(e,t.yaxis),m=t.aaxis,g=t.baxis,y=t.x,v=t.y,x=[];y&&n(y)&&x.push("x"),v&&n(v)&&x.push("y"),x.length&&h(t,m,g,"a","b",x);var _=t._a=t._a||t.a,b=t._b=t._b||t.b;y=t._x||t.x,v=t._y||t.y;var w={};if(t._cheater){var T="index"===m.cheatertype?_.length:_,k="index"===g.cheatertype?b.length:b;y=i(T,k,t.cheaterslope)}t._x=y=c(y),t._y=v=c(v),u(y,_,b),u(v,_,b),f(t),t.setScale();var A=a(y),M=a(v),S=.5*(A[1]-A[0]),E=.5*(A[1]+A[0]),C=.5*(M[1]-M[0]),I=.5*(M[1]+M[0]),L=1.3;return A=[E-S*L,E+S*L],M=[I-C*L,I+C*L],t._extremes[p._id]=r.findExtremes(p,A,{padded:!0}),t._extremes[d._id]=r.findExtremes(d,M,{padded:!0}),o(t,"a","b"),o(t,"b","a"),s(t,m),s(t,g),w.clipsegments=l(t._xctrl,t._yctrl,m,g),w.x=y,w.y=v,w.a=_,w.b=b,[w]}}}),eT=m({"src/traces/carpet/index.js"(e,t){t.exports={attributes:Lw(),supplyDefaults:Ow(),plot:jw(),calc:Qw(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Ci(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),tT=m({"lib/carpet.js"(e,t){t.exports=eT()}}),rT=m({"src/traces/scattercarpet/attributes.js"(e,t){var r=Tn(),n=kn(),i=q(),{hovertemplateAttrs:a,texttemplateAttrs:o,templatefallbackAttrs:s}=Fe(),l=zt(),c=B().extendFlat,u=n.marker,h=n.line,f=u.line;t.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:c({},n.mode,{dflt:"markers"}),text:c({},n.text,{}),texttemplate:o({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:s({editType:"plot"}),hovertext:c({},n.hovertext,{}),line:{color:h.color,width:h.width,dash:h.dash,backoff:h.backoff,shape:c({},h.shape,{values:["linear","spline"]}),smoothing:h.smoothing,editType:"calc"},connectgaps:n.connectgaps,fill:c({},n.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:r(),marker:c({symbol:u.symbol,opacity:u.opacity,maxdisplayed:u.maxdisplayed,angle:u.angle,angleref:u.angleref,standoff:u.standoff,size:u.size,sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,line:c({width:f.width,dash:f.dash,editType:"calc"},l("marker.line")),gradient:u.gradient,editType:"calc"},l("marker")),textfont:n.textfont,textposition:n.textposition,selected:n.selected,unselected:n.unselected,hoverinfo:c({},i.hoverinfo,{flags:["a","b","text","name"]}),hoveron:n.hoveron,hovertemplate:a(),hovertemplatefallback:s(),zorder:n.zorder}}}),nT=m({"src/traces/scattercarpet/defaults.js"(e,t){var r=ct(),n=wn(),i=Xt(),a=Yn(),o=Xn(),s=$n(),l=Kn(),c=Jn(),u=rT();t.exports=function(e,t,h,f){function p(n,i){return r.coerce(e,t,u,n,i)}p("carpet"),t.xaxis="x",t.yaxis="y";var d=p("a"),m=p("b"),g=Math.min(d.length,m.length);if(g){t._length=g,p("text"),p("texttemplate"),p("texttemplatefallback"),p("hovertext"),p("mode",g")}return o}function v(e,t){var r;r=e.labelprefix&&e.labelprefix.length>0?e.labelprefix.replace(/ = $/,""):e._hovertitle,g.push(r+": "+t.toFixed(3)+e.labelsuffix)}}}}),cT=m({"src/traces/scattercarpet/event_data.js"(e,t){t.exports=function(e,t,r,n,i){var a=n[i];return e.a=a.a,e.b=a.b,e.y=a.y,e}}}),uT=m({"src/traces/scattercarpet/index.js"(e,t){t.exports={attributes:rT(),supplyDefaults:nT(),colorbar:mi(),formatLabels:iT(),calc:oT(),plot:sT(),style:yi().style,styleOnSelect:yi().styleOnSelect,hoverPoints:lT(),selectPoints:_i(),eventData:cT(),moduleType:"trace",name:"scattercarpet",basePlotModule:Ci(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),hT=m({"lib/scattercarpet.js"(e,t){t.exports=uT()}}),fT=m({"src/traces/contourcarpet/attributes.js"(e,t){var r=wo(),n=cs(),i=zt(),a=B().extendFlat,o=n.contours;t.exports=a({carpet:{valType:"string",editType:"calc"},z:r.z,a:r.x,a0:r.x0,da:r.dx,b:r.y,b0:r.y0,db:r.dy,text:r.text,hovertext:r.hovertext,transpose:r.transpose,atype:r.xtype,btype:r.ytype,fillcolor:n.fillcolor,autocontour:n.autocontour,ncontours:n.ncontours,contours:{type:o.type,start:o.start,end:o.end,size:o.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:o.showlines,showlabels:o.showlabels,labelfont:o.labelfont,labelformat:o.labelformat,operation:o.operation,value:o.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:n.line.color,width:n.line.width,dash:n.line.dash,smoothing:n.line.smoothing,editType:"plot"},zorder:n.zorder},i("",{cLetter:"z",autoColorDflt:!1}))}}),pT=m({"src/traces/contourcarpet/defaults.js"(e,t){var r=ct(),n=To(),i=fT(),a=Ps(),o=hs(),s=ps();t.exports=function(e,t,l,c){function u(n,a){return r.coerce(e,t,i,n,a)}if(u("carpet"),e.a&&e.b){if(!n(e,t,u,c,"a","b"))return void(t.visible=!1);u("text"),"constraint"===u("contours.type")?a(e,t,u,c,l,{hasHover:!1}):(o(e,t,u,(function(n){return r.coerce2(e,t,i,n)})),s(e,t,u,c,{hasHover:!1}))}else t._defaultColor=l,t._length=null;u("zorder")}}}),dT=m({"src/traces/contourcarpet/calc.js"(e,t){var r=Zt(),n=ct(),i=zo(),a=Do(),o=Oo(),s=Ro(),l=Fo(),c=pT(),u=aT(),h=ms();t.exports=function(e,t){var f=t._carpetTrace=u(e,t);if(f&&f.visible&&"legendonly"!==f.visible){if(!t.a||!t.b){var p=e.data[f.index],d=e.data[t.index];d.a||(d.a=p.a),d.b||(d.b=p.b),c(d,t,t._defaultColor,e._fullLayout)}var m=function(e,t){var c,u,h,f,p,d,m,g=t._carpetTrace,y=g.aaxis,v=g.baxis;y._minDtick=0,v._minDtick=0,n.isArray1D(t.z)&&i(t,y,v,"a","b",["z"]),c=t._a=t._a||t.a,f=t._b=t._b||t.b,c=c?y.makeCalcdata(t,"_a"):[],f=f?v.makeCalcdata(t,"_b"):[],u=t.a0||0,h=t.da||1,p=t.b0||0,d=t.db||1,m=t._z=a(t._z||t.z,t.transpose),t._emptypoints=s(m),o(m,t._emptypoints);var x=n.maxRowLength(m),_="scaled"===t.xtype?"":c,b=l(t,_,u,h,x,y),w="scaled"===t.ytype?"":f,T={a:b,b:l(t,w,p,d,m.length,v),z:m};return"levels"===t.contours.type&&"none"!==t.contours.coloring&&r(e,t,{vals:m,containerStr:"",cLetter:"z"}),[T]}(e,t);return h(t,t._z),m}}}}),mT=m({"src/traces/carpet/axis_aligned_line.js"(e,t){var r=ct().isArrayOrTypedArray;t.exports=function(e,t,n,i){var a,o,s,l,c,u,h,f,p,d,m,g,y,v=r(n)?"a":"b",x=("a"===v?e.aaxis:e.baxis).smoothing,_="a"===v?e.a2i:e.b2j,b="a"===v?n:i,w="a"===v?i:n,T="a"===v?t.a.length:t.b.length,k="a"===v?t.b.length:t.a.length,A=Math.floor("a"===v?e.b2j(w):e.a2i(w)),M="a"===v?function(t){return e.evalxy([],t,A)}:function(t){return e.evalxy([],A,t)};x&&(s=Math.max(0,Math.min(k-2,A)),l=A-s,o="a"===v?function(t,r){return e.dxydi([],t,s,r,l)}:function(t,r){return e.dxydj([],s,t,l,r)});var S=_(b[0]),E=_(b[1]),C=S0?Math.floor:Math.ceil,P=C>0?Math.ceil:Math.floor,z=C>0?Math.min:Math.max,D=C>0?Math.max:Math.min,O=L(S+I),R=P(E-I),F=[[h=M(S)]];for(a=O;a*C=0;U--)B=M.clipsegments[U],j=n([],B.x,b.c2p),N=n([],B.y,w.c2p),j.reverse(),N.reverse(),V.push(i(j,N,B.bicubic));var q="M"+V.join("L")+"Z";(function(e,t,r,a,s,l){var c,u,h,f,p=o.ensureSingle(e,"g","contourbg").selectAll("path").data("fill"!==l||s?[]:[0]);p.enter().append("path"),p.exit().remove();var d=[];for(f=0;f=0&&(f=C,d=g):Math.abs(h[1]-f[1])=0&&(f=C,d=g):o.log("endpt to newendpt is not vert. or horz.",h,f,C)}if(d>=0)break;v+=S(h,f),h=f}if(d===t.edgepaths.length){o.log("unclosed perimeter path");break}u=d,(_=-1===x.indexOf(u))&&(u=x[0],v+=S(h,f)+"Z",h=null)}for(u=0;um&&(n.max=m),n.len=n.max-n.min}function x(e,t){var r,n=0,o=.1;return(Math.abs(e[0]-l)y):g=A>w,y=A;var M=c(w,T,k,A);M.pos=b,M.yc=(w+A)/2,M.i=_,M.dir=g?"increasing":"decreasing",M.x=M.pos,M.y=[k,T],v&&(M.orig_p=a[_]),d&&(M.tx=t.text[_]),m&&(M.htx=t.hovertext[_]),x.push(M)}else x.push({pos:b,empty:!0})}return t._extremes[l._id]=i.findExtremes(l,r.concat(f,h),{padded:!0}),x.length&&(x[0].t={labels:{open:n(e,"open:")+" ",high:n(e,"high:")+" ",low:n(e,"low:")+" ",close:n(e,"close:")+" "}}),x}t.exports={calc:function(e,t){var n=i.getFromId(e,t.xaxis),o=i.getFromId(e,t.yaxis),c=function(e,t,n){var i=n._minDiff;if(!i){var o,s=e._fullData,l=[];for(i=1/0,o=0;o"+u.labels[v]+r.hoverLabelText(s,x,l.yhoverformat):((y=n.extendFlat({},f)).y0=y.y1=_,y.yLabelVal=x,y.yLabel=u.labels[v]+r.hoverLabelText(s,x,l.yhoverformat),y.name="",h.push(y),m[x]=y)}return h}function h(e,t,n,i){var a=e.cd,s=e.ya,u=a[0].trace,h=a[0].t,f=c(e,t,n,i);if(!f)return[];var p=a[f.index],d=f.index=p.i,m=p.dir;function g(e){return h.labels[e]+r.hoverLabelText(s,u[e][d],u.yhoverformat)}var y=p.hi||u.hoverinfo||"",v=y.split("+"),x="all"===y,_=x||-1!==v.indexOf("y"),b=x||-1!==v.indexOf("text"),w=_?[g("open"),g("high"),g("low"),g("close")+" "+l[m]]:[];return b&&o(p,u,w),f.extraText=w.join("
"),f.y0=f.y1=s.c2p(p.yc,!0),[f]}t.exports={hoverPoints:function(e,t,r,n){return e.cd[0].trace.hoverlabel.split?u(e,t,r,n):h(e,t,r,n)},hoverSplit:u,hoverOnPoints:h}}}),MT=m({"src/traces/ohlc/select.js"(e,t){t.exports=function(e,t){var r,n=e.cd,i=e.xaxis,a=e.yaxis,o=[],s=n[0].t.bPos||0;if(!1===t)for(r=0;rn?function(e){return e<=0}:function(e){return e>=0};e.c2g=function(r){var n=e.c2l(r)-t;return(s(n)?n:0)+o},e.g2c=function(r){return e.l2c(r+t-o)},e.g2p=function(e){return e*a},e.c2p=function(t){return e.g2p(e.c2g(t))}}}(e,t);break;case"angularaxis":!function(e,t){var n=e.type;if("linear"===n){var o=e.d2c,s=e.c2d;e.d2c=function(e,t){return function(e,t){return"degrees"===t?i(e):e}(o(e),t)},e.c2d=function(e,t){return s(function(e,t){return"degrees"===t?a(e):e}(e,t))}}e.makeCalcdata=function(t,r){var n,i,a=t[r],o=t._length,s=function(r){return e.d2c(r,t.thetaunit)};if(a)for(n=new Array(o),i=0;i1e-10?e:0}function h(e,t,r){t=t||0,r=r||0;for(var n=e.length,i=new Array(n),a=0;a0?r:1/0})),a=r.mod(n+1,t.length);return[t[n],t[a]]},findIntersectionXY:l,findXYatLength:function(e,t,r,n){var i=-t*r,a=t*t+1,o=2*(t*i-r),s=i*i+r*r-e*e,l=Math.sqrt(o*o-4*a*s),c=(-o+l)/(2*a),u=(-o-l)/(2*a);return[[c,t*c+i+n],[u,t*u+i+n]]},clampTiny:u,pathPolygon:function(e,t,r,n,i,a){return"M"+h(c(e,t,r,n),i,a).join("L")},pathPolygonAnnulus:function(e,t,r,n,i,a,o){var s,l;e0?1:0}function n(e){var t=e[0],r=e[1];if(!isFinite(t)||!isFinite(r))return[1,0];var n=(t+1)*(t+1)+r*r;return[(t*t+r*r-1)/n,2*r/n]}function i(e,t){var r=t[0],n=t[1];return[r*e.radius+e.cx,-n*e.radius+e.cy]}function a(e,t){return t*e.radius}t.exports={smith:n,reactanceArc:function(e,t,r,o){var s=i(e,n([r,t])),l=s[0],c=s[1],u=i(e,n([o,t])),h=u[0],f=u[1];if(0===t)return["M"+l+","+c,"L"+h+","+f].join(" ");var p=a(e,1/Math.abs(t));return["M"+l+","+c,"A"+p+","+p+" 0 0,"+(t<0?1:0)+" "+h+","+f].join(" ")},resistanceArc:function(e,t,o,s){var l=a(e,1/(t+1)),c=i(e,n([t,o])),u=c[0],h=c[1],f=i(e,n([t,s])),p=f[0],d=f[1];if(r(o)!==r(s)){var m=i(e,n([t,0]));return["M"+u+","+h,"A"+l+","+l+" 0 0,"+(0=90||i>90&&a>=450?1:s<=0&&c<=0?0:Math.max(s,c),[i<=180&&a>=180||i>180&&a>=540?-1:o>=0&&l>=0?0:Math.min(o,l),i<=270&&a>=270||i>270&&a>=630?-1:s>=0&&c>=0?0:Math.min(s,c),a>=360?1:o<=0&&l<=0?0:Math.max(o,l),t]}(d),b=_[2]-_[0],w=_[3]-_[1],T=p/f,k=Math.abs(w/b);T>k?(m=f,x=(p-(g=f*k))/i.h/2,y=[u[0],u[1]],v=[h[0]+x,h[1]-x]):(g=p,x=(f-(m=p/k))/i.w/2,y=[u[0]+x,u[1]-x],v=[h[0],h[1]]),r.xLength2=m,r.yLength2=g,r.xDomain2=y,r.yDomain2=v;var A,M=r.xOffset2=i.l+i.w*y[0],S=r.yOffset2=i.t+i.h*(1-v[1]),E=r.radius=m/b,C=r.innerRadius=r.getHole(t)*E,I=r.cx=M-E*_[0],L=r.cy=S+E*_[3],P=r.cxx=I-M,z=r.cyy=L-S,D=a.side;"counterclockwise"===D?(A=D,D="top"):"clockwise"===D&&(A=D,D="bottom"),r.radialAxis=r.mockAxis(e,t,a,{_id:"x",side:D,_trueSide:A,domain:[C/i.w,E/i.w]}),r.angularAxis=r.mockAxis(e,t,o,{side:"right",domain:[0,Math.PI],autorange:!1}),r.doAutoRange(e,t),r.updateAngularAxis(e,t),r.updateRadialAxis(e,t),r.updateRadialAxisTitle(e,t),r.xaxis=r.mockCartesianAxis(e,t,{_id:"x",domain:y}),r.yaxis=r.mockCartesianAxis(e,t,{_id:"y",domain:v});var F=r.pathSubplot();r.clipPaths.forTraces.select("path").attr("d",F).attr("transform",s(P,z)),n.frontplot.attr("transform",s(M,S)).call(c.setClipUrl,r._hasClipOnAxisFalse?null:r.clipIds.forTraces,r.gd),n.bg.attr("d",F).attr("transform",s(I,L)).call(l.fill,t.bgcolor)},N.mockAxis=function(e,t,r,n){var i=a.extendFlat({},r,n);return p(i,t,e),i},N.mockCartesianAxis=function(e,t,r){var n=this,i=n.isSmith,o=r._id,s=a.extendFlat({type:"linear"},r);f(s,e);var l={x:[0,2],y:[1,3]};return s.setRange=function(){var e=n.sectorBBox,r=l[o],i=n.radialAxis._rl,a=(i[1]-i[0])/(1-n.getHole(t));s.range=[e[r[0]]*a,e[r[1]]*a]},s.isPtWithinRange="x"!==o||i?function(){return!0}:function(e){return n.isPtInside(e)},s.setRange(),s.setScale(),s},N.doAutoRange=function(e,t){var r=this,n=r.gd,i=r.radialAxis,a=r.getRadial(t);d(n,i);var o=i.range;if(a.range=o.slice(),a._input.range=o.slice(),i._rl=[i.r2l(o[0],null,"gregorian"),i.r2l(o[1],null,"gregorian")],void 0!==i.minallowed){var s=i.r2l(i.minallowed);i._rl[0]>i._rl[1]?i._rl[1]=Math.max(i._rl[1],s):i._rl[0]=Math.max(i._rl[0],s)}if(void 0!==i.maxallowed){var l=i.r2l(i.maxallowed);i._rl[0]90&&m<=270&&(g.tickangle=180);var x=v?function(e){var t=z(r,I([e.x,0]));return s(t[0]-f,t[1]-p)}:function(e){return s(g.l2p(e.x)+u,0)},_=v?function(e){return P(r,e.x,-1/0,1/0)}:function(e){return r.pathArc(g.r2p(e.x)+u)},b=U(d);if(r.radialTickLayout!==b&&(i["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=b),y){g.setScale();var w=0,T=v?(g.tickvals||[]).filter((function(e){return e>=0})).map((function(e){return h.tickText(g,e,!0,!1)})):h.calcTicks(g),k=v?T:h.clipEnds(g,T),A=h.getTickSigns(g)[2];v&&(("top"===g.ticks&&"bottom"===g.side||"bottom"===g.ticks&&"top"===g.side)&&(A=-A),"top"===g.ticks&&"top"===g.side&&(w=-g.ticklen),"bottom"===g.ticks&&"bottom"===g.side&&(w=g.ticklen)),h.drawTicks(n,g,{vals:T,layer:i["radial-axis"],path:h.makeTickPath(g,0,A),transFn:x,crisp:!1}),h.drawGrid(n,g,{vals:k,layer:i["radial-grid"],path:_,transFn:a.noop,crisp:!1}),h.drawLabels(n,g,{vals:T,layer:i["radial-axis"],transFn:x,labelFns:h.makeLabelFns(g,w)})}var M=r.radialAxisAngle=r.vangles?B(V(R(d.angle),r.vangles)):d.angle,S=s(f,p),E=S+o(-M);q(i["radial-axis"],y&&(d.showticklabels||d.ticks),{transform:E}),q(i["radial-grid"],y&&d.showgrid,{transform:v?"":S}),q(i["radial-line"].select("line"),y&&d.showline,{x1:v?-c:u,y1:0,x2:c,y2:0,transform:E}).attr("stroke-width",d.linewidth).call(l.stroke,d.linecolor)},N.updateRadialAxisTitle=function(e,t,r){if(!this.isSmith){var n=this,i=n.gd,a=n.radius,o=n.cx,s=n.cy,l=n.getRadial(t),u=n.id+"title",h=0;if(l.title){var f=c.bBox(n.layers["radial-axis"].node()).height,p=l.title.font.size,d=l.side;h="top"===d?p:"counterclockwise"===d?-(f+.4*p):f+.8*p}var m=void 0!==r?r:n.radialAxisAngle,g=R(m),y=Math.cos(g),x=Math.sin(g),_=o+a/2*y+h*x,b=s-a/2*x+h*y;n.layers["radial-axis-title"]=v.draw(i,u,{propContainer:l,propName:n.id+".radialaxis.title.text",placeholder:D(i,"Click to enter radial axis title"),attributes:{x:_,y:b,"text-anchor":"middle"},transform:{rotate:-m}})}},N.updateAngularAxis=function(e,t){var r=this,n=r.gd,i=r.layers,c=r.radius,u=r.innerRadius,f=r.cx,p=r.cy,d=r.getAngular(t),m=r.angularAxis,g=r.isSmith;g||(r.fillViewInitialKey("angularaxis.rotation",d.rotation),m.setGeometry(),m.setScale());var y=g?function(e){var t=z(r,I([0,e.x]));return Math.atan2(t[0]-f,t[1]-p)-Math.PI/2}:function(e){return m.t2g(e.x)};"linear"===m.type&&"radians"===m.thetaunit&&(m.tick0=B(m.tick0),m.dtick=B(m.dtick));var v=function(e){return s(f+c*Math.cos(e),p-c*Math.sin(e))},x=g?function(e){var t=z(r,I([0,e.x]));return s(t[0],t[1])}:function(e){return v(y(e))},_=g?function(e){var t=z(r,I([0,e.x])),n=Math.atan2(t[0]-f,t[1]-p)-Math.PI/2;return s(t[0],t[1])+o(-B(n))}:function(e){var t=y(e);return v(t)+o(-B(t))},b=g?function(e){return L(r,e.x,0,1/0)}:function(e){var t=y(e),r=Math.cos(t),n=Math.sin(t);return"M"+[f+u*r,p-u*n]+"L"+[f+c*r,p-c*n]},w=h.makeLabelFns(m,0).labelStandoff,T={xFn:function(e){var t=y(e);return Math.cos(t)*w},yFn:function(e){var t=y(e),r=Math.sin(t)>0?.2:1;return-Math.sin(t)*(w+e.fontSize*r)+Math.abs(Math.cos(t))*(e.fontSize*M)},anchorFn:function(e){var t=y(e),r=Math.cos(t);return Math.abs(r)<.1?"middle":r>0?"start":"end"},heightFn:function(e,t,r){var n=y(e);return-.5*(1+Math.sin(n))*r}},k=U(d);r.angularTickLayout!==k&&(i["angular-axis"].selectAll("."+m._id+"tick").remove(),r.angularTickLayout=k);var A,S=g?[1/0].concat(m.tickvals||[]).map((function(e){return h.tickText(m,e,!0,!1)})):h.calcTicks(m);if(g&&(S[0].text="∞",S[0].fontSize*=1.75),"linear"===t.gridshape?(A=S.map(y),a.angleDelta(A[0],A[1])<0&&(A=A.slice().reverse())):A=null,r.vangles=A,"category"===m.type&&(S=S.filter((function(e){return a.isAngleInsideSector(y(e),r.sectorInRad)}))),m.visible){var E="inside"===m.ticks?-1:1,C=(m.linewidth||1)/2;h.drawTicks(n,m,{vals:S,layer:i["angular-axis"],path:"M"+E*C+",0h"+E*m.ticklen,transFn:_,crisp:!1}),h.drawGrid(n,m,{vals:S,layer:i["angular-grid"],path:b,transFn:a.noop,crisp:!1}),h.drawLabels(n,m,{vals:S,layer:i["angular-axis"],repositionOnUpdate:!0,transFn:x,labelFns:T})}q(i["angular-line"].select("path"),d.showline,{d:r.pathSubplot(),transform:s(f,p)}).attr("stroke-width",d.linewidth).call(l.stroke,d.linecolor)},N.updateFx=function(e,t){this.gd._context.staticPlot||(!this.isSmith&&(this.updateAngularDrag(e),this.updateRadialDrag(e,t,0),this.updateRadialDrag(e,t,1)),this.updateHoverAndMainDrag(e))},N.updateHoverAndMainDrag=function(e){var t,o,l=this,c=l.isSmith,u=l.gd,h=l.layers,f=e._zoomlayer,p=S.MINZOOM,d=S.OFFEDGE,v=l.radius,b=l.innerRadius,T=l.cx,k=l.cy,A=l.cxx,M=l.cyy,C=l.sectorInRad,I=l.vangles,L=l.radialAxis,P=E.clampTiny,z=E.findXYatLength,D=E.findEnclosingVertexAngles,O=S.cornerHalfWidth,R=S.cornerLen/2,F=m.makeDragger(h,"path","maindrag",!1===e.dragmode?"none":"crosshair");r.select(F).attr("d",l.pathSubplot()).attr("transform",s(T,k)),F.onmousemove=function(e){y.hover(u,e,l.id),u._fullLayout._lasthover=F,u._fullLayout._hoversubplot=l.id},F.onmouseout=function(e){u._dragging||g.unhover(u,e)};var B,j,N,U,V,q,H,G,W,Z={element:F,gd:u,subplot:l.id,plotinfo:{id:l.id,xaxis:l.xaxis,yaxis:l.yaxis},xaxes:[l.xaxis],yaxes:[l.yaxis]};function Y(e,t){return Math.sqrt(e*e+t*t)}function X(e,t){return Y(e-A,t-M)}function $(e,t){return Math.atan2(M-t,e-A)}function K(e,t){return[e*Math.cos(t),e*Math.sin(-t)]}function J(e,t){if(0===e)return l.pathSector(2*O);var r=R/e,n=t-r,i=t+r,a=Math.max(0,Math.min(e,v)),o=a-O,s=a+O;return"M"+K(o,n)+"A"+[o,o]+" 0,0,0 "+K(o,i)+"L"+K(s,i)+"A"+[s,s]+" 0,0,1 "+K(s,n)+"Z"}function Q(e,t,r){if(0===e)return l.pathSector(2*O);var n,i,a=K(e,t),o=K(e,r),s=P((a[0]+o[0])/2),c=P((a[1]+o[1])/2);if(s&&c){var u=c/s,h=-1/u,f=z(O,u,s,c);n=z(R,h,f[0][0],f[0][1]),i=z(R,h,f[1][0],f[1][1])}else{var p,d;c?(p=R,d=O):(p=O,d=R),n=[[s-p,c-d],[s+p,c-d]],i=[[s-p,c+d],[s+p,c+d]]}return"M"+n.join("L")+"L"+i.reverse().join("L")+"Z"}function ee(e,t){return t=Math.max(Math.min(t,v),b),ep?(e-1&&1===e&&_(t,u,[l.xaxis],[l.yaxis],l.id,Z),r.indexOf("event")>-1&&y.click(u,t,l.id)}Z.prepFn=function(e,r,i){var s=u._fullLayout.dragmode,h=F.getBoundingClientRect();u._fullLayout._calcInverseTransform(u);var p=u._fullLayout._invTransform;t=u._fullLayout._invScaleX,o=u._fullLayout._invScaleY;var d=a.apply3DTransform(p)(r-h.left,i-h.top);if(B=d[0],j=d[1],I){var g=E.findPolygonOffset(v,C[0],C[1],I);B+=A+g[0],j+=M+g[1]}switch(s){case"zoom":Z.clickFn=se,c||(Z.moveFn=I?ie:re,Z.doneFn=ae,function(){N=null,U=null,V=l.pathSubplot(),q=!1;var e=u._fullLayout[l.id];H=n(e.bgcolor).getLuminance(),(G=m.makeZoombox(f,H,T,k,V)).attr("fill-rule","evenodd"),W=m.makeCorners(f,T,k),w(u)}());break;case"select":case"lasso":x(e,r,i,Z,s)}},g.init(Z)},N.updateRadialDrag=function(e,t,n){var l=this,c=l.gd,u=l.layers,h=l.radius,f=l.innerRadius,p=l.cx,d=l.cy,y=l.radialAxis,v=S.radialDragBoxSize,x=v/2;if(y.visible){var _,b,T,M=R(l.radialAxisAngle),E=y._rl,C=E[0],I=E[1],L=E[n],P=.75*(E[1]-E[0])/(1-l.getHole(t))/h;n?(_=p+(h+x)*Math.cos(M),b=d-(h+x)*Math.sin(M),T="radialdrag"):(_=p+(f-x)*Math.cos(M),b=d-(f-x)*Math.sin(M),T="radialdrag-inner");var z,D,O,F=m.makeRectDragger(u,T,"crosshair",-x,-x,v,v),j={element:F,gd:c};!1===e.dragmode&&(j.dragmode=!1),q(r.select(F),y.visible&&f0==(n?O>C:O")}}t.exports={hoverPoints:function(e,t,i,a){var o=r(e,t,i,a);if(o&&!1!==o[0].index){var s=o[0];if(void 0===s.index)return o;var l=e.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,n(c,u,l,s),s.hovertemplate=u.hovertemplate,o}},makeHoverPointText:n}}}),YT=m({"src/traces/scatterpolar/index.js"(e,t){t.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:UT(),categories:["polar","symbols","showLegend","scatter-like"],attributes:VT(),supplyDefaults:qT().supplyDefaults,colorbar:mi(),formatLabels:HT(),calc:GT(),plot:WT(),style:yi().style,styleOnSelect:yi().styleOnSelect,hoverPoints:ZT().hoverPoints,selectPoints:_i(),meta:{}}}}),XT=m({"lib/scatterpolar.js"(e,t){t.exports=YT()}}),$T=m({"src/traces/scatterpolargl/attributes.js"(e,t){var r=VT(),{cliponaxis:n,hoveron:i}=r,a=((e,t)=>{var r={};for(var n in e)l.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&o)for(var n of o(e))t.indexOf(n)<0&&u.call(e,n)&&(r[n]=e[n]);return r})(r,["cliponaxis","hoveron"]),{connectgaps:s,line:{color:c,dash:h,width:d},fill:m,fillcolor:g,marker:y,textfont:v,textposition:x}=$g();t.exports=p(f({},a),{connectgaps:s,fill:m,fillcolor:g,line:{color:c,dash:h,editType:"calc",width:d},marker:y,textfont:v,textposition:x})}}),KT=m({"src/traces/scatterpolargl/defaults.js"(e,t){var r=ct(),n=Xt(),i=qT().handleRThetaDefaults,a=Yn(),o=Xn(),s=Kn(),l=Jn(),c=wn().PTS_LINESONLY,u=$T();t.exports=function(e,t,h,f){function p(n,i){return r.coerce(e,t,u,n,i)}var d=i(e,t,f,p);d?(p("thetaunit"),p("mode",d=l&&(v.marker.cluster=d.tree),v.marker&&(v.markerSel.positions=v.markerUnsel.positions=v.marker.positions=b),v.line&&b.length>1&&s.extendFlat(v.line,o.linePositions(e,p,b)),v.text&&(s.extendFlat(v.text,{positions:b},o.textPosition(e,p,v.text,v.marker)),s.extendFlat(v.textSel,{positions:b},o.textPosition(e,p,v.text,v.markerSel)),s.extendFlat(v.textUnsel,{positions:b},o.textPosition(e,p,v.text,v.markerUnsel))),v.fill&&!f.fill2d&&(f.fill2d=!0),v.marker&&!f.scatter2d&&(f.scatter2d=!0),v.line&&!f.line2d&&(f.line2d=!0),v.text&&!f.glText&&(f.glText=!0),f.lineOptions.push(v.line),f.fillOptions.push(v.fill),f.markerOptions.push(v.marker),f.markerSelectedOptions.push(v.markerSel),f.markerUnselectedOptions.push(v.markerUnsel),f.textOptions.push(v.text),f.textSelectedOptions.push(v.textSel),f.textUnselectedOptions.push(v.textUnsel),f.selectBatch.push([]),f.unselectBatch.push([]),d.x=w,d.y=T,d.rawx=w,d.rawy=T,d.r=g,d.theta=y,d.positions=b,d._scene=f,d.index=f.count,f.count++}})),i(e,t,c)}},t.exports.reglPrecompiled={}}}),nk=m({"src/traces/scatterpolargl/index.js"(e,t){var r=tk();r.plot=rk(),t.exports=r}}),ik=m({"lib/scatterpolargl.js"(e,t){t.exports=nk()}}),ak=m({"src/traces/barpolar/attributes.js"(e,t){var r,{hovertemplateAttrs:n,templatefallbackAttrs:i}=Fe(),a=B().extendFlat,o=VT(),s=Wa();t.exports={r:o.r,theta:o.theta,r0:o.r0,dr:o.dr,theta0:o.theta0,dtheta:o.dtheta,thetaunit:o.thetaunit,base:a({},s.base,{}),offset:a({},s.offset,{}),width:a({},s.width,{}),text:a({},s.text,{}),hovertext:a({},s.hovertext,{}),marker:(r=a({},s.marker),delete r.cornerradius,r),hoverinfo:o.hoverinfo,hovertemplate:n(),hovertemplatefallback:i(),selected:s.selected,unselected:s.unselected}}}),ok=m({"src/traces/barpolar/layout_attributes.js"(e,t){t.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}}),sk=m({"src/traces/barpolar/defaults.js"(e,t){var r=ct(),n=qT().handleRThetaDefaults,i=Ya(),a=ak();t.exports=function(e,t,o,s){function l(n,i){return r.coerce(e,t,a,n,i)}n(e,t,s,l)?(l("thetaunit"),l("base"),l("offset"),l("width"),l("text"),l("hovertext"),l("hovertemplate"),l("hovertemplatefallback"),i(e,t,l,o,s),r.coerceSelectionMarkerOpacity(t,l)):t.visible=!1}}}),lk=m({"src/traces/barpolar/layout_defaults.js"(e,t){var r=ct(),n=ok();t.exports=function(e,t,i){var a,o={};function s(i,o){return r.coerce(e[a]||{},t[a],n,i,o)}for(var l=0;l0?(c=s,u=l):(c=l,u=s);var h=[o.findEnclosingVertexAngles(c,e.vangles)[0],(c+u)/2,o.findEnclosingVertexAngles(u,e.vangles)[1]];return o.pathPolygonAnnulus(n,a,c,u,h,t,r)}:function(e,n,a,o){return i.pathAnnulus(e,n,a,o,t,r)}}(t),d=t.layers.frontplot.select("g.barlayer");i.makeTraceGroups(d,s,"trace bars").each((function(){var o=r.select(this),s=i.ensureSingle(o,"g","points").selectAll("g.point").data(i.identity);s.enter().append("g").style("vector-effect",l?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),s.exit().remove(),s.each((function(e){var t,a=r.select(this),o=e.rp0=h.c2p(e.s0),s=e.rp1=h.c2p(e.s1),l=e.thetag0=f.c2g(e.p0),d=e.thetag1=f.c2g(e.p1);if(n(o)&&n(s)&&n(l)&&n(d)&&o!==s&&l!==d){var m=h.c2g(e.s1),g=(l+d)/2;e.ct=[c.c2p(m*Math.cos(g)),u.c2p(m*Math.sin(g))],t=p(o,s,l,d)}else t="M0,0Z";i.ensureSingle(a,"path").attr("d",t)})),a.setClipUrl(o,t._hasClipOnAxisFalse?t.clipIds.forTraces:null,e)}))}}}),hk=m({"src/traces/barpolar/hover.js"(e,t){var r=Or(),n=ct(),i=no().getTraceColor,a=n.fillText,o=ZT().makeHoverPointText,s=RT().isPtInsidePolygon;t.exports=function(e,t,l){var c=e.cd,u=c[0].trace,h=e.subplot,f=h.radialAxis,p=h.angularAxis,d=h.vangles,m=d?s:n.isPtInsideSector,g=e.maxHoverDistance,y=p._period||2*Math.PI,v=Math.abs(f.g2p(Math.sqrt(t*t+l*l))),x=Math.atan2(l,t);if(f.range[0]>f.range[1]&&(x+=Math.PI),r.getClosest(c,(function(e){return m(v,x,[e.rp0,e.rp1],[e.thetag0,e.thetag1],d)?g+Math.min(1,Math.abs(e.thetag1-e.thetag0)/y)-1+(e.rp1-v)/(e.rp1-e.rp0)-1:1/0}),e),!1!==e.index){var _=c[e.index];e.x0=e.x1=_.ct[0],e.y0=e.y1=_.ct[1];var b=n.extendFlat({},_,{r:_.s,theta:_.p});return a(_,u,e),o(b,u,h,e),e.hovertemplate=u.hovertemplate,e.color=i(u,_),e.xLabelVal=e.yLabelVal=void 0,_.s<0&&(e.idealAlign="left"),[e]}}}}),fk=m({"src/traces/barpolar/index.js"(e,t){t.exports={moduleType:"trace",name:"barpolar",basePlotModule:UT(),categories:["polar","bar","showLegend"],attributes:ak(),layoutAttributes:ok(),supplyDefaults:sk(),supplyLayoutDefaults:lk(),calc:ck().calc,crossTraceCalc:ck().crossTraceCalc,plot:uk(),colorbar:mi(),formatLabels:HT(),style:to().style,styleOnSelect:to().styleOnSelect,hoverPoints:hk(),selectPoints:ao(),meta:{}}}}),pk=m({"lib/barpolar.js"(e,t){t.exports=fk()}}),dk=m({"src/plots/smith/constants.js"(e,t){t.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),mk=m({"src/plots/smith/layout_attributes.js"(e,t){var r=G(),n=Lt(),i=Ma().attributes,a=ct().extendFlat,o=De().overrideAll,s=o({color:n.color,showline:a({},n.showline,{dflt:!0}),linecolor:n.linecolor,linewidth:n.linewidth,showgrid:a({},n.showgrid,{dflt:!0}),gridcolor:n.gridcolor,gridwidth:n.gridwidth,griddash:n.griddash},"plot","from-root"),l=o({ticklen:n.ticklen,tickwidth:a({},n.tickwidth,{dflt:2}),tickcolor:n.tickcolor,showticklabels:n.showticklabels,labelalias:n.labelalias,showtickprefix:n.showtickprefix,tickprefix:n.tickprefix,showticksuffix:n.showticksuffix,ticksuffix:n.ticksuffix,tickfont:n.tickfont,tickformat:n.tickformat,hoverformat:n.hoverformat,layer:n.layer},"plot","from-root"),c=a({visible:a({},n.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:a({},n.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},s,l),u=a({visible:a({},n.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:n.ticks,editType:"calc"},s,l);t.exports={domain:i({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:r.background},realaxis:c,imaginaryaxis:u,editType:"calc"}}}),gk=m({"src/plots/smith/layout_defaults.js"(e,t){var r,n,i,a=ct(),o=W(),s=vt(),l=Gs(),c=Tt().getSubplotData,u=Vt(),h=Ut(),f=ki(),p=rr(),d=mk(),m=dk(),g=m.axisNames,y=(r=function(e){return a.isTypedArray(e)&&(e=Array.from(e)),e.slice().reverse().map((function(e){return-e})).concat([0]).concat(e)},n=String,i={},function(e){var t=n?n(e):e;if(t in i)return i[t];var a=r(e);return i[t]=a,a});function v(e,t,r,n){var i=r("bgcolor");n.bgColor=o.combine(i,n.paper_bgcolor);var l,v=c(n.fullData,m.name,n.id),x=n.layoutOut;function _(e,t){return r(l+"."+e,t)}for(var b=0;b")}}t.exports={hoverPoints:function(e,t,i,a){var o=r(e,t,i,a);if(o&&!1!==o[0].index){var s=o[0];if(void 0===s.index)return o;var l=e.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,n(c,u,l,s),s.hovertemplate=u.hovertemplate,o}},makeHoverPointText:n}}}),kk=m({"src/traces/scattersmith/index.js"(e,t){t.exports={moduleType:"trace",name:"scattersmith",basePlotModule:yk(),categories:["smith","symbols","showLegend","scatter-like"],attributes:vk(),supplyDefaults:xk(),colorbar:mi(),formatLabels:_k(),calc:bk(),plot:wk(),style:yi().style,styleOnSelect:yi().styleOnSelect,hoverPoints:Tk().hoverPoints,selectPoints:_i(),meta:{}}}}),Ak=m({"lib/scattersmith.js"(e,t){t.exports=kk()}}),Mk=m({"node_modules/world-calendars/dist/main.js"(e,t){var r=My();function n(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}function i(e,t,r,n){if(this._calendar=e,this._year=t,this._month=r,this._day=n,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(l.local.invalidDate||l.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function a(e,t){return"000000".substring(0,t-(e=""+e).length)+e}function o(){this.shortYearCutoff="+10"}function s(e){this.local=this.regionalOptions[e]||this.regionalOptions[""]}r(n.prototype,{instance:function(e,t){e=(e||"gregorian").toLowerCase(),t=t||"";var r=this._localCals[e+"-"+t];if(!r&&this.calendars[e]&&(r=new this.calendars[e](t),this._localCals[e+"-"+t]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return r},newDate:function(e,t,r,n,i){return(n=(null!=e&&e.year?e.calendar():"string"==typeof n?this.instance(n,i):n)||this.instance()).newDate(e,t,r)},substituteDigits:function(e){return function(t){return(t+"").replace(/[0-9]/g,(function(t){return e[t]}))}},substituteChineseDigits:function(e,t){return function(r){for(var n="",i=0;r>0;){var a=r%10;n=(0===a?"":e[a]+t[i])+n,i++,r=Math.floor(r/10)}return 0===n.indexOf(e[1]+t[1])&&(n=n.substr(1)),n||e[0]}}}),r(i.prototype,{newDate:function(e,t,r){return this._calendar.newDate(e??this,t,r)},year:function(e){return 0===arguments.length?this._year:this.set(e,"y")},month:function(e){return 0===arguments.length?this._month:this.set(e,"m")},day:function(e){return 0===arguments.length?this._day:this.set(e,"d")},date:function(e,t,r){if(!this._calendar.isValid(e,t,r))throw(l.local.invalidDate||l.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=t,this._day=r,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(e,t){return this._calendar.add(this,e,t)},set:function(e,t){return this._calendar.set(this,e,t)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(l.local.differentCalendars||l.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var t=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return 0===t?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(e){return this._calendar.fromJD(e)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(e){return this._calendar.fromJSDate(e)},toString:function(){return(this.year()<0?"-":"")+a(Math.abs(this.year()),4)+"-"+a(this.month(),2)+"-"+a(this.day(),2)}}),r(o.prototype,{_validateLevel:0,newDate:function(e,t,r){return null==e?this.today():(e.year&&(this._validate(e,t,r,l.local.invalidDate||l.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new i(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){return this._validate(e,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+a(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,l.local.invalidMonth||l.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(e,t){var r=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,r,this.minDay,l.local.invalidMonth||l.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var n=this._validate(e,t,r,l.local.invalidDate||l.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,l.local.invalidDate||l.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,l.local.invalidDate||l.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,l.local.invalidDate||l.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,t,r),t,r)},_add:function(e,t,r){if(this._validateLevel++,"d"===r||"w"===r){var n=e.toJD()+t*("w"===r?this.daysInWeek():1),i=e.calendar().fromJD(n);return this._validateLevel--,[i.year(),i.month(),i.day()]}try{var a=e.year()+("y"===r?t:0),o=e.monthOfYear()+("m"===r?t:0);i=e.day(),"y"===r?(e.month()!==this.fromMonthOfYear(a,o)&&(o=this.newDate(a,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(a)),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o)))):"m"===r&&(function(e){for(;ot-1+e.minMonth;)a++,o-=t,t=e.monthsInYear(a)}(this),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o))));var s=[a,this.fromMonthOfYear(a,o),i];return this._validateLevel--,s}catch(e){throw this._validateLevel--,e}},_correctAdd:function(e,t,r,n){if(!(this.hasYearZero||"y"!==n&&"m"!==n||0!==t[0]&&e.year()>0==t[0]>0)){var i={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],a=r<0?-1:1;t=this._add(e,r*i[0]+a*i[1],i[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,r){this._validate(e,this.minMonth,this.minDay,l.local.invalidDate||l.regionalOptions[""].invalidDate);var n="y"===r?t:e.year(),i="m"===r?t:e.month(),a="d"===r?t:e.day();return("y"===r||"m"===r)&&(a=Math.min(a,this.daysInMonth(n,i))),e.date(n,i,a)},isValid:function(e,t,r){this._validateLevel++;var n=this.hasYearZero||0!==e;if(n){var i=this.newDate(e,t,this.minDay);n=t>=this.minMonth&&t-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),c=i-(l>2.5?4716:4715);return c<=0&&c--,this.newDate(c,l,s)},toJSDate:function(e,t,r){var n=this._validate(e,t,r,l.local.invalidDate||l.regionalOptions[""].invalidDate),i=new Date(n.year(),n.month()-1,n.day());return i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0),i.setHours(i.getHours()>12?i.getHours()+2:0),i},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var l=t.exports=new n;l.cdate=i,l.baseCalendar=o,l.calendars.gregorian=s}}),Sk=m({"node_modules/world-calendars/dist/plus.js"(){var e=My(),t=Mk();e(t.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),t.local=t.regionalOptions[""],e(t.cdate.prototype,{formatDate:function(e,t){return"string"!=typeof e&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}}),e(t.baseCalendar.prototype,{UNIX_EPOCH:t.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:t.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(e,r,n){if("string"!=typeof e&&(n=r,r=e,e=""),!r)return"";if(r.calendar()!==this)throw t.local.invalidFormat||t.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat;for(var i=(n=n||{}).dayNamesShort||this.local.dayNamesShort,a=n.dayNames||this.local.dayNames,o=n.monthNumbers||this.local.monthNumbers,s=n.monthNamesShort||this.local.monthNamesShort,l=n.monthNames||this.local.monthNames,c=(n.calculateWeek||this.local.calculateWeek,function(t,r){for(var n=1;v+n1}),u=function(e,t,r,n){var i=""+t;if(c(e,n))for(;i.length1},x=function(e,n){var i=v(e,n),a=[2,3,i?4:2,i?4:2,10,11,20]["oyYJ@!".indexOf(e)+1],o=new RegExp("^-?\\d{1,"+a+"}"),s=r.substring(A).match(o);if(!s)throw(t.local.missingNumberAt||t.regionalOptions[""].missingNumberAt).replace(/\{0\}/,A);return A+=s[0].length,parseInt(s[0],10)},_=this,b=function(){if("function"==typeof l){v("m");var e=l.call(_,r.substring(A));return A+=e.length,e}return x("m")},w=function(e,n,i,a){for(var o=v(e,a)?i:n,s=0;s-1){p=1,d=m;for(var E=this.daysInMonth(f,p);d>E;E=this.daysInMonth(f,p))p++,d-=E}return h>-1?this.fromJD(h):this.newDate(f,p,d)},determineDate:function(e,t,r,n,i){r&&"object"!=typeof r&&(i=n,n=r,r=null),"string"!=typeof n&&(i=n,n="");var a=this;return t=t?t.newDate():null,null==e?t:"string"==typeof e?function(e){try{return a.parseDate(n,e,i)}catch{}for(var t=((e=e.toLowerCase()).match(/^c/)&&r?r.newDate():null)||a.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,s=o.exec(e);s;)t.add(parseInt(s[1],10),s[2]||"d"),s=o.exec(e);return t}(e):"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?t:a.today().add(e,"d"):a.newDate(e)}})}}),Ek=m({"node_modules/world-calendars/dist/calendars/chinese.js"(){var e=Mk(),t=My(),r=e.instance();function n(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}n.prototype=new e.baseCalendar,t(n.prototype,{name:"Chinese",jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,t){if("string"==typeof e){var r=e.match(a);return r?r[0]:""}var n=this._validateYear(e),i=e.month(),o=""+this.toChineseMonth(n,i);return t&&o.length<2&&(o="0"+o),this.isIntercalaryMonth(n,i)&&(o+="i"),o},monthNames:function(e){if("string"==typeof e){var t=e.match(o);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),i=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(i="闰"+i),i},monthNamesShort:function(e){if("string"==typeof e){var t=e.match(s);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),i=["一","二","三","四","五","六","七","八","九","十","十一","十二"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(i="闰"+i),i},parseMonth:function(e,t){e=this._validateYear(e);var r,n=parseInt(t);if(isNaN(n))"闰"===t[0]&&(r=!0,t=t.substring(1)),"月"===t[t.length-1]&&(t=t.substring(0,t.length-1)),n=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(t);else{var i=t[t.length-1];r="i"===i||"I"===i}return this.toMonthIndex(e,n,r)},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(e,t){if(e.year&&(e=e.year()),"number"!=typeof e||e<1888||e>2111)throw t.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(t,r,n){var i=this.intercalaryMonth(t);if(n&&r!==i||r<1||r>12)throw e.local.invalidMonth.replace(/\{0\}/,this.local.name);return i?!n&&r<=i?r-1:r:r-1},toChineseMonth:function(t,r){t.year&&(r=(t=t.year()).month());var n=this.intercalaryMonth(t);if(r<0||r>(n?12:11))throw e.local.invalidMonth.replace(/\{0\}/,this.local.name);return n?r>13},isIntercalaryMonth:function(e,t){e.year&&(t=(e=e.year()).month());var r=this.intercalaryMonth(e);return!!r&&r===t},leapYear:function(e){return 0!==this.intercalaryMonth(e)},weekOfYear:function(t,n,i){var a,o=this._validateYear(t,e.local.invalidyear),s=c[o-c[0]],l=s>>9&4095,u=s>>5&15,h=31&s;(a=r.newDate(l,u,h)).add(4-(a.dayOfWeek()||7),"d");var f=this.toJD(t,n,i)-a.toJD();return 1+Math.floor(f/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(t,r){t.year&&(r=t.month(),t=t.year()),t=this._validateYear(t);var n=l[t-l[0]];if(r>(n>>13?12:11))throw e.local.invalidMonth.replace(/\{0\}/,this.local.name);return n&1<<12-r?30:29},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(t,n,i){var a=this._validate(t,s,i,e.local.invalidDate);t=this._validateYear(a.year()),n=a.month(),i=a.day();var o=this.isIntercalaryMonth(t,n),s=this.toChineseMonth(t,n),u=function(e,t,r,n){var i,a,o;if("object"==typeof e)a=e,i=t||{};else{var s;if(!("number"==typeof e&&e>=1888&&e<=2111))throw new Error("Lunar year outside range 1888-2111");if(!("number"==typeof t&&t>=1&&t<=12))throw new Error("Lunar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=30))throw new Error("Lunar day outside range 1 - 30");"object"==typeof n?(s=!1,i=n):(s=!!n,i={}),a={year:e,month:t,day:r,isIntercalary:s}}o=a.day-1;var u,h=l[a.year-l[0]],f=h>>13;u=f&&(a.month>f||a.isIntercalary)?a.month:a.month-1;for(var p=0;p>9&4095,(d>>5&15)-1,(31&d)+o);return i.year=m.getFullYear(),i.month=1+m.getMonth(),i.day=m.getDate(),i}(t,s,i,o);return r.toJD(u.year,u.month,u.day)},fromJD:function(e){var t=r.fromJD(e),n=function(e,t,r){var n,i;if("object"==typeof e)n=e,i=t||{};else{if(!("number"==typeof e&&e>=1888&&e<=2111))throw new Error("Solar year outside range 1888-2111");if(!("number"==typeof t&&t>=1&&t<=12))throw new Error("Solar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=31))throw new Error("Solar day outside range 1 - 31");n={year:e,month:t,day:r},i={}}var a=c[n.year-c[0]],o=n.year<<9|n.month<<5|n.day;i.year=o>=a?n.year:n.year-1,a=c[i.year-c[0]];var s,u=new Date(a>>9&4095,(a>>5&15)-1,31&a),h=new Date(n.year,n.month-1,n.day);s=Math.round((h-u)/864e5);var f,p=l[i.year-l[0]];for(f=0;f<13;f++){var d=p&1<<12-f?30:29;if(s>13;return!m||f=2&&n<=6},extraInfo:function(t,r,i){var a=this._validate(t,r,i,e.local.invalidDate);return{century:n[Math.floor((a.year()-1)/100)+1]||""}},toJD:function(t,r,n){var i=this._validate(t,r,n,e.local.invalidDate);return t=i.year()+(i.year()<0?1:0),r=i.month(),(n=i.day())+(r>1?16:0)+(r>2?32*(r-2):0)+400*(t-1)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var t=Math.floor(e/400)+1;e-=400*(t-1),e+=e>15?16:0;var r=Math.floor(e/32)+1,n=e-32*(r-1)+1;return this.newDate(t<=0?t-1:t,r,n)}});var n={20:"Fruitbat",21:"Anchovy"};e.calendars.discworld=r}}),Lk=m({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var e=Mk(),t=My();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Ethiopian",jdEpoch:1724220.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return(t=r.year()+(r.year()<0?1:0))%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear||e.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var n=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(13===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(t,r,n){var i=this._validate(t,r,n,e.local.invalidDate);return(t=i.year())<0&&t++,i.day()+30*(i.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,i=t-30*(n-1)+1;return this.newDate(r,n,i)}}),e.calendars.ethiopian=r}}),Pk=m({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var e=Mk(),t=My();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function n(e,t){return e-t*Math.floor(e/t)}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return this._leapYear(r.year())},_leapYear:function(e){return n(7*(e=e<0?e+1:e)+1,19)<7},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),this._leapYear(t.year?t.year():t)?13:12},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return t=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year(),this.toJD(-1===t?1:t+1,7,1)-this.toJD(t,7,1)},daysInMonth:function(t,r){return t.year&&(r=t.month(),t=t.year()),this._validate(t,r,this.minDay,e.local.invalidMonth),12===r&&this.leapYear(t)||8===r&&5===n(this.daysInYear(t),10)?30:9===r&&3===n(this.daysInYear(t),10)?29:this.daysPerMonth[r-1]},weekDay:function(e,t,r){return 6!==this.dayOfWeek(e,t,r)},extraInfo:function(t,r,n){var i=this._validate(t,r,n,e.local.invalidDate);return{yearType:(this.leapYear(i)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(i)%10-3]}},toJD:function(t,r,n){var i=this._validate(t,r,n,e.local.invalidDate);t=i.year(),r=i.month(),n=i.day();var a=t<=0?t+1:t,o=this.jdEpoch+this._delay1(a)+this._delay2(a)+n+1;if(r<7){for(var s=7;s<=this.monthsInYear(t);s++)o+=this.daysInMonth(t,s);for(s=1;s=this.toJD(-1===t?1:t+1,7,1);)t++;for(var r=ethis.toJD(t,r,this.daysInMonth(t,r));)r++;var n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}}),e.calendars.hebrew=r}}),zk=m({"node_modules/world-calendars/dist/calendars/islamic.js"(){var e=Mk(),t=My();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Islamic",jdEpoch:1948439.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-khamīs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(t){return(11*this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year()+14)%30<11},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(t,r){var n=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(12===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(t,r,n){var i=this._validate(t,r,n,e.local.invalidDate);return t=i.year(),r=i.month(),t=t<=0?t+1:t,(n=i.day())+Math.ceil(29.5*(r-1))+354*(t-1)+Math.floor((3+11*t)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=Math.floor((30*(e-this.jdEpoch)+10646)/10631);t=t<=0?t-1:t;var r=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}}),e.calendars.islamic=r}}),Dk=m({"node_modules/world-calendars/dist/calendars/julian.js"(){var e=Mk(),t=My();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Julian",jdEpoch:1721423.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return(t=r.year()<0?r.year()+1:r.year())%4==0},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var n=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(2===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(t,r,n){var i=this._validate(t,r,n,e.local.invalidDate);return t=i.year(),r=i.month(),n=i.day(),t<0&&t++,r<=2&&(t--,r+=12),Math.floor(365.25*(t+4716))+Math.floor(30.6001*(r+1))+n-1524.5},fromJD:function(e){var t=Math.floor(e+.5)+1524,r=Math.floor((t-122.1)/365.25),n=Math.floor(365.25*r),i=Math.floor((t-n)/30.6001),a=i-Math.floor(i<14?1:13),o=r-Math.floor(a>2?4716:4715),s=t-n-Math.floor(30.6001*i);return o<=0&&o--,this.newDate(o,a,s)}}),e.calendars.julian=r}}),Ok=m({"node_modules/world-calendars/dist/calendars/mayan.js"(){var e=Mk(),t=My();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function n(e,t){return e-t*Math.floor(e/t)}function i(e,t){return n(e-1,t)+1}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),!1},formatYear:function(t){t=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year();var r=Math.floor(t/400);return t%=400,t+=t<0?400:0,r+"."+Math.floor(t/20)+"."+t%20},forYear:function(e){if((e=e.split(".")).length<3)throw"Invalid Mayan year";for(var t=0,r=0;r19||r>0&&n<0)throw"Invalid Mayan year";t=20*t+n}return t},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),18},weekOfYear:function(t,r,n){return this._validate(t,r,n,e.local.invalidDate),0},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),360},daysInMonth:function(t,r){return this._validate(t,r,this.minDay,e.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(t,r,n){return this._validate(t,r,n,e.local.invalidDate).day()},weekDay:function(t,r,n){return this._validate(t,r,n,e.local.invalidDate),!0},extraInfo:function(t,r,n){var i=this._validate(t,r,n,e.local.invalidDate).toJD(),a=this._toHaab(i),o=this._toTzolkin(i);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(e){var t=n(8+(e-=this.jdEpoch)+340,365);return[Math.floor(t/20)+1,n(t,20)]},_toTzolkin:function(e){return[i(20+(e-=this.jdEpoch),20),i(e+4,13)]},toJD:function(t,r,n){var i=this._validate(t,r,n,e.local.invalidDate);return i.day()+20*i.month()+360*i.year()+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var t=Math.floor(e/360);e%=360,e+=e<0?360:0;var r=Math.floor(e/20),n=e%20;return this.newDate(t,r,n)}}),e.calendars.mayan=r}}),Rk=m({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var e=Mk(),t=My();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar;var n=e.instance("gregorian");t(r.prototype,{name:"Nanakshahi",jdEpoch:2257673.5,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear||e.regionalOptions[""].invalidYear);return n.leapYear(r.year()+(r.year()<1?1:0)+1469)},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var n=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(12===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(t,r,i){var a=this._validate(t,r,i,e.local.invalidMonth);(t=a.year())<0&&t++;for(var o=a.day(),s=1;s=this.toJD(t+1,1,1);)t++;for(var r=e-Math.floor(this.toJD(t,1,1)+.5)+1,n=1;r>this.daysInMonth(t,n);)r-=this.daysInMonth(t,n),n++;return this.newDate(t,n,r)}}),e.calendars.nanakshahi=r}}),Fk=m({"node_modules/world-calendars/dist/calendars/nepali.js"(){var e=Mk(),t=My();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Nepali",jdEpoch:1700709.5,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){if(t=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year(),typeof this.NEPALI_CALENDAR_DATA[t]>"u")return this.daysPerYear;for(var r=0,n=this.minMonth;n<=12;n++)r+=this.NEPALI_CALENDAR_DATA[t][n];return r},daysInMonth:function(t,r){return t.year&&(r=t.month(),t=t.year()),this._validate(t,r,this.minDay,e.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[t]>"u"?this.daysPerMonth[r-1]:this.NEPALI_CALENDAR_DATA[t][r]},weekDay:function(e,t,r){return 6!==this.dayOfWeek(e,t,r)},toJD:function(t,r,n){var i=this._validate(t,r,n,e.local.invalidDate);t=i.year(),r=i.month(),n=i.day();var a=e.instance(),o=0,s=r,l=t;this._createMissingCalendarData(t);var c=t-(s>9||9===s&&n>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(9!==r&&(o=n,s--);9!==s;)s<=0&&(s=12,l--),o+=this.NEPALI_CALENDAR_DATA[l][s],s--;return 9===r?(o+=n-this.NEPALI_CALENDAR_DATA[l][0])<0&&(o+=a.daysInYear(c)):o+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],a.newDate(c,1,1).add(o,"d").toJD()},fromJD:function(t){var r=e.instance().fromJD(t),n=r.year(),i=r.dayOfYear(),a=n+56;this._createMissingCalendarData(a);for(var o=9,s=this.NEPALI_CALENDAR_DATA[a][0],l=this.NEPALI_CALENDAR_DATA[a][o]-s+1;i>l;)++o>12&&(o=1,a++),l+=this.NEPALI_CALENDAR_DATA[a][o];var c=this.NEPALI_CALENDAR_DATA[a][o]-(l-i);return this.newDate(a,o,c)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var r=e-1;r"u"&&(this.NEPALI_CALENDAR_DATA[r]=t)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),e.calendars.nepali=r}}),Bk=m({"node_modules/world-calendars/dist/calendars/persian.js"(){var e=Mk(),t=My();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function n(e){var t=e-475;e<0&&t++;var r=.242197,n=r*t,i=r*(t+1);return n-Math.floor(n)>i-Math.floor(i)}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Persian",jdEpoch:1948320.5,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chahārshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(t){return n(this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year())},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-(n.dayOfWeek()+1)%7,"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var n=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(12===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(t,r,i){var a=this._validate(t,r,i,e.local.invalidDate);t=a.year(),r=a.month(),i=a.day();var o=0;if(t>0)for(var s=1;s0?t-1:t)+o+this.jdEpoch-1},fromJD:function(e){var t=475+((e=Math.floor(e)+.5)-this.toJD(475,1,1))/365.242197,r=Math.floor(t);r<=0&&r--,e>this.toJD(r,12,n(r)?30:29)&&0==++r&&r++;var i=e-this.toJD(r,1,1)+1,a=i<=186?Math.ceil(i/31):Math.ceil((i-6)/30),o=e-this.toJD(r,a,1)+1;return this.newDate(r,a,o)}}),e.calendars.persian=r,e.calendars.jalali=r}}),jk=m({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var e=Mk(),t=My(),r=e.instance();function n(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}n.prototype=new e.baseCalendar,t(n.prototype,{name:"Taiwan",jdEpoch:2419402.5,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(t){var n=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return t=this._t2gYear(n.year()),r.leapYear(t)},weekOfYear:function(t,n,i){var a=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return t=this._t2gYear(a.year()),r.weekOfYear(t,a.month(),a.day())},daysInMonth:function(t,r){var n=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(2===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(t,n,i){var a=this._validate(t,n,i,e.local.invalidDate);return t=this._t2gYear(a.year()),r.toJD(t,a.month(),a.day())},fromJD:function(e){var t=r.fromJD(e),n=this._g2tYear(t.year());return this.newDate(n,t.month(),t.day())},_t2gYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)},_g2tYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)}}),e.calendars.taiwan=n}}),Nk=m({"node_modules/world-calendars/dist/calendars/thai.js"(){var e=Mk(),t=My(),r=e.instance();function n(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}n.prototype=new e.baseCalendar,t(n.prototype,{name:"Thai",jdEpoch:1523098.5,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var n=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return t=this._t2gYear(n.year()),r.leapYear(t)},weekOfYear:function(t,n,i){var a=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return t=this._t2gYear(a.year()),r.weekOfYear(t,a.month(),a.day())},daysInMonth:function(t,r){var n=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(2===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(t,n,i){var a=this._validate(t,n,i,e.local.invalidDate);return t=this._t2gYear(a.year()),r.toJD(t,a.month(),a.day())},fromJD:function(e){var t=r.fromJD(e),n=this._g2tYear(t.year());return this.newDate(n,t.month(),t.day())},_t2gYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)},_g2tYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)}}),e.calendars.thai=n}}),Uk=m({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var e=Mk(),t=My();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thalāthā’","Yawm al-Arba‘ā’","Yawm al-Khamīs","Yawm al-Jum‘a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(t){var r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return 355===this.daysInYear(r.year())},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var t=0,r=1;r<=12;r++)t+=this.daysInMonth(e,r);return t},daysInMonth:function(t,r){for(var i=this._validate(t,r,this.minDay,e.local.invalidMonth).toJD()-24e5+.5,a=0,o=0;oi)return n[a]-n[a-1];a++}return 30},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(t,r,i){var a=this._validate(t,r,i,e.local.invalidDate),o=12*(a.year()-1)+a.month()-15292;return a.day()+n[o-1]-1+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,r=0,i=0;it);i++)r++;var a=r+15292,o=Math.floor((a-1)/12),s=o+1,l=a-12*o,c=t-n[r-1]+1;return this.newDate(s,l,c)},isValid:function(t,r,n){var i=e.baseCalendar.prototype.isValid.apply(this,arguments);return i&&(i=(t=null!=t.year?t.year:t)>=1276&&t<=1500),i},_validate:function(t,r,n,i){var a=e.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw i.replace(/\{0\}/,this.local.name);return a}}),e.calendars.ummalqura=r;var n=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]}}),Vk=m({"src/components/calendars/calendars.js"(e,t){t.exports=Mk(),Sk(),Ek(),Ck(),Ik(),Lk(),Pk(),zk(),Dk(),Ok(),Rk(),Fk(),Bk(),jk(),Nk(),Uk()}}),qk=m({"src/components/calendars/index.js"(e,t){var r=Vk(),n=ct(),i=S(),a=i.EPOCHJD,o=i.ONEDAY,s={valType:"enumerated",values:n.sortObjectKeys(r.calendars),editType:"calc",dflt:"gregorian"},l=function(e,t,r,i){var a={};return a[r]=s,n.coerce(e,t,a,r,i)},c="##",u={d:{0:"dd","-":"d"},e:{0:"d","-":"d"},a:{0:"D","-":"D"},A:{0:"DD","-":"DD"},j:{0:"oo","-":"o"},W:{0:"ww","-":"w"},m:{0:"mm","-":"m"},b:{0:"M","-":"M"},B:{0:"MM","-":"MM"},y:{0:"yy","-":"yy"},Y:{0:"yyyy","-":"yyyy"},U:c,w:c,c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}},h={};function f(e){var t=h[e];return t||(h[e]=r.instance(e))}function p(e){return n.extendFlat({},s,{description:e})}function d(e){return"Sets the calendar system to use with `"+e+"` date data."}var m={xcalendar:p(d("x"))},g=n.extendFlat({},m,{ycalendar:p(d("y"))}),y=n.extendFlat({},g,{zcalendar:p(d("z"))}),v=p(["Sets the calendar system to use for `range` and `tick0`","if this is a date axis. This does not set the calendar for","interpreting data on this axis, that's specified in the trace","or via the global `layout.calendar`"].join(" "));t.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:g,bar:g,box:g,heatmap:g,contour:g,histogram:g,histogram2d:g,histogram2dcontour:g,scatter3d:y,surface:y,mesh3d:y,scattergl:g,ohlc:m,candlestick:m},layout:{calendar:p(["Sets the default calendar system to use for interpreting and","displaying dates throughout the plot."].join(" "))},subplots:{xaxis:{calendar:v},yaxis:{calendar:v},scene:{xaxis:{calendar:v},yaxis:{calendar:v},zaxis:{calendar:v}},polar:{radialaxis:{calendar:v}}}},layoutAttributes:s,handleDefaults:l,handleTraceDefaults:function(e,t,r,n){for(var i=0;i{n.preventDefault(),n.stopPropagation(),n.clipboardData.setData("text",e),t.removeEventListener("copy",r,!0)};t.addEventListener("copy",r,!0),document.execCommand("copy")},(l=i||(i={})).boxSizing=function(e){let t=window.getComputedStyle(e),r=parseFloat(t.borderTopWidth)||0,n=parseFloat(t.borderLeftWidth)||0,i=parseFloat(t.borderRightWidth)||0,a=parseFloat(t.borderBottomWidth)||0,o=parseFloat(t.paddingTop)||0,s=parseFloat(t.paddingLeft)||0,l=parseFloat(t.paddingRight)||0,c=parseFloat(t.paddingBottom)||0;return{borderTop:r,borderLeft:n,borderRight:i,borderBottom:a,paddingTop:o,paddingLeft:s,paddingRight:l,paddingBottom:c,horizontalSum:n+s+l+i,verticalSum:r+o+c+a}},l.sizeLimits=function(e){let t=window.getComputedStyle(e),r=parseFloat(t.minWidth)||0,n=parseFloat(t.minHeight)||0,i=parseFloat(t.maxWidth)||1/0,a=parseFloat(t.maxHeight)||1/0;return i=Math.max(r,i),a=Math.max(n,a),{minWidth:r,minHeight:n,maxWidth:i,maxHeight:a}},l.hitTest=function(e,t,r){let n=e.getBoundingClientRect();return t>=n.left&&t=n.top&&r=r.bottom)){if(n.topr.bottom&&n.height>=r.height)return void(e.scrollTop-=r.top-n.top);if(n.topr.height)return void(e.scrollTop-=r.bottom-n.bottom);if(n.bottom>r.bottom&&n.height{let e=Element.prototype;return e.matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector||function(e){let t=this,r=t.ownerDocument?t.ownerDocument.querySelectorAll(e):[];return-1!==Array.prototype.indexOf.call(r,t)}})(),e.calculateSingle=function(e){let c=0,u=0,h=0;function f(t){let r=e.match(t);return null!==r&&(e=e.slice(r[0].length),!0)}for(e=(e=e.split(",",1)[0]).replace(l," $1 ");e.length>0;)if(f(t))c++;else if(f(r))u++;else if(f(n))u++;else if(f(a))h++;else if(f(o))u++;else if(f(i))h++;else if(!f(s))return 0;return c=Math.min(c,255),u=Math.min(u,255),h=Math.min(h,255),c<<16|u<<8|h};let t=/^#[^\s\+>~#\.\[:]+/,r=/^\.[^\s\+>~#\.\[:]+/,n=/^\[[^\]]+\]/,i=/^[^\s\+>~#\.\[:]+/,a=/^(::[^\s\+>~#\.\[:]+|:first-line|:first-letter|:before|:after)/,o=/^:[^\s\+>~#\.\[:]+/,s=/^[\s\+>~\*]+/,l=/:not\(([^\)]+)\)/g}(s||(s={}));var T,k=y(v()),A=class{constructor(){this._first=null,this._last=null,this._size=0}get isEmpty(){return 0===this._size}get size(){return this._size}get length(){return this._size}get first(){return this._first?this._first.value:void 0}get last(){return this._last?this._last.value:void 0}get firstNode(){return this._first}get lastNode(){return this._last}*[Symbol.iterator](){let e=this._first;for(;e;)yield e.value,e=e.next}*retro(){let e=this._last;for(;e;)yield e.value,e=e.prev}*nodes(){let e=this._first;for(;e;)yield e,e=e.next}*retroNodes(){let e=this._last;for(;e;)yield e,e=e.prev}assign(e){this.clear();for(let t of e)this.addLast(t)}push(e){this.addLast(e)}pop(){return this.removeLast()}shift(e){this.addFirst(e)}unshift(){return this.removeFirst()}addFirst(e){let t=new T.LinkedListNode(this,e);return this._first?(t.next=this._first,this._first.prev=t,this._first=t):(this._first=t,this._last=t),this._size++,t}addLast(e){let t=new T.LinkedListNode(this,e);return this._last?(t.prev=this._last,this._last.next=t,this._last=t):(this._first=t,this._last=t),this._size++,t}insertBefore(e,t){if(!t||t===this._first)return this.addFirst(e);if(!(t instanceof T.LinkedListNode)||t.list!==this)throw new Error("Reference node is not owned by the list.");let r=new T.LinkedListNode(this,e),n=t,i=n.prev;return r.next=n,r.prev=i,n.prev=r,i.next=r,this._size++,r}insertAfter(e,t){if(!t||t===this._last)return this.addLast(e);if(!(t instanceof T.LinkedListNode)||t.list!==this)throw new Error("Reference node is not owned by the list.");let r=new T.LinkedListNode(this,e),n=t,i=n.next;return r.next=i,r.prev=n,n.next=r,i.prev=r,this._size++,r}removeFirst(){let e=this._first;if(e)return e===this._last?(this._first=null,this._last=null):(this._first=e.next,this._first.prev=null),e.list=null,e.next=null,e.prev=null,this._size--,e.value}removeLast(){let e=this._last;if(e)return e===this._first?(this._first=null,this._last=null):(this._last=e.prev,this._last.next=null),e.list=null,e.next=null,e.prev=null,this._size--,e.value}removeNode(e){if(!(e instanceof T.LinkedListNode)||e.list!==this)throw new Error("Node is not owned by the list.");let t=e;t===this._first&&t===this._last?(this._first=null,this._last=null):t===this._first?(this._first=t.next,this._first.prev=null):t===this._last?(this._last=t.prev,this._last.next=null):(t.next.prev=t.prev,t.prev.next=t.next),t.list=null,t.next=null,t.prev=null,this._size--}clear(){let e=this._first;for(;e;){let t=e.next;e.list=null,e.prev=null,e.next=null,e=t}this._first=null,this._last=null,this._size=0}};!function(e){e.from=function(t){let r=new e;return r.assign(t),r}}(A||(A={})),function(e){e.LinkedListNode=class{constructor(e,t){this.list=null,this.next=null,this.prev=null,this.list=e,this.value=t}}}(T||(T={}));var M,S=class{constructor(e){this.type=e}get isConflatable(){return!1}conflate(e){return!1}},E=class extends S{get isConflatable(){return!0}conflate(e){return!0}};!function(e){let t=null,r=(n=Promise.resolve(),e=>{let t=!1;return n.then((()=>!t&&e())),()=>{t=!0}});var n;function i(e,t){let r=o.get(e);r&&0!==r.length?(0,k.every)((0,k.retro)(r),(r=>!r||function(e,t,r){let n=!0;try{n="function"==typeof e?e(t,r):e.messageHook(t,r)}catch(e){l(e)}return n}(r,e,t)))&&u(e,t):u(e,t)}e.sendMessage=i,e.postMessage=function(e,n){n.isConflatable&&(0,k.some)(a,(t=>!(t.handler!==e||!t.msg||t.msg.type!==n.type||!t.msg.isConflatable)&&t.msg.conflate(n)))||function(e,n){a.addLast({handler:e,msg:n}),null===t&&(t=r(h))}(e,n)},e.installMessageHook=function(e,t){let r=o.get(e);r&&-1!==r.indexOf(t)||(r?r.push(t):o.set(e,[t]))},e.removeMessageHook=function(e,t){let r=o.get(e);if(!r)return;let n=r.indexOf(t);-1!==n&&(r[n]=null,f(r))},e.clearData=function(e){let t=o.get(e);t&&t.length>0&&(k.ArrayExt.fill(t,null),f(t));for(let t of a)t.handler===e&&(t.handler=null,t.msg=null)},e.flush=function(){c||null===t||(t(),t=null,c=!0,h(),c=!1)},e.getExceptionHandler=function(){return l},e.setExceptionHandler=function(e){let t=l;return l=e,t};let a=new A,o=new WeakMap,s=new Set,l=e=>{console.error(e)},c=!1;function u(e,t){try{e.processMessage(t)}catch(e){l(e)}}function h(){if(t=null,a.isEmpty)return;let e={handler:null,msg:null};for(a.addLast(e);;){let t=a.removeFirst();if(t===e)return;t.handler&&t.msg&&i(t.handler,t.msg)}}function f(e){0===s.size&&r(p),s.add(e)}function p(){s.forEach(d),s.clear()}function d(e){k.ArrayExt.removeAllWhere(e,m)}function m(e){return null===e}}(M||(M={}));var C,I=class{constructor(e){this._pid=C.nextPID(),this.name=e.name,this._create=e.create,this._coerce=e.coerce||null,this._compare=e.compare||null,this._changed=e.changed||null}get(e){let t,r=C.ensureMap(e);return t=this._pid in r?r[this._pid]:r[this._pid]=this._createValue(e),t}set(e,t){let r,n=C.ensureMap(e);r=this._pid in n?n[this._pid]:n[this._pid]=this._createValue(e);let i=this._coerceValue(e,t);this._maybeNotify(e,r,n[this._pid]=i)}coerce(e){let t,r=C.ensureMap(e);t=this._pid in r?r[this._pid]:r[this._pid]=this._createValue(e);let n=this._coerceValue(e,t);this._maybeNotify(e,t,r[this._pid]=n)}_createValue(e){return(0,this._create)(e)}_coerceValue(e,t){let r=this._coerce;return r?r(e,t):t}_compareValue(e,t){let r=this._compare;return r?r(e,t):e===t}_maybeNotify(e,t,r){let n=this._changed;n&&!this._compareValue(t,r)&&n(e,t,r)}};!function(e){e.clearData=function(e){C.ownerData.delete(e)}}(I||(I={})),function(e){e.ownerData=new WeakMap,e.nextPID=(()=>{let e=0;return()=>`pid-${`${Math.random()}`.slice(2)}-${e++}`})(),e.ensureMap=function(t){let r=e.ownerData.get(t);return r||(r=Object.create(null),e.ownerData.set(t,r),r)}}(C||(C={}));var L,P=y(v()),z=(y(x()),class{constructor(e){this.sender=e}connect(e,t){return L.connect(this,e,t)}disconnect(e,t){return L.disconnect(this,e,t)}emit(e){L.emit(this,e)}});!function(e){e.disconnectBetween=function(e,t){L.disconnectBetween(e,t)},e.disconnectSender=function(e){L.disconnectSender(e)},e.disconnectReceiver=function(e){L.disconnectReceiver(e)},e.disconnectAll=function(e){L.disconnectAll(e)},e.clearData=function(e){L.disconnectAll(e)},e.getExceptionHandler=function(){return L.exceptionHandler},e.setExceptionHandler=function(e){let t=L.exceptionHandler;return L.exceptionHandler=e,t}}(z||(z={})),function(e){function t(e){let t=n.get(e);if(t&&0!==t.length){for(let e of t){if(!e.signal)continue;let t=e.thisArg||e.slot;e.signal=null,c(i.get(t))}c(t)}}function r(e){let t=i.get(e);if(t&&0!==t.length){for(let e of t){if(!e.signal)continue;let t=e.signal.sender;e.signal=null,c(n.get(t))}c(t)}}e.exceptionHandler=e=>{console.error(e)},e.connect=function(e,t,r){r=r||void 0;let a=n.get(e.sender);if(a||(a=[],n.set(e.sender,a)),s(a,e,t,r))return!1;let o=r||t,l=i.get(o);l||(l=[],i.set(o,l));let c={signal:e,slot:t,thisArg:r};return a.push(c),l.push(c),!0},e.disconnect=function(e,t,r){r=r||void 0;let a=n.get(e.sender);if(!a||0===a.length)return!1;let o=s(a,e,t,r);if(!o)return!1;let l=r||t,u=i.get(l);return o.signal=null,c(a),c(u),!0},e.disconnectBetween=function(e,t){let r=n.get(e);if(!r||0===r.length)return;let a=i.get(t);if(a&&0!==a.length){for(let t of a)t.signal&&t.signal.sender===e&&(t.signal=null);c(r),c(a)}},e.disconnectSender=t,e.disconnectReceiver=r,e.disconnectAll=function(e){t(e),r(e)},e.emit=function(e,t){let r=n.get(e.sender);if(r&&0!==r.length)for(let n=0,i=r.length;ne.signal===t&&e.slot===r&&e.thisArg===n))}function l(t,r){let{signal:n,slot:i,thisArg:a}=t;try{i.call(a,n.sender,r)}catch(t){e.exceptionHandler(t)}}function c(e){0===a.size&&o(u),a.add(e)}function u(){a.forEach(h),a.clear()}function h(e){P.ArrayExt.removeAllWhere(e,f)}function f(e){return null===e.signal}}(L||(L={}));var D=class{constructor(e){this._fn=e}get isDisposed(){return!this._fn}dispose(){if(!this._fn)return;let e=this._fn;this._fn=null,e()}},O=class{constructor(){this._isDisposed=!1,this._items=new Set}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed||(this._isDisposed=!0,this._items.forEach((e=>{e.dispose()})),this._items.clear())}contains(e){return this._items.has(e)}add(e){this._items.add(e)}remove(e){this._items.delete(e)}clear(){this._items.clear()}};!function(e){e.from=function(t){let r=new e;for(let e of t)r.add(e);return r}}(O||(O={}));var R=class extends O{constructor(){super(...arguments),this._disposed=new z(this)}get disposed(){return this._disposed}dispose(){this.isDisposed||(super.dispose(),this._disposed.emit(void 0),z.clearData(this))}};!function(e){e.from=function(t){let r=new e;for(let e of t)r.add(e);return r}}(R||(R={}));var F,B=class e{constructor(e){this._onScrollFrame=()=>{if(!this._scrollTarget)return;let{element:e,edge:t,distance:r}=this._scrollTarget,n=F.SCROLL_EDGE_SIZE-r,i=Math.pow(n/F.SCROLL_EDGE_SIZE,2),a=Math.max(1,Math.round(i*F.SCROLL_EDGE_SIZE));switch(t){case"top":e.scrollTop-=a;break;case"left":e.scrollLeft-=a;break;case"right":e.scrollLeft+=a;break;case"bottom":e.scrollTop+=a}requestAnimationFrame(this._onScrollFrame)},this._disposed=!1,this._dropAction="none",this._override=null,this._currentTarget=null,this._currentElement=null,this._promise=null,this._scrollTarget=null,this._resolve=null,this.document=e.document||document,this.mimeData=e.mimeData,this.dragImage=e.dragImage||null,this.proposedAction=e.proposedAction||"copy",this.supportedActions=e.supportedActions||"all",this.source=e.source||null}dispose(){if(!this._disposed){if(this._disposed=!0,this._currentTarget){let e=new PointerEvent("pointerup",{bubbles:!0,cancelable:!0,clientX:-1,clientY:-1});F.dispatchDragLeave(this,this._currentTarget,null,e)}this._finalize("none")}}get isDisposed(){return this._disposed}start(e,t){if(this._disposed)return Promise.resolve("none");if(this._promise)return this._promise;this._addListeners(),this._attachDragImage(e,t),this._promise=new Promise((e=>{this._resolve=e}));let r=new PointerEvent("pointermove",{bubbles:!0,cancelable:!0,clientX:e,clientY:t});return document.dispatchEvent(r),this._promise}handleEvent(e){switch(e.type){case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"keydown":this._evtKeyDown(e);break;default:e.preventDefault(),e.stopPropagation()}}moveDragImage(e,t){this.dragImage&&(this.dragImage.style.transform=`translate(${e}px, ${t}px)`)}_evtPointerMove(e){e.preventDefault(),e.stopPropagation(),this._updateCurrentTarget(e),this._updateDragScroll(e),this.moveDragImage(e.clientX,e.clientY)}_evtPointerUp(e){if(e.preventDefault(),e.stopPropagation(),0!==e.button)return;if(this._updateCurrentTarget(e),!this._currentTarget)return void this._finalize("none");if("none"===this._dropAction)return F.dispatchDragLeave(this,this._currentTarget,null,e),void this._finalize("none");let t=F.dispatchDrop(this,this._currentTarget,e);this._finalize(t)}_evtKeyDown(e){e.preventDefault(),e.stopPropagation(),27===e.keyCode&&this.dispose()}_addListeners(){document.addEventListener("pointerdown",this,!0),document.addEventListener("pointermove",this,!0),document.addEventListener("pointerup",this,!0),document.addEventListener("pointerenter",this,!0),document.addEventListener("pointerleave",this,!0),document.addEventListener("pointerover",this,!0),document.addEventListener("pointerout",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("keyup",this,!0),document.addEventListener("keypress",this,!0),document.addEventListener("contextmenu",this,!0)}_removeListeners(){document.removeEventListener("pointerdown",this,!0),document.removeEventListener("pointermove",this,!0),document.removeEventListener("pointerup",this,!0),document.removeEventListener("pointerenter",this,!0),document.removeEventListener("pointerleave",this,!0),document.removeEventListener("pointerover",this,!0),document.removeEventListener("pointerout",this,!0),document.removeEventListener("keydown",this,!0),document.removeEventListener("keyup",this,!0),document.removeEventListener("keypress",this,!0),document.removeEventListener("contextmenu",this,!0)}_updateDragScroll(e){let t=F.findScrollTarget(e);!this._scrollTarget&&!t||(this._scrollTarget||setTimeout(this._onScrollFrame,500),this._scrollTarget=t)}_updateCurrentTarget(e){let t=this._currentTarget,r=this._currentTarget,n=this._currentElement,i=F.findElementBehindBackdrop(e,this.document);this._currentElement=i,i!==n&&i!==r&&F.dispatchDragExit(this,r,i,e),i!==n&&i!==r&&(r=F.dispatchDragEnter(this,i,r,e)),r!==t&&(this._currentTarget=r,F.dispatchDragLeave(this,t,r,e));let a=F.dispatchDragOver(this,r,e);this._setDropAction(a)}_attachDragImage(e,t){if(!this.dragImage)return;this.dragImage.classList.add("lm-mod-drag-image");let r=this.dragImage.style;r.pointerEvents="none",r.position="fixed",r.transform=`translate(${e}px, ${t}px)`,(this.document instanceof Document?this.document.body:this.document.firstElementChild).appendChild(this.dragImage)}_detachDragImage(){if(!this.dragImage)return;let e=this.dragImage.parentNode;e&&e.removeChild(this.dragImage)}_setDropAction(t){if(t=F.validateAction(t,this.supportedActions),!this._override||this._dropAction!==t)switch(t){case"none":this._dropAction=t,this._override=e.overrideCursor("no-drop",this.document);break;case"copy":this._dropAction=t,this._override=e.overrideCursor("copy",this.document);break;case"link":this._dropAction=t,this._override=e.overrideCursor("alias",this.document);break;case"move":this._dropAction=t,this._override=e.overrideCursor("move",this.document)}}_finalize(e){let t=this._resolve;this._removeListeners(),this._detachDragImage(),this._override&&(this._override.dispose(),this._override=null),this.mimeData.clear(),this._disposed=!0,this._dropAction="none",this._currentTarget=null,this._currentElement=null,this._scrollTarget=null,this._promise=null,this._resolve=null,t&&t(e)}};!function(e){class t extends DragEvent{constructor(e,t){super(t.type,{bubbles:!0,cancelable:!0,altKey:e.altKey,button:e.button,clientX:e.clientX,clientY:e.clientY,ctrlKey:e.ctrlKey,detail:0,metaKey:e.metaKey,relatedTarget:t.related,screenX:e.screenX,screenY:e.screenY,shiftKey:e.shiftKey,view:window});let{drag:r}=t;this.dropAction="none",this.mimeData=r.mimeData,this.proposedAction=r.proposedAction,this.supportedActions=r.supportedActions,this.source=r.source}}e.Event=t,e.overrideCursor=function(e,t=document){return F.overrideCursor(e,t)}}(B||(B={})),function(e){function t(t,i=document){if(t){if(r&&t==r.event)return r.element;e.cursorBackdrop.style.zIndex="-1000";let n=i.elementFromPoint(t.clientX,t.clientY);return e.cursorBackdrop.style.zIndex="",r={event:t,element:n},n}{let t=e.cursorBackdrop.style.transform;if(n&&t===n.transform)return n.element;let r=e.cursorBackdrop.getBoundingClientRect();e.cursorBackdrop.style.zIndex="-1000";let a=i.elementFromPoint(r.left+r.width/2,r.top+r.height/2);return e.cursorBackdrop.style.zIndex="",n={transform:t,element:a},a}}e.SCROLL_EDGE_SIZE=20,e.validateAction=function(e,t){return i[e]&a[t]?e:"none"},e.findElementBehindBackdrop=t;let r=null,n=null;e.findScrollTarget=function(r){let n=r.clientX,i=r.clientY,a=t(r);for(;a;a=a.parentElement){if(!a.hasAttribute("data-lm-dragscroll"))continue;let t=0,r=0;a===document.body&&(t=window.pageXOffset,r=window.pageYOffset);let o=a.getBoundingClientRect(),s=o.top+r,l=o.left+t,c=l+o.width,u=s+o.height;if(n=c||i=u)continue;let h,f=n-l+1,p=i-s+1,d=c-n,m=u-i,g=Math.min(f,p,d,m);if(g>e.SCROLL_EDGE_SIZE)continue;switch(g){case m:h="bottom";break;case p:h="top";break;case d:h="right";break;case f:h="left";break;default:throw"unreachable"}let y,v=a.scrollWidth-a.clientWidth,x=a.scrollHeight-a.clientHeight;switch(h){case"top":y=x>0&&a.scrollTop>0;break;case"left":y=v>0&&a.scrollLeft>0;break;case"right":y=v>0&&a.scrollLeft0&&a.scrollTop{n===u&&e.cursorBackdrop.isConnected&&(document.removeEventListener("pointermove",o,!0),e.cursorBackdrop.removeEventListener("scroll",s,!0),i.removeChild(e.cursorBackdrop))}))};let c=500,u=0;e.cursorBackdrop=function(){let e=document.createElement("div");return e.classList.add("lm-cursor-backdrop"),e}()}(F||(F={}));var j=y(v()),N=y(x());function U(){return q.keyboardLayout}var V=class e{constructor(t,r,n=[]){this.name=t,this._codes=r,this._keys=e.extractKeys(r),this._modifierKeys=e.convertToKeySet(n)}keys(){return Object.keys(this._keys)}isValidKey(e){return e in this._keys}isModifierKey(e){return e in this._modifierKeys}keyForKeydownEvent(e){return this._codes[e.keyCode]||""}};!function(e){e.extractKeys=function(e){let t=Object.create(null);for(let r in e)t[e[r]]=!0;return t},e.convertToKeySet=function(e){let t=Object(null);for(let r=0,n=e.length;r{this._commands.delete(e),this._commandChanged.emit({id:e,type:"removed"})}))}notifyCommandChanged(e){if(void 0!==e&&!this._commands.has(e))throw new Error(`Command '${e}' is not registered.`);this._commandChanged.emit({id:e,type:e?"changed":"many-changed"})}describedBy(e,t=N.JSONExt.emptyObject){var r;let n=this._commands.get(e);return Promise.resolve(null!==(r=n?.describedBy.call(void 0,t))&&void 0!==r?r:{args:null})}label(e,t=N.JSONExt.emptyObject){var r;let n=this._commands.get(e);return null!==(r=n?.label.call(void 0,t))&&void 0!==r?r:""}mnemonic(e,t=N.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.mnemonic.call(void 0,t):-1}icon(e,t=N.JSONExt.emptyObject){var r;return null===(r=this._commands.get(e))||void 0===r?void 0:r.icon.call(void 0,t)}iconClass(e,t=N.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.iconClass.call(void 0,t):""}iconLabel(e,t=N.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.iconLabel.call(void 0,t):""}caption(e,t=N.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.caption.call(void 0,t):""}usage(e,t=N.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.usage.call(void 0,t):""}className(e,t=N.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.className.call(void 0,t):""}dataset(e,t=N.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.dataset.call(void 0,t):{}}isEnabled(e,t=N.JSONExt.emptyObject){let r=this._commands.get(e);return!!r&&r.isEnabled.call(void 0,t)}isToggled(e,t=N.JSONExt.emptyObject){let r=this._commands.get(e);return!!r&&r.isToggled.call(void 0,t)}isToggleable(e,t=N.JSONExt.emptyObject){let r=this._commands.get(e);return!!r&&r.isToggleable}isVisible(e,t=N.JSONExt.emptyObject){let r=this._commands.get(e);return!!r&&r.isVisible.call(void 0,t)}execute(e,t=N.JSONExt.emptyObject){let r,n=this._commands.get(e);if(!n)return Promise.reject(new Error(`Command '${e}' not registered.`));try{r=n.execute.call(void 0,t)}catch(e){r=Promise.reject(e)}let i=Promise.resolve(r);return this._commandExecuted.emit({id:e,args:t,result:i}),i}addKeyBinding(e){let t=G.createKeyBinding(e);return this._keyBindings.push(t),this._keyBindingChanged.emit({binding:t,type:"added"}),new D((()=>{j.ArrayExt.removeFirstOf(this._keyBindings,t),this._keyBindingChanged.emit({binding:t,type:"removed"})}))}processKeydownEvent(t){if(t.defaultPrevented||this._replaying)return;let r=e.keystrokeForKeydownEvent(t);if(!r)return this._replayKeydownEvents(),void this._clearPendingState();if(e.isModifierKeyPressed(t)){let{exact:e}=G.matchKeyBinding(this._keyBindings,[r],t);return void(e?(t.preventDefault(),t.stopPropagation(),this._startModifierTimer(e)):this._clearModifierTimer())}this._keystrokes.push(r);let{exact:n,partial:i}=G.matchKeyBinding(this._keyBindings,this._keystrokes,t),a=0!==i.length;return n||a?((n?.preventDefault||i.some((e=>e.preventDefault)))&&(t.preventDefault(),t.stopPropagation()),this._keydownEvents.push(t),n&&!a?(this._executeKeyBinding(n),void this._clearPendingState()):(n&&(this._exactKeyMatch=n),void this._startTimer())):(this._replayKeydownEvents(),void this._clearPendingState())}holdKeyBindingExecution(e,t){this._holdKeyBindingPromises.set(e,t)}processKeyupEvent(e){this._clearModifierTimer()}_startModifierTimer(e){this._clearModifierTimer(),this._timerModifierID=window.setTimeout((()=>{this._executeKeyBinding(e)}),G.modifierkeyTimeOut)}_clearModifierTimer(){0!==this._timerModifierID&&(clearTimeout(this._timerModifierID),this._timerModifierID=0)}_startTimer(){this._clearTimer(),this._timerID=window.setTimeout((()=>{this._onPendingTimeout()}),G.CHORD_TIMEOUT)}_clearTimer(){0!==this._timerID&&(clearTimeout(this._timerID),this._timerID=0)}_replayKeydownEvents(){0!==this._keydownEvents.length&&(this._replaying=!0,this._keydownEvents.forEach(G.replayKeyEvent),this._replaying=!1)}async _executeKeyBinding(e){if(0!==this._holdKeyBindingPromises.size){let e=[...this._keydownEvents],t=(await Promise.race([Promise.all(e.map((async e=>{var t;return null!==(t=this._holdKeyBindingPromises.get(e))&&void 0!==t?t:Promise.resolve(!0)}))),new Promise((e=>{setTimeout((()=>e([!1])),G.KEYBINDING_HOLD_TIMEOUT)}))])).every(Boolean);if(this._holdKeyBindingPromises.clear(),!t)return}let{command:t,args:r}=e,n={_luminoEvent:{type:"keybinding",keys:e.keys},...r};if(this.hasCommand(t)&&this.isEnabled(t,n))await this.execute(t,n);else{let r=this.hasCommand(t)?"enabled":"registered",n=`Cannot execute key binding '${e.keys.join(", ")}':`,i=`command '${t}' is not ${r}.`;console.warn(`${n} ${i}`)}}_clearPendingState(){this._clearTimer(),this._clearModifierTimer(),this._exactKeyMatch=null,this._keystrokes.length=0,this._keydownEvents.length=0}_onPendingTimeout(){this._timerID=0,this._exactKeyMatch?this._executeKeyBinding(this._exactKeyMatch):this._replayKeydownEvents(),this._clearPendingState()}};!function(e){function t(e){let t="",r=!1,n=!1,i=!1,o=!1;for(let s of e.split(/\s+/))"Accel"===s?a.IS_MAC?n=!0:i=!0:"Alt"===s?r=!0:"Cmd"===s?n=!0:"Ctrl"===s?i=!0:"Shift"===s?o=!0:s.length>0&&(t=s);return{cmd:n,ctrl:i,alt:r,shift:o,key:t}}function r(e){let r="",n=t(e);return n.ctrl&&(r+="Ctrl "),n.alt&&(r+="Alt "),n.shift&&(r+="Shift "),n.cmd&&a.IS_MAC&&(r+="Cmd "),n.key?r+n.key:r.trim()}e.parseKeystroke=t,e.normalizeKeystroke=r,e.normalizeKeys=function(e){let t;return t=a.IS_WIN?e.winKeys||e.keys:a.IS_MAC?e.macKeys||e.keys:e.linuxKeys||e.keys,t.map(r)},e.formatKeystroke=function(e){return"string"==typeof e?r(e):e.map(r).join(", ");function r(e){let r=[],n=a.IS_MAC?" ":"+",i=t(e);return i.ctrl&&r.push("Ctrl"),i.alt&&r.push("Alt"),i.shift&&r.push("Shift"),a.IS_MAC&&i.cmd&&r.push("Cmd"),r.push(i.key),r.map(G.formatKey).join(n)}},e.isModifierKeyPressed=function(e){let t=U(),r=t.keyForKeydownEvent(e);return t.isModifierKey(r)},e.keystrokeForKeydownEvent=function(e){let t=U(),r=t.keyForKeydownEvent(e),n=[];return e.ctrlKey&&n.push("Ctrl"),e.altKey&&n.push("Alt"),e.shiftKey&&n.push("Shift"),e.metaKey&&a.IS_MAC&&n.push("Cmd"),t.isModifierKey(r)||n.push(r),n.join(" ")}}(W||(W={})),function(e){e.CHORD_TIMEOUT=1e3,e.KEYBINDING_HOLD_TIMEOUT=1e3,e.modifierkeyTimeOut=500,e.createCommand=function(e){return{execute:e.execute,describedBy:h("function"==typeof e.describedBy?e.describedBy:{args:null,...e.describedBy},(()=>({args:null}))),label:h(e.label,n),mnemonic:h(e.mnemonic,i),icon:h(e.icon,u),iconClass:h(e.iconClass,n),iconLabel:h(e.iconLabel,n),caption:h(e.caption,n),usage:h(e.usage,n),className:h(e.className,n),dataset:h(e.dataset,c),isEnabled:e.isEnabled||s,isToggled:e.isToggled||l,isToggleable:e.isToggleable||!!e.isToggled,isVisible:e.isVisible||s}},e.createKeyBinding=function(e){var t;return{keys:W.normalizeKeys(e),selector:f(e),command:e.command,args:e.args||N.JSONExt.emptyObject,preventDefault:null===(t=e.preventDefault)||void 0===t||t}},e.matchKeyBinding=function(e,t,r){let n=null,i=[],a=1/0,s=0;for(let l=0,c=e.length;la)continue;let f=o.calculateSpecificity(c.selector);(!n||h=s)&&(n=c,a=h,s=f)}return{exact:n,partial:i}},e.replayKeyEvent=function(e){e.target.dispatchEvent(function(e){let t=document.createEvent("Event"),r=e.bubbles||!0,n=e.cancelable||!0;return t.initEvent(e.type||"keydown",r,n),t.key=e.key||"",t.keyCode=e.keyCode||0,t.which=e.keyCode||0,t.ctrlKey=e.ctrlKey||!1,t.altKey=e.altKey||!1,t.shiftKey=e.shiftKey||!1,t.metaKey=e.metaKey||!1,t.view=e.view||window,t}(e))},e.formatKey=function(e){return a.IS_MAC?t.hasOwnProperty(e)?t[e]:e:r.hasOwnProperty(e)?r[e]:e};let t={Backspace:"⌫",Tab:"⇥",Enter:"⏎",Shift:"⇧",Ctrl:"⌃",Alt:"⌥",Escape:"⎋",PageUp:"⇞",PageDown:"⇟",End:"↘",Home:"↖",ArrowLeft:"←",ArrowUp:"↑",ArrowRight:"→",ArrowDown:"↓",Delete:"⌦",Cmd:"⌘"},r={Escape:"Esc",PageUp:"Page Up",PageDown:"Page Down",ArrowLeft:"Left",ArrowUp:"Up",ArrowRight:"Right",ArrowDown:"Down",Delete:"Del"},n=()=>"",i=()=>-1,s=()=>!0,l=()=>!1,c=()=>({}),u=()=>{};function h(e,t){return void 0===e?t:"function"==typeof e?e:()=>e}function f(e){if(-1!==e.selector.indexOf(","))throw new Error(`Selector cannot contain commas: ${e.selector}`);if(!o.isValid(e.selector))throw new Error(`Invalid selector: ${e.selector}`);return e.selector}function p(e,t){if(e.lengtht.length?2:1}function d(e,t){let r=t.target,n=t.currentTarget;for(let t=0;null!==r;r=r.parentElement,++t){if(r.hasAttribute("data-lm-suppress-shortcuts"))return-1;if(o.matches(r,e))return t;if(r===n)return-1}return-1}}(G||(G={}));var Z,Y,X=y(v()),$=class{constructor(e){this.type="text",this.content=e}},K=class{constructor(e,t,r,n){this.type="element",this.tag=e,this.attrs=t,this.children=r,this.renderer=n}};function J(e){let t,r={},n=[];for(let e=1,a=arguments.length;e=n;--a){let n=t[a],o=i?e.lastChild:e.childNodes[a];"text"===n.type||(n.renderer&&n.renderer.unrender?n.renderer.unrender(o,{attrs:n.attrs,children:n.children}):r(o,n.children,0,!1)),i&&e.removeChild(o)}}e.hostMap=new WeakMap,e.asContentArray=function(e){return e?e instanceof Array?e:[e]:[]},e.createDOMNode=t,e.updateContent=function e(n,a,o){if(a===o)return;let s=function(e,t){let r=e.firstChild,n=Object.create(null);for(let e of t)"element"===e.type&&e.attrs.key&&(n[e.attrs.key]={vNode:e,element:r}),r=r.nextSibling;return n}(n,a),l=a.slice(),c=n.firstChild,u=o.length;for(let r=0;r=l.length){t(o[r],n);continue}let a=l[r],u=o[r];if(a===u){c=c.nextSibling;continue}if("text"===a.type&&"text"===u.type){c.textContent!==u.content&&(c.textContent=u.content),c=c.nextSibling;continue}if("text"===a.type||"text"===u.type){X.ArrayExt.insert(l,r,u),t(u,n,c);continue}if(!a.renderer!=!u.renderer){X.ArrayExt.insert(l,r,u),t(u,n,c);continue}let h=u.attrs.key;if(h&&h in s){let e=s[h];e.vNode!==a&&(X.ArrayExt.move(l,l.indexOf(e.vNode,r+1),r),n.insertBefore(e.element,c),a=e.vNode,c=e.element)}if(a===u){c=c.nextSibling;continue}let f=a.attrs.key;f&&f!==h?(X.ArrayExt.insert(l,r,u),t(u,n,c)):a.tag===u.tag?(i(c,a.attrs,u.attrs),u.renderer?u.renderer.render(c,{attrs:u.attrs,children:u.children}):e(c,a.children,u.children),c=c.nextSibling):(X.ArrayExt.insert(l,r,u),t(u,n,c))}r(n,l,u,!0)};let n={key:!0,className:!0,htmlFor:!0,dataset:!0,style:!0};function i(e,t,r){if(t===r)return;let i;for(i in t)i in n||i in r||("on"===i.substr(0,2)?e[i]=null:e.removeAttribute(i));for(i in r)i in n||t[i]===r[i]||("on"===i.substr(0,2)?e[i]=r[i]:e.setAttribute(i,r[i]));t.className!==r.className&&(void 0!==r.className?e.setAttribute("class",r.className):e.removeAttribute("class")),t.htmlFor!==r.htmlFor&&(void 0!==r.htmlFor?e.setAttribute("for",r.htmlFor):e.removeAttribute("for")),t.dataset!==r.dataset&&function(e,t,r){for(let n in t)n in r||e.removeAttribute(`data-${n}`);for(let n in r)t[n]!==r[n]&&e.setAttribute(`data-${n}`,r[n])}(e,t.dataset||{},r.dataset||{}),t.style!==r.style&&function(e,t,r){let n,i=e.style;for(n in t)n in r||(i[n]="");for(n in r)t[n]!==r[n]&&(i[n]=r[n])}(e,t.style||{},r.style||{})}}(Y||(Y={}));var Q,ee=class{constructor(){this.sizeHint=0,this.minSize=0,this.maxSize=1/0,this.stretch=1,this.size=0,this.done=!1}};!function(e){e.calc=function(e,t){let r=e.length;if(0===r)return t;let n=0,i=0,a=0,o=0,s=0;for(let t=0;t0&&(o+=r.stretch,s++)}if(t===a)return 0;if(t<=n){for(let t=0;t=i){for(let t=0;t0&&n>l;){let t=n,i=o;for(let a=0;a0&&n>l;){let t=n/c;for(let i=0;i0&&n>l;){let t=n,i=o;for(let a=0;a=r.maxSize?(n-=r.maxSize-r.size,o-=r.stretch,r.size=r.maxSize,r.done=!0,c--,s--):(n-=l,r.size+=l)}}for(;c>0&&n>l;){let t=n/c;for(let i=0;i=r.maxSize?(n-=r.maxSize-r.size,r.size=r.maxSize,r.done=!0,c--):(n-=t,r.size+=t))}}}return 0},e.adjust=function(e,t,r){0===e.length||0===r||(r>0?function(e,t,r){let n=0;for(let r=0;r<=t;++r){let t=e[r];n+=t.maxSize-t.size}let i=0;for(let r=t+1,n=e.length;r=0&&a>0;--r){let t=e[r],n=t.maxSize-t.size;n>=a?(t.sizeHint=t.size+a,a=0):(t.sizeHint=t.size+n,a-=n)}let o=r;for(let r=t+1,n=e.length;r0;++r){let t=e[r],n=t.size-t.minSize;n>=o?(t.sizeHint=t.size-o,o=0):(t.sizeHint=t.size-n,o-=n)}}(e,t,r):function(e,t,r){let n=0;for(let r=t+1,i=e.length;r0;++r){let t=e[r],n=t.maxSize-t.size;n>=a?(t.sizeHint=t.size+a,a=0):(t.sizeHint=t.size+n,a-=n)}let o=r;for(let r=t;r>=0&&o>0;--r){let t=e[r],n=t.size-t.minSize;n>=o?(t.sizeHint=t.size-o,o=0):(t.sizeHint=t.size-n,o-=n)}}(e,t,-r))}}(Q||(Q={}));var te,re=class{constructor(e){this._label="",this._caption="",this._mnemonic=-1,this._icon=void 0,this._iconClass="",this._iconLabel="",this._className="",this._closable=!1,this._changed=new z(this),this._isDisposed=!1,this.owner=e.owner,void 0!==e.label&&(this._label=e.label),void 0!==e.mnemonic&&(this._mnemonic=e.mnemonic),void 0!==e.icon&&(this._icon=e.icon),void 0!==e.iconClass&&(this._iconClass=e.iconClass),void 0!==e.iconLabel&&(this._iconLabel=e.iconLabel),void 0!==e.caption&&(this._caption=e.caption),void 0!==e.className&&(this._className=e.className),void 0!==e.closable&&(this._closable=e.closable),this._dataset=e.dataset||{}}get changed(){return this._changed}get label(){return this._label}set label(e){this._label!==e&&(this._label=e,this._changed.emit(void 0))}get mnemonic(){return this._mnemonic}set mnemonic(e){this._mnemonic!==e&&(this._mnemonic=e,this._changed.emit(void 0))}get icon(){return this._icon}set icon(e){this._icon!==e&&(this._icon=e,this._changed.emit(void 0))}get iconClass(){return this._iconClass}set iconClass(e){this._iconClass!==e&&(this._iconClass=e,this._changed.emit(void 0))}get iconLabel(){return this._iconLabel}set iconLabel(e){this._iconLabel!==e&&(this._iconLabel=e,this._changed.emit(void 0))}get caption(){return this._caption}set caption(e){this._caption!==e&&(this._caption=e,this._changed.emit(void 0))}get className(){return this._className}set className(e){this._className!==e&&(this._className=e,this._changed.emit(void 0))}get closable(){return this._closable}set closable(e){this._closable!==e&&(this._closable=e,this._changed.emit(void 0))}get dataset(){return this._dataset}set dataset(e){this._dataset!==e&&(this._dataset=e,this._changed.emit(void 0))}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,z.clearData(this))}},ne=class e{constructor(t={}){this._flags=0,this._layout=null,this._parent=null,this._disposed=new z(this),this._hiddenMode=e.HiddenMode.Display,this.node=te.createNode(t),this.addClass("lm-Widget")}dispose(){this.isDisposed||(this.setFlag(e.Flag.IsDisposed),this._disposed.emit(void 0),this.parent?this.parent=null:this.isAttached&&e.detach(this),this._layout&&(this._layout.dispose(),this._layout=null),this.title.dispose(),z.clearData(this),M.clearData(this),I.clearData(this))}get disposed(){return this._disposed}get isDisposed(){return this.testFlag(e.Flag.IsDisposed)}get isAttached(){return this.testFlag(e.Flag.IsAttached)}get isHidden(){return this.testFlag(e.Flag.IsHidden)}get isVisible(){return this.testFlag(e.Flag.IsVisible)}get title(){return te.titleProperty.get(this)}get id(){return this.node.id}set id(e){this.node.id=e}get dataset(){return this.node.dataset}get hiddenMode(){return this._hiddenMode}set hiddenMode(t){this._hiddenMode!==t&&(this.isHidden&&this._toggleHidden(!1),t==e.HiddenMode.Scale?this.node.style.willChange="transform":this.node.style.willChange="auto",this._hiddenMode=t,this.isHidden&&this._toggleHidden(!0))}get parent(){return this._parent}set parent(t){if(this._parent!==t){if(t&&this.contains(t))throw new Error("Invalid parent widget.");if(this._parent&&!this._parent.isDisposed){let t=new e.ChildMessage("child-removed",this);M.sendMessage(this._parent,t)}if(this._parent=t,this._parent&&!this._parent.isDisposed){let t=new e.ChildMessage("child-added",this);M.sendMessage(this._parent,t)}this.isDisposed||M.sendMessage(this,e.Msg.ParentChanged)}}get layout(){return this._layout}set layout(t){if(this._layout!==t){if(this.testFlag(e.Flag.DisallowLayout))throw new Error("Cannot set widget layout.");if(this._layout)throw new Error("Cannot change widget layout.");if(t.parent)throw new Error("Cannot change layout parent.");this._layout=t,t.parent=this}}*children(){this._layout&&(yield*this._layout)}contains(e){for(let t=e;t;t=t._parent)if(t===this)return!0;return!1}hasClass(e){return this.node.classList.contains(e)}addClass(e){this.node.classList.add(e)}removeClass(e){this.node.classList.remove(e)}toggleClass(e,t){return!0===t?(this.node.classList.add(e),!0):!1===t?(this.node.classList.remove(e),!1):this.node.classList.toggle(e)}update(){M.postMessage(this,e.Msg.UpdateRequest)}fit(){M.postMessage(this,e.Msg.FitRequest)}activate(){M.postMessage(this,e.Msg.ActivateRequest)}close(){M.sendMessage(this,e.Msg.CloseRequest)}show(){if(this.testFlag(e.Flag.IsHidden)&&(this.isAttached&&(!this.parent||this.parent.isVisible)&&M.sendMessage(this,e.Msg.BeforeShow),this.clearFlag(e.Flag.IsHidden),this._toggleHidden(!1),this.isAttached&&(!this.parent||this.parent.isVisible)&&M.sendMessage(this,e.Msg.AfterShow),this.parent)){let t=new e.ChildMessage("child-shown",this);M.sendMessage(this.parent,t)}}hide(){if(!this.testFlag(e.Flag.IsHidden)&&(this.isAttached&&(!this.parent||this.parent.isVisible)&&M.sendMessage(this,e.Msg.BeforeHide),this.setFlag(e.Flag.IsHidden),this._toggleHidden(!0),this.isAttached&&(!this.parent||this.parent.isVisible)&&M.sendMessage(this,e.Msg.AfterHide),this.parent)){let t=new e.ChildMessage("child-hidden",this);M.sendMessage(this.parent,t)}}setHidden(e){e?this.hide():this.show()}testFlag(e){return!!(this._flags&e)}setFlag(e){this._flags|=e}clearFlag(e){this._flags&=~e}processMessage(t){switch(t.type){case"resize":this.notifyLayout(t),this.onResize(t);break;case"update-request":this.notifyLayout(t),this.onUpdateRequest(t);break;case"fit-request":this.notifyLayout(t),this.onFitRequest(t);break;case"before-show":this.notifyLayout(t),this.onBeforeShow(t);break;case"after-show":this.setFlag(e.Flag.IsVisible),this.notifyLayout(t),this.onAfterShow(t);break;case"before-hide":this.notifyLayout(t),this.onBeforeHide(t);break;case"after-hide":this.clearFlag(e.Flag.IsVisible),this.notifyLayout(t),this.onAfterHide(t);break;case"before-attach":this.notifyLayout(t),this.onBeforeAttach(t);break;case"after-attach":!this.isHidden&&(!this.parent||this.parent.isVisible)&&this.setFlag(e.Flag.IsVisible),this.setFlag(e.Flag.IsAttached),this.notifyLayout(t),this.onAfterAttach(t);break;case"before-detach":this.notifyLayout(t),this.onBeforeDetach(t);break;case"after-detach":this.clearFlag(e.Flag.IsVisible),this.clearFlag(e.Flag.IsAttached),this.notifyLayout(t),this.onAfterDetach(t);break;case"activate-request":this.notifyLayout(t),this.onActivateRequest(t);break;case"close-request":this.notifyLayout(t),this.onCloseRequest(t);break;case"child-added":this.notifyLayout(t),this.onChildAdded(t);break;case"child-removed":this.notifyLayout(t),this.onChildRemoved(t);break;default:this.notifyLayout(t)}}notifyLayout(e){this._layout&&this._layout.processParentMessage(e)}onCloseRequest(t){this.parent?this.parent=null:this.isAttached&&e.detach(this)}onResize(e){}onUpdateRequest(e){}onFitRequest(e){}onActivateRequest(e){}onBeforeShow(e){}onAfterShow(e){}onBeforeHide(e){}onAfterHide(e){}onBeforeAttach(e){}onAfterAttach(e){}onBeforeDetach(e){}onAfterDetach(e){}onChildAdded(e){}onChildRemoved(e){}_toggleHidden(t){if(t)switch(this._hiddenMode){case e.HiddenMode.Display:this.addClass("lm-mod-hidden");break;case e.HiddenMode.Scale:this.node.style.transform="scale(0)",this.node.setAttribute("aria-hidden","true");break;case e.HiddenMode.ContentVisibility:this.node.style.contentVisibility="hidden",this.node.style.zIndex="-1"}else switch(this._hiddenMode){case e.HiddenMode.Display:this.removeClass("lm-mod-hidden");break;case e.HiddenMode.Scale:this.node.style.transform="",this.node.removeAttribute("aria-hidden");break;case e.HiddenMode.ContentVisibility:this.node.style.contentVisibility="",this.node.style.zIndex=""}}};!function(e){var t;(t=e.HiddenMode||(e.HiddenMode={}))[t.Display=0]="Display",t[t.Scale=1]="Scale",t[t.ContentVisibility=2]="ContentVisibility",function(e){e[e.IsDisposed=1]="IsDisposed",e[e.IsAttached=2]="IsAttached",e[e.IsHidden=4]="IsHidden",e[e.IsVisible=8]="IsVisible",e[e.DisallowLayout=16]="DisallowLayout"}(e.Flag||(e.Flag={})),function(e){e.BeforeShow=new S("before-show"),e.AfterShow=new S("after-show"),e.BeforeHide=new S("before-hide"),e.AfterHide=new S("after-hide"),e.BeforeAttach=new S("before-attach"),e.AfterAttach=new S("after-attach"),e.BeforeDetach=new S("before-detach"),e.AfterDetach=new S("after-detach"),e.ParentChanged=new S("parent-changed"),e.UpdateRequest=new E("update-request"),e.FitRequest=new E("fit-request"),e.ActivateRequest=new E("activate-request"),e.CloseRequest=new E("close-request")}(e.Msg||(e.Msg={})),e.ChildMessage=class extends S{constructor(e,t){super(e),this.child=t}};class r extends S{constructor(e,t){super("resize"),this.width=e,this.height=t}}e.ResizeMessage=r,function(e){e.UnknownSize=new e(-1,-1)}(r=e.ResizeMessage||(e.ResizeMessage={})),e.attach=function(t,r,n=null){if(t.parent)throw new Error("Cannot attach a child widget.");if(t.isAttached||t.node.isConnected)throw new Error("Widget is already attached.");if(!r.isConnected)throw new Error("Host is not attached.");M.sendMessage(t,e.Msg.BeforeAttach),r.insertBefore(t.node,n),M.sendMessage(t,e.Msg.AfterAttach)},e.detach=function(t){if(t.parent)throw new Error("Cannot detach a child widget.");if(!t.isAttached||!t.node.isConnected)throw new Error("Widget is not attached.");M.sendMessage(t,e.Msg.BeforeDetach),t.node.parentNode.removeChild(t.node),M.sendMessage(t,e.Msg.AfterDetach)}}(ne||(ne={})),function(e){e.titleProperty=new I({name:"title",create:e=>new re({owner:e})}),e.createNode=function(e){return e.node||document.createElement(e.tag||"div")}}(te||(te={}));var ie=class{constructor(e={}){this._disposed=!1,this._parent=null,this._fitPolicy=e.fitPolicy||"set-min-size"}dispose(){this._parent=null,this._disposed=!0,z.clearData(this),I.clearData(this)}get isDisposed(){return this._disposed}get parent(){return this._parent}set parent(e){if(this._parent!==e){if(this._parent)throw new Error("Cannot change parent widget.");if(e.layout!==this)throw new Error("Invalid parent widget.");this._parent=e,this.init()}}get fitPolicy(){return this._fitPolicy}set fitPolicy(e){if(this._fitPolicy!==e&&(this._fitPolicy=e,this._parent)){let e=this._parent.node.style;e.minWidth="",e.minHeight="",e.maxWidth="",e.maxHeight="",this._parent.fit()}}processParentMessage(e){switch(e.type){case"resize":this.onResize(e);break;case"update-request":this.onUpdateRequest(e);break;case"fit-request":this.onFitRequest(e);break;case"before-show":this.onBeforeShow(e);break;case"after-show":this.onAfterShow(e);break;case"before-hide":this.onBeforeHide(e);break;case"after-hide":this.onAfterHide(e);break;case"before-attach":this.onBeforeAttach(e);break;case"after-attach":this.onAfterAttach(e);break;case"before-detach":this.onBeforeDetach(e);break;case"after-detach":this.onAfterDetach(e);break;case"child-removed":this.onChildRemoved(e);break;case"child-shown":this.onChildShown(e);break;case"child-hidden":this.onChildHidden(e)}}init(){for(let e of this)e.parent=this.parent}onResize(e){for(let e of this)M.sendMessage(e,ne.ResizeMessage.UnknownSize)}onUpdateRequest(e){for(let e of this)M.sendMessage(e,ne.ResizeMessage.UnknownSize)}onBeforeAttach(e){for(let t of this)M.sendMessage(t,e)}onAfterAttach(e){for(let t of this)M.sendMessage(t,e)}onBeforeDetach(e){for(let t of this)M.sendMessage(t,e)}onAfterDetach(e){for(let t of this)M.sendMessage(t,e)}onBeforeShow(e){for(let t of this)t.isHidden||M.sendMessage(t,e)}onAfterShow(e){for(let t of this)t.isHidden||M.sendMessage(t,e)}onBeforeHide(e){for(let t of this)t.isHidden||M.sendMessage(t,e)}onAfterHide(e){for(let t of this)t.isHidden||M.sendMessage(t,e)}onChildRemoved(e){this.removeWidget(e.child)}onFitRequest(e){}onChildShown(e){}onChildHidden(e){}};!function(e){e.getHorizontalAlignment=function(e){return ae.horizontalAlignmentProperty.get(e)},e.setHorizontalAlignment=function(e,t){ae.horizontalAlignmentProperty.set(e,t)},e.getVerticalAlignment=function(e){return ae.verticalAlignmentProperty.get(e)},e.setVerticalAlignment=function(e,t){ae.verticalAlignmentProperty.set(e,t)}}(ie||(ie={}));var ae,oe=class{constructor(e){this._top=NaN,this._left=NaN,this._width=NaN,this._height=NaN,this._minWidth=0,this._minHeight=0,this._maxWidth=1/0,this._maxHeight=1/0,this._disposed=!1,this.widget=e,this.widget.node.style.position="absolute",this.widget.node.style.contain="strict"}dispose(){if(this._disposed)return;this._disposed=!0;let e=this.widget.node.style;e.position="",e.top="",e.left="",e.width="",e.height="",e.contain=""}get minWidth(){return this._minWidth}get minHeight(){return this._minHeight}get maxWidth(){return this._maxWidth}get maxHeight(){return this._maxHeight}get isDisposed(){return this._disposed}get isHidden(){return this.widget.isHidden}get isVisible(){return this.widget.isVisible}get isAttached(){return this.widget.isAttached}fit(){let e=i.sizeLimits(this.widget.node);this._minWidth=e.minWidth,this._minHeight=e.minHeight,this._maxWidth=e.maxWidth,this._maxHeight=e.maxHeight}update(e,t,r,n){let i=Math.max(this._minWidth,Math.min(r,this._maxWidth)),a=Math.max(this._minHeight,Math.min(n,this._maxHeight));if(i"center",changed:t}),e.verticalAlignmentProperty=new I({name:"verticalAlignment",create:()=>"top",changed:t})}(ae||(ae={}));var se,le=class extends ie{constructor(){super(...arguments),this._widgets=[]}dispose(){for(;this._widgets.length>0;)this._widgets.pop().dispose();super.dispose()}get widgets(){return this._widgets}*[Symbol.iterator](){yield*this._widgets}addWidget(e){this.insertWidget(this._widgets.length,e)}insertWidget(e,t){t.parent=this.parent;let r=this._widgets.indexOf(t),n=Math.max(0,Math.min(e,this._widgets.length));if(-1===r)return b.ArrayExt.insert(this._widgets,n,t),void(this.parent&&this.attachWidget(n,t));n===this._widgets.length&&n--,r!==n&&(b.ArrayExt.move(this._widgets,r,n),this.parent&&this.moveWidget(r,n,t))}removeWidget(e){this.removeWidgetAt(this._widgets.indexOf(e))}removeWidgetAt(e){let t=b.ArrayExt.removeAt(this._widgets,e);t&&this.parent&&this.detachWidget(e,t)}init(){super.init();let e=0;for(let t of this)this.attachWidget(e++,t)}attachWidget(e,t){let r=this.parent.node.children[e];this.parent.isAttached&&M.sendMessage(t,ne.Msg.BeforeAttach),this.parent.node.insertBefore(t.node,r),this.parent.isAttached&&M.sendMessage(t,ne.Msg.AfterAttach)}moveWidget(e,t,r){this.parent.isAttached&&M.sendMessage(r,ne.Msg.BeforeDetach),this.parent.node.removeChild(r.node),this.parent.isAttached&&M.sendMessage(r,ne.Msg.AfterDetach);let n=this.parent.node.children[t];this.parent.isAttached&&M.sendMessage(r,ne.Msg.BeforeAttach),this.parent.node.insertBefore(r.node,n),this.parent.isAttached&&M.sendMessage(r,ne.Msg.AfterAttach)}detachWidget(e,t){this.parent.isAttached&&M.sendMessage(t,ne.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&M.sendMessage(t,ne.Msg.AfterDetach)}};!function(e){e.clampDimension=function(e){return Math.max(0,Math.floor(e))}}(se||(se={}));var ce,ue=se,he=class e extends le{constructor(e){super(),this.widgetOffset=0,this._fixed=0,this._spacing=4,this._dirty=!1,this._hasNormedSizes=!1,this._sizers=[],this._items=[],this._handles=[],this._box=null,this._alignment="start",this._orientation="horizontal",this.renderer=e.renderer,void 0!==e.orientation&&(this._orientation=e.orientation),void 0!==e.alignment&&(this._alignment=e.alignment),void 0!==e.spacing&&(this._spacing=se.clampDimension(e.spacing))}dispose(){for(let e of this._items)e.dispose();this._box=null,this._items.length=0,this._sizers.length=0,this._handles.length=0,super.dispose()}get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._orientation=e,this.parent&&(this.parent.dataset.orientation=e,this.parent.fit()))}get alignment(){return this._alignment}set alignment(e){this._alignment!==e&&(this._alignment=e,this.parent&&(this.parent.dataset.alignment=e,this.parent.update()))}get spacing(){return this._spacing}set spacing(e){e=se.clampDimension(e),this._spacing!==e&&(this._spacing=e,this.parent&&this.parent.fit())}get handles(){return this._handles}absoluteSizes(){return this._sizers.map((e=>e.size))}relativeSizes(){return ce.normalize(this._sizers.map((e=>e.size)))}setRelativeSizes(e,t=!0){let r=this._sizers.length,n=e.slice(0,r);for(;n.length0&&(e.sizeHint=e.size);Q.adjust(this._sizers,e,r),this.parent&&this.parent.update()}}init(){this.parent.dataset.orientation=this.orientation,this.parent.dataset.alignment=this.alignment,super.init()}attachWidget(e,t){let r=new oe(t),n=ce.createHandle(this.renderer),i=ce.averageSize(this._sizers),a=ce.createSizer(i);b.ArrayExt.insert(this._items,e,r),b.ArrayExt.insert(this._sizers,e,a),b.ArrayExt.insert(this._handles,e,n),this.parent.isAttached&&M.sendMessage(t,ne.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.node.appendChild(n),this.parent.isAttached&&M.sendMessage(t,ne.Msg.AfterAttach),this.parent.fit()}moveWidget(e,t,r){b.ArrayExt.move(this._items,e,t),b.ArrayExt.move(this._sizers,e,t),b.ArrayExt.move(this._handles,e,t),this.parent.fit()}detachWidget(e,t){let r=b.ArrayExt.removeAt(this._items,e),n=b.ArrayExt.removeAt(this._handles,e);b.ArrayExt.removeAt(this._sizers,e),this.parent.isAttached&&M.sendMessage(t,ne.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.node.removeChild(n),this.parent.isAttached&&M.sendMessage(t,ne.Msg.AfterDetach),r.dispose(),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}updateItemPosition(e,t,r,n,i,a,o){let s=this._items[e];if(s.isHidden)return;let l=this._handles[e].style;t?(r+=this.widgetOffset,s.update(r,n,o,i),r+=o,l.top=`${n}px`,l.left=`${r}px`,l.width=`${this._spacing}px`,l.height=`${i}px`):(n+=this.widgetOffset,s.update(r,n,a,o),n+=o,l.top=`${n}px`,l.left=`${r}px`,l.width=`${a}px`,l.height=`${this._spacing}px`)}_fit(){let t=0,r=-1;for(let e=0,n=this._items.length;e0&&(i.sizeHint=i.size),r.isHidden?(i.minSize=0,i.maxSize=0):(r.fit(),i.stretch=e.getStretch(r.widget),n?(i.minSize=r.minWidth,i.maxSize=r.maxWidth,a+=r.minWidth,o=Math.max(o,r.minHeight)):(i.minSize=r.minHeight,i.maxSize=r.maxHeight,o+=r.minHeight,a=Math.max(a,r.minWidth)))}let s=this._box=i.boxSizing(this.parent.node);a+=s.horizontalSum,o+=s.verticalSum;let l=this.parent.node.style;l.minWidth=`${a}px`,l.minHeight=`${o}px`,this._dirty=!0,this.parent.parent&&M.sendMessage(this.parent.parent,ne.Msg.FitRequest),this._dirty&&M.sendMessage(this.parent,ne.Msg.UpdateRequest)}_update(e,t){this._dirty=!1;let r=0;for(let e=0,t=this._items.length;e0){let e;if(e=u?Math.max(0,o-this._fixed):Math.max(0,s-this._fixed),this._hasNormedSizes){for(let t of this._sizers)t.sizeHint*=e;this._hasNormedSizes=!1}let t=Q.calc(this._sizers,e);if(t>0)switch(this._alignment){case"start":break;case"center":l=0,c=t/2;break;case"end":l=0,c=t;break;case"justify":l=t/r,c=0;break;default:throw"unreachable"}}for(let e=0,t=this._items.length;e0,coerce:(e,t)=>Math.max(0,Math.floor(t)),changed:function(e){e.parent&&e.parent.layout instanceof he&&e.parent.fit()}}),e.createSizer=function(e){let t=new ee;return t.sizeHint=Math.floor(e),t},e.createHandle=function(e){let t=e.createHandle();return t.style.position="absolute",t.style.contain="style",t},e.averageSize=function(e){return e.reduce(((e,t)=>e+t.size),0)/e.length||0},e.normalize=function(e){let t=e.length;if(0===t)return[];let r=e.reduce(((e,t)=>e+Math.abs(t)),0);return 0===r?e.map((e=>1/t)):e.map((e=>e/r))}}(ce||(ce={}));var fe,pe=class extends he{constructor(e){super({...e,orientation:e.orientation||"vertical"}),this._titles=[],this.titleSpace=e.titleSpace||22}get titleSpace(){return this.widgetOffset}set titleSpace(e){e=ue.clampDimension(e),this.widgetOffset!==e&&(this.widgetOffset=e,this.parent&&this.parent.fit())}get titles(){return this._titles}dispose(){this.isDisposed||(this._titles.length=0,super.dispose())}updateTitle(e,t){let r=this._titles[e],n=r.classList.contains("lm-mod-expanded"),i=fe.createTitle(this.renderer,t.title,n);this._titles[e]=i,this.parent.node.replaceChild(i,r)}insertWidget(e,t){t.id||(t.id=`id-${w.UUID.uuid4()}`),super.insertWidget(e,t)}attachWidget(e,t){let r=fe.createTitle(this.renderer,t.title);b.ArrayExt.insert(this._titles,e,r),this.parent.node.appendChild(r),t.node.setAttribute("role","region"),t.node.setAttribute("aria-labelledby",r.id),super.attachWidget(e,t)}moveWidget(e,t,r){b.ArrayExt.move(this._titles,e,t),super.moveWidget(e,t,r)}detachWidget(e,t){let r=b.ArrayExt.removeAt(this._titles,e);this.parent.node.removeChild(r),super.detachWidget(e,t)}updateItemPosition(e,t,r,n,i,a,o){let s=this._titles[e].style;s.top=`${n}px`,s.left=`${r}px`,s.height=`${this.widgetOffset}px`,s.width=t?`${i}px`:`${a}px`,super.updateItemPosition(e,t,r,n,i,a,o)}};!function(e){e.createTitle=function(e,t,r=!0){let n=e.createSectionTitle(t);return n.style.position="absolute",n.style.contain="strict",n.setAttribute("aria-label",`${t.label} Section`),n.setAttribute("aria-expanded",r?"true":"false"),n.setAttribute("aria-controls",t.owner.id),r&&n.classList.add("lm-mod-expanded"),n}}(fe||(fe={}));var de,me=class extends ne{constructor(e={}){super(),this.addClass("lm-Panel"),this.layout=de.createLayout(e)}get widgets(){return this.layout.widgets}addWidget(e){this.layout.addWidget(e)}insertWidget(e,t){this.layout.insertWidget(e,t)}};!function(e){e.createLayout=function(e){return e.layout||new le}}(de||(de={}));var ge,ye=class extends me{constructor(e={}){super({layout:ge.createLayout(e)}),this._handleMoved=new z(this),this._pressData=null,this.addClass("lm-SplitPanel")}dispose(){this._releaseMouse(),super.dispose()}get orientation(){return this.layout.orientation}set orientation(e){this.layout.orientation=e}get alignment(){return this.layout.alignment}set alignment(e){this.layout.alignment=e}get spacing(){return this.layout.spacing}set spacing(e){this.layout.spacing=e}get renderer(){return this.layout.renderer}get handleMoved(){return this._handleMoved}get handles(){return this.layout.handles}relativeSizes(){return this.layout.relativeSizes()}setRelativeSizes(e,t=!0){this.layout.setRelativeSizes(e,t)}handleEvent(e){switch(e.type){case"pointerdown":this._evtPointerDown(e);break;case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"keydown":this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("pointerdown",this)}onAfterDetach(e){this.node.removeEventListener("pointerdown",this),this._releaseMouse()}onChildAdded(e){e.child.addClass("lm-SplitPanel-child"),this._releaseMouse()}onChildRemoved(e){e.child.removeClass("lm-SplitPanel-child"),this._releaseMouse()}_evtKeyDown(e){this._pressData&&(e.preventDefault(),e.stopPropagation()),27===e.keyCode&&this._releaseMouse()}_evtPointerDown(e){if(0!==e.button)return;let t=this.layout,r=b.ArrayExt.findFirstIndex(t.handles,(t=>t.contains(e.target)));if(-1===r)return;e.preventDefault(),e.stopPropagation(),document.addEventListener("pointerup",this,!0),document.addEventListener("pointermove",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("contextmenu",this,!0);let n,i=t.handles[r],a=i.getBoundingClientRect();n="horizontal"===t.orientation?e.clientX-a.left:e.clientY-a.top;let o=window.getComputedStyle(i),s=B.overrideCursor(o.cursor);this._pressData={index:r,delta:n,override:s}}_evtPointerMove(e){e.preventDefault(),e.stopPropagation();let t,r=this.layout,n=this.node.getBoundingClientRect();t="horizontal"===r.orientation?e.clientX-n.left-this._pressData.delta:e.clientY-n.top-this._pressData.delta,r.moveHandle(this._pressData.index,t)}_evtPointerUp(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),this._releaseMouse())}_releaseMouse(){this._pressData&&(this._pressData.override.dispose(),this._pressData=null,this._handleMoved.emit(),document.removeEventListener("keydown",this,!0),document.removeEventListener("pointerup",this,!0),document.removeEventListener("pointermove",this,!0),document.removeEventListener("contextmenu",this,!0))}};!function(e){class t{createHandle(){let e=document.createElement("div");return e.className="lm-SplitPanel-handle",e}}e.Renderer=t,e.defaultRenderer=new t,e.getStretch=function(e){return he.getStretch(e)},e.setStretch=function(e,t){he.setStretch(e,t)}}(ye||(ye={})),function(e){e.createLayout=function(e){return e.layout||new he({renderer:e.renderer||ye.defaultRenderer,orientation:e.orientation,alignment:e.alignment,spacing:e.spacing})}}(ge||(ge={}));var ve,xe=class extends ye{constructor(e={}){super({...e,layout:ve.createLayout(e)}),this._widgetSizesCache=new WeakMap,this._expansionToggled=new z(this),this.addClass("lm-AccordionPanel")}get renderer(){return this.layout.renderer}get titleSpace(){return this.layout.titleSpace}set titleSpace(e){this.layout.titleSpace=e}get titles(){return this.layout.titles}get expansionToggled(){return this._expansionToggled}addWidget(e){super.addWidget(e),e.title.changed.connect(this._onTitleChanged,this)}collapse(e){let t=this.layout.widgets[e];t&&!t.isHidden&&this._toggleExpansion(e)}expand(e){let t=this.layout.widgets[e];t&&t.isHidden&&this._toggleExpansion(e)}insertWidget(e,t){super.insertWidget(e,t),t.title.changed.connect(this._onTitleChanged,this)}handleEvent(e){switch(super.handleEvent(e),e.type){case"click":this._evtClick(e);break;case"keydown":this._eventKeyDown(e)}}onBeforeAttach(e){this.node.addEventListener("click",this),this.node.addEventListener("keydown",this),super.onBeforeAttach(e)}onAfterDetach(e){super.onAfterDetach(e),this.node.removeEventListener("click",this),this.node.removeEventListener("keydown",this)}_onTitleChanged(e){let t=b.ArrayExt.findFirstIndex(this.widgets,(t=>t.contains(e.owner)));t>=0&&(this.layout.updateTitle(t,e.owner),this.update())}_computeWidgetSize(e){let t=this.layout,r=t.widgets[e];if(!r)return;let n=r.isHidden,i=t.absoluteSizes(),a=(n?-1:1)*this.spacing,o=i.reduce(((e,t)=>e+t)),s=[...i];if(n){let t=this._widgetSizesCache.get(r);if(!t)return;s[e]+=t;let n=s.map((e=>e-t>0)).lastIndexOf(!0);-1===n?s.forEach(((r,n)=>{n!==e&&(s[n]-=i[n]/o*(t-a))})):s[n]-=t-a}else{let t=i[e];this._widgetSizesCache.set(r,t),s[e]=0;let n=s.map((e=>e>0)).lastIndexOf(!0);if(-1===n)return;s[n]=i[n]+t+a}return s.map((e=>e/(o+a)))}_evtClick(e){let t=e.target;if(t){let r=b.ArrayExt.findFirstIndex(this.titles,(e=>e.contains(t)));r>=0&&(e.preventDefault(),e.stopPropagation(),this._toggleExpansion(r))}}_eventKeyDown(e){if(e.defaultPrevented)return;let t=e.target,r=!1;if(t){let n=b.ArrayExt.findFirstIndex(this.titles,(e=>e.contains(t)));if(n>=0){let i=e.keyCode.toString();if(e.key.match(/Space|Enter/)||i.match(/13|32/))t.click(),r=!0;else if("horizontal"===this.orientation?e.key.match(/ArrowLeft|ArrowRight/)||i.match(/37|39/):e.key.match(/ArrowUp|ArrowDown/)||i.match(/38|40/)){let t=e.key.match(/ArrowLeft|ArrowUp/)||i.match(/37|38/)?-1:1,a=this.titles.length,o=(n+a+t)%a;this.titles[o].focus(),r=!0}else"End"===e.key||"35"===i?(this.titles[this.titles.length-1].focus(),r=!0):("Home"===e.key||"36"===i)&&(this.titles[0].focus(),r=!0)}r&&e.preventDefault()}}_toggleExpansion(e){let t=this.titles[e],r=this.layout.widgets[e],n=this._computeWidgetSize(e);n&&this.setRelativeSizes(n,!1),r.isHidden?(t.classList.add("lm-mod-expanded"),t.setAttribute("aria-expanded","true"),r.show()):(t.classList.remove("lm-mod-expanded"),t.setAttribute("aria-expanded","false"),r.hide()),this._expansionToggled.emit(e)}};!function(e){class t extends ye.Renderer{constructor(){super(),this.titleClassName="lm-AccordionPanel-title",this._titleID=0,this._titleKeys=new WeakMap,this._uuid=++t._nInstance}createCollapseIcon(e){return document.createElement("span")}createSectionTitle(e){let t=document.createElement("h3");t.setAttribute("tabindex","0"),t.id=this.createTitleKey(e),t.className=this.titleClassName;for(let r in e.dataset)t.dataset[r]=e.dataset[r];t.appendChild(this.createCollapseIcon(e)).className="lm-AccordionPanel-titleCollapser";let r=t.appendChild(document.createElement("span"));return r.className="lm-AccordionPanel-titleLabel",r.textContent=e.label,r.title=e.caption||e.label,t}createTitleKey(e){let t=this._titleKeys.get(e);return void 0===t&&(t=`title-key-${this._uuid}-${this._titleID++}`,this._titleKeys.set(e,t)),t}}t._nInstance=0,e.Renderer=t,e.defaultRenderer=new t}(xe||(xe={})),function(e){e.createLayout=function(e){return e.layout||new pe({renderer:e.renderer||xe.defaultRenderer,orientation:e.orientation,alignment:e.alignment,spacing:e.spacing,titleSpace:e.titleSpace})}}(ve||(ve={}));var _e,be=class e extends le{constructor(e={}){super(),this._fixed=0,this._spacing=4,this._dirty=!1,this._sizers=[],this._items=[],this._box=null,this._alignment="start",this._direction="top-to-bottom",void 0!==e.direction&&(this._direction=e.direction),void 0!==e.alignment&&(this._alignment=e.alignment),void 0!==e.spacing&&(this._spacing=ue.clampDimension(e.spacing))}dispose(){for(let e of this._items)e.dispose();this._box=null,this._items.length=0,this._sizers.length=0,super.dispose()}get direction(){return this._direction}set direction(e){this._direction!==e&&(this._direction=e,this.parent&&(this.parent.dataset.direction=e,this.parent.fit()))}get alignment(){return this._alignment}set alignment(e){this._alignment!==e&&(this._alignment=e,this.parent&&(this.parent.dataset.alignment=e,this.parent.update()))}get spacing(){return this._spacing}set spacing(e){e=ue.clampDimension(e),this._spacing!==e&&(this._spacing=e,this.parent&&this.parent.fit())}init(){this.parent.dataset.direction=this.direction,this.parent.dataset.alignment=this.alignment,super.init()}attachWidget(e,t){b.ArrayExt.insert(this._items,e,new oe(t)),b.ArrayExt.insert(this._sizers,e,new ee),this.parent.isAttached&&M.sendMessage(t,ne.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.isAttached&&M.sendMessage(t,ne.Msg.AfterAttach),this.parent.fit()}moveWidget(e,t,r){b.ArrayExt.move(this._items,e,t),b.ArrayExt.move(this._sizers,e,t),this.parent.update()}detachWidget(e,t){let r=b.ArrayExt.removeAt(this._items,e);b.ArrayExt.removeAt(this._sizers,e),this.parent.isAttached&&M.sendMessage(t,ne.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&M.sendMessage(t,ne.Msg.AfterDetach),r.dispose(),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_fit(){let t=0;for(let e=0,r=this._items.length;e0)switch(this._alignment){case"start":break;case"center":c=0,u=n/2;break;case"end":c=0,u=n;break;case"justify":c=n/r,u=0;break;default:throw"unreachable"}for(let e=0,t=this._items.length;e0,coerce:(e,t)=>Math.max(0,Math.floor(t)),changed:t}),e.sizeBasisProperty=new I({name:"sizeBasis",create:()=>0,coerce:(e,t)=>Math.max(0,Math.floor(t)),changed:t}),e.isHorizontal=function(e){return"left-to-right"===e||"right-to-left"===e},e.clampSpacing=function(e){return Math.max(0,Math.floor(e))}}(_e||(_e={}));var we,Te=class extends me{constructor(e={}){super({layout:we.createLayout(e)}),this.addClass("lm-BoxPanel")}get direction(){return this.layout.direction}set direction(e){this.layout.direction=e}get alignment(){return this.layout.alignment}set alignment(e){this.layout.alignment=e}get spacing(){return this.layout.spacing}set spacing(e){this.layout.spacing=e}onChildAdded(e){e.child.addClass("lm-BoxPanel-child")}onChildRemoved(e){e.child.removeClass("lm-BoxPanel-child")}};!function(e){e.getStretch=function(e){return be.getStretch(e)},e.setStretch=function(e,t){be.setStretch(e,t)},e.getSizeBasis=function(e){return be.getSizeBasis(e)},e.setSizeBasis=function(e,t){be.setSizeBasis(e,t)}}(Te||(Te={})),function(e){e.createLayout=function(e){return e.layout||new be(e)}}(we||(we={}));var ke,Ae=class e extends ne{constructor(t){super({node:ke.createNode()}),this._activeIndex=-1,this._items=[],this._results=null,this.addClass("lm-CommandPalette"),this.setFlag(ne.Flag.DisallowLayout),this.commands=t.commands,this.renderer=t.renderer||e.defaultRenderer,this.commands.commandChanged.connect(this._onGenericChange,this),this.commands.keyBindingChanged.connect(this._onGenericChange,this)}dispose(){this._items.length=0,this._results=null,super.dispose()}get searchNode(){return this.node.getElementsByClassName("lm-CommandPalette-search")[0]}get inputNode(){return this.node.getElementsByClassName("lm-CommandPalette-input")[0]}get contentNode(){return this.node.getElementsByClassName("lm-CommandPalette-content")[0]}get items(){return this._items}addItem(e){let t=ke.createItem(this.commands,e);return this._items.push(t),this.refresh(),t}addItems(e){let t=e.map((e=>ke.createItem(this.commands,e)));return t.forEach((e=>this._items.push(e))),this.refresh(),t}removeItem(e){this.removeItemAt(this._items.indexOf(e))}removeItemAt(e){b.ArrayExt.removeAt(this._items,e)&&this.refresh()}clearItems(){0!==this._items.length&&(this._items.length=0,this.refresh())}refresh(){this._results=null,""!==this.inputNode.value?this.node.getElementsByClassName("lm-close-icon")[0].style.display="inherit":this.node.getElementsByClassName("lm-close-icon")[0].style.display="none",this.update()}handleEvent(e){switch(e.type){case"click":this._evtClick(e);break;case"keydown":this._evtKeyDown(e);break;case"input":this.refresh();break;case"focus":case"blur":this._toggleFocused()}}onBeforeAttach(e){this.node.addEventListener("click",this),this.node.addEventListener("keydown",this),this.node.addEventListener("input",this),this.node.addEventListener("focus",this,!0),this.node.addEventListener("blur",this,!0)}onAfterDetach(e){this.node.removeEventListener("click",this),this.node.removeEventListener("keydown",this),this.node.removeEventListener("input",this),this.node.removeEventListener("focus",this,!0),this.node.removeEventListener("blur",this,!0)}onAfterShow(e){this.update(),super.onAfterShow(e)}onActivateRequest(e){if(this.isAttached){let e=this.inputNode;e.focus(),e.select()}}onUpdateRequest(e){if(this.isHidden)return;let t=this.inputNode.value,r=this.contentNode,n=this._results;if(n||(n=this._results=ke.search(this._items,t),this._activeIndex=t?b.ArrayExt.findFirstIndex(n,ke.canActivate):-1),!t&&0===n.length)return void Z.render(null,r);if(t&&0===n.length){let e=this.renderer.renderEmptyMessage({query:t});return void Z.render(e,r)}let a=this.renderer,o=this._activeIndex,s=new Array(n.length);for(let e=0,t=n.length;e=n.length)r.scrollTop=0;else{let e=r.children[o];i.scrollIntoViewIfNeeded(r,e)}}_evtClick(e){if(0!==e.button)return;if(e.target.classList.contains("lm-close-icon"))return this.inputNode.value="",void this.refresh();let t=b.ArrayExt.findFirstIndex(this.contentNode.children,(t=>t.contains(e.target)));-1!==t&&(e.preventDefault(),e.stopPropagation(),this._execute(t))}_evtKeyDown(e){if(!(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey))switch(e.keyCode){case 13:e.preventDefault(),e.stopPropagation(),this._execute(this._activeIndex);break;case 38:e.preventDefault(),e.stopPropagation(),this._activatePreviousItem();break;case 40:e.preventDefault(),e.stopPropagation(),this._activateNextItem()}}_activateNextItem(){if(!this._results||0===this._results.length)return;let e=this._activeIndex,t=this._results.length,r=ee-t)),c=a.slice(0,l),u=a.slice(l);for(let e=0,t=u.length;er.command===e&&w.JSONExt.deepEqual(r.args,t)))||null}}}(ke||(ke={}));var Me,Se,Ee=class e extends ne{constructor(t){super({node:Me.createNode()}),this._childIndex=-1,this._activeIndex=-1,this._openTimerID=0,this._closeTimerID=0,this._items=[],this._childMenu=null,this._parentMenu=null,this._aboutToClose=new z(this),this._menuRequested=new z(this),this.addClass("lm-Menu"),this.setFlag(ne.Flag.DisallowLayout),this.commands=t.commands,this.renderer=t.renderer||e.defaultRenderer}dispose(){this.close(),this._items.length=0,super.dispose()}get aboutToClose(){return this._aboutToClose}get menuRequested(){return this._menuRequested}get parentMenu(){return this._parentMenu}get childMenu(){return this._childMenu}get rootMenu(){let e=this;for(;e._parentMenu;)e=e._parentMenu;return e}get leafMenu(){let e=this;for(;e._childMenu;)e=e._childMenu;return e}get contentNode(){return this.node.getElementsByClassName("lm-Menu-content")[0]}get activeItem(){return this._items[this._activeIndex]||null}set activeItem(e){this.activeIndex=e?this._items.indexOf(e):-1}get activeIndex(){return this._activeIndex}set activeIndex(e){(e<0||e>=this._items.length)&&(e=-1),-1!==e&&!Me.canActivate(this._items[e])&&(e=-1),this._activeIndex!==e&&(this._activeIndex=e,this._activeIndex>=0&&this.contentNode.childNodes[this._activeIndex]&&this.contentNode.childNodes[this._activeIndex].focus(),this.update())}get items(){return this._items}activateNextItem(){let e=this._items.length,t=this._activeIndex,r=t{this.activeIndex=e}})}Z.render(a,this.contentNode)}onCloseRequest(e){this._cancelOpenTimer(),this._cancelCloseTimer(),this.activeIndex=-1;let t=this._childMenu;t&&(this._childIndex=-1,this._childMenu=null,t._parentMenu=null,t.close());let r=this._parentMenu;r&&(this._parentMenu=null,r._childIndex=-1,r._childMenu=null,r.activate()),this.isAttached&&this._aboutToClose.emit(void 0),super.onCloseRequest(e)}_evtKeyDown(e){e.preventDefault(),e.stopPropagation();let t=e.keyCode;if(13===t)return void this.triggerActiveItem();if(27===t)return void this.close();if(37===t)return void(this._parentMenu?this.close():this._menuRequested.emit("previous"));if(38===t)return void this.activatePreviousItem();if(39===t){let e=this.activeItem;return void(e&&"submenu"===e.type?this.triggerActiveItem():this.rootMenu._menuRequested.emit("next"))}if(40===t)return void this.activateNextItem();let r=U().keyForKeydownEvent(e);if(!r)return;let n=this._activeIndex+1,i=Me.findMnemonic(this._items,r,n);-1===i.index||i.multiple?-1!==i.index?this.activeIndex=i.index:-1!==i.auto&&(this.activeIndex=i.auto):(this.activeIndex=i.index,this.triggerActiveItem())}_evtMouseUp(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),this.triggerActiveItem())}_evtMouseMove(e){let t=b.ArrayExt.findFirstIndex(this.contentNode.children,(t=>i.hitTest(t,e.clientX,e.clientY)));if(t===this._activeIndex)return;if(this.activeIndex=t,t=this.activeIndex,t===this._childIndex)return this._cancelOpenTimer(),void this._cancelCloseTimer();-1!==this._childIndex&&this._startCloseTimer(),this._cancelOpenTimer();let r=this.activeItem;!r||"submenu"!==r.type||!r.submenu||this._startOpenTimer()}_evtMouseEnter(e){for(let e=this._parentMenu;e;e=e._parentMenu)e._cancelOpenTimer(),e._cancelCloseTimer(),e.activeIndex=e._childIndex}_evtMouseLeave(e){if(this._cancelOpenTimer(),!this._childMenu)return void(this.activeIndex=-1);let{clientX:t,clientY:r}=e;i.hitTest(this._childMenu.node,t,r)?this._cancelCloseTimer():(this.activeIndex=-1,this._startCloseTimer())}_evtMouseDown(e){this._parentMenu||(Me.hitTestMenus(this,e.clientX,e.clientY)?(e.preventDefault(),e.stopPropagation()):this.close())}_openChildMenu(t=!1){let r=this.activeItem;if(!r||"submenu"!==r.type||!r.submenu)return void this._closeChildMenu();let n=r.submenu;if(n===this._childMenu)return;e.saveWindowData(),this._closeChildMenu(),this._childMenu=n,this._childIndex=this._activeIndex,n._parentMenu=this,M.sendMessage(this,ne.Msg.UpdateRequest);let i=this.contentNode.children[this._activeIndex];Me.openSubmenu(n,i),t&&(n.activeIndex=-1,n.activateNextItem()),n.activate()}_closeChildMenu(){this._childMenu&&this._childMenu.close()}_startOpenTimer(){0===this._openTimerID&&(this._openTimerID=window.setTimeout((()=>{this._openTimerID=0,this._openChildMenu()}),Me.TIMER_DELAY))}_startCloseTimer(){0===this._closeTimerID&&(this._closeTimerID=window.setTimeout((()=>{this._closeTimerID=0,this._closeChildMenu()}),Me.TIMER_DELAY))}_cancelOpenTimer(){0!==this._openTimerID&&(clearTimeout(this._openTimerID),this._openTimerID=0)}_cancelCloseTimer(){0!==this._closeTimerID&&(clearTimeout(this._closeTimerID),this._closeTimerID=0)}static saveWindowData(){Me.saveWindowData()}};!function(e){class t{renderItem(e){let t=this.createItemClass(e),r=this.createItemDataset(e),n=this.createItemARIA(e);return J.li({className:t,dataset:r,tabindex:"0",onfocus:e.onfocus,...n},this.renderIcon(e),this.renderLabel(e),this.renderShortcut(e),this.renderSubmenu(e))}renderIcon(e){let t=this.createIconClass(e);return J.div({className:t},e.item.icon,e.item.iconLabel)}renderLabel(e){let t=this.formatLabel(e);return J.div({className:"lm-Menu-itemLabel"},t)}renderShortcut(e){let t=this.formatShortcut(e);return J.div({className:"lm-Menu-itemShortcut"},t)}renderSubmenu(e){return J.div({className:"lm-Menu-itemSubmenuIcon"})}createItemClass(e){let t="lm-Menu-item";e.item.isEnabled||(t+=" lm-mod-disabled"),e.item.isToggled&&(t+=" lm-mod-toggled"),e.item.isVisible||(t+=" lm-mod-hidden"),e.active&&(t+=" lm-mod-active"),e.collapsed&&(t+=" lm-mod-collapsed");let r=e.item.className;return r&&(t+=` ${r}`),t}createItemDataset(e){let t,{type:r,command:n,dataset:i}=e.item;return t="command"===r?{...i,type:r,command:n}:{...i,type:r},t}createIconClass(e){let t="lm-Menu-itemIcon",r=e.item.iconClass;return r?`${t} ${r}`:t}createItemARIA(e){let t={};switch(e.item.type){case"separator":t.role="presentation";break;case"submenu":t["aria-haspopup"]="true",e.item.isEnabled||(t["aria-disabled"]="true");break;default:e.item.isEnabled||(t["aria-disabled"]="true"),t.role="menuitem"}return t}formatLabel(e){let{label:t,mnemonic:r}=e.item;if(r<0||r>=t.length)return t;let n=t.slice(0,r),i=t.slice(r+1),a=t[r];return[n,J.span({className:"lm-Menu-itemMnemonic"},a),i]}formatShortcut(e){let t=e.item.keyBinding;return t?W.formatKeystroke(t.keys):null}}e.Renderer=t,e.defaultRenderer=new t}(Ee||(Ee={})),function(e){e.TIMER_DELAY=300,e.SUBMENU_OVERLAP=3;let t=null,r=0;function n(){return r>0?(r--,t):o()}function a(e){return"separator"!==e.type&&e.isEnabled&&e.isVisible}function o(){return{pageXOffset:window.pageXOffset,pageYOffset:window.pageYOffset,clientWidth:document.documentElement.clientWidth,clientHeight:document.documentElement.clientHeight}}e.saveWindowData=function(){t=o(),r++},e.createNode=function(){let e=document.createElement("div"),t=document.createElement("ul");return t.className="lm-Menu-content",e.appendChild(t),t.setAttribute("role","menu"),e.tabIndex=0,e},e.canActivate=a,e.createItem=function(e,t){return new s(e.commands,t)},e.hitTestMenus=function(e,t,r){for(let n=e;n;n=n.childMenu)if(i.hitTest(n.node,t,r))return!0;return!1},e.computeCollapsed=function(e){let t=new Array(e.length);b.ArrayExt.fill(t,!1);let r=0,n=e.length;for(;r=0;--i){let r=e[i];if(r.isVisible){if("separator"!==r.type)break;t[i]=!0}}let a=!1;for(;++rc+h&&(t=c+h-g),!a&&r+y>u+f&&(r>u+f?r=u+f-y:r-=y),m.transform=`translate(${Math.max(0,t)}px, ${Math.max(0,r)}px`,m.opacity="1"},e.openSubmenu=function(t,r){let a=n(),o=a.pageXOffset,s=a.pageYOffset,l=a.clientWidth,c=a.clientHeight;M.sendMessage(t,ne.Msg.UpdateRequest);let u=c,h=t.node,f=h.style;f.opacity="0",f.maxHeight=`${u}px`,ne.attach(t,document.body);let{width:p,height:d}=h.getBoundingClientRect(),m=i.boxSizing(t.node),g=r.getBoundingClientRect(),y=g.right-e.SUBMENU_OVERLAP;y+p>o+l&&(y=g.left+e.SUBMENU_OVERLAP-p);let v=g.top-m.borderTop-m.paddingTop;v+d>s+c&&(v=g.bottom+m.borderBottom+m.paddingBottom-d),f.transform=`translate(${Math.max(0,y)}px, ${Math.max(0,v)}px`,f.opacity="1"},e.findMnemonic=function(e,t,r){let n=-1,i=-1,o=!1,s=t.toUpperCase();for(let t=0,l=e.length;t=0&&fr.command===e&&w.JSONExt.deepEqual(r.args,t)))||null}return null}}}(Me||(Me={})),function(e){function t(e,t){let r=e.rank,n=t.rank;return r!==n?r=this._titles.length)&&(e=-1),this._currentIndex===e)return;let t=this._currentIndex,r=this._titles[t]||null,n=e,i=this._titles[n]||null;this._currentIndex=n,this._previousTitle=r,this.update(),this._currentChanged.emit({previousIndex:t,previousTitle:r,currentIndex:n,currentTitle:i})}get name(){return this._name}set name(e){this._name=e,e?this.contentNode.setAttribute("aria-label",e):this.contentNode.removeAttribute("aria-label")}get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._releaseMouse(),this._orientation=e,this.dataset.orientation=e,this.contentNode.setAttribute("aria-orientation",e))}get addButtonEnabled(){return this._addButtonEnabled}set addButtonEnabled(e){this._addButtonEnabled!==e&&(this._addButtonEnabled=e,e?this.addButtonNode.classList.remove("lm-mod-hidden"):this.addButtonNode.classList.add("lm-mod-hidden"))}get titles(){return this._titles}get contentNode(){return this.node.getElementsByClassName("lm-TabBar-content")[0]}get addButtonNode(){return this.node.getElementsByClassName("lm-TabBar-addButton")[0]}addTab(e){return this.insertTab(this._titles.length,e)}insertTab(e,t){this._releaseMouse();let r=Ce.asTitle(t),n=this._titles.indexOf(r),i=Math.max(0,Math.min(e,this._titles.length));return-1===n?(b.ArrayExt.insert(this._titles,i,r),r.changed.connect(this._onTitleChanged,this),this.update(),this._adjustCurrentForInsert(i,r),r):(i===this._titles.length&&i--,n===i||(b.ArrayExt.move(this._titles,n,i),this.update(),this._adjustCurrentForMove(n,i)),r)}removeTab(e){this.removeTabAt(this._titles.indexOf(e))}removeTabAt(e){this._releaseMouse();let t=b.ArrayExt.removeAt(this._titles,e);t&&(t.changed.disconnect(this._onTitleChanged,this),t===this._previousTitle&&(this._previousTitle=null),this.update(),this._adjustCurrentForRemove(e,t))}clearTabs(){if(0===this._titles.length)return;this._releaseMouse();for(let e of this._titles)e.changed.disconnect(this._onTitleChanged,this);let e=this.currentIndex,t=this.currentTitle;this._currentIndex=-1,this._previousTitle=null,this._titles.length=0,this.update(),-1!==e&&this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:-1,currentTitle:null})}releaseMouse(){this._releaseMouse()}handleEvent(e){switch(e.type){case"pointerdown":this._evtPointerDown(e);break;case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"dblclick":this._evtDblClick(e);break;case"keydown":e.eventPhase===Event.CAPTURING_PHASE?this._evtKeyDownCapturing(e):this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("pointerdown",this),this.node.addEventListener("dblclick",this),this.node.addEventListener("keydown",this)}onAfterDetach(e){this.node.removeEventListener("pointerdown",this),this.node.removeEventListener("dblclick",this),this.node.removeEventListener("keydown",this),this._releaseMouse()}onUpdateRequest(e){var t;let r=this._titles,n=this.renderer,i=this.currentTitle,a=new Array(r.length),o=null!==(t=this._getCurrentTabindex())&&void 0!==t?t:this._currentIndex>-1?this._currentIndex:0;for(let e=0,t=r.length;ei.hitTest(t,e.clientX,e.clientY)));if(-1===r)return;let n=this.titles[r],a=t[r].querySelector(".lm-TabBar-tabLabel");if(a&&a.contains(e.target)){let e=n.label||"",t=a.innerHTML;a.innerHTML="";let r=document.createElement("input");r.classList.add("lm-TabBar-tabInput"),r.value=e,a.appendChild(r);let i=()=>{r.removeEventListener("blur",i),a.innerHTML=t,this.node.addEventListener("keydown",this)};r.addEventListener("dblclick",(e=>e.stopPropagation())),r.addEventListener("blur",i),r.addEventListener("keydown",(e=>{"Enter"===e.key?(""!==r.value&&(n.label=n.caption=r.value),i()):"Escape"===e.key&&i()})),this.node.removeEventListener("keydown",this),r.select(),r.focus(),a.children.length>0&&a.children[0].focus()}}_evtKeyDownCapturing(e){e.eventPhase===Event.CAPTURING_PHASE&&(e.preventDefault(),e.stopPropagation(),"Escape"===e.key&&this._releaseMouse())}_evtKeyDown(e){var t,r,n;if("Tab"!==e.key&&e.eventPhase!==Event.CAPTURING_PHASE)if("Enter"===e.key||"Spacebar"===e.key||" "===e.key){let t=document.activeElement;if(this.addButtonEnabled&&this.addButtonNode.contains(t))e.preventDefault(),e.stopPropagation(),this._addRequested.emit();else{let r=b.ArrayExt.findFirstIndex(this.contentNode.children,(e=>e.contains(t)));r>=0&&(e.preventDefault(),e.stopPropagation(),this.currentIndex=r)}}else if(Ie.includes(e.key)){let i=[...this.contentNode.children];if(this.addButtonEnabled&&i.push(this.addButtonNode),i.length<=1)return;e.preventDefault(),e.stopPropagation();let a,o=i.indexOf(document.activeElement);-1===o&&(o=this._currentIndex),"ArrowRight"===e.key&&"horizontal"===this._orientation||"ArrowDown"===e.key&&"vertical"===this._orientation?a=null!==(t=i[o+1])&&void 0!==t?t:i[0]:"ArrowLeft"===e.key&&"horizontal"===this._orientation||"ArrowUp"===e.key&&"vertical"===this._orientation?a=null!==(r=i[o-1])&&void 0!==r?r:i[i.length-1]:"Home"===e.key?a=i[0]:"End"===e.key&&(a=i[i.length-1]),a&&(null===(n=i[o])||void 0===n||n.setAttribute("tabindex","-1"),a?.setAttribute("tabindex","0"),a.focus())}}_evtPointerDown(e){if(0!==e.button&&1!==e.button||this._dragData||e.target.classList.contains("lm-TabBar-tabInput"))return;let t=this.addButtonEnabled&&this.addButtonNode.contains(e.target),r=this.contentNode.children,n=b.ArrayExt.findFirstIndex(r,(t=>i.hitTest(t,e.clientX,e.clientY)));if(-1===n&&!t||(e.preventDefault(),e.stopPropagation(),this._dragData={tab:r[n],index:n,pressX:e.clientX,pressY:e.clientY,tabPos:-1,tabSize:-1,tabPressPos:-1,targetIndex:-1,tabLayout:null,contentRect:null,override:null,dragActive:!1,dragAborted:!1,detachRequested:!1},this.document.addEventListener("pointerup",this,!0),1===e.button||t))return;let a=r[n].querySelector(this.renderer.closeIconSelector);a&&a.contains(e.target)||(this.tabsMovable&&(this.document.addEventListener("pointermove",this,!0),this.document.addEventListener("keydown",this,!0),this.document.addEventListener("contextmenu",this,!0)),this.allowDeselect&&this.currentIndex===n?this.currentIndex=-1:this.currentIndex=n,-1!==this.currentIndex&&this._tabActivateRequested.emit({index:this.currentIndex,title:this.currentTitle}))}_evtPointerMove(e){let t=this._dragData;if(!t)return;e.preventDefault(),e.stopPropagation();let r=this.contentNode.children;if(t.dragActive||Ce.dragExceeded(t,e)){if(!t.dragActive){let e=t.tab.getBoundingClientRect();"horizontal"===this._orientation?(t.tabPos=t.tab.offsetLeft,t.tabSize=e.width,t.tabPressPos=t.pressX-e.left):(t.tabPos=t.tab.offsetTop,t.tabSize=e.height,t.tabPressPos=t.pressY-e.top),t.tabPressOffset={x:t.pressX-e.left,y:t.pressY-e.top},t.tabLayout=Ce.snapTabLayout(r,this._orientation),t.contentRect=this.contentNode.getBoundingClientRect(),t.override=B.overrideCursor("default"),t.tab.classList.add("lm-mod-dragging"),this.addClass("lm-mod-dragging"),t.dragActive=!0}if(!t.detachRequested&&Ce.detachExceeded(t,e)){t.detachRequested=!0;let n=t.index,i=e.clientX,a=e.clientY,o=r[n],s=this._titles[n];if(this._tabDetachRequested.emit({index:n,title:s,tab:o,clientX:i,clientY:a,offset:t.tabPressOffset}),t.dragAborted)return}Ce.layoutTabs(r,t,e,this._orientation)}}_evtPointerUp(e){if(0!==e.button&&1!==e.button)return;let t=this._dragData;if(!t)return;if(e.preventDefault(),e.stopPropagation(),this.document.removeEventListener("pointermove",this,!0),this.document.removeEventListener("pointerup",this,!0),this.document.removeEventListener("keydown",this,!0),this.document.removeEventListener("contextmenu",this,!0),!t.dragActive){if(this._dragData=null,this.addButtonEnabled&&this.addButtonNode.contains(e.target))return void this._addRequested.emit(void 0);let r=this.contentNode.children,n=b.ArrayExt.findFirstIndex(r,(t=>i.hitTest(t,e.clientX,e.clientY)));if(n!==t.index)return;let a=this._titles[n];if(!a.closable)return;if(1===e.button)return void this._tabCloseRequested.emit({index:n,title:a});let o=r[n].querySelector(this.renderer.closeIconSelector);return o&&o.contains(e.target)?void this._tabCloseRequested.emit({index:n,title:a}):void 0}if(0!==e.button)return;Ce.finalizeTabPosition(t,this._orientation),t.tab.classList.remove("lm-mod-dragging");let r=Ce.parseTransitionDuration(t.tab);setTimeout((()=>{if(t.dragAborted)return;this._dragData=null,Ce.resetTabPositions(this.contentNode.children,this._orientation),t.override.dispose(),this.removeClass("lm-mod-dragging");let e=t.index,r=t.targetIndex;-1===r||e===r||(b.ArrayExt.move(this._titles,e,r),this._adjustCurrentForMove(e,r),this._tabMoved.emit({fromIndex:e,toIndex:r,title:this._titles[r]}),M.sendMessage(this,ne.Msg.UpdateRequest))}),r)}_releaseMouse(){let e=this._dragData;e&&(this._dragData=null,this.document.removeEventListener("pointermove",this,!0),this.document.removeEventListener("pointerup",this,!0),this.document.removeEventListener("keydown",this,!0),this.document.removeEventListener("contextmenu",this,!0),e.dragAborted=!0,e.dragActive&&(Ce.resetTabPositions(this.contentNode.children,this._orientation),e.override.dispose(),e.tab.classList.remove("lm-mod-dragging"),this.removeClass("lm-mod-dragging")))}_adjustCurrentForInsert(e,t){let r=this.currentTitle,n=this._currentIndex,i=this.insertBehavior;if("select-tab"===i||"select-tab-if-needed"===i&&-1===n)return this._currentIndex=e,this._previousTitle=r,void this._currentChanged.emit({previousIndex:n,previousTitle:r,currentIndex:e,currentTitle:t});n>=e&&this._currentIndex++}_adjustCurrentForMove(e,t){this._currentIndex===e?this._currentIndex=t:this._currentIndex=t?this._currentIndex++:this._currentIndex>e&&this._currentIndex<=t&&this._currentIndex--}_adjustCurrentForRemove(e,t){let r=this._currentIndex,n=this.removeBehavior;if(r===e)return 0===this._titles.length?(this._currentIndex=-1,void this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:-1,currentTitle:null})):"select-tab-after"===n?(this._currentIndex=Math.min(e,this._titles.length-1),void this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:this._currentIndex,currentTitle:this.currentTitle})):"select-tab-before"===n?(this._currentIndex=Math.max(0,e-1),void this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:this._currentIndex,currentTitle:this.currentTitle})):"select-previous-tab"===n?(this._previousTitle?(this._currentIndex=this._titles.indexOf(this._previousTitle),this._previousTitle=null):this._currentIndex=Math.min(e,this._titles.length-1),void this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:this._currentIndex,currentTitle:this.currentTitle})):(this._currentIndex=-1,void this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:-1,currentTitle:null}));r>e&&this._currentIndex--}_onTitleChanged(e){this.update()}};!function(e){class t{constructor(){this.closeIconSelector=".lm-TabBar-tabCloseIcon",this._tabID=0,this._tabKeys=new WeakMap,this._uuid=++t._nInstance}renderTab(e){let t=e.title.caption,r=this.createTabKey(e),n=r,i=this.createTabStyle(e),a=this.createTabClass(e),o=this.createTabDataset(e),s=this.createTabARIA(e);return e.title.closable?J.li({id:n,key:r,className:a,title:t,style:i,dataset:o,...s},this.renderIcon(e),this.renderLabel(e),this.renderCloseIcon(e)):J.li({id:n,key:r,className:a,title:t,style:i,dataset:o,...s},this.renderIcon(e),this.renderLabel(e))}renderIcon(e){let{title:t}=e,r=this.createIconClass(e);return J.div({className:r},t.icon,t.iconLabel)}renderLabel(e){return J.div({className:"lm-TabBar-tabLabel"},e.title.label)}renderCloseIcon(e){return J.div({className:"lm-TabBar-tabCloseIcon"})}createTabKey(e){let t=this._tabKeys.get(e.title);return void 0===t&&(t=`tab-key-${this._uuid}-${this._tabID++}`,this._tabKeys.set(e.title,t)),t}createTabStyle(e){return{zIndex:`${e.zIndex}`}}createTabClass(e){let t="lm-TabBar-tab";return e.title.className&&(t+=` ${e.title.className}`),e.title.closable&&(t+=" lm-mod-closable"),e.current&&(t+=" lm-mod-current"),t}createTabDataset(e){return e.title.dataset}createTabARIA(e){var t;return{role:"tab","aria-selected":e.current.toString(),tabindex:`${null!==(t=e.tabIndex)&&void 0!==t?t:"-1"}`}}createIconClass(e){let t="lm-TabBar-tabIcon",r=e.title.iconClass;return r?`${t} ${r}`:t}}t._nInstance=0,e.Renderer=t,e.defaultRenderer=new t,e.addButtonSelector=".lm-TabBar-addButton"}(Le||(Le={})),function(e){e.DRAG_THRESHOLD=5,e.DETACH_THRESHOLD=20,e.createNode=function(){let e=document.createElement("div"),t=document.createElement("ul");t.setAttribute("role","tablist"),t.className="lm-TabBar-content",e.appendChild(t);let r=document.createElement("div");return r.className="lm-TabBar-addButton lm-mod-hidden",r.setAttribute("tabindex","-1"),r.setAttribute("role","button"),e.appendChild(r),e},e.asTitle=function(e){return e instanceof re?e:new re(e)},e.parseTransitionDuration=function(e){let t=window.getComputedStyle(e);return 1e3*(parseFloat(t.transitionDuration)||0)},e.snapTabLayout=function(e,t){let r=new Array(e.length);for(let n=0,i=e.length;n=e.DRAG_THRESHOLD||i>=e.DRAG_THRESHOLD},e.detachExceeded=function(t,r){let n=t.contentRect;return r.clientX=n.right+e.DETACH_THRESHOLD||r.clientY=n.bottom+e.DETACH_THRESHOLD},e.layoutTabs=function(e,t,r,n){let i,a,o,s;"horizontal"===n?(i=t.pressX,a=r.clientX-t.contentRect.left,o=r.clientX,s=t.contentRect.width):(i=t.pressY,a=r.clientY-t.contentRect.top,o=r.clientY,s=t.contentRect.height);let l=t.index,c=a-t.tabPressPos,u=c+t.tabSize;for(let r=0,a=e.length;r>1);if(rt.index&&u>f)a=-t.tabSize-h.margin+"px",l=Math.max(l,r);else if(r===t.index){let e=o-i,r=s-(t.tabPos+t.tabSize);a=`${Math.max(-t.tabPos,Math.min(e,r))}px`}else a="";"horizontal"===n?e[r].style.left=a:e[r].style.top=a}t.targetIndex=l},e.finalizeTabPosition=function(e,t){let r,n;if(r="horizontal"===t?e.contentRect.width:e.contentRect.height,e.targetIndex===e.index)n=0;else if(e.targetIndex>e.index){let t=e.tabLayout[e.targetIndex];n=t.pos+t.size-e.tabSize-e.tabPos}else n=e.tabLayout[e.targetIndex].pos-e.tabPos;let i=r-(e.tabPos+e.tabSize),a=Math.max(-e.tabPos,Math.min(n,i));"horizontal"===t?e.tab.style.left=`${a}px`:e.tab.style.top=`${a}px`},e.resetTabPositions=function(e,t){for(let r of e)"horizontal"===t?r.style.left="":r.style.top=""}}(Ce||(Ce={}));var Pe,ze=class extends ie{constructor(e){super(),this._spacing=4,this._dirty=!1,this._root=null,this._box=null,this._items=new Map,this.renderer=e.renderer,void 0!==e.spacing&&(this._spacing=ue.clampDimension(e.spacing)),this._document=e.document||document,this._hiddenMode=void 0!==e.hiddenMode?e.hiddenMode:ne.HiddenMode.Display}dispose(){let e=this[Symbol.iterator]();this._items.forEach((e=>{e.dispose()})),this._box=null,this._root=null,this._items.clear();for(let t of e)t.dispose();super.dispose()}get hiddenMode(){return this._hiddenMode}set hiddenMode(e){if(this._hiddenMode!==e){this._hiddenMode=e;for(let e of this.tabBars())if(e.titles.length>1)for(let t of e.titles)t.owner.hiddenMode=this._hiddenMode}}get spacing(){return this._spacing}set spacing(e){e=ue.clampDimension(e),this._spacing!==e&&(this._spacing=e,this.parent&&this.parent.fit())}get isEmpty(){return null===this._root}[Symbol.iterator](){return this._root?this._root.iterAllWidgets():(0,b.empty)()}widgets(){return this._root?this._root.iterUserWidgets():(0,b.empty)()}selectedWidgets(){return this._root?this._root.iterSelectedWidgets():(0,b.empty)()}tabBars(){return this._root?this._root.iterTabBars():(0,b.empty)()}handles(){return this._root?this._root.iterHandles():(0,b.empty)()}moveHandle(e,t,r){let n=e.classList.contains("lm-mod-hidden");if(!this._root||n)return;let i,a=this._root.findSplitNode(e);a&&(i="horizontal"===a.node.orientation?t-e.offsetLeft:r-e.offsetTop,0!==i&&(a.node.holdSizes(),Q.adjust(a.node.sizers,a.index,i),this.parent&&this.parent.update()))}saveLayout(){return this._root?(this._root.holdAllSizes(),{main:this._root.createConfig()}):{main:null}}restoreLayout(e){let t,r=new Set;t=e.main?Pe.normalizeAreaConfig(e.main,r):null;let n=this.widgets(),i=this.tabBars(),a=this.handles();this._root=null;for(let e of n)r.has(e)||(e.parent=null);for(let e of i)e.dispose();for(let e of a)e.parentNode&&e.parentNode.removeChild(e);for(let e of r)e.parent=this.parent;this._root=t?Pe.realizeAreaConfig(t,{createTabBar:e=>this._createTabBar(),createHandle:()=>this._createHandle()},this._document):null,this.parent&&(r.forEach((e=>{this.attachWidget(e)})),this.parent.fit())}addWidget(e,t={}){let r=t.ref||null,n=t.mode||"tab-after",i=null;if(this._root&&r&&(i=this._root.findTabNode(r)),r&&!i)throw new Error("Reference widget is not in the layout.");switch(e.parent=this.parent,n){case"tab-after":this._insertTab(e,r,i,!0);break;case"tab-before":this._insertTab(e,r,i,!1);break;case"split-top":this._insertSplit(e,r,i,"vertical",!1);break;case"split-left":this._insertSplit(e,r,i,"horizontal",!1);break;case"split-right":this._insertSplit(e,r,i,"horizontal",!0);break;case"split-bottom":this._insertSplit(e,r,i,"vertical",!0);break;case"merge-top":this._insertSplit(e,r,i,"vertical",!1,!0);break;case"merge-left":this._insertSplit(e,r,i,"horizontal",!1,!0);break;case"merge-right":this._insertSplit(e,r,i,"horizontal",!0,!0);break;case"merge-bottom":this._insertSplit(e,r,i,"vertical",!0,!0)}this.parent&&(this.attachWidget(e),this.parent.fit())}removeWidget(e){this._removeWidget(e),this.parent&&(this.detachWidget(e),this.parent.fit())}hitTestTabAreas(e,t){if(!this._root||!this.parent||!this.parent.isVisible)return null;this._box||(this._box=i.boxSizing(this.parent.node));let r=this.parent.node.getBoundingClientRect(),n=e-r.left-this._box.borderLeft,a=t-r.top-this._box.borderTop,o=this._root.hitTestTabNodes(n,a);if(!o)return null;let{tabBar:s,top:l,left:c,width:u,height:h}=o,f=this._box.borderLeft+this._box.borderRight,p=this._box.borderTop+this._box.borderBottom;return{tabBar:s,x:n,y:a,top:l,left:c,right:r.width-f-(c+u),bottom:r.height-p-(l+h),width:u,height:h}}init(){super.init();for(let e of this)this.attachWidget(e);for(let e of this.handles())this.parent.node.appendChild(e);this.parent.fit()}attachWidget(e){this.parent.node!==e.node.parentNode&&(this._items.set(e,new oe(e)),this.parent.isAttached&&M.sendMessage(e,ne.Msg.BeforeAttach),this.parent.node.appendChild(e.node),this.parent.isAttached&&M.sendMessage(e,ne.Msg.AfterAttach))}detachWidget(e){if(this.parent.node!==e.node.parentNode)return;this.parent.isAttached&&M.sendMessage(e,ne.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.isAttached&&M.sendMessage(e,ne.Msg.AfterDetach);let t=this._items.get(e);t&&(this._items.delete(e),t.dispose())}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_removeWidget(e){if(!this._root)return;let t=this._root.findTabNode(e);if(!t)return;if(Pe.removeAria(e),t.tabBar.titles.length>1)return t.tabBar.removeTab(e.title),void(this._hiddenMode===ne.HiddenMode.Scale&&1==t.tabBar.titles.length&&(t.tabBar.titles[0].owner.hiddenMode=ne.HiddenMode.Display));if(t.tabBar.dispose(),this._root===t)return void(this._root=null);this._root.holdAllSizes();let r=t.parent;t.parent=null;let n=b.ArrayExt.removeFirstOf(r.children,t),i=b.ArrayExt.removeAt(r.handles,n);if(b.ArrayExt.removeAt(r.sizers,n),i.parentNode&&i.parentNode.removeChild(i),r.children.length>1)return void r.syncHandles();let a=r.parent;r.parent=null;let o=r.children[0],s=r.handles[0];if(r.children.length=0,r.handles.length=0,r.sizers.length=0,s.parentNode&&s.parentNode.removeChild(s),this._root===r)return o.parent=null,void(this._root=o);let l=a,c=l.children.indexOf(r);if(o instanceof Pe.TabLayoutNode)return o.parent=l,void(l.children[c]=o);let u=b.ArrayExt.removeAt(l.handles,c);b.ArrayExt.removeAt(l.children,c),b.ArrayExt.removeAt(l.sizers,c),u.parentNode&&u.parentNode.removeChild(u);for(let e=0,t=o.children.length;e=r.length)&&(n=0),{type:"tab-area",widgets:r,currentIndex:n}}(t,r):function(t,r){let n=t.orientation,i=[],a=[];for(let o=0,s=t.children.length;o{let l=i(n,r,a),c=t(e.sizes[s]),u=r.createHandle();o.children.push(l),o.handles.push(u),o.sizers.push(c),l.parent=o})),o.syncHandles(),o.normalizeSizes(),o}(a,o,s),l};class r{constructor(e){this.parent=null,this._top=0,this._left=0,this._width=0,this._height=0;let t=new ee,r=new ee;t.stretch=0,r.stretch=1,this.tabBar=e,this.sizers=[t,r]}get top(){return this._top}get left(){return this._left}get width(){return this._width}get height(){return this._height}*iterAllWidgets(){yield this.tabBar,yield*this.iterUserWidgets()}*iterUserWidgets(){for(let e of this.tabBar.titles)yield e.owner}*iterSelectedWidgets(){let e=this.tabBar.currentTitle;e&&(yield e.owner)}*iterTabBars(){yield this.tabBar}*iterHandles(){}findTabNode(e){return-1!==this.tabBar.titles.indexOf(e.title)?this:null}findSplitNode(e){return null}findFirstTabNode(){return this}hitTestTabNodes(e,t){return e=this._left+this._width||t=this._top+this._height?null:this}createConfig(){return{type:"tab-area",widgets:this.tabBar.titles.map((e=>e.owner)),currentIndex:this.tabBar.currentIndex}}holdAllSizes(){}fit(e,t){let r=0,n=0,i=t.get(this.tabBar),a=this.tabBar.currentTitle,o=a?t.get(a.owner):void 0,[s,l]=this.sizers;return i&&i.fit(),o&&o.fit(),i&&!i.isHidden?(r=Math.max(r,i.minWidth),n+=i.minHeight,s.minSize=i.minHeight,s.maxSize=i.maxHeight):(s.minSize=0,s.maxSize=0),o&&!o.isHidden?(r=Math.max(r,o.minWidth),n+=o.minHeight,l.minSize=o.minHeight,l.maxSize=1/0):(l.minSize=0,l.maxSize=1/0),{minWidth:r,minHeight:n,maxWidth:1/0,maxHeight:1/0}}update(e,t,r,n,i,a){this._top=t,this._left=e,this._width=r,this._height=n;let o=a.get(this.tabBar),s=this.tabBar.currentTitle,l=s?a.get(s.owner):void 0;if(Q.calc(this.sizers,n),o&&!o.isHidden){let n=this.sizers[0].size;o.update(e,t,r,n),t+=n}if(l&&!l.isHidden){let n=this.sizers[1].size;l.update(e,t,r,n)}}}e.TabLayoutNode=r;class n{constructor(e){this.parent=null,this.normalized=!1,this.children=[],this.sizers=[],this.handles=[],this.orientation=e}*iterAllWidgets(){for(let e of this.children)yield*e.iterAllWidgets()}*iterUserWidgets(){for(let e of this.children)yield*e.iterUserWidgets()}*iterSelectedWidgets(){for(let e of this.children)yield*e.iterSelectedWidgets()}*iterTabBars(){for(let e of this.children)yield*e.iterTabBars()}*iterHandles(){yield*this.handles;for(let e of this.children)yield*e.iterHandles()}findTabNode(e){for(let t=0,r=this.children.length;te.createConfig())),sizes:t}}syncHandles(){this.handles.forEach(((e,t)=>{e.setAttribute("data-orientation",this.orientation),t===this.handles.length-1?e.classList.add("lm-mod-hidden"):e.classList.remove("lm-mod-hidden")}))}holdSizes(){for(let e of this.sizers)e.sizeHint=e.size}holdAllSizes(){for(let e of this.children)e.holdAllSizes();this.holdSizes()}normalizeSizes(){let e=this.sizers.length;if(0===e)return;this.holdSizes();let t=this.sizers.reduce(((e,t)=>e+t.sizeHint),0);if(0===t)for(let t of this.sizers)t.size=t.sizeHint=1/e;else for(let e of this.sizers)e.size=e.sizeHint/=t;this.normalized=!0}createNormalizedSizes(){let e=this.sizers.length;if(0===e)return[];let t=this.sizers.map((e=>e.size)),r=t.reduce(((e,t)=>e+t),0);if(0===r)for(let r=t.length-1;r>-1;r--)t[r]=1/e;else for(let e=t.length-1;e>-1;e--)t[e]/=r;return t}fit(e,t){let r="horizontal"===this.orientation,n=Math.max(0,this.children.length-1)*e,i=r?n:0,a=r?0:n;for(let n=0,o=this.children.length;nthis._createTabBar(),createHandle:()=>this._createHandle()};this.layout=new ze({document:this._document,renderer:r,spacing:t.spacing,hiddenMode:t.hiddenMode}),this.overlay=t.overlay||new e.Overlay,this.node.appendChild(this.overlay.node)}dispose(){this._releaseMouse(),this.overlay.hide(0),this._drag&&this._drag.dispose(),super.dispose()}get hiddenMode(){return this.layout.hiddenMode}set hiddenMode(e){this.layout.hiddenMode=e}get layoutModified(){return this._layoutModified}get addRequested(){return this._addRequested}get renderer(){return this.layout.renderer}get spacing(){return this.layout.spacing}set spacing(e){this.layout.spacing=e}get mode(){return this._mode}set mode(e){if(this._mode===e)return;this._mode=e,this.dataset.mode=e;let t=this.layout;switch(e){case"multiple-document":for(let e of t.tabBars())e.show();break;case"single-document":t.restoreLayout(De.createSingleDocumentConfig(this));break;default:throw"unreachable"}M.postMessage(this,De.LayoutModified)}get tabsMovable(){return this._tabsMovable}set tabsMovable(e){this._tabsMovable=e;for(let t of this.tabBars())t.tabsMovable=e}get tabsConstrained(){return this._tabsConstrained}set tabsConstrained(e){this._tabsConstrained=e}get addButtonEnabled(){return this._addButtonEnabled}set addButtonEnabled(e){this._addButtonEnabled=e;for(let t of this.tabBars())t.addButtonEnabled=e}get isEmpty(){return this.layout.isEmpty}*widgets(){yield*this.layout.widgets()}*selectedWidgets(){yield*this.layout.selectedWidgets()}*tabBars(){yield*this.layout.tabBars()}*handles(){yield*this.layout.handles()}selectWidget(e){let t=(0,b.find)(this.tabBars(),(t=>-1!==t.titles.indexOf(e.title)));if(!t)throw new Error("Widget is not contained in the dock panel.");t.currentTitle=e.title}activateWidget(e){this.selectWidget(e),e.activate()}saveLayout(){return this.layout.saveLayout()}restoreLayout(e){this._mode="multiple-document",this.layout.restoreLayout(e),(a.IS_EDGE||a.IS_IE)&&M.flush(),M.postMessage(this,De.LayoutModified)}addWidget(e,t={}){"single-document"===this._mode?this.layout.addWidget(e):this.layout.addWidget(e,t),M.postMessage(this,De.LayoutModified)}processMessage(e){"layout-modified"===e.type?this._layoutModified.emit(void 0):super.processMessage(e)}handleEvent(e){switch(e.type){case"lm-dragenter":this._evtDragEnter(e);break;case"lm-dragleave":this._evtDragLeave(e);break;case"lm-dragover":this._evtDragOver(e);break;case"lm-drop":this._evtDrop(e);break;case"pointerdown":this._evtPointerDown(e);break;case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"keydown":this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("lm-dragenter",this),this.node.addEventListener("lm-dragleave",this),this.node.addEventListener("lm-dragover",this),this.node.addEventListener("lm-drop",this),this.node.addEventListener("pointerdown",this)}onAfterDetach(e){this.node.removeEventListener("lm-dragenter",this),this.node.removeEventListener("lm-dragleave",this),this.node.removeEventListener("lm-dragover",this),this.node.removeEventListener("lm-drop",this),this.node.removeEventListener("pointerdown",this),this._releaseMouse()}onChildAdded(e){De.isGeneratedTabBarProperty.get(e.child)||e.child.addClass("lm-DockPanel-widget")}onChildRemoved(e){De.isGeneratedTabBarProperty.get(e.child)||(e.child.removeClass("lm-DockPanel-widget"),M.postMessage(this,De.LayoutModified))}_evtDragEnter(e){e.mimeData.hasData("application/vnd.lumino.widget-factory")&&(e.preventDefault(),e.stopPropagation())}_evtDragLeave(e){e.preventDefault(),(!this._tabsConstrained||e.source===this)&&(e.stopPropagation(),this.overlay.hide(1))}_evtDragOver(e){e.preventDefault(),this._tabsConstrained&&e.source!==this||"invalid"===this._showOverlay(e.clientX,e.clientY)?e.dropAction="none":(e.stopPropagation(),e.dropAction=e.proposedAction)}_evtDrop(e){if(e.preventDefault(),this.overlay.hide(0),"none"===e.proposedAction)return void(e.dropAction="none");let{clientX:t,clientY:r}=e,{zone:n,target:i}=De.findDropTarget(this,t,r,this._edges);if(this._tabsConstrained&&e.source!==this||"invalid"===n)return void(e.dropAction="none");let a=e.mimeData.getData("application/vnd.lumino.widget-factory");if("function"!=typeof a)return void(e.dropAction="none");let o=a();if(!(o instanceof ne))return void(e.dropAction="none");if(o.contains(this))return void(e.dropAction="none");let s=i?De.getDropRef(i.tabBar):null;switch(n){case"root-all":this.addWidget(o);break;case"root-top":this.addWidget(o,{mode:"split-top"});break;case"root-left":this.addWidget(o,{mode:"split-left"});break;case"root-right":this.addWidget(o,{mode:"split-right"});break;case"root-bottom":this.addWidget(o,{mode:"split-bottom"});break;case"widget-all":case"widget-tab":this.addWidget(o,{mode:"tab-after",ref:s});break;case"widget-top":this.addWidget(o,{mode:"split-top",ref:s});break;case"widget-left":this.addWidget(o,{mode:"split-left",ref:s});break;case"widget-right":this.addWidget(o,{mode:"split-right",ref:s});break;case"widget-bottom":this.addWidget(o,{mode:"split-bottom",ref:s});break;default:throw"unreachable"}e.dropAction=e.proposedAction,e.stopPropagation(),this.activateWidget(o)}_evtKeyDown(e){e.preventDefault(),e.stopPropagation(),27===e.keyCode&&(this._releaseMouse(),M.postMessage(this,De.LayoutModified))}_evtPointerDown(e){if(0!==e.button)return;let t=this.layout,r=e.target,n=(0,b.find)(t.handles(),(e=>e.contains(r)));if(!n)return;e.preventDefault(),e.stopPropagation(),this._document.addEventListener("keydown",this,!0),this._document.addEventListener("pointerup",this,!0),this._document.addEventListener("pointermove",this,!0),this._document.addEventListener("contextmenu",this,!0);let i=n.getBoundingClientRect(),a=e.clientX-i.left,o=e.clientY-i.top,s=window.getComputedStyle(n),l=B.overrideCursor(s.cursor,this._document);this._pressData={handle:n,deltaX:a,deltaY:o,override:l}}_evtPointerMove(e){if(!this._pressData)return;e.preventDefault(),e.stopPropagation();let t=this.node.getBoundingClientRect(),r=e.clientX-t.left-this._pressData.deltaX,n=e.clientY-t.top-this._pressData.deltaY;this.layout.moveHandle(this._pressData.handle,r,n)}_evtPointerUp(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),this._releaseMouse(),M.postMessage(this,De.LayoutModified))}_releaseMouse(){this._pressData&&(this._pressData.override.dispose(),this._pressData=null,this._document.removeEventListener("keydown",this,!0),this._document.removeEventListener("pointerup",this,!0),this._document.removeEventListener("pointermove",this,!0),this._document.removeEventListener("contextmenu",this,!0))}_showOverlay(e,t){let{zone:r,target:n}=De.findDropTarget(this,e,t,this._edges);if("invalid"===r)return this.overlay.hide(100),r;let a,o,s,l,c=i.boxSizing(this.node),u=this.node.getBoundingClientRect();switch(r){case"root-all":a=c.paddingTop,o=c.paddingLeft,s=c.paddingRight,l=c.paddingBottom;break;case"root-top":a=c.paddingTop,o=c.paddingLeft,s=c.paddingRight,l=u.height*De.GOLDEN_RATIO;break;case"root-left":a=c.paddingTop,o=c.paddingLeft,s=u.width*De.GOLDEN_RATIO,l=c.paddingBottom;break;case"root-right":a=c.paddingTop,o=u.width*De.GOLDEN_RATIO,s=c.paddingRight,l=c.paddingBottom;break;case"root-bottom":a=u.height*De.GOLDEN_RATIO,o=c.paddingLeft,s=c.paddingRight,l=c.paddingBottom;break;case"widget-all":a=n.top,o=n.left,s=n.right,l=n.bottom;break;case"widget-top":a=n.top,o=n.left,s=n.right,l=n.bottom+n.height/2;break;case"widget-left":a=n.top,o=n.left,s=n.right+n.width/2,l=n.bottom;break;case"widget-right":a=n.top,o=n.left+n.width/2,s=n.right,l=n.bottom;break;case"widget-bottom":a=n.top+n.height/2,o=n.left,s=n.right,l=n.bottom;break;case"widget-tab":{let e=n.tabBar.node.getBoundingClientRect().height;a=n.top,o=n.left,s=n.right,l=n.bottom+n.height-e;break}default:throw"unreachable"}return this.overlay.show({top:a,left:o,right:s,bottom:l}),r}_createTabBar(){let e=this._renderer.createTabBar(this._document);return De.isGeneratedTabBarProperty.set(e,!0),"single-document"===this._mode&&e.hide(),e.tabsMovable=this._tabsMovable,e.allowDeselect=!1,e.addButtonEnabled=this._addButtonEnabled,e.removeBehavior="select-previous-tab",e.insertBehavior="select-tab-if-needed",e.tabMoved.connect(this._onTabMoved,this),e.currentChanged.connect(this._onCurrentChanged,this),e.tabCloseRequested.connect(this._onTabCloseRequested,this),e.tabDetachRequested.connect(this._onTabDetachRequested,this),e.tabActivateRequested.connect(this._onTabActivateRequested,this),e.addRequested.connect(this._onTabAddRequested,this),e}_createHandle(){return this._renderer.createHandle()}_onTabMoved(){M.postMessage(this,De.LayoutModified)}_onCurrentChanged(e,t){let{previousTitle:r,currentTitle:n}=t;r&&r.owner.hide(),n&&n.owner.show(),(a.IS_EDGE||a.IS_IE)&&M.flush(),M.postMessage(this,De.LayoutModified)}_onTabAddRequested(e){this._addRequested.emit(e)}_onTabActivateRequested(e,t){t.title.owner.activate()}_onTabCloseRequested(e,t){t.title.owner.close()}_onTabDetachRequested(e,t){if(this._drag)return;e.releaseMouse();let{title:r,tab:n,clientX:i,clientY:a,offset:o}=t,s=new w.MimeData;s.setData("application/vnd.lumino.widget-factory",(()=>r.owner));let l=n.cloneNode(!0);o&&(l.style.top=`-${o.y}px`,l.style.left=`-${o.x}px`),this._drag=new B({document:this._document,mimeData:s,dragImage:l,proposedAction:"move",supportedActions:"move",source:this}),n.classList.add("lm-mod-hidden"),this._drag.start(i,a).then((()=>{this._drag=null,n.classList.remove("lm-mod-hidden")}))}};!function(e){e.Overlay=class{constructor(){this._timer=-1,this._hidden=!0,this.node=document.createElement("div"),this.node.classList.add("lm-DockPanel-overlay"),this.node.classList.add("lm-mod-hidden"),this.node.style.position="absolute",this.node.style.contain="strict"}show(e){let t=this.node.style;t.top=`${e.top}px`,t.left=`${e.left}px`,t.right=`${e.right}px`,t.bottom=`${e.bottom}px`,clearTimeout(this._timer),this._timer=-1,this._hidden&&(this._hidden=!1,this.node.classList.remove("lm-mod-hidden"))}hide(e){if(!this._hidden){if(e<=0)return clearTimeout(this._timer),this._timer=-1,this._hidden=!0,void this.node.classList.add("lm-mod-hidden");-1===this._timer&&(this._timer=window.setTimeout((()=>{this._timer=-1,this._hidden=!0,this.node.classList.add("lm-mod-hidden")}),e))}}};class t{createTabBar(e){let t=new Le({document:e});return t.addClass("lm-DockPanel-tabBar"),t}createHandle(){let e=document.createElement("div");return e.className="lm-DockPanel-handle",e}}e.Renderer=t,e.defaultRenderer=new t}(Oe||(Oe={})),function(e){e.GOLDEN_RATIO=.618,e.DEFAULT_EDGES={top:12,right:40,bottom:40,left:40},e.LayoutModified=new E("layout-modified"),e.isGeneratedTabBarProperty=new I({name:"isGeneratedTabBar",create:()=>!1}),e.createSingleDocumentConfig=function(e){if(e.isEmpty)return{main:null};let t=Array.from(e.widgets()),r=e.selectedWidgets().next().value,n=r?t.indexOf(r):-1;return{main:{type:"tab-area",widgets:t,currentIndex:n}}},e.findDropTarget=function(e,t,r,n){if(!i.hitTest(e.node,t,r))return{zone:"invalid",target:null};let a=e.layout;if(a.isEmpty)return{zone:"root-all",target:null};if("multiple-document"===e.mode){let i=e.node.getBoundingClientRect(),a=t-i.left+1,o=r-i.top+1,s=i.right-t,l=i.bottom-r;switch(Math.min(o,s,l,a)){case o:if(of&&c>f&&l>p&&u>p)return{zone:"widget-all",target:o};switch(s/=f,l/=p,c/=f,u/=p,Math.min(s,l,c,u)){case s:h="widget-left";break;case l:h="widget-top";break;case c:h="widget-right";break;case u:h="widget-bottom";break;default:throw"unreachable"}return{zone:h,target:o}},e.getDropRef=function(e){return 0===e.titles.length?null:e.currentTitle?e.currentTitle.owner:e.titles[e.titles.length-1].owner}}(De||(De={}));var Re,Fe=class e extends ie{constructor(e={}){super(e),this._dirty=!1,this._rowSpacing=4,this._columnSpacing=4,this._items=[],this._rowStarts=[],this._columnStarts=[],this._rowSizers=[new ee],this._columnSizers=[new ee],this._box=null,void 0!==e.rowCount&&Re.reallocSizers(this._rowSizers,e.rowCount),void 0!==e.columnCount&&Re.reallocSizers(this._columnSizers,e.columnCount),void 0!==e.rowSpacing&&(this._rowSpacing=Re.clampValue(e.rowSpacing)),void 0!==e.columnSpacing&&(this._columnSpacing=Re.clampValue(e.columnSpacing))}dispose(){for(let e of this._items){let t=e.widget;e.dispose(),t.dispose()}this._box=null,this._items.length=0,this._rowStarts.length=0,this._rowSizers.length=0,this._columnStarts.length=0,this._columnSizers.length=0,super.dispose()}get rowCount(){return this._rowSizers.length}set rowCount(e){e!==this.rowCount&&(Re.reallocSizers(this._rowSizers,e),this.parent&&this.parent.fit())}get columnCount(){return this._columnSizers.length}set columnCount(e){e!==this.columnCount&&(Re.reallocSizers(this._columnSizers,e),this.parent&&this.parent.fit())}get rowSpacing(){return this._rowSpacing}set rowSpacing(e){e=Re.clampValue(e),this._rowSpacing!==e&&(this._rowSpacing=e,this.parent&&this.parent.fit())}get columnSpacing(){return this._columnSpacing}set columnSpacing(e){e=Re.clampValue(e),this._columnSpacing!==e&&(this._columnSpacing=e,this.parent&&this.parent.fit())}rowStretch(e){let t=this._rowSizers[e];return t?t.stretch:-1}setRowStretch(e,t){let r=this._rowSizers[e];r&&(t=Re.clampValue(t),r.stretch!==t&&(r.stretch=t,this.parent&&this.parent.update()))}columnStretch(e){let t=this._columnSizers[e];return t?t.stretch:-1}setColumnStretch(e,t){let r=this._columnSizers[e];r&&(t=Re.clampValue(t),r.stretch!==t&&(r.stretch=t,this.parent&&this.parent.update()))}*[Symbol.iterator](){for(let e of this._items)yield e.widget}addWidget(e){-1===b.ArrayExt.findFirstIndex(this._items,(t=>t.widget===e))&&(this._items.push(new oe(e)),this.parent&&this.attachWidget(e))}removeWidget(e){let t=b.ArrayExt.findFirstIndex(this._items,(t=>t.widget===e));if(-1===t)return;let r=b.ArrayExt.removeAt(this._items,t);this.parent&&this.detachWidget(e),r.dispose()}init(){super.init();for(let e of this)this.attachWidget(e)}attachWidget(e){this.parent.isAttached&&M.sendMessage(e,ne.Msg.BeforeAttach),this.parent.node.appendChild(e.node),this.parent.isAttached&&M.sendMessage(e,ne.Msg.AfterAttach),this.parent.fit()}detachWidget(e){this.parent.isAttached&&M.sendMessage(e,ne.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.isAttached&&M.sendMessage(e,ne.Msg.AfterDetach),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_fit(){for(let e=0,t=this.rowCount;e!e.isHidden));for(let e=0,r=t.length;e({row:0,column:0,rowSpan:1,columnSpan:1}),changed:function(e){e.parent&&e.parent.layout instanceof Fe&&e.parent.fit()}}),e.normalizeConfig=function(e){return{row:Math.max(0,Math.floor(e.row||0)),column:Math.max(0,Math.floor(e.column||0)),rowSpan:Math.max(1,Math.floor(e.rowSpan||0)),columnSpan:Math.max(1,Math.floor(e.columnSpan||0))}},e.clampValue=function(e){return Math.max(0,Math.floor(e))},e.rowSpanCmp=function(t,r){let n=e.cellConfigProperty.get(t.widget),i=e.cellConfigProperty.get(r.widget);return n.rowSpan-i.rowSpan},e.columnSpanCmp=function(t,r){let n=e.cellConfigProperty.get(t.widget),i=e.cellConfigProperty.get(r.widget);return n.columnSpan-i.columnSpan},e.reallocSizers=function(e,t){for(t=Math.max(1,Math.floor(t));e.lengtht&&(e.length=t)},e.distributeMin=function(e,t,r,n){if(r=n)return;let a=(n-i)/(r-t+1);for(let n=t;n<=r;++n)e[n].minSize+=a}}(Re||(Re={}));var Be,je,Ne=class e extends ne{constructor(t={}){super({node:Be.createNode()}),this._activeIndex=-1,this._tabFocusIndex=0,this._menus=[],this._childMenu=null,this._overflowMenu=null,this._menuItemSizes=[],this._overflowIndex=-1,this.addClass("lm-MenuBar"),this.setFlag(ne.Flag.DisallowLayout),this.renderer=t.renderer||e.defaultRenderer,this._forceItemsPosition=t.forceItemsPosition||{forceX:!0,forceY:!0},this._overflowMenuOptions=t.overflowMenuOptions||{isVisible:!0}}dispose(){this._closeChildMenu(),this._menus.length=0,super.dispose()}get childMenu(){return this._childMenu}get overflowIndex(){return this._overflowIndex}get overflowMenu(){return this._overflowMenu}get contentNode(){return this.node.getElementsByClassName("lm-MenuBar-content")[0]}get activeMenu(){return this._menus[this._activeIndex]||null}set activeMenu(e){this.activeIndex=e?this._menus.indexOf(e):-1}get activeIndex(){return this._activeIndex}set activeIndex(e){(e<0||e>=this._menus.length)&&(e=-1),e>-1&&0===this._menus[e].items.length&&(e=-1),this._activeIndex!==e&&(this._activeIndex=e,this.update())}get menus(){return this._menus}openActiveMenu(){-1!==this._activeIndex&&(this._openChildMenu(),this._childMenu&&(this._childMenu.activeIndex=-1,this._childMenu.activateNextItem()))}addMenu(e,t=!0){this.insertMenu(this._menus.length,e,t)}insertMenu(e,t,r=!0){this._closeChildMenu();let n=this._menus.indexOf(t),i=Math.max(0,Math.min(e,this._menus.length));if(-1===n)return b.ArrayExt.insert(this._menus,i,t),t.addClass("lm-MenuBar-menu"),t.aboutToClose.connect(this._onMenuAboutToClose,this),t.menuRequested.connect(this._onMenuMenuRequested,this),t.title.changed.connect(this._onTitleChanged,this),void(r&&this.update());i===this._menus.length&&i--,n!==i&&(b.ArrayExt.move(this._menus,n,i),r&&this.update())}removeMenu(e,t=!0){this.removeMenuAt(this._menus.indexOf(e),t)}removeMenuAt(e,t=!0){this._closeChildMenu();let r=b.ArrayExt.removeAt(this._menus,e);r&&(r.aboutToClose.disconnect(this._onMenuAboutToClose,this),r.menuRequested.disconnect(this._onMenuMenuRequested,this),r.title.changed.disconnect(this._onTitleChanged,this),r.removeClass("lm-MenuBar-menu"),t&&this.update())}clearMenus(){if(0!==this._menus.length){this._closeChildMenu();for(let e of this._menus)e.aboutToClose.disconnect(this._onMenuAboutToClose,this),e.menuRequested.disconnect(this._onMenuMenuRequested,this),e.title.changed.disconnect(this._onTitleChanged,this),e.removeClass("lm-MenuBar-menu");this._menus.length=0,this.update()}}handleEvent(e){switch(e.type){case"keydown":this._evtKeyDown(e);break;case"mousedown":this._evtMouseDown(e);break;case"mousemove":this._evtMouseMove(e);break;case"focusout":this._evtFocusOut(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("keydown",this),this.node.addEventListener("mousedown",this),this.node.addEventListener("mousemove",this),this.node.addEventListener("focusout",this),this.node.addEventListener("contextmenu",this)}onAfterDetach(e){this.node.removeEventListener("keydown",this),this.node.removeEventListener("mousedown",this),this.node.removeEventListener("mousemove",this),this.node.removeEventListener("focusout",this),this.node.removeEventListener("contextmenu",this),this._closeChildMenu()}onActivateRequest(e){this.isAttached&&this._focusItemAt(0)}onResize(e){this.update(),super.onResize(e)}onUpdateRequest(e){var t;let r=this._menus,n=this.renderer,i=this._activeIndex,a=this._tabFocusIndex>=0&&this._tabFocusIndex-1?this._overflowIndex:r.length,s=0,l=!1;o=null!==this._overflowMenu?o-1:o;let c=new Array(o);for(let e=0;e{this._tabFocusIndex=e,this.activeIndex=e}}),s+=this._menuItemSizes[e],r[e].title.label===this._overflowMenuOptions.title&&(l=!0,o--);if(this._overflowMenuOptions.isVisible)if(this._overflowIndex>-1&&!l){if(null===this._overflowMenu){let e=null!==(t=this._overflowMenuOptions.title)&&void 0!==t?t:"...";this._overflowMenu=new Ee({commands:new W}),this._overflowMenu.title.label=e,this._overflowMenu.title.mnemonic=0,this.addMenu(this._overflowMenu,!1)}for(let e=r.length-2;e>=o;e--){let t=this.menus[e];t.title.mnemonic=0,this._overflowMenu.insertItem(0,{type:"submenu",submenu:t}),this.removeMenu(t,!1)}c[o]=n.renderItem({title:this._overflowMenu.title,active:o===i&&0!==r[o].items.length,tabbable:o===a,disabled:0===r[o].items.length,onfocus:()=>{this._tabFocusIndex=o,this.activeIndex=o}}),o++}else if(null!==this._overflowMenu){let e=this._overflowMenu.items,t=this.node.offsetWidth,i=this._overflowMenu.items.length;for(let l=0;lthis._menuItemSizes[i]){let t=e[0].submenu;this._overflowMenu.removeItemAt(0),this.insertMenu(o,t,!1),c[o]=n.renderItem({title:t.title,active:!1,tabbable:o===a,disabled:0===r[o].items.length,onfocus:()=>{this._tabFocusIndex=o,this.activeIndex=o}}),o++}}0===this._overflowMenu.items.length&&(this.removeMenu(this._overflowMenu,!1),c.pop(),this._overflowMenu=null,this._overflowIndex=-1)}Z.render(c,this.contentNode),this._updateOverflowIndex()}_updateOverflowIndex(){if(!this._overflowMenuOptions.isVisible)return;let e=this.contentNode.childNodes,t=this.node.offsetWidth,r=0,n=-1,i=e.length;if(0==this._menuItemSizes.length)for(let a=0;at&&-1===n&&(n=a)}else for(let e=0;et){n=e;break}this._overflowIndex=n}_evtKeyDown(e){let t=e.keyCode;if(9===t)return void(this.activeIndex=-1);if(e.preventDefault(),e.stopPropagation(),13===t||32===t||38===t||40===t){if(this.activeIndex=this._tabFocusIndex,this.activeIndex!==this._tabFocusIndex)return;return void this.openActiveMenu()}if(27===t)return this._closeChildMenu(),void this._focusItemAt(this.activeIndex);if(37===t||39===t){let e=37===t?-1:1,r=this._tabFocusIndex+e,n=this._menus.length;for(let t=0;ti.hitTest(t,e.clientX,e.clientY)));if(-1!==t){if(0===e.button)if(this._childMenu)this._closeChildMenu(),this.activeIndex=t;else{e.preventDefault();let r=this._positionForMenu(t);Ee.saveWindowData(),this.activeIndex=t,this._openChildMenu(r)}}else this._closeChildMenu()}_evtMouseMove(e){let t=b.ArrayExt.findFirstIndex(this.contentNode.children,(t=>i.hitTest(t,e.clientX,e.clientY)));if(t===this._activeIndex||-1===t&&this._childMenu)return;let r=t>=0&&this._childMenu?this._positionForMenu(t):null;Ee.saveWindowData(),this.activeIndex=t,r&&this._openChildMenu(r)}_positionForMenu(e){let t=this.contentNode.children[e],{left:r,bottom:n}=t.getBoundingClientRect();return{top:n,left:r}}_evtFocusOut(e){!this._childMenu&&!this.node.contains(e.relatedTarget)&&(this.activeIndex=-1)}_focusItemAt(e){let t=this.contentNode.childNodes[e];t&&t.focus()}_openChildMenu(e={}){let t=this.activeMenu;if(!t)return void this._closeChildMenu();let r=this._childMenu;if(r===t)return;this._childMenu=t,r?r.close():document.addEventListener("mousedown",this,!0),this._tabFocusIndex=this.activeIndex,M.sendMessage(this,ne.Msg.UpdateRequest);let{left:n,top:i}=e;(typeof n>"u"||typeof i>"u")&&({left:n,top:i}=this._positionForMenu(this._activeIndex)),r||this.addClass("lm-mod-active"),t.items.length>0&&t.open(n,i,this._forceItemsPosition)}_closeChildMenu(){if(!this._childMenu)return;this.removeClass("lm-mod-active"),document.removeEventListener("mousedown",this,!0);let e=this._childMenu;this._childMenu=null,e.close(),this.activeIndex=-1}_onMenuAboutToClose(e){e===this._childMenu&&(this.removeClass("lm-mod-active"),document.removeEventListener("mousedown",this,!0),this._childMenu=null,this.activeIndex=-1)}_onMenuMenuRequested(e,t){if(e!==this._childMenu)return;let r=this._activeIndex,n=this._menus.length;switch(t){case"next":this.activeIndex=r===n-1?0:r+1;break;case"previous":this.activeIndex=0===r?n-1:r-1}this.openActiveMenu()}_onTitleChanged(){this.update()}};!function(e){class t{renderItem(e){let t=this.createItemClass(e),r=this.createItemDataset(e),n=this.createItemARIA(e);return J.li({className:t,dataset:r,...e.disabled?{}:{tabindex:e.tabbable?"0":"-1"},onfocus:e.onfocus,...n},this.renderIcon(e),this.renderLabel(e))}renderIcon(e){let t=this.createIconClass(e);return J.div({className:t},e.title.icon,e.title.iconLabel)}renderLabel(e){let t=this.formatLabel(e);return J.div({className:"lm-MenuBar-itemLabel"},t)}createItemClass(e){let t="lm-MenuBar-item";return e.title.className&&(t+=` ${e.title.className}`),e.active&&!e.disabled&&(t+=" lm-mod-active"),t}createItemDataset(e){return e.title.dataset}createItemARIA(e){return{role:"menuitem","aria-haspopup":"true","aria-disabled":e.disabled?"true":"false"}}createIconClass(e){let t="lm-MenuBar-itemIcon",r=e.title.iconClass;return r?`${t} ${r}`:t}formatLabel(e){let{label:t,mnemonic:r}=e.title;if(r<0||r>=t.length)return t;let n=t.slice(0,r),i=t.slice(r+1),a=t[r];return[n,J.span({className:"lm-MenuBar-itemMnemonic"},a),i]}}e.Renderer=t,e.defaultRenderer=new t}(Ne||(Ne={})),function(e){e.createNode=function(){let e=document.createElement("div"),t=document.createElement("ul");return t.className="lm-MenuBar-content",e.appendChild(t),t.setAttribute("role","menubar"),e},e.findMnemonic=function(e,t,r){let n=-1,i=-1,a=!1,o=t.toUpperCase();for(let t=0,s=e.length;t=0&&u1&&this.widgets.forEach((e=>{e.hiddenMode=this._hiddenMode})))}dispose(){for(let e of this._items)e.dispose();this._box=null,this._items.length=0,super.dispose()}attachWidget(e,t){this._hiddenMode===ne.HiddenMode.Scale&&this._items.length>0?(1===this._items.length&&(this.widgets[0].hiddenMode=ne.HiddenMode.Scale),t.hiddenMode=ne.HiddenMode.Scale):t.hiddenMode=ne.HiddenMode.Display,b.ArrayExt.insert(this._items,e,new oe(t)),this.parent.isAttached&&M.sendMessage(t,ne.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.isAttached&&M.sendMessage(t,ne.Msg.AfterAttach),this.parent.fit()}moveWidget(e,t,r){b.ArrayExt.move(this._items,e,t),this.parent.update()}detachWidget(e,t){let r=b.ArrayExt.removeAt(this._items,e);this.parent.isAttached&&M.sendMessage(t,ne.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&M.sendMessage(t,ne.Msg.AfterDetach),r.widget.node.style.zIndex="",this._hiddenMode===ne.HiddenMode.Scale&&(t.hiddenMode=ne.HiddenMode.Display,1===this._items.length&&(this._items[0].widget.hiddenMode=ne.HiddenMode.Display)),r.dispose(),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_fit(){let e=0,t=0;for(let r=0,n=this._items.length;r{this.createGraph(this._model)}))}renderModel(e){if(this.hasGraphElement())return Promise.resolve();this._model=e;let t=e.data["image/png"];return null!=t?(this.updateImage(t),Promise.resolve()):this.createGraph(e)}hasGraphElement(){return null!==this.node.querySelector(".plot-container")}updateImage(e){this.hideGraph(),this._img_el.src="data:image/png;base64,"+e,this.showImage()}hideGraph(){let e=this.node.querySelector(".plot-container");null!=e&&(e.style.display="none")}showGraph(){let e=this.node.querySelector(".plot-container");null!=e&&(e.style.display="block")}hideImage(){let e=this.node.querySelector(".plot-img");null!=e&&(e.style.display="none")}showImage(){let e=this.node.querySelector(".plot-img");null!=e&&(e.style.display="block")}createGraph(t){let{data:r,layout:n,frames:i,config:a}=t.data[this._mimeType];return n.height||(n.height=360),(async()=>(null===e.Plotly&&(e.Plotly=await Promise.resolve().then((()=>y(_()))),e._resolveLoadingPlotly()),e.loadingPlotly))().then((()=>e.Plotly.react(this.node,r,n,a))).then((r=>{this.showGraph(),this.hideImage(),this.update(),i&&e.Plotly.addFrames(this.node,i),this.node.offsetWidth>0&&this.node.offsetHeight>0&&e.Plotly.toImage(r,{format:"png",width:this.node.offsetWidth,height:this.node.offsetHeight}).then((e=>{let r=e.split(",")[1];t.data["image/png"]!==r&&t.setData({data:{...t.data,"image/png":r}})})),this.node.on("plotly_webglcontextlost",(()=>{let e=t.data["image/png"];if(null!=e)return this.updateImage(e),Promise.resolve()}))}))}onAfterShow(e){this.update()}onResize(e){this.update()}onUpdateRequest(t){e.Plotly&&this.isVisible&&this.hasGraphElement()&&e.Plotly.redraw(this.node).then((()=>{e.Plotly.Plots.resize(this.node)}))}static{this.Plotly=null}static{this.loadingPlotly=new Promise((t=>{e._resolveLoadingPlotly=t}))}},We={safe:!0,mimeTypes:[He],createRenderer:e=>new Ge(e)},Ze=[{id:"@jupyterlab/plotly-extension:factory",rendererFactory:We,rank:2,dataType:"json",fileTypes:[{name:"plotly",mimeTypes:[He],extensions:[".plotly",".plotly.json"],iconClass:"jp-MaterialIcon jp-PlotlyIcon"}],documentWidgetFactoryOptions:{name:"Plotly",primaryFileType:"plotly",fileTypes:["plotly","json"],defaultFor:["plotly"]}}]},e=>{var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var s,l=[],c=!1,u=-1;function h(){c&&s&&(c=!1,s.length?l=s.concat(l):u=-1,l.length&&f())}function f(){if(!c){var e=o(h);c=!0;for(var t=l.length;t;){for(s=l,l=[];++u1)for(var r=1;r - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT license. - *) - (*! - * repeat-string - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License. - *) - (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh *) (*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT *) + (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh *) (*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT *) + (*! + * pad-left + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT license. + *) + (*! + * repeat-string + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + *) (*! Bundled license information: native-promise-only/lib/npo.src.js: diff --git a/plotly/labextension/static/1.f29faa6937f75272d9d5.js b/plotly/labextension/static/1.f29faa6937f75272d9d5.js deleted file mode 100644 index c6f08014255..00000000000 --- a/plotly/labextension/static/1.f29faa6937f75272d9d5.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see 1.f29faa6937f75272d9d5.js.LICENSE.txt */ -(self.webpackChunkjupyterlab_plotly=self.webpackChunkjupyterlab_plotly||[]).push([[1],[,,(e,t,r)=>{"use strict";r.r(t),r.d(t,{MIME_TYPE:()=>He,RenderedPlotly:()=>Ge,default:()=>Ze,rendererFactory:()=>We});var n,i,a,o,s,l,c=r(3),u=Object.create,h=Object.defineProperty,f=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,d=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty,g=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),y=(e,t,r)=>(r=null!=e?u(d(e)):{},((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let r of p(t))!m.call(e,r)&&undefined!==r&&h(e,r,{get:()=>t[r],enumerable:!(n=f(t,r))||n.enumerable});return e})(!t&&e&&e.__esModule?r:h(r,"default",{value:e,enumerable:!0}),e)),v=g(((e,t)=>{var n,i;n=e,i=function(e){function t(e,t){let r=0;for(let n of e)if(!1===t(n,r++))return!1;return!0}var r;e.ArrayExt=void 0,function(e){function t(e,t,r=0,n=-1){let i,a=e.length;if(0===a)return-1;r=r<0?Math.max(0,r+a):Math.min(r,a-1),i=(n=n<0?Math.max(0,n+a):Math.min(n,a-1))=r)return;let n=e[t];for(let n=t+1;n0;){let n=s>>1,i=o+n;r(e[i],t)<0?(o=i+1,s-=n+1):s=n}return o},e.upperBound=function(e,t,r,n=0,i=-1){let a=e.length;if(0===a)return 0;let o=n=n<0?Math.max(0,n+a):Math.min(n,a-1),s=(i=i<0?Math.max(0,i+a):Math.min(i,a-1))-n+1;for(;s>0;){let n=s>>1,i=o+n;r(e[i],t)>0?s=n:(o=i+1,s-=n+1)}return o},e.shallowEqual=function(e,t,r){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0,i=e.length;n=o&&(r=i<0?o-1:o),void 0===n?n=i<0?-1:o:n<0?n=Math.max(n+o,i<0?-1:0):n>=o&&(n=i<0?o-1:o),a=i<0&&n>=r||i>0&&r>=n?0:i<0?Math.floor((n-r+1)/i+1):Math.floor((n-r-1)/i+1);let s=[];for(let t=0;t=(n=n<0?Math.max(0,n+i):Math.min(n,i-1)))return;let o=n-r+1;if(t>0?t%=o:t<0&&(t=(t%o+o)%o),0===t)return;let s=r+t;a(e,r,s-1),a(e,s,n),a(e,r,n)},e.fill=function(e,t,r=0,n=-1){let i,a=e.length;if(0!==a){r=r<0?Math.max(0,r+a):Math.min(r,a-1),i=(n=n<0?Math.max(0,n+a):Math.min(n,a-1))t;--r)e[r]=e[r-1];e[t]=r},e.removeAt=o,e.removeFirstOf=function(e,r,n=0,i=-1){let a=t(e,r,n,i);return-1!==a&&o(e,a),a},e.removeLastOf=function(e,t,n=-1,i=0){let a=r(e,t,n,i);return-1!==a&&o(e,a),a},e.removeAllOf=function(e,t,r=0,n=-1){let i=e.length;if(0===i)return 0;r=r<0?Math.max(0,r+i):Math.min(r,i-1),n=n<0?Math.max(0,n+i):Math.min(n,i-1);let a=0;for(let o=0;o=r&&o<=n&&e[o]===t||n=r)&&e[o]===t?a++:a>0&&(e[o-a]=e[o]);return a>0&&(e.length=i-a),a},e.removeFirstWhere=function(e,t,r=0,i=-1){let a,s=n(e,t,r,i);return-1!==s&&(a=o(e,s)),{index:s,value:a}},e.removeLastWhere=function(e,t,r=-1,n=0){let a,s=i(e,t,r,n);return-1!==s&&(a=o(e,s)),{index:s,value:a}},e.removeAllWhere=function(e,t,r=0,n=-1){let i=e.length;if(0===i)return 0;r=r<0?Math.max(0,r+i):Math.min(r,i-1),n=n<0?Math.max(0,n+i):Math.min(n,i-1);let a=0;for(let o=0;o=r&&o<=n&&t(e[o],o)||n=r)&&t(e[o],o)?a++:a>0&&(e[o-a]=e[o]);return a>0&&(e.length=i-a),a}}(e.ArrayExt||(e.ArrayExt={})),(r||(r={})).rangeLength=function(e,t,r){return 0===r?1/0:e>t&&r>0||et?1:0}}(e.StringExt||(e.StringExt={})),e.chain=function*(...e){for(let t of e)yield*t},e.each=function(e,t){let r=0;for(let n of e)if(!1===t(n,r++))return},e.empty=function*(){},e.enumerate=function*(e,t=0){for(let r of e)yield[t++,r]},e.every=t,e.filter=function*(e,t){let r=0;for(let n of e)t(n,r++)&&(yield n)},e.find=function(e,t){let r=0;for(let n of e)if(t(n,r++))return n},e.findIndex=function(e,t){let r=0;for(let n of e)if(t(n,r++))return r-1;return-1},e.map=function*(e,t){let r=0;for(let n of e)yield t(n,r++)},e.max=function(e,t){let r;for(let n of e)void 0!==r?t(n,r)>0&&(r=n):r=n;return r},e.min=function(e,t){let r;for(let n of e)void 0!==r?t(n,r)<0&&(r=n):r=n;return r},e.minmax=function(e,t){let r,n,i=!0;for(let a of e)i?(r=a,n=a,i=!1):t(a,r)<0?r=a:t(a,n)>0&&(n=a);return i?void 0:[r,n]},e.once=function*(e){yield e},e.range=function*(e,t,n){void 0===t?(t=e,e=0,n=1):void 0===n&&(n=1);let i=r.rangeLength(e,t,n);for(let t=0;t-1;t--)yield e[t]},e.some=function(e,t){let r=0;for(let n of e)if(t(n,r++))return!0;return!1},e.stride=function*(e,t){let r=0;for(let n of e)r++%t==0&&(yield n)},e.take=function*(e,t){if(t<1)return;let r,n=e[Symbol.iterator]();for(;0e[Symbol.iterator]())),n=r.map((e=>e.next()));for(;t(n,(e=>!e.done));n=r.map((e=>e.next())))yield n.map((e=>e.value))}},"object"==typeof e&&typeof t<"u"?i(e):"function"==typeof define&&r.amdO?define(["exports"],i):i((n=typeof globalThis<"u"?globalThis:n||self).lumino_algorithm={})})),x=g(((e,t)=>{var n,i;n=e,i=function(e,t){var r;function n(e){let t=0;for(let r=0,n=e.length;r>>0),e[r]=255&t,t>>>=8}e.JSONExt=void 0,function(e){function t(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e}function r(e){return Array.isArray(e)}e.emptyObject=Object.freeze({}),e.emptyArray=Object.freeze([]),e.isPrimitive=t,e.isArray=r,e.isObject=function(e){return!t(e)&&!r(e)},e.deepEqual=function e(n,i){if(n===i)return!0;if(t(n)||t(i))return!1;let a=r(n),o=r(i);return a===o&&(a&&o?function(t,r){if(t===r)return!0;if(t.length!==r.length)return!1;for(let n=0,i=t.length;n{if(n===e.provides)return!0;let o=r.get(n);if(!o)return!1;let s=t.get(o),l=[...s.requires,...s.optional];return 0!==l.length&&(a.push(o),!!l.some(i)||(a.pop(),!1))};if(!e.provides||0===n.length)return;let a=[e.id];if(n.some(i))throw new ReferenceError(`Cycle detected: ${a.join(" -> ")}.`)},e.findDependents=function(e,r,n){let i=new Array,a=e=>{let t=r.get(e),a=[...t.requires,...t.optional];i.push(...a.reduce(((t,r)=>{let i=n.get(r);return i&&t.push([e,i]),t}),[]))};for(let e of r.keys())a(e);let o=i.filter((t=>t[1]===e)),s=0;for(;o.length>s;){let e=o.length,t=new Set(o.map((e=>e[0])));for(let e of t)i.filter((t=>t[1]===e)).forEach((e=>{o.includes(e)||o.push(e)}));s=e}let l=t.topologicSort(o),c=l.findIndex((t=>t===e));return-1===c?[e]:l.slice(0,c+1)},e.collectStartupPlugins=function(e,t){let r=new Set;for(let t of e.keys())!0===e.get(t).autoStart&&r.add(t);if(t.startPlugins)for(let e of t.startPlugins)r.add(e);if(t.ignorePlugins)for(let e of t.ignorePlugins)r.delete(e);return Array.from(r)}}(r||(r={})),e.Random=void 0,(e.Random||(e.Random={})).getRandomValues=(()=>{let e=typeof window<"u"&&(window.crypto||window.msCrypto)||null;return e&&"function"==typeof e.getRandomValues?function(t){return e.getRandomValues(t)}:n})(),e.UUID=void 0,(e.UUID||(e.UUID={})).uuid4=function(e){let t=new Uint8Array(16),r=new Array(256);for(let e=0;e<16;++e)r[e]="0"+e.toString(16);for(let e=16;e<256;++e)r[e]=e.toString(16);return function(){return e(t),t[6]=64|15&t[6],t[8]=128|63&t[8],r[t[0]]+r[t[1]]+r[t[2]]+r[t[3]]+"-"+r[t[4]]+r[t[5]]+"-"+r[t[6]]+r[t[7]]+"-"+r[t[8]]+r[t[9]]+"-"+r[t[10]]+r[t[11]]+r[t[12]]+r[t[13]]+r[t[14]]+r[t[15]]}}(e.Random.getRandomValues),e.MimeData=class{constructor(){this._types=[],this._values=[]}types(){return this._types.slice()}hasData(e){return-1!==this._types.indexOf(e)}getData(e){let t=this._types.indexOf(e);return-1!==t?this._values[t]:void 0}setData(e,t){this.clearData(e),this._types.push(e),this._values.push(t)}clearData(e){let t=this._types.indexOf(e);-1!==t&&(this._types.splice(t,1),this._values.splice(t,1))}clear(){this._types.length=0,this._values.length=0}},e.PluginRegistry=class{constructor(e={}){this._application=null,this._validatePlugin=()=>!0,this._plugins=new Map,this._services=new Map,e.validatePlugin&&(console.info("Plugins may be rejected by the custom validation plugin method."),this._validatePlugin=e.validatePlugin)}get application(){return this._application}set application(e){if(null!==this._application)throw Error("PluginRegistry.application is already set. It cannot be overridden.");this._application=e}get deferredPlugins(){return Array.from(this._plugins).filter((([e,t])=>"defer"===t.autoStart)).map((([e,t])=>e))}getPluginDescription(e){var t,r;return null!==(r=null===(t=this._plugins.get(e))||void 0===t?void 0:t.description)&&void 0!==r?r:""}hasPlugin(e){return this._plugins.has(e)}isPluginActivated(e){var t,r;return null!==(r=null===(t=this._plugins.get(e))||void 0===t?void 0:t.activated)&&void 0!==r&&r}listPlugins(){return Array.from(this._plugins.keys())}registerPlugin(e){if(this._plugins.has(e.id))throw new TypeError(`Plugin '${e.id}' is already registered.`);if(!this._validatePlugin(e))throw new Error(`Plugin '${e.id}' is not valid.`);let t=r.createPluginData(e);r.ensureNoCycle(t,this._plugins,this._services),t.provides&&this._services.set(t.provides,t.id),this._plugins.set(t.id,t)}registerPlugins(e){for(let t of e)this.registerPlugin(t)}deregisterPlugin(e,t){let r=this._plugins.get(e);if(r){if(r.activated&&!t)throw new Error(`Plugin '${e}' is still active.`);this._plugins.delete(e)}}async activatePlugin(e){let t=this._plugins.get(e);if(!t)throw new ReferenceError(`Plugin '${e}' is not registered.`);if(t.activated)return;if(t.promise)return t.promise;let r=t.requires.map((e=>this.resolveRequiredService(e))),n=t.optional.map((e=>this.resolveOptionalService(e)));return t.promise=Promise.all([...r,...n]).then((e=>t.activate.apply(void 0,[this.application,...e]))).then((e=>{t.service=e,t.activated=!0,t.promise=null})).catch((e=>{throw t.promise=null,e})),t.promise}async activatePlugins(e,t={}){switch(e){case"defer":{let e=this.deferredPlugins.filter((e=>this._plugins.get(e).autoStart)).map((e=>this.activatePlugin(e)));await Promise.all(e);break}case"startUp":{let e=r.collectStartupPlugins(this._plugins,t).map((async e=>{try{return await this.activatePlugin(e)}catch(t){console.error(`Plugin '${e}' failed to activate.`,t)}}));await Promise.all(e);break}}}async deactivatePlugin(e){let t=this._plugins.get(e);if(!t)throw new ReferenceError(`Plugin '${e}' is not registered.`);if(!t.activated)return[];if(!t.deactivate)throw new TypeError(`Plugin '${e}'#deactivate() method missing`);let n=r.findDependents(e,this._plugins,this._services),i=n.map((e=>this._plugins.get(e)));for(let t of i)if(!t.deactivate)throw new TypeError(`Plugin ${t.id}#deactivate() method missing (depends on ${e})`);for(let e of i){let t=[...e.requires,...e.optional].map((e=>{let t=this._services.get(e);return t?this._plugins.get(t).service:null}));await e.deactivate(this.application,...t),e.service=null,e.activated=!1}return n.pop(),n}async resolveRequiredService(e){let t=this._services.get(e);if(!t)throw new TypeError(`No provider for: ${e.name}.`);let r=this._plugins.get(t);return r.activated||await this.activatePlugin(t),r.service}async resolveOptionalService(e){let t=this._services.get(e);if(!t)return null;let r=this._plugins.get(t);if(!r.activated)try{await this.activatePlugin(t)}catch(e){return console.error(e),null}return r.service}},e.PromiseDelegate=class{constructor(){this.promise=new Promise(((e,t)=>{this._resolve=e,this._reject=t}))}resolve(e){(0,this._resolve)(e)}reject(e){(0,this._reject)(e)}},e.Token=class{constructor(e,t){this.name=e,this.description=t??"",this._tokenStructuralPropertyT=null}}},"object"==typeof e&&typeof t<"u"?i(e,v()):"function"==typeof define&&r.amdO?define(["exports","@lumino/algorithm"],i):i((n=typeof globalThis<"u"?globalThis:n||self).lumino_coreutils={},n.lumino_algorithm)})),_=g(((e,t)=>{var r,n;r=typeof self<"u"?self:e,n=()=>{var e=(()=>{var e=Object.create,t=Object.defineProperty,r=Object.defineProperties,n=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertyNames,o=Object.getOwnPropertySymbols,s=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,h=(e,r,n)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,f=(e,t)=>{for(var r in t||(t={}))l.call(t,r)&&h(e,r,t[r]);if(o)for(var r of o(t))u.call(t,r)&&h(e,r,t[r]);return e},p=(e,t)=>r(e,i(t)),d=(e,t)=>function(){return e&&(t=(0,e[a(e)[0]])(e=0)),t},m=(e,t)=>function(){return t||(0,e[a(e)[0]])((t={exports:{}}).exports,t),t.exports},g=(e,r)=>{for(var n in r)t(e,n,{get:r[n],enumerable:!0})},y=(e,r,i,o)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let s of a(r))!l.call(e,s)&&s!==i&&t(e,s,{get:()=>r[s],enumerable:!(o=n(r,s))||o.enumerable});return e},v=e=>y(t({},"__esModule",{value:!0}),e),x=m({"src/version.js"(e){e.version="3.4.0"}}),_=m({"node_modules/native-promise-only/lib/npo.src.js"(e,t){var r,n;r="Promise",(n=typeof window<"u"?window:e)[r]=n[r]||function(){var e,t,r,n=Object.prototype.toString,i=typeof setImmediate<"u"?function(e){return setImmediate(e)}:setTimeout;try{Object.defineProperty({},"x",{}),e=function(e,t,r,n){return Object.defineProperty(e,t,{value:r,writable:!0,configurable:!1!==n})}}catch{e=function(e,t,r){return e[t]=r,e}}function a(e,n){r.add(e,n),t||(t=i(r.drain))}function o(e){var t,r=typeof e;return null!=e&&("object"==r||"function"==r)&&(t=e.then),"function"==typeof t&&t}function s(){for(var e=0;e0&&a(s,r))}catch(e){u.call(new f(r),e)}}}function u(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&a(s,t))}function h(e,t,r,n){for(var i=0;it?1:e>=t?0:NaN}function p(e){return null===e?NaN:+e}function d(e){return!isNaN(e)}function m(e){return{left:function(t,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=t.length);n>>1;e(t[a],r)<0?n=a+1:i=a}return n},right:function(t,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=t.length);n>>1;e(t[a],r)>0?i=a:n=a+1}return n}}}e.ascending=f,e.descending=function(e,t){return te?1:t>=e?0:NaN},e.min=function(e,t){var r,n,i=-1,a=e.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++in&&(r=n)}else{for(;++i=n){r=n;break}for(;++in&&(r=n)}return r},e.max=function(e,t){var r,n,i=-1,a=e.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++ir&&(r=n)}else{for(;++i=n){r=n;break}for(;++ir&&(r=n)}return r},e.extent=function(e,t){var r,n,i,a=-1,o=e.length;if(1===arguments.length){for(;++a=n){r=i=n;break}for(;++an&&(r=n),i=n){r=i=n;break}for(;++an&&(r=n),i1)return o/(l-1)},e.deviation=function(){var t=e.variance.apply(this,arguments);return t&&Math.sqrt(t)};var g=m(f);function y(e){return e.length}e.bisectLeft=g.left,e.bisect=e.bisectRight=g.right,e.bisector=function(e){return m(1===e.length?function(t,r){return f(e(t),r)}:e)},e.shuffle=function(e,t,r){(a=arguments.length)<3&&(r=e.length,a<2&&(t=0));for(var n,i,a=r-t;a;)i=Math.random()*a--|0,n=e[a+t],e[a+t]=e[i+t],e[i+t]=n;return e},e.permute=function(e,t){for(var r=t.length,n=new Array(r);r--;)n[r]=e[t[r]];return n},e.pairs=function(e){for(var t=0,r=e.length-1,n=e[0],i=new Array(r<0?0:r);t=0;)for(t=(n=e[i]).length;--t>=0;)r[--o]=n[t];return r};var v=Math.abs;function x(e,t){for(var r in t)Object.defineProperty(e.prototype,r,{value:t[r],enumerable:!1})}function _(){this._=Object.create(null)}function b(e){return"__proto__"==(e+="")||"\0"===e[0]?"\0"+e:e}function w(e){return"\0"===(e+="")[0]?e.slice(1):e}function T(e){return b(e)in this._}function k(e){return(e=b(e))in this._&&delete this._[e]}function A(){var e=[];for(var t in this._)e.push(w(t));return e}function M(){var e=0;for(var t in this._)++e;return e}function S(){for(var e in this._)return!1;return!0}function E(){this._=Object.create(null)}function C(e){return e}function I(e,t,r){return function(){var n=r.apply(t,arguments);return n===t?e:n}}function L(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var r=0,n=P.length;rt;)i.push(n/a);else for(;(n=e+r*++o)=i.length)return r?r.call(n,a):t?a.sort(t):a;for(var l,c,u,h,f=-1,p=a.length,d=i[s++],m=new _;++f=i.length)return e;var r=[],n=a[t++];return e.forEach((function(e,n){r.push({key:e,values:s(n,t)})})),n?r.sort((function(e,t){return n(e.key,t.key)})):r}return n.map=function(e,t){return o(t,e,0)},n.entries=function(t){return s(o(e.map,t,0),0)},n.key=function(e){return i.push(e),n},n.sortKeys=function(e){return a[i.length-1]=e,n},n.sortValues=function(e){return t=e,n},n.rollup=function(e){return r=e,n},n},e.set=function(e){var t=new E;if(e)for(var r=0,n=e.length;r=0&&(n=e.slice(r+1),e=e.slice(0,r)),e)return arguments.length<2?this[e].on(n):this[e].on(n,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(n,null);return this}},e.event=null,e.requote=function(e){return e.replace(j,"\\$&")};var j=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,N={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)e[r]=t[r]};function U(e){return N(e,G),e}var V=function(e,t){return t.querySelector(e)},q=function(e,t){return t.querySelectorAll(e)},H=function(e,t){var r=e.matches||e[L(e,"matchesSelector")];return(H=function(e,t){return r.call(e,t)})(e,t)};"function"==typeof Sizzle&&(V=function(e,t){return Sizzle(e,t)[0]||null},q=Sizzle,H=Sizzle.matchesSelector),e.selection=function(){return e.select(i.documentElement)};var G=e.selection.prototype=[];function W(e){return"function"==typeof e?e:function(){return V(e,this)}}function Z(e){return"function"==typeof e?e:function(){return q(e,this)}}G.select=function(e){var t,r,n,i,a=[];e=W(e);for(var o=-1,s=this.length;++o=0&&"xmlns"!==(r=e.slice(0,t))&&(e=e.slice(t+1)),X.hasOwnProperty(r)?{space:X[r],local:e}:e}},G.attr=function(t,r){if(arguments.length<2){if("string"==typeof t){var n=this.node();return(t=e.ns.qualify(t)).local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}for(r in t)this.each($(r,t[r]));return this}return this.each($(t,r))},G.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var r=this.node(),n=(e=Q(e)).length,i=-1;if(t=r.classList){for(;++i=0;)(r=n[i])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},G.sort=function(e){e=le.apply(this,arguments);for(var t=-1,r=this.length;++t0&&(t=t.slice(0,o));var l=pe.get(t);function c(){var e=this[a];e&&(this.removeEventListener(t,e,e.$),delete this[a])}return l&&(t=l,s=me),o?r?function(){var e=s(r,n(arguments));c.call(this),this.addEventListener(t,this[a]=e,e.$=i),e._=r}:c:r?z:function(){var r,n=new RegExp("^__on([^.]+)"+e.requote(t)+"$");for(var i in this)if(r=i.match(n)){var a=this[i];this.removeEventListener(r[1],a,a.$),delete this[i]}}}e.selection.enter=ue,e.selection.enter.prototype=he,he.append=G.append,he.empty=G.empty,he.node=G.node,he.call=G.call,he.size=G.size,he.select=function(e){for(var t,r,n,i,a,o=[],s=-1,l=this.length;++s=t&&(t=i+1);!(o=s[t])&&++t1?Me:e<-1?-Me:Math.asin(e)}function Le(e){return((e=Math.exp(e))+1/e)/2}var Pe=Math.SQRT2;e.interpolateZoom=function(e,t){var r,n,i=e[0],a=e[1],o=e[2],s=t[0],l=t[1],c=t[2],u=s-i,h=l-a,f=u*u+h*h;if(f<1e-12)n=Math.log(c/o)/Pe,r=function(e){return[i+e*u,a+e*h,o*Math.exp(Pe*e*n)]};else{var p=Math.sqrt(f),d=(c*c-o*o+4*f)/(2*o*2*p),m=(c*c-o*o-4*f)/(2*c*2*p),g=Math.log(Math.sqrt(d*d+1)-d),y=Math.log(Math.sqrt(m*m+1)-m);n=(y-g)/Pe,r=function(e){var t=e*n,r=Le(g),s=o/(2*p)*(r*function(e){return((e=Math.exp(2*e))-1)/(e+1)}(Pe*t+g)-function(e){return((e=Math.exp(e))-1/e)/2}(g));return[i+s*u,a+s*h,o*r/Le(Pe*t+g)]}}return r.duration=1e3*n,r},e.behavior.zoom=function(){var t,r,n,a,s,l,c,u,h,f={x:0,y:0,k:1},p=[960,500],d=Oe,m=250,g=0,y="mousedown.zoom",v="mousemove.zoom",x="mouseup.zoom",_="touchstart.zoom",b=B(w,"zoomstart","zoom","zoomend");function w(e){e.on(y,L).on(De+".zoom",z).on("dblclick.zoom",D).on(_,P)}function T(e){return[(e[0]-f.x)/f.k,(e[1]-f.y)/f.k]}function k(e){f.k=Math.max(d[0],Math.min(d[1],e))}function A(e,t){t=function(e){return[e[0]*f.k+f.x,e[1]*f.k+f.y]}(t),f.x+=e[0]-t[0],f.y+=e[1]-t[1]}function M(t,n,i,a){t.__chart__={x:f.x,y:f.y,k:f.k},k(Math.pow(2,a)),A(r=n,i),t=e.select(t),m>0&&(t=t.transition().duration(m)),t.call(w.event)}function S(){c&&c.domain(l.range().map((function(e){return(e-f.x)/f.k})).map(l.invert)),h&&h.domain(u.range().map((function(e){return(e-f.y)/f.k})).map(u.invert))}function E(e){g++||e({type:"zoomstart"})}function C(e){S(),e({type:"zoom",scale:f.k,translate:[f.x,f.y]})}function I(e){--g||(e({type:"zoomend"}),r=null)}function L(){var t=this,r=b.of(t,arguments),n=0,i=e.select(o(t)).on(v,(function(){n=1,A(e.mouse(t),a),C(r)})).on(x,(function(){i.on(v,null).on(x,null),s(n),I(r)})),a=T(e.mouse(t)),s=ve(t);Wi.call(t),E(r)}function P(){var t,r=this,n=b.of(r,arguments),i={},a=0,o=".zoom-"+e.event.changedTouches[0].identifier,l="touchmove"+o,c="touchend"+o,u=[],h=e.select(r),p=ve(r);function d(){var n=e.touches(r);return t=f.k,n.forEach((function(e){e.identifier in i&&(i[e.identifier]=T(e))})),n}function m(){var t=e.event.target;e.select(t).on(l,g).on(c,v),u.push(t);for(var n=e.event.changedTouches,o=0,h=n.length;o1){y=p[0];var x=p[1],_=y[0]-x[0],b=y[1]-x[1];a=_*_+b*b}}function g(){var o,l,c,u,h=e.touches(r);Wi.call(r);for(var f=0,p=h.length;f360?e-=360:e<0&&(e+=360),e<60?n+(i-n)*e/60:e<180?i:e<240?n+(i-n)*(240-e)/60:n}(e))}return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)||t<0?0:t>1?1:t,n=2*(r=r<0?0:r>1?1:r)-(i=r<=.5?r*(1+t):r+t-r*t),new Qe(a(e+120),a(e),a(e-120))}function Ne(t,r,n){return this instanceof Ne?(this.h=+t,this.c=+r,void(this.l=+n)):arguments.length<2?t instanceof Ne?new Ne(t.h,t.c,t.l):function(e,t,r){return e>0?new Ne(Math.atan2(r,t)*Ee,Math.sqrt(t*t+r*r),e):new Ne(NaN,NaN,e)}(t instanceof qe?t.l:(t=ot((t=e.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new Ne(t,r,n)}Be.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new Fe(this.h,this.s,this.l/e)},Be.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new Fe(this.h,this.s,e*this.l)},Be.rgb=function(){return je(this.h,this.s,this.l)},e.hcl=Ne;var Ue=Ne.prototype=new Re;function Ve(e,t,r){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new qe(r,Math.cos(e*=Se)*t,Math.sin(e)*t)}function qe(e,t,r){return this instanceof qe?(this.l=+e,this.a=+t,void(this.b=+r)):arguments.length<2?e instanceof qe?new qe(e.l,e.a,e.b):e instanceof Ne?Ve(e.h,e.c,e.l):ot((e=Qe(e)).r,e.g,e.b):new qe(e,t,r)}Ue.brighter=function(e){return new Ne(this.h,this.c,Math.min(100,this.l+He*(arguments.length?e:1)))},Ue.darker=function(e){return new Ne(this.h,this.c,Math.max(0,this.l-He*(arguments.length?e:1)))},Ue.rgb=function(){return Ve(this.h,this.c,this.l).rgb()},e.lab=qe;var He=18,Ge=.95047,We=1,Ze=1.08883,Ye=qe.prototype=new Re;function Xe(e,t,r){var n=(e+16)/116,i=n+t/500,a=n-r/200;return new Qe(Je(3.2404542*(i=$e(i)*Ge)-1.5371385*(n=$e(n)*We)-.4985314*(a=$e(a)*Ze)),Je(-.969266*i+1.8760108*n+.041556*a),Je(.0556434*i-.2040259*n+1.0572252*a))}function $e(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function Ke(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function Je(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function Qe(e,t,r){return this instanceof Qe?(this.r=~~e,this.g=~~t,void(this.b=~~r)):arguments.length<2?e instanceof Qe?new Qe(e.r,e.g,e.b):it(""+e,Qe,je):new Qe(e,t,r)}function et(e){return new Qe(e>>16,e>>8&255,255&e)}function tt(e){return et(e)+""}Ye.brighter=function(e){return new qe(Math.min(100,this.l+He*(arguments.length?e:1)),this.a,this.b)},Ye.darker=function(e){return new qe(Math.max(0,this.l-He*(arguments.length?e:1)),this.a,this.b)},Ye.rgb=function(){return Xe(this.l,this.a,this.b)},e.rgb=Qe;var rt=Qe.prototype=new Re;function nt(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function it(e,t,r){var n,i,a,o=0,s=0,l=0;if(n=/([a-z]+)\((.*)\)/.exec(e=e.toLowerCase()))switch(i=n[2].split(","),n[1]){case"hsl":return r(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(lt(i[0]),lt(i[1]),lt(i[2]))}return(a=ct.get(e))?t(a.r,a.g,a.b):(null!=e&&"#"===e.charAt(0)&&!isNaN(a=parseInt(e.slice(1),16))&&(4===e.length?(o=(3840&a)>>4,o|=o>>4,s=240&a,s|=s>>4,l=15&a,l|=l<<4):7===e.length&&(o=(16711680&a)>>16,s=(65280&a)>>8,l=255&a)),t(o,s,l))}function at(e,t,r){var n,i,a=Math.min(e/=255,t/=255,r/=255),o=Math.max(e,t,r),s=o-a,l=(o+a)/2;return s?(i=l<.5?s/(o+a):s/(2-o-a),n=e==o?(t-r)/s+(t0&&l<1?0:n),new Fe(n,i,l)}function ot(e,t,r){var n=Ke((.4124564*(e=st(e))+.3575761*(t=st(t))+.1804375*(r=st(r)))/Ge),i=Ke((.2126729*e+.7151522*t+.072175*r)/We);return qe(116*i-16,500*(n-i),200*(i-Ke((.0193339*e+.119192*t+.9503041*r)/Ze)))}function st(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function lt(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}rt.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,r=this.g,n=this.b,i=30;return t||r||n?(t&&t=200&&t<300||304===t){try{e=i.call(o,c)}catch(e){return void s.error.call(o,e)}s.load.call(o,e)}else s.error.call(o,c)}return self.XDomainRequest&&!("withCredentials"in c)&&/^(http(s)?:)?\/\//.test(t)&&(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=h:c.onreadystatechange=function(){c.readyState>3&&h()},c.onprogress=function(t){var r=e.event;e.event=t;try{s.progress.call(o,c)}finally{e.event=r}},o.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?l[e]:(null==t?delete l[e]:l[e]=t+"",o)},o.mimeType=function(e){return arguments.length?(r=null==e?null:e+"",o):r},o.responseType=function(e){return arguments.length?(u=e,o):u},o.response=function(e){return i=e,o},["get","post"].forEach((function(e){o[e]=function(){return o.send.apply(o,[e].concat(n(arguments)))}})),o.send=function(e,n,i){if(2===arguments.length&&"function"==typeof n&&(i=n,n=null),c.open(e,t,!0),null!=r&&!("accept"in l)&&(l.accept=r+",*/*"),c.setRequestHeader)for(var a in l)c.setRequestHeader(a,l[a]);return null!=r&&c.overrideMimeType&&c.overrideMimeType(r),null!=u&&(c.responseType=u),null!=i&&o.on("error",i).on("load",(function(e){i(null,e)})),s.beforesend.call(o,c),c.send(n??null),o},o.abort=function(){return c.abort(),o},e.rebind(o,s,"on"),null==a?o:o.get(function(e){return 1===e.length?function(t,r){e(null==t?r:null)}:e}(a))}ct.forEach((function(e,t){ct.set(e,et(t))})),e.functor=ut,e.xhr=ht(C),e.dsv=function(e,t){var r=new RegExp('["'+e+"\n]"),n=e.charCodeAt(0);function i(e,r,n){arguments.length<3&&(n=r,r=null);var i=ft(e,t,null==r?a:o(r),n);return i.row=function(e){return arguments.length?i.response(null==(r=e)?a:o(e)):r},i}function a(e){return i.parse(e.responseText)}function o(e){return function(t){return i.parse(t.responseText,e)}}function s(t){return t.map(l).join(e)}function l(e){return r.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}return i.parse=function(e,t){var r;return i.parseRows(e,(function(e,n){if(r)return r(e,n-1);var i=function(t){for(var r={},n=e.length,i=0;i=l)return o;if(i)return i=!1,a;var t=c;if(34===e.charCodeAt(t)){for(var r=t;r++24?(isFinite(t)&&(clearTimeout(gt),gt=setTimeout(xt,t)),mt=0):(mt=1,yt(xt))}function _t(){for(var e=Date.now(),t=pt;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function bt(){for(var e,t=pt,r=1/0;t;)t.c?(t.t1&&Ce(e[r[n-2]],e[r[n-1]],e[i])<=0;)--n;r[n++]=i}return r.slice(0,n)}function At(e,t){return e[0]-t[0]||e[1]-t[1]}e.timer=function(){vt.apply(this,arguments)},e.timer.flush=function(){_t(),bt()},e.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},e.geom={},e.geom.hull=function(e){var t=wt,r=Tt;if(arguments.length)return n(e);function n(e){if(e.length<3)return[];var n,i=ut(t),a=ut(r),o=e.length,s=[],l=[];for(n=0;n=0;--n)p.push(e[s[c[n]][2]]);for(n=+h;nwe)s=s.L;else{if(!((i=a-qt(s,o))>we)){n>-we?(t=s.P,r=s):i>-we?(t=s,r=s.N):t=r=s;break}if(!s.R){t=s;break}s=s.R}var l=Bt(e);if(Pt.insert(t,l),t||r){if(t===r)return Yt(t),r=Bt(t.site),Pt.insert(l,r),l.edge=r.edge=Kt(t.site,l.site),Zt(t),void Zt(r);if(!r)return void(l.edge=Kt(t.site,l.site));Yt(t),Yt(r);var c=t.site,u=c.x,h=c.y,f=e.x-u,p=e.y-h,d=r.site,m=d.x-u,g=d.y-h,y=2*(f*g-p*m),v=f*f+p*p,x=m*m+g*g,_={x:(g*v-p*x)/y+u,y:(f*x-m*v)/y+h};Qt(r.edge,c,d,_),l.edge=Kt(c,e,null,_),r.edge=Kt(e,d,null,_),Zt(t),Zt(r)}}function Vt(e,t){var r=e.site,n=r.x,i=r.y,a=i-t;if(!a)return n;var o=e.P;if(!o)return-1/0;var s=(r=o.site).x,l=r.y,c=l-t;if(!c)return s;var u=s-n,h=1/a-1/c,f=u/c;return h?(-f+Math.sqrt(f*f-2*h*(u*u/(-2*c)-l+c/2+i-a/2)))/h+n:(n+s)/2}function qt(e,t){var r=e.N;if(r)return Vt(r,t);var n=e.site;return n.y===t?n.x:1/0}function Ht(e){this.site=e,this.edges=[]}function Gt(e,t){return t.angle-e.angle}function Wt(){rr(this),this.x=this.y=this.arc=this.site=this.cy=null}function Zt(e){var t=e.P,r=e.N;if(t&&r){var n=t.site,i=e.site,a=r.site;if(n!==a){var o=i.x,s=i.y,l=n.x-o,c=n.y-s,u=a.x-o,h=2*(l*(g=a.y-s)-c*u);if(!(h>=-1e-12)){var f=l*l+c*c,p=u*u+g*g,d=(g*f-c*p)/h,m=(l*p-u*f)/h,g=m+s,y=Rt.pop()||new Wt;y.arc=e,y.site=i,y.x=d+o,y.y=g+Math.sqrt(d*d+m*m),y.cy=g,e.circle=y;for(var v=null,x=Dt._;x;)if(y.y=s)return;if(f>d){if(a){if(a.y>=c)return}else a={x:g,y:l};r={x:g,y:c}}else{if(a){if(a.y1)if(f>d){if(a){if(a.y>=c)return}else a={x:(l-i)/n,y:l};r={x:(c-i)/n,y:c}}else{if(a){if(a.y=s)return}else a={x:o,y:n*o+i};r={x:s,y:n*s+i}}else{if(a){if(a.x0)){if(a/=f,f<0){if(a0){if(a>h)return;a>u&&(u=a)}if(a=r-l,f||!(a<0)){if(a/=f,f<0){if(a>h)return;a>u&&(u=a)}else if(f>0){if(a0)){if(a/=p,p<0){if(a0){if(a>h)return;a>u&&(u=a)}if(a=n-c,p||!(a<0)){if(a/=p,p<0){if(a>h)return;a>u&&(u=a)}else if(p>0){if(a0&&(i.a={x:l+u*f,y:c+u*p}),h<1&&(i.b={x:l+h*f,y:c+h*p}),i}}}}}}(e[0][0],e[0][1],e[1][0],e[1][1]),i=r.length;i--;)(!Xt(t=r[i],e)||!n(t)||v(t.a.x-t.b.x)we||v(i-r)>we)&&(s.splice(o,0,new er(Jt(a.site,u,v(n-h)we?{x:h,y:v(t-h)we?{x:v(r-d)we?{x:f,y:v(t-f)we?{x:v(r-p)=r&&c.x<=i&&c.y>=n&&c.y<=o?[[r,o],[i,o],[i,n],[r,n]]:[]).point=e[s]})),t}function s(e){return e.map((function(e,t){return{x:Math.round(n(e,t)/we)*we,y:Math.round(i(e,t)/we)*we,i:t}}))}return o.links=function(e){return or(s(e)).edges.filter((function(e){return e.l&&e.r})).map((function(t){return{source:e[t.l.i],target:e[t.r.i]}}))},o.triangles=function(e){var t=[];return or(s(e)).cells.forEach((function(r,n){for(var i,a=r.site,o=r.edges.sort(Gt),s=-1,l=o.length,c=o[l-1].edge,u=c.l===a?c.r:c.l;++sa&&(i=t.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:mr(r,n)})),a=vr.lastIndex;return am&&(m=l.x),l.y>g&&(g=l.y),c.push(l.x),u.push(l.y);else for(h=0;hm&&(m=_),b>g&&(g=b),c.push(_),u.push(b)}var w=m-p,T=g-d;function k(e,t,r,n,i,a,o,s){if(!isNaN(r)&&!isNaN(n))if(e.leaf){var l=e.x,c=e.y;if(null!=l)if(v(l-r)+v(c-n)<.01)A(e,t,r,n,i,a,o,s);else{var u=e.point;e.x=e.y=e.point=null,A(e,u,l,c,i,a,o,s),A(e,t,r,n,i,a,o,s)}else e.x=r,e.y=n,e.point=t}else A(e,t,r,n,i,a,o,s)}function A(e,t,r,n,i,a,o,s){var l=.5*(i+o),c=.5*(a+s),u=r>=l,h=n>=c,f=h<<1|u;e.leaf=!1,u?i=l:o=l,h?a=c:s=c,k(e=e.nodes[f]||(e.nodes[f]={leaf:!0,nodes:[],point:null,x:null,y:null}),t,r,n,i,a,o,s)}w>T?g=d+w:m=p+T;var M={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(e){k(M,e,+y(e,++h),+x(e,h),p,d,m,g)},visit:function(e){fr(e,M,p,d,m,g)},find:function(e){return function(e,t,r,n,i,a,o){var s,l=1/0;return function e(c,u,h,f,p){if(!(u>a||h>o||f=b)<<1|t>=_,T=w+4;w=0&&!(n=e.interpolators[i](t,r)););return n}function _r(e,t){var r,n=[],i=[],a=e.length,o=t.length,s=Math.min(e.length,t.length);for(r=0;r=1)return 1;var t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}function Cr(e){return 1-Math.cos(e*Me)}function Ir(e){return Math.pow(2,10*(e-1))}function Lr(e){return 1-Math.sqrt(1-e*e)}function Pr(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function zr(e,t){return t-=e,function(r){return Math.round(e+t*r)}}function Dr(e){var t=[e.a,e.b],r=[e.c,e.d],n=Rr(t),i=Or(t,r),a=Rr(function(e,t,r){return e[0]+=r*t[0],e[1]+=r*t[1],e}(r,t,-i))||0;t[0]*r[1]=0?e.slice(0,t):e,i=t>=0?e.slice(t+1):"in";return n=wr.get(n)||br,function(e){return function(t){return t<=0?0:t>=1?1:e(t)}}((i=Tr.get(i)||C)(n.apply(null,r.call(arguments,1))))},e.interpolateHcl=function(t,r){t=e.hcl(t),r=e.hcl(r);var n=t.h,i=t.c,a=t.l,o=r.h-n,s=r.c-i,l=r.l-a;return isNaN(s)&&(s=0,i=isNaN(i)?r.c:i),isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o>180?o-=360:o<-180&&(o+=360),function(e){return Ve(n+o*e,i+s*e,a+l*e)+""}},e.interpolateHsl=function(t,r){t=e.hsl(t),r=e.hsl(r);var n=t.h,i=t.s,a=t.l,o=r.h-n,s=r.s-i,l=r.l-a;return isNaN(s)&&(s=0,i=isNaN(i)?r.s:i),isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o>180?o-=360:o<-180&&(o+=360),function(e){return je(n+o*e,i+s*e,a+l*e)+""}},e.interpolateLab=function(t,r){t=e.lab(t),r=e.lab(r);var n=t.l,i=t.a,a=t.b,o=r.l-n,s=r.a-i,l=r.b-a;return function(e){return Xe(n+o*e,i+s*e,a+l*e)+""}},e.interpolateRound=zr,e.transform=function(t){var r=i.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(e){if(null!=e){r.setAttribute("transform",e);var t=r.transform.baseVal.consolidate()}return new Dr(t?t.matrix:Fr)})(t)},Dr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Fr={a:1,b:0,c:0,d:1,e:0,f:0};function Br(e){return e.length?e.pop()+",":""}function jr(t,r){var n=[],i=[];return t=e.transform(t),r=e.transform(r),function(e,t,r,n){if(e[0]!==t[0]||e[1]!==t[1]){var i=r.push("translate(",null,",",null,")");n.push({i:i-4,x:mr(e[0],t[0])},{i:i-2,x:mr(e[1],t[1])})}else(t[0]||t[1])&&r.push("translate("+t+")")}(t.translate,r.translate,n,i),function(e,t,r,n){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),n.push({i:r.push(Br(r)+"rotate(",null,")")-2,x:mr(e,t)})):t&&r.push(Br(r)+"rotate("+t+")")}(t.rotate,r.rotate,n,i),function(e,t,r,n){e!==t?n.push({i:r.push(Br(r)+"skewX(",null,")")-2,x:mr(e,t)}):t&&r.push(Br(r)+"skewX("+t+")")}(t.skew,r.skew,n,i),function(e,t,r,n){if(e[0]!==t[0]||e[1]!==t[1]){var i=r.push(Br(r)+"scale(",null,",",null,")");n.push({i:i-4,x:mr(e[0],t[0])},{i:i-2,x:mr(e[1],t[1])})}else(1!==t[0]||1!==t[1])&&r.push(Br(r)+"scale("+t+")")}(t.scale,r.scale,n,i),t=r=null,function(e){for(var t,r=-1,a=i.length;++r0?n=e:(t.c=null,t.t=NaN,t=null,l.end({type:"end",alpha:n=0})):e>0&&(l.start({type:"start",alpha:n=e}),t=vt(s.tick)),s):n},s.start=function(){var e,t,r,n=y.length,l=v.length,u=c[0],d=c[1];for(e=0;e=0;)r.push(i[n])}function en(e,t){for(var r=[e],n=[];null!=(e=r.pop());)if(n.push(e),(a=e.children)&&(i=a.length))for(var i,a,o=-1;++o=0;)o.push(u=c[l]),u.parent=a,u.depth=a.depth+1;r&&(a.value=0),a.children=c}else r&&(a.value=+r.call(n,a,a.depth)||0),delete a.children;return en(i,(function(t){var n,i;e&&(n=t.children)&&n.sort(e),r&&(i=t.parent)&&(i.value+=t.value)})),s}return n.sort=function(t){return arguments.length?(e=t,n):e},n.children=function(e){return arguments.length?(t=e,n):t},n.value=function(e){return arguments.length?(r=e,n):r},n.revalue=function(e){return r&&(Qr(e,(function(e){e.children&&(e.value=0)})),en(e,(function(e){var t;e.children||(e.value=+r.call(n,e,e.depth)||0),(t=e.parent)&&(t.value+=e.value)}))),e},n},e.layout.partition=function(){var t=e.layout.hierarchy(),r=[1,1];function n(e,t,r,i){var a=e.children;if(e.x=t,e.y=e.depth*i,e.dx=r,e.dy=i,a&&(o=a.length)){var o,s,l,c=-1;for(r=e.value?r/e.value:0;++cs&&(s=n),o.push(n)}for(r=0;ri&&(n=r,i=t);return n}function mn(e){return e.reduce(gn,0)}function gn(e,t){return e+t[1]}function yn(e,t){return vn(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function vn(e,t){for(var r=-1,n=+e[0],i=(e[1]-n)/t,a=[];++r<=t;)a[r]=i*r+n;return a}function xn(t){return[e.min(t),e.max(t)]}function _n(e,t){return e.value-t.value}function bn(e,t){var r=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=r,r._pack_prev=t}function wn(e,t){e._pack_next=t,t._pack_prev=e}function Tn(e,t){var r=t.x-e.x,n=t.y-e.y,i=e.r+t.r;return.999*i*i>r*r+n*n}function kn(e){if((t=e.children)&&(l=t.length)){var t,r,n,i,a,o,s,l,c=1/0,u=-1/0,h=1/0,f=-1/0;if(t.forEach(An),(r=t[0]).x=-r.r,r.y=0,x(r),l>1&&((n=t[1]).x=n.r,n.y=0,x(n),l>2))for(En(r,n,i=t[2]),x(i),bn(r,i),r._pack_prev=i,bn(i,n),n=r._pack_next,a=3;a0)for(o=-1;++o=h[0]&&l<=h[1]&&((s=c[e.bisect(f,l,1,d)-1]).y+=m,s.push(a[o]));return c}return a.value=function(e){return arguments.length?(r=e,a):r},a.range=function(e){return arguments.length?(n=ut(e),a):n},a.bins=function(e){return arguments.length?(i="number"==typeof e?function(t){return vn(t,e)}:ut(e),a):i},a.frequency=function(e){return arguments.length?(t=!!e,a):t},a},e.layout.pack=function(){var t,r=e.layout.hierarchy().sort(_n),n=0,i=[1,1];function a(e,a){var o=r.call(this,e,a),s=o[0],l=i[0],c=i[1],u=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(s.x=s.y=0,en(s,(function(e){e.r=+u(e.value)})),en(s,kn),n){var h=n*(t?1:Math.max(2*s.r/l,2*s.r/c))/2;en(s,(function(e){e.r+=h})),en(s,kn),en(s,(function(e){e.r-=h}))}return Sn(s,l/2,c/2,t?1:1/Math.max(2*s.r/l,2*s.r/c)),o}return a.size=function(e){return arguments.length?(i=e,a):i},a.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,a):t},a.padding=function(e){return arguments.length?(n=+e,a):n},Jr(a,r)},e.layout.tree=function(){var t=e.layout.hierarchy().sort(null).value(null),r=Cn,n=[1,1],i=null;function a(e,a){var c=t.call(this,e,a),u=c[0],h=function(e){for(var t,r={A:null,children:[e]},n=[r];null!=(t=n.pop());)for(var i,a=t.children,o=0,s=a.length;op.x&&(p=e),e.depth>d.depth&&(d=e)}));var m=r(f,p)/2-f.x,g=n[0]/(p.x+r(p,f)/2+m),y=n[1]/(d.depth||1);Qr(u,(function(e){e.x=(e.x+m)*g,e.y=e.depth*y}))}return c}function o(e){var t=e.children,n=e.parent.children,i=e.i?n[e.i-1]:null;if(t.length){!function(e){for(var t,r=0,n=0,i=e.children,a=i.length;--a>=0;)(t=i[a]).z+=r,t.m+=r,r+=t.s+(n+=t.c)}(e);var a=(t[0].z+t[t.length-1].z)/2;i?(e.z=i.z+r(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+r(e._,i._));e.parent.A=function(e,t,n){if(t){for(var i,a=e,o=e,s=t,l=a.parent.children[0],c=a.m,u=o.m,h=s.m,f=l.m;s=Ln(s),a=In(a),s&&a;)l=In(l),(o=Ln(o)).a=e,(i=s.z+h-a.z-c+r(s._,a._))>0&&(Pn(zn(s,e,n),e,i),c+=i,u+=i),h+=s.m,c+=a.m,f+=l.m,u+=o.m;s&&!Ln(o)&&(o.t=s,o.m+=h-u),a&&!In(l)&&(l.t=a,l.m+=c-f,n=e)}return n}(e,i,e.parent.A||n[0])}function s(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function l(e){e.x*=n[0],e.y=e.depth*n[1]}return a.separation=function(e){return arguments.length?(r=e,a):r},a.size=function(e){return arguments.length?(i=null==(n=e)?l:null,a):i?null:n},a.nodeSize=function(e){return arguments.length?(i=null==(n=e)?null:l,a):i?n:null},Jr(a,t)},e.layout.cluster=function(){var t=e.layout.hierarchy().sort(null).value(null),r=Cn,n=[1,1],i=!1;function a(a,o){var s,l=t.call(this,a,o),c=l[0],u=0;en(c,(function(t){var n=t.children;n&&n.length?(t.x=function(e){return e.reduce((function(e,t){return e+t.x}),0)/e.length}(n),t.y=function(t){return 1+e.max(t,(function(e){return e.y}))}(n)):(t.x=s?u+=r(t,s):0,t.y=0,s=t)}));var h=Dn(c),f=On(c),p=h.x-r(h,f)/2,d=f.x+r(f,h)/2;return en(c,i?function(e){e.x=(e.x-c.x)*n[0],e.y=(c.y-e.y)*n[1]}:function(e){e.x=(e.x-p)/(d-p)*n[0],e.y=(1-(c.y?e.y/c.y:1))*n[1]}),l}return a.separation=function(e){return arguments.length?(r=e,a):r},a.size=function(e){return arguments.length?(i=null==(n=e),a):i?null:n},a.nodeSize=function(e){return arguments.length?(i=null!=(n=e),a):i?n:null},Jr(a,t)},e.layout.treemap=function(){var t,r=e.layout.hierarchy(),n=Math.round,i=[1,1],a=null,o=Rn,s=!1,l="squarify",c=.5*(1+Math.sqrt(5));function u(e,t){for(var r,n,i=-1,a=e.length;++i0;)s.push(r=c[i-1]),s.area+=r.area,"squarify"!==l||(n=p(s,m))<=f?(c.pop(),f=n):(s.area-=s.pop().area,d(s,m,a,!1),m=Math.min(a.dx,a.dy),s.length=s.area=0,f=1/0);s.length&&(d(s,m,a,!0),s.length=s.area=0),t.forEach(h)}}function f(e){var t=e.children;if(t&&t.length){var r,n=o(e),i=t.slice(),a=[];for(u(i,n.dx*n.dy/e.value),a.area=0;r=i.pop();)a.push(r),a.area+=r.area,null!=r.z&&(d(a,r.z?n.dx:n.dy,n,!i.length),a.length=a.area=0);t.forEach(f)}}function p(e,t){for(var r,n=e.area,i=0,a=1/0,o=-1,s=e.length;++oi&&(i=r));return t*=t,(n*=n)?Math.max(t*i*c/n,n/(t*a*c)):1/0}function d(e,t,r,i){var a,o=-1,s=e.length,l=r.x,c=r.y,u=t?n(e.area/t):0;if(t==r.dx){for((i||u>r.dy)&&(u=r.dy);++or.dx)&&(u=r.dx);++o1);return e+t*r*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=e.random.normal.apply(e,arguments);return function(){return Math.exp(t())}},bates:function(t){var r=e.random.irwinHall(t);return function(){return r()/t}},irwinHall:function(e){return function(){for(var t=0,r=0;r2?Hn:Nn,l=n?Ur:Nr;return i=o(e,t,l,r),a=o(t,e,l,xr),s}function s(e){return i(e)}return s.invert=function(e){return a(e)},s.domain=function(t){return arguments.length?(e=t.map(Number),o()):e},s.range=function(e){return arguments.length?(t=e,o()):t},s.rangeRound=function(e){return s.range(e).interpolate(zr)},s.clamp=function(e){return arguments.length?(n=e,o()):n},s.interpolate=function(e){return arguments.length?(r=e,o()):r},s.ticks=function(t){return Xn(e,t)},s.tickFormat=function(t,r){return d3_scale_linearTickFormat(e,t,r)},s.nice=function(t){return Zn(e,t),o()},s.copy=function(){return Gn(e,t,r,n)},o()}function Wn(t,r){return e.rebind(t,r,"range","rangeRound","interpolate","clamp")}function Zn(e,t){return Un(e,Vn(Yn(e,t)[2])),Un(e,Vn(Yn(e,t)[2])),e}function Yn(e,t){null==t&&(t=10);var r=Bn(e),n=r[1]-r[0],i=Math.pow(10,Math.floor(Math.log(n/t)/Math.LN10)),a=t/n*i;return a<=.15?i*=10:a<=.35?i*=5:a<=.75&&(i*=2),r[0]=Math.ceil(r[0]/i)*i,r[1]=Math.floor(r[1]/i)*i+.5*i,r[2]=i,r}function Xn(t,r){return e.range.apply(e,Yn(t,r))}function $n(e,t,r,n){function i(e){return(r?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(t)}function a(e){return r?Math.pow(t,e):-Math.pow(t,-e)}function o(t){return e(i(t))}return o.invert=function(t){return a(e.invert(t))},o.domain=function(t){return arguments.length?(r=t[0]>=0,e.domain((n=t.map(Number)).map(i)),o):n},o.base=function(r){return arguments.length?(t=+r,e.domain(n.map(i)),o):t},o.nice=function(){var t=Un(n.map(i),r?Math:Kn);return e.domain(t),n=t.map(a),o},o.ticks=function(){var e=Bn(n),o=[],s=e[0],l=e[1],c=Math.floor(i(s)),u=Math.ceil(i(l)),h=t%1?2:t;if(isFinite(u-c)){if(r){for(;c0;f--)o.push(a(c)*f);for(c=0;o[c]l;u--);o=o.slice(c,u)}return o},o.copy=function(){return $n(e.copy(),t,r,n)},Wn(o,e)}e.scale.linear=function(){return Gn([0,1],[0,1],xr,!1)},e.scale.log=function(){return $n(e.scale.linear().domain([0,1]),10,!0,[1,10])};var Kn={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};function Jn(e,t,r){var n=Qn(t),i=Qn(1/t);function a(t){return e(n(t))}return a.invert=function(t){return i(e.invert(t))},a.domain=function(t){return arguments.length?(e.domain((r=t.map(Number)).map(n)),a):r},a.ticks=function(e){return Xn(r,e)},a.tickFormat=function(e,t){return d3_scale_linearTickFormat(r,e,t)},a.nice=function(e){return a.domain(Zn(r,e))},a.exponent=function(o){return arguments.length?(n=Qn(t=o),i=Qn(1/t),e.domain(r.map(n)),a):t},a.copy=function(){return Jn(e.copy(),t,r)},Wn(a,e)}function Qn(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function ei(t,r){var n,i,a;function o(e){return i[((n.get(e)||("range"===r.t?n.set(e,t.push(e)):NaN))-1)%i.length]}function s(r,n){return e.range(t.length).map((function(e){return r+n*e}))}return o.domain=function(e){if(!arguments.length)return t;t=[],n=new _;for(var i,a=-1,s=e.length;++a0?n[e-1]:t[0],eh?0:1;if(c=Ae)return l(c,p)+(s?l(s,1-p):"")+"Z";var d,m,g,y,v,x,_,b,w,T,k,A,M=0,S=0,E=[];if((y=(+o.apply(this,arguments)||0)/2)&&(g=n===ui?Math.sqrt(s*s+c*c):+n.apply(this,arguments),p||(S*=-1),c&&(S=Ie(g/c*Math.sin(y))),s&&(M=Ie(g/s*Math.sin(y)))),c){v=c*Math.cos(u+S),x=c*Math.sin(u+S),_=c*Math.cos(h-S),b=c*Math.sin(h-S);var C=Math.abs(h-u-2*S)<=Te?0:1;if(S&&gi(v,x,_,b)===p^C){var I=(u+h)/2;v=c*Math.cos(I),x=c*Math.sin(I),_=b=null}}else v=x=0;if(s){w=s*Math.cos(h-M),T=s*Math.sin(h-M),k=s*Math.cos(u+M),A=s*Math.sin(u+M);var L=Math.abs(u-h+2*M)<=Te?0:1;if(M&&gi(w,T,k,A)===1-p^L){var P=(u+h)/2;w=s*Math.cos(P),T=s*Math.sin(P),k=A=null}}else w=T=0;if(f>we&&(d=Math.min(Math.abs(c-s)/2,+r.apply(this,arguments)))>.001){m=s0?0:1}function yi(e,t,r,n,i){var a=e[0]-t[0],o=e[1]-t[1],s=(i?n:-n)/Math.sqrt(a*a+o*o),l=s*o,c=-s*a,u=e[0]+l,h=e[1]+c,f=t[0]+l,p=t[1]+c,d=(u+f)/2,m=(h+p)/2,g=f-u,y=p-h,v=g*g+y*y,x=r-n,_=u*p-f*h,b=(y<0?-1:1)*Math.sqrt(Math.max(0,x*x*v-_*_)),w=(_*y-g*b)/v,T=(-_*g-y*b)/v,k=(_*y+g*b)/v,A=(-_*g+y*b)/v,M=w-d,S=T-m,E=k-d,C=A-m;return M*M+S*S>E*E+C*C&&(w=k,T=A),[[w-l,T-c],[w*r/x,T*r/x]]}function vi(){return!0}function xi(e){var t=wt,r=Tt,n=vi,i=bi,a=i.key,o=.7;function s(a){var s,l=[],c=[],u=-1,h=a.length,f=ut(t),p=ut(r);function d(){l.push("M",i(e(c),o))}for(;++u1&&i.push("H",n[0]),i.join("")},"step-before":Ti,"step-after":ki,basis:Si,"basis-open":function(e){if(e.length<4)return bi(e);for(var t,r=[],n=-1,i=e.length,a=[0],o=[0];++n<3;)t=e[n],a.push(t[0]),o.push(t[1]);for(r.push(Ei(Li,a)+","+Ei(Li,o)),--n;++n9&&(i=3*t/Math.sqrt(i),o[s]=i*r,o[s+1]=i*n);for(s=-1;++s<=l;)i=(e[Math.min(l,s+1)][0]-e[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),a.push([i||0,o[s]*i||0]);return a}(e))}});function bi(e){return e.length>1?e.join("L"):e+"Z"}function wi(e){return e.join("L")+"Z"}function Ti(e){for(var t=0,r=e.length,n=e[0],i=[n[0],",",n[1]];++t1){s=t[1],a=e[l],l++,n+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(a[0]-s[0])+","+(a[1]-s[1])+","+a[0]+","+a[1];for(var c=2;cTe)+",1 "+t}function l(e,t,r,n){return"Q 0,0 "+n}return a.radius=function(e){return arguments.length?(r=ut(e),a):r},a.source=function(t){return arguments.length?(e=ut(t),a):e},a.target=function(e){return arguments.length?(t=ut(e),a):t},a.startAngle=function(e){return arguments.length?(n=ut(e),a):n},a.endAngle=function(e){return arguments.length?(i=ut(e),a):i},a},e.svg.diagonal=function(){var e=Ri,t=Fi,r=ji;function n(n,i){var a=e.call(this,n,i),o=t.call(this,n,i),s=(a.y+o.y)/2,l=[a,{x:a.x,y:s},{x:o.x,y:s},o];return"M"+(l=l.map(r))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}return n.source=function(t){return arguments.length?(e=ut(t),n):e},n.target=function(e){return arguments.length?(t=ut(e),n):t},n.projection=function(e){return arguments.length?(r=e,n):r},n},e.svg.diagonal.radial=function(){var t=e.svg.diagonal(),r=ji,n=t.projection;return t.projection=function(e){return arguments.length?n(function(e){return function(){var t=e.apply(this,arguments),r=t[0],n=t[1]-Me;return[r*Math.cos(n),r*Math.sin(n)]}}(r=e)):r},t},e.svg.symbol=function(){var e=Ui,t=Ni;function r(r,n){return(qi.get(e.call(this,r,n))||Vi)(t.call(this,r,n))}return r.type=function(t){return arguments.length?(e=ut(t),r):e},r.size=function(e){return arguments.length?(t=ut(e),r):t},r};var qi=e.map({circle:Vi,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*Gi)),r=t*Gi;return"M0,"+-t+"L"+r+",0 0,"+t+" "+-r+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/Hi),r=t*Hi/2;return"M0,"+r+"L"+t+","+-r+" "+-t+","+-r+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Hi),r=t*Hi/2;return"M0,"+-r+"L"+t+","+r+" "+-t+","+r+"Z"}});e.svg.symbolTypes=qi.keys();var Hi=Math.sqrt(3),Gi=Math.tan(30*Se);G.transition=function(e){for(var t,r,n=Xi||++Ji,i=ta(e),a=[],o=$i||{time:Date.now(),ease:Er,delay:0,duration:250},s=-1,l=this.length;++s0;)c[--f].call(e,o);if(a>=1)return h.event&&h.event.end.call(e,e.__data__,t),--u.count?delete u[n]:delete e[r],1}h||(a=i.time,o=vt((function(e){var t=h.delay;if(o.t=t+a,t<=e)return f(e-t);o.c=f}),0,a),h=u[n]={tween:new _,time:a,timer:o,delay:i.delay,duration:i.duration,ease:i.ease,index:t},i=null,++u.count)}Ki.call=G.call,Ki.empty=G.empty,Ki.node=G.node,Ki.size=G.size,e.transition=function(t,r){return t&&t.transition?Xi?t.transition(r):t:e.selection().transition(t)},e.transition.prototype=Ki,Ki.select=function(e){var t,r,n,i=this.id,a=this.namespace,o=[];e=W(e);for(var s=-1,l=this.length;++srect,.s>rect").attr("width",s[1]-s[0])}function m(e){e.select(".extent").attr("y",l[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",l[1]-l[0])}function g(){var h,g,y=this,v=e.select(e.event.target),x=n.of(y,arguments),_=e.select(y),b=v.datum(),w=!/^(n|s)$/.test(b)&&i,T=!/^(e|w)$/.test(b)&&a,k=v.classed("extent"),A=ve(y),M=e.mouse(y),S=e.select(o(y)).on("keydown.brush",(function(){32==e.event.keyCode&&(k||(h=null,M[0]-=s[1],M[1]-=l[1],k=2),R())})).on("keyup.brush",(function(){32==e.event.keyCode&&2==k&&(M[0]+=s[1],M[1]+=l[1],k=0,R())}));if(e.event.changedTouches?S.on("touchmove.brush",I).on("touchend.brush",P):S.on("mousemove.brush",I).on("mouseup.brush",P),_.interrupt().selectAll("*").interrupt(),k)M[0]=s[0]-M[0],M[1]=l[0]-M[1];else if(b){var E=+/w$/.test(b),C=+/^n/.test(b);g=[s[1-E]-M[0],l[1-C]-M[1]],M[0]=s[E],M[1]=l[C]}else e.event.altKey&&(h=M.slice());function I(){var t=e.mouse(y),r=!1;g&&(t[0]+=g[0],t[1]+=g[1]),k||(e.event.altKey?(h||(h=[(s[0]+s[1])/2,(l[0]+l[1])/2]),M[0]=s[+(t[0]0))return o;do{o.push(a=new Date(+t)),i(t,n),e(t)}while(a=r)for(;e(r),!t(r);)r.setTime(r-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;i(e,-1),!t(e););else for(;--r>=0;)for(;i(e,1),!t(e););}))},a&&(s.count=function(n,i){return t.setTime(+n),r.setTime(+i),e(t),e(r),Math.floor(a(t,r))},s.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?s.filter(o?function(t){return o(t)%e==0}:function(t){return s.count(0,t)%e==0}):s:null}),s}var i=n((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?n((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,r){t.setTime(+t+r*e)}),(function(t,r){return(r-t)/e})):i:null};var a=i.range,o=1e3,s=6e4,l=36e5,c=864e5,u=6048e5,h=n((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+t*o)}),(function(e,t){return(t-e)/o}),(function(e){return e.getUTCSeconds()})),f=h.range,p=n((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*o)}),(function(e,t){e.setTime(+e+t*s)}),(function(e,t){return(t-e)/s}),(function(e){return e.getMinutes()})),d=p.range,m=n((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*o-e.getMinutes()*s)}),(function(e,t){e.setTime(+e+t*l)}),(function(e,t){return(t-e)/l}),(function(e){return e.getHours()})),g=m.range,y=n((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*s)/c}),(function(e){return e.getDate()-1})),v=y.range;function x(e){return n((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*s)/u}))}var _=x(0),b=x(1),w=x(2),T=x(3),k=x(4),A=x(5),M=x(6),S=_.range,E=b.range,C=w.range,I=T.range,L=k.range,P=A.range,z=M.range,D=n((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()})),O=D.range,R=n((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));R.every=function(e){return isFinite(e=Math.floor(e))&&e>0?n((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,r){t.setFullYear(t.getFullYear()+r*e)})):null};var F=R.range,B=n((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*s)}),(function(e,t){return(t-e)/s}),(function(e){return e.getUTCMinutes()})),j=B.range,N=n((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*l)}),(function(e,t){return(t-e)/l}),(function(e){return e.getUTCHours()})),U=N.range,V=n((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/c}),(function(e){return e.getUTCDate()-1})),q=V.range;function H(e){return n((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/u}))}var G=H(0),W=H(1),Z=H(2),Y=H(3),X=H(4),$=H(5),K=H(6),J=G.range,Q=W.range,ee=Z.range,te=Y.range,re=X.range,ne=$.range,ie=K.range,ae=n((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()})),oe=ae.range,se=n((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));se.every=function(e){return isFinite(e=Math.floor(e))&&e>0?n((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,r){t.setUTCFullYear(t.getUTCFullYear()+r*e)})):null};var le=se.range;e.timeDay=y,e.timeDays=v,e.timeFriday=A,e.timeFridays=P,e.timeHour=m,e.timeHours=g,e.timeInterval=n,e.timeMillisecond=i,e.timeMilliseconds=a,e.timeMinute=p,e.timeMinutes=d,e.timeMonday=b,e.timeMondays=E,e.timeMonth=D,e.timeMonths=O,e.timeSaturday=M,e.timeSaturdays=z,e.timeSecond=h,e.timeSeconds=f,e.timeSunday=_,e.timeSundays=S,e.timeThursday=k,e.timeThursdays=L,e.timeTuesday=w,e.timeTuesdays=C,e.timeWednesday=T,e.timeWednesdays=I,e.timeWeek=_,e.timeWeeks=S,e.timeYear=R,e.timeYears=F,e.utcDay=V,e.utcDays=q,e.utcFriday=$,e.utcFridays=ne,e.utcHour=N,e.utcHours=U,e.utcMillisecond=i,e.utcMilliseconds=a,e.utcMinute=B,e.utcMinutes=j,e.utcMonday=W,e.utcMondays=Q,e.utcMonth=ae,e.utcMonths=oe,e.utcSaturday=K,e.utcSaturdays=ie,e.utcSecond=h,e.utcSeconds=f,e.utcSunday=G,e.utcSundays=J,e.utcThursday=X,e.utcThursdays=re,e.utcTuesday=Z,e.utcTuesdays=ee,e.utcWednesday=Y,e.utcWednesdays=te,e.utcWeek=G,e.utcWeeks=J,e.utcYear=se,e.utcYears=le,Object.defineProperty(e,"__esModule",{value:!0})},n("object"==typeof e&&typeof t<"u"?e:(r=r||self).d3=r.d3||{})}}),T=m({"node_modules/d3-time-format/dist/d3-time-format.js"(e,t){var r,n;r=e,n=function(e,t){function r(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function n(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function i(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function a(e){var a=e.dateTime,o=e.date,l=e.time,c=e.periods,u=e.days,h=e.shortDays,f=e.months,ve=e.shortMonths,xe=p(c),_e=d(c),be=p(u),we=d(u),Te=p(h),ke=d(h),Ae=p(f),Me=d(f),Se=p(ve),Ee=d(ve),Ce={a:function(e){return h[e.getDay()]},A:function(e){return u[e.getDay()]},b:function(e){return ve[e.getMonth()]},B:function(e){return f[e.getMonth()]},c:null,d:O,e:O,f:N,H:R,I:F,j:B,L:j,m:U,M:V,p:function(e){return c[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:ge,s:ye,S:q,u:H,U:G,V:W,w:Z,W:Y,x:null,X:null,y:X,Y:$,Z:K,"%":me},Ie={a:function(e){return h[e.getUTCDay()]},A:function(e){return u[e.getUTCDay()]},b:function(e){return ve[e.getUTCMonth()]},B:function(e){return f[e.getUTCMonth()]},c:null,d:J,e:J,f:ne,H:Q,I:ee,j:te,L:re,m:ie,M:ae,p:function(e){return c[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:ge,s:ye,S:oe,u:se,U:le,V:ce,w:ue,W:he,x:null,X:null,y:fe,Y:pe,Z:de,"%":me},Le={a:function(e,t,r){var n=Te.exec(t.slice(r));return n?(e.w=ke[n[0].toLowerCase()],r+n[0].length):-1},A:function(e,t,r){var n=be.exec(t.slice(r));return n?(e.w=we[n[0].toLowerCase()],r+n[0].length):-1},b:function(e,t,r){var n=Se.exec(t.slice(r));return n?(e.m=Ee[n[0].toLowerCase()],r+n[0].length):-1},B:function(e,t,r){var n=Ae.exec(t.slice(r));return n?(e.m=Me[n[0].toLowerCase()],r+n[0].length):-1},c:function(e,t,r){return De(e,a,t,r)},d:A,e:A,f:L,H:S,I:S,j:M,L:I,m:k,M:E,p:function(e,t,r){var n=xe.exec(t.slice(r));return n?(e.p=_e[n[0].toLowerCase()],r+n[0].length):-1},q:T,Q:z,s:D,S:C,u:g,U:y,V:v,w:m,W:x,x:function(e,t,r){return De(e,o,t,r)},X:function(e,t,r){return De(e,l,t,r)},y:b,Y:_,Z:w,"%":P};function Pe(e,t){return function(r){var n,i,a,o=[],l=-1,c=0,u=e.length;for(r instanceof Date||(r=new Date(+r));++l53)return null;"w"in c||(c.w=1),"Z"in c?(l=(s=n(i(c.y,0,1))).getUTCDay(),s=l>4||0===l?t.utcMonday.ceil(s):t.utcMonday(s),s=t.utcDay.offset(s,7*(c.V-1)),c.y=s.getUTCFullYear(),c.m=s.getUTCMonth(),c.d=s.getUTCDate()+(c.w+6)%7):(l=(s=r(i(c.y,0,1))).getDay(),s=l>4||0===l?t.timeMonday.ceil(s):t.timeMonday(s),s=t.timeDay.offset(s,7*(c.V-1)),c.y=s.getFullYear(),c.m=s.getMonth(),c.d=s.getDate()+(c.w+6)%7)}else("W"in c||"U"in c)&&("w"in c||(c.w="u"in c?c.u%7:"W"in c?1:0),l="Z"in c?n(i(c.y,0,1)).getUTCDay():r(i(c.y,0,1)).getDay(),c.m=0,c.d="W"in c?(c.w+6)%7+7*c.W-(l+5)%7:c.w+7*c.U-(l+6)%7);return"Z"in c?(c.H+=c.Z/100|0,c.M+=c.Z%100,n(c)):r(c)}}function De(e,t,r,n){for(var i,a,o=0,l=t.length,c=r.length;o=c)return-1;if(37===(i=t.charCodeAt(o++))){if(i=t.charAt(o++),!(a=Le[i in s?t.charAt(o++):i])||(n=a(e,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}return Ce.x=Pe(o,Ce),Ce.X=Pe(l,Ce),Ce.c=Pe(a,Ce),Ie.x=Pe(o,Ie),Ie.X=Pe(l,Ie),Ie.c=Pe(a,Ie),{format:function(e){var t=Pe(e+="",Ce);return t.toString=function(){return e},t},parse:function(e){var t=ze(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=Pe(e+="",Ie);return t.toString=function(){return e},t},utcParse:function(e){var t=ze(e+="",!0);return t.toString=function(){return e},t}}}var o,s={"-":"",_:" ",0:"0"},l=/^\s*\d+/,c=/^%/,u=/[\\^$*+?|[\]().{}]/g;function h(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a68?1900:2e3),r+n[0].length):-1}function w(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function T(e,t,r){var n=l.exec(t.slice(r,r+1));return n?(e.q=3*n[0]-3,r+n[0].length):-1}function k(e,t,r){var n=l.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function A(e,t,r){var n=l.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function M(e,t,r){var n=l.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function S(e,t,r){var n=l.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function E(e,t,r){var n=l.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function C(e,t,r){var n=l.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function I(e,t,r){var n=l.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function L(e,t,r){var n=l.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function P(e,t,r){var n=c.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function z(e,t,r){var n=l.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function D(e,t,r){var n=l.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function O(e,t){return h(e.getDate(),t,2)}function R(e,t){return h(e.getHours(),t,2)}function F(e,t){return h(e.getHours()%12||12,t,2)}function B(e,r){return h(1+t.timeDay.count(t.timeYear(e),e),r,3)}function j(e,t){return h(e.getMilliseconds(),t,3)}function N(e,t){return j(e,t)+"000"}function U(e,t){return h(e.getMonth()+1,t,2)}function V(e,t){return h(e.getMinutes(),t,2)}function q(e,t){return h(e.getSeconds(),t,2)}function H(e){var t=e.getDay();return 0===t?7:t}function G(e,r){return h(t.timeSunday.count(t.timeYear(e)-1,e),r,2)}function W(e,r){var n=e.getDay();return e=n>=4||0===n?t.timeThursday(e):t.timeThursday.ceil(e),h(t.timeThursday.count(t.timeYear(e),e)+(4===t.timeYear(e).getDay()),r,2)}function Z(e){return e.getDay()}function Y(e,r){return h(t.timeMonday.count(t.timeYear(e)-1,e),r,2)}function X(e,t){return h(e.getFullYear()%100,t,2)}function $(e,t){return h(e.getFullYear()%1e4,t,4)}function K(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+h(t/60|0,"0",2)+h(t%60,"0",2)}function J(e,t){return h(e.getUTCDate(),t,2)}function Q(e,t){return h(e.getUTCHours(),t,2)}function ee(e,t){return h(e.getUTCHours()%12||12,t,2)}function te(e,r){return h(1+t.utcDay.count(t.utcYear(e),e),r,3)}function re(e,t){return h(e.getUTCMilliseconds(),t,3)}function ne(e,t){return re(e,t)+"000"}function ie(e,t){return h(e.getUTCMonth()+1,t,2)}function ae(e,t){return h(e.getUTCMinutes(),t,2)}function oe(e,t){return h(e.getUTCSeconds(),t,2)}function se(e){var t=e.getUTCDay();return 0===t?7:t}function le(e,r){return h(t.utcSunday.count(t.utcYear(e)-1,e),r,2)}function ce(e,r){var n=e.getUTCDay();return e=n>=4||0===n?t.utcThursday(e):t.utcThursday.ceil(e),h(t.utcThursday.count(t.utcYear(e),e)+(4===t.utcYear(e).getUTCDay()),r,2)}function ue(e){return e.getUTCDay()}function he(e,r){return h(t.utcMonday.count(t.utcYear(e)-1,e),r,2)}function fe(e,t){return h(e.getUTCFullYear()%100,t,2)}function pe(e,t){return h(e.getUTCFullYear()%1e4,t,4)}function de(){return"+0000"}function me(){return"%"}function ge(e){return+e}function ye(e){return Math.floor(+e/1e3)}function ve(t){return o=a(t),e.timeFormat=o.format,e.timeParse=o.parse,e.utcFormat=o.utcFormat,e.utcParse=o.utcParse,o}ve({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var xe="%Y-%m-%dT%H:%M:%S.%LZ",_e=Date.prototype.toISOString?function(e){return e.toISOString()}:e.utcFormat(xe),be=+new Date("2000-01-01T00:00:00.000Z")?function(e){var t=new Date(e);return isNaN(t)?null:t}:e.utcParse(xe);e.isoFormat=_e,e.isoParse=be,e.timeFormatDefaultLocale=ve,e.timeFormatLocale=a,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof e&&typeof t<"u"?n(e,w()):n((r=r||self).d3=r.d3||{},r.d3)}}),k=m({"node_modules/d3-format/dist/d3-format.js"(e,t){var r,n;r=e,n=function(e){function t(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function r(e){return(e=t(Math.abs(e)))?e[1]:NaN}var n,i=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function a(e){if(!(t=i.exec(e)))throw new Error("invalid format: "+e);var t;return new o({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function o(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function s(e,r){var n=t(e,r);if(!n)return e+"";var i=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+i:i.length>a+1?i.slice(0,a+1)+"."+i.slice(a+1):i+new Array(a-i.length+2).join("0")}a.prototype=o.prototype,o.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 l={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return s(100*e,t)},r:s,s:function(e,r){var i=t(e,r);if(!i)return e+"";var a=i[0],o=i[1],s=o-(n=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,l=a.length;return s===l?a:s>l?a+new Array(s-l+1).join("0"):s>0?a.slice(0,s)+"."+a.slice(s):"0."+new Array(1-s).join("0")+t(e,Math.max(0,r+s-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function c(e){return e}var u,h=Array.prototype.map,f=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function p(e){var t=void 0===e.grouping||void 0===e.thousands?c:function(e,t){return function(r,n){for(var i=r.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),a.push(r.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}(h.call(e.grouping,Number),e.thousands+""),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",s=void 0===e.decimal?".":e.decimal+"",u=void 0===e.numerals?c:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(h.call(e.numerals,String)),p=void 0===e.percent?"%":e.percent+"",d=void 0===e.minus?"-":e.minus+"",m=void 0===e.nan?"NaN":e.nan+"";function g(e){var r=(e=a(e)).fill,c=e.align,h=e.sign,g=e.symbol,y=e.zero,v=e.width,x=e.comma,_=e.precision,b=e.trim,w=e.type;"n"===w?(x=!0,w="g"):l[w]||(void 0===_&&(_=12),b=!0,w="g"),(y||"0"===r&&"="===c)&&(y=!0,r="0",c="=");var T="$"===g?i:"#"===g&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",k="$"===g?o:/[%p]/.test(w)?p:"",A=l[w],M=/[defgprs%]/.test(w);function S(e){var i,a,o,l=T,p=k;if("c"===w)p=A(e)+p,e="";else{var g=(e=+e)<0||1/e<0;if(e=isNaN(e)?m:A(Math.abs(e),_),b&&(e=function(e){e:for(var t,r=e.length,n=1,i=-1;n0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),g&&0==+e&&"+"!==h&&(g=!1),l=(g?"("===h?h:d:"-"===h||"("===h?"":h)+l,p=("s"===w?f[8+n/3]:"")+p+(g&&"("===h?")":""),M)for(i=-1,a=e.length;++i(o=e.charCodeAt(i))||o>57){p=(46===o?s+e.slice(i+1):e.slice(i))+p,e=e.slice(0,i);break}}x&&!y&&(e=t(e,1/0));var S=l.length+e.length+p.length,E=S>1)+l+e+p+E.slice(S);break;default:e=E+l+e+p}return u(e)}return _=void 0===_?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_)),S.toString=function(){return e+""},S}return{format:g,formatPrefix:function(e,t){var n=g(((e=a(e)).type="f",e)),i=3*Math.max(-8,Math.min(8,Math.floor(r(t)/3))),o=Math.pow(10,-i),s=f[8+i/3];return function(e){return n(o*e)+s}}}}function d(t){return u=p(t),e.format=u.format,e.formatPrefix=u.formatPrefix,u}d({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),e.FormatSpecifier=o,e.formatDefaultLocale=d,e.formatLocale=p,e.formatSpecifier=a,e.precisionFixed=function(e){return Math.max(0,-r(Math.abs(e)))},e.precisionPrefix=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(r(t)/3)))-r(Math.abs(e)))},e.precisionRound=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,r(t)-r(e))+1},Object.defineProperty(e,"__esModule",{value:!0})},n("object"==typeof e&&typeof t<"u"?e:(r=typeof globalThis<"u"?globalThis:r||self).d3=r.d3||{})}}),A=m({"node_modules/is-string-blank/index.js"(e,t){t.exports=function(e){for(var t,r=e.length,n=0;n13)&&32!==t&&133!==t&&160!==t&&5760!==t&&6158!==t&&(t<8192||t>8205)&&8232!==t&&8233!==t&&8239!==t&&8287!==t&&8288!==t&&12288!==t&&65279!==t)return!1;return!0}}}),M=m({"node_modules/fast-isnumeric/index.js"(e,t){var r=A();t.exports=function(e){var t=typeof e;if("string"===t){var n=e;if(0==(e=+e)&&r(n))return!1}else if("number"!==t)return!1;return e-e<1}}}),S=m({"src/constants/numerical.js"(e,t){t.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:2440587.5,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"−"}}}),E=m({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(e,t){var r,n;r=e,n=function(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=typeof Uint8Array>"u"?[]:new Uint8Array(256),n=0;n<64;n++)r[t.charCodeAt(n)]=n;e.decode=function(e){var t,n,i,a,o,s=.75*e.length,l=e.length,c=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var u=new ArrayBuffer(s),h=new Uint8Array(u);for(t=0;t>4,h[c++]=(15&i)<<4|a>>2,h[c++]=(3&a)<<6|63&o;return u},e.encode=function(e){var r,n=new Uint8Array(e),i=n.length,a="";for(r=0;r>2],a+=t[(3&n[r])<<4|n[r+1]>>4],a+=t[(15&n[r+1])<<2|n[r+2]>>6],a+=t[63&n[r+2]];return i%3==2?a=a.substring(0,a.length-1)+"=":i%3==1&&(a=a.substring(0,a.length-2)+"=="),a},Object.defineProperty(e,"__esModule",{value:!0})},n("object"==typeof e&&typeof t<"u"?e:(r=typeof globalThis<"u"?globalThis:r||self)["base64-arraybuffer"]={})}}),C=m({"src/lib/is_plain_object.js"(e,t){t.exports=function(e){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(e):"[object Object]"===Object.prototype.toString.call(e)&&Object.getPrototypeOf(e).hasOwnProperty("hasOwnProperty")}}}),I=m({"src/lib/array.js"(e){var t=E().decode,r=C(),n=Array.isArray,i=ArrayBuffer,a=DataView;function o(e){return i.isView(e)&&!(e instanceof a)}function s(e){return n(e)||o(e)}e.isTypedArray=o,e.isArrayOrTypedArray=s,e.isArray1D=function(e){return!s(e[0])},e.ensureArray=function(e,t){return n(e)||(e=[]),e.length=t,e};var l={u1c:typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};function c(e){return e.constructor===ArrayBuffer}function u(e,t,r){if(s(e)){if(s(e[0])){for(var n=r,i=0;i2)return c[t]=2|c[t],f.set(e,null);if(h){for(o=t;o0)return Math.log(e)/Math.LN10;var n=Math.log(Math.min(t[0],t[1]))/Math.LN10;return r(n)||(n=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),n}}}),O=m({"src/lib/relink_private.js"(e,t){var r=I().isArrayOrTypedArray,n=C();t.exports=function e(t,i){for(var a in i){var o=i[a],s=t[a];if(s!==o)if("_"===a.charAt(0)||"function"==typeof o){if(a in t)continue;t[a]=o}else if(r(o)&&r(s)&&n(o[0])){if("customdata"===a||"ids"===a)continue;for(var l=Math.min(o.length,s.length),c=0;ct/2?e-Math.round(e/t)*t:e}}}}),F=m({"node_modules/tinycolor2/tinycolor.js"(e,t){!function(e){var r=/^\s+/,n=/\s+$/,i=0,a=e.round,o=e.min,s=e.max,l=e.random;function c(t,l){if(l=l||{},(t=t||"")instanceof c)return t;if(!(this instanceof c))return new c(t,l);var u=function(t){var i={r:0,g:0,b:0},a=1,l=null,c=null,u=null,h=!1,f=!1;return"string"==typeof t&&(t=function(e){e=e.replace(r,"").replace(n,"").toLowerCase();var t,i=!1;if(S[e])e=S[e],i=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=N.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=N.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=N.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=N.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=N.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=N.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=N.hex8.exec(e))?{r:P(t[1]),g:P(t[2]),b:P(t[3]),a:R(t[4]),format:i?"name":"hex8"}:(t=N.hex6.exec(e))?{r:P(t[1]),g:P(t[2]),b:P(t[3]),format:i?"name":"hex"}:(t=N.hex4.exec(e))?{r:P(t[1]+""+t[1]),g:P(t[2]+""+t[2]),b:P(t[3]+""+t[3]),a:R(t[4]+""+t[4]),format:i?"name":"hex8"}:!!(t=N.hex3.exec(e))&&{r:P(t[1]+""+t[1]),g:P(t[2]+""+t[2]),b:P(t[3]+""+t[3]),format:i?"name":"hex"}}(t)),"object"==typeof t&&(U(t.r)&&U(t.g)&&U(t.b)?(i=function(e,t,r){return{r:255*I(e,255),g:255*I(t,255),b:255*I(r,255)}}(t.r,t.g,t.b),h=!0,f="%"===String(t.r).substr(-1)?"prgb":"rgb"):U(t.h)&&U(t.s)&&U(t.v)?(l=D(t.s),c=D(t.v),i=function(t,r,n){t=6*I(t,360),r=I(r,100),n=I(n,100);var i=e.floor(t),a=t-i,o=n*(1-r),s=n*(1-a*r),l=n*(1-(1-a)*r),c=i%6;return{r:255*[n,s,o,o,l,n][c],g:255*[l,n,n,s,o,o][c],b:255*[o,o,l,n,n,s][c]}}(t.h,l,c),h=!0,f="hsv"):U(t.h)&&U(t.s)&&U(t.l)&&(l=D(t.s),u=D(t.l),i=function(e,t,r){var n,i,a;function o(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=I(e,360),t=I(t,100),r=I(r,100),0===t)n=i=a=r;else{var s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;n=o(l,s,e+1/3),i=o(l,s,e),a=o(l,s,e-1/3)}return{r:255*n,g:255*i,b:255*a}}(t.h,l,u),h=!0,f="hsl"),t.hasOwnProperty("a")&&(a=t.a)),a=C(a),{ok:h,format:t.format||f,r:o(255,s(i.r,0)),g:o(255,s(i.g,0)),b:o(255,s(i.b,0)),a}}(t);this._originalInput=t,this._r=u.r,this._g=u.g,this._b=u.b,this._a=u.a,this._roundA=a(100*this._a)/100,this._format=l.format||u.format,this._gradientType=l.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=u.ok,this._tc_id=i++}function u(e,t,r){e=I(e,255),t=I(t,255),r=I(r,255);var n,i,a=s(e,t,r),l=o(e,t,r),c=(a+l)/2;if(a==l)n=i=0;else{var u=a-l;switch(i=c>.5?u/(2-a-l):u/(a+l),a){case e:n=(t-r)/u+(t>1)+720)%360;--t;)n.h=(n.h+i)%360,a.push(c(n));return a}function M(e,t){t=t||6;for(var r=c(e).toHsv(),n=r.h,i=r.s,a=r.v,o=[],s=1/t;t--;)o.push(c({h:n,s:i,v:a})),a=(a+s)%1;return o}c.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var t,r,n,i=this.toRgb();return t=i.r/255,r=i.g/255,n=i.b/255,.2126*(t<=.03928?t/12.92:e.pow((t+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:e.pow((r+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:e.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=C(e),this._roundA=a(100*this._a)/100,this},toHsv:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=h(this._r,this._g,this._b),t=a(360*e.h),r=a(100*e.s),n=a(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=u(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=u(this._r,this._g,this._b),t=a(360*e.h),r=a(100*e.s),n=a(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return f(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,r,n,i){var o=[z(a(e).toString(16)),z(a(t).toString(16)),z(a(r).toString(16)),z(O(n))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+a(this._r)+", "+a(this._g)+", "+a(this._b)+")":"rgba("+a(this._r)+", "+a(this._g)+", "+a(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:a(100*I(this._r,255))+"%",g:a(100*I(this._g,255))+"%",b:a(100*I(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+a(100*I(this._r,255))+"%, "+a(100*I(this._g,255))+"%, "+a(100*I(this._b,255))+"%)":"rgba("+a(100*I(this._r,255))+"%, "+a(100*I(this._g,255))+"%, "+a(100*I(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(E[f(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+p(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var i=c(e);r="#"+p(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return t||!n||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),("hex"===e||"hex6"===e)&&(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return c(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(y,arguments)},brighten:function(){return this._applyModification(v,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(m,arguments)},greyscale:function(){return this._applyModification(g,arguments)},spin:function(){return this._applyModification(_,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(b,arguments)},monochromatic:function(){return this._applyCombination(M,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(T,arguments)}},c.fromRatio=function(e,t){if("object"==typeof e){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]="a"===n?e[n]:D(e[n]));e=r}return c(e,t)},c.equals=function(e,t){return!(!e||!t)&&c(e).toRgbString()==c(t).toRgbString()},c.random=function(){return c.fromRatio({r:l(),g:l(),b:l()})},c.mix=function(e,t,r){r=0===r?0:r||50;var n=c(e).toRgb(),i=c(t).toRgb(),a=r/100;return c({r:(i.r-n.r)*a+n.r,g:(i.g-n.g)*a+n.g,b:(i.b-n.b)*a+n.b,a:(i.a-n.a)*a+n.a})},c.readability=function(t,r){var n=c(t),i=c(r);return(e.max(n.getLuminance(),i.getLuminance())+.05)/(e.min(n.getLuminance(),i.getLuminance())+.05)},c.isReadable=function(e,t,r){var n,i,a=c.readability(e,t);switch(i=!1,n=function(e){var t,r;return"AA"!==(t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==t&&(t="AA"),"small"!==(r=(e.size||"small").toLowerCase())&&"large"!==r&&(r="small"),{level:t,size:r}}(r),n.level+n.size){case"AAsmall":case"AAAlarge":i=a>=4.5;break;case"AAlarge":i=a>=3;break;case"AAAsmall":i=a>=7}return i},c.mostReadable=function(e,t,r){var n,i,a,o,s=null,l=0;i=(r=r||{}).includeFallbackColors,a=r.level,o=r.size;for(var u=0;ul&&(l=n,s=c(t[u]));return c.isReadable(e,s,{level:a,size:o})||!i?s:(r.includeFallbackColors=!1,c.mostReadable(e,["#fff","#000"],r))};var S=c.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},E=c.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(S);function C(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function I(t,r){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(t)&&(t="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(t);return t=o(r,s(0,parseFloat(t))),n&&(t=parseInt(t*r,10)/100),e.abs(t-r)<1e-6?1:t%r/parseFloat(r)}function L(e){return o(1,s(0,e))}function P(e){return parseInt(e,16)}function z(e){return 1==e.length?"0"+e:""+e}function D(e){return e<=1&&(e=100*e+"%"),e}function O(t){return e.round(255*parseFloat(t)).toString(16)}function R(e){return P(e)/255}var F,B,j,N=(B="[\\s|\\(]+("+(F="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+F+")[,|\\s]+("+F+")\\s*\\)?",j="[\\s|\\(]+("+F+")[,|\\s]+("+F+")[,|\\s]+("+F+")[,|\\s]+("+F+")\\s*\\)?",{CSS_UNIT:new RegExp(F),rgb:new RegExp("rgb"+B),rgba:new RegExp("rgba"+j),hsl:new RegExp("hsl"+B),hsla:new RegExp("hsla"+j),hsv:new RegExp("hsv"+B),hsva:new RegExp("hsva"+j),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function U(e){return!!N.CSS_UNIT.exec(e)}typeof t<"u"&&t.exports?t.exports=c:window.tinycolor=c}(Math)}}),B=m({"src/lib/extend.js"(e){var t=C(),r=Array.isArray;function n(e,i,a,o){var s,l,c,u,h,f,p,d=e[0],m=e.length;if(2===m&&r(d)&&r(e[1])&&0===d.length){if(p=function(e,t){var r,n;for(r=0;r=0)))return e;if(3===o)i[o]>1&&(i[o]=1);else if(i[o]>=1)return e}var s=Math.round(255*i[0])+", "+Math.round(255*i[1])+", "+Math.round(255*i[2]);return a?"rgba("+s+", "+i[3]+")":"rgb("+s+")"}a.tinyRGB=function(e){var t=e.toRgb();return"rgb("+Math.round(t.r)+", "+Math.round(t.g)+", "+Math.round(t.b)+")"},a.rgb=function(e){return a.tinyRGB(r(e))},a.opacity=function(e){return e?r(e).getAlpha():0},a.addOpacity=function(e,t){var n=r(e).toRgb();return"rgba("+Math.round(n.r)+", "+Math.round(n.g)+", "+Math.round(n.b)+", "+t+")"},a.combine=function(e,t){var n=r(e).toRgb();if(1===n.a)return r(e).toRgbString();var i=r(t||l).toRgb(),a=1===i.a?i:{r:255*(1-i.a)+i.r*i.a,g:255*(1-i.a)+i.g*i.a,b:255*(1-i.a)+i.b*i.a},o={r:a.r*(1-n.a)+n.r*n.a,g:a.g*(1-n.a)+n.g*n.a,b:a.b*(1-n.a)+n.b*n.a};return r(o).toRgbString()},a.interpolate=function(e,t,n){var i=r(e).toRgb(),a=r(t).toRgb(),o={r:n*i.r+(1-n)*a.r,g:n*i.g+(1-n)*a.g,b:n*i.b+(1-n)*a.b};return r(o).toRgbString()},a.contrast=function(e,t,n){var i=r(e);return 1!==i.getAlpha()&&(i=r(a.combine(e,l))),(i.isDark()?t?i.lighten(t):l:n?i.darken(n):s).toString()},a.stroke=function(e,t){var n=r(t);e.style({stroke:a.tinyRGB(n),"stroke-opacity":n.getAlpha()})},a.fill=function(e,t){var n=r(t);e.style({fill:a.tinyRGB(n),"fill-opacity":n.getAlpha()})},a.clean=function(e){if(e&&"object"==typeof e){var t,r,n,o,s=Object.keys(e);for(t=0;t!0===e||!1===e;i(e)||n.arrayOk&&Array.isArray(e)&&e.length>0&&e.every(i)?t.set(e):t.set(r)}},number:{coerceFunction:function(e,r,n,i){f(e)&&(e=p(e)),!t(e)||void 0!==i.min&&ei.max?r.set(n):r.set(+e)}},integer:{coerceFunction:function(e,r,n,i){-1===(i.extras||[]).indexOf(e)?(f(e)&&(e=p(e)),e%1||!t(e)||void 0!==i.min&&ei.max?r.set(n):r.set(+e)):r.set(e)}},string:{coerceFunction:function(e,t,r,n){if("string"!=typeof e){var i="number"==typeof e;!0!==n.strict&&i?t.set(String(e)):t.set(r)}else n.noBlank&&!e?t.set(r):t.set(e)}},color:{coerceFunction:function(e,t,n){f(e)&&(e=p(e)),r(e).isValid()?t.set(e):t.set(n)}},colorlist:{coerceFunction:function(e,t,n){Array.isArray(e)&&e.length&&e.every((function(e){return r(e).isValid()}))?t.set(e):t.set(n)}},colorscale:{coerceFunction:function(e,t,r){t.set(a.get(e,r))}},angle:{coerceFunction:function(e,r,n){f(e)&&(e=p(e)),"auto"===e?r.set("auto"):t(e)?r.set(u(+e,360)):r.set(n)}},subplotid:{coerceFunction:function(e,t,r,n){var i=n.regex||c(r);let a=e=>"string"==typeof e&&i.test(e);a(e)||n.arrayOk&&h(e)&&e.length>0&&e.every(a)?t.set(e):t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r||"string"==typeof e&&!!c(r).test(e)}},flaglist:{coerceFunction:function(e,t,r,n){if(-1===(n.extras||[]).indexOf(e))if("string"==typeof e){for(var i=e.split("+"),a=0;a/g),l=0;l1){var t=["LOG:"];for(e=0;e1){var i=[];for(e=0;e"),"long")}},i.warn=function(){var e;if(r.logging>0){var t=["WARN:"];for(e=0;e0){var i=[];for(e=0;e"),"stick")}},i.error=function(){var e;if(r.logging>0){var t=["ERROR:"];for(e=0;e0){var i=[];for(e=0;e"),"stick")}}}}),Q=m({"src/lib/noop.js"(e,t){t.exports=function(){}}}),ee=m({"src/lib/push_unique.js"(e,t){t.exports=function(e,t){if(t instanceof RegExp){for(var r=t.toString(),n=0;nf({valType:"string",dflt:"",editType:e},!1!==t?{arrayOk:!0}:{}),e.texttemplateAttrs=({editType:e="calc",arrayOk:t}={},r={})=>f({valType:"string",dflt:"",editType:e},!1!==t?{arrayOk:!0}:{}),e.shapeTexttemplateAttrs=({editType:e="arraydraw",newshape:t}={},r={})=>({valType:"string",dflt:"",editType:e}),e.templatefallbackAttrs=({editType:e="none"}={})=>({valType:"any",dflt:"-",editType:e})}}),Be=m({"src/components/shapes/label_texttemplate.js"(e,t){function r(e,t){return t?t.d2l(e):e}function n(e,t){return t?t.l2d(e):e}function i(e){return e.x0shift||0}function a(e){return e.x1shift||0}function o(e){return e.y0shift||0}function s(e){return e.y1shift||0}function l(e,t){return r(e.x1,t)+a(e)-r(e.x0,t)-i(e)}function c(e,t,n){return r(e.y1,n)+s(e)-r(e.y0,n)-o(e)}t.exports={x0:function(e){return e.x0},x1:function(e){return e.x1},y0:function(e){return e.y0},y1:function(e){return e.y1},slope:function(e,t,r){return"line"!==e.type?void 0:c(e,0,r)/l(e,t)},dx:l,dy:c,width:function(e,t){return Math.abs(l(e,t))},height:function(e,t,r){return Math.abs(c(e,0,r))},length:function(e,t,r){return"line"!==e.type?void 0:Math.sqrt(Math.pow(l(e,t),2)+Math.pow(c(e,0,r),2))},xcenter:function(e,t){return n((r(e.x1,t)+a(e)+r(e.x0,t)+i(e))/2,t)},ycenter:function(e,t,i){return n((r(e.y1,i)+s(e)+r(e.y0,i)+o(e))/2,i)},simpleXVariables:["x0","x1","y0","y1","dy","height","ycenter"],simpleYVariables:["x0","x1","y0","y1","dx","width","xcenter"]}}}),je=m({"src/components/shapes/draw_newshape/attributes.js"(e,t){var r=De().overrideAll,n=q(),i=j(),a=Oe().dash,o=B().extendFlat,{shapeTexttemplateAttrs:s,templatefallbackAttrs:l}=Fe(),c=Be();t.exports=r({newshape:{visible:o({},n.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:o({},n.legend,{}),legendgroup:o({},n.legendgroup,{}),legendgrouptitle:{text:o({},n.legendgrouptitle.text,{}),font:i({})},legendrank:o({},n.legendrank,{}),legendwidth:o({},n.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:o({},a,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:o({},n.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:s({newshape:!0},{keys:Object.keys(c)}),texttemplatefallback:l({editType:"arraydraw"}),font:i({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")}}),Ne=m({"src/components/selections/draw_newselection/attributes.js"(e,t){var r=Oe().dash,n=B().extendFlat;t.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:n({},r,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}}}),Ue=m({"src/plots/pad_attributes.js"(e,t){t.exports=function(e){var t=e.editType;return{t:{valType:"number",dflt:0,editType:t},r:{valType:"number",dflt:0,editType:t},b:{valType:"number",dflt:0,editType:t},l:{valType:"number",dflt:0,editType:t},editType:t}}}}),Ve=m({"src/plots/layout_attributes.js"(e,t){var r=j(),n=ze(),i=G(),a=je(),o=Ne(),s=Ue(),l=B().extendFlat,c=r({editType:"calc"});c.family.dflt='"Open Sans", verdana, arial, sans-serif',c.size.dflt=12,c.color.dflt=i.defaultLine,t.exports={font:c,title:{text:{valType:"string",editType:"layoutstyle"},font:r({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:r({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:l(s({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:i.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:i.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},hidesources:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:i.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:a.newshape,activeshape:a.activeshape,newselection:o.newselection,activeselection:o.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:l({},n.transition,{editType:"none"})}}}),qe=m({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){!function(){if(!document.getElementById("a75c73da1cd7a97e8992659f6aed556255838daadea9ca0c9fc3af7f1ddf63c0")){var e=document.createElement("style");e.id="a75c73da1cd7a97e8992659f6aed556255838daadea9ca0c9fc3af7f1ddf63c0",e.textContent=".maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E\")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E\")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E\")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E\")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E\")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E\")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E\")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E\");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E\")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:\"\";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:\"\";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}",document.head.appendChild(e)}}()}}),He=m({"src/registry.js"(e){var t=J(),r=Q(),n=ee(),i=C(),a=Pe().addStyleRule,o=B(),s=q(),l=Ve(),c=o.extendFlat,u=o.extendDeepAll;function h(r){var n=r.name,i=r.categories,o=r.meta;if(e.modules[n])t.log("Type "+n+" already registered");else{e.subplotsRegistry[r.basePlotModule.name]||function(r){var n=r.name;if(e.subplotsRegistry[n])t.log("Plot type "+n+" already registered.");else for(var i in m(r),e.subplotsRegistry[n]=r,e.componentsRegistry)y(i,r.name)}(r.basePlotModule);for(var s={},l=0;l=t&&n<=r?n:l}if("string"!=typeof n&&"number"!=typeof n)return l;n=String(n);var _=x(i),b=n.charAt(0);_&&("G"===b||"g"===b)&&(n=n.slice(1),i="");var w=_&&"chinese"===i.slice(0,7),T=n.match(w?y:g);if(!T)return l;var k=T[1],A=T[3]||"1",M=Number(T[5]||1),S=Number(T[7]||0),E=Number(T[9]||0),C=Number(T[11]||0);if(_){if(2===k.length)return l;var I;k=Number(k);try{var L=d.getComponentMethod("calendars","getCal")(i);if(w){var P="i"===A.charAt(A.length-1);A=parseInt(A,10),I=L.newDate(k,L.toMonthIndex(k,A,P),M)}else I=L.newDate(k,Number(A),M)}catch{return l}return I?(I.toJD()-p)*c+S*u+E*h+C*f:l}k=2===k.length?(Number(k)+2e3-v)%100+v:Number(k),A-=1;var z=new Date(Date.UTC(2e3,A,M,S,E));return z.setUTCFullYear(k),z.getUTCMonth()!==A||z.getUTCDate()!==M?l:z.getTime()+C*f},t=e.MIN_MS=e.dateTime2ms("-9999"),r=e.MAX_MS=e.dateTime2ms("9999-12-31 23:59:59.9999"),e.isDateTime=function(t,r){return e.dateTime2ms(t,r)!==l};var b=90*c,w=3*u,k=5*h;function A(e,t,r,n,i){if((t||r||n||i)&&(e+=" "+_(t,2)+":"+_(r,2),(n||i)&&(e+=":"+_(n,2),i))){for(var a=4;i%10==0;)a-=1,i/=10;e+="."+_(i,a)}return e}e.ms2DateTime=function(e,n,i){if("number"!=typeof e||!(e>=t&&e<=r))return l;n||(n=0);var a,s,g,y,v,_,T=Math.floor(10*o(e+.05,1)),M=Math.round(e-T/10);if(x(i)){var S=Math.floor(M/c)+p,E=Math.floor(o(e,c));try{a=d.getComponentMethod("calendars","getCal")(i).fromJD(S).formatDate("yyyy-mm-dd")}catch{a=m("G%Y-%m-%d")(new Date(M))}if("-"===a.charAt(0))for(;a.length<11;)a="-0"+a.slice(1);else for(;a.length<10;)a="0"+a;s=n=t+c&&e<=r-c))return l;var i=Math.floor(10*o(e+.05,1)),a=new Date(Math.round(e-i/10));return A(n("%Y-%m-%d")(a),a.getHours(),a.getMinutes(),a.getSeconds(),10*a.getUTCMilliseconds()+i)},e.cleanDate=function(t,r,n){if(t===l)return r;if(e.isJSDate(t)||"number"==typeof t&&isFinite(t)){if(x(n))return a.error("JS Dates and milliseconds are incompatible with world calendars",t),r;if(!(t=e.ms2DateTimeLocal(+t))&&void 0!==r)return r}else if(!e.isDateTime(t,n))return a.error("unrecognized date",t),r;return t};var E=/%\d?f/g,C=/%h/g,I={1:"1",2:"1",3:"2",4:"2"};function L(e,t,r,n){e=e.replace(E,(function(e){var r=Math.min(+e.charAt(1)||6,6);return(t/1e3%1+2).toFixed(r).slice(2).replace(/0+$/,"")||"0"}));var i=new Date(Math.floor(t+.05));if(e=e.replace(C,(function(){return I[r("%q")(i)]})),x(n))try{e=d.getComponentMethod("calendars","worldCalFmt")(e,t,n)}catch{return"Invalid"}return r(e)(i)}var P=[59,59.9,59.99,59.999,59.9999];e.formatDate=function(e,t,r,n,a,s){if(a=x(a)&&a,!t)if("y"===r)t=s.year;else if("m"===r)t=s.month;else{if("d"!==r)return function(e,t){var r=o(e+.05,c),n=_(Math.floor(r/u),2)+":"+_(o(Math.floor(r/h),60),2);if("M"!==t){i(t)||(t=0);var a=(100+Math.min(o(e/f,60),P[t])).toFixed(t).slice(1);t>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+a}return n}(e,r)+"\n"+L(s.dayMonthYear,e,n,a);t=s.dayMonth+"\n"+s.year}return L(t,e,n,a)};var z=3*c;e.incrementMonth=function(e,t,r){r=x(r)&&r;var n=o(e,c);if(e=Math.round(e-n),r)try{var i=Math.round(e/c)+p,s=d.getComponentMethod("calendars","getCal")(r),l=s.fromJD(i);return t%12?s.add(l,t,"m"):s.add(l,t/12,"y"),(l.toJD()-p)*c+n}catch{a.error("invalid ms "+e+" in calendar "+r)}var u=new Date(e+z);return u.setUTCMonth(u.getUTCMonth()+t)+n-z},e.findExactDates=function(e,t){for(var r,n,a=0,o=0,s=0,l=0,u=x(t)&&d.getComponentMethod("calendars","getCal")(t),h=0;ht}function c(e,t){return e>=t}e.findBin=function(e,n,i){if(t(n.start))return i?Math.ceil((e-n.start)/n.size-a)-1:Math.floor((e-n.start)/n.size+a);var u,h,f=0,p=n.length,d=0,m=p>1?(n[p-1]-n[0])/(p-1):1;for(h=m>=0?i?o:s:i?c:l,e+=m*a*(i?-1:1)*(m>=0?1:-1);f90&&r.log("Long binary search..."),f-1},e.sorterAsc=function(e,t){return e-t},e.sorterDes=function(e,t){return t-e},e.distinctVals=function(t){var r,n=t.slice();for(n.sort(e.sorterAsc),r=n.length-1;r>-1&&n[r]===i;r--);for(var a,o=n[r]-n[0]||1,s=o/(r||1)/1e4,l=[],c=0;c<=r;c++){var u=n[c],h=u-a;void 0===a?(l.push(u),a=u):h>s&&(o=Math.min(o,h),l.push(u),a=u)}return{vals:l,minDiff:o}},e.roundUp=function(e,t,r){for(var n,i=0,a=t.length-1,o=0,s=r?0:1,l=r?1:0,c=r?Math.ceil:Math.floor;i0&&(n=1),r&&n)return e.sort(t)}return n?e:e.reverse()},e.findIndexOfMin=function(e,t){t=t||n;for(var r,i=1/0,a=0;aa.length)&&(o=a.length),t(i)||(i=!1),r(a[0])){for(l=new Array(o),s=0;se.length-1)return e[e.length-1];var n=r%1;return n*e[Math.ceil(r)]+(1-n)*e[Math.floor(r)]}}}),$e=m({"src/lib/angles.js"(e,t){var r=R(),n=r.mod,i=r.modHalf,a=Math.PI,o=2*a;function s(e){return Math.abs(e[1]-e[0])>o-1e-14}function l(e,t){return i(t-e,o)}function c(e,t){if(s(t))return!0;var r,i;t[0](i=n(i,o))&&(i+=o);var a=n(e,o),l=a+o;return a>=r&&a<=i||l>=r&&l<=i}function u(e,t,r,n,i,l,c){i=i||0,l=l||0;var u,h,f,p,d,m=s([r,n]);function g(e,t){return[e*Math.cos(t)+i,l-e*Math.sin(t)]}m?(u=0,h=a,f=o):r=i&&e<=a);var i,a},pathArc:function(e,t,r,n,i){return u(null,e,t,r,n,i,0)},pathSector:function(e,t,r,n,i){return u(null,e,t,r,n,i,1)},pathAnnulus:function(e,t,r,n,i,a){return u(e,t,r,n,i,a,1)}}}}),Ke=m({"src/lib/anchor_utils.js"(e){e.isLeftAnchor=function(e){return"left"===e.xanchor||"auto"===e.xanchor&&e.x<=1/3},e.isCenterAnchor=function(e){return"center"===e.xanchor||"auto"===e.xanchor&&e.x>1/3&&e.x<2/3},e.isRightAnchor=function(e){return"right"===e.xanchor||"auto"===e.xanchor&&e.x>=2/3},e.isTopAnchor=function(e){return"top"===e.yanchor||"auto"===e.yanchor&&e.y>=2/3},e.isMiddleAnchor=function(e){return"middle"===e.yanchor||"auto"===e.yanchor&&e.y>1/3&&e.y<2/3},e.isBottomAnchor=function(e){return"bottom"===e.yanchor||"auto"===e.yanchor&&e.y<=1/3}}}),Je=m({"src/lib/geometry2d.js"(e){var t,r,n,i=R().mod;function a(e,t,r,n,i,a,o,s){var l=r-e,c=i-e,u=o-i,h=n-t,f=a-t,p=s-a,d=l*p-u*h;if(0===d)return null;var m=(c*p-u*f)/d,g=(c*h-l*f)/d;return g<0||g>1||m<0||m>1?null:{x:e+l*m,y:t+h*m}}function o(e,t,r,n,i){var a=n*e+i*t;if(a<0)return n*n+i*i;if(a>r){var o=n-e,s=i-t;return o*o+s*s}var l=n*t-i*e;return l*l/r}e.segmentsIntersect=a,e.segmentDistance=function(e,t,r,n,i,s,l,c){if(a(e,t,r,n,i,s,l,c))return 0;var u=r-e,h=n-t,f=l-i,p=c-s,d=u*u+h*h,m=f*f+p*p,g=Math.min(o(u,h,d,i-e,s-t),o(u,h,d,l-e,c-t),o(f,p,m,e-i,t-s),o(f,p,m,r-i,n-s));return Math.sqrt(g)},e.getTextLocation=function(e,a,o,s){if((e!==r||s!==n)&&(t={},r=e,n=s),t[o])return t[o];var l=e.getPointAtLength(i(o-s/2,a)),c=e.getPointAtLength(i(o+s/2,a)),u=Math.atan((c.y-l.y)/(c.x-l.x)),h=e.getPointAtLength(i(o,a)),f={x:(4*h.x+l.x+c.x)/6,y:(4*h.y+l.y+c.y)/6,theta:u};return t[o]=f,f},e.clearLocationCache=function(){r=null},e.getVisibleSegment=function(e,t,r){var n,i,a=t.left,o=t.right,s=t.top,l=t.bottom,c=0,u=e.getTotalLength(),h=u;function f(t){var r=e.getPointAtLength(t);0===t?n=r:t===u&&(i=r);var c=r.xo?r.x-o:0,h=r.yl?r.y-l:0;return Math.sqrt(c*c+h*h)}for(var p=f(c);p;){if((c+=p+r)>h)return;p=f(c)}for(p=f(h);p;){if(c>(h-=p+r))return;p=f(h)}return{min:c,max:h,len:h-c,total:u,isClosed:0===c&&h===u&&Math.abs(n.x-i.x)<.1&&Math.abs(n.y-i.y)<.1}},e.findPointOnPath=function(e,t,r,n){for(var i,a,o,s=(n=n||{}).pathLength||e.getTotalLength(),l=n.tolerance||.001,c=n.iterationLimit||30,u=e.getPointAtLength(0)[r]>e.getPointAtLength(s)[r]?-1:1,h=0,f=0,p=s;h0?p=i:f=i,h++}return a}}}),Qe=m({"src/lib/throttle.js"(e){var t={};function r(e){e&&null!==e.timer&&(clearTimeout(e.timer),e.timer=null)}e.throttle=function(e,n,i){var a=t[e],o=Date.now();if(!a){for(var s in t)t[s].tsa.ts+n?l():a.timer=setTimeout((function(){l(),a.timer=null}),n)},e.done=function(e){var r=t[e];return r&&r.timer?new Promise((function(e){var t=r.onDone;r.onDone=function(){t&&t(),e(),r.onDone=null}})):Promise.resolve()},e.clear=function(n){if(n)r(t[n]),delete t[n];else for(var i in t)e.clear(i)}}}),et=m({"src/lib/clear_responsive.js"(e,t){t.exports=function(e){e._responsiveChartHandler&&(window.removeEventListener("resize",e._responsiveChartHandler),delete e._responsiveChartHandler)}}}),tt=m({"node_modules/is-mobile/index.js"(e,t){t.exports=a,t.exports.isMobile=a,t.exports.default=a;var r=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,n=/CrOS/,i=/android|ipad|playbook|silk/i;function a(e){e||(e={});let t=e.ua;if(!t&&typeof navigator<"u"&&(t=navigator.userAgent),t&&t.headers&&"string"==typeof t.headers["user-agent"]&&(t=t.headers["user-agent"]),"string"!=typeof t)return!1;let a=r.test(t)&&!n.test(t)||!!e.tablet&&i.test(t);return!a&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==t.indexOf("Macintosh")&&-1!==t.indexOf("Safari")&&(a=!0),a}}}),rt=m({"src/lib/preserve_drawing_buffer.js"(e,t){var r=M(),n=tt();t.exports=function(e){var t,i;if(e&&e.hasOwnProperty("userAgent")?t=e.userAgent:(typeof navigator<"u"&&(i=navigator.userAgent),i&&i.headers&&"string"==typeof i.headers["user-agent"]&&(i=i.headers["user-agent"]),t=i),"string"!=typeof t)return!0;var a=n({ua:{headers:{"user-agent":t}},tablet:!0,featureDetect:!1});if(!a)for(var o=t.split(" "),s=1;s-1;l--){var c=o[l];if("Version/"===c.slice(0,8)){var u=c.slice(8).split(".")[0];if(r(u)&&(u=+u),u>=13)return!0}}return a}}}),nt=m({"src/lib/make_trace_groups.js"(e,t){var r=b();t.exports=function(e,t,n){var i=e.selectAll("g."+n.replace(/\s/g,".")).data(t,(function(e){return e[0].trace.uid}));i.exit().remove(),i.enter().append("g").attr("class",n),i.order();var a=e.classed("rangeplot")?"nodeRangePlot3":"node3";return i.each((function(e){e[0][a]=r.select(this)})),i}}}),it=m({"src/lib/localize.js"(e,t){var r=He();t.exports=function(e,t){for(var n=e._context.locale,i=0;i<2;i++){for(var a=e._context.locales,o=0;o<2;o++){var s=(a[n]||{}).dictionary;if(s){var l=s[t];if(l)return l}a=r.localeRegistry}var c=n.split("-")[0];if(c===n)break;n=c}return t}}}),at=m({"src/lib/filter_unique.js"(e,t){t.exports=function(e){for(var t={},r=[],n=0,i=0;i1?(r*e+r*t)/r:e+t,i=String(n).length;if(i>16){var a=String(t).length;if(i>=String(e).length+a){var o=parseFloat(n).toPrecision(12);-1===o.indexOf("e+")&&(n=+o)}}return n}}}),lt=m({"src/lib/clean_number.js"(e,t){var r=M(),n=S().BADNUM,i=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;t.exports=function(e){return"string"==typeof e&&(e=e.replace(i,"")),r(e)?Number(e):n}}}),ct=m({"src/lib/index.js"(e,t){var r=b(),n=T().utcFormat,i=k().format,a=M(),o=S(),s=o.FP_SAFE,l=-s,c=o.BADNUM,u=t.exports={};u.adjustFormat=function(e){return!e||/^\d[.]\df/.test(e)||/[.]\d%/.test(e)?e:"0.f"===e?"~f":/^\d%/.test(e)?"~%":/^\ds/.test(e)?"~s":!/^[~,.0$]/.test(e)&&/[&fps]/.test(e)?"~"+e:e};var h={};u.warnBadFormat=function(e){var t=String(e);h[t]||(h[t]=1,u.warn('encountered bad format: "'+t+'"'))},u.noFormat=function(e){return String(e)},u.numberFormat=function(e){var t;try{t=i(u.adjustFormat(e))}catch{return u.warnBadFormat(e),u.noFormat}return t},u.nestedProperty=L(),u.keyedContainer=P(),u.relativeAttr=z(),u.isPlainObject=C(),u.toLogRange=D(),u.relinkPrivateKeys=O();var d=I();u.isArrayBuffer=d.isArrayBuffer,u.isTypedArray=d.isTypedArray,u.isArrayOrTypedArray=d.isArrayOrTypedArray,u.isArray1D=d.isArray1D,u.ensureArray=d.ensureArray,u.concat=d.concat,u.maxRowLength=d.maxRowLength,u.minRowLength=d.minRowLength;var m=R();u.mod=m.mod,u.modHalf=m.modHalf;var g=X();u.valObjectMeta=g.valObjectMeta,u.coerce=g.coerce,u.coerce2=g.coerce2,u.coerceFont=g.coerceFont,u.coercePattern=g.coercePattern,u.coerceHoverinfo=g.coerceHoverinfo,u.coerceSelectionMarkerOpacity=g.coerceSelectionMarkerOpacity,u.validate=g.validate;var y=Ge();u.dateTime2ms=y.dateTime2ms,u.isDateTime=y.isDateTime,u.ms2DateTime=y.ms2DateTime,u.ms2DateTimeLocal=y.ms2DateTimeLocal,u.cleanDate=y.cleanDate,u.isJSDate=y.isJSDate,u.formatDate=y.formatDate,u.incrementMonth=y.incrementMonth,u.dateTick0=y.dateTick0,u.dfltRange=y.dfltRange,u.findExactDates=y.findExactDates,u.MIN_MS=y.MIN_MS,u.MAX_MS=y.MAX_MS;var v=Ze();u.findBin=v.findBin,u.sorterAsc=v.sorterAsc,u.sorterDes=v.sorterDes,u.distinctVals=v.distinctVals,u.roundUp=v.roundUp,u.sort=v.sort,u.findIndexOfMin=v.findIndexOfMin,u.sortObjectKeys=Ye();var x=Xe();u.aggNums=x.aggNums,u.len=x.len,u.mean=x.mean,u.geometricMean=x.geometricMean,u.median=x.median,u.midRange=x.midRange,u.variance=x.variance,u.stdev=x.stdev,u.interp=x.interp;var _=Le();u.init2dArray=_.init2dArray,u.transposeRagged=_.transposeRagged,u.dot=_.dot,u.translationMatrix=_.translationMatrix,u.rotationMatrix=_.rotationMatrix,u.rotationXYMatrix=_.rotationXYMatrix,u.apply3DTransform=_.apply3DTransform,u.apply2DTransform=_.apply2DTransform,u.apply2DTransform2=_.apply2DTransform2,u.convertCssMatrix=_.convertCssMatrix,u.inverseTransformMatrix=_.inverseTransformMatrix;var w=$e();u.deg2rad=w.deg2rad,u.rad2deg=w.rad2deg,u.angleDelta=w.angleDelta,u.angleDist=w.angleDist,u.isFullCircle=w.isFullCircle,u.isAngleInsideSector=w.isAngleInsideSector,u.isPtInsideSector=w.isPtInsideSector,u.pathArc=w.pathArc,u.pathSector=w.pathSector,u.pathAnnulus=w.pathAnnulus;var A=Ke();u.isLeftAnchor=A.isLeftAnchor,u.isCenterAnchor=A.isCenterAnchor,u.isRightAnchor=A.isRightAnchor,u.isTopAnchor=A.isTopAnchor,u.isMiddleAnchor=A.isMiddleAnchor,u.isBottomAnchor=A.isBottomAnchor;var E=Je();u.segmentsIntersect=E.segmentsIntersect,u.segmentDistance=E.segmentDistance,u.getTextLocation=E.getTextLocation,u.clearLocationCache=E.clearLocationCache,u.getVisibleSegment=E.getVisibleSegment,u.findPointOnPath=E.findPointOnPath;var F=B();u.extendFlat=F.extendFlat,u.extendDeep=F.extendDeep,u.extendDeepAll=F.extendDeepAll,u.extendDeepNoArrays=F.extendDeepNoArrays;var j=J();u.log=j.log,u.warn=j.warn,u.error=j.error;var N=Y();u.counterRegex=N.counter;var U=Qe();u.throttle=U.throttle,u.throttleDone=U.done,u.clearThrottle=U.clear;var V=Pe();function q(e){var t={};for(var r in e)for(var n=e[r],i=0;is||e=t)&&a(e)&&e>=0&&e%1==0},u.noop=Q(),u.identity=We(),u.repeat=function(e,t){for(var r=new Array(t),n=0;nr?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))},u.bBoxIntersect=function(e,t,r){return r=r||0,e.left<=t.right+r&&t.left<=e.right+r&&e.top<=t.bottom+r&&t.top<=e.bottom+r},u.simpleMap=function(e,t,r,n,i){for(var a=e.length,o=new Array(a),s=0;s=Math.pow(2,r)?i>10?(u.warn("randstr failed uniqueness"),l):e(t,r,n,(i||0)+1):l},u.OptionControl=function(e,t){e||(e={}),t||(t="opt");var r={optionList:[],_newoption:function(n){n[t]=e,r[n.name]=n,r.optionList.push(n)}};return r["_"+t]=e,r},u.smooth=function(e,t){if((t=Math.round(t)||0)<2)return e;var r,n,i,a,o=e.length,s=2*o,l=2*t-1,c=new Array(l),u=new Array(o);for(r=0;r=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=o&&(i=s-1-i),a+=e[i]*c[n];u[r]=a}return u},u.syncOrAsync=function(e,t,r){var n;function i(){return u.syncOrAsync(e,t,r)}for(;e.length;)if((n=(0,e.splice(0,1)[0])(t))&&n.then)return n.then(i);return r&&r(t)},u.stripTrailingSlash=function(e){return"/"===e.slice(-1)?e.slice(0,-1):e},u.noneOrAll=function(e,t,r){if(e){var n,i=!1,a=!0;for(n=0;n0?t:0}))},u.fillArray=function(e,t,r,n){if(n=n||u.identity,u.isArrayOrTypedArray(e))for(var i=0;iW.test(window.navigator.userAgent);var Z=/Firefox\/(\d+)\.\d+/;u.getFirefoxVersion=function(){var e=Z.exec(window.navigator.userAgent);if(e&&2===e.length){var t=parseInt(e[1]);if(!isNaN(t))return t}return null},u.isD3Selection=function(e){return e instanceof r.selection},u.ensureSingle=function(e,t,r,n){var i=e.select(t+(r?"."+r:""));if(i.size())return i;var a=e.append(t);return r&&a.classed(r,!0),n&&a.call(n),a},u.ensureSingleById=function(e,t,r,n){var i=e.select(t+"#"+r);if(i.size())return i;var a=e.append(t).attr("id",r);return n&&a.call(n),a},u.objectFromPath=function(e,t){for(var r,n=e.split("."),i=r={},a=0;a1?i+o[1]:"";if(a&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+a+"$2");return s+l},u.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var ne=/^\w*$/;u.templateString=function(e,t){var r={};return e.replace(u.TEMPLATE_STRING_REGEX,(function(e,n){var i;return ne.test(n)?i=t[n]:(r[n]=r[n]||u.nestedProperty(t,n).get,i=r[n](!0)),void 0!==i?i:""}))};var ie={max:10,count:0,name:"hovertemplate"};u.hovertemplateString=e=>ce(p(f({},e),{opts:ie}));var ae={max:10,count:0,name:"texttemplate"};u.texttemplateString=e=>ce(p(f({},e),{opts:ae}));var oe=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/,se={max:10,count:0,name:"texttemplate",parseMultDiv:!0};u.texttemplateStringForShapes=e=>ce(p(f({},e),{opts:se}));var le=/^[:|\|]/;function ce({data:e=[],locale:t,fallback:r,labels:i={},opts:a,template:o}){return o.replace(u.TEMPLATE_STRING_REGEX,((o,s,l)=>{let c=["xother","yother"].includes(s),h=["_xother","_yother"].includes(s),f=["_xother_","_yother_"].includes(s),p=["xother_","yother_"].includes(s),d=c||h||p||f;(h||f)&&(s=s.substring(1)),(p||f)&&(s=s.substring(0,s.length-1));let m,g=null,y=null;if(a.parseMultDiv){var v=function(e){var t=e.match(oe);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}(s);s=v.key,g=v.op,y=v.number}if(d){if(void 0===i[s])return"";m=i[s]}else for(let t of e)if(t){if(t.hasOwnProperty(s)){m=t[s];break}if(ne.test(s)||(m=u.nestedProperty(t,s).get(!0)),void 0!==m)break}if(void 0===m){let{count:e,max:t,name:n}=a,i=!1===r?o:r;return e=48&&o<=57,c=s>=48&&s<=57;if(l&&(n=10*n+o-48),c&&(i=10*i+s-48),!l||!c){if(n!==i)return n-i;if(o!==s)return o-s}}return i-n};var ue=2e9;u.seedPseudoRandom=function(){ue=2e9},u.pseudoRandom=function(){var e=ue;return ue=(69069*ue+1)%4294967296,Math.abs(ue-e)<429496729?u.pseudoRandom():ue/4294967296},u.fillText=function(e,t,r){var n=Array.isArray(r)?function(e){r.push(e)}:function(e){r.text=e},i=u.extractOption(e,t,"htx","hovertext");if(u.isValidTextValue(i))return n(i);var a=u.extractOption(e,t,"tx","text");return u.isValidTextValue(a)?n(a):void 0},u.isValidTextValue=function(e){return e||0===e},u.formatPercent=function(e,t){t=t||0;for(var r=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+"%",n=0;n1&&(c=1):c=0,u.strTranslate(i-c*(r+o),a-c*(n+s))+u.strScale(c)+(l?"rotate("+l+(t?"":" "+r+" "+n)+")":"")},u.setTransormAndDisplay=function(e,t){e.attr("transform",u.getTextTransform(t)),e.style("display",t.scale?null:"none")},u.ensureUniformFontSize=function(e,t){var r=u.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r},u.join2=function(e,t,r){var n=e.length;return n>1?e.slice(0,-1).join(t)+r+e[n-1]:e.join(t)},u.bigFont=function(e){return Math.round(1.2*e)};var he=u.getFirefoxVersion(),fe=null!==he&&he<86;u.getPositionFromD3Event=function(){return fe?[r.event.layerX,r.event.layerY]:[r.event.offsetX,r.event.offsetY]}}}),ut=m({"build/plotcss.js"(){var e,t,r=ct(),n={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;border:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(t in n)e=t.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),r.addStyleRule(e,n[t])}}),ht=m({"node_modules/is-browser/client.js"(e,t){t.exports=!0}}),ft=m({"node_modules/has-hover/index.js"(e,t){var r,n=ht();r="function"==typeof window.matchMedia?!window.matchMedia("(hover: none)").matches:n,t.exports=r}}),pt=m({"node_modules/events/events.js"(e,t){var r,n="object"==typeof Reflect?Reflect:null,i=n&&"function"==typeof n.apply?n.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};r=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,a),n(r)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}g(e,t,a,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){var i,a,o;if(l(r),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),o=a[t]),void 0===o)o=a[t]=r,++e._eventsCount;else if("function"==typeof o?o=a[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(i=c(e))>0&&o.length>i&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,function(e){console&&console.warn&&console.warn(e)}(s)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=h.bind(n);return i.listener=r,n.wrapFn=i,i}function p(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=a[e];if(void 0===l)return!1;if("function"==typeof l)i(l,this,t);else{var c=l.length,u=m(l,c);for(r=0;r=0;a--)if(r[a]===t||r[a].listener===t){o=r[a].listener,i=a;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return p(this,e,!0)},o.prototype.rawListeners=function(e){return p(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},o.prototype.listenerCount=d,o.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}}}),dt=m({"src/lib/events.js"(e,t){var r=pt().EventEmitter,n={init:function(e){if(e._ev instanceof r)return e;var t=new r,n=new r;return e._ev=t,e._internalEv=n,e.on=t.on.bind(t),e.once=t.once.bind(t),e.removeListener=t.removeListener.bind(t),e.removeAllListeners=t.removeAllListeners.bind(t),e._internalOn=n.on.bind(n),e._internalOnce=n.once.bind(n),e._removeInternalListener=n.removeListener.bind(n),e._removeAllInternalListeners=n.removeAllListeners.bind(n),e.emit=function(e,r){t.emit(e,r),n.emit(e,r)},"function"==typeof e.addEventListener&&e.addEventListener("wheel",(()=>{}),{passive:!0}),e},triggerHandler:function(e,t,r){var n=e._ev;if(n){var i=n._events[t];if(i){var a;for(i=Array.isArray(i)?i:[i],a=0;an.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--))},startSequence:function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0},stopSequence:function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1},undo:function(e){var t,r;if(!(void 0===e.undoQueue||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,r=0;r=e.undoQueue.queue.length)){for(t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,r=0;r=a.length)return!1;if(2===e.dimensions){if(r++,t.length===r)return e;var o=t[r];if(!x(o))return!1;e=a[i][o]}else e=a[i]}else e=a}}return e}function x(e){return e===Math.round(e)&&e>=0}function _(){var e,r,n={};for(e in c(n,i),t.subplotsRegistry)if((r=t.subplotsRegistry[e]).layoutAttributes)if(Array.isArray(r.attr))for(var a=0;a=a&&(i._input||{})._templateitemname;s&&(o=a);var l,c=r+"["+o+"]";function u(){l={},s&&(l[c]={},l[c][n]=s)}function h(e,r){s?t.nestedProperty(l[c],e).set(r):l[c+"."+e]=r}function f(){var e=l;return u(),e}return u(),{modifyBase:function(e,t){l[e]=t},modifyItem:h,getUpdateObj:f,applyUpdate:function(r,n){r&&h(r,n);var i=f();for(var a in i)t.nestedProperty(e,a).set(i[a])}}}}}),xt=m({"src/plots/cartesian/constants.js"(e,t){var r=Y().counter;t.exports={idRegex:{x:r("x","( domain)?"),y:r("y","( domain)?")},attrRegex:r("[xy]axis"),xAxisMatch:r("xaxis"),yAxisMatch:r("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"},zindexSeparator:"z"}}}),_t=m({"src/plots/cartesian/axis_ids.js"(e){var t=He(),r=xt();function n(e,t){if(t&&t.length)for(var r=0;rn?1:-1:+(e.slice(1)||1)-+(t.slice(1)||1)},e.ref2id=function(e){return!!/^[xyz]/.test(e)&&e.split(" ")[0]},e.isLinked=function(e,t){return n(t,e._axisMatchGroups)||n(t,e._axisConstraintGroups)}}}),bt=m({"src/components/shapes/handle_outline.js"(e,t){t.exports={clearOutlineControllers:function(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()},clearOutline:function(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}}}}),wt=m({"src/traces/scatter/layout_attributes.js"(e,t){t.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}}}),Tt=m({"src/plots/get_data.js"(e){var t=He();xt().SUBPLOT_PATTERN,e.getSubplotCalcData=function(e,r,n){var i=t.subplotsRegistry[r];if(!i)return[];for(var a=i.attr,o=[],s=0;s0?".":"")+a;r.isPlainObject(s)?o(s,t,l,i+1):t(l,a,s)}}))}e.manageCommandObserver=function(t,i,a,o){var s={},l=!0;i&&i._commandObserver&&(s=i._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var c=e.hasSimpleAPICommandBindings(t,a,s.lookupTable);if(i&&i._commandObserver){if(c)return s;if(i._commandObserver.remove)return i._commandObserver.remove(),i._commandObserver=null,s}if(c){n(t,c,s.cache),s.check=function(){if(l){var e=n(t,c,s.cache);return e.changed&&o&&void 0!==s.lookupTable[e.value]&&(s.disable(),Promise.resolve(o({value:e.value,type:c.type,prop:c.prop,traces:c.traces,index:s.lookupTable[e.value]})).then(s.enable,s.enable)),e.changed}};for(var u=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],h=0;h=t.width-20?(a["text-anchor"]="start",a.x=5):(a["text-anchor"]="end",a.x=t._paper.attr("width")-7),n.attr(a);var o=n.select(".js-link-to-tool"),s=n.select(".js-link-spacer"),l=n.select(".js-sourcelinks");e._context.showSources&&e._context.showSources(e),e._context.showLink&&function(e,t){t.text("");var r=t.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(e._context.linkText+" »");if(e._context.sendData)r.on("click",(function(){w.sendDataToCloud(e)}));else{var n=window.location.pathname.split("/"),i=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+i})}}(e,o),s.text(o.text()&&l.text()?" - ":"")}},w.sendDataToCloud=function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(t){e.emit("plotly_beforeexport");var n=r.select(e).append("div").attr("id","hiddenform").style("display","none"),i=n.append("form").attr({action:t+"/external",method:"post",target:"_blank"});return i.append("input").attr({type:"text",name:"data"}).node().value=w.graphJson(e,!1,"keepdata"),i.node().submit(),n.remove(),e.emit("plotly_afterexport"),!1}};var C=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],I=["year","month","dayMonth","dayMonthYear"];function L(e,t){var r=e._context.locale;r||(r="en-US");var n=!1,i={};function a(e){for(var r=!0,a=0;a1&&z.length>1){for(s.getComponentMethod("grid","sizeDefaults")(c,l),o=0;o15&&z.length>15&&0===l.shapes.length&&0===l.images.length,w.linkSubplots(f,l,h,a),w.cleanPlot(f,l,h,a);var j=!(!a._has||!a._has("cartesian")),N=!(!l._has||!l._has("cartesian"));j&&!N?a._bgLayer.remove():N&&!j&&(l._shouldCreateBgLayer=!0),a._zoomlayer&&!e._dragging&&d({_fullLayout:a}),function(e,t){var r,n=[];t.meta&&(r=t._meta={meta:t.meta,layout:{meta:t.meta}});for(var i=0;i0){var h=1-2*s;n=Math.round(h*n),i=Math.round(h*i)}}var f=w.layoutAttributes.width.min,p=w.layoutAttributes.height.min;n1,m=!t.height&&Math.abs(r.height-i)>1;(m||d)&&(d&&(r.width=n),m&&(r.height=i)),e._initialAutoSize||(e._initialAutoSize={width:n,height:i}),w.sanitizeMargins(r)},w.supplyLayoutModuleDefaults=function(e,t,r,n){var i,a,o,l=s.componentsRegistry,c=t._basePlotModules,h=s.subplotsRegistry.cartesian;for(i in l)(o=l[i]).includeBasePlot&&o.includeBasePlot(e,t);for(var f in c.length||c.push(h),t._has("cartesian")&&(s.getComponentMethod("grid","contentDefaults")(e,t),h.finalizeSubplots(e,t)),t._subplots)t._subplots[f].sort(u.subplotSort);for(a=0;a1&&(r.l/=y,r.r/=y)}if(p){var v=(r.t+r.b)/p;v>1&&(r.t/=v,r.b/=v)}var x=void 0!==r.xl?r.xl:r.x,_=void 0!==r.xr?r.xr:r.x,b=void 0!==r.yt?r.yt:r.y,T=void 0!==r.yb?r.yb:r.y;d[t]={l:{val:x,size:r.l+g},r:{val:_,size:r.r+g},b:{val:T,size:r.b+g},t:{val:b,size:r.t+g}},m[t]=1}else delete d[t],delete m[t];if(!n._replotting)return w.doAutoMargin(e)}},w.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,n=t.height;t._size||(t._size={}),D(t);var i=t._size,o=t.margin,l={t:0,b:0,l:0,r:0},c=u.extendFlat({},i),h=o.l,f=o.r,d=o.t,m=o.b,g=t._pushmargin,y=t._pushmarginIds,v=t.minreducedwidth,x=t.minreducedheight;if(!1!==o.autoexpand){for(var _ in g)y[_]||delete g[_];var b=e._fullLayout._reservedMargin;for(var T in b)for(var k in b[T]){var A=b[T][k];l[k]=Math.max(l[k],A)}for(var M in g.base={l:{val:0,size:h},r:{val:1,size:f},t:{val:1,size:d},b:{val:0,size:m}},l){var S=0;for(var E in g)"base"!==E&&a(g[E][M].size)&&(S=g[E][M].size>S?g[E][M].size:S);var C=Math.max(0,o[M]-S);l[M]=Math.max(0,l[M]-C)}for(var I in g){var L=g[I].l||{},P=g[I].b||{},z=L.val,O=L.size,R=P.val,F=P.size,B=r-l.r-l.l,j=n-l.t-l.b;for(var N in g){if(a(O)&&g[N].r){var U=g[N].r.val,V=g[N].r.size;if(U>z){var q=(O*U+(V-B)*z)/(U-z),H=(V*(1-z)+(O-B)*(1-U))/(U-z);q+H>h+f&&(h=q,f=H)}}if(a(F)&&g[N].t){var G=g[N].t.val,W=g[N].t.size;if(G>R){var Z=(F*G+(W-j)*R)/(G-R),Y=(W*(1-R)+(F-j)*(1-G))/(G-R);Z+Y>m+d&&(m=Z,d=Y)}}}}}var X=u.constrain(r-o.l-o.r,2,v),$=u.constrain(n-o.t-o.b,2,x),K=Math.max(0,r-X),J=Math.max(0,n-$);if(K){var Q=(h+f)/K;Q>1&&(h/=Q,f/=Q)}if(J){var ee=(m+d)/J;ee>1&&(m/=ee,d/=ee)}if(i.l=Math.round(h)+l.l,i.r=Math.round(f)+l.r,i.t=Math.round(d)+l.t,i.b=Math.round(m)+l.b,i.p=Math.round(o.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!t._replotting&&(w.didMarginChange(c,i)||function(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=p.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var te=3*(1+Object.keys(y).length);if(t._redrawFromAutoMarginCount0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&e._transitionData._interruptCallbacks.push((function(){return s.call("redraw",e)})),e._transitionData._interruptCallbacks.push((function(){e.emit("plotly_transitioninterrupted",[])}));var a=0,o=0;function l(){return a++,function(){o++,!n&&o===a&&function(t){e._transitionData&&(function(e){if(e)for(;e.length;)e.shift()}(e._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return s.call("redraw",e)})).then((function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])})).then(t))}(i)}}r.runFn(l),setTimeout(l())}))}],a=u.syncOrAsync(i,e);return(!a||!a.then)&&(a=Promise.resolve()),a.then((function(){return e}))}w.didMarginChange=function(e,t){for(var r=0;r1)return!0}return!1},w.graphJson=function(e,t,r,n,i,a){(i&&t&&!e._fullData||i&&!t&&!e._fullLayout)&&w.supplyDefaults(e);var s=i?e._fullData:e.data,l=i?e._fullLayout:e.layout,c=(e._transitionData||{})._frames;function h(e,t){if("function"==typeof e)return t?"_function_":null;if(u.isPlainObject(e)){var n,i={};return Object.keys(e).sort().forEach((function(a){if(-1===["_","["].indexOf(a.charAt(0))){if("function"==typeof e[a])return void(t&&(i[a]="_function"));if("keepdata"===r){if("src"===a.slice(-3))return}else if("keepstream"===r){if("string"==typeof(n=e[a+"src"])&&n.indexOf(":")>0&&!u.isPlainObject(e.stream))return}else if("keepall"!==r&&"string"==typeof(n=e[a+"src"])&&n.indexOf(":")>0)return;i[a]=h(e[a],t)}})),i}var a=Array.isArray(e),s=u.isTypedArray(e);if((a||s)&&e.dtype&&e.shape){var l=e.bdata;return h({dtype:e.dtype,shape:e.shape,bdata:u.isArrayBuffer(l)?o.encode(l):l},t)}return a?e.map((function(e){return h(e,t)})):s?u.simpleMap(e,u.identity):u.isJSDate(e)?u.ms2DateTimeLocal(+e):e}var f={data:(s||[]).map((function(e){var r=h(e);return t&&delete r.fit,r}))};if(!t&&(f.layout=h(l),i)){var p=l._size;f.layout.computed={margin:{b:p.b,l:p.l,r:p.r,t:p.t}}}return c&&(f.frames=h(c)),a&&(f.config=h(e._context,!0)),"object"===n?f:JSON.stringify(f)},w.modifyFrames=function(e,t){var r,n,i,a=e._transitionData._frames,o=e._transitionData._frameHash;for(r=0;r=0;a--)if(s[a].enabled){r._indexToPoints=s[a]._indexToPoints;break}n&&n.calc&&(o=n.calc(e,r))}(!Array.isArray(o)||!o[0])&&(o=[{x:f,y:f}]),o[0].t||(o[0].t={}),o[0].trace=r,d[t]=o}}for(B(o,c,h),i=0;il||m>c)&&(o.style("overflow","hidden"),p=(f=o.node().getBoundingClientRect()).width,m=f.height);var g=+d.attr("x"),y=+d.attr("y"),v=-(i||d.node().getBoundingClientRect().height)/4;if("y"===P[0])s.attr({transform:"rotate("+[-90,g,y]+")"+n(-p/2,v-m/2)});else if("l"===P[0])y=v-m/2;else if("a"===P[0]&&0!==P.indexOf("atitle"))g=0,y=v;else{var x=d.attr("text-anchor");g-=p*("middle"===x?.5:"end"===x?1:0),y=y+v-m/2}o.attr({x:g,y}),M&&M.call(d,s),e(s)}))}))):z(),d}function z(){L.empty()||(P=d.attr("class")+"-math",L.select("svg."+P).remove()),d.text("").style("white-space","pre");var n=function(e,n){n=n.replace(m," ");var o,s=!1,l=[],c=-1;function d(){c++;var r=document.createElementNS(i.svg,"tspan");t.select(r).attr({class:"line",dy:c*a+"em"}),e.appendChild(r),o=r;var n=l;if(l=[{node:r}],n.length>1)for(var s=1;s doesnt match end tag <"+e+">. Pretending it did match.",n),o=l[l.length-1].node}else r.log("Ignoring unexpected end tag .",n)}v.test(n)?d():(o=e,l=[{node:e}]);for(var I=n.split(g),L=0;L|>|>)/g,c=[["$","$"],["\\(","\\)"]],u={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},h={sub:"0.3em",sup:"-0.6em"},f={sub:"-0.21em",sup:"0.42em"},p="​",d=["http:","https:","mailto:","",void 0,":"],m=e.NEWLINES=/(\r\n?|\n)/g,g=/(<[^<>]*>)/,y=/<(\/?)([^ >]*)(\s+(.*))?>/i,v=//i;e.BR_TAG_ALL=//gi;var x=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,_=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,w=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,T=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function k(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&E(n)}var A=/(^|;)\s*color:/;e.plainText=function(e,t){for(var r=void 0!==(t=t||{}).len&&-1!==t.len?t.len:1/0,n=void 0!==t.allowedTags?t.allowedTags:["br"],i=e.split(g),a=[],o="",s=0,l=0;l3?a.push(c.slice(0,Math.max(0,p-3))+"..."):a.push(c.slice(0,p));break}o=""}}return a.join("")};var M={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},S=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function E(e){return e.replace(S,(function(e,t){var r;return r="#"===t.charAt(0)?function(e){if(!(e>1114111)){var t=String.fromCodePoint;if(t)return t(e);var r=String.fromCharCode;return e<=65535?r(e):r(55232+(e>>10),e%1024+56320)}}("x"===t.charAt(1)?parseInt(t.slice(2),16):parseInt(t.slice(1),10)):M[t],r||e}))}function C(e){var t=encodeURI(decodeURI(e)),r=document.createElement("a"),n=document.createElement("a");r.href=e,n.href=t;var i=r.protocol,a=n.protocol;return-1!==d.indexOf(i)&&-1!==d.indexOf(a)?t:""}function I(e,t,n){var i,a,o,s=n.horizontalAlign,l=n.verticalAlign||"top",c=e.node().getBoundingClientRect(),u=t.node().getBoundingClientRect();return a="bottom"===l?function(){return c.bottom-i.height}:"middle"===l?function(){return c.top+(c.height-i.height)/2}:function(){return c.top},o="right"===s?function(){return c.right-i.width}:"center"===s?function(){return c.left+(c.width-i.width)/2}:function(){return c.left},function(){i=this.node().getBoundingClientRect();var e=o()-u.left,t=a()-u.top,s=n.gd||{};if(n.gd){s._fullLayout._calcInverseTransform(s);var l=r.apply3DTransform(s._fullLayout._invTransform)(e,t);e=l[0],t=l[1]}return this.style({top:t+"px",left:e+"px","z-index":1e3}),this}}e.convertEntities=E,e.sanitizeHTML=function(e){e=e.replace(m," ");for(var r=document.createElement("p"),n=r,i=[],a=e.split(g),o=0;o=0;n--,i++){var a=e[n];r[i]=[1-a[0],a[1]]}return r}function p(e,t){t=t||{};for(var a=e.domain,s=e.range,l=s.length,c=new Array(l),u=0;um-p?p=m-(d-m):d-m=0?s.colorscale.sequential:s.colorscale.sequentialminus,h._sync("colorscale",o))}}}),Yt=m({"src/components/colorscale/index.js"(e,t){var r=H(),n=Ct();t.exports={moduleType:"component",name:"colorscale",attributes:zt(),layoutAttributes:Dt(),supplyLayoutDefaults:Gt(),handleDefaults:Ht(),crossTraceDefaults:Wt(),calc:Zt(),scales:r.scales,defaultScale:r.defaultScale,getScale:r.get,isValidScale:r.isValid,hasColorscale:n.hasColorscale,extractOpts:n.extractOpts,extractScale:n.extractScale,flipScale:n.flipScale,makeColorScaleFunc:n.makeColorScaleFunc,makeColorScaleFuncFromTrace:n.makeColorScaleFuncFromTrace}}}),Xt=m({"src/traces/scatter/subtypes.js"(e,t){var r=ct(),n=I().isTypedArraySpec;t.exports={hasLines:function(e){return e.visible&&e.mode&&-1!==e.mode.indexOf("lines")},hasMarkers:function(e){return e.visible&&(e.mode&&-1!==e.mode.indexOf("markers")||"splom"===e.type)},hasText:function(e){return e.visible&&e.mode&&-1!==e.mode.indexOf("text")},isBubble:function(e){var t=e.marker;return r.isPlainObject(t)&&(r.isArrayOrTypedArray(t.size)||n(t.size))}}}}),$t=m({"src/traces/scatter/make_bubble_size_func.js"(e,t){var r=M();t.exports=function(e,t){t||(t=2);var n=e.marker,i=n.sizeref||1,a=n.sizemin||0,o="area"===n.sizemode?function(e){return Math.sqrt(e/i)}:function(e){return e/i};return function(e){var n=o(e/t);return r(n)&&n>0?Math.max(n,a):0}}}}),Kt=m({"src/components/fx/helpers.js"(e){var t=ct();e.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo},e.isTraceInSubplots=function(t,r){if("splom"===t.type){for(var n=t.xaxes||[],i=t.yaxes||[],a=0;a=0&&r.index2&&(t.push([n].concat(a.splice(0,2))),o="l",n="m"==n?"l":"L");;){if(a.length==r[o])return a.unshift(n),t.push(a);if(a.length=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}v.symbolNumber=function(e){if(a(e))e=+e;else if("string"==typeof e){var t=0;e.indexOf("-open")>0&&(t=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(t+=200,e=e.replace("-dot","")),(e=v.symbolNames.indexOf(e))>=0&&(e+=t)}return e%100>=k||e>=400?0:Math.floor(Math.max(e,0))};var S=i("~f"),E={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};function C(e,t,i,a,s,c,u,h,f,p){var d,m=s.length;"linear"===a?d={node:"linearGradient",attrs:{x1:u.x,y1:u.y,x2:h.x,y2:h.y,gradientUnits:f?"userSpaceOnUse":"objectBoundingBox"},reversed:p}:"radial"===a&&(d={node:"radialGradient",reversed:p});for(var g=new Array(m),y=0;y=0&&void 0===e.i&&(e.i=o.i),t.style("opacity",i.selectedOpacityFn?i.selectedOpacityFn(e):void 0===e.mo?s.opacity:e.mo),i.ms2mrc){var u;u="various"===e.ms||"various"===s.size?3:i.ms2mrc(e.ms),e.mrc=u,i.selectedSizeFn&&(u=e.mrc=i.selectedSizeFn(e));var h=v.symbolNumber(e.mx||s.symbol)||0;e.om=h%200>=100;var f=se(e,r),p=$(e,r);t.attr("d",A(h,u,f,p))}var d,m,g,y=!1;if(e.so)g=c.outlierwidth,m=c.outliercolor,d=s.outliercolor;else{var x=(c||{}).width;g=(e.mlw+1||x+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,m="mlc"in e?e.mlcc=i.lineScale(e.mlc):n.isArrayOrTypedArray(c.color)?l.defaultLine:c.color,n.isArrayOrTypedArray(s.color)&&(d=l.defaultLine,y=!0),d="mc"in e?e.mcc=i.markerScale(e.mc):s.color||s.colors||"rgba(0,0,0,0)",i.selectedColorFn&&(d=i.selectedColorFn(e))}let _=e.mld||(c||{}).dash;if(_&&v.dashLine(t,_,g),e.om)t.call(l.stroke,d).style({"stroke-width":(g||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:g)+"px");var b=s.gradient,w=e.mgt;w?y=!0:w=b&&b.type,n.isArrayOrTypedArray(w)&&(w=w[0],E[w]||(w=0));var T=s.pattern,k=v.getPatternAttr,M=T&&(k(T.shape,e.i,"")||k(T.path,e.i,""));if(w&&"none"!==w){var S=e.mgc;S?y=!0:S=b.color;var C=r.uid;y&&(C+="-"+e.i),v.gradient(t,a,C,w,[[0,S],[1,d]],"fill")}else if(M){var I=!1,L=T.fgcolor;!L&&o&&o.color&&(L=o.color,I=!0);var P=k(L,e.i,o&&o.color||null),z=k(T.bgcolor,e.i,null),D=T.fgopacity,O=k(T.size,e.i,8),R=k(T.solidity,e.i,.3);I=I||e.mcc||n.isArrayOrTypedArray(T.shape)||n.isArrayOrTypedArray(T.path)||n.isArrayOrTypedArray(T.bgcolor)||n.isArrayOrTypedArray(T.fgcolor)||n.isArrayOrTypedArray(T.size)||n.isArrayOrTypedArray(T.solidity);var F=r.uid;I&&(F+="-"+e.i),v.pattern(t,"point",a,F,M,O,R,e.mcc,T.fillmode,z,P,D)}else n.isArrayOrTypedArray(d)?l.fill(t,d[e.i]):l.fill(t,d);g&&l.stroke(t,m)}},v.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=v.tryColorscale(r,""),t.lineScale=v.tryColorscale(r,"line"),s.traceIs(e,"symbols")&&(t.ms2mrc=m.isBubble(e)?g(e):function(){return(r.size||6)/2}),e.selectedpoints&&n.extendFlat(t,v.makeSelectedPointStyleFns(e)),t},v.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},i=e.unselected||{},a=e.marker||{},o=r.marker||{},l=i.marker||{},c=a.opacity,u=o.opacity,h=l.opacity,f=void 0!==u,p=void 0!==h;(n.isArrayOrTypedArray(c)||f||p)&&(t.selectedOpacityFn=function(e){var t=void 0===e.mo?a.opacity:e.mo;return e.selected?f?u:t:p?h:d*t});var m=a.color,g=o.color,y=l.color;(g||y)&&(t.selectedColorFn=function(e){var t=e.mcc||m;return e.selected?g||t:y||t});var v=a.size,x=o.size,_=l.size,b=void 0!==x,w=void 0!==_;return s.traceIs(e,"symbols")&&(b||w)&&(t.selectedSizeFn=function(e){var t=e.mrc||v/2;return e.selected?b?x/2:t:w?_/2:t}),t},v.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},i=e.textfont||{},a=r.textfont||{},o=n.textfont||{},s=i.color,c=a.color,u=o.color;return t.selectedTextColorFn=function(e){var t=e.tc||s;return e.selected?c||t:u||(c?t:l.addOpacity(t,d))},t},v.selectedPointStyle=function(e,t){if(e.size()&&t.selectedpoints){var n=v.makeSelectedPointStyleFns(t),i=t.marker||{},a=[];n.selectedOpacityFn&&a.push((function(e,t){e.style("opacity",n.selectedOpacityFn(t))})),n.selectedColorFn&&a.push((function(e,t){l.fill(e,n.selectedColorFn(t))})),n.selectedSizeFn&&a.push((function(e,r){var a=r.mx||i.symbol||0,o=n.selectedSizeFn(r);e.attr("d",A(v.symbolNumber(a),o,se(r,t),$(r,t))),r.mrc2=o})),a.length&&e.each((function(e){for(var t=r.select(this),n=0;n0?r:0}function O(e,t,r){return r&&(e=V(e)),t?B(e[1]):R(e[0])}function R(e){var t=r.round(e,2);return I=t,t}function B(e){var t=r.round(e,2);return L=t,t}function j(e,t,r,n){var i=e[0]-t[0],a=e[1]-t[1],o=r[0]-t[0],s=r[1]-t[1],l=Math.pow(i*i+a*a,.25),c=Math.pow(o*o+s*s,.25),u=(c*c*i-l*l*o)*n,h=(c*c*a-l*l*s)*n,f=3*c*(l+c),p=3*l*(l+c);return[[R(t[0]+(f&&u/f)),B(t[1]+(f&&h/f))],[R(t[0]-(p&&u/p)),B(t[1]-(p&&h/p))]]}v.textPointStyle=function(e,t,i){if(e.size()){var a;if(t.selectedpoints){var o=v.makeSelectedTextStyleFns(t);a=o.selectedTextColorFn}var s=t.texttemplate,l=i._fullLayout;e.each((function(e){var o=r.select(this),c=s?n.extractOption(e,t,"txt","texttemplate"):n.extractOption(e,t,"tx","text");if(c||0===c){if(s){var u=t._module.formatLabels,f=u?u(e,t,l):{},p={};y(p,t,e.i),c=n.texttemplateString({data:[p,e,t._meta],fallback:t.texttemplatefallback,labels:f,locale:l._d3locale,template:c})}var d=e.tp||t.textposition,m=D(e,t),g=a?a(e):e.tc||t.textfont.color;o.call(v.font,{family:e.tf||t.textfont.family,weight:e.tw||t.textfont.weight,style:e.ty||t.textfont.style,variant:e.tv||t.textfont.variant,textcase:e.tC||t.textfont.textcase,lineposition:e.tE||t.textfont.lineposition,shadow:e.tS||t.textfont.shadow,size:m,color:g}).text(c).call(h.convertToTspans,i).call(z,d,m,e.mrc)}else o.remove()}))}},v.selectedTextStyle=function(e,t){if(e.size()&&t.selectedpoints){var n=v.makeSelectedTextStyleFns(t);e.each((function(e){var i=r.select(this),a=n.selectedTextColorFn(e),o=e.tp||t.textposition,c=D(e,t);l.fill(i,a);var u=s.traceIs(t,"bar-like");z(i,o,c,e.mrc2||e.mrc,u)}))}},v.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r,n="M"+e[0],i=[];for(r=1;r=c||w>=h&&w<=c)&&(T<=f&&T>=u||T>=f&&T<=u)&&(e=[w,T])}return e}v.steps=function(e){var t=N[e]||U;return function(e){for(var r="M"+R(e[0][0])+","+B(e[0][1]),n=e.length,i=1;i=1e4&&(v.savedBBoxes={},q=0),i&&(v.savedBBoxes[i]=g),q++,n.extendFlat({},g)},v.setClipUrl=function(e,t,r){e.attr("clip-path",G(t,r))},v.getTranslate=function(e){var t=(e[e.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,(function(e,t,r){return[t,r].join(" ")})).split(" ");return{x:+t[0]||0,y:+t[1]||0}},v.setTranslate=function(e,t,r){var n=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",a=e[n]("transform")||"";return t=t||0,r=r||0,a=a.replace(/(\btranslate\(.*?\);?)/,"").trim(),a=(a+=u(t,r)).trim(),e[i]("transform",a),a},v.getScale=function(e){var t=(e[e.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,(function(e,t,r){return[t,r].join(" ")})).split(" ");return{x:+t[0]||1,y:+t[1]||1}},v.setScale=function(e,t,r){var n=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",a=e[n]("transform")||"";return t=t||1,r=r||1,a=a.replace(/(\bscale\(.*?\);?)/,"").trim(),a=(a+="scale("+t+","+r+")").trim(),e[i]("transform",a),a};var Y=/\s*sc.*/;v.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,e){var n=1===t&&1===r?"":"scale("+t+","+r+")";e.each((function(){var e=(this.getAttribute("transform")||"").replace(Y,"");e=(e+=n).trim(),this.setAttribute("transform",e)}))}};var X=/translate\([^)]*\)\s*$/;function $(e,t){var r;return e&&(r=e.mf),void 0===r&&(r=t.marker&&t.marker.standoff||0),t._geo||t._xA?r:-r}v.setTextPointsScale=function(e,t,n){e&&e.each((function(){var e,i=r.select(this),a=i.select("text");if(a.node()){var o=parseFloat(a.attr("x")||0),s=parseFloat(a.attr("y")||0),l=(i.attr("transform")||"").match(X);e=1===t&&1===n?[]:[u(o,s),"scale("+t+","+n+")",u(-o,-s)],l&&e.push(l),i.attr("transform",e.join(""))}}))},v.getMarkerStandoff=$;var K,J,Q,ee,te,re,ne=Math.atan2,ie=Math.cos,ae=Math.sin;function oe(e,t){var r=t[0],n=t[1];return[r*ie(e)-n*ae(e),r*ae(e)+n*ie(e)]}function se(e,t){var r=e.ma;void 0===r&&(!(r=t.marker.angle)||n.isArrayOrTypedArray(r))&&(r=0);var i,o,s=t.marker.angleref;if("previous"===s||"north"===s){if(t._geo){var l=t._geo.project(e.lonlat);i=l[0],o=l[1]}else{var c=t._xA,u=t._yA;if(!c||!u)return 90;i=c.c2p(e.x),o=u.c2p(e.y)}if(t._geo){var h,f=e.lonlat[0],p=e.lonlat[1],d=t._geo.project([f,p+1e-5]),m=t._geo.project([f+1e-5,p]),g=ne(m[1]-o,m[0]-i),y=ne(d[1]-o,d[0]-i);if("north"===s)h=r/180*Math.PI;else if("previous"===s){var v=f/180*Math.PI,x=p/180*Math.PI,_=K/180*Math.PI,b=J/180*Math.PI,w=_-v,T=ie(b)*ae(w),k=ae(b)*ie(x)-ie(b)*ae(x)*ie(w);h=-ne(T,k)-Math.PI,K=f,J=p}var A=oe(g,[ie(h),0]),M=oe(y,[ae(h),0]);r=ne(A[1]+M[1],A[0]+M[0])/Math.PI*180,"previous"===s&&(re!==t.uid||e.i!==te+1)&&(r=null)}if("previous"===s&&!t._geo)if(re===t.uid&&e.i===te+1&&a(i)&&a(o)){var S=i-Q,E=o-ee,C=t.line&&t.line.shape||"",I=C.slice(C.length-1);"h"===I&&(E=0),"v"===I&&(S=0),r+=ne(E,S)/Math.PI*180+90}else r=null}return Q=i,ee=o,te=e.i,re=t.uid,r}v.getMarkerAngle=se}}),tr=m({"src/components/titles/index.js"(e,t){var r=b(),n=M(),i=At(),a=He(),o=ct(),s=o.strTranslate,l=er(),c=W(),u=Et(),h=Z(),f=St().OPPOSITE_SIDE,p=/ [XY][0-9]* /;t.exports={draw:function(e,t,d){var m,g=e._fullLayout,y=d.propContainer,v=d.propName,x=d.placeholder,_=d.traceIndex,b=d.avoid||{},w=d.attributes,T=d.transform,k=d.containerGroup,A=1,M=y.title,S=(M&&M.text?M.text:"").trim(),E=!1,C=M&&M.font?M.font:{},I=C.family,L=C.size,P=C.color,z=C.weight,D=C.style,O=C.variant,R=C.textcase,F=C.lineposition,B=C.shadow,j=!!d.subtitlePropName,N=d.subtitlePlaceholder,U=(y.title||{}).subtitle||{text:"",font:{}},V=(U.text||"").trim(),q=!1,H=1,G=U.font,W=G.family,Z=G.size,Y=G.color,X=G.weight,$=G.style,K=G.variant,J=G.textcase,Q=G.lineposition,ee=G.shadow;"title.text"===v?m="titleText":-1!==v.indexOf("axis")?m="axisTitleText":-1!==v.indexOf("colorbar")&&(m="colorbarTitleText");var te=e._context.edits[m];function re(e,t){return void 0!==e&&void 0!==t&&e.replace(p," % ")===t.replace(p," % ")}""===S?A=0:re(S,x)&&(te||(S=""),A=.2,E=!0),j&&(""===V?H=0:re(V,N)&&(te||(V=""),H=.2,q=!0)),d._meta?S=o.templateString(S,d._meta):g._meta&&(S=o.templateString(S,g._meta));var ne,ie=S||V||te;k||(k=o.ensureSingle(g._infolayer,"g","g-"+t),ne=g._hColorbarMoveTitle);var ae=k.selectAll("text."+t).data(ie?[0]:[]);ae.enter().append("text"),ae.text(S).attr("class",t),ae.exit().remove();var oe=null,se=t+"-subtitle",le=V||te;if(j&&((oe=k.selectAll("text."+se).data(le?[0]:[])).enter().append("text"),oe.text(V).attr("class",se),oe.exit().remove()),!ie)return k;function ce(e,t){o.syncOrAsync([ue,he],{title:e,subtitle:t})}function ue(n){var a,h=n.title,f=n.subtitle;if(!T&&ne&&(T={}),T?(a="",T.rotate&&(a+="rotate("+[T.rotate,w.x,w.y]+")"),(T.offset||ne)&&(a+=s(0,(T.offset||0)-(ne||0)))):a=null,h.attr("transform",a),h.style("opacity",A*c.opacity(P)).call(l.font,{color:c.rgb(P),size:r.round(L,2),family:I,weight:z,style:D,variant:O,textcase:R,shadow:B,lineposition:F}).attr(w).call(u.convertToTspans,e,(function(e){if(e){var t=r.select(e.node().parentNode).select("."+se);if(!t.empty()){var n=e.node().getBBox();if(n.height){var i=n.y+n.height+1.6*Z;t.attr("y",i)}}}})),f&&!f.empty()){var p=k.select("."+t+"-math-group"),d=h.node().getBBox(),m=p.node()?p.node().getBBox():void 0,g=m?m.y+m.height+1.6*Z:d.y+d.height+1.6*Z,y=o.extendFlat({},w,{y:g});f.attr("transform",a),f.style("opacity",H*c.opacity(Y)).call(l.font,{color:c.rgb(Y),size:r.round(Z,2),family:W,weight:X,style:$,variant:K,textcase:J,shadow:ee,lineposition:Q}).attr(y).call(u.convertToTspans,e)}return i.previousPromises(e)}function he(t){var i=t.title,a=r.select(i.node().parentNode);if(b&&b.selection&&b.side&&S){a.attr("transform",null);var c=f[b.side],u="left"===b.side||"top"===b.side?-1:1,h=n(b.pad)?b.pad:2,p=l.bBox(a.node()),d={t:0,b:0,l:0,r:0},m=e._fullLayout._reservedMargin;for(var v in m)for(var x in m[v]){var _=m[v][x];d[x]=Math.max(d[x],_)}var w={left:d.l,top:d.t,right:g.width-d.r,bottom:g.height-d.b},T=b.maxShift||u*(w[b.side]-p[b.side]),k=0;if(T<0)k=T;else{var A=b.offsetLeft||0,M=b.offsetTop||0;p.left-=A,p.right-=A,p.top-=M,p.bottom-=M,b.selection.each((function(){var e=l.bBox(this);o.bBoxIntersect(p,e,h)&&(k=Math.max(k,u*(e[b.side]-p[c])+h))})),k=Math.min(T,k),y._titleScoot=Math.abs(k)}if(k>0||T<0){var E={left:[-k,0],right:[k,0],top:[0,-k],bottom:[0,k]}[b.side];a.attr("transform",s(E[0],E[1]))}}}function fe(e,t){e.text(t).on("mouseover.opacity",(function(){r.select(this).transition().duration(h.SHOW_PLACEHOLDER).style("opacity",1)})).on("mouseout.opacity",(function(){r.select(this).transition().duration(h.HIDE_PLACEHOLDER).style("opacity",0)}))}if(ae.call(ce,oe),te&&(S?ae.on(".opacity",null):(fe(ae,x),E=!0),ae.call(u.makeEditable,{gd:e}).on("edit",(function(t){void 0!==_?a.call("_guiRestyle",e,v,t,_):a.call("_guiRelayout",e,v,t)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(ce)})).on("input",(function(e){this.text(e||" ").call(u.positionText,w.x,w.y)})),j)){if(j&&!S){var pe=ae.node().getBBox(),de=pe.y+pe.height+1.6*Z;oe.attr("y",de)}V?oe.on(".opacity",null):(fe(oe,N),q=!0),oe.call(u.makeEditable,{gd:e}).on("edit",(function(t){a.call("_guiRelayout",e,"title.subtitle.text",t)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(ce)})).on("input",(function(e){this.text(e||" ").call(u.positionText,oe.attr("x"),oe.attr("y"))}))}return ae.classed("js-placeholder",E),oe&&!oe.empty()&&oe.classed("js-placeholder",q),k},SUBTITLE_PADDING_EM:1.6,SUBTITLE_PADDING_MATHJAX_EM:1.6}}}),rr=m({"src/plots/cartesian/set_convert.js"(e,t){var r=b(),n=T().utcFormat,i=ct(),a=i.numberFormat,o=M(),s=i.cleanNumber,l=i.ms2DateTime,c=i.dateTime2ms,u=i.ensureNumber,h=i.isArrayOrTypedArray,f=S(),p=f.FP_SAFE,d=f.BADNUM,m=f.LOG_CLIP,g=f.ONEWEEK,y=f.ONEDAY,v=f.ONEHOUR,x=f.ONEMIN,_=f.ONESEC,w=_t(),k=xt(),A=k.HOUR_PATTERN,E=k.WEEKDAY_PATTERN;function C(e){return Math.pow(10,e)}function I(e){return null!=e}t.exports=function(e,t){t=t||{};var f=e._id||"x",b=f.charAt(0);function T(t,r){if(t>0)return Math.log(t)/Math.LN10;if(t<=0&&r&&e.range&&2===e.range.length){var n=e.range[0],i=e.range[1];return.5*(n+i-2*m*Math.abs(n-i))}return d}function M(t,r,n,a){if((a||{}).msUTC&&o(t))return+t;var s=c(t,n||e.calendar);if(s===d){if(!o(t))return d;t=+t;var l=Math.floor(10*i.mod(t+.05,1)),u=Math.round(t-l/10);s=c(new Date(u))+l/10}return s}function S(t,r,n){return l(t,r,n||e.calendar)}function L(t){return e._categories[Math.round(t)]}function P(t){if(I(t)){if(void 0===e._categoriesMap&&(e._categoriesMap={}),void 0!==e._categoriesMap[t])return e._categoriesMap[t];e._categories.push("number"==typeof t?String(t):t);var r=e._categories.length-1;return e._categoriesMap[t]=r,r}return d}function z(t){if(e._categoriesMap)return e._categoriesMap[t]}function D(e){var t=z(e);return void 0!==t?t:o(e)?+e:void 0}function O(e){return o(e)?+e:z(e)}function R(e,t,n){return r.round(n+t*e,2)}function F(e,t,r){return(e-r)/t}var B=function(t){return o(t)?R(t,e._m,e._b):d},j=function(t){return F(t,e._m,e._b)};if(e.rangebreaks){var N="y"===b;B=function(t){if(!o(t))return d;var r=e._rangebreaks.length;if(!r)return R(t,e._m,e._b);var n=N;e.range[0]>e.range[1]&&(n=!n);for(var i=n?-1:1,a=i*t,s=0,l=0;lu)){s=a<(c+u)/2?l:l+1;break}s=l+1}var h=e._B[s]||0;return isFinite(h)?R(t,e._m2,h):0},j=function(t){var r=e._rangebreaks.length;if(!r)return F(t,e._m,e._b);for(var n=0,i=0;ie._rangebreaks[i].pmax&&(n=i+1);return F(t,e._m2,e._B[n])}}e.c2l="log"===e.type?T:u,e.l2c="log"===e.type?C:u,e.l2p=B,e.p2l=j,e.c2p="log"===e.type?function(e,t){return B(T(e,t))}:B,e.p2c="log"===e.type?function(e){return C(j(e))}:j,-1!==["linear","-"].indexOf(e.type)?(e.d2r=e.r2d=e.d2c=e.r2c=e.d2l=e.r2l=s,e.c2d=e.c2r=e.l2d=e.l2r=u,e.d2p=e.r2p=function(t){return e.l2p(s(t))},e.p2d=e.p2r=j,e.cleanPos=u):"log"===e.type?(e.d2r=e.d2l=function(e,t){return T(s(e),t)},e.r2d=e.r2c=function(e){return C(s(e))},e.d2c=e.r2l=s,e.c2d=e.l2r=u,e.c2r=T,e.l2d=C,e.d2p=function(t,r){return e.l2p(e.d2r(t,r))},e.p2d=function(e){return C(j(e))},e.r2p=function(t){return e.l2p(s(t))},e.p2r=j,e.cleanPos=u):"date"===e.type?(e.d2r=e.r2d=i.identity,e.d2c=e.r2c=e.d2l=e.r2l=M,e.c2d=e.c2r=e.l2d=e.l2r=S,e.d2p=e.r2p=function(t,r,n){return e.l2p(M(t,0,n))},e.p2d=e.p2r=function(e,t,r){return S(j(e),t,r)},e.cleanPos=function(t){return i.cleanDate(t,d,e.calendar)}):"category"===e.type?(e.d2c=e.d2l=P,e.r2d=e.c2d=e.l2d=L,e.d2r=e.d2l_noadd=D,e.r2c=function(t){var r=O(t);return void 0!==r?r:e.fraction2r(.5)},e.l2r=e.c2r=u,e.r2l=O,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return L(j(e))},e.r2p=e.d2p,e.p2r=j,e.cleanPos=function(e){return"string"==typeof e&&""!==e?e:u(e)}):"multicategory"===e.type&&(e.r2d=e.c2d=e.l2d=L,e.d2r=e.d2l_noadd=D,e.r2c=function(t){var r=D(t);return void 0!==r?r:e.fraction2r(.5)},e.r2c_just_indices=z,e.l2r=e.c2r=u,e.r2l=D,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return L(j(e))},e.r2p=e.d2p,e.p2r=j,e.cleanPos=function(e){return Array.isArray(e)||"string"==typeof e&&""!==e?e:u(e)},e.setupMultiCategory=function(r){var n,a,o=e._traceIndices,s=e._matchGroup;if(s&&0===e._categories.length)for(var l in s)if(l!==f){var c=t[w.id2name(l)];o=o.concat(c._traceIndices)}var u=[[0,{}],[0,{}]],p=[];for(n=0;nl[1]&&(a[s?0:1]=n),a[0]===a[1]){var c=e.l2r(r),u=e.l2r(n);if(void 0!==r){var h=c+1;void 0!==n&&(h=Math.min(h,u)),a[s?1:0]=h}if(void 0!==n){var f=u+1;void 0!==r&&(f=Math.max(f,c)),a[s?0:1]=f}}}},e.cleanRange=function(t,r){e._cleanRange(t,r),e.limitRange(t)},e._cleanRange=function(t,r){r||(r={}),t||(t="range");var n,a,s=i.nestedProperty(e,t).get();if(a=(a="date"===e.type?i.dfltRange(e.calendar):"y"===b?k.DFLTRANGEY:"realaxis"===e._name?[0,1]:r.dfltRange||k.DFLTRANGEX).slice(),("tozero"===e.rangemode||"nonnegative"===e.rangemode)&&(a[0]=0),s&&2===s.length){var l=null===s[0],c=null===s[1];for("date"===e.type&&!e.autorange&&(s[0]=i.cleanDate(s[0],d,e.calendar),s[1]=i.cleanDate(s[1],d,e.calendar)),n=0;n<2;n++)if("date"===e.type){if(!i.isDateTime(s[n],e.calendar)){e[t]=a;break}if(e.r2l(s[0])===e.r2l(s[1])){var u=i.constrain(e.r2l(s[0]),i.MIN_MS+1e3,i.MAX_MS-1e3);s[0]=e.l2r(u-1e3),s[1]=e.l2r(u+1e3);break}}else{if(!o(s[n])){if(l||c||!o(s[1-n])){e[t]=a;break}s[n]=s[1-n]*(n?10:.1)}if(s[n]<-p?s[n]=-p:s[n]>p&&(s[n]=p),s[0]===s[1]){var h=Math.max(1,Math.abs(1e-6*s[0]));s[0]-=h,s[1]+=h}}}else i.nestedProperty(e,t).set(a)},e.setScale=function(r){var n=t._size;if(e.overlaying){var i=w.getFromId({_fullLayout:t},e.overlaying);e.domain=i.domain}var a=r&&e._r?"_r":"range",o=e.calendar;e.cleanRange(a);var s,l,c=e.r2l(e[a][0],o),u=e.r2l(e[a][1],o),h="y"===b;if(h?(e._offset=n.t+(1-e.domain[1])*n.h,e._length=n.h*(e.domain[1]-e.domain[0]),e._m=e._length/(c-u),e._b=-e._m*u):(e._offset=n.l+e.domain[0]*n.w,e._length=n.w*(e.domain[1]-e.domain[0]),e._m=e._length/(u-c),e._b=-e._m*c),e._rangebreaks=[],e._lBreaks=0,e._m2=0,e._B=[],e.rangebreaks&&(e._rangebreaks=e.locateBreaks(Math.min(c,u),Math.max(c,u)),e._rangebreaks.length)){for(s=0;su&&(f=!f),f&&e._rangebreaks.reverse();var p=f?-1:1;for(e._m2=p*e._length/(Math.abs(u-c)-e._lBreaks),e._B.push(-e._m2*(h?u:c)),s=0;sa&&(a+=7,oa&&(a+=24,o=n&&o=n&&t=s.min&&(es.max&&(s.max=n),a=!1)}a&&c.push({min:e,max:n})}};for(n=0;n2*s}(f,t))return"date";var y="strict"!==n.autotypenumbers;return function(e,t){for(var r=e.length,n=u(r),a=0,o=0,c={},h=0;h2*a}(f,y)?"category":function(e,t){for(var r=e.length,n=0;n0&&((A=I-s(_)-l(b))>L?M/A>P&&(w=_,k=b,P=M/A):M/I>P&&(w={val:_.val,nopad:1},k={val:b.val,nopad:1},P=M/I));if(m===g){var z=m-1,D=m+1;if(E)if(0===m)a=[0,1];else{var O=(m>0?h:u).reduce((function(e,t){return Math.max(e,l(t))}),0),R=m/(1-Math.min(.5,O/I));a=m>0?[0,R]:[R,0]}else a=C?[Math.max(0,z),Math.max(1,D)]:[z,D]}else E?(w.val>=0&&(w={val:0,nopad:1}),k.val<=0&&(k={val:0,nopad:1})):C&&(w.val-P*s(w)<0&&(w={val:0,nopad:1}),k.val<=0&&(k={val:1,nopad:1})),P=(k.val-w.val-f(t,_.val,b.val))/(I-s(w)-l(k)),a=[w.val-P*s(w),k.val+P*l(k)];return a=T(a,t),t.limitRange&&t.limitRange(),v&&a.reverse(),i.simpleMap(a,t.l2r||Number)}function f(e,t,r){var n=0;if(e.rangebreaks)for(var i=e.locateBreaks(t,r),a=0;a=r&&(c.extrapad||!o)){s=!1;break}i(t,c.val)&&c.pad<=r&&(o||!c.extrapad)&&(e.splice(l,1),l--)}if(s){var u=a&&0===t;e.push({val:t,pad:u?0:r,extrapad:!u&&o})}}function v(e){return n(e)&&Math.abs(e)=t}function w(e,t,r){return void 0===t||void 0===r||(t=e.d2l(t))=c&&(o=c,r=c),s<=c&&(s=c,n=c)}}return r=function(e,t){var r=t.autorangeoptions;return r&&void 0!==r.minallowed&&w(t,r.minallowed,r.maxallowed)?r.minallowed:r&&void 0!==r.clipmin&&w(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}(r,t),n=function(e,t){var r=t.autorangeoptions;return r&&void 0!==r.maxallowed&&w(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&void 0!==r.clipmax&&w(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}(n,t),[r,n]}t.exports={applyAutorangeOptions:T,getAutoRange:h,makePadFn:p,doAutoRange:function(e,t,r){if(t.setScale(),t.autorange){t.range=r?r.slice():h(e,t),t._r=t.range.slice(),t._rl=i.simpleMap(t._r,t.r2l);var n=t._input,a={};a[t._attr+".range"]=t.range,a[t._attr+".autorange"]=t.autorange,o.call("_storeDirectGUIEdit",e.layout,e._fullLayout._preGUI,a),n.range=t.range.slice(),n.autorange=t.autorange}var s=t._anchorAxis;if(s&&s.rangeslider){var l=s.rangeslider[t._name];l&&"auto"===l.rangemode&&(l.range=h(e,t)),s._input.rangeslider[t._name]=i.extendFlat({},l)}},findExtremes:function(e,t,r){r||(r={}),e._m||e.setScale();var i,o,s,l,c,u,h,f,p,d=[],y=[],x=t.length,_=r.padded||!1,b=r.tozero&&("linear"===e.type||"-"===e.type),w="log"===e.type,T=!1,k=r.vpadLinearized||!1;function A(e){if(Array.isArray(e))return T=!0,function(t){return Math.max(Number(e[t]||0),0)};var t=Math.max(Number(e||0),0);return function(){return t}}var M=A((e._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),S=A((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),E=A(r.vpadplus||r.vpad),C=A(r.vpadminus||r.vpad);if(!T){if(f=1/0,p=-1/0,w)for(i=0;i0&&(f=o),o>p&&o-a&&(f=o),o>p&&o=P;i--)L(i);return{min:d,max:y,opts:r}},concatExtremes:d}}}),ar=m({"src/plots/cartesian/axes.js"(e,t){var r=b(),n=M(),i=At(),a=He(),o=ct(),s=o.strTranslate,l=Et(),c=tr(),u=W(),h=er(),f=Lt(),p=Rt(),d=(xt(),S()),m=d.ONEMAXYEAR,g=d.ONEAVGYEAR,y=d.ONEMINYEAR,v=d.ONEMAXQUARTER,x=d.ONEAVGQUARTER,_=d.ONEMINQUARTER,w=d.ONEMAXMONTH,T=d.ONEAVGMONTH,k=d.ONEMINMONTH,A=d.ONEWEEK,E=d.ONEDAY,C=E/2,I=d.ONEHOUR,L=d.ONEMIN,P=d.ONESEC,z=d.ONEMILLI,D=d.ONEMICROSEC,O=d.MINUS_SIGN,R=d.BADNUM,F={K:"zeroline"},B={K:"gridline",L:"path"},j={K:"minor-gridline",L:"path"},N={K:"tick",L:"path"},U={K:"tick",L:"text"},V={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},q=St(),H=q.MID_SHIFT,G=q.CAP_SHIFT,Z=q.LINE_SPACING,Y=q.OPPOSITE_SIDE,X=t.exports={};X.setConvert=rr();var $=nr(),K=_t(),J=K.idSort,Q=K.isLinked;X.id2name=K.id2name,X.name2id=K.name2id,X.cleanId=K.cleanId,X.list=K.list,X.listIds=K.listIds,X.getFromId=K.getFromId,X.getFromTrace=K.getFromTrace;var ee=ir();function te(e){var t=1e-4*(e[1]-e[0]);return[e[0]-t,e[1]+t]}X.getAutoRange=ee.getAutoRange,X.findExtremes=ee.findExtremes,X.coerceRef=function(e,t,r,n,i,a){var s=n.charAt(n.length-1),l=r._fullLayout._subplots[s+"axis"],c=n+"ref",u={};return i||(i=l[0]||("string"==typeof a?a:a[0])),a||(a=i),l=l.concat(l.map((function(e){return e+" domain"}))),u[c]={valType:"enumerated",values:l.concat(a?"string"==typeof a?[a]:a:[]),dflt:i},o.coerce(e,t,u,c)},X.coerceRefArray=function(e,t,r,n,i,a,s){let l=n.charAt(n.length-1);var c=r._fullLayout._subplots[l+"axis"];let u=n+"ref";var h=e[u];i||(i=c[0]||("string"==typeof a?a:a[0])),c=(c=c.concat(c.map((e=>e+" domain")))).concat(a||[]),h.length>s?(o.warn("Array attribute "+u+" has more entries than expected, truncating to "+s),h=h.slice(0,s)):h.lengthn&&f2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0)):e._minDtick=0},X.saveRangeInitial=function(e,t){for(var r=X.list(e,"",!0),n=!1,i=0;i.3*f||u(i)||u(a))){var p=r.dtick/2;e+=e+p.8){var s=Number(r.slice(1));a.exactYears>.8&&s%12==0?e=X.tickIncrement(e,"M6","reverse")+1.5*E:a.exactMonths>.8?e=X.tickIncrement(e,"M1","reverse")+15.5*E:e-=C;var l=X.tickIncrement(e,r);if(l<=n)return l}return e}(v,e,y,c,a)),g=v;g<=u;)g=X.tickIncrement(g,y,!1,a);return{start:t.c2r(v,0,a),end:t.c2r(g,0,a),size:y,_dataSpan:u-c}},X.prepMinorTicks=function(e,t,r){if(!t.minor.dtick){delete e.dtick;var i,a=t.dtick&&n(t._tmin);if(a){var s=X.tickIncrement(t._tmin,t.dtick,!0);i=[t._tmin,.99*s+.01*t._tmin]}else{var l=o.simpleMap(t.range,t.r2l);i=[l[0],.8*l[0]+.2*l[1]]}if(e.range=o.simpleMap(i,t.l2r),e._isMinor=!0,X.prepTicks(e,r),a){var c=n(t.dtick),u=n(e.dtick),h=c?t.dtick:+t.dtick.substring(1),f=u?e.dtick:+e.dtick.substring(1);c&&u?ae(h,f)?h===2*A&&f===2*E&&(e.dtick=A):h===2*A&&f===3*E?e.dtick=A:h!==A||(t._input.minor||{}).nticks?oe(h/f,2.5)?e.dtick=h/2:e.dtick=h:e.dtick=E:"M"===String(t.dtick).charAt(0)?u?e.dtick="M1":ae(h,f)?h>=12&&2===f&&(e.dtick="M3"):e.dtick=t.dtick:"L"===String(e.dtick).charAt(0)?"L"===String(t.dtick).charAt(0)?ae(h,f)||(e.dtick=oe(h/f,2.5)?t.dtick/2:t.dtick):e.dtick="D1":"D2"===e.dtick&&+t.dtick>1&&(e.dtick=1)}e.range=t.range}void 0===t.minor._tick0Init&&(e.tick0=t.tick0)},X.prepTicks=function(e,t){var r=o.simpleMap(e.range,e.r2l,void 0,void 0,t);if("auto"===e.tickmode||!e.dtick){var i,a=e.nticks;a||("category"===e.type||"multicategory"===e.type?(i=e.tickfont?o.bigFont(e.tickfont.size||12):15,a=e._length/i):(i="y"===e._id.charAt(0)?40:80,a=o.constrain(e._length/i,4,9)+1),"radialaxis"===e._name&&(a*=2)),e.minor&&"array"!==e.minor.tickmode||"array"===e.tickmode&&(a*=100),e._roughDTick=Math.abs(r[1]-r[0])/a,X.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick<2*e._minDtick&&(e.dtick=e._minDtick,e.tick0=e.l2r(e._forceTick0))}"period"===e.ticklabelmode&&function(e){var t;function r(){return!(n(e.dtick)||"M"!==e.dtick.charAt(0))}var i=r(),a=X.getTickFormat(e);if(a){var o=e._dtickInit!==e.dtick;/%[fLQsSMX]/.test(a)||(/%[HI]/.test(a)?(t=I,o&&!i&&e.dticke.range[1],c=!e.ticklabelindex||o.isArrayOrTypedArray(e.ticklabelindex)?e.ticklabelindex:[e.ticklabelindex],u=o.simpleMap(e.range,e.r2l,void 0,void 0,t),h=u[1]=(B?0:1);j--){var N=!j;j?(e._dtickInit=e.dtick,e._tick0Init=e.tick0):(e.minor._dtickInit=e.minor.dtick,e.minor._tick0Init=e.minor.tick0);var U=j?e:o.extendFlat({},e,e.minor);if(N?X.prepMinorTicks(U,e,t):X.prepTicks(U,t),"array"!==U.tickmode)if("sync"!==U.tickmode){var V=te(u),q=V[0],H=V[1],G=n(U.dtick),W="log"===r&&!(G||"L"===U.dtick.charAt(0)),Z=X.tickFirst(U,t);if(j){if(e._tmin=Z,Z=H:J<=H;J=X.tickIncrement(J,Q,h,i)){if(j&&Y++,U.rangebreaks&&!h){if(J=p)break}if(S.length>d||J===K)break;K=J;var ee={value:J};j?(W&&J!==(0|J)&&(ee.simpleLabel=!0),a>1&&Y%a&&(ee.skipLabel=!0),S.push(ee)):(ee.minor=!0,O.push(ee))}}else S=[],b=ce(e);else j?(S=[],b=ue(e,!N)):(O=[],M=ue(e,!N))}var re;if(!O||O.length<2?c=!1:function(e,t){return/%f/.test(t)?e>=D:/%L/.test(t)?e>=z:/%[SX]/.test(t)?e>=P:/%M/.test(t)?e>=L:/%[HI]/.test(t)?e>=I:/%p/.test(t)?e>=C:/%[Aadejuwx]/.test(t)?e>=E:/%[UVW]/.test(t)?e>=A:/%[Bbm]/.test(t)?e>=k:/%[q]/.test(t)?e>=_:!/%[Yy]/.test(t)||e>=y}((O[1].value-O[0].value)*(l?-1:1),e.tickformat)||(c=!1),c){var ne=S.concat(O);s&&S.length&&(ne=ne.slice(1)),(ne=ne.sort((function(e,t){return e.value-t.value})).filter((function(e,t,r){return 0===t||e.value!==r[t-1].value}))).map((function(e,t){return void 0!==e.minor||e.skipLabel?null:t})).filter((function(e){return null!==e})).forEach((function(e){c.map((function(t){var r=e+t;r>=0&&r0?(a=n-1,o=n):(a=n,o=n);var s,l=e[a].value,c=e[o].value,u=Math.abs(c-l),h=r||u,f=0;h>=y?f=u>=y&&u<=m?u:g:r===x&&h>=_?f=u>=_&&u<=v?u:x:h>=k?f=u>=k&&u<=w?u:T:r===A&&h>=A?f=A:h>=E?f=E:r===C&&h>=C?f=C:r===I&&h>=I&&(f=I),f>=u&&(f=u,s=!0);var p=i+f;if(t.rangebreaks&&f>0){for(var d=0,b=0;b<84;b++){var M=(b+.5)/84;t.maskBreaks(i*(1-M)+M*p)!==R&&d++}(f*=d/84)||(e[n].drop=!0),s&&u>A&&(f=u)}(f>0||0===n)&&(e[n].periodX=i+f/2)}}(F,e,e._definedDelta),e.rangebreaks){var pe="y"===e._id.charAt(0),de=1;"auto"===e.tickmode&&(de=e.tickfont?e.tickfont.size:12);var me=NaN;for(re=S.length-1;re>-1;re--)if(S[re].drop)S.splice(re,1);else{S[re].value=Ue(S[re].value,e);var ge=e.c2p(S[re].value);(pe?me>ge-de:mep||np&&(r.periodX=p),n10||"01-01"!==i.slice(5)?e._tickround="d":e._tickround=+t.slice(1)%12==0?"y":"m";else if(t>=E&&a<=10||t>=15*E)e._tickround="d";else if(t>=L&&a<=16||t>=I)e._tickround="M";else if(t>=P&&a<=19||t>=L)e._tickround="S";else{var o=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(a,o)-20,e._tickround<0&&(e._tickround=4)}}else if(n(t)||"L"===t.charAt(0)){var s=e.range.map(e.r2d||Number);n(t)||(t=Number(t.slice(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),c=Math.floor(Math.log(l)/Math.LN10+.01),u=void 0===e.minexponent?3:e.minexponent;Math.abs(c)>u&&(Te(e.exponentformat)&&"SI extended"!==e.exponentformat&&!ke(c)||Te(e.exponentformat)&&"SI extended"===e.exponentformat&&!Ae(c)?e._tickexponent=3*Math.round((c-1)/3):e._tickexponent=c)}else e._tickround=null}function _e(e,t,r){var n=e.tickfont||{};return{x:t,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontWeight:n.weight,fontStyle:n.style,fontVariant:n.variant,fontTextcase:n.textcase,fontLineposition:n.lineposition,fontShadow:n.shadow,fontColor:n.color}}X.autoTicks=function(e,t,r){var i;function a(e){return Math.pow(e,Math.floor(Math.log(t)/Math.LN10))}if("date"===e.type){e.tick0=o.dateTick0(e.calendar,0);var s=2*t;if(s>g)t/=g,i=a(10),e.dtick="M"+12*ve(t,i,he);else if(s>T)t/=T,e.dtick="M"+ve(t,1,fe);else if(s>E){if(e.dtick=ve(t,E,e._hasDayOfWeekBreaks?[1,2,7,14]:de),!r){var l=X.getTickFormat(e),c="period"===e.ticklabelmode;c&&(e._rawTick0=e.tick0),/%[uVW]/.test(l)?e.tick0=o.dateTick0(e.calendar,2):e.tick0=o.dateTick0(e.calendar,1),c&&(e._dowTick0=e.tick0)}}else s>I?e.dtick=ve(t,I,fe):s>L?e.dtick=ve(t,L,pe):s>P?e.dtick=ve(t,P,pe):(i=a(10),e.dtick=ve(t,i,he))}else if("log"===e.type){e.tick0=0;var u=o.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(u[1]-u[0])<1){var h=1.5*Math.abs((u[1]-u[0])/t);t=Math.abs(Math.pow(10,u[1])-Math.pow(10,u[0]))/h,i=a(10),e.dtick="L"+ve(t,i,he)}else e.dtick=t>.3?"D2":"D1"}else"category"===e.type||"multicategory"===e.type?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):Ne(e)?(e.tick0=0,i=1,e.dtick=ve(t,i,ye)):(e.tick0=0,i=a(10),e.dtick=ve(t,i,he));if(0===e.dtick&&(e.dtick=1),!n(e.dtick)&&"string"!=typeof e.dtick){var f=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(f)}},X.tickIncrement=function(e,t,i,a){var s=i?-1:1;if(n(t))return o.increment(e,s*t);var l=t.charAt(0),c=s*Number(t.slice(1));if("M"===l)return o.incrementMonth(e,c,a);if("L"===l)return Math.log(Math.pow(10,e)+c)/Math.LN10;if("D"===l){var u="D2"===t?ge:me,h=e+.01*s,f=o.roundUp(o.mod(h,1),u,i);return Math.floor(h)+Math.log(r.round(Math.pow(10,f),1))/Math.LN10}throw"unrecognized dtick "+String(t)},X.tickFirst=function(e,t){var i=e.r2l||Number,a=o.simpleMap(e.range,i,void 0,void 0,t),s=a[1]=0&&r<=e._length?t:null};if(l&&o.isArrayOrTypedArray(e.ticktext)){var p=o.simpleMap(e.range,e.r2l),d=(Math.abs(p[1]-p[0])-(e._lBreaks||0))/1e4;for(a=0;a ")}else e._prevDateHead=l,c+="
"+l;t.text=c}(e,s,r,c):"log"===u?function(e,t,r,i,a){var s=e.dtick,l=t.x,c=e.tickformat,u="string"==typeof s&&s.charAt(0);if("never"===a&&(a=""),i&&"L"!==u&&(s="L3",u="L"),c||"L"===u)t.text=Me(Math.pow(10,l),e,a,i);else if(n(s)||"D"===u&&("complete"===e.minorloglabels||o.mod(l+.01,1)<.1)){"complete"===e.minorloglabels&&!(o.mod(l+.01,1)<.1)&&(t.fontSize*=.75);var h=Math.pow(10,l).toExponential(0).split("e"),f=+h[1],p=Math.abs(f),d=e.exponentformat;"power"===d||Te(d)&&"SI extended"!==d&&ke(f)||Te(d)&&"SI extended"===d&&Ae(f)?(t.text=h[0],p>0&&(t.text+="x10"),"1x10"===t.text&&(t.text="10"),0!==f&&1!==f&&(t.text+=""+(f>0?"":O)+p+""),t.fontSize*=1.25):("e"===d||"E"===d)&&p>2?t.text=h[0]+d+(f>0?"+":O)+p:(t.text=Me(Math.pow(10,l),e,"","fakehover"),"D1"===s&&"y"===e._id.charAt(0)&&(t.dy-=t.fontSize/6))}else{if("D"!==u)throw"unrecognized dtick "+String(s);t.text="none"===e.minorloglabels?"":String(Math.round(Math.pow(10,o.mod(l,1)))),t.fontSize*=.75}if("D1"===e.dtick){var m=String(t.text).charAt(0);("0"===m||"1"===m)&&("y"===e._id.charAt(0)?t.dx-=t.fontSize/4:(t.dy+=t.fontSize/2,t.dx+=(e.range[1]>e.range[0]?1:-1)*t.fontSize*(l<0?.5:.25)))}}(e,s,0,c,g):"category"===u?function(e,t){var r=e._categories[Math.round(t.x)];void 0===r&&(r=""),t.text=String(r)}(e,s):"multicategory"===u?function(e,t,r){var n=Math.round(t.x),i=e._categories[n]||[],a=void 0===i[1]?"":String(i[1]),o=void 0===i[0]?"":String(i[0]);r?t.text=o+" - "+a:(t.text=a,t.text2=o)}(e,s,r):Ne(e)?function(e,t,r,n,i){if("radians"!==e.thetaunit||r)t.text=Me(t.x,e,i,n);else{var a=t.x/180;if(0===a)t.text="0";else{var s=function(e){function t(e,t){return Math.abs(e-t)<=1e-6}var r=function(e){for(var r=1;!t(Math.round(e*r)/r,e);)r*=10;return r}(e),n=e*r,i=Math.abs(function e(r,n){return t(n,0)?r:e(n,r%n)}(n,r));return[Math.round(n/i),Math.round(r/i)]}(a);if(s[1]>=100)t.text=Me(o.deg2rad(t.x),e,i,n);else{var l=t.x<0;1===s[1]?1===s[0]?t.text="π":t.text=s[0]+"π":t.text=["",s[0],"","⁄","",s[1],"","π"].join(""),l&&(t.text=O+t.text)}}}}(e,s,r,c,g):function(e,t,r,n,i){"never"===i?i="":"all"===e.showexponent&&Math.abs(t.x/e.dtick)<1e-6&&(i="hide"),t.text=Me(t.x,e,i,n)}(e,s,0,c,g),i||(e.tickprefix&&!m(e.showtickprefix)&&(s.text=e.tickprefix+s.text),e.ticksuffix&&!m(e.showticksuffix)&&(s.text+=e.ticksuffix)),e.labelalias&&e.labelalias.hasOwnProperty(s.text)){var y=e.labelalias[s.text];"string"==typeof y&&(s.text=y)}return("boundaries"===e.tickson||e.showdividers)&&(s.xbnd=[f(s.x-.5),f(s.x+e.dtick-.5)]),s},X.hoverLabelText=function(e,t,r){r&&(e=o.extendFlat({},e,{hoverformat:r}));var n=o.isArrayOrTypedArray(t)?t[0]:t,i=o.isArrayOrTypedArray(t)?t[1]:void 0;if(void 0!==i&&i!==n)return X.hoverLabelText(e,n,r)+" - "+X.hoverLabelText(e,i,r);var a="log"===e.type&&n<=0,s=X.tickText(e,e.c2l(a?-n:n),"hover").text;return a?0===n?"0":O+s:s};var be=["f","p","n","μ","m","","k","M","G","T"],we=["q","r","y","z","a",...be,"P","E","Z","Y","R","Q"],Te=e=>["SI","SI extended","B"].includes(e);function ke(e){return e>14||e<-15}function Ae(e){return e>32||e<-30}function Me(e,t,r,i){var a=e<0,s=t._tickround,l=r||t.exponentformat||"B",c=t._tickexponent,u=X.getTickFormat(t),h=t.separatethousands;if(i){var f={exponentformat:l,minexponent:t.minexponent,dtick:"none"===t.showexponent?t.dtick:n(e)&&Math.abs(e)||1,range:"none"===t.showexponent?t.range.map(t.r2d):[0,e||1]};xe(f),s=(Number(f._tickround)||0)+4,c=f._tickexponent,t.hoverformat&&(u=t.hoverformat)}if(u)return t._numFormat(u)(e).replace(/-/g,O);var p,d=Math.pow(10,-s)/2;if("none"===l&&(c=0),(e=Math.abs(e))"+p+"":"B"===l&&9===c?e+="B":Te(l)&&(e+="SI extended"===l?we[c/3+10]:be[c/3+5])),a?O+e:e}function Se(e,t){if(e){var r=Object.keys(V).reduce((function(e,r){return-1!==t.indexOf(r)&&V[r].forEach((function(t){e[t]=1})),e}),{});Object.keys(e).forEach((function(t){r[t]||(1===t.length?e[t]=0:delete e[t])}))}}function Ee(e,t){for(var r=[],n={},i=0;i1&&r=i.min&&e=0,a=u(e,t[1])<=0;return(r||i)&&(n||a)}if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":for(t=0;t=o(i)))){r=n;break}break;case"log":for(t=0;t=0&&i.unshift(i.splice(n,1).shift())}}));var s={false:{left:0,right:0}};return o.syncOrAsync(i.map((function(t){return function(){if(t){var n=X.getFromId(e,t);r||(r={}),r.axShifts=s,r.overlayingShiftedAx=a;var i=X.drawOne(e,n,r);return n._shiftPusher&&Ge(n,n._fullDepth||0,s,!0),n._r=n.range.slice(),n._rl=o.simpleMap(n._r,n.r2l),i}}})))},X.drawOne=function(e,t,r){var n,s,f,p=(r=r||{}).axShifts||{},d=r.overlayingShiftedAx||[];t.setScale();var m=e._fullLayout,g=t._id,y=g.charAt(0),v=X.counterLetter(g),x=m._plots[t._mainSubplot],_="above traces"===t.zerolinelayer;if(x){if(t._shiftPusher=t.autoshift||-1!==d.indexOf(t._id)||-1!==d.indexOf(t.overlaying),t._shiftPusher&"free"===t.anchor){var b=t.linewidth/2||0;"inside"===t.ticks&&(b+=t.ticklen),Ge(t,b,p,!0),Ge(t,t.shift||0,p,!1)}(!0!==r.skipTitle||void 0===t._shift)&&(t._shift=function(e,t){return e.autoshift?t[e.overlaying][e.side]:e.shift||0}(t,p));var w=x[y+"axislayer"],T=t._mainLinePosition,k=T+=t._shift,A=t._mainMirrorPosition,M=t._vals=X.calcTicks(t),S=[t.mirror,k,A].join("_");for(n=0;n0?r.bottom-u:0,h))));var f=0,p=0;if(t._shiftPusher&&(f=Math.max(h,r.height>0?"l"===l?u-r.left:r.right-u:0),t.title.text!==m._dfltTitle[y]&&(p=(t._titleStandoff||0)+(t._titleScoot||0),"l"===l&&(p+=Le(t))),t._fullDepth=Math.max(f,p)),t.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var d=[0,1],g="number"==typeof t._shift?t._shift:0;if("x"===y){if("b"===l?n[l]=t._depth:(n[l]=t._depth=Math.max(r.width>0?u-r.top:0,h),d.reverse()),r.width>0){var x=r.right-(t._offset+t._length);x>0&&(n.xr=1,n.r=x);var _=t._offset-r.left;_>0&&(n.xl=0,n.l=_)}}else if("l"===l?(t._depth=Math.max(r.height>0?u-r.left:0,h),n[l]=t._depth-g):(t._depth=Math.max(r.height>0?r.right-u:0,h),n[l]=t._depth+g,d.reverse()),r.height>0){var b=r.bottom-(t._offset+t._length);b>0&&(n.yb=0,n.b=b);var w=t._offset-r.top;w>0&&(n.yt=1,n.t=w)}n[v]="free"===t.anchor?t.position:t._anchorAxis.domain[d[0]],t.title.text!==m._dfltTitle[y]&&(n[l]+=Le(t)+(t.title.standoff||0)),t.mirror&&"free"!==t.anchor&&((o={x:0,y:0,r:0,l:0,t:0,b:0})[c]=t.linewidth,t.mirror&&!0!==t.mirror&&(o[c]+=h),!0===t.mirror||"ticks"===t.mirror?o[v]=t._anchorAxis.domain[d[1]]:("all"===t.mirror||"allticks"===t.mirror)&&(o[v]=[t._counterDomainMin,t._counterDomainMax][d[1]]))}fe&&(s=a.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),"string"==typeof t.automargin&&(Se(n,t.automargin),Se(o,t.automargin)),i.autoMargin(e,De(t),n),i.autoMargin(e,Oe(t),o),i.autoMargin(e,Re(t),s)})),o.syncOrAsync(ue)}}function pe(e){var r=g+(e||"tick");return E[r]||(E[r]=function(e,t,r){var n,i,a,o;if(e._selections[t].size())n=1/0,i=-1/0,a=1/0,o=-1/0,e._selections[t].each((function(){var e=ze(this);if("none"!==e.node().style.display){var t=h.bBox(e.node().parentNode);n=Math.min(n,t.top),i=Math.max(i,t.bottom),a=Math.min(a,t.left),o=Math.max(o,t.right)}}));else{var s=X.makeLabelFns(e,r);n=i=s.yFn({dx:0,dy:0,fontSize:0}),a=o=s.xFn({dx:0,dy:0,fontSize:0})}return{top:n,bottom:i,left:a,right:o,height:i-n,width:o-a}}(t,r,k)),E[r]}},X.getTickSigns=function(e,t){var r=e._id.charAt(0),n={x:"top",y:"right"}[r],i=e.side===n?1:-1,a=[-1,1,i,-i];return"inside"!==(t?(e.minor||{}).ticks:e.ticks)==("x"===r)&&(a=a.map((function(e){return-e}))),e.side&&a.push({l:-1,t:-1,r:1,b:1}[e.side.charAt(0)]),a},X.makeTransTickFn=function(e){return"x"===e._id.charAt(0)?function(t){return s(e._offset+e.l2p(t.x),0)}:function(t){return s(0,e._offset+e.l2p(t.x))}},X.makeTransTickLabelFn=function(e){var t=function(e){var t=e.ticklabelposition||"",r=e.tickson||"",n=function(e){return-1!==t.indexOf(e)},i=n("top"),a=n("left"),o=n("right"),s=n("bottom"),l=n("inside"),c="boundaries"!==r&&(s||a||i||o);if(!c&&!l)return[0,0];var u=e.side,h=c?(e.tickwidth||0)/2:0,f=3,p=e.tickfont?e.tickfont.size:12;return(s||i)&&(h+=p*G,f+=(e.linewidth||0)/2),(a||o)&&(h+=(e.linewidth||0)/2,f+=3),l&&"top"===u&&(f-=p*(1-G)),(a||i)&&(h=-h),("bottom"===u||"right"===u)&&(f=-f),[c?h:0,l?f:0]}(e),r=e.ticklabelshift||0,n=e.ticklabelstandoff||0,i=t[0],a=t[1],o=e.range[0]>e.range[1],l=e.ticklabelposition&&-1!==e.ticklabelposition.indexOf("inside"),c=!l;if(r&&(r*=o?-1:1),n){var u=e.side;n*=l&&("top"===u||"left"===u)||c&&("bottom"===u||"right"===u)?1:-1}return"x"===e._id.charAt(0)?function(t){return s(i+e._offset+e.l2p(Ce(t))+r,a+n)}:function(t){return s(a+n,i+e._offset+e.l2p(Ce(t))+r)}},X.makeTickPath=function(e,t,r,n){n||(n={});var i=n.minor;if(i&&!e.minor)return"";var a=void 0!==n.len?n.len:i?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),s=(e.linewidth||1)/2;return"x"===o?"M0,"+(t+s*r)+"v"+a*r:"M"+(t+s*r)+",0h"+a*r},X.makeLabelFns=function(e,t,r){var i=e.ticklabelposition||"",a=e.tickson||"",s=function(e){return-1!==i.indexOf(e)},l=s("top"),c=s("left"),u=s("right"),h=s("bottom"),f="boundaries"!==a&&(h||c||l||u),p=s("inside"),d="inside"===i&&"inside"===e.ticks||!p&&"outside"===e.ticks&&"boundaries"!==a,m=0,g=0,y=d?e.ticklen:0;if(p?y*=-1:f&&(y=0),d&&(m+=y,r)){var v=o.deg2rad(r);m=y*Math.cos(v)+1,g=y*Math.sin(v)}e.showticklabels&&(d||e.showline)&&(m+=.2*e.tickfont.size);var x,_,b,w,T,k={labelStandoff:m+=(e.linewidth||1)/2*(p?-1:1),labelShift:g},A=0,M=e.side,S=e._id.charAt(0),E=e.tickangle;if("x"===S)w=(T=!p&&"bottom"===M||p&&"top"===M)?1:-1,p&&(w*=-1),x=g*w,_=t+m*w,b=T?1:-.2,90===Math.abs(E)&&(p?b+=H:b=-90===E&&"bottom"===M?G:90===E&&"top"===M?H:.5,A=H/2*(E/90)),k.xFn=function(e){return e.dx+x+A*e.fontSize},k.yFn=function(e){return e.dy+_+e.fontSize*b},k.anchorFn=function(e,t){if(f){if(c)return"end";if(u)return"start"}return n(t)&&0!==t&&180!==t?t*w<0!==p?"end":"start":"middle"},k.heightFn=function(t,r,n){return r<-60||r>60?-.5*n:"top"===e.side!==p?-n:0};else if("y"===S){if(w=(T=!p&&"left"===M||p&&"right"===M)?1:-1,p&&(w*=-1),x=m,_=g*w,b=0,!p&&90===Math.abs(E)&&(b=-90===E&&"left"===M||90===E&&"right"===M?G:.5),p){var C=n(E)?+E:0;if(0!==C){var I=o.deg2rad(C);A=Math.abs(Math.sin(I))*G*w,b=0}}k.xFn=function(e){return e.dx+t-(x+e.fontSize*b)*w+A*e.fontSize},k.yFn=function(e){return e.dy+_+e.fontSize*H},k.anchorFn=function(e,t){return n(t)&&90===Math.abs(t)?"middle":T?"end":"start"},k.heightFn=function(t,r,n){return"right"===e.side&&(r*=-1),r<-30?-n:r<30?-.5*n:0}}return k},X.drawTicks=function(e,t,n){n=n||{};var i=t._id+"tick",a=[].concat(t.minor&&t.minor.ticks?n.vals.filter((function(e){return e.minor&&!e.noTick})):[]).concat(t.ticks?n.vals.filter((function(e){return!e.minor&&!e.noTick})):[]),o=n.layer.selectAll("path."+i).data(a,Ie);o.exit().remove(),o.enter().append("path").classed(i,1).classed("ticks",1).classed("crisp",!1!==n.crisp).each((function(e){return u.stroke(r.select(this),e.minor?t.minor.tickcolor:t.tickcolor)})).style("stroke-width",(function(r){return h.crispRound(e,r.minor?t.minor.tickwidth:t.tickwidth,1)+"px"})).attr("d",n.path).style("display",null),qe(t,[N]),o.attr("transform",n.transFn)},X.drawGrid=function(e,t,n){if(n=n||{},"sync"!==t.tickmode){var i=t._id+"grid",a=t.minor&&t.minor.showgrid,o=a?n.vals.filter((function(e){return e.minor})):[],s=t.showgrid?n.vals.filter((function(e){return!e.minor})):[],l=n.counterAxis;if(l&&X.shouldShowZeroLine(e,t,l))for(var c="array"===t.tickmode,f=0;f=0;y--){var v=y?m:g;if(v){var x=v.selectAll("path."+i).data(y?s:o,Ie);x.exit().remove(),x.enter().append("path").classed(i,1).classed("crisp",!1!==n.crisp),x.attr("transform",n.transFn).attr("d",n.path).each((function(e){return u.stroke(r.select(this),e.minor?t.minor.gridcolor:t.gridcolor||"#ddd")})).style("stroke-dasharray",(function(e){return h.dashStyle(e.minor?t.minor.griddash:t.griddash,e.minor?t.minor.gridwidth:t.gridwidth)})).style("stroke-width",(function(e){return(e.minor?d:t._gw)+"px"})).style("display",null),"function"==typeof n.path&&x.attr("d",n.path)}}qe(t,[B,j])}},X.drawZeroLine=function(e,t,r){r=r||r;var n=t._id+"zl",i=X.shouldShowZeroLine(e,t,r.counterAxis),a=r.layer.selectAll("path."+n).data(i?[{x:0,id:t._id}]:[]);a.exit().remove(),a.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",!1!==r.crisp).each((function(){r.layer.selectAll("path").sort((function(e,t){return J(e.id,t.id)}))})),a.attr("transform",r.transFn).attr("d",r.path).call(u.stroke,t.zerolinecolor||u.defaultLine).style("stroke-width",h.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),qe(t,[F])},X.drawLabels=function(e,t,i){i=i||{};var a=e._fullLayout,c=t._id,u="above traces"===t.zerolinelayer,f=i.cls||c+"tick",p=i.vals.filter((function(e){return e.text})),d=i.labelFns,m=i.secondary?0:t.tickangle,g=(t._prevTickAngles||{})[f],y=i.layer.selectAll("g."+f).data(t.showticklabels?p:[],Ie),v=[];function x(e,a){e.each((function(e){var o=r.select(this),c=o.select(".text-math-group"),u=d.anchorFn(e,a),f=i.transFn.call(o.node(),e)+(n(a)&&0!=+a?" rotate("+a+","+d.xFn(e)+","+(d.yFn(e)-e.fontSize/2)+")":""),p=l.lineCount(o),m=Z*e.fontSize,g=d.heightFn(e,n(a)?+a:0,(p-1)*m);if(g&&(f+=s(0,g)),c.empty()){var y=o.select("text");y.attr({transform:f,"text-anchor":u}),y.style("display",null),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var v=h.bBox(c.node()).width*{end:-.5,start:.5}[u];c.attr("transform",f+s(v,0))}}))}y.enter().append("g").classed(f,1).append("text").attr("text-anchor","middle").each((function(t){var n=r.select(this),i=e._promises.length;n.call(l.positionText,d.xFn(t),d.yFn(t)).call(h.font,{family:t.font,size:t.fontSize,color:t.fontColor,weight:t.fontWeight,style:t.fontStyle,variant:t.fontVariant,textcase:t.fontTextcase,lineposition:t.fontLineposition,shadow:t.fontShadow}).text(t.text).call(l.convertToTspans,e),e._promises[i]?v.push(e._promises.pop().then((function(){x(n,m)}))):x(n,m)})),qe(t,[U]),y.exit().remove(),i.repositionOnUpdate&&y.each((function(e){r.select(this).select("text").call(l.positionText,d.xFn(e),d.yFn(e))})),t._adjustTickLabelsOverflow=function(){var n=t.ticklabeloverflow;if(n&&"allow"!==n){var i=-1!==n.indexOf("hide"),s="x"===t._id.charAt(0),l=0,c=s?e._fullLayout.width:e._fullLayout.height;if(-1!==n.indexOf("domain")){var u=o.simpleMap(t.range,t.r2l);l=t.l2p(u[0])+t._offset,c=t.l2p(u[1])+t._offset}var f=Math.min(l,c),p=Math.max(l,c),d=t.side,m=1/0,g=-1/0;for(var v in y.each((function(e){var n=r.select(this);if(n.select(".text-math-group").empty()){var a=h.bBox(n.node()),o=0;s?(a.right>p||a.leftp||a.top+(t.tickangle?0:e.fontSize/4)t["_visibleLabelMin_"+n._id]?l.style("display","none"):"tick"===e.K&&!i&&"none"!==l.node().style.display&&l.style("display",null)}))}))}))}))},x(y,g+1?g:m);var _=null;t._selections&&(t._selections[f]=y);var b=[function(){return v.length&&Promise.all(v)}];t.automargin&&a._redrawFromAutoMarginCount&&90===g?(_=g,b.push((function(){x(y,g)}))):b.push((function(){if(x(y,m),p.length&&t.autotickangles&&("log"!==t.type||"D"!==String(t.dtick).charAt(0))){_=t.autotickangles[0];var e,r=0,n=[],a=1;y.each((function(e){r=Math.max(r,e.fontSize);var i=t.l2p(e.x),o=ze(this),s=h.bBox(o.node());a=Math.max(a,l.lineCount(o)),n.push({top:0,bottom:10,height:10,left:i-s.width/2,right:i+s.width/2+2,width:s.width+2})}));var s=("boundaries"===t.tickson||t.showdividers)&&!i.secondary,c=p.length,u=Math.abs((p[c-1].x-p[0].x)*t._m)/(c-1),f=s?u/2:u,d=s?t.ticklen:1.25*r*a,g=f/Math.sqrt(Math.pow(f,2)+Math.pow(d,2)),v=t.autotickangles.map((function(e){return e*Math.PI/180})),b=v.find((function(e){return Math.abs(Math.cos(e))<=g}));void 0===b&&(b=v.reduce((function(e,t){return Math.abs(Math.cos(e))R*O&&(P=O,C[E]=I[E]=z[E])}var V=Math.abs(P-L);V-A>0?A*=1+A/(V-=A):A=0,"y"!==t._id.charAt(0)&&(A=-A),C[S]=T.p2r(T.r2p(I[S])+M*A),"min"===T.autorange||"max reversed"===T.autorange?(C[0]=null,T._rangeInitial0=void 0,T._rangeInitial1=void 0):("max"===T.autorange||"min reversed"===T.autorange)&&(C[1]=null,T._rangeInitial0=void 0,T._rangeInitial1=void 0),a._insideTickLabelsUpdaterange[T._name+".range"]=C}var q=o.syncOrAsync(b);return q&&q.then&&e._promises.push(q),q},X.getPxPosition=function(e,t){var r,n=e._fullLayout._size,i=t._id.charAt(0),a=t.side;return"free"!==t.anchor?r=t._anchorAxis:"x"===i?r={_offset:n.t+(1-(t.position||0))*n.h,_length:0}:"y"===i&&(r={_offset:n.l+(t.position||0)*n.w+t._shift,_length:0}),"top"===a||"left"===a?r._offset:"bottom"===a||"right"===a?r._offset+r._length:void 0},X.shouldShowZeroLine=function(e,t,r){var n=o.simpleMap(t.range,t.r2l);return n[0]*n[1]<=0&&t.zeroline&&("linear"===t.type||"-"===t.type)&&!(t.rangebreaks&&t.maskBreaks(0)===R)&&(Pe(t,0)||!function(e,t,r,n){var i=r._mainAxis;if(i){var a=e._fullLayout,o=t._id.charAt(0),s=X.counterLetter(t._id),l=t._offset+(Math.abs(n[0])1)for(n=1;n4/3-s?o:s}}}),hr=m({"src/components/dragelement/cursor.js"(e,t){var r=ct(),n=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];t.exports=function(e,t,i,a){return e="left"===i?0:"center"===i?1:"right"===i?2:r.constrain(Math.floor(3*e),0,2),t="bottom"===a?0:"middle"===a?1:"top"===a?2:r.constrain(Math.floor(3*t),0,2),n[t][e]}}}),fr=m({"src/components/dragelement/unhover.js"(e,t){var r=dt(),n=Qe(),i=Pe().getGraphDiv,a=N(),o=t.exports={};o.wrapped=function(e,t,r){(e=i(e))._fullLayout&&n.clear(e._fullLayout._uid+a.HOVERID),o.raw(e,t,r)},o.raw=function(e,t){var n=e._fullLayout,i=e._hoverdata;t||(t={}),(!t.target||e._dragged||!1!==r.triggerHandler(e,"plotly_beforehover",t))&&(n._hoverlayer.selectAll("g").remove(),n._hoverlayer.selectAll("line").remove(),n._hoverlayer.selectAll("circle").remove(),e._hoverdata=void 0,t.target&&i&&e.emit("plotly_unhover",{event:t,points:i}))}}}),pr=m({"src/components/dragelement/index.js"(e,t){var r=lr(),n=ft(),i=cr(),a=ct().removeElement,o=xt(),s=t.exports={};s.align=ur(),s.getCursor=hr();var l=fr();function c(){var e=document.createElement("div");e.className="dragcover";var t=e.style;return t.position="fixed",t.left=0,t.right=0,t.top=0,t.bottom=0,t.zIndex=999999999,t.background="none",document.body.appendChild(e),e}function u(e){return r(e.changedTouches?e.changedTouches[0]:e,document.body)}s.unhover=l.wrapped,s.unhoverRaw=l.raw,s.init=function(e){var t,r,l,h,f,p,d,m,g=e.gd,y=1,v=g._context.doubleClickDelay,x=e.element;g._mouseDownTime||(g._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=b,i?(x._ontouchstart&&x.removeEventListener("touchstart",x._ontouchstart),x._ontouchstart=b,x.addEventListener("touchstart",b,{passive:!1})):x.ontouchstart=b;var _=e.clampFn||function(e,t,r){return Math.abs(e)"u"&&typeof i.clientY>"u"&&(i.clientX=t,i.clientY=r),(l=(new Date).getTime())-g._mouseDownTimev&&(y=Math.max(y-1,1)),g._dragged?e.doneFn&&e.doneFn():(p.target===d?r=p:(r={target:d,srcElement:d,toElement:d},Object.keys(p).concat(Object.keys(p.__proto__)).forEach((e=>{var t=p[e];!r[e]&&"function"!=typeof t&&(r[e]=t)}))),e.clickFn&&e.clickFn(y,r),m||d.dispatchEvent(new MouseEvent("click",t))),g._dragging=!1,g._dragged=!1):g._dragged=!1}},s.coverSlip=c}}),dr=m({"src/lib/setcursor.js"(e,t){t.exports=function(e,t){(e.attr("class")||"").split(" ").forEach((function(t){0===t.indexOf("cursor-")&&e.classed(t,!1)})),t&&e.classed("cursor-"+t,!0)}}}),mr=m({"src/lib/override_cursor.js"(e,t){var r=dr(),n="data-savedcursor";t.exports=function(e,t){var i=e.attr(n);if(t){if(!i){for(var a=(e.attr("class")||"").split(" "),o=0;ot.legend.length)for(var n=t.legend.length;n("legend"===e?1:0));if(!1===S&&(c[e]=void 0),(!1!==S||f.uirevision)&&(d("uirevision",c.uirevision),!1!==S)){d("borderwidth");var E,C,I,L="h"===d("orientation"),P="paper"===d("yref"),z="paper"===d("xref"),D="left";if(L?(E=0,r.getComponentMethod("rangeslider","isVisible")(t.xaxis)?P?(C=1.1,I="bottom"):(C=1,I="top"):P?(C=-.1,I="top"):(C=0,I="bottom")):(C=1,I="auto",z?E=1.02:(E=1,D="right")),n.coerce(f,p,{x:{valType:"number",editType:"legend",min:z?-2:0,max:z?3:1,dflt:E}},"x"),n.coerce(f,p,{y:{valType:"number",editType:"legend",min:P?-2:0,max:P?3:1,dflt:C}},"y"),d("traceorder",w),l.isGrouped(c[e])&&d("tracegroupgap"),d("entrywidth"),d("entrywidthmode"),d("indentation"),d("itemsizing"),d("itemwidth"),d("itemclick"),d("itemdoubleclick"),d("groupclick"),d("xanchor",D),d("yanchor",I),d("maxheight"),d("valign"),n.noneOrAll(f,p,["x","y"]),d("title.text")){d("title.side",L?"left":"top");var O=n.extendFlat({},m,{size:n.bigFont(m.size)});n.coerceFont(d,"title.font",O);let e=h>1;d("titleclick",!!e&&"toggle"),d("titledoubleclick",!!e&&"toggleothers")}}}function R(e){return r.traceIs(e,"pie-like")&&null!=e._length&&(Array.isArray(e.legend)||Array.isArray(e.showlegend))}}t.exports=function(e,t,r){var i,a=r.slice(),o=t.shapes;if(o)for(i=0;iC&&(E=C)}M[a][0]._groupMinRank=E,M[a][0]._preGroupSort=a}var I=function(e,t){return e.trace.legendrank-t.trace.legendrank||e._preSort-t._preSort};for(M.forEach((function(e,t){e[0]._preGroupSort=t})),M.sort((function(e,t){return e[0]._groupMinRank-t[0]._groupMinRank||e[0]._preGroupSort-t[0]._preGroupSort})),a=0;ar?r:e}t.exports=function(e,t,g){var y=t._fullLayout;g||(g=y.legend);var v="constant"===g.itemsizing,x=g.itemwidth,_=(x+2*f.itemGap)/2,b=a(_,0),w=function(e,t,r,n){var i;if(e+1)i=e;else{if(!(t&&t.width>0))return 0;i=t.width}return v?n:Math.min(i,r)};function T(e,i,a){var c=e[0].trace,u=c.marker||{},h=u.line||{},f=u.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",p=a?c.visible&&c.type===a:n.traceIs(c,"bar"),d=r.select(i).select("g.legendpoints").selectAll("path.legend"+a).data(p?[e]:[]);d.enter().append("path").classed("legend"+a,!0).attr("d",f).attr("transform",b),d.exit().remove(),d.each((function(e){var n=r.select(this),i=e[0],a=w(i.mlw,u.line,5,2);n.style("stroke-width",a+"px");var f=i.mcc;if(!g._inHover&&"mc"in i){var p=l(u),d=p.mid;void 0===d&&(d=(p.max+p.min)/2),f=o.tryColorscale(u,"")(d)}var y=f||i.mc||u.color,v=u.pattern,x=o.getPatternAttr,_=v&&(x(v.shape,0,"")||x(v.path,0,""));if(_){var b=x(v.bgcolor,0,null),T=x(v.fgcolor,0,null),k=v.fgopacity,A=m(v.size,8,10),M=m(v.solidity,.5,1),S="legend-"+c.uid;n.call(o.pattern,"legend",t,S,_,A,M,f,v.fillmode,b,T,k)}else n.call(s.fill,y);a&&s.stroke(n,i.mlc||h.color)}))}function k(e,a,o){var s=e[0],l=s.trace,c=o?l.visible&&l.type===o:n.traceIs(l,o),f=r.select(a).select("g.legendpoints").selectAll("path.legend"+o).data(c?[e]:[]);if(f.enter().append("path").classed("legend"+o,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",b),f.exit().remove(),f.size()){var p=l.marker||{},d=w(h(p.line.width,s.pts),p.line,5,2),m="pieLike",g=i.minExtend(l,{marker:{line:{width:d}}},m),y=i.minExtend(s,{trace:g},m);u(f,y,g,t)}}e.each((function(e){var t=r.select(this),n=i.ensureSingle(t,"g","layers");n.style("opacity",e[0].trace.opacity);var o=g.indentation,s=g.valign,l=e[0].lineHeight,c=e[0].height;if("middle"===s&&0===o||!l||!c)n.attr("transform",null);else{var u={top:1,bottom:-1}[s]*(.5*(l-c+3))||0,h=g.indentation;n.attr("transform",a(h,u))}n.selectAll("g.legendfill").data([e]).enter().append("g").classed("legendfill",!0),n.selectAll("g.legendlines").data([e]).enter().append("g").classed("legendlines",!0);var f=n.selectAll("g.legendsymbols").data([e]);f.enter().append("g").classed("legendsymbols",!0),f.selectAll("g.legendpoints").data([e]).enter().append("g").classed("legendpoints",!0)})).each((function(e){var n,a=e[0].trace,c=[];if(a.visible)switch(a.type){case"histogram2d":case"heatmap":c=[["M-15,-2V4H15V-2Z"]],n=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":c=[["M-6,-6V6H6V-6Z"]],n=!0;break;case"densitymapbox":case"densitymap":c=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],n="radial";break;case"cone":c=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],n=!1;break;case"streamtube":c=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],n=!1;break;case"surface":c=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],n=!0;break;case"mesh3d":c=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],n=!1;break;case"volume":c=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],n=!0;break;case"isosurface":c=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],n=!1}var u=r.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(c);u.enter().append("path").classed("legend3dandfriends",!0).attr("transform",b).style("stroke-miterlimit",1),u.exit().remove(),u.each((function(e,c){var u,h=r.select(this),f=l(a),d=f.colorscale,m=f.reversescale;if(d){if(!n){var g=d.length;u=0===c?d[m?g-1:0][1]:1===c?d[m?0:g-1][1]:d[Math.floor((g-1)/2)][1]}}else{var y=a.vertexcolor||a.facecolor||a.color;u=i.isArrayOrTypedArray(y)?y[c]||y[0]:y}h.attr("d",e[0]),u?h.call(s.fill,u):h.call((function(e){if(e.size()){var r="legendfill-"+a.uid;o.gradient(e,t,r,p(m,"radial"===n),d,"fill")}}))}))})).each((function(e){var t=e[0].trace,n="waterfall"===t.type;if(e[0]._distinct&&n){var i=e[0].trace[e[0].dir].marker;return e[0].mc=i.color,e[0].mlw=i.line.width,e[0].mlc=i.line.color,T(e,this,"waterfall")}var a=[];t.visible&&n&&(a=e[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var o=r.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(a);o.enter().append("path").classed("legendwaterfall",!0).attr("transform",b).style("stroke-miterlimit",1),o.exit().remove(),o.each((function(e){var n=r.select(this),i=t[e[0]].marker,a=w(void 0,i.line,5,2);n.attr("d",e[1]).style("stroke-width",a+"px").call(s.fill,i.color),a&&n.call(s.stroke,i.line.color)}))})).each((function(e){T(e,this,"funnel")})).each((function(e){T(e,this)})).each((function(e){var a=e[0].trace,l=r.select(this).select("g.legendpoints").selectAll("path.legendbox").data(a.visible&&n.traceIs(a,"box-violin")?[e]:[]);l.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",b),l.exit().remove(),l.each((function(){var e=r.select(this);if("all"!==a.boxpoints&&"all"!==a.points||0!==s.opacity(a.fillcolor)||0!==s.opacity((a.line||{}).color)){var n=w(void 0,a.line,5,2);e.style("stroke-width",n+"px").call(s.fill,a.fillcolor),n&&s.stroke(e,a.line.color)}else{var c=i.minExtend(a,{marker:{size:v?12:i.constrain(a.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});l.call(o.pointStyle,c,t)}}))})).each((function(e){k(e,this,"funnelarea")})).each((function(e){k(e,this,"pie")})).each((function(e){var n,a,s=d(e),u=s.showFill,h=s.showLine,f=s.showGradientLine,m=s.showGradientFill,g=s.anyFill,y=s.anyLine,v=e[0],_=v.trace,b=l(_),T=b.colorscale,k=b.reversescale,A=c.hasMarkers(_)||!g?"M5,0":y?"M5,-2":"M5,-3",M=r.select(this),S=M.select(".legendfill").selectAll("path").data(u||m?[e]:[]);if(S.enter().append("path").classed("js-fill",!0),S.exit().remove(),S.attr("d",A+"h"+x+"v6h-"+x+"z").call((function(e){if(e.size())if(u)o.fillGroupStyle(e,t,!0);else{var r="legendfill-"+_.uid;o.gradient(e,t,r,p(k),T,"fill")}})),h||f){var E=w(void 0,_.line,10,5);a=i.minExtend(_,{line:{width:E}}),n=[i.minExtend(v,{trace:a})]}var C=M.select(".legendlines").selectAll("path").data(h||f?[n]:[]);C.enter().append("path").classed("js-line",!0),C.exit().remove(),C.attr("d",A+(f?"l"+x+",0.0001":"h"+x)).call(h?o.lineGroupStyle:function(e){if(e.size()){var r="legendline-"+_.uid;o.lineGroupStyle(e),o.gradient(e,t,r,p(k),T,"stroke")}})})).each((function(e){var n,a,s=d(e),l=s.anyFill,u=s.anyLine,h=s.showLine,f=s.showMarker,p=e[0],m=p.trace,g=!f&&!u&&!l&&c.hasText(m);function y(e,t,r,n){var a=i.nestedProperty(m,e).get(),o=i.isArrayOrTypedArray(a)&&t?t(a):a;if(v&&o&&void 0!==n&&(o=n),r){if(or[1])return r[1]}return o}function x(e){return p._distinct&&p.index&&e[p.index]?e[p.index]:e[0]}if(f||g||h){var _={},w={};if(f){_.mc=y("marker.color",x),_.mx=y("marker.symbol",x),_.mo=y("marker.opacity",i.mean,[.2,1]),_.mlc=y("marker.line.color",x),_.mlw=y("marker.line.width",i.mean,[0,5],2),_.mld=m._isShape?"solid":y("marker.line.dash",x),w.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var T=y("marker.size",i.mean,[2,16],12);_.ms=T,w.marker.size=T}h&&(w.line={width:y("line.width",x,[0,10],5)}),g&&(_.tx="Aa",_.tp=y("textposition",x),_.ts=10,_.tc=y("textfont.color",x),_.tf=y("textfont.family",x),_.tw=y("textfont.weight",x),_.ty=y("textfont.style",x),_.tv=y("textfont.variant",x),_.tC=y("textfont.textcase",x),_.tE=y("textfont.lineposition",x),_.tS=y("textfont.shadow",x)),n=[i.minExtend(p,_)],(a=i.minExtend(m,w)).selectedpoints=null,a.texttemplate=null}var k=r.select(this).select("g.legendpoints"),A=k.selectAll("path.scatterpts").data(f?n:[]);A.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",b),A.exit().remove(),A.call(o.pointStyle,a,t),f&&(n[0].mrc=3);var M=k.selectAll("g.pointtext").data(g?n:[]);M.enter().append("g").classed("pointtext",!0).append("text").attr("transform",b),M.exit().remove(),M.selectAll("text").call(o.textPointStyle,a,t)})).each((function(e){var t=e[0].trace,n=r.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(t.visible&&"candlestick"===t.type?[e,e]:[]);n.enter().append("path").classed("legendcandle",!0).attr("d",(function(e,t){return t?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"})).attr("transform",b).style("stroke-miterlimit",1),n.exit().remove(),n.each((function(e,n){var i=r.select(this),a=t[n?"increasing":"decreasing"],o=w(void 0,a.line,5,2);i.style("stroke-width",o+"px").call(s.fill,a.fillcolor),o&&s.stroke(i,a.line.color)}))})).each((function(e){var t=e[0].trace,n=r.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(t.visible&&"ohlc"===t.type?[e,e]:[]);n.enter().append("path").classed("legendohlc",!0).attr("d",(function(e,t){return t?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"})).attr("transform",b).style("stroke-miterlimit",1),n.exit().remove(),n.each((function(e,n){var i=r.select(this),a=t[n?"increasing":"decreasing"],l=w(void 0,a.line,5,2);i.style("fill","none").call(o.dashLine,a.line.dash,l),l&&s.stroke(i,a.line.color)}))}))}}}),Mr=m({"src/components/legend/draw.js"(e,t){var r=b(),n=ct(),i=At(),a=He(),o=dt(),s=pr(),l=er(),c=W(),u=Et(),h=xr().handleItemClick,f=xr().handleTitleClick,p=_r(),d=St(),m=d.LINE_SPACING,g=d.FROM_TL,y=d.FROM_BR,v=br(),x=Ar(),_=yr(),w=/^legend[0-9]*$/;function T(e,t){var h,d,b=t||{},w=e._fullLayout,T=_.getId(b),S=b._inHover;if(S?(d=b.layer,h="hover"):(d=w._infolayer,h=T),d){var P;if(h+=w._uid,e._legendMouseDownTime||(e._legendMouseDownTime=0),S){if(!b.entries)return;P=v(b.entries,b)}else{for(var z=(e.calcdata||[]).slice(),D=w.shapes,O=0;O1)}var B=w.hiddenlabels||[];if(!(S||w.showlegend&&P.length))return d.selectAll("."+T).remove(),w._topdefs.select("#"+h).remove(),i.autoMargin(e,T);var j=n.ensureSingle(d,"g",T,(function(e){S||e.attr("pointer-events","all")})),N=n.ensureSingleById(w._topdefs,"clipPath",h,(function(e){e.append("rect")})),U=n.ensureSingle(j,"rect","bg",(function(e){e.attr("shape-rendering","crispEdges")}));U.call(c.stroke,b.bordercolor).call(c.fill,b.bgcolor).style("stroke-width",b.borderwidth+"px");var V,q=n.ensureSingle(j,"g","scrollbox"),H=b.title;b._titleWidth=0,b._titleHeight=0,H.text?((V=n.ensureSingle(q,"text",T+"titletext")).attr("text-anchor","start").call(l.font,H.font).text(H.text),C(V,q,e,b,1),!S&&(b.titleclick||b.titledoubleclick)&&function(e,t,i,s){if(t._fullData.some((function(e){let t=e.legend||"legend";return(Array.isArray(t)?t.includes(s):t===s)&&a.traceIs(e,"pie-like")})))return;let l=t._context.doubleClickDelay;var u,h=1;let p=n.ensureSingle(e,"rect",s+"titletoggle",(function(e){t._context.staticPlot||e.style("cursor","pointer").attr("pointer-events","all"),e.call(c.fill,"rgba(0,0,0,0)")}));t._context.staticPlot||(p.on("mousedown",(function(){(u=(new Date).getTime())-t._legendMouseDownTimel&&(h=Math.max(h-1,1));let e={event:r.event,legendId:s,data:t.data,layout:t.layout,fullData:t._fullData,fullLayout:t._fullLayout};if(1===h&&i.titleclick){if(!1===o.triggerHandler(t,"plotly_legendtitleclick",e))return;i._titleClickTimeout=setTimeout((function(){t._fullLayout&&f(t,i,i.titleclick)}),l)}else 2===h&&(i._titleClickTimeout&&clearTimeout(i._titleClickTimeout),t._legendMouseDownTime=0,!1!==o.triggerHandler(t,"plotly_legendtitledoubleclick",e)&&i.titledoubleclick&&f(t,i,i.titledoubleclick))})))}(q,e,b,T)):(q.selectAll("."+T+"titletext").remove(),q.selectAll("."+T+"titletoggle").remove());var G=n.ensureSingle(j,"rect","scrollbar",(function(e){e.attr(p.scrollBarEnterAttrs).call(c.fill,p.scrollBarColor)})),W=q.selectAll("g.groups").data(P);W.enter().append("g").attr("class","groups"),W.exit().remove();var Z=W.selectAll("g.traces").data(n.identity);Z.enter().append("g").attr("class","traces"),Z.exit().remove(),Z.style("opacity",(function(t){let r=t[0],n=r.trace;if(r.groupTitle){let t=n.legendgroup,r=(w.shapes||[]).filter((function(e){return e.showlegend}));return e._fullData.concat(r).some((function(e){return e.legendgroup===t&&(e.legend||"legend")===T&&!0===e.visible}))?1:.5}return a.traceIs(n,"pie-like")?-1!==B.indexOf(t[0].label)?.5:1:"legendonly"===n.visible?.5:1})).each((function(){r.select(this).call(M,e,b)})).call(x,e,b).each((function(t){S||t[0].groupTitle&&"toggleitem"===b.groupclick||r.select(this).call(E,e,T)})),n.syncOrAsync([i.previousPromises,function(){return function(e,t,n,i,a){var o=e._fullLayout,s=_.getId(i);i||(i=o[s]);var c=o._size,h=_.isVertical(i),f=_.isGrouped(i),d="fraction"===i.entrywidthmode,g=i.borderwidth,y=2*g,v=p.itemGap,x=i.indentation+i.itemwidth+2*v,b=2*(g+v),w=L(i),T=i.y<0||0===i.y&&"top"===w,A=i.y>1||1===i.y&&"bottom"===w,M=i.tracegroupgap,S={};let{orientation:E,yref:C}=i,{maxheight:P}=i,z=T||A||"v"!==E||"paper"!==C;P||(P=z?.5:1);let D=z?o.height:c.h;i._maxHeight=Math.max(P>1?P:P*D,30);var O=0;i._width=0,i._height=0;var R=function(e){var t=0,r=0,n=e.title.side;return n&&(-1!==n.indexOf("left")&&(t=e._titleWidth),-1!==n.indexOf("top")&&(r=e._titleHeight)),[t,r]}(i);if(h)n.each((function(e){var t=e[0].height;l.setTranslate(this,g+R[0],g+R[1]+i._height+t/2+v),i._height+=t,i._width=Math.max(i._width,e[0].width)})),O=x+i._width,i._width+=v+x+y,i._height+=b,f&&(t.each((function(e,t){l.setTranslate(this,0,t*i.tracegroupgap)})),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var F=I(i),B=i.x<0||0===i.x&&"right"===F,j=i.x>1||1===i.x&&"left"===F,N=A||T,U=o.width/2;i._maxWidth=Math.max(B?N&&"left"===F?c.l+c.w:U:j?N&&"right"===F?c.r+c.w:U:c.w,2*x);var V=0,q=0;n.each((function(e){var t=k(e,i,x);V=Math.max(V,t),q+=t})),O=null;var H=0;if(f){var G=0,W=0,Z=0;t.each((function(){var e=0,t=0;r.select(this).selectAll("g.traces").each((function(r){var n=k(r,i,x),a=r[0].height;l.setTranslate(this,R[0],R[1]+g+v+a/2+t),t+=a,e=Math.max(e,n),S[r[0].trace.legendgroup]=e}));var n=e+v;W>0&&n+g+W>i._maxWidth?(H=Math.max(H,W),W=0,Z+=G+M,G=t):G=Math.max(G,t),l.setTranslate(this,W,Z),W+=n})),i._width=Math.max(H,W)+g,i._height=Z+G+b}else{var Y=n.size(),X=q+y+(Y-1)*v=i._maxWidth&&(H=Math.max(H,Q),K=0,J+=$,i._height+=$,$=0),l.setTranslate(this,R[0]+g+K,R[1]+g+J+t/2+v),Q=K+r+v,K+=n,$=Math.max($,t)})),X?(i._width=K+y,i._height=$+b):(i._width=Math.max(H,Q)+y,i._height+=$+b)}}i._width=Math.ceil(Math.max(i._width+R[0],i._titleWidth+2*(g+p.titlePad))),i._height=Math.ceil(Math.max(i._height+R[1],i._titleHeight+2*(g+p.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var ee=e._context.edits,te=ee.legendText||ee.legendPosition;n.each((function(e){var t=r.select(this).select("."+s+"toggle"),n=e[0].height,a=e[0].trace.legendgroup,o=k(e,i,x);f&&""!==a&&(o=S[a]);var c=te?x:O||o;!h&&!d&&(c+=v/2),l.setRect(t,0,-n/2,c,n)}));var re=a.select("."+s+"titletext");re.node()&&function(e,t,r){if("top center"===t.title.side||"top right"===t.title.side){var n=t.title.font.size*m,i=0,a=e.node(),o=l.bBox(a).width;"top center"===t.title.side?i=.5*(t._width-2*r-2*p.titlePad-o):"top right"===t.title.side&&(i=t._width-2*r-2*p.titlePad-o),u.positionText(e,r+p.titlePad+i,r+n)}}(re,i,g);var ne=a.select("."+s+"titletoggle");if(ne.size()&&re.node()){var ie=re.attr("x")||0,ae=p.titlePad;l.setRect(ne,ie-ae,g,i._titleWidth+2*ae,i._titleHeight+2*ae)}}(e,W,Z,b,q)},function(){var t,o,c,u,f=w._size,m=b.borderwidth,v="paper"===b.xref,x="paper"===b.yref;if(H.text){let t=(w.shapes||[]).filter((function(e){return e.showlegend})),r=e._fullData.concat(t).some((function(e){let t=e.legend||"legend";return(Array.isArray(t)?t.includes(T):t===T)&&!0===e.visible}));V.style("opacity",r?1:.5)}if(!S){var _,k;_=v?f.l+f.w*b.x-g[I(b)]*b._width:w.width*b.x-g[I(b)]*b._width,k=x?f.t+f.h*(1-b.y)-g[L(b)]*b._effHeight:w.height*(1-b.y)-g[L(b)]*b._effHeight;var M=function(e,t,r,n){var a=e._fullLayout,o=a[t],s=I(o),l=L(o),c="paper"===o.xref,u="paper"===o.yref;e._fullLayout._reservedMargin[t]={};var h=o.y<.5?"b":"t",f=o.x<.5?"l":"r",p={r:a.width-r,l:r+o._width,b:a.height-n,t:n+o._effHeight};if(c&&u)return i.autoMargin(e,t,{x:o.x,y:o.y,l:o._width*g[s],r:o._width*y[s],b:o._effHeight*y[l],t:o._effHeight*g[l]});c?e._fullLayout._reservedMargin[t][h]=p[h]:u||"v"===o.orientation?e._fullLayout._reservedMargin[t][f]=p[f]:e._fullLayout._reservedMargin[t][h]=p[h]}(e,T,_,k);if(M)return;if(w.margin.autoexpand){var E=_,C=k;_=v?n.constrain(_,0,w.width-b._width):E,k=x?n.constrain(k,0,w.height-b._effHeight):C,_!==E&&n.log("Constrain "+T+".x to make legend fit inside graph"),k!==C&&n.log("Constrain "+T+".y to make legend fit inside graph")}l.setTranslate(j,_,k)}if(G.on(".drag",null),j.on("wheel",null),S||b._height<=b._maxHeight||e._context.staticPlot){var P=b._effHeight;S&&(P=b._height),U.attr({width:b._width-m,height:P-m,x:m/2,y:m/2}),l.setTranslate(q,0,0),N.select("rect").attr({width:b._width-2*m,height:P-2*m,x:m,y:m}),l.setClipUrl(q,h,e),l.setRect(G,0,0,0,0),delete b._scrollY}else{var z=Math.max(p.scrollBarMinHeight,b._effHeight*b._effHeight/b._height),D=b._effHeight-z-2*p.scrollBarMargin,O=b._height-b._effHeight,R=D/O,F=Math.min(b._scrollY||0,O);U.attr({width:b._width-2*m+p.scrollBarWidth+p.scrollBarMargin,height:b._effHeight-m,x:m/2,y:m/2}),N.select("rect").attr({width:b._width-2*m+p.scrollBarWidth+p.scrollBarMargin,height:b._effHeight-2*m,x:m,y:m+F}),l.setClipUrl(q,h,e),$(F,z,R),j.on("wheel",(function(){$(F=n.constrain(b._scrollY+r.event.deltaY/O*D,0,O),z,R),0!==F&&F!==O&&r.event.preventDefault()}));var B,W,Z,Y=r.behavior.drag().on("dragstart",(function(){var e=r.event.sourceEvent;B="touchstart"===e.type?e.changedTouches[0].clientY:e.clientY,Z=F})).on("drag",(function(){var e=r.event.sourceEvent;2===e.buttons||e.ctrlKey||(W="touchmove"===e.type?e.changedTouches[0].clientY:e.clientY,F=function(e,t,r){var i=(r-t)/R+e;return n.constrain(i,0,O)}(Z,B,W),$(F,z,R))}));G.call(Y);var X=r.behavior.drag().on("dragstart",(function(){var e=r.event.sourceEvent;"touchstart"===e.type&&(B=e.changedTouches[0].clientY,Z=F)})).on("drag",(function(){var e=r.event.sourceEvent;"touchmove"===e.type&&(W=e.changedTouches[0].clientY,F=function(e,t,r){var i=(t-r)/R+e;return n.constrain(i,0,O)}(Z,B,W),$(F,z,R))}));q.call(X)}function $(t,r,n){b._scrollY=e._fullLayout[T]._scrollY=t,l.setTranslate(q,0,-t),l.setRect(G,b._width,p.scrollBarMargin+t*n,p.scrollBarWidth,r),N.select("rect").attr("y",m+t)}e._context.edits.legendPosition&&(j.classed("cursor-move",!0),s.init({element:j.node(),gd:e,prepFn:function(e){if(e.target!==G.node()){var t=l.getTranslate(j);c=t.x,u=t.y}},moveFn:function(e,r){if(void 0!==c&&void 0!==u){var n=c+e,i=u+r;l.setTranslate(j,n,i),t=s.align(n,b._width,f.l,f.l+f.w,b.xanchor),o=s.align(i+b._height,-b._height,f.t+f.h,f.t,b.yanchor)}},doneFn:function(){if(void 0!==t&&void 0!==o){var r={};r[T+".x"]=t,r[T+".y"]=o,a.call("_guiRelayout",e,r)}},clickFn:function(t,r){var n=d.selectAll("g.traces").filter((function(){var e=this.getBoundingClientRect();return r.clientX>=e.left&&r.clientX<=e.right&&r.clientY>=e.top&&r.clientY<=e.bottom}));n.size()>0&&A(e,b,n,t,r)}}))}],e)}}function k(e,t,r){var n=e[0],i=n.width,a=t.entrywidthmode,o=n.trace.legendwidth||t.entrywidth;return"fraction"===a?t._maxWidth*o:r+(o||i)}function A(e,t,r,n,i){var s=e._fullLayout,l=r.data()[0][0].trace,c=t.itemclick,u=t.itemdoubleclick,f={event:i,node:r.node(),curveNumber:l.index,expandedIndex:l.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:s};l._group&&(f.group=l._group),a.traceIs(l,"pie-like")&&(f.label=r.datum()[0].label);var p=o.triggerHandler(e,"plotly_legendclick",f);if(1===n){if(!1===p)return;t._clickTimeout=setTimeout((function(){e._fullLayout&&c&&h(r,e,t,c)}),e._context.doubleClickDelay)}else 2===n&&(t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0,!1!==o.triggerHandler(e,"plotly_legenddoubleclick",f)&&!1!==p&&u&&h(r,e,t,u))}function M(e,t,r){var i,o,s=_.getId(r),c=e.data()[0][0],h=c.trace,f=a.traceIs(h,"pie-like"),d=!r._inHover&&t._context.edits.legendText&&!f,m=r._maxNameLength;c.groupTitle?(i=c.groupTitle.text,o=c.groupTitle.font):(o=r.font,r.entries?i=c.text:(i=f?c.label:h.name,h._meta&&(i=n.templateString(i,h._meta))));var g=n.ensureSingle(e,"text",s+"text");g.attr("text-anchor","start").call(l.font,o).text(d?S(i,m):i);var y=r.indentation+r.itemwidth+2*p.itemGap;u.positionText(g,y,0),d?g.call(u.makeEditable,{gd:t,text:i}).call(C,e,t,r).on("edit",(function(n){this.text(S(n,m)).call(C,e,t,r);var i=c.trace._fullInput||{},o={};return o.name=n,i._isShape?a.call("_guiRelayout",t,"shapes["+h.index+"].name",o.name):a.call("_guiRestyle",t,o,h.index)})):C(g,e,t,r)}function S(e,t){var r=Math.max(4,t);if(e&&e.trim().length>=r/2)return e;for(var n=r-(e=e||"").length;n>0;n--)e+=" ";return e}function E(e,t,i){var a,o=t._context.doubleClickDelay,s=1,l=n.ensureSingle(e,"rect",i+"toggle",(function(e){t._context.staticPlot||e.style("cursor","pointer").attr("pointer-events","all"),e.call(c.fill,"rgba(0,0,0,0)")}));t._context.staticPlot||(l.on("mousedown",(function(){(a=(new Date).getTime())-t._legendMouseDownTimeo&&(s=Math.max(s-1,1)),A(t,n,e,s,r.event)}})))}function C(e,t,r,n,i){n._inHover&&e.attr("data-notex",!0),u.convertToTspans(e,r,(function(){!function(e,t,r,n){var i=e.data()[0][0],a=i&&i.trace.showlegend;if(Array.isArray(a)&&(a=!1!==a[i.i]),r._inHover||!i||a){var o=e.select("g[class*=math-group]"),s=o.node(),c=_.getId(r);r||(r=t._fullLayout[c]);var h,f,d=r.borderwidth,g=(1===n?r.title.font:i.groupTitle?i.groupTitle.font:r.font).size*m;if(s){var y=l.bBox(s);h=y.height,f=y.width,1===n?l.setTranslate(o,d,d+.75*h):l.setTranslate(o,0,.25*h)}else{var v="."+c+(1===n?"title":"")+"text",x=e.select(v),b=u.lineCount(x),w=x.node();if(h=g*b,f=w?l.bBox(w).width:0,1===n)"left"===r.title.side&&(f+=2*p.itemGap),u.positionText(x,d+p.titlePad,d+g);else{var T=2*p.itemGap+r.indentation+r.itemwidth;i.groupTitle&&(T=p.itemGap,f-=r.indentation+r.itemwidth),u.positionText(x,T,-g*((b-1)/2-.3))}}1===n?(r._titleWidth=f,r._titleHeight=h):(i.lineHeight=g,i.height=Math.max(h,16)+3,i.width=f)}else e.remove()}(t,r,n,i)}))}function I(e){return n.isRightAnchor(e)?"right":n.isCenterAnchor(e)?"center":"left"}function L(e){return n.isBottomAnchor(e)?"bottom":n.isMiddleAnchor(e)?"middle":"top"}t.exports=function(e,t){if(t)T(e,t);else{var n=e._fullLayout,i=n._legends;n._infolayer.selectAll('[class^="legend"]').each((function(){var e=r.select(this),t=e.attr("class").split(" ")[0];t.match(w)&&-1===i.indexOf(t)&&e.remove()}));for(var a=0;a$[0]._length||be<0||be>K[0]._length)return p.unhoverRaw(e,n)}else _e="xpx"in n?n.xpx:$[0]._length/2,be="ypx"in n?n.ypx:K[0]._length/2;if(n.pointerX=_e+$[0]._offset,n.pointerY=be+K[0]._offset,ne="xval"in n?y.flat(_,n.xval):y.p2c($,_e),ie="yval"in n?y.flat(_,n.yval):y.p2c(K,be),!r(ne[0])||!r(ie[0]))return i.warn("Fx.hover failed",n,e),p.unhoverRaw(e,n)}var Ae=1/0;function Me(t,a){for(oe=0;oeme&&(ge.splice(0,me),Ae=ge[0].distance),M&&0!==re&&0===ge.length){de.distance=re,de.index=!1;var u=le._module.hoverPoints(de,fe,pe,"closest",{hoverLayer:b._hoverlayer});if(u&&(u=u.filter((function(e){return e.spikeDistance<=re}))),u&&u.length){var h,p=u.filter((function(e){return e.xa.showspikes&&"hovered data"!==e.xa.spikesnap}));if(p.length){var d=p[0];r(d.x0)&&r(d.y0)&&(h=Ee(d),(!ve.vLinePoint||ve.vLinePoint.spikeDistance>h.spikeDistance)&&(ve.vLinePoint=h))}var m=u.filter((function(e){return e.ya.showspikes&&"hovered data"!==e.ya.spikesnap}));if(m.length){var g=m[0];r(g.x0)&&r(g.y0)&&(h=Ee(g),(!ve.hLinePoint||ve.hLinePoint.spikeDistance>h.spikeDistance)&&(ve.hLinePoint=h))}}}}}function Se(e,t,r){for(var n,i=null,a=1/0,o=0;oe.trace.index===Be.trace.index)):[Be]).length;Me(G("x",Be,b),G("y",Be,b));var Ne,Ue=[],Ve={},qe=0,He=function(e){var t=I[e.trace.type]?z(e):e.trace.index;if(Ve[t]){var r=Ve[t]-1,n=Ue[r];r>0&&Math.abs(e.distance)je-1;Ne--)He(ge[Ne]);ge=Ue,Pe()}var Ge=e._hoverdata,We=[],Ze=Z(e),Ye=Y(e);for(let e of ge){var Xe=y.makeEventData(e,e.trace,e.cd);if(!1!==e.hovertemplate){var $e=!1;e.cd[e.index]&&e.cd[e.index].ht&&($e=e.cd[e.index].ht),e.hovertemplate=$e||e.trace.hovertemplate||!1}if(e.xa&&e.ya){var Ke=e.x0+e.xa._offset,Je=e.x1+e.xa._offset,Qe=e.y0+e.ya._offset,et=e.y1+e.ya._offset,tt=Math.min(Ke,Je),rt=Math.max(Ke,Je),nt=Math.min(Qe,et),it=Math.max(Qe,et);Xe.bbox={x0:tt+Ye,x1:rt+Ye,y0:nt+Ze,y1:it+Ze}}e.eventData=[Xe],We.push(Xe)}e._hoverdata=We;var at="y"===S&&(ye.length>1||ge.length>1)||"closest"===S&&xe&&ge.length>1,ot=f.combine(b.plot_bgcolor||f.background,b.paper_bgcolor),st=O(ge,{gd:e,hovermode:S,rotateLabels:at,bgColor:ot,container:b._hoverlayer,outerContainer:b._paper.node(),commonLabelOpts:b.hoverlabel,hoverdistance:b.hoverdistance}),lt=st.hoverLabels;if(y.isUnifiedHover(S)||(function(e,t,r,n){var i,a,o,s,l,c,u,h=t?"xa":"ya",f=t?"ya":"xa",p=0,d=1,m=e.size(),g=new Array(m),y=0,v=n.minX,x=n.maxX,_=n.minY,b=n.maxY,w=function(e){return e*r._invScaleX},T=function(e){return e*r._invScaleY};function A(e){var t=e[0],r=e[e.length-1];if(a=t.pmin-t.pos-t.dp+t.size,o=r.pos+r.dp+r.size-t.pmax,a>.01){for(l=e.length-1;l>=0;l--)e[l].dp+=a;i=!1}if(!(o<.01)){if(a<-.01){for(l=e.length-1;l>=0;l--)e[l].dp-=o;i=!1}if(i){var n=0;for(s=0;st.pmax&&n++;for(s=e.length-1;s>=0&&!(n<=0);s--)(c=e[s]).pos>t.pmax-1&&(c.del=!0,n--);for(s=0;s=0;l--)e[l].dp-=o;for(s=e.length-1;s>=0&&!(n<=0);s--)(c=e[s]).pos+c.dp+c.size>t.pmax&&(c.del=!0,n--)}}}for(e.each((function(e){var n=e[h],i=e[f],a="x"===n._id.charAt(0),o=n.range;0===y&&o&&o[0]>o[1]!==a&&(d=-1);var s=0,l=a?r.width:r.height;if("x"===r.hovermode||"y"===r.hovermode){var c,u,p=B(e,t),m=e.anchor,A="end"===m?-1:1;if("middle"===m)u=(c=e.crossPos+(a?T(p.y-e.by/2):w(e.bx/2+e.tx2width/2)))+(a?T(e.by):w(e.bx));else if(a)u=(c=e.crossPos+T(E+p.y)-T(e.by/2-E))+T(e.by);else{var M=w(A*E+p.x),S=M+w(A*e.bx);c=e.crossPos+Math.min(M,S),u=e.crossPos+Math.max(M,S)}a?void 0!==_&&void 0!==b&&Math.min(u,b)-Math.max(c,_)>1&&("left"===i.side?(s=i._mainLinePosition,l=r.width):l=i._mainLinePosition):void 0!==v&&void 0!==x&&Math.min(u,x)-Math.max(c,v)>1&&("top"===i.side?(s=i._mainLinePosition,l=r.height):l=i._mainLinePosition)}g[y++]=[{datum:e,traceIndex:e.trace.index,dp:0,pos:e.pos,posref:e.posref,size:e.by*(a?k:1)/2,pmin:s,pmax:l}]})),g.sort((function(e,t){return e[0].posref-t[0].posref||d*(t[0].traceIndex-e[0].traceIndex)}));!i&&p<=m;){for(p++,i=!0,s=0;s.01){for(l=S.length-1;l>=0;l--)S[l].dp+=a;for(M.push.apply(M,S),g.splice(s+1,1),u=0,l=M.length-1;l>=0;l--)u+=M[l].dp;for(o=u/M.length,l=M.length-1;l>=0;l--)M[l].dp-=o;i=!1}else s++}g.forEach(A)}for(s=g.length-1;s>=0;s--){var L=g[s];for(l=L.length-1;l>=0;l--){var P=L[l],z=P.datum;z.offset=P.dp,z.del=P.del}}}(lt,at,b,st.commonLabelBoundingBox),j(lt,at,b._invScaleX,b._invScaleY)),c&&c.tagName){var ct=g.getComponentMethod("annotations","hasClickToShow")(e,We);u(t.select(c),ct?"pointer":"")}!c||s||!function(e,t,r){if(!r||r.length!==e._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],a=e._hoverdata[n];if(i.curveNumber!==a.curveNumber||String(i.pointNumber)!==String(a.pointNumber)||String(i.pointNumbers)!==String(a.pointNumbers)||i.binNumber!==a.binNumber)return!0}return!1}(e,0,Ge)||(Ge&&e.emit("plotly_unhover",{event:n,points:Ge}),e.emit("plotly_hover",{event:n,points:e._hoverdata,xaxes:$,yaxes:K,xvals:ne,yvals:ie}))}(e,n,o,s,c)}))},e.loneHover=function(e,r){var n=!0;Array.isArray(e)||(n=!1,e=[e]);var i=r.gd,a=Z(i),o=Y(i),s=!1,l=O(e.map((function(e){var t=e._x0||e.x0||e.x||0,n=e._x1||e.x1||e.x||0,s=e._y0||e.y0||e.y||0,l=e._y1||e.y1||e.y||0,c=e.eventData;if(c){var u=Math.min(t,n),h=Math.max(t,n),p=Math.min(s,l),d=Math.max(s,l),m=e.trace;if(g.traceIs(m,"gl3d")){var y=i._fullLayout[m.scene]._scene.container,v=y.offsetLeft,x=y.offsetTop;u+=v,h+=v,p+=x,d+=x}c.bbox={x0:u+o,x1:h+o,y0:p+a,y1:d+a},r.inOut_bbox&&r.inOut_bbox.push(c.bbox)}else c=!1;return{color:e.color||f.defaultLine,x0:e.x0||e.x||0,x1:e.x1||e.x||0,y0:e.y0||e.y||0,y1:e.y1||e.y||0,xLabel:e.xLabel,yLabel:e.yLabel,zLabel:e.zLabel,text:e.text,name:e.name,idealAlign:e.idealAlign,borderColor:e.borderColor,fontFamily:e.fontFamily,fontSize:e.fontSize,fontColor:e.fontColor,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontVariant:e.fontVariant,nameLength:e.nameLength,textAlign:e.textAlign,trace:e.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:e.hovertemplate||!1,hovertemplateLabels:e.hovertemplateLabels||!1,eventData:c}})),{gd:i,hovermode:"closest",rotateLabels:s,bgColor:r.bgColor||f.background,container:t.select(r.container),outerContainer:r.outerContainer||r.container}).hoverLabels,c=0,u=0;return l.sort((function(e,t){return e.y0-t.y0})).each((function(e,t){var n=e.y0-e.by/2;e.offset=n-5([\s\S]*)<\/extra>/;function O(e,r){var n=r.gd,a=n._fullLayout,l=r.hovermode,u=r.rotateLabels,p=r.bgColor,d=r.container,m=r.outerContainer,b=r.commonLabelOpts||{};if(0===e.length)return[[]];var T=r.fontFamily||v.HOVERFONT,k=r.fontSize||v.HOVERFONTSIZE,A=r.fontWeight||a.font.weight,M=r.fontStyle||a.font.style,S=r.fontVariant||a.font.variant,I=r.fontTextcase||a.font.textcase,L=r.fontLineposition||a.font.lineposition,P=r.fontShadow||a.font.shadow,D=e[0],O=D.xa,F=D.ya,B=l.charAt(0),j=B+"Label",N=D[j];if(void 0===N&&"multicategory"===O.type)for(var U=0;Ua.width-w&&(z=a.width-w),r.attr("d","M"+(y-z)+",0L"+(y-z+E)+","+_+E+"H"+w+"v"+_+(2*C+x.height)+"H"+-w+"V"+_+E+"H"+(y-z-E)+"Z"),y=z,Q.minX=y-w,Q.maxX=y+w,"top"===O.side?(Q.minY=v-(2*C+x.height),Q.maxY=v-C):(Q.minY=v+C,Q.maxY=v+(2*C+x.height))}else{var R,B,j;"right"===F.side?(R="start",B=1,j="",y=O._offset+O._length):(R="end",B=-1,j="-",y=O._offset),v=F._offset+(D.y0+D.y1)/2,s.attr("text-anchor",R),r.attr("d","M0,0L"+j+E+","+E+"V"+(C+x.height/2)+"h"+j+(2*C+x.width)+"V-"+(C+x.height/2)+"H"+j+E+"V-"+E+"Z"),Q.minY=v-(C+x.height/2),Q.maxY=v+(C+x.height/2),"right"===F.side?(Q.minX=y+E,Q.maxX=y+E+(2*C+x.width)):(Q.minX=y-E-(2*C+x.width),Q.maxX=y-E);var U,V=x.height/2,H=q-x.top-V,G="clip"+a._uid+"commonlabel"+F._id;if(y"none"!==e.hoverinfo));if(0===t.length)return[];var ee=a.hoverlabel,te=ee.font,re=t[0],ne=(("x unified"===l?re.xa:re.ya).unifiedhovertitle||{}).text,ie={showlegend:!0,legend:{title:{text:ne?i.hovertemplateString({data:"x unified"===l?[{xa:re.xa,x:re.xVal}]:[{ya:re.ya,y:re.yVal}],fallback:re.trace.hovertemplatefallback,locale:a._d3locale,template:ne}):N,font:te},font:te,bgcolor:ee.bgcolor,bordercolor:ee.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:a.legend?a.legend.traceorder:void 0,orientation:"v"}},ae={font:te};x(ie,ae,n._fullData);var oe=ae.legend;oe.entries=[];for(var se=0;se=0?me:ge+xe=0?ge:Se+xe=0?pe:de+_e=0?de:Ee+_e=0,"top"!==e.idealAlign&&K||!J?K?(j+=V/2,e.anchor="start"):e.anchor="middle":(j-=V/2,e.anchor="end"),e.crossPos=j;else{if(e.pos=j,K=B+U/2+Q<=H,J=B-U/2-Q>=0,"left"!==e.idealAlign&&K||!J)if(K)B+=U/2,e.anchor="start";else{e.anchor="middle";var ee=Q/2,te=B+ee-H,re=B-ee;te>0&&(B-=te),re<0&&(B+=-re)}else B-=U/2,e.anchor="end";e.crossPos=B}b.attr("text-anchor",e.anchor),D&&z.attr("text-anchor",e.anchor),r.attr("transform",o(B,j)+(u?s(w):""))})),{hoverLabels:Ce,commonLabelBoundingBox:Q}}function R(e,t,r,n,a,o){var s,l,c="",u="";void 0!==e.nameOverride&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=i.templateString(e.name,e.trace._meta)),c=H(e.name,e.nameLength));var h=r.charAt(0),f="x"===h?"y":"x";void 0!==e.zLabel?(void 0!==e.xLabel&&(u+="x: "+e.xLabel+"
"),void 0!==e.yLabel&&(u+="y: "+e.yLabel+"
"),"choropleth"!==e.trace.type&&"choroplethmapbox"!==e.trace.type&&"choroplethmap"!==e.trace.type&&(u+=(u?"z: ":"")+e.zLabel)):t&&e[h+"Label"]===a?u=e[f+"Label"]||"":void 0===e.xLabel?void 0!==e.yLabel&&"scattercarpet"!==e.trace.type&&(u=e.yLabel):u=void 0===e.yLabel?e.xLabel:"("+e.xLabel+", "+e.yLabel+")",(e.text||0===e.text)&&!Array.isArray(e.text)&&(u+=(u?"
":"")+e.text),void 0!==e.extraText&&(u+=(u?"
":"")+e.extraText),o&&""===u&&!e.hovertemplate&&(""===c&&o.remove(),u=c),null!=(l=null==(s=e.trace)?void 0:s.hoverlabel)&&l.split&&(e.hovertemplate="");let{hovertemplate:p=!1}=e;if(p){let t=e.hovertemplateLabels||e;e[h+"Label"]!==a&&(t[h+"other"]=t[h+"Val"],t[h+"otherLabel"]=t[h+"Label"]),u=(u=i.hovertemplateString({data:[e.eventData[0]||{},e.trace._meta],fallback:e.trace.hovertemplatefallback,labels:t,locale:n._d3locale,template:p})).replace(D,((t,r)=>(c=H(r,e.nameLength),"")))}return[u,c]}function B(e,t){var r=0,n=e.offset;return t&&(n*=-S,r=e.offset*A),{x:r,y:n}}function j(e,r,n,i){var a=function(e){return e*n},o=function(e){return e*i};e.each((function(e){var n=t.select(this);if(e.del)return n.remove();var i,s=n.select("text.nums"),l=e.anchor,u="end"===l?-1:1,f=function(e){var t={start:1,end:-1,middle:0}[e.anchor],r=t*(E+C),n=r+t*(e.txwidth+C);return"middle"===e.anchor&&(r-=e.tx2width/2,n+=e.txwidth/2+C),{alignShift:t,textShiftX:r,text2ShiftX:n}}(e),p=B(e,r),d=p.x,m=p.y,g="middle"===l,y=!("hoverlabel"in e.trace)||e.trace.hoverlabel.showarrow;i=g?"M-"+a(e.bx/2+e.tx2width/2)+","+o(m-e.by/2)+"h"+a(e.bx)+"v"+o(e.by)+"h-"+a(e.bx)+"Z":y?"M0,0L"+a(u*E+d)+","+o(E+m)+"v"+o(e.by/2-E)+"h"+a(u*e.bx)+"v-"+o(e.by)+"H"+a(u*E+d)+"V"+o(m-E)+"Z":"M"+a(u*E+d)+","+o(m-e.by/2)+"h"+a(u*e.bx)+"v"+o(e.by)+"h"+a(-u*e.bx)+"Z",n.select("path").attr("d",i);var v=d+f.textShiftX,x=m+e.ty0-e.by/2+C,_=e.textAlign||"auto";"auto"!==_&&("left"===_&&"start"!==l?(s.attr("text-anchor","start"),v=g?-e.bx/2-e.tx2width/2+C:-e.bx-C):"right"===_&&"end"!==l&&(s.attr("text-anchor","end"),v=g?e.bx/2-e.tx2width/2-C:e.bx+C)),s.call(c.positionText,a(v),o(x)),e.tx2width&&(n.select("text.name").call(c.positionText,a(f.text2ShiftX+f.alignShift*C+d),o(m+e.ty0-e.by/2+C)),n.select("rect").call(h.setRect,a(f.text2ShiftX+(f.alignShift-1)*e.tx2width/2+d),o(m-e.by/2-1),a(e.tx2width),o(e.by+2)))}))}function U(e,t){var n=e.index,a=e.trace||{},o=e.cd[0],s=e.cd[n]||{};function l(e){return e||r(e)&&0===e}var c=Array.isArray(n)?function(e,t){var r=i.castOption(o,n,e);return l(r)?r:i.extractOption({},a,"",t)}:function(e,t){return i.extractOption(s,a,e,t)};function u(t,r,n){var i=c(r,n);l(i)&&(e[t]=i)}if(u("hoverinfo","hi","hoverinfo"),u("bgcolor","hbg","hoverlabel.bgcolor"),u("borderColor","hbc","hoverlabel.bordercolor"),u("fontFamily","htf","hoverlabel.font.family"),u("fontSize","hts","hoverlabel.font.size"),u("fontColor","htc","hoverlabel.font.color"),u("fontWeight","htw","hoverlabel.font.weight"),u("fontStyle","hty","hoverlabel.font.style"),u("fontVariant","htv","hoverlabel.font.variant"),u("nameLength","hnl","hoverlabel.namelength"),u("textAlign","hta","hoverlabel.align"),e.posref="y"===t||"closest"===t&&"h"===a.orientation?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=i.constrain(e.x0,0,e.xa._length),e.x1=i.constrain(e.x1,0,e.xa._length),e.y0=i.constrain(e.y0,0,e.ya._length),e.y1=i.constrain(e.y1,0,e.ya._length),void 0!==e.xLabelVal&&(e.xLabel="xLabel"in e?e.xLabel:d.hoverLabelText(e.xa,e.xLabelVal,a.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),void 0!==e.yLabelVal&&(e.yLabel="yLabel"in e?e.yLabel:d.hoverLabelText(e.ya,e.yLabelVal,a.yhoverformat),e.yVal=e.ya.c2d(e.yLabelVal)),void 0!==e.zLabelVal&&void 0===e.zLabel&&(e.zLabel=String(e.zLabelVal)),!(isNaN(e.xerr)||"log"===e.xa.type&&e.xerr<=0)){var h=d.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;void 0!==e.xerrneg?e.xLabel+=" +"+h+" / -"+d.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" ± "+h,"x"===t&&(e.distance+=1)}if(!(isNaN(e.yerr)||"log"===e.ya.type&&e.yerr<=0)){var f=d.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;void 0!==e.yerrneg?e.yLabel+=" +"+f+" / -"+d.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" ± "+f,"y"===t&&(e.distance+=1)}var p=e.hoverinfo||e.trace.hoverinfo;return p&&"all"!==p&&(-1===(p=Array.isArray(p)?p:p.split("+")).indexOf("x")&&(e.xLabel=void 0),-1===p.indexOf("y")&&(e.yLabel=void 0),-1===p.indexOf("z")&&(e.zLabel=void 0),-1===p.indexOf("text")&&(e.text=void 0),-1===p.indexOf("name")&&(e.name=void 0)),e}function V(e,t,r){var i,a,o=r.container,s=r.fullLayout,l=s._size,c=r.event,u=!!t.hLinePoint,p=!!t.vLinePoint;if(o.selectAll(".spikeline").remove(),p||u){var m=f.combine(s.plot_bgcolor,s.paper_bgcolor);if(u){var g,y,v=t.hLinePoint;i=v&&v.xa,"cursor"===(a=v&&v.ya).spikesnap?(g=c.pointerX,y=c.pointerY):(g=i._offset+v.x,y=a._offset+v.y);var x,_,b=n.readability(v.color,m)<1.5?f.contrast(m):v.color,w=a.spikemode,T=a.spikethickness,k=a.spikecolor||b,A=d.getPxPosition(e,a);if(-1!==w.indexOf("toaxis")||-1!==w.indexOf("across")){if(-1!==w.indexOf("toaxis")&&(x=A,_=g),-1!==w.indexOf("across")){var M=a._counterDomainMin,S=a._counterDomainMax;"free"===a.anchor&&(M=Math.min(M,a.position),S=Math.max(S,a.position)),x=l.l+M*l.w,_=l.l+S*l.w}o.insert("line",":first-child").attr({x1:x,x2:_,y1:y,y2:y,"stroke-width":T,stroke:k,"stroke-dasharray":h.dashStyle(a.spikedash,T)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:x,x2:_,y1:y,y2:y,"stroke-width":T+2,stroke:m}).classed("spikeline",!0).classed("crisp",!0)}-1!==w.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:A+("right"!==a.side?T:-T),cy:y,r:T,fill:k}).classed("spikeline",!0)}if(p){var E,C,I=t.vLinePoint;i=I&&I.xa,a=I&&I.ya,"cursor"===i.spikesnap?(E=c.pointerX,C=c.pointerY):(E=i._offset+I.x,C=a._offset+I.y);var L,P,z=n.readability(I.color,m)<1.5?f.contrast(m):I.color,D=i.spikemode,O=i.spikethickness,R=i.spikecolor||z,F=d.getPxPosition(e,i);if(-1!==D.indexOf("toaxis")||-1!==D.indexOf("across")){if(-1!==D.indexOf("toaxis")&&(L=F,P=C),-1!==D.indexOf("across")){var B=i._counterDomainMin,j=i._counterDomainMax;"free"===i.anchor&&(B=Math.min(B,i.position),j=Math.max(j,i.position)),L=l.t+(1-j)*l.h,P=l.t+(1-B)*l.h}o.insert("line",":first-child").attr({x1:E,x2:E,y1:L,y2:P,"stroke-width":O,stroke:R,"stroke-dasharray":h.dashStyle(i.spikedash,O)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:E,x2:E,y1:L,y2:P,"stroke-width":O+2,stroke:m}).classed("spikeline",!0).classed("crisp",!0)}-1!==D.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:E,cy:F-("top"!==i.side?O:-O),r:O,fill:R}).classed("spikeline",!0)}}}function q(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function H(e,t){return c.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function G(e,t,r){var n=t[e+"a"],i=t[e+"Val"],a=t.cd[0];if("category"===n.type||"multicategory"===n.type)i=n._categoriesMap[i];else if("date"===n.type){var o=t.trace[e+"periodalignment"];if(o){var s=t.cd[t.index],l=s[e+"Start"];void 0===l&&(l=s[e]);var c=s[e+"End"];void 0===c&&(c=s[e]);var u=c-l;"end"===o?i+=u:"middle"===o&&(i+=u/2)}i=n.d2c(i)}return a&&a.t&&a.t.posLetter===n._id&&("group"===r.boxmode||"group"===r.violinmode)&&(i+=a.t.dPos),i}var Z=e=>e.offsetTop+e.clientTop,Y=e=>e.offsetLeft+e.clientLeft;function X(e,t){var r=e._fullLayout,n=t.getBoundingClientRect(),a=n.left,o=n.top,s=a+n.width,l=o+n.height,c=i.apply3DTransform(r._invTransform)(a,o),u=i.apply3DTransform(r._invTransform)(s,l),h=c[0],f=c[1],p=u[0],d=u[1];return{x:h,y:f,width:p-h,height:d-f,top:Math.min(f,d),left:Math.min(h,p),right:Math.max(h,p),bottom:Math.max(f,d)}}}}),Er=m({"src/components/fx/hoverlabel_defaults.js"(e,t){var r=ct(),n=W(),i=Kt().isUnifiedHover;t.exports=function(e,t,a,o){o=o||{};var s=t.legend;function l(e){o.font[e]||(o.font[e]=s?t.legend.font[e]:t.font[e])}t&&i(t.hovermode)&&(o.font||(o.font={}),l("size"),l("family"),l("color"),l("weight"),l("style"),l("variant"),s?(o.bgcolor||(o.bgcolor=n.combine(t.legend.bgcolor,t.paper_bgcolor)),o.bordercolor||(o.bordercolor=t.legend.bordercolor)):o.bgcolor||(o.bgcolor=t.paper_bgcolor)),a("hoverlabel.bgcolor",o.bgcolor),a("hoverlabel.bordercolor",o.bordercolor),a("hoverlabel.namelength",o.namelength),a("hoverlabel.showarrow",o.showarrow),r.coerceFont(a,"hoverlabel.font",o.font),a("hoverlabel.align",o.align)}}}),Cr=m({"src/components/fx/layout_global_defaults.js"(e,t){var r=ct(),n=Er(),i=U();t.exports=function(e,t){n(e,t,(function(n,a){return r.coerce(e,t,i,n,a)}))}}}),Ir=m({"src/components/fx/defaults.js"(e,t){var r=ct(),n=V(),i=Er();t.exports=function(e,t,a,o){var s=r.extendFlat({},o.hoverlabel);t.hovertemplate&&(s.namelength=-1),i(e,t,(function(i,a){return r.coerce(e,t,n,i,a)}),s)}}}),Lr=m({"src/components/fx/hovermode_defaults.js"(e,t){var r=ct(),n=U();t.exports=function(e,t){function i(i,a){return void 0!==t[i]?t[i]:r.coerce(e,t,n,i,a)}return i("clickmode"),i("hoversubplots"),i("hovermode")}}}),Pr=m({"src/components/fx/layout_defaults.js"(e,t){var r=ct(),n=U(),i=Lr(),a=Er();t.exports=function(e,t){function o(i,a){return r.coerce(e,t,n,i,a)}i(e,t)&&(o("hoverdistance"),o("spikedistance")),"select"===o("dragmode")&&o("selectdirection");var s=t._has("mapbox"),l=t._has("map"),c=t._has("geo"),u=t._basePlotModules.length;"zoom"===t.dragmode&&((s||l||c)&&1===u||(s||l)&&c&&2===u)&&(t.dragmode="pan"),a(e,t,o),r.coerceFont(o,"hoverlabel.grouptitlefont",t.hoverlabel.font)}}}),zr=m({"src/components/fx/calc.js"(e,t){var r=ct(),n=He();function i(e,t,n,i){i=i||r.identity,Array.isArray(e)&&(t[0][n]=i(e))}t.exports=function(e){var t=e.calcdata,a=e._fullLayout;function o(e){return function(t){return r.coerceHoverinfo({hoverinfo:t},{_module:e._module},a)}}for(var s=0;s"," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}}}),jr=m({"src/components/shapes/draw_newshape/constants.js"(e,t){t.exports={CIRCLE_SIDES:32,i000:0,i090:8,i180:16,i270:24,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}}),Nr=m({"src/components/selections/helpers.js"(e,t){var r=ct().strTranslate;function n(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}t.exports={p2r:n,r2p:function(e,t){switch(e.type){case"log":return e.d2p(t);case"date":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}},axValue:function(e){var t="y"===e._id.charAt(0)?1:0;return function(r){return n(e,r[t])}},getTransform:function(e){return r(e.xaxis._offset,e.yaxis._offset)}}}}),Ur=m({"src/components/shapes/draw_newshape/helpers.js"(e){var t=Jt(),r=jr(),n=r.CIRCLE_SIDES,i=r.SQRT2,a=Nr(),o=a.p2r,s=a.r2p,l=[0,3,4,5,6,1,2],c=[0,3,4,1,2];function u(e,t){return Math.abs(e-t)<=1e-6}function h(e,t){var r=t[1]-e[1],n=t[2]-e[2];return Math.sqrt(r*r+n*n)}e.writePaths=function(e){var t=e.length;if(!t)return"M0,0Z";for(var r="",n=0;n0&&u{let r=t.charAt(0);return e+(void 0!==a[r].drawn?1:0)}),0)},e.getDataToPixel=function(t,r,n,a,o){var s,l=t._fullLayout._size;if(r)if("domain"===o)s=function(e){return r._length*(a?1-e:e)+r._offset};else{var c=e.shapePositionToRange(r);s=function(e){var t=i(r,n);return r._offset+r.r2p(c(e,!0))+t},"date"===r.type&&(s=e.decodeDate(s))}else s=a?function(e){return l.t+l.h*(1-e)}:function(e){return l.l+l.w*e};return s},e.getPixelToData=function(t,r,n,i){var a,o=t._fullLayout._size;if(r)if("domain"===i)a=function(e){var t=(e-r._offset)/r._length;return n?1-t:t};else{var s=e.rangeToShapePosition(r);a=function(e){return s(r.p2r(e-r._offset))}}else a=n?function(e){return 1-(e-o.t)/o.h}:function(e){return(e-o.l)/o.w};return a},e.roundPositionForSharpStrokeRendering=function(e,t){var r=1===Math.round(t%2),n=Math.round(e);return r?n+.5:n},e.makeShapesOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.shapes[t]||{},n=e._fullLayout._plots[r.xref+r.yref];return n?n._hadPlotinfo=!0:(n={},r.xref&&"paper"!==r.xref&&(n.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&"paper"!==r.yref&&(n.yaxis=e._fullLayout[r.yref+"axis"])),n.xsizemode=r.xsizemode,n.ysizemode=r.ysizemode,n.xanchor=r.xanchor,n.yanchor=r.yanchor,{options:r,plotinfo:n}},e.makeSelectionsOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.selections[t]||{},n=e._fullLayout._plots[r.xref+r.yref];return n?n._hadPlotinfo=!0:(n={},r.xref&&(n.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&(n.yaxis=e._fullLayout[r.yref+"axis"])),{options:r,plotinfo:n}},e.getPathString=function(a,o){let s=o.type,l=n.getRefType(o.xref),c=n.getRefType(o.yref),u=a._fullLayout._size;var h,f,p,d,m,g,y,v,x,_,b,w;function T(t,r,n,i){var a;if(t)if("domain"===r)a=i?function(e){return t._offset+t._length*(1-e)}:function(e){return t._offset+t._length*e};else{let r=e.shapePositionToRange(t);a=function(e){return t._offset+t.r2p(r(e,!0))},"path"===n&&"date"===t.type&&(a=e.decodeDate(a))}else a=i?function(e){return u.t+u.h*(1-e)}:function(e){return u.l+u.w*e};return a}if("array"===l?(y=[],h=o.xref.map((function(e){return n.getFromId(a,e)})),y=o.xref.map((function(e,t){return T(h[t],n.getRefType(e),s,!1)}))):y=T(h=n.getFromId(a,o.xref),l,s,!1),"array"===c?(v=[],f=o.yref.map((function(e){return n.getFromId(a,e)})),v=o.yref.map((function(e,t){return T(f[t],n.getRefType(e),s,!0)}))):v=T(f=n.getFromId(a,o.yref),c,s,!0),"path"===s)return function(e,n,i){let a=e.path,o=e.xsizemode,s=e.ysizemode,l=e.xanchor,c=e.yanchor,u=Array.isArray(e.xref),h=Array.isArray(e.yref);var f=0,p=0;return a.replace(t.segmentRE,(function(e){var a=0,d=e.charAt(0),m=t.paramIsX[d],g=t.paramIsY[d],y=t.numParams[d];let v=void 0!==m.drawn,x=void 0!==g.drawn,_=u?n[f]:n,b=h?i[p]:i;var w=e.slice(1).replace(t.paramRE,(function(e){return m[a]?e="pixel"===o?_(l)+Number(e):_(e):g[a]&&(e="pixel"===s?b(c)-Number(e):b(e)),++a>y&&(e="X"),e}));return a>y&&(w=w.replace(/[\s,]*X.*/,""),r.log("Ignoring extra params in segment "+e)),v&&f++,x&&p++,d+w}))}(o,y,v);if("array"===l)p=i(h[0],o.x0shift),d=i(h[1],o.x1shift),x=y[0](o.x0)+p,_=y[1](o.x1)+d;else if(p=i(h,o.x0shift),d=i(h,o.x1shift),"pixel"===o.xsizemode){let e=y(o.xanchor);x=e+o.x0+p,_=e+o.x1+d}else x=y(o.x0)+p,_=y(o.x1)+d;if("array"===c)m=i(f[0],o.y0shift),g=i(f[1],o.y1shift),b=v[0](o.y0)+m,w=v[1](o.y1)+g;else if(m=i(f,o.y0shift),g=i(f,o.y1shift),"pixel"===o.ysizemode){let e=v(o.yanchor);b=e-o.y0+m,w=e-o.y1+g}else b=v(o.y0)+m,w=v(o.y1)+g;if("line"===s)return"M"+x+","+b+"L"+_+","+w;if("rect"===s)return"M"+x+","+b+"H"+_+"V"+w+"H"+x+"Z";var k=(x+_)/2,A=(b+w)/2,M=Math.abs(k-x),S=Math.abs(A-b),E="A"+M+","+S,C=k+M+","+A;return"M"+C+E+" 0 1,1 "+k+","+(A-S)+E+" 0 0,1 "+C+"Z"}}}),Wr=m({"src/components/shapes/display_labels.js"(e,t){var r=ct(),n=ar(),i=Et(),a=er(),o=Ur().readPaths,s=Gr(),l=s.getPathString,c=Be(),u=St().FROM_TL;t.exports=function(e,t,h,f){if(f.selectAll(".shape-label").remove(),h.label.text||h.label.texttemplate){var p;if(h.label.texttemplate){var d={};if("path"!==h.type){var m=n.getFromId(e,h.xref),g=n.getFromId(e,h.yref);let t=Array.isArray(h.xref),r=Array.isArray(h.yref);for(var y in c){var v="function"==typeof c[y],x=!t||c.simpleXVariables.includes(y),_=!r||c.simpleYVariables.includes(y);if(v&&x&&_){var b=c[y](h,m,g);void 0!==b&&(d[y]=b)}}}p=r.texttemplateStringForShapes({data:[d],fallback:h.label.texttemplatefallback,locale:e._fullLayout._d3locale,template:h.label.texttemplate})}else p=h.label.text;var w,T,k,A,M={"data-index":t},S=h.label.font,E=f.append("g").attr(M).classed("shape-label",!0).append("text").attr({"data-notex":1}).classed("shape-label-text",!0).text(p);if(h.path){var C=l(e,h),I=o(C,e);w=1/0,k=1/0,T=-1/0,A=-1/0;for(var L=0;L=e?t-n:n-t,-180/Math.PI*Math.atan2(i,a)}(w,k,T,A):0),E.call((function(t){return t.call(a.font,S).attr({}),i.convertToTspans(t,e),t}));var B=function(e,t,r,n,i,a,o){var s,l,c,h,f=i.label.textposition,p=i.label.textangle,d=i.label.padding,m=i.type,g=Math.PI/180*a,y=Math.sin(g),v=Math.cos(g),x=i.label.xanchor,_=i.label.yanchor;if("line"===m){"start"===f?(s=e,l=t):"end"===f?(s=r,l=n):(s=(e+r)/2,l=(t+n)/2),"auto"===x&&(x="start"===f?"auto"===p?r>e?"left":re?"right":re?"right":re?"left":r1&&(2!==e.length||"Z"!==e[1][0])&&(0===I&&(e[0][0]="M"),t[C]=e,A(),M())}}()}}function V(e,r){(function(e,r){if(t.length)for(var n=0;nb?(M=v,I="y0",S=b,L="y1"):(M=b,I="y1",S=v,L="y0"),re(r),ae(c,o),function(e,t,r){var n=t.xref,i=t.yref,o=a.getFromId(r,n),s=a.getFromId(r,i),l="";"paper"!==n&&!o.autorange&&(l+=n),"paper"!==i&&!s.autorange&&(l+=i),h.setClipUrl(e,l?"clip"+r._fullLayout._uid+l:null,r)}(t,o,e),te.moveFn="move"===O?ne:ie,te.altKey=r.altKey)},doneFn:function(){x(e)||(d(t),oe(c),T(t,e,o),n.call("_guiRelayout",e,u.getUpdateObj()))},clickFn:function(){x(e)||oe(c)}};function re(r){if(x(e))O=null;else if(B)O="path"===r.target.tagName?"move":"start-point"===r.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var n=te.element.getBoundingClientRect(),i=n.right-n.left,a=n.bottom-n.top,o=r.clientX-n.left,s=r.clientY-n.top,l=!j&&i>10&&a>10&&!r.shiftKey?p.getCursor(o/i,1-s/a):"move";d(t,l),O=l.split("-")[0]}}function ne(r,n){if("path"===o.type){var i=function(e){return e},a=i,u=i;R?N("xanchor",o.xanchor=J(w+r)):(a=function(e){return J($(e)+r)},V&&"date"===V.type&&(a=g.encodeDate(a))),F?N("yanchor",o.yanchor=Q(A+n)):(u=function(e){return Q(K(e)+n)},H&&"date"===H.type&&(u=g.encodeDate(u))),N("path",o.path=k(D,a,u))}else R?N("xanchor",o.xanchor=J(w+r)):(N("x0",o.x0=J(f+r)),N("x1",o.x1=J(_+r))),F?N("yanchor",o.yanchor=Q(A+n)):(N("y0",o.y0=Q(v+n)),N("y1",o.y1=Q(b+n)));t.attr("d",y(e,o)),ae(c,o),l(e,s,o,U)}function ie(r,n){if(j){var i=function(e){return e},a=i,u=i;R?N("xanchor",o.xanchor=J(w+r)):(a=function(e){return J($(e)+r)},V&&"date"===V.type&&(a=g.encodeDate(a))),F?N("yanchor",o.yanchor=Q(A+n)):(u=function(e){return Q(K(e)+n)},H&&"date"===H.type&&(u=g.encodeDate(u))),N("path",o.path=k(D,a,u))}else if(B){if("resize-over-start-point"===O){var h=f+r,p=F?v-n:v+n;N("x0",o.x0=R?h:J(h)),N("y0",o.y0=F?p:Q(p))}else if("resize-over-end-point"===O){var d=_+r,m=F?b-n:b+n;N("x1",o.x1=R?d:J(d)),N("y1",o.y1=F?m:Q(m))}}else{var x=function(e){return-1!==O.indexOf(e)},T=x("n"),q=x("s"),G=x("w"),W=x("e"),Z=T?M+n:M,Y=q?S+n:S,X=G?E+r:E,ee=W?C+r:C;F&&(T&&(Z=M-n),q&&(Y=S-n)),(!F&&Y-Z>10||F&&Z-Y>10)&&(N(I,o[I]=F?Z:Q(Z)),N(L,o[L]=F?Y:Q(Y))),ee-X>10&&(N(P,o[P]=R?X:J(X)),N(z,o[z]=R?ee:J(ee)))}t.attr("d",y(e,o)),ae(c,o),l(e,s,o,U)}function ae(e,t){(R||F)&&function(){var r="path"!==t.type,n=e.selectAll(".visual-cue").data([0]);n.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var a=$(R?t.xanchor:i.midRange(r?[t.x0,t.x1]:g.extractPathCoords(t.path,m.paramIsX))),o=K(F?t.yanchor:i.midRange(r?[t.y0,t.y1]:g.extractPathCoords(t.path,m.paramIsY)));if(a=g.roundPositionForSharpStrokeRendering(a,1),o=g.roundPositionForSharpStrokeRendering(o,1),R&&F){var s="M"+(a-1-1)+","+(o-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";n.attr("d",s)}else if(R){var l="M"+(a-1-1)+","+(o-9-1)+"v18 h2 v-18 Z";n.attr("d",l)}else{var c="M"+(a-9-1)+","+(o-1-1)+"h18 v2 h-18 Z";n.attr("d",c)}}()}function oe(e){e.selectAll(".visual-cue").remove()}p.init(te),ee.node().onmousemove=re}(e,F,b,t,c,O):!0===b.editable&&F.style("pointer-events",z||u.opacity(C)*E<=.5?"stroke":"all");F.node().addEventListener("click",(function(){return function(e,t){if(_(e)){var r=+t.node().getAttribute("data-index");if(r>=0){if(r===e._fullLayout._activeShapeIndex)return void A(e);e._fullLayout._activeShapeIndex=r,e._fullLayout._deactivateShape=A,v(e)}}}(e,F)}))}"above"===b.layer?S(e._fullLayout._shapeUpperLayer):b.xref.includes("paper")||b.yref.includes("paper")?S(e._fullLayout._shapeLowerLayer):"between"!==b.layer||M?w._hadPlotinfo?S((w.mainplotinfo||w).shapelayer):S(e._fullLayout._shapeLowerLayer):S(w.shapelayerBetween)}function T(e,t,r){let n=r.xref,o=r.yref;if(Array.isArray(n)||Array.isArray(o)){let s="clip"+t._fullLayout._uid+"shape"+r._index,l=function(e,t,r){let n=e._fullLayout._size;function i(t,r){let i=(Array.isArray(t)?t:[t]).map((t=>a.getFromId(e,t))).filter(Boolean);if(!i.length)return r?[n.t,n.t+n.h]:[n.l,n.l+n.w];let o=i.map((function(e){return e._offset})),s=i.map((function(e){return e._offset+e._length}));return[Math.min(...o),Math.max(...s)]}let o=i(t,!1),s=i(r,!0);return{x:o[0],y:s[0],width:o[1]-o[0],height:s[1]-s[0]}}(t,n,o);i.ensureSingleById(t._fullLayout._clips,"clipPath",s,(function(e){e.append("rect")})).select("rect").attr(l),h.setClipUrl(e,s,t)}else{let r=(n+o).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");h.setClipUrl(e,r?"clip"+t._fullLayout._uid+r:null,t)}}function k(e,t,r){return e.replace(m.segmentRE,(function(e){var n=0,i=e.charAt(0),a=m.paramIsX[i],o=m.paramIsY[i],s=m.numParams[i];return i+e.slice(1).replace(m.paramRE,(function(e){return n>=s||(a[n]?e=t(e):o[n]&&(e=r(e)),n++),e}))}))}function A(e){_(e)&&e._fullLayout._activeShapeIndex>=0&&(c(e),delete e._fullLayout._activeShapeIndex,v(e))}t.exports={draw:v,drawOne:w,eraseActiveShape:function(e){if(_(e)){c(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t1?(P=["toggleHover"],z=["resetViews"]):y?(L=["zoomInGeo","zoomOutGeo"],P=["hoverClosestGeo"],z=["resetGeo"]):g?(P=["hoverClosest3d"],z=["resetCameraDefault3d","resetCameraLastSave3d"]):b?(L=["zoomInMapbox","zoomOutMapbox"],P=["toggleHover"],z=["resetViewMapbox"]):w?(L=["zoomInMap","zoomOutMap"],P=["toggleHover"],z=["resetViewMap"]):v?P=["hoverClosestPie"]:A?(P=["hoverClosestCartesian","hoverCompareCartesian"],z=["resetViewSankey"]):P=["toggleHover"],m&&P.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(function(e){for(var t=0;tn?i.slice(n):a.slice(r))+o:i+a+e*t:o}function d(e,t){for(var r=t._size,n=r.h/r.w,i={},a=Object.keys(e),o=0;os*x)||T)for(i=0;iz&&FL&&(L=F);f/=(L-I)/(2*P),I=c.l2r(I),L=c.l2r(L),c.range=c._input.range=S=e[1]||i[1]<=e[0])&&a[0]t[0])return!0}return!1}function _(r){var a,o,c,p,d,m,g=r._fullLayout,y=g._size,_=y.p,b=h.list(r,"",!0);if(g._paperdiv.style({width:r._context.responsive&&g.autosize&&!r._context._hasZeroWidth&&!r.layout.width?"100%":g.width+"px",height:r._context.responsive&&g.autosize&&!r._context._hasZeroHeight&&!r.layout.height?"100%":g.height+"px"}).selectAll(".main-svg").call(l.setSize,g.width,g.height),r._context.setBackground(r,g.paper_bgcolor),e.drawMainTitle(r),u.manage(r),!g._has("cartesian"))return n.previousPromises(r);function T(e,t,r){var n=e._lw/2;return"x"===e._id.charAt(0)?t?"top"===r?t._offset-_-n:t._offset+t._length+_+n:y.t+y.h*(1-(e.position||0))+n%1:t?"right"===r?t._offset+t._length+_+n:t._offset-_-n:y.l+y.w*(e.position||0)+n%1}for(a=0;a.5?"t":"b",o=e._fullLayout.margin[a],s=0;return"paper"===t.yref?s=r+t.pad.t+t.pad.b:"container"===t.yref&&(s=function(e,t,r,n,i){var a=0;return"middle"===r&&(a+=i/2),"t"===e?("top"===r&&(a+=i),a+=n-t*n):("bottom"===r&&(a+=i),a+=t*n),a}(a,n,i,e._fullLayout.height,r)+t.pad.t+t.pad.b),s>o?s:0}(e,r,m);if(g>0){(function(e,t,r,a){var o="title.automargin",s=e._fullLayout.title,l=s.y>.5?"t":"b",c={x:s.x,y:s.y,t:0,b:0},u={};"paper"===s.yref&&function(e,t,r,n,a){var o="paper"===t.yref?e._fullLayout._size.h:e._fullLayout.height,s=i.isTopAnchor(t)?n:n-a,l="b"===r?o-s:s;return!(i.isTopAnchor(t)&&"t"===r||i.isBottomAnchor(t)&&"b"===r)&&l=0;k--){var A=i.append("path").attr(g).style("opacity",k?.1:y).call(a.stroke,x).call(a.fill,v).call(o.dashLine,k?"solid":b,k?4+_:_);if(p(A,e,f),w){var M=s(e.layout,"selections",f);A.style({cursor:"move"});var S={element:A.node(),plotinfo:m,gd:e,editHelpers:M,isActiveSelection:!0},E=r(l,e);n(E,A,S)}else A.style("pointer-events",k?"all":"none");T[k]=A}var C=T[0];T[1].node().addEventListener("click",(function(){return function(e,t){if(h(e)){var r=+t.node().getAttribute("data-index");if(r>=0){if(r===e._fullLayout._activeSelectionIndex)return void d(e);e._fullLayout._activeSelectionIndex=r,e._fullLayout._deactivateSelection=d,u(e)}}}(e,C)}))}(e._fullLayout._selectionLayer)}function p(e,t,r){var n=r.xref+r.yref;o.setClipUrl(e,"clip"+t._fullLayout._uid+n,t)}function d(e){h(e)&&e._fullLayout._activeSelectionIndex>=0&&(i(e),delete e._fullLayout._activeSelectionIndex,u(e))}t.exports={draw:u,drawOne:f,activateLastSelection:function(e){if(h(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=d,u(e)}}}}}),sn=m({"node_modules/polybooljs/lib/build-log.js"(e,t){t.exports=function(){var e,t=0,r=!1;function n(t,r){return e.list.push({type:t,data:r?JSON.parse(JSON.stringify(r)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(e,t){return n("check",{seg1:e,seg2:t})},segmentChop:function(e,t){return n("div_seg",{seg:e,pt:t}),n("chop",{seg:e,pt:t})},statusRemove:function(e){return n("pop_seg",{seg:e})},segmentUpdate:function(e){return n("seg_update",{seg:e})},segmentNew:function(e,t){return n("new_seg",{seg:e,primary:t})},segmentRemove:function(e){return n("rem_seg",{seg:e})},tempStatus:function(e,t,r){return n("temp_status",{seg:e,above:t,below:r})},rewind:function(e){return n("rewind",{seg:e})},status:function(e,t,r){return n("status",{seg:e,above:t,below:r})},vert:function(t){return t===r?e:(r=t,n("vert",{x:t}))},log:function(e){return"string"!=typeof e&&(e=JSON.stringify(e,!1," ")),n("log",{txt:e})},reset:function(){return n("reset")},selected:function(e){return n("selected",{segs:e})},chainStart:function(e){return n("chain_start",{seg:e})},chainRemoveHead:function(e,t){return n("chain_rem_head",{index:e,pt:t})},chainRemoveTail:function(e,t){return n("chain_rem_tail",{index:e,pt:t})},chainNew:function(e,t){return n("chain_new",{pt1:e,pt2:t})},chainMatch:function(e){return n("chain_match",{index:e})},chainClose:function(e){return n("chain_close",{index:e})},chainAddHead:function(e,t){return n("chain_add_head",{index:e,pt:t})},chainAddTail:function(e,t){return n("chain_add_tail",{index:e,pt:t})},chainConnect:function(e,t){return n("chain_con",{index1:e,index2:t})},chainReverse:function(e){return n("chain_rev",{index:e})},chainJoin:function(e,t){return n("chain_join",{index1:e,index2:t})},done:function(){return n("done")}}}}}),ln=m({"node_modules/polybooljs/lib/epsilon.js"(e,t){t.exports=function(e){"number"!=typeof e&&(e=1e-10);var t={epsilon:function(t){return"number"==typeof t&&(e=t),e},pointAboveOrOnLine:function(t,r,n){var i=r[0],a=r[1],o=n[0],s=n[1],l=t[0];return(o-i)*(t[1]-a)-(s-a)*(l-i)>=-e},pointBetween:function(t,r,n){var i=t[1]-r[1],a=n[0]-r[0],o=t[0]-r[0],s=n[1]-r[1],l=o*a+i*s;return!(l-e)},pointsSameX:function(t,r){return Math.abs(t[0]-r[0])e!=o-i>e&&(a-c)*(i-u)/(o-u)+c-n>e&&(s=!s),a=c,o=u}return s}};return t}}}),cn=m({"node_modules/polybooljs/lib/linked-list.js"(e,t){t.exports={create:function(){var e={root:{root:!0,next:null},exists:function(t){return!(null===t||t===e.root)},isEmpty:function(){return null===e.root.next},getHead:function(){return e.root.next},insertBefore:function(t,r){for(var n=e.root,i=e.root.next;null!==i;){if(r(i))return t.prev=i.prev,t.next=i,i.prev.next=t,void(i.prev=t);n=i,i=i.next}n.next=t,t.prev=n,t.next=null},findTransition:function(t){for(var r=e.root,n=e.root.next;null!==n&&!t(n);)r=n,n=n.next;return{before:r===e.root?null:r,after:n,insert:function(e){return e.prev=r,e.next=n,r.next=e,null!==n&&(n.prev=e),e}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}}}}),un=m({"node_modules/polybooljs/lib/intersecter.js"(e,t){var r=cn();t.exports=function(e,t,n){function i(e,t){return{id:n?n.segmentId():-1,start:e,end:t,myFill:{above:null,below:null},otherFill:null}}function a(e,t,r){return{id:n?n.segmentId():-1,start:e,end:t,myFill:{above:r.myFill.above,below:r.myFill.below},otherFill:null}}var o=r.create();function s(e,r){o.insertBefore(e,(function(n){var i=function(e,r,n,i,a,o){var s=t.pointsCompare(r,a);return 0!==s?s:t.pointsSame(n,o)?0:e!==i?e?1:-1:t.pointAboveOrOnLine(n,i?a:o,i?o:a)?1:-1}(e.isStart,e.pt,r,n.isStart,n.pt,n.other.pt);return i<0}))}function l(e,t){var n=function(e,t){var n=r.node({isStart:!0,pt:e.start,seg:e,primary:t,other:null,status:null});return s(n,e.end),n}(e,t);return function(e,t,n){var i=r.node({isStart:!1,pt:t.end,seg:t,primary:n,other:e,status:null});e.other=i,s(i,e.pt)}(n,e,t),n}function c(e,t){var r=a(t,e.seg.end,e.seg);return function(e,t){n&&n.segmentChop(e.seg,t),e.other.remove(),e.seg.end=t,e.other.pt=t,s(e.other,e.pt)}(e,t),l(r,e.primary)}function u(i,a){var s=r.create();function l(e){return s.findTransition((function(r){var n=function(e,r){var n=e.seg.start,i=e.seg.end,a=r.seg.start,o=r.seg.end;return t.pointsCollinear(n,a,o)?t.pointsCollinear(i,a,o)||t.pointAboveOrOnLine(i,a,o)?1:-1:t.pointAboveOrOnLine(n,a,o)?1:-1}(e,r.ev);return n>0}))}function u(e,r){var i=e.seg,a=r.seg,o=i.start,s=i.end,l=a.start,u=a.end;n&&n.checkIntersection(i,a);var h=t.linesIntersect(o,s,l,u);if(!1===h){if(!t.pointsCollinear(o,s,l)||t.pointsSame(o,u)||t.pointsSame(s,l))return!1;var f=t.pointsSame(o,l),p=t.pointsSame(s,u);if(f&&p)return r;var d=!f&&t.pointBetween(o,l,u),m=!p&&t.pointBetween(s,l,u);if(f)return m?c(r,s):c(e,u),r;d&&(p||(m?c(r,s):c(e,u)),c(r,o))}else 0===h.alongA&&(-1===h.alongB?c(e,l):0===h.alongB?c(e,h.pt):1===h.alongB&&c(e,u)),0===h.alongB&&(-1===h.alongA?c(r,o):0===h.alongA?c(r,h.pt):1===h.alongA&&c(r,s));return!1}for(var h=[];!o.isEmpty();){var f=o.getHead();if(n&&n.vert(f.pt[0]),f.isStart){let t=function(){if(d){var e=u(f,d);if(e)return e}return!!m&&u(f,m)};n&&n.segmentNew(f.seg,f.primary);var p=l(f),d=p.before?p.before.ev:null,m=p.after?p.after.ev:null;n&&n.tempStatus(f.seg,!!d&&d.seg,!!m&&m.seg);var g,y=t();if(y&&(e?(g=null===f.seg.myFill.below||f.seg.myFill.above!==f.seg.myFill.below)&&(y.seg.myFill.above=!y.seg.myFill.above):y.seg.otherFill=f.seg.myFill,n&&n.segmentUpdate(y.seg),f.other.remove(),f.remove()),o.getHead()!==f){n&&n.rewind(f.seg);continue}if(e)g=null===f.seg.myFill.below||f.seg.myFill.above!==f.seg.myFill.below,f.seg.myFill.below=m?m.seg.myFill.above:i,f.seg.myFill.above=g?!f.seg.myFill.below:f.seg.myFill.below;else if(null===f.seg.otherFill){var v;v=m?f.primary===m.primary?m.seg.otherFill.above:m.seg.myFill.above:f.primary?a:i,f.seg.otherFill={above:v,below:v}}n&&n.status(f.seg,!!d&&d.seg,!!m&&m.seg),f.other.status=p.insert(r.node({ev:f}))}else{var x=f.status;if(null===x)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(s.exists(x.prev)&&s.exists(x.next)&&u(x.prev.ev,x.next.ev),n&&n.statusRemove(x.ev.seg),x.remove(),!f.primary){var _=f.seg.myFill;f.seg.myFill=f.seg.otherFill,f.seg.otherFill=_}h.push(f.seg)}o.getHead().remove()}return n&&n.done(),h}return e?{addRegion:function(e){for(var r,n=e[e.length-1],a=0;aa!=p>a&&i<(f-u)*(a-h)/(p-h)+u&&(o=!o)}return o}}}),gn=m({"src/lib/polygon.js"(e,t){var r=Le().dot,n=S().BADNUM,i=t.exports={};i.tester=function(e){var t,r=e.slice(),i=r[0][0],a=i,o=r[0][1],s=o;for((r[r.length-1][0]!==r[0][0]||r[r.length-1][1]!==r[0][1])&&r.push(r[0]),t=1;ta||c===n||cs||t&&l(e))}:function(e,t){var l=e[0],c=e[1];if(l===n||la||c===n||cs)return!1;var u,h,f,p,d,m=r.length,g=r[0][0],y=r[0][1],v=0;for(u=1;uMath.max(h,g)||c>Math.max(f,y)))if(cu||Math.abs(r(o,f))>i)return!0;return!1},i.filter=function(e,t){var r=[e[0]],n=0,a=0;function o(o){e.push(o);var s=r.length,l=n;r.splice(a+1);for(var c=l+1;c1&&o(e.pop()),{addPt:o,raw:e,filtered:r}}}}),yn=m({"src/components/selections/constants.js"(e,t){t.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}}),vn=m({"src/components/selections/select.js"(e,t){var r=dn(),n=mn(),i=He(),a=er().dashStyle,o=W(),s=Or(),l=Kt().makeEventData,c=Rr(),u=c.freeMode,h=c.rectMode,f=c.drawMode,p=c.openMode,d=c.selectMode,m=Gr(),g=Hr(),y=Zr(),v=bt().clearOutline,x=Ur(),_=x.handleEllipse,b=x.readPaths,w=Vr().newShapes,T=qr(),k=on().activateLastSelection,A=ct(),M=A.sorterAsc,S=gn(),E=Qe(),C=_t().getFromId,I=Fr(),L=an().redrawReglTraces,P=yn(),z=P.MINSELECT,D=S.filter,O=S.tester,R=Nr(),F=R.p2r,B=R.axValue,j=R.getTransform;function N(e){return void 0!==e.subplot}function U(e,t,r,n,i,a,o){var s,l,c,u,h,f,d,m,g,v=t._hoverdata,x=t._fullLayout.clickmode.indexOf("event")>-1,_=[];if(function(e){return e&&Array.isArray(e)&&!0!==e[0].hoverOnBox}(v)){G(e,t,a);var b=function(e,t){var r,n,i=e[0],a=-1,o=[];for(n=0;n0?function(e,t){var r,n,i,a=[];for(i=0;i0&&a.push(r);if(1===a.length&&a[0]===t.searchInfo&&(n=t.searchInfo.cd[0].trace).selectedpoints.length===t.pointNumbers.length){for(i=0;i1||(n+=t.selectedpoints.length)>1))return!1;return 1===n}(s)&&(f=K(b))){for(o&&o.remove(),g=0;g=0})(a)&&a._fullLayout._deactivateShape(a),function(e){return e._fullLayout._activeSelectionIndex>=0}(a)&&a._fullLayout._deactivateSelection(a);var o=a._fullLayout._zoomlayer,s=f(r),l=d(r);if(s||l){var c,u,h=o.selectAll(".select-outline-"+n.id);h&&a._fullLayout._outlining&&(s&&(c=w(h,e)),c&&i.call("_guiRelayout",a,{shapes:c}),l&&!N(e)&&(u=T(h,e)),u&&(a._fullLayout._noEmitSelectedAtStart=!0,i.call("_guiRelayout",a,{selections:u}).then((function(){t&&k(a)}))),a._fullLayout._outlining=!1)}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function Y(e){return e._id}function X(e,t,r,n){if(!e.calcdata)return[];var i,a,o,s=[],l=t.map(Y),c=r.map(Y);for(o=0;o0?n[0]:r;return!!t.selectedpoints&&t.selectedpoints.indexOf(i)>-1}function J(e,t,r){var n,a;for(n=0;n-1&&t;if(!a&&t){var te=oe(e,!0);if(te.length){var ne=te[0].xref,pe=te[0].yref;if(ne&&pe){var de=ce(te);ue([C(e,ne,"x"),C(e,pe,"y")])(Q,de)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:ee&&he(e,Q),p._reselect=!1}if(!a&&p._deselect){var me=p._deselect;(function(e,t,r){for(var n=0;n=0)k._fullLayout._deactivateShape(k);else if(!x){var r=M.clickmode;E.done(Me).then((function(){if(E.clear(Me),2===e){for(_e.remove(),K=0;K-1&&U(t,k,n.xaxes,n.yaxes,n.subplot,n,_e),"event"===r&&he(k,void 0);s.click(k,t,L.id)})).catch(A.error)}},n.doneFn=function(){ke.remove(),E.done(Me).then((function(){E.clear(Me),!S&&$&&n.selectionDefs&&($.subtract=xe,n.selectionDefs.push($),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,Y)),(S||x)&&Z(n,S),n.doneFnCompleted&&n.doneFnCompleted(Se),b&&he(k,ae)})).catch(A.error)}},clearOutline:v,clearSelectionsCache:Z,selectOnClick:U}}}),xn=m({"src/components/annotations/arrow_paths.js"(e,t){t.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]}}),_n=m({"src/constants/axis_placeable_objects.js"(e,t){t.exports={axisRefDescription:function(e,t,r){return["If set to a",e,"axis id (e.g. *"+e+"* or","*"+e+"2*), the `"+e+"` position refers to a",e,"coordinate. If set to *paper*, the `"+e+"`","position refers to the distance from the",t,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",t,"("+r+"). If set to a",e,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",t,"of the domain of that axis: e.g.,","*"+e+"2 domain* refers to the domain of the second",e," axis and a",e,"position of 0.5 refers to the","point between the",t,"and the",r,"of the domain of the","second",e,"axis."].join(" ")}}}}),bn=m({"src/components/annotations/attributes.js"(e,t){var r=xn(),n=j(),i=xt(),a=vt().templatedArray;_n(),t.exports=a("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:n({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:r.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:r.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",i.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",i.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:n({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})}}),wn=m({"src/traces/scatter/constants.js"(e,t){t.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}}}),Tn=m({"src/traces/scatter/fillcolor_attribute.js"(e,t){t.exports=function(e){return{valType:"color",editType:"style",anim:!0}}}}),kn=m({"src/traces/scatter/attributes.js"(e,t){var r=It().axisHoverFormat,{hovertemplateAttrs:n,texttemplateAttrs:i,templatefallbackAttrs:a}=Fe(),o=zt(),s=j(),l=Oe().dash,c=Oe().pattern,u=er(),h=wn(),f=B().extendFlat,p=Tn();t.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dx:{valType:"number",dflt:1,editType:"calc",anim:!0},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dy:{valType:"number",dflt:1,editType:"calc",anim:!0},xperiod:{valType:"any",dflt:0,editType:"calc"},yperiod:{valType:"any",dflt:0,editType:"calc"},xperiod0:{valType:"any",editType:"calc"},yperiod0:{valType:"any",editType:"calc"},xperiodalignment:{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"},yperiodalignment:{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"},xhoverformat:r("x"),yhoverformat:r("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc"},alignmentgroup:{valType:"string",dflt:"",editType:"calc"},stackgroup:{valType:"string",dflt:"",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc"},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},texttemplate:i(),texttemplatefallback:a({editType:"calc"}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc"},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style"},hovertemplate:n({},{keys:h.eventDataKeys}),hovertemplatefallback:a(),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:f({},l,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot"},simplify:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot"},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc"},fillcolor:p(!0),fillgradient:f({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc"},start:{valType:"number",editType:"calc"},stop:{valType:"number",editType:"calc"},colorscale:{valType:"colorscale",editType:"style"},editType:"calc"}),fillpattern:c,marker:f({symbol:{valType:"enumerated",values:u.symbolList,dflt:"circle",arrayOk:!0,editType:"style"},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot"},sizeref:{valType:"number",dflt:1,editType:"calc"},sizemin:{valType:"number",min:0,dflt:0,editType:"calc"},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc"},line:f({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},dash:f({},l,{arrayOk:!0}),editType:"calc"},o("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc"},color:{valType:"color",arrayOk:!0,editType:"calc"},editType:"calc"},editType:"calc"},o("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc"},textfont:s({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}}}),An=m({"src/components/selections/attributes.js"(e,t){var r=bn(),n=kn().line,i=Oe().dash,a=B().extendFlat,o=De().overrideAll,s=vt().templatedArray;_n(),t.exports=o(s("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:a({},r.xref,{}),yref:a({},r.yref,{}),x0:{valType:"any"},x1:{valType:"any"},y0:{valType:"any"},y1:{valType:"any"},path:{valType:"string",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw"},line:{color:n.color,width:a({},n.width,{min:1,dflt:1}),dash:a({},i,{dflt:"dot"})}}),"arraydraw","from-root")}}),Mn=m({"src/components/selections/defaults.js"(e,t){var r=ct(),n=ar(),i=Nt(),a=An(),o=Gr();function s(e,t,i){function s(n,i){return r.coerce(e,t,a,n,i)}var l=s("path"),c="path"!==s("type",l?"path":"rect");c&&delete t.path,s("opacity"),s("line.color"),s("line.width"),s("line.dash");for(var u=["x","y"],h=0;h<2;h++){var f,p,d,m=u[h],g={_fullLayout:i},y=n.coerceRef(e,t,g,m);if((f=n.getFromId(g,y))._selectionIndices.push(t._index),d=o.rangeToShapePosition(f),p=o.shapePositionToRange(f),c){var v=m+"0",x=m+"1",_=e[v],b=e[x];e[v]=p(e[v],!0),e[x]=p(e[x],!0),n.coercePosition(t,g,s,y,v),n.coercePosition(t,g,s,y,x);var w=t[v],T=t[x];void 0!==w&&void 0!==T&&(t[v]=d(w),t[x]=d(T),e[v]=_,e[x]=b)}}c&&r.noneOrAll(e,t,["x0","x1","y0","y1"])}t.exports=function(e,t){i(e,t,{name:"selections",handleItemDefaults:s});for(var r=t.selections,n=0;n=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function N(e,t,r,n,i){return e.append("path").attr("class","zoombox").style({fill:t>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",l(r,n)).attr("d",i+"Z")}function U(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:u.background,stroke:u.defaultLine,"stroke-width":1,opacity:0}).attr("transform",l(t,r)).attr("d","M0,0Z")}function V(e,t,r,n,i,a){e.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),q(e,t,i,a)}function q(e,t,r,n){r||(e.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function H(e){r.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function G(e){P&&e.data&&e._context.showTips&&(n.notifier(n._(e,"Double-click to zoom back out"),"long"),P=!1)}function Z(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,L)/2);return"M"+(e.l-3.5)+","+(e.t-.5+t)+"h3v"+-t+"h"+t+"v-3h-"+(t+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+t)+"h-3v"+-t+"h"+-t+"v-3h"+(t+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-t)+"h-3v"+t+"h"+-t+"v3h"+(t+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-t)+"h3v"+t+"h"+t+"v3h-"+(t+3)+"Z"}function Y(e,t,r,i,a){for(var o,s,l,c,u=!1,h={},f={},p=(a||{}).xaHash,d=(a||{}).yaHash,m=0;m=0)o._fullLayout._deactivateShape(o);else{var l=o._fullLayout.clickmode;if(H(o),2===n&&!ye&&function(){if(!e._transitioningWithDuration){var t=e._context.doubleClick,r=[];ie&&(r=r.concat(W)),ae&&(r=r.concat(K)),ne.xaxes&&(r=r.concat(ne.xaxes)),ne.yaxes&&(r=r.concat(ne.yaxes));var n,i,a={};if("reset+autosize"===t)for(t="autosize",i=0;i-1&&S(a,o,W,K,t.id,Le),l.indexOf("event")>-1&&f.click(o,a,t.id);else if(1===n&&ye){var u=g?z:P,h="s"===g||"w"===b?0:1,p=u._name+".range["+h+"]",d=function(e,t){var r,n=e.range[t],a=Math.abs(n-e.range[1-t]);return"date"===e.type?n:"log"===e.type?(r=Math.ceil(Math.max(0,-Math.log(a)/Math.LN10))+3,i("."+r+"g")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(a)/Math.LN10)+4,i("."+String(r)+"g")(n))}(u,h),m="left",y="middle";if(u.fixedrange)return;g?(y="n"===g?"top":"bottom","right"===u.side&&(m="right")):"e"===b&&(m="right"),o._context.showAxisRangeEntryBoxes&&r.select(_e).call(c.makeEditable,{gd:o,immediate:!0,background:o._fullLayout.paper_bgcolor,text:String(d),fill:u.tickfont?u.tickfont.color:"#444",horizontalAlign:m,verticalAlign:y}).on("edit",(function(e){var t=u.d2r(e);void 0!==t&&s.call("_guiRelayout",o,p,t)}))}}}function De(t,r){if(e._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(ee,pe*t+be)),i=Math.max(0,Math.min(te,de*r+we)),a=Math.abs(n-be),o=Math.abs(i-we);function s(){Se="",Te.r=Te.l,Te.t=Te.b,Ce.attr("d","M0,0Z")}if(Te.l=Math.min(be,n),Te.r=Math.max(be,n),Te.t=Math.min(we,i),Te.b=Math.max(we,i),re.isSubplotConstrained)a>L||o>L?(Se="xy",a/ee>o/te?(o=a*te/ee,we>i?Te.t=we-o:Te.b=we+o):(a=o*ee/te,be>n?Te.l=be-a:Te.r=be+a),Ce.attr("d",Z(Te))):s();else if(ne.isSubplotConstrained)if(a>L||o>L){Se="xy";var l=Math.min(Te.l/ee,(te-Te.b)/te),c=Math.max(Te.r/ee,(te-Te.t)/te);Te.l=l*ee,Te.r=c*ee,Te.b=(1-l)*te,Te.t=(1-c)*te,Ce.attr("d",Z(Te))}else s();else!ae||o0){var u;if(ne.isSubplotConstrained||!ie&&1===ae.length){for(u=0;u1&&(void 0!==a.maxallowed&&se===(a.range[0]1&&(void 0!==o.maxallowed&&le===(o.range[0]1&&n.warn("Full array edits are incompatible with other edits",h);var v=l[""][""];if(s(v))t.set(null);else{if(!Array.isArray(v))return n.warn("Unrecognized full array edit value",h,v),!0;t.set(v)}return!m&&(f(g,y),p(e),!0)}var x,_,b,w,T,k,A,M,S=Object.keys(l).map(Number).sort(i),E=t.get(),C=E||[],I=u(y,h).get(),L=[],P=-1,z=C.length;for(x=0;xC.length-(A?0:1))n.warn("index out of range",h,b);else if(void 0!==k)T.length>1&&n.warn("Insertion & removal are incompatible with edits to the same index.",h,b),s(k)?L.push(b):A?("add"===k&&(k={}),C.splice(b,0,k),I&&I.splice(b,0,{})):n.warn("Unrecognized full object edit value",h,b,k),-1===P&&(P=b);else for(_=0;_=0;x--)C.splice(L[x],1),I&&I.splice(L[x],1);if(C.length?E||t.set(C):t.set(null),m)return!1;if(f(g,y),d!==r){var D;if(-1===P)D=S;else{for(z=Math.max(C.length,z),D=[],x=0;x=P);x++)D.push(b);for(x=P;x0&&n.log("Clearing previous rejected promises from queue."),e._promises=[]},e.cleanLayout=function(t){var r;t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var a=(i.subplotsRegistry.cartesian||{}).attrRegex,l=((i.subplotsRegistry.polar||{}).attrRegex,(i.subplotsRegistry.ternary||{}).attrRegex,(i.subplotsRegistry.gl3d||{}).attrRegex,Object.keys(t));for(r=0;r3?(x.x=1.02,x.xanchor="left"):x.x<-2&&(x.x=-.02,x.xanchor="right"),x.y>3?(x.y=1.02,x.yanchor="bottom"):x.y<-2&&(x.y=-.02,x.yanchor="top")),"rotate"===t.dragmode&&(t.dragmode="orbit"),o.clean(t),t.template&&t.template.layout&&e.cleanLayout(t.template.layout),t},e.cleanData=function(t){for(var a=0;a0)return e.slice(0,t)}e.hasParent=function(e,t){for(var r=y(t);r;){if(r in e)return!0;r=y(r)}return!1},e.clearAxisTypes=function(e,t,r){for(var i=0;i{let r=(...e)=>e.every((e=>n.isPlainObject(e)))||e.every((e=>Array.isArray(e)));if([e,t].every((e=>Array.isArray(e)))){if(e.length!==t.length)return!1;for(let n=0;nn.isPlainObject(e)))){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e){if(n.startsWith("_"))continue;let i=e[n],a=t[n];if(!(i===a||r(i,a)&&v(i,a)))return!1}return!0}return!1};e.collectionsAreEqual=v}}),On=m({"src/plot_api/plot_api.js"(e){var t=b(),r=M(),n=ft(),i=ct(),a=i.nestedProperty,o=dt(),s=mt(),l=He(),c=yt(),u=At(),h=ar(),f=sr(),p=Lt(),d=er(),m=W(),g=Ln().initInteractions,y=Mt(),v=Cn().clearOutline,x=$().dfltConfig,_=zn(),w=Dn(),T=an(),k=De(),A=xt().AX_NAME_PATTERN,S=0;function E(e){var t=e._fullLayout;t._redrawFromAutoMarginCount?t._redrawFromAutoMarginCount--:e.emit("plotly_afterplot")}function C(e,t){try{e._fullLayout._paper.style("background",t)}catch(e){i.error(e)}}function I(e,t){C(e,m.combine(t,"white"))}function L(e,r){if(!e._context){e._context=i.extendDeep({},x);var a=t.select("base");e._context._baseUrl=a.size()&&a.attr("href")?window.location.href.split("#")[0]:""}var o,s,l,c=e._context;if(r){for(s=Object.keys(r),o=0;o=e.data.length||i<-e.data.length)throw new Error(r+" must be valid indices for gd.data.");if(t.indexOf(i,n+1)>-1||i>=0&&t.indexOf(-e.data.length+i)>-1||i<0&&t.indexOf(e.data.length+i)>-1)throw new Error("each index in "+r+" must be unique.")}}function D(e,t,r){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof t>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(t)||(t=[t]),z(e,t,"currentIndices"),typeof r<"u"&&!Array.isArray(r)&&(r=[r]),typeof r<"u"&&z(e,r,"newIndices"),typeof r<"u"&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function O(e,t,n,o,s){!function(e,t,r,n){var a=i.isPlainObject(n);if(!Array.isArray(e.data))throw new Error("gd.data must be an array");if(!i.isPlainObject(t))throw new Error("update must be a key:value object");if(typeof r>"u")throw new Error("indices must be an integer or array of integers");for(var o in z(e,r,"indices"),t){if(!Array.isArray(t[o])||t[o].length!==r.length)throw new Error("attribute "+o+" must be an array of length equal to indices array length");if(a&&(!(o in n)||!Array.isArray(n[o])||n[o].length!==t[o].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 correspondence with the keys and number of traces in the update object")}}(e,t,n,o);for(var l=function(e,t,n,o){var s,l,c,u,h,f=i.isPlainObject(o),p=[];for(var d in Array.isArray(n)||(n=[n]),n=P(n,e.data.length-1),t)for(var m=0;m0&&"string"!=typeof z.parts[O];)O--;var R=z.parts[O],F=z.parts[O-1]+"."+R,N=z.parts.slice(0,O).join("."),U=a(e.layout,N).get(),V=a(u,N).get(),q=z.get();if(void 0!==D){M[P]=D,S[P]="reverse"===R?D:B(q);var H=c.getLayoutValObject(u,z.parts);if(H&&H.impliedEdits&&null!==D)for(var W in H.impliedEdits)E(i.relativeAttr(P,W),H.impliedEdits[W]);if(-1!==["width","height"].indexOf(P))if(D){E("autosize",null);var X="height"===P?"width":"height";E(X,u[X])}else u[P]=e._initialAutoSize[P];else if("autosize"===P)E("width",D?null:u.width),E("height",D?null:u.height);else if(F.match(G))L(F),a(u,N+"._inputRange").set(null);else if(F.match(Z)){L(F),a(u,N+"._inputRange").set(null);var $=a(u,N).get();$._inputDomain&&($._input.domain=$._inputDomain.slice())}else F.match(Y)&&a(u,N+"._inputDomain").set(null);if("type"===R){C=U;var J="linear"===V.type&&"log"===D,Q="log"===V.type&&"linear"===D;if(J||Q){if(C&&C.range)if(V.autorange)J&&(C.range=C.range[1]>C.range[0]?[1,2]:[2,1]);else{var ee=C.range[0],te=C.range[1];J?(ee<=0&&te<=0&&E(N+".autorange",!0),ee<=0?ee=te/1e6:te<=0&&(te=ee/1e6),E(N+".range[0]",Math.log(ee)/Math.LN10),E(N+".range[1]",Math.log(te)/Math.LN10)):(E(N+".range[0]",Math.pow(10,ee)),E(N+".range[1]",Math.pow(10,te)))}else E(N+".autorange",!0);Array.isArray(u._subplots.polar)&&u._subplots.polar.length&&u[z.parts[0]]&&"radialaxis"===z.parts[1]&&delete u[z.parts[0]]._subplot.viewInitial["radialaxis.range"],l.getComponentMethod("annotations","convertCoords")(e,V,D,E),l.getComponentMethod("images","convertCoords")(e,V,D,E)}else E(N+".autorange",!0),E(N+".range",null);a(u,N+"._inputRange").set(null)}else if(R.match(A)){var re=a(u,P).get(),ne=(D||{}).type;(!ne||"-"===ne)&&(ne="linear"),l.getComponentMethod("annotations","convertCoords")(e,re,ne,E),l.getComponentMethod("images","convertCoords")(e,re,ne,E)}var ie=_.containerArrayMatch(P);if(ie){r=ie.array,n=ie.index;var ae=ie.property,oe=H||{editType:"calc"};""!==n&&""===ae&&(_.isAddVal(D)?S[P]=null:_.isRemoveVal(D)?S[P]=(a(s,r).get()||[])[n]:i.warn("unrecognized full object value",t)),k.update(T,oe),y[r]||(y[r]={});var se=y[r][n];se||(se=y[r][n]={}),se[ae]=D,delete t[P]}else"reverse"===R?(U.range?U.range.reverse():(E(N+".autorange",!0),U.range=[1,0]),V.autorange?T.calc=!0:T.plot=!0):("dragmode"===P&&(!1===D&&!1!==q||!1!==D&&!1===q)||u._has("scatter-like")&&u._has("regl")&&"dragmode"===P&&("lasso"===D||"select"===D)&&"lasso"!==q&&"select"!==q?T.plot=!0:H?k.update(T,H):T.calc=!0,z.set(D))}}for(r in y)_.applyContainerArrayChanges(e,p(s,r),y[r],T,p)||(T.plot=!0);for(var le in I){var ce=(C=h.getFromId(e,le))&&C._constraintGroup;if(ce)for(var ue in T.calc=!0,ce)I[ue]||(h.getFromId(e,ue)._constraintShrinkable=!0)}(K(e)||t.height||t.width)&&(T.plot=!0);var he=u.shapes;for(n=0;n1;)if(n.pop(),void 0!==(r=a(t,n.join(".")+".uirevision").get()))return r;return t.uirevision}function ie(e,t){for(var r=0;r=a.length?a[0]:a[e]:a}function l(e){return Array.isArray(o)?e>=o.length?o[0]:o[e]:o}function c(e,t){var r=0;return function(){if(e&&++r===t)return e()}}return void 0===n._frameWaitingCnt&&(n._frameWaitingCnt=0),new Promise((function(o,h){var f=0;function p(e){return Array.isArray(a)?f>=a.length?e.transitionOpts=a[f]:e.transitionOpts=a[0]:e.transitionOpts=a,f++,e}var d,m,g=[],y=null==t,v=Array.isArray(t);if(y||v||!i.isPlainObject(t)){if(y||-1!==["string","number"].indexOf(typeof t))for(d=0;d0&&bb)&&T.push(m);g=T}}g.length>0?function(t){if(0!==t.length){for(var i=0;in._timeToNext&&function(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var t=n._currentFrame=n._frameQueue.shift();if(t){var r=t.name?t.name.toString():null;e._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=t.frameOpts.duration,u.transition(e,t.frame.data,t.frame.layout,w.coerceTraceIndices(e,t.frame.traces),t.frameOpts,t.transitionOpts).then((function(){t.onComplete&&t.onComplete()})),e.emit("plotly_animatingframe",{name:r,frame:t.frame,animation:{frame:t.frameOpts,transition:t.transitionOpts}})}else e.emit("plotly_animated"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}()};t()}()}}(g):(e.emit("plotly_animated"),o())}))},e.addFrames=function(e,t,r){if(e=i.getGraphDiv(e),null==t)return Promise.resolve();if(!i.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var n,a,o,l,c=e._transitionData._frames,h=e._transitionData._frameHash;if(!Array.isArray(t))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+t);var f=c.length+2*t.length,p=[],d={};for(n=t.length-1;n>=0;n--)if(i.isPlainObject(t[n])){var m=t[n].name,g=(h[m]||d[m]||{}).name,y=t[n].name,v=h[g]||d[g];g&&y&&"number"==typeof y&&v&&S<5&&(S++,i.warn('addFrames: overwriting frame "'+(h[g]||d[g]).name+'" with a frame whose name of type "number" also equates to "'+g+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===S&&i.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),d[m]={name:m},p.push({frame:u.supplyFrameDefaults(t[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:f+n})}p.sort((function(e,t){return e.index>t.index?-1:e.index=0;n--){if("number"==typeof(a=p[n].frame).name&&i.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;h[a.name="frame "+e._transitionData._counter++];);if(h[a.name]){for(o=0;o=0;r--)n=t[r],o.push({type:"delete",index:n}),l.unshift({type:"insert",index:n,value:a[n]});var c=u.modifyFrames,h=u.modifyFrames,f=[e,l],p=[e,o];return s&&s.add(e,c,f,h,p),u.modifyFrames(e,o)},e.addTraces=function t(r,n,a){r=i.getGraphDiv(r);var o,l,c=[],u=e.deleteTraces,h=t,f=[r,c],p=[r,n];for(function(e,t,r){var n,i;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof t>"u")throw new Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),n=0;n"u")return l=e.redraw(r),s.add(r,u,f,h,p),l;Array.isArray(a)||(a=[a]);try{D(r,c,a)}catch(e){throw r.data.splice(r.data.length-n.length,n.length),e}return s.startSequence(r),s.add(r,u,f,h,p),l=e.moveTraces(r,c,a),s.stopSequence(r),l},e.deleteTraces=function t(r,n){r=i.getGraphDiv(r);var a,o,l=[],c=e.addTraces,u=t,h=[r,l,n],f=[r,n];if(typeof n>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(n)||(n=[n]),z(r,n,"indices"),(n=P(n,r.data.length-1)).sort(i.sorterDes),a=0;a=0&&r"u")for(a=[],o=0;o=0&&r[e,t._ev.listeners(e)]));h=e.newPlot(t,r,n,o).then((()=>{for(let[e,r]of i)r.forEach((r=>t.on(e,r)));return e.react(t,r,n,o)}))}else{t.data=r||[],w.cleanData(t.data),t.layout=n||{},w.cleanLayout(t.layout),function(e,t,r,n){var o,s,l,c,u,h,f,p,d,m,g=n._preGUI,y=[],v={},x={};for(o in g){if(u=re(o,ee)){if(d=u.head,m=u.tail,s=u.attr||d+".uirevision",(c=(l=a(n,s).get())&&ne(s,t))&&c===l){if(null===(h=g[o])&&(h=void 0),oe(p=(f=a(t,o)).get(),h)){void 0===p&&"autorange"===m&&y.push(d),f.set(B(a(n,o).get()));continue}if("autorange"===m||"range["===m.slice(0,6)){var _=g[d+".range[0]"],b=g[d+".range[1]"],w=g[d+".autorange"];if(w||null===w&&null===_&&null===b){if(!(d in v)){var T=a(t,d).get();v[d]=T&&(T.autorange||!1!==T.autorange&&(!T.range||2!==T.range.length))}if(v[d]){f.set(B(a(n,o).get()));continue}}}}}else i.warn("unrecognized GUI edit: "+o);delete g[o],u&&"range["===u.tail.slice(0,6)&&(x[u.head]=1)}for(var k=0;k(m||t.emit("plotly_react",{config:o,data:r,layout:n}),t)))},e.redraw=function(t){if(t=i.getGraphDiv(t),!i.isPlotDiv(t))throw new Error("This element is not a Plotly plot: "+t);return w.cleanData(t.data),w.cleanLayout(t.layout),t.calcdata=void 0,e._doPlot(t).then((function(){return t.emit("plotly_redraw"),t}))},e.relayout=V,e.restyle=F,e.setPlotConfig=function(e){return i.extendFlat(x,e)},e.update=J,e._guiRelayout=Q(V),e._guiRestyle=Q(F),e._guiUpdate=Q(J),e._storeDirectGUIEdit=function(e,t,r){for(var n in r)N(n,a(e,n).get(),r[n],t)}}}),Rn=m({"src/snapshot/helpers.js"(e){var t=He();e.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("mapbox")||e._has("map"))?500:0},e.getRedrawFunc=function(e){return function(){t.getComponentMethod("colorbar","draw")(e)}},e.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)},e.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var r=window.URL||window.webkitURL;e.createObjectURL=function(e){return r.createObjectURL(e)},e.revokeObjectURL=function(e){return r.revokeObjectURL(e)},e.createBlob=function(e,t){if("svg"===t)return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if("full-json"===t)return new window.Blob([e],{type:"application/json;charset=utf-8"});var r=function(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),i=0;i")?"":t.html(e).text()}));return t.remove(),n}(_),(_=_.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(s,"'")}}}),Bn=m({"src/snapshot/svgtoimg.js"(e,t){var r=ct(),n=pt().EventEmitter,i=Rn();t.exports=function(e){var t=e.emitter||new n,a=new Promise((function(n,a){var o,s,l=window.Image,c=e.svg,u=e.format||"png",h=e.canvas,f=e.scale||1,p=e.width||300,d=e.height||150,m=f*p,g=f*d,y=h.getContext("2d",{willReadFrequently:!0}),v=new l;"svg"===u||r.isSafari()?s=i.encodeSVG(c):(o=i.createBlob(c,"svg"),s=i.createObjectURL(o)),h.width=m,h.height=g,v.onload=function(){var r;switch(o=null,i.revokeObjectURL(s),"svg"!==u&&y.drawImage(v,0,0,m,g),u){case"jpeg":r=h.toDataURL("image/jpeg");break;case"png":r=h.toDataURL("image/png");break;case"webp":r=h.toDataURL("image/webp");break;case"svg":r=s;break;default:var l="Image format is not jpeg, png, svg or webp.";if(a(new Error(l)),!e.promise)return t.emit("error",l)}n(r),e.promise||t.emit("success",r)},v.onerror=function(r){if(o=null,i.revokeObjectURL(s),a(r),!e.promise)return t.emit("error",r)},v.src=s}));return e.promise?a:t}}}),jn=m({"src/plot_api/to_image.js"(e,t){var r=M(),n=On(),i=At(),a=ct(),o=Rn(),s=Fn(),l=Bn(),c=x().version,u={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};t.exports=function(e,t){var h,f,p,d;function m(e){return!(e in t)||a.validate(t[e],u[e])}if(t=t||{},a.isPlainObject(e)?(h=e.data||[],f=e.layout||{},p=e.config||{},d={}):(e=a.getGraphDiv(e),h=a.extendDeep([],e.data),f=a.extendDeep({},e.layout),p=e._context,d=e._fullLayout||{}),!m("width")&&null!==t.width||!m("height")&&null!==t.height)throw new Error("Height and width should be pixel values.");if(!m("format"))throw new Error("Export format is not "+a.join2(u.format.values,", "," or ")+".");var g={};function y(e,r){return a.coerce(t,g,u,e,r)}var v=y("format"),x=y("width"),_=y("height"),b=y("scale"),w=y("setBackground"),T=y("imageDataOnly"),k=document.createElement("div");k.style.position="absolute",k.style.left="-5000px",document.body.appendChild(k);var A=a.extendFlat({},f);x?A.width=x:null===t.width&&r(d.width)&&(A.width=d.width),_?A.height=_:null===t.height&&r(d.height)&&(A.height=d.height);var M=a.extendFlat({},p,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),S=o.getRedrawFunc(k);function E(){return new Promise((function(e){setTimeout(e,o.getDelay(k._fullLayout))}))}function C(){return new Promise((function(e,t){var r=s(k,v,b),u=k._fullLayout.width,h=k._fullLayout.height;function f(){n.purge(k),document.body.removeChild(k)}if("full-json"===v){var p=i.graphJson(k,!1,"keepdata","object",!0,!0);return p.version=c,p=JSON.stringify(p),f(),e(T?p:o.encodeJSON(p))}if(f(),"svg"===v)return e(T?r:o.encodeSVG(r));var d=document.createElement("canvas");d.id=a.randstr(),l({format:v,width:u,height:h,scale:b,canvas:d,svg:r,promise:!0}).then(e).catch(t)}))}return new Promise((function(e,t){n.newPlot(k,h,A,M).then(S).then(E).then(C).then((function(t){e(function(e){return T?e.replace(o.IMAGE_URL_PREFIX,""):e}(t))})).catch((function(e){t(e)}))}))}}}),Nn=m({"src/plot_api/validate.js"(e,t){var r=ct(),n=At(),i=yt(),a=$().dfltConfig,o=r.isPlainObject,s=Array.isArray,l=r.isArrayOrTypedArray;function c(e,t,n,i,a,u){u=u||[];for(var h=Object.keys(e),m=0;mx.length&&i.push(f("unused",a,y.concat(x.length)));var A,M,S,E,C,I=x.length,L=Array.isArray(k);if(L&&(I=Math.min(I,k.length)),2===_.dimensions)for(M=0;Mx[M].length&&i.push(f("unused",a,y.concat(M,x[M].length)));var P=x[M].length;for(A=0;A<(L?Math.min(P,k[M].length):P);A++)S=L?k[M][A]:k,E=v[M][A],C=x[M][A],r.validate(E,S)?C!==E&&C!==+E&&i.push(f("dynamic",a,y.concat(M,A),E,C)):i.push(f("value",a,y.concat(M,A),E))}else i.push(f("array",a,y.concat(M),v[M]));else for(M=0;M1&&p.push(f("object","layout"))),n.supplyDefaults(d);for(var m=d._fullData,g=l.length,y=0;yT?h.push({code:"unused",traceType:v,templateCount:w,dataCount:T}):T>w&&h.push({code:"reused",traceType:v,templateCount:w,dataCount:T})}}else h.push({code:"data"});if(function e(t,n){for(var i in t)if("_"!==i.charAt(0)){var a=t[i],o=p(t,i,n);r(a)?(Array.isArray(t)&&!1===a._template&&a.templateitemname&&h.push({code:"missing",path:o,templateitemname:a.templateitemname}),e(a,o)):Array.isArray(a)&&d(a)&&e(a,o)}}({data:g,layout:f},""),h.length)return h.map(m)}}}),Hn=m({"src/plot_api/index.js"(e){var t=On();e._doPlot=t._doPlot,e.newPlot=t.newPlot,e.restyle=t.restyle,e.relayout=t.relayout,e.redraw=t.redraw,e.update=t.update,e._guiRestyle=t._guiRestyle,e._guiRelayout=t._guiRelayout,e._guiUpdate=t._guiUpdate,e._storeDirectGUIEdit=t._storeDirectGUIEdit,e.react=t.react,e.extendTraces=t.extendTraces,e.prependTraces=t.prependTraces,e.addTraces=t.addTraces,e.deleteTraces=t.deleteTraces,e.moveTraces=t.moveTraces,e.purge=t.purge,e.addFrames=t.addFrames,e.deleteFrames=t.deleteFrames,e.animate=t.animate,e.setPlotConfig=t.setPlotConfig;var r=Pe().getGraphDiv,n=Yr().eraseActiveShape;e.deleteActiveShape=function(e){return n(r(e))},e.toImage=jn(),e.validate=Nn(),e.downloadImage=Vn();var i=qn();e.makeTemplate=i.makeTemplate,e.validateTemplate=i.validateTemplate}}),Gn=m({"src/traces/scatter/xy_defaults.js"(e,t){var r=ct(),n=He();t.exports=function(e,t,i,a){var o,s=a("x"),l=a("y");if(n.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],i),s){var c=r.minRowLength(s);l?o=Math.min(c,r.minRowLength(l)):(o=c,a("y0"),a("dy"))}else{if(!l)return 0;o=r.minRowLength(l),a("x0"),a("dx")}return t._length=o,o}}}),Wn=m({"src/traces/scatter/period_defaults.js"(e,t){var r=ct().dateTick0,n=S().ONEWEEK;function i(e,t){return r(t,e%n==0?1:0)}t.exports=function(e,t,r,n,a){if(a||(a={x:!0,y:!0}),a.x){var o=n("xperiod");o&&(n("xperiod0",i(o,t.xcalendar)),n("xperiodalignment"))}if(a.y){var s=n("yperiod");s&&(n("yperiod0",i(s,t.ycalendar)),n("yperiodalignment"))}}}}),Zn=m({"src/traces/scatter/stack_defaults.js"(e,t){var r=["orientation","groupnorm","stackgaps"];t.exports=function(e,t,n,i){var a=n._scatterStackOpts,o=i("stackgroup");if(o){var s=t.xaxis+t.yaxis,l=a[s];l||(l=a[s]={});var c=l[o],u=!1;c?c.traces.push(t):(c=l[o]={traceIndices:[],traces:[t]},u=!0);for(var h={orientation:t.x&&!t.y?"h":"v"},f=0;f=0;f--){var p=e[f];if("scatter"===p.type&&p.xaxis===u.xaxis&&p.yaxis===u.yaxis){p.opacity=void 0;break}}}}}}}),ri=m({"src/traces/scatter/layout_defaults.js"(e,t){var r=ct(),n=wt();t.exports=function(e,t){var i,a="group"===t.barmode;"group"===t.scattermode&&(i=a?t.bargap:.2,r.coerce(e,t,n,"scattergap",i))}}}),ni=m({"src/plots/cartesian/align_period.js"(e,t){var r=M(),n=ct(),i=n.dateTime2ms,a=n.incrementMonth,o=S().ONEAVGMONTH;t.exports=function(e,t,n,s){if("date"!==t.type)return{vals:s};var l=e[n+"periodalignment"];if(!l)return{vals:s};var c,u=e[n+"period"];if(r(u)){if((u=+u)<=0)return{vals:s}}else if("string"==typeof u&&"M"===u.charAt(0)){var h=+u.substring(1);if(!(h>0&&Math.round(h)===h))return{vals:s};c=h}for(var f=t.calendar,p="start"===l,d="end"===l,m=e[n+"period0"],g=i(m,f)||0,y=[],v=[],x=[],_=s.length,b=0;b<_;b++){var w,T,k,A=s[b];if(c){for(w=Math.round((A-g)/(c*o)),k=a(g,c*w,f);k>A;)k=a(k,-c,f);for(;k<=A;)k=a(k,c,f);T=a(k,-c,f)}else{for(k=g+(w=Math.round((A-g)/u))*u;k>A;)k-=u;for(;k<=A;)k+=u;T=k-u}y[b]=p?T:d?k:(T+k)/2,v[b]=T,x[b]=k}return{vals:y,starts:v,ends:x}}}}),ii=m({"src/traces/scatter/colorscale_calc.js"(e,t){var r=Ct().hasColorscale,n=Zt(),i=Xt();t.exports=function(e,t){i.hasLines(t)&&r(t,"line")&&n(e,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),i.hasMarkers(t)&&(r(t,"marker")&&n(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),r(t,"marker.line")&&n(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}}),ai=m({"src/traces/scatter/arrays_to_calcdata.js"(e,t){var r=ct();t.exports=function(e,t){for(var n=0;nd&&I[y].gap;)y--;for(x=I[y].s,g=I.length-1;g>y;g--)I[g].s=x;for(;dh+c||!r(u))}for(var p=0;pi(e)))):i(e.text);let a=e.outsidetextfont.size*u*r+c;return{ppadplus:t.some((e=>e.s<0))?a:0,ppadminus:t.some((e=>e.s>=0))?a:0}}return{ppadplus:void 0,ppadminus:void 0}}function _(e){return e._id.charAt(0)}t.exports={crossTraceCalc:function(e,t){for(var r=t.xaxis,n=t.yaxis,i=e._fullLayout,o=e._fullData,s=e.calcdata,l=[],c=[],u=0;uS[h]&&h0?o:s)/(I._m*z*(I._m>0?o:s)))),a*=1e3}if(l===i){if(P&&(l=I.c2p(n.y,!0)),l===i)return!1;l*=1e3}return[a,l]}function Y(e,t,r,n){var i=r-e,a=n-t,o=.5-e,s=.5-t,l=i*i+a*a,c=i*o+a*s;if(c>0&&coe||e[1]le)return[u(e[0],ae,oe),u(e[1],se,le)]}function he(e,t){if(e[0]===t[0]&&(e[0]===ae||e[0]===oe)||e[1]===t[1]&&(e[1]===se||e[1]===le))return!0}function fe(e,t,r){return function(n,i){var a=ue(n),o=ue(i),s=[];if(a&&o&&he(a,o))return s;a&&s.push(a),o&&s.push(o);var c=2*l.constrain((n[e]+i[e])/2,t,r)-((a||n)[e]+(o||i)[e]);return c&&((a&&o?c>0==a[e]>o[e]?a:o:a||o)[e]+=c),s}}function pe(e){var t=e[0],r=e[1],n=t===G[W-1][0],i=r===G[W-1][1];if(!n||!i)if(W>1){var a=t===G[W-2][0],o=r===G[W-2][1];n&&(t===ae||t===oe)&&a?o?W--:G[W-1]=e:i&&(r===se||r===le)&&o?a?W--:G[W-1]=e:G[W++]=e}else G[W++]=e}function de(e){G[W-1][0]!==e[0]&&G[W-1][1]!==e[1]&&pe([Q,ee]),pe(e),te=null,Q=ee=0}"linear"===j||"spline"===j?ne=function(e,t){for(var r=[],n=0,i=0;i<4;i++){var a=ce[i],o=c(e[0],e[1],t[0],t[1],a[0],a[1],a[2],a[3]);o&&(!n||Math.abs(o.x-r[0][0])>1||Math.abs(o.y-r[0][1])>1)&&(o=[o.x,o.y],n&&$(o,e)<$(r[0],e)?r.unshift(o):r.push(o),n++)}return r}:"hv"===j||"vh"===j?ne=function(e,t){var r=[],n=ue(e),i=ue(t);return n&&i&&he(n,i)||(n&&r.push(n),i&&r.push(i)),r}:"hvh"===j?ne=fe(0,ae,oe):"vhv"===j&&(ne=fe(1,se,le));var me=l.isArrayOrTypedArray(R);function ge(t){if(t&&O&&(t.i=n,t.d=e,t.trace=E,t.marker=me?R[t.i]:R,t.backoff=O),M=t[0]/z,S=t[1]/D,K=t[0]oe?oe:0,J=t[1]le?le:0,K||J){if(W)if(te){var r=ne(te,t);r.length>1&&(de(r[0]),G[W++]=r[1])}else re=ne(G[W-1],t)[0],G[W++]=re;else G[W++]=[K||t[0],J||t[1]];var i=G[W-1];K&&J&&(i[0]!==K||i[1]!==J)?(te&&(Q!==K&&ee!==J?pe(Q&&ee?function(e,t){var r=t[0]-e[0],n=(t[1]-e[1])/r;return(e[1]*t[0]-t[1]*e[0])/r>0?[n>0?ae:oe,le]:[n>0?oe:ae,se]}(te,t):[Q||K,ee||J]):Q&&ee&&pe([Q,ee])),pe([K,J])):Q-K&&ee-J&&pe([K||Q,J||ee]),te=t,Q=K,ee=J}else te&&de(ne(te,t)[0]),G[W++]=t}for(n=0;nX(m,ye))break;f=m,(w=v[0]*y[0]+v[1]*y[1])>_?(_=w,p=m,g=!1):w=e.length||!m)break;ge(m),a=m}}else ge(p)}te&&pe([Q||te[0],ee||te[1]]),V.push(G.slice(0,W))}var ve=j.slice(j.length-1);if(O&&"h"!==ve&&"v"!==ve){for(var xe=!1,_e=-1,be=[],we=0;we=0?l=p:(l=p=f,f++),l=u[0]&&e.x<=u[1]&&e.y>=h[0]&&e.y<=h[1]})),m=Math.ceil(d.length/p),g=0;o.forEach((function(e,r){var n=e[0].trace;l.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;function x(e){return v?e.transition():e}var _=u.xaxis,b=u.yaxis,w=f[0].trace,T=w.line,k=r.select(d),A=a(k,"g","errorbars"),M=a(k,"g","lines"),S=a(k,"g","points"),E=a(k,"g","text");if(n.getComponentMethod("errorbars","plot")(e,A,u,m),!0===w.visible){x(k).style("opacity",w.opacity);var C,I,L,P,z=w.fill.charAt(w.fill.length-1);"x"!==z&&"y"!==z&&(z=""),"y"===z?(L=1,P=b.c2p(0,!0)):"x"===z&&(L=0,P=_.c2p(0,!0)),f[0][u.isRangePlot?"nodeRangePlot3":"node3"]=k;var D="",O=[],R=w._prevtrace,F=null,B=null;R&&(D=R._prevRevpath||"",I=R._nextFill,O=R._ownPolygons,F=R._fillsegments,B=R._fillElement);var j,N,U,V,q,H,G,W,Z="",Y="",X=[];w._polygons=[];var $=[],K=[],J=i.noop;if(C=w._ownFill,l.hasLines(w)||"none"!==w.fill){I&&I.datum(f),-1!==["hv","vh","hvh","vhv"].indexOf(T.shape)?(U=s.steps(T.shape),V=s.steps(T.shape.split("").reverse().join(""))):U=V="spline"===T.shape?function(e){var t=e[e.length-1];return e.length>1&&e[0][0]===t[0]&&e[0][1]===t[1]?s.smoothclosed(e.slice(1),T.smoothing):s.smoothopen(e,T.smoothing)}:function(e){return"M"+e.join("L")},q=function(e){return V(e.reverse())},K=c(f,{xaxis:_,yaxis:b,trace:w,connectGaps:w.connectgaps,baseTolerance:Math.max(T.width||1,3)/4,shape:T.shape,backoff:T.backoff,simplify:T.simplify,fill:w.fill}),$=new Array(K.length);var Q=0;for(g=0;g0,g=u(e,t,n);(h=i.selectAll("g.trace").data(g,(function(e){return e[0].trace.uid}))).enter().append("g").attr("class",(function(e){return"trace scatter trace"+e[0].trace.uid})).style("stroke-miterlimit",2),h.order(),function(e,t,n){t.each((function(t){var i=a(r.select(this),"g","fills");s.setClipUrl(i,n.layerClipId,e);var l=t[0].trace;l._ownFill=null,l._nextFill=null;var c=[];l._ownfill&&c.push("_ownFill"),l._nexttrace&&c.push("_nextFill");var u=i.selectAll("g").data(c,o);u.enter().append("g"),u.exit().remove(),u.order().each((function(e){l[e]=a(r.select(this),"path","js-fill")}))}))}(e,h,t),m?(c&&(p=c()),r.transition().duration(l.duration).ease(l.easing).each("end",(function(){p&&p()})).each("interrupt",(function(){p&&p()})).each((function(){i.selectAll("g.trace").each((function(r,n){f(e,n,t,r,g,this,l)}))}))):h.each((function(r,n){f(e,n,t,r,g,this,l)})),d&&h.exit().remove(),i.selectAll("path:not([d])").remove()}}}),mi=m({"src/traces/scatter/marker_colorbar.js"(e,t){t.exports={container:"marker",min:"cmin",max:"cmax"}}}),gi=m({"src/traces/scatter/format_labels.js"(e,t){var r=ar();t.exports=function(e,t,n){var i={},a={_fullLayout:n},o=r.getFromTrace(a,t,"x"),s=r.getFromTrace(a,t,"y"),l=e.orig_x;void 0===l&&(l=e.x);var c=e.orig_y;return void 0===c&&(c=e.y),i.xLabel=r.tickText(o,o.c2l(l),!0).text,i.yLabel=r.tickText(s,s.c2l(c),!0).text,i}}}),yi=m({"src/traces/scatter/style.js"(e,t){var r=b(),n=er(),i=He();function a(e,t,r){n.pointStyle(e.selectAll("path.point"),t,r)}function o(e,t,r){n.textPointStyle(e.selectAll("text"),t,r)}t.exports={style:function(e){var t=r.select(e).selectAll("g.trace.scatter");t.style("opacity",(function(e){return e[0].trace.opacity})),t.selectAll("g.points").each((function(t){a(r.select(this),t.trace||t[0].trace,e)})),t.selectAll("g.text").each((function(t){o(r.select(this),t.trace||t[0].trace,e)})),t.selectAll("g.trace path.js-line").call(n.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(n.fillGroupStyle,e,!1),i.getComponentMethod("errorbars","style")(t)},stylePoints:a,styleText:o,styleOnSelect:function(e,t,r){var i=t[0].trace;i.selectedpoints?(n.selectedPointStyle(r.selectAll("path.point"),i),n.selectedTextStyle(r.selectAll("text"),i)):(a(r,i,e),o(r,i,e))}}}}),vi=m({"src/traces/scatter/get_trace_color.js"(e,t){var r=W(),n=Xt();t.exports=function(e,t){var i,a;if("lines"===e.mode)return(i=e.line.color)&&r.opacity(i)?i:e.fillcolor;if("none"===e.mode)return e.fill?e.fillcolor:"";var o=t.mcc||(e.marker||{}).color,s=t.mlcc||((e.marker||{}).line||{}).color;return(a=o&&r.opacity(o)?o:s&&r.opacity(s)&&(t.mlw||((e.marker||{}).line||{}).width)?s:"")?r.opacity(a)<.3?r.addOpacity(a,.3):a:(i=(e.line||{}).color)&&r.opacity(i)&&n.hasLines(e)&&e.line.width?i:e.fillcolor}}}),xi=m({"src/traces/scatter/hover.js"(e,t){var r=ct(),n=Or(),i=He(),a=vi(),o=W(),s=r.fillText;t.exports=function(e,t,l,c){var u=e.cd,h=u[0].trace,f=e.xa,p=e.ya,d=f.c2p(t),m=p.c2p(l),g=[d,m],y=h.hoveron||"",v=-1!==h.mode.indexOf("markers")?3:.5,x=!!h.xperiodalignment,_=!!h.yperiodalignment;if(-1!==y.indexOf("points")){var b=function(e){var t=Math.max(v,e.mrc||0),r=f.c2p(e.x)-d,n=p.c2p(e.y)-m;return Math.max(Math.sqrt(r*r+n*n)-t,1-v/t)},w=n.getDistanceFunction(c,(function(e){if(x){var t=f.c2p(e.xStart),r=f.c2p(e.xEnd);return d>=Math.min(t,r)&&d<=Math.max(t,r)?0:1/0}var n=Math.max(3,e.mrc||0),i=1-1/n,a=Math.abs(f.c2p(e.x)-d);return a=Math.min(t,r)&&m<=Math.max(t,r)?0:1/0}var n=Math.max(3,e.mrc||0),i=1-1/n,a=Math.abs(p.c2p(e.y)-m);return ar!=(c=i[n][1])>=r&&(o=i[n-1][0],s=i[n][0],c-l&&(a=o+(s-o)*(r-l)/(c-l),h=Math.min(h,a),d=Math.max(d,a)));return{x0:h=Math.max(h,0),x1:d=Math.min(d,f._length),y0:r,y1:r}}(h._polygons);null===P&&(P={x0:g[0],x1:g[0],y0:g[1],y1:g[1]});var z=o.defaultLine;return o.opacity(h.fillcolor)?z=h.fillcolor:o.opacity((h.line||{}).color)&&(z=h.line.color),r.extendFlat(e,{distance:e.maxHoverDistance,x0:P.x0,x1:P.x1,y0:P.y0,y1:P.y1,color:z,hovertemplate:!1}),delete e.index,h.text&&!r.isArrayOrTypedArray(h.text)?e.text=String(h.text):e.text=h.name,[e]}}}}),_i=m({"src/traces/scatter/select.js"(e,t){var r=Xt();t.exports=function(e,t){var n,i,a,o,s=e.cd,l=e.xaxis,c=e.yaxis,u=[],h=s[0].trace;if(!r.hasMarkers(h)&&!r.hasText(h))return[];if(!1===t)for(n=0;n0&&(i["_"+r+"axes"]||{})[t])return i;if((i[r+"axis"]||r)===t){if(a(i,r))return i;if((i[r]||[]).length||i[r+"0"])return i}}}(t,s,l);if(c){if("histogram"===c.type&&l==={v:"y",h:"x"}[c.orientation||"v"])return void(e.type="linear");var u=l+"calendar",h=c[u],f={noMultiCategory:!r(c,"cartesian")||r(c,"noMultiCategory")};if("box"===c.type&&c._hasPreCompStats&&l==={h:"x",v:"y"}[c.orientation||"v"]&&(f.noMultiCategory=!0),f.autotypenumbers=e.autotypenumbers,a(c,l)){var p=i(c),d=[];for(o=0;o0||r(o);s&&(a="array");var l,c=n("categoryorder",a);"array"===c&&(l=n("categoryarray")),!s&&"array"===c&&(c=t.categoryorder="trace"),"trace"===c?t._initialCategories=[]:"array"===c?t._initialCategories=l.slice():(l=function(e,t){var r,n,i,a=t.dataAttr||e._id.charAt(0),o={};if(t.axData)r=t.axData;else for(r=[],n=0;n=2){var l,c,u="";if(2===o.length)for(l=0;l<2;l++)if(c=_(o[l])){u=g;break}var h=a("pattern",u);if(h===g)for(l=0;l<2;l++)(c=_(o[l]))&&(t.bounds[l]=o[l]=c-1);if(h)for(l=0;l<2;l++)switch(c=o[l],h){case g:if(!r(c))return void(t.enabled=!1);if((c=+c)!==Math.floor(c)||c<0||c>=7)return void(t.enabled=!1);t.bounds[l]=o[l]=c;break;case y:if(!r(c))return void(t.enabled=!1);if((c=+c)<0||c>24)return void(t.enabled=!1);t.bounds[l]=o[l]=c}if(!1===n.autorange){var f=n.range;if(f[0]f[1])return void(t.enabled=!1)}else if(o[0]>f[0]&&o[1]_[1]-1/4096&&(t.domain=s),n.noneOrAll(e.domain,t.domain,s),"sync"===t.tickmode&&(t.tickmode="auto")}return i("layer"),t}}}),Si=m({"src/plots/cartesian/layout_defaults.js"(e,t){var r=ct(),n=W(),i=Kt().isUnifiedHover,a=Lr(),o=vt(),s=Ve(),l=Lt(),c=wi(),u=Ai(),h=nn(),f=Mi(),p=_t(),d=p.id2name,m=p.name2id,g=xt().AX_ID_PATTERN,y=He(),v=y.traceIs,x=y.getComponentMethod;function _(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}t.exports=function(e,t,y){var b,w,T=t.autotypenumbers,k={},A={},M={},S={},E={},C={},I={},L={},P={},z={};for(b=0;bs.duration?(function(){for(var r={},i=0;i rect").call(a.setTranslate,0,0).call(a.setScale,1,1),e.plot.call(a.setTranslate,t._offset,r._offset).call(a.setScale,1,1);var n=e.plot.selectAll(".scatterlayer .trace");n.selectAll(".point").call(a.setPointGroupScale,1,1),n.selectAll(".textpoint").call(a.setTextPointsScale,1,1),n.call(a.hideOutsideRangePoints,e)}function g(t,r){var n=t.plotinfo,s=n.xaxis,l=n.yaxis,c=s._length,u=l._length,h=!!t.xr1,f=!!t.yr1,p=[];if(h){var d=i.simpleMap(t.xr0,s.r2l),m=i.simpleMap(t.xr1,s.r2l),g=d[1]-d[0],y=m[1]-m[0];p[0]=(d[0]*(1-r)+r*m[0]-d[0])/(d[1]-d[0])*c,p[2]=c*(1-r+r*y/g),s.range[0]=s.l2r(d[0]*(1-r)+r*m[0]),s.range[1]=s.l2r(d[1]*(1-r)+r*m[1])}else p[0]=0,p[2]=c;if(f){var v=i.simpleMap(t.yr0,l.r2l),x=i.simpleMap(t.yr1,l.r2l),_=v[1]-v[0],b=x[1]-x[0];p[1]=(v[1]*(1-r)+r*x[1]-v[1])/(v[0]-v[1])*u,p[3]=u*(1-r+r*b/_),l.range[0]=s.l2r(v[0]*(1-r)+r*x[0]),l.range[1]=l.l2r(v[1]*(1-r)+r*x[1])}else p[1]=0,p[3]=u;o.drawOne(e,s,{skipTitle:!0}),o.drawOne(e,l,{skipTitle:!0}),o.redrawComponents(e,[s._id,l._id]);var w=h?c/p[2]:1,T=f?u/p[3]:1,k=h?p[0]:0,A=f?p[1]:0,M=h?p[0]/p[2]*c:0,S=f?p[1]/p[3]*u:0,E=s._offset-M,C=l._offset-S;n.clipRect.call(a.setTranslate,k,A).call(a.setScale,1/w,1/T),n.plot.call(a.setTranslate,E,C).call(a.setScale,w,T),a.setPointGroupScale(n.zoomScalePts,1/w,1/T),a.setTextPointsScale(n.zoomScaleTxt,1/w,1/T)}o.redrawComponents(e)}}}),Ci=m({"src/plots/cartesian/index.js"(e){var t=b(),r=He(),n=ct(),i=At(),a=er(),o=Tt().getModuleCalcData,s=_t(),l=xt(),c=Mt(),u=n.ensureSingle;function h(e,t,r){return n.ensureSingle(e,t,r,(function(e){e.datum(r)}))}var f=l.zindexSeparator;function p(e,n,i,s,c){for(var u,h,f,p=l.traceLayerClasses,d=e._fullLayout,m=d._zindices,g=d._modules,y=[],v=[],x=0;x1,m=t.mainplotinfo;if(!t.mainplot||d)if(p)t.xlines=u(n,"path","xlines-above"),t.ylines=u(n,"path","ylines-above"),t.xaxislayer=u(n,"g","xaxislayer-above"),t.yaxislayer=u(n,"g","yaxislayer-above");else{if(!a){var g=u(n,"g","layer-subplot");t.shapelayer=u(g,"g","shapelayer"),t.imagelayer=u(g,"g","imagelayer"),m&&d?(t.minorGridlayer=m.minorGridlayer,t.gridlayer=m.gridlayer,t.zerolinelayer=m.zerolinelayer):(t.minorGridlayer=u(n,"g","minor-gridlayer"),t.gridlayer=u(n,"g","gridlayer"),t.zerolinelayer=u(n,"g","zerolinelayer"));var y=u(n,"g","layer-between");t.shapelayerBetween=u(y,"g","shapelayer"),t.imagelayerBetween=u(y,"g","imagelayer"),u(n,"path","xlines-below"),u(n,"path","ylines-below"),t.overlinesBelow=u(n,"g","overlines-below"),u(n,"g","xaxislayer-below"),u(n,"g","yaxislayer-below"),t.overaxesBelow=u(n,"g","overaxes-below")}t.overplot=u(n,"g","overplot"),t.plot=u(t.overplot,"g",i),t.zerolinelayerAbove=m&&d?m.zerolinelayerAbove:u(n,"g","zerolinelayer-above"),a||(t.xlines=u(n,"path","xlines-above"),t.ylines=u(n,"path","ylines-above"),t.overlinesAbove=u(n,"g","overlines-above"),u(n,"g","xaxislayer-above"),u(n,"g","yaxislayer-above"),t.overaxesAbove=u(n,"g","overaxes-above"),t.xlines=n.select(".xlines-"+o),t.ylines=n.select(".ylines-"+c),t.xaxislayer=n.select(".xaxislayer-"+o),t.yaxislayer=n.select(".yaxislayer-"+c))}else{var v=m.plotgroup,x=i+"-x",_=i+"-y";t.minorGridlayer=m.minorGridlayer,t.gridlayer=m.gridlayer,t.zerolinelayer=m.zerolinelayer,t.zerolinelayerAbove=m.zerolinelayerAbove,u(m.overlinesBelow,"path",x),u(m.overlinesBelow,"path",_),u(m.overaxesBelow,"g",x),u(m.overaxesBelow,"g",_),t.plot=u(m.overplot,"g",i),u(m.overlinesAbove,"path",x),u(m.overlinesAbove,"path",_),u(m.overaxesAbove,"g",x),u(m.overaxesAbove,"g",_),t.xlines=v.select(".overlines-"+o).select("."+x),t.ylines=v.select(".overlines-"+c).select("."+_),t.xaxislayer=v.select(".overaxes-"+o).select("."+x),t.yaxislayer=v.select(".overaxes-"+c).select("."+_)}a||(p||(h(t.minorGridlayer,"g",t.xaxis._id),h(t.minorGridlayer,"g",t.yaxis._id),t.minorGridlayer.selectAll("g").map((function(e){return e[0]})).sort(s.idSort),h(t.gridlayer,"g",t.xaxis._id),h(t.gridlayer,"g",t.yaxis._id),t.gridlayer.selectAll("g").map((function(e){return e[0]})).sort(s.idSort)),t.xlines.style("fill","none").classed("crisp",!0),t.ylines.style("fill","none").classed("crisp",!0))}function m(e,r){if(e){var n={};for(var i in e.each((function(e){var i=e[0];t.select(this).remove(),g(i,r),n[i]=!0})),r._plots)for(var a=r._plots[i].overlays||[],o=0;o0){var g=m.id;if(-1!==g.indexOf(f))continue;g+=f+(u+1),m=n.extendFlat({},m,{id:g,plot:o._cartesianlayer.selectAll(".subplot").select("."+g)})}for(var y,v=[],x=0;x1&&(w+=f+b),_.push(n+w),r=0;r=0,x=t.indexOf("end")>=0,_=d.backoff*g+a.standoff,b=m.backoff*y+a.startstandoff;if("line"===p.nodeName){c={x:+e.attr("x1"),y:+e.attr("y1")},u={x:+e.attr("x2"),y:+e.attr("y2")};var w=c.x-u.x,T=c.y-u.y;if(f=(h=Math.atan2(T,w))+Math.PI,_&&b&&_+b>Math.sqrt(w*w+T*T))return void D();if(_){if(_*_>w*w+T*T)return void D();var k=_*Math.cos(h),A=_*Math.sin(h);u.x+=k,u.y+=A,e.attr({x2:u.x,y2:u.y})}if(b){if(b*b>w*w+T*T)return void D();var M=b*Math.cos(h),S=b*Math.sin(h);c.x-=M,c.y-=S,e.attr({x1:c.x,y1:c.y})}}else if("path"===p.nodeName){var E=p.getTotalLength(),C="";if(E<_+b)return void D();var I=p.getPointAtLength(0),L=p.getPointAtLength(.1);h=Math.atan2(I.y-L.y,I.x-L.x),c=p.getPointAtLength(Math.min(b,E)),C="0px,"+b+"px,";var P=p.getPointAtLength(E),z=p.getPointAtLength(E-.1);f=Math.atan2(P.y-z.y,P.x-z.x),u=p.getPointAtLength(Math.max(0,E-_)),C+=E-(C?b+_:_)+"px,"+E+"px",e.style("stroke-dasharray",C)}function D(){e.style("stroke-dasharray","0px,100px")}function O(t,i,c,u){t.path&&(t.noRotate&&(c=0),r.select(p.parentNode).append("path").attr({class:e.attr("class"),d:t.path,transform:l(i.x,i.y)+s(180*c/Math.PI)+o(u)}).style({fill:n.rgb(a.arrowcolor),"stroke-width":0}))}v&&O(m,c,h,y),x&&O(d,u,f,g)}}}),Pi=m({"src/components/annotations/draw.js"(e,t){var r=b(),n=He(),i=At(),a=ct(),o=a.strTranslate,s=ar(),l=W(),c=er(),u=Or(),h=Et(),f=dr(),p=pr(),d=vt().arrayEditor,m=Li();function g(e,t){var r=e._fullLayout.annotations[t]||{},n=s.getFromId(e,r.xref),i=s.getFromId(e,r.yref);n&&n.setScale(),i&&i.setScale(),v(e,r,t,!1,n,i)}function y(e,t,r,n,i){var a=i[r],o=i[r+"ref"],l=-1!==r.indexOf("y"),c="domain"===s.getRefType(o),u=l?n.h:n.w;return e?c?a+(l?-t:t)/e._length:e.p2r(e.r2p(a)+t):a+(l?-t:t)/u}function v(e,t,i,g,v,x){var _,b,w=e._fullLayout,T=e._fullLayout._size,k=e._context.edits;g?(_="annotation-"+g,b=g+".annotations"):(_="annotation",b="annotations");var A=d(e.layout,b,t),M=A.modifyBase,S=A.modifyItem,E=A.getUpdateObj;w._infolayer.selectAll("."+_+'[data-index="'+i+'"]').remove();var C="clip"+w._uid+"_ann"+i;if(t._input&&!1!==t.visible){var I={x:{},y:{}},L=+t.textangle||0,P=w._infolayer.append("g").classed(_,!0).attr("data-index",String(i)).style("opacity",t.opacity),z=P.append("g").classed("annotation-text-g",!0),D=k[t.showarrow?"annotationTail":"annotationPosition"],O=t.captureevents||k.annotationText||D,R=z.append("g").style("pointer-events",O?"all":null).call(f,"pointer").on("click",(function(){e._dragging=!1,e.emit("plotly_clickannotation",W(r.event))}));t.hovertext&&R.on("mouseover",(function(){var r=t.hoverlabel,n=r.font,i=this.getBoundingClientRect(),a=e.getBoundingClientRect();u.loneHover({x0:i.left-a.left,x1:i.right-a.left,y:(i.top+i.bottom)/2-a.top,text:t.hovertext,color:r.bgcolor,borderColor:r.bordercolor,fontFamily:n.family,fontSize:n.size,fontColor:n.color,fontWeight:n.weight,fontStyle:n.style,fontVariant:n.variant,fontShadow:n.fontShadow,fontLineposition:n.fontLineposition,fontTextcase:n.fontTextcase},{container:w._hoverlayer.node(),outerContainer:w._paper.node(),gd:e})})).on("mouseout",(function(){u.loneUnhover(w._hoverlayer.node())}));var F=t.borderwidth,B=t.borderpad,j=F+B,N=R.append("rect").attr("class","bg").style("stroke-width",F+"px").call(l.stroke,t.bordercolor).call(l.fill,t.bgcolor),U=t.width||t.height,V=w._topclips.selectAll("#"+C).data(U?[0]:[]);V.enter().append("clipPath").classed("annclip",!0).attr("id",C).append("rect"),V.exit().remove();var q=t.font,H=w._meta?a.templateString(t.text,w._meta):t.text,G=R.append("text").classed("annotation-text",!0).text(H);k.annotationText?G.call(h.makeEditable,{delegate:R,gd:e}).call(Z).on("edit",(function(r){t.text=r,this.call(Z),S("text",r),v&&v.autorange&&M(v._name+".autorange",!0),x&&x.autorange&&M(x._name+".autorange",!0),n.call("_guiRelayout",e,E())})):G.call(Z)}else r.selectAll("#"+C).remove();function W(e){var r={index:i,annotation:t._input,fullAnnotation:t,event:e};return g&&(r.subplotId=g),r}function Z(r){return r.call(c.font,q).attr({"text-anchor":{left:"start",right:"end"}[t.align]||"middle"}),h.convertToTspans(r,e,Y),r}function Y(){var r=G.selectAll("a");1===r.size()&&r.text()===G.text()&&R.insert("a",":first-child").attr({"xlink:xlink:href":r.attr("xlink:href"),"xlink:xlink:show":r.attr("xlink:show")}).style({cursor:"pointer"}).node().appendChild(N.node());var i=R.select(".annotation-text-math-group"),u=!i.empty(),d=c.bBox((u?i:G).node()),_=d.width,b=d.height,A=t.width||_,O=t.height||b,B=Math.round(A+2*j),q=Math.round(O+2*j);function H(e,t){return"auto"===t&&(t=e<1/3?"left":e>2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[t]}for(var Z=!1,Y=["x","y"],X=0;X1)&&(ne===re?((pe=ie.r2fraction(t["a"+te]))<0||pe>1)&&(Z=!0):Z=!0),$=ie._offset+ie.r2p(t[te]),Q=.5}else{var de="domain"===fe;"x"===te?(J=t[te],$=de?ie._offset+ie._length*J:$=T.l+T.w*J):(J=1-t[te],$=de?ie._offset+ie._length*J:$=T.t+T.h*J),Q=t.showarrow?.5:J}if(t.showarrow){he.head=$;var me=t["a"+te];if(ee=oe*H(.5,t.xanchor)-se*H(.5,t.yanchor),ne===re){var ge=s.getRefType(ne);"domain"===ge?("y"===te&&(me=1-me),he.tail=ie._offset+ie._length*me):"paper"===ge?"y"===te?(me=1-me,he.tail=T.t+T.h*me):he.tail=T.l+T.w*me:he.tail=ie._offset+ie.r2p(me),K=ee}else he.tail=$+me,K=ee+me;he.text=he.tail+ee;var ye=w["x"===te?"width":"height"];if("paper"===re&&(he.head=a.constrain(he.head,1,ye-1)),"pixel"===ne){var ve=-Math.max(he.tail-3,he.text),xe=Math.min(he.tail+3,he.text)-ye;ve>0?(he.tail+=ve,he.text+=ve):xe>0&&(he.tail-=xe,he.text-=xe)}he.tail+=ue,he.head+=ue}else K=ee=le*H(Q,ce),he.text=$+ee;he.text+=ue,ee+=ue,K+=ue,t["_"+te+"padplus"]=le/2+K,t["_"+te+"padminus"]=le/2-K,t["_"+te+"size"]=le,t["_"+te+"shift"]=ee}if(Z)R.remove();else{var _e=0,be=0;if("left"!==t.align&&(_e=(A-_)*("center"===t.align?.5:1)),"top"!==t.valign&&(be=(O-b)*("middle"===t.valign?.5:1)),u)i.select("svg").attr({x:j+_e-1,y:j+be}).call(c.setClipUrl,U?C:null,e);else{var we=j+be-d.top,Te=j+_e-d.left;G.call(h.positionText,Te,we).call(c.setClipUrl,U?C:null,e)}V.select("rect").call(c.setRect,j,j,A,O),N.call(c.setRect,F/2,F/2,B-F,q-F),R.call(c.setTranslate,Math.round(I.x.text-B/2),Math.round(I.y.text-q/2)),z.attr({transform:"rotate("+L+","+I.x.text+","+I.y.text+")"});var ke,Ae=function(r,i){P.selectAll(".annotation-arrow-g").remove();var s=I.x.head,u=I.y.head,h=I.x.tail+r,f=I.y.tail+i,d=I.x.text+r,_=I.y.text+i,b=a.rotationXYMatrix(L,d,_),w=a.apply2DTransform(b),A=a.apply2DTransform2(b),C=+N.attr("width"),D=+N.attr("height"),O=d-.5*C,F=O+C,B=_-.5*D,j=B+D,U=[[O,B,O,j],[O,j,F,j],[F,j,F,B],[F,B,O,B]].map(A);if(!U.reduce((function(e,t){return e^!!a.segmentsIntersect(s,u,s+1e6,u+1e6,t[0],t[1],t[2],t[3])}),!1)){U.forEach((function(e){var t=a.segmentsIntersect(h,f,s,u,e[0],e[1],e[2],e[3]);t&&(h=t.x,f=t.y)}));var V=t.arrowwidth,q=t.arrowcolor,H=t.arrowside,G=P.append("g").style({opacity:l.opacity(q)}).classed("annotation-arrow-g",!0),W=G.append("path").attr("d","M"+h+","+f+"L"+s+","+u).style("stroke-width",V+"px").call(l.stroke,l.rgb(q));if(m(W,H,t),k.annotationPosition&&W.node().parentNode&&!g){var Z=s,Y=u;if(t.standoff){var X=Math.sqrt(Math.pow(s-h,2)+Math.pow(u-f,2));Z+=t.standoff*(h-s)/X,Y+=t.standoff*(f-u)/X}var $,K,J=G.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(h-Z)+","+(f-Y),transform:o(Z,Y)}).style("stroke-width",V+6+"px").call(l.stroke,"rgba(0,0,0,0)").call(l.fill,"rgba(0,0,0,0)");p.init({element:J.node(),gd:e,prepFn:function(){var e=c.getTranslate(R);$=e.x,K=e.y,v&&v.autorange&&M(v._name+".autorange",!0),x&&x.autorange&&M(x._name+".autorange",!0)},moveFn:function(e,r){var n=w($,K),i=n[0]+e,a=n[1]+r;R.call(c.setTranslate,i,a),S("x",y(v,e,"x",T,t)),S("y",y(x,r,"y",T,t)),t.axref===t.xref&&S("ax",y(v,e,"ax",T,t)),t.ayref===t.yref&&S("ay",y(x,r,"ay",T,t)),G.attr("transform",o(e,r)),z.attr({transform:"rotate("+L+","+i+","+a+")"})},doneFn:function(){n.call("_guiRelayout",e,E());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}};t.showarrow&&Ae(0,0),D&&p.init({element:R.node(),gd:e,prepFn:function(){ke=z.attr("transform")},moveFn:function(e,r){var n="pointer";if(t.showarrow)t.axref===t.xref?S("ax",y(v,e,"ax",T,t)):S("ax",t.ax+e),t.ayref===t.yref?S("ay",y(x,r,"ay",T.w,t)):S("ay",t.ay+r),Ae(e,r);else{if(g)return;var i,a;if(v)i=y(v,e,"x",T,t);else{var s=t._xsize/T.w,l=t.x+(t._xshift-t.xshift)/T.w-s/2;i=p.align(l+e/T.w,s,0,1,t.xanchor)}if(x)a=y(x,r,"y",T,t);else{var c=t._ysize/T.h,u=t.y-(t._yshift+t.yshift)/T.h-c/2;a=p.align(u-r/T.h,c,0,1,t.yanchor)}S("x",i),S("y",a),(!v||!x)&&(n=p.getCursor(v?.5:i,x?.5:a,t.xanchor,t.yanchor))}z.attr({transform:o(e,r)+ke}),f(R,n)},clickFn:function(r,n){t.captureevents&&e.emit("plotly_clickannotation",W(n))},doneFn:function(){f(R),n.call("_guiRelayout",e,E());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}}t.exports={draw:function(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r0||r.explicitOff.length>0},onClick:function(e,t){var o,s,l=a(e,t),c=l.on,u=l.off.concat(l.explicitOff),h={},f=e._fullLayout.annotations;if(c.length||u.length){for(o=0;o1){c=!0;break}}c?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+s+'"]').remove():(l._pdata=n(e.glplot.cameraParams,[t.xaxis.r2l(l.x)*a[0],t.yaxis.r2l(l.y)*a[1],t.zaxis.r2l(l.z)*a[2]]),r(e.graphDiv,l,s,e.id,l._xa,l._ya))}}}}),Hi=m({"src/components/annotations3d/index.js"(e,t){var r=He(),n=ct();t.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:ji()}}},layoutAttributes:ji(),handleDefaults:Ni(),includeBasePlot:function(e,t){var i=r.subplotsRegistry.gl3d;if(i)for(var a=i.attrRegex,o=Object.keys(e),s=0;s{var m,g,y,v,x=a+"anchor",_="x"===a?h:f,b={_fullLayout:i};let w=e[a+"ref"];if(Array.isArray(w)&&w.length>0){let r=o.countDefiningCoords(c,l,a);v=n.coerceRefArray(e,t,b,a,void 0,"paper",r),t["_"+a+"refArray"]=!0}else v=n.coerceRef(e,t,b,a,void 0,"paper");if(Array.isArray(v))v.forEach((function(e){"range"===n.getRefType(e)&&(m=n.getFromId(b,e))&&-1===m._shapeIndices.indexOf(t._index)&&m._shapeIndices.push(t._index)})),u&&[0,1].forEach((function(i){let l=v[i];"range"===n.getRefType(l)?(m=n.getFromId(b,l),g=o.shapePositionToRange(m),y=o.rangeToShapePosition(m),("category"===m.type||"multicategory"===m.type)&&s(a+i+"shift")):g=y=r.identity;let c=a+i,u=e[c];if(e[c]=g(e[c],!0),"pixel"===_?s(c,d[i]):n.coercePosition(t,b,s,l,c,p[i]),t[c]=y(t[c]),e[c]=u,0===i&&"pixel"===_){let r=e[x];e[x]=g(e[x],!0),n.coercePosition(t,b,s,l,x,.25),t[x]=y(t[x]),e[x]=r}}));else{if("range"===n.getRefType(v)?((m=n.getFromId(b,v))._shapeIndices.push(t._index),y=o.rangeToShapePosition(m),g=o.shapePositionToRange(m),u&&("category"===m.type||"multicategory"===m.type)&&(s(a+"0shift"),s(a+"1shift"))):g=y=r.identity,u){let r=a+"0",i=a+"1",o=e[r],l=e[i];e[r]=g(e[r],!0),e[i]=g(e[i],!0),"pixel"===_?(s(r,d[0]),s(i,d[1])):(n.coercePosition(t,b,s,v,r,p[0]),n.coercePosition(t,b,s,v,i,p[1])),t[r]=y(t[r]),t[i]=y(t[i]),e[r]=o,e[i]=l}if("pixel"===_){let r=e[x];e[x]=g(e[x],!0),n.coercePosition(t,b,s,v,x,.25),t[x]=y(t[x]),e[x]=r}}})),u&&r.noneOrAll(e,t,["x0","x1","y0","y1"]);var m,g,y="line"===c;if(u&&(m=s("label.texttemplate"),s("label.texttemplatefallback")),m||(g=s("label.text")),g||m){s("label.textangle");var v=s("label.textposition",y?"middle":"middle center");s("label.xanchor"),s("label.yanchor",function(e,t){return e?"bottom":-1!==t.indexOf("top")?"top":-1!==t.indexOf("bottom")?"bottom":"middle"}(y,v)),s("label.padding"),r.coerceFont(s,"label.font",i.font)}}t.exports=function(e,t){i(e,t,{name:"shapes",handleItemDefaults:s})}}}),Zi=m({"src/components/shapes/draw_newshape/defaults.js"(e,t){var r=W(),n=ct();t.exports=function(e,t,i){if(i("newshape.visible"),i("newshape.name"),i("newshape.showlegend"),i("newshape.legend"),i("newshape.legendwidth"),i("newshape.legendgroup"),i("newshape.legendgrouptitle.text"),n.coerceFont(i,"newshape.legendgrouptitle.font"),i("newshape.legendrank"),i("newshape.drawdirection"),i("newshape.layer"),i("newshape.fillcolor"),i("newshape.fillrule"),i("newshape.opacity"),i("newshape.line.width")){var a=(e||{}).plot_bgcolor||"#FFF";i("newshape.line.color",r.contrast(a)),i("newshape.line.dash")}var o="drawline"===e.dragmode,s=i("newshape.label.text"),l=i("newshape.label.texttemplate");if(i("newshape.label.texttemplatefallback"),s||l){i("newshape.label.textangle");var c=i("newshape.label.textposition",o?"middle":"middle center");i("newshape.label.xanchor"),i("newshape.label.yanchor",function(e,t){return e?"bottom":-1!==t.indexOf("top")?"top":-1!==t.indexOf("bottom")?"bottom":"middle"}(o,c)),i("newshape.label.padding"),n.coerceFont(i,"newshape.label.font",t.font)}i("activeshape.fillcolor"),i("activeshape.opacity")}}}),Yi=m({"src/components/shapes/calc_autorange.js"(e,t){var r=ct(),n=ar(),i=Hr(),a=Gr();function o(e,t,r){let o=t[r+"ref"],s="x"===r?i.paramIsX:i.paramIsY;function l(e,t){"paper"===e||"domain"===n.getRefType(e)||(c[e]||(c[e]=[]),c[e].push(t))}let c={};if("path"===t.type&&t.path){let e=t.path.match(i.segmentRE)||[];for(var u=0,h=0;hr&&(l(o[u],n[r]),u++)}}else l(o[0],t[r+"0"]),l(o[1],t[r+"1"]);let f={};for(let t in c){let r=n.getFromId(e,t);if(r){var p="category"===r.type||"multicategory"===r.type?r.r2c:r.d2c;"date"===r.type&&(p=a.decodeDate(p)),f[r._id]=c[t].map(p)}}return f}function s(e){return c(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function l(e){return c(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function c(e,t,n,o,s,l){var c=e/2,u=l;if("pixel"===t){var h=s?a.extractPathCoords(s,l?i.paramIsY:i.paramIsX):[n,o],f=r.aggNums(Math.max,null,h),p=r.aggNums(Math.min,null,h),d=p<0?Math.abs(p)+c:c,m=f>0?f+c:c;return{ppad:c,ppadplus:u?d:m,ppadminus:u?m:d}}return{ppad:c}}function u(e,t,r){var n,o,s="x"===e._id.charAt(0)?"x":"y",l="category"===e.type||"multicategory"===e.type,c=0,u=0,h=l?e.r2c:e.d2c;if("scaled"===t[s+"sizemode"]?(n=t[s+"0"],o=t[s+"1"],l&&(c=t[s+"0shift"],u=t[s+"1shift"])):(n=t[s+"anchor"],o=t[s+"anchor"]),void 0!==n)return[h(n)+c,h(o)+u];if(t.path){var f,p,d,m,g=1/0,y=-1/0,v=t.path.match(i.segmentRE);for("date"===e.type&&(h=a.decodeDate(h)),f=0;fy&&(y=m));if(y>=g)return[g,y]}}t.exports=function(e){var t=e._fullLayout,a=r.filterVisible(t.shapes);if(a.length&&e._fullData.length)for(var c=0;c{f=n.getFromId(e,t),h._extremes[f._id]=n.findExtremes(f,r,s(h))}))}else"paper"!==h.xref&&"domain"!==d&&(p=u(f=n.getFromId(e,h.xref),h,i.paramIsX))&&(h._extremes[f._id]=n.findExtremes(f,p,s(h)));if("array"===m){let t=o(e,h,"y");Object.entries(t).forEach((([t,r])=>{f=n.getFromId(e,t),h._extremes[f._id]=n.findExtremes(f,r,l(h))}))}else"paper"!==h.yref&&"domain"!==m&&(p=u(f=n.getFromId(e,h.yref),h,i.paramIsY))&&(h._extremes[f._id]=n.findExtremes(f,p,l(h)))}}}}),Xi=m({"src/components/shapes/index.js"(e,t){var r=Yr();t.exports={moduleType:"component",name:"shapes",layoutAttributes:Gi(),supplyLayoutDefaults:Wi(),supplyDrawNewShapeDefaults:Zi(),includeBasePlot:En()("shapes"),calcAutorange:Yi(),draw:r.draw,drawOne:r.drawOne}}}),$i=m({"src/components/images/attributes.js"(e,t){var r=xt(),n=vt().templatedArray;_n(),t.exports=n("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",r.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",r.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}}),Ki=m({"src/components/images/defaults.js"(e,t){var r=ct(),n=ar(),i=Nt(),a=$i();function o(e,t,i){function o(n,i){return r.coerce(e,t,a,n,i)}var s=o("source");if(!o("visible",!!s))return t;o("layer"),o("xanchor"),o("yanchor"),o("sizex"),o("sizey"),o("sizing"),o("opacity");for(var l={_fullLayout:i},c=["x","y"],u=0;u<2;u++){var h=c[u],f=n.coerceRef(e,t,l,h,"paper",void 0);"paper"!==f&&n.getFromId(l,f)._imgIndices.push(t._index),n.coercePosition(t,l,o,f,h,0)}return t}t.exports=function(e,t){i(e,t,{name:"images",handleItemDefaults:o})}}}),Ji=m({"src/components/images/draw.js"(e,t){var r=b(),n=er(),i=ar(),a=_t(),o=Mt();t.exports=function(e){var t,s,l=e._fullLayout,c=[],u={},h=[];for(s=0;s0)&&(o("active"),o("direction"),o("type"),o("showactive"),o("x"),o("y"),r.noneOrAll(e,t,["x","y"]),o("xanchor"),o("yanchor"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),r.coerceFont(o,"font",a.font),o("bgcolor",a.paper_bgcolor),o("bordercolor"),o("borderwidth"))}function l(e,t){function n(n,i){return r.coerce(e,t,o,n,i)}n("visible","skip"===e.method||Array.isArray(e.args))&&(n("method"),n("args"),n("args2"),n("label"),n("execute"))}t.exports=function(e,t){n(e,t,{name:a,handleItemDefaults:s})}}}),ia=m({"src/components/updatemenus/scrollbox.js"(e,t){t.exports=o;var r=b(),n=W(),i=er(),a=ct();function o(e,t,r){this.gd=e,this.container=t,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}o.barWidth=2,o.barLength=20,o.barRadius=2,o.barPad=1,o.barColor="#808BA4",o.prototype.enable=function(e,t,a){var s=this.gd._fullLayout,l=s.width,c=s.height;this.position=e;var u,h,f,p,d=this.position.l,m=this.position.w,g=this.position.t,y=this.position.h,v=this.position.direction,x="down"===v,_="left"===v,b="up"===v,w=m,T=y;!x&&!_&&!("right"===v)&&!b&&(this.position.direction="down",x=!0),x||b?(h=(u=d)+w,x?(f=g,T=(p=Math.min(f+T,c))-f):T=(p=g+T)-(f=Math.max(p-T,0))):(p=(f=g)+T,_?w=(h=d+w)-(u=Math.max(h-w,0)):(u=d,w=(h=Math.min(u+w,l))-u)),this._box={l:u,t:f,w,h:T};var k=m>w,A=o.barLength+2*o.barPad,M=o.barWidth+2*o.barPad,S=d,E=g+y;E+M>c&&(E=c-M);var C=this.container.selectAll("rect.scrollbar-horizontal").data(k?[0]:[]);C.exit().on(".drag",null).remove(),C.enter().append("rect").classed("scrollbar-horizontal",!0).call(n.fill,o.barColor),k?(this.hbar=C.attr({rx:o.barRadius,ry:o.barRadius,x:S,y:E,width:A,height:M}),this._hbarXMin=S+A/2,this._hbarTranslateMax=w-A):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var I=y>T,L=o.barWidth+2*o.barPad,P=o.barLength+2*o.barPad,z=d+m,D=g;z+L>l&&(z=l-L);var O=this.container.selectAll("rect.scrollbar-vertical").data(I?[0]:[]);O.exit().on(".drag",null).remove(),O.enter().append("rect").classed("scrollbar-vertical",!0).call(n.fill,o.barColor),I?(this.vbar=O.attr({rx:o.barRadius,ry:o.barRadius,x:z,y:D,width:L,height:P}),this._vbarYMin=D+P/2,this._vbarTranslateMax=T-P):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var R=this.id,F=u-.5,B=I?h+L+.5:h+.5,j=f-.5,N=k?p+M+.5:p+.5,U=s._topdefs.selectAll("#"+R).data(k||I?[0]:[]);if(U.exit().remove(),U.enter().append("clipPath").attr("id",R).append("rect"),k||I?(this._clipRect=U.select("rect").attr({x:Math.floor(F),y:Math.floor(j),width:Math.ceil(B)-Math.floor(F),height:Math.ceil(N)-Math.floor(j)}),this.container.call(i.setClipUrl,R,this.gd),this.bg.attr({x:d,y:g,width:m,height:y})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),k||I){var V=r.behavior.drag().on("dragstart",(function(){r.event.sourceEvent.preventDefault()})).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(V);var q=r.behavior.drag().on("dragstart",(function(){r.event.sourceEvent.preventDefault(),r.event.sourceEvent.stopPropagation()})).on("drag",this._onBarDrag.bind(this));k&&this.hbar.on(".drag",null).call(q),I&&this.vbar.on(".drag",null).call(q)}this.setTranslate(t,a)},o.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},o.prototype._onBoxDrag=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e-=r.event.dx),this.vbar&&(t-=r.event.dy),this.setTranslate(e,t)},o.prototype._onBoxWheel=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e+=r.event.deltaY),this.vbar&&(t+=r.event.deltaY),this.setTranslate(e,t)},o.prototype._onBarDrag=function(){var e=this.translateX,t=this.translateY;if(this.hbar){var n=e+this._hbarXMin,i=n+this._hbarTranslateMax;e=(a.constrain(r.event.x,n,i)-n)/(i-n)*(this.position.w-this._box.w)}if(this.vbar){var o=t+this._vbarYMin,s=o+this._vbarTranslateMax;t=(a.constrain(r.event.y,o,s)-o)/(s-o)*(this.position.h-this._box.h)}this.setTranslate(e,t)},o.prototype.setTranslate=function(e,t){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(e=a.constrain(e||0,0,r),t=a.constrain(t||0,0,n),this.translateX=e,this.translateY=t,this.container.call(i.setTranslate,this._box.l-this.position.l-e,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+e-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var o=e/r;this.hbar.call(i.setTranslate,e+o*this._hbarTranslateMax,t)}if(this.vbar){var s=t/n;this.vbar.call(i.setTranslate,e,t+s*this._vbarTranslateMax)}}}}),aa=m({"src/components/updatemenus/draw.js"(e,t){var r=b(),n=At(),i=W(),a=er(),o=ct(),s=Et(),l=vt().arrayEditor,c=St().LINE_SPACING,u=ta(),h=ia();function f(e){return e._index}function p(e,t){return+e.attr(u.menuIndexAttrName)===t._index}function d(e,t,r,n,i,a,o,s){t.active=o,l(e.layout,u.name,t).applyUpdate("active",o),"buttons"===t.type?g(e,n,null,null,t):"dropdown"===t.type&&(i.attr(u.menuIndexAttrName,"-1"),m(e,n,i,a,t),s||g(e,n,i,a,t))}function m(e,t,r,n,i){var s=o.ensureSingle(t,"g",u.headerClassName,(function(e){e.style("pointer-events","all")})),l=i._dims,c=i.active,h=i.buttons[c]||u.blankHeaderOpts,f={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},d={width:l.headerWidth,height:l.headerHeight};s.call(y,i,h,e).call(M,i,f,d),o.ensureSingle(t,"text",u.headerArrowClassName,(function(e){e.attr("text-anchor","end").call(a.font,i.font).text(u.arrowSymbol[i.direction])})).attr({x:l.headerWidth-u.arrowOffsetX+i.pad.l,y:l.headerHeight/2+u.textOffsetY+i.pad.t}),s.on("click",(function(){r.call(S,String(p(r,i)?-1:i._index)),g(e,t,r,n,i)})),s.on("mouseover",(function(){s.call(w)})),s.on("mouseout",(function(){s.call(T,i)})),a.setTranslate(t,l.lx,l.ly)}function g(e,t,i,a,s){i||(i=t).attr("pointer-events","all");var l=function(e){return-1==+e.attr(u.menuIndexAttrName)}(i)&&"buttons"!==s.type?[]:s.buttons,c="dropdown"===s.type?u.dropdownButtonClassName:u.buttonClassName,h=i.selectAll("g."+c).data(o.filterVisible(l)),f=h.enter().append("g").classed(c,!0),p=h.exit();"dropdown"===s.type?(f.attr("opacity","0").transition().attr("opacity","1"),p.transition().attr("opacity","0").remove()):p.remove();var m=0,g=0,v=s._dims,x=-1!==["up","down"].indexOf(s.direction);"dropdown"===s.type&&(x?g=v.headerHeight+u.gapButtonHeader:m=v.headerWidth+u.gapButtonHeader),"dropdown"===s.type&&"up"===s.direction&&(g=-u.gapButtonHeader+u.gapButton-v.openHeight),"dropdown"===s.type&&"left"===s.direction&&(m=-u.gapButtonHeader+u.gapButton-v.openWidth);var b={x:v.lx+m+s.pad.l,y:v.ly+g+s.pad.t,yPad:u.gapButton,xPad:u.gapButton,index:0},k={l:b.x+s.borderwidth,t:b.y+s.borderwidth};h.each((function(o,l){var c=r.select(this);c.call(y,s,o,e).call(M,s,b),c.on("click",(function(){r.event.defaultPrevented||(o.execute&&(o.args2&&s.active===l?(d(e,s,0,t,i,a,-1),n.executeAPICommand(e,o.method,o.args2)):(d(e,s,0,t,i,a,l),n.executeAPICommand(e,o.method,o.args))),e.emit("plotly_buttonclicked",{menu:s,button:o,active:s.active}))})),c.on("mouseover",(function(){c.call(w)})),c.on("mouseout",(function(){c.call(T,s),h.call(_,s)}))})),h.call(_,s),x?(k.w=Math.max(v.openWidth,v.headerWidth),k.h=b.y-k.t):(k.w=b.x-k.l,k.h=Math.max(v.openHeight,v.headerHeight)),k.direction=s.direction,a&&(h.size()?function(e,t,r,n,i,a){var o,s,l,c=i.direction,h="up"===c||"down"===c,f=i._dims,p=i.active;if(h)for(s=0,l=0;l0?[0]:[]);if(s.enter().append("g").classed(u.containerClassName,!0).style("cursor","pointer"),s.exit().each((function(){r.select(this).selectAll("g."+u.headerGroupClassName).each(a)})).remove(),0!==i.length){var l=s.selectAll("g."+u.headerGroupClassName).data(i,f);l.enter().append("g").classed(u.headerGroupClassName,!0);for(var c=o.ensureSingle(s,"g",u.dropdownButtonGroupClassName,(function(e){e.style("pointer-events","all")})),y=0;y0&&(l=l.transition().duration(t.transition.duration).ease(t.transition.easing)),l.attr("transform",s(o-.5*u.gripWidth,t._dims.currentValueTotalHeight))}}function E(e,t){var r=e._dims;return r.inputAreaStart+u.stepInset+(r.inputAreaLength-2*u.stepInset)*Math.min(1,Math.max(0,t))}function C(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-u.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*u.stepInset-2*r.inputAreaStart)))}function I(e,t,r){var n=r._dims,s=o.ensureSingle(e,"rect",u.railTouchRectClass,(function(n){n.call(A,t,e,r).style("pointer-events","all")}));s.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,u.tickOffset+r.ticklen+n.labelHeight)}).call(i.fill,r.bgcolor).attr("opacity",0),a.setTranslate(s,0,n.currentValueTotalHeight)}function L(e,t){var r=t._dims,n=r.inputAreaLength-2*u.railInset,s=o.ensureSingle(e,"rect",u.railRectClass);s.attr({width:n,height:u.railWidth,rx:u.railRadius,ry:u.railRadius,"shape-rendering":"crispEdges"}).call(i.stroke,t.bordercolor).call(i.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),a.setTranslate(s,u.railInset,.5*(r.inputAreaWidth-u.railWidth)+r.currentValueTotalHeight)}t.exports=function(e){var t=e._context.staticPlot,i=e._fullLayout,o=function(e,t){for(var r=e[u.name],n=[],i=0;i0?[0]:[]);function l(t){t._commandObserver&&(t._commandObserver.remove(),delete t._commandObserver),n.autoMargin(e,m(t))}if(s.enter().append("g").classed(u.containerClassName,!0).style("cursor",t?null:"ew-resize"),s.exit().each((function(){r.select(this).selectAll("g."+u.groupClassName).each(l)})).remove(),0!==o.length){var c=s.selectAll("g."+u.groupClassName).data(o,g);c.enter().append("g").classed(u.groupClassName,!0),c.exit().each(l).remove();for(var h=0;h0?e.touches[0].clientX:0}function g(e,t,r,n){var i=a.ensureSingle(e,"rect",d.bgClassName,(function(e){e.attr({x:0,y:0,"shape-rendering":"crispEdges"})})),c=n.borderwidth%2==0?n.borderwidth:n.borderwidth-1,u=-n._offsetShift,h=s.crispRound(t,n.borderwidth);i.attr({width:n._width+c,height:n._height+c,transform:o(u,u),"stroke-width":h}).call(l.stroke,n.bordercolor).call(l.fill,n.bgcolor)}function y(e,t,r,n){var i=t._fullLayout;a.ensureSingleById(i._topdefs,"clipPath",n._clipId,(function(e){e.append("rect").attr({x:0,y:0})})).select("rect").attr({width:n._width,height:n._height})}function v(e,t,n,o){var l,c=t.calcdata,f=e.selectAll("g."+d.rangePlotClassName).data(n._subplotsWith,a.identity);f.enter().append("g").attr("class",(function(e){return d.rangePlotClassName+" "+e})).call(s.setClipUrl,o._clipId,t),f.order(),f.exit().remove(),f.each((function(e,a){var s=r.select(this),f=0===a,p=h.getFromId(t,e,"y"),d=p._name,m=o[d],g={data:[],layout:{xaxis:{type:n.type,domain:[0,1],range:o.range.slice(),calendar:n.calendar},width:o._width,height:o._height,margin:{t:0,b:0,l:0,r:0}},_context:t._context};n.rangebreaks&&(g.layout.xaxis.rangebreaks=n.rangebreaks),g.layout[d]={type:p.type,domain:[0,1],range:"match"!==m.rangemode?m.range.slice():p.range.slice(),calendar:p.calendar},p.rangebreaks&&(g.layout[d].rangebreaks=p.rangebreaks),i.supplyDefaults(g);var y=g._fullLayout.xaxis,v=g._fullLayout[d];y.clearCalc(),y.setScale(),v.clearCalc(),v.setScale();var x={id:e,plotgroup:s,xaxis:y,yaxis:v,isRangePlot:!0};f?l=x:(x.mainplot="xy",x.mainplotinfo=l),u.rangePlot(t,x,function(e,t){for(var r=[],n=0;n=n.max)t=B[r+1];else if(e=n.pmax)t=B[r+1];else if(ei._length||v+b<0)return;u=y+b,f=v+b;break;case l:if(_="col-resize",y+b>i._length)return;u=y+b,f=v;break;case c:if(_="col-resize",v+b<0)return;u=y,f=v+b;break;default:_="ew-resize",u=g,f=g+b}if(f0)){var m=function(e,t,r){for(var n=r.filter((function(r){return t[r].anchor===e._id})),i=0,a=0;a1){f||p||d||"independent"===k("pattern")&&(f=!0),g._hasSubplotGrid=f;var x,_,b="top to bottom"===k("roworder"),w=f?.2:.1,T=f?.3:.1;m&&t._splomGridDflt&&(x=t._splomGridDflt.xside,_=t._splomGridDflt.yside),g._domains={x:c("x",k,w,x,v),y:c("y",k,T,_,y,b)}}else delete t.grid}function k(e,t){return r.coerce(n,g,s,e,t)}},contentDefaults:function(e,t){var r=t.grid;if(r&&r._domains){var n,i,a,o,s,c,h,f=e.grid||{},p=t._subplots,d=r._hasSubplotGrid,m=r.rows,g=r.columns,y="independent"===r.pattern,v=r._axisMap={};if(d){var x=f.subplots||[];c=r.subplots=new Array(m);var _=1;for(n=0;n0,h=e._context.staticPlot;t.each((function(t){var f,p=t[0].trace,d=p.error_x||{},m=p.error_y||{};p.ids&&(f=function(e){return e.id});var g=a.hasMarkers(p)&&p.marker.maxdisplayed>0;!m.visible&&!d.visible&&(t=[]);var y=r.select(this).selectAll("g.errorbar").data(t,f);if(y.exit().remove(),t.length){d.visible||y.selectAll("path.xerror").remove(),m.visible||y.selectAll("path.yerror").remove(),y.style("opacity",1);var v=y.enter().append("g").classed("errorbar",!0);u&&v.style("opacity",0).transition().duration(s.duration).style("opacity",1),i.setClipUrl(y,o.layerClipId,e),y.each((function(e){var t=r.select(this),i=function(e,t,r){var i={x:t.c2p(e.x),y:r.c2p(e.y)};return void 0!==e.yh&&(i.yh=r.c2p(e.yh),i.ys=r.c2p(e.ys),n(i.ys)||(i.noYS=!0,i.ys=r.c2p(e.ys,!0))),void 0!==e.xh&&(i.xh=t.c2p(e.xh),i.xs=t.c2p(e.xs),n(i.xs)||(i.noXS=!0,i.xs=t.c2p(e.xs,!0))),i}(e,l,c);if(!g||e.vis){var a,o=t.select("path.yerror");if(m.visible&&n(i.x)&&n(i.yh)&&n(i.ys)){var f=m.width;a="M"+(i.x-f)+","+i.yh+"h"+2*f+"m-"+f+",0V"+i.ys,i.noYS||(a+="m-"+f+",0h"+2*f),o.size()?u&&(o=o.transition().duration(s.duration).ease(s.easing)):o=t.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("yerror",!0),o.attr("d",a)}else o.remove();var p=t.select("path.xerror");if(d.visible&&n(i.y)&&n(i.xh)&&n(i.xs)){var y=(d.copy_ystyle?m:d).width;a="M"+i.xh+","+(i.y-y)+"v"+2*y+"m0,-"+y+"H"+i.xs,i.noXS||(a+="m0,-"+y+"v"+2*y),p.size()?u&&(p=p.transition().duration(s.duration).ease(s.easing)):p=t.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("xerror",!0),p.attr("d",a)}else p.remove()}}))}}))}}}),za=m({"src/components/errorbars/style.js"(e,t){var r=b(),n=W();t.exports=function(e){e.each((function(e){var t=e[0].trace,i=t.error_y||{},a=t.error_x||{},o=r.select(this);o.selectAll("path.yerror").style("stroke-width",i.thickness+"px").call(n.stroke,i.color),a.copy_ystyle&&(a=i),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(n.stroke,a.color)}))}}}),Da=m({"src/components/errorbars/index.js"(e,t){var r=ct(),n=De().overrideAll,i=Ea(),a={error_x:r.extendFlat({},i),error_y:r.extendFlat({},i)};delete a.error_x.copy_zstyle,delete a.error_y.copy_zstyle,delete a.error_y.copy_ystyle;var o={error_x:r.extendFlat({},i),error_y:r.extendFlat({},i),error_z:r.extendFlat({},i)};delete o.error_x.copy_ystyle,delete o.error_y.copy_ystyle,delete o.error_z.copy_ystyle,delete o.error_z.copy_zstyle,t.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:a,bar:a,histogram:a,scatter3d:n(o,"calc","nested"),scattergl:n(a,"calc","nested")}},supplyDefaults:Ca(),calc:La(),makeComputeError:Ia(),plot:Pa(),style:za(),hoverInfo:function(e,t,r){(t.error_y||{}).visible&&(r.yerr=e.yh-e.y,t.error_y.symmetric||(r.yerrneg=e.y-e.ys)),(t.error_x||{}).visible&&(r.xerr=e.xh-e.x,t.error_x.symmetric||(r.xerrneg=e.x-e.xs))}}}}),Oa=m({"src/components/colorbar/constants.js"(e,t){t.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}}}),Ra=m({"src/components/colorbar/draw.js"(e,t){var r=b(),n=F(),i=At(),a=He(),o=ar(),s=pr(),l=ct(),c=l.strTranslate,u=B().extendFlat,h=dr(),f=er(),p=W(),d=tr(),m=Et(),g=Ct().flipScale,y=Ai(),v=Mi(),x=Lt(),_=St(),w=_.LINE_SPACING,T=_.FROM_TL,k=_.FROM_BR,A=Oa().cn;t.exports={draw:function(e){var t=e._fullLayout._infolayer.selectAll("g."+A.colorbar).data(function(e){var t,r,n,i,a=e._fullLayout,o=e.calcdata,s=[];function l(e){return u(e,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function c(){"function"==typeof i.calc?i.calc(e,n,t):(t._fillgradient=r.reversescale?g(r.colorscale):r.colorscale,t._zrange=[r[i.min],r[i.max]])}for(var h=0;h0?n>=l:n<=l));i++)n>u&&n0?n>=l:n<=l));i++)n>r[0]&&n1){var pe=Math.pow(10,Math.floor(Math.log(fe)/Math.LN10));ue*=pe*l.roundUp(fe/pe,[2,5,10]),(Math.abs(W.start)/W.size+1e-6)%1<2e-6&&(le.tick0=0)}le.dtick=ue}le.domain=s?[oe+P/B.h,oe+Q-P/B.h]:[oe+L/B.w,oe+Q-L/B.w],le.setScale(),e.attr("transform",c(Math.round(B.l),Math.round(B.t)));var de,me=e.select("."+A.cbtitleunshift).attr("transform",c(-Math.round(B.l),-Math.round(B.t))),ge=le.ticklabelposition,ye=le.title.font.size,ve=e.select("."+A.cbaxis),xe=0,_e=0;function be(r,n){var i={propContainer:le,propName:t._propPrefix+"title.text",traceIndex:t._traceIndex,_meta:t._meta,placeholder:F._dfltTitle.colorbar,containerGroup:e.select("."+A.cbtitle)},o="h"===r.charAt(0)?r.slice(1):"h"+r;e.selectAll("."+o+",."+o+"-math-group").remove(),d.draw(a,r,u(i,n||{}))}return l.syncOrAsync([i.previousPromises,function(){var e,t;(s&&ce||!s&&!ce)&&("top"===V&&(e=L+B.l+ee*z,t=P+B.t+te*(1-oe-Q)+3+.75*ye),"bottom"===V&&(e=L+B.l+ee*z,t=P+B.t+te*(1-oe)-3-.25*ye),"right"===V&&(t=P+B.t+te*D+3+.75*ye,e=L+B.l+ee*oe),be(le._id+"title",{attributes:{x:e,y:t,"text-anchor":s?"start":"middle"}}))},function(){if(!s&&!ce||s&&ce){var i,u=e.select("."+A.cbtitle),h=u.select("text"),p=[-M/2,M/2],d=u.select(".h"+le._id+"title-math-group").node(),g=15.6;if(h.node()&&(g=parseInt(h.node().style.fontSize,10)*w),d?(i=f.bBox(d),_e=i.width,(xe=i.height)>g&&(p[1]-=(xe-g)/2)):h.node()&&!h.classed(A.jsPlaceholder)&&(i=f.bBox(h.node()),_e=i.width,xe=i.height),s){if(xe){if(xe+=5,"top"===V)le.domain[1]-=xe/B.h,p[1]*=-1;else{le.domain[0]+=xe/B.h;var y=m.lineCount(h);p[1]+=(1-y)*g}u.attr("transform",c(p[0],p[1])),le.setScale()}}else _e&&("right"===V&&(le.domain[0]+=(_e+ye/2)/B.w),u.attr("transform",c(p[0],p[1])),le.setScale())}e.selectAll("."+A.cbfills+",."+A.cblines).attr("transform",s?c(0,Math.round(B.h*(1-le.domain[1]))):c(Math.round(B.w*le.domain[0]),0)),ve.attr("transform",s?c(0,Math.round(-B.t)):c(Math.round(-B.l),0));var v=e.select("."+A.cbfills).selectAll("rect."+A.cbfill).attr("style","").data(Y);v.enter().append("rect").classed(A.cbfill,!0).attr("style",""),v.exit().remove();var x=q.map(le.c2p).map(Math.round).sort((function(e,t){return e-t}));v.each((function(e,i){var o=[0===i?q[0]:(Y[i]+Y[i-1])/2,i===Y.length-1?q[1]:(Y[i]+Y[i+1])/2].map(le.c2p).map(Math.round);s&&(o[1]=l.constrain(o[1]+(o[1]>o[0])?1:-1,x[0],x[1]));var c=r.select(this).attr(s?"x":"y",re).attr(s?"y":"x",r.min(o)).attr(s?"width":"height",Math.max($,2)).attr(s?"height":"width",Math.max(r.max(o)-r.min(o),2));if(t._fillgradient)f.gradient(c,a,t._id,s?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var u=G(e).replace("e-","");c.attr("fill",n(u).toHexString())}}));var _=e.select("."+A.cblines).selectAll("path."+A.cbline).data(N.color&&N.width?X:[]);_.enter().append("path").classed(A.cbline,!0),_.exit().remove(),_.each((function(e){var t=re,n=Math.round(le.c2p(e))+N.width/2%1;r.select(this).attr("d","M"+(s?t+","+n:n+","+t)+(s?"h":"v")+$).call(f.lineGroupStyle,N.width,H(e),N.dash)})),ve.selectAll("g."+le._id+"tick,path").remove();var b=re+$+(M||0)/2-("outside"===t.ticks?1:0),T=o.calcTicks(le),k=o.getTickSigns(le)[2];return o.drawTicks(a,le,{vals:"inside"===le.ticks?o.clipEnds(le,T):T,layer:ve,path:o.makeTickPath(le,b,k),transFn:o.makeTransTickFn(le)}),o.drawLabels(a,le,{vals:T,layer:ve,transFn:o.makeTransTickLabelFn(le),labelFns:o.makeLabelFns(le,b)})},function(){if(s&&!ce||!s&&ce){var e,n,i=le.position||0,o=le._offset+le._length/2;if("right"===V)n=o,e=B.l+ee*i+10+ye*(le.showticklabels?1:.5);else if(e=o,"bottom"===V&&(n=B.t+te*i+10+(-1===ge.indexOf("inside")?le.tickfont.size:0)+("inside"!==le.ticks&&t.ticklen||0)),"top"===V){var l=U.text.split("
").length;n=B.t+te*i+10-$-w*ye*l}be((s?"h":"v")+le._id+"title",{avoid:{selection:r.select(a).selectAll("g."+le._id+"tick"),side:V,offsetTop:s?0:B.t,offsetLeft:s?B.l:0,maxShift:s?F.width:F.height},attributes:{x:e,y:n,"text-anchor":"middle"},transform:{rotate:s?-90:0,offset:0}})}},i.previousPromises,function(){var r,o=$+M/2;-1===ge.indexOf("inside")&&(r=f.bBox(ve.node()),o+=s?r.width:r.height),de=me.select("text");var l=0,u=s&&"top"===V,d=!s&&"right"===V,m=0;if(de.node()&&!de.classed(A.jsPlaceholder)){var y,v=me.select(".h"+le._id+"title-math-group").node();v&&(s&&ce||!s&&!ce)?(l=(r=f.bBox(v)).width,y=r.height):(l=(r=f.bBox(me.node())).right-B.l-(s?re:se),y=r.bottom-B.t-(s?se:re),!s&&"top"===V&&(o+=r.height,m=r.height)),d&&(de.attr("transform",c(l/2+ye/2,0)),l*=2),o=Math.max(o,s?l:y)}var x=2*(s?L:P)+o+S+M/2,w=0;!s&&U.text&&"bottom"===I&&D<=0&&(x+=w=x/2,m+=w),F._hColorbarMoveTitle=w,F._hColorbarMoveCBTitle=m;var j=S+M,N=(s?re:se)-j/2-(s?L:0),q=(s?se:re)-(s?J:P+m-w);e.select("."+A.cbbg).attr("x",N).attr("y",q).attr(s?"width":"height",Math.max(x-w,2)).attr(s?"height":"width",Math.max(J+j,2)).call(p.fill,E).call(p.stroke,t.bordercolor).style("stroke-width",S);var H=d?Math.max(l-10,0):0;e.selectAll("."+A.cboutline).attr("x",(s?re:se+L)+H).attr("y",(s?se+P-J:re)+(u?xe:0)).attr(s?"width":"height",Math.max($,2)).attr(s?"height":"width",Math.max(J-(s?2*P+xe:2*L+H),2)).call(p.stroke,t.outlinecolor).style({fill:"none","stroke-width":M});var G=s?ne*x:0,W=s?0:(1-ie)*x-m;if(G=R?B.l-G:-G,W=O?B.t-W:-W,e.attr("transform",c(G,W)),!s&&(S||n(E).getAlpha()&&!n.equals(F.paper_bgcolor,E))){var Z=ve.selectAll("text"),Y=Z[0].length,X=e.select("."+A.cbbg).node(),K=f.bBox(X),Q=f.getTranslate(e);Z.each((function(e,t){var r=Y-1;if(0===t||t===r){var n,i=f.bBox(this),a=f.getTranslate(this);if(t===r){var o=i.right+a.x;(n=K.right+Q.x+se-S-2+z-o)>0&&(n=0)}else if(0===t){var s=i.left+a.x;(n=K.left+Q.x+se+S+2-s)<0&&(n=0)}n&&(Y<3?this.setAttribute("transform","translate("+n+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}}))}var ee={},te=T[C],ae=k[C],oe=T[I],ue=k[I],he=x-$;s?("pixels"===g?(ee.y=D,ee.t=J*oe,ee.b=J*ue):(ee.t=ee.b=0,ee.yt=D+h*oe,ee.yb=D-h*ue),"pixels"===b?(ee.x=z,ee.l=x*te,ee.r=x*ae):(ee.l=he*te,ee.r=he*ae,ee.xl=z-_*te,ee.xr=z+_*ae)):("pixels"===g?(ee.x=z,ee.l=J*te,ee.r=J*ae):(ee.l=ee.r=0,ee.xl=z+h*te,ee.xr=z-h*ae),"pixels"===b?(ee.y=1-D,ee.t=x*oe,ee.b=x*ue):(ee.t=he*oe,ee.b=he*ue,ee.yt=D-_*oe,ee.yb=D+_*ue));var fe=t.y<.5?"b":"t",pe=t.x<.5?"l":"r";a._fullLayout._reservedMargin[t._id]={};var _e={r:F.width-N-G,l:N+ee.r,b:F.height-q-W,t:q+ee.b};R&&O?i.autoMargin(a,t._id,ee):R?a._fullLayout._reservedMargin[t._id][fe]=_e[fe]:O||s?a._fullLayout._reservedMargin[t._id][pe]=_e[pe]:a._fullLayout._reservedMargin[t._id][fe]=_e[fe]}],a)}(g,t,e);_&&_.then&&(e._promises||[]).push(_),e._context.edits.colorbarPosition&&function(e,t,r){var n,i,o,l="v"===t.orientation,u=r._fullLayout._size;s.init({element:e.node(),gd:r,prepFn:function(){n=e.attr("transform"),h(e)},moveFn:function(r,a){e.attr("transform",n+c(r,a)),i=s.align((l?t._uFrac:t._vFrac)+r/u.w,l?t._thickFrac:t._lenFrac,0,1,t.xanchor),o=s.align((l?t._vFrac:1-t._uFrac)-a/u.h,l?t._lenFrac:t._thickFrac,0,1,t.yanchor);var f=s.getCursor(i,o,t.xanchor,t.yanchor);h(e,f)},doneFn:function(){if(h(e),void 0!==i&&void 0!==o){var n={};n[t._propPrefix+"x"]=i,n[t._propPrefix+"y"]=o,void 0!==t._traceIndex?a.call("_guiRestyle",r,n,t._traceIndex):a.call("_guiRelayout",r,n)}}})}(g,t,e)})),t.exit().each((function(t){i.autoMargin(e,t._id)})).remove(),t.order()}}}}),Fa=m({"src/components/colorbar/index.js"(e,t){t.exports={moduleType:"component",name:"colorbar",attributes:Pt(),supplyDefaults:qt(),draw:Ra().draw,hasColorbar:Ot()}}}),Ba=m({"src/components/legend/index.js"(e,t){t.exports={moduleType:"component",name:"legend",layoutAttributes:gr(),supplyLayoutDefaults:vr(),draw:Mr(),style:Ar()}}}),ja=m({"src/locale-en.js"(e,t){t.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}}}),Na=m({"src/locale-en-us.js"(e,t){t.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}}}),Ua=m({"src/snapshot/cloneplot.js"(e,t){var r=He(),n=ct(),i=n.extendFlat,a=n.extendDeep;function o(e){var t;switch(e){case"themes__thumb":t={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":t={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:t={}}return t}t.exports=function(e,t){var n,s,l=e.data,c=e.layout,u=a([],l),h=a({},c,o(t.tileClass)),f=e._context||{};if(t.width&&(h.width=t.width),t.height&&(h.height=t.height),"thumbnail"===t.tileClass||"themes__thumb"===t.tileClass){h.annotations=[];var p=Object.keys(h);for(n=0;n-1&&(h[p[n]].title={text:""});for(n=0;n=0)return e}else if("string"==typeof e&&"%"===(e=e.trim()).slice(-1)&&r(e.slice(0,-1))&&(e=+e.slice(0,-1))>=0)return e+"%"}function p(e,t,r,i,a,o){var s=!1!==(o=o||{}).moduleHasSelected,l=!1!==o.moduleHasUnselected,c=!1!==o.moduleHasConstrain,u=!1!==o.moduleHasCliponaxis,f=!1!==o.moduleHasTextangle,p=!1!==o.moduleHasInsideanchor,d=!!o.hasPathbar,m=Array.isArray(a)||"auto"===a,g=m||"inside"===a,y=m||"outside"===a;if(g||y){var v=h(i,"textfont",r.font),x=n.extendFlat({},v),_=!(e.textfont&&e.textfont.color);if(_&&delete x.color,h(i,"insidetextfont",x),d){var b=n.extendFlat({},v);_&&delete b.color,h(i,"pathbar.textfont",b)}y&&h(i,"outsidetextfont",v),s&&i("selected.textfont.color"),l&&i("unselected.textfont.color"),c&&i("constraintext"),u&&i("cliponaxis"),f&&i("textangle"),i("texttemplate"),i("texttemplatefallback")}g&&p&&i("insidetextanchor")}t.exports={supplyDefaults:function(e,t,r,c){function h(r,i){return n.coerce(e,t,u,r,i)}if(o(e,t,c,h)){s(e,t,c,h),h("xhoverformat"),h("yhoverformat"),h("zorder"),h("orientation",t.x&&!t.y?"h":"v"),h("base"),h("offset"),h("width"),h("text"),h("hovertext"),h("hovertemplate"),h("hovertemplatefallback");var f=h("textposition");p(e,0,c,h,f,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),l(e,t,h,r,c);var d=(t.marker.line||{}).color,m=a.getComponentMethod("errorbars","supplyDefaults");m(e,t,d||i.defaultLine,{axis:"y"}),m(e,t,d||i.defaultLine,{axis:"x",inherit:"y"}),n.coerceSelectionMarkerOpacity(t,h)}else t.visible=!1},crossTraceDefaults:function(e,t){var r,i;function a(e,t){return n.coerce(i._input,i,u,e,t)}for(var o=0;o0&&!f[y]&&(h=!0),f[y]=!0),g.visible&&"histogram"===g.type&&"category"!==n.getFromId({_fullLayout:t},g["v"===g.orientation?"xaxis":"yaxis"]).type&&(u=!0)}}if(c){"overlay"!==p&&l("barnorm"),l("bargap",u&&!h?0:.2),l("bargroupgap");var v=l("barcornerradius");t.barcornerradius=o(v)}else delete t.barmode}}}),Ka=m({"src/traces/bar/arrays_to_calcdata.js"(e,t){var r=ct();t.exports=function(e,t){for(var n=0;na))return r}return void 0!==n?n:e.dflt},e.coerceColor=function(e,t,n){return r(t).isValid()?t:void 0!==n?n:e.dflt},e.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),-1!==e.values.indexOf(t)?t:void 0!==r?r:e.dflt},e.getValue=function(e,t){var r;return n(e)?t1||0===i.bargap&&0===i.bargroupgap&&!e[0].trace.marker.line.width)&&r.select(this).attr("shape-rendering","crispEdges")})),t.selectAll("g.points").each((function(t){p(r.select(this),t[0].trace,e)})),o.getComponentMethod("errorbars","style")(t)},styleTextPoints:d,styleOnSelect:function(e,t,n){var s=t[0].trace;s.selectedpoints?function(e,t,n){i.selectedPointStyle(e.selectAll("path"),t),function(e,t,n){e.each((function(e){var o,s=r.select(this);if(e.selected){o=a.ensureUniformFontSize(n,m(s,e,t,n));var l=t.selected.textfont&&t.selected.textfont.color;l&&(o.color=l),i.font(s,o)}else i.selectedTextStyle(s,t)}))}(e.selectAll("text"),t,n)}(n,s,e):(p(n,s,e),o.getComponentMethod("errorbars","style")(n))},getInsideTextFont:y,getOutsideTextFont:v,getBarColor:_,resizeText:s}}}),ro=m({"src/traces/bar/plot.js"(e,t){var r=b(),n=M(),i=ct(),a=Et(),o=W(),s=er(),l=He(),c=ar().tickText,u=Qa(),h=u.recordMinTextSize,f=u.clearMinTextSize,p=to(),d=eo(),m=ci(),g=Wa(),y=g.text,v=g.textposition,x=Kt().appendArrayPointValue,_=m.TEXTPAD;function w(e){return e.id}function T(e){return(e>0)-(e<0)}function k(e,t){return e0}function E(e,t,r,n,i){return!(e<0||t<0)&&(r<=e&&n<=t||r<=t&&n<=e||(i?e>=r*(t/n):t>=n*(e/r)))}function C(e){return"auto"===e?0:e}function I(e,t){var r=Math.PI/180*t,n=Math.abs(Math.sin(r)),i=Math.abs(Math.cos(r));return{x:e.width*i+e.height*n,y:e.width*n+e.height*i}}function L(e,t,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,c=a.anchor,u="end"===c,h="start"===c,f=((a.leftToRight||0)+1)/2,p=1-f,d=a.hasB,m=a.r,g=a.overhead,y=i.width,v=i.height,x=Math.abs(t-e),b=Math.abs(n-r),w=x>2*_&&b>2*_?_:0;x-=2*w,b-=2*w;var T=C(l);"auto"===l&&!(y<=x&&v<=b)&&(y>x||v>b)&&(!(y>b||v>x)||y_){var E=function(e,t,r,n,i,a,o,s,l){var c,u,h,f,p=Math.max(0,Math.abs(t-e)-2*_),d=Math.max(0,Math.abs(n-r)-2*_),m=a-_,g=o?m-Math.sqrt(m*m-(m-o)*(m-o)):m,y=l?2*m:s?m-o:2*g,v=l?2*m:s?2*g:m-o;return i.y/i.x>=d/(p-y)?f=d/i.y:i.y/i.x<=(d-v)/p?f=p/i.x:!l&&s?(c=i.x*i.x+i.y*i.y/4,h=(p-m)*(p-m)+(d/2-m)*(d/2-m)-m*m,f=(-(u=-2*i.x*(p-m)-i.y*(d/2-m))+Math.sqrt(u*u-4*c*h))/(2*c)):l?(c=(i.x*i.x+i.y*i.y)/4,h=(p/2-m)*(p/2-m)+(d/2-m)*(d/2-m)-m*m,f=(-(u=-i.x*(p/2-m)-i.y*(d/2-m))+Math.sqrt(u*u-4*c*h))/(2*c)):(c=i.x*i.x/4+i.y*i.y,h=(p/2-m)*(p/2-m)+(d-m)*(d-m)-m*m,f=(-(u=-i.x*(p/2-m)-2*i.y*(d-m))+Math.sqrt(u*u-4*c*h))/(2*c)),{scale:f=Math.min(1,f),pad:s?Math.max(0,m-Math.sqrt(Math.max(0,m*m-(m-(d-i.y*f)/2)*(m-(d-i.y*f)/2)))-o):Math.max(0,m-Math.sqrt(Math.max(0,m*m-(m-(p-i.x*f)/2)*(m-(p-i.x*f)/2)))-o)}}(e,t,r,n,S,m,g,o,d);A=E.scale,M=E.pad}else A=1,s&&(A=Math.min(1,x/S.x,b/S.y)),M=0;var L=i.left*p+i.right*f,P=(i.top+i.bottom)/2,z=(e+_)*p+(t-_)*f,D=(r+n)/2,O=0,R=0;if(h||u){var F=(o?S.x:S.y)/2;m&&(u||d)&&(w+=M);var B=o?k(e,t):k(r,n);o?h?(z=e+B*w,O=-B*F):(z=t-B*w,O=B*F):h?(D=r+B*w,R=-B*F):(D=n-B*w,R=B*F)}return{textX:L,textY:P,targetX:z,targetY:D,anchorX:O,anchorY:R,scale:A,rotate:T}}t.exports={plot:function(e,t,u,m,g,b){var M=t.xaxis,P=t.yaxis,z=e._fullLayout,D=e._context.staticPlot;g||(g={mode:z.barmode,norm:z.barmode,gap:z.bargap,groupgap:z.bargroupgap},f("bar",z));var O=i.makeTraceGroups(m,u,"trace bars").each((function(l){var u=r.select(this),f=l[0].trace,m=l[0].t,O="waterfall"===f.type,R="funnel"===f.type,F="histogram"===f.type,B="bar"===f.type,j=B||R,N=0;O&&f.connector.visible&&"between"===f.connector.mode&&(N=f.connector.line.width/2);var U="h"===f.orientation,V=S(g),q=i.ensureSingle(u,"g","points"),H=function(e){if(e.ids)return w}(f),G=q.selectAll("g.point").data(i.identity,H);G.enter().append("g").classed("point",!0),G.exit().remove(),G.each((function(u,w){var S,O,R=r.select(this),q=function(e,t,r,n){var i=[],a=[],o=n?t:r,s=n?r:t;return i[0]=o.c2p(e.s0,!0),a[0]=s.c2p(e.p0,!0),i[1]=o.c2p(e.s1,!0),a[1]=s.c2p(e.p1,!0),n?[i,a]:[a,i]}(u,M,P,U),H=q[0][0],G=q[0][1],W=q[1][0],Z=q[1][1],Y=0==(U?G-H:Z-W);if(Y&&j&&d.getLineWidth(f,u)&&(Y=!1),Y||(Y=!(n(H)&&n(G)&&n(W)&&n(Z))),u.isBlank=Y,Y&&(U?G=H:Z=W),N&&!Y&&(U?(H-=k(H,G)*N,G+=k(H,G)*N):(W-=k(W,Z)*N,Z+=k(W,Z)*N)),"waterfall"===f.type){if(!Y){var X=f[u.dir].marker;S=X.line.width,O=X.color}}else S=d.getLineWidth(f,u),O=u.mc||f.marker.color;function $(e){var t=r.round(S/2%1,2);return 0===g.gap&&0===g.groupgap?r.round(Math.round(e)-t,2):e}var K=o.opacity(O)<1||S>.01?$:function(e,t,r){return r&&e===t?e:Math.abs(e-t)>=2?$(e):e>t?Math.ceil(e):Math.floor(e)};e._context.staticPlot||(H=K(H,G,U),G=K(G,H,U),W=K(W,Z,!U),Z=K(Z,W,!U));var J,Q=U?M.c2p:P.c2p;J=u.s0>0?u._sMax:u.s0<0?u._sMin:u.s1>0?u._sMax:u._sMin;var ee,te,re=B||F?function(e,t){if(!e)return 0;var r,n=Math.abs(U?Z-W:G-H),i=Math.abs(U?G-H:Z-W),a=K(Math.abs(Q(J,!0)-Q(0,!0))),o=u.hasB?Math.min(n/2,i/2):Math.min(n/2,a);return r="%"===t?n*(Math.min(50,e)/100):e,K(Math.max(Math.min(r,o),0))}(m.cornerradiusvalue,m.cornerradiusform):0,ne="M"+H+","+W+"V"+Z+"H"+G+"V"+W+"Z",ie=0;if(re&&u.s){var ae=0===T(u.s0)||T(u.s)===T(u.s0)?u.s1:u.s0;if((ie=K(u.hasB?0:Math.abs(Q(J,!0)-Q(ae,!0))))0?Math.sqrt(ie*(2*re-ie)):0,he=oe>0?Math.max:Math.min;ee="M"+H+","+W+"V"+(Z-ce*se)+"H"+he(G-(re-ie)*oe,H)+"A "+re+","+re+" 0 0 "+le+" "+G+","+(Z-re*se-ue)+"V"+(W+re*se+ue)+"A "+re+","+re+" 0 0 "+le+" "+he(G-(re-ie)*oe,H)+","+(W+ce*se)+"Z"}else if(u.hasB)ee="M"+(H+re*oe)+","+W+"A "+re+","+re+" 0 0 "+le+" "+H+","+(W+re*se)+"V"+(Z-re*se)+"A "+re+","+re+" 0 0 "+le+" "+(H+re*oe)+","+Z+"H"+(G-re*oe)+"A "+re+","+re+" 0 0 "+le+" "+G+","+(Z-re*se)+"V"+(W+re*se)+"A "+re+","+re+" 0 0 "+le+" "+(G-re*oe)+","+W+"Z";else{var fe=(te=Math.abs(Z-W)+ie)0?Math.sqrt(ie*(2*re-ie)):0,de=se>0?Math.max:Math.min;ee="M"+(H+fe*oe)+","+W+"V"+de(Z-(re-ie)*se,W)+"A "+re+","+re+" 0 0 "+le+" "+(H+re*oe-pe)+","+Z+"H"+(G-re*oe+pe)+"A "+re+","+re+" 0 0 "+le+" "+(G-fe*oe)+","+de(Z-(re-ie)*se,W)+"V"+W+"Z"}}else ee=ne}else ee=ne;var me=A(i.ensureSingle(R,"path"),z,g,b);if(me.style("vector-effect",D?"none":"non-scaling-stroke").attr("d",isNaN((G-H)*(Z-W))||Y&&e._context.staticPlot?"M0,0Z":ee).call(s.setClipUrl,t.layerClipId,e),!z.uniformtext.mode&&V){var ge=s.makePointStyleFns(f);s.singlePointStyle(u,me,f,ge,e)}(function(e,t,r,n,o,l,u,f,m,g,b,w,T){var M,S=t.xaxis,P=t.yaxis,z=e._fullLayout;function D(t,r,n){return i.ensureSingle(t,"text").text(r).attr({class:"bartext bartext-"+M,"text-anchor":"middle","data-notex":1}).call(s.font,n).call(a.convertToTspans,e)}var O=n[0].trace,R="h"===O.orientation,F=function(e,t,r,n,a){var o,s=t[0].trace;return o=s.texttemplate?function(e,t,r,n,a){var o=t[0].trace,s=i.castOption(o,r,"texttemplate");if(!s)return"";var l,u,h,f,p="histogram"===o.type,d="waterfall"===o.type,m="funnel"===o.type,g="h"===o.orientation;function y(e){return c(f,f.c2l(e),!0).text}g?(l="y",u=a,h="x",f=n):(l="x",u=n,h="y",f=a);var v=t[r],_={};_.label=v.p,_.labelLabel=_[l+"Label"]=function(e){return c(u,u.c2l(e),!0).text}(v.p);var b=i.castOption(o,v.i,"text");(0===b||b)&&(_.text=b),_.value=v.s,_.valueLabel=_[h+"Label"]=y(v.s);var w={};x(w,o,v.i),(p||void 0===w.x)&&(w.x=g?_.value:_.label),(p||void 0===w.y)&&(w.y=g?_.label:_.value),(p||void 0===w.xLabel)&&(w.xLabel=g?_.valueLabel:_.labelLabel),(p||void 0===w.yLabel)&&(w.yLabel=g?_.labelLabel:_.valueLabel),d&&(_.delta=+v.rawS||v.s,_.deltaLabel=y(_.delta),_.final=v.v,_.finalLabel=y(_.final),_.initial=_.final-_.delta,_.initialLabel=y(_.initial)),m&&(_.value=v.s,_.valueLabel=y(_.value),_.percentInitial=v.begR,_.percentInitialLabel=i.formatPercent(v.begR),_.percentPrevious=v.difR,_.percentPreviousLabel=i.formatPercent(v.difR),_.percentTotal=v.sumR,_.percenTotalLabel=i.formatPercent(v.sumR));var T=i.castOption(o,v.i,"customdata");return T&&(_.customdata=T),i.texttemplateString({data:[w,_,o._meta],fallback:o.texttemplatefallback,labels:_,locale:e._d3locale,template:s})}(e,t,r,n,a):s.textinfo?function(e,t,r,n){var a=e[0].trace,o="h"===a.orientation,s="waterfall"===a.type,l="funnel"===a.type;function u(e){return c(o?r:n,+e,!0).text}var h,f=a.textinfo,p=e[t],d=f.split("+"),m=[],g=function(e){return-1!==d.indexOf(e)};if(g("label")&&m.push(function(e){return c(o?n:r,e,!0).text}(e[t].p)),g("text")&&(0===(h=i.castOption(a,p.i,"text"))||h)&&m.push(h),s){var y=+p.rawS||p.s,v=p.v,x=v-y;g("initial")&&m.push(u(x)),g("delta")&&m.push(u(y)),g("final")&&m.push(u(v))}if(l){g("value")&&m.push(u(p.s));var _=0;g("percent initial")&&_++,g("percent previous")&&_++,g("percent total")&&_++;var b=_>1;g("percent initial")&&(h=i.formatPercent(p.begR),b&&(h+=" of initial"),m.push(h)),g("percent previous")&&(h=i.formatPercent(p.difR),b&&(h+=" of previous"),m.push(h)),g("percent total")&&(h=i.formatPercent(p.sumR),b&&(h+=" of total"),m.push(h))}return m.join("
")}(t,r,n,a):d.getValue(s.text,r),d.coerceString(y,o)}(z,n,o,S,P);M=function(e,t){var r=d.getValue(e.textposition,t);return d.coerceEnumerated(v,r)}(O,o);var B="stack"===w.mode||"relative"===w.mode,j=n[o],N=!B||j._outmost,U=j.hasB,V=g&&g-b>_;if(F&&"none"!==M&&(!j.isBlank&&l!==u&&f!==m||"auto"!==M&&"inside"!==M)){var q=z.font,H=p.getBarColor(n[o],O),G=p.getInsideTextFont(O,o,q,H),W=p.getOutsideTextFont(O,o,q),Z=O.insidetextanchor||"end",Y=r.datum();R?"log"===S.type&&Y.s0<=0&&(l=S.range[0]0&&J>0;ie=V?U?E(re-2*g,ne,K,J,R)||E(re,ne-2*g,K,J,R):R?E(re-(g-b),ne,K,J,R)||E(re,ne-2*(g-b),K,J,R):E(re,ne-(g-b),K,J,R)||E(re-2*(g-b),ne,K,J,R):E(re,ne,K,J,R),ae&&ie?M="inside":(M="outside",X.remove(),X=null)}else M="inside";if(!X){var oe=(X=D(r,F,Q=i.ensureUniformFontSize(e,"outside"===M?W:G))).attr("transform");if(X.attr("transform",""),K=($=s.bBox(X.node())).width,J=$.height,X.attr("transform",oe),K<=0||J<=0)return void X.remove()}var se,le=O.textangle;"outside"===M?se=function(e,t,r,n,i,a){var o,s=!!a.isHorizontal,l=!!a.constrained,c=a.angle||0,u=i.width,h=i.height,f=Math.abs(t-e),p=Math.abs(n-r);o=s?p>2*_?_:0:f>2*_?_:0;var d=1;l&&(d=s?Math.min(1,p/h):Math.min(1,f/u));var m=C(c),g=I(i,m),y=(s?g.x:g.y)/2,v=(i.left+i.right)/2,x=(i.top+i.bottom)/2,b=(e+t)/2,w=(r+n)/2,T=0,A=0,M=s?k(t,e):k(r,n);return s?(b=t-M*o,T=M*y):(w=n+M*o,A=-M*y),{textX:v,textY:x,targetX:b,targetY:w,anchorX:T,anchorY:A,scale:d,rotate:m}}(l,u,f,m,$,{isHorizontal:R,constrained:"both"===O.constraintext||"outside"===O.constraintext,angle:le}):se=L(l,u,f,m,$,{isHorizontal:R,constrained:"both"===O.constraintext||"inside"===O.constraintext,angle:le,anchor:Z,hasB:U,r:g,overhead:b}),se.fontSize=Q.size,h("histogram"===O.type?"bar":O.type,se,z),j.transform=se;var ce=A(X,z,w,T);i.setTransormAndDisplay(ce,se)}else r.select("text").remove()})(e,t,R,l,w,H,G,W,Z,re,ie,g,b),t.layerClipId&&s.hideOutsideRangePoint(u,R.select("text"),M,P,f.xcalendar,f.ycalendar)}));var W=!1===f.cliponaxis;s.setClipUrl(u,W?null:t.layerClipId,e)}));l.getComponentMethod("errorbars","plot")(e,O,t,g)},toMoveInsideBar:L}}}),no=m({"src/traces/bar/hover.js"(e,t){var r=Or(),n=He(),i=W(),a=ct().fillText,o=eo().getLineWidth,s=ar().hoverLabelText,l=S().BADNUM;function c(e,t,n,i,o){var c,u,h,f,p,d,m,g=e.cd,y=g[0].trace,v=g[0].t,x="closest"===i,_="waterfall"===y.type,b=e.maxHoverDistance,w=e.maxSpikeDistance;"h"===y.orientation?(c=n,u=t,h="y",f="x",p=D,d=P):(c=t,u=n,h="x",f="y",d=D,p=P);var T=y[h+"period"],k=x||T;function A(e){return S(e,-1)}function M(e){return S(e,1)}function S(e,t){var r=e.w;return e[h]+t*r/2}function E(e){return e[h+"End"]-e[h+"Start"]}var C=x?A:T?function(e){return e.p-E(e)/2}:function(e){return Math.min(A(e),e.p-v.bardelta/2)},I=x?M:T?function(e){return e.p+E(e)/2}:function(e){return Math.max(M(e),e.p+v.bardelta/2)};function L(e,t,n){return o.finiteRange&&(n=0),r.inbox(e-c,t-c,n+Math.min(1,Math.abs(t-e)/m)-1)}function P(e){return L(C(e),I(e),b)}function z(e){var t=e[f];if(_){var r=Math.abs(e.rawS)||0;u>0?t+=r:u<0&&(t-=r)}return t}function D(e){var t=u,n=e.b,i=z(e);return r.inbox(n-t,i-t,b+(i-t)/(i-n)-1)}var O=e[h+"a"],R=e[f+"a"];m=Math.abs(O.r2c(O.range[1])-O.r2c(O.range[0]));var F,B,j,N,U=r.getDistanceFunction(i,p,d,(function(e){return(p(e)+d(e))/2}));if(r.getClosest(g,U,e),!1!==e.index&&g[e.index].p!==l){k||(C=function(e){return Math.min(A(e),e.p-v.bargroupwidth/2)},I=function(e){return Math.max(M(e),e.p+v.bargroupwidth/2)});var V=g[e.index],q=y.base?V.b+V.s:V.s;e[f+"0"]=e[f+"1"]=R.c2p(V[f],!0),e[f+"LabelVal"]=q;var H=v.extents[v.extents.round(V.p)];e[h+"0"]=O.c2p(x?C(V):H[0],!0),e[h+"1"]=O.c2p(x?I(V):H[1],!0);var G=void 0!==V.orig_p;return e[h+"LabelVal"]=G?V.orig_p:V.p,e.labelLabel=s(O,e[h+"LabelVal"],y[h+"hoverformat"]),e.valueLabel=s(R,e[f+"LabelVal"],y[f+"hoverformat"]),e.baseLabel=s(R,V.b,y[f+"hoverformat"]),e.spikeDistance=(B=u,j=(F=V).b,N=z(F),(r.inbox(j-B,N-B,w+(N-B)/(N-j)-1)+function(e){return L(A(e),M(e),w)}(V))/2),e[h+"Spike"]=O.c2p(V.p,!0),a(V,y,e),e.hovertemplate=y.hovertemplate,e}}function u(e,t){var r=t.mcc||e.marker.color,n=t.mlcc||e.marker.line.color,a=o(e,t);return i.opacity(r)?r:i.opacity(n)&&a?n:void 0}t.exports={hoverPoints:function(e,t,r,i,a){var o=c(e,t,r,i,a);if(o){var s=o.cd,l=s[0].trace,h=s[o.index];return o.color=u(l,h),n.getComponentMethod("errorbars","hoverInfo")(h,l,o),[o]}},hoverOnBars:c,getTraceColor:u}}}),io=m({"src/traces/bar/event_data.js"(e,t){t.exports=function(e,t,r){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),"h"===r.orientation?(e.label=e.y,e.value=e.x):(e.label=e.x,e.value=e.y),e}}}),ao=m({"src/traces/bar/select.js"(e,t){function r(e,t,r,n,i){var a=t.c2p(n?e.s0:e.p0,!0),o=t.c2p(n?e.s1:e.p1,!0),s=r.c2p(n?e.p0:e.s0,!0),l=r.c2p(n?e.p1:e.s1,!0);return i?[(a+o)/2,(s+l)/2]:n?[o,(s+l)/2]:[(a+o)/2,l]}t.exports=function(e,t){var n,i=e.cd,a=e.xaxis,o=e.yaxis,s=i[0].trace,l="funnel"===s.type,c="h"===s.orientation,u=[];if(!1===t)for(n=0;n0?(g="v",y=x>0?Math.min(b,_):Math.min(_)):x>0?(g="h",y=Math.min(b)):y=0;if(y){t._length=y;var S=i("orientation",g);t._hasPreCompStats?"v"===S&&0===x?(i("x0",0),i("dx",1)):"h"===S&&0===v&&(i("y0",0),i("dy",1)):"v"===S&&0===x?i("x0"):"h"===S&&0===v&&i("y0"),n.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],a)}else t.visible=!1}function u(e,t,n,i){var a=i.prefix,o=r.coerce2(e,t,l,"marker.outliercolor"),s=n("marker.line.outliercolor"),c="outliers";t._hasPreCompStats?c="all":(o||s)&&(c="suspectedoutliers");var u=n(a+"points",c);u?(n("jitter","all"===u?.3:0),n("pointpos","all"===u?-1.5:0),n("marker.symbol"),n("marker.opacity"),n("marker.size"),n("marker.angle"),n("marker.color",t.line.color),n("marker.line.color"),n("marker.line.width"),"suspectedoutliers"===u&&(n("marker.line.outliercolor",t.marker.color),n("marker.line.outlierwidth")),n("selected.marker.color"),n("unselected.marker.color"),n("selected.marker.size"),n("unselected.marker.size"),n("text"),n("hovertext")):delete t.marker;var h=n("hoveron");("all"===h||-1!==h.indexOf("points"))&&(n("hovertemplate"),n("hovertemplatefallback")),r.coerceSelectionMarkerOpacity(t,n)}t.exports={supplyDefaults:function(e,t,n,o){function s(n,i){return r.coerce(e,t,l,n,i)}if(c(e,t,s,o),!1!==t.visible){a(e,t,o,s),s("xhoverformat"),s("yhoverformat");var h=t._hasPreCompStats;h&&(s("lowerfence"),s("upperfence")),s("line.color",(e.marker||{}).color||n),s("line.width"),s("fillcolor",i.addOpacity(t.line.color,.5));var f=!1;if(h){var p=s("mean"),d=s("sd");p&&p.length&&(f=!0,d&&d.length&&(f="sd"))}s("whiskerwidth");var m,g=s("sizemode");"quartiles"===g&&(m=s("boxmean",f)),s("showwhiskers","quartiles"===g),("sd"===g||"sd"===m)&&s("sdmultiple"),s("width"),s("quartilemethod");var y=!1;if(h){var v=s("notchspan");v&&v.length&&(y=!0)}else r.validate(e.notchwidth,l.notchwidth)&&(y=!0);s("notched",y)&&s("notchwidth"),u(e,t,s,{prefix:"box"}),s("zorder")}},crossTraceDefaults:function(e,t){var n,i;function a(e){return r.coerce(i._input,i,l,e)}for(var s=0;sE.uf};if(t._hasPreCompStats){var U=t[x],V=function(e){return v.d2c((t[e]||[])[l])},q=1/0,H=-1/0;for(l=0;l=E.q1&&E.q3>=E.med){var W=V("lowerfence");E.lf=W!==o&&W<=E.q1?W:f(E,I,L);var Z=V("upperfence");E.uf=Z!==o&&Z>=E.q3?Z:p(E,I,L);var Y=V("mean");E.mean=Y!==o?Y:L?a.mean(I,L):(E.q1+E.q3)/2;var X=V("sd");E.sd=Y!==o&&X>=0?X:L?a.stdev(I,L,E.mean):E.q3-E.q1,E.lo=d(E),E.uo=m(E);var $=V("notchspan");$=$!==o&&$>0?$:g(E,L),E.ln=E.med-$,E.un=E.med+$;var K=E.lf,J=E.uf;t.boxpoints&&I.length&&(K=Math.min(K,I[0]),J=Math.max(J,I[L-1])),t.notched&&(K=Math.min(K,E.ln),J=Math.max(J,E.un)),E.min=K,E.max=J}else{var Q;a.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+E.q1,"median = "+E.med,"q3 = "+E.q3].join("\n")),Q=E.med!==o?E.med:E.q1!==o?E.q3!==o?(E.q1+E.q3)/2:E.q1:E.q3!==o?E.q3:0,E.med=Q,E.q1=E.q3=Q,E.lf=E.uf=Q,E.mean=E.sd=Q,E.ln=E.un=Q,E.min=E.max=Q}q=Math.min(q,E.min),H=Math.max(H,E.max),E.pts2=C.filter(N),M.push(E)}}t._extremes[v._id]=n.findExtremes(v,[q,H],{padded:!0})}else{var ee=v.makeCalcdata(t,x),te=function(e,t){for(var r=e.length,n=new Array(r+1),i=0;i=0&&ie0){var ue,he;(E={}).pos=E[b]=B[l],C=E.pts=ne[l].sort(u),L=(I=E[x]=C.map(h)).length,E.min=I[0],E.max=I[L-1],E.mean=a.mean(I,L),E.sd=a.stdev(I,L,E.mean)*t.sdmultiple,E.med=a.interp(I,.5),L%2&&(le||ce)?(le?(ue=I.slice(0,L/2),he=I.slice(L/2+1)):ce&&(ue=I.slice(0,L/2+1),he=I.slice(L/2)),E.q1=a.interp(ue,.5),E.q3=a.interp(he,.5)):(E.q1=a.interp(I,.25),E.q3=a.interp(I,.75)),E.lf=f(E,I,L),E.uf=p(E,I,L),E.lo=d(E),E.uo=m(E);var fe=g(E,L);E.ln=E.med-fe,E.un=E.med+fe,ae=Math.min(ae,E.ln),oe=Math.max(oe,E.un),E.pts2=C.filter(N),M.push(E)}t.notched&&a.isTypedArray(ee)&&(ee=Array.from(ee)),t._extremes[v._id]=n.findExtremes(v,t.notched?ee.concat([ae,oe]):ee,{padded:!0})}return function(e,t){if(a.isArrayOrTypedArray(t.selectedpoints))for(var r=0;r0?(M[0].t={num:T[S],dPos:j,posLetter:b,valLetter:x,labels:{med:s(e,"median:"),min:s(e,"min:"),q1:s(e,"q1:"),q3:s(e,"q3:"),max:s(e,"max:"),mean:"sd"===t.boxmean||"sd"===t.sizemode?s(e,"mean ± σ:").replace("σ",1===t.sdmultiple?"σ":t.sdmultiple+"σ"):s(e,"mean:"),lf:s(e,"lower fence:"),uf:s(e,"upper fence:")}},T[S]++,M):[{t:{empty:!0}}]};var l={text:"tx",hovertext:"htx"};function c(e,t,r){for(var n in l)a.isArrayOrTypedArray(t[n])&&(Array.isArray(r)?a.isArrayOrTypedArray(t[n][r[0]])&&(e[l[n]]=t[n][r[0]][r[1]]):e[l[n]]=t[n][r])}function u(e,t){return e.v-t.v}function h(e){return e.v}function f(e,t,r){return 0===r?e.q1:Math.min(e.q1,t[Math.min(a.findBin(2.5*e.q1-1.5*e.q3,t,!0)+1,r-1)])}function p(e,t,r){return 0===r?e.q3:Math.max(e.q3,t[Math.max(a.findBin(2.5*e.q3-1.5*e.q1,t),0)])}function d(e){return 4*e.q1-3*e.q3}function m(e){return 4*e.q3-3*e.q1}function g(e,t){return 0===t?0:1.57*(e.q3-e.q1)/Math.sqrt(t)}}}),po=m({"src/traces/box/cross_trace_calc.js"(e,t){var r=ar(),n=ct(),i=nn().getAxisGroup,a=["v","h"];function o(e,t,a,o){var s,l,c,u=t.calcdata,h=t._fullLayout,f=o._id,p=f.charAt(0),d=[],m=0;for(s=0;s1,_=1-h[e+"gap"],b=1-h[e+"groupgap"];for(s=0;s0){var H=M.pointpos,G=M.jitter,W=M.marker.size/2,Z=0;H+G>=0&&((Z=V*(H+G))>D?(q=!0,N=W,B=Z):Z>R&&(N=W,B=D)),Z<=D&&(B=D);var Y=0;H-G<=0&&((Y=-V*(H-G))>O?(q=!0,U=W,j=Y):Y>F&&(U=W,j=O)),Y<=O&&(j=O)}else B=D,j=O;var X=new Array(c.length);for(l=0;le.lo&&(x.so=!0)}return a}));f.enter().append("path").classed("point",!0),f.exit().remove(),f.call(i.translatePoints,o,s)}function s(e,t,i,a){var o,s,l=t.val,c=t.pos,u=!!c.rangebreaks,h=a.bPos,f=a.bPosPxOffset||0,p=i.boxmean||(i.meanline||{}).visible;Array.isArray(a.bdPos)?(o=a.bdPos[0],s=a.bdPos[1]):(o=a.bdPos,s=a.bdPos);var d=e.selectAll("path.mean").data("box"===i.type&&i.boxmean||"violin"===i.type&&i.box.visible&&i.meanline.visible?n.identity:[]);d.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),d.exit().remove(),d.each((function(e){var t=c.c2l(e.pos+h,!0),n=c.l2p(t-o)+f,a=c.l2p(t+s)+f,d=u?(n+a)/2:c.l2p(t)+f,m=l.c2p(e.mean,!0),g=l.c2p(e.mean-e.sd,!0),y=l.c2p(e.mean+e.sd,!0);"h"===i.orientation?r.select(this).attr("d","M"+m+","+n+"V"+a+("sd"===p?"m0,0L"+g+","+d+"L"+m+","+n+"L"+y+","+d+"Z":"")):r.select(this).attr("d","M"+n+","+m+"H"+a+("sd"===p?"m0,0L"+d+","+g+"L"+n+","+m+"L"+d+","+y+"Z":""))}))}t.exports={plot:function(e,t,i,l){var c=e._context.staticPlot,u=t.xaxis,h=t.yaxis;n.makeTraceGroups(l,i,"trace boxes").each((function(e){var t,n,i=r.select(this),l=e[0],f=l.t,p=l.trace;f.wdPos=f.bdPos*p.whiskerwidth,!0!==p.visible||f.empty?i.remove():("h"===p.orientation?(t=h,n=u):(t=u,n=h),a(i,{pos:t,val:n},p,f,c),o(i,{x:u,y:h},p,f),s(i,{pos:t,val:n},p,f))}))},plotBoxAndWhiskers:a,plotPoints:o,plotBoxMean:s}}}),go=m({"src/traces/box/style.js"(e,t){var r=b(),n=W(),i=er();t.exports={style:function(e,t,a){var o=a||r.select(e).selectAll("g.trace.boxes");o.style("opacity",(function(e){return e[0].trace.opacity})),o.each((function(t){var a=r.select(this),o=t[0].trace,s=o.line.width;function l(e,t,r,i){e.style("stroke-width",t+"px").call(n.stroke,r).call(n.fill,i)}var c=a.selectAll("path.box");if("candlestick"===o.type)c.each((function(e){if(!e.empty){var t=r.select(this),n=o[e.dir];l(t,n.line.width,n.line.color,n.fillcolor),t.style("opacity",o.selectedpoints&&!e.selected?.3:1)}}));else{l(c,s,o.line.color,o.fillcolor),a.selectAll("path.mean").style({"stroke-width":s,"stroke-dasharray":2*s+"px,"+s+"px"}).call(n.stroke,o.line.color);var u=a.selectAll("path.point");i.pointStyle(u,o,e)}}))},styleOnSelect:function(e,t,r){var n=t[0].trace,a=r.selectAll("path.point");n.selectedpoints?i.selectedPointStyle(a,n):i.pointStyle(a,n,e)}}}}),yo=m({"src/traces/box/hover.js"(e,t){var r=ar(),n=ct(),i=Or(),a=W(),o=n.fillText;function s(e,t,o,s){var l,c,u,h,f,p,d,m,g,y,v,x,_,b,w=e.cd,T=e.xa,k=e.ya,A=w[0].trace,M=w[0].t,S="violin"===A.type,E=M.bdPos,C=M.wHover,I=function(e){return u.c2l(e.pos)+M.bPos-u.c2l(p)};S&&"both"!==A.side?("positive"===A.side&&(g=function(e){var t=I(e);return i.inbox(t,t+C,y)},x=E,_=0),"negative"===A.side&&(g=function(e){var t=I(e);return i.inbox(t-C,t,y)},x=0,_=E)):(g=function(e){var t=I(e);return i.inbox(t-C,t+C,y)},x=_=E),b=S?function(e){return i.inbox(e.span[0]-f,e.span[1]-f,y)}:function(e){return i.inbox(e.min-f,e.max-f,y)},"h"===A.orientation?(f=t,p=o,d=b,m=g,l="y",u=k,c="x",h=T):(f=o,p=t,d=g,m=b,l="x",u=T,c="y",h=k);var L=Math.min(1,E/Math.abs(u.r2c(u.range[1])-u.r2c(u.range[0])));function P(e){return(d(e)+m(e))/2}y=e.maxHoverDistance-L,v=e.maxSpikeDistance-L;var z=i.getDistanceFunction(s,d,m,P);if(i.getClosest(w,z,e),!1===e.index)return[];var D=w[e.index],O=A.line.color,R=(A.marker||{}).color;a.opacity(O)&&A.line.width?e.color=O:a.opacity(R)&&A.boxpoints?e.color=R:e.color=A.fillcolor,e[l+"0"]=u.c2p(D.pos+M.bPos-_,!0),e[l+"1"]=u.c2p(D.pos+M.bPos+x,!0),e[l+"LabelVal"]=void 0!==D.orig_p?D.orig_p:D.pos;var F=l+"Spike";e.spikeDistance=P(D)*v/y,e[F]=u.c2p(D.pos,!0);var B=A.boxmean||"sd"===A.sizemode||(A.meanline||{}).visible,j=A.boxpoints||A.points,N=j&&B?["max","uf","q3","med","mean","q1","lf","min"]:j&&!B?["max","uf","q3","med","q1","lf","min"]:!j&&B?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],U=h.range[1]0&&(a=!0);for(var l=0;la){var o=a-n[e];return n[e]=a,o}}return 0},max:function(e,t,n,i){var a=i[t];if(r(a)){if(a=Number(a),!r(n[e]))return n[e]=a,a;if(n[e]l?e>a?e>1.1*n?n:e>1.1*i?i:a:e>o?o:e>s?s:l:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function f(e,t,r,i,o,s){if(i&&e>a){var l=p(t,o,s),c=p(r,o,s),u=e===n?0:1;return l[u]!==c[u]}return Math.floor(r/e)-Math.floor(t/e)>.1}function p(e,t,r){var i=t.c2d(e,n,r).split("-");return""===i[0]&&(i.unshift(),i[0]="-"+i[0]),i}t.exports=function(e,t,r,i,o){var s,l,h=-1.1*t,f=-.1*t,p=e-f,d=r[0],m=r[1],g=Math.min(u(d+f,d+p,i,o),u(m+f,m+p,i,o)),y=Math.min(u(d+h,d+f,i,o),u(m+h,m+f,i,o));if(g>y&&ya){var v=s===n?1:6,x=s===n?"M12":"M1";return function(t,r){var a=i.c2d(t,n,o),s=a.indexOf("-",v);s>0&&(a=a.slice(0,s));var u=i.d2c(a,0,o);if(u"u"){if(l)return[L,d,!0];L=function(e,t,r,i,a){var o,s,l,c=e._fullLayout,u=function(e,t){for(var r=t.xaxis,n=t.yaxis,i=t.orientation,a=[],o=e._fullData,s=0;so.r2l(B)&&(N=a.tickIncrement(N,_.size,!0,f)),D.start=o.l2r(N),F||n.nestedProperty(t,y+".start").set(D.start)}var U=_.end,V=o.r2l(z.end),q=void 0!==V;if((_.endFound||q)&&V!==o.r2l(U)){var H=q?V:n.aggNums(Math.max,null,d);D.end=o.l2r(H),q||n.nestedProperty(t,y+".start").set(D.end)}var G="autobin"+s;return!1===t._input[G]&&(t._input[y]=n.extendFlat({},t[y]||{}),delete t._input[G],delete t[G]),[D,d]}t.exports={calc:function(e,t){var i,d,m,g,y=[],v=[],x="h"===t.orientation,_=a.getFromId(e,x?t.yaxis:t.xaxis),b=x?"y":"x",w={x:"y",y:"x"}[b],T=t[b+"calendar"],k=t.cumulative,A=p(e,t,_,b),M=A[0],S=A[1],E="string"==typeof M.size,C=[],I=E?C:M,L=[],P=[],z=[],D=0,O=t.histnorm,R=t.histfunc,F=-1!==O.indexOf("density");k.enabled&&F&&(O=O.replace(/ ?density$/,""),F=!1);var B,j="max"===R||"min"===R?null:0,N=c.count,U=u[O],V=!1,q=function(e){return _.r2c(e,0,T)};for(n.isArrayOrTypedArray(t[w])&&"count"!==R&&(B=t[w],V="avg"===R,N=c[R]),i=q(M.start),m=q(M.end)+(i-a.tickIncrement(i,M.size,!1,T))/1e6;i=0&&g=0;n--)s(n);else if("increasing"===t){for(n=1;n=0;n--)e[n]+=e[n+1];"exclude"===r&&(e.push(0),e.shift())}}(v,k.direction,k.currentbin);var Q=Math.min(y.length,v.length),ee=[],te=0,re=Q-1;for(i=0;i=te;i--)if(v[i]){re=i;break}for(i=te;i<=re;i++)if(r(y[i])&&r(v[i])){var ne={p:y[i],s:v[i],b:0};k.enabled||(ne.pts=z[i],Y?ne.ph0=ne.ph1=z[i].length?S[z[i][0]]:y[i]:(t._computePh=!0,ne.ph0=W(C[i]),ne.ph1=W(C[i+1],!0))),ee.push(ne)}return 1===ee.length&&(ee[0].width1=a.tickIncrement(ee[0].p,M.size,!1,T)-ee[0].p),o(t,"marker")&&s(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),o(t,"marker.line")&&s(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}),l(ee,t),n.isArrayOrTypedArray(t.selectedpoints)&&n.tagSelected(ee,t,K),ee},calcAllAutoBins:p}}}),Po=m({"src/traces/histogram2d/calc.js"(e,t){var r=ct(),n=ar(),i=So(),a=Eo(),o=Co(),s=Io(),l=Lo().calcAllAutoBins;function c(e,t,r,n){var i,a=new Array(e);if(n)for(i=0;iS&&T.splice(S,T.length-S),M.length>S&&M.splice(S,M.length-S);var E=[],C=[],I=[],L="string"==typeof w.size,P="string"==typeof A.size,z=[],D=[],O=L?z:w,R=P?D:A,F=0,B=[],j=[],N=t.histnorm,U=t.histfunc,V=-1!==N.indexOf("density"),q="max"===U||"min"===U?null:0,H=i.count,G=a[N],W=!1,Z=[],Y=[],X="z"in t?t.z:"marker"in t&&Array.isArray(t.marker.color)?t.marker.color:"";X&&"count"!==U&&(W="avg"===U,H=i[U]);var $=w.size,K=x(w.start),J=x(w.end)+(K-n.tickIncrement(K,$,!1,y))/1e6;for(s=K;s=0&&p=0&&dm&&(y=Math.max(y,Math.abs(e[a][o]-d)/(g-m))))}return y}t.exports=function(e,t){var n,a,o=1;for(i(e,t),n=0;n.01;n++)o=i(e,t,(a=o,.5-.25*Math.min(1,.5*a)));return o>.01&&r.log("interp2d didn't converge quickly",o),e}}}),Ro=m({"src/traces/heatmap/find_empties.js"(e,t){var r=ct().maxRowLength;t.exports=function(e){var t,n,i,a,o,s,l,c,u=[],h={},f=[],p=e[0],d=[],m=[0,0,0],g=r(e);for(n=0;n=0;o--)(s=((h[[(n=(a=f[o])[0])-1,i=a[1]]]||m)[2]+(h[[n+1,i]]||m)[2]+(h[[n,i-1]]||m)[2]+(h[[n,i+1]]||m)[2])/20)&&(l[a]=[n,i,s],f.splice(o,1),c=!0);if(!c)throw"findEmpties iterated with no new neighbors";for(a in l)h[a]=l[a],u.push(l[a])}return u.sort((function(e,t){return t[2]-e[2]}))}}}),Fo=m({"src/traces/heatmap/make_bound_array.js"(e,t){var r=He(),n=ct().isArrayOrTypedArray;t.exports=function(e,t,i,a,o,s){var l,c,u,h=[],f=r.traceIs(e,"contour"),p=r.traceIs(e,"histogram");if(n(t)&&t.length>1&&!p&&"category"!==s.type){var d=t.length;if(!(d<=o))return f?t.slice(0,o):t.slice(0,o+1);if(f)h=Array.from(t).slice(0,o);else if(1===o)h="log"===s.type?[.5*t[0],2*t[0]]:[t[0]-.5,t[0]+.5];else if("log"===s.type){for(h=[Math.pow(t[0],1.5)/Math.pow(t[1],.5)],u=1;u1){var t=(e[e.length-1]-e[0])/(e.length-1),r=Math.abs(t/100);for(k=0;kr)return!1}return!0}(M.rangebreaks||S.rangebreaks)&&(T=function(e,t,r){for(var n=[],i=-1,a=0;a0;)k=A.c2p(j[I]),I--;for(k0;)C=M.c2p(N[I]),I--;C=A._length||k<=0||E>=M._length||C<=0)return z.selectAll("image").data([]).exit().remove(),void x(z);"fast"===X?(K=W,J=G):(K=Q,J=ee);var te=document.createElement("canvas");te.width=K,te.height=J;var re,ne,ie=te.getContext("2d",{willReadFrequently:!0}),ae=f(O,{noNumericCheck:!0,returnArray:!0});"fast"===X?(re=Z?function(e){return W-1-e}:s.identity,ne=Y?function(e){return G-1-e}:s.identity):(re=function(e){return s.constrain(Math.round(A.c2p(j[e])-b),0,Q)},ne=function(e){return s.constrain(Math.round(M.c2p(N[e])-E),0,ee)});var oe,se,le,ce,ue=ne(0),he=[ue,ue],fe=Z?0:1,pe=Y?0:1,de=0,me=0,ge=0,ye=0;function ve(e,t){if(void 0!==e){var r=ae(e);return r[0]=Math.round(r[0]),r[1]=Math.round(r[1]),r[2]=Math.round(r[2]),de+=t,me+=r[0]*t,ge+=r[1]*t,ye+=r[2]*t,r}return[0,0,0,0]}function xe(e,t,r,n){var i=e[r.bin0];if(void 0===i)return ve(void 0,1);var a,o=e[r.bin1],s=t[r.bin0],l=t[r.bin1],c=o-i||0,u=s-i||0;return a=void 0===o?void 0===l?0:void 0===s?2*(l-i):2*(2*l-s-i)/3:void 0===l?void 0===s?0:2*(2*i-o-s)/3:void 0===s?2*(2*l-o-i)/3:l+i-o-s,ve(i+r.frac*c+n.frac*(u+r.frac*a))}if("default"!==X){var _e,be=0;try{_e=new Uint8Array(K*J*4)}catch{_e=new Array(K*J*4)}if("smooth"===X){var we,Te,ke,Ae=U||j,Me=V||N,Se=new Array(Ae.length),Ee=new Array(Me.length),Ce=new Array(Q),Ie=U?w:_,Le=V?w:_;for(I=0;IXe||Xe>M._length))for(L=Ge;LKe||Ke>A._length)){var Je=c({x:$e,y:Ye},O,e._fullLayout);Je.x=$e,Je.y=Ye;var Qe=D.z[I][L];void 0===Qe?(Je.z="",Je.zLabel=""):(Je.z=Qe,Je.zLabel=o.tickText(Ue,Qe,"hover").text);var et=D.text&&D.text[I]&&D.text[I][L];(void 0===et||!1===et)&&(et=""),Je.text=et;var tt=s.texttemplateString({data:[Je,O._meta],fallback:O.texttemplatefallback,labels:Je,locale:e._fullLayout._d3locale,template:je});if(tt){var rt=tt.split("
"),nt=rt.length,it=0;for(P=0;P=b[0].length||p<0||p>b.length)return}else{if(r.inbox(t-x[0],t-x[x.length-1],0)>0||r.inbox(s-_[0],s-_[_.length-1],0)>0)return;if(d){var E;for(M=[2*x[0]-x[1]],E=1;E=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}}),cs=m({"src/traces/contour/attributes.js"(e,t){var r=wo(),n=kn(),i=It(),a=i.axisHoverFormat,o=i.descriptionOnlyNumbers,s=zt(),l=Oe().dash,c=j(),u=B().extendFlat,h=ls(),f=h.COMPARISON_OPS2,p=h.INTERVAL_OPS,d=n.line;t.exports=u({z:r.z,x:r.x,x0:r.x0,dx:r.dx,y:r.y,y0:r.y0,dy:r.dy,xperiod:r.xperiod,yperiod:r.yperiod,xperiod0:n.xperiod0,yperiod0:n.yperiod0,xperiodalignment:r.xperiodalignment,yperiodalignment:r.yperiodalignment,text:r.text,hovertext:r.hovertext,transpose:r.transpose,xtype:r.xtype,ytype:r.ytype,xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z",1),hovertemplate:r.hovertemplate,hovertemplatefallback:r.hovertemplatefallback,texttemplate:u({},r.texttemplate,{}),texttemplatefallback:r.texttemplatefallback,textfont:u({},r.textfont,{}),hoverongaps:r.hoverongaps,connectgaps:u({},r.connectgaps,{}),fillcolor:{valType:"color",editType:"calc"},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0}},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc"},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc"},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1}},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc"},showlines:{valType:"boolean",dflt:!0,editType:"plot"},showlabels:{valType:"boolean",dflt:!1,editType:"plot"},labelfont:c({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:o("contour label")},operation:{valType:"enumerated",values:[].concat(f).concat(p),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:u({},d.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:l,smoothing:u({},d.smoothing,{}),editType:"plot"},zorder:n.zorder},s("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}}),us=m({"src/traces/histogram2dcontour/attributes.js"(e,t){var r=rs(),n=cs(),i=zt(),a=It().axisHoverFormat,o=B().extendFlat;t.exports=o({x:r.x,y:r.y,z:r.z,marker:r.marker,histnorm:r.histnorm,histfunc:r.histfunc,nbinsx:r.nbinsx,xbins:r.xbins,nbinsy:r.nbinsy,ybins:r.ybins,autobinx:r.autobinx,autobiny:r.autobiny,bingroup:r.bingroup,xbingroup:r.xbingroup,ybingroup:r.ybingroup,autocontour:n.autocontour,ncontours:n.ncontours,contours:n.contours,line:{color:n.line.color,width:o({},n.line.width,{dflt:.5}),dash:n.line.dash,smoothing:n.line.smoothing,editType:"plot"},xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z",1),hovertemplate:r.hovertemplate,hovertemplatefallback:r.hovertemplatefallback,texttemplate:n.texttemplate,texttemplatefallback:n.texttemplatefallback,textfont:n.textfont},i("",{cLetter:"z",editTypeOverride:"calc"}))}}),hs=m({"src/traces/contour/contours_defaults.js"(e,t){t.exports=function(e,t,r,n){var i=n("contours.start"),a=n("contours.end"),o=!1===i||!1===a,s=r("contours.size");((o?t.autocontour=!0:r("autocontour",!1))||!s)&&r("ncontours")}}}),fs=m({"src/traces/contour/label_defaults.js"(e,t){var r=ct();t.exports=function(e,t,n,i){if(i||(i={}),e("contours.showlabels")){var a=t.font;r.coerceFont(e,"contours.labelfont",a,{overrideDflt:{color:n}}),e("contours.labelformat")}!1!==i.hasHover&&e("zhoverformat")}}}),ps=m({"src/traces/contour/style_defaults.js"(e,t){var r=Ht(),n=fs();t.exports=function(e,t,i,a,o){var s,l=i("contours.coloring"),c="";"fill"===l&&(s=i("contours.showlines")),!1!==s&&("lines"!==l&&(c=i("line.color","#000")),i("line.width",.5),i("line.dash")),"none"!==l&&(!0!==e.showlegend&&(t.showlegend=!1),t._dfltShowLegend=!1,r(e,t,a,i,{prefix:"",cLetter:"z"})),i("line.smoothing"),n(i,a,c,o)}}}),ds=m({"src/traces/histogram2dcontour/defaults.js"(e,t){var r=ct(),n=ns(),i=hs(),a=ps(),o=ko(),s=us();t.exports=function(e,t,l,c){function u(n,i){return r.coerce(e,t,s,n,i)}n(e,t,u,c),!1!==t.visible&&(i(e,t,u,(function(n){return r.coerce2(e,t,s,n)})),a(e,t,u,c),u("xhoverformat"),u("yhoverformat"),u("hovertemplate"),u("hovertemplatefallback"),t.contours&&"heatmap"===t.contours.coloring&&o(u,c))}}}),ms=m({"src/traces/contour/set_contours.js"(e,t){var r=ar(),n=ct();function i(e,t,n){var i={type:"linear",range:[e,t]};return r.autoTicks(i,(t-e)/(n||15)),i}t.exports=function(e,t){var a=e.contours;if(e.autocontour){var o=e.zmin,s=e.zmax;(e.zauto||void 0===o)&&(o=n.aggNums(Math.min,null,t)),(e.zauto||void 0===s)&&(s=n.aggNums(Math.max,null,t));var l=i(o,s,e.ncontours);a.size=l.dtick,a.start=r.tickFirst(l),l.range.reverse(),a.end=r.tickFirst(l),a.start===o&&(a.start+=a.size),a.end===s&&(a.end-=a.size),a.start>a.end&&(a.start=a.end=(a.start+a.end)/2),e._input.contours||(e._input.contours={}),n.extendFlat(e._input.contours,{start:a.start,end:a.end,size:a.size}),e._input.autocontour=!0}else if("constraint"!==a.type){var c,u=a.start,h=a.end,f=e._input.contours;u>h&&(a.start=f.start=h,h=a.end=f.end=u,u=a.start),a.size>0||(c=u===h?1:i(u,h,e.ncontours).dtick,f.size=a.size=c)}}}}),gs=m({"src/traces/contour/end_plus.js"(e,t){t.exports=function(e){return e.end+e.size/1e6}}}),ys=m({"src/traces/contour/calc.js"(e,t){var r=Yt(),n=Bo(),i=ms(),a=gs();t.exports=function(e,t){var o=n(e,t),s=o[0].z;i(t,s);var l,c=t.contours,u=r.extractOpts(t);if("heatmap"===c.coloring&&u.auto&&!1===t.autocontour){var h=c.start,f=a(c),p=c.size||1,d=Math.floor((f-h)/p)+1;isFinite(p)||(p=1,d=1);var m=h-p/2;l=[m,m+d*p]}else l=s;return r.calc(e,t,{vals:l,cLetter:"z"}),o}}}),vs=m({"src/traces/contour/constants.js"(e,t){t.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}}}),xs=m({"src/traces/contour/make_crossings.js"(e,t){var r=vs();function n(e,t){var r=(t[0][0]>e?0:1)+(t[0][1]>e?0:2)+(t[1][1]>e?0:4)+(t[1][0]>e?0:8);return 5===r||10===r?e>(t[0][0]+t[0][1]+t[1][0]+t[1][1])/4?5===r?713:1114:5===r?104:208:15===r?0:r}t.exports=function(e){var t,i,a,o,s,l,c,u,h,f=e[0].z,p=f.length,d=f[0].length,m=2===p||2===d;for(i=0;i20&&t?208===e||1114===e?i=0===r[0]?1:-1:a=0===r[1]?1:-1:-1!==n.BOTTOMSTART.indexOf(e)?a=1:-1!==n.LEFTSTART.indexOf(e)?i=1:-1!==n.TOPSTART.indexOf(e)?a=-1:i=-1,[i,a]}(f,o,t),d=[s(e,t,[-p[0],-p[1]])],m=e.z.length,g=e.z[0].length,y=t.slice(),v=p.slice();for(u=0;u<1e4;u++){if(f>20?(f=n.CHOOSESADDLE[f][(p[0]||p[1])<0?0:1],e.crossings[h]=n.SADDLEREMAINDER[f]):delete e.crossings[h],!(p=n.NEWDELTA[f])){r.log("Found bad marching index:",f,t,e.level);break}d.push(s(e,t,p)),t[0]+=p[0],t[1]+=p[1],h=t.join(","),i(d[d.length-1],d[d.length-2],l,c)&&d.pop();var x=p[0]&&(t[0]<0||t[0]>g-2)||p[1]&&(t[1]<0||t[1]>m-2);if(t[0]===y[0]&&t[1]===y[1]&&p[0]===v[0]&&p[1]===v[1]||o&&x)break;f=e.crossings[h]}1e4===u&&r.log("Infinite loop in contour?");var _,b,w,T,k,A,M,S,E,C,I,L=i(d[0],d[d.length-1],l,c),P=0,z=.2*e.smoothing,D=[],O=0;for(u=1;u=O;u--)if((_=D[u])=O&&_+D[b]S&&E--,e.edgepaths[E]=I.concat(d,C));break}j||(e.edgepaths[S]=d.concat(C))}for(S=0;S":o(">"),"<":o("<"),"=":o("=")}}}),ws=m({"src/traces/contour/empty_pathinfo.js"(e,t){var r=ct(),n=bs(),i=gs();t.exports=function(e,t,a){for(var o="constraint"===e.type?n[e._operation](e.value):e,s=o.size,l=[],c=i(o),u=a.trace._carpetTrace,h=u?{xaxis:u.aaxis,yaxis:u.baxis,x:a.a,y:a.b}:{xaxis:t.xaxis,yaxis:t.yaxis,x:a.x,y:a.y},f=o.start;f1e3){r.warn("Too many contours, clipping at 1000",e);break}return l}}}),Ts=m({"src/traces/contour/convert_to_constraints.js"(e,t){var r=ct();function n(e){return r.extendFlat({},e,{edgepaths:r.extendDeep([],e.edgepaths),paths:r.extendDeep([],e.paths),starts:r.extendDeep([],e.starts)})}t.exports=function(e,t){var i,a,o,s=function(e){return e.reverse()},l=function(e){return e};switch(t){case"=":case"<":return e;case">":for(1!==e.length&&r.warn("Contour data invalid for the specified inequality operation."),a=e[0],i=0;io.level||o.starts.length&&a===o.level)}break;case"constraint":if(n.prefixBoundary=!1,n.edgepaths.length)return;var s=n.x.length,l=n.y.length,c=-1/0,u=1/0;for(r=0;r":p>c&&(n.prefixBoundary=!0);break;case"<":(pc||n.starts.length&&f===u)&&(n.prefixBoundary=!0);break;case"][":h=Math.min(p[0],p[1]),f=Math.max(p[0],p[1]),hc&&(n.prefixBoundary=!0)}}}}}),As=m({"src/traces/contour/plot.js"(e){var t=b(),r=ct(),n=er(),i=Yt(),a=Et(),o=ar(),s=rr(),l=Uo(),c=xs(),u=_s(),h=ws(),f=Ts(),p=ks(),d=vs(),m=d.LABELOPTIMIZER;function g(e,t){var i,a,o,s,l,c,u,h="",f=0,p=e.edgepaths.map((function(e,t){return t})),d=!0;function m(e){return Math.abs(e[1]-t[2][1])<.01}function g(e){return Math.abs(e[0]-t[0][0])<.01}function y(e){return Math.abs(e[0]-t[2][0])<.01}for(;p.length;){for(c=n.smoothopen(e.edgepaths[f],e.smoothing),h+=d?c:c.replace(/^M/,"L"),p.splice(p.indexOf(f),1),i=e.edgepaths[f][e.edgepaths[f].length-1],s=-1,o=0;o<4;o++){if(!i){r.log("Missing end?",f,e);break}for(u=i,Math.abs(u[1]-t[0][1])<.01&&!y(i)?a=t[1]:g(i)?a=t[0]:m(i)?a=t[3]:y(i)&&(a=t[2]),l=0;l=0&&(a=v,s=l):Math.abs(i[1]-a[1])<.01?Math.abs(i[1]-v[1])<.01&&(v[0]-i[0])*(a[0]-v[0])>=0&&(a=v,s=l):r.log("endpt to newendpt is not vert. or horz.",i,a,v)}if(i=a,s>=0)break;h+="L"+a}if(s===e.edgepaths.length){r.log("unclosed perimeter path");break}f=s,(d=-1===p.indexOf(f))&&(f=p[0],h+="Z")}for(f=0;fi.center?i.right-s:s-i.left)/(u+Math.abs(Math.sin(c)*o)),p=(l>i.middle?i.bottom-l:l-i.top)/(Math.abs(h)+Math.cos(c)*o);if(f<1||p<1)return 1/0;var d=m.EDGECOST*(1/(f-1)+1/(p-1));d+=m.ANGLECOST*c*c;for(var g=s-u,y=l-h,v=s+u,x=l+h,_=0;_2*m.MAXCOST)break;p&&(s/=2),l=(o=c-s/2)+1.5*s}if(f<=m.MAXCOST)return u},e.addLabelData=function(e,t,r,n){var i=t.fontSize,a=t.width+i/3,o=Math.max(0,t.height-i/3),s=e.x,l=e.y,c=e.theta,u=Math.sin(c),h=Math.cos(c),f=function(e,t){return[s+e*h-t*u,l+e*u+t*h]},p=[f(-a/2,-o/2),f(-a/2,o/2),f(a/2,o/2),f(a/2,-o/2)];r.push({text:t.text,x:s,y:l,dy:t.dy,theta:c,level:t.level,width:a,height:o}),n.push(p)},e.drawLabels=function(e,n,i,o,s){var l=e.selectAll("text").data(n,(function(e){return e.text+","+e.x+","+e.y+","+e.theta}));if(l.exit().remove(),l.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each((function(e){var r=e.x+Math.sin(e.theta)*e.dy,n=e.y-Math.cos(e.theta)*e.dy;t.select(this).text(e.text).attr({x:r,y:n,transform:"rotate("+180*e.theta/Math.PI+" "+r+" "+n+")"}).call(a.convertToTspans,i)})),s){for(var c="",u=0;u=v)&&(a<=y&&(a=y),o>=v&&(o=v),l=Math.floor((o-a)/s)+1,c=0),f=0;fy&&(m.unshift(y),g.unshift(g[0])),m[m.length-1]2?t.value=t.value.slice(2):0===t.length?t.value=[0,1]:t.length<2?(n=parseFloat(t.value[0]),t.value=[n,n+1]):t.value=[parseFloat(t.value[0]),parseFloat(t.value[1])]:r(t.value)&&(n=parseFloat(t.value),t.value=[n,n+1])):(e("contours.value",0),r(t.value)||(l(t.value)?t.value=parseFloat(t.value[0]):t.value=0))}(i,g),"="===y?p=g.showlines=!0:(p=i("contours.showlines"),m=i("fillcolor",a((e.line||{}).color||h,.5))),p&&(d=i("line.color",m&&o(m)?a(t.fillcolor,1):h),i("line.width",2),i("line.dash")),i("line.smoothing"),n(i,s,d,f)}}}),zs=m({"src/traces/contour/defaults.js"(e,t){var r=ct(),n=To(),i=Wn(),a=Ps(),o=hs(),s=ps(),l=ko(),c=cs();t.exports=function(e,t,u,h){function f(n,i){return r.coerce(e,t,c,n,i)}if(n(e,t,f,h)){i(e,t,h,f),f("xhoverformat"),f("yhoverformat"),f("text"),f("hovertext"),f("hoverongaps"),f("hovertemplate"),f("hovertemplatefallback");var p="constraint"===f("contours.type");f("connectgaps",r.isArray1D(t.z)),p?a(e,t,f,h,u):(o(e,t,f,(function(n){return r.coerce2(e,t,c,n)})),s(e,t,f,h)),t.contours&&"heatmap"===t.contours.coloring&&l(f,h),f("zorder")}else t.visible=!1}}}),Ds=m({"src/traces/contour/index.js"(e,t){t.exports={attributes:cs(),supplyDefaults:zs(),calc:ys(),plot:As().plot,style:Ss(),colorbar:Es(),hoverPoints:Cs(),moduleType:"trace",name:"contour",basePlotModule:Ci(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}}),Os=m({"lib/contour.js"(e,t){t.exports=Ds()}}),Rs=m({"src/traces/scatterternary/attributes.js"(e,t){var{hovertemplateAttrs:r,texttemplateAttrs:n,templatefallbackAttrs:i}=Fe(),a=Tn(),o=kn(),s=q(),l=zt(),c=Oe().dash,u=B().extendFlat,h=o.marker,f=o.line,p=h.line;t.exports={a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},c:{valType:"data_array",editType:"calc"},sum:{valType:"number",dflt:0,min:0,editType:"calc"},mode:u({},o.mode,{dflt:"markers"}),text:u({},o.text,{}),texttemplate:n({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:i({editType:"plot"}),hovertext:u({},o.hovertext,{}),line:{color:f.color,width:f.width,dash:c,backoff:f.backoff,shape:u({},f.shape,{values:["linear","spline"]}),smoothing:f.smoothing,editType:"calc"},connectgaps:o.connectgaps,cliponaxis:o.cliponaxis,fill:u({},o.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:a(),marker:u({symbol:h.symbol,opacity:h.opacity,angle:h.angle,angleref:h.angleref,standoff:h.standoff,maxdisplayed:h.maxdisplayed,size:h.size,sizeref:h.sizeref,sizemin:h.sizemin,sizemode:h.sizemode,line:u({width:p.width,dash:p.dash,editType:"calc"},l("marker.line")),gradient:h.gradient,editType:"calc"},l("marker")),textfont:o.textfont,textposition:o.textposition,selected:o.selected,unselected:o.unselected,hoverinfo:u({},s.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:o.hoveron,hovertemplate:r(),hovertemplatefallback:i()}}}),Fs=m({"src/traces/scatterternary/defaults.js"(e,t){var r=ct(),n=wn(),i=Xt(),a=Yn(),o=Xn(),s=$n(),l=Kn(),c=Jn(),u=Rs();t.exports=function(e,t,h,f){function p(n,i){return r.coerce(e,t,u,n,i)}var d,m=p("a"),g=p("b"),y=p("c");if(m?(d=m.length,g?(d=Math.min(d,g.length),y&&(d=Math.min(d,y.length))):d=y?Math.min(d,y.length):0):g&&y&&(d=Math.min(g.length,y.length)),d){t._length=d,p("sum"),p("text"),p("hovertext"),"fills"!==t.hoveron&&(p("hovertemplate"),p("hovertemplatefallback")),p("mode",d"),o.hovertemplate=f.hovertemplate,a}function x(e,t){y.push(e._hovertitle+": "+t)}}}}),Vs=m({"src/traces/scatterternary/event_data.js"(e,t){t.exports=function(e,t,r,n,i){if(t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),n[i]){var a=n[i];e.a=a.a,e.b=a.b,e.c=a.c}else e.a=t.a,e.b=t.b,e.c=t.c;return e}}}),qs=m({"src/plots/ternary/ternary.js"(e,t){var r=b(),n=F(),i=He(),a=ct(),o=a.strTranslate,s=a._,l=W(),c=er(),u=rr(),h=B().extendFlat,f=At(),p=ar(),d=pr(),m=Or(),g=Rr(),y=g.freeMode,v=g.rectMode,x=tr(),_=Cn().prepSelect,w=Cn().selectOnClick,T=Cn().clearOutline,k=Cn().clearSelectionsCache,A=xt();function M(e,t){this.id=e.id,this.graphDiv=e.graphDiv,this.init(t),this.makeFramework(t),this.updateFx(t),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}t.exports=M;var S=M.prototype;S.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}},S.plot=function(e,t){var r=this,n=t[r.id],i=t._size;r._hasClipOnAxisFalse=!1;for(var a=0;aE*_?i=(a=_)*E:a=(i=x)/E,s=y*i/x,f=v*a/_,r=t.l+t.w*m-i/2,n=t.t+t.h*(1-g)-a/2,p.x0=r,p.y0=n,p.w=i,p.h=a,p.sum=b,p.xaxis={type:"linear",range:[w+2*k-b,b-w-2*T],domain:[m-s/2,m+s/2],_id:"x"},u(p.xaxis,p.graphDiv._fullLayout),p.xaxis.setScale(),p.xaxis.isPtWithinRange=function(e){return e.a>=p.aaxis.range[0]&&e.a<=p.aaxis.range[1]&&e.b>=p.baxis.range[1]&&e.b<=p.baxis.range[0]&&e.c>=p.caxis.range[1]&&e.c<=p.caxis.range[0]},p.yaxis={type:"linear",range:[w,b-T-k],domain:[g-f/2,g+f/2],_id:"y"},u(p.yaxis,p.graphDiv._fullLayout),p.yaxis.setScale(),p.yaxis.isPtWithinRange=function(){return!0};var A=p.yaxis.domain[0],M=p.aaxis=h({},e.aaxis,{range:[w,b-T-k],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[A,A+f*E],anchor:"free",position:0,_id:"y",_length:i});u(M,p.graphDiv._fullLayout),M.setScale();var S=p.baxis=h({},e.baxis,{range:[b-w-k,T],side:"bottom",domain:p.xaxis.domain,anchor:"free",position:0,_id:"x",_length:i});u(S,p.graphDiv._fullLayout),S.setScale();var C=p.caxis=h({},e.caxis,{range:[b-w-T,k],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[A,A+f*E],anchor:"free",position:0,_id:"y",_length:i});u(C,p.graphDiv._fullLayout),C.setScale();var I="M"+r+","+(n+a)+"h"+i+"l-"+i/2+",-"+a+"Z";p.clipDef.select("path").attr("d",I),p.layers.plotbg.select("path").attr("d",I);var L="M0,"+a+"h"+i+"l-"+i/2+",-"+a+"Z";p.clipDefRelative.select("path").attr("d",L);var P=o(r,n);p.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",P),p.clipDefRelative.select("path").attr("transform",null);var z=o(r-S._offset,n+a);p.layers.baxis.attr("transform",z),p.layers.bgrid.attr("transform",z);var D=o(r+i/2,n)+"rotate(30)"+o(0,-M._offset);p.layers.aaxis.attr("transform",D),p.layers.agrid.attr("transform",D);var O=o(r+i/2,n)+"rotate(-30)"+o(0,-C._offset);p.layers.caxis.attr("transform",O),p.layers.cgrid.attr("transform",O),p.drawAxes(!0),p.layers.aline.select("path").attr("d",M.showline?"M"+r+","+(n+a)+"l"+i/2+",-"+a:"M0,0").call(l.stroke,M.linecolor||"#000").style("stroke-width",(M.linewidth||0)+"px"),p.layers.bline.select("path").attr("d",S.showline?"M"+r+","+(n+a)+"h"+i:"M0,0").call(l.stroke,S.linecolor||"#000").style("stroke-width",(S.linewidth||0)+"px"),p.layers.cline.select("path").attr("d",C.showline?"M"+(r+i/2)+","+n+"l"+i/2+","+a:"M0,0").call(l.stroke,C.linecolor||"#000").style("stroke-width",(C.linewidth||0)+"px"),p.graphDiv._context.staticPlot||p.initInteractions(),c.setClipUrl(p.layers.frontplot,p._hasClipOnAxisFalse?null:p.clipId,p.graphDiv)},S.drawAxes=function(e){var t=this,r=t.graphDiv,n=t.id.slice(7)+"title",i=t.layers,a=t.aaxis,o=t.baxis,l=t.caxis;if(t.drawAx(a),t.drawAx(o),t.drawAx(l),e){var c=Math.max(a.showticklabels?a.tickfont.size/2:0,(l.showticklabels?.75*l.tickfont.size:0)+("outside"===l.ticks?.87*l.ticklen:0)),u=(o.showticklabels?o.tickfont.size:0)+("outside"===o.ticks?o.ticklen:0)+3;i["a-title"]=x.draw(r,"a"+n,{propContainer:a,propName:t.id+".aaxis.title.text",placeholder:s(r,"Click to enter Component A title"),attributes:{x:t.x0+t.w/2,y:t.y0-a.title.font.size/3-c,"text-anchor":"middle"}}),i["b-title"]=x.draw(r,"b"+n,{propContainer:o,propName:t.id+".baxis.title.text",placeholder:s(r,"Click to enter Component B title"),attributes:{x:t.x0-u,y:t.y0+t.h+.83*o.title.font.size+u,"text-anchor":"middle"}}),i["c-title"]=x.draw(r,"c"+n,{propContainer:l,propName:t.id+".caxis.title.text",placeholder:s(r,"Click to enter Component C title"),attributes:{x:t.x0+t.w+u,y:t.y0+t.h+.83*l.title.font.size+u,"text-anchor":"middle"}})}},S.drawAx=function(e){var t=this,r=t.graphDiv,n=e._name,i=n.charAt(0),o=e._id,s=t.layers[n],l=i+"tickLayout",c=function(e){return e.ticks+String(e.ticklen)+String(e.showticklabels)}(e);t[l]!==c&&(s.selectAll("."+o+"tick").remove(),t[l]=c),e.setScale();var u=p.calcTicks(e),h=p.clipEnds(e,u),f=p.makeTransTickFn(e),d=p.getTickSigns(e)[2],m=a.deg2rad(30),g=d*(e.linewidth||1)/2,y=d*e.ticklen,v=t.w,x=t.h,_="b"===i?"M0,"+g+"l"+Math.sin(m)*y+","+Math.cos(m)*y:"M"+g+",0l"+Math.cos(m)*y+","+-Math.sin(m)*y,b={a:"M0,0l"+x+",-"+v/2,b:"M0,0l-"+v/2+",-"+x,c:"M0,0l-"+x+","+v/2}[i];p.drawTicks(r,e,{vals:"inside"===e.ticks?h:u,layer:s,path:_,transFn:f,crisp:!1}),p.drawGrid(r,e,{vals:h,layer:t.layers[i+"grid"],path:b,transFn:f,crisp:!1}),p.drawLabels(r,e,{vals:u,layer:s,transFn:f,labelFns:p.makeLabelFns(e,0,30)})};var C=A.MINZOOM/2+.87,I="m-0.87,.5h"+C+"v3h-"+(C+5.2)+"l"+(C/2+2.6)+",-"+(.87*C+4.5)+"l2.6,1.5l-"+C/2+","+.87*C+"Z",L="m0.87,.5h-"+C+"v3h"+(C+5.2)+"l-"+(C/2+2.6)+",-"+(.87*C+4.5)+"l-2.6,1.5l"+C/2+","+.87*C+"Z",P="m0,1l"+C/2+","+.87*C+"l2.6,-1.5l-"+(C/2+2.6)+",-"+(.87*C+4.5)+"l-"+(C/2+2.6)+","+(.87*C+4.5)+"l2.6,1.5l"+C/2+",-"+.87*C+"Z",z=!0;function D(e){r.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}S.clearOutline=function(){k(this.dragOptions),T(this.dragOptions.gd)},S.initInteractions=function(){var e,t,r,u,h,f,p,g,x,b,T,k,M=this,S=M.layers.plotbg.select("path").node(),C=M.graphDiv,O=C._fullLayout._zoomlayer;function R(e){var t={};return t[M.id+".aaxis.min"]=e.a,t[M.id+".baxis.min"]=e.b,t[M.id+".caxis.min"]=e.c,t}function F(e,t){var r=C._fullLayout.clickmode;D(C),2===e&&(C.emit("plotly_doubleclick",null),i.call("_guiRelayout",C,R({a:0,b:0,c:0}))),r.indexOf("select")>-1&&1===e&&w(t,C,[M.xaxis],[M.yaxis],M.id,M.dragOptions),r.indexOf("event")>-1&&m.click(C,t,M.id)}function B(e,t){return 1-t/M.h}function j(e,t){return 1-(e+(M.h-t)/Math.sqrt(3))/M.w}function N(e,t){return(e-(M.h-t)/Math.sqrt(3))/M.w}function U(n,i){var a=r+n*e,o=u+i*t,s=Math.max(0,Math.min(1,B(0,u),B(0,o))),l=Math.max(0,Math.min(1,j(r,u),j(a,o))),c=Math.max(0,Math.min(1,N(r,u),N(a,o))),d=(s/2+c)*M.w,m=(1-s/2-l)*M.w,y=(d+m)/2,v=m-d,_=(1-s)*M.h,w=_-v/E;v.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),k.transition().style("opacity",1).duration(200),b=!0),C.emit("plotly_relayouting",R(p))}function V(){D(C),p!==h&&(i.call("_guiRelayout",C,R(p)),z&&C.data&&C._context.showTips&&(a.notifier(s(C,"Double-click to zoom back out"),"long"),z=!1))}function q(e,t){var r=e/M.xaxis._m,n=t/M.yaxis._m,i=[(p={a:h.a-n,b:h.b+(r+n)/2,c:h.c-(r-n)/2}).a,p.b,p.c].sort(a.sorterAsc),s=i.indexOf(p.a),l=i.indexOf(p.b),u=i.indexOf(p.c);i[0]<0&&(i[1]+i[0]/2<0?(i[2]+=i[0]+i[1],i[0]=i[1]=0):(i[2]+=i[0]/2,i[1]+=i[0]/2,i[0]=0),p={a:i[s],b:i[l],c:i[u]},t=(h.a-p.a)*M.yaxis._m,e=(h.c-p.c-h.b+p.b)*M.xaxis._m);var f=o(M.x0+e,M.y0+t);M.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",f);var d=o(-e,-t);M.clipDefRelative.select("path").attr("transform",d),M.aaxis.range=[p.a,M.sum-p.b-p.c],M.baxis.range=[M.sum-p.a-p.c,p.b],M.caxis.range=[M.sum-p.a-p.b,p.c],M.drawAxes(!1),M._hasClipOnAxisFalse&&M.plotContainer.select(".scatterlayer").selectAll(".trace").call(c.hideOutsideRangePoints,M),C.emit("plotly_relayouting",R(p))}function H(){i.call("_guiRelayout",C,R(p))}this.dragOptions={element:S,gd:C,plotinfo:{id:M.id,domain:C._fullLayout[M.id].domain,xaxis:M.xaxis,yaxis:M.yaxis},subplot:M.id,prepFn:function(i,s,c){M.dragOptions.xaxes=[M.xaxis],M.dragOptions.yaxes=[M.yaxis],e=C._fullLayout._invScaleX,t=C._fullLayout._invScaleY;var d=M.dragOptions.dragmode=C._fullLayout.dragmode;y(d)?M.dragOptions.minDrag=1:M.dragOptions.minDrag=void 0,"zoom"===d?(M.dragOptions.moveFn=U,M.dragOptions.clickFn=F,M.dragOptions.doneFn=V,function(e,t,i){var s=S.getBoundingClientRect();r=t-s.left,u=i-s.top,C._fullLayout._calcInverseTransform(C);var c=C._fullLayout._invTransform,d=a.apply3DTransform(c)(r,u);r=d[0],u=d[1],h={a:M.aaxis.range[0],b:M.baxis.range[1],c:M.caxis.range[1]},p=h,f=M.aaxis.range[1]-h.a,g=n(M.graphDiv._fullLayout[M.id].bgcolor).getLuminance(),x="M0,"+M.h+"L"+M.w/2+", 0L"+M.w+","+M.h+"Z",b=!1,T=O.append("path").attr("class","zoombox").attr("transform",o(M.x0,M.y0)).style({fill:g>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",x),k=O.append("path").attr("class","zoombox-corners").attr("transform",o(M.x0,M.y0)).style({fill:l.background,stroke:l.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),M.clearOutline(C)}(0,s,c)):"pan"===d?(M.dragOptions.moveFn=q,M.dragOptions.clickFn=F,M.dragOptions.doneFn=H,h={a:M.aaxis.range[0],b:M.baxis.range[1],c:M.caxis.range[1]},p=h,M.clearOutline(C)):(v(d)||y(d))&&_(i,s,c,M.dragOptions,d)}},S.onmousemove=function(e){m.hover(C,e,M.id),C._fullLayout._lasthover=S,C._fullLayout._hoversubplot=M.id},S.onmouseout=function(e){C._dragging||d.unhover(C,e)},d.init(this.dragOptions)}}}),Hs=m({"src/plots/ternary/layout_attributes.js"(e,t){var r=G(),n=Ma().attributes,i=Lt(),a=De().overrideAll,o=B().extendFlat,s={title:{text:i.title.text,font:i.title.font},color:i.color,tickmode:i.minor.tickmode,nticks:o({},i.nticks,{dflt:6,min:1}),tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,ticklabelstep:i.ticklabelstep,showticklabels:i.showticklabels,labelalias:i.labelalias,showtickprefix:i.showtickprefix,tickprefix:i.tickprefix,showticksuffix:i.showticksuffix,ticksuffix:i.ticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,minexponent:i.minexponent,separatethousands:i.separatethousands,tickfont:i.tickfont,tickangle:i.tickangle,tickformat:i.tickformat,tickformatstops:i.tickformatstops,hoverformat:i.hoverformat,showline:o({},i.showline,{dflt:!0}),linecolor:i.linecolor,linewidth:i.linewidth,showgrid:o({},i.showgrid,{dflt:!0}),gridcolor:i.gridcolor,gridwidth:i.gridwidth,griddash:i.griddash,layer:i.layer,min:{valType:"number",dflt:0,min:0}},l=t.exports=a({domain:n({name:"ternary"}),bgcolor:{valType:"color",dflt:r.background},sum:{valType:"number",dflt:1,min:0},aaxis:s,baxis:s,caxis:s},"plot","from-root");l.uirevision={valType:"any",editType:"none"},l.aaxis.uirevision=l.baxis.uirevision=l.caxis.uirevision={valType:"any",editType:"none"}}}),Gs=m({"src/plots/subplot_defaults.js"(e,t){var r=ct(),n=vt(),i=Ma().defaults;t.exports=function(e,t,a,o){var s,l,c=o.type,u=o.attributes,h=o.handleDefaults,f=o.partition||"x",p=t._subplots[c],d=p.length,m=d&&p[0].replace(/\d+$/,"");function g(e,t){return r.coerce(s,l,u,e,t)}for(var y=0;y=s&&(p.min=0,m.min=0,g.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}function d(e,t,r,n){var a=h[t._name];function f(r,n){return i.coerce(e,t,a,r,n)}f("uirevision",n.uirevision),t.type="linear";var p=f("color"),d=p!==a.color.dflt?p:r.font.color,m=t._name.charAt(0).toUpperCase(),g="Component "+m,y=f("title.text",g);t._hovertitle=y===g?y:m,i.coerceFont(f,"title.font",r.font,{overrideDflt:{size:i.bigFont(r.font.size),color:d}}),f("min"),c(e,t,f,"linear"),s(e,t,f,"linear"),o(e,t,f,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),l(e,t,f,{outerTicks:!0}),f("showticklabels")&&(i.coerceFont(f,"tickfont",r.font,{overrideDflt:{color:d}}),f("tickangle"),f("tickformat")),u(e,t,f,{dfltColor:p,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:a}),f("hoverformat"),f("layer")}t.exports=function(e,t,r){a(e,t,r,{type:"ternary",attributes:h,handleDefaults:p,font:t.font,paper_bgcolor:t.paper_bgcolor})}}}),Zs=m({"src/plots/ternary/index.js"(e){var t=qs(),r=Tt().getSubplotCalcData,n=ct().counterRegex,i="ternary";e.name=i;var a=e.attr="subplot";e.idRoot=i,e.idRegex=e.attrRegex=n(i),(e.attributes={})[a]={valType:"subplotid",dflt:"ternary",editType:"calc"},e.layoutAttributes=Hs(),e.supplyLayoutDefaults=Ws(),e.plot=function(e){for(var n=e._fullLayout,a=e.calcdata,o=n._subplots[i],s=0;s0){var _,b,w,T,k,A=e.xa,M=e.ya;"h"===d.orientation?(k=t,_="y",w=M,b="x",T=A):(k=s,_="x",w=A,b="y",T=M);var S=p[e.index];if(k>=S.span[0]&&k<=S.span[1]){var E=n.extendFlat({},e),C=T.c2p(k,!0),I=o.getKdeValue(S,d,k),L=o.getPositionOnKdePath(S,d,C),P=w._offset,z=w._length;E[_+"0"]=L[0],E[_+"1"]=L[1],E[b+"0"]=E[b+"1"]=C,E[b+"Label"]=b+": "+i.hoverLabelText(T,k,d[b+"hoverformat"])+", "+p[0].t.labels.kde+" "+I.toFixed(3);for(var D=0,O=0;O path").each((function(e){if(!e.isBlank){var t=s.marker;r.select(this).call(i.fill,e.mc||t.color).call(i.stroke,e.mlc||t.line.color).call(n.dashLine,t.line.dash,e.mlw||t.line.width).style("opacity",s.selectedpoints&&!e.selected?a:1)}})),l(o,s,e),o.selectAll(".regions").each((function(){r.select(this).selectAll("path").style("stroke-width",0).call(i.fill,s.connector.fillcolor)})),o.selectAll(".lines").each((function(){var e=s.connector.line;n.lineGroupStyle(r.select(this).selectAll("path"),e.width,e.color,e.dash)}))}))}}}}),xl=m({"src/traces/funnel/hover.js"(e,t){var r=W().opacity,n=no().hoverOnBars,i=ct().formatPercent;t.exports=function(e,t,a,o,s){var l=n(e,t,a,o,s);if(l){var c=l.cd,u=c[0].trace,h="h"===u.orientation,f=c[l.index];l[(h?"x":"y")+"LabelVal"]=f.s,l.percentInitial=f.begR,l.percentInitialLabel=i(f.begR,1),l.percentPrevious=f.difR,l.percentPreviousLabel=i(f.difR,1),l.percentTotal=f.sumR,l.percentTotalLabel=i(f.sumR,1);var p=f.hi||u.hoverinfo,d=[];if(p&&"none"!==p&&"skip"!==p){var m="all"===p,g=p.split("+"),y=function(e){return m||-1!==g.indexOf(e)};y("percent initial")&&d.push(l.percentInitialLabel+" of initial"),y("percent previous")&&d.push(l.percentPreviousLabel+" of previous"),y("percent total")&&d.push(l.percentTotalLabel+" of total")}return l.extraText=d.join("
"),l.color=function(e,t){var n=e.marker,i=t.mc||n.color,a=t.mlc||n.line.color,o=t.mlw||n.line.width;return r(i)?i:r(a)&&o?a:void 0}(u,f),[l]}}}}),_l=m({"src/traces/funnel/event_data.js"(e,t){t.exports=function(e,t){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,"percentInitial"in t&&(e.percentInitial=t.percentInitial),"percentPrevious"in t&&(e.percentPrevious=t.percentPrevious),"percentTotal"in t&&(e.percentTotal=t.percentTotal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e}}}),bl=m({"src/traces/funnel/index.js"(e,t){t.exports={attributes:cl(),layoutAttributes:ul(),supplyDefaults:hl().supplyDefaults,crossTraceDefaults:hl().crossTraceDefaults,supplyLayoutDefaults:fl(),calc:dl(),crossTraceCalc:ml(),plot:yl(),style:vl().style,hoverPoints:xl(),eventData:_l(),selectPoints:ao(),moduleType:"trace",name:"funnel",basePlotModule:Ci(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),wl=m({"lib/funnel.js"(e,t){t.exports=bl()}}),Tl=m({"src/traces/waterfall/constants.js"(e,t){t.exports={eventDataKeys:["initial","delta","final"]}}}),kl=m({"src/traces/waterfall/attributes.js"(e,t){var r=Wa(),n=kn().line,i=q(),a=It().axisHoverFormat,{hovertemplateAttrs:o,texttemplateAttrs:s,templatefallbackAttrs:l}=Fe(),c=Tl(),u=B().extendFlat,h=W();function f(e){return{marker:{color:u({},r.marker.color,{arrayOk:!1,editType:"style"}),line:{color:u({},r.marker.line.color,{arrayOk:!1,editType:"style"}),width:u({},r.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}t.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:r.x,x0:r.x0,dx:r.dx,y:r.y,y0:r.y0,dy:r.dy,xperiod:r.xperiod,yperiod:r.yperiod,xperiod0:r.xperiod0,yperiod0:r.yperiod0,xperiodalignment:r.xperiodalignment,yperiodalignment:r.yperiodalignment,xhoverformat:a("x"),yhoverformat:a("y"),hovertext:r.hovertext,hovertemplate:o({},{keys:c.eventDataKeys}),hovertemplatefallback:l(),hoverinfo:u({},i.hoverinfo,{flags:["name","x","y","text","initial","delta","final"]}),textinfo:{valType:"flaglist",flags:["label","text","initial","delta","final"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:s({editType:"plot"},{keys:c.eventDataKeys.concat(["label"])}),texttemplatefallback:l({editType:"plot"}),text:r.text,textposition:r.textposition,insidetextanchor:r.insidetextanchor,textangle:r.textangle,textfont:r.textfont,insidetextfont:r.insidetextfont,outsidetextfont:r.outsidetextfont,constraintext:r.constraintext,cliponaxis:r.cliponaxis,orientation:r.orientation,offset:r.offset,width:r.width,increasing:f(),decreasing:f(),totals:f(),connector:{line:{color:u({},n.color,{dflt:h.defaultLine}),width:u({},n.width,{editType:"plot"}),dash:n.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:r.offsetgroup,alignmentgroup:r.alignmentgroup,zorder:r.zorder}}}),Al=m({"src/traces/waterfall/layout_attributes.js"(e,t){t.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc"},waterfallgap:{valType:"number",min:0,max:1,editType:"calc"},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}}}),Ml=m({"src/constants/delta.js"(e,t){t.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}}}),Sl=m({"src/traces/waterfall/defaults.js"(e,t){var r=ct(),n=ei(),i=Xa().handleText,a=Gn(),o=Wn(),s=kl(),l=W(),c=Ml(),u=c.INCREASING.COLOR,h=c.DECREASING.COLOR;function f(e,t,r){e(t+".marker.color",r),e(t+".marker.line.color",l.defaultLine),e(t+".marker.line.width")}t.exports={supplyDefaults:function(e,t,n,l){function c(n,i){return r.coerce(e,t,s,n,i)}if(a(e,t,l,c)){o(e,t,l,c),c("xhoverformat"),c("yhoverformat"),c("measure"),c("orientation",t.x&&!t.y?"h":"v"),c("base"),c("offset"),c("width"),c("text"),c("hovertext"),c("hovertemplate"),c("hovertemplatefallback");var p=c("textposition");i(e,t,l,c,p,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),"none"!==t.textposition&&(c("texttemplate"),c("texttemplatefallback"),t.texttemplate||c("textinfo")),f(c,"increasing",u),f(c,"decreasing",h),f(c,"totals","#4499FF"),c("connector.visible")&&(c("connector.mode"),c("connector.line.width")&&(c("connector.line.color"),c("connector.line.dash"))),c("zorder")}else t.visible=!1},crossTraceDefaults:function(e,t){var i,a;function o(e){return r.coerce(a._input,a,s,e)}if("group"===t.waterfallmode)for(var l=0;l0&&(g+=f?"M"+h[0]+","+d[1]+"V"+d[0]:"M"+h[1]+","+d[0]+"H"+h[0]),"between"!==p&&(o.isSum||s path").each((function(e){if(!e.isBlank){var t=s[e.dir].marker;r.select(this).call(i.fill,t.color).call(i.stroke,t.line.color).call(n.dashLine,t.line.dash,t.line.width).style("opacity",s.selectedpoints&&!e.selected?a:1)}})),l(o,s,e),o.selectAll(".lines").each((function(){var e=s.connector.line;n.lineGroupStyle(r.select(this).selectAll("path"),e.width,e.color,e.dash)}))}))}}}}),zl=m({"src/traces/waterfall/hover.js"(e,t){var r=ar().hoverLabelText,n=W().opacity,i=no().hoverOnBars,a=Ml(),o=a.INCREASING.SYMBOL,s=a.DECREASING.SYMBOL;t.exports=function(e,t,a,l,c){var u=i(e,t,a,l,c);if(u){var h=u.cd,f=h[0].trace,p="h"===f.orientation,d=p?"x":"y",m=p?e.xa:e.ya,g=h[u.index],y=g.isSum?g.b+g.s:g.rawS;u.initial=g.b+g.s-y,u.delta=y,u.final=u.initial+u.delta;var v=k(Math.abs(u.delta));u.deltaLabel=y<0?"("+v+")":v,u.finalLabel=k(u.final),u.initialLabel=k(u.initial);var x=g.hi||f.hoverinfo,_=[];if(x&&"none"!==x&&"skip"!==x){var b="all"===x,w=x.split("+"),T=function(e){return b||-1!==w.indexOf(e)};g.isSum||(T("final")&&(p?!T("x"):!T("y"))&&_.push(u.finalLabel),T("delta")&&(y<0?_.push(u.deltaLabel+" "+s):_.push(u.deltaLabel+" "+o)),T("initial")&&_.push("Initial: "+u.initialLabel))}return _.length&&(u.extraText=_.join("
")),u.color=function(e,t){var r=e[t.dir].marker,i=r.color,a=r.line.color,o=r.line.width;return n(i)?i:n(a)&&o?a:void 0}(f,g),[u]}function k(e){return r(m,e,f[d+"hoverformat"])}}}}),Dl=m({"src/traces/waterfall/event_data.js"(e,t){t.exports=function(e,t){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,"initial"in t&&(e.initial=t.initial),"delta"in t&&(e.delta=t.delta),"final"in t&&(e.final=t.final),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e}}}),Ol=m({"src/traces/waterfall/index.js"(e,t){t.exports={attributes:kl(),layoutAttributes:Al(),supplyDefaults:Sl().supplyDefaults,crossTraceDefaults:Sl().crossTraceDefaults,supplyLayoutDefaults:El(),calc:Cl(),crossTraceCalc:Il(),plot:Ll(),style:Pl().style,hoverPoints:zl(),eventData:Dl(),selectPoints:ao(),moduleType:"trace",name:"waterfall",basePlotModule:Ci(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),Rl=m({"lib/waterfall.js"(e,t){t.exports=Ol()}}),Fl=m({"src/traces/image/constants.js"(e,t){t.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(e){return e.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:["","","",""]},rgba256:{colormodel:"rgba",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(e){var t=e.slice(0,3);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["°","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(e){var t=e.slice(0,4);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["°","%","%",""]}}}}}),Bl=m({"src/traces/image/attributes.js"(e,t){var r,n,i=q(),a=kn().zorder,{hovertemplateAttrs:o,templatefallbackAttrs:s}=Fe(),l=B().extendFlat,c=Fl().colormodel,u=["rgb","rgba","rgba256","hsl","hsla"],h=[],f=[];for(n=0;n0?s-4:s;for(r=0;r>16&255,c[u++]=t>>8&255,c[u++]=255&t;return 2===l&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[u++]=255&t),1===l&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t),c},e.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a=[],o=16383,s=0,c=n-i;sc?c:s+o));return 1===i?(t=e[n-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),a.join("")};var t,r=[],n=[],i=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(t=0;t<64;++t)r[t]=a[t],n[a.charCodeAt(t)]=t;function o(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function s(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function l(e,t,r){for(var n,i=[],a=t;a>1,u=-7,h=r?i-1:0,f=r?-1:1,p=e[t+h];for(h+=f,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=256*a+e[t+h],h+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=n;u>0;o=256*o+e[t+h],h+=f,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=c}return(p?-1:1)*o*Math.pow(2,a-n)},e.write=function(e,t,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+h>=1?f/l:f*Math.pow(2,1-h))*l>=2&&(o++,l/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(t*l-1)*Math.pow(2,i),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;e[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<0;e[r+p]=255&o,p+=d,o/=256,c-=8);e[r+p-d]|=128*m}}}),Hl=m({"node_modules/buffer/index.js"(e){var t=Vl(),r=ql(),n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=o,e.SlowBuffer=function(e){return+e!=e&&(e=0),o.alloc(+e)},e.INSPECT_MAX_BYTES=50;var i=2147483647;function a(e){if(e>i)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,o.prototype),t}function o(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}return s(e,t,r)}function s(e,t,r){if("string"==typeof e)return function(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!o.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=0|p(e,t),n=a(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Z(e,Uint8Array)){let t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return u(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Z(e,ArrayBuffer)||e&&Z(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Z(e,SharedArrayBuffer)||e&&Z(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return o.from(n,t,r);let i=function(e){if(o.isBuffer(e)){let t=0|f(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||Y(e.length)?a(0):u(e):"Buffer"===e.type&&Array.isArray(e.data)?u(e.data):void 0}(e);if(i)return i;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return o.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return l(e),a(e<0?0:0|f(e))}function u(e){let t=e.length<0?0:0|f(e.length),r=a(t);for(let n=0;n=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|e}function p(e,t){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Z(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(e).length;default:if(i)return n?-1:H(e).length;t=(""+t).toLowerCase(),i=!0}}function d(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0)||(r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return E(this,t,r);case"utf8":case"utf-8":return k(this,t,r);case"ascii":return M(this,t,r);case"latin1":case"binary":return S(this,t,r);case"base64":return T(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=o.from(t,n)),o.isBuffer(t))return 0===t.length?-1:y(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):y(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,r,n,i){let a,o=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){let n=-1;for(a=r;as&&(r=s-l),a=r;a>=0;a--){let r=!0;for(let n=0;ni&&(n=i):n=i;let a,o=t.length;for(n>o/2&&(n=o/2),a=0;a>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function T(e,r,n){return 0===r&&n===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(r,n))}function k(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+o<=r){let r,n,s,l;switch(o){case 1:t<128&&(a=t);break;case 2:r=e[i+1],128==(192&r)&&(l=(31&t)<<6|63&r,l>127&&(a=l));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(l=(15&t)<<12|(63&r)<<6|63&n,l>2047&&(l<55296||l>57343)&&(a=l));break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(l=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,l>65535&&l<1114112&&(a=l))}}null===a?(a=65533,o=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=o}return function(e){let t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn.length?(o.isBuffer(t)||(t=o.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!o.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},o.byteLength=p,o.prototype._isBuffer=!0,o.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(t+=" ... "),""},n&&(o.prototype[n]=o.prototype.inspect),o.prototype.compare=function(e,t,r,n,i){if(Z(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let a=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),l=Math.min(a,s),c=this.slice(n,i),u=e.slice(t,r);for(let e=0;e>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}let i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let a=!1;for(;;)switch(n){case"hex":return v(this,e,t,r);case"utf8":case"utf-8":return x(this,e,t,r);case"ascii":case"latin1":case"binary":return _(this,e,t,r);case"base64":return b(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function M(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;in)&&(r=n);let i="";for(let n=t;nr)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,r,n,i,a){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function P(e,t,r,n,i){N(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,r}function z(e,t,r,n,i){N(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r+7]=a,a>>=8,e[r+6]=a,a>>=8,e[r+5]=a,a>>=8,e[r+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o>>=8,e[r+2]=o,o>>=8,e[r+1]=o,o>>=8,e[r]=o,r+8}function D(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function O(e,t,n,i,a){return t=+t,n>>>=0,a||D(e,0,n,4),r.write(e,t,n,i,23,4),n+4}function R(e,t,n,i,a){return t=+t,n>>>=0,a||D(e,0,n,8),r.write(e,t,n,i,52,8),n+8}o.prototype.slice=function(e,t){let r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||I(e,t,this.length);let n=this[e],i=1,a=0;for(;++a>>=0,t>>>=0,r||I(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},o.prototype.readUint8=o.prototype.readUInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),this[e]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readBigUInt64LE=$((function(e){U(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&V(e,this.length-8);let n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&V(e,this.length-8);let n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||I(e,t,this.length);let n=this[e],i=1,a=0;for(;++a=i&&(n-=Math.pow(2,8*t)),n},o.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=t,i=1,a=this[e+--n];for(;n>0&&(i*=256);)a+=this[e+--n]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},o.prototype.readInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){e>>>=0,t||I(e,2,this.length);let r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(e,t){e>>>=0,t||I(e,2,this.length);let r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readBigInt64LE=$((function(e){U(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&V(e,this.length-8);let n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&V(e,this.length-8);let n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<>>=0,t||I(e,4,this.length),r.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e>>>=0,t||I(e,4,this.length),r.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e>>>=0,t||I(e,8,this.length),r.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e>>>=0,t||I(e,8,this.length),r.read(this,e,!1,52,8)},o.prototype.writeUintLE=o.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||L(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,a=0;for(this[t]=255&e;++a>>=0,r>>>=0,n||L(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+r},o.prototype.writeUint8=o.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,1,255,0),this[t]=255&e,t+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeBigUInt64LE=$((function(e,t=0){return P(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),o.prototype.writeBigUInt64BE=$((function(e,t=0){return z(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),o.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){let n=Math.pow(2,8*r-1);L(this,e,t,r,n-1,-n)}let i=0,a=1,o=0;for(this[t]=255&e;++i>>=0,!n){let n=Math.pow(2,8*r-1);L(this,e,t,r,n-1,-n)}let i=r-1,a=1,o=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/a|0)-o&255;return t+r},o.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeBigInt64LE=$((function(e,t=0){return P(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),o.prototype.writeBigInt64BE=$((function(e,t=0){return z(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),o.prototype.writeFloatLE=function(e,t,r){return O(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){return O(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){return R(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){return R(this,e,t,!1,r)},o.prototype.copy=function(e,t,r,n){if(!o.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&0!==n&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function N(e,t,r,n,i,a){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${i} and < 2${i} ** ${8*(a+1)}${i}`:`>= -(2${i} ** ${8*(a+1)-1}${i}) and < 2 ** ${8*(a+1)-1}${i}`:`>= ${t}${i} and <= ${r}${i}`,new F.ERR_OUT_OF_RANGE("value",n,e)}!function(e,t,r){U(t,"offset"),(void 0===e[t]||void 0===e[t+r])&&V(t,e.length-(r+1))}(n,i,a)}function U(e,t){if("number"!=typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function V(e,t,r){throw Math.floor(e)!==e?(U(e,r),new F.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new F.ERR_BUFFER_OUT_OF_BOUNDS:new F.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}B("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),B("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),B("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=j(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=j(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);var q=/[^+/0-9A-Za-z-_]/g;function H(e,t){t=t||1/0;let r,n=e.length,i=null,a=[];for(let o=0;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function G(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(q,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function W(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function Z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}var X=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function $(e){return typeof BigInt>"u"?K:e}function K(){throw new Error("BigInt not supported")}}}),Gl=m({"node_modules/has-symbols/shams.js"(e,t){t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var a=Object.getOwnPropertyDescriptor(e,t);if(42!==a.value||!0!==a.enumerable)return!1}return!0}}}),Wl=m({"node_modules/has-tostringtag/shams.js"(e,t){var r=Gl();t.exports=function(){return r()&&!!Symbol.toStringTag}}}),Zl=m({"node_modules/es-object-atoms/index.js"(e,t){t.exports=Object}}),Yl=m({"node_modules/es-errors/index.js"(e,t){t.exports=Error}}),Xl=m({"node_modules/es-errors/eval.js"(e,t){t.exports=EvalError}}),$l=m({"node_modules/es-errors/range.js"(e,t){t.exports=RangeError}}),Kl=m({"node_modules/es-errors/ref.js"(e,t){t.exports=ReferenceError}}),Jl=m({"node_modules/es-errors/syntax.js"(e,t){t.exports=SyntaxError}}),Ql=m({"node_modules/es-errors/type.js"(e,t){t.exports=TypeError}}),ec=m({"node_modules/es-errors/uri.js"(e,t){t.exports=URIError}}),tc=m({"node_modules/math-intrinsics/abs.js"(e,t){t.exports=Math.abs}}),rc=m({"node_modules/math-intrinsics/floor.js"(e,t){t.exports=Math.floor}}),nc=m({"node_modules/math-intrinsics/max.js"(e,t){t.exports=Math.max}}),ic=m({"node_modules/math-intrinsics/min.js"(e,t){t.exports=Math.min}}),ac=m({"node_modules/math-intrinsics/pow.js"(e,t){t.exports=Math.pow}}),oc=m({"node_modules/math-intrinsics/round.js"(e,t){t.exports=Math.round}}),sc=m({"node_modules/math-intrinsics/isNaN.js"(e,t){t.exports=Number.isNaN||function(e){return e!=e}}}),lc=m({"node_modules/math-intrinsics/sign.js"(e,t){var r=sc();t.exports=function(e){return r(e)||0===e?e:e<0?-1:1}}}),cc=m({"node_modules/gopd/gOPD.js"(e,t){t.exports=Object.getOwnPropertyDescriptor}}),uc=m({"node_modules/gopd/index.js"(e,t){var r=cc();if(r)try{r([],"length")}catch{r=null}t.exports=r}}),hc=m({"node_modules/es-define-property/index.js"(e,t){var r=Object.defineProperty||!1;if(r)try{r({},"a",{value:1})}catch{r=!1}t.exports=r}}),fc=m({"node_modules/has-symbols/index.js"(e,t){var r=typeof Symbol<"u"&&Symbol,n=Gl();t.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&n()}}}),pc=m({"node_modules/get-proto/Reflect.getPrototypeOf.js"(e,t){t.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}}),dc=m({"node_modules/get-proto/Object.getPrototypeOf.js"(e,t){var r=Zl();t.exports=r.getPrototypeOf||null}}),mc=m({"node_modules/function-bind/implementation.js"(e,t){var r=Object.prototype.toString,n=Math.max,i=function(e,t){for(var r=[],n=0;n"u"||!A?r:A(Uint8Array),P={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":k&&A?A([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":I,"%AsyncGenerator%":I,"%AsyncGeneratorFunction%":I,"%AsyncIteratorPrototype%":I,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":typeof Float16Array>"u"?r:Float16Array,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":I,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":k&&A?A(A([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!k||!A?r:A((new Map)[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":n,"%Object.getOwnPropertyDescriptor%":_,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!k||!A?r:A((new Set)[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":k&&A?A(""[Symbol.iterator]()):r,"%Symbol%":k?Symbol:r,"%SyntaxError%":l,"%ThrowTypeError%":T,"%TypedArray%":L,"%TypeError%":c,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet,"%Function.prototype.call%":C,"%Function.prototype.apply%":E,"%Object.defineProperty%":b,"%Object.getPrototypeOf%":M,"%Math.abs%":h,"%Math.floor%":f,"%Math.max%":p,"%Math.min%":d,"%Math.pow%":m,"%Math.round%":g,"%Math.sign%":y,"%Reflect.getPrototypeOf%":S};if(A)try{null.error}catch(e){z=A(A(e)),P["%Error.prototype%"]=z}var z,D=function e(t){var r;if("%AsyncFunction%"===t)r=x("async function () {}");else if("%GeneratorFunction%"===t)r=x("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=x("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&A&&(r=A(i.prototype))}return P[t]=r,r},O={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},R=gc(),F=kc(),B=R.call(C,Array.prototype.concat),j=R.call(E,Array.prototype.splice),N=R.call(C,String.prototype.replace),U=R.call(C,String.prototype.slice),V=R.call(C,RegExp.prototype.exec),q=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,H=/\\(\\)?/g,G=function(e,t){var r,n=e;if(F(O,n)&&(n="%"+(r=O[n])[0]+"%"),F(P,n)){var i=P[n];if(i===I&&(i=D(n)),typeof i>"u"&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new l("intrinsic "+e+" does not exist!")};t.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===V(/^%?[^%]*%?$/,e))throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=U(e,0,1),r=U(e,-1);if("%"===t&&"%"!==r)throw new l("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new l("invalid intrinsic syntax, expected opening `%`");var n=[];return N(e,q,(function(e,t,r,i){n[n.length]=r?N(i,H,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",i=G("%"+n+"%",t),a=i.name,o=i.value,s=!1,u=i.alias;u&&(n=u[0],j(r,B([0,1],u)));for(var h=1,f=!0;h=r.length){var g=_(o,p);o=(f=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:o[p]}else f=F(o,p),o=o[p];f&&!s&&(P[a]=o)}}return o}}}),Mc=m({"node_modules/define-data-property/index.js"(e,t){var r=hc(),n=Jl(),i=Ql(),a=uc();t.exports=function(e,t,o){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],h=!!a&&a(e,t);if(r)r(e,t,{configurable:null===c&&h?h.configurable:!c,enumerable:null===s&&h?h.enumerable:!s,value:o,writable:null===l&&h?h.writable:!l});else{if(!u&&(s||l||c))throw new n("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=o}}}}),Sc=m({"node_modules/has-property-descriptors/index.js"(e,t){var r=hc(),n=function(){return!!r};n.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch{return!0}},t.exports=n}}),Ec=m({"node_modules/set-function-length/index.js"(e,t){var r=Ac(),n=Mc(),i=Sc()(),a=uc(),o=Ql(),s=r("%Math.floor%");t.exports=function(e,t){if("function"!=typeof e)throw new o("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||s(t)!==t)throw new o("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],l=!0,c=!0;if("length"in e&&a){var u=a(e,"length");u&&!u.configurable&&(l=!1),u&&!u.writable&&(c=!1)}return(l||c||!r)&&(i?n(e,"length",t,!0,!0):n(e,"length",t)),e}}}),Cc=m({"node_modules/call-bind/index.js"(e,t){var r=gc(),n=Ac(),i=Ec(),a=Ql(),o=n("%Function.prototype.apply%"),s=n("%Function.prototype.call%"),l=n("%Reflect.apply%",!0)||r.call(s,o),c=hc(),u=n("%Math.max%");t.exports=function(e){if("function"!=typeof e)throw new a("a function is required");var t=l(r,s,arguments);return i(t,1+u(0,e.length-(arguments.length-1)),!0)};var h=function(){return l(r,o,arguments)};c?c(t.exports,"apply",{value:h}):t.exports.apply=h}}),Ic=m({"node_modules/call-bind/callBound.js"(e,t){var r=Ac(),n=Cc(),i=n(r("String.prototype.indexOf"));t.exports=function(e,t){var a=r(e,!!t);return"function"==typeof a&&i(e,".prototype.")>-1?n(a):a}}}),Lc=m({"node_modules/is-arguments/index.js"(e,t){var r=Wl()(),n=Ic()("Object.prototype.toString"),i=function(e){return!(r&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===n(e)},a=function(e){return!!i(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==n(e)&&"[object Function]"===n(e.callee)},o=function(){return i(arguments)}();i.isLegacyArguments=a,t.exports=o?i:a}}),Pc=m({"node_modules/is-generator-function/index.js"(e,t){var r,n=Object.prototype.toString,i=Function.prototype.toString,a=/^\s*(?:function)?\*/,o=Wl()(),s=Object.getPrototypeOf;t.exports=function(e){if("function"!=typeof e)return!1;if(a.test(i.call(e)))return!0;if(!o)return"[object GeneratorFunction]"===n.call(e);if(!s)return!1;if(typeof r>"u"){var t=function(){if(!o)return!1;try{return Function("return function*() {}")()}catch{}}();r=!!t&&s(t)}return s(e)===r}}}),zc=m({"node_modules/is-callable/index.js"(e,t){var r,n,i=Function.prototype.toString,a="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof a&&"function"==typeof Object.defineProperty)try{r=Object.defineProperty({},"length",{get:function(){throw n}}),n={},a((function(){throw 42}),null,r)}catch(e){e!==n&&(a=null)}else a=null;var o,s=/^\s*class\b/,l=function(e){try{var t=i.call(e);return s.test(t)}catch{return!1}},c=function(e){try{return!l(e)&&(i.call(e),!0)}catch{return!1}},u=Object.prototype.toString,h="function"==typeof Symbol&&!!Symbol.toStringTag,f=!(0 in[,]),p=function(){return!1};"object"==typeof document&&(o=document.all,u.call(o)===u.call(document.all)&&(p=function(e){if((f||!e)&&(typeof e>"u"||"object"==typeof e))try{var t=u.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch{}return!1})),t.exports=a?function(e){if(p(e))return!0;if(!e||"function"!=typeof e&&"object"!=typeof e)return!1;try{a(e,null,r)}catch(e){if(e!==n)return!1}return!l(e)&&c(e)}:function(e){if(p(e))return!0;if(!e||"function"!=typeof e&&"object"!=typeof e)return!1;if(h)return c(e);if(l(e))return!1;var t=u.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&c(e)}}}),Dc=m({"node_modules/for-each/index.js"(e,t){var r=zc(),n=Object.prototype.toString,i=Object.prototype.hasOwnProperty;t.exports=function(e,t,a){if(!r(t))throw new TypeError("iterator must be a function");var o;arguments.length>=3&&(o=a),"[object Array]"===n.call(e)?function(e,t,r){for(var n=0,a=e.length;n"u"?window:globalThis;t.exports=function(){for(var e=[],t=0;t"u"?window:globalThis,u=n(),h=a("String.prototype.slice"),f=Object.getPrototypeOf,p=a("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r-1?t:"Object"===t&&function(e){var t=!1;return r(d,(function(r,n){if(!t)try{r(e),t=h(n,1)}catch{}})),t}(e)}return o?function(e){var t=!1;return r(d,(function(r,n){if(!t)try{"$"+r(e)===n&&(t=h(n,1))}catch{}})),t}(e):null}}}),Fc=m({"node_modules/is-typed-array/index.js"(e,t){var r=Dc(),n=Oc(),i=Ic(),a=i("Object.prototype.toString"),o=Wl()(),s=uc(),l=typeof globalThis>"u"?window:globalThis,c=n(),u=i("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r-1}return!!s&&function(e){var t=!1;return r(f,(function(r,n){if(!t)try{t=r.call(e)===n}catch{}})),t}(e)}}}),Bc=m({"node_modules/util/support/types.js"(e){var t=Lc(),r=Pc(),n=Rc(),i=Fc();function a(e){return e.call.bind(e)}var o,s,l=typeof BigInt<"u",c=typeof Symbol<"u",u=a(Object.prototype.toString),h=a(Number.prototype.valueOf),f=a(String.prototype.valueOf),p=a(Boolean.prototype.valueOf);function d(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch{return!1}}function m(e){return"[object Map]"===u(e)}function g(e){return"[object Set]"===u(e)}function y(e){return"[object WeakMap]"===u(e)}function v(e){return"[object WeakSet]"===u(e)}function x(e){return"[object ArrayBuffer]"===u(e)}function _(e){return!(typeof ArrayBuffer>"u")&&(x.working?x(e):e instanceof ArrayBuffer)}function b(e){return"[object DataView]"===u(e)}function w(e){return!(typeof DataView>"u")&&(b.working?b(e):e instanceof DataView)}l&&(o=a(BigInt.prototype.valueOf)),c&&(s=a(Symbol.prototype.valueOf)),e.isArgumentsObject=t,e.isGeneratorFunction=r,e.isTypedArray=i,e.isPromise=function(e){return typeof Promise<"u"&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},e.isArrayBufferView=function(e){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(e):i(e)||w(e)},e.isUint8Array=function(e){return"Uint8Array"===n(e)},e.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===n(e)},e.isUint16Array=function(e){return"Uint16Array"===n(e)},e.isUint32Array=function(e){return"Uint32Array"===n(e)},e.isInt8Array=function(e){return"Int8Array"===n(e)},e.isInt16Array=function(e){return"Int16Array"===n(e)},e.isInt32Array=function(e){return"Int32Array"===n(e)},e.isFloat32Array=function(e){return"Float32Array"===n(e)},e.isFloat64Array=function(e){return"Float64Array"===n(e)},e.isBigInt64Array=function(e){return"BigInt64Array"===n(e)},e.isBigUint64Array=function(e){return"BigUint64Array"===n(e)},m.working=typeof Map<"u"&&m(new Map),e.isMap=function(e){return!(typeof Map>"u")&&(m.working?m(e):e instanceof Map)},g.working=typeof Set<"u"&&g(new Set),e.isSet=function(e){return!(typeof Set>"u")&&(g.working?g(e):e instanceof Set)},y.working=typeof WeakMap<"u"&&y(new WeakMap),e.isWeakMap=function(e){return!(typeof WeakMap>"u")&&(y.working?y(e):e instanceof WeakMap)},v.working=typeof WeakSet<"u"&&v(new WeakSet),e.isWeakSet=function(e){return v(e)},x.working=typeof ArrayBuffer<"u"&&x(new ArrayBuffer),e.isArrayBuffer=_,b.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&b(new DataView(new ArrayBuffer(1),0,1)),e.isDataView=w;var T=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function k(e){return"[object SharedArrayBuffer]"===u(e)}function A(e){return!(typeof T>"u")&&(typeof k.working>"u"&&(k.working=k(new T)),k.working?k(e):e instanceof T)}function M(e){return d(e,h)}function S(e){return d(e,f)}function E(e){return d(e,p)}function C(e){return l&&d(e,o)}function I(e){return c&&d(e,s)}e.isSharedArrayBuffer=A,e.isAsyncFunction=function(e){return"[object AsyncFunction]"===u(e)},e.isMapIterator=function(e){return"[object Map Iterator]"===u(e)},e.isSetIterator=function(e){return"[object Set Iterator]"===u(e)},e.isGeneratorObject=function(e){return"[object Generator]"===u(e)},e.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===u(e)},e.isNumberObject=M,e.isStringObject=S,e.isBooleanObject=E,e.isBigIntObject=C,e.isSymbolObject=I,e.isBoxedPrimitive=function(e){return M(e)||S(e)||E(e)||C(e)||I(e)},e.isAnyArrayBuffer=function(e){return typeof Uint8Array<"u"&&(_(e)||A(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})}))}}),jc=m({"node_modules/util/support/isBufferBrowser.js"(e,t){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}}}),Nc=m({"(disabled):node_modules/util/util.js"(e){var t=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n=a)return e;switch(e){case"%s":return String(i[n++]);case"%d":return Number(i[n++]);case"%j":try{return JSON.stringify(i[n++])}catch{return"[Circular]"}default:return e}})),l=i[n];n"u")return function(){return e.deprecate(t,r).apply(this,arguments)};var n=!1;return function(){if(!n){if(c.throwDeprecation)throw new Error(r);c.traceDeprecation?console.trace(r):console.error(r),n=!0}return t.apply(this,arguments)}};var n,i={},a=/^$/;function o(t,r){var n={seen:[],stylize:l};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(r)?n.showHidden=r:r&&e._extend(n,r),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=s),u(n,t,n.depth)}function s(e,t){var r=o.styles[t];return r?"["+o.colors[r][0]+"m"+e+"["+o.colors[r][1]+"m":e}function l(e,t){return e}function u(t,r,n){if(t.customInspect&&r&&T(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return y(i)||(i=u(t,i,n)),i}var a=function(e,t){if(v(t))return e.stylize("undefined","undefined");if(y(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return g(t)?e.stylize(""+t,"number"):d(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(t,r);if(a)return a;var o=Object.keys(r),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(r)),w(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return h(r);if(0===o.length){if(T(r)){var l=r.name?": "+r.name:"";return t.stylize("[Function"+l+"]","special")}if(x(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(b(r))return t.stylize(Date.prototype.toString.call(r),"date");if(w(r))return h(r)}var c,_="",k=!1,A=["{","}"];return p(r)&&(k=!0,A=["[","]"]),T(r)&&(_=" [Function"+(r.name?": "+r.name:"")+"]"),x(r)&&(_=" "+RegExp.prototype.toString.call(r)),b(r)&&(_=" "+Date.prototype.toUTCString.call(r)),w(r)&&(_=" "+h(r)),0!==o.length||k&&0!=r.length?n<0?x(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),c=k?function(e,t,r,n,i){for(var a=[],o=0,s=t.length;o60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(c,_,A)):A[0]+_+A[1]}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,r,n,i,a){var o,s,l;if((l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),S(n,i)||(o="["+i+"]"),s||(e.seen.indexOf(l.value)<0?(s=m(r)?u(e,l.value,null):u(e,l.value,r-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),v(o)){if(a&&i.match(/^\d+$/))return s;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function p(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function y(e){return"string"==typeof e}function v(e){return void 0===e}function x(e){return _(e)&&"[object RegExp]"===k(e)}function _(e){return"object"==typeof e&&null!==e}function b(e){return _(e)&&"[object Date]"===k(e)}function w(e){return _(e)&&("[object Error]"===k(e)||e instanceof Error)}function T(e){return"function"==typeof e}function k(e){return Object.prototype.toString.call(e)}function A(e){return e<10?"0"+e.toString(10):e.toString(10)}n=(n="false").replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),a=new RegExp("^"+n+"$","i"),e.debuglog=function(t){if(t=t.toUpperCase(),!i[t])if(a.test(t)){var r=c.pid;i[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else i[t]=function(){};return i[t]},e.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=Bc(),e.isArray=p,e.isBoolean=d,e.isNull=m,e.isNullOrUndefined=function(e){return null==e},e.isNumber=g,e.isString=y,e.isSymbol=function(e){return"symbol"==typeof e},e.isUndefined=v,e.isRegExp=x,e.types.isRegExp=x,e.isObject=_,e.isDate=b,e.types.isDate=b,e.isError=w,e.types.isNativeError=w,e.isFunction=T,e.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||typeof e>"u"},e.isBuffer=jc();var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.log=function(){var t,r;console.log("%s - %s",(r=[A((t=new Date).getHours()),A(t.getMinutes()),A(t.getSeconds())].join(":"),[t.getDate(),M[t.getMonth()],r].join(" ")),e.format.apply(e,arguments))},e.inherits=Nl(),e._extend=function(e,t){if(!t||!_(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var E=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function C(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}e.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(E&&e[E]){var r;if("function"!=typeof(r=e[E]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,E,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),i=[],a=0;a0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t=a.allocUnsafe(e>>>0),r=this.head,n=0;r;)l(r.data,t,n),n+=r.data.length,r=r.next;return t}},{key:"consume",value:function(e,t){var r;return ei.length?i.length:e;if(a===i.length?n+=i:n+=i.slice(0,e),0==(e-=a)){a===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(a));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:s,value:function(e,t){return o(this,function(e){for(var t=1;t2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}n("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(e,t,r){var n,a;if("string"==typeof t&&function(e,t){return e.substr(0,4)===t}(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-9,r)===t}(e," argument"))a="The ".concat(e," ").concat(n," ").concat(i(t,"type"));else{var o=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+1>e.length)&&-1!==e.indexOf(".",r)}(e)?"property":"argument";a='The "'.concat(e,'" ').concat(o," ").concat(n," ").concat(i(t,"type"))}return a+". Received type ".concat(typeof r)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=r}}),Hc=m({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/state.js"(e,t){var r=qc().codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,n,i){var a=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,n);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new r(i?n:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}}}}),Gc=m({"node_modules/util-deprecate/browser.js"(e,t){function r(e){try{if(!window.localStorage)return!1}catch{return!1}var t=window.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}t.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}}),Wc=m({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_writable.js"(e,t){function r(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t){var r=e.entry;for(e.entry=null;r;){var n=r.callback;t.pendingcb--,n(undefined),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}var n;t.exports=k,k.WritableState=T;var i,a={deprecate:Gc()},o=Ul(),s=Hl().Buffer,l=window.Uint8Array||function(){},u=Vc(),h=Hc().getHighWaterMark,f=qc().codes,p=f.ERR_INVALID_ARG_TYPE,d=f.ERR_METHOD_NOT_IMPLEMENTED,m=f.ERR_MULTIPLE_CALLBACK,g=f.ERR_STREAM_CANNOT_PIPE,y=f.ERR_STREAM_DESTROYED,v=f.ERR_STREAM_NULL_VALUES,x=f.ERR_STREAM_WRITE_AFTER_END,_=f.ERR_UNKNOWN_ENCODING,b=u.errorOrDestroy;function w(){}function T(e,t,i){n=n||Zc(),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=h(this,e,"writableHighWaterMark",i),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new m;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(c.nextTick(i,n),c.nextTick(I,e,t),e._writableState.errorEmitted=!0,b(e,n)):(i(n),e._writableState.errorEmitted=!0,b(e,n),I(e,t))}(e,r,n,t,i);else{var a=E(r)||e.destroyed;!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&S(e,r),n?c.nextTick(M,e,r,a,i):M(e,r,a,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}function k(e){var t=this instanceof(n=n||Zc());if(!t&&!i.call(k,this))return new k(e);this._writableState=new T(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),o.call(this)}function A(e,t,r,n,i,a,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new y("write")):r?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function M(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),I(e,t)}function S(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var i=t.bufferedRequestCount,a=new Array(i),o=t.corkedRequestsFree;o.entry=n;for(var s=0,l=!0;n;)a[s]=n,n.isBuf||(l=!1),n=n.next,s+=1;a.allBuffers=l,A(e,t,!0,t.length,a,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new r(t),t.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,u=n.encoding,h=n.callback;if(A(e,t,!1,t.objectMode?1:c.length,c,u,h),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function E(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function C(e,t){e._final((function(r){t.pendingcb--,r&&b(e,r),t.prefinished=!0,e.emit("prefinish"),I(e,t)}))}function I(e,t){var r=E(t);if(r&&(function(e,t){!t.prefinished&&!t.finalCalled&&("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,c.nextTick(C,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}Nl()(k,o),T.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(T.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(i=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:function(e){return!!i.call(this,e)||this===k&&e&&e._writableState instanceof T}})):i=function(e){return e instanceof this},k.prototype.pipe=function(){b(this,new g)},k.prototype.write=function(e,t,r){var n=this._writableState,i=!1,a=!n.objectMode&&function(e){return s.isBuffer(e)||e instanceof l}(e);return a&&!s.isBuffer(e)&&(e=function(e){return s.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=n.defaultEncoding),"function"!=typeof r&&(r=w),n.ending?function(e,t){var r=new x;b(e,r),c.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var i;return null===r?i=new v:"string"!=typeof r&&!t.objectMode&&(i=new p("chunk",["string","Buffer"],r)),!i||(b(e,i),c.nextTick(n,i),!1)}(this,n,e,r))&&(n.pendingcb++,i=function(e,t,r,n,i,a){if(!r){var o=function(e,t,r){return!e.objectMode&&!1!==e.decodeStrings&&"string"==typeof t&&(t=s.from(t,r)),t}(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var l=t.objectMode?1:n.length;t.length+=l;var c=t.length-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(e,t,r){r(new d("_write()"))},k.prototype._writev=null,k.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,I(e,t),r&&(t.finished?c.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),k.prototype.destroy=u.destroy,k.prototype._undestroy=u.undestroy,k.prototype._destroy=function(e,t){t(e)}}}),Zc=m({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_duplex.js"(e,t){var r=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=l;var n,i,a,o=Qc(),s=Wc();for(Nl()(l,o),n=r(s.prototype),a=0;a>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function o(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function s(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function u(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}e.StringDecoder=n,n.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(a>0&&(e.lastNeed=a-1),a):--n=0?(a>0&&(e.lastNeed=a-2),a):--n=0?(a>0&&(2===a?a=0:e.lastNeed=a-3),a):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},n.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}}}),$c=m({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(e,t){var r=qc().codes.ERR_STREAM_PREMATURE_CLOSE;function n(){}t.exports=function e(t,i,a){if("function"==typeof i)return e(t,null,i);i||(i={}),a=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i0)if("string"!=typeof t&&!c.objectMode&&Object.getPrototypeOf(t)!==o.prototype&&(t=function(e){return o.from(e)}(t)),i)c.endEmitted?b(e,new _):M(e,c,t,!0);else if(c.ended)b(e,new v);else{if(c.destroyed)return!1;c.reading=!1,c.decoder&&!r?(t=c.decoder.write(t),c.objectMode||0!==t.length?M(e,c,t,!1):L(e,c)):M(e,c,t,!1)}else i||(c.reading=!1,L(e,c));return!c.ended&&(c.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=S?e=S:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function C(e){var t=e._readableState;n("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(n("emitReadable",t.flowing),t.emittedReadable=!0,c.nextTick(I,e))}function I(e){var t=e._readableState;n("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,R(e)}function L(e,t){t.readingMore||(t.readingMore=!0,c.nextTick(P,e,t))}function P(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function D(e){n("readable nexttick read 0"),e.read(0)}function O(e,t){n("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),R(e),t.flowing&&!t.reading&&e.read(0)}function R(e){var t=e._readableState;for(n("flow",t.flowing);t.flowing&&null!==e.read(););}function F(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function B(e){var t=e._readableState;n("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,c.nextTick(j,t,e))}function j(e,t){if(n("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function N(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return n("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?B(this):C(this),null;if(0===(e=E(e,t))&&t.ended)return 0===t.length&&B(this),null;var i,a=t.needReadable;return n("need readable",a),(0===t.length||t.length-e0?F(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&B(this)),null!==i&&this.emit("data",i),i},k.prototype._read=function(e){b(this,new x("_read()"))},k.prototype.pipe=function(e,t){var r=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,n("pipe count=%d opts=%j",a.pipesCount,t);var o=t&&!1===t.end||e===c.stdout||e===c.stderr?m:s;function s(){n("onend"),e.end()}a.endEmitted?c.nextTick(o):r.once("end",o),e.on("unpipe",(function t(i,o){n("onunpipe"),i===r&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,n("cleanup"),e.removeListener("close",p),e.removeListener("finish",d),e.removeListener("drain",l),e.removeListener("error",f),e.removeListener("unpipe",t),r.removeListener("end",s),r.removeListener("end",m),r.removeListener("data",h),u=!0,a.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&l())}));var l=function(e){return function(){var t=e._readableState;n("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&i(e,"data")&&(t.flowing=!0,R(e))}}(r);e.on("drain",l);var u=!1;function h(t){n("ondata");var i=e.write(t);n("dest.write",i),!1===i&&((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==N(a.pipes,e))&&!u&&(n("false write response, pause",a.awaitDrain),a.awaitDrain++),r.pause())}function f(t){n("onerror",t),m(),e.removeListener("error",f),0===i(e,"error")&&b(e,t)}function p(){e.removeListener("finish",d),m()}function d(){n("onfinish"),e.removeListener("close",p),m()}function m(){n("unpipe"),r.unpipe(e)}return r.on("data",h),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",f),e.once("close",p),e.once("finish",d),e.emit("pipe",r),a.flowing||(n("pipe resume"),r.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a0,!1!==i.flowing&&this.resume()):"readable"===e&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,n("on readable",i.length,i.reading),i.length?C(this):i.reading||c.nextTick(D,this)),r},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(e,t){var r=a.prototype.removeListener.call(this,e,t);return"readable"===e&&c.nextTick(z,this),r},k.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return("readable"===e||void 0===e)&&c.nextTick(z,this),t},k.prototype.resume=function(){var e=this._readableState;return e.flowing||(n("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,c.nextTick(O,e,t))}(this,e)),e.paused=!1,this},k.prototype.pause=function(){return n("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(n("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;for(var a in e.on("end",(function(){if(n("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(a){n("wrapped data"),r.decoder&&(a=r.decoder.write(a)),r.objectMode&&null==a||!(r.objectMode||a&&a.length)||t.push(a)||(i=!0,e.pause())})),e)void 0===this[a]&&"function"==typeof e[a]&&(this[a]=function(t){return function(){return e[t].apply(e,arguments)}}(a));for(var o=0;o0,(function(e){u||(u=e),e&&h.forEach(s),!i&&(h.forEach(s),c(u))}))}));return t.reduce(l)}}}),nu=m({"node_modules/stream-browserify/index.js"(e,t){t.exports=n;var r=pt().EventEmitter;function n(){r.call(this)}Nl()(n,r),n.Readable=Qc(),n.Writable=Wc(),n.Duplex=Zc(),n.Transform=eu(),n.PassThrough=tu(),n.finished=$c(),n.pipeline=ru(),n.Stream=n,n.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function a(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",a),!e._isStdio&&(!t||!1!==t.end)&&(n.on("end",s),n.on("close",l));var o=!1;function s(){o||(o=!0,e.end())}function l(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(u(),0===r.listenerCount(this,"error"))throw e}function u(){n.removeListener("data",i),e.removeListener("drain",a),n.removeListener("end",s),n.removeListener("close",l),n.removeListener("error",c),e.removeListener("error",c),n.removeListener("end",u),n.removeListener("close",u),e.removeListener("close",u)}return n.on("error",c),e.on("error",c),n.on("end",u),n.on("close",u),e.on("close",u),e.emit("pipe",n),e}}}),iu=m({"node_modules/util/util.js"(e){var t=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n=a)return e;switch(e){case"%s":return String(i[n++]);case"%d":return Number(i[n++]);case"%j":try{return JSON.stringify(i[n++])}catch{return"[Circular]"}default:return e}})),l=i[n];n"u")return function(){return e.deprecate(t,r).apply(this,arguments)};var n=!1;return function(){if(!n){if(c.throwDeprecation)throw new Error(r);c.traceDeprecation?console.trace(r):console.error(r),n=!0}return t.apply(this,arguments)}};var n,i={},a=/^$/;function o(t,r){var n={seen:[],stylize:l};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(r)?n.showHidden=r:r&&e._extend(n,r),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=s),u(n,t,n.depth)}function s(e,t){var r=o.styles[t];return r?"["+o.colors[r][0]+"m"+e+"["+o.colors[r][1]+"m":e}function l(e,t){return e}function u(t,r,n){if(t.customInspect&&r&&T(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return y(i)||(i=u(t,i,n)),i}var a=function(e,t){if(v(t))return e.stylize("undefined","undefined");if(y(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return g(t)?e.stylize(""+t,"number"):d(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(t,r);if(a)return a;var o=Object.keys(r),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(r)),w(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return h(r);if(0===o.length){if(T(r)){var l=r.name?": "+r.name:"";return t.stylize("[Function"+l+"]","special")}if(x(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(b(r))return t.stylize(Date.prototype.toString.call(r),"date");if(w(r))return h(r)}var c,_="",k=!1,A=["{","}"];return p(r)&&(k=!0,A=["[","]"]),T(r)&&(_=" [Function"+(r.name?": "+r.name:"")+"]"),x(r)&&(_=" "+RegExp.prototype.toString.call(r)),b(r)&&(_=" "+Date.prototype.toUTCString.call(r)),w(r)&&(_=" "+h(r)),0!==o.length||k&&0!=r.length?n<0?x(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),c=k?function(e,t,r,n,i){for(var a=[],o=0,s=t.length;o60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(c,_,A)):A[0]+_+A[1]}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,r,n,i,a){var o,s,l;if((l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),S(n,i)||(o="["+i+"]"),s||(e.seen.indexOf(l.value)<0?(s=m(r)?u(e,l.value,null):u(e,l.value,r-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),v(o)){if(a&&i.match(/^\d+$/))return s;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function p(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function y(e){return"string"==typeof e}function v(e){return void 0===e}function x(e){return _(e)&&"[object RegExp]"===k(e)}function _(e){return"object"==typeof e&&null!==e}function b(e){return _(e)&&"[object Date]"===k(e)}function w(e){return _(e)&&("[object Error]"===k(e)||e instanceof Error)}function T(e){return"function"==typeof e}function k(e){return Object.prototype.toString.call(e)}function A(e){return e<10?"0"+e.toString(10):e.toString(10)}n=(n="false").replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),a=new RegExp("^"+n+"$","i"),e.debuglog=function(t){if(t=t.toUpperCase(),!i[t])if(a.test(t)){var r=c.pid;i[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else i[t]=function(){};return i[t]},e.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=Bc(),e.isArray=p,e.isBoolean=d,e.isNull=m,e.isNullOrUndefined=function(e){return null==e},e.isNumber=g,e.isString=y,e.isSymbol=function(e){return"symbol"==typeof e},e.isUndefined=v,e.isRegExp=x,e.types.isRegExp=x,e.isObject=_,e.isDate=b,e.types.isDate=b,e.isError=w,e.types.isNativeError=w,e.isFunction=T,e.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||typeof e>"u"},e.isBuffer=jc();var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.log=function(){var t,r;console.log("%s - %s",(r=[A((t=new Date).getHours()),A(t.getMinutes()),A(t.getSeconds())].join(":"),[t.getDate(),M[t.getMonth()],r].join(" ")),e.format.apply(e,arguments))},e.inherits=Nl(),e._extend=function(e,t){if(!t||!_(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var E=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function C(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}e.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(E&&e[E]){var r;if("function"!=typeof(r=e[E]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,E,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),i=[],a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,a=i(e);if(t){var o=i(this).constructor;n=Reflect.construct(a,arguments,o)}else n=a.apply(this,arguments);return function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}(s);function s(r,n,i){var a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),a=o.call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,n,i)),a.code=e,a}return function(e){return Object.defineProperty(e,"prototype",{writable:!1}),e}(s)}(a);s[e]=o}function c(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}l("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),l("ERR_INVALID_ARG_TYPE",(function(e,t,n){var i,o;if(void 0===a&&(a=wu()),a("string"==typeof e,"'name' must be a string"),"string"==typeof t&&function(e,t){return e.substr(0,4)===t}(t,"not ")?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-9,r)===t}(e," argument"))o="The ".concat(e," ").concat(i," ").concat(c(t,"type"));else{var s=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+1>e.length)&&-1!==e.indexOf(".",r)}(e)?"property":"argument";o='The "'.concat(e,'" ').concat(s," ").concat(i," ").concat(c(t,"type"))}return o+". Received type ".concat(r(n))}),TypeError),l("ERR_INVALID_ARG_VALUE",(function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===o&&(o=iu());var n=o.inspect(t);return n.length>128&&(n="".concat(n.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(n)}),TypeError,RangeError),l("ERR_INVALID_RETURN_VALUE",(function(e,t,n){var i;return i=n&&n.constructor&&n.constructor.name?"instance of ".concat(n.constructor.name):"type ".concat(r(n)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(i,".")}),TypeError),l("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),r=0;r0,"At least one arg needs to be specified");var n="The ",i=t.length;switch(t=t.map((function(e){return'"'.concat(e,'"')})),i){case 1:n+="".concat(t[0]," argument");break;case 2:n+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:n+=t.slice(0,i-1).join(", "),n+=", and ".concat(t[i-1]," arguments")}return"".concat(n," must be specified")}),TypeError),t.exports.codes=s}}),ou=m({"node_modules/assert/build/internal/assert/assertion_error.js"(e,t){function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function n(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}function p(e,t){return(p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var g=iu().inspect,y=au().codes.ERR_INVALID_ARG_TYPE;function v(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}var x="",_="",b="",w="",T={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function k(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach((function(t){r[t]=e[t]})),Object.defineProperty(r,"message",{value:e.message}),r}function A(e){return g(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var M=function(e,t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(i,e);var r=function(e){var t=f();return function(){var r,n=d(e);if(t){var i=d(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return s(this,r)}}(i);function i(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),"object"!==m(e)||null===e)throw new y("options","Object",e);var n=e.message,a=e.operator,o=e.stackStartFn,u=e.actual,h=e.expected,f=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=n)t=r.call(this,String(n));else if(c.stderr&&c.stderr.isTTY&&(c.stderr&&c.stderr.getColorDepth&&1!==c.stderr.getColorDepth()?(x="",_="",w="",b=""):(x="",_="",w="",b="")),"object"===m(u)&&null!==u&&"object"===m(h)&&null!==h&&"stack"in u&&u instanceof Error&&"stack"in h&&h instanceof Error&&(u=k(u),h=k(h)),"deepStrictEqual"===a||"strictEqual"===a)t=r.call(this,function(e,t,r){var n="",i="",a=0,o="",s=!1,l=A(e),u=l.split("\n"),h=A(t).split("\n"),f=0,p="";if("strictEqual"===r&&"object"===m(e)&&"object"===m(t)&&null!==e&&null!==t&&(r="strictEqualObject"),1===u.length&&1===h.length&&u[0]!==h[0]){var d=u[0].length+h[0].length;if(d<=10){if(!("object"===m(e)&&null!==e||"object"===m(t)&&null!==t||0===e&&0===t))return"".concat(T[r],"\n\n")+"".concat(u[0]," !== ").concat(h[0],"\n")}else if("strictEqualObject"!==r&&d<(c.stderr&&c.stderr.isTTY?c.stderr.columns:80)){for(;u[0][f]===h[0][f];)f++;f>2&&(p="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,r-e.length)}(" ",f),"^"),f=0)}}for(var g=u[u.length-1],y=h[h.length-1];g===y&&(f++<2?o="\n ".concat(g).concat(o):n=g,u.pop(),h.pop(),0!==u.length&&0!==h.length);)g=u[u.length-1],y=h[h.length-1];var k=Math.max(u.length,h.length);if(0===k){var M=l.split("\n");if(M.length>30)for(M[26]="".concat(x,"...").concat(w);M.length>27;)M.pop();return"".concat(T.notIdentical,"\n\n").concat(M.join("\n"),"\n")}f>3&&(o="\n".concat(x,"...").concat(w).concat(o),s=!0),""!==n&&(o="\n ".concat(n).concat(o),n="");var S=0,E=T[r]+"\n".concat(_,"+ actual").concat(w," ").concat(b,"- expected").concat(w),C=" ".concat(x,"...").concat(w," Lines skipped");for(f=0;f1&&f>2&&(I>4?(i+="\n".concat(x,"...").concat(w),s=!0):I>3&&(i+="\n ".concat(h[f-2]),S++),i+="\n ".concat(h[f-1]),S++),a=f,n+="\n".concat(b,"-").concat(w," ").concat(h[f]),S++;else if(h.length1&&f>2&&(I>4?(i+="\n".concat(x,"...").concat(w),s=!0):I>3&&(i+="\n ".concat(u[f-2]),S++),i+="\n ".concat(u[f-1]),S++),a=f,i+="\n".concat(_,"+").concat(w," ").concat(u[f]),S++;else{var L=h[f],P=u[f],z=P!==L&&(!v(P,",")||P.slice(0,-1)!==L);z&&v(L,",")&&L.slice(0,-1)===P&&(z=!1,P+=","),z?(I>1&&f>2&&(I>4?(i+="\n".concat(x,"...").concat(w),s=!0):I>3&&(i+="\n ".concat(u[f-2]),S++),i+="\n ".concat(u[f-1]),S++),a=f,i+="\n".concat(_,"+").concat(w," ").concat(P),n+="\n".concat(b,"-").concat(w," ").concat(L),S+=2):(i+=n,n="",(1===I||0===f)&&(i+="\n ".concat(P),S++))}if(S>20&&f30)for(d[26]="".concat(x,"...").concat(w);d.length>27;)d.pop();t=1===d.length?r.call(this,"".concat(p," ").concat(d[0])):r.call(this,"".concat(p,"\n\n").concat(d.join("\n"),"\n"))}else{var g=A(u),M="",S=T[a];"notDeepEqual"===a||"notEqual"===a?(g="".concat(T[a],"\n\n").concat(g)).length>1024&&(g="".concat(g.slice(0,1021),"...")):(M="".concat(A(h)),g.length>512&&(g="".concat(g.slice(0,509),"...")),M.length>512&&(M="".concat(M.slice(0,509),"...")),"deepEqual"===a||"equal"===a?g="".concat(S,"\n\n").concat(g,"\n\nshould equal\n\n"):M=" ".concat(a," ").concat(M)),t=r.call(this,"".concat(g).concat(M))}return Error.stackTraceLimit=f,t.generatedMessage=!n,Object.defineProperty(l(t),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),t.code="ERR_ASSERTION",t.actual=u,t.expected=h,t.operator=a,Error.captureStackTrace&&Error.captureStackTrace(l(t),o),t.stack,t.name="AssertionError",s(t)}return function(e,t){t&&a(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1})}(i,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(e,t){return g(this,n(n({},t),{},{customInspect:!1,depth:0}))}}]),i}(u(Error),g.custom);t.exports=M}}),su=m({"node_modules/object-keys/isArguments.js"(e,t){var r=Object.prototype.toString;t.exports=function(e){var t=r.call(e),n="[object Arguments]"===t;return n||(n="[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===r.call(e.callee)),n}}}),lu=m({"node_modules/object-keys/implementation.js"(e,t){var r,n,i,a,o,s,l,c,u,h,f,p;Object.keys||(n=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=su(),o=Object.prototype.propertyIsEnumerable,s=!o.call({toString:null},"toString"),l=o.call((function(){}),"prototype"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(e){var t=e.constructor;return t&&t.prototype===e},h={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if(typeof window>"u")return!1;for(var e in window)try{if(!h["$"+e]&&n.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{u(window[e])}catch{return!0}}catch{return!0}return!1}(),p=function(e){if(typeof window>"u"||!f)return u(e);try{return u(e)}catch{return!1}},r=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===i.call(e),o=a(e),u=t&&"[object String]"===i.call(e),h=[];if(!t&&!r&&!o)throw new TypeError("Object.keys called on a non-object");var f=l&&r;if(u&&e.length>0&&!n.call(e,0))for(var d=0;d0)for(var m=0;m2?arguments[2]:{},o=r(t);n&&(o=a.call(o,Object.getOwnPropertySymbols(t)));for(var s=0;se.length)&&(t=e.length);for(var r=0,n=new Array(t);r10)return!0;for(var t=0;t57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function P(e){return Object.keys(e).filter(L).concat(c(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function z(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);i1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i0)return function(e){if(!((e=String(e)).length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var o=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"days":case"day":case"d":return o*a;case"hours":case"hour":case"hrs":case"hr":case"h":return o*i;case"minutes":case"minute":case"mins":case"min":case"m":return o*n;case"seconds":case"second":case"secs":case"sec":case"s":return o*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}(e);if("number"===s&&!1===isNaN(e))return t.long?function(e){return o(e,a,"day")||o(e,i,"hour")||o(e,n,"minute")||o(e,r,"second")||e+" ms"}(e):function(e){return e>=a?Math.round(e/a)+"d":e>=i?Math.round(e/i)+"h":e>=n?Math.round(e/n)+"m":e>=r?Math.round(e/r)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}}),ku=m({"node_modules/stream-parser/node_modules/debug/src/debug.js"(e,t){var r;function n(t){function n(){if(n.enabled){var t=n,i=+new Date,a=i-(r||i);t.diff=a,t.prev=r,t.curr=i,r=i;for(var o=new Array(arguments.length),s=0;s=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:function(){try{return window.localStorage}catch{}}(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},e.enable(r())}}),Mu=m({"node_modules/stream-parser/index.js"(e,t){var r=wu(),n=Au()("stream-parser");function i(e){n("initializing parser stream"),e._parserBytesLeft=0,e._parserBuffers=[],e._parserBuffered=0,e._parserState=-1,e._parserCallback=null,"function"==typeof e.push&&(e._parserOutput=e.push.bind(e)),e._parserInit=!0}function a(e,t){r(!this._parserCallback,'there is already a "callback" set!'),r(isFinite(e)&&e>0,'can only buffer a finite number of bytes > 0, got "'+e+'"'),this._parserInit||i(this),n("buffering %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=0}function o(e,t){r(!this._parserCallback,'there is already a "callback" set!'),r(e>0,'can only skip > 0 bytes, got "'+e+'"'),this._parserInit||i(this),n("skipping %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=1}function s(e,t){r(!this._parserCallback,'There is already a "callback" set!'),r(e>0,'can only pass through > 0 bytes, got "'+e+'"'),this._parserInit||i(this),n("passing through %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=2}function l(e,t,r){this._parserInit||i(this),n("write(%o bytes)",e.length),"function"==typeof t&&(r=t),h(this,e,null,r)}function c(e,t,r){this._parserInit||i(this),n("transform(%o bytes)",e.length),"function"!=typeof t&&(t=this._parserOutput),h(this,e,t,r)}function u(e,t,r,i){if(e._parserBytesLeft-=t.length,n("%o bytes left for stream piece",e._parserBytesLeft),0===e._parserState?(e._parserBuffers.push(t),e._parserBuffered+=t.length):2===e._parserState&&r(t),0!==e._parserBytesLeft)return i;var a=e._parserCallback;if(a&&0===e._parserState&&e._parserBuffers.length>1&&(t=Buffer.concat(e._parserBuffers,e._parserBuffered)),0!==e._parserState&&(t=null),e._parserCallback=null,e._parserBuffered=0,e._parserState=-1,e._parserBuffers.splice(0),a){var o=[];t&&o.push(t),r&&o.push(r);var s=a.length>o.length;s&&o.push(f(i));var l=a.apply(e,o);if(!s||i===l)return i}}t.exports=function(e){var t=e&&"function"==typeof e._transform,r=e&&"function"==typeof e._write;if(!t&&!r)throw new Error("must pass a Writable or Transform stream in");n("extending Parser into stream"),e._bytes=a,e._skipBytes=o,t&&(e._passthrough=s),t?e._transform=c:e._write=l};var h=f((function e(t,r,n,i){return t._parserBytesLeft<=0?i(new Error("got data but not currently parsing anything")):r.length<=t._parserBytesLeft?function(){return u(t,r,n,i)}:function(){var a=r.slice(0,t._parserBytesLeft);return u(t,a,n,(function(o){return o?i(o):r.length>a.length?function(){return e(t,r.slice(a.length),n,i)}:void 0}))}}));function f(e){return function(){for(var t=e.apply(this,arguments);"function"==typeof t;)t=t();return t}}}}),Su=m({"node_modules/probe-image-size/lib/common.js"(e){var t=nu().Transform,r=Mu();function n(){t.call(this,{readableObjectMode:!0})}function i(e,t,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||"",this.name=this.constructor.name,this.message=e,t&&(this.code=t),r&&(this.statusCode=r)}n.prototype=Object.create(t.prototype),n.prototype.constructor=n,r(n.prototype),e.ParserStream=n,e.sliceEq=function(e,t,r){for(var n=t,i=0;i>4&15,i=15&e[4],a=e[5]>>4&15,s=r(e,6),l=8,c=0;ct.width||e.width===t.width&&e.height>t.height?e:t})),r=e.reduce((function(e,t){return e.height>t.height||e.height===t.height&&e.width>t.width?e:t}));return t.width>r.height||t.width===r.height&&t.height>r.width?t:r}(t.sizes),n=1;t.transforms.forEach((function(e){var t={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},r={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if("imir"===e.type&&(n=0===e.value?r[n]:t[n=t[n=r[n]]]),"irot"===e.type)for(var i=0;i0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,e)}},i.prototype.read_uint16=function(e){var t=this.input;if(e+2>t.length)throw r("unexpected EOF","EBADDATA");return this.big_endian?256*t[e]+t[e+1]:t[e]+256*t[e+1]},i.prototype.read_uint32=function(e){var t=this.input;if(e+4>t.length)throw r("unexpected EOF","EBADDATA");return this.big_endian?16777216*t[e]+65536*t[e+1]+256*t[e+2]+t[e+3]:t[e]+256*t[e+1]+65536*t[e+2]+16777216*t[e+3]},i.prototype.is_subifd_link=function(e,t){return 0===e&&34665===t||0===e&&34853===t||34665===e&&40965===t},i.prototype.exif_format_length=function(e){switch(e){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},i.prototype.exif_format_read=function(e,t){var r;switch(e){case 1:case 2:return this.input[t];case 6:return(r=this.input[t])|33554430*(128&r);case 3:return this.read_uint16(t);case 8:return(r=this.read_uint16(t))|131070*(32768&r);case 4:return this.read_uint32(t);case 9:return 0|this.read_uint32(t);default:return null}},i.prototype.scan_ifd=function(e,t,i){var a=this.read_uint16(t);t+=2;for(var o=0;othis.input.length)throw r("unexpected EOF","EBADDATA");for(var d=[],m=f,g=0;g0&&(this.ifds_to_read.push({id:s,offset:d[0]}),p=!0),!1===i({is_big_endian:this.big_endian,ifd:e,tag:s,format:l,count:c,entry_offset:t+this.start,data_length:h,data_offset:f+this.start,value:d,is_subifd_link:p}))return void(this.aborted=!0);t+=12}0===e&&this.ifds_to_read.push({id:1,offset:this.read_uint32(t)})},t.exports.ExifParser=i,t.exports.get_orientation=function(e){var t=0;try{return new i(e,0,e.length).each((function(e){if(0===e.ifd&&274===e.tag&&Array.isArray(e.value))return t=e.value[0],!1})),t}catch{return-1}}}}),Iu=m({"node_modules/probe-image-size/lib/parse_sync/avif.js"(e,t){var r=Su().str2arr,n=Su().sliceEq,i=Su().readUInt32BE,a=Eu(),o=Cu(),s=r("ftyp");t.exports=function(e){if(n(e,4,s)){var t=a.unbox(e,0);if(t){var r=a.getMimeType(t.data);if(r){for(var l,c=t.end;;){var u=a.unbox(e,c);if(!u)break;if(c=u.end,"mdat"===u.boxtype)return;if("meta"===u.boxtype){l=u.data;break}}if(l){var h=a.readSizeFromMeta(l);if(h){var f={width:h.width,height:h.height,type:r.type,mime:r.mime,wUnits:"px",hUnits:"px"};if(h.variants.length>1&&(f.variants=h.variants),h.orientation&&(f.orientation=h.orientation),h.exif_location&&h.exif_location.offset+h.exif_location.length<=e.length){var p=i(e,h.exif_location.offset),d=e.slice(h.exif_location.offset+p+4,h.exif_location.offset+h.exif_location.length),m=o.get_orientation(d);m>0&&(f.orientation=m)}return f}}}}}}}}),Lu=m({"node_modules/probe-image-size/lib/parse_sync/bmp.js"(e,t){var r=Su().str2arr,n=Su().sliceEq,i=Su().readUInt16LE,a=r("BM");t.exports=function(e){if(!(e.length<26)&&n(e,0,a))return{width:i(e,18),height:i(e,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}}),Pu=m({"node_modules/probe-image-size/lib/parse_sync/gif.js"(e,t){var r=Su().str2arr,n=Su().sliceEq,i=Su().readUInt16LE,a=r("GIF87a"),o=r("GIF89a");t.exports=function(e){if(!(e.length<10)&&(n(e,0,a)||n(e,0,o)))return{width:i(e,6),height:i(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}}}),zu=m({"node_modules/probe-image-size/lib/parse_sync/ico.js"(e,t){var r=Su().readUInt16LE;t.exports=function(e){var t=r(e,0),n=r(e,2),i=r(e,4);if(0===t&&1===n&&i){for(var a=[],o={width:0,height:0},s=0;so.width||c>o.height)&&(o=u)}return{width:o.width,height:o.height,variants:a,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}}}),Du=m({"node_modules/probe-image-size/lib/parse_sync/jpeg.js"(e,t){var r=Su().readUInt16BE,n=Su().str2arr,i=Su().sliceEq,a=Cu(),o=n("Exif\0\0");t.exports=function(e){if(!(e.length<2)&&255===e[0]&&216===e[1]&&255===e[2])for(var t=2;;){for(;;){if(e.length-t<2)return;if(255===e[t++])break}for(var n,s=e[t++];255===s;)s=e[t++];if(208<=s&&s<=217||1===s)n=0;else{if(!(192<=s&&s<=254))return;if(e.length-t<2)return;n=r(e,t)-2,t+=2}if(217===s||218===s)return;var l;if(225===s&&n>=10&&i(e,t,o)&&(l=a.get_orientation(e.slice(t+6,t+n))),n>=5&&192<=s&&s<=207&&196!==s&&200!==s&&204!==s){if(e.length-t0&&(c.orientation=l),c}t+=n}}}}),Ou=m({"node_modules/probe-image-size/lib/parse_sync/png.js"(e,t){var r=Su().str2arr,n=Su().sliceEq,i=Su().readUInt32BE,a=r("‰PNG\r\n\n"),o=r("IHDR");t.exports=function(e){if(!(e.length<24)&&n(e,0,a)&&n(e,12,o))return{width:i(e,16),height:i(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}}}),Ru=m({"node_modules/probe-image-size/lib/parse_sync/psd.js"(e,t){var r=Su().str2arr,n=Su().sliceEq,i=Su().readUInt32BE,a=r("8BPS\0");t.exports=function(e){if(!(e.length<22)&&n(e,0,a))return{width:i(e,18),height:i(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}}}),Fu=m({"node_modules/probe-image-size/lib/parse_sync/svg.js"(e,t){function r(e){return 32===e||9===e||13===e||10===e}function n(e){return"number"==typeof e&&isFinite(e)&&e>0}var i=/<[-_.:a-zA-Z0-9][^>]*>/,a=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,o=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,s=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,l=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,c=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function u(e){return c.test(e)?e.match(c)[0]:"px"}t.exports=function(e){if(function(e){var t=0,n=e.length;for(239===e[0]&&187===e[1]&&191===e[2]&&(t=3);t>14&16383),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function h(e,t){return{width:1+(e[t+6]<<16|e[t+5]<<8|e[t+4]),height:1+(e[t+9]<e.length)){for(;t+8=10?r=r||c(e,t+8):"VP8L"===p&&d>=9?r=r||u(e,t+8):"VP8X"===p&&d>=10?r=r||h(e,t+8):"EXIF"===p&&(i=o.get_orientation(e.slice(t+8,t+8+d)),t=1/0),t+=8+d}else t++;if(r)return i>0&&(r.orientation=i),r}}}}}),Nu=m({"node_modules/probe-image-size/lib/parsers_sync.js"(e,t){t.exports={avif:Iu(),bmp:Lu(),gif:Pu(),ico:zu(),jpeg:Du(),png:Ou(),psd:Ru(),svg:Fu(),tiff:Bu(),webp:ju()}}}),Uu=m({"node_modules/probe-image-size/sync.js"(e,t){var r=Nu();t.exports=function(e){return function(e){for(var t=Object.keys(r),n=0;n0;)g=h.c2p(w+_*M),_--;for(_=0;void 0===v&&_0;)x=f.c2p(T+_*S),_--;if(gz[0];if(D||O){var R=m+E/2,F=v+C/2;L+="transform:"+i(R+"px",F+"px")+"scale("+(D?-1:1)+","+(O?-1:1)+")"+i(-R+"px",-F+"px")+";"}}I.attr("style",L);var B=new Promise((function(e){if(u._hasZ)e();else if(u._hasSource)if(u._canvas&&u._canvas.el.width===k&&u._canvas.el.height===A&&u._canvas.source===u.source)e();else{var t=document.createElement("canvas");t.width=k,t.height=A;var r=t.getContext("2d",{willReadFrequently:!0});u._image=u._image||new Image;var n=u._image;n.onload=function(){r.drawImage(n,0,0),u._canvas={el:t,source:u.source},e()},n.setAttribute("src",u.source)}})).then((function(){var e;if(u._hasZ)e=j((function(e,t){var r=b[t][e];return n.isTypedArray(r)&&(r=Array.from(r)),r})).toDataURL("image/png");else if(u._hasSource)if(d)e=u.source;else{var t=u._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,k,A).data;e=j((function(e,r){var n=4*(r*k+e);return[t[n],t[n+1],t[n+2],t[n+3]]})).toDataURL("image/png")}I.attr({"xlink:href":e,height:C,width:E,x:m,y:v})}));e._promises.push(B)}function j(e){var t=document.createElement("canvas");t.width=E,t.height=C;var r,i=t.getContext("2d",{willReadFrequently:!0}),a=function(e){return n.constrain(Math.round(h.c2p(w+e*M)-m),0,E)},s=function(e){return n.constrain(Math.round(f.c2p(T+e*S)-v),0,C)},l=o.colormodel[u.colormodel],p=l.colormodel||u.colormodel,d=l.fmt;for(_=0;_0||r.inbox(o-s.y0,o-(s.y0+s.h*l.dy),0)>0)){var h,f=Math.floor((t-s.x0)/l.dx),p=Math.floor(Math.abs(o-s.y0)/l.dy);if(l._hasZ?h=s.z[p][f]:l._hasSource&&(h=l._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(f,p,1,1).data),h){var d,m=s.hi||l.hoverinfo;if(m){var g=m.split("+");-1!==g.indexOf("all")&&(g=["color"]),-1!==g.indexOf("color")&&(d=!0)}var y,v=a.colormodel[l.colormodel],x=v.colormodel||l.colormodel,_=x.length,b=l._scaler(h),w=v.suffix,T=[];(l.hovertemplate||d)&&(T.push("["+[b[0]+w[0],b[1]+w[1],b[2]+w[2]].join(", ")),4===_&&T.push(", "+b[3]+w[3]),T.push("]"),T=T.join(""),e.extraText=x.toUpperCase()+": "+T),i(l.hovertext)&&i(l.hovertext[p])?y=l.hovertext[p][f]:i(l.text)&&i(l.text[p])&&(y=l.text[p][f]);var k=u.c2p(s.y0+(p+.5)*l.dy),A=s.x0+(f+.5)*l.dx,M=s.y0+(p+.5)*l.dy,S="["+h.slice(0,l.colormodel.length).join(", ")+"]";return[n.extendFlat(e,{index:[p,f],x0:c.c2p(s.x0+f*l.dx),x1:c.c2p(s.x0+(f+1)*l.dx),y0:k,y1:k,color:b,xVal:A,xLabelVal:A,yVal:M,yLabelVal:M,zLabelVal:S,text:y,hovertemplateLabels:{zLabel:S,colorLabel:T,"color[0]Label":b[0]+w[0],"color[1]Label":b[1]+w[1],"color[2]Label":b[2]+w[2],"color[3]Label":b[3]+w[3]}})]}}}}}),Zu=m({"src/traces/image/event_data.js"(e,t){t.exports=function(e,t){return"xVal"in t&&(e.x=t.xVal),"yVal"in t&&(e.y=t.yVal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e.color=t.color,e.colormodel=t.trace.colormodel,e.z||(e.z=t.color),e}}}),Yu=m({"src/traces/image/index.js"(e,t){t.exports={attributes:Bl(),supplyDefaults:jl(),calc:qu(),plot:Hu(),style:Gu(),hoverPoints:Wu(),eventData:Zu(),moduleType:"trace",name:"image",basePlotModule:Ci(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}}}),Xu=m({"lib/image.js"(e,t){t.exports=Yu()}}),$u=m({"src/traces/pie/attributes.js"(e,t){var r=q(),n=Ma().attributes,i=j(),a=G(),{hovertemplateAttrs:o,texttemplateAttrs:s,templatefallbackAttrs:l}=Fe(),c=B().extendFlat,u=Oe().pattern,h=i({editType:"plot",arrayOk:!0,colorEditType:"plot"});t.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:a.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:u,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:c({},r.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:o({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:l(),texttemplate:s({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:l({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:c({},h,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:c({},h,{}),outsidetextfont:c({},h,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:c({},r.showlegend,{arrayOk:!0}),legend:c({},r.legend,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:c({},h,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:n({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"}}}}),Ku=m({"src/traces/pie/defaults.js"(e,t){var r=M(),n=ct(),i=$u(),a=Ma().defaults,o=Xa().handleText,s=ct().coercePattern;function l(e,t){var i=n.isArrayOrTypedArray(e),a=n.isArrayOrTypedArray(t),o=Math.min(i?e.length:1/0,a?t.length:1/0);if(isFinite(o)||(o=0),o&&a){for(var s,l=0;l0){s=!0;break}}s||(o=0)}return{hasLabels:i,hasValues:a,len:o}}function c(e,t,r,n,i){n("marker.line.width")&&n("marker.line.color",i?void 0:r.paper_bgcolor);var a=n("marker.colors");s(n,"marker.pattern",a),e.marker&&!t.marker.pattern.fgcolor&&(t.marker.pattern.fgcolor=e.marker.colors),t.marker.pattern.bgcolor||(t.marker.pattern.bgcolor=r.paper_bgcolor)}t.exports={handleLabelsAndValues:l,handleMarkerDefaults:c,supplyDefaults:function(e,t,r,s){function u(r,a){return n.coerce(e,t,i,r,a)}var h=l(u("labels"),u("values")),f=h.len;if(t._hasLabels=h.hasLabels,t._hasValues=h.hasValues,!t._hasLabels&&t._hasValues&&(u("label0"),u("dlabel")),f){t._length=f,c(e,t,s,u,!0),u("scalegroup");var p,d=u("text"),m=u("texttemplate");if(u("texttemplatefallback"),m||(p=u("textinfo",n.isArrayOrTypedArray(d)?"text+percent":"percent")),u("hovertext"),u("hovertemplate"),u("hovertemplatefallback"),m||p&&"none"!==p){var g=u("textposition");o(e,t,s,u,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(g)||"auto"===g||"outside"===g)&&u("automargin"),("inside"===g||"auto"===g||Array.isArray(g))&&u("insidetextorientation")}else"none"===p&&u("textposition","none");a(t,s,u);var y=u("hole");if(u("title.text")){var v=u("title.position",y?"middle center":"top center");!y&&"middle center"===v&&(t.title.position="top center"),n.coerceFont(u,"title.font",s.font)}u("sort"),u("direction"),u("rotation"),u("pull")}else t.visible=!1}}}}),Ju=m({"src/traces/pie/layout_attributes.js"(e,t){t.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),Qu=m({"src/traces/pie/layout_defaults.js"(e,t){var r=ct(),n=Ju();t.exports=function(e,t){function i(i,a){return r.coerce(e,t,n,i,a)}i("hiddenlabels"),i("piecolorway",t.colorway),i("extendpiecolors")}}}),eh=m({"src/traces/pie/calc.js"(e,t){var r=M(),n=F(),i=W(),a={};function o(e){return function(t,r){return!(!t||(t=n(t),!t.isValid()))&&(t=i.addOpacity(t,t.getAlpha()),e[r]||(e[r]=t),t)}}function s(e,t){var r,i=JSON.stringify(e),a=t[i];if(!a){for(a=e.slice(),r=0;r=0})),("funnelarea"===t.type?y:t.sort)&&a.sort((function(e,t){return t.v-e.v})),a[0]&&(a[0].vTotal=g),a},crossTraceCalc:function(e,t){var r=(t||{}).type;r||(r="pie");var n=e._fullLayout,i=e.calcdata,o=n[r+"colorway"],l=n["_"+r+"colormap"];n["extend"+r+"colors"]&&(o=s(o,a));for(var c=0,u=0;u"),name:h.hovertemplate||-1!==f.indexOf("name")?h.name:void 0,idealAlign:e.pxmid[0]<0?"left":"right",color:m.castOption(b.bgcolor,e.pts)||e.color,borderColor:m.castOption(b.bordercolor,e.pts),fontFamily:m.castOption(w.family,e.pts),fontSize:m.castOption(w.size,e.pts),fontColor:m.castOption(w.color,e.pts),nameLength:m.castOption(b.namelength,e.pts),textAlign:m.castOption(b.align,e.pts),hovertemplate:m.castOption(h.hovertemplate,e.pts),hovertemplateLabels:e,eventData:[g(e,h)]},{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:t,inOut_bbox:T}),e.bbox=T[0],c._hasHoverLabel=!0}c._hasHoverEvent=!0,t.emit("plotly_hover",{points:[g(e,h)],event:r.event})}})),e.on("mouseout",(function(e){var n=t._fullLayout,a=t._fullData[c.index],o=r.select(this).datum();c._hasHoverEvent&&(e.originalEvent=r.event,t.emit("plotly_unhover",{points:[g(o,a)],event:r.event}),c._hasHoverEvent=!1),c._hasHoverLabel&&(i.loneUnhover(n._hoverlayer.node()),c._hasHoverLabel=!1)})),e.on("click",(function(e){var n=t._fullLayout,a=t._fullData[c.index];t._dragging||!1===n.hovermode||(t._hoverdata=[g(e,a)],i.click(t,r.event))}))}function x(e,t,r){var n=m.castOption(e.insidetextfont.color,t.pts);!n&&e._input.textfont&&(n=m.castOption(e._input.textfont.color,t.pts));var i=m.castOption(e.insidetextfont.family,t.pts)||m.castOption(e.textfont.family,t.pts)||r.family,o=m.castOption(e.insidetextfont.size,t.pts)||m.castOption(e.textfont.size,t.pts)||r.size,s=m.castOption(e.insidetextfont.weight,t.pts)||m.castOption(e.textfont.weight,t.pts)||r.weight,l=m.castOption(e.insidetextfont.style,t.pts)||m.castOption(e.textfont.style,t.pts)||r.style,c=m.castOption(e.insidetextfont.variant,t.pts)||m.castOption(e.textfont.variant,t.pts)||r.variant,u=m.castOption(e.insidetextfont.textcase,t.pts)||m.castOption(e.textfont.textcase,t.pts)||r.textcase,h=m.castOption(e.insidetextfont.lineposition,t.pts)||m.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=m.castOption(e.insidetextfont.shadow,t.pts)||m.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n||a.contrast(t.color),family:i,size:o,weight:s,style:l,variant:c,textcase:u,lineposition:h,shadow:f}}function _(e,t){for(var r,n,i=0;it&&t>n||r=-4;g-=2)y(Math.PI*g,"tan");for(g=4;g>=-4;g-=2)y(Math.PI*(g+1),"tan")}if(h||p){for(g=4;g>=-4;g-=2)y(Math.PI*(g+1.5),"rad");for(g=4;g>=-4;g-=2)y(Math.PI*(g+.5),"rad")}}if(s||d||h){var v=Math.sqrt(e.width*e.width+e.height*e.height);if((a={scale:i*n*2/v,rCenter:1-i,rotate:0}).textPosAngle=(t.startangle+t.stopangle)/2,a.scale>=1)return a;m.push(a)}(d||p)&&((a=T(e,n,o,l,c)).textPosAngle=(t.startangle+t.stopangle)/2,m.push(a)),(d||f)&&((a=k(e,n,o,l,c)).textPosAngle=(t.startangle+t.stopangle)/2,m.push(a));for(var x=0,_=0,b=0;b=1)break}return m[x]}function T(e,t,r,n,i){t=Math.max(0,t-2*d);var a=e.width/e.height,o=S(a,n,t,r);return{scale:2*o/e.height,rCenter:A(a,o/t),rotate:M(i)}}function k(e,t,r,n,i){t=Math.max(0,t-2*d);var a=e.height/e.width,o=S(a,n,t,r);return{scale:2*o/e.width,rCenter:A(a,o/t),rotate:M(i+Math.PI/2)}}function A(e,t){return Math.cos(t)-e*t}function M(e){return(180/Math.PI*e+720)%180-90}function S(e,t,r,n){var i=e+1/(2*Math.tan(t));return r*Math.min(1/(Math.sqrt(i*i+.5)+i),n/(Math.sqrt(e*e+n/2)+e))}function E(e,t){return e.v!==t.vTotal||t.trace.hole?Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2):1}function C(e,t){var r=t.pxmid[0],n=t.pxmid[1],i=e.width/2,a=e.height/2;return r<0&&(i*=-1),n<0&&(a*=-1),{scale:1,rCenter:1,rotate:0,x:i+Math.abs(a)*(i>0?1:-1)/2,y:a/(1+r*r/(n*n)),outside:!0}}function I(e,t){var r,n,i,a=e.trace,o={x:e.cx,y:e.cy},s={tx:0,ty:0};s.ty+=a.title.font.size,i=P(a),-1!==a.title.position.indexOf("top")?(o.y-=(1+i)*e.r,s.ty-=e.titleBox.height):-1!==a.title.position.indexOf("bottom")&&(o.y+=(1+i)*e.r);var l=function(e,t){return e/(void 0===t?1:t)}(e.r,e.trace.aspectratio),c=t.w*(a.domain.x[1]-a.domain.x[0])/2;return-1!==a.title.position.indexOf("left")?(c+=l,o.x-=(1+i)*l,s.tx+=e.titleBox.width/2):-1!==a.title.position.indexOf("center")?c*=2:-1!==a.title.position.indexOf("right")&&(c+=l,o.x+=(1+i)*l,s.tx-=e.titleBox.width/2),r=c/e.titleBox.width,n=L(e,t)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function L(e,t){var r=e.trace,n=t.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(e.titleBox.height,n/2)}function P(e){var t,r=e.pull;if(!r)return 0;if(s.isArrayOrTypedArray(r))for(r=0,t=0;tr&&(r=e.pull[t]);return r}function z(e,t){for(var r=[],n=0;n1?u=(c=r.r)/i.aspectratio:c=(u=r.r)*i.aspectratio,l=(c*=(1+i.baseratio)/2)*u}o=Math.min(o,l/r.vTotal)}for(n=0;n")}if(o){var _=s.castOption(a,t.i,"texttemplate");if(_){var b={label:(n=t).label,value:n.v,valueLabel:m.formatPieValue(n.v,i.separators),percent:n.v/r.vTotal,percentLabel:m.formatPiePercent(n.v/r.vTotal,i.separators),color:n.color,text:n.text,customdata:s.castOption(a,n.i,"customdata")},w=m.getFirstFilled(a.text,t.pts);(y(w)||""===w)&&(b.text=w),t.text=s.texttemplateString({data:[b,a._meta],fallback:a.texttemplatefallback,labels:b,locale:e._fullLayout._d3locale,template:_})}else t.text=""}}function R(e,t){var r=e.rotate*Math.PI/180,n=Math.cos(r),i=Math.sin(r),a=(t.left+t.right)/2,o=(t.top+t.bottom)/2;e.textX=a*n-o*i,e.textY=a*i+o*n,e.noCenter=!0}t.exports={plot:function(e,t){var i=e._context.staticPlot,h=e._fullLayout,d=h._size;p("pie",h),_(t,e),z(t,d);var g=s.makeTraceGroups(h._pielayer,t,"trace").each((function(t){var p=r.select(this),g=t[0],y=g.trace;(function(e){var t,r,n,i=e[0],a=i.r,o=i.trace,s=m.getRotationAngle(o.rotation),l=2*Math.PI/i.vTotal,c="px0",u="px1";if("counterclockwise"===o.direction){for(t=0;ti.vTotal/2?1:0,r.halfangle=Math.PI*Math.min(r.v/i.vTotal,.5),r.ring=1-o.hole,r.rInscribed=E(r,i))})(t),p.attr("stroke-linejoin","round"),p.each((function(){var _=r.select(this).selectAll("g.slice").data(t);_.enter().append("g").classed("slice",!0),_.exit().remove();var b=[[[],[]],[[],[]]],T=!1;_.each((function(n,a){if(n.hidden)r.select(this).selectAll("path,g").remove();else{n.pointNumber=n.i,n.curveNumber=y.index,b[n.pxmid[1]<0?0:1][n.pxmid[0]<0?0:1].push(n);var l=g.cx,c=g.cy,p=r.select(this),d=p.selectAll("path.surface").data([n]);if(d.enter().append("path").classed("surface",!0).style({"pointer-events":i?"none":"all"}),p.call(v,e,t),y.pull){var _=+m.castOption(y.pull,n.pts)||0;_>0&&(l+=_*n.pxmid[0],c+=_*n.pxmid[1])}n.cxFinal=l,n.cyFinal=c;var k=y.hole;if(n.v===g.vTotal){var A="M"+(l+n.px0[0])+","+(c+n.px0[1])+L(n.px0,n.pxmid,!0,1)+L(n.pxmid,n.px0,!0,1)+"Z";k?d.attr("d","M"+(l+k*n.px0[0])+","+(c+k*n.px0[1])+L(n.px0,n.pxmid,!1,k)+L(n.pxmid,n.px0,!1,k)+"Z"+A):d.attr("d",A)}else{var M=L(n.px0,n.px1,!0,1);if(k){var S=1-k;d.attr("d","M"+(l+k*n.px1[0])+","+(c+k*n.px1[1])+L(n.px1,n.px0,!1,k)+"l"+S*n.px0[0]+","+S*n.px0[1]+M+"Z")}else d.attr("d","M"+l+","+c+"l"+n.px0[0]+","+n.px0[1]+M+"Z")}O(e,n,g);var E=m.castOption(y.textposition,n.pts),I=p.selectAll("g.slicetext").data(n.text&&"none"!==E?[0]:[]);I.enter().append("g").classed("slicetext",!0),I.exit().remove(),I.each((function(){var i=s.ensureSingle(r.select(this),"text","",(function(e){e.attr("data-notex",1)})),p=s.ensureUniformFontSize(e,"outside"===E?function(e,t,r){return{color:m.castOption(e.outsidetextfont.color,t.pts)||m.castOption(e.textfont.color,t.pts)||r.color,family:m.castOption(e.outsidetextfont.family,t.pts)||m.castOption(e.textfont.family,t.pts)||r.family,size:m.castOption(e.outsidetextfont.size,t.pts)||m.castOption(e.textfont.size,t.pts)||r.size,weight:m.castOption(e.outsidetextfont.weight,t.pts)||m.castOption(e.textfont.weight,t.pts)||r.weight,style:m.castOption(e.outsidetextfont.style,t.pts)||m.castOption(e.textfont.style,t.pts)||r.style,variant:m.castOption(e.outsidetextfont.variant,t.pts)||m.castOption(e.textfont.variant,t.pts)||r.variant,textcase:m.castOption(e.outsidetextfont.textcase,t.pts)||m.castOption(e.textfont.textcase,t.pts)||r.textcase,lineposition:m.castOption(e.outsidetextfont.lineposition,t.pts)||m.castOption(e.textfont.lineposition,t.pts)||r.lineposition,shadow:m.castOption(e.outsidetextfont.shadow,t.pts)||m.castOption(e.textfont.shadow,t.pts)||r.shadow}}(y,n,h.font):x(y,n,h.font));i.text(n.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(o.font,p).call(u.convertToTspans,e);var d,v=o.bBox(i.node());if("outside"===E)d=C(v,n);else if(d=w(v,n,g),"auto"===E&&d.scale<1){var _=s.ensureUniformFontSize(e,y.outsidetextfont);i.call(o.font,_),d=C(v=o.bBox(i.node()),n)}var b=d.textPosAngle,k=void 0===b?n.pxmid:D(g.r,b);if(d.targetX=l+k[0]*d.rCenter+(d.x||0),d.targetY=c+k[1]*d.rCenter+(d.y||0),R(d,v),d.outside){var A=d.targetY;n.yLabelMin=A-v.height/2,n.yLabelMid=A,n.yLabelMax=A+v.height/2,n.labelExtraX=0,n.labelExtraY=0,T=!0}d.fontSize=p.size,f(y.type,d,h),t[a].transform=d,s.setTransormAndDisplay(i,d)}))}function L(e,t,r,i){var a=i*(t[0]-e[0]),o=i*(t[1]-e[1]);return"a"+i*g.r+","+i*g.r+" 0 "+n.largeArc+(r?" 1 ":" 0 ")+a+","+o}}));var k=r.select(this).selectAll("g.titletext").data(y.title.text?[0]:[]);if(k.enter().append("g").classed("titletext",!0),k.exit().remove(),k.each((function(){var t,n=s.ensureSingle(r.select(this),"text","",(function(e){e.attr("data-notex",1)})),i=y.title.text;y._meta&&(i=s.templateString(i,y._meta)),n.text(i).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(o.font,y.title.font).call(u.convertToTspans,e),t="middle center"===y.title.position?function(e){var t=Math.sqrt(e.titleBox.width*e.titleBox.width+e.titleBox.height*e.titleBox.height);return{x:e.cx,y:e.cy,scale:e.trace.hole*e.r*2/t,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}(g):I(g,d),n.attr("transform",c(t.x,t.y)+l(Math.min(1,t.scale))+c(t.tx,t.ty))})),T&&function(e,t){var r,n,i,a,o,l,c,u,h,f,p,d,g;function y(e,t){return e.pxmid[1]-t.pxmid[1]}function v(e,t){return t.pxmid[1]-e.pxmid[1]}function x(e,r){r||(r={});var i,u,h,p,d=r.labelExtraY+(n?r.yLabelMax:r.yLabelMin),g=n?e.yLabelMin:e.yLabelMax,y=n?e.yLabelMax:e.yLabelMin,v=e.cyFinal+o(e.px0[1],e.px1[1]),x=d-g;if(x*c>0&&(e.labelExtraY=x),s.isArrayOrTypedArray(t.pull))for(u=0;u=(m.castOption(t.pull,h.pts)||0))&&((e.pxmid[1]-h.pxmid[1])*c>0?(x=h.cyFinal+o(h.px0[1],h.px1[1])-g-e.labelExtraY)*c>0&&(e.labelExtraY+=x):(y+e.labelExtraY-v)*c>0&&(i=3*l*Math.abs(u-f.indexOf(e)),(p=h.cxFinal+a(h.px0[0],h.px1[0])+i-(e.cxFinal+e.pxmid[0])-e.labelExtraX)*l>0&&(e.labelExtraX+=p)))}for(n=0;n<2;n++)for(i=n?y:v,o=n?Math.max:Math.min,c=n?1:-1,r=0;r<2;r++){for(a=r?Math.max:Math.min,l=r?1:-1,(u=e[n][r]).sort(i),h=e[1-n][r],f=h.concat(u),d=[],p=0;pMath.abs(h)?l+="l"+h*e.pxmid[0]/e.pxmid[1]+","+h+"H"+(o+e.labelExtraX+c):l+="l"+e.labelExtraX+","+u+"v"+(h-u)+"h"+c}else l+="V"+(e.yLabelMid+e.labelExtraY)+"h"+c;s.ensureSingle(n,"path","textline").call(a.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:l,fill:"none"})}else n.select("path.textline").remove()}))}(_,y),T&&y.automargin){var A=o.bBox(p.node()),M=y.domain,S=d.w*(M.x[1]-M.x[0]),E=d.h*(M.y[1]-M.y[0]),L=(.5*S-g.r)/d.w,P=(.5*E-g.r)/d.h;n.autoMargin(e,"pie."+y.uid+".automargin",{xl:M.x[0]-L,xr:M.x[1]+L,yb:M.y[0]-P,yt:M.y[1]+P,l:Math.max(g.cx-g.r-A.left,0),r:Math.max(A.right-(g.cx+g.r),0),b:Math.max(A.bottom-(g.cy+g.r),0),t:Math.max(g.cy-g.r-A.top,0),pad:5})}}))}));setTimeout((function(){g.selectAll("tspan").each((function(){var e=r.select(this);e.attr("dy")&&e.attr("dy",e.attr("dy"))}))}),0)},formatSliceLabel:O,transformInsideText:w,determineInsideTextFont:x,positionTitleOutside:I,prerenderTitles:_,layoutAreas:z,attachFxHandlers:v,computeTransform:R}}}),nh=m({"src/traces/pie/style.js"(e,t){var r=b(),n=kr(),i=Qa().resizeText;t.exports=function(e){var t=e._fullLayout._pielayer.selectAll(".trace");i(e,t,"pie"),t.each((function(t){var i=t[0].trace,a=r.select(this);a.style({opacity:i.opacity}),a.selectAll("path.surface").each((function(t){r.select(this).call(n,t,i,e)}))}))}}}),ih=m({"src/traces/pie/base_plot.js"(e){var t=At();e.name="pie",e.plot=function(r,n,i,a){t.plotBasePlot(e.name,r,n,i,a)},e.clean=function(r,n,i,a){t.cleanBasePlot(e.name,r,n,i,a)}}}),ah=m({"src/traces/pie/index.js"(e,t){t.exports={attributes:$u(),supplyDefaults:Ku().supplyDefaults,supplyLayoutDefaults:Qu(),layoutAttributes:Ju(),calc:eh().calc,crossTraceCalc:eh().crossTraceCalc,plot:rh().plot,style:nh(),styleOne:kr(),moduleType:"trace",name:"pie",basePlotModule:ih(),categories:["pie-like","pie","showLegend"],meta:{}}}}),oh=m({"lib/pie.js"(e,t){t.exports=ah()}}),sh=m({"src/traces/sunburst/base_plot.js"(e){var t=At();e.name="sunburst",e.plot=function(r,n,i,a){t.plotBasePlot(e.name,r,n,i,a)},e.clean=function(r,n,i,a){t.cleanBasePlot(e.name,r,n,i,a)}}}),lh=m({"src/traces/sunburst/constants.js"(e,t){t.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}}}),ch=m({"src/traces/sunburst/attributes.js"(e,t){var r=q(),{hovertemplateAttrs:n,texttemplateAttrs:i,templatefallbackAttrs:a}=Fe(),o=zt(),s=Ma().attributes,l=$u(),c=lh(),u=B().extendFlat,h=Oe().pattern;t.exports={labels:{valType:"data_array",editType:"calc"},parents:{valType:"data_array",editType:"calc"},values:{valType:"data_array",editType:"calc"},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc"},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc"},level:{valType:"any",editType:"plot",anim:!0},maxdepth:{valType:"integer",editType:"plot",dflt:-1},marker:u({colors:{valType:"data_array",editType:"calc"},line:{color:u({},l.marker.line.color,{dflt:null}),width:u({},l.marker.line.width,{dflt:1}),editType:"calc"},pattern:h,editType:"calc"},o("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:l.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:i({editType:"plot"},{keys:c.eventDataKeys.concat(["label","value"])}),texttemplatefallback:a({editType:"plot"}),hovertext:l.hovertext,hoverinfo:u({},r.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:n({},{keys:c.eventDataKeys}),hovertemplatefallback:a(),textfont:l.textfont,insidetextorientation:l.insidetextorientation,insidetextfont:l.insidetextfont,outsidetextfont:u({},l.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:l.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:s({name:"sunburst",trace:!0,editType:"calc"})}}}),uh=m({"src/traces/sunburst/layout_attributes.js"(e,t){t.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),hh=m({"src/traces/sunburst/defaults.js"(e,t){var r=ct(),n=ch(),i=Ma().defaults,a=Xa().handleText,o=Ku().handleMarkerDefaults,s=Yt(),l=s.hasColorscale,c=s.handleDefaults;t.exports=function(e,t,s,u){function h(i,a){return r.coerce(e,t,n,i,a)}var f=h("labels"),p=h("parents");if(f&&f.length&&p&&p.length){var d=h("values");d&&d.length?h("branchvalues"):h("count"),h("level"),h("maxdepth"),o(e,t,u,h);var m=t._hasColorscale=l(e,"marker","colors")||(e.marker||{}).coloraxis;m&&c(e,t,u,h,{prefix:"marker.",cLetter:"c"}),h("leaf.opacity",m?1:.7);var g=h("text");h("texttemplate"),h("texttemplatefallback"),t.texttemplate||h("textinfo",r.isArrayOrTypedArray(g)?"text+label":"label"),h("hovertext"),h("hovertemplate"),h("hovertemplatefallback"),a(e,t,u,h,"auto",{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),h("insidetextorientation"),h("sort"),h("rotation"),h("root.color"),i(t,u,h),t._length=null}else t.visible=!1}}}),fh=m({"src/traces/sunburst/layout_defaults.js"(e,t){var r=ct(),n=uh();t.exports=function(e,t){function i(i,a){return r.coerce(e,t,n,i,a)}i("sunburstcolorway",t.colorway),i("extendsunburstcolors")}}}),ph=m({"node_modules/d3-hierarchy/dist/d3-hierarchy.js"(e,t){var r,n;r=e,n=function(e){function t(e,t){return e.parent===t.parent?1:2}function r(e,t){return e+t.x}function n(e,t){return Math.max(e,t.y)}function i(e){var t=0,r=e.children,n=r&&r.length;if(n)for(;--n>=0;)t+=r[n].value;else t=1;e.value=t}function a(e,t){var r,n,i,a,s,u=new c(e),h=+e.value&&(u.value=e.value),f=[u];for(null==t&&(t=o);r=f.pop();)if(h&&(r.value=+r.data.value),(i=t(r.data))&&(s=i.length))for(r.children=new Array(s),a=s-1;a>=0;--a)f.push(n=r.children[a]=new c(i[a])),n.parent=r,n.depth=r.depth+1;return u.eachBefore(l)}function o(e){return e.children}function s(e){e.data=e.data.data}function l(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function c(e){this.data=e,this.depth=this.height=0,this.parent=null}c.prototype=a.prototype={constructor:c,count:function(){return this.eachAfter(i)},each:function(e){var t,r,n,i,a=this,o=[a];do{for(t=o.reverse(),o=[];a=t.pop();)if(e(a),r=a.children)for(n=0,i=r.length;n=0;--r)i.push(t[r]);return this},sum:function(e){return this.eachAfter((function(t){for(var r=+e(t.data)||0,n=t.children,i=n&&n.length;--i>=0;)r+=n[i].value;t.value=r}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,r=function(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),i=null;for(e=r.pop(),t=n.pop();e===t;)i=e,e=r.pop(),t=n.pop();return i}(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var i=n.length;e!==r;)n.splice(i,0,e),e=e.parent;return n},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(r){r!==e&&t.push({source:r.parent,target:r})})),t},copy:function(){return a(this).eachBefore(s)}};var u=Array.prototype.slice;function h(e){for(var t,r,n=0,i=(e=function(e){for(var t,r,n=e.length;n;)r=Math.random()*n--|0,t=e[n],e[n]=e[r],e[r]=t;return e}(u.call(e))).length,a=[];n0&&r*r>n*n+i*i}function m(e,t){for(var r=0;r(o*=o)?(n=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-n*n)),r.x=e.x-n*s-a*l,r.y=e.y-n*l+a*s):(n=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-n*n)),r.x=t.x+n*s-a*l,r.y=t.y+n*l+a*s)):(r.x=t.x+r.r,r.y=t.y)}function _(e,t){var r=e.r+t.r-1e-6,n=t.x-e.x,i=t.y-e.y;return r>0&&r*r>n*n+i*i}function b(e){var t=e._,r=e.next._,n=t.r+r.r,i=(t.x*r.r+r.x*t.r)/n,a=(t.y*r.r+r.y*t.r)/n;return i*i+a*a}function w(e){this._=e,this.next=null,this.previous=null}function T(e){if(!(i=e.length))return 0;var t,r,n,i,a,o,s,l,c,u,f;if((t=e[0]).x=0,t.y=0,!(i>1))return t.r;if(r=e[1],t.x=-r.r,r.x=t.r,r.y=0,!(i>2))return t.r+r.r;x(r,t,n=e[2]),t=new w(t),r=new w(r),n=new w(n),t.next=n.previous=r,r.next=t.previous=n,n.next=r.previous=t;e:for(s=3;sf&&(f=s),g=u*u*m,(p=Math.max(f/g,g/h))>d){u-=s;break}d=p}y.push(o={value:u,dice:l1?t:1)},r}(H),Z=function e(t){function r(e,r,n,i,a){if((o=e._squarify)&&o.ratio===t)for(var o,s,l,c,u,h=-1,f=o.length,p=e.value;++h1?t:1)},r}(H);e.cluster=function(){var e=t,i=1,a=1,o=!1;function s(t){var s,l=0;t.eachAfter((function(t){var i=t.children;i?(t.x=function(e){return e.reduce(r,0)/e.length}(i),t.y=function(e){return 1+e.reduce(n,0)}(i)):(t.x=s?l+=e(t,s):0,t.y=0,s=t)}));var c=function(e){for(var t;t=e.children;)e=t[0];return e}(t),u=function(e){for(var t;t=e.children;)e=t[t.length-1];return e}(t),h=c.x-e(c,u)/2,f=u.x+e(u,c)/2;return t.eachAfter(o?function(e){e.x=(e.x-t.x)*i,e.y=(t.y-e.y)*a}:function(e){e.x=(e.x-h)/(f-h)*i,e.y=(1-(t.y?e.y/t.y:1))*a})}return s.separation=function(t){return arguments.length?(e=t,s):e},s.size=function(e){return arguments.length?(o=!1,i=+e[0],a=+e[1],s):o?null:[i,a]},s.nodeSize=function(e){return arguments.length?(o=!0,i=+e[0],a=+e[1],s):o?[i,a]:null},s},e.hierarchy=a,e.pack=function(){var e=null,t=1,r=1,n=A;function i(i){return i.x=t/2,i.y=r/2,e?i.eachBefore(E(e)).eachAfter(C(n,.5)).eachBefore(I(1)):i.eachBefore(E(S)).eachAfter(C(A,1)).eachAfter(C(n,i.r/Math.min(t,r))).eachBefore(I(Math.min(t,r)/(2*i.r))),i}return i.radius=function(t){return arguments.length?(e=function(e){return null==e?null:k(e)}(t),i):e},i.size=function(e){return arguments.length?(t=+e[0],r=+e[1],i):[t,r]},i.padding=function(e){return arguments.length?(n="function"==typeof e?e:M(+e),i):n},i},e.packEnclose=h,e.packSiblings=function(e){return T(e),e},e.partition=function(){var e=1,t=1,r=0,n=!1;function i(i){var a=i.height+1;return i.x0=i.y0=r,i.x1=e,i.y1=t/a,i.eachBefore(function(e,t){return function(n){n.children&&P(n,n.x0,e*(n.depth+1)/t,n.x1,e*(n.depth+2)/t);var i=n.x0,a=n.y0,o=n.x1-r,s=n.y1-r;o0)throw new Error("cycle");return a}return r.id=function(t){return arguments.length?(e=k(t),r):e},r.parentId=function(e){return arguments.length?(t=k(e),r):t},r},e.tree=function(){var e=F,t=1,r=1,n=null;function i(i){var l=function(e){for(var t,r,n,i,a,o=new V(e,0),s=[o];t=s.pop();)if(n=t._.children)for(t.children=new Array(a=n.length),i=a-1;i>=0;--i)s.push(r=t.children[i]=new V(n[i],i)),r.parent=t;return(o.parent=new V(null,0)).children=[o],o}(i);if(l.eachAfter(a),l.parent.m=-l.z,l.eachBefore(o),n)i.eachBefore(s);else{var c=i,u=i,h=i;i.eachBefore((function(e){e.xu.x&&(u=e),e.depth>h.depth&&(h=e)}));var f=c===u?1:e(c,u)/2,p=f-c.x,d=t/(u.x+f+p),m=r/(h.depth||1);i.eachBefore((function(e){e.x=(e.x+p)*d,e.y=e.depth*m}))}return i}function a(t){var r=t.children,n=t.parent.children,i=t.i?n[t.i-1]:null;if(r){!function(e){for(var t,r=0,n=0,i=e.children,a=i.length;--a>=0;)(t=i[a]).z+=r,t.m+=r,r+=t.s+(n+=t.c)}(t);var a=(r[0].z+r[r.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,r,n){if(r){for(var i,a=t,o=t,s=r,l=a.parent.children[0],c=a.m,u=o.m,h=s.m,f=l.m;s=j(s),a=B(a),s&&a;)l=B(l),(o=j(o)).a=t,(i=s.z+h-a.z-c+e(s._,a._))>0&&(N(U(s,t,n),t,i),c+=i,u+=i),h+=s.m,c+=a.m,f+=l.m,u+=o.m;s&&!j(o)&&(o.t=s,o.m+=h-u),a&&!B(l)&&(l.t=a,l.m+=c-f,n=t)}return n}(t,i,t.parent.A||n[0])}function o(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(e){e.x*=t,e.y=e.depth*r}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(n=!1,t=+e[0],r=+e[1],i):n?null:[t,r]},i.nodeSize=function(e){return arguments.length?(n=!0,t=+e[0],r=+e[1],i):n?[t,r]:null},i},e.treemap=function(){var e=W,t=!1,r=1,n=1,i=[0],a=A,o=A,s=A,l=A,c=A;function u(e){return e.x0=e.y0=0,e.x1=r,e.y1=n,e.eachBefore(h),i=[0],t&&e.eachBefore(L),e}function h(t){var r=i[t.depth],n=t.x0+r,u=t.y0+r,h=t.x1-r,f=t.y1-r;h=r-1){var u=s[t];return u.x0=i,u.y0=a,u.x1=o,void(u.y1=l)}for(var h=c[t],f=n/2+h,p=t+1,d=r-1;p>>1;c[m]l-a){var v=(i*y+o*g)/n;e(t,p,g,i,a,v,l),e(p,r,y,v,a,o,l)}else{var x=(a*y+l*g)/n;e(t,p,g,i,a,o,x),e(p,r,y,i,x,o,l)}}(0,l,e.value,t,r,n,i)},e.treemapDice=P,e.treemapResquarify=Z,e.treemapSlice=q,e.treemapSliceDice=function(e,t,r,n,i){(1&e.depth?q:P)(e,t,r,n,i)},e.treemapSquarify=W,Object.defineProperty(e,"__esModule",{value:!0})},n("object"==typeof e&&typeof t<"u"?e:(r=r||self).d3=r.d3||{})}}),dh=m({"src/traces/sunburst/calc.js"(e){var t=ph(),r=M(),n=ct(),i=Yt().makeColorScaleFuncFromTrace,a=eh().makePullColorFn,o=eh().generateExtendedColors,s=Yt().calc,l=S().ALMOST_EQUAL,c={},u={},h={};function f(e,t,r){var n=0,i=e.children;if(i){for(var a=i.length,o=0;o=0};v?(c=Math.min(y.length,_.length),u=function(e){return M(y[e])&&S(e)},h=function(e){return String(y[e])}):(c=Math.min(x.length,_.length),u=function(e){return M(x[e])&&S(e)},h=function(e){return String(x[e])}),w&&(c=Math.min(c,b.length));for(var E=0;E1){for(var P=n.randstr(),z=0;z>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Ah(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Ah(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Yh.exec(e))?new Eh(t[1],t[2],t[3],1):(t=Xh.exec(e))?new Eh(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=$h.exec(e))?Ah(t[1],t[2],t[3],t[4]):(t=Kh.exec(e))?Ah(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Jh.exec(e))?Oh(t[1],t[2]/100,t[3]/100,1):(t=Qh.exec(e))?Oh(t[1],t[2]/100,t[3]/100,t[4]):ef.hasOwnProperty(e)?kh(ef[e]):"transparent"===e?new Eh(NaN,NaN,NaN,0):null}function kh(e){return new Eh(e>>16&255,e>>8&255,255&e,1)}function Ah(e,t,r,n){return n<=0&&(e=t=r=NaN),new Eh(e,t,r,n)}function Mh(e){return e instanceof vh||(e=Th(e)),e?new Eh((e=e.rgb()).r,e.g,e.b,e.opacity):new Eh}function Sh(e,t,r,n){return 1===arguments.length?Mh(e):new Eh(e,t,r,n??1)}function Eh(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function Ch(){return`#${Dh(this.r)}${Dh(this.g)}${Dh(this.b)}`}function Ih(){return`#${Dh(this.r)}${Dh(this.g)}${Dh(this.b)}${Dh(255*(isNaN(this.opacity)?1:this.opacity))}`}function Lh(){let e=Ph(this.opacity);return`${1===e?"rgb(":"rgba("}${zh(this.r)}, ${zh(this.g)}, ${zh(this.b)}${1===e?")":`, ${e})`}`}function Ph(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function zh(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Dh(e){return((e=zh(e))<16?"0":"")+e.toString(16)}function Oh(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Bh(e,t,r,n)}function Rh(e){if(e instanceof Bh)return new Bh(e.h,e.s,e.l,e.opacity);if(e instanceof vh||(e=Th(e)),!e)return new Bh;if(e instanceof Bh)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,s=a-i,l=(a+i)/2;return s?(o=t===a?(r-n)/s+6*(r0&&l<1?0:o,new Bh(o,s,l,e.opacity)}function Fh(e,t,r,n){return 1===arguments.length?Rh(e):new Bh(e,t,r,n??1)}function Bh(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function jh(e){return(e=(e||0)%360)<0?e+360:e}function Nh(e){return Math.max(0,Math.min(1,e||0))}function Uh(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}var Vh,qh,Hh,Gh,Wh,Zh,Yh,Xh,$h,Kh,Jh,Qh,ef,tf,rf,nf=d({"node_modules/d3-color/src/color.js"(){yh(),qh=1/(Vh=.7),Hh="\\s*([+-]?\\d+)\\s*",Gh="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Wh="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Zh=/^#([0-9a-f]{3,8})$/,Yh=new RegExp(`^rgb\\(${Hh},${Hh},${Hh}\\)$`),Xh=new RegExp(`^rgb\\(${Wh},${Wh},${Wh}\\)$`),$h=new RegExp(`^rgba\\(${Hh},${Hh},${Hh},${Gh}\\)$`),Kh=new RegExp(`^rgba\\(${Wh},${Wh},${Wh},${Gh}\\)$`),Jh=new RegExp(`^hsl\\(${Gh},${Wh},${Wh}\\)$`),Qh=new RegExp(`^hsla\\(${Gh},${Wh},${Wh},${Gh}\\)$`),ef={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},mh(vh,Th,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:xh,formatHex:xh,formatHex8:_h,formatHsl:bh,formatRgb:wh,toString:wh}),mh(Eh,Sh,gh(vh,{brighter(e){return e=null==e?qh:Math.pow(qh,e),new Eh(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Vh:Math.pow(Vh,e),new Eh(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Eh(zh(this.r),zh(this.g),zh(this.b),Ph(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:Ch,formatHex:Ch,formatHex8:Ih,formatRgb:Lh,toString:Lh})),mh(Bh,Fh,gh(vh,{brighter(e){return e=null==e?qh:Math.pow(qh,e),new Bh(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Vh:Math.pow(Vh,e),new Bh(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Eh(Uh(e>=240?e-240:e+120,i,n),Uh(e,i,n),Uh(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Bh(jh(this.h),Nh(this.s),Nh(this.l),Ph(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=Ph(this.opacity);return`${1===e?"hsl(":"hsla("}${jh(this.h)}, ${100*Nh(this.s)}%, ${100*Nh(this.l)}%${1===e?")":`, ${e})`}`}}))}}),af=d({"node_modules/d3-color/src/math.js"(){tf=Math.PI/180,rf=180/Math.PI}});function of(e){if(e instanceof lf)return new lf(e.l,e.a,e.b,e.opacity);if(e instanceof df)return mf(e);e instanceof Eh||(e=Mh(e));var t,r,n=ff(e.r),i=ff(e.g),a=ff(e.b),o=cf((.2225045*n+.7168786*i+.0606169*a)/yf);return n===i&&i===a?t=r=o:(t=cf((.4360747*n+.3850649*i+.1430804*a)/gf),r=cf((.0139322*n+.0971045*i+.7141733*a)/vf)),new lf(116*o-16,500*(t-o),200*(o-r),e.opacity)}function sf(e,t,r,n){return 1===arguments.length?of(e):new lf(e,t,r,n??1)}function lf(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function cf(e){return e>wf?Math.pow(e,.3333333333333333):e/bf+xf}function uf(e){return e>_f?e*e*e:bf*(e-xf)}function hf(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,.4166666666666667)-.055)}function ff(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function pf(e,t,r,n){return 1===arguments.length?function(e){if(e instanceof df)return new df(e.h,e.c,e.l,e.opacity);if(e instanceof lf||(e=of(e)),0===e.a&&0===e.b)return new df(NaN,0=1?(r=1,t-1):Math.floor(r*t),i=e[n],a=e[n+1],o=n>0?e[n-1]:2*i-a,s=n()=>e}});function Vf(e,t){return function(r){return e+r*t}}function qf(e,t){var r=t-e;return r?Vf(e,r>180||r<-180?r-360*Math.round(r/360):r):jf(isNaN(e)?t:e)}function Hf(e,t){var r=t-e;return r?Vf(e,r):jf(isNaN(e)?t:e)}var Gf=d({"node_modules/d3-interpolate/src/color.js"(){Uf()}});function Wf(e){return function(t){var r,n,i=t.length,a=new Array(i),o=new Array(i),s=new Array(i);for(r=0;ra&&(i=t.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:ap(r,n)})),a=hp.lastIndex;return a180?t+=360:t-e>180&&(e+=360),a.push({i:r.push(i(r)+"rotate(",null,n)-2,x:ap(e,t)})):t&&r.push(i(r)+"rotate("+t+n)}(a.rotate,o.rotate,s,l),function(e,t,r,a){e!==t?a.push({i:r.push(i(r)+"skewX(",null,n)-2,x:ap(e,t)}):t&&r.push(i(r)+"skewX("+t+n)}(a.skewX,o.skewX,s,l),function(e,t,r,n,a,o){if(e!==r||t!==n){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:ap(e,r)},{i:s-2,x:ap(t,n)})}else(1!==r||1!==n)&&a.push(i(a)+"scale("+r+","+n+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,l),a=o=null,function(e){for(var t,r=-1,n=l.length;++rpp,interpolateArray:()=>ep,interpolateBasis:()=>Rf,interpolateBasisClosed:()=>Bf,interpolateCubehelix:()=>Zp,interpolateCubehelixLong:()=>Yp,interpolateDate:()=>np,interpolateDiscrete:()=>mp,interpolateHcl:()=>qp,interpolateHclLong:()=>Hp,interpolateHsl:()=>Fp,interpolateHslLong:()=>Bp,interpolateHue:()=>yp,interpolateLab:()=>Np,interpolateNumber:()=>ap,interpolateNumberArray:()=>Kf,interpolateObject:()=>sp,interpolateRgb:()=>Zf,interpolateRgbBasis:()=>Yf,interpolateRgbBasisClosed:()=>Xf,interpolateRound:()=>xp,interpolateString:()=>cp,interpolateTransformCss:()=>Ip,interpolateTransformSvg:()=>Lp,interpolateZoom:()=>Dp,piecewise:()=>$p,quantize:()=>Jp});var td=d({"node_modules/d3-interpolate/src/index.js"(){dp(),rp(),Ff(),Nf(),ip(),gp(),vp(),op(),Qf(),lp(),_p(),fp(),Pp(),Op(),$f(),jp(),Up(),Gp(),Xp(),Kp(),Qp()}}),rd=m({"src/traces/sunburst/fill_one.js"(e,t){var r=er(),n=W();t.exports=function(e,t,i,a,o){var s=t.data.data,l=s.i,c=o||s.color;if(l>=0){t.i=s.i;var u=i.marker;u.pattern?(!u.colors||!u.pattern.shape)&&(u.color=c,t.color=c):(u.color=c,t.color=c),r.pointStyle(e,i,a,t)}else n.fill(e,c)}}}),nd=m({"src/traces/sunburst/style.js"(e,t){var r=b(),n=W(),i=ct(),a=Qa().resizeText,o=rd();function s(e,t,r,a){var s=t.data.data,l=!t.children,c=s.i,u=i.castOption(r,c,"marker.line.color")||n.defaultLine,h=i.castOption(r,c,"marker.line.width")||0;e.call(o,t,r,a).style("stroke-width",h).call(n.stroke,u).style("opacity",l?r.leaf.opacity:null)}t.exports={style:function(e){var t=e._fullLayout._sunburstlayer.selectAll(".trace");a(e,t,"sunburst"),t.each((function(t){var n=r.select(this),i=t[0].trace;n.style("opacity",i.opacity),n.selectAll("path.surface").each((function(t){r.select(this).call(s,t,i,e)}))}))},styleOne:s}}}),id=m({"src/traces/sunburst/helpers.js"(e){var t=ct(),r=W(),n=dr(),i=wr();function a(e){return e.data.data.pid}e.findEntryWithLevel=function(t,r){var n;return r&&t.eachAfter((function(t){if(e.getPtId(t)===r)return n=t.copy()})),n||t},e.findEntryWithChild=function(t,r){var n;return t.eachAfter((function(t){for(var i=t.children||[],a=0;a0)},e.getMaxDepth=function(e){return e.maxdepth>=0?e.maxdepth:1/0},e.isHeader=function(t,r){return!(e.isLeaf(t)||t.depth===r._maxDepth-1)},e.getParent=function(t,r){return e.findEntryWithLevel(t,a(r))},e.listPath=function(t,r){var n=t.parent;if(!n)return[];var i=r?[n.data[r]]:[n];return e.listPath(n,r).concat(i)},e.getPath=function(t){return e.listPath(t,"label").join("/")+"/"},e.formatValue=i.formatPieValue,e.formatPercent=function(e,r){var n=t.formatPercent(e,0);return"0%"===n&&(n=i.formatPiePercent(e,r)),n}}}),ad=m({"src/traces/sunburst/fx.js"(e,t){var r=b(),n=He(),i=Kt().appendArrayPointValue,a=Or(),o=ct(),s=dt(),l=id(),c=wr().formatPieValue;function u(e,t,r){for(var n=e.data.data,a={curveNumber:t.index,pointNumber:n.i,data:t._input,fullData:t},o=0;o"),name:A||z("name")?v.name:void 0,color:k("hoverlabel.bgcolor")||x.color,borderColor:k("hoverlabel.bordercolor"),fontFamily:k("hoverlabel.font.family"),fontSize:k("hoverlabel.font.size"),fontColor:k("hoverlabel.font.color"),fontWeight:k("hoverlabel.font.weight"),fontStyle:k("hoverlabel.font.style"),fontVariant:k("hoverlabel.font.variant"),nameLength:k("hoverlabel.namelength"),textAlign:k("hoverlabel.align"),hovertemplate:A,hovertemplateLabels:I,eventData:h};g&&(F.x0=E-n.rInscribed*n.rpx1,F.x1=E+n.rInscribed*n.rpx1,F.idealAlign=n.pxmid[0]<0?"left":"right"),y&&(F.x=E,F.idealAlign=E<0?"left":"right");var B=[];a.loneHover(F,{container:s._hoverlayer.node(),outerContainer:s._paper.node(),gd:i,inOut_bbox:B}),h[0].bbox=B[0],d._hasHoverLabel=!0}if(y){var j=e.select("path.surface");f.styleOne(j,n,v,i,{hovered:!0})}d._hasHoverEvent=!0,i.emit("plotly_hover",{points:h||[u(n,v,f.eventDataKeys)],event:r.event})}})),e.on("mouseout",(function(t){var n=i._fullLayout,o=i._fullData[d.index],s=r.select(this).datum();if(d._hasHoverEvent&&(t.originalEvent=r.event,i.emit("plotly_unhover",{points:[u(s,o,f.eventDataKeys)],event:r.event}),d._hasHoverEvent=!1),d._hasHoverLabel&&(a.loneUnhover(n._hoverlayer.node()),d._hasHoverLabel=!1),y){var l=e.select("path.surface");f.styleOne(l,s,o,i,{hovered:!1})}})),e.on("click",(function(e){var t=i._fullLayout,o=i._fullData[d.index],c=g&&(l.isHierarchyRoot(e)||l.isLeaf(e)),h=l.getPtId(e),p=l.isEntry(e)?l.findEntryWithChild(m,h):l.findEntryWithLevel(m,h),y=l.getPtId(p),v={points:[u(e,o,f.eventDataKeys)],event:r.event};c||(v.nextLevel=y);var x=s.triggerHandler(i,"plotly_"+d.type+"click",v);if(!1!==x&&t.hovermode&&(i._hoverdata=[u(e,o,f.eventDataKeys)],a.click(i,r.event)),!c&&!1!==x&&!i._dragging&&!i._transitioning){n.call("_storeDirectGUIEdit",o,t._tracePreGUI[o.uid],{level:o.level});var _={data:[{level:y}],traces:[d.index]},b={frame:{redraw:!1,duration:f.transitionTime},transition:{duration:f.transitionTime,easing:f.transitionEasing},mode:"immediate",fromcurrent:!0};a.loneUnhover(t._hoverlayer.node()),n.call("animate",i,_,b)}}))}}}),od=m({"src/traces/sunburst/plot.js"(e){var t=b(),r=ph(),n=(td(),v(ed)).interpolate,i=er(),a=ct(),o=Et(),s=Qa(),l=s.recordMinTextSize,c=s.clearMinTextSize,u=rh(),h=wr().getRotationAngle,f=u.computeTransform,p=u.transformInsideText,d=nd().styleOne,m=to().resizeText,g=ad(),y=lh(),x=id();function _(s,c,u,m){var v=s._context.staticPlot,_=s._fullLayout,b=!_.uniformtext.mode&&x.hasTransition(m),T=t.select(u).selectAll("g.slice"),k=c[0],A=k.trace,M=k.hierarchy,S=x.findEntryWithLevel(M,A.level),E=x.getMaxDepth(A),C=_._size,I=A.domain,L=C.w*(I.x[1]-I.x[0]),P=C.h*(I.y[1]-I.y[0]),z=.5*Math.min(L,P),D=k.cx=C.l+C.w*(I.x[1]+I.x[0])/2,O=k.cy=C.t+C.h*(1-I.y[0])-P/2;if(!S)return T.remove();var R=null,F={};b&&T.each((function(e){F[x.getPtId(e)]={rpx0:e.rpx0,rpx1:e.rpx1,x0:e.x0,x1:e.x1,transform:e.transform},!R&&x.isEntry(e)&&(R=e)}));var B=function(e){return r.partition().size([2*Math.PI,e.height+1])(e)}(S).descendants(),j=S.height+1,N=0,U=E;k.hasMultipleRoots&&x.isHierarchyRoot(S)&&(B=B.slice(1),j-=1,N=1,U+=1),B=B.filter((function(e){return e.y1<=U}));var V=h(A.rotation);V&&B.forEach((function(e){e.x0+=V,e.x1+=V}));var q=Math.min(j,E),H=function(e){return(e-N)/q*z},G=function(e,t){return[e*Math.cos(t),-e*Math.sin(t)]},W=function(e){return a.pathAnnulus(e.rpx0,e.rpx1,e.x0,e.x1,D,O)},Z=function(e){return D+w(e)[0]*(e.transform.rCenter||0)+(e.transform.x||0)},Y=function(e){return O+w(e)[1]*(e.transform.rCenter||0)+(e.transform.y||0)};(T=T.data(B,x.getPtId)).enter().append("g").classed("slice",!0),b?T.exit().transition().each((function(){var e=t.select(this);e.select("path.surface").transition().attrTween("d",(function(e){var t=function(e){var t,r=x.getPtId(e),i=F[r],a=F[x.getPtId(S)];if(a){var o=(e.x1>a.x1?2*Math.PI:0)+V;t=e.rpx1X?2*Math.PI:0)+V;t={x0:o,x1:o}}else t={rpx0:z,rpx1:z},a.extendFlat(t,J(e));else t={rpx0:0,rpx1:0};else t={x0:V,x1:V};return n(t,i)}(e);return function(e){return W(t(e))}})):h.attr("d",W),u.call(g,S,s,c,{eventDataKeys:y.eventDataKeys,transitionTime:y.CLICK_TRANSITION_TIME,transitionEasing:y.CLICK_TRANSITION_EASING}).call(x.setSliceCursor,s,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:s._transitioning}),h.call(d,r,A,s);var m=a.ensureSingle(u,"g","slicetext"),w=a.ensureSingle(m,"text","",(function(e){e.attr("data-notex",1)})),T=a.ensureUniformFontSize(s,x.determineTextFont(A,r,_.font));w.text(e.formatSliceLabel(r,S,A,c,_)).classed("slicetext",!0).attr("text-anchor","middle").call(i.font,T).call(o.convertToTspans,s);var M=i.bBox(w.node());r.transform=p(M,r,k),r.transform.targetX=Z(r),r.transform.targetY=Y(r);var E=function(e,t){var r=e.transform;return f(r,t),r.fontSize=T.size,l(A.type,r,_),a.getTextTransform(r)};b?w.transition().attrTween("transform",(function(e){var t=function(e){var t,r=F[x.getPtId(e)],i=e.transform;if(r)t=r;else if(t={rpx1:e.rpx1,transform:{textPosAngle:i.textPosAngle,scale:0,rotate:i.rotate,rCenter:i.rCenter,x:i.x,y:i.y}},R)if(e.parent)if(X){var o=e.x1>X?2*Math.PI:0;t.x0=t.x1=o}else a.extendFlat(t,J(e));else t.x0=t.x1=V;else t.x0=t.x1=V;var s=n(t.transform.textPosAngle,e.transform.textPosAngle),c=n(t.rpx1,e.rpx1),u=n(t.x0,e.x0),h=n(t.x1,e.x1),f=n(t.transform.scale,i.scale),p=n(t.transform.rotate,i.rotate),d=0===i.rCenter?3:0===t.transform.rCenter?1/3:1,m=n(t.transform.rCenter,i.rCenter);return function(e){var t=c(e),r=u(e),n=h(e),a=function(e){return m(Math.pow(e,d))}(e),o={pxmid:G(t,(r+n)/2),rpx1:t,transform:{textPosAngle:s(e),rCenter:a,x:i.x,y:i.y}};return l(A.type,i,_),{transform:{targetX:Z(o),targetY:Y(o),scale:f(e),rotate:p(e),rCenter:a}}}}(e);return function(e){return E(t(e),M)}})):w.attr("transform",E(r,M))}))}function w(e){return function(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}(e.rpx1,e.transform.textPosAngle)}e.plot=function(e,r,n,i){var a,o,s=e._fullLayout,l=s._sunburstlayer,u=!n,h=!s.uniformtext.mode&&x.hasTransition(n);c("sunburst",s),(a=l.selectAll("g.trace.sunburst").data(r,(function(e){return e[0].trace.uid}))).enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),a.order(),h?(i&&(o=i()),t.transition().duration(n.duration).ease(n.easing).each("end",(function(){o&&o()})).each("interrupt",(function(){o&&o()})).each((function(){l.selectAll("g.trace").each((function(t){_(e,t,this,n)}))}))):(a.each((function(t){_(e,t,this,n)})),s.uniformtext.mode&&m(e,s._sunburstlayer.selectAll(".trace"),"sunburst")),u&&a.exit().remove()},e.formatSliceLabel=function(e,t,r,n,i){var o=r.texttemplate,s=r.textinfo;if(!(o||s&&"none"!==s))return"";var l=i.separators,c=n[0],u=e.data.data,h=c.hierarchy,f=x.isHierarchyRoot(e),p=x.getParent(h,e),d=x.getValue(e);if(!o){var m,g=s.split("+"),y=function(e){return-1!==g.indexOf(e)},v=[];if(y("label")&&u.label&&v.push(u.label),u.hasOwnProperty("v")&&y("value")&&v.push(x.formatValue(u.v,l)),!f){y("current path")&&v.push(x.getPath(e.data));var _=0;y("percent parent")&&_++,y("percent entry")&&_++,y("percent root")&&_++;var b=_>1;if(_){var w,T=function(e){m=x.formatPercent(w,l),b&&(m+=" of "+e),v.push(m)};y("percent parent")&&!f&&(w=d/x.getValue(p),T("parent")),y("percent entry")&&(w=d/x.getValue(t),T("entry")),y("percent root")&&(w=d/x.getValue(h),T("root"))}}return y("text")&&(m=a.castOption(r,u.i,"text"),a.isValidTextValue(m)&&v.push(m)),v.join("
")}var k=a.castOption(r,u.i,"texttemplate");if(!k)return"";var A={};u.label&&(A.label=u.label),u.hasOwnProperty("v")&&(A.value=u.v,A.valueLabel=x.formatValue(u.v,l)),A.currentPath=x.getPath(e.data),f||(A.percentParent=d/x.getValue(p),A.percentParentLabel=x.formatPercent(A.percentParent,l),A.parent=x.getPtLabel(p)),A.percentEntry=d/x.getValue(t),A.percentEntryLabel=x.formatPercent(A.percentEntry,l),A.entry=x.getPtLabel(t),A.percentRoot=d/x.getValue(h),A.percentRootLabel=x.formatPercent(A.percentRoot,l),A.root=x.getPtLabel(h),u.hasOwnProperty("color")&&(A.color=u.color);var M=a.castOption(r,u.i,"text");return(a.isValidTextValue(M)||""===M)&&(A.text=M),A.customdata=a.castOption(r,u.i,"customdata"),a.texttemplateString({data:[A,r._meta],fallback:r.texttemplatefallback,labels:A,locale:i._d3locale,template:k})}}}),sd=m({"src/traces/sunburst/index.js"(e,t){t.exports={moduleType:"trace",name:"sunburst",basePlotModule:sh(),categories:[],animatable:!0,attributes:ch(),layoutAttributes:uh(),supplyDefaults:hh(),supplyLayoutDefaults:fh(),calc:dh().calc,crossTraceCalc:dh().crossTraceCalc,plot:od().plot,style:nd().style,colorbar:mi(),meta:{}}}}),ld=m({"lib/sunburst.js"(e,t){t.exports=sd()}}),cd=m({"src/traces/treemap/base_plot.js"(e){var t=At();e.name="treemap",e.plot=function(r,n,i,a){t.plotBasePlot(e.name,r,n,i,a)},e.clean=function(r,n,i,a){t.cleanBasePlot(e.name,r,n,i,a)}}}),ud=m({"src/traces/treemap/constants.js"(e,t){t.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}}}),hd=m({"src/traces/treemap/attributes.js"(e,t){var{hovertemplateAttrs:r,texttemplateAttrs:n,templatefallbackAttrs:i}=Fe(),a=zt(),o=Ma().attributes,s=$u(),l=ch(),c=ud(),u=B().extendFlat,h=Oe().pattern;t.exports={labels:l.labels,parents:l.parents,values:l.values,branchvalues:l.branchvalues,count:l.count,level:l.level,maxdepth:l.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:u({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:l.marker.colors,pattern:h,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:l.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},a("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:u({},s.textfont,{}),editType:"calc"},text:s.text,textinfo:l.textinfo,texttemplate:n({editType:"plot"},{keys:c.eventDataKeys.concat(["label","value"])}),texttemplatefallback:i({editType:"plot"}),hovertext:s.hovertext,hoverinfo:l.hoverinfo,hovertemplate:r({},{keys:c.eventDataKeys}),hovertemplatefallback:i(),textfont:s.textfont,insidetextfont:s.insidetextfont,outsidetextfont:u({},s.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:s.sort,root:l.root,domain:o({name:"treemap",trace:!0,editType:"calc"})}}}),fd=m({"src/traces/treemap/layout_attributes.js"(e,t){t.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),pd=m({"src/traces/treemap/defaults.js"(e,t){var r=ct(),n=hd(),i=W(),a=Ma().defaults,o=Xa().handleText,s=ci().TEXTPAD,l=Ku().handleMarkerDefaults,c=Yt(),u=c.hasColorscale,h=c.handleDefaults;t.exports=function(e,t,c,f){function p(i,a){return r.coerce(e,t,n,i,a)}var d=p("labels"),m=p("parents");if(d&&d.length&&m&&m.length){var g=p("values");g&&g.length?p("branchvalues"):p("count"),p("level"),p("maxdepth"),"squarify"===p("tiling.packing")&&p("tiling.squarifyratio"),p("tiling.flip"),p("tiling.pad");var y=p("text");p("texttemplate"),p("texttemplatefallback"),t.texttemplate||p("textinfo",r.isArrayOrTypedArray(y)?"text+label":"label"),p("hovertext"),p("hovertemplate"),p("hovertemplatefallback");var v=p("pathbar.visible");o(e,t,f,p,"auto",{hasPathbar:v,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),p("textposition");var x=-1!==t.textposition.indexOf("bottom");l(e,t,f,p),(t._hasColorscale=u(e,"marker","colors")||(e.marker||{}).coloraxis)?h(e,t,f,p,{prefix:"marker.",cLetter:"c"}):p("marker.depthfade",!(t.marker.colors||[]).length);var _=2*t.textfont.size;p("marker.pad.t",x?_/4:_),p("marker.pad.l",_/4),p("marker.pad.r",_/4),p("marker.pad.b",x?_:_/4),p("marker.cornerradius"),t._hovered={marker:{line:{width:2,color:i.contrast(f.paper_bgcolor)}}},v&&(p("pathbar.thickness",t.pathbar.textfont.size+2*s),p("pathbar.side"),p("pathbar.edgeshape")),p("sort"),p("root.color"),a(t,f,p),t._length=null}else t.visible=!1}}}),dd=m({"src/traces/treemap/layout_defaults.js"(e,t){var r=ct(),n=fd();t.exports=function(e,t){function i(i,a){return r.coerce(e,t,n,i,a)}i("treemapcolorway",t.colorway),i("extendtreemapcolors")}}}),md=m({"src/traces/treemap/calc.js"(e){var t=dh();e.calc=function(e,r){return t.calc(e,r)},e.crossTraceCalc=function(e){return t._runCrossTraceCalc("treemap",e)}}}),gd=m({"src/traces/treemap/flip_tree.js"(e,t){t.exports=function e(t,r,n){var i;n.swapXY&&(i=t.x0,t.x0=t.y0,t.y0=i,i=t.x1,t.x1=t.y1,t.y1=i),n.flipX&&(i=t.x0,t.x0=r[0]-t.x1,t.x1=r[0]-i),n.flipY&&(i=t.y0,t.y0=r[1]-t.y1,t.y1=r[1]-i);var a=t.children;if(a)for(var o=0;o0)for(var b=0;b").join(" ")||"";var m=n.ensureSingle(p,"g","slicetext"),k=n.ensureSingle(m,"text","",(function(e){e.attr("data-notex",1)})),I=n.ensureUniformFontSize(e,c.determineTextFont(L,o,C.font,{onPathbar:!0}));k.text(o._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(i.font,I).call(a.convertToTspans,e),o.textBB=i.bBox(k.node()),o.transform=b(o,{fontSize:I.size,onPathbar:!0}),o.transform.fontSize=I.size,T?k.transition().attrTween("transform",(function(e){var t=M(e,h,S,[g,y]);return function(e){return w(t(e))}})):k.attr("transform",w(o))}))}}}),_d=m({"src/traces/treemap/plot_one.js"(e,t){var r=b(),n=(td(),v(ed)).interpolate,i=id(),a=ct(),o=ci().TEXTPAD,s=ro().toMoveInsideBar,l=Qa().recordMinTextSize,c=ud(),u=xd();function h(e){return i.isHierarchyRoot(e)?"":i.getPtId(e)}t.exports=function(e,t,f,p,d){var m=e._fullLayout,g=t[0],y=g.trace,v="icicle"===y.type,x=g.hierarchy,_=i.findEntryWithLevel(x,y.level),b=r.select(f),w=b.selectAll("g.pathbar"),T=b.selectAll("g.slice");if(!_)return w.remove(),void T.remove();var k=i.isHierarchyRoot(_),A=!m.uniformtext.mode&&i.hasTransition(p),M=i.getMaxDepth(y),S=m._size,E=y.domain,C=S.w*(E.x[1]-E.x[0]),I=S.h*(E.y[1]-E.y[0]),L=C,P=y.pathbar.thickness,z=y.marker.line.width+c.gapWithPathbar,D=y.pathbar.visible?y.pathbar.side.indexOf("bottom")>-1?I+z:-(P+z):0,O={x0:L,x1:L,y0:D,y1:D+P},R=function(e,t,r){var n=y.tiling.pad,i=function(e){return e-n<=t.x0},a=function(e){return e+n>=t.x1},o=function(e){return e-n<=t.y0},s=function(e){return e+n>=t.y1};return e.x0===t.x0&&e.x1===t.x1&&e.y0===t.y0&&e.y1===t.y1?{x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1}:{x0:i(e.x0-n)?0:a(e.x0-n)?r[0]:e.x0,x1:i(e.x1+n)?0:a(e.x1+n)?r[0]:e.x1,y0:o(e.y0-n)?0:s(e.y0-n)?r[1]:e.y0,y1:o(e.y1+n)?0:s(e.y1+n)?r[1]:e.y1}},F=null,B={},j={},N=null,U=function(e,t){return t?B[h(e)]:j[h(e)]};g.hasMultipleRoots&&k&&M++,y._maxDepth=M,y._backgroundColor=m.paper_bgcolor,y._entryDepth=_.data.depth,y._atRootLevel=k;var V=-C/2+S.l+S.w*(E.x[1]+E.x[0])/2,q=-I/2+S.t+S.h*(1-(E.y[1]+E.y[0])/2),H=function(e){return V+e},G=function(e){return q+e},W=G(0),Z=H(0),Y=function(e){return Z+e},X=function(e){return W+e};function $(e,t){return e+","+t}var K=Y(0),J=function(e){e.x=Math.max(K,e.x)},Q=y.pathbar.edgeshape,ee=y[v?"tiling":"marker"].pad,te=function(e){return-1!==y.textposition.indexOf(e)},re=te("top"),ne=te("left"),ie=te("right"),ae=te("bottom"),oe=function(e,t){var r=e.x0,n=e.x1,i=e.y0,a=e.y1,c=e.textBB,u=re||t.isHeader&&!ae?"start":ae?"end":"middle",h=te("right"),f=te("left")||t.onPathbar?-1:h?1:0;if(t.isHeader){if((r+=(v?ee:ee.l)-o)>=(n-=(v?ee:ee.r)-o)){var p=(r+n)/2;r=p,n=p}var d;ae?i<(d=a-(v?ee:ee.b))&&d"===Q?(l.x-=a,c.x-=a,u.x-=a,h.x-=a):"/"===Q?(u.x-=a,h.x-=a,o.x-=a/2,s.x-=a/2):"\\"===Q?(l.x-=a,c.x-=a,o.x-=a/2,s.x-=a/2):"<"===Q&&(o.x-=a,s.x-=a),J(l),J(h),J(o),J(c),J(u),J(s),"M"+$(l.x,l.y)+"L"+$(c.x,c.y)+"L"+$(s.x,s.y)+"L"+$(u.x,u.y)+"L"+$(h.x,h.y)+"L"+$(o.x,o.y)+"Z"},toMoveInsideSlice:oe,makeUpdateSliceInterpolator:le,makeUpdateTextInterpolator:ce,handleSlicesExit:ue,hasTransition:A,strTransform:he}):w.remove()}}}),bd=m({"src/traces/treemap/draw.js"(e,t){var r=b(),n=id(),i=Qa().clearMinTextSize,a=to().resizeText,o=_d();t.exports=function(e,t,s,l,c){var u,h,f=c.type,p=c.drawDescendants,d=e._fullLayout,m=d["_"+f+"layer"],g=!s;i(f,d),(u=m.selectAll("g.trace."+f).data(t,(function(e){return e[0].trace.uid}))).enter().append("g").classed("trace",!0).classed(f,!0),u.order(),!d.uniformtext.mode&&n.hasTransition(s)?(l&&(h=l()),r.transition().duration(s.duration).ease(s.easing).each("end",(function(){h&&h()})).each("interrupt",(function(){h&&h()})).each((function(){m.selectAll("g.trace").each((function(t){o(e,t,this,s,p)}))}))):(u.each((function(t){o(e,t,this,s,p)})),d.uniformtext.mode&&a(e,m.selectAll(".trace"),f)),g&&u.exit().remove()}}}),wd=m({"src/traces/treemap/draw_descendants.js"(e,t){var r=b(),n=ct(),i=er(),a=Et(),o=yd(),s=vd().styleOne,l=ud(),c=id(),u=ad(),h=od().formatSliceLabel,f=!1;t.exports=function(e,t,p,d,m){var g=m.width,y=m.height,v=m.viewX,x=m.viewY,_=m.pathSlice,b=m.toMoveInsideSlice,w=m.strTransform,T=m.hasTransition,k=m.handleSlicesExit,A=m.makeUpdateSliceInterpolator,M=m.makeUpdateTextInterpolator,S=m.prevEntry,E=e._context.staticPlot,C=e._fullLayout,I=t[0].trace,L=-1!==I.textposition.indexOf("left"),P=-1!==I.textposition.indexOf("right"),z=-1!==I.textposition.indexOf("bottom"),D=!z&&!I.marker.pad.t||z&&!I.marker.pad.b,O=o(p,[g,y],{packing:I.tiling.packing,squarifyratio:I.tiling.squarifyratio,flipX:I.tiling.flip.indexOf("x")>-1,flipY:I.tiling.flip.indexOf("y")>-1,pad:{inner:I.tiling.pad,top:I.marker.pad.t,left:I.marker.pad.l,right:I.marker.pad.r,bottom:I.marker.pad.b}}).descendants(),R=1/0,F=-1/0;O.forEach((function(e){var t=e.depth;t>=I._maxDepth?(e.x0=e.x1=(e.x0+e.x1)/2,e.y0=e.y1=(e.y0+e.y1)/2):(R=Math.min(R,t),F=Math.max(F,t))})),d=d.data(O,c.getPtId),I._maxVisibleLayers=isFinite(F)?F-R+1:0,d.enter().append("g").classed("slice",!0),k(d,f,{},[g,y],_),d.order();var B=null;if(T&&S){var j=c.getPtId(S);d.each((function(e){null===B&&c.getPtId(e)===j&&(B={x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1})}))}var N=function(){return B||{x0:0,x1:g,y0:0,y1:y}},U=d;return T&&(U=U.transition().each("end",(function(){var t=r.select(this);c.setSliceCursor(t,e,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),U.each((function(o){var d=c.isHeader(o,I);o._x0=v(o.x0),o._x1=v(o.x1),o._y0=x(o.y0),o._y1=x(o.y1),o._hoverX=v(o.x1-I.marker.pad.r),o._hoverY=x(z?o.y1-I.marker.pad.b/2:o.y0+I.marker.pad.t/2);var m=r.select(this),k=n.ensureSingle(m,"path","surface",(function(e){e.style("pointer-events",E?"none":"all")}));T?k.transition().attrTween("d",(function(e){var t=A(e,f,N(),[g,y]);return function(e){return _(t(e))}})):k.attr("d",_),m.call(u,p,e,t,{styleOne:s,eventDataKeys:l.eventDataKeys,transitionTime:l.CLICK_TRANSITION_TIME,transitionEasing:l.CLICK_TRANSITION_EASING}).call(c.setSliceCursor,e,{isTransitioning:e._transitioning}),k.call(s,o,I,e,{hovered:!1}),o.x0===o.x1||o.y0===o.y1?o._text="":o._text=d?D?"":c.getPtLabel(o)||"":h(o,p,I,t,C)||"";var S=n.ensureSingle(m,"g","slicetext"),O=n.ensureSingle(S,"text","",(function(e){e.attr("data-notex",1)})),R=n.ensureUniformFontSize(e,c.determineTextFont(I,o,C.font)),F=o._text||" ",B=d&&-1===F.indexOf("
");O.text(F).classed("slicetext",!0).attr("text-anchor",P?"end":L||B?"start":"middle").call(i.font,R).call(a.convertToTspans,e),o.textBB=i.bBox(O.node()),o.transform=b(o,{fontSize:R.size,isHeader:d}),o.transform.fontSize=R.size,T?O.transition().attrTween("transform",(function(e){var t=M(e,f,N(),[g,y]);return function(e){return w(t(e))}})):O.attr("transform",w(o))})),B}}}),Td=m({"src/traces/treemap/plot.js"(e,t){var r=bd(),n=wd();t.exports=function(e,t,i,a){return r(e,t,i,a,{type:"treemap",drawDescendants:n})}}}),kd=m({"src/traces/treemap/index.js"(e,t){t.exports={moduleType:"trace",name:"treemap",basePlotModule:cd(),categories:[],animatable:!0,attributes:hd(),layoutAttributes:fd(),supplyDefaults:pd(),supplyLayoutDefaults:dd(),calc:md().calc,crossTraceCalc:md().crossTraceCalc,plot:Td(),style:vd().style,colorbar:mi(),meta:{}}}}),Ad=m({"lib/treemap.js"(e,t){t.exports=kd()}}),Md=m({"src/traces/icicle/base_plot.js"(e){var t=At();e.name="icicle",e.plot=function(r,n,i,a){t.plotBasePlot(e.name,r,n,i,a)},e.clean=function(r,n,i,a){t.cleanBasePlot(e.name,r,n,i,a)}}}),Sd=m({"src/traces/icicle/attributes.js"(e,t){var{hovertemplateAttrs:r,texttemplateAttrs:n,templatefallbackAttrs:i}=Fe(),a=zt(),o=Ma().attributes,s=$u(),l=ch(),c=hd(),u=ud(),h=B().extendFlat,f=Oe().pattern;t.exports={labels:l.labels,parents:l.parents,values:l.values,branchvalues:l.branchvalues,count:l.count,level:l.level,maxdepth:l.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:c.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:h({colors:l.marker.colors,line:l.marker.line,pattern:f,editType:"calc"},a("marker",{colorAttr:"colors",anim:!1})),leaf:l.leaf,pathbar:c.pathbar,text:s.text,textinfo:l.textinfo,texttemplate:n({editType:"plot"},{keys:u.eventDataKeys.concat(["label","value"])}),texttemplatefallback:i({editType:"plot"}),hovertext:s.hovertext,hoverinfo:l.hoverinfo,hovertemplate:r({},{keys:u.eventDataKeys}),hovertemplatefallback:i(),textfont:s.textfont,insidetextfont:s.insidetextfont,outsidetextfont:c.outsidetextfont,textposition:c.textposition,sort:s.sort,root:l.root,domain:o({name:"icicle",trace:!0,editType:"calc"})}}}),Ed=m({"src/traces/icicle/layout_attributes.js"(e,t){t.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),Cd=m({"src/traces/icicle/defaults.js"(e,t){var r=ct(),n=Sd(),i=W(),a=Ma().defaults,o=Xa().handleText,s=ci().TEXTPAD,l=Ku().handleMarkerDefaults,c=Yt(),u=c.hasColorscale,h=c.handleDefaults;t.exports=function(e,t,c,f){function p(i,a){return r.coerce(e,t,n,i,a)}var d=p("labels"),m=p("parents");if(d&&d.length&&m&&m.length){var g=p("values");g&&g.length?p("branchvalues"):p("count"),p("level"),p("maxdepth"),p("tiling.orientation"),p("tiling.flip"),p("tiling.pad");var y=p("text");p("texttemplate"),p("texttemplatefallback"),t.texttemplate||p("textinfo",r.isArrayOrTypedArray(y)?"text+label":"label"),p("hovertext"),p("hovertemplate"),p("hovertemplatefallback");var v=p("pathbar.visible");o(e,t,f,p,"auto",{hasPathbar:v,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),p("textposition"),l(e,t,f,p);var x=t._hasColorscale=u(e,"marker","colors")||(e.marker||{}).coloraxis;x&&h(e,t,f,p,{prefix:"marker.",cLetter:"c"}),p("leaf.opacity",x?1:.7),t._hovered={marker:{line:{width:2,color:i.contrast(f.paper_bgcolor)}}},v&&(p("pathbar.thickness",t.pathbar.textfont.size+2*s),p("pathbar.side"),p("pathbar.edgeshape")),p("sort"),p("root.color"),a(t,f,p),t._length=null}else t.visible=!1}}}),Id=m({"src/traces/icicle/layout_defaults.js"(e,t){var r=ct(),n=Ed();t.exports=function(e,t){function i(i,a){return r.coerce(e,t,n,i,a)}i("iciclecolorway",t.colorway),i("extendiciclecolors")}}}),Ld=m({"src/traces/icicle/calc.js"(e){var t=dh();e.calc=function(e,r){return t.calc(e,r)},e.crossTraceCalc=function(e){return t._runCrossTraceCalc("icicle",e)}}}),Pd=m({"src/traces/icicle/partition.js"(e,t){var r=ph(),n=gd();t.exports=function(e,t,i){var a=i.flipX,o=i.flipY,s="h"===i.orientation,l=i.maxDepth,c=t[0],u=t[1];l&&(c=(e.height+1)*t[0]/Math.min(e.height+1,l),u=(e.height+1)*t[1]/Math.min(e.height+1,l));var h=r.partition().padding(i.pad.inner).size(s?[t[1],c]:[t[0],u])(e);return(s||a||o)&&n(h,t,{swapXY:s,flipX:a,flipY:o}),h}}}),zd=m({"src/traces/icicle/style.js"(e,t){var r=b(),n=W(),i=ct(),a=Qa().resizeText,o=rd();function s(e,t,r,a){var s=t.data.data,l=!t.children,c=s.i,u=i.castOption(r,c,"marker.line.color")||n.defaultLine,h=i.castOption(r,c,"marker.line.width")||0;e.call(o,t,r,a).style("stroke-width",h).call(n.stroke,u).style("opacity",l?r.leaf.opacity:null)}t.exports={style:function(e){var t=e._fullLayout._iciclelayer.selectAll(".trace");a(e,t,"icicle"),t.each((function(t){var n=r.select(this),i=t[0].trace;n.style("opacity",i.opacity),n.selectAll("path.surface").each((function(t){r.select(this).call(s,t,i,e)}))}))},styleOne:s}}}),Dd=m({"src/traces/icicle/draw_descendants.js"(e,t){var r=b(),n=ct(),i=er(),a=Et(),o=Pd(),s=zd().styleOne,l=ud(),c=id(),u=ad(),h=od().formatSliceLabel,f=!1;t.exports=function(e,t,p,d,m){var g=m.width,y=m.height,v=m.viewX,x=m.viewY,_=m.pathSlice,b=m.toMoveInsideSlice,w=m.strTransform,T=m.hasTransition,k=m.handleSlicesExit,A=m.makeUpdateSliceInterpolator,M=m.makeUpdateTextInterpolator,S=m.prevEntry,E=e._context.staticPlot,C=e._fullLayout,I=t[0].trace,L=-1!==I.textposition.indexOf("left"),P=-1!==I.textposition.indexOf("right"),z=-1!==I.textposition.indexOf("bottom"),D=o(p,[g,y],{flipX:I.tiling.flip.indexOf("x")>-1,flipY:I.tiling.flip.indexOf("y")>-1,orientation:I.tiling.orientation,pad:{inner:I.tiling.pad},maxDepth:I._maxDepth}).descendants(),O=1/0,R=-1/0;D.forEach((function(e){var t=e.depth;t>=I._maxDepth?(e.x0=e.x1=(e.x0+e.x1)/2,e.y0=e.y1=(e.y0+e.y1)/2):(O=Math.min(O,t),R=Math.max(R,t))})),d=d.data(D,c.getPtId),I._maxVisibleLayers=isFinite(R)?R-O+1:0,d.enter().append("g").classed("slice",!0),k(d,f,{},[g,y],_),d.order();var F=null;if(T&&S){var B=c.getPtId(S);d.each((function(e){null===F&&c.getPtId(e)===B&&(F={x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1})}))}var j=function(){return F||{x0:0,x1:g,y0:0,y1:y}},N=d;return T&&(N=N.transition().each("end",(function(){var t=r.select(this);c.setSliceCursor(t,e,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),N.each((function(o){o._x0=v(o.x0),o._x1=v(o.x1),o._y0=x(o.y0),o._y1=x(o.y1),o._hoverX=v(o.x1-I.tiling.pad),o._hoverY=x(z?o.y1-I.tiling.pad/2:o.y0+I.tiling.pad/2);var d=r.select(this),m=n.ensureSingle(d,"path","surface",(function(e){e.style("pointer-events",E?"none":"all")}));T?m.transition().attrTween("d",(function(e){var t=A(e,f,j(),[g,y],{orientation:I.tiling.orientation,flipX:I.tiling.flip.indexOf("x")>-1,flipY:I.tiling.flip.indexOf("y")>-1});return function(e){return _(t(e))}})):m.attr("d",_),d.call(u,p,e,t,{styleOne:s,eventDataKeys:l.eventDataKeys,transitionTime:l.CLICK_TRANSITION_TIME,transitionEasing:l.CLICK_TRANSITION_EASING}).call(c.setSliceCursor,e,{isTransitioning:e._transitioning}),m.call(s,o,I,e,{hovered:!1}),o.x0===o.x1||o.y0===o.y1?o._text="":o._text=h(o,p,I,t,C)||"";var k=n.ensureSingle(d,"g","slicetext"),S=n.ensureSingle(k,"text","",(function(e){e.attr("data-notex",1)})),D=n.ensureUniformFontSize(e,c.determineTextFont(I,o,C.font));S.text(o._text||" ").classed("slicetext",!0).attr("text-anchor",P?"end":L?"start":"middle").call(i.font,D).call(a.convertToTspans,e),o.textBB=i.bBox(S.node()),o.transform=b(o,{fontSize:D.size}),o.transform.fontSize=D.size,T?S.transition().attrTween("transform",(function(e){var t=M(e,f,j(),[g,y]);return function(e){return w(t(e))}})):S.attr("transform",w(o))})),F}}}),Od=m({"src/traces/icicle/plot.js"(e,t){var r=bd(),n=Dd();t.exports=function(e,t,i,a){return r(e,t,i,a,{type:"icicle",drawDescendants:n})}}}),Rd=m({"src/traces/icicle/index.js"(e,t){t.exports={moduleType:"trace",name:"icicle",basePlotModule:Md(),categories:[],animatable:!0,attributes:Sd(),layoutAttributes:Ed(),supplyDefaults:Cd(),supplyLayoutDefaults:Id(),calc:Ld().calc,crossTraceCalc:Ld().crossTraceCalc,plot:Od(),style:zd().style,colorbar:mi(),meta:{}}}}),Fd=m({"lib/icicle.js"(e,t){t.exports=Rd()}}),Bd=m({"src/traces/funnelarea/base_plot.js"(e){var t=At();e.name="funnelarea",e.plot=function(r,n,i,a){t.plotBasePlot(e.name,r,n,i,a)},e.clean=function(r,n,i,a){t.cleanBasePlot(e.name,r,n,i,a)}}}),jd=m({"src/traces/funnelarea/attributes.js"(e,t){var r=$u(),n=q(),i=Ma().attributes,{hovertemplateAttrs:a,texttemplateAttrs:o,templatefallbackAttrs:s}=Fe(),l=B().extendFlat;t.exports={labels:r.labels,label0:r.label0,dlabel:r.dlabel,values:r.values,marker:{colors:r.marker.colors,line:{color:l({},r.marker.line.color,{dflt:null}),width:l({},r.marker.line.width,{dflt:1}),editType:"calc"},pattern:r.marker.pattern,editType:"calc"},text:r.text,hovertext:r.hovertext,scalegroup:l({},r.scalegroup,{}),textinfo:l({},r.textinfo,{flags:["label","text","value","percent"]}),texttemplate:o({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:s({editType:"plot"}),hoverinfo:l({},n.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:a({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:s(),textposition:l({},r.textposition,{values:["inside","none"],dflt:"inside"}),textfont:r.textfont,insidetextfont:r.insidetextfont,title:{text:r.title.text,font:r.title.font,position:l({},r.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:i({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot"},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot"}}}}),Nd=m({"src/traces/funnelarea/layout_attributes.js"(e,t){var r=Ju().hiddenlabels;t.exports={hiddenlabels:r,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),Ud=m({"src/traces/funnelarea/defaults.js"(e,t){var r=ct(),n=jd(),i=Ma().defaults,a=Xa().handleText,o=Ku().handleLabelsAndValues,s=Ku().handleMarkerDefaults;t.exports=function(e,t,l,c){function u(i,a){return r.coerce(e,t,n,i,a)}var h=u("labels"),f=u("values"),p=o(h,f),d=p.len;if(t._hasLabels=p.hasLabels,t._hasValues=p.hasValues,!t._hasLabels&&t._hasValues&&(u("label0"),u("dlabel")),d){t._length=d,s(e,t,c,u),u("scalegroup");var m,g=u("text"),y=u("texttemplate");if(u("texttemplatefallback"),y||(m=u("textinfo",Array.isArray(g)?"text+percent":"percent")),u("hovertext"),u("hovertemplate"),u("hovertemplatefallback"),y||m&&"none"!==m){var v=u("textposition");a(e,t,c,u,v,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else"none"===m&&u("textposition","none");i(t,c,u),u("title.text")&&(u("title.position"),r.coerceFont(u,"title.font",c.font)),u("aspectratio"),u("baseratio")}else t.visible=!1}}}),Vd=m({"src/traces/funnelarea/layout_defaults.js"(e,t){var r=ct(),n=Nd();t.exports=function(e,t){function i(i,a){return r.coerce(e,t,n,i,a)}i("hiddenlabels"),i("funnelareacolorway",t.colorway),i("extendfunnelareacolors")}}}),qd=m({"src/traces/funnelarea/calc.js"(e,t){var r=eh();t.exports={calc:function(e,t){return r.calc(e,t)},crossTraceCalc:function(e){r.crossTraceCalc(e,{type:"funnelarea"})}}}}),Hd=m({"src/traces/funnelarea/plot.js"(e,t){var r=b(),n=er(),i=ct(),a=i.strScale,o=i.strTranslate,s=Et(),l=ro().toMoveInsideBar,c=Qa(),u=c.recordMinTextSize,h=c.clearMinTextSize,f=wr(),p=rh(),d=p.attachFxHandlers,m=p.determineInsideTextFont,g=p.layoutAreas,y=p.prerenderTitles,v=p.positionTitleOutside,x=p.formatSliceLabel;function _(e,t){return"l"+(t[0]-e[0])+","+(t[1]-e[1])}function w(e,t){return[.5*(e[0]+t[0]),.5*(e[1]+t[1])]}t.exports=function(e,t){var c=e._context.staticPlot,p=e._fullLayout;h("funnelarea",p),y(t,e),g(t,p._size),i.makeTraceGroups(p._funnelarealayer,t,"trace").each((function(t){var h=r.select(this),g=t[0],y=g.trace;(function(e){if(e.length){var t=e[0],r=t.trace,n=r.aspectratio,i=r.baseratio;i>.999&&(i=.999);var a,o,s,l=Math.pow(i,2),c=t.vTotal,u=c,h=c*l/(1-l)/c,f=[];for(f.push(S()),o=e.length-1;o>-1;o--)if(!(s=e[o]).hidden){var p=s.v/u;h+=p,f.push(S())}var d=1/0,m=-1/0;for(o=0;o-1;o--)if(!(s=e[o]).hidden){var A=f[k+=1][0],M=f[k][1];s.TL=[-A,M],s.TR=[A,M],s.BL=b,s.BR=T,s.pxmid=w(s.TR,s.BR),b=s.TL,T=s.TR}}function S(){var e=function(){var e=Math.sqrt(h);return{x:e,y:-e}}();return[e.x,e.y]}})(t),h.each((function(){var h=r.select(this).selectAll("g.slice").data(t);h.enter().append("g").classed("slice",!0),h.exit().remove(),h.each((function(a,o){if(a.hidden)r.select(this).selectAll("path,g").remove();else{a.pointNumber=a.i,a.curveNumber=y.index;var h=g.cx,v=g.cy,b=r.select(this),w=b.selectAll("path.surface").data([a]);w.enter().append("path").classed("surface",!0).style({"pointer-events":c?"none":"all"}),b.call(d,e,t);var T="M"+(h+a.TR[0])+","+(v+a.TR[1])+_(a.TR,a.BR)+_(a.BR,a.BL)+_(a.BL,a.TL)+"Z";w.attr("d",T),x(e,a,g);var k=f.castOption(y.textposition,a.pts),A=b.selectAll("g.slicetext").data(a.text&&"none"!==k?[0]:[]);A.enter().append("g").classed("slicetext",!0),A.exit().remove(),A.each((function(){var c=i.ensureSingle(r.select(this),"text","",(function(e){e.attr("data-notex",1)})),f=i.ensureUniformFontSize(e,m(y,a,p.font));c.text(a.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(n.font,f).call(s.convertToTspans,e);var d,g,x,_=n.bBox(c.node()),b=Math.min(a.BL[1],a.BR[1])+v,w=Math.max(a.TL[1],a.TR[1])+v;g=Math.max(a.TL[0],a.BL[0])+h,x=Math.min(a.TR[0],a.BR[0])+h,(d=l(g,x,b,w,_,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"})).fontSize=f.size,u(y.type,d,p),t[o].transform=d,i.setTransormAndDisplay(c,d)}))}}));var b=r.select(this).selectAll("g.titletext").data(y.title.text?[0]:[]);b.enter().append("g").classed("titletext",!0),b.exit().remove(),b.each((function(){var t=i.ensureSingle(r.select(this),"text","",(function(e){e.attr("data-notex",1)})),l=y.title.text;y._meta&&(l=i.templateString(l,y._meta)),t.text(l).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(n.font,y.title.font).call(s.convertToTspans,e);var c=v(g,p._size);t.attr("transform",o(c.x,c.y)+a(Math.min(1,c.scale))+o(c.tx,c.ty))}))}))}))}}}),Gd=m({"src/traces/funnelarea/style.js"(e,t){var r=b(),n=kr(),i=Qa().resizeText;t.exports=function(e){var t=e._fullLayout._funnelarealayer.selectAll(".trace");i(e,t,"funnelarea"),t.each((function(t){var i=t[0].trace,a=r.select(this);a.style({opacity:i.opacity}),a.selectAll("path.surface").each((function(t){r.select(this).call(n,t,i,e)}))}))}}}),Wd=m({"src/traces/funnelarea/index.js"(e,t){t.exports={moduleType:"trace",name:"funnelarea",basePlotModule:Bd(),categories:["pie-like","funnelarea","showLegend"],attributes:jd(),layoutAttributes:Nd(),supplyDefaults:Ud(),supplyLayoutDefaults:Vd(),calc:qd().calc,crossTraceCalc:qd().crossTraceCalc,plot:Hd(),style:Gd(),styleOne:kr(),meta:{}}}}),Zd=m({"lib/funnelarea.js"(e,t){t.exports=Wd()}}),Yd=m({"stackgl_modules/index.js"(e,t){!function(){var e={24:function(e){var t={left:0,top:0};e.exports=function(e,r,n){r=r||e.currentTarget||e.srcElement,Array.isArray(n)||(n=[0,0]);var i=e.clientX||0,a=e.clientY||0,o=function(e){return e===window||e===document||e===document.body?t:e.getBoundingClientRect()}(r);return n[0]=i-o.left,n[1]=a-o.top,n}},109:function(e){e.exports=function(e,t,r,n){var i=r[0],a=r[2],o=t[0]-i,s=t[2]-a,l=Math.sin(n),c=Math.cos(n);return e[0]=i+s*l+o*c,e[1]=t[1],e[2]=a+s*c-o*l,e}},160:function(e){e.exports=function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}},216:function(e){e.exports=function(e,t){for(var r={},n=0;n1){s[0]in a||(a[s[0]]=[]),a=a[s[0]];for(var l=1;lt[2]?1:0)}function y(e,t,r){if(0!==e.length){if(t)for(var n=0;n=0;--a){var x=t[u=(S=n[a])[0]],_=x[0],b=x[1],w=e[_],T=e[b];if((w[0]-T[0]||w[1]-T[1])<0){var k=_;_=b,b=k}x[0]=_;var A,M=x[1]=S[1];for(i&&(A=x[2]);a>0&&n[a-1][0]===u;){var S,E=(S=n[--a])[1];i?t.push([M,E,A]):t.push([M,E]),M=E}i?t.push([M,b,A]):t.push([M,b])}return f}(e,t,f,m,r),v=d(e,g);return y(t,v,r),!!v||f.length>0||m.length>0}},351:function(e,t,r){e.exports=function(e,t){t||(t=e,e=window);var r=0,i=0,a=0,o={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(e){var t=!1;return"altKey"in e&&(t=t||e.altKey!==o.alt,o.alt=!!e.altKey),"shiftKey"in e&&(t=t||e.shiftKey!==o.shift,o.shift=!!e.shiftKey),"ctrlKey"in e&&(t=t||e.ctrlKey!==o.control,o.control=!!e.ctrlKey),"metaKey"in e&&(t=t||e.metaKey!==o.meta,o.meta=!!e.metaKey),t}function c(e,s){var c=n.x(s),u=n.y(s);"buttons"in s&&(e=0|s.buttons),(e!==r||c!==i||u!==a||l(s))&&(r=0|e,i=c||0,a=u||0,t&&t(r,i,a,o))}function u(e){c(0,e)}function h(){(r||i||a||o.shift||o.alt||o.meta||o.control)&&(i=a=0,r=0,o.shift=o.alt=o.control=o.meta=!1,t&&t(0,0,0,o))}function f(e){l(e)&&t&&t(r,i,a,o)}function p(e){0===n.buttons(e)?c(0,e):c(r,e)}function d(e){c(r|n.buttons(e),e)}function m(e){c(r&~n.buttons(e),e)}function g(){s||(s=!0,e.addEventListener("mousemove",p),e.addEventListener("mousedown",d),e.addEventListener("mouseup",m),e.addEventListener("mouseleave",u),e.addEventListener("mouseenter",u),e.addEventListener("mouseout",u),e.addEventListener("mouseover",u),e.addEventListener("blur",h),e.addEventListener("keyup",f),e.addEventListener("keydown",f),e.addEventListener("keypress",f),e!==window&&(window.addEventListener("blur",h),window.addEventListener("keyup",f),window.addEventListener("keydown",f),window.addEventListener("keypress",f)))}g();var y={element:e};return Object.defineProperties(y,{enabled:{get:function(){return s},set:function(t){t?g():s&&(s=!1,e.removeEventListener("mousemove",p),e.removeEventListener("mousedown",d),e.removeEventListener("mouseup",m),e.removeEventListener("mouseleave",u),e.removeEventListener("mouseenter",u),e.removeEventListener("mouseout",u),e.removeEventListener("mouseover",u),e.removeEventListener("blur",h),e.removeEventListener("keyup",f),e.removeEventListener("keydown",f),e.removeEventListener("keypress",f),e!==window&&(window.removeEventListener("blur",h),window.removeEventListener("keyup",f),window.removeEventListener("keydown",f),window.removeEventListener("keypress",f)))},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return a},enumerable:!0},mods:{get:function(){return o},enumerable:!0}}),y};var n=r(4687)},395:function(e){e.exports=function(e,t,r){return e*(1-r)+t*r}},446:function(e,t,r){var n=r(7640),i={};e.exports=function(e){var t=e.order,r=e.dtype,a=[t,r].join(":"),o=i[a];return o||(i[a]=o=n(t,r)),o(e),e}},483:function(e){e.exports=function(e){var t=e[0],r=e[1],n=e[2],i=e[3];return t*t+r*r+n*n+i*i}},492:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],a=t[2];return e[0]=n*r[0]+i*r[3]+a*r[6],e[1]=n*r[1]+i*r[4]+a*r[7],e[2]=n*r[2]+i*r[5]+a*r[8],e}},501:function(e,t,r){e.exports=function(e,t,r){var o=[],s=[0,0,0],l=[0,0,0],c=[0,0,0],u=[0,0,0];o.push(0,0,1,0,1,1,0,0,-1,0,0,-1,0,1,1,0,1,-1);for(var h=0;h<3;++h){for(var f=o.length/3|0,d=0;d 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec3 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\n\nuniform float vectorScale, coneScale, coneOffset;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 eyePosition, lightPosition;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * conePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(conePosition, 1.0);\n vec4 t_position = view * conePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = conePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),a=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),o=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float vectorScale, coneScale, coneOffset;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n gl_Position = projection * (view * conePosition);\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);t.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},t.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},620:function(e){e.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},665:function(e,t,r){var n=r(3202);e.exports=o;var i=96;function a(e,t){var r=n(getComputedStyle(e).getPropertyValue(t));return r[0]*o(r[1],e)}function o(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":return function(e,t){var r=document.createElement("div");r.style["font-size"]="128"+e,t.appendChild(r);var n=a(r,"font-size")/128;return t.removeChild(r),n}(e,t);case"em":return a(t,"font-size");case"rem":return a(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return i;case"cm":return i/2.54;case"mm":return i/25.4;case"pt":return i/72;case"pc":return i/6}return 1}},727:function(e,t,r){var n=r(2962);function i(e){return(2===e?a:3===e?o:4===e?s:5===e?l:c)(e<6?n[e]:n)}function a(e){return function(t,r){return[e([[+r[0],+t[0][1]],[+r[1],+t[1][1]]]),e([[+t[0][0],+r[0]],[+t[1][0],+r[1]]]),e(t)]}}function o(e){return function(t,r){return[e([[+r[0],+t[0][1],+t[0][2]],[+r[1],+t[1][1],+t[1][2]],[+r[2],+t[2][1],+t[2][2]]]),e([[+t[0][0],+r[0],+t[0][2]],[+t[1][0],+r[1],+t[1][2]],[+t[2][0],+r[2],+t[2][2]]]),e([[+t[0][0],+t[0][1],+r[0]],[+t[1][0],+t[1][1],+r[1]],[+t[2][0],+t[2][1],+r[2]]]),e(t)]}}function s(e){return function(t,r){return[e([[+r[0],+t[0][1],+t[0][2],+t[0][3]],[+r[1],+t[1][1],+t[1][2],+t[1][3]],[+r[2],+t[2][1],+t[2][2],+t[2][3]],[+r[3],+t[3][1],+t[3][2],+t[3][3]]]),e([[+t[0][0],+r[0],+t[0][2],+t[0][3]],[+t[1][0],+r[1],+t[1][2],+t[1][3]],[+t[2][0],+r[2],+t[2][2],+t[2][3]],[+t[3][0],+r[3],+t[3][2],+t[3][3]]]),e([[+t[0][0],+t[0][1],+r[0],+t[0][3]],[+t[1][0],+t[1][1],+r[1],+t[1][3]],[+t[2][0],+t[2][1],+r[2],+t[2][3]],[+t[3][0],+t[3][1],+r[3],+t[3][3]]]),e([[+t[0][0],+t[0][1],+t[0][2],+r[0]],[+t[1][0],+t[1][1],+t[1][2],+r[1]],[+t[2][0],+t[2][1],+t[2][2],+r[2]],[+t[3][0],+t[3][1],+t[3][2],+r[3]]]),e(t)]}}function l(e){return function(t,r){return[e([[+r[0],+t[0][1],+t[0][2],+t[0][3],+t[0][4]],[+r[1],+t[1][1],+t[1][2],+t[1][3],+t[1][4]],[+r[2],+t[2][1],+t[2][2],+t[2][3],+t[2][4]],[+r[3],+t[3][1],+t[3][2],+t[3][3],+t[3][4]],[+r[4],+t[4][1],+t[4][2],+t[4][3],+t[4][4]]]),e([[+t[0][0],+r[0],+t[0][2],+t[0][3],+t[0][4]],[+t[1][0],+r[1],+t[1][2],+t[1][3],+t[1][4]],[+t[2][0],+r[2],+t[2][2],+t[2][3],+t[2][4]],[+t[3][0],+r[3],+t[3][2],+t[3][3],+t[3][4]],[+t[4][0],+r[4],+t[4][2],+t[4][3],+t[4][4]]]),e([[+t[0][0],+t[0][1],+r[0],+t[0][3],+t[0][4]],[+t[1][0],+t[1][1],+r[1],+t[1][3],+t[1][4]],[+t[2][0],+t[2][1],+r[2],+t[2][3],+t[2][4]],[+t[3][0],+t[3][1],+r[3],+t[3][3],+t[3][4]],[+t[4][0],+t[4][1],+r[4],+t[4][3],+t[4][4]]]),e([[+t[0][0],+t[0][1],+t[0][2],+r[0],+t[0][4]],[+t[1][0],+t[1][1],+t[1][2],+r[1],+t[1][4]],[+t[2][0],+t[2][1],+t[2][2],+r[2],+t[2][4]],[+t[3][0],+t[3][1],+t[3][2],+r[3],+t[3][4]],[+t[4][0],+t[4][1],+t[4][2],+r[4],+t[4][4]]]),e([[+t[0][0],+t[0][1],+t[0][2],+t[0][3],+r[0]],[+t[1][0],+t[1][1],+t[1][2],+t[1][3],+r[1]],[+t[2][0],+t[2][1],+t[2][2],+t[2][3],+r[2]],[+t[3][0],+t[3][1],+t[3][2],+t[3][3],+r[3]],[+t[4][0],+t[4][1],+t[4][2],+t[4][3],+r[4]]]),e(t)]}}function c(e){return function(t,r){return[e([[+r[0],+t[0][1],+t[0][2],+t[0][3],+t[0][4],+t[0][5]],[+r[1],+t[1][1],+t[1][2],+t[1][3],+t[1][4],+t[1][5]],[+r[2],+t[2][1],+t[2][2],+t[2][3],+t[2][4],+t[2][5]],[+r[3],+t[3][1],+t[3][2],+t[3][3],+t[3][4],+t[3][5]],[+r[4],+t[4][1],+t[4][2],+t[4][3],+t[4][4],+t[4][5]],[+r[5],+t[5][1],+t[5][2],+t[5][3],+t[5][4],+t[5][5]]]),e([[+t[0][0],+r[0],+t[0][2],+t[0][3],+t[0][4],+t[0][5]],[+t[1][0],+r[1],+t[1][2],+t[1][3],+t[1][4],+t[1][5]],[+t[2][0],+r[2],+t[2][2],+t[2][3],+t[2][4],+t[2][5]],[+t[3][0],+r[3],+t[3][2],+t[3][3],+t[3][4],+t[3][5]],[+t[4][0],+r[4],+t[4][2],+t[4][3],+t[4][4],+t[4][5]],[+t[5][0],+r[5],+t[5][2],+t[5][3],+t[5][4],+t[5][5]]]),e([[+t[0][0],+t[0][1],+r[0],+t[0][3],+t[0][4],+t[0][5]],[+t[1][0],+t[1][1],+r[1],+t[1][3],+t[1][4],+t[1][5]],[+t[2][0],+t[2][1],+r[2],+t[2][3],+t[2][4],+t[2][5]],[+t[3][0],+t[3][1],+r[3],+t[3][3],+t[3][4],+t[3][5]],[+t[4][0],+t[4][1],+r[4],+t[4][3],+t[4][4],+t[4][5]],[+t[5][0],+t[5][1],+r[5],+t[5][3],+t[5][4],+t[5][5]]]),e([[+t[0][0],+t[0][1],+t[0][2],+r[0],+t[0][4],+t[0][5]],[+t[1][0],+t[1][1],+t[1][2],+r[1],+t[1][4],+t[1][5]],[+t[2][0],+t[2][1],+t[2][2],+r[2],+t[2][4],+t[2][5]],[+t[3][0],+t[3][1],+t[3][2],+r[3],+t[3][4],+t[3][5]],[+t[4][0],+t[4][1],+t[4][2],+r[4],+t[4][4],+t[4][5]],[+t[5][0],+t[5][1],+t[5][2],+r[5],+t[5][4],+t[5][5]]]),e([[+t[0][0],+t[0][1],+t[0][2],+t[0][3],+r[0],+t[0][5]],[+t[1][0],+t[1][1],+t[1][2],+t[1][3],+r[1],+t[1][5]],[+t[2][0],+t[2][1],+t[2][2],+t[2][3],+r[2],+t[2][5]],[+t[3][0],+t[3][1],+t[3][2],+t[3][3],+r[3],+t[3][5]],[+t[4][0],+t[4][1],+t[4][2],+t[4][3],+r[4],+t[4][5]],[+t[5][0],+t[5][1],+t[5][2],+t[5][3],+r[5],+t[5][5]]]),e([[+t[0][0],+t[0][1],+t[0][2],+t[0][3],+t[0][4],+r[0]],[+t[1][0],+t[1][1],+t[1][2],+t[1][3],+t[1][4],+r[1]],[+t[2][0],+t[2][1],+t[2][2],+t[2][3],+t[2][4],+r[2]],[+t[3][0],+t[3][1],+t[3][2],+t[3][3],+t[3][4],+r[3]],[+t[4][0],+t[4][1],+t[4][2],+t[4][3],+t[4][4],+r[4]],[+t[5][0],+t[5][1],+t[5][2],+t[5][3],+t[5][4],+r[5]]]),e(t)]}}var u=[function(){return[[0]]},function(e,t){return[[t[0]],[e[0][0]]]}];function h(e,t,r,n,i,a,o,s){return function(l,c){switch(l.length){case 0:return e(l,c);case 1:return t(l,c);case 2:return r(l,c);case 3:return n(l,c);case 4:return i(l,c);case 5:return a(l,c)}var u=o[l.length];return u||(u=o[l.length]=s(l.length)),u(l,c)}}!function(){for(;u.length<6;)u.push(i(u.length));e.exports=h.apply(void 0,u.concat([u,i]));for(var t=0;t<6;++t)e.exports[t]=u[t]}()},737:function(e){e.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},781:function(e,t,r){e.exports=function(e,t){var r=[];return t=+t||0,n(e.hi(e.shape[0]-1),r,t),r};var n=r(3349)},783:function(e){e.exports=function(e,t,r,n){var i,a,o,s,l,c=t[0],u=t[1],h=t[2],f=t[3],p=r[0],d=r[1],m=r[2],g=r[3];return(a=c*p+u*d+h*m+f*g)<0&&(a=-a,p=-p,d=-d,m=-m,g=-g),1-a>1e-6?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-n)*i)/o,l=Math.sin(n*i)/o):(s=1-n,l=n),e[0]=s*c+l*p,e[1]=s*u+l*d,e[2]=s*h+l*m,e[3]=s*f+l*g,e}},799:function(e,t,r){var n=r(3236),i=r(9405),a=n(["precision mediump float;\n#define GLSLIFY 1\nattribute vec2 position;\nvarying vec2 uv;\nvoid main() {\n uv = position;\n gl_Position = vec4(position, 0, 1);\n}"]),o=n(["precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D accumBuffer;\nvarying vec2 uv;\n\nvoid main() {\n vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));\n gl_FragColor = min(vec4(1,1,1,1), accum);\n}"]);e.exports=function(e){return i(e,a,o,null,[{name:"position",type:"vec2"}])}},811:function(e){e.exports=function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}},840:function(e,t,r){var n=r(3236),i=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, normal;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model\n , view\n , projection\n , inverseModel;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvec4 project(vec3 p) {\n return projection * (view * (model * vec4(p, 1.0)));\n}\n\nvoid main() {\n gl_Position = project(position);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * vec4(position , 1.0);\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n f_color = color;\n f_data = position;\n f_uv = uv;\n}\n"]),a=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\n//#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n , fresnel\n , kambient\n , kdiffuse\n , kspecular;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (f_color.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], f_data)\n ) discard;\n\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d\n\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * f_color.a;\n}\n"]),o=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model, view, projection;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n gl_Position = projection * (view * (model * vec4(position, 1.0)));\n f_color = color;\n f_data = position;\n f_uv = uv;\n}"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;\n\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\nattribute float pointSize;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0);\n } else {\n gl_Position = projection * (view * (model * vec4(position, 1.0)));\n }\n gl_PointSize = pointSize;\n f_color = color;\n f_uv = uv;\n}"]),c=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5);\n if(dot(pointR, pointR) > 0.25) {\n discard;\n }\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),u=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n gl_Position = projection * (view * (model * vec4(position, 1.0)));\n f_id = id;\n f_position = position;\n}"]),h=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]),f=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute float pointSize;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0, 0.0, 0.0);\n } else {\n gl_Position = projection * (view * (model * vec4(position, 1.0)));\n gl_PointSize = pointSize;\n }\n f_id = id;\n f_position = position;\n}"]),p=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\n\nvoid main() {\n gl_Position = projection * (view * (model * vec4(position, 1.0)));\n}"]),d=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec3 contourColor;\n\nvoid main() {\n gl_FragColor = vec4(contourColor, 1.0);\n}\n"]);t.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},t.wireShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},t.pointShader={vertex:l,fragment:c,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},t.pickShader={vertex:u,fragment:h,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},t.pointPickShader={vertex:f,fragment:h,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},t.contourShader={vertex:p,fragment:d,attributes:[{name:"position",type:"vec3"}]}},855:function(e,t,r){e.exports={init:function(e){var t=i.nextPow2(e);l.length>>1;a(d,S);var E=0,C=0;for(T=0;T=o)m(u,h,C--,I=I-o|0);else if(I>=0)m(l,c,E--,I);else if(I<=-o){I=-I-o|0;for(var L=0;L>>1;a(d,E);var C=0,I=0,L=0;for(k=0;k>1==d[2*k+3]>>1&&(z=2,k+=1),P<0){for(var D=-(P>>1)-1,O=0;O>1)-1,0===z?m(l,c,C--,D):1===z?m(u,h,I--,D):2===z&&m(f,p,L--,D)}},scanBipartite:function(e,t,r,n,i,s,u,h,f,p,y,v){var x=0,_=2*e,b=t,w=t+e,T=1,k=1;n?k=o:T=o;for(var A=i;A>>1;a(d,C);var I=0;for(A=0;A=o?(P=!n,M-=o):(P=!!n,M-=1),P)g(l,c,I++,M);else{var z=v[M],D=_*M,O=y[D+t+1],R=y[D+t+1+e];e:for(var F=0;F>>1;a(d,T);var k=0;for(x=0;x=o)l[k++]=_-o;else{var M=p[_-=1],S=g*_,E=f[S+t+1],C=f[S+t+1+e];e:for(var I=0;I=0;--I)if(l[I]===_){for(D=I+1;D max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 lowerBound, upperBound;\nuniform float contourTint;\nuniform vec4 contourColor;\nuniform sampler2D colormap;\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform float vertexColor;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n if (\n kill > 0.0 ||\n vColor.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], worldCoordinate)\n ) discard;\n\n vec3 N = normalize(surfaceNormal);\n vec3 V = normalize(eyeDirection);\n vec3 L = normalize(lightDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = max(beckmannSpecular(L, V, N, roughness), 0.);\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n //decide how to interpolate color — in vertex or in fragment\n vec4 surfaceColor =\n step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) +\n step(.5, vertexColor) * vColor;\n\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;\n}\n"]),s=i(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute float f;\n\nuniform vec3 objectOffset;\nuniform mat3 permutation;\nuniform mat4 model, view, projection;\nuniform float height, zOffset;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 dataCoordinate = permutation * vec3(uv.xy, height);\n worldCoordinate = objectOffset + dataCoordinate;\n mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0));\n vec4 worldPosition = (model * objectOffsetTranslation) * vec4(dataCoordinate, 1.0);\n\n vec4 clipPosition = projection * (view * worldPosition);\n clipPosition.z += zOffset;\n\n gl_Position = clipPosition;\n value = f + objectOffset.z;\n kill = -1.0;\n planeCoordinate = uv.zw;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Don't do lighting for contours\n surfaceNormal = vec3(1,0,0);\n eyeDirection = vec3(0,1,0);\n lightDirection = vec3(0,0,1);\n}\n"]),l=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec2 shape;\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 surfaceNormal;\n\nvec2 splitFloat(float v) {\n float vh = 255.0 * v;\n float upper = floor(vh);\n float lower = fract(vh);\n return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);\n}\n\nvoid main() {\n if ((kill > 0.0) ||\n (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\n\n vec2 ux = splitFloat(planeCoordinate.x / shape.x);\n vec2 uy = splitFloat(planeCoordinate.y / shape.y);\n gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));\n}\n"]);t.createShader=function(e){var t=n(e,a,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t.attributes.normal.location=2,t},t.createPickShader=function(e){var t=n(e,a,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t.attributes.normal.location=2,t},t.createContourShader=function(e){var t=n(e,s,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t},t.createPickContourShader=function(e){var t=n(e,s,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t}},1085:function(e,t,r){var n=r(1371);e.exports=function(e,t,r){t="number"==typeof t?t:1,r=r||": ";var i=e.split(/\r?\n/),a=String(i.length+t-1).length;return i.map((function(e,i){var o=i+t,s=String(o).length;return n(o,a-s)+r+e})).join("\n")}},1091:function(e){e.exports=function(){var e=new Float32Array(3);return e[0]=0,e[1]=0,e[2]=0,e}},1125:function(e,t,r){e.exports=function(e,t,r,i){var a=n(e,r,i),o=n(t,r,i);if(a>0&&o>0||a<0&&o<0)return!1;var s=n(r,e,t),l=n(i,e,t);return!(s>0&&l>0||s<0&&l<0)&&(0!==a||0!==o||0!==s||0!==l||function(e,t,r,n){for(var i=0;i<2;++i){var a=e[i],o=t[i],s=Math.min(a,o),l=Math.max(a,o),c=r[i],u=n[i],h=Math.min(c,u);if(Math.max(c,u)>>0;e.exports=function(e,t){if(isNaN(e)||isNaN(t))return NaN;if(e===t)return e;if(0===e)return t<0?-i:i;var r=n.hi(e),o=n.lo(e);return t>e==e>0?o===a?(r+=1,o=0):o+=1:0===o?(o=a,r-=1):o-=1,n.pack(o,r)}},1283:function(e,t,r){var n=r(9405),i=r(3236),a=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform vec4 highlightId;\nuniform float highlightScale;\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = 1.0;\n if(distance(highlightId, id) < 0.0001) {\n scale = highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1);\n vec4 viewPosition = view * worldPosition;\n viewPosition = viewPosition / viewPosition.w;\n vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),o=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float highlightScale, pixelRatio;\nuniform vec4 highlightId;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = pixelRatio;\n if(distance(highlightId.bgr, id.bgr) < 0.001) {\n scale *= highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1.0);\n vec4 viewPosition = view * worldPosition;\n vec4 clipPosition = projection * viewPosition;\n clipPosition /= clipPosition.w;\n\n gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),s=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform float highlightScale;\nuniform vec4 highlightId;\nuniform vec3 axes[2];\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float scale, pixelRatio;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float lscale = pixelRatio * scale;\n if(distance(highlightId, id) < 0.0001) {\n lscale *= highlightScale;\n }\n\n vec4 clipCenter = projection * (view * (model * vec4(position, 1)));\n vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;\n vec4 clipPosition = projection * (view * (model * vec4(dataPosition, 1)));\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = dataPosition;\n }\n}\n"]),l=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float opacity;\n\nvarying vec4 interpColor;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (\n outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) ||\n interpColor.a * opacity == 0.\n ) discard;\n gl_FragColor = interpColor * opacity;\n}\n"]),c=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float pickGroup;\n\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;\n\n gl_FragColor = vec4(pickGroup, pickId.bgr);\n}"]),u=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],h={vertex:a,fragment:l,attributes:u},f={vertex:o,fragment:l,attributes:u},p={vertex:s,fragment:l,attributes:u},d={vertex:a,fragment:c,attributes:u},m={vertex:o,fragment:c,attributes:u},g={vertex:s,fragment:c,attributes:u};function y(e,t){var r=n(e,t),i=r.attributes;return i.position.location=0,i.color.location=1,i.glyph.location=2,i.id.location=3,r}t.createPerspective=function(e){return y(e,h)},t.createOrtho=function(e){return y(e,f)},t.createProject=function(e){return y(e,p)},t.createPickPerspective=function(e){return y(e,d)},t.createPickOrtho=function(e){return y(e,m)},t.createPickProject=function(e){return y(e,g)}},1303:function(e,t,r){e.exports=function(e,t){var r,a,o,s;if(t[0][0]t[1][0]))return i(t,e);r=t[1],a=t[0]}if(e[0][0]e[1][0]))return-i(e,t);o=e[1],s=e[0]}var l=n(r,a,s),c=n(r,a,o);if(l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;if(l=n(s,o,a),c=n(s,o,r),l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;return a[0]-s[0]};var n=r(3250);function i(e,t){var r,i,a,o;if(t[0][0]t[1][0])){var s=Math.min(e[0][1],e[1][1]),l=Math.max(e[0][1],e[1][1]),c=Math.min(t[0][1],t[1][1]),u=Math.max(t[0][1],t[1][1]);return lu?s-u:l-u}r=t[1],i=t[0]}e[0][1]"u"&&(r=0),typeof e){case"number":if(e>0)return function(e,t){var r,n;for(r=new Array(e),n=0;nn)throw new Error("gl-vao: Too many vertex attributes");for(var i=0;i=0?t[a]:i}))},has___:{value:x((function(t){var n=v(t);return n?r in n:e.indexOf(t)>=0}))},set___:{value:x((function(n,i){var a,o=v(n);return o?o[r]=i:(a=e.indexOf(n))>=0?t[a]=i:(a=e.length,t[a]=i,e[a]=n),this}))},delete___:{value:x((function(n){var i,a,o=v(n);return o?r in o&&delete o[r]:!((i=e.indexOf(n))<0||(a=e.length-1,e[i]=void 0,t[i]=t[a],e[i]=e[a],e.length=a,t.length=a,0))}))}})};m.prototype=Object.create(Object.prototype,{get:{value:function(e,t){return this.get___(e,t)},writable:!0,configurable:!0},has:{value:function(e){return this.has___(e)},writable:!0,configurable:!0},set:{value:function(e,t){return this.set___(e,t)},writable:!0,configurable:!0},delete:{value:function(e){return this.delete___(e)},writable:!0,configurable:!0}}),"function"==typeof r?function(){function n(){this instanceof m||_();var e,n=new r,i=void 0,a=!1;return e=t?function(e,t){return n.set(e,t),n.has(e)||(i||(i=new m),i.set(e,t)),this}:function(e,t){if(a)try{n.set(e,t)}catch{i||(i=new m),i.set___(e,t)}else n.set(e,t);return this},Object.create(m.prototype,{get___:{value:x((function(e,t){return i?n.has(e)?n.get(e):i.get___(e,t):n.get(e,t)}))},has___:{value:x((function(e){return n.has(e)||!!i&&i.has___(e)}))},set___:{value:x(e)},delete___:{value:x((function(e){var t=!!n.delete(e);return i&&i.delete___(e)||t}))},permitHostObjects___:{value:x((function(e){if(e!==g)throw new Error("bogus call to permitHostObjects___");a=!0}))}})}t&&typeof Proxy<"u"&&(Proxy=void 0),n.prototype=m.prototype,e.exports=n,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),e.exports=m)}function g(e){e.permitHostObjects___&&e.permitHostObjects___(g)}function y(e){return!(e.substr(0,8)==l&&"___"===e.substr(e.length-3))}function v(e){if(e!==Object(e))throw new TypeError("Not an object: "+e);var t=e[c];if(t&&t.key===e)return t;if(s(e)){t={key:e};try{return o(e,c,{value:t,writable:!1,enumerable:!1,configurable:!1}),t}catch{return}}}function x(e){return e.prototype=null,Object.freeze(e)}function _(){!p&&typeof console<"u"&&(p=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}}()},1570:function(e){e.exports=function(e){return t[e]()};var t=[function(){return function(e,t,r,n){for(var i=e.length,a=0;a>1,c=t[2*l+1];if(c===a)return l;a>1,c=t[2*l+1];if(c===a)return l;a>1,c=t[2*l+1];if(c===a)return l;a HALF_PI) && (b <= ONE_AND_HALF_PI)) ?\n b - PI :\n b;\n}\n\nfloat look_horizontal_or_vertical(float a, float ratio) {\n // ratio controls the ratio between being horizontal to (vertical + horizontal)\n // if ratio is set to 0.5 then it is 50%, 50%.\n // when using a higher ratio e.g. 0.75 the result would\n // likely be more horizontal than vertical.\n\n float b = positive_angle(a);\n\n return\n (b < ( ratio) * HALF_PI) ? 0.0 :\n (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI :\n (b < (2.0 + ratio) * HALF_PI) ? 0.0 :\n (b < (4.0 - ratio) * HALF_PI) ? HALF_PI :\n 0.0;\n}\n\nfloat roundTo(float a, float b) {\n return float(b * floor((a + 0.5 * b) / b));\n}\n\nfloat look_round_n_directions(float a, int n) {\n float b = positive_angle(a);\n float div = TWO_PI / float(n);\n float c = roundTo(b, div);\n return look_upwards(c);\n}\n\nfloat applyAlignOption(float rawAngle, float delta) {\n return\n (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions\n (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical\n (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis\n (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards\n (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal\n rawAngle; // otherwise return back raw input angle\n}\n\nbool isAxisTitle = (axis.x == 0.0) &&\n (axis.y == 0.0) &&\n (axis.z == 0.0);\n\nvoid main() {\n //Compute world offset\n float axisDistance = position.z;\n vec3 dataPosition = axisDistance * axis + offset;\n\n float beta = angle; // i.e. user defined attributes for each tick\n\n float axisAngle;\n float clipAngle;\n float flip;\n\n if (enableAlign) {\n axisAngle = (isAxisTitle) ? HALF_PI :\n computeViewAngle(dataPosition, dataPosition + axis);\n clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir);\n\n axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0;\n clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0;\n\n flip = (dot(vec2(cos(axisAngle), sin(axisAngle)),\n vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0;\n\n beta += applyAlignOption(clipAngle, flip * PI);\n }\n\n //Compute plane offset\n vec2 planeCoord = position.xy * pixelScale;\n\n mat2 planeXform = scale * mat2(\n cos(beta), sin(beta),\n -sin(beta), cos(beta)\n );\n\n vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;\n\n //Compute clip position\n vec3 clipPosition = project(dataPosition);\n\n //Apply text offset in clip coordinates\n clipPosition += vec3(viewOffset, 0.0);\n\n //Done\n gl_Position = vec4(clipPosition, 1.0);\n}\n"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 color;\nvoid main() {\n gl_FragColor = color;\n}"]);t.Q=function(e){return i(e,s,l,null,[{name:"position",type:"vec3"}])};var c=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec3 normal;\n\nuniform mat4 model, view, projection;\nuniform vec3 enable;\nuniform vec3 bounds[2];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n\n vec3 signAxis = sign(bounds[1] - bounds[0]);\n\n vec3 realNormal = signAxis * normal;\n\n if(dot(realNormal, enable) > 0.0) {\n vec3 minRange = min(bounds[0], bounds[1]);\n vec3 maxRange = max(bounds[0], bounds[1]);\n vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0));\n gl_Position = projection * (view * (model * vec4(nPosition, 1.0)));\n } else {\n gl_Position = vec4(0,0,0,0);\n }\n\n colorChannel = abs(realNormal);\n}\n"]),u=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 colors[3];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n gl_FragColor = colorChannel.x * colors[0] +\n colorChannel.y * colors[1] +\n colorChannel.z * colors[2];\n}"]);t.bg=function(e){return i(e,c,u,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},1888:function(e,t,r){var n=r(8828),i=r(1338),a=r(4793).hp;r.g.__TYPEDARRAY_POOL||(r.g.__TYPEDARRAY_POOL={UINT8:i([32,0]),UINT16:i([32,0]),UINT32:i([32,0]),BIGUINT64:i([32,0]),INT8:i([32,0]),INT16:i([32,0]),INT32:i([32,0]),BIGINT64:i([32,0]),FLOAT:i([32,0]),DOUBLE:i([32,0]),DATA:i([32,0]),UINT8C:i([32,0]),BUFFER:i([32,0])});var o=typeof Uint8ClampedArray<"u",s=typeof BigUint64Array<"u",l=typeof BigInt64Array<"u",c=r.g.__TYPEDARRAY_POOL;c.UINT8C||(c.UINT8C=i([32,0])),c.BIGUINT64||(c.BIGUINT64=i([32,0])),c.BIGINT64||(c.BIGINT64=i([32,0])),c.BUFFER||(c.BUFFER=i([32,0]));var u=c.DATA,h=c.BUFFER;function f(e){if(e){var t=e.length||e.byteLength,r=n.log2(t);u[r].push(e)}}function p(e){e=n.nextPow2(e);var t=n.log2(e),r=u[t];return r.length>0?r.pop():new ArrayBuffer(e)}function d(e){return new Uint8Array(p(e),0,e)}function m(e){return new Uint16Array(p(2*e),0,e)}function g(e){return new Uint32Array(p(4*e),0,e)}function y(e){return new Int8Array(p(e),0,e)}function v(e){return new Int16Array(p(2*e),0,e)}function x(e){return new Int32Array(p(4*e),0,e)}function _(e){return new Float32Array(p(4*e),0,e)}function b(e){return new Float64Array(p(8*e),0,e)}function w(e){return o?new Uint8ClampedArray(p(e),0,e):d(e)}function T(e){return s?new BigUint64Array(p(8*e),0,e):null}function k(e){return l?new BigInt64Array(p(8*e),0,e):null}function A(e){return new DataView(p(e),0,e)}function M(e){e=n.nextPow2(e);var t=n.log2(e),r=h[t];return r.length>0?r.pop():new a(e)}t.free=function(e){if(a.isBuffer(e))h[n.log2(e.length)].push(e);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(e)&&(e=e.buffer),!e)return;var t=e.length||e.byteLength,r=0|n.log2(t);u[r].push(e)}},t.freeUint8=t.freeUint16=t.freeUint32=t.freeBigUint64=t.freeInt8=t.freeInt16=t.freeInt32=t.freeBigInt64=t.freeFloat32=t.freeFloat=t.freeFloat64=t.freeDouble=t.freeUint8Clamped=t.freeDataView=function(e){f(e.buffer)},t.freeArrayBuffer=f,t.freeBuffer=function(e){h[n.log2(e.length)].push(e)},t.malloc=function(e,t){if(void 0===t||"arraybuffer"===t)return p(e);switch(t){case"uint8":return d(e);case"uint16":return m(e);case"uint32":return g(e);case"int8":return y(e);case"int16":return v(e);case"int32":return x(e);case"float":case"float32":return _(e);case"double":case"float64":return b(e);case"uint8_clamped":return w(e);case"bigint64":return k(e);case"biguint64":return T(e);case"buffer":return M(e);case"data":case"dataview":return A(e);default:return null}return null},t.mallocArrayBuffer=p,t.mallocUint8=d,t.mallocUint16=m,t.mallocUint32=g,t.mallocInt8=y,t.mallocInt16=v,t.mallocInt32=x,t.mallocFloat32=t.mallocFloat=_,t.mallocFloat64=t.mallocDouble=b,t.mallocUint8Clamped=w,t.mallocBigUint64=T,t.mallocBigInt64=k,t.mallocDataView=A,t.mallocBuffer=M,t.clearCache=function(){for(var e=0;e<32;++e)c.UINT8[e].length=0,c.UINT16[e].length=0,c.UINT32[e].length=0,c.INT8[e].length=0,c.INT16[e].length=0,c.INT32[e].length=0,c.FLOAT[e].length=0,c.DOUBLE[e].length=0,c.BIGUINT64[e].length=0,c.BIGINT64[e].length=0,c.UINT8C[e].length=0,u[e].length=0,h[e].length=0}},1903:function(e){e.exports=function(e){var t=new Float32Array(16);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}},1944:function(e,t,r){var n=r(5250),i=r(8210);e.exports=function(e,t){for(var r=n(e[0],t[0]),a=1;a>1,s=a(e[o],t);s<=0?(0===s&&(i=o),r=o+1):s>0&&(n=o-1)}return i}function u(e,t){for(var r=new Array(e.length),i=0,o=r.length;i=e.length||0!==a(e[g],s)););}return r}function h(e,t){if(t<0)return[];for(var r=[],i=(1<>>u&1&&c.push(i[u]);t.push(c)}return s(t)},t.skeleton=h,t.boundary=function(e){for(var t=[],r=0,n=e.length;r0}))).length,g=new Array(m),y=new Array(m);for(p=0;p0;){var B=R.pop(),j=E[B];l(j,(function(e,t){return e-t}));var N,U=j.length,V=F[B];for(0===V&&(N=[q=d[B]]),p=0;p=0||(F[H]=1^V,R.push(H),0!==V)||O(q=d[H])||(q.reverse(),N.push(q))}0===V&&r.push(N)}return r};var n=r(3134),i=r(3088),a=r(5085),o=r(5250),s=r(8210),l=r(1682),c=r(5609);function u(e,t){for(var r=new Array(e),n=0;n1)for(var l=0;lu||r<0||r>u)throw new Error("gl-fbo: Parameters are too large for FBO");var h=1;if("color"in(n=n||{})){if((h=Math.max(0|n.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(h>1){if(!c)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(h>e.getParameter(c.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+h+" draw buffers")}}var f=e.UNSIGNED_BYTE,p=e.getExtension("OES_texture_float");if(n.float&&h>0){if(!p)throw new Error("gl-fbo: Context does not support floating point textures");f=e.FLOAT}else n.preferFloat&&h>0&&p&&(f=e.FLOAT);var m=!0;"depth"in n&&(m=!!n.depth);var g=!1;return"stencil"in n&&(g=!!n.stencil),new d(e,t,r,f,h,m,g,c)};var i,a,o,s,l=null;function c(e){return[e.getParameter(e.FRAMEBUFFER_BINDING),e.getParameter(e.RENDERBUFFER_BINDING),e.getParameter(e.TEXTURE_BINDING_2D)]}function u(e,t){e.bindFramebuffer(e.FRAMEBUFFER,t[0]),e.bindRenderbuffer(e.RENDERBUFFER,t[1]),e.bindTexture(e.TEXTURE_2D,t[2])}function h(e){switch(e){case i:throw new Error("gl-fbo: Framebuffer unsupported");case a:throw new Error("gl-fbo: Framebuffer incomplete attachment");case o:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case s:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function f(e,t,r,i,a,o){if(!i)return null;var s=n(e,t,r,a,i);return s.magFilter=e.NEAREST,s.minFilter=e.NEAREST,s.mipSamples=1,s.bind(),e.framebufferTexture2D(e.FRAMEBUFFER,o,e.TEXTURE_2D,s.handle,0),s}function p(e,t,r,n,i){var a=e.createRenderbuffer();return e.bindRenderbuffer(e.RENDERBUFFER,a),e.renderbufferStorage(e.RENDERBUFFER,n,t,r),e.framebufferRenderbuffer(e.FRAMEBUFFER,i,e.RENDERBUFFER,a),a}function d(e,t,r,n,i,a,o,s){this.gl=e,this._shape=[0|t,0|r],this._destroyed=!1,this._ext=s,this.color=new Array(i);for(var d=0;d1&&s.drawBuffersWEBGL(l[o]);var v=r.getExtension("WEBGL_depth_texture");v?d?e.depth=f(r,i,a,v.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):m&&(e.depth=f(r,i,a,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):m&&d?e._depth_rb=p(r,i,a,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):m?e._depth_rb=p(r,i,a,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):d&&(e._depth_rb=p(r,i,a,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var x=r.checkFramebufferStatus(r.FRAMEBUFFER);if(x!==r.FRAMEBUFFER_COMPLETE){for(e._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(e.handle),e.handle=null,e.depth&&(e.depth.dispose(),e.depth=null),e._depth_rb&&(r.deleteRenderbuffer(e._depth_rb),e._depth_rb=null),y=0;yi||r<0||r>i)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");e._shape[0]=t,e._shape[1]=r;for(var a=c(n),o=0;o0;){for(var p=r.pop(),d=(u=-1,h=-1,l=o[s=r.pop()],1);d=0||(t.flip(s,p),i(e,t,r,u,s,h),i(e,t,r,s,h,u),i(e,t,r,h,p,u),i(e,t,r,p,u,h))}}},2334:function(e){e.exports=function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}},2335:function(e){e.exports=function(e){var t=new Float32Array(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},2361:function(e){var t=!1;if(typeof Float64Array<"u"){var r=new Float64Array(1),n=new Uint32Array(r.buffer);if(r[0]=1,t=!0,1072693248===n[1]){let t=function(e,t){return n[0]=e,n[1]=t,r[0]},i=function(e){return r[0]=e,n[0]},a=function(e){return r[0]=e,n[1]};e.exports=function(e){return r[0]=e,[n[0],n[1]]},e.exports.pack=t,e.exports.lo=i,e.exports.hi=a}else if(1072693248===n[0]){let t=function(e,t){return n[1]=e,n[0]=t,r[0]},i=function(e){return r[0]=e,n[1]},a=function(e){return r[0]=e,n[0]};e.exports=function(e){return r[0]=e,[n[1],n[0]]},e.exports.pack=t,e.exports.lo=i,e.exports.hi=a}else t=!1}if(!t){let t=function(e,t){return i.writeUInt32LE(e,0,!0),i.writeUInt32LE(t,4,!0),i.readDoubleLE(0,!0)},r=function(e){return i.writeDoubleLE(e,0,!0),i.readUInt32LE(0,!0)},n=function(e){return i.writeDoubleLE(e,0,!0),i.readUInt32LE(4,!0)};var i=new Buffer(8);e.exports=function(e){return i.writeDoubleLE(e,0,!0),[i.readUInt32LE(0,!0),i.readUInt32LE(4,!0)]},e.exports.pack=t,e.exports.lo=r,e.exports.hi=n}e.exports.sign=function(t){return e.exports.hi(t)>>>31},e.exports.exponent=function(t){return(e.exports.hi(t)<<1>>>21)-1023},e.exports.fraction=function(t){var r=e.exports.lo(t),n=e.exports.hi(t),i=1048575&n;return 2146435072&n&&(i+=1048576),[r,i]},e.exports.denormalized=function(t){return!(2146435072&e.exports.hi(t))}},2408:function(e){e.exports=function(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],c=t[8],u=t[9],h=t[10],f=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i-c*n,e[1]=o*i-u*n,e[2]=s*i-h*n,e[3]=l*i-f*n,e[8]=a*n+c*i,e[9]=o*n+u*i,e[10]=s*n+h*i,e[11]=l*n+f*i,e}},2419:function(e){e.exports=function(e){for(var t=1,r=1;rl-s?function(e,t,r,n,i,a,o,s,l,c,u){for(var h=2*e,f=n,p=h*n;fc-l?n?function(e,t,r,n,i,a,o,s,l,c,u){for(var h=2*e,f=n,p=h*n;f>>1,s=e[o];(void 0!==r?r(s,t):s-t)>=0?(a=o,i=o-1):n=o+1}return a}function r(e,t,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=e[o];(void 0!==r?r(s,t):s-t)>0?(a=o,i=o-1):n=o+1}return a}function n(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o];(void 0!==r?r(s,t):s-t)<0?(a=o,n=o+1):i=o-1}return a}function i(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o];(void 0!==r?r(s,t):s-t)<=0?(a=o,n=o+1):i=o-1}return a}function a(e,t,r,n,i){for(;n<=i;){var a=n+i>>>1,o=e[a],s=void 0!==r?r(o,t):o-t;if(0===s)return a;s<=0?n=a+1:i=a-1}return-1}function o(e,t,r,n,i,a){return"function"==typeof r?a(e,t,r,void 0===n?0:0|n,void 0===i?e.length-1:0|i):a(e,t,void 0,void 0===r?0:0|r,void 0===n?e.length-1:0|n)}e.exports={ge:function(e,r,n,i,a){return o(e,r,n,i,a,t)},gt:function(e,t,n,i,a){return o(e,t,n,i,a,r)},lt:function(e,t,r,i,a){return o(e,t,r,i,a,n)},le:function(e,t,r,n,a){return o(e,t,r,n,a,i)},eq:function(e,t,r,n,i){return o(e,t,r,n,i,a)}}},2504:function(e){e.exports=function(e,t,r){var n=r[0],i=r[1],a=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},2538:function(e,t,r){var n=r(8902),i=r(5542),a=r(2272),o=r(5023);function s(e){return[Math.min(e[0],e[1]),Math.max(e[0],e[1])]}function l(e,t){return e[0]-t[0]||e[1]-t[1]}function c(e,t,r){return t in e?e[t]:r}e.exports=function(e,t,r){Array.isArray(t)?(r=r||{},t=t||[]):(r=t||{},t=[]);var u=!!c(r,"delaunay",!0),h=!!c(r,"interior",!0),f=!!c(r,"exterior",!0),p=!!c(r,"infinity",!1);if(!h&&!f||0===e.length)return[];var d=n(e,t);if(u||h!==f||p){for(var m=i(e.length,function(e){return e.map(s).sort(l)}(t)),g=0;g 0"),"function"!=typeof e.vertex&&t("Must specify vertex creation function"),"function"!=typeof e.cell&&t("Must specify cell creation function"),"function"!=typeof e.phase&&t("Must specify phase function");for(var o=e.getters||[],s=new Array(a),l=0;l=0?s[l]=!0:s[l]=!1;return function(e,t,r,a,o,s){var l=[s,o].join(",");return(0,i[l])(e,t,r,n.mallocUint32,n.freeUint32)}(e.vertex,e.cell,e.phase,0,r,s)};var i={"false,0,1":function(e,t,r,n,i){return function(a,o,s,l){var c,u=0|a.shape[0],h=0|a.shape[1],f=a.data,p=0|a.offset,d=0|a.stride[0],m=0|a.stride[1],g=p,y=0|-d,v=0,x=0|-m,_=0,b=-d-m|0,w=0,T=0|d,k=m-d*u|0,A=0,M=0,S=0,E=2*u|0,C=n(E),I=n(E),L=0,P=0,z=-1,D=-1,O=0,R=0|-u,F=0|u,B=0,j=-u-1|0,N=u-1|0,U=0,V=0,q=0;for(A=0;A0){if(M=1,C[L++]=r(f[g],o,s,l),g+=T,u>0)for(A=1,c=f[g],P=C[L]=r(c,o,s,l),O=C[L+z],B=C[L+R],U=C[L+j],(P!==O||P!==B||P!==U)&&(v=f[g+y],_=f[g+x],w=f[g+b],e(A,M,c,v,_,w,P,O,B,U,o,s,l),V=I[L]=S++),L+=1,g+=T,A=2;A0)for(A=1,c=f[g],P=C[L]=r(c,o,s,l),O=C[L+z],B=C[L+R],U=C[L+j],(P!==O||P!==B||P!==U)&&(v=f[g+y],_=f[g+x],w=f[g+b],e(A,M,c,v,_,w,P,O,B,U,o,s,l),V=I[L]=S++,U!==B&&t(I[L+R],V,_,w,B,U,o,s,l)),L+=1,g+=T,A=2;A0){if(A=1,C[L++]=r(f[g],o,s,l),g+=T,h>0)for(M=1,c=f[g],P=C[L]=r(c,o,s,l),B=C[L+R],O=C[L+z],U=C[L+j],(P!==B||P!==O||P!==U)&&(v=f[g+y],_=f[g+x],w=f[g+b],e(A,M,c,v,_,w,P,B,O,U,o,s,l),V=I[L]=S++),L+=1,g+=T,M=2;M0)for(M=1,c=f[g],P=C[L]=r(c,o,s,l),B=C[L+R],O=C[L+z],U=C[L+j],(P!==B||P!==O||P!==U)&&(v=f[g+y],_=f[g+x],w=f[g+b],e(A,M,c,v,_,w,P,B,O,U,o,s,l),V=I[L]=S++,U!==B&&t(I[L+R],V,w,v,U,B,o,s,l)),L+=1,g+=T,M=2;Mp[1][2]&&(y[0]=-y[0]),p[0][2]>p[2][0]&&(y[1]=-y[1]),p[1][0]>p[0][1]&&(y[2]=-y[2]),!0}},2653:function(e,t,r){var n=r(3865);e.exports=function(e,t){for(var r=e.length,i=new Array(r),a=0;a=t[l]&&(s+=1);a[o]=s}}return e}(n(a,!0),r)}};var n=r(8954),i=r(3952)},2762:function(e,t,r){var n=r(1888),i=r(5298),a=r(9618),o=["uint8","uint8_clamped","uint16","uint32","int8","int16","int32","float32"];function s(e,t,r,n,i){this.gl=e,this.type=t,this.handle=r,this.length=n,this.usage=i}var l=s.prototype;function c(e,t,r,n,i,a){var o=i.length*i.BYTES_PER_ELEMENT;if(a<0)return e.bufferData(t,i,n),o;if(o+a>r)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return e.bufferSubData(t,a,i),r}function u(e,t){for(var r=n.malloc(e.length,t),i=e.length,a=0;a=0;--n){if(t[n]!==r)return!1;r*=e[n]}return!0}(e.shape,e.stride))0===e.offset&&e.data.length===e.shape[0]?this.length=c(this.gl,this.type,this.length,this.usage,e.data,t):this.length=c(this.gl,this.type,this.length,this.usage,e.data.subarray(e.offset,e.shape[0]),t);else{var s=n.malloc(e.size,r),l=a(s,e.shape);i.assign(l,e),this.length=c(this.gl,this.type,this.length,this.usage,t<0?s:s.subarray(0,e.size),t),n.free(s)}}else if(Array.isArray(e)){var h;h=this.type===this.gl.ELEMENT_ARRAY_BUFFER?u(e,"uint16"):u(e,"float32"),this.length=c(this.gl,this.type,this.length,this.usage,t<0?h:h.subarray(0,e.length),t),n.free(h)}else if("object"==typeof e&&"number"==typeof e.length)this.length=c(this.gl,this.type,this.length,this.usage,e,t);else{if("number"!=typeof e&&void 0!==e)throw new Error("gl-buffer: Invalid data type");if(t>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");(e|=0)<=0&&(e=1),this.gl.bufferData(this.type,0|e,this.usage),this.length=e}},e.exports=function(e,t,r,n){if(r=r||e.ARRAY_BUFFER,n=n||e.DYNAMIC_DRAW,r!==e.ARRAY_BUFFER&&r!==e.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(n!==e.DYNAMIC_DRAW&&n!==e.STATIC_DRAW&&n!==e.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var i=e.createBuffer(),a=new s(e,r,i,0,n);return a.update(t),a}},2825:function(e){e.exports=function(e,t,r){var n=new Float32Array(3);return n[0]=e,n[1]=t,n[2]=r,n}},2931:function(e,t,r){e.exports={EPSILON:r(2613),create:r(1091),clone:r(3126),angle:r(8192),fromValues:r(2825),copy:r(3990),set:r(1463),equals:r(9922),exactEquals:r(9265),add:r(5632),subtract:r(6843),sub:r(2229),multiply:r(5847),mul:r(4505),divide:r(6690),div:r(4008),min:r(8107),max:r(7417),floor:r(2681),ceil:r(9226),round:r(2447),scale:r(6621),scaleAndAdd:r(8489),distance:r(7056),dist:r(5455),squaredDistance:r(2953),sqrDist:r(6141),length:r(1387),len:r(868),squaredLength:r(3066),sqrLen:r(5486),negate:r(5093),inverse:r(811),normalize:r(3536),dot:r(244),cross:r(5911),lerp:r(6658),random:r(7636),transformMat4:r(5673),transformMat3:r(492),transformQuat:r(264),rotateX:r(6894),rotateY:r(109),rotateZ:r(8692),forEach:r(5137)}},2933:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},2953:function(e){e.exports=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return r*r+n*n+i*i}},2962:function(e,t,r){var n=r(5250),i=r(8210),a=r(3012),o=r(7004);function s(e,t,r,n){return function(t){return n(e(r(t[0][0],t[1][1]),r(-t[0][1],t[1][0])))}}function l(e,t,r,n){return function(i){return n(e(t(e(r(i[1][1],i[2][2]),r(-i[1][2],i[2][1])),i[0][0]),e(t(e(r(i[1][0],i[2][2]),r(-i[1][2],i[2][0])),-i[0][1]),t(e(r(i[1][0],i[2][1]),r(-i[1][1],i[2][0])),i[0][2]))))}}function c(e,t,r,n){return function(i){return n(e(e(t(e(t(e(r(i[2][2],i[3][3]),r(-i[2][3],i[3][2])),i[1][1]),e(t(e(r(i[2][1],i[3][3]),r(-i[2][3],i[3][1])),-i[1][2]),t(e(r(i[2][1],i[3][2]),r(-i[2][2],i[3][1])),i[1][3]))),i[0][0]),t(e(t(e(r(i[2][2],i[3][3]),r(-i[2][3],i[3][2])),i[1][0]),e(t(e(r(i[2][0],i[3][3]),r(-i[2][3],i[3][0])),-i[1][2]),t(e(r(i[2][0],i[3][2]),r(-i[2][2],i[3][0])),i[1][3]))),-i[0][1])),e(t(e(t(e(r(i[2][1],i[3][3]),r(-i[2][3],i[3][1])),i[1][0]),e(t(e(r(i[2][0],i[3][3]),r(-i[2][3],i[3][0])),-i[1][1]),t(e(r(i[2][0],i[3][1]),r(-i[2][1],i[3][0])),i[1][3]))),i[0][2]),t(e(t(e(r(i[2][1],i[3][2]),r(-i[2][2],i[3][1])),i[1][0]),e(t(e(r(i[2][0],i[3][2]),r(-i[2][2],i[3][0])),-i[1][1]),t(e(r(i[2][0],i[3][1]),r(-i[2][1],i[3][0])),i[1][2]))),-i[0][3]))))}}function u(e,t,r,n){return function(i){return n(e(e(t(e(e(t(e(t(e(r(i[3][3],i[4][4]),r(-i[3][4],i[4][3])),i[2][2]),e(t(e(r(i[3][2],i[4][4]),r(-i[3][4],i[4][2])),-i[2][3]),t(e(r(i[3][2],i[4][3]),r(-i[3][3],i[4][2])),i[2][4]))),i[1][1]),t(e(t(e(r(i[3][3],i[4][4]),r(-i[3][4],i[4][3])),i[2][1]),e(t(e(r(i[3][1],i[4][4]),r(-i[3][4],i[4][1])),-i[2][3]),t(e(r(i[3][1],i[4][3]),r(-i[3][3],i[4][1])),i[2][4]))),-i[1][2])),e(t(e(t(e(r(i[3][2],i[4][4]),r(-i[3][4],i[4][2])),i[2][1]),e(t(e(r(i[3][1],i[4][4]),r(-i[3][4],i[4][1])),-i[2][2]),t(e(r(i[3][1],i[4][2]),r(-i[3][2],i[4][1])),i[2][4]))),i[1][3]),t(e(t(e(r(i[3][2],i[4][3]),r(-i[3][3],i[4][2])),i[2][1]),e(t(e(r(i[3][1],i[4][3]),r(-i[3][3],i[4][1])),-i[2][2]),t(e(r(i[3][1],i[4][2]),r(-i[3][2],i[4][1])),i[2][3]))),-i[1][4]))),i[0][0]),t(e(e(t(e(t(e(r(i[3][3],i[4][4]),r(-i[3][4],i[4][3])),i[2][2]),e(t(e(r(i[3][2],i[4][4]),r(-i[3][4],i[4][2])),-i[2][3]),t(e(r(i[3][2],i[4][3]),r(-i[3][3],i[4][2])),i[2][4]))),i[1][0]),t(e(t(e(r(i[3][3],i[4][4]),r(-i[3][4],i[4][3])),i[2][0]),e(t(e(r(i[3][0],i[4][4]),r(-i[3][4],i[4][0])),-i[2][3]),t(e(r(i[3][0],i[4][3]),r(-i[3][3],i[4][0])),i[2][4]))),-i[1][2])),e(t(e(t(e(r(i[3][2],i[4][4]),r(-i[3][4],i[4][2])),i[2][0]),e(t(e(r(i[3][0],i[4][4]),r(-i[3][4],i[4][0])),-i[2][2]),t(e(r(i[3][0],i[4][2]),r(-i[3][2],i[4][0])),i[2][4]))),i[1][3]),t(e(t(e(r(i[3][2],i[4][3]),r(-i[3][3],i[4][2])),i[2][0]),e(t(e(r(i[3][0],i[4][3]),r(-i[3][3],i[4][0])),-i[2][2]),t(e(r(i[3][0],i[4][2]),r(-i[3][2],i[4][0])),i[2][3]))),-i[1][4]))),-i[0][1])),e(t(e(e(t(e(t(e(r(i[3][3],i[4][4]),r(-i[3][4],i[4][3])),i[2][1]),e(t(e(r(i[3][1],i[4][4]),r(-i[3][4],i[4][1])),-i[2][3]),t(e(r(i[3][1],i[4][3]),r(-i[3][3],i[4][1])),i[2][4]))),i[1][0]),t(e(t(e(r(i[3][3],i[4][4]),r(-i[3][4],i[4][3])),i[2][0]),e(t(e(r(i[3][0],i[4][4]),r(-i[3][4],i[4][0])),-i[2][3]),t(e(r(i[3][0],i[4][3]),r(-i[3][3],i[4][0])),i[2][4]))),-i[1][1])),e(t(e(t(e(r(i[3][1],i[4][4]),r(-i[3][4],i[4][1])),i[2][0]),e(t(e(r(i[3][0],i[4][4]),r(-i[3][4],i[4][0])),-i[2][1]),t(e(r(i[3][0],i[4][1]),r(-i[3][1],i[4][0])),i[2][4]))),i[1][3]),t(e(t(e(r(i[3][1],i[4][3]),r(-i[3][3],i[4][1])),i[2][0]),e(t(e(r(i[3][0],i[4][3]),r(-i[3][3],i[4][0])),-i[2][1]),t(e(r(i[3][0],i[4][1]),r(-i[3][1],i[4][0])),i[2][3]))),-i[1][4]))),i[0][2]),e(t(e(e(t(e(t(e(r(i[3][2],i[4][4]),r(-i[3][4],i[4][2])),i[2][1]),e(t(e(r(i[3][1],i[4][4]),r(-i[3][4],i[4][1])),-i[2][2]),t(e(r(i[3][1],i[4][2]),r(-i[3][2],i[4][1])),i[2][4]))),i[1][0]),t(e(t(e(r(i[3][2],i[4][4]),r(-i[3][4],i[4][2])),i[2][0]),e(t(e(r(i[3][0],i[4][4]),r(-i[3][4],i[4][0])),-i[2][2]),t(e(r(i[3][0],i[4][2]),r(-i[3][2],i[4][0])),i[2][4]))),-i[1][1])),e(t(e(t(e(r(i[3][1],i[4][4]),r(-i[3][4],i[4][1])),i[2][0]),e(t(e(r(i[3][0],i[4][4]),r(-i[3][4],i[4][0])),-i[2][1]),t(e(r(i[3][0],i[4][1]),r(-i[3][1],i[4][0])),i[2][4]))),i[1][2]),t(e(t(e(r(i[3][1],i[4][2]),r(-i[3][2],i[4][1])),i[2][0]),e(t(e(r(i[3][0],i[4][2]),r(-i[3][2],i[4][0])),-i[2][1]),t(e(r(i[3][0],i[4][1]),r(-i[3][1],i[4][0])),i[2][2]))),-i[1][4]))),-i[0][3]),t(e(e(t(e(t(e(r(i[3][2],i[4][3]),r(-i[3][3],i[4][2])),i[2][1]),e(t(e(r(i[3][1],i[4][3]),r(-i[3][3],i[4][1])),-i[2][2]),t(e(r(i[3][1],i[4][2]),r(-i[3][2],i[4][1])),i[2][3]))),i[1][0]),t(e(t(e(r(i[3][2],i[4][3]),r(-i[3][3],i[4][2])),i[2][0]),e(t(e(r(i[3][0],i[4][3]),r(-i[3][3],i[4][0])),-i[2][2]),t(e(r(i[3][0],i[4][2]),r(-i[3][2],i[4][0])),i[2][3]))),-i[1][1])),e(t(e(t(e(r(i[3][1],i[4][3]),r(-i[3][3],i[4][1])),i[2][0]),e(t(e(r(i[3][0],i[4][3]),r(-i[3][3],i[4][0])),-i[2][1]),t(e(r(i[3][0],i[4][1]),r(-i[3][1],i[4][0])),i[2][3]))),i[1][2]),t(e(t(e(r(i[3][1],i[4][2]),r(-i[3][2],i[4][1])),i[2][0]),e(t(e(r(i[3][0],i[4][2]),r(-i[3][2],i[4][0])),-i[2][1]),t(e(r(i[3][0],i[4][1]),r(-i[3][1],i[4][0])),i[2][2]))),-i[1][3]))),i[0][4])))))}}function h(e){return(2===e?s:3===e?l:4===e?c:5===e?u:void 0)(i,a,n,o)}var f=[function(){return[0]},function(e){return[e[0][0]]}];function p(e,t,r,n,i,a,o,s){return function(l){switch(l.length){case 0:return e(l);case 1:return t(l);case 2:return r(l);case 3:return n(l);case 4:return i(l);case 5:return a(l)}var c=o[l.length];return c||(c=o[l.length]=s(l.length)),c(l)}}!function(){for(;f.length<6;)f.push(h(f.length));e.exports=p.apply(void 0,f.concat([f,h]));for(var t=0;t0){o=a[c][r][0],l=c;break}s=o[1^l];for(var h=0;h<2;++h)for(var f=a[h][r],p=0;p0&&(o=d,s=m,l=h)}return i||o&&u(o,l),s}function f(e,r){var i=a[r][e][0],o=[e];u(i,r);for(var s=i[1^r];;){for(;s!==e;)o.push(s),s=h(o[o.length-2],s,!1);if(a[0][e].length+a[1][e].length===0)break;var l=o[o.length-1],c=e,f=o[1],p=h(l,c,!0);if(n(t[l],t[c],t[f],t[p])<0)break;o.push(e),s=h(l,c)}return o}for(o=0;o0;){a[0][o].length;var m=f(o,p);(l=m)[1]===l[l.length-1]?d.push.apply(d,m):(d.length>0&&c.push(d),d=m)}d.length>0&&c.push(d)}return c};var n=r(3140)},3090:function(e,t,r){e.exports=function(e){var t=e.length;if(t<3){for(var r=new Array(t),i=0;i1&&n(e[o[u-2]],e[o[u-1]],c)<=0;)u-=1,o.pop();for(o.push(l),u=s.length;u>1&&n(e[s[u-2]],e[s[u-1]],c)>=0;)u-=1,s.pop();s.push(l)}r=new Array(s.length+o.length-2);for(var h=0,f=(i=0,o.length);i0;--p)r[h++]=s[p];return r};var n=r(3250)[3]},3105:function(e,t){function r(e){var t=32;return(e&=-e)&&t--,65535&e&&(t-=16),16711935&e&&(t-=8),252645135&e&&(t-=4),858993459&e&&(t-=2),1431655765&e&&(t-=1),t}t.INT_BITS=32,t.INT_MAX=2147483647,t.INT_MIN=-1<<31,t.sign=function(e){return(e>0)-(e<0)},t.abs=function(e){var t=e>>31;return(e^t)-t},t.min=function(e,t){return t^(e^t)&-(e65535)<<4,t|=r=((e>>>=t)>255)<<3,t|=r=((e>>>=r)>15)<<2,(t|=r=((e>>>=r)>3)<<1)|(e>>>=r)>>1},t.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0},t.popCount=function(e){return 16843009*((e=(858993459&(e-=e>>>1&1431655765))+(e>>>2&858993459))+(e>>>4)&252645135)>>>24},t.countTrailingZeros=r,t.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,1+((e|=e>>>8)|e>>>16)},t.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},t.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var n=new Array(256);(function(e){for(var t=0;t<256;++t){var r=t,n=t,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;e[t]=n<>>8&255]<<16|n[e>>>16&255]<<8|n[e>>>24&255]},t.interleave2=function(e,t){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))<<1},t.deinterleave2=function(e,t){return(e=65535&((e=16711935&((e=252645135&((e=858993459&((e=e>>>t&1431655765)|e>>>1))|e>>>2))|e>>>4))|e>>>16))<<16>>16},t.interleave3=function(e,t,r){return e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2),(e|=(t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},t.deinterleave3=function(e,t){return(e=1023&((e=4278190335&((e=251719695&((e=3272356035&((e=e>>>t&1227133513)|e>>>2))|e>>>4))|e>>>8))|e>>>16))<<22>>22},t.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>r(e)+1}},3126:function(e){e.exports=function(e){var t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},3134:function(e,t,r){e.exports=function(e,t){var r=e.length;if("number"!=typeof t){t=0;for(var i=0;i0||l(e,t,a)?-1:1:0===s?c>0||l(e,t,r)?1:-1:i(c-s)}var h=n(e,t,r);return h>0?o>0&&n(e,t,a)>0?1:-1:h<0?o>0||n(e,t,a)>0?1:-1:n(e,t,a)>0||l(e,t,r)?1:-1};var n=r(3250),i=r(8572),a=r(9362),o=r(5382),s=r(8210);function l(e,t,r){var n=a(e[0],-t[0]),i=a(e[1],-t[1]),l=a(r[0],-t[0]),c=a(r[1],-t[1]),u=s(o(n,l),o(i,c));return u[u.length-1]>=0}},3202:function(e){e.exports=function(e,t){t||(t=[0,""]),e=String(e);var r=parseFloat(e,10);return t[0]=r,t[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t}},3233:function(e){var t,r="";e.exports=function(e,n){if("string"!=typeof e)throw new TypeError("expected a string");if(1===n)return e;if(2===n)return e+e;var i=e.length*n;if(t!==e||typeof t>"u")t=e,r="";else if(r.length>=i)return r.substr(0,i);for(;i>r.length&&n>1;)1&n&&(r+=e),n>>=1,e+=e;return r=(r+=e).substr(0,i)}},3236:function(e){e.exports=function(e){"string"==typeof e&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],n=0;n0){if(a<=0)return o;n=i+a}else{if(!(i<0))return o;if(a>=0)return o;n=-(i+a)}var s=l*n;return o>=s||o<=-s?o:d(e,t,r)},function(e,t,r,n){var i=e[0]-n[0],a=t[0]-n[0],o=r[0]-n[0],s=e[1]-n[1],l=t[1]-n[1],u=r[1]-n[1],h=e[2]-n[2],f=t[2]-n[2],p=r[2]-n[2],d=a*u,g=o*l,y=o*s,v=i*u,x=i*l,_=a*s,b=h*(d-g)+f*(y-v)+p*(x-_),w=(Math.abs(d)+Math.abs(g))*Math.abs(h)+(Math.abs(y)+Math.abs(v))*Math.abs(f)+(Math.abs(x)+Math.abs(_))*Math.abs(p),T=c*w;return b>T||-b>T?b:m(e,t,r,n)}];function y(e){var t=g[e.length];return t||(t=g[e.length]=p(e.length)),t.apply(void 0,e)}function v(e,t,r,n,i,a,o){return function(t,r,s,l,c){switch(arguments.length){case 0:case 1:return 0;case 2:return n(t,r);case 3:return i(t,r,s);case 4:return a(t,r,s,l);case 5:return o(t,r,s,l,c)}for(var u=new Array(arguments.length),h=0;h4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+v);e["uniformMatrix"+y+"fv"](s[h],!1,f);break}throw new i("","Unknown uniform data type for "+name+": "+v)}if((y=v.charCodeAt(v.length-1)-48)<2||y>4)throw new i("","Invalid data type");switch(v.charAt(0)){case"b":case"i":e["uniform"+y+"iv"](s[h],f);break;case"v":e["uniform"+y+"fv"](s[h],f);break;default:throw new i("","Unrecognized data type for vector "+name+": "+v)}}}}}}function u(e,t){if("object"!=typeof t)return[[e,t]];var r=[];for(var n in t){var i=t[n],a=e;parseInt(n)+""===n?a+="["+n+"]":a+="."+n,"object"==typeof i?r.push.apply(r,u(a,i)):r.push([a,i])}return r}function h(e,t,n){if("object"==typeof n){var u=f(n);Object.defineProperty(e,t,{get:a(u),set:c(n),enumerable:!0,configurable:!1})}else s[n]?Object.defineProperty(e,t,{get:l(n),set:c(n),enumerable:!0,configurable:!1}):e[t]=function(e){switch(e){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":case"float":return 0;default:var t=e.indexOf("vec");if(0<=t&&t<=1&&e.length===4+t){if((r=e.charCodeAt(e.length-1)-48)<2||r>4)throw new i("","Invalid data type");return"b"===e.charAt(0)?o(r,!1):o(r,0)}if(0===e.indexOf("mat")&&4===e.length){var r;if((r=e.charCodeAt(e.length-1)-48)<2||r>4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+e);return o(r*r,0)}throw new i("","Unknown uniform data type for "+name+": "+e)}}(r[n].type)}function f(e){var t;if(Array.isArray(e)){t=new Array(e.length);for(var r=0;r=0!=p>=0&&i.push(l[0]+.5+.5*(f+p)/(f-p)),n+=h,++l[0]}}};e.exports=(t=n.bind(void 0,{funcName:"zeroCrossings"}),r={},function(e,n,i){var a=e.dtype,o=e.order,s=[a,o.join()].join(),l=r[s];return l||(r[s]=l=t([a,o])),l(e.shape.slice(0),e.data,e.stride,0|e.offset,n,i)})},3352:function(e,t,r){var n=r(2478);function i(e,t,r,n,i){this.mid=e,this.left=t,this.right=r,this.leftPoints=n,this.rightPoints=i,this.count=(t?t.count:0)+(r?r.count:0)+n.length}e.exports=function(e){return e&&0!==e.length?new y(g(e)):new y(null)};var a=i.prototype;function o(e,t){e.mid=t.mid,e.left=t.left,e.right=t.right,e.leftPoints=t.leftPoints,e.rightPoints=t.rightPoints,e.count=t.count}function s(e,t){var r=g(t);e.mid=r.mid,e.left=r.left,e.right=r.right,e.leftPoints=r.leftPoints,e.rightPoints=r.rightPoints,e.count=r.count}function l(e,t){var r=e.intervals([]);r.push(t),s(e,r)}function c(e,t){var r=e.intervals([]),n=r.indexOf(t);return n<0?0:(r.splice(n,1),s(e,r),1)}function u(e,t,r){for(var n=0;n=0&&e[n][1]>=t;--n){var i=r(e[n]);if(i)return i}}function f(e,t){for(var r=0;r>1],a=[],o=[],s=[];for(r=0;r3*(t+1)?l(this,e):this.left.insert(e):this.left=g([e]);else if(e[0]>this.mid)this.right?4*(this.right.count+1)>3*(t+1)?l(this,e):this.right.insert(e):this.right=g([e]);else{var r=n.ge(this.leftPoints,e,d),i=n.ge(this.rightPoints,e,m);this.leftPoints.splice(r,0,e),this.rightPoints.splice(i,0,e)}},a.remove=function(e){var t=this.count-this.leftPoints;if(e[1]3*(t-1)?c(this,e):2===(s=this.left.remove(e))?(this.left=null,this.count-=1,1):(1===s&&(this.count-=1),s):0;if(e[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(t-1)?c(this,e):2===(s=this.right.remove(e))?(this.right=null,this.count-=1,1):(1===s&&(this.count-=1),s):0;if(1===this.count)return this.leftPoints[0]===e?2:0;if(1===this.leftPoints.length&&this.leftPoints[0]===e){if(this.left&&this.right){for(var r=this,i=this.left;i.right;)r=i,i=i.right;if(r===this)i.right=this.right;else{var a=this.left,s=this.right;r.count-=i.count,r.right=i.left,i.left=a,i.right=s}o(this,i),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?o(this,this.left):o(this,this.right);return 1}for(a=n.ge(this.leftPoints,e,d);athis.mid?this.right&&(r=this.right.queryPoint(e,t))?r:h(this.rightPoints,e,t):f(this.leftPoints,t);var r},a.queryInterval=function(e,t,r){var n;return ethis.mid&&this.right&&(n=this.right.queryInterval(e,t,r))?n:tthis.mid?h(this.rightPoints,e,r):f(this.leftPoints,r)};var v=y.prototype;v.insert=function(e){this.root?this.root.insert(e):this.root=new i(e[0],null,null,[e],[e])},v.remove=function(e){if(this.root){var t=this.root.remove(e);return 2===t&&(this.root=null),0!==t}return!1},v.queryPoint=function(e,t){if(this.root)return this.root.queryPoint(e,t)},v.queryInterval=function(e,t,r){if(e<=t&&this.root)return this.root.queryInterval(e,t,r)},Object.defineProperty(v,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(v,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},3387:function(e,t,r){var n;!function(){var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function a(e){return function(e,t){var r,n,o,s,l,c,u,h,f,p=1,d=e.length,m="";for(n=0;n=0),s.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,s.width?parseInt(s.width):0);break;case"e":r=s.precision?parseFloat(r).toExponential(s.precision):parseFloat(r).toExponential();break;case"f":r=s.precision?parseFloat(r).toFixed(s.precision):parseFloat(r);break;case"g":r=s.precision?String(Number(r.toPrecision(s.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=s.precision?r.substring(0,s.precision):r;break;case"t":r=String(!!r),r=s.precision?r.substring(0,s.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=s.precision?r.substring(0,s.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=s.precision?r.substring(0,s.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?m+=r:(!i.number.test(s.type)||h&&!s.sign?f="":(f=h?"+":"-",r=r.toString().replace(i.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",u=s.width-(f+r).length,l=s.width&&u>0?c.repeat(u):"",m+=s.align?f+r+l:"0"===c?f+l+r:l+f+r)}return m}(function(e){if(s[e])return s[e];for(var t,r=e,n=[],a=0;r;){if(null!==(t=i.text.exec(r)))n.push(t[0]);else if(null!==(t=i.modulo.exec(r)))n.push("%");else{if(null===(t=i.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){a|=1;var o=[],l=t[2],c=[];if(null===(c=i.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(o.push(c[1]);""!==(l=l.substring(c[0].length));)if(null!==(c=i.key_access.exec(l)))o.push(c[1]);else{if(null===(c=i.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");o.push(c[1])}t[2]=o}else a|=2;if(3===a)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}r=r.substring(t[0].length)}return s[e]=n}(e),arguments)}function o(e,t){return a.apply(null,[e].concat(t||[]))}var s=Object.create(null);t.sprintf=a,t.vsprintf=o,typeof window<"u"&&(window.sprintf=a,window.vsprintf=o,void 0!==(n=function(){return{sprintf:a,vsprintf:o}}.call(t,r,t,e))&&(e.exports=n))}()},3390:function(e){e.exports=function(e,t,r,n){var i=new Float32Array(4);return i[0]=e,i[1]=t,i[2]=r,i[3]=n,i}},3436:function(e,t,r){var n=r(3236),i=r(9405),a=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, offset;\nattribute vec4 color;\nuniform mat4 model, view, projection;\nuniform float capSize;\nvarying vec4 fragColor;\nvarying vec3 fragPosition;\n\nvoid main() {\n vec4 worldPosition = model * vec4(position, 1.0);\n worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);\n gl_Position = projection * (view * worldPosition);\n fragColor = color;\n fragPosition = position;\n}"]),o=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float opacity;\nvarying vec3 fragPosition;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], fragPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n gl_FragColor = opacity * fragColor;\n}"]);e.exports=function(e){return i(e,a,o,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},3502:function(e,t,r){e.exports=function(e,t){return i(n(e,t))};var n=r(5995),i=r(9127)},3508:function(e,t,r){var n=r(6852);n=n.slice().filter((function(e){return!/^(gl\_|texture)/.test(e)})),e.exports=n.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},3536:function(e){e.exports=function(e,t){var r=t[0],n=t[1],i=t[2],a=r*r+n*n+i*i;return a>0&&(a=1/Math.sqrt(a),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a),e}},3545:function(e,t,r){e.exports=function(e,t,r,o,s,l){if(o<=r+1)return r;for(var c=r,u=o,h=o+r>>>1,f=2*e,p=h,d=s[f*h+t];c=x?(p=v,d=x):y>=b?(p=g,d=y):(p=_,d=b):x>=b?(p=v,d=x):b>=y?(p=g,d=y):(p=_,d=b);for(var w=f*(u-1),T=f*p,k=0;kr&&i[h+t]>c;--u,h-=o){for(var f=h,p=h+o,d=0;dthis.buffer.length){i.free(this.buffer);for(var n=this.buffer=i.mallocUint8(o(r*t*4)),a=0;an|0},vertex:function(e,t,r,n,i,a,o,s,l,c,u,h,f){var p=(0|o)+(s<<1)+(l<<2)+(c<<3)|0;if(0!==p&&15!==p)switch(p){case 0:case 15:u.push([e-.5,t-.5]);break;case 1:u.push([e-.25-.25*(n+r-2*f)/(r-n),t-.25-.25*(i+r-2*f)/(r-i)]);break;case 2:u.push([e-.75-.25*(-n-r+2*f)/(n-r),t-.25-.25*(a+n-2*f)/(n-a)]);break;case 3:u.push([e-.5,t-.5-.5*(i+r+a+n-4*f)/(r-i+n-a)]);break;case 4:u.push([e-.25-.25*(a+i-2*f)/(i-a),t-.75-.25*(-i-r+2*f)/(i-r)]);break;case 5:u.push([e-.5-.5*(n+r+a+i-4*f)/(r-n+i-a),t-.5]);break;case 6:u.push([e-.5-.25*(-n-r+a+i)/(n-r+i-a),t-.5-.25*(-i-r+a+n)/(i-r+n-a)]);break;case 7:u.push([e-.75-.25*(a+i-2*f)/(i-a),t-.75-.25*(a+n-2*f)/(n-a)]);break;case 8:u.push([e-.75-.25*(-a-i+2*f)/(a-i),t-.75-.25*(-a-n+2*f)/(a-n)]);break;case 9:u.push([e-.5-.25*(n+r+-a-i)/(r-n+a-i),t-.5-.25*(i+r+-a-n)/(r-i+a-n)]);break;case 10:u.push([e-.5-.5*(-n-r-a-i+4*f)/(n-r+a-i),t-.5]);break;case 11:u.push([e-.25-.25*(-a-i+2*f)/(a-i),t-.75-.25*(i+r-2*f)/(r-i)]);break;case 12:u.push([e-.5,t-.5-.5*(-i-r-a-n+4*f)/(i-r+a-n)]);break;case 13:u.push([e-.75-.25*(n+r-2*f)/(r-n),t-.25-.25*(-a-n+2*f)/(a-n)]);break;case 14:u.push([e-.25-.25*(-n-r+2*f)/(n-r),t-.25-.25*(-i-r+2*f)/(i-r)])}},cell:function(e,t,r,n,i,a,o,s,l){i?s.push([e,t]):s.push([t,e])}});return function(e,t){var r=[],i=[];return n(e,r,i,t),{positions:r,cells:i}}}},o={}},3750:function(e){e.exports=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}},3778:function(e,t){t.read=function(e,t,r,n,i){var a,o,s=8*i-n-1,l=(1<>1,u=-7,h=r?i-1:0,f=r?-1:1,p=e[t+h];for(h+=f,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=256*a+e[t+h],h+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=n;u>0;o=256*o+e[t+h],h+=f,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=c}return(p?-1:1)*o*Math.pow(2,a-n)},t.write=function(e,t,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+h>=1?f/l:f*Math.pow(2,1-h))*l>=2&&(o++,l/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(t*l-1)*Math.pow(2,i),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;e[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<0;e[r+p]=255&o,p+=d,o/=256,c-=8);e[r+p-d]|=128*m}},3788:function(e,t,r){var n=r(8507),i=r(2419);e.exports=function(e,t){return n(e,t)||i(e)-i(t)}},3837:function(e,t,r){e.exports=function(e,t){var r=new p(e);return r.update(t),r};var n=r(4935),i=r(501),a=r(5304),o=r(6429),s=r(6444),l=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),c=ArrayBuffer,u=DataView;function h(e){return Array.isArray(e)||function(e){return c.isView(e)&&!(e instanceof u)}(e)}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function p(e){this.gl=e,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=a(e)}var d=p.prototype;function m(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}d.update=function(e){function t(t,r,n){if(n in e){var i,a=e[n],o=this[n];(t?h(a)&&h(a[0]):h(a))?this[n]=i=[r(a[0]),r(a[1]),r(a[2])]:this[n]=i=[r(a),r(a),r(a)];for(var s=0;s<3;++s)if(i[s]!==o[s])return!0}return!1}e=e||{};var r,a=t.bind(this,!1,Number),o=t.bind(this,!1,Boolean),l=t.bind(this,!1,String),c=t.bind(this,!0,(function(e){if(h(e)){if(3===e.length)return[+e[0],+e[1],+e[2],1];if(4===e.length)return[+e[0],+e[1],+e[2],+e[3]]}return[0,0,0,1]})),u=!1,f=!1;if("bounds"in e)for(var p=e.bounds,d=0;d<2;++d)for(var m=0;m<3;++m)p[d][m]!==this.bounds[d][m]&&(f=!0),this.bounds[d][m]=p[d][m];if("ticks"in e)for(r=e.ticks,u=!0,this.autoTicks=!1,d=0;d<3;++d)this.tickSpacing[d]=0;else a("tickSpacing")&&(this.autoTicks=!0,f=!0);if(this._firstInit&&("ticks"in e||"tickSpacing"in e||(this.autoTicks=!0),f=!0,u=!0,this._firstInit=!1),f&&this.autoTicks&&(r=s.create(this.bounds,this.tickSpacing),u=!0),u){for(d=0;d<3;++d)r[d].sort((function(e,t){return e.x-t.x}));s.equal(r,this.ticks)?u=!1:this.ticks=r}o("tickEnable"),l("tickFont")&&(u=!0),l("tickFontStyle")&&(u=!0),l("tickFontWeight")&&(u=!0),l("tickFontVariant")&&(u=!0),a("tickSize"),a("tickAngle"),a("tickPad"),c("tickColor");var g=l("labels");l("labelFont")&&(g=!0),l("labelFontStyle")&&(g=!0),l("labelFontWeight")&&(g=!0),l("labelFontVariant")&&(g=!0),o("labelEnable"),a("labelSize"),a("labelPad"),c("labelColor"),o("lineEnable"),o("lineMirror"),a("lineWidth"),c("lineColor"),o("lineTickEnable"),o("lineTickMirror"),a("lineTickLength"),a("lineTickWidth"),c("lineTickColor"),o("gridEnable"),a("gridWidth"),c("gridColor"),o("zeroEnable"),c("zeroLineColor"),a("zeroLineWidth"),o("backgroundEnable"),c("backgroundColor");var y=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],v=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(g||u)&&this._text.update(this.bounds,this.labels,y,this.ticks,v):this._text=n(this.gl,this.bounds,this.labels,y,this.ticks,v),this._lines&&u&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=i(this.gl,this.bounds,this.ticks))};var g=[new m,new m,new m];function y(e,t,r,n,i){for(var a=e.primalOffset,o=e.primalMinor,s=e.mirrorOffset,l=e.mirrorMinor,c=n[t],u=0;u<3;++u)if(t!==u){var h=a,f=s,p=o,d=l;c&1<0?(p[u]=-1,d[u]=0):(p[u]=0,d[u]=1)}}var v=[0,0,0],x={model:l,view:l,projection:l,_ortho:!1};d.isOpaque=function(){return!0},d.isTransparent=function(){return!1},d.drawTransparent=function(e){};var _=[0,0,0],b=[0,0,0],w=[0,0,0];d.draw=function(e){e=e||x;for(var t=this.gl,r=e.model||l,n=e.view||l,i=e.projection||l,a=this.bounds,s=e._ortho||!1,c=o(r,n,i,a,s),u=c.cubeEdges,h=c.axis,p=n[12],d=n[13],m=n[14],T=n[15],k=(s?2:1)*this.pixelRatio*(i[3]*p+i[7]*d+i[11]*m+i[15]*T)/t.drawingBufferHeight,A=0;A<3;++A)this.lastCubeProps.cubeEdges[A]=u[A],this.lastCubeProps.axis[A]=h[A];var M=g;for(A=0;A<3;++A)y(g[A],A,this.bounds,u,h);t=this.gl;var S,E,C,I,L,P,z,D,O,R,F,B,j=v;for(A=0;A<3;++A)this.backgroundEnable[A]?j[A]=h[A]:j[A]=0;for(this._background.draw(r,n,i,a,j,this.backgroundColor),this._lines.bind(r,n,i,this),A=0;A<3;++A){var N=[0,0,0];h[A]>0?N[A]=a[1][A]:N[A]=a[0][A];for(var U=0;U<2;++U){var V=(A+1+U)%3,q=(A+1+(1^U))%3;this.gridEnable[V]&&this._lines.drawGrid(V,q,this.bounds,N,this.gridColor[V],this.gridWidth[V]*this.pixelRatio)}for(U=0;U<2;++U)V=(A+1+U)%3,q=(A+1+(1^U))%3,this.zeroEnable[q]&&Math.min(a[0][q],a[1][q])<=0&&Math.max(a[0][q],a[1][q])>=0&&this._lines.drawZero(V,q,this.bounds,N,this.zeroLineColor[q],this.zeroLineWidth[q]*this.pixelRatio)}for(A=0;A<3;++A){this.lineEnable[A]&&this._lines.drawAxisLine(A,this.bounds,M[A].primalOffset,this.lineColor[A],this.lineWidth[A]*this.pixelRatio),this.lineMirror[A]&&this._lines.drawAxisLine(A,this.bounds,M[A].mirrorOffset,this.lineColor[A],this.lineWidth[A]*this.pixelRatio);var H=f(_,M[A].primalMinor),G=f(b,M[A].mirrorMinor),W=this.lineTickLength;for(U=0;U<3;++U){var Z=k/r[5*U];H[U]*=W[U]*Z,G[U]*=W[U]*Z}this.lineTickEnable[A]&&this._lines.drawAxisTicks(A,M[A].primalOffset,H,this.lineTickColor[A],this.lineTickWidth[A]*this.pixelRatio),this.lineTickMirror[A]&&this._lines.drawAxisTicks(A,M[A].mirrorOffset,G,this.lineTickColor[A],this.lineTickWidth[A]*this.pixelRatio)}function Y(e){(C=[0,0,0])[e]=1}for(this._lines.unbind(),this._text.bind(r,n,i,this.pixelRatio),A=0;A<3;++A){var X=M[A].primalMinor,$=M[A].mirrorMinor,K=f(w,M[A].primalOffset);for(U=0;U<3;++U)this.lineTickEnable[A]&&(K[U]+=k*X[U]*Math.max(this.lineTickLength[U],0)/r[5*U]);var J=[0,0,0];if(J[A]=1,this.tickEnable[A]){for(-3600===this.tickAngle[A]?(this.tickAngle[A]=0,this.tickAlign[A]="auto"):this.tickAlign[A]=-1,E=1,"auto"===(S=[this.tickAlign[A],.5,E])[0]?S[0]=0:S[0]=parseInt(""+S[0]),C=[0,0,0],P=$,void 0,void 0,void 0,void 0,void 0,void 0,D=((I=A)+2)%3,O=(L=X)[z=(I+1)%3],R=L[D],F=P[z],B=P[D],O>0&&B>0||O>0&&B<0||O<0&&B>0||O<0&&B<0?Y(z):(R>0&&F>0||R>0&&F<0||R<0&&F>0||R<0&&F<0)&&Y(D),U=0;U<3;++U)K[U]+=k*X[U]*this.tickPad[U]/r[5*U];this._text.drawTicks(A,this.tickSize[A],this.tickAngle[A],K,this.tickColor[A],J,C,S)}if(this.labelEnable[A]){for(E=0,C=[0,0,0],this.labels[A].length>4&&(Y(A),E=1),"auto"===(S=[this.labelAlign[A],.5,E])[0]?S[0]=0:S[0]=parseInt(""+S[0]),U=0;U<3;++U)K[U]+=k*X[U]*this.labelPad[U]/r[5*U];K[A]+=.5*(a[0][A]+a[1][A]),this._text.drawLabel(A,this.labelSize[A],this.labelAngle[A],K,this.labelColor[A],[0,0,0],C,S)}}this._text.unbind()},d.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},3840:function(e){function t(e,t,r,n,i,a){this._color=e,this.key=t,this.value=r,this.left=n,this.right=i,this._count=a}function r(e){return new t(e._color,e.key,e.value,e.left,e.right,e._count)}function n(e,r){return new t(e,r.key,r.value,r.left,r.right,r._count)}function i(e){e._count=1+(e.left?e.left._count:0)+(e.right?e.right._count:0)}function a(e,t){this._compare=e,this.root=t}e.exports=function(e){return new a(e||p,null)};var o=a.prototype;function s(e,t){var r;return t.left&&(r=s(e,t.left))?r:(r=e(t.key,t.value))||(t.right?s(e,t.right):void 0)}function l(e,t,r,n){if(t(e,n.key)<=0){var i;if(n.left&&(i=l(e,t,r,n.left)))return i;if(i=r(n.key,n.value))return i}if(n.right)return l(e,t,r,n.right)}function c(e,t,r,n,i){var a,o=r(e,i.key),s=r(t,i.key);return o<=0&&(i.left&&(a=c(e,t,r,n,i.left))||s>0&&(a=n(i.key,i.value)))?a:s>0&&i.right?c(e,t,r,n,i.right):void 0}function u(e,t){this.tree=e,this._stack=t}Object.defineProperty(o,"keys",{get:function(){var e=[];return this.forEach((function(t,r){e.push(t)})),e}}),Object.defineProperty(o,"values",{get:function(){var e=[];return this.forEach((function(t,r){e.push(r)})),e}}),Object.defineProperty(o,"length",{get:function(){return this.root?this.root._count:0}}),o.insert=function(e,r){for(var o=this._compare,s=this.root,l=[],c=[];s;){var u=o(e,s.key);l.push(s),c.push(u),s=u<=0?s.left:s.right}l.push(new t(0,e,r,null,null,1));for(var h=l.length-2;h>=0;--h)s=l[h],c[h]<=0?l[h]=new t(s._color,s.key,s.value,l[h+1],s.right,s._count+1):l[h]=new t(s._color,s.key,s.value,s.left,l[h+1],s._count+1);for(h=l.length-1;h>1;--h){var f=l[h-1];if(s=l[h],1===f._color||1===s._color)break;var p=l[h-2];if(p.left===f)if(f.left===s){if(!(d=p.right)||0!==d._color){p._color=0,p.left=f.right,f._color=1,f.right=p,l[h-2]=f,l[h-1]=s,i(p),i(f),h>=3&&((m=l[h-3]).left===p?m.left=f:m.right=f);break}f._color=1,p.right=n(1,d),p._color=0,h-=1}else{if(!(d=p.right)||0!==d._color){f.right=s.left,p._color=0,p.left=s.right,s._color=1,s.left=f,s.right=p,l[h-2]=s,l[h-1]=f,i(p),i(f),i(s),h>=3&&((m=l[h-3]).left===p?m.left=s:m.right=s);break}f._color=1,p.right=n(1,d),p._color=0,h-=1}else if(f.right===s){if(!(d=p.left)||0!==d._color){p._color=0,p.right=f.left,f._color=1,f.left=p,l[h-2]=f,l[h-1]=s,i(p),i(f),h>=3&&((m=l[h-3]).right===p?m.right=f:m.left=f);break}f._color=1,p.left=n(1,d),p._color=0,h-=1}else{var d;if(!(d=p.left)||0!==d._color){var m;f.left=s.right,p._color=0,p.right=s.left,s._color=1,s.right=f,s.left=p,l[h-2]=s,l[h-1]=f,i(p),i(f),i(s),h>=3&&((m=l[h-3]).right===p?m.right=s:m.left=s);break}f._color=1,p.left=n(1,d),p._color=0,h-=1}}return l[0]._color=1,new a(o,l[0])},o.forEach=function(e,t,r){if(this.root)switch(arguments.length){case 1:return s(e,this.root);case 2:return l(t,this._compare,e,this.root);case 3:return this._compare(t,r)>=0?void 0:c(t,r,this._compare,e,this.root)}},Object.defineProperty(o,"begin",{get:function(){for(var e=[],t=this.root;t;)e.push(t),t=t.left;return new u(this,e)}}),Object.defineProperty(o,"end",{get:function(){for(var e=[],t=this.root;t;)e.push(t),t=t.right;return new u(this,e)}}),o.at=function(e){if(e<0)return new u(this,[]);for(var t=this.root,r=[];;){if(r.push(t),t.left){if(e=t.right._count)break;t=t.right}return new u(this,[])},o.ge=function(e){for(var t=this._compare,r=this.root,n=[],i=0;r;){var a=t(e,r.key);n.push(r),a<=0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new u(this,n)},o.gt=function(e){for(var t=this._compare,r=this.root,n=[],i=0;r;){var a=t(e,r.key);n.push(r),a<0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new u(this,n)},o.lt=function(e){for(var t=this._compare,r=this.root,n=[],i=0;r;){var a=t(e,r.key);n.push(r),a>0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new u(this,n)},o.le=function(e){for(var t=this._compare,r=this.root,n=[],i=0;r;){var a=t(e,r.key);n.push(r),a>=0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new u(this,n)},o.find=function(e){for(var t=this._compare,r=this.root,n=[];r;){var i=t(e,r.key);if(n.push(r),0===i)return new u(this,n);r=i<=0?r.left:r.right}return new u(this,[])},o.remove=function(e){var t=this.find(e);return t?t.remove():this},o.get=function(e){for(var t=this._compare,r=this.root;r;){var n=t(e,r.key);if(0===n)return r.value;r=n<=0?r.left:r.right}};var h=u.prototype;function f(e,t){e.key=t.key,e.value=t.value,e.left=t.left,e.right=t.right,e._color=t._color,e._count=t._count}function p(e,t){return et?1:0}Object.defineProperty(h,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(h,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),h.clone=function(){return new u(this.tree,this._stack.slice())},h.remove=function(){var e=this._stack;if(0===e.length)return this.tree;var o=new Array(e.length),s=e[e.length-1];o[o.length-1]=new t(s._color,s.key,s.value,s.left,s.right,s._count);for(var l=e.length-2;l>=0;--l)(s=e[l]).left===e[l+1]?o[l]=new t(s._color,s.key,s.value,o[l+1],s.right,s._count):o[l]=new t(s._color,s.key,s.value,s.left,o[l+1],s._count);if((s=o[o.length-1]).left&&s.right){var c=o.length;for(s=s.left;s.right;)o.push(s),s=s.right;var u=o[c-1];for(o.push(new t(s._color,u.key,u.value,s.left,s.right,s._count)),o[c-1].key=s.key,o[c-1].value=s.value,l=o.length-2;l>=c;--l)s=o[l],o[l]=new t(s._color,s.key,s.value,s.left,o[l+1],s._count);o[c-1].left=o[c]}if(0===(s=o[o.length-1])._color){var h=o[o.length-2];for(h.left===s?h.left=null:h.right===s&&(h.right=null),o.pop(),l=0;l=0;--l){if(t=e[l],0===l)return void(t._color=1);if((a=e[l-1]).left===t){if((o=a.right).right&&0===o.right._color)return s=(o=a.right=r(o)).right=r(o.right),a.right=o.left,o.left=a,o.right=s,o._color=a._color,t._color=1,a._color=1,s._color=1,i(a),i(o),l>1&&((c=e[l-2]).left===a?c.left=o:c.right=o),void(e[l-1]=o);if(o.left&&0===o.left._color)return s=(o=a.right=r(o)).left=r(o.left),a.right=s.left,o.left=s.right,s.left=a,s.right=o,s._color=a._color,a._color=1,o._color=1,t._color=1,i(a),i(o),i(s),l>1&&((c=e[l-2]).left===a?c.left=s:c.right=s),void(e[l-1]=s);if(1===o._color){if(0===a._color)return a._color=1,void(a.right=n(0,o));a.right=n(0,o);continue}o=r(o),a.right=o.left,o.left=a,o._color=a._color,a._color=0,i(a),i(o),l>1&&((c=e[l-2]).left===a?c.left=o:c.right=o),e[l-1]=o,e[l]=a,l+11&&((c=e[l-2]).right===a?c.right=o:c.left=o),void(e[l-1]=o);if(o.right&&0===o.right._color)return s=(o=a.left=r(o)).right=r(o.right),a.left=s.right,o.right=s.left,s.right=a,s.left=o,s._color=a._color,a._color=1,o._color=1,t._color=1,i(a),i(o),i(s),l>1&&((c=e[l-2]).right===a?c.right=s:c.left=s),void(e[l-1]=s);if(1===o._color){if(0===a._color)return a._color=1,void(a.left=n(0,o));a.left=n(0,o);continue}var c;o=r(o),a.left=o.right,o.right=a,o._color=a._color,a._color=0,i(a),i(o),l>1&&((c=e[l-2]).right===a?c.right=o:c.left=o),e[l-1]=o,e[l]=a,l+10)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(h,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(h,"index",{get:function(){var e=0,t=this._stack;if(0===t.length){var r=this.tree.root;return r?r._count:0}t[t.length-1].left&&(e=t[t.length-1].left._count);for(var n=t.length-2;n>=0;--n)t[n+1]===t[n].right&&(++e,t[n].left&&(e+=t[n].left._count));return e},enumerable:!0}),h.next=function(){var e=this._stack;if(0!==e.length){var t=e[e.length-1];if(t.right)for(t=t.right;t;)e.push(t),t=t.left;else for(e.pop();e.length>0&&e[e.length-1].right===t;)t=e[e.length-1],e.pop()}},Object.defineProperty(h,"hasNext",{get:function(){var e=this._stack;if(0===e.length)return!1;if(e[e.length-1].right)return!0;for(var t=e.length-1;t>0;--t)if(e[t-1].left===e[t])return!0;return!1}}),h.update=function(e){var r=this._stack;if(0===r.length)throw new Error("Can't update empty node!");var n=new Array(r.length),i=r[r.length-1];n[n.length-1]=new t(i._color,i.key,e,i.left,i.right,i._count);for(var o=r.length-2;o>=0;--o)(i=r[o]).left===r[o+1]?n[o]=new t(i._color,i.key,i.value,n[o+1],i.right,i._count):n[o]=new t(i._color,i.key,i.value,i.left,n[o+1],i._count);return new a(this.tree._compare,n[0])},h.prev=function(){var e=this._stack;if(0!==e.length){var t=e[e.length-1];if(t.left)for(t=t.left;t;)e.push(t),t=t.right;else for(e.pop();e.length>0&&e[e.length-1].left===t;)t=e[e.length-1],e.pop()}},Object.defineProperty(h,"hasPrev",{get:function(){var e=this._stack;if(0===e.length)return!1;if(e[e.length-1].left)return!0;for(var t=e.length-1;t>0;--t)if(e[t-1].right===e[t])return!0;return!1}})},3865:function(e,t,r){var n=r(869);e.exports=function(e,t){return n(e[0].mul(t[1]).add(t[0].mul(e[1])),e[1].mul(t[1]))}},3952:function(e,t,r){e.exports=function(e){var t=e.length;if(0===t)return[];if(1===t)return[0];for(var r=e[0].length,n=[e[0]],a=[0],o=1;o20?52:r+32}},4040:function(e){e.exports=function(e,t,r,n,i,a,o){var s=1/(t-r),l=1/(n-i),c=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*s,e[13]=(i+n)*l,e[14]=(o+a)*c,e[15]=1,e}},4041:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[0],s=r[1],l=r[2],c=r[3],u=c*n+s*a-l*i,h=c*i+l*n-o*a,f=c*a+o*i-s*n,p=-o*n-s*i-l*a;return e[0]=u*c+p*-o+h*-l-f*-s,e[1]=h*c+p*-s+f*-o-u*-l,e[2]=f*c+p*-l+u*-s-h*-o,e[3]=t[3],e}},4081:function(e){e.exports=function(e,t,r,n,i,a,o,s,l,c){var u=t+a+c;if(h>0){var h=Math.sqrt(u+1);e[0]=.5*(o-l)/h,e[1]=.5*(s-n)/h,e[2]=.5*(r-a)/h,e[3]=.5*h}else{var f=Math.max(t,a,c);h=Math.sqrt(2*f-u+1),t>=f?(e[0]=.5*h,e[1]=.5*(i+r)/h,e[2]=.5*(s+n)/h,e[3]=.5*(o-l)/h):a>=f?(e[0]=.5*(r+i)/h,e[1]=.5*h,e[2]=.5*(l+o)/h,e[3]=.5*(s-n)/h):(e[0]=.5*(n+s)/h,e[1]=.5*(o+l)/h,e[2]=.5*h,e[3]=.5*(r-i)/h)}return e}},4100:function(e,t,r){var n=r(4437),i=r(3837),a=r(5445),o=r(4449),s=r(3589),l=r(2260),c=r(7169),u=r(351),h=r(4772),f=r(4040),p=r(799),d=r(9216)({tablet:!0,featureDetect:!0});function m(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function g(e){var t=Math.round(Math.log(Math.abs(e))/Math.log(10));if(t<0){var r=Math.round(Math.pow(10,-t));return Math.ceil(e*r)/r}return t>0?(r=Math.round(Math.pow(10,t)),Math.ceil(e/r)*r):Math.ceil(e)}function y(e){return"boolean"!=typeof e||e}e.exports={createScene:function(e){(e=e||{}).camera=e.camera||{};var t=e.canvas;t||(t=document.createElement("canvas"),e.container?e.container.appendChild(t):document.body.appendChild(t));var r=e.gl;if(r||(e.glOptions&&(d=!!e.glOptions.preserveDrawingBuffer),r=function(e,t){var r=null;try{(r=e.getContext("webgl",t))||(r=e.getContext("experimental-webgl",t))}catch{return null}return r}(t,e.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:d})),!r)throw new Error("webgl not supported");var v=e.bounds||[[-10,-10,-10],[10,10,10]],x=new m,_=l(r,r.drawingBufferWidth,r.drawingBufferHeight,{preferFloat:!d}),b=p(r),w=e.cameraObject&&!0===e.cameraObject._ortho||e.camera.projection&&"orthographic"===e.camera.projection.type||!1,T={eye:e.camera.eye||[2,0,0],center:e.camera.center||[0,0,0],up:e.camera.up||[0,1,0],zoomMin:e.camera.zoomMax||.1,zoomMax:e.camera.zoomMin||100,mode:e.camera.mode||"turntable",_ortho:w},k=e.axes||{},A=i(r,k);A.enable=!k.disable;var M=e.spikes||{},S=o(r,M),E=[],C=[],I=[],L=[],P=!0,z=!0,D={view:null,projection:new Array(16),model:new Array(16),_ortho:!1},O=(z=!0,[r.drawingBufferWidth,r.drawingBufferHeight]),R=e.cameraObject||n(t,T),F={gl:r,contextLost:!1,pixelRatio:e.pixelRatio||1,canvas:t,selection:x,camera:R,axes:A,axesPixels:null,spikes:S,bounds:v,objects:E,shape:O,aspect:e.aspectRatio||[1,1,1],pickRadius:e.pickRadius||10,zNear:e.zNear||.01,zFar:e.zFar||1e3,fovy:e.fovy||Math.PI/4,clearColor:e.clearColor||[0,0,0,0],autoResize:y(e.autoResize),autoBounds:y(e.autoBounds),autoScale:!!e.autoScale,autoCenter:y(e.autoCenter),clipToBounds:y(e.clipToBounds),snapToData:!!e.snapToData,onselect:e.onselect||null,onrender:e.onrender||null,onclick:e.onclick||null,cameraParams:D,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(e){this.aspect[0]=e.x,this.aspect[1]=e.y,this.aspect[2]=e.z,z=!0},setBounds:function(e,t){this.bounds[0][e]=t.min,this.bounds[1][e]=t.max},setClearColor:function(e){this.clearColor=e},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},B=[r.drawingBufferWidth/F.pixelRatio|0,r.drawingBufferHeight/F.pixelRatio|0];function j(){if(!F._stopped&&F.autoResize){var e=t.parentNode,r=1,n=1;e&&e!==document.body?(r=e.clientWidth,n=e.clientHeight):(r=window.innerWidth,n=window.innerHeight);var i=0|Math.ceil(r*F.pixelRatio),a=0|Math.ceil(n*F.pixelRatio);if(i!==t.width||a!==t.height){t.width=i,t.height=a;var o=t.style;o.position=o.position||"absolute",o.left="0px",o.top="0px",o.width=r+"px",o.height=n+"px",P=!0}}}function N(){for(var e=E.length,t=L.length,n=0;n0&&0===I[t-1];)I.pop(),L.pop().dispose()}function U(){if(F.contextLost)return!0;r.isContextLost()&&(F.contextLost=!0,F.mouseListener.enabled=!1,F.selection.object=null,F.oncontextloss&&F.oncontextloss())}F.autoResize&&j(),window.addEventListener("resize",j),F.update=function(e){F._stopped||(e=e||{},P=!0,z=!0)},F.add=function(e){F._stopped||(e.axes=A,E.push(e),C.push(-1),P=!0,z=!0,N())},F.remove=function(e){if(!F._stopped){var t=E.indexOf(e);t<0||(E.splice(t,1),C.pop(),P=!0,z=!0,N())}},F.dispose=function(){if(!F._stopped&&(F._stopped=!0,window.removeEventListener("resize",j),t.removeEventListener("webglcontextlost",U),F.mouseListener.enabled=!1,!F.contextLost)){A.dispose(),S.dispose();for(var e=0;ex.distance)continue;for(var c=0;ce;){var c=r[l-2],u=r[l-1];if(cr[t+1])}function l(e,t,r,n){var i=n[e*=2];return i>1,g=m-f,y=m+f,v=p,x=g,_=m,b=y,w=d,T=e+1,k=u-1,A=0;s(v,x,h)&&(A=v,v=x,x=A),s(b,w,h)&&(A=b,b=w,w=A),s(v,_,h)&&(A=v,v=_,_=A),s(x,_,h)&&(A=x,x=_,_=A),s(v,b,h)&&(A=v,v=b,b=A),s(_,b,h)&&(A=_,_=b,b=A),s(x,w,h)&&(A=x,x=w,w=A),s(x,_,h)&&(A=x,x=_,_=A),s(b,w,h)&&(A=b,b=w,w=A);for(var M=h[2*x],S=h[2*x+1],E=h[2*b],C=h[2*b+1],I=2*v,L=2*_,P=2*w,z=2*p,D=2*m,O=2*d,R=0;R<2;++R){var F=h[I+R],B=h[L+R],j=h[P+R];h[z+R]=F,h[D+R]=B,h[O+R]=j}i(g,e,h),i(y,u,h);for(var N=T;N<=k;++N)if(l(N,M,S,h))N!==T&&n(N,T,h),++T;else if(!l(N,E,C,h))for(;;){if(l(k,E,C,h)){l(k,M,S,h)?(a(N,T,k,h),++T,--k):(n(N,k,h),--k);break}if(--k0)if(t[0]!==o[1][0])r=e,e=e.right;else{if(l=c(e.right,t))return l;e=e.left}else{if(t[0]!==o[1][0])return e;var l;if(l=c(e.right,t))return l;e=e.left}}return r}function u(e,t,r,n){this.y=e,this.index=t,this.start=r,this.closed=n}function h(e,t,r,n){this.x=e,this.segment=t,this.create=r,this.index=n}s.prototype.castUp=function(e){var t=n.le(this.coordinates,e[0]);if(t<0)return-1;this.slabs[t];var r=c(this.slabs[t],e),i=-1;if(r&&(i=r.value),this.coordinates[t]===e[0]){var s=null;if(r&&(s=r.key),t>0){var u=c(this.slabs[t-1],e);u&&(s?o(u.key,s)>0&&(s=u.key,i=u.value):(i=u.value,s=u.key))}var h=this.horizontal[t];if(h.length>0){var f=n.ge(h,e[1],l);if(f=h.length)return i;p=h[f]}}if(p.start)if(s){var d=a(s[0],s[1],[e[0],p.y]);s[0][0]>s[1][0]&&(d=-d),d>0&&(i=p.index)}else i=p.index;else p.y!==e[1]&&(i=p.index)}}}return i}},4317:function(e){function t(e,t){var r=Math.floor(t),n=t-r,i=0<=r&&rMath.abs(t))c.rotate(a,0,0,-e*r*Math.PI*d.rotateSpeed/window.innerWidth);else if(!d._ortho){var o=-d.zoomSpeed*i*t/window.innerHeight*(a-c.lastT())/20;c.pan(a,0,0,h*(Math.exp(o)-1))}}}),!0)},d.enableMouseListeners(),d};var n=r(3025),i=r(6296),a=r(351),o=r(8512),s=r(24),l=r(7520)},4449:function(e,t,r){var n=r(2762),i=r(8116),a=r(1493);e.exports=function(e,t){var r=[];function o(e,t,n,i,a,o){var s=[e,t,n,0,0,0,1];s[i+3]=1,s[i]=a,r.push.apply(r,s),s[6]=-1,r.push.apply(r,s),s[i]=o,r.push.apply(r,s),r.push.apply(r,s),s[6]=1,r.push.apply(r,s),s[i]=a,r.push.apply(r,s)}o(0,0,0,0,0,1),o(0,0,0,1,0,1),o(0,0,0,2,0,1),o(1,0,0,1,-1,1),o(1,0,0,2,-1,1),o(0,1,0,0,-1,1),o(0,1,0,2,-1,1),o(0,0,1,0,-1,1),o(0,0,1,1,-1,1);var l=n(e,r),c=i(e,[{type:e.FLOAT,buffer:l,size:3,offset:0,stride:28},{type:e.FLOAT,buffer:l,size:3,offset:12,stride:28},{type:e.FLOAT,buffer:l,size:1,offset:24,stride:28}]),u=a(e);u.attributes.position.location=0,u.attributes.color.location=1,u.attributes.weight.location=2;var h=new s(e,l,c,u);return h.update(t),h};var o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(e,t,r,n){this.gl=e,this.buffer=t,this.vao=r,this.shader=n,this.pixelRatio=1,this.bounds=[[-1e3,-1e3,-1e3],[1e3,1e3,1e3]],this.position=[0,0,0],this.lineWidth=[2,2,2],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.enabled=[!0,!0,!0],this.drawSides=[!0,!0,!0],this.axes=null}var l=s.prototype,c=[0,0,0],u=[0,0,0],h=[0,0];l.isTransparent=function(){return!1},l.drawTransparent=function(e){},l.draw=function(e){var t=this.gl,r=this.vao,n=this.shader;r.bind(),n.bind();var i,a=e.model||o,s=e.view||o,l=e.projection||o;this.axes&&(i=this.axes.lastCubeProps.axis);for(var f=c,p=u,d=0;d<3;++d)i&&i[d]<0?(f[d]=this.bounds[0][d],p[d]=this.bounds[1][d]):(f[d]=this.bounds[1][d],p[d]=this.bounds[0][d]);for(h[0]=t.drawingBufferWidth,h[1]=t.drawingBufferHeight,n.uniforms.model=a,n.uniforms.view=s,n.uniforms.projection=l,n.uniforms.coordinates=[this.position,f,p],n.uniforms.colors=this.colors,n.uniforms.screenShape=h,d=0;d<3;++d)n.uniforms.lineWidth=this.lineWidth[d]*this.pixelRatio,this.enabled[d]&&(r.draw(t.TRIANGLES,6,6*d),this.drawSides[d]&&r.draw(t.TRIANGLES,12,18+12*d));r.unbind()},l.update=function(e){e&&("bounds"in e&&(this.bounds=e.bounds),"position"in e&&(this.position=e.position),"lineWidth"in e&&(this.lineWidth=e.lineWidth),"colors"in e&&(this.colors=e.colors),"enabled"in e&&(this.enabled=e.enabled),"drawSides"in e&&(this.drawSides=e.drawSides))},l.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},4494:function(e){e.exports=function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e}},4505:function(e,t,r){e.exports=r(5847)},4578:function(e){e.exports=function(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}},4623:function(e){function t(e){this.roots=new Array(e),this.ranks=new Array(e);for(var t=0;t0)return 1<=0)return 1<=0;--p)a[p]=c*e[p]+u*t[p]+h*r[p]+f*n[p];return a}return c*e+u*t+h*r+f*n},e.exports.derivative=function(e,t,r,n,i,a){var o=6*i*i-6*i,s=3*i*i-4*i+1,l=-6*i*i+6*i,c=3*i*i-2*i;if(e.length){a||(a=new Array(e.length));for(var u=e.length-1;u>=0;--u)a[u]=o*e[u]+s*t[u]+l*r[u]+c*n[u];return a}return o*e+s*t+l*r[u]+c*n}},4772:function(e){e.exports=function(e,t,r,n,i){var a=1/Math.tan(t/2),o=1/(n-i);return e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(i+n)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*i*n*o,e[15]=0,e}},4793:function(e,t,r){function n(e,t){for(var r=0;rf)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,d.prototype),t}function d(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return y(e)}return m(e,t,r)}function m(e,t,r){if("string"==typeof e)return function(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!d.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|b(e,t),n=p(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(te(e,Uint8Array)){var t=new Uint8Array(e);return x(t.buffer,t.byteOffset,t.byteLength)}return v(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(e));if(te(e,ArrayBuffer)||e&&te(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(te(e,SharedArrayBuffer)||e&&te(e.buffer,SharedArrayBuffer)))return x(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return d.from(n,t,r);var i=function(e){if(d.isBuffer(e)){var t=0|_(e.length),r=p(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||re(e.length)?p(0):v(e):"Buffer"===e.type&&Array.isArray(e.data)?v(e.data):void 0}(e);if(i)return i;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return d.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+l(e))}function g(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function y(e){return g(e),p(e<0?0:0|_(e))}function v(e){for(var t=e.length<0?0:0|_(e.length),r=p(t),n=0;n=f)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f.toString(16)+" bytes");return 0|e}function b(e,t){if(d.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||te(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+l(e));var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return J(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Q(e).length;default:if(i)return n?-1:J(e).length;t=(""+t).toLowerCase(),i=!0}}function w(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0)||(r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,r);case"utf8":case"utf-8":return P(this,t,r);case"ascii":return D(this,t,r);case"latin1":case"binary":return O(this,t,r);case"base64":return L(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function T(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function k(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),re(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=d.from(t,n)),d.isBuffer(t))return 0===t.length?-1:A(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):A(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function A(e,t,r,n,i){var a,o=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var u=-1;for(a=r;as&&(r=s-l),a=r;a>=0;a--){for(var h=!0,f=0;fi&&(n=i):n=i;var a,o=t.length;for(n>o/2&&(n=o/2),a=0;a>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function L(e,t,r){return 0===t&&r===e.length?c.fromByteArray(e):c.fromByteArray(e.slice(t,r))}function P(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:a>223?3:a>191?2:1;if(i+s<=r){var l=void 0,c=void 0,u=void 0,h=void 0;switch(s){case 1:a<128&&(o=a);break;case 2:128==(192&(l=e[i+1]))&&(h=(31&a)<<6|63&l)>127&&(o=h);break;case 3:l=e[i+1],c=e[i+2],128==(192&l)&&128==(192&c)&&(h=(15&a)<<12|(63&l)<<6|63&c)>2047&&(h<55296||h>57343)&&(o=h);break;case 4:l=e[i+1],c=e[i+2],u=e[i+3],128==(192&l)&&128==(192&c)&&128==(192&u)&&(h=(15&a)<<18|(63&l)<<12|(63&c)<<6|63&u)>65535&&h<1114112&&(o=h)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(e){var t=e.length;if(t<=z)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn.length?(d.isBuffer(a)||(a=d.from(a)),a.copy(n,i)):Uint8Array.prototype.set.call(n,a,i);else{if(!d.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i)}i+=a.length}return n},d.byteLength=b,d.prototype._isBuffer=!0,d.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tr&&(e+=" ... "),""},h&&(d.prototype[h]=d.prototype.inspect),d.prototype.compare=function(e,t,r,n,i){if(te(e,Uint8Array)&&(e=d.from(e,e.offset,e.byteLength)),!d.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+l(e));if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),s=Math.min(a,o),c=this.slice(n,i),u=e.slice(t,r),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return M(this,e,t,r);case"utf8":case"utf-8":return S(this,e,t,r);case"ascii":case"latin1":case"binary":return E(this,e,t,r);case"base64":return C(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var z=4096;function D(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",a=t;ar)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,r,n,i,a){if(!d.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function N(e,t,r,n,i){Y(t,n,i,e,r,7);var a=Number(t&BigInt(4294967295));e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a;var o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,r}function U(e,t,r,n,i){Y(t,n,i,e,r,7);var a=Number(t&BigInt(4294967295));e[r+7]=a,a>>=8,e[r+6]=a,a>>=8,e[r+5]=a,a>>=8,e[r+4]=a;var o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o>>=8,e[r+2]=o,o>>=8,e[r+1]=o,o>>=8,e[r]=o,r+8}function V(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function q(e,t,r,n,i){return t=+t,r>>>=0,i||V(e,0,r,4),u.write(e,t,r,n,23,4),r+4}function H(e,t,r,n,i){return t=+t,r>>>=0,i||V(e,0,r,8),u.write(e,t,r,n,52,8),r+8}d.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||B(e,t,this.length);for(var n=this[e],i=1,a=0;++a>>=0,t>>>=0,r||B(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},d.prototype.readUint8=d.prototype.readUInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),this[e]},d.prototype.readUint16LE=d.prototype.readUInt16LE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]|this[e+1]<<8},d.prototype.readUint16BE=d.prototype.readUInt16BE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]<<8|this[e+1]},d.prototype.readUint32LE=d.prototype.readUInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},d.prototype.readUint32BE=d.prototype.readUInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},d.prototype.readBigUInt64LE=ie((function(e){X(e>>>=0,"offset");var t=this[e],r=this[e+7];(void 0===t||void 0===r)&&$(e,this.length-8);var n=t+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,24),i=this[++e]+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+r*Math.pow(2,24);return BigInt(n)+(BigInt(i)<>>=0,"offset");var t=this[e],r=this[e+7];(void 0===t||void 0===r)&&$(e,this.length-8);var n=t*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e],i=this[++e]*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+r;return(BigInt(n)<>>=0,t>>>=0,r||B(e,t,this.length);for(var n=this[e],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*t)),n},d.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||B(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},d.prototype.readInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},d.prototype.readInt16LE=function(e,t){e>>>=0,t||B(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},d.prototype.readInt16BE=function(e,t){e>>>=0,t||B(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},d.prototype.readInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},d.prototype.readInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},d.prototype.readBigInt64LE=ie((function(e){X(e>>>=0,"offset");var t=this[e],r=this[e+7];(void 0===t||void 0===r)&&$(e,this.length-8);var n=this[e+4]+this[e+5]*Math.pow(2,8)+this[e+6]*Math.pow(2,16)+(r<<24);return(BigInt(n)<>>=0,"offset");var t=this[e],r=this[e+7];(void 0===t||void 0===r)&&$(e,this.length-8);var n=(t<<24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e];return(BigInt(n)<>>=0,t||B(e,4,this.length),u.read(this,e,!0,23,4)},d.prototype.readFloatBE=function(e,t){return e>>>=0,t||B(e,4,this.length),u.read(this,e,!1,23,4)},d.prototype.readDoubleLE=function(e,t){return e>>>=0,t||B(e,8,this.length),u.read(this,e,!0,52,8)},d.prototype.readDoubleBE=function(e,t){return e>>>=0,t||B(e,8,this.length),u.read(this,e,!1,52,8)},d.prototype.writeUintLE=d.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||j(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[t]=255&e;++a>>=0,r>>>=0,n||j(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+r},d.prototype.writeUint8=d.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,255,0),this[t]=255&e,t+1},d.prototype.writeUint16LE=d.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},d.prototype.writeUint16BE=d.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},d.prototype.writeUint32LE=d.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},d.prototype.writeUint32BE=d.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},d.prototype.writeBigUInt64LE=ie((function(e){return N(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),d.prototype.writeBigUInt64BE=ie((function(e){return U(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),d.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);j(this,e,t,r,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>>=0,!n){var i=Math.pow(2,8*r-1);j(this,e,t,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o|0)-s&255;return t+r},d.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},d.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},d.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},d.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},d.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},d.prototype.writeBigInt64LE=ie((function(e){return N(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),d.prototype.writeBigInt64BE=ie((function(e){return U(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),d.prototype.writeFloatLE=function(e,t,r){return q(this,e,t,!0,r)},d.prototype.writeFloatBE=function(e,t,r){return q(this,e,t,!1,r)},d.prototype.writeDoubleLE=function(e,t,r){return H(this,e,t,!0,r)},d.prototype.writeDoubleBE=function(e,t,r){return H(this,e,t,!1,r)},d.prototype.copy=function(e,t,r,n){if(!d.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&0!==n&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a=n+4;r-=3)t="_".concat(e.slice(r-3,r)).concat(t);return"".concat(e.slice(0,r)).concat(t)}function Y(e,t,r,n,i,a){if(e>r||e3?0===t||t===BigInt(0)?">= 0".concat(s," and < 2").concat(s," ** ").concat(8*(a+1)).concat(s):">= -(2".concat(s," ** ").concat(8*(a+1)-1).concat(s,") and < 2 ** ")+"".concat(8*(a+1)-1).concat(s):">= ".concat(t).concat(s," and <= ").concat(r).concat(s),new G.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,r){X(t,"offset"),(void 0===e[t]||void 0===e[t+r])&&$(t,e.length-(r+1))}(n,i,a)}function X(e,t){if("number"!=typeof e)throw new G.ERR_INVALID_ARG_TYPE(t,"number",e)}function $(e,t,r){throw Math.floor(e)!==e?(X(e,r),new G.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new G.ERR_BUFFER_OUT_OF_BOUNDS:new G.ERR_OUT_OF_RANGE(r||"offset",">= ".concat(r?1:0," and <= ").concat(t),e)}W("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?"".concat(e," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),W("ERR_INVALID_ARG_TYPE",(function(e,t){return'The "'.concat(e,'" argument must be of type number. Received type ').concat(l(t))}),TypeError),W("ERR_OUT_OF_RANGE",(function(e,t,r){var n='The value of "'.concat(e,'" is out of range.'),i=r;return Number.isInteger(r)&&Math.abs(r)>Math.pow(2,32)?i=Z(String(r)):"bigint"==typeof r&&(i=String(r),(r>Math.pow(BigInt(2),BigInt(32))||r<-Math.pow(BigInt(2),BigInt(32)))&&(i=Z(i)),i+="n"),n+" It must be ".concat(t,". Received ").concat(i)}),RangeError);var K=/[^+/0-9A-Za-z-_]/g;function J(e,t){t=t||1/0;for(var r,n=e.length,i=null,a=[],o=0;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function Q(e){return c.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(K,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function ee(e,t,r,n){var i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function te(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function re(e){return e!=e}var ne=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}();function ie(e){return typeof BigInt>"u"?ae:e}function ae(){throw new Error("BigInt not supported")}},4844:function(e){e.exports=function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e}},4905:function(e,t,r){var n=r(5874);e.exports=function(e,t){var r=n(t),i=[];return(i=i.concat(r(e))).concat(r(null))}},4935:function(e,t,r){e.exports=function(e,t,r,a,s,l){var c=n(e),h=i(e,[{buffer:c,size:3}]),f=o(e);f.attributes.position.location=0;var p=new u(e,f,c,h);return p.update(t,r,a,s,l),p};var n=r(2762),i=r(8116),a=r(4359),o=r(1879).Q,s=window||c.global||{},l=s.__TEXT_CACHE||{};function u(e,t,r,n){this.gl=e,this.shader=t,this.buffer=r,this.vao=n,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}s.__TEXT_CACHE={};var h=u.prototype,f=[0,0];h.bind=function(e,t,r,n){this.vao.bind(),this.shader.bind();var i=this.shader.uniforms;i.model=e,i.view=t,i.projection=r,i.pixelScale=n,f[0]=this.gl.drawingBufferWidth,f[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=f},h.unbind=function(){this.vao.unbind()},h.update=function(e,t,r,n,i){var o=[];function s(e,t,r,n,i,s){var c=[r.style,r.weight,r.variant,r.family].join("_"),u=l[c];u||(u=l[c]={});var h=u[t];h||(h=u[t]=function(e,t){try{return a(e,t)}catch(t){return console.warn('error vectorizing text:"'+e+'" error:',t),{cells:[],positions:[]}}}(t,{triangles:!0,font:r.family,fontStyle:r.style,fontWeight:r.weight,fontVariant:r.variant,textAlign:"center",textBaseline:"middle",lineSpacing:i,styletags:s}));for(var f=(n||12)/12,p=h.positions,d=h.cells,m=0,g=d.length;m=0;--v){var x=p[y[v]];o.push(f*x[0],-f*x[1],e)}}for(var c=[0,0,0],u=[0,0,0],h=[0,0,0],f=[0,0,0],p={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},d=0;d<3;++d){h[d]=o.length/3|0,s(.5*(e[0][d]+e[1][d]),t[d],r[d],12,1.25,p),f[d]=(o.length/3|0)-h[d],c[d]=o.length/3|0;for(var m=0;m0||l.length>0;){for(;s.length>0;){var p=s.pop();if(c[p]!==-i){c[p]=i,u[p];for(var d=0;d<3;++d){var m=f[3*p+d];m>=0&&0===c[m]&&(h[3*p+d]?l.push(m):(s.push(m),c[m]=i))}}}var g=l;l=s,s=g,l.length=0,i=-i}var y=function(e,t,r){for(var n=0,i=0;i0&&t[i]===r[0]))return 1;a=e[i-1]}for(var s=1;a;){var l=a.key,c=n(r,l[0],l[1]);if(l[0][0]0))return 0;s=-1,a=a.right}else if(c>0)a=a.left;else{if(!(c<0))return 0;s=1,a=a.right}}return s}}(g.slabs,g.coordinates);return 0===a.length?y:function(e,t){return function(r){return e(r[0],r[1])?0:t(r)}}(l(a),y)};var n=r(3250)[3],i=r(4209),a=r(3352),o=r(2478);function s(){return!0}function l(e){for(var t={},r=0;r"u"?r(606):WeakMap),o=0;function s(e,t,r,n,i,a,o){this.id=e,this.src=t,this.type=r,this.shader=n,this.count=a,this.programs=[],this.cache=o}function l(e){this.gl=e,this.shaders=[{},{}],this.programs={}}s.prototype.dispose=function(){if(0==--this.count){for(var e=this.cache,t=e.gl,r=this.programs,n=0,i=r.length;n0&&(o=1/Math.sqrt(o),e[0]=r*o,e[1]=n*o,e[2]=i*o,e[3]=a*o),e}},5202:function(e,t,r){var n=r(1944),i=r(8210);function a(e,t){var r=i(n(e,t),[t[t.length-1]]);return r[r.length-1]}function o(e,t,r,n){var i=-t/(n-t);i<0?i=0:i>1&&(i=1);for(var a=1-i,o=e.length,s=new Array(o),l=0;l0||i>0&&u<0){var h=o(s,u,l,i);r.push(h),n.push(h.slice())}u<0?n.push(l.slice()):u>0?r.push(l.slice()):(r.push(l.slice()),n.push(l.slice())),i=u}return{positive:r,negative:n}},e.exports.positive=function(e,t){for(var r=[],n=a(e[e.length-1],t),i=e[e.length-1],s=e[0],l=0;l0||n>0&&c<0)&&r.push(o(i,c,s,n)),c>=0&&r.push(s.slice()),n=c}return r},e.exports.negative=function(e,t){for(var r=[],n=a(e[e.length-1],t),i=e[e.length-1],s=e[0],l=0;l0||n>0&&c<0)&&r.push(o(i,c,s,n)),c<=0&&r.push(s.slice()),n=c}return r}},5219:function(e){e.exports=function(e){for(var t,r=e.length,n=0;n13)&&32!==t&&133!==t&&160!==t&&5760!==t&&6158!==t&&(t<8192||t>8205)&&8232!==t&&8233!==t&&8239!==t&&8287!==t&&8288!==t&&12288!==t&&65279!==t)return!1;return!0}},5250:function(e){e.exports=function(e,r,n){var i=e*r,a=t*e,o=a-(a-e),s=e-o,l=t*r,c=l-(l-r),u=r-c,h=s*u-(i-o*c-s*c-o*u);return n?(n[0]=h,n[1]=i,n):[h,i]};var t=+(Math.pow(2,27)+1)},5298:function(e,t){var r={"float64,2,1,0":function(){return function(e,t,r,n,i){var a=e[0],o=e[1],s=e[2],l=r[0],c=r[1],u=r[2];n|=0;var h=0,f=0,p=0,d=u,m=c-s*u,g=l-o*c;for(p=0;p0;){x<64?(l=x,x=0):(l=64,x-=64);for(var _=0|e[1];_>0;){_<64?(c=_,_=0):(c=64,_-=64),n=y+x*h+_*f,o=v+x*d+_*m;var b=0,w=0,T=0,k=p,A=h-u*p,M=f-l*h,S=g,E=d-u*g,C=m-l*d;for(T=0;T0;){m<64?(l=m,m=0):(l=64,m-=64);for(var g=0|e[0];g>0;){g<64?(s=g,g=0):(s=64,g-=64),n=p+m*u+g*c,o=d+m*f+g*h;var y=0,v=0,x=u,_=c-l*u,b=f,w=h-l*f;for(v=0;v0;){v<64?(c=v,v=0):(c=64,v-=64);for(var x=0|e[0];x>0;){x<64?(s=x,x=0):(s=64,x-=64);for(var _=0|e[1];_>0;){_<64?(l=_,_=0):(l=64,_-=64),n=g+v*f+x*u+_*h,o=y+v*m+x*p+_*d;var b=0,w=0,T=0,k=f,A=u-c*f,M=h-s*u,S=m,E=p-c*m,C=d-s*p;for(T=0;T=0}}(),a.removeTriangle=function(e,t,r){var n=this.stars;o(n[e],t,r),o(n[t],r,e),o(n[r],e,t)},a.addTriangle=function(e,t,r){var n=this.stars;n[e].push(t,r),n[t].push(r,e),n[r].push(e,t)},a.opposite=function(e,t){for(var r=this.stars[t],n=1,i=r.length;n0;){i[p=o.pop()]=!1;var c=r[p];for(s=0;s0){for(var w=0;w<24;++w)i.push(i[i.length-12]);u+=2,g=!0}continue e}h[0][r]=Math.min(h[0][r],_[r],b[r]),h[1][r]=Math.max(h[1][r],_[r],b[r])}Array.isArray(p[0])?(y=p.length>t-1?p[t-1]:p.length>0?p[p.length-1]:[0,0,0,1],v=p.length>t?p[t]:p.length>0?p[p.length-1]:[0,0,0,1]):y=v=p,3===y.length&&(y=[y[0],y[1],y[2],1]),3===v.length&&(v=[v[0],v[1],v[2],1]),!this.hasAlpha&&y[3]<1&&(this.hasAlpha=!0),x=Array.isArray(m)?m.length>t-1?m[t-1]:m.length>0?m[m.length-1]:[0,0,0,1]:m;var T=s;if(s+=d(_,b),g){for(r=0;r<2;++r)i.push(_[0],_[1],_[2],b[0],b[1],b[2],T,x,y[0],y[1],y[2],y[3]);u+=2,g=!1}i.push(_[0],_[1],_[2],b[0],b[1],b[2],T,x,y[0],y[1],y[2],y[3],_[0],_[1],_[2],b[0],b[1],b[2],T,-x,y[0],y[1],y[2],y[3],b[0],b[1],b[2],_[0],_[1],_[2],s,-x,v[0],v[1],v[2],v[3],b[0],b[1],b[2],_[0],_[1],_[2],s,x,v[0],v[1],v[2],v[3]),u+=4}}if(this.buffer.update(i),a.push(s),o.push(f[f.length-1].slice()),this.bounds=h,this.vertexCount=u,this.points=o,this.arcLength=a,"dashes"in e){var k=e.dashes.slice();for(k.unshift(0),t=1;te[r][0]&&(r=n);return tr?[[r],[t]]:[[t]]}},5771:function(e,t,r){var n=r(8507),i=r(3788),a=r(2419);e.exports=function(e){e.sort(i);for(var t=e.length,r=0,o=0;o0){var c=e[r-1];if(0===n(s,c)&&a(c)!==l){r-=1;continue}}e[r++]=s}}return e.length=r,e}},5838:function(e,t,r){e.exports=function(e){for(var t=new Array(e.length),r=0;r0)continue;r=e.slice(0,1).join("")}return j(r),L+=r.length,(S=S.slice(r.length)).length}}function q(){if(/[^\d\w_]/.test(t)){var e=S.join("");return M=B[e]?v:F[e]?y:g,j(S.join("")),M=l,k}return S.push(t),r=t,k+1}};var n=r(620),i=r(7827),a=r(6852),o=r(7932),s=r(3508),l=999,c=9999,u=0,h=1,f=2,p=3,d=4,m=5,g=6,y=7,v=8,x=9,_=10,b=11,w=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},5878:function(e,t,r){e.exports=function(e,t,r){for(var a=t.length,o=e.length,s=new Array(a),l=new Array(a),c=new Array(a),u=new Array(a),h=0;h>1:(e>>1)-1}function x(e){for(var t=y(e);;){var r=t,n=2*e+1,i=2*(e+1),a=e;if(n0;){var r=v(e);if(!(r>=0&&t0){var e=k[0];return g(0,M-1),M-=1,x(0),e}return-1}function w(e,t){var r=k[e];return c[r]===t?e:(c[r]=-1/0,_(e),b(),c[r]=t,_((M+=1)-1))}function T(e){if(!u[e]){u[e]=!0;var t=s[e],r=l[e];s[r]>=0&&(s[r]=t),l[t]>=0&&(l[t]=r),A[t]>=0&&w(A[t],m(t)),A[r]>=0&&w(A[r],m(r))}}var k=[],A=new Array(a);for(h=0;h>1;h>=0;--h)x(h);for(;;){var S=b();if(S<0||c[S]>r)break;T(S)}var E=[];for(h=0;h=0&&r>=0&&t!==r){var n=A[t],i=A[r];n!==i&&I.push([n,i])}})),i.unique(i.normalize(I)),{positions:E,edges:I}};var n=r(3250),i=r(2014)},5911:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[0],s=r[1],l=r[2];return e[0]=i*l-a*s,e[1]=a*o-n*l,e[2]=n*s-i*o,e}},5964:function(e){e.exports=function(e){return e||0===e?e.toString():""}},5995:function(e,t,r){e.exports=function(e,t){return n(t).filter((function(r){for(var n=new Array(r.length),a=0;a2&&a[1]>2&&n(i.pick(-1,-1).lo(1,1).hi(a[0]-2,a[1]-2),e.pick(-1,-1,0).lo(1,1).hi(a[0]-2,a[1]-2),e.pick(-1,-1,1).lo(1,1).hi(a[0]-2,a[1]-2)),a[1]>2&&(r(i.pick(0,-1).lo(1).hi(a[1]-2),e.pick(0,-1,1).lo(1).hi(a[1]-2)),t(e.pick(0,-1,0).lo(1).hi(a[1]-2))),a[1]>2&&(r(i.pick(a[0]-1,-1).lo(1).hi(a[1]-2),e.pick(a[0]-1,-1,1).lo(1).hi(a[1]-2)),t(e.pick(a[0]-1,-1,0).lo(1).hi(a[1]-2))),a[0]>2&&(r(i.pick(-1,0).lo(1).hi(a[0]-2),e.pick(-1,0,0).lo(1).hi(a[0]-2)),t(e.pick(-1,0,1).lo(1).hi(a[0]-2))),a[0]>2&&(r(i.pick(-1,a[1]-1).lo(1).hi(a[0]-2),e.pick(-1,a[1]-1,0).lo(1).hi(a[0]-2)),t(e.pick(-1,a[1]-1,1).lo(1).hi(a[0]-2))),e.set(0,0,0,0),e.set(0,0,1,0),e.set(a[0]-1,0,0,0),e.set(a[0]-1,0,1,0),e.set(0,a[1]-1,0,0),e.set(0,a[1]-1,1,0),e.set(a[0]-1,a[1]-1,0,0),e.set(a[0]-1,a[1]-1,1,0),e}}e.exports=function(e,t,r){if(Array.isArray(r)||(r=n(t.dimension,"string"==typeof r?r:"clamp")),0===t.size)return e;if(0===t.dimension)return e.set(0),e;var i=function(e){var t=e.join();if(a=u[t])return a;for(var r=e.length,n=[h,f],i=1;i<=r;++i)n.push(p(i));var a=d.apply(void 0,n);return u[t]=a,a}(r);return i(e,t)}},6204:function(e){e.exports=function(e){var t,r,n,i=e.length,a=0;for(t=0;to&&(o=n.length(b)),x&&!v){var w=2*n.distance(p,_)/(n.length(d)+n.length(b));w?(g=Math.min(g,w),y=!1):y=!0}y||(p=_,d=b),m.push(b)}var T=[s,c,h],k=[l,u,f];t&&(t[0]=T,t[1]=k),0===o&&(o=1);var A=1/o;isFinite(g)||(g=1),a.vectorScale=g;var M=e.coneSize||(v?1:.5);e.absoluteConeSize&&(M=e.absoluteConeSize*A),a.coneScale=M,x=0;for(var S=0;xE&&(w|=1<E&&(w|=1<c[x][1])&&(R=x);var F=-1;for(x=0;x<3;++x)(j=R^1<c[B][0]&&(B=j))}var N=m;N[0]=N[1]=N[2]=0,N[n.log2(F^R)]=R&F,N[n.log2(R^B)]=R&B;var U=7^B;U===w||U===O?(U=7^F,N[n.log2(B^U)]=U&B):N[n.log2(F^U)]=U&F;var V=g,q=w;for(A=0;A<3;++A)V[A]=q&1<=0&&(i=r.length-n-1);var a=Math.pow(10,i),o=Math.round(e*t*a),s=o+"";if(s.indexOf("e")>=0)return s;var l=o/a,c=o%a;o<0?(l=0|-Math.ceil(l),c=0|-c):(l=0|Math.floor(l),c|=0);var u=""+l;if(o<0&&(u="-"+u),i){for(var h=""+c;h.length=e[0][i];--o)a.push({x:o*t[i],text:r(t[i],o)});n.push(a)}return n},t.equal=function(e,t){for(var r=0;r<3;++r){if(e[r].length!==t[r].length)return!1;for(var n=0;np+1)throw new Error(h+" map requires nshades to be at least size "+u.length);d=Array.isArray(e.alpha)?2!==e.alpha.length?[1,1]:e.alpha.slice():"number"==typeof e.alpha?[e.alpha,e.alpha]:[1,1],t=u.map((function(e){return Math.round(e.index*p)})),d[0]=Math.min(Math.max(d[0],0),1),d[1]=Math.min(Math.max(d[1],0),1);var g=u.map((function(e,t){var r=u[t].index,n=u[t].rgb.slice();return 4===n.length&&n[3]>=0&&n[3]<=1||(n[3]=d[0]+(d[1]-d[0])*r),n})),y=[];for(m=0;m 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\n\nuniform float vectorScale, tubeScale;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 eyePosition, lightPosition;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * tubePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(tubePosition, 1.0);\n vec4 t_position = view * tubePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = tubePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),a=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),o=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float tubeScale;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n gl_Position = projection * (view * tubePosition);\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);t.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},t.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},6743:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=n+n,l=i+i,c=a+a,u=n*s,h=n*l,f=n*c,p=i*l,d=i*c,m=a*c,g=o*s,y=o*l,v=o*c;return e[0]=1-(p+m),e[1]=h+v,e[2]=f-y,e[3]=0,e[4]=h-v,e[5]=1-(u+m),e[6]=d+g,e[7]=0,e[8]=f+y,e[9]=d-g,e[10]=1-(u+p),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}},6760:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],h=t[8],f=t[9],p=t[10],d=t[11],m=t[12],g=t[13],y=t[14],v=t[15],x=r[0],_=r[1],b=r[2],w=r[3];return e[0]=x*n+_*s+b*h+w*m,e[1]=x*i+_*l+b*f+w*g,e[2]=x*a+_*c+b*p+w*y,e[3]=x*o+_*u+b*d+w*v,x=r[4],_=r[5],b=r[6],w=r[7],e[4]=x*n+_*s+b*h+w*m,e[5]=x*i+_*l+b*f+w*g,e[6]=x*a+_*c+b*p+w*y,e[7]=x*o+_*u+b*d+w*v,x=r[8],_=r[9],b=r[10],w=r[11],e[8]=x*n+_*s+b*h+w*m,e[9]=x*i+_*l+b*f+w*g,e[10]=x*a+_*c+b*p+w*y,e[11]=x*o+_*u+b*d+w*v,x=r[12],_=r[13],b=r[14],w=r[15],e[12]=x*n+_*s+b*h+w*m,e[13]=x*i+_*l+b*f+w*g,e[14]=x*a+_*c+b*p+w*y,e[15]=x*o+_*u+b*d+w*v,e}},6768:function(e,t,r){var n=r(6859);e.exports=function(e){return new n(e)}},6803:function(e,t,r){r(8828),r(1755),t.Fw=function(e,t){var r=e.length,n=e.length-t.length,i=Math.min;if(n)return n;switch(r){case 0:return 0;case 1:return e[0]-t[0];case 2:return(s=e[0]+e[1]-t[0]-t[1])||i(e[0],e[1])-i(t[0],t[1]);case 3:var a=e[0]+e[1],o=t[0]+t[1];if(s=a+e[2]-(o+t[2]))return s;var s,l=i(e[0],e[1]),c=i(t[0],t[1]);return(s=i(l,e[2])-i(c,t[2]))||i(l+e[2],a)-i(c+t[2],o);default:var u=e.slice(0);u.sort();var h=t.slice(0);h.sort();for(var f=0;f=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function l(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function c(e,t,r,n){for(var i=0,a=Math.min(e.length,r),o=t;o=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(e){return e instanceof a||null!==e&&"object"==typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)i=l(e,t,n)<=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var a=e.length-r,o=a%n,s=Math.min(a,a-o)+r,l=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],a=0|t.words[0],o=i*a,s=67108863&o,l=o/67108864|0;r.words[0]=s;for(var c=1;c>>26,h=67108863&l,f=Math.min(c,t.length-1),p=Math.max(0,c-e.length+1);p<=f;p++){var d=c-p|0;u+=(o=(i=0|e.words[d])*(a=0|t.words[p])+h)/67108864|0,h=67108863&o}r.words[c]=0|h,l=0|u}return 0!==l?r.words[c]=0|l:r.length--,r.strip()}a.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,a=0,o=0;o>>24-i&16777215)||o!==this.length-1?u[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=h[e],p=f[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modn(p).toString(e);r=(d=d.idivn(p)).isZero()?m+r:u[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return n(typeof o<"u"),this.toArrayLike(o,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,l="le"===t,c=new e(a),u=this.clone();if(l){for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),c[s]=o;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ae.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var a=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==a&&o>26,this.words[o]=67108863&t;if(0===a&&o>>13,p=0|o[1],d=8191&p,m=p>>>13,g=0|o[2],y=8191&g,v=g>>>13,x=0|o[3],_=8191&x,b=x>>>13,w=0|o[4],T=8191&w,k=w>>>13,A=0|o[5],M=8191&A,S=A>>>13,E=0|o[6],C=8191&E,I=E>>>13,L=0|o[7],P=8191&L,z=L>>>13,D=0|o[8],O=8191&D,R=D>>>13,F=0|o[9],B=8191&F,j=F>>>13,N=0|s[0],U=8191&N,V=N>>>13,q=0|s[1],H=8191&q,G=q>>>13,W=0|s[2],Z=8191&W,Y=W>>>13,X=0|s[3],$=8191&X,K=X>>>13,J=0|s[4],Q=8191&J,ee=J>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],ae=8191&ie,oe=ie>>>13,se=0|s[7],le=8191&se,ce=se>>>13,ue=0|s[8],he=8191&ue,fe=ue>>>13,pe=0|s[9],de=8191&pe,me=pe>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(c+(n=Math.imul(h,U))|0)+((8191&(i=(i=Math.imul(h,V))+Math.imul(f,U)|0))<<13)|0;c=((a=Math.imul(f,V))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(d,U),i=(i=Math.imul(d,V))+Math.imul(m,U)|0,a=Math.imul(m,V);var ye=(c+(n=n+Math.imul(h,H)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(f,H)|0))<<13)|0;c=((a=a+Math.imul(f,G)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,U),i=(i=Math.imul(y,V))+Math.imul(v,U)|0,a=Math.imul(v,V),n=n+Math.imul(d,H)|0,i=(i=i+Math.imul(d,G)|0)+Math.imul(m,H)|0,a=a+Math.imul(m,G)|0;var ve=(c+(n=n+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,Y)|0)+Math.imul(f,Z)|0))<<13)|0;c=((a=a+Math.imul(f,Y)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(_,U),i=(i=Math.imul(_,V))+Math.imul(b,U)|0,a=Math.imul(b,V),n=n+Math.imul(y,H)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(v,H)|0,a=a+Math.imul(v,G)|0,n=n+Math.imul(d,Z)|0,i=(i=i+Math.imul(d,Y)|0)+Math.imul(m,Z)|0,a=a+Math.imul(m,Y)|0;var xe=(c+(n=n+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,K)|0)+Math.imul(f,$)|0))<<13)|0;c=((a=a+Math.imul(f,K)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(T,U),i=(i=Math.imul(T,V))+Math.imul(k,U)|0,a=Math.imul(k,V),n=n+Math.imul(_,H)|0,i=(i=i+Math.imul(_,G)|0)+Math.imul(b,H)|0,a=a+Math.imul(b,G)|0,n=n+Math.imul(y,Z)|0,i=(i=i+Math.imul(y,Y)|0)+Math.imul(v,Z)|0,a=a+Math.imul(v,Y)|0,n=n+Math.imul(d,$)|0,i=(i=i+Math.imul(d,K)|0)+Math.imul(m,$)|0,a=a+Math.imul(m,K)|0;var _e=(c+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(f,Q)|0))<<13)|0;c=((a=a+Math.imul(f,ee)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(M,U),i=(i=Math.imul(M,V))+Math.imul(S,U)|0,a=Math.imul(S,V),n=n+Math.imul(T,H)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(k,H)|0,a=a+Math.imul(k,G)|0,n=n+Math.imul(_,Z)|0,i=(i=i+Math.imul(_,Y)|0)+Math.imul(b,Z)|0,a=a+Math.imul(b,Y)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,K)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,K)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,ee)|0)+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0;var be=(c+(n=n+Math.imul(h,re)|0)|0)+((8191&(i=(i=i+Math.imul(h,ne)|0)+Math.imul(f,re)|0))<<13)|0;c=((a=a+Math.imul(f,ne)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(C,U),i=(i=Math.imul(C,V))+Math.imul(I,U)|0,a=Math.imul(I,V),n=n+Math.imul(M,H)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(S,H)|0,a=a+Math.imul(S,G)|0,n=n+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(k,Z)|0,a=a+Math.imul(k,Y)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,K)|0)+Math.imul(b,$)|0,a=a+Math.imul(b,K)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(v,Q)|0,a=a+Math.imul(v,ee)|0,n=n+Math.imul(d,re)|0,i=(i=i+Math.imul(d,ne)|0)+Math.imul(m,re)|0,a=a+Math.imul(m,ne)|0;var we=(c+(n=n+Math.imul(h,ae)|0)|0)+((8191&(i=(i=i+Math.imul(h,oe)|0)+Math.imul(f,ae)|0))<<13)|0;c=((a=a+Math.imul(f,oe)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(P,U),i=(i=Math.imul(P,V))+Math.imul(z,U)|0,a=Math.imul(z,V),n=n+Math.imul(C,H)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(I,H)|0,a=a+Math.imul(I,G)|0,n=n+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,Y)|0)+Math.imul(S,Z)|0,a=a+Math.imul(S,Y)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(k,$)|0,a=a+Math.imul(k,K)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(b,Q)|0,a=a+Math.imul(b,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(v,re)|0,a=a+Math.imul(v,ne)|0,n=n+Math.imul(d,ae)|0,i=(i=i+Math.imul(d,oe)|0)+Math.imul(m,ae)|0,a=a+Math.imul(m,oe)|0;var Te=(c+(n=n+Math.imul(h,le)|0)|0)+((8191&(i=(i=i+Math.imul(h,ce)|0)+Math.imul(f,le)|0))<<13)|0;c=((a=a+Math.imul(f,ce)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(O,U),i=(i=Math.imul(O,V))+Math.imul(R,U)|0,a=Math.imul(R,V),n=n+Math.imul(P,H)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(z,H)|0,a=a+Math.imul(z,G)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(I,Z)|0,a=a+Math.imul(I,Y)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,K)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,K)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(k,Q)|0,a=a+Math.imul(k,ee)|0,n=n+Math.imul(_,re)|0,i=(i=i+Math.imul(_,ne)|0)+Math.imul(b,re)|0,a=a+Math.imul(b,ne)|0,n=n+Math.imul(y,ae)|0,i=(i=i+Math.imul(y,oe)|0)+Math.imul(v,ae)|0,a=a+Math.imul(v,oe)|0,n=n+Math.imul(d,le)|0,i=(i=i+Math.imul(d,ce)|0)+Math.imul(m,le)|0,a=a+Math.imul(m,ce)|0;var ke=(c+(n=n+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,fe)|0)+Math.imul(f,he)|0))<<13)|0;c=((a=a+Math.imul(f,fe)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(B,U),i=(i=Math.imul(B,V))+Math.imul(j,U)|0,a=Math.imul(j,V),n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(R,H)|0,a=a+Math.imul(R,G)|0,n=n+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(z,Z)|0,a=a+Math.imul(z,Y)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,K)|0)+Math.imul(I,$)|0,a=a+Math.imul(I,K)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(S,Q)|0,a=a+Math.imul(S,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(k,re)|0,a=a+Math.imul(k,ne)|0,n=n+Math.imul(_,ae)|0,i=(i=i+Math.imul(_,oe)|0)+Math.imul(b,ae)|0,a=a+Math.imul(b,oe)|0,n=n+Math.imul(y,le)|0,i=(i=i+Math.imul(y,ce)|0)+Math.imul(v,le)|0,a=a+Math.imul(v,ce)|0,n=n+Math.imul(d,he)|0,i=(i=i+Math.imul(d,fe)|0)+Math.imul(m,he)|0,a=a+Math.imul(m,fe)|0;var Ae=(c+(n=n+Math.imul(h,de)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(f,de)|0))<<13)|0;c=((a=a+Math.imul(f,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(B,H),i=(i=Math.imul(B,G))+Math.imul(j,H)|0,a=Math.imul(j,G),n=n+Math.imul(O,Z)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(R,Z)|0,a=a+Math.imul(R,Y)|0,n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,K)|0)+Math.imul(z,$)|0,a=a+Math.imul(z,K)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(I,Q)|0,a=a+Math.imul(I,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(S,re)|0,a=a+Math.imul(S,ne)|0,n=n+Math.imul(T,ae)|0,i=(i=i+Math.imul(T,oe)|0)+Math.imul(k,ae)|0,a=a+Math.imul(k,oe)|0,n=n+Math.imul(_,le)|0,i=(i=i+Math.imul(_,ce)|0)+Math.imul(b,le)|0,a=a+Math.imul(b,ce)|0,n=n+Math.imul(y,he)|0,i=(i=i+Math.imul(y,fe)|0)+Math.imul(v,he)|0,a=a+Math.imul(v,fe)|0;var Me=(c+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,me)|0)+Math.imul(m,de)|0))<<13)|0;c=((a=a+Math.imul(m,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(B,Z),i=(i=Math.imul(B,Y))+Math.imul(j,Z)|0,a=Math.imul(j,Y),n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(R,$)|0,a=a+Math.imul(R,K)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(z,Q)|0,a=a+Math.imul(z,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(I,re)|0,a=a+Math.imul(I,ne)|0,n=n+Math.imul(M,ae)|0,i=(i=i+Math.imul(M,oe)|0)+Math.imul(S,ae)|0,a=a+Math.imul(S,oe)|0,n=n+Math.imul(T,le)|0,i=(i=i+Math.imul(T,ce)|0)+Math.imul(k,le)|0,a=a+Math.imul(k,ce)|0,n=n+Math.imul(_,he)|0,i=(i=i+Math.imul(_,fe)|0)+Math.imul(b,he)|0,a=a+Math.imul(b,fe)|0;var Se=(c+(n=n+Math.imul(y,de)|0)|0)+((8191&(i=(i=i+Math.imul(y,me)|0)+Math.imul(v,de)|0))<<13)|0;c=((a=a+Math.imul(v,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(B,$),i=(i=Math.imul(B,K))+Math.imul(j,$)|0,a=Math.imul(j,K),n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,ee)|0,n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(z,re)|0,a=a+Math.imul(z,ne)|0,n=n+Math.imul(C,ae)|0,i=(i=i+Math.imul(C,oe)|0)+Math.imul(I,ae)|0,a=a+Math.imul(I,oe)|0,n=n+Math.imul(M,le)|0,i=(i=i+Math.imul(M,ce)|0)+Math.imul(S,le)|0,a=a+Math.imul(S,ce)|0,n=n+Math.imul(T,he)|0,i=(i=i+Math.imul(T,fe)|0)+Math.imul(k,he)|0,a=a+Math.imul(k,fe)|0;var Ee=(c+(n=n+Math.imul(_,de)|0)|0)+((8191&(i=(i=i+Math.imul(_,me)|0)+Math.imul(b,de)|0))<<13)|0;c=((a=a+Math.imul(b,me)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(B,Q),i=(i=Math.imul(B,ee))+Math.imul(j,Q)|0,a=Math.imul(j,ee),n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(R,re)|0,a=a+Math.imul(R,ne)|0,n=n+Math.imul(P,ae)|0,i=(i=i+Math.imul(P,oe)|0)+Math.imul(z,ae)|0,a=a+Math.imul(z,oe)|0,n=n+Math.imul(C,le)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(I,le)|0,a=a+Math.imul(I,ce)|0,n=n+Math.imul(M,he)|0,i=(i=i+Math.imul(M,fe)|0)+Math.imul(S,he)|0,a=a+Math.imul(S,fe)|0;var Ce=(c+(n=n+Math.imul(T,de)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(k,de)|0))<<13)|0;c=((a=a+Math.imul(k,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(B,re),i=(i=Math.imul(B,ne))+Math.imul(j,re)|0,a=Math.imul(j,ne),n=n+Math.imul(O,ae)|0,i=(i=i+Math.imul(O,oe)|0)+Math.imul(R,ae)|0,a=a+Math.imul(R,oe)|0,n=n+Math.imul(P,le)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(z,le)|0,a=a+Math.imul(z,ce)|0,n=n+Math.imul(C,he)|0,i=(i=i+Math.imul(C,fe)|0)+Math.imul(I,he)|0,a=a+Math.imul(I,fe)|0;var Ie=(c+(n=n+Math.imul(M,de)|0)|0)+((8191&(i=(i=i+Math.imul(M,me)|0)+Math.imul(S,de)|0))<<13)|0;c=((a=a+Math.imul(S,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(B,ae),i=(i=Math.imul(B,oe))+Math.imul(j,ae)|0,a=Math.imul(j,oe),n=n+Math.imul(O,le)|0,i=(i=i+Math.imul(O,ce)|0)+Math.imul(R,le)|0,a=a+Math.imul(R,ce)|0,n=n+Math.imul(P,he)|0,i=(i=i+Math.imul(P,fe)|0)+Math.imul(z,he)|0,a=a+Math.imul(z,fe)|0;var Le=(c+(n=n+Math.imul(C,de)|0)|0)+((8191&(i=(i=i+Math.imul(C,me)|0)+Math.imul(I,de)|0))<<13)|0;c=((a=a+Math.imul(I,me)|0)+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,n=Math.imul(B,le),i=(i=Math.imul(B,ce))+Math.imul(j,le)|0,a=Math.imul(j,ce),n=n+Math.imul(O,he)|0,i=(i=i+Math.imul(O,fe)|0)+Math.imul(R,he)|0,a=a+Math.imul(R,fe)|0;var Pe=(c+(n=n+Math.imul(P,de)|0)|0)+((8191&(i=(i=i+Math.imul(P,me)|0)+Math.imul(z,de)|0))<<13)|0;c=((a=a+Math.imul(z,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(B,he),i=(i=Math.imul(B,fe))+Math.imul(j,he)|0,a=Math.imul(j,fe);var ze=(c+(n=n+Math.imul(O,de)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(R,de)|0))<<13)|0;c=((a=a+Math.imul(R,me)|0)+(i>>>13)|0)+(ze>>>26)|0,ze&=67108863;var De=(c+(n=Math.imul(B,de))|0)+((8191&(i=(i=Math.imul(B,me))+Math.imul(j,de)|0))<<13)|0;return c=((a=Math.imul(j,me))+(i>>>13)|0)+(De>>>26)|0,De&=67108863,l[0]=ge,l[1]=ye,l[2]=ve,l[3]=xe,l[4]=_e,l[5]=be,l[6]=we,l[7]=Te,l[8]=ke,l[9]=Ae,l[10]=Me,l[11]=Se,l[12]=Ee,l[13]=Ce,l[14]=Ie,l[15]=Le,l[16]=Pe,l[17]=ze,l[18]=De,0!==c&&(l[19]=c,r.length++),r};function m(e,t,r){return(new g).mulp(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(d=p),a.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?d(this,e,t):n<63?p(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,a=0;a>>26)|0)>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,e,t):m(this,e,t),r},g.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n>=1;return n},g.prototype.permute=function(e,t,r,n,i,a){for(var o=0;o>>=1)i++;return 1<>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o>=26,t+=i/67108864|0,t+=a>>>26,this.words[r]=67108863&a}return 0!==t&&(this.words[r]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new a(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var a=e%26,o=Math.min((e-a)/26,this.length),s=67108863^67108863>>>a<o)for(this.length-=o,c=0;c=0&&(0!==u||c>=i);c--){var h=0|this.words[c];this.words[c]=u<<26-a|h>>>a,u=h&s}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,o=0|i.words[i.length-1];0!=(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,l=n.length-i.length;if("mod"!==t){(s=new a(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c=0;h--){var f=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(f=Math.min(f/o|0,67108863),n._ishlnsubmul(i,f,h);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);s&&(s.words[h]=f)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):this.negative&e.negative?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,o,s},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},a.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new a(1),o=new a(0),s=new a(0),l=new a(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),h=t.clone();!t.isZero();){for(var f=0,p=1;!(t.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(u),o.isub(h)),i.iushrn(1),o.iushrn(1);for(var d=0,m=1;!(r.words[0]&m)&&d<26;++d,m<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(h)),s.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),o.isub(l)):(r.isub(t),s.isub(i),l.isub(o))}return{a:s,b:l,gcd:r.iushln(c)}},a.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t,r=this,i=e.clone();r=0!==r.negative?r.umod(e):r.clone();for(var o=new a(1),s=new a(0),l=i.clone();r.cmpn(1)>0&&i.cmpn(1)>0;){for(var c=0,u=1;!(r.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(r.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var h=0,f=1;!(i.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(i.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);r.cmp(i)>=0?(r.isub(i),o.isub(s)):(i.isub(r),s.isub(o))}return(t=0===r.cmpn(1)?o:s).cmpn(0)<0&&t.iadd(e),t},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var a=t;t=r,r=a}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return!(1&this.words[0])},a.prototype.isOdd=function(){return!(1&~this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new T(e)},a.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function b(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function T(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){T.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},i(x,v),x.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,a=o}a>>>=22,e.words[i-10]=a,0===a&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new x;else if("p224"===e)t=new _;else if("p192"===e)t=new b;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new w}return y[e]=t,t},T.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},T.prototype._verify2=function(e,t){n(!(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},T.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},T.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},T.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},T.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},T.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},T.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},T.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},T.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},T.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},T.prototype.isqr=function(e){return this.imul(e,e.clone())},T.prototype.sqr=function(e){return this.mul(e,e)},T.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var h=this.pow(u,i),f=this.pow(e,i.addn(1).iushrn(1)),p=this.pow(e,i),d=o;0!==p.cmp(s);){for(var m=p,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var c=t.words[n],u=l-1;u>=0;u--){var h=c>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==o?(o<<=1,o|=h,(4==++s||0===n&&0===u)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}l=26}return i},T.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},T.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new k(e)},i(k,T),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},6860:function(e){e.exports=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}},6864:function(e){e.exports=function(){var e=new Float32Array(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},6867:function(e,t,r){e.exports=function(e,t,r){switch(arguments.length){case 1:return function(e){return n=[],c(e,e,u,!0),n}(e);case 2:return"function"==typeof t?c(e,e,t,!0):function(e,t){return n=[],c(e,t,u,!1),n}(e,t);case 3:return c(e,t,r,!1);default:throw new Error("box-intersect: Invalid arguments")}};var n,i=r(1888),a=r(855),o=r(7150);function s(e,t){for(var r=0;r>>1;if(!(u<=0)){var h,f=i.mallocDouble(2*u*s),p=i.mallocInt32(s);if((s=l(e,u,f,p))>0){if(1===u&&n)a.init(s),h=a.sweepComplete(u,r,0,s,f,p,0,s,f,p);else{var d=i.mallocDouble(2*u*c),m=i.mallocInt32(c);(c=l(t,u,d,m))>0&&(a.init(s+c),h=1===u?a.sweepBipartite(u,r,0,s,f,p,0,c,d,m):o(u,r,n,s,f,p,c,d,m),i.free(d),i.free(m))}i.free(f),i.free(p)}return h}}}function u(e,t){n.push([e,t])}},6894:function(e){e.exports=function(e,t,r,n){var i=r[1],a=r[2],o=t[1]-i,s=t[2]-a,l=Math.sin(n),c=Math.cos(n);return e[0]=t[0],e[1]=i+o*c-s*l,e[2]=a+o*l+s*c,e}},7004:function(e){e.exports=function(e){for(var t=e.length,r=e[e.length-1],n=t,i=t-2;i>=0;--i){var a=r;(l=(s=e[i])-((r=a+s)-a))&&(e[--n]=r,r=l)}var o=0;for(i=n;i0;){var D=(P-=1)*_,O=w[D],R=w[D+1],F=w[D+2],B=w[D+3],j=w[D+4],N=w[D+5],U=P*b,V=T[U],q=T[U+1],H=1&N,G=!!(16&N),W=u,Z=S,Y=C,X=I;if(H&&(W=C,Z=I,Y=u,X=S),!(2&N&&(F=g(e,O,R,F,W,Z,q),R>=F)||4&N&&(R=y(e,O,R,F,W,Z,V),R>=F))){var $=F-R,K=j-B;if(G){if(e*$*($+K)=p0)&&!(p1>=hi)"),m=u("lo===p0"),g=u("lo"u"?r(1538):WeakMap,i=r(2762),a=r(8116),o=new n;e.exports=function(e){var t=o.get(e),r=t&&(t._triangleBuffer.handle||t._triangleBuffer.buffer);if(!r||!e.isBuffer(r)){var n=i(e,new Float32Array([-1,-1,-1,4,4,-1]));(t=a(e,[{buffer:n,type:e.FLOAT,size:2}]))._triangleBuffer=n,o.set(e,t)}t.bind(),e.drawArrays(e.TRIANGLES,0,3),t.unbind()}},7182:function(e,t,r){var n={identity:r(7894),translate:r(7656),multiply:r(6760),create:r(6864),scale:r(2504),fromRotationTranslation:r(6743)},i=(n.create(),n.create());e.exports=function(e,t,r,a,o,s){return n.identity(e),n.fromRotationTranslation(e,s,t),e[3]=o[0],e[7]=o[1],e[11]=o[2],e[15]=o[3],n.identity(i),0!==a[2]&&(i[9]=a[2],n.multiply(e,e,i)),0!==a[1]&&(i[9]=0,i[8]=a[1],n.multiply(e,e,i)),0!==a[0]&&(i[8]=0,i[4]=a[0],n.multiply(e,e,i)),n.scale(e,e,r),e}},7201:function(e,t,r){var n=r(9405),i=r(2762),a=r(8116),o=r(7766),s=r(8406),l=r(6760),c=r(7608),u=r(9618),h=r(6729),f=r(7765),p=r(1888),d=r(840),m=r(7626),g=d.meshShader,y=d.wireShader,v=d.pointShader,x=d.pickShader,_=d.pointPickShader,b=d.contourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function T(e,t,r,n,i,a,o,s,l,c,u,h,f,p,d,m,g,y,v,x,_,b,T,k,A,M,S){this.gl=e,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=t,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=a,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleColors=u,this.triangleNormals=f,this.triangleUVs=h,this.triangleIds=c,this.triangleVAO=p,this.triangleCount=0,this.lineWidth=1,this.edgePositions=d,this.edgeColors=g,this.edgeUVs=y,this.edgeIds=m,this.edgeVAO=v,this.edgeCount=0,this.pointPositions=x,this.pointColors=b,this.pointUVs=T,this.pointSizes=k,this.pointIds=_,this.pointVAO=A,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=M,this.contourVAO=S,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=w,this._view=w,this._projection=w,this._resolution=[1,1]}var k=T.prototype;function A(e,t){if(!t||!t.length)return 1;for(var r=0;re&&r>0){var n=(t[r][0]-e)/(t[r][0]-t[r-1][0]);return t[r][1]*(1-n)+n*t[r-1][1]}}return 1}k.isOpaque=function(){return!this.hasAlpha},k.isTransparent=function(){return this.hasAlpha},k.pickSlots=1,k.setPickBase=function(e){this.pickId=e},k.highlight=function(e){if(e&&this.contourEnable){for(var t=f(this.cells,this.intensity,e.intensity),r=t.cells,n=t.vertexIds,i=t.vertexWeights,a=r.length,o=p.mallocFloat32(6*a),s=0,l=0;l0&&((u=this.triShader).bind(),u.uniforms=s,this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&this.lineWidth>0&&((u=this.lineShader).bind(),u.uniforms=s,this.edgeVAO.bind(),t.lineWidth(this.lineWidth*this.pixelRatio),t.drawArrays(t.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((u=this.pointShader).bind(),u.uniforms=s,this.pointVAO.bind(),t.drawArrays(t.POINTS,0,this.pointCount),this.pointVAO.unbind()),this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((u=this.contourShader).bind(),u.uniforms=s,this.contourVAO.bind(),t.drawArrays(t.LINES,0,this.contourCount),this.contourVAO.unbind())},k.drawPick=function(e){e=e||{};for(var t=this.gl,r=e.model||w,n=e.view||w,i=e.projection||w,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[t.drawingBufferWidth,t.drawingBufferHeight];var s,l={model:r,view:n,projection:i,clipBounds:a,pickId:this.pickId/255};(s=this.pickShader).bind(),s.uniforms=l,this.triangleCount>0&&(this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),t.lineWidth(this.lineWidth*this.pixelRatio),t.drawArrays(t.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),t.drawArrays(t.POINTS,0,this.pointCount),this.pointVAO.unbind())},k.pick=function(e){if(!e||e.id!==this.pickId)return null;for(var t=e.value[0]+256*e.value[1]+65536*e.value[2],r=this.cells[t],n=this.positions,i=new Array(r.length),a=0;aMath.max(r,n)?i[2]=1:r>Math.max(t,n)?i[0]=1:i[1]=1;for(var a=0,o=0,l=0;l<3;++l)a+=e[l]*e[l],o+=i[l]*e[l];for(l=0;l<3;++l)i[l]-=o/a*e[l];return s(i,i),i}function f(e,t,r,i,a,o,s,l){this.center=n(r),this.up=n(i),this.right=n(a),this.radius=n([o]),this.angle=n([s,l]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(e,t),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var c=0;c<16;++c)this.computedMatrix[c]=.5;this.recalcMatrix(0)}var p=f.prototype;p.setDistanceLimits=function(e,t){e=e>0?Math.log(e):-1/0,t=t>0?Math.log(t):1/0,t=Math.max(t,e),this.radius.bounds[0][0]=e,this.radius.bounds[1][0]=t},p.getDistanceLimits=function(e){var t=this.radius.bounds[0];return e?(e[0]=Math.exp(t[0][0]),e[1]=Math.exp(t[1][0]),e):[Math.exp(t[0][0]),Math.exp(t[1][0])]},p.recalcMatrix=function(e){this.center.curve(e),this.up.curve(e),this.right.curve(e),this.radius.curve(e),this.angle.curve(e);for(var t=this.computedUp,r=this.computedRight,n=0,i=0,a=0;a<3;++a)i+=t[a]*r[a],n+=t[a]*t[a];var l=Math.sqrt(n),u=0;for(a=0;a<3;++a)r[a]-=t[a]*i/n,u+=r[a]*r[a],t[a]/=l;var h=Math.sqrt(u);for(a=0;a<3;++a)r[a]/=h;var f=this.computedToward;o(f,t,r),s(f,f);var p=Math.exp(this.computedRadius[0]),d=this.computedAngle[0],m=this.computedAngle[1],g=Math.cos(d),y=Math.sin(d),v=Math.cos(m),x=Math.sin(m),_=this.computedCenter,b=g*v,w=y*v,T=x,k=-g*x,A=-y*x,M=v,S=this.computedEye,E=this.computedMatrix;for(a=0;a<3;++a){var C=b*r[a]+w*f[a]+T*t[a];E[4*a+1]=k*r[a]+A*f[a]+M*t[a],E[4*a+2]=C,E[4*a+3]=0}var I=E[1],L=E[5],P=E[9],z=E[2],D=E[6],O=E[10],R=L*O-P*D,F=P*z-I*O,B=I*D-L*z,j=c(R,F,B);for(R/=j,F/=j,B/=j,E[0]=R,E[4]=F,E[8]=B,a=0;a<3;++a)S[a]=_[a]+E[2+4*a]*p;for(a=0;a<3;++a){u=0;for(var N=0;N<3;++N)u+=E[a+4*N]*S[N];E[12+a]=-u}E[15]=1},p.getMatrix=function(e,t){this.recalcMatrix(e);var r=this.computedMatrix;if(t){for(var n=0;n<16;++n)t[n]=r[n];return t}return r};var d=[0,0,0];p.rotate=function(e,t,r,n){if(this.angle.move(e,t,r),n){this.recalcMatrix(e);var i=this.computedMatrix;d[0]=i[2],d[1]=i[6],d[2]=i[10];for(var o=this.computedUp,s=this.computedRight,l=this.computedToward,c=0;c<3;++c)i[4*c]=o[c],i[4*c+1]=s[c],i[4*c+2]=l[c];for(a(i,i,n,d),c=0;c<3;++c)o[c]=i[4*c],s[c]=i[4*c+1];this.up.set(e,o[0],o[1],o[2]),this.right.set(e,s[0],s[1],s[2])}},p.pan=function(e,t,r,n){t=t||0,r=r||0,n=n||0,this.recalcMatrix(e);var i=this.computedMatrix,a=(Math.exp(this.computedRadius[0]),i[1]),o=i[5],s=i[9],l=c(a,o,s);a/=l,o/=l,s/=l;var u=i[0],h=i[4],f=i[8],p=u*a+h*o+f*s,d=c(u-=a*p,h-=o*p,f-=s*p),m=(u/=d)*t+a*r,g=(h/=d)*t+o*r,y=(f/=d)*t+s*r;this.center.move(e,m,g,y);var v=Math.exp(this.computedRadius[0]);v=Math.max(1e-4,v+n),this.radius.set(e,Math.log(v))},p.translate=function(e,t,r,n){this.center.move(e,t||0,r||0,n||0)},p.setMatrix=function(e,t,r,n){var a=1;"number"==typeof r&&(a=0|r),(a<0||a>3)&&(a=1);var o=(a+2)%3;t||(this.recalcMatrix(e),t=this.computedMatrix);var s=t[a],l=t[a+4],h=t[a+8];if(n){var f=Math.abs(s),p=Math.abs(l),d=Math.abs(h),m=Math.max(f,p,d);f===m?(s=s<0?-1:1,l=h=0):d===m?(h=h<0?-1:1,s=l=0):(l=l<0?-1:1,s=h=0)}else{var g=c(s,l,h);s/=g,l/=g,h/=g}var y,v,x=t[o],_=t[o+4],b=t[o+8],w=x*s+_*l+b*h,T=c(x-=s*w,_-=l*w,b-=h*w),k=l*(b/=T)-h*(_/=T),A=h*(x/=T)-s*b,M=s*_-l*x,S=c(k,A,M);if(k/=S,A/=S,M/=S,this.center.jump(e,H,G,W),this.radius.idle(e),this.up.jump(e,s,l,h),this.right.jump(e,x,_,b),2===a){var E=t[1],C=t[5],I=t[9],L=E*x+C*_+I*b,P=E*k+C*A+I*M;y=R<0?-Math.PI/2:Math.PI/2,v=Math.atan2(P,L)}else{var z=t[2],D=t[6],O=t[10],R=z*s+D*l+O*h,F=z*x+D*_+O*b,B=z*k+D*A+O*M;y=Math.asin(u(R)),v=Math.atan2(B,F)}this.angle.jump(e,v,y),this.recalcMatrix(e);var j=t[2],N=t[6],U=t[10],V=this.computedMatrix;i(V,t);var q=V[15],H=V[12]/q,G=V[13]/q,W=V[14]/q,Z=Math.exp(this.computedRadius[0]);this.center.jump(e,H-j*Z,G-N*Z,W-U*Z)},p.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},p.idle=function(e){this.center.idle(e),this.up.idle(e),this.right.idle(e),this.radius.idle(e),this.angle.idle(e)},p.flush=function(e){this.center.flush(e),this.up.flush(e),this.right.flush(e),this.radius.flush(e),this.angle.flush(e)},p.setDistance=function(e,t){t>0&&this.radius.set(e,Math.log(t))},p.lookAt=function(e,t,r,n){this.recalcMatrix(e),t=t||this.computedEye,r=r||this.computedCenter;var i=(n=n||this.computedUp)[0],a=n[1],o=n[2],s=c(i,a,o);if(!(s<1e-6)){i/=s,a/=s,o/=s;var l=t[0]-r[0],h=t[1]-r[1],f=t[2]-r[2],p=c(l,h,f);if(!(p<1e-6)){l/=p,h/=p,f/=p;var d=this.computedRight,m=d[0],g=d[1],y=d[2],v=i*m+a*g+o*y,x=c(m-=v*i,g-=v*a,y-=v*o);if(!(x<.01&&(m=a*f-o*h,g=o*l-i*f,y=i*h-a*l,x=c(m,g,y),x<1e-6))){m/=x,g/=x,y/=x,this.up.set(e,i,a,o),this.right.set(e,m,g,y),this.center.set(e,r[0],r[1],r[2]),this.radius.set(e,Math.log(p));var _=a*y-o*g,b=o*m-i*y,w=i*g-a*m,T=c(_,b,w),k=i*l+a*h+o*f,A=m*l+g*h+y*f,M=(_/=T)*l+(b/=T)*h+(w/=T)*f,S=Math.asin(u(k)),E=Math.atan2(M,A),C=this.angle._state,I=C[C.length-1],L=C[C.length-2];I%=2*Math.PI;var P=Math.abs(I+2*Math.PI-E),z=Math.abs(I-E),D=Math.abs(I-2*Math.PI-E);P max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D dashTexture;\nuniform float dashScale;\nuniform float opacity;\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], worldPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;\n if(dashWeight < 0.5) {\n discard;\n }\n gl_FragColor = fragColor * opacity;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\n#define FLOAT_MAX 1.70141184e38\n#define FLOAT_MIN 1.17549435e-38\n\n// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl\nvec4 packFloat(float v) {\n float av = abs(v);\n\n //Handle special cases\n if(av < FLOAT_MIN) {\n return vec4(0.0, 0.0, 0.0, 0.0);\n } else if(v > FLOAT_MAX) {\n return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;\n }\n\n vec4 c = vec4(0,0,0,0);\n\n //Compute exponent and mantissa\n float e = floor(log2(av));\n float m = av * pow(2.0, -e) - 1.0;\n\n //Unpack mantissa\n c[1] = floor(128.0 * m);\n m -= c[1] / 128.0;\n c[2] = floor(32768.0 * m);\n m -= c[2] / 32768.0;\n c[3] = floor(8388608.0 * m);\n\n //Unpack exponent\n float ebias = e + 127.0;\n c[0] = floor(ebias / 2.0);\n ebias -= c[0] * 2.0;\n c[1] += floor(ebias) * 128.0;\n\n //Unpack sign bit\n c[0] += 128.0 * step(0.0, -v);\n\n //Scale back to range\n return c / 255.0;\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform float pickId;\nuniform vec3 clipBounds[2];\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;\n\n gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz);\n}"]),l=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];t.createShader=function(e){return i(e,a,o,null,l)},t.createPickShader=function(e){return i(e,a,s,null,l)}},7352:function(e,t,r){var n=r(5721),i=r(4750),a=r(2690);e.exports=function(e){var t=e.length;if(0===t)return[];if(1===t)return[[0]];var r=e[0].length;return 0===r?[]:1===r?n(e):2===r?i(e):a(e,r)}},7399:function(e){e.exports=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r+r,s=n+n,l=i+i,c=r*o,u=n*o,h=n*s,f=i*o,p=i*s,d=i*l,m=a*o,g=a*s,y=a*l;return e[0]=1-h-d,e[1]=u+y,e[2]=f-g,e[3]=0,e[4]=u-y,e[5]=1-c-d,e[6]=p+m,e[7]=0,e[8]=f+g,e[9]=p-m,e[10]=1-c-h,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},7417:function(e){e.exports=function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e}},7442:function(e,t,r){var n=r(6658),i=r(7182),a=r(2652),o=r(9921),s=r(8648),l=h(),c=h(),u=h();function h(){return{translate:f(),scale:f(1),skew:f(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function f(e){return[e||0,e||0,e||0]}e.exports=function(e,t,r,h){if(0===o(t)||0===o(r))return!1;var f=a(t,l.translate,l.scale,l.skew,l.perspective,l.quaternion),p=a(r,c.translate,c.scale,c.skew,c.perspective,c.quaternion);return!(!f||!p||(n(u.translate,l.translate,c.translate,h),n(u.skew,l.skew,c.skew,h),n(u.scale,l.scale,c.scale,h),n(u.perspective,l.perspective,c.perspective,h),s(u.quaternion,l.quaternion,c.quaternion,h),i(e,u.translate,u.scale,u.skew,u.perspective,u.quaternion),0))}},7507:function(e,t){t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,a=s(e),o=a[0],l=a[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,o,l)),u=0,h=l>0?o-4:o;for(r=0;r>16&255,c[u++]=t>>8&255,c[u++]=255&t;return 2===l&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[u++]=255&t),1===l&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a=[],o=16383,s=0,l=n-i;sl?l:s+o));return 1===i?(t=e[n-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),a.join("")};for(var r=[],n=[],i=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)r[o]=a[o],n[a.charCodeAt(o)]=o;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function c(e,t,r){for(var n,i=[],a=t;a1.0001)return null;y+=g[h]}return Math.abs(y-1)>.001?null:[f,s(e,g),g]}},7636:function(e){e.exports=function(e,t){t=t||1;var r=2*Math.random()*Math.PI,n=2*Math.random()-1,i=Math.sqrt(1-n*n)*t;return e[0]=Math.cos(r)*i,e[1]=Math.sin(r)*i,e[2]=n*t,e}},7640:function(e,t,r){var n=r(1888);function i(e){return"uint32"===e?[n.mallocUint32,n.freeUint32]:null}var a={"uint32,1,0":function(e,t){return function(r,n,i,a,o,s,l,c,u,h,f){var p,d,m,g,y,v,x,_,b=r*o+a,w=e(c);for(p=r+1;p<=n;++p){for(d=p,m=b+=o,y=0,v=b,g=0;gr;){y=0,v=m-o;t:for(g=0;g_)break t;v+=h,y+=f}for(y=m,v=m-o,g=0;g>1,H=q-N,G=q+N,W=U,Z=H,Y=q,X=G,$=V,K=i+1,J=a-1,Q=!0,ee=0,te=0,re=0,ne=h,ie=t(ne),ae=t(ne);A=l*W,M=l*Z,j=s;e:for(k=0;k0){g=W,W=Z,Z=g;break e}if(re<0)break e;j+=p}A=l*X,M=l*$,j=s;e:for(k=0;k0){g=X,X=$,$=g;break e}if(re<0)break e;j+=p}A=l*W,M=l*Y,j=s;e:for(k=0;k0){g=W,W=Y,Y=g;break e}if(re<0)break e;j+=p}A=l*Z,M=l*Y,j=s;e:for(k=0;k0){g=Z,Z=Y,Y=g;break e}if(re<0)break e;j+=p}A=l*W,M=l*X,j=s;e:for(k=0;k0){g=W,W=X,X=g;break e}if(re<0)break e;j+=p}A=l*Y,M=l*X,j=s;e:for(k=0;k0){g=Y,Y=X,X=g;break e}if(re<0)break e;j+=p}A=l*Z,M=l*$,j=s;e:for(k=0;k0){g=Z,Z=$,$=g;break e}if(re<0)break e;j+=p}A=l*Z,M=l*Y,j=s;e:for(k=0;k0){g=Z,Z=Y,Y=g;break e}if(re<0)break e;j+=p}A=l*X,M=l*$,j=s;e:for(k=0;k0){g=X,X=$,$=g;break e}if(re<0)break e;j+=p}for(A=l*W,M=l*Z,S=l*Y,E=l*X,C=l*$,I=l*U,L=l*q,P=l*V,B=0,j=s,k=0;k0)){if(re<0){for(A=l*_,M=l*K,S=l*J,j=s,k=0;k0)for(;;){for(b=s+J*l,B=0,k=0;k0)){for(b=s+J*l,B=0,k=0;kV){e:for(;;){for(b=s+K*l,B=0,j=s,k=0;k1&&n?s(r,n[0],n[1]):s(r)}(e,t,l);return n(l,c)}},7642:function(e,t,r){var n=r(8954),i=r(1682);function a(e,t){this.point=e,this.index=t}function o(e,t){for(var r=e.point,n=t.point,i=r.length,a=0;a=2)return!1;e[r]=n}return!0})):b.filter((function(e){for(var t=0;t<=s;++t){var r=y[e[t]];if(r<0)return!1;e[t]=r}return!0})),1&s)for(u=0;u0&&(a=n.size),n.lineSpacing&&n.lineSpacing>0&&(o=n.lineSpacing),n.styletags&&n.styletags.breaklines&&(s.breaklines=!!n.styletags.breaklines),n.styletags&&n.styletags.bolds&&(s.bolds=!!n.styletags.bolds),n.styletags&&n.styletags.italics&&(s.italics=!!n.styletags.italics),n.styletags&&n.styletags.subscripts&&(s.subscripts=!!n.styletags.subscripts),n.styletags&&n.styletags.superscripts&&(s.superscripts=!!n.styletags.superscripts)),r.font=[n.fontStyle,n.fontVariant,n.fontWeight,a+"px",n.font].filter((function(e){return e})).join(" "),r.textAlign="start",r.textBaseline="alphabetic",r.direction="ltr",b(function(e,t,r,n,a,o){r=r.replace(/\n/g,""),r=!0===o.breaklines?r.replace(/\/g,"\n"):r.replace(/\/g," ");var s="",l=[];for(I=0;I-1?parseInt(e[1+i]):0,l=a>-1?parseInt(r[1+a]):0;s!==l&&(n=n.replace(F(),"?px "),z*=Math.pow(.75,l-s),n=n.replace("?px ",F())),P+=.25*k*(l-s)}if(!0===o.superscripts){var c=e.indexOf(d),h=r.indexOf(d),p=c>-1?parseInt(e[1+c]):0,m=h>-1?parseInt(r[1+h]):0;p!==m&&(n=n.replace(F(),"?px "),z*=Math.pow(.75,m-p),n=n.replace("?px ",F())),P-=.25*k*(m-p)}if(!0===o.bolds){var g=e.indexOf(u)>-1,v=r.indexOf(u)>-1;!g&&v&&(n=x?n.replace("italic ","italic bold "):"bold "+n),g&&!v&&(n=n.replace("bold ",""))}if(!0===o.italics){var x=e.indexOf(f)>-1,_=r.indexOf(f)>-1;!x&&_&&(n="italic "+n),x&&!_&&(n=n.replace("italic ",""))}t.font=n}for(C=0;C",a="",o=i.length,s=a.length,l=t[0]===d||t[0]===y,c=0,u=-s;c>-1&&!(-1===(c=r.indexOf(i,c))||(u=r.indexOf(a,c+o),-1===u)||u<=c);){for(var h=c;h=u)n[h]=null,r=r.substr(0,h)+" "+r.substr(h+1);else if(null!==n[h]){var f=n[h].indexOf(t[0]);-1===f?n[h]+=t:l&&(n[h]=n[h].substr(0,f+1)+(1+parseInt(n[h][f+1]))+n[h].substr(f+2))}var p=c+o,m=r.substr(p,u-p).indexOf(i);c=-1!==m?m:u+s}return n}function _(e,t,r,i){var c=function(e,t){var r=n(e,128);return t?a(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}(e,i),u=function(e,t,r){for(var n=t.textAlign||"start",i=t.textBaseline||"alphabetic",a=[1<<30,1<<30],o=[0,0],s=e.length,l=0;l"u"&&(s=function(e){for(var t=e.length,r=0,n=0;ns||o[1]<0||o[1]>s)throw new Error("gl-texture2d: Invalid texture size");var l=d(o,t.stride.slice()),c=0;"float32"===r?c=e.FLOAT:"float64"===r?(c=e.FLOAT,l=!1,r="float32"):"uint8"===r?c=e.UNSIGNED_BYTE:(c=e.UNSIGNED_BYTE,l=!1,r="uint8");var h=0;if(2===o.length)h=e.LUMINANCE,o=[o[0],o[1],1],t=n(t.data,o,[t.stride[0],t.stride[1],1],t.offset);else{if(3!==o.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===o[2])h=e.ALPHA;else if(2===o[2])h=e.LUMINANCE_ALPHA;else if(3===o[2])h=e.RGB;else{if(4!==o[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");h=e.RGBA}}c===e.FLOAT&&!e.getExtension("OES_texture_float")&&(c=e.UNSIGNED_BYTE,l=!1);var p,g,y=t.size;if(l)p=0===t.offset&&t.data.length===y?t.data:t.data.subarray(t.offset,t.offset+y);else{var v=[o[2],o[2]*o[0],1];g=a.malloc(y,r);var x=n(g,o,v,0);"float32"!==r&&"float64"!==r||c!==e.UNSIGNED_BYTE?i.assign(x,t):u(x,t),p=g.subarray(0,y)}var _=m(e);return e.texImage2D(e.TEXTURE_2D,0,h,o[0],o[1],0,h,c,p),l||a.free(g),new f(e,_,o[0],o[1],h,c)}(e,t)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")};var o=null,s=null,l=null;function c(e){return typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLVideoElement<"u"&&e instanceof HTMLVideoElement||typeof ImageData<"u"&&e instanceof ImageData}var u=function(e,t){i.muls(e,t,255)};function h(e,t,r){var n=e.gl,i=n.getParameter(n.MAX_TEXTURE_SIZE);if(t<0||t>i||r<0||r>i)throw new Error("gl-texture2d: Invalid texture size");return e._shape=[t,r],e.bind(),n.texImage2D(n.TEXTURE_2D,0,e.format,t,r,0,e.format,e.type,null),e._mipLevels=[0],e}function f(e,t,r,n,i,a){this.gl=e,this.handle=t,this.format=i,this.type=a,this._shape=[r,n],this._mipLevels=[0],this._magFilter=e.NEAREST,this._minFilter=e.NEAREST,this._wrapS=e.CLAMP_TO_EDGE,this._wrapT=e.CLAMP_TO_EDGE,this._anisoSamples=1;var o=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return o._wrapS},set:function(e){return o.wrapS=e}},{get:function(){return o._wrapT},set:function(e){return o.wrapT=e}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return o._shape[0]},set:function(e){return o.width=e}},{get:function(){return o._shape[1]},set:function(e){return o.height=e}}]),this._shapeVector=l}var p=f.prototype;function d(e,t){return 3===e.length?1===t[2]&&t[1]===e[0]*e[2]&&t[0]===e[2]:1===t[0]&&t[1]===e[0]}function m(e){var t=e.createTexture();return e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t}function g(e,t,r,n,i){var a=e.getParameter(e.MAX_TEXTURE_SIZE);if(t<0||t>a||r<0||r>a)throw new Error("gl-texture2d: Invalid texture shape");if(i===e.FLOAT&&!e.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var o=m(e);return e.texImage2D(e.TEXTURE_2D,0,n,t,r,0,n,i,null),new f(e,o,t,r,n,i)}Object.defineProperties(p,{minFilter:{get:function(){return this._minFilter},set:function(e){this.bind();var t=this.gl;if(this.type===t.FLOAT&&o.indexOf(e)>=0&&(t.getExtension("OES_texture_float_linear")||(e=t.NEAREST)),s.indexOf(e)<0)throw new Error("gl-texture2d: Unknown filter mode "+e);return t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,e),this._minFilter=e}},magFilter:{get:function(){return this._magFilter},set:function(e){this.bind();var t=this.gl;if(this.type===t.FLOAT&&o.indexOf(e)>=0&&(t.getExtension("OES_texture_float_linear")||(e=t.NEAREST)),s.indexOf(e)<0)throw new Error("gl-texture2d: Unknown filter mode "+e);return t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,e),this._magFilter=e}},mipSamples:{get:function(){return this._anisoSamples},set:function(e){var t=this._anisoSamples;if(this._anisoSamples=0|Math.max(e,1),t!==this._anisoSamples){var r=this.gl.getExtension("EXT_texture_filter_anisotropic");r&&this.gl.texParameterf(this.gl.TEXTURE_2D,r.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(e){if(this.bind(),l.indexOf(e)<0)throw new Error("gl-texture2d: Unknown wrap mode "+e);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,e),this._wrapS=e}},wrapT:{get:function(){return this._wrapT},set:function(e){if(this.bind(),l.indexOf(e)<0)throw new Error("gl-texture2d: Unknown wrap mode "+e);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,e),this._wrapT=e}},wrap:{get:function(){return this._wrapVector},set:function(e){if(Array.isArray(e)||(e=[e,e]),2!==e.length)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var t=0;t<2;++t)if(l.indexOf(e[t])<0)throw new Error("gl-texture2d: Unknown wrap mode "+e);this._wrapS=e[0],this._wrapT=e[1];var r=this.gl;return this.bind(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this._wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this._wrapT),e}},shape:{get:function(){return this._shapeVector},set:function(e){if(Array.isArray(e)){if(2!==e.length)throw new Error("gl-texture2d: Invalid texture shape")}else e=[0|e,0|e];return h(this,0|e[0],0|e[1]),[0|e[0],0|e[1]]}},width:{get:function(){return this._shape[0]},set:function(e){return h(this,e|=0,this._shape[1]),e}},height:{get:function(){return this._shape[1]},set:function(e){return e|=0,h(this,this._shape[0],e),e}}}),p.bind=function(e){var t=this.gl;return void 0!==e&&t.activeTexture(t.TEXTURE0+(0|e)),t.bindTexture(t.TEXTURE_2D,this.handle),void 0!==e?0|e:t.getParameter(t.ACTIVE_TEXTURE)-t.TEXTURE0},p.dispose=function(){this.gl.deleteTexture(this.handle)},p.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var e=Math.min(this._shape[0],this._shape[1]),t=0;e>0;++t,e>>>=1)this._mipLevels.indexOf(t)<0&&this._mipLevels.push(t)},p.setPixels=function(e,t,r,o){var s=this.gl;this.bind(),Array.isArray(t)?(o=r,r=0|t[1],t=0|t[0]):(t=t||0,r=r||0),o=o||0;var l=c(e)?e:e.raw;if(l)this._mipLevels.indexOf(o)<0?(s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,this.type,l),this._mipLevels.push(o)):s.texSubImage2D(s.TEXTURE_2D,o,t,r,this.format,this.type,l);else{if(!(e.shape&&e.stride&&e.data))throw new Error("gl-texture2d: Unsupported data type");if(e.shape.length<2||t+e.shape[1]>this._shape[1]>>>o||r+e.shape[0]>this._shape[0]>>>o||t<0||r<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");!function(e,t,r,o,s,l,c,h){var f=h.dtype,p=h.shape.slice();if(p.length<2||p.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var m=0,g=0,y=d(p,h.stride.slice());if("float32"===f?m=e.FLOAT:"float64"===f?(m=e.FLOAT,y=!1,f="float32"):"uint8"===f?m=e.UNSIGNED_BYTE:(m=e.UNSIGNED_BYTE,y=!1,f="uint8"),2===p.length)g=e.LUMINANCE,p=[p[0],p[1],1],h=n(h.data,p,[h.stride[0],h.stride[1],1],h.offset);else{if(3!==p.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===p[2])g=e.ALPHA;else if(2===p[2])g=e.LUMINANCE_ALPHA;else if(3===p[2])g=e.RGB;else{if(4!==p[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");g=e.RGBA}p[2]}if((g===e.LUMINANCE||g===e.ALPHA)&&(s===e.LUMINANCE||s===e.ALPHA)&&(g=s),g!==s)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var v=h.size,x=c.indexOf(o)<0;if(x&&c.push(o),m===l&&y)0===h.offset&&h.data.length===v?x?e.texImage2D(e.TEXTURE_2D,o,s,p[0],p[1],0,s,l,h.data):e.texSubImage2D(e.TEXTURE_2D,o,t,r,p[0],p[1],s,l,h.data):x?e.texImage2D(e.TEXTURE_2D,o,s,p[0],p[1],0,s,l,h.data.subarray(h.offset,h.offset+v)):e.texSubImage2D(e.TEXTURE_2D,o,t,r,p[0],p[1],s,l,h.data.subarray(h.offset,h.offset+v));else{var _;_=l===e.FLOAT?a.mallocFloat32(v):a.mallocUint8(v);var b=n(_,p,[p[2],p[2]*p[0],1]);m===e.FLOAT&&l===e.UNSIGNED_BYTE?u(b,h):i.assign(b,h),x?e.texImage2D(e.TEXTURE_2D,o,s,p[0],p[1],0,s,l,_.subarray(0,v)):e.texSubImage2D(e.TEXTURE_2D,o,t,r,p[0],p[1],s,l,_.subarray(0,v)),l===e.FLOAT?a.freeFloat32(_):a.freeUint8(_)}}(s,t,r,o,this.format,this.type,this._mipLevels,e)}}},7790:function(){},7815:function(e,t,r){var n=r(2931),i=r(9970),a=["xyz","xzy","yxz","yzx","zxy","zyx"],o=function(e,t){var r,n=e.length;for(r=0;rt)return r-1}return r},s=function(e,t,r){return er?r:e},l=function(e){var t=1/0;e.sort((function(e,t){return e-t}));for(var r=e.length,n=1;nh-1||v>f-1||x>p-1)return n.create();var _,b,w,T,k,A,M=a[0][d],S=a[0][y],E=a[1][m],C=a[1][v],I=a[2][g],L=(l-M)/(S-M),P=(c-E)/(C-E),z=(u-I)/(a[2][x]-I);switch(isFinite(L)||(L=.5),isFinite(P)||(P=.5),isFinite(z)||(z=.5),r.reversedX&&(d=h-1-d,y=h-1-y),r.reversedY&&(m=f-1-m,v=f-1-v),r.reversedZ&&(g=p-1-g,x=p-1-x),r.filled){case 5:k=g,A=x,w=m*p,T=v*p,_=d*p*f,b=y*p*f;break;case 4:k=g,A=x,_=d*p,b=y*p,w=m*p*h,T=v*p*h;break;case 3:w=m,T=v,k=g*f,A=x*f,_=d*f*p,b=y*f*p;break;case 2:w=m,T=v,_=d*f,b=y*f,k=g*f*h,A=x*f*h;break;case 1:_=d,b=y,k=g*h,A=x*h,w=m*h*p,T=v*h*p;break;default:_=d,b=y,w=m*h,T=v*h,k=g*h*f,A=x*h*f}var D=i[_+w+k],O=i[_+w+A],R=i[_+T+k],F=i[_+T+A],B=i[b+w+k],j=i[b+w+A],N=i[b+T+k],U=i[b+T+A],V=n.create(),q=n.create(),H=n.create(),G=n.create();n.lerp(V,D,B,L),n.lerp(q,O,j,L),n.lerp(H,R,N,L),n.lerp(G,F,U,L);var W=n.create(),Z=n.create();n.lerp(W,V,H,P),n.lerp(Z,q,G,P);var Y=n.create();return n.lerp(Y,W,Z,z),Y}(t,e,p)},x=e.getDivergence||function(e,t){var r=n.create(),i=1e-4;n.add(r,e,[i,0,0]);var a=v(r);n.subtract(a,a,t),n.scale(a,a,1/i),n.add(r,e,[0,i,0]);var o=v(r);n.subtract(o,o,t),n.scale(o,o,1/i),n.add(r,e,[0,0,i]);var s=v(r);return n.subtract(s,s,t),n.scale(s,s,1/i),n.add(r,a,o),n.add(r,r,s),r},_=[],b=t[0][0],w=t[0][1],T=t[0][2],k=t[1][0],A=t[1][1],M=t[1][2],S=10*n.distance(t[0],t[1])/c,E=S*S,C=1,I=0,L=r.length;L>1&&(C=function(e){for(var t=[],r=[],n=[],i={},a={},o={},s=e.length,c=0;cI&&(I=N),B.push(N),_.push({points:D,velocities:O,divergences:B});for(var U=0;U<100*c&&D.lengthk||gA||yM));){U++;var V=n.clone(R),q=n.squaredLength(V);if(0===q)break;q>E&&n.scale(V,V,S/Math.sqrt(q)),n.add(V,V,z),R=v(V),n.squaredDistance(F,V)-E>-1e-4*E&&(D.push(V),F=V,O.push(R),j=x(V,R),N=n.length(j),isFinite(N)&&N>I&&(I=N),B.push(N)),z=V}}var H=function(e,t,r,a){for(var o=0,s=0;s0)for(T=0;T<8;T++){var k=(T+1)%8;c.push(f[T],p[T],p[k],p[k],f[k],f[T]),h.push(v,y,y,y,v,v),d.push(m,g,g,g,m,m);var A=c.length;u.push([A-6,A-5,A-4],[A-3,A-2,A-1])}var M=f;f=p,p=M;var S=v;v=y,y=S;var E=m;m=g,g=E}return{positions:c,cells:u,vectors:h,vertexIntensity:d}}(e,r,a,o)})),h=[],f=[],p=[],d=[];for(s=0;s>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},7842:function(e,t,r){var n=r(6330),i=r(1533),a=r(2651),o=r(6768),s=r(869),l=r(8697);e.exports=function e(t,r){if(n(t))return r?l(t,e(r)):[t[0].clone(),t[1].clone()];var c,u,h=0;if(i(t))c=t.clone();else if("string"==typeof t)c=o(t);else{if(0===t)return[a(0),a(1)];if(t===Math.floor(t))c=a(t);else{for(;t!==Math.floor(t);)t*=Math.pow(2,256),h-=256;c=a(t)}}if(n(r))c.mul(r[1]),u=r[0].clone();else if(i(r))u=r.clone();else if("string"==typeof r)u=o(r);else if(r)if(r===Math.floor(r))u=a(r);else{for(;r!==Math.floor(r);)r*=Math.pow(2,256),h+=256;u=a(r)}else u=a(1);return h>0?c=c.ushln(h):h<0&&(u=u.ushln(-h)),s(c,u)}},7894:function(e){e.exports=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},7932:function(e,t,r){var n=r(620);e.exports=n.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},7960:function(e){e.exports=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],a=t[3]-e[3];return r*r+n*n+i*i+a*a}},8105:function(e){e.exports=function(e){return t[e]};var t={"lo===p0":function(e,t,r,n,i,a,o){for(var s=2*e,l=s*r,c=l,u=r,h=t,f=r;n>f;++f,l+=s)if(i[l+h]===o)if(u===f)u+=1,c+=s;else{for(var p=0;s>p;++p){var d=i[l+p];i[l+p]=i[c],i[c++]=d}var m=a[f];a[f]=a[u],a[u++]=m}return u},"lof;++f,l+=s)if(i[l+h]p;++p){var d=i[l+p];i[l+p]=i[c],i[c++]=d}var m=a[f];a[f]=a[u],a[u++]=m}return u},"lo<=p0":function(e,t,r,n,i,a,o){for(var s=2*e,l=s*r,c=l,u=r,h=e+t,f=r;n>f;++f,l+=s)if(i[l+h]<=o)if(u===f)u+=1,c+=s;else{for(var p=0;s>p;++p){var d=i[l+p];i[l+p]=i[c],i[c++]=d}var m=a[f];a[f]=a[u],a[u++]=m}return u},"hi<=p0":function(e,t,r,n,i,a,o){for(var s=2*e,l=s*r,c=l,u=r,h=e+t,f=r;n>f;++f,l+=s)if(i[l+h]<=o)if(u===f)u+=1,c+=s;else{for(var p=0;s>p;++p){var d=i[l+p];i[l+p]=i[c],i[c++]=d}var m=a[f];a[f]=a[u],a[u++]=m}return u},"lop;++p,l+=s){var d=i[l+h],m=i[l+f];if(dg;++g){var y=i[l+g];i[l+g]=i[c],i[c++]=y}var v=a[p];a[p]=a[u],a[u++]=v}}return u},"lo<=p0&&p0<=hi":function(e,t,r,n,i,a,o){for(var s=2*e,l=s*r,c=l,u=r,h=t,f=e+t,p=r;n>p;++p,l+=s){var d=i[l+h],m=i[l+f];if(d<=o&&o<=m)if(u===p)u+=1,c+=s;else{for(var g=0;s>g;++g){var y=i[l+g];i[l+g]=i[c],i[c++]=y}var v=a[p];a[p]=a[u],a[u++]=v}}return u},"!(lo>=p0)&&!(p1>=hi)":function(e,t,r,n,i,a,o,s){for(var l=2*e,c=l*r,u=c,h=r,f=t,p=e+t,d=r;n>d;++d,c+=l){var m=i[c+f],g=i[c+p];if(!(m>=o||s>=g))if(h===d)h+=1,u+=l;else{for(var y=0;l>y;++y){var v=i[c+y];i[c+y]=i[u],i[u++]=v}var x=a[d];a[d]=a[h],a[h++]=x}}return h}}},8107:function(e){e.exports=function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e}},8116:function(e,t,r){var n=r(7518),i=r(870);function a(e){this.bindVertexArrayOES=e.bindVertexArray.bind(e),this.createVertexArrayOES=e.createVertexArray.bind(e),this.deleteVertexArrayOES=e.deleteVertexArray.bind(e)}e.exports=function(e,t,r,o){var s,l=e.createVertexArray?new a(e):e.getExtension("OES_vertex_array_object");return(s=l?n(e,l):i(e)).update(t,r,o),s}},8192:function(e,t,r){e.exports=function(e,t){var r=n(e[0],e[1],e[2]),o=n(t[0],t[1],t[2]);i(r,r),i(o,o);var s=a(r,o);return s>1?0:Math.acos(s)};var n=r(2825),i=r(3536),a=r(244)},8210:function(e){e.exports=function(e,t){var r=0|e.length,n=0|t.length;if(1===r&&1===n)return function(e,t){var r=e+t,n=r-e,i=e-(r-n)+(t-n);return i?[i,r]:[r]}(e[0],t[0]);var i,a,o=new Array(r+n),s=0,l=0,c=0,u=Math.abs,h=e[l],f=u(h),p=t[c],d=u(p);f=n?(i=h,(l+=1)a){var _=i[c],b=1/Math.sqrt(g*v);for(x=0;x<3;++x){var w=(x+1)%3,T=(x+2)%3;_[x]+=b*(y[w]*m[T]-y[T]*m[w])}}}for(o=0;oa)for(b=1/Math.sqrt(k),x=0;x<3;++x)_[x]*=b;else for(x=0;x<3;++x)_[x]=0}return i},t.faceNormals=function(e,t,r){for(var n=e.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;oa?1/Math.sqrt(p):0,c=0;c<3;++c)f[c]*=p;i[o]=f}return i}},8418:function(e,t,r){var n=r(5219),i=r(2762),a=r(8116),o=r(1888),s=r(6760),l=r(1283),c=r(9366),u=r(5964),h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],f=ArrayBuffer,p=DataView;function d(e){return Array.isArray(e)||function(e){return f.isView(e)&&!(e instanceof p)}(e)}function m(e,t){var r=e[0],n=e[1],i=e[2],a=e[3];return e[0]=t[0]*r+t[4]*n+t[8]*i+t[12]*a,e[1]=t[1]*r+t[5]*n+t[9]*i+t[13]*a,e[2]=t[2]*r+t[6]*n+t[10]*i+t[14]*a,e[3]=t[3]*r+t[7]*n+t[11]*i+t[15]*a,e}function g(e,t,r,n){return m(n,n),m(n,n),m(n,n)}function y(e,t){this.index=e,this.dataCoordinate=this.position=t}function v(e){return!0===e||e>1?1:e}function x(e,t,r,n,i,a,o,s,l,c,u,h){this.gl=e,this.pixelRatio=1,this.shader=t,this.orthoShader=r,this.projectShader=n,this.pointBuffer=i,this.colorBuffer=a,this.glyphBuffer=o,this.idBuffer=s,this.vao=l,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[.6666666666666666,.6666666666666666,.6666666666666666],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=c,this.pickOrthoShader=u,this.pickProjectShader=h,this.points=[],this._selectResult=new y(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}e.exports=function(e){var t=e.gl,r=l.createPerspective(t),n=l.createOrtho(t),o=l.createProject(t),s=l.createPickPerspective(t),c=l.createPickOrtho(t),u=l.createPickProject(t),h=i(t),f=i(t),p=i(t),d=i(t),m=new x(t,r,n,o,h,f,p,d,a(t,[{buffer:h,size:3,type:t.FLOAT},{buffer:f,size:4,type:t.FLOAT},{buffer:p,size:2,type:t.FLOAT},{buffer:d,size:4,type:t.UNSIGNED_BYTE,normalized:!0}]),s,c,u);return m.update(e),m};var _=x.prototype;_.pickSlots=1,_.setPickBase=function(e){this.pickId=e},_.isTransparent=function(){if(this.hasAlpha)return!0;for(var e=0;e<3;++e)if(this.axesProject[e]&&this.projectHasAlpha)return!0;return!1},_.isOpaque=function(){if(!this.hasAlpha)return!0;for(var e=0;e<3;++e)if(this.axesProject[e]&&!this.projectHasAlpha)return!0;return!1};var b=[0,0],w=[0,0,0],T=[0,0,0],k=[0,0,0,1],A=[0,0,0,1],M=h.slice(),S=[0,0,0],E=[[0,0,0],[0,0,0]];function C(e){return e[0]=e[1]=e[2]=0,e}function I(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=1,e}function L(e,t,r,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[r]=n,e}var P=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function z(e,t,r,n,i,a,o){var l=r.gl;if((a===r.projectHasAlpha||o)&&function(e,t,r,n){var i,a=t.axesProject,o=t.gl,l=e.uniforms,c=r.model||h,u=r.view||h,f=r.projection||h,p=t.axesBounds,d=function(e){for(var t=E,r=0;r<2;++r)for(var n=0;n<3;++n)t[r][n]=Math.max(Math.min(e[r][n],1e8),-1e8);return t}(t.clipBounds);i=t.axes&&t.axes.lastCubeProps?t.axes.lastCubeProps.axis:[1,1,1],b[0]=2/o.drawingBufferWidth,b[1]=2/o.drawingBufferHeight,e.bind(),l.view=u,l.projection=f,l.screenSize=b,l.highlightId=t.highlightId,l.highlightScale=t.highlightScale,l.clipBounds=d,l.pickGroup=t.pickId/255,l.pixelRatio=n;for(var m=0;m<3;++m)if(a[m]){l.scale=t.projectScale[m],l.opacity=t.projectOpacity[m];for(var y=M,v=0;v<16;++v)y[v]=0;for(v=0;v<4;++v)y[5*v]=1;y[5*m]=0,i[m]<0?y[12+m]=p[0][m]:y[12+m]=p[1][m],s(y,c,y),l.model=y;var x=(m+1)%3,_=(m+2)%3,P=C(w),z=C(T);P[x]=1,z[_]=1;var D=g(0,0,0,I(k,P)),O=g(0,0,0,I(A,z));if(Math.abs(D[1])>Math.abs(O[1])){var R=D;D=O,O=R,R=P,P=z,z=R;var F=x;x=_,_=F}D[0]<0&&(P[x]=-1),O[1]>0&&(z[_]=-1);var B=0,j=0;for(v=0;v<4;++v)B+=Math.pow(c[4*x+v],2),j+=Math.pow(c[4*_+v],2);P[x]/=Math.sqrt(B),z[_]/=Math.sqrt(j),l.axes[0]=P,l.axes[1]=z,l.fragClipBounds[0]=L(S,d[0],m,-1e8),l.fragClipBounds[1]=L(S,d[1],m,1e8),t.vao.bind(),t.vao.draw(o.TRIANGLES,t.vertexCount),t.lineWidth>0&&(o.lineWidth(t.lineWidth*n),t.vao.draw(o.LINES,t.lineVertexCount,t.vertexCount)),t.vao.unbind()}}(t,r,n,i),a===r.hasAlpha||o){e.bind();var c=e.uniforms;c.model=n.model||h,c.view=n.view||h,c.projection=n.projection||h,b[0]=2/l.drawingBufferWidth,b[1]=2/l.drawingBufferHeight,c.screenSize=b,c.highlightId=r.highlightId,c.highlightScale=r.highlightScale,c.fragClipBounds=P,c.clipBounds=r.axes.bounds,c.opacity=r.opacity,c.pickGroup=r.pickId/255,c.pixelRatio=i,r.vao.bind(),r.vao.draw(l.TRIANGLES,r.vertexCount),r.lineWidth>0&&(l.lineWidth(r.lineWidth*i),r.vao.draw(l.LINES,r.lineVertexCount,r.vertexCount)),r.vao.unbind()}}function D(e,t,r,i){var a;a=d(e)?t=this.pointCount||t<0)return null;var r=this.points[t],n=this._selectResult;n.index=t;for(var i=0;i<3;++i)n.position[i]=n.dataCoordinate[i]=r[i];return n},_.highlight=function(e){if(e){var t=e.index,r=255&t,n=t>>8&255,i=t>>16&255;this.highlightId=[r/255,n/255,i/255,0]}else this.highlightId=[1,1,1,1]},_.update=function(e){if("perspective"in(e=e||{})&&(this.useOrtho=!e.perspective),"orthographic"in e&&(this.useOrtho=!!e.orthographic),"lineWidth"in e&&(this.lineWidth=e.lineWidth),"project"in e)if(d(e.project))this.axesProject=e.project;else{var t=!!e.project;this.axesProject=[t,t,t]}if("projectScale"in e)if(d(e.projectScale))this.projectScale=e.projectScale.slice();else{var r=+e.projectScale;this.projectScale=[r,r,r]}if(this.projectHasAlpha=!1,"projectOpacity"in e){d(e.projectOpacity)?this.projectOpacity=e.projectOpacity.slice():(r=+e.projectOpacity,this.projectOpacity=[r,r,r]);for(var n=0;n<3;++n)this.projectOpacity[n]=v(this.projectOpacity[n]),this.projectOpacity[n]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in e&&(this.opacity=v(e.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var i,a,s=e.position,l={family:e.font||"normal",style:e.fontStyle||"normal",weight:e.fontWeight||"normal",variant:e.fontVariant||"normal"},c=e.alignment||[0,0];if(2===c.length)i=c[0],a=c[1];else for(i=[],a=[],n=0;n0){var z=0,O=_,R=[0,0,0,1],F=[0,0,0,1],B=d(p)&&d(p[0]),j=d(y)&&d(y[0]);e:for(n=0;n0?1-S[0][0]:Z<0?1+S[1][0]:1,Y*=Y>0?1-S[0][1]:Y<0?1+S[1][1]:1],$=A.cells||[],K=A.positions||[];for(k=0;k<$.length;++k)for(var J=$[k],Q=0;Q<3;++Q){for(var ee=0;ee<3;++ee)C[3*z+ee]=T[ee];for(ee=0;ee<4;++ee)I[4*z+ee]=R[ee];P[z]=x;var te=K[J[Q]];L[2*z]=q*(G*te[0]-W*te[1]+X[0]),L[2*z+1]=q*(W*te[0]+G*te[1]+X[1]),z+=1}for($=M.edges,K=M.positions,k=0;k<$.length;++k)for(J=$[k],Q=0;Q<2;++Q){for(ee=0;ee<3;++ee)C[3*O+ee]=T[ee];for(ee=0;ee<4;++ee)I[4*O+ee]=F[ee];P[O]=x,te=K[J[Q]],L[2*O]=q*(G*te[0]-W*te[1]+X[0]),L[2*O+1]=q*(W*te[0]+G*te[1]+X[1]),O+=1}}}this.bounds=[u,h],this.points=s,this.pointCount=s.length,this.vertexCount=_,this.lineVertexCount=b,this.pointBuffer.update(C),this.colorBuffer.update(I),this.glyphBuffer.update(L),this.idBuffer.update(P),o.free(C),o.free(I),o.free(L),o.free(P)},_.dispose=function(){this.shader.dispose(),this.orthoShader.dispose(),this.pickPerspectiveShader.dispose(),this.pickOrthoShader.dispose(),this.vao.dispose(),this.pointBuffer.dispose(),this.colorBuffer.dispose(),this.glyphBuffer.dispose(),this.idBuffer.dispose()}},8489:function(e){e.exports=function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e}},8507:function(e){e.exports=function(e,n){var i=e.length,a=e.length-n.length;if(a)return a;switch(i){case 0:return 0;case 1:return e[0]-n[0];case 2:return e[0]+e[1]-n[0]-n[1]||t(e[0],e[1])-t(n[0],n[1]);case 3:var o=e[0]+e[1],s=n[0]+n[1];if(a=o+e[2]-(s+n[2]))return a;var l=t(e[0],e[1]),c=t(n[0],n[1]);return t(l,e[2])-t(c,n[2])||t(l+e[2],o)-t(c+n[2],s);case 4:var u=e[0],h=e[1],f=e[2],p=e[3],d=n[0],m=n[1],g=n[2],y=n[3];return u+h+f+p-(d+m+g+y)||t(u,h,f,p)-t(d,m,g,y,d)||t(u+h,u+f,u+p,h+f,h+p,f+p)-t(d+m,d+g,d+y,m+g,m+y,g+y)||t(u+h+f,u+h+p,u+f+p,h+f+p)-t(d+m+g,d+m+y,d+g+y,m+g+y);default:for(var v=e.slice().sort(r),x=n.slice().sort(r),_=0;_=n?(i=h,(l+=1)0?1:0}},8648:function(e,t,r){e.exports=r(783)},8692:function(e){e.exports=function(e,t,r,n){var i=r[0],a=r[1],o=t[0]-i,s=t[1]-a,l=Math.sin(n),c=Math.cos(n);return e[0]=i+o*c-s*l,e[1]=a+o*l+s*c,e[2]=t[2],e}},8697:function(e,t,r){var n=r(869);e.exports=function(e,t){return n(e[0].mul(t[1]),e[1].mul(t[0]))}},8731:function(e,t,r){e.exports=function(e,t,r,i){for(var a={},o=0,c=r.length;o=0){if((d=f.charCodeAt(f.length-1)-48)<2||d>4)throw new n("","Invalid data type for attribute "+h+": "+f);s(e,t,p[0],i,d,a,h)}else{if(!(f.indexOf("mat")>=0))throw new n("","Unknown data type for attribute "+h+": "+f);var d;if((d=f.charCodeAt(f.length-1)-48)<2||d>4)throw new n("","Invalid data type for attribute "+h+": "+f);l(e,t,p,i,d,a,h)}}}return a};var n=r(8866);function i(e,t,r,n,i,a){this._gl=e,this._wrapper=t,this._index=r,this._locations=n,this._dimension=i,this._constFunc=a}var a=i.prototype;a.pointer=function(e,t,r,n){var i=this,a=i._gl,o=i._locations[i._index];a.vertexAttribPointer(o,i._dimension,e||a.FLOAT,!!t,r||0,n||0),a.enableVertexAttribArray(o)},a.set=function(e,t,r,n){return this._constFunc(this._locations[this._index],e,t,r,n)},Object.defineProperty(a,"location",{get:function(){return this._locations[this._index]},set:function(e){return e!==this._locations[this._index]&&(this._locations[this._index]=0|e,this._wrapper.program=null),0|e}});var o=[function(e,t,r){return void 0===r.length?e.vertexAttrib1f(t,r):e.vertexAttrib1fv(t,r)},function(e,t,r,n){return void 0===r.length?e.vertexAttrib2f(t,r,n):e.vertexAttrib2fv(t,r)},function(e,t,r,n,i){return void 0===r.length?e.vertexAttrib3f(t,r,n,i):e.vertexAttrib3fv(t,r)},function(e,t,r,n,i,a){return void 0===r.length?e.vertexAttrib4f(t,r,n,i,a):e.vertexAttrib4fv(t,r)}];function s(e,t,r,n,a,s,l){var c=o[a],u=new i(e,t,r,n,a,c);Object.defineProperty(s,l,{set:function(t){return e.disableVertexAttribArray(n[r]),c(e,n[r],t),t},get:function(){return u},enumerable:!0})}function l(e,t,r,n,i,a,o){for(var l=new Array(i),c=new Array(i),u=0;u0)-(e<0)},t.abs=function(e){var t=e>>31;return(e^t)-t},t.min=function(e,t){return t^(e^t)&-(e65535)<<4,t|=r=((e>>>=t)>255)<<3,t|=r=((e>>>=r)>15)<<2,(t|=r=((e>>>=r)>3)<<1)|(e>>>=r)>>1},t.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0},t.popCount=function(e){return 16843009*((e=(858993459&(e-=e>>>1&1431655765))+(e>>>2&858993459))+(e>>>4)&252645135)>>>24},t.countTrailingZeros=r,t.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,1+((e|=e>>>8)|e>>>16)},t.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},t.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var n=new Array(256);(function(e){for(var t=0;t<256;++t){var r=t,n=t,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;e[t]=n<>>8&255]<<16|n[e>>>16&255]<<8|n[e>>>24&255]},t.interleave2=function(e,t){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))<<1},t.deinterleave2=function(e,t){return(e=65535&((e=16711935&((e=252645135&((e=858993459&((e=e>>>t&1431655765)|e>>>1))|e>>>2))|e>>>4))|e>>>16))<<16>>16},t.interleave3=function(e,t,r){return e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2),(e|=(t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},t.deinterleave3=function(e,t){return(e=1023&((e=4278190335&((e=251719695&((e=3272356035&((e=e>>>t&1227133513)|e>>>2))|e>>>4))|e>>>8))|e>>>16))<<22>>22},t.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>r(e)+1}},8866:function(e){function t(e,t,r){this.shortMessage=t||"",this.longMessage=r||"",this.rawError=e||"",this.message="gl-shader: "+(t||e||"")+(r?"\n"+r:""),this.stack=(new Error).stack}t.prototype=new Error,t.prototype.name="GLError",t.prototype.constructor=t,e.exports=t},8902:function(e,t,r){var n=r(2478),i=r(3250)[3];function a(e,t,r,n,i){this.a=e,this.b=t,this.idx=r,this.lowerIds=n,this.upperIds=i}function o(e,t,r,n){this.a=e,this.b=t,this.type=r,this.idx=n}function s(e,t){var r=e.a[0]-t.a[0]||e.a[1]-t.a[1]||e.type-t.type;return r||0!==e.type&&(r=i(e.a,e.b,t.b))?r:e.idx-t.idx}function l(e,t){return i(e.a,e.b,t)}function c(e,t,r,a,o){for(var s=n.lt(t,a,l),c=n.gt(t,a,l),u=s;u1&&i(r[f[p-2]],r[f[p-1]],a)>0;)e.push([f[p-1],f[p-2],o]),p-=1;f.length=p,f.push(o);var d=h.upperIds;for(p=d.length;p>1&&i(r[d[p-2]],r[d[p-1]],a)<0;)e.push([d[p-2],d[p-1],o]),p-=1;d.length=p,d.push(o)}}function u(e,t){return(e.a[0]d[0]&&i.push(new o(d,p,2,l),new o(p,d,1,l))}i.sort(s);for(var m=i[0].a[0]-(1+Math.abs(i[0].a[0]))*Math.pow(2,-52),g=[new a([m,1],[m,0],-1,[],[],[],[])],y=[],v=(l=0,i.length);l0;)for(var s=(e=o.pop()).adjacent,l=0;l<=r;++l){var c=s[l];if(c.boundary&&!(c.lastVisited<=-n)){for(var u=c.vertices,h=0;h<=r;++h){var f=u[h];i[h]=f<0?t:a[f]}var p=this.orient();if(p>0)return c;c.lastVisited=-n,0===p&&o.push(c)}}return null},u.walk=function(e,t){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,a=this.tuple,o=t?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[o];e:for(;!s.boundary;){for(var l=s.vertices,c=s.adjacent,u=0;u<=n;++u)a[u]=i[l[u]];for(s.lastVisited=r,u=0;u<=n;++u){var h=c[u];if(!(h.lastVisited>=r)){var f=a[u];a[u]=e;var p=this.orient();if(a[u]=f,p<0){s=h;continue e}h.boundary?h.lastVisited=-r:h.lastVisited=r}}return}return s},u.addPeaks=function(e,t){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,l=this.tuple,c=this.interior,u=this.simplices,h=[t];t.lastVisited=r,t.vertices[t.vertices.indexOf(-1)]=r,t.boundary=!1,c.push(t);for(var f=[];h.length>0;){var p=(t=h.pop()).vertices,d=t.adjacent,m=p.indexOf(r);if(!(m<0))for(var g=0;g<=n;++g)if(g!==m){var y=d[g];if(y.boundary&&!(y.lastVisited>=r)){var v=y.vertices;if(y.lastVisited!==-r){for(var x=0,_=0;_<=n;++_)v[_]<0?(x=_,l[_]=e):l[_]=i[v[_]];if(this.orient()>0){v[x]=r,y.boundary=!1,c.push(y),h.push(y),y.lastVisited=r;continue}y.lastVisited=-r}var b=y.adjacent,w=p.slice(),T=d.slice(),k=new a(w,T,!0);u.push(k);var A=b.indexOf(t);if(!(A<0))for(b[A]=k,T[m]=y,w[g]=-1,T[g]=t,d[g]=k,k.flip(),_=0;_<=n;++_){var M=w[_];if(!(M<0||M===r)){for(var S=new Array(n-1),E=0,C=0;C<=n;++C){var I=w[C];I<0||C===_||(S[E++]=I)}f.push(new o(S,k,_))}}}}}for(f.sort(s),g=0;g+1=0?o[l++]=s[u]:c=1&u;if(c===(1&e)){var h=o[0];o[0]=o[1],o[1]=h}t.push(o)}}return t}},8987:function(e,t,r){var n=r(7842),i=r(6504);e.exports=function(e,t){for(var r=n(t),a=e.length,o=new Array(a),s=0;s=1},p.isTransparent=function(){return this.opacity<1},p.pickSlots=1,p.setPickBase=function(e){this.pickId=e},p.update=function(e){e=e||{};var t=this.gl;this.dirty=!0,"lightPosition"in e&&(this.lightPosition=e.lightPosition),"opacity"in e&&(this.opacity=e.opacity),"ambient"in e&&(this.ambientLight=e.ambient),"diffuse"in e&&(this.diffuseLight=e.diffuse),"specular"in e&&(this.specularLight=e.specular),"roughness"in e&&(this.roughness=e.roughness),"fresnel"in e&&(this.fresnel=e.fresnel),void 0!==e.tubeScale&&(this.tubeScale=e.tubeScale),void 0!==e.vectorScale&&(this.vectorScale=e.vectorScale),void 0!==e.coneScale&&(this.coneScale=e.coneScale),void 0!==e.coneOffset&&(this.coneOffset=e.coneOffset),e.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=t.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=t.LINEAR,this.texture.setPixels(function(e){for(var t=u({colormap:e,nshades:256,format:"rgba"}),r=new Uint8Array(1024),n=0;n<256;++n){for(var i=t[n],a=0;a<3;++a)r[4*n+a]=i[a];r[4*n+3]=255*i[3]}return c(r,[256,256,4],[4,0,1])}(e.colormap)),this.texture.generateMipmap());var r=e.cells,n=e.positions,i=e.vectors;if(n&&r&&i){var a=[],o=[],s=[],l=[],h=[];this.cells=r,this.positions=n,this.vectors=i;var f=e.meshColor||[1,1,1,1],p=e.vertexIntensity,d=1/0,m=-1/0;if(p)if(e.vertexIntensityBounds)d=+e.vertexIntensityBounds[0],m=+e.vertexIntensityBounds[1];else for(var g=0;g0){var m=this.triShader;m.bind(),m.uniforms=c,this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},p.drawPick=function(e){e=e||{};for(var t=this.gl,r=e.model||h,n=e.view||h,i=e.projection||h,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[t.drawingBufferWidth,t.drawingBufferHeight];var s={model:r,view:n,projection:i,clipBounds:a,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},l=this.pickShader;l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind())},p.pick=function(e){if(!e||e.id!==this.pickId)return null;var t=e.value[0]+256*e.value[1]+65536*e.value[2],r=this.cells[t],n=this.positions[r[1]].slice(0,3),i={position:n,dataCoordinate:n,index:Math.floor(r[1]/48)};return"cone"===this.traceType?i.index=Math.floor(r[1]/48):"streamtube"===this.traceType&&(i.intensity=this.intensity[r[1]],i.velocity=this.vectors[r[1]].slice(0,3),i.divergence=this.vectors[r[1]][3],i.index=t),i},p.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()},e.exports=function(e,t,r){var s=r.shaders;1===arguments.length&&(e=(t=e).gl);var l=function(e,t){var r=n(e,t.meshShader.vertex,t.meshShader.fragment,null,t.meshShader.attributes);return r.attributes.position.location=0,r.attributes.color.location=2,r.attributes.uv.location=3,r.attributes.vector.location=4,r}(e,s),u=function(e,t){var r=n(e,t.pickShader.vertex,t.pickShader.fragment,null,t.pickShader.attributes);return r.attributes.position.location=0,r.attributes.id.location=1,r.attributes.vector.location=4,r}(e,s),h=o(e,c(new Uint8Array([255,255,255,255]),[1,1,4]));h.generateMipmap(),h.minFilter=e.LINEAR_MIPMAP_LINEAR,h.magFilter=e.LINEAR;var p=i(e),d=i(e),m=i(e),g=i(e),y=i(e),v=new f(e,h,l,u,p,d,y,m,g,a(e,[{buffer:p,type:e.FLOAT,size:4},{buffer:y,type:e.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:m,type:e.FLOAT,size:4},{buffer:g,type:e.FLOAT,size:2},{buffer:d,type:e.FLOAT,size:4}]),r.traceType||"cone");return v.update(t),v}},9127:function(e,t,r){e.exports=function(e){return i(n(e))};var n=r(6204),i=r(5771)},9131:function(e,t,r){var n=r(5177),i=r(9288);e.exports=function(e,t){return t=t||1,e[0]=Math.random(),e[1]=Math.random(),e[2]=Math.random(),e[3]=Math.random(),n(e,e),i(e,e,t),e}},9165:function(e,t,r){e.exports=function(e){var t=e.gl,r=n(t),o=i(t,[{buffer:r,type:t.FLOAT,size:3,offset:0,stride:40},{buffer:r,type:t.FLOAT,size:4,offset:12,stride:40},{buffer:r,type:t.FLOAT,size:3,offset:28,stride:40}]),l=a(t);l.attributes.position.location=0,l.attributes.color.location=1,l.attributes.offset.location=2;var c=new s(t,r,o,l);return c.update(e),c};var n=r(2762),i=r(8116),a=r(3436),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(e,t,r,n){this.gl=e,this.shader=n,this.buffer=t,this.vao=r,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var l=s.prototype;function c(e,t){for(var r=0;r<3;++r)e[0][r]=Math.min(e[0][r],t[r]),e[1][r]=Math.max(e[1][r],t[r])}l.isOpaque=function(){return!this.hasAlpha},l.isTransparent=function(){return this.hasAlpha},l.drawTransparent=l.draw=function(e){var t=this.gl,r=this.shader.uniforms;this.shader.bind();var n=r.view=e.view||o,i=r.projection=e.projection||o;r.model=e.model||o,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var a=n[12],s=n[13],l=n[14],c=n[15],u=(e._ortho?2:1)*this.pixelRatio*(i[3]*a+i[7]*s+i[11]*l+i[15]*c)/t.drawingBufferHeight;this.vao.bind();for(var h=0;h<3;++h)t.lineWidth(this.lineWidth[h]*this.pixelRatio),r.capSize=this.capSize[h]*u,this.lineCount[h]&&t.drawArrays(t.LINES,this.lineOffset[h],this.lineCount[h]);this.vao.unbind()};var u=function(){for(var e=new Array(3),t=0;t<3;++t){for(var r=[],n=1;n<=2;++n)for(var i=-1;i<=1;i+=2){var a=[0,0,0];a[(n+t)%3]=i,r.push(a)}e[t]=r}return e}();function h(e,t,r,n){for(var i=u[n],a=0;a0&&((p=u.slice())[s]+=d[1][s],i.push(u[0],u[1],u[2],m[0],m[1],m[2],m[3],0,0,0,p[0],p[1],p[2],m[0],m[1],m[2],m[3],0,0,0),c(this.bounds,p),o+=2+h(i,p,m,s)))}this.lineCount[s]=o-this.lineOffset[s]}this.buffer.update(i)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},9215:function(e,t,r){e.exports=function(e,t,r){switch(arguments.length){case 0:return new o([0],[0],0);case 1:return"number"==typeof e?new o(n=l(e),n,0):new o(e,l(e.length),0);case 2:var n;if("number"==typeof t)return new o(e,n=l(e.length),+t);r=0;case 3:if(e.length!==t.length)throw new Error("state and velocity lengths must match");return new o(e,t,r)}};var n=r(4769),i=r(2478);function a(e,t,r){return Math.min(t,Math.max(e,r))}function o(e,t,r){this.dimension=e.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var n=0;n=r-1){f=l.length-1;var d=e-t[r-1];for(p=0;p=r-1)for(var u=s.length-1,h=(t[r-1],0);h=0;--r)if(e[--t])return!1;return!0},s.jump=function(e){var t=this.lastT(),r=this.dimension;if(!(e0;--h)n.push(a(l[h-1],c[h-1],arguments[h])),i.push(0)}},s.push=function(e){var t=this.lastT(),r=this.dimension;if(!(e1e-6?1/s:0;this._time.push(e);for(var f=r;f>0;--f){var p=a(c[f-1],u[f-1],arguments[f]);n.push(p),i.push((p-n[o++])*h)}}},s.set=function(e){var t=this.dimension;if(!(e0;--l)r.push(a(o[l-1],s[l-1],arguments[l])),n.push(0)}},s.move=function(e){var t=this.lastT(),r=this.dimension;if(!(e<=t||arguments.length!==r+1)){var n=this._state,i=this._velocity,o=n.length-this.dimension,s=this.bounds,l=s[0],c=s[1],u=e-t,h=u>1e-6?1/u:0;this._time.push(e);for(var f=r;f>0;--f){var p=arguments[f];n.push(a(l[f-1],c[f-1],n[o++]+p)),i.push(p*h)}}},s.idle=function(e){var t=this.lastT();if(!(e=0;--h)n.push(a(l[h],c[h],n[o]+u*i[o])),i.push(0),o+=1}}},9216:function(e){e.exports=i,e.exports.isMobile=i,e.exports.default=i;var t=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,n=/android|ipad|playbook|silk/i;function i(e){e||(e={});var i=e.ua;if(!i&&typeof navigator<"u"&&(i=navigator.userAgent),i&&i.headers&&"string"==typeof i.headers["user-agent"]&&(i=i.headers["user-agent"]),"string"!=typeof i)return!1;var a=t.test(i)&&!r.test(i)||!!e.tablet&&n.test(i);return!a&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==i.indexOf("Macintosh")&&-1!==i.indexOf("Safari")&&(a=!0),a}},9226:function(e){e.exports=function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e}},9265:function(e){e.exports=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}},9288:function(e){e.exports=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}},9346:function(e){var t=new Float64Array(4),r=new Float64Array(4),n=new Float64Array(4);e.exports=function(e,i,a,o,s){t.length=c?(k=1,v=c+2*f+d):v=f*(k=-f/c)+d):(k=0,p>=0?(A=0,v=d):-p>=h?(A=1,v=h+2*p+d):v=p*(A=-p/h)+d);else if(A<0)A=0,f>=0?(k=0,v=d):-f>=c?(k=1,v=c+2*f+d):v=f*(k=-f/c)+d;else{var M=1/T;v=(k*=M)*(c*k+u*(A*=M)+2*f)+A*(u*k+h*A+2*p)+d}else k<0?(_=h+p)>(x=u+f)?(b=_-x)>=(w=c-2*u+h)?(k=1,A=0,v=c+2*f+d):v=(k=b/w)*(c*k+u*(A=1-k)+2*f)+A*(u*k+h*A+2*p)+d:(k=0,_<=0?(A=1,v=h+2*p+d):p>=0?(A=0,v=d):v=p*(A=-p/h)+d):A<0?(_=c+f)>(x=u+p)?(b=_-x)>=(w=c-2*u+h)?(A=1,k=0,v=h+2*p+d):v=(k=1-(A=b/w))*(c*k+u*A+2*f)+A*(u*k+h*A+2*p)+d:(A=0,_<=0?(k=1,v=c+2*f+d):f>=0?(k=0,v=d):v=f*(k=-f/c)+d):(b=h+p-u-f)<=0?(k=0,A=1,v=h+2*p+d):b>=(w=c-2*u+h)?(k=1,A=0,v=c+2*f+d):v=(k=b/w)*(c*k+u*(A=1-k)+2*f)+A*(u*k+h*A+2*p)+d;var S=1-k-A;for(l=0;lr)for(e=r;et)for(e=t;e=0){for(var T=0|w.type.charAt(w.type.length-1),k=new Array(T),A=0;A=0;)M+=1;b[v]=M}var S=new Array(r.length);function E(){f.program=o.program(p,f._vref,f._fref,_,b);for(var e=0;ee&&r>0){var n=(t[r][0]-e)/(t[r][0]-t[r-1][0]);return t[r][1]*(1-n)+n*t[r-1][1]}}return 1}(n/255,t):e[3];return i<1&&(r=!0),[e[0],e[1],e[2],255*i]}))]);return c.divseq(n,255),this.hasAlphaScale=r,n},C.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},C.isOpaque=function(){return!this.isTransparent()},C.pickSlots=1,C.setPickBase=function(e){this.pickId=e};var I=[0,0,0],L={showSurface:!1,showContour:!1,projections:[T.slice(),T.slice(),T.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function P(e,t){var r,n,i,a=t.axes&&t.axes.lastCubeProps.axis||I,o=t.showSurface,s=t.showContour;for(r=0;r<3;++r)for(o=o||t.surfaceProject[r],n=0;n<3;++n)s=s||t.contourProject[r][n];for(r=0;r<3;++r){var l=L.projections[r];for(n=0;n<16;++n)l[n]=0;for(n=0;n<4;++n)l[5*n]=1;l[5*r]=0,l[12+r]=t.axesBounds[+(a[r]>0)][r],p(l,e.model,l);var c=L.clipBounds[r];for(i=0;i<2;++i)for(n=0;n<3;++n)c[i][n]=e.clipBounds[i][n];c[0][r]=-1e8,c[1][r]=1e8}return L.showSurface=o,L.showContour=s,L}var z={model:T,view:T,projection:T,inverseModel:T.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},D=T.slice(),O=[1,0,0,0,1,0,0,0,1];function R(e,t){e=e||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0);var n=z;n.model=e.model||T,n.view=e.view||T,n.projection=e.projection||T,n.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],n.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],n.objectOffset=this.objectOffset,n.contourColor=this.contourColor[0],n.inverseModel=d(n.inverseModel,n.model);for(var i=0;i<2;++i)for(var a=n.clipBounds[i],o=0;o<3;++o)a[o]=Math.min(Math.max(this.clipBounds[i][o],-1e8),1e8);n.kambient=this.ambientLight,n.kdiffuse=this.diffuseLight,n.kspecular=this.specularLight,n.roughness=this.roughness,n.fresnel=this.fresnel,n.opacity=this.opacity,n.height=0,n.permutation=O,n.vertexColor=this.vertexColor;var s=D;for(p(s,n.view,n.model),p(s,n.projection,s),d(s,s),i=0;i<3;++i)n.eyePosition[i]=s[12+i]/s[15];var l=s[15];for(i=0;i<3;++i)l+=this.lightPosition[i]*s[4*i+3];for(i=0;i<3;++i){var c=s[12+i];for(o=0;o<3;++o)c+=s[4*o+i]*this.lightPosition[o];n.lightPosition[i]=c/l}var u=P(n,this);if(u.showSurface){for(this._shader.bind(),this._shader.uniforms=n,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(r.TRIANGLES,this._vertexCount),i=0;i<3;++i)!this.surfaceProject[i]||!this.vertexCount||(this._shader.uniforms.model=u.projections[i],this._shader.uniforms.clipBounds=u.clipBounds[i],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(u.showContour){var h=this._contourShader;n.kambient=1,n.kdiffuse=0,n.kspecular=0,n.opacity=1,h.bind(),h.uniforms=n;var f=this._contourVAO;for(f.bind(),i=0;i<3;++i)for(h.uniforms.permutation=A[i],r.lineWidth(this.contourWidth[i]*this.pixelRatio),o=0;o>4)/16)/255,i=Math.floor(n),a=n-i,o=t[1]*(e.value[1]+(15&e.value[2])/16)/255,s=Math.floor(o),l=o-s;i+=1,s+=1;var c=r.position;c[0]=c[1]=c[2]=0;for(var u=0;u<2;++u)for(var h=u?a:1-a,f=0;f<2;++f)for(var p=i+u,d=s+f,g=h*(f?l:1-l),y=0;y<3;++y)c[y]+=this._field[y].get(p,d)*g;for(var v=this._pickResult.level,x=0;x<3;++x)if(v[x]=m.le(this.contourLevels[x],c[x]),v[x]<0)this.contourLevels[x].length>0&&(v[x]=0);else if(v[x]Math.abs(b-c[x])&&(v[x]+=1)}for(r.index[0]=a<.5?i:i+1,r.index[1]=l<.5?s:s+1,r.uv[0]=n/t[0],r.uv[1]=o/t[1],y=0;y<3;++y)r.dataCoordinate[y]=this._field[y].get(r.index[0],r.index[1]);return r},C.padField=function(e,t){var r=t.shape.slice(),n=e.shape.slice();c.assign(e.lo(1,1).hi(r[0],r[1]),t),c.assign(e.lo(1).hi(r[0],1),t.hi(r[0],1)),c.assign(e.lo(1,n[1]-1).hi(r[0],1),t.lo(0,r[1]-1).hi(r[0],1)),c.assign(e.lo(0,1).hi(1,r[1]),t.hi(1)),c.assign(e.lo(n[0]-1,1).hi(1,r[1]),t.lo(r[0]-1)),e.set(0,0,t.get(0,0)),e.set(0,n[1]-1,t.get(0,r[1]-1)),e.set(n[0]-1,0,t.get(r[0]-1,0)),e.set(n[0]-1,n[1]-1,t.get(r[0]-1,r[1]-1))},C.update=function(e){e=e||{},this.objectOffset=e.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in e&&(this.contourWidth=B(e.contourWidth,Number)),"showContour"in e&&(this.showContour=B(e.showContour,Boolean)),"showSurface"in e&&(this.showSurface=!!e.showSurface),"contourTint"in e&&(this.contourTint=B(e.contourTint,Boolean)),"contourColor"in e&&(this.contourColor=N(e.contourColor)),"contourProject"in e&&(this.contourProject=B(e.contourProject,(function(e){return B(e,Boolean)}))),"surfaceProject"in e&&(this.surfaceProject=e.surfaceProject),"dynamicColor"in e&&(this.dynamicColor=N(e.dynamicColor)),"dynamicTint"in e&&(this.dynamicTint=B(e.dynamicTint,Number)),"dynamicWidth"in e&&(this.dynamicWidth=B(e.dynamicWidth,Number)),"opacity"in e&&(this.opacity=e.opacity),"opacityscale"in e&&(this.opacityscale=e.opacityscale),"colorBounds"in e&&(this.colorBounds=e.colorBounds),"vertexColor"in e&&(this.vertexColor=e.vertexColor?1:0),"colormap"in e&&this._colorMap.setPixels(this.genColormap(e.colormap,this.opacityscale));var t=e.field||e.coords&&e.coords[2]||null,r=!1;if(t||(t=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),"field"in e||"coords"in e){var i=(t.shape[0]+2)*(t.shape[1]+2);i>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(n.nextPow2(i))),this._field[2]=h(this._field[2].data,[t.shape[0]+2,t.shape[1]+2]),this.padField(this._field[2],t),this.shape=t.shape.slice();for(var a=this.shape,o=0;o<2;++o)this._field[2].size>this._field[o].data.length&&(s.freeFloat(this._field[o].data),this._field[o].data=s.mallocFloat(this._field[2].size)),this._field[o]=h(this._field[o].data,[a[0]+2,a[1]+2]);if(e.coords){var l=e.coords;if(!Array.isArray(l)||3!==l.length)throw new Error("gl-surface: invalid coordinates for x/y");for(o=0;o<2;++o){var c=l[o];for(y=0;y<2;++y)if(c.shape[y]!==a[y])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[o],c)}}else if(e.ticks){var u=e.ticks;if(!Array.isArray(u)||2!==u.length)throw new Error("gl-surface: invalid ticks");for(o=0;o<2;++o){var p=u[o];if((Array.isArray(p)||p.length)&&(p=h(p)),p.shape[0]!==a[o])throw new Error("gl-surface: invalid tick length");var d=h(p.data,a);d.stride[o]=p.stride[0],d.stride[1^o]=0,this.padField(this._field[o],d)}}else{for(o=0;o<2;++o){var m=[0,0];m[o]=1,this._field[o]=h(this._field[o].data,[a[0]+2,a[1]+2],m,0)}this._field[0].set(0,0,0);for(var y=0;y0){for(var xe=0;xe<5;++xe)J.pop();U-=1}continue e}J.push(ne[0],ne[1],oe[0],oe[1],ne[2]),U+=1}}re.push(U)}this._contourOffsets[Q]=te,this._contourCounts[Q]=re}var _e=s.mallocFloat(J.length);for(o=0;o=0&&(t+=a*(r=0|e),i-=r),new n(this.data,i,a,t)},i.step=function(e){var t=this.shape[0],r=this.stride[0],i=this.offset,a=0,o=Math.ceil;return"number"==typeof e&&((a=0|e)<0?(i+=r*(t-1),t=o(-t/a)):t=o(t/a),r*=a),new n(this.data,t,r,i)},i.transpose=function(e){e=void 0===e?0:0|e;var t=this.shape,r=this.stride;return new n(this.data,t[e],r[e],this.offset)},i.pick=function(e){var r=[],n=[],i=this.offset;return"number"==typeof e&&e>=0?i=i+this.stride[0]*e|0:(r.push(this.shape[0]),n.push(this.stride[0])),(0,t[r.length+1])(this.data,r,n,i)},function(e,t,r,i){return new n(e,t[0],r[0],i)}},2:function(e,t,r){function n(e,t,r,n,i,a){this.data=e,this.shape=[t,r],this.stride=[n,i],this.offset=0|a}var i=n.prototype;return i.dtype=e,i.dimension=2,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(i,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),i.set=function(t,r,n){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r,n):this.data[this.offset+this.stride[0]*t+this.stride[1]*r]=n},i.get=function(t,r){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r):this.data[this.offset+this.stride[0]*t+this.stride[1]*r]},i.index=function(e,t){return this.offset+this.stride[0]*e+this.stride[1]*t},i.hi=function(e,t){return new n(this.data,"number"!=typeof e||e<0?this.shape[0]:0|e,"number"!=typeof t||t<0?this.shape[1]:0|t,this.stride[0],this.stride[1],this.offset)},i.lo=function(e,t){var r=this.offset,i=0,a=this.shape[0],o=this.shape[1],s=this.stride[0],l=this.stride[1];return"number"==typeof e&&e>=0&&(r+=s*(i=0|e),a-=i),"number"==typeof t&&t>=0&&(r+=l*(i=0|t),o-=i),new n(this.data,a,o,s,l,r)},i.step=function(e,t){var r=this.shape[0],i=this.shape[1],a=this.stride[0],o=this.stride[1],s=this.offset,l=0,c=Math.ceil;return"number"==typeof e&&((l=0|e)<0?(s+=a*(r-1),r=c(-r/l)):r=c(r/l),a*=l),"number"==typeof t&&((l=0|t)<0?(s+=o*(i-1),i=c(-i/l)):i=c(i/l),o*=l),new n(this.data,r,i,a,o,s)},i.transpose=function(e,t){e=void 0===e?0:0|e,t=void 0===t?1:0|t;var r=this.shape,i=this.stride;return new n(this.data,r[e],r[t],i[e],i[t],this.offset)},i.pick=function(e,r){var n=[],i=[],a=this.offset;return"number"==typeof e&&e>=0?a=a+this.stride[0]*e|0:(n.push(this.shape[0]),i.push(this.stride[0])),"number"==typeof r&&r>=0?a=a+this.stride[1]*r|0:(n.push(this.shape[1]),i.push(this.stride[1])),(0,t[n.length+1])(this.data,n,i,a)},function(e,t,r,i){return new n(e,t[0],t[1],r[0],r[1],i)}},3:function(e,t,r){function n(e,t,r,n,i,a,o,s){this.data=e,this.shape=[t,r,n],this.stride=[i,a,o],this.offset=0|s}var i=n.prototype;return i.dtype=e,i.dimension=3,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(i,"order",{get:function(){var e=Math.abs(this.stride[0]),t=Math.abs(this.stride[1]),r=Math.abs(this.stride[2]);return e>t?t>r?[2,1,0]:e>r?[1,2,0]:[1,0,2]:e>r?[2,0,1]:r>t?[0,1,2]:[0,2,1]}}),i.set=function(t,r,n,i){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n,i):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n]=i},i.get=function(t,r,n){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n]},i.index=function(e,t,r){return this.offset+this.stride[0]*e+this.stride[1]*t+this.stride[2]*r},i.hi=function(e,t,r){return new n(this.data,"number"!=typeof e||e<0?this.shape[0]:0|e,"number"!=typeof t||t<0?this.shape[1]:0|t,"number"!=typeof r||r<0?this.shape[2]:0|r,this.stride[0],this.stride[1],this.stride[2],this.offset)},i.lo=function(e,t,r){var i=this.offset,a=0,o=this.shape[0],s=this.shape[1],l=this.shape[2],c=this.stride[0],u=this.stride[1],h=this.stride[2];return"number"==typeof e&&e>=0&&(i+=c*(a=0|e),o-=a),"number"==typeof t&&t>=0&&(i+=u*(a=0|t),s-=a),"number"==typeof r&&r>=0&&(i+=h*(a=0|r),l-=a),new n(this.data,o,s,l,c,u,h,i)},i.step=function(e,t,r){var i=this.shape[0],a=this.shape[1],o=this.shape[2],s=this.stride[0],l=this.stride[1],c=this.stride[2],u=this.offset,h=0,f=Math.ceil;return"number"==typeof e&&((h=0|e)<0?(u+=s*(i-1),i=f(-i/h)):i=f(i/h),s*=h),"number"==typeof t&&((h=0|t)<0?(u+=l*(a-1),a=f(-a/h)):a=f(a/h),l*=h),"number"==typeof r&&((h=0|r)<0?(u+=c*(o-1),o=f(-o/h)):o=f(o/h),c*=h),new n(this.data,i,a,o,s,l,c,u)},i.transpose=function(e,t,r){e=void 0===e?0:0|e,t=void 0===t?1:0|t,r=void 0===r?2:0|r;var i=this.shape,a=this.stride;return new n(this.data,i[e],i[t],i[r],a[e],a[t],a[r],this.offset)},i.pick=function(e,r,n){var i=[],a=[],o=this.offset;return"number"==typeof e&&e>=0?o=o+this.stride[0]*e|0:(i.push(this.shape[0]),a.push(this.stride[0])),"number"==typeof r&&r>=0?o=o+this.stride[1]*r|0:(i.push(this.shape[1]),a.push(this.stride[1])),"number"==typeof n&&n>=0?o=o+this.stride[2]*n|0:(i.push(this.shape[2]),a.push(this.stride[2])),(0,t[i.length+1])(this.data,i,a,o)},function(e,t,r,i){return new n(e,t[0],t[1],t[2],r[0],r[1],r[2],i)}},4:function(e,t,r){function n(e,t,r,n,i,a,o,s,l,c){this.data=e,this.shape=[t,r,n,i],this.stride=[a,o,s,l],this.offset=0|c}var i=n.prototype;return i.dtype=e,i.dimension=4,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(i,"order",{get:r}),i.set=function(t,r,n,i,a){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i,a):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i]=a},i.get=function(t,r,n,i){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i]},i.index=function(e,t,r,n){return this.offset+this.stride[0]*e+this.stride[1]*t+this.stride[2]*r+this.stride[3]*n},i.hi=function(e,t,r,i){return new n(this.data,"number"!=typeof e||e<0?this.shape[0]:0|e,"number"!=typeof t||t<0?this.shape[1]:0|t,"number"!=typeof r||r<0?this.shape[2]:0|r,"number"!=typeof i||i<0?this.shape[3]:0|i,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},i.lo=function(e,t,r,i){var a=this.offset,o=0,s=this.shape[0],l=this.shape[1],c=this.shape[2],u=this.shape[3],h=this.stride[0],f=this.stride[1],p=this.stride[2],d=this.stride[3];return"number"==typeof e&&e>=0&&(a+=h*(o=0|e),s-=o),"number"==typeof t&&t>=0&&(a+=f*(o=0|t),l-=o),"number"==typeof r&&r>=0&&(a+=p*(o=0|r),c-=o),"number"==typeof i&&i>=0&&(a+=d*(o=0|i),u-=o),new n(this.data,s,l,c,u,h,f,p,d,a)},i.step=function(e,t,r,i){var a=this.shape[0],o=this.shape[1],s=this.shape[2],l=this.shape[3],c=this.stride[0],u=this.stride[1],h=this.stride[2],f=this.stride[3],p=this.offset,d=0,m=Math.ceil;return"number"==typeof e&&((d=0|e)<0?(p+=c*(a-1),a=m(-a/d)):a=m(a/d),c*=d),"number"==typeof t&&((d=0|t)<0?(p+=u*(o-1),o=m(-o/d)):o=m(o/d),u*=d),"number"==typeof r&&((d=0|r)<0?(p+=h*(s-1),s=m(-s/d)):s=m(s/d),h*=d),"number"==typeof i&&((d=0|i)<0?(p+=f*(l-1),l=m(-l/d)):l=m(l/d),f*=d),new n(this.data,a,o,s,l,c,u,h,f,p)},i.transpose=function(e,t,r,i){e=void 0===e?0:0|e,t=void 0===t?1:0|t,r=void 0===r?2:0|r,i=void 0===i?3:0|i;var a=this.shape,o=this.stride;return new n(this.data,a[e],a[t],a[r],a[i],o[e],o[t],o[r],o[i],this.offset)},i.pick=function(e,r,n,i){var a=[],o=[],s=this.offset;return"number"==typeof e&&e>=0?s=s+this.stride[0]*e|0:(a.push(this.shape[0]),o.push(this.stride[0])),"number"==typeof r&&r>=0?s=s+this.stride[1]*r|0:(a.push(this.shape[1]),o.push(this.stride[1])),"number"==typeof n&&n>=0?s=s+this.stride[2]*n|0:(a.push(this.shape[2]),o.push(this.stride[2])),"number"==typeof i&&i>=0?s=s+this.stride[3]*i|0:(a.push(this.shape[3]),o.push(this.stride[3])),(0,t[a.length+1])(this.data,a,o,s)},function(e,t,r,i){return new n(e,t[0],t[1],t[2],t[3],r[0],r[1],r[2],r[3],i)}},5:function(e,t,r){function n(e,t,r,n,i,a,o,s,l,c,u,h){this.data=e,this.shape=[t,r,n,i,a],this.stride=[o,s,l,c,u],this.offset=0|h}var i=n.prototype;return i.dtype=e,i.dimension=5,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(i,"order",{get:r}),i.set=function(t,r,n,i,a,o){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a,o):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a]=o},i.get=function(t,r,n,i,a){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a]},i.index=function(e,t,r,n,i){return this.offset+this.stride[0]*e+this.stride[1]*t+this.stride[2]*r+this.stride[3]*n+this.stride[4]*i},i.hi=function(e,t,r,i,a){return new n(this.data,"number"!=typeof e||e<0?this.shape[0]:0|e,"number"!=typeof t||t<0?this.shape[1]:0|t,"number"!=typeof r||r<0?this.shape[2]:0|r,"number"!=typeof i||i<0?this.shape[3]:0|i,"number"!=typeof a||a<0?this.shape[4]:0|a,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},i.lo=function(e,t,r,i,a){var o=this.offset,s=0,l=this.shape[0],c=this.shape[1],u=this.shape[2],h=this.shape[3],f=this.shape[4],p=this.stride[0],d=this.stride[1],m=this.stride[2],g=this.stride[3],y=this.stride[4];return"number"==typeof e&&e>=0&&(o+=p*(s=0|e),l-=s),"number"==typeof t&&t>=0&&(o+=d*(s=0|t),c-=s),"number"==typeof r&&r>=0&&(o+=m*(s=0|r),u-=s),"number"==typeof i&&i>=0&&(o+=g*(s=0|i),h-=s),"number"==typeof a&&a>=0&&(o+=y*(s=0|a),f-=s),new n(this.data,l,c,u,h,f,p,d,m,g,y,o)},i.step=function(e,t,r,i,a){var o=this.shape[0],s=this.shape[1],l=this.shape[2],c=this.shape[3],u=this.shape[4],h=this.stride[0],f=this.stride[1],p=this.stride[2],d=this.stride[3],m=this.stride[4],g=this.offset,y=0,v=Math.ceil;return"number"==typeof e&&((y=0|e)<0?(g+=h*(o-1),o=v(-o/y)):o=v(o/y),h*=y),"number"==typeof t&&((y=0|t)<0?(g+=f*(s-1),s=v(-s/y)):s=v(s/y),f*=y),"number"==typeof r&&((y=0|r)<0?(g+=p*(l-1),l=v(-l/y)):l=v(l/y),p*=y),"number"==typeof i&&((y=0|i)<0?(g+=d*(c-1),c=v(-c/y)):c=v(c/y),d*=y),"number"==typeof a&&((y=0|a)<0?(g+=m*(u-1),u=v(-u/y)):u=v(u/y),m*=y),new n(this.data,o,s,l,c,u,h,f,p,d,m,g)},i.transpose=function(e,t,r,i,a){e=void 0===e?0:0|e,t=void 0===t?1:0|t,r=void 0===r?2:0|r,i=void 0===i?3:0|i,a=void 0===a?4:0|a;var o=this.shape,s=this.stride;return new n(this.data,o[e],o[t],o[r],o[i],o[a],s[e],s[t],s[r],s[i],s[a],this.offset)},i.pick=function(e,r,n,i,a){var o=[],s=[],l=this.offset;return"number"==typeof e&&e>=0?l=l+this.stride[0]*e|0:(o.push(this.shape[0]),s.push(this.stride[0])),"number"==typeof r&&r>=0?l=l+this.stride[1]*r|0:(o.push(this.shape[1]),s.push(this.stride[1])),"number"==typeof n&&n>=0?l=l+this.stride[2]*n|0:(o.push(this.shape[2]),s.push(this.stride[2])),"number"==typeof i&&i>=0?l=l+this.stride[3]*i|0:(o.push(this.shape[3]),s.push(this.stride[3])),"number"==typeof a&&a>=0?l=l+this.stride[4]*a|0:(o.push(this.shape[4]),s.push(this.stride[4])),(0,t[o.length+1])(this.data,o,s,l)},function(e,t,r,i){return new n(e,t[0],t[1],t[2],t[3],t[4],r[0],r[1],r[2],r[3],r[4],i)}}};function l(e,t){var r=-1===t?"T":String(t),n=s[r];return-1===t?n(e):0===t?n(e,c[e][0]):n(e,c[e],o)}var c={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};e.exports=function(e,t,r,a){if(void 0===e)return(0,c.array[0])([]);"number"==typeof e&&(e=[e]),void 0===t&&(t=[e.length]);var o=t.length;if(void 0===r){r=new Array(o);for(var s=o-1,u=1;s>=0;--s)r[s]=u,u*=t[s]}if(void 0===a)for(a=0,s=0;s1e-6?(e[0]=r/o,e[1]=n/o,e[2]=i/o,e[3]=a/o):(e[0]=e[1]=e[2]=0,e[3]=1)}function h(e,t,r){this.radius=n([r]),this.center=n(t),this.rotation=n(e),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var f=h.prototype;f.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},f.recalcMatrix=function(e){this.radius.curve(e),this.center.curve(e),this.rotation.curve(e);var t=this.computedRotation;u(t,t);var r=this.computedMatrix;a(r,t);var n=this.computedCenter,i=this.computedEye,o=this.computedUp,s=Math.exp(this.computedRadius[0]);i[0]=n[0]+s*r[2],i[1]=n[1]+s*r[6],i[2]=n[2]+s*r[10],o[0]=r[1],o[1]=r[5],o[2]=r[9];for(var l=0;l<3;++l){for(var c=0,h=0;h<3;++h)c+=r[l+4*h]*i[h];r[12+l]=-c}},f.getMatrix=function(e,t){this.recalcMatrix(e);var r=this.computedMatrix;if(t){for(var n=0;n<16;++n)t[n]=r[n];return t}return r},f.idle=function(e){this.center.idle(e),this.radius.idle(e),this.rotation.idle(e)},f.flush=function(e){this.center.flush(e),this.radius.flush(e),this.rotation.flush(e)},f.pan=function(e,t,r,n){t=t||0,r=r||0,n=n||0,this.recalcMatrix(e);var i=this.computedMatrix,a=i[1],o=i[5],s=i[9],c=l(a,o,s);a/=c,o/=c,s/=c;var u=i[0],h=i[4],f=i[8],p=u*a+h*o+f*s,d=l(u-=a*p,h-=o*p,f-=s*p);u/=d,h/=d,f/=d;var m=i[2],g=i[6],y=i[10],v=m*a+g*o+y*s,x=m*u+g*h+y*f,_=l(m-=v*a+x*u,g-=v*o+x*h,y-=v*s+x*f);m/=_,g/=_,y/=_;var b=u*t+a*r,w=h*t+o*r,T=f*t+s*r;this.center.move(e,b,w,T);var k=Math.exp(this.computedRadius[0]);k=Math.max(1e-4,k+n),this.radius.set(e,Math.log(k))},f.rotate=function(e,t,r,n){this.recalcMatrix(e),t=t||0,r=r||0;var i=this.computedMatrix,a=i[0],o=i[4],s=i[8],u=i[1],h=i[5],f=i[9],p=i[2],d=i[6],m=i[10],g=t*a+r*u,y=t*o+r*h,v=t*s+r*f,x=-(d*v-m*y),_=-(m*g-p*v),b=-(p*y-d*g),w=Math.sqrt(Math.max(0,1-Math.pow(x,2)-Math.pow(_,2)-Math.pow(b,2))),T=c(x,_,b,w);T>1e-6?(x/=T,_/=T,b/=T,w/=T):(x=_=b=0,w=1);var k=this.computedRotation,A=k[0],M=k[1],S=k[2],E=k[3],C=A*w+E*x+M*b-S*_,I=M*w+E*_+S*x-A*b,L=S*w+E*b+A*_-M*x,P=E*w-A*x-M*_-S*b;if(n){x=p,_=d,b=m;var z=Math.sin(n)/l(x,_,b);x*=z,_*=z,b*=z,P=P*(w=Math.cos(t))-(C=C*w+P*x+I*b-L*_)*x-(I=I*w+P*_+L*x-C*b)*_-(L=L*w+P*b+C*_-I*x)*b}var D=c(C,I,L,P);D>1e-6?(C/=D,I/=D,L/=D,P/=D):(C=I=L=0,P=1),this.rotation.set(e,C,I,L,P)},f.lookAt=function(e,t,r,n){this.recalcMatrix(e),r=r||this.computedCenter,t=t||this.computedEye,n=n||this.computedUp;var a=this.computedMatrix;i(a,t,r,n);var o=this.computedRotation;s(o,a[0],a[1],a[2],a[4],a[5],a[6],a[8],a[9],a[10]),u(o,o),this.rotation.set(e,o[0],o[1],o[2],o[3]);for(var l=0,c=0;c<3;++c)l+=Math.pow(r[c]-t[c],2);this.radius.set(e,.5*Math.log(Math.max(l,1e-6))),this.center.set(e,r[0],r[1],r[2])},f.translate=function(e,t,r,n){this.center.move(e,t||0,r||0,n||0)},f.setMatrix=function(e,t){var r=this.computedRotation;s(r,t[0],t[1],t[2],t[4],t[5],t[6],t[8],t[9],t[10]),u(r,r),this.rotation.set(e,r[0],r[1],r[2],r[3]);var n=this.computedMatrix;o(n,t);var i=n[15];if(Math.abs(i)>1e-6){var a=n[12]/i,l=n[13]/i,c=n[14]/i;this.recalcMatrix(e);var h=Math.exp(this.computedRadius[0]);this.center.set(e,a-n[2]*h,l-n[6]*h,c-n[10]*h),this.radius.idle(e)}else this.center.idle(e),this.radius.idle(e)},f.setDistance=function(e,t){t>0&&this.radius.set(e,Math.log(t))},f.setDistanceLimits=function(e,t){e=e>0?Math.log(e):-1/0,t=t>0?Math.log(t):1/0,t=Math.max(t,e),this.radius.bounds[0][0]=e,this.radius.bounds[1][0]=t},f.getDistanceLimits=function(e){var t=this.radius.bounds;return e?(e[0]=Math.exp(t[0][0]),e[1]=Math.exp(t[1][0]),e):[Math.exp(t[0][0]),Math.exp(t[1][0])]},f.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},f.fromJSON=function(e){var t=this.lastT(),r=e.center;r&&this.center.set(t,r[0],r[1],r[2]);var n=e.rotation;n&&this.rotation.set(t,n[0],n[1],n[2],n[3]);var i=e.distance;i&&i>0&&this.radius.set(t,Math.log(i)),this.setDistanceLimits(e.zoomMin,e.zoomMax)}},9994:function(e,t,r){var n=r(9618),i=r(8277);e.exports=function(e,t){for(var r=[],a=e,o=1;Array.isArray(a);)r.push(a.length),o*=a.length,a=a[0];return 0===r.length?n():(t||(t=n(new Float64Array(o),r)),i(t,e),t)}}},r={};function n(t){var i=r[t];if(void 0!==i)return i.exports;var a=r[t]={id:t,loaded:!1,exports:{}};return e[t].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch{if("object"==typeof window)return window}}(),n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e};var i=n(1964);t.exports=i}()}}),Xd=m({"node_modules/color-name/index.js"(e,t){t.exports={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]}}}),$d=m({"node_modules/color-normalize/node_modules/color-parse/index.js"(e,t){var r=Xd();t.exports=function(e){var t,i,a=[],o=1;if("string"==typeof e)if(e=e.toLowerCase(),r[e])a=r[e].slice(),i="rgb";else if("transparent"===e)o=0,i="rgb",a=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var s=e.slice(1);o=1,(u=s.length)<=4?(a=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],4===u&&(o=parseInt(s[3]+s[3],16)/255)):(a=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],8===u&&(o=parseInt(s[6]+s[7],16)/255)),a[0]||(a[0]=0),a[1]||(a[1]=0),a[2]||(a[2]=0),i="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var l=t[1],c="rgb"===l;i=s=l.replace(/a$/,"");var u="cmyk"===s?4:"gray"===s?1:3;a=t[2].trim().split(/\s*[,\/]\s*|\s+/).map((function(e,t){if(/%$/.test(e))return t===u?parseFloat(e)/100:"rgb"===s?255*parseFloat(e)/100:parseFloat(e);if("h"===s[t]){if(/deg$/.test(e))return parseFloat(e);if(void 0!==n[e])return n[e]}return parseFloat(e)})),l===s&&a.push(1),o=c||void 0===a[u]?1:a[u],a=a.slice(0,u)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(a=e.match(/([0-9]+)/g).map((function(e){return parseFloat(e)})),i=e.match(/([a-z])/gi).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(a=[e[0],e[1],e[2]],i="rgb",o=4===e.length?e[3]:1):e instanceof Object&&(null!=e.r||null!=e.red||null!=e.R?(i="rgb",a=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(i="hsl",a=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),o=e.a||e.alpha||e.opacity||1,null!=e.opacity&&(o/=100)):(i="rgb",a=[e>>>16,(65280&e)>>>8,255&e]);return{space:i,values:a,alpha:o}};var n={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}}),Kd=m({"node_modules/color-normalize/node_modules/color-rgba/index.js"(e,t){var r=$d();t.exports=function(e){Array.isArray(e)&&e.raw&&(e=String.raw.apply(null,arguments));var t,n=r(e);if(!n.space)return[];var i=[0,0,0],a="h"===n.space[0]?[360,100,100]:[255,255,255];return(t=Array(3))[0]=Math.min(Math.max(n.values[0],i[0]),a[0]),t[1]=Math.min(Math.max(n.values[1],i[1]),a[1]),t[2]=Math.min(Math.max(n.values[2],i[2]),a[2]),"h"===n.space[0]&&(t=function(e){var t,r,n,i,a,o=e[0]/360,s=e[1]/100,l=e[2]/100,c=0;if(0===s)return[a=255*l,a,a];for(t=2*l-(r=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];c<3;)(n=o+1/3*-(c-1))<0?n++:n>1&&n--,a=6*n<1?t+6*(r-t)*n:2*n<1?r:3*n<2?t+(r-t)*(2/3-n)*6:t,i[c++]=255*a;return i}(t)),t.push(Math.min(Math.max(n.alpha,0),1)),t}}}),Jd=m({"node_modules/clamp/index.js"(e,t){t.exports=function(e,t,r){return tr?r:e:et?t:e}}}),Qd=m({"node_modules/dtype/index.js"(e,t){t.exports=function(e){switch(e){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}}}),em=m({"node_modules/color-normalize/index.js"(e,t){var r=Kd(),n=Jd(),i=Qd();t.exports=function(e,t){("float"===t||!t)&&(t="array"),"uint"===t&&(t="uint8"),"uint_clamped"===t&&(t="uint8_clamped");var a,o=new(i(t))(4),s="uint8"!==t&&"uint8_clamped"!==t;return(!e.length||"string"==typeof e)&&((e=r(e))[0]/=255,e[1]/=255,e[2]/=255),(a=e)instanceof Uint8Array||a instanceof Uint8ClampedArray||Array.isArray(a)&&(a[0]>1||0===a[0])&&(a[1]>1||0===a[1])&&(a[2]>1||0===a[2])&&(!a[3]||a[3]>1)?(o[0]=e[0],o[1]=e[1],o[2]=e[2],o[3]=null!=e[3]?e[3]:255,s&&(o[0]/=255,o[1]/=255,o[2]/=255,o[3]/=255),o):(s?(o[0]=e[0],o[1]=e[1],o[2]=e[2],o[3]=null!=e[3]?e[3]:1):(o[0]=n(Math.floor(255*e[0]),0,255),o[1]=n(Math.floor(255*e[1]),0,255),o[2]=n(Math.floor(255*e[2]),0,255),o[3]=null==e[3]?255:n(Math.floor(255*e[3]),0,255)),o)}}}),tm=m({"src/lib/str2rgbarray.js"(e,t){var r=em();t.exports=function(e){return e?r(e):[0,0,0,1]}}}),rm=m({"src/lib/gl_format_color.js"(e,t){var r=M(),n=F(),i=em(),a=Yt(),o=G().defaultLine,s=I().isArrayOrTypedArray,l=i(o);function c(e,t){var r=e;return r[3]*=t,r}function u(e){if(r(e))return l;var t=i(e);return t.length?t:l}function h(e){return r(e)?e:1}t.exports={formatColor:function(e,t,r){var n=e.color;n&&n._inputArray&&(n=n._inputArray);var o,f,p,d,m,g=s(n),y=s(t),v=a.extractOpts(e),x=[];if(o=void 0!==v.colorscale?a.makeColorScaleFuncFromTrace(e):u,f=g?function(e,t){return void 0===e[t]?l:i(o(e[t]))}:u,p=y?function(e,t){return void 0===e[t]?1:h(e[t])}:h,g||y)for(var _=0;_0){var f=i.c2l(u);i._lowerLogErrorBound||(i._lowerLogErrorBound=f),i._lowerErrorBound=Math.min(i._lowerLogErrorBound,f)}}else o[s]=[-l[0]*n,l[1]*n]}return o}t.exports=function(e,t,r){var i=[n(e.x,e.error_x,t[0],r.xaxis),n(e.y,e.error_y,t[1],r.yaxis),n(e.z,e.error_z,t[2],r.zaxis)],a=function(e){for(var t=0;t-1?-1:e.indexOf("right")>-1?1:0}function x(e){return null==e?0:e.indexOf("top")>-1?-1:e.indexOf("bottom")>-1?1:0}function _(e,t){return t(4*e)}function b(e){return f[e]}function w(e,t,r,n,i){var a=null;if(s.isArrayOrTypedArray(e)){a=[];for(var o=0;o=0){var E=function(e,t,r){var n,i=(r+1)%3,a=(r+2)%3,s=[],l=[];for(n=0;n=0&&h("surfacecolor",p||d);for(var m=["x","y","z"],g=0;g<3;++g){var y="projection."+m[g];h(y+".show")&&(h(y+".opacity"),h(y+".scale"))}var v=r.getComponentMethod("errorbars","supplyDefaults");v(e,t,p||d||c,{axis:"z"}),v(e,t,p||d||c,{axis:"y",inherit:"z"}),v(e,t,p||d||c,{axis:"x",inherit:"z"})}else t.visible=!1}}}),cm=m({"src/traces/scatter3d/calc.js"(e,t){var r=ai(),n=ii();t.exports=function(e,t){var i=[{x:!1,y:!1,trace:t,t:{}}];return r(i,t),n(e,t),i}}}),um=m({"node_modules/get-canvas-context/index.js"(e,t){t.exports=function(e,t){if("string"!=typeof e)throw new TypeError("must specify type string");if(t=t||{},typeof document>"u"&&!t.canvas)return null;var r=t.canvas||document.createElement("canvas");"number"==typeof t.width&&(r.width=t.width),"number"==typeof t.height&&(r.height=t.height);var n,i=t;try{var a=[e];0===e.indexOf("webgl")&&a.push("experimental-"+e);for(var o=0;o/g," "));l[c]=p,u.tickmode=h}}for(t.ticks=l,c=0;c<3;++c)for(a[c]=.5*(e.glplot.bounds[0][c]+e.glplot.bounds[1][c]),d=0;d<2;++d)t.bounds[d][c]=e.glplot.bounds[d][c];e.contourLevels=function(e){for(var t=new Array(3),r=0;r<3;++r){for(var n=e[r],i=new Array(n.length),a=0;ar.deltaY?1.1:.9090909090909091,a=e.glplot.getAspectratio();e.glplot.setAspectratio({x:n*a.x,y:n*a.y,z:n*a.z})}i(e)}}),!!l&&{passive:!1}),e.glplot.canvas.addEventListener("mousemove",(function(){if(!1!==e.fullSceneLayout.dragmode&&0!==e.camera.mouseListener.buttons){var t=n();e.graphDiv.emit("plotly_relayouting",t)}})),e.staticMode||e.glplot.canvas.addEventListener("webglcontextlost",(function(r){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:r,layer:e.id})}),!1)),e.glplot.oncontextloss=function(){e.recoverContext()},e.glplot.onrender=function(){e.render()},!0},T.render=function(){var e,t=this,r=t.graphDiv,n=t.svgContainer,i=t.container.getBoundingClientRect();r._fullLayout._calcInverseTransform(r);var a=r._fullLayout._invScaleX,o=r._fullLayout._invScaleY,s=i.width*a,l=i.height*o;n.setAttributeNS(null,"viewBox","0 0 "+s+" "+l),n.setAttributeNS(null,"width",s),n.setAttributeNS(null,"height",l),x(t),t.glplot.axes.update(t.axesOptions);for(var c=Object.keys(t.traces),h=null,d=t.glplot.selection,m=0;m")):"isosurface"===e.type||"volume"===e.type?(T.valueLabel=f.hoverLabelText(t._mockAxis,t._mockAxis.d2l(d.traceCoordinate[3]),e.valuehoverformat),E.push("value: "+T.valueLabel),d.textLabel&&E.push(d.textLabel),S=E.join("
")):S=d.textLabel;var C={x:d.traceCoordinate[0],y:d.traceCoordinate[1],z:d.traceCoordinate[2],data:_._input,fullData:_,curveNumber:_.index,pointNumber:w};p.appendArrayPointValue(C,_,w),e._module.eventData&&(C=_._module.eventData(C,d,_,{},w));var I={points:[C]};if(t.fullSceneLayout.hovermode){var L=[];p.loneHover({trace:_,x:(.5+.5*v[0]/v[3])*s,y:(.5-.5*v[1]/v[3])*l,xLabel:T.xLabel,yLabel:T.yLabel,zLabel:T.zLabel,text:S,name:h.name,color:p.castHoverOption(_,w,"bgcolor")||h.color,borderColor:p.castHoverOption(_,w,"bordercolor"),fontFamily:p.castHoverOption(_,w,"font.family"),fontSize:p.castHoverOption(_,w,"font.size"),fontColor:p.castHoverOption(_,w,"font.color"),nameLength:p.castHoverOption(_,w,"namelength"),textAlign:p.castHoverOption(_,w,"align"),hovertemplate:u.castOption(_,w,"hovertemplate"),hovertemplateLabels:u.extendFlat({},C,T),eventData:[C]},{container:n,gd:r,inOut_bbox:L}),C.bbox=L[0]}d.distance<5&&(d.buttons||b)?r.emit("plotly_click",I):r.emit("plotly_hover",I),this.oldEventData=I}else p.loneUnhover(n),this.oldEventData&&r.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;t.drawAnnotations(t)},T.recoverContext=function(){var e=this;e.glplot.dispose();var t=function(){e.glplot.gl.isContextLost()?requestAnimationFrame(t):e.initializeGLPlot()?e.plot.apply(e,e.plotArgs):u.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(t)};var A=["xaxis","yaxis","zaxis"];function M(e,t,r){for(var n=e.fullSceneLayout,i=0;i<3;i++){var a=A[i],o=a.charAt(0),s=n[a],l=t[o],c=t[o+"calendar"],h=t["_"+o+"length"];if(u.isArrayOrTypedArray(l))for(var f,p=0;p<(h||l.length);p++)if(u.isArrayOrTypedArray(l[p]))for(var d=0;dg[1][o])g[0][o]=-1,g[1][o]=1;else{var L=g[1][o]-g[0][o];g[0][o]-=L/32,g[1][o]+=L/32}if(x=[g[0][o],g[1][o]],x=_(x,l),g[0][o]=x[0],g[1][o]=x[1],l.isReversed()){var P=g[0][o];g[0][o]=g[1][o],g[1][o]=P}}else x=l.range,g[0][o]=l.r2l(x[0]),g[1][o]=l.r2l(x[1]);g[0][o]===g[1][o]&&(g[0][o]-=1,g[1][o]+=1),y[o]=g[1][o]-g[0][o],l.range=[g[0][o],g[1][o]],l.limitRange(),n.glplot.setBounds(o,{min:l.range[0]*p[o],max:l.range[1]*p[o]})}var z,D=u.aspectmode;if("cube"===D)z=[1,1,1];else if("manual"===D){var O=u.aspectratio;z=[O.x,O.y,O.z]}else{if("auto"!==D&&"data"!==D)throw new Error("scene.js aspectRatio was not one of the enumerated types");var R=[1,1,1];for(o=0;o<3;++o){var F=v[c=(l=u[A[o]]).type];R[o]=Math.pow(F.acc,1/F.count)/p[o]}z="data"===D||Math.max.apply(null,R)/Math.min.apply(null,R)<=4?R:[1,1,1]}u.aspectratio.x=h.aspectratio.x=z[0],u.aspectratio.y=h.aspectratio.y=z[1],u.aspectratio.z=h.aspectratio.z=z[2],n.glplot.setAspectratio(u.aspectratio),n.viewInitial.aspectratio||(n.viewInitial.aspectratio={x:u.aspectratio.x,y:u.aspectratio.y,z:u.aspectratio.z}),n.viewInitial.aspectmode||(n.viewInitial.aspectmode=u.aspectmode);var B=u.domain||null,j=t._size||null;if(B&&j){var N=n.container.style;N.position="absolute",N.left=j.l+B.x[0]*j.w+"px",N.top=j.t+(1-B.y[1])*j.h+"px",N.width=j.w*(B.x[1]-B.x[0])+"px",N.height=j.h*(B.y[1]-B.y[0])+"px"}n.glplot.redraw()}},T.destroy=function(){var e=this;e.glplot&&(e.camera.mouseListener.enabled=!1,e.container.removeEventListener("wheel",e.camera.wheelListener),e.camera=null,e.glplot.dispose(),e.container.parentNode.removeChild(e.container),e.glplot=null)},T.getCamera=function(){var e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),function(e){return{up:{x:e.up[0],y:e.up[1],z:e.up[2]},center:{x:e.center[0],y:e.center[1],z:e.center[2]},eye:{x:e.eye[0],y:e.eye[1],z:e.eye[2]},projection:{type:!0===e._ortho?"orthographic":"perspective"}}}(e.camera)},T.setViewport=function(e){var t=this,r=e.camera;t.camera.lookAt.apply(this,function(e){return[[e.eye.x,e.eye.y,e.eye.z],[e.center.x,e.center.y,e.center.z],[e.up.x,e.up.y,e.up.z]]}(r)),t.glplot.setAspectratio(e.aspectratio),"orthographic"===r.projection.type!==t.camera._ortho&&(t.glplot.redraw(),t.glplot.clearRGBA(),t.glplot.dispose(),t.initializeGLPlot())},T.isCameraChanged=function(e){var t,r,n,i,a,o,s=this.getCamera(),l=u.nestedProperty(e,this.id+".camera").get(),c=!1;if(void 0===l)c=!0;else{for(var h=0;h<3;h++)for(var f=0;f<3;f++)if(t=s,i=f,void 0,void 0,o=["x","y","z"],!(r=l)[(a=["up","center","eye"])[n=h]]||t[a[n]][o[i]]!==r[a[n]][o[i]]){c=!0;break}(!l.projection||s.projection&&s.projection.type!==l.projection.type)&&(c=!0)}return c},T.isAspectChanged=function(e){var t=this.glplot.getAspectratio(),r=u.nestedProperty(e,this.id+".aspectratio").get();return void 0===r||r.x!==t.x||r.y!==t.y||r.z!==t.z},T.saveLayout=function(e){var t,r,n,i,a,o,s=this,l=s.fullLayout,h=s.isCameraChanged(e),f=s.isAspectChanged(e),p=h||f;if(p){var d={};h&&(t=s.getCamera(),n=(r=u.nestedProperty(e,s.id+".camera")).get(),d[s.id+".camera"]=n),f&&(i=s.glplot.getAspectratio(),o=(a=u.nestedProperty(e,s.id+".aspectratio")).get(),d[s.id+".aspectratio"]=o),c.call("_storeDirectGUIEdit",e,l._preGUI,d),h&&(r.set(t),u.nestedProperty(l,s.id+".camera").set(t)),f&&(a.set(i),u.nestedProperty(l,s.id+".aspectratio").set(i),s.glplot.redraw())}return p},T.updateFx=function(e,t){var r=this,n=r.camera;if(n)if("orbit"===e)n.mode="orbit",n.keyBindingMode="rotate";else if("turntable"===e){n.up=[0,0,1],n.mode="turntable",n.keyBindingMode="rotate";var i=r.graphDiv,a=i._fullLayout,o=r.fullSceneLayout.camera,s=o.up.x,l=o.up.y,h=o.up.z;if(h/Math.sqrt(s*s+l*l+h*h)<.999){var f=r.id+".camera.up",p={x:0,y:0,z:1},d={};d[f]=p;var m=i.layout;c.call("_storeDirectGUIEdit",m,a._preGUI,d),o.up=p,u.nestedProperty(m,f).set(p)}}else n.keyBindingMode=e;r.fullSceneLayout.hovermode=t},T.toImage=function(e){var t=this;e||(e="png"),t.staticMode&&t.container.appendChild(r),t.glplot.redraw();var n=t.glplot.gl,i=n.drawingBufferWidth,a=n.drawingBufferHeight;n.bindFramebuffer(n.FRAMEBUFFER,null);var o=new Uint8Array(i*a*4);n.readPixels(0,0,i,a,n.RGBA,n.UNSIGNED_BYTE,o),function(e,t,r){for(var n=0,i=r-1;n0)for(var s=255/o,l=0;l<3;++l)e[a+l]=Math.min(s*e[a+l],255)}}(o,i,a);var s=document.createElement("canvas");s.width=i,s.height=a;var l,c=s.getContext("2d",{willReadFrequently:!0}),u=c.createImageData(i,a);switch(u.data.set(o),c.putImageData(u,0,0),e){case"jpeg":l=s.toDataURL("image/jpeg");break;case"webp":l=s.toDataURL("image/webp");break;default:l=s.toDataURL("image/png")}return t.staticMode&&t.container.removeChild(r),l},T.setConvert=function(){for(var e=0;e<3;e++){var t=this.fullSceneLayout[A[e]];f.setConvert(t,this.fullLayout),t.setScale=u.noop}},T.make4thDimension=function(){var e=this,t=e.graphDiv._fullLayout;e._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},f.setConvert(e._mockAxis,t)},t.exports=w}}),ym=m({"src/plots/gl3d/layout/attributes.js"(e,t){t.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}}),vm=m({"src/plots/gl3d/layout/axis_attributes.js"(e,t){var r=W(),n=Lt(),i=B().extendFlat,a=De().overrideAll;t.exports=a({visible:n.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:r.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:n.color,categoryorder:n.categoryorder,categoryarray:n.categoryarray,title:{text:n.title.text,font:n.title.font},type:i({},n.type,{values:["-","linear","log","date","category"]}),autotypenumbers:n.autotypenumbers,autorange:n.autorange,autorangeoptions:{minallowed:n.autorangeoptions.minallowed,maxallowed:n.autorangeoptions.maxallowed,clipmin:n.autorangeoptions.clipmin,clipmax:n.autorangeoptions.clipmax,include:n.autorangeoptions.include,editType:"plot"},rangemode:n.rangemode,minallowed:n.minallowed,maxallowed:n.maxallowed,range:i({},n.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:n.minor.tickmode,nticks:n.nticks,tick0:n.tick0,dtick:n.dtick,tickvals:n.tickvals,ticktext:n.ticktext,ticks:n.ticks,mirror:n.mirror,ticklen:n.ticklen,tickwidth:n.tickwidth,tickcolor:n.tickcolor,showticklabels:n.showticklabels,labelalias:n.labelalias,tickfont:n.tickfont,tickangle:n.tickangle,tickprefix:n.tickprefix,showtickprefix:n.showtickprefix,ticksuffix:n.ticksuffix,showticksuffix:n.showticksuffix,showexponent:n.showexponent,exponentformat:n.exponentformat,minexponent:n.minexponent,separatethousands:n.separatethousands,tickformat:n.tickformat,tickformatstops:n.tickformatstops,hoverformat:n.hoverformat,showline:n.showline,linecolor:n.linecolor,linewidth:n.linewidth,showgrid:n.showgrid,gridcolor:i({},n.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:n.gridwidth,zeroline:n.zeroline,zerolinecolor:n.zerolinecolor,zerolinewidth:n.zerolinewidth},"plot","from-root")}}),xm=m({"src/plots/gl3d/layout/layout_attributes.js"(e,t){var r=vm(),n=Ma().attributes,i=B().extendFlat,a=ct().counterRegex;function o(e,t,r){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}t.exports={_arrayAttrRegexps:[a("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:i(o(0,0,1),{}),center:i(o(0,0,0),{}),eye:i(o(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:n({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:r,yaxis:r,zaxis:r,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot"}}}),_m=m({"src/plots/gl3d/layout/axis_defaults.js"(e,t){var r=F().mix,n=ct(),i=vt(),a=vm(),o=wi(),s=Ai(),l=["xaxis","yaxis","zaxis"],c=13600/187;t.exports=function(e,t,u){var h,f;function p(e,t){return n.coerce(h,f,a,e,t)}for(var d=0;d.999)&&(g="turntable")}else g="turntable";r("dragmode",g),r("hovermode",a.getDfltFromLayout("hovermode"))}t.exports=function(e,t,n){var i=t._basePlotModules.length>1;a(e,t,n,{type:c,attributes:s,handleDefaults:u,fullLayout:t,font:t.font,fullData:n,getDfltFromLayout:function(t){if(!i&&r.validate(e[t],s[t]))return e[t]},autotypenumbersDflt:t.autotypenumbers,paper_bgcolor:t.paper_bgcolor,calendar:t.calendar})}}}),wm=m({"src/plots/gl3d/index.js"(e){var t=De().overrideAll,r=U(),n=gm(),i=Tt().getSubplotData,a=ct(),o=Mt(),s="gl3d",l="scene";e.name=s,e.attr=l,e.idRoot=l,e.idRegex=e.attrRegex=a.counterRegex("scene"),e.attributes=ym(),e.layoutAttributes=xm(),e.baseLayoutAttrOverrides=t({hoverlabel:r.hoverlabel},"plot","nested"),e.supplyLayoutDefaults=bm(),e.plot=function(e){for(var t=e._fullLayout,r=e._fullData,a=t._subplots[s],o=0;o0){r=p[n];break}return r}function y(e,t){if(!(e<1||t<1)){for(var r=m(e),n=m(t),i=1,a=0;a_;)r--,r/=g(r),++r1?n:1},f.refineCoords=function(e){for(var t=this.dataScaleX,r=this.dataScaleY,i=e[0].shape[0],a=e[0].shape[1],o=0|Math.floor(e[0].shape[0]*t+1),s=0|Math.floor(e[0].shape[1]*r+1),l=1+i+1,c=1+a+1,u=n(new Float32Array(l*c),[l,c]),h=[1/t,0,0,0,1/r,0,0,0,1],f=0;f0&&null!==this.contourStart[e]&&null!==this.contourEnd[e]&&this.contourEnd[e]>this.contourStart[e]))for(i[e]=!0,t=this.contourStart[e];tv&&(this.minValues[m]=v),this.maxValues[m]l&&(t.isomin=null,t.isomax=null);var c=o("x"),u=o("y"),h=o("z"),f=o("value");c&&c.length&&u&&u.length&&h&&h.length&&f&&f.length?(n.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y","z"],i),o("valuehoverformat"),["x","y","z"].forEach((function(e){o(e+"hoverformat");var t="caps."+e;o(t+".show")&&o(t+".fill");var r="slices."+e;o(r+".show")&&(o(r+".fill"),o(r+".locations"))})),o("spaceframe.show")&&o("spaceframe.fill"),o("surface.show")&&(o("surface.count"),o("surface.fill"),o("surface.pattern")),o("contour.show")&&(o("contour.color"),o("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach((function(e){o(e)})),a(e,t,i,o,{prefix:"",cLetter:"c"}),t._length=null):t.visible=!1}t.exports={supplyDefaults:function(e,t,n,a){o(e,t,0,a,(function(n,a){return r.coerce(e,t,i,n,a)}))},supplyIsoDefaults:o}}}),Dm=m({"src/traces/streamtube/calc.js"(e,t){var r=ct(),n=Zt();function i(e){var t,n,i,o,s,l,c,u,h,f,p,d,m=e._x,g=e._y,y=e._z,v=e._len,x=-1/0,_=1/0,b=-1/0,w=1/0,T=-1/0,k=1/0,A="";for(v&&(c=m[0],h=g[0],p=y[0]),v>1&&(u=m[v-1],f=g[v-1],d=y[v-1]),t=0;tu?"-":"+")+"x")).replace("y",(h>f?"-":"+")+"y")).replace("z",(p>d?"-":"+")+"z");var C=function(){v=0,M=[],S=[],E=[]};(!v||v0;r--){var n=Math.min(t[r],t[r-1]),i=Math.max(t[r],t[r-1]);if(i>n&&n-1}function F(e,t){return null===e?t:e}function B(e,t,r){I();var n=[t],i=[r];if(s>=1)n=[t],i=[r];else if(s>0){var a=function(e,t){var r=e[0],n=e[1],i=e[2],a=function(e,t,r){for(var n=[],i=0;i-1?r[c]:C(u,h,f);l[c]=d>-1?d:P(u,h,f,F(e,p))}z(l[0],l[1],l[2])}}function j(e,t,r,n){var i=e[3];in&&(i=n);for(var a=(e[3]-i)/(e[3]-t[3]+1e-9),o=[],s=0;s<4;s++)o[s]=(1-a)*e[s]+a*t[s];return o}function N(e,t,r){return e>=t&&e<=r}function U(e){var t=.001*(E-S);return e>=S-t&&e<=E+t}function V(t){for(var r=[],n=0;n<4;n++){var i=t[n];r.push([e._x[i],e._y[i],e._z[i],e._value[i]])}return r}function q(e,t,r,n,i,a){a||(a=1),r=[-1,-1,-1];var o=!1,s=[N(t[0][3],n,i),N(t[1][3],n,i),N(t[2][3],n,i)];if(!s[0]&&!s[1]&&!s[2])return!1;var l=function(e,t,r){return U(t[0][3])&&U(t[1][3])&&U(t[2][3])?(B(e,t,r),!0):a<3&&q(e,t,r,S,E,++a)};if(s[0]&&s[1]&&s[2])return l(e,t,r)||o;var c=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach((function(a){if(s[a[0]]&&s[a[1]]&&!s[a[2]]){var u=t[a[0]],h=t[a[1]],f=t[a[2]],p=j(f,u,n,i),d=j(f,h,n,i);o=l(e,[d,p,u],[-1,-1,r[a[0]]])||o,o=l(e,[u,h,d],[r[a[0]],r[a[1]],-1])||o,c=!0}})),c||[[0,1,2],[1,2,0],[2,0,1]].forEach((function(a){if(s[a[0]]&&!s[a[1]]&&!s[a[2]]){var u=t[a[0]],h=t[a[1]],f=t[a[2]],p=j(h,u,n,i),d=j(f,u,n,i);o=l(e,[d,p,u],[-1,-1,r[a[0]]])||o,c=!0}})),o}function H(e,t,r,n){var i=!1,a=V(t),o=[N(a[0][3],r,n),N(a[1][3],r,n),N(a[2][3],r,n),N(a[3][3],r,n)];if(!(o[0]||o[1]||o[2]||o[3]))return i;if(o[0]&&o[1]&&o[2]&&o[3])return m&&(i=function(e,t,r){var n=function(n,i,a){B(e,[t[n],t[i],t[a]],[r[n],r[i],r[a]])};n(0,1,2),n(3,0,1),n(2,3,0),n(1,2,3)}(e,a,t)||i),i;var s=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],h=a[l[2]],f=a[l[3]];if(m)i=B(e,[c,u,h],[t[l[0]],t[l[1]],t[l[2]]])||i;else{var p=j(f,c,r,n),d=j(f,u,r,n),g=j(f,h,r,n);i=B(null,[p,d,g],[-1,-1,-1])||i}s=!0}})),s||([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&!o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],h=a[l[2]],f=a[l[3]],p=j(h,c,r,n),d=j(h,u,r,n),g=j(f,u,r,n),y=j(f,c,r,n);m?(i=B(e,[c,y,p],[t[l[0]],-1,-1])||i,i=B(e,[u,d,g],[t[l[1]],-1,-1])||i):i=function(e,t,r){var n=function(e,n,i){B(null,[t[e],t[n],t[i]],[r[e],r[n],r[i]])};n(0,1,2),n(2,3,0)}(0,[p,d,g,y],[-1,-1,-1,-1])||i,s=!0}})),s)||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach((function(l){if(o[l[0]]&&!o[l[1]]&&!o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],h=a[l[2]],f=a[l[3]],p=j(u,c,r,n),d=j(h,c,r,n),g=j(f,c,r,n);m?(i=B(e,[c,p,d],[t[l[0]],-1,-1])||i,i=B(e,[c,d,g],[t[l[0]],-1,-1])||i,i=B(e,[c,g,p],[t[l[0]],-1,-1])||i):i=B(null,[p,d,g],[-1,-1,-1])||i,s=!0}})),i}function G(e,t,r,n,i,a,o,s,l,c,u){var h=!1;return d&&(R(e,"A")&&(h=H(null,[t,r,n,a],c,u)||h),R(e,"B")&&(h=H(null,[r,n,i,l],c,u)||h),R(e,"C")&&(h=H(null,[r,a,o,l],c,u)||h),R(e,"D")&&(h=H(null,[n,a,s,l],c,u)||h),R(e,"E")&&(h=H(null,[r,n,a,l],c,u)||h)),m&&(h=H(e,[r,n,a,l],c,u)||h),h}function W(e,t,r,n,i,a,o,s){return[!0===s[0]||q(e,V([t,r,n]),[t,r,n],a,o),!0===s[1]||q(e,V([n,i,t]),[n,i,t],a,o)]}function Z(e,t,r,n,i,a,o,s,l){return s?W(e,t,r,i,n,a,o,l):W(e,r,i,n,t,a,o,l)}function Y(e,t,r,n,i,a,o){var s,l,c,u,h=!1,f=function(){h=q(e,[s,l,c],[-1,-1,-1],i,a)||h,h=q(e,[c,u,s],[-1,-1,-1],i,a)||h},p=o[0],d=o[1],m=o[2];return p&&(s=D(V([k(t,r-0,n-0)])[0],V([k(t-1,r-0,n-0)])[0],p),l=D(V([k(t,r-0,n-1)])[0],V([k(t-1,r-0,n-1)])[0],p),c=D(V([k(t,r-1,n-1)])[0],V([k(t-1,r-1,n-1)])[0],p),u=D(V([k(t,r-1,n-0)])[0],V([k(t-1,r-1,n-0)])[0],p),f()),d&&(s=D(V([k(t-0,r,n-0)])[0],V([k(t-0,r-1,n-0)])[0],d),l=D(V([k(t-0,r,n-1)])[0],V([k(t-0,r-1,n-1)])[0],d),c=D(V([k(t-1,r,n-1)])[0],V([k(t-1,r-1,n-1)])[0],d),u=D(V([k(t-1,r,n-0)])[0],V([k(t-1,r-1,n-0)])[0],d),f()),m&&(s=D(V([k(t-0,r-0,n)])[0],V([k(t-0,r-0,n-1)])[0],m),l=D(V([k(t-0,r-1,n)])[0],V([k(t-0,r-1,n-1)])[0],m),c=D(V([k(t-1,r-1,n)])[0],V([k(t-1,r-1,n-1)])[0],m),u=D(V([k(t-1,r-0,n)])[0],V([k(t-1,r-0,n-1)])[0],m),f()),h}function X(e,t,r,n,i,a,o,s,l,c,u,h){var f=e;return h?(d&&"even"===e&&(f=null),G(f,t,r,n,i,a,o,s,l,c,u)):(d&&"odd"===e&&(f=null),G(f,l,s,o,a,i,n,r,t,c,u))}function $(e,t,r,n,i){for(var a=[],o=0,s=0;sMath.abs(T-M)?[A,T]:[T,M];ee(r,C[0],C[1])}}var I=[[Math.min(S,M),Math.max(S,M)],[Math.min(A,E),Math.max(A,E)]];["x","y","z"].forEach((function(r){for(var n=[],i=0;i0&&(h.push(d.id),"x"===r?f.push([d.distRatio,0,0]):"y"===r?f.push([0,d.distRatio,0]):f.push([0,0,d.distRatio]))}else u=ie(1,"x"===r?_-1:"y"===r?b-1:w-1);h.length>0&&(n[a]="x"===r?te(t,h,o,s,f,n[a]):"y"===r?re(t,h,o,s,f,n[a]):ne(t,h,o,s,f,n[a]),a++),u.length>0&&(n[a]="x"===r?$(t,u,o,s,n[a]):"y"===r?K(t,u,o,s,n[a]):J(t,u,o,s,n[a]),a++)}var m=e.caps[r];m.show&&m.fill&&(O(m.fill),n[a]="x"===r?$(t,[0,_-1],o,s,n[a]):"y"===r?K(t,[0,b-1],o,s,n[a]):J(t,[0,w-1],o,s,n[a]),a++)}})),0===g&&L(),e._meshX=n,e._meshY=i,e._meshZ=a,e._meshIntensity=o,e._Xs=y,e._Ys=v,e._Zs=x}(),e}t.exports={findNearestOnAxis:l,generateIsoMeshes:f,createIsosurfaceTrace:function(e,t){var n=e.glplot.gl,i=r({gl:n}),a=new c(e,i,t.uid);return i._trace=a,a.update(t),e.glplot.add(i),a}}}}),Bm=m({"src/traces/isosurface/index.js"(e,t){t.exports={attributes:Pm(),supplyDefaults:zm().supplyDefaults,calc:Om(),colorbar:{min:"cmin",max:"cmax"},plot:Fm().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:wm(),categories:["gl3d","showLegend"],meta:{}}}}),jm=m({"lib/isosurface.js"(e,t){t.exports=Bm()}}),Nm=m({"src/traces/volume/attributes.js"(e,t){var r=zt(),n=Pm(),i=Am(),a=q(),o=B().extendFlat,s=De().overrideAll,l=t.exports=s(o({x:n.x,y:n.y,z:n.z,value:n.value,isomin:n.isomin,isomax:n.isomax,surface:n.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:n.slices,caps:n.caps,text:n.text,hovertext:n.hovertext,xhoverformat:n.xhoverformat,yhoverformat:n.yhoverformat,zhoverformat:n.zhoverformat,valuehoverformat:n.valuehoverformat,hovertemplate:n.hovertemplate,hovertemplatefallback:n.hovertemplatefallback},r("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:n.colorbar,opacity:n.opacity,opacityscale:i.opacityscale,lightposition:n.lightposition,lighting:n.lighting,flatshading:n.flatshading,contour:n.contour,hoverinfo:o({},a.hoverinfo),showlegend:o({},a.showlegend,{dflt:!1})}),"calc","nested");l.x.editType=l.y.editType=l.z.editType=l.value.editType="calc+clearAxisTypes"}}),Um=m({"src/traces/volume/defaults.js"(e,t){var r=ct(),n=Nm(),i=zm().supplyIsoDefaults,a=Mm().opacityscaleDefaults;t.exports=function(e,t,o,s){function l(i,a){return r.coerce(e,t,n,i,a)}i(e,t,o,s,l),a(e,t,s,l)}}}),Vm=m({"src/traces/volume/convert.js"(e,t){var r=Yd().gl_mesh3d,n=rm().parseColorScale,i=ct().isArrayOrTypedArray,a=tm(),o=Yt().extractOpts,s=Rm(),l=Fm().findNearestOnAxis,c=Fm().generateIsoMeshes;function u(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.data=null,this.showContour=!1}var h=u.prototype;h.handlePick=function(e){if(e.object===this.mesh){var t=e.data.index,r=this.data._meshX[t],n=this.data._meshY[t],a=this.data._meshZ[t],o=this.data._Ys.length,s=this.data._Zs.length,c=l(r,this.data._Xs).id,u=l(n,this.data._Ys).id,h=l(a,this.data._Zs).id,f=e.index=h+s*u+s*o*c;e.traceCoordinate=[this.data._meshX[f],this.data._meshY[f],this.data._meshZ[f],this.data._value[f]];var p=this.data.hovertext||this.data.text;return i(p)&&void 0!==p[f]?e.textLabel=p[f]:p&&(e.textLabel=p),!0}},h.update=function(e){var t=this.scene,r=t.fullSceneLayout;function i(e,t,r,n){return t.map((function(t){return e.d2l(t,0,n)*r}))}this.data=c(e);var l={positions:s(i(r.xaxis,e._meshX,t.dataScale[0],e.xcalendar),i(r.yaxis,e._meshY,t.dataScale[1],e.ycalendar),i(r.zaxis,e._meshZ,t.dataScale[2],e.zcalendar)),cells:s(e._meshI,e._meshJ,e._meshK),lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,opacityscale:e.opacityscale,contourEnable:e.contour.show,contourColor:a(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},u=o(e);l.vertexIntensity=e._meshIntensity,l.vertexIntensityBounds=[u.min,u.max],l.colormap=n(e),this.mesh.update(l)},h.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},t.exports=function(e,t){var n=e.glplot.gl,i=r({gl:n}),a=new u(e,i,t.uid);return i._trace=a,a.update(t),e.glplot.add(i),a}}}),qm=m({"src/traces/volume/index.js"(e,t){t.exports={attributes:Nm(),supplyDefaults:Um(),calc:Om(),colorbar:{min:"cmin",max:"cmax"},plot:Vm(),moduleType:"trace",name:"volume",basePlotModule:wm(),categories:["gl3d","showLegend"],meta:{}}}}),Hm=m({"lib/volume.js"(e,t){t.exports=qm()}}),Gm=m({"src/traces/mesh3d/defaults.js"(e,t){var r=He(),n=ct(),i=Ht(),a=Lm();t.exports=function(e,t,o,s){function l(r,i){return n.coerce(e,t,a,r,i)}function c(e){var t=e.map((function(e){var t=l(e);return t&&n.isArrayOrTypedArray(t)?t:null}));return t.every((function(e){return e&&e.length===t[0].length}))&&t}c(["x","y","z"])?(c(["i","j","k"]),(!t.i||t.j&&t.k)&&(!t.j||t.k&&t.i)&&(!t.k||t.i&&t.j)?(r.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y","z"],s),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach((function(e){l(e)})),l("contour.show")&&(l("contour.color"),l("contour.width")),"intensity"in e?(l("intensity"),l("intensitymode"),i(e,t,s,l,{prefix:"",cLetter:"c"})):(t.showscale=!1,"facecolor"in e?l("facecolor"):"vertexcolor"in e?l("vertexcolor"):l("color",o)),l("text"),l("hovertext"),l("hovertemplate"),l("hovertemplatefallback"),l("xhoverformat"),l("yhoverformat"),l("zhoverformat"),t._length=null):t.visible=!1):t.visible=!1}}}),Wm=m({"src/traces/mesh3d/calc.js"(e,t){var r=Zt();t.exports=function(e,t){t.intensity&&r(e,t,{vals:t.intensity,containerStr:"",cLetter:"c"})}}}),Zm=m({"src/traces/mesh3d/convert.js"(e,t){var r=Yd().gl_mesh3d,n=Yd().delaunay_triangulate,i=Yd().alpha_shape,a=Yd().convex_hull,o=rm().parseColorScale,s=ct().isArrayOrTypedArray,l=tm(),c=Yt().extractOpts,u=Rm();function h(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var f=h.prototype;function p(e){for(var t=[],r=e.length,n=0;n=t-.5)return!1;return!0}f.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index;e.data._cellCenter?e.traceCoordinate=e.data.dataCoordinate:e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]];var r=this.data.hovertext||this.data.text;return s(r)&&void 0!==r[t]?e.textLabel=r[t]:r&&(e.textLabel=r),!0}},f.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=e;var s,h=e.x.length,f=u(d(r.xaxis,e.x,t.dataScale[0],e.xcalendar),d(r.yaxis,e.y,t.dataScale[1],e.ycalendar),d(r.zaxis,e.z,t.dataScale[2],e.zcalendar));if(e.i&&e.j&&e.k){if(e.i.length!==e.j.length||e.j.length!==e.k.length||!g(e.i,h)||!g(e.j,h)||!g(e.k,h))return;s=u(m(e.i),m(e.j),m(e.k))}else s=0===e.alphahull?a(f):e.alphahull>0?i(e.alphahull,f):function(e,t){for(var r=["x","y","z"].indexOf(e),i=[],a=t.length,o=0;o2?e.slice(1,t-1):2===t?[(e[0]+e[1])/2]:e}function f(e){var t=e.length;return 1===t?[.5,.5]:[e[1]-e[0],e[t-1]-e[t-2]]}function p(e,t){var n=e.fullSceneLayout,c=e.dataScale,u=t._len,p={};function d(e,t){var r=n[t],a=c[l[t]];return i.simpleMap(e,(function(e){return r.d2l(e)*a}))}if(p.vectors=s(d(t._u,"xaxis"),d(t._v,"yaxis"),d(t._w,"zaxis"),u),!u)return{positions:[],cells:[]};var m=d(t._Xs,"xaxis"),g=d(t._Ys,"yaxis"),y=d(t._Zs,"zaxis");if(p.meshgrid=[m,g,y],p.gridFill=t._gridFill,t._slen)p.startingPositions=s(d(t._startsX,"xaxis"),d(t._startsY,"yaxis"),d(t._startsZ,"zaxis"));else{for(var v=g[0],x=h(m),_=h(y),b=new Array(x.length*_.length),w=0,T=0;To&&(o=e[0]),e[1]s&&(s=e[1])}function c(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(c);break;case"Point":l(e.coordinates);break;case"MultiPoint":e.coordinates.forEach(l)}}for(t in e.arcs.forEach((function(e){for(var t,r=-1,l=e.length;++ro&&(o=t[0]),t[1]s&&(s=t[1])})),e.objects)c(e.objects[t]);return[i,a,o,s]}function i(e,t){var r=t.id,n=t.bbox,i=null==t.properties?{}:t.properties,o=a(e,t);return null==r&&null==n?{type:"Feature",properties:i,geometry:o}:null==n?{type:"Feature",id:r,properties:i,geometry:o}:{type:"Feature",id:r,bbox:n,properties:i,geometry:o}}function a(e,t){var n=r(e.transform),i=e.arcs;function a(e,t){t.length&&t.pop();for(var r=i[e<0?~e:e],a=0,o=r.length;a1)n=function(e,t,r){var n,i=[],a=[];function o(e){var t=e<0?~e:e;(a[t]||(a[t]=[])).push({i:e,g:n})}function s(e){e.forEach(o)}function l(e){e.forEach(s)}return function e(t){switch(n=t,t.type){case"GeometryCollection":t.geometries.forEach(e);break;case"LineString":s(t.arcs);break;case"MultiLineString":case"Polygon":l(t.arcs);break;case"MultiPolygon":!function(e){e.forEach(l)}(t.arcs)}}(t),a.forEach(null==r?function(e){i.push(e[0].i)}:function(e){r(e[0].g,e[e.length-1].g)&&i.push(e[0].i)}),i}(0,t,r);else for(i=0,n=new Array(a=e.arcs.length);i1)for(var a,s,c=1,u=l(i[0]);cu&&(s=i[0],i[0]=i[c],i[c]=s,u=a);return i})).filter((function(e){return e.length>0}))}}function c(e,t){for(var r=0,n=e.length;r>>1;e[i]=2))throw new Error("n must be ≥2");var r,i=(l=e.bbox||n(e))[0],a=l[1],o=l[2],s=l[3];t={scale:[o-i?(o-i)/(r-1):1,s-a?(s-a)/(r-1):1],translate:[i,a]}}var l,c,h=u(t),f=e.objects,p={};function d(e){return h(e)}function m(e){var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(m)};break;case"Point":t={type:"Point",coordinates:d(e.coordinates)};break;case"MultiPoint":t={type:"MultiPoint",coordinates:e.coordinates.map(d)};break;default:return e}return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}for(c in f)p[c]=m(f[c]);return{type:"Topology",bbox:l,transform:t,objects:p,arcs:e.arcs.map((function(e){var t,r=0,n=1,i=e.length,a=new Array(i);for(a[0]=h(e[0],0);++r0&&(n.push(i),i=[])}return i.length>0&&n.push(i),n},e.makeLine=function(e){return 1===e.length?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}},e.makePolygon=function(e){if(1===e.length)return{type:"Polygon",coordinates:e};for(var t=new Array(e.length),r=0;r180?e-360:e<-180?e+360:e},e.bearingToAzimuth=function(e){let t=e%360;return t<0&&(t+=360),t},e.convertArea=function(e,t="meters",r="kilometers"){if(!(e>=0))throw new Error("area must be a positive number");let i=n[t];if(!i)throw new Error("invalid original units");let a=n[r];if(!a)throw new Error("invalid final units");return e/i*a},e.convertLength=function(e,t="kilometers",r="kilometers"){if(!(e>=0))throw new Error("length must be a positive number");return f(p(e,t),r)},e.degreesToRadians=function(e){return e%360*Math.PI/180},e.earthRadius=t,e.factors=r,e.feature=i,e.featureCollection=l,e.geometry=function(e,t,r={}){switch(e){case"Point":return a(t).geometry;case"LineString":return s(t).geometry;case"Polygon":return o(t).geometry;case"MultiPoint":return u(t).geometry;case"MultiLineString":return c(t).geometry;case"MultiPolygon":return h(t).geometry;default:throw new Error(e+" is invalid")}},e.geometryCollection=function(e,t,r={}){return i({type:"GeometryCollection",geometries:e},t,r)},e.isNumber=m,e.isObject=function(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)},e.lengthToDegrees=function(e,t){return d(p(e,t))},e.lengthToRadians=p,e.lineString=s,e.lineStrings=function(e,t,r={}){return l(e.map((e=>s(e,t))),r)},e.multiLineString=c,e.multiPoint=u,e.multiPolygon=h,e.point=a,e.points=function(e,t,r={}){return l(e.map((e=>a(e,t))),r)},e.polygon=o,e.polygons=function(e,t,r={}){return l(e.map((e=>o(e,t))),r)},e.radiansToDegrees=d,e.radiansToLength=f,e.round=function(e,t=0){if(t&&!(t>=0))throw new Error("precision must be a positive number");let r=Math.pow(10,t||0);return Math.round(e*r)/r},e.validateBBox=function(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((e=>{if(!m(e))throw new Error("bbox must only contain numbers")}))},e.validateId=function(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}}}),yg=m({"node_modules/@turf/meta/dist/cjs/index.cjs"(e){Object.defineProperty(e,"__esModule",{value:!0});var t=gg();function r(e,t,n){if(null!==e)for(var i,a,o,s,l,c,u,h,f=0,p=0,d=e.type,m="FeatureCollection"===d,g="Feature"===d,y=m?e.features.length:1,v=0;vc||p>u||d>h)return l=r,c=i,u=p,h=d,void(o=0);var m=t.lineString.call(void 0,[l,r],e.properties);if(!1===n(m,i,a,d,o))return!1;o++,l=r})))return!1}}}))}function l(e,r){if(!e)throw new Error("geojson is required");o(e,(function(e,n,i){if(null!==e.geometry){var a=e.geometry.type,o=e.geometry.coordinates;switch(a){case"LineString":if(!1===r(e,n,i,0,0))return!1;break;case"Polygon":for(var s=0;se+function(e){let t,r=0;switch(e.type){case"Polygon":return i(e.coordinates);case"MultiPolygon":for(t=0;t0){t+=Math.abs(s(e[0]));for(let r=1;r=t?(n+2)%t:n+2],l=i[0]*o,c=a[1]*o;r+=(s[0]*o-l)*Math.sin(c),n++}return r*a}var l=n;e.area=n,e.default=l}}),xg=m({"node_modules/@turf/centroid/dist/cjs/index.cjs"(e){Object.defineProperty(e,"__esModule",{value:!0});var t=gg(),r=yg();function n(e,n={}){let i=0,a=0,o=0;return r.coordEach.call(void 0,e,(function(e){i+=e[0],a+=e[1],o++}),!0),t.point.call(void 0,[i/o,a/o],n.properties)}var i=n;e.centroid=n,e.default=i}}),_g=m({"node_modules/@turf/bbox/dist/cjs/index.cjs"(e){Object.defineProperty(e,"__esModule",{value:!0});var t=yg();function r(e,r={}){if(null!=e.bbox&&!0!==r.recompute)return e.bbox;let n=[1/0,1/0,-1/0,-1/0];return t.coordEach.call(void 0,e,(e=>{n[0]>e[0]&&(n[0]=e[0]),n[1]>e[1]&&(n[1]=e[1]),n[2]0&&e[t+1][0]<0)return t;return null}switch(t="RUS"===s||"FJI"===s?function(e){var t;if(null===c(e))t=e;else for(t=new Array(e.length),i=0;it?r[n++]=[e[i][0]+360,e[i][1]]:i===t?(r[n++]=e[i],r[n++]=[e[i][0],-90]):r[n++]=e[i];var a=h.tester(r);a.pts.pop(),l.push(a)}:function(e){l.push(h.tester(e))},a.type){case"MultiPolygon":for(r=0;r0?h.properties.ct=function(e){var t,r=e.geometry;if("MultiPolygon"===r.type)for(var n=r.coordinates,o=0,s=0;so&&(o=c,t=l)}else t=r;return a(t).geometry.coordinates}(h):h.properties.ct=[NaN,NaN],n.fIn=e,n.fOut=h,s.push(h)}else l.log(["Location",n.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete o[r]}switch(r.type){case"FeatureCollection":var f=r.features;for(n=0;n100?(clearInterval(a),n("Unexpected error while fetching from "+e)):void i++}),50)}))}for(var o=0;o")}function p(e){return e+"°"}}(c,m,e,l[0].t.labels),e.hovertemplate=c.hovertemplate,[e]}}}}),Ag=m({"src/traces/scattergeo/event_data.js"(e,t){t.exports=function(e,t,r,n,i){e.lon=t.lon,e.lat=t.lat,e.location=t.loc?t.loc:null;var a=n[i];return a.fIn&&a.fIn.properties&&(e.properties=a.fIn.properties),e}}}),Mg=m({"src/traces/scattergeo/select.js"(e,t){var r=Xt(),n=S().BADNUM;t.exports=function(e,t){var i,a,o,s,l,c=e.cd,u=e.xaxis,h=e.yaxis,f=[],p=c[0].trace;if(!r.hasMarkers(p)&&!r.hasText(p))return[];if(!1===t)for(l=0;lt?1:e>=t?0:NaN}function r(e){return 1===e.length&&(e=function(e){return function(r,n){return t(e(r),n)}}(e)),{left:function(t,r,n,i){for(null==n&&(n=0),null==i&&(i=t.length);n>>1;e(t[a],r)<0?n=a+1:i=a}return n},right:function(t,r,n,i){for(null==n&&(n=0),null==i&&(i=t.length);n>>1;e(t[a],r)>0?i=a:n=a+1}return n}}}var n=r(t),i=n.right,a=n.left;function o(e,t){return[e,t]}function s(e){return null===e?NaN:+e}function l(e,t){var r,n,i=e.length,a=0,o=-1,l=0,c=0;if(null==t)for(;++o1)return c/(a-1)}function c(e,t){var r=l(e,t);return r&&Math.sqrt(r)}function u(e,t){var r,n,i,a=e.length,o=-1;if(null==t){for(;++o=r)for(n=i=r;++or&&(n=r),i=r)for(n=i=r;++or&&(n=r),i=0?(a>=y?10:a>=v?5:a>=x?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=y?10:a>=v?5:a>=x?2:1)}function b(e,t,r){var n=Math.abs(t-e)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),a=n/i;return a>=y?i*=10:a>=v?i*=5:a>=x&&(i*=2),t=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e);return o+(+r(e[a+1],a+1,e)-o)*(i-a)}}function k(e,t){var r,n,i=e.length,a=-1;if(null==t){for(;++a=r)for(n=r;++ar&&(n=r)}else for(;++a=r)for(n=r;++ar&&(n=r);return n}function A(e){if(!(i=e.length))return[];for(var t=-1,r=k(e,M),n=new Array(r);++te?1:t>=e?0:NaN},e.deviation=c,e.extent=u,e.histogram=function(){var e=m,t=u,r=w;function n(n){var a,o,s=n.length,l=new Array(s);for(a=0;ah;)f.pop(),--p;var d,m=new Array(p+1);for(a=0;a<=p;++a)(d=m[a]=[]).x0=a>0?f[a-1]:u,d.x1=a=r)for(n=r;++an&&(n=r)}else for(;++a=r)for(n=r;++an&&(n=r);return n},e.mean=function(e,t){var r,n=e.length,i=n,a=-1,o=0;if(null==t)for(;++a=0;)for(t=(n=e[i]).length;--t>=0;)r[--o]=n[t];return r},e.min=k,e.pairs=function(e,t){null==t&&(t=o);for(var r=0,n=e.length-1,i=e[0],a=new Array(n<0?0:n);r0)return[e];if((n=t0)for(e=Math.ceil(e/o),t=Math.floor(t/o),a=new Array(i=Math.ceil(t-e+1));++s0?1:e<0?-1:0},k=Math.sqrt,A=Math.tan;function M(e){return e>1?0:e<-1?l:Math.acos(e)}function S(e){return e>1?c:e<-1?-c:Math.asin(e)}function E(e){return(e=w(e/2))*e}function C(){}function I(e,t){e&&P.hasOwnProperty(e.type)&&P[e.type](e,t)}var L={Feature:function(e,t){I(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,n=-1,i=r.length;++n=0?1:-1,i=n*r,a=y(t=(t*=p)/2+u),o=w(t),s=N*o,l=j*a+s*y(i),c=s*n*w(i);U.add(g(c,l)),B=e,j=a,N=o}function Y(e){return[g(e[1],e[0]),S(e[2])]}function X(e){var t=e[0],r=e[1],n=y(r);return[n*y(t),n*w(t),w(r)]}function $(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function K(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function J(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function Q(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function ee(e){var t=k(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var te,re,ne,ie,ae,oe,se,le,ce,ue,he=r(),fe={point:pe,lineStart:me,lineEnd:ge,polygonStart:function(){fe.point=ye,fe.lineStart=ve,fe.lineEnd=xe,he.reset(),q.polygonStart()},polygonEnd:function(){q.polygonEnd(),fe.point=pe,fe.lineStart=me,fe.lineEnd=ge,U<0?(te=-(ne=180),re=-(ie=90)):he>o?ie=90:he<-o&&(re=-90),ue[0]=te,ue[1]=ne},sphere:function(){te=-(ne=180),re=-(ie=90)}};function pe(e,t){ce.push(ue=[te=e,ne=e]),tie&&(ie=t)}function de(e,t){var r=X([e*p,t*p]);if(le){var n=K(le,r),i=K([n[1],-n[0],0],n);ee(i),i=Y(i);var a,o=e-ae,s=o>0?1:-1,l=i[0]*f*s,c=d(o)>180;c^(s*aeie&&(ie=a):c^(s*ae<(l=(l+360)%360-180)&&lie&&(ie=t)),c?e_e(te,ne)&&(ne=e):_e(e,ne)>_e(te,ne)&&(te=e):ne>=te?(ene&&(ne=e)):e>ae?_e(te,e)>_e(te,ne)&&(ne=e):_e(e,ne)>_e(te,ne)&&(te=e)}else ce.push(ue=[te=e,ne=e]);tie&&(ie=t),le=r,ae=e}function me(){fe.point=de}function ge(){ue[0]=te,ue[1]=ne,fe.point=pe,le=null}function ye(e,t){if(le){var r=e-ae;he.add(d(r)>180?r+(r>0?360:-360):r)}else oe=e,se=t;q.point(e,t),de(e,t)}function ve(){q.lineStart()}function xe(){ye(oe,se),q.lineEnd(),d(he)>o&&(te=-(ne=180)),ue[0]=te,ue[1]=ne,le=null}function _e(e,t){return(t-=e)<0?t+360:t}function be(e,t){return e[0]-t[0]}function we(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tl?e+Math.round(-e/h)*h:e,t]}function Qe(e,t,r){return(e%=h)?t||r?Ke(tt(e),rt(t,r)):tt(e):t||r?rt(t,r):Je}function et(e){return function(t,r){return[(t+=e)>l?t-h:t<-l?t+h:t,r]}}function tt(e){var t=et(e);return t.invert=et(-e),t}function rt(e,t){var r=y(e),n=w(e),i=y(t),a=w(t);function o(e,t){var o=y(t),s=y(e)*o,l=w(e)*o,c=w(t),u=c*r+s*n;return[g(l*i-u*a,s*r-c*n),S(u*i+l*a)]}return o.invert=function(e,t){var o=y(t),s=y(e)*o,l=w(e)*o,c=w(t),u=c*i-l*a;return[g(l*i+c*a,s*r+u*n),S(u*r-s*n)]},o}function nt(e){function t(t){return(t=e(t[0]*p,t[1]*p))[0]*=f,t[1]*=f,t}return e=Qe(e[0]*p,e[1]*p,e.length>2?e[2]*p:0),t.invert=function(t){return(t=e.invert(t[0]*p,t[1]*p))[0]*=f,t[1]*=f,t},t}function it(e,t,r,n,i,a){if(r){var o=y(t),s=w(t),l=n*r;null==i?(i=t+n*h,a=t-l/2):(i=at(o,i),a=at(o,a),(n>0?ia)&&(i+=n*h));for(var c,u=i;n>0?u>a:u1&&t.push(t.pop().concat(t.shift()))},result:function(){var r=t;return t=[],e=null,r}}}function st(e,t){return d(e[0]-t[0])=0;--a)i.point((h=u[a])[0],h[1]);else n(p.x,p.p.x,-1,i);p=p.p}u=(p=p.o).z,d=!d}while(!p.v);i.lineEnd()}}}function ut(e){if(t=e.length){for(var t,r,n=0,i=e[0];++n=0?1:-1,D=z*P,O=D>l,R=T*I;if(ht.add(g(R*z*w(D),k*L+R*y(D))),s+=O?P+z*h:P,O^_>=r^E>=r){var F=K(X(x),X(M));ee(F);var B=K(a,F);ee(B);var j=(O^P>=0?-1:1)*S(B[2]);(n>j||n===j&&(F[0]||F[1]))&&(f+=O^P>=0?1:-1)}}return(s<-o||s0){for(f||(a.polygonStart(),f=!0),a.lineStart(),e=0;e1&&2&i&&c.push(c.pop().concat(c.shift())),s.push(c.filter(mt))}}return p}}function mt(e){return e.length>1}function gt(e,t){return((e=e.x)[0]<0?e[1]-c-o:c-e[1])-((t=t.x)[0]<0?t[1]-c-o:c-t[1])}var yt=dt((function(){return!0}),(function(e){var t,r=NaN,n=NaN,i=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(a,s){var u=a>0?l:-l,h=d(a-r);d(h-l)0?c:-c),e.point(i,n),e.lineEnd(),e.lineStart(),e.point(u,n),e.point(a,n),t=0):i!==u&&h>=l&&(d(r-i)o?m((w(t)*(a=y(n))*w(r)-w(n)*(i=y(t))*w(e))/(i*a*s)):(t+n)/2}(r,n,a,s),e.point(i,n),e.lineEnd(),e.lineStart(),e.point(u,n),t=0),e.point(r=a,n=s),i=u},lineEnd:function(){e.lineEnd(),r=n=NaN},clean:function(){return 2-t}}}),(function(e,t,r,n){var i;if(null==e)i=r*c,n.point(-l,i),n.point(0,i),n.point(l,i),n.point(l,0),n.point(l,-i),n.point(0,-i),n.point(-l,-i),n.point(-l,0),n.point(-l,i);else if(d(e[0]-t[0])>o){var a=e[0]0,i=d(t)>o;function a(e,r){return y(e)*y(r)>t}function s(e,r,n){var i=[1,0,0],a=K(X(e),X(r)),s=$(a,a),c=a[0],u=s-c*c;if(!u)return!n&&e;var h=t*s/u,f=-t*c/u,p=K(i,a),m=Q(i,h);J(m,Q(a,f));var g=p,y=$(m,g),v=$(g,g),x=y*y-v*($(m,m)-1);if(!(x<0)){var _=k(x),b=Q(g,(-y-_)/v);if(J(b,m),b=Y(b),!n)return b;var w,T=e[0],A=r[0],M=e[1],S=r[1];A0^b[1]<(d(b[0]-T)l^(T<=b[0]&&b[0]<=A)){var I=Q(g,(-y+_)/v);return J(I,m),[b,Y(I)]}}}function c(t,r){var i=n?e:l-e,a=0;return t<-i?a|=1:t>i&&(a|=2),r<-i?a|=4:r>i&&(a|=8),a}return dt(a,(function(e){var t,r,o,u,h;return{lineStart:function(){u=o=!1,h=1},point:function(f,p){var d,m=[f,p],g=a(f,p),y=n?g?0:c(f,p):g?c(f+(f<0?l:-l),p):0;if(!t&&(u=o=g)&&e.lineStart(),g!==o&&(!(d=s(t,m))||st(t,d)||st(m,d))&&(m[2]=1),g!==o)h=0,g?(e.lineStart(),d=s(m,t),e.point(d[0],d[1])):(d=s(t,m),e.point(d[0],d[1],2),e.lineEnd()),t=d;else if(i&&t&&n^g){var v;!(y&r)&&(v=s(m,t,!0))&&(h=0,n?(e.lineStart(),e.point(v[0][0],v[0][1]),e.point(v[1][0],v[1][1]),e.lineEnd()):(e.point(v[1][0],v[1][1]),e.lineEnd(),e.lineStart(),e.point(v[0][0],v[0][1],3)))}g&&(!t||!st(t,m))&&e.point(m[0],m[1]),t=m,o=g,r=y},lineEnd:function(){o&&e.lineEnd(),t=null},clean:function(){return h|(u&&o)<<1}}}),(function(t,n,i,a){it(a,e,r,i,t,n)}),n?[0,-e]:[-l,e-l])}var xt=1e9,_t=-xt;function bt(e,r,n,i){function a(t,a){return e<=t&&t<=n&&r<=a&&a<=i}function s(t,a,o,s){var c=0,h=0;if(null==t||(c=l(t,o))!==(h=l(a,o))||u(t,a)<0^o>0)do{s.point(0===c||3===c?e:n,c>1?i:r)}while((c=(c+o+4)%4)!==h);else s.point(a[0],a[1])}function l(t,i){return d(t[0]-e)0?0:3:d(t[0]-n)0?2:1:d(t[1]-r)0?1:0:i>0?3:2}function c(e,t){return u(e.x,t.x)}function u(e,t){var r=l(e,1),n=l(t,1);return r!==n?r-n:0===r?t[1]-e[1]:1===r?e[0]-t[0]:2===r?e[1]-t[1]:t[0]-e[0]}return function(o){var l,u,h,f,p,d,m,g,y,v,x,_=o,b=ot(),w={point:T,lineStart:function(){w.point=k,u&&u.push(h=[]),v=!0,y=!1,m=g=NaN},lineEnd:function(){l&&(k(f,p),d&&y&&b.rejoin(),l.push(b.result())),w.point=T,y&&_.lineEnd()},polygonStart:function(){_=b,l=[],u=[],x=!0},polygonEnd:function(){var r=function(){for(var t=0,r=0,n=u.length;ri&&(f-a)*(i-o)>(p-o)*(e-a)&&++t:p<=i&&(f-a)*(i-o)<(p-o)*(e-a)&&--t;return t}(),n=x&&r,a=(l=t.merge(l)).length;(n||a)&&(o.polygonStart(),n&&(o.lineStart(),s(null,null,1,o),o.lineEnd()),a&&ct(l,c,r,s,o),o.polygonEnd()),_=o,l=u=h=null}};function T(e,t){a(e,t)&&_.point(e,t)}function k(t,o){var s=a(t,o);if(u&&h.push([t,o]),v)f=t,p=o,d=s,v=!1,s&&(_.lineStart(),_.point(t,o));else if(s&&y)_.point(t,o);else{var l=[m=Math.max(_t,Math.min(xt,m)),g=Math.max(_t,Math.min(xt,g))],c=[t=Math.max(_t,Math.min(xt,t)),o=Math.max(_t,Math.min(xt,o))];!function(e,t,r,n,i,a){var o,s=e[0],l=e[1],c=0,u=1,h=t[0]-s,f=t[1]-l;if(o=r-s,h||!(o>0)){if(o/=h,h<0){if(o0){if(o>u)return;o>c&&(c=o)}if(o=i-s,h||!(o<0)){if(o/=h,h<0){if(o>u)return;o>c&&(c=o)}else if(h>0){if(o0)){if(o/=f,f<0){if(o0){if(o>u)return;o>c&&(c=o)}if(o=a-l,f||!(o<0)){if(o/=f,f<0){if(o>u)return;o>c&&(c=o)}else if(f>0){if(o0&&(e[0]=s+c*h,e[1]=l+c*f),u<1&&(t[0]=s+u*h,t[1]=l+u*f),!0}}}}}(l,c,e,r,n,i)?s&&(_.lineStart(),_.point(t,o),x=!1):(y||(_.lineStart(),_.point(l[0],l[1])),_.point(c[0],c[1]),s||_.lineEnd(),x=!1)}m=t,g=o,y=s}return w}}var wt,Tt,kt,At=r(),Mt={sphere:C,point:C,lineStart:function(){Mt.point=Et,Mt.lineEnd=St},lineEnd:C,polygonStart:C,polygonEnd:C};function St(){Mt.point=Mt.lineEnd=C}function Et(e,t){wt=e*=p,Tt=w(t*=p),kt=y(t),Mt.point=Ct}function Ct(e,t){e*=p;var r=w(t*=p),n=y(t),i=d(e-wt),a=y(i),o=n*w(i),s=kt*r-Tt*n*a,l=Tt*r+kt*n*a;At.add(g(k(o*o+s*s),l)),wt=e,Tt=r,kt=n}function It(e){return At.reset(),O(e,Mt),+At}var Lt=[null,null],Pt={type:"LineString",coordinates:Lt};function zt(e,t){return Lt[0]=e,Lt[1]=t,It(Pt)}var Dt={Feature:function(e,t){return Rt(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,n=-1,i=r.length;++n0&&(i=zt(e[a],e[a-1]))>0&&r<=i&&n<=i&&(r+n-i)*(1-Math.pow((r-n)/i,2))o})).map(u)).concat(t.range(v(s/g)*g,a,g).filter((function(e){return d(e%x)>o})).map(h))}return b.lines=function(){return w().map((function(e){return{type:"LineString",coordinates:e}}))},b.outline=function(){return{type:"Polygon",coordinates:[f(i).concat(p(l).slice(1),f(n).reverse().slice(1),p(c).reverse().slice(1))]}},b.extent=function(e){return arguments.length?b.extentMajor(e).extentMinor(e):b.extentMinor()},b.extentMajor=function(e){return arguments.length?(i=+e[0][0],n=+e[1][0],c=+e[0][1],l=+e[1][1],i>n&&(e=i,i=n,n=e),c>l&&(e=c,c=l,l=e),b.precision(_)):[[i,c],[n,l]]},b.extentMinor=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],s=+t[0][1],a=+t[1][1],r>e&&(t=r,r=e,e=t),s>a&&(t=s,s=a,a=t),b.precision(_)):[[r,s],[e,a]]},b.step=function(e){return arguments.length?b.stepMajor(e).stepMinor(e):b.stepMinor()},b.stepMajor=function(e){return arguments.length?(y=+e[0],x=+e[1],b):[y,x]},b.stepMinor=function(e){return arguments.length?(m=+e[0],g=+e[1],b):[m,g]},b.precision=function(t){return arguments.length?(_=+t,u=Vt(s,a,90),h=qt(r,e,_),f=Vt(c,l,90),p=qt(i,n,_),b):_},b.extentMajor([[-180,-90+o],[180,90-o]]).extentMinor([[-180,-80-o],[180,80+o]])}function Gt(e){return e}var Wt,Zt,Yt,Xt,$t=r(),Kt=r(),Jt={point:C,lineStart:C,lineEnd:C,polygonStart:function(){Jt.lineStart=Qt,Jt.lineEnd=rr},polygonEnd:function(){Jt.lineStart=Jt.lineEnd=Jt.point=C,$t.add(d(Kt)),Kt.reset()},result:function(){var e=$t/2;return $t.reset(),e}};function Qt(){Jt.point=er}function er(e,t){Jt.point=tr,Wt=Yt=e,Zt=Xt=t}function tr(e,t){Kt.add(Xt*e-Yt*t),Yt=e,Xt=t}function rr(){tr(Wt,Zt)}var nr,ir,ar,or,sr=1/0,lr=sr,cr=-sr,ur=cr,hr={point:function(e,t){ecr&&(cr=e),tur&&(ur=t)},lineStart:C,lineEnd:C,polygonStart:C,polygonEnd:C,result:function(){var e=[[sr,lr],[cr,ur]];return cr=ur=-(lr=sr=1/0),e}},fr=0,pr=0,dr=0,mr=0,gr=0,yr=0,vr=0,xr=0,_r=0,br={point:wr,lineStart:Tr,lineEnd:Mr,polygonStart:function(){br.lineStart=Sr,br.lineEnd=Er},polygonEnd:function(){br.point=wr,br.lineStart=Tr,br.lineEnd=Mr},result:function(){var e=_r?[vr/_r,xr/_r]:yr?[mr/yr,gr/yr]:dr?[fr/dr,pr/dr]:[NaN,NaN];return fr=pr=dr=mr=gr=yr=vr=xr=_r=0,e}};function wr(e,t){fr+=e,pr+=t,++dr}function Tr(){br.point=kr}function kr(e,t){br.point=Ar,wr(ar=e,or=t)}function Ar(e,t){var r=e-ar,n=t-or,i=k(r*r+n*n);mr+=i*(ar+e)/2,gr+=i*(or+t)/2,yr+=i,wr(ar=e,or=t)}function Mr(){br.point=wr}function Sr(){br.point=Cr}function Er(){Ir(nr,ir)}function Cr(e,t){br.point=Ir,wr(nr=ar=e,ir=or=t)}function Ir(e,t){var r=e-ar,n=t-or,i=k(r*r+n*n);mr+=i*(ar+e)/2,gr+=i*(or+t)/2,yr+=i,vr+=(i=or*e-ar*t)*(ar+e),xr+=i*(or+t),_r+=3*i,wr(ar=e,or=t)}function Lr(e){this._context=e}Lr.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,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(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,h)}},result:C};var Pr,zr,Dr,Or,Rr,Fr=r(),Br={point:C,lineStart:function(){Br.point=jr},lineEnd:function(){Pr&&Nr(zr,Dr),Br.point=C},polygonStart:function(){Pr=!0},polygonEnd:function(){Pr=null},result:function(){var e=+Fr;return Fr.reset(),e}};function jr(e,t){Br.point=Nr,zr=Or=e,Dr=Rr=t}function Nr(e,t){Or-=e,Rr-=t,Fr.add(k(Or*Or+Rr*Rr)),Or=e,Rr=t}function Ur(){this._string=[]}function Vr(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function qr(e){return function(t){var r=new Hr;for(var n in e)r[n]=e[n];return r.stream=t,r}}function Hr(){}function Gr(e,t,r){var n=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=n&&e.clipExtent(null),O(r,e.stream(hr)),t(hr.result()),null!=n&&e.clipExtent(n),e}function Wr(e,t,r){return Gr(e,(function(r){var n=t[1][0]-t[0][0],i=t[1][1]-t[0][1],a=Math.min(n/(r[1][0]-r[0][0]),i/(r[1][1]-r[0][1])),o=+t[0][0]+(n-a*(r[1][0]+r[0][0]))/2,s=+t[0][1]+(i-a*(r[1][1]+r[0][1]))/2;e.scale(150*a).translate([o,s])}),r)}function Zr(e,t,r){return Wr(e,[[0,0],t],r)}function Yr(e,t,r){return Gr(e,(function(r){var n=+t,i=n/(r[1][0]-r[0][0]),a=(n-i*(r[1][0]+r[0][0]))/2,o=-i*r[0][1];e.scale(150*i).translate([a,o])}),r)}function Xr(e,t,r){return Gr(e,(function(r){var n=+t,i=n/(r[1][1]-r[0][1]),a=-i*r[0][0],o=(n-i*(r[1][1]+r[0][1]))/2;e.scale(150*i).translate([a,o])}),r)}Ur.prototype={_radius:4.5,_circle:Vr(4.5),pointRadius:function(e){return(e=+e)!==this._radius&&(this._radius=e,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(e,t){switch(this._point){case 0:this._string.push("M",e,",",t),this._point=1;break;case 1:this._string.push("L",e,",",t);break;default:null==this._circle&&(this._circle=Vr(this._radius)),this._string.push("M",e,",",t,this._circle)}},result:function(){if(this._string.length){var e=this._string.join("");return this._string=[],e}return null}},Hr.prototype={constructor:Hr,point:function(e,t){this.stream.point(e,t)},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 $r=y(30*p);function Kr(e,t){return+t?function(e,t){function r(n,i,a,s,l,c,u,h,f,p,m,y,v,x){var _=u-n,b=h-i,w=_*_+b*b;if(w>4*t&&v--){var T=s+p,A=l+m,M=c+y,E=k(T*T+A*A+M*M),C=S(M/=E),I=d(d(M)-1)t||d((_*D+b*O)/w-.5)>.3||s*p+l*m+c*y<$r)&&(r(n,i,a,s,l,c,P,z,I,T/=E,A/=E,M,v,x),x.point(P,z),r(P,z,I,T,A,M,u,h,f,p,m,y,v,x))}}return function(t){var n,i,a,o,s,l,c,u,h,f,p,d,m={point:g,lineStart:y,lineEnd:x,polygonStart:function(){t.polygonStart(),m.lineStart=_},polygonEnd:function(){t.polygonEnd(),m.lineStart=y}};function g(r,n){r=e(r,n),t.point(r[0],r[1])}function y(){u=NaN,m.point=v,t.lineStart()}function v(n,i){var a=X([n,i]),o=e(n,i);r(u,h,c,f,p,d,u=o[0],h=o[1],c=n,f=a[0],p=a[1],d=a[2],16,t),t.point(u,h)}function x(){m.point=g,t.lineEnd()}function _(){y(),m.point=b,m.lineEnd=w}function b(e,t){v(n=e,t),i=u,a=h,o=f,s=p,l=d,m.point=v}function w(){r(u,h,c,f,p,d,i,a,n,o,s,l,16,t),m.lineEnd=x,x()}return m}}(e,t):function(e){return qr({point:function(t,r){t=e(t,r),this.stream.point(t[0],t[1])}})}(e)}var Jr=qr({point:function(e,t){this.stream.point(e*p,t*p)}});function Qr(e,t,r,n,i){function a(a,o){return[t+e*(a*=n),r-e*(o*=i)]}return a.invert=function(a,o){return[(a-t)/e*n,(r-o)/e*i]},a}function en(e,t,r,n,i,a){var o=y(a),s=w(a),l=o*e,c=s*e,u=o/e,h=s/e,f=(s*r-o*t)/e,p=(s*t+o*r)/e;function d(e,a){return[l*(e*=n)-c*(a*=i)+t,r-c*e-l*a]}return d.invert=function(e,t){return[n*(u*e-h*t+f),i*(p-h*e-u*t)]},d}function tn(e){return rn((function(){return e}))()}function rn(e){var t,r,n,i,a,o,s,l,c,u,h=150,d=480,m=250,g=0,y=0,v=0,x=0,_=0,b=0,w=1,T=1,A=null,M=yt,S=null,E=Gt,C=.5;function I(e){return l(e[0]*p,e[1]*p)}function L(e){return(e=l.invert(e[0],e[1]))&&[e[0]*f,e[1]*f]}function P(){var e=en(h,0,0,w,T,b).apply(null,t(g,y)),n=(b?en:Qr)(h,d-e[0],m-e[1],w,T,b);return r=Qe(v,x,_),s=Ke(t,n),l=Ke(r,s),o=Kr(s,C),z()}function z(){return c=u=null,I}return I.stream=function(e){return c&&u===e?c:c=Jr(function(e){return qr({point:function(t,r){var n=e(t,r);return this.stream.point(n[0],n[1])}})}(r)(M(o(E(u=e)))))},I.preclip=function(e){return arguments.length?(M=e,A=void 0,z()):M},I.postclip=function(e){return arguments.length?(E=e,S=n=i=a=null,z()):E},I.clipAngle=function(e){return arguments.length?(M=+e?vt(A=e*p):(A=null,yt),z()):A*f},I.clipExtent=function(e){return arguments.length?(E=null==e?(S=n=i=a=null,Gt):bt(S=+e[0][0],n=+e[0][1],i=+e[1][0],a=+e[1][1]),z()):null==S?null:[[S,n],[i,a]]},I.scale=function(e){return arguments.length?(h=+e,P()):h},I.translate=function(e){return arguments.length?(d=+e[0],m=+e[1],P()):[d,m]},I.center=function(e){return arguments.length?(g=e[0]%360*p,y=e[1]%360*p,P()):[g*f,y*f]},I.rotate=function(e){return arguments.length?(v=e[0]%360*p,x=e[1]%360*p,_=e.length>2?e[2]%360*p:0,P()):[v*f,x*f,_*f]},I.angle=function(e){return arguments.length?(b=e%360*p,P()):b*f},I.reflectX=function(e){return arguments.length?(w=e?-1:1,P()):w<0},I.reflectY=function(e){return arguments.length?(T=e?-1:1,P()):T<0},I.precision=function(e){return arguments.length?(o=Kr(s,C=e*e),z()):k(C)},I.fitExtent=function(e,t){return Wr(I,e,t)},I.fitSize=function(e,t){return Zr(I,e,t)},I.fitWidth=function(e,t){return Yr(I,e,t)},I.fitHeight=function(e,t){return Xr(I,e,t)},function(){return t=e.apply(this,arguments),I.invert=t.invert&&L,P()}}function nn(e){var t=0,r=l/3,n=rn(e),i=n(t,r);return i.parallels=function(e){return arguments.length?n(t=e[0]*p,r=e[1]*p):[t*f,r*f]},i}function an(e,t){var r=w(e),n=(r+w(t))/2;if(d(n)0?t<-c+o&&(t=-c+o):t>c-o&&(t=c-o);var r=i/b(dn(t),n);return[r*w(n*e),i-r*y(n*e)]}return a.invert=function(e,t){var r=i-t,a=T(n)*k(e*e+r*r),o=g(e,d(r))*T(r);return r*n<0&&(o-=l*T(e)*T(r)),[o/n,2*m(b(i/a,1/n))-c]},a}function gn(e,t){return[e,t]}function yn(e,t){var r=y(e),n=e===t?w(e):(r-y(t))/(t-e),i=r/n+e;if(d(n)o&&--i>0);return[e/(.8707+(a=n*n)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),n]},Mn.invert=cn(S),Sn.invert=cn((function(e){return 2*m(e)})),En.invert=function(e,t){return[-t,2*m(x(e))-c]},e.geoAlbers=sn,e.geoAlbersUsa=function(){var e,t,r,n,i,a,s=sn(),l=on().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=on().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(e,t){a=[e,t]}};function h(e){var t=e[0],o=e[1];return a=null,r.point(t,o),a||(n.point(t,o),a)||(i.point(t,o),a)}function f(){return e=t=null,h}return h.invert=function(e){var t=s.scale(),r=s.translate(),n=(e[0]-r[0])/t,i=(e[1]-r[1])/t;return(i>=.12&&i<.234&&n>=-.425&&n<-.214?l:i>=.166&&i<.234&&n>=-.214&&n<-.115?c:s).invert(e)},h.stream=function(r){return e&&t===r?e:e=function(e){var t=e.length;return{point:function(r,n){for(var i=-1;++i_e(n[0],n[1])&&(n[1]=i[1]),_e(i[0],n[1])>_e(n[0],n[1])&&(n[0]=i[0])):a.push(n=i);for(o=-1/0,t=0,n=a[r=a.length-1];t<=r;n=i,++t)i=a[t],(s=_e(n[1],i[0]))>o&&(o=s,te=i[0],ne=n[1])}return ce=ue=null,te===1/0||re===1/0?[[NaN,NaN],[NaN,NaN]]:[[te,re],[ne,ie]]},e.geoCentroid=function(e){Te=ke=Ae=Me=Se=Ee=Ce=Ie=Le=Pe=ze=0,O(e,je);var t=Le,r=Pe,n=ze,i=t*t+r*r+n*n;return i2?e[2]+90:90]):[(e=r())[0],e[1],e[2]-90]},r([0,0,90]).scale(159.155)},e.geoTransverseMercatorRaw=En,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof e&&typeof t<"u"?n(e,Sg()):n((r=r||self).d3=r.d3||{},r.d3)}}),Cg=m({"node_modules/d3-geo-projection/dist/d3-geo-projection.js"(e,t){var r,n;r=e,n=function(e,t,r){var n=Math.abs,i=Math.atan,a=Math.atan2,o=Math.cos,s=Math.exp,l=Math.floor,c=Math.log,u=Math.max,h=Math.min,f=Math.pow,p=Math.round,d=Math.sign||function(e){return e>0?1:e<0?-1:0},m=Math.sin,g=Math.tan,y=1e-6,v=1e-12,x=Math.PI,_=x/2,b=x/4,w=Math.SQRT1_2,T=I(2),k=I(x),A=2*x,M=180/x,S=x/180;function E(e){return e>1?_:e<-1?-_:Math.asin(e)}function C(e){return e>1?0:e<-1?x:Math.acos(e)}function I(e){return e>0?Math.sqrt(e):0}function L(e){return(s(e)-s(-e))/2}function P(e){return(s(e)+s(-e))/2}function z(e){var t=g(e/2),r=2*c(o(e/2))/(t*t);function i(e,t){var n=o(e),i=o(t),a=m(t),s=i*n,l=-((1-s?c((1+s)/2)/(1-s):-.5)+r/(1+s));return[l*i*m(e),l*a]}return i.invert=function(t,i){var s,l=I(t*t+i*i),u=-e/2,h=50;if(!l)return[0,0];do{var f=u/2,p=o(f),d=m(f),g=d/p,v=-c(n(p));u-=s=(2/g*v-r*g-l)/(-v/(d*d)+1-r/(2*p*p))*(p<0?.7:1)}while(n(s)>y&&--h>0);var x=m(u);return[a(t*x,l*o(u)),E(i*x/l)]},i}function D(e,t){var r=o(t),n=function(e){return e?e/Math.sin(e):1}(C(r*o(e/=2)));return[2*r*m(e)*n,m(t)*n]}function O(e){var t=m(e),r=o(e),i=e>=0?1:-1,s=g(i*e),l=(1+t-r)/2;function c(e,n){var c=o(n),u=o(e/=2);return[(1+c)*m(e),(i*n>-a(u,s)-.001?0:10*-i)+l+m(n)*r-(1+c)*t*u]}return c.invert=function(e,c){var u=0,h=0,f=50;do{var p=o(u),d=m(u),g=o(h),v=m(h),x=1+g,_=x*d-e,b=l+v*r-x*t*p-c,w=x*p/2,T=-d*v,k=t*x*d/2,A=r*g+t*p*v,M=T*k-A*w,S=(b*T-_*A)/M/2,E=(_*k-b*w)/M;n(E)>2&&(E/=2),u-=S,h-=E}while((n(S)>y||n(E)>y)&&--f>0);return i*h>-a(o(u),s)-.001?[2*u,h]:null},c}function R(e,t){var r=g(t/2),n=I(1-r*r),i=1+n*o(e/=2),a=m(e)*n/i,s=r/i,l=a*a,c=s*s;return[4/3*a*(3+l-3*c),4/3*s*(3+3*l-c)]}D.invert=function(e,t){if(!(e*e+4*t*t>x*x+y)){var r=e,i=t,a=25;do{var s,l=m(r),c=m(r/2),u=o(r/2),h=m(i),f=o(i),p=m(2*i),d=h*h,g=f*f,v=c*c,_=1-g*u*u,b=_?C(f*u)*I(s=1/_):s=0,w=2*b*f*c-e,T=b*h-t,k=s*(g*v+b*f*u*d),A=s*(.5*l*p-2*b*h*c),M=.25*s*(p*c-b*h*g*l),S=s*(d*u+b*v*f),E=A*M-S*k;if(!E)break;var L=(T*A-w*S)/E,P=(w*M-T*k)/E;r-=L,i-=P}while((n(L)>y||n(P)>y)&&--a>0);return[r,i]}},R.invert=function(e,t){if(t*=3/8,!(e*=3/8)&&n(t)>1)return null;var r=1+e*e+t*t,i=I((r-I(r*r-4*t*t))/2),s=E(i)/3,l=i?function(e){return c(e+I(e*e-1))}(n(t/i))/3:function(e){return c(e+I(e*e+1))}(n(e))/3,u=o(s),h=P(l),f=h*h-u*u;return[2*d(e)*a(L(l)*u,.25-f),2*d(t)*a(h*m(s),.25+f)]};var F=I(8),B=c(1+T);function j(e,t){var r=n(t);return r_){var l=a(s[1],s[0]),c=I(s[0]*s[0]+s[1]*s[1]),u=r*p((l-_)/r)+_,h=a(m(l-=u),2-o(l));l=u+E(x/c*m(h))-h,s[0]=c*o(l),s[1]=c*m(l)}return s}return s.invert=function(e,n){var s=I(e*e+n*n);if(s>_){var l=a(n,e),c=r*p((l-_)/r)+_,u=l>c?-1:1,h=s*o(c-l),f=1/g(u*C((h-x)/I(x*(x-2*h)+s*s)));l=c+2*i((f+u*I(f*f-3))/3),e=s*o(l),n=s*m(l)}return t.geoAzimuthalEquidistantRaw.invert(e,n)},s}function U(e,r){if(arguments.length<2&&(r=e),1===r)return t.geoAzimuthalEqualAreaRaw;if(r===1/0)return V;function n(n,i){var a=t.geoAzimuthalEqualAreaRaw(n/r,i);return a[0]*=e,a}return n.invert=function(n,i){var a=t.geoAzimuthalEqualAreaRaw.invert(n/e,i);return a[0]*=r,a},n}function V(e,t){return[e*o(t)/o(t/=2),2*m(t)]}function q(e,t,r){var i,a,o,s=100;r=void 0===r?0:+r,t=+t;do{(a=e(r))===(o=e(r+y))&&(o=a+y),r-=i=-1*y*(a-t)/(a-o)}while(s-- >0&&n(i)>y);return s<0?NaN:r}function H(e,t,r){return void 0===t&&(t=40),void 0===r&&(r=v),function(i,a,o,s){var l,c,u;o=void 0===o?0:+o,s=void 0===s?0:+s;for(var h=0;hl)o-=c/=2,s-=u/=2;else{l=m;var g=(o>0?-1:1)*r,y=(s>0?-1:1)*r,v=e(o+g,s),x=e(o,s+y),_=(v[0]-f[0])/g,b=(v[1]-f[1])/g,w=(x[0]-f[0])/y,T=(x[1]-f[1])/y,k=T*_-b*w,A=(n(k)<.5?.5:1)/k;if(o+=c=(d*w-p*T)*A,s+=u=(p*b-d*_)*A,n(c)0&&(i[1]*=1+a/1.5*i[0]*i[0]),i}return t.invert=H(t),t}function W(e,t){var r,i=e*m(t),a=30;do{t-=r=(t+m(t)-i)/(1+o(t))}while(n(r)>y&&--a>0);return t/2}function Z(e,t,r){function n(n,i){return[e*n*o(i=W(r,i)),t*m(i)]}return n.invert=function(n,i){return i=E(i/t),[n/(e*o(i)),E((2*i+m(2*i))/r)]},n}j.invert=function(e,t){if((a=n(t))v&&--u>0);return[e/(o(l)*(F-1/m(l))),d(t)*l]},V.invert=function(e,t){var r=2*E(t/2);return[e*o(r/2)/o(r),r]};var Y=Z(T/_,T,x),X=2.00276,$=1.11072;function K(e,t){var r=W(x,t);return[X*e/(1/o(t)+$/o(r)),(t+T*m(r))/X]}function J(e){var r=0,n=t.geoProjectionMutator(e),i=n(r);return i.parallel=function(e){return arguments.length?n(r=e*S):r*M},i}function Q(e,t){return[e*o(t),t]}function ee(e){if(!e)return Q;var t=1/g(e);function r(r,n){var i=t+e-n,a=i&&r*o(n)/i;return[i*m(a),t-i*o(a)]}return r.invert=function(r,n){var i=I(r*r+(n=t-n)*n),s=t+e-i;return[i/o(s)*a(r,n),s]},r}function te(e){function t(t,r){var n=_-r,i=n&&t*e*m(n)/n;return[n*m(i)/e,_-n*o(i)]}return t.invert=function(t,r){var n=t*e,i=_-r,o=I(n*n+i*i),s=a(n,i);return[(o?o/m(o):1)*s/e,_-o]},t}K.invert=function(e,t){var r,i,a=X*t,s=t<0?-b:b,l=25;do{i=a-T*m(s),s-=r=(m(2*s)+2*s-x*m(i))/(2*o(2*s)+2+x*o(i)*T*o(s))}while(n(r)>y&&--l>0);return i=a-T*m(s),[e*(1/o(i)+$/o(s))/X,i]},Q.invert=function(e,t){return[e/o(t),t]};var re=Z(1,4/x,x);function ne(e,t,r,i,s,l){var c,u=o(l);if(n(e)>1||n(l)>1)c=C(r*s+t*i*u);else{var h=m(e/2),f=m(l/2);c=2*E(I(h*h+t*i*f*f))}return n(c)>y?[c,a(i*m(l),t*s-r*i*u)]:[0,0]}function ie(e,t,r){return C((e*e+t*t-r*r)/(2*e*t))}function ae(e){return e-2*x*l((e+x)/(2*x))}function oe(e,t,r){for(var n,i=[[e[0],e[1],m(e[1]),o(e[1])],[t[0],t[1],m(t[1]),o(t[1])],[r[0],r[1],m(r[1]),o(r[1])]],a=i[2],s=0;s<3;++s,a=n)n=i[s],a.v=ne(n[1]-a[1],a[3],a[2],n[3],n[2],n[0]-a[0]),a.point=[0,0];var l=ie(i[0].v[0],i[2].v[0],i[1].v[0]),c=ie(i[0].v[0],i[1].v[0],i[2].v[0]),u=x-l;i[2].point[1]=0,i[0].point[0]=-(i[1].point[0]=i[0].v[0]/2);var h=[i[2].point[0]=i[0].point[0]+i[2].v[0]*o(l),2*(i[0].point[1]=i[1].point[1]=i[2].v[0]*m(l))];return function(e,t){var r,n=m(t),a=o(t),s=new Array(3);for(r=0;r<3;++r){var l=i[r];if(s[r]=ne(t-l[1],l[3],l[2],a,n,e-l[0]),!s[r][0])return l.point;s[r][1]=ae(s[r][1]-l.v[1])}var f=h.slice();for(r=0;r<3;++r){var p=2==r?0:r+1,d=ie(i[r].v[0],s[r][0],s[p][0]);s[r][1]<0&&(d=-d),r?1==r?(d=c-d,f[0]-=s[r][0]*o(d),f[1]-=s[r][0]*m(d)):(d=u-d,f[0]+=s[r][0]*o(d),f[1]+=s[r][0]*m(d)):(f[0]+=s[r][0]*o(d),f[1]-=s[r][0]*m(d))}return f[0]/=3,f[1]/=3,f}}function se(e){return e[0]*=S,e[1]*=S,e}function le(e,r,n){var i=t.geoCentroid({type:"MultiPoint",coordinates:[e,r,n]}),a=[-i[0],-i[1]],o=t.geoRotation(a),s=oe(se(o(e)),se(o(r)),se(o(n)));s.invert=H(s);var l=t.geoProjection(s).rotate(a),c=l.center;return delete l.rotate,l.center=function(e){return arguments.length?c(o(e)):o.invert(c())},l.clipAngle(90)}function ce(e,t){var r=I(1-m(t));return[2/k*e*r,k*(1-r)]}function ue(e){var t=g(e);function r(e,r){return[e,(e?e/m(e):1)*(m(r)*o(e)-t*o(r))]}return r.invert=t?function(e,r){e&&(r*=m(e)/e);var n=o(e);return[e,2*a(I(n*n+t*t-r*r)-n,t-r)]}:function(e,t){return[e,E(e?t*g(e)/e:t)]},r}ce.invert=function(e,t){var r=(r=t/k-1)*r;return[r>0?e*I(x/r)/2:0,E(1-r)]};var he=I(3);function fe(e,t){return[he*e*(2*o(2*t/3)-1)/k,he*k*m(t/3)]}function pe(e){var t=o(e);function r(e,r){return[e*t,m(r)/t]}return r.invert=function(e,r){return[e/t,E(r*t)]},r}function de(e){var t=o(e);function r(e,r){return[e*t,(1+t)*g(r/2)]}return r.invert=function(e,r){return[e/t,2*i(r/(1+t))]},r}function me(e,t){var r=I(8/(3*x));return[r*e*(1-n(t)/x),r*t]}function ge(e,t){var r=I(4-3*m(n(t)));return[2/I(6*x)*e*r,d(t)*I(2*x/3)*(2-r)]}function ye(e,t){var r=I(x*(4+x));return[2/r*e*(1+I(1-4*t*t/(x*x))),4/r*t]}function ve(e,t){var r=(2+_)*m(t);t/=2;for(var i=0,a=1/0;i<10&&n(a)>y;i++){var s=o(t);t-=a=(t+m(t)*(s+2)-r)/(2*s*(1+s))}return[2/I(x*(4+x))*e*(1+o(t)),2*I(x/(4+x))*m(t)]}function xe(e,t){return[e*(1+o(t))/I(2+x),2*t/I(2+x)]}function _e(e,t){for(var r=(1+_)*m(t),i=0,a=1/0;i<10&&n(a)>y;i++)t-=a=(t+m(t)-r)/(1+o(t));return r=I(2+x),[e*(1+o(t))/r,2*t/r]}fe.invert=function(e,t){var r=3*E(t/(he*k));return[k*e/(he*(2*o(2*r/3)-1)),r]},me.invert=function(e,t){var r=I(8/(3*x)),i=t/r;return[e/(r*(1-n(i)/x)),i]},ge.invert=function(e,t){var r=2-n(t)/I(2*x/3);return[e*I(6*x)/(2*r),d(t)*E((4-r*r)/3)]},ye.invert=function(e,t){var r=I(x*(4+x))/2;return[e*r/(1+I(1-t*t*(4+x)/(4*x))),t*r/2]},ve.invert=function(e,t){var r=t*I((4+x)/x)/2,n=E(r),i=o(n);return[e/(2/I(x*(4+x))*(1+i)),E((n+r*(i+2))/(2+_))]},xe.invert=function(e,t){var r=I(2+x),n=t*r/2;return[r*e/(1+o(n)),n]},_e.invert=function(e,t){var r=1+_,n=I(r/2);return[2*e*n/(1+o(t*=n)),E((t+m(t))/r)]};var be=3+2*T;function we(e,t){var r=m(e/=2),n=o(e),a=I(o(t)),s=o(t/=2),l=m(t)/(s+T*n*a),u=I(2/(1+l*l)),h=I((T*s+(n+r)*a)/(T*s+(n-r)*a));return[be*(u*(h-1/h)-2*c(h)),be*(u*l*(h+1/h)-2*i(l))]}we.invert=function(e,t){if(!(r=R.invert(e/1.2,1.065*t)))return null;var r,a=r[0],s=r[1],l=20;e/=be,t/=be;do{var f=a/2,p=s/2,d=m(f),g=o(f),v=m(p),x=o(p),b=o(s),k=I(b),A=v/(x+T*g*k),M=A*A,S=I(2/(1+M)),E=(T*x+(g+d)*k)/(T*x+(g-d)*k),C=I(E),L=C-1/C,P=C+1/C,z=S*L-2*c(C)-e,D=S*A*P-2*i(A)-t,O=v&&w*k*d*M/v,F=(T*g*x+k)/(2*(x+T*g*k)*(x+T*g*k)*k),B=-.5*A*S*S*S,j=B*O,N=B*F,U=(U=2*x+T*k*(g-d))*U*C,V=(T*g*x*k+b)/U,q=-T*d*v/(k*U),H=L*j-2*V/C+S*(V+V/E),G=L*N-2*q/C+S*(q+q/E),W=A*P*j-2*O/(1+M)+S*P*O+S*A*(V-V/E),Z=A*P*N-2*F/(1+M)+S*P*F+S*A*(q-q/E),Y=G*W-Z*H;if(!Y)break;var X=(D*G-z*Z)/Y,$=(z*W-D*H)/Y;a-=X,s=u(-_,h(_,s-$))}while((n(X)>y||n($)>y)&&--l>0);return n(n(s)-_)s){var d=I(f),g=a(h,u),v=i*p(g/i),b=g-v,w=e*o(b),T=(e*m(b)-b*m(w))/(_-w),k=Ie(b,T),A=(x-e)/Le(k,w,x);u=d;var M,S=50;do{u-=M=(e+Le(k,w,u)*A-d)/(k(u)*A)}while(n(M)>y&&--S>0);h=b*m(u),u<_&&(h-=T*(u-_));var E=m(v),C=o(v);c[0]=u*C-h*E,c[1]=u*E+h*C}return c}return l.invert=function(r,l){var c=r*r+l*l;if(c>s){var u=I(c),h=a(l,r),f=i*p(h/i),d=h-f;r=u*o(d),l=u*m(d);for(var g=r-_,y=m(r),b=l/y,w=r<_?1/0:0,T=10;;){var k=e*m(b),A=e*o(b),M=m(A),S=_-A,E=(k-b*M)/S,C=Ie(b,E);if(n(w)y||n(p)>y)&&--v>0);return[d,g]},u}ke.invert=function(e,t){var r=t/(1+Te);return[e&&e/(Te*I(1-r*r)),2*i(r)]},Ae.invert=function(e,t){var r=i(t/k),n=o(r),a=2*r;return[e*k/2/(o(a)*n*n),a]};var ze=Pe(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555),De=Pe(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742),Oe=Pe(5/6*x,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Re(e,t){var r=e*e,n=t*t;return[e*(1-.162388*n)*(.87-952426e-9*r*r),t*(1+n/12)]}Re.invert=function(e,t){var r,i=e,a=t,o=50;do{var s=a*a;a-=r=(a*(1+s/12)-t)/(1+s/4)}while(n(r)>y&&--o>0);o=50,e/=1-.162388*s;do{var l=(l=i*i)*l;i-=r=(i*(.87-952426e-9*l)-e)/(.87-.00476213*l)}while(n(r)>y&&--o>0);return[i,a]};var Fe=Pe(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Be(e){var t=e(_,0)[0]-e(-_,0)[0];function r(r,n){var i=r>0?-.5:.5,a=e(r+i*x,n);return a[0]-=i*t,a}return e.invert&&(r.invert=function(r,n){var i=r>0?-.5:.5,a=e.invert(r+i*t,n),o=a[0]-i*x;return o<-x?o+=2*x:o>x&&(o-=2*x),a[0]=o,a}),r}function je(e,t){var r=d(e),i=d(t),s=o(t),l=o(e)*s,c=m(e)*s,u=m(i*t);e=n(a(c,u)),t=E(l),n(e-_)>y&&(e%=_);var h=function(e,t){if(t===_)return[0,0];var r,i,a=m(t),s=a*a,l=s*s,c=1+l,u=1+3*l,h=1-l,f=E(1/I(c)),p=h+s*c*f,d=(1-a)/p,g=I(d),v=d*c,b=I(v),w=g*h;if(0===e)return[0,-(w+s*b)];var T,k=o(t),A=1/k,M=2*a*k,S=(-p*k-(1-a)*((-3*s+f*u)*M))/(p*p),C=-A*M,L=-A*(s*c*S+d*u*M),P=-2*A*(h*(.5*S/g)-2*s*g*M),z=4*e/x;if(e>.222*x||t.175*x){if(r=(w+s*I(v*(1+l)-w*w))/(1+l),e>x/4)return[r,r];var D=r,O=.5*r;r=.5*(O+D),i=50;do{var R=r*(P+C*I(v-r*r))+L*E(r/b)-z;if(!R)break;R<0?O=r:D=r,r=.5*(O+D)}while(n(D-O)>y&&--i>0)}else{r=y,i=25;do{var F=r*r,B=I(v-F),j=P+C*B,N=r*j+L*E(r/b)-z;r-=T=B?N/(j+(L-C*F)/B):0}while(n(T)>y&&--i>0)}return[r,-w-s*I(v-r*r)]}(e>x/4?_-e:e,t);return e>x/4&&(u=h[0],h[0]=-h[1],h[1]=-u),h[0]*=r,h[1]*=-i,h}function Ne(e,t){var r,a,l,c,u;if(t=1-y)return r=(1-t)/4,a=P(e),c=function(e){return((e=s(2*e))-1)/(e+1)}(e),l=1/a,[c+r*((u=a*L(e))-e)/(a*a),l-r*c*l*(u-e),l+r*c*l*(u+e),2*i(s(e))-_+r*(u-e)/a];var h=[1,0,0,0,0,0,0,0,0],f=[I(t),0,0,0,0,0,0,0,0],p=0;for(a=I(1-t),u=1;n(f[p]/h[p])>y&&p<8;)r=h[p++],f[p]=(r-a)/2,h[p]=(r+a)/2,a=I(r*a),u*=2;l=u*h[p]*e;do{l=(E(c=f[p]*m(a=l)/h[p])+l)/2}while(--p);return[m(l),c=o(l),c/o(l-a),l]}function Ue(e,t){if(!t)return e;if(1===t)return c(g(e/2+b));for(var r=1,a=I(1-t),o=I(t),s=0;n(o)>y;s++){if(e%x){var l=i(a*g(e)/r);l<0&&(l+=x),e+=l+~~(e/x)*x}else e+=e;o=(r+a)/2,a=I(r*a),o=((r=o)-a)/2}return e/(f(2,s)*r)}function Ve(e,t){var r=(T-1)/(T+1),l=I(1-r*r),u=Ue(_,l*l),h=c(g(x/4+n(t)/2)),f=s(-1*h)/I(r),p=function(e,t){var r=e*e,n=t+1,i=1-r-t*t;return[.5*((e>=0?_:-_)-a(i,2*e)),-.25*c(i*i+4*r)+.5*c(n*n+r)]}(f*o(-1*e),f*m(-1*e)),y=function(e,t,r){var a=n(e),o=L(n(t));if(a){var s=1/m(a),l=1/(g(a)*g(a)),c=-(l+r*(o*o*s*s)-1+r),u=(-c+I(c*c-(r-1)*l*4))/2;return[Ue(i(1/I(u)),r)*d(e),Ue(i(I((u/l-1)/r)),1-r)*d(t)]}return[0,Ue(i(o),1-r)*d(t)]}(p[0],p[1],l*l);return[-y[1],(t>=0?1:-1)*(.5*u-y[0])]}function qe(e){var t=m(e),r=o(e),i=He(e);function s(e,a){var s=i(e,a);e=s[0],a=s[1];var l=m(a),c=o(a),u=o(e),h=C(t*l+r*c*u),f=m(h),p=n(f)>y?h/f:1;return[p*r*m(e),(n(e)>_?p:-p)*(t*c-r*l*u)]}return i.invert=He(-e),s.invert=function(e,r){var n=I(e*e+r*r),s=-m(n),l=o(n),c=n*l,u=-r*s,h=n*t,f=I(c*c+u*u-h*h),p=a(c*h+u*f,u*h-c*f),d=(n>_?-1:1)*a(e*s,n*o(p)*l+r*m(p)*s);return i.invert(d,p)},s}function He(e){var t=m(e),r=o(e);return function(e,n){var i=o(n),s=o(e)*i,l=m(e)*i,c=m(n);return[a(l,s*r-c*t),E(c*r+s*t)]}}je.invert=function(e,t){n(e)>1&&(e=2*d(e)-e),n(t)>1&&(t=2*d(t)-t);var r=d(e),i=d(t),s=-r*e,l=-i*t,c=l/s<1,u=function(e,t){for(var r=0,i=1,a=.5,s=50;;){var l=a*a,c=I(a),u=E(1/I(1+l)),h=1-l+a*(1+l)*u,f=(1-c)/h,p=I(f),d=f*(1+l),m=p*(1-l),g=I(d-e*e),y=t+m+a*g;if(n(i-r)0?r=a:i=a,a=.5*(r+i)}if(!s)return null;var _=E(c),b=o(_),w=1/b,T=2*c*b,k=(-h*b-(1-c)*((-3*a+u*(1+3*l))*T))/(h*h);return[x/4*(e*(-2*w*(.5*k/p*(1-l)-2*a*p*T)+-w*T*g)+-w*(a*(1+l)*k+f*(1+3*l)*T)*E(e/I(d))),_]}(c?l:s,c?s:l),h=u[0],f=u[1],p=o(f);return c&&(h=-_-h),[r*(a(m(h)*p,-m(f))+x),i*E(o(h)*p)]},Ve.invert=function(e,t){var r=(T-1)/(T+1),n=I(1-r*r),o=function(e,t,r){var n,i,a;return e?(n=Ne(e,r),t?(a=(i=Ne(t,1-r))[1]*i[1]+r*n[0]*n[0]*i[0]*i[0],[[n[0]*i[2]/a,n[1]*n[2]*i[0]*i[1]/a],[n[1]*i[1]/a,-n[0]*n[2]*i[0]*i[2]/a],[n[2]*i[1]*i[2]/a,-r*n[0]*n[1]*i[0]/a]]):[[n[0],0],[n[1],0],[n[2],0]]):[[0,(i=Ne(t,1-r))[0]/i[1]],[1/i[1],0],[i[2]/i[1],0]]}(.5*Ue(_,n*n)-t,-e,n*n),l=function(e,t){var r=t[0]*t[0]+t[1]*t[1];return[(e[0]*t[0]+e[1]*t[1])/r,(e[1]*t[0]-e[0]*t[1])/r]}(o[0],o[1]);return[a(l[1],l[0])/-1,2*i(s(-.5*c(r*l[0]*l[0]+r*l[1]*l[1])))-_]};var Ge=E(1-1/3)*M,We=pe(0);function Ze(e){var t=Ge*S,r=ce(x,t)[0]-ce(-x,t)[0],i=We(0,t)[1],a=ce(0,t)[1],o=k-a,s=A/e,c=4/A,f=i+o*o*4/A;function p(p,d){var m,g=n(d);if(g>t){var y=h(e-1,u(0,l((p+x)/s)));(m=ce(p+=x*(e-1)/e-y*s,g))[0]=m[0]*A/r-A*(e-1)/(2*e)+y*A/e,m[1]=i+4*(m[1]-a)*o/A,d<0&&(m[1]=-m[1])}else m=We(p,d);return m[0]*=c,m[1]/=f,m}return p.invert=function(t,p){t/=c;var d=n(p*=f);if(d>i){var m=h(e-1,u(0,l((t+x)/s)));t=(t+x*(e-1)/e-m*s)*r/A;var g=ce.invert(t,.25*(d-i)*A/o+a);return g[0]-=x*(e-1)/e-m*s,p<0&&(g[1]=-g[1]),g}return We.invert(t,p)},p}function Ye(e,t){return[e,1&t?90-y:Ge]}function Xe(e,t){return[e,1&t?-90+y:-Ge]}function $e(e){return[e[0]*(1-y),e[1]]}function Ke(e){var t,r=1+e,i=E(m(1/r)),s=2*I(x/(t=x+4*i*r)),l=.5*s*(r+I(e*(2+e))),c=e*e,u=r*r;function h(h,f){var p,d,g=1-m(f);if(g&&g<2){var y,b=_-f,w=25;do{var T=m(b),k=o(b),A=i+a(T,r-k),M=1+u-2*r*k;b-=y=(b-c*i-r*T+M*A-.5*g*t)/(2*r*T*A)}while(n(y)>v&&--w>0);p=s*I(M),d=h*A/x}else p=s*(e+g),d=h*i/x;return[p*m(d),l-p*o(d)]}return h.invert=function(e,n){var o=e*e+(n-=l)*n,h=(1+u-o/(s*s))/(2*r),f=C(h),p=m(f),d=i+a(p,r-h);return[E(e/I(o))*x/d,E(1-2*(f-c*i-r*p+(1+u-2*r*h)*d)/t)]},h}var Je=.7109889596207567,Qe=.0528035274542;function et(e,t){return t>-Je?((e=Y(e,t))[1]+=Qe,e):Q(e,t)}function tt(e,t){return n(t)>Je?((e=Y(e,t))[1]-=t>0?Qe:-Qe,e):Q(e,t)}function rt(e,t,r,n){var i=I(4*x/(2*r+(1+e-t/2)*m(2*r)+(e+t)/2*m(4*r)+t/2*m(6*r))),a=I(n*m(r)*I((1+e*o(2*r)+t*o(4*r))/(1+e+t))),s=r*c(1);function l(r){return I(1+e*o(2*r)+t*o(4*r))}function c(n){var i=n*r;return(2*i+(1+e-t/2)*m(2*i)+(e+t)/2*m(4*i)+t/2*m(6*i))/r}function u(e){return l(e)*m(e)}var h=function(e,t){var n=r*q(c,s*m(t)/r,t/x);isNaN(n)&&(n=r*d(t));var u=i*l(n);return[u*a*e/x*o(n),u/a*m(n)]};return h.invert=function(e,t){var n=q(u,t*a/i);return[e*x/(o(n)*i*a*l(n)),E(r*c(n/r)/s)]},0===r&&(i=I(n/x),(h=function(e,t){return[e*i,m(t)/i]}).invert=function(e,t){return[e/i,E(t*i)]}),h}function nt(e,t,r,n,i,a,o,s,l,c,u){if(u.nanEncountered)return NaN;var h,f,p,d,m,g,y,v,x,_;if(f=e(t+.25*(h=r-t)),p=e(r-.25*h),isNaN(f))u.nanEncountered=!0;else{if(!isNaN(p))return _=((g=(d=h*(n+4*f+i)/12)+(m=h*(i+4*p+a)/12))-o)/15,c>l?(u.maxDepthCount++,g+_):Math.abs(_)e?r=n:t=n,n=t+r>>1}while(n>t);var i=c[n+1]-c[n];return i&&(i=(e-c[n+1])/i),(n+1+i)/s}var p=2*h(1)/x*o/r,g=function(e,t){var r=h(n(m(t))),a=i(r)*e;return r/=p,[a,t>=0?r:-r]};return g.invert=function(e,t){var r;return n(t*=p)<1&&(r=d(t)*E(a(n(t))*o)),[e/i(n(t)),r]},g}function ot(e,t){return n(e[0]-t[0])a[o][2][0];++o);var l=e(t-a[o][1][0],r);return l[0]+=e(a[o][1][0],i*r>i*a[o][0][1]?a[o][0][1]:r)[0],l}i?s.invert=i(s):e.invert&&(s.invert=function(t,r){for(var i=o[+(r<0)],a=n[+(r<0)],l=0,c=i.length;l=0;--l)n=(t=e[1][l])[0][0],i=t[0][1],a=t[1][1],o=t[2][0],s=t[2][1],c.push(st([[o-y,s-y],[o-y,a+y],[n+y,a+y],[n+y,i-y]],30));return{type:"Polygon",coordinates:[r.merge(c)]}}(t),n=t.map((function(e){return e.map((function(e){return[[e[0][0]*S,e[0][1]*S],[e[1][0]*S,e[1][1]*S],[e[2][0]*S,e[2][1]*S]]}))})),o=n.map((function(t){return t.map((function(t){var r,n=e(t[0][0],t[0][1])[0],i=e(t[2][0],t[2][1])[0],a=e(t[1][0],t[0][1])[1],o=e(t[1][0],t[1][1])[1];return a>o&&(r=a,a=o,o=r),[[n,a],[i,o]]}))})),l):n.map((function(e){return e.map((function(e){return[[e[0][0]*M,e[0][1]*M],[e[1][0]*M,e[1][1]*M],[e[2][0]*M,e[2][1]*M]]}))}))},null!=n&&l.lobes(n),l}et.invert=function(e,t){return t>-Je?Y.invert(e,t-Qe):Q.invert(e,t)},tt.invert=function(e,t){return n(t)>Je?Y.invert(e,t+(t>0?Qe:-Qe)):Q.invert(e,t)};var ct=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]],ut=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]],ht=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]],ft=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]],pt=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]],dt=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function mt(e,t){return[3/A*e*I(x*x/3-t*t),t]}function gt(e){function t(t,r){if(n(n(r)-_)2)return null;var o=(t/=2)*t,s=(r/=2)*r,l=2*r/(1+o+s);return l=f((1+l)/(1-l),1/e),[a(2*t,1-o-s)/e,E((l-1)/(l+1))]},t}mt.invert=function(e,t){return[A/3*e/I(x*x/3-t*t),t]};var yt=x/T;function vt(e,t){return[e*(1+I(o(t)))/2,t/(o(t/2)*o(e/6))]}function xt(e,t){var r=e*e,n=t*t;return[e*(.975534+n*(-.0143059*r-.119161+-.0547009*n)),t*(1.00384+r*(.0802894+-.02855*n+199025e-9*r)+n*(.0998909+-.0491032*n))]}function _t(e,t){return[m(e)/o(t),g(t)*o(e)]}function bt(e){var t=o(e),r=g(b+e/2);function i(i,a){var o=a-e,s=n(o)=0;)f=(h=e[u])[0]+l*(i=f)-c*p,p=h[1]+l*p+c*i;return[f=l*(i=f)-c*p,p=l*p+c*i]}return r.invert=function(r,s){var l=20,c=r,u=s;do{for(var h,f=t,p=e[f],d=p[0],g=p[1],v=0,x=0;--f>=0;)v=d+c*(h=v)-u*x,x=g+c*x+u*h,d=(p=e[f])[0]+c*(h=d)-u*g,g=p[1]+c*g+u*h;var _,b,w=(v=d+c*(h=v)-u*x)*v+(x=g+c*x+u*h)*x;c-=_=((d=c*(h=d)-u*g-r)*v+(g=c*g+u*h-s)*x)/w,u-=b=(g*v-d*x)/w}while(n(_)+n(b)>y*y&&--l>0);if(l){var T=I(c*c+u*u),k=2*i(.5*T),A=m(k);return[a(c*A,T*o(k)),T?E(u*A/T):0]}},r}vt.invert=function(e,t){var r=n(e),i=n(t),a=y,s=_;iy||n(_)>y)&&--a>0);return a&&[r,i]},_t.invert=function(e,t){var r=e*e,n=t*t+1,i=r+n,a=e?w*I((i-I(i*i-4*r))/r):1/I(n);return[E(e*a),d(t)*C(a)]},wt.invert=function(e,t){return[e,2.5*i(s(.8*t))-.625*x]};var kt=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],At=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Mt=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],St=[[.9245,0],[0,0],[.01943,0]],Et=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Ct(e,r){var n=t.geoProjection(Tt(e)).rotate(r).clipAngle(90),i=t.geoRotation(r),a=n.center;return delete n.rotate,n.center=function(e){return arguments.length?a(i(e)):i.invert(a())},n}var It=I(6),Lt=I(7);function Pt(e,t){var r=E(7*m(t)/(3*It));return[It*e*(2*o(2*r/3)-1)/Lt,9*m(r/3)/Lt]}function zt(e,t){for(var r,i=(1+w)*m(t),a=t,s=0;s<25&&(a-=r=(m(a/2)+m(a)-i)/(.5*o(a/2)+o(a)),!(n(r)v&&--l>0);return[e/(.84719-.13063*(i=s*s)+(o=i*(a=i*i))*o*(.05494*i-.04515-.02326*a+.00331*o)),s]},Rt.invert=function(e,t){for(var r=t/2,i=0,a=1/0;i<10&&n(a)>y;++i){var s=o(t/2);t-=a=(t-g(t/2)-r)/(1-.5/(s*s))}return[2*e/(1+o(t)),t]};var Ft=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function Bt(e,t){var r=m(t),i=o(t),a=d(e);if(0===e||n(t)===_)return[0,t];if(0===t)return[e,0];if(n(e)===_)return[e*i,_*r];var s=x/(2*e)-2*e/x,l=2*t/x,c=(1-l*l)/(r-l),u=s*s,h=c*c,f=1+u/h,p=1+h/u,g=(s*r/c-s/2)/f,y=(h*r/u+c/2)/p,v=y*y-(h*r*r/u+c*r-1)/p;return[_*(g+I(g*g+i*i/f)*a),_*(y+I(v<0?0:v)*d(-t*s)*a)]}Bt.invert=function(e,t){var r=(e/=_)*e,n=r+(t/=_)*t,i=x*x;return[e?(n-1+I((1-n)*(1-n)+4*r))/(2*e)*_:0,q((function(e){return n*(x*m(e)-2*e)*x+4*e*e*(t-m(e))+2*x*e-i*t}),0)]};var jt=1.0148,Nt=.23185,Ut=-.14499,Vt=.02406,qt=jt,Ht=5*Nt,Gt=7*Ut,Wt=1.790857183;function Zt(e,t){var r=t*t;return[e,t*(jt+r*r*(Nt+r*(Ut+Vt*r)))]}function Yt(e,t){if(n(t)=0;)if(n=t[s],r[0]===n[0]&&r[1]===n[1]){if(a)return[a,r];a=r}}}(t.face,r.face),i=function(e,t){var r=$t(e[1],e[0]),n=$t(t[1],t[0]),i=function(e,t){return a(e[0]*t[1]-e[1]*t[0],e[0]*t[0]+e[1]*t[1])}(r,n),s=Kt(r)/Kt(n);return Xt([1,0,e[0][0],0,1,e[0][1]],Xt([s,0,0,0,s,0],Xt([o(i),m(i),0,-m(i),o(i),0],[1,0,-t[0][0],0,1,-t[0][1]])))}(n.map(r.project),n.map(t.project));t.transform=r.transform?Xt(r.transform,i):i;for(var s=r.edges,l=0,c=s.length;lWt?t=Wt:t<-Wt&&(t=-Wt);var r,i=t;do{var a=i*i;i-=r=(i*(jt+a*a*(Nt+a*(Ut+Vt*a)))-t)/(qt+a*a*(Ht+a*(Gt+.21654*a)))}while(n(r)>y);return[e,i]},Yt.invert=function(e,t){if(n(t)y&&--s>0);return l=g(a),[(n(t)n^p>n&&r<(f-c)*(n-u)/(p-u)+c&&(i=!i)}return i}(e[0],r))return e.push(t),!0}))||e.push([t])})),mr=[],e.length?e.length>1?{type:"MultiPolygon",coordinates:e}:{type:"Polygon",coordinates:e[0]}:null}};function xr(e){var r=e(_,0)[0]-e(-_,0)[0];function i(t,i){var a=n(t)<_,o=e(a?t:t>0?t-x:t+x,i),s=(o[0]-o[1])*w,l=(o[0]+o[1])*w;if(a)return[s,l];var c=r*w,u=s>0^l>0?-1:1;return[u*s-d(l)*c,u*l-d(s)*c]}return e.invert&&(i.invert=function(t,i){var a=(t+i)*w,o=(i-t)*w,s=n(a)<.5*r&&n(o)<.5*r;if(!s){var l=r*w,c=a>0^o>0?-1:1,u=-c*t+(o>0?1:-1)*l,h=-c*i+(a>0?1:-1)*l;a=(-u-h)*w,o=(u-h)*w}var f=e.invert(a,o);return s||(f[0]+=a>0?x:-x),f}),t.geoProjection(i).rotate([-90,-90,45]).clipAngle(179.999)}function _r(){return xr(Ve).scale(111.48)}function br(e){var t=m(e);function r(r,n){var a=t?g(r*t/2)/t:r/2;if(!n)return[2*a,-e];var s=2*i(a*m(n)),l=1/g(n);return[m(s)*l,n+(1-o(s))*l-e]}return r.invert=function(r,a){if(n(a+=e)y&&--u>0);var d=r*(h=g(c)),v=g(n(a)0?_:-_)*(f+o*(d-c)/2+o*o*(d-2*f+c)/2)]}function kr(e,t){var r=function(e){function t(t,r){var n=o(r),i=(e-1)/(e-n*o(t));return[i*n*m(t),i*m(r)]}return t.invert=function(t,r){var n=t*t+r*r,i=I(n),o=(e-I(1-n*(e+1)/(e-1)))/((e-1)/i+i/(e-1));return[a(t*o,i*I(1-o*o)),i?E(r*o/i):0]},t}(e);if(!t)return r;var n=o(t),i=m(t);function s(t,a){var o=r(t,a),s=o[1],l=s*i/(e-1)+n;return[o[0]*n/l,s/l]}return s.invert=function(t,a){var o=(e-1)/(e-1-a*i);return r.invert(o*t,o*a*n)},s}wr.forEach((function(e){e[1]*=1.0144})),Tr.invert=function(e,t){var r=t/_,i=90*r,a=h(18,n(i/5)),o=u(0,l(a));do{var s=wr[o][1],c=wr[o+1][1],f=wr[h(19,o+2)][1],p=f-s,d=f-2*c+s,m=2*(n(r)-c)/p,g=d/p,y=m*(1-g*m*(1-2*g*m));if(y>=0||1===o){i=(t>=0?5:-5)*(y+a);var x,b=50;do{y=(a=h(18,n(i)/5))-(o=l(a)),s=wr[o][1],c=wr[o+1][1],f=wr[h(19,o+2)][1],i-=(x=(t>=0?_:-_)*(c+y*(f-s)/2+y*y*(f-2*c+s)/2)-t)*M}while(n(x)>v&&--b>0);break}}while(--o>=0);var w=wr[o][0],T=wr[o+1][0],k=wr[h(19,o+2)][0];return[e/(T+y*(k-w)/2+y*y*(k-2*T+w)/2),i*S]};var Ar=1e-4,Mr=-180,Sr=Mr+Ar,Er=180-Ar,Cr=-90+Ar,Ir=90-Ar;function Lr(e){return e.length>0}function Pr(e){return Math.floor(1e4*e)/1e4}function zr(e){return-90===e||90===e?[0,e]:[Mr,Pr(e)]}function Dr(e){var t=e[0],r=e[1],n=!1;return t<=Sr?(t=Mr,n=!0):t>=Er&&(t=180,n=!0),r<=Cr?(r=-90,n=!0):r>=Ir&&(r=90,n=!0),n?[t,r]:e}function Or(e){return e.map(Dr)}function Rr(e,t,r){for(var n=0,i=e.length;n=Er||u<=Cr||u>=Ir){a[o]=Dr(l);for(var h=o+1;hSr&&pCr&&d=s)break;r.push({index:-1,polygon:t,ring:a=a.slice(h-1)}),a[0]=zr(a[0][1]),o=-1,s=a.length}}}}function Fr(e){var t,r,n,i,a,o,s=e.length,l={},c={};for(t=0;t0?x-l:l)*M],u=t.geoProjection(e(s)).rotate(c),h=t.geoRotation(c),f=u.center;return delete u.rotate,u.center=function(e){return arguments.length?f(h(e)):h.invert(f())},u.clipAngle(90)}function Vr(e){var r=o(e);function n(e,n){var i=t.geoGnomonicRaw(e,n);return i[0]*=r,i}return n.invert=function(e,n){return t.geoGnomonicRaw.invert(e/r,n)},n}function qr(e,t){return Ur(Vr,e,t)}function Hr(e){if(!(e*=2))return t.geoAzimuthalEquidistantRaw;var r=-e/2,n=-r,i=e*e,s=g(n),l=.5/m(n);function c(t,a){var s=C(o(a)*o(t-r)),l=C(o(a)*o(t-n));return[((s*=s)-(l*=l))/(2*e),(a<0?-1:1)*I(4*i*l-(i-s+l)*(i-s+l))/(2*e)]}return c.invert=function(e,t){var i,c,u=t*t,h=o(I(u+(i=e+r)*i)),f=o(I(u+(i=e+n)*i));return[a(c=h-f,i=(h+f)*s),(t<0?-1:1)*C(I(i*i+c*c)*l)]},c}function Gr(e,t){return Ur(Hr,e,t)}function Wr(e,t){if(n(t)y&&--l>0);return[d(e)*(I(a*a+4)+a)*x/4,_*s]};var Jr=4*x+3*I(3),Qr=2*I(2*x*I(3)/Jr),en=Z(Qr*I(3)/x,Qr,Jr/6);function tn(e,t){return[e*I(1-3*t*t/(x*x)),t]}function rn(e,t){var r=o(t),n=o(e)*r,i=1-n,s=o(e=a(m(e)*r,-m(t))),l=m(e);return[l*(r=I(1-n*n))-s*i,-s*r-l*i]}function nn(e,t){var r=D(e,t);return[(r[0]+e/_)/2,(r[1]+t)/2]}tn.invert=function(e,t){return[e/I(1-3*t*t/(x*x)),t]},rn.invert=function(e,t){var r=(e*e+t*t)/-2,n=I(-r*(2+r)),i=t*r+e*n,o=e*r-t*n,s=I(o*o+i*i);return[a(n*i,s*(1+r)),s?-E(n*o/s):0]},nn.invert=function(e,t){var r=e,i=t,a=25;do{var s,l=o(i),c=m(i),u=m(2*i),h=c*c,f=l*l,p=m(r),d=o(r/2),g=m(r/2),v=g*g,x=1-f*d*d,b=x?C(l*d)*I(s=1/x):s=0,w=.5*(2*b*l*g+r/_)-e,T=.5*(b*c+i)-t,k=.5*s*(f*v+b*l*d*h)+.5/_,A=s*(p*u/4-b*c*g),M=.125*s*(u*g-b*c*f*p),S=.5*s*(h*d+b*v*l)+.5,E=A*M-S*k,L=(T*A-w*S)/E,P=(w*M-T*k)/E;r-=L,i-=P}while((n(L)>y||n(P)>y)&&--a>0);return[r,i]},e.geoNaturalEarth=t.geoNaturalEarth1,e.geoNaturalEarthRaw=t.geoNaturalEarth1Raw,e.geoAiry=function(){var e=_,r=t.geoProjectionMutator(z),n=r(e);return n.radius=function(t){return arguments.length?r(e=t*S):e*M},n.scale(179.976).clipAngle(147)},e.geoAiryRaw=z,e.geoAitoff=function(){return t.geoProjection(D).scale(152.63)},e.geoAitoffRaw=D,e.geoArmadillo=function(){var e=20*S,r=e>=0?1:-1,n=g(r*e),i=t.geoProjectionMutator(O),s=i(e),l=s.stream;return s.parallel=function(t){return arguments.length?(n=g((r=(e=t*S)>=0?1:-1)*e),i(e)):e*M},s.stream=function(t){var i=s.rotate(),c=l(t),u=(s.rotate([0,0]),l(t)),h=s.precision();return s.rotate(i),c.sphere=function(){u.polygonStart(),u.lineStart();for(var t=-180*r;r*t<180;t+=90*r)u.point(t,90*r);if(e)for(;r*(t-=3*r*h)>=-180;)u.point(t,r*-a(o(t*S/2),n)*M);u.lineEnd(),u.polygonEnd()},c},s.scale(218.695).center([0,28.0974])},e.geoArmadilloRaw=O,e.geoAugust=function(){return t.geoProjection(R).scale(66.1603)},e.geoAugustRaw=R,e.geoBaker=function(){return t.geoProjection(j).scale(112.314)},e.geoBakerRaw=j,e.geoBerghaus=function(){var e=5,r=t.geoProjectionMutator(N),n=r(e),i=n.stream,s=.01,l=-o(s*S),c=m(s*S);return n.lobes=function(t){return arguments.length?r(e=+t):e},n.stream=function(t){var r=n.rotate(),u=i(t),h=(n.rotate([0,0]),i(t));return n.rotate(r),u.sphere=function(){h.polygonStart(),h.lineStart();for(var t=0,r=360/e,n=2*x/e,i=90-180/e,u=_;t=0;)e.point((t=r[i])[0],t[1]);e.lineEnd(),e.polygonEnd()},e},n.scale(79.4187).parallel(45).clipAngle(179.999)},e.geoHammerRetroazimuthalRaw=qe,e.geoHealpix=function(){var e=4,n=t.geoProjectionMutator(Ze),i=n(e),a=i.stream;return i.lobes=function(t){return arguments.length?n(e=+t):e},i.stream=function(n){var o=i.rotate(),s=a(n),l=(i.rotate([0,0]),a(n));return i.rotate(o),s.sphere=function(){t.geoStream(function(e){var t=[].concat(r.range(-180,180+e/2,e).map(Ye),r.range(180,-180-e/2,-e).map(Xe));return{type:"Polygon",coordinates:[180===e?t.map($e):t]}}(180/e),l)},s},i.scale(239.75)},e.geoHealpixRaw=Ze,e.geoHill=function(){var e=1,r=t.geoProjectionMutator(Ke),n=r(e);return n.ratio=function(t){return arguments.length?r(e=+t):e},n.scale(167.774).center([0,18.67])},e.geoHillRaw=Ke,e.geoHomolosine=function(){return t.geoProjection(tt).scale(152.63)},e.geoHomolosineRaw=tt,e.geoHufnagel=function(){var e=1,r=0,n=45*S,i=2,a=t.geoProjectionMutator(rt),o=a(e,r,n,i);return o.a=function(t){return arguments.length?a(e=+t,r,n,i):e},o.b=function(t){return arguments.length?a(e,r=+t,n,i):r},o.psiMax=function(t){return arguments.length?a(e,r,n=+t*S,i):n*M},o.ratio=function(t){return arguments.length?a(e,r,n,i=+t):i},o.scale(180.739)},e.geoHufnagelRaw=rt,e.geoHyperelliptical=function(){var e=0,r=2.5,n=1.183136,i=t.geoProjectionMutator(at),a=i(e,r,n);return a.alpha=function(t){return arguments.length?i(e=+t,r,n):e},a.k=function(t){return arguments.length?i(e,r=+t,n):r},a.gamma=function(t){return arguments.length?i(e,r,n=+t):n},a.scale(152.63)},e.geoHyperellipticalRaw=at,e.geoInterrupt=lt,e.geoInterruptedBoggs=function(){return lt(K,ct).scale(160.857)},e.geoInterruptedHomolosine=function(){return lt(tt,ut).scale(152.63)},e.geoInterruptedMollweide=function(){return lt(Y,ht).scale(169.529)},e.geoInterruptedMollweideHemispheres=function(){return lt(Y,ft).scale(169.529).rotate([20,0])},e.geoInterruptedSinuMollweide=function(){return lt(et,pt,H).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},e.geoInterruptedSinusoidal=function(){return lt(Q,dt).scale(152.63).rotate([-20,0])},e.geoKavrayskiy7=function(){return t.geoProjection(mt).scale(158.837)},e.geoKavrayskiy7Raw=mt,e.geoLagrange=function(){var e=.5,r=t.geoProjectionMutator(gt),n=r(e);return n.spacing=function(t){return arguments.length?r(e=+t):e},n.scale(124.75)},e.geoLagrangeRaw=gt,e.geoLarrivee=function(){return t.geoProjection(vt).scale(97.2672)},e.geoLarriveeRaw=vt,e.geoLaskowski=function(){return t.geoProjection(xt).scale(139.98)},e.geoLaskowskiRaw=xt,e.geoLittrow=function(){return t.geoProjection(_t).scale(144.049).clipAngle(89.999)},e.geoLittrowRaw=_t,e.geoLoximuthal=function(){return J(bt).parallel(40).scale(158.837)},e.geoLoximuthalRaw=bt,e.geoMiller=function(){return t.geoProjection(wt).scale(108.318)},e.geoMillerRaw=wt,e.geoModifiedStereographic=Ct,e.geoModifiedStereographicRaw=Tt,e.geoModifiedStereographicAlaska=function(){return Ct(kt,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)},e.geoModifiedStereographicGs48=function(){return Ct(At,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])},e.geoModifiedStereographicGs50=function(){return Ct(Mt,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])},e.geoModifiedStereographicMiller=function(){return Ct(St,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)},e.geoModifiedStereographicLee=function(){return Ct(Et,[165,10]).scale(250).clipAngle(130).center([-165,-10])},e.geoMollweide=function(){return t.geoProjection(Y).scale(169.529)},e.geoMollweideRaw=Y,e.geoMtFlatPolarParabolic=function(){return t.geoProjection(Pt).scale(164.859)},e.geoMtFlatPolarParabolicRaw=Pt,e.geoMtFlatPolarQuartic=function(){return t.geoProjection(zt).scale(188.209)},e.geoMtFlatPolarQuarticRaw=zt,e.geoMtFlatPolarSinusoidal=function(){return t.geoProjection(Dt).scale(166.518)},e.geoMtFlatPolarSinusoidalRaw=Dt,e.geoNaturalEarth2=function(){return t.geoProjection(Ot).scale(175.295)},e.geoNaturalEarth2Raw=Ot,e.geoNellHammer=function(){return t.geoProjection(Rt).scale(152.63)},e.geoNellHammerRaw=Rt,e.geoInterruptedQuarticAuthalic=function(){return lt(U(1/0),Ft).rotate([20,0]).scale(152.63)},e.geoNicolosi=function(){return t.geoProjection(Bt).scale(127.267)},e.geoNicolosiRaw=Bt,e.geoPatterson=function(){return t.geoProjection(Zt).scale(139.319)},e.geoPattersonRaw=Zt,e.geoPolyconic=function(){return t.geoProjection(Yt).scale(103.74)},e.geoPolyconicRaw=Yt,e.geoPolyhedral=Jt,e.geoPolyhedralButterfly=function(e){e=e||function(e){var r=t.geoCentroid({type:"MultiPoint",coordinates:e});return t.geoGnomonic().scale(1).translate([0,0]).rotate([-r[0],-r[1]])};var r=nr.map((function(t){return{face:t,project:e(t)}}));return[-1,0,0,1,0,1,4,5].forEach((function(e,t){var n=r[e];n&&(n.children||(n.children=[])).push(r[t])})),Jt(r[0],(function(e,t){return r[e<-x/2?t<0?6:4:e<0?t<0?2:0:e0?[-r[0],0]:[180-r[0],180])};var r=nr.map((function(t){return{face:t,project:e(t)}}));return[-1,0,0,1,0,1,4,5].forEach((function(e,t){var n=r[e];n&&(n.children||(n.children=[])).push(r[t])})),Jt(r[0],(function(e,t){return r[e<-x/2?t<0?6:4:e<0?t<0?2:0:e2||a[0]!=t[0]||a[1]!=t[1])&&(n.push(a),t=a)}return 1===n.length&&e.length>1&&n.push(r(e[e.length-1])),n}function a(e){return e.map(i)}function o(e){if(null==e)return e;var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(o)};break;case"Point":t={type:"Point",coordinates:r(e.coordinates)};break;case"MultiPoint":t={type:e.type,coordinates:n(e.coordinates)};break;case"LineString":t={type:e.type,coordinates:i(e.coordinates)};break;case"MultiLineString":case"Polygon":t={type:e.type,coordinates:a(e.coordinates)};break;case"MultiPolygon":t={type:"MultiPolygon",coordinates:e.coordinates.map(a)};break;default:return e}return null!=e.bbox&&(t.bbox=e.bbox),t}function s(e){var t={type:"Feature",properties:e.properties,geometry:o(e.geometry)};return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),t}if(null!=e)switch(e.type){case"Feature":return s(e);case"FeatureCollection":var l={type:"FeatureCollection",features:e.features.map(s)};return null!=e.bbox&&(l.bbox=e.bbox),l;default:return o(e)}return e},e.geoQuincuncial=xr,e.geoRectangularPolyconic=function(){return J(br).scale(131.215)},e.geoRectangularPolyconicRaw=br,e.geoRobinson=function(){return t.geoProjection(Tr).scale(152.63)},e.geoRobinsonRaw=Tr,e.geoSatellite=function(){var e=2,r=0,n=t.geoProjectionMutator(kr),i=n(e,r);return i.distance=function(t){return arguments.length?n(e=+t,r):e},i.tilt=function(t){return arguments.length?n(e,r=t*S):r*M},i.scale(432.147).clipAngle(C(1/e)*M-1e-6)},e.geoSatelliteRaw=kr,e.geoSinuMollweide=function(){return t.geoProjection(et).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},e.geoSinuMollweideRaw=et,e.geoSinusoidal=function(){return t.geoProjection(Q).scale(152.63)},e.geoSinusoidalRaw=Q,e.geoStitch=function(e){if(null==e)return e;switch(e.type){case"Feature":return Br(e);case"FeatureCollection":var t={type:"FeatureCollection",features:e.features.map(Br)};return null!=e.bbox&&(t.bbox=e.bbox),t;default:return jr(e)}},e.geoTimes=function(){return t.geoProjection(Nr).scale(146.153)},e.geoTimesRaw=Nr,e.geoTwoPointAzimuthal=qr,e.geoTwoPointAzimuthalRaw=Vr,e.geoTwoPointAzimuthalUsa=function(){return qr([-158,21.5],[-77,39]).clipAngle(60).scale(400)},e.geoTwoPointEquidistant=Gr,e.geoTwoPointEquidistantRaw=Hr,e.geoTwoPointEquidistantUsa=function(){return Gr([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)},e.geoVanDerGrinten=function(){return t.geoProjection(Wr).scale(79.4183)},e.geoVanDerGrintenRaw=Wr,e.geoVanDerGrinten2=function(){return t.geoProjection(Zr).scale(79.4183)},e.geoVanDerGrinten2Raw=Zr,e.geoVanDerGrinten3=function(){return t.geoProjection(Yr).scale(79.4183)},e.geoVanDerGrinten3Raw=Yr,e.geoVanDerGrinten4=function(){return t.geoProjection(Xr).scale(127.16)},e.geoVanDerGrinten4Raw=Xr,e.geoWagner=Kr,e.geoWagner7=function(){return Kr().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)},e.geoWagnerRaw=$r,e.geoWagner4=function(){return t.geoProjection(en).scale(176.84)},e.geoWagner4Raw=en,e.geoWagner6=function(){return t.geoProjection(tn).scale(152.63)},e.geoWagner6Raw=tn,e.geoWiechel=function(){return t.geoProjection(rn).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)},e.geoWiechelRaw=rn,e.geoWinkel3=function(){return t.geoProjection(nn).scale(158.837)},e.geoWinkel3Raw=nn,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof e&&typeof t<"u"?n(e,Eg(),Sg()):n(r.d3=r.d3||{},r.d3,r.d3)}}),Ig=m({"src/plots/geo/zoom.js"(e,t){var r=b(),n=ct(),i=He(),a=Math.PI/180,o=180/Math.PI,s={cursor:"pointer"},l={cursor:"auto"};function c(e,t){return r.behavior.zoom().translate(t.translate()).scale(t.scale())}function u(e,t,r){var a=e.id,o=e.graphDiv,s=o.layout,l=s[a],c=o._fullLayout,u=c[a],h={},f={};function p(e,t){h[a+"."+e]=n.nestedProperty(l,e).get(),i.call("_storeDirectGUIEdit",s,c._preGUI,h);var r=n.nestedProperty(u,e);r.get()!==t&&(r.set(t),n.nestedProperty(l,e).set(t),f[a+"."+e]=t)}r(p),p("projection.scale",t.scale()/e.fitScale),p("fitbounds",!1),o.emit("plotly_relayout",f)}function h(e,t){var n=c(0,t);function i(r){var n=t.invert(e.midPt);r("center.lon",n[0]),r("center.lat",n[1])}return n.on("zoomstart",(function(){r.select(this).style(s)})).on("zoom",(function(){t.scale(r.event.scale).translate(r.event.translate),e.render(!0);var n=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":n[0],"geo.center.lat":n[1]})})).on("zoomend",(function(){r.select(this).style(l),u(e,t,i)})),n}function f(e,t){var n,i,a,o,h,f,p,d,m,g=c(0,t);function y(e){return t.invert(e)}function v(r){var n=t.rotate(),i=t.invert(e.midPt);r("projection.rotation.lon",-n[0]),r("center.lon",i[0]),r("center.lat",i[1])}return g.on("zoomstart",(function(){r.select(this).style(s),n=r.mouse(this),i=t.rotate(),a=t.translate(),o=i,h=y(n)})).on("zoom",(function(){if(f=r.mouse(this),function(e){var r=y(e);if(!r)return!0;var n=t(r);return Math.abs(n[0]-e[0])>2||Math.abs(n[1]-e[1])>2}(n))return g.scale(t.scale()),void g.translate(t.translate());t.scale(r.event.scale),t.translate([a[0],r.event.translate[1]]),h?y(f)&&(d=y(f),p=[o[0]+(d[0]-h[0]),i[1],i[2]],t.rotate(p),o=p):h=y(n=f),m=!0,e.render(!0);var s=t.rotate(),l=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":l[0],"geo.center.lat":l[1],"geo.projection.rotation.lon":-s[0]})})).on("zoomend",(function(){r.select(this).style(l),m&&u(e,t,v)})),g}function p(e,t){var n,i={r:t.rotate(),k:t.scale()},h=c(0,t),f=function(e){for(var t=0,n=arguments.length,i=[];++td?(a=(h>0?90:-90)-p,i=0):(a=Math.asin(h/d)*o-p,i=Math.sqrt(d*d-h*h));var g=180-a-2*p,v=(Math.atan2(f,u)-Math.atan2(c,i))*o,x=(Math.atan2(f,u)-Math.atan2(c,-i))*o;return m(r[0],r[1],a,v)<=m(r[0],r[1],g,x)?[a,v,r[2]]:[g,x,r[2]]}(p,n,c);(!isFinite(g[0])||!isFinite(g[1])||!isFinite(g[2]))&&(g=c),t.rotate(g),c=g}}else n=d(t,e=a);!function(e){e({type:"zoom"})}(f.of(this,arguments))})),function(e){p++||e({type:"zoomstart"})}(f.of(this,arguments))})).on("zoomend",(function(){var n;r.select(this).style(l),g.call(h,"zoom",null),n=f.of(this,arguments),--p||n({type:"zoomend"}),u(e,t,x)})).on("zoom.redraw",(function(){e.render(!0);var r=t.rotate();e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.projection.rotation.lon":-r[0],"geo.projection.rotation.lat":-r[1]})})),r.rebind(h,f,"on")}function d(e,t){var r=e.invert(t);return r&&isFinite(r[0])&&isFinite(r[1])&&function(e){var t=e[0]*a,r=e[1]*a,n=Math.cos(r);return[n*Math.cos(t),n*Math.sin(t),Math.sin(r)]}(r)}function m(e,t,r,n){var i=g(r-e),a=g(n-t);return Math.sqrt(i*i+a*a)}function g(e){return(e%360+540)%360-180}function y(e,t,r){var n=r*a,i=e.slice(),o=0===t?1:0,s=2===t?1:2,l=Math.cos(n),c=Math.sin(n);return i[o]=e[o]*l-e[s]*c,i[s]=e[s]*l+e[o]*c,i}function v(e,t){for(var r=0,n=0,i=e.length;n0&&i<0&&(i+=360);var s=(i-n)/4;return{type:"Polygon",coordinates:[[[n,a],[n,o],[n+s,o],[n+2*s,o],[n+3*s,o],[i,o],[i,a],[i-s,a],[i-2*s,a],[i-3*s,a],[n,a]]]}}t.exports=function(e){return new M(e)},S.plot=function(e,t,r,n){var i=this;if(n)return i.update(e,t,!0);i._geoCalcData=e,i._fullLayout=t;var a=t[this.id],o=[],s=!1;for(var l in w.layerNameToAdjective)if("frame"!==l&&a["show"+l]){s=!0;break}for(var c=!1,u=0;u0&&o._module.calcGeoJSON(a,t)}if(!r){if(this.updateProjection(e,t))return;(!this.viewInitial||this.scope!==n.scope)&&this.saveViewInitial(n)}this.scope=n.scope,this.updateBaseLayers(t,n),this.updateDims(t,n),this.updateFx(t,n),p.generalUpdatePerTraceModule(this.graphDiv,this,e,n);var s=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=s.selectAll(".point"),this.dataPoints.text=s.selectAll("text"),this.dataPaths.line=s.selectAll(".js-line");var l=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=l.selectAll("path"),this._render()},S.updateProjection=function(e,t){var r=this.graphDiv,s=t[this.id],c=t._size,u=s.domain,h=s.projection,f=s.lonaxis,p=s.lataxis,d=f._ax,g=p._ax,y=this.projection=function(e){var t=e.projection,r=t.type,s=w.projNames[r];s="geo"+l.titleCase(s);for(var c=(n[s]||o[s])(),u=e._isSatellite?180*Math.acos(1/t.distance)/Math.PI:e._isClipped?w.lonaxisSpan[r]/2:null,h=["center","rotate","parallels","clipExtent"],f=function(e){return e?c:[]},p=0;pu*Math.PI/180}return!1},c.getPath=function(){return i().projection(c)},c.getBounds=function(e){return c.getPath().bounds(e)},c.precision(w.precision),e._isSatellite&&c.tilt(t.tilt).distance(t.distance),u&&c.clipAngle(u-w.clipPad),c}(s),v=[[c.l+c.w*u.x[0],c.t+c.h*(1-u.y[1])],[c.l+c.w*u.x[1],c.t+c.h*(1-u.y[0])]],x=s.center||{},_=h.rotation||{},b=f.range||[],T=p.range||[];if(s.fitbounds){d._length=v[1][0]-v[0][0],g._length=v[1][1]-v[0][1],d.range=m(r,d),g.range=m(r,g);var k=(d.range[0]+d.range[1])/2,A=(g.range[0]+g.range[1])/2;if(s._isScoped)x={lon:k,lat:A};else if(s._isClipped){x={lon:k,lat:A},_={lon:k,lat:A,roll:_.roll};var M=h.type,S=w.lonaxisSpan[M]/2||180,C=w.lataxisSpan[M]/2||90;b=[k-S,k+S],T=[A-C,A+C]}else x={lon:k,lat:A},_={lon:k,lat:_.lat,roll:_.roll}}y.center([x.lon-_.lon,x.lat-_.lat]).rotate([-_.lon,-_.lat,_.roll]).parallels(h.parallels);var I=E(b,T);y.fitExtent(v,I);var L=this.bounds=y.getBounds(I),P=this.fitScale=y.scale(),z=y.translate();if(s.fitbounds){var D=y.getBounds(E(d.range,g.range)),O=Math.min((L[1][0]-L[0][0])/(D[1][0]-D[0][0]),(L[1][1]-L[0][1])/(D[1][1]-D[0][1]));isFinite(O)?y.scale(O*P):l.warn("Something went wrong during"+this.id+"fitbounds computations.")}else y.scale(h.scale*P);var R=this.midPt=[(L[0][0]+L[1][0])/2,(L[0][1]+L[1][1])/2];if(y.translate([z[0]+(R[0]-z[0]),z[1]+(R[1]-z[1])]).clipExtent(L),s._isAlbersUsa){var F=y([x.lon,x.lat]),B=y.translate();y.translate([B[0]-(F[0]-B[0]),B[1]-(F[1]-B[1])])}},S.updateBaseLayers=function(e,t){var n=this,i=n.topojson,a=n.layers,o=n.basePaths;function s(e){return"lonaxis"===e||"lataxis"===e}function l(e){return!!w.lineLayers[e]}function c(e){return!!w.fillLayers[e]}var f=(this.hasChoropleth?w.layersForChoropleth:w.layers).filter((function(e){return l(e)||c(e)?t["show"+e]:!s(e)||t[e].showgrid})),p=n.framework.selectAll(".layer").data(f,String);p.exit().each((function(e){delete a[e],delete o[e],r.select(this).remove()})),p.enter().append("g").attr("class",(function(e){return"layer "+e})).each((function(e){var t=a[e]=r.select(this);"bg"===e?n.bgRect=t.append("rect").style("pointer-events","all"):s(e)?o[e]=t.append("path").style("fill","none"):"backplot"===e?t.append("g").classed("choroplethlayer",!0):"frontplot"===e?t.append("g").classed("scatterlayer",!0):l(e)?o[e]=t.append("path").style("fill","none").style("stroke-miterlimit",2):c(e)&&(o[e]=t.append("path").style("stroke","none"))})),p.order(),p.each((function(r){var n=o[r],a=w.layerNameToAdjective[r];"frame"===r?n.datum(w.sphereSVG):l(r)||c(r)?n.datum(A(i,i.objects[r])):s(r)&&n.datum(function(e,t,r){var n,i,a,o=t[e],s=w.scopeDefaults[t.scope];"lonaxis"===e?(n=s.lonaxisRange,i=s.lataxisRange,a=function(e,t){return[e,t]}):"lataxis"===e&&(n=s.lataxisRange,i=s.lonaxisRange,a=function(e,t){return[t,e]});var l={type:"linear",range:[n[0],n[1]-1e-6],tick0:o.tick0,dtick:o.dtick};d.setConvert(l,r);var c=d.calcTicks(l);!t.isScoped&&"lonaxis"===e&&c.pop();for(var u=c.length,h=new Array(u),f=0;f-1&&x(r.event,i,[n.xaxis],[n.yaxis],n.id,u),c.indexOf("event")>-1&&f.click(i,r.event))}))}function h(e){return n.projection.invert([e[0]+n.xaxis._offset,e[1]+n.yaxis._offset])}},S.makeFramework=function(){var e=this,t=e.graphDiv,n=t._fullLayout,i="clip"+n._uid+e.id;e.clipDef=n._clips.append("clipPath").attr("id",i),e.clipRect=e.clipDef.append("rect"),e.framework=r.select(e.container).append("g").attr("class","geo "+e.id).call(h.setClipUrl,i,t),e.project=function(t){var r=e.projection(t);return r?[r[0]-e.xaxis._offset,r[1]-e.yaxis._offset]:[null,null]},e.xaxis={_id:"x",c2p:function(t){return e.project(t)[0]}},e.yaxis={_id:"y",c2p:function(t){return e.project(t)[1]}},e.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},d.setConvert(e.mockAxis,n)},S.saveViewInitial=function(e){var t,r=e.center||{},n=e.projection,i=n.rotation||{};this.viewInitial={fitbounds:e.fitbounds,"projection.scale":n.scale},t=e._isScoped?{"center.lon":r.lon,"center.lat":r.lat}:e._isClipped?{"projection.rotation.lon":i.lon,"projection.rotation.lat":i.lat}:{"center.lon":r.lon,"center.lat":r.lat,"projection.rotation.lon":i.lon},l.extendFlat(this.viewInitial,t)},S.render=function(e){this._hasMarkerAngles&&e?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},S._render=function(){var e,t=this.projection,r=t.getPath();function n(e){var r=t(e.lonlat);return r?c(r[0],r[1]):null}function i(e){return t.isLonLatOverEdges(e.lonlat)?"none":null}for(e in this.basePaths)this.basePaths[e].attr("d",r);for(e in this.dataPaths)this.dataPaths[e].attr("d",(function(e){return r(e.geojson)}));for(e in this.dataPoints)this.dataPoints[e].attr("display",i).attr("transform",n)}}}),Pg=m({"src/plots/geo/layout_attributes.js"(e,t){var r=G(),n=Ma().attributes,i=Oe().dash,a=hg(),o=De().overrideAll,s=Ye(),l={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},showgrid:{valType:"boolean",dflt:!1},tick0:{valType:"number",dflt:0},dtick:{valType:"number"},gridcolor:{valType:"color",dflt:r.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:i};(t.exports=o({domain:n({name:"geo"},{}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:!1,editType:"plot"},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:s(a.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:s(a.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:r.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:a.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:a.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:a.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:a.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:r.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:r.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:r.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:r.background},lonaxis:l,lataxis:l},"plot","from-root")).uirevision={valType:"any",editType:"none"}}}),zg=m({"src/plots/geo/layout_defaults.js"(e,t){var r=ct(),n=Gs(),i=Tt().getSubplotData,a=hg(),o=Pg(),s=a.axesNames;function l(e,t,n,o){var l=i(o.fullData,"geo",o.id).map((function(e){return e.index})),c=n("resolution"),u=n("scope"),h=a.scopeDefaults[u],f=n("projection.type",h.projType),p=t._isAlbersUsa="albers usa"===f;p&&(u=t.scope="usa");var d=t._isScoped="world"!==u,m=t._isSatellite="satellite"===f,g=t._isConic=-1!==f.indexOf("conic")||"albers"===f,y=t._isClipped=!!a.lonaxisSpan[f];if(!1===e.visible){var v=r.extendDeep({},t._template);v.showcoastlines=!1,v.showcountries=!1,v.showframe=!1,v.showlakes=!1,v.showland=!1,v.showocean=!1,v.showrivers=!1,v.showsubunits=!1,v.lonaxis&&(v.lonaxis.showgrid=!1),v.lataxis&&(v.lataxis.showgrid=!1),t._template=v}for(var x=n("visible"),_=0;_0&&L<0&&(L+=360);var P,z,D,O=(I+L)/2;if(!p){var R=d?h.projRotate:[O,0,0];P=n("projection.rotation.lon",R[0]),n("projection.rotation.lat",R[1]),n("projection.rotation.roll",R[2]),n("showcoastlines",!d&&x)&&(n("coastlinecolor"),n("coastlinewidth")),n("showocean",!!x&&void 0)&&n("oceancolor")}p?(z=-96.6,D=38.7):(z=d?O:P,D=(C[0]+C[1])/2),n("center.lon",z),n("center.lat",D),m&&(n("projection.tilt"),n("projection.distance")),g&&n("projection.parallels",h.projParallels||[0,60]),n("projection.scale"),n("showland",!!x&&void 0)&&n("landcolor"),n("showlakes",!!x&&void 0)&&n("lakecolor"),n("showrivers",!!x&&void 0)&&(n("rivercolor"),n("riverwidth")),n("showcountries",d&&"usa"!==u&&x)&&(n("countrycolor"),n("countrywidth")),("usa"===u||"north america"===u&&50===c)&&(n("showsubunits",x),n("subunitcolor"),n("subunitwidth")),d||n("showframe",x)&&(n("framecolor"),n("framewidth")),n("bgcolor"),n("fitbounds")&&(delete t.projection.scale,d?(delete t.center.lon,delete t.center.lat):y?(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon,delete t.projection.rotation.lat,delete t.lonaxis.range,delete t.lataxis.range):(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon))}t.exports=function(e,t,r){n(e,t,r,{type:"geo",attributes:o,handleDefaults:l,fullData:r,partition:"y"})}}}),Dg=m({"src/plots/geo/index.js"(e,t){var r=Tt().getSubplotCalcData,n=ct().counterRegex,i=Lg(),a="geo",o=n(a),s={};s[a]={valType:"subplotid",dflt:a,editType:"calc"},t.exports={attr:a,name:a,idRoot:a,idRegex:o,attrRegex:o,attributes:s,layoutAttributes:Pg(),supplyLayoutDefaults:zg(),plot:function(e){for(var t=e._fullLayout,n=e.calcdata,o=t._subplots[a],s=0;s")}}(e,h,o),[e]}}}),qg=m({"src/traces/choropleth/event_data.js"(e,t){t.exports=function(e,t,r,n,i){e.location=t.location,e.z=t.z;var a=n[i];return a.fIn&&a.fIn.properties&&(e.properties=a.fIn.properties),e.ct=a.ct,e}}}),Hg=m({"src/traces/choropleth/select.js"(e,t){t.exports=function(e,t){var r,n,i,a,o,s=e.cd,l=e.xaxis,c=e.yaxis,u=[];if(!1===t)for(r=0;r=Math.min(P,z)&&p<=Math.max(P,z)?0:1/0}if(A=Math.min(D,O)&&d<=Math.max(D,O)?0:1/0}E=Math.sqrt(A*A+M*M),b=i[k]}}}else for(k=i.length-1;k>-1;k--)w=h[_=i[k]],T=f[_],A=c.c2p(w)-p,M=u.c2p(T)-d,(S=Math.sqrt(A*A+M*M))100},e.isDotSymbol=function(e){return"string"==typeof e?t.DOT_RE.test(e):e>200}}}),Kg=m({"src/traces/scattergl/defaults.js"(e,t){var r=ct(),n=He(),i=$g(),a=Xg(),o=wn(),s=Xt(),l=Gn(),c=Wn(),u=Yn(),h=Xn(),f=Jn(),p=Kn();t.exports=function(e,t,d,m){function g(n,i){return r.coerce(e,t,a,n,i)}var y=!!e.marker&&i.isOpenSymbol(e.marker.symbol),v=s.isBubble(e),x=l(e,t,m,g);if(x){c(e,t,m,g),g("xhoverformat"),g("yhoverformat");var _=x>>1,s=e[o];(void 0!==r?r(s,t):s-t)>=0?(a=o,i=o-1):n=o+1}return a}function n(e,t,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=e[o];(void 0!==r?r(s,t):s-t)>0?(a=o,i=o-1):n=o+1}return a}function i(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o];(void 0!==r?r(s,t):s-t)<0?(a=o,n=o+1):i=o-1}return a}function a(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o];(void 0!==r?r(s,t):s-t)<=0?(a=o,n=o+1):i=o-1}return a}function o(e,t,r,n,i){for(;n<=i;){var a=n+i>>>1,o=e[a],s=void 0!==r?r(o,t):o-t;if(0===s)return a;s<=0?n=a+1:i=a-1}return-1}function s(e,t,r,n,i,a){return"function"==typeof r?a(e,t,r,void 0===n?0:0|n,void 0===i?e.length-1:0|i):a(e,t,void 0,void 0===r?0:0|r,void 0===n?e.length-1:0|n)}t.exports={ge:function(e,t,n,i,a){return s(e,t,n,i,a,r)},gt:function(e,t,r,i,a){return s(e,t,r,i,a,n)},lt:function(e,t,r,n,a){return s(e,t,r,n,a,i)},le:function(e,t,r,n,i){return s(e,t,r,n,i,a)},eq:function(e,t,r,n,i){return s(e,t,r,n,i,o)}}}}),ey=m({"node_modules/pick-by-alias/index.js"(e,t){t.exports=function(e,t,r){var i,a,o={};if("string"==typeof t&&(t=n(t)),Array.isArray(t)){var s={};for(a=0;a1&&(e=arguments),"string"==typeof e?e=e.split(/\s/).map(parseFloat):"number"==typeof e&&(e=[e]),e.length&&"number"==typeof e[0]?t=1===e.length?{width:e[0],height:e[0],x:0,y:0}:2===e.length?{width:e[0],height:e[1],x:0,y:0}:{x:e[0],y:e[1],width:e[2]-e[0]||0,height:e[3]-e[1]||0}:e&&(t={x:(e=r(e,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"})).left||0,y:e.top||0},null==e.width?e.right?t.width=e.right-t.x:t.width=0:t.width=e.width,null==e.height?e.bottom?t.height=e.bottom-t.y:t.height=0:t.height=e.height),t}}}),ry=m({"node_modules/array-bounds/index.js"(e,t){t.exports=function(e,t){if(!e||null==e.length)throw Error("Argument should be an array");t=null==t?1:Math.floor(t);for(var r=Array(2*t),n=0;ni&&(i=e[o]),e[o]>>1;t.dtype||(t.dtype="array"),"string"==typeof t.dtype?d=new(u(t.dtype))(g):t.dtype&&(d=t.dtype,Array.isArray(d)&&(d.length=g));for(let e=0;en||s>1073741824){for(let e=0;er+i||b>n+i||T=A||o===s)return;let c=y[a];void 0===s&&(s=c.length);for(let t=o;t=l&&n<=d&&i>=u&&i<=m&&M.push(r)}let h=v[a],f=h[4*o+0],p=h[4*o+1],x=h[4*o+2],_=h[4*o+3],w=function(e,t){let r=null,n=0;for(;null===r;)if(r=e[4*t+n],n++,n>e.length)return null;return r}(h,o+1),S=.5*i,E=a+1;t(r,n,S,E,f,p||x||_||w),t(r,n+S,S,E,p,x||_||w),t(r+S,n,S,E,x,_||w),t(r+S,n+S,S,E,_,w)}(0,0,1,0,0,1),M},d;function w(e,t,r){let n=1,i=.5,a=.5,o=.5;for(let s=0;s1&&(i=1),i<-1&&(i=-1),(e*n-t*r<0?-1:1)*Math.acos(i)};e.default=function(e){var t=e.px,o=e.py,s=e.cx,l=e.cy,c=e.rx,u=e.ry,h=e.xAxisRotation,f=void 0===h?0:h,p=e.largeArcFlag,d=void 0===p?0:p,m=e.sweepFlag,g=void 0===m?0:m,y=[];if(0===c||0===u)return[];var v=Math.sin(f*r/360),x=Math.cos(f*r/360),_=x*(t-s)/2+v*(o-l)/2,b=-v*(t-s)/2+x*(o-l)/2;if(0===_&&0===b)return[];c=Math.abs(c),u=Math.abs(u);var w=Math.pow(_,2)/Math.pow(c,2)+Math.pow(b,2)/Math.pow(u,2);w>1&&(c*=Math.sqrt(w),u*=Math.sqrt(w));var T=function(e,t,n,i,o,s,l,c,u,h,f,p){var d=Math.pow(o,2),m=Math.pow(s,2),g=Math.pow(f,2),y=Math.pow(p,2),v=d*m-d*y-m*g;v<0&&(v=0),v/=d*y+m*g;var x=(v=Math.sqrt(v)*(l===c?-1:1))*o/s*p,_=v*-s/o*f,b=h*x-u*_+(e+n)/2,w=u*x+h*_+(t+i)/2,T=(f-x)/o,k=(p-_)/s,A=(-f-x)/o,M=(-p-_)/s,S=a(1,0,T,k),E=a(T,k,A,M);return 0===c&&E>0&&(E-=r),1===c&&E<0&&(E+=r),[b,w,S,E]}(t,o,s,l,c,u,d,g,v,x,_,b),k=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw a}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(T,4),A=k[0],M=k[1],S=k[2],E=k[3],C=Math.abs(E)/(r/4);Math.abs(1-C)<1e-7&&(C=1);var I=Math.max(Math.ceil(C),1);E/=I;for(var L=0;L4?(o=g[g.length-4],s=g[g.length-3]):(o=f,s=p),a.push(g)}return a};var r=uy();function n(e,t,r,n){return["C",e,t,r,n,r,n]}function i(e,t,r,n,i,a){return["C",e/3+2/3*r,t/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}}}),fy=m({"node_modules/is-svg-path/index.js"(e,t){t.exports=function(e){return"string"==typeof e&&(e=e.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(e)&&/[\dz]$/i.test(e)&&e.length>4))}}}),py=m({"node_modules/svg-path-bounds/index.js"(e,t){var r=Jt(),n=cy(),i=hy(),a=fy(),o=wu();t.exports=function(e){if(Array.isArray(e)&&1===e.length&&"string"==typeof e[0]&&(e=e[0]),"string"==typeof e&&(o(a(e),"String is not an SVG path."),e=r(e)),o(Array.isArray(e),"Argument should be a string or an array of path segments."),e=n(e),!(e=i(e)).length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],s=0,l=e.length;st[2]&&(t[2]=c[u+0]),c[u+1]>t[3]&&(t[3]=c[u+1]);return t}}}),dy=m({"node_modules/normalize-svg-path/index.js"(e,t){var r=Math.PI,n=l(120);function i(e,t,r,n){return["C",e,t,r,n,r,n]}function a(e,t,r,n,i,a){return["C",e/3+2/3*r,t/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}function o(e,t,i,a,l,c,u,h,f,p){if(p)T=p[0],k=p[1],b=p[2],w=p[3];else{var d=s(e,t,-l);e=d.x,t=d.y;var m=(e-(h=(d=s(h,f,-l)).x))/2,g=(t-(f=d.y))/2,y=m*m/(i*i)+g*g/(a*a);y>1&&(i*=y=Math.sqrt(y),a*=y);var v=i*i,x=a*a,_=(c==u?-1:1)*Math.sqrt(Math.abs((v*x-v*g*g-x*m*m)/(v*g*g+x*m*m)));_==1/0&&(_=1);var b=_*i*g/a+(e+h)/2,w=_*-a*m/i+(t+f)/2,T=Math.asin(((t-w)/a).toFixed(9)),k=Math.asin(((f-w)/a).toFixed(9));(T=ek&&(T-=2*r),!u&&k>T&&(k-=2*r)}if(Math.abs(k-T)>n){var A=k,M=h,S=f;k=T+n*(u&&k>T?1:-1);var E=o(h=b+i*Math.cos(k),f=w+a*Math.sin(k),i,a,l,0,u,M,S,[k,A,b,w])}var C=Math.tan((k-T)/4),I=4/3*i*C,L=4/3*a*C,P=[2*e-(e+I*Math.sin(T)),2*t-(t-L*Math.cos(T)),h+I*Math.sin(k),f-L*Math.cos(k),h,f];if(p)return P;E&&(P=P.concat(E));for(var z=0;z7&&(r.push(y.splice(0,7)),y.unshift("C"));break;case"S":var x=p,_=d;("C"==t||"S"==t)&&(x+=x-n,_+=_-s),y=["C",x,_,y[1],y[2],y[3],y[4]];break;case"T":"Q"==t||"T"==t?(h=2*p-h,f=2*d-f):(h=p,f=d),y=a(p,d,h,f,y[1],y[2]);break;case"Q":h=y[1],f=y[2],y=a(p,d,y[1],y[2],y[3],y[4]);break;case"L":y=i(p,d,y[1],y[2]);break;case"H":y=i(p,d,y[1],d);break;case"V":y=i(p,d,p,y[1]);break;case"Z":y=i(p,d,c,u)}t=v,p=y[y.length-2],d=y[y.length-1],y.length>4?(n=y[y.length-4],s=y[y.length-3]):(n=p,s=d),r.push(y)}return r}}}),my=m({"node_modules/draw-svg-path/index.js"(e,t){var r=cy(),n=dy(),i={M:"moveTo",C:"bezierCurveTo"};t.exports=function(e,t){e.beginPath(),n(r(t)).forEach((function(t){var r=t[0],n=t.slice(1);e[i[r]].apply(e,n)})),e.closePath()}}}),gy=m({"node_modules/bitmap-sdf/index.js"(e,t){var r=Jd();t.exports=function(e,t){t||(t={});var a,o,s,l,c,u,h,f,p,d,m,g=null==t.cutoff?.25:t.cutoff,y=null==t.radius?8:t.radius,v=t.channel||0;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");a=t.width,o=t.height,l=e,u=t.stride?t.stride:Math.floor(e.length/a/o)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(h=(f=e).getContext("2d"),a=f.width,o=f.height,l=(p=h.getImageData(0,0,a,o)).data,u=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(h=e,a=(f=e.canvas).width,o=f.height,l=(p=h.getImageData(0,0,a,o)).data,u=4):window.ImageData&&e instanceof window.ImageData&&(p=e,a=e.width,o=e.height,l=p.data,u=4);if(s=Math.max(a,o),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(c=l,l=Array(a*o),d=0,m=c.length;d0?"white":"black",c.lineWidth=Math.abs(p)),c.translate(.5*u,.5*h),c.scale(g,g),function(){if(null!=r)return r;var e=document.createElement("canvas").getContext("2d");if(e.canvas.width=e.canvas.height=1,!window.Path2D)return r=!1;var t=new Path2D("M0,0h1v1h-1v-1Z");e.fillStyle="black",e.fill(t);var n=e.getImageData(0,0,1,1);return r=n&&n.data&&255===n.data[3]}()){var y=new Path2D(e);c.fill(y),p&&c.stroke(y)}else{var v=i(e);a(c,v),c.fill(),p&&c.stroke()}return c.setTransform(1,0,0,1,0,0),s(c,{cutoff:null!=t.cutoff?t.cutoff:.5,radius:null!=t.radius?t.radius:.5*f})}}}),vy=m({"src/traces/scattergl/convert.js"(e,t){var r=M(),n=yy(),i=em(),a=He(),o=ct(),s=o.isArrayOrTypedArray,l=er(),c=_t(),u=rm().formatColor,h=Xt(),f=$t(),p=$g(),d=Yg(),m=Z().DESELECTDIM,g={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},y=Kt().appendArrayPointValue;function v(e,t){var n,i=e._fullLayout,a=t._length,l=t.textfont,c=t.textposition,u=s(c)?c:[c],h=l.color,f=l.size,p=l.family,d=l.weight,m=l.style,g=l.variant,v={},_=e._context.plotGlPixelRatio,b=t.texttemplate;if(b){v.text=[];var w=i._d3locale,T=Array.isArray(b),k=T?Math.min(b.length,a):a,A=T?function(e){return b[e]}:function(){return b};for(n=0;n500?"bold":"normal":e}function _(e,t){var r,n,a=t._length,o=t.marker,l={},c=s(o.symbol),h=s(o.angle),d=s(o.color),m=s(o.line.color),g=s(o.opacity),y=s(o.size),v=s(o.line.width);if(c||(n=p.isOpenSymbol(o.symbol)),c||d||m||g||h){l.symbols=new Array(a),l.angles=new Array(a),l.colors=new Array(a),l.borderColors=new Array(a);var x=o.symbol,_=o.angle,b=u(o,o.opacity,a),w=u(o.line,o.opacity,a);if(!s(w[0])){var T=w;for(w=Array(a),r=0;rd.TOO_MANY_POINTS||h.hasMarkers(t)?"rect":"round";if(c&&t.connectgaps){var f=n[0],p=n[1];for(i=0;i1?c[i]:c[0]:c,m=s(u)?u.length>1?u[i]:u[0]:u,y=g[d],v=g[m],x=f?f/.8+1:0,_=-v*x-.5*v;o.offset[i]=[y*x/p,_/p]}}return o}}}}),xy=m({"src/traces/scattergl/scene_update.js"(e,t){var r=ct();t.exports=function(e,t){var n=t._scene,i={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},a={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return t._scene||((n=t._scene={}).init=function(){r.extendFlat(n,a,i)},n.init(),n.update=function(e){var t=r.repeat(e,n.count);if(n.fill2d&&n.fill2d.update(t),n.scatter2d&&n.scatter2d.update(t),n.line2d&&n.line2d.update(t),n.error2d&&n.error2d.update(t.concat(t)),n.select2d&&n.select2d.update(t),n.glText)for(var i=0;i=m,w=2*_,T={},k=y.makeCalcdata(t,"x"),A=v.makeCalcdata(t,"y"),M=o(t,y,"x",k),S=o(t,v,"y",A),E=M.vals,C=S.vals;t._x=E,t._y=C,t.xperiodalignment&&(t._origX=k,t._xStarts=M.starts,t._xEnds=M.ends),t.yperiodalignment&&(t._origY=A,t._yStarts=S.starts,t._yEnds=S.ends);var I=new Array(w),L=new Array(_);for(a=0;a<_;a++)I[2*a]=E[a]===d?NaN:E[a],I[2*a+1]=C[a]===d?NaN:C[a],L[a]=a;if("log"===y.type)for(a=0;a1&&n.extendFlat(s.line,f.linePositions(e,r,i)),s.errorX||s.errorY){var l=f.errorBarPositions(e,r,i,a,o);s.errorX&&n.extendFlat(s.errorX,l.x),s.errorY&&n.extendFlat(s.errorY,l.y)}return s.text&&(n.extendFlat(s.text,{positions:i},f.textPosition(e,r,s.text,s.marker)),n.extendFlat(s.textSel,{positions:i},f.textPosition(e,r,s.text,s.markerSel)),n.extendFlat(s.textUnsel,{positions:i},f.textPosition(e,r,s.text,s.markerUnsel))),s}(e,0,t,I,E,C),D=p(e,x);return u(s,t),b?z.marker&&(P=z.marker.sizeAvg||Math.max(z.marker.size,3)):P=l(t,_),c(e,t,y,v,E,C,P),z.errorX&&g(t,y,z.errorX),z.errorY&&g(t,v,z.errorY),z.fill&&!D.fill2d&&(D.fill2d=!0),z.marker&&!D.scatter2d&&(D.scatter2d=!0),z.line&&!D.line2d&&(D.line2d=!0),(z.errorX||z.errorY)&&!D.error2d&&(D.error2d=!0),z.text&&!D.glText&&(D.glText=!0),z.marker&&(z.marker.snap=_),D.lineOptions.push(z.line),D.errorXOptions.push(z.errorX),D.errorYOptions.push(z.errorY),D.fillOptions.push(z.fill),D.markerOptions.push(z.marker),D.markerSelectedOptions.push(z.markerSel),D.markerUnselectedOptions.push(z.markerUnsel),D.textOptions.push(z.text),D.textSelectedOptions.push(z.textSel),D.textUnselectedOptions.push(z.textUnsel),D.selectBatch.push([]),D.unselectBatch.push([]),T._scene=D,T.index=D.count,T.x=E,T.y=C,T.positions=I,D.count++,[{x:!1,y:!1,t:T,trace:t}]}}}),by=m({"src/traces/scattergl/edit_style.js"(e,t){var r=ct(),n=W(),i=Z().DESELECTDIM;t.exports={styleTextSelection:function(e){var t,a,o=e[0],s=o.trace,l=o.t,c=l._scene,u=l.index,h=c.selectBatch[u],f=c.unselectBatch[u],p=c.textOptions[u],d=c.textSelectedOptions[u]||{},m=c.textUnselectedOptions[u]||{},g=r.extendFlat({},p);if(h.length||f.length){var y=d.color,v=m.color,x=p.color,_=r.isArrayOrTypedArray(x);for(g.color=new Array(s._length),t=0;t>>24,n=(16711680&e)>>>16,i=(65280&e)>>>8,a=255&e;return!1===t?[r,n,i,a]:[r/255,n/255,i/255,a/255]}}}),Ay=m({"node_modules/object-assign/index.js"(e,t){var r=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch{return!1}}()?Object.assign:function(e,t){for(var a,o,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;le.length)&&(t=e.length);for(var r=0,n=new Array(t);r 1.0 + delta) {\n\t\tdiscard;\n\t}\n\n\talpha -= smoothstep(1.0 - delta, 1.0 + delta, radius);\n\n\tfloat borderRadius = fragBorderRadius;\n\tfloat ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius);\n\tvec4 color = mix(fragColor, fragBorderColor, ratio);\n\tcolor.a *= alpha * opacity;\n\tgl_FragColor = color;\n}\n"]),c.vert=h(["precision highp float;\n#define GLSLIFY 1\n\nattribute float x, y, xFract, yFract;\nattribute float size, borderSize;\nattribute vec4 colorId, borderColorId;\nattribute float isActive;\n\n// `invariant` effectively turns off optimizations for the position.\n// We need this because -fast-math on M1 Macs is re-ordering\n// floating point operations in a way that causes floating point\n// precision limits to put points in the wrong locations.\ninvariant gl_Position;\n\nuniform bool constPointSize;\nuniform float pixelRatio;\nuniform vec2 paletteSize, scale, scaleFract, translate, translateFract;\nuniform sampler2D paletteTexture;\n\nconst float maxSize = 100.;\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragBorderRadius, fragWidth;\n\nfloat pointSizeScale = (constPointSize) ? 2. : pixelRatio;\n\nbool isDirect = (paletteSize.x < 1.);\n\nvec4 getColor(vec4 id) {\n return isDirect ? id / 255. : texture2D(paletteTexture,\n vec2(\n (id.x + .5) / paletteSize.x,\n (id.y + .5) / paletteSize.y\n )\n );\n}\n\nvoid main() {\n // ignore inactive points\n if (isActive == 0.) return;\n\n vec2 position = vec2(x, y);\n vec2 positionFract = vec2(xFract, yFract);\n\n vec4 color = getColor(colorId);\n vec4 borderColor = getColor(borderColorId);\n\n float size = size * maxSize / 255.;\n float borderSize = borderSize * maxSize / 255.;\n\n gl_PointSize = (size + borderSize) * pointSizeScale;\n\n vec2 pos = (position + translate) * scale\n + (positionFract + translateFract) * scale\n + (position + translate) * scaleFract\n + (positionFract + translateFract) * scaleFract;\n\n gl_Position = vec4(pos * 2. - 1., 0., 1.);\n\n fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);\n fragColor = color;\n fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;\n fragWidth = 1. / gl_PointSize;\n}\n"]),m&&(c.frag=c.frag.replace("smoothstep","smoothStep"),l.frag=l.frag.replace("smoothstep","smoothStep")),this.drawCircle=e(c)}x.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4},x.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},x.prototype.draw=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;nn)?t.tree=c(e,{bounds:h}):n&&n.length&&(t.tree=n),t.tree){var f={primitive:"points",usage:"static",data:t.tree,type:"uint32"};t.elements?t.elements(f):t.elements=o.elements(f)}var p=g.float32(e);return i({data:p,usage:"dynamic"}),a({data:g.fract32(e,p),usage:"dynamic"}),l({data:new Uint8Array(u),type:"uint8",usage:"stream"}),e}},{marker:function(t,r,n){var i=r.activation;if(i.forEach((function(e){return e&&e.destroy&&e.destroy()})),i.length=0,t&&"number"!=typeof t[0]){for(var a=[],s=0,l=Math.min(t.length,r.count);s=0)return a;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)t=e;else{t=new Uint8Array(e.length);for(var o=0,s=e.length;o4*n&&(this.tooManyColors=!0),this.updatePalette(r),1===i.length?i[0]:i},x.prototype.updatePalette=function(e){if(!this.tooManyColors){var t=this.maxColors,r=this.paletteTexture,n=Math.ceil(.25*e.length/t);if(n>1)for(var i=.25*(e=e.slice()).length%t;i80*r){i=s=e[0],o=l=e[1];for(var x=r;xs&&(s=c),f>l&&(l=f);p=0!==(p=Math.max(s-i,l-o))?32767/p:0}return a(y,v,r,i,o,p,0),v}function n(e,t,r,n,i){var a,o;if(i===S(e,t,r,n)>0)for(a=t;a=t;a-=n)o=k(a,e[a],e[a+1],o);return o&&v(o,o.next)&&(A(o),o=o.next),o}function i(e,t){if(!e)return e;t||(t=e);var r,n=e;do{if(r=!1,n.steiner||!v(n,n.next)&&0!==y(n.prev,n,n.next))n=n.next;else{if(A(n),(n=t=n.prev)===n.next)break;r=!0}}while(r||n!==t);return t}function a(e,t,r,n,u,h,f){if(e){!f&&h&&function(e,t,r,n){var i=e;do{0===i.z&&(i.z=p(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,r,n,i,a,o,s,l,c=1;do{for(r=e,e=null,a=null,o=0;r;){for(o++,n=r,s=0,t=0;t0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;r=n}a.nextZ=null,c*=2}while(o>1)}(i)}(e,n,u,h);for(var d,m,g=e;e.prev!==e.next;)if(d=e.prev,m=e.next,h?s(e,n,u,h):o(e))t.push(d.i/r|0),t.push(e.i/r|0),t.push(m.i/r|0),A(e),e=m.next,g=m.next;else if((e=m)===g){f?1===f?a(e=l(i(e),t,r),t,r,n,u,h,2):2===f&&c(e,t,r,n,u,h):a(i(e),t,r,n,u,h,1);break}}}function o(e){var t=e.prev,r=e,n=e.next;if(y(t,r,n)>=0)return!1;for(var i=t.x,a=r.x,o=n.x,s=t.y,l=r.y,c=n.y,u=ia?i>o?i:o:a>o?a:o,p=s>l?s>c?s:c:l>c?l:c,d=n.next;d!==t;){if(d.x>=u&&d.x<=f&&d.y>=h&&d.y<=p&&m(i,s,a,l,o,c,d.x,d.y)&&y(d.prev,d,d.next)>=0)return!1;d=d.next}return!0}function s(e,t,r,n){var i=e.prev,a=e,o=e.next;if(y(i,a,o)>=0)return!1;for(var s=i.x,l=a.x,c=o.x,u=i.y,h=a.y,f=o.y,d=sl?s>c?s:c:l>c?l:c,x=u>h?u>f?u:f:h>f?h:f,_=p(d,g,t,r,n),b=p(v,x,t,r,n),w=e.prevZ,T=e.nextZ;w&&w.z>=_&&T&&T.z<=b;){if(w.x>=d&&w.x<=v&&w.y>=g&&w.y<=x&&w!==i&&w!==o&&m(s,u,l,h,c,f,w.x,w.y)&&y(w.prev,w,w.next)>=0||(w=w.prevZ,T.x>=d&&T.x<=v&&T.y>=g&&T.y<=x&&T!==i&&T!==o&&m(s,u,l,h,c,f,T.x,T.y)&&y(T.prev,T,T.next)>=0))return!1;T=T.nextZ}for(;w&&w.z>=_;){if(w.x>=d&&w.x<=v&&w.y>=g&&w.y<=x&&w!==i&&w!==o&&m(s,u,l,h,c,f,w.x,w.y)&&y(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;T&&T.z<=b;){if(T.x>=d&&T.x<=v&&T.y>=g&&T.y<=x&&T!==i&&T!==o&&m(s,u,l,h,c,f,T.x,T.y)&&y(T.prev,T,T.next)>=0)return!1;T=T.nextZ}return!0}function l(e,t,r){var n=e;do{var a=n.prev,o=n.next.next;!v(a,o)&&x(a,n,n.next,o)&&w(a,o)&&w(o,a)&&(t.push(a.i/r|0),t.push(n.i/r|0),t.push(o.i/r|0),A(n),A(n.next),n=e=o),n=n.next}while(n!==e);return i(n)}function c(e,t,r,n,o,s){var l=e;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&g(l,c)){var u=T(l,c);return l=i(l,l.next),u=i(u,u.next),a(l,t,r,n,o,s,0),void a(u,t,r,n,o,s,0)}c=c.next}l=l.next}while(l!==e)}function u(e,t){return e.x-t.x}function h(e,t){var r=function(e,t){var r,n=t,i=e.x,a=e.y,o=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>o&&(o=s,r=n.x=n.x&&n.x>=u&&i!==n.x&&m(ar.x||n.x===r.x&&f(r,n)))&&(r=n,p=l)),n=n.next}while(n!==c);return r}(e,t);if(!r)return t;var n=T(r,e);return i(n,n.next),i(r,r.next)}function f(e,t){return y(e.prev,e,t.prev)<0&&y(t.next,e,e.next)<0}function p(e,t,r,n,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function d(e){var t=e,r=e;do{(t.x=(e-o)*(a-s)&&(e-o)*(n-s)>=(r-o)*(t-s)&&(r-o)*(a-s)>=(i-o)*(n-s)}function g(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&x(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(e,t)&&(w(e,t)&&w(t,e)&&function(e,t){var r=e,n=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do{r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}(e,t)&&(y(e.prev,e,t.prev)||y(e,t.prev,t))||v(e,t)&&y(e.prev,e,e.next)>0&&y(t.prev,t,t.next)>0)}function y(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function v(e,t){return e.x===t.x&&e.y===t.y}function x(e,t,r,n){var i=b(y(e,t,r)),a=b(y(e,t,n)),o=b(y(r,n,e)),s=b(y(r,n,t));return!!(i!==a&&o!==s||0===i&&_(e,r,t)||0===a&&_(e,n,t)||0===o&&_(r,e,n)||0===s&&_(r,t,n))}function _(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function b(e){return e>0?1:e<0?-1:0}function w(e,t){return y(e.prev,e,e.next)<0?y(e,t,e.next)>=0&&y(e,e.prev,t)>=0:y(e,t,e.prev)<0||y(e,e.next,t)<0}function T(e,t){var r=new M(e.i,e.x,e.y),n=new M(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function k(e,t,r,n){var i=new M(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function A(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function M(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function S(e,t,r,n){for(var i=0,a=t,o=r-n;a0&&(n+=e[i-1].length,r.holes.push(n))}return r}}}),Py=m({"node_modules/array-normalize/index.js"(e,t){var r=ry();t.exports=function(e,t,n){if(!e||null==e.length)throw Error("Argument should be an array");null==t&&(t=1),null==n&&(n=r(e,t));for(var i=0;i-1}}}),iv=m({"node_modules/es5-ext/string/#/contains/index.js"(e,t){t.exports=rv()()?String.prototype.contains:nv()}}),av=m({"node_modules/d/index.js"(e,t){var r=Hy(),n=Yy(),i=ev(),a=tv(),o=iv(),s=t.exports=function(e,t){var n,s,l,c,u;return arguments.length<2||"string"!=typeof e?(c=t,t=e,e=null):c=arguments[2],r(e)?(n=o.call(e,"c"),s=o.call(e,"e"),l=o.call(e,"w")):(n=l=!0,s=!1),u={value:t,configurable:n,enumerable:s,writable:l},c?i(a(c),u):u};s.gs=function(e,t,s){var l,c,u,h;return"string"!=typeof e?(u=s,s=t,t=e,e=null):u=arguments[3],r(t)?n(t)?r(s)?n(s)||(u=s,s=void 0):s=void 0:(u=t,t=s=void 0):t=void 0,r(e)?(l=o.call(e,"c"),c=o.call(e,"e")):(l=!0,c=!1),h={get:t,set:s,configurable:l,enumerable:c},u?i(a(u),h):h}}}),ov=m({"node_modules/es5-ext/function/is-arguments.js"(e,t){var r=Object.prototype.toString,n=r.call(function(){return arguments}());t.exports=function(e){return r.call(e)===n}}}),sv=m({"node_modules/es5-ext/string/is-string.js"(e,t){var r=Object.prototype.toString,n=r.call("");t.exports=function(e){return"string"==typeof e||e&&"object"==typeof e&&(e instanceof String||r.call(e)===n)||!1}}}),lv=m({"node_modules/ext/global-this/is-implemented.js"(e,t){t.exports=function(){return!("object"!=typeof globalThis||!globalThis)&&globalThis.Array===Array}}}),cv=m({"node_modules/ext/global-this/implementation.js"(e,t){var r=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")};t.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return r()}try{return __global__||r()}finally{delete Object.prototype.__global__}}()}}),uv=m({"node_modules/ext/global-this/index.js"(e,t){t.exports=lv()()?globalThis:cv()}}),hv=m({"node_modules/es6-symbol/is-implemented.js"(e,t){var r=uv(),n={object:!0,symbol:!0};t.exports=function(){var e,t=r.Symbol;if("function"!=typeof t)return!1;e=t("test symbol");try{String(e)}catch{return!1}return!(!n[typeof t.iterator]||!n[typeof t.toPrimitive]||!n[typeof t.toStringTag])}}}),fv=m({"node_modules/es6-symbol/is-symbol.js"(e,t){t.exports=function(e){return!(!e||"symbol"!=typeof e&&(!e.constructor||"Symbol"!==e.constructor.name||"Symbol"!==e[e.constructor.toStringTag]))}}}),pv=m({"node_modules/es6-symbol/validate-symbol.js"(e,t){var r=fv();t.exports=function(e){if(!r(e))throw new TypeError(e+" is not a symbol");return e}}}),dv=m({"node_modules/es6-symbol/lib/private/generate-name.js"(e,t){var r=av(),n=Object.create,i=Object.defineProperty,a=Object.prototype,o=n(null);t.exports=function(e){for(var t,n,s=0;o[e+(s||"")];)++s;return o[e+=s||""]=!0,i(a,t="@@"+e,r.gs(null,(function(e){n||(n=!0,i(this,t,r(e)),n=!1)}))),t}}}),mv=m({"node_modules/es6-symbol/lib/private/setup/standard-symbols.js"(e,t){var r=av(),n=uv().Symbol;t.exports=function(e){return Object.defineProperties(e,{hasInstance:r("",n&&n.hasInstance||e("hasInstance")),isConcatSpreadable:r("",n&&n.isConcatSpreadable||e("isConcatSpreadable")),iterator:r("",n&&n.iterator||e("iterator")),match:r("",n&&n.match||e("match")),replace:r("",n&&n.replace||e("replace")),search:r("",n&&n.search||e("search")),species:r("",n&&n.species||e("species")),split:r("",n&&n.split||e("split")),toPrimitive:r("",n&&n.toPrimitive||e("toPrimitive")),toStringTag:r("",n&&n.toStringTag||e("toStringTag")),unscopables:r("",n&&n.unscopables||e("unscopables"))})}}}),gv=m({"node_modules/es6-symbol/lib/private/setup/symbol-registry.js"(e,t){var r=av(),n=pv(),i=Object.create(null);t.exports=function(e){return Object.defineProperties(e,{for:r((function(t){return i[t]?i[t]:i[t]=e(String(t))})),keyFor:r((function(e){var t;for(t in n(e),i)if(i[t]===e)return t}))})}}}),yv=m({"node_modules/es6-symbol/polyfill.js"(e,t){var r,n,i,a=av(),o=pv(),s=uv().Symbol,l=dv(),c=mv(),u=gv(),h=Object.create,f=Object.defineProperties,p=Object.defineProperty;if("function"==typeof s)try{String(s()),i=!0}catch{}else s=null;n=function(e){if(this instanceof n)throw new TypeError("Symbol is not a constructor");return r(e)},t.exports=r=function e(t){var r;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return i?s(t):(r=h(n.prototype),t=void 0===t?"":String(t),f(r,{__description__:a("",t),__name__:a("",l(t))}))},c(r),u(r),f(n.prototype,{constructor:a(r),toString:a("",(function(){return this.__name__}))}),f(r.prototype,{toString:a((function(){return"Symbol ("+o(this).__description__+")"})),valueOf:a((function(){return o(this)}))}),p(r.prototype,r.toPrimitive,a("",(function(){var e=o(this);return"symbol"==typeof e?e:e.toString()}))),p(r.prototype,r.toStringTag,a("c","Symbol")),p(n.prototype,r.toStringTag,a("c",r.prototype[r.toStringTag])),p(n.prototype,r.toPrimitive,a("c",r.prototype[r.toPrimitive]))}}),vv=m({"node_modules/es6-symbol/index.js"(e,t){t.exports=hv()()?uv().Symbol:yv()}}),xv=m({"node_modules/es5-ext/array/#/clear.js"(e,t){var r=By();t.exports=function(){return r(this).length=0,this}}}),_v=m({"node_modules/es5-ext/object/valid-callable.js"(e,t){t.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}}}),bv=m({"node_modules/type/string/coerce.js"(e,t){var r=Hy(),n=Gy(),i=Object.prototype.toString;t.exports=function(e){if(!r(e))return null;if(n(e)){var t=e.toString;if("function"!=typeof t||t===i)return null}try{return""+e}catch{return null}}}}),wv=m({"node_modules/type/lib/safe-to-string.js"(e,t){t.exports=function(e){try{return e.toString()}catch{try{return String(e)}catch{return null}}}}}),Tv=m({"node_modules/type/lib/to-short-string.js"(e,t){var r=wv(),n=/[\n\r\u2028\u2029]/g;t.exports=function(e){var t=r(e);return null===t?"":(t.length>100&&(t=t.slice(0,99)+"…"),t=t.replace(n,(function(e){switch(e){case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}})))}}}),kv=m({"node_modules/type/lib/resolve-exception.js"(e,t){var r=Hy(),n=Gy(),i=bv(),a=Tv(),o=function(e,t){return e.replace("%v",a(t))};t.exports=function(e,t,a){if(!n(a))throw new TypeError(o(t,e));if(!r(e)){if("default"in a)return a.default;if(a.isOptional)return null}var s=i(a.errorMessage);throw r(s)||(s=t),new TypeError(o(s,e))}}}),Av=m({"node_modules/type/value/ensure.js"(e,t){var r=kv(),n=Hy();t.exports=function(e){return n(e)?e:r(e,"Cannot use %v",arguments[1])}}}),Mv=m({"node_modules/type/plain-function/ensure.js"(e,t){var r=kv(),n=Yy();t.exports=function(e){return n(e)?e:r(e,"%v is not a plain function",arguments[1])}}}),Sv=m({"node_modules/es5-ext/array/from/is-implemented.js"(e,t){t.exports=function(){var e,t,r=Array.from;return"function"==typeof r&&!(!(t=r(e=["raz","dwa"]))||t===e||"dwa"!==t[1])}}}),Ev=m({"node_modules/es5-ext/function/is-function.js"(e,t){var r=Object.prototype.toString,n=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);t.exports=function(e){return"function"==typeof e&&n(r.call(e))}}}),Cv=m({"node_modules/es5-ext/math/sign/is-implemented.js"(e,t){t.exports=function(){var e=Math.sign;return"function"==typeof e&&1===e(10)&&-1===e(-20)}}}),Iv=m({"node_modules/es5-ext/math/sign/shim.js"(e,t){t.exports=function(e){return e=Number(e),isNaN(e)||0===e?e:e>0?1:-1}}}),Lv=m({"node_modules/es5-ext/math/sign/index.js"(e,t){t.exports=Cv()()?Math.sign:Iv()}}),Pv=m({"node_modules/es5-ext/number/to-integer.js"(e,t){var r=Lv(),n=Math.abs,i=Math.floor;t.exports=function(e){return isNaN(e)?0:0!==(e=Number(e))&&isFinite(e)?r(e)*i(n(e)):e}}}),zv=m({"node_modules/es5-ext/number/to-pos-integer.js"(e,t){var r=Pv(),n=Math.max;t.exports=function(e){return n(0,r(e))}}}),Dv=m({"node_modules/es5-ext/array/from/shim.js"(e,t){var r=vv().iterator,n=ov(),i=Ev(),a=zv(),o=_v(),s=By(),l=Oy(),c=sv(),u=Array.isArray,h=Function.prototype.call,f={configurable:!0,enumerable:!0,writable:!0,value:null},p=Object.defineProperty;t.exports=function(e){var t,d,m,g,y,v,x,_,b,w,T=arguments[1],k=arguments[2];if(e=Object(s(e)),l(T)&&o(T),this&&this!==Array&&i(this))t=this;else{if(!T){if(n(e))return 1!==(y=e.length)?Array.apply(null,e):((g=new Array(1))[0]=e[0],g);if(u(e)){for(g=new Array(y=e.length),d=0;d=55296&&v<=56319&&(w+=e[++d]),w=T?h.call(T,k,w,m):w,t?(f.value=w,p(g,m,f)):g[m]=w,++m;y=m}if(void 0===y)for(y=a(e.length),t&&(g=new t(y)),d=0;d=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__)return void u(this,"__redo__",s("c",[e]));this.__redo__.forEach((function(t,r){t>=e&&(this.__redo__[r]=++t)}),this),this.__redo__.push(e)}})),_onDelete:s((function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(t=this.__redo__.indexOf(e))&&this.__redo__.splice(t,1),this.__redo__.forEach((function(t,r){t>e&&(this.__redo__[r]=--t)}),this)))})),_onClear:s((function(){this.__redo__&&n.call(this.__redo__),this.__nextIndex__=0}))}))),u(r.prototype,c.iterator,s((function(){return this})))}}),Vv=m({"node_modules/es6-iterator/array.js"(e,t){var r,n=Uy(),i=iv(),a=av(),o=vv(),s=Uv(),l=Object.defineProperty;r=t.exports=function(e,t){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");s.call(this,e),t=t?i.call(t,"key+value")?"key+value":i.call(t,"key")?"key":"value":"value",l(this,"__kind__",a("",t))},n&&n(r,s),delete r.prototype.constructor,r.prototype=Object.create(s.prototype,{_resolve:a((function(e){return"value"===this.__kind__?this.__list__[e]:"key+value"===this.__kind__?[e,this.__list__[e]]:e}))}),l(r.prototype,o.toStringTag,a("c","Array Iterator"))}}),qv=m({"node_modules/es6-iterator/string.js"(e,t){var r,n=Uy(),i=av(),a=vv(),o=Uv(),s=Object.defineProperty;r=t.exports=function(e){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");e=String(e),o.call(this,e),s(this,"__length__",i("",e.length))},n&&n(r,o),delete r.prototype.constructor,r.prototype=Object.create(o.prototype,{_next:i((function(){if(this.__list__){if(this.__nextIndex__=55296&&t<=56319?r+this.__list__[this.__nextIndex__++]:r}))}),s(r.prototype,a.toStringTag,i("c","String Iterator"))}}),Hv=m({"node_modules/es6-iterator/is-iterable.js"(e,t){var r=ov(),n=Oy(),i=sv(),a=vv().iterator,o=Array.isArray;t.exports=function(e){return!(!n(e)||!(o(e)||i(e)||r(e))&&"function"!=typeof e[a])}}}),Gv=m({"node_modules/es6-iterator/valid-iterable.js"(e,t){var r=Hv();t.exports=function(e){if(!r(e))throw new TypeError(e+" is not iterable");return e}}}),Wv=m({"node_modules/es6-iterator/get.js"(e,t){var r=ov(),n=sv(),i=Vv(),a=qv(),o=Gv(),s=vv().iterator;t.exports=function(e){return"function"==typeof o(e)[s]?e[s]():r(e)?new i(e):n(e)?new a(e):new i(e)}}}),Zv=m({"node_modules/es6-iterator/for-of.js"(e,t){var r=ov(),n=_v(),i=sv(),a=Wv(),o=Array.isArray,s=Function.prototype.call,l=Array.prototype.some;t.exports=function(e,t){var c,u,h,f,p,d,m,g,y=arguments[2];if(o(e)||r(e)?c="array":i(e)?c="string":e=a(e),n(t),h=function(){f=!0},"array"!==c)if("string"!==c)for(u=e.next();!u.done;){if(s.call(t,y,u.value,h),f)return;u=e.next()}else for(d=e.length,p=0;p=55296&&g<=56319&&(m+=e[++p]),s.call(t,y,m,h),!f);++p);else l.call(e,(function(e){return s.call(t,y,e,h),f}))}}}),Yv=m({"node_modules/es6-weak-map/is-native-implemented.js"(e,t){t.exports="function"==typeof WeakMap&&"[object WeakMap]"===Object.prototype.toString.call(new WeakMap)}}),Xv=m({"node_modules/es6-weak-map/polyfill.js"(e,t){var r,n=Oy(),i=Uy(),a=Vy(),o=By(),s=qy(),l=av(),c=Wv(),u=Zv(),h=vv().toStringTag,f=Yv(),p=Array.isArray,d=Object.defineProperty,m=Object.prototype.hasOwnProperty,g=Object.getPrototypeOf;t.exports=r=function(){var e,t=arguments[0];if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");return e=f&&i&&WeakMap!==r?i(new WeakMap,g(this)):this,n(t)&&(p(t)||(t=c(t))),d(e,"__weakMapData__",l("c","$weakMap$"+s())),t&&u(t,(function(t){o(t),e.set(t[0],t[1])})),e},f&&(i&&i(r,WeakMap),r.prototype=Object.create(WeakMap.prototype,{constructor:l(r)})),Object.defineProperties(r.prototype,{delete:l((function(e){return!!m.call(a(e),this.__weakMapData__)&&(delete e[this.__weakMapData__],!0)})),get:l((function(e){if(m.call(a(e),this.__weakMapData__))return e[this.__weakMapData__]})),has:l((function(e){return m.call(a(e),this.__weakMapData__)})),set:l((function(e,t){return d(a(e),this.__weakMapData__,l("c",t)),this})),toString:l((function(){return"[object WeakMap]"}))}),d(r.prototype,h,l("c","WeakMap"))}}),$v=m({"node_modules/es6-weak-map/index.js"(e,t){t.exports=zy()()?WeakMap:Xv()}}),Kv=m({"node_modules/array-find-index/index.js"(e,t){t.exports=function(e,t,r){if("function"==typeof Array.prototype.findIndex)return e.findIndex(t,r);if("function"!=typeof t)throw new TypeError("predicate must be a function");var n=Object(e),i=n.length;if(0===i)return-1;for(var a=0;a"round"===t.join?2:1,miterLimit:e.prop("miterLimit"),scale:e.prop("scale"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),thickness:e.prop("thickness"),dashTexture:e.prop("dashTexture"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),dashLength:e.prop("dashLength"),viewport:(e,t)=>[t.viewport.x,t.viewport.y,e.viewportWidth,e.viewportHeight],depth:e.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:(e,t)=>!t.overlay},stencil:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport")},a=e(i({vert:"\nprecision highp float;\n\nattribute vec2 aCoord, bCoord, aCoordFract, bCoordFract;\nattribute vec4 color;\nattribute float lineEnd, lineTop;\n\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float thickness, pixelRatio, id, depth;\nuniform vec4 viewport;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\n\nvec2 project(vec2 position, vec2 positionFract, vec2 scale, vec2 scaleFract, vec2 translate, vec2 translateFract) {\n\t// the order is important\n\treturn position * scale + translate\n + positionFract * scale + translateFract\n + position * scaleFract\n + positionFract * scaleFract;\n}\n\nvoid main() {\n\tfloat lineStart = 1. - lineEnd;\n\tfloat lineOffset = lineTop * 2. - 1.;\n\n\tvec2 diff = (bCoord + bCoordFract - aCoord - aCoordFract);\n\ttangent = normalize(diff * scale * viewport.zw);\n\tvec2 normal = vec2(-tangent.y, tangent.x);\n\n\tvec2 position = project(aCoord, aCoordFract, scale, scaleFract, translate, translateFract) * lineStart\n\t\t+ project(bCoord, bCoordFract, scale, scaleFract, translate, translateFract) * lineEnd\n\n\t\t+ thickness * normal * .5 * lineOffset / viewport.zw;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tfragColor = color / 255.;\n}\n",frag:"\nprecision highp float;\n\nuniform float dashLength, pixelRatio, thickness, opacity, id;\nuniform sampler2D dashTexture;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\n\nvoid main() {\n\tfloat alpha = 1.;\n\n\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;\n\tfloat dash = texture2D(dashTexture, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n",attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},n));try{t=e(i({cull:{enable:!0,face:"back"},vert:"\nprecision highp float;\n\nattribute vec2 aCoord, bCoord, nextCoord, prevCoord;\nattribute vec4 aColor, bColor;\nattribute float lineEnd, lineTop;\n\nuniform vec2 scale, translate;\nuniform float thickness, pixelRatio, id, depth;\nuniform vec4 viewport;\nuniform float miterLimit, miterMode;\n\nvarying vec4 fragColor;\nvarying vec4 startCutoff, endCutoff;\nvarying vec2 tangent;\nvarying vec2 startCoord, endCoord;\nvarying float enableStartMiter, enableEndMiter;\n\nconst float REVERSE_THRESHOLD = -.875;\nconst float MIN_DIFF = 1e-6;\n\n// TODO: possible optimizations: avoid overcalculating all for vertices and calc just one instead\n// TODO: precalculate dot products, normalize things beforehead etc.\n// TODO: refactor to rectangular algorithm\n\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\n\tvec2 diff = b - a;\n\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n\treturn dot(p - a, perp);\n}\n\nbool isNaN( float val ){\n return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true;\n}\n\nvoid main() {\n\tvec2 aCoord = aCoord, bCoord = bCoord, prevCoord = prevCoord, nextCoord = nextCoord;\n\n vec2 adjustedScale;\n adjustedScale.x = (abs(scale.x) < MIN_DIFF) ? MIN_DIFF : scale.x;\n adjustedScale.y = (abs(scale.y) < MIN_DIFF) ? MIN_DIFF : scale.y;\n\n vec2 scaleRatio = adjustedScale * viewport.zw;\n\tvec2 normalWidth = thickness / scaleRatio;\n\n\tfloat lineStart = 1. - lineEnd;\n\tfloat lineBot = 1. - lineTop;\n\n\tfragColor = (lineStart * aColor + lineEnd * bColor) / 255.;\n\n\tif (isNaN(aCoord.x) || isNaN(aCoord.y) || isNaN(bCoord.x) || isNaN(bCoord.y)) return;\n\n\tif (aCoord == prevCoord) prevCoord = aCoord + normalize(bCoord - aCoord);\n\tif (bCoord == nextCoord) nextCoord = bCoord - normalize(bCoord - aCoord);\n\n\n\tvec2 prevDiff = aCoord - prevCoord;\n\tvec2 currDiff = bCoord - aCoord;\n\tvec2 nextDiff = nextCoord - bCoord;\n\n\tvec2 prevTangent = normalize(prevDiff * scaleRatio);\n\tvec2 currTangent = normalize(currDiff * scaleRatio);\n\tvec2 nextTangent = normalize(nextDiff * scaleRatio);\n\n\tvec2 prevNormal = vec2(-prevTangent.y, prevTangent.x);\n\tvec2 currNormal = vec2(-currTangent.y, currTangent.x);\n\tvec2 nextNormal = vec2(-nextTangent.y, nextTangent.x);\n\n\tvec2 startJoinDirection = normalize(prevTangent - currTangent);\n\tvec2 endJoinDirection = normalize(currTangent - nextTangent);\n\n\t// collapsed/unidirectional segment cases\n\t// FIXME: there should be more elegant solution\n\tvec2 prevTanDiff = abs(prevTangent - currTangent);\n\tvec2 nextTanDiff = abs(nextTangent - currTangent);\n\tif (max(prevTanDiff.x, prevTanDiff.y) < MIN_DIFF) {\n\t\tstartJoinDirection = currNormal;\n\t}\n\tif (max(nextTanDiff.x, nextTanDiff.y) < MIN_DIFF) {\n\t\tendJoinDirection = currNormal;\n\t}\n\tif (aCoord == bCoord) {\n\t\tendJoinDirection = startJoinDirection;\n\t\tcurrNormal = prevNormal;\n\t\tcurrTangent = prevTangent;\n\t}\n\n\ttangent = currTangent;\n\n\t//calculate join shifts relative to normals\n\tfloat startJoinShift = dot(currNormal, startJoinDirection);\n\tfloat endJoinShift = dot(currNormal, endJoinDirection);\n\n\tfloat startMiterRatio = abs(1. / startJoinShift);\n\tfloat endMiterRatio = abs(1. / endJoinShift);\n\n\tvec2 startJoin = startJoinDirection * startMiterRatio;\n\tvec2 endJoin = endJoinDirection * endMiterRatio;\n\n\tvec2 startTopJoin, startBotJoin, endTopJoin, endBotJoin;\n\tstartTopJoin = sign(startJoinShift) * startJoin * .5;\n\tstartBotJoin = -startTopJoin;\n\n\tendTopJoin = sign(endJoinShift) * endJoin * .5;\n\tendBotJoin = -endTopJoin;\n\n\tvec2 aTopCoord = aCoord + normalWidth * startTopJoin;\n\tvec2 bTopCoord = bCoord + normalWidth * endTopJoin;\n\tvec2 aBotCoord = aCoord + normalWidth * startBotJoin;\n\tvec2 bBotCoord = bCoord + normalWidth * endBotJoin;\n\n\t//miter anti-clipping\n\tfloat baClipping = distToLine(bCoord, aCoord, aBotCoord) / dot(normalize(normalWidth * endBotJoin), normalize(normalWidth.yx * vec2(-startBotJoin.y, startBotJoin.x)));\n\tfloat abClipping = distToLine(aCoord, bCoord, bTopCoord) / dot(normalize(normalWidth * startBotJoin), normalize(normalWidth.yx * vec2(-endBotJoin.y, endBotJoin.x)));\n\n\t//prevent close to reverse direction switch\n\tbool prevReverse = dot(currTangent, prevTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, prevNormal)) * min(length(prevDiff), length(currDiff)) < length(normalWidth * currNormal);\n\tbool nextReverse = dot(currTangent, nextTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, nextNormal)) * min(length(nextDiff), length(currDiff)) < length(normalWidth * currNormal);\n\n\tif (prevReverse) {\n\t\t//make join rectangular\n\t\tvec2 miterShift = normalWidth * startJoinDirection * miterLimit * .5;\n\t\tfloat normalAdjust = 1. - min(miterLimit / startMiterRatio, 1.);\n\t\taBotCoord = aCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n\t\taTopCoord = aCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n\t}\n\telse if (!nextReverse && baClipping > 0. && baClipping < length(normalWidth * endBotJoin)) {\n\t\t//handle miter clipping\n\t\tbTopCoord -= normalWidth * endTopJoin;\n\t\tbTopCoord += normalize(endTopJoin * normalWidth) * baClipping;\n\t}\n\n\tif (nextReverse) {\n\t\t//make join rectangular\n\t\tvec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;\n\t\tfloat normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);\n\t\tbBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n\t\tbTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n\t}\n\telse if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) {\n\t\t//handle miter clipping\n\t\taBotCoord -= normalWidth * startBotJoin;\n\t\taBotCoord += normalize(startBotJoin * normalWidth) * abClipping;\n\t}\n\n\tvec2 aTopPosition = (aTopCoord) * adjustedScale + translate;\n\tvec2 aBotPosition = (aBotCoord) * adjustedScale + translate;\n\n\tvec2 bTopPosition = (bTopCoord) * adjustedScale + translate;\n\tvec2 bBotPosition = (bBotCoord) * adjustedScale + translate;\n\n\t//position is normalized 0..1 coord on the screen\n\tvec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;\n\n\tstartCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\tendCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tenableStartMiter = step(dot(currTangent, prevTangent), .5);\n\tenableEndMiter = step(dot(currTangent, nextTangent), .5);\n\n\t//bevel miter cutoffs\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n\n\t//round miter cutoffs\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n}\n",frag:"\nprecision highp float;\n\nuniform float dashLength, pixelRatio, thickness, opacity, id, miterMode;\nuniform sampler2D dashTexture;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\nvarying vec4 startCutoff, endCutoff;\nvarying vec2 startCoord, endCoord;\nvarying float enableStartMiter, enableEndMiter;\n\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\n\tvec2 diff = b - a;\n\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n\treturn dot(p - a, perp);\n}\n\nvoid main() {\n\tfloat alpha = 1., distToStart, distToEnd;\n\tfloat cutoff = thickness * .5;\n\n\t//bevel miter\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToStart + 1., 0.), 1.);\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToEnd + 1., 0.), 1.);\n\t\t}\n\t}\n\n\t// round miter\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - startCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - endCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\t}\n\n\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;\n\tfloat dash = texture2D(dashTexture, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n",attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aColor:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:e.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},n))}catch{t=a}return{fill:e({primitive:"triangle",elements:(e,t)=>t.triangles,offset:0,vert:"\nprecision highp float;\n\nattribute vec2 position, positionFract;\n\nuniform vec4 color;\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float pixelRatio, id;\nuniform vec4 viewport;\nuniform float opacity;\n\nvarying vec4 fragColor;\n\nconst float MAX_LINES = 256.;\n\nvoid main() {\n\tfloat depth = (MAX_LINES - 4. - id) / (MAX_LINES);\n\n\tvec2 position = position * scale + translate\n + positionFract * scale + translateFract\n + position * scaleFract\n + positionFract * scaleFract;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tfragColor = color / 255.;\n\tfragColor.a *= opacity;\n}\n",frag:"\nprecision highp float;\nvarying vec4 fragColor;\n\nvoid main() {\n\tgl_FragColor = fragColor;\n}\n",uniforms:{scale:e.prop("scale"),color:e.prop("fill"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),viewport:(e,t)=>[t.viewport.x,t.viewport.y,e.viewportWidth,e.viewportHeight]},attributes:{position:{buffer:e.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8}},blend:n.blend,depth:{enable:!1},scissor:n.scissor,stencil:n.stencil,viewport:n.viewport}),rect:a,miter:t}},d.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},d.prototype.render=function(...e){e.length&&this.update(...e),this.draw()},d.prototype.draw=function(...e){return(e.length?e:this.passes).forEach(((e,t)=>{if(e&&Array.isArray(e))return this.draw(...e);"number"==typeof e&&(e=this.passes[e]),e&&e.count>1&&e.opacity&&(this.regl._refresh(),e.fill&&e.triangles&&e.triangles.length>2&&this.shaders.fill(e),e.thickness&&(e.scale[0]*e.viewport.width>d.precisionThreshold||e.scale[1]*e.viewport.height>d.precisionThreshold||"rect"===e.join||!e.join&&(e.thickness<=2||e.count>=d.maxPoints)?this.shaders.rect(e):this.shaders.miter(e)))})),this},d.prototype.update=function(e){if(!e)return;null!=e.length?"number"==typeof e[0]&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);let{regl:t,gl:h}=this;if(e.forEach(((e,m)=>{let g=this.passes[m];if(void 0!==e){if(null===e)return void(this.passes[m]=null);if("number"==typeof e[0]&&(e={positions:e}),e=a(e,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),g||(this.passes[m]=g={id:m,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:t.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:t.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},e=i({},d.defaults,e)),null!=e.thickness&&(g.thickness=parseFloat(e.thickness)),null!=e.opacity&&(g.opacity=parseFloat(e.opacity)),null!=e.miterLimit&&(g.miterLimit=parseFloat(e.miterLimit)),null!=e.overlay&&(g.overlay=!!e.overlay,me-t)),t=[],i=0,a=null!=g.hole?g.hole[0]:null;if(null!=a){let t=p(e,(e=>e>=a));e=e.slice(0,t),e.push(a)}for(let n=0;nt-a+(e[n]-i))),c=s(o,l);c=c.map((t=>t+i+(t+i{e.colorBuffer.destroy(),e.positionBuffer.destroy(),e.dashTexture.destroy()})),this.passes.length=0,this}}}),Qv=m({"node_modules/regl-error2d/index.js"(e,t){var r=ry(),n=em(),i=Sy(),a=ey(),o=Ay(),s=iy(),{float32:l,fract32:c}=Cy();t.exports=function(e,t){if("function"==typeof e?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),!(e=t.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let h,f,p,d,m,g,y=e._gl,v={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},x=[];return d=e.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),f=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),p=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),m=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),g=e.buffer({usage:"static",type:"float",data:u}),T(t),h=e({vert:"\n\t\tprecision highp float;\n\n\t\tattribute vec2 position, positionFract;\n\t\tattribute vec4 error;\n\t\tattribute vec4 color;\n\n\t\tattribute vec2 direction, lineOffset, capOffset;\n\n\t\tuniform vec4 viewport;\n\t\tuniform float lineWidth, capSize;\n\t\tuniform vec2 scale, scaleFract, translate, translateFract;\n\n\t\tvarying vec4 fragColor;\n\n\t\tvoid main() {\n\t\t\tfragColor = color / 255.;\n\n\t\t\tvec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset;\n\n\t\t\tvec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw;\n\n\t\t\tvec2 position = position + dxy;\n\n\t\t\tvec2 pos = (position + translate) * scale\n\t\t\t\t+ (positionFract + translateFract) * scale\n\t\t\t\t+ (position + translate) * scaleFract\n\t\t\t\t+ (positionFract + translateFract) * scaleFract;\n\n\t\t\tpos += pixelOffset / viewport.zw;\n\n\t\t\tgl_Position = vec4(pos * 2. - 1., 0, 1);\n\t\t}\n\t\t",frag:"\n\t\tprecision highp float;\n\n\t\tvarying vec4 fragColor;\n\n\t\tuniform float opacity;\n\n\t\tvoid main() {\n\t\t\tgl_FragColor = fragColor;\n\t\t\tgl_FragColor.a *= opacity;\n\t\t}\n\t\t",uniforms:{range:e.prop("range"),lineWidth:e.prop("lineWidth"),capSize:e.prop("capSize"),opacity:e.prop("opacity"),scale:e.prop("scale"),translate:e.prop("translate"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),viewport:(e,t)=>[t.viewport.x,t.viewport.y,e.viewportWidth,e.viewportHeight]},attributes:{color:{buffer:d,offset:(e,t)=>4*t.offset,divisor:1},position:{buffer:f,offset:(e,t)=>8*t.offset,divisor:1},positionFract:{buffer:p,offset:(e,t)=>8*t.offset,divisor:1},error:{buffer:m,offset:(e,t)=>16*t.offset,divisor:1},direction:{buffer:g,stride:24,offset:0},lineOffset:{buffer:g,stride:24,offset:8},capOffset:{buffer:g,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport"),stencil:!1,instances:e.prop("count"),count:u.length}),o(_,{update:T,draw:b,destroy:k,regl:e,gl:y,canvas:y.canvas,groups:x}),_;function _(e){e?T(e):null===e&&k(),b()}function b(t){if("number"==typeof t)return w(t);t&&!Array.isArray(t)&&(t=[t]),e._refresh(),x.forEach(((e,r)=>{if(e){if(t&&(t[r]?e.draw=!0:e.draw=!1),!e.draw)return void(e.draw=!0);w(r)}}))}function w(e){"number"==typeof e&&(e=x[e]),null!=e&&e&&e.count&&e.color&&e.opacity&&e.positions&&e.positions.length>1&&(e.scaleRatio=[e.scale[0]*e.viewport.width,e.scale[1]*e.viewport.height],h(e),e.after&&e.after(e))}function T(e){if(!e)return;null!=e.length?"number"==typeof e[0]&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);let t=0,u=0;if(_.groups=x=e.map(((e,l)=>{let h=x[l];return e?("function"==typeof e?e={after:e}:"number"==typeof e[0]&&(e={positions:e}),e=a(e,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),h||(x[l]=h={id:l,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},e=o({},v,e)),i(h,e,[{lineWidth:e=>.5*+e,capSize:e=>.5*+e,opacity:parseFloat,errors:e=>(e=s(e),u+=e.length,e),positions:(e,n)=>(e=s(e,"float64"),n.count=Math.floor(e.length/2),n.bounds=r(e,2),n.offset=t,t+=n.count,e)},{color:(e,t)=>{let r=t.count;if(e||(e="transparent"),!Array.isArray(e)||"number"==typeof e[0]){let t=e;e=Array(r);for(let n=0;n{let n=t.bounds;return e||(e=n),t.scale=[1/(e[2]-e[0]),1/(e[3]-e[1])],t.translate=[-e[0],-e[1]],t.scaleFract=c(t.scale),t.translateFract=c(t.translate),e},viewport:e=>{let t;return Array.isArray(e)?t={x:e[0],y:e[1],width:e[2]-e[0],height:e[3]-e[1]}:e?(t={x:e.x||e.left||0,y:e.y||e.top||0},e.right?t.width=e.right-t.x:t.width=e.w||e.width||0,e.bottom?t.height=e.bottom-t.y:t.height=e.h||e.height||0):t={x:0,y:0,width:y.drawingBufferWidth,height:y.drawingBufferHeight},t}}]),h):h})),t||u){let e=x.reduce(((e,t,r)=>e+(t?t.count:0)),0),t=new Float64Array(2*e),r=new Uint8Array(4*e),n=new Float32Array(4*e);x.forEach(((e,i)=>{if(!e)return;let{positions:a,count:o,offset:s,color:l,errors:c}=e;o&&(r.set(l,4*s),n.set(c,4*s),t.set(a,2*s))}));var h=l(t);f(h);var g=c(t,h);p(g),d(r),m(n)}}function k(){f.destroy(),p.destroy(),d.destroy(),m.destroy(),g.destroy()}};var u=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]]}}),ex=m({"node_modules/unquote/index.js"(e,t){var r=/[\'\"]/;t.exports=function(e){return e?(r.test(e.charAt(0))&&(e=e.substr(1)),r.test(e.charAt(e.length-1))&&(e=e.substr(0,e.length-1)),e):""}}}),tx=m({"node_modules/css-global-keywords/index.json"(e,t){t.exports=["inherit","initial","unset"]}}),rx=m({"node_modules/css-system-font-keywords/index.json"(e,t){t.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}}),nx=m({"node_modules/css-font-weight-keywords/index.json"(e,t){t.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]}}),ix=m({"node_modules/css-font-style-keywords/index.json"(e,t){t.exports=["normal","italic","oblique"]}}),ax=m({"node_modules/css-font-stretch-keywords/index.json"(e,t){t.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}}),ox=m({"node_modules/parenthesis/index.js"(e,t){function r(e,t){if("string"!=typeof e)return[e];var r=[e];"string"==typeof t||Array.isArray(t)?t={brackets:t}:t||(t={});var n=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],i=t.escape||"___",a=!!t.flat;n.forEach((function(e){var t=new RegExp(["\\",e[0],"[^\\",e[0],"\\",e[1],"]*\\",e[1]].join("")),n=[];function a(t,a,o){var s=r.push(t.slice(e[0].length,-e[1].length))-1;return n.push(s),i+s+i}r.forEach((function(e,n){for(var i,o=0;e!=i;)if(i=e,e=e.replace(t,a),o++>1e4)throw Error("References have circular dependency. Please, check them.");r[n]=e})),n=n.reverse(),r=r.map((function(t){return n.forEach((function(r){t=t.replace(new RegExp("(\\"+i+r+"\\"+i+")","g"),e[0]+"$1"+e[1])})),t}))}));var o=new RegExp("\\"+i+"([0-9]+)\\"+i);return a?r:function e(t,r,n){for(var i,a=[],s=0;i=o.exec(t);){if(s++>1e4)throw Error("Circular references in parenthesis");a.push(t.slice(0,i.index)),a.push(e(r[i[1]],r)),t=t.slice(i.index+i[0].length)}return a.push(t),a}(r[0],r)}function n(e,t){if(t&&t.flat){var r,n=t&&t.escape||"___",i=e[0];if(!i)return"";for(var a=new RegExp("\\"+n+"([0-9]+)\\"+n),o=0;i!=r;){if(o++>1e4)throw Error("Circular references in "+e);r=i,i=i.replace(a,s)}return i}return e.reduce((function e(t,r){return Array.isArray(r)&&(r=r.reduce(e,"")),t+r}),"");function s(t,r){if(null==e[r])throw Error("Reference "+r+"is undefined");return e[r]}}function i(e,t){return Array.isArray(e)?n(e,t):r(e,t)}i.parse=r,i.stringify=n,t.exports=i}}),sx=m({"node_modules/string-split-by/index.js"(e,t){var r=ox();t.exports=function(e,t,n){if(null==e)throw Error("First argument should be a string");if(null==t)throw Error("Separator should be a string or a RegExp");n?("string"==typeof n||Array.isArray(n))&&(n={ignore:n}):n={},null==n.escape&&(n.escape=!0),null==n.ignore?n.ignore=["[]","()","{}","<>",'""',"''","``","“”","«»"]:("string"==typeof n.ignore&&(n.ignore=[n.ignore]),n.ignore=n.ignore.map((function(e){return 1===e.length&&(e+=e),e})));var i=r.parse(e,{flat:!0,brackets:n.ignore}),a=i[0].split(t);if(n.escape){for(var o=[],s=0;s1&&t===r&&('"'===t||"'"===t))return['"'+n(e.substr(1,e.length-2))+'"'];var a=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(e);if(a)return i(e.substr(0,a.index)).concat(i(a[1])).concat(i(e.substr(a.index+a[0].length)));var o=e.split(".");if(1===o.length)return['"'+n(e)+'"'];for(var s=[],l=0;l65535)<<4,t|=r=((e>>>=t)>255)<<3,t|=r=((e>>>=r)>15)<<2,(t|=r=((e>>>=r)>3)<<1)|(e>>>=r)>>1}function p(){var e=h(8,(function(){return[]}));function t(t){var r=function(e){for(var t=16;t<=1<<28;t*=16)if(e<=t)return t;return 0}(t),n=e[f(r)>>2];return n.length>0?n.pop():new ArrayBuffer(r)}function r(t){e[f(t.byteLength)>>2].push(t)}return{alloc:t,free:r,allocType:function(e,r){var n=null;switch(e){case 5120:n=new Int8Array(t(r),0,r);break;case 5121:n=new Uint8Array(t(r),0,r);break;case 5122:n=new Int16Array(t(2*r),0,r);break;case 5123:n=new Uint16Array(t(2*r),0,r);break;case 5124:n=new Int32Array(t(4*r),0,r);break;case 5125:n=new Uint32Array(t(4*r),0,r);break;case 5126:n=new Float32Array(t(4*r),0,r);break;default:return null}return n.length!==r?n.subarray(0,r):n},freeType:function(e){r(e.buffer)}}}var d=p();d.zero=p();var m=3553,g=6408,y=5126,v=36160,x=function(e){return e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Float32Array||e instanceof Float64Array||e instanceof Uint8ClampedArray};function _(e){return!!e&&"object"==typeof e&&Array.isArray(e.shape)&&Array.isArray(e.stride)&&"number"==typeof e.offset&&e.shape.length===e.stride.length&&(Array.isArray(e.data)||x(e.data))}var b=function(e){return Object.keys(e).map((function(t){return e[t]}))},w=function(e){for(var t=[],r=e;r.length;r=r[0])t.push(r.length);return t},T=function(e,t,r,n){var i=1;if(t.length)for(var a=0;a>>31<<15,a=(n<<1>>>24)-127,o=n>>13&1023;if(a<-24)t[r]=i;else if(a<-14){var s=-14-a;t[r]=i+(o+1024>>s)}else t[r]=a>15?i+31744:i+(a+15<<10)+o}return t}function G(e){return Array.isArray(e)||x(e)}var W=3553,Z=34067,Y=34069,X=6408,$=6406,K=6407,J=6409,Q=6410,ee=32855,te=6402,re=34041,ne=35904,ie=35906,ae=36193,oe=33776,se=33777,le=33778,ce=5121,ue=5123,he=5125,fe=5126,pe=33071,de=9728,me=9984,ge=9987,ye=4352,ve=33984,xe=[me,9986,9985,ge],_e=[0,J,Q,K,X],be={};function we(e){return"[object "+e+"]"}be[J]=be[$]=be[te]=1,be[re]=be[Q]=2,be[K]=be[ne]=3,be[X]=be[ie]=4;var Te=we("HTMLCanvasElement"),ke=we("OffscreenCanvas"),Ae=we("CanvasRenderingContext2D"),Me=we("ImageBitmap"),Se=we("HTMLImageElement"),Ee=we("HTMLVideoElement"),Ce=Object.keys(M).concat([Te,ke,Ae,Me,Se,Ee]),Ie=[];Ie[ce]=1,Ie[fe]=4,Ie[ae]=2,Ie[ue]=2,Ie[he]=4;var Le=[];function Pe(e){return Array.isArray(e)&&(0===e.length||"number"==typeof e[0])}function ze(e){return!!Array.isArray(e)&&!(0===e.length||!G(e[0]))}function De(e){return Object.prototype.toString.call(e)}function Oe(e){return De(e)===Te}function Re(e){return De(e)===ke}function Fe(e){if(!e)return!1;var t=De(e);return Ce.indexOf(t)>=0||Pe(e)||ze(e)||_(e)}function Be(e){return 0|M[Object.prototype.toString.call(e)]}function je(e,t){return d.allocType(e.type===ae?fe:e.type,t)}function Ne(e,t){e.type===ae?(e.data=H(t),d.freeType(t)):e.data=t}function Ue(e,t,r,n,i,a){var o;if(o=typeof Le[e]<"u"?Le[e]:be[e]*Ie[t],a&&(o*=6),i){for(var s=0,l=r;l>=1;)s+=o*l*l,l/=2;return s}return o*r*n}Le[32854]=2,Le[ee]=2,Le[36194]=2,Le[re]=4,Le[oe]=.5,Le[se]=.5,Le[le]=1,Le[33779]=1,Le[35986]=.5,Le[35987]=1,Le[34798]=1,Le[35840]=.5,Le[35841]=.25,Le[35842]=.5,Le[35843]=.25,Le[36196]=.5;var Ve=36161,qe=32854,He=[];function Ge(e,t,r){return He[e]*t*r}He[qe]=2,He[32855]=2,He[36194]=2,He[33189]=2,He[36168]=1,He[34041]=4,He[35907]=4,He[34836]=16,He[34842]=8,He[34843]=6;var We=36160,Ze=36161,Ye=3553,Xe=[];Xe[6408]=4,Xe[6407]=3;var $e=[];$e[5121]=1,$e[5126]=4,$e[36193]=2;var Ke=34963;function Je(){this.state=0,this.x=0,this.y=0,this.z=0,this.w=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.offset=0,this.stride=0,this.divisor=0}function Qe(e){return function(e){for(var t,r="0123456789abcdef",n="",i=0;i>>4&15)+r.charAt(15&t);return n}(function(e){return function(e){for(var t="",r=0;r<32*e.length;r+=8)t+=String.fromCharCode(e[r>>5]>>>24-r%32&255);return t}(function(e,t){var r,n,i,a,o,s,l,c,u,h,f,p,d=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),m=new Array(64);for(e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t,u=0;u>2),r=0;r>5]|=(255&e.charCodeAt(r/8))<<24-r%32;return t}(e),8*e.length))}(function(e){for(var t,r,n="",i=-1;++i>>6&31,128|63&t):t<=65535?n+=String.fromCharCode(224|t>>>12&15,128|t>>>6&63,128|63&t):t<=2097151&&(n+=String.fromCharCode(240|t>>>18&7,128|t>>>12&63,128|t>>>6&63,128|63&t));return n}(e)))}function et(e,t){return e>>>t|e<<32-t}function tt(e,t){return e>>>t}function rt(e,t,r){return e&t^~e&r}function nt(e,t,r){return e&t^e&r^t&r}function it(e){return et(e,2)^et(e,13)^et(e,22)}function at(e){return et(e,6)^et(e,11)^et(e,25)}function ot(e){return et(e,7)^et(e,18)^tt(e,3)}function st(e){return et(e,17)^et(e,19)^tt(e,10)}var lt=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function ct(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function ut(e){return Array.prototype.slice.call(e)}function ht(e){return ut(e).join("")}var ft="xyzw".split(""),pt="dither",dt="blend.enable",mt="blend.color",gt="blend.equation",yt="blend.func",vt="depth.enable",xt="depth.func",_t="depth.range",bt="depth.mask",wt="colorMask",Tt="cull.enable",kt="cull.face",At="frontFace",Mt="lineWidth",St="polygonOffset.enable",Et="polygonOffset.offset",Ct="sample.alpha",It="sample.enable",Lt="sample.coverage",Pt="stencil.enable",zt="stencil.mask",Dt="stencil.func",Ot="stencil.opFront",Rt="stencil.opBack",Ft="scissor.enable",Bt="scissor.box",jt="viewport",Nt="profile",Ut="framebuffer",Vt="vert",qt="frag",Ht="elements",Gt="primitive",Wt="count",Zt="offset",Yt="instances",Xt="vao",$t="Width",Kt="Height",Jt=Ut+$t,Qt=Ut+Kt,er=jt+$t,tr=jt+Kt,rr="drawingBuffer",nr=rr+$t,ir=rr+Kt,ar=[yt,gt,Dt,Ot,Rt,Lt,jt,Bt,Et],or=34962,sr=34963,lr=35664,cr=35665,ur=35666,hr=35667,fr=35668,pr=35669,dr=35671,mr=35672,gr=35673,yr=35674,vr=35675,xr=35676,_r=35678,br=35680,wr=1028,Tr=1029,kr=2305,Ar=7680,Mr={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Sr={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Er={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Cr={cw:2304,ccw:kr};function Ir(e){return Array.isArray(e)||x(e)||_(e)}function Lr(e){return e.sort((function(e,t){return e===jt?-1:t===jt?1:e=1,n>=2,t)}if(4===r){var i=e.data;return new Pr(i.thisDep,i.contextDep,i.propDep,t)}if(5===r)return new Pr(!1,!1,!1,t);if(6===r){for(var a=!1,o=!1,s=!1,l=0;l=1&&(o=!0),u>=2&&(s=!0)}else 4===c.type&&(a=a||c.data.thisDep,o=o||c.data.contextDep,s=s||c.data.propDep)}return new Pr(a,o,s,t)}return new Pr(3===r,2===r,1===r,t)}var Rr=new Pr(!1,!1,!1,(function(){}));function Fr(t,r,n,i,a,s,l,c,u,f,p,d,m,g,y,v){var x=f.Record,_={add:32774,subtract:32778,"reverse subtract":32779};n.ext_blend_minmax&&(_.min=32775,_.max=32776);var b=n.angle_instanced_arrays,w=n.webgl_draw_buffers,T=n.oes_vertex_array_object,k={dirty:!0,profile:v.profile},A={},M=[],E={},C={};function I(e){return e.replace(".","_")}function L(e,t,r){var n=I(e);M.push(e),A[n]=k[n]=!!r,E[n]=t}function P(e,t,r){var n=I(e);M.push(e),Array.isArray(r)?(k[n]=r.slice(),A[n]=r.slice()):k[n]=A[n]=r,C[n]=t}function z(e){return!!isNaN(e)}L(pt,3024),L(dt,3042),P(mt,"blendColor",[0,0,0,0]),P(gt,"blendEquationSeparate",[32774,32774]),P(yt,"blendFuncSeparate",[1,0,1,0]),L(vt,2929,!0),P(xt,"depthFunc",513),P(_t,"depthRange",[0,1]),P(bt,"depthMask",!0),P(wt,wt,[!0,!0,!0,!0]),L(Tt,2884),P(kt,"cullFace",Tr),P(At,At,kr),P(Mt,Mt,1),L(St,32823),P(Et,"polygonOffset",[0,0]),L(Ct,32926),L(It,32928),P(Lt,"sampleCoverage",[1,!1]),L(Pt,2960),P(zt,"stencilMask",-1),P(Dt,"stencilFunc",[519,0,-1]),P(Ot,"stencilOpSeparate",[wr,Ar,Ar,Ar]),P(Rt,"stencilOpSeparate",[Tr,Ar,Ar,Ar]),L(Ft,3089),P(Bt,"scissor",[0,0,t.drawingBufferWidth,t.drawingBufferHeight]),P(jt,jt,[0,0,t.drawingBufferWidth,t.drawingBufferHeight]);var D={gl:t,context:m,strings:r,next:A,current:k,draw:d,elements:s,buffer:a,shader:p,attributes:f.state,vao:f,uniforms:u,framebuffer:c,extensions:n,timer:g,isBufferArgs:Ir},O={primTypes:F,compareFuncs:Sr,blendFuncs:Mr,blendEquations:_,stencilOps:Er,glTypes:S,orientationType:Cr};w&&(O.backBuffer=[Tr],O.drawBuffer=h(i.maxDrawbuffers,(function(e){return 0===e?[0]:h(e,(function(e){return 36064+e}))})));var R=0;function B(){var t=function(t){var r=t&&t.cache,n=0,i=[],a=[],o=[];function s(){var t=[],r=[];return e((function(){t.push.apply(t,ut(arguments))}),{def:function(){var e="v"+n++;return r.push(e),arguments.length>0&&(t.push(e,"="),t.push.apply(t,ut(arguments)),t.push(";")),e},toString:function(){return ht([r.length>0?"var "+r.join(",")+";":"",ht(t)])}})}function l(){var t=s(),r=s(),n=t.toString,i=r.toString;function a(e,n){r(e,n,"=",t.def(e,n),";")}return e((function(){t.apply(t,ut(arguments))}),{def:t.def,entry:t,exit:r,save:a,set:function(e,r,n){a(e,r),t(e,r,"=",n,";")},toString:function(){return n()+i()}})}var c=s(),u={};return{global:c,link:function(e,t){var r=t&&t.stable;if(!r)for(var s=0;s"u"?"Date.now()":"performance.now()"}function d(e){e(a=t.def(),"=",p(),";"),"string"==typeof i?e(c,".count+=",i,";"):e(c,".count++;"),g&&(n?e(o=t.def(),"=",h,".getNumPendingQueries();"):e(h,".beginQuery(",c,");"))}function m(e){e(c,".cpuTime+=",p(),"-",a,";"),g&&(n?e(h,".pushScopeStats(",o,",",h,".getNumPendingQueries(),",c,");"):e(h,".endQuery();"))}function y(e){var r=t.def(u,".profile");t(u,".profile=",e,";"),t.exit(u,".profile=",r,";")}if(f){if(zr(f))return void(f.enable?(d(t),m(t.exit),y("true")):y("false"));y(s=f.append(e,t))}else s=t.def(u,".profile");var v=e.block();d(v),t("if(",s,"){",v,"}");var x=e.block();m(x),t.exit("if(",s,"){",x,"}")}function W(e,t,r,n,i){var a=e.shared;n.forEach((function(n){var o,s=n.name,l=r.attributes[s];if(l){if(!i(l))return;o=l.append(e,t)}else{if(!i(Rr))return;var c=e.scopeAttrib(s);o={},Object.keys(new x).forEach((function(e){o[e]=t.def(c,".",e)}))}!function(r,n,i){var o=a.gl,s=t.def(r,".location"),l=t.def(a.attributes,"[",s,"]"),c=i.state,u=i.buffer,h=[i.x,i.y,i.z,i.w],f=["buffer","normalized","offset","stride"];function p(){t("if(!",l,".buffer){",o,".enableVertexAttribArray(",s,");}");var r,a=i.type;if(r=i.size?t.def(i.size,"||",n):n,t("if(",l,".type!==",a,"||",l,".size!==",r,"||",f.map((function(e){return l+"."+e+"!=="+i[e]})).join("||"),"){",o,".bindBuffer(",or,",",u,".buffer);",o,".vertexAttribPointer(",[s,r,a,i.normalized,i.stride,i.offset],");",l,".type=",a,";",l,".size=",r,";",f.map((function(e){return l+"."+e+"="+i[e]+";"})).join(""),"}"),b){var c=i.divisor;t("if(",l,".divisor!==",c,"){",e.instancing,".vertexAttribDivisorANGLE(",[s,c],");",l,".divisor=",c,";}")}}function d(){t("if(",l,".buffer){",o,".disableVertexAttribArray(",s,");",l,".buffer=null;","}if(",ft.map((function(e,t){return l+"."+e+"!=="+h[t]})).join("||"),"){",o,".vertexAttrib4f(",s,",",h,");",ft.map((function(e,t){return l+"."+e+"="+h[t]+";"})).join(""),"}")}1===c?p():2===c?d():(t("if(",c,"===",1,"){"),p(),t("}else{"),d(),t("}"))}(e.link(n),function(e){switch(e){case lr:case hr:case dr:return 2;case cr:case fr:case mr:return 3;case ur:case pr:case gr:return 4;default:return 1}}(n.info.type),o)}))}function Z(e,t,n,i,a,o){for(var s,l=e.shared,c=l.gl,u=0;u1){for(var M=[],S=[],E=0;E>1)",p],");")}function t(){r(d,".drawArraysInstancedANGLE(",[m,g,y,p],");")}h&&"null"!==h?x?e():(r("if(",h,"){"),e(),r("}else{"),t(),r("}")):t()}function w(){function e(){r(l+".drawElements("+[m,y,v,g+"<<(("+v+"-5121)>>1)"]+");")}function t(){r(l+".drawArrays("+[m,g,y]+");")}h&&"null"!==h?x?e():(r("if(",h,"){"),e(),r("}else{"),t(),r("}")):t()}b&&("number"!=typeof p||p>=0)?"string"==typeof p?(r("if(",p,">0){"),_(),r("}else if(",p,"<0){"),w(),r("}")):_():w()}function X(e,t,r,n,i){var a=B(),o=a.proc("body",i);return b&&(a.instancing=o.def(a.shared.extensions,".angle_instanced_arrays")),e(a,o,r,n),a.compile().body}function $(e,t,r,n){q(e,t),r.useVAO?r.drawVAO?t(e.shared.vao,".setVAO(",r.drawVAO.append(e,t),");"):t(e.shared.vao,".setVAO(",e.shared.vao,".targetVAO);"):(t(e.shared.vao,".setVAO(null);"),W(e,t,r,n.attributes,(function(){return!0}))),Z(e,t,r,n.uniforms,(function(){return!0}),!1),Y(e,t,t,r)}function K(e,t,r,n){function i(){return!0}e.batchId="a1",q(e,t),W(e,t,r,n.attributes,i),Z(e,t,r,n.uniforms,i,!1),Y(e,t,t,r)}function J(e,t,r,n){q(e,t);var i=r.contextDep,a=t.def(),o=t.def();e.shared.props=o,e.batchId=a;var s=e.scope(),l=e.scope();function c(e){return e.contextDep&&i||e.propDep}function u(e){return!c(e)}if(t(s.entry,"for(",a,"=0;",a,"<","a1",";++",a,"){",o,"=","a0","[",a,"];",l,"}",s.exit),r.needsContext&&j(e,l,r.context),r.needsFramebuffer&&N(e,l,r.framebuffer),V(e,l,r.state,c),r.profile&&c(r.profile)&&H(e,l,r,!1,!0),n)r.useVAO?r.drawVAO?c(r.drawVAO)?l(e.shared.vao,".setVAO(",r.drawVAO.append(e,l),");"):s(e.shared.vao,".setVAO(",r.drawVAO.append(e,s),");"):s(e.shared.vao,".setVAO(",e.shared.vao,".targetVAO);"):(s(e.shared.vao,".setVAO(null);"),W(e,s,r,n.attributes,u),W(e,l,r,n.attributes,c)),Z(e,s,r,n.uniforms,u,!1),Z(e,l,r,n.uniforms,c,!0),Y(e,s,l,r);else{var h=e.global.def("{}"),f=r.shader.progVar.append(e,l),p=l.def(f,".id"),d=l.def(h,"[",p,"]");l(e.shared.gl,".useProgram(",f,".program);","if(!",d,"){",d,"=",h,"[",p,"]=",e.link((function(e){return X(K,0,r,e,2)})),"(",f,");}",d,".call(this,a0[",a,"],",a,");")}}function Q(e,t,r){var n=t.static[r];if(n&&function(e){if("object"==typeof e&&!G(e)){for(var t=Object.keys(e),r=0;r0)return null;var n=t.static,i=Object.keys(n);if(i.length>0&&"number"==typeof n[i[0]]){for(var a=[],o=0;o0,w={framebuffer:u,draw:m,shader:y,state:g,dirty:b,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(w.profile=function(e){var t,r=e.static,n=e.dynamic;if(Nt in r){var i=!!r[Nt];(t=Dr((function(e,t){return i}))).enable=i}else if(Nt in n){var a=n[Nt];t=Or(a,(function(e,t){return e.invoke(t,a)}))}return t}(e),w.uniforms=function(e){var t=e.static,r=e.dynamic,n={};return Object.keys(t).forEach((function(e){var r,i=t[e];if("number"==typeof i||"boolean"==typeof i)r=Dr((function(){return i}));else if("function"==typeof i){var a=i._reglType;"texture2d"===a||"textureCube"===a?r=Dr((function(e){return e.link(i)})):("framebuffer"===a||"framebufferCube"===a)&&(r=Dr((function(e){return e.link(i.color[0])})))}else G(i)&&(r=Dr((function(e){return e.global.def("[",h(i.length,(function(e){return i[e]})),"]")})));r.value=i,n[e]=r})),Object.keys(r).forEach((function(e){var t=r[e];n[e]=Or(t,(function(e,r){return e.invoke(r,t)}))})),n}(i),w.drawVAO=w.scopeVAO=m.vao,!w.drawVAO&&y.program&&!l&&n.angle_instanced_arrays&&m.static.elements){var T=!0,k=y.program.attributes.map((function(e){var r=t.static[e];return T=T&&!!r,r}));if(T&&k.length>0){var A=f.getVAO(f.createVAO({attributes:k,elements:m.static.elements}));w.drawVAO=new Pr(null,null,null,(function(e,t){return e.link(A)})),w.useVAO=!0}}return l?w.useVAO=!0:w.attributes=function(e){var t=e.static,n=e.dynamic,i={};return Object.keys(t).forEach((function(e){var n=t[e],o=r.id(e),s=new x;if(Ir(n))s.state=1,s.buffer=a.getBuffer(a.create(n,or,!1,!0)),s.type=0;else{var l=a.getBuffer(n);if(l)s.state=1,s.buffer=l,s.type=0;else if("constant"in n){var c=n.constant;s.buffer="null",s.state=2,"number"==typeof c?s.x=c:ft.forEach((function(e,t){t"+t+"?"+n+".constant["+t+"]:0;"})).join(""),"}}else{","if(",o,"(",n,".buffer)){",u,"=",s,".createStream(",or,",",n,".buffer);","}else{",u,"=",s,".getBuffer(",n,".buffer);","}",h,'="type" in ',n,"?",a.glTypes,"[",n,".type]:",u,".dtype;",l.normalized,"=!!",n,".normalized;"),f("size"),f("offset"),f("stride"),f("divisor"),r("}}"),r.exit("if(",l.isStream,"){",s,".destroyStream(",u,");","}"),l}))})),i}(t),w.context=function(e){var t=e.static,r=e.dynamic,n={};return Object.keys(t).forEach((function(e){var r=t[e];n[e]=Dr((function(e,t){return"number"==typeof r||"boolean"==typeof r?""+r:e.link(r)}))})),Object.keys(r).forEach((function(e){var t=r[e];n[e]=Or(t,(function(e,r){return e.invoke(r,t)}))})),n}(o),w}(t,i,o,l);return m.shader.program&&(m.shader.program.attributes.sort((function(e,t){return e.name0&&r(e.shared.current,".dirty=true;"),e.shared.vao&&r(e.shared.vao,".setVAO(null);")}(d,m),function(e,t){var n=e.proc("scope",3);e.batchId="a2";var i=e.shared,a=i.current;if(j(e,n,t.context),t.framebuffer&&t.framebuffer.append(e,n),Lr(Object.keys(t.state)).forEach((function(r){var a=t.state[r],o=a.append(e,n);G(o)?o.forEach((function(t,i){z(t)?n.set(e.next[r],"["+i+"]",t):n.set(e.next[r],"["+i+"]",e.link(t,{stable:!0}))})):zr(a)?n.set(i.next,"."+r,e.link(o,{stable:!0})):n.set(i.next,"."+r,o)})),H(e,n,t,!0,!0),[Ht,Zt,Wt,Yt,Gt].forEach((function(r){var a=t.draw[r];if(a){var o=a.append(e,n);z(o)?n.set(i.draw,"."+r,o):n.set(i.draw,"."+r,e.link(o),{stable:!0})}})),Object.keys(t.uniforms).forEach((function(a){var o=t.uniforms[a].append(e,n);Array.isArray(o)&&(o="["+o.map((function(t){return z(t)?t:e.link(t,{stable:!0})}))+"]"),n.set(i.uniforms,"["+e.link(r.id(a),{stable:!0})+"]",o)})),Object.keys(t.attributes).forEach((function(r){var i=t.attributes[r].append(e,n),a=e.scopeAttrib(r);Object.keys(new x).forEach((function(e){n.set(a,"."+e,i[e])}))})),t.scopeVAO){var o=t.scopeVAO.append(e,n);z(o)?n.set(i.vao,".targetVAO",o):n.set(i.vao,".targetVAO",e.link(o,{stable:!0}))}function s(r){var a=t.shader[r];if(a){var o=a.append(e,n);z(o)?n.set(i.shader,"."+r,o):n.set(i.shader,"."+r,e.link(o,{stable:!0}))}}s(Vt),s(qt),Object.keys(t.state).length>0&&(n(a,".dirty=true;"),n.exit(a,".dirty=true;")),n("a1(",e.shared.context,",a0,",e.batchId,");")}(d,m),function(e,t){var r=e.proc("batch",2);e.batchId="0",q(e,r);var n=!1,i=!0;Object.keys(t.context).forEach((function(e){n=n||t.context[e].propDep})),n||(j(e,r,t.context),i=!1);var a=t.framebuffer,o=!1;function s(e){return e.contextDep&&n||e.propDep}a?(a.propDep?n=o=!0:a.contextDep&&n&&(o=!0),o||N(e,r,a)):N(e,r,null),t.state.viewport&&t.state.viewport.propDep&&(n=!0),U(e,r,t),V(e,r,t.state,(function(e){return!s(e)})),(!t.profile||!s(t.profile))&&H(e,r,t,!1,"a1"),t.contextDep=n,t.needsContext=i,t.needsFramebuffer=o;var l=t.shader.progVar;if(l.contextDep&&n||l.propDep)J(e,r,t,null);else{var c=l.append(e,r);if(r(e.shared.gl,".useProgram(",c,".program);"),t.shader.program)J(e,r,t,t.shader.program);else{r(e.shared.vao,".setVAO(null);");var u=e.global.def("{}"),h=r.def(c,".id"),f=r.def(u,"[",h,"]");r(e.cond(f).then(f,".call(this,a0,a1);").else(f,"=",u,"[",h,"]=",e.link((function(e){return X(J,0,t,e,2)})),"(",c,");",f,".call(this,a0,a1);"))}}Object.keys(t.state).length>0&&r(e.shared.current,".dirty=true;"),e.shared.vao&&r(e.shared.vao,".setVAO(null);")}(d,m),e(d.compile(),{destroy:function(){m.shader.program.destroy()}})}}}var Br="webglcontextlost",jr="webglcontextrestored";function Nr(e,t){for(var r=0;r"u"?1:window.devicePixelRatio,p=!1,d={},m=function(e){},g=function(){};if("string"==typeof o?r=document.querySelector(o):"object"==typeof o&&(function(e){return"string"==typeof e.nodeName&&"function"==typeof e.appendChild&&"function"==typeof e.getBoundingClientRect}(o)?r=o:function(e){return"function"==typeof e.drawArrays||"function"==typeof e.drawElements}(o)?i=(a=o).canvas:("gl"in o?a=o.gl:"canvas"in o?i=u(o.canvas):"container"in o&&(n=u(o.container)),"attributes"in o&&(s=o.attributes),"extensions"in o&&(l=c(o.extensions)),"optionalExtensions"in o&&(h=c(o.optionalExtensions)),"onDone"in o&&(m=o.onDone),"profile"in o&&(p=!!o.profile),"pixelRatio"in o&&(f=+o.pixelRatio),"cachedCode"in o&&(d=o.cachedCode))),r&&("canvas"===r.nodeName.toLowerCase()?i=r:n=r),!a){if(!i){var y=function(t,r,n){var i,a=document.createElement("canvas");function o(){var e=window.innerWidth,r=window.innerHeight;if(t!==document.body){var i=a.getBoundingClientRect();e=i.right-i.left,r=i.bottom-i.top}a.width=n*e,a.height=n*r}return e(a.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),t.appendChild(a),t===document.body&&(a.style.position="absolute",e(t.style,{margin:0,padding:0})),t!==document.body&&"function"==typeof ResizeObserver?(i=new ResizeObserver((function(){setTimeout(o)}))).observe(t):window.addEventListener("resize",o,!1),o(),{canvas:a,onDestroy:function(){i?i.disconnect():window.removeEventListener("resize",o),t.removeChild(a)}}}(n||document.body,0,f);if(!y)return null;i=y.canvas,g=y.onDestroy}void 0===s.premultipliedAlpha&&(s.premultipliedAlpha=!0),a=function(e,t){function r(r){try{return e.getContext(r,t)}catch{return null}}return r("webgl")||r("experimental-webgl")||r("webgl-experimental")}(i,s)}return a?{gl:a,canvas:i,container:n,extensions:l,optionalExtensions:h,pixelRatio:f,profile:p,cachedCode:d,onDone:m,onDestroy:g}:(g(),m("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}(t);if(!r)return null;var n=r.gl,i=n.getContextAttributes(),a=(n.isContextLost(),function(e,t){var r={};function n(t){var n,i=t.toLowerCase();try{n=r[i]=e.getExtension(i)}catch{}return!!n}for(var i=0;i0)if(Array.isArray(t[0])){o=I(t);for(var c=1,u=1;u0)if("number"==typeof e[0]){var i=d.allocType(h.dtype,e.length);O(i,e),p(i,n),d.freeType(i)}else if(Array.isArray(e[0])||x(e[0])){r=I(e);var a=C(e,r,h.dtype);p(a,n),d.freeType(a)}}else if(_(e)){r=e.shape;var o=e.stride,s=0,l=0,c=0,u=0;1===r.length?(s=r[0],l=1,c=o[0],u=0):2===r.length&&(s=r[0],l=r[1],c=o[0],u=o[1]);var m=Array.isArray(e.data)?h.dtype:D(e.data),g=d.allocType(m,s*l);R(g,e.data,s,l,c,u,e.offset),p(g,n),d.freeType(g)}return f},r.profile&&(f.stats=h.stats),f.destroy=function(){c(h)},f},createStream:function(e,t){var r=o.pop();return r||(r=new a(e)),r.bind(),l(r,t,35040,0,1,!1),r},destroyStream:function(e){o.push(e)},clear:function(){b(i).forEach(c),o.forEach(c)},getBuffer:function(e){return e&&e._buffer instanceof a?e._buffer:null},restore:function(){b(i).forEach((function(t){t.buffer=e.createBuffer(),e.bindBuffer(t.type,t.buffer),e.bufferData(t.type,t.persistentData||t.byteLength,t.usage)}))},_initBuffer:l}}(n,f,r),Ie=function(e,t,r,n){var i={},a=0,o={uint8:B,uint16:j};function s(e){this.id=a++,i[this.id]=this,this.buffer=e,this.primType=4,this.vertCount=0,this.type=0}t.oes_element_index_uint&&(o.uint32=N),s.prototype.bind=function(){this.buffer.bind()};var l=[];function c(n,i,a,o,s,l,c){var u;if(n.buffer.bind(),i){var h=c;!c&&(!x(i)||_(i)&&!x(i.data))&&(h=t.oes_element_index_uint?N:j),r._initBuffer(n.buffer,i,a,h,3)}else e.bufferData(U,l,a),n.buffer.dtype=u||B,n.buffer.usage=a,n.buffer.dimension=3,n.buffer.byteLength=l;if(u=c,!c){switch(n.buffer.dtype){case B:case 5120:u=B;break;case j:case 5122:u=j;break;case N:case 5124:u=N}n.buffer.dtype=u}n.type=u;var f=s;f<0&&(f=n.buffer.byteLength,u===j?f>>=1:u===N&&(f>>=2)),n.vertCount=f;var p=o;if(o<0){p=4;var d=n.buffer.dimension;1===d&&(p=0),2===d&&(p=1),3===d&&(p=4)}n.primType=p}function u(e){n.elementsCount--,delete i[e.id],e.buffer.destroy(),e.buffer=null}return{create:function(e,t){var i=r.create(null,U,!0),a=new s(i._buffer);function l(e){if(e)if("number"==typeof e)i(e),a.primType=4,a.vertCount=0|e,a.type=B;else{var t=null,r=35044,n=-1,s=-1,u=0,h=0;Array.isArray(e)||x(e)||_(e)?t=e:("data"in e&&(t=e.data),"usage"in e&&(r=E[e.usage]),"primitive"in e&&(n=F[e.primitive]),"count"in e&&(s=0|e.count),"type"in e&&(h=o[e.type]),"length"in e?u=0|e.length:(u=s,h===j||5122===h?u*=2:(h===N||5124===h)&&(u*=4))),c(a,t,r,n,s,u,h)}else i(),a.primType=4,a.vertCount=0,a.type=B;return l}return n.elementsCount++,l(e),l._reglType="elements",l._elements=a,l.subdata=function(e,t){return i.subdata(e,t),l},l.destroy=function(){u(a)},l},createStream:function(e){var t=l.pop();return t||(t=new s(r.create(null,U,!0,!1)._buffer)),c(t,e,35040,-1,-1,0,0),t},destroyStream:function(e){l.push(e)},getElements:function(e){return"function"==typeof e&&e._elements instanceof s?e._elements:null},clear:function(){b(i).forEach(u)}}}(n,k,Ce,f),Le=function(e,t,r,n,i,a,o){for(var s=r.maxAttributes,l=new Array(s),c=0;c=p.byteLength?u.subdata(p):(u.destroy(),t.buffers[c]=null)),t.buffers[c]||(u=t.buffers[c]=i.create(h,34962,!1,!0)),f.buffer=i.getBuffer(u),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1,s[c]=1):i.getBuffer(h)?(f.buffer=i.getBuffer(h),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1):i.getBuffer(h.buffer)?(f.buffer=i.getBuffer(h.buffer),f.size=0|(+h.size||f.buffer.dimension),f.normalized=!!h.normalized||!1,f.type="type"in h?S[h.type]:f.buffer.dtype,f.offset=0|(h.offset||0),f.stride=0|(h.stride||0),f.divisor=0|(h.divisor||0),f.state=1):"x"in h&&(f.x=+h.x||0,f.y=+h.y||0,f.z=+h.z||0,f.w=+h.w||0,f.state=2)}for(var d=0;d1)for(var y=0;ye&&(e=t.stats.uniformsCount)})),e},n.getMaxAttributesCount=function(){var e=0;return h.forEach((function(t){t.stats.attributesCount>e&&(e=t.stats.attributesCount)})),e}),{clear:function(){var e=t.deleteShader.bind(t);b(a).forEach(e),a={},b(o).forEach(e),o={},h.forEach((function(e){t.deleteProgram(e.program)})),h.length=0,u={},n.shaderCount=0},program:function(r,i,s,l){var c=u[i];c||(c=u[i]={});var f=c[r];if(f&&(f.refCount++,!l))return f;var m=new p(i,r);return n.shaderCount++,d(m,0,l),f||(c[r]=m),h.push(m),e(m,{destroy:function(){if(m.refCount--,m.refCount<=0){t.deleteProgram(m.program);var e=h.indexOf(m);h.splice(e,1),n.shaderCount--}c[m.vertId].refCount<=0&&(t.deleteShader(o[m.vertId]),delete o[m.vertId],delete u[m.fragId][m.vertId]),Object.keys(u[m.fragId]).length||(t.deleteShader(a[m.fragId]),delete a[m.fragId],delete u[m.fragId])}})},restore:function(){a={},o={};for(var e=0;e=0&&(m[e]=t)}));var v=Object.keys(m);n.textureFormats=v;var k=[];Object.keys(m).forEach((function(e){var t=m[e];k[t]=e}));var A=[];Object.keys(p).forEach((function(e){var t=p[e];A[t]=e}));var M=[];Object.keys(u).forEach((function(e){M[u[e]]=e}));var S=[];Object.keys(h).forEach((function(e){var t=h[e];S[t]=e}));var E=[];Object.keys(c).forEach((function(e){E[c[e]]=e}));var C=v.reduce((function(e,t){var n=m[t];return n===J||n===$||n===J||n===Q||n===te||n===re||r.ext_srgb&&(n===ne||n===ie)?e[n]=n:n===ee||t.indexOf("rgba")>=0?e[n]=X:e[n]=K,e}),{});function I(){this.internalformat=X,this.format=X,this.type=ce,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=37444,this.width=0,this.height=0,this.channels=0}function L(e,t){e.internalformat=t.internalformat,e.format=t.format,e.type=t.type,e.compressed=t.compressed,e.premultiplyAlpha=t.premultiplyAlpha,e.flipY=t.flipY,e.unpackAlignment=t.unpackAlignment,e.colorSpace=t.colorSpace,e.width=t.width,e.height=t.height,e.channels=t.channels}function P(e,t){if("object"==typeof t&&t){if("premultiplyAlpha"in t&&(e.premultiplyAlpha=t.premultiplyAlpha),"flipY"in t&&(e.flipY=t.flipY),"alignment"in t&&(e.unpackAlignment=t.alignment),"colorSpace"in t&&(e.colorSpace=f[t.colorSpace]),"type"in t){var r=t.type;e.type=p[r]}var n=e.width,i=e.height,a=e.channels,o=!1;"shape"in t?(n=t.shape[0],i=t.shape[1],3===t.shape.length&&(a=t.shape[2],o=!0)):("radius"in t&&(n=i=t.radius),"width"in t&&(n=t.width),"height"in t&&(i=t.height),"channels"in t&&(a=t.channels,o=!0)),e.width=0|n,e.height=0|i,e.channels=0|a;var s=!1;if("format"in t){var l=t.format,c=e.internalformat=m[l];e.format=C[c],l in p&&("type"in t||(e.type=p[l])),l in g&&(e.compressed=!0),s=!0}!o&&s?e.channels=be[e.format]:o&&!s&&e.channels!==_e[e.format]&&(e.format=e.internalformat=_e[e.channels])}}function z(e){t.pixelStorei(37440,e.flipY),t.pixelStorei(37441,e.premultiplyAlpha),t.pixelStorei(37443,e.colorSpace),t.pixelStorei(3317,e.unpackAlignment)}function D(){I.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function O(e,t){var r=null;if(Fe(t)?r=t:t&&(P(e,t),"x"in t&&(e.xOffset=0|t.x),"y"in t&&(e.yOffset=0|t.y),Fe(t.data)&&(r=t.data)),t.copy){var n=a.viewportWidth,i=a.viewportHeight;e.width=e.width||n-e.xOffset,e.height=e.height||i-e.yOffset,e.needsCopy=!0}else if(r){if(x(r))e.channels=e.channels||4,e.data=r,!("type"in t)&&e.type===ce&&(e.type=Be(r));else if(Pe(r))e.channels=e.channels||4,function(e,t){var r=t.length;switch(e.type){case ce:case ue:case he:case fe:var n=d.allocType(e.type,r);n.set(t),e.data=n;break;case ae:e.data=H(t)}}(e,r),e.alignment=1,e.needsFree=!0;else if(_(r)){var o=r.data;!Array.isArray(o)&&e.type===ce&&(e.type=Be(o));var s,l,c,u,h,f,p=r.shape,m=r.stride;3===p.length?(c=p[2],f=m[2]):(c=1,f=1),s=p[0],l=p[1],u=m[0],h=m[1],e.alignment=1,e.width=s,e.height=l,e.channels=c,e.format=e.internalformat=_e[c],e.needsFree=!0,function(e,t,r,n,i,a){for(var o=e.width,s=e.height,l=e.channels,c=je(e,o*s*l),u=0,h=0;h>=i,r.height>>=i,O(r,n[i]),e.mipmask|=1<=0&&!("faces"in t)&&(e.genMipmaps=!0)}if("mag"in t){var n=t.mag;e.magFilter=u[n]}var i=e.wrapS,a=e.wrapT;if("wrap"in t){var o=t.wrap;"string"==typeof o?i=a=c[o]:Array.isArray(o)&&(i=c[o[0]],a=c[o[1]])}else{if("wrapS"in t){var s=t.wrapS;i=c[s]}if("wrapT"in t){var f=t.wrapT;a=c[f]}}if(e.wrapS=i,e.wrapT=a,"anisotropic"in t&&(t.anisotropic,e.anisotropic=t.anisotropic),"mipmap"in t){var p=!1;switch(typeof t.mipmap){case"string":e.mipmapHint=l[t.mipmap],e.genMipmaps=!0,p=!0;break;case"boolean":p=e.genMipmaps=t.mipmap;break;case"object":e.genMipmaps=!1,p=!0}p&&!("min"in t)&&(e.minFilter=me)}}function Ve(e,n){t.texParameteri(n,10241,e.minFilter),t.texParameteri(n,10240,e.magFilter),t.texParameteri(n,10242,e.wrapS),t.texParameteri(n,10243,e.wrapT),r.ext_texture_filter_anisotropic&&t.texParameteri(n,34046,e.anisotropic),e.genMipmaps&&(t.hint(33170,e.mipmapHint),t.generateMipmap(n))}var qe=0,He={},Ge=n.maxTextureUnits,We=Array(Ge).map((function(){return null}));function Ze(e){I.call(this),this.mipmask=0,this.internalformat=X,this.id=qe++,this.refCount=1,this.target=e,this.texture=t.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new Ie,s.profile&&(this.stats={size:0})}function Ye(e){t.activeTexture(ve),t.bindTexture(e.target,e.texture)}function Xe(){var e=We[0];e?t.bindTexture(e.target,e.texture):t.bindTexture(W,null)}function $e(e){var r=e.texture,n=e.unit,i=e.target;n>=0&&(t.activeTexture(ve+n),t.bindTexture(i,null),We[n]=null),t.deleteTexture(r),e.texture=null,e.params=null,e.pixels=null,e.refCount=0,delete He[e.id],o.textureCount--}return e(Ze.prototype,{bind:function(){var e=this;e.bindCount+=1;var r=e.unit;if(r<0){for(var n=0;n0)continue;i.unit=-1}We[n]=e,r=n;break}s.profile&&o.maxTextureUnits>l)-o,c.height=c.height||(n.height>>l)-s,Ye(n),F(c,W,o,s,l),Xe(),N(c),i},i.resize=function(e,r){var a=0|e,o=0|r||a;if(a===n.width&&o===n.height)return i;i.width=n.width=a,i.height=n.height=o,Ye(n);for(var l=0;n.mipmask>>l;++l){var c=a>>l,u=o>>l;if(!c||!u)break;t.texImage2D(W,l,n.format,c,u,0,n.format,n.type,null)}return Xe(),s.profile&&(n.stats.size=Ue(n.internalformat,n.type,a,o,!1,!1)),i},i._reglType="texture2d",i._texture=n,s.profile&&(i.stats=n.stats),i.destroy=function(){n.decRef()},i},createCube:function(e,r,n,i,a,l){var c=new Ze(Z);He[c.id]=c,o.cubeCount++;var u=new Array(6);function h(e,t,r,n,i,a){var o,l=c.texInfo;for(Ie.call(l),o=0;o<6;++o)u[o]=ke();if("number"!=typeof e&&e){if("object"==typeof e)if(t)q(u[0],e),q(u[1],t),q(u[2],r),q(u[3],n),q(u[4],i),q(u[5],a);else if(Le(l,e),P(c,e),"faces"in e){var f=e.faces;for(o=0;o<6;++o)L(u[o],c),q(u[o],f[o])}else for(o=0;o<6;++o)q(u[o],e)}else{var p=0|e||1;for(o=0;o<6;++o)V(u[o],p,p)}for(L(c,u[0]),l.genMipmaps?c.mipmask=(u[0].width<<1)-1:c.mipmask=u[0].mipmask,c.internalformat=u[0].internalformat,h.width=u[0].width,h.height=u[0].height,Ye(c),o=0;o<6;++o)we(u[o],Y+o);for(Ve(l,Z),Xe(),s.profile&&(c.stats.size=Ue(c.internalformat,c.type,h.width,h.height,l.genMipmaps,!0)),h.format=k[c.internalformat],h.type=A[c.type],h.mag=M[l.magFilter],h.min=S[l.minFilter],h.wrapS=E[l.wrapS],h.wrapT=E[l.wrapT],o=0;o<6;++o)Ce(u[o]);return h}return h(e,r,n,i,a,l),h.subimage=function(e,t,r,n,i){var a=0|r,o=0|n,s=0|i,l=j();return L(l,c),l.width=0,l.height=0,O(l,t),l.width=l.width||(c.width>>s)-a,l.height=l.height||(c.height>>s)-o,Ye(c),F(l,Y+e,a,o,s),Xe(),N(l),h},h.resize=function(e){var r=0|e;if(r!==c.width){h.width=c.width=r,h.height=c.height=r,Ye(c);for(var n=0;n<6;++n)for(var i=0;c.mipmask>>i;++i)t.texImage2D(Y+n,i,c.format,r>>i,r>>i,0,c.format,c.type,null);return Xe(),s.profile&&(c.stats.size=Ue(c.internalformat,c.type,h.width,h.height,!1,!0)),h}},h._reglType="textureCube",h._texture=c,s.profile&&(h.stats=c.stats),h.destroy=function(){c.decRef()},h},clear:function(){for(var e=0;e>r,e.height>>r,0,e.internalformat,e.type,null);else for(var n=0;n<6;++n)t.texImage2D(Y+n,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);Ve(e.texInfo,e.target)}))},refresh:function(){for(var e=0;e=0?f=!0:c.indexOf(d)>=0&&(f=!1))),("depthTexture"in M||"depthStencilTexture"in M)&&(k=!(!M.depthTexture&&!M.depthStencilTexture)),"depth"in M&&("boolean"==typeof M.depth?s=M.depth:(_=M.depth,u=!1)),"stencil"in M&&("boolean"==typeof M.stencil?u=M.stencil:(b=M.stencil,s=!1)),"depthStencil"in M&&("boolean"==typeof M.depthStencil?s=u=M.depthStencil:(w=M.depthStencil,s=!1,u=!1))}else a=o=1;var E=null,C=null,I=null,L=null;if(Array.isArray(h))E=h.map(m);else if(h)E=[m(h)];else for(E=new Array(x),r=0;r0&&(s.depth=r[0].depth,s.stencil=r[0].stencil,s.depthStencil=r[0].depthStencil),r[a]?r[a](s):r[a]=M(s)}return e(n,{width:l,height:l,color:o})}return n(t),e(n,{faces:r,resize:function(e){var t,i=0|e;if(i===n.width)return n;var a=n.color;for(t=0;t=0;--e){var t=ot[e];t&&t(we,null,0)}n.flush(),A&&A.update()}function ft(){!ut&&ot.length>0&&(ut=s.next(ht))}function pt(){ut&&(s.cancel(ht),ut=null)}function dt(e){e.preventDefault(),pt(),st.forEach((function(e){e()}))}function mt(e){n.getError(),a.restore(),He.restore(),Ce.restore(),Qe.restore(),et.restore(),tt.restore(),Le.restore(),A&&A.restore(),rt.procs.refresh(),ft(),lt.forEach((function(e){e()}))}function gt(t){function r(e,t){var r={},n={};return Object.keys(e).forEach((function(i){var a=e[i];if(o.isDynamic(a))n[i]=o.unbox(a,i);else{if(t&&Array.isArray(a))for(var s=0;s0)return h.call(this,function(e){for(;p.length=0},read:nt,destroy:function(){ot.length=0,pt(),at&&(at.removeEventListener(Br,dt),at.removeEventListener(jr,mt)),He.clear(),tt.clear(),et.clear(),Le.clear(),Qe.clear(),Ie.clear(),Ce.clear(),A&&A.clear(),ct.forEach((function(e){e()}))},_gl:n,_refresh:wt,poll:function(){bt(),A&&A.update()},now:Tt,stats:f,getCachedCode:function(){return p},preloadCachedCode:function(e){Object.entries(e).forEach((function(e){p[e[0]]=e[1]}))}});return r.onDone(null,kt),kt}},"object"==typeof e&&typeof t<"u"?t.exports=n():r.createREGL=n()}}),dx=m({"node_modules/gl-util/context.js"(e,t){var r=ey();function n(e){if(e.container)if(e.container==document.body)document.body.style.width||(e.canvas.width=e.width||e.pixelRatio*window.innerWidth),document.body.style.height||(e.canvas.height=e.height||e.pixelRatio*window.innerHeight);else{var t=e.container.getBoundingClientRect();e.canvas.width=e.width||t.right-t.left,e.canvas.height=e.height||t.bottom-t.top}}function i(e){return"function"==typeof e.getContext&&"width"in e&&"height"in e}function a(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top=0,e.style.left=0,e}t.exports=function(e){if(e?"string"==typeof e&&(e={container:e}):e={},(e=i(e)||"string"==typeof(t=e).nodeName&&"function"==typeof t.appendChild&&"function"==typeof t.getBoundingClientRect?{container:e}:function(e){return"function"==typeof e.drawArrays||"function"==typeof e.drawElements}(e)?{gl:e}:r(e,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0)).pixelRatio||(e.pixelRatio=window.pixelRatio||1),e.gl)return e.gl;var t;if(e.canvas&&(e.container=e.canvas.parentNode),e.container){if("string"==typeof e.container){var o=document.querySelector(e.container);if(!o)throw Error("Element "+e.container+" is not found");e.container=o}i(e.container)?(e.canvas=e.container,e.container=e.canvas.parentNode):e.canvas||(e.canvas=a(),e.container.appendChild(e.canvas),n(e))}else if(!e.canvas){if(!(typeof document<"u"))throw Error("Not DOM environment. Use headless-gl.");e.container=document.body||document.documentElement,e.canvas=a(),e.container.appendChild(e.canvas),n(e)}return e.gl||["webgl","experimental-webgl","webgl-experimental"].some((function(t){try{e.gl=e.canvas.getContext(t,e.attrs)}catch{}return e.gl})),e.gl}}}),mx=m({"node_modules/font-atlas/index.js"(e,t){var r=hx(),n=[32,126];t.exports=function(e){var t=(e=e||{}).shape?e.shape:e.canvas?[e.canvas.width,e.canvas.height]:[512,512],i=e.canvas||document.createElement("canvas"),a=e.font,o="number"==typeof e.step?[e.step,e.step]:e.step||[32,32],s=e.chars||n;if(a&&"string"!=typeof a&&(a=r(a)),Array.isArray(s)){if(2===s.length&&"number"==typeof s[0]&&"number"==typeof s[1]){for(var l=[],c=s[0],u=0;c<=s[1];c++)l[u++]=String.fromCharCode(c);s=l}}else s=String(s).split("");t=t.slice(),i.width=t[0],i.height=t[1];var h=i.getContext("2d");h.fillStyle="#000",h.fillRect(0,0,i.width,i.height),h.font=a,h.textAlign="center",h.textBaseline="middle",h.fillStyle="#fff";var f=o[0]/2,p=o[1]/2;for(c=0;ct[0]-o[0]/2&&(f=o[0]/2,p+=o[1]);return i}}}),gx=m({"node_modules/bit-twiddle/twiddle.js"(e){function t(e){var t=32;return(e&=-e)&&t--,65535&e&&(t-=16),16711935&e&&(t-=8),252645135&e&&(t-=4),858993459&e&&(t-=2),1431655765&e&&(t-=1),t}e.INT_BITS=32,e.INT_MAX=2147483647,e.INT_MIN=-1<<31,e.sign=function(e){return(e>0)-(e<0)},e.abs=function(e){var t=e>>31;return(e^t)-t},e.min=function(e,t){return t^(e^t)&-(e65535)<<4,t|=r=((e>>>=t)>255)<<3,t|=r=((e>>>=r)>15)<<2,(t|=r=((e>>>=r)>3)<<1)|(e>>>=r)>>1},e.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0},e.popCount=function(e){return 16843009*((e=(858993459&(e-=e>>>1&1431655765))+(e>>>2&858993459))+(e>>>4)&252645135)>>>24},e.countTrailingZeros=t,e.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,1+((e|=e>>>8)|e>>>16)},e.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},e.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var r=new Array(256);(function(e){for(var t=0;t<256;++t){var r=t,n=t,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;e[t]=n<>>8&255]<<16|r[e>>>16&255]<<8|r[e>>>24&255]},e.interleave2=function(e,t){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))<<1},e.deinterleave2=function(e,t){return(e=65535&((e=16711935&((e=252645135&((e=858993459&((e=e>>>t&1431655765)|e>>>1))|e>>>2))|e>>>4))|e>>>16))<<16>>16},e.interleave3=function(e,t,r){return e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2),(e|=(t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},e.deinterleave3=function(e,t){return(e=1023&((e=4278190335&((e=251719695&((e=3272356035&((e=e>>>t&1227133513)|e>>>2))|e>>>4))|e>>>8))|e>>>16))<<22>>22},e.nextCombination=function(e){var r=e|e-1;return r+1|(~r&-~r)-1>>>t(e)+1}}}),yx=m({"node_modules/dup/dup.js"(e,t){function r(e,t,n){var i=0|e[n];if(i<=0)return[];var a,o=new Array(i);if(n===e.length-1)for(a=0;a"u"&&(t=0),typeof e){case"number":if(e>0)return function(e,t){var r,n;for(r=new Array(e),n=0;n0?n.pop():new ArrayBuffer(e)}function f(e){return new Uint8Array(h(e),0,e)}function p(e){return new Uint16Array(h(2*e),0,e)}function d(e){return new Uint32Array(h(4*e),0,e)}function m(e){return new Int8Array(h(e),0,e)}function g(e){return new Int16Array(h(2*e),0,e)}function y(e){return new Int32Array(h(4*e),0,e)}function v(e){return new Float32Array(h(4*e),0,e)}function x(e){return new Float64Array(h(8*e),0,e)}function _(e){return i?new Uint8ClampedArray(h(e),0,e):f(e)}function b(e){return a?new BigUint64Array(h(8*e),0,e):null}function w(e){return o?new BigInt64Array(h(8*e),0,e):null}function T(e){return new DataView(h(e),0,e)}function k(e){e=t.nextPow2(e);var r=t.log2(e),i=c[r];return i.length>0?i.pop():new n(e)}e.free=function(e){if(n.isBuffer(e))c[t.log2(e.length)].push(e);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(e)&&(e=e.buffer),!e)return;var r=e.length||e.byteLength,i=0|t.log2(r);l[i].push(e)}},e.freeUint8=e.freeUint16=e.freeUint32=e.freeBigUint64=e.freeInt8=e.freeInt16=e.freeInt32=e.freeBigInt64=e.freeFloat32=e.freeFloat=e.freeFloat64=e.freeDouble=e.freeUint8Clamped=e.freeDataView=function(e){u(e.buffer)},e.freeArrayBuffer=u,e.freeBuffer=function(e){c[t.log2(e.length)].push(e)},e.malloc=function(e,t){if(void 0===t||"arraybuffer"===t)return h(e);switch(t){case"uint8":return f(e);case"uint16":return p(e);case"uint32":return d(e);case"int8":return m(e);case"int16":return g(e);case"int32":return y(e);case"float":case"float32":return v(e);case"double":case"float64":return x(e);case"uint8_clamped":return _(e);case"bigint64":return w(e);case"biguint64":return b(e);case"buffer":return k(e);case"data":case"dataview":return T(e);default:return null}return null},e.mallocArrayBuffer=h,e.mallocUint8=f,e.mallocUint16=p,e.mallocUint32=d,e.mallocInt8=m,e.mallocInt16=g,e.mallocInt32=y,e.mallocFloat32=e.mallocFloat=v,e.mallocFloat64=e.mallocDouble=x,e.mallocUint8Clamped=_,e.mallocBigUint64=b,e.mallocBigInt64=w,e.mallocDataView=T,e.mallocBuffer=k,e.clearCache=function(){for(var e=0;e<32;++e)s.UINT8[e].length=0,s.UINT16[e].length=0,s.UINT32[e].length=0,s.INT8[e].length=0,s.INT16[e].length=0,s.INT32[e].length=0,s.FLOAT[e].length=0,s.DOUBLE[e].length=0,s.BIGUINT64[e].length=0,s.BIGINT64[e].length=0,s.UINT8C[e].length=0,l[e].length=0,c[e].length=0}}}),xx=m({"node_modules/is-plain-obj/index.js"(e,t){var r=Object.prototype.toString;t.exports=function(e){var t;return"[object Object]"===r.call(e)&&(null===(t=Object.getPrototypeOf(e))||t===Object.getPrototypeOf({}))}}}),_x=m({"node_modules/parse-unit/index.js"(e,t){t.exports=function(e,t){t||(t=[0,""]),e=String(e);var r=parseFloat(e,10);return t[0]=r,t[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t}}}),bx=m({"node_modules/to-px/topx.js"(e,t){var r=_x();function n(e,t){var n=r(getComputedStyle(e).getPropertyValue(t));return n[0]*i(n[1],e)}function i(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":return function(e,t){var r=document.createElement("div");r.style["font-size"]="128"+e,t.appendChild(r);var i=n(r,"font-size")/128;return t.removeChild(r),i}(e,t);case"em":return n(t,"font-size");case"rem":return n(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return 96;case"cm":return 96/2.54;case"mm":return 96/25.4;case"pt":return 96/72;case"pc":return 16}return 1}t.exports=i}}),wx=m({"node_modules/detect-kerning/index.js"(e,t){t.exports=i;var r=(i.canvas=document.createElement("canvas")).getContext("2d"),n=a([32,126]);function i(e,t){Array.isArray(e)&&(e=e.join(", "));var i,o={},s=16,l=.05;t&&(2===t.length&&"number"==typeof t[0]?i=a(t):Array.isArray(t)?i=t:(t.o?i=a(t.o):t.pairs&&(i=t.pairs),t.fontSize&&(s=t.fontSize),null!=t.threshold&&(l=t.threshold))),i||(i=n),r.font=s+"px "+e;for(var c=0;cs*l){var p=(f-h)/s;o[u]=1e3*p}}return o}function a(e){for(var t=[],r=e[0];r<=e[1];r++)for(var n=String.fromCharCode(r),i=e[0];i0;n-=4)if(0!==r[n])return Math.floor(.25*(n-3)/t)}t.exports=r,r.canvas=document.createElement("canvas"),r.cache={}}}),kx=m({"node_modules/gl-text/dist.js"(e,t){var r=fx(),n=ey(),i=px(),a=dx(),o=$v(),s=em(),l=mx(),c=vx(),u=ty(),h=xx(),f=_x(),p=bx(),d=wx(),m=Ay(),g=Tx(),y=iy(),v=gx().nextPow2,x=new o,_=!1;document.body&&((b=document.body.appendChild(document.createElement("div"))).style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(b).fontStretch&&(_=!0),document.body.removeChild(b));var b,w=function(e){var t;"function"==typeof(t=e)&&t._gl&&t.prop&&t.texture&&t.buffer?(e={regl:e},this.gl=e.regl._gl):this.gl=a(e),this.shader=x.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=e.regl||i({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),x.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(h(e)?e:{})};w.prototype.createShader=function(){var e=this.regl,t=e({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:e.prop("count"),offset:e.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:e.this("sizeBuffer")},width:{offset:0,stride:8,buffer:e.this("sizeBuffer")},char:e.this("charBuffer"),position:e.this("position")},uniforms:{atlasSize:function(e,t){return[t.atlas.width,t.atlas.height]},atlasDim:function(e,t){return[t.atlas.cols,t.atlas.rows]},atlas:function(e,t){return t.atlas.texture},charStep:function(e,t){return t.atlas.step},em:function(e,t){return t.atlas.em},color:e.prop("color"),opacity:e.prop("opacity"),viewport:e.this("viewportArray"),scale:e.this("scale"),align:e.prop("align"),baseline:e.prop("baseline"),translate:e.this("translate"),positionOffset:e.prop("positionOffset")},primitive:"points",viewport:e.this("viewport"),vert:"\n\t\t\tprecision highp float;\n\t\t\tattribute float width, charOffset, char;\n\t\t\tattribute vec2 position;\n\t\t\tuniform float fontSize, charStep, em, align, baseline;\n\t\t\tuniform vec4 viewport;\n\t\t\tuniform vec4 color;\n\t\t\tuniform vec2 atlasSize, atlasDim, scale, translate, positionOffset;\n\t\t\tvarying vec2 charCoord, charId;\n\t\t\tvarying float charWidth;\n\t\t\tvarying vec4 fontColor;\n\t\t\tvoid main () {\n\t\t\t\tvec2 offset = floor(em * (vec2(align + charOffset, baseline)\n\t\t\t\t\t+ vec2(positionOffset.x, -positionOffset.y)))\n\t\t\t\t\t/ (viewport.zw * scale.xy);\n\n\t\t\t\tvec2 position = (position + translate) * scale;\n\t\t\t\tposition += offset * scale;\n\n\t\t\t\tcharCoord = position * viewport.zw + viewport.xy;\n\n\t\t\t\tgl_Position = vec4(position * 2. - 1., 0, 1);\n\n\t\t\t\tgl_PointSize = charStep;\n\n\t\t\t\tcharId.x = mod(char, atlasDim.x);\n\t\t\t\tcharId.y = floor(char / atlasDim.x);\n\n\t\t\t\tcharWidth = width * em;\n\n\t\t\t\tfontColor = color / 255.;\n\t\t\t}",frag:"\n\t\t\tprecision highp float;\n\t\t\tuniform float fontSize, charStep, opacity;\n\t\t\tuniform vec2 atlasSize;\n\t\t\tuniform vec4 viewport;\n\t\t\tuniform sampler2D atlas;\n\t\t\tvarying vec4 fontColor;\n\t\t\tvarying vec2 charCoord, charId;\n\t\t\tvarying float charWidth;\n\n\t\t\tfloat lightness(vec4 color) {\n\t\t\t\treturn color.r * 0.299 + color.g * 0.587 + color.b * 0.114;\n\t\t\t}\n\n\t\t\tvoid main () {\n\t\t\t\tvec2 uv = gl_FragCoord.xy - charCoord + charStep * .5;\n\t\t\t\tfloat halfCharStep = floor(charStep * .5 + .5);\n\n\t\t\t\t// invert y and shift by 1px (FF expecially needs that)\n\t\t\t\tuv.y = charStep - uv.y;\n\n\t\t\t\t// ignore points outside of character bounding box\n\t\t\t\tfloat halfCharWidth = ceil(charWidth * .5);\n\t\t\t\tif (floor(uv.x) > halfCharStep + halfCharWidth ||\n\t\t\t\t\tfloor(uv.x) < halfCharStep - halfCharWidth) return;\n\n\t\t\t\tuv += charId * charStep;\n\t\t\t\tuv = uv / atlasSize;\n\n\t\t\t\tvec4 color = fontColor;\n\t\t\t\tvec4 mask = texture2D(atlas, uv);\n\n\t\t\t\tfloat maskY = lightness(mask);\n\t\t\t\t// float colorY = lightness(color);\n\t\t\t\tcolor.a *= maskY;\n\t\t\t\tcolor.a *= opacity;\n\n\t\t\t\t// color.a += .1;\n\n\t\t\t\t// antialiasing, see yiq color space y-channel formula\n\t\t\t\t// color.rgb += (1. - color.rgb) * (1. - mask.rgb);\n\n\t\t\t\tgl_FragColor = color;\n\t\t\t}"});return{regl:e,draw:t,atlas:{}}},w.prototype.update=function(e){var t=this;if("string"==typeof e)e={text:e};else if(!e)return;null!=(e=n(e,{position:"position positions coord coords coordinates",font:"font fontFace fontface typeface cssFont css-font family fontFamily",fontSize:"fontSize fontsize size font-size",text:"text texts chars characters value values symbols",align:"align alignment textAlign textbaseline",baseline:"baseline textBaseline textbaseline",direction:"dir direction textDirection",color:"color colour fill fill-color fillColor textColor textcolor",kerning:"kerning kern",range:"range dataBox",viewport:"vp viewport viewBox viewbox viewPort",opacity:"opacity alpha transparency visible visibility opaque",offset:"offset positionOffset padding shift indent indentation"},!0)).opacity&&(Array.isArray(e.opacity)?this.opacity=e.opacity.map((function(e){return parseFloat(e)})):this.opacity=parseFloat(e.opacity)),null!=e.viewport&&(this.viewport=u(e.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null==this.viewport&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null!=e.kerning&&(this.kerning=e.kerning),null!=e.offset&&("number"==typeof e.offset&&(e.offset=[e.offset,0]),this.positionOffset=y(e.offset)),e.direction&&(this.direction=e.direction),e.range&&(this.range=e.range,this.scale=[1/(e.range[2]-e.range[0]),1/(e.range[3]-e.range[1])],this.translate=[-e.range[0],-e.range[1]]),e.scale&&(this.scale=e.scale),e.translate&&(this.translate=e.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!e.font&&(e.font=w.baseFontSize+"px sans-serif");var i,a=!1,o=!1;if(e.font&&(Array.isArray(e.font)?e.font:[e.font]).forEach((function(e,n){if("string"==typeof e)try{e=r.parse(e)}catch{e=r.parse(w.baseFontSize+"px "+e)}else{var i=e.style,s=e.weight,l=e.stretch,c=e.variant;e=r.parse(r.stringify(e)),i&&(e.style=i),s&&(e.weight=s),l&&(e.stretch=l),c&&(e.variant=c)}var u=r.stringify({size:w.baseFontSize,family:e.family,stretch:_?e.stretch:void 0,variant:e.variant,weight:e.weight,style:e.style}),h=f(e.size),d=Math.round(h[0]*p(h[1]));if(d!==t.fontSize[n]&&(o=!0,t.fontSize[n]=d),!(t.font[n]&&u==t.font[n].baseString||(a=!0,t.font[n]=w.fonts[u],t.font[n]))){var m=e.family.join(", "),y=[e.style];e.style!=e.variant&&y.push(e.variant),e.variant!=e.weight&&y.push(e.weight),_&&e.weight!=e.stretch&&y.push(e.stretch),t.font[n]={baseString:u,family:m,weight:e.weight,stretch:e.stretch,style:e.style,variant:e.variant,width:{},kerning:{},metrics:g(m,{origin:"top",fontSize:w.baseFontSize,fontStyle:y.join(" ")})},w.fonts[u]=t.font[n]}})),(a||o)&&this.font.forEach((function(n,i){var a=r.stringify({size:t.fontSize[i],family:n.family,stretch:_?n.stretch:void 0,variant:n.variant,weight:n.weight,style:n.style});if(t.fontAtlas[i]=t.shader.atlas[a],!t.fontAtlas[i]){var o=n.metrics;t.shader.atlas[a]=t.fontAtlas[i]={fontString:a,step:2*Math.ceil(t.fontSize[i]*o.bottom*.5),em:t.fontSize[i],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:t.regl.texture()}}null==e.text&&(e.text=t.text)})),"string"==typeof e.text&&e.position&&e.position.length>2){for(var h=Array(.5*e.position.length),x=0;x2){for(var T=!e.position[0].length,k=c.mallocFloat(2*this.count),A=0,M=0;A1?t.align[r]:t.align[0]:t.align;if("number"==typeof n)return n;switch(n){case"right":case"end":return-e;case"center":case"centre":case"middle":return.5*-e}return 0}))),null==this.baseline&&null==e.baseline&&(e.baseline=0),null!=e.baseline&&(this.baseline=e.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map((function(e,r){var n=(t.font[r]||t.font[0]).metrics,i=0;return i+=.5*n.bottom,-1*(i+="number"==typeof e?e-n.baseline:-n[e])}))),null!=e.color)if(e.color||(e.color="transparent"),"string"!=typeof e.color&&isNaN(e.color)){var H;if("number"==typeof e.color[0]&&e.color.length>this.counts.length){var G=e.color.length;H=c.mallocUint8(G);for(var W=(e.color.subarray||e.color.slice).bind(e.color),Z=0;Z4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var $=Math.max(.5*this.position.length||0,.25*this.color.length||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,.5*this.positionOffset.length||0);this.batch=Array($);for(var K=0;K1?this.counts[K]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[K]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*K,4*K+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[K]:this.opacity,baseline:null!=this.baselineOffset[K]?this.baselineOffset[K]:this.baselineOffset[0],align:this.align?null!=this.alignOffset[K]?this.alignOffset[K]:this.alignOffset[0]:0,atlas:this.fontAtlas[K]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*K,2*K+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]},w.prototype.destroy=function(){},w.prototype.kerning=!0,w.prototype.position={constant:new Float32Array(2)},w.prototype.translate=null,w.prototype.scale=null,w.prototype.font=null,w.prototype.text="",w.prototype.positionOffset=[0,0],w.prototype.opacity=1,w.prototype.color=new Uint8Array([0,0,0,255]),w.prototype.alignOffset=[0,0],w.maxAtlasSize=1024,w.atlasCanvas=document.createElement("canvas"),w.atlasContext=w.atlasCanvas.getContext("2d",{alpha:!1}),w.baseFontSize=64,w.fonts={},t.exports=w}}),Ax=m({"node_modules/@plotly/regl/dist/regl.unchecked.js"(e,t){var r,n;r=e,n=function(){var e=function(e,t){for(var r=Object.keys(t),n=0;n1&&t===r&&('"'===t||"'"===t))return['"'+n(e.substr(1,e.length-2))+'"'];var a=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(e);if(a)return i(e.substr(0,a.index)).concat(i(a[1])).concat(i(e.substr(a.index+a[0].length)));var o=e.split(".");if(1===o.length)return['"'+n(e)+'"'];for(var s=[],l=0;l65535)<<4,t|=r=((e>>>=t)>255)<<3,t|=r=((e>>>=r)>15)<<2,(t|=r=((e>>>=r)>3)<<1)|(e>>>=r)>>1}function p(){var e=h(8,(function(){return[]}));function t(t){var r=function(e){for(var t=16;t<=1<<28;t*=16)if(e<=t)return t;return 0}(t),n=e[f(r)>>2];return n.length>0?n.pop():new ArrayBuffer(r)}function r(t){e[f(t.byteLength)>>2].push(t)}return{alloc:t,free:r,allocType:function(e,r){var n=null;switch(e){case 5120:n=new Int8Array(t(r),0,r);break;case 5121:n=new Uint8Array(t(r),0,r);break;case 5122:n=new Int16Array(t(2*r),0,r);break;case 5123:n=new Uint16Array(t(2*r),0,r);break;case 5124:n=new Int32Array(t(4*r),0,r);break;case 5125:n=new Uint32Array(t(4*r),0,r);break;case 5126:n=new Float32Array(t(4*r),0,r);break;default:return null}return n.length!==r?n.subarray(0,r):n},freeType:function(e){r(e.buffer)}}}var d=p();d.zero=p();var m=3553,g=6408,y=5126,v=36160,x=function(e){return e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Float32Array||e instanceof Float64Array||e instanceof Uint8ClampedArray};function _(e){return!!e&&"object"==typeof e&&Array.isArray(e.shape)&&Array.isArray(e.stride)&&"number"==typeof e.offset&&e.shape.length===e.stride.length&&(Array.isArray(e.data)||x(e.data))}var b=function(e){return Object.keys(e).map((function(t){return e[t]}))},w=function(e){for(var t=[],r=e;r.length;r=r[0])t.push(r.length);return t},T=function(e,t,r,n){var i=1;if(t.length)for(var a=0;a>>31<<15,a=(n<<1>>>24)-127,o=n>>13&1023;if(a<-24)t[r]=i;else if(a<-14){var s=-14-a;t[r]=i+(o+1024>>s)}else t[r]=a>15?i+31744:i+(a+15<<10)+o}return t}function G(e){return Array.isArray(e)||x(e)}var W=3553,Z=34067,Y=34069,X=6408,$=6406,K=6407,J=6409,Q=6410,ee=32855,te=6402,re=34041,ne=35904,ie=35906,ae=36193,oe=33776,se=33777,le=33778,ce=5121,ue=5123,he=5125,fe=5126,pe=33071,de=9728,me=9984,ge=9987,ye=4352,ve=33984,xe=[me,9986,9985,ge],_e=[0,J,Q,K,X],be={};function we(e){return"[object "+e+"]"}be[J]=be[$]=be[te]=1,be[re]=be[Q]=2,be[K]=be[ne]=3,be[X]=be[ie]=4;var Te=we("HTMLCanvasElement"),ke=we("OffscreenCanvas"),Ae=we("CanvasRenderingContext2D"),Me=we("ImageBitmap"),Se=we("HTMLImageElement"),Ee=we("HTMLVideoElement"),Ce=Object.keys(M).concat([Te,ke,Ae,Me,Se,Ee]),Ie=[];Ie[ce]=1,Ie[fe]=4,Ie[ae]=2,Ie[ue]=2,Ie[he]=4;var Le=[];function Pe(e){return Array.isArray(e)&&(0===e.length||"number"==typeof e[0])}function ze(e){return!!Array.isArray(e)&&!(0===e.length||!G(e[0]))}function De(e){return Object.prototype.toString.call(e)}function Oe(e){return De(e)===Te}function Re(e){return De(e)===ke}function Fe(e){if(!e)return!1;var t=De(e);return Ce.indexOf(t)>=0||Pe(e)||ze(e)||_(e)}function Be(e){return 0|M[Object.prototype.toString.call(e)]}function je(e,t){return d.allocType(e.type===ae?fe:e.type,t)}function Ne(e,t){e.type===ae?(e.data=H(t),d.freeType(t)):e.data=t}function Ue(e,t,r,n,i,a){var o;if(o=typeof Le[e]<"u"?Le[e]:be[e]*Ie[t],a&&(o*=6),i){for(var s=0,l=r;l>=1;)s+=o*l*l,l/=2;return s}return o*r*n}Le[32854]=2,Le[ee]=2,Le[36194]=2,Le[re]=4,Le[oe]=.5,Le[se]=.5,Le[le]=1,Le[33779]=1,Le[35986]=.5,Le[35987]=1,Le[34798]=1,Le[35840]=.5,Le[35841]=.25,Le[35842]=.5,Le[35843]=.25,Le[36196]=.5;var Ve=36161,qe=32854,He=[];function Ge(e,t,r){return He[e]*t*r}He[qe]=2,He[32855]=2,He[36194]=2,He[33189]=2,He[36168]=1,He[34041]=4,He[35907]=4,He[34836]=16,He[34842]=8,He[34843]=6;var We=36160,Ze=36161,Ye=3553,Xe=[];Xe[6408]=4,Xe[6407]=3;var $e=[];$e[5121]=1,$e[5126]=4,$e[36193]=2;var Ke=34963;function Je(){this.state=0,this.x=0,this.y=0,this.z=0,this.w=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.offset=0,this.stride=0,this.divisor=0}function Qe(e){return function(e){for(var t,r="0123456789abcdef",n="",i=0;i>>4&15)+r.charAt(15&t);return n}(function(e){return function(e){for(var t="",r=0;r<32*e.length;r+=8)t+=String.fromCharCode(e[r>>5]>>>24-r%32&255);return t}(function(e,t){var r,n,i,a,o,s,l,c,u,h,f,p,d=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),m=new Array(64);for(e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t,u=0;u>2),r=0;r>5]|=(255&e.charCodeAt(r/8))<<24-r%32;return t}(e),8*e.length))}(function(e){for(var t,r,n="",i=-1;++i>>6&31,128|63&t):t<=65535?n+=String.fromCharCode(224|t>>>12&15,128|t>>>6&63,128|63&t):t<=2097151&&(n+=String.fromCharCode(240|t>>>18&7,128|t>>>12&63,128|t>>>6&63,128|63&t));return n}(e)))}function et(e,t){return e>>>t|e<<32-t}function tt(e,t){return e>>>t}function rt(e,t,r){return e&t^~e&r}function nt(e,t,r){return e&t^e&r^t&r}function it(e){return et(e,2)^et(e,13)^et(e,22)}function at(e){return et(e,6)^et(e,11)^et(e,25)}function ot(e){return et(e,7)^et(e,18)^tt(e,3)}function st(e){return et(e,17)^et(e,19)^tt(e,10)}var lt=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function ct(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function ut(e){return Array.prototype.slice.call(e)}function ht(e){return ut(e).join("")}var ft="xyzw".split(""),pt="dither",dt="blend.enable",mt="blend.color",gt="blend.equation",yt="blend.func",vt="depth.enable",xt="depth.func",_t="depth.range",bt="depth.mask",wt="colorMask",Tt="cull.enable",kt="cull.face",At="frontFace",Mt="lineWidth",St="polygonOffset.enable",Et="polygonOffset.offset",Ct="sample.alpha",It="sample.enable",Lt="sample.coverage",Pt="stencil.enable",zt="stencil.mask",Dt="stencil.func",Ot="stencil.opFront",Rt="stencil.opBack",Ft="scissor.enable",Bt="scissor.box",jt="viewport",Nt="profile",Ut="framebuffer",Vt="vert",qt="frag",Ht="elements",Gt="primitive",Wt="count",Zt="offset",Yt="instances",Xt="vao",$t="Width",Kt="Height",Jt=Ut+$t,Qt=Ut+Kt,er=jt+$t,tr=jt+Kt,rr="drawingBuffer",nr=rr+$t,ir=rr+Kt,ar=[yt,gt,Dt,Ot,Rt,Lt,jt,Bt,Et],or=34962,sr=34963,lr=35664,cr=35665,ur=35666,hr=35667,fr=35668,pr=35669,dr=35671,mr=35672,gr=35673,yr=35674,vr=35675,xr=35676,_r=35678,br=35680,wr=1028,Tr=1029,kr=2305,Ar=7680,Mr={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Sr={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Er={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Cr={cw:2304,ccw:kr};function Ir(e){return Array.isArray(e)||x(e)||_(e)}function Lr(e){return e.sort((function(e,t){return e===jt?-1:t===jt?1:e=1,n>=2,t)}if(4===r){var i=e.data;return new Pr(i.thisDep,i.contextDep,i.propDep,t)}if(5===r)return new Pr(!1,!1,!1,t);if(6===r){for(var a=!1,o=!1,s=!1,l=0;l=1&&(o=!0),u>=2&&(s=!0)}else 4===c.type&&(a=a||c.data.thisDep,o=o||c.data.contextDep,s=s||c.data.propDep)}return new Pr(a,o,s,t)}return new Pr(3===r,2===r,1===r,t)}var Rr=new Pr(!1,!1,!1,(function(){}));function Fr(t,r,n,i,a,s,l,c,u,f,p,d,m,g,y,v){var x=f.Record,_={add:32774,subtract:32778,"reverse subtract":32779};n.ext_blend_minmax&&(_.min=32775,_.max=32776);var b=n.angle_instanced_arrays,w=n.webgl_draw_buffers,T=n.oes_vertex_array_object,k={dirty:!0,profile:v.profile},A={},M=[],E={},C={};function I(e){return e.replace(".","_")}function L(e,t,r){var n=I(e);M.push(e),A[n]=k[n]=!!r,E[n]=t}function P(e,t,r){var n=I(e);M.push(e),Array.isArray(r)?(k[n]=r.slice(),A[n]=r.slice()):k[n]=A[n]=r,C[n]=t}function z(e){return!!isNaN(e)}L(pt,3024),L(dt,3042),P(mt,"blendColor",[0,0,0,0]),P(gt,"blendEquationSeparate",[32774,32774]),P(yt,"blendFuncSeparate",[1,0,1,0]),L(vt,2929,!0),P(xt,"depthFunc",513),P(_t,"depthRange",[0,1]),P(bt,"depthMask",!0),P(wt,wt,[!0,!0,!0,!0]),L(Tt,2884),P(kt,"cullFace",Tr),P(At,At,kr),P(Mt,Mt,1),L(St,32823),P(Et,"polygonOffset",[0,0]),L(Ct,32926),L(It,32928),P(Lt,"sampleCoverage",[1,!1]),L(Pt,2960),P(zt,"stencilMask",-1),P(Dt,"stencilFunc",[519,0,-1]),P(Ot,"stencilOpSeparate",[wr,Ar,Ar,Ar]),P(Rt,"stencilOpSeparate",[Tr,Ar,Ar,Ar]),L(Ft,3089),P(Bt,"scissor",[0,0,t.drawingBufferWidth,t.drawingBufferHeight]),P(jt,jt,[0,0,t.drawingBufferWidth,t.drawingBufferHeight]);var D={gl:t,context:m,strings:r,next:A,current:k,draw:d,elements:s,buffer:a,shader:p,attributes:f.state,vao:f,uniforms:u,framebuffer:c,extensions:n,timer:g,isBufferArgs:Ir},O={primTypes:F,compareFuncs:Sr,blendFuncs:Mr,blendEquations:_,stencilOps:Er,glTypes:S,orientationType:Cr};w&&(O.backBuffer=[Tr],O.drawBuffer=h(i.maxDrawbuffers,(function(e){return 0===e?[0]:h(e,(function(e){return 36064+e}))})));var R=0;function B(){var t=function(t){var r=t&&t.cache,n=0,i=[],a=[],o=[];function s(){var t=[],r=[];return e((function(){t.push.apply(t,ut(arguments))}),{def:function(){var e="v"+n++;return r.push(e),arguments.length>0&&(t.push(e,"="),t.push.apply(t,ut(arguments)),t.push(";")),e},toString:function(){return ht([r.length>0?"var "+r.join(",")+";":"",ht(t)])}})}function l(){var t=s(),r=s(),n=t.toString,i=r.toString;function a(e,n){r(e,n,"=",t.def(e,n),";")}return e((function(){t.apply(t,ut(arguments))}),{def:t.def,entry:t,exit:r,save:a,set:function(e,r,n){a(e,r),t(e,r,"=",n,";")},toString:function(){return n()+i()}})}var c=s(),u={};return{global:c,link:function(e,t){var r=t&&t.stable;if(!r)for(var s=0;s"u"?"Date.now()":"performance.now()"}function d(e){e(a=t.def(),"=",p(),";"),"string"==typeof i?e(c,".count+=",i,";"):e(c,".count++;"),g&&(n?e(o=t.def(),"=",h,".getNumPendingQueries();"):e(h,".beginQuery(",c,");"))}function m(e){e(c,".cpuTime+=",p(),"-",a,";"),g&&(n?e(h,".pushScopeStats(",o,",",h,".getNumPendingQueries(),",c,");"):e(h,".endQuery();"))}function y(e){var r=t.def(u,".profile");t(u,".profile=",e,";"),t.exit(u,".profile=",r,";")}if(f){if(zr(f))return void(f.enable?(d(t),m(t.exit),y("true")):y("false"));y(s=f.append(e,t))}else s=t.def(u,".profile");var v=e.block();d(v),t("if(",s,"){",v,"}");var x=e.block();m(x),t.exit("if(",s,"){",x,"}")}function W(e,t,r,n,i){var a=e.shared;n.forEach((function(n){var o,s=n.name,l=r.attributes[s];if(l){if(!i(l))return;o=l.append(e,t)}else{if(!i(Rr))return;var c=e.scopeAttrib(s);o={},Object.keys(new x).forEach((function(e){o[e]=t.def(c,".",e)}))}!function(r,n,i){var o=a.gl,s=t.def(r,".location"),l=t.def(a.attributes,"[",s,"]"),c=i.state,u=i.buffer,h=[i.x,i.y,i.z,i.w],f=["buffer","normalized","offset","stride"];function p(){t("if(!",l,".buffer){",o,".enableVertexAttribArray(",s,");}");var r,a=i.type;if(r=i.size?t.def(i.size,"||",n):n,t("if(",l,".type!==",a,"||",l,".size!==",r,"||",f.map((function(e){return l+"."+e+"!=="+i[e]})).join("||"),"){",o,".bindBuffer(",or,",",u,".buffer);",o,".vertexAttribPointer(",[s,r,a,i.normalized,i.stride,i.offset],");",l,".type=",a,";",l,".size=",r,";",f.map((function(e){return l+"."+e+"="+i[e]+";"})).join(""),"}"),b){var c=i.divisor;t("if(",l,".divisor!==",c,"){",e.instancing,".vertexAttribDivisorANGLE(",[s,c],");",l,".divisor=",c,";}")}}function d(){t("if(",l,".buffer){",o,".disableVertexAttribArray(",s,");",l,".buffer=null;","}if(",ft.map((function(e,t){return l+"."+e+"!=="+h[t]})).join("||"),"){",o,".vertexAttrib4f(",s,",",h,");",ft.map((function(e,t){return l+"."+e+"="+h[t]+";"})).join(""),"}")}1===c?p():2===c?d():(t("if(",c,"===",1,"){"),p(),t("}else{"),d(),t("}"))}(e.link(n),function(e){switch(e){case lr:case hr:case dr:return 2;case cr:case fr:case mr:return 3;case ur:case pr:case gr:return 4;default:return 1}}(n.info.type),o)}))}function Z(e,t,n,i,a,o){for(var s,l=e.shared,c=l.gl,u=0;u1){for(var M=[],S=[],E=0;E>1)",p],");")}function t(){r(d,".drawArraysInstancedANGLE(",[m,g,y,p],");")}h&&"null"!==h?x?e():(r("if(",h,"){"),e(),r("}else{"),t(),r("}")):t()}function w(){function e(){r(l+".drawElements("+[m,y,v,g+"<<(("+v+"-5121)>>1)"]+");")}function t(){r(l+".drawArrays("+[m,g,y]+");")}h&&"null"!==h?x?e():(r("if(",h,"){"),e(),r("}else{"),t(),r("}")):t()}b&&("number"!=typeof p||p>=0)?"string"==typeof p?(r("if(",p,">0){"),_(),r("}else if(",p,"<0){"),w(),r("}")):_():w()}function X(e,t,r,n,i){var a=B(),o=a.proc("body",i);return b&&(a.instancing=o.def(a.shared.extensions,".angle_instanced_arrays")),e(a,o,r,n),a.compile().body}function $(e,t,r,n){q(e,t),r.useVAO?r.drawVAO?t(e.shared.vao,".setVAO(",r.drawVAO.append(e,t),");"):t(e.shared.vao,".setVAO(",e.shared.vao,".targetVAO);"):(t(e.shared.vao,".setVAO(null);"),W(e,t,r,n.attributes,(function(){return!0}))),Z(e,t,r,n.uniforms,(function(){return!0}),!1),Y(e,t,t,r)}function K(e,t,r,n){function i(){return!0}e.batchId="a1",q(e,t),W(e,t,r,n.attributes,i),Z(e,t,r,n.uniforms,i,!1),Y(e,t,t,r)}function J(e,t,r,n){q(e,t);var i=r.contextDep,a=t.def(),o=t.def();e.shared.props=o,e.batchId=a;var s=e.scope(),l=e.scope();function c(e){return e.contextDep&&i||e.propDep}function u(e){return!c(e)}if(t(s.entry,"for(",a,"=0;",a,"<","a1",";++",a,"){",o,"=","a0","[",a,"];",l,"}",s.exit),r.needsContext&&j(e,l,r.context),r.needsFramebuffer&&N(e,l,r.framebuffer),V(e,l,r.state,c),r.profile&&c(r.profile)&&H(e,l,r,!1,!0),n)r.useVAO?r.drawVAO?c(r.drawVAO)?l(e.shared.vao,".setVAO(",r.drawVAO.append(e,l),");"):s(e.shared.vao,".setVAO(",r.drawVAO.append(e,s),");"):s(e.shared.vao,".setVAO(",e.shared.vao,".targetVAO);"):(s(e.shared.vao,".setVAO(null);"),W(e,s,r,n.attributes,u),W(e,l,r,n.attributes,c)),Z(e,s,r,n.uniforms,u,!1),Z(e,l,r,n.uniforms,c,!0),Y(e,s,l,r);else{var h=e.global.def("{}"),f=r.shader.progVar.append(e,l),p=l.def(f,".id"),d=l.def(h,"[",p,"]");l(e.shared.gl,".useProgram(",f,".program);","if(!",d,"){",d,"=",h,"[",p,"]=",e.link((function(e){return X(K,0,r,e,2)})),"(",f,");}",d,".call(this,a0[",a,"],",a,");")}}function Q(e,t,r){var n=t.static[r];if(n&&function(e){if("object"==typeof e&&!G(e)){for(var t=Object.keys(e),r=0;r0)return null;var n=t.static,i=Object.keys(n);if(i.length>0&&"number"==typeof n[i[0]]){for(var a=[],o=0;o0,w={framebuffer:u,draw:m,shader:y,state:g,dirty:b,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(w.profile=function(e){var t,r=e.static,n=e.dynamic;if(Nt in r){var i=!!r[Nt];(t=Dr((function(e,t){return i}))).enable=i}else if(Nt in n){var a=n[Nt];t=Or(a,(function(e,t){return e.invoke(t,a)}))}return t}(e),w.uniforms=function(e){var t=e.static,r=e.dynamic,n={};return Object.keys(t).forEach((function(e){var r,i=t[e];if("number"==typeof i||"boolean"==typeof i)r=Dr((function(){return i}));else if("function"==typeof i){var a=i._reglType;"texture2d"===a||"textureCube"===a?r=Dr((function(e){return e.link(i)})):("framebuffer"===a||"framebufferCube"===a)&&(r=Dr((function(e){return e.link(i.color[0])})))}else G(i)&&(r=Dr((function(e){return e.global.def("[",h(i.length,(function(e){return i[e]})),"]")})));r.value=i,n[e]=r})),Object.keys(r).forEach((function(e){var t=r[e];n[e]=Or(t,(function(e,r){return e.invoke(r,t)}))})),n}(i),w.drawVAO=w.scopeVAO=m.vao,!w.drawVAO&&y.program&&!l&&n.angle_instanced_arrays&&m.static.elements){var T=!0,k=y.program.attributes.map((function(e){var r=t.static[e];return T=T&&!!r,r}));if(T&&k.length>0){var A=f.getVAO(f.createVAO({attributes:k,elements:m.static.elements}));w.drawVAO=new Pr(null,null,null,(function(e,t){return e.link(A)})),w.useVAO=!0}}return l?w.useVAO=!0:w.attributes=function(e){var t=e.static,n=e.dynamic,i={};return Object.keys(t).forEach((function(e){var n=t[e],o=r.id(e),s=new x;if(Ir(n))s.state=1,s.buffer=a.getBuffer(a.create(n,or,!1,!0)),s.type=0;else{var l=a.getBuffer(n);if(l)s.state=1,s.buffer=l,s.type=0;else if("constant"in n){var c=n.constant;s.buffer="null",s.state=2,"number"==typeof c?s.x=c:ft.forEach((function(e,t){t"+t+"?"+n+".constant["+t+"]:0;"})).join(""),"}}else{","if(",o,"(",n,".buffer)){",u,"=",s,".createStream(",or,",",n,".buffer);","}else{",u,"=",s,".getBuffer(",n,".buffer);","}",h,'="type" in ',n,"?",a.glTypes,"[",n,".type]:",u,".dtype;",l.normalized,"=!!",n,".normalized;"),f("size"),f("offset"),f("stride"),f("divisor"),r("}}"),r.exit("if(",l.isStream,"){",s,".destroyStream(",u,");","}"),l}))})),i}(t),w.context=function(e){var t=e.static,r=e.dynamic,n={};return Object.keys(t).forEach((function(e){var r=t[e];n[e]=Dr((function(e,t){return"number"==typeof r||"boolean"==typeof r?""+r:e.link(r)}))})),Object.keys(r).forEach((function(e){var t=r[e];n[e]=Or(t,(function(e,r){return e.invoke(r,t)}))})),n}(o),w}(t,i,o,l);return m.shader.program&&(m.shader.program.attributes.sort((function(e,t){return e.name0&&r(e.shared.current,".dirty=true;"),e.shared.vao&&r(e.shared.vao,".setVAO(null);")}(d,m),function(e,t){var n=e.proc("scope",3);e.batchId="a2";var i=e.shared,a=i.current;if(j(e,n,t.context),t.framebuffer&&t.framebuffer.append(e,n),Lr(Object.keys(t.state)).forEach((function(r){var a=t.state[r],o=a.append(e,n);G(o)?o.forEach((function(t,i){z(t)?n.set(e.next[r],"["+i+"]",t):n.set(e.next[r],"["+i+"]",e.link(t,{stable:!0}))})):zr(a)?n.set(i.next,"."+r,e.link(o,{stable:!0})):n.set(i.next,"."+r,o)})),H(e,n,t,!0,!0),[Ht,Zt,Wt,Yt,Gt].forEach((function(r){var a=t.draw[r];if(a){var o=a.append(e,n);z(o)?n.set(i.draw,"."+r,o):n.set(i.draw,"."+r,e.link(o),{stable:!0})}})),Object.keys(t.uniforms).forEach((function(a){var o=t.uniforms[a].append(e,n);Array.isArray(o)&&(o="["+o.map((function(t){return z(t)?t:e.link(t,{stable:!0})}))+"]"),n.set(i.uniforms,"["+e.link(r.id(a),{stable:!0})+"]",o)})),Object.keys(t.attributes).forEach((function(r){var i=t.attributes[r].append(e,n),a=e.scopeAttrib(r);Object.keys(new x).forEach((function(e){n.set(a,"."+e,i[e])}))})),t.scopeVAO){var o=t.scopeVAO.append(e,n);z(o)?n.set(i.vao,".targetVAO",o):n.set(i.vao,".targetVAO",e.link(o,{stable:!0}))}function s(r){var a=t.shader[r];if(a){var o=a.append(e,n);z(o)?n.set(i.shader,"."+r,o):n.set(i.shader,"."+r,e.link(o,{stable:!0}))}}s(Vt),s(qt),Object.keys(t.state).length>0&&(n(a,".dirty=true;"),n.exit(a,".dirty=true;")),n("a1(",e.shared.context,",a0,",e.batchId,");")}(d,m),function(e,t){var r=e.proc("batch",2);e.batchId="0",q(e,r);var n=!1,i=!0;Object.keys(t.context).forEach((function(e){n=n||t.context[e].propDep})),n||(j(e,r,t.context),i=!1);var a=t.framebuffer,o=!1;function s(e){return e.contextDep&&n||e.propDep}a?(a.propDep?n=o=!0:a.contextDep&&n&&(o=!0),o||N(e,r,a)):N(e,r,null),t.state.viewport&&t.state.viewport.propDep&&(n=!0),U(e,r,t),V(e,r,t.state,(function(e){return!s(e)})),(!t.profile||!s(t.profile))&&H(e,r,t,!1,"a1"),t.contextDep=n,t.needsContext=i,t.needsFramebuffer=o;var l=t.shader.progVar;if(l.contextDep&&n||l.propDep)J(e,r,t,null);else{var c=l.append(e,r);if(r(e.shared.gl,".useProgram(",c,".program);"),t.shader.program)J(e,r,t,t.shader.program);else{r(e.shared.vao,".setVAO(null);");var u=e.global.def("{}"),h=r.def(c,".id"),f=r.def(u,"[",h,"]");r(e.cond(f).then(f,".call(this,a0,a1);").else(f,"=",u,"[",h,"]=",e.link((function(e){return X(J,0,t,e,2)})),"(",c,");",f,".call(this,a0,a1);"))}}Object.keys(t.state).length>0&&r(e.shared.current,".dirty=true;"),e.shared.vao&&r(e.shared.vao,".setVAO(null);")}(d,m),e(d.compile(),{destroy:function(){m.shader.program.destroy()}})}}}var Br="webglcontextlost",jr="webglcontextrestored";function Nr(e,t){for(var r=0;r"u"?1:window.devicePixelRatio,p=!1,d={},m=function(e){},g=function(){};if("string"==typeof o?r=document.querySelector(o):"object"==typeof o&&(function(e){return"string"==typeof e.nodeName&&"function"==typeof e.appendChild&&"function"==typeof e.getBoundingClientRect}(o)?r=o:function(e){return"function"==typeof e.drawArrays||"function"==typeof e.drawElements}(o)?i=(a=o).canvas:("gl"in o?a=o.gl:"canvas"in o?i=u(o.canvas):"container"in o&&(n=u(o.container)),"attributes"in o&&(s=o.attributes),"extensions"in o&&(l=c(o.extensions)),"optionalExtensions"in o&&(h=c(o.optionalExtensions)),"onDone"in o&&(m=o.onDone),"profile"in o&&(p=!!o.profile),"pixelRatio"in o&&(f=+o.pixelRatio),"cachedCode"in o&&(d=o.cachedCode))),r&&("canvas"===r.nodeName.toLowerCase()?i=r:n=r),!a){if(!i){var y=function(t,r,n){var i,a=document.createElement("canvas");function o(){var e=window.innerWidth,r=window.innerHeight;if(t!==document.body){var i=a.getBoundingClientRect();e=i.right-i.left,r=i.bottom-i.top}a.width=n*e,a.height=n*r}return e(a.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),t.appendChild(a),t===document.body&&(a.style.position="absolute",e(t.style,{margin:0,padding:0})),t!==document.body&&"function"==typeof ResizeObserver?(i=new ResizeObserver((function(){setTimeout(o)}))).observe(t):window.addEventListener("resize",o,!1),o(),{canvas:a,onDestroy:function(){i?i.disconnect():window.removeEventListener("resize",o),t.removeChild(a)}}}(n||document.body,0,f);if(!y)return null;i=y.canvas,g=y.onDestroy}void 0===s.premultipliedAlpha&&(s.premultipliedAlpha=!0),a=function(e,t){function r(r){try{return e.getContext(r,t)}catch{return null}}return r("webgl")||r("experimental-webgl")||r("webgl-experimental")}(i,s)}return a?{gl:a,canvas:i,container:n,extensions:l,optionalExtensions:h,pixelRatio:f,profile:p,cachedCode:d,onDone:m,onDestroy:g}:(g(),m("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}(t);if(!r)return null;var n=r.gl,i=n.getContextAttributes(),a=(n.isContextLost(),function(e,t){var r={};function n(t){var n,i=t.toLowerCase();try{n=r[i]=e.getExtension(i)}catch{}return!!n}for(var i=0;i0)if(Array.isArray(t[0])){o=I(t);for(var c=1,u=1;u0)if("number"==typeof e[0]){var i=d.allocType(h.dtype,e.length);O(i,e),p(i,n),d.freeType(i)}else if(Array.isArray(e[0])||x(e[0])){r=I(e);var a=C(e,r,h.dtype);p(a,n),d.freeType(a)}}else if(_(e)){r=e.shape;var o=e.stride,s=0,l=0,c=0,u=0;1===r.length?(s=r[0],l=1,c=o[0],u=0):2===r.length&&(s=r[0],l=r[1],c=o[0],u=o[1]);var m=Array.isArray(e.data)?h.dtype:D(e.data),g=d.allocType(m,s*l);R(g,e.data,s,l,c,u,e.offset),p(g,n),d.freeType(g)}return f},r.profile&&(f.stats=h.stats),f.destroy=function(){c(h)},f},createStream:function(e,t){var r=o.pop();return r||(r=new a(e)),r.bind(),l(r,t,35040,0,1,!1),r},destroyStream:function(e){o.push(e)},clear:function(){b(i).forEach(c),o.forEach(c)},getBuffer:function(e){return e&&e._buffer instanceof a?e._buffer:null},restore:function(){b(i).forEach((function(t){t.buffer=e.createBuffer(),e.bindBuffer(t.type,t.buffer),e.bufferData(t.type,t.persistentData||t.byteLength,t.usage)}))},_initBuffer:l}}(n,f,r),Ie=function(e,t,r,n){var i={},a=0,o={uint8:B,uint16:j};function s(e){this.id=a++,i[this.id]=this,this.buffer=e,this.primType=4,this.vertCount=0,this.type=0}t.oes_element_index_uint&&(o.uint32=N),s.prototype.bind=function(){this.buffer.bind()};var l=[];function c(n,i,a,o,s,l,c){var u;if(n.buffer.bind(),i){var h=c;!c&&(!x(i)||_(i)&&!x(i.data))&&(h=t.oes_element_index_uint?N:j),r._initBuffer(n.buffer,i,a,h,3)}else e.bufferData(U,l,a),n.buffer.dtype=u||B,n.buffer.usage=a,n.buffer.dimension=3,n.buffer.byteLength=l;if(u=c,!c){switch(n.buffer.dtype){case B:case 5120:u=B;break;case j:case 5122:u=j;break;case N:case 5124:u=N}n.buffer.dtype=u}n.type=u;var f=s;f<0&&(f=n.buffer.byteLength,u===j?f>>=1:u===N&&(f>>=2)),n.vertCount=f;var p=o;if(o<0){p=4;var d=n.buffer.dimension;1===d&&(p=0),2===d&&(p=1),3===d&&(p=4)}n.primType=p}function u(e){n.elementsCount--,delete i[e.id],e.buffer.destroy(),e.buffer=null}return{create:function(e,t){var i=r.create(null,U,!0),a=new s(i._buffer);function l(e){if(e)if("number"==typeof e)i(e),a.primType=4,a.vertCount=0|e,a.type=B;else{var t=null,r=35044,n=-1,s=-1,u=0,h=0;Array.isArray(e)||x(e)||_(e)?t=e:("data"in e&&(t=e.data),"usage"in e&&(r=E[e.usage]),"primitive"in e&&(n=F[e.primitive]),"count"in e&&(s=0|e.count),"type"in e&&(h=o[e.type]),"length"in e?u=0|e.length:(u=s,h===j||5122===h?u*=2:(h===N||5124===h)&&(u*=4))),c(a,t,r,n,s,u,h)}else i(),a.primType=4,a.vertCount=0,a.type=B;return l}return n.elementsCount++,l(e),l._reglType="elements",l._elements=a,l.subdata=function(e,t){return i.subdata(e,t),l},l.destroy=function(){u(a)},l},createStream:function(e){var t=l.pop();return t||(t=new s(r.create(null,U,!0,!1)._buffer)),c(t,e,35040,-1,-1,0,0),t},destroyStream:function(e){l.push(e)},getElements:function(e){return"function"==typeof e&&e._elements instanceof s?e._elements:null},clear:function(){b(i).forEach(u)}}}(n,k,Ce,f),Le=function(e,t,r,n,i,a,o){for(var s=r.maxAttributes,l=new Array(s),c=0;c=p.byteLength?u.subdata(p):(u.destroy(),t.buffers[c]=null)),t.buffers[c]||(u=t.buffers[c]=i.create(h,34962,!1,!0)),f.buffer=i.getBuffer(u),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1,s[c]=1):i.getBuffer(h)?(f.buffer=i.getBuffer(h),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1):i.getBuffer(h.buffer)?(f.buffer=i.getBuffer(h.buffer),f.size=0|(+h.size||f.buffer.dimension),f.normalized=!!h.normalized||!1,f.type="type"in h?S[h.type]:f.buffer.dtype,f.offset=0|(h.offset||0),f.stride=0|(h.stride||0),f.divisor=0|(h.divisor||0),f.state=1):"x"in h&&(f.x=+h.x||0,f.y=+h.y||0,f.z=+h.z||0,f.w=+h.w||0,f.state=2)}for(var d=0;d1)for(var y=0;ye&&(e=t.stats.uniformsCount)})),e},n.getMaxAttributesCount=function(){var e=0;return h.forEach((function(t){t.stats.attributesCount>e&&(e=t.stats.attributesCount)})),e}),{clear:function(){var e=t.deleteShader.bind(t);b(a).forEach(e),a={},b(o).forEach(e),o={},h.forEach((function(e){t.deleteProgram(e.program)})),h.length=0,u={},n.shaderCount=0},program:function(r,i,s,l){var c=u[i];c||(c=u[i]={});var f=c[r];if(f&&(f.refCount++,!l))return f;var m=new p(i,r);return n.shaderCount++,d(m,0,l),f||(c[r]=m),h.push(m),e(m,{destroy:function(){if(m.refCount--,m.refCount<=0){t.deleteProgram(m.program);var e=h.indexOf(m);h.splice(e,1),n.shaderCount--}c[m.vertId].refCount<=0&&(t.deleteShader(o[m.vertId]),delete o[m.vertId],delete u[m.fragId][m.vertId]),Object.keys(u[m.fragId]).length||(t.deleteShader(a[m.fragId]),delete a[m.fragId],delete u[m.fragId])}})},restore:function(){a={},o={};for(var e=0;e=0&&(m[e]=t)}));var v=Object.keys(m);n.textureFormats=v;var k=[];Object.keys(m).forEach((function(e){var t=m[e];k[t]=e}));var A=[];Object.keys(p).forEach((function(e){var t=p[e];A[t]=e}));var M=[];Object.keys(u).forEach((function(e){M[u[e]]=e}));var S=[];Object.keys(h).forEach((function(e){var t=h[e];S[t]=e}));var E=[];Object.keys(c).forEach((function(e){E[c[e]]=e}));var C=v.reduce((function(e,t){var n=m[t];return n===J||n===$||n===J||n===Q||n===te||n===re||r.ext_srgb&&(n===ne||n===ie)?e[n]=n:n===ee||t.indexOf("rgba")>=0?e[n]=X:e[n]=K,e}),{});function I(){this.internalformat=X,this.format=X,this.type=ce,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=37444,this.width=0,this.height=0,this.channels=0}function L(e,t){e.internalformat=t.internalformat,e.format=t.format,e.type=t.type,e.compressed=t.compressed,e.premultiplyAlpha=t.premultiplyAlpha,e.flipY=t.flipY,e.unpackAlignment=t.unpackAlignment,e.colorSpace=t.colorSpace,e.width=t.width,e.height=t.height,e.channels=t.channels}function P(e,t){if("object"==typeof t&&t){if("premultiplyAlpha"in t&&(e.premultiplyAlpha=t.premultiplyAlpha),"flipY"in t&&(e.flipY=t.flipY),"alignment"in t&&(e.unpackAlignment=t.alignment),"colorSpace"in t&&(e.colorSpace=f[t.colorSpace]),"type"in t){var r=t.type;e.type=p[r]}var n=e.width,i=e.height,a=e.channels,o=!1;"shape"in t?(n=t.shape[0],i=t.shape[1],3===t.shape.length&&(a=t.shape[2],o=!0)):("radius"in t&&(n=i=t.radius),"width"in t&&(n=t.width),"height"in t&&(i=t.height),"channels"in t&&(a=t.channels,o=!0)),e.width=0|n,e.height=0|i,e.channels=0|a;var s=!1;if("format"in t){var l=t.format,c=e.internalformat=m[l];e.format=C[c],l in p&&("type"in t||(e.type=p[l])),l in g&&(e.compressed=!0),s=!0}!o&&s?e.channels=be[e.format]:o&&!s&&e.channels!==_e[e.format]&&(e.format=e.internalformat=_e[e.channels])}}function z(e){t.pixelStorei(37440,e.flipY),t.pixelStorei(37441,e.premultiplyAlpha),t.pixelStorei(37443,e.colorSpace),t.pixelStorei(3317,e.unpackAlignment)}function D(){I.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function O(e,t){var r=null;if(Fe(t)?r=t:t&&(P(e,t),"x"in t&&(e.xOffset=0|t.x),"y"in t&&(e.yOffset=0|t.y),Fe(t.data)&&(r=t.data)),t.copy){var n=a.viewportWidth,i=a.viewportHeight;e.width=e.width||n-e.xOffset,e.height=e.height||i-e.yOffset,e.needsCopy=!0}else if(r){if(x(r))e.channels=e.channels||4,e.data=r,!("type"in t)&&e.type===ce&&(e.type=Be(r));else if(Pe(r))e.channels=e.channels||4,function(e,t){var r=t.length;switch(e.type){case ce:case ue:case he:case fe:var n=d.allocType(e.type,r);n.set(t),e.data=n;break;case ae:e.data=H(t)}}(e,r),e.alignment=1,e.needsFree=!0;else if(_(r)){var o=r.data;!Array.isArray(o)&&e.type===ce&&(e.type=Be(o));var s,l,c,u,h,f,p=r.shape,m=r.stride;3===p.length?(c=p[2],f=m[2]):(c=1,f=1),s=p[0],l=p[1],u=m[0],h=m[1],e.alignment=1,e.width=s,e.height=l,e.channels=c,e.format=e.internalformat=_e[c],e.needsFree=!0,function(e,t,r,n,i,a){for(var o=e.width,s=e.height,l=e.channels,c=je(e,o*s*l),u=0,h=0;h>=i,r.height>>=i,O(r,n[i]),e.mipmask|=1<=0&&!("faces"in t)&&(e.genMipmaps=!0)}if("mag"in t){var n=t.mag;e.magFilter=u[n]}var i=e.wrapS,a=e.wrapT;if("wrap"in t){var o=t.wrap;"string"==typeof o?i=a=c[o]:Array.isArray(o)&&(i=c[o[0]],a=c[o[1]])}else{if("wrapS"in t){var s=t.wrapS;i=c[s]}if("wrapT"in t){var f=t.wrapT;a=c[f]}}if(e.wrapS=i,e.wrapT=a,"anisotropic"in t&&(t.anisotropic,e.anisotropic=t.anisotropic),"mipmap"in t){var p=!1;switch(typeof t.mipmap){case"string":e.mipmapHint=l[t.mipmap],e.genMipmaps=!0,p=!0;break;case"boolean":p=e.genMipmaps=t.mipmap;break;case"object":e.genMipmaps=!1,p=!0}p&&!("min"in t)&&(e.minFilter=me)}}function Ve(e,n){t.texParameteri(n,10241,e.minFilter),t.texParameteri(n,10240,e.magFilter),t.texParameteri(n,10242,e.wrapS),t.texParameteri(n,10243,e.wrapT),r.ext_texture_filter_anisotropic&&t.texParameteri(n,34046,e.anisotropic),e.genMipmaps&&(t.hint(33170,e.mipmapHint),t.generateMipmap(n))}var qe=0,He={},Ge=n.maxTextureUnits,We=Array(Ge).map((function(){return null}));function Ze(e){I.call(this),this.mipmask=0,this.internalformat=X,this.id=qe++,this.refCount=1,this.target=e,this.texture=t.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new Ie,s.profile&&(this.stats={size:0})}function Ye(e){t.activeTexture(ve),t.bindTexture(e.target,e.texture)}function Xe(){var e=We[0];e?t.bindTexture(e.target,e.texture):t.bindTexture(W,null)}function $e(e){var r=e.texture,n=e.unit,i=e.target;n>=0&&(t.activeTexture(ve+n),t.bindTexture(i,null),We[n]=null),t.deleteTexture(r),e.texture=null,e.params=null,e.pixels=null,e.refCount=0,delete He[e.id],o.textureCount--}return e(Ze.prototype,{bind:function(){var e=this;e.bindCount+=1;var r=e.unit;if(r<0){for(var n=0;n0)continue;i.unit=-1}We[n]=e,r=n;break}s.profile&&o.maxTextureUnits>l)-o,c.height=c.height||(n.height>>l)-s,Ye(n),F(c,W,o,s,l),Xe(),N(c),i},i.resize=function(e,r){var a=0|e,o=0|r||a;if(a===n.width&&o===n.height)return i;i.width=n.width=a,i.height=n.height=o,Ye(n);for(var l=0;n.mipmask>>l;++l){var c=a>>l,u=o>>l;if(!c||!u)break;t.texImage2D(W,l,n.format,c,u,0,n.format,n.type,null)}return Xe(),s.profile&&(n.stats.size=Ue(n.internalformat,n.type,a,o,!1,!1)),i},i._reglType="texture2d",i._texture=n,s.profile&&(i.stats=n.stats),i.destroy=function(){n.decRef()},i},createCube:function(e,r,n,i,a,l){var c=new Ze(Z);He[c.id]=c,o.cubeCount++;var u=new Array(6);function h(e,t,r,n,i,a){var o,l=c.texInfo;for(Ie.call(l),o=0;o<6;++o)u[o]=ke();if("number"!=typeof e&&e){if("object"==typeof e)if(t)q(u[0],e),q(u[1],t),q(u[2],r),q(u[3],n),q(u[4],i),q(u[5],a);else if(Le(l,e),P(c,e),"faces"in e){var f=e.faces;for(o=0;o<6;++o)L(u[o],c),q(u[o],f[o])}else for(o=0;o<6;++o)q(u[o],e)}else{var p=0|e||1;for(o=0;o<6;++o)V(u[o],p,p)}for(L(c,u[0]),l.genMipmaps?c.mipmask=(u[0].width<<1)-1:c.mipmask=u[0].mipmask,c.internalformat=u[0].internalformat,h.width=u[0].width,h.height=u[0].height,Ye(c),o=0;o<6;++o)we(u[o],Y+o);for(Ve(l,Z),Xe(),s.profile&&(c.stats.size=Ue(c.internalformat,c.type,h.width,h.height,l.genMipmaps,!0)),h.format=k[c.internalformat],h.type=A[c.type],h.mag=M[l.magFilter],h.min=S[l.minFilter],h.wrapS=E[l.wrapS],h.wrapT=E[l.wrapT],o=0;o<6;++o)Ce(u[o]);return h}return h(e,r,n,i,a,l),h.subimage=function(e,t,r,n,i){var a=0|r,o=0|n,s=0|i,l=j();return L(l,c),l.width=0,l.height=0,O(l,t),l.width=l.width||(c.width>>s)-a,l.height=l.height||(c.height>>s)-o,Ye(c),F(l,Y+e,a,o,s),Xe(),N(l),h},h.resize=function(e){var r=0|e;if(r!==c.width){h.width=c.width=r,h.height=c.height=r,Ye(c);for(var n=0;n<6;++n)for(var i=0;c.mipmask>>i;++i)t.texImage2D(Y+n,i,c.format,r>>i,r>>i,0,c.format,c.type,null);return Xe(),s.profile&&(c.stats.size=Ue(c.internalformat,c.type,h.width,h.height,!1,!0)),h}},h._reglType="textureCube",h._texture=c,s.profile&&(h.stats=c.stats),h.destroy=function(){c.decRef()},h},clear:function(){for(var e=0;e>r,e.height>>r,0,e.internalformat,e.type,null);else for(var n=0;n<6;++n)t.texImage2D(Y+n,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);Ve(e.texInfo,e.target)}))},refresh:function(){for(var e=0;e=0?f=!0:c.indexOf(d)>=0&&(f=!1))),("depthTexture"in M||"depthStencilTexture"in M)&&(k=!(!M.depthTexture&&!M.depthStencilTexture)),"depth"in M&&("boolean"==typeof M.depth?s=M.depth:(_=M.depth,u=!1)),"stencil"in M&&("boolean"==typeof M.stencil?u=M.stencil:(b=M.stencil,s=!1)),"depthStencil"in M&&("boolean"==typeof M.depthStencil?s=u=M.depthStencil:(w=M.depthStencil,s=!1,u=!1))}else a=o=1;var E=null,C=null,I=null,L=null;if(Array.isArray(h))E=h.map(m);else if(h)E=[m(h)];else for(E=new Array(x),r=0;r0&&(s.depth=r[0].depth,s.stencil=r[0].stencil,s.depthStencil=r[0].depthStencil),r[a]?r[a](s):r[a]=M(s)}return e(n,{width:l,height:l,color:o})}return n(t),e(n,{faces:r,resize:function(e){var t,i=0|e;if(i===n.width)return n;var a=n.color;for(t=0;t=0;--e){var t=ot[e];t&&t(we,null,0)}n.flush(),A&&A.update()}function ft(){!ut&&ot.length>0&&(ut=s.next(ht))}function pt(){ut&&(s.cancel(ht),ut=null)}function dt(e){e.preventDefault(),pt(),st.forEach((function(e){e()}))}function mt(e){n.getError(),a.restore(),He.restore(),Ce.restore(),Qe.restore(),et.restore(),tt.restore(),Le.restore(),A&&A.restore(),rt.procs.refresh(),ft(),lt.forEach((function(e){e()}))}function gt(t){function r(e,t){var r={},n={};return Object.keys(e).forEach((function(i){var a=e[i];if(o.isDynamic(a))n[i]=o.unbox(a,i);else{if(t&&Array.isArray(a))for(var s=0;s0)return h.call(this,function(e){for(;p.length=0},read:nt,destroy:function(){ot.length=0,pt(),at&&(at.removeEventListener(Br,dt),at.removeEventListener(jr,mt)),He.clear(),tt.clear(),et.clear(),Le.clear(),Qe.clear(),Ie.clear(),Ce.clear(),A&&A.clear(),ct.forEach((function(e){e()}))},_gl:n,_refresh:wt,poll:function(){bt(),A&&A.update()},now:Tt,stats:f,getCachedCode:function(){return p},preloadCachedCode:function(e){Object.entries(e).forEach((function(e){p[e[0]]=e[1]}))}});return r.onDone(null,kt),kt}},"object"==typeof e&&typeof t<"u"?t.exports=n():r.createREGL=n()}}),Mx=m({"src/lib/prepare_regl.js"(e,t){var r=fm(),n=Ax();t.exports=function(e,t,i){var a=e._fullLayout,o=!0;return a._glcanvas.each((function(r){if(r.regl)r.regl.preloadCachedCode(i);else if(!r.pick||a._has("parcoords")){try{r.regl=n({canvas:this,attributes:{antialias:!r.pick,preserveDrawingBuffer:!0},pixelRatio:e._context.plotGlPixelRatio||window.devicePixelRatio,extensions:t||[],cachedCode:i||{}})}catch{o=!1}r.regl||(o=!1),o&&this.addEventListener("webglcontextlost",(function(t){e&&e.emit&&e.emit("plotly_webglcontextlost",{event:t,layer:r.key})}),!1)}})),o||r({container:a._glcontainer.node()}),o}}}),Sx=m({"src/traces/scattergl/plot.js"(e,t){var r=Iy(),n=Jv(),i=Qv(),a=kx(),o=ct(),s=Rr().selectMode,l=Mx(),c=Xt(),u=pi(),h=by().styleTextSelection,f={};function p(e,t,r,n){var i=e._size,a=e.width*n,o=e.height*n,s=i.l*n,l=i.b*n,c=i.r*n,u=i.t*n,h=i.w*n,f=i.h*n;return[s+t.domain[0]*h,l+r.domain[0]*f,a-c-(1-t.domain[1])*h,o-u-(1-r.domain[1])*f]}(t.exports=function(e,t,d){if(d.length){var m,g,y=e._fullLayout,v=t._scene,x=t.xaxis,_=t.yaxis;if(v){if(!l(e,["ANGLE_instanced_arrays","OES_element_index_uint"],f))return void v.init();var b=v.count,w=y._glcanvas.data()[0].regl;if(u(e,t,d),v.dirty){if((v.line2d||v.error2d)&&!(v.scatter2d||v.fill2d||v.glText)&&w.clear({color:!0,depth:!0}),!0===v.error2d&&(v.error2d=i(w)),!0===v.line2d&&(v.line2d=n(w)),!0===v.scatter2d&&(v.scatter2d=r(w)),!0===v.fill2d&&(v.fill2d=n(w)),!0===v.glText)for(v.glText=new Array(b),m=0;mv.glText.length){var T=b-v.glText.length;for(m=0;mr&&(isNaN(t[n])||isNaN(t[n+1]));)n-=2;e.positions=t.slice(r,n+2)}return e})),v.line2d.update(v.lineOptions)),v.error2d){var A=(v.errorXOptions||[]).concat(v.errorYOptions||[]);v.error2d.update(A)}v.scatter2d&&v.scatter2d.update(v.markerOptions),v.fillOrder=o.repeat(null,b),v.fill2d&&(v.fillOptions=v.fillOptions.map((function(e,t){var r=d[t];if(e&&r&&r[0]&&r[0].trace){var n,i,a=r[0],o=a.trace,s=a.t,l=v.lineOptions[t],c=[];o._ownfill&&c.push(t),o._nexttrace&&c.push(t+1),c.length&&(v.fillOrder[t]=c);var u,h,f=[],p=l&&l.positions||s.positions;if("tozeroy"===o.fill){for(u=0;uu&&isNaN(p[h+1]);)h-=2;0!==p[u+1]&&(f=[p[u],0]),f=f.concat(p.slice(u,h+2)),0!==p[h+1]&&(f=f.concat([p[h],0]))}else if("tozerox"===o.fill){for(u=0;uu&&isNaN(p[h]);)h-=2;0!==p[u]&&(f=[0,p[u+1]]),f=f.concat(p.slice(u,h+2)),0!==p[h]&&(f=f.concat([0,p[h+1]]))}else if("toself"===o.fill||"tonext"===o.fill){for(f=[],n=0,e.splitNull=!0,i=0;i-1;for(let[e]of d)if(e){var C=e.trace,I=e.t,L=I.index,P=C._length,z=I.x,D=I.y;if(C.selectedpoints||S||E){if(S||(S=!0),C.selectedpoints){var O=v.selectBatch[L]=o.selIndices2selPoints(C),R={};for(g=0;ga&&l||ih?_.sizeAvg||Math.max(_.size,3):i(t,x),p=0;p2?(n=h[0],a=h[2],i=h[1],o=h[3]):h.length?(n=i=h[0],a=o=h[1]):(n=h.x,i=h.y,a=h.x+h.width,o=h.y+h.height),f.length>2?(s=f[0],c=f[2],l=f[1],u=f[3]):f.length?(s=l=f[0],c=u=f[1]):(s=f.x,l=f.y,c=f.x+f.width,u=f.y+f.height),[s,i,c,o]}function f(e){if("number"==typeof e)return[e,e,e,e];if(2===e.length)return[e[0],e[1],e[0],e[1]];{let t=s(e);return[t.x,t.y,t.x+t.width,t.y+t.height]}}t.exports=c,c.prototype.render=function(...e){return e.length&&this.update(...e),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?null==this.planned&&(this.planned=a((()=>{this.draw(),this.dirty=!0,this.planned=null}))):(this.draw(),this.dirty=!0,a((()=>{this.dirty=!1}))),this)},c.prototype.update=function(...e){if(!e.length)return;for(let t=0;tt||!c.lower&&e{t[a+r]=n}))}this.scatter.draw(...t)}else this.scatter.draw();return this},c.prototype.destroy=function(){return this.traces.forEach((e=>{e.buffer&&e.buffer.destroy&&e.buffer.destroy()})),this.traces=null,this.passes=null,this.scatter.destroy(),this}}}),jx=m({"src/traces/splom/plot.js"(e,t){var r=Bx(),n=ct(),i=_t(),a=Rr().selectMode;function o(e,t){var o,s,l,c,u,h=e._fullLayout,f=h._size,p=t.trace,d=t.t,m=h._splomScenes[p.uid],g=m.matrixOptions,y=g.cdata,v=h._glcanvas.data()[0].regl,x=h.dragmode;if(0!==y.length){g.lower=p.showupperhalf,g.upper=p.showlowerhalf,g.diagonal=p.diagonal.visible;var _=p._visibleDims,b=y.length,w=m.viewOpts={};for(w.ranges=new Array(b),w.domains=new Array(b),u=0;u<_.length;u++){l=_[u];var T=w.ranges[u]=new Array(4),k=w.domains[u]=new Array(4);(o=i.getFromId(e,p._diag[l][0]))&&(T[0]=o._rl[0],T[2]=o._rl[1],k[0]=o.domain[0],k[2]=o.domain[1]),(s=i.getFromId(e,p._diag[l][1]))&&(T[1]=s._rl[0],T[3]=s._rl[1],k[1]=s.domain[0],k[3]=s.domain[1])}var A=e._context.plotGlPixelRatio,M=f.l*A,S=f.b*A,E=f.w*A,C=f.h*A;w.viewport=[M,S,E+M,C+S],!0===m.matrix&&(m.matrix=r(v));var I=h.clickmode.indexOf("select")>-1,L=!0;if(a(x)||p.selectedpoints||I){var P=p._length;if(p.selectedpoints){m.selectBatch=p.selectedpoints;var z=p.selectedpoints,D={};for(l=0;l=t[r][0]&&e<=t[r][1])return!0;return!1}(r,n))return r;var i=e?-1:1,a=0,o=t.length-1;if(i<0){var s=a;a=o,o=s}for(var l=t[a],u=l,f=a;i*ft){f=n;break}}if(a=u,isNaN(a)&&(a=isNaN(h)||isNaN(f)?isNaN(h)?f:h:t-c[h][1]e[1]+n||t=.9*e[1]+.1*e[0]?"n":t<=.9*e[0]+.1*e[1]?"s":"ns"}(d,t);m&&(o.interval=l[a],o.intervalPix=d,o.region=m)}}if(e.ordinal&&!o.region){var y=e.unitTickvals,v=e.unitToPaddedPx.invert(t);for(n=0;n=x[0]&&v<=x[1]){o.clickableOrdinalRange=x;break}}}return o}function w(e,t){n.event.sourceEvent.stopPropagation();var i=t.height-n.mouse(e)[1]-2*r.verticalPadding,a=t.brush.svgBrush;a.wasDragged=!0,a._dragging=!0,a.grabbingBar?a.newExtent=[i-a.grabPoint,i+a.barLength-a.grabPoint].map(t.unitToPaddedPx.invert):a.newExtent=[a.startExtent,t.unitToPaddedPx.invert(i)].sort(o),t.brush.filterSpecified=!0,a.extent=a.stayingIntervals.concat([a.newExtent]),a.brushCallback(t),x(e.parentNode)}function T(e,t){var i=_(t,t.height-n.mouse(e)[1]-2*r.verticalPadding),a="crosshair";i.clickableOrdinalRange?a="pointer":i.region&&(a=i.region+"-resize"),n.select(document.body).style("cursor",a)}function k(e){e.on("mousemove",(function(e){n.event.preventDefault(),e.parent.inBrushDrag||T(this,e)})).on("mouseleave",(function(e){e.parent.inBrushDrag||y()})).call(n.behavior.drag().on("dragstart",(function(e){!function(e,t){n.event.sourceEvent.stopPropagation();var i=t.height-n.mouse(e)[1]-2*r.verticalPadding,a=t.unitToPaddedPx.invert(i),o=t.brush,s=_(t,i),l=s.interval,c=o.svgBrush;if(c.wasDragged=!1,c.grabbingBar="ns"===s.region,c.grabbingBar){var u=l.map(t.unitToPaddedPx);c.grabPoint=i-u[0]-r.verticalPadding,c.barLength=u[1]-u[0]}c.clickableOrdinalRange=s.clickableOrdinalRange,c.stayingIntervals=t.multiselect&&o.filterSpecified?o.filter.getConsolidated():[],l&&(c.stayingIntervals=c.stayingIntervals.filter((function(e){return e[0]!==l[0]&&e[1]!==l[1]}))),c.startExtent=s.region?l["s"===s.region?1:0]:a,t.parent.inBrushDrag=!0,c.brushStartCallback()}(this,e)})).on("drag",(function(e){w(this,e)})).on("dragend",(function(e){!function(e,t){var r=t.brush,i=r.filter,a=r.svgBrush;a._dragging||(T(e,t),w(e,t),t.brush.svgBrush.wasDragged=!1),a._dragging=!1,n.event.sourceEvent.stopPropagation();var o=a.grabbingBar;if(a.grabbingBar=!1,a.grabLocation=void 0,t.parent.inBrushDrag=!1,y(),!a.wasDragged)return a.wasDragged=void 0,a.clickableOrdinalRange?r.filterSpecified&&t.multiselect?a.extent.push(a.clickableOrdinalRange):(a.extent=[a.clickableOrdinalRange],r.filterSpecified=!0):o?(a.extent=a.stayingIntervals,0===a.extent.length&&M(r)):M(r),a.brushCallback(t),x(e.parentNode),void a.brushEndCallback(r.filterSpecified?i.getConsolidated():[]);var s=function(){i.set(i.getConsolidated())};if(t.ordinal){var l=t.unitTickvals;l[l.length-1]a.newExtent[0];a.extent=a.stayingIntervals.concat(c?[a.newExtent]:[]),a.extent.length||M(r),a.brushCallback(t),c?x(e.parentNode,s):(s(),x(e.parentNode))}else s();a.brushEndCallback(r.filterSpecified?i.getConsolidated():[])}(this,e)})))}function A(e,t){return e[0]-t[0]}function M(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function S(e){return function(t){var r=t.brush,n=function(e){return e.svgBrush.extent.map((function(e){return e.slice()}))}(r),i=n.slice();r.filter.set(i),e()}}function E(e){for(var t,r=e.slice(),n=[],i=r.shift();i;){for(t=i.slice();(i=r.shift())&&i[0]<=t[1];)t[1]=Math.max(t[1],i[1]);n.push(t)}return 1===n.length&&n[0][0]>n[0][1]&&(n=[]),n}t.exports={makeBrush:function(e,t,r,n,i,a){var s=function(){var e,t,r=[];return{set:function(n){1===(r=n.map((function(e){return e.slice().sort(o)})).sort(A)).length&&r[0][0]===-1/0&&r[0][1]===1/0&&(r=[[0,-1]]),e=E(r),t=r.reduce((function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}),[1/0,-1/0])},get:function(){return r.slice()},getConsolidated:function(){return e},getBounds:function(){return t}}}();return s.set(r),{filter:s,filterSpecified:t,svgBrush:{extent:[],brushStartCallback:n,brushCallback:S(i),brushEndCallback:a}}},ensureAxisBrush:function(e,t,n){var o=e.selectAll("."+r.cn.axisBrush).data(a,i);o.enter().append("g").classed(r.cn.axisBrush,!0),function(e,t,n){var i=n._context.staticPlot,o=e.selectAll(".background").data(a);o.enter().append("rect").classed("background",!0).call(p).call(d).style("pointer-events",i?"none":"auto").attr("transform",s(0,r.verticalPadding)),o.call(k).attr("height",(function(e){return e.height-r.verticalPadding}));var l=e.selectAll(".highlight-shadow").data(a);l.enter().append("line").classed("highlight-shadow",!0).attr("x",-r.bar.width/2).attr("stroke-width",r.bar.width+r.bar.strokeWidth).attr("stroke",t).attr("opacity",r.bar.strokeOpacity).attr("stroke-linecap","butt"),l.attr("y1",(function(e){return e.height})).call(v);var c=e.selectAll(".highlight").data(a);c.enter().append("line").classed("highlight",!0).attr("x",-r.bar.width/2).attr("stroke-width",r.bar.width-r.bar.strokeWidth).attr("stroke",r.bar.fillColor).attr("opacity",r.bar.fillOpacity).attr("stroke-linecap","butt"),c.attr("y1",(function(e){return e.height})).call(v)}(o,t,n)},cleanRanges:function(e,t){if(Array.isArray(e[0])?(e=e.map((function(e){return e.sort(o)})),e=t.multiselect?E(e.sort(A)):[e[0]]):e=[e.sort(o)],t.tickvals){var r=t.tickvals.slice().sort(o);if(!(e=e.map((function(e){var t=[f(0,r,e[0],[]),f(1,r,e[1],[])];if(t[1]>t[0])return t})).filter((function(e){return e}))).length)return}return e.length>1?e:e[0]}}}}),Jx=m({"src/traces/parcoords/defaults.js"(e,t){var r=ct(),n=Ct().hasColorscale,i=Ht(),a=Ma().defaults,o=Nt(),s=ar(),l=Yx(),c=Kx(),u=Xx().maxDimensionCount,h=Lx();function f(e,t,n,i){function a(n,i){return r.coerce(e,t,l.dimensions,n,i)}var o=a("values"),u=a("visible");if(o&&o.length||(u=t.visible=!1),u){a("label"),a("tickvals"),a("ticktext"),a("tickformat");var h=a("range");t._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:h},s.setConvert(t._ax,i.layout),a("multiselect");var f=a("constraintrange");f&&(t.constraintrange=c.cleanRanges(f,t))}}t.exports=function(e,t,s,c){function p(n,i){return r.coerce(e,t,l,n,i)}var d=e.dimensions;Array.isArray(d)&&d.length>u&&(r.log("parcoords traces support up to "+u+" dimensions at the moment"),d.splice(u));var m=o(e,t,{name:"dimensions",layout:c,handleItemDefaults:f}),g=function(e,t,a,o,s){var l=s("line.color",a);if(n(e,"line")&&r.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),i(e,t,o,s,{prefix:"line.",cLetter:"c"}),l.length;t.line.color=a}return 1/0}(e,t,s,c,p);a(t,c,p),(!Array.isArray(m)||!m.length)&&(t.visible=!1),h(t,m,"values",g);var y=r.extendFlat({},c.font,{size:Math.round(c.font.size/1.2)});r.coerceFont(p,"labelfont",y),r.coerceFont(p,"tickfont",y,{autoShadowDflt:!0}),r.coerceFont(p,"rangefont",y),p("labelangle"),p("labelside"),p("unselected.line.color"),p("unselected.line.opacity")}}}),Qx=m({"src/traces/parcoords/calc.js"(e,t){var r=ct().isArrayOrTypedArray,n=Yt(),i=$x().wrap;t.exports=function(e,t){var a,o;return n.hasColorscale(t,"line")&&r(t.line.color)?(a=t.line.color,o=n.extractOpts(t.line).colorscale,n.calc(e,t,{vals:a,containerStr:"line",cLetter:"c"})):(a=function(e){for(var t=new Array(e),r=0;r>>16,(65280&e)>>>8,255&e],alpha:1};if("number"==typeof e)return{space:"rgb",values:[e>>>16,(65280&e)>>>8,255&e],alpha:1};if(e=String(e).toLowerCase(),t_.default[e])a=t_.default[e].slice(),i="rgb";else if("transparent"===e)o=0,i="rgb",a=[0,0,0];else if("#"===e[0]){var s=e.slice(1),l=s.length;o=1,l<=4?(a=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],4===l&&(o=parseInt(s[3]+s[3],16)/255)):(a=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],8===l&&(o=parseInt(s[6]+s[7],16)/255)),a[0]||(a[0]=0),a[1]||(a[1]=0),a[2]||(a[2]=0),i="rgb"}else if(n=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(e)){var c=n[1],u="cmyk"===(i=c.replace(/a$/,""))?4:"gray"===i?1:3;a=n[2].trim().split(/\s*[,\/]\s*|\s+/),"color"===i&&(i=a.shift()),o=(a=a.map((function(e,t){if("%"===e[e.length-1])return e=parseFloat(e)/100,3===t?e:"rgb"===i?255*e:"h"===i[0]||"l"===i[0]&&!t?100*e:"lab"===i?125*e:"lch"===i?t<2?150*e:360*e:"o"!==i[0]||t?"oklab"===i?.4*e:"oklch"===i?t<2?.4*e:360*e:e:e;if("h"===i[t]||2===t&&"h"===i[i.length-1]){if(void 0!==n_[e])return n_[e];if(e.endsWith("deg"))return parseFloat(e);if(e.endsWith("turn"))return 360*parseFloat(e);if(e.endsWith("grad"))return 360*parseFloat(e)/400;if(e.endsWith("rad"))return 180*parseFloat(e)/Math.PI}return"none"===e?0:parseFloat(e)}))).length>u?a.pop():1}else/[0-9](?:\s|\/|,)/.test(e)&&(a=e.match(/([0-9]+)/g).map((function(e){return parseFloat(e)})),i=(null==(r=null==(t=e.match(/([a-z])/gi))?void 0:t.join(""))?void 0:r.toLowerCase())||"rgb");return{space:i,values:a,alpha:o}}var t_,r_,n_,i_,a_,o_=d({"node_modules/color-parse/index.js"(){var r,n;n=null!=(r=Xd())?e(s(r)):{},t_=y(t(n,"default",{value:r,enumerable:!0}),r),r_=e_,n_={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}}),s_=d({"node_modules/color-space/rgb.js"(){i_={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}}}),l_=d({"node_modules/color-space/hsl.js"(){s_(),a_={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(e){var t,r,n,i,a,o=e[0]/360,s=e[1]/100,l=e[2]/100,c=0;if(0===s)return[a=255*l,a,a];for(t=2*l-(r=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];c<3;)(n=o+1/3*-(c-1))<0?n++:n>1&&n--,a=6*n<1?t+6*(r-t)*n:2*n<1?r:3*n<2?t+(r-t)*(2/3-n)*6:t,i[c++]=255*a;return i}},i_.hsl=function(e){var t,r,n=e[0]/255,i=e[1]/255,a=e[2]/255,o=Math.min(n,i,a),s=Math.max(n,i,a),l=s-o;return s===o?t=0:n===s?t=(i-a)/l:i===s?t=2+(a-n)/l:a===s&&(t=4+(n-i)/l),(t=Math.min(60*t,360))<0&&(t+=360),r=(o+s)/2,[t,100*(s===o?0:r<=.5?l/(s+o):l/(2-s-o)),100*r]}}}),c_={};function u_(e){Array.isArray(e)&&e.raw&&(e=String.raw(...arguments)),e instanceof Number&&(e=+e);var t,r=r_(e);if(!r.space)return[];let n="h"===r.space[0]?a_.min:i_.min,i="h"===r.space[0]?a_.max:i_.max;return(t=Array(3))[0]=Math.min(Math.max(r.values[0],n[0]),i[0]),t[1]=Math.min(Math.max(r.values[1],n[1]),i[1]),t[2]=Math.min(Math.max(r.values[2],n[2]),i[2]),"h"===r.space[0]&&(t=a_.rgb(t)),t.push(Math.min(Math.max(r.alpha,0),1)),t}g(c_,{default:()=>u_});var h_=d({"node_modules/color-rgba/index.js"(){o_(),s_(),l_()}}),f_=m({"src/traces/parcoords/helpers.js"(e){var t=ct().isTypedArray;e.convertTypedArray=function(e){return t(e)?Array.prototype.slice.call(e):e},e.isOrdinal=function(e){return!!e.tickvals},e.isVisible=function(e){return e.visible||!("visible"in e)}}}),p_=m({"src/traces/parcoords/lines.js"(e,t){var r=["precision highp float;","","varying vec4 fragColor;","","attribute vec4 p01_04, p05_08, p09_12, p13_16,"," p17_20, p21_24, p25_28, p29_32,"," p33_36, p37_40, p41_44, p45_48,"," p49_52, p53_56, p57_60, colors;","","uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,"," loA, hiA, loB, hiB, loC, hiC, loD, hiD;","","uniform vec2 resolution, viewBoxPos, viewBoxSize;","uniform float maskHeight;","uniform float drwLayer; // 0: context, 1: focus, 2: pick","uniform vec4 contextColor;","uniform sampler2D maskTexture, palette;","","bool isPick = (drwLayer > 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {"," return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {"," float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);"," float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);"," return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {"," return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {"," return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {"," return ("," fOutside(p[0], lo[0], hi[0]) ||"," fOutside(p[1], lo[1], hi[1]) ||"," fOutside(p[2], lo[2], hi[2]) ||"," fOutside(p[3], lo[3], hi[3])"," );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {"," return ("," vOutside(p[0], lo[0], hi[0]) ||"," vOutside(p[1], lo[1], hi[1]) ||"," vOutside(p[2], lo[2], hi[2]) ||"," vOutside(p[3], lo[3], hi[3])"," );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {"," return mOutside(A, loA, hiA) ||"," mOutside(B, loB, hiB) ||"," mOutside(C, loC, hiC) ||"," mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {"," mat4 pnts[4];"," pnts[0] = A;"," pnts[1] = B;"," pnts[2] = C;"," pnts[3] = D;",""," for(int i = 0; i < 4; ++i) {"," for(int j = 0; j < 4; ++j) {"," for(int k = 0; k < 4; ++k) {"," if(0 == iMod("," int(255.0 * texture2D(maskTexture,"," vec2("," (float(i * 2 + j / 2) + 0.5) / 8.0,"," (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight"," ))[3]"," ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),"," 2"," )) return true;"," }"," }"," }"," return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {"," float x = 0.5 * sign(v) + 0.5;"," float y = axisY(x, A, B, C, D);"," float z = 1.0 - abs(v);",""," z += isContext ? 0.0 : 2.0 * float("," outsideBoundingBox(A, B, C, D) ||"," outsideRasterMask(A, B, C, D)"," );",""," return vec4("," 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,"," z,"," 1.0"," );","}","","void main() {"," mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);"," mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);"," mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);"," mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);",""," float v = colors[3];",""," gl_Position = position(isContext, v, A, B, C, D);",""," fragColor ="," isContext ? vec4(contextColor) :"," isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join("\n"),n=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join("\n"),i=Xx().maxDimensionCount,a=ct(),o=1e-6,s=2048,l=new Uint8Array(4),c=new Uint8Array(4),u={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function h(e,t,r,n,i){var a=e._gl;a.enable(a.SCISSOR_TEST),a.scissor(t,r,n,i),e.clear({color:[0,0,0,0],depth:1})}function f(e,t,r,n,i,a){var o=a.key;r.drawCompleted||(function(e){e.read({x:0,y:0,width:1,height:1,data:l})}(e),r.drawCompleted=!0),function s(l){var c=Math.min(n,i-l*n);0===l&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],h(e,a.scissorX,a.scissorY,a.scissorWidth,a.viewBoxSize[1])),!r.clearOnly&&(a.count=2*c,a.offset=2*l*n,t(a),l*n+c>>8*t)%256/255}function g(e,t,r){for(var n=new Array(8*t),i=0,a=0;au&&(u=e[n].dim1.canvasX,a=n);0===l&&h(A,0,0,o.canvasWidth,o.canvasHeight);var p=function(e){var t,r,n,i=[[],[]];for(n=0;n<64;n++){var a=!e&&ns._length&&(M=M.slice(0,s._length));var C,L=s.tickvals;function P(e,t){return{val:e,text:C[t]}}function z(e,t){return e.val-t.val}if(i(L)&&L.length){n.isTypedArray(L)&&(L=Array.from(L)),C=s.ticktext,i(C)&&C.length?C.length>L.length?C=C.slice(0,L.length):L.length>C.length&&(L=L.slice(0,C.length)):C=L.map(a(s.tickformat));for(var D=1;D=n||l>=i)return;var c=e.lineLayer.readPixel(s,i-1-l),u=0!==c[3],h=u?c[2]+256*(c[1]+256*c[0]):null,f={x:s,y:l,clientX:t.clientX,clientY:t.clientY,dataIndex:e.model.key,curveNumber:h};h!==C&&(u?a.hover(f):a.unhover&&a.unhover(f),C=h)}})),E.style("opacity",(function(e){return e.pick?0:1})),p.style("background","rgba(255, 255, 255, 0)");var B=p.selectAll("."+x.cn.parcoords).data(S,d);B.exit().remove(),B.enter().append("g").classed(x.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),B.attr("transform",(function(e){return c(e.model.translateX,e.model.translateY)}));var j=B.selectAll("."+x.cn.parcoordsControlView).data(m,d);j.enter().append("g").classed(x.cn.parcoordsControlView,!0),j.attr("transform",(function(e){return c(e.model.pad.l,e.model.pad.t)}));var N=j.selectAll("."+x.cn.yAxis).data((function(e){return e.dimensions}),d);N.enter().append("g").classed(x.cn.yAxis,!0),j.each((function(e){O(N,e,b)})),E.each((function(e){if(e.viewModel){!e.lineLayer||a?e.lineLayer=w(this,e):e.lineLayer.update(e),(e.key||0===e.key)&&(e.viewModel[e.key]=e.lineLayer);var t=!e.context||a;e.lineLayer.render(e.viewModel.panels,t)}})),N.attr("transform",(function(e){return c(e.xScale(e.xIndex),0)})),N.call(r.behavior.drag().origin((function(e){return e})).on("drag",(function(e){var t=e.parent;A.linePickActive(!1),e.x=Math.max(-x.overdrag,Math.min(e.model.width+x.overdrag,r.event.x)),e.canvasX=e.x*e.model.canvasPixelRatio,N.sort((function(e,t){return e.x-t.x})).each((function(t,r){t.xIndex=r,t.x=e===t?t.x:t.xScale(t.xIndex),t.canvasX=t.x*t.model.canvasPixelRatio})),O(N,t,b),N.filter((function(t){return 0!==Math.abs(e.xIndex-t.xIndex)})).attr("transform",(function(e){return c(e.xScale(e.xIndex),0)})),r.select(this).attr("transform",c(e.x,0)),N.each((function(r,n,i){i===e.parent.key&&(t.dimensions[n]=r)})),t.contextLayer&&t.contextLayer.render(t.panels,!1,!I(t)),t.focusLayer.render&&t.focusLayer.render(t.panels)})).on("dragend",(function(e){var t=e.parent;e.x=e.xScale(e.xIndex),e.canvasX=e.x*e.model.canvasPixelRatio,O(N,t,b),r.select(this).attr("transform",(function(e){return c(e.x,0)})),t.contextLayer&&t.contextLayer.render(t.panels,!1,!I(t)),t.focusLayer&&t.focusLayer.render(t.panels),t.pickLayer&&t.pickLayer.render(t.panels,!0),A.linePickActive(!0),a&&a.axesMoved&&a.axesMoved(t.key,t.dimensions.map((function(e){return e.crossfilterDimensionIndex})))}))),N.exit().remove();var U=N.selectAll("."+x.cn.axisOverlays).data(m,d);U.enter().append("g").classed(x.cn.axisOverlays,!0),U.selectAll("."+x.cn.axis).remove();var V=U.selectAll("."+x.cn.axis).data(m,d);V.enter().append("g").classed(x.cn.axis,!0),V.each((function(e){var t=e.model.height/e.model.tickDistance,n=e.domainScale,i=n.domain();r.select(this).call(r.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(t,e.tickFormat).tickValues(e.ordinal?i:null).tickFormat((function(t){return y.isOrdinal(e)?t:R(e.model.dimensions[e.visibleIndex],t)})).scale(n)),h.font(V.selectAll("text"),e.model.tickFont)})),V.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),V.selectAll("text").style("cursor","default");var q=U.selectAll("."+x.cn.axisHeading).data(m,d);q.enter().append("g").classed(x.cn.axisHeading,!0);var H=q.selectAll("."+x.cn.axisTitle).data(m,d);H.enter().append("text").classed(x.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",o?"none":"auto"),H.text((function(e){return e.label})).each((function(t){var n=r.select(this);h.font(n,t.model.labelFont),u.convertToTspans(n,e)})).attr("transform",(function(e){var t=D(e.model.labelAngle,e.model.labelSide),r=x.axisTitleOffset;return(t.dir>0?"":c(0,2*r+e.model.height))+l(t.degrees)+c(-r*t.dx,-r*t.dy)})).attr("text-anchor",(function(e){var t=D(e.model.labelAngle,e.model.labelSide);return 2*Math.abs(t.dx)>Math.abs(t.dy)?t.dir*t.dx<0?"start":"end":"middle"}));var G=U.selectAll("."+x.cn.axisExtent).data(m,d);G.enter().append("g").classed(x.cn.axisExtent,!0);var W=G.selectAll("."+x.cn.axisExtentTop).data(m,d);W.enter().append("g").classed(x.cn.axisExtentTop,!0),W.attr("transform",c(0,-x.axisExtentOffset));var Z=W.selectAll("."+x.cn.axisExtentTopText).data(m,d);Z.enter().append("text").classed(x.cn.axisExtentTopText,!0).call(z),Z.text((function(e){return F(e,!0)})).each((function(e){h.font(r.select(this),e.model.rangeFont)}));var Y=G.selectAll("."+x.cn.axisExtentBottom).data(m,d);Y.enter().append("g").classed(x.cn.axisExtentBottom,!0),Y.attr("transform",(function(e){return c(0,e.model.height+x.axisExtentOffset)}));var X=Y.selectAll("."+x.cn.axisExtentBottomText).data(m,d);X.enter().append("text").classed(x.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(z),X.text((function(e){return F(e,!1)})).each((function(e){h.font(r.select(this),e.model.rangeFont)})),_.ensureAxisBrush(U,T,e)}}}),m_=m({"src/traces/parcoords/plot.js"(e,t){var r=d_(),n=Mx(),i=f_().isVisible,a={};function o(e,t,r){var n=t.indexOf(r),i=e.indexOf(n);return-1===i&&(i+=t.length),i}(t.exports=function(e,t){var s=e._fullLayout;if(n(e,[],a)){var l={},c={},u={},h={},f=s._size;t.forEach((function(t,r){var n=t[0].trace;u[r]=n.index;var i=h[r]=n.index;l[r]=e.data[i].dimensions,c[r]=e.data[i].dimensions.slice()})),r(e,t,{width:f.w,height:f.h,margin:{t:f.t,r:f.r,b:f.b,l:f.l}},{filterChanged:function(t,r,n){var i=c[t][r],a=n.map((function(e){return e.slice()})),o="dimensions["+r+"].constraintrange",l=s._tracePreGUI[e._fullData[u[t]]._fullInput.uid];if(void 0===l[o]){var f=i.constraintrange;l[o]=f||null}var p=e._fullData[u[t]].dimensions[r];a.length?(1===a.length&&(a=a[0]),i.constraintrange=a,p.constraintrange=a.slice(),a=[a]):(delete i.constraintrange,delete p.constraintrange,a=null);var d={};d[o]=a,e.emit("plotly_restyle",[d,[h[t]]])},hover:function(t){e.emit("plotly_hover",t)},unhover:function(t){e.emit("plotly_unhover",t)},axesMoved:function(t,r){var n=function(e,t){return function(r,n){return o(e,t,r)-o(e,t,n)}}(r,c[t].filter(i));l[t].sort(n),c[t].filter((function(e){return!i(e)})).sort((function(e){return c[t].indexOf(e)})).forEach((function(e){l[t].splice(l[t].indexOf(e),1),l[t].splice(c[t].indexOf(e),0,e)})),e.emit("plotly_restyle",[{dimensions:[l[t]]},[h[t]]])}})}}).reglPrecompiled=a}}),g_=m({"src/traces/parcoords/base_plot.js"(e){var t=b(),r=Tt().getModuleCalcData,n=m_(),i=Mt();e.name="parcoords",e.plot=function(e){var t=r(e.calcdata,"parcoords")[0];t.length&&n(e,t)},e.clean=function(e,t,r,n){var i=n._has&&n._has("parcoords"),a=t._has&&t._has("parcoords");i&&!a&&(n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())},e.toSVG=function(e){var r=e._fullLayout._glimages,n=t.select(e).selectAll(".svg-container");n.filter((function(e,t){return t===n.size()-1})).selectAll(".gl-canvas-context, .gl-canvas-focus").each((function(){var e=this,t=e.toDataURL("image/png");r.append("svg:image").attr({xmlns:i.svg,"xlink:href":t,preserveAspectRatio:"none",x:0,y:0,width:e.style.width,height:e.style.height})})),window.setTimeout((function(){t.selectAll("#filterBarPattern").attr("id","filterBarPattern")}),60)}}}),y_=m({"src/traces/parcoords/base_index.js"(e,t){t.exports={attributes:Yx(),supplyDefaults:Jx(),calc:Qx(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:g_(),categories:["gl","regl","noOpacity","noHover"],meta:{}}}}),v_=m({"src/traces/parcoords/index.js"(e,t){var r=y_();r.plot=m_(),t.exports=r}}),x_=m({"lib/parcoords.js"(e,t){t.exports=v_()}}),__=m({"src/traces/parcats/attributes.js"(e,t){var r=B().extendFlat,n=q(),i=j(),a=zt(),{hovertemplateAttrs:o,templatefallbackAttrs:s}=Fe(),l=Ma().attributes,c=r({editType:"calc"},a("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:o({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:s({editType:"plot"})});t.exports={domain:l({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:r({},n.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:o({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:s({editType:"plot"}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:i({editType:"calc"}),tickfont:i({autoShadowDflt:!0,editType:"calc"}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},values:{valType:"data_array",dflt:[],editType:"calc"},displayindex:{valType:"integer",editType:"calc"},editType:"calc",visible:{valType:"boolean",dflt:!0,editType:"calc"}},line:c,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc"},customdata:void 0,hoverlabel:void 0,ids:void 0,legend:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}}}),b_=m({"src/traces/parcats/defaults.js"(e,t){var r=ct(),n=Ct().hasColorscale,i=Ht(),a=Ma().defaults,o=Nt(),s=__(),l=Lx(),c=I().isTypedArraySpec;function u(e,t){function n(n,i){return r.coerce(e,t,s.dimensions,n,i)}var i=n("values"),a=n("visible");if(i&&i.length||(a=t.visible=!1),a){n("label"),n("displayindex",t._index);var o,l=e.categoryarray,u=r.isArrayOrTypedArray(l)&&l.length>0||c(l);u&&(o="array");var h=n("categoryorder",o);"array"===h?(n("categoryarray"),n("ticktext")):(delete e.categoryarray,delete e.ticktext),!u&&"array"===h&&(t.categoryorder="trace")}}t.exports=function(e,t,c,h){function f(n,i){return r.coerce(e,t,s,n,i)}var p=o(e,t,{name:"dimensions",handleItemDefaults:u}),d=function(e,t,a,o,s){s("line.shape"),s("line.hovertemplate"),s("line.hovertemplatefallback");var l=s("line.color",o.colorway[0]);if(n(e,"line")&&r.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),i(e,t,o,s,{prefix:"line.",cLetter:"c"}),l.length;t.line.color=a}return 1/0}(e,t,c,h,f);a(t,h,f),(!Array.isArray(p)||!p.length)&&(t.visible=!1),l(t,p,"values",d),f("hoveron"),f("hovertemplate"),f("hovertemplatefallback"),f("arrangement"),f("bundlecolors"),f("sortpaths"),f("counts");var m=h.font;r.coerceFont(f,"labelfont",m,{overrideDflt:{size:Math.round(m.size)}}),r.coerceFont(f,"tickfont",m,{autoShadowDflt:!0,overrideDflt:{size:Math.round(m.size/1.2)}})}}}),w_=m({"src/traces/parcats/calc.js"(e,t){var r=$x().wrap,n=Ct().hasColorscale,i=Zt(),a=at(),o=er(),s=ct(),l=M();function c(e,t,r,n){return{dimensionInd:e,categoryInd:t,categoryValue:r,displayInd:t,categoryLabel:n,valueInds:[],count:0,dragY:null}}function u(e,t,r){e.valueInds.push(t),e.count+=r}function h(e,t,r){return{categoryInds:e,color:t,rawColor:r,valueInds:[],count:0}}function f(e,t,r){e.valueInds.push(t),e.count+=r}t.exports=function(e,t){var p=s.filterVisible(t.dimensions);if(0===p.length)return[];var d,m,g,y=p.map((function(e){var t;if("trace"===e.categoryorder)t=null;else if("array"===e.categoryorder)t=e.categoryarray;else{t=a(e.values);for(var r=!0,n=0;n=e.length||void 0!==t[e[r]])return!1;t[e[r]]=!0}return!0}(r))for(t=0;tt.model.rawColor?1:e.model.rawColor"),C=r.mouse(h)[0];a.loneHover({trace:f,x:_-d.left+m.left,y:b-d.top+m.top,text:E,color:e.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:w,idealAlign:C<_?"right":"left",hovertemplate:(f.line||{}).hovertemplate,hovertemplateLabels:M,eventData:[{data:f._input,fullData:f,count:k,probability:A}]},{container:p._hoverlayer.node(),outerContainer:p._paper.node(),gd:h})}}}function g(e){if(!e.parcatsViewModel.dragDimension&&(w(r.select(this)),a.loneUnhover(e.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),e.parcatsViewModel.pathSelection.sort(d),-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip"))){var t=y(e),n=x(e);e.parcatsViewModel.graphDiv.emit("plotly_unhover",{points:t,event:r.event,constraints:n})}}function y(e){for(var t=[],r=O(e.parcatsViewModel),n=0;n1&&f.displayInd===h.dimensions.length-1?(i=c.left,a="left"):(i=c.left+c.width,a="right");var m=u.model.count,g=u.model.categoryLabel,y=m/u.parcatsViewModel.model.count,v={countLabel:m,categoryLabel:g,probabilityLabel:y.toFixed(3)},x=[];-1!==u.parcatsViewModel.hoverinfoItems.indexOf("count")&&x.push(["Count:",v.countLabel].join(" ")),-1!==u.parcatsViewModel.hoverinfoItems.indexOf("probability")&&x.push(["P("+v.categoryLabel+"):",v.probabilityLabel].join(" "));var _=x.join("
");return{trace:p,x:o*(i-t.left),y:s*(d-t.top),text:_,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:a,hovertemplate:p.hovertemplate,hovertemplateLabels:v,eventData:[{data:p._input,fullData:p,count:m,category:g,probability:y}]}}function I(e){if(!e.parcatsViewModel.dragDimension&&-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip")){if(r.mouse(this)[1]<-1)return;var t,n=e.parcatsViewModel.graphDiv,i=n._fullLayout,s=i._paperdiv.node().getBoundingClientRect(),l=e.parcatsViewModel.hoveron,u=this;"color"===l?(function(e){var t=r.select(e).datum(),n=M(t);T(n),n.each((function(){o.raiseToTop(this)})),r.select(e.parentNode).selectAll("rect.bandrect").filter((function(e){return e.color===t.color})).each((function(){o.raiseToTop(this),function(e){e.attr("stroke","black").attr("stroke-width",1.5)}(r.select(this))}))}(u),E(u,"plotly_hover",r.event)):(function(e){r.select(e.parentNode).selectAll("rect.bandrect").each((function(e){var t=M(e);T(t),t.each((function(){o.raiseToTop(this)}))})),function(e){e.select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}(r.select(e.parentNode))}(u),S(u,"plotly_hover",r.event)),-1===e.parcatsViewModel.hoverinfoItems.indexOf("none")&&("category"===l?t=C(n,s,u):"color"===l?t=function(e,t,n){e._fullLayout._calcInverseTransform(e);var i,a,o=e._fullLayout._invScaleX,s=e._fullLayout._invScaleY,l=n.getBoundingClientRect(),u=r.select(n).datum(),h=u.categoryViewModel,f=h.parcatsViewModel,p=f.model.dimensions[h.model.dimensionInd],d=f.trace,m=l.y+l.height/2;f.dimensions.length>1&&p.displayInd===f.dimensions.length-1?(i=l.left,a="left"):(i=l.left+l.width,a="right");var g=h.model.categoryLabel,y=u.parcatsViewModel.model.count,v=0;u.categoryViewModel.bands.forEach((function(e){e.color===u.color&&(v+=e.count)}));var x=h.model.count,_=0;f.pathSelection.each((function(e){e.model.color===u.color&&(_+=e.model.count)}));var b=v/y,w=v/_,T=v/x,k={countLabel:v,categoryLabel:g,probabilityLabel:b.toFixed(3)},A=[];-1!==h.parcatsViewModel.hoverinfoItems.indexOf("count")&&A.push(["Count:",k.countLabel].join(" ")),-1!==h.parcatsViewModel.hoverinfoItems.indexOf("probability")&&(A.push("P(color ∩ "+g+"): "+k.probabilityLabel),A.push("P("+g+" | color): "+w.toFixed(3)),A.push("P(color | "+g+"): "+T.toFixed(3)));var M=A.join("
"),S=c.mostReadable(u.color,["black","white"]);return{trace:d,x:o*(i-t.left),y:s*(m-t.top),text:M,color:u.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:S,fontSize:10,idealAlign:a,hovertemplate:d.hovertemplate,hovertemplateLabels:k,eventData:[{data:d._input,fullData:d,category:g,count:y,probability:b,categorycount:x,colorcount:_,bandcolorcount:v}]}}(n,s,u):"dimension"===l&&(t=function(e,t,n){var i=[];return r.select(n.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each((function(){i.push(C(e,t,this))})),i}(n,s,u)),t&&a.loneHover(t,{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:n}))}}function L(e){var t=e.parcatsViewModel;t.dragDimension||(w(t.pathSelection),k(t.dimensionSelection.selectAll("g.category")),A(t.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),a.loneUnhover(t.graphDiv._fullLayout._hoverlayer.node()),t.pathSelection.sort(d),-1!==t.hoverinfoItems.indexOf("skip"))||("color"===e.parcatsViewModel.hoveron?E(this,"plotly_unhover",r.event):S(this,"plotly_unhover",r.event))}function P(e){"fixed"!==e.parcatsViewModel.arrangement&&(e.dragDimensionDisplayInd=e.model.displayInd,e.initialDragDimensionDisplayInds=e.parcatsViewModel.model.dimensions.map((function(e){return e.displayInd})),e.dragHasMoved=!1,e.dragCategoryDisplayInd=null,r.select(this).selectAll("g.category").select("rect.catrect").each((function(t){var n=r.mouse(this)[0],i=r.mouse(this)[1];-2<=n&&n<=t.width+2&&-2<=i&&i<=t.height+2&&(e.dragCategoryDisplayInd=t.model.displayInd,e.initialDragCategoryDisplayInds=e.model.categories.map((function(e){return e.displayInd})),t.model.dragY=t.y,o.raiseToTop(this.parentNode),r.select(this.parentNode).selectAll("rect.bandrect").each((function(t){t.yh.y+h.height/2&&(o.model.displayInd=h.model.displayInd,h.model.displayInd=l),e.dragCategoryDisplayInd=o.model.displayInd}if(null===e.dragCategoryDisplayInd||"freeform"===e.parcatsViewModel.arrangement){a.model.dragX=r.event.x;var f=e.parcatsViewModel.dimensions[n],p=e.parcatsViewModel.dimensions[i];void 0!==f&&a.model.dragXp.x&&(a.model.displayInd=p.model.displayInd,p.model.displayInd=e.dragDimensionDisplayInd),e.dragDimensionDisplayInd=a.model.displayInd}V(e.parcatsViewModel),U(e.parcatsViewModel),B(e.parcatsViewModel),R(e.parcatsViewModel)}}function D(e){if("fixed"!==e.parcatsViewModel.arrangement&&null!==e.dragDimensionDisplayInd){r.select(this).selectAll("text").attr("font-weight","normal");var t={},n=O(e.parcatsViewModel),a=e.parcatsViewModel.model.dimensions.map((function(e){return e.displayInd})),o=e.initialDragDimensionDisplayInds.some((function(e,t){return e!==a[t]}));o&&a.forEach((function(r,n){var i=e.parcatsViewModel.model.dimensions[n].containerInd;t["dimensions["+i+"].displayindex"]=r}));var s=!1;if(null!==e.dragCategoryDisplayInd){var l=e.model.categories.map((function(e){return e.displayInd}));if(s=e.initialDragCategoryDisplayInds.some((function(e,t){return e!==l[t]}))){var c=e.model.categories.slice().sort((function(e,t){return e.displayInd-t.displayInd})),u=c.map((function(e){return e.categoryValue})),h=c.map((function(e){return e.categoryLabel}));t["dimensions["+e.model.containerInd+"].categoryarray"]=[u],t["dimensions["+e.model.containerInd+"].ticktext"]=[h],t["dimensions["+e.model.containerInd+"].categoryorder"]="array"}}-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip")&&!e.dragHasMoved&&e.potentialClickBand&&("color"===e.parcatsViewModel.hoveron?E(e.potentialClickBand,"plotly_click",r.event.sourceEvent):S(e.potentialClickBand,"plotly_click",r.event.sourceEvent)),e.model.dragX=null,null!==e.dragCategoryDisplayInd&&(e.parcatsViewModel.dimensions[e.dragDimensionDisplayInd].categories[e.dragCategoryDisplayInd].model.dragY=null,e.dragCategoryDisplayInd=null),e.dragDimensionDisplayInd=null,e.parcatsViewModel.dragDimension=null,e.dragHasMoved=null,e.potentialClickBand=null,V(e.parcatsViewModel),U(e.parcatsViewModel),r.transition().duration(300).ease("cubic-in-out").each((function(){B(e.parcatsViewModel,!0),R(e.parcatsViewModel,!0)})).each("end",(function(){(o||s)&&i.restyle(e.parcatsViewModel.graphDiv,t,[n])}))}}function O(e){for(var t,r=e.graphDiv._fullData,n=0;n=0;s--)u+="C"+c[s]+","+(t[s+1]+i)+" "+l[s]+","+(t[s]+i)+" "+(e[s]+r[s])+","+(t[s]+i),u+="l-"+r[s]+",0 ";return u+"Z"}function U(e){var t=e.dimensions,r=e.model,n=t.map((function(e){return e.categories.map((function(e){return e.y}))})),i=e.model.dimensions.map((function(e){return e.categories.map((function(e){return e.displayInd}))})),a=e.model.dimensions.map((function(e){return e.displayInd})),o=e.dimensions.map((function(e){return e.model.dimensionInd})),s=t.map((function(e){return e.x})),l=t.map((function(e){return e.width})),c=[];for(var u in r.paths)r.paths.hasOwnProperty(u)&&c.push(r.paths[u]);function h(e){var t=e.categoryInds.map((function(e,t){return i[t][e]}));return o.map((function(e){return t[e]}))}c.sort((function(t,r){var n=h(t),i=h(r);return"backward"===e.sortpaths&&(n.reverse(),i.reverse()),n.push(t.valueInds[0]),i.push(r.valueInds[0]),e.bundlecolors&&(n.unshift(t.rawColor),i.unshift(r.rawColor)),ni?1:0}));for(var f=new Array(c.length),p=t[0].model.count,d=t[0].categories.map((function(e){return e.height})).reduce((function(e,t){return e+t})),m=0;m0?d*(v.count/p):0;for(var x=new Array(n.length),_=0;_1?(e.width-80-16)/(n-1):0)*i;var a,o,s,l,c,u=[],h=e.model.maxCats,f=t.categories.length,p=t.count,d=e.height-8*(h-1),m=8*(h-f)/2,g=t.categories.map((function(e){return{displayInd:e.displayInd,categoryInd:e.categoryInd}}));for(g.sort((function(e,t){return e.displayInd-t.displayInd})),c=0;c0?o.count/p*d:0,s={key:o.valueInds[0],model:o,width:16,height:a,y:null!==o.dragY?o.dragY:m,bands:[],parcatsViewModel:e},m=m+a+8,u.push(s);return{key:t.dimensionInd,x:null!==t.dragX?t.dragX:r,y:0,width:16,model:t,categories:u,parcatsViewModel:e,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}t.exports=function(e,t,r,n){h(r,e,n,t)}}}),k_=m({"src/traces/parcats/plot.js"(e,t){var r=T_();t.exports=function(e,t,n,i){var a=e._fullLayout,o=a._paper,s=a._size;r(e,o,t,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},n,i)}}}),A_=m({"src/traces/parcats/base_plot.js"(e){var t=Tt().getModuleCalcData,r=k_(),n="parcats";e.name=n,e.plot=function(e,i,a,o){var s=t(e.calcdata,n);if(s.length){var l=s[0];r(e,l,a,o)}},e.clean=function(e,t,r,n){var i=n._has&&n._has("parcats"),a=t._has&&t._has("parcats");i&&!a&&n._paperdiv.selectAll(".parcats").remove()}}}),M_=m({"src/traces/parcats/index.js"(e,t){t.exports={attributes:__(),supplyDefaults:b_(),calc:w_(),plot:k_(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:A_(),categories:["noOpacity"],meta:{}}}}),S_=m({"lib/parcats.js"(e,t){t.exports=M_()}}),E_=m({"src/plots/mapbox/constants.js"(e,t){var r=Ye(),n="1.13.4",i='©
OpenStreetMap contributors',a=['© Carto',i].join(" "),o=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),s={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:i,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:a,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:a,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:o,tiles:["https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:o,tiles:["https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),tiles:["https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"}},l=r(s);t.exports={requiredVersion:n,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:s,styleValuesNonMapbox:l,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install @plotly/mapbox-gl@"+n+"."].join("\n"),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:"," Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });","More info here: https://www.mapbox.com/help/define-access-token/"].join("\n"),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",l.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join("\n"),multipleTokensErrorMsg:["Set multiple mapbox access token across different mapbox subplot,","using first token found as mapbox-gl does not allow multipleaccess tokens on the same page."].join("\n"),mapOnErrorMsg:"Mapbox error.",mapboxLogo:{path0:"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z",path1:"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z",path2:"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z",polygon:"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34"},styleRules:{map:"overflow:hidden;position:relative;","missing-css":"display:none;",canary:"background-color:salmon;","ctrl-bottom-left":"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;","ctrl-bottom-right":"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;",ctrl:"clear: both; pointer-events: auto; transform: translate(0, 0);","ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner":"display: none;","ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner":"display: block; margin-top:2px","ctrl-attrib.mapboxgl-compact:hover":"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;","ctrl-attrib.mapboxgl-compact::after":'content: ""; cursor: pointer; position: absolute; background-image: url(\'data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E\'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;',"ctrl-attrib.mapboxgl-compact":"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;","ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":'display:block; width: 21px; height: 21px; background-image: url(\'data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E\')'}}}}),C_=m({"src/plots/mapbox/layout_attributes.js"(e,t){var r=ct(),n=W().defaultLine,i=Ma().attributes,a=j(),o=kn().textposition,s=De().overrideAll,l=vt().templatedArray,c=E_(),u=a({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});u.family.dflt="Open Sans Regular, Arial Unicode MS Regular",(t.exports=s({_arrayAttrRegexps:[r.counterRegex("mapbox",".layers",!0)],domain:i({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:c.styleValuesMapbox.concat(c.styleValuesNonMapbox),dflt:c.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:l("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:n},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:n}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:u,textposition:r.extendFlat({},o,{arrayOk:!1})}})},"plot","from-root")).uirevision={valType:"any",editType:"none"}}}),I_=m({"src/traces/scattermapbox/attributes.js"(e,t){var{hovertemplateAttrs:r,texttemplateAttrs:n,templatefallbackAttrs:i}=Fe(),a=Tn(),o=sg(),s=kn(),l=C_(),c=q(),u=zt(),h=B().extendFlat,f=De().overrideAll,p=C_(),d=o.line,m=o.marker;t.exports=f({lon:o.lon,lat:o.lat,cluster:{enabled:{valType:"boolean"},maxzoom:h({},p.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:h({},m.opacity,{dflt:1})},mode:h({},s.mode,{dflt:"markers"}),text:h({},s.text,{}),texttemplate:n({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:i({editType:"plot"}),hovertext:h({},s.hovertext,{}),line:{color:d.color,width:d.width},connectgaps:s.connectgaps,marker:h({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:m.opacity,size:m.size,sizeref:m.sizeref,sizemin:m.sizemin,sizemode:m.sizemode},u("marker")),fill:o.fill,fillcolor:a(),textfont:l.layers.symbol.textfont,textposition:l.layers.symbol.textposition,below:{valType:"string"},selected:{marker:s.selected.marker},unselected:{marker:s.unselected.marker},hoverinfo:h({},c.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:r(),hovertemplatefallback:i()},"calc","nested")}}),L_=m({"src/traces/scattermapbox/constants.js"(e,t){var r=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];t.exports={isSupportedFont:function(e){return-1!==r.indexOf(e)}}}}),P_=m({"src/traces/scattermapbox/defaults.js"(e,t){var r=ct(),n=Xt(),i=Yn(),a=Xn(),o=Kn(),s=Jn(),l=I_(),c=L_().isSupportedFont;t.exports=function(e,t,u,h){function f(n,i){return r.coerce(e,t,l,n,i)}function p(n,i){return r.coerce2(e,t,l,n,i)}var d=function(e,t,r){var n=r("lon")||[],i=r("lat")||[],a=Math.min(n.length,i.length);return t._length=a,a}(0,t,f);if(d){if(f("text"),f("texttemplate"),f("texttemplatefallback"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback"),f("mode"),f("below"),n.hasMarkers(t)){i(e,t,u,h,f,{noLine:!0,noAngle:!0}),f("marker.allowoverlap"),f("marker.angle");var m=t.marker;"circle"!==m.symbol&&(r.isArrayOrTypedArray(m.size)&&(m.size=m.size[0]),r.isArrayOrTypedArray(m.color)&&(m.color=m.color[0]))}n.hasLines(t)&&(a(e,t,u,h,f,{noDash:!0}),f("connectgaps"));var g=p("cluster.maxzoom"),y=p("cluster.step"),v=p("cluster.color",t.marker&&t.marker.color||u),x=p("cluster.size"),_=p("cluster.opacity");if(f("cluster.enabled",!1!==g||!1!==y||!1!==v||!1!==x||!1!==_)||n.hasText(t)){var b=h.font.family;o(e,t,h,f,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:c(b)?b:"Open Sans Regular",weight:h.font.weight,style:h.font.style,size:h.font.size,color:h.font.color}})}f("fill"),"none"!==t.fill&&s(e,t,u,f),r.coerceSelectionMarkerOpacity(t,f)}else t.visible=!1}}}),z_=m({"src/traces/scattermapbox/format_labels.js"(e,t){var r=ar();t.exports=function(e,t,n){var i={},a=n[t.subplot]._subplot.mockAxis,o=e.lonlat;return i.lonLabel=r.tickText(a,a.c2l(o[0]),!0).text,i.latLabel=r.tickText(a,a.c2l(o[1]),!0).text,i}}}),D_=m({"src/plots/mapbox/convert_text_opts.js"(e,t){var r=ct();t.exports=function(e,t){var n=e.split(" "),i=n[0],a=n[1],o=r.isArrayOrTypedArray(t)?r.mean(t):t,s=.5+o/100,l=1.5+o/100,c=["",""],u=[0,0];switch(i){case"top":c[0]="top",u[1]=-l;break;case"bottom":c[0]="bottom",u[1]=l}switch(a){case"left":c[1]="right",u[0]=-s;break;case"right":c[1]="left",u[0]=s}return{anchor:c[0]&&c[1]?c.join("-"):c[0]?c[0]:c[1]?c[1]:"center",offset:u}}}}),O_=m({"src/traces/scattermapbox/convert.js"(e,t){var r=M(),n=ct(),i=S().BADNUM,a=dg(),o=Yt(),s=er(),l=$t(),c=Xt(),u=L_().isSupportedFont,h=D_(),f=Kt().appendArrayPointValue,p=Et().NEWLINES,d=Et().BR_TAG_ALL;function m(e){return{type:e,geojson:a.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function g(e,t){return n.isArrayOrTypedArray(e)?t?function(t){return r(e[t])?+e[t]:0}:function(t){return e[t]}:e?function(){return e}:y}function y(){return""}function v(e){return e[0]===i}function x(e,t){var r;if(n.isArrayOrTypedArray(e)&&n.isArrayOrTypedArray(t)){r=["step",["get","point_count"],e[0]];for(var i=1;i850?" Black":i>750?" Extra Bold":i>650?" Bold":i>550?" Semi Bold":i>450?" Medium":i>350?" Regular":i>250?" Light":i>150?" Extra Light":" Thin"):"Open Sans"===a.slice(0,2).join(" ")?(s="Open Sans",s+=i>750?" Extrabold":i>650?" Bold":i>550?" Semibold":i>350?" Regular":" Light"):"Klokantech Noto Sans"===a.slice(0,3).join(" ")&&(s="Klokantech Noto Sans","CJK"===a[3]&&(s+=" CJK"),s+=i>500?" Bold":" Regular")),o&&(s+=" Italic"),"Open Sans Regular Italic"===s?s="Open Sans Italic":"Open Sans Regular Bold"===s?s="Open Sans Bold":"Open Sans Regular Bold Italic"===s?s="Open Sans Bold Italic":"Klokantech Noto Sans Regular Italic"===s&&(s="Klokantech Noto Sans Italic"),u(s)||(s=r),s.split(", ")}t.exports=function(e,t){var i,u=t[0].trace,b=!0===u.visible&&0!==u._length,w="none"!==u.fill,T=c.hasLines(u),k=c.hasMarkers(u),A=c.hasText(u),M=k&&"circle"===u.marker.symbol,S=k&&"circle"!==u.marker.symbol,E=u.cluster&&u.cluster.enabled,C=m("fill"),I=m("line"),L=m("circle"),P=m("symbol"),z={fill:C,line:I,circle:L,symbol:P};if(!b)return z;if((w||T)&&(i=a.calcTraceToLineCoords(t)),w&&(C.geojson=a.makePolygon(i),C.layout.visibility="visible",n.extendFlat(C.paint,{"fill-color":u.fillcolor})),T&&(I.geojson=a.makeLine(i),I.layout.visibility="visible",n.extendFlat(I.paint,{"line-width":u.line.width,"line-color":u.line.color,"line-opacity":u.opacity})),M){var D=function(e){var t,i,a,c,u=e[0].trace,h=u.marker,f=u.selectedpoints,p=n.isArrayOrTypedArray(h.color),d=n.isArrayOrTypedArray(h.size),m=n.isArrayOrTypedArray(h.opacity);function g(e){return u.opacity*e}p&&(i=o.hasColorscale(u,"marker")?o.makeColorScaleFuncFromTrace(h):n.identity),d&&(a=l(u)),m&&(c=function(e){return g(r(e)?+n.constrain(e,0,1):0)});var y,x=[];for(t=0;t=0;r--){var n=t[r];i.removeLayer(u.layerIds[n])}e||i.removeSource(u.sourceIds.circle)}(e):function(e){for(var t=a.nonCluster,r=t.length-1;r>=0;r--){var n=t[r];i.removeLayer(u.layerIds[n]),e||i.removeSource(u.sourceIds[n])}}(e)}function f(e){l?function(e){e||u.addSource("circle",o.circle,t.cluster);for(var r=a.cluster,n=0;n=0;r--){var n=t[r];e.removeLayer(this.layerIds[n]),e.removeSource(this.sourceIds[n])}},t.exports=function(e,t){var r,i,s,l=t[0].trace,c=l.cluster&&l.cluster.enabled,u=!0!==l.visible,h=new o(e,l.uid,c,u),f=n(e.gd,t),p=h.below=e.belowLookup["trace-"+l.uid];if(c)for(h.addSource("circle",f.circle,l.cluster),r=0;r")}function u(e){return e+"°"}}t.exports={hoverPoints:function(e,t,a){var c=e.cd,u=c[0].trace,h=e.xa,f=e.ya,p=e.subplot,d=[],m=s+u.uid+"-circle",g=u.cluster&&u.cluster.enabled;if(g){var y=p.map.queryRenderedFeatures(null,{layers:[m]});d=y.map((function(e){return e.id}))}var v=360*(t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360)),x=t-v;if(r.getClosest(c,(function(e){var t=e.lonlat;if(t[0]===o||g&&-1===d.indexOf(e.i+1))return 1/0;var r=n.modHalf(t[0],360),i=t[1],s=p.project([r,i]),l=s.x-h.c2p([x,i]),c=s.y-f.c2p([r,a]),u=Math.max(3,e.mrc||0);return Math.max(Math.sqrt(l*l+c*c)-u,1-3/u)}),e),!1!==e.index){var _=c[e.index],b=_.lonlat,w=[n.modHalf(b[0],360)+v,b[1]],T=h.c2p(w),k=f.c2p(w),A=_.mrc||1;e.x0=T-A,e.x1=T+A,e.y0=k-A,e.y1=k+A;var M={};M[u.subplot]={_subplot:p};var S=u._module.formatLabels(_,u,M);return e.lonLabel=S.lonLabel,e.latLabel=S.latLabel,e.color=i(u,_),e.extraText=l(u,_,c[0].t.labels),e.hovertemplate=u.hovertemplate,[e]}},getExtraText:l}}}),B_=m({"src/traces/scattermapbox/event_data.js"(e,t){t.exports=function(e,t){return e.lon=t.lon,e.lat=t.lat,e}}}),j_=m({"src/traces/scattermapbox/select.js"(e,t){var r=ct(),n=Xt(),i=S().BADNUM;t.exports=function(e,t){var a,o=e.cd,s=e.xaxis,l=e.yaxis,c=[],u=o[0].trace;if(!n.hasMarkers(u))return[];if(!1===t)for(a=0;a"u"&&(t=1e-6),i=e,o=0;o<8;o++){if(a=this.sampleCurveX(i)-e,Math.abs(a)(n=1))return n;for(;ra?r=i:n=i,i=.5*(n-r)+r}return i},i.prototype.solve=function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))};var a=o;function o(e,t){this.x=e,this.y=t}o.prototype={clone:function(){return new o(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,r=e.y-this.y;return t*t+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[0]*this.x+e[1]*this.y,r=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=r,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),r=Math.sin(e),n=t*this.x-r*this.y,i=r*this.x+t*this.y;return this.x=n,this.y=i,this},_rotateAround:function(e,t){var r=Math.cos(e),n=Math.sin(e),i=t.x+r*(this.x-t.x)-n*(this.y-t.y),a=t.y+n*(this.x-t.x)+r*(this.y-t.y);return this.x=i,this.y=a,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},o.convert=function(e){return e instanceof o?e:Array.isArray(e)?new o(e[0],e[1]):e};var s=typeof self<"u"?self:{},l=Math.pow(2,53)-1;function c(e,t,r,i){var a=new n(e,t,r,i);return function(e){return a.solve(e)}}var u=c(.25,.1,.25,1);function h(e,t,r){return Math.min(r,Math.max(t,e))}function f(e,t,r){var n=r-t,i=((e-t)%n+n)%n+t;return i===t?r:i}function p(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];for(var n=0,i=t;n>t/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,e)}()}function y(e){return!!e&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)}function v(e,t){e.forEach((function(e){t[e]&&(t[e]=t[e].bind(t))}))}function x(e,t){return-1!==e.indexOf(t,e.length-t.length)}function _(e,t,r){var n={};for(var i in e)n[i]=t.call(r||this,e[i],i,e);return n}function b(e,t,r){var n={};for(var i in e)t.call(r||this,e[i],i,e)&&(n[i]=e[i]);return n}function w(e){return Array.isArray(e)?e.map(w):"object"==typeof e&&e?_(e,w):e}var T={};function k(e){T[e]||(typeof console<"u"&&console.warn(e),T[e]=!0)}function A(e,t,r){return(r.y-e.y)*(t.x-e.x)>(t.y-e.y)*(r.x-e.x)}function M(e){for(var t=0,r=0,n=e.length,i=n-1,a=void 0,o=void 0;r@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(function(e,r,n,i){var a=n||i;return t[r]=!a||a.toLowerCase(),""})),t["max-age"]){var r=parseInt(t["max-age"],10);isNaN(r)?delete t["max-age"]:t["max-age"]=r}return t}var C=null;function I(e){if(null==C){var t=e.navigator?e.navigator.userAgent:null;C=!!e.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return C}function L(e){try{var t=s[e];return t.setItem("_mapbox_test_",1),t.removeItem("_mapbox_test_"),!0}catch{return!1}}var P,z,D,O,R=s.performance&&s.performance.now?s.performance.now.bind(s.performance):Date.now.bind(Date),F=s.requestAnimationFrame||s.mozRequestAnimationFrame||s.webkitRequestAnimationFrame||s.msRequestAnimationFrame,B=s.cancelAnimationFrame||s.mozCancelAnimationFrame||s.webkitCancelAnimationFrame||s.msCancelAnimationFrame,j={now:R,frame:function(e){var t=F(e);return{cancel:function(){return B(t)}}},getImageData:function(e,t){void 0===t&&(t=0);var r=s.document.createElement("canvas"),n=r.getContext("2d");if(!n)throw new Error("failed to create canvas 2d context");return r.width=e.width,r.height=e.height,n.drawImage(e,0,0,e.width,e.height),n.getImageData(-t,-t,e.width+2*t,e.height+2*t)},resolveURL:function(e){return P||(P=s.document.createElement("a")),P.href=e,P.href},hardwareConcurrency:s.navigator&&s.navigator.hardwareConcurrency||4,get devicePixelRatio(){return s.devicePixelRatio},get prefersReducedMotion(){return!!s.matchMedia&&(null==z&&(z=s.matchMedia("(prefers-reduced-motion: reduce)")),z.matches)}},N={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf("https://api.mapbox.cn")?"https://events.mapbox.cn/events/v2":0===this.API_URL.indexOf("https://api.mapbox.com")?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},U={supported:!1,testSupport:function(e){V||!O||(q?H(e):D=e)}},V=!1,q=!1;function H(e){var t=e.createTexture();e.bindTexture(e.TEXTURE_2D,t);try{if(e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,O),e.isContextLost())return;U.supported=!0}catch{}e.deleteTexture(t),V=!0}s.document&&((O=s.document.createElement("img")).onload=function(){D&&H(D),D=null,q=!0},O.onerror=function(){V=!0,D=null},O.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var G="01",W=function(e,t){this._transformRequestFn=e,this._customAccessToken=t,this._createSkuToken()};function Z(e){return 0===e.indexOf("mapbox:")}W.prototype._createSkuToken=function(){var e=function(){for(var e="",t=0;t<10;t++)e+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",G,e].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=e.token,this._skuTokenExpiresAt=e.tokenExpiresAt},W.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},W.prototype.transformRequest=function(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}},W.prototype.normalizeStyleURL=function(e,t){if(!Z(e))return e;var r=K(e);return r.path="/styles/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||t)},W.prototype.normalizeGlyphsURL=function(e,t){if(!Z(e))return e;var r=K(e);return r.path="/fonts/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||t)},W.prototype.normalizeSourceURL=function(e,t){if(!Z(e))return e;var r=K(e);return r.path="/v4/"+r.authority+".json",r.params.push("secure"),this._makeAPIURL(r,this._customAccessToken||t)},W.prototype.normalizeSpriteURL=function(e,t,r,n){var i=K(e);return Z(e)?(i.path="/styles/v1"+i.path+"/sprite"+t+r,this._makeAPIURL(i,this._customAccessToken||n)):(i.path+=""+t+r,J(i))},W.prototype.normalizeTileURL=function(e,t){if(this._isSkuTokenExpired()&&this._createSkuToken(),e&&!Z(e))return e;var r=K(e),n=j.devicePixelRatio>=2||512===t?"@2x":"",i=U.supported?".webp":"$1";r.path=r.path.replace(/(\.(png|jpg)\d*)(?=$)/,""+n+i),r.path=r.path.replace(/^.+\/v4\//,"/"),r.path="/v4"+r.path;var a=this._customAccessToken||function(e){for(var t=0,r=e;t=0&&e.params.splice(i,1)}if("/"!==n.path&&(e.path=""+n.path+e.path),!N.REQUIRE_ACCESS_TOKEN)return J(e);if(!(t=t||N.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+r);if("s"===t[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+r);return e.params=e.params.filter((function(e){return-1===e.indexOf("access_token")})),e.params.push("access_token="+t),J(e)};var Y=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function X(e){return Y.test(e)}var $=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function K(e){var t=e.match($);if(!t)throw new Error("Unable to parse URL object");return{protocol:t[1],authority:t[2],path:t[3]||"/",params:t[4]?t[4].split("&"):[]}}function J(e){var t=e.params.length?"?"+e.params.join("&"):"";return e.protocol+"://"+e.authority+e.path+t}var Q="mapbox.eventData";function ee(e){if(!e)return null;var t=e.split(".");if(!t||3!==t.length)return null;try{var r=JSON.parse(function(e){return decodeURIComponent(s.atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}(t[1]));return r}catch{return null}}var te=function(e){this.type=e,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};te.prototype.getStorageKey=function(e){var t,r=ee(N.ACCESS_TOKEN),n="";return r&&r.u?(t=r.u,n=s.btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode(+("0x"+t))})))):n=N.ACCESS_TOKEN||"",e?Q+"."+e+":"+n:Q+":"+n},te.prototype.fetchEventData=function(){var e=L("localStorage"),t=this.getStorageKey(),r=this.getStorageKey("uuid");if(e)try{var n=s.localStorage.getItem(t);n&&(this.eventData=JSON.parse(n));var i=s.localStorage.getItem(r);i&&(this.anonId=i)}catch{k("Unable to read from LocalStorage")}},te.prototype.saveEventData=function(){var e=L("localStorage"),t=this.getStorageKey(),r=this.getStorageKey("uuid");if(e)try{s.localStorage.setItem(r,this.anonId),Object.keys(this.eventData).length>=1&&s.localStorage.setItem(t,JSON.stringify(this.eventData))}catch{k("Unable to write to LocalStorage")}},te.prototype.processRequests=function(e){},te.prototype.postEvent=function(e,t,n,i){var a=this;if(N.EVENTS_URL){var o=K(N.EVENTS_URL);o.params.push("access_token="+(i||N.ACCESS_TOKEN||""));var s={event:this.type,created:new Date(e).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:r,skuId:G,userId:this.anonId},l=t?p(s,t):s,c={url:J(o),headers:{"Content-Type":"text/plain"},body:JSON.stringify([l])};this.pendingRequest=ke(c,(function(e){a.pendingRequest=null,n(e),a.saveEventData(),a.processRequests(i)}))}},te.prototype.queueRequest=function(e,t){this.queue.push(e),this.processRequests(t)};var re,ne,ie=function(e){function t(){e.call(this,"map.load"),this.success={},this.skuToken=""}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.postMapLoadEvent=function(e,t,r,n){this.skuToken=r,(N.EVENTS_URL&&n||N.ACCESS_TOKEN&&Array.isArray(e)&&e.some((function(e){return Z(e)||X(e)})))&&this.queueRequest({id:t,timestamp:Date.now()},n)},t.prototype.processRequests=function(e){var t=this;if(!this.pendingRequest&&0!==this.queue.length){var r=this.queue.shift(),n=r.id,i=r.timestamp;n&&this.success[n]||(this.anonId||this.fetchEventData(),y(this.anonId)||(this.anonId=g()),this.postEvent(i,{skuToken:this.skuToken},(function(e){e||n&&(t.success[n]=!0)}),e))}},t}(te),ae=function(e){function t(t){e.call(this,"appUserTurnstile"),this._customAccessToken=t}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.postTurnstileEvent=function(e,t){N.EVENTS_URL&&N.ACCESS_TOKEN&&Array.isArray(e)&&e.some((function(e){return Z(e)||X(e)}))&&this.queueRequest(Date.now(),t)},t.prototype.processRequests=function(e){var t=this;if(!this.pendingRequest&&0!==this.queue.length){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var r=ee(N.ACCESS_TOKEN),n=r?r.u:N.ACCESS_TOKEN,i=n!==this.eventData.tokenU;y(this.anonId)||(this.anonId=g(),i=!0);var a=this.queue.shift();if(this.eventData.lastSuccess){var o=new Date(this.eventData.lastSuccess),s=new Date(a),l=(a-this.eventData.lastSuccess)/864e5;i=i||l>=1||l<-1||o.getDate()!==s.getDate()}else i=!0;if(!i)return this.processRequests();this.postEvent(a,{"enabled.telemetry":!1},(function(e){e||(t.eventData.lastSuccess=a,t.eventData.tokenU=n)}),e)}},t}(te),oe=new ae,se=oe.postTurnstileEvent.bind(oe),le=new ie,ce=le.postMapLoadEvent.bind(le),ue="mapbox-tiles",he=500,fe=50;function pe(){s.caches&&!re&&(re=s.caches.open(ue))}function de(e){var t=e.indexOf("?");return t<0?e:e.slice(0,t)}var me,ge=1/0;function ye(){return null==me&&(me=s.OffscreenCanvas&&new s.OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof s.createImageBitmap),me}var ve={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(ve);var xe=function(e){function t(t,r,n){401===r&&X(n)&&(t+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),e.call(this,t),this.status=r,this.url=n,this.name=this.constructor.name,this.message=t}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},t}(Error),_e=S()?function(){return self.worker&&self.worker.referrer}:function(){return("blob:"===s.location.protocol?s.parent:s).location.href};function be(e,t){var r=new s.AbortController,n=new s.Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,referrer:_e(),signal:r.signal}),i=!1,a=!1,o=function(e){return e.indexOf("sku=")>0&&X(e)}(n.url);"json"===e.type&&n.headers.set("Accept","application/json");var l=function(r,i,l){if(!a){if(r&&"SecurityError"!==r.message&&k(r),i&&l)return c(i);var u=Date.now();s.fetch(n).then((function(r){if(r.ok){var n=o?r.clone():null;return c(r,n,u)}return t(new xe(r.statusText,r.status,e.url))})).catch((function(e){20!==e.code&&t(new Error(e.message))}))}},c=function(r,o,l){("arrayBuffer"===e.type?r.arrayBuffer():"json"===e.type?r.json():r.text()).then((function(e){a||(o&&l&&function(e,t,r){if(pe(),re){var n={status:t.status,statusText:t.statusText,headers:new s.Headers};t.headers.forEach((function(e,t){return n.headers.set(t,e)}));var i=E(t.headers.get("Cache-Control")||"");i["no-store"]||(i["max-age"]&&n.headers.set("Expires",new Date(r+1e3*i["max-age"]).toUTCString()),new Date(n.headers.get("Expires")).getTime()-r<42e4||function(e,t){if(void 0===ne)try{new Response(new ReadableStream),ne=!0}catch{ne=!1}ne?t(e.body):e.blob().then(t)}(t,(function(t){var r=new s.Response(t,n);pe(),re&&re.then((function(t){return t.put(de(e.url),r)})).catch((function(e){return k(e.message)}))})))}}(n,o,l),i=!0,t(null,e,r.headers.get("Cache-Control"),r.headers.get("Expires")))})).catch((function(e){a||t(new Error(e.message))}))};return o?function(e,t){if(pe(),!re)return t(null);var r=de(e.url);re.then((function(e){e.match(r).then((function(n){var i=function(e){if(!e)return!1;var t=new Date(e.headers.get("Expires")||0),r=E(e.headers.get("Cache-Control")||"");return t>Date.now()&&!r["no-cache"]}(n);e.delete(r),i&&e.put(r,n.clone()),t(null,n,i)})).catch(t)})).catch(t)}(n,l):l(null,null),{cancel:function(){a=!0,i||r.abort()}}}var we=function(e,t){if(!function(e){return/^file:/.test(e)||/^file:/.test(_e())&&!/^\w+:/.test(e)}(e.url)){if(s.fetch&&s.Request&&s.AbortController&&s.Request.prototype.hasOwnProperty("signal"))return be(e,t);if(S()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",e,t,void 0,!0)}return function(e,t){var r=new s.XMLHttpRequest;for(var n in r.open(e.method||"GET",e.url,!0),"arrayBuffer"===e.type&&(r.responseType="arraybuffer"),e.headers)r.setRequestHeader(n,e.headers[n]);return"json"===e.type&&(r.responseType="text",r.setRequestHeader("Accept","application/json")),r.withCredentials="include"===e.credentials,r.onerror=function(){t(new Error(r.statusText))},r.onload=function(){if((r.status>=200&&r.status<300||0===r.status)&&null!==r.response){var n=r.response;if("json"===e.type)try{n=JSON.parse(r.response)}catch(e){return t(e)}t(null,n,r.getResponseHeader("Cache-Control"),r.getResponseHeader("Expires"))}else t(new xe(r.statusText,r.status,e.url))},r.send(e.body),{cancel:function(){return r.abort()}}}(e,t)},Te=function(e,t){return we(p(e,{type:"arrayBuffer"}),t)},ke=function(e,t){return we(p(e,{method:"POST"}),t)};function Ae(e){var t=s.document.createElement("a");return t.href=e,t.protocol===s.document.location.protocol&&t.host===s.document.location.host}var Me,Se,Ee="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";Me=[],Se=0;var Ce=function(e,t){if(U.supported&&(e.headers||(e.headers={}),e.headers.accept="image/webp,*/*"),Se>=N.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:e,callback:t,cancelled:!1,cancel:function(){this.cancelled=!0}};return Me.push(r),r}Se++;var n=!1,i=function(){if(!n)for(n=!0,Se--;Me.length&&Se0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e)},De.prototype.setEventedParent=function(e,t){return this._eventedParent=e,this._eventedParentData=t,this};var Oe={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}},Re=function(e,t,r,n){this.message=(e?e+": ":"")+r,n&&(this.identifier=n),null!=t&&t.__line__&&(this.line=t.__line__)};function Fe(e){var t=e.key,r=e.value;return r?[new Re(t,r,"constants have been deprecated as of v8")]:[]}function Be(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];for(var n=0,i=t;n":"value"===e.itemType.kind?"array":"array<"+t+">"}return e.kind}var tt=[qe,He,Ge,We,Ze,Ke,Ye,Qe(Xe),Je];function rt(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!rt(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(var r=0,n=tt;r255?255:e}function i(e){return e<0?0:e>1?1:e}function a(e){return"%"===e[e.length-1]?n(parseFloat(e)/100*255):n(parseInt(e))}function o(e){return"%"===e[e.length-1]?i(parseFloat(e)/100):i(parseFloat(e))}function s(e,t,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?e+(t-e)*r*6:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}try{t.parseCSSColor=function(e){var t,i=e.replace(/ /g,"").toLowerCase();if(i in r)return r[i].slice();if("#"===i[0])return 4===i.length?(t=parseInt(i.substr(1),16))>=0&&t<=4095?[(3840&t)>>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===i.length&&(t=parseInt(i.substr(1),16))>=0&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var l=i.indexOf("("),c=i.indexOf(")");if(-1!==l&&c+1===i.length){var u=i.substr(0,l),h=i.substr(l+1,c-(l+1)).split(","),f=1;switch(u){case"rgba":if(4!==h.length)return null;f=o(h.pop());case"rgb":return 3!==h.length?null:[a(h[0]),a(h[1]),a(h[2]),f];case"hsla":if(4!==h.length)return null;f=o(h.pop());case"hsl":if(3!==h.length)return null;var p=(parseFloat(h[0])%360+360)%360/360,d=o(h[1]),m=o(h[2]),g=m<=.5?m*(d+1):m+d-m*d,y=2*m-g;return[n(255*s(y,g,p+1/3)),n(255*s(y,g,p)),n(255*s(y,g,p-1/3)),f];default:return null}}return null}}catch{}})).parseCSSColor,ot=function(e,t,r,n){void 0===n&&(n=1),this.r=e,this.g=t,this.b=r,this.a=n};ot.parse=function(e){if(e){if(e instanceof ot)return e;if("string"==typeof e){var t=at(e);if(t)return new ot(t[0]/255*t[3],t[1]/255*t[3],t[2]/255*t[3],t[3])}}},ot.prototype.toString=function(){var e=this.toArray(),t=e[0],r=e[1],n=e[2],i=e[3];return"rgba("+Math.round(t)+","+Math.round(r)+","+Math.round(n)+","+i+")"},ot.prototype.toArray=function(){var e=this,t=e.r,r=e.g,n=e.b,i=e.a;return 0===i?[0,0,0,0]:[255*t/i,255*r/i,255*n/i,i]},ot.black=new ot(0,0,0,1),ot.white=new ot(1,1,1,1),ot.transparent=new ot(0,0,0,0),ot.red=new ot(1,0,0,1);var st=function(e,t,r){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};st.prototype.compare=function(e,t){return this.collator.compare(e,t)},st.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var lt=function(e,t,r,n,i){this.text=e,this.image=t,this.scale=r,this.fontStack=n,this.textColor=i},ct=function(e){this.sections=e};ct.fromString=function(e){return new ct([new lt(e,null,null,null,null)])},ct.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(e){return 0!==e.text.length||e.image&&0!==e.image.name.length}))},ct.factory=function(e){return e instanceof ct?e:ct.fromString(e)},ct.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(e){return e.text})).join("")},ct.prototype.serialize=function(){for(var e=["format"],t=0,r=this.sections;t=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof r&&r>=0&&r<=255?typeof n>"u"||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[e,t,r,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[e,t,r,n]:[e,t,r]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function ft(e){if(null===e)return!0;if("string"==typeof e)return!0;if("boolean"==typeof e)return!0;if("number"==typeof e)return!0;if(e instanceof ot)return!0;if(e instanceof st)return!0;if(e instanceof ct)return!0;if(e instanceof ut)return!0;if(Array.isArray(e)){for(var t=0,r=e;t2){var s=e[1];if("string"!=typeof s||!(s in yt)||"object"===s)return t.error('The item type argument of "array" must be one of string, number, boolean',1);a=yt[s],n++}else a=Xe;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);o=e[2],n++}r=Qe(a,o)}else r=yt[i];for(var l=[];n1)&&t.push(n)}}return t.concat(this.args.map((function(e){return e.serialize()})))};var xt=function(e){this.type=Ke,this.sections=e};xt.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var r=e[1];if(!Array.isArray(r)&&"object"==typeof r)return t.error("First argument must be an image or text section.");for(var n=[],i=!1,a=1;a<=e.length-1;++a){var o=e[a];if(i&&"object"==typeof o&&!Array.isArray(o)){i=!1;var s=null;if(o["font-scale"]&&!(s=t.parse(o["font-scale"],1,He)))return null;var l=null;if(o["text-font"]&&!(l=t.parse(o["text-font"],1,Qe(Ge))))return null;var c=null;if(o["text-color"]&&!(c=t.parse(o["text-color"],1,Ze)))return null;var u=n[n.length-1];u.scale=s,u.font=l,u.textColor=c}else{var h=t.parse(e[a],1,Xe);if(!h)return null;var f=h.type.kind;if("string"!==f&&"value"!==f&&"null"!==f&&"resolvedImage"!==f)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,n.push({content:h,scale:null,font:null,textColor:null})}}return new xt(n)},xt.prototype.evaluate=function(e){return new ct(this.sections.map((function(t){var r=t.content.evaluate(e);return pt(r)===Je?new lt("",r,null,null,null):new lt(dt(r),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)})))},xt.prototype.eachChild=function(e){for(var t=0,r=this.sections;t-1),r},_t.prototype.eachChild=function(e){e(this.input)},_t.prototype.outputDefined=function(){return!1},_t.prototype.serialize=function(){return["image",this.input.serialize()]};var bt={"to-boolean":We,"to-color":Ze,"to-number":He,"to-string":Ge},wt=function(e,t){this.type=e,this.args=t};wt.parse=function(e,t){if(e.length<2)return t.error("Expected at least one argument.");var r=e[0];if(("to-boolean"===r||"to-string"===r)&&2!==e.length)return t.error("Expected one argument.");for(var n=bt[r],i=[],a=1;a4?"Invalid rbga value "+JSON.stringify(t)+": expected an array containing either three or four numeric values.":ht(t[0],t[1],t[2],t[3])))return new ot(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new gt(r||"Could not parse color from value '"+("string"==typeof t?t:String(JSON.stringify(t)))+"'")}if("number"===this.type.kind){for(var o=null,s=0,l=this.args;s=t[2]||e[1]<=t[1]||e[3]>=t[3])}function It(e,t){var r=function(e){return(180+e)/360}(e[0]),n=function(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}(e[1]),i=Math.pow(2,t.z);return[Math.round(r*i*St),Math.round(n*i*St)]}function Lt(e,t,r){var n=e[0]-t[0],i=e[1]-t[1],a=e[0]-r[0],o=e[1]-r[1];return n*o-a*i==0&&n*a<=0&&i*o<=0}function Pt(e,t,r){return t[1]>e[1]!=r[1]>e[1]&&e[0]<(r[0]-t[0])*(e[1]-t[1])/(r[1]-t[1])+t[0]}function zt(e,t){for(var r=!1,n=0,i=t.length;n0&&h<0||u<0&&h>0}function Rt(e,t,r,n){var i=[t[0]-e[0],t[1]-e[1]];return 0!==function(e,t){return e[0]*t[1]-e[1]*t[0]}([n[0]-r[0],n[1]-r[1]],i)&&!(!Ot(e,t,r,n)||!Ot(r,n,e,t))}function Ft(e,t,r){for(var n=0,i=r;nr[2]){var i=.5*n,a=e[0]-r[0]>i?-n:r[0]-e[0]>i?n:0;0===a&&(a=e[0]-r[2]>i?-n:r[2]-e[0]>i?n:0),e[0]+=a}Et(t,e)}function qt(e,t,r,n){for(var i=Math.pow(2,n.z)*St,a=[n.x*St,n.y*St],o=[],s=0,l=e;s=0)return!1;var r=!0;return e.eachChild((function(e){r&&!Yt(e,t)&&(r=!1)})),r}Gt.parse=function(e,t){if(2!==e.length)return t.error("'within' expression requires exactly one argument, but found "+(e.length-1)+" instead.");if(ft(e[1])){var r=e[1];if("FeatureCollection"===r.type)for(var n=0;nt))throw new gt("Input is not a number.");o=s-1}return 0}$t.prototype.parse=function(e,t,r,n,i){return void 0===i&&(i={}),t?this.concat(t,r,n)._parse(e,i):this._parse(e,i)},$t.prototype._parse=function(e,t){function r(e,t,r){return"assert"===r?new vt(t,[e]):"coerce"===r?new wt(t,[e]):e}if((null===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e)&&(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=e[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var i=this.registry[n];if(i){var a=i.parse(e,this);if(!a)return null;if(this.expectedType){var o=this.expectedType,s=a.type;if("string"!==o.kind&&"number"!==o.kind&&"boolean"!==o.kind&&"object"!==o.kind&&"array"!==o.kind||"value"!==s.kind)if("color"!==o.kind&&"formatted"!==o.kind&&"resolvedImage"!==o.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(o,s))return null}else a=r(a,o,t.typeAnnotation||"coerce");else a=r(a,o,t.typeAnnotation||"assert")}if(!(a instanceof mt)&&"resolvedImage"!==a.type.kind&&Kt(a)){var l=new kt;try{a=new mt(a.type,a.evaluate(l))}catch(e){return this.error(e.message),null}}return a}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return typeof e>"u"?this.error("'undefined' value invalid. Use null instead."):"object"==typeof e?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof e+" instead.")},$t.prototype.concat=function(e,t,r){var n="number"==typeof e?this.path.concat(e):this.path,i=r?this.scope.concat(r):this.scope;return new $t(this.registry,n,t||null,i,this.errors)},$t.prototype.error=function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];var n=""+this.key+t.map((function(e){return"["+e+"]"})).join("");this.errors.push(new Ue(n,e))},$t.prototype.checkSubtype=function(e,t){var r=rt(e,t);return r&&this.error(r),r};var Qt=function(e,t,r){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(var n=0,i=r;n=o)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var u=t.parse(s,c,i);if(!u)return null;i=i||u.type,n.push([o,u])}return new Qt(i,r,n)},Qt.prototype.evaluate=function(e){var t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);var i=t.length;return n>=t[i-1]?r[i-1].evaluate(e):r[Jt(t,n)].evaluate(e)},Qt.prototype.eachChild=function(e){e(this.input);for(var t=0,r=this.outputs;t0&&e.push(this.labels[t]),e.push(this.outputs[t].serialize());return e};var tr=Object.freeze({__proto__:null,number:er,color:function(e,t,r){return new ot(er(e.r,t.r,r),er(e.g,t.g,r),er(e.b,t.b,r),er(e.a,t.a,r))},array:function(e,t,r){return e.map((function(e,n){return er(e,t[n],r)}))}}),rr=.95047,nr=1.08883,ir=4/29,ar=6/29,or=3*ar*ar,sr=ar*ar*ar,lr=Math.PI/180,cr=180/Math.PI;function ur(e){return e>sr?Math.pow(e,1/3):e/or+ir}function hr(e){return e>ar?e*e*e:or*(e-ir)}function fr(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function pr(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function dr(e){var t=pr(e.r),r=pr(e.g),n=pr(e.b),i=ur((.4124564*t+.3575761*r+.1804375*n)/rr),a=ur((.2126729*t+.7151522*r+.072175*n)/1);return{l:116*a-16,a:500*(i-a),b:200*(a-ur((.0193339*t+.119192*r+.9503041*n)/nr)),alpha:e.a}}function mr(e){var t=(e.l+16)/116,r=isNaN(e.a)?t:t+e.a/500,n=isNaN(e.b)?t:t-e.b/200;return t=1*hr(t),r=rr*hr(r),n=nr*hr(n),new ot(fr(3.2404542*r-1.5371385*t-.4985314*n),fr(-.969266*r+1.8760108*t+.041556*n),fr(.0556434*r-.2040259*t+1.0572252*n),e.alpha)}function gr(e,t,r){var n=t-e;return e+r*(n>180||n<-180?n-360*Math.round(n/360):n)}var yr={forward:dr,reverse:mr,interpolate:function(e,t,r){return{l:er(e.l,t.l,r),a:er(e.a,t.a,r),b:er(e.b,t.b,r),alpha:er(e.alpha,t.alpha,r)}}},vr={forward:function(e){var t=dr(e),r=t.l,n=t.a,i=t.b,a=Math.atan2(i,n)*cr;return{h:a<0?a+360:a,c:Math.sqrt(n*n+i*i),l:r,alpha:e.a}},reverse:function(e){var t=e.h*lr,r=e.c;return mr({l:e.l,a:Math.cos(t)*r,b:Math.sin(t)*r,alpha:e.alpha})},interpolate:function(e,t,r){return{h:gr(e.h,t.h,r),c:er(e.c,t.c,r),l:er(e.l,t.l,r),alpha:er(e.alpha,t.alpha,r)}}},xr=Object.freeze({__proto__:null,lab:yr,hcl:vr}),_r=function(e,t,r,n,i){this.type=e,this.operator=t,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(var a=0,o=i;a1})))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:s}}if(e.length-1<4)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(!(i=t.parse(i,2,He)))return null;var l=[],c=null;"interpolate-hcl"===r||"interpolate-lab"===r?c=Ze:t.expectedType&&"value"!==t.expectedType.kind&&(c=t.expectedType);for(var u=0;u=h)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',p);var m=t.parse(f,d,c);if(!m)return null;c=c||m.type,l.push([h,m])}return"number"===c.kind||"color"===c.kind||"array"===c.kind&&"number"===c.itemType.kind&&"number"==typeof c.N?new _r(c,r,n,i,l):t.error("Type "+et(c)+" is not interpolatable.")},_r.prototype.evaluate=function(e){var t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);var n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);var i=t.length;if(n>=t[i-1])return r[i-1].evaluate(e);var a=Jt(t,n),o=t[a],s=t[a+1],l=_r.interpolationFactor(this.interpolation,n,o,s),c=r[a].evaluate(e),u=r[a+1].evaluate(e);return"interpolate"===this.operator?tr[this.type.kind.toLowerCase()](c,u,l):"interpolate-hcl"===this.operator?vr.reverse(vr.interpolate(vr.forward(c),vr.forward(u),l)):yr.reverse(yr.interpolate(yr.forward(c),yr.forward(u),l))},_r.prototype.eachChild=function(e){e(this.input);for(var t=0,r=this.outputs;t=r.length)throw new gt("Array index out of bounds: "+t+" > "+(r.length-1)+".");if(t!==Math.floor(t))throw new gt("Array index must be an integer, but found "+t+" instead.");return r[t]},kr.prototype.eachChild=function(e){e(this.index),e(this.input)},kr.prototype.outputDefined=function(){return!1},kr.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Ar=function(e,t){this.type=We,this.needle=e,this.haystack=t};Ar.parse=function(e,t){if(3!==e.length)return t.error("Expected 2 arguments, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1,Xe),n=t.parse(e[2],2,Xe);return r&&n?nt(r.type,[We,Ge,He,qe,Xe])?new Ar(r,n):t.error("Expected first argument to be of type boolean, string, number or null, but found "+et(r.type)+" instead"):null},Ar.prototype.evaluate=function(e){var t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!r)return!1;if(!it(t,["boolean","string","number","null"]))throw new gt("Expected first argument to be of type boolean, string, number or null, but found "+et(pt(t))+" instead.");if(!it(r,["string","array"]))throw new gt("Expected second argument to be of type array or string, but found "+et(pt(r))+" instead.");return r.indexOf(t)>=0},Ar.prototype.eachChild=function(e){e(this.needle),e(this.haystack)},Ar.prototype.outputDefined=function(){return!0},Ar.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var Mr=function(e,t,r){this.type=He,this.needle=e,this.haystack=t,this.fromIndex=r};Mr.parse=function(e,t){if(e.length<=2||e.length>=5)return t.error("Expected 3 or 4 arguments, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1,Xe),n=t.parse(e[2],2,Xe);if(!r||!n)return null;if(!nt(r.type,[We,Ge,He,qe,Xe]))return t.error("Expected first argument to be of type boolean, string, number or null, but found "+et(r.type)+" instead");if(4===e.length){var i=t.parse(e[3],3,He);return i?new Mr(r,n,i):null}return new Mr(r,n)},Mr.prototype.evaluate=function(e){var t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!it(t,["boolean","string","number","null"]))throw new gt("Expected first argument to be of type boolean, string, number or null, but found "+et(pt(t))+" instead.");if(!it(r,["string","array"]))throw new gt("Expected second argument to be of type array or string, but found "+et(pt(r))+" instead.");if(this.fromIndex){var n=this.fromIndex.evaluate(e);return r.indexOf(t,n)}return r.indexOf(t)},Mr.prototype.eachChild=function(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)},Mr.prototype.outputDefined=function(){return!1},Mr.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var e=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),e]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Sr=function(e,t,r,n,i,a){this.inputType=e,this.type=t,this.input=r,this.cases=n,this.outputs=i,this.otherwise=a};Sr.parse=function(e,t){if(e.length<5)return t.error("Expected at least 4 arguments, but found only "+(e.length-1)+".");if(e.length%2!=1)return t.error("Expected an even number of arguments.");var r,n;t.expectedType&&"value"!==t.expectedType.kind&&(n=t.expectedType);for(var i={},a=[],o=2;oNumber.MAX_SAFE_INTEGER)return c.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof f&&Math.floor(f)!==f)return c.error("Numeric branch labels must be integer values.");if(r){if(c.checkSubtype(r,pt(f)))return null}else r=pt(f);if(typeof i[String(f)]<"u")return c.error("Branch labels must be unique.");i[String(f)]=a.length}var p=t.parse(l,o,n);if(!p)return null;n=n||p.type,a.push(p)}var d=t.parse(e[1],1,Xe);if(!d)return null;var m=t.parse(e[e.length-1],e.length-1,n);return!m||"value"!==d.type.kind&&t.concat(1).checkSubtype(r,d.type)?null:new Sr(r,n,d,i,a,m)},Sr.prototype.evaluate=function(e){var t=this.input.evaluate(e);return(pt(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)},Sr.prototype.eachChild=function(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)},Sr.prototype.outputDefined=function(){return this.outputs.every((function(e){return e.outputDefined()}))&&this.otherwise.outputDefined()},Sr.prototype.serialize=function(){for(var e=this,t=["match",this.input.serialize()],r=[],n={},i=0,a=Object.keys(this.cases).sort();i=5)return t.error("Expected 3 or 4 arguments, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1,Xe),n=t.parse(e[2],2,He);if(!r||!n)return null;if(!nt(r.type,[Qe(Xe),Ge,Xe]))return t.error("Expected first argument to be of type array or string, but found "+et(r.type)+" instead");if(4===e.length){var i=t.parse(e[3],3,He);return i?new Cr(r.type,r,n,i):null}return new Cr(r.type,r,n)},Cr.prototype.evaluate=function(e){var t=this.input.evaluate(e),r=this.beginIndex.evaluate(e);if(!it(t,["string","array"]))throw new gt("Expected first argument to be of type array or string, but found "+et(pt(t))+" instead.");if(this.endIndex){var n=this.endIndex.evaluate(e);return t.slice(r,n)}return t.slice(r)},Cr.prototype.eachChild=function(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)},Cr.prototype.outputDefined=function(){return!1},Cr.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var e=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),e]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var zr=Pr("==",(function(e,t,r){return t===r}),Lr),Dr=Pr("!=",(function(e,t,r){return t!==r}),(function(e,t,r,n){return!Lr(0,t,r,n)})),Or=Pr("<",(function(e,t,r){return t",(function(e,t,r){return t>r}),(function(e,t,r,n){return n.compare(t,r)>0})),Fr=Pr("<=",(function(e,t,r){return t<=r}),(function(e,t,r,n){return n.compare(t,r)<=0})),Br=Pr(">=",(function(e,t,r){return t>=r}),(function(e,t,r,n){return n.compare(t,r)>=0})),jr=function(e,t,r,n,i){this.type=Ge,this.number=e,this.locale=t,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=i};jr.parse=function(e,t){if(3!==e.length)return t.error("Expected two arguments.");var r=t.parse(e[1],1,He);if(!r)return null;var n=e[2];if("object"!=typeof n||Array.isArray(n))return t.error("NumberFormat options argument must be an object.");var i=null;if(n.locale&&!(i=t.parse(n.locale,1,Ge)))return null;var a=null;if(n.currency&&!(a=t.parse(n.currency,1,Ge)))return null;var o=null;if(n["min-fraction-digits"]&&!(o=t.parse(n["min-fraction-digits"],1,He)))return null;var s=null;return n["max-fraction-digits"]&&!(s=t.parse(n["max-fraction-digits"],1,He))?null:new jr(r,i,a,o,s)},jr.prototype.evaluate=function(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))},jr.prototype.eachChild=function(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)},jr.prototype.outputDefined=function(){return!1},jr.prototype.serialize=function(){var e={};return this.locale&&(e.locale=this.locale.serialize()),this.currency&&(e.currency=this.currency.serialize()),this.minFractionDigits&&(e["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(e["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),e]};var Nr=function(e){this.type=He,this.input=e};Nr.parse=function(e,t){if(2!==e.length)return t.error("Expected 1 argument, but found "+(e.length-1)+" instead.");var r=t.parse(e[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?t.error("Expected argument of type string or array, but found "+et(r.type)+" instead."):new Nr(r):null},Nr.prototype.evaluate=function(e){var t=this.input.evaluate(e);if("string"==typeof t)return t.length;if(Array.isArray(t))return t.length;throw new gt("Expected value to be of type string or array, but found "+et(pt(t))+" instead.")},Nr.prototype.eachChild=function(e){e(this.input)},Nr.prototype.outputDefined=function(){return!1},Nr.prototype.serialize=function(){var e=["length"];return this.eachChild((function(t){e.push(t.serialize())})),e};var Ur={"==":zr,"!=":Dr,">":Rr,"<":Or,">=":Br,"<=":Fr,array:vt,at:kr,boolean:vt,case:Er,coalesce:wr,collator:Mt,format:xt,image:_t,in:Ar,"index-of":Mr,interpolate:_r,"interpolate-hcl":_r,"interpolate-lab":_r,length:Nr,let:Tr,literal:mt,match:Sr,number:vt,"number-format":jr,object:vt,slice:Cr,step:Qt,string:vt,"to-boolean":wt,"to-color":wt,"to-number":wt,"to-string":wt,var:Xt,within:Gt};function Vr(e,t){var r=t[0],n=t[1],i=t[2],a=t[3];r=r.evaluate(e),n=n.evaluate(e),i=i.evaluate(e);var o=a?a.evaluate(e):1,s=ht(r,n,i,o);if(s)throw new gt(s);return new ot(r/255*o,n/255*o,i/255*o,o)}function qr(e,t){return e in t}function Hr(e,t){var r=t[e];return typeof r>"u"?null:r}function Gr(e){return{type:e}}function Wr(e){return{result:"success",value:e}}function Zr(e){return{result:"error",value:e}}function Yr(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function Xr(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function $r(e){return!!e.expression&&e.expression.interpolated}function Kr(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}function Jr(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function Qr(e){return e}function en(e,t){var r,n,i,a="color"===t.type,o=e.stops&&"object"==typeof e.stops[0][0],s=o||void 0!==e.property,l=o||!s,c=e.type||($r(t)?"exponential":"interval");if(a&&((e=Be({},e)).stops&&(e.stops=e.stops.map((function(e){return[e[0],ot.parse(e[1])]}))),e.default?e.default=ot.parse(e.default):e.default=ot.parse(t.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!xr[e.colorSpace])throw new Error("Unknown color space: "+e.colorSpace);if("exponential"===c)r=an;else if("interval"===c)r=nn;else if("categorical"===c){r=rn,n=Object.create(null);for(var u=0,h=e.stops;u=e.stops[n-1][0])return e.stops[n-1][1];var i=Jt(e.stops.map((function(e){return e[0]})),r);return e.stops[i][1]}function an(e,t,r){var n=void 0!==e.base?e.base:1;if("number"!==Kr(r))return tn(e.default,t.default);var i=e.stops.length;if(1===i||r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[i-1][0])return e.stops[i-1][1];var a=Jt(e.stops.map((function(e){return e[0]})),r),o=function(e,t,r,n){var i=n-r,a=e-r;return 0===i?0:1===t?a/i:(Math.pow(t,a)-1)/(Math.pow(t,i)-1)}(r,n,e.stops[a][0],e.stops[a+1][0]),s=e.stops[a][1],l=e.stops[a+1][1],c=tr[t.type]||Qr;if(e.colorSpace&&"rgb"!==e.colorSpace){var u=xr[e.colorSpace];c=function(e,t){return u.reverse(u.interpolate(u.forward(e),u.forward(t),o))}}return"function"==typeof s.evaluate?{evaluate:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=s.evaluate.apply(void 0,e),n=l.evaluate.apply(void 0,e);if(void 0!==r&&void 0!==n)return c(r,n,o)}}:c(s,l,o)}function on(e,t,r){return"color"===t.type?r=ot.parse(r):"formatted"===t.type?r=ct.fromString(r.toString()):"resolvedImage"===t.type?r=ut.fromString(r.toString()):Kr(r)!==t.type&&("enum"!==t.type||!t.values[r])&&(r=void 0),tn(r,e.default,t.default)}At.register(Ur,{error:[{kind:"error"},[Ge],function(e,t){var r=t[0];throw new gt(r.evaluate(e))}],typeof:[Ge,[Xe],function(e,t){return et(pt(t[0].evaluate(e)))}],"to-rgba":[Qe(He,4),[Ze],function(e,t){return t[0].evaluate(e).toArray()}],rgb:[Ze,[He,He,He],Vr],rgba:[Ze,[He,He,He,He],Vr],has:{type:We,overloads:[[[Ge],function(e,t){return qr(t[0].evaluate(e),e.properties())}],[[Ge,Ye],function(e,t){var r=t[0],n=t[1];return qr(r.evaluate(e),n.evaluate(e))}]]},get:{type:Xe,overloads:[[[Ge],function(e,t){return Hr(t[0].evaluate(e),e.properties())}],[[Ge,Ye],function(e,t){var r=t[0],n=t[1];return Hr(r.evaluate(e),n.evaluate(e))}]]},"feature-state":[Xe,[Ge],function(e,t){return Hr(t[0].evaluate(e),e.featureState||{})}],properties:[Ye,[],function(e){return e.properties()}],"geometry-type":[Ge,[],function(e){return e.geometryType()}],id:[Xe,[],function(e){return e.id()}],zoom:[He,[],function(e){return e.globals.zoom}],"heatmap-density":[He,[],function(e){return e.globals.heatmapDensity||0}],"line-progress":[He,[],function(e){return e.globals.lineProgress||0}],accumulated:[Xe,[],function(e){return void 0===e.globals.accumulated?null:e.globals.accumulated}],"+":[He,Gr(He),function(e,t){for(var r=0,n=0,i=t;n":[We,[Ge,Xe],function(e,t){var r=t[0],n=t[1],i=e.properties()[r.value],a=n.value;return typeof i==typeof a&&i>a}],"filter-id->":[We,[Xe],function(e,t){var r=t[0],n=e.id(),i=r.value;return typeof n==typeof i&&n>i}],"filter-<=":[We,[Ge,Xe],function(e,t){var r=t[0],n=t[1],i=e.properties()[r.value],a=n.value;return typeof i==typeof a&&i<=a}],"filter-id-<=":[We,[Xe],function(e,t){var r=t[0],n=e.id(),i=r.value;return typeof n==typeof i&&n<=i}],"filter->=":[We,[Ge,Xe],function(e,t){var r=t[0],n=t[1],i=e.properties()[r.value],a=n.value;return typeof i==typeof a&&i>=a}],"filter-id->=":[We,[Xe],function(e,t){var r=t[0],n=e.id(),i=r.value;return typeof n==typeof i&&n>=i}],"filter-has":[We,[Xe],function(e,t){return t[0].value in e.properties()}],"filter-has-id":[We,[],function(e){return null!==e.id()&&void 0!==e.id()}],"filter-type-in":[We,[Qe(Ge)],function(e,t){return t[0].value.indexOf(e.geometryType())>=0}],"filter-id-in":[We,[Qe(Xe)],function(e,t){return t[0].value.indexOf(e.id())>=0}],"filter-in-small":[We,[Ge,Qe(Xe)],function(e,t){var r=t[0];return t[1].value.indexOf(e.properties()[r.value])>=0}],"filter-in-large":[We,[Ge,Qe(Xe)],function(e,t){var r=t[0],n=t[1];return function(e,t,r,n){for(;r<=n;){var i=r+n>>1;if(t[i]===e)return!0;t[i]>e?n=i-1:r=i+1}return!1}(e.properties()[r.value],n.value,0,n.value.length-1)}],all:{type:We,overloads:[[[We,We],function(e,t){var r=t[0],n=t[1];return r.evaluate(e)&&n.evaluate(e)}],[Gr(We),function(e,t){for(var r=0,n=t;r0&&"string"==typeof e[0]&&e[0]in Ur}function cn(e,t){var r=new $t(Ur,[],t?function(e){var t={color:Ze,string:Ge,number:He,enum:Ge,boolean:We,formatted:Ke,resolvedImage:Je};return"array"===e.type?Qe(t[e.value]||Xe,e.length):t[e.type]}(t):void 0),n=r.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return n?Wr(new sn(n,t)):Zr(r.errors)}sn.prototype.evaluateWithoutErrorHandling=function(e,t,r,n,i,a){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=r,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)},sn.prototype.evaluate=function(e,t,r,n,i,a){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=r||null,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a||null;try{var o=this.expression.evaluate(this._evaluator);if(null==o||"number"==typeof o&&o!=o)return this._defaultValue;if(this._enumValues&&!(o in this._enumValues))throw new gt("Expected value to be one of "+Object.keys(this._enumValues).map((function(e){return JSON.stringify(e)})).join(", ")+", but found "+JSON.stringify(o)+" instead.");return o}catch(e){return this._warningHistory[e.message]||(this._warningHistory[e.message]=!0,typeof console<"u"&&console.warn(e.message)),this._defaultValue}};var un=function(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!Zt(t.expression)};un.prototype.evaluateWithoutErrorHandling=function(e,t,r,n,i,a){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,n,i,a)},un.prototype.evaluate=function(e,t,r,n,i,a){return this._styleExpression.evaluate(e,t,r,n,i,a)};var hn=function(e,t,r,n){this.kind=e,this.zoomStops=r,this._styleExpression=t,this.isStateDependent="camera"!==e&&!Zt(t.expression),this.interpolationType=n};function fn(e,t){if("error"===(e=cn(e,t)).result)return e;var r=e.value.expression,n=Wt(r);if(!n&&!Yr(t))return Zr([new Ue("","data expressions not supported")]);var i=Yt(r,["zoom"]);if(!i&&!Xr(t))return Zr([new Ue("","zoom expressions not supported")]);var a=dn(r);if(!a&&!i)return Zr([new Ue("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(a instanceof Ue)return Zr([a]);if(a instanceof _r&&!$r(t))return Zr([new Ue("",'"interpolate" expressions cannot be used with this property')]);if(!a)return Wr(new un(n?"constant":"source",e.value));var o=a instanceof _r?a.interpolation:void 0;return Wr(new hn(n?"camera":"composite",e.value,a.labels,o))}hn.prototype.evaluateWithoutErrorHandling=function(e,t,r,n,i,a){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,n,i,a)},hn.prototype.evaluate=function(e,t,r,n,i,a){return this._styleExpression.evaluate(e,t,r,n,i,a)},hn.prototype.interpolationFactor=function(e,t,r){return this.interpolationType?_r.interpolationFactor(this.interpolationType,e,t,r):0};var pn=function(e,t){this._parameters=e,this._specification=t,Be(this,en(this._parameters,this._specification))};function dn(e){var t=null;if(e instanceof Tr)t=dn(e.result);else if(e instanceof wr)for(var r=0,n=e.args;rn.maximum?[new Re(t,r,r+" is greater than the maximum value "+n.maximum)]:[]}function vn(e){var t,r,n,i=e.valueSpec,a=je(e.value.type),o={},s="categorical"!==a&&void 0===e.value.property,l=!s,c="array"===Kr(e.value.stops)&&"array"===Kr(e.value.stops[0])&&"object"===Kr(e.value.stops[0][0]),u=mn({key:e.key,value:e.value,valueSpec:e.styleSpec.function,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:function(e){if("identity"===a)return[new Re(e.key,e.value,'identity function may not have a "stops" property')];var t=[],r=e.value;return t=t.concat(gn({key:e.key,value:r,valueSpec:e.valueSpec,style:e.style,styleSpec:e.styleSpec,arrayElementValidator:h})),"array"===Kr(r)&&0===r.length&&t.push(new Re(e.key,r,"array must have at least one stop")),t},default:function(e){return Vn({key:e.key,value:e.value,valueSpec:i,style:e.style,styleSpec:e.styleSpec})}}});return"identity"===a&&s&&u.push(new Re(e.key,e.value,'missing required property "property"')),"identity"!==a&&!e.value.stops&&u.push(new Re(e.key,e.value,'missing required property "stops"')),"exponential"===a&&e.valueSpec.expression&&!$r(e.valueSpec)&&u.push(new Re(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(l&&!Yr(e.valueSpec)?u.push(new Re(e.key,e.value,"property functions not supported")):s&&!Xr(e.valueSpec)&&u.push(new Re(e.key,e.value,"zoom functions not supported"))),("categorical"===a||c)&&void 0===e.value.property&&u.push(new Re(e.key,e.value,'"property" property is required')),u;function h(e){var t=[],a=e.value,s=e.key;if("array"!==Kr(a))return[new Re(s,a,"array expected, "+Kr(a)+" found")];if(2!==a.length)return[new Re(s,a,"array length 2 expected, length "+a.length+" found")];if(c){if("object"!==Kr(a[0]))return[new Re(s,a,"object expected, "+Kr(a[0])+" found")];if(void 0===a[0].zoom)return[new Re(s,a,"object stop key must have zoom")];if(void 0===a[0].value)return[new Re(s,a,"object stop key must have value")];if(n&&n>je(a[0].zoom))return[new Re(s,a[0].zoom,"stop zoom values must appear in ascending order")];je(a[0].zoom)!==n&&(n=je(a[0].zoom),r=void 0,o={}),t=t.concat(mn({key:s+"[0]",value:a[0],valueSpec:{zoom:{}},style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:yn,value:f}}))}else t=t.concat(f({key:s+"[0]",value:a[0],valueSpec:{},style:e.style,styleSpec:e.styleSpec},a));return ln(Ne(a[1]))?t.concat([new Re(s+"[1]",a[1],"expressions are not allowed in function stops.")]):t.concat(Vn({key:s+"[1]",value:a[1],valueSpec:i,style:e.style,styleSpec:e.styleSpec}))}function f(e,n){var s=Kr(e.value),l=je(e.value),c=null!==e.value?e.value:n;if(t){if(s!==t)return[new Re(e.key,c,s+" stop domain type must match previous stop domain type "+t)]}else t=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new Re(e.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==a){var u="number expected, "+s+" found";return Yr(i)&&void 0===a&&(u+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Re(e.key,c,u)]}return"categorical"!==a||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==a&&"number"===s&&void 0!==r&&l=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&("string"!=typeof e[1]||Array.isArray(e[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(var t=0,r=e.slice(1);tt?1:0}function An(e){if(!Array.isArray(e))return!1;if("within"===e[0])return!0;for(var t=1;t"===t||"<="===t||">="===t?Sn(e[1],e[2],t):"any"===t?function(e){return["any"].concat(e.map(Mn))}(e.slice(1)):"all"===t?["all"].concat(e.slice(1).map(Mn)):"none"===t?["all"].concat(e.slice(1).map(Mn).map(In)):"in"===t?En(e[1],e.slice(2)):"!in"===t?In(En(e[1],e.slice(2))):"has"===t?Cn(e[1]):"!has"===t?In(Cn(e[1])):"within"!==t||e}function Sn(e,t,r){switch(e){case"$type":return["filter-type-"+r,t];case"$id":return["filter-id-"+r,t];default:return["filter-"+r,e,t]}}function En(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((function(e){return typeof e!=typeof t[0]}))?["filter-in-large",e,["literal",t.sort(kn)]]:["filter-in-small",e,["literal",t]]}}function Cn(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function In(e){return["!",e]}function Ln(e){return bn(Ne(e.value))?xn(Be({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Pn(e)}function Pn(e){var t=e.value,r=e.key;if("array"!==Kr(t))return[new Re(r,t,"array expected, "+Kr(t)+" found")];var n,i=e.styleSpec,a=[];if(t.length<1)return[new Re(r,t,"filter array must have at least 1 element")];switch(a=a.concat(_n({key:r+"[0]",value:t[0],valueSpec:i.filter_operator,style:e.style,styleSpec:e.styleSpec})),je(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&"$type"===je(t[1])&&a.push(new Re(r,t,'"$type" cannot be use with operator "'+t[0]+'"'));case"==":case"!=":3!==t.length&&a.push(new Re(r,t,'filter array for operator "'+t[0]+'" must have 3 elements'));case"in":case"!in":t.length>=2&&"string"!==(n=Kr(t[1]))&&a.push(new Re(r+"[1]",t[1],"string expected, "+n+" found"));for(var o=2;o=u[p+0]&&n>=u[p+1])?(o[f]=!0,a.push(c[f])):o[f]=!1}}},ei.prototype._forEachCell=function(e,t,r,n,i,a,o,s){for(var l=this._convertToCellCoord(e),c=this._convertToCellCoord(t),u=this._convertToCellCoord(r),h=this._convertToCellCoord(n),f=l;f<=u;f++)for(var p=c;p<=h;p++){var d=this.d*p+f;if((!s||s(this._convertFromCellCoord(f),this._convertFromCellCoord(p),this._convertFromCellCoord(f+1),this._convertFromCellCoord(p+1)))&&i.call(this,e,t,r,n,d,a,o,s))return}},ei.prototype._convertFromCellCoord=function(e){return(e-this.padding)/this.scale},ei.prototype._convertToCellCoord=function(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))},ei.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var e=this.cells,t=Qn+this.cells.length+1+1,r=0,n=0;n=0)){var h=e[u];c[u]=ni[l].shallow.indexOf(u)>=0?h:li(h,t)}e instanceof Error&&(c.message=e.message)}if(c.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==l&&(c.$name=l),c}throw new Error("can't serialize object of type "+typeof e)}function ci(e){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||oi(e)||si(e)||ArrayBuffer.isView(e)||e instanceof ti)return e;if(Array.isArray(e))return e.map(ci);if("object"==typeof e){var t=e.$name||"Object",r=ni[t].klass;if(!r)throw new Error("can't deserialize unregistered class "+t);if(r.deserialize)return r.deserialize(e);for(var n=Object.create(r.prototype),i=0,a=Object.keys(e);i=0?s:ci(s)}}return n}throw new Error("can't deserialize object of type "+typeof e)}var ui=function(){this.first=!0};ui.prototype.update=function(e,t){var r=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=t):this.lastFloorZoom=128&&e<=255},Arabic:function(e){return e>=1536&&e<=1791},"Arabic Supplement":function(e){return e>=1872&&e<=1919},"Arabic Extended-A":function(e){return e>=2208&&e<=2303},"Hangul Jamo":function(e){return e>=4352&&e<=4607},"Unified Canadian Aboriginal Syllabics":function(e){return e>=5120&&e<=5759},Khmer:function(e){return e>=6016&&e<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(e){return e>=6320&&e<=6399},"General Punctuation":function(e){return e>=8192&&e<=8303},"Letterlike Symbols":function(e){return e>=8448&&e<=8527},"Number Forms":function(e){return e>=8528&&e<=8591},"Miscellaneous Technical":function(e){return e>=8960&&e<=9215},"Control Pictures":function(e){return e>=9216&&e<=9279},"Optical Character Recognition":function(e){return e>=9280&&e<=9311},"Enclosed Alphanumerics":function(e){return e>=9312&&e<=9471},"Geometric Shapes":function(e){return e>=9632&&e<=9727},"Miscellaneous Symbols":function(e){return e>=9728&&e<=9983},"Miscellaneous Symbols and Arrows":function(e){return e>=11008&&e<=11263},"CJK Radicals Supplement":function(e){return e>=11904&&e<=12031},"Kangxi Radicals":function(e){return e>=12032&&e<=12255},"Ideographic Description Characters":function(e){return e>=12272&&e<=12287},"CJK Symbols and Punctuation":function(e){return e>=12288&&e<=12351},Hiragana:function(e){return e>=12352&&e<=12447},Katakana:function(e){return e>=12448&&e<=12543},Bopomofo:function(e){return e>=12544&&e<=12591},"Hangul Compatibility Jamo":function(e){return e>=12592&&e<=12687},Kanbun:function(e){return e>=12688&&e<=12703},"Bopomofo Extended":function(e){return e>=12704&&e<=12735},"CJK Strokes":function(e){return e>=12736&&e<=12783},"Katakana Phonetic Extensions":function(e){return e>=12784&&e<=12799},"Enclosed CJK Letters and Months":function(e){return e>=12800&&e<=13055},"CJK Compatibility":function(e){return e>=13056&&e<=13311},"CJK Unified Ideographs Extension A":function(e){return e>=13312&&e<=19903},"Yijing Hexagram Symbols":function(e){return e>=19904&&e<=19967},"CJK Unified Ideographs":function(e){return e>=19968&&e<=40959},"Yi Syllables":function(e){return e>=40960&&e<=42127},"Yi Radicals":function(e){return e>=42128&&e<=42191},"Hangul Jamo Extended-A":function(e){return e>=43360&&e<=43391},"Hangul Syllables":function(e){return e>=44032&&e<=55215},"Hangul Jamo Extended-B":function(e){return e>=55216&&e<=55295},"Private Use Area":function(e){return e>=57344&&e<=63743},"CJK Compatibility Ideographs":function(e){return e>=63744&&e<=64255},"Arabic Presentation Forms-A":function(e){return e>=64336&&e<=65023},"Vertical Forms":function(e){return e>=65040&&e<=65055},"CJK Compatibility Forms":function(e){return e>=65072&&e<=65103},"Small Form Variants":function(e){return e>=65104&&e<=65135},"Arabic Presentation Forms-B":function(e){return e>=65136&&e<=65279},"Halfwidth and Fullwidth Forms":function(e){return e>=65280&&e<=65519}};function fi(e){for(var t=0,r=e;t=65097&&e<=65103)||hi["CJK Compatibility Ideographs"](e)||hi["CJK Compatibility"](e)||hi["CJK Radicals Supplement"](e)||hi["CJK Strokes"](e)||hi["CJK Symbols and Punctuation"](e)&&!(e>=12296&&e<=12305)&&!(e>=12308&&e<=12319)&&12336!==e||hi["CJK Unified Ideographs Extension A"](e)||hi["CJK Unified Ideographs"](e)||hi["Enclosed CJK Letters and Months"](e)||hi["Hangul Compatibility Jamo"](e)||hi["Hangul Jamo Extended-A"](e)||hi["Hangul Jamo Extended-B"](e)||hi["Hangul Jamo"](e)||hi["Hangul Syllables"](e)||hi.Hiragana(e)||hi["Ideographic Description Characters"](e)||hi.Kanbun(e)||hi["Kangxi Radicals"](e)||hi["Katakana Phonetic Extensions"](e)||hi.Katakana(e)&&12540!==e||!(!hi["Halfwidth and Fullwidth Forms"](e)||65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||!(!hi["Small Form Variants"](e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||hi["Unified Canadian Aboriginal Syllabics"](e)||hi["Unified Canadian Aboriginal Syllabics Extended"](e)||hi["Vertical Forms"](e)||hi["Yijing Hexagram Symbols"](e)||hi["Yi Syllables"](e)||hi["Yi Radicals"](e))}function gi(e){return!(mi(e)||function(e){return!!(hi["Latin-1 Supplement"](e)&&(167===e||169===e||174===e||177===e||188===e||189===e||190===e||215===e||247===e)||hi["General Punctuation"](e)&&(8214===e||8224===e||8225===e||8240===e||8241===e||8251===e||8252===e||8258===e||8263===e||8264===e||8265===e||8273===e)||hi["Letterlike Symbols"](e)||hi["Number Forms"](e)||hi["Miscellaneous Technical"](e)&&(e>=8960&&e<=8967||e>=8972&&e<=8991||e>=8996&&e<=9e3||9003===e||e>=9085&&e<=9114||e>=9150&&e<=9165||9167===e||e>=9169&&e<=9179||e>=9186&&e<=9215)||hi["Control Pictures"](e)&&9251!==e||hi["Optical Character Recognition"](e)||hi["Enclosed Alphanumerics"](e)||hi["Geometric Shapes"](e)||hi["Miscellaneous Symbols"](e)&&!(e>=9754&&e<=9759)||hi["Miscellaneous Symbols and Arrows"](e)&&(e>=11026&&e<=11055||e>=11088&&e<=11097||e>=11192&&e<=11243)||hi["CJK Symbols and Punctuation"](e)||hi.Katakana(e)||hi["Private Use Area"](e)||hi["CJK Compatibility Forms"](e)||hi["Small Form Variants"](e)||hi["Halfwidth and Fullwidth Forms"](e)||8734===e||8756===e||8757===e||e>=9984&&e<=10087||e>=10102&&e<=10131||65532===e||65533===e)}(e))}function yi(e){return hi.Arabic(e)||hi["Arabic Supplement"](e)||hi["Arabic Extended-A"](e)||hi["Arabic Presentation Forms-A"](e)||hi["Arabic Presentation Forms-B"](e)}function vi(e){return e>=1424&&e<=2303||hi["Arabic Presentation Forms-A"](e)||hi["Arabic Presentation Forms-B"](e)}function xi(e,t){return!(!t&&vi(e)||e>=2304&&e<=3583||e>=3840&&e<=4255||hi.Khmer(e))}function _i(e){for(var t=0,r=e;t-1&&(Ai="error"),ki&&ki(e)};function Ei(){Ci.fire(new Pe("pluginStateChange",{pluginStatus:Ai,pluginURL:Mi}))}var Ci=new De,Ii=function(){return Ai},Li=function(){if(Ai!==bi||!Mi)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Ai=wi,Ei(),Mi&&Te({url:Mi},(function(e){e?Si(e):(Ai=Ti,Ei())}))},Pi={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Ai===Ti||null!=Pi.applyArabicShaping},isLoading:function(){return Ai===wi},setState:function(e){Ai=e.pluginStatus,Mi=e.pluginURL},isParsed:function(){return null!=Pi.applyArabicShaping&&null!=Pi.processBidirectionalText&&null!=Pi.processStyledBidirectionalText},getPluginURL:function(){return Mi}},zi=function(e,t){this.zoom=e,t?(this.now=t.now,this.fadeDuration=t.fadeDuration,this.zoomHistory=t.zoomHistory,this.transition=t.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new ui,this.transition={})};zi.prototype.isSupportedScript=function(e){return function(e,t){for(var r=0,n=e;rthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*t}};var Di=function(e,t){this.property=e,this.value=t,this.expression=function(e,t){if(Jr(e))return new pn(e,t);if(ln(e)){var r=fn(e,t);if("error"===r.result)throw new Error(r.value.map((function(e){return e.key+": "+e.message})).join(", "));return r.value}var n=e;return"string"==typeof e&&"color"===t.type&&(n=ot.parse(e)),{kind:"constant",evaluate:function(){return n}}}(void 0===t?e.specification.default:t,e.specification)};Di.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},Di.prototype.possiblyEvaluate=function(e,t,r){return this.property.possiblyEvaluate(this,e,t,r)};var Oi=function(e){this.property=e,this.value=new Di(e,void 0)};Oi.prototype.transitioned=function(e,t){return new Fi(this.property,this.value,t,p({},e.transition,this.transition),e.now)},Oi.prototype.untransitioned=function(){return new Fi(this.property,this.value,null,{},0)};var Ri=function(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)};Ri.prototype.getValue=function(e){return w(this._values[e].value.value)},Ri.prototype.setValue=function(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new Oi(this._values[e].property)),this._values[e].value=new Di(this._values[e].property,null===t?void 0:w(t))},Ri.prototype.getTransition=function(e){return w(this._values[e].transition)},Ri.prototype.setTransition=function(e,t){this._values.hasOwnProperty(e)||(this._values[e]=new Oi(this._values[e].property)),this._values[e].transition=w(t)||void 0},Ri.prototype.serialize=function(){for(var e={},t=0,r=Object.keys(this._values);tthis.end)return this.prior=null,i;if(this.value.isDataDriven())return this.prior=null,i;if(n=1)return 1;var t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}(o))}return i};var Bi=function(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)};Bi.prototype.possiblyEvaluate=function(e,t,r){for(var n=new Ui(this._properties),i=0,a=Object.keys(this._values);in.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}},t.prototype.interpolate=function(e){return e},t}(qi),Gi=function(e){this.specification=e};Gi.prototype.possiblyEvaluate=function(e,t,r,n){if(void 0!==e.value){if("constant"===e.expression.kind){var i=e.expression.evaluate(t,null,{},r,n);return this._calculate(i,i,i,t)}return this._calculate(e.expression.evaluate(new zi(Math.floor(t.zoom-1),t)),e.expression.evaluate(new zi(Math.floor(t.zoom),t)),e.expression.evaluate(new zi(Math.floor(t.zoom+1),t)),t)}},Gi.prototype._calculate=function(e,t,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}},Gi.prototype.interpolate=function(e){return e};var Wi=function(e){this.specification=e};Wi.prototype.possiblyEvaluate=function(e,t,r,n){return!!e.expression.evaluate(t,null,{},r,n)},Wi.prototype.interpolate=function(){return!1};var Zi=function(e){for(var t in this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],e){var r=e[t];r.specification.overridable&&this.overridableProperties.push(t);var n=this.defaultPropertyValues[t]=new Di(r,void 0),i=this.defaultTransitionablePropertyValues[t]=new Oi(r);this.defaultTransitioningPropertyValues[t]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=n.possiblyEvaluate({})}};ii("DataDrivenProperty",qi),ii("DataConstantProperty",Vi),ii("CrossFadedDataDrivenProperty",Hi),ii("CrossFadedProperty",Gi),ii("ColorRampProperty",Wi);var Yi="-transition",Xi=function(e){function t(t,r){if(e.call(this),this.id=t.id,this.type=t.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},"custom"!==t.type&&(this.metadata=t.metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,"background"!==t.type&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter),r.layout&&(this._unevaluatedLayout=new ji(r.layout)),r.paint)){for(var n in this._transitionablePaint=new Ri(r.paint),t.paint)this.setPaintProperty(n,t.paint[n],{validate:!1});for(var i in t.layout)this.setLayoutProperty(i,t.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Ui(r.paint)}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},t.prototype.getLayoutProperty=function(e){return"visibility"===e?this.visibility:this._unevaluatedLayout.getValue(e)},t.prototype.setLayoutProperty=function(e,t,r){if(void 0===r&&(r={}),null!=t){var n="layers."+this.id+".layout."+e;if(this._validate($n,n,e,t,r))return}"visibility"!==e?this._unevaluatedLayout.setValue(e,t):this.visibility=t},t.prototype.getPaintProperty=function(e){return x(e,Yi)?this._transitionablePaint.getTransition(e.slice(0,-11)):this._transitionablePaint.getValue(e)},t.prototype.setPaintProperty=function(e,t,r){if(void 0===r&&(r={}),null!=t){var n="layers."+this.id+".paint."+e;if(this._validate(Xn,n,e,t,r))return!1}if(x(e,Yi))return this._transitionablePaint.setTransition(e.slice(0,-11),t||void 0),!1;var i=this._transitionablePaint._values[e],a="cross-faded-data-driven"===i.property.specification["property-type"],o=i.value.isDataDriven(),s=i.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);var l=this._transitionablePaint._values[e].value;return l.isDataDriven()||o||a||this._handleOverridablePaintPropertyUpdate(e,s,l)},t.prototype._handleSpecialPaintPropertyUpdate=function(e){},t.prototype._handleOverridablePaintPropertyUpdate=function(e,t,r){return!1},t.prototype.isHidden=function(e){return!!(this.minzoom&&e=this.maxzoom)||"none"===this.visibility},t.prototype.updateTransitions=function(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)},t.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},t.prototype.recalculate=function(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,void 0,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,void 0,t)},t.prototype.serialize=function(){var e={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),b(e,(function(e,t){return!(void 0===e||"layout"===t&&!Object.keys(e).length||"paint"===t&&!Object.keys(e).length)}))},t.prototype._validate=function(e,t,r,n,i){return void 0===i&&(i={}),(!i||!1!==i.validate)&&Kn(this,e.call(Zn,{key:t,layerType:this.type,objectKey:r,value:n,styleSpec:Oe,style:{glyphs:!0,sprite:!0}}))},t.prototype.is3D=function(){return!1},t.prototype.isTileClipped=function(){return!1},t.prototype.hasOffscreenPass=function(){return!1},t.prototype.resize=function(){},t.prototype.isStateDependent=function(){for(var e in this.paint._values){var t=this.paint.get(e);if(t instanceof Ni&&Yr(t.property.specification)&&("source"===t.value.kind||"composite"===t.value.kind)&&t.value.isStateDependent)return!0}return!1},t}(De),$i={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Ki=function(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Ji=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Qi(e,t){void 0===t&&(t=1);var r=0,n=0;return{members:e.map((function(e){var i=function(e){return $i[e].BYTES_PER_ELEMENT}(e.type),a=r=ea(r,Math.max(t,i)),o=e.components||1;return n=Math.max(n,i),r+=i*o,{name:e.name,type:e.type,components:o,offset:a}})),size:ea(r,Math.max(n,t)),alignment:t}}function ea(e,t){return Math.ceil(e/t)*t}Ji.serialize=function(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}},Ji.deserialize=function(e){var t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t},Ji.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Ji.prototype.clear=function(){this.length=0},Ji.prototype.resize=function(e){this.reserve(e),this.length=e},Ji.prototype.reserve=function(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var t=this.uint8;this._refreshViews(),t&&this.uint8.set(t)}},Ji.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var ta=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var r=this.length;return this.resize(r+1),this.emplace(r,e,t)},t.prototype.emplace=function(e,t,r){var n=2*e;return this.int16[n+0]=t,this.int16[n+1]=r,e},t}(Ji);ta.prototype.bytesPerElement=4,ii("StructArrayLayout2i4",ta);var ra=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,e,t,r,n)},t.prototype.emplace=function(e,t,r,n,i){var a=4*e;return this.int16[a+0]=t,this.int16[a+1]=r,this.int16[a+2]=n,this.int16[a+3]=i,e},t}(Ji);ra.prototype.bytesPerElement=8,ii("StructArrayLayout4i8",ra);var na=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,a){var o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n,i,a)},t.prototype.emplace=function(e,t,r,n,i,a,o){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,e},t}(Ji);na.prototype.bytesPerElement=12,ii("StructArrayLayout2i4i12",na);var ia=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,a){var o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n,i,a)},t.prototype.emplace=function(e,t,r,n,i,a,o){var s=4*e,l=8*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.uint8[l+4]=n,this.uint8[l+5]=i,this.uint8[l+6]=a,this.uint8[l+7]=o,e},t}(Ji);ia.prototype.bytesPerElement=8,ii("StructArrayLayout2i4ub8",ia);var aa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var r=this.length;return this.resize(r+1),this.emplace(r,e,t)},t.prototype.emplace=function(e,t,r){var n=2*e;return this.float32[n+0]=t,this.float32[n+1]=r,e},t}(Ji);aa.prototype.bytesPerElement=8,ii("StructArrayLayout2f8",aa);var oa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,a,o,s,l,c){var u=this.length;return this.resize(u+1),this.emplace(u,e,t,r,n,i,a,o,s,l,c)},t.prototype.emplace=function(e,t,r,n,i,a,o,s,l,c,u){var h=10*e;return this.uint16[h+0]=t,this.uint16[h+1]=r,this.uint16[h+2]=n,this.uint16[h+3]=i,this.uint16[h+4]=a,this.uint16[h+5]=o,this.uint16[h+6]=s,this.uint16[h+7]=l,this.uint16[h+8]=c,this.uint16[h+9]=u,e},t}(Ji);oa.prototype.bytesPerElement=20,ii("StructArrayLayout10ui20",oa);var sa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,a,o,s,l,c,u,h){var f=this.length;return this.resize(f+1),this.emplace(f,e,t,r,n,i,a,o,s,l,c,u,h)},t.prototype.emplace=function(e,t,r,n,i,a,o,s,l,c,u,h,f){var p=12*e;return this.int16[p+0]=t,this.int16[p+1]=r,this.int16[p+2]=n,this.int16[p+3]=i,this.uint16[p+4]=a,this.uint16[p+5]=o,this.uint16[p+6]=s,this.uint16[p+7]=l,this.int16[p+8]=c,this.int16[p+9]=u,this.int16[p+10]=h,this.int16[p+11]=f,e},t}(Ji);sa.prototype.bytesPerElement=24,ii("StructArrayLayout4i4ui4i24",sa);var la=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)},t.prototype.emplace=function(e,t,r,n){var i=3*e;return this.float32[i+0]=t,this.float32[i+1]=r,this.float32[i+2]=n,e},t}(Ji);la.prototype.bytesPerElement=12,ii("StructArrayLayout3f12",la);var ca=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var r=1*e;return this.uint32[r+0]=t,e},t}(Ji);ca.prototype.bytesPerElement=4,ii("StructArrayLayout1ul4",ca);var ua=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,a,o,s,l){var c=this.length;return this.resize(c+1),this.emplace(c,e,t,r,n,i,a,o,s,l)},t.prototype.emplace=function(e,t,r,n,i,a,o,s,l,c){var u=10*e,h=5*e;return this.int16[u+0]=t,this.int16[u+1]=r,this.int16[u+2]=n,this.int16[u+3]=i,this.int16[u+4]=a,this.int16[u+5]=o,this.uint32[h+3]=s,this.uint16[u+8]=l,this.uint16[u+9]=c,e},t}(Ji);ua.prototype.bytesPerElement=20,ii("StructArrayLayout6i1ul2ui20",ua);var ha=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,a){var o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n,i,a)},t.prototype.emplace=function(e,t,r,n,i,a,o){var s=6*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,e},t}(Ji);ha.prototype.bytesPerElement=12,ii("StructArrayLayout2i2i2i12",ha);var fa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i){var a=this.length;return this.resize(a+1),this.emplace(a,e,t,r,n,i)},t.prototype.emplace=function(e,t,r,n,i,a){var o=4*e,s=8*e;return this.float32[o+0]=t,this.float32[o+1]=r,this.float32[o+2]=n,this.int16[s+6]=i,this.int16[s+7]=a,e},t}(Ji);fa.prototype.bytesPerElement=16,ii("StructArrayLayout2f1f2i16",fa);var pa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,e,t,r,n)},t.prototype.emplace=function(e,t,r,n,i){var a=12*e,o=3*e;return this.uint8[a+0]=t,this.uint8[a+1]=r,this.float32[o+1]=n,this.float32[o+2]=i,e},t}(Ji);pa.prototype.bytesPerElement=12,ii("StructArrayLayout2ub2f12",pa);var da=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)},t.prototype.emplace=function(e,t,r,n){var i=3*e;return this.uint16[i+0]=t,this.uint16[i+1]=r,this.uint16[i+2]=n,e},t}(Ji);da.prototype.bytesPerElement=6,ii("StructArrayLayout3ui6",da);var ma=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,a,o,s,l,c,u,h,f,p,d,m,g){var y=this.length;return this.resize(y+1),this.emplace(y,e,t,r,n,i,a,o,s,l,c,u,h,f,p,d,m,g)},t.prototype.emplace=function(e,t,r,n,i,a,o,s,l,c,u,h,f,p,d,m,g,y){var v=24*e,x=12*e,_=48*e;return this.int16[v+0]=t,this.int16[v+1]=r,this.uint16[v+2]=n,this.uint16[v+3]=i,this.uint32[x+2]=a,this.uint32[x+3]=o,this.uint32[x+4]=s,this.uint16[v+10]=l,this.uint16[v+11]=c,this.uint16[v+12]=u,this.float32[x+7]=h,this.float32[x+8]=f,this.uint8[_+36]=p,this.uint8[_+37]=d,this.uint8[_+38]=m,this.uint32[x+10]=g,this.int16[v+22]=y,e},t}(Ji);ma.prototype.bytesPerElement=48,ii("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",ma);var ga=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n,i,a,o,s,l,c,u,h,f,p,d,m,g,y,v,x,_,b,w,T,k,A,M,S){var E=this.length;return this.resize(E+1),this.emplace(E,e,t,r,n,i,a,o,s,l,c,u,h,f,p,d,m,g,y,v,x,_,b,w,T,k,A,M,S)},t.prototype.emplace=function(e,t,r,n,i,a,o,s,l,c,u,h,f,p,d,m,g,y,v,x,_,b,w,T,k,A,M,S,E){var C=34*e,I=17*e;return this.int16[C+0]=t,this.int16[C+1]=r,this.int16[C+2]=n,this.int16[C+3]=i,this.int16[C+4]=a,this.int16[C+5]=o,this.int16[C+6]=s,this.int16[C+7]=l,this.uint16[C+8]=c,this.uint16[C+9]=u,this.uint16[C+10]=h,this.uint16[C+11]=f,this.uint16[C+12]=p,this.uint16[C+13]=d,this.uint16[C+14]=m,this.uint16[C+15]=g,this.uint16[C+16]=y,this.uint16[C+17]=v,this.uint16[C+18]=x,this.uint16[C+19]=_,this.uint16[C+20]=b,this.uint16[C+21]=w,this.uint16[C+22]=T,this.uint32[I+12]=k,this.float32[I+13]=A,this.float32[I+14]=M,this.float32[I+15]=S,this.float32[I+16]=E,e},t}(Ji);ga.prototype.bytesPerElement=68,ii("StructArrayLayout8i15ui1ul4f68",ga);var ya=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var r=1*e;return this.float32[r+0]=t,e},t}(Ji);ya.prototype.bytesPerElement=4,ii("StructArrayLayout1f4",ya);var va=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)},t.prototype.emplace=function(e,t,r,n){var i=3*e;return this.int16[i+0]=t,this.int16[i+1]=r,this.int16[i+2]=n,e},t}(Ji);va.prototype.bytesPerElement=6,ii("StructArrayLayout3i6",va);var xa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r){var n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)},t.prototype.emplace=function(e,t,r,n){var i=2*e,a=4*e;return this.uint32[i+0]=t,this.uint16[a+2]=r,this.uint16[a+3]=n,e},t}(Ji);xa.prototype.bytesPerElement=8,ii("StructArrayLayout1ul2ui8",xa);var _a=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t){var r=this.length;return this.resize(r+1),this.emplace(r,e,t)},t.prototype.emplace=function(e,t,r){var n=2*e;return this.uint16[n+0]=t,this.uint16[n+1]=r,e},t}(Ji);_a.prototype.bytesPerElement=4,ii("StructArrayLayout2ui4",_a);var ba=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e){var t=this.length;return this.resize(t+1),this.emplace(t,e)},t.prototype.emplace=function(e,t){var r=1*e;return this.uint16[r+0]=t,e},t}(Ji);ba.prototype.bytesPerElement=2,ii("StructArrayLayout1ui2",ba);var wa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},t.prototype.emplaceBack=function(e,t,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,e,t,r,n)},t.prototype.emplace=function(e,t,r,n,i){var a=4*e;return this.float32[a+0]=t,this.float32[a+1]=r,this.float32[a+2]=n,this.float32[a+3]=i,e},t}(Ji);wa.prototype.bytesPerElement=16,ii("StructArrayLayout4f16",wa);var Ta=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.anchorPoint.get=function(){return new a(this.anchorPointX,this.anchorPointY)},Object.defineProperties(t.prototype,r),t}(Ki);Ta.prototype.size=20;var ka=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new Ta(this,e)},t}(ua);ii("CollisionBoxArray",ka);var Aa=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},r.placedOrientation.set=function(e){this._structArray.uint8[this._pos1+37]=e},r.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},r.hidden.set=function(e){this._structArray.uint8[this._pos1+38]=e},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},r.crossTileID.set=function(e){this._structArray.uint32[this._pos4+10]=e},r.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(t.prototype,r),t}(Ki);Aa.prototype.size=48;var Ma=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new Aa(this,e)},t}(ma);ii("PlacedSymbolArray",Ma);var Sa=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},r.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},r.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},r.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},r.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},r.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},r.key.get=function(){return this._structArray.uint16[this._pos2+8]},r.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},r.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},r.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},r.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},r.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},r.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},r.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},r.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},r.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},r.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},r.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},r.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},r.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},r.crossTileID.set=function(e){this._structArray.uint32[this._pos4+12]=e},r.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},r.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},r.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},r.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(t.prototype,r),t}(Ki);Sa.prototype.size=68;var Ea=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new Sa(this,e)},t}(ga);ii("SymbolInstanceArray",Ea);var Ca=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getoffsetX=function(e){return this.float32[1*e+0]},t}(ya);ii("GlyphOffsetArray",Ca);var Ia=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getx=function(e){return this.int16[3*e+0]},t.prototype.gety=function(e){return this.int16[3*e+1]},t.prototype.gettileUnitDistanceFromAnchor=function(e){return this.int16[3*e+2]},t}(va);ii("SymbolLineVertexArray",Ia);var La=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var r={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(t.prototype,r),t}(Ki);La.prototype.size=8;var Pa=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return new La(this,e)},t}(xa);ii("FeatureIndexArray",Pa);var za=Qi([{name:"a_pos",components:2,type:"Int16"}],4).members,Da=function(e){void 0===e&&(e=[]),this.segments=e};function Oa(e,t){return 256*(e=h(Math.floor(e),0,255))+h(Math.floor(t),0,255)}Da.prototype.prepareSegment=function(e,t,r,n){var i=this.segments[this.segments.length-1];return e>Da.MAX_VERTEX_ARRAY_LENGTH&&k("Max vertices per segment is "+Da.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+e),(!i||i.vertexLength+e>Da.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==n)&&(i={vertexOffset:t.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==n&&(i.sortKey=n),this.segments.push(i)),i},Da.prototype.get=function(){return this.segments},Da.prototype.destroy=function(){for(var e=0,t=this.segments;e>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(a>>>16)&65535)<<16);switch(l=0,r){case 3:l^=(255&e.charCodeAt(c+2))<<16;case 2:l^=(255&e.charCodeAt(c+1))<<8;case 1:i^=l=(65535&(l=(l=(65535&(l^=255&e.charCodeAt(c)))*o+(((l>>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return i^=e.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0}})),Ba=t((function(e){e.exports=function(e,t){for(var r,n=e.length,i=t^n,a=0;n>=4;)r=1540483477*(65535&(r=255&e.charCodeAt(a)|(255&e.charCodeAt(++a))<<8|(255&e.charCodeAt(++a))<<16|(255&e.charCodeAt(++a))<<24))+((1540483477*(r>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),n-=4,++a;switch(n){case 3:i^=(255&e.charCodeAt(a+2))<<16;case 2:i^=(255&e.charCodeAt(a+1))<<8;case 1:i=1540483477*(65535&(i^=255&e.charCodeAt(a)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0}})),ja=Fa,Na=Fa,Ua=Ba;ja.murmur3=Na,ja.murmur2=Ua;var Va=function(){this.ids=[],this.positions=[],this.indexed=!1};Va.prototype.add=function(e,t,r,n){this.ids.push(Ha(e)),this.positions.push(t,r,n)},Va.prototype.getPositions=function(e){for(var t=Ha(e),r=0,n=this.ids.length-1;r>1;this.ids[i]>=t?n=i:r=i+1}for(var a=[];this.ids[r]===t;){var o=this.positions[3*r],s=this.positions[3*r+1],l=this.positions[3*r+2];a.push({index:o,start:s,end:l}),r++}return a},Va.serialize=function(e,t){var r=new Float64Array(e.ids),n=new Uint32Array(e.positions);return Ga(r,n,0,r.length-1),t&&t.push(r.buffer,n.buffer),{ids:r,positions:n}},Va.deserialize=function(e){var t=new Va;return t.ids=e.ids,t.positions=e.positions,t.indexed=!0,t};var qa=Math.pow(2,53)-1;function Ha(e){var t=+e;return!isNaN(t)&&t<=qa?t:ja(String(e))}function Ga(e,t,r,n){for(;r>1],a=r-1,o=n+1;;){do{a++}while(e[a]i);if(a>=o)break;Wa(e,a,o),Wa(t,3*a,3*o),Wa(t,3*a+1,3*o+1),Wa(t,3*a+2,3*o+2)}o-ro.x+1||lo.y+1)&&k("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return r}function yo(e,t){return{type:e.type,id:e.id,properties:e.properties,geometry:t?go(e):[]}}function vo(e,t,r,n,i){e.emplaceBack(2*t+(n+1)/2,2*r+(i+1)/2)}var xo=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new ta,this.indexArray=new da,this.segments=new Da,this.programConfigurations=new co(e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};function _o(e,t){for(var r=0;r1){if(ko(e,t))return!0;for(var n=0;n1?e.distSqr(r):e.distSqr(r.sub(t)._mult(i)._add(t))}function Eo(e,t){for(var r,n,i,a=!1,o=0;ot.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(a=!a);return a}function Co(e,t){for(var r=!1,n=0,i=e.length-1;nt.y!=o.y>t.y&&t.x<(o.x-a.x)*(t.y-a.y)/(o.y-a.y)+a.x&&(r=!r)}return r}function Io(e,t,r){var n=r[0],i=r[2];if(e.xi.x&&t.x>i.x||e.yi.y&&t.y>i.y)return!1;var a=A(e,t,r[0]);return a!==A(e,t,r[1])||a!==A(e,t,r[2])||a!==A(e,t,r[3])}function Lo(e,t,r){var n=t.paint.get(e).value;return"constant"===n.kind?n.value:r.programConfigurations.get(t.id).getMaxValue(e)}function Po(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function zo(e,t,r,n,i){if(!t[0]&&!t[1])return e;var o=a.convert(t)._mult(i);"viewport"===r&&o._rotate(-n);for(var s=[],l=0;l=fo||u<0||u>=fo)){var h=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),f=h.vertexLength;vo(this.layoutVertexArray,c,u,-1,-1),vo(this.layoutVertexArray,c,u,1,-1),vo(this.layoutVertexArray,c,u,1,1),vo(this.layoutVertexArray,c,u,-1,1),this.indexArray.emplaceBack(f,f+1,f+2),this.indexArray.emplaceBack(f,f+3,f+2),h.vertexLength+=4,h.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{},n)},ii("CircleBucket",xo,{omit:["layers"]});var Do=new Zi({"circle-sort-key":new qi(Oe.layout_circle["circle-sort-key"])}),Oo={paint:new Zi({"circle-radius":new qi(Oe.paint_circle["circle-radius"]),"circle-color":new qi(Oe.paint_circle["circle-color"]),"circle-blur":new qi(Oe.paint_circle["circle-blur"]),"circle-opacity":new qi(Oe.paint_circle["circle-opacity"]),"circle-translate":new Vi(Oe.paint_circle["circle-translate"]),"circle-translate-anchor":new Vi(Oe.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Vi(Oe.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Vi(Oe.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new qi(Oe.paint_circle["circle-stroke-width"]),"circle-stroke-color":new qi(Oe.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new qi(Oe.paint_circle["circle-stroke-opacity"])}),layout:Do},Ro=typeof Float32Array<"u"?Float32Array:Array;function Fo(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function Bo(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],h=t[8],f=t[9],p=t[10],d=t[11],m=t[12],g=t[13],y=t[14],v=t[15],x=r[0],_=r[1],b=r[2],w=r[3];return e[0]=x*n+_*s+b*h+w*m,e[1]=x*i+_*l+b*f+w*g,e[2]=x*a+_*c+b*p+w*y,e[3]=x*o+_*u+b*d+w*v,x=r[4],_=r[5],b=r[6],w=r[7],e[4]=x*n+_*s+b*h+w*m,e[5]=x*i+_*l+b*f+w*g,e[6]=x*a+_*c+b*p+w*y,e[7]=x*o+_*u+b*d+w*v,x=r[8],_=r[9],b=r[10],w=r[11],e[8]=x*n+_*s+b*h+w*m,e[9]=x*i+_*l+b*f+w*g,e[10]=x*a+_*c+b*p+w*y,e[11]=x*o+_*u+b*d+w*v,x=r[12],_=r[13],b=r[14],w=r[15],e[12]=x*n+_*s+b*h+w*m,e[13]=x*i+_*l+b*f+w*g,e[14]=x*a+_*c+b*p+w*y,e[15]=x*o+_*u+b*d+w*v,e}Math.hypot||(Math.hypot=function(){for(var e=arguments,t=0,r=arguments.length;r--;)t+=e[r]*e[r];return Math.sqrt(t)});var jo,No=Bo;function Uo(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3];return e[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,e[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,e[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,e[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,e}jo=new Ro(3),Ro!=Float32Array&&(jo[0]=0,jo[1]=0,jo[2]=0),function(){var e=new Ro(4);Ro!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0)}();var Vo=(function(){var e=new Ro(2);Ro!=Float32Array&&(e[0]=0,e[1]=0)}(),function(e){function t(t){e.call(this,t,Oo)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.createBucket=function(e){return new xo(e)},t.prototype.queryRadius=function(e){var t=e;return Lo("circle-radius",this,t)+Lo("circle-stroke-width",this,t)+Po(this.paint.get("circle-translate"))},t.prototype.queryIntersectsFeature=function(e,t,r,n,i,a,o,s){for(var l=zo(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),a.angle,o),c=this.paint.get("circle-radius").evaluate(t,r)+this.paint.get("circle-stroke-width").evaluate(t,r),u="map"===this.paint.get("circle-pitch-alignment"),h=u?l:function(e,t){return e.map((function(e){return qo(e,t)}))}(l,s),f=u?c*o:c,p=0,d=n;pe.width||i.height>e.height||r.x>e.width-i.width||r.y>e.height-i.height)throw new RangeError("out of range source coordinates for image copy");if(i.width>t.width||i.height>t.height||n.x>t.width-i.width||n.y>t.height-i.height)throw new RangeError("out of range destination coordinates for image copy");for(var o=e.data,s=t.data,l=0;l80*r){n=a=e[0],i=o=e[1];for(var d=r;da&&(a=s),l>o&&(o=l);c=0!==(c=Math.max(a-n,o-i))?1/c:0}return ss(f,p,r,n,i,c),p}function as(e,t,r,n,i){var a,o;if(i===Cs(e,t,r,n)>0)for(a=t;a=t;a-=n)o=Ms(a,e[a],e[a+1],o);return o&&_s(o,o.next)&&(Ss(o),o=o.next),o}function os(e,t){if(!e)return e;t||(t=e);var r,n=e;do{if(r=!1,n.steiner||!_s(n,n.next)&&0!==xs(n.prev,n,n.next))n=n.next;else{if(Ss(n),(n=t=n.prev)===n.next)break;r=!0}}while(r||n!==t);return t}function ss(e,t,r,n,i,a,o){if(e){!o&&a&&function(e,t,r,n){var i=e;do{null===i.z&&(i.z=ms(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,r,n,i,a,o,s,l,c=1;do{for(r=e,e=null,a=null,o=0;r;){for(o++,n=r,s=0,t=0;t0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;r=n}a.nextZ=null,c*=2}while(o>1)}(i)}(e,n,i,a);for(var s,l,c=e;e.prev!==e.next;)if(s=e.prev,l=e.next,a?cs(e,n,i,a):ls(e))t.push(s.i/r),t.push(e.i/r),t.push(l.i/r),Ss(e),e=l.next,c=l.next;else if((e=l)===c){o?1===o?ss(e=us(os(e),t,r),t,r,n,i,a,2):2===o&&hs(e,t,r,n,i,a):ss(os(e),t,r,n,i,a,1);break}}}function ls(e){var t=e.prev,r=e,n=e.next;if(xs(t,r,n)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(ys(t.x,t.y,r.x,r.y,n.x,n.y,i.x,i.y)&&xs(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function cs(e,t,r,n){var i=e.prev,a=e,o=e.next;if(xs(i,a,o)>=0)return!1;for(var s=i.xa.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,u=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,h=ms(s,l,t,r,n),f=ms(c,u,t,r,n),p=e.prevZ,d=e.nextZ;p&&p.z>=h&&d&&d.z<=f;){if(p!==e.prev&&p!==e.next&&ys(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&xs(p.prev,p,p.next)>=0||(p=p.prevZ,d!==e.prev&&d!==e.next&&ys(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&xs(d.prev,d,d.next)>=0))return!1;d=d.nextZ}for(;p&&p.z>=h;){if(p!==e.prev&&p!==e.next&&ys(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&xs(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;d&&d.z<=f;){if(d!==e.prev&&d!==e.next&&ys(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&xs(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function us(e,t,r){var n=e;do{var i=n.prev,a=n.next.next;!_s(i,a)&&bs(i,n,n.next,a)&&ks(i,a)&&ks(a,i)&&(t.push(i.i/r),t.push(n.i/r),t.push(a.i/r),Ss(n),Ss(n.next),n=e=a),n=n.next}while(n!==e);return os(n)}function hs(e,t,r,n,i,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&vs(o,s)){var l=As(o,s);return o=os(o,o.next),l=os(l,l.next),ss(o,t,r,n,i,a),void ss(l,t,r,n,i,a)}s=s.next}o=o.next}while(o!==e)}function fs(e,t){return e.x-t.x}function ps(e,t){if(t=function(e,t){var r,n=t,i=e.x,a=e.y,o=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>o){if(o=s,s===i){if(a===n.y)return n;if(a===n.next.y)return n.next}r=n.x=n.x&&n.x>=u&&i!==n.x&&ys(ar.x||n.x===r.x&&ds(r,n)))&&(r=n,f=l)),n=n.next}while(n!==c);return r}(e,t),t){var r=As(t,e);os(t,t.next),os(r,r.next)}}function ds(e,t){return xs(e.prev,e,t.prev)<0&&xs(t.next,e,e.next)<0}function ms(e,t,r,n,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function gs(e){var t=e,r=e;do{(t.x=0&&(e-o)*(n-s)-(r-o)*(t-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function vs(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&bs(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(e,t)&&(ks(e,t)&&ks(t,e)&&function(e,t){var r=e,n=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do{r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}(e,t)&&(xs(e.prev,e,t.prev)||xs(e,t.prev,t))||_s(e,t)&&xs(e.prev,e,e.next)>0&&xs(t.prev,t,t.next)>0)}function xs(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function _s(e,t){return e.x===t.x&&e.y===t.y}function bs(e,t,r,n){var i=Ts(xs(e,t,r)),a=Ts(xs(e,t,n)),o=Ts(xs(r,n,e)),s=Ts(xs(r,n,t));return!!(i!==a&&o!==s||0===i&&ws(e,r,t)||0===a&&ws(e,n,t)||0===o&&ws(r,e,n)||0===s&&ws(r,t,n))}function ws(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function Ts(e){return e>0?1:e<0?-1:0}function ks(e,t){return xs(e.prev,e,e.next)<0?xs(e,t,e.next)>=0&&xs(e,e.prev,t)>=0:xs(e,t,e.prev)<0||xs(e,e.next,t)<0}function As(e,t){var r=new Es(e.i,e.x,e.y),n=new Es(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function Ms(e,t,r,n){var i=new Es(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function Ss(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Es(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Cs(e,t,r,n){for(var i=0,a=t,o=r-n;ar;){if(n-r>600){var a=n-r+1,o=t-r+1,s=Math.log(a),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(a-l)/a)*(o-a/2<0?-1:1);Ls(e,t,Math.max(r,Math.floor(t-o*l/a+c)),Math.min(n,Math.floor(t+(a-o)*l/a+c)),i)}var u=e[t],h=r,f=n;for(Ps(e,r,t),i(e[n],u)>0&&Ps(e,r,n);h0;)f--}0===i(e[r],u)?Ps(e,r,f):Ps(e,++f,n),f<=t&&(r=f+1),t<=f&&(n=f-1)}}function Ps(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function zs(e,t){return et?1:0}function Ds(e,t){var r=e.length;if(r<=1)return[e];for(var n,i,a=[],o=0;o1)for(var l=0;l0&&(n+=e[i-1].length,r.holes.push(n))}return r},rs.default=ns;var Bs=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new ta,this.indexArray=new da,this.indexArray2=new _a,this.programConfigurations=new co(e.layers,e.zoom),this.segments=new Da,this.segments2=new Da,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};Bs.prototype.populate=function(e,t,r){this.hasPattern=Rs("fill",this.layers,t);for(var n=this.layers[0].layout.get("fill-sort-key"),i=[],a=0,o=e;a>3}if(i--,1===n||2===n)o+=e.readSVarint(),s+=e.readSVarint(),1===n&&(t&&l.push(t),t=[]),t.push(new a(o,s));else{if(7!==n)throw new Error("unknown command "+n);t&&t.push(t[0].clone())}}return t&&l.push(t),l},Hs.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,r=1,n=0,i=0,a=0,o=1/0,s=-1/0,l=1/0,c=-1/0;e.pos>3}if(n--,1===r||2===r)(i+=e.readSVarint())s&&(s=i),(a+=e.readSVarint())c&&(c=a);else if(7!==r)throw new Error("unknown command "+r)}return[o,l,s,c]},Hs.prototype.toGeoJSON=function(e,t,r){var n,i,a=this.extent*Math.pow(2,r),o=this.extent*e,s=this.extent*t,l=this.loadGeometry(),c=Hs.types[this.type];function u(e){for(var t=0;t>3;t=1===n?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null}return t}(r))}Ys.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new qs(this._pbf,t,this.extent,this._keys,this._values)};function $s(e,t,r){if(3===e){var n=new Zs(r,r.readVarint()+r.pos);n.length&&(t[n.name]=n)}}var Ks={VectorTile:function(e,t){this.layers=e.readFields($s,{},t)},VectorTileFeature:qs,VectorTileLayer:Zs},Js=Ks.VectorTileFeature.types,Qs=Math.pow(2,13);function el(e,t,r,n,i,a,o,s){e.emplaceBack(t,r,2*Math.floor(n*Qs)+o,i*Qs*2,a*Qs*2,Math.round(s))}var tl=function(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((function(e){return e.id})),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new na,this.indexArray=new da,this.programConfigurations=new co(e.layers,e.zoom),this.segments=new Da,this.stateDependentLayerIds=this.layers.filter((function(e){return e.isStateDependent()})).map((function(e){return e.id}))};function rl(e,t){return e.x===t.x&&(e.x<0||e.x>fo)||e.y===t.y&&(e.y<0||e.y>fo)}function nl(e){return e.every((function(e){return e.x<0}))||e.every((function(e){return e.x>fo}))||e.every((function(e){return e.y<0}))||e.every((function(e){return e.y>fo}))}tl.prototype.populate=function(e,t,r){this.features=[],this.hasPattern=Rs("fill-extrusion",this.layers,t);for(var n=0,i=e;n=1){var v=d[g-1];if(!rl(y,v)){h.vertexLength+4>Da.MAX_VERTEX_ARRAY_LENGTH&&(h=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var x=y.sub(v)._perp()._unit(),_=v.dist(y);m+_>32768&&(m=0),el(this.layoutVertexArray,y.x,y.y,x.x,x.y,0,0,m),el(this.layoutVertexArray,y.x,y.y,x.x,x.y,0,1,m),m+=_,el(this.layoutVertexArray,v.x,v.y,x.x,x.y,0,0,m),el(this.layoutVertexArray,v.x,v.y,x.x,x.y,0,1,m);var b=h.vertexLength;this.indexArray.emplaceBack(b,b+2,b+1),this.indexArray.emplaceBack(b+1,b+2,b+3),h.vertexLength+=4,h.primitiveLength+=2}}}}if(h.vertexLength+l>Da.MAX_VERTEX_ARRAY_LENGTH&&(h=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray)),"Polygon"===Js[e.type]){for(var w=[],T=[],k=h.vertexLength,A=0,M=s;A=2&&e[l-1].equals(e[l-2]);)l--;for(var c=0;c0;if(T&&y>c){var A=u.dist(p);if(A>2*h){var M=u.sub(u.sub(p)._mult(h/A)._round());this.updateDistance(p,M),this.addCurrentVertex(M,m,0,0,f),p=M}}var S=p&&d,E=S?r:s?"butt":n;if(S&&"round"===E&&(bi&&(E="bevel"),"bevel"===E&&(b>2&&(E="flipbevel"),b100)v=g.mult(-1);else{var C=b*m.add(g).mag()/m.sub(g).mag();v._perp()._mult(C*(k?-1:1))}this.addCurrentVertex(u,v,0,0,f),this.addCurrentVertex(u,v.mult(-1),0,0,f)}else if("bevel"===E||"fakeround"===E){var I=-Math.sqrt(b*b-1),L=k?I:0,P=k?0:I;if(p&&this.addCurrentVertex(u,m,L,P,f),"fakeround"===E)for(var z=Math.round(180*w/Math.PI/20),D=1;D2*h){var N=u.add(d.sub(u)._mult(h/j)._round());this.updateDistance(u,N),this.addCurrentVertex(N,g,0,0,f),u=N}}}}},pl.prototype.addCurrentVertex=function(e,t,r,n,i,a){void 0===a&&(a=!1);var o=t.x+t.y*r,s=t.y-t.x*r,l=-t.x+t.y*n,c=-t.y-t.x*n;this.addHalfVertex(e,o,s,a,!1,r,i),this.addHalfVertex(e,l,c,a,!0,-n,i),this.distance>fl/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(e,t,r,n,i,a))},pl.prototype.addHalfVertex=function(e,t,r,n,i,a,o){var s=e.x,l=e.y,c=.5*(this.lineClips?this.scaledDistance*(fl-1):this.scaledDistance);if(this.layoutVertexArray.emplaceBack((s<<1)+(n?1:0),(l<<1)+(i?1:0),Math.round(63*t)+128,Math.round(63*r)+128,1+(0===a?0:a<0?-1:1)|(63&c)<<2,c>>6),this.lineClips){var u=(this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start);this.layoutVertexArray2.emplaceBack(u,this.lineClipsArray.length)}var h=o.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,h),o.primitiveLength++),i?this.e2=h:this.e1=h},pl.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},pl.prototype.updateDistance=function(e,t){this.distance+=e.dist(t),this.updateScaledDistance()},ii("LineBucket",pl,{omit:["layers","patternFeatures"]});var dl=new Zi({"line-cap":new Vi(Oe.layout_line["line-cap"]),"line-join":new qi(Oe.layout_line["line-join"]),"line-miter-limit":new Vi(Oe.layout_line["line-miter-limit"]),"line-round-limit":new Vi(Oe.layout_line["line-round-limit"]),"line-sort-key":new qi(Oe.layout_line["line-sort-key"])}),ml={paint:new Zi({"line-opacity":new qi(Oe.paint_line["line-opacity"]),"line-color":new qi(Oe.paint_line["line-color"]),"line-translate":new Vi(Oe.paint_line["line-translate"]),"line-translate-anchor":new Vi(Oe.paint_line["line-translate-anchor"]),"line-width":new qi(Oe.paint_line["line-width"]),"line-gap-width":new qi(Oe.paint_line["line-gap-width"]),"line-offset":new qi(Oe.paint_line["line-offset"]),"line-blur":new qi(Oe.paint_line["line-blur"]),"line-dasharray":new Gi(Oe.paint_line["line-dasharray"]),"line-pattern":new Hi(Oe.paint_line["line-pattern"]),"line-gradient":new Wi(Oe.paint_line["line-gradient"])}),layout:dl},gl=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.possiblyEvaluate=function(t,r){return r=new zi(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),e.prototype.possiblyEvaluate.call(this,t,r)},t.prototype.evaluate=function(t,r,n,i){return r=p({},r,{zoom:Math.floor(r.zoom)}),e.prototype.evaluate.call(this,t,r,n,i)},t}(qi),yl=new gl(ml.paint.properties["line-width"].specification);yl.useIntegerZoom=!0;var vl=function(e){function t(t){e.call(this,t,ml),this.gradientVersion=0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype._handleSpecialPaintPropertyUpdate=function(e){if("line-gradient"===e){var t=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=t._styleExpression.expression instanceof Qt,this.gradientVersion=(this.gradientVersion+1)%l}},t.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},t.prototype.recalculate=function(t,r){e.prototype.recalculate.call(this,t,r),this.paint._values["line-floorwidth"]=yl.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)},t.prototype.createBucket=function(e){return new pl(e)},t.prototype.queryRadius=function(e){var t=e,r=xl(Lo("line-width",this,t),Lo("line-gap-width",this,t)),n=Lo("line-offset",this,t);return r/2+Math.abs(n)+Po(this.paint.get("line-translate"))},t.prototype.queryIntersectsFeature=function(e,t,r,n,i,o,s){var l=zo(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),o.angle,s),c=s/2*xl(this.paint.get("line-width").evaluate(t,r),this.paint.get("line-gap-width").evaluate(t,r)),u=this.paint.get("line-offset").evaluate(t,r);return u&&(n=function(e,t){for(var r=[],n=new a(0,0),i=0;i=3)for(var a=0;a0?t+2*e:e}var _l=Qi([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),bl=Qi([{name:"a_projected_pos",components:3,type:"Float32"}],4),wl=(Qi([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Qi([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),Tl=(Qi([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]),Qi([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),kl=Qi([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function Al(e,t,r){return e.sections.forEach((function(e){e.text=function(e,t,r){var n=t.layout.get("text-transform").evaluate(r,{});return"uppercase"===n?e=e.toLocaleUpperCase():"lowercase"===n&&(e=e.toLocaleLowerCase()),Pi.applyArabicShaping&&(e=Pi.applyArabicShaping(e)),e}(e.text,t,r)})),e}Qi([{name:"triangle",components:3,type:"Uint16"}]),Qi([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),Qi([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),Qi([{type:"Float32",name:"offsetX"}]),Qi([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var Ml={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},Sl=24,El=function(e,t,r,n,i){var a,o,s=8*i-n-1,l=(1<>1,u=-7,h=r?i-1:0,f=r?-1:1,p=e[t+h];for(h+=f,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=256*a+e[t+h],h+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=n;u>0;o=256*o+e[t+h],h+=f,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=c}return(p?-1:1)*o*Math.pow(2,a-n)},Cl=function(e,t,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+h>=1?f/l:f*Math.pow(2,1-h))*l>=2&&(o++,l/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(t*l-1)*Math.pow(2,i),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;e[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<0;e[r+p]=255&o,p+=d,o/=256,c-=8);e[r+p-d]|=128*m},Il=Ll;function Ll(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}Ll.Varint=0,Ll.Fixed64=1,Ll.Bytes=2,Ll.Fixed32=5;var Pl=4294967296,zl=1/Pl,Dl=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function Ol(e){return e.type===Ll.Bytes?e.readVarint()+e.pos:e.pos+1}function Rl(e,t,r){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i>=e;i--)r.buf[i+n]=r.buf[i]}function Fl(e,t){for(var r=0;r>>8,e[r+2]=t>>>16,e[r+3]=t>>>24}function Yl(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}function Xl(e,t,r){1===e&&r.readMessage($l,t)}function $l(e,t,r){if(3===e){var n=r.readMessage(Kl,{}),i=n.id,a=n.bitmap,o=n.width,s=n.height,l=n.left,c=n.top,u=n.advance;t.push({id:i,bitmap:new Yo({width:o+6,height:s+6},a),metrics:{width:o,height:s,left:l,top:c,advance:u}})}}function Kl(e,t,r){1===e?t.id=r.readVarint():2===e?t.bitmap=r.readBytes():3===e?t.width=r.readVarint():4===e?t.height=r.readVarint():5===e?t.left=r.readSVarint():6===e?t.top=r.readSVarint():7===e&&(t.advance=r.readVarint())}function Jl(e){for(var t=0,r=0,n=0,i=e;n=0;f--){var p=o[f];if(!(h.w>p.w||h.h>p.h)){if(h.x=p.x,h.y=p.y,l=Math.max(l,h.y+h.h),s=Math.max(s,h.x+h.w),h.w===p.w&&h.h===p.h){var d=o.pop();f>3,a=this.pos;this.type=7&n,e(i,t,this),this.pos===a&&this.skip(n)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=Wl(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=Yl(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=Wl(this.buf,this.pos)+Wl(this.buf,this.pos+4)*Pl;return this.pos+=8,e},readSFixed64:function(){var e=Wl(this.buf,this.pos)+Yl(this.buf,this.pos+4)*Pl;return this.pos+=8,e},readFloat:function(){var e=El(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=El(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,r,n=this.buf;return t=127&(r=n[this.pos++]),r<128||(t|=(127&(r=n[this.pos++]))<<7,r<128)||(t|=(127&(r=n[this.pos++]))<<14,r<128)||(t|=(127&(r=n[this.pos++]))<<21,r<128)?t:function(e,t,r){var n,i,a=r.buf;if(n=(112&(i=a[r.pos++]))>>4,i<128||(n|=(127&(i=a[r.pos++]))<<3,i<128)||(n|=(127&(i=a[r.pos++]))<<10,i<128)||(n|=(127&(i=a[r.pos++]))<<17,i<128)||(n|=(127&(i=a[r.pos++]))<<24,i<128)||(n|=(1&(i=a[r.pos++]))<<31,i<128))return function(e,t,r){return r?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}(e,n,t);throw new Error("Expected varint not more than 10 bytes")}(t|=(15&(r=n[this.pos]))<<28,e,this)},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=12&&Dl?function(e,t,r){return Dl.decode(e.subarray(t,r))}(this.buf,t,e):function(e,t,r){for(var n="",i=t;i239?4:l>223?3:l>191?2:1;if(i+u>r)break;1===u?l<128&&(c=l):2===u?128==(192&(a=e[i+1]))&&(c=(31&l)<<6|63&a)<=127&&(c=null):3===u?(a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&((c=(15&l)<<12|(63&a)<<6|63&o)<=2047||c>=55296&&c<=57343)&&(c=null)):4===u&&(a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&((c=(15&l)<<18|(63&a)<<12|(63&o)<<6|63&s)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,u=1):c>65535&&(c-=65536,n+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),n+=String.fromCharCode(c),i+=u}return n}(this.buf,t,e)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==Ll.Bytes)return e.push(this.readVarint(t));var r=Ol(this);for(e=e||[];this.pos127;);else if(t===Ll.Bytes)this.pos=this.readVarint()+this.pos;else if(t===Ll.Fixed32)this.pos+=4;else{if(t!==Ll.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t268435455||e<0?function(e,t){var r,n;if(e>=0?(r=e%4294967296|0,n=e/4294967296|0):(n=~(-e/4294967296),4294967295^(r=~(-e%4294967296))?r=r+1|0:(r=0,n=n+1|0)),e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),function(e,t,r){r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos]=127&e}(r,0,t),function(e,t){var r=(7&e)<<4;t.buf[t.pos++]|=r|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e)))))}(n,t)}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(!!e)},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=function(e,t,r){for(var n,i,a=0;a55295&&n<57344){if(!i){n>56319||a+1===t.length?(e[r++]=239,e[r++]=191,e[r++]=189):i=n;continue}if(n<56320){e[r++]=239,e[r++]=191,e[r++]=189,i=n;continue}n=i-55296<<10|n-56320|65536,i=null}else i&&(e[r++]=239,e[r++]=191,e[r++]=189,i=null);n<128?e[r++]=n:(n<2048?e[r++]=n>>6|192:(n<65536?e[r++]=n>>12|224:(e[r++]=n>>18|240,e[r++]=n>>12&63|128),e[r++]=n>>6&63|128),e[r++]=63&n|128)}return r}(this.buf,e,this.pos);var r=this.pos-t;r>=128&&Rl(t,r,this),this.pos=t-1,this.writeVarint(r),this.pos+=r},writeFloat:function(e){this.realloc(4),Cl(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),Cl(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var r=0;r=128&&Rl(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(e,t,r){this.writeTag(e,Ll.Bytes),this.writeRawMessage(t,r)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,Fl,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,Bl,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,Ul,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,jl,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,Nl,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,Vl,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,ql,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,Hl,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,Gl,t)},writeBytesField:function(e,t){this.writeTag(e,Ll.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,Ll.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,Ll.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,Ll.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,Ll.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,Ll.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,Ll.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,Ll.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,Ll.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,Ll.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,!!t)}};var Ql=function(e,t){var r=t.pixelRatio,n=t.version,i=t.stretchX,a=t.stretchY,o=t.content;this.paddedRect=e,this.pixelRatio=r,this.stretchX=i,this.stretchY=a,this.content=o,this.version=n},ec={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};ec.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},ec.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},ec.tlbr.get=function(){return this.tl.concat(this.br)},ec.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(Ql.prototype,ec);var tc=function(e,t){var r={},n={};this.haveRenderCallbacks=[];var i=[];this.addImages(e,r,i),this.addImages(t,n,i);var a=Jl(i),o=a.w,s=a.h,l=new Xo({width:o||1,height:s||1});for(var c in e){var u=e[c],h=r[c].paddedRect;Xo.copy(u.data,l,{x:0,y:0},{x:h.x+1,y:h.y+1},u.data)}for(var f in t){var p=t[f],d=n[f].paddedRect,m=d.x+1,g=d.y+1,y=p.data.width,v=p.data.height;Xo.copy(p.data,l,{x:0,y:0},{x:m,y:g},p.data),Xo.copy(p.data,l,{x:0,y:v-1},{x:m,y:g-1},{width:y,height:1}),Xo.copy(p.data,l,{x:0,y:0},{x:m,y:g+v},{width:y,height:1}),Xo.copy(p.data,l,{x:y-1,y:0},{x:m-1,y:g},{width:1,height:v}),Xo.copy(p.data,l,{x:0,y:0},{x:m+y,y:g},{width:1,height:v})}this.image=l,this.iconPositions=r,this.patternPositions=n};tc.prototype.addImages=function(e,t,r){for(var n in e){var i=e[n],a={x:0,y:0,w:i.data.width+2,h:i.data.height+2};r.push(a),t[n]=new Ql(a,i),i.hasRenderCallback&&this.haveRenderCallbacks.push(n)}},tc.prototype.patchUpdatedImages=function(e,t){for(var r in e.dispatchRenderCallbacks(this.haveRenderCallbacks),e.updatedImages)this.patchUpdatedImage(this.iconPositions[r],e.getImage(r),t),this.patchUpdatedImage(this.patternPositions[r],e.getImage(r),t)},tc.prototype.patchUpdatedImage=function(e,t,r){if(e&&t&&e.version!==t.version){e.version=t.version;var n=e.tl,i=n[0],a=n[1];r.update(t.data,void 0,{x:i,y:a})}},ii("ImagePosition",Ql),ii("ImageAtlas",tc);var rc={horizontal:1,vertical:2,horizontalOnly:3},nc=-17,ic=function(){this.scale=1,this.fontStack="",this.imageName=null};ic.forText=function(e,t){var r=new ic;return r.scale=e||1,r.fontStack=t,r},ic.forImage=function(e){var t=new ic;return t.imageName=e,t};var ac=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};function oc(e,t,r,n,i,a,o,s,l,c,u,h,f,p,d,m){var g=ac.fromFeature(e,i);h===rc.vertical&&g.verticalizePunctuation();var y,v=Pi.processBidirectionalText,x=Pi.processStyledBidirectionalText;if(v&&1===g.sections.length){y=[];for(var _=0,b=v(g.toString(),dc(g,c,a,t,n,p,d));_0&&B>A&&(A=B)}else{var j=r[S.fontStack],N=j&&j[C];if(N&&N.rect)P=N.rect,L=N.metrics;else{var U=t[S.fontStack],V=U&&U[C];if(!V)continue;L=V.metrics}I=(b-S.scale)*Sl}O?(e.verticalizable=!0,k.push({glyph:C,imageName:z,x:f,y:p+I,vertical:O,scale:S.scale,fontStack:S.fontStack,sectionIndex:E,metrics:L,rect:P}),f+=D*S.scale+c):(k.push({glyph:C,imageName:z,x:f,y:p+I,vertical:O,scale:S.scale,fontStack:S.fontStack,sectionIndex:E,metrics:L,rect:P}),f+=L.advance*S.scale+c)}if(0!==k.length){var q=f-c;d=Math.max(q,d),gc(k,0,k.length-1,g,A)}f=0;var H=a*b+A;T.lineOffset=Math.max(A,w),p+=H,m=Math.max(H,m),++y}else p+=a,++y}var G=p-nc,W=mc(o),Z=W.horizontalAlign,Y=W.verticalAlign;(function(e,t,r,n,i,a,o,s,l){var c,u=(t-r)*i;c=a!==o?-s*n-nc:(-n*l+.5)*o;for(var h=0,f=e;h=0&&n>=e&&sc[this.text.charCodeAt(n)];n--)r--;this.text=this.text.substring(e,r),this.sectionIndex=this.sectionIndex.slice(e,r)},ac.prototype.substring=function(e,t){var r=new ac;return r.text=this.text.substring(e,t),r.sectionIndex=this.sectionIndex.slice(e,t),r.sections=this.sections,r},ac.prototype.toString=function(){return this.text},ac.prototype.getMaxScale=function(){var e=this;return this.sectionIndex.reduce((function(t,r){return Math.max(t,e.sections[r].scale)}),0)},ac.prototype.addTextSection=function(e,t){this.text+=e.text,this.sections.push(ic.forText(e.scale,e.fontStack||t));for(var r=this.sections.length-1,n=0;n=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var sc={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},lc={};function cc(e,t,r,n,i,a){if(t.imageName){var o=n[t.imageName];return o?o.displaySize[0]*t.scale*Sl/a+i:0}var s=r[t.fontStack],l=s&&s[e];return l?l.metrics.advance*t.scale+i:0}function uc(e,t,r,n){var i=Math.pow(e-t,2);return n?e=0,u=0,h=0;h-r/2;){if(--o<0)return!1;s-=e[o].dist(a),a=e[o]}s+=e[o].dist(e[o+1]),o++;for(var l=[],c=0;sn;)c-=l.shift().angleDelta;if(c>i)return!1;o++,s+=h.dist(f)}return!0}function Ac(e){for(var t=0,r=0;rc){var d=(c-l)/p,m=er(h.x,f.x,d),g=er(h.y,f.y,d),y=new vc(m,g,f.angleTo(h),u);return y._round(),!o||kc(e,y,s,o,t)?y:void 0}l+=p}}function Cc(e,t,r,n,i,a,o,s,l){var c=Mc(n,a,o),u=Sc(n,i),h=u*o,f=0===e[0].x||e[0].x===l||0===e[0].y||e[0].y===l;return t-h=0&&_=0&&b=0&&f+c<=u){var w=new vc(_,b,v,d);w._round(),(!n||kc(e,w,a,n,i))&&p.push(w)}}h+=y}return!s&&!p.length&&!o&&(p=Ic(e,h/2,r,n,i,a,o,!0,l)),p}function Lc(e,t,r,n,i){for(var o=[],s=0;s=n&&f.x>=n)&&(h.x>=n?h=new a(n,h.y+(f.y-h.y)*((n-h.x)/(f.x-h.x)))._round():f.x>=n&&(f=new a(n,h.y+(f.y-h.y)*((n-h.x)/(f.x-h.x)))._round()),!(h.y>=i&&f.y>=i)&&(h.y>=i?h=new a(h.x+(f.x-h.x)*((i-h.y)/(f.y-h.y)),i)._round():f.y>=i&&(f=new a(h.x+(f.x-h.x)*((i-h.y)/(f.y-h.y)),i)._round()),(!c||!h.equals(c[c.length-1]))&&(c=[h],o.push(c)),c.push(f)))))}return o}function Pc(e,t,r,n){var i=[],o=e.image,s=o.pixelRatio,l=o.paddedRect.w-2,c=o.paddedRect.h-2,u=e.right-e.left,h=e.bottom-e.top,f=o.stretchX||[[0,l]],p=o.stretchY||[[0,c]],d=function(e,t){return e+t[1]-t[0]},m=f.reduce(d,0),g=p.reduce(d,0),y=l-m,v=c-g,x=0,_=m,b=0,w=g,T=0,k=y,A=0,M=v;if(o.content&&n){var S=o.content;x=zc(f,0,S[0]),b=zc(p,0,S[1]),_=zc(f,S[0],S[2]),w=zc(p,S[1],S[3]),T=S[0]-x,A=S[1]-b,k=S[2]-S[0]-_,M=S[3]-S[1]-w}var E=function(n,i,l,c){var f=Oc(n.stretch-x,_,u,e.left),p=Rc(n.fixed-T,k,n.stretch,m),d=Oc(i.stretch-b,w,h,e.top),y=Rc(i.fixed-A,M,i.stretch,g),v=Oc(l.stretch-x,_,u,e.left),S=Rc(l.fixed-T,k,l.stretch,m),E=Oc(c.stretch-b,w,h,e.top),C=Rc(c.fixed-A,M,c.stretch,g),I=new a(f,d),L=new a(v,d),P=new a(v,E),z=new a(f,E),D=new a(p/s,y/s),O=new a(S/s,C/s),R=t*Math.PI/180;if(R){var F=Math.sin(R),B=Math.cos(R),j=[B,-F,F,B];I._matMult(j),L._matMult(j),z._matMult(j),P._matMult(j)}var N=n.stretch+n.fixed,U=l.stretch+l.fixed,V=i.stretch+i.fixed,q=c.stretch+c.fixed;return{tl:I,tr:L,bl:z,br:P,tex:{x:o.paddedRect.x+1+N,y:o.paddedRect.y+1+V,w:U-N,h:q-V},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:D,pixelOffsetBR:O,minFontScaleX:k/s/u,minFontScaleY:M/s/h,isSDF:r}};if(n&&(o.stretchX||o.stretchY))for(var C=Dc(f,y,m),I=Dc(p,v,g),L=0;L0&&(d=Math.max(10,d),this.circleDiameter=d)}else{var m=o.top*s-l,g=o.bottom*s+l,y=o.left*s-l,v=o.right*s+l,x=o.collisionPadding;if(x&&(y-=x[0]*s,m-=x[1]*s,v+=x[2]*s,g+=x[3]*s),u){var _=new a(y,m),b=new a(v,m),w=new a(y,g),T=new a(v,g),k=u*Math.PI/180;_._rotate(k),b._rotate(k),w._rotate(k),T._rotate(k),y=Math.min(_.x,b.x,w.x,T.x),v=Math.max(_.x,b.x,w.x,T.x),m=Math.min(_.y,b.y,w.y,T.y),g=Math.max(_.y,b.y,w.y,T.y)}e.emplaceBack(t.x,t.y,y,m,v,g,r,n,i)}this.boxEndIndex=e.length},Bc=function(e,t){if(void 0===e&&(e=[]),void 0===t&&(t=jc),this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)};function jc(e,t){return et?1:0}function Nc(e,t,r){void 0===t&&(t=1),void 0===r&&(r=!1);for(var n=1/0,i=1/0,o=-1/0,s=-1/0,l=e[0],c=0;co)&&(o=u.x),(!c||u.y>s)&&(s=u.y)}var h=o-n,f=s-i,p=Math.min(h,f),d=p/2,m=new Bc([],Uc);if(0===p)return new a(n,i);for(var g=n;gv.d||!v.d)&&(v=_,r&&console.log("found best %d after %d probes",Math.round(1e4*_.d)/1e4,x)),!(_.max-v.d<=t)&&(d=_.h/2,m.push(new Vc(_.p.x-d,_.p.y-d,d,e)),m.push(new Vc(_.p.x+d,_.p.y-d,d,e)),m.push(new Vc(_.p.x-d,_.p.y+d,d,e)),m.push(new Vc(_.p.x+d,_.p.y+d,d,e)),x+=4)}return r&&(console.log("num probes: "+x),console.log("best distance: "+v.d)),v.p}function Uc(e,t){return t.max-e.max}function Vc(e,t,r,n){this.p=new a(e,t),this.h=r,this.d=function(e,t){for(var r=!1,n=1/0,i=0;ie.y!=u.y>e.y&&e.x<(u.x-c.x)*(e.y-c.y)/(u.y-c.y)+c.x&&(r=!r),n=Math.min(n,So(e,c,u))}return(r?1:-1)*Math.sqrt(n)}(this.p,n),this.max=this.d+this.h*Math.SQRT2}Bc.prototype.push=function(e){this.data.push(e),this.length++,this._up(this.length-1)},Bc.prototype.pop=function(){if(0!==this.length){var e=this.data[0],t=this.data.pop();return this.length--,this.length>0&&(this.data[0]=t,this._down(0)),e}},Bc.prototype.peek=function(){return this.data[0]},Bc.prototype._up=function(e){for(var t=this.data,r=this.compare,n=t[e];e>0;){var i=e-1>>1,a=t[i];if(r(n,a)>=0)break;t[e]=a,e=i}t[e]=n},Bc.prototype._down=function(e){for(var t=this.data,r=this.compare,n=this.length>>1,i=t[e];e=0)break;t[e]=o,e=a}t[e]=i};var qc=Number.POSITIVE_INFINITY;function Hc(e,t){return t[1]!==qc?function(e,t,r){var n=0,i=0;switch(t=Math.abs(t),r=Math.abs(r),e){case"top-right":case"top-left":case"top":i=r-7;break;case"bottom-right":case"bottom-left":case"bottom":i=7-r}switch(e){case"top-right":case"bottom-right":case"right":n=-t;break;case"top-left":case"bottom-left":case"left":n=t}return[n,i]}(e,t[0],t[1]):function(e,t){var r=0,n=0;t<0&&(t=0);var i=t/Math.sqrt(2);switch(e){case"top-right":case"top-left":n=i-7;break;case"bottom-right":case"bottom-left":n=7-i;break;case"bottom":n=7-t;break;case"top":n=t-7}switch(e){case"top-right":case"bottom-right":r=-i;break;case"top-left":case"bottom-left":r=i;break;case"left":r=t;break;case"right":r=-t}return[r,n]}(e,t[0])}function Gc(e){switch(e){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}var Wc=255,Zc=32640;function Yc(e,t,r,n,i,o,s,l,c,u,h,f,p,d,m){var g=function(e,t,r,n,i,o,s,l){for(var c=n.layout.get("text-rotate").evaluate(o,{})*Math.PI/180,u=[],h=0,f=t.positionedLines;hZc&&k(e.layerIds[0]+': Value for "text-size" is >= '+Wc+'. Reduce your "text-size".'):"composite"===y.kind&&((v=[xc*d.compositeTextSizes[0].evaluate(s,{},m),xc*d.compositeTextSizes[1].evaluate(s,{},m)])[0]>Zc||v[1]>Zc)&&k(e.layerIds[0]+': Value for "text-size" is >= '+Wc+'. Reduce your "text-size".'),e.addSymbols(e.text,g,v,l,o,s,u,t,c.lineStartIndex,c.lineLength,p,m);for(var x=0,_=h;x<_.length;x+=1)f[_[x]]=e.text.placedSymbolArray.length-1;return 4*g.length}function Xc(e){for(var t in e)return e[t];return null}function $c(e,t,r,n){var i=e.compareText;if(t in i){for(var a=i[t],o=a.length-1;o>=0;o--)if(n.dist(a[o])0)&&("constant"!==a.value.kind||a.value.value.length>0),c="constant"!==s.value.kind||!!s.value.value||Object.keys(s.parameters).length>0,u=i.get("symbol-sort-key");if(this.features=[],l||c){for(var h=t.iconDependencies,f=t.glyphDependencies,p=t.availableImages,d=new zi(this.zoom),m=0,g=e;m=0;for(var z=0,D=k.sections;z=0;s--)a[s]={x:t[s].x,y:t[s].y,tileUnitDistanceFromAnchor:i},s>0&&(i+=t[s-1].dist(t[s]));for(var l=0;l0},iu.prototype.hasIconData=function(){return this.icon.segments.get().length>0},iu.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},iu.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},iu.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},iu.prototype.addIndicesForPlacedSymbol=function(e,t){for(var r=e.placedSymbolArray.get(t),n=r.vertexStartIndex+4*r.numGlyphs,i=r.vertexStartIndex;i1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var r=0,n=this.symbolInstanceIndexes;r=0&&n.indexOf(e)===r&&t.addIndicesForPlacedSymbol(t.text,e)})),a.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,a.verticalPlacedTextSymbolIndex),a.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.placedIconSymbolIndex),a.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},ii("SymbolBucket",iu,{omit:["layers","collisionBoxArray","features","compareText"]}),iu.MAX_GLYPHS=65535,iu.addDynamicAttributes=eu;var au=new Zi({"symbol-placement":new Vi(Oe.layout_symbol["symbol-placement"]),"symbol-spacing":new Vi(Oe.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Vi(Oe.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new qi(Oe.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Vi(Oe.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Vi(Oe.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Vi(Oe.layout_symbol["icon-ignore-placement"]),"icon-optional":new Vi(Oe.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Vi(Oe.layout_symbol["icon-rotation-alignment"]),"icon-size":new qi(Oe.layout_symbol["icon-size"]),"icon-text-fit":new Vi(Oe.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Vi(Oe.layout_symbol["icon-text-fit-padding"]),"icon-image":new qi(Oe.layout_symbol["icon-image"]),"icon-rotate":new qi(Oe.layout_symbol["icon-rotate"]),"icon-padding":new Vi(Oe.layout_symbol["icon-padding"]),"icon-keep-upright":new Vi(Oe.layout_symbol["icon-keep-upright"]),"icon-offset":new qi(Oe.layout_symbol["icon-offset"]),"icon-anchor":new qi(Oe.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Vi(Oe.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Vi(Oe.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Vi(Oe.layout_symbol["text-rotation-alignment"]),"text-field":new qi(Oe.layout_symbol["text-field"]),"text-font":new qi(Oe.layout_symbol["text-font"]),"text-size":new qi(Oe.layout_symbol["text-size"]),"text-max-width":new qi(Oe.layout_symbol["text-max-width"]),"text-line-height":new Vi(Oe.layout_symbol["text-line-height"]),"text-letter-spacing":new qi(Oe.layout_symbol["text-letter-spacing"]),"text-justify":new qi(Oe.layout_symbol["text-justify"]),"text-radial-offset":new qi(Oe.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Vi(Oe.layout_symbol["text-variable-anchor"]),"text-anchor":new qi(Oe.layout_symbol["text-anchor"]),"text-max-angle":new Vi(Oe.layout_symbol["text-max-angle"]),"text-writing-mode":new Vi(Oe.layout_symbol["text-writing-mode"]),"text-rotate":new qi(Oe.layout_symbol["text-rotate"]),"text-padding":new Vi(Oe.layout_symbol["text-padding"]),"text-keep-upright":new Vi(Oe.layout_symbol["text-keep-upright"]),"text-transform":new qi(Oe.layout_symbol["text-transform"]),"text-offset":new qi(Oe.layout_symbol["text-offset"]),"text-allow-overlap":new Vi(Oe.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Vi(Oe.layout_symbol["text-ignore-placement"]),"text-optional":new Vi(Oe.layout_symbol["text-optional"])}),ou=new Zi({"icon-opacity":new qi(Oe.paint_symbol["icon-opacity"]),"icon-color":new qi(Oe.paint_symbol["icon-color"]),"icon-halo-color":new qi(Oe.paint_symbol["icon-halo-color"]),"icon-halo-width":new qi(Oe.paint_symbol["icon-halo-width"]),"icon-halo-blur":new qi(Oe.paint_symbol["icon-halo-blur"]),"icon-translate":new Vi(Oe.paint_symbol["icon-translate"]),"icon-translate-anchor":new Vi(Oe.paint_symbol["icon-translate-anchor"]),"text-opacity":new qi(Oe.paint_symbol["text-opacity"]),"text-color":new qi(Oe.paint_symbol["text-color"],{runtimeType:Ze,getOverride:function(e){return e.textColor},hasOverride:function(e){return!!e.textColor}}),"text-halo-color":new qi(Oe.paint_symbol["text-halo-color"]),"text-halo-width":new qi(Oe.paint_symbol["text-halo-width"]),"text-halo-blur":new qi(Oe.paint_symbol["text-halo-blur"]),"text-translate":new Vi(Oe.paint_symbol["text-translate"]),"text-translate-anchor":new Vi(Oe.paint_symbol["text-translate-anchor"])}),su={paint:ou,layout:au},lu=function(e){this.type=e.property.overrides?e.property.overrides.runtimeType:qe,this.defaultValue=e};lu.prototype.evaluate=function(e){if(e.formattedSection){var t=this.defaultValue.property.overrides;if(t&&t.hasOverride(e.formattedSection))return t.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default},lu.prototype.eachChild=function(e){this.defaultValue.isConstant()||e(this.defaultValue.value._styleExpression.expression)},lu.prototype.outputDefined=function(){return!1},lu.prototype.serialize=function(){return null},ii("FormatSectionOverride",lu,{omit:["defaultValue"]});var cu=function(e){function t(t){e.call(this,t,su)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.recalculate=function(t,r){if(e.prototype.recalculate.call(this,t,r),"auto"===this.layout.get("icon-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){var n=this.layout.get("text-writing-mode");if(n){for(var i=[],a=0,o=n;a",targetMapId:n,sourceMapId:a.mapId})}}},Tu.prototype.receive=function(e){var t=e.data,r=t.id;if(r&&(!t.targetMapId||this.mapId===t.targetMapId))if(""===t.type){delete this.tasks[r];var n=this.cancelCallbacks[r];delete this.cancelCallbacks[r],n&&n()}else S()||t.mustQueue?(this.tasks[r]=t,this.taskQueue.push(r),this.invoker.trigger()):this.processTask(r,t)},Tu.prototype.process=function(){if(this.taskQueue.length){var e=this.taskQueue.shift(),t=this.tasks[e];delete this.tasks[e],this.taskQueue.length&&this.invoker.trigger(),t&&this.processTask(e,t)}},Tu.prototype.processTask=function(e,t){var r=this;if(""===t.type){var n=this.callbacks[e];delete this.callbacks[e],n&&(t.error?n(ci(t.error)):n(null,ci(t.data)))}else{var i=!1,a=I(this.globalScope)?void 0:[],o=t.hasCallback?function(t,n){i=!0,delete r.cancelCallbacks[e],r.target.postMessage({id:e,type:"",sourceMapId:r.mapId,error:t?li(t):null,data:li(n,a)},a)}:function(e){i=!0},s=null,l=ci(t.data);if(this.parent[t.type])s=this.parent[t.type](t.sourceMapId,l,o);else if(this.parent.getWorkerSource){var c=t.type.split(".");s=this.parent.getWorkerSource(t.sourceMapId,c[0],l.source)[c[1]](l,o)}else o(new Error("Could not find function "+t.type));!i&&s&&s.cancel&&(this.cancelCallbacks[e]=s.cancel)}},Tu.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var Au=function(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1]))};Au.prototype.setNorthEast=function(e){return this._ne=e instanceof Su?new Su(e.lng,e.lat):Su.convert(e),this},Au.prototype.setSouthWest=function(e){return this._sw=e instanceof Su?new Su(e.lng,e.lat):Su.convert(e),this},Au.prototype.extend=function(e){var t,r,n=this._sw,i=this._ne;if(e instanceof Su)t=e,r=e;else{if(!(e instanceof Au)){if(Array.isArray(e)){if(4===e.length||e.every(Array.isArray)){var a=e;return this.extend(Au.convert(a))}var o=e;return this.extend(Su.convert(o))}return this}if(t=e._sw,r=e._ne,!t||!r)return this}return n||i?(n.lng=Math.min(t.lng,n.lng),n.lat=Math.min(t.lat,n.lat),i.lng=Math.max(r.lng,i.lng),i.lat=Math.max(r.lat,i.lat)):(this._sw=new Su(t.lng,t.lat),this._ne=new Su(r.lng,r.lat)),this},Au.prototype.getCenter=function(){return new Su((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Au.prototype.getSouthWest=function(){return this._sw},Au.prototype.getNorthEast=function(){return this._ne},Au.prototype.getNorthWest=function(){return new Su(this.getWest(),this.getNorth())},Au.prototype.getSouthEast=function(){return new Su(this.getEast(),this.getSouth())},Au.prototype.getWest=function(){return this._sw.lng},Au.prototype.getSouth=function(){return this._sw.lat},Au.prototype.getEast=function(){return this._ne.lng},Au.prototype.getNorth=function(){return this._ne.lat},Au.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Au.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Au.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Au.prototype.contains=function(e){var t=Su.convert(e),r=t.lng,n=t.lat,i=this._sw.lat<=n&&n<=this._ne.lat,a=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(a=this._sw.lng>=r&&r>=this._ne.lng),i&&a},Au.convert=function(e){return!e||e instanceof Au?e:new Au(e)};var Mu=6371008.8,Su=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid LngLat object: ("+e+", "+t+")");if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Su.prototype.wrap=function(){return new Su(f(this.lng,-180,180),this.lat)},Su.prototype.toArray=function(){return[this.lng,this.lat]},Su.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Su.prototype.distanceTo=function(e){var t=Math.PI/180,r=this.lat*t,n=e.lat*t,i=Math.sin(r)*Math.sin(n)+Math.cos(r)*Math.cos(n)*Math.cos((e.lng-this.lng)*t);return Mu*Math.acos(Math.min(i,1))},Su.prototype.toBounds=function(e){void 0===e&&(e=0);var t=360*e/40075017,r=t/Math.cos(Math.PI/180*this.lat);return new Au(new Su(this.lng-r,this.lat-t),new Su(this.lng+r,this.lat+t))},Su.convert=function(e){if(e instanceof Su)return e;if(Array.isArray(e)&&(2===e.length||3===e.length))return new Su(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&"object"==typeof e&&null!==e)return new Su(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var Eu=2*Math.PI*Mu;function Cu(e){return Eu*Math.cos(e*Math.PI/180)}function Iu(e){return(180+e)/360}function Lu(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function Pu(e,t){return e/Cu(t)}function zu(e){var t=180-360*e;return 360/Math.PI*Math.atan(Math.exp(t*Math.PI/180))-90}var Du=function(e,t,r){void 0===r&&(r=0),this.x=+e,this.y=+t,this.z=+r};Du.fromLngLat=function(e,t){void 0===t&&(t=0);var r=Su.convert(e);return new Du(Iu(r.lng),Lu(r.lat),Pu(t,r.lat))},Du.prototype.toLngLat=function(){return new Su(function(e){return 360*e-180}(this.x),zu(this.y))},Du.prototype.toAltitude=function(){return function(e,t){return e*Cu(zu(t))}(this.z,this.y)},Du.prototype.meterInMercatorCoordinateUnits=function(){return 1/Eu*function(e){return 1/Math.cos(e*Math.PI/180)}(zu(this.y))};var Ou=function(e,t,r){this.z=e,this.x=t,this.y=r,this.key=Bu(0,e,e,t,r)};Ou.prototype.equals=function(e){return this.z===e.z&&this.x===e.x&&this.y===e.y},Ou.prototype.url=function(e,t){var r=function(e,t,r){var n=ku(256*e,256*(t=Math.pow(2,r)-t-1),r),i=ku(256*(e+1),256*(t+1),r);return n[0]+","+n[1]+","+i[0]+","+i[1]}(this.x,this.y,this.z),n=function(e,t,r){for(var n,i="",a=e;a>0;a--)i+=(t&(n=1<this.canonical.z?new Fu(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Fu(e,this.wrap,e,this.canonical.x>>t,this.canonical.y>>t)},Fu.prototype.calculateScaledKey=function(e,t){var r=this.canonical.z-e;return e>this.canonical.z?Bu(this.wrap*+t,e,this.canonical.z,this.canonical.x,this.canonical.y):Bu(this.wrap*+t,e,e,this.canonical.x>>r,this.canonical.y>>r)},Fu.prototype.isChildOf=function(e){if(e.wrap!==this.wrap)return!1;var t=this.canonical.z-e.canonical.z;return 0===e.overscaledZ||e.overscaledZ>t&&e.canonical.y===this.canonical.y>>t},Fu.prototype.children=function(e){if(this.overscaledZ>=e)return[new Fu(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var t=this.canonical.z+1,r=2*this.canonical.x,n=2*this.canonical.y;return[new Fu(t,this.wrap,t,r,n),new Fu(t,this.wrap,t,r+1,n),new Fu(t,this.wrap,t,r,n+1),new Fu(t,this.wrap,t,r+1,n+1)]},Fu.prototype.isLessThan=function(e){return this.wrape.wrap)&&(this.overscaledZe.overscaledZ)&&(this.canonical.xe.canonical.x)&&this.canonical.y=this.dim+1||t<-1||t>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(t+1)*this.stride+(e+1)},ju.prototype._unpackMapbox=function(e,t,r){return(256*e*256+256*t+r)/10-1e4},ju.prototype._unpackTerrarium=function(e,t,r){return 256*e+t+r/256-32768},ju.prototype.getPixels=function(){return new Xo({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},ju.prototype.backfillBorder=function(e,t,r){if(this.dim!==e.dim)throw new Error("dem dimension mismatch");var n=t*this.dim,i=t*this.dim+this.dim,a=r*this.dim,o=r*this.dim+this.dim;switch(t){case-1:n=i-1;break;case 1:i=n+1}switch(r){case-1:a=o-1;break;case 1:o=a+1}for(var s=-t*this.dim,l=-r*this.dim,c=a;c=0&&u[3]>=0&&s.insert(o,u[0],u[1],u[2],u[3])}},Hu.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Ks.VectorTile(new Il(this.rawTileData)).layers,this.sourceLayerCoder=new Nu(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Hu.prototype.query=function(e,t,r,n){var i=this;this.loadVTLayers();for(var o=e.params||{},s=fo/e.tileSize/e.scale,l=Tn(o.filter),c=e.queryGeometry,u=e.queryPadding*s,h=Wu(c),f=this.grid.query(h.minX-u,h.minY-u,h.maxX+u,h.maxY+u),p=Wu(e.cameraQueryGeometry),d=this.grid3D.query(p.minX-u,p.minY-u,p.maxX+u,p.maxY+u,(function(t,r,n,i){return function(e,t,r,n,i){for(var o=0,s=e;o=l.x&&i>=l.y)return!0}var c=[new a(t,r),new a(t,i),new a(n,i),new a(n,r)];if(e.length>2)for(var u=0,h=c;u=0)return!0;return!1}(a,h)){var f=this.sourceLayerCoder.decode(r),d=this.vtLayers[f].feature(n);if(i.needGeometry){var m=yo(d,!0);if(!i.filter(new zi(this.tileID.overscaledZ),m,this.tileID.canonical))return}else if(!i.filter(new zi(this.tileID.overscaledZ),d))return;for(var g=this.getId(d,f),y=0;yn)i=!1;else if(t)if(this.expirationTimefe&&(e.getActor().send("enforceCacheSizeLimit",he),ge=0)},e.clamp=h,e.clearTileCache=function(e){var t=s.caches.delete(ue);e&&t.catch(e).then((function(){return e()}))},e.clipLine=Lc,e.clone=function(e){var t=new Ro(16);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},e.clone$1=w,e.clone$2=function(e){var t=new Ro(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},e.collisionCircleLayout=kl,e.config=N,e.create=function(){var e=new Ro(16);return Ro!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e},e.create$1=function(){var e=new Ro(9);return Ro!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e},e.create$2=function(){var e=new Ro(4);return Ro!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e},e.createCommonjsModule=t,e.createExpression=cn,e.createLayout=Qi,e.createStyleLayer=function(e){return"custom"===e.type?new du(e):new mu[e.type](e)},e.cross=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[0],s=r[1],l=r[2];return e[0]=i*l-a*s,e[1]=a*o-n*l,e[2]=n*s-i*o,e},e.deepEqual=function e(t,r){if(Array.isArray(t)){if(!Array.isArray(r)||t.length!==r.length)return!1;for(var n=0;n0&&(a=1/Math.sqrt(a)),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a,e},e.number=er,e.offscreenCanvasSupported=ye,e.ortho=function(e,t,r,n,i,a,o){var s=1/(t-r),l=1/(n-i),c=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*s,e[13]=(i+n)*l,e[14]=(o+a)*c,e[15]=1,e},e.parseGlyphPBF=function(e){return new Il(e).readFields(Xl,[])},e.pbf=Il,e.performSymbolLayout=function(e,t,r,n,i,a,o){e.createArrays();var s=512*e.overscaling;e.tilePixelRatio=fo/s,e.compareText={},e.iconsNeedLinear=!1;var l=e.layers[0].layout,c=e.layers[0]._unevaluatedLayout._values,u={};if("composite"===e.textSizeData.kind){var h=e.textSizeData,f=h.minZoom,p=h.maxZoom;u.compositeTextSizes=[c["text-size"].possiblyEvaluate(new zi(f),o),c["text-size"].possiblyEvaluate(new zi(p),o)]}if("composite"===e.iconSizeData.kind){var d=e.iconSizeData,m=d.minZoom,g=d.maxZoom;u.compositeIconSizes=[c["icon-size"].possiblyEvaluate(new zi(m),o),c["icon-size"].possiblyEvaluate(new zi(g),o)]}u.layoutTextSize=c["text-size"].possiblyEvaluate(new zi(e.zoom+1),o),u.layoutIconSize=c["icon-size"].possiblyEvaluate(new zi(e.zoom+1),o),u.textMaxSize=c["text-size"].possiblyEvaluate(new zi(18));for(var y=l.get("text-line-height")*Sl,v="map"===l.get("text-rotation-alignment")&&"point"!==l.get("symbol-placement"),x=l.get("text-keep-upright"),_=l.get("text-size"),b=function(){var a=T[w],s=l.get("text-font").evaluate(a,{},o).join(","),c=_.evaluate(a,{},o),h=u.layoutTextSize.evaluate(a,{},o),f=u.layoutIconSize.evaluate(a,{},o),p={horizontal:{},vertical:void 0},d=a.text,m=[0,0];if(d){var g=d.toString(),b=l.get("text-letter-spacing").evaluate(a,{},o)*Sl,A=function(e){for(var t=0,r=e;t=fo||h.y<0||h.y>=fo||function(e,t,r,n,i,a,o,s,l,c,u,h,f,p,d,m,g,y,v,x,_,b,w,T,A){var M,S,E,C,I,L=e.addToLineVertexArray(t,r),P=0,z=0,D=0,O=0,R=-1,F=-1,B={},j=ja(""),N=0,U=0;if(void 0===s._unevaluatedLayout.getValue("text-radial-offset")?(N=(M=s.layout.get("text-offset").evaluate(_,{},T).map((function(e){return e*Sl})))[0],U=M[1]):(N=s.layout.get("text-radial-offset").evaluate(_,{},T)*Sl,U=qc),e.allowVerticalPlacement&&n.vertical){var V=s.layout.get("text-rotate").evaluate(_,{},T)+90,q=n.vertical;C=new Fc(l,t,c,u,h,q,f,p,d,V),o&&(I=new Fc(l,t,c,u,h,o,g,y,d,V))}if(i){var H=s.layout.get("icon-rotate").evaluate(_,{}),G="none"!==s.layout.get("icon-text-fit"),W=Pc(i,H,w,G),Z=o?Pc(o,H,w,G):void 0;E=new Fc(l,t,c,u,h,i,g,y,!1,H),P=4*W.length;var Y=e.iconSizeData,X=null;"source"===Y.kind?(X=[xc*s.layout.get("icon-size").evaluate(_,{})])[0]>Zc&&k(e.layerIds[0]+': Value for "icon-size" is >= '+Wc+'. Reduce your "icon-size".'):"composite"===Y.kind&&((X=[xc*b.compositeIconSizes[0].evaluate(_,{},T),xc*b.compositeIconSizes[1].evaluate(_,{},T)])[0]>Zc||X[1]>Zc)&&k(e.layerIds[0]+': Value for "icon-size" is >= '+Wc+'. Reduce your "icon-size".'),e.addSymbols(e.icon,W,X,x,v,_,!1,t,L.lineStartIndex,L.lineLength,-1,T),R=e.icon.placedSymbolArray.length-1,Z&&(z=4*Z.length,e.addSymbols(e.icon,Z,X,x,v,_,rc.vertical,t,L.lineStartIndex,L.lineLength,-1,T),F=e.icon.placedSymbolArray.length-1)}for(var $ in n.horizontal){var K=n.horizontal[$];if(!S){j=ja(K.text);var J=s.layout.get("text-rotate").evaluate(_,{},T);S=new Fc(l,t,c,u,h,K,f,p,d,J)}var Q=1===K.positionedLines.length;if(D+=Yc(e,t,K,a,s,d,_,m,L,n.vertical?rc.horizontal:rc.horizontalOnly,Q?Object.keys(n.horizontal):[$],B,R,b,T),Q)break}n.vertical&&(O+=Yc(e,t,n.vertical,a,s,d,_,m,L,rc.vertical,["vertical"],B,F,b,T));var ee=S?S.boxStartIndex:e.collisionBoxArray.length,te=S?S.boxEndIndex:e.collisionBoxArray.length,re=C?C.boxStartIndex:e.collisionBoxArray.length,ne=C?C.boxEndIndex:e.collisionBoxArray.length,ie=E?E.boxStartIndex:e.collisionBoxArray.length,ae=E?E.boxEndIndex:e.collisionBoxArray.length,oe=I?I.boxStartIndex:e.collisionBoxArray.length,se=I?I.boxEndIndex:e.collisionBoxArray.length,le=-1,ce=function(e,t){return e&&e.circleDiameter?Math.max(e.circleDiameter,t):t};le=ce(S,le),le=ce(C,le),le=ce(E,le);var ue=(le=ce(I,le))>-1?1:0;ue&&(le*=A/Sl),e.glyphOffsetArray.length>=iu.MAX_GLYPHS&&k("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==_.sortKey&&e.addToSortKeyRanges(e.symbolInstances.length,_.sortKey),e.symbolInstances.emplaceBack(t.x,t.y,B.right>=0?B.right:-1,B.center>=0?B.center:-1,B.left>=0?B.left:-1,B.vertical||-1,R,F,j,ee,te,re,ne,ie,ae,oe,se,c,D,O,P,z,ue,0,f,N,U,le)}(e,h,s,r,n,i,f,e.layers[0],e.collisionBoxArray,t.index,t.sourceLayerIndex,e.index,y,b,A,l,x,w,M,d,t,a,c,u,o)};if("line"===S)for(var L=0,P=Lc(t.geometry,0,0,fo,fo);L1){var N=Ec(j,T,r.vertical||m,n,24,v);N&&I(j,N)}}else if("Polygon"===t.type)for(var U=0,V=Ds(t.geometry,0);U=k.maxzoom||"none"===k.visibility||(o(T,this.zoom,n),(h[k.id]=k.createBucket({index:u.bucketLayerIDs.length,layers:T,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:g,sourceID:this.source})).populate(y,f,this.tileID.canonical),u.bucketLayerIDs.push(T.map((function(e){return e.id}))))}}}var A,M,S,E,C=e.mapObject(f.glyphDependencies,(function(e){return Object.keys(e).map(Number)}));Object.keys(C).length?a.send("getGlyphs",{uid:this.uid,stacks:C},(function(e,t){A||(A=e,M=t,P.call(l))})):M={};var I=Object.keys(f.iconDependencies);I.length?a.send("getImages",{icons:I,source:this.source,tileID:this.tileID,type:"icons"},(function(e,t){A||(A=e,S=t,P.call(l))})):S={};var L=Object.keys(f.patternDependencies);function P(){if(A)return s(A);if(M&&S&&E){var t=new i(M),r=new e.ImageAtlas(S,E);for(var a in h){var l=h[a];l instanceof e.SymbolBucket?(o(l.layers,this.zoom,n),e.performSymbolLayout(l,M,t.positions,S,r.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):l.hasPattern&&(l instanceof e.LineBucket||l instanceof e.FillBucket||l instanceof e.FillExtrusionBucket)&&(o(l.layers,this.zoom,n),l.addFeatures(f,this.tileID.canonical,r.patternPositions))}this.status="done",s(null,{buckets:e.values(h).filter((function(e){return!e.isEmpty()})),featureIndex:u,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:t.image,imageAtlas:r,glyphMap:this.returnDependencies?M:null,iconMap:this.returnDependencies?S:null,glyphPositions:this.returnDependencies?t.positions:null})}}L.length?a.send("getImages",{icons:L,source:this.source,tileID:this.tileID,type:"patterns"},(function(e,t){A||(A=e,E=t,P.call(l))})):E={},P.call(this)};var l=function(e,t,r,n){this.actor=e,this.layerIndex=t,this.availableImages=r,this.loadVectorData=n||s,this.loading={},this.loaded={}};l.prototype.loadTile=function(t,r){var n=this,i=t.uid;this.loading||(this.loading={});var o=!!(t&&t.request&&t.request.collectResourceTiming)&&new e.RequestPerformance(t.request),s=this.loading[i]=new a(t);s.abort=this.loadVectorData(t,(function(t,a){if(delete n.loading[i],t||!a)return s.status="done",n.loaded[i]=s,r(t);var l=a.rawData,c={};a.expires&&(c.expires=a.expires),a.cacheControl&&(c.cacheControl=a.cacheControl);var u={};if(o){var h=o.finish();h&&(u.resourceTiming=JSON.parse(JSON.stringify(h)))}s.vectorTile=a.vectorTile,s.parse(a.vectorTile,n.layerIndex,n.availableImages,n.actor,(function(t,n){if(t||!n)return r(t);r(null,e.extend({rawTileData:l.slice(0)},n,c,u))})),n.loaded=n.loaded||{},n.loaded[i]=s}))},l.prototype.reloadTile=function(e,t){var r=this,n=this.loaded,i=e.uid,a=this;if(n&&n[i]){var o=n[i];o.showCollisionBoxes=e.showCollisionBoxes;var s=function(e,n){var i=o.reloadCallback;i&&(delete o.reloadCallback,o.parse(o.vectorTile,a.layerIndex,r.availableImages,a.actor,i)),t(e,n)};"parsing"===o.status?o.reloadCallback=s:"done"===o.status&&(o.vectorTile?o.parse(o.vectorTile,this.layerIndex,this.availableImages,this.actor,s):s())}},l.prototype.abortTile=function(e,t){var r=this.loading,n=e.uid;r&&r[n]&&r[n].abort&&(r[n].abort(),delete r[n]),t()},l.prototype.removeTile=function(e,t){var r=this.loaded,n=e.uid;r&&r[n]&&delete r[n],t()};var c=e.window.ImageBitmap,u=function(){this.loaded={}};u.prototype.loadTile=function(t,r){var n=t.uid,i=t.encoding,a=t.rawImageData,o=c&&a instanceof c?this.getImageData(a):a,s=new e.DEMData(n,o,i);this.loaded=this.loaded||{},this.loaded[n]=s,r(null,s)},u.prototype.getImageData=function(t){(!this.offscreenCanvas||!this.offscreenCanvasContext)&&(this.offscreenCanvas=new OffscreenCanvas(t.width,t.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=t.width,this.offscreenCanvas.height=t.height,this.offscreenCanvasContext.drawImage(t,0,0,t.width,t.height);var r=this.offscreenCanvasContext.getImageData(-1,-1,t.width+2,t.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new e.RGBAImage({width:r.width,height:r.height},r.data)},u.prototype.removeTile=function(e){var t=this.loaded,r=e.uid;t&&t[r]&&delete t[r]};var h=function e(t,r){var n,i=t&&t.type;if("FeatureCollection"===i)for(n=0;n=0!=!!t&&e.reverse()}var d=e.vectorTile.VectorTileFeature.prototype.toGeoJSON,m=function(t){this._feature=t,this.extent=e.EXTENT,this.type=t.type,this.properties=t.tags,"id"in t&&!isNaN(t.id)&&(this.id=parseInt(t.id,10))};m.prototype.loadGeometry=function(){if(1===this._feature.type){for(var t=[],r=0,n=this._feature.geometry;r"u"&&(n.push(s),l=n.length-1,a[s]=l),t.writeVarint(l);var c=r.properties[s],u=typeof c;"string"!==u&&"boolean"!==u&&"number"!==u&&(c=JSON.stringify(c));var h=u+":"+c,f=o[h];typeof f>"u"&&(i.push(c),f=i.length-1,o[h]=f),t.writeVarint(f)}}function E(e,t){return(t<<3)+(7&e)}function C(e){return e<<1^e>>31}function I(e,t){for(var r=e.loadGeometry(),n=e.type,i=0,a=0,o=r.length,s=0;s>1;z(e,t,o,n,i,a%2),P(e,t,r,n,o-1,a+1),P(e,t,r,o+1,i,a+1)}}function z(e,t,r,n,i,a){for(;i>n;){if(i-n>600){var o=i-n+1,s=r-n+1,l=Math.log(o),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(o-c)/o)*(s-o/2<0?-1:1);z(e,t,r,Math.max(n,Math.floor(r-s*c/o+u)),Math.min(i,Math.floor(r+(o-s)*c/o+u)),a)}var h=t[2*r+a],f=n,p=i;for(D(e,t,n,r),t[2*i+a]>h&&D(e,t,n,i);fh;)p--}t[2*n+a]===h?D(e,t,n,p):D(e,t,++p,i),p<=r&&(n=p+1),r<=p&&(i=p-1)}}function D(e,t,r,n){O(e,r,n),O(t,2*r,2*n),O(t,2*r+1,2*n+1)}function O(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function R(e,t,r,n){var i=e-r,a=t-n;return i*i+a*a}b.fromVectorTileJs=w,b.fromGeojsonVt=function(e,t){t=t||{};var r={};for(var n in e)r[n]=new v(e[n].features,t),r[n].name=n,r[n].version=t.version,r[n].extent=t.extent;return k({layers:r})},b.GeoJSONWrapper=T;var F=function(e){return e[0]},B=function(e){return e[1]},j=function(e,t,r,n,i){void 0===t&&(t=F),void 0===r&&(r=B),void 0===n&&(n=64),void 0===i&&(i=Float64Array),this.nodeSize=n,this.points=e;for(var a=e.length<65536?Uint16Array:Uint32Array,o=this.ids=new a(e.length),s=this.coords=new i(2*e.length),l=0;l=r&&s<=i&&l>=n&&l<=a&&u.push(e[d]);else{var m=Math.floor((p+f)/2);s=t[2*m],l=t[2*m+1],s>=r&&s<=i&&l>=n&&l<=a&&u.push(e[m]);var g=(h+1)%2;(0===h?r<=s:n<=l)&&(c.push(p),c.push(m-1),c.push(g)),(0===h?i>=s:a>=l)&&(c.push(m+1),c.push(f),c.push(g))}}return u}(this.ids,this.coords,e,t,r,n,this.nodeSize)},j.prototype.within=function(e,t,r){return function(e,t,r,n,i,a){for(var o=[0,e.length-1,0],s=[],l=i*i;o.length;){var c=o.pop(),u=o.pop(),h=o.pop();if(u-h<=a)for(var f=h;f<=u;f++)R(t[2*f],t[2*f+1],r,n)<=l&&s.push(e[f]);else{var p=Math.floor((h+u)/2),d=t[2*p],m=t[2*p+1];R(d,m,r,n)<=l&&s.push(e[p]);var g=(c+1)%2;(0===c?r-i<=d:n-i<=m)&&(o.push(h),o.push(p-1),o.push(g)),(0===c?r+i>=d:n+i>=m)&&(o.push(p+1),o.push(u),o.push(g))}}return s}(this.ids,this.coords,e,t,r,this.nodeSize)};var N={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(e){return e}},U=function(e){this.options=$(Object.create(N),e),this.trees=new Array(this.options.maxZoom+1)};function V(e,t,r,n,i){return{x:e,y:t,zoom:1/0,id:r,parentId:-1,numPoints:n,properties:i}}function q(e,t){var r=e.geometry.coordinates,n=r[0],i=r[1];return{x:W(n),y:Z(i),zoom:1/0,index:t,parentId:-1}}function H(e){return{type:"Feature",id:e.id,properties:G(e),geometry:{type:"Point",coordinates:[Y(e.x),X(e.y)]}}}function G(e){var t=e.numPoints,r=t>=1e4?Math.round(t/1e3)+"k":t>=1e3?Math.round(t/100)/10+"k":t;return $($({},e.properties),{cluster:!0,cluster_id:e.id,point_count:t,point_count_abbreviated:r})}function W(e){return e/360+.5}function Z(e){var t=Math.sin(e*Math.PI/180),r=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return r<0?0:r>1?1:r}function Y(e){return 360*(e-.5)}function X(e){var t=(180-360*e)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}function $(e,t){for(var r in t)e[r]=t[r];return e}function K(e){return e.x}function J(e){return e.y}function Q(e,t,r,n){for(var i,a=n,o=r-t>>1,s=r-t,l=e[t],c=e[t+1],u=e[r],h=e[r+1],f=t+3;fa)i=f,a=p;else if(p===a){var d=Math.abs(f-o);dn&&(i-t>3&&Q(e,t,i,n),e[i+2]=a,r-i>3&&Q(e,i,r,n))}function ee(e,t,r,n,i,a){var o=i-r,s=a-n;if(0!==o||0!==s){var l=((e-r)*o+(t-n)*s)/(o*o+s*s);l>1?(r=i,n=a):l>0&&(r+=o*l,n+=s*l)}return(o=e-r)*o+(s=t-n)*s}function te(e,t,r,n){var i={id:typeof e>"u"?null:e,type:t,geometry:r,tags:n,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(e){var t=e.geometry,r=e.type;if("Point"===r||"MultiPoint"===r||"LineString"===r)re(e,t);else if("Polygon"===r||"MultiLineString"===r)for(var n=0;n0&&(o+=n?(i*c-l*a)/2:Math.sqrt(Math.pow(l-i,2)+Math.pow(c-a,2))),i=l,a=c}var u=t.length-3;t[2]=1,Q(t,0,u,r),t[u+2]=1,t.size=Math.abs(o),t.start=0,t.end=t.size}function oe(e,t,r,n){for(var i=0;i1?1:r}function ce(e,t,r,n,i,a,o,s){if(n/=t,a>=(r/=t)&&o=n)return null;for(var l=[],c=0;c=r&&d=n)){var m=[];if("Point"===f||"MultiPoint"===f)ue(h,m,r,n,i);else if("LineString"===f)he(h,m,r,n,i,!1,s.lineMetrics);else if("MultiLineString"===f)pe(h,m,r,n,i,!1);else if("Polygon"===f)pe(h,m,r,n,i,!0);else if("MultiPolygon"===f)for(var g=0;g=r&&o<=n&&(t.push(e[a]),t.push(e[a+1]),t.push(e[a+2]))}}function he(e,t,r,n,i,a,o){for(var s,l,c=fe(e),u=0===i?me:ge,h=e.start,f=0;fr&&(l=u(c,p,d,g,y,r),o&&(c.start=h+s*l)):v>n?x=r&&(l=u(c,p,d,g,y,r),_=!0),x>n&&v<=n&&(l=u(c,p,d,g,y,n),_=!0),!a&&_&&(o&&(c.end=h+s*l),t.push(c),c=fe(e)),o&&(h+=s)}var b=e.length-3;p=e[b],d=e[b+1],m=e[b+2],(v=0===i?p:d)>=r&&v<=n&&de(c,p,d,m),b=c.length-3,a&&b>=3&&(c[b]!==c[0]||c[b+1]!==c[1])&&de(c,c[0],c[1],c[2]),c.length&&t.push(c)}function fe(e){var t=[];return t.size=e.size,t.start=e.start,t.end=e.end,t}function pe(e,t,r,n,i,a){for(var o=0;oo.maxX&&(o.maxX=u),h>o.maxY&&(o.maxY=h)}return o}function we(e,t,r,n){var i=t.geometry,a=t.type,o=[];if("Point"===a||"MultiPoint"===a)for(var s=0;s0&&t.size<(i?o:n))r.numPoints+=t.length/3;else{for(var s=[],l=0;lo)&&(r.numSimplified++,s.push(t[l]),s.push(t[l+1])),r.numPoints++;i&&function(e,t){for(var r=0,n=0,i=e.length,a=i-2;n0===t)for(n=0,i=e.length;n24)throw new Error("maxZoom should be in the 0-24 range");if(t.promoteId&&t.generateId)throw new Error("promoteId and generateId cannot be used together.");var n=function(e,t){var r=[];if("FeatureCollection"===e.type)for(var n=0;n=n;c--){var u=+Date.now();s=this._cluster(s,c),this.trees[c]=new j(s,K,J,a,Float32Array),r&&console.log("z%d: %d clusters in %dms",c,s.length,+Date.now()-u)}return r&&console.timeEnd("total time"),this},U.prototype.getClusters=function(e,t){var r=((e[0]+180)%360+360)%360-180,n=Math.max(-90,Math.min(90,e[1])),i=180===e[2]?180:((e[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,i=180;else if(r>i){var o=this.getClusters([r,n,180,a],t),s=this.getClusters([-180,n,i,a],t);return o.concat(s)}for(var l=this.trees[this._limitZoom(t)],c=[],u=0,h=l.range(W(r),Z(a),W(i),Z(n));ut&&(d+=v.numPoints||1)}if(d>=s){for(var x=u.x*p,_=u.y*p,b=o&&p>1?this._map(u,!0):null,w=(c<<5)+(t+1)+this.points.length,T=0,k=f;T1)for(var E=0,C=f;E>5},U.prototype._getOriginZoom=function(e){return(e-this.points.length)%32},U.prototype._map=function(e,t){if(e.numPoints)return t?$({},e.properties):e.properties;var r=this.points[e.index].properties,n=this.options.map(r);return t&&n===r?$({},n):n},ke.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},ke.prototype.splitTile=function(e,t,r,n,i,a,o){for(var s=[e,t,r,n],l=this.options,c=l.debug;s.length;){n=s.pop(),r=s.pop(),t=s.pop(),e=s.pop();var u=1<1&&console.time("creation"),f=this.tiles[h]=be(e,t,r,n,l),this.tileCoords.push({z:t,x:r,y:n}),c)){c>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",t,r,n,f.numFeatures,f.numPoints,f.numSimplified),console.timeEnd("creation"));var p="z"+t;this.stats[p]=(this.stats[p]||0)+1,this.total++}if(f.source=e,i){if(t===l.maxZoom||t===i)continue;var d=1<1&&console.time("clipping");var m,g,y,v,x,_,b=.5*l.buffer/l.extent,w=.5-b,T=.5+b,k=1+b;m=g=y=v=null,x=ce(e,u,r-b,r+T,0,f.minX,f.maxX,l),_=ce(e,u,r+w,r+k,0,f.minX,f.maxX,l),e=null,x&&(m=ce(x,u,n-b,n+T,1,f.minY,f.maxY,l),g=ce(x,u,n+w,n+k,1,f.minY,f.maxY,l),x=null),_&&(y=ce(_,u,n-b,n+T,1,f.minY,f.maxY,l),v=ce(_,u,n+w,n+k,1,f.minY,f.maxY,l),_=null),c>1&&console.timeEnd("clipping"),s.push(m||[],t+1,2*r,2*n),s.push(g||[],t+1,2*r,2*n+1),s.push(y||[],t+1,2*r+1,2*n),s.push(v||[],t+1,2*r+1,2*n+1)}}},ke.prototype.getTile=function(e,t,r){var n=this.options,i=n.extent,a=n.debug;if(e<0||e>24)return null;var o=1<1&&console.log("drilling down to z%d-%d-%d",e,t,r);for(var l,c=e,u=t,h=r;!l&&c>0;)c--,u=Math.floor(u/2),h=Math.floor(h/2),l=this.tiles[Ae(c,u,h)];return l&&l.source?(a>1&&console.log("found parent tile z%d-%d-%d",c,u,h),a>1&&console.time("drilling down"),this.splitTile(l.source,c,u,h,e,t,r),a>1&&console.timeEnd("drilling down"),this.tiles[s]?xe(this.tiles[s],i):null):null};var Se=function(t){function r(e,r,n,i){t.call(this,e,r,n,Me),i&&(this.loadGeoJSON=i)}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.loadData=function(e,t){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=t,this._pendingLoadDataParams=e,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},r.prototype._loadData=function(){var t=this;if(this._pendingCallback&&this._pendingLoadDataParams){var r=this._pendingCallback,n=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var i=!!(n&&n.request&&n.request.collectResourceTiming)&&new e.RequestPerformance(n.request);this.loadGeoJSON(n,(function(a,o){if(a||!o)return r(a);if("object"!=typeof o)return r(new Error("Input data given to '"+n.source+"' is not a valid GeoJSON object."));h(o,!0);try{if(n.filter){var s=e.createExpression(n.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===s.result)throw new Error(s.value.map((function(e){return e.key+": "+e.message})).join(", "));var l=o.features.filter((function(e){return s.value.evaluate({zoom:0},e)}));o={type:"FeatureCollection",features:l}}t._geoJSONIndex=n.cluster?new U(function(t){var r=t.superclusterOptions,n=t.clusterProperties;if(!n||!r)return r;for(var i={},a={},o={accumulated:null,zoom:0},s={properties:null},l=Object.keys(n),c=0,u=l;c=0?0:t.button},r.remove=function(e){e.parentNode&&e.parentNode.removeChild(e)};var f=function(t){function r(){t.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.RGBAImage({width:1,height:1}),this.dirty=!0}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.isLoaded=function(){return this.loaded},r.prototype.setLoaded=function(e){if(this.loaded!==e&&(this.loaded=e,e)){for(var t=0,r=this.requestors;t=0?1.2:1))}function y(e,t,r,n,i,a,o){for(var s=0;s65535)t(new Error("glyphs > 65535 not supported"));else if(a.ranges[s])t(null,{stack:r,id:i,glyph:o});else{var l=a.requests[s];l||(l=a.requests[s]=[],x.loadGlyphRange(r,s,n.url,n.requestManager,(function(e,t){if(t){for(var r in t)n._doesCharSupportLocalGlyph(+r)||(a.glyphs[+r]=t[+r]);a.ranges[s]=!0}for(var i=0,o=l;i1&&(l=e[++s]);var u=Math.abs(c-l.left),h=Math.abs(c-l.right),f=Math.min(u,h),p=void 0,d=i/r*(n+1);if(l.isDash){var m=n-Math.abs(d);p=Math.sqrt(f*f+m*m)}else p=n-Math.sqrt(f*f+d*d);this.data[o+c]=Math.max(0,Math.min(255,p+128))}},T.prototype.addRegularDash=function(e){for(var t=e.length-1;t>=0;--t){var r=e[t],n=e[t+1];r.zeroLength?e.splice(t,1):n&&n.isDash===r.isDash&&(n.left=r.left,e.splice(t,1))}var i=e[0],a=e[e.length-1];i.isDash===a.isDash&&(i.left=a.left-this.width,a.right=i.right+this.width);for(var o=this.width*this.nextRow,s=0,l=e[s],c=0;c1&&(l=e[++s]);var u=Math.abs(c-l.left),h=Math.abs(c-l.right),f=Math.min(u,h),p=l.isDash?f:-f;this.data[o+c]=Math.max(0,Math.min(255,p+128))}},T.prototype.addDash=function(t,r){var n=r?7:0,i=2*n+1;if(this.nextRow+i>this.height)return e.warnOnce("LineAtlas out of space"),null;for(var a=0,o=0;o=n&&t.x=i&&t.y0&&(l[new e.OverscaledTileID(t.overscaledZ,a,r.z,i,r.y-1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,t.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},l[new e.OverscaledTileID(t.overscaledZ,s,r.z,o,r.y-1).key]={backfilled:!1}),r.y+10&&(n.resourceTiming=t._resourceTiming,t._resourceTiming=[]),t.fire(new e.Event("data",n))}}))},r.prototype.onAdd=function(e){this.map=e,this.load()},r.prototype.setData=function(t){var r=this;return this._data=t,this.fire(new e.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(t){if(t)r.fire(new e.ErrorEvent(t));else{var n={dataType:"source",sourceDataType:"content"};r._collectResourceTiming&&r._resourceTiming&&r._resourceTiming.length>0&&(n.resourceTiming=r._resourceTiming,r._resourceTiming=[]),r.fire(new e.Event("data",n))}})),this},r.prototype.getClusterExpansionZoom=function(e,t){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:e,source:this.id},t),this},r.prototype.getClusterChildren=function(e,t){return this.actor.send("geojson.getClusterChildren",{clusterId:e,source:this.id},t),this},r.prototype.getClusterLeaves=function(e,t,r,n){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:e,limit:t,offset:r},n),this},r.prototype._updateWorkerData=function(t){var r=this;this._loaded=!1;var n=e.extend({},this.workerOptions),i=this._data;"string"==typeof i?(n.request=this.map._requestManager.transformRequest(e.browser.resolveURL(i),e.ResourceType.Source),n.request.collectResourceTiming=this._collectResourceTiming):n.data=JSON.stringify(i),this.actor.send(this.type+".loadData",n,(function(e,i){r._removed||i&&i.abandoned||(r._loaded=!0,i&&i.resourceTiming&&i.resourceTiming[r.id]&&(r._resourceTiming=i.resourceTiming[r.id].slice(0)),r.actor.send(r.type+".coalesce",{source:n.source},null),t(e))}))},r.prototype.loaded=function(){return this._loaded},r.prototype.loadTile=function(t,r){var n=this,i=t.actor?"reloadTile":"loadTile";t.actor=this.actor;var a={type:this.type,uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:e.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};t.request=this.actor.send(i,a,(function(e,a){return delete t.request,t.unloadVectorData(),t.aborted?r(null):e?r(e):(t.loadVectorData(a,n.map.painter,"reloadTile"===i),r(null))}))},r.prototype.abortTile=function(e){e.request&&(e.request.cancel(),delete e.request),e.aborted=!0},r.prototype.unloadTile=function(e){e.unloadVectorData(),this.actor.send("removeTile",{uid:e.uid,type:this.type,source:this.id})},r.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},r.prototype.serialize=function(){return e.extend({},this._options,{type:this.type,data:this._data})},r.prototype.hasTransition=function(){return!1},r}(e.Evented),L=e.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),P=function(t){function r(e,r,n,i){t.call(this),this.id=e,this.dispatcher=n,this.coordinates=r.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(i),this.options=r}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.load=function(t,r){var n=this;this._loaded=!1,this.fire(new e.Event("dataloading",{dataType:"source"})),this.url=this.options.url,e.getImage(this.map._requestManager.transformRequest(this.url,e.ResourceType.Image),(function(i,a){n._loaded=!0,i?n.fire(new e.ErrorEvent(i)):a&&(n.image=a,t&&(n.coordinates=t),r&&r(),n._finishLoading())}))},r.prototype.loaded=function(){return this._loaded},r.prototype.updateImage=function(e){var t=this;return this.image&&e.url?(this.options.url=e.url,this.load(e.coordinates,(function(){t.texture=null})),this):this},r.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.Event("data",{dataType:"source",sourceDataType:"metadata"})))},r.prototype.onAdd=function(e){this.map=e,this.load()},r.prototype.setCoordinates=function(t){var r=this;this.coordinates=t;var n=t.map(e.MercatorCoordinate.fromLngLat);this.tileID=function(t){for(var r=1/0,n=1/0,i=-1/0,a=-1/0,o=0,s=t;or.end(0)?this.fire(new e.ErrorEvent(new e.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+r.start(0)+" and "+r.end(0)+"-second mark."))):this.video.currentTime=t}},r.prototype.getVideo=function(){return this.video},r.prototype.onAdd=function(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},r.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var t=this.map.painter.context,r=t.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,L.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new e.Texture(t,this.video,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this.tiles){var i=this.tiles[n];"loaded"!==i.state&&(i.state="loaded",i.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this.video&&!this.video.paused},r}(P),D=function(t){function r(r,n,i,a){t.call(this,r,n,i,a),n.coordinates?(!Array.isArray(n.coordinates)||4!==n.coordinates.length||n.coordinates.some((function(e){return!Array.isArray(e)||2!==e.length||e.some((function(e){return"number"!=typeof e}))})))&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+r,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.ErrorEvent(new e.ValidationError("sources."+r,null,'missing required property "coordinates"'))),n.animate&&"boolean"!=typeof n.animate&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+r,null,'optional "animate" property must be a boolean value'))),n.canvas?"string"!=typeof n.canvas&&!(n.canvas instanceof e.window.HTMLCanvasElement)&&this.fire(new e.ErrorEvent(new e.ValidationError("sources."+r,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new e.ErrorEvent(new e.ValidationError("sources."+r,null,'missing required property "canvas"'))),this.options=n,this.animate=void 0===n.animate||n.animate}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof e.window.HTMLCanvasElement?this.options.canvas:e.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new e.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},r.prototype.getCanvas=function(){return this.canvas},r.prototype.onAdd=function(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()},r.prototype.onRemove=function(){this.pause()},r.prototype.prepare=function(){var t=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,t=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,t=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var r=this.map.painter.context,n=r.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=r.createVertexBuffer(this._boundsArray,L.members)),this.boundsSegments||(this.boundsSegments=e.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(t||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new e.Texture(r,this.canvas,n.RGBA,{premultiply:!0}),this.tiles){var a=this.tiles[i];"loaded"!==a.state&&(a.state="loaded",a.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this._playing},r.prototype._hasInvalidDimensions=function(){for(var e=0,t=[this.canvas.width,this.canvas.height];ethis.max){var o=this._getAndRemoveByKey(this.order[0]);o&&this.onRemove(o)}return this},j.prototype.has=function(e){return e.wrapped().key in this.data},j.prototype.getAndRemove=function(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null},j.prototype._getAndRemoveByKey=function(e){var t=this.data[e].shift();return t.timeout&&clearTimeout(t.timeout),0===this.data[e].length&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),t.value},j.prototype.getByKey=function(e){var t=this.data[e];return t?t[0].value:null},j.prototype.get=function(e){return this.has(e)?this.data[e.wrapped().key][0].value:null},j.prototype.remove=function(e,t){if(!this.has(e))return this;var r=e.wrapped().key,n=void 0===t?0:this.data[r].indexOf(t),i=this.data[r][n];return this.data[r].splice(n,1),i.timeout&&clearTimeout(i.timeout),0===this.data[r].length&&delete this.data[r],this.onRemove(i.value),this.order.splice(this.order.indexOf(r),1),this},j.prototype.setMaxSize=function(e){for(this.max=e;this.order.length>this.max;){var t=this._getAndRemoveByKey(this.order[0]);t&&this.onRemove(t)}return this},j.prototype.filter=function(e){var t=[];for(var r in this.data)for(var n=0,i=this.data[r];n1||(Math.abs(r)>1&&(1===Math.abs(r+i)?r+=i:1===Math.abs(r-i)&&(r-=i)),t.dem&&e.dem&&(e.dem.backfillBorder(t.dem,r,n),e.neighboringTiles&&e.neighboringTiles[a]&&(e.neighboringTiles[a].backfilled=!0)))}},r.prototype.getTile=function(e){return this.getTileByID(e.key)},r.prototype.getTileByID=function(e){return this._tiles[e]},r.prototype._retainLoadedChildren=function(e,t,r,n){for(var i in this._tiles){var a=this._tiles[i];if(!(n[i]||!a.hasData()||a.tileID.overscaledZ<=t||a.tileID.overscaledZ>r)){for(var o=a.tileID;a&&a.tileID.overscaledZ>t+1;){var s=a.tileID.scaledTo(a.tileID.overscaledZ-1);(a=this._tiles[s.key])&&a.hasData()&&(o=s)}for(var l=o;l.overscaledZ>t;)if(e[(l=l.scaledTo(l.overscaledZ-1)).key]){n[o.key]=o;break}}}},r.prototype.findLoadedParent=function(e,t){if(e.key in this._loadedParentTiles){var r=this._loadedParentTiles[e.key];return r&&r.tileID.overscaledZ>=t?r:null}for(var n=e.overscaledZ-1;n>=t;n--){var i=e.scaledTo(n),a=this._getLoadedTile(i);if(a)return a}},r.prototype._getLoadedTile=function(e){var t=this._tiles[e.key];return t&&t.hasData()?t:this._cache.getByKey(e.wrapped().key)},r.prototype.updateCacheSize=function(e){var t=(Math.ceil(e.width/this._source.tileSize)+1)*(Math.ceil(e.height/this._source.tileSize)+1),r=Math.floor(5*t),n="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,r):r;this._cache.setMaxSize(n)},r.prototype.handleWrapJump=function(e){var t=(e-(void 0===this._prevLng?e:this._prevLng))/360,r=Math.round(t);if(this._prevLng=e,r){var n={};for(var i in this._tiles){var a=this._tiles[i];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+r),n[a.tileID.key]=a}for(var o in this._tiles=n,this._timers)clearTimeout(this._timers[o]),delete this._timers[o];for(var s in this._tiles){var l=this._tiles[s];this._setTileReloadTimer(s,l)}}},r.prototype.update=function(t){var n=this;if(this.transform=t,this._sourceLoaded&&!this._paused){var i;this.updateCacheSize(t),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?i=t.getVisibleUnwrappedCoordinates(this._source.tileID).map((function(t){return new e.OverscaledTileID(t.canonical.z,t.wrap,t.canonical.z,t.canonical.x,t.canonical.y)})):(i=t.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(i=i.filter((function(e){return n._source.hasTile(e)})))):i=[];var a=t.coveringZoomLevel(this._source),o=Math.max(a-r.maxOverzooming,this._source.minzoom),s=Math.max(a+r.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(i,a);if(ze(this._source.type)){for(var c={},u={},h=0,f=Object.keys(l);hthis._source.maxzoom){var g=d.children(this._source.maxzoom)[0],y=this.getTile(g);if(y&&y.hasData()){n[g.key]=g;continue}}else{var v=d.children(this._source.maxzoom);if(n[v[0].key]&&n[v[1].key]&&n[v[2].key]&&n[v[3].key])continue}for(var x=m.wasRequested(),_=d.overscaledZ-1;_>=a;--_){var b=d.scaledTo(_);if(i[b.key]||(i[b.key]=!0,!(m=this.getTile(b))&&x&&(m=this._addTile(b)),m&&(n[b.key]=b,x=m.wasRequested(),m.hasData())))break}}}return n},r.prototype._updateLoadedParentTileCache=function(){for(var e in this._loadedParentTiles={},this._tiles){for(var t=[],r=void 0,n=this._tiles[e].tileID;n.overscaledZ>0;){if(n.key in this._loadedParentTiles){r=this._loadedParentTiles[n.key];break}t.push(n.key);var i=n.scaledTo(n.overscaledZ-1);if(r=this._getLoadedTile(i))break;n=i}for(var a=0,o=t;a0)&&(t.hasData()&&"reloading"!==t.state?this._cache.add(t.tileID,t,t.getExpiryTimeout()):(t.aborted=!0,this._abortTile(t),this._unloadTile(t))))},r.prototype.clearTiles=function(){for(var e in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(e);this._cache.reset()},r.prototype.tilesIn=function(t,r,n){var i=this,a=[],o=this.transform;if(!o)return a;for(var s=n?o.getCameraQueryGeometry(t):t,l=t.map((function(e){return o.pointCoordinate(e)})),c=s.map((function(e){return o.pointCoordinate(e)})),u=this.getIds(),h=1/0,f=1/0,p=-1/0,d=-1/0,m=0,g=c;m=0&&y[1].y+g>=0){var v=l.map((function(e){return s.getTilePoint(e)})),x=c.map((function(e){return s.getTilePoint(e)}));a.push({tile:n,tileID:s,queryGeometry:v,cameraQueryGeometry:x,scale:m})}}},x=0;x=e.browser.now())return!0}return!1},r.prototype.setFeatureState=function(e,t,r){e=e||"_geojsonTileLayer",this._state.updateState(e,t,r)},r.prototype.removeFeatureState=function(e,t,r){e=e||"_geojsonTileLayer",this._state.removeFeatureState(e,t,r)},r.prototype.getFeatureState=function(e,t){return e=e||"_geojsonTileLayer",this._state.getState(e,t)},r.prototype.setDependencies=function(e,t,r){var n=this._tiles[e];n&&n.setDependencies(t,r)},r.prototype.reloadTilesForDependencies=function(e,t){for(var r in this._tiles)this._tiles[r].hasDependency(e,t)&&this._reloadTile(r,"reloading");this._cache.filter((function(r){return!r.hasDependency(e,t)}))},r}(e.Evented);function Pe(e,t){var r=Math.abs(2*e.wrap)-+(e.wrap<0),n=Math.abs(2*t.wrap)-+(t.wrap<0);return e.overscaledZ-t.overscaledZ||n-r||t.canonical.y-e.canonical.y||t.canonical.x-e.canonical.x}function ze(e){return"raster"===e||"image"===e||"video"===e}function De(){return new e.window.Worker(na.workerUrl)}Le.maxOverzooming=10,Le.maxUnderzooming=3;var Oe="mapboxgl_preloaded_worker_pool",Re=function(){this.active={}};Re.prototype.acquire=function(e){if(!this.workers)for(this.workers=[];this.workers.length0?(i-o)/s:0;return this.points[a].mult(1-l).add(this.points[r].mult(l))};var Ke=function(e,t,r){var n=this.boxCells=[],i=this.circleCells=[];this.xCellCount=Math.ceil(e/r),this.yCellCount=Math.ceil(t/r);for(var a=0;a=-t[0]&&r<=t[0]&&n>=-t[1]&&n<=t[1]}function nt(t,r,n,i,a,o,s,l){var c=i?t.textSizeData:t.iconSizeData,u=e.evaluateSizeForZoom(c,n.transform.zoom),h=[256/n.width*2+1,256/n.height*2+1],f=i?t.text.dynamicLayoutVertexArray:t.icon.dynamicLayoutVertexArray;f.clear();for(var p=t.lineVertexArray,d=i?t.text.placedSymbolArray:t.icon.placedSymbolArray,m=n.transform.width/n.transform.height,g=!1,y=0;yMath.abs(n.x-r.x)*i?{useVertical:!0}:(t===e.WritingMode.vertical?r.yn.x)?{needsFlipping:!0}:null}function ot(t,r,n,i,a,o,s,l,c,u,h,f,p,d){var m,g=r/24,y=t.lineOffsetX*g,v=t.lineOffsetY*g;if(t.numGlyphs>1){var x=t.glyphStartIndex+t.numGlyphs,_=t.lineStartIndex,b=t.lineStartIndex+t.lineLength,w=it(g,l,y,v,n,h,f,t,c,o,p);if(!w)return{notEnoughRoom:!0};var T=et(w.first.point,s).point,k=et(w.last.point,s).point;if(i&&!n){var A=at(t.writingMode,T,k,d);if(A)return A}m=[w.first];for(var M=t.glyphStartIndex+1;M0?I.point:st(f,C,S,1,a),P=at(t.writingMode,S,L,d);if(P)return P}var z=lt(g*l.getoffsetX(t.glyphStartIndex),y,v,n,h,f,t.segment,t.lineStartIndex,t.lineStartIndex+t.lineLength,c,o,p);if(!z)return{notEnoughRoom:!0};m=[z]}for(var D=0,O=m;D0?1:-1,m=0;i&&(d*=-1,m=Math.PI),d<0&&(m+=Math.PI);for(var g=d>0?l+s:l+s+1,y=a,v=a,x=0,_=0,b=Math.abs(p),w=[];x+_<=b;){if((g+=d)=c)return null;if(v=y,w.push(y),void 0===(y=f[g])){var T=new e.Point(u.getx(g),u.gety(g)),k=et(T,h);if(k.signedDistanceFromCamera>0)y=f[g]=k.point;else{var A=g-d;y=st(0===x?o:new e.Point(u.getx(A),u.gety(A)),T,v,b-x+1,h)}}x+=_,_=v.dist(y)}var M=(b-x)/_,S=y.sub(v),E=S.mult(M)._add(v);E._add(S._unit()._perp()._mult(n*d));var C=m+Math.atan2(y.y-v.y,y.x-v.x);return w.push(E),{point:E,angle:C,path:w}}Ke.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Ke.prototype.insert=function(e,t,r,n,i){this._forEachCell(t,r,n,i,this._insertBoxCell,this.boxUid++),this.boxKeys.push(e),this.bboxes.push(t),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(i)},Ke.prototype.insertCircle=function(e,t,r,n){this._forEachCell(t-n,r-n,t+n,r+n,this._insertCircleCell,this.circleUid++),this.circleKeys.push(e),this.circles.push(t),this.circles.push(r),this.circles.push(n)},Ke.prototype._insertBoxCell=function(e,t,r,n,i,a){this.boxCells[i].push(a)},Ke.prototype._insertCircleCell=function(e,t,r,n,i,a){this.circleCells[i].push(a)},Ke.prototype._query=function(e,t,r,n,i,a){if(r<0||e>this.width||n<0||t>this.height)return!i&&[];var o=[];if(e<=0&&t<=0&&this.width<=r&&this.height<=n){if(i)return!0;for(var s=0;s0:o},Ke.prototype._queryCircle=function(e,t,r,n,i){var a=e-r,o=e+r,s=t-r,l=t+r;if(o<0||a>this.width||l<0||s>this.height)return!n&&[];var c=[],u={hitTest:n,circle:{x:e,y:t,radius:r},seenUids:{box:{},circle:{}}};return this._forEachCell(a,s,o,l,this._queryCellCircle,c,u,i),n?c.length>0:c},Ke.prototype.query=function(e,t,r,n,i){return this._query(e,t,r,n,!1,i)},Ke.prototype.hitTest=function(e,t,r,n,i){return this._query(e,t,r,n,!0,i)},Ke.prototype.hitTestCircle=function(e,t,r,n){return this._queryCircle(e,t,r,!0,n)},Ke.prototype._queryCell=function(e,t,r,n,i,a,o,s){var l=o.seenUids,c=this.boxCells[i];if(null!==c)for(var u=this.bboxes,h=0,f=c;h=u[d+0]&&n>=u[d+1]&&(!s||s(this.boxKeys[p]))){if(o.hitTest)return a.push(!0),!0;a.push({key:this.boxKeys[p],x1:u[d],y1:u[d+1],x2:u[d+2],y2:u[d+3]})}}}var m=this.circleCells[i];if(null!==m)for(var g=this.circles,y=0,v=m;yo*o+s*s},Ke.prototype._circleAndRectCollide=function(e,t,r,n,i,a,o){var s=(a-n)/2,l=Math.abs(e-(n+s));if(l>s+r)return!1;var c=(o-i)/2,u=Math.abs(t-(i+c));if(u>c+r)return!1;if(l<=s||u<=c)return!0;var h=l-s,f=u-c;return h*h+f*f<=r*r};var ct=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ut(e,t){for(var r=0;r=1;L--)I.push(E.path[L]);for(var P=1;P0){for(var R=I[0].clone(),F=I[0].clone(),B=1;B=A.x&&F.x<=M.x&&R.y>=A.y&&F.y<=M.y?[I]:F.xM.x||F.yM.y?[]:e.clipLine([I],A.x,A.y,M.x,M.y)}for(var j=0,N=O;j=this.screenRightBoundary||nthis.screenBottomBoundary},pt.prototype.isInsideGrid=function(e,t,r,n){return r>=0&&e=0&&t0?(this.prevPlacement&&this.prevPlacement.variableOffsets[h.crossTileID]&&this.prevPlacement.placements[h.crossTileID]&&this.prevPlacement.placements[h.crossTileID].text&&(m=this.prevPlacement.variableOffsets[h.crossTileID].anchor),this.variableOffsets[h.crossTileID]={textOffset:g,width:r,height:n,anchor:e,textBoxScale:i,prevAnchor:m},this.markUsedJustification(f,e,h,p),f.allowVerticalPlacement&&(this.markUsedOrientation(f,p,h),this.placedOrientations[h.crossTileID]=p),{shift:y,placedGlyphBoxes:v}):void 0},Tt.prototype.placeLayerBucketPart=function(t,r,n){var i=this,a=t.parameters,o=a.bucket,s=a.layout,l=a.posMatrix,c=a.textLabelPlaneMatrix,u=a.labelToScreenMatrix,h=a.textPixelRatio,f=a.holdingForFade,p=a.collisionBoxArray,d=a.partiallyEvaluatedTextSize,m=a.collisionGroup,g=s.get("text-optional"),y=s.get("icon-optional"),v=s.get("text-allow-overlap"),x=s.get("icon-allow-overlap"),_="map"===s.get("text-rotation-alignment"),b="map"===s.get("text-pitch-alignment"),w="none"!==s.get("icon-text-fit"),T="viewport-y"===s.get("symbol-z-order"),k=v&&(x||!o.hasIconData()||y),A=x&&(v||!o.hasTextData()||g);!o.collisionArrays&&p&&o.deserializeCollisionBoxes(p);var M=function(t,a){if(!r[t.crossTileID]){if(f)return void(i.placements[t.crossTileID]=new yt(!1,!1,!1));var p,T=!1,M=!1,S=!0,E=null,C={box:null,offscreen:null},I={box:null,offscreen:null},L=null,P=null,z=0,D=0,O=0;a.textFeatureIndex?z=a.textFeatureIndex:t.useRuntimeCollisionCircles&&(z=t.featureIndex),a.verticalTextFeatureIndex&&(D=a.verticalTextFeatureIndex);var R=a.textBox;if(R){var F=function(r){var n=e.WritingMode.horizontal;if(o.allowVerticalPlacement&&!r&&i.prevPlacement){var a=i.prevPlacement.placedOrientations[t.crossTileID];a&&(i.placedOrientations[t.crossTileID]=a,n=a,i.markUsedOrientation(o,n,t))}return n},B=function(r,n){if(o.allowVerticalPlacement&&t.numVerticalGlyphVertices>0&&a.verticalTextBox)for(var i=0,s=o.writingModes;i0&&(j=j.filter((function(e){return e!==N.anchor}))).unshift(N.anchor)}var U=function(e,r,n){for(var a=e.x2-e.x1,s=e.y2-e.y1,c=t.textBoxScale,u=w&&!x?r:null,f={box:[],offscreen:!1},p=v?2*j.length:j.length,d=0;d=j.length,k=i.attemptAnchorPlacement(g,e,a,s,c,_,b,h,l,m,y,t,o,n,u);if(k&&(f=k.placedGlyphBoxes)&&f.box&&f.box.length){T=!0,E=k.shift;break}}return f};B((function(){return U(R,a.iconBox,e.WritingMode.horizontal)}),(function(){var r=a.verticalTextBox,n=C&&C.box&&C.box.length;return o.allowVerticalPlacement&&!n&&t.numVerticalGlyphVertices>0&&r?U(r,a.verticalIconBox,e.WritingMode.vertical):{box:null,offscreen:null}})),C&&(T=C.box,S=C.offscreen);var V=F(C&&C.box);if(!T&&i.prevPlacement){var q=i.prevPlacement.variableOffsets[t.crossTileID];q&&(i.variableOffsets[t.crossTileID]=q,i.markUsedJustification(o,q.anchor,t,V))}}else{var H=function(e,r){var n=i.collisionIndex.placeCollisionBox(e,v,h,l,m.predicate);return n&&n.box&&n.box.length&&(i.markUsedOrientation(o,r,t),i.placedOrientations[t.crossTileID]=r),n};B((function(){return H(R,e.WritingMode.horizontal)}),(function(){var r=a.verticalTextBox;return o.allowVerticalPlacement&&t.numVerticalGlyphVertices>0&&r?H(r,e.WritingMode.vertical):{box:null,offscreen:null}})),F(C&&C.box&&C.box.length)}}if(T=(p=C)&&p.box&&p.box.length>0,S=p&&p.offscreen,t.useRuntimeCollisionCircles){var G=o.text.placedSymbolArray.get(t.centerJustifiedTextSymbolIndex),W=e.evaluateSizeForFeature(o.textSizeData,d,G),Z=s.get("text-padding"),Y=t.collisionCircleDiameter;L=i.collisionIndex.placeCollisionCircles(v,G,o.lineVertexArray,o.glyphOffsetArray,W,l,c,u,n,b,m.predicate,Y,Z),T=v||L.circles.length>0&&!L.collisionDetected,S=S&&L.offscreen}if(a.iconFeatureIndex&&(O=a.iconFeatureIndex),a.iconBox){var X=function(e){var t=w&&E?wt(e,E.x,E.y,_,b,i.transform.angle):e;return i.collisionIndex.placeCollisionBox(t,x,h,l,m.predicate)};M=I&&I.box&&I.box.length&&a.verticalIconBox?(P=X(a.verticalIconBox)).box.length>0:(P=X(a.iconBox)).box.length>0,S=S&&P.offscreen}var $=g||0===t.numHorizontalGlyphVertices&&0===t.numVerticalGlyphVertices,K=y||0===t.numIconVertices;if($||K?K?$||(M=M&&T):T=M&&T:M=T=M&&T,T&&p&&p.box&&(I&&I.box&&D?i.collisionIndex.insertCollisionBox(p.box,s.get("text-ignore-placement"),o.bucketInstanceId,D,m.ID):i.collisionIndex.insertCollisionBox(p.box,s.get("text-ignore-placement"),o.bucketInstanceId,z,m.ID)),M&&P&&i.collisionIndex.insertCollisionBox(P.box,s.get("icon-ignore-placement"),o.bucketInstanceId,O,m.ID),L&&(T&&i.collisionIndex.insertCollisionCircles(L.circles,s.get("text-ignore-placement"),o.bucketInstanceId,z,m.ID),n)){var J=o.bucketInstanceId,Q=i.collisionCircleArrays[J];void 0===Q&&(Q=i.collisionCircleArrays[J]=new vt);for(var ee=0;ee=0;--E){var C=S[E];M(o.symbolInstances.get(C),o.collisionArrays[C])}else for(var I=t.symbolInstanceStart;I=0&&(t.text.placedSymbolArray.get(c).crossTileID=a>=0&&c!==a?0:n.crossTileID)}},Tt.prototype.markUsedOrientation=function(t,r,n){for(var i=r===e.WritingMode.horizontal||r===e.WritingMode.horizontalOnly?r:0,a=r===e.WritingMode.vertical?r:0,o=0,s=[n.leftJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.rightJustifiedTextSymbolIndex];o0||l>0,x=a.numIconVertices>0,_=i.placedOrientations[a.crossTileID],b=_===e.WritingMode.vertical,w=_===e.WritingMode.horizontal||_===e.WritingMode.horizontalOnly;if(v){var T=Pt(y.text),k=b?zt:T;d(t.text,s,k);var A=w?zt:T;d(t.text,l,A);var M=y.text.isHidden();[a.rightJustifiedTextSymbolIndex,a.centerJustifiedTextSymbolIndex,a.leftJustifiedTextSymbolIndex].forEach((function(e){e>=0&&(t.text.placedSymbolArray.get(e).hidden=M||b?1:0)})),a.verticalPlacedTextSymbolIndex>=0&&(t.text.placedSymbolArray.get(a.verticalPlacedTextSymbolIndex).hidden=M||w?1:0);var S=i.variableOffsets[a.crossTileID];S&&i.markUsedJustification(t,S.anchor,a,_);var E=i.placedOrientations[a.crossTileID];E&&(i.markUsedJustification(t,"left",a,E),i.markUsedOrientation(t,E,a))}if(x){var C=Pt(y.icon),I=!(f&&a.verticalPlacedIconSymbolIndex&&b);if(a.placedIconSymbolIndex>=0){var L=I?C:zt;d(t.icon,a.numIconVertices,L),t.icon.placedSymbolArray.get(a.placedIconSymbolIndex).hidden=y.icon.isHidden()}if(a.verticalPlacedIconSymbolIndex>=0){var P=I?zt:C;d(t.icon,a.numVerticalIconVertices,P),t.icon.placedSymbolArray.get(a.verticalPlacedIconSymbolIndex).hidden=y.icon.isHidden()}}if(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData()){var z=t.collisionArrays[n];if(z){var D=new e.Point(0,0);if(z.textBox||z.verticalTextBox){var O=!0;if(c){var R=i.variableOffsets[m];R?(D=bt(R.anchor,R.width,R.height,R.textOffset,R.textBoxScale),u&&D._rotate(h?i.transform.angle:-i.transform.angle)):O=!1}z.textBox&&kt(t.textCollisionBox.collisionVertexArray,y.text.placed,!O||b,D.x,D.y),z.verticalTextBox&&kt(t.textCollisionBox.collisionVertexArray,y.text.placed,!O||w,D.x,D.y)}var F=!(w||!z.verticalIconBox);z.iconBox&&kt(t.iconCollisionBox.collisionVertexArray,y.icon.placed,F,f?D.x:0,f?D.y:0),z.verticalIconBox&&kt(t.iconCollisionBox.collisionVertexArray,y.icon.placed,!F,f?D.x:0,f?D.y:0)}}},g=0;ge},Tt.prototype.setStale=function(){this.stale=!0};var At=Math.pow(2,25),Mt=Math.pow(2,24),St=Math.pow(2,17),Et=Math.pow(2,16),Ct=Math.pow(2,9),It=Math.pow(2,8),Lt=Math.pow(2,1);function Pt(e){if(0===e.opacity&&!e.placed)return 0;if(1===e.opacity&&e.placed)return 4294967295;var t=e.placed?1:0,r=Math.floor(127*e.opacity);return r*At+t*Mt+r*St+t*Et+r*Ct+t*It+r*Lt+t}var zt=0,Dt=function(e){this._sortAcrossTiles="viewport-y"!==e.layout.get("symbol-z-order")&&void 0!==e.layout.get("symbol-sort-key").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Dt.prototype.continuePlacement=function(e,t,r,n,i){for(var a=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var s=r[t[this._currentPlacementIndex]],l=this.placement.collisionIndex.transform.zoom;if("symbol"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(this._inProgressLayer||(this._inProgressLayer=new Dt(s)),this._inProgressLayer.continuePlacement(n[s.source],this.placement,this._showCollisionBoxes,s,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Ot.prototype.commit=function(e){return this.placement.commit(e),this.placement};var Rt=512/e.EXTENT/2,Ft=function(e,t,r){this.tileID=e,this.indexedSymbolInstances={},this.bucketInstanceId=r;for(var n=0;ne.overscaledZ)for(var s in o){var l=o[s];l.tileID.isChildOf(e)&&l.findMatches(t.symbolInstances,e,i)}else{var c=o[e.scaledTo(Number(a)).key];c&&c.findMatches(t.symbolInstances,e,i)}}for(var u=0;u1?"@2x":"",l=e.getJSON(r.transformRequest(r.normalizeSpriteURL(t,s,".json"),e.ResourceType.SpriteJSON),(function(e,t){l=null,o||(o=e,i=t,u())})),c=e.getImage(r.transformRequest(r.normalizeSpriteURL(t,s,".png"),e.ResourceType.SpriteImage),(function(e,t){c=null,o||(o=e,a=t,u())}));function u(){if(o)n(o);else if(i&&a){var t=e.browser.getImageData(a),r={};for(var s in i){var l=i[s],c=l.width,u=l.height,h=l.x,f=l.y,p=l.sdf,d=l.pixelRatio,m=l.stretchX,g=l.stretchY,y=l.content,v=new e.RGBAImage({width:c,height:u});e.RGBAImage.copy(t,v,{x:h,y:f},{x:0,y:0},{width:c,height:u}),r[s]={data:v,pixelRatio:d,sdf:p,stretchX:m,stretchY:g,content:y}}n(null,r)}}return{cancel:function(){l&&(l.cancel(),l=null),c&&(c.cancel(),c=null)}}}(t,this.map._requestManager,(function(t,n){if(r._spriteRequest=null,t)r.fire(new e.ErrorEvent(t));else if(n)for(var i in n)r.imageManager.addImage(i,n[i]);r.imageManager.setLoaded(!0),r._availableImages=r.imageManager.listImages(),r.dispatcher.broadcast("setImages",r._availableImages),r.fire(new e.Event("data",{dataType:"style"}))}))},r.prototype._validateLayer=function(t){var r=this.sourceCaches[t.source];if(r){var n=t.sourceLayer;if(n){var i=r.getSource();("geojson"===i.type||i.vectorLayerIds&&-1===i.vectorLayerIds.indexOf(n))&&this.fire(new e.ErrorEvent(new Error('Source layer "'+n+'" does not exist on source "'+i.id+'" as specified by style layer "'+t.id+'"')))}}},r.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var e in this.sourceCaches)if(!this.sourceCaches[e].loaded())return!1;return!!this.imageManager.isLoaded()},r.prototype._serializeLayers=function(e){for(var t=[],r=0,n=e;r0)throw new Error("Unimplemented: "+i.map((function(e){return e.command})).join(", ")+".");return n.forEach((function(e){"setTransition"!==e.command&&r[e.command].apply(r,e.args)})),this.stylesheet=t,!0},r.prototype.addImage=function(t,r){if(this.getImage(t))return this.fire(new e.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(t,r),this._afterImageUpdated(t)},r.prototype.updateImage=function(e,t){this.imageManager.updateImage(e,t)},r.prototype.getImage=function(e){return this.imageManager.getImage(e)},r.prototype.removeImage=function(t){if(!this.getImage(t))return this.fire(new e.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(t),this._afterImageUpdated(t)},r.prototype._afterImageUpdated=function(t){this._availableImages=this.imageManager.listImages(),this._changedImages[t]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new e.Event("data",{dataType:"style"}))},r.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},r.prototype.addSource=function(t,r,n){var i=this;if(void 0===n&&(n={}),this._checkLoaded(),void 0!==this.sourceCaches[t])throw new Error("There is already a source with this ID");if(!r.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(r).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(r.type)>=0&&this._validate(e.validateStyle.source,"sources."+t,r,null,n))){this.map&&this.map._collectResourceTiming&&(r.collectResourceTiming=!0);var a=this.sourceCaches[t]=new Le(t,r,this.dispatcher);a.style=this,a.setEventedParent(this,(function(){return{isSourceLoaded:i.loaded(),source:a.serialize(),sourceId:t}})),a.onAdd(this.map),this._changed=!0}},r.prototype.removeSource=function(t){if(this._checkLoaded(),void 0===this.sourceCaches[t])throw new Error("There is no source with this ID");for(var r in this._layers)if(this._layers[r].source===t)return this.fire(new e.ErrorEvent(new Error('Source "'+t+'" cannot be removed while layer "'+r+'" is using it.')));var n=this.sourceCaches[t];delete this.sourceCaches[t],delete this._updatedSources[t],n.fire(new e.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:t})),n.setEventedParent(null),n.clearTiles(),n.onRemove&&n.onRemove(this.map),this._changed=!0},r.prototype.setGeoJSONSourceData=function(e,t){this._checkLoaded(),this.sourceCaches[e].getSource().setData(t),this._changed=!0},r.prototype.getSource=function(e){return this.sourceCaches[e]&&this.sourceCaches[e].getSource()},r.prototype.addLayer=function(t,r,n){void 0===n&&(n={}),this._checkLoaded();var i=t.id;if(this.getLayer(i))this.fire(new e.ErrorEvent(new Error('Layer with id "'+i+'" already exists on this map')));else{var a;if("custom"===t.type){if(Ut(this,e.validateCustomStyleLayer(t)))return;a=e.createStyleLayer(t)}else{if("object"==typeof t.source&&(this.addSource(i,t.source),t=e.clone$1(t),t=e.extend(t,{source:i})),this._validate(e.validateStyle.layer,"layers."+i,t,{arrayIndex:-1},n))return;a=e.createStyleLayer(t),this._validateLayer(a),a.setEventedParent(this,{layer:{id:i}}),this._serializedLayers[a.id]=a.serialize()}var o=r?this._order.indexOf(r):this._order.length;if(r&&-1===o)this.fire(new e.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.')));else{if(this._order.splice(o,0,i),this._layerOrderChanged=!0,this._layers[i]=a,this._removedLayers[i]&&a.source&&"custom"!==a.type){var s=this._removedLayers[i];delete this._removedLayers[i],s.type!==a.type?this._updatedSources[a.source]="clear":(this._updatedSources[a.source]="reload",this.sourceCaches[a.source].pause())}this._updateLayer(a),a.onAdd&&a.onAdd(this.map)}}},r.prototype.moveLayer=function(t,r){if(this._checkLoaded(),this._changed=!0,this._layers[t]){if(t!==r){var n=this._order.indexOf(t);this._order.splice(n,1);var i=r?this._order.indexOf(r):this._order.length;if(r&&-1===i)return void this.fire(new e.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.')));this._order.splice(i,0,t),this._layerOrderChanged=!0}}else this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be moved.")))},r.prototype.removeLayer=function(t){this._checkLoaded();var r=this._layers[t];if(r){r.setEventedParent(null);var n=this._order.indexOf(t);this._order.splice(n,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[t]=r,delete this._layers[t],delete this._serializedLayers[t],delete this._updatedLayers[t],delete this._updatedPaintProps[t],r.onRemove&&r.onRemove(this.map)}else this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be removed.")))},r.prototype.getLayer=function(e){return this._layers[e]},r.prototype.hasLayer=function(e){return e in this._layers},r.prototype.setLayerZoomRange=function(t,r,n){this._checkLoaded();var i=this.getLayer(t);i?i.minzoom===r&&i.maxzoom===n||(null!=r&&(i.minzoom=r),null!=n&&(i.maxzoom=n),this._updateLayer(i)):this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot have zoom extent.")))},r.prototype.setFilter=function(t,r,n){void 0===n&&(n={}),this._checkLoaded();var i=this.getLayer(t);if(i){if(!e.deepEqual(i.filter,r)){if(null==r)return i.filter=void 0,void this._updateLayer(i);this._validate(e.validateStyle.filter,"layers."+i.id+".filter",r,null,n)||(i.filter=e.clone$1(r),this._updateLayer(i))}}else this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be filtered.")))},r.prototype.getFilter=function(t){return e.clone$1(this.getLayer(t).filter)},r.prototype.setLayoutProperty=function(t,r,n,i){void 0===i&&(i={}),this._checkLoaded();var a=this.getLayer(t);a?e.deepEqual(a.getLayoutProperty(r),n)||(a.setLayoutProperty(r,n,i),this._updateLayer(a)):this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getLayoutProperty=function(t,r){var n=this.getLayer(t);if(n)return n.getLayoutProperty(r);this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style.")))},r.prototype.setPaintProperty=function(t,r,n,i){void 0===i&&(i={}),this._checkLoaded();var a=this.getLayer(t);a?e.deepEqual(a.getPaintProperty(r),n)||(a.setPaintProperty(r,n,i)&&this._updateLayer(a),this._changed=!0,this._updatedPaintProps[t]=!0):this.fire(new e.ErrorEvent(new Error("The layer '"+t+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getPaintProperty=function(e,t){return this.getLayer(e).getPaintProperty(t)},r.prototype.setFeatureState=function(t,r){this._checkLoaded();var n=t.source,i=t.sourceLayer,a=this.sourceCaches[n];if(void 0!==a){var o=a.getSource().type;"geojson"===o&&i?this.fire(new e.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==o||i?(void 0===t.id&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),a.setFeatureState(i,t.id,r)):this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},r.prototype.removeFeatureState=function(t,r){this._checkLoaded();var n=t.source,i=this.sourceCaches[n];if(void 0!==i){var a=i.getSource().type,o="vector"===a?t.sourceLayer:void 0;"vector"!==a||o?r&&"string"!=typeof t.id&&"number"!=typeof t.id?this.fire(new e.ErrorEvent(new Error("A feature id is required to remove its specific state property."))):i.removeFeatureState(o,t.id,r):this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},r.prototype.getFeatureState=function(t){this._checkLoaded();var r=t.source,n=t.sourceLayer,i=this.sourceCaches[r];if(void 0!==i){if("vector"!==i.getSource().type||n)return void 0===t.id&&this.fire(new e.ErrorEvent(new Error("The feature id parameter must be provided."))),i.getFeatureState(n,t.id);this.fire(new e.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new e.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},r.prototype.getTransition=function(){return e.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},r.prototype.serialize=function(){return e.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:e.mapObject(this.sourceCaches,(function(e){return e.serialize()})),layers:this._serializeLayers(this._order)},(function(e){return void 0!==e}))},r.prototype._updateLayer=function(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&"raster"!==this.sourceCaches[e.source].getSource().type&&(this._updatedSources[e.source]="reload",this.sourceCaches[e.source].pause()),this._changed=!0},r.prototype._flattenAndSortRenderedFeatures=function(e){for(var t=this,r=function(e){return"fill-extrusion"===t._layers[e].type},n={},i=[],a=this._order.length-1;a>=0;a--){var o=this._order[a];if(r(o)){n[o]=a;for(var s=0,l=e;s=0;d--){var m=this._order[d];if(r(m))for(var g=i.length-1;g>=0;g--){var y=i[g].feature;if(n[y.layer.id] 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),tr=xr("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),rr=xr("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}"),nr=xr("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_FragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);}"),ir=xr("varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),ar=xr("uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),or=xr("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}"),sr=xr("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}"),lr=xr("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}"),cr=xr("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),ur=xr("uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\n#define PI 3.141592653589793\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),hr=xr("uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),fr=xr("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),pr=xr("uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}"),dr=xr("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}"),mr=xr("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),gr=xr("uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}"),yr=xr("#define SDF_PX 8.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}"),vr=xr("#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}");function xr(e,t){var r=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,n=t.match(/attribute ([\w]+) ([\w]+)/g),i=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),a=t.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),o=a?a.concat(i):i,s={};return{fragmentSource:e=e.replace(r,(function(e,t,r,n,i){return s[i]=!0,"define"===t?"\n#ifndef HAS_UNIFORM_u_"+i+"\nvarying "+r+" "+n+" "+i+";\n#else\nuniform "+r+" "+n+" u_"+i+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+i+"\n "+r+" "+n+" "+i+" = u_"+i+";\n#endif\n"})),vertexSource:t=t.replace(r,(function(e,t,r,n,i){var a="float"===n?"vec2":"vec4",o=i.match(/color/)?"color":a;return s[i]?"define"===t?"\n#ifndef HAS_UNIFORM_u_"+i+"\nuniform lowp float u_"+i+"_t;\nattribute "+r+" "+a+" a_"+i+";\nvarying "+r+" "+n+" "+i+";\n#else\nuniform "+r+" "+n+" u_"+i+";\n#endif\n":"vec4"===o?"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+i+" = a_"+i+";\n#else\n "+r+" "+n+" "+i+" = u_"+i+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+i+" = unpack_mix_"+o+"(a_"+i+", u_"+i+"_t);\n#else\n "+r+" "+n+" "+i+" = u_"+i+";\n#endif\n":"define"===t?"\n#ifndef HAS_UNIFORM_u_"+i+"\nuniform lowp float u_"+i+"_t;\nattribute "+r+" "+a+" a_"+i+";\n#else\nuniform "+r+" "+n+" u_"+i+";\n#endif\n":"vec4"===o?"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+r+" "+n+" "+i+" = a_"+i+";\n#else\n "+r+" "+n+" "+i+" = u_"+i+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+i+"\n "+r+" "+n+" "+i+" = unpack_mix_"+o+"(a_"+i+", u_"+i+"_t);\n#else\n "+r+" "+n+" "+i+" = u_"+i+";\n#endif\n"})),staticAttributes:n,staticUniforms:o}}var _r=Object.freeze({__proto__:null,prelude:Zt,background:Yt,backgroundPattern:Xt,circle:$t,clippingMask:Kt,heatmap:Jt,heatmapTexture:Qt,collisionBox:er,collisionCircle:tr,debug:rr,fill:nr,fillOutline:ir,fillOutlinePattern:ar,fillPattern:or,fillExtrusion:sr,fillExtrusionPattern:lr,hillshadePrepare:cr,hillshade:ur,line:hr,lineGradient:fr,linePattern:pr,lineSDF:dr,raster:mr,symbolIcon:gr,symbolSDF:yr,symbolTextAndIcon:vr}),br=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};function wr(e){for(var t=[],r=0;r>16,s>>16],u_pixel_coord_lower:[65535&o,65535&s]}}Tr.prototype.draw=function(e,t,r,n,i,a,o,s,l,c,u,h,f,p,d,m){var g,y=e.gl;if(!this.failedToCreate){for(var v in e.program.set(this.program),e.setDepthMode(r),e.setStencilMode(n),e.setColorMode(i),e.setCullFace(a),this.fixedUniforms)this.fixedUniforms[v].set(o[v]);p&&p.setUniforms(e,this.binderUniforms,h,{zoom:f});for(var x=(g={},g[y.LINES]=2,g[y.TRIANGLES]=3,g[y.LINE_STRIP]=1,g)[t],_=0,b=u.get();_0?1/(1-e):1+e}function Zr(e){return e>0?1-1/(1.001-e):-e}var Yr,Xr=function(e,t,r,n,i,a,o,s,l,c){var u=i.transform;return{u_is_size_zoom_constant:+("constant"===e||"source"===e),u_is_size_feature_constant:+("constant"===e||"camera"===e),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:u.cameraToCenterDistance,u_pitch:u.pitch/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:u.width/u.height,u_fade_change:i.options.fadeDuration?i.symbolFadeChange:1,u_matrix:a,u_label_plane_matrix:o,u_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+n,u_texsize:c,u_texture:0}},$r=function(t,r,n,i,a,o,s,l,c,u,h){var f=a.transform;return e.extend(Xr(t,r,n,i,a,o,s,l,c,u),{u_gamma_scale:i?Math.cos(f._pitch)*f.cameraToCenterDistance:1,u_device_pixel_ratio:e.browser.devicePixelRatio,u_is_halo:+h})},Kr=function(t,r,n,i,a,o,s,l,c,u){return e.extend($r(t,r,n,i,a,o,s,l,!0,c,!0),{u_texsize_icon:u,u_texture_icon:1})},Jr=function(e,t,r){return{u_matrix:e,u_opacity:t,u_color:r}},Qr=function(t,r,n,i,a,o){return e.extend(function(e,t,r,n){var i=r.imageManager.getPattern(e.from.toString()),a=r.imageManager.getPattern(e.to.toString()),o=r.imageManager.getPixelSize(),s=o.width,l=o.height,c=Math.pow(2,n.tileID.overscaledZ),u=n.tileSize*Math.pow(2,r.transform.tileZoom)/c,h=u*(n.tileID.canonical.x+n.tileID.wrap*c),f=u*n.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:i.tl,u_pattern_br_a:i.br,u_pattern_tl_b:a.tl,u_pattern_br_b:a.br,u_texsize:[s,l],u_mix:t.t,u_pattern_size_a:i.displaySize,u_pattern_size_b:a.displaySize,u_scale_a:t.fromScale,u_scale_b:t.toScale,u_tile_units_to_pixels:1/dt(n,1,r.transform.tileZoom),u_pixel_coord_upper:[h>>16,f>>16],u_pixel_coord_lower:[65535&h,65535&f]}}(i,o,n,a),{u_matrix:t,u_opacity:r})},en={fillExtrusion:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_lightpos:new e.Uniform3f(t,r.u_lightpos),u_lightintensity:new e.Uniform1f(t,r.u_lightintensity),u_lightcolor:new e.Uniform3f(t,r.u_lightcolor),u_vertical_gradient:new e.Uniform1f(t,r.u_vertical_gradient),u_opacity:new e.Uniform1f(t,r.u_opacity)}},fillExtrusionPattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_lightpos:new e.Uniform3f(t,r.u_lightpos),u_lightintensity:new e.Uniform1f(t,r.u_lightintensity),u_lightcolor:new e.Uniform3f(t,r.u_lightcolor),u_vertical_gradient:new e.Uniform1f(t,r.u_vertical_gradient),u_height_factor:new e.Uniform1f(t,r.u_height_factor),u_image:new e.Uniform1i(t,r.u_image),u_texsize:new e.Uniform2f(t,r.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,r.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,r.u_pixel_coord_lower),u_scale:new e.Uniform3f(t,r.u_scale),u_fade:new e.Uniform1f(t,r.u_fade),u_opacity:new e.Uniform1f(t,r.u_opacity)}},fill:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix)}},fillPattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_image:new e.Uniform1i(t,r.u_image),u_texsize:new e.Uniform2f(t,r.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,r.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,r.u_pixel_coord_lower),u_scale:new e.Uniform3f(t,r.u_scale),u_fade:new e.Uniform1f(t,r.u_fade)}},fillOutline:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_world:new e.Uniform2f(t,r.u_world)}},fillOutlinePattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_world:new e.Uniform2f(t,r.u_world),u_image:new e.Uniform1i(t,r.u_image),u_texsize:new e.Uniform2f(t,r.u_texsize),u_pixel_coord_upper:new e.Uniform2f(t,r.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,r.u_pixel_coord_lower),u_scale:new e.Uniform3f(t,r.u_scale),u_fade:new e.Uniform1f(t,r.u_fade)}},circle:function(t,r){return{u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_scale_with_map:new e.Uniform1i(t,r.u_scale_with_map),u_pitch_with_map:new e.Uniform1i(t,r.u_pitch_with_map),u_extrude_scale:new e.Uniform2f(t,r.u_extrude_scale),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_matrix:new e.UniformMatrix4f(t,r.u_matrix)}},collisionBox:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_pixels_to_tile_units:new e.Uniform1f(t,r.u_pixels_to_tile_units),u_extrude_scale:new e.Uniform2f(t,r.u_extrude_scale),u_overscale_factor:new e.Uniform1f(t,r.u_overscale_factor)}},collisionCircle:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_inv_matrix:new e.UniformMatrix4f(t,r.u_inv_matrix),u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_viewport_size:new e.Uniform2f(t,r.u_viewport_size)}},debug:function(t,r){return{u_color:new e.UniformColor(t,r.u_color),u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_overlay:new e.Uniform1i(t,r.u_overlay),u_overlay_scale:new e.Uniform1f(t,r.u_overlay_scale)}},clippingMask:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix)}},heatmap:function(t,r){return{u_extrude_scale:new e.Uniform1f(t,r.u_extrude_scale),u_intensity:new e.Uniform1f(t,r.u_intensity),u_matrix:new e.UniformMatrix4f(t,r.u_matrix)}},heatmapTexture:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_world:new e.Uniform2f(t,r.u_world),u_image:new e.Uniform1i(t,r.u_image),u_color_ramp:new e.Uniform1i(t,r.u_color_ramp),u_opacity:new e.Uniform1f(t,r.u_opacity)}},hillshade:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_image:new e.Uniform1i(t,r.u_image),u_latrange:new e.Uniform2f(t,r.u_latrange),u_light:new e.Uniform2f(t,r.u_light),u_shadow:new e.UniformColor(t,r.u_shadow),u_highlight:new e.UniformColor(t,r.u_highlight),u_accent:new e.UniformColor(t,r.u_accent)}},hillshadePrepare:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_image:new e.Uniform1i(t,r.u_image),u_dimension:new e.Uniform2f(t,r.u_dimension),u_zoom:new e.Uniform1f(t,r.u_zoom),u_unpack:new e.Uniform4f(t,r.u_unpack)}},line:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_ratio:new e.Uniform1f(t,r.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,r.u_units_to_pixels)}},lineGradient:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_ratio:new e.Uniform1f(t,r.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,r.u_units_to_pixels),u_image:new e.Uniform1i(t,r.u_image),u_image_height:new e.Uniform1f(t,r.u_image_height)}},linePattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_texsize:new e.Uniform2f(t,r.u_texsize),u_ratio:new e.Uniform1f(t,r.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_image:new e.Uniform1i(t,r.u_image),u_units_to_pixels:new e.Uniform2f(t,r.u_units_to_pixels),u_scale:new e.Uniform3f(t,r.u_scale),u_fade:new e.Uniform1f(t,r.u_fade)}},lineSDF:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_ratio:new e.Uniform1f(t,r.u_ratio),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_units_to_pixels:new e.Uniform2f(t,r.u_units_to_pixels),u_patternscale_a:new e.Uniform2f(t,r.u_patternscale_a),u_patternscale_b:new e.Uniform2f(t,r.u_patternscale_b),u_sdfgamma:new e.Uniform1f(t,r.u_sdfgamma),u_image:new e.Uniform1i(t,r.u_image),u_tex_y_a:new e.Uniform1f(t,r.u_tex_y_a),u_tex_y_b:new e.Uniform1f(t,r.u_tex_y_b),u_mix:new e.Uniform1f(t,r.u_mix)}},raster:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_tl_parent:new e.Uniform2f(t,r.u_tl_parent),u_scale_parent:new e.Uniform1f(t,r.u_scale_parent),u_buffer_scale:new e.Uniform1f(t,r.u_buffer_scale),u_fade_t:new e.Uniform1f(t,r.u_fade_t),u_opacity:new e.Uniform1f(t,r.u_opacity),u_image0:new e.Uniform1i(t,r.u_image0),u_image1:new e.Uniform1i(t,r.u_image1),u_brightness_low:new e.Uniform1f(t,r.u_brightness_low),u_brightness_high:new e.Uniform1f(t,r.u_brightness_high),u_saturation_factor:new e.Uniform1f(t,r.u_saturation_factor),u_contrast_factor:new e.Uniform1f(t,r.u_contrast_factor),u_spin_weights:new e.Uniform3f(t,r.u_spin_weights)}},symbolIcon:function(t,r){return{u_is_size_zoom_constant:new e.Uniform1i(t,r.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,r.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,r.u_size_t),u_size:new e.Uniform1f(t,r.u_size),u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,r.u_pitch),u_rotate_symbol:new e.Uniform1i(t,r.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,r.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,r.u_fade_change),u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,r.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,r.u_coord_matrix),u_is_text:new e.Uniform1i(t,r.u_is_text),u_pitch_with_map:new e.Uniform1i(t,r.u_pitch_with_map),u_texsize:new e.Uniform2f(t,r.u_texsize),u_texture:new e.Uniform1i(t,r.u_texture)}},symbolSDF:function(t,r){return{u_is_size_zoom_constant:new e.Uniform1i(t,r.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,r.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,r.u_size_t),u_size:new e.Uniform1f(t,r.u_size),u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,r.u_pitch),u_rotate_symbol:new e.Uniform1i(t,r.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,r.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,r.u_fade_change),u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,r.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,r.u_coord_matrix),u_is_text:new e.Uniform1i(t,r.u_is_text),u_pitch_with_map:new e.Uniform1i(t,r.u_pitch_with_map),u_texsize:new e.Uniform2f(t,r.u_texsize),u_texture:new e.Uniform1i(t,r.u_texture),u_gamma_scale:new e.Uniform1f(t,r.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(t,r.u_is_halo)}},symbolTextAndIcon:function(t,r){return{u_is_size_zoom_constant:new e.Uniform1i(t,r.u_is_size_zoom_constant),u_is_size_feature_constant:new e.Uniform1i(t,r.u_is_size_feature_constant),u_size_t:new e.Uniform1f(t,r.u_size_t),u_size:new e.Uniform1f(t,r.u_size),u_camera_to_center_distance:new e.Uniform1f(t,r.u_camera_to_center_distance),u_pitch:new e.Uniform1f(t,r.u_pitch),u_rotate_symbol:new e.Uniform1i(t,r.u_rotate_symbol),u_aspect_ratio:new e.Uniform1f(t,r.u_aspect_ratio),u_fade_change:new e.Uniform1f(t,r.u_fade_change),u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_label_plane_matrix:new e.UniformMatrix4f(t,r.u_label_plane_matrix),u_coord_matrix:new e.UniformMatrix4f(t,r.u_coord_matrix),u_is_text:new e.Uniform1i(t,r.u_is_text),u_pitch_with_map:new e.Uniform1i(t,r.u_pitch_with_map),u_texsize:new e.Uniform2f(t,r.u_texsize),u_texsize_icon:new e.Uniform2f(t,r.u_texsize_icon),u_texture:new e.Uniform1i(t,r.u_texture),u_texture_icon:new e.Uniform1i(t,r.u_texture_icon),u_gamma_scale:new e.Uniform1f(t,r.u_gamma_scale),u_device_pixel_ratio:new e.Uniform1f(t,r.u_device_pixel_ratio),u_is_halo:new e.Uniform1i(t,r.u_is_halo)}},background:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_opacity:new e.Uniform1f(t,r.u_opacity),u_color:new e.UniformColor(t,r.u_color)}},backgroundPattern:function(t,r){return{u_matrix:new e.UniformMatrix4f(t,r.u_matrix),u_opacity:new e.Uniform1f(t,r.u_opacity),u_image:new e.Uniform1i(t,r.u_image),u_pattern_tl_a:new e.Uniform2f(t,r.u_pattern_tl_a),u_pattern_br_a:new e.Uniform2f(t,r.u_pattern_br_a),u_pattern_tl_b:new e.Uniform2f(t,r.u_pattern_tl_b),u_pattern_br_b:new e.Uniform2f(t,r.u_pattern_br_b),u_texsize:new e.Uniform2f(t,r.u_texsize),u_mix:new e.Uniform1f(t,r.u_mix),u_pattern_size_a:new e.Uniform2f(t,r.u_pattern_size_a),u_pattern_size_b:new e.Uniform2f(t,r.u_pattern_size_b),u_scale_a:new e.Uniform1f(t,r.u_scale_a),u_scale_b:new e.Uniform1f(t,r.u_scale_b),u_pixel_coord_upper:new e.Uniform2f(t,r.u_pixel_coord_upper),u_pixel_coord_lower:new e.Uniform2f(t,r.u_pixel_coord_lower),u_tile_units_to_pixels:new e.Uniform1f(t,r.u_tile_units_to_pixels)}}};function tn(t,r,n,i,a,o,s){for(var l=t.context,c=l.gl,u=t.useProgram("collisionBox"),h=[],f=0,p=0,d=0;d0){var b=e.create(),w=v;e.mul(b,y.placementInvProjMatrix,t.transform.glCoordMatrix),e.mul(b,b,y.placementViewportMatrix),h.push({circleArray:_,circleOffset:p,transform:w,invTransform:b}),p=f+=_.length/4}x&&u.draw(l,c.LINES,Ae.disabled,Se.disabled,t.colorModeForRenderPass(),Ce.disabled,Pr(v,t.transform,g),n.id,x.layoutVertexBuffer,x.indexBuffer,x.segments,null,t.transform.zoom,null,null,x.collisionVertexBuffer)}}if(s&&h.length){var T=t.useProgram("collisionCircle"),k=new e.StructArrayLayout2f1f2i16;k.resize(4*f),k._trim();for(var A=0,M=0,S=h;M=0&&(m[y.associatedIconIndex]={shiftedAnchor:S,angle:E})}else ut(y.numGlyphs,p)}if(h){d.clear();for(var I=t.icon.placedSymbolArray,L=0;L0){var s=e.browser.now(),l=(s-t.timeAdded)/o,c=r?(s-r.timeAdded)/o:-1,u=n.getSource(),h=a.coveringZoomLevel({tileSize:u.tileSize,roundZoom:u.roundZoom}),f=!r||Math.abs(r.tileID.overscaledZ-h)>Math.abs(t.tileID.overscaledZ-h),p=f&&t.refreshedUponExpiration?1:e.clamp(f?l:1-c,0,1);return t.refreshedUponExpiration&&l>=1&&(t.refreshedUponExpiration=!1),r?{opacity:1,mix:1-p}:{opacity:p,mix:0}}return{opacity:1,mix:0}}var dn=new e.Color(1,0,0,1),mn=new e.Color(0,1,0,1),gn=new e.Color(0,0,1,1),yn=new e.Color(1,0,1,1),vn=new e.Color(0,1,1,1);function xn(e,t,r,n){bn(e,0,t+r/2,e.transform.width,r,n)}function _n(e,t,r,n){bn(e,t-r/2,0,r,e.transform.height,n)}function bn(t,r,n,i,a,o){var s=t.context,l=s.gl;l.enable(l.SCISSOR_TEST),l.scissor(r*e.browser.devicePixelRatio,n*e.browser.devicePixelRatio,i*e.browser.devicePixelRatio,a*e.browser.devicePixelRatio),s.clear({color:o}),l.disable(l.SCISSOR_TEST)}function wn(t,r,n){var i=t.context,a=i.gl,o=n.posMatrix,s=t.useProgram("debug"),l=Ae.disabled,c=Se.disabled,u=t.colorModeForRenderPass(),h="$debug";i.activeTexture.set(a.TEXTURE0),t.emptyTexture.bind(a.LINEAR,a.CLAMP_TO_EDGE),s.draw(i,a.LINE_STRIP,l,c,u,Ce.disabled,Dr(o,e.Color.red),h,t.debugBuffer,t.tileBorderIndexBuffer,t.debugSegments);var f=r.getTileByID(n.key).latestRawTileData,p=f&&f.byteLength||0,d=Math.floor(p/1024),m=r.getTile(n).tileSize,g=512/Math.min(m,512)*(n.overscaledZ/t.transform.zoom)*.5,y=n.canonical.toString();n.overscaledZ!==n.canonical.z&&(y+=" => "+n.overscaledZ),function(e,t){e.initDebugOverlayCanvas();var r=e.debugOverlayCanvas,n=e.context.gl,i=e.debugOverlayCanvas.getContext("2d");i.clearRect(0,0,r.width,r.height),i.shadowColor="white",i.shadowBlur=2,i.lineWidth=1.5,i.strokeStyle="white",i.textBaseline="top",i.font="bold 36px Open Sans, sans-serif",i.fillText(t,5,5),i.strokeText(t,5,5),e.debugOverlayTexture.update(r),e.debugOverlayTexture.bind(n.LINEAR,n.CLAMP_TO_EDGE)}(t,y+" "+d+"kb"),s.draw(i,a.TRIANGLES,l,c,Ee.alphaBlended,Ce.disabled,Dr(o,e.Color.transparent,g),h,t.debugBuffer,t.quadTriangleIndexBuffer,t.debugSegments)}var Tn={symbol:function(t,r,n,i,a){if("translucent"===t.renderPass){var o=Se.disabled,s=t.colorModeForRenderPass();n.layout.get("text-variable-anchor")&&function(t,r,n,i,a,o,s){for(var l=r.transform,c="map"===a,u="map"===o,h=0,f=t;h256&&this.clearStencil(),r.setColorMode(Ee.disabled),r.setDepthMode(Ae.disabled);var i=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var a=0,o=t;a256&&this.clearStencil();var e=this.nextStencilID++,t=this.context.gl;return new Se({func:t.NOTEQUAL,mask:255},e,255,t.KEEP,t.KEEP,t.REPLACE)},kn.prototype.stencilModeForClipping=function(e){var t=this.context.gl;return new Se({func:t.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,t.KEEP,t.KEEP,t.REPLACE)},kn.prototype.stencilConfigForOverlap=function(e){var t,r=this.context.gl,n=e.sort((function(e,t){return t.overscaledZ-e.overscaledZ})),i=n[n.length-1].overscaledZ,a=n[0].overscaledZ-i+1;if(a>1){this.currentStencilSource=void 0,this.nextStencilID+a>256&&this.clearStencil();for(var o={},s=0;s=0;this.currentLayer--){var w=this.style._layers[i[this.currentLayer]],T=a[w.source],k=u[w.source];this._renderTileClippingMasks(w,k),this.renderLayer(this,T,w,k)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?t.pop():null},kn.prototype.isPatternMissing=function(e){if(!e)return!1;if(!e.from||!e.to)return!0;var t=this.imageManager.getPattern(e.from.toString()),r=this.imageManager.getPattern(e.to.toString());return!t||!r},kn.prototype.useProgram=function(e,t){this.cache=this.cache||{};var r=""+e+(t?t.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[r]||(this.cache[r]=new Tr(this.context,e,_r[e],t,en[e],this._showOverdrawInspector)),this.cache[r]},kn.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},kn.prototype.setBaseState=function(){var e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)},kn.prototype.initDebugOverlayCanvas=function(){if(null==this.debugOverlayCanvas){this.debugOverlayCanvas=e.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var t=this.context.gl;this.debugOverlayTexture=new e.Texture(this.context,this.debugOverlayCanvas,t.RGBA)}},kn.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var An=function(e,t){this.points=e,this.planes=t};An.fromInvProjectionMatrix=function(t,r,n){var i=Math.pow(2,n),a=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map((function(r){return e.transformMat4([],r,t)})).map((function(t){return e.scale$1([],t,1/t[3]/r*i)})),o=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((function(t){var r=e.sub([],a[t[0]],a[t[1]]),n=e.sub([],a[t[2]],a[t[1]]),i=e.normalize([],e.cross([],r,n)),o=-e.dot(i,a[t[1]]);return i.concat(o)}));return new An(a,o)};var Mn=function(t,r){this.min=t,this.max=r,this.center=e.scale$2([],e.add([],this.min,this.max),.5)};Mn.prototype.quadrant=function(t){for(var r=[t%2==0,t<2],n=e.clone$2(this.min),i=e.clone$2(this.max),a=0;a=0;if(0===o)return 0;o!==r.length&&(n=!1)}if(n)return 2;for(var l=0;l<3;l++){for(var c=Number.MAX_VALUE,u=-Number.MAX_VALUE,h=0;hthis.max[l]-this.min[l])return 0}return 1};var Sn=function(e,t,r,n){if(void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0),void 0===n&&(n=0),isNaN(e)||e<0||isNaN(t)||t<0||isNaN(r)||r<0||isNaN(n)||n<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=e,this.bottom=t,this.left=r,this.right=n};Sn.prototype.interpolate=function(t,r,n){return null!=r.top&&null!=t.top&&(this.top=e.number(t.top,r.top,n)),null!=r.bottom&&null!=t.bottom&&(this.bottom=e.number(t.bottom,r.bottom,n)),null!=r.left&&null!=t.left&&(this.left=e.number(t.left,r.left,n)),null!=r.right&&null!=t.right&&(this.right=e.number(t.right,r.right,n)),this},Sn.prototype.getCenter=function(t,r){var n=e.clamp((this.left+t-this.right)/2,0,t),i=e.clamp((this.top+r-this.bottom)/2,0,r);return new e.Point(n,i)},Sn.prototype.equals=function(e){return this.top===e.top&&this.bottom===e.bottom&&this.left===e.left&&this.right===e.right},Sn.prototype.clone=function(){return new Sn(this.top,this.bottom,this.left,this.right)},Sn.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var En=function(t,r,n,i,a){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===a||a,this._minZoom=t||0,this._maxZoom=r||22,this._minPitch=n??0,this._maxPitch=i??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new e.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Sn,this._posMatrixCache={},this._alignedPosMatrixCache={}},Cn={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};En.prototype.clone=function(){var e=new En(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return e.tileSize=this.tileSize,e.latRange=this.latRange,e.width=this.width,e.height=this.height,e._center=this._center,e.zoom=this.zoom,e.angle=this.angle,e._fov=this._fov,e._pitch=this._pitch,e._unmodified=this._unmodified,e._edgeInsets=this._edgeInsets.clone(),e._calcMatrices(),e},Cn.minZoom.get=function(){return this._minZoom},Cn.minZoom.set=function(e){this._minZoom!==e&&(this._minZoom=e,this.zoom=Math.max(this.zoom,e))},Cn.maxZoom.get=function(){return this._maxZoom},Cn.maxZoom.set=function(e){this._maxZoom!==e&&(this._maxZoom=e,this.zoom=Math.min(this.zoom,e))},Cn.minPitch.get=function(){return this._minPitch},Cn.minPitch.set=function(e){this._minPitch!==e&&(this._minPitch=e,this.pitch=Math.max(this.pitch,e))},Cn.maxPitch.get=function(){return this._maxPitch},Cn.maxPitch.set=function(e){this._maxPitch!==e&&(this._maxPitch=e,this.pitch=Math.min(this.pitch,e))},Cn.renderWorldCopies.get=function(){return this._renderWorldCopies},Cn.renderWorldCopies.set=function(e){void 0===e?e=!0:null===e&&(e=!1),this._renderWorldCopies=e},Cn.worldSize.get=function(){return this.tileSize*this.scale},Cn.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Cn.size.get=function(){return new e.Point(this.width,this.height)},Cn.bearing.get=function(){return-this.angle/Math.PI*180},Cn.bearing.set=function(t){var r=-e.wrap(t,-180,180)*Math.PI/180;this.angle!==r&&(this._unmodified=!1,this.angle=r,this._calcMatrices(),this.rotationMatrix=e.create$2(),e.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Cn.pitch.get=function(){return this._pitch/Math.PI*180},Cn.pitch.set=function(t){var r=e.clamp(t,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())},Cn.fov.get=function(){return this._fov/Math.PI*180},Cn.fov.set=function(e){e=Math.max(.01,Math.min(60,e)),this._fov!==e&&(this._unmodified=!1,this._fov=e/180*Math.PI,this._calcMatrices())},Cn.zoom.get=function(){return this._zoom},Cn.zoom.set=function(e){var t=Math.min(Math.max(e,this.minZoom),this.maxZoom);this._zoom!==t&&(this._unmodified=!1,this._zoom=t,this.scale=this.zoomScale(t),this.tileZoom=Math.floor(t),this.zoomFraction=t-this.tileZoom,this._constrain(),this._calcMatrices())},Cn.center.get=function(){return this._center},Cn.center.set=function(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this._constrain(),this._calcMatrices())},Cn.padding.get=function(){return this._edgeInsets.toJSON()},Cn.padding.set=function(e){this._edgeInsets.equals(e)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,e,1),this._calcMatrices())},Cn.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},En.prototype.isPaddingEqual=function(e){return this._edgeInsets.equals(e)},En.prototype.interpolatePadding=function(e,t,r){this._unmodified=!1,this._edgeInsets.interpolate(e,t,r),this._constrain(),this._calcMatrices()},En.prototype.coveringZoomLevel=function(e){var t=(e.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/e.tileSize));return Math.max(0,t)},En.prototype.getVisibleUnwrappedCoordinates=function(t){var r=[new e.UnwrappedTileID(0,t)];if(this._renderWorldCopies)for(var n=this.pointCoordinate(new e.Point(0,0)),i=this.pointCoordinate(new e.Point(this.width,0)),a=this.pointCoordinate(new e.Point(this.width,this.height)),o=this.pointCoordinate(new e.Point(0,this.height)),s=Math.floor(Math.min(n.x,i.x,a.x,o.x)),l=Math.floor(Math.max(n.x,i.x,a.x,o.x)),c=s-1;c<=l+1;c++)0!==c&&r.push(new e.UnwrappedTileID(c,t));return r},En.prototype.coveringTiles=function(t){var r=this.coveringZoomLevel(t),n=r;if(void 0!==t.minzoom&&rt.maxzoom&&(r=t.maxzoom);var i=e.MercatorCoordinate.fromLngLat(this.center),a=Math.pow(2,r),o=[a*i.x,a*i.y,0],s=An.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,r),l=t.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(l=r);var c=function(e){return{aabb:new Mn([e*a,0,0],[(e+1)*a,a,0]),zoom:0,x:0,y:0,wrap:e,fullyVisible:!1}},u=[],h=[],f=r,p=t.reparseOverscaled?n:r;if(this._renderWorldCopies)for(var d=1;d<=3;d++)u.push(c(-d)),u.push(c(d));for(u.push(c(0));u.length>0;){var m=u.pop(),g=m.x,y=m.y,v=m.fullyVisible;if(!v){var x=m.aabb.intersects(s);if(0===x)continue;v=2===x}var _=m.aabb.distanceX(o),b=m.aabb.distanceY(o),w=Math.max(Math.abs(_),Math.abs(b)),T=3+(1<T&&m.zoom>=l)h.push({tileID:new e.OverscaledTileID(m.zoom===f?p:m.zoom,m.wrap,m.zoom,g,y),distanceSq:e.sqrLen([o[0]-.5-g,o[1]-.5-y])});else for(var k=0;k<4;k++){var A=(g<<1)+k%2,M=(y<<1)+(k>>1);u.push({aabb:m.aabb.quadrant(k),zoom:m.zoom+1,x:A,y:M,wrap:m.wrap,fullyVisible:v})}}return h.sort((function(e,t){return e.distanceSq-t.distanceSq})).map((function(e){return e.tileID}))},En.prototype.resize=function(e,t){this.width=e,this.height=t,this.pixelsToGLUnits=[2/e,-2/t],this._constrain(),this._calcMatrices()},Cn.unmodified.get=function(){return this._unmodified},En.prototype.zoomScale=function(e){return Math.pow(2,e)},En.prototype.scaleZoom=function(e){return Math.log(e)/Math.LN2},En.prototype.project=function(t){var r=e.clamp(t.lat,-this.maxValidLatitude,this.maxValidLatitude);return new e.Point(e.mercatorXfromLng(t.lng)*this.worldSize,e.mercatorYfromLat(r)*this.worldSize)},En.prototype.unproject=function(t){return new e.MercatorCoordinate(t.x/this.worldSize,t.y/this.worldSize).toLngLat()},Cn.point.get=function(){return this.project(this.center)},En.prototype.setLocationAtPoint=function(t,r){var n=this.pointCoordinate(r),i=this.pointCoordinate(this.centerPoint),a=this.locationCoordinate(t),o=new e.MercatorCoordinate(a.x-(n.x-i.x),a.y-(n.y-i.y));this.center=this.coordinateLocation(o),this._renderWorldCopies&&(this.center=this.center.wrap())},En.prototype.locationPoint=function(e){return this.coordinatePoint(this.locationCoordinate(e))},En.prototype.pointLocation=function(e){return this.coordinateLocation(this.pointCoordinate(e))},En.prototype.locationCoordinate=function(t){return e.MercatorCoordinate.fromLngLat(t)},En.prototype.coordinateLocation=function(e){return e.toLngLat()},En.prototype.pointCoordinate=function(t){var r=[t.x,t.y,0,1],n=[t.x,t.y,1,1];e.transformMat4(r,r,this.pixelMatrixInverse),e.transformMat4(n,n,this.pixelMatrixInverse);var i=r[3],a=n[3],o=r[0]/i,s=n[0]/a,l=r[1]/i,c=n[1]/a,u=r[2]/i,h=n[2]/a,f=u===h?0:(0-u)/(h-u);return new e.MercatorCoordinate(e.number(o,s,f)/this.worldSize,e.number(l,c,f)/this.worldSize)},En.prototype.coordinatePoint=function(t){var r=[t.x*this.worldSize,t.y*this.worldSize,0,1];return e.transformMat4(r,r,this.pixelMatrix),new e.Point(r[0]/r[3],r[1]/r[3])},En.prototype.getBounds=function(){return(new e.LngLatBounds).extend(this.pointLocation(new e.Point(0,0))).extend(this.pointLocation(new e.Point(this.width,0))).extend(this.pointLocation(new e.Point(this.width,this.height))).extend(this.pointLocation(new e.Point(0,this.height)))},En.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new e.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},En.prototype.setMaxBounds=function(e){e?(this.lngRange=[e.getWest(),e.getEast()],this.latRange=[e.getSouth(),e.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},En.prototype.calculatePosMatrix=function(t,r){void 0===r&&(r=!1);var n=t.key,i=r?this._alignedPosMatrixCache:this._posMatrixCache;if(i[n])return i[n];var a=t.canonical,o=this.worldSize/this.zoomScale(a.z),s=a.x+Math.pow(2,a.z)*t.wrap,l=e.identity(new Float64Array(16));return e.translate(l,l,[s*o,a.y*o,0]),e.scale(l,l,[o/e.EXTENT,o/e.EXTENT,1]),e.multiply(l,r?this.alignedProjMatrix:this.projMatrix,l),i[n]=new Float32Array(l),i[n]},En.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},En.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var t,r,n,i,a=-90,o=90,s=-180,l=180,c=this.size,u=this._unmodified;if(this.latRange){var h=this.latRange;a=e.mercatorYfromLat(h[1])*this.worldSize,t=(o=e.mercatorYfromLat(h[0])*this.worldSize)-ao&&(i=o-g)}if(this.lngRange){var y=p.x,v=c.x/2;y-vl&&(n=l-v)}(void 0!==n||void 0!==i)&&(this.center=this.unproject(new e.Point(void 0!==n?n:p.x,void 0!==i?i:p.y))),this._unmodified=u,this._constraining=!1}},En.prototype._calcMatrices=function(){if(this.height){var t=this._fov/2,r=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(t)*this.height;var n=Math.PI/2+this._pitch,i=this._fov*(.5+r.y/this.height),a=Math.sin(i)*this.cameraToCenterDistance/Math.sin(e.clamp(Math.PI-n-i,.01,Math.PI-.01)),o=this.point,s=o.x,l=o.y,c=1.01*(Math.cos(Math.PI/2-this._pitch)*a+this.cameraToCenterDistance),u=this.height/50,h=new Float64Array(16);e.perspective(h,this._fov,this.width/this.height,u,c),h[8]=2*-r.x/this.width,h[9]=2*r.y/this.height,e.scale(h,h,[1,-1,1]),e.translate(h,h,[0,0,-this.cameraToCenterDistance]),e.rotateX(h,h,this._pitch),e.rotateZ(h,h,this.angle),e.translate(h,h,[-s,-l,0]),this.mercatorMatrix=e.scale([],h,[this.worldSize,this.worldSize,this.worldSize]),e.scale(h,h,[1,1,e.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=h,this.invProjMatrix=e.invert([],this.projMatrix);var f=this.width%2/2,p=this.height%2/2,d=Math.cos(this.angle),m=Math.sin(this.angle),g=s-Math.round(s)+d*f+m*p,y=l-Math.round(l)+d*p+m*f,v=new Float64Array(h);if(e.translate(v,v,[g>.5?g-1:g,y>.5?y-1:y,0]),this.alignedProjMatrix=v,h=e.create(),e.scale(h,h,[this.width/2,-this.height/2,1]),e.translate(h,h,[1,-1,0]),this.labelPlaneMatrix=h,h=e.create(),e.scale(h,h,[1,-1,1]),e.translate(h,h,[-1,-1,0]),e.scale(h,h,[2/this.width,2/this.height,1]),this.glCoordMatrix=h,this.pixelMatrix=e.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(h=e.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=h,this._posMatrixCache={},this._alignedPosMatrixCache={}}},En.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var t=this.pointCoordinate(new e.Point(0,0)),r=[t.x*this.worldSize,t.y*this.worldSize,0,1];return e.transformMat4(r,r,this.pixelMatrix)[3]/this.cameraToCenterDistance},En.prototype.getCameraPoint=function(){var t=this._pitch,r=Math.tan(t)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.Point(0,r))},En.prototype.getCameraQueryGeometry=function(t){var r=this.getCameraPoint();if(1===t.length)return[t[0],r];for(var n=r.x,i=r.y,a=r.x,o=r.y,s=0,l=t;s=3&&!e.some((function(e){return isNaN(e)}))){var t=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(e[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:t,pitch:+(e[4]||0)}),!0}return!1},In.prototype._updateHashUnthrottled=function(){var t=e.window.location.href.replace(/(#.+)?$/,this.getHashString());try{e.window.history.replaceState(e.window.history.state,null,t)}catch{}};var Ln={linearity:.3,easing:e.bezier(0,0,.3,1)},Pn=e.extend({deceleration:2500,maxSpeed:1400},Ln),zn=e.extend({deceleration:20,maxSpeed:1400},Ln),Dn=e.extend({deceleration:1e3,maxSpeed:360},Ln),On=e.extend({deceleration:1e3,maxSpeed:90},Ln),Rn=function(e){this._map=e,this.clear()};function Fn(e,t){(!e.duration||e.duration0&&r-t[0].time>160;)t.shift()},Rn.prototype._onMoveEnd=function(t){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var r={zoom:0,bearing:0,pitch:0,pan:new e.Point(0,0),pinchAround:void 0,around:void 0},n=0,i=this._inertiaBuffer;n=this._clickTolerance||this._map.fire(new jn(e.type,this._map,e))},Vn.prototype.dblclick=function(e){return this._firePreventable(new jn(e.type,this._map,e))},Vn.prototype.mouseover=function(e){this._map.fire(new jn(e.type,this._map,e))},Vn.prototype.mouseout=function(e){this._map.fire(new jn(e.type,this._map,e))},Vn.prototype.touchstart=function(e){return this._firePreventable(new Nn(e.type,this._map,e))},Vn.prototype.touchmove=function(e){this._map.fire(new Nn(e.type,this._map,e))},Vn.prototype.touchend=function(e){this._map.fire(new Nn(e.type,this._map,e))},Vn.prototype.touchcancel=function(e){this._map.fire(new Nn(e.type,this._map,e))},Vn.prototype._firePreventable=function(e){if(this._map.fire(e),e.defaultPrevented)return{}},Vn.prototype.isEnabled=function(){return!0},Vn.prototype.isActive=function(){return!1},Vn.prototype.enable=function(){},Vn.prototype.disable=function(){};var qn=function(e){this._map=e};qn.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},qn.prototype.mousemove=function(e){this._map.fire(new jn(e.type,this._map,e))},qn.prototype.mousedown=function(){this._delayContextMenu=!0},qn.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new jn("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},qn.prototype.contextmenu=function(e){this._delayContextMenu?this._contextMenuEvent=e:this._map.fire(new jn(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()},qn.prototype.isEnabled=function(){return!0},qn.prototype.isActive=function(){return!1},qn.prototype.enable=function(){},qn.prototype.disable=function(){};var Hn=function(e,t){this._map=e,this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=t.clickTolerance||1};function Gn(e,t){for(var r={},n=0;nthis.numTouches)&&(this.aborted=!0),!this.aborted&&(void 0===this.startTime&&(this.startTime=t.timeStamp),n.length===this.numTouches&&(this.centroid=function(t){for(var r=new e.Point(0,0),n=0,i=t;n30)&&(this.aborted=!0)}}},Wn.prototype.touchend=function(e,t,r){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),0===r.length){var n=!this.aborted&&this.centroid;if(this.reset(),n)return n}};var Zn=function(e){this.singleTap=new Wn(e),this.numTaps=e.numTaps,this.reset()};Zn.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Zn.prototype.touchstart=function(e,t,r){this.singleTap.touchstart(e,t,r)},Zn.prototype.touchmove=function(e,t,r){this.singleTap.touchmove(e,t,r)},Zn.prototype.touchend=function(e,t,r){var n=this.singleTap.touchend(e,t,r);if(n){var i=e.timeStamp-this.lastTime<500,a=!this.lastTap||this.lastTap.dist(n)<30;if((!i||!a)&&this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=n,this.count===this.numTaps)return this.reset(),n}};var Yn=function(){this._zoomIn=new Zn({numTouches:1,numTaps:2}),this._zoomOut=new Zn({numTouches:2,numTaps:1}),this.reset()};Yn.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Yn.prototype.touchstart=function(e,t,r){this._zoomIn.touchstart(e,t,r),this._zoomOut.touchstart(e,t,r)},Yn.prototype.touchmove=function(e,t,r){this._zoomIn.touchmove(e,t,r),this._zoomOut.touchmove(e,t,r)},Yn.prototype.touchend=function(e,t,r){var n=this,i=this._zoomIn.touchend(e,t,r),a=this._zoomOut.touchend(e,t,r);return i?(this._active=!0,e.preventDefault(),setTimeout((function(){return n.reset()}),0),{cameraAnimation:function(t){return t.easeTo({duration:300,zoom:t.getZoom()+1,around:t.unproject(i)},{originalEvent:e})}}):a?(this._active=!0,e.preventDefault(),setTimeout((function(){return n.reset()}),0),{cameraAnimation:function(t){return t.easeTo({duration:300,zoom:t.getZoom()-1,around:t.unproject(a)},{originalEvent:e})}}):void 0},Yn.prototype.touchcancel=function(){this.reset()},Yn.prototype.enable=function(){this._enabled=!0},Yn.prototype.disable=function(){this._enabled=!1,this.reset()},Yn.prototype.isEnabled=function(){return this._enabled},Yn.prototype.isActive=function(){return this._active};var Xn={0:1,2:2},$n=function(e){this.reset(),this._clickTolerance=e.clickTolerance||1};$n.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},$n.prototype._correctButton=function(e,t){return!1},$n.prototype._move=function(e,t){return{}},$n.prototype.mousedown=function(e,t){if(!this._lastPoint){var n=r.mouseButton(e);this._correctButton(e,n)&&(this._lastPoint=t,this._eventButton=n)}},$n.prototype.mousemoveWindow=function(e,t){var r=this._lastPoint;if(r){if(e.preventDefault(),function(e,t){var r=Xn[t];return void 0===e.buttons||(e.buttons&r)!==r}(e,this._eventButton))return void this.reset();if(this._moved||!(t.dist(r)0&&(this._active=!0);var i=Gn(n,r),a=new e.Point(0,0),o=new e.Point(0,0),s=0;for(var l in i){var c=i[l],u=this._touches[l];u&&(a._add(c),o._add(c.sub(u)),s++,i[l]=c)}if(this._touches=i,!(sMath.abs(e.x)}var li=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.reset=function(){e.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},t.prototype._start=function(e){this._lastPoints=e,si(e[0].sub(e[1]))&&(this._valid=!1)},t.prototype._move=function(e,t,r){var n=e[0].sub(this._lastPoints[0]),i=e[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(n,i,r.timeStamp),this._valid)return this._lastPoints=e,this._active=!0,{pitchDelta:(n.y+i.y)/2*-.5}},t.prototype.gestureBeginsVertically=function(e,t,r){if(void 0!==this._valid)return this._valid;var n=e.mag()>=2,i=t.mag()>=2;if(n||i){if(!n||!i)return void 0===this._firstMove&&(this._firstMove=r),r-this._firstMove<100&&void 0;var a=e.y>0==t.y>0;return si(e)&&si(t)&&a}},t}(ti),ci={panStep:100,bearingStep:15,pitchStep:10},ui=function(){var e=ci;this._panStep=e.panStep,this._bearingStep=e.bearingStep,this._pitchStep=e.pitchStep,this._rotationDisabled=!1};function hi(e){return e*(2-e)}ui.prototype.reset=function(){this._active=!1},ui.prototype.keydown=function(e){var t=this;if(!(e.altKey||e.ctrlKey||e.metaKey)){var r=0,n=0,i=0,a=0,o=0;switch(e.keyCode){case 61:case 107:case 171:case 187:r=1;break;case 189:case 109:case 173:r=-1;break;case 37:e.shiftKey?n=-1:(e.preventDefault(),a=-1);break;case 39:e.shiftKey?n=1:(e.preventDefault(),a=1);break;case 38:e.shiftKey?i=1:(e.preventDefault(),o=-1);break;case 40:e.shiftKey?i=-1:(e.preventDefault(),o=1);break;default:return}return this._rotationDisabled&&(n=0,i=0),{cameraAnimation:function(s){var l=s.getZoom();s.easeTo({duration:300,easeId:"keyboardHandler",easing:hi,zoom:r?Math.round(l)+r*(e.shiftKey?2:1):l,bearing:s.getBearing()+n*t._bearingStep,pitch:s.getPitch()+i*t._pitchStep,offset:[-a*t._panStep,-o*t._panStep],center:s.getCenter()},{originalEvent:e})}}}},ui.prototype.enable=function(){this._enabled=!0},ui.prototype.disable=function(){this._enabled=!1,this.reset()},ui.prototype.isEnabled=function(){return this._enabled},ui.prototype.isActive=function(){return this._active},ui.prototype.disableRotation=function(){this._rotationDisabled=!0},ui.prototype.enableRotation=function(){this._rotationDisabled=!1};var fi=4.000244140625,pi=1/450,di=function(t,r){this._map=t,this._el=t.getCanvasContainer(),this._handler=r,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=pi,e.bindAll(["_onTimeout"],this)};di.prototype.setZoomRate=function(e){this._defaultZoomRate=e},di.prototype.setWheelZoomRate=function(e){this._wheelZoomRate=e},di.prototype.isEnabled=function(){return!!this._enabled},di.prototype.isActive=function(){return!!this._active||void 0!==this._finishTimeout},di.prototype.isZooming=function(){return!!this._zooming},di.prototype.enable=function(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=e&&"center"===e.around)},di.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},di.prototype.wheel=function(t){if(this.isEnabled()){var r=t.deltaMode===e.window.WheelEvent.DOM_DELTA_LINE?40*t.deltaY:t.deltaY,n=e.browser.now(),i=n-(this._lastWheelEventTime||0);this._lastWheelEventTime=n,0!==r&&r%fi==0?this._type="wheel":0!==r&&Math.abs(r)<4?this._type="trackpad":i>400?(this._type=null,this._lastValue=r,this._timeout=setTimeout(this._onTimeout,40,t)):this._type||(this._type=Math.abs(i*r)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,r+=this._lastValue)),t.shiftKey&&r&&(r/=4),this._type&&(this._lastWheelEvent=t,this._delta-=r,this._active||this._start(t)),t.preventDefault()}},di.prototype._onTimeout=function(e){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(e)},di.prototype._start=function(t){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var n=r.mousePos(this._el,t);this._around=e.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(n)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},di.prototype.renderFrame=function(){var t=this;if(this._frameId&&(this._frameId=null,this.isActive())){var r=this._map.transform;if(0!==this._delta){var n="wheel"===this._type&&Math.abs(this._delta)>fi?this._wheelZoomRate:this._defaultZoomRate,i=2/(1+Math.exp(-Math.abs(this._delta*n)));this._delta<0&&0!==i&&(i=1/i);var a="number"==typeof this._targetZoom?r.zoomScale(this._targetZoom):r.scale;this._targetZoom=Math.min(r.maxZoom,Math.max(r.minZoom,r.scaleZoom(a*i))),"wheel"===this._type&&(this._startZoom=r.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var o,s="number"==typeof this._targetZoom?this._targetZoom:r.zoom,l=this._startZoom,c=this._easing,u=!1;if("wheel"===this._type&&l&&c){var h=Math.min((e.browser.now()-this._lastWheelEventTime)/200,1),f=c(h);o=e.number(l,s,f),h<1?this._frameId||(this._frameId=!0):u=!0}else o=s,u=!0;return this._active=!0,u&&(this._active=!1,this._finishTimeout=setTimeout((function(){t._zooming=!1,t._handler._triggerRenderFrame(),delete t._targetZoom,delete t._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!u,zoomDelta:o-r.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},di.prototype._smoothOutEasing=function(t){var r=e.ease;if(this._prevEase){var n=this._prevEase,i=(e.browser.now()-n.start)/n.duration,a=n.easing(i+.01)-n.easing(i),o=.27/Math.sqrt(a*a+1e-4)*.01,s=Math.sqrt(.0729-o*o);r=e.bezier(o,s,.25,1)}return this._prevEase={start:e.browser.now(),duration:t,easing:r},r},di.prototype.reset=function(){this._active=!1};var mi=function(e,t){this._clickZoom=e,this._tapZoom=t};mi.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},mi.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},mi.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},mi.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var gi=function(){this.reset()};gi.prototype.reset=function(){this._active=!1},gi.prototype.dblclick=function(e,t){return e.preventDefault(),{cameraAnimation:function(r){r.easeTo({duration:300,zoom:r.getZoom()+(e.shiftKey?-1:1),around:r.unproject(t)},{originalEvent:e})}}},gi.prototype.enable=function(){this._enabled=!0},gi.prototype.disable=function(){this._enabled=!1,this.reset()},gi.prototype.isEnabled=function(){return this._enabled},gi.prototype.isActive=function(){return this._active};var yi=function(){this._tap=new Zn({numTouches:1,numTaps:1}),this.reset()};yi.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},yi.prototype.touchstart=function(e,t,r){this._swipePoint||(this._tapTime&&e.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?r.length>0&&(this._swipePoint=t[0],this._swipeTouch=r[0].identifier):this._tap.touchstart(e,t,r))},yi.prototype.touchmove=function(e,t,r){if(this._tapTime){if(this._swipePoint){if(r[0].identifier!==this._swipeTouch)return;var n=t[0],i=n.y-this._swipePoint.y;return this._swipePoint=n,e.preventDefault(),this._active=!0,{zoomDelta:i/128}}}else this._tap.touchmove(e,t,r)},yi.prototype.touchend=function(e,t,r){this._tapTime?this._swipePoint&&0===r.length&&this.reset():this._tap.touchend(e,t,r)&&(this._tapTime=e.timeStamp)},yi.prototype.touchcancel=function(){this.reset()},yi.prototype.enable=function(){this._enabled=!0},yi.prototype.disable=function(){this._enabled=!1,this.reset()},yi.prototype.isEnabled=function(){return this._enabled},yi.prototype.isActive=function(){return this._active};var vi=function(e,t,r){this._el=e,this._mousePan=t,this._touchPan=r};vi.prototype.enable=function(e){this._inertiaOptions=e||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},vi.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},vi.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},vi.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var xi=function(e,t,r){this._pitchWithRotate=e.pitchWithRotate,this._mouseRotate=t,this._mousePitch=r};xi.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},xi.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},xi.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},xi.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var _i=function(e,t,r,n){this._el=e,this._touchZoom=t,this._touchRotate=r,this._tapDragZoom=n,this._rotationDisabled=!1,this._enabled=!0};_i.prototype.enable=function(e){this._touchZoom.enable(e),this._rotationDisabled||this._touchRotate.enable(e),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},_i.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},_i.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},_i.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},_i.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},_i.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var bi=function(e){return e.zoom||e.drag||e.pitch||e.rotate},wi=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(e.Event);function Ti(e){return e.panDelta&&e.panDelta.mag()||e.zoomDelta||e.bearingDelta||e.pitchDelta}var ki=function(t,n){this._map=t,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Rn(t),this._bearingSnap=n.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(n),e.bindAll(["handleEvent","handleWindowEvent"],this);var i=this._el;this._listeners=[[i,"touchstart",{passive:!0}],[i,"touchmove",{passive:!1}],[i,"touchend",void 0],[i,"touchcancel",void 0],[i,"mousedown",void 0],[i,"mousemove",void 0],[i,"mouseup",void 0],[e.window.document,"mousemove",{capture:!0}],[e.window.document,"mouseup",void 0],[i,"mouseover",void 0],[i,"mouseout",void 0],[i,"dblclick",void 0],[i,"click",void 0],[i,"keydown",{capture:!1}],[i,"keyup",void 0],[i,"wheel",{passive:!1}],[i,"contextmenu",void 0],[e.window,"blur",void 0]];for(var a=0,o=this._listeners;aa?Math.min(2,b):Math.max(.5,b),w=Math.pow(g,1-t),T=i.unproject(x.add(_.mult(t*w)).mult(m));i.setLocationAtPoint(i.renderWorldCopies?T.wrap():T,d)}n._fireMoveEvents(r)}),(function(e){n._afterEase(r,e)}),t),this},r.prototype._prepareEase=function(t,r,n){void 0===n&&(n={}),this._moving=!0,!r&&!n.moving&&this.fire(new e.Event("movestart",t)),this._zooming&&!n.zooming&&this.fire(new e.Event("zoomstart",t)),this._rotating&&!n.rotating&&this.fire(new e.Event("rotatestart",t)),this._pitching&&!n.pitching&&this.fire(new e.Event("pitchstart",t))},r.prototype._fireMoveEvents=function(t){this.fire(new e.Event("move",t)),this._zooming&&this.fire(new e.Event("zoom",t)),this._rotating&&this.fire(new e.Event("rotate",t)),this._pitching&&this.fire(new e.Event("pitch",t))},r.prototype._afterEase=function(t,r){if(!this._easeId||!r||this._easeId!==r){delete this._easeId;var n=this._zooming,i=this._rotating,a=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,n&&this.fire(new e.Event("zoomend",t)),i&&this.fire(new e.Event("rotateend",t)),a&&this.fire(new e.Event("pitchend",t)),this.fire(new e.Event("moveend",t))}},r.prototype.flyTo=function(t,r){var n=this;if(!t.essential&&e.browser.prefersReducedMotion){var i=e.pick(t,["center","zoom","bearing","pitch","around"]);return this.jumpTo(i,r)}this.stop(),t=e.extend({offset:[0,0],speed:1.2,curve:1.42,easing:e.ease},t);var a=this.transform,o=this.getZoom(),s=this.getBearing(),l=this.getPitch(),c=this.getPadding(),u="zoom"in t?e.clamp(+t.zoom,a.minZoom,a.maxZoom):o,h="bearing"in t?this._normalizeBearing(t.bearing,s):s,f="pitch"in t?+t.pitch:l,p="padding"in t?t.padding:a.padding,d=a.zoomScale(u-o),m=e.Point.convert(t.offset),g=a.centerPoint.add(m),y=a.pointLocation(g),v=e.LngLat.convert(t.center||y);this._normalizeCenter(v);var x=a.project(y),_=a.project(v).sub(x),b=t.curve,w=Math.max(a.width,a.height),T=w/d,k=_.mag();if("minZoom"in t){var A=e.clamp(Math.min(t.minZoom,o,u),a.minZoom,a.maxZoom),M=w/a.zoomScale(A-o);b=Math.sqrt(M/k*2)}var S=b*b;function E(e){var t=(T*T-w*w+(e?-1:1)*S*S*k*k)/(2*(e?T:w)*S*k);return Math.log(Math.sqrt(t*t+1)-t)}function C(e){return(Math.exp(e)-Math.exp(-e))/2}function I(e){return(Math.exp(e)+Math.exp(-e))/2}var L=E(0),P=function(e){return I(L)/I(L+b*e)},z=function(e){return w*((I(L)*function(e){return C(e)/I(e)}(L+b*e)-C(L))/S)/k},D=(E(1)-L)/b;if(Math.abs(k)<1e-6||!isFinite(D)){if(Math.abs(w-T)<1e-6)return this.easeTo(t,r);var O=Tt.maxDuration&&(t.duration=0),this._zooming=!0,this._rotating=s!==h,this._pitching=f!==l,this._padding=!a.isPaddingEqual(p),this._prepareEase(r,!1),this._ease((function(t){var i=t*D,d=1/P(i);a.zoom=1===t?u:o+a.scaleZoom(d),n._rotating&&(a.bearing=e.number(s,h,t)),n._pitching&&(a.pitch=e.number(l,f,t)),n._padding&&(a.interpolatePadding(c,p,t),g=a.centerPoint.add(m));var y=1===t?v:a.unproject(x.add(_.mult(z(i))).mult(d));a.setLocationAtPoint(a.renderWorldCopies?y.wrap():y,g),n._fireMoveEvents(r)}),(function(){return n._afterEase(r)}),t),this},r.prototype.isEasing=function(){return!!this._easeFrameId},r.prototype.stop=function(){return this._stop()},r.prototype._stop=function(e,t){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var r=this._onEaseEnd;delete this._onEaseEnd,r.call(this,t)}if(!e){var n=this.handlers;n&&n.stop(!1)}return this},r.prototype._ease=function(t,r,n){!1===n.animate||0===n.duration?(t(1),r()):(this._easeStart=e.browser.now(),this._easeOptions=n,this._onEaseFrame=t,this._onEaseEnd=r,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},r.prototype._renderFrameCallback=function(){var t=Math.min((e.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(t)),t<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},r.prototype._normalizeBearing=function(t,r){t=e.wrap(t,-180,180);var n=Math.abs(t-r);return Math.abs(t-360-r)180?-360:r<-180?360:0}},r}(e.Evented),Mi=function(t){void 0===t&&(t={}),this.options=t,e.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};Mi.prototype.getDefaultPosition=function(){return"bottom-right"},Mi.prototype.onAdd=function(e){var t=this.options&&this.options.compact;return this._map=e,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=r.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=r.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),t&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),void 0===t&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Mi.prototype.onRemove=function(){r.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},Mi.prototype._setElementTitle=function(e,t){var r=this._map._getUIString("AttributionControl."+t);e.title=r,e.setAttribute("aria-label",r)},Mi.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},Mi.prototype._updateEditLink=function(){var t=this._editLink;t||(t=this._editLink=this._container.querySelector(".mapbox-improve-map"));var r=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||e.config.ACCESS_TOKEN}];if(t){var n=r.reduce((function(e,t,n){return t.value&&(e+=t.key+"="+t.value+(n=0)return!1;return!0}))).join(" | ");o!==this._attribHTML&&(this._attribHTML=o,e.length?(this._innerContainer.innerHTML=o,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Mi.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var Si=function(){e.bindAll(["_updateLogo"],this),e.bindAll(["_updateCompact"],this)};Si.prototype.onAdd=function(e){this._map=e,this._container=r.create("div","mapboxgl-ctrl");var t=r.create("a","mapboxgl-ctrl-logo");return t.target="_blank",t.rel="noopener nofollow",t.href="https://www.mapbox.com/",t.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),t.setAttribute("rel","noopener nofollow"),this._container.appendChild(t),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Si.prototype.onRemove=function(){r.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Si.prototype.getDefaultPosition=function(){return"bottom-left"},Si.prototype._updateLogo=function(e){(!e||"metadata"===e.sourceDataType)&&(this._container.style.display=this._logoRequired()?"block":"none")},Si.prototype._logoRequired=function(){if(this._map.style){var e=this._map.style.sourceCaches;for(var t in e)if(e[t].getSource().mapbox_logo)return!0;return!1}},Si.prototype._updateCompact=function(){var e=this._container.children;if(e.length){var t=e[0];this._map.getCanvasContainer().offsetWidth<250?t.classList.add("mapboxgl-compact"):t.classList.remove("mapboxgl-compact")}};var Ei=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Ei.prototype.add=function(e){var t=++this._id;return this._queue.push({callback:e,id:t,cancelled:!1}),t},Ei.prototype.remove=function(e){for(var t=this._currentlyRunning,r=0,n=t?this._queue.concat(t):this._queue;rt.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=t.minPitch&&null!=t.maxPitch&&t.minPitch>t.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=t.minPitch&&t.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=t.maxPitch&&t.maxPitch>60)throw new Error("maxPitch must be less than or equal to 60");var i=new En(t.minZoom,t.maxZoom,t.minPitch,t.maxPitch,t.renderWorldCopies);if(n.call(this,i,t),this._interactive=t.interactive,this._maxTileCacheSize=t.maxTileCacheSize,this._failIfMajorPerformanceCaveat=t.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=t.preserveDrawingBuffer,this._antialias=t.antialias,this._trackResize=t.trackResize,this._bearingSnap=t.bearingSnap,this._refreshExpiredTiles=t.refreshExpiredTiles,this._fadeDuration=t.fadeDuration,this._crossSourceCollisions=t.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=t.collectResourceTiming,this._renderTaskQueue=new Ei,this._controls=[],this._mapId=e.uniqueId(),this._locale=e.extend({},Ci,t.locale),this._clickTolerance=t.clickTolerance,this._requestManager=new e.RequestManager(t.transformRequest,t.accessToken),"string"==typeof t.container){if(this._container=e.window.document.getElementById(t.container),!this._container)throw new Error("Container '"+t.container+"' not found.")}else{if(!(t.container instanceof Li))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=t.container}if(t.maxBounds&&this.setMaxBounds(t.maxBounds),e.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",(function(){return r._update(!1)})),this.on("moveend",(function(){return r._update(!1)})),this.on("zoom",(function(){return r._update(!0)})),typeof e.window<"u"&&(e.window.addEventListener("online",this._onWindowOnline,!1),e.window.addEventListener("resize",this._onWindowResize,!1),e.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new ki(this,t);var a="string"==typeof t.hash&&t.hash||void 0;this._hash=t.hash&&new In(a).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:t.center,zoom:t.zoom,bearing:t.bearing,pitch:t.pitch}),t.bounds&&(this.resize(),this.fitBounds(t.bounds,e.extend({},t.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=t.localIdeographFontFamily,t.style&&this.setStyle(t.style,{localIdeographFontFamily:t.localIdeographFontFamily}),t.attributionControl&&this.addControl(new Mi({customAttribution:t.customAttribution})),this.addControl(new Si,t.logoPosition),this.on("style.load",(function(){r.transform.unmodified&&r.jumpTo(r.style.stylesheet)})),this.on("data",(function(t){r._update("style"===t.dataType),r.fire(new e.Event(t.dataType+"data",t))})),this.on("dataloading",(function(t){r.fire(new e.Event(t.dataType+"dataloading",t))}))}n&&(i.__proto__=n),i.prototype=Object.create(n&&n.prototype),i.prototype.constructor=i;var a={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return i.prototype._getMapId=function(){return this._mapId},i.prototype.addControl=function(t,r){if(void 0===r&&(r=t.getDefaultPosition?t.getDefaultPosition():"top-right"),!t||!t.onAdd)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var n=t.onAdd(this);this._controls.push(t);var i=this._controlPositions[r];return-1!==r.indexOf("bottom")?i.insertBefore(n,i.firstChild):i.appendChild(n),this},i.prototype.removeControl=function(t){if(!t||!t.onRemove)return this.fire(new e.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var r=this._controls.indexOf(t);return r>-1&&this._controls.splice(r,1),t.onRemove(this),this},i.prototype.hasControl=function(e){return this._controls.indexOf(e)>-1},i.prototype.resize=function(t){var r=this._containerDimensions(),n=r[0],i=r[1];this._resizeCanvas(n,i),this.transform.resize(n,i),this.painter.resize(n,i);var a=!this._moving;return a&&(this.stop(),this.fire(new e.Event("movestart",t)).fire(new e.Event("move",t))),this.fire(new e.Event("resize",t)),a&&this.fire(new e.Event("moveend",t)),this},i.prototype.getBounds=function(){return this.transform.getBounds()},i.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},i.prototype.setMaxBounds=function(t){return this.transform.setMaxBounds(e.LngLatBounds.convert(t)),this._update()},i.prototype.setMinZoom=function(e){if((e=e??-2)>=-2&&e<=this.transform.maxZoom)return this.transform.minZoom=e,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=e,this._update(),this.getZoom()>e&&this.setZoom(e),this;throw new Error("maxZoom must be greater than the current minZoom")},i.prototype.getMaxZoom=function(){return this.transform.maxZoom},i.prototype.setMinPitch=function(e){if((e=e??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(e>=0&&e<=this.transform.maxPitch)return this.transform.minPitch=e,this._update(),this.getPitch()60)throw new Error("maxPitch must be less than or equal to 60");if(e>=this.transform.minPitch)return this.transform.maxPitch=e,this._update(),this.getPitch()>e&&this.setPitch(e),this;throw new Error("maxPitch must be greater than the current minPitch")},i.prototype.getMaxPitch=function(){return this.transform.maxPitch},i.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},i.prototype.setRenderWorldCopies=function(e){return this.transform.renderWorldCopies=e,this._update()},i.prototype.project=function(t){return this.transform.locationPoint(e.LngLat.convert(t))},i.prototype.unproject=function(t){return this.transform.pointLocation(e.Point.convert(t))},i.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},i.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},i.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},i.prototype._createDelegatedListener=function(e,t,r){var n,i=this;if("mouseenter"===e||"mouseover"===e){var a=!1;return{layer:t,listener:r,delegates:{mousemove:function(n){var o=i.getLayer(t)?i.queryRenderedFeatures(n.point,{layers:[t]}):[];o.length?a||(a=!0,r.call(i,new jn(e,i,n.originalEvent,{features:o}))):a=!1},mouseout:function(){a=!1}}}}if("mouseleave"===e||"mouseout"===e){var o=!1;return{layer:t,listener:r,delegates:{mousemove:function(n){(i.getLayer(t)?i.queryRenderedFeatures(n.point,{layers:[t]}):[]).length?o=!0:o&&(o=!1,r.call(i,new jn(e,i,n.originalEvent)))},mouseout:function(t){o&&(o=!1,r.call(i,new jn(e,i,t.originalEvent)))}}}}return{layer:t,listener:r,delegates:(n={},n[e]=function(e){var n=i.getLayer(t)?i.queryRenderedFeatures(e.point,{layers:[t]}):[];n.length&&(e.features=n,r.call(i,e),delete e.features)},n)}},i.prototype.on=function(e,t,r){if(void 0===r)return n.prototype.on.call(this,e,t);var i=this._createDelegatedListener(e,t,r);for(var a in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[e]=this._delegatedListeners[e]||[],this._delegatedListeners[e].push(i),i.delegates)this.on(a,i.delegates[a]);return this},i.prototype.once=function(e,t,r){if(void 0===r)return n.prototype.once.call(this,e,t);var i=this._createDelegatedListener(e,t,r);for(var a in i.delegates)this.once(a,i.delegates[a]);return this},i.prototype.off=function(e,t,r){var i=this;return void 0===r?n.prototype.off.call(this,e,t):(this._delegatedListeners&&this._delegatedListeners[e]&&function(n){for(var a=n[e],o=0;o180;){var s=n.locationPoint(t);if(s.x>=0&&s.y>=0&&s.x<=n.width&&s.y<=n.height)break;t.lng>n.center.lng?t.lng-=360:t.lng+=360}return t}Bi.prototype.down=function(e,t){this.mouseRotate.mousedown(e,t),this.mousePitch&&this.mousePitch.mousedown(e,t),r.disableDrag()},Bi.prototype.move=function(e,t){var r=this.map,n=this.mouseRotate.mousemoveWindow(e,t);if(n&&n.bearingDelta&&r.setBearing(r.getBearing()+n.bearingDelta),this.mousePitch){var i=this.mousePitch.mousemoveWindow(e,t);i&&i.pitchDelta&&r.setPitch(r.getPitch()+i.pitchDelta)}},Bi.prototype.off=function(){var e=this.element;r.removeEventListener(e,"mousedown",this.mousedown),r.removeEventListener(e,"touchstart",this.touchstart,{passive:!1}),r.removeEventListener(e,"touchmove",this.touchmove),r.removeEventListener(e,"touchend",this.touchend),r.removeEventListener(e,"touchcancel",this.reset),this.offTemp()},Bi.prototype.offTemp=function(){r.enableDrag(),r.removeEventListener(e.window,"mousemove",this.mousemove),r.removeEventListener(e.window,"mouseup",this.mouseup)},Bi.prototype.mousedown=function(t){this.down(e.extend({},t,{ctrlKey:!0,preventDefault:function(){return t.preventDefault()}}),r.mousePos(this.element,t)),r.addEventListener(e.window,"mousemove",this.mousemove),r.addEventListener(e.window,"mouseup",this.mouseup)},Bi.prototype.mousemove=function(e){this.move(e,r.mousePos(this.element,e))},Bi.prototype.mouseup=function(e){this.mouseRotate.mouseupWindow(e),this.mousePitch&&this.mousePitch.mouseupWindow(e),this.offTemp()},Bi.prototype.touchstart=function(e){1!==e.targetTouches.length?this.reset():(this._startPos=this._lastPos=r.touchPos(this.element,e.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return e.preventDefault()}},this._startPos))},Bi.prototype.touchmove=function(e){1!==e.targetTouches.length?this.reset():(this._lastPos=r.touchPos(this.element,e.targetTouches)[0],this.move({preventDefault:function(){return e.preventDefault()}},this._lastPos))},Bi.prototype.touchend=function(e){0===e.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)=r}this._isDragging&&(this._pos=t.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new e.Event("dragstart"))),this.fire(new e.Event("drag")))},n.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new e.Event("dragend")),this._state="inactive"},n.prototype._addDragHandler=function(e){this._element.contains(e.originalEvent.target)&&(e.preventDefault(),this._positionDelta=e.point.sub(this._pos).add(this._offset),this._pointerdownPos=e.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},n.prototype.setDraggable=function(e){return this._draggable=!!e,this._map&&(e?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},n.prototype.isDraggable=function(){return this._draggable},n.prototype.setRotation=function(e){return this._rotation=e||0,this._update(),this},n.prototype.getRotation=function(){return this._rotation},n.prototype.setRotationAlignment=function(e){return this._rotationAlignment=e||"auto",this._update(),this},n.prototype.getRotationAlignment=function(){return this._rotationAlignment},n.prototype.setPitchAlignment=function(e){return this._pitchAlignment=e&&"auto"!==e?e:this._rotationAlignment,this._update(),this},n.prototype.getPitchAlignment=function(){return this._pitchAlignment},n}(e.Evented),Hi={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Gi=0,Wi=!1,Zi=function(t){function n(r){t.call(this),this.options=e.extend({},Hi,r),e.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.onAdd=function(t){return this._map=t,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),function(t){void 0!==Vi?t(Vi):void 0!==e.window.navigator.permissions?e.window.navigator.permissions.query({name:"geolocation"}).then((function(e){Vi="denied"!==e.state,t(Vi)})):(Vi=!!e.window.navigator.geolocation,t(Vi))}(this._setupUI),this._container},n.prototype.onRemove=function(){void 0!==this._geolocationWatchID&&(e.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),r.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Gi=0,Wi=!1},n.prototype._isOutOfMapMaxBounds=function(e){var t=this._map.getMaxBounds(),r=e.coords;return t&&(r.longitudet.getEast()||r.latitudet.getNorth())},n.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}},n.prototype._onSuccess=function(t){if(this._map){if(this._isOutOfMapMaxBounds(t))return this._setErrorState(),this.fire(new e.Event("outofmaxbounds",t)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=t,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(t),(!this.options.trackUserLocation||"ACTIVE_LOCK"===this._watchState)&&this._updateCamera(t),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("geolocate",t)),this._finish()}},n.prototype._updateCamera=function(t){var r=new e.LngLat(t.coords.longitude,t.coords.latitude),n=t.coords.accuracy,i=this._map.getBearing(),a=e.extend({bearing:i},this.options.fitBoundsOptions);this._map.fitBounds(r.toBounds(n),a,{geolocateSource:!0})},n.prototype._updateMarker=function(t){if(t){var r=new e.LngLat(t.coords.longitude,t.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=t.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},n.prototype._updateCircleRadius=function(){var e=this._map._container.clientHeight/2,t=this._map.unproject([0,e]),r=this._map.unproject([1,e]),n=t.distanceTo(r),i=Math.ceil(2*this._accuracy/n);this._circleElement.style.width=i+"px",this._circleElement.style.height=i+"px"},n.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},n.prototype._onError=function(t){if(this._map){if(this.options.trackUserLocation)if(1===t.code){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var r=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=r,this._geolocateButton.setAttribute("aria-label",r),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===t.code&&Wi)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new e.Event("error",t)),this._finish()}},n.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},n.prototype._setupUI=function(t){var n=this;if(this._container.addEventListener("contextmenu",(function(e){return e.preventDefault()})),this._geolocateButton=r.create("button","mapboxgl-ctrl-geolocate",this._container),r.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",!1===t){e.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var i=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=i,this._geolocateButton.setAttribute("aria-label",i)}else{var a=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=a,this._geolocateButton.setAttribute("aria-label",a)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=r.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new qi(this._dotElement),this._circleElement=r.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new qi({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(function(t){var r=t.originalEvent&&"resize"===t.originalEvent.type;!t.geolocateSource&&"ACTIVE_LOCK"===n._watchState&&!r&&(n._watchState="BACKGROUND",n._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),n._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),n.fire(new e.Event("trackuserlocationend")))}))},n.prototype.trigger=function(){if(!this._setup)return e.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new e.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Gi--,Wi=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new e.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new e.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){var t;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++Gi>1?(t={maximumAge:6e5,timeout:0},Wi=!0):(t=this.options.positionOptions,Wi=!1),this._geolocationWatchID=e.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,t)}}else e.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},n.prototype._clearWatch=function(){e.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},n}(e.Evented),Yi={maxWidth:100,unit:"metric"},Xi=function(t){this.options=e.extend({},Yi,t),e.bindAll(["_onMove","setUnit"],this)};function $i(e,t,r){var n=r&&r.maxWidth||100,i=e._container.clientHeight/2,a=e.unproject([0,i]),o=e.unproject([n,i]),s=a.distanceTo(o);if(r&&"imperial"===r.unit){var l=3.2808*s;l>5280?Ki(t,n,l/5280,e._getUIString("ScaleControl.Miles")):Ki(t,n,l,e._getUIString("ScaleControl.Feet"))}else r&&"nautical"===r.unit?Ki(t,n,s/1852,e._getUIString("ScaleControl.NauticalMiles")):s>=1e3?Ki(t,n,s/1e3,e._getUIString("ScaleControl.Kilometers")):Ki(t,n,s,e._getUIString("ScaleControl.Meters"))}function Ki(e,t,r,n){var i=function(e){var t=Math.pow(10,(""+Math.floor(e)).length-1),r=e/t;return r=r>=10?10:r>=5?5:r>=3?3:r>=2?2:r>=1?1:function(e){var t=Math.pow(10,Math.ceil(-Math.log(e)/Math.LN10));return Math.round(e*t)/t}(r),t*r}(r),a=i/r;e.style.width=t*a+"px",e.innerHTML=i+" "+n}Xi.prototype.getDefaultPosition=function(){return"bottom-left"},Xi.prototype._onMove=function(){$i(this._map,this._container,this.options)},Xi.prototype.onAdd=function(e){return this._map=e,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",e.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Xi.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Xi.prototype.setUnit=function(e){this.options.unit=e,$i(this._map,this._container,this.options)};var Ji=function(t){this._fullscreen=!1,t&&t.container&&(t.container instanceof e.window.HTMLElement?this._container=t.container:e.warnOnce("Full screen control 'container' must be a DOM element.")),e.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in e.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in e.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in e.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in e.window.document&&(this._fullscreenchange="MSFullscreenChange")};Ji.prototype.onAdd=function(t){return this._map=t,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",e.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Ji.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,e.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Ji.prototype._checkFullscreenSupport=function(){return!!(e.window.document.fullscreenEnabled||e.window.document.mozFullScreenEnabled||e.window.document.msFullscreenEnabled||e.window.document.webkitFullscreenEnabled)},Ji.prototype._setupUI=function(){var t=this._fullscreenButton=r.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);r.create("span","mapboxgl-ctrl-icon",t).setAttribute("aria-hidden",!0),t.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),e.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Ji.prototype._updateTitle=function(){var e=this._getTitle();this._fullscreenButton.setAttribute("aria-label",e),this._fullscreenButton.title=e},Ji.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Ji.prototype._isFullscreen=function(){return this._fullscreen},Ji.prototype._changeIcon=function(){(e.window.document.fullscreenElement||e.window.document.mozFullScreenElement||e.window.document.webkitFullscreenElement||e.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},Ji.prototype._onClickFullscreen=function(){this._isFullscreen()?e.window.document.exitFullscreen?e.window.document.exitFullscreen():e.window.document.mozCancelFullScreen?e.window.document.mozCancelFullScreen():e.window.document.msExitFullscreen?e.window.document.msExitFullscreen():e.window.document.webkitCancelFullScreen&&e.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Qi={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},ea=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),ta=function(t){function n(r){t.call(this),this.options=e.extend(Object.create(Qi),r),e.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n.prototype.addTo=function(t){return this._map&&this.remove(),this._map=t,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new e.Event("open")),this},n.prototype.isOpen=function(){return!!this._map},n.prototype.remove=function(){return this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new e.Event("close")),this},n.prototype.getLngLat=function(){return this._lngLat},n.prototype.setLngLat=function(t){return this._lngLat=e.LngLat.convert(t),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},n.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},n.prototype.getElement=function(){return this._container},n.prototype.setText=function(t){return this.setDOMContent(e.window.document.createTextNode(t))},n.prototype.setHTML=function(t){var r,n=e.window.document.createDocumentFragment(),i=e.window.document.createElement("body");for(i.innerHTML=t;r=i.firstChild;)n.appendChild(r);return this.setDOMContent(n)},n.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},n.prototype.setMaxWidth=function(e){return this.options.maxWidth=e,this._update(),this},n.prototype.setDOMContent=function(e){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=r.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(e),this._createCloseButton(),this._update(),this._focusFirstElement(),this},n.prototype.addClassName=function(e){this._container&&this._container.classList.add(e)},n.prototype.removeClassName=function(e){this._container&&this._container.classList.remove(e)},n.prototype.setOffset=function(e){return this.options.offset=e,this._update(),this},n.prototype.toggleClassName=function(e){if(this._container)return this._container.classList.toggle(e)},n.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=r.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},n.prototype._onMouseUp=function(e){this._update(e.point)},n.prototype._onMouseMove=function(e){this._update(e.point)},n.prototype._onDrag=function(e){this._update(e.point)},n.prototype._update=function(e){var t=this,n=this._lngLat||this._trackPointer;if(this._map&&n&&this._content&&(this._container||(this._container=r.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=r.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach((function(e){return t._container.classList.add(e)})),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=ji(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||e)){var i=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat),a=this.options.anchor,o=ra(this.options.offset);if(!a){var s,l=this._container.offsetWidth,c=this._container.offsetHeight;s=i.y+o.bottom.ythis._map.transform.height-c?["bottom"]:[],i.xthis._map.transform.width-l/2&&s.push("right"),a=0===s.length?"bottom":s.join("-")}var u=i.add(o[a]).round();r.setTransform(this._container,Ni[a]+" translate("+u.x+"px,"+u.y+"px)"),Ui(this._container,a,"popup")}},n.prototype._focusFirstElement=function(){if(this.options.focusAfterOpen&&this._container){var e=this._container.querySelector(ea);e&&e.focus()}},n.prototype._onClose=function(){this.remove()},n}(e.Evented);function ra(t){if(t){if("number"==typeof t){var r=Math.round(Math.sqrt(.5*Math.pow(t,2)));return{center:new e.Point(0,0),top:new e.Point(0,t),"top-left":new e.Point(r,r),"top-right":new e.Point(-r,r),bottom:new e.Point(0,-t),"bottom-left":new e.Point(r,-r),"bottom-right":new e.Point(-r,-r),left:new e.Point(t,0),right:new e.Point(-t,0)}}if(t instanceof e.Point||Array.isArray(t)){var n=e.Point.convert(t);return{center:n,top:n,"top-left":n,"top-right":n,bottom:n,"bottom-left":n,"bottom-right":n,left:n,right:n}}return{center:e.Point.convert(t.center||[0,0]),top:e.Point.convert(t.top||[0,0]),"top-left":e.Point.convert(t["top-left"]||[0,0]),"top-right":e.Point.convert(t["top-right"]||[0,0]),bottom:e.Point.convert(t.bottom||[0,0]),"bottom-left":e.Point.convert(t["bottom-left"]||[0,0]),"bottom-right":e.Point.convert(t["bottom-right"]||[0,0]),left:e.Point.convert(t.left||[0,0]),right:e.Point.convert(t.right||[0,0])}}return ra(new e.Point(0,0))}var na={version:e.version,supported:t,setRTLTextPlugin:e.setRTLTextPlugin,getRTLTextPluginStatus:e.getRTLTextPluginStatus,Map:Di,NavigationControl:Fi,GeolocateControl:Zi,AttributionControl:Mi,ScaleControl:Xi,FullscreenControl:Ji,Popup:ta,Marker:qi,Style:Gt,LngLat:e.LngLat,LngLatBounds:e.LngLatBounds,Point:e.Point,MercatorCoordinate:e.MercatorCoordinate,Evented:e.Evented,config:e.config,prewarm:function(){je().acquire(Oe)},clearPrewarmedResources:function(){var e=Fe;e&&(e.isPreloaded()&&1===e.numActive()?(e.release(Oe),Fe=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return e.config.ACCESS_TOKEN},set accessToken(t){e.config.ACCESS_TOKEN=t},get baseApiUrl(){return e.config.API_URL},set baseApiUrl(t){e.config.API_URL=t},get workerCount(){return Re.workerCount},set workerCount(e){Re.workerCount=e},get maxParallelImageRequests(){return e.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(t){e.config.MAX_PARALLEL_IMAGE_REQUESTS=t},clearStorage:function(t){e.clearTileCache(t)},workerUrl:""};return na})),r},"object"==typeof e&&typeof t<"u"?t.exports=n():(r=r||self).mapboxgl=n()}}),U_=m({"src/plots/mapbox/layers.js"(e,t){var r=ct(),n=Et().sanitizeHTML,i=D_(),a=E_();function o(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=a.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var s=o.prototype;function l(e){if(!e.visible)return!1;var t=e.source;if(Array.isArray(t)&&t.length>0){for(var n=0;n0}function c(e){var t={},n={};switch(e.type){case"circle":r.extendFlat(n,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":r.extendFlat(n,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":r.extendFlat(n,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var a=e.symbol,o=i(a.textposition,a.iconsize);r.extendFlat(t,{"icon-image":a.icon+"-15","icon-size":a.iconsize/10,"text-field":a.text,"text-size":a.textfont.size,"text-anchor":o.anchor,"text-offset":o.offset,"symbol-placement":a.placement}),r.extendFlat(n,{"icon-color":e.color,"text-color":a.textfont.color,"text-opacity":e.opacity});break;case"raster":r.extendFlat(n,{"raster-fade-duration":0,"raster-opacity":e.opacity})}return{layout:t,paint:n}}s.update=function(e){this.visible?this.needsNewImage(e)?this.updateImage(e):this.needsNewSource(e)?(this.removeLayer(),this.updateSource(e),this.updateLayer(e)):this.needsNewLayer(e)?this.updateLayer(e):this.updateStyle(e):(this.updateSource(e),this.updateLayer(e)),this.visible=l(e)},s.needsNewImage=function(e){return this.subplot.map.getSource(this.idSource)&&"image"===this.sourceType&&"image"===e.sourcetype&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))},s.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type},s.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},s.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},s.updateImage=function(e){this.subplot.map.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var t=this.findFollowingMapboxLayerId(this.lookupBelow());null!==t&&this.subplot.map.moveLayer(this.idLayer,t)},s.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,l(e)){var r=function(e){var t,r=e.sourcetype,i=e.source,a={type:r};return"geojson"===r?t="data":"vector"===r?t="string"==typeof i?"url":"tiles":"raster"===r?(t="tiles",a.tileSize=256):"image"===r&&(t="url",a.coordinates=e.coordinates),a[t]=i,e.sourceattribution&&(a.attribution=n(e.sourceattribution)),a}(e);t.addSource(this.idSource,r)}},s.findFollowingMapboxLayerId=function(e){if("traces"===e)for(var t=this.subplot.getMapLayers(),r=0;r1)for(r=0;r-1&&m(t.originalEvent,n,[r.xaxis],[r.yaxis],r.id,e),i.indexOf("event")>-1&&l.click(n,t.originalEvent)}}},x.updateFx=function(e){var t=this,r=t.map,i=t.gd;if(!t.isStatic){var a,o=e.dragmode;a=function(e,r){r.isRect?(e.range={})[t.id]=[c([r.xmin,r.ymin]),c([r.xmax,r.ymax])]:(e.lassoPoints={})[t.id]=r.map(c)};var l=t.dragOptions;t.dragOptions=n.extendDeep(l||{},{dragmode:e.dragmode,element:t.div,gd:i,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:a},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),h(o)||u(o)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(e,r,n){f(e,r,n,t.dragOptions,o)},s.init(t.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener("touchstart",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on("click",t.onClickInPanHandler))}function c(e){var r=t.map.unproject(e);return[r.lng,r.lat]}},x.updateFramework=function(e){var t=e[this.id].domain,r=e._size,n=this.div.style;n.width=r.w*(t.x[1]-t.x[0])+"px",n.height=r.h*(t.y[1]-t.y[0])+"px",n.left=r.l+t.x[0]*r.w+"px",n.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])},x.updateLayers=function(e){var t,r=e[this.id].layers,n=this.layerList;if(r.length!==n.length){for(t=0;t1&&r.warn(f.multipleTokensErrorMsg),i[0]):(a.length&&r.log(["Listed mapbox access token(s)",a.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}(e,o);t.accessToken=s;for(var l=0;lw/2){var T=v.split("|").join("
");_.text(T).attr("data-unformatted",T).call(c.convertToTspans,e),b=l.bBox(_.node())}_.attr("transform",n(-3,8-b.height)),x.insert("rect",".static-attribution").attr({x:-b.width-6,y:-b.height-3,width:b.width+6,height:b.height+3,fill:"rgba(255, 255, 255, 0.75)"});var k=1;b.width+6>w&&(k=w/(b.width+6));var A=[a.l+a.w*d.x[1],a.t+a.h*(1-d.y[0])];x.attr("transform",n(A[0],A[1])+i(k))}},e.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[h],n=0;n=0;r--)e.removeLayer(t[r][1])},o.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},t.exports=function(e,t){var n=t[0].trace,i=new a(e,n.uid),o=i.sourceId,s=r(t),l=i.below=e.belowLookup["trace-"+n.uid];return e.map.addSource(o,{type:"geojson",data:s.geojson}),i._addLayers(s,l),t[0].trace._glTrace=i,i}}}),K_=m({"src/traces/choroplethmapbox/index.js"(e,t){["*choroplethmapbox* trace is deprecated!","Please consider switching to the *choroplethmap* trace type and `map` subplots.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" "),t.exports={attributes:Z_(),supplyDefaults:Y_(),colorbar:Vo(),calc:jg(),plot:$_(),hoverPoints:Vg(),eventData:qg(),selectPoints:Hg(),styleOnSelect:function(e,t){t&&t[0].trace._glTrace.updateOnSelect(t)},getBelow:function(e,t){for(var r=t.getMapLayers(),n=r.length-2;n>=0;n--){var i=r[n].id;if("string"==typeof i&&0===i.indexOf("water"))for(var a=n+1;a0?+p[u]:0),h.push({type:"Feature",geometry:{type:"Point",coordinates:y},properties:v})}}var _=a.extractOpts(t),b=_.reversescale?a.flipScale(_.colorscale):_.colorscale,w=b[0][1],T=["interpolate",["linear"],["heatmap-density"],0,i.opacity(w)<1?w:i.addOpacity(w,0)];for(u=1;u=0;r--)e.removeLayer(t[r][1])},a.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},t.exports=function(e,t){var n=t[0].trace,a=new i(e,n.uid),o=a.sourceId,s=r(t),l=a.below=e.belowLookup["trace-"+n.uid];return e.map.addSource(o,{type:"geojson",data:s.geojson}),a._addLayers(s,l),a}}}),ib=m({"src/traces/densitymapbox/hover.js"(e,t){var r=ar(),n=F_().hoverPoints,i=F_().getExtraText;t.exports=function(e,t,a){var o=n(e,t,a);if(o){var s=o[0],l=s.cd,c=l[0].trace,u=l[s.index];if(delete s.color,"z"in u){var h=s.subplot.mockAxis;s.z=u.z,s.zLabel=r.tickText(h,h.c2l(u.z),"hover").text}return s.extraText=i(c,u,l[0].t.labels),[s]}}}}),ab=m({"src/traces/densitymapbox/event_data.js"(e,t){t.exports=function(e,t){return e.lon=t.lon,e.lat=t.lat,e.z=t.z,e}}}),ob=m({"src/traces/densitymapbox/index.js"(e,t){["*densitymapbox* trace is deprecated!","Please consider switching to the *densitymap* trace type and `map` subplots.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" "),t.exports={attributes:Q_(),supplyDefaults:eb(),colorbar:Vo(),formatLabels:z_(),calc:tb(),plot:nb(),hoverPoints:ib(),eventData:ab(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;nESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}},{id:"waterway_tunnel",type:"line",source:"openmaptiles","source-layer":"waterway",minzoom:14,filter:["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]},"line-dasharray":[2,4]}},{id:"waterway-other",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["!in","class","canal","river","stream"],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,2]]}}},{id:"waterway-stream-canal",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]}}},{id:"waterway-river",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["==","class","river"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.2,stops:[[10,.8],[20,4]]},"line-opacity":.5}},{id:"water-offset",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",maxzoom:8,filter:["==","$type","Polygon"],layout:{visibility:"visible"},paint:{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{base:1,stops:[[6,[2,0]],[8,[0,0]]]}}},{id:"water",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{id:"water-pattern",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{id:"landcover-ice-shelf",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"landcover",filter:["==","subclass","ice_shelf"],layout:{visibility:"visible"},paint:{"fill-color":"#fff","fill-opacity":{base:1,stops:[[0,.9],[10,.3]]}}},{id:"tunnel-service-track-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[15,1],[16,4],[20,11]]}}},{id:"tunnel-minor-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,1]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"tunnel-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"tunnel-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.7}},{id:"tunnel-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"tunnel-path",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"tunnel-service-track",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-width":{base:1.2,stops:[[15.5,0],[16,2],[20,7.5]]}}},{id:"tunnel-minor",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor_road"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-opacity":1,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"tunnel-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,10]]}}},{id:"tunnel-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-motorway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#ffdaa6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-railway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]},"line-dasharray":[2,2]}},{id:"ferry",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["in","class","ferry"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{id:"aeroway-taxiway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","taxiway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,2],[17,12]]},"line-opacity":1}},{id:"aeroway-runway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","runway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,5],[17,55]]},"line-opacity":1}},{id:"aeroway-taxiway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","taxiway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,1],[17,10]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"aeroway-runway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","runway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,4],[17,50]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"highway-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-minor-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,0]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"highway-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":.5,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"highway-primary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[7,0],[8,.6]]},"line-width":{base:1.2,stops:[[7,0],[8,.6],[9,1.5],[20,22]]}}},{id:"highway-trunk-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[5,0],[6,.5]]},"line-width":{base:1.2,stops:[[5,0],[6,.6],[7,1.5],[20,22]]}}},{id:"highway-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:4,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[4,0],[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":{stops:[[4,0],[5,.5]]}}},{id:"highway-path",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"highway-motorway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-minor",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fff","line-opacity":.5,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"highway-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[8,.5],[20,13]]},"line-opacity":.5}},{id:"highway-primary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[8.5,0],[9,.5],[20,18]]},"line-opacity":0}},{id:"highway-trunk",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"highway-motorway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"railway-transit",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-transit-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway-service",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-service-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"railway-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"bridge-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,28]]}}},{id:"bridge-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"hsl(28, 76%, 67%)","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,26]]}}},{id:"bridge-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"bridge-path-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#f8f4f0","line-width":{base:1.2,stops:[[15,1.2],[20,18]]}}},{id:"bridge-path",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#cba","line-width":{base:1.2,stops:[[15,1.2],[20,4]]},"line-dasharray":[1.5,.75]}},{id:"bridge-motorway-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,20]]}}},{id:"bridge-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]}}},{id:"bridge-motorway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"bridge-railway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"bridge-railway-hatching",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"cablecar",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,1],[19,2.5]]}}},{id:"cablecar-dash",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{id:"boundary-land-level-4",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],layout:{"line-join":"round"},paint:{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{base:1.4,stops:[[4,.4],[5,1],[12,3]]},"line-opacity":.6}},{id:"boundary-land-level-2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 66%)","line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,2]]}}},{id:"boundary-land-disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=","maritime",1],["==","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,8]]}}},{id:"boundary-water",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["in","admin_level",2,4],["==","maritime",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(154, 189, 214, 1)","line-width":{base:1,stops:[[0,.6],[4,1],[5,1],[12,1]]},"line-opacity":{stops:[[6,0],[10,0]]}}},{id:"waterway-name",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:13,filter:["all",["==","$type","LineString"],["has","name"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":.2,"symbol-spacing":350},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-lakeline",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==","$type","LineString"],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}\n{name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-ocean",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["==","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-other",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["!in","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":{stops:[[0,10],[6,14]]},"text-field":"{name:latin}\n{name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2,visibility:"visible"},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"poi-level-3",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:16,filter:["all",["==","$type","Point"],[">=","rank",25]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\n{name:nonlatin}","text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-2",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:15,filter:["all",["==","$type","Point"],["<=","rank",24],[">=","rank",15]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\n{name:nonlatin}","text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-1",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:14,filter:["all",["==","$type","Point"],["<=","rank",14],["has","name"]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\n{name:nonlatin}","text-offset":[0,.6],"text-size":11,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"rgba(191, 228, 172, 1)","text-halo-width":1,"text-halo-color":"rgba(30, 29, 29, 1)"}},{id:"poi-railway",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:13,filter:["all",["==","$type","Point"],["has","name"],["==","class","railway"],["==","subclass","station"]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\n{name:nonlatin}","text-offset":[0,.6],"text-size":12,"text-max-width":9,"icon-optional":!1,"icon-ignore-placement":!1,"icon-allow-overlap":!1,"text-ignore-placement":!1,"text-allow-overlap":!1,"text-optional":!0},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"road_oneway",type:"symbol",source:"openmaptiles","source-layer":"transportation",minzoom:15,filter:["all",["==","oneway",1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],layout:{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":90,"icon-size":{stops:[[15,.5],[19,1]]}},paint:{"icon-opacity":.5}},{id:"road_oneway_opposite",type:"symbol",source:"openmaptiles","source-layer":"transportation",minzoom:15,filter:["all",["==","oneway",-1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],layout:{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":-90,"icon-size":{stops:[[15,.5],[19,1]]}},paint:{"icon-opacity":.5}},{id:"highway-name-path",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15.5,filter:["==","class","path"],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-color":"#f8f4f0","text-color":"hsl(30, 23%, 62%)","text-halo-width":.5}},{id:"highway-name-minor",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15,filter:["all",["==","$type","LineString"],["in","class","minor","service","track"]],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-blur":.5,"text-color":"#765","text-halo-width":1}},{id:"highway-name-major",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12.2,filter:["in","class","primary","secondary","tertiary","trunk"],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-blur":.5,"text-color":"#765","text-halo-width":1}},{id:"highway-shield",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:8,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["!in","network","us-interstate","us-highway","us-state"]],layout:{"text-size":10,"icon-image":"road_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-opacity":1,"text-color":"rgba(20, 19, 19, 1)","text-halo-color":"rgba(230, 221, 221, 0)","text-halo-width":2,"icon-color":"rgba(183, 18, 18, 1)","icon-opacity":.3,"icon-halo-color":"rgba(183, 55, 55, 0)"}},{id:"highway-shield-us-interstate",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:7,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-interstate"]],layout:{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[7,"point"],[7,"line"],[8,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-color":"rgba(0, 0, 0, 1)"}},{id:"highway-shield-us-other",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:9,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-highway","us-state"]],layout:{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-color":"rgba(0, 0, 0, 1)"}},{id:"place-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",minzoom:12,filter:["!in","class","city","town","village","country","continent"],layout:{"text-letter-spacing":.1,"text-size":{base:1.2,stops:[[12,10],[15,14]]},"text-font":["Noto Sans Bold"],"text-field":"{name:latin}\n{name:nonlatin}","text-transform":"uppercase","text-max-width":9,visibility:"visible"},paint:{"text-color":"rgba(255,255,255,1)","text-halo-width":1.2,"text-halo-color":"rgba(57, 28, 28, 1)"}},{id:"place-village",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",minzoom:10,filter:["==","class","village"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,12],[15,16]]},"text-field":"{name:latin}\n{name:nonlatin}","text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(10, 9, 9, 0.8)"}},{id:"place-town",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["==","class","town"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,14],[15,24]]},"text-field":"{name:latin}\n{name:nonlatin}","text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(22, 22, 22, 0.8)"}},{id:"place-city",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["!=","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":"{name:latin}\n{name:nonlatin}","text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-city-capital",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":"{name:latin}\n{name:nonlatin}","text-max-width":8,"icon-image":"star_11","text-offset":[.4,0],"icon-size":.8,"text-anchor":"left",visibility:"visible"},paint:{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],layout:{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-3",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-2",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-1",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-continent",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",maxzoom:1,filter:["==","class","continent"],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase",visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],id:"qebnlkra6"}}}),cb=m({"src/plots/map/styles/arcgis-sat.js"(e,t){t.exports={version:8,name:"orto",metadata:{},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}}]}}}),ub=m({"src/plots/map/constants.js"(e,t){var r=Ye(),n=lb(),i="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",a="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",o="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",s={basic:o,streets:o,outdoors:o,light:i,dark:a,satellite:cb(),"satellite-streets":n,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:'© OpenStreetMap contributors',tiles:["https://tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":i,"carto-darkmatter":a,"carto-voyager":o,"carto-positron-nolabels":"https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json","carto-darkmatter-nolabels":"https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json","carto-voyager-nolabels":"https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json"},l=r(s);t.exports={styleValueDflt:"basic",stylesMap:s,styleValuesMap:l,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",l.join(", "),"or use a tile service."].join("\n"),mapOnErrorMsg:"Map error."}}}),hb=m({"src/plots/map/layout_attributes.js"(e,t){var r=ct(),n=W().defaultLine,i=Ma().attributes,a=j(),o=kn().textposition,s=De().overrideAll,l=vt().templatedArray,c=ub(),u=a({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});u.family.dflt="Open Sans Regular, Arial Unicode MS Regular",(t.exports=s({_arrayAttrRegexps:[r.counterRegex("map",".layers",!0)],domain:i({name:"map"}),style:{valType:"any",values:c.styleValuesMap,dflt:c.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:l("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:n},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:n}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:u,textposition:r.extendFlat({},o,{arrayOk:!1})}})},"plot","from-root")).uirevision={valType:"any",editType:"none"}}}),fb=m({"src/traces/scattermap/attributes.js"(e,t){var{hovertemplateAttrs:r,texttemplateAttrs:n,templatefallbackAttrs:i}=Fe(),a=Tn(),o=sg(),s=kn(),l=hb(),c=q(),u=zt(),h=B().extendFlat,f=De().overrideAll,p=hb(),d=o.line,m=o.marker;t.exports=f({lon:o.lon,lat:o.lat,cluster:{enabled:{valType:"boolean"},maxzoom:h({},p.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:h({},m.opacity,{dflt:1})},mode:h({},s.mode,{dflt:"markers"}),text:h({},s.text,{}),texttemplate:n({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:i({editType:"plot"}),hovertext:h({},s.hovertext,{}),line:{color:d.color,width:d.width},connectgaps:s.connectgaps,marker:h({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:m.opacity,size:m.size,sizeref:m.sizeref,sizemin:m.sizemin,sizemode:m.sizemode},u("marker")),fill:o.fill,fillcolor:a(),textfont:l.layers.symbol.textfont,textposition:l.layers.symbol.textposition,below:{valType:"string"},selected:{marker:s.selected.marker},unselected:{marker:s.unselected.marker},hoverinfo:h({},c.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:r(),hovertemplatefallback:i()},"calc","nested")}}),pb=m({"src/traces/scattermap/constants.js"(e,t){var r=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];t.exports={isSupportedFont:function(e){return-1!==r.indexOf(e)}}}}),db=m({"src/traces/scattermap/defaults.js"(e,t){var r=ct(),n=Xt(),i=Yn(),a=Xn(),o=Kn(),s=Jn(),l=fb(),c=pb().isSupportedFont;t.exports=function(e,t,u,h){function f(n,i){return r.coerce(e,t,l,n,i)}function p(n,i){return r.coerce2(e,t,l,n,i)}var d=function(e,t,r){var n=r("lon")||[],i=r("lat")||[],a=Math.min(n.length,i.length);return t._length=a,a}(0,t,f);if(d){if(f("text"),f("texttemplate"),f("texttemplatefallback"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback"),f("mode"),f("below"),n.hasMarkers(t)){i(e,t,u,h,f,{noLine:!0,noAngle:!0}),f("marker.allowoverlap"),f("marker.angle");var m=t.marker;"circle"!==m.symbol&&(r.isArrayOrTypedArray(m.size)&&(m.size=m.size[0]),r.isArrayOrTypedArray(m.color)&&(m.color=m.color[0]))}n.hasLines(t)&&(a(e,t,u,h,f,{noDash:!0}),f("connectgaps"));var g=p("cluster.maxzoom"),y=p("cluster.step"),v=p("cluster.color",t.marker&&t.marker.color||u),x=p("cluster.size"),_=p("cluster.opacity");if(f("cluster.enabled",!1!==g||!1!==y||!1!==v||!1!==x||!1!==_)||n.hasText(t)){var b=h.font.family;o(e,t,h,f,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:c(b)?b:"Open Sans Regular",weight:h.font.weight,style:h.font.style,size:h.font.size,color:h.font.color}})}f("fill"),"none"!==t.fill&&s(e,t,u,f),r.coerceSelectionMarkerOpacity(t,f)}else t.visible=!1}}}),mb=m({"src/traces/scattermap/format_labels.js"(e,t){var r=ar();t.exports=function(e,t,n){var i={},a=n[t.subplot]._subplot.mockAxis,o=e.lonlat;return i.lonLabel=r.tickText(a,a.c2l(o[0]),!0).text,i.latLabel=r.tickText(a,a.c2l(o[1]),!0).text,i}}}),gb=m({"src/plots/map/convert_text_opts.js"(e,t){var r=ct();t.exports=function(e,t){var n=e.split(" "),i=n[0],a=n[1],o=r.isArrayOrTypedArray(t)?r.mean(t):t,s=.5+o/100,l=1.5+o/100,c=["",""],u=[0,0];switch(i){case"top":c[0]="top",u[1]=-l;break;case"bottom":c[0]="bottom",u[1]=l}switch(a){case"left":c[1]="right",u[0]=-s;break;case"right":c[1]="left",u[0]=s}return{anchor:c[0]&&c[1]?c.join("-"):c[0]?c[0]:c[1]?c[1]:"center",offset:u}}}}),yb=m({"src/traces/scattermap/convert.js"(e,t){var r=M(),n=ct(),i=S().BADNUM,a=dg(),o=Yt(),s=er(),l=$t(),c=Xt(),u=pb().isSupportedFont,h=gb(),f=Kt().appendArrayPointValue,p=Et().NEWLINES,d=Et().BR_TAG_ALL;function m(e){return{type:e,geojson:a.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function g(e,t){return n.isArrayOrTypedArray(e)?t?function(t){return r(e[t])?+e[t]:0}:function(t){return e[t]}:e?function(){return e}:y}function y(){return""}function v(e){return e[0]===i}function x(e,t){var r;if(n.isArrayOrTypedArray(e)&&n.isArrayOrTypedArray(t)){r=["step",["get","point_count"],e[0]];for(var i=1;i850?" Black":i>750?" Extra Bold":i>650?" Bold":i>550?" Semi Bold":i>450?" Medium":i>350?" Regular":i>250?" Light":i>150?" Extra Light":" Thin"):"Open Sans"===a.slice(0,2).join(" ")?(s="Open Sans",s+=i>750?" Extrabold":i>650?" Bold":i>550?" Semibold":i>350?" Regular":" Light"):"Klokantech Noto Sans"===a.slice(0,3).join(" ")&&(s="Klokantech Noto Sans","CJK"===a[3]&&(s+=" CJK"),s+=i>500?" Bold":" Regular")),o&&(s+=" Italic"),"Open Sans Regular Italic"===s?s="Open Sans Italic":"Open Sans Regular Bold"===s?s="Open Sans Bold":"Open Sans Regular Bold Italic"===s?s="Open Sans Bold Italic":"Klokantech Noto Sans Regular Italic"===s&&(s="Klokantech Noto Sans Italic"),u(s)||(s=r),s.split(", ")}t.exports=function(e,t){var i,u=t[0].trace,b=!0===u.visible&&0!==u._length,w="none"!==u.fill,T=c.hasLines(u),k=c.hasMarkers(u),A=c.hasText(u),M=k&&"circle"===u.marker.symbol,S=k&&"circle"!==u.marker.symbol,E=u.cluster&&u.cluster.enabled,C=m("fill"),I=m("line"),L=m("circle"),P=m("symbol"),z={fill:C,line:I,circle:L,symbol:P};if(!b)return z;if((w||T)&&(i=a.calcTraceToLineCoords(t)),w&&(C.geojson=a.makePolygon(i),C.layout.visibility="visible",n.extendFlat(C.paint,{"fill-color":u.fillcolor})),T&&(I.geojson=a.makeLine(i),I.layout.visibility="visible",n.extendFlat(I.paint,{"line-width":u.line.width,"line-color":u.line.color,"line-opacity":u.opacity})),M){var D=function(e){var t,i,a,c,u=e[0].trace,h=u.marker,f=u.selectedpoints,p=n.isArrayOrTypedArray(h.color),d=n.isArrayOrTypedArray(h.size),m=n.isArrayOrTypedArray(h.opacity);function g(e){return u.opacity*e}p&&(i=o.hasColorscale(u,"marker")?o.makeColorScaleFuncFromTrace(h):n.identity),d&&(a=l(u)),m&&(c=function(e){return g(r(e)?+n.constrain(e,0,1):0)});var y,x=[];for(t=0;t=0;r--){var n=t[r];i.removeLayer(u.layerIds[n])}e||i.removeSource(u.sourceIds.circle)}(e):function(e){for(var t=a.nonCluster,r=t.length-1;r>=0;r--){var n=t[r];i.removeLayer(u.layerIds[n]),e||i.removeSource(u.sourceIds[n])}}(e)}function f(e){l?function(e){e||u.addSource("circle",o.circle,t.cluster);for(var r=a.cluster,n=0;n=0;r--){var n=t[r];e.removeLayer(this.layerIds[n]),e.removeSource(this.sourceIds[n])}},t.exports=function(e,t){var r,i,s,l=t[0].trace,c=l.cluster&&l.cluster.enabled,u=!0!==l.visible,h=new o(e,l.uid,c,u),f=n(e.gd,t),p=h.below=e.belowLookup["trace-"+l.uid];if(c)for(h.addSource("circle",f.circle,l.cluster),r=0;r")}function u(e){return e+"°"}}t.exports={hoverPoints:function(e,t,a){var c=e.cd,u=c[0].trace,h=e.xa,f=e.ya,p=e.subplot,d=[],m=s+u.uid+"-circle",g=u.cluster&&u.cluster.enabled;if(g){var y=p.map.queryRenderedFeatures(null,{layers:[m]});d=y.map((function(e){return e.id}))}var v=360*(t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360)),x=t-v;if(r.getClosest(c,(function(e){var t=e.lonlat;if(t[0]===o||g&&-1===d.indexOf(e.i+1))return 1/0;var r=n.modHalf(t[0],360),i=t[1],s=p.project([r,i]),l=s.x-h.c2p([x,i]),c=s.y-f.c2p([r,a]),u=Math.max(3,e.mrc||0);return Math.max(Math.sqrt(l*l+c*c)-u,1-3/u)}),e),!1!==e.index){var _=c[e.index],b=_.lonlat,w=[n.modHalf(b[0],360)+v,b[1]],T=h.c2p(w),k=f.c2p(w),A=_.mrc||1;e.x0=T-A,e.x1=T+A,e.y0=k-A,e.y1=k+A;var M={};M[u.subplot]={_subplot:p};var S=u._module.formatLabels(_,u,M);return e.lonLabel=S.lonLabel,e.latLabel=S.latLabel,e.color=i(u,_),e.extraText=l(u,_,c[0].t.labels),e.hovertemplate=u.hovertemplate,[e]}},getExtraText:l}}}),_b=m({"src/traces/scattermap/event_data.js"(e,t){t.exports=function(e,t){return e.lon=t.lon,e.lat=t.lat,e}}}),bb=m({"src/traces/scattermap/select.js"(e,t){var r=ct(),n=Xt(),i=S().BADNUM;t.exports=function(e,t){var a,o=e.cd,s=e.xaxis,l=e.yaxis,c=[],u=o[0].trace;if(!n.hasMarkers(u))return[];if(!1===t)for(a=0;a1)return 1;for(var r=e,n=0;n<8;n++){var i=this.sampleCurveX(r)-e;if(Math.abs(i)i?o=r:s=r,r=.5*(s-o)+o;return r},solve:function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))}};var l=r(o);let c,u;function h(){return null==c&&(c=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof createImageBitmap),c}function d(){if(null==u&&(u=!1,h())){let e=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(e){for(let t=0;t<25;t++){let r=4*t;e.fillStyle=`rgb(${r},${r+1},${r+2})`,e.fillRect(t%5,Math.floor(t/5),1,1)}let t=e.getImageData(0,0,5,5).data;for(let e=0;e<100;e++)if(e%4!=3&&t[e]!==e){u=!0;break}}}return u||!1}function m(e,t,r,n){let i=new l(e,t,r,n);return e=>i.solve(e)}let g=m(.25,.1,.25,1);function y(e,t,r){return Math.min(r,Math.max(t,e))}function v(e,t,r){let n=r-t,i=((e-t)%n+n)%n+t;return i===t?r:i}function x(e,...t){for(let r of t)for(let t in r)e[t]=r[t];return e}let _=1;function b(e,t,r){let n={};for(let r in e)n[r]=t.call(this,e[r],r,e);return n}function w(e,t,r){let n={};for(let r in e)t.call(this,e[r],r,e)&&(n[r]=e[r]);return n}function T(e){return Array.isArray(e)?e.map(T):"object"==typeof e&&e?b(e,T):e}let k={};function A(e){k[e]||(typeof console<"u"&&console.warn(e),k[e]=!0)}function M(e,t,r){return(r.y-e.y)*(t.x-e.x)>(t.y-e.y)*(r.x-e.x)}function S(e){return typeof WorkerGlobalScope<"u"&&void 0!==e&&e instanceof WorkerGlobalScope}let E=null;function C(e){return typeof ImageBitmap<"u"&&e instanceof ImageBitmap}let I="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function L(e,r,n,i,a){return t(this,void 0,void 0,(function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");let t=new VideoFrame(e,{timestamp:0});try{let o=t?.format;if(!o||!o.startsWith("BGR")&&!o.startsWith("RGB"))throw new Error(`Unrecognized format ${o}`);let s=o.startsWith("BGR"),l=new Uint8ClampedArray(i*a*4);if(yield t.copyTo(l,function(e,t,r,n,i){let a=4*Math.max(-t,0),o=(Math.max(0,r)-r)*n*4+a,s=4*n,l=Math.max(0,t),c=Math.max(0,r);return{rect:{x:l,y:c,width:Math.min(e.width,t+n)-l,height:Math.min(e.height,r+i)-c},layout:[{offset:o,stride:s}]}}(e,r,n,i,a)),s)for(let e=0;eS(self)?self.worker&&self.worker.referrer:("blob:"===window.location.protocol?window.parent:window).location.href,U=function(e,r){if(/:\/\//.test(e.url)&&!/^https?:|^file:/.test(e.url)){let t=F(e.url);if(t)return t(e,r);if(S(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:e,targetMapId:B},r)}if(!(/^file:/.test(n=e.url)||/^file:/.test(N())&&!/^\w+:/.test(n))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(e,r){return t(this,void 0,void 0,(function*(){let t=new Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,cache:e.cache,referrer:N(),signal:r.signal});"json"!==e.type||t.headers.has("Accept")||t.headers.set("Accept","application/json");let n,i=yield fetch(t);if(!i.ok){let t=yield i.blob();throw new j(i.status,i.statusText,e.url,t)}n="arrayBuffer"===e.type||"image"===e.type?i.arrayBuffer():"json"===e.type?i.json():i.text();let a=yield n;if(r.signal.aborted)throw O();return{data:a,cacheControl:i.headers.get("Cache-Control"),expires:i.headers.get("Expires")}}))}(e,r);if(S(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:e,mustQueue:!0,targetMapId:B},r)}var n,i,a;return i=e,a=r,new Promise(((e,t)=>{var r;let n=new XMLHttpRequest;n.open(i.method||"GET",i.url,!0),"arrayBuffer"!==i.type&&"image"!==i.type||(n.responseType="arraybuffer");for(let e in i.headers)n.setRequestHeader(e,i.headers[e]);"json"===i.type&&(n.responseType="text",!(null===(r=i.headers)||void 0===r)&&r.Accept||n.setRequestHeader("Accept","application/json")),n.withCredentials="include"===i.credentials,n.onerror=()=>{t(new Error(n.statusText))},n.onload=()=>{if(!a.signal.aborted)if((n.status>=200&&n.status<300||0===n.status)&&null!==n.response){let r=n.response;if("json"===i.type)try{r=JSON.parse(n.response)}catch(e){return void t(e)}e({data:r,cacheControl:n.getResponseHeader("Cache-Control"),expires:n.getResponseHeader("Expires")})}else{let e=new Blob([n.response],{type:n.getResponseHeader("Content-Type")});t(new j(n.status,n.statusText,i.url,e))}},a.signal.addEventListener("abort",(()=>{n.abort(),t(O())})),n.send(i.body)}))};function V(e){if(!e||e.indexOf("://")<=0||0===e.indexOf("data:image/")||0===e.indexOf("blob:"))return!0;let t=new URL(e),r=window.location;return t.protocol===r.protocol&&t.host===r.host}function q(e,t,r){r[e]&&-1!==r[e].indexOf(t)||(r[e]=r[e]||[],r[e].push(t))}function H(e,t,r){if(r&&r[e]){let n=r[e].indexOf(t);-1!==n&&r[e].splice(n,1)}}class G{constructor(e,t={}){x(this,t),this.type=e}}class W extends G{constructor(e,t={}){super("error",x({error:e},t))}}class Z{on(e,t){return this._listeners=this._listeners||{},q(e,t,this._listeners),this}off(e,t){return H(e,t,this._listeners),H(e,t,this._oneTimeListeners),this}once(e,t){return t?(this._oneTimeListeners=this._oneTimeListeners||{},q(e,t,this._oneTimeListeners),this):new Promise((t=>this.once(e,t)))}fire(e,t){"string"==typeof e&&(e=new G(e,t||{}));let r=e.type;if(this.listens(r)){e.target=this;let t=this._listeners&&this._listeners[r]?this._listeners[r].slice():[];for(let r of t)r.call(this,e);let n=this._oneTimeListeners&&this._oneTimeListeners[r]?this._oneTimeListeners[r].slice():[];for(let t of n)H(r,t,this._oneTimeListeners),t.call(this,e);let i=this._eventedParent;i&&(x(e,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),i.fire(e))}else e instanceof W&&console.error(e.error);return this}listens(e){return this._listeners&&this._listeners[e]&&this._listeners[e].length>0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e)}setEventedParent(e,t){return this._eventedParent=e,this._eventedParentData=t,this}}var Y={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"enum",default:"mercator",values:{mercator:{},globe:{}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};let X=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function $(e,t){let r={};for(let t in e)"ref"!==t&&(r[t]=e[t]);return X.forEach((e=>{e in t&&(r[e]=t[e])})),r}function K(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r`:"value"===e.itemType.kind?"array":`array<${t}>`}return e.kind}let ke=[ue,he,fe,pe,de,ve,me,we(ge),xe,_e,be];function Ae(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!Ae(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(let e of ke)if(!Ae(e,t))return null}return`Expected ${Te(e)} but found ${Te(t)} instead.`}function Me(e,t){return t.some((t=>t.kind===e.kind))}function Se(e,t){return t.some((t=>"null"===t?null===e:"array"===t?Array.isArray(e):"object"===t?e&&!Array.isArray(e)&&"object"==typeof e:t===typeof e))}function Ee(e,t){return"array"===e.kind&&"array"===t.kind?e.itemType.kind===t.itemType.kind&&"number"==typeof e.N:e.kind===t.kind}let Ce=.96422,Ie=.82521,Le=4/29,Pe=6/29,ze=3*Pe*Pe,De=Pe*Pe*Pe,Oe=Math.PI/180,Re=180/Math.PI;function Fe(e){return(e%=360)<0&&(e+=360),e}function Be([e,t,r,n]){let i,a,o=Ne((.2225045*(e=je(e))+.7168786*(t=je(t))+.0606169*(r=je(r)))/1);e===t&&t===r?i=a=o:(i=Ne((.4360747*e+.3850649*t+.1430804*r)/Ce),a=Ne((.0139322*e+.0971045*t+.7141733*r)/Ie));let s=116*o-16;return[s<0?0:s,500*(i-o),200*(o-a),n]}function je(e){return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ne(e){return e>De?Math.pow(e,1/3):e/ze+Le}function Ue([e,t,r,n]){let i=(e+16)/116,a=isNaN(t)?i:i+t/500,o=isNaN(r)?i:i-r/200;return i=1*qe(i),a=Ce*qe(a),o=Ie*qe(o),[Ve(3.1338561*a-1.6168667*i-.4906146*o),Ve(-.9787684*a+1.9161415*i+.033454*o),Ve(.0719453*a-.2289914*i+1.4052427*o),n]}function Ve(e){return(e=e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055)<0?0:e>1?1:e}function qe(e){return e>Pe?e*e*e:ze*(e-Le)}function He(e){return parseInt(e.padEnd(2,e),16)/255}function Ge(e,t){return We(t?e/100:e,0,1)}function We(e,t,r){return Math.min(Math.max(t,e),r)}function Ze(e){return!e.some(Number.isNaN)}let Ye={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]};class Xe{constructor(e,t,r,n=1,i=!0){this.r=e,this.g=t,this.b=r,this.a=n,i||(this.r*=n,this.g*=n,this.b*=n,n||this.overwriteGetter("rgb",[e,t,r,n]))}static parse(e){if(e instanceof Xe)return e;if("string"!=typeof e)return;let t=function(e){if("transparent"===(e=e.toLowerCase().trim()))return[0,0,0,0];let t=Ye[e];if(t){let[e,r,n]=t;return[e/255,r/255,n/255,1]}if(e.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(e)){let t=e.length<6?1:2,r=1;return[He(e.slice(r,r+=t)),He(e.slice(r,r+=t)),He(e.slice(r,r+=t)),He(e.slice(r,r+t)||"ff")]}if(e.startsWith("rgb")){let t=e.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(t){let[e,r,n,i,a,o,s,l,c,u,h,f]=t,p=[i||" ",s||" ",u].join("");if(" "===p||" /"===p||",,"===p||",,,"===p){let e=[n,o,c].join(""),t="%%%"===e?100:""===e?255:0;if(t){let e=[We(+r/t,0,1),We(+a/t,0,1),We(+l/t,0,1),h?Ge(+h,f):1];if(Ze(e))return e}}return}}let r=e.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(r){let[e,t,n,i,a,o,s,l,c]=r,u=[n||" ",a||" ",s].join("");if(" "===u||" /"===u||",,"===u||",,,"===u){let e=[+t,We(+i,0,100),We(+o,0,100),l?Ge(+l,c):1];if(Ze(e))return function([e,t,r,n]){function i(n){let i=(n+e/30)%12,a=t*Math.min(r,1-r);return r-a*Math.max(-1,Math.min(i-3,9-i,1))}return e=Fe(e),t/=100,r/=100,[i(0),i(8),i(4),n]}(e)}}}(e);return t?new Xe(...t,!1):void 0}get rgb(){let{r:e,g:t,b:r,a:n}=this,i=n||1/0;return this.overwriteGetter("rgb",[e/i,t/i,r/i,n])}get hcl(){return this.overwriteGetter("hcl",function(e){let[t,r,n,i]=Be(e),a=Math.sqrt(r*r+n*n);return[Math.round(1e4*a)?Fe(Math.atan2(n,r)*Re):NaN,a,t,i]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Be(this.rgb))}overwriteGetter(e,t){return Object.defineProperty(this,e,{value:t}),t}toString(){let[e,t,r,n]=this.rgb;return`rgba(${[e,t,r].map((e=>Math.round(255*e))).join(",")},${n})`}}Xe.black=new Xe(0,0,0,1),Xe.white=new Xe(1,1,1,1),Xe.transparent=new Xe(0,0,0,0),Xe.red=new Xe(1,0,0,1);class $e{constructor(e,t,r){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,t){return this.collator.compare(e,t)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Ke{constructor(e,t,r,n,i){this.text=e,this.image=t,this.scale=r,this.fontStack=n,this.textColor=i}}class Je{constructor(e){this.sections=e}static fromString(e){return new Je([new Ke(e,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some((e=>0!==e.text.length||e.image&&0!==e.image.name.length))}static factory(e){return e instanceof Je?e:Je.fromString(e)}toString(){return 0===this.sections.length?"":this.sections.map((e=>e.text)).join("")}}class Qe{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof Qe)return e;if("number"==typeof e)return new Qe([e,e,e,e]);if(Array.isArray(e)&&!(e.length<1||e.length>4)){for(let t of e)if("number"!=typeof t)return;switch(e.length){case 1:e=[e[0],e[0],e[0],e[0]];break;case 2:e=[e[0],e[1],e[0],e[1]];break;case 3:e=[e[0],e[1],e[2],e[1]]}return new Qe(e)}}toString(){return JSON.stringify(this.values)}}let et=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class tt{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof tt)return e;if(Array.isArray(e)&&!(e.length<1)&&e.length%2==0){for(let t=0;t=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:`Invalid rgba value [${[e,t,r,n].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof n?[e,t,r,n]:[e,t,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function it(e){if(null===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e||e instanceof Xe||e instanceof $e||e instanceof Je||e instanceof Qe||e instanceof tt||e instanceof rt)return!0;if(Array.isArray(e)){for(let t of e)if(!it(t))return!1;return!0}if("object"==typeof e){for(let t in e)if(!it(e[t]))return!1;return!0}return!1}function at(e){if(null===e)return ue;if("string"==typeof e)return fe;if("boolean"==typeof e)return pe;if("number"==typeof e)return he;if(e instanceof Xe)return de;if(e instanceof $e)return ye;if(e instanceof Je)return ve;if(e instanceof Qe)return xe;if(e instanceof tt)return be;if(e instanceof rt)return _e;if(Array.isArray(e)){let t,r=e.length;for(let r of e){let e=at(r);if(t){if(t===e)continue;t=ge;break}t=e}return we(t||ge,r)}return me}function ot(e){let t=typeof e;return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof Xe||e instanceof Je||e instanceof Qe||e instanceof tt||e instanceof rt?e.toString():JSON.stringify(e)}class st{constructor(e,t){this.type=e,this.value=t}static parse(e,t){if(2!==e.length)return t.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!it(e[1]))return t.error("invalid value");let r=e[1],n=at(r),i=t.expectedType;return"array"!==n.kind||0!==n.N||!i||"array"!==i.kind||"number"==typeof i.N&&0!==i.N||(n=i),new st(n,r)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class lt{constructor(e){this.name="ExpressionEvaluationError",this.message=e}toJSON(){return this.message}}let ct={string:fe,number:he,boolean:pe,object:me};class ut{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r,n=1,i=e[0];if("array"===i){let i,a;if(e.length>2){let r=e[1];if("string"!=typeof r||!(r in ct)||"object"===r)return t.error('The item type argument of "array" must be one of string, number, boolean',1);i=ct[r],n++}else i=ge;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);a=e[2],n++}r=we(i,a)}else{if(!ct[i])throw new Error(`Types doesn't contain name = ${i}`);r=ct[i]}let a=[];for(;ne.outputDefined()))}}let ht={"to-boolean":pe,"to-color":de,"to-number":he,"to-string":fe};class ft{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r=e[0];if(!ht[r])throw new Error(`Can't parse ${r} as it is not part of the known types`);if(("to-boolean"===r||"to-string"===r)&&2!==e.length)return t.error("Expected one argument.");let n=ht[r],i=[];for(let r=1;r4?`Invalid rbga value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.`:nt(t[0],t[1],t[2],t[3]),!r))return new Xe(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new lt(r||`Could not parse color from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"padding":{let t;for(let r of this.args){t=r.evaluate(e);let n=Qe.parse(t);if(n)return n}throw new lt(`Could not parse padding from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"variableAnchorOffsetCollection":{let t;for(let r of this.args){t=r.evaluate(e);let n=tt.parse(t);if(n)return n}throw new lt(`Could not parse variableAnchorOffsetCollection from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"number":{let t=null;for(let r of this.args){if(t=r.evaluate(e),null===t)return 0;let n=Number(t);if(!isNaN(n))return n}throw new lt(`Could not convert ${JSON.stringify(t)} to number.`)}case"formatted":return Je.fromString(ot(this.args[0].evaluate(e)));case"resolvedImage":return rt.fromString(ot(this.args[0].evaluate(e)));default:return ot(this.args[0].evaluate(e))}}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every((e=>e.outputDefined()))}}let pt=["Unknown","Point","LineString","Polygon"];class dt{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?"number"==typeof this.feature.type?pt[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(e){let t=this._parseColorCache[e];return t||(t=this._parseColorCache[e]=Xe.parse(e)),t}}class mt{constructor(e,t,r=[],n,i=new ce,a=[]){this.registry=e,this.path=r,this.key=r.map((e=>`[${e}]`)).join(""),this.scope=i,this.errors=a,this.expectedType=n,this._isConstant=t}parse(e,t,r,n,i={}){return t?this.concat(t,r,n)._parse(e,i):this._parse(e,i)}_parse(e,t){function r(e,t,r){return"assert"===r?new ut(t,[e]):"coerce"===r?new ft(t,[e]):e}if(null!==e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e||(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let n=e[0];if("string"!=typeof n)return this.error(`Expression name must be a string, but found ${typeof n} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let i=this.registry[n];if(i){let n=i.parse(e,this);if(!n)return null;if(this.expectedType){let e=this.expectedType,i=n.type;if("string"!==e.kind&&"number"!==e.kind&&"boolean"!==e.kind&&"object"!==e.kind&&"array"!==e.kind||"value"!==i.kind)if("color"!==e.kind&&"formatted"!==e.kind&&"resolvedImage"!==e.kind||"value"!==i.kind&&"string"!==i.kind)if("padding"!==e.kind||"value"!==i.kind&&"number"!==i.kind&&"array"!==i.kind)if("variableAnchorOffsetCollection"!==e.kind||"value"!==i.kind&&"array"!==i.kind){if(this.checkSubtype(e,i))return null}else n=r(n,e,t.typeAnnotation||"coerce");else n=r(n,e,t.typeAnnotation||"coerce");else n=r(n,e,t.typeAnnotation||"coerce");else n=r(n,e,t.typeAnnotation||"assert")}if(!(n instanceof st)&&"resolvedImage"!==n.type.kind&&this._isConstant(n)){let e=new dt;try{n=new st(n.type,n.evaluate(e))}catch(e){return this.error(e.message),null}}return n}return this.error(`Unknown expression "${n}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(void 0===e?"'undefined' value invalid. Use null instead.":"object"==typeof e?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof e} instead.`)}concat(e,t,r){let n="number"==typeof e?this.path.concat(e):this.path,i=r?this.scope.concat(r):this.scope;return new mt(this.registry,this._isConstant,n,t||null,i,this.errors)}error(e,...t){let r=`${this.key}${t.map((e=>`[${e}]`)).join("")}`;this.errors.push(new le(r,e))}checkSubtype(e,t){let r=Ae(e,t);return r&&this.error(r),r}}class gt{constructor(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(let t of this.bindings)e(t[1]);e(this.result)}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);let r=[];for(let n=1;n=r.length)throw new lt(`Array index out of bounds: ${t} > ${r.length-1}.`);if(t!==Math.floor(t))throw new lt(`Array index must be an integer, but found ${t} instead.`);return r[t]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}}class xt{constructor(e,t){this.type=pe,this.needle=e,this.haystack=t}static parse(e,t){if(3!==e.length)return t.error(`Expected 2 arguments, but found ${e.length-1} instead.`);let r=t.parse(e[1],1,ge),n=t.parse(e[2],2,ge);return r&&n?Me(r.type,[pe,fe,he,ue,ge])?new xt(r,n):t.error(`Expected first argument to be of type boolean, string, number or null, but found ${Te(r.type)} instead`):null}evaluate(e){let t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!r)return!1;if(!Se(t,["boolean","string","number","null"]))throw new lt(`Expected first argument to be of type boolean, string, number or null, but found ${Te(at(t))} instead.`);if(!Se(r,["string","array"]))throw new lt(`Expected second argument to be of type array or string, but found ${Te(at(r))} instead.`);return r.indexOf(t)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}}class _t{constructor(e,t,r){this.type=he,this.needle=e,this.haystack=t,this.fromIndex=r}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);let r=t.parse(e[1],1,ge),n=t.parse(e[2],2,ge);if(!r||!n)return null;if(!Me(r.type,[pe,fe,he,ue,ge]))return t.error(`Expected first argument to be of type boolean, string, number or null, but found ${Te(r.type)} instead`);if(4===e.length){let i=t.parse(e[3],3,he);return i?new _t(r,n,i):null}return new _t(r,n)}evaluate(e){let t,r=this.needle.evaluate(e),n=this.haystack.evaluate(e);if(!Se(r,["boolean","string","number","null"]))throw new lt(`Expected first argument to be of type boolean, string, number or null, but found ${Te(at(r))} instead.`);if(this.fromIndex&&(t=this.fromIndex.evaluate(e)),Se(n,["string"])){let e=n.indexOf(r,t);return-1===e?-1:[...n.slice(0,e)].length}if(Se(n,["array"]))return n.indexOf(r,t);throw new lt(`Expected second argument to be of type array or string, but found ${Te(at(n))} instead.`)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}}class bt{constructor(e,t,r,n,i,a){this.inputType=e,this.type=t,this.input=r,this.cases=n,this.outputs=i,this.otherwise=a}static parse(e,t){if(e.length<5)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!=1)return t.error("Expected an even number of arguments.");let r,n;t.expectedType&&"value"!==t.expectedType.kind&&(n=t.expectedType);let i={},a=[];for(let o=2;oNumber.MAX_SAFE_INTEGER)return c.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof e&&Math.floor(e)!==e)return c.error("Numeric branch labels must be integer values.");if(r){if(c.checkSubtype(r,at(e)))return null}else r=at(e);if(void 0!==i[String(e)])return c.error("Branch labels must be unique.");i[String(e)]=a.length}let u=t.parse(l,o,n);if(!u)return null;n=n||u.type,a.push(u)}let o=t.parse(e[1],1,ge);if(!o)return null;let s=t.parse(e[e.length-1],e.length-1,n);return s?"value"!==o.type.kind&&t.concat(1).checkSubtype(r,o.type)?null:new bt(r,n,o,i,a,s):null}evaluate(e){let t=this.input.evaluate(e);return(at(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every((e=>e.outputDefined()))&&this.otherwise.outputDefined()}}class wt{constructor(e,t,r){this.type=e,this.branches=t,this.otherwise=r}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!=0)return t.error("Expected an odd number of arguments.");let r;t.expectedType&&"value"!==t.expectedType.kind&&(r=t.expectedType);let n=[];for(let i=1;it.outputDefined()))&&this.otherwise.outputDefined()}}class Tt{constructor(e,t,r,n){this.type=e,this.input=t,this.beginIndex=r,this.endIndex=n}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);let r=t.parse(e[1],1,ge),n=t.parse(e[2],2,he);if(!r||!n)return null;if(!Me(r.type,[we(ge),fe,ge]))return t.error(`Expected first argument to be of type array or string, but found ${Te(r.type)} instead`);if(4===e.length){let i=t.parse(e[3],3,he);return i?new Tt(r.type,r,n,i):null}return new Tt(r.type,r,n)}evaluate(e){let t,r=this.input.evaluate(e),n=this.beginIndex.evaluate(e);if(this.endIndex&&(t=this.endIndex.evaluate(e)),Se(r,["string"]))return[...r].slice(n,t).join("");if(Se(r,["array"]))return r.slice(n,t);throw new lt(`Expected first argument to be of type array or string, but found ${Te(at(r))} instead.`)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}}function kt(e,t){let r,n,i=e.length-1,a=0,o=i,s=0;for(;a<=o;)if(s=Math.floor((a+o)/2),r=e[s],n=e[s+1],r<=t){if(s===i||tt))throw new lt("Input is not a number.");o=s-1}return 0}class At{constructor(e,t,r){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(let[e,t]of r)this.labels.push(e),this.outputs.push(t)}static parse(e,t){if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");let r=t.parse(e[1],1,he);if(!r)return null;let n=[],i=null;t.expectedType&&"value"!==t.expectedType.kind&&(i=t.expectedType);for(let r=1;r=a)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',s);let c=t.parse(o,l,i);if(!c)return null;i=i||c.type,n.push([a,c])}return new At(i,r,n)}evaluate(e){let t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);let n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);let i=t.length;return n>=t[i-1]?r[i-1].evaluate(e):r[kt(t,n)].evaluate(e)}eachChild(e){e(this.input);for(let t of this.outputs)e(t)}outputDefined(){return this.outputs.every((e=>e.outputDefined()))}}var Mt=St;function St(e,t,r,n){this.cx=3*e,this.bx=3*(r-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(n-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=t,this.p2x=r,this.p2y=n}St.prototype={sampleCurveX:function(e){return((this.ax*e+this.bx)*e+this.cx)*e},sampleCurveY:function(e){return((this.ay*e+this.by)*e+this.cy)*e},sampleCurveDerivativeX:function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},solveCurveX:function(e,t){if(void 0===t&&(t=1e-6),e<0)return 0;if(e>1)return 1;for(var r=e,n=0;n<8;n++){var i=this.sampleCurveX(r)-e;if(Math.abs(i)i?o=r:s=r,r=.5*(s-o)+o;return r},solve:function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))}};var Et,Ct=(Et=Mt)&&Et.__esModule&&Object.prototype.hasOwnProperty.call(Et,"default")?Et.default:Et;function It(e,t,r){return e+r*(t-e)}function Lt(e,t,r){return e.map(((e,n)=>It(e,t[n],r)))}let Pt={number:It,color:function(e,t,r,n="rgb"){switch(n){case"rgb":{let[n,i,a,o]=Lt(e.rgb,t.rgb,r);return new Xe(n,i,a,o,!1)}case"hcl":{let n,i,[a,o,s,l]=e.hcl,[c,u,h,f]=t.hcl;if(isNaN(a)||isNaN(c))isNaN(a)?isNaN(c)?n=NaN:(n=c,1!==s&&0!==s||(i=u)):(n=a,1!==h&&0!==h||(i=o));else{let e=c-a;c>a&&e>180?e-=360:c180&&(e+=360),n=a+r*e}let[p,d,m,g]=function([e,t,r,n]){return e=isNaN(e)?0:e*Oe,Ue([r,Math.cos(e)*t,Math.sin(e)*t,n])}([n,i??It(o,u,r),It(s,h,r),It(l,f,r)]);return new Xe(p,d,m,g,!1)}case"lab":{let[n,i,a,o]=Ue(Lt(e.lab,t.lab,r));return new Xe(n,i,a,o,!1)}}},array:Lt,padding:function(e,t,r){return new Qe(Lt(e.values,t.values,r))},variableAnchorOffsetCollection:function(e,t,r){let n=e.values,i=t.values;if(n.length!==i.length)throw new lt(`Cannot interpolate values of different length. from: ${e.toString()}, to: ${t.toString()}`);let a=[];for(let e=0;e"number"!=typeof e||e<0||e>1)))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:e}}}if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(i=t.parse(i,2,he),!i)return null;let o=[],s=null;"interpolate-hcl"===r||"interpolate-lab"===r?s=de:t.expectedType&&"value"!==t.expectedType.kind&&(s=t.expectedType);for(let e=0;e=r)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',i);let c=t.parse(n,l,s);if(!c)return null;s=s||c.type,o.push([r,c])}return Ee(s,he)||Ee(s,de)||Ee(s,xe)||Ee(s,be)||Ee(s,we(he))?new zt(s,r,n,i,o):t.error(`Type ${Te(s)} is not interpolatable.`)}evaluate(e){let t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);let n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);let i=t.length;if(n>=t[i-1])return r[i-1].evaluate(e);let a=kt(t,n),o=zt.interpolationFactor(this.interpolation,n,t[a],t[a+1]),s=r[a].evaluate(e),l=r[a+1].evaluate(e);switch(this.operator){case"interpolate":return Pt[this.type.kind](s,l,o);case"interpolate-hcl":return Pt.color(s,l,o,"hcl");case"interpolate-lab":return Pt.color(s,l,o,"lab")}}eachChild(e){e(this.input);for(let t of this.outputs)e(t)}outputDefined(){return this.outputs.every((e=>e.outputDefined()))}}function Dt(e,t,r,n){let i=n-r,a=e-r;return 0===i?0:1===t?a/i:(Math.pow(t,a)-1)/(Math.pow(t,i)-1)}class Ot{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expectected at least one argument.");let r=null,n=t.expectedType;n&&"value"!==n.kind&&(r=n);let i=[];for(let n of e.slice(1)){let e=t.parse(n,1+i.length,r,void 0,{typeAnnotation:"omit"});if(!e)return null;r=r||e.type,i.push(e)}if(!r)throw new Error("No output type");let a=n&&i.some((e=>Ae(n,e.type)));return new Ot(a?ge:r,i)}evaluate(e){let t,r=null,n=0;for(let i of this.args)if(n++,r=i.evaluate(e),r&&r instanceof rt&&!r.available&&(t||(t=r.name),r=null,n===this.args.length&&(r=t)),null!==r)break;return r}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every((e=>e.outputDefined()))}}function Rt(e,t){return"=="===e||"!="===e?"boolean"===t.kind||"string"===t.kind||"number"===t.kind||"null"===t.kind||"value"===t.kind:"string"===t.kind||"number"===t.kind||"value"===t.kind}function Ft(e,t,r,n){return 0===n.compare(t,r)}function Bt(e,t,r){let n="=="!==e&&"!="!==e;return class i{constructor(e,t,r){this.type=pe,this.lhs=e,this.rhs=t,this.collator=r,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}static parse(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");let r=e[0],a=t.parse(e[1],1,ge);if(!a)return null;if(!Rt(r,a.type))return t.concat(1).error(`"${r}" comparisons are not supported for type '${Te(a.type)}'.`);let o=t.parse(e[2],2,ge);if(!o)return null;if(!Rt(r,o.type))return t.concat(2).error(`"${r}" comparisons are not supported for type '${Te(o.type)}'.`);if(a.type.kind!==o.type.kind&&"value"!==a.type.kind&&"value"!==o.type.kind)return t.error(`Cannot compare types '${Te(a.type)}' and '${Te(o.type)}'.`);n&&("value"===a.type.kind&&"value"!==o.type.kind?a=new ut(o.type,[a]):"value"!==a.type.kind&&"value"===o.type.kind&&(o=new ut(a.type,[o])));let s=null;if(4===e.length){if("string"!==a.type.kind&&"string"!==o.type.kind&&"value"!==a.type.kind&&"value"!==o.type.kind)return t.error("Cannot use collator to compare non-string types.");if(s=t.parse(e[3],3,ye),!s)return null}return new i(a,o,s)}evaluate(i){let a=this.lhs.evaluate(i),o=this.rhs.evaluate(i);if(n&&this.hasUntypedArgument){let t=at(a),r=at(o);if(t.kind!==r.kind||"string"!==t.kind&&"number"!==t.kind)throw new lt(`Expected arguments for "${e}" to be (string, string) or (number, number), but found (${t.kind}, ${r.kind}) instead.`)}if(this.collator&&!n&&this.hasUntypedArgument){let e=at(a),r=at(o);if("string"!==e.kind||"string"!==r.kind)return t(i,a,o)}return this.collator?r(i,a,o,this.collator.evaluate(i)):t(i,a,o)}eachChild(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)}outputDefined(){return!0}}}let jt=Bt("==",(function(e,t,r){return t===r}),Ft),Nt=Bt("!=",(function(e,t,r){return t!==r}),(function(e,t,r,n){return!Ft(0,t,r,n)})),Ut=Bt("<",(function(e,t,r){return t",(function(e,t,r){return t>r}),(function(e,t,r,n){return n.compare(t,r)>0})),qt=Bt("<=",(function(e,t,r){return t<=r}),(function(e,t,r,n){return n.compare(t,r)<=0})),Ht=Bt(">=",(function(e,t,r){return t>=r}),(function(e,t,r,n){return n.compare(t,r)>=0}));class Gt{constructor(e,t,r){this.type=ye,this.locale=r,this.caseSensitive=e,this.diacriticSensitive=t}static parse(e,t){if(2!==e.length)return t.error("Expected one argument.");let r=e[1];if("object"!=typeof r||Array.isArray(r))return t.error("Collator options argument must be an object.");let n=t.parse(void 0!==r["case-sensitive"]&&r["case-sensitive"],1,pe);if(!n)return null;let i=t.parse(void 0!==r["diacritic-sensitive"]&&r["diacritic-sensitive"],1,pe);if(!i)return null;let a=null;return r.locale&&(a=t.parse(r.locale,1,fe),!a)?null:new Gt(n,i,a)}evaluate(e){return new $e(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}}class Wt{constructor(e,t,r,n,i){this.type=fe,this.number=e,this.locale=t,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=i}static parse(e,t){if(3!==e.length)return t.error("Expected two arguments.");let r=t.parse(e[1],1,he);if(!r)return null;let n=e[2];if("object"!=typeof n||Array.isArray(n))return t.error("NumberFormat options argument must be an object.");let i=null;if(n.locale&&(i=t.parse(n.locale,1,fe),!i))return null;let a=null;if(n.currency&&(a=t.parse(n.currency,1,fe),!a))return null;let o=null;if(n["min-fraction-digits"]&&(o=t.parse(n["min-fraction-digits"],1,he),!o))return null;let s=null;return n["max-fraction-digits"]&&(s=t.parse(n["max-fraction-digits"],1,he),!s)?null:new Wt(r,i,a,o,s)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}}class Zt{constructor(e){this.type=ve,this.sections=e}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r=e[1];if(!Array.isArray(r)&&"object"==typeof r)return t.error("First argument must be an image or text section.");let n=[],i=!1;for(let r=1;r<=e.length-1;++r){let a=e[r];if(i&&"object"==typeof a&&!Array.isArray(a)){i=!1;let e=null;if(a["font-scale"]&&(e=t.parse(a["font-scale"],1,he),!e))return null;let r=null;if(a["text-font"]&&(r=t.parse(a["text-font"],1,we(fe)),!r))return null;let o=null;if(a["text-color"]&&(o=t.parse(a["text-color"],1,de),!o))return null;let s=n[n.length-1];s.scale=e,s.font=r,s.textColor=o}else{let a=t.parse(e[r],1,ge);if(!a)return null;let o=a.type.kind;if("string"!==o&&"value"!==o&&"null"!==o&&"resolvedImage"!==o)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,n.push({content:a,scale:null,font:null,textColor:null})}}return new Zt(n)}evaluate(e){return new Je(this.sections.map((t=>{let r=t.content.evaluate(e);return at(r)===_e?new Ke("",r,null,null,null):new Ke(ot(r),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)})))}eachChild(e){for(let t of this.sections)e(t.content),t.scale&&e(t.scale),t.font&&e(t.font),t.textColor&&e(t.textColor)}outputDefined(){return!1}}class Yt{constructor(e){this.type=_e,this.input=e}static parse(e,t){if(2!==e.length)return t.error("Expected two arguments.");let r=t.parse(e[1],1,fe);return r?new Yt(r):t.error("No image name provided.")}evaluate(e){let t=this.input.evaluate(e),r=rt.fromString(t);return r&&e.availableImages&&(r.available=e.availableImages.indexOf(t)>-1),r}eachChild(e){e(this.input)}outputDefined(){return!1}}class Xt{constructor(e){this.type=he,this.input=e}static parse(e,t){if(2!==e.length)return t.error(`Expected 1 argument, but found ${e.length-1} instead.`);let r=t.parse(e[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?t.error(`Expected argument of type string or array, but found ${Te(r.type)} instead.`):new Xt(r):null}evaluate(e){let t=this.input.evaluate(e);if("string"==typeof t)return[...t].length;if(Array.isArray(t))return t.length;throw new lt(`Expected value to be of type string or array, but found ${Te(at(t))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}}let $t=8192;function Kt(e,t){let r=(180+e[0])/360,n=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e[1]*Math.PI/360)))/360,i=Math.pow(2,t.z);return[Math.round(r*i*$t),Math.round(n*i*$t)]}function Jt(e,t){let r=Math.pow(2,t.z);return[(i=(e[0]/$t+t.x)/r,360*i-180),(n=(e[1]/$t+t.y)/r,360/Math.PI*Math.atan(Math.exp((180-360*n)*Math.PI/180))-90)];var n,i}function Qt(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.max(e[2],t[0]),e[3]=Math.max(e[3],t[1])}function er(e,t){return!(e[0]<=t[0]||e[2]>=t[2]||e[1]<=t[1]||e[3]>=t[3])}function tr(e,t,r){let n=e[0]-t[0],i=e[1]-t[1],a=e[0]-r[0],o=e[1]-r[1];return n*o-a*i==0&&n*a<=0&&i*o<=0}function rr(e,t,r,n){return(i=[n[0]-r[0],n[1]-r[1]])[0]*(a=[t[0]-e[0],t[1]-e[1]])[1]-i[1]*a[0]!=0&&!(!lr(e,t,r,n)||!lr(r,n,e,t));var i,a}function nr(e,t,r){for(let n of r)for(let r=0;r(i=e)[1]!=(o=s[t+1])[1]>i[1]&&i[0]<(o[0]-a[0])*(i[1]-a[1])/(o[1]-a[1])+a[0]&&(n=!n)}var i,a,o;return n}function ar(e,t){for(let r of t)if(ir(e,r))return!0;return!1}function or(e,t){for(let r of e)if(!ir(r,t))return!1;for(let r=0;r0&&s<0||o<0&&s>0}function cr(e,t,r){let n=[];for(let i=0;ir[2]){let t=.5*n,i=e[0]-r[0]>t?-n:r[0]-e[0]>t?n:0;0===i&&(i=e[0]-r[2]>t?-n:r[2]-e[0]>t?n:0),e[0]+=i}Qt(t,e)}function fr(e,t,r,n){let i=Math.pow(2,n.z)*$t,a=[n.x*$t,n.y*$t],o=[];for(let n of e)for(let e of n){let n=[e.x+a[0],e.y+a[1]];hr(n,t,r,i),o.push(n)}return o}function pr(e,t,r,n){let i=Math.pow(2,n.z)*$t,a=[n.x*$t,n.y*$t],o=[];for(let r of e){let e=[];for(let n of r){let r=[n.x+a[0],n.y+a[1]];Qt(t,r),e.push(r)}o.push(e)}if(t[2]-t[0]<=i/2){(s=t)[0]=s[1]=1/0,s[2]=s[3]=-1/0;for(let e of o)for(let n of e)hr(n,t,r,i)}var s;return o}class dr{constructor(e,t){this.type=pe,this.geojson=e,this.geometries=t}static parse(e,t){if(2!==e.length)return t.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(it(e[1])){let t=e[1];if("FeatureCollection"===t.type){let e=[];for(let r of t.features){let{type:t,coordinates:n}=r.geometry;"Polygon"===t&&e.push(n),"MultiPolygon"===t&&e.push(...n)}if(e.length)return new dr(t,{type:"MultiPolygon",coordinates:e})}else if("Feature"===t.type){let e=t.geometry.type;if("Polygon"===e||"MultiPolygon"===e)return new dr(t,t.geometry)}else if("Polygon"===t.type||"MultiPolygon"===t.type)return new dr(t,t)}return t.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(null!=e.geometry()&&null!=e.canonicalID()){if("Point"===e.geometryType())return function(e,t){let r=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=e.canonicalID();if("Polygon"===t.type){let a=cr(t.coordinates,n,i),o=fr(e.geometry(),r,n,i);if(!er(r,n))return!1;for(let e of o)if(!ir(e,a))return!1}if("MultiPolygon"===t.type){let a=ur(t.coordinates,n,i),o=fr(e.geometry(),r,n,i);if(!er(r,n))return!1;for(let e of o)if(!ar(e,a))return!1}return!0}(e,this.geometries);if("LineString"===e.geometryType())return function(e,t){let r=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=e.canonicalID();if("Polygon"===t.type){let a=cr(t.coordinates,n,i),o=pr(e.geometry(),r,n,i);if(!er(r,n))return!1;for(let e of o)if(!or(e,a))return!1}if("MultiPolygon"===t.type){let a=ur(t.coordinates,n,i),o=pr(e.geometry(),r,n,i);if(!er(r,n))return!1;for(let e of o)if(!sr(e,a))return!1}return!0}(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let mr=class{constructor(e=[],t=(e,t)=>et?1:0){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let e=(this.length>>1)-1;e>=0;e--)this._down(e)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(0===this.length)return;let e=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){let{data:t,compare:r}=this,n=t[e];for(;e>0;){let i=e-1>>1,a=t[i];if(r(n,a)>=0)break;t[e]=a,e=i}t[e]=n}_down(e){let{data:t,compare:r}=this,n=this.length>>1,i=t[e];for(;e=0)break;t[e]=t[n],e=n}t[e]=i}};function gr(e,t,r,n,i){yr(e,t,r,n||e.length-1,i||xr)}function yr(e,t,r,n,i){for(;n>r;){if(n-r>600){var a=n-r+1,o=t-r+1,s=Math.log(a),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(a-l)/a)*(o-a/2<0?-1:1);yr(e,t,Math.max(r,Math.floor(t-o*l/a+c)),Math.min(n,Math.floor(t+(a-o)*l/a+c)),i)}var u=e[t],h=r,f=n;for(vr(e,r,t),i(e[n],u)>0&&vr(e,r,n);h0;)f--}0===i(e[r],u)?vr(e,r,f):vr(e,++f,n),f<=t&&(r=f+1),t<=f&&(n=f-1)}}function vr(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function xr(e,t){return et?1:0}function _r(e,t){if(e.length<=1)return[e];let r,n,i=[];for(let t of e){let e=wr(t);0!==e&&(t.area=Math.abs(e),void 0===n&&(n=e<0),n===e<0?(r&&i.push(r),r=[t]):r.push(t))}if(r&&i.push(r),t>1)for(let e=0;e1?(l=e[s+1][0],c=e[s+1][1]):f>0&&(l+=u/this.kx*f,c+=h/this.ky*f)),u=this.wrap(t[0]-l)*this.kx,h=(t[1]-c)*this.ky;let p=u*u+h*h;p180;)e-=360;return e}}function Sr(e,t){return t[0]-e[0]}function Er(e){return e[1]-e[0]+1}function Cr(e,t){return e[1]>=e[0]&&e[1]e[1])return[null,null];let r=Er(e);if(t){if(2===r)return[e,null];let t=Math.floor(r/2);return[[e[0],e[0]+t],[e[0]+t,e[1]]]}if(1===r)return[e,null];let n=Math.floor(r/2)-1;return[[e[0],e[0]+n],[e[0]+n+1,e[1]]]}function Lr(e,t){if(!Cr(t,e.length))return[1/0,1/0,-1/0,-1/0];let r=[1/0,1/0,-1/0,-1/0];for(let n=t[0];n<=t[1];++n)Qt(r,e[n]);return r}function Pr(e){let t=[1/0,1/0,-1/0,-1/0];for(let r of e)for(let e of r)Qt(t,e);return t}function zr(e){return e[0]!==-1/0&&e[1]!==-1/0&&e[2]!==1/0&&e[3]!==1/0}function Dr(e,t,r){if(!zr(e)||!zr(t))return NaN;let n=0,i=0;return e[2]t[2]&&(n=e[0]-t[2]),e[1]>t[3]&&(i=e[1]-t[3]),e[3]=n)return n;if(er(i,a)){if(Ur(e,t))return 0}else if(Ur(t,e))return 0;let o=1/0;for(let n of e)for(let e=0,i=n.length,a=i-1;e0;){let i=o.pop();if(i[0]>=a)continue;let l=i[1],c=t?50:100;if(Er(l)<=c){if(!Cr(l,e.length))return NaN;if(t){let t=Nr(e,l,r,n);if(isNaN(t)||0===t)return t;a=Math.min(a,t)}else for(let t=l[0];t<=l[1];++t){let i=jr(e[t],r,n);if(a=Math.min(a,i),0===a)return 0}}else{let r=Ir(l,t);qr(o,a,n,e,s,r[0]),qr(o,a,n,e,s,r[1])}}return a}function Wr(e,t,r,n,i,a=1/0){let o=Math.min(a,i.distance(e[0],r[0]));if(0===o)return o;let s=new mr([[0,[0,e.length-1],[0,r.length-1]]],Sr);for(;s.length>0;){let a=s.pop();if(a[0]>=o)continue;let l=a[1],c=a[2],u=t?50:100,h=n?50:100;if(Er(l)<=u&&Er(c)<=h){if(!Cr(l,e.length)&&Cr(c,r.length))return NaN;let a;if(t&&n)a=Fr(e,l,r,c,i),o=Math.min(o,a);else if(t&&!n){let t=e.slice(l[0],l[1]+1);for(let e=c[0];e<=c[1];++e)if(a=Or(r[e],t,i),o=Math.min(o,a),0===o)return o}else if(!t&&n){let t=r.slice(c[0],c[1]+1);for(let r=l[0];r<=l[1];++r)if(a=Or(e[r],t,i),o=Math.min(o,a),0===o)return o}else a=Br(e,l,r,c,i),o=Math.min(o,a)}else{let a=Ir(l,t),u=Ir(c,n);Hr(s,o,i,e,r,a[0],u[0]),Hr(s,o,i,e,r,a[0],u[1]),Hr(s,o,i,e,r,a[1],u[0]),Hr(s,o,i,e,r,a[1],u[1])}}return o}function Zr(e){return"MultiPolygon"===e.type?e.coordinates.map((e=>({type:"Polygon",coordinates:e}))):"MultiLineString"===e.type?e.coordinates.map((e=>({type:"LineString",coordinates:e}))):"MultiPoint"===e.type?e.coordinates.map((e=>({type:"Point",coordinates:e}))):[e]}class Yr{constructor(e,t){this.type=he,this.geojson=e,this.geometries=t}static parse(e,t){if(2!==e.length)return t.error(`'distance' expression requires exactly one argument, but found ${e.length-1} instead.`);if(it(e[1])){let t=e[1];if("FeatureCollection"===t.type)return new Yr(t,t.features.map((e=>Zr(e.geometry))).flat());if("Feature"===t.type)return new Yr(t,Zr(t.geometry));if("type"in t&&"coordinates"in t)return new Yr(t,Zr(t))}return t.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(null!=e.geometry()&&null!=e.canonicalID()){if("Point"===e.geometryType())return function(e,t){let r=e.geometry(),n=r.flat().map((t=>Jt([t.x,t.y],e.canonical)));if(0===r.length)return NaN;let i=new Mr(n[0][1]),a=1/0;for(let e of t){switch(e.type){case"Point":a=Math.min(a,Wr(n,!1,[e.coordinates],!1,i,a));break;case"LineString":a=Math.min(a,Wr(n,!1,e.coordinates,!0,i,a));break;case"Polygon":a=Math.min(a,Gr(n,!1,e.coordinates,i,a))}if(0===a)return a}return a}(e,this.geometries);if("LineString"===e.geometryType())return function(e,t){let r=e.geometry(),n=r.flat().map((t=>Jt([t.x,t.y],e.canonical)));if(0===r.length)return NaN;let i=new Mr(n[0][1]),a=1/0;for(let e of t){switch(e.type){case"Point":a=Math.min(a,Wr(n,!0,[e.coordinates],!1,i,a));break;case"LineString":a=Math.min(a,Wr(n,!0,e.coordinates,!0,i,a));break;case"Polygon":a=Math.min(a,Gr(n,!0,e.coordinates,i,a))}if(0===a)return a}return a}(e,this.geometries);if("Polygon"===e.geometryType())return function(e,t){let r=e.geometry();if(0===r.length||0===r[0].length)return NaN;let n=_r(r,0).map((t=>t.map((t=>t.map((t=>Jt([t.x,t.y],e.canonical))))))),i=new Mr(n[0][0][0][1]),a=1/0;for(let e of t)for(let t of n){switch(e.type){case"Point":a=Math.min(a,Gr([e.coordinates],!1,t,i,a));break;case"LineString":a=Math.min(a,Gr(e.coordinates,!0,t,i,a));break;case"Polygon":a=Math.min(a,Vr(t,e.coordinates,i,a))}if(0===a)return a}return a}(e,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}let Xr={"==":jt,"!=":Nt,">":Vt,"<":Ut,">=":Ht,"<=":qt,array:ut,at:vt,boolean:ut,case:wt,coalesce:Ot,collator:Gt,format:Zt,image:Yt,in:xt,"index-of":_t,interpolate:zt,"interpolate-hcl":zt,"interpolate-lab":zt,length:Xt,let:gt,literal:st,match:bt,number:ut,"number-format":Wt,object:ut,slice:Tt,step:At,string:ut,"to-boolean":ft,"to-color":ft,"to-number":ft,"to-string":ft,var:yt,within:dr,distance:Yr};class $r{constructor(e,t,r,n){this.name=e,this.type=t,this._evaluate=r,this.args=n}evaluate(e){return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}static parse(e,t){let r=e[0],n=$r.definitions[r];if(!n)return t.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0);let i=Array.isArray(n)?n[0]:n.type,a=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,o=a.filter((([t])=>!Array.isArray(t)||t.length===e.length-1)),s=null;for(let[n,a]of o){s=new mt(t.registry,tn,t.path,null,t.scope);let o=[],l=!1;for(let t=1;t{return t=e,Array.isArray(t)?`(${t.map(Te).join(", ")})`:`(${Te(t.type)}...)`;var t})).join(" | "),n=[];for(let r=1;r{r=t?r&&tn(e):r&&e instanceof st})),!!r&&rn(e)&&an(e,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function rn(e){if(e instanceof $r&&("get"===e.name&&1===e.args.length||"feature-state"===e.name||"has"===e.name&&1===e.args.length||"properties"===e.name||"geometry-type"===e.name||"id"===e.name||/^filter-/.test(e.name))||e instanceof dr||e instanceof Yr)return!1;let t=!0;return e.eachChild((e=>{t&&!rn(e)&&(t=!1)})),t}function nn(e){if(e instanceof $r&&"feature-state"===e.name)return!1;let t=!0;return e.eachChild((e=>{t&&!nn(e)&&(t=!1)})),t}function an(e,t){if(e instanceof $r&&t.indexOf(e.name)>=0)return!1;let r=!0;return e.eachChild((e=>{r&&!an(e,t)&&(r=!1)})),r}function on(e){return{result:"success",value:e}}function sn(e){return{result:"error",value:e}}function ln(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function cn(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function un(e){return!!e.expression&&e.expression.interpolated}function hn(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}function fn(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function pn(e){return e}function dn(e,t){let r="color"===t.type,n=e.stops&&"object"==typeof e.stops[0][0],i=n||!(n||void 0!==e.property),a=e.type||(un(t)?"exponential":"interval");if(r||"padding"===t.type){let n=r?Xe.parse:Qe.parse;(e=se({},e)).stops&&(e.stops=e.stops.map((e=>[e[0],n(e[1])]))),e.default=n(e.default?e.default:t.default)}if(e.colorSpace&&"rgb"!==(o=e.colorSpace)&&"hcl"!==o&&"lab"!==o)throw new Error(`Unknown color space: "${e.colorSpace}"`);var o;let s,l,c;if("exponential"===a)s=vn;else if("interval"===a)s=yn;else if("categorical"===a){s=gn,l=Object.create(null);for(let t of e.stops)l[t[0]]=t[1];c=typeof e.stops[0][0]}else{if("identity"!==a)throw new Error(`Unknown function type "${a}"`);s=xn}if(n){let r={},n=[];for(let t=0;te[0])),evaluate:({zoom:r},n)=>vn({stops:i,base:e.base},t,r).evaluate(r,n)}}if(i){let r="exponential"===a?{name:"exponential",base:void 0!==e.base?e.base:1}:null;return{kind:"camera",interpolationType:r,interpolationFactor:zt.interpolationFactor.bind(void 0,r),zoomStops:e.stops.map((e=>e[0])),evaluate:({zoom:r})=>s(e,t,r,l,c)}}return{kind:"source",evaluate(r,n){let i=n&&n.properties?n.properties[e.property]:void 0;return void 0===i?mn(e.default,t.default):s(e,t,i,l,c)}}}function mn(e,t,r){return void 0!==e?e:void 0!==t?t:void 0!==r?r:void 0}function gn(e,t,r,n,i){return mn(typeof r===i?n[r]:void 0,e.default,t.default)}function yn(e,t,r){if("number"!==hn(r))return mn(e.default,t.default);let n=e.stops.length;if(1===n||r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[n-1][0])return e.stops[n-1][1];let i=kt(e.stops.map((e=>e[0])),r);return e.stops[i][1]}function vn(e,t,r){let n=void 0!==e.base?e.base:1;if("number"!==hn(r))return mn(e.default,t.default);let i=e.stops.length;if(1===i||r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[i-1][0])return e.stops[i-1][1];let a=kt(e.stops.map((e=>e[0])),r),o=function(e,t,r,n){let i=n-r,a=e-r;return 0===i?0:1===t?a/i:(Math.pow(t,a)-1)/(Math.pow(t,i)-1)}(r,n,e.stops[a][0],e.stops[a+1][0]),s=e.stops[a][1],l=e.stops[a+1][1],c=Pt[t.type]||pn;return"function"==typeof s.evaluate?{evaluate(...t){let r=s.evaluate.apply(void 0,t),n=l.evaluate.apply(void 0,t);if(void 0!==r&&void 0!==n)return c(r,n,o,e.colorSpace)}}:c(s,l,o,e.colorSpace)}function xn(e,t,r){switch(t.type){case"color":r=Xe.parse(r);break;case"formatted":r=Je.fromString(r.toString());break;case"resolvedImage":r=rt.fromString(r.toString());break;case"padding":r=Qe.parse(r);break;default:hn(r)===t.type||"enum"===t.type&&t.values[r]||(r=void 0)}return mn(r,e.default,t.default)}$r.register(Xr,{error:[{kind:"error"},[fe],(e,[t])=>{throw new lt(t.evaluate(e))}],typeof:[fe,[ge],(e,[t])=>Te(at(t.evaluate(e)))],"to-rgba":[we(he,4),[de],(e,[t])=>{let[r,n,i,a]=t.evaluate(e).rgb;return[255*r,255*n,255*i,a]}],rgb:[de,[he,he,he],Kr],rgba:[de,[he,he,he,he],Kr],has:{type:pe,overloads:[[[fe],(e,[t])=>Jr(t.evaluate(e),e.properties())],[[fe,me],(e,[t,r])=>Jr(t.evaluate(e),r.evaluate(e))]]},get:{type:ge,overloads:[[[fe],(e,[t])=>Qr(t.evaluate(e),e.properties())],[[fe,me],(e,[t,r])=>Qr(t.evaluate(e),r.evaluate(e))]]},"feature-state":[ge,[fe],(e,[t])=>Qr(t.evaluate(e),e.featureState||{})],properties:[me,[],e=>e.properties()],"geometry-type":[fe,[],e=>e.geometryType()],id:[ge,[],e=>e.id()],zoom:[he,[],e=>e.globals.zoom],"heatmap-density":[he,[],e=>e.globals.heatmapDensity||0],"line-progress":[he,[],e=>e.globals.lineProgress||0],accumulated:[ge,[],e=>void 0===e.globals.accumulated?null:e.globals.accumulated],"+":[he,en(he),(e,t)=>{let r=0;for(let n of t)r+=n.evaluate(e);return r}],"*":[he,en(he),(e,t)=>{let r=1;for(let n of t)r*=n.evaluate(e);return r}],"-":{type:he,overloads:[[[he,he],(e,[t,r])=>t.evaluate(e)-r.evaluate(e)],[[he],(e,[t])=>-t.evaluate(e)]]},"/":[he,[he,he],(e,[t,r])=>t.evaluate(e)/r.evaluate(e)],"%":[he,[he,he],(e,[t,r])=>t.evaluate(e)%r.evaluate(e)],ln2:[he,[],()=>Math.LN2],pi:[he,[],()=>Math.PI],e:[he,[],()=>Math.E],"^":[he,[he,he],(e,[t,r])=>Math.pow(t.evaluate(e),r.evaluate(e))],sqrt:[he,[he],(e,[t])=>Math.sqrt(t.evaluate(e))],log10:[he,[he],(e,[t])=>Math.log(t.evaluate(e))/Math.LN10],ln:[he,[he],(e,[t])=>Math.log(t.evaluate(e))],log2:[he,[he],(e,[t])=>Math.log(t.evaluate(e))/Math.LN2],sin:[he,[he],(e,[t])=>Math.sin(t.evaluate(e))],cos:[he,[he],(e,[t])=>Math.cos(t.evaluate(e))],tan:[he,[he],(e,[t])=>Math.tan(t.evaluate(e))],asin:[he,[he],(e,[t])=>Math.asin(t.evaluate(e))],acos:[he,[he],(e,[t])=>Math.acos(t.evaluate(e))],atan:[he,[he],(e,[t])=>Math.atan(t.evaluate(e))],min:[he,en(he),(e,t)=>Math.min(...t.map((t=>t.evaluate(e))))],max:[he,en(he),(e,t)=>Math.max(...t.map((t=>t.evaluate(e))))],abs:[he,[he],(e,[t])=>Math.abs(t.evaluate(e))],round:[he,[he],(e,[t])=>{let r=t.evaluate(e);return r<0?-Math.round(-r):Math.round(r)}],floor:[he,[he],(e,[t])=>Math.floor(t.evaluate(e))],ceil:[he,[he],(e,[t])=>Math.ceil(t.evaluate(e))],"filter-==":[pe,[fe,ge],(e,[t,r])=>e.properties()[t.value]===r.value],"filter-id-==":[pe,[ge],(e,[t])=>e.id()===t.value],"filter-type-==":[pe,[fe],(e,[t])=>e.geometryType()===t.value],"filter-<":[pe,[fe,ge],(e,[t,r])=>{let n=e.properties()[t.value],i=r.value;return typeof n==typeof i&&n{let r=e.id(),n=t.value;return typeof r==typeof n&&r":[pe,[fe,ge],(e,[t,r])=>{let n=e.properties()[t.value],i=r.value;return typeof n==typeof i&&n>i}],"filter-id->":[pe,[ge],(e,[t])=>{let r=e.id(),n=t.value;return typeof r==typeof n&&r>n}],"filter-<=":[pe,[fe,ge],(e,[t,r])=>{let n=e.properties()[t.value],i=r.value;return typeof n==typeof i&&n<=i}],"filter-id-<=":[pe,[ge],(e,[t])=>{let r=e.id(),n=t.value;return typeof r==typeof n&&r<=n}],"filter->=":[pe,[fe,ge],(e,[t,r])=>{let n=e.properties()[t.value],i=r.value;return typeof n==typeof i&&n>=i}],"filter-id->=":[pe,[ge],(e,[t])=>{let r=e.id(),n=t.value;return typeof r==typeof n&&r>=n}],"filter-has":[pe,[ge],(e,[t])=>t.value in e.properties()],"filter-has-id":[pe,[],e=>null!==e.id()&&void 0!==e.id()],"filter-type-in":[pe,[we(fe)],(e,[t])=>t.value.indexOf(e.geometryType())>=0],"filter-id-in":[pe,[we(ge)],(e,[t])=>t.value.indexOf(e.id())>=0],"filter-in-small":[pe,[fe,we(ge)],(e,[t,r])=>r.value.indexOf(e.properties()[t.value])>=0],"filter-in-large":[pe,[fe,we(ge)],(e,[t,r])=>function(e,t,r,n){for(;r<=n;){let i=r+n>>1;if(t[i]===e)return!0;t[i]>e?n=i-1:r=i+1}return!1}(e.properties()[t.value],r.value,0,r.value.length-1)],all:{type:pe,overloads:[[[pe,pe],(e,[t,r])=>t.evaluate(e)&&r.evaluate(e)],[en(pe),(e,t)=>{for(let r of t)if(!r.evaluate(e))return!1;return!0}]]},any:{type:pe,overloads:[[[pe,pe],(e,[t,r])=>t.evaluate(e)||r.evaluate(e)],[en(pe),(e,t)=>{for(let r of t)if(r.evaluate(e))return!0;return!1}]]},"!":[pe,[pe],(e,[t])=>!t.evaluate(e)],"is-supported-script":[pe,[fe],(e,[t])=>{let r=e.globals&&e.globals.isSupportedScript;return!r||r(t.evaluate(e))}],upcase:[fe,[fe],(e,[t])=>t.evaluate(e).toUpperCase()],downcase:[fe,[fe],(e,[t])=>t.evaluate(e).toLowerCase()],concat:[fe,en(ge),(e,t)=>t.map((t=>ot(t.evaluate(e)))).join("")],"resolved-locale":[fe,[ye],(e,[t])=>t.evaluate(e).resolvedLocale()]});class _n{constructor(e,t){var r;this.expression=e,this._warningHistory={},this._evaluator=new dt,this._defaultValue=t?"color"===(r=t).type&&fn(r.default)?new Xe(0,0,0,0):"color"===r.type?Xe.parse(r.default)||null:"padding"===r.type?Qe.parse(r.default)||null:"variableAnchorOffsetCollection"===r.type?tt.parse(r.default)||null:void 0===r.default?null:r.default:null,this._enumValues=t&&"enum"===t.type?t.values:null}evaluateWithoutErrorHandling(e,t,r,n,i,a){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=r,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)}evaluate(e,t,r,n,i,a){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=r||null,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a||null;try{let e=this.expression.evaluate(this._evaluator);if(null==e||"number"==typeof e&&e!=e)return this._defaultValue;if(this._enumValues&&!(e in this._enumValues))throw new lt(`Expected value to be one of ${Object.keys(this._enumValues).map((e=>JSON.stringify(e))).join(", ")}, but found ${JSON.stringify(e)} instead.`);return e}catch(e){return this._warningHistory[e.message]||(this._warningHistory[e.message]=!0,typeof console<"u"&&console.warn(e.message)),this._defaultValue}}}function bn(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&e[0]in Xr}function wn(e,t){let r=new mt(Xr,tn,[],t?function(e){let t={color:de,string:fe,number:he,enum:fe,boolean:pe,formatted:ve,padding:xe,resolvedImage:_e,variableAnchorOffsetCollection:be};return"array"===e.type?we(t[e.value]||ge,e.length):t[e.type]}(t):void 0),n=r.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return n?on(new _n(n,t)):sn(r.errors)}class Tn{constructor(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!nn(t.expression)}evaluateWithoutErrorHandling(e,t,r,n,i,a){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,n,i,a)}evaluate(e,t,r,n,i,a){return this._styleExpression.evaluate(e,t,r,n,i,a)}}class kn{constructor(e,t,r,n){this.kind=e,this.zoomStops=r,this._styleExpression=t,this.isStateDependent="camera"!==e&&!nn(t.expression),this.interpolationType=n}evaluateWithoutErrorHandling(e,t,r,n,i,a){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,n,i,a)}evaluate(e,t,r,n,i,a){return this._styleExpression.evaluate(e,t,r,n,i,a)}interpolationFactor(e,t,r){return this.interpolationType?zt.interpolationFactor(this.interpolationType,e,t,r):0}}function An(e,t){let r=wn(e,t);if("error"===r.result)return r;let n=r.value.expression,i=rn(n);if(!i&&!ln(t))return sn([new le("","data expressions not supported")]);let a=an(n,["zoom"]);if(!a&&!cn(t))return sn([new le("","zoom expressions not supported")]);let o=Sn(n);return o||a?o instanceof le?sn([o]):o instanceof zt&&!un(t)?sn([new le("",'"interpolate" expressions cannot be used with this property')]):on(o?new kn(i?"camera":"composite",r.value,o.labels,o instanceof zt?o.interpolation:void 0):new Tn(i?"constant":"source",r.value)):sn([new le("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Mn{constructor(e,t){this._parameters=e,this._specification=t,se(this,dn(this._parameters,this._specification))}static deserialize(e){return new Mn(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function Sn(e){let t=null;if(e instanceof gt)t=Sn(e.result);else if(e instanceof Ot){for(let r of e.args)if(t=Sn(r),t)break}else(e instanceof At||e instanceof zt)&&e.input instanceof $r&&"zoom"===e.input.name&&(t=e);return t instanceof le||e.eachChild((e=>{let r=Sn(e);r instanceof le?t=r:!t&&r?t=new le("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&r&&t!==r&&(t=new le("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),t}function En(e){if(!0===e||!1===e)return!0;if(!Array.isArray(e)||0===e.length)return!1;switch(e[0]){case"has":return e.length>=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&("string"!=typeof e[1]||Array.isArray(e[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(let t of e.slice(1))if(!En(t)&&"boolean"!=typeof t)return!1;return!0;default:return!0}}let Cn={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function In(e){if(null==e)return{filter:()=>!0,needGeometry:!1};En(e)||(e=zn(e));let t=wn(e,Cn);if("error"===t.result)throw new Error(t.value.map((e=>`${e.key}: ${e.message}`)).join(", "));return{filter:(e,r,n)=>t.value.evaluate(e,r,{},n),needGeometry:Pn(e)}}function Ln(e,t){return et?1:0}function Pn(e){if(!Array.isArray(e))return!1;if("within"===e[0]||"distance"===e[0])return!0;for(let t=1;t"===t||"<="===t||">="===t?Dn(e[1],e[2],t):"any"===t?(r=e.slice(1),["any"].concat(r.map(zn))):"all"===t?["all"].concat(e.slice(1).map(zn)):"none"===t?["all"].concat(e.slice(1).map(zn).map(Fn)):"in"===t?On(e[1],e.slice(2)):"!in"===t?Fn(On(e[1],e.slice(2))):"has"===t?Rn(e[1]):"!has"!==t||Fn(Rn(e[1]));var r}function Dn(e,t,r){switch(e){case"$type":return[`filter-type-${r}`,t];case"$id":return[`filter-id-${r}`,t];default:return[`filter-${r}`,e,t]}}function On(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some((e=>typeof e!=typeof t[0]))?["filter-in-large",e,["literal",t.sort(Ln)]]:["filter-in-small",e,["literal",t]]}}function Rn(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function Fn(e){return["!",e]}function Bn(e){let t=typeof e;if("number"===t||"boolean"===t||"string"===t||null==e)return JSON.stringify(e);if(Array.isArray(e)){let t="[";for(let r of e)t+=`${Bn(r)},`;return`${t}]`}let r=Object.keys(e).sort(),n="{";for(let t=0;tn.maximum?[new oe(t,r,`${r} is greater than the maximum value ${n.maximum}`)]:[]}function Wn(e){let t,r,n,i=e.valueSpec,a=Un(e.value.type),o={},s="categorical"!==a&&void 0===e.value.property,l=!s,c="array"===hn(e.value.stops)&&"array"===hn(e.value.stops[0])&&"object"===hn(e.value.stops[0][0]),u=qn({key:e.key,value:e.value,valueSpec:e.styleSpec.function,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:function(e){if("identity"===a)return[new oe(e.key,e.value,'identity function may not have a "stops" property')];let t=[],r=e.value;return t=t.concat(Hn({key:e.key,value:r,valueSpec:e.valueSpec,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,arrayElementValidator:h})),"array"===hn(r)&&0===r.length&&t.push(new oe(e.key,r,"array must have at least one stop")),t},default:function(e){return e.validateSpec({key:e.key,value:e.value,valueSpec:i,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec})}}});return"identity"===a&&s&&u.push(new oe(e.key,e.value,'missing required property "property"')),"identity"===a||e.value.stops||u.push(new oe(e.key,e.value,'missing required property "stops"')),"exponential"===a&&e.valueSpec.expression&&!un(e.valueSpec)&&u.push(new oe(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(l&&!ln(e.valueSpec)?u.push(new oe(e.key,e.value,"property functions not supported")):s&&!cn(e.valueSpec)&&u.push(new oe(e.key,e.value,"zoom functions not supported"))),"categorical"!==a&&!c||void 0!==e.value.property||u.push(new oe(e.key,e.value,'"property" property is required')),u;function h(e){let t=[],a=e.value,s=e.key;if("array"!==hn(a))return[new oe(s,a,`array expected, ${hn(a)} found`)];if(2!==a.length)return[new oe(s,a,`array length 2 expected, length ${a.length} found`)];if(c){if("object"!==hn(a[0]))return[new oe(s,a,`object expected, ${hn(a[0])} found`)];if(void 0===a[0].zoom)return[new oe(s,a,"object stop key must have zoom")];if(void 0===a[0].value)return[new oe(s,a,"object stop key must have value")];if(n&&n>Un(a[0].zoom))return[new oe(s,a[0].zoom,"stop zoom values must appear in ascending order")];Un(a[0].zoom)!==n&&(n=Un(a[0].zoom),r=void 0,o={}),t=t.concat(qn({key:`${s}[0]`,value:a[0],valueSpec:{zoom:{}},validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:Gn,value:f}}))}else t=t.concat(f({key:`${s}[0]`,value:a[0],valueSpec:{},validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec},a));return bn(Vn(a[1]))?t.concat([new oe(`${s}[1]`,a[1],"expressions are not allowed in function stops.")]):t.concat(e.validateSpec({key:`${s}[1]`,value:a[1],valueSpec:i,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec}))}function f(e,n){let s=hn(e.value),l=Un(e.value),c=null!==e.value?e.value:n;if(t){if(s!==t)return[new oe(e.key,c,`${s} stop domain type must match previous stop domain type ${t}`)]}else t=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new oe(e.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==a){let t=`number expected, ${s} found`;return ln(i)&&void 0===a&&(t+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new oe(e.key,c,t)]}return"categorical"!==a||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==a&&"number"===s&&void 0!==r&&lnew oe(`${e.key}${t.key}`,e.value,t.message)));let r=t.value.expression||t.value._styleExpression.expression;if("property"===e.expressionContext&&"text-font"===e.propertyKey&&!r.outputDefined())return[new oe(e.key,e.value,`Invalid data expression for "${e.propertyKey}". Output values must be contained as literals within the expression.`)];if("property"===e.expressionContext&&"layout"===e.propertyType&&!nn(r))return[new oe(e.key,e.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===e.expressionContext&&!nn(r))return[new oe(e.key,e.value,'"feature-state" data expressions are not supported with filters.')];if(e.expressionContext&&0===e.expressionContext.indexOf("cluster")){if(!an(r,["zoom","feature-state"]))return[new oe(e.key,e.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===e.expressionContext&&!rn(r))return[new oe(e.key,e.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Yn(e){let t=e.key,r=e.value,n=e.valueSpec,i=[];return Array.isArray(n.values)?-1===n.values.indexOf(Un(r))&&i.push(new oe(t,r,`expected one of [${n.values.join(", ")}], ${JSON.stringify(r)} found`)):-1===Object.keys(n.values).indexOf(Un(r))&&i.push(new oe(t,r,`expected one of [${Object.keys(n.values).join(", ")}], ${JSON.stringify(r)} found`)),i}function Xn(e){return En(Vn(e.value))?Zn(se({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}})):$n(e)}function $n(e){let t=e.value,r=e.key;if("array"!==hn(t))return[new oe(r,t,`array expected, ${hn(t)} found`)];let n,i=e.styleSpec,a=[];if(t.length<1)return[new oe(r,t,"filter array must have at least 1 element")];switch(a=a.concat(Yn({key:`${r}[0]`,value:t[0],valueSpec:i.filter_operator,style:e.style,styleSpec:e.styleSpec})),Un(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&"$type"===Un(t[1])&&a.push(new oe(r,t,`"$type" cannot be use with operator "${t[0]}"`));case"==":case"!=":3!==t.length&&a.push(new oe(r,t,`filter array for operator "${t[0]}" must have 3 elements`));case"in":case"!in":t.length>=2&&(n=hn(t[1]),"string"!==n&&a.push(new oe(`${r}[1]`,t[1],`string expected, ${n} found`)));for(let o=2;o{e in r&&t.push(new oe(n,r[e],`"${e}" is prohibited for ref layers`))})),i.layers.forEach((t=>{Un(t.id)===s&&(e=t)})),e?e.ref?t.push(new oe(n,r.ref,"ref cannot reference another ref layer")):o=Un(e.type):t.push(new oe(n,r.ref,`ref layer "${s}" not found`))}else if("background"!==o)if(r.source){let e=i.sources&&i.sources[r.source],a=e&&Un(e.type);e?"vector"===a&&"raster"===o?t.push(new oe(n,r.source,`layer "${r.id}" requires a raster source`)):"raster-dem"!==a&&"hillshade"===o?t.push(new oe(n,r.source,`layer "${r.id}" requires a raster-dem source`)):"raster"===a&&"raster"!==o?t.push(new oe(n,r.source,`layer "${r.id}" requires a vector source`)):"vector"!==a||r["source-layer"]?"raster-dem"===a&&"hillshade"!==o?t.push(new oe(n,r.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==o||!r.paint||!r.paint["line-gradient"]||"geojson"===a&&e.lineMetrics||t.push(new oe(n,r,`layer "${r.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):t.push(new oe(n,r,`layer "${r.id}" must specify a "source-layer"`)):t.push(new oe(n,r.source,`source "${r.source}" not found`))}else t.push(new oe(n,r,'missing required property "source"'));return t=t.concat(qn({key:n,value:r,valueSpec:a.layer,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":()=>[],type:()=>e.validateSpec({key:`${n}.type`,value:r.type,valueSpec:a.layer.type,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,object:r,objectKey:"type"}),filter:Xn,layout:e=>qn({layer:r,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":e=>Qn(se({layerType:o},e))}}),paint:e=>qn({layer:r,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":e=>Jn(se({layerType:o},e))}})}})),t}function ti(e){let t=e.value,r=e.key,n=hn(t);return"string"!==n?[new oe(r,t,`string expected, ${n} found`)]:[]}let ri={promoteId:function({key:e,value:t}){if("string"===hn(t))return ti({key:e,value:t});{let r=[];for(let n in t)r.push(...ti({key:`${e}.${n}`,value:t[n]}));return r}}};function ni(e){let t=e.value,r=e.key,n=e.styleSpec,i=e.style,a=e.validateSpec;if(!t.type)return[new oe(r,t,'"type" is required')];let o,s=Un(t.type);switch(s){case"vector":case"raster":return o=qn({key:r,value:t,valueSpec:n[`source_${s.replace("-","_")}`],style:e.style,styleSpec:n,objectElementValidators:ri,validateSpec:a}),o;case"raster-dem":return o=function(e){var t;let r=null!==(t=e.sourceName)&&void 0!==t?t:"",n=e.value,i=e.styleSpec,a=i.source_raster_dem,o=e.style,s=[],l=hn(n);if(void 0===n)return s;if("object"!==l)return s.push(new oe("source_raster_dem",n,`object expected, ${l} found`)),s;let c="custom"===Un(n.encoding),u=["redFactor","greenFactor","blueFactor","baseShift"],h=e.value.encoding?`"${e.value.encoding}"`:"Default";for(let t in n)!c&&u.includes(t)?s.push(new oe(t,n[t],`In "${r}": "${t}" is only valid when "encoding" is set to "custom". ${h} encoding found`)):a[t]?s=s.concat(e.validateSpec({key:t,value:n[t],valueSpec:a[t],validateSpec:e.validateSpec,style:o,styleSpec:i})):s.push(new oe(t,n[t],`unknown property "${t}"`));return s}({sourceName:r,value:t,style:e.style,styleSpec:n,validateSpec:a}),o;case"geojson":if(o=qn({key:r,value:t,valueSpec:n.source_geojson,style:i,styleSpec:n,validateSpec:a,objectElementValidators:ri}),t.cluster)for(let e in t.clusterProperties){let[n,i]=t.clusterProperties[e],s="string"==typeof n?[n,["accumulated"],["get",e]]:n;o.push(...Zn({key:`${r}.${e}.map`,value:i,validateSpec:a,expressionContext:"cluster-map"})),o.push(...Zn({key:`${r}.${e}.reduce`,value:s,validateSpec:a,expressionContext:"cluster-reduce"}))}return o;case"video":return qn({key:r,value:t,valueSpec:n.source_video,style:i,validateSpec:a,styleSpec:n});case"image":return qn({key:r,value:t,valueSpec:n.source_image,style:i,validateSpec:a,styleSpec:n});case"canvas":return[new oe(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Yn({key:`${r}.type`,value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:i,validateSpec:a,styleSpec:n})}}function ii(e){let t=e.value,r=e.styleSpec,n=r.light,i=e.style,a=[],o=hn(t);if(void 0===t)return a;if("object"!==o)return a=a.concat([new oe("light",t,`object expected, ${o} found`)]),a;for(let o in t){let s=o.match(/^(.*)-transition$/);a=a.concat(s&&n[s[1]]&&n[s[1]].transition?e.validateSpec({key:o,value:t[o],valueSpec:r.transition,validateSpec:e.validateSpec,style:i,styleSpec:r}):n[o]?e.validateSpec({key:o,value:t[o],valueSpec:n[o],validateSpec:e.validateSpec,style:i,styleSpec:r}):[new oe(o,t[o],`unknown property "${o}"`)])}return a}function ai(e){let t=e.value,r=e.styleSpec,n=r.sky,i=e.style,a=hn(t);if(void 0===t)return[];if("object"!==a)return[new oe("sky",t,`object expected, ${a} found`)];let o=[];for(let a in t)o=o.concat(n[a]?e.validateSpec({key:a,value:t[a],valueSpec:n[a],style:i,styleSpec:r}):[new oe(a,t[a],`unknown property "${a}"`)]);return o}function oi(e){let t=e.value,r=e.styleSpec,n=r.terrain,i=e.style,a=[],o=hn(t);if(void 0===t)return a;if("object"!==o)return a=a.concat([new oe("terrain",t,`object expected, ${o} found`)]),a;for(let o in t)a=a.concat(n[o]?e.validateSpec({key:o,value:t[o],valueSpec:n[o],validateSpec:e.validateSpec,style:i,styleSpec:r}):[new oe(o,t[o],`unknown property "${o}"`)]);return a}function si(e){let t=[],r=e.value,n=e.key;if(Array.isArray(r)){let i=[],a=[];for(let o in r)r[o].id&&i.includes(r[o].id)&&t.push(new oe(n,r,`all the sprites' ids must be unique, but ${r[o].id} is duplicated`)),i.push(r[o].id),r[o].url&&a.includes(r[o].url)&&t.push(new oe(n,r,`all the sprites' URLs must be unique, but ${r[o].url} is duplicated`)),a.push(r[o].url),t=t.concat(qn({key:`${n}[${o}]`,value:r[o],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:e.validateSpec}));return t}return ti({key:n,value:r})}let li={"*":()=>[],array:Hn,boolean:function(e){let t=e.value,r=e.key,n=hn(t);return"boolean"!==n?[new oe(r,t,`boolean expected, ${n} found`)]:[]},number:Gn,color:function(e){let t=e.key,r=e.value,n=hn(r);return"string"!==n?[new oe(t,r,`color expected, ${n} found`)]:Xe.parse(String(r))?[]:[new oe(t,r,`color expected, "${r}" found`)]},constants:Nn,enum:Yn,filter:Xn,function:Wn,layer:ei,object:qn,source:ni,light:ii,sky:ai,terrain:oi,projection:function(e){let t=e.value,r=e.styleSpec,n=r.projection,i=e.style,a=hn(t);if(void 0===t)return[];if("object"!==a)return[new oe("projection",t,`object expected, ${a} found`)];let o=[];for(let a in t)o=o.concat(n[a]?e.validateSpec({key:a,value:t[a],valueSpec:n[a],style:i,styleSpec:r}):[new oe(a,t[a],`unknown property "${a}"`)]);return o},string:ti,formatted:function(e){return 0===ti(e).length?[]:Zn(e)},resolvedImage:function(e){return 0===ti(e).length?[]:Zn(e)},padding:function(e){let t=e.key,r=e.value;if("array"===hn(r)){if(r.length<1||r.length>4)return[new oe(t,r,`padding requires 1 to 4 values; ${r.length} values found`)];let n={type:"number"},i=[];for(let a=0;a[]}})),e.constants&&(r=r.concat(Nn({key:"constants",value:e.constants,style:e,styleSpec:t,validateSpec:ci}))),pi(r)}function fi(e){return function(t){return e(p(f({},t),{validateSpec:ci}))}}function pi(e){return[].concat(e).sort(((e,t)=>e.line-t.line))}function di(e){return function(...t){return pi(e.apply(this,t))}}hi.source=di(fi(ni)),hi.sprite=di(fi(si)),hi.glyphs=di(fi(ui)),hi.light=di(fi(ii)),hi.sky=di(fi(ai)),hi.terrain=di(fi(oi)),hi.layer=di(fi(ei)),hi.filter=di(fi(Xn)),hi.paintProperty=di(fi(Jn)),hi.layoutProperty=di(fi(Qn));let mi=hi,gi=mi.light,yi=mi.sky,vi=mi.paintProperty,xi=mi.layoutProperty;function _i(e,t){let r=!1;if(t&&t.length)for(let n of t)e.fire(new W(new Error(n.message))),r=!0;return r}class bi{constructor(e,t,r){let n=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;let i=new Int32Array(this.arrayBuffer);e=i[0],this.d=(t=i[1])+2*(r=i[2]);for(let e=0;e=c[l+0]&&n>=c[l+1])?(o[h]=!0,a.push(i[h])):o[h]=!1}}}}_forEachCell(e,t,r,n,i,a,o,s){let l=this._convertToCellCoord(e),c=this._convertToCellCoord(t),u=this._convertToCellCoord(r),h=this._convertToCellCoord(n);for(let f=l;f<=u;f++)for(let l=c;l<=h;l++){let c=this.d*l+f;if((!s||s(this._convertFromCellCoord(f),this._convertFromCellCoord(l),this._convertFromCellCoord(f+1),this._convertFromCellCoord(l+1)))&&i.call(this,e,t,r,n,c,a,o,s))return}}_convertFromCellCoord(e){return(e-this.padding)/this.scale}_convertToCellCoord(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let e=this.cells,t=3+this.cells.length+1+1,r=0;for(let e=0;e=0)continue;let a=e[n];i[n]=wi[r].shallow.indexOf(n)>=0?a:Si(a,t)}e instanceof Error&&(i.message=e.message)}if(i.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==r&&(i.$name=r),i}function Ei(e){if(Mi(e))return e;if(Array.isArray(e))return e.map(Ei);if("object"!=typeof e)throw new Error("can't deserialize object of type "+typeof e);let t=Ai(e)||"Object";if(!wi[t])throw new Error(`can't deserialize unregistered class ${t}`);let{klass:r}=wi[t];if(!r)throw new Error(`can't deserialize unregistered class ${t}`);if(r.deserialize)return r.deserialize(e);let n=Object.create(r.prototype);for(let r of Object.keys(e)){if("$name"===r)continue;let i=e[r];n[r]=wi[t].shallow.indexOf(r)>=0?i:Ei(i)}return n}class Ci{constructor(){this.first=!0}update(e,t){let r=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=t):this.lastFloorZoome>=12272&&e<=12287,Li=e=>e>=12288&&e<=12351,Pi=e=>e>=12448&&e<=12543,zi=e=>e>=12736&&e<=12783,Di=e=>e>=12800&&e<=13055,Oi=e=>e>=13056&&e<=13311,Ri=e=>e>=65040&&e<=65055,Fi=e=>e>=65072&&e<=65103,Bi=e=>e>=65104&&e<=65135,ji=e=>e>=65280&&e<=65519;function Ni(e){for(let t of e)if(Wi(t.charCodeAt(0)))return!0;return!1}function Ui(e){for(let t of e)if(!Hi(t.charCodeAt(0)))return!1;return!0}function Vi(e){let t=e.map((e=>{try{return new RegExp(`\\p{sc=${e}}`,"u").source}catch{return null}})).filter((e=>e));return new RegExp(t.join("|"),"u")}let qi=Vi(["Arab","Dupl","Mong","Ougr","Syrc"]);function Hi(e){return!qi.test(String.fromCodePoint(e))}let Gi=Vi(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function Wi(e){return!(746!==e&&747!==e&&(e<4352||!(Fi(e)&&!(e>=65097&&e<=65103)||Oi(e)||zi(e)||!(!Li(e)||e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||Di(e)||Ii(e)||(e=>e>=12688&&e<=12703)(e)||Pi(e)&&12540!==e||!(!ji(e)||65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||!(!Bi(e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||Ri(e)||(e=>e>=19904&&e<=19967)(e)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(e))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(e))||Gi.test(String.fromCodePoint(e)))))}function Zi(e){return!(Wi(e)||(t=e,(e=>e>=128&&e<=255)(t)&&(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||(e=>e>=8192&&e<=8303)(t)&&(8214===t||8224===t||8225===t||8240===t||8241===t||8251===t||8252===t||8258===t||8263===t||8264===t||8265===t||8273===t)||(e=>e>=8448&&e<=8527)(t)||(e=>e>=8528&&e<=8591)(t)||(e=>e>=8960&&e<=9215)(t)&&(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||9003===t||t>=9085&&t<=9114||t>=9150&&t<=9165||9167===t||t>=9169&&t<=9179||t>=9186&&t<=9215)||(e=>e>=9216&&e<=9279)(t)&&9251!==t||(e=>e>=9280&&e<=9311)(t)||(e=>e>=9312&&e<=9471)(t)||(e=>e>=9632&&e<=9727)(t)||(e=>e>=9728&&e<=9983)(t)&&!(t>=9754&&t<=9759)||(e=>e>=11008&&e<=11263)(t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||Li(t)||Pi(t)||(e=>e>=57344&&e<=63743)(t)||Fi(t)||Bi(t)||ji(t)||8734===t||8756===t||8757===t||t>=9984&&t<=10087||t>=10102&&t<=10131||65532===t||65533===t));var t}let Yi=Vi(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function Xi(e){return Yi.test(String.fromCodePoint(e))}function $i(e,t){return!(!t&&Xi(e)||e>=2304&&e<=3583||e>=3840&&e<=4255||(e=>e>=6016&&e<=6143)(e))}function Ki(e){for(let t of e)if(Xi(t.charCodeAt(0)))return!0;return!1}let Ji=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(e){this.pluginStatus=e.pluginStatus,this.pluginURL=e.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(e){this.applyArabicShaping=e.applyArabicShaping,this.processBidirectionalText=e.processBidirectionalText,this.processStyledBidirectionalText=e.processStyledBidirectionalText}isParsed(){return null!=this.applyArabicShaping&&null!=this.processBidirectionalText&&null!=this.processStyledBidirectionalText}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class Qi{constructor(e,t){this.zoom=e,t?(this.now=t.now,this.fadeDuration=t.fadeDuration,this.zoomHistory=t.zoomHistory,this.transition=t.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Ci,this.transition={})}isSupportedScript(e){return function(e,t){for(let r of e)if(!$i(r.charCodeAt(0),t))return!1;return!0}(e,"loaded"===Ji.getRTLTextPluginStatus())}crossFadingFactor(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let e=this.zoom,t=e-Math.floor(e),r=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*t}}}class ea{constructor(e,t){this.property=e,this.value=t,this.expression=function(e,t){if(fn(e))return new Mn(e,t);if(bn(e)){let r=An(e,t);if("error"===r.result)throw new Error(r.value.map((e=>`${e.key}: ${e.message}`)).join(", "));return r.value}{let r=e;return"color"===t.type&&"string"==typeof e?r=Xe.parse(e):"padding"!==t.type||"number"!=typeof e&&!Array.isArray(e)?"variableAnchorOffsetCollection"===t.type&&Array.isArray(e)&&(r=tt.parse(e)):r=Qe.parse(e),{kind:"constant",evaluate:()=>r}}}(void 0===t?e.specification.default:t,e.specification)}isDataDriven(){return"source"===this.expression.kind||"composite"===this.expression.kind}possiblyEvaluate(e,t,r){return this.property.possiblyEvaluate(this,e,t,r)}}class ta{constructor(e){this.property=e,this.value=new ea(e,void 0)}transitioned(e,t){return new na(this.property,this.value,t,x({},e.transition,this.transition),e.now)}untransitioned(){return new na(this.property,this.value,null,{},0)}}class ra{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)}getValue(e){return T(this._values[e].value.value)}setValue(e,t){Object.prototype.hasOwnProperty.call(this._values,e)||(this._values[e]=new ta(this._values[e].property)),this._values[e].value=new ea(this._values[e].property,null===t?void 0:T(t))}getTransition(e){return T(this._values[e].transition)}setTransition(e,t){Object.prototype.hasOwnProperty.call(this._values,e)||(this._values[e]=new ta(this._values[e].property)),this._values[e].transition=T(t)||void 0}serialize(){let e={};for(let t of Object.keys(this._values)){let r=this.getValue(t);void 0!==r&&(e[t]=r);let n=this.getTransition(t);void 0!==n&&(e[`${t}-transition`]=n)}return e}transitioned(e,t){let r=new ia(this._properties);for(let n of Object.keys(this._values))r._values[n]=this._values[n].transitioned(e,t._values[n]);return r}untransitioned(){let e=new ia(this._properties);for(let t of Object.keys(this._values))e._values[t]=this._values[t].untransitioned();return e}}class na{constructor(e,t,r,n,i){this.property=e,this.value=t,this.begin=i+n.delay||0,this.end=this.begin+n.duration||0,e.specification.transition&&(n.delay||n.duration)&&(this.prior=r)}possiblyEvaluate(e,t,r){let n=e.now||0,i=this.value.possiblyEvaluate(e,t,r),a=this.prior;if(a){if(n>this.end)return this.prior=null,i;if(this.value.isDataDriven())return this.prior=null,i;if(n=1)return 1;let t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}(o))}}return i}}class ia{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)}possiblyEvaluate(e,t,r){let n=new sa(this._properties);for(let i of Object.keys(this._values))n._values[i]=this._values[i].possiblyEvaluate(e,t,r);return n}hasTransition(){for(let e of Object.keys(this._values))if(this._values[e].prior)return!0;return!1}}class aa{constructor(e){this._properties=e,this._values=Object.create(e.defaultPropertyValues)}hasValue(e){return void 0!==this._values[e].value}getValue(e){return T(this._values[e].value)}setValue(e,t){this._values[e]=new ea(this._values[e].property,null===t?void 0:T(t))}serialize(){let e={};for(let t of Object.keys(this._values)){let r=this.getValue(t);void 0!==r&&(e[t]=r)}return e}possiblyEvaluate(e,t,r){let n=new sa(this._properties);for(let i of Object.keys(this._values))n._values[i]=this._values[i].possiblyEvaluate(e,t,r);return n}}class oa{constructor(e,t,r){this.property=e,this.value=t,this.parameters=r}isConstant(){return"constant"===this.value.kind}constantOr(e){return"constant"===this.value.kind?this.value.value:e}evaluate(e,t,r,n){return this.property.evaluate(this.value,this.parameters,e,t,r,n)}}class sa{constructor(e){this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)}get(e){return this._values[e]}}class la{constructor(e){this.specification=e}possiblyEvaluate(e,t){if(e.isDataDriven())throw new Error("Value should not be data driven");return e.expression.evaluate(t)}interpolate(e,t,r){let n=Pt[this.specification.type];return n?n(e,t,r):e}}class ca{constructor(e,t){this.specification=e,this.overrides=t}possiblyEvaluate(e,t,r,n){return new oa(this,"constant"===e.expression.kind||"camera"===e.expression.kind?{kind:"constant",value:e.expression.evaluate(t,null,{},r,n)}:e.expression,t)}interpolate(e,t,r){if("constant"!==e.value.kind||"constant"!==t.value.kind)return e;if(void 0===e.value.value||void 0===t.value.value)return new oa(this,{kind:"constant",value:void 0},e.parameters);let n=Pt[this.specification.type];if(n){let i=n(e.value.value,t.value.value,r);return new oa(this,{kind:"constant",value:i},e.parameters)}return e}evaluate(e,t,r,n,i,a){return"constant"===e.kind?e.value:e.evaluate(t,r,n,i,a)}}class ua extends ca{possiblyEvaluate(e,t,r,n){if(void 0===e.value)return new oa(this,{kind:"constant",value:void 0},t);if("constant"===e.expression.kind){let i=e.expression.evaluate(t,null,{},r,n),a="resolvedImage"===e.property.specification.type&&"string"!=typeof i?i.name:i,o=this._calculate(a,a,a,t);return new oa(this,{kind:"constant",value:o},t)}if("camera"===e.expression.kind){let r=this._calculate(e.expression.evaluate({zoom:t.zoom-1}),e.expression.evaluate({zoom:t.zoom}),e.expression.evaluate({zoom:t.zoom+1}),t);return new oa(this,{kind:"constant",value:r},t)}return new oa(this,e.expression,t)}evaluate(e,t,r,n,i,a){if("source"===e.kind){let o=e.evaluate(t,r,n,i,a);return this._calculate(o,o,o,t)}return"composite"===e.kind?this._calculate(e.evaluate({zoom:Math.floor(t.zoom)-1},r,n),e.evaluate({zoom:Math.floor(t.zoom)},r,n),e.evaluate({zoom:Math.floor(t.zoom)+1},r,n),t):e.value}_calculate(e,t,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}}interpolate(e){return e}}class ha{constructor(e){this.specification=e}possiblyEvaluate(e,t,r,n){if(void 0!==e.value){if("constant"===e.expression.kind){let i=e.expression.evaluate(t,null,{},r,n);return this._calculate(i,i,i,t)}return this._calculate(e.expression.evaluate(new Qi(Math.floor(t.zoom-1),t)),e.expression.evaluate(new Qi(Math.floor(t.zoom),t)),e.expression.evaluate(new Qi(Math.floor(t.zoom+1),t)),t)}}_calculate(e,t,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}}interpolate(e){return e}}class fa{constructor(e){this.specification=e}possiblyEvaluate(e,t,r,n){return!!e.expression.evaluate(t,null,{},r,n)}interpolate(){return!1}}class pa{constructor(e){this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let t in e){let r=e[t];r.specification.overridable&&this.overridableProperties.push(t);let n=this.defaultPropertyValues[t]=new ea(r,void 0),i=this.defaultTransitionablePropertyValues[t]=new ta(r);this.defaultTransitioningPropertyValues[t]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=n.possiblyEvaluate({})}}}Ti("DataDrivenProperty",ca),Ti("DataConstantProperty",la),Ti("CrossFadedDataDrivenProperty",ua),Ti("CrossFadedProperty",ha),Ti("ColorRampProperty",fa);let da="-transition";class ma extends Z{constructor(e,t){if(super(),this.id=e.id,this.type=e.type,this._featureFilter={filter:()=>!0,needGeometry:!1},"custom"!==e.type&&(this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),t.layout&&(this._unevaluatedLayout=new aa(t.layout)),t.paint)){this._transitionablePaint=new ra(t.paint);for(let t in e.paint)this.setPaintProperty(t,e.paint[t],{validate:!1});for(let t in e.layout)this.setLayoutProperty(t,e.layout[t],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new sa(t.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(e){return"visibility"===e?this.visibility:this._unevaluatedLayout.getValue(e)}setLayoutProperty(e,t,r={}){null!=t&&this._validate(xi,`layers.${this.id}.layout.${e}`,e,t,r)||("visibility"!==e?this._unevaluatedLayout.setValue(e,t):this.visibility=t)}getPaintProperty(e){return e.endsWith(da)?this._transitionablePaint.getTransition(e.slice(0,-11)):this._transitionablePaint.getValue(e)}setPaintProperty(e,t,r={}){if(null!=t&&this._validate(vi,`layers.${this.id}.paint.${e}`,e,t,r))return!1;if(e.endsWith(da))return this._transitionablePaint.setTransition(e.slice(0,-11),t||void 0),!1;{let r=this._transitionablePaint._values[e],n="cross-faded-data-driven"===r.property.specification["property-type"],i=r.value.isDataDriven(),a=r.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);let o=this._transitionablePaint._values[e].value;return o.isDataDriven()||i||n||this._handleOverridablePaintPropertyUpdate(e,a,o)}}_handleSpecialPaintPropertyUpdate(e){}_handleOverridablePaintPropertyUpdate(e,t,r){return!1}isHidden(e){return!!(this.minzoom&&e=this.maxzoom)||"none"===this.visibility}updateTransitions(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,void 0,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,void 0,t)}serialize(){let e={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),w(e,((e,t)=>!(void 0===e||"layout"===t&&!Object.keys(e).length||"paint"===t&&!Object.keys(e).length)))}_validate(e,t,r,n,i={}){return(!i||!1!==i.validate)&&_i(this,e.call(mi,{key:t,layerType:this.type,objectKey:r,value:n,styleSpec:Y,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let e in this.paint._values){let t=this.paint.get(e);if(t instanceof oa&&ln(t.property.specification)&&("source"===t.value.kind||"composite"===t.value.kind)&&t.value.isStateDependent)return!0}return!1}}let ga={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class ya{constructor(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class va{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}}static deserialize(e){let t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(e){this.reserve(e),this.length=e}reserve(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let t=this.uint8;this._refreshViews(),t&&this.uint8.set(t)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function xa(e,t=1){let r=0,n=0;return{members:e.map((e=>{let i=ga[e.type].BYTES_PER_ELEMENT,a=r=_a(r,Math.max(t,i)),o=e.components||1;return n=Math.max(n,i),r+=i*o,{name:e.name,type:e.type,components:o,offset:a}})),size:_a(r,Math.max(n,t)),alignment:t}}function _a(e,t){return Math.ceil(e/t)*t}class ba extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t){let r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){let n=2*e;return this.int16[n+0]=t,this.int16[n+1]=r,e}}ba.prototype.bytesPerElement=4,Ti("StructArrayLayout2i4",ba);class wa extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)}emplace(e,t,r,n){let i=3*e;return this.int16[i+0]=t,this.int16[i+1]=r,this.int16[i+2]=n,e}}wa.prototype.bytesPerElement=6,Ti("StructArrayLayout3i6",wa);class Ta extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r,n)}emplace(e,t,r,n,i){let a=4*e;return this.int16[a+0]=t,this.int16[a+1]=r,this.int16[a+2]=n,this.int16[a+3]=i,e}}Ta.prototype.bytesPerElement=8,Ti("StructArrayLayout4i8",Ta);class ka extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n,i,a)}emplace(e,t,r,n,i,a,o){let s=6*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,e}}ka.prototype.bytesPerElement=12,Ti("StructArrayLayout2i4i12",ka);class Aa extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n,i,a)}emplace(e,t,r,n,i,a,o){let s=4*e,l=8*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.uint8[l+4]=n,this.uint8[l+5]=i,this.uint8[l+6]=a,this.uint8[l+7]=o,e}}Aa.prototype.bytesPerElement=8,Ti("StructArrayLayout2i4ub8",Aa);class Ma extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t){let r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){let n=2*e;return this.float32[n+0]=t,this.float32[n+1]=r,e}}Ma.prototype.bytesPerElement=8,Ti("StructArrayLayout2f8",Ma);class Sa extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a,o,s,l,c){let u=this.length;return this.resize(u+1),this.emplace(u,e,t,r,n,i,a,o,s,l,c)}emplace(e,t,r,n,i,a,o,s,l,c,u){let h=10*e;return this.uint16[h+0]=t,this.uint16[h+1]=r,this.uint16[h+2]=n,this.uint16[h+3]=i,this.uint16[h+4]=a,this.uint16[h+5]=o,this.uint16[h+6]=s,this.uint16[h+7]=l,this.uint16[h+8]=c,this.uint16[h+9]=u,e}}Sa.prototype.bytesPerElement=20,Ti("StructArrayLayout10ui20",Sa);class Ea extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a,o,s,l,c,u,h){let f=this.length;return this.resize(f+1),this.emplace(f,e,t,r,n,i,a,o,s,l,c,u,h)}emplace(e,t,r,n,i,a,o,s,l,c,u,h,f){let p=12*e;return this.int16[p+0]=t,this.int16[p+1]=r,this.int16[p+2]=n,this.int16[p+3]=i,this.uint16[p+4]=a,this.uint16[p+5]=o,this.uint16[p+6]=s,this.uint16[p+7]=l,this.int16[p+8]=c,this.int16[p+9]=u,this.int16[p+10]=h,this.int16[p+11]=f,e}}Ea.prototype.bytesPerElement=24,Ti("StructArrayLayout4i4ui4i24",Ea);class Ca extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)}emplace(e,t,r,n){let i=3*e;return this.float32[i+0]=t,this.float32[i+1]=r,this.float32[i+2]=n,e}}Ca.prototype.bytesPerElement=12,Ti("StructArrayLayout3f12",Ca);class Ia extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.uint32[1*e+0]=t,e}}Ia.prototype.bytesPerElement=4,Ti("StructArrayLayout1ul4",Ia);class La extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a,o,s,l){let c=this.length;return this.resize(c+1),this.emplace(c,e,t,r,n,i,a,o,s,l)}emplace(e,t,r,n,i,a,o,s,l,c){let u=10*e,h=5*e;return this.int16[u+0]=t,this.int16[u+1]=r,this.int16[u+2]=n,this.int16[u+3]=i,this.int16[u+4]=a,this.int16[u+5]=o,this.uint32[h+3]=s,this.uint16[u+8]=l,this.uint16[u+9]=c,e}}La.prototype.bytesPerElement=20,Ti("StructArrayLayout6i1ul2ui20",La);class Pa extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n,i,a)}emplace(e,t,r,n,i,a,o){let s=6*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,e}}Pa.prototype.bytesPerElement=12,Ti("StructArrayLayout2i2i2i12",Pa);class za extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i){let a=this.length;return this.resize(a+1),this.emplace(a,e,t,r,n,i)}emplace(e,t,r,n,i,a){let o=4*e,s=8*e;return this.float32[o+0]=t,this.float32[o+1]=r,this.float32[o+2]=n,this.int16[s+6]=i,this.int16[s+7]=a,e}}za.prototype.bytesPerElement=16,Ti("StructArrayLayout2f1f2i16",za);class Da extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n,i,a)}emplace(e,t,r,n,i,a,o){let s=16*e,l=4*e,c=8*e;return this.uint8[s+0]=t,this.uint8[s+1]=r,this.float32[l+1]=n,this.float32[l+2]=i,this.int16[c+6]=a,this.int16[c+7]=o,e}}Da.prototype.bytesPerElement=16,Ti("StructArrayLayout2ub2f2i16",Da);class Oa extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)}emplace(e,t,r,n){let i=3*e;return this.uint16[i+0]=t,this.uint16[i+1]=r,this.uint16[i+2]=n,e}}Oa.prototype.bytesPerElement=6,Ti("StructArrayLayout3ui6",Oa);class Ra extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a,o,s,l,c,u,h,f,p,d,m,g){let y=this.length;return this.resize(y+1),this.emplace(y,e,t,r,n,i,a,o,s,l,c,u,h,f,p,d,m,g)}emplace(e,t,r,n,i,a,o,s,l,c,u,h,f,p,d,m,g,y){let v=24*e,x=12*e,_=48*e;return this.int16[v+0]=t,this.int16[v+1]=r,this.uint16[v+2]=n,this.uint16[v+3]=i,this.uint32[x+2]=a,this.uint32[x+3]=o,this.uint32[x+4]=s,this.uint16[v+10]=l,this.uint16[v+11]=c,this.uint16[v+12]=u,this.float32[x+7]=h,this.float32[x+8]=f,this.uint8[_+36]=p,this.uint8[_+37]=d,this.uint8[_+38]=m,this.uint32[x+10]=g,this.int16[v+22]=y,e}}Ra.prototype.bytesPerElement=48,Ti("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Ra);class Fa extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a,o,s,l,c,u,h,f,p,d,m,g,y,v,x,_,b,w,T,k,A,M,S){let E=this.length;return this.resize(E+1),this.emplace(E,e,t,r,n,i,a,o,s,l,c,u,h,f,p,d,m,g,y,v,x,_,b,w,T,k,A,M,S)}emplace(e,t,r,n,i,a,o,s,l,c,u,h,f,p,d,m,g,y,v,x,_,b,w,T,k,A,M,S,E){let C=32*e,I=16*e;return this.int16[C+0]=t,this.int16[C+1]=r,this.int16[C+2]=n,this.int16[C+3]=i,this.int16[C+4]=a,this.int16[C+5]=o,this.int16[C+6]=s,this.int16[C+7]=l,this.uint16[C+8]=c,this.uint16[C+9]=u,this.uint16[C+10]=h,this.uint16[C+11]=f,this.uint16[C+12]=p,this.uint16[C+13]=d,this.uint16[C+14]=m,this.uint16[C+15]=g,this.uint16[C+16]=y,this.uint16[C+17]=v,this.uint16[C+18]=x,this.uint16[C+19]=_,this.uint16[C+20]=b,this.uint16[C+21]=w,this.uint16[C+22]=T,this.uint32[I+12]=k,this.float32[I+13]=A,this.float32[I+14]=M,this.uint16[C+30]=S,this.uint16[C+31]=E,e}}Fa.prototype.bytesPerElement=64,Ti("StructArrayLayout8i15ui1ul2f2ui64",Fa);class Ba extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.float32[1*e+0]=t,e}}Ba.prototype.bytesPerElement=4,Ti("StructArrayLayout1f4",Ba);class ja extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)}emplace(e,t,r,n){let i=3*e;return this.uint16[6*e+0]=t,this.float32[i+1]=r,this.float32[i+2]=n,e}}ja.prototype.bytesPerElement=12,Ti("StructArrayLayout1ui2f12",ja);class Na extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)}emplace(e,t,r,n){let i=4*e;return this.uint32[2*e+0]=t,this.uint16[i+2]=r,this.uint16[i+3]=n,e}}Na.prototype.bytesPerElement=8,Ti("StructArrayLayout1ul2ui8",Na);class Ua extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t){let r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){let n=2*e;return this.uint16[n+0]=t,this.uint16[n+1]=r,e}}Ua.prototype.bytesPerElement=4,Ti("StructArrayLayout2ui4",Ua);class Va extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.uint16[1*e+0]=t,e}}Va.prototype.bytesPerElement=2,Ti("StructArrayLayout1ui2",Va);class qa extends va{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,n){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r,n)}emplace(e,t,r,n,i){let a=4*e;return this.float32[a+0]=t,this.float32[a+1]=r,this.float32[a+2]=n,this.float32[a+3]=i,e}}qa.prototype.bytesPerElement=16,Ti("StructArrayLayout4f16",qa);class Ha extends ya{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new a(this.anchorPointX,this.anchorPointY)}}Ha.prototype.size=20;class Ga extends La{get(e){return new Ha(this,e)}}Ti("CollisionBoxArray",Ga);class Wa extends ya{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(e){this._structArray.uint8[this._pos1+37]=e}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(e){this._structArray.uint8[this._pos1+38]=e}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(e){this._structArray.uint32[this._pos4+10]=e}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}Wa.prototype.size=48;class Za extends Ra{get(e){return new Wa(this,e)}}Ti("PlacedSymbolArray",Za);class Ya extends ya{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(e){this._structArray.uint32[this._pos4+12]=e}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}Ya.prototype.size=64;class Xa extends Fa{get(e){return new Ya(this,e)}}Ti("SymbolInstanceArray",Xa);class $a extends Ba{getoffsetX(e){return this.float32[1*e+0]}}Ti("GlyphOffsetArray",$a);class Ka extends wa{getx(e){return this.int16[3*e+0]}gety(e){return this.int16[3*e+1]}gettileUnitDistanceFromAnchor(e){return this.int16[3*e+2]}}Ti("SymbolLineVertexArray",Ka);class Ja extends ya{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}Ja.prototype.size=12;class Qa extends ja{get(e){return new Ja(this,e)}}Ti("TextAnchorOffsetArray",Qa);class eo extends ya{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}eo.prototype.size=8;class to extends Na{get(e){return new eo(this,e)}}Ti("FeatureIndexArray",to);class ro extends ba{}class no extends ba{}class io extends ba{}class ao extends ka{}class oo extends Aa{}class so extends Ma{}class lo extends Sa{}class co extends Ea{}class uo extends Ca{}class ho extends Ia{}class fo extends Pa{}class po extends Da{}class mo extends Oa{}class go extends Ua{}let yo=xa([{name:"a_pos",components:2,type:"Int16"}],4),{members:vo}=yo;class xo{constructor(e=[]){this.segments=e}prepareSegment(e,t,r,n){let i=this.segments[this.segments.length-1];return e>xo.MAX_VERTEX_ARRAY_LENGTH&&A(`Max vertices per segment is ${xo.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${e}`),(!i||i.vertexLength+e>xo.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==n)&&(i={vertexOffset:t.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==n&&(i.sortKey=n),this.segments.push(i)),i}get(){return this.segments}destroy(){for(let e of this.segments)for(let t in e.vaos)e.vaos[t].destroy()}static simpleSegment(e,t,r,n){return new xo([{vertexOffset:e,primitiveOffset:t,vertexLength:r,primitiveLength:n,vaos:{},sortKey:0}])}}function _o(e,t){return 256*(e=y(Math.floor(e),0,255))+y(Math.floor(t),0,255)}xo.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Ti("SegmentVector",xo);let bo=xa([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var wo={exports:{}},To=function(e,t){var r,n,i,a,o,s,l,c;for(n=e.length-(r=3&e.length),i=t,o=3432918353,s=461845907,c=0;c>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(a>>>16)&65535)<<16);switch(l=0,r){case 3:l^=(255&e.charCodeAt(c+2))<<16;case 2:l^=(255&e.charCodeAt(c+1))<<8;case 1:i^=l=(65535&(l=(l=(65535&(l^=255&e.charCodeAt(c)))*o+(((l>>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return i^=e.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0},ko=function(e,t){for(var r,n=e.length,i=t^n,a=0;n>=4;)r=1540483477*(65535&(r=255&e.charCodeAt(a)|(255&e.charCodeAt(++a))<<8|(255&e.charCodeAt(++a))<<16|(255&e.charCodeAt(++a))<<24))+((1540483477*(r>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),n-=4,++a;switch(n){case 3:i^=(255&e.charCodeAt(a+2))<<16;case 2:i^=(255&e.charCodeAt(a+1))<<8;case 1:i=1540483477*(65535&(i^=255&e.charCodeAt(a)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0};wo.exports=To,wo.exports.murmur3=To,wo.exports.murmur2=ko;var Ao=r(wo.exports);class Mo{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(e,t,r,n){this.ids.push(So(e)),this.positions.push(t,r,n)}getPositions(e){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let t=So(e),r=0,n=this.ids.length-1;for(;r>1;this.ids[e]>=t?n=e:r=e+1}let i=[];for(;this.ids[r]===t;)i.push({index:this.positions[3*r],start:this.positions[3*r+1],end:this.positions[3*r+2]}),r++;return i}static serialize(e,t){let r=new Float64Array(e.ids),n=new Uint32Array(e.positions);return Eo(r,n,0,r.length-1),t&&t.push(r.buffer,n.buffer),{ids:r,positions:n}}static deserialize(e){let t=new Mo;return t.ids=e.ids,t.positions=e.positions,t.indexed=!0,t}}function So(e){let t=+e;return!isNaN(t)&&t<=Number.MAX_SAFE_INTEGER?t:Ao(String(e))}function Eo(e,t,r,n){for(;r>1],a=r-1,o=n+1;for(;;){do{a++}while(e[a]i);if(a>=o)break;Co(e,a,o),Co(t,3*a,3*o),Co(t,3*a+1,3*o+1),Co(t,3*a+2,3*o+2)}o-r`u_${e}`)),this.type=r}setUniform(e,t,r){e.set(r.constantOr(this.value))}getBinding(e,t,r){return"color"===this.type?new zo(e,t):new Lo(e,t)}}class Fo{constructor(e,t){this.uniformNames=t.map((e=>`u_${e}`)),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(e,t){this.pixelRatioFrom=t.pixelRatio,this.pixelRatioTo=e.pixelRatio,this.patternFrom=t.tlbr,this.patternTo=e.tlbr}setUniform(e,t,r,n){let i="u_pattern_to"===n?this.patternTo:"u_pattern_from"===n?this.patternFrom:"u_pixel_ratio_to"===n?this.pixelRatioTo:"u_pixel_ratio_from"===n?this.pixelRatioFrom:null;i&&e.set(i)}getBinding(e,t,r){return"u_pattern"===r.substr(0,9)?new Po(e,t):new Lo(e,t)}}class Bo{constructor(e,t,r,n){this.expression=e,this.type=r,this.maxValue=0,this.paintVertexAttributes=t.map((e=>({name:`a_${e}`,type:"Float32",components:"color"===r?2:1,offset:0}))),this.paintVertexArray=new n}populatePaintArray(e,t,r,n,i){let a=this.paintVertexArray.length,o=this.expression.evaluate(new Qi(0),t,{},n,[],i);this.paintVertexArray.resize(e),this._setPaintValue(a,e,o)}updatePaintArray(e,t,r,n){let i=this.expression.evaluate({zoom:0},r,n);this._setPaintValue(e,t,i)}_setPaintValue(e,t,r){if("color"===this.type){let n=Oo(r);for(let r=e;r`u_${e}_t`)),this.type=r,this.useIntegerZoom=n,this.zoom=i,this.maxValue=0,this.paintVertexAttributes=t.map((e=>({name:`a_${e}`,type:"Float32",components:"color"===r?4:2,offset:0}))),this.paintVertexArray=new a}populatePaintArray(e,t,r,n,i){let a=this.expression.evaluate(new Qi(this.zoom),t,{},n,[],i),o=this.expression.evaluate(new Qi(this.zoom+1),t,{},n,[],i),s=this.paintVertexArray.length;this.paintVertexArray.resize(e),this._setPaintValue(s,e,a,o)}updatePaintArray(e,t,r,n){let i=this.expression.evaluate({zoom:this.zoom},r,n),a=this.expression.evaluate({zoom:this.zoom+1},r,n);this._setPaintValue(e,t,i,a)}_setPaintValue(e,t,r,n){if("color"===this.type){let i=Oo(r),a=Oo(n);for(let r=e;r`#define HAS_UNIFORM_${e}`)))}return e}getBinderAttributes(){let e=[];for(let t in this.binders){let r=this.binders[t];if(r instanceof Bo||r instanceof jo)for(let t=0;t!0){this.programConfigurations={};for(let n of e)this.programConfigurations[n.id]=new Uo(n,t,r);this.needsUpload=!1,this._featureMap=new Mo,this._bufferOffset=0}populatePaintArrays(e,t,r,n,i,a){for(let r in this.programConfigurations)this.programConfigurations[r].populatePaintArrays(e,t,n,i,a);void 0!==t.id&&this._featureMap.add(t.id,r,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,t,r,n){for(let i of r)this.needsUpload=this.programConfigurations[i.id].updatePaintArrays(e,this._featureMap,t,i,n)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(let t in this.programConfigurations)this.programConfigurations[t].upload(e);this.needsUpload=!1}}destroy(){for(let e in this.programConfigurations)this.programConfigurations[e].destroy()}}function qo(e,t){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[e]||[e.replace(`${t}-`,"").replace(/-/g,"_")]}function Ho(e,t,r){let n={color:{source:Ma,composite:qa},number:{source:Ba,composite:Ma}},i={"line-pattern":{source:lo,composite:lo},"fill-pattern":{source:lo,composite:lo},"fill-extrusion-pattern":{source:lo,composite:lo}}[e];return i&&i[r]||n[t][r]}Ti("ConstantBinder",Ro),Ti("CrossFadedConstantBinder",Fo),Ti("SourceExpressionBinder",Bo),Ti("CrossFadedCompositeBinder",No),Ti("CompositeExpressionBinder",jo),Ti("ProgramConfiguration",Uo,{omit:["_buffers"]}),Ti("ProgramConfigurationSet",Vo);let Go,Wo,Zo=8192,Yo=Math.pow(2,14)-1,Xo=-Yo-1;function $o(e){let t=Zo/e.extent,r=e.loadGeometry();for(let e=0;er.x+1||ar.y+1)&&A("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return r}function Ko(e,t){return{type:e.type,id:e.id,properties:e.properties,geometry:t?$o(e):[]}}function Jo(e,t,r,n,i){e.emplaceBack(2*t+(n+1)/2,2*r+(i+1)/2)}class Qo{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((e=>e.id)),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new no,this.indexArray=new mo,this.segments=new xo,this.programConfigurations=new Vo(e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter((e=>e.isStateDependent())).map((e=>e.id))}populate(e,t,r){let n=this.layers[0],i=[],a=null,o=!1;"circle"===n.type&&(a=n.layout.get("circle-sort-key"),o=!a.isConstant());for(let{feature:t,id:n,index:s,sourceLayerIndex:l}of e){let e=this.layers[0]._featureFilter.needGeometry,c=Ko(t,e);if(!this.layers[0]._featureFilter.filter(new Qi(this.zoom),c,r))continue;let u=o?a.evaluate(c,{},r):void 0,h={id:n,properties:t.properties,type:t.type,sourceLayerIndex:l,index:s,geometry:e?c.geometry:$o(t),patterns:{},sortKey:u};i.push(h)}o&&i.sort(((e,t)=>e.sortKey-t.sortKey));for(let n of i){let{geometry:i,index:a,sourceLayerIndex:o}=n,s=e[a].feature;this.addFeature(n,i,a,r),t.featureIndex.insert(s,i,a,o,this.index)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,vo),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(e,t,r,n){for(let r of t)for(let t of r){let r=t.x,n=t.y;if(r<0||r>=Zo||n<0||n>=Zo)continue;let i=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),a=i.vertexLength;Jo(this.layoutVertexArray,r,n,-1,-1),Jo(this.layoutVertexArray,r,n,1,-1),Jo(this.layoutVertexArray,r,n,1,1),Jo(this.layoutVertexArray,r,n,-1,1),this.indexArray.emplaceBack(a,a+1,a+2),this.indexArray.emplaceBack(a,a+3,a+2),i.vertexLength+=4,i.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{},n)}}function es(e,t){for(let r=0;r1){if(is(e,t))return!0;for(let n=0;n1?r:r.sub(t)._mult(i)._add(t))}function ls(e,t){let r,n,i,a=!1;for(let o=0;ot.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(a=!a)}return a}function cs(e,t){let r=!1;for(let n=0,i=e.length-1;nt.y!=o.y>t.y&&t.x<(o.x-a.x)*(t.y-a.y)/(o.y-a.y)+a.x&&(r=!r)}return r}function us(e,t,r){let n=r[0],i=r[2];if(e.xi.x&&t.x>i.x||e.yi.y&&t.y>i.y)return!1;let a=M(e,t,r[0]);return a!==M(e,t,r[1])||a!==M(e,t,r[2])||a!==M(e,t,r[3])}function hs(e,t,r){let n=t.paint.get(e).value;return"constant"===n.kind?n.value:r.programConfigurations.get(t.id).getMaxValue(e)}function fs(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function ps(e,t,r,n,i){if(!t[0]&&!t[1])return e;let o=a.convert(t)._mult(i);"viewport"===r&&o._rotate(-n);let s=[];for(let t=0;tTs(e,p)))),f=u?c*o:c;var p;for(let e of n)for(let t of e){let e=u?t:Ts(t,s),r=f,n=bs([],[t.x,t.y,0,1],s);if("viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")?r*=n[3]/a.cameraToCenterDistance:"map"===this.paint.get("circle-pitch-scale")&&"viewport"===this.paint.get("circle-pitch-alignment")&&(r*=a.cameraToCenterDistance/n[3]),ts(h,e,r))return!0}return!1}}function Ts(e,t){let r=bs([],[e.x,e.y,0,1],t);return new a(r[0]/r[3],r[1]/r[3])}class ks extends Qo{}let As;Ti("HeatmapBucket",ks,{omit:["layers"]});var Ms={get paint(){return As=As||new pa({"heatmap-radius":new ca(Y.paint_heatmap["heatmap-radius"]),"heatmap-weight":new ca(Y.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new la(Y.paint_heatmap["heatmap-intensity"]),"heatmap-color":new fa(Y.paint_heatmap["heatmap-color"]),"heatmap-opacity":new la(Y.paint_heatmap["heatmap-opacity"])})}};function Ss(e,{width:t,height:r},n,i){if(i){if(i instanceof Uint8ClampedArray)i=new Uint8Array(i.buffer);else if(i.length!==t*r*n)throw new RangeError(`mismatched image size. expected: ${i.length} but got: ${t*r*n}`)}else i=new Uint8Array(t*r*n);return e.width=t,e.height=r,e.data=i,e}function Es(e,{width:t,height:r},n){if(t===e.width&&r===e.height)return;let i=Ss({},{width:t,height:r},n);Cs(e,i,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,t),height:Math.min(e.height,r)},n),e.width=t,e.height=r,e.data=i.data}function Cs(e,t,r,n,i,a){if(0===i.width||0===i.height)return t;if(i.width>e.width||i.height>e.height||r.x>e.width-i.width||r.y>e.height-i.height)throw new RangeError("out of range source coordinates for image copy");if(i.width>t.width||i.height>t.height||n.x>t.width-i.width||n.y>t.height-i.height)throw new RangeError("out of range destination coordinates for image copy");let o=e.data,s=t.data;if(o===s)throw new Error("srcData equals dstData, so image is already copied");for(let l=0;l{t[e.evaluationKey]=a;let o=e.expression.evaluate(t);i.data[r+n+0]=Math.floor(255*o.r/o.a),i.data[r+n+1]=Math.floor(255*o.g/o.a),i.data[r+n+2]=Math.floor(255*o.b/o.a),i.data[r+n+3]=Math.floor(255*o.a)};if(e.clips)for(let t=0,i=0;t80*r){n=1/0,i=1/0;let t=-1/0,o=-1/0;for(let a=r;at&&(t=r),s>o&&(o=s)}a=Math.max(t-n,o-i),a=0!==a?32767/a:0}return Gs(l,c,r,n,i,a,0),c}function qs(e,t,r,n,i){let a;if(i===function(e,t,r,n){let i=0;for(let a=t,o=r-n;a0)for(let i=t;i=t;i-=n)a=ul(i/n|0,e[i],e[i+1],a);return a&&il(a,a.next)&&(hl(a),a=a.next),a}function Hs(e,t){if(!e)return e;t||(t=e);let r,n=e;do{if(r=!1,n.steiner||!il(n,n.next)&&0!==nl(n.prev,n,n.next))n=n.next;else{if(hl(n),n=t=n.prev,n===n.next)break;r=!0}}while(r||n!==t);return t}function Gs(e,t,r,n,i,a,o){if(!e)return;!o&&a&&function(e,t,r,n){let i=e;do{0===i.z&&(i.z=Qs(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){let t,r=1;do{let n,i=e;e=null;let a=null;for(t=0;i;){t++;let o=i,s=0;for(let e=0;e0||l>0&&o;)0!==s&&(0===l||!o||i.z<=o.z)?(n=i,i=i.nextZ,s--):(n=o,o=o.nextZ,l--),a?a.nextZ=n:e=n,n.prevZ=a,a=n;i=o}a.nextZ=null,r*=2}while(t>1)}(i)}(e,n,i,a);let s=e;for(;e.prev!==e.next;){let l=e.prev,c=e.next;if(a?Zs(e,n,i,a):Ws(e))t.push(l.i,e.i,c.i),hl(e),e=c.next,s=c.next;else if((e=c)===s){o?1===o?Gs(e=Ys(Hs(e),t),t,r,n,i,a,2):2===o&&Xs(e,t,r,n,i,a):Gs(Hs(e),t,r,n,i,a,1);break}}}function Ws(e){let t=e.prev,r=e,n=e.next;if(nl(t,r,n)>=0)return!1;let i=t.x,a=r.x,o=n.x,s=t.y,l=r.y,c=n.y,u=ia?i>o?i:o:a>o?a:o,p=s>l?s>c?s:c:l>c?l:c,d=n.next;for(;d!==t;){if(d.x>=u&&d.x<=f&&d.y>=h&&d.y<=p&&tl(i,s,a,l,o,c,d.x,d.y)&&nl(d.prev,d,d.next)>=0)return!1;d=d.next}return!0}function Zs(e,t,r,n){let i=e.prev,a=e,o=e.next;if(nl(i,a,o)>=0)return!1;let s=i.x,l=a.x,c=o.x,u=i.y,h=a.y,f=o.y,p=sl?s>c?s:c:l>c?l:c,g=u>h?u>f?u:f:h>f?h:f,y=Qs(p,d,t,r,n),v=Qs(m,g,t,r,n),x=e.prevZ,_=e.nextZ;for(;x&&x.z>=y&&_&&_.z<=v;){if(x.x>=p&&x.x<=m&&x.y>=d&&x.y<=g&&x!==i&&x!==o&&tl(s,u,l,h,c,f,x.x,x.y)&&nl(x.prev,x,x.next)>=0||(x=x.prevZ,_.x>=p&&_.x<=m&&_.y>=d&&_.y<=g&&_!==i&&_!==o&&tl(s,u,l,h,c,f,_.x,_.y)&&nl(_.prev,_,_.next)>=0))return!1;_=_.nextZ}for(;x&&x.z>=y;){if(x.x>=p&&x.x<=m&&x.y>=d&&x.y<=g&&x!==i&&x!==o&&tl(s,u,l,h,c,f,x.x,x.y)&&nl(x.prev,x,x.next)>=0)return!1;x=x.prevZ}for(;_&&_.z<=v;){if(_.x>=p&&_.x<=m&&_.y>=d&&_.y<=g&&_!==i&&_!==o&&tl(s,u,l,h,c,f,_.x,_.y)&&nl(_.prev,_,_.next)>=0)return!1;_=_.nextZ}return!0}function Ys(e,t){let r=e;do{let n=r.prev,i=r.next.next;!il(n,i)&&al(n,r,r.next,i)&&ll(n,i)&&ll(i,n)&&(t.push(n.i,r.i,i.i),hl(r),hl(r.next),r=e=i),r=r.next}while(r!==e);return Hs(r)}function Xs(e,t,r,n,i,a){let o=e;do{let e=o.next.next;for(;e!==o.prev;){if(o.i!==e.i&&rl(o,e)){let s=cl(o,e);return o=Hs(o,o.next),s=Hs(s,s.next),Gs(o,t,r,n,i,a,0),void Gs(s,t,r,n,i,a,0)}e=e.next}o=o.next}while(o!==e)}function $s(e,t){return e.x-t.x}function Ks(e,t){let r=function(e,t){let r,n=t,i=e.x,a=e.y,o=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){let e=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(e<=i&&e>o&&(o=e,r=n.x=n.x&&n.x>=l&&i!==n.x&&tl(ar.x||n.x===r.x&&Js(r,n)))&&(r=n,u=t)}n=n.next}while(n!==s);return r}(e,t);if(!r)return t;let n=cl(r,e);return Hs(n,n.next),Hs(r,r.next)}function Js(e,t){return nl(e.prev,e,t.prev)<0&&nl(t.next,e,e.next)<0}function Qs(e,t,r,n,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function el(e){let t=e,r=e;do{(t.x=(e-o)*(a-s)&&(e-o)*(n-s)>=(r-o)*(t-s)&&(r-o)*(a-s)>=(i-o)*(n-s)}function rl(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){let r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&al(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(e,t)&&(ll(e,t)&&ll(t,e)&&function(e,t){let r=e,n=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do{r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}(e,t)&&(nl(e.prev,e,t.prev)||nl(e,t.prev,t))||il(e,t)&&nl(e.prev,e,e.next)>0&&nl(t.prev,t,t.next)>0)}function nl(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function il(e,t){return e.x===t.x&&e.y===t.y}function al(e,t,r,n){let i=sl(nl(e,t,r)),a=sl(nl(e,t,n)),o=sl(nl(r,n,e)),s=sl(nl(r,n,t));return i!==a&&o!==s||!(0!==i||!ol(e,r,t))||!(0!==a||!ol(e,n,t))||!(0!==o||!ol(r,e,n))||!(0!==s||!ol(r,t,n))}function ol(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function sl(e){return e>0?1:e<0?-1:0}function ll(e,t){return nl(e.prev,e,e.next)<0?nl(e,t,e.next)>=0&&nl(e,e.prev,t)>=0:nl(e,t,e.prev)<0||nl(e,e.next,t)<0}function cl(e,t){let r=fl(e.i,e.x,e.y),n=fl(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function ul(e,t,r,n){let i=fl(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function hl(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function fl(e,t,r){return{i:e,x:t,y:r,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function pl(e,t,r){let n=r.patternDependencies,i=!1;for(let r of t){let t=r.paint.get(`${e}-pattern`);t.isConstant()||(i=!0);let a=t.constantOr(null);a&&(i=!0,n[a.to]=!0,n[a.from]=!0)}return i}function dl(e,t,r,n,i){let a=i.patternDependencies;for(let o of t){let t=o.paint.get(`${e}-pattern`).value;if("constant"!==t.kind){let e=t.evaluate({zoom:n-1},r,{},i.availableImages),s=t.evaluate({zoom:n},r,{},i.availableImages),l=t.evaluate({zoom:n+1},r,{},i.availableImages);e=e&&e.name?e.name:e,s=s&&s.name?s.name:s,l=l&&l.name?l.name:l,a[e]=!0,a[s]=!0,a[l]=!0,r.patterns[o.id]={min:e,mid:s,max:l}}}return r}class ml{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((e=>e.id)),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new io,this.indexArray=new mo,this.indexArray2=new go,this.programConfigurations=new Vo(e.layers,e.zoom),this.segments=new xo,this.segments2=new xo,this.stateDependentLayerIds=this.layers.filter((e=>e.isStateDependent())).map((e=>e.id))}populate(e,t,r){this.hasPattern=pl("fill",this.layers,t);let n=this.layers[0].layout.get("fill-sort-key"),i=!n.isConstant(),a=[];for(let{feature:o,id:s,index:l,sourceLayerIndex:c}of e){let e=this.layers[0]._featureFilter.needGeometry,u=Ko(o,e);if(!this.layers[0]._featureFilter.filter(new Qi(this.zoom),u,r))continue;let h=i?n.evaluate(u,{},r,t.availableImages):void 0,f={id:s,properties:o.properties,type:o.type,sourceLayerIndex:c,index:l,geometry:e?u.geometry:$o(o),patterns:{},sortKey:h};a.push(f)}i&&a.sort(((e,t)=>e.sortKey-t.sortKey));for(let n of a){let{geometry:i,index:a,sourceLayerIndex:o}=n;if(this.hasPattern){let e=dl("fill",this.layers,n,this.zoom,t);this.patternFeatures.push(e)}else this.addFeature(n,i,a,r,{});t.featureIndex.insert(e[a].feature,i,a,o,this.index)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r)}addFeatures(e,t,r){for(let e of this.patternFeatures)this.addFeature(e,e.geometry,e.index,t,r)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Us),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.indexBuffer2=e.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(e,t,r,n,i){for(let e of _r(t,500)){let t=0;for(let r of e)t+=r.length;let r=this.segments.prepareSegment(t,this.layoutVertexArray,this.indexArray),n=r.vertexLength,i=[],a=[];for(let t of e){if(0===t.length)continue;t!==e[0]&&a.push(i.length/2);let r=this.segments2.prepareSegment(t.length,this.layoutVertexArray,this.indexArray2),n=r.vertexLength;this.layoutVertexArray.emplaceBack(t[0].x,t[0].y),this.indexArray2.emplaceBack(n+t.length-1,n),i.push(t[0].x),i.push(t[0].y);for(let e=1;e>3}if(i--,1===n||2===n)a+=e.readSVarint(),o+=e.readSVarint(),1===n&&(t&&s.push(t),t=[]),t.push(new wl(a,o));else{if(7!==n)throw new Error("unknown command "+n);t&&t.push(t[0].clone())}}return t&&s.push(t),s},kl.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,r=1,n=0,i=0,a=0,o=1/0,s=-1/0,l=1/0,c=-1/0;e.pos>3}if(n--,1===r||2===r)(i+=e.readSVarint())s&&(s=i),(a+=e.readSVarint())c&&(c=a);else if(7!==r)throw new Error("unknown command "+r)}return[o,l,s,c]},kl.prototype.toGeoJSON=function(e,t,r){var n,i,a=this.extent*Math.pow(2,r),o=this.extent*e,s=this.extent*t,l=this.loadGeometry(),c=kl.types[this.type];function u(e){for(var t=0;t>3;t=1===n?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null}return t}(r))}Cl.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new Sl(this._pbf,t,this.extent,this._keys,this._values)};var Ll=El;function Pl(e,t,r){if(3===e){var n=new Ll(r,r.readVarint()+r.pos);n.length&&(t[n.name]=n)}}bl.VectorTile=function(e,t){this.layers=e.readFields(Pl,{},t)},bl.VectorTileFeature=Tl,bl.VectorTileLayer=El;let zl,Dl=bl.VectorTileFeature.types,Ol=Math.pow(2,13);function Rl(e,t,r,n,i,a,o,s){e.emplaceBack(t,r,2*Math.floor(n*Ol)+o,i*Ol*2,a*Ol*2,Math.round(s))}class Fl{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map((e=>e.id)),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new ao,this.centroidVertexArray=new ro,this.indexArray=new mo,this.programConfigurations=new Vo(e.layers,e.zoom),this.segments=new xo,this.stateDependentLayerIds=this.layers.filter((e=>e.isStateDependent())).map((e=>e.id))}populate(e,t,r){this.features=[],this.hasPattern=pl("fill-extrusion",this.layers,t);for(let{feature:n,id:i,index:a,sourceLayerIndex:o}of e){let e=this.layers[0]._featureFilter.needGeometry,s=Ko(n,e);if(!this.layers[0]._featureFilter.filter(new Qi(this.zoom),s,r))continue;let l={id:i,sourceLayerIndex:o,index:a,geometry:e?s.geometry:$o(n),properties:n.properties,type:n.type,patterns:{}};this.hasPattern?this.features.push(dl("fill-extrusion",this.layers,l,this.zoom,t)):this.addFeature(l,l.geometry,a,r,{}),t.featureIndex.insert(n,l.geometry,a,o,this.index,!0)}}addFeatures(e,t,r){for(let e of this.features){let{geometry:n}=e;this.addFeature(e,n,e.index,t,r)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r)}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.centroidVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,_l),this.centroidVertexBuffer=e.createVertexBuffer(this.centroidVertexArray,xl.members,!0),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(e,t,r,n,i){for(let r of _r(t,500)){let t={x:0,y:0,vertexCount:0},n=0;for(let e of r)n+=e.length;let i=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(let e of r){if(0===e.length||jl(e))continue;let r=0;for(let n=0;n=1){let o=e[n-1];if(!Bl(a,o)){i.vertexLength+4>xo.MAX_VERTEX_ARRAY_LENGTH&&(i=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let e=a.sub(o)._perp()._unit(),n=o.dist(a);r+n>32768&&(r=0),Rl(this.layoutVertexArray,a.x,a.y,e.x,e.y,0,0,r),Rl(this.layoutVertexArray,a.x,a.y,e.x,e.y,0,1,r),t.x+=2*a.x,t.y+=2*a.y,t.vertexCount+=2,r+=n,Rl(this.layoutVertexArray,o.x,o.y,e.x,e.y,0,0,r),Rl(this.layoutVertexArray,o.x,o.y,e.x,e.y,0,1,r),t.x+=2*o.x,t.y+=2*o.y,t.vertexCount+=2;let s=i.vertexLength;this.indexArray.emplaceBack(s,s+2,s+1),this.indexArray.emplaceBack(s+1,s+2,s+3),i.vertexLength+=4,i.primitiveLength+=2}}}}if(i.vertexLength+n>xo.MAX_VERTEX_ARRAY_LENGTH&&(i=this.segments.prepareSegment(n,this.layoutVertexArray,this.indexArray)),"Polygon"!==Dl[e.type])continue;let a=[],o=[],s=i.vertexLength;for(let e of r)if(0!==e.length){e!==r[0]&&o.push(a.length/2);for(let r=0;rZo)||e.y===t.y&&(e.y<0||e.y>Zo)}function jl(e){return e.every((e=>e.x<0))||e.every((e=>e.x>Zo))||e.every((e=>e.y<0))||e.every((e=>e.y>Zo))}Ti("FillExtrusionBucket",Fl,{omit:["layers","features"]});var Nl={get paint(){return zl=zl||new pa({"fill-extrusion-opacity":new la(Y["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new ca(Y["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new la(Y["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new la(Y["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new ua(Y["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new ca(Y["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new ca(Y["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new la(Y["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class Ul extends ma{constructor(e){super(e,Nl)}createBucket(e){return new Fl(e)}queryRadius(){return fs(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(e,t,r,n,i,o,s,l){let c=ps(e,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),o.angle,s),u=this.paint.get("fill-extrusion-height").evaluate(t,r),h=this.paint.get("fill-extrusion-base").evaluate(t,r),f=function(e,t){let r=[];for(let n of e){let e=[n.x,n.y,0,1];bs(e,e,t),r.push(new a(e[0]/e[3],e[1]/e[3]))}return r}(c,l),p=function(e,t,r,n){let i=[],o=[],s=n[8]*t,l=n[9]*t,c=n[10]*t,u=n[11]*t,h=n[8]*r,f=n[9]*r,p=n[10]*r,d=n[11]*r;for(let t of e){let e=[],r=[];for(let i of t){let t=i.x,o=i.y,m=n[0]*t+n[4]*o+n[12],g=n[1]*t+n[5]*o+n[13],y=n[2]*t+n[6]*o+n[14],v=n[3]*t+n[7]*o+n[15],x=y+c,_=v+u,b=m+h,w=g+f,T=y+p,k=v+d,A=new a((m+s)/_,(g+l)/_);A.z=x/_,e.push(A);let M=new a(b/k,w/k);M.z=T/k,r.push(M)}i.push(e),o.push(r)}return[i,o]}(n,h,u,l);return function(e,t,r){let n=1/0;rs(r,t)&&(n=ql(r,t[0]));for(let i=0;ie.id)),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach((e=>{this.gradients[e.id]={}})),this.layoutVertexArray=new oo,this.layoutVertexArray2=new so,this.indexArray=new mo,this.programConfigurations=new Vo(e.layers,e.zoom),this.segments=new xo,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter((e=>e.isStateDependent())).map((e=>e.id))}populate(e,t,r){this.hasPattern=pl("line",this.layers,t);let n=this.layers[0].layout.get("line-sort-key"),i=!n.isConstant(),a=[];for(let{feature:t,id:o,index:s,sourceLayerIndex:l}of e){let e=this.layers[0]._featureFilter.needGeometry,c=Ko(t,e);if(!this.layers[0]._featureFilter.filter(new Qi(this.zoom),c,r))continue;let u=i?n.evaluate(c,{},r):void 0,h={id:o,properties:t.properties,type:t.type,sourceLayerIndex:l,index:s,geometry:e?c.geometry:$o(t),patterns:{},sortKey:u};a.push(h)}i&&a.sort(((e,t)=>e.sortKey-t.sortKey));for(let n of a){let{geometry:i,index:a,sourceLayerIndex:o}=n;if(this.hasPattern){let e=dl("line",this.layers,n,this.zoom,t);this.patternFeatures.push(e)}else this.addFeature(n,i,a,r,{});t.featureIndex.insert(e[a].feature,i,a,o,this.index)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r)}addFeatures(e,t,r){for(let e of this.patternFeatures)this.addFeature(e,e.geometry,e.index,t,r)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=e.createVertexBuffer(this.layoutVertexArray2,Xl)),this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Zl),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(e){if(e.properties&&Object.prototype.hasOwnProperty.call(e.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(e.properties,"mapbox_clip_end"))return{start:+e.properties.mapbox_clip_start,end:+e.properties.mapbox_clip_end}}addFeature(e,t,r,n,i){let a=this.layers[0].layout,o=a.get("line-join").evaluate(e,{}),s=a.get("line-cap"),l=a.get("line-miter-limit"),c=a.get("line-round-limit");this.lineClips=this.lineFeatureClips(e);for(let r of t)this.addLine(r,e,o,s,l,c);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,i,n)}addLine(e,t,r,n,i,a){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let t=0;t=2&&e[s-1].equals(e[s-2]);)s--;let l=0;for(;l0;if(b&&t>l){let e=c.dist(u);if(e>2*d){let t=c.sub(c.sub(u)._mult(d/e)._round());this.updateDistance(u,t),this.addCurrentVertex(t,f,0,0,m),u=t}}let T=u&&h,k=T?r:o?"butt":n;if(T&&"round"===k&&(xi&&(k="bevel"),"bevel"===k&&(x>2&&(k="flipbevel"),x100)g=p.mult(-1);else{let e=x*f.add(p).mag()/f.sub(p).mag();g._perp()._mult(e*(w?-1:1))}this.addCurrentVertex(c,g,0,0,m),this.addCurrentVertex(c,g.mult(-1),0,0,m)}else if("bevel"===k||"fakeround"===k){let e=-Math.sqrt(x*x-1),t=w?e:0,r=w?0:e;if(u&&this.addCurrentVertex(c,f,t,r,m),"fakeround"===k){let e=Math.round(180*_/Math.PI/20);for(let t=1;t2*d){let t=c.add(h.sub(c)._mult(d/e)._round());this.updateDistance(c,t),this.addCurrentVertex(t,p,0,0,m),c=t}}}}addCurrentVertex(e,t,r,n,i,a=!1){let o=t.y*n-t.x,s=-t.y-t.x*n;this.addHalfVertex(e,t.x+t.y*r,t.y-t.x*r,a,!1,r,i),this.addHalfVertex(e,o,s,a,!0,-n,i),this.distance>Jl/2&&0===this.totalDistance&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(e,t,r,n,i,a))}addHalfVertex({x:e,y:t},r,n,i,a,o,s){let l=.5*(this.lineClips?this.scaledDistance*(Jl-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((e<<1)+(i?1:0),(t<<1)+(a?1:0),Math.round(63*r)+128,Math.round(63*n)+128,1+(0===o?0:o<0?-1:1)|(63&l)<<2,l>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let c=s.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,c),s.primitiveLength++),a?this.e2=c:this.e1=c}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(e,t){this.distance+=e.dist(t),this.updateScaledDistance()}}Ti("LineBucket",Ql,{omit:["layers","patternFeatures"]});var ec={get paint(){return Gl=Gl||new pa({"line-opacity":new ca(Y.paint_line["line-opacity"]),"line-color":new ca(Y.paint_line["line-color"]),"line-translate":new la(Y.paint_line["line-translate"]),"line-translate-anchor":new la(Y.paint_line["line-translate-anchor"]),"line-width":new ca(Y.paint_line["line-width"]),"line-gap-width":new ca(Y.paint_line["line-gap-width"]),"line-offset":new ca(Y.paint_line["line-offset"]),"line-blur":new ca(Y.paint_line["line-blur"]),"line-dasharray":new ha(Y.paint_line["line-dasharray"]),"line-pattern":new ua(Y.paint_line["line-pattern"]),"line-gradient":new fa(Y.paint_line["line-gradient"])})},get layout(){return Hl=Hl||new pa({"line-cap":new la(Y.layout_line["line-cap"]),"line-join":new ca(Y.layout_line["line-join"]),"line-miter-limit":new la(Y.layout_line["line-miter-limit"]),"line-round-limit":new la(Y.layout_line["line-round-limit"]),"line-sort-key":new ca(Y.layout_line["line-sort-key"])})}};class tc extends ca{possiblyEvaluate(e,t){return t=new Qi(Math.floor(t.zoom),{now:t.now,fadeDuration:t.fadeDuration,zoomHistory:t.zoomHistory,transition:t.transition}),super.possiblyEvaluate(e,t)}evaluate(e,t,r,n){return t=x({},t,{zoom:Math.floor(t.zoom)}),super.evaluate(e,t,r,n)}}let rc;class nc extends ma{constructor(e){super(e,ec),this.gradientVersion=0,rc||(rc=new tc(ec.paint.properties["line-width"].specification),rc.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(e){if("line-gradient"===e){let e=this.gradientExpression();this.stepInterpolant=!(void 0===e._styleExpression)&&e._styleExpression.expression instanceof At,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(e,t){super.recalculate(e,t),this.paint._values["line-floorwidth"]=rc.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)}createBucket(e){return new Ql(e)}queryRadius(e){let t=e,r=ic(hs("line-width",this,t),hs("line-gap-width",this,t)),n=hs("line-offset",this,t);return r/2+Math.abs(n)+fs(this.paint.get("line-translate"))}queryIntersectsFeature(e,t,r,n,i,o,s){let l=ps(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),o.angle,s),c=s/2*ic(this.paint.get("line-width").evaluate(t,r),this.paint.get("line-gap-width").evaluate(t,r)),u=this.paint.get("line-offset").evaluate(t,r);return u&&(n=function(e,t){let r=[];for(let n=0;n=3)for(let t=0;t0?t+2*e:e}let ac=xa([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),oc=xa([{name:"a_projected_pos",components:3,type:"Float32"}],4);xa([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let sc=xa([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);xa([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);let lc=xa([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),cc=xa([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function uc(e,t,r){return e.sections.forEach((e=>{e.text=function(e,t,r){let n=t.layout.get("text-transform").evaluate(r,{});return"uppercase"===n?e=e.toLocaleUpperCase():"lowercase"===n&&(e=e.toLocaleLowerCase()),Ji.applyArabicShaping&&(e=Ji.applyArabicShaping(e)),e}(e.text,t,r)})),e}xa([{name:"triangle",components:3,type:"Uint16"}]),xa([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),xa([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),xa([{type:"Float32",name:"offsetX"}]),xa([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),xa([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);let hc={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var fc=24,pc=gc,dc=function(e,t,r,n,i){var a,o,s=8*i-n-1,l=(1<>1,u=-7,h=r?i-1:0,f=r?-1:1,p=e[t+h];for(h+=f,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=256*a+e[t+h],h+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=n;u>0;o=256*o+e[t+h],h+=f,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=c}return(p?-1:1)*o*Math.pow(2,a-n)},mc=function(e,t,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+h>=1?f/l:f*Math.pow(2,1-h))*l>=2&&(o++,l/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(t*l-1)*Math.pow(2,i),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;e[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<0;e[r+p]=255&o,p+=d,o/=256,c-=8);e[r+p-d]|=128*m};function gc(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}gc.Varint=0,gc.Fixed64=1,gc.Bytes=2,gc.Fixed32=5;var yc=4294967296,vc=1/yc,xc=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function _c(e){return e.type===gc.Bytes?e.readVarint()+e.pos:e.pos+1}function bc(e,t,r){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i>=e;i--)r.buf[i+n]=r.buf[i]}function wc(e,t){for(var r=0;r>>8,e[r+2]=t>>>16,e[r+3]=t>>>24}function zc(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}gc.prototype={destroy:function(){this.buf=null},readFields:function(e,t,r){for(r=r||this.length;this.pos>3,a=this.pos;this.type=7&n,e(i,t,this),this.pos===a&&this.skip(n)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=Lc(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=zc(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=Lc(this.buf,this.pos)+Lc(this.buf,this.pos+4)*yc;return this.pos+=8,e},readSFixed64:function(){var e=Lc(this.buf,this.pos)+zc(this.buf,this.pos+4)*yc;return this.pos+=8,e},readFloat:function(){var e=dc(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=dc(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,r,n=this.buf;return t=127&(r=n[this.pos++]),r<128?t:(t|=(127&(r=n[this.pos++]))<<7,r<128?t:(t|=(127&(r=n[this.pos++]))<<14,r<128?t:(t|=(127&(r=n[this.pos++]))<<21,r<128?t:function(e,t,r){var n,i,a=r.buf;if(n=(112&(i=a[r.pos++]))>>4,i<128||(n|=(127&(i=a[r.pos++]))<<3,i<128)||(n|=(127&(i=a[r.pos++]))<<10,i<128)||(n|=(127&(i=a[r.pos++]))<<17,i<128)||(n|=(127&(i=a[r.pos++]))<<24,i<128)||(n|=(1&(i=a[r.pos++]))<<31,i<128))return function(e,t,r){return r?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}(e,n,t);throw new Error("Expected varint not more than 10 bytes")}(t|=(15&(r=n[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var e,t,r,n=this.readVarint()+this.pos,i=this.pos;return this.pos=n,n-i>=12&&xc?(e=this.buf,t=i,r=n,xc.decode(e.subarray(t,r))):function(e,t,r){for(var n="",i=t;i239?4:l>223?3:l>191?2:1;if(i+u>r)break;1===u?l<128&&(c=l):2===u?128==(192&(a=e[i+1]))&&(c=(31&l)<<6|63&a)<=127&&(c=null):3===u?(o=e[i+2],128==(192&(a=e[i+1]))&&128==(192&o)&&((c=(15&l)<<12|(63&a)<<6|63&o)<=2047||c>=55296&&c<=57343)&&(c=null)):4===u&&(o=e[i+2],s=e[i+3],128==(192&(a=e[i+1]))&&128==(192&o)&&128==(192&s)&&((c=(15&l)<<18|(63&a)<<12|(63&o)<<6|63&s)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,u=1):c>65535&&(c-=65536,n+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),n+=String.fromCharCode(c),i+=u}return n}(this.buf,i,n)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==gc.Bytes)return e.push(this.readVarint(t));var r=_c(this);for(e=e||[];this.pos127;);else if(t===gc.Bytes)this.pos=this.readVarint()+this.pos;else if(t===gc.Fixed32)this.pos+=4;else{if(t!==gc.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t268435455||e<0?function(e,t){var r,n,i,a;if(e>=0?(r=e%4294967296|0,n=e/4294967296|0):(n=~(-e/4294967296),4294967295^(r=~(-e%4294967296))?r=r+1|0:(r=0,n=n+1|0)),e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),i=r,(a=t).buf[a.pos++]=127&i|128,i>>>=7,a.buf[a.pos++]=127&i|128,i>>>=7,a.buf[a.pos++]=127&i|128,i>>>=7,a.buf[a.pos++]=127&i|128,a.buf[a.pos]=127&(i>>>=7),function(e,t){var r=(7&e)<<4;t.buf[t.pos++]|=r|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e)))))}(n,t)}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(!!e)},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=function(e,t,r){for(var n,i,a=0;a55295&&n<57344){if(!i){n>56319||a+1===t.length?(e[r++]=239,e[r++]=191,e[r++]=189):i=n;continue}if(n<56320){e[r++]=239,e[r++]=191,e[r++]=189,i=n;continue}n=i-55296<<10|n-56320|65536,i=null}else i&&(e[r++]=239,e[r++]=191,e[r++]=189,i=null);n<128?e[r++]=n:(n<2048?e[r++]=n>>6|192:(n<65536?e[r++]=n>>12|224:(e[r++]=n>>18|240,e[r++]=n>>12&63|128),e[r++]=n>>6&63|128),e[r++]=63&n|128)}return r}(this.buf,e,this.pos);var r=this.pos-t;r>=128&&bc(t,r,this),this.pos=t-1,this.writeVarint(r),this.pos+=r},writeFloat:function(e){this.realloc(4),mc(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),mc(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var r=0;r=128&&bc(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(e,t,r){this.writeTag(e,gc.Bytes),this.writeRawMessage(t,r)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,wc,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,Tc,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,Mc,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,kc,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,Ac,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,Sc,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,Ec,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,Cc,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,Ic,t)},writeBytesField:function(e,t){this.writeTag(e,gc.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,gc.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,gc.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,gc.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,gc.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,gc.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,gc.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,gc.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,gc.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,gc.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,!!t)}};var Dc,Oc=r(pc);function Rc(e,t,r){1===e&&r.readMessage(Fc,t)}function Fc(e,t,r){if(3===e){let{id:e,bitmap:n,width:i,height:a,left:o,top:s,advance:l}=r.readMessage(Bc,{});t.push({id:e,bitmap:new Is({width:i+6,height:a+6},n),metrics:{width:i,height:a,left:o,top:s,advance:l}})}}function Bc(e,t,r){1===e?t.id=r.readVarint():2===e?t.bitmap=r.readBytes():3===e?t.width=r.readVarint():4===e?t.height=r.readVarint():5===e?t.left=r.readSVarint():6===e?t.top=r.readSVarint():7===e&&(t.advance=r.readVarint())}function jc(e){let t=0,r=0;for(let n of e)t+=n.w*n.h,r=Math.max(r,n.w);e.sort(((e,t)=>t.h-e.h));let n=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),r),h:1/0}],i=0,a=0;for(let t of e)for(let e=n.length-1;e>=0;e--){let r=n[e];if(!(t.w>r.w||t.h>r.h)){if(t.x=r.x,t.y=r.y,a=Math.max(a,t.y+t.h),i=Math.max(i,t.x+t.w),t.w===r.w&&t.h===r.h){let t=n.pop();e=0&&r>=e&&Wc[this.text.charCodeAt(r)];r--)t--;this.text=this.text.substring(e,t),this.sectionIndex=this.sectionIndex.slice(e,t)}substring(e,t){let r=new Hc;return r.text=this.text.substring(e,t),r.sectionIndex=this.sectionIndex.slice(e,t),r.sections=this.sections,r}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce(((e,t)=>Math.max(e,this.sections[t].scale)),0)}addTextSection(e,t){this.text+=e.text,this.sections.push(qc.forText(e.scale,e.fontStack||t));let r=this.sections.length-1;for(let t=0;t=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Gc(t,r,n,i,a,o,s,l,c,u,h,f,p,d,m){let g,y=Hc.fromFeature(t,a);f===e.ah.vertical&&y.verticalizePunctuation();let{processBidirectionalText:v,processStyledBidirectionalText:x}=Ji;if(v&&1===y.sections.length){g=[];let e=v(y.toString(),eu(y,u,o,r,i,d));for(let t of e){let e=new Hc;e.text=t,e.sections=y.sections;for(let r=0;r0&&n>w&&(w=n)}else{let e=n[m.fontStack],t=e&&e[y];if(t&&t.rect)T=t.rect,_=t.metrics;else{let e=r[m.fontStack],t=e&&e[y];if(!t)continue;_=t.metrics}v=(a-m.scale)*fc}M?(t.verticalizable=!0,b.push({glyph:y,imageName:k,x:p,y:d+v,vertical:M,scale:m.scale,fontStack:m.fontStack,sectionIndex:g,metrics:_,rect:T}),p+=A*m.scale+u):(b.push({glyph:y,imageName:k,x:p,y:d+v,vertical:M,scale:m.scale,fontStack:m.fontStack,sectionIndex:g,metrics:_,rect:T}),p+=_.advance*m.scale+u)}0!==b.length&&(m=Math.max(p-u,m),ru(b,0,b.length-1,y,w)),p=0;let T=o*a+w;_.lineOffset=Math.max(w,l),d+=T,g=Math.max(T,g),++v}var x;let _=d-Vc,{horizontalAlign:b,verticalAlign:w}=tu(s);(function(e,t,r,n,i,a,o,s,l){let c=(t-r)*i,u=0;u=a!==o?-s*n-Vc:(-n*l+.5)*o;for(let t of e)for(let e of t.positionedGlyphs)e.x+=c,e.y+=u})(t.positionedLines,y,b,w,m,g,o,_,a.length),t.top+=-w*_,t.bottom=t.top+_,t.left+=-b*m,t.right=t.left+m}(b,r,n,i,g,s,l,c,f,u,p,m),!function(e){for(let t of e)if(0!==t.positionedGlyphs.length)return!1;return!0}(_)&&b}let Wc={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Zc={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},Yc={40:!0};function Xc(e,t,r,n,i,a){if(t.imageName){let e=n[t.imageName];return e?e.displaySize[0]*t.scale*fc/a+i:0}{let n=r[t.fontStack],a=n&&n[e];return a?a.metrics.advance*t.scale+i:0}}function $c(e,t,r,n){let i=Math.pow(e-t,2);return n?e=0,c=0;for(let r=0;rc){let e=Math.ceil(a/c);i*=e/o,o=e}return{x1:n,y1:i,x2:n+a,y2:i+o}}function au(e,t,r,n,i,a){let o,s=e.image;if(s.content){let e=s.content,t=s.pixelRatio||1;o=[e[0]/t,e[1]/t,s.displaySize[0]-e[2]/t,s.displaySize[1]-e[3]/t]}let l,c,u,h,f=t.left*a,p=t.right*a;"width"===r||"both"===r?(h=i[0]+f-n[3],c=i[0]+p+n[1]):(h=i[0]+(f+p-s.displaySize[0])/2,c=h+s.displaySize[0]);let d=t.top*a,m=t.bottom*a;return"height"===r||"both"===r?(l=i[1]+d-n[0],u=i[1]+m+n[2]):(l=i[1]+(d+m-s.displaySize[1])/2,u=l+s.displaySize[1]),{image:s,top:l,right:c,bottom:u,left:h,collisionPadding:o}}let ou=128,su=32640;function lu(e,t){let{expression:r}=t;if("constant"===r.kind)return{kind:"constant",layoutSize:r.evaluate(new Qi(e+1))};if("source"===r.kind)return{kind:"source"};{let{zoomStops:t,interpolationType:n}=r,i=0;for(;ie.id)),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=ys([]),this.placementViewportMatrix=ys([]);let r=this.layers[0]._unevaluatedLayout._values;this.textSizeData=lu(this.zoom,r["text-size"]),this.iconSizeData=lu(this.zoom,r["icon-size"]);let n=this.layers[0].layout,i=n.get("symbol-sort-key"),a=n.get("symbol-z-order");this.canOverlap="never"!==cu(n,"text-overlap","text-allow-overlap")||"never"!==cu(n,"icon-overlap","icon-allow-overlap")||n.get("text-ignore-placement")||n.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==a&&!i.isConstant(),this.sortFeaturesByY=("viewport-y"===a||"auto"===a&&!this.sortFeaturesByKey)&&this.canOverlap,"point"===n.get("symbol-placement")&&(this.writingModes=n.get("text-writing-mode").map((t=>e.ah[t]))),this.stateDependentLayerIds=this.layers.filter((e=>e.isStateDependent())).map((e=>e.id)),this.sourceID=t.sourceID}createArrays(){this.text=new yu(new Vo(this.layers,this.zoom,(e=>/^text/.test(e)))),this.icon=new yu(new Vo(this.layers,this.zoom,(e=>/^icon/.test(e)))),this.glyphOffsetArray=new $a,this.lineVertexArray=new Ka,this.symbolInstances=new Xa,this.textAnchorOffsets=new Qa}calculateGlyphDependencies(e,t,r,n,i){for(let a=0;a0)&&("constant"!==o.value.kind||o.value.value.length>0),u="constant"!==l.value.kind||!!l.value.value||Object.keys(l.parameters).length>0,h=a.get("symbol-sort-key");if(this.features=[],!c&&!u)return;let f=r.iconDependencies,p=r.glyphDependencies,d=r.availableImages,m=new Qi(this.zoom);for(let{feature:r,id:s,index:l,sourceLayerIndex:g}of t){let t,y,v=i._featureFilter.needGeometry,x=Ko(r,v);if(!i._featureFilter.filter(m,x,n))continue;if(v||(x.geometry=$o(r)),c){let e=i.getValueAndResolveTokens("text-field",x,n,d),r=Je.factory(e),a=this.hasRTLText=this.hasRTLText||gu(r);(!a||"unavailable"===Ji.getRTLTextPluginStatus()||a&&Ji.isParsed())&&(t=uc(r,i,x))}if(u){let e=i.getValueAndResolveTokens("icon-image",x,n,d);y=e instanceof rt?e:rt.fromString(e)}if(!t&&!y)continue;let _=this.sortFeaturesByKey?h.evaluate(x,{},n):void 0;if(this.features.push({id:s,text:t,icon:y,index:l,sourceLayerIndex:g,geometry:x.geometry,properties:r.properties,type:fu[r.type],sortKey:_}),y&&(f[y.name]=!0),t){let r=o.evaluate(x,{},n).join(","),i="viewport"!==a.get("text-rotation-alignment")&&"point"!==a.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(e.ah.vertical)>=0;for(let e of t.sections)if(e.image)f[e.image.name]=!0;else{let n=Ni(t.toString()),a=e.fontStack||r,o=p[a]=p[a]||{};this.calculateGlyphDependencies(e.text,o,i,this.allowVerticalPlacement,n)}}}"line"===a.get("symbol-placement")&&(this.features=function(e){let t={},r={},n=[],i=0;function a(t){n.push(e[t]),i++}function o(e,t,i){let a=r[e];return delete r[e],r[t]=a,n[a].geometry[0].pop(),n[a].geometry[0]=n[a].geometry[0].concat(i[0]),a}function s(e,r,i){let a=t[r];return delete t[r],t[e]=a,n[a].geometry[0].shift(),n[a].geometry[0]=i[0].concat(n[a].geometry[0]),a}function l(e,t,r){let n=r?t[0][t[0].length-1]:t[0][0];return`${e}:${n.x}:${n.y}`}for(let c=0;ce.geometry))}(this.features)),this.sortFeaturesByKey&&this.features.sort(((e,t)=>e.sortKey-t.sortKey))}update(e,t,r){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,t,this.layers,r),this.icon.programConfigurations.updatePaintArrays(e,t,this.layers,r))}isEmpty(){return 0===this.symbolInstances.length&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(e){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(e),this.iconCollisionBox.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(e,t){let r=this.lineVertexArray.length;if(void 0!==e.segment){let r=e.dist(t[e.segment+1]),n=e.dist(t[e.segment]),i={};for(let n=e.segment+1;n=0;r--)i[r]={x:t[r].x,y:t[r].y,tileUnitDistanceFromAnchor:n},r>0&&(n+=t[r-1].dist(t[r]));for(let e=0;e0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(e,t){let r=e.placedSymbolArray.get(t),n=r.vertexStartIndex+4*r.numGlyphs;for(let t=r.vertexStartIndex;tn[e]-n[t]||i[t]-i[e])),a}addToSortKeyRanges(e,t){let r=this.sortKeyRanges[this.sortKeyRanges.length-1];r&&r.sortKey===t?r.symbolInstanceEnd=e+1:this.sortKeyRanges.push({sortKey:t,symbolInstanceStart:e,symbolInstanceEnd:e+1})}sortFeatures(e){if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let e of this.symbolInstanceIndexes){let t=this.symbolInstances.get(e);this.featureSortOrder.push(t.featureIndex),[t.rightJustifiedTextSymbolIndex,t.centerJustifiedTextSymbolIndex,t.leftJustifiedTextSymbolIndex].forEach(((e,t,r)=>{e>=0&&r.indexOf(e)===t&&this.addIndicesForPlacedSymbol(this.text,e)})),t.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,t.verticalPlacedTextSymbolIndex),t.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,t.placedIconSymbolIndex),t.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,t.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}Ti("SymbolBucket",xu,{omit:["layers","collisionBoxArray","features","compareText"]}),xu.MAX_GLYPHS=65535,xu.addDynamicAttributes=mu;var _u={get paint(){return hu=hu||new pa({"icon-opacity":new ca(Y.paint_symbol["icon-opacity"]),"icon-color":new ca(Y.paint_symbol["icon-color"]),"icon-halo-color":new ca(Y.paint_symbol["icon-halo-color"]),"icon-halo-width":new ca(Y.paint_symbol["icon-halo-width"]),"icon-halo-blur":new ca(Y.paint_symbol["icon-halo-blur"]),"icon-translate":new la(Y.paint_symbol["icon-translate"]),"icon-translate-anchor":new la(Y.paint_symbol["icon-translate-anchor"]),"text-opacity":new ca(Y.paint_symbol["text-opacity"]),"text-color":new ca(Y.paint_symbol["text-color"],{runtimeType:de,getOverride:e=>e.textColor,hasOverride:e=>!!e.textColor}),"text-halo-color":new ca(Y.paint_symbol["text-halo-color"]),"text-halo-width":new ca(Y.paint_symbol["text-halo-width"]),"text-halo-blur":new ca(Y.paint_symbol["text-halo-blur"]),"text-translate":new la(Y.paint_symbol["text-translate"]),"text-translate-anchor":new la(Y.paint_symbol["text-translate-anchor"])})},get layout(){return uu=uu||new pa({"symbol-placement":new la(Y.layout_symbol["symbol-placement"]),"symbol-spacing":new la(Y.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new la(Y.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new ca(Y.layout_symbol["symbol-sort-key"]),"symbol-z-order":new la(Y.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new la(Y.layout_symbol["icon-allow-overlap"]),"icon-overlap":new la(Y.layout_symbol["icon-overlap"]),"icon-ignore-placement":new la(Y.layout_symbol["icon-ignore-placement"]),"icon-optional":new la(Y.layout_symbol["icon-optional"]),"icon-rotation-alignment":new la(Y.layout_symbol["icon-rotation-alignment"]),"icon-size":new ca(Y.layout_symbol["icon-size"]),"icon-text-fit":new la(Y.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new la(Y.layout_symbol["icon-text-fit-padding"]),"icon-image":new ca(Y.layout_symbol["icon-image"]),"icon-rotate":new ca(Y.layout_symbol["icon-rotate"]),"icon-padding":new ca(Y.layout_symbol["icon-padding"]),"icon-keep-upright":new la(Y.layout_symbol["icon-keep-upright"]),"icon-offset":new ca(Y.layout_symbol["icon-offset"]),"icon-anchor":new ca(Y.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new la(Y.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new la(Y.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new la(Y.layout_symbol["text-rotation-alignment"]),"text-field":new ca(Y.layout_symbol["text-field"]),"text-font":new ca(Y.layout_symbol["text-font"]),"text-size":new ca(Y.layout_symbol["text-size"]),"text-max-width":new ca(Y.layout_symbol["text-max-width"]),"text-line-height":new la(Y.layout_symbol["text-line-height"]),"text-letter-spacing":new ca(Y.layout_symbol["text-letter-spacing"]),"text-justify":new ca(Y.layout_symbol["text-justify"]),"text-radial-offset":new ca(Y.layout_symbol["text-radial-offset"]),"text-variable-anchor":new la(Y.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new ca(Y.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new ca(Y.layout_symbol["text-anchor"]),"text-max-angle":new la(Y.layout_symbol["text-max-angle"]),"text-writing-mode":new la(Y.layout_symbol["text-writing-mode"]),"text-rotate":new ca(Y.layout_symbol["text-rotate"]),"text-padding":new la(Y.layout_symbol["text-padding"]),"text-keep-upright":new la(Y.layout_symbol["text-keep-upright"]),"text-transform":new ca(Y.layout_symbol["text-transform"]),"text-offset":new ca(Y.layout_symbol["text-offset"]),"text-allow-overlap":new la(Y.layout_symbol["text-allow-overlap"]),"text-overlap":new la(Y.layout_symbol["text-overlap"]),"text-ignore-placement":new la(Y.layout_symbol["text-ignore-placement"]),"text-optional":new la(Y.layout_symbol["text-optional"])})}};class bu{constructor(e){if(void 0===e.property.overrides)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=e.property.overrides?e.property.overrides.runtimeType:ue,this.defaultValue=e}evaluate(e){if(e.formattedSection){let t=this.defaultValue.property.overrides;if(t&&t.hasOverride(e.formattedSection))return t.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default}eachChild(e){this.defaultValue.isConstant()||e(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Ti("FormatSectionOverride",bu,{omit:["defaultValue"]});class wu extends ma{constructor(e){super(e,_u)}recalculate(e,t){if(super.recalculate(e,t),"auto"===this.layout.get("icon-rotation-alignment")&&(this.layout._values["icon-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]="map"===this.layout.get("text-rotation-alignment")?"map":"viewport"),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){let e=this.layout.get("text-writing-mode");if(e){let t=[];for(let r of e)t.indexOf(r)<0&&t.push(r);this.layout._values["text-writing-mode"]=t}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(e,t,r,n){let i=this.layout.get(e).evaluate(t,{},r,n),a=this._unevaluatedLayout._values[e];return a.isDataDriven()||bn(a.value)||!i?i:(o=t.properties,i.replace(/{([^{}]+)}/g,((e,t)=>o&&t in o?String(o[t]):"")));var o}createBucket(e){return new xu(e)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let e of _u.paint.overridableProperties){if(!wu.hasPaintOverride(this.layout,e))continue;let t=this.paint.get(e),r=new bu(t),n=new _n(r,t.property.specification),i=null;i="constant"===t.value.kind||"source"===t.value.kind?new Tn("source",n):new kn("composite",n,t.value.zoomStops),this.paint._values[e]=new oa(t.property,i,t.parameters)}}_handleOverridablePaintPropertyUpdate(e,t,r){return!(!this.layout||t.isDataDriven()||r.isDataDriven())&&wu.hasPaintOverride(this.layout,e)}static hasPaintOverride(e,t){let r=e.get("text-field"),n=_u.paint.properties[t],i=!1,a=e=>{for(let t of e)if(n.overrides&&n.overrides.hasOverride(t))return void(i=!0)};if("constant"===r.value.kind&&r.value.value instanceof Je)a(r.value.value.sections);else if("source"===r.value.kind){let e=t=>{i||(t instanceof st&&at(t.value)===ve?a(t.value.sections):t instanceof Zt?a(t.sections):t.eachChild(e))},t=r.value;t._styleExpression&&e(t._styleExpression.expression)}return i}}let Tu;var ku={get paint(){return Tu=Tu||new pa({"background-color":new la(Y.paint_background["background-color"]),"background-pattern":new ha(Y.paint_background["background-pattern"]),"background-opacity":new la(Y.paint_background["background-opacity"])})}};class Au extends ma{constructor(e){super(e,ku)}}let Mu;var Su={get paint(){return Mu=Mu||new pa({"raster-opacity":new la(Y.paint_raster["raster-opacity"]),"raster-hue-rotate":new la(Y.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new la(Y.paint_raster["raster-brightness-min"]),"raster-brightness-max":new la(Y.paint_raster["raster-brightness-max"]),"raster-saturation":new la(Y.paint_raster["raster-saturation"]),"raster-contrast":new la(Y.paint_raster["raster-contrast"]),"raster-resampling":new la(Y.paint_raster["raster-resampling"]),"raster-fade-duration":new la(Y.paint_raster["raster-fade-duration"])})}};class Eu extends ma{constructor(e){super(e,Su)}}class Cu extends ma{constructor(e){super(e,{}),this.onAdd=e=>{this.implementation.onAdd&&this.implementation.onAdd(e,e.painter.context.gl)},this.onRemove=e=>{this.implementation.onRemove&&this.implementation.onRemove(e,e.painter.context.gl)},this.implementation=e}is3D(){return"3d"===this.implementation.renderingMode}hasOffscreenPass(){return void 0!==this.implementation.prerender}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class Iu{constructor(e){this._methodToThrottle=e,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((()=>{this._triggered=!1,this._methodToThrottle()}),0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let Lu=6371008.8;class Pu{constructor(e,t){if(isNaN(e)||isNaN(t))throw new Error(`Invalid LngLat object: (${e}, ${t})`);if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Pu(v(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(e){let t=Math.PI/180,r=this.lat*t,n=e.lat*t,i=Math.sin(r)*Math.sin(n)+Math.cos(r)*Math.cos(n)*Math.cos((e.lng-this.lng)*t);return Lu*Math.acos(Math.min(i,1))}static convert(e){if(e instanceof Pu)return e;if(Array.isArray(e)&&(2===e.length||3===e.length))return new Pu(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&"object"==typeof e&&null!==e)return new Pu(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}let zu=2*Math.PI*Lu;function Du(e){return zu*Math.cos(e*Math.PI/180)}function Ou(e){return(180+e)/360}function Ru(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function Fu(e,t){return e/Du(t)}function Bu(e){return 360/Math.PI*Math.atan(Math.exp((180-360*e)*Math.PI/180))-90}class ju{constructor(e,t,r=0){this.x=+e,this.y=+t,this.z=+r}static fromLngLat(e,t=0){let r=Pu.convert(e);return new ju(Ou(r.lng),Ru(r.lat),Fu(t,r.lat))}toLngLat(){return new Pu(360*this.x-180,Bu(this.y))}toAltitude(){return this.z*Du(Bu(this.y))}meterInMercatorCoordinateUnits(){return 1/zu*(e=Bu(this.y),1/Math.cos(e*Math.PI/180));var e}}function Nu(e,t,r){var n=2*Math.PI*6378137/256/Math.pow(2,r);return[e*n-2*Math.PI*6378137/2,t*n-2*Math.PI*6378137/2]}class Uu{constructor(e,t,r){if(i=t,a=r,(n=e)<0||n>25||a<0||a>=Math.pow(2,n)||i<0||i>=Math.pow(2,n))throw new Error(`x=${t}, y=${r}, z=${e} outside of bounds. 0<=x<${Math.pow(2,e)}, 0<=y<${Math.pow(2,e)} 0<=z<=25 `);var n,i,a;this.z=e,this.x=t,this.y=r,this.key=Hu(0,e,e,t,r)}equals(e){return this.z===e.z&&this.x===e.x&&this.y===e.y}url(e,t,r){let n=(a=this.y,o=this.z,s=Nu(256*(i=this.x),256*(a=Math.pow(2,o)-a-1),o),l=Nu(256*(i+1),256*(a+1),o),s[0]+","+s[1]+","+l[0]+","+l[1]);var i,a,o,s,l;let c=function(e,t,r){let n,i="";for(let a=e;a>0;a--)n=1<1?"@2x":"").replace(/{quadkey}/g,c).replace(/{bbox-epsg-3857}/g,n)}isChildOf(e){let t=this.z-e.z;return t>0&&e.x===this.x>>t&&e.y===this.y>>t}getTilePoint(e){let t=Math.pow(2,this.z);return new a((e.x*t-this.x)*Zo,(e.y*t-this.y)*Zo)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Vu{constructor(e,t){this.wrap=e,this.canonical=t,this.key=Hu(e,t.z,t.z,t.x,t.y)}}class qu{constructor(e,t,r,n,i){if(e= z; overscaledZ = ${e}; z = ${r}`);this.overscaledZ=e,this.wrap=t,this.canonical=new Uu(r,+n,+i),this.key=Hu(t,e,r,n,i)}clone(){return new qu(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(e){return this.overscaledZ===e.overscaledZ&&this.wrap===e.wrap&&this.canonical.equals(e.canonical)}scaledTo(e){if(e>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);let t=this.canonical.z-e;return e>this.canonical.z?new qu(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new qu(e,this.wrap,e,this.canonical.x>>t,this.canonical.y>>t)}calculateScaledKey(e,t){if(e>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);let r=this.canonical.z-e;return e>this.canonical.z?Hu(this.wrap*+t,e,this.canonical.z,this.canonical.x,this.canonical.y):Hu(this.wrap*+t,e,e,this.canonical.x>>r,this.canonical.y>>r)}isChildOf(e){if(e.wrap!==this.wrap)return!1;let t=this.canonical.z-e.canonical.z;return 0===e.overscaledZ||e.overscaledZ>t&&e.canonical.y===this.canonical.y>>t}children(e){if(this.overscaledZ>=e)return[new qu(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let t=this.canonical.z+1,r=2*this.canonical.x,n=2*this.canonical.y;return[new qu(t,this.wrap,t,r,n),new qu(t,this.wrap,t,r+1,n),new qu(t,this.wrap,t,r,n+1),new qu(t,this.wrap,t,r+1,n+1)]}isLessThan(e){return this.wrape.wrap)&&(this.overscaledZe.overscaledZ)&&(this.canonical.xe.canonical.x)&&this.canonical.ythis.max&&(this.max=r),r=this.dim+1||t<-1||t>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(t+1)*this.stride+(e+1)}unpack(e,t,r){return e*this.redFactor+t*this.greenFactor+r*this.blueFactor-this.baseShift}getPixels(){return new Ls({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(e,t,r){if(this.dim!==e.dim)throw new Error("dem dimension mismatch");let n=t*this.dim,i=t*this.dim+this.dim,a=r*this.dim,o=r*this.dim+this.dim;switch(t){case-1:n=i-1;break;case 1:i=n+1}switch(r){case-1:a=o-1;break;case 1:o=a+1}let s=-t*this.dim,l=-r*this.dim;for(let t=a;t=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${e} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[e]}}class Zu{constructor(e,t,r,n,i){this.type="Feature",this._vectorTileFeature=e,e._z=t,e._x=r,e._y=n,this.properties=e.properties,this.id=i}get geometry(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(e){this._geometry=e}toJSON(){let e={geometry:this.geometry};for(let t in this)"_geometry"!==t&&"_vectorTileFeature"!==t&&(e[t]=this[t]);return e}}class Yu{constructor(e,t){this.tileID=e,this.x=e.canonical.x,this.y=e.canonical.y,this.z=e.canonical.z,this.grid=new bi(Zo,16,0),this.grid3D=new bi(Zo,16,0),this.featureIndexArray=new to,this.promoteId=t}insert(e,t,r,n,i,a){let o=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,n,i);let s=a?this.grid3D:this.grid;for(let e=0;e=0&&n[3]>=0&&s.insert(o,n[0],n[1],n[2],n[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new bl.VectorTile(new Oc(this.rawTileData)).layers,this.sourceLayerCoder=new Wu(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(e,t,r,n){this.loadVTLayers();let i=e.params||{},o=Zo/e.tileSize/e.scale,s=In(i.filter),l=e.queryGeometry,c=e.queryPadding*o,u=$u(l),h=this.grid.query(u.minX-c,u.minY-c,u.maxX+c,u.maxY+c),f=$u(e.cameraQueryGeometry),p=this.grid3D.query(f.minX-c,f.minY-c,f.maxX+c,f.maxY+c,((t,r,n,i)=>function(e,t,r,n,i){for(let a of e)if(t<=a.x&&r<=a.y&&n>=a.x&&i>=a.y)return!0;let o=[new a(t,r),new a(t,i),new a(n,i),new a(n,r)];if(e.length>2)for(let t of o)if(cs(e,t))return!0;for(let t=0;t(f||(f=$o(t)),r.queryIntersectsFeature(l,t,n,f,this.z,e.transform,o,e.pixelPosMatrix))))}return m}loadMatchingFeature(e,t,r,n,i,a,o,s,l,c,u){let h=this.bucketLayerIDs[t];if(a&&!function(e,t){for(let r=0;r=0)return!0;return!1}(a,h))return;let f=this.sourceLayerCoder.decode(r),p=this.vtLayers[f].feature(n);if(i.needGeometry){let e=Ko(p,!0);if(!i.filter(new Qi(this.tileID.overscaledZ),e,this.tileID.canonical))return}else if(!i.filter(new Qi(this.tileID.overscaledZ),p))return;let d=this.getId(p,f);for(let t=0;t{let o=t instanceof sa?t.get(a):null;return o&&o.evaluate?o.evaluate(r,n,i):o}))}function $u(e){let t=1/0,r=1/0,n=-1/0,i=-1/0;for(let a of e)t=Math.min(t,a.x),r=Math.min(r,a.y),n=Math.max(n,a.x),i=Math.max(i,a.y);return{minX:t,minY:r,maxX:n,maxY:i}}function Ku(e,t){return t-e}function Ju(e,t,r,n,i){let o=[];for(let s=0;s=n&&u.x>=n||(s.x>=n?s=new a(n,s.y+(n-s.x)/(u.x-s.x)*(u.y-s.y))._round():u.x>=n&&(u=new a(n,s.y+(n-s.x)/(u.x-s.x)*(u.y-s.y))._round()),s.y>=i&&u.y>=i||(s.y>=i?s=new a(s.x+(i-s.y)/(u.y-s.y)*(u.x-s.x),i)._round():u.y>=i&&(u=new a(s.x+(i-s.y)/(u.y-s.y)*(u.x-s.x),i)._round()),l&&s.equals(l[l.length-1])||(l=[s],o.push(l)),l.push(u)))))}}return o}Ti("FeatureIndex",Yu,{omit:["rawTileData","sourceLayerCoder"]});class Qu extends a{constructor(e,t,r,n){super(e,t),this.angle=r,void 0!==n&&(this.segment=n)}clone(){return new Qu(this.x,this.y,this.angle,this.segment)}}function eh(e,t,r,n,i){if(void 0===t.segment||0===r)return!0;let a=t,o=t.segment+1,s=0;for(;s>-r/2;){if(o--,o<0)return!1;s-=e[o].dist(a),a=e[o]}s+=e[o].dist(e[o+1]),o++;let l=[],c=0;for(;sn;)c-=l.shift().angleDelta;if(c>i)return!1;o++,s+=t.dist(r)}return!0}function th(e){let t=0;for(let r=0;rc){let u=(c-l)/a,h=Pt.number(n.x,i.x,u),f=Pt.number(n.y,i.y,u),p=new Qu(h,f,i.angleTo(n),r);return p._round(),!o||eh(e,p,s,o,t)?p:void 0}l+=a}}function ah(e,t,r,n,i,a,o,s,l){let c=rh(n,a,o),u=nh(n,i),h=u*o,f=0===e[0].x||e[0].x===l||0===e[0].y||e[0].y===l;return t-h=0&&y=0&&v=0&&f+c<=u){let r=new Qu(y,v,m,t);r._round(),n&&!eh(e,r,a,n,i)||p.push(r)}}h+=d}return s||p.length||o||(p=oh(e,h/2,r,n,i,a,o,!0,l)),p}function sh(e,t,r,n){let i=[],o=e.image,s=o.pixelRatio,l=o.paddedRect.w-2,c=o.paddedRect.h-2,u={x1:e.left,y1:e.top,x2:e.right,y2:e.bottom},h=o.stretchX||[[0,l]],f=o.stretchY||[[0,c]],p=(e,t)=>e+t[1]-t[0],d=h.reduce(p,0),m=f.reduce(p,0),g=l-d,y=c-m,v=0,x=d,_=0,b=m,w=0,T=g,k=0,A=y;if(o.content&&n){let t=o.content,r=t[2]-t[0],n=t[3]-t[1];(o.textFitWidth||o.textFitHeight)&&(u=iu(e)),v=lh(h,0,t[0]),_=lh(f,0,t[1]),x=lh(h,t[0],t[2]),b=lh(f,t[1],t[3]),w=t[0]-v,k=t[1]-_,T=r-x,A=n-b}let M=u.x1,S=u.y1,E=u.x2-M,C=u.y2-S,I=(e,n,i,l)=>{let c=uh(e.stretch-v,x,E,M),u=hh(e.fixed-w,T,e.stretch,d),h=uh(n.stretch-_,b,C,S),f=hh(n.fixed-k,A,n.stretch,m),p=uh(i.stretch-v,x,E,M),g=hh(i.fixed-w,T,i.stretch,d),y=uh(l.stretch-_,b,C,S),I=hh(l.fixed-k,A,l.stretch,m),L=new a(c,h),P=new a(p,h),z=new a(p,y),D=new a(c,y),O=new a(u/s,f/s),R=new a(g/s,I/s),F=t*Math.PI/180;if(F){let e=Math.sin(F),t=Math.cos(F),r=[t,-e,e,t];L._matMult(r),P._matMult(r),D._matMult(r),z._matMult(r)}let B=e.stretch+e.fixed,j=n.stretch+n.fixed;return{tl:L,tr:P,bl:D,br:z,tex:{x:o.paddedRect.x+1+B,y:o.paddedRect.y+1+j,w:i.stretch+i.fixed-B,h:l.stretch+l.fixed-j},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:O,pixelOffsetBR:R,minFontScaleX:T/s/E,minFontScaleY:A/s/C,isSDF:r}};if(n&&(o.stretchX||o.stretchY)){let e=ch(h,g,d),t=ch(f,y,m);for(let r=0;r0&&(n=Math.max(10,n),this.circleDiameter=n)}else{let c=null!==(h=o.image)&&void 0!==h&&h.content&&(o.image.textFitWidth||o.image.textFitHeight)?iu(o):{x1:o.left,y1:o.top,x2:o.right,y2:o.bottom};c.y1=c.y1*s-l[0],c.y2=c.y2*s+l[2],c.x1=c.x1*s-l[3],c.x2=c.x2*s+l[1];let f=o.collisionPadding;if(f&&(c.x1-=f[0]*s,c.y1-=f[1]*s,c.x2+=f[2]*s,c.y2+=f[3]*s),u){let e=new a(c.x1,c.y1),t=new a(c.x2,c.y1),r=new a(c.x1,c.y2),n=new a(c.x2,c.y2),i=u*Math.PI/180;e._rotate(i),t._rotate(i),r._rotate(i),n._rotate(i),c.x1=Math.min(e.x,t.x,r.x,n.x),c.x2=Math.max(e.x,t.x,r.x,n.x),c.y1=Math.min(e.y,t.y,r.y,n.y),c.y2=Math.max(e.y,t.y,r.y,n.y)}e.emplaceBack(t.x,t.y,c.x1,c.y1,c.x2,c.y2,r,n,i)}this.boxEndIndex=e.length}}class ph{constructor(e=[],t=(e,t)=>et?1:0){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let e=(this.length>>1)-1;e>=0;e--)this._down(e)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(0===this.length)return;let e=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){let{data:t,compare:r}=this,n=t[e];for(;e>0;){let i=e-1>>1,a=t[i];if(r(n,a)>=0)break;t[e]=a,e=i}t[e]=n}_down(e){let{data:t,compare:r}=this,n=this.length>>1,i=t[e];for(;e=0)break;t[e]=t[n],e=n}t[e]=i}}function dh(e,t=1,r=!1){let n=1/0,i=1/0,o=-1/0,s=-1/0,l=e[0];for(let e=0;eo)&&(o=t.x),(!e||t.y>s)&&(s=t.y)}let c=Math.min(o-n,s-i),u=c/2,h=new ph([],mh);if(0===c)return new a(n,i);for(let t=n;tf.d||!f.d)&&(f=n,r&&console.log("found best %d after %d probes",Math.round(1e4*n.d)/1e4,p)),n.max-f.d<=t||(u=n.h/2,h.push(new gh(n.p.x-u,n.p.y-u,u,e)),h.push(new gh(n.p.x+u,n.p.y-u,u,e)),h.push(new gh(n.p.x-u,n.p.y+u,u,e)),h.push(new gh(n.p.x+u,n.p.y+u,u,e)),p+=4)}return r&&(console.log(`num probes: ${p}`),console.log(`best distance: ${f.d}`)),f.p}function mh(e,t){return t.max-e.max}function gh(e,t,r,n){this.p=new a(e,t),this.h=r,this.d=function(e,t){let r=!1,n=1/0;for(let i=0;ie.y!=s.y>e.y&&e.x<(s.x-i.x)*(e.y-i.y)/(s.y-i.y)+i.x&&(r=!r),n=Math.min(n,ss(e,i,s))}}return(r?1:-1)*Math.sqrt(n)}(this.p,n),this.max=this.d+this.h*Math.SQRT2}var yh;e.aq=void 0,(yh=e.aq||(e.aq={}))[yh.center=1]="center",yh[yh.left=2]="left",yh[yh.right=3]="right",yh[yh.top=4]="top",yh[yh.bottom=5]="bottom",yh[yh["top-left"]=6]="top-left",yh[yh["top-right"]=7]="top-right",yh[yh["bottom-left"]=8]="bottom-left",yh[yh["bottom-right"]=9]="bottom-right";let vh=Number.POSITIVE_INFINITY;function xh(e,t){return t[1]!==vh?function(e,t,r){let n=0,i=0;switch(t=Math.abs(t),r=Math.abs(r),e){case"top-right":case"top-left":case"top":i=r-7;break;case"bottom-right":case"bottom-left":case"bottom":i=7-r}switch(e){case"top-right":case"bottom-right":case"right":n=-t;break;case"top-left":case"bottom-left":case"left":n=t}return[n,i]}(e,t[0],t[1]):function(e,t){let r=0,n=0;t<0&&(t=0);let i=t/Math.SQRT2;switch(e){case"top-right":case"top-left":n=i-7;break;case"bottom-right":case"bottom-left":n=7-i;break;case"bottom":n=7-t;break;case"top":n=t-7}switch(e){case"top-right":case"bottom-right":r=-i;break;case"top-left":case"bottom-left":r=i;break;case"left":r=t;break;case"right":r=-t}return[r,n]}(e,t[0])}function _h(e,t,r){var n;let i=e.layout,a=null===(n=i.get("text-variable-anchor-offset"))||void 0===n?void 0:n.evaluate(t,{},r);if(a){let e=a.values,t=[];for(let r=0;re*fc));n.startsWith("top")?i[1]-=7:n.startsWith("bottom")&&(i[1]+=7),t[r+1]=i}return new tt(t)}let o=i.get("text-variable-anchor");if(o){let n;n=void 0!==e._unevaluatedLayout.getValue("text-radial-offset")?[i.get("text-radial-offset").evaluate(t,{},r)*fc,vh]:i.get("text-offset").evaluate(t,{},r).map((e=>e*fc));let a=[];for(let e of o)a.push(e,xh(e,n));return new tt(a)}return null}function bh(e){switch(e){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function wh(t,r,n,i,a,o,s,l,c,u,h){let f=o.textMaxSize.evaluate(r,{});void 0===f&&(f=s);let p,d=t.layers[0].layout,m=d.get("icon-offset").evaluate(r,{},h),g=kh(n.horizontal),y=s/24,v=t.tilePixelRatio*y,x=t.tilePixelRatio*f/24,_=t.tilePixelRatio*l,b=t.tilePixelRatio*d.get("symbol-spacing"),w=d.get("text-padding")*t.tilePixelRatio,T=function(e,t,r,n=1){let i=e.get("icon-padding").evaluate(t,{},r),a=i&&i.values;return[a[0]*n,a[1]*n,a[2]*n,a[3]*n]}(d,r,h,t.tilePixelRatio),k=d.get("text-max-angle")/180*Math.PI,M="viewport"!==d.get("text-rotation-alignment")&&"point"!==d.get("symbol-placement"),S="map"===d.get("icon-rotation-alignment")&&"point"!==d.get("symbol-placement"),E=d.get("symbol-placement"),C=b/2,I=d.get("icon-text-fit");i&&"none"!==I&&(t.allowVerticalPlacement&&n.vertical&&(p=au(i,n.vertical,I,d.get("icon-text-fit-padding"),m,y)),g&&(i=au(i,g,I,d.get("icon-text-fit-padding"),m,y)));let L=(l,f)=>{f.x<0||f.x>=Zo||f.y<0||f.y>=Zo||function(t,r,n,i,a,o,s,l,c,u,h,f,p,d,m,g,y,v,x,_,b,w,T,k,M){let S,E,C,I,L=t.addToLineVertexArray(r,n),P=0,z=0,D=0,O=0,R=-1,F=-1,B={},j=Ao("");if(t.allowVerticalPlacement&&i.vertical){let e=l.layout.get("text-rotate").evaluate(b,{},k)+90;C=new fh(c,r,u,h,f,i.vertical,p,d,m,e),s&&(I=new fh(c,r,u,h,f,s,y,v,m,e))}if(a){let n=l.layout.get("icon-rotate").evaluate(b,{}),i="none"!==l.layout.get("icon-text-fit"),o=sh(a,n,T,i),p=s?sh(s,n,T,i):void 0;E=new fh(c,r,u,h,f,a,y,v,!1,n),P=4*o.length;let d=t.iconSizeData,m=null;"source"===d.kind?(m=[ou*l.layout.get("icon-size").evaluate(b,{})],m[0]>su&&A(`${t.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):"composite"===d.kind&&(m=[ou*w.compositeIconSizes[0].evaluate(b,{},k),ou*w.compositeIconSizes[1].evaluate(b,{},k)],(m[0]>su||m[1]>su)&&A(`${t.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),t.addSymbols(t.icon,o,m,_,x,b,e.ah.none,r,L.lineStartIndex,L.lineLength,-1,k),R=t.icon.placedSymbolArray.length-1,p&&(z=4*p.length,t.addSymbols(t.icon,p,m,_,x,b,e.ah.vertical,r,L.lineStartIndex,L.lineLength,-1,k),F=t.icon.placedSymbolArray.length-1)}let N=Object.keys(i.horizontal);for(let n of N){let a=i.horizontal[n];if(!S){j=Ao(a.text);let e=l.layout.get("text-rotate").evaluate(b,{},k);S=new fh(c,r,u,h,f,a,p,d,m,e)}let s=1===a.positionedLines.length;if(D+=Th(t,r,a,o,l,m,b,g,L,i.vertical?e.ah.horizontal:e.ah.horizontalOnly,s?N:[n],B,R,w,k),s)break}i.vertical&&(O+=Th(t,r,i.vertical,o,l,m,b,g,L,e.ah.vertical,["vertical"],B,F,w,k));let U=S?S.boxStartIndex:t.collisionBoxArray.length,V=S?S.boxEndIndex:t.collisionBoxArray.length,q=C?C.boxStartIndex:t.collisionBoxArray.length,H=C?C.boxEndIndex:t.collisionBoxArray.length,G=E?E.boxStartIndex:t.collisionBoxArray.length,W=E?E.boxEndIndex:t.collisionBoxArray.length,Z=I?I.boxStartIndex:t.collisionBoxArray.length,Y=I?I.boxEndIndex:t.collisionBoxArray.length,X=-1,$=(e,t)=>e&&e.circleDiameter?Math.max(e.circleDiameter,t):t;X=$(S,X),X=$(C,X),X=$(E,X),X=$(I,X);let K=X>-1?1:0;K&&(X*=M/fc),t.glyphOffsetArray.length>=xu.MAX_GLYPHS&&A("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==b.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,b.sortKey);let J=_h(l,b,k),[Q,ee]=function(t,r){let n=t.length,i=r?.values;if(i?.length>0)for(let r=0;r=0?B.right:-1,B.center>=0?B.center:-1,B.left>=0?B.left:-1,B.vertical||-1,R,F,j,U,V,q,H,G,W,Z,Y,u,D,O,P,z,K,0,p,X,Q,ee)}(t,f,l,n,i,a,p,t.layers[0],t.collisionBoxArray,r.index,r.sourceLayerIndex,t.index,v,[w,w,w,w],M,c,_,T,S,m,r,o,u,h,s)};if("line"===E)for(let e of Ju(r.geometry,0,0,Zo,Zo)){let r=ah(e,b,k,n.vertical||g,i,24,x,t.overscaling,Zo);for(let n of r)g&&Ah(t,g.text,C,n)||L(e,n)}else if("line-center"===E){for(let e of r.geometry)if(e.length>1){let t=ih(e,k,n.vertical||g,i,24,x);t&&L(e,t)}}else if("Polygon"===r.type)for(let e of _r(r.geometry,0)){let t=dh(e,16);L(e[0],new Qu(t.x,t.y,0))}else if("LineString"===r.type)for(let e of r.geometry)L(e,new Qu(e[0].x,e[0].y,0));else if("Point"===r.type)for(let e of r.geometry)for(let t of e)L([t],new Qu(t.x,t.y,0))}function Th(e,t,r,n,i,o,s,l,c,u,h,f,p,d,m){let g=function(e,t,r,n,i,o,s,l){let c=n.layout.get("text-rotate").evaluate(o,{})*Math.PI/180,u=[];for(let e of t.positionedLines)for(let n of e.positionedGlyphs){if(!n.rect)continue;let o=n.rect||{},h=4,f=!0,p=1,d=0,m=(i||l)&&n.vertical,g=n.metrics.advance*n.scale/2;if(l&&t.verticalizable&&(d=e.lineOffset/2-(n.imageName?-(fc-n.metrics.width*n.scale)/2:(n.scale-1)*fc)),n.imageName){let e=s[n.imageName];f=e.sdf,p=e.pixelRatio,h=1/p}let y=i?[n.x+g,n.y]:[0,0],v=i?[0,0]:[n.x+g+r[0],n.y+r[1]-d],x=[0,0];m&&(x=v,v=[0,0]);let _=n.metrics.isDoubleResolution?2:1,b=(n.metrics.left-h)*n.scale-g+v[0],w=(-n.metrics.top-h)*n.scale+v[1],T=b+o.w/_*n.scale/p,k=w+o.h/_*n.scale/p,A=new a(b,w),M=new a(T,w),S=new a(b,k),E=new a(T,k);if(m){let e=new a(-g,g-Vc),t=-Math.PI/2,r=12-g,i=new a(22-r,-(n.imageName?r:0)),o=new a(...x);A._rotateAround(t,e)._add(i)._add(o),M._rotateAround(t,e)._add(i)._add(o),S._rotateAround(t,e)._add(i)._add(o),E._rotateAround(t,e)._add(i)._add(o)}if(c){let e=Math.sin(c),t=Math.cos(c),r=[t,-e,e,t];A._matMult(r),M._matMult(r),S._matMult(r),E._matMult(r)}let C=new a(0,0),I=new a(0,0);u.push({tl:A,tr:M,bl:S,br:E,tex:o,writingMode:t.writingMode,glyphOffset:y,sectionIndex:n.sectionIndex,isSDF:f,pixelOffsetTL:C,pixelOffsetBR:I,minFontScaleX:0,minFontScaleY:0})}return u}(0,r,l,i,o,s,n,e.allowVerticalPlacement),y=e.textSizeData,v=null;"source"===y.kind?(v=[ou*i.layout.get("text-size").evaluate(s,{})],v[0]>su&&A(`${e.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):"composite"===y.kind&&(v=[ou*d.compositeTextSizes[0].evaluate(s,{},m),ou*d.compositeTextSizes[1].evaluate(s,{},m)],(v[0]>su||v[1]>su)&&A(`${e.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),e.addSymbols(e.text,g,v,l,o,s,u,t,c.lineStartIndex,c.lineLength,p,m);for(let t of h)f[t]=e.text.placedSymbolArray.length-1;return 4*g.length}function kh(e){for(let t in e)return e[t];return null}function Ah(e,t,r,n){let i=e.compareText;if(t in i){let e=i[t];for(let t=e.length-1;t>=0;t--)if(n.dist(e[t])>4;if(1!==n)throw new Error(`Got v${n} data when expected v1.`);let i=Mh[15&r];if(!i)throw new Error("Unrecognized array type.");let[a]=new Uint16Array(e,2,1),[o]=new Uint32Array(e,4,1);return new Sh(o,a,i,e)}constructor(e,t=64,r=Float64Array,n){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.ArrayType=r,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;let i=Mh.indexOf(this.ArrayType),a=2*e*this.ArrayType.BYTES_PER_ELEMENT,o=e*this.IndexArrayType.BYTES_PER_ELEMENT,s=(8-o%8)%8;if(i<0)throw new Error(`Unexpected typed array class: ${r}.`);n&&n instanceof ArrayBuffer?(this.data=n,this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+o+s,2*e),this._pos=2*e,this._finished=!0):(this.data=new ArrayBuffer(8+a+o+s),this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+o+s,2*e),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+i]),new Uint16Array(this.data,2,1)[0]=t,new Uint32Array(this.data,4,1)[0]=e)}add(e,t){let r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=e,this.coords[this._pos++]=t,r}finish(){let e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return Eh(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,r,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:i,coords:a,nodeSize:o}=this,s=[0,i.length-1,0],l=[];for(;s.length;){let c=s.pop()||0,u=s.pop()||0,h=s.pop()||0;if(u-h<=o){for(let o=h;o<=u;o++){let s=a[2*o],c=a[2*o+1];s>=e&&s<=r&&c>=t&&c<=n&&l.push(i[o])}continue}let f=h+u>>1,p=a[2*f],d=a[2*f+1];p>=e&&p<=r&&d>=t&&d<=n&&l.push(i[f]),(0===c?e<=p:t<=d)&&(s.push(h),s.push(f-1),s.push(1-c)),(0===c?r>=p:n>=d)&&(s.push(f+1),s.push(u),s.push(1-c))}return l}within(e,t,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:n,coords:i,nodeSize:a}=this,o=[0,n.length-1,0],s=[],l=r*r;for(;o.length;){let c=o.pop()||0,u=o.pop()||0,h=o.pop()||0;if(u-h<=a){for(let r=h;r<=u;r++)Ph(i[2*r],i[2*r+1],e,t)<=l&&s.push(n[r]);continue}let f=h+u>>1,p=i[2*f],d=i[2*f+1];Ph(p,d,e,t)<=l&&s.push(n[f]),(0===c?e-r<=p:t-r<=d)&&(o.push(h),o.push(f-1),o.push(1-c)),(0===c?e+r>=p:t+r>=d)&&(o.push(f+1),o.push(u),o.push(1-c))}return s}}function Eh(e,t,r,n,i,a){if(i-n<=r)return;let o=n+i>>1;Ch(e,t,o,n,i,a),Eh(e,t,r,n,o-1,1-a),Eh(e,t,r,o+1,i,1-a)}function Ch(e,t,r,n,i,a){for(;i>n;){if(i-n>600){let o=i-n+1,s=r-n+1,l=Math.log(o),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(o-c)/o)*(s-o/2<0?-1:1);Ch(e,t,r,Math.max(n,Math.floor(r-s*c/o+u)),Math.min(i,Math.floor(r+(o-s)*c/o+u)),a)}let o=t[2*r+a],s=n,l=i;for(Ih(e,t,n,r),t[2*i+a]>o&&Ih(e,t,n,i);so;)l--}t[2*n+a]===o?Ih(e,t,n,l):(l++,Ih(e,t,l,i)),l<=r&&(n=l+1),r<=l&&(i=l-1)}}function Ih(e,t,r,n){Lh(e,r,n),Lh(t,2*r,2*n),Lh(t,2*r+1,2*n+1)}function Lh(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}function Ph(e,t,r,n){let i=e-r,a=t-n;return i*i+a*a}var zh;e.bg=void 0,(zh=e.bg||(e.bg={})).create="create",zh.load="load",zh.fullLoad="fullLoad";let Dh=null,Oh=[],Rh=1e3/60,Fh="loadTime",Bh="fullLoadTime",jh={mark(e){performance.mark(e)},frame(e){let t=e;null!=Dh&&Oh.push(t-Dh),Dh=t},clearMetrics(){Dh=null,Oh=[],performance.clearMeasures(Fh),performance.clearMeasures(Bh);for(let t in e.bg)performance.clearMarks(e.bg[t])},getPerformanceMetrics(){performance.measure(Fh,e.bg.create,e.bg.load),performance.measure(Bh,e.bg.create,e.bg.fullLoad);let t=performance.getEntriesByName(Fh)[0].duration,r=performance.getEntriesByName(Bh)[0].duration,n=Oh.length,i=1/(Oh.reduce(((e,t)=>e+t),0)/n/1e3),a=Oh.filter((e=>e>Rh)).reduce(((e,t)=>e+(t-Rh)/Rh),0);return{loadTime:t,fullLoadTime:r,fps:i,percentDroppedFrames:a/(n+a)*100,totalFrames:n}}};e.$=class extends Ta{},e.A=gs,e.B=yi,e.C=function(e){if(null==E){let t=e.navigator?e.navigator.userAgent:null;E=!!e.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return E},e.D=la,e.E=Z,e.F=class{constructor(e,t){var r,n,i;this.target=e,this.mapId=t,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new Iu((()=>this.process())),this.subscription=(r=this.target,n="message",i=e=>this.receive(e),r.addEventListener(n,i,!1),{unsubscribe:()=>{r.removeEventListener(n,i,!1)}}),this.globalScope=S(self)?e:window}registerMessageHandler(e,t){this.messageHandlers[e]=t}sendAsync(e,t){return new Promise(((r,n)=>{let i=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[i]={resolve:r,reject:n},t&&t.signal.addEventListener("abort",(()=>{delete this.resolveRejects[i];let t={id:i,type:"",origin:location.origin,targetMapId:e.targetMapId,sourceMapId:this.mapId};this.target.postMessage(t)}),{once:!0});let a=[],o=Object.assign(Object.assign({},e),{id:i,sourceMapId:this.mapId,origin:location.origin,data:Si(e.data,a)});this.target.postMessage(o,{transfer:a})}))}receive(e){let t=e.data,r=t.id;if(!("file://"!==t.origin&&"file://"!==location.origin&&"resource://android"!==t.origin&&"resource://android"!==location.origin&&t.origin!==location.origin||t.targetMapId&&this.mapId!==t.targetMapId)){if(""===t.type){delete this.tasks[r];let e=this.abortControllers[r];return delete this.abortControllers[r],void(e&&e.abort())}if(S(self)||t.mustQueue)return this.tasks[r]=t,this.taskQueue.push(r),void this.invoker.trigger();this.processTask(r,t)}}process(){if(0===this.taskQueue.length)return;let e=this.taskQueue.shift(),t=this.tasks[e];delete this.tasks[e],this.taskQueue.length>0&&this.invoker.trigger(),t&&this.processTask(e,t)}processTask(e,r){return t(this,void 0,void 0,(function*(){if(""===r.type){let t=this.resolveRejects[e];return delete this.resolveRejects[e],t?void(r.error?t.reject(Ei(r.error)):t.resolve(Ei(r.data))):void 0}if(!this.messageHandlers[r.type])return void this.completeTask(e,new Error(`Could not find a registered handler for ${r.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let t=Ei(r.data),n=new AbortController;this.abortControllers[e]=n;try{let i=yield this.messageHandlers[r.type](r.sourceMapId,t,n);this.completeTask(e,null,i)}catch(t){this.completeTask(e,t)}}))}completeTask(e,t,r){let n=[];delete this.abortControllers[e];let i={id:e,type:"",sourceMapId:this.mapId,origin:location.origin,error:t?Si(t):null,data:Si(r,n)};this.target.postMessage(i,{transfer:n})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},e.G=B,e.H=function(){var e=new gs(16);return gs!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e},e.I=Nc,e.J=function(e,t,r){var n,i,a,o,s,l,c,u,h,f,p,d,m=r[0],g=r[1],y=r[2];return t===e?(e[12]=t[0]*m+t[4]*g+t[8]*y+t[12],e[13]=t[1]*m+t[5]*g+t[9]*y+t[13],e[14]=t[2]*m+t[6]*g+t[10]*y+t[14],e[15]=t[3]*m+t[7]*g+t[11]*y+t[15]):(i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],h=t[8],f=t[9],p=t[10],d=t[11],e[0]=n=t[0],e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e[6]=c,e[7]=u,e[8]=h,e[9]=f,e[10]=p,e[11]=d,e[12]=n*m+s*g+h*y+t[12],e[13]=i*m+l*g+f*y+t[13],e[14]=a*m+c*g+p*y+t[14],e[15]=o*m+u*g+d*y+t[15]),e},e.K=function(e,t,r){var n=r[0],i=r[1],a=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},e.L=vs,e.M=function(e,t){let r={};for(let n=0;n{let t=window.document.createElement("video");return t.muted=!0,new Promise((r=>{t.onloadstart=()=>{r(t)};for(let r of e){let e=window.document.createElement("source");V(r)||(t.crossOrigin="Anonymous"),e.src=r,t.appendChild(e)}}))},e.a4=function(){return _++},e.a5=Ga,e.a6=xu,e.a7=In,e.a8=Ko,e.a9=Zu,e.aA=function(e){if("custom"===e.type)return new Cu(e);switch(e.type){case"background":return new Au(e);case"circle":return new ws(e);case"fill":return new yl(e);case"fill-extrusion":return new Ul(e);case"heatmap":return new Os(e);case"hillshade":return new Fs(e);case"line":return new nc(e);case"raster":return new Eu(e);case"symbol":return new wu(e)}},e.aB=T,e.aC=function(e,t){if(!e)return[{command:"setStyle",args:[t]}];let r=[];try{if(!K(e.version,t.version))return[{command:"setStyle",args:[t]}];K(e.center,t.center)||r.push({command:"setCenter",args:[t.center]}),K(e.zoom,t.zoom)||r.push({command:"setZoom",args:[t.zoom]}),K(e.bearing,t.bearing)||r.push({command:"setBearing",args:[t.bearing]}),K(e.pitch,t.pitch)||r.push({command:"setPitch",args:[t.pitch]}),K(e.sprite,t.sprite)||r.push({command:"setSprite",args:[t.sprite]}),K(e.glyphs,t.glyphs)||r.push({command:"setGlyphs",args:[t.glyphs]}),K(e.transition,t.transition)||r.push({command:"setTransition",args:[t.transition]}),K(e.light,t.light)||r.push({command:"setLight",args:[t.light]}),K(e.terrain,t.terrain)||r.push({command:"setTerrain",args:[t.terrain]}),K(e.sky,t.sky)||r.push({command:"setSky",args:[t.sky]}),K(e.projection,t.projection)||r.push({command:"setProjection",args:[t.projection]});let n={},i=[];!function(e,t,r,n){let i;for(i in t=t||{},e=e||{})Object.prototype.hasOwnProperty.call(e,i)&&(Object.prototype.hasOwnProperty.call(t,i)||ee(i,r,n));for(i in t)Object.prototype.hasOwnProperty.call(t,i)&&(Object.prototype.hasOwnProperty.call(e,i)?K(e[i],t[i])||("geojson"===e[i].type&&"geojson"===t[i].type&&re(e,t,i)?J(r,{command:"setGeoJSONSourceData",args:[i,t[i].data]}):te(i,t,r,n)):Q(i,t,r))}(e.sources,t.sources,i,n);let a=[];e.layers&&e.layers.forEach((e=>{"source"in e&&n[e.source]?r.push({command:"removeLayer",args:[e.id]}):a.push(e)})),r=r.concat(i),function(e,t,r){t=t||[];let n,i,a,o,s,l=(e=e||[]).map(ie),c=t.map(ie),u=e.reduce(ae,{}),h=t.reduce(ae,{}),f=l.slice(),p=Object.create(null);for(let e=0,t=0;e@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((e,r,n,i)=>{let a=n||i;return t[r]=!a||a.toLowerCase(),""})),t["max-age"]){let e=parseInt(t["max-age"],10);isNaN(e)?delete t["max-age"]:t["max-age"]=e}return t},e.ab=function(e,t){let r=[];for(let n in e)n in t||r.push(n);return r},e.ac=y,e.ad=function(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],c=t[4],u=t[5],h=t[6],f=t[7];return t!==e&&(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[0]=a*i+c*n,e[1]=o*i+u*n,e[2]=s*i+h*n,e[3]=l*i+f*n,e[4]=c*i-a*n,e[5]=u*i-o*n,e[6]=h*i-s*n,e[7]=f*i-l*n,e},e.ae=function(e){var t=new gs(16);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},e.af=bs,e.ag=function(e,t){let r=0,n=0;if("constant"===e.kind)n=e.layoutSize;else if("source"!==e.kind){let{interpolationType:i,minZoom:a,maxZoom:o}=e,s=i?y(zt.interpolationFactor(i,t,a,o),0,1):0;"camera"===e.kind?n=Pt.number(e.minSize,e.maxSize,s):r=s}return{uSizeT:r,uSize:n}},e.ai=function(e,{uSize:t,uSizeT:r},{lowerSize:n,upperSize:i}){return"source"===e.kind?n/ou:"composite"===e.kind?Pt.number(n/ou,i/ou,r):t},e.aj=mu,e.ak=function(e,t,r,n){let i=t.y-e.y,o=t.x-e.x,s=n.y-r.y,l=n.x-r.x,c=s*o-l*i;if(0===c)return null;let u=(l*(e.y-r.y)-s*(e.x-r.x))/c;return new a(e.x+u*o,e.y+u*i)},e.al=Ju,e.am=es,e.an=ys,e.ao=function(e){let t=1/0,r=1/0,n=-1/0,i=-1/0;for(let a of e)t=Math.min(t,a.x),r=Math.min(r,a.y),n=Math.max(n,a.x),i=Math.max(i,a.y);return[t,r,n,i]},e.ap=fc,e.ar=cu,e.as=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],h=t[9],f=t[10],p=t[11],d=t[12],m=t[13],g=t[14],y=t[15],v=r*s-n*o,x=r*l-i*o,_=r*c-a*o,b=n*l-i*s,w=n*c-a*s,T=i*c-a*l,k=u*m-h*d,A=u*g-f*d,M=u*y-p*d,S=h*g-f*m,E=h*y-p*m,C=f*y-p*g,I=v*C-x*E+_*S+b*M-w*A+T*k;return I?(e[0]=(s*C-l*E+c*S)*(I=1/I),e[1]=(i*E-n*C-a*S)*I,e[2]=(m*T-g*w+y*b)*I,e[3]=(f*w-h*T-p*b)*I,e[4]=(l*M-o*C-c*A)*I,e[5]=(r*C-i*M+a*A)*I,e[6]=(g*_-d*T-y*x)*I,e[7]=(u*T-f*_+p*x)*I,e[8]=(o*E-s*M+c*k)*I,e[9]=(n*M-r*E-a*k)*I,e[10]=(d*w-m*_+y*v)*I,e[11]=(h*_-u*w-p*v)*I,e[12]=(s*A-o*S-l*k)*I,e[13]=(r*S-n*A+i*k)*I,e[14]=(m*x-d*b-g*v)*I,e[15]=(u*b-h*x+f*v)*I,e):null},e.at=bh,e.au=tu,e.av=Sh,e.aw=function(){let e={},t=Y.$version;for(let r in Y.$root){let n=Y.$root[r];if(n.required){let i=null;i="version"===r?t:"array"===n.type?[]:{},null!=i&&(e[r]=i)}}return e},e.ax=Ci,e.ay=N,e.az=function(e){e=e.slice();let t=Object.create(null);for(let r=0;r25||n<0||n>=1||r<0||r>=1)},e.bc=function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},e.bd=class extends wa{},e.be=Lu,e.bf=jh,e.bh=j,e.bi=function(e,t){R.REGISTERED_PROTOCOLS[e]=t},e.bj=function(e){delete R.REGISTERED_PROTOCOLS[e]},e.bk=function(e,t){let r={};for(let n=0;ne*fc))}let x=s?"center":n.get("text-justify").evaluate(i,{},t.canonical),_="point"===n.get("symbol-placement")?n.get("text-max-width").evaluate(i,{},t.canonical)*fc:1/0,b=()=>{t.bucket.allowVerticalPlacement&&Ni(a)&&(m.vertical=Gc(g,t.glyphMap,t.glyphPositions,t.imagePositions,h,_,o,d,"left",u,y,e.ah.vertical,!0,p,f))};if(!s&&v){let r=new Set;if("auto"===x)for(let e=0;et(void 0,void 0,void 0,(function*(){if(0===e.byteLength)return createImageBitmap(new ImageData(1,1));let t=new Blob([new Uint8Array(e)],{type:"image/png"});try{return createImageBitmap(t)}catch(e){throw new Error(`Could not load image because of ${e.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}})),e.e=x,e.f=e=>new Promise(((t,r)=>{let n=new Image;n.onload=()=>{t(n),URL.revokeObjectURL(n.src),n.onload=null,window.requestAnimationFrame((()=>{n.src=I}))},n.onerror=()=>r(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));let i=new Blob([new Uint8Array(e)],{type:"image/png"});n.src=e.byteLength?URL.createObjectURL(i):I})),e.g=F,e.h=(e,t)=>U(x(e,{type:"json"}),t),e.i=S,e.j=W,e.k=G,e.l=(e,t)=>U(x(e,{type:"arrayBuffer"}),t),e.m=U,e.n=function(e){return new Oc(e).readFields(Rc,[])},e.o=Is,e.p=jc,e.q=pa,e.r=gi,e.s=V,e.t=_i,e.u=mi,e.v=Y,e.w=A,e.x=function([e,t,r]){return t+=90,t*=Math.PI/180,r*=Math.PI/180,{x:e*Math.cos(t)*Math.sin(r),y:e*Math.sin(t)*Math.sin(r),z:e*Math.cos(r)}},e.y=Pt,e.z=Qi})),r("worker",0,(function(e){class t{constructor(e){this.keyCache={},e&&this.replace(e)}replace(e){this._layerConfigs={},this._layers={},this.update(e,[])}update(t,r){for(let r of t){this._layerConfigs[r.id]=r;let t=this._layers[r.id]=e.aA(r);t._featureFilter=e.a7(t.filter),this.keyCache[r.id]&&delete this.keyCache[r.id]}for(let e of r)delete this.keyCache[e],delete this._layerConfigs[e],delete this._layers[e];this.familiesBySource={};let n=e.bk(Object.values(this._layerConfigs),this.keyCache);for(let e of n){let t=e.map((e=>this._layers[e.id])),r=t[0];if("none"===r.visibility)continue;let n=r.source||"",i=this.familiesBySource[n];i||(i=this.familiesBySource[n]={});let a=r.sourceLayer||"_geojsonTileLayer",o=i[a];o||(o=i[a]=[]),o.push(t)}}}class r{constructor(t){let r={},n=[];for(let e in t){let i=t[e],a=r[e]={};for(let e in i){let t=i[+e];if(!t||0===t.bitmap.width||0===t.bitmap.height)continue;let r={x:0,y:0,w:t.bitmap.width+2,h:t.bitmap.height+2};n.push(r),a[e]={rect:r,metrics:t.metrics}}}let{w:i,h:a}=e.p(n),o=new e.o({width:i||1,height:a||1});for(let n in t){let i=t[n];for(let t in i){let a=i[+t];if(!a||0===a.bitmap.width||0===a.bitmap.height)continue;let s=r[n][t].rect;e.o.copy(a.bitmap,o,{x:0,y:0},{x:s.x+1,y:s.y+1},a.bitmap)}}this.image=o,this.positions=r}}e.bl("GlyphAtlas",r);class n{constructor(t){this.tileID=new e.S(t.tileID.overscaledZ,t.tileID.wrap,t.tileID.canonical.z,t.tileID.canonical.x,t.tileID.canonical.y),this.uid=t.uid,this.zoom=t.zoom,this.pixelRatio=t.pixelRatio,this.tileSize=t.tileSize,this.source=t.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=t.showCollisionBoxes,this.collectResourceTiming=!!t.collectResourceTiming,this.returnDependencies=!!t.returnDependencies,this.promoteId=t.promoteId,this.inFlightDependencies=[]}parse(t,n,a,o){return e._(this,void 0,void 0,(function*(){this.status="parsing",this.data=t,this.collisionBoxArray=new e.a5;let s=new e.bm(Object.keys(t.layers).sort()),l=new e.bn(this.tileID,this.promoteId);l.bucketLayerIDs=[];let c={},u={featureIndex:l,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:a},h=n.familiesBySource[this.source];for(let r in h){let n=t.layers[r];if(!n)continue;1===n.version&&e.w(`Vector tile source "${this.source}" layer "${r}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let o=s.encode(r),f=[];for(let e=0;e=r.maxzoom||"none"!==r.visibility&&(i(t,this.zoom,a),(c[r.id]=r.createBucket({index:l.bucketLayerIDs.length,layers:t,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:o,sourceID:this.source})).populate(f,u,this.tileID.canonical),l.bucketLayerIDs.push(t.map((e=>e.id))))}}let f=e.aF(u.glyphDependencies,(e=>Object.keys(e).map(Number)));this.inFlightDependencies.forEach((e=>e?.abort())),this.inFlightDependencies=[];let p=Promise.resolve({});if(Object.keys(f).length){let e=new AbortController;this.inFlightDependencies.push(e),p=o.sendAsync({type:"GG",data:{stacks:f,source:this.source,tileID:this.tileID,type:"glyphs"}},e)}let d=Object.keys(u.iconDependencies),m=Promise.resolve({});if(d.length){let e=new AbortController;this.inFlightDependencies.push(e),m=o.sendAsync({type:"GI",data:{icons:d,source:this.source,tileID:this.tileID,type:"icons"}},e)}let g=Object.keys(u.patternDependencies),y=Promise.resolve({});if(g.length){let e=new AbortController;this.inFlightDependencies.push(e),y=o.sendAsync({type:"GI",data:{icons:g,source:this.source,tileID:this.tileID,type:"patterns"}},e)}let[v,x,_]=yield Promise.all([p,m,y]),b=new r(v),w=new e.bo(x,_);for(let t in c){let r=c[t];r instanceof e.a6?(i(r.layers,this.zoom,a),e.bp({bucket:r,glyphMap:v,glyphPositions:b.positions,imageMap:x,imagePositions:w.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):r.hasPattern&&(r instanceof e.bq||r instanceof e.br||r instanceof e.bs)&&(i(r.layers,this.zoom,a),r.addFeatures(u,this.tileID.canonical,w.patternPositions))}return this.status="done",{buckets:Object.values(c).filter((e=>!e.isEmpty())),featureIndex:l,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:b.image,imageAtlas:w,glyphMap:this.returnDependencies?v:null,iconMap:this.returnDependencies?x:null,glyphPositions:this.returnDependencies?b.positions:null}}))}}function i(t,r,n){let i=new e.z(r);for(let e of t)e.recalculate(i,n)}class a{constructor(e,t,r){this.actor=e,this.layerIndex=t,this.availableImages=r,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(t,r){return e._(this,void 0,void 0,(function*(){let n=yield e.l(t.request,r);try{return{vectorTile:new e.bt.VectorTile(new e.bu(n.data)),rawData:n.data,cacheControl:n.cacheControl,expires:n.expires}}catch(e){let r=new Uint8Array(n.data),i=`Unable to parse the tile at ${t.request.url}, `;throw i+=31===r[0]&&139===r[1]?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${e.message}`,new Error(i)}}))}loadTile(t){return e._(this,void 0,void 0,(function*(){let r=t.uid,i=!!(t&&t.request&&t.request.collectResourceTiming)&&new e.bv(t.request),a=new n(t);this.loading[r]=a;let o=new AbortController;a.abort=o;try{let n=yield this.loadVectorTile(t,o);if(delete this.loading[r],!n)return null;let s=n.rawData,l={};n.expires&&(l.expires=n.expires),n.cacheControl&&(l.cacheControl=n.cacheControl);let c={};if(i){let e=i.finish();e&&(c.resourceTiming=JSON.parse(JSON.stringify(e)))}a.vectorTile=n.vectorTile;let u=a.parse(n.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[r]=a,this.fetching[r]={rawTileData:s,cacheControl:l,resourceTiming:c};try{let t=yield u;return e.e({rawTileData:s.slice(0)},t,l,c)}finally{delete this.fetching[r]}}catch(e){throw delete this.loading[r],a.status="done",this.loaded[r]=a,e}}))}reloadTile(t){return e._(this,void 0,void 0,(function*(){let r=t.uid;if(!this.loaded||!this.loaded[r])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");let n=this.loaded[r];if(n.showCollisionBoxes=t.showCollisionBoxes,"parsing"===n.status){let t,i=yield n.parse(n.vectorTile,this.layerIndex,this.availableImages,this.actor);if(this.fetching[r]){let{rawTileData:n,cacheControl:a,resourceTiming:o}=this.fetching[r];delete this.fetching[r],t=e.e({rawTileData:n.slice(0)},i,a,o)}else t=i;return t}if("done"===n.status&&n.vectorTile)return n.parse(n.vectorTile,this.layerIndex,this.availableImages,this.actor)}))}abortTile(t){return e._(this,void 0,void 0,(function*(){let e=this.loading,r=t.uid;e&&e[r]&&e[r].abort&&(e[r].abort.abort(),delete e[r])}))}removeTile(t){return e._(this,void 0,void 0,(function*(){this.loaded&&this.loaded[t.uid]&&delete this.loaded[t.uid]}))}}class o{constructor(){this.loaded={}}loadTile(t){return e._(this,void 0,void 0,(function*(){let{uid:r,encoding:n,rawImageData:i,redFactor:a,greenFactor:o,blueFactor:s,baseShift:l}=t,c=i.width+2,u=i.height+2,h=e.b(i)?new e.R({width:c,height:u},yield e.bw(i,-1,-1,c,u)):i,f=new e.bx(r,h,n,a,o,s,l);return this.loaded=this.loaded||{},this.loaded[r]=f,f}))}removeTile(e){let t=this.loaded,r=e.uid;t&&t[r]&&delete t[r]}}function s(e,t){if(0!==e.length){l(e[0],t);for(var r=1;r=Math.abs(s)?r-l+s:s-l+r,r=l}r+n>=0!=!!t&&e.reverse()}var c=e.by((function e(t,r){var n,i=t&&t.type;if("FeatureCollection"===i)for(n=0;n>31}function A(e,t){for(var r=e.loadGeometry(),n=e.type,i=0,a=0,o=r.length,s=0;se},C=Math.fround||(I=new Float32Array(1),e=>(I[0]=+e,I[0]));var I;class L{constructor(e){this.options=Object.assign(Object.create(E),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){let{log:t,minZoom:r,maxZoom:n}=this.options;t&&console.time("total time");let i=`prepare ${e.length} points`;t&&console.time(i),this.points=e;let a=[];for(let t=0;t=r;e--){let r=+Date.now();o=this.trees[e]=this._createTree(this._cluster(o,e)),t&&console.log("z%d: %d clusters in %dms",e,o.numItems,+Date.now()-r)}return t&&console.timeEnd("total time"),this}getClusters(e,t){let r=((e[0]+180)%360+360)%360-180,n=Math.max(-90,Math.min(90,e[1])),i=180===e[2]?180:((e[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,i=180;else if(r>i){let e=this.getClusters([r,n,180,a],t),o=this.getClusters([-180,n,i,a],t);return e.concat(o)}let o=this.trees[this._limitZoom(t)],s=o.range(D(r),O(a),D(i),O(n)),l=o.data,c=[];for(let e of s){let t=this.stride*e;c.push(l[t+5]>1?P(l,t,this.clusterProps):this.points[l[t+3]])}return c}getChildren(e){let t=this._getOriginId(e),r=this._getOriginZoom(e),n="No cluster with the specified id.",i=this.trees[r];if(!i)throw new Error(n);let a=i.data;if(t*this.stride>=a.length)throw new Error(n);let o=this.options.radius/(this.options.extent*Math.pow(2,r-1)),s=i.within(a[t*this.stride],a[t*this.stride+1],o),l=[];for(let t of s){let r=t*this.stride;a[r+4]===e&&l.push(a[r+5]>1?P(a,r,this.clusterProps):this.points[a[r+3]])}if(0===l.length)throw new Error(n);return l}getLeaves(e,t,r){let n=[];return this._appendLeaves(n,e,t=t||10,r=r||0,0),n}getTile(e,t,r){let n=this.trees[this._limitZoom(e)],i=Math.pow(2,e),{extent:a,radius:o}=this.options,s=o/a,l=(r-s)/i,c=(r+1+s)/i,u={features:[]};return this._addTileFeatures(n.range((t-s)/i,l,(t+1+s)/i,c),n.data,t,r,i,u),0===t&&this._addTileFeatures(n.range(1-s/i,l,1,c),n.data,i,r,i,u),t===i-1&&this._addTileFeatures(n.range(0,l,s/i,c),n.data,-1,r,i,u),u.features.length?u:null}getClusterExpansionZoom(e){let t=this._getOriginZoom(e)-1;for(;t<=this.options.maxZoom;){let r=this.getChildren(e);if(t++,1!==r.length)break;e=r[0].properties.cluster_id}return t}_appendLeaves(e,t,r,n,i){let a=this.getChildren(t);for(let t of a){let a=t.properties;if(a&&a.cluster?i+a.point_count<=n?i+=a.point_count:i=this._appendLeaves(e,a.cluster_id,r,n,i):i1;if(u)e=z(t,c,this.clusterProps),s=t[c],l=t[c+1];else{let r=this.points[t[c+3]];e=r.properties;let[n,i]=r.geometry.coordinates;s=D(n),l=O(i)}let h,f={type:1,geometry:[[Math.round(this.options.extent*(s*i-r)),Math.round(this.options.extent*(l*i-n))]],tags:e};h=u||this.options.generateId?t[c+3]:this.points[t[c+3]].id,void 0!==h&&(f.id=h),a.features.push(f)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,t){let{radius:r,extent:n,reduce:i,minPoints:a}=this.options,o=r/(n*Math.pow(2,t)),s=e.data,l=[],c=this.stride;for(let r=0;rt&&(p+=s[r+5])}if(p>f&&p>=a){let e,a=n*f,o=u*f,d=-1,m=(r/c<<5)+(t+1)+this.points.length;for(let n of h){let l=n*c;if(s[l+2]<=t)continue;s[l+2]=t;let u=s[l+5];a+=s[l]*u,o+=s[l+1]*u,s[l+4]=m,i&&(e||(e=this._map(s,r,!0),d=this.clusterProps.length,this.clusterProps.push(e)),i(e,this._map(s,l)))}s[r+4]=m,l.push(a/p,o/p,1/0,m,-1,p),i&&l.push(d)}else{for(let e=0;e1)for(let e of h){let r=e*c;if(!(s[r+2]<=t)){s[r+2]=t;for(let e=0;e>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t,r){if(e[t+5]>1){let n=this.clusterProps[e[t+6]];return r?Object.assign({},n):n}let n=this.points[e[t+3]].properties,i=this.options.map(n);return r&&i===n?Object.assign({},i):i}}function P(e,t,r){return{type:"Feature",id:e[t+3],properties:z(e,t,r),geometry:{type:"Point",coordinates:[(n=e[t],360*(n-.5)),R(e[t+1])]}};var n}function z(e,t,r){let n=e[t+5],i=n>=1e4?`${Math.round(n/1e3)}k`:n>=1e3?Math.round(n/100)/10+"k":n,a=e[t+6],o=-1===a?{}:Object.assign({},r[a]);return Object.assign(o,{cluster:!0,cluster_id:e[t+3],point_count:n,point_count_abbreviated:i})}function D(e){return e/360+.5}function O(e){let t=Math.sin(e*Math.PI/180),r=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return r<0?0:r>1?1:r}function R(e){let t=(180-360*e)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}function F(e,t,r,n){let i,a=n,o=t+(r-t>>1),s=r-t,l=e[t],c=e[t+1],u=e[r],h=e[r+1];for(let n=t+3;na)i=n,a=t;else if(t===a){let e=Math.abs(n-o);en&&(i-t>3&&F(e,t,i,n),e[i+2]=a,r-i>3&&F(e,i,r,n))}function B(e,t,r,n,i,a){let o=i-r,s=a-n;if(0!==o||0!==s){let l=((e-r)*o+(t-n)*s)/(o*o+s*s);l>1?(r=i,n=a):l>0&&(r+=o*l,n+=s*l)}return o=e-r,s=t-n,o*o+s*s}function j(e,t,r,n){let i={id:e??null,type:t,geometry:r,tags:n,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if("Point"===t||"MultiPoint"===t||"LineString"===t)N(i,r);else if("Polygon"===t)N(i,r[0]);else if("MultiLineString"===t)for(let e of r)N(i,e);else if("MultiPolygon"===t)for(let e of r)N(i,e[0]);return i}function N(e,t){for(let r=0;r0&&(o+=n?(i*l-s*a)/2:Math.sqrt(Math.pow(s-i,2)+Math.pow(l-a,2))),i=s,a=l}let s=t.length-3;t[2]=1,F(t,0,s,r),t[s+2]=1,t.size=Math.abs(o),t.start=0,t.end=t.size}function H(e,t,r,n){for(let i=0;i1?1:r}function Z(e,t,r,n,i,a,o,s){if(n/=t,a>=(r/=t)&&o=n)return null;let l=[];for(let t of e){let e=t.geometry,a=t.type,o=0===i?t.minX:t.minY,c=0===i?t.maxX:t.maxY;if(o>=r&&c=n)continue;let u=[];if("Point"===a||"MultiPoint"===a)Y(e,u,r,n,i);else if("LineString"===a)X(e,u,r,n,i,!1,s.lineMetrics);else if("MultiLineString"===a)K(e,u,r,n,i,!1);else if("Polygon"===a)K(e,u,r,n,i,!0);else if("MultiPolygon"===a)for(let t of e){let e=[];K(t,e,r,n,i,!0),e.length&&u.push(e)}if(u.length){if(s.lineMetrics&&"LineString"===a){for(let e of u)l.push(j(t.id,a,e,t.tags));continue}"LineString"!==a&&"MultiLineString"!==a||(1===u.length?(a="LineString",u=u[0]):a="MultiLineString"),"Point"!==a&&"MultiPoint"!==a||(a=3===u.length?"Point":"MultiPoint"),l.push(j(t.id,a,u,t.tags))}}return l.length?l:null}function Y(e,t,r,n,i){for(let a=0;a=r&&o<=n&&J(t,e[a],e[a+1],e[a+2])}}function X(e,t,r,n,i,a,o){let s,l,c=$(e),u=0===i?Q:ee,h=e.start;for(let f=0;fr&&(l=u(c,p,d,g,y,r),o&&(c.start=h+s*l)):v>n?x=r&&(l=u(c,p,d,g,y,r),_=!0),x>n&&v<=n&&(l=u(c,p,d,g,y,n),_=!0),!a&&_&&(o&&(c.end=h+s*l),t.push(c),c=$(e)),o&&(h+=s)}let f=e.length-3,p=e[f],d=e[f+1],m=0===i?p:d;m>=r&&m<=n&&J(c,p,d,e[f+2]),f=c.length-3,a&&f>=3&&(c[f]!==c[0]||c[f+1]!==c[1])&&J(c,c[0],c[1],c[2]),c.length&&t.push(c)}function $(e){let t=[];return t.size=e.size,t.start=e.start,t.end=e.end,t}function K(e,t,r,n,i,a){for(let o of e)X(o,t,r,n,i,a,!1)}function J(e,t,r,n){e.push(t,r,n)}function Q(e,t,r,n,i,a){let o=(a-t)/(n-t);return J(e,a,r+(i-r)*o,1),o}function ee(e,t,r,n,i,a){let o=(a-r)/(i-r);return J(e,t+(n-t)*o,a,1),o}function te(e,t){let r=[];for(let n=0;n0&&t.size<(i?o:n))return void(r.numPoints+=t.length/3);let s=[];for(let e=0;eo)&&(r.numSimplified++,s.push(t[e],t[e+1])),r.numPoints++;i&&function(e,t){let r=0;for(let t=0,n=e.length,i=n-2;t0===t)for(let t=0,r=e.length;t24)throw new Error("maxZoom should be in the 0-24 range");if(t.promoteId&&t.generateId)throw new Error("promoteId and generateId cannot be used together.");let n=function(e,t){let r=[];if("FeatureCollection"===e.type)for(let n=0;n1&&console.time("creation"),f=this.tiles[h]=ae(e,t,r,n,l),this.tileCoords.push({z:t,x:r,y:n}),c)){c>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",t,r,n,f.numFeatures,f.numPoints,f.numSimplified),console.timeEnd("creation"));let e=`z${t}`;this.stats[e]=(this.stats[e]||0)+1,this.total++}if(f.source=e,null==i){if(t===l.indexMaxZoom||f.numPoints<=l.indexMaxPoints)continue}else{if(t===l.maxZoom||t===i)continue;if(null!=i){let e=i-t;if(r!==a>>e||n!==o>>e)continue}}if(f.source=null,0===e.length)continue;c>1&&console.time("clipping");let p=.5*l.buffer/l.extent,d=.5-p,m=.5+p,g=1+p,y=null,v=null,x=null,_=null,b=Z(e,u,r-p,r+m,0,f.minX,f.maxX,l),w=Z(e,u,r+d,r+g,0,f.minX,f.maxX,l);e=null,b&&(y=Z(b,u,n-p,n+m,1,f.minY,f.maxY,l),v=Z(b,u,n+d,n+g,1,f.minY,f.maxY,l),b=null),w&&(x=Z(w,u,n-p,n+m,1,f.minY,f.maxY,l),_=Z(w,u,n+d,n+g,1,f.minY,f.maxY,l),w=null),c>1&&console.timeEnd("clipping"),s.push(y||[],t+1,2*r,2*n),s.push(v||[],t+1,2*r,2*n+1),s.push(x||[],t+1,2*r+1,2*n),s.push(_||[],t+1,2*r+1,2*n+1)}}getTile(e,t,r){e=+e,t=+t,r=+r;let n=this.options,{extent:i,debug:a}=n;if(e<0||e>24)return null;let o=1<1&&console.log("drilling down to z%d-%d-%d",e,t,r);let l,c=e,u=t,h=r;for(;!l&&c>0;)c--,u>>=1,h>>=1,l=this.tiles[ue(c,u,h)];return l&&l.source?(a>1&&(console.log("found parent tile z%d-%d-%d",c,u,h),console.time("drilling down")),this.splitTile(l.source,c,u,h,e,t,r),a>1&&console.timeEnd("drilling down"),this.tiles[s]?ne(this.tiles[s],i):null):null}}function ue(e,t,r){return 32*((1<{o.properties=e;let t={};for(let e of s)t[e]=n[e].evaluate(a,o);return t},t.reduce=(e,t)=>{o.properties=t;for(let t of s)a.accumulated=e[t],e[t]=i[t].evaluate(a,o)},t}(t)).load((yield this._pendingData).features):(i=yield this._pendingData,new ce(i,t.geojsonVtOptions)),this.loaded={};let r={};if(n){let e=n.finish();e&&(r.resourceTiming={},r.resourceTiming[t.source]=JSON.parse(JSON.stringify(e)))}return r}catch(t){if(delete this._pendingRequest,e.bB(t))return{abandoned:!0};throw t}var i}))}getData(){return e._(this,void 0,void 0,(function*(){return this._pendingData}))}reloadTile(e){let t=this.loaded;return t&&t[e.uid]?super.reloadTile(e):this.loadTile(e)}loadAndProcessGeoJSON(t,r){return e._(this,void 0,void 0,(function*(){let n=yield this.loadGeoJSON(t,r);if(delete this._pendingRequest,"object"!=typeof n)throw new Error(`Input data given to '${t.source}' is not a valid GeoJSON object.`);if(c(n,!0),t.filter){let r=e.bC(t.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===r.result)throw new Error(r.value.map((e=>`${e.key}: ${e.message}`)).join(", "));n={type:"FeatureCollection",features:n.features.filter((e=>r.value.evaluate({zoom:0},e)))}}return n}))}loadGeoJSON(t,r){return e._(this,void 0,void 0,(function*(){let{promoteId:n}=t;if(t.request){let i=yield e.h(t.request,r);return this._dataUpdateable=fe(i.data,n)?pe(i.data,n):void 0,i.data}if("string"==typeof t.data)try{let e=JSON.parse(t.data);return this._dataUpdateable=fe(e,n)?pe(e,n):void 0,e}catch{throw new Error(`Input data given to '${t.source}' is not a valid GeoJSON object.`)}if(!t.dataDiff)throw new Error(`Input data given to '${t.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${t.source}`);return function(e,t,r){var n,i,a,o;if(t.removeAll&&e.clear(),t.remove)for(let r of t.remove)e.delete(r);if(t.add)for(let n of t.add){let t=he(n,r);null!=t&&e.set(t,n)}if(t.update)for(let r of t.update){let t=e.get(r.id);if(null==t)continue;let s=!r.removeAllProperties&&((null===(n=r.removeProperties)||void 0===n?void 0:n.length)>0||(null===(i=r.addOrUpdateProperties)||void 0===i?void 0:i.length)>0);if((r.newGeometry||r.removeAllProperties||s)&&(t=Object.assign({},t),e.set(r.id,t),s&&(t.properties=Object.assign({},t.properties))),r.newGeometry&&(t.geometry=r.newGeometry),r.removeAllProperties)t.properties={};else if((null===(a=r.removeProperties)||void 0===a?void 0:a.length)>0)for(let e of r.removeProperties)Object.prototype.hasOwnProperty.call(t.properties,e)&&delete t.properties[e];if((null===(o=r.addOrUpdateProperties)||void 0===o?void 0:o.length)>0)for(let{key:e,value:n}of r.addOrUpdateProperties)t.properties[e]=n}}(this._dataUpdateable,t.dataDiff,n),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}}))}removeSource(t){return e._(this,void 0,void 0,(function*(){this._pendingRequest&&this._pendingRequest.abort()}))}getClusterExpansionZoom(e){return this._geoJSONIndex.getClusterExpansionZoom(e.clusterId)}getClusterChildren(e){return this._geoJSONIndex.getChildren(e.clusterId)}getClusterLeaves(e){return this._geoJSONIndex.getLeaves(e.clusterId,e.limit,e.offset)}}class me{constructor(t){this.self=t,this.actor=new e.F(t),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(e,t)=>{if(this.externalWorkerSourceTypes[e])throw new Error(`Worker source with name "${e}" already registered.`);this.externalWorkerSourceTypes[e]=t},this.self.addProtocol=e.bi,this.self.removeProtocol=e.bj,this.self.registerRTLTextPlugin=t=>{if(e.bD.isParsed())throw new Error("RTL text plugin already registered.");e.bD.setMethods(t)},this.actor.registerMessageHandler("LDT",((e,t)=>this._getDEMWorkerSource(e,t.source).loadTile(t))),this.actor.registerMessageHandler("RDT",((t,r)=>e._(this,void 0,void 0,(function*(){this._getDEMWorkerSource(t,r.source).removeTile(r)})))),this.actor.registerMessageHandler("GCEZ",((t,r)=>e._(this,void 0,void 0,(function*(){return this._getWorkerSource(t,r.type,r.source).getClusterExpansionZoom(r)})))),this.actor.registerMessageHandler("GCC",((t,r)=>e._(this,void 0,void 0,(function*(){return this._getWorkerSource(t,r.type,r.source).getClusterChildren(r)})))),this.actor.registerMessageHandler("GCL",((t,r)=>e._(this,void 0,void 0,(function*(){return this._getWorkerSource(t,r.type,r.source).getClusterLeaves(r)})))),this.actor.registerMessageHandler("LD",((e,t)=>this._getWorkerSource(e,t.type,t.source).loadData(t))),this.actor.registerMessageHandler("GD",((e,t)=>this._getWorkerSource(e,t.type,t.source).getData())),this.actor.registerMessageHandler("LT",((e,t)=>this._getWorkerSource(e,t.type,t.source).loadTile(t))),this.actor.registerMessageHandler("RT",((e,t)=>this._getWorkerSource(e,t.type,t.source).reloadTile(t))),this.actor.registerMessageHandler("AT",((e,t)=>this._getWorkerSource(e,t.type,t.source).abortTile(t))),this.actor.registerMessageHandler("RMT",((e,t)=>this._getWorkerSource(e,t.type,t.source).removeTile(t))),this.actor.registerMessageHandler("RS",((t,r)=>e._(this,void 0,void 0,(function*(){if(!this.workerSources[t]||!this.workerSources[t][r.type]||!this.workerSources[t][r.type][r.source])return;let e=this.workerSources[t][r.type][r.source];delete this.workerSources[t][r.type][r.source],void 0!==e.removeSource&&e.removeSource(r)})))),this.actor.registerMessageHandler("RM",(t=>e._(this,void 0,void 0,(function*(){delete this.layerIndexes[t],delete this.availableImages[t],delete this.workerSources[t],delete this.demWorkerSources[t]})))),this.actor.registerMessageHandler("SR",((t,r)=>e._(this,void 0,void 0,(function*(){this.referrer=r})))),this.actor.registerMessageHandler("SRPS",((e,t)=>this._syncRTLPluginState(e,t))),this.actor.registerMessageHandler("IS",((t,r)=>e._(this,void 0,void 0,(function*(){this.self.importScripts(r)})))),this.actor.registerMessageHandler("SI",((e,t)=>this._setImages(e,t))),this.actor.registerMessageHandler("UL",((t,r)=>e._(this,void 0,void 0,(function*(){this._getLayerIndex(t).update(r.layers,r.removedIds)})))),this.actor.registerMessageHandler("SL",((t,r)=>e._(this,void 0,void 0,(function*(){this._getLayerIndex(t).replace(r)}))))}_setImages(t,r){return e._(this,void 0,void 0,(function*(){this.availableImages[t]=r;for(let e in this.workerSources[t]){let n=this.workerSources[t][e];for(let e in n)n[e].availableImages=r}}))}_syncRTLPluginState(t,r){return e._(this,void 0,void 0,(function*(){if(e.bD.isParsed())return e.bD.getState();if("loading"!==r.pluginStatus)return e.bD.setState(r),r;let t=r.pluginURL;if(this.self.importScripts(t),e.bD.isParsed()){let r={pluginStatus:"loaded",pluginURL:t};return e.bD.setState(r),r}throw e.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${t}`)}))}_getAvailableImages(e){let t=this.availableImages[e];return t||(t=[]),t}_getLayerIndex(e){let r=this.layerIndexes[e];return r||(r=this.layerIndexes[e]=new t),r}_getWorkerSource(e,t,r){if(this.workerSources[e]||(this.workerSources[e]={}),this.workerSources[e][t]||(this.workerSources[e][t]={}),!this.workerSources[e][t][r]){let n={sendAsync:(t,r)=>(t.targetMapId=e,this.actor.sendAsync(t,r))};switch(t){case"vector":this.workerSources[e][t][r]=new a(n,this._getLayerIndex(e),this._getAvailableImages(e));break;case"geojson":this.workerSources[e][t][r]=new de(n,this._getLayerIndex(e),this._getAvailableImages(e));break;default:this.workerSources[e][t][r]=new this.externalWorkerSourceTypes[t](n,this._getLayerIndex(e),this._getAvailableImages(e))}}return this.workerSources[e][t][r]}_getDEMWorkerSource(e,t){return this.demWorkerSources[e]||(this.demWorkerSources[e]={}),this.demWorkerSources[e][t]||(this.demWorkerSources[e][t]=new o),this.demWorkerSources[e][t]}}return e.i(self)&&(self.worker=new me(self)),me})),r("index",0,(function(e,t){var r="4.7.1";let n,i,a={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:e=>new Promise(((r,n)=>{let i=requestAnimationFrame(r);e.signal.addEventListener("abort",(()=>{cancelAnimationFrame(i),n(t.c())}))})),getImageData(e,t=0){return this.getImageCanvasContext(e).getImageData(-t,-t,e.width+2*t,e.height+2*t)},getImageCanvasContext(e){let t=window.document.createElement("canvas"),r=t.getContext("2d",{willReadFrequently:!0});if(!r)throw new Error("failed to create canvas 2d context");return t.width=e.width,t.height=e.height,r.drawImage(e,0,0,e.width,e.height),r},resolveURL:e=>(n||(n=document.createElement("a")),n.href=e,n.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(null==i&&(i=matchMedia("(prefers-reduced-motion: reduce)")),i.matches)}};class o{static testProp(e){if(!o.docStyle)return e[0];for(let t=0;t{window.removeEventListener("click",o.suppressClickInternal,!0)}),0)}static getScale(e){let t=e.getBoundingClientRect();return{x:t.width/e.offsetWidth||1,y:t.height/e.offsetHeight||1,boundingClientRect:t}}static getPoint(e,r,n){let i=r.boundingClientRect;return new t.P((n.clientX-i.left)/r.x-e.clientLeft,(n.clientY-i.top)/r.y-e.clientTop)}static mousePos(e,t){let r=o.getScale(e);return o.getPoint(e,r,t)}static touchPos(e,t){let r=[],n=o.getScale(e);for(let i=0;i{s&&f(s),s=null,h=!0},l.onerror=()=>{u=!0,s=null},l.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(e){let r,n,i,a;e.resetRequestQueue=()=>{r=[],n=0,i=0,a={}},e.addThrottleControl=e=>{let t=i++;return a[t]=e,t},e.removeThrottleControl=e=>{delete a[e],s()},e.getImage=(e,n,i=!0)=>new Promise(((a,o)=>{c.supported&&(e.headers||(e.headers={}),e.headers.accept="image/webp,*/*"),t.e(e,{type:"image"}),r.push({abortController:n,requestParameters:e,supportImageRefresh:i,state:"queued",onError:e=>{o(e)},onSuccess:e=>{a(e)}}),s()}));let o=e=>t._(this,void 0,void 0,(function*(){e.state="running";let{requestParameters:r,supportImageRefresh:i,onError:a,onSuccess:o,abortController:c}=e,u=!1===i&&!t.i(self)&&!t.g(r.url)&&(!r.headers||Object.keys(r.headers).reduce(((e,t)=>e&&"accept"===t),!0));n++;let h=u?l(r,c):t.m(r,c);try{let r=yield h;delete e.abortController,e.state="completed",r.data instanceof HTMLImageElement||t.b(r.data)?o(r):r.data&&o({data:yield(f=r.data,"function"==typeof createImageBitmap?t.d(f):t.f(f)),cacheControl:r.cacheControl,expires:r.expires})}catch(t){delete e.abortController,a(t)}finally{n--,s()}var f})),s=()=>{let e=(()=>{for(let e of Object.keys(a))if(a[e]())return!0;return!1})()?t.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:t.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let t=n;t0;t++){let e=r.shift();e.abortController.signal.aborted?t--:o(e)}},l=(e,r)=>new Promise(((n,i)=>{let a=new Image,o=e.url,s=e.credentials;s&&"include"===s?a.crossOrigin="use-credentials":(s&&"same-origin"===s||!t.s(o))&&(a.crossOrigin="anonymous"),r.signal.addEventListener("abort",(()=>{a.src="",i(t.c())})),a.fetchPriority="high",a.onload=()=>{a.onerror=a.onload=null,n({data:a})},a.onerror=()=>{a.onerror=a.onload=null,r.signal.aborted||i(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},a.src=o}))}(p||(p={})),p.resetRequestQueue();class d{constructor(e){this._transformRequestFn=e}transformRequest(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}}setTransformRequest(e){this._transformRequestFn=e}}function m(e){var r=new t.A(3);return r[0]=e[0],r[1]=e[1],r[2]=e[2],r}var g,y=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e};g=new t.A(3),t.A!=Float32Array&&(g[0]=0,g[1]=0,g[2]=0);var v,x=function(e){var t=e[0],r=e[1];return t*t+r*r};function _(e){let t=[];if("string"==typeof e)t.push({id:"default",url:e});else if(e&&e.length>0){let r=[];for(let{id:n,url:i}of e){let e=`${n}${i}`;-1===r.indexOf(e)&&(r.push(e),t.push({id:n,url:i}))}}return t}function b(e,t,r){let n=e.split("?");return n[0]+=`${t}${r}`,n.join("?")}v=new t.A(2),t.A!=Float32Array&&(v[0]=0,v[1]=0);class w{constructor(e,t,r,n){this.context=e,this.format=r,this.texture=e.gl.createTexture(),this.update(t,n)}update(e,r,n){let{width:i,height:a}=e,o=!(this.size&&this.size[0]===i&&this.size[1]===a||n),{context:s}=this,{gl:l}=s;if(this.useMipmap=!(!r||!r.useMipmap),l.bindTexture(l.TEXTURE_2D,this.texture),s.pixelStoreUnpackFlipY.set(!1),s.pixelStoreUnpack.set(1),s.pixelStoreUnpackPremultiplyAlpha.set(this.format===l.RGBA&&(!r||!1!==r.premultiply)),o)this.size=[i,a],e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof ImageData||t.b(e)?l.texImage2D(l.TEXTURE_2D,0,this.format,this.format,l.UNSIGNED_BYTE,e):l.texImage2D(l.TEXTURE_2D,0,this.format,i,a,0,this.format,l.UNSIGNED_BYTE,e.data);else{let{x:r,y:o}=n||{x:0,y:0};e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof ImageData||t.b(e)?l.texSubImage2D(l.TEXTURE_2D,0,r,o,l.RGBA,l.UNSIGNED_BYTE,e):l.texSubImage2D(l.TEXTURE_2D,0,r,o,i,a,l.RGBA,l.UNSIGNED_BYTE,e.data)}this.useMipmap&&this.isSizePowerOfTwo()&&l.generateMipmap(l.TEXTURE_2D)}bind(e,t,r){let{context:n}=this,{gl:i}=n;i.bindTexture(i.TEXTURE_2D,this.texture),r!==i.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(r=i.LINEAR),e!==this.filter&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,e),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,r||e),this.filter=e),t!==this.wrap&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,t),this.wrap=t)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){let{gl:e}=this.context;e.deleteTexture(this.texture),this.texture=null}}function T(e){let{userImage:t}=e;return!!(t&&t.render&&t.render())&&(e.data.replace(new Uint8Array(t.data.buffer)),!0)}class k extends t.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(e){if(this.loaded!==e&&(this.loaded=e,e)){for(let{ids:e,promiseResolve:t}of this.requestors)t(this._getImagesForIds(e));this.requestors=[]}}getImage(e){let r=this.images[e];if(r&&!r.data&&r.spriteData){let e=r.spriteData;r.data=new t.R({width:e.width,height:e.height},e.context.getImageData(e.x,e.y,e.width,e.height).data),r.spriteData=null}return r}addImage(e,t){if(this.images[e])throw new Error(`Image id ${e} already exist, use updateImage instead`);this._validate(e,t)&&(this.images[e]=t)}_validate(e,r){let n=!0,i=r.data||r.spriteData;return this._validateStretch(r.stretchX,i&&i.width)||(this.fire(new t.j(new Error(`Image "${e}" has invalid "stretchX" value`))),n=!1),this._validateStretch(r.stretchY,i&&i.height)||(this.fire(new t.j(new Error(`Image "${e}" has invalid "stretchY" value`))),n=!1),this._validateContent(r.content,r)||(this.fire(new t.j(new Error(`Image "${e}" has invalid "content" value`))),n=!1),n}_validateStretch(e,t){if(!e)return!0;let r=0;for(let n of e){if(n[0]{let n=!0;if(!this.isLoaded())for(let t of e)this.images[t]||(n=!1);this.isLoaded()||n?t(this._getImagesForIds(e)):this.requestors.push({ids:e,promiseResolve:t})}))}_getImagesForIds(e){let r={};for(let n of e){let e=this.getImage(n);e||(this.fire(new t.k("styleimagemissing",{id:n})),e=this.getImage(n)),e?r[n]={data:e.data.clone(),pixelRatio:e.pixelRatio,sdf:e.sdf,version:e.version,stretchX:e.stretchX,stretchY:e.stretchY,content:e.content,textFitWidth:e.textFitWidth,textFitHeight:e.textFitHeight,hasRenderCallback:!(!e.userImage||!e.userImage.render)}:t.w(`Image "${n}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return r}getPixelSize(){let{width:e,height:t}=this.atlasImage;return{width:e,height:t}}getPattern(e){let r=this.patterns[e],n=this.getImage(e);if(!n)return null;if(r&&r.position.version===n.version)return r.position;if(r)r.position.version=n.version;else{let r={w:n.data.width+2,h:n.data.height+2,x:0,y:0},i=new t.I(r,n);this.patterns[e]={bin:r,position:i}}return this._updatePatternAtlas(),this.patterns[e].position}bind(e){let t=e.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new w(e,this.atlasImage,t.RGBA),this.atlasTexture.bind(t.LINEAR,t.CLAMP_TO_EDGE)}_updatePatternAtlas(){let e=[];for(let t in this.patterns)e.push(this.patterns[t].bin);let{w:r,h:n}=t.p(e),i=this.atlasImage;i.resize({width:r||1,height:n||1});for(let e in this.patterns){let{bin:r}=this.patterns[e],n=r.x+1,a=r.y+1,o=this.getImage(e).data,s=o.width,l=o.height;t.R.copy(o,i,{x:0,y:0},{x:n,y:a},{width:s,height:l}),t.R.copy(o,i,{x:0,y:l-1},{x:n,y:a-1},{width:s,height:1}),t.R.copy(o,i,{x:0,y:0},{x:n,y:a+l},{width:s,height:1}),t.R.copy(o,i,{x:s-1,y:0},{x:n-1,y:a},{width:1,height:l}),t.R.copy(o,i,{x:0,y:0},{x:n+s,y:a},{width:1,height:l})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(e){for(let r of e){if(this.callbackDispatchedThisFrame[r])continue;this.callbackDispatchedThisFrame[r]=!0;let e=this.getImage(r);e||t.w(`Image with ID: "${r}" was not found`),T(e)&&this.updateImage(r,e)}}}let A,M=1e20;function S(e,t,r,n,i,a,o,s,l){for(let c=t;c-1);l++,a[l]=s,o[l]=c,o[l+1]=M}for(let s=0,l=0;s65535)throw new Error("glyphs > 65535 not supported");if(t.ranges[i])return{stack:e,id:r,glyph:n};if(!this.url)throw new Error("glyphsUrl is not set");if(!t.requests[i]){let r=C.loadGlyphRange(e,i,this.url,this.requestManager);t.requests[i]=r}let a=yield t.requests[i];for(let e in a)this._doesCharSupportLocalGlyph(+e)||(t.glyphs[+e]=a[+e]);return t.ranges[i]=!0,{stack:e,id:r,glyph:a[r]||null}}))}_doesCharSupportLocalGlyph(e){return!!this.localIdeographFontFamily&&new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(e))}_tinySDF(e,r,n){let i=this.localIdeographFontFamily;if(!i||!this._doesCharSupportLocalGlyph(n))return;let a=e.tinySDF;if(!a){let t="400";/bold/i.test(r)?t="900":/medium/i.test(r)?t="500":/light/i.test(r)&&(t="200"),a=e.tinySDF=new C.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:i,fontWeight:t})}let o=a.draw(String.fromCharCode(n));return{id:n,bitmap:new t.o({width:o.width||60,height:o.height||60},o.data),metrics:{width:o.glyphWidth/2||24,height:o.glyphHeight/2||24,left:o.glyphLeft/2+.5||0,top:o.glyphTop/2-27.5||-8,advance:o.glyphAdvance/2||24,isDoubleResolution:!0}}}}C.loadGlyphRange=function(e,r,n,i){return t._(this,void 0,void 0,(function*(){let a=256*r,o=a+255,s=i.transformRequest(n.replace("{fontstack}",e).replace("{range}",`${a}-${o}`),"Glyphs"),l=yield t.l(s,new AbortController);if(!l||!l.data)throw new Error(`Could not load glyph range. range: ${r}, ${a}-${o}`);let c={};for(let e of t.n(l.data))c[e.id]=e;return c}))},C.TinySDF=class{constructor({fontSize:e=24,buffer:t=3,radius:r=8,cutoff:n=.25,fontFamily:i="sans-serif",fontWeight:a="normal",fontStyle:o="normal"}={}){this.buffer=t,this.cutoff=n,this.radius=r;let s=this.size=e+4*t,l=this._createCanvas(s),c=this.ctx=l.getContext("2d",{willReadFrequently:!0});c.font=`${o} ${a} ${e}px ${i}`,c.textBaseline="alphabetic",c.textAlign="left",c.fillStyle="black",this.gridOuter=new Float64Array(s*s),this.gridInner=new Float64Array(s*s),this.f=new Float64Array(s),this.z=new Float64Array(s+1),this.v=new Uint16Array(s)}_createCanvas(e){let t=document.createElement("canvas");return t.width=t.height=e,t}draw(e){let{width:t,actualBoundingBoxAscent:r,actualBoundingBoxDescent:n,actualBoundingBoxLeft:i,actualBoundingBoxRight:a}=this.ctx.measureText(e),o=Math.ceil(r),s=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(a-i))),l=Math.min(this.size-this.buffer,o+Math.ceil(n)),c=s+2*this.buffer,u=l+2*this.buffer,h=Math.max(c*u,0),f=new Uint8ClampedArray(h),p={data:f,width:c,height:u,glyphWidth:s,glyphHeight:l,glyphTop:o,glyphLeft:0,glyphAdvance:t};if(0===s||0===l)return p;let{ctx:d,buffer:m,gridInner:g,gridOuter:y}=this;d.clearRect(m,m,s,l),d.fillText(e,m,m+o);let v=d.getImageData(m,m,s,l);y.fill(M,0,h),g.fill(0,0,h);for(let e=0;e0?e*e:0,g[n]=e<0?e*e:0}}S(y,0,0,c,u,c,this.f,this.v,this.z),S(g,m,m,s,l,c,this.f,this.v,this.z);for(let e=0;e1&&(o=e[++a]);let l,c=Math.abs(s-o.left),u=Math.abs(s-o.right),h=Math.min(c,u),f=t/r*(n+1);if(o.isDash){let e=n-Math.abs(f);l=Math.sqrt(h*h+e*e)}else l=n-Math.sqrt(h*h+f*f);this.data[i+s]=Math.max(0,Math.min(255,l+128))}}}addRegularDash(e){for(let t=e.length-1;t>=0;--t){let r=e[t],n=e[t+1];r.zeroLength?e.splice(t,1):n&&n.isDash===r.isDash&&(n.left=r.left,e.splice(t,1))}let t=e[0],r=e[e.length-1];t.isDash===r.isDash&&(t.left=r.left-this.width,r.right=t.right+this.width);let n=this.width*this.nextRow,i=0,a=e[i];for(let t=0;t1&&(a=e[++i]);let r=Math.abs(t-a.left),o=Math.abs(t-a.right),s=Math.min(r,o);this.data[n+t]=Math.max(0,Math.min(255,(a.isDash?s:-s)+128))}}addDash(e,r){let n=r?7:0,i=2*n+1;if(this.nextRow+i>this.height)return t.w("LineAtlas out of space"),null;let a=0;for(let t=0;t{e.terminate()})),this.workers=null)}isPreloaded(){return!!this.active[O]}numActive(){return Object.keys(this.active).length}}let F,B,j=Math.floor(a.hardwareConcurrency/2);function N(){return F||(F=new R),F}R.workerCount=t.C(globalThis)?Math.max(Math.min(j,3),1):1;class U{constructor(e,r){this.workerPool=e,this.actors=[],this.currentActor=0,this.id=r;let n=this.workerPool.acquire(r);for(let e=0;e{e.remove()})),this.actors=[],e&&this.workerPool.release(this.id)}registerMessageHandler(e,t){for(let r of this.actors)r.registerMessageHandler(e,t)}}function V(){return B||(B=new U(N(),t.G),B.registerMessageHandler("GR",((e,r,n)=>t.m(r,n)))),B}function q(e,r){let n=t.H();return t.J(n,n,[1,1,0]),t.K(n,n,[.5*e.width,.5*e.height,1]),t.L(n,n,e.calculatePosMatrix(r.toUnwrapped()))}function H(e,t,r,n,i,a){let o=function(e,t,r){if(e)for(let n of e){let e=t[n];if(e&&e.source===r&&"fill-extrusion"===e.type)return!0}else for(let e in t){let n=t[e];if(n.source===r&&"fill-extrusion"===n.type)return!0}return!1}(i&&i.layers,t,e.id),s=a.maxPitchScaleFactor(),l=e.tilesIn(n,s,o);l.sort(G);let c=[];for(let n of l)c.push({wrappedTileID:n.tileID.wrapped().key,queryResults:n.tile.queryRenderedFeatures(t,r,e._state,n.queryGeometry,n.cameraQueryGeometry,n.scale,i,a,s,q(e.transform,n.tileID))});let u=function(e){let t={},r={};for(let n of e){let e=n.queryResults,i=n.wrappedTileID,a=r[i]=r[i]||{};for(let r in e){let n=e[r],i=a[r]=a[r]||{},o=t[r]=t[r]||[];for(let e of n)i[e.featureIndex]||(i[e.featureIndex]=!0,o.push(e))}}return t}(c);for(let t in u)u[t].forEach((t=>{let r=t.feature,n=e.getFeatureState(r.layer["source-layer"],r.id);r.source=r.layer.source,r.layer["source-layer"]&&(r.sourceLayer=r.layer["source-layer"]),r.state=n}));return u}function G(e,t){let r=e.tileID,n=t.tileID;return r.overscaledZ-n.overscaledZ||r.canonical.y-n.canonical.y||r.wrap-n.wrap||r.canonical.x-n.canonical.x}function W(e,r,n){return t._(this,void 0,void 0,(function*(){let i=e;if(e.url?i=(yield t.h(r.transformRequest(e.url,"Source"),n)).data:yield a.frameAsync(n),!i)return null;let o=t.M(t.e(i,e),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in i&&i.vector_layers&&(o.vectorLayerIds=i.vector_layers.map((e=>e.id))),o}))}class Z{constructor(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):Array.isArray(e)&&(4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1])))}setNorthEast(e){return this._ne=e instanceof t.N?new t.N(e.lng,e.lat):t.N.convert(e),this}setSouthWest(e){return this._sw=e instanceof t.N?new t.N(e.lng,e.lat):t.N.convert(e),this}extend(e){let r,n,i=this._sw,a=this._ne;if(e instanceof t.N)r=e,n=e;else{if(!(e instanceof Z))return Array.isArray(e)?4===e.length||e.every(Array.isArray)?this.extend(Z.convert(e)):this.extend(t.N.convert(e)):e&&("lng"in e||"lon"in e)&&"lat"in e?this.extend(t.N.convert(e)):this;if(r=e._sw,n=e._ne,!r||!n)return this}return i||a?(i.lng=Math.min(r.lng,i.lng),i.lat=Math.min(r.lat,i.lat),a.lng=Math.max(n.lng,a.lng),a.lat=Math.max(n.lat,a.lat)):(this._sw=new t.N(r.lng,r.lat),this._ne=new t.N(n.lng,n.lat)),this}getCenter(){return new t.N((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new t.N(this.getWest(),this.getNorth())}getSouthEast(){return new t.N(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(e){let{lng:r,lat:n}=t.N.convert(e),i=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(i=this._sw.lng>=r&&r>=this._ne.lng),this._sw.lat<=n&&n<=this._ne.lat&&i}static convert(e){return e instanceof Z?e:e&&new Z(e)}static fromLngLat(e,r=0){let n=360*r/40075017,i=n/Math.cos(Math.PI/180*e.lat);return new Z(new t.N(e.lng-i,e.lat-n),new t.N(e.lng+i,e.lat+n))}adjustAntiMeridian(){let e=new t.N(this._sw.lng,this._sw.lat),r=new t.N(this._ne.lng,this._ne.lat);return new Z(e,e.lng>r.lng?new t.N(r.lng+360,r.lat):r)}}class Y{constructor(e,t,r){this.bounds=Z.convert(this.validateBounds(e)),this.minzoom=t||0,this.maxzoom=r||24}validateBounds(e){return Array.isArray(e)&&4===e.length?[Math.max(-180,e[0]),Math.max(-90,e[1]),Math.min(180,e[2]),Math.min(90,e[3])]:[-180,-90,180,90]}contains(e){let r=Math.pow(2,e.z),n=Math.floor(t.O(this.bounds.getWest())*r),i=Math.floor(t.Q(this.bounds.getNorth())*r),a=Math.ceil(t.O(this.bounds.getEast())*r),o=Math.ceil(t.Q(this.bounds.getSouth())*r);return e.x>=n&&e.x=i&&e.y{this._options.tiles=e})),this}setUrl(e){return this.setSourceProperty((()=>{this.url=e,this._options.url=e})),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return t.e({},this._options)}loadTile(e){return t._(this,void 0,void 0,(function*(){let t=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),r={request:this.map._requestManager.transformRequest(t,"Tile"),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};r.request.collectResourceTiming=this._collectResourceTiming;let n="RT";if(e.actor&&"expired"!==e.state){if("loading"===e.state)return new Promise(((t,r)=>{e.reloadPromise={resolve:t,reject:r}}))}else e.actor=this.dispatcher.getActor(),n="LT";e.abortController=new AbortController;try{let t=yield e.actor.sendAsync({type:n,data:r},e.abortController);if(delete e.abortController,e.aborted)return;this._afterTileLoadWorkerResponse(e,t)}catch(t){if(delete e.abortController,e.aborted)return;if(t&&404!==t.status)throw t;this._afterTileLoadWorkerResponse(e,null)}}))}_afterTileLoadWorkerResponse(e,t){if(t&&t.resourceTiming&&(e.resourceTiming=t.resourceTiming),t&&this.map._refreshExpiredTiles&&e.setExpiryData(t),e.loadVectorData(t,this.map.painter),e.reloadPromise){let t=e.reloadPromise;e.reloadPromise=null,this.loadTile(e).then(t.resolve).catch(t.reject)}}abortTile(e){return t._(this,void 0,void 0,(function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.actor&&(yield e.actor.sendAsync({type:"AT",data:{uid:e.uid,type:this.type,source:this.id}}))}))}unloadTile(e){return t._(this,void 0,void 0,(function*(){e.unloadVectorData(),e.actor&&(yield e.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}}))}))}hasTransition(){return!1}}class $ extends t.E{constructor(e,r,n,i){super(),this.id=e,this.dispatcher=n,this.setEventedParent(i),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=t.e({type:"raster"},r),t.e(this,t.M(r,["url","scheme","tileSize"]))}load(){return t._(this,void 0,void 0,(function*(){this._loaded=!1,this.fire(new t.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let e=yield W(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,e&&(t.e(this,e),e.bounds&&(this.tileBounds=new Y(e.bounds,this.minzoom,this.maxzoom)),this.fire(new t.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new t.k("data",{dataType:"source",sourceDataType:"content"})))}catch(e){this._tileJSONRequest=null,this.fire(new t.j(e))}}))}loaded(){return this._loaded}onAdd(e){this.map=e,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(e){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),e(),this.load()}setTiles(e){return this.setSourceProperty((()=>{this._options.tiles=e})),this}setUrl(e){return this.setSourceProperty((()=>{this.url=e,this._options.url=e})),this}serialize(){return t.e({},this._options)}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}loadTile(e){return t._(this,void 0,void 0,(function*(){let t=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);e.abortController=new AbortController;try{let r=yield p.getImage(this.map._requestManager.transformRequest(t,"Tile"),e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(r&&r.data){this.map._refreshExpiredTiles&&r.cacheControl&&r.expires&&e.setExpiryData({cacheControl:r.cacheControl,expires:r.expires});let t=this.map.painter.context,n=t.gl,i=r.data;e.texture=this.map.painter.getTileTexture(i.width),e.texture?e.texture.update(i,{useMipmap:!0}):(e.texture=new w(t,i,n.RGBA,{useMipmap:!0}),e.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE,n.LINEAR_MIPMAP_NEAREST)),e.state="loaded"}}catch(t){if(delete e.abortController,e.aborted)e.state="unloaded";else if(t)throw e.state="errored",t}}))}abortTile(e){return t._(this,void 0,void 0,(function*(){e.abortController&&(e.abortController.abort(),delete e.abortController)}))}unloadTile(e){return t._(this,void 0,void 0,(function*(){e.texture&&this.map.painter.saveTileTexture(e.texture)}))}hasTransition(){return!1}}class K extends ${constructor(e,r,n,i){super(e,r,n,i),this.type="raster-dem",this.maxzoom=22,this._options=t.e({type:"raster-dem"},r),this.encoding=r.encoding||"mapbox",this.redFactor=r.redFactor,this.greenFactor=r.greenFactor,this.blueFactor=r.blueFactor,this.baseShift=r.baseShift}loadTile(e){return t._(this,void 0,void 0,(function*(){let r=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),n=this.map._requestManager.transformRequest(r,"Tile");e.neighboringTiles=this._getNeighboringTiles(e.tileID),e.abortController=new AbortController;try{let r=yield p.getImage(n,e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(r&&r.data){let n=r.data;this.map._refreshExpiredTiles&&r.cacheControl&&r.expires&&e.setExpiryData({cacheControl:r.cacheControl,expires:r.expires});let i=t.b(n)&&t.U()?n:yield this.readImageNow(n),a={type:this.type,uid:e.uid,source:this.id,rawImageData:i,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!e.actor||"expired"===e.state){e.actor=this.dispatcher.getActor();let t=yield e.actor.sendAsync({type:"LDT",data:a});e.dem=t,e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0,e.state="loaded"}}}catch(t){if(delete e.abortController,e.aborted)e.state="unloaded";else if(t)throw e.state="errored",t}}))}readImageNow(e){return t._(this,void 0,void 0,(function*(){if(typeof VideoFrame<"u"&&t.V()){let r=e.width+2,n=e.height+2;try{return new t.R({width:r,height:n},yield t.W(e,-1,-1,r,n))}catch{}}return a.getImageData(e,1)}))}_getNeighboringTiles(e){let r=e.canonical,n=Math.pow(2,r.z),i=(r.x-1+n)%n,a=0===r.x?e.wrap-1:e.wrap,o=(r.x+1+n)%n,s=r.x+1===n?e.wrap+1:e.wrap,l={};return l[new t.S(e.overscaledZ,a,r.z,i,r.y).key]={backfilled:!1},l[new t.S(e.overscaledZ,s,r.z,o,r.y).key]={backfilled:!1},r.y>0&&(l[new t.S(e.overscaledZ,a,r.z,i,r.y-1).key]={backfilled:!1},l[new t.S(e.overscaledZ,e.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},l[new t.S(e.overscaledZ,s,r.z,o,r.y-1).key]={backfilled:!1}),r.y+10&&t.e(i,{resourceTiming:n}),this.fire(new t.k("data",Object.assign(Object.assign({},i),{sourceDataType:"metadata"}))),this.fire(new t.k("data",Object.assign(Object.assign({},i),{sourceDataType:"content"})))}catch(e){if(this._pendingLoads--,this._removed)return void this.fire(new t.k("dataabort",{dataType:"source"}));this.fire(new t.j(e))}}))}loaded(){return 0===this._pendingLoads}loadTile(e){return t._(this,void 0,void 0,(function*(){let t=e.actor?"RT":"LT";e.actor=this.actor;let r={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};e.abortController=new AbortController;let n=yield this.actor.sendAsync({type:t,data:r},e.abortController);delete e.abortController,e.unloadVectorData(),e.aborted||e.loadVectorData(n,this.map.painter,"RT"===t)}))}abortTile(e){return t._(this,void 0,void 0,(function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.aborted=!0}))}unloadTile(e){return t._(this,void 0,void 0,(function*(){e.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}})}))}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return t.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var Q=t.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class ee extends t.E{constructor(e,t,r,n){super(),this.id=e,this.dispatcher=r,this.coordinates=t.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(n),this.options=t}load(e){return t._(this,void 0,void 0,(function*(){this._loaded=!1,this.fire(new t.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let t=yield p.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,t&&t.data&&(this.image=t.data,e&&(this.coordinates=e),this._finishLoading())}catch(e){this._request=null,this._loaded=!0,this.fire(new t.j(e))}}))}loaded(){return this._loaded}updateImage(e){return e.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=e.url,this.load(e.coordinates).finally((()=>{this.texture=null})),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(e){this.map=e,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(e){this.coordinates=e;let r=e.map(t.Z.fromLngLat);this.tileID=function(e){let r=1/0,n=1/0,i=-1/0,a=-1/0;for(let t of e)r=Math.min(r,t.x),n=Math.min(n,t.y),i=Math.max(i,t.x),a=Math.max(a,t.y);let o=Math.max(i-r,a-n),s=Math.max(0,Math.floor(-Math.log(o)/Math.LN2)),l=Math.pow(2,s);return new t.a1(s,Math.floor((r+i)/2*l),Math.floor((n+a)/2*l))}(r),this.minzoom=this.maxzoom=this.tileID.z;let n=r.map((e=>this.tileID.getTilePoint(e)._round()));return this._boundsArray=new t.$,this._boundsArray.emplaceBack(n[0].x,n[0].y,0,0),this._boundsArray.emplaceBack(n[1].x,n[1].y,t.X,0),this._boundsArray.emplaceBack(n[3].x,n[3].y,0,t.X),this._boundsArray.emplaceBack(n[2].x,n[2].y,t.X,t.X),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new t.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(0===Object.keys(this.tiles).length||!this.image)return;let e=this.map.painter.context,r=e.gl;this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,Q.members)),this.boundsSegments||(this.boundsSegments=t.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new w(e,this.image,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE));let n=!1;for(let e in this.tiles){let t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture,n=!0)}n&&this.fire(new t.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(e){return t._(this,void 0,void 0,(function*(){this.tileID&&this.tileID.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={}):e.state="errored"}))}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class te extends ee{constructor(e,t,r,n){super(e,t,r,n),this.roundZoom=!0,this.type="video",this.options=t}load(){return t._(this,void 0,void 0,(function*(){this._loaded=!1;let e=this.options;this.urls=[];for(let t of e.urls)this.urls.push(this.map._requestManager.transformRequest(t,"Source").url);try{let e=yield t.a3(this.urls);if(this._loaded=!0,!e)return;this.video=e,this.video.loop=!0,this.video.addEventListener("playing",(()=>{this.map.triggerRepaint()})),this.map&&this.video.play(),this._finishLoading()}catch(e){this.fire(new t.j(e))}}))}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(e){if(this.video){let r=this.video.seekable;er.end(0)?this.fire(new t.j(new t.a2(`sources.${this.id}`,null,`Playback for this video can be set only between the ${r.start(0)} and ${r.end(0)}-second mark.`))):this.video.currentTime=e}}getVideo(){return this.video}onAdd(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(0===Object.keys(this.tiles).length||this.video.readyState<2)return;let e=this.map.painter.context,r=e.gl;this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,Q.members)),this.boundsSegments||(this.boundsSegments=t.a0.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new w(e,this.video,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE));let n=!1;for(let e in this.tiles){let t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture,n=!0)}n&&this.fire(new t.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class re extends ee{constructor(e,r,n,i){super(e,r,n,i),r.coordinates?Array.isArray(r.coordinates)&&4===r.coordinates.length&&!r.coordinates.some((e=>!Array.isArray(e)||2!==e.length||e.some((e=>"number"!=typeof e))))||this.fire(new t.j(new t.a2(`sources.${e}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.j(new t.a2(`sources.${e}`,null,'missing required property "coordinates"'))),r.animate&&"boolean"!=typeof r.animate&&this.fire(new t.j(new t.a2(`sources.${e}`,null,'optional "animate" property must be a boolean value'))),r.canvas?"string"==typeof r.canvas||r.canvas instanceof HTMLCanvasElement||this.fire(new t.j(new t.a2(`sources.${e}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.j(new t.a2(`sources.${e}`,null,'missing required property "canvas"'))),this.options=r,this.animate=void 0===r.animate||r.animate}load(){return t._(this,void 0,void 0,(function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new t.j(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())}))}getCanvas(){return this.canvas}onAdd(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),this._hasInvalidDimensions()||0===Object.keys(this.tiles).length)return;let r=this.map.painter.context,n=r.gl;this.boundsBuffer||(this.boundsBuffer=r.createVertexBuffer(this._boundsArray,Q.members)),this.boundsSegments||(this.boundsSegments=t.a0.simpleSegment(0,0,4,2)),this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new w(r,this.canvas,n.RGBA,{premultiply:!0});let i=!1;for(let e in this.tiles){let t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture,i=!0)}i&&this.fire(new t.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let e of[this.canvas.width,this.canvas.height])if(isNaN(e)||e<=0)return!0;return!1}}let ne={},ie=e=>{switch(e){case"geojson":return J;case"image":return ee;case"raster":return $;case"raster-dem":return K;case"vector":return X;case"video":return te;case"canvas":return re}return ne[e]},ae="RTLPluginLoaded";class oe extends t.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=V()}_syncState(e){return this.status=e,this.dispatcher.broadcast("SRPS",{pluginStatus:e,pluginURL:this.url}).catch((e=>{throw this.status="error",e}))}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(e){return t._(this,arguments,void 0,(function*(e,t=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=a.resolveURL(e),!this.url)throw new Error(`requested url ${e} is invalid`);if("unavailable"===this.status){if(!t)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if("requested"===this.status)return this._requestImport()}))}_requestImport(){return t._(this,void 0,void 0,(function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new t.k(ae))}))}lazyLoad(){"unavailable"===this.status?this.status="requested":"deferred"===this.status&&this._requestImport()}}let se=null;function le(){return se||(se=new oe),se}class ce{constructor(e,r){this.timeAdded=0,this.fadeEndTime=0,this.tileID=e,this.uid=t.a4(),this.uses=0,this.tileSize=r,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(e){let t=e+this.timeAdded;tt.getLayer(e))).filter(Boolean);if(0!==e.length){n.layers=e,n.stateDependentLayerIds&&(n.stateDependentLayers=n.stateDependentLayerIds.map((t=>e.filter((e=>e.id===t))[0])));for(let t of e)r[t.id]=n}}return r}(e.buckets,r.style),this.hasSymbolBuckets=!1;for(let e in this.buckets){let r=this.buckets[e];if(r instanceof t.a6){if(this.hasSymbolBuckets=!0,!n)break;r.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let e in this.buckets){let r=this.buckets[e];if(r instanceof t.a6&&r.hasRTLText){this.hasRTLText=!0,le().lazyLoad();break}}this.queryPadding=0;for(let e in this.buckets){let t=this.buckets[e];this.queryPadding=Math.max(this.queryPadding,r.style.getLayer(e).queryRadius(t))}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage)}else this.collisionBoxArray=new t.a5}unloadVectorData(){for(let e in this.buckets)this.buckets[e].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(e){return this.buckets[e.id]}upload(e){for(let t in this.buckets){let r=this.buckets[t];r.uploadPending()&&r.upload(e)}let t=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new w(e,this.imageAtlas.image,t.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new w(e,this.glyphAtlasImage,t.ALPHA),this.glyphAtlasImage=null)}prepare(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture)}queryRenderedFeatures(e,t,r,n,i,a,o,s,l,c){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:n,cameraQueryGeometry:i,scale:a,tileSize:this.tileSize,pixelPosMatrix:c,transform:s,params:o,queryPadding:this.queryPadding*l},e,t,r):{}}querySourceFeatures(e,r){let n=this.latestFeatureIndex;if(!n||!n.rawTileData)return;let i=n.loadVTLayers(),a=r&&r.sourceLayer?r.sourceLayer:"",o=i._geojsonTileLayer||i[a];if(!o)return;let s=t.a7(r&&r.filter),{z:l,x:c,y:u}=this.tileID.canonical,h={z:l,x:c,y:u};for(let r=0;re)t=!1;else if(r)if(this.expirationTime{this.remove(e,i)}),r)),this.data[n].push(i),this.order.push(n),this.order.length>this.max){let e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this}has(e){return e.wrapped().key in this.data}getAndRemove(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null}_getAndRemoveByKey(e){let t=this.data[e].shift();return t.timeout&&clearTimeout(t.timeout),0===this.data[e].length&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),t.value}getByKey(e){let t=this.data[e];return t?t[0].value:null}get(e){return this.has(e)?this.data[e.wrapped().key][0].value:null}remove(e,t){if(!this.has(e))return this;let r=e.wrapped().key,n=void 0===t?0:this.data[r].indexOf(t),i=this.data[r][n];return this.data[r].splice(n,1),i.timeout&&clearTimeout(i.timeout),0===this.data[r].length&&delete this.data[r],this.onRemove(i.value),this.order.splice(this.order.indexOf(r),1),this}setMaxSize(e){for(this.max=e;this.order.length>this.max;){let e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this}filter(e){let t=[];for(let r in this.data)for(let n of this.data[r])e(n.value)||t.push(n);for(let e of t)this.remove(e.value.tileID,e)}}class he{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(e,r,n){let i=String(r);if(this.stateChanges[e]=this.stateChanges[e]||{},this.stateChanges[e][i]=this.stateChanges[e][i]||{},t.e(this.stateChanges[e][i],n),null===this.deletedStates[e]){this.deletedStates[e]={};for(let t in this.state[e])t!==i&&(this.deletedStates[e][t]=null)}else if(this.deletedStates[e]&&null===this.deletedStates[e][i]){this.deletedStates[e][i]={};for(let t in this.state[e][i])n[t]||(this.deletedStates[e][i][t]=null)}else for(let t in n)this.deletedStates[e]&&this.deletedStates[e][i]&&null===this.deletedStates[e][i][t]&&delete this.deletedStates[e][i][t]}removeFeatureState(e,t,r){if(null===this.deletedStates[e])return;let n=String(t);if(this.deletedStates[e]=this.deletedStates[e]||{},r&&void 0!==t)null!==this.deletedStates[e][n]&&(this.deletedStates[e][n]=this.deletedStates[e][n]||{},this.deletedStates[e][n][r]=null);else if(void 0!==t)if(this.stateChanges[e]&&this.stateChanges[e][n])for(r in this.deletedStates[e][n]={},this.stateChanges[e][n])this.deletedStates[e][n][r]=null;else this.deletedStates[e][n]=null;else this.deletedStates[e]=null}getState(e,r){let n=String(r),i=t.e({},(this.state[e]||{})[n],(this.stateChanges[e]||{})[n]);if(null===this.deletedStates[e])return{};if(this.deletedStates[e]){let t=this.deletedStates[e][r];if(null===t)return{};for(let e in t)delete i[e]}return i}initializeTileState(e,t){e.setFeatureState(this.state,t)}coalesceChanges(e,r){let n={};for(let e in this.stateChanges){this.state[e]=this.state[e]||{};let r={};for(let n in this.stateChanges[e])this.state[e][n]||(this.state[e][n]={}),t.e(this.state[e][n],this.stateChanges[e][n]),r[n]=this.state[e][n];n[e]=r}for(let e in this.deletedStates){this.state[e]=this.state[e]||{};let r={};if(null===this.deletedStates[e])for(let t in this.state[e])r[t]={},this.state[e][t]={};else for(let t in this.deletedStates[e]){if(null===this.deletedStates[e][t])this.state[e][t]={};else for(let r of Object.keys(this.deletedStates[e][t]))delete this.state[e][t][r];r[t]=this.state[e][t]}n[e]=n[e]||{},t.e(n[e],r)}if(this.stateChanges={},this.deletedStates={},0!==Object.keys(n).length)for(let t in e)e[t].setFeatureState(n,r)}}class fe extends t.E{constructor(e,t,r){super(),this.id=e,this.dispatcher=r,this.on("data",(e=>this._dataHandler(e))),this.on("dataloading",(()=>{this._sourceErrored=!1})),this.on("error",(()=>{this._sourceErrored=this._source.loaded()})),this._source=((e,t,r,n)=>{let i=new(ie(t.type))(e,t,r,n);if(i.id!==e)throw new Error(`Expected Source id to be ${e} instead of ${i.id}`);return i})(e,t,r,this),this._tiles={},this._cache=new ue(0,(e=>this._unloadTile(e))),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new he,this._didEmitContent=!1,this._updated=!1}onAdd(e){this.map=e,this._maxTileCacheSize=e?e._maxTileCacheSize:null,this._maxTileCacheZoomLevels=e?e._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(e)}onRemove(e){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(e)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(void 0===this.used&&void 0===this.usedForTerrain||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let e in this._tiles){let t=this._tiles[e];if("loaded"!==t.state&&"errored"!==t.state)return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;let e=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,e&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(e,r,n){return t._(this,void 0,void 0,(function*(){try{yield this._source.loadTile(e),this._tileLoaded(e,r,n)}catch(r){e.state="errored",404!==r.status?this._source.fire(new t.j(r,{tile:e})):this.update(this.transform,this.terrain)}}))}_unloadTile(e){this._source.unloadTile&&this._source.unloadTile(e)}_abortTile(e){this._source.abortTile&&this._source.abortTile(e),this._source.fire(new t.k("dataabort",{tile:e,coord:e.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(e){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(let t in this._tiles){let r=this._tiles[t];r.upload(e),r.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map((e=>e.tileID)).sort(pe).map((e=>e.key))}getRenderableIds(e){let r=[];for(let t in this._tiles)this._isIdRenderable(t,e)&&r.push(this._tiles[t]);return e?r.sort(((e,r)=>{let n=e.tileID,i=r.tileID,a=new t.P(n.canonical.x,n.canonical.y)._rotate(this.transform.angle),o=new t.P(i.canonical.x,i.canonical.y)._rotate(this.transform.angle);return n.overscaledZ-i.overscaledZ||o.y-a.y||o.x-a.x})).map((e=>e.tileID.key)):r.map((e=>e.tileID)).sort(pe).map((e=>e.key))}hasRenderableParent(e){let t=this.findLoadedParent(e,0);return!!t&&this._isIdRenderable(t.tileID.key)}_isIdRenderable(e,t){return this._tiles[e]&&this._tiles[e].hasData()&&!this._coveredTiles[e]&&(t||!this._tiles[e].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(let e in this._tiles)"errored"!==this._tiles[e].state&&this._reloadTile(e,"reloading")}}_reloadTile(e,r){return t._(this,void 0,void 0,(function*(){let t=this._tiles[e];t&&("loading"!==t.state&&(t.state=r),yield this._loadTile(t,e,r))}))}_tileLoaded(e,r,n){e.timeAdded=a.now(),"expired"===n&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(r,e),"raster-dem"===this.getSource().type&&e.dem&&this._backfillDEM(e),this._state.initializeTileState(e,this.map?this.map.painter:null),e.aborted||this._source.fire(new t.k("data",{dataType:"source",tile:e,coord:e.tileID}))}_backfillDEM(e){let t=this.getRenderableIds();for(let n=0;n1||(Math.abs(r)>1&&(1===Math.abs(r+i)?r+=i:1===Math.abs(r-i)&&(r-=i)),t.dem&&e.dem&&(e.dem.backfillBorder(t.dem,r,n),e.neighboringTiles&&e.neighboringTiles[a]&&(e.neighboringTiles[a].backfilled=!0)))}}getTile(e){return this.getTileByID(e.key)}getTileByID(e){return this._tiles[e]}_retainLoadedChildren(e,t,r,n){for(let i in this._tiles){let a=this._tiles[i];if(n[i]||!a.hasData()||a.tileID.overscaledZ<=t||a.tileID.overscaledZ>r)continue;let o=a.tileID;for(;a&&a.tileID.overscaledZ>t+1;){let e=a.tileID.scaledTo(a.tileID.overscaledZ-1);a=this._tiles[e.key],a&&a.hasData()&&(o=e)}let s=o;for(;s.overscaledZ>t;)if(s=s.scaledTo(s.overscaledZ-1),e[s.key]){n[o.key]=o;break}}}findLoadedParent(e,t){if(e.key in this._loadedParentTiles){let r=this._loadedParentTiles[e.key];return r&&r.tileID.overscaledZ>=t?r:null}for(let r=e.overscaledZ-1;r>=t;r--){let t=e.scaledTo(r),n=this._getLoadedTile(t);if(n)return n}}findLoadedSibling(e){return this._getLoadedTile(e)}_getLoadedTile(e){let t=this._tiles[e.key];return t&&t.hasData()?t:this._cache.getByKey(e.wrapped().key)}updateCacheSize(e){let r=Math.ceil(e.width/this._source.tileSize)+1,n=Math.ceil(e.height/this._source.tileSize)+1,i=Math.floor(r*n*(null===this._maxTileCacheZoomLevels?t.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),a="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,i):i;this._cache.setMaxSize(a)}handleWrapJump(e){let t=Math.round((e-(void 0===this._prevLng?e:this._prevLng))/360);if(this._prevLng=e,t){let e={};for(let r in this._tiles){let n=this._tiles[r];n.tileID=n.tileID.unwrapTo(n.tileID.wrap+t),e[n.tileID.key]=n}this._tiles=e;for(let e in this._timers)clearTimeout(this._timers[e]),delete this._timers[e];for(let e in this._tiles)this._setTileReloadTimer(e,this._tiles[e])}}_updateCoveredAndRetainedTiles(e,t,r,n,i,o){let s={},l={},c=Object.keys(e),u=a.now();for(let r of c){let n=e[r],i=this._tiles[r];if(!i||0!==i.fadeEndTime&&i.fadeEndTime<=u)continue;let a=this.findLoadedParent(n,t),o=this.findLoadedSibling(n),c=a||o||null;c&&(this._addTile(c.tileID),s[c.tileID.key]=c.tileID),l[r]=n}this._retainLoadedChildren(l,n,r,e);for(let t in s)e[t]||(this._coveredTiles[t]=!0,e[t]=s[t]);if(o){let t={},r={};for(let e of i)this._tiles[e.key].hasData()?t[e.key]=e:r[e.key]=e;for(let n in r){let i=r[n].children(this._source.maxzoom);this._tiles[i[0].key]&&this._tiles[i[1].key]&&this._tiles[i[2].key]&&this._tiles[i[3].key]&&(t[i[0].key]=e[i[0].key]=i[0],t[i[1].key]=e[i[1].key]=i[1],t[i[2].key]=e[i[2].key]=i[2],t[i[3].key]=e[i[3].key]=i[3],delete r[n])}for(let n in r){let i=r[n],a=this.findLoadedParent(i,this._source.minzoom),o=this.findLoadedSibling(i),s=a||o||null;if(s){t[s.tileID.key]=e[s.tileID.key]=s.tileID;for(let e in t)t[e].isChildOf(s.tileID)&&delete t[e]}}for(let e in this._tiles)t[e]||(this._coveredTiles[e]=!0)}}update(e,r){if(!this._sourceLoaded||this._paused)return;let n;this.transform=e,this.terrain=r,this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?n=e.getVisibleUnwrappedCoordinates(this._source.tileID).map((e=>new t.S(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y))):(n=e.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:r}),this._source.hasTile&&(n=n.filter((e=>this._source.hasTile(e))))):n=[];let i=e.coveringZoomLevel(this._source),a=Math.max(i-fe.maxOverzooming,this._source.minzoom),o=Math.max(i+fe.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){let e={};for(let t of n)if(t.canonical.z>this._source.minzoom){let r=t.scaledTo(t.canonical.z-1);e[r.key]=r;let n=t.scaledTo(Math.max(this._source.minzoom,Math.min(t.canonical.z,5)));e[n.key]=n}n=n.concat(Object.values(e))}let s=0===n.length&&!this._updated&&this._didEmitContent;this._updated=!0,s&&this.fire(new t.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let l=this._updateRetainedTiles(n,i);de(this._source.type)&&this._updateCoveredAndRetainedTiles(l,a,o,i,n,r);for(let e in l)this._tiles[e].clearFadeHold();let c=t.ab(this._tiles,l);for(let e of c){let t=this._tiles[e];t.hasSymbolBuckets&&!t.holdingForFade()?t.setHoldDuration(this.map._fadeDuration):t.hasSymbolBuckets&&!t.symbolFadeFinished()||this._removeTile(e)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(let e in this._tiles)this._tiles[e].holdingForFade()&&this._removeTile(e)}_updateRetainedTiles(e,t){var r;let n={},i={},a=Math.max(t-fe.maxOverzooming,this._source.minzoom),o=Math.max(t+fe.maxUnderzooming,this._source.minzoom),s={};for(let r of e){let e=this._addTile(r);n[r.key]=r,e.hasData()||tthis._source.maxzoom){let e=o.children(this._source.maxzoom)[0],t=this.getTile(e);if(t&&t.hasData()){n[e.key]=e;continue}}else{let e=o.children(this._source.maxzoom);if(n[e[0].key]&&n[e[1].key]&&n[e[2].key]&&n[e[3].key])continue}let s=e.wasRequested();for(let t=o.overscaledZ-1;t>=a;--t){let a=o.scaledTo(t);if(i[a.key])break;if(i[a.key]=!0,e=this.getTile(a),!e&&s&&(e=this._addTile(a)),e){let t=e.hasData();if((t||!(null!==(r=this.map)&&void 0!==r&&r.cancelPendingTileRequestsWhileZooming)||s)&&(n[a.key]=a),s=e.wasRequested(),t)break}}}return n}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(let e in this._tiles){let t,r=[],n=this._tiles[e].tileID;for(;n.overscaledZ>0;){if(n.key in this._loadedParentTiles){t=this._loadedParentTiles[n.key];break}r.push(n.key);let e=n.scaledTo(n.overscaledZ-1);if(t=this._getLoadedTile(e),t)break;n=e}for(let e of r)this._loadedParentTiles[e]=t}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(let e in this._tiles){let t=this._tiles[e].tileID,r=this._getLoadedTile(t);this._loadedSiblingTiles[t.key]=r}}_addTile(e){let r=this._tiles[e.key];if(r)return r;r=this._cache.getAndRemove(e),r&&(this._setTileReloadTimer(e.key,r),r.tileID=e,this._state.initializeTileState(r,this.map?this.map.painter:null),this._cacheTimers[e.key]&&(clearTimeout(this._cacheTimers[e.key]),delete this._cacheTimers[e.key],this._setTileReloadTimer(e.key,r)));let n=r;return r||(r=new ce(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(r,e.key,r.state)),r.uses++,this._tiles[e.key]=r,n||this._source.fire(new t.k("dataloading",{tile:r,coord:r.tileID,dataType:"source"})),r}_setTileReloadTimer(e,t){e in this._timers&&(clearTimeout(this._timers[e]),delete this._timers[e]);let r=t.getExpiryTimeout();r&&(this._timers[e]=setTimeout((()=>{this._reloadTile(e,"expired"),delete this._timers[e]}),r))}_removeTile(e){let t=this._tiles[e];t&&(t.uses--,delete this._tiles[e],this._timers[e]&&(clearTimeout(this._timers[e]),delete this._timers[e]),t.uses>0||(t.hasData()&&"reloading"!==t.state?this._cache.add(t.tileID,t,t.getExpiryTimeout()):(t.aborted=!0,this._abortTile(t),this._unloadTile(t))))}_dataHandler(e){let t=e.sourceDataType;"source"===e.dataType&&"metadata"===t&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&"source"===e.dataType&&"content"===t&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let e in this._tiles)this._removeTile(e);this._cache.reset()}tilesIn(e,r,n){let i=[],a=this.transform;if(!a)return i;let o=n?a.getCameraQueryGeometry(e):e,s=e.map((e=>a.pointCoordinate(e,this.terrain))),l=o.map((e=>a.pointCoordinate(e,this.terrain))),c=this.getIds(),u=1/0,h=1/0,f=-1/0,p=-1/0;for(let e of l)u=Math.min(u,e.x),h=Math.min(h,e.y),f=Math.max(f,e.x),p=Math.max(p,e.y);for(let e=0;e=0&&g[1].y+m>=0){let e=s.map((e=>o.getTilePoint(e))),t=l.map((e=>o.getTilePoint(e)));i.push({tile:n,tileID:o,queryGeometry:e,cameraQueryGeometry:t,scale:d})}}return i}getVisibleCoordinates(e){let t=this.getRenderableIds(e).map((e=>this._tiles[e].tileID));for(let e of t)e.posMatrix=this.transform.calculatePosMatrix(e.toUnwrapped());return t}hasTransition(){if(this._source.hasTransition())return!0;if(de(this._source.type)){let e=a.now();for(let t in this._tiles)if(this._tiles[t].fadeEndTime>=e)return!0}return!1}setFeatureState(e,t,r){this._state.updateState(e=e||"_geojsonTileLayer",t,r)}removeFeatureState(e,t,r){this._state.removeFeatureState(e=e||"_geojsonTileLayer",t,r)}getFeatureState(e,t){return this._state.getState(e=e||"_geojsonTileLayer",t)}setDependencies(e,t,r){let n=this._tiles[e];n&&n.setDependencies(t,r)}reloadTilesForDependencies(e,t){for(let r in this._tiles)this._tiles[r].hasDependency(e,t)&&this._reloadTile(r,"reloading");this._cache.filter((r=>!r.hasDependency(e,t)))}}function pe(e,t){let r=Math.abs(2*e.wrap)-+(e.wrap<0),n=Math.abs(2*t.wrap)-+(t.wrap<0);return e.overscaledZ-t.overscaledZ||n-r||t.canonical.y-e.canonical.y||t.canonical.x-e.canonical.x}function de(e){return"raster"===e||"image"===e||"video"===e}fe.maxOverzooming=10,fe.maxUnderzooming=3;class me{constructor(e,t){this.reset(e,t)}reset(e,t){this.points=e||[],this._distances=[0];for(let e=1;e0?(i-o)/s:0;return this.points[a].mult(1-l).add(this.points[r].mult(l))}}function ge(e,t){let r=!0;return"always"===e||"never"!==e&&"never"!==t||(r=!1),r}class ye{constructor(e,t,r){let n=this.boxCells=[],i=this.circleCells=[];this.xCellCount=Math.ceil(e/r),this.yCellCount=Math.ceil(t/r);for(let e=0;ethis.width||n<0||t>this.height)return[];let s=[];if(e<=0&&t<=0&&this.width<=r&&this.height<=n){if(i)return[{key:null,x1:e,y1:t,x2:r,y2:n}];for(let e=0;e0}hitTestCircle(e,t,r,n,i){let a=e-r,o=e+r,s=t-r,l=t+r;if(o<0||a>this.width||l<0||s>this.height)return!1;let c=[];return this._forEachCell(a,s,o,l,this._queryCellCircle,c,{hitTest:!0,overlapMode:n,circle:{x:e,y:t,radius:r},seenUids:{box:{},circle:{}}},i),c.length>0}_queryCell(e,t,r,n,i,a,o,s){let{seenUids:l,hitTest:c,overlapMode:u}=o,h=this.boxCells[i];if(null!==h){let i=this.bboxes;for(let o of h)if(!l.box[o]){l.box[o]=!0;let h=4*o,f=this.boxKeys[o];if(e<=i[h+2]&&t<=i[h+3]&&r>=i[h+0]&&n>=i[h+1]&&(!s||s(f))&&(!c||!ge(u,f.overlapMode))&&(a.push({key:f,x1:i[h],y1:i[h+1],x2:i[h+2],y2:i[h+3]}),c))return!0}}let f=this.circleCells[i];if(null!==f){let i=this.circles;for(let o of f)if(!l.circle[o]){l.circle[o]=!0;let h=3*o,f=this.circleKeys[o];if(this._circleAndRectCollide(i[h],i[h+1],i[h+2],e,t,r,n)&&(!s||s(f))&&(!c||!ge(u,f.overlapMode))){let e=i[h],t=i[h+1],r=i[h+2];if(a.push({key:f,x1:e-r,y1:t-r,x2:e+r,y2:t+r}),c)return!0}}}return!1}_queryCellCircle(e,t,r,n,i,a,o,s){let{circle:l,seenUids:c,overlapMode:u}=o,h=this.boxCells[i];if(null!==h){let e=this.bboxes;for(let t of h)if(!c.box[t]){c.box[t]=!0;let r=4*t,n=this.boxKeys[t];if(this._circleAndRectCollide(l.x,l.y,l.radius,e[r+0],e[r+1],e[r+2],e[r+3])&&(!s||s(n))&&!ge(u,n.overlapMode))return a.push(!0),!0}}let f=this.circleCells[i];if(null!==f){let e=this.circles;for(let t of f)if(!c.circle[t]){c.circle[t]=!0;let r=3*t,n=this.circleKeys[t];if(this._circlesCollide(e[r],e[r+1],e[r+2],l.x,l.y,l.radius)&&(!s||s(n))&&!ge(u,n.overlapMode))return a.push(!0),!0}}}_forEachCell(e,t,r,n,i,a,o,s){let l=this._convertToXCellCoord(e),c=this._convertToYCellCoord(t),u=this._convertToXCellCoord(r),h=this._convertToYCellCoord(n);for(let f=l;f<=u;f++)for(let l=c;l<=h;l++)if(i.call(this,e,t,r,n,this.xCellCount*l+f,a,o,s))return}_convertToXCellCoord(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}_convertToYCellCoord(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}_circlesCollide(e,t,r,n,i,a){let o=n-e,s=i-t,l=r+a;return l*l>o*o+s*s}_circleAndRectCollide(e,t,r,n,i,a,o){let s=(a-n)/2,l=Math.abs(e-(n+s));if(l>s+r)return!1;let c=(o-i)/2,u=Math.abs(t-(i+c));if(u>c+r)return!1;if(l<=s||u<=c)return!0;let h=l-s,f=u-c;return h*h+f*f<=r*r}}function ve(e,r,n,i,a){let o=t.H();return r?(t.K(o,o,[1/a,1/a,1]),n||t.ad(o,o,i.angle)):t.L(o,i.labelPlaneMatrix,e),o}function xe(e,r,n,i,a){if(r){let r=t.ae(e);return t.K(r,r,[a,a,1]),n||t.ad(r,r,-i.angle),r}return i.glCoordMatrix}function _e(e,r,n,i){let a;i?(a=[e,r,i(e,r),1],t.af(a,a,n)):(a=[e,r,0,1],Oe(a,a,n));let o=a[3];return{point:new t.P(a[0]/o,a[1]/o),signedDistanceFromCamera:o,isOccluded:!1}}function be(e,t){return.5+e/t*.5}function we(e,t){return e.x>=-t[0]&&e.x<=t[0]&&e.y>=-t[1]&&e.y<=t[1]}function Te(e,r,n,i,a,o,s,l,c,u,h,f,p,d,m){let g=i?e.textSizeData:e.iconSizeData,y=t.ag(g,n.transform.zoom),v=[256/n.width*2+1,256/n.height*2+1],x=i?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;x.clear();let _=e.lineVertexArray,b=i?e.text.placedSymbolArray:e.icon.placedSymbolArray,w=n.transform.width/n.transform.height,T=!1;for(let i=0;iMath.abs(n.x-r.x)*i?{useVertical:!0}:(e===t.ah.vertical?r.yn.x)?{needsFlipping:!0}:null}function Me(e,r,n,i,a,o,s,l,c,u,h){let f,p=n/24,d=r.lineOffsetX*p,m=r.lineOffsetY*p;if(r.numGlyphs>1){let t=r.glyphStartIndex+r.numGlyphs,n=r.lineStartIndex,o=r.lineStartIndex+r.lineLength,c=ke(p,l,d,m,i,r,h,e);if(!c)return{notEnoughRoom:!0};let g=_e(c.first.point.x,c.first.point.y,s,e.getElevation).point,y=_e(c.last.point.x,c.last.point.y,s,e.getElevation).point;if(a&&!i){let e=Ae(r.writingMode,g,y,u);if(e)return e}f=[c.first];for(let a=r.glyphStartIndex+1;a0?s.point:Se(e.tileAnchorPoint,a,n,1,o,e),c=Ae(r.writingMode,n,l,u);if(c)return c}let n=Pe(p*l.getoffsetX(r.glyphStartIndex),d,m,i,r.segment,r.lineStartIndex,r.lineStartIndex+r.lineLength,e,h);if(!n||e.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};f=[n]}for(let e of f)t.aj(c,e.point,e.angle);return{}}function Se(e,t,r,n,i,a){let o=e.add(e.sub(t)._unit()),s=void 0!==i?_e(o.x,o.y,i,a.getElevation).point:Ce(o.x,o.y,a).point,l=r.sub(s);return r.add(l._mult(n/l.mag()))}function Ee(e,r,n){let i=r.projectionCache;if(i.projections[e])return i.projections[e];let a=new t.P(r.lineVertexArray.getx(e),r.lineVertexArray.gety(e)),o=Ce(a.x,a.y,r);if(o.signedDistanceFromCamera>0)return i.projections[e]=o.point,i.anyProjectionOccluded=i.anyProjectionOccluded||o.isOccluded,o.point;let s=e-n.direction;return Se(0===n.distanceFromAnchor?r.tileAnchorPoint:new t.P(r.lineVertexArray.getx(s),r.lineVertexArray.gety(s)),a,n.previousVertex,n.absOffsetX-n.distanceFromAnchor+1,void 0,r)}function Ce(e,t,r){let n,i=e+r.translation[0],a=t+r.translation[1];return!r.pitchWithMap&&r.projection.useSpecialProjectionForSymbols?(n=r.projection.projectTileCoordinates(i,a,r.unwrappedTileID,r.getElevation),n.point.x=(.5*n.point.x+.5)*r.width,n.point.y=(.5*-n.point.y+.5)*r.height):(n=_e(i,a,r.labelPlaneMatrix,r.getElevation),n.isOccluded=!1),n}function Ie(e,t,r){return e._unit()._perp()._mult(t*r)}function Le(e,r,n,i,a,o,s,l,c){if(l.projectionCache.offsets[e])return l.projectionCache.offsets[e];let u=n.add(r);if(e+c.direction=a)return l.projectionCache.offsets[e]=u,u;let h=Ee(e+c.direction,l,c),f=Ie(h.sub(n),s,c.direction),p=n.add(f),d=h.add(f);return l.projectionCache.offsets[e]=t.ak(o,u,p,d)||u,l.projectionCache.offsets[e]}function Pe(e,t,r,n,i,a,o,s,l){let c=n?e-t:e+t,u=c>0?1:-1,h=0;n&&(u*=-1,h=Math.PI),u<0&&(h+=Math.PI);let f,p=u>0?a+i:a+i+1;s.projectionCache.cachedAnchorPoint?f=s.projectionCache.cachedAnchorPoint:(f=Ce(s.tileAnchorPoint.x,s.tileAnchorPoint.y,s).point,s.projectionCache.cachedAnchorPoint=f);let d,m,g,y=f,v=f,x=0,_=0,b=Math.abs(c),w=[];for(;x+_<=b;){if(p+=u,p=o)return null;x+=_,v=y,m=d;let e={absOffsetX:b,direction:u,distanceFromAnchor:x,previousVertex:v};if(y=Ee(p,s,e),0===r)w.push(v),g=y.sub(v);else{let t,n=y.sub(v);t=0===n.mag()?Ie(Ee(p+u,s,e).sub(y),r,u):Ie(n,r,u),m||(m=v.add(t)),d=Le(p,t,y,a,o,m,r,s,e),w.push(m),g=d.sub(m)}_=g.mag()}let T=g._mult((b-x)/_)._add(m||v),k=h+Math.atan2(y.y-v.y,y.x-v.x);return w.push(T),{point:T,angle:l?k:0,path:w}}let ze=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function De(e,t){for(let r=0;r=1;e--)l.push(o.path[e]);for(let e=1;ee.signedDistanceFromCamera<=0))?[]:e.map((e=>e.point))}let m=[];if(l.length>0){let e=l[0].clone(),r=l[0].clone();for(let t=1;t=n.x&&r.x<=i.x&&e.y>=n.y&&r.y<=i.y?[l]:r.xi.x||r.yi.y?[]:t.al([l],n.x,n.y,i.x,i.y)}for(let t of m){a.reset(t,.25*r);let n=0;n=a.length<=.5*r?1:Math.ceil(a.paddedLength/h)+1;for(let t=0;t_e(e.x,e.y,r,t.getElevation)))}queryRenderedSymbols(e){if(0===e.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};let r=[],n=1/0,i=1/0,a=-1/0,o=-1/0;for(let s of e){let e=new t.P(s.x+Re,s.y+Re);n=Math.min(n,e.x),i=Math.min(i,e.y),a=Math.max(a,e.x),o=Math.max(o,e.y),r.push(e)}let s=this.grid.query(n,i,a,o).concat(this.ignoredGrid.query(n,i,a,o)),l={},c={};for(let e of s){let n=e.key;if(void 0===l[n.bucketInstanceId]&&(l[n.bucketInstanceId]={}),l[n.bucketInstanceId][n.featureIndex])continue;let i=[new t.P(e.x1,e.y1),new t.P(e.x2,e.y1),new t.P(e.x2,e.y2),new t.P(e.x1,e.y2)];t.am(r,i)&&(l[n.bucketInstanceId][n.featureIndex]=!0,void 0===c[n.bucketInstanceId]&&(c[n.bucketInstanceId]=[]),c[n.bucketInstanceId].push(n.featureIndex))}return c}insertCollisionBox(e,t,r,n,i,a){(r?this.ignoredGrid:this.grid).insert({bucketInstanceId:n,featureIndex:i,collisionGroupID:a,overlapMode:t},e[0],e[1],e[2],e[3])}insertCollisionCircles(e,t,r,n,i,a){let o=r?this.ignoredGrid:this.grid,s={bucketInstanceId:n,featureIndex:i,collisionGroupID:a,overlapMode:t};for(let t=0;t=this.screenRightBoundary||nthis.screenBottomBoundary}isInsideGrid(e,t,r,n){return r>=0&&e=0&&tthis.projectAndGetPerspectiveRatio(n,e.x,e.y,i,c)));k=e.some((e=>!e.isOccluded)),T=e.map((e=>e.point))}else k=!0;return{box:t.ao(T),allPointsOccluded:!k}}}function Be(e,r,n){return r*(t.X/(e.tileSize*Math.pow(2,n-e.tileID.overscaledZ)))}class je{constructor(e,t,r,n){this.opacity=e?Math.max(0,Math.min(1,e.opacity+(e.placed?t:-t))):n&&r?1:0,this.placed=r}isHidden(){return 0===this.opacity&&!this.placed}}class Ne{constructor(e,t,r,n,i){this.text=new je(e?e.text:null,t,r,i),this.icon=new je(e?e.icon:null,t,n,i)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Ue{constructor(e,t,r){this.text=e,this.icon=t,this.skipFade=r}}class Ve{constructor(){this.invProjMatrix=t.H(),this.viewportMatrix=t.H(),this.circles=[]}}class qe{constructor(e,t,r,n,i){this.bucketInstanceId=e,this.featureIndex=t,this.sourceLayerIndex=r,this.bucketIndex=n,this.tileID=i}}class He{constructor(e){this.crossSourceCollisions=e,this.maxGroupID=0,this.collisionGroups={}}get(e){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[e]){let t=++this.maxGroupID;this.collisionGroups[e]={ID:t,predicate:e=>e.collisionGroupID===t}}return this.collisionGroups[e]}}function Ge(e,r,n,i,a){let{horizontalAlign:o,verticalAlign:s}=t.au(e);return new t.P(-(o-.5)*r+i[0]*a,-(s-.5)*n+i[1]*a)}class We{constructor(e,t,r,n,i,a){this.transform=e.clone(),this.terrain=r,this.collisionIndex=new Fe(this.transform,t),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=n,this.retainedQueryData={},this.collisionGroups=new He(i),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=a,a&&(a.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(e){let t=this.terrain;return t?(r,n)=>t.getElevation(e,r,n):null}getBucketParts(e,r,n,i){let a=n.getBucket(r),o=n.latestFeatureIndex;if(!a||!o||r.id!==a.layerIds[0])return;let s=n.collisionBoxArray,l=a.layers[0].layout,c=a.layers[0].paint,u=Math.pow(2,this.transform.zoom-n.tileID.overscaledZ),h=n.tileSize/t.X,f=n.tileID.toUnwrapped(),p=this.transform.calculatePosMatrix(f),d="map"===l.get("text-pitch-alignment"),m="map"===l.get("text-rotation-alignment"),g=Be(n,1,this.transform.zoom),y=this.collisionIndex.mapProjection.translatePosition(this.transform,n,c.get("text-translate"),c.get("text-translate-anchor")),v=this.collisionIndex.mapProjection.translatePosition(this.transform,n,c.get("icon-translate"),c.get("icon-translate-anchor")),x=ve(p,d,m,this.transform,g),_=null;if(d){let e=xe(p,d,m,this.transform,g);_=t.L([],this.transform.labelPlaneMatrix,e)}this.retainedQueryData[a.bucketInstanceId]=new qe(a.bucketInstanceId,o,a.sourceLayerIndex,a.index,n.tileID);let b={bucket:a,layout:l,translationText:y,translationIcon:v,posMatrix:p,unwrappedTileID:f,textLabelPlaneMatrix:x,labelToScreenMatrix:_,scale:u,textPixelRatio:h,holdingForFade:n.holdingForFade(),collisionBoxArray:s,partiallyEvaluatedTextSize:t.ag(a.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(a.sourceID)};if(i)for(let t of a.sortKeyRanges){let{sortKey:r,symbolInstanceStart:n,symbolInstanceEnd:i}=t;e.push({sortKey:r,symbolInstanceStart:n,symbolInstanceEnd:i,parameters:b})}else e.push({symbolInstanceStart:0,symbolInstanceEnd:a.symbolInstances.length,parameters:b})}attemptAnchorPlacement(e,r,n,i,a,o,s,l,c,u,h,f,p,d,m,g,y,v,x){let _=t.aq[e.textAnchor],b=[e.textOffset0,e.textOffset1],w=Ge(_,n,i,b,a),T=this.collisionIndex.placeCollisionBox(r,f,l,c,u,s,o,g,h.predicate,x,w);if((!v||this.collisionIndex.placeCollisionBox(v,f,l,c,u,s,o,y,h.predicate,x,w).placeable)&&T.placeable){let e;if(this.prevPlacement&&this.prevPlacement.variableOffsets[p.crossTileID]&&this.prevPlacement.placements[p.crossTileID]&&this.prevPlacement.placements[p.crossTileID].text&&(e=this.prevPlacement.variableOffsets[p.crossTileID].anchor),0===p.crossTileID)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[p.crossTileID]={textOffset:b,width:n,height:i,anchor:_,textBoxScale:a,prevAnchor:e},this.markUsedJustification(d,_,p,m),d.allowVerticalPlacement&&(this.markUsedOrientation(d,m,p),this.placedOrientations[p.crossTileID]=m),{shift:w,placedGlyphBoxes:T}}}placeLayerBucketPart(e,r,n){let{bucket:i,layout:a,translationText:o,translationIcon:s,posMatrix:l,unwrappedTileID:c,textLabelPlaneMatrix:u,labelToScreenMatrix:h,textPixelRatio:f,holdingForFade:p,collisionBoxArray:d,partiallyEvaluatedTextSize:m,collisionGroup:g}=e.parameters,y=a.get("text-optional"),v=a.get("icon-optional"),x=t.ar(a,"text-overlap","text-allow-overlap"),_="always"===x,b=t.ar(a,"icon-overlap","icon-allow-overlap"),w="always"===b,T="map"===a.get("text-rotation-alignment"),k="map"===a.get("text-pitch-alignment"),A="none"!==a.get("icon-text-fit"),M="viewport-y"===a.get("symbol-z-order"),S=_&&(w||!i.hasIconData()||v),E=w&&(_||!i.hasTextData()||y);!i.collisionArrays&&d&&i.deserializeCollisionBoxes(d);let C=this._getTerrainElevationFunc(this.retainedQueryData[i.bucketInstanceId].tileID),I=(e,d,w)=>{var M,I;if(r[e.crossTileID])return;if(p)return void(this.placements[e.crossTileID]=new Ue(!1,!1,!1));let L=!1,P=!1,z=!0,D=null,O={box:null,placeable:!1,offscreen:null},R={box:null,placeable:!1,offscreen:null},F=null,B=null,j=null,N=0,U=0,V=0;d.textFeatureIndex?N=d.textFeatureIndex:e.useRuntimeCollisionCircles&&(N=e.featureIndex),d.verticalTextFeatureIndex&&(U=d.verticalTextFeatureIndex);let q=d.textBox;if(q){let r=r=>{let n=t.ah.horizontal;if(i.allowVerticalPlacement&&!r&&this.prevPlacement){let t=this.prevPlacement.placedOrientations[e.crossTileID];t&&(this.placedOrientations[e.crossTileID]=t,n=t,this.markUsedOrientation(i,n,e))}return n},a=(r,n)=>{if(i.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&d.verticalTextBox){for(let e of i.writingModes)if(e===t.ah.vertical?(O=n(),R=O):O=r(),O&&O.placeable)break}else O=r()},u=e.textAnchorOffsetStartIndex,h=e.textAnchorOffsetEndIndex;if(h===u){let n=(t,r)=>{let n=this.collisionIndex.placeCollisionBox(t,x,f,l,c,k,T,o,g.predicate,C);return n&&n.placeable&&(this.markUsedOrientation(i,r,e),this.placedOrientations[e.crossTileID]=r),n};a((()=>n(q,t.ah.horizontal)),(()=>{let r=d.verticalTextBox;return i.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&r?n(r,t.ah.vertical):{box:null,offscreen:null}})),r(O&&O.placeable)}else{let p=t.aq[null===(I=null===(M=this.prevPlacement)||void 0===M?void 0:M.variableOffsets[e.crossTileID])||void 0===I?void 0:I.anchor],m=(r,a,d)=>{let m=r.x2-r.x1,y=r.y2-r.y1,v=e.textBoxScale,_=A&&"never"===b?a:null,w=null,M="never"===x?1:2,S="never";p&&M++;for(let t=0;tm(q,d.iconBox,t.ah.horizontal)),(()=>{let r=d.verticalTextBox;return i.allowVerticalPlacement&&(!O||!O.placeable)&&e.numVerticalGlyphVertices>0&&r?m(r,d.verticalIconBox,t.ah.vertical):{box:null,occluded:!0,offscreen:null}})),O&&(L=O.placeable,z=O.offscreen);let y=r(O&&O.placeable);if(!L&&this.prevPlacement){let t=this.prevPlacement.variableOffsets[e.crossTileID];t&&(this.variableOffsets[e.crossTileID]=t,this.markUsedJustification(i,t.anchor,e,y))}}}if(F=O,L=F&&F.placeable,z=F&&F.offscreen,e.useRuntimeCollisionCircles){let r=i.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex),s=t.ai(i.textSizeData,m,r),f=a.get("text-padding");B=this.collisionIndex.placeCollisionCircles(x,r,i.lineVertexArray,i.glyphOffsetArray,s,l,c,u,h,n,k,g.predicate,e.collisionCircleDiameter,f,o,C),B.circles.length&&B.collisionDetected&&!n&&t.w("Collisions detected, but collision boxes are not shown"),L=_||B.circles.length>0&&!B.collisionDetected,z=z&&B.offscreen}if(d.iconFeatureIndex&&(V=d.iconFeatureIndex),d.iconBox){let e=e=>this.collisionIndex.placeCollisionBox(e,b,f,l,c,k,T,s,g.predicate,C,A&&D?D:void 0);R&&R.placeable&&d.verticalIconBox?(j=e(d.verticalIconBox),P=j.placeable):(j=e(d.iconBox),P=j.placeable),z=z&&j.offscreen}let H=y||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,G=v||0===e.numIconVertices;H||G?G?H||(P=P&&L):L=P&&L:P=L=P&&L;let W=P&&j.placeable;if(L&&F.placeable&&this.collisionIndex.insertCollisionBox(F.box,x,a.get("text-ignore-placement"),i.bucketInstanceId,R&&R.placeable&&U?U:N,g.ID),W&&this.collisionIndex.insertCollisionBox(j.box,b,a.get("icon-ignore-placement"),i.bucketInstanceId,V,g.ID),B&&L&&this.collisionIndex.insertCollisionCircles(B.circles,x,a.get("text-ignore-placement"),i.bucketInstanceId,N,g.ID),n&&this.storeCollisionData(i.bucketInstanceId,w,d,F,j,B),0===e.crossTileID)throw new Error("symbolInstance.crossTileID can't be 0");if(0===i.bucketInstanceId)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[e.crossTileID]=new Ue(L||S,P||E,z||i.justReloaded),r[e.crossTileID]=!0};if(M){if(0!==e.symbolInstanceStart)throw new Error("bucket.bucketInstanceId should be 0");let t=i.getSortedSymbolIndexes(this.transform.angle);for(let e=t.length-1;e>=0;--e){let r=t[e];I(i.symbolInstances.get(r),i.collisionArrays[r],r)}}else for(let t=e.symbolInstanceStart;t=0&&(e.text.placedSymbolArray.get(t).crossTileID=a>=0&&t!==a?0:n.crossTileID)}markUsedOrientation(e,r,n){let i=r===t.ah.horizontal||r===t.ah.horizontalOnly?r:0,a=r===t.ah.vertical?r:0,o=[n.leftJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.rightJustifiedTextSymbolIndex];for(let t of o)e.text.placedSymbolArray.get(t).placedOrientation=i;n.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(n.verticalPlacedTextSymbolIndex).placedOrientation=a)}commit(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;let t=this.prevPlacement,r=!1;this.prevZoomAdjustment=t?t.zoomAdjustment(this.transform.zoom):0;let n=t?t.symbolFadeChange(e):1,i=t?t.opacities:{},a=t?t.variableOffsets:{},o=t?t.placedOrientations:{};for(let e in this.placements){let t=this.placements[e],a=i[e];a?(this.opacities[e]=new Ne(a,n,t.text,t.icon),r=r||t.text!==a.text.placed||t.icon!==a.icon.placed):(this.opacities[e]=new Ne(null,n,t.text,t.icon,t.skipFade),r=r||t.text||t.icon)}for(let e in i){let t=i[e];if(!this.opacities[e]){let i=new Ne(t,n,!1,!1);i.isHidden()||(this.opacities[e]=i,r=r||t.text.placed||t.icon.placed)}}for(let e in a)this.variableOffsets[e]||!this.opacities[e]||this.opacities[e].isHidden()||(this.variableOffsets[e]=a[e]);for(let e in o)this.placedOrientations[e]||!this.opacities[e]||this.opacities[e].isHidden()||(this.placedOrientations[e]=o[e]);if(t&&void 0===t.lastPlacementChangeTime)throw new Error("Last placement time for previous placement is not defined");r?this.lastPlacementChangeTime=e:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)}updateLayerOpacities(e,t){let r={};for(let n of t){let t=n.getBucket(e);t&&n.latestFeatureIndex&&e.id===t.layerIds[0]&&this.updateBucketOpacities(t,n.tileID,r,n.collisionBoxArray)}}updateBucketOpacities(e,r,n,i){e.hasTextData()&&(e.text.opacityVertexArray.clear(),e.text.hasVisibleVertices=!1),e.hasIconData()&&(e.icon.opacityVertexArray.clear(),e.icon.hasVisibleVertices=!1),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexArray.clear(),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexArray.clear();let a=e.layers[0],o=a.layout,s=new Ne(null,0,!1,!1,!0),l=o.get("text-allow-overlap"),c=o.get("icon-allow-overlap"),u=a._unevaluatedLayout.hasValue("text-variable-anchor")||a._unevaluatedLayout.hasValue("text-variable-anchor-offset"),h="map"===o.get("text-rotation-alignment"),f="map"===o.get("text-pitch-alignment"),p="none"!==o.get("icon-text-fit"),d=new Ne(null,0,l&&(c||!e.hasIconData()||o.get("icon-optional")),c&&(l||!e.hasTextData()||o.get("text-optional")),!0);!e.collisionArrays&&i&&(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData())&&e.deserializeCollisionBoxes(i);let m=(e,t,r)=>{for(let n=0;n0,v=this.placedOrientations[i.crossTileID],x=v===t.ah.vertical,_=v===t.ah.horizontal||v===t.ah.horizontalOnly;if(a>0||o>0){let t=tt(c.text);m(e.text,a,x?rt:t),m(e.text,o,_?rt:t);let r=c.text.isHidden();[i.rightJustifiedTextSymbolIndex,i.centerJustifiedTextSymbolIndex,i.leftJustifiedTextSymbolIndex].forEach((t=>{t>=0&&(e.text.placedSymbolArray.get(t).hidden=r||x?1:0)})),i.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(i.verticalPlacedTextSymbolIndex).hidden=r||_?1:0);let n=this.variableOffsets[i.crossTileID];n&&this.markUsedJustification(e,n.anchor,i,v);let s=this.placedOrientations[i.crossTileID];s&&(this.markUsedJustification(e,"left",i,s),this.markUsedOrientation(e,s,i))}if(y){let t=tt(c.icon),r=!(p&&i.verticalPlacedIconSymbolIndex&&x);i.placedIconSymbolIndex>=0&&(m(e.icon,i.numIconVertices,r?t:rt),e.icon.placedSymbolArray.get(i.placedIconSymbolIndex).hidden=c.icon.isHidden()),i.verticalPlacedIconSymbolIndex>=0&&(m(e.icon,i.numVerticalIconVertices,r?rt:t),e.icon.placedSymbolArray.get(i.verticalPlacedIconSymbolIndex).hidden=c.icon.isHidden())}let b=g&&g.has(r)?g.get(r):{text:null,icon:null};if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){let n=e.collisionArrays[r];if(n){let r=new t.P(0,0);if(n.textBox||n.verticalTextBox){let t=!0;if(u){let e=this.variableOffsets[l];e?(r=Ge(e.anchor,e.width,e.height,e.textOffset,e.textBoxScale),h&&r._rotate(f?this.transform.angle:-this.transform.angle)):t=!1}if(n.textBox||n.verticalTextBox){let i;n.textBox&&(i=x),n.verticalTextBox&&(i=_),Ze(e.textCollisionBox.collisionVertexArray,c.text.placed,!t||i,b.text,r.x,r.y)}}if(n.iconBox||n.verticalIconBox){let t,i=!(_||!n.verticalIconBox);n.iconBox&&(t=i),n.verticalIconBox&&(t=!i),Ze(e.iconCollisionBox.collisionVertexArray,c.icon.placed,t,b.icon,p?r.x:0,p?r.y:0)}}}}if(e.sortFeatures(this.transform.angle),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexBuffer&&e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexBuffer&&e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray),e.text.opacityVertexArray.length!==e.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${e.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${e.text.layoutVertexArray.length}) / 4`);if(e.icon.opacityVertexArray.length!==e.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${e.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${e.icon.layoutVertexArray.length}) / 4`);if(e.bucketInstanceId in this.collisionCircleArrays){let t=this.collisionCircleArrays[e.bucketInstanceId];e.placementInvProjMatrix=t.invProjMatrix,e.placementViewportMatrix=t.viewportMatrix,e.collisionCircleArray=t.circles,delete this.collisionCircleArrays[e.bucketInstanceId]}}symbolFadeChange(e){return 0===this.fadeDuration?1:(e-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(e){return Math.max(0,(this.transform.zoom-e)/1.5)}hasTransitions(e){return this.stale||e-this.lastPlacementChangeTimee}setStale(){this.stale=!0}}function Ze(e,t,r,n,i,a){n&&0!==n.length||(n=[0,0,0,0]);let o=n[0]-Re,s=n[1]-Re,l=n[2]-Re,c=n[3]-Re;e.emplaceBack(t?1:0,r?1:0,i||0,a||0,o,s),e.emplaceBack(t?1:0,r?1:0,i||0,a||0,l,s),e.emplaceBack(t?1:0,r?1:0,i||0,a||0,l,c),e.emplaceBack(t?1:0,r?1:0,i||0,a||0,o,c)}let Ye=Math.pow(2,25),Xe=Math.pow(2,24),$e=Math.pow(2,17),Ke=Math.pow(2,16),Je=Math.pow(2,9),Qe=Math.pow(2,8),et=Math.pow(2,1);function tt(e){if(0===e.opacity&&!e.placed)return 0;if(1===e.opacity&&e.placed)return 4294967295;let t=e.placed?1:0,r=Math.floor(127*e.opacity);return r*Ye+t*Xe+r*$e+t*Ke+r*Je+t*Qe+r*et+t}let rt=0;function nt(){return{isOccluded:(e,t,r)=>!1,getPitchedTextCorrection:(e,t,r)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(e,t,r,n){throw new Error("Not implemented.")},translatePosition:(e,t,r,n)=>function(e,t,r,n,i=!1){if(!r[0]&&!r[1])return[0,0];let a=i?"map"===n?e.angle:0:"viewport"===n?-e.angle:0;if(a){let e=Math.sin(a),t=Math.cos(a);r=[r[0]*t-r[1]*e,r[0]*e+r[1]*t]}return[i?r[0]:Be(t,r[0],e.zoom),i?r[1]:Be(t,r[1],e.zoom)]}(e,t,r,n),getCircleRadiusCorrection:e=>1}}class it{constructor(e){this._sortAcrossTiles="viewport-y"!==e.layout.get("symbol-z-order")&&!e.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(e,t,r,n,i){let a=this._bucketParts;for(;this._currentTileIndexe.sortKey-t.sortKey)));this._currentPartIndex!this._forceFullPlacement&&a.now()-n>2;for(;this._currentPlacementIndex>=0;){let n=t[e[this._currentPlacementIndex]],a=this.placement.collisionIndex.transform.zoom;if("symbol"===n.type&&(!n.minzoom||n.minzoom<=a)&&(!n.maxzoom||n.maxzoom>a)){if(this._inProgressLayer||(this._inProgressLayer=new it(n)),this._inProgressLayer.continuePlacement(r[n.source],this.placement,this._showCollisionBoxes,n,i))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(e){return this.placement.commit(e),this.placement}}let ot=512/t.X/2;class st{constructor(e,r,n){this.tileID=e,this.bucketInstanceId=n,this._symbolsByKey={};let i=new Map;for(let e=0;e({x:Math.floor(e.anchorX*ot),y:Math.floor(e.anchorY*ot)}))),crossTileIDs:r.map((e=>e.crossTileID))};if(n.positions.length>128){let e=new t.av(n.positions.length,16,Uint16Array);for(let{x:t,y:r}of n.positions)e.add(t,r);e.finish(),delete n.positions,n.index=e}this._symbolsByKey[e]=n}}getScaledCoordinates(e,r){let{x:n,y:i,z:a}=this.tileID.canonical,{x:o,y:s,z:l}=r.canonical,c=ot/Math.pow(2,l-a),u=(s*t.X+e.anchorY)*c,h=i*t.X*ot;return{x:Math.floor((o*t.X+e.anchorX)*c-n*t.X*ot),y:Math.floor(u-h)}}findMatches(e,t,r){let n=this.tileID.canonical.ze))}}class lt{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class ct{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(e){let t=Math.round((e-this.lng)/360);if(0!==t)for(let e in this.indexes){let r=this.indexes[e],n={};for(let e in r){let i=r[e];i.tileID=i.tileID.unwrapTo(i.tileID.wrap+t),n[i.tileID.key]=i}this.indexes[e]=n}this.lng=e}addBucket(e,t,r){if(this.indexes[e.overscaledZ]&&this.indexes[e.overscaledZ][e.key]){if(this.indexes[e.overscaledZ][e.key].bucketInstanceId===t.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(e.overscaledZ,this.indexes[e.overscaledZ][e.key])}for(let e=0;ee.overscaledZ)for(let r in i){let a=i[r];a.tileID.isChildOf(e)&&a.findMatches(t.symbolInstances,e,n)}else{let a=i[e.scaledTo(Number(r)).key];a&&a.findMatches(t.symbolInstances,e,n)}}for(let e=0;e{t[e]=!0}));for(let e in this.layerIndexes)t[e]||delete this.layerIndexes[e]}}let ht=(e,r)=>t.t(e,r&&r.filter((e=>"source.canvas"!==e.identifier))),ft=t.aw();class pt extends t.E{constructor(e,r={}){super(),this._rtlPluginLoaded=()=>{for(let e in this.sourceCaches){let t=this.sourceCaches[e].getSource().type;"vector"!==t&&"geojson"!==t||this.sourceCaches[e].reload()}},this.map=e,this.dispatcher=new U(N(),e._getMapId()),this.dispatcher.registerMessageHandler("GG",((e,t)=>this.getGlyphs(e,t))),this.dispatcher.registerMessageHandler("GI",((e,t)=>this.getImages(e,t))),this.imageManager=new k,this.imageManager.setEventedParent(this),this.glyphManager=new C(e._requestManager,r.localIdeographFontFamily),this.lineAtlas=new D(256,512),this.crossTileSymbolIndex=new ut,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new t.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",t.ay()),le().on(ae,this._rtlPluginLoaded),this.on("data",(e=>{if("source"!==e.dataType||"metadata"!==e.sourceDataType)return;let t=this.sourceCaches[e.sourceId];if(!t)return;let r=t.getSource();if(r&&r.vectorLayerIds)for(let e in this._layers){let t=this._layers[e];t.source===r.id&&this._validateLayer(t)}}))}loadURL(e,r={},n){this.fire(new t.k("dataloading",{dataType:"style"})),r.validate="boolean"!=typeof r.validate||r.validate;let i=this.map._requestManager.transformRequest(e,"Style");this._loadStyleRequest=new AbortController;let a=this._loadStyleRequest;t.h(i,this._loadStyleRequest).then((e=>{this._loadStyleRequest=null,this._load(e.data,r,n)})).catch((e=>{this._loadStyleRequest=null,e&&!a.signal.aborted&&this.fire(new t.j(e))}))}loadJSON(e,r={},n){this.fire(new t.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,a.frameAsync(this._frameRequest).then((()=>{this._frameRequest=null,r.validate=!1!==r.validate,this._load(e,r,n)})).catch((()=>{}))}loadEmpty(){this.fire(new t.k("dataloading",{dataType:"style"})),this._load(ft,{validate:!1})}_load(e,r,n){var i;let a=r.transformStyle?r.transformStyle(n,e):e;if(!r.validate||!ht(this,t.u(a))){this._loaded=!0,this.stylesheet=a;for(let e in a.sources)this.addSource(e,a.sources[e],{validate:!1});a.sprite?this._loadSprite(a.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(a.glyphs),this._createLayers(),this.light=new L(this.stylesheet.light),this.sky=new z(this.stylesheet.sky),this.map.setTerrain(null!==(i=this.stylesheet.terrain)&&void 0!==i?i:null),this.fire(new t.k("data",{dataType:"style"})),this.fire(new t.k("style.load"))}}_createLayers(){let e=t.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",e),this._order=e.map((e=>e.id)),this._layers={},this._serializedLayers=null;for(let r of e){let e=t.aA(r);e.setEventedParent(this,{layer:{id:r.id}}),this._layers[r.id]=e}}_loadSprite(e,r=!1,n=void 0){let i;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(e,r,n,i){return t._(this,void 0,void 0,(function*(){let o=_(e),s=n>1?"@2x":"",l={},c={};for(let{id:e,url:n}of o){let a=r.transformRequest(b(n,s,".json"),"SpriteJSON");l[e]=t.h(a,i);let o=r.transformRequest(b(n,s,".png"),"SpriteImage");c[e]=p.getImage(o,i)}return yield Promise.all([...Object.values(l),...Object.values(c)]),function(e,r){return t._(this,void 0,void 0,(function*(){let t={};for(let n in e){t[n]={};let i=a.getImageCanvasContext((yield r[n]).data),o=(yield e[n]).data;for(let e in o){let{width:r,height:a,x:s,y:l,sdf:c,pixelRatio:u,stretchX:h,stretchY:f,content:p,textFitWidth:d,textFitHeight:m}=o[e];t[n][e]={data:null,pixelRatio:u,sdf:c,stretchX:h,stretchY:f,content:p,textFitWidth:d,textFitHeight:m,spriteData:{width:r,height:a,x:s,y:l,context:i}}}}return t}))}(l,c)}))}(e,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then((e=>{if(this._spriteRequest=null,e)for(let t in e){this._spritesImagesIds[t]=[];let n=this._spritesImagesIds[t]?this._spritesImagesIds[t].filter((t=>!(t in e))):[];for(let e of n)this.imageManager.removeImage(e),this._changedImages[e]=!0;for(let n in e[t]){let i="default"===t?n:`${t}:${n}`;this._spritesImagesIds[t].push(i),i in this.imageManager.images?this.imageManager.updateImage(i,e[t][n],!1):this.imageManager.addImage(i,e[t][n]),r&&(this._changedImages[i]=!0)}}})).catch((e=>{this._spriteRequest=null,i=e,this.fire(new t.j(i))})).finally((()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),r&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.k("data",{dataType:"style"})),n&&n(i)}))}_unloadSprite(){for(let e of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(e),this._changedImages[e]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.k("data",{dataType:"style"}))}_validateLayer(e){let r=this.sourceCaches[e.source];if(!r)return;let n=e.sourceLayer;if(!n)return;let i=r.getSource();("geojson"===i.type||i.vectorLayerIds&&-1===i.vectorLayerIds.indexOf(n))&&this.fire(new t.j(new Error(`Source layer "${n}" does not exist on source "${i.id}" as specified by style layer "${e.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let e in this.sourceCaches)if(!this.sourceCaches[e].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(e,r=!1){let n=this._serializedAllLayers();if(!e||0===e.length)return Object.values(r?t.aB(n):n);let i=[];for(let a of e)if(n[a]){let e=r?t.aB(n[a]):n[a];i.push(e)}return i}_serializedAllLayers(){let e=this._serializedLayers;if(e)return e;e=this._serializedLayers={};let t=Object.keys(this._layers);for(let r of t){let t=this._layers[r];"custom"!==t.type&&(e[r]=t.serialize())}return e}hasTransitions(){if(this.light&&this.light.hasTransition()||this.sky&&this.sky.hasTransition())return!0;for(let e in this.sourceCaches)if(this.sourceCaches[e].hasTransition())return!0;for(let e in this._layers)if(this._layers[e].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(e){if(!this._loaded)return;let r=this._changed;if(r){let t=Object.keys(this._updatedLayers),r=Object.keys(this._removedLayers);(t.length||r.length)&&this._updateWorkerLayers(t,r);for(let e in this._updatedSources){let t=this._updatedSources[e];if("reload"===t)this._reloadSource(e);else{if("clear"!==t)throw new Error(`Invalid action ${t}`);this._clearSource(e)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let t in this._updatedPaintProps)this._layers[t].updateTransitions(e);this.light.updateTransitions(e),this.sky.updateTransitions(e),this._resetUpdates()}let n={};for(let e in this.sourceCaches){let t=this.sourceCaches[e];n[e]=t.used,t.used=!1}for(let t of this._order){let r=this._layers[t];r.recalculate(e,this._availableImages),!r.isHidden(e.zoom)&&r.source&&(this.sourceCaches[r.source].used=!0)}for(let e in n){let r=this.sourceCaches[e];!!n[e]!=!!r.used&&r.fire(new t.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:e}))}this.light.recalculate(e),this.sky.recalculate(e),this.z=e.zoom,r&&this.fire(new t.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){let e=Object.keys(this._changedImages);if(e.length){for(let t in this.sourceCaches)this.sourceCaches[t].reloadTilesForDependencies(["icons","patterns"],e);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let e in this.sourceCaches)this.sourceCaches[e].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(e,t){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(e,!1),removedIds:t})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(e,r={}){var n;this._checkLoaded();let i=this.serialize();if(e=r.transformStyle?r.transformStyle(i,e):e,(null===(n=r.validate)||void 0===n||n)&&ht(this,t.u(e)))return!1;(e=t.aB(e)).layers=t.az(e.layers);let a=t.aC(i,e),o=this._getOperationsToPerform(a);if(o.unimplemented.length>0)throw new Error(`Unimplemented: ${o.unimplemented.join(", ")}.`);if(0===o.operations.length)return!1;for(let e of o.operations)e();return this.stylesheet=e,this._serializedLayers=null,!0}_getOperationsToPerform(e){let t=[],r=[];for(let n of e)switch(n.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":t.push((()=>this.addLayer.apply(this,n.args)));break;case"removeLayer":t.push((()=>this.removeLayer.apply(this,n.args)));break;case"setPaintProperty":t.push((()=>this.setPaintProperty.apply(this,n.args)));break;case"setLayoutProperty":t.push((()=>this.setLayoutProperty.apply(this,n.args)));break;case"setFilter":t.push((()=>this.setFilter.apply(this,n.args)));break;case"addSource":t.push((()=>this.addSource.apply(this,n.args)));break;case"removeSource":t.push((()=>this.removeSource.apply(this,n.args)));break;case"setLayerZoomRange":t.push((()=>this.setLayerZoomRange.apply(this,n.args)));break;case"setLight":t.push((()=>this.setLight.apply(this,n.args)));break;case"setGeoJSONSourceData":t.push((()=>this.setGeoJSONSourceData.apply(this,n.args)));break;case"setGlyphs":t.push((()=>this.setGlyphs.apply(this,n.args)));break;case"setSprite":t.push((()=>this.setSprite.apply(this,n.args)));break;case"setSky":t.push((()=>this.setSky.apply(this,n.args)));break;case"setTerrain":t.push((()=>this.map.setTerrain.apply(this,n.args)));break;case"setTransition":t.push((()=>{}));break;default:r.push(n.command)}return{operations:t,unimplemented:r}}addImage(e,r){if(this.getImage(e))return this.fire(new t.j(new Error(`An image named "${e}" already exists.`)));this.imageManager.addImage(e,r),this._afterImageUpdated(e)}updateImage(e,t){this.imageManager.updateImage(e,t)}getImage(e){return this.imageManager.getImage(e)}removeImage(e){if(!this.getImage(e))return this.fire(new t.j(new Error(`An image named "${e}" does not exist.`)));this.imageManager.removeImage(e),this._afterImageUpdated(e)}_afterImageUpdated(e){this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(e,r,n={}){if(this._checkLoaded(),void 0!==this.sourceCaches[e])throw new Error(`Source "${e}" already exists.`);if(!r.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(r).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(r.type)>=0&&this._validate(t.u.source,`sources.${e}`,r,null,n))return;this.map&&this.map._collectResourceTiming&&(r.collectResourceTiming=!0);let i=this.sourceCaches[e]=new fe(e,r,this.dispatcher);i.style=this,i.setEventedParent(this,(()=>({isSourceLoaded:i.loaded(),source:i.serialize(),sourceId:e}))),i.onAdd(this.map),this._changed=!0}removeSource(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error("There is no source with this ID");for(let r in this._layers)if(this._layers[r].source===e)return this.fire(new t.j(new Error(`Source "${e}" cannot be removed while layer "${r}" is using it.`)));let r=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],r.fire(new t.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),r.setEventedParent(null),r.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(e,t){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error(`There is no source with this ID=${e}`);let r=this.sourceCaches[e].getSource();if("geojson"!==r.type)throw new Error(`geojsonSource.type is ${r.type}, which is !== 'geojson`);r.setData(t),this._changed=!0}getSource(e){return this.sourceCaches[e]&&this.sourceCaches[e].getSource()}addLayer(e,r,n={}){this._checkLoaded();let i,a=e.id;if(this.getLayer(a))return void this.fire(new t.j(new Error(`Layer "${a}" already exists on this map.`)));if("custom"===e.type){if(ht(this,t.aD(e)))return;i=t.aA(e)}else{if("source"in e&&"object"==typeof e.source&&(this.addSource(a,e.source),e=t.aB(e),e=t.e(e,{source:a})),this._validate(t.u.layer,`layers.${a}`,e,{arrayIndex:-1},n))return;i=t.aA(e),this._validateLayer(i),i.setEventedParent(this,{layer:{id:a}})}let o=r?this._order.indexOf(r):this._order.length;if(r&&-1===o)this.fire(new t.j(new Error(`Cannot add layer "${a}" before non-existing layer "${r}".`)));else{if(this._order.splice(o,0,a),this._layerOrderChanged=!0,this._layers[a]=i,this._removedLayers[a]&&i.source&&"custom"!==i.type){let e=this._removedLayers[a];delete this._removedLayers[a],e.type!==i.type?this._updatedSources[i.source]="clear":(this._updatedSources[i.source]="reload",this.sourceCaches[i.source].pause())}this._updateLayer(i),i.onAdd&&i.onAdd(this.map)}}moveLayer(e,r){if(this._checkLoaded(),this._changed=!0,!this._layers[e])return void this.fire(new t.j(new Error(`The layer '${e}' does not exist in the map's style and cannot be moved.`)));if(e===r)return;let n=this._order.indexOf(e);this._order.splice(n,1);let i=r?this._order.indexOf(r):this._order.length;r&&-1===i?this.fire(new t.j(new Error(`Cannot move layer "${e}" before non-existing layer "${r}".`))):(this._order.splice(i,0,e),this._layerOrderChanged=!0)}removeLayer(e){this._checkLoaded();let r=this._layers[e];if(!r)return void this.fire(new t.j(new Error(`Cannot remove non-existing layer "${e}".`)));r.setEventedParent(null);let n=this._order.indexOf(e);this._order.splice(n,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=r,delete this._layers[e],this._serializedLayers&&delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],r.onRemove&&r.onRemove(this.map)}getLayer(e){return this._layers[e]}getLayersOrder(){return[...this._order]}hasLayer(e){return e in this._layers}setLayerZoomRange(e,r,n){this._checkLoaded();let i=this.getLayer(e);i?i.minzoom===r&&i.maxzoom===n||(null!=r&&(i.minzoom=r),null!=n&&(i.maxzoom=n),this._updateLayer(i)):this.fire(new t.j(new Error(`Cannot set the zoom range of non-existing layer "${e}".`)))}setFilter(e,r,n={}){this._checkLoaded();let i=this.getLayer(e);if(i){if(!t.aE(i.filter,r))return null==r?(i.filter=void 0,void this._updateLayer(i)):void(this._validate(t.u.filter,`layers.${i.id}.filter`,r,null,n)||(i.filter=t.aB(r),this._updateLayer(i)))}else this.fire(new t.j(new Error(`Cannot filter non-existing layer "${e}".`)))}getFilter(e){return t.aB(this.getLayer(e).filter)}setLayoutProperty(e,r,n,i={}){this._checkLoaded();let a=this.getLayer(e);a?t.aE(a.getLayoutProperty(r),n)||(a.setLayoutProperty(r,n,i),this._updateLayer(a)):this.fire(new t.j(new Error(`Cannot style non-existing layer "${e}".`)))}getLayoutProperty(e,r){let n=this.getLayer(e);if(n)return n.getLayoutProperty(r);this.fire(new t.j(new Error(`Cannot get style of non-existing layer "${e}".`)))}setPaintProperty(e,r,n,i={}){this._checkLoaded();let a=this.getLayer(e);a?t.aE(a.getPaintProperty(r),n)||(a.setPaintProperty(r,n,i)&&this._updateLayer(a),this._changed=!0,this._updatedPaintProps[e]=!0,this._serializedLayers=null):this.fire(new t.j(new Error(`Cannot style non-existing layer "${e}".`)))}getPaintProperty(e,t){return this.getLayer(e).getPaintProperty(t)}setFeatureState(e,r){this._checkLoaded();let n=e.source,i=e.sourceLayer,a=this.sourceCaches[n];if(void 0===a)return void this.fire(new t.j(new Error(`The source '${n}' does not exist in the map's style.`)));let o=a.getSource().type;"geojson"===o&&i?this.fire(new t.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==o||i?(void 0===e.id&&this.fire(new t.j(new Error("The feature id parameter must be provided."))),a.setFeatureState(i,e.id,r)):this.fire(new t.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(e,r){this._checkLoaded();let n=e.source,i=this.sourceCaches[n];if(void 0===i)return void this.fire(new t.j(new Error(`The source '${n}' does not exist in the map's style.`)));let a=i.getSource().type,o="vector"===a?e.sourceLayer:void 0;"vector"!==a||o?r&&"string"!=typeof e.id&&"number"!=typeof e.id?this.fire(new t.j(new Error("A feature id is required to remove its specific state property."))):i.removeFeatureState(o,e.id,r):this.fire(new t.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(e){this._checkLoaded();let r=e.source,n=e.sourceLayer,i=this.sourceCaches[r];if(void 0!==i)return"vector"!==i.getSource().type||n?(void 0===e.id&&this.fire(new t.j(new Error("The feature id parameter must be provided."))),i.getFeatureState(n,e.id)):void this.fire(new t.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new t.j(new Error(`The source '${r}' does not exist in the map's style.`)))}getTransition(){return t.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;let e=t.aF(this.sourceCaches,(e=>e.serialize())),r=this._serializeByIds(this._order,!0),n=this.map.getTerrain()||void 0,i=this.stylesheet;return t.aG({version:i.version,name:i.name,metadata:i.metadata,light:i.light,sky:i.sky,center:i.center,zoom:i.zoom,bearing:i.bearing,pitch:i.pitch,sprite:i.sprite,glyphs:i.glyphs,transition:i.transition,sources:e,layers:r,terrain:n},(e=>void 0!==e))}_updateLayer(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&"raster"!==this.sourceCaches[e.source].getSource().type&&(this._updatedSources[e.source]="reload",this.sourceCaches[e.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(e){let t=e=>"fill-extrusion"===this._layers[e].type,r={},n=[];for(let i=this._order.length-1;i>=0;i--){let a=this._order[i];if(t(a)){r[a]=i;for(let t of e){let e=t[a];if(e)for(let t of e)n.push(t)}}}n.sort(((e,t)=>t.intersectionZ-e.intersectionZ));let i=[];for(let a=this._order.length-1;a>=0;a--){let o=this._order[a];if(t(o))for(let e=n.length-1;e>=0;e--){let t=n[e].feature;if(r[t.layer.id]{let n=r.featureSortOrder;if(n){let r=n.indexOf(e.featureIndex);return n.indexOf(t.featureIndex)-r}return t.featureIndex-e.featureIndex}));for(let e of i)t.push(e)}}for(let t in s)s[t].forEach((n=>{let i=n.feature,a=r[e[t].source].getFeatureState(i.layer["source-layer"],i.id);i.source=i.layer.source,i.layer["source-layer"]&&(i.sourceLayer=i.layer["source-layer"]),i.state=a}));return s}(this._layers,o,this.sourceCaches,e,r,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(a)}querySourceFeatures(e,r){r&&r.filter&&this._validate(t.u.filter,"querySourceFeatures.filter",r.filter,null,r);let n=this.sourceCaches[e];return n?function(e,t){let r=e.getRenderableIds().map((t=>e.getTileByID(t))),n=[],i={};for(let e=0;ee.getTileByID(t))).sort(((e,t)=>t.tileID.overscaledZ-e.tileID.overscaledZ||(e.tileID.isLessThan(t.tileID)?-1:1)))}let n=this.crossTileSymbolIndex.addLayer(r,l[r.source],e.center.lng);o=o||n}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((i=i||this._layerOrderChanged||0===r)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(a.now(),e.zoom))&&(this.pauseablePlacement=new at(e,this.map.terrain,this._order,i,t,r,n,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,l),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(a.now()),s=!0),o&&this.pauseablePlacement.placement.setStale()),s||o)for(let e of this._order){let t=this._layers[e];"symbol"===t.type&&this.placement.updateLayerOpacities(t,l[t.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(a.now())}_releaseSymbolFadeTiles(){for(let e in this.sourceCaches)this.sourceCaches[e].releaseSymbolFadeTiles()}getImages(e,r){return t._(this,void 0,void 0,(function*(){let e=yield this.imageManager.getImages(r.icons);this._updateTilesForChangedImages();let t=this.sourceCaches[r.source];return t&&t.setDependencies(r.tileID.key,r.type,r.icons),e}))}getGlyphs(e,r){return t._(this,void 0,void 0,(function*(){let e=yield this.glyphManager.getGlyphs(r.stacks),t=this.sourceCaches[r.source];return t&&t.setDependencies(r.tileID.key,r.type,[""]),e}))}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(e,r={}){this._checkLoaded(),e&&this._validate(t.u.glyphs,"glyphs",e,null,r)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=e,this.glyphManager.entries={},this.glyphManager.setURL(e))}addSprite(e,r,n={},i){this._checkLoaded();let a=[{id:e,url:r}],o=[..._(this.stylesheet.sprite),...a];this._validate(t.u.sprite,"sprite",o,null,n)||(this.stylesheet.sprite=o,this._loadSprite(a,!0,i))}removeSprite(e){this._checkLoaded();let r=_(this.stylesheet.sprite);if(r.find((t=>t.id===e))){if(this._spritesImagesIds[e])for(let t of this._spritesImagesIds[e])this.imageManager.removeImage(t),this._changedImages[t]=!0;r.splice(r.findIndex((t=>t.id===e)),1),this.stylesheet.sprite=r.length>0?r:void 0,delete this._spritesImagesIds[e],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.k("data",{dataType:"style"}))}else this.fire(new t.j(new Error(`Sprite "${e}" doesn't exists on this map.`)))}getSprite(){return _(this.stylesheet.sprite)}setSprite(e,r={},n){this._checkLoaded(),e&&this._validate(t.u.sprite,"sprite",e,null,r)||(this.stylesheet.sprite=e,e?this._loadSprite(e,!0,n):(this._unloadSprite(),n&&n(null)))}}var dt=t.Y([{name:"a_pos",type:"Int16",components:2}]);let mt={prelude:gt("#ifdef GL_ES\nprecision mediump float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\n","#ifdef GL_ES\nprecision highp float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}\n#ifdef TERRAIN3D\nuniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth;\n#endif\nconst highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) {\n#ifdef TERRAIN3D\nhighp float d=unpack(texture2D(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0));\n#else\nreturn 1.0;\n#endif\n}float calculate_visibility(vec4 pos) {\n#ifdef TERRAIN3D\nvec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0;\n#else\nreturn 1.0;\n#endif\n}float ele(vec2 pos) {\n#ifdef TERRAIN3D\nvec4 rgb=(texture2D(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;\n#else\nreturn 0.0;\n#endif\n}float get_elevation(vec2 pos) {\n#ifdef TERRAIN3D\nvec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration;\n#else\nreturn 0.0;\n#endif\n}"),background:gt("uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:gt("uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:gt("varying vec3 v_data;varying float v_visibility;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;varying float v_visibility;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main(void) {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}"),clippingMask:gt("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:gt("uniform highp float u_intensity;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n#pragma mapbox: initialize highp float weight\nfloat d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\nconst highp float ZERO=1.0/255.0/16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n#pragma mapbox: initialize highp float weight\n#pragma mapbox: initialize mediump float radius\nvec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,get_elevation(floor(a_pos*0.5)),1);gl_Position=u_matrix*pos;}"),heatmapTexture:gt("uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(0.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:gt("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_anchor_pos;attribute vec2 a_placed;attribute vec2 a_box_real;uniform mat4 u_matrix;uniform vec2 u_pixel_extrude_scale;varying float v_placed;varying float v_notUsed;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:gt("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:gt("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}"),fill:gt("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_FragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);}"),fillOutline:gt("varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),fillOutlinePattern:gt("uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),fillPattern:gt("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}"),fillExtrusion:gt("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;\n#ifdef TERRAIN3D\nattribute vec2 a_centroid;\n#endif\nvarying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;\n#ifdef TERRAIN3D\nfloat height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);\n#else\nfloat height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;\n#endif\nbase=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}"),fillExtrusionPattern:gt("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;\n#ifdef TERRAIN3D\nattribute vec2 a_centroid;\n#endif\nvarying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;\n#ifdef TERRAIN3D\nfloat height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);\n#else\nfloat height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;\n#endif\nbase=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}"),hillshadePrepare:gt("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:gt("uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\n#define PI 3.141592653589793\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),line:gt("uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_width2=vec2(outset,inset);}"),lineGradient:gt("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_width2=vec2(outset,inset);}"),linePattern:gt("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}"),lineSDF:gt("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}"),raster:gt("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),symbolIcon:gt("uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_tex;varying float v_fade_opacity;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}"),symbolSDF:gt("#define SDF_PX 8.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_data0;varying vec3 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}"),symbolTextAndIcon:gt("#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec4 v_data0;varying vec4 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}"),terrain:gt("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;varying vec2 v_texture_pos;varying float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture2D(u_texture,v_texture_pos);if (v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);gl_FragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {gl_FragColor=surface_color;}}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform mat4 u_fog_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:gt("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:gt("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);}"),sky:gt("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform float u_horizon;uniform float u_sky_horizon_blend;void main() {float y=gl_FragCoord.y;if (y > u_horizon) {float blend=y-u_horizon;if (blend < u_sky_horizon_blend) {gl_FragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {gl_FragColor=u_sky_color;}}}","attribute vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function gt(e,t){let r=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,n=t.match(/attribute ([\w]+) ([\w]+)/g),i=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),a=t.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),o=a?a.concat(i):i,s={};return{fragmentSource:e=e.replace(r,((e,t,r,n,i)=>(s[i]=!0,"define"===t?`\n#ifndef HAS_UNIFORM_u_${i}\nvarying ${r} ${n} ${i};\n#else\nuniform ${r} ${n} u_${i};\n#endif\n`:`\n#ifdef HAS_UNIFORM_u_${i}\n ${r} ${n} ${i} = u_${i};\n#endif\n`))),vertexSource:t=t.replace(r,((e,t,r,n,i)=>{let a="float"===n?"vec2":"vec4",o=i.match(/color/)?"color":a;return s[i]?"define"===t?`\n#ifndef HAS_UNIFORM_u_${i}\nuniform lowp float u_${i}_t;\nattribute ${r} ${a} a_${i};\nvarying ${r} ${n} ${i};\n#else\nuniform ${r} ${n} u_${i};\n#endif\n`:"vec4"===o?`\n#ifndef HAS_UNIFORM_u_${i}\n ${i} = a_${i};\n#else\n ${r} ${n} ${i} = u_${i};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${i}\n ${i} = unpack_mix_${o}(a_${i}, u_${i}_t);\n#else\n ${r} ${n} ${i} = u_${i};\n#endif\n`:"define"===t?`\n#ifndef HAS_UNIFORM_u_${i}\nuniform lowp float u_${i}_t;\nattribute ${r} ${a} a_${i};\n#else\nuniform ${r} ${n} u_${i};\n#endif\n`:"vec4"===o?`\n#ifndef HAS_UNIFORM_u_${i}\n ${r} ${n} ${i} = a_${i};\n#else\n ${r} ${n} ${i} = u_${i};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${i}\n ${r} ${n} ${i} = unpack_mix_${o}(a_${i}, u_${i}_t);\n#else\n ${r} ${n} ${i} = u_${i};\n#endif\n`})),staticAttributes:n,staticUniforms:o}}class yt{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(e,t,r,n,i,a,o,s,l){this.context=e;let c=this.boundPaintVertexBuffers.length!==n.length;for(let e=0;!c&&e({u_matrix:e,u_texture:0,u_ele_delta:r,u_fog_matrix:n,u_fog_color:i?i.properties.get("fog-color"):t.aM.white,u_fog_ground_blend:i?i.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:i?i.calculateFogBlendOpacity(a):0,u_horizon_color:i?i.properties.get("horizon-color"):t.aM.white,u_horizon_fog_blend:i?i.properties.get("horizon-fog-blend"):1});function xt(e){let t=[];for(let r=0;r>16,s>>16],u_pixel_coord_lower:[65535&o,65535&s]}}let wt=(e,r,n,i)=>{let a=r.style.light,o=a.properties.get("position"),s=[o.x,o.y,o.z],l=(c=new t.A(9),t.A!=Float32Array&&(c[1]=0,c[2]=0,c[3]=0,c[5]=0,c[6]=0,c[7]=0),c[0]=1,c[4]=1,c[8]=1,c);var c;"viewport"===a.properties.get("anchor")&&function(e,t){var r=Math.sin(t),n=Math.cos(t);e[0]=n,e[1]=r,e[2]=0,e[3]=-r,e[4]=n,e[5]=0,e[6]=0,e[7]=0,e[8]=1}(l,-r.transform.angle),function(e,t,r){var n=t[0],i=t[1],a=t[2];e[0]=n*r[0]+i*r[3]+a*r[6],e[1]=n*r[1]+i*r[4]+a*r[7],e[2]=n*r[2]+i*r[5]+a*r[8]}(s,s,l);let u=a.properties.get("color");return{u_matrix:e,u_lightpos:s,u_lightintensity:a.properties.get("intensity"),u_lightcolor:[u.r,u.g,u.b],u_vertical_gradient:+n,u_opacity:i}},Tt=(e,r,n,i,a,o,s)=>t.e(wt(e,r,n,i),bt(o,r,s),{u_height_factor:-Math.pow(2,a.overscaledZ)/s.tileSize/8}),kt=e=>({u_matrix:e}),At=(e,r,n,i)=>t.e(kt(e),bt(n,r,i)),Mt=(e,t)=>({u_matrix:e,u_world:t}),St=(e,r,n,i,a)=>t.e(At(e,r,n,i),{u_world:a}),Et=(e,t,r,n)=>{let i,a,o=e.transform;if("map"===n.paint.get("circle-pitch-alignment")){let e=Be(r,1,o.zoom);i=!0,a=[e,e]}else i=!1,a=o.pixelsToGLUnits;return{u_camera_to_center_distance:o.cameraToCenterDistance,u_scale_with_map:+("map"===n.paint.get("circle-pitch-scale")),u_matrix:e.translatePosMatrix(t.posMatrix,r,n.paint.get("circle-translate"),n.paint.get("circle-translate-anchor")),u_pitch_with_map:+i,u_device_pixel_ratio:e.pixelRatio,u_extrude_scale:a}},Ct=(e,t,r)=>({u_matrix:e,u_inv_matrix:t,u_camera_to_center_distance:r.cameraToCenterDistance,u_viewport_size:[r.width,r.height]}),It=(e,t,r=1)=>({u_matrix:e,u_color:t,u_overlay:0,u_overlay_scale:r}),Lt=e=>({u_matrix:e}),Pt=(e,t,r,n)=>({u_matrix:e,u_extrude_scale:Be(t,1,r),u_intensity:n}),zt=(e,r,n,i)=>{let a=t.H();t.aP(a,0,e.width,e.height,0,0,1);let o=e.context.gl;return{u_matrix:a,u_world:[o.drawingBufferWidth,o.drawingBufferHeight],u_image:n,u_color_ramp:i,u_opacity:r.paint.get("heatmap-opacity")}};function Dt(e,r){let n=Math.pow(2,r.canonical.z),i=r.canonical.y;return[new t.Z(0,i/n).toLngLat().lat,new t.Z(0,(i+1)/n).toLngLat().lat]}let Ot=(e,t,r,n)=>{let i=e.transform;return{u_matrix:Nt(e,t,r,n),u_ratio:1/Be(t,1,i.zoom),u_device_pixel_ratio:e.pixelRatio,u_units_to_pixels:[1/i.pixelsToGLUnits[0],1/i.pixelsToGLUnits[1]]}},Rt=(e,r,n,i,a)=>t.e(Ot(e,r,n,a),{u_image:0,u_image_height:i}),Ft=(e,t,r,n,i)=>{let a=e.transform,o=jt(t,a);return{u_matrix:Nt(e,t,r,i),u_texsize:t.imageAtlasTexture.size,u_ratio:1/Be(t,1,a.zoom),u_device_pixel_ratio:e.pixelRatio,u_image:0,u_scale:[o,n.fromScale,n.toScale],u_fade:n.t,u_units_to_pixels:[1/a.pixelsToGLUnits[0],1/a.pixelsToGLUnits[1]]}},Bt=(e,r,n,i,a,o)=>{let s=e.lineAtlas,l=jt(r,e.transform),c="round"===n.layout.get("line-cap"),u=s.getDash(i.from,c),h=s.getDash(i.to,c),f=u.width*a.fromScale,p=h.width*a.toScale;return t.e(Ot(e,r,n,o),{u_patternscale_a:[l/f,-u.height/2],u_patternscale_b:[l/p,-h.height/2],u_sdfgamma:s.width/(256*Math.min(f,p)*e.pixelRatio)/2,u_image:0,u_tex_y_a:u.y,u_tex_y_b:h.y,u_mix:a.t})};function jt(e,t){return 1/Be(e,1,t.tileZoom)}function Nt(e,t,r,n){return e.translatePosMatrix(n?n.posMatrix:t.tileID.posMatrix,t,r.paint.get("line-translate"),r.paint.get("line-translate-anchor"))}let Ut=(e,t,r,n,i)=>{return{u_matrix:e,u_tl_parent:t,u_scale_parent:r,u_buffer_scale:1,u_fade_t:n.mix,u_opacity:n.opacity*i.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:i.paint.get("raster-brightness-min"),u_brightness_high:i.paint.get("raster-brightness-max"),u_saturation_factor:(o=i.paint.get("raster-saturation"),o>0?1-1/(1.001-o):-o),u_contrast_factor:(a=i.paint.get("raster-contrast"),a>0?1/(1-a):1+a),u_spin_weights:Vt(i.paint.get("raster-hue-rotate"))};var a,o};function Vt(e){e*=Math.PI/180;let t=Math.sin(e),r=Math.cos(e);return[(2*r+1)/3,(-Math.sqrt(3)*t-r+1)/3,(Math.sqrt(3)*t-r+1)/3]}let qt=(e,t,r,n,i,a,o,s,l,c,u,h,f,p)=>{let d=o.transform;return{u_is_size_zoom_constant:+("constant"===e||"source"===e),u_is_size_feature_constant:+("constant"===e||"camera"===e),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:d.cameraToCenterDistance,u_pitch:d.pitch/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:d.width/d.height,u_fade_change:o.options.fadeDuration?o.symbolFadeChange:1,u_matrix:s,u_label_plane_matrix:l,u_coord_matrix:c,u_is_text:+h,u_pitch_with_map:+n,u_is_along_line:i,u_is_variable_anchor:a,u_texsize:f,u_texture:0,u_translation:u,u_pitched_scale:p}},Ht=(e,r,n,i,a,o,s,l,c,u,h,f,p,d,m)=>{let g=s.transform;return t.e(qt(e,r,n,i,a,o,s,l,c,u,h,f,p,m),{u_gamma_scale:i?Math.cos(g._pitch)*g.cameraToCenterDistance:1,u_device_pixel_ratio:s.pixelRatio,u_is_halo:+d})},Gt=(e,r,n,i,a,o,s,l,c,u,h,f,p,d)=>t.e(Ht(e,r,n,i,a,o,s,l,c,u,h,!0,f,!0,d),{u_texsize_icon:p,u_texture_icon:1}),Wt=(e,t,r)=>({u_matrix:e,u_opacity:t,u_color:r}),Zt=(e,r,n,i,a,o)=>t.e(function(e,t,r,n){let i=r.imageManager.getPattern(e.from.toString()),a=r.imageManager.getPattern(e.to.toString()),{width:o,height:s}=r.imageManager.getPixelSize(),l=Math.pow(2,n.tileID.overscaledZ),c=n.tileSize*Math.pow(2,r.transform.tileZoom)/l,u=c*(n.tileID.canonical.x+n.tileID.wrap*l),h=c*n.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:i.tl,u_pattern_br_a:i.br,u_pattern_tl_b:a.tl,u_pattern_br_b:a.br,u_texsize:[o,s],u_mix:t.t,u_pattern_size_a:i.displaySize,u_pattern_size_b:a.displaySize,u_scale_a:t.fromScale,u_scale_b:t.toScale,u_tile_units_to_pixels:1/Be(n,1,r.transform.tileZoom),u_pixel_coord_upper:[u>>16,h>>16],u_pixel_coord_lower:[65535&u,65535&h]}}(i,o,n,a),{u_matrix:e,u_opacity:r}),Yt={fillExtrusion:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_lightpos:new t.aN(e,r.u_lightpos),u_lightintensity:new t.aI(e,r.u_lightintensity),u_lightcolor:new t.aN(e,r.u_lightcolor),u_vertical_gradient:new t.aI(e,r.u_vertical_gradient),u_opacity:new t.aI(e,r.u_opacity)}),fillExtrusionPattern:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_lightpos:new t.aN(e,r.u_lightpos),u_lightintensity:new t.aI(e,r.u_lightintensity),u_lightcolor:new t.aN(e,r.u_lightcolor),u_vertical_gradient:new t.aI(e,r.u_vertical_gradient),u_height_factor:new t.aI(e,r.u_height_factor),u_image:new t.aH(e,r.u_image),u_texsize:new t.aO(e,r.u_texsize),u_pixel_coord_upper:new t.aO(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(e,r.u_pixel_coord_lower),u_scale:new t.aN(e,r.u_scale),u_fade:new t.aI(e,r.u_fade),u_opacity:new t.aI(e,r.u_opacity)}),fill:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix)}),fillPattern:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_image:new t.aH(e,r.u_image),u_texsize:new t.aO(e,r.u_texsize),u_pixel_coord_upper:new t.aO(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(e,r.u_pixel_coord_lower),u_scale:new t.aN(e,r.u_scale),u_fade:new t.aI(e,r.u_fade)}),fillOutline:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_world:new t.aO(e,r.u_world)}),fillOutlinePattern:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_world:new t.aO(e,r.u_world),u_image:new t.aH(e,r.u_image),u_texsize:new t.aO(e,r.u_texsize),u_pixel_coord_upper:new t.aO(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(e,r.u_pixel_coord_lower),u_scale:new t.aN(e,r.u_scale),u_fade:new t.aI(e,r.u_fade)}),circle:(e,r)=>({u_camera_to_center_distance:new t.aI(e,r.u_camera_to_center_distance),u_scale_with_map:new t.aH(e,r.u_scale_with_map),u_pitch_with_map:new t.aH(e,r.u_pitch_with_map),u_extrude_scale:new t.aO(e,r.u_extrude_scale),u_device_pixel_ratio:new t.aI(e,r.u_device_pixel_ratio),u_matrix:new t.aJ(e,r.u_matrix)}),collisionBox:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_pixel_extrude_scale:new t.aO(e,r.u_pixel_extrude_scale)}),collisionCircle:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_inv_matrix:new t.aJ(e,r.u_inv_matrix),u_camera_to_center_distance:new t.aI(e,r.u_camera_to_center_distance),u_viewport_size:new t.aO(e,r.u_viewport_size)}),debug:(e,r)=>({u_color:new t.aL(e,r.u_color),u_matrix:new t.aJ(e,r.u_matrix),u_overlay:new t.aH(e,r.u_overlay),u_overlay_scale:new t.aI(e,r.u_overlay_scale)}),clippingMask:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix)}),heatmap:(e,r)=>({u_extrude_scale:new t.aI(e,r.u_extrude_scale),u_intensity:new t.aI(e,r.u_intensity),u_matrix:new t.aJ(e,r.u_matrix)}),heatmapTexture:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_world:new t.aO(e,r.u_world),u_image:new t.aH(e,r.u_image),u_color_ramp:new t.aH(e,r.u_color_ramp),u_opacity:new t.aI(e,r.u_opacity)}),hillshade:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_image:new t.aH(e,r.u_image),u_latrange:new t.aO(e,r.u_latrange),u_light:new t.aO(e,r.u_light),u_shadow:new t.aL(e,r.u_shadow),u_highlight:new t.aL(e,r.u_highlight),u_accent:new t.aL(e,r.u_accent)}),hillshadePrepare:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_image:new t.aH(e,r.u_image),u_dimension:new t.aO(e,r.u_dimension),u_zoom:new t.aI(e,r.u_zoom),u_unpack:new t.aK(e,r.u_unpack)}),line:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_ratio:new t.aI(e,r.u_ratio),u_device_pixel_ratio:new t.aI(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.aO(e,r.u_units_to_pixels)}),lineGradient:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_ratio:new t.aI(e,r.u_ratio),u_device_pixel_ratio:new t.aI(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.aO(e,r.u_units_to_pixels),u_image:new t.aH(e,r.u_image),u_image_height:new t.aI(e,r.u_image_height)}),linePattern:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_texsize:new t.aO(e,r.u_texsize),u_ratio:new t.aI(e,r.u_ratio),u_device_pixel_ratio:new t.aI(e,r.u_device_pixel_ratio),u_image:new t.aH(e,r.u_image),u_units_to_pixels:new t.aO(e,r.u_units_to_pixels),u_scale:new t.aN(e,r.u_scale),u_fade:new t.aI(e,r.u_fade)}),lineSDF:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_ratio:new t.aI(e,r.u_ratio),u_device_pixel_ratio:new t.aI(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.aO(e,r.u_units_to_pixels),u_patternscale_a:new t.aO(e,r.u_patternscale_a),u_patternscale_b:new t.aO(e,r.u_patternscale_b),u_sdfgamma:new t.aI(e,r.u_sdfgamma),u_image:new t.aH(e,r.u_image),u_tex_y_a:new t.aI(e,r.u_tex_y_a),u_tex_y_b:new t.aI(e,r.u_tex_y_b),u_mix:new t.aI(e,r.u_mix)}),raster:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_tl_parent:new t.aO(e,r.u_tl_parent),u_scale_parent:new t.aI(e,r.u_scale_parent),u_buffer_scale:new t.aI(e,r.u_buffer_scale),u_fade_t:new t.aI(e,r.u_fade_t),u_opacity:new t.aI(e,r.u_opacity),u_image0:new t.aH(e,r.u_image0),u_image1:new t.aH(e,r.u_image1),u_brightness_low:new t.aI(e,r.u_brightness_low),u_brightness_high:new t.aI(e,r.u_brightness_high),u_saturation_factor:new t.aI(e,r.u_saturation_factor),u_contrast_factor:new t.aI(e,r.u_contrast_factor),u_spin_weights:new t.aN(e,r.u_spin_weights)}),symbolIcon:(e,r)=>({u_is_size_zoom_constant:new t.aH(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(e,r.u_is_size_feature_constant),u_size_t:new t.aI(e,r.u_size_t),u_size:new t.aI(e,r.u_size),u_camera_to_center_distance:new t.aI(e,r.u_camera_to_center_distance),u_pitch:new t.aI(e,r.u_pitch),u_rotate_symbol:new t.aH(e,r.u_rotate_symbol),u_aspect_ratio:new t.aI(e,r.u_aspect_ratio),u_fade_change:new t.aI(e,r.u_fade_change),u_matrix:new t.aJ(e,r.u_matrix),u_label_plane_matrix:new t.aJ(e,r.u_label_plane_matrix),u_coord_matrix:new t.aJ(e,r.u_coord_matrix),u_is_text:new t.aH(e,r.u_is_text),u_pitch_with_map:new t.aH(e,r.u_pitch_with_map),u_is_along_line:new t.aH(e,r.u_is_along_line),u_is_variable_anchor:new t.aH(e,r.u_is_variable_anchor),u_texsize:new t.aO(e,r.u_texsize),u_texture:new t.aH(e,r.u_texture),u_translation:new t.aO(e,r.u_translation),u_pitched_scale:new t.aI(e,r.u_pitched_scale)}),symbolSDF:(e,r)=>({u_is_size_zoom_constant:new t.aH(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(e,r.u_is_size_feature_constant),u_size_t:new t.aI(e,r.u_size_t),u_size:new t.aI(e,r.u_size),u_camera_to_center_distance:new t.aI(e,r.u_camera_to_center_distance),u_pitch:new t.aI(e,r.u_pitch),u_rotate_symbol:new t.aH(e,r.u_rotate_symbol),u_aspect_ratio:new t.aI(e,r.u_aspect_ratio),u_fade_change:new t.aI(e,r.u_fade_change),u_matrix:new t.aJ(e,r.u_matrix),u_label_plane_matrix:new t.aJ(e,r.u_label_plane_matrix),u_coord_matrix:new t.aJ(e,r.u_coord_matrix),u_is_text:new t.aH(e,r.u_is_text),u_pitch_with_map:new t.aH(e,r.u_pitch_with_map),u_is_along_line:new t.aH(e,r.u_is_along_line),u_is_variable_anchor:new t.aH(e,r.u_is_variable_anchor),u_texsize:new t.aO(e,r.u_texsize),u_texture:new t.aH(e,r.u_texture),u_gamma_scale:new t.aI(e,r.u_gamma_scale),u_device_pixel_ratio:new t.aI(e,r.u_device_pixel_ratio),u_is_halo:new t.aH(e,r.u_is_halo),u_translation:new t.aO(e,r.u_translation),u_pitched_scale:new t.aI(e,r.u_pitched_scale)}),symbolTextAndIcon:(e,r)=>({u_is_size_zoom_constant:new t.aH(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(e,r.u_is_size_feature_constant),u_size_t:new t.aI(e,r.u_size_t),u_size:new t.aI(e,r.u_size),u_camera_to_center_distance:new t.aI(e,r.u_camera_to_center_distance),u_pitch:new t.aI(e,r.u_pitch),u_rotate_symbol:new t.aH(e,r.u_rotate_symbol),u_aspect_ratio:new t.aI(e,r.u_aspect_ratio),u_fade_change:new t.aI(e,r.u_fade_change),u_matrix:new t.aJ(e,r.u_matrix),u_label_plane_matrix:new t.aJ(e,r.u_label_plane_matrix),u_coord_matrix:new t.aJ(e,r.u_coord_matrix),u_is_text:new t.aH(e,r.u_is_text),u_pitch_with_map:new t.aH(e,r.u_pitch_with_map),u_is_along_line:new t.aH(e,r.u_is_along_line),u_is_variable_anchor:new t.aH(e,r.u_is_variable_anchor),u_texsize:new t.aO(e,r.u_texsize),u_texsize_icon:new t.aO(e,r.u_texsize_icon),u_texture:new t.aH(e,r.u_texture),u_texture_icon:new t.aH(e,r.u_texture_icon),u_gamma_scale:new t.aI(e,r.u_gamma_scale),u_device_pixel_ratio:new t.aI(e,r.u_device_pixel_ratio),u_is_halo:new t.aH(e,r.u_is_halo),u_translation:new t.aO(e,r.u_translation),u_pitched_scale:new t.aI(e,r.u_pitched_scale)}),background:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_opacity:new t.aI(e,r.u_opacity),u_color:new t.aL(e,r.u_color)}),backgroundPattern:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_opacity:new t.aI(e,r.u_opacity),u_image:new t.aH(e,r.u_image),u_pattern_tl_a:new t.aO(e,r.u_pattern_tl_a),u_pattern_br_a:new t.aO(e,r.u_pattern_br_a),u_pattern_tl_b:new t.aO(e,r.u_pattern_tl_b),u_pattern_br_b:new t.aO(e,r.u_pattern_br_b),u_texsize:new t.aO(e,r.u_texsize),u_mix:new t.aI(e,r.u_mix),u_pattern_size_a:new t.aO(e,r.u_pattern_size_a),u_pattern_size_b:new t.aO(e,r.u_pattern_size_b),u_scale_a:new t.aI(e,r.u_scale_a),u_scale_b:new t.aI(e,r.u_scale_b),u_pixel_coord_upper:new t.aO(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(e,r.u_pixel_coord_lower),u_tile_units_to_pixels:new t.aI(e,r.u_tile_units_to_pixels)}),terrain:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_texture:new t.aH(e,r.u_texture),u_ele_delta:new t.aI(e,r.u_ele_delta),u_fog_matrix:new t.aJ(e,r.u_fog_matrix),u_fog_color:new t.aL(e,r.u_fog_color),u_fog_ground_blend:new t.aI(e,r.u_fog_ground_blend),u_fog_ground_blend_opacity:new t.aI(e,r.u_fog_ground_blend_opacity),u_horizon_color:new t.aL(e,r.u_horizon_color),u_horizon_fog_blend:new t.aI(e,r.u_horizon_fog_blend)}),terrainDepth:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_ele_delta:new t.aI(e,r.u_ele_delta)}),terrainCoords:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_texture:new t.aH(e,r.u_texture),u_terrain_coords_id:new t.aI(e,r.u_terrain_coords_id),u_ele_delta:new t.aI(e,r.u_ele_delta)}),sky:(e,r)=>({u_sky_color:new t.aL(e,r.u_sky_color),u_horizon_color:new t.aL(e,r.u_horizon_color),u_horizon:new t.aI(e,r.u_horizon),u_sky_horizon_blend:new t.aI(e,r.u_sky_horizon_blend)})};class Xt{constructor(e,t,r){this.context=e;let n=e.gl;this.buffer=n.createBuffer(),this.dynamicDraw=!!r,this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),n.bufferData(n.ELEMENT_ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),this.dynamicDraw||delete t.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(e){let t=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let $t={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Kt{constructor(e,t,r,n){this.length=t.length,this.attributes=r,this.itemSize=t.bytesPerElement,this.dynamicDraw=n,this.context=e;let i=e.gl;this.buffer=i.createBuffer(),e.bindVertexBuffer.set(this.buffer),i.bufferData(i.ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||delete t.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(e){if(e.length!==this.length)throw new Error(`Length of new data is ${e.length}, which doesn't match current length of ${this.length}`);let t=this.context.gl;this.bind(),t.bufferSubData(t.ARRAY_BUFFER,0,e.arrayBuffer)}enableAttributes(e,t){for(let r=0;r0){let r=t.H();t.aQ(r,m.placementInvProjMatrix,e.transform.glCoordMatrix),t.aQ(r,r,m.placementViewportMatrix),c.push({circleArray:y,circleOffset:h,transform:d.posMatrix,invTransform:r,coord:d}),u+=y.length/4,h=u}g&&l.draw(o,s.LINES,jr.disabled,Vr.disabled,e.colorModeForRenderPass(),qr.disabled,{u_matrix:d.posMatrix,u_pixel_extrude_scale:[1/(f=e.transform).width,1/f.height]},e.style.map.terrain&&e.style.map.terrain.getTerrainData(d),n.id,g.layoutVertexBuffer,g.indexBuffer,g.segments,null,e.transform.zoom,null,null,g.collisionVertexBuffer)}var f;if(!a||!c.length)return;let p=e.useProgram("collisionCircle"),d=new t.aR;d.resize(4*u),d._trim();let m=0;for(let e of c)for(let t=0;t=0&&(v[x.associatedIconIndex]={shiftedAnchor:I,angle:L})}else De(x.numGlyphs,g)}if(u){y.clear();let r=e.icon.placedSymbolArray;for(let e=0;ee.style.map.terrain.getElevation(l,t,r):null,r="map"===n.layout.get("text-rotation-alignment");Te(c,l.posMatrix,e,a,N,V,v,u,r,g,l.toUnwrapped(),m.width,m.height,q,t)}let W,Z=l.posMatrix,Y=a&&A||G,X=x||Y?Gr:N,$=U,K=I&&0!==n.paint.get(a?"text-halo-width":"icon-halo-width").constantOr(1);W=I?c.iconsInText?Gt(L.kind,D,_,v,x,Y,e,Z,X,$,q,f,R,S):Ht(L.kind,D,_,v,x,Y,e,Z,X,$,q,a,f,!0,S):qt(L.kind,D,_,v,x,Y,e,Z,X,$,q,a,f,S);let J={program:z,buffers:h,uniformValues:W,atlasTexture:p,atlasTextureIcon:F,atlasInterpolation:k,atlasInterpolationIcon:E,isSDF:I,hasHalo:K};if(w&&c.canOverlap){T=!0;let e=h.segments.get();for(let r of e)M.push({segments:new t.a0([r]),sortKey:r.sortKey,state:J,terrainData:O})}else M.push({segments:h.segments,sortKey:0,state:J,terrainData:O})}T&&M.sort(((e,t)=>e.sortKey-t.sortKey));for(let t of M){let r=t.state;if(p.activeTexture.set(d.TEXTURE0),r.atlasTexture.bind(r.atlasInterpolation,d.CLAMP_TO_EDGE),r.atlasTextureIcon&&(p.activeTexture.set(d.TEXTURE1),r.atlasTextureIcon&&r.atlasTextureIcon.bind(r.atlasInterpolationIcon,d.CLAMP_TO_EDGE)),r.isSDF){let i=r.uniformValues;r.hasHalo&&(i.u_is_halo=1,Kr(r.buffers,t.segments,n,e,r.program,k,h,f,i,t.terrainData)),i.u_is_halo=0}Kr(r.buffers,t.segments,n,e,r.program,k,h,f,r.uniformValues,t.terrainData)}}function Kr(e,t,r,n,i,a,o,s,l,c){let u=n.context;i.draw(u,u.gl.TRIANGLES,a,o,s,qr.disabled,l,c,r.id,e.layoutVertexBuffer,e.indexBuffer,t,r.paint,n.transform.zoom,e.programConfigurations.get(r.id),e.dynamicLayoutVertexBuffer,e.opacityVertexBuffer)}function Jr(e,r,n,i){let a=e.context,o=a.gl,s=Vr.disabled,l=new Fr([o.ONE,o.ONE],t.aM.transparent,[!0,!0,!0,!0]),c=r.getBucket(n);if(!c)return;let u=i.key,h=n.heatmapFbos.get(u);h||(h=en(a,r.tileSize,r.tileSize),n.heatmapFbos.set(u,h)),a.bindFramebuffer.set(h.framebuffer),a.viewport.set([0,0,r.tileSize,r.tileSize]),a.clear({color:t.aM.transparent});let f=c.programConfigurations.get(n.id),p=e.useProgram("heatmap",f),d=e.style.map.terrain.getTerrainData(i);p.draw(a,o.TRIANGLES,jr.disabled,s,l,qr.disabled,Pt(i.posMatrix,r,e.transform.zoom,n.paint.get("heatmap-intensity")),d,n.id,c.layoutVertexBuffer,c.indexBuffer,c.segments,n.paint,e.transform.zoom,f)}function Qr(e,t,r){let n=e.context,i=n.gl;n.setColorMode(e.colorModeForRenderPass());let a=tn(n,t),o=r.key,s=t.heatmapFbos.get(o);s&&(n.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,s.colorAttachment.get()),n.activeTexture.set(i.TEXTURE1),a.bind(i.LINEAR,i.CLAMP_TO_EDGE),e.useProgram("heatmapTexture").draw(n,i.TRIANGLES,jr.disabled,Vr.disabled,e.colorModeForRenderPass(),qr.disabled,zt(e,t,0,1),null,t.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments,t.paint,e.transform.zoom),s.destroy(),t.heatmapFbos.delete(o))}function en(e,t,r){var n,i;let a=e.gl,o=a.createTexture();a.bindTexture(a.TEXTURE_2D,o),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR);let s=null!==(n=e.HALF_FLOAT)&&void 0!==n?n:a.UNSIGNED_BYTE,l=null!==(i=e.RGBA16F)&&void 0!==i?i:a.RGBA;a.texImage2D(a.TEXTURE_2D,0,l,t,r,0,a.RGBA,s,null);let c=e.createFramebuffer(t,r,!1,!1);return c.colorAttachment.set(o),c}function tn(e,t){return t.colorRampTexture||(t.colorRampTexture=new w(e,t.colorRamp,e.gl.RGBA)),t.colorRampTexture}function rn(e,t,r,n,i){if(!r||!n||!n.imageAtlas)return;let a=n.imageAtlas.patternPositions,o=a[r.to.toString()],s=a[r.from.toString()];if(!o&&s&&(o=s),!s&&o&&(s=o),!o||!s){let e=i.getPaintProperty(t);o=a[e],s=a[e]}o&&s&&e.setConstantPatternPositions(o,s)}function nn(e,t,r,n,i,a,o){let s,l,c,u,h,f=e.context.gl,p="fill-pattern",d=r.paint.get(p),m=d&&d.constantOr(1),g=r.getCrossfadeParameters();o?(l=m&&!r.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",s=f.LINES):(l=m?"fillPattern":"fill",s=f.TRIANGLES);let y=d.constantOr(null);for(let d of n){let n=t.getTile(d);if(m&&!n.patternsLoaded())continue;let v=n.getBucket(r);if(!v)continue;let x=v.programConfigurations.get(r.id),_=e.useProgram(l,x),b=e.style.map.terrain&&e.style.map.terrain.getTerrainData(d);m&&(e.context.activeTexture.set(f.TEXTURE0),n.imageAtlasTexture.bind(f.LINEAR,f.CLAMP_TO_EDGE),x.updatePaintBuffers(g)),rn(x,p,y,n,r);let w=b?d:null,T=e.translatePosMatrix(w?w.posMatrix:d.posMatrix,n,r.paint.get("fill-translate"),r.paint.get("fill-translate-anchor"));if(o){u=v.indexBuffer2,h=v.segments2;let t=[f.drawingBufferWidth,f.drawingBufferHeight];c="fillOutlinePattern"===l&&m?St(T,e,g,n,t):Mt(T,t)}else u=v.indexBuffer,h=v.segments,c=m?At(T,e,g,n):kt(T);_.draw(e.context,s,i,e.stencilModeForClipping(d),a,qr.disabled,c,b,r.id,v.layoutVertexBuffer,u,h,r.paint,e.transform.zoom,x)}}function an(e,t,r,n,i,a,o){let s=e.context,l=s.gl,c="fill-extrusion-pattern",u=r.paint.get(c),h=u.constantOr(1),f=r.getCrossfadeParameters(),p=r.paint.get("fill-extrusion-opacity"),d=u.constantOr(null);for(let u of n){let n=t.getTile(u),m=n.getBucket(r);if(!m)continue;let g=e.style.map.terrain&&e.style.map.terrain.getTerrainData(u),y=m.programConfigurations.get(r.id),v=e.useProgram(h?"fillExtrusionPattern":"fillExtrusion",y);h&&(e.context.activeTexture.set(l.TEXTURE0),n.imageAtlasTexture.bind(l.LINEAR,l.CLAMP_TO_EDGE),y.updatePaintBuffers(f)),rn(y,c,d,n,r);let x=e.translatePosMatrix(u.posMatrix,n,r.paint.get("fill-extrusion-translate"),r.paint.get("fill-extrusion-translate-anchor")),_=r.paint.get("fill-extrusion-vertical-gradient"),b=h?Tt(x,e,_,p,u,f,n):wt(x,e,_,p);v.draw(s,s.gl.TRIANGLES,i,a,o,qr.backCCW,b,g,r.id,m.layoutVertexBuffer,m.indexBuffer,m.segments,r.paint,e.transform.zoom,y,e.style.map.terrain&&m.centroidVertexBuffer)}}function on(e,t,r,n,i,a,o){let s=e.context,l=s.gl,c=r.fbo;if(!c)return;let u=e.useProgram("hillshade"),h=e.style.map.terrain&&e.style.map.terrain.getTerrainData(t);s.activeTexture.set(l.TEXTURE0),l.bindTexture(l.TEXTURE_2D,c.colorAttachment.get()),u.draw(s,l.TRIANGLES,i,a,o,qr.disabled,((e,t,r,n)=>{let i=r.paint.get("hillshade-shadow-color"),a=r.paint.get("hillshade-highlight-color"),o=r.paint.get("hillshade-accent-color"),s=r.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===r.paint.get("hillshade-illumination-anchor")&&(s-=e.transform.angle);let l=!e.options.moving;return{u_matrix:n?n.posMatrix:e.transform.calculatePosMatrix(t.tileID.toUnwrapped(),l),u_image:0,u_latrange:Dt(0,t.tileID),u_light:[r.paint.get("hillshade-exaggeration"),s],u_shadow:i,u_highlight:a,u_accent:o}})(e,r,n,h?t:null),h,n.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments)}function sn(e,r,n,i,a,o){let s=e.context,l=s.gl,c=r.dem;if(c&&c.data){let u=c.dim,h=c.stride,f=c.getPixels();if(s.activeTexture.set(l.TEXTURE1),s.pixelStoreUnpackPremultiplyAlpha.set(!1),r.demTexture=r.demTexture||e.getTileTexture(h),r.demTexture){let e=r.demTexture;e.update(f,{premultiply:!1}),e.bind(l.NEAREST,l.CLAMP_TO_EDGE)}else r.demTexture=new w(s,f,l.RGBA,{premultiply:!1}),r.demTexture.bind(l.NEAREST,l.CLAMP_TO_EDGE);s.activeTexture.set(l.TEXTURE0);let p=r.fbo;if(!p){let e=new w(s,{width:u,height:u,data:null},l.RGBA);e.bind(l.LINEAR,l.CLAMP_TO_EDGE),p=r.fbo=s.createFramebuffer(u,u,!0,!1),p.colorAttachment.set(e.texture)}s.bindFramebuffer.set(p.framebuffer),s.viewport.set([0,0,u,u]),e.useProgram("hillshadePrepare").draw(s,l.TRIANGLES,i,a,o,qr.disabled,((e,r)=>{let n=r.stride,i=t.H();return t.aP(i,0,t.X,-t.X,0,0,1),t.J(i,i,[0,-t.X,0]),{u_matrix:i,u_image:1,u_dimension:[n,n],u_zoom:e.overscaledZ,u_unpack:r.getUnpackVector()}})(r.tileID,c),null,n.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments),r.needsHillshadePrepare=!1}}function ln(e,r,n,i,o,s){let l=i.paint.get("raster-fade-duration");if(!s&&l>0){let i=a.now(),s=(i-e.timeAdded)/l,c=r?(i-r.timeAdded)/l:-1,u=n.getSource(),h=o.coveringZoomLevel({tileSize:u.tileSize,roundZoom:u.roundZoom}),f=!r||Math.abs(r.tileID.overscaledZ-h)>Math.abs(e.tileID.overscaledZ-h),p=f&&e.refreshedUponExpiration?1:t.ac(f?s:1-c,0,1);return e.refreshedUponExpiration&&s>=1&&(e.refreshedUponExpiration=!1),r?{opacity:1,mix:1-p}:{opacity:p,mix:0}}return{opacity:1,mix:0}}let cn=new t.aM(1,0,0,1),un=new t.aM(0,1,0,1),hn=new t.aM(0,0,1,1),fn=new t.aM(1,0,1,1),pn=new t.aM(0,1,1,1);function dn(e,t,r,n){gn(e,0,t+r/2,e.transform.width,r,n)}function mn(e,t,r,n){gn(e,t-r/2,0,r,e.transform.height,n)}function gn(e,t,r,n,i,a){let o=e.context,s=o.gl;s.enable(s.SCISSOR_TEST),s.scissor(t*e.pixelRatio,r*e.pixelRatio,n*e.pixelRatio,i*e.pixelRatio),o.clear({color:a}),s.disable(s.SCISSOR_TEST)}function yn(e,r,n){let i=e.context,a=i.gl,o=n.posMatrix,s=e.useProgram("debug"),l=jr.disabled,c=Vr.disabled,u=e.colorModeForRenderPass(),h="$debug",f=e.style.map.terrain&&e.style.map.terrain.getTerrainData(n);i.activeTexture.set(a.TEXTURE0);let p=r.getTileByID(n.key).latestRawTileData,d=Math.floor((p&&p.byteLength||0)/1024),m=r.getTile(n).tileSize,g=512/Math.min(m,512)*(n.overscaledZ/e.transform.zoom)*.5,y=n.canonical.toString();n.overscaledZ!==n.canonical.z&&(y+=` => ${n.overscaledZ}`),function(e,t){e.initDebugOverlayCanvas();let r=e.debugOverlayCanvas,n=e.context.gl,i=e.debugOverlayCanvas.getContext("2d");i.clearRect(0,0,r.width,r.height),i.shadowColor="white",i.shadowBlur=2,i.lineWidth=1.5,i.strokeStyle="white",i.textBaseline="top",i.font="bold 36px Open Sans, sans-serif",i.fillText(t,5,5),i.strokeText(t,5,5),e.debugOverlayTexture.update(r),e.debugOverlayTexture.bind(n.LINEAR,n.CLAMP_TO_EDGE)}(e,`${y} ${d}kB`),s.draw(i,a.TRIANGLES,l,c,Fr.alphaBlended,qr.disabled,It(o,t.aM.transparent,g),null,h,e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments),s.draw(i,a.LINE_STRIP,l,c,u,qr.disabled,It(o,t.aM.red),f,h,e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments)}function vn(e,t,r){let n=e.context,i=n.gl,a=e.colorModeForRenderPass(),o=new jr(i.LEQUAL,jr.ReadWrite,e.depthRangeFor3D),s=e.useProgram("terrain"),l=t.getTerrainMesh();n.bindFramebuffer.set(null),n.viewport.set([0,0,e.width,e.height]);for(let c of r){let r=e.renderToTexture.getTexture(c),u=t.getTerrainData(c.tileID);n.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,r.texture);let h=e.transform.calculatePosMatrix(c.tileID.toUnwrapped()),f=t.getMeshFrameDelta(e.transform.zoom),p=e.transform.calculateFogMatrix(c.tileID.toUnwrapped()),d=vt(h,f,p,e.style.sky,e.transform.pitch);s.draw(n,i.TRIANGLES,o,Vr.disabled,a,qr.backCCW,d,u,"terrain",l.vertexBuffer,l.indexBuffer,l.segments)}}class xn{constructor(e,t,r){this.vertexBuffer=e,this.indexBuffer=t,this.segments=r}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class _n{constructor(e,r){this.context=new Br(e),this.transform=r,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:t.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=fe.maxUnderzooming+fe.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new ut}resize(e,t,r){if(this.width=Math.floor(e*r),this.height=Math.floor(t*r),this.pixelRatio=r,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let e of this.style._order)this.style._layers[e].resize()}setup(){let e=this.context,r=new t.aX;r.emplaceBack(0,0),r.emplaceBack(t.X,0),r.emplaceBack(0,t.X),r.emplaceBack(t.X,t.X),this.tileExtentBuffer=e.createVertexBuffer(r,dt.members),this.tileExtentSegments=t.a0.simpleSegment(0,0,4,2);let n=new t.aX;n.emplaceBack(0,0),n.emplaceBack(t.X,0),n.emplaceBack(0,t.X),n.emplaceBack(t.X,t.X),this.debugBuffer=e.createVertexBuffer(n,dt.members),this.debugSegments=t.a0.simpleSegment(0,0,4,5);let i=new t.$;i.emplaceBack(0,0,0,0),i.emplaceBack(t.X,0,t.X,0),i.emplaceBack(0,t.X,0,t.X),i.emplaceBack(t.X,t.X,t.X,t.X),this.rasterBoundsBuffer=e.createVertexBuffer(i,Q.members),this.rasterBoundsSegments=t.a0.simpleSegment(0,0,4,2);let a=new t.aX;a.emplaceBack(0,0),a.emplaceBack(1,0),a.emplaceBack(0,1),a.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(a,dt.members),this.viewportSegments=t.a0.simpleSegment(0,0,4,2);let o=new t.aZ;o.emplaceBack(0),o.emplaceBack(1),o.emplaceBack(3),o.emplaceBack(2),o.emplaceBack(0),this.tileBorderIndexBuffer=e.createIndexBuffer(o);let s=new t.aY;s.emplaceBack(0,1,2),s.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(s);let l=this.context.gl;this.stencilClearMode=new Vr({func:l.ALWAYS,mask:0},0,255,l.ZERO,l.ZERO,l.ZERO)}clearStencil(){let e=this.context,r=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let n=t.H();t.aP(n,0,this.width,this.height,0,0,1),t.K(n,n,[r.drawingBufferWidth,r.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(e,r.TRIANGLES,jr.disabled,this.stencilClearMode,Fr.disabled,qr.disabled,Lt(n),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(e,t){if(this.currentStencilSource===e.source||!e.isTileClipped()||!t||!t.length)return;this.currentStencilSource=e.source;let r=this.context,n=r.gl;this.nextStencilID+t.length>256&&this.clearStencil(),r.setColorMode(Fr.disabled),r.setDepthMode(jr.disabled);let i=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(let e of t){let t=this._tileClippingMaskIDs[e.key]=this.nextStencilID++,a=this.style.map.terrain&&this.style.map.terrain.getTerrainData(e);i.draw(r,n.TRIANGLES,jr.disabled,new Vr({func:n.ALWAYS,mask:0},t,255,n.KEEP,n.KEEP,n.REPLACE),Fr.disabled,qr.disabled,Lt(e.posMatrix),a,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let e=this.nextStencilID++,t=this.context.gl;return new Vr({func:t.NOTEQUAL,mask:255},e,255,t.KEEP,t.KEEP,t.REPLACE)}stencilModeForClipping(e){let t=this.context.gl;return new Vr({func:t.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,t.KEEP,t.KEEP,t.REPLACE)}stencilConfigForOverlap(e){let t=this.context.gl,r=e.sort(((e,t)=>t.overscaledZ-e.overscaledZ)),n=r[r.length-1].overscaledZ,i=r[0].overscaledZ-n+1;if(i>1){this.currentStencilSource=void 0,this.nextStencilID+i>256&&this.clearStencil();let e={};for(let r=0;r=0;this.currentLayer--){let e=this.style._layers[n[this.currentLayer]],t=i[e.source],r=o[e.source];this._renderTileClippingMasks(e,r),this.renderLayer(this,t,e,r)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayerr.source&&!r.isHidden(t)?[e.sourceCaches[r.source]]:[])),i=n.filter((e=>"vector"===e.getSource().type)),a=n.filter((e=>"vector"!==e.getSource().type)),o=e=>{(!r||r.getSource().maxzoomo(e))),r||a.forEach((e=>o(e))),r}(this.style,this.transform.zoom);e&&function(e,t,r){for(let n=0;n0),i&&(t.b0(r,n),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(e,r){let n=e.context,i=n.gl,a=Fr.unblended,o=new jr(i.LEQUAL,jr.ReadWrite,[0,1]),s=r.getTerrainMesh(),l=r.sourceCache.getRenderableTiles(),c=e.useProgram("terrainDepth");n.bindFramebuffer.set(r.getFramebuffer("depth").framebuffer),n.viewport.set([0,0,e.width/devicePixelRatio,e.height/devicePixelRatio]),n.clear({color:t.aM.transparent,depth:1});for(let t of l){let l=r.getTerrainData(t.tileID),u={u_matrix:e.transform.calculatePosMatrix(t.tileID.toUnwrapped()),u_ele_delta:r.getMeshFrameDelta(e.transform.zoom)};c.draw(n,i.TRIANGLES,o,Vr.disabled,a,qr.backCCW,u,l,"terrain",s.vertexBuffer,s.indexBuffer,s.segments)}n.bindFramebuffer.set(null),n.viewport.set([0,0,e.width,e.height])}(this,this.style.map.terrain),function(e,r){let n=e.context,i=n.gl,a=Fr.unblended,o=new jr(i.LEQUAL,jr.ReadWrite,[0,1]),s=r.getTerrainMesh(),l=r.getCoordsTexture(),c=r.sourceCache.getRenderableTiles(),u=e.useProgram("terrainCoords");n.bindFramebuffer.set(r.getFramebuffer("coords").framebuffer),n.viewport.set([0,0,e.width/devicePixelRatio,e.height/devicePixelRatio]),n.clear({color:t.aM.transparent,depth:1}),r.coordsIndex=[];for(let t of c){let c=r.getTerrainData(t.tileID);n.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,l.texture);let h={u_matrix:e.transform.calculatePosMatrix(t.tileID.toUnwrapped()),u_terrain_coords_id:(255-r.coordsIndex.length)/255,u_texture:0,u_ele_delta:r.getMeshFrameDelta(e.transform.zoom)};u.draw(n,i.TRIANGLES,o,Vr.disabled,a,qr.backCCW,h,c,"terrain",s.vertexBuffer,s.indexBuffer,s.segments),r.coordsIndex.push(t.tileID.key)}n.bindFramebuffer.set(null),n.viewport.set([0,0,e.width,e.height])}(this,this.style.map.terrain))}renderLayer(e,r,n,i){if(!n.isHidden(this.transform.zoom)&&("background"===n.type||"custom"===n.type||(i||[]).length))switch(this.id=n.id,n.type){case"symbol":!function(e,r,n,i,a){if("translucent"!==e.renderPass)return;let o=Vr.disabled,s=e.colorModeForRenderPass();(n._unevaluatedLayout.hasValue("text-variable-anchor")||n._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(e,r,n,i,a,o,s,l,c){let u=r.transform,h=nt(),f="map"===a,p="map"===o;for(let a of e){let e=i.getTile(a),o=e.getBucket(n);if(!o||!o.text||!o.text.segments.get().length)continue;let d=t.ag(o.textSizeData,u.zoom),m=Be(e,1,r.transform.zoom),g=ve(a.posMatrix,p,f,r.transform,m),y="none"!==n.layout.get("icon-text-fit")&&o.hasIconData();if(d){let t=Math.pow(2,u.zoom-e.tileID.overscaledZ),n=r.style.map.terrain?(e,t)=>r.style.map.terrain.getElevation(a,e,t):null,i=h.translatePosition(u,e,s,l);Yr(o,f,p,c,u,g,a.posMatrix,t,d,y,h,i,a.toUnwrapped(),n)}}}(i,e,n,r,n.layout.get("text-rotation-alignment"),n.layout.get("text-pitch-alignment"),n.paint.get("text-translate"),n.paint.get("text-translate-anchor"),a),0!==n.paint.get("icon-opacity").constantOr(1)&&$r(e,r,n,i,!1,n.paint.get("icon-translate"),n.paint.get("icon-translate-anchor"),n.layout.get("icon-rotation-alignment"),n.layout.get("icon-pitch-alignment"),n.layout.get("icon-keep-upright"),o,s),0!==n.paint.get("text-opacity").constantOr(1)&&$r(e,r,n,i,!0,n.paint.get("text-translate"),n.paint.get("text-translate-anchor"),n.layout.get("text-rotation-alignment"),n.layout.get("text-pitch-alignment"),n.layout.get("text-keep-upright"),o,s),r.map.showCollisionBoxes&&(Hr(e,r,n,i,!0),Hr(e,r,n,i,!1))}(e,r,n,i,this.style.placement.variableOffsets);break;case"circle":!function(e,r,n,i){if("translucent"!==e.renderPass)return;let a=n.paint.get("circle-opacity"),o=n.paint.get("circle-stroke-width"),s=n.paint.get("circle-stroke-opacity"),l=!n.layout.get("circle-sort-key").isConstant();if(0===a.constantOr(1)&&(0===o.constantOr(1)||0===s.constantOr(1)))return;let c=e.context,u=c.gl,h=e.depthModeForSublayer(0,jr.ReadOnly),f=Vr.disabled,p=e.colorModeForRenderPass(),d=[];for(let a=0;ae.sortKey-t.sortKey));for(let t of d){let{programConfiguration:r,program:i,layoutVertexBuffer:a,indexBuffer:o,uniformValues:s,terrainData:l}=t.state;i.draw(c,u.TRIANGLES,h,f,p,qr.disabled,s,l,n.id,a,o,t.segments,n.paint,e.transform.zoom,r)}}(e,r,n,i);break;case"heatmap":!function(e,r,n,i){if(0===n.paint.get("heatmap-opacity"))return;let a=e.context;if(e.style.map.terrain){for(let t of i){let i=r.getTile(t);r.hasRenderableParent(t)||("offscreen"===e.renderPass?Jr(e,i,n,t):"translucent"===e.renderPass&&Qr(e,n,t))}a.viewport.set([0,0,e.width,e.height])}else"offscreen"===e.renderPass?function(e,r,n,i){let a=e.context,o=a.gl,s=Vr.disabled,l=new Fr([o.ONE,o.ONE],t.aM.transparent,[!0,!0,!0,!0]);(function(e,r,n){let i=e.gl;e.activeTexture.set(i.TEXTURE1),e.viewport.set([0,0,r.width/4,r.height/4]);let a=n.heatmapFbos.get(t.aU);a?(i.bindTexture(i.TEXTURE_2D,a.colorAttachment.get()),e.bindFramebuffer.set(a.framebuffer)):(a=en(e,r.width/4,r.height/4),n.heatmapFbos.set(t.aU,a))})(a,e,n),a.clear({color:t.aM.transparent});for(let t=0;t20&&a.texParameterf(a.TEXTURE_2D,i.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,i.extTextureFilterAnisotropicMax);let _=e.style.map.terrain&&e.style.map.terrain.getTerrainData(n),b=_?n:null,w=b?b.posMatrix:e.transform.calculatePosMatrix(n.toUnwrapped(),f),T=Ut(w,m||[0,0],d||1,v,r);o instanceof ee?s.draw(i,a.TRIANGLES,u,Vr.disabled,l,qr.disabled,T,_,r.id,o.boundsBuffer,e.quadTriangleIndexBuffer,o.boundsSegments):s.draw(i,a.TRIANGLES,u,c[n.overscaledZ],l,qr.disabled,T,_,r.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments)}}(e,r,n,i);break;case"background":!function(e,t,r,n){let i=r.paint.get("background-color"),a=r.paint.get("background-opacity");if(0===a)return;let o=e.context,s=o.gl,l=e.transform,c=l.tileSize,u=r.paint.get("background-pattern");if(e.isPatternMissing(u))return;let h=!u&&1===i.a&&1===a&&e.opaquePassEnabledForLayer()?"opaque":"translucent";if(e.renderPass!==h)return;let f=Vr.disabled,p=e.depthModeForSublayer(0,"opaque"===h?jr.ReadWrite:jr.ReadOnly),d=e.colorModeForRenderPass(),m=e.useProgram(u?"backgroundPattern":"background"),g=n||l.coveringTiles({tileSize:c,terrain:e.style.map.terrain});u&&(o.activeTexture.set(s.TEXTURE0),e.imageManager.bind(e.context));let y=r.getCrossfadeParameters();for(let t of g){let l=n?t.posMatrix:e.transform.calculatePosMatrix(t.toUnwrapped()),h=u?Zt(l,a,e,u,{tileID:t,tileSize:c},y):Wt(l,a,i),g=e.style.map.terrain&&e.style.map.terrain.getTerrainData(t);m.draw(o,s.TRIANGLES,p,f,d,qr.disabled,h,g,r.id,e.tileExtentBuffer,e.quadTriangleIndexBuffer,e.tileExtentSegments)}}(e,0,n,i);break;case"custom":!function(e,t,r){let n=e.context,i=r.implementation;if("offscreen"===e.renderPass){let t=i.prerender;t&&(e.setCustomLayerDefaults(),n.setColorMode(e.colorModeForRenderPass()),t.call(i,n.gl,e.transform.customLayerMatrix()),n.setDirty(),e.setBaseState())}else if("translucent"===e.renderPass){e.setCustomLayerDefaults(),n.setColorMode(e.colorModeForRenderPass()),n.setStencilMode(Vr.disabled);let t="3d"===i.renderingMode?new jr(e.context.gl.LEQUAL,jr.ReadWrite,e.depthRangeFor3D):e.depthModeForSublayer(0,jr.ReadOnly);n.setDepthMode(t),i.render(n.gl,e.transform.customLayerMatrix(),{farZ:e.transform.farZ,nearZ:e.transform.nearZ,fov:e.transform._fov,modelViewProjectionMatrix:e.transform.modelViewProjectionMatrix,projectionMatrix:e.transform.projectionMatrix}),n.setDirty(),e.setBaseState(),n.bindFramebuffer.set(null)}}(e,0,n)}}translatePosMatrix(e,r,n,i,a){if(!n[0]&&!n[1])return e;let o=a?"map"===i?this.transform.angle:0:"viewport"===i?-this.transform.angle:0;if(o){let e=Math.sin(o),t=Math.cos(o);n=[n[0]*t-n[1]*e,n[0]*e+n[1]*t]}let s=[a?n[0]:Be(r,n[0],this.transform.zoom),a?n[1]:Be(r,n[1],this.transform.zoom),0],l=new Float32Array(16);return t.J(l,e,s),l}saveTileTexture(e){let t=this._tileTextures[e.size[0]];t?t.push(e):this._tileTextures[e.size[0]]=[e]}getTileTexture(e){let t=this._tileTextures[e];return t&&t.length>0?t.pop():null}isPatternMissing(e){if(!e)return!1;if(!e.from||!e.to)return!0;let t=this.imageManager.getPattern(e.from.toString()),r=this.imageManager.getPattern(e.to.toString());return!t||!r}useProgram(e,t){this.cache=this.cache||{};let r=e+(t?t.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[r]||(this.cache[r]=new _t(this.context,mt[e],t,Yt[e],this._showOverdrawInspector,this.style.map.terrain)),this.cache[r]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)}initDebugOverlayCanvas(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new w(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){let{drawingBufferWidth:e,drawingBufferHeight:t}=this.context.gl;return this.width!==e||this.height!==t}}class bn{constructor(e,t){this.points=e,this.planes=t}static fromInvProjectionMatrix(e,r,n){let i=Math.pow(2,n),a=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map((n=>{let a=1/(n=t.af([],n,e))[3]/r*i;return t.b1(n,n,[a,a,1/n[3],a])})),o=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((e=>{let t=function(e,t){var r=t[0],n=t[1],i=t[2],a=r*r+n*n+i*i;return a>0&&(a=1/Math.sqrt(a)),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a,e}([],(n=[],i=y([],a[e[0]],a[e[1]]),o=y([],a[e[2]],a[e[1]]),s=i[0],l=i[1],c=i[2],u=o[0],h=o[1],f=o[2],n[0]=l*f-c*h,n[1]=c*u-s*f,n[2]=s*h-l*u,n)),r=-((p=t)[0]*(d=a[e[1]])[0]+p[1]*d[1]+p[2]*d[2]);var n,i,o,s,l,c,u,h,f,p,d;return t.concat(r)}));return new bn(a,o)}}class wn{constructor(e,t){var r,n,i;this.min=e,this.max=t,this.center=function(e,t){return e[0]=.5*t[0],e[1]=.5*t[1],e[2]=.5*t[2],e}([],(r=[],n=this.min,i=this.max,r[0]=n[0]+i[0],r[1]=n[1]+i[1],r[2]=n[2]+i[2],r))}quadrant(e){let t=[e%2==0,e<2],r=m(this.min),n=m(this.max);for(let e=0;e=0&&o++;if(0===o)return 0;o!==r.length&&(n=!1)}if(n)return 2;for(let t=0;t<3;t++){let r=Number.MAX_VALUE,n=-Number.MAX_VALUE;for(let i=0;ithis.max[t]-this.min[t])return 0}return 1}}class Tn{constructor(e=0,t=0,r=0,n=0){if(isNaN(e)||e<0||isNaN(t)||t<0||isNaN(r)||r<0||isNaN(n)||n<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=e,this.bottom=t,this.left=r,this.right=n}interpolate(e,r,n){return null!=r.top&&null!=e.top&&(this.top=t.y.number(e.top,r.top,n)),null!=r.bottom&&null!=e.bottom&&(this.bottom=t.y.number(e.bottom,r.bottom,n)),null!=r.left&&null!=e.left&&(this.left=t.y.number(e.left,r.left,n)),null!=r.right&&null!=e.right&&(this.right=t.y.number(e.right,r.right,n)),this}getCenter(e,r){let n=t.ac((this.left+e-this.right)/2,0,e),i=t.ac((this.top+r-this.bottom)/2,0,r);return new t.P(n,i)}equals(e){return this.top===e.top&&this.bottom===e.bottom&&this.left===e.left&&this.right===e.right}clone(){return new Tn(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}let kn=85.051129;class An{constructor(e,r,n,i,a){this.tileSize=512,this._renderWorldCopies=void 0===a||!!a,this._minZoom=e||0,this._maxZoom=r||22,this._minPitch=n??0,this._maxPitch=i??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Tn,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){let e=new An(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return e.apply(this),e}apply(e){this.tileSize=e.tileSize,this.latRange=e.latRange,this.lngRange=e.lngRange,this.width=e.width,this.height=e.height,this._center=e._center,this._elevation=e._elevation,this.minElevationForCurrentTile=e.minElevationForCurrentTile,this.zoom=e.zoom,this.angle=e.angle,this._fov=e._fov,this._pitch=e._pitch,this._unmodified=e._unmodified,this._edgeInsets=e._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(e){this._minZoom!==e&&(this._minZoom=e,this.zoom=Math.max(this.zoom,e))}get maxZoom(){return this._maxZoom}set maxZoom(e){this._maxZoom!==e&&(this._maxZoom=e,this.zoom=Math.min(this.zoom,e))}get minPitch(){return this._minPitch}set minPitch(e){this._minPitch!==e&&(this._minPitch=e,this.pitch=Math.max(this.pitch,e))}get maxPitch(){return this._maxPitch}set maxPitch(e){this._maxPitch!==e&&(this._maxPitch=e,this.pitch=Math.min(this.pitch,e))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(e){void 0===e?e=!0:null===e&&(e=!1),this._renderWorldCopies=e}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new t.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(e){let r=-t.b3(e,-180,180)*Math.PI/180;var n;this.angle!==r&&(this._unmodified=!1,this.angle=r,this._calcMatrices(),this.rotationMatrix=(n=new t.A(4),t.A!=Float32Array&&(n[1]=0,n[2]=0),n[0]=1,n[3]=1,n),function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(r),l=Math.cos(r);e[0]=n*l+a*s,e[1]=i*l+o*s,e[2]=n*-s+a*l,e[3]=i*-s+o*l}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(e){let r=t.ac(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(e){e=Math.max(.01,Math.min(60,e)),this._fov!==e&&(this._unmodified=!1,this._fov=e/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(e){let t=Math.min(Math.max(e,this.minZoom),this.maxZoom);this._zoom!==t&&(this._unmodified=!1,this._zoom=t,this.tileZoom=Math.max(0,Math.floor(t)),this.scale=this.zoomScale(t),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(e){e!==this._elevation&&(this._elevation=e,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(e){this._edgeInsets.equals(e)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,e,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(e){return this._edgeInsets.equals(e)}interpolatePadding(e,t,r){this._unmodified=!1,this._edgeInsets.interpolate(e,t,r),this._constrain(),this._calcMatrices()}coveringZoomLevel(e){let t=(e.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/e.tileSize));return Math.max(0,t)}getVisibleUnwrappedCoordinates(e){let r=[new t.b4(0,e)];if(this._renderWorldCopies){let n=this.pointCoordinate(new t.P(0,0)),i=this.pointCoordinate(new t.P(this.width,0)),a=this.pointCoordinate(new t.P(this.width,this.height)),o=this.pointCoordinate(new t.P(0,this.height)),s=Math.floor(Math.min(n.x,i.x,a.x,o.x)),l=Math.floor(Math.max(n.x,i.x,a.x,o.x)),c=1;for(let n=s-c;n<=l+c;n++)0!==n&&r.push(new t.b4(n,e))}return r}coveringTiles(e){var r,n;let i=this.coveringZoomLevel(e),a=i;if(void 0!==e.minzoom&&ie.maxzoom&&(i=e.maxzoom);let o=this.pointCoordinate(this.getCameraPoint()),s=t.Z.fromLngLat(this.center),l=Math.pow(2,i),c=[l*o.x,l*o.y,0],u=[l*s.x,l*s.y,0],h=bn.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,i),f=e.minzoom||0;!e.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(f=i);let p=e.terrain?2/Math.min(this.tileSize,e.tileSize)*this.tileSize:3,d=e=>({aabb:new wn([e*l,0,0],[(e+1)*l,l,0]),zoom:0,x:0,y:0,wrap:e,fullyVisible:!1}),m=[],g=[],y=i,v=e.reparseOverscaled?a:i;if(this._renderWorldCopies)for(let e=1;e<=3;e++)m.push(d(-e)),m.push(d(e));for(m.push(d(0));m.length>0;){let i=m.pop(),a=i.x,o=i.y,s=i.fullyVisible;if(!s){let e=i.aabb.intersects(h);if(0===e)continue;s=2===e}let l=e.terrain?c:u,d=i.aabb.distanceX(l),_=i.aabb.distanceY(l),b=Math.max(Math.abs(d),Math.abs(_));if(i.zoom===y||b>p+(1<=f){let e=y-i.zoom,r=c[0]-.5-(a<>1),h=i.zoom+1,f=i.aabb.quadrant(l);if(e.terrain){let a=new t.S(h,i.wrap,h,c,u),o=e.terrain.getMinMaxElevation(a),s=null!==(r=o.minElevation)&&void 0!==r?r:this.elevation,l=null!==(n=o.maxElevation)&&void 0!==n?n:this.elevation;f=new wn([f.min[0],f.min[1],s],[f.max[0],f.max[1],l])}m.push({aabb:f,zoom:h,x:c,y:u,wrap:i.wrap,fullyVisible:s})}}return g.sort(((e,t)=>e.distanceSq-t.distanceSq)).map((e=>e.tileID))}resize(e,t){this.width=e,this.height=t,this.pixelsToGLUnits=[2/e,-2/t],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(e){return Math.pow(2,e)}scaleZoom(e){return Math.log(e)/Math.LN2}project(e){let r=t.ac(e.lat,-85.051129,kn);return new t.P(t.O(e.lng)*this.worldSize,t.Q(r)*this.worldSize)}unproject(e){return new t.Z(e.x/this.worldSize,e.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(e){let r=this.elevation,n=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,i=this.pointLocation(this.centerPoint,e),a=e.getElevationForLngLatZoom(i,this.tileZoom);if(!(this.elevation-a))return;let o=n+r-a,s=Math.cos(this._pitch)*this.cameraToCenterDistance/o/t.b5(1,i.lat),l=this.scaleZoom(s/this.tileSize);this._elevation=a,this._center=i,this.zoom=l}setLocationAtPoint(e,r){let n=this.pointCoordinate(r),i=this.pointCoordinate(this.centerPoint),a=this.locationCoordinate(e),o=new t.Z(a.x-(n.x-i.x),a.y-(n.y-i.y));this.center=this.coordinateLocation(o),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(e,t){return t?this.coordinatePoint(this.locationCoordinate(e),t.getElevationForLngLatZoom(e,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(e))}pointLocation(e,t){return this.coordinateLocation(this.pointCoordinate(e,t))}locationCoordinate(e){return t.Z.fromLngLat(e)}coordinateLocation(e){return e&&e.toLngLat()}pointCoordinate(e,r){if(r){let t=r.pointCoordinate(e);if(null!=t)return t}let n=[e.x,e.y,0,1],i=[e.x,e.y,1,1];t.af(n,n,this.pixelMatrixInverse),t.af(i,i,this.pixelMatrixInverse);let a=n[3],o=i[3],s=n[1]/a,l=i[1]/o,c=n[2]/a,u=i[2]/o,h=c===u?0:(0-c)/(u-c);return new t.Z(t.y.number(n[0]/a,i[0]/o,h)/this.worldSize,t.y.number(s,l,h)/this.worldSize)}coordinatePoint(e,r=0,n=this.pixelMatrix){let i=[e.x*this.worldSize,e.y*this.worldSize,r,1];return t.af(i,i,n),new t.P(i[0]/i[3],i[1]/i[3])}getBounds(){let e=Math.max(0,this.height/2-this.getHorizon());return(new Z).extend(this.pointLocation(new t.P(0,e))).extend(this.pointLocation(new t.P(this.width,e))).extend(this.pointLocation(new t.P(this.width,this.height))).extend(this.pointLocation(new t.P(0,this.height)))}getMaxBounds(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new Z([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(e){e?(this.lngRange=[e.getWest(),e.getEast()],this.latRange=[e.getSouth(),e.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,kn])}calculateTileMatrix(e){let r=e.canonical,n=this.worldSize/this.zoomScale(r.z),i=r.x+Math.pow(2,r.z)*e.wrap,a=t.an(new Float64Array(16));return t.J(a,a,[i*n,r.y*n,0]),t.K(a,a,[n/t.X,n/t.X,1]),a}calculatePosMatrix(e,r=!1){let n=e.key,i=r?this._alignedPosMatrixCache:this._posMatrixCache;if(i[n])return i[n];let a=this.calculateTileMatrix(e);return t.L(a,r?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,a),i[n]=new Float32Array(a),i[n]}calculateFogMatrix(e){let r=e.key,n=this._fogMatrixCache;if(n[r])return n[r];let i=this.calculateTileMatrix(e);return t.L(i,this.fogMatrix,i),n[r]=new Float32Array(i),n[r]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(e,r){r=t.ac(+r,this.minZoom,this.maxZoom);let n={center:new t.N(e.lng,e.lat),zoom:r},i=this.lngRange;if(!this._renderWorldCopies&&null===i){let e=179.9999999999;i=[-e,e]}let a=this.tileSize*this.zoomScale(n.zoom),o=0,s=a,l=0,c=a,u=0,h=0,{x:f,y:p}=this.size;if(this.latRange){let e=this.latRange;o=t.Q(e[1])*a,s=t.Q(e[0])*a,s-os&&(m=s-e)}if(i){let e=(l+c)/2,r=g;this._renderWorldCopies&&(r=t.b3(g,e-a/2,e+a/2));let n=f/2;r-nc&&(d=c-n)}if(void 0!==d||void 0!==m){let e=new t.P(d??g,m??y);n.center=this.unproject.call({worldSize:a},e).wrap()}return n}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let e=this._unmodified,{center:t,zoom:r}=this.getConstrained(this.center,this.zoom);this.center=t,this.zoom=r,this._unmodified=e,this._constraining=!1}_calcMatrices(){if(!this.height)return;let e=this.centerOffset,r=this.point.x,n=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=t.b5(1,this.center.lat)*this.worldSize;let i=t.an(new Float64Array(16));t.K(i,i,[this.width/2,-this.height/2,1]),t.J(i,i,[1,-1,0]),this.labelPlaneMatrix=i,i=t.an(new Float64Array(16)),t.K(i,i,[1,-1,1]),t.J(i,i,[-1,-1,0]),t.K(i,i,[2/this.width,2/this.height,1]),this.glCoordMatrix=i;let a=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),o=Math.min(this.elevation,this.minElevationForCurrentTile),s=a-o*this._pixelPerMeter/Math.cos(this._pitch),l=o<0?s:a,c=Math.PI/2+this._pitch,u=this._fov*(.5+e.y/this.height),h=Math.sin(u)*l/Math.sin(t.ac(Math.PI-c-u,.01,Math.PI-.01)),f=this.getHorizon(),p=2*Math.atan(f/this.cameraToCenterDistance)*(.5+e.y/(2*f)),d=Math.sin(p)*l/Math.sin(t.ac(Math.PI-c-p,.01,Math.PI-.01)),m=Math.min(h,d);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*m+l),this.nearZ=this.height/50,i=new Float64Array(16),t.b6(i,this._fov,this.width/this.height,this.nearZ,this.farZ),i[8]=2*-e.x/this.width,i[9]=2*e.y/this.height,this.projectionMatrix=t.ae(i),t.K(i,i,[1,-1,1]),t.J(i,i,[0,0,-this.cameraToCenterDistance]),t.b7(i,i,this._pitch),t.ad(i,i,this.angle),t.J(i,i,[-r,-n,0]),this.mercatorMatrix=t.K([],i,[this.worldSize,this.worldSize,this.worldSize]),t.K(i,i,[1,1,this._pixelPerMeter]),this.pixelMatrix=t.L(new Float64Array(16),this.labelPlaneMatrix,i),t.J(i,i,[0,0,-this.elevation]),this.modelViewProjectionMatrix=i,this.invModelViewProjectionMatrix=t.as([],i),this.fogMatrix=new Float64Array(16),t.b6(this.fogMatrix,this._fov,this.width/this.height,a,this.farZ),this.fogMatrix[8]=2*-e.x/this.width,this.fogMatrix[9]=2*e.y/this.height,t.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),t.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),t.b7(this.fogMatrix,this.fogMatrix,this._pitch),t.ad(this.fogMatrix,this.fogMatrix,this.angle),t.J(this.fogMatrix,this.fogMatrix,[-r,-n,0]),t.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),t.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=t.L(new Float64Array(16),this.labelPlaneMatrix,i);let g=this.width%2/2,y=this.height%2/2,v=Math.cos(this.angle),x=Math.sin(this.angle),_=r-Math.round(r)+v*g+x*y,b=n-Math.round(n)+v*y+x*g,w=new Float64Array(i);if(t.J(w,w,[_>.5?_-1:_,b>.5?b-1:b,0]),this.alignedModelViewProjectionMatrix=w,i=t.as(new Float64Array(16),this.pixelMatrix),!i)throw new Error("failed to invert matrix");this.pixelMatrixInverse=i,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;let e=this.pointCoordinate(new t.P(0,0)),r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.af(r,r,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){let e=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.P(0,e))}getCameraQueryGeometry(e){let r=this.getCameraPoint();if(1===e.length)return[e[0],r];{let n=r.x,i=r.y,a=r.x,o=r.y;for(let t of e)n=Math.min(n,t.x),i=Math.min(i,t.y),a=Math.max(a,t.x),o=Math.max(o,t.y);return[new t.P(n,i),new t.P(a,i),new t.P(a,o),new t.P(n,o),new t.P(n,i)]}}lngLatToCameraDepth(e,r){let n=this.locationCoordinate(e),i=[n.x*this.worldSize,n.y*this.worldSize,r,1];return t.af(i,i,this.modelViewProjectionMatrix),i[2]/i[3]}}function Mn(e,t){let r,n=!1,i=null,a=null,o=()=>{i=null,n&&(e.apply(a,r),i=setTimeout(o,t),n=!1)};return(...e)=>(n=!0,a=this,r=e,i||o(),i)}class Sn{constructor(e){this._getCurrentHash=()=>{let e=window.location.hash.replace("#","");if(this._hashName){let t;return e.split("&").map((e=>e.split("="))).forEach((e=>{e[0]===this._hashName&&(t=e)})),(t&&t[1]||"").split("/")}return e.split("/")},this._onHashChange=()=>{let e=this._getCurrentHash();if(e.length>=3&&!e.some((e=>isNaN(e)))){let t=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(e[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:t,pitch:+(e[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{let e=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,e)},this._removeHash=()=>{let e=this._getCurrentHash();if(0===e.length)return;let t=e.join("/"),r=t;r.split("&").length>0&&(r=r.split("&")[0]),this._hashName&&(r=`${this._hashName}=${t}`);let n=window.location.hash.replace(r,"");n.startsWith("#&")?n=n.slice(0,1)+n.slice(2):"#"===n&&(n="");let i=window.location.href.replace(/(#.+)?$/,n);i=i.replace("&&","&"),window.history.replaceState(window.history.state,null,i)},this._updateHash=Mn(this._updateHashUnthrottled,300),this._hashName=e&&encodeURIComponent(e)}addTo(e){return this._map=e,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(e){let t=this._map.getCenter(),r=Math.round(100*this._map.getZoom())/100,n=Math.ceil((r*Math.LN2+Math.log(512/360/.5))/Math.LN10),i=Math.pow(10,n),a=Math.round(t.lng*i)/i,o=Math.round(t.lat*i)/i,s=this._map.getBearing(),l=this._map.getPitch(),c="";if(c+=e?`/${a}/${o}/${r}`:`${r}/${o}/${a}`,(s||l)&&(c+="/"+Math.round(10*s)/10),l&&(c+=`/${Math.round(l)}`),this._hashName){let e=this._hashName,t=!1,r=window.location.hash.slice(1).split("&").map((r=>{let n=r.split("=")[0];return n===e?(t=!0,`${n}=${c}`):r})).filter((e=>e));return t||r.push(`${e}=${c}`),`#${r.join("&")}`}return`#${c}`}}let En={linearity:.3,easing:t.b8(0,0,.3,1)},Cn=t.e({deceleration:2500,maxSpeed:1400},En),In=t.e({deceleration:20,maxSpeed:1400},En),Ln=t.e({deceleration:1e3,maxSpeed:360},En),Pn=t.e({deceleration:1e3,maxSpeed:90},En);class zn{constructor(e){this._map=e,this.clear()}clear(){this._inertiaBuffer=[]}record(e){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:a.now(),settings:e})}_drainInertiaBuffer(){let e=this._inertiaBuffer,t=a.now();for(;e.length>0&&t-e[0].time>160;)e.shift()}_onMoveEnd(e){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let r={zoom:0,bearing:0,pitch:0,pan:new t.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:e}of this._inertiaBuffer)r.zoom+=e.zoomDelta||0,r.bearing+=e.bearingDelta||0,r.pitch+=e.pitchDelta||0,e.panDelta&&r.pan._add(e.panDelta),e.around&&(r.around=e.around),e.pinchAround&&(r.pinchAround=e.pinchAround);let n=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,i={};if(r.pan.mag()){let a=On(r.pan.mag(),n,t.e({},Cn,e||{}));i.offset=r.pan.mult(a.amount/r.pan.mag()),i.center=this._map.transform.center,Dn(i,a)}if(r.zoom){let e=On(r.zoom,n,In);i.zoom=this._map.transform.zoom+e.amount,Dn(i,e)}if(r.bearing){let e=On(r.bearing,n,Ln);i.bearing=this._map.transform.bearing+t.ac(e.amount,-179,179),Dn(i,e)}if(r.pitch){let e=On(r.pitch,n,Pn);i.pitch=this._map.transform.pitch+e.amount,Dn(i,e)}if(i.zoom||i.bearing){let e=void 0===r.pinchAround?r.around:r.pinchAround;i.around=e?this._map.unproject(e):this._map.getCenter()}return this.clear(),t.e(i,{noMoveStart:!0})}}function Dn(e,t){(!e.duration||e.durationr.unproject(e))),l=a.reduce(((e,t,r,n)=>e.add(t.div(n.length))),new t.P(0,0));super(e,{points:a,point:l,lngLats:s,lngLat:r.unproject(l),originalEvent:n}),this._defaultPrevented=!1}}class Bn extends t.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,t,r){super(e,{originalEvent:r}),this._defaultPrevented=!1}}class jn{constructor(e,t){this._map=e,this._clickTolerance=t.clickTolerance}reset(){delete this._mousedownPos}wheel(e){return this._firePreventable(new Bn(e.type,this._map,e))}mousedown(e,t){return this._mousedownPos=t,this._firePreventable(new Rn(e.type,this._map,e))}mouseup(e){this._map.fire(new Rn(e.type,this._map,e))}click(e,t){this._mousedownPos&&this._mousedownPos.dist(t)>=this._clickTolerance||this._map.fire(new Rn(e.type,this._map,e))}dblclick(e){return this._firePreventable(new Rn(e.type,this._map,e))}mouseover(e){this._map.fire(new Rn(e.type,this._map,e))}mouseout(e){this._map.fire(new Rn(e.type,this._map,e))}touchstart(e){return this._firePreventable(new Fn(e.type,this._map,e))}touchmove(e){this._map.fire(new Fn(e.type,this._map,e))}touchend(e){this._map.fire(new Fn(e.type,this._map,e))}touchcancel(e){this._map.fire(new Fn(e.type,this._map,e))}_firePreventable(e){if(this._map.fire(e),e.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Nn{constructor(e){this._map=e}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(e){this._map.fire(new Rn(e.type,this._map,e))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Rn("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(e){this._delayContextMenu?this._contextMenuEvent=e:this._ignoreContextMenu||this._map.fire(new Rn(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Un{constructor(e){this._map=e}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(e){return this.transform.pointLocation(t.P.convert(e),this._map.terrain)}}class Vn{constructor(e,t){this._map=e,this._tr=new Un(e),this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=t.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(e,t){this.isEnabled()&&e.shiftKey&&0===e.button&&(o.disableDrag(),this._startPos=this._lastPos=t,this._active=!0)}mousemoveWindow(e,t){if(!this._active)return;let r=t;if(this._lastPos.equals(r)||!this._box&&r.dist(this._startPos)e.fitScreenCoordinates(n,i,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",e)}keydown(e){this._active&&27===e.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",e))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(o.remove(this._box),this._box=null),o.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(e,r){return this._map.fire(new t.k(e,{originalEvent:r}))}}function qn(e,t){if(e.length!==t.length)throw new Error(`The number of touches and points are not equal - touches ${e.length}, points ${t.length}`);let r={};for(let n=0;nthis.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),n.length===this.numTouches&&(this.centroid=function(e){let r=new t.P(0,0);for(let t of e)r._add(t);return r.div(e.length)}(r),this.touches=qn(n,r)))}touchmove(e,t,r){if(this.aborted||!this.centroid)return;let n=qn(r,t);for(let e in this.touches){let t=n[e];(!t||t.dist(this.touches[e])>30)&&(this.aborted=!0)}}touchend(e,t,r){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),0===r.length){let e=!this.aborted&&this.centroid;if(this.reset(),e)return e}}}class Gn{constructor(e){this.singleTap=new Hn(e),this.numTaps=e.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(e,t,r){this.singleTap.touchstart(e,t,r)}touchmove(e,t,r){this.singleTap.touchmove(e,t,r)}touchend(e,t,r){let n=this.singleTap.touchend(e,t,r);if(n){let t=e.timeStamp-this.lastTime<500,r=!this.lastTap||this.lastTap.dist(n)<30;if(t&&r||this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=n,this.count===this.numTaps)return this.reset(),n}}}class Wn{constructor(e){this._tr=new Un(e),this._zoomIn=new Gn({numTouches:1,numTaps:2}),this._zoomOut=new Gn({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(e,t,r){this._zoomIn.touchstart(e,t,r),this._zoomOut.touchstart(e,t,r)}touchmove(e,t,r){this._zoomIn.touchmove(e,t,r),this._zoomOut.touchmove(e,t,r)}touchend(e,t,r){let n=this._zoomIn.touchend(e,t,r),i=this._zoomOut.touchend(e,t,r),a=this._tr;return n?(this._active=!0,e.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:t=>t.easeTo({duration:300,zoom:a.zoom+1,around:a.unproject(n)},{originalEvent:e})}):i?(this._active=!0,e.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:t=>t.easeTo({duration:300,zoom:a.zoom-1,around:a.unproject(i)},{originalEvent:e})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Zn{constructor(e){this._enabled=!!e.enable,this._moveStateManager=e.moveStateManager,this._clickTolerance=e.clickTolerance||1,this._moveFunction=e.move,this._activateOnStart=!!e.activateOnStart,e.assignEvents(this),this.reset()}reset(e){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(e)}_move(...e){let t=this._moveFunction(...e);if(t.bearingDelta||t.pitchDelta||t.around||t.panDelta)return this._active=!0,t}dragStart(e,t){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(e)&&(this._moveStateManager.startMove(e),this._lastPoint=t.length?t[0]:t,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(e,t){if(!this.isEnabled())return;let r=this._lastPoint;if(!r)return;if(e.preventDefault(),!this._moveStateManager.isValidMoveEvent(e))return void this.reset(e);let n=t.length?t[0]:t;return!this._moved&&n.dist(r){e.mousedown=e.dragStart,e.mousemoveWindow=e.dragMove,e.mouseup=e.dragEnd,e.contextmenu=e=>{e.preventDefault()}},Jn=({enable:e,clickTolerance:t,bearingDegreesPerPixelMoved:r=.8})=>{let n=new Xn({checkCorrectEvent:e=>0===o.mouseButton(e)&&e.ctrlKey||2===o.mouseButton(e)});return new Zn({clickTolerance:t,move:(e,t)=>({bearingDelta:(t.x-e.x)*r}),moveStateManager:n,enable:e,assignEvents:Kn})},Qn=({enable:e,clickTolerance:t,pitchDegreesPerPixelMoved:r=-.5})=>{let n=new Xn({checkCorrectEvent:e=>0===o.mouseButton(e)&&e.ctrlKey||2===o.mouseButton(e)});return new Zn({clickTolerance:t,move:(e,t)=>({pitchDelta:(t.y-e.y)*r}),moveStateManager:n,enable:e,assignEvents:Kn})};class ei{constructor(e,t){this._clickTolerance=e.clickTolerance||1,this._map=t,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new t.P(0,0)}_shouldBePrevented(e){return e<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(e,t,r){return this._calculateTransform(e,t,r)}touchmove(e,t,r){if(this._active){if(!this._shouldBePrevented(r.length))return e.preventDefault(),this._calculateTransform(e,t,r);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",e)}}touchend(e,t,r){this._calculateTransform(e,t,r),this._active&&this._shouldBePrevented(r.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(e,r,n){n.length>0&&(this._active=!0);let i=qn(n,r),a=new t.P(0,0),o=new t.P(0,0),s=0;for(let e in i){let t=i[e],r=this._touches[e];r&&(a._add(t),o._add(t.sub(r)),s++,i[e]=t)}if(this._touches=i,this._shouldBePrevented(s)||!o.mag())return;let l=o.div(s);return this._sum._add(l),this._sum.mag()Math.abs(e.x)}class li extends ti{constructor(e){super(),this._currentTouchCount=0,this._map=e}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(e,t,r){super.touchstart(e,t,r),this._currentTouchCount=r.length}_start(e){this._lastPoints=e,si(e[0].sub(e[1]))&&(this._valid=!1)}_move(e,t,r){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let n=e[0].sub(this._lastPoints[0]),i=e[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(n,i,r.timeStamp),this._valid?(this._lastPoints=e,this._active=!0,{pitchDelta:(n.y+i.y)/2*-.5}):void 0}gestureBeginsVertically(e,t,r){if(void 0!==this._valid)return this._valid;let n=e.mag()>=2,i=t.mag()>=2;if(!n&&!i)return;if(!n||!i)return void 0===this._firstMove&&(this._firstMove=r),r-this._firstMove<100&&void 0;let a=e.y>0==t.y>0;return si(e)&&si(t)&&a}}let ci={panStep:100,bearingStep:15,pitchStep:10};class ui{constructor(e){this._tr=new Un(e);let t=ci;this._panStep=t.panStep,this._bearingStep=t.bearingStep,this._pitchStep=t.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let t=0,r=0,n=0,i=0,a=0;switch(e.keyCode){case 61:case 107:case 171:case 187:t=1;break;case 189:case 109:case 173:t=-1;break;case 37:e.shiftKey?r=-1:(e.preventDefault(),i=-1);break;case 39:e.shiftKey?r=1:(e.preventDefault(),i=1);break;case 38:e.shiftKey?n=1:(e.preventDefault(),a=-1);break;case 40:e.shiftKey?n=-1:(e.preventDefault(),a=1);break;default:return}return this._rotationDisabled&&(r=0,n=0),{cameraAnimation:o=>{let s=this._tr;o.easeTo({duration:300,easeId:"keyboardHandler",easing:hi,zoom:t?Math.round(s.zoom)+t*(e.shiftKey?2:1):s.zoom,bearing:s.bearing+r*this._bearingStep,pitch:s.pitch+n*this._pitchStep,offset:[-i*this._panStep,-a*this._panStep],center:s.center},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function hi(e){return e*(2-e)}let fi=4.000244140625;class pi{constructor(e,t){this._onTimeout=e=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(e)},this._map=e,this._tr=new Un(e),this._triggerRenderFrame=t,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(e){this._defaultZoomRate=e}setWheelZoomRate(e){this._wheelZoomRate=e}isEnabled(){return!!this._enabled}isActive(){return!!this._active||void 0!==this._finishTimeout}isZooming(){return!!this._zooming}enable(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!e&&"center"===e.around)}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(e){return!!this._map.cooperativeGestures.isEnabled()&&!(e.ctrlKey||this._map.cooperativeGestures.isBypassed(e))}wheel(e){if(!this.isEnabled())return;if(this._shouldBePrevented(e))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",e);let t=e.deltaMode===WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,r=a.now(),n=r-(this._lastWheelEventTime||0);this._lastWheelEventTime=r,0!==t&&t%fi==0?this._type="wheel":0!==t&&Math.abs(t)<4?this._type="trackpad":n>400?(this._type=null,this._lastValue=t,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(n*t)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,t+=this._lastValue)),e.shiftKey&&t&&(t/=4),this._type&&(this._lastWheelEvent=e,this._delta-=t,this._active||this._start(e)),e.preventDefault()}_start(e){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let r=o.mousePos(this._map.getCanvas(),e),n=this._tr;this._around=r.y>n.transform.height/2-n.transform.getHorizon()?t.N.convert(this._aroundCenter?n.center:n.unproject(r)):t.N.convert(n.center),this._aroundPoint=n.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;let e=this._tr.transform;if(0!==this._delta){let t="wheel"===this._type&&Math.abs(this._delta)>fi?this._wheelZoomRate:this._defaultZoomRate,r=2/(1+Math.exp(-Math.abs(this._delta*t)));this._delta<0&&0!==r&&(r=1/r);let n="number"==typeof this._targetZoom?e.zoomScale(this._targetZoom):e.scale;this._targetZoom=Math.min(e.maxZoom,Math.max(e.minZoom,e.scaleZoom(n*r))),"wheel"===this._type&&(this._startZoom=e.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let r,n="number"==typeof this._targetZoom?this._targetZoom:e.zoom,i=this._startZoom,o=this._easing,s=!1,l=a.now()-this._lastWheelEventTime;if("wheel"===this._type&&i&&o&&l){let e=Math.min(l/200,1),a=o(e);r=t.y.number(i,n,a),e<1?this._frameId||(this._frameId=!0):s=!0}else r=n,s=!0;return this._active=!0,s&&(this._active=!1,this._finishTimeout=setTimeout((()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!s,zoomDelta:r-e.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(e){let r=t.b9;if(this._prevEase){let e=this._prevEase,n=(a.now()-e.start)/e.duration,i=e.easing(n+.01)-e.easing(n),o=.27/Math.sqrt(i*i+1e-4)*.01,s=Math.sqrt(.0729-o*o);r=t.b8(o,s,.25,1)}return this._prevEase={start:a.now(),duration:e,easing:r},r}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class di{constructor(e,t){this._clickZoom=e,this._tapZoom=t}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class mi{constructor(e){this._tr=new Un(e),this.reset()}reset(){this._active=!1}dblclick(e,t){return e.preventDefault(),{cameraAnimation:r=>{r.easeTo({duration:300,zoom:this._tr.zoom+(e.shiftKey?-1:1),around:this._tr.unproject(t)},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class gi{constructor(){this._tap=new Gn({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(e,t,r){if(!this._swipePoint)if(this._tapTime){let n=t[0],i=e.timeStamp-this._tapTime<500,a=this._tapPoint.dist(n)<30;i&&a?r.length>0&&(this._swipePoint=n,this._swipeTouch=r[0].identifier):this.reset()}else this._tap.touchstart(e,t,r)}touchmove(e,t,r){if(this._tapTime){if(this._swipePoint){if(r[0].identifier!==this._swipeTouch)return;let n=t[0],i=n.y-this._swipePoint.y;return this._swipePoint=n,e.preventDefault(),this._active=!0,{zoomDelta:i/128}}}else this._tap.touchmove(e,t,r)}touchend(e,t,r){if(this._tapTime)this._swipePoint&&0===r.length&&this.reset();else{let n=this._tap.touchend(e,t,r);n&&(this._tapTime=e.timeStamp,this._tapPoint=n)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class yi{constructor(e,t,r){this._el=e,this._mousePan=t,this._touchPan=r}enable(e){this._inertiaOptions=e||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class vi{constructor(e,t,r){this._pitchWithRotate=e.pitchWithRotate,this._mouseRotate=t,this._mousePitch=r}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class xi{constructor(e,t,r,n){this._el=e,this._touchZoom=t,this._touchRotate=r,this._tapDragZoom=n,this._rotationDisabled=!1,this._enabled=!0}enable(e){this._touchZoom.enable(e),this._rotationDisabled||this._touchRotate.enable(e),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class _i{constructor(e,t){this._bypassKey=-1!==navigator.userAgent.indexOf("Mac")?"metaKey":"ctrlKey",this._map=e,this._options=t,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let e=this._map.getCanvasContainer();e.classList.add("maplibregl-cooperative-gestures"),this._container=o.create("div","maplibregl-cooperative-gesture-screen",e);let t=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");"metaKey"===this._bypassKey&&(t=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let r=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),n=document.createElement("div");n.className="maplibregl-desktop-message",n.textContent=t,this._container.appendChild(n);let i=document.createElement("div");i.className="maplibregl-mobile-message",i.textContent=r,this._container.appendChild(i),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(o.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(e){return e[this._bypassKey]}notifyGestureBlocked(e,r){this._enabled&&(this._map.fire(new t.k("cooperativegestureprevented",{gestureType:e,originalEvent:r})),this._container.classList.add("maplibregl-show"),setTimeout((()=>{this._container.classList.remove("maplibregl-show")}),100))}}let bi=e=>e.zoom||e.drag||e.pitch||e.rotate;class wi extends t.k{}function Ti(e){return e.panDelta&&e.panDelta.mag()||e.zoomDelta||e.bearingDelta||e.pitchDelta}class ki{constructor(e,t){this.handleWindowEvent=e=>{this.handleEvent(e,`${e.type}Window`)},this.handleEvent=(e,t)=>{if("blur"===e.type)return void this.stop(!0);this._updatingCamera=!0;let r="renderFrame"===e.type?void 0:e,n={needsRenderFrame:!1},i={},a={},s=e.touches,l=s?this._getMapTouches(s):void 0,c=l?o.touchPos(this._map.getCanvas(),l):o.mousePos(this._map.getCanvas(),e);for(let{handlerName:o,handler:s,allowed:u}of this._handlers){if(!s.isEnabled())continue;let h;this._blockedByActive(a,u,o)?s.reset():s[t||e.type]&&(h=s[t||e.type](e,c,l),this.mergeHandlerResult(n,i,h,o,r),h&&h.needsRenderFrame&&this._triggerRenderFrame()),(h||s.isActive())&&(a[o]=s)}let u={};for(let e in this._previousActiveHandlers)a[e]||(u[e]=r);this._previousActiveHandlers=a,(Object.keys(u).length||Ti(n))&&(this._changes.push([n,i,u]),this._triggerRenderFrame()),(Object.keys(a).length||Ti(n))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:h}=n;h&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],h(this._map))},this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new zn(e),this._bearingSnap=t.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(t);let r=this._el;this._listeners=[[r,"touchstart",{passive:!0}],[r,"touchmove",{passive:!1}],[r,"touchend",void 0],[r,"touchcancel",void 0],[r,"mousedown",void 0],[r,"mousemove",void 0],[r,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[r,"mouseover",void 0],[r,"mouseout",void 0],[r,"dblclick",void 0],[r,"click",void 0],[r,"keydown",{capture:!1}],[r,"keyup",void 0],[r,"wheel",{passive:!1}],[r,"contextmenu",void 0],[window,"blur",void 0]];for(let[e,t,r]of this._listeners)o.addEventListener(e,t,e===document?this.handleWindowEvent:this.handleEvent,r)}destroy(){for(let[e,t,r]of this._listeners)o.removeEventListener(e,t,e===document?this.handleWindowEvent:this.handleEvent,r)}_addDefaultHandlers(e){let t=this._map,r=t.getCanvasContainer();this._add("mapEvent",new jn(t,e));let n=t.boxZoom=new Vn(t,e);this._add("boxZoom",n),e.interactive&&e.boxZoom&&n.enable();let i=t.cooperativeGestures=new _i(t,e.cooperativeGestures);this._add("cooperativeGestures",i),e.cooperativeGestures&&i.enable();let a=new Wn(t),s=new mi(t);t.doubleClickZoom=new di(s,a),this._add("tapZoom",a),this._add("clickZoom",s),e.interactive&&e.doubleClickZoom&&t.doubleClickZoom.enable();let l=new gi;this._add("tapDragZoom",l);let c=t.touchPitch=new li(t);this._add("touchPitch",c),e.interactive&&e.touchPitch&&t.touchPitch.enable(e.touchPitch);let u=Jn(e),h=Qn(e);t.dragRotate=new vi(e,u,h),this._add("mouseRotate",u,["mousePitch"]),this._add("mousePitch",h,["mouseRotate"]),e.interactive&&e.dragRotate&&t.dragRotate.enable();let f=(({enable:e,clickTolerance:t})=>{let r=new Xn({checkCorrectEvent:e=>0===o.mouseButton(e)&&!e.ctrlKey});return new Zn({clickTolerance:t,move:(e,t)=>({around:t,panDelta:t.sub(e)}),activateOnStart:!0,moveStateManager:r,enable:e,assignEvents:Kn})})(e),p=new ei(e,t);t.dragPan=new yi(r,f,p),this._add("mousePan",f),this._add("touchPan",p,["touchZoom","touchRotate"]),e.interactive&&e.dragPan&&t.dragPan.enable(e.dragPan);let d=new oi,m=new ii;t.touchZoomRotate=new xi(r,m,d,l),this._add("touchRotate",d,["touchPan","touchZoom"]),this._add("touchZoom",m,["touchPan","touchRotate"]),e.interactive&&e.touchZoomRotate&&t.touchZoomRotate.enable(e.touchZoomRotate);let g=t.scrollZoom=new pi(t,(()=>this._triggerRenderFrame()));this._add("scrollZoom",g,["mousePan"]),e.interactive&&e.scrollZoom&&t.scrollZoom.enable(e.scrollZoom);let y=t.keyboard=new ui(t);this._add("keyboard",y),e.interactive&&e.keyboard&&t.keyboard.enable(),this._add("blockableMapEvent",new Nn(t))}_add(e,t,r){this._handlers.push({handlerName:e,handler:t,allowed:r}),this._handlersById[e]=t}stop(e){if(!this._updatingCamera){for(let{handler:e}of this._handlers)e.reset();this._inertia.clear(),this._fireEvents({},{},e),this._changes=[]}}isActive(){for(let{handler:e}of this._handlers)if(e.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!bi(this._eventsInProgress)||this.isZooming()}_blockedByActive(e,t,r){for(let n in e)if(n!==r&&(!t||t.indexOf(n)<0))return!0;return!1}_getMapTouches(e){let t=[];for(let r of e)this._el.contains(r.target)&&t.push(r);return t}mergeHandlerResult(e,r,n,i,a){if(!n)return;t.e(e,n);let o={handlerName:i,originalEvent:n.originalEvent||a};void 0!==n.zoomDelta&&(r.zoom=o),void 0!==n.panDelta&&(r.drag=o),void 0!==n.pitchDelta&&(r.pitch=o),void 0!==n.bearingDelta&&(r.rotate=o)}_applyChanges(){let e={},r={},n={};for(let[i,a,o]of this._changes)i.panDelta&&(e.panDelta=(e.panDelta||new t.P(0,0))._add(i.panDelta)),i.zoomDelta&&(e.zoomDelta=(e.zoomDelta||0)+i.zoomDelta),i.bearingDelta&&(e.bearingDelta=(e.bearingDelta||0)+i.bearingDelta),i.pitchDelta&&(e.pitchDelta=(e.pitchDelta||0)+i.pitchDelta),void 0!==i.around&&(e.around=i.around),void 0!==i.pinchAround&&(e.pinchAround=i.pinchAround),i.noInertia&&(e.noInertia=i.noInertia),t.e(r,a),t.e(n,o);this._updateMapTransform(e,r,n),this._changes=[]}_updateMapTransform(e,t,r){let n=this._map,i=n._getTransformForUpdate(),a=n.terrain;if(!(Ti(e)||a&&this._terrainMovement))return this._fireEvents(t,r,!0);let{panDelta:o,zoomDelta:s,bearingDelta:l,pitchDelta:c,around:u,pinchAround:h}=e;void 0!==h&&(u=h),n._stop(!0),u=u||n.transform.centerPoint;let f=i.pointLocation(o?u.sub(o):u);l&&(i.bearing+=l),c&&(i.pitch+=c),s&&(i.zoom+=s),a?this._terrainMovement||!t.drag&&!t.zoom?t.drag&&this._terrainMovement?i.center=i.pointLocation(i.centerPoint.sub(o)):i.setLocationAtPoint(f,u):(this._terrainMovement=!0,this._map._elevationFreeze=!0,i.setLocationAtPoint(f,u)):i.setLocationAtPoint(f,u),n._applyUpdatedTransform(i),this._map._update(),e.noInertia||this._inertia.record(e),this._fireEvents(t,r,!0)}_fireEvents(e,r,n){let i=bi(this._eventsInProgress),o=bi(e),s={};for(let t in e){let{originalEvent:r}=e[t];this._eventsInProgress[t]||(s[`${t}start`]=r),this._eventsInProgress[t]=e[t]}!i&&o&&this._fireEvent("movestart",o.originalEvent);for(let e in s)this._fireEvent(e,s[e]);o&&this._fireEvent("move",o.originalEvent);for(let t in e){let{originalEvent:r}=e[t];this._fireEvent(t,r)}let l,c={};for(let e in this._eventsInProgress){let{handlerName:t,originalEvent:n}=this._eventsInProgress[e];this._handlersById[t].isActive()||(delete this._eventsInProgress[e],l=r[t]||n,c[`${e}end`]=l)}for(let e in c)this._fireEvent(e,c[e]);let u=bi(this._eventsInProgress),h=(i||o)&&!u;if(h&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let e=this._map._getTransformForUpdate();e.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(e)}if(n&&h){this._updatingCamera=!0;let e=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),r=e=>0!==e&&-this._bearingSnap{delete this._frameId,this.handleEvent(new wi("renderFrame",{timeStamp:e})),this._applyChanges()}))}_triggerRenderFrame(){void 0===this._frameId&&(this._frameId=this._requestFrame())}}class Ai extends t.E{constructor(e,t){super(),this._renderFrameCallback=()=>{let e=Math.min((a.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=e,this._bearingSnap=t.bearingSnap,this.on("moveend",(()=>{delete this._requestedCameraState}))}getCenter(){return new t.N(this.transform.center.lng,this.transform.center.lat)}setCenter(e,t){return this.jumpTo({center:e},t)}panBy(e,r,n){return e=t.P.convert(e).mult(-1),this.panTo(this.transform.center,t.e({offset:e},r),n)}panTo(e,r,n){return this.easeTo(t.e({center:e},r),n)}getZoom(){return this.transform.zoom}setZoom(e,t){return this.jumpTo({zoom:e},t),this}zoomTo(e,r,n){return this.easeTo(t.e({zoom:e},r),n)}zoomIn(e,t){return this.zoomTo(this.getZoom()+1,e,t),this}zoomOut(e,t){return this.zoomTo(this.getZoom()-1,e,t),this}getBearing(){return this.transform.bearing}setBearing(e,t){return this.jumpTo({bearing:e},t),this}getPadding(){return this.transform.padding}setPadding(e,t){return this.jumpTo({padding:e},t),this}rotateTo(e,r,n){return this.easeTo(t.e({bearing:e},r),n)}resetNorth(e,r){return this.rotateTo(0,t.e({duration:1e3},e),r),this}resetNorthPitch(e,r){return this.easeTo(t.e({bearing:0,pitch:0,duration:1e3},e),r),this}snapToNorth(e,t){return Math.abs(this.getBearing()){if(this._zooming&&(i.zoom=t.y.number(o,y,n)),this._rotating&&(i.bearing=t.y.number(s,u,n)),this._pitching&&(i.pitch=t.y.number(l,h,n)),this._padding&&(i.interpolatePadding(c,f,n),d=i.centerPoint.add(p)),this.terrain&&!e.freezeElevation&&this._updateElevation(n),v)i.setLocationAtPoint(v,x);else{let e=i.zoomScale(i.zoom-o),t=y>o?Math.min(2,w):Math.max(.5,w),r=Math.pow(t,1-n),a=i.unproject(_.add(b.mult(n*r)).mult(e));i.setLocationAtPoint(i.renderWorldCopies?a.wrap():a,d)}this._applyUpdatedTransform(i),this._fireMoveEvents(r)}),(t=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(r,t)}),e),this}_prepareEase(e,r,n={}){this._moving=!0,r||n.moving||this.fire(new t.k("movestart",e)),this._zooming&&!n.zooming&&this.fire(new t.k("zoomstart",e)),this._rotating&&!n.rotating&&this.fire(new t.k("rotatestart",e)),this._pitching&&!n.pitching&&this.fire(new t.k("pitchstart",e))}_prepareElevation(e){this._elevationCenter=e,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(e,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(e){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);let r=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(e<1&&r!==this._elevationTarget){let t=this._elevationTarget-this._elevationStart;this._elevationStart+=e*(t-(r-(t*e+this._elevationStart))/(1-e)),this._elevationTarget=r}this.transform.elevation=t.y.number(this._elevationStart,this._elevationTarget,e)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(e){let t=e.getCameraPosition(),r=this.terrain.getElevationForLngLatZoom(t.lngLat,e.zoom);if(t.altitudethis._elevateCameraIfInsideTerrain(e))),this.transformCameraUpdate&&t.push((e=>this.transformCameraUpdate(e))),!t.length)return;let r=e.clone();for(let e of t){let t=r.clone(),{center:n,zoom:i,pitch:a,bearing:o,elevation:s}=e(t);n&&(t.center=n),void 0!==i&&(t.zoom=i),void 0!==a&&(t.pitch=a),void 0!==o&&(t.bearing=o),void 0!==s&&(t.elevation=s),r.apply(t)}this.transform.apply(r)}_fireMoveEvents(e){this.fire(new t.k("move",e)),this._zooming&&this.fire(new t.k("zoom",e)),this._rotating&&this.fire(new t.k("rotate",e)),this._pitching&&this.fire(new t.k("pitch",e))}_afterEase(e,r){if(this._easeId&&r&&this._easeId===r)return;delete this._easeId;let n=this._zooming,i=this._rotating,a=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,n&&this.fire(new t.k("zoomend",e)),i&&this.fire(new t.k("rotateend",e)),a&&this.fire(new t.k("pitchend",e)),this.fire(new t.k("moveend",e))}flyTo(e,r){var n;if(!e.essential&&a.prefersReducedMotion){let n=t.M(e,["center","zoom","bearing","pitch","around"]);return this.jumpTo(n,r)}this.stop(),e=t.e({offset:[0,0],speed:1.2,curve:1.42,easing:t.b9},e);let i=this._getTransformForUpdate(),o=i.zoom,s=i.bearing,l=i.pitch,c=i.padding,u="bearing"in e?this._normalizeBearing(e.bearing,s):s,h="pitch"in e?+e.pitch:l,f="padding"in e?e.padding:i.padding,p=t.P.convert(e.offset),d=i.centerPoint.add(p),m=i.pointLocation(d),{center:g,zoom:y}=i.getConstrained(t.N.convert(e.center||m),null!==(n=e.zoom)&&void 0!==n?n:o);this._normalizeCenter(g,i);let v=i.zoomScale(y-o),x=i.project(m),_=i.project(g).sub(x),b=e.curve,w=Math.max(i.width,i.height),T=w/v,k=_.mag();if("minZoom"in e){let r=t.ac(Math.min(e.minZoom,o,y),i.minZoom,i.maxZoom),n=w/i.zoomScale(r-o);b=Math.sqrt(n/k*2)}let A=b*b;function M(e){let t=(T*T-w*w+(e?-1:1)*A*A*k*k)/(2*(e?T:w)*A*k);return Math.log(Math.sqrt(t*t+1)-t)}function S(e){return(Math.exp(e)-Math.exp(-e))/2}function E(e){return(Math.exp(e)+Math.exp(-e))/2}let C=M(!1),I=function(e){return E(C)/E(C+b*e)},L=function(e){return w*((E(C)*(S(t=C+b*e)/E(t))-S(C))/A)/k;var t},P=(M(!0)-C)/b;if(Math.abs(k)<1e-6||!isFinite(P)){if(Math.abs(w-T)<1e-6)return this.easeTo(e,r);let t=T0,I=e=>Math.exp(t*b*e)}return e.duration="duration"in e?+e.duration:1e3*P/("screenSpeed"in e?+e.screenSpeed/b:+e.speed),e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=s!==u,this._pitching=h!==l,this._padding=!i.isPaddingEqual(f),this._prepareEase(r,!1),this.terrain&&this._prepareElevation(g),this._ease((n=>{let a=n*P,m=1/I(a);i.zoom=1===n?y:o+i.scaleZoom(m),this._rotating&&(i.bearing=t.y.number(s,u,n)),this._pitching&&(i.pitch=t.y.number(l,h,n)),this._padding&&(i.interpolatePadding(c,f,n),d=i.centerPoint.add(p)),this.terrain&&!e.freezeElevation&&this._updateElevation(n);let v=1===n?g:i.unproject(x.add(_.mult(L(a))).mult(m));i.setLocationAtPoint(i.renderWorldCopies?v.wrap():v,d),this._applyUpdatedTransform(i),this._fireMoveEvents(r)}),(()=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(r)}),e),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(e,t){var r;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let e=this._onEaseEnd;delete this._onEaseEnd,e.call(this,t)}return e||null===(r=this.handlers)||void 0===r||r.stop(!1),this}_ease(e,t,r){!1===r.animate||0===r.duration?(e(1),t()):(this._easeStart=a.now(),this._easeOptions=r,this._onEaseFrame=e,this._onEaseEnd=t,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(e,r){e=t.b3(e,-180,180);let n=Math.abs(e-r);return Math.abs(e-360-r)180?-360:r<-180?360:0}queryTerrainElevation(e){return this.terrain?this.terrain.getElevationForLngLatZoom(t.N.convert(e),this.transform.tileZoom)-this.transform.elevation:null}}let Mi={compact:!0,customAttribution:'MapLibre'};class Si{constructor(e=Mi){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=e=>{!e||"metadata"!==e.sourceDataType&&"visibility"!==e.sourceDataType&&"style"!==e.dataType&&"terrain"!==e.type||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1===this._compact?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=e}getDefaultPosition(){return"bottom-right"}onAdd(e){return this._map=e,this._compact=this.options.compact,this._container=o.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=o.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=o.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){o.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(e,t){let r=this._map._getUIString(`AttributionControl.${t}`);e.title=r,e.setAttribute("aria-label",r)}_updateAttributions(){if(!this._map.style)return;let e=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?e=e.concat(this.options.customAttribution.map((e=>"string"!=typeof e?"":e))):"string"==typeof this.options.customAttribution&&e.push(this.options.customAttribution)),this._map.style.stylesheet){let e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id}let t=this._map.style.sourceCaches;for(let r in t){let n=t[r];if(n.used||n.usedForTerrain){let t=n.getSource();t.attribution&&e.indexOf(t.attribution)<0&&e.push(t.attribution)}}e=e.filter((e=>String(e).trim())),e.sort(((e,t)=>e.length-t.length)),e=e.filter(((t,r)=>{for(let n=r+1;n=0)return!1;return!0}));let r=e.join(" | ");r!==this._attribHTML&&(this._attribHTML=r,e.length?(this._innerContainer.innerHTML=r,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class Ei{constructor(e={}){this._updateCompact=()=>{let e=this._container.children;if(e.length){let t=e[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1!==this._compact&&t.classList.add("maplibregl-compact"):t.classList.remove("maplibregl-compact")}},this.options=e}getDefaultPosition(){return"bottom-left"}onAdd(e){this._map=e,this._compact=this.options&&this.options.compact,this._container=o.create("div","maplibregl-ctrl");let t=o.create("a","maplibregl-ctrl-logo");return t.target="_blank",t.rel="noopener nofollow",t.href="https://maplibre.org/",t.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),t.setAttribute("rel","noopener nofollow"),this._container.appendChild(t),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){o.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Ci{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(e){let t=++this._id;return this._queue.push({callback:e,id:t,cancelled:!1}),t}remove(e){let t=this._currentlyRunning,r=t?this._queue.concat(t):this._queue;for(let t of r)if(t.id===e)return void(t.cancelled=!0)}run(e=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let t=this._currentlyRunning=this._queue;this._queue=[];for(let r of t)if(!r.cancelled&&(r.callback(e),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Ii=t.Y([{name:"a_pos3d",type:"Int16",components:3}]);class Li extends t.E{constructor(e){super(),this.sourceCache=e,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,e.usedForTerrain=!0,e.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(e,r){this.sourceCache.update(e,r),this._renderableTilesKeys=[];let n={};for(let i of e.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:r}))n[i.key]=!0,this._renderableTilesKeys.push(i.key),this._tiles[i.key]||(i.posMatrix=new Float64Array(16),t.aP(i.posMatrix,0,t.X,0,t.X,0,1),this._tiles[i.key]=new ce(i,this.tileSize));for(let e in this._tiles)n[e]||delete this._tiles[e]}freeRtt(e){for(let t in this._tiles){let r=this._tiles[t];(!e||r.tileID.equals(e)||r.tileID.isChildOf(e)||e.isChildOf(r.tileID))&&(r.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map((e=>this.getTileByID(e)))}getTileByID(e){return this._tiles[e]}getTerrainCoords(e){let r={};for(let n of this._renderableTilesKeys){let i=this._tiles[n].tileID;if(i.canonical.equals(e.canonical)){let i=e.clone();i.posMatrix=new Float64Array(16),t.aP(i.posMatrix,0,t.X,0,t.X,0,1),r[n]=i}else if(i.canonical.isChildOf(e.canonical)){let a=e.clone();a.posMatrix=new Float64Array(16);let o=i.canonical.z-e.canonical.z,s=i.canonical.x-(i.canonical.x>>o<>o<>o;t.aP(a.posMatrix,0,c,0,c,0,1),t.J(a.posMatrix,a.posMatrix,[-s*c,-l*c,0]),r[n]=a}else if(e.canonical.isChildOf(i.canonical)){let a=e.clone();a.posMatrix=new Float64Array(16);let o=e.canonical.z-i.canonical.z,s=e.canonical.x-(e.canonical.x>>o<>o<>o;t.aP(a.posMatrix,0,t.X,0,t.X,0,1),t.J(a.posMatrix,a.posMatrix,[s*c,l*c,0]),t.K(a.posMatrix,a.posMatrix,[1/2**o,1/2**o,0]),r[n]=a}}return r}getSourceTile(e,t){let r=this.sourceCache._source,n=e.overscaledZ-this.deltaZoom;if(n>r.maxzoom&&(n=r.maxzoom),n=r.minzoom&&(!i||!i.dem);)i=this.sourceCache.getTileByID(e.scaledTo(n--).key);return i}tilesAfterTime(e=Date.now()){return Object.values(this._tiles).filter((t=>t.timeAdded>=e))}}class Pi{constructor(e,t,r){this.painter=e,this.sourceCache=new Li(t),this.options=r,this.exaggeration="number"==typeof r.exaggeration?r.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(e,r,n,i=t.X){var a;if(!(r>=0&&r=0&&ne.canonical.z&&(e.canonical.z>=n?i=e.canonical.z-n:t.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let a=e.canonical.x-(e.canonical.x>>i<>i<>8<<4|e>>8,r[t+3]=0;let n=new t.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(r.buffer)),i=new w(e,n,e.gl.RGBA,{premultiply:!1});return i.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),this._coordsTexture=i,i}pointCoordinate(e){this.painter.maybeDrawDepthAndCoords(!0);let r=new Uint8Array(4),n=this.painter.context,i=n.gl,a=Math.round(e.x*this.painter.pixelRatio/devicePixelRatio),o=Math.round(e.y*this.painter.pixelRatio/devicePixelRatio),s=Math.round(this.painter.height/devicePixelRatio);n.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),i.readPixels(a,s-o-1,1,1,i.RGBA,i.UNSIGNED_BYTE,r),n.bindFramebuffer.set(null);let l=r[0]+(r[2]>>4<<8),c=r[1]+((15&r[2])<<8),u=this.coordsIndex[255-r[3]],h=u&&this.sourceCache.getTileByID(u);if(!h)return null;let f=this._coordsTextureSize,p=(1<e.id!==t)),this._recentlyUsed.push(e.id)}stampObject(e){e.stamp=++this._stamp}getOrCreateFreeObject(){for(let e of this._recentlyUsed)if(!this._objects[e].inUse)return this._objects[e];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let e=this._createObject(this._objects.length);return this._objects.push(e),e}freeObject(e){e.inUse=!1}freeAllObjects(){for(let e of this._objects)this.freeObject(e)}isFull(){return!(this._objects.length!e.inUse))}}let Di={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Oi{constructor(e,t){this.painter=e,this.terrain=t,this.pool=new zi(e.context,30,t.sourceCache.tileSize*t.qualityFactor)}destruct(){this.pool.destruct()}getTexture(e){return this.pool.getObjectForId(e.rtt[this._stacks.length-1].id).texture}prepareForRender(e,t){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=e._order.filter((r=>!e._layers[r].isHidden(t))),this._coordsDescendingInv={};for(let t in e.sourceCaches){this._coordsDescendingInv[t]={};let r=e.sourceCaches[t].getVisibleCoordinates();for(let e of r){let r=this.terrain.sourceCache.getTerrainCoords(e);for(let e in r)this._coordsDescendingInv[t][e]||(this._coordsDescendingInv[t][e]=[]),this._coordsDescendingInv[t][e].push(r[e])}}this._coordsDescendingInvStr={};for(let t of e._order){let r=e._layers[t],n=r.source;if(Di[r.type]&&!this._coordsDescendingInvStr[n]){this._coordsDescendingInvStr[n]={};for(let e in this._coordsDescendingInv[n])this._coordsDescendingInvStr[n][e]=this._coordsDescendingInv[n][e].map((e=>e.key)).sort().join()}}for(let e of this._renderableTiles)for(let t in this._coordsDescendingInvStr){let r=this._coordsDescendingInvStr[t][e.tileID.key];r&&r!==e.rttCoords[t]&&(e.rtt=[])}}renderLayer(e){if(e.isHidden(this.painter.transform.zoom))return!1;let r=e.type,n=this.painter,i=this._renderableLayerIds[this._renderableLayerIds.length-1]===e.id;if(Di[r]&&(this._prevType&&Di[this._prevType]||this._stacks.push([]),this._prevType=r,this._stacks[this._stacks.length-1].push(e.id),!i))return!0;if(Di[this._prevType]||Di[r]&&i){this._prevType=r;let e=this._stacks.length-1,i=this._stacks[e]||[];for(let r of this._renderableTiles){if(this.pool.isFull()&&(vn(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(r),r.rtt[e]){let t=this.pool.getObjectForId(r.rtt[e].id);if(t.stamp===r.rtt[e].stamp){this.pool.useObject(t);continue}}let a=this.pool.getOrCreateFreeObject();this.pool.useObject(a),this.pool.stampObject(a),r.rtt[e]={id:a.id,stamp:a.stamp},n.context.bindFramebuffer.set(a.fbo.framebuffer),n.context.clear({color:t.aM.transparent,stencil:0}),n.currentStencilSource=void 0;for(let e=0;e{e.touchstart=e.dragStart,e.touchmoveWindow=e.dragMove,e.touchend=e.dragEnd},Ui={showCompass:!0,showZoom:!0,visualizePitch:!1};class Vi{constructor(e,r,n=!1){this.mousedown=e=>{this.startMouse(t.e({},e,{ctrlKey:!0,preventDefault:()=>e.preventDefault()}),o.mousePos(this.element,e)),o.addEventListener(window,"mousemove",this.mousemove),o.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=e=>{this.moveMouse(e,o.mousePos(this.element,e))},this.mouseup=e=>{this.mouseRotate.dragEnd(e),this.mousePitch&&this.mousePitch.dragEnd(e),this.offTemp()},this.touchstart=e=>{1!==e.targetTouches.length?this.reset():(this._startPos=this._lastPos=o.touchPos(this.element,e.targetTouches)[0],this.startTouch(e,this._startPos),o.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),o.addEventListener(window,"touchend",this.touchend))},this.touchmove=e=>{1!==e.targetTouches.length?this.reset():(this._lastPos=o.touchPos(this.element,e.targetTouches)[0],this.moveTouch(e,this._lastPos))},this.touchend=e=>{0===e.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;let i=e.dragRotate._mouseRotate.getClickTolerance(),a=e.dragRotate._mousePitch.getClickTolerance();this.element=r,this.mouseRotate=Jn({clickTolerance:i,enable:!0}),this.touchRotate=(({enable:e,clickTolerance:t,bearingDegreesPerPixelMoved:r=.8})=>{let n=new $n;return new Zn({clickTolerance:t,move:(e,t)=>({bearingDelta:(t.x-e.x)*r}),moveStateManager:n,enable:e,assignEvents:Ni})})({clickTolerance:i,enable:!0}),this.map=e,n&&(this.mousePitch=Qn({clickTolerance:a,enable:!0}),this.touchPitch=(({enable:e,clickTolerance:t,pitchDegreesPerPixelMoved:r=-.5})=>{let n=new $n;return new Zn({clickTolerance:t,move:(e,t)=>({pitchDelta:(t.y-e.y)*r}),moveStateManager:n,enable:e,assignEvents:Ni})})({clickTolerance:a,enable:!0})),o.addEventListener(r,"mousedown",this.mousedown),o.addEventListener(r,"touchstart",this.touchstart,{passive:!1}),o.addEventListener(r,"touchcancel",this.reset)}startMouse(e,t){this.mouseRotate.dragStart(e,t),this.mousePitch&&this.mousePitch.dragStart(e,t),o.disableDrag()}startTouch(e,t){this.touchRotate.dragStart(e,t),this.touchPitch&&this.touchPitch.dragStart(e,t),o.disableDrag()}moveMouse(e,t){let r=this.map,{bearingDelta:n}=this.mouseRotate.dragMove(e,t)||{};if(n&&r.setBearing(r.getBearing()+n),this.mousePitch){let{pitchDelta:n}=this.mousePitch.dragMove(e,t)||{};n&&r.setPitch(r.getPitch()+n)}}moveTouch(e,t){let r=this.map,{bearingDelta:n}=this.touchRotate.dragMove(e,t)||{};if(n&&r.setBearing(r.getBearing()+n),this.touchPitch){let{pitchDelta:n}=this.touchPitch.dragMove(e,t)||{};n&&r.setPitch(r.getPitch()+n)}}off(){let e=this.element;o.removeEventListener(e,"mousedown",this.mousedown),o.removeEventListener(e,"touchstart",this.touchstart,{passive:!1}),o.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),o.removeEventListener(window,"touchend",this.touchend),o.removeEventListener(e,"touchcancel",this.reset),this.offTemp()}offTemp(){o.enableDrag(),o.removeEventListener(window,"mousemove",this.mousemove),o.removeEventListener(window,"mouseup",this.mouseup),o.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),o.removeEventListener(window,"touchend",this.touchend)}}function qi(e,r,n){let i=new t.N(e.lng,e.lat);if(e=new t.N(e.lng,e.lat),r){let i=new t.N(e.lng-360,e.lat),a=new t.N(e.lng+360,e.lat),o=n.locationPoint(e).distSqr(r);n.locationPoint(i).distSqr(r)180;){let t=n.locationPoint(e);if(t.x>=0&&t.y>=0&&t.x<=n.width&&t.y<=n.height)break;e.lng>n.center.lng?e.lng-=360:e.lng+=360}return e.lng!==i.lng&&n.locationPoint(e).y>n.height/2-n.getHorizon()?e:i}let Hi={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Gi(e,t,r){let n=e.classList;for(let e in Hi)n.remove(`maplibregl-${r}-anchor-${e}`);n.add(`maplibregl-${r}-anchor-${t}`)}class Wi extends t.E{constructor(e){if(super(),this._onKeyPress=e=>{let t=e.code,r=e.charCode||e.keyCode;"Space"!==t&&"Enter"!==t&&32!==r&&13!==r||this.togglePopup()},this._onMapClick=e=>{let t=e.originalEvent.target,r=this._element;this._popup&&(t===r||r.contains(t))&&this.togglePopup()},this._update=e=>{var t;if(!this._map)return;let r=this._map.loaded()&&!this._map.isMoving();("terrain"===e?.type||"render"===e?.type&&!r)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?qi(this._lngLat,this._flatPos,this._map.transform):null===(t=this._lngLat)||void 0===t?void 0:t.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let n="";"viewport"===this._rotationAlignment||"auto"===this._rotationAlignment?n=`rotateZ(${this._rotation}deg)`:"map"===this._rotationAlignment&&(n=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let i="";"viewport"===this._pitchAlignment||"auto"===this._pitchAlignment?i="rotateX(0deg)":"map"===this._pitchAlignment&&(i=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||e&&"moveend"!==e.type||(this._pos=this._pos.round()),o.setTransform(this._element,`${Hi[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${i} ${n}`),a.frameAsync(new AbortController).then((()=>{this._updateOpacity(e&&"moveend"===e.type)})).catch((()=>{}))},this._onMove=e=>{if(!this._isDragging){let t=this._clickTolerance||this._map._clickTolerance;this._isDragging=e.point.dist(this._pointerdownPos)>=t}this._isDragging&&(this._pos=e.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new t.k("dragstart"))),this.fire(new t.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new t.k("dragend")),this._state="inactive"},this._addDragHandler=e=>{this._element.contains(e.originalEvent.target)&&(e.preventDefault(),this._positionDelta=e.point.sub(this._pos).add(this._offset),this._pointerdownPos=e.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=e&&e.anchor||"center",this._color=e&&e.color||"#3FB1CE",this._scale=e&&e.scale||1,this._draggable=e&&e.draggable||!1,this._clickTolerance=e&&e.clickTolerance||0,this._subpixelPositioning=e&&e.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=e&&e.rotation||0,this._rotationAlignment=e&&e.rotationAlignment||"auto",this._pitchAlignment=e&&e.pitchAlignment&&"auto"!==e.pitchAlignment?e.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(e?.opacity,e?.opacityWhenCovered),e&&e.element)this._element=e.element,this._offset=t.P.convert(e&&e.offset||[0,0]);else{this._defaultMarker=!0,this._element=o.create("div");let r=o.createNS("http://www.w3.org/2000/svg","svg"),n=41,i=27;r.setAttributeNS(null,"display","block"),r.setAttributeNS(null,"height",`${n}px`),r.setAttributeNS(null,"width",`${i}px`),r.setAttributeNS(null,"viewBox",`0 0 ${i} ${n}`);let a=o.createNS("http://www.w3.org/2000/svg","g");a.setAttributeNS(null,"stroke","none"),a.setAttributeNS(null,"stroke-width","1"),a.setAttributeNS(null,"fill","none"),a.setAttributeNS(null,"fill-rule","evenodd");let s=o.createNS("http://www.w3.org/2000/svg","g");s.setAttributeNS(null,"fill-rule","nonzero");let l=o.createNS("http://www.w3.org/2000/svg","g");l.setAttributeNS(null,"transform","translate(3.0, 29.0)"),l.setAttributeNS(null,"fill","#000000");let c=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(let e of c){let t=o.createNS("http://www.w3.org/2000/svg","ellipse");t.setAttributeNS(null,"opacity","0.04"),t.setAttributeNS(null,"cx","10.5"),t.setAttributeNS(null,"cy","5.80029008"),t.setAttributeNS(null,"rx",e.rx),t.setAttributeNS(null,"ry",e.ry),l.appendChild(t)}let u=o.createNS("http://www.w3.org/2000/svg","g");u.setAttributeNS(null,"fill",this._color);let h=o.createNS("http://www.w3.org/2000/svg","path");h.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),u.appendChild(h);let f=o.createNS("http://www.w3.org/2000/svg","g");f.setAttributeNS(null,"opacity","0.25"),f.setAttributeNS(null,"fill","#000000");let p=o.createNS("http://www.w3.org/2000/svg","path");p.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),f.appendChild(p);let d=o.createNS("http://www.w3.org/2000/svg","g");d.setAttributeNS(null,"transform","translate(6.0, 7.0)"),d.setAttributeNS(null,"fill","#FFFFFF");let m=o.createNS("http://www.w3.org/2000/svg","g");m.setAttributeNS(null,"transform","translate(8.0, 8.0)");let g=o.createNS("http://www.w3.org/2000/svg","circle");g.setAttributeNS(null,"fill","#000000"),g.setAttributeNS(null,"opacity","0.25"),g.setAttributeNS(null,"cx","5.5"),g.setAttributeNS(null,"cy","5.5"),g.setAttributeNS(null,"r","5.4999962");let y=o.createNS("http://www.w3.org/2000/svg","circle");y.setAttributeNS(null,"fill","#FFFFFF"),y.setAttributeNS(null,"cx","5.5"),y.setAttributeNS(null,"cy","5.5"),y.setAttributeNS(null,"r","5.4999962"),m.appendChild(g),m.appendChild(y),s.appendChild(l),s.appendChild(u),s.appendChild(f),s.appendChild(d),s.appendChild(m),r.appendChild(s),r.setAttributeNS(null,"height",n*this._scale+"px"),r.setAttributeNS(null,"width",i*this._scale+"px"),this._element.appendChild(r),this._offset=t.P.convert(e&&e.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",(e=>{e.preventDefault()})),this._element.addEventListener("mousedown",(e=>{e.preventDefault()})),Gi(this._element,this._anchor,"marker"),e&&e.className)for(let t of e.className.split(" "))this._element.classList.add(t);this._popup=null}addTo(e){return this.remove(),this._map=e,this._element.setAttribute("aria-label",e._getUIString("Marker.Title")),e.getCanvasContainer().appendChild(this._element),e.on("move",this._update),e.on("moveend",this._update),e.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),o.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=t.N.convert(e),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(e){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),e){if(!("offset"in e.options)){let t=Math.abs(13.5)/Math.SQRT2;e.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[t,-1*(24.6+t)],"bottom-right":[-t,-1*(24.6+t)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=e,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(e){return this._subpixelPositioning=e,this}getPopup(){return this._popup}togglePopup(){let e=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:e?(e.isOpen()?e.remove():(e.setLngLat(this._lngLat),e.addTo(this._map)),this):this}_updateOpacity(e=!1){var r,n;if(null===(r=this._map)||void 0===r||!r.terrain)return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(e)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout((()=>{this._opacityTimeout=null}),100)}let i=this._map,a=i.terrain.depthAtPoint(this._pos),o=i.terrain.getElevationForLngLatZoom(this._lngLat,i.transform.tileZoom);if(i.transform.lngLatToCameraDepth(this._lngLat,o)-a<.006)return void(this._element.style.opacity=this._opacity);let s=-this._offset.y/i.transform._pixelPerMeter,l=Math.sin(i.getPitch()*Math.PI/180)*s,c=i.terrain.depthAtPoint(new t.P(this._pos.x,this._pos.y-this._offset.y)),u=i.transform.lngLatToCameraDepth(this._lngLat,o+l)-c>.006;!(null===(n=this._popup)||void 0===n)&&n.isOpen()&&u&&this._popup.remove(),this._element.style.opacity=u?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(e){return this._offset=t.P.convert(e),this._update(),this}addClassName(e){this._element.classList.add(e)}removeClassName(e){this._element.classList.remove(e)}toggleClassName(e){return this._element.classList.toggle(e)}setDraggable(e){return this._draggable=!!e,this._map&&(e?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(e){return this._rotation=e||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(e){return this._rotationAlignment=e||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(e){return this._pitchAlignment=e&&"auto"!==e?e:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(e,t){return void 0===e&&void 0===t&&(this._opacity="1",this._opacityWhenCovered="0.2"),void 0!==e&&(this._opacity=e),void 0!==t&&(this._opacityWhenCovered=t),this._map&&this._updateOpacity(!0),this}}let Zi={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Yi=0,Xi=!1,$i={maxWidth:100,unit:"metric"};function Ki(e,t,r){let n=r&&r.maxWidth||100,i=e._container.clientHeight/2,a=e.unproject([0,i]),o=e.unproject([n,i]),s=a.distanceTo(o);if(r&&"imperial"===r.unit){let r=3.2808*s;r>5280?Ji(t,n,r/5280,e._getUIString("ScaleControl.Miles")):Ji(t,n,r,e._getUIString("ScaleControl.Feet"))}else r&&"nautical"===r.unit?Ji(t,n,s/1852,e._getUIString("ScaleControl.NauticalMiles")):s>=1e3?Ji(t,n,s/1e3,e._getUIString("ScaleControl.Kilometers")):Ji(t,n,s,e._getUIString("ScaleControl.Meters"))}function Ji(e,t,r,n){let i=function(e){let t=Math.pow(10,`${Math.floor(e)}`.length-1),r=e/t;return r=r>=10?10:r>=5?5:r>=3?3:r>=2?2:r>=1?1:function(e){let t=Math.pow(10,Math.ceil(-Math.log(e)/Math.LN10));return Math.round(e*t)/t}(r),t*r}(r);e.style.width=t*(i/r)+"px",e.innerHTML=`${i} ${n}`}let Qi={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},ea=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function ta(e){if(e){if("number"==typeof e){let r=Math.round(Math.abs(e)/Math.SQRT2);return{center:new t.P(0,0),top:new t.P(0,e),"top-left":new t.P(r,r),"top-right":new t.P(-r,r),bottom:new t.P(0,-e),"bottom-left":new t.P(r,-r),"bottom-right":new t.P(-r,-r),left:new t.P(e,0),right:new t.P(-e,0)}}if(e instanceof t.P||Array.isArray(e)){let r=t.P.convert(e);return{center:r,top:r,"top-left":r,"top-right":r,bottom:r,"bottom-left":r,"bottom-right":r,left:r,right:r}}return{center:t.P.convert(e.center||[0,0]),top:t.P.convert(e.top||[0,0]),"top-left":t.P.convert(e["top-left"]||[0,0]),"top-right":t.P.convert(e["top-right"]||[0,0]),bottom:t.P.convert(e.bottom||[0,0]),"bottom-left":t.P.convert(e["bottom-left"]||[0,0]),"bottom-right":t.P.convert(e["bottom-right"]||[0,0]),left:t.P.convert(e.left||[0,0]),right:t.P.convert(e.right||[0,0])}}return ta(new t.P(0,0))}let ra=r;e.AJAXError=t.bh,e.Evented=t.E,e.LngLat=t.N,e.MercatorCoordinate=t.Z,e.Point=t.P,e.addProtocol=t.bi,e.config=t.a,e.removeProtocol=t.bj,e.AttributionControl=Si,e.BoxZoomHandler=Vn,e.CanvasSource=re,e.CooperativeGesturesHandler=_i,e.DoubleClickZoomHandler=di,e.DragPanHandler=yi,e.DragRotateHandler=vi,e.EdgeInsets=Tn,e.FullscreenControl=class extends t.E{constructor(e={}){super(),this._onFullscreenChange=()=>{var e;let t=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;null!==(e=t?.shadowRoot)&&void 0!==e&&e.fullscreenElement;)t=t.shadowRoot.fullscreenElement;t===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,e&&e.container&&(e.container instanceof HTMLElement?this._container=e.container:t.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=o.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){o.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let e=this._fullscreenButton=o.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);o.create("span","maplibregl-ctrl-icon",e).setAttribute("aria-hidden","true"),e.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let e=this._getTitle();this._fullscreenButton.setAttribute("aria-label",e),this._fullscreenButton.title=e}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new t.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new t.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},e.GeoJSONSource=J,e.GeolocateControl=class extends t.E{constructor(e){super(),this._onSuccess=e=>{if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new t.k("outofmaxbounds",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(e),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new t.k("geolocate",e)),this._finish()}},this._updateCamera=e=>{let r=new t.N(e.coords.longitude,e.coords.latitude),n=e.coords.accuracy,i=this._map.getBearing(),a=t.e({bearing:i},this.options.fitBoundsOptions),o=Z.fromLngLat(r,n);this._map.fitBounds(o,a,{geolocateSource:!0})},this._updateMarker=e=>{if(e){let r=new t.N(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=e.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=e=>{if(this._map){if(this.options.trackUserLocation)if(1===e.code){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;let e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===e.code&&Xi)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new t.k("error",e)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",(e=>e.preventDefault())),this._geolocateButton=o.create("button","maplibregl-ctrl-geolocate",this._container),o.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=e=>{if(this._map){if(!1===e){t.w("Geolocation support is not available so the GeolocateControl will be disabled.");let e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e)}else{let e=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=o.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Wi({element:this._dotElement}),this._circleElement=o.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Wi({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",(()=>this.trigger())),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(e=>{e.geolocateSource||"ACTIVE_LOCK"!==this._watchState||e.originalEvent&&"resize"===e.originalEvent.type||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new t.k("trackuserlocationend")),this.fire(new t.k("userlocationlostfocus")))}))}},this.options=t.e({},Zi,e)}onAdd(e){return this._map=e,this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return t._(this,arguments,void 0,(function*(e=!1){if(void 0!==Ri&&!e)return Ri;if(void 0===window.navigator.permissions)return Ri=!!window.navigator.geolocation,Ri;try{Ri="denied"!==(yield window.navigator.permissions.query({name:"geolocation"})).state}catch{Ri=!!window.navigator.geolocation}return Ri}))}().then((e=>this._finishSetupUI(e))),this._container}onRemove(){void 0!==this._geolocationWatchID&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),o.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Yi=0,Xi=!1}_isOutOfMapMaxBounds(e){let t=this._map.getMaxBounds(),r=e.coords;return t&&(r.longitudet.getEast()||r.latitudet.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){let e=this._map.getBounds(),t=e.getSouthEast(),r=e.getNorthEast(),n=t.distanceTo(r),i=Math.ceil(this._accuracy/(n/this._map._container.clientHeight)*2);this._circleElement.style.width=`${i}px`,this._circleElement.style.height=`${i}px`}trigger(){if(!this._setup)return t.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new t.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Yi--,Xi=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new t.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.k("trackuserlocationstart")),this.fire(new t.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){let e;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Yi++,Yi>1?(e={maximumAge:6e5,timeout:0},Xi=!0):(e=this.options.positionOptions,Xi=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},e.Hash=Sn,e.ImageSource=ee,e.KeyboardHandler=ui,e.LngLatBounds=Z,e.LogoControl=Ei,e.Map=class extends Ai{constructor(e){t.bf.mark(t.bg.create);let r=Object.assign(Object.assign({},ji),e);if(null!=r.minZoom&&null!=r.maxZoom&&r.minZoom>r.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=r.minPitch&&null!=r.maxPitch&&r.minPitch>r.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=r.minPitch&&r.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=r.maxPitch&&r.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new An(r.minZoom,r.maxZoom,r.minPitch,r.maxPitch,r.renderWorldCopies),{bearingSnap:r.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Ci,this._controls=[],this._mapId=t.a4(),this._contextLost=e=>{e.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new t.k("webglcontextlost",{originalEvent:e}))},this._contextRestored=e=>{this._setupPainter(),this.resize(),this._update(),this.fire(new t.k("webglcontextrestored",{originalEvent:e}))},this._onMapScroll=e=>{if(e.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=r.interactive,this._maxTileCacheSize=r.maxTileCacheSize,this._maxTileCacheZoomLevels=r.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=!0===r.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=!0===r.preserveDrawingBuffer,this._antialias=!0===r.antialias,this._trackResize=!0===r.trackResize,this._bearingSnap=r.bearingSnap,this._refreshExpiredTiles=!0===r.refreshExpiredTiles,this._fadeDuration=r.fadeDuration,this._crossSourceCollisions=!0===r.crossSourceCollisions,this._collectResourceTiming=!0===r.collectResourceTiming,this._locale=Object.assign(Object.assign({},Fi),r.locale),this._clickTolerance=r.clickTolerance,this._overridePixelRatio=r.pixelRatio,this._maxCanvasSize=r.maxCanvasSize,this.transformCameraUpdate=r.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=!0===r.cancelPendingTileRequestsWhileZooming,this._imageQueueHandle=p.addThrottleControl((()=>this.isMoving())),this._requestManager=new d(r.transformRequest),"string"==typeof r.container){if(this._container=document.getElementById(r.container),!this._container)throw new Error(`Container '${r.container}' not found.`)}else{if(!(r.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=r.container}if(r.maxBounds&&this.setMaxBounds(r.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",(()=>this._update(!1))).on("moveend",(()=>this._update(!1))).on("zoom",(()=>this._update(!0))).on("terrain",(()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)})).once("idle",(()=>{this._idleTriggered=!0})),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let e=!1,t=Mn((e=>{this._trackResize&&!this._removed&&(this.resize(e),this.redraw())}),50);this._resizeObserver=new ResizeObserver((r=>{e?t(r):e=!0})),this._resizeObserver.observe(this._container)}this.handlers=new ki(this,r),this._hash=r.hash&&new Sn("string"==typeof r.hash&&r.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:r.center,zoom:r.zoom,bearing:r.bearing,pitch:r.pitch}),r.bounds&&(this.resize(),this.fitBounds(r.bounds,t.e({},r.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=r.localIdeographFontFamily,this._validateStyle=r.validateStyle,r.style&&this.setStyle(r.style,{localIdeographFontFamily:r.localIdeographFontFamily}),r.attributionControl&&this.addControl(new Si("boolean"==typeof r.attributionControl?void 0:r.attributionControl)),r.maplibreLogo&&this.addControl(new Ei,r.logoPosition),this.on("style.load",(()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)})),this.on("data",(e=>{this._update("style"===e.dataType),this.fire(new t.k(`${e.dataType}data`,e))})),this.on("dataloading",(e=>{this.fire(new t.k(`${e.dataType}dataloading`,e))})),this.on("dataabort",(e=>{this.fire(new t.k("sourcedataabort",e))}))}_getMapId(){return this._mapId}addControl(e,r){if(void 0===r&&(r=e.getDefaultPosition?e.getDefaultPosition():"top-right"),!e||!e.onAdd)return this.fire(new t.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let n=e.onAdd(this);this._controls.push(e);let i=this._controlPositions[r];return-1!==r.indexOf("bottom")?i.insertBefore(n,i.firstChild):i.appendChild(n),this}removeControl(e){if(!e||!e.onRemove)return this.fire(new t.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let r=this._controls.indexOf(e);return r>-1&&this._controls.splice(r,1),e.onRemove(this),this}hasControl(e){return this._controls.indexOf(e)>-1}calculateCameraOptionsFromTo(e,t,r,n){return null==n&&this.terrain&&(n=this.terrain.getElevationForLngLatZoom(r,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(e,t,r,n)}resize(e){var r;let n=this._containerDimensions(),i=n[0],a=n[1],o=this._getClampedPixelRatio(i,a);if(this._resizeCanvas(i,a,o),this.painter.resize(i,a,o),this.painter.overLimit()){let e=this.painter.context.gl;this._maxCanvasSize=[e.drawingBufferWidth,e.drawingBufferHeight];let t=this._getClampedPixelRatio(i,a);this._resizeCanvas(i,a,t),this.painter.resize(i,a,t)}this.transform.resize(i,a),null===(r=this._requestedCameraState)||void 0===r||r.resize(i,a);let s=!this._moving;return s&&(this.stop(),this.fire(new t.k("movestart",e)).fire(new t.k("move",e))),this.fire(new t.k("resize",e)),s&&this.fire(new t.k("moveend",e)),this}_getClampedPixelRatio(e,t){let{0:r,1:n}=this._maxCanvasSize,i=this.getPixelRatio(),a=e*i,o=t*i;return Math.min(a>r?r/a:1,o>n?n/o:1)*i}getPixelRatio(){var e;return null!==(e=this._overridePixelRatio)&&void 0!==e?e:devicePixelRatio}setPixelRatio(e){this._overridePixelRatio=e,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(e){return this.transform.setMaxBounds(Z.convert(e)),this._update()}setMinZoom(e){if((e=e??-2)>=-2&&e<=this.transform.maxZoom)return this.transform.minZoom=e,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=e,this._update(),this.getZoom()>e&&this.setZoom(e),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(e){if((e=e??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(e>=0&&e<=this.transform.maxPitch)return this.transform.minPitch=e,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(e>=this.transform.minPitch)return this.transform.maxPitch=e,this._update(),this.getPitch()>e&&this.setPitch(e),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(e){return this.transform.renderWorldCopies=e,this._update()}project(e){return this.transform.locationPoint(t.N.convert(e),this.style&&this.terrain)}unproject(e){return this.transform.pointLocation(t.P.convert(e),this.terrain)}isMoving(){var e;return this._moving||(null===(e=this.handlers)||void 0===e?void 0:e.isMoving())}isZooming(){var e;return this._zooming||(null===(e=this.handlers)||void 0===e?void 0:e.isZooming())}isRotating(){var e;return this._rotating||(null===(e=this.handlers)||void 0===e?void 0:e.isRotating())}_createDelegatedListener(e,t,r){if("mouseenter"===e||"mouseover"===e){let n=!1;return{layers:t,listener:r,delegates:{mousemove:i=>{let a=t.filter((e=>this.getLayer(e))),o=0!==a.length?this.queryRenderedFeatures(i.point,{layers:a}):[];o.length?n||(n=!0,r.call(this,new Rn(e,this,i.originalEvent,{features:o}))):n=!1},mouseout:()=>{n=!1}}}}if("mouseleave"===e||"mouseout"===e){let n=!1;return{layers:t,listener:r,delegates:{mousemove:i=>{let a=t.filter((e=>this.getLayer(e)));(0!==a.length?this.queryRenderedFeatures(i.point,{layers:a}):[]).length?n=!0:n&&(n=!1,r.call(this,new Rn(e,this,i.originalEvent)))},mouseout:t=>{n&&(n=!1,r.call(this,new Rn(e,this,t.originalEvent)))}}}}{let n=e=>{let n=t.filter((e=>this.getLayer(e))),i=0!==n.length?this.queryRenderedFeatures(e.point,{layers:n}):[];i.length&&(e.features=i,r.call(this,e),delete e.features)};return{layers:t,listener:r,delegates:{[e]:n}}}}_saveDelegatedListener(e,t){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[e]=this._delegatedListeners[e]||[],this._delegatedListeners[e].push(t)}_removeDelegatedListener(e,t,r){if(!this._delegatedListeners||!this._delegatedListeners[e])return;let n=this._delegatedListeners[e];for(let e=0;et.includes(e)))){for(let e in i.delegates)this.off(e,i.delegates[e]);return void n.splice(e,1)}}}on(e,t,r){if(void 0===r)return super.on(e,t);let n=this._createDelegatedListener(e,"string"==typeof t?[t]:t,r);this._saveDelegatedListener(e,n);for(let e in n.delegates)this.on(e,n.delegates[e]);return this}once(e,t,r){if(void 0===r)return super.once(e,t);let n="string"==typeof t?[t]:t,i=this._createDelegatedListener(e,n,r);for(let t in i.delegates){let a=i.delegates[t];i.delegates[t]=(...t)=>{this._removeDelegatedListener(e,n,r),a(...t)}}this._saveDelegatedListener(e,i);for(let e in i.delegates)this.once(e,i.delegates[e]);return this}off(e,t,r){return void 0===r?super.off(e,t):(this._removeDelegatedListener(e,"string"==typeof t?[t]:t,r),this)}queryRenderedFeatures(e,r){if(!this.style)return[];let n,i=e instanceof t.P||Array.isArray(e),a=i?e:[[0,0],[this.transform.width,this.transform.height]];if(r=r||(i?{}:e)||{},a instanceof t.P||"number"==typeof a[0])n=[t.P.convert(a)];else{let e=t.P.convert(a[0]),r=t.P.convert(a[1]);n=[e,new t.P(r.x,e.y),r,new t.P(e.x,r.y),e]}return this.style.queryRenderedFeatures(n,r,this.transform)}querySourceFeatures(e,t){return this.style.querySourceFeatures(e,t)}setStyle(e,r){return!1!==(r=t.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},r)).diff&&r.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&e?(this._diffStyle(e,r),this):(this._localIdeographFontFamily=r.localIdeographFontFamily,this._updateStyle(e,r))}setTransformRequest(e){return this._requestManager.setTransformRequest(e),this}_getUIString(e){let t=this._locale[e];if(null==t)throw new Error(`Missing UI string '${e}'`);return t}_updateStyle(e,t){if(t.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",(()=>this._updateStyle(e,t)));let r=this.style&&t.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!e)),e?(this.style=new pt(this,t||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof e?this.style.loadURL(e,t,r):this.style.loadJSON(e,t,r),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new pt(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(e,r){if("string"==typeof e){let n=this._requestManager.transformRequest(e,"Style");t.h(n,new AbortController).then((e=>{this._updateDiff(e.data,r)})).catch((e=>{e&&this.fire(new t.j(e))}))}else"object"==typeof e&&this._updateDiff(e,r)}_updateDiff(e,r){try{this.style.setState(e,r)&&this._update(!0)}catch(n){t.w(`Unable to perform style diff: ${n.message||n.error||n}. Rebuilding the style from scratch.`),this._updateStyle(e,r)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():t.w("There is no style added to the map.")}addSource(e,t){return this._lazyInitEmptyStyle(),this.style.addSource(e,t),this._update(!0)}isSourceLoaded(e){let r=this.style&&this.style.sourceCaches[e];if(void 0!==r)return r.loaded();this.fire(new t.j(new Error(`There is no source with ID '${e}'`)))}setTerrain(e){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),e){let r=this.style.sourceCaches[e.source];if(!r)throw new Error(`cannot load terrain, because there exists no source with ID: ${e.source}`);null===this.terrain&&r.reload();for(let r in this.style._layers){let n=this.style._layers[r];"hillshade"===n.type&&n.source===e.source&&t.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Pi(this.painter,r,e),this.painter.renderToTexture=new Oi(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=t=>{"style"===t.dataType?this.terrain.sourceCache.freeRtt():"source"===t.dataType&&t.tile&&(t.sourceId!==e.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(t.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new t.k("terrain",{terrain:e})),this}getTerrain(){var e,t;return null!==(t=null===(e=this.terrain)||void 0===e?void 0:e.options)&&void 0!==t?t:null}areTilesLoaded(){let e=this.style&&this.style.sourceCaches;for(let t in e){let r=e[t]._tiles;for(let e in r){let t=r[e];if("loaded"!==t.state&&"errored"!==t.state)return!1}}return!0}removeSource(e){return this.style.removeSource(e),this._update(!0)}getSource(e){return this.style.getSource(e)}addImage(e,r,n={}){let{pixelRatio:i=1,sdf:o=!1,stretchX:s,stretchY:l,content:c,textFitWidth:u,textFitHeight:h}=n;if(this._lazyInitEmptyStyle(),!(r instanceof HTMLImageElement||t.b(r))){if(void 0===r.width||void 0===r.height)return this.fire(new t.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{let{width:n,height:a,data:f}=r,p=r;return this.style.addImage(e,{data:new t.R({width:n,height:a},new Uint8Array(f)),pixelRatio:i,stretchX:s,stretchY:l,content:c,textFitWidth:u,textFitHeight:h,sdf:o,version:0,userImage:p}),p.onAdd&&p.onAdd(this,e),this}}{let{width:n,height:f,data:p}=a.getImageData(r);this.style.addImage(e,{data:new t.R({width:n,height:f},p),pixelRatio:i,stretchX:s,stretchY:l,content:c,textFitWidth:u,textFitHeight:h,sdf:o,version:0})}}updateImage(e,r){let n=this.style.getImage(e);if(!n)return this.fire(new t.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let i=r instanceof HTMLImageElement||t.b(r)?a.getImageData(r):r,{width:o,height:s,data:l}=i;if(void 0===o||void 0===s)return this.fire(new t.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(o!==n.data.width||s!==n.data.height)return this.fire(new t.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));let c=!(r instanceof HTMLImageElement||t.b(r));return n.data.replace(l,c),this.style.updateImage(e,n),this}getImage(e){return this.style.getImage(e)}hasImage(e){return e?!!this.style.getImage(e):(this.fire(new t.j(new Error("Missing required image id"))),!1)}removeImage(e){this.style.removeImage(e)}loadImage(e){return p.getImage(this._requestManager.transformRequest(e,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(e,t){return this._lazyInitEmptyStyle(),this.style.addLayer(e,t),this._update(!0)}moveLayer(e,t){return this.style.moveLayer(e,t),this._update(!0)}removeLayer(e){return this.style.removeLayer(e),this._update(!0)}getLayer(e){return this.style.getLayer(e)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(e,t,r){return this.style.setLayerZoomRange(e,t,r),this._update(!0)}setFilter(e,t,r={}){return this.style.setFilter(e,t,r),this._update(!0)}getFilter(e){return this.style.getFilter(e)}setPaintProperty(e,t,r,n={}){return this.style.setPaintProperty(e,t,r,n),this._update(!0)}getPaintProperty(e,t){return this.style.getPaintProperty(e,t)}setLayoutProperty(e,t,r,n={}){return this.style.setLayoutProperty(e,t,r,n),this._update(!0)}getLayoutProperty(e,t){return this.style.getLayoutProperty(e,t)}setGlyphs(e,t={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(e,t),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(e,t,r={}){return this._lazyInitEmptyStyle(),this.style.addSprite(e,t,r,(e=>{e||this._update(!0)})),this}removeSprite(e){return this._lazyInitEmptyStyle(),this.style.removeSprite(e),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(e,t={}){return this._lazyInitEmptyStyle(),this.style.setSprite(e,t,(e=>{e||this._update(!0)})),this}setLight(e,t={}){return this._lazyInitEmptyStyle(),this.style.setLight(e,t),this._update(!0)}getLight(){return this.style.getLight()}setSky(e){return this._lazyInitEmptyStyle(),this.style.setSky(e),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(e,t){return this.style.setFeatureState(e,t),this._update()}removeFeatureState(e,t){return this.style.removeFeatureState(e,t),this._update()}getFeatureState(e){return this.style.getFeatureState(e)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let e=0,t=0;return this._container&&(e=this._container.clientWidth||400,t=this._container.clientHeight||300),[e,t]}_setupContainer(){let e=this._container;e.classList.add("maplibregl-map");let t=this._canvasContainer=o.create("div","maplibregl-canvas-container",e);this._interactive&&t.classList.add("maplibregl-interactive"),this._canvas=o.create("canvas","maplibregl-canvas",t),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");let r=this._containerDimensions(),n=this._getClampedPixelRatio(r[0],r[1]);this._resizeCanvas(r[0],r[1],n);let i=this._controlContainer=o.create("div","maplibregl-control-container",e),a=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach((e=>{a[e]=o.create("div",`maplibregl-ctrl-${e} `,i)})),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(e,t,r){this._canvas.width=Math.floor(r*e),this._canvas.height=Math.floor(r*t),this._canvas.style.width=`${e}px`,this._canvas.style.height=`${t}px`}_setupPainter(){let e={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1},t=null;this._canvas.addEventListener("webglcontextcreationerror",(r=>{t={requestedAttributes:e},r&&(t.statusMessage=r.statusMessage,t.type=r.type)}),{once:!0});let r=this._canvas.getContext("webgl2",e)||this._canvas.getContext("webgl",e);if(!r){let e="Failed to initialize WebGL";throw t?(t.message=e,new Error(JSON.stringify(t))):new Error(e)}this.painter=new _n(r,this.transform),c.testSupport(r)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(e){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||e,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(e){return this._update(),this._renderTaskQueue.add(e)}_cancelRenderFrame(e){this._renderTaskQueue.remove(e)}_render(e){let r=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(e),this._removed)return;let n=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let e=this.transform.zoom,i=a.now();this.style.zoomHistory.update(e,i);let o=new t.z(e,{now:i,fadeDuration:r,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),s=o.crossFadingFactor();1===s&&s===this._crossFadingFactor||(n=!0,this._crossFadingFactor=s),this.style.update(o)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,r,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:r,showPadding:this.showPadding}),this.fire(new t.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,t.bf.mark(t.bg.load),this.fire(new t.k("load"))),this.style&&(this.style.hasTransitions()||n)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let i=this._sourcesDirty||this._styleDirty||this._placementDirty;return i||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new t.k("idle")),!this._loaded||this._fullyLoaded||i||(this._fullyLoaded=!0,t.bf.mark(t.bg.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var e;this._hash&&this._hash.remove();for(let e of this._controls)e.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),p.removeThrottleControl(this._imageQueueHandle),null===(e=this._resizeObserver)||void 0===e||e.disconnect();let r=this.painter.context.gl.getExtension("WEBGL_lose_context");r?.loseContext&&r.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),o.remove(this._canvasContainer),o.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),t.bf.clearMetrics(),this._removed=!0,this.fire(new t.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,a.frameAsync(this._frameRequest).then((e=>{t.bf.frame(e),this._frameRequest=null,this._render(e)})).catch((()=>{})))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(e){this._showTileBoundaries!==e&&(this._showTileBoundaries=e,this._update())}get showPadding(){return!!this._showPadding}set showPadding(e){this._showPadding!==e&&(this._showPadding=e,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(e){this._showCollisionBoxes!==e&&(this._showCollisionBoxes=e,e?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(e){this._showOverdrawInspector!==e&&(this._showOverdrawInspector=e,this._update())}get repaint(){return!!this._repaint}set repaint(e){this._repaint!==e&&(this._repaint=e,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(e){this._vertices=e,this._update()}get version(){return Bi}getCameraTargetElevation(){return this.transform.elevation}},e.MapMouseEvent=Rn,e.MapTouchEvent=Fn,e.MapWheelEvent=Bn,e.Marker=Wi,e.NavigationControl=class{constructor(e){this._updateZoomButtons=()=>{let e=this._map.getZoom(),t=e===this._map.getMaxZoom(),r=e===this._map.getMinZoom();this._zoomInButton.disabled=t,this._zoomOutButton.disabled=r,this._zoomInButton.setAttribute("aria-disabled",t.toString()),this._zoomOutButton.setAttribute("aria-disabled",r.toString())},this._rotateCompassArrow=()=>{let e=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=e},this._setButtonTitle=(e,t)=>{let r=this._map._getUIString(`NavigationControl.${t}`);e.title=r,e.setAttribute("aria-label",r)},this.options=t.e({},Ui,e),this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",(e=>e.preventDefault())),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",(e=>this._map.zoomIn({},{originalEvent:e}))),o.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",(e=>this._map.zoomOut({},{originalEvent:e}))),o.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",(e=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:e}):this._map.resetNorth({},{originalEvent:e})})),this._compassIcon=o.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(e){return this._map=e,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Vi(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){o.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(e,t){let r=o.create("button",e,this._container);return r.type="button",r.addEventListener("click",t),r}},e.Popup=class extends t.E{constructor(e){super(),this.remove=()=>(this._content&&o.remove(this._content),this._container&&(o.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new t.k("close"))),this),this._onMouseUp=e=>{this._update(e.point)},this._onMouseMove=e=>{this._update(e.point)},this._onDrag=e=>{this._update(e.point)},this._update=e=>{var t;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=o.create("div","maplibregl-popup",this._map.getContainer()),this._tip=o.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let e of this.options.className.split(" "))this._container.classList.add(e);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?qi(this._lngLat,this._flatPos,this._map.transform):null===(t=this._lngLat)||void 0===t?void 0:t.wrap(),this._trackPointer&&!e)return;let r=this._flatPos=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&e?e:this._map.transform.locationPoint(this._lngLat));let n=this.options.anchor,i=ta(this.options.offset);if(!n){let e,t=this._container.offsetWidth,a=this._container.offsetHeight;e=r.y+i.bottom.ythis._map.transform.height-a?["bottom"]:[],r.xthis._map.transform.width-t/2&&e.push("right"),n=0===e.length?"bottom":e.join("-")}let a=r.add(i[n]);this.options.subpixelPositioning||(a=a.round()),o.setTransform(this._container,`${Hi[n]} translate(${a.x}px,${a.y}px)`),Gi(this._container,n,"popup")},this._onClose=()=>{this.remove()},this.options=t.e(Object.create(Qi),e)}addTo(e){return this._map&&this.remove(),this._map=e,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new t.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=t.N.convert(e),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(e){return this.setDOMContent(document.createTextNode(e))}setHTML(e){let t,r=document.createDocumentFragment(),n=document.createElement("body");for(n.innerHTML=e;t=n.firstChild,t;)r.appendChild(t);return this.setDOMContent(r)}getMaxWidth(){var e;return null===(e=this._container)||void 0===e?void 0:e.style.maxWidth}setMaxWidth(e){return this.options.maxWidth=e,this._update(),this}setDOMContent(e){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=o.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(e),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(e){return this._container&&this._container.classList.add(e),this}removeClassName(e){return this._container&&this._container.classList.remove(e),this}setOffset(e){return this.options.offset=e,this._update(),this}toggleClassName(e){if(this._container)return this._container.classList.toggle(e)}setSubpixelPositioning(e){this.options.subpixelPositioning=e}_createCloseButton(){this.options.closeButton&&(this._closeButton=o.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let e=this._container.querySelector(ea);e&&e.focus()}},e.RasterDEMTileSource=K,e.RasterTileSource=$,e.ScaleControl=class{constructor(e){this._onMove=()=>{Ki(this._map,this._container,this.options)},this.setUnit=e=>{this.options.unit=e,Ki(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},$i),e)}getDefaultPosition(){return"bottom-left"}onAdd(e){return this._map=e,this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-scale",e.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){o.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},e.ScrollZoomHandler=pi,e.Style=pt,e.TerrainControl=class{constructor(e){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=e}onAdd(e){return this._map=e,this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=o.create("button","maplibregl-ctrl-terrain",this._container),o.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){o.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},e.TwoFingersTouchPitchHandler=li,e.TwoFingersTouchRotateHandler=oi,e.TwoFingersTouchZoomHandler=ii,e.TwoFingersTouchZoomRotateHandler=xi,e.VectorTileSource=X,e.VideoSource=te,e.addSourceType=(e,r)=>t._(void 0,void 0,void 0,(function*(){if(ie(e))throw new Error(`A source type called "${e}" already exists.`);var t;t=r,ne[e]=t})),e.clearPrewarmedResources=function(){let e=F;e&&(e.isPreloaded()&&1===e.numActive()?(e.release(O),F=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},e.getMaxParallelImageRequests=function(){return t.a.MAX_PARALLEL_IMAGE_REQUESTS},e.getRTLTextPluginStatus=function(){return le().getRTLTextPluginStatus()},e.getVersion=function(){return ra},e.getWorkerCount=function(){return R.workerCount},e.getWorkerUrl=function(){return t.a.WORKER_URL},e.importScriptInWorkers=function(e){return V().broadcast("IS",e)},e.prewarm=function(){N().acquire(O)},e.setMaxParallelImageRequests=function(e){t.a.MAX_PARALLEL_IMAGE_REQUESTS=e},e.setRTLTextPlugin=function(e,t){return le().setRTLTextPlugin(e,t)},e.setWorkerCount=function(e){R.workerCount=e},e.setWorkerUrl=function(e){t.a.WORKER_URL=e}})),e},"object"==typeof e&&typeof t<"u"?t.exports=n():(r=typeof globalThis<"u"?globalThis:r||self).maplibregl=n()}}),Tb=m({"src/plots/map/layers.js"(e,t){var r=ct(),n=Et().sanitizeHTML,i=gb(),a=ub();function o(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=a.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var s=o.prototype;function l(e){if(!e.visible)return!1;var t=e.source;if(Array.isArray(t)&&t.length>0){for(var n=0;n0}function c(e){var t={},n={};switch(e.type){case"circle":r.extendFlat(n,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":r.extendFlat(n,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":r.extendFlat(n,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var a=e.symbol,o=i(a.textposition,a.iconsize);r.extendFlat(t,{"icon-image":a.icon+"-15","icon-size":a.iconsize/10,"text-field":a.text,"text-size":a.textfont.size,"text-anchor":o.anchor,"text-offset":o.offset,"symbol-placement":a.placement}),r.extendFlat(n,{"icon-color":e.color,"text-color":a.textfont.color,"text-opacity":e.opacity});break;case"raster":r.extendFlat(n,{"raster-fade-duration":0,"raster-opacity":e.opacity})}return{layout:t,paint:n}}s.update=function(e){this.visible?this.needsNewImage(e)?this.updateImage(e):this.needsNewSource(e)?(this.removeLayer(),this.updateSource(e),this.updateLayer(e)):this.needsNewLayer(e)?this.updateLayer(e):this.updateStyle(e):(this.updateSource(e),this.updateLayer(e)),this.visible=l(e)},s.needsNewImage=function(e){return this.subplot.map.getSource(this.idSource)&&"image"===this.sourceType&&"image"===e.sourcetype&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))},s.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type},s.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},s.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},s.updateImage=function(e){this.subplot.map.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var t=this.findFollowingMapLayerId(this.lookupBelow());null!==t&&this.subplot.map.moveLayer(this.idLayer,t)},s.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,l(e)){var r=function(e){var t,r=e.sourcetype,i=e.source,a={type:r};return"geojson"===r?t="data":"vector"===r?t="string"==typeof i?"url":"tiles":"raster"===r?(t="tiles",a.tileSize=256):"image"===r&&(t="url",a.coordinates=e.coordinates),a[t]=i,e.sourceattribution&&(a.attribution=n(e.sourceattribution)),a}(e);t.addSource(this.idSource,r)}},s.findFollowingMapLayerId=function(e){if("traces"===e)for(var t=this.subplot.getMapLayers(),r=0;r1)for(r=0;r-1&&m(t.originalEvent,n,[r.xaxis],[r.yaxis],r.id,e),i.indexOf("event")>-1&&l.click(n,t.originalEvent)}}},x.updateFx=function(e){var t=this,r=t.map,i=t.gd;if(!t.isStatic){var a,o=e.dragmode;a=function(e,r){r.isRect?(e.range={})[t.id]=[c([r.xmin,r.ymin]),c([r.xmax,r.ymax])]:(e.lassoPoints={})[t.id]=r.map(c)};var l=t.dragOptions;t.dragOptions=n.extendDeep(l||{},{dragmode:e.dragmode,element:t.div,gd:i,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:a},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),h(o)||u(o)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(e,r,n){f(e,r,n,t.dragOptions,o)},s.init(t.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener("touchstart",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on("click",t.onClickInPanHandler))}function c(e){var r=t.map.unproject(e);return[r.lng,r.lat]}},x.updateFramework=function(e){var t=e[this.id].domain,r=e._size,n=this.div.style;n.width=r.w*(t.x[1]-t.x[0])+"px",n.height=r.h*(t.y[1]-t.y[0])+"px",n.left=r.l+t.x[0]*r.w+"px",n.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])},x.updateLayers=function(e){var t,r=e[this.id].layers,n=this.layerList;if(r.length!==n.length){for(t=0;tx/2){var _=m.split("|").join("
");y.text(_).attr("data-unformatted",_).call(l.convertToTspans,e),v=s.bBox(y.node())}y.attr("transform",r(-3,8-v.height)),g.insert("rect",".static-attribution").attr({x:-v.width-6,y:-v.height-3,width:v.width+6,height:v.height+3,fill:"rgba(255, 255, 255, 0.75)"});var b=1;v.width+6>x&&(b=x/(v.width+6));var w=[c.l+c.w*p.x[1],c.t+c.h*(1-p.y[0])];g.attr("transform",r(w[0],w[1])+n(b))}},e.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[u],n=0;n=0;r--)e.removeLayer(t[r][1])},o.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},t.exports=function(e,t){var n=t[0].trace,i=new a(e,n.uid),o=i.sourceId,s=r(t),l=i.below=e.belowLookup["trace-"+n.uid];return e.map.addSource(o,{type:"geojson",data:s.geojson}),i._addLayers(s,l),t[0].trace._glTrace=i,i}}}),zb=m({"src/traces/choroplethmap/index.js"(e,t){t.exports={attributes:Cb(),supplyDefaults:Ib(),colorbar:Vo(),calc:jg(),plot:Pb(),hoverPoints:Vg(),eventData:qg(),selectPoints:Hg(),styleOnSelect:function(e,t){t&&t[0].trace._glTrace.updateOnSelect(t)},getBelow:function(e,t){for(var r=t.getMapLayers(),n=r.length-2;n>=0;n--){var i=r[n].id;if("string"==typeof i&&0===i.indexOf("water"))for(var a=n+1;a0?+p[u]:0),h.push({type:"Feature",geometry:{type:"Point",coordinates:y},properties:v})}}var _=a.extractOpts(t),b=_.reversescale?a.flipScale(_.colorscale):_.colorscale,w=b[0][1],T=["interpolate",["linear"],["heatmap-density"],0,i.opacity(w)<1?w:i.addOpacity(w,0)];for(u=1;u=0;r--)e.removeLayer(t[r][1])},a.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},t.exports=function(e,t){var n=t[0].trace,a=new i(e,n.uid),o=a.sourceId,s=r(t),l=a.below=e.belowLookup["trace-"+n.uid];return e.map.addSource(o,{type:"geojson",data:s.geojson}),a._addLayers(s,l),a}}}),Nb=m({"src/traces/densitymap/hover.js"(e,t){var r=ar(),n=xb().hoverPoints,i=xb().getExtraText;t.exports=function(e,t,a){var o=n(e,t,a);if(o){var s=o[0],l=s.cd,c=l[0].trace,u=l[s.index];if(delete s.color,"z"in u){var h=s.subplot.mockAxis;s.z=u.z,s.zLabel=r.tickText(h,h.c2l(u.z),"hover").text}return s.extraText=i(c,u,l[0].t.labels),[s]}}}}),Ub=m({"src/traces/densitymap/event_data.js"(e,t){t.exports=function(e,t){return e.lon=t.lon,e.lat=t.lat,e.z=t.z,e}}}),Vb=m({"src/traces/densitymap/index.js"(e,t){t.exports={attributes:Ob(),supplyDefaults:Rb(),colorbar:Vo(),formatLabels:mb(),calc:Fb(),plot:jb(),hoverPoints:Nb(),eventData:Ub(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n0;){t=c[c.length-1];var p=e[t];if(a[t]=0&&s[t].push(o[m])}a[t]=d}else{if(n[t]===r[t]){var g=[],y=[],v=0;for(d=l.length-1;d>=0;--d){var x=l[d];if(i[x]=!1,g.push(x),y.push(s[x]),v+=s[x].length,o[x]=h.length,x===t){l.length=d;break}}h.push(g);var _=new Array(v);for(d=0;dx&&(x=l.source[t]),l.target[t]>x&&(x=l.target[t]);var _=x+1;e.node._count=_;var b,w=e.node.groups,T={};for(t=0;t0&&o(C,_)&&o(I,_)&&(!T.hasOwnProperty(C)||!T.hasOwnProperty(I)||T[C]!==T[I])){T.hasOwnProperty(I)&&(I=T[I]),T.hasOwnProperty(C)&&(C=T[C]),I=+I,p[C=+C]=p[I]=!0;var L="";l.label&&l.label[t]&&(L=l.label[t]);var P=null;L&&d.hasOwnProperty(L)&&(P=d[L]),c.push({pointNumber:t,label:L,color:u?l.color[t]:l.color,hovercolor:h?l.hovercolor[t]:l.hovercolor,customdata:f?l.customdata[t]:l.customdata,concentrationscale:P,source:C,target:I,value:+E}),S.source.push(C),S.target.push(I)}}var z=_+w.length,D=a(i.color),O=a(i.customdata),R=[];for(t=0;t_-1,childrenNodes:[],pointNumber:t,label:F,color:D?i.color[t]:i.color,customdata:O?i.customdata[t]:i.customdata})}var B=!1;return function(e,t,i){for(var a=n.init2dArray(e,0),o=0;o1}))}(z,S.source,S.target)&&(B=!0),{circular:B,links:c,nodes:R,groups:w,groupLookup:T}}(t);return i({circular:l.circular,_nodes:l.nodes,_links:l.links,_groups:l.groups,_groupLookup:l.groupLookup})}}}),Yb=m({"node_modules/d3-quadtree/dist/d3-quadtree.js"(e,t){var r,n;r=e,n=function(e){function t(e,t,r,n){if(isNaN(t)||isNaN(r))return e;var i,a,o,s,l,c,u,h,f,p=e._root,d={data:n},m=e._x0,g=e._y0,y=e._x1,v=e._y1;if(!p)return e._root=d,e;for(;p.length;)if((c=t>=(a=(m+y)/2))?m=a:y=a,(u=r>=(o=(g+v)/2))?g=o:v=o,i=p,!(p=p[h=u<<1|c]))return i[h]=d,e;if(s=+e._x.call(null,p.data),l=+e._y.call(null,p.data),t===s&&r===l)return d.next=p,i?i[h]=d:e._root=d,e;do{i=i?i[h]=new Array(4):e._root=new Array(4),(c=t>=(a=(m+y)/2))?m=a:y=a,(u=r>=(o=(g+v)/2))?g=o:v=o}while((h=u<<1|c)==(f=(l>=o)<<1|s>=a));return i[f]=p,i[h]=d,e}function r(e,t,r,n,i){this.node=e,this.x0=t,this.y0=r,this.x1=n,this.y1=i}function n(e){return e[0]}function i(e){return e[1]}function a(e,t,r){var a=new o(t??n,r??i,NaN,NaN,NaN,NaN);return null==e?a:a.addAll(e)}function o(e,t,r,n,i,a){this._x=e,this._y=t,this._x0=r,this._y0=n,this._x1=i,this._y1=a,this._root=void 0}function s(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}var l=a.prototype=o.prototype;l.copy=function(){var e,t,r=new o(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root;if(!n)return r;if(!n.length)return r._root=s(n),r;for(e=[{source:n,target:r._root=new Array(4)}];n=e.pop();)for(var i=0;i<4;++i)(t=n.source[i])&&(t.length?e.push({source:t,target:n.target[i]=new Array(4)}):n.target[i]=s(t));return r},l.add=function(e){var r=+this._x.call(null,e),n=+this._y.call(null,e);return t(this.cover(r,n),r,n,e)},l.addAll=function(e){var r,n,i,a,o=e.length,s=new Array(o),l=new Array(o),c=1/0,u=1/0,h=-1/0,f=-1/0;for(n=0;nh&&(h=i),af&&(f=a));if(c>h||u>f)return this;for(this.cover(c,u).cover(h,f),n=0;ne||e>=i||n>t||t>=a;)switch(s=(tp||(o=c.y0)>d||(s=c.x1)=v)<<1|e>=y)&&(c=m[m.length-1],m[m.length-1]=m[m.length-1-u],m[m.length-1-u]=c)}else{var x=e-+this._x.call(null,g.data),_=t-+this._y.call(null,g.data),b=x*x+_*_;if(b=(s=(d+g)/2))?d=s:g=s,(u=o>=(l=(m+y)/2))?m=l:y=l,t=p,!(p=p[h=u<<1|c]))return this;if(!p.length)break;(t[h+1&3]||t[h+2&3]||t[h+3&3])&&(r=t,f=h)}for(;p.data!==e;)if(n=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,n?(i?n.next=i:delete n.next,this):t?(i?t[h]=i:delete t[h],(p=t[0]||t[1]||t[2]||t[3])&&p===(t[3]||t[2]||t[1]||t[0])&&!p.length&&(r?r[f]=p:this._root=p),this):(this._root=i,this)},l.removeAll=function(e){for(var t=0,r=e.length;t=l.length)return null!=e&&r.sort(e),null!=t?t(r):r;for(var s,c,h,f=-1,p=r.length,d=l[i++],m=n(),g=a();++fl.length)return e;var n,i=c[r-1];return null!=t&&r>=l.length?n=e.entries():(n=[],e.each((function(e,t){n.push({key:t,values:h(e,r)})}))),null!=i?n.sort((function(e,t){return i(e.key,t.key)})):n}return r={object:function(e){return u(e,0,i,a)},map:function(e){return u(e,0,o,s)},entries:function(e){return h(u(e,0,o,s),0)},key:function(e){return l.push(e),r},sortKeys:function(e){return c[l.length-1]=e,r},sortValues:function(t){return e=t,r},rollup:function(e){return t=e,r}}},e.set=u,e.map=n,e.keys=function(e){var t=[];for(var r in e)t.push(r);return t},e.values=function(e){var t=[];for(var r in e)t.push(e[r]);return t},e.entries=function(e){var t=[];for(var r in e)t.push({key:r,value:e[r]});return t},Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof e&&typeof t<"u"?e:r.d3=r.d3||{})}}),$b=m({"node_modules/d3-dispatch/dist/d3-dispatch.js"(e,t){var r,n;r=e,n=function(e){var t={value:function(){}};function r(){for(var e,t=0,r=arguments.length,i={};t=0&&(r=e.slice(n+1),e=e.slice(0,n)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:r}}))}(e+"",n),s=-1,l=o.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++s0)for(var r,n,i=new Array(r),a=0;a=0&&r._call.call(null,e),r=r._next;--n}function g(){s=(o=c.now())+l,n=i=0;try{m()}finally{n=0,function(){for(var e,n,i=t,a=1/0;i;)i._call?(a>i._time&&(a=i._time),e=i,i=i._next):(n=i._next,i._next=null,i=e?e._next=n:t=n);r=e,v(a)}(),s=0}}function y(){var e=c.now(),t=e-o;t>1e3&&(l-=t,o=e)}function v(e){n||(i&&(i=clearTimeout(i)),e-s>24?(e<1/0&&(i=setTimeout(g,e-c.now()-l)),a&&(a=clearInterval(a))):(a||(o=c.now(),a=setInterval(y,1e3)),n=1,u(g)))}p.prototype=d.prototype={constructor:p,restart:function(e,n,i){if("function"!=typeof e)throw new TypeError("callback is not a function");i=(null==i?h():+i)+(null==n?0:+n),!this._next&&r!==this&&(r?r._next=this:t=this,r=this),this._call=e,this._time=i,v()},stop:function(){this._call&&(this._call=null,this._time=1/0,v())}},e.interval=function(e,t,r){var n=new p,i=t;return null==t?(n.restart(e,t,r),n):(t=+t,r=null==r?h():+r,n.restart((function a(o){o+=i,n.restart(a,i+=t,r),e(o)}),t,r),n)},e.now=h,e.timeout=function(e,t,r){var n=new p;return t=null==t?0:+t,n.restart((function(r){n.stop(),e(r+t)}),t,r),n},e.timer=d,e.timerFlush=m,Object.defineProperty(e,"__esModule",{value:!0})},n("object"==typeof e&&typeof t<"u"?e:(r=r||self).d3=r.d3||{})}}),Jb=m({"node_modules/d3-force/dist/d3-force.js"(e,t){var r,n;r=e,n=function(e,t,r,n,i){function a(e){return function(){return e}}function o(){return 1e-6*(Math.random()-.5)}function s(e){return e.x+e.vx}function l(e){return e.y+e.vy}function c(e){return e.index}function u(e,t){var r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function h(e){return e.x}function f(e){return e.y}var p=Math.PI*(3-Math.sqrt(5));e.forceCenter=function(e,t){var r;function n(){var n,i,a=r.length,o=0,s=0;for(n=0;nf+c||np+c||au.index){var h=f-s.x-s.vx,g=p-s.y-s.vy,y=h*h+g*g;ye.r&&(e.r=e[t].r)}function f(){if(r){var t,i,a=r.length;for(n=new Array(a),t=0;t=c)){(e.data!==r||e.next)&&(0===h&&(d+=(h=o())*h),0===f&&(d+=(f=o())*f),d1?(null==r?u.remove(e):u.set(e,y(r)),t):u.get(e)},find:function(t,r,n){var i,a,o,s,l,c=0,u=e.length;for(null==n?n=1/0:n*=n,c=0;c1?(f.on(e,r),t):f.on(e)}}},e.forceX=function(e){var t,r,n,i=a(.1);function o(e){for(var i,a=0,o=t.length;an)if(Math.abs(f*c-u*h)>n&&o){var d=i-s,m=a-l,g=c*c+u*u,y=d*d+m*m,v=Math.sqrt(g),x=Math.sqrt(p),_=o*Math.tan((t-Math.acos((g+p-y)/(2*v*x)))/2),b=_/x,w=_/v;Math.abs(b-1)>n&&(this._+="L"+(e+b*h)+","+(r+b*f)),this._+="A"+o+","+o+",0,0,"+ +(f*d>h*m)+","+(this._x1=e+w*c)+","+(this._y1=r+w*u)}else this._+="L"+(this._x1=e)+","+(this._y1=r)},arc:function(e,a,o,s,l,c){e=+e,a=+a,c=!!c;var u=(o=+o)*Math.cos(s),h=o*Math.sin(s),f=e+u,p=a+h,d=1^c,m=c?s-l:l-s;if(o<0)throw new Error("negative radius: "+o);null===this._x1?this._+="M"+f+","+p:(Math.abs(this._x1-f)>n||Math.abs(this._y1-p)>n)&&(this._+="L"+f+","+p),o&&(m<0&&(m=m%r+r),m>i?this._+="A"+o+","+o+",0,1,"+d+","+(e-u)+","+(a-h)+"A"+o+","+o+",0,1,"+d+","+(this._x1=f)+","+(this._y1=p):m>n&&(this._+="A"+o+","+o+",0,"+ +(m>=t)+","+d+","+(this._x1=e+o*Math.cos(l))+","+(this._y1=a+o*Math.sin(l))))},rect:function(e,t,r,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}},e.path=o,Object.defineProperty(e,"__esModule",{value:!0})},n("object"==typeof e&&typeof t<"u"?e:(r=r||self).d3=r.d3||{})}}),ew=m({"node_modules/d3-shape/dist/d3-shape.js"(e,t){var r,n;r=e,n=function(e,t){function r(e){return function(){return e}}var n=Math.abs,i=Math.atan2,a=Math.cos,o=Math.max,s=Math.min,l=Math.sin,c=Math.sqrt,u=1e-12,h=Math.PI,f=h/2,p=2*h;function d(e){return e>=1?f:e<=-1?-f:Math.asin(e)}function m(e){return e.innerRadius}function g(e){return e.outerRadius}function y(e){return e.startAngle}function v(e){return e.endAngle}function x(e){return e&&e.padAngle}function _(e,t,r,n,i,a,s){var l=e-r,u=t-n,h=(s?a:-a)/c(l*l+u*u),f=h*u,p=-h*l,d=e+f,m=t+p,g=r+f,y=n+p,v=(d+g)/2,x=(m+y)/2,_=g-d,b=y-m,w=_*_+b*b,T=i-a,k=d*y-g*m,A=(b<0?-1:1)*c(o(0,T*T*w-k*k)),M=(k*b-_*A)/w,S=(-k*_-b*A)/w,E=(k*b+_*A)/w,C=(-k*_+b*A)/w,I=M-v,L=S-x,P=E-v,z=C-x;return I*I+L*L>P*P+z*z&&(M=E,S=C),{cx:M,cy:S,x01:-f,y01:-p,x11:M*(i/T-1),y11:S*(i/T-1)}}function b(e){this._context=e}function w(e){return new b(e)}function T(e){return e[0]}function k(e){return e[1]}function A(){var e=T,n=k,i=r(!0),a=null,o=w,s=null;function l(r){var l,c,u,h=r.length,f=!1;for(null==a&&(s=o(u=t.path())),l=0;l<=h;++l)!(l=h;--f)c.point(y[f],v[f]);c.lineEnd(),c.areaEnd()}g&&(y[u]=+e(p,u,r),v[u]=+i(p,u,r),c.point(n?+n(p,u,r):y[u],a?+a(p,u,r):v[u]))}if(d)return c=null,d+""||null}function h(){return A().defined(o).curve(l).context(s)}return u.x=function(t){return arguments.length?(e="function"==typeof t?t:r(+t),n=null,u):e},u.x0=function(t){return arguments.length?(e="function"==typeof t?t:r(+t),u):e},u.x1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:r(+e),u):n},u.y=function(e){return arguments.length?(i="function"==typeof e?e:r(+e),a=null,u):i},u.y0=function(e){return arguments.length?(i="function"==typeof e?e:r(+e),u):i},u.y1=function(e){return arguments.length?(a=null==e?null:"function"==typeof e?e:r(+e),u):a},u.lineX0=u.lineY0=function(){return h().x(e).y(i)},u.lineY1=function(){return h().x(e).y(a)},u.lineX1=function(){return h().x(n).y(i)},u.defined=function(e){return arguments.length?(o="function"==typeof e?e:r(!!e),u):o},u.curve=function(e){return arguments.length?(l=e,null!=s&&(c=l(s)),u):l},u.context=function(e){return arguments.length?(null==e?s=c=null:c=l(s=e),u):s},u}function S(e,t){return te?1:t>=e?0:NaN}function E(e){return e}b.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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var C=L(w);function I(e){this._curve=e}function L(e){function t(t){return new I(e(t))}return t._curve=e,t}function P(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(e){return arguments.length?t(L(e)):t()._curve},e}function z(){return P(A().curve(C))}function D(){var e=M().curve(C),t=e.curve,r=e.lineX0,n=e.lineX1,i=e.lineY0,a=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return P(r())},delete e.lineX0,e.lineEndAngle=function(){return P(n())},delete e.lineX1,e.lineInnerRadius=function(){return P(i())},delete e.lineY0,e.lineOuterRadius=function(){return P(a())},delete e.lineY1,e.curve=function(e){return arguments.length?t(L(e)):t()._curve},e}function O(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}I.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};var R=Array.prototype.slice;function F(e){return e.source}function B(e){return e.target}function j(e){var n=F,i=B,a=T,o=k,s=null;function l(){var r,l=R.call(arguments),c=n.apply(this,l),u=i.apply(this,l);if(s||(s=r=t.path()),e(s,+a.apply(this,(l[0]=c,l)),+o.apply(this,l),+a.apply(this,(l[0]=u,l)),+o.apply(this,l)),r)return s=null,r+""||null}return l.source=function(e){return arguments.length?(n=e,l):n},l.target=function(e){return arguments.length?(i=e,l):i},l.x=function(e){return arguments.length?(a="function"==typeof e?e:r(+e),l):a},l.y=function(e){return arguments.length?(o="function"==typeof e?e:r(+e),l):o},l.context=function(e){return arguments.length?(s=e??null,l):s},l}function N(e,t,r,n,i){e.moveTo(t,r),e.bezierCurveTo(t=(t+n)/2,r,t,i,n,i)}function U(e,t,r,n,i){e.moveTo(t,r),e.bezierCurveTo(t,r=(r+i)/2,n,r,n,i)}function V(e,t,r,n,i){var a=O(t,r),o=O(t,r=(r+i)/2),s=O(n,r),l=O(n,i);e.moveTo(a[0],a[1]),e.bezierCurveTo(o[0],o[1],s[0],s[1],l[0],l[1])}var q={draw:function(e,t){var r=Math.sqrt(t/h);e.moveTo(r,0),e.arc(0,0,r,0,p)}},H={draw:function(e,t){var r=Math.sqrt(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},G=Math.sqrt(1/3),W=2*G,Z={draw:function(e,t){var r=Math.sqrt(t/W),n=r*G;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},Y=Math.sin(h/10)/Math.sin(7*h/10),X=Math.sin(p/10)*Y,$=-Math.cos(p/10)*Y,K={draw:function(e,t){var r=Math.sqrt(.8908130915292852*t),n=X*r,i=$*r;e.moveTo(0,-r),e.lineTo(n,i);for(var a=1;a<5;++a){var o=p*a/5,s=Math.cos(o),l=Math.sin(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*i,l*n+s*i)}e.closePath()}},J={draw:function(e,t){var r=Math.sqrt(t),n=-r/2;e.rect(n,n,r,r)}},Q=Math.sqrt(3),ee={draw:function(e,t){var r=-Math.sqrt(t/(3*Q));e.moveTo(0,2*r),e.lineTo(-Q*r,-r),e.lineTo(Q*r,-r),e.closePath()}},te=-.5,re=Math.sqrt(3)/2,ne=1/Math.sqrt(12),ie=3*(ne/2+1),ae={draw:function(e,t){var r=Math.sqrt(t/ie),n=r/2,i=r*ne,a=n,o=r*ne+r,s=-a,l=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(s,l),e.lineTo(te*n-re*i,re*n+te*i),e.lineTo(te*a-re*o,re*a+te*o),e.lineTo(te*s-re*l,re*s+te*l),e.lineTo(te*n+re*i,te*i-re*n),e.lineTo(te*a+re*o,te*o-re*a),e.lineTo(te*s+re*l,te*l-re*s),e.closePath()}},oe=[q,H,Z,J,K,ee,ae];function se(){}function le(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function ce(e){this._context=e}function ue(e){this._context=e}function he(e){this._context=e}function fe(e,t){this._basis=new ce(e),this._beta=t}ce.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:le(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:le(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},ue.prototype={areaStart:se,areaEnd:se,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:le(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},he.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:le(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},fe.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var n,i=e[0],a=t[0],o=e[r]-i,s=t[r]-a,l=-1;++l<=r;)n=l/r,this._basis.point(this._beta*e[l]+(1-this._beta)*(i+n*o),this._beta*t[l]+(1-this._beta)*(a+n*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var pe=function e(t){function r(e){return 1===t?new ce(e):new fe(e,t)}return r.beta=function(t){return e(+t)},r}(.85);function de(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function me(e,t){this._context=e,this._k=(1-t)/6}me.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:de(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:de(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ge=function e(t){function r(e){return new me(e,t)}return r.tension=function(t){return e(+t)},r}(0);function ye(e,t){this._context=e,this._k=(1-t)/6}ye.prototype={areaStart:se,areaEnd:se,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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:de(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ve=function e(t){function r(e){return new ye(e,t)}return r.tension=function(t){return e(+t)},r}(0);function xe(e,t){this._context=e,this._k=(1-t)/6}xe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:de(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var _e=function e(t){function r(e){return new xe(e,t)}return r.tension=function(t){return e(+t)},r}(0);function be(e,t,r){var n=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>u){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);n=(n*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>u){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/h,o=(o*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(n,i,a,o,e._x2,e._y2)}function we(e,t){this._context=e,this._alpha=t}we.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(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:be(this,e,t)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Te=function e(t){function r(e){return t?new we(e,t):new me(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function ke(e,t){this._context=e,this._alpha=t}ke.prototype={areaStart:se,areaEnd:se,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(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:be(this,e,t)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Ae=function e(t){function r(e){return t?new ke(e,t):new ye(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function Me(e,t){this._context=e,this._alpha=t}Me.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:be(this,e,t)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Se=function e(t){function r(e){return t?new Me(e,t):new xe(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function Ee(e){this._context=e}function Ce(e){return e<0?-1:1}function Ie(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(Ce(a)+Ce(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Le(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Pe(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-n)/3;e._context.bezierCurveTo(n+s,i+s*t,a-s,o-s*r,a,o)}function ze(e){this._context=e}function De(e){this._context=new Oe(e)}function Oe(e){this._context=e}function Re(e){this._context=e}function Fe(e){var t,r,n=e.length-1,i=new Array(n),a=new Array(n),o=new Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t1)for(var r,n,i,a=1,o=e[t[0]],s=o.length;a=0;)r[t]=t;return r}function Ue(e,t){return e[t]}function Ve(e){var t=e.map(qe);return Ne(e).sort((function(e,r){return t[e]-t[r]}))}function qe(e){for(var t,r=-1,n=0,i=e.length,a=-1/0;++ra&&(a=t,n=r);return n}function He(e){var t=e.map(Ge);return Ne(e).sort((function(e,r){return t[e]-t[r]}))}function Ge(e){for(var t,r=0,n=-1,i=e.length;++n=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}}this._x=e,this._y=t}},e.arc=function(){var e=m,o=g,b=r(0),w=null,T=y,k=v,A=x,M=null;function S(){var r,m,g=+e.apply(this,arguments),y=+o.apply(this,arguments),v=T.apply(this,arguments)-f,x=k.apply(this,arguments)-f,S=n(x-v),E=x>v;if(M||(M=r=t.path()),yu)if(S>p-u)M.moveTo(y*a(v),y*l(v)),M.arc(0,0,y,v,x,!E),g>u&&(M.moveTo(g*a(x),g*l(x)),M.arc(0,0,g,x,v,E));else{var C,I,L=v,P=x,z=v,D=x,O=S,R=S,F=A.apply(this,arguments)/2,B=F>u&&(w?+w.apply(this,arguments):c(g*g+y*y)),j=s(n(y-g)/2,+b.apply(this,arguments)),N=j,U=j;if(B>u){var V=d(B/g*l(F)),q=d(B/y*l(F));(O-=2*V)>u?(z+=V*=E?1:-1,D-=V):(O=0,z=D=(v+x)/2),(R-=2*q)>u?(L+=q*=E?1:-1,P-=q):(R=0,L=P=(v+x)/2)}var H=y*a(L),G=y*l(L),W=g*a(D),Z=g*l(D);if(j>u){var Y,X=y*a(P),$=y*l(P),K=g*a(z),J=g*l(z);if(S1?0:e<-1?h:Math.acos(e)}((Q*te+ee*re)/(c(Q*Q+ee*ee)*c(te*te+re*re)))/2),ie=c(Y[0]*Y[0]+Y[1]*Y[1]);N=s(j,(g-ie)/(ne-1)),U=s(j,(y-ie)/(ne+1))}}R>u?U>u?(C=_(K,J,H,G,y,U,E),I=_(X,$,W,Z,y,U,E),M.moveTo(C.cx+C.x01,C.cy+C.y01),Uu&&O>u?N>u?(C=_(W,Z,X,$,g,-N,E),I=_(H,G,K,J,g,-N,E),M.lineTo(C.cx+C.x01,C.cy+C.y01),N0&&(d+=h);for(null!=t?m.sort((function(e,r){return t(g[e],g[r])})):null!=n&&m.sort((function(e,t){return n(r[e],r[t])})),s=0,c=d?(v-f*_)/d:0;s0?h*c:0)+_,g[l]={data:r[l],index:s,value:h,startAngle:y,endAngle:u,padAngle:x};return g}return s.value=function(t){return arguments.length?(e="function"==typeof t?t:r(+t),s):e},s.sortValues=function(e){return arguments.length?(t=e,n=null,s):t},s.sort=function(e){return arguments.length?(n=e,t=null,s):n},s.startAngle=function(e){return arguments.length?(i="function"==typeof e?e:r(+e),s):i},s.endAngle=function(e){return arguments.length?(a="function"==typeof e?e:r(+e),s):a},s.padAngle=function(e){return arguments.length?(o="function"==typeof e?e:r(+e),s):o},s},e.pointRadial=O,e.radialArea=D,e.radialLine=z,e.stack=function(){var e=r([]),t=Ne,n=je,i=Ue;function a(r){var a,o,s=e.apply(this,arguments),l=r.length,c=s.length,u=new Array(c);for(a=0;a0)for(var r,n,i,a,o,s,l=0,c=e[t[0]].length;l0?(n[0]=a,n[1]=a+=i):i<0?(n[1]=o,n[0]=o+=i):(n[0]=0,n[1]=i)},e.stackOffsetExpand=function(e,t){if((n=e.length)>0){for(var r,n,i,a=0,o=e[0].length;a0){for(var r,n=0,i=e[t[0]],a=i.length;n0&&(n=(r=e[t[0]]).length)>0){for(var r,n,i,a=0,o=1;oa&&(_=a);var o=t.min(i,(function(e){return(v-n-(e.length-1)*_)/t.sum(e,u)}));i.forEach((function(e){e.forEach((function(e,t){e.y1=(e.y0=t)+e.value*o}))})),e.links.forEach((function(e){e.width=e.value*o}))})(),d();for(var a=1,o=A;o>0;--o)l(a*=.99),d(),s(a),d();function s(e){i.forEach((function(r){r.forEach((function(r){if(r.targetLinks.length){var n=(t.sum(r.targetLinks,f)/t.sum(r.targetLinks,u)-h(r))*e;r.y0+=n,r.y1+=n}}))}))}function l(e){i.slice().reverse().forEach((function(r){r.forEach((function(r){if(r.sourceLinks.length){var n=(t.sum(r.sourceLinks,p)/t.sum(r.sourceLinks,u)-h(r))*e;r.y0+=n,r.y1+=n}}))}))}function d(){i.forEach((function(e){var t,r,i,a=n,o=e.length;for(e.sort(c),i=0;i0&&(t.y0+=r,t.y1+=r),a=t.y1+_;if((r=a-_-v)>0)for(a=t.y0-=r,t.y1-=r,i=o-2;i>=0;--i)(r=(t=e[i]).y1+_-a)>0&&(t.y0-=r,t.y1-=r),a=t.y0}))}}(a),E(a),a}function E(e){e.nodes.forEach((function(e){e.sourceLinks.sort(l),e.targetLinks.sort(s)})),e.nodes.forEach((function(e){var t=e.y0,r=t;e.sourceLinks.forEach((function(e){e.y0=t+e.width/2,t+=e.width})),e.targetLinks.forEach((function(e){e.y1=r+e.width/2,r+=e.width}))}))}return S.update=function(e){return E(e),e},S.nodeId=function(e){return arguments.length?(b="function"==typeof e?e:o(e),S):b},S.nodeAlign=function(e){return arguments.length?(w="function"==typeof e?e:o(e),S):w},S.nodeWidth=function(e){return arguments.length?(x=+e,S):x},S.nodePadding=function(e){return arguments.length?(_=+e,S):_},S.nodes=function(e){return arguments.length?(T="function"==typeof e?e:o(e),S):T},S.links=function(e){return arguments.length?(k="function"==typeof e?e:o(e),S):k},S.size=function(t){return arguments.length?(e=n=0,i=+t[0],v=+t[1],S):[i-e,v-n]},S.extent=function(t){return arguments.length?(e=+t[0][0],i=+t[1][0],n=+t[0][1],v=+t[1][1],S):[[e,n],[i,v]]},S.iterations=function(e){return arguments.length?(A=+e,S):A},S},e.sankeyCenter=function(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?t.min(e.sourceLinks,i)-1:0},e.sankeyLeft=function(e){return e.depth},e.sankeyRight=function(e,t){return t-1-e.height},e.sankeyJustify=a,e.sankeyLinkHorizontal=function(){return n.linkHorizontal().source(v).target(x)},Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof e&&typeof t<"u"?n(e,Sg(),Xb(),ew()):n(r.d3=r.d3||{},r.d3,r.d3,r.d3)}}),rw=m({"node_modules/elementary-circuits-directed-graph/johnson.js"(e,t){var r=Wb();t.exports=function(e,t){var n,i=[],a=[],o=[],s={},l=[];function c(e){o[e]=!1,s.hasOwnProperty(e)&&Object.keys(s[e]).forEach((function(t){delete s[e][t],o[t]&&c(t)}))}function u(e){var t,r,i=!1;for(a.push(e),o[e]=!0,t=0;t=t}))}(t);for(var n,i=r(e).components.filter((function(e){return e.length>1})),a=1/0,o=0;ot.source.column)}function M(e,t){var r=0;e.sourceLinks.forEach((function(e){r=e.circular&&!W(e,t)?r+1:r}));var n=0;return e.targetLinks.forEach((function(e){n=e.circular&&!W(e,t)?n+1:n})),r+n}function S(e){var t=e.source.sourceLinks,r=0;t.forEach((function(e){r=e.circular?r+1:r}));var n=e.target.targetLinks,i=0;return n.forEach((function(e){i=e.circular?i+1:i})),!(r>1||i>1)}function E(e,t,r){return e.sort(I),e.forEach((function(n,i){var a=0;if(W(n,r)&&S(n))n.circularPathData.verticalBuffer=a+n.width/2;else{for(var o=0;oa?s:a}n.circularPathData.verticalBuffer=a+n.width/2}})),e}function C(e,r,i,a){var o=t.min(e.links,(function(e){return e.source.y0}));e.links.forEach((function(e){e.circular&&(e.circularPathData={})})),E(e.links.filter((function(e){return"top"==e.circularLinkType})),r,a),E(e.links.filter((function(e){return"bottom"==e.circularLinkType})),r,a),e.links.forEach((function(t){if(t.circular){if(t.circularPathData.arcRadius=t.width+w,t.circularPathData.leftNodeBuffer=5,t.circularPathData.rightNodeBuffer=5,t.circularPathData.sourceWidth=t.source.x1-t.source.x0,t.circularPathData.sourceX=t.source.x0+t.circularPathData.sourceWidth,t.circularPathData.targetX=t.target.x0,t.circularPathData.sourceY=t.y0,t.circularPathData.targetY=t.y1,W(t,a)&&S(t))t.circularPathData.leftSmallArcRadius=w+t.width/2,t.circularPathData.leftLargeArcRadius=w+t.width/2,t.circularPathData.rightSmallArcRadius=w+t.width/2,t.circularPathData.rightLargeArcRadius=w+t.width/2,"bottom"==t.circularLinkType?(t.circularPathData.verticalFullExtent=t.source.y1+b+t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.rightLargeArcRadius):(t.circularPathData.verticalFullExtent=t.source.y0-b-t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.rightLargeArcRadius);else{var s=t.source.column,l=t.circularLinkType,c=e.links.filter((function(e){return e.source.column==s&&e.circularLinkType==l}));"bottom"==t.circularLinkType?c.sort(P):c.sort(L);var u=0;c.forEach((function(e,n){e.circularLinkID==t.circularLinkID&&(t.circularPathData.leftSmallArcRadius=w+t.width/2+u,t.circularPathData.leftLargeArcRadius=w+t.width/2+n*r+u),u+=e.width})),s=t.target.column,c=e.links.filter((function(e){return e.target.column==s&&e.circularLinkType==l})),"bottom"==t.circularLinkType?c.sort(D):c.sort(z),u=0,c.forEach((function(e,n){e.circularLinkID==t.circularLinkID&&(t.circularPathData.rightSmallArcRadius=w+t.width/2+u,t.circularPathData.rightLargeArcRadius=w+t.width/2+n*r+u),u+=e.width})),"bottom"==t.circularLinkType?(t.circularPathData.verticalFullExtent=Math.max(i,t.source.y1,t.target.y1)+b+t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.rightLargeArcRadius):(t.circularPathData.verticalFullExtent=o-b-t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.rightLargeArcRadius)}t.circularPathData.leftInnerExtent=t.circularPathData.sourceX+t.circularPathData.leftNodeBuffer,t.circularPathData.rightInnerExtent=t.circularPathData.targetX-t.circularPathData.rightNodeBuffer,t.circularPathData.leftFullExtent=t.circularPathData.sourceX+t.circularPathData.leftLargeArcRadius+t.circularPathData.leftNodeBuffer,t.circularPathData.rightFullExtent=t.circularPathData.targetX-t.circularPathData.rightLargeArcRadius-t.circularPathData.rightNodeBuffer}if(t.circular)t.path=function(e){return"top"==e.circularLinkType?"M"+e.circularPathData.sourceX+" "+e.circularPathData.sourceY+" L"+e.circularPathData.leftInnerExtent+" "+e.circularPathData.sourceY+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftSmallArcRadius+" 0 0 0 "+e.circularPathData.leftFullExtent+" "+(e.circularPathData.sourceY-e.circularPathData.leftSmallArcRadius)+" L"+e.circularPathData.leftFullExtent+" "+e.circularPathData.verticalLeftInnerExtent+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftLargeArcRadius+" 0 0 0 "+e.circularPathData.leftInnerExtent+" "+e.circularPathData.verticalFullExtent+" L"+e.circularPathData.rightInnerExtent+" "+e.circularPathData.verticalFullExtent+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightLargeArcRadius+" 0 0 0 "+e.circularPathData.rightFullExtent+" "+e.circularPathData.verticalRightInnerExtent+" L"+e.circularPathData.rightFullExtent+" "+(e.circularPathData.targetY-e.circularPathData.rightSmallArcRadius)+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightSmallArcRadius+" 0 0 0 "+e.circularPathData.rightInnerExtent+" "+e.circularPathData.targetY+" L"+e.circularPathData.targetX+" "+e.circularPathData.targetY:"M"+e.circularPathData.sourceX+" "+e.circularPathData.sourceY+" L"+e.circularPathData.leftInnerExtent+" "+e.circularPathData.sourceY+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftSmallArcRadius+" 0 0 1 "+e.circularPathData.leftFullExtent+" "+(e.circularPathData.sourceY+e.circularPathData.leftSmallArcRadius)+" L"+e.circularPathData.leftFullExtent+" "+e.circularPathData.verticalLeftInnerExtent+" A"+e.circularPathData.leftLargeArcRadius+" "+e.circularPathData.leftLargeArcRadius+" 0 0 1 "+e.circularPathData.leftInnerExtent+" "+e.circularPathData.verticalFullExtent+" L"+e.circularPathData.rightInnerExtent+" "+e.circularPathData.verticalFullExtent+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightLargeArcRadius+" 0 0 1 "+e.circularPathData.rightFullExtent+" "+e.circularPathData.verticalRightInnerExtent+" L"+e.circularPathData.rightFullExtent+" "+(e.circularPathData.targetY+e.circularPathData.rightSmallArcRadius)+" A"+e.circularPathData.rightLargeArcRadius+" "+e.circularPathData.rightSmallArcRadius+" 0 0 1 "+e.circularPathData.rightInnerExtent+" "+e.circularPathData.targetY+" L"+e.circularPathData.targetX+" "+e.circularPathData.targetY}(t);else{var h=n.linkHorizontal().source((function(e){return[e.source.x0+(e.source.x1-e.source.x0),e.y0]})).target((function(e){return[e.target.x0,e.y1]}));t.path=h(t)}}))}function I(e,t){return O(e)==O(t)?"bottom"==e.circularLinkType?P(e,t):L(e,t):O(t)-O(e)}function L(e,t){return e.y0-t.y0}function P(e,t){return t.y0-e.y0}function z(e,t){return e.y1-t.y1}function D(e,t){return t.y1-e.y1}function O(e){return e.target.column-e.source.column}function R(e){return e.target.x0-e.source.x1}function F(e,t){var r=k(e),n=R(t)/Math.tan(r);return"up"==G(e)?e.y1+n:e.y1-n}function B(e,t){var r=k(e),n=R(t)/Math.tan(r);return"up"==G(e)?e.y1-n:e.y1+n}function j(e,t,r,n){e.links.forEach((function(i){if(!i.circular&&i.target.column-i.source.column>1){var a=i.source.column+1,o=i.target.column-1,s=1,l=o-a+1;for(s=1;a<=o;a++,s++)e.nodes.forEach((function(o){if(o.column==a){var c,u=s/(l+1),h=Math.pow(1-u,3),f=3*u*Math.pow(1-u,2),p=3*Math.pow(u,2)*(1-u),d=Math.pow(u,3),m=h*i.y0+f*i.y0+p*i.y1+d*i.y1,g=m-i.width/2,y=m+i.width/2;g>o.y0&&go.y0&&yo.y1)&&(c=y-o.y0+10,o=U(o,c,t,r),e.nodes.forEach((function(e){_(e,n)==_(o,n)||e.column!=o.column||e.y0o.y1&&U(e,c,t,r)})))}}))}}))}function N(e,t){return e.y0>t.y0&&e.y0t.y0&&e.y1t.y1}function U(e,t,r,n){return e.y0+t>=r&&e.y1+t<=n&&(e.y0=e.y0+t,e.y1=e.y1+t,e.targetLinks.forEach((function(e){e.y1=e.y1+t})),e.sourceLinks.forEach((function(e){e.y0=e.y0+t}))),e}function V(e,t,r,n){e.nodes.forEach((function(i){n&&i.y+(i.y1-i.y0)>t&&(i.y=i.y-(i.y+(i.y1-i.y0)-t));var a=e.links.filter((function(e){return _(e.source,r)==_(i,r)})),o=a.length;o>1&&a.sort((function(e,t){if(!e.circular&&!t.circular){if(e.target.column==t.target.column)return e.y1-t.y1;if(!H(e,t))return e.y1-t.y1;if(e.target.column>t.target.column){var r=B(t,e);return e.y1-r}if(t.target.column>e.target.column)return B(e,t)-t.y1}return e.circular&&!t.circular?"top"==e.circularLinkType?-1:1:t.circular&&!e.circular?"top"==t.circularLinkType?1:-1:e.circular&&t.circular?e.circularLinkType===t.circularLinkType&&"top"==e.circularLinkType?e.target.column===t.target.column?e.target.y1-t.target.y1:t.target.column-e.target.column:e.circularLinkType===t.circularLinkType&&"bottom"==e.circularLinkType?e.target.column===t.target.column?t.target.y1-e.target.y1:e.target.column-t.target.column:"top"==e.circularLinkType?-1:1:void 0}));var s=i.y0;a.forEach((function(e){e.y0=s+e.width/2,s+=e.width})),a.forEach((function(e,t){if("bottom"==e.circularLinkType){for(var r=t+1,n=0;r1&&n.sort((function(e,t){if(!e.circular&&!t.circular){if(e.source.column==t.source.column)return e.y0-t.y0;if(!H(e,t))return e.y0-t.y0;if(t.source.column0?"up":"down"}function W(e,t){return _(e.source,t)==_(e.target,t)}e.sankeyCircular=function(){var e,n,a=0,_=0,k=1,A=1,S=24,E=g,I=o,L=y,P=v,z=32,D=2,O=null;function R(){var o={nodes:L.apply(null,arguments),links:P.apply(null,arguments)};(function(e){e.nodes.forEach((function(e,t){e.index=t,e.sourceLinks=[],e.targetLinks=[]}));var t=r.map(e.nodes,E);e.links.forEach((function(e,r){e.index=r;var n=e.source,i=e.target;"object"!==(typeof n>"u"?"undefined":l(n))&&(n=e.source=x(t,n)),"object"!==(typeof i>"u"?"undefined":l(i))&&(i=e.target=x(t,i)),n.sourceLinks.push(e),i.targetLinks.push(e)}))})(o),function(e,t,r){var n=0;if(null===r){for(var a=[],o=0;o0?r+b+w:r,bottom:n=n>0?n+b+w:n,left:a=a>0?a+b+w:a,right:i=i>0?i+b+w:i}}(i),u=function(e,r){var n=t.max(e.nodes,(function(e){return e.column})),i=k-a,o=A-_,s=i/(i+r.right+r.left),l=o/(o+r.top+r.bottom);return a=a*s+r.left,k=0==r.right?k:k*s,_=_*l+r.top,A*=l,e.nodes.forEach((function(e){e.x0=a+e.column*((k-a-S)/n),e.x1=e.x0+S})),l}(i,c);s*=u,i.links.forEach((function(e){e.width=e.value*s})),l.forEach((function(e){var t=e.length;e.forEach((function(e,n){e.depth==l.length-1&&1==t||0==e.depth&&1==t?(e.y0=A/2-e.value*s,e.y1=e.y0+e.value*s):e.partOfCycle?0==M(e,r)?(e.y0=A/2+n,e.y1=e.y0+e.value*s):"top"==e.circularLinkType?(e.y0=_+n,e.y1=e.y0+e.value*s):(e.y0=A-e.value*s-n,e.y1=e.y0+e.value*s):0==c.top||0==c.bottom?(e.y0=(A-_)/t*n,e.y1=e.y0+e.value*s):(e.y0=(A-_)/2-t/2+n,e.y1=e.y0+e.value*s)}))}))})(s),y();for(var c=1,u=o;u>0;--u)g(c*=.99,s),y();function g(e,r){var n=l.length;l.forEach((function(i){var a=i.length,o=i[0].depth;i.forEach((function(i){var s;if((i.sourceLinks.length||i.targetLinks.length)&&!(i.partOfCycle&&M(i,r)>0))if(0==o&&1==a)s=i.y1-i.y0,i.y0=A/2-s/2,i.y1=A/2+s/2;else if(o==n-1&&1==a)s=i.y1-i.y0,i.y0=A/2-s/2,i.y1=A/2+s/2;else{var l=t.mean(i.sourceLinks,m),c=t.mean(i.targetLinks,d),u=((l&&c?(l+c)/2:l||c)-p(i))*e;i.y0+=u,i.y1+=u}}))}))}function y(){l.forEach((function(t){var r,n,i,a=_,o=t.length;for(t.sort(h),i=0;i0&&(r.y0+=n,r.y1+=n),a=r.y1+e;if((n=a-e-A)>0)for(a=r.y0-=n,r.y1-=n,i=o-2;i>=0;--i)(n=(r=t[i]).y1+e-a)>0&&(r.y0-=n,r.y1-=n),a=r.y0}))}}(o,z,E),F(o);for(var s=0;s<4;s++)V(o,A,E),q(o,0,E),j(o,_,A,E),V(o,A,E),q(o,0,E);return function(e,r,n){var i=e.nodes,a=e.links,o=!1,s=!1;if(a.forEach((function(e){"top"==e.circularLinkType?o=!0:"bottom"==e.circularLinkType&&(s=!0)})),0==o||0==s){var l=t.min(i,(function(e){return e.y0})),c=t.max(i,(function(e){return e.y1})),u=(n-r)/(c-l);i.forEach((function(e){var t=(e.y1-e.y0)*u;e.y0=(e.y0-l)*u,e.y1=e.y0+t})),a.forEach((function(e){e.y0=(e.y0-l)*u,e.y1=(e.y1-l)*u,e.width=e.width*u}))}}(o,_,A),C(o,D,A,E),o}function F(e){e.nodes.forEach((function(e){e.sourceLinks.sort(u),e.targetLinks.sort(c)})),e.nodes.forEach((function(e){var t=e.y0,r=t,n=e.y1,i=n;e.sourceLinks.forEach((function(e){e.circular?(e.y0=n-e.width/2,n-=e.width):(e.y0=t+e.width/2,t+=e.width)})),e.targetLinks.forEach((function(e){e.circular?(e.y1=i-e.width/2,i-=e.width):(e.y1=r+e.width/2,r+=e.width)}))}))}return R.nodeId=function(e){return arguments.length?(E="function"==typeof e?e:s(e),R):E},R.nodeAlign=function(e){return arguments.length?(I="function"==typeof e?e:s(e),R):I},R.nodeWidth=function(e){return arguments.length?(S=+e,R):S},R.nodePadding=function(t){return arguments.length?(e=+t,R):e},R.nodes=function(e){return arguments.length?(L="function"==typeof e?e:s(e),R):L},R.links=function(e){return arguments.length?(P="function"==typeof e?e:s(e),R):P},R.size=function(e){return arguments.length?(a=_=0,k=+e[0],A=+e[1],R):[k-a,A-_]},R.extent=function(e){return arguments.length?(a=+e[0][0],k=+e[1][0],_=+e[0][1],A=+e[1][1],R):[[a,_],[k,A]]},R.iterations=function(e){return arguments.length?(z=+e,R):z},R.circularLinkGap=function(e){return arguments.length?(D=+e,R):D},R.nodePaddingRatio=function(e){return arguments.length?(n=+e,R):n},R.sortNodes=function(e){return arguments.length?(O=e,R):O},R.update=function(e){return T(e,E),F(e),e.links.forEach((function(e){e.circular&&(e.circularLinkType=e.y0+e.y1o+d&&(a+=1,t=s.x0),o=s.x0,i[a]||(i[a]=[]),i[a].push(s),r=t-s.x0,s.x0+=r,s.x1+=r}return i})(x=A.nodes).forEach((function(e){var t,r,n,i=0,a=e.length;for(e.sort((function(e,t){return e.y0-t.y0})),n=0;n=i||(r=i-t.y0)>1e-6&&(t.y0+=r,t.y1+=r),i=t.y1+p}));n.update(A)}return{circular:b,key:r,trace:c,guid:h.randstr(),horizontal:f,width:g,height:v,nodePad:c.node.pad,nodeLineColor:c.node.line.color,nodeLineWidth:c.node.line.width,linkLineColor:c.link.line.color,linkLineWidth:c.link.line.width,linkArrowLength:c.link.arrowlen,valueFormat:c.valueformat,valueSuffix:c.valuesuffix,textFont:c.textfont,translateX:u.x[0]*e.width+e.margin.l,translateY:e.height-u.y[1]*e.height+e.margin.t,dragParallel:f?v:g,dragPerpendicular:f?g:v,arrangement:c.arrangement,sankey:n,graph:A,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function M(e,t,r){var n=l(t.color),i=l(t.hovercolor),a=t.source.label+"|"+t.target.label+"__"+r;return t.trace=e.trace,t.curveNumber=e.trace.index,{circular:e.circular,key:a,traceId:e.key,pointNumber:t.pointNumber,link:t,tinyColorHue:c.tinyRGB(n),tinyColorAlpha:n.getAlpha(),tinyColorHoverHue:c.tinyRGB(i),tinyColorHoverAlpha:i.getAlpha(),linkPath:S,linkLineColor:e.linkLineColor,linkLineWidth:e.linkLineWidth,linkArrowLength:e.linkArrowLength,valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,parent:e,interactionState:e.interactionState,flow:t.flow}}function S(){return function(e){var t=e.linkArrowLength;if(e.link.circular)return function(e,t){var r="",n=e.width/2,i=e.circularPathData,a=i.sourceX+i.verticalBuffer0?" L "+i.targetX+" "+i.targetY:"")+"Z"):(r="M "+(i.targetX-t)+" "+(i.targetY-n)+" L "+(i.rightInnerExtent-t)+" "+(i.targetY-n)+" A "+(i.rightLargeArcRadius+n)+" "+(i.rightSmallArcRadius+n)+" 0 0 0 "+(i.rightFullExtent-n-t)+" "+(i.targetY+i.rightSmallArcRadius)+" L "+(i.rightFullExtent-n-t)+" "+i.verticalRightInnerExtent,r+=a&&o?" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.rightInnerExtent-n-t)+" "+(i.verticalFullExtent+n)+" L "+(i.rightFullExtent+n-t-(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent+n)+" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.leftFullExtent+n)+" "+i.verticalLeftInnerExtent:a?" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.rightFullExtent-t-n-(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent-n)+" L "+(i.leftFullExtent+n+(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent-n)+" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.leftFullExtent+n)+" "+i.verticalLeftInnerExtent:" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.rightInnerExtent-t)+" "+(i.verticalFullExtent+n)+" L "+i.leftInnerExtent+" "+(i.verticalFullExtent+n)+" A "+(i.leftLargeArcRadius+n)+" "+(i.leftLargeArcRadius+n)+" 0 0 0 "+(i.leftFullExtent+n)+" "+i.verticalLeftInnerExtent,r+=" L "+(i.leftFullExtent+n)+" "+(i.sourceY+i.leftSmallArcRadius)+" A "+(i.leftLargeArcRadius+n)+" "+(i.leftSmallArcRadius+n)+" 0 0 0 "+i.leftInnerExtent+" "+(i.sourceY-n)+" L "+i.sourceX+" "+(i.sourceY-n)+" L "+i.sourceX+" "+(i.sourceY+n)+" L "+i.leftInnerExtent+" "+(i.sourceY+n)+" A "+(i.leftLargeArcRadius-n)+" "+(i.leftSmallArcRadius-n)+" 0 0 1 "+(i.leftFullExtent-n)+" "+(i.sourceY+i.leftSmallArcRadius)+" L "+(i.leftFullExtent-n)+" "+i.verticalLeftInnerExtent,r+=a&&o?" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.leftFullExtent-n-(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent-n)+" L "+(i.rightFullExtent+n-t+(i.rightLargeArcRadius-n))+" "+(i.verticalFullExtent-n)+" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.rightFullExtent+n-t)+" "+i.verticalRightInnerExtent:a?" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.leftFullExtent+n)+" "+(i.verticalFullExtent+n)+" L "+(i.rightFullExtent-t-n)+" "+(i.verticalFullExtent+n)+" A "+(i.rightLargeArcRadius+n)+" "+(i.rightLargeArcRadius+n)+" 0 0 0 "+(i.rightFullExtent+n-t)+" "+i.verticalRightInnerExtent:" A "+(i.leftLargeArcRadius-n)+" "+(i.leftLargeArcRadius-n)+" 0 0 1 "+i.leftInnerExtent+" "+(i.verticalFullExtent-n)+" L "+(i.rightInnerExtent-t)+" "+(i.verticalFullExtent-n)+" A "+(i.rightLargeArcRadius-n)+" "+(i.rightLargeArcRadius-n)+" 0 0 1 "+(i.rightFullExtent+n-t)+" "+i.verticalRightInnerExtent,r+=" L "+(i.rightFullExtent+n-t)+" "+(i.targetY+i.rightSmallArcRadius)+" A "+(i.rightLargeArcRadius-n)+" "+(i.rightSmallArcRadius-n)+" 0 0 1 "+(i.rightInnerExtent-t)+" "+(i.targetY+n)+" L "+(i.targetX-t)+" "+(i.targetY+n)+(t>0?" L "+i.targetX+" "+i.targetY:"")+"Z"),r}(e.link,t);var r=Math.abs((e.link.target.x0-e.link.source.x1)/2);t>r&&(t=r);var i=e.link.source.x1,a=e.link.target.x0-t,o=n(i,a),s=o(.5),l=o(.5),c=e.link.y0-e.link.width/2,u=e.link.y0+e.link.width/2,h=e.link.y1-e.link.width/2,f=e.link.y1+e.link.width/2,p="M"+i+","+c,d="C"+s+","+c+" "+l+","+h+" "+a+","+h,m="C"+l+","+f+" "+s+","+u+" "+i+","+u,g=t>0?"L"+(a+t)+","+(h+e.link.width/2):"";return p+d+(g+="L"+a+","+f)+m+"Z"}}function E(e,t){var r=l(t.color),n=s.nodePadAcross,i=e.nodePad/2;t.dx=t.x1-t.x0,t.dy=t.y1-t.y0;var a=t.dx,o=Math.max(.5,t.dy),u="node_"+t.pointNumber;return t.group&&(u=h.randstr()),t.trace=e.trace,t.curveNumber=e.trace.index,{index:t.pointNumber,key:u,partOfGroup:t.partOfGroup||!1,group:t.group,traceId:e.key,trace:e.trace,node:t,nodePad:e.nodePad,nodeLineColor:e.nodeLineColor,nodeLineWidth:e.nodeLineWidth,textFont:e.textFont,size:e.horizontal?e.height:e.width,visibleWidth:Math.ceil(a),visibleHeight:o,zoneX:-n,zoneY:-i,zoneWidth:a+2*n,zoneHeight:o+2*i,labelY:e.horizontal?t.dy/2+1:t.dx/2+1,left:1===t.originalLayer,sizeAcross:e.width,forceLayouts:e.forceLayouts,horizontal:e.horizontal,darkBackground:r.getBrightness()<=128,tinyColorHue:c.tinyRGB(r),tinyColorAlpha:r.getAlpha(),valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,graph:e.graph,arrangement:e.arrangement,uniqueNodeLabelPathId:[e.guid,e.key,u].join("_"),interactionState:e.interactionState,figure:e}}function C(e){e.attr("transform",(function(e){return f(e.node.x0.toFixed(3),e.node.y0.toFixed(3))}))}function I(e){e.call(C)}function L(e,t){e.call(I),t.attr("d",S())}function P(e){e.attr("width",(function(e){return e.node.x1-e.node.x0})).attr("height",(function(e){return e.visibleHeight}))}function z(e){return e.link.width>1||e.linkLineWidth>0}function D(e){return f(e.translateX,e.translateY)+(e.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function O(e,t,r){e.on(".basic",null).on("mouseover.basic",(function(e){!e.interactionState.dragInProgress&&!e.partOfGroup&&(r.hover(this,e,t),e.interactionState.hovered=[this,e])})).on("mousemove.basic",(function(e){!e.interactionState.dragInProgress&&!e.partOfGroup&&(r.follow(this,e),e.interactionState.hovered=[this,e])})).on("mouseout.basic",(function(e){!e.interactionState.dragInProgress&&!e.partOfGroup&&(r.unhover(this,e,t),e.interactionState.hovered=!1)})).on("click.basic",(function(e){e.interactionState.hovered&&(r.unhover(this,e,t),e.interactionState.hovered=!1),!e.interactionState.dragInProgress&&!e.partOfGroup&&r.select(this,e,t)}))}function R(e,t,n,a){var o=i.behavior.drag().origin((function(e){return{x:e.node.x0+e.visibleWidth/2,y:e.node.y0+e.visibleHeight/2}})).on("dragstart",(function(i){if("fixed"!==i.arrangement&&(h.ensureSingle(a._fullLayout._infolayer,"g","dragcover",(function(e){a._fullLayout._dragCover=e})),h.raiseToTop(this),i.interactionState.dragInProgress=i.node,j(i.node),i.interactionState.hovered&&(n.nodeEvents.unhover.apply(0,i.interactionState.hovered),i.interactionState.hovered=!1),"snap"===i.arrangement)){var o=i.traceId+"|"+i.key;i.forceLayouts[o]?i.forceLayouts[o].alpha(1):function(e,t,n){!function(e){for(var t=0;t0&&n.forceLayouts[t].alpha(0)}}(0,t,i,n)).stop()}(0,o,i),function(e,t,r,n,i){window.requestAnimationFrame((function a(){var o;for(o=0;o0)window.requestAnimationFrame(a);else{var l=r.node.originalX;r.node.x0=l-r.visibleWidth/2,r.node.x1=l+r.visibleWidth/2,B(r,i)}}))}(e,t,i,o,a)}})).on("drag",(function(r){if("fixed"!==r.arrangement){var n=i.event.x,a=i.event.y;"snap"===r.arrangement?(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2,r.node.y0=a-r.visibleHeight/2,r.node.y1=a+r.visibleHeight/2):("freeform"===r.arrangement&&(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2),a=Math.max(0,Math.min(r.size-r.visibleHeight/2,a)),r.node.y0=a-r.visibleHeight/2,r.node.y1=a+r.visibleHeight/2),j(r.node),"snap"!==r.arrangement&&(r.sankey.update(r.graph),L(e.filter(N(r)),t))}})).on("dragend",(function(e){if("fixed"!==e.arrangement){e.interactionState.dragInProgress=!1;for(var t=0;t"),color:_(l,"bgcolor")||s.addOpacity(m.color,1),borderColor:_(l,"bordercolor"),fontFamily:_(l,"font.family"),fontSize:_(l,"font.size"),fontColor:_(l,"font.color"),fontWeight:_(l,"font.weight"),fontStyle:_(l,"font.style"),fontVariant:_(l,"font.variant"),fontTextcase:_(l,"font.textcase"),fontLineposition:_(l,"font.lineposition"),fontShadow:_(l,"font.shadow"),nameLength:_(l,"namelength"),textAlign:_(l,"align"),idealAlign:r.event.x"),color:_(s,"bgcolor")||a.tinyColorHue,borderColor:_(s,"bordercolor"),fontFamily:_(s,"font.family"),fontSize:_(s,"font.size"),fontColor:_(s,"font.color"),fontWeight:_(s,"font.weight"),fontStyle:_(s,"font.style"),fontVariant:_(s,"font.variant"),fontTextcase:_(s,"font.textcase"),fontLineposition:_(s,"font.lineposition"),fontShadow:_(s,"font.shadow"),nameLength:_(s,"namelength"),textAlign:_(s,"align"),idealAlign:"left",hovertemplate:s.hovertemplate,hovertemplateLabels:v,eventData:[a.node]},{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:e});f(w,.85),p(w)}}},unhover:function(t,i,a){!1!==e._fullLayout.hovermode&&(r.select(t).call(y,i,a),"skip"!==i.node.trace.node.hoverinfo&&(i.node.fullData=i.node.trace,e.emit("plotly_unhover",{event:r.event,points:[i.node]})),o.loneUnhover(n._hoverlayer.node()))},select:function(t,n,i){var a=n.node;a.originalEvent=r.event,e._hoverdata=[a],r.select(t).call(y,n,i),o.click(e,{target:!0})}}})}}}),sw=m({"src/traces/sankey/base_plot.js"(e){var t=De().overrideAll,r=Tt().getModuleCalcData,n=ow(),i=U(),a=dr(),o=pr(),s=Cn().prepSelect,l=ct(),c=He(),u="sankey";function h(e,t){var r=e._fullData[t],n=e._fullLayout,i=n.dragmode,u="pan"===n.dragmode?"move":"crosshair",h=r._bgRect;if(h&&"pan"!==i&&"zoom"!==i){a(h,u);var f={_id:"x",c2p:l.identity,_offset:r._sankey.translateX,_length:r._sankey.width},p={_id:"y",c2p:l.identity,_offset:r._sankey.translateY,_length:r._sankey.height},d={gd:e,element:h.node(),plotinfo:{id:t,xaxis:f,yaxis:p,fillRangeItems:l.noop},subplot:t,xaxes:[f],yaxes:[p],doneFnCompleted:function(r){var n,i=e._fullData[t],a=i.node.groups.slice(),o=[];function s(e){for(var t=i._sankey.graph.nodes,r=0;r0}function k(e){e.each((function(e){y.stroke(r.select(this),e.line.color)})).each((function(e){y.fill(r.select(this),e.color)})).style("stroke-width",(function(e){return e.line.width}))}function A(e,t,r){var n=e._fullLayout,i=a.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},t),o={type:"linear",_id:"x"+t._id},s={letter:"x",font:n.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function l(e,t){return a.coerce(i,o,g,e,t)}return d(i,o,l,s,n),m(i,o,l,s),o}function M(e,t,r){return[Math.min(t/e.width,r/e.height),e,t+"x"+r]}function S(e,t,n,i){var a=document.createElementNS("http://www.w3.org/2000/svg","text"),o=r.select(a);return o.text(e).attr("x",0).attr("y",0).attr("text-anchor",n).attr("data-unformatted",e).call(f.convertToTspans,i).call(u.font,t),u.bBox(o.node())}function E(e,t,r,n,i,o){var s="_cache"+t;e[s]&&e[s].key===i||(e[s]={key:i,value:r});var l=a.aggNums(o,null,[e[s].value,n],2);return e[s].value=l,l}t.exports=function(e,t,d,m){var g,v=e._fullLayout;T(d)&&m&&(g=m()),a.makeTraceGroups(v._indicatorlayer,t,"trace").each((function(t){var m,b,C,I,L,P=t[0].trace,z=r.select(this),D=P._hasGauge,O=P._isAngular,R=P._isBullet,F=P.domain,B={w:v._size.w*(F.x[1]-F.x[0]),h:v._size.h*(F.y[1]-F.y[0]),l:v._size.l+v._size.w*F.x[0],r:v._size.r+v._size.w*(1-F.x[1]),t:v._size.t+v._size.h*(1-F.y[1]),b:v._size.b+v._size.h*F.y[0]},j=B.l+B.w/2,N=B.t+B.h/2,U=Math.min(B.w/2,B.h),V=h.innerRadius*U,q=P.align||"center";if(b=N,D){if(O&&(m=j,b=N+U/2,C=function(e){return function(e,t){return[t/Math.sqrt(e.width/2*(e.width/2)+e.height*e.height),e,t]}(e,.9*V)}),R){var H=h.bulletPadding,G=1-h.bulletNumberDomainSize+H;m=B.l+(G+(1-G)*_[q])*B.w,C=function(e){return M(e,(h.bulletNumberDomainSize-H)*B.w,B.h)}}}else m=B.l+_[q]*B.w,C=function(e){return M(e,B.w,B.h)};!function(e,t,n,l){var c,h,d,m=n[0].trace,g=l.numbersX,v=l.numbersY,b=m.align||"center",k=x[b],M=l.transitionOpts,C=l.onComplete,I=a.ensureSingle(t,"g","numbers"),L=[];m._hasNumber&&L.push("number"),m._hasDelta&&(L.push("delta"),"left"===m.delta.position&&L.reverse());var P=I.selectAll("text").data(L);function z(t,r,n,i){if(!t.match("s")||n>=0==i>=0||r(n).slice(-1).match(w)||r(i).slice(-1).match(w))return r;var a=t.slice().replace("s","f").replace(/\d+/,(function(e){return parseInt(e)-1})),o=A(e,{tickformat:a});return function(e){return Math.abs(e)<1?p.tickText(o,e).text:r(e)}}P.enter().append("text"),P.attr("text-anchor",(function(){return k})).attr("class",(function(e){return e})).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),P.exit().remove();var D,O=m.mode+m.align;if(m._hasDelta&&(D=function(){var t=A(e,{tickformat:m.delta.valueformat},m._range);t.setScale(),p.prepTicks(t);var a=function(e){return p.tickText(t,e).text},o=m.delta.suffix,s=m.delta.prefix,l=function(e){return m.delta.relative?e.relativeDelta:e.delta},c=function(e,t){return 0===e||"number"!=typeof e||isNaN(e)?"-":(e>0?m.delta.increasing.symbol:m.delta.decreasing.symbol)+s+t(e)+o},d=function(e){return e.delta>=0?m.delta.increasing.color:m.delta.decreasing.color};void 0===m._deltaLastValue&&(m._deltaLastValue=l(n[0]));var g=I.select("text.delta");function v(){g.text(c(l(n[0]),a)).call(y.fill,d(n[0])).call(f.convertToTspans,e)}return g.call(u.font,m.delta.font).call(y.fill,d({delta:m._deltaLastValue})),T(M)?g.transition().duration(M.duration).ease(M.easing).tween("text",(function(){var e=r.select(this),t=l(n[0]),o=m._deltaLastValue,s=z(m.delta.valueformat,a,o,t),u=i(o,t);return m._deltaLastValue=t,function(t){e.text(c(u(t),s)),e.call(y.fill,d({delta:u(t)}))}})).each("end",(function(){v(),C&&C()})).each("interrupt",(function(){v(),C&&C()})):v(),h=S(c(l(n[0]),a),m.delta.font,k,e),g}(),O+=m.delta.position+m.delta.font.size+m.delta.font.family+m.delta.valueformat,O+=m.delta.increasing.symbol+m.delta.decreasing.symbol,d=h),m._hasNumber&&(function(){var t=A(e,{tickformat:m.number.valueformat},m._range);t.setScale(),p.prepTicks(t);var a=function(e){return p.tickText(t,e).text},o=m.number.suffix,s=m.number.prefix,l=I.select("text.number");function h(){var t="number"==typeof n[0].y?s+a(n[0].y)+o:"-";l.text(t).call(u.font,m.number.font).call(f.convertToTspans,e)}T(M)?l.transition().duration(M.duration).ease(M.easing).each("end",(function(){h(),C&&C()})).each("interrupt",(function(){h(),C&&C()})).attrTween("text",(function(){var e=r.select(this),t=i(n[0].lastY,n[0].y);m._lastValue=n[0].y;var l=z(m.number.valueformat,a,n[0].lastY,n[0].y);return function(r){e.text(s+l(t(r))+o)}})):h(),c=S(s+a(n[0].y)+o,m.number.font,k,e)}(),O+=m.number.font.size+m.number.font.family+m.number.valueformat+m.number.suffix+m.number.prefix,d=c),m._hasDelta&&m._hasNumber){var R,F,B=[(c.left+c.right)/2,(c.top+c.bottom)/2],j=[(h.left+h.right)/2,(h.top+h.bottom)/2],N=.75*m.delta.font.size;"left"===m.delta.position&&(R=E(m,"deltaPos",0,-1*(c.width*_[m.align]+h.width*(1-_[m.align])+N),O,Math.min),F=B[1]-j[1],d={width:c.width+h.width+N,height:Math.max(c.height,h.height),left:h.left+R,right:c.right,top:Math.min(c.top,h.top+F),bottom:Math.max(c.bottom,h.bottom+F)}),"right"===m.delta.position&&(R=E(m,"deltaPos",0,c.width*(1-_[m.align])+h.width*_[m.align]+N,O,Math.max),F=B[1]-j[1],d={width:c.width+h.width+N,height:Math.max(c.height,h.height),left:c.left,right:h.right+R,top:Math.min(c.top,h.top+F),bottom:Math.max(c.bottom,h.bottom+F)}),"bottom"===m.delta.position&&(R=null,F=h.height,d={width:Math.max(c.width,h.width),height:c.height+h.height,left:Math.min(c.left,h.left),right:Math.max(c.right,h.right),top:c.bottom-c.height,bottom:c.bottom+h.height}),"top"===m.delta.position&&(R=null,F=c.top,d={width:Math.max(c.width,h.width),height:c.height+h.height,left:Math.min(c.left,h.left),right:Math.max(c.right,h.right),top:c.bottom-c.height-h.height,bottom:c.bottom}),D.attr({dx:R,dy:F})}(m._hasNumber||m._hasDelta)&&I.attr("transform",(function(){var e=l.numbersScaler(d);O+=e[2];var t,r=E(m,"numbersScale",1,e[0],O,Math.min);m._scaleNumbers||(r=1),t=m._isAngular?v-r*d.bottom:v-r*(d.top+d.bottom)/2,m._numbersTop=r*d.top+t;var n=d[b];"center"===b&&(n=(d.left+d.right)/2);var i=g-r*n;return i=E(m,"numbersTranslate",0,i,O,Math.max),s(i,t)+o(r)}))}(e,z,t,{numbersX:m,numbersY:b,numbersScaler:C,transitionOpts:d,onComplete:g}),D&&(I={range:P.gauge.axis.range,color:P.gauge.bgcolor,line:{color:P.gauge.bordercolor,width:0},thickness:1},L={range:P.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:P.gauge.bordercolor,width:P.gauge.borderwidth},thickness:1});var W=z.selectAll("g.angular").data(O?t:[]);W.exit().remove();var Z=z.selectAll("g.angularaxis").data(O?t:[]);Z.exit().remove(),O&&function(e,t,i,a){var o,u,h,f,d=i[0].trace,m=a.size,g=a.radius,y=a.innerRadius,v=a.gaugeBg,x=a.gaugeOutline,_=[m.l+m.w/2,m.t+m.h/2+g/2],b=a.gauge,w=a.layer,M=a.transitionOpts,S=a.onComplete,E=Math.PI/2;function C(e){var t=d.gauge.axis.range[0],r=(e-t)/(d.gauge.axis.range[1]-t)*Math.PI-E;return r<-E?-E:r>E?E:r}function I(e){return r.svg.arc().innerRadius((y+g)/2-e/2*(g-y)).outerRadius((y+g)/2+e/2*(g-y)).startAngle(-E)}function L(e){e.attr("d",(function(e){return I(e.thickness).startAngle(C(e.range[0])).endAngle(C(e.range[1]))()}))}b.enter().append("g").classed("angular",!0),b.attr("transform",s(_[0],_[1])),w.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),w.selectAll("g.xangularaxistick,path,text").remove(),(o=A(e,d.gauge.axis)).type="linear",o.range=d.gauge.axis.range,o._id="xangularaxis",o.ticklabeloverflow="allow",o.setScale();var P=function(e){return(o.range[0]-e.x)/(o.range[1]-o.range[0])*Math.PI+Math.PI},z={},D=p.makeLabelFns(o,0).labelStandoff;z.xFn=function(e){var t=P(e);return Math.cos(t)*D},z.yFn=function(e){var t=P(e),r=Math.sin(t)>0?.2:1;return-Math.sin(t)*(D+e.fontSize*r)+Math.abs(Math.cos(t))*(e.fontSize*c)},z.anchorFn=function(e){var t=P(e),r=Math.cos(t);return Math.abs(r)<.1?"middle":r>0?"start":"end"},z.heightFn=function(e,t,r){var n=P(e);return-.5*(1+Math.sin(n))*r};var O=function(e){return s(_[0]+g*Math.cos(e),_[1]-g*Math.sin(e))};h=function(e){return O(P(e))};if(u=p.calcTicks(o),f=p.getTickSigns(o)[2],o.visible){f="inside"===o.ticks?-1:1;var R=(o.linewidth||1)/2;p.drawTicks(e,o,{vals:u,layer:w,path:"M"+f*R+",0h"+f*o.ticklen,transFn:function(e){var t=P(e);return O(t)+"rotate("+-l(t)+")"}}),p.drawLabels(e,o,{vals:u,layer:w,transFn:h,labelFns:z})}var F=[v].concat(d.gauge.steps),B=b.selectAll("g.bg-arc").data(F);B.enter().append("g").classed("bg-arc",!0).append("path"),B.select("path").call(L).call(k),B.exit().remove();var j=I(d.gauge.bar.thickness),N=b.selectAll("g.value-arc").data([d.gauge.bar]);N.enter().append("g").classed("value-arc",!0).append("path");var U=N.select("path");T(M)?(U.transition().duration(M.duration).ease(M.easing).each("end",(function(){S&&S()})).each("interrupt",(function(){S&&S()})).attrTween("d",function(e,t,r){return function(){var i=n(t,r);return function(t){return e.endAngle(i(t))()}}}(j,C(i[0].lastY),C(i[0].y))),d._lastValue=i[0].y):U.attr("d","number"==typeof i[0].y?j.endAngle(C(i[0].y)):"M0,0Z"),U.call(k),N.exit().remove(),F=[];var V=d.gauge.threshold.value;(V||0===V)&&F.push({range:[V,V],color:d.gauge.threshold.color,line:{color:d.gauge.threshold.line.color,width:d.gauge.threshold.line.width},thickness:d.gauge.threshold.thickness});var q=b.selectAll("g.threshold-arc").data(F);q.enter().append("g").classed("threshold-arc",!0).append("path"),q.select("path").call(L).call(k),q.exit().remove();var H=b.selectAll("g.gauge-outline").data([x]);H.enter().append("g").classed("gauge-outline",!0).append("path"),H.select("path").call(L).call(k),H.exit().remove()}(e,0,t,{radius:U,innerRadius:V,gauge:W,layer:Z,size:B,gaugeBg:I,gaugeOutline:L,transitionOpts:d,onComplete:g});var Y=z.selectAll("g.bullet").data(R?t:[]);Y.exit().remove();var X=z.selectAll("g.bulletaxis").data(R?t:[]);X.exit().remove(),R&&function(e,t,r,n){var i,a,o,l,c,u=r[0].trace,f=n.gauge,d=n.layer,m=n.gaugeBg,g=n.gaugeOutline,v=n.size,x=u.domain,_=n.transitionOpts,b=n.onComplete;f.enter().append("g").classed("bullet",!0),f.attr("transform",s(v.l,v.t)),d.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),d.selectAll("g.xbulletaxistick,path,text").remove();var w=v.h,M=u.gauge.bar.thickness*w,S=x.x[0],E=x.x[0]+(x.x[1]-x.x[0])*(u._hasNumber||u._hasDelta?1-h.bulletNumberDomainSize:1);function C(e){e.attr("width",(function(e){return Math.max(0,i.c2p(e.range[1])-i.c2p(e.range[0]))})).attr("x",(function(e){return i.c2p(e.range[0])})).attr("y",(function(e){return.5*(1-e.thickness)*w})).attr("height",(function(e){return e.thickness*w}))}(i=A(e,u.gauge.axis))._id="xbulletaxis",i.domain=[S,E],i.setScale(),a=p.calcTicks(i),o=p.makeTransTickFn(i),l=p.getTickSigns(i)[2],c=v.t+v.h,i.visible&&(p.drawTicks(e,i,{vals:"inside"===i.ticks?p.clipEnds(i,a):a,layer:d,path:p.makeTickPath(i,c,l),transFn:o}),p.drawLabels(e,i,{vals:a,layer:d,transFn:o,labelFns:p.makeLabelFns(i,c)}));var I=[m].concat(u.gauge.steps),L=f.selectAll("g.bg-bullet").data(I);L.enter().append("g").classed("bg-bullet",!0).append("rect"),L.select("rect").call(C).call(k),L.exit().remove();var P=f.selectAll("g.value-bullet").data([u.gauge.bar]);P.enter().append("g").classed("value-bullet",!0).append("rect"),P.select("rect").attr("height",M).attr("y",(w-M)/2).call(k),T(_)?P.select("rect").transition().duration(_.duration).ease(_.easing).each("end",(function(){b&&b()})).each("interrupt",(function(){b&&b()})).attr("width",Math.max(0,i.c2p(Math.min(u.gauge.axis.range[1],r[0].y)))):P.select("rect").attr("width","number"==typeof r[0].y?Math.max(0,i.c2p(Math.min(u.gauge.axis.range[1],r[0].y))):0),P.exit().remove();var z=r.filter((function(){return u.gauge.threshold.value||0===u.gauge.threshold.value})),D=f.selectAll("g.threshold-bullet").data(z);D.enter().append("g").classed("threshold-bullet",!0).append("line"),D.select("line").attr("x1",i.c2p(u.gauge.threshold.value)).attr("x2",i.c2p(u.gauge.threshold.value)).attr("y1",(1-u.gauge.threshold.thickness)/2*w).attr("y2",(1-(1-u.gauge.threshold.thickness)/2)*w).call(y.stroke,u.gauge.threshold.line.color).style("stroke-width",u.gauge.threshold.line.width),D.exit().remove();var O=f.selectAll("g.gauge-outline").data([g]);O.enter().append("g").classed("gauge-outline",!0).append("rect"),O.select("rect").call(C).call(k),O.exit().remove()}(e,0,t,{gauge:Y,layer:X,size:B,gaugeBg:I,gaugeOutline:L,transitionOpts:d,onComplete:g});var $=z.selectAll("text.title").data(t);$.exit().remove(),$.enter().append("text").classed("title",!0),$.attr("text-anchor",(function(){return R?x.right:x[P.title.align]})).text(P.title.text).call(u.font,P.title.font).call(f.convertToTspans,e),$.attr("transform",(function(){var e,t=B.l+B.w*_[P.title.align],r=h.titlePadding,n=u.bBox($.node());return D?(O&&(e=P.gauge.axis.visible?u.bBox(Z.node()).top-r-n.bottom:B.t+B.h/2-U/2-n.bottom-r),R&&(e=b-(n.top+n.bottom)/2,t=B.l-h.bulletPadding*B.w)):e=P._numbersTop-r-n.bottom,s(t,e)}))}))}}}),yw=m({"src/traces/indicator/index.js"(e,t){t.exports={moduleType:"trace",name:"indicator",basePlotModule:hw(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:fw(),supplyDefaults:dw().supplyDefaults,calc:mw().calc,plot:gw(),meta:{}}}}),vw=m({"lib/indicator.js"(e,t){t.exports=yw()}}),xw=m({"src/traces/table/attributes.js"(e,t){var r=bn(),n=B().extendFlat,i=De().overrideAll,a=j(),o=Ma().attributes,s=It().descriptionOnlyNumbers;t.exports=i({domain:o({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null},columnorder:{valType:"data_array"},header:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:s("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:n({},r.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:n({},a({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:s("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:n({},r.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:n({},a({arrayOk:!0}))}},"calc","from-root")}}),_w=m({"src/traces/table/defaults.js"(e,t){var r=ct(),n=xw(),i=Ma().defaults;t.exports=function(e,t,a,o){function s(i,a){return r.coerce(e,t,n,i,a)}i(t,o,s),s("columnwidth"),s("header.values"),s("header.format"),s("header.align"),s("header.prefix"),s("header.suffix"),s("header.height"),s("header.line.width"),s("header.line.color"),s("header.fill.color"),r.coerceFont(s,"header.font",o.font),function(e,t){for(var r=e.columnorder||[],n=e.header.values.length,i=r.slice(0,n),a=i.slice().sort((function(e,t){return e-t})),o=i.map((function(e){return a.indexOf(e)})),s=o.length;s",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}}}),Tw=m({"src/traces/table/data_preparation_helper.js"(e,t){var r=ww(),n=B().extendFlat,i=M(),a=I().isTypedArray,o=I().isArrayOrTypedArray;function s(e){if(o(e)){for(var t=0,r=0;r=t||c===e.length-1)&&(n[i]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=c,o={firstRowIndex:null,lastRowIndex:null,rows:[]},i+=a,s=c+1,a=0);return n}t.exports=function(e,t){var a=c(t.cells.values),d=function(e){return e.slice(t.header.values.length,e.length)},m=c(t.header.values);m.length&&!m[0].length&&(m[0]=[""],m=c(m));var g=m.concat(d(a).map((function(){return u((m[0]||[""]).length)}))),y=t.domain,v=Math.floor(e._fullLayout._size.w*(y.x[1]-y.x[0])),x=Math.floor(e._fullLayout._size.h*(y.y[1]-y.y[0])),_=t.header.values.length?g[0].map((function(){return t.header.height})):[r.emptyHeaderHeight],b=a.length?a[0].map((function(){return t.cells.height})):[],w=_.reduce(l,0),T=p(b,x-w+r.uplift),k=f(p(_,w),[]),A=f(T,k),M={},S=t._fullInput.columnorder;o(S)&&(S=Array.from(S)),S=S.concat(d(a.map((function(e,t){return t}))));var E=g.map((function(e,r){var n=o(t.columnwidth)?t.columnwidth[Math.min(r,t.columnwidth.length-1)]:t.columnwidth;return i(n)?Number(n):1})),C=E.reduce(l,0);E=E.map((function(e){return e/C*v}));var I=Math.max(s(t.header.line.width),s(t.cells.line.width)),L={key:t.uid+e._context.staticPlot,translateX:y.x[0]*e._fullLayout._size.w,translateY:e._fullLayout._size.h*(1-y.y[1]),size:e._fullLayout._size,width:v,maxLineWidth:I,height:x,columnOrder:S,groupHeight:x,rowBlocks:A,headerRowBlocks:k,scrollY:0,cells:n({},t.cells,{values:a}),headerCells:n({},t.header,{values:g}),gdColumns:g.map((function(e){return e[0]})),gdColumnsOriginalOrder:g.map((function(e){return e[0]})),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:g.map((function(e,t){var r=M[e];return M[e]=(r||0)+1,{key:e+"__"+M[e],label:e,specIndex:t,xIndex:S[t],xScale:h,x:void 0,calcdata:void 0,columnWidth:E[t]}}))};return L.columns.forEach((function(e){e.calcdata=L,e.x=h(e)})),L}}}),kw=m({"src/traces/table/data_split_helpers.js"(e){var t=B().extendFlat;e.splitToPanels=function(e){var r=[0,0],n=t({},e,{key:"header",type:"header",page:0,prevPages:r,currentRepaint:[null,null],dragHandle:!0,values:e.calcdata.headerCells.values[e.specIndex],rowBlocks:e.calcdata.headerRowBlocks,calcdata:t({},e.calcdata,{cells:e.calcdata.headerCells})});return[t({},e,{key:"cells1",type:"cells",page:0,prevPages:r,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),t({},e,{key:"cells2",type:"cells",page:1,prevPages:r,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),n]},e.splitToCells=function(e){var t=function(e){var t=e.rowBlocks[e.page],r=t?t.rows[0].rowIndex:0;return[r,t?r+t.rows.length:0]}(e);return(e.values||[]).slice(t[0],t[1]).map((function(r,n){return{keyWithinBlock:n+("string"==typeof r&&r.match(/[<$&> ]/)?"_keybuster_"+Math.random():""),key:t[0]+n,column:e,calcdata:e.calcdata,page:e.page,rowBlocks:e.rowBlocks,value:r}}))}}}),Aw=m({"src/traces/table/plot.js"(e,t){var r=ww(),n=b(),i=ct(),a=i.numberFormat,o=$x(),s=er(),l=Et(),c=ct().raiseToTop,u=ct().strTranslate,h=ct().cancelTransition,f=Tw(),p=kw(),d=W();function m(e){return Math.ceil(e.calcdata.maxLineWidth/2)}function g(e,t){return"clip"+e._fullLayout._uid+"_scrollAreaBottomClip_"+t.key}function y(e,t){return"clip"+e._fullLayout._uid+"_columnBoundaryClippath_"+t.calcdata.key+"_"+t.specIndex}function v(e){return[].concat.apply([],e.map((function(e){return e}))).map((function(e){return e.__data__}))}function x(e,t,i){var a=e.selectAll("."+r.cn.scrollbarKit).data(o.repeat,o.keyFun);a.enter().append("g").classed(r.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),a.each((function(e){var t=e.scrollbarState;t.totalHeight=function(e){var t=e.rowBlocks;return R(t,t.length-1)+(t.length?F(t[t.length-1],1/0):1)}(e),t.scrollableAreaHeight=e.groupHeight-E(e),t.currentlyVisibleHeight=Math.min(t.totalHeight,t.scrollableAreaHeight),t.ratio=t.currentlyVisibleHeight/t.totalHeight,t.barLength=Math.max(t.ratio*t.currentlyVisibleHeight,r.goldenRatio*r.scrollbarWidth),t.barWiggleRoom=t.currentlyVisibleHeight-t.barLength,t.wiggleRoom=Math.max(0,t.totalHeight-t.scrollableAreaHeight),t.topY=0===t.barWiggleRoom?0:e.scrollY/t.wiggleRoom*t.barWiggleRoom,t.bottomY=t.topY+t.barLength,t.dragMultiplier=t.wiggleRoom/t.barWiggleRoom})).attr("transform",(function(e){var t=e.width+r.scrollbarWidth/2+r.scrollbarOffset;return u(t,E(e))}));var s=a.selectAll("."+r.cn.scrollbar).data(o.repeat,o.keyFun);s.enter().append("g").classed(r.cn.scrollbar,!0);var l=s.selectAll("."+r.cn.scrollbarSlider).data(o.repeat,o.keyFun);l.enter().append("g").classed(r.cn.scrollbarSlider,!0),l.attr("transform",(function(e){return u(0,e.scrollbarState.topY||0)}));var c=l.selectAll("."+r.cn.scrollbarGlyph).data(o.repeat,o.keyFun);c.enter().append("line").classed(r.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",r.scrollbarWidth).attr("stroke-linecap","round").attr("y1",r.scrollbarWidth/2),c.attr("y2",(function(e){return e.scrollbarState.barLength-r.scrollbarWidth/2})).attr("stroke-opacity",(function(e){return e.columnDragInProgress||!e.scrollbarState.barWiggleRoom||i?0:.4})),c.transition().delay(0).duration(0),c.transition().delay(r.scrollbarHideDelay).duration(r.scrollbarHideDuration).attr("stroke-opacity",0);var h=s.selectAll("."+r.cn.scrollbarCaptureZone).data(o.repeat,o.keyFun);h.enter().append("line").classed(r.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",r.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",(function(r){var i=n.event.y,a=this.getBoundingClientRect(),o=r.scrollbarState,s=i-a.top,l=n.scale.linear().domain([0,o.scrollableAreaHeight]).range([0,o.totalHeight]).clamp(!0);o.topY<=s&&s<=o.bottomY||I(t,e,null,l(s-o.barLength/2))(r)})).call(n.behavior.drag().origin((function(e){return n.event.stopPropagation(),e.scrollbarState.scrollbarScrollInProgress=!0,e})).on("drag",I(t,e)).on("dragend",(function(){}))),h.attr("y2",(function(e){return e.scrollbarState.scrollableAreaHeight})),t._context.staticPlot&&(c.remove(),h.remove())}function _(e,t,i,a){var l=function(e){var t=e.selectAll("."+r.cn.columnCells).data(o.repeat,o.keyFun);return t.enter().append("g").classed(r.cn.columnCells,!0),t.exit().remove(),t}(i),c=function(e){var t=e.selectAll("."+r.cn.columnCell).data(p.splitToCells,(function(e){return e.keyWithinBlock}));return t.enter().append("g").classed(r.cn.columnCell,!0),t.exit().remove(),t}(l);!function(e){e.each((function(e,t){var r=e.calcdata.cells.font,n=e.column.specIndex,i={size:k(r.size,n,t),color:k(r.color,n,t),family:k(r.family,n,t),weight:k(r.weight,n,t),style:k(r.style,n,t),variant:k(r.variant,n,t),textcase:k(r.textcase,n,t),lineposition:k(r.lineposition,n,t),shadow:k(r.shadow,n,t)};e.rowNumber=e.key,e.align=k(e.calcdata.cells.align,n,t),e.cellBorderWidth=k(e.calcdata.cells.line.width,n,t),e.font=i}))}(c);var u=function(e){var t=e.selectAll("."+r.cn.cellRect).data(o.repeat,(function(e){return e.keyWithinBlock}));return t.enter().append("rect").classed(r.cn.cellRect,!0),t}(c);!function(e){e.attr("width",(function(e){return e.column.columnWidth})).attr("stroke-width",(function(e){return e.cellBorderWidth})).each((function(e){var t=n.select(this);d.stroke(t,k(e.calcdata.cells.line.color,e.column.specIndex,e.rowNumber)),d.fill(t,k(e.calcdata.cells.fill.color,e.column.specIndex,e.rowNumber))}))}(u);var h=function(e){var t=e.selectAll("."+r.cn.cellTextHolder).data(o.repeat,(function(e){return e.keyWithinBlock}));return t.enter().append("g").classed(r.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),t}(c),f=function(e){var t=e.selectAll("."+r.cn.cellText).data(o.repeat,(function(e){return e.keyWithinBlock}));return t.enter().append("text").classed(r.cn.cellText,!0).style("cursor",(function(){return"auto"})).on("mousedown",(function(){n.event.stopPropagation()})),t}(h);(function(e){e.each((function(e){s.font(n.select(this),e.font)}))})(f),w(f,t,a,e),O(c)}function w(e,t,i,o){e.text((function(e){var t=e.column.specIndex,n=e.rowNumber,i=e.value,o="string"==typeof i,s=o&&i.match(/
/i),l=!o||s;e.mayHaveMarkup=o&&i.match(/[<&>]/);var c=function(e){return"string"==typeof e&&e.match(r.latexCheck)}(i);e.latex=c;var u,h,f=c?"":k(e.calcdata.cells.prefix,t,n)||"",p=c?"":k(e.calcdata.cells.suffix,t,n)||"",d=c?null:k(e.calcdata.cells.format,t,n)||null,m=f+(d?a(d)(e.value):e.value)+p;if(e.wrappingNeeded=!e.wrapped&&!l&&!c&&(u=T(m)),e.cellHeightMayIncrease=s||c||e.mayHaveMarkup||(void 0===u?T(m):u),e.needsConvertToTspans=e.mayHaveMarkup||e.wrappingNeeded||e.latex,e.wrappingNeeded){var g=(" "===r.wrapSplitCharacter?m.replace(/i&&n.push(a),i+=l}return n}(i,l,s);1===c.length&&(c[0]===i.length-1?c.unshift(c[0]-1):c.push(c[0]+1)),c[0]%2&&c.reverse(),t.each((function(e,t){e.page=c[t],e.scrollY=l})),t.attr("transform",(function(e){var t=R(e.rowBlocks,e.page)-e.scrollY;return u(0,t)})),e&&(L(e,r,t,c,n.prevPages,n,0),L(e,r,t,c,n.prevPages,n,1),x(r,e))}}function I(e,t,i,a){return function(o){var s=o.calcdata?o.calcdata:o,l=t.filter((function(e){return s.key===e.key})),c=i||s.scrollbarState.dragMultiplier,u=s.scrollY;s.scrollY=void 0===a?s.scrollY+c*n.event.dy:a;var h=l.selectAll("."+r.cn.yColumn).selectAll("."+r.cn.columnBlock).filter(M);return C(e,h,l),s.scrollY===u}}function L(e,t,r,n,i,a,o){n[o]!==i[o]&&(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout((function(){var a=r.filter((function(e,t){return t===o&&n[t]!==i[t]}));_(e,t,a,r),i[o]=n[o]})))}function P(e,t,i,a){return function(){var o=n.select(t.parentNode);o.each((function(e){var t=e.fragments;o.selectAll("tspan.line").each((function(e,r){t[r].width=this.getComputedTextLength()}));var n,i,a=t[t.length-1].width,s=t.slice(0,-1),l=[],c=0,u=e.column.columnWidth-2*r.cellPad;for(e.value="";s.length;)c+(i=(n=s.shift()).width+a)>u&&(e.value+=l.join(r.wrapSpacer)+r.lineBreaker,l=[],c=0),l.push(n.text),c+=i;c&&(e.value+=l.join(r.wrapSpacer)),e.wrapped=!0})),o.selectAll("tspan.line").remove(),w(o.select("."+r.cn.cellText),i,e,a),n.select(t.parentNode.parentNode).call(O)}}function z(e,t,i,a,o){return function(){if(!o.settledY){var s=n.select(t.parentNode),l=j(o),c=o.key-l.firstRowIndex,h=l.rows[c].rowHeight,f=o.cellHeightMayIncrease?t.parentNode.getBoundingClientRect().height+2*r.cellPad:h,p=Math.max(f,h);p-l.rows[c].rowHeight&&(l.rows[c].rowHeight=p,e.selectAll("."+r.cn.columnCell).call(O),C(null,e.filter(M),0),x(i,a,!0)),s.attr("transform",(function(){var e=this,t=e.parentNode.getBoundingClientRect(),i=n.select(e.parentNode).select("."+r.cn.cellRect).node().getBoundingClientRect(),a=e.transform.baseVal.consolidate(),s=i.top-t.top+(a?a.matrix.f:r.cellPad);return u(D(o,n.select(e.parentNode).select("."+r.cn.cellTextHolder).node().getBoundingClientRect().width),s)})),o.settledY=!0}}}function D(e,t){switch(e.align){case"left":default:return r.cellPad;case"right":return e.column.columnWidth-(t||0)-r.cellPad;case"center":return(e.column.columnWidth-(t||0))/2}}function O(e){e.attr("transform",(function(e){var t=e.rowBlocks[0].auxiliaryBlocks.reduce((function(e,t){return e+F(t,1/0)}),0),r=F(j(e),e.key);return u(0,r+t)})).selectAll("."+r.cn.cellRect).attr("height",(function(e){return function(e,t){return e.rows[t-e.firstRowIndex]}(j(e),e.key).rowHeight}))}function R(e,t){for(var r=0,n=t-1;n>=0;n--)r+=B(e[n]);return r}function F(e,t){for(var r=0,n=0;nt.length&&(e=e.slice(0,t.length)):e=[],i=0;i90&&(p-=180,l=-l),{angle:p,flip:l,p:e.c2p(n,t,r),offsetMultplier:c}}}}),Bw=m({"src/traces/carpet/plot.js"(e,t){var r=b(),n=er(),i=Ow(),a=Rw(),o=Fw(),s=Et(),l=ct(),c=l.strRotate,u=l.strTranslate,h=St();function f(e,t,o,s,l,c,u){var h="const-"+l+"-lines",f=o.selectAll("."+h).data(c);f.enter().append("path").classed(h,!0).style("vector-effect",u?"none":"non-scaling-stroke"),f.each((function(o){var s=o,l=s.x,c=s.y,u=i([],l,e.c2p),h=i([],c,t.c2p),f="M"+a(u,h,s.smoothing);r.select(this).attr("d",f).style("stroke-width",s.width).style("stroke",s.color).style("stroke-dasharray",n.dashStyle(s.dash,s.width)).style("fill","none")})),f.exit().remove()}function p(e,t,i,a,l,h,f,p){var d=h.selectAll("text."+p).data(f);d.enter().append("text").classed(p,!0);var m=0,g={};return d.each((function(l,h){var f;if("auto"===l.axis.tickangle)f=o(a,t,i,l.xy,l.dxy);else{var p=(l.axis.tickangle+180)*Math.PI/180;f=o(a,t,i,l.xy,[Math.cos(p),Math.sin(p)])}h||(g={angle:f.angle,flip:f.flip});var d=(l.endAnchor?-1:1)*f.flip,y=r.select(this).attr({"text-anchor":d>0?"start":"end","data-notex":1}).call(n.font,l.font).text(l.text).call(s.convertToTspans,e),v=n.bBox(this);y.attr("transform",u(f.p[0],f.p[1])+c(f.angle)+u(l.axis.labelpadding*d,.3*v.height)),m=Math.max(m,v.width+l.axis.labelpadding)})),d.exit().remove(),g.maxExtent=m,g}t.exports=function(e,t,n,s){var c=e._context.staticPlot,u=t.xaxis,h=t.yaxis,d=e._fullLayout._clips;l.makeTraceGroups(s,n,"trace").each((function(t){var n=r.select(this),s=t[0],m=s.trace,y=m.aaxis,v=m.baxis,x=l.ensureSingle(n,"g","minorlayer"),_=l.ensureSingle(n,"g","majorlayer"),b=l.ensureSingle(n,"g","boundarylayer"),w=l.ensureSingle(n,"g","labellayer");n.style("opacity",m.opacity),f(u,h,_,0,"a",y._gridlines,!0),f(u,h,_,0,"b",v._gridlines,!0),f(u,h,x,0,"a",y._minorgridlines,!0),f(u,h,x,0,"b",v._minorgridlines,!0),f(u,h,b,0,"a-boundary",y._boundarylines,c),f(u,h,b,0,"b-boundary",v._boundarylines,c);var T=p(e,u,h,m,0,w,y._labels,"a-label"),k=p(e,u,h,m,0,w,v._labels,"b-label");(function(e,t,r,n,i,a,s,c){var u,h,f,p,d=l.aggNums(Math.min,null,r.a),m=l.aggNums(Math.max,null,r.a),y=l.aggNums(Math.min,null,r.b),v=l.aggNums(Math.max,null,r.b);u=.5*(d+m),h=y,f=r.ab2xy(u,h,!0),p=r.dxyda_rough(u,h),void 0===s.angle&&l.extendFlat(s,o(r,i,a,f,r.dxydb_rough(u,h))),g(e,t,r,0,f,p,r.aaxis,i,a,s,"a-title"),u=d,h=.5*(y+v),f=r.ab2xy(u,h,!0),p=r.dxydb_rough(u,h),void 0===c.angle&&l.extendFlat(c,o(r,i,a,f,r.dxyda_rough(u,h))),g(e,t,r,0,f,p,r.baxis,i,a,c,"b-title")})(e,w,m,0,u,h,T,k),function(e,t,r,n,o){var s,c,u,h,f=r.select("#"+e._clipPathId);f.size()||(f=r.append("clipPath").classed("carpetclip",!0));var p=l.ensureSingle(f,"path","carpetboundary"),d=t.clipsegments,m=[];for(h=0;h90&&v<270,_=r.select(this);_.text(f.title.text).call(s.convertToTspans,e),x&&(b=(-s.lineCount(_)+m)*d*a-b),_.attr("transform",u(t.p[0],t.p[1])+c(t.angle)+u(0,b)).attr("text-anchor","middle").call(n.font,f.title.font)})),_.exit().remove()}}}),jw=m({"src/traces/carpet/cheater_basis.js"(e,t){var r=ct().isArrayOrTypedArray;t.exports=function(e,t,n){var i,a,o,s,l,c=[],u=r(e)?e.length:e,h=r(t)?t.length:t,f=r(e)?e:null,p=r(t)?t:null;f&&(o=(f.length-1)/(f[f.length-1]-f[0])/(u-1)),p&&(s=(p.length-1)/(p[p.length-1]-p[0])/(h-1));var d,m=1/0,g=-1/0;for(a=0;a=10)return null;for(var i=1/0,a=-1/0,o=e.length,s=0;s0&&(p=e.dxydi([],n-1,o,0,s),y.push(l[0]+p[0]/3),v.push(l[1]+p[1]/3),d=e.dxydi([],n-1,o,1,s),y.push(h[0]-d[0]/3),v.push(h[1]-d[1]/3)),y.push(h[0]),v.push(h[1]),l=h;else for(n=e.a2i(r),c=Math.floor(Math.max(0,Math.min(I-2,n))),u=n-c,x.length=I,x.crossLength=L,x.xy=function(t){return e.evalxy([],n,t)},x.dxy=function(t,r){return e.dxydj([],c,t,u,r)},a=0;a0&&(m=e.dxydj([],c,a-1,u,0),y.push(l[0]+m[0]/3),v.push(l[1]+m[1]/3),g=e.dxydj([],c,a-1,u,1),y.push(h[0]-g[0]/3),v.push(h[1]-g[1]/3)),y.push(h[0]),v.push(h[1]),l=h;return x.axisLetter=t,x.axis=_,x.crossAxis=A,x.value=r,x.constvar=i,x.index=f,x.x=y,x.y=v,x.smoothing=A.smoothing,x}function D(r){var n,a,o,s,l,c=[],u=[],h={};if(h.length=x.length,h.crossLength=k.length,"b"===t)for(o=Math.max(0,Math.min(L-2,r)),l=Math.min(1,Math.max(0,r-o)),h.xy=function(t){return e.evalxy([],t,r)},h.dxy=function(t,r){return e.dxydi([],t,o,r,l)},n=0;nx.length-1)&&b.push(n(D(o),{color:_.gridcolor,width:_.gridwidth,dash:_.griddash}));for(f=u;fx.length-1||m<0||m>x.length-1))for(g=x[s],y=x[m],a=0;a<_.minorgridcount;a++)!((v=m-s)<=0)&&!((d=g+(y-g)*(a+1)/(_.minorgridcount+1)*(_.arraydtick/v))x[x.length-1])&&w.push(n(z(d),{color:_.minorgridcolor,width:_.minorgridwidth,dash:_.minorgriddash}));_.startline&&T.push(n(D(0),{color:_.startlinecolor,width:_.startlinewidth})),_.endline&&T.push(n(D(x.length-1),{color:_.endlinecolor,width:_.endlinewidth}))}else{for(l=5e-15,u=(c=[Math.floor((x[x.length-1]-_.tick0)/_.dtick*(1+l)),Math.ceil((x[0]-_.tick0)/_.dtick/(1+l))].sort((function(e,t){return e-t})))[0],h=c[1],f=u;f<=h;f++)p=_.tick0+_.dtick*f,b.push(n(z(p),{color:_.gridcolor,width:_.gridwidth,dash:_.griddash}));for(f=u-1;fx[x.length-1])&&w.push(n(z(d),{color:_.minorgridcolor,width:_.minorgridwidth,dash:_.minorgriddash}));_.startline&&T.push(n(z(x[0]),{color:_.startlinecolor,width:_.startlinewidth})),_.endline&&T.push(n(z(x[x.length-1]),{color:_.endlinecolor,width:_.endlinewidth}))}}}}),Vw=m({"src/traces/carpet/calc_labels.js"(e,t){var r=ar(),n=B().extendFlat;t.exports=function(e,t){var i,a,o,s=t._labels=[],l=t._gridlines;for(i=0;i=0;i--)a[u-i]=e[h][i],o[u-i]=t[h][i];for(s.push({x:a,y:o,bicubic:l}),i=h,a=[],o=[];i>=0;i--)a[h-i]=e[i][0],o[h-i]=t[i][0];return s.push({x:a,y:o,bicubic:c}),s}}}),Hw=m({"src/traces/carpet/smooth_fill_2d_array.js"(e,t){var r=ct();t.exports=function(e,t,n){var i,a,o,s,l,c,u,h,f=[],p=[],d=e[0].length,m=e.length,g=0;for(i=0;i0&&void 0!==(c=e[l][s-1])&&(h++,u+=c),s0&&void 0!==(c=e[l-1][s])&&(h++,u+=c),l0&&a0&&i1e-5);return r.log("Smoother converged to",E,"after",C,"iterations"),e}}}),Gw=m({"src/traces/carpet/constants.js"(e,t){t.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),Ww=m({"src/traces/carpet/catmull_rom.js"(e,t){t.exports=function(e,t,r,n){var i=e[0]-t[0],a=e[1]-t[1],o=r[0]-t[0],s=r[1]-t[1],l=Math.pow(i*i+a*a,.25),c=Math.pow(o*o+s*s,.25),u=(c*c*i-l*l*o)*n,h=(c*c*a-l*l*s)*n,f=c*(l+c)*3,p=l*(l+c)*3;return[[t[0]+(f&&u/f),t[1]+(f&&h/f)],[t[0]-(p&&u/p),t[1]-(p&&h/p)]]}}}),Zw=m({"src/traces/carpet/compute_control_points.js"(e,t){var r=Ww(),n=ct().ensureArray;function i(e,t,r){var n=-.5*r[0]+1.5*t[0],i=-.5*r[1]+1.5*t[1];return[(2*n+e[0])/3,(2*i+e[1])/3]}t.exports=function(e,t,a,o,s,l){var c,u,h,f,p,d,m,g,y,v,x=a[0].length,_=a.length,b=s?3*x-2:x,w=l?3*_-2:_;for(e=n(e,w),t=n(t,w),h=0;hp&&em&&td||tg},e.setScale=function(){var t=e._x,r=e._y,n=i(e._xctrl,e._yctrl,t,r,h.smoothing,f.smoothing);e._xctrl=n[0],e._yctrl=n[1],e.evalxy=a([e._xctrl,e._yctrl],c,u,h.smoothing,f.smoothing),e.dxydi=o([e._xctrl,e._yctrl],h.smoothing,f.smoothing),e.dxydj=s([e._xctrl,e._yctrl],h.smoothing,f.smoothing)},e.i2a=function(e){var r=Math.max(0,Math.floor(e[0]),c-2),n=e[0]-r;return(1-n)*t[r]+n*t[r+1]},e.j2b=function(e){var t=Math.max(0,Math.floor(e[1]),c-2),r=e[1]-t;return(1-r)*l[t]+r*l[t+1]},e.ij2ab=function(t){return[e.i2a(t[0]),e.j2b(t[1])]},e.a2i=function(e){var r=Math.max(0,Math.min(n(e,t),c-2)),i=t[r],a=t[r+1];return Math.max(0,Math.min(c-1,r+(e-i)/(a-i)))},e.b2j=function(e){var t=Math.max(0,Math.min(n(e,l),u-2)),r=l[t],i=l[t+1];return Math.max(0,Math.min(u-1,t+(e-r)/(i-r)))},e.ab2ij=function(t){return[e.a2i(t[0]),e.b2j(t[1])]},e.i2c=function(t,r){return e.evalxy([],t,r)},e.ab2xy=function(r,n,i){if(!i&&(rt[c-1]|nl[u-1]))return[!1,!1];var a=e.a2i(r),o=e.b2j(n),s=e.evalxy([],a,o);if(i){var h,f,p,d,m=0,g=0,y=[];rt[c-1]?(h=c-2,f=1,m=(r-t[c-1])/(t[c-1]-t[c-2])):f=a-(h=Math.max(0,Math.min(c-2,Math.floor(a)))),nl[u-1]?(p=u-2,d=1,g=(n-l[u-1])/(l[u-1]-l[u-2])):d=o-(p=Math.max(0,Math.min(u-2,Math.floor(o)))),m&&(e.dxydi(y,h,p,f,d),s[0]+=y[0]*m,s[1]+=y[1]*m),g&&(e.dxydj(y,h,p,f,d),s[0]+=y[0]*g,s[1]+=y[1]*g)}return s},e.c2p=function(e,t,r){return[t.c2p(e[0]),r.c2p(e[1])]},e.p2x=function(e,t,r){return[t.p2c(e[0]),r.p2c(e[1])]},e.dadi=function(e){var r=Math.max(0,Math.min(t.length-2,e));return t[r+1]-t[r]},e.dbdj=function(e){var t=Math.max(0,Math.min(l.length-2,e));return l[t+1]-l[t]},e.dxyda=function(t,r,n,i){var a=e.dxydi(null,t,r,n,i),o=e.dadi(t,n);return[a[0]/o,a[1]/o]},e.dxydb=function(t,r,n,i){var a=e.dxydj(null,t,r,n,i),o=e.dbdj(r,i);return[a[0]/o,a[1]/o]},e.dxyda_rough=function(t,r,n){var i=y*(n||.1),a=e.ab2xy(t+i,r,!0),o=e.ab2xy(t-i,r,!0);return[.5*(a[0]-o[0])/i,.5*(a[1]-o[1])/i]},e.dxydb_rough=function(t,r,n){var i=v*(n||.1),a=e.ab2xy(t,r+i,!0),o=e.ab2xy(t,r-i,!0);return[.5*(a[0]-o[0])/i,.5*(a[1]-o[1])/i]},e.dpdx=function(e){return e._m},e.dpdy=function(e){return e._m}}}}),Jw=m({"src/traces/carpet/calc.js"(e,t){var r=ar(),n=ct().isArray1D,i=jw(),a=Nw(),o=Uw(),s=Vw(),l=qw(),c=Do(),u=Hw(),h=zo(),f=Kw();t.exports=function(e,t){var p=r.getFromId(e,t.xaxis),d=r.getFromId(e,t.yaxis),m=t.aaxis,g=t.baxis,y=t.x,v=t.y,x=[];y&&n(y)&&x.push("x"),v&&n(v)&&x.push("y"),x.length&&h(t,m,g,"a","b",x);var _=t._a=t._a||t.a,b=t._b=t._b||t.b;y=t._x||t.x,v=t._y||t.y;var w={};if(t._cheater){var T="index"===m.cheatertype?_.length:_,k="index"===g.cheatertype?b.length:b;y=i(T,k,t.cheaterslope)}t._x=y=c(y),t._y=v=c(v),u(y,_,b),u(v,_,b),f(t),t.setScale();var A=a(y),M=a(v),S=.5*(A[1]-A[0]),E=.5*(A[1]+A[0]),C=.5*(M[1]-M[0]),I=.5*(M[1]+M[0]),L=1.3;return A=[E-S*L,E+S*L],M=[I-C*L,I+C*L],t._extremes[p._id]=r.findExtremes(p,A,{padded:!0}),t._extremes[d._id]=r.findExtremes(d,M,{padded:!0}),o(t,"a","b"),o(t,"b","a"),s(t,m),s(t,g),w.clipsegments=l(t._xctrl,t._yctrl,m,g),w.x=y,w.y=v,w.a=_,w.b=b,[w]}}}),Qw=m({"src/traces/carpet/index.js"(e,t){t.exports={attributes:Iw(),supplyDefaults:Dw(),plot:Bw(),calc:Jw(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Ci(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),eT=m({"lib/carpet.js"(e,t){t.exports=Qw()}}),tT=m({"src/traces/scattercarpet/attributes.js"(e,t){var r=Tn(),n=kn(),i=q(),{hovertemplateAttrs:a,texttemplateAttrs:o,templatefallbackAttrs:s}=Fe(),l=zt(),c=B().extendFlat,u=n.marker,h=n.line,f=u.line;t.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:c({},n.mode,{dflt:"markers"}),text:c({},n.text,{}),texttemplate:o({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:s({editType:"plot"}),hovertext:c({},n.hovertext,{}),line:{color:h.color,width:h.width,dash:h.dash,backoff:h.backoff,shape:c({},h.shape,{values:["linear","spline"]}),smoothing:h.smoothing,editType:"calc"},connectgaps:n.connectgaps,fill:c({},n.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:r(),marker:c({symbol:u.symbol,opacity:u.opacity,maxdisplayed:u.maxdisplayed,angle:u.angle,angleref:u.angleref,standoff:u.standoff,size:u.size,sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,line:c({width:f.width,dash:f.dash,editType:"calc"},l("marker.line")),gradient:u.gradient,editType:"calc"},l("marker")),textfont:n.textfont,textposition:n.textposition,selected:n.selected,unselected:n.unselected,hoverinfo:c({},i.hoverinfo,{flags:["a","b","text","name"]}),hoveron:n.hoveron,hovertemplate:a(),hovertemplatefallback:s(),zorder:n.zorder}}}),rT=m({"src/traces/scattercarpet/defaults.js"(e,t){var r=ct(),n=wn(),i=Xt(),a=Yn(),o=Xn(),s=$n(),l=Kn(),c=Jn(),u=tT();t.exports=function(e,t,h,f){function p(n,i){return r.coerce(e,t,u,n,i)}p("carpet"),t.xaxis="x",t.yaxis="y";var d=p("a"),m=p("b"),g=Math.min(d.length,m.length);if(g){t._length=g,p("text"),p("texttemplate"),p("texttemplatefallback"),p("hovertext"),p("mode",g")}return o}function v(e,t){var r;r=e.labelprefix&&e.labelprefix.length>0?e.labelprefix.replace(/ = $/,""):e._hovertitle,g.push(r+": "+t.toFixed(3)+e.labelsuffix)}}}}),lT=m({"src/traces/scattercarpet/event_data.js"(e,t){t.exports=function(e,t,r,n,i){var a=n[i];return e.a=a.a,e.b=a.b,e.y=a.y,e}}}),cT=m({"src/traces/scattercarpet/index.js"(e,t){t.exports={attributes:tT(),supplyDefaults:rT(),colorbar:mi(),formatLabels:nT(),calc:aT(),plot:oT(),style:yi().style,styleOnSelect:yi().styleOnSelect,hoverPoints:sT(),selectPoints:_i(),eventData:lT(),moduleType:"trace",name:"scattercarpet",basePlotModule:Ci(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),uT=m({"lib/scattercarpet.js"(e,t){t.exports=cT()}}),hT=m({"src/traces/contourcarpet/attributes.js"(e,t){var r=wo(),n=cs(),i=zt(),a=B().extendFlat,o=n.contours;t.exports=a({carpet:{valType:"string",editType:"calc"},z:r.z,a:r.x,a0:r.x0,da:r.dx,b:r.y,b0:r.y0,db:r.dy,text:r.text,hovertext:r.hovertext,transpose:r.transpose,atype:r.xtype,btype:r.ytype,fillcolor:n.fillcolor,autocontour:n.autocontour,ncontours:n.ncontours,contours:{type:o.type,start:o.start,end:o.end,size:o.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:o.showlines,showlabels:o.showlabels,labelfont:o.labelfont,labelformat:o.labelformat,operation:o.operation,value:o.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:n.line.color,width:n.line.width,dash:n.line.dash,smoothing:n.line.smoothing,editType:"plot"},zorder:n.zorder},i("",{cLetter:"z",autoColorDflt:!1}))}}),fT=m({"src/traces/contourcarpet/defaults.js"(e,t){var r=ct(),n=To(),i=hT(),a=Ps(),o=hs(),s=ps();t.exports=function(e,t,l,c){function u(n,a){return r.coerce(e,t,i,n,a)}if(u("carpet"),e.a&&e.b){if(!n(e,t,u,c,"a","b"))return void(t.visible=!1);u("text"),"constraint"===u("contours.type")?a(e,t,u,c,l,{hasHover:!1}):(o(e,t,u,(function(n){return r.coerce2(e,t,i,n)})),s(e,t,u,c,{hasHover:!1}))}else t._defaultColor=l,t._length=null;u("zorder")}}}),pT=m({"src/traces/contourcarpet/calc.js"(e,t){var r=Zt(),n=ct(),i=zo(),a=Do(),o=Oo(),s=Ro(),l=Fo(),c=fT(),u=iT(),h=ms();t.exports=function(e,t){var f=t._carpetTrace=u(e,t);if(f&&f.visible&&"legendonly"!==f.visible){if(!t.a||!t.b){var p=e.data[f.index],d=e.data[t.index];d.a||(d.a=p.a),d.b||(d.b=p.b),c(d,t,t._defaultColor,e._fullLayout)}var m=function(e,t){var c,u,h,f,p,d,m,g=t._carpetTrace,y=g.aaxis,v=g.baxis;y._minDtick=0,v._minDtick=0,n.isArray1D(t.z)&&i(t,y,v,"a","b",["z"]),c=t._a=t._a||t.a,f=t._b=t._b||t.b,c=c?y.makeCalcdata(t,"_a"):[],f=f?v.makeCalcdata(t,"_b"):[],u=t.a0||0,h=t.da||1,p=t.b0||0,d=t.db||1,m=t._z=a(t._z||t.z,t.transpose),t._emptypoints=s(m),o(m,t._emptypoints);var x=n.maxRowLength(m),_="scaled"===t.xtype?"":c,b=l(t,_,u,h,x,y),w="scaled"===t.ytype?"":f,T={a:b,b:l(t,w,p,d,m.length,v),z:m};return"levels"===t.contours.type&&"none"!==t.contours.coloring&&r(e,t,{vals:m,containerStr:"",cLetter:"z"}),[T]}(e,t);return h(t,t._z),m}}}}),dT=m({"src/traces/carpet/axis_aligned_line.js"(e,t){var r=ct().isArrayOrTypedArray;t.exports=function(e,t,n,i){var a,o,s,l,c,u,h,f,p,d,m,g,y,v=r(n)?"a":"b",x=("a"===v?e.aaxis:e.baxis).smoothing,_="a"===v?e.a2i:e.b2j,b="a"===v?n:i,w="a"===v?i:n,T="a"===v?t.a.length:t.b.length,k="a"===v?t.b.length:t.a.length,A=Math.floor("a"===v?e.b2j(w):e.a2i(w)),M="a"===v?function(t){return e.evalxy([],t,A)}:function(t){return e.evalxy([],A,t)};x&&(s=Math.max(0,Math.min(k-2,A)),l=A-s,o="a"===v?function(t,r){return e.dxydi([],t,s,r,l)}:function(t,r){return e.dxydj([],s,t,l,r)});var S=_(b[0]),E=_(b[1]),C=S0?Math.floor:Math.ceil,P=C>0?Math.ceil:Math.floor,z=C>0?Math.min:Math.max,D=C>0?Math.max:Math.min,O=L(S+I),R=P(E-I),F=[[h=M(S)]];for(a=O;a*C=0;U--)B=M.clipsegments[U],j=n([],B.x,b.c2p),N=n([],B.y,w.c2p),j.reverse(),N.reverse(),V.push(i(j,N,B.bicubic));var q="M"+V.join("L")+"Z";(function(e,t,r,a,s,l){var c,u,h,f,p=o.ensureSingle(e,"g","contourbg").selectAll("path").data("fill"!==l||s?[]:[0]);p.enter().append("path"),p.exit().remove();var d=[];for(f=0;f=0&&(f=C,d=g):Math.abs(h[1]-f[1])=0&&(f=C,d=g):o.log("endpt to newendpt is not vert. or horz.",h,f,C)}if(d>=0)break;v+=S(h,f),h=f}if(d===t.edgepaths.length){o.log("unclosed perimeter path");break}u=d,(_=-1===x.indexOf(u))&&(u=x[0],v+=S(h,f)+"Z",h=null)}for(u=0;um&&(n.max=m),n.len=n.max-n.min}function x(e,t){var r,n=0,o=.1;return(Math.abs(e[0]-l)y):g=A>w,y=A;var M=c(w,T,k,A);M.pos=b,M.yc=(w+A)/2,M.i=_,M.dir=g?"increasing":"decreasing",M.x=M.pos,M.y=[k,T],v&&(M.orig_p=a[_]),d&&(M.tx=t.text[_]),m&&(M.htx=t.hovertext[_]),x.push(M)}else x.push({pos:b,empty:!0})}return t._extremes[l._id]=i.findExtremes(l,r.concat(f,h),{padded:!0}),x.length&&(x[0].t={labels:{open:n(e,"open:")+" ",high:n(e,"high:")+" ",low:n(e,"low:")+" ",close:n(e,"close:")+" "}}),x}t.exports={calc:function(e,t){var n=i.getFromId(e,t.xaxis),o=i.getFromId(e,t.yaxis),c=function(e,t,n){var i=n._minDiff;if(!i){var o,s=e._fullData,l=[];for(i=1/0,o=0;o"+u.labels[v]+r.hoverLabelText(s,x,l.yhoverformat):((y=n.extendFlat({},f)).y0=y.y1=_,y.yLabelVal=x,y.yLabel=u.labels[v]+r.hoverLabelText(s,x,l.yhoverformat),y.name="",h.push(y),m[x]=y)}return h}function h(e,t,n,i){var a=e.cd,s=e.ya,u=a[0].trace,h=a[0].t,f=c(e,t,n,i);if(!f)return[];var p=a[f.index],d=f.index=p.i,m=p.dir;function g(e){return h.labels[e]+r.hoverLabelText(s,u[e][d],u.yhoverformat)}var y=p.hi||u.hoverinfo||"",v=y.split("+"),x="all"===y,_=x||-1!==v.indexOf("y"),b=x||-1!==v.indexOf("text"),w=_?[g("open"),g("high"),g("low"),g("close")+" "+l[m]]:[];return b&&o(p,u,w),f.extraText=w.join("
"),f.y0=f.y1=s.c2p(p.yc,!0),[f]}t.exports={hoverPoints:function(e,t,r,n){return e.cd[0].trace.hoverlabel.split?u(e,t,r,n):h(e,t,r,n)},hoverSplit:u,hoverOnPoints:h}}}),AT=m({"src/traces/ohlc/select.js"(e,t){t.exports=function(e,t){var r,n=e.cd,i=e.xaxis,a=e.yaxis,o=[],s=n[0].t.bPos||0;if(!1===t)for(r=0;rn?function(e){return e<=0}:function(e){return e>=0};e.c2g=function(r){var n=e.c2l(r)-t;return(s(n)?n:0)+o},e.g2c=function(r){return e.l2c(r+t-o)},e.g2p=function(e){return e*a},e.c2p=function(t){return e.g2p(e.c2g(t))}}}(e,t);break;case"angularaxis":!function(e,t){var n=e.type;if("linear"===n){var o=e.d2c,s=e.c2d;e.d2c=function(e,t){return function(e,t){return"degrees"===t?i(e):e}(o(e),t)},e.c2d=function(e,t){return s(function(e,t){return"degrees"===t?a(e):e}(e,t))}}e.makeCalcdata=function(t,r){var n,i,a=t[r],o=t._length,s=function(r){return e.d2c(r,t.thetaunit)};if(a)for(n=new Array(o),i=0;i1e-10?e:0}function h(e,t,r){t=t||0,r=r||0;for(var n=e.length,i=new Array(n),a=0;a0?r:1/0})),a=r.mod(n+1,t.length);return[t[n],t[a]]},findIntersectionXY:l,findXYatLength:function(e,t,r,n){var i=-t*r,a=t*t+1,o=2*(t*i-r),s=i*i+r*r-e*e,l=Math.sqrt(o*o-4*a*s),c=(-o+l)/(2*a),u=(-o-l)/(2*a);return[[c,t*c+i+n],[u,t*u+i+n]]},clampTiny:u,pathPolygon:function(e,t,r,n,i,a){return"M"+h(c(e,t,r,n),i,a).join("L")},pathPolygonAnnulus:function(e,t,r,n,i,a,o){var s,l;e0?1:0}function n(e){var t=e[0],r=e[1];if(!isFinite(t)||!isFinite(r))return[1,0];var n=(t+1)*(t+1)+r*r;return[(t*t+r*r-1)/n,2*r/n]}function i(e,t){var r=t[0],n=t[1];return[r*e.radius+e.cx,-n*e.radius+e.cy]}function a(e,t){return t*e.radius}t.exports={smith:n,reactanceArc:function(e,t,r,o){var s=i(e,n([r,t])),l=s[0],c=s[1],u=i(e,n([o,t])),h=u[0],f=u[1];if(0===t)return["M"+l+","+c,"L"+h+","+f].join(" ");var p=a(e,1/Math.abs(t));return["M"+l+","+c,"A"+p+","+p+" 0 0,"+(t<0?1:0)+" "+h+","+f].join(" ")},resistanceArc:function(e,t,o,s){var l=a(e,1/(t+1)),c=i(e,n([t,o])),u=c[0],h=c[1],f=i(e,n([t,s])),p=f[0],d=f[1];if(r(o)!==r(s)){var m=i(e,n([t,0]));return["M"+u+","+h,"A"+l+","+l+" 0 0,"+(0=90||i>90&&a>=450?1:s<=0&&c<=0?0:Math.max(s,c),[i<=180&&a>=180||i>180&&a>=540?-1:o>=0&&l>=0?0:Math.min(o,l),i<=270&&a>=270||i>270&&a>=630?-1:s>=0&&c>=0?0:Math.min(s,c),a>=360?1:o<=0&&l<=0?0:Math.max(o,l),t]}(d),b=_[2]-_[0],w=_[3]-_[1],T=p/f,k=Math.abs(w/b);T>k?(m=f,x=(p-(g=f*k))/i.h/2,y=[u[0],u[1]],v=[h[0]+x,h[1]-x]):(g=p,x=(f-(m=p/k))/i.w/2,y=[u[0]+x,u[1]-x],v=[h[0],h[1]]),r.xLength2=m,r.yLength2=g,r.xDomain2=y,r.yDomain2=v;var A,M=r.xOffset2=i.l+i.w*y[0],S=r.yOffset2=i.t+i.h*(1-v[1]),E=r.radius=m/b,C=r.innerRadius=r.getHole(t)*E,I=r.cx=M-E*_[0],L=r.cy=S+E*_[3],P=r.cxx=I-M,z=r.cyy=L-S,D=a.side;"counterclockwise"===D?(A=D,D="top"):"clockwise"===D&&(A=D,D="bottom"),r.radialAxis=r.mockAxis(e,t,a,{_id:"x",side:D,_trueSide:A,domain:[C/i.w,E/i.w]}),r.angularAxis=r.mockAxis(e,t,o,{side:"right",domain:[0,Math.PI],autorange:!1}),r.doAutoRange(e,t),r.updateAngularAxis(e,t),r.updateRadialAxis(e,t),r.updateRadialAxisTitle(e,t),r.xaxis=r.mockCartesianAxis(e,t,{_id:"x",domain:y}),r.yaxis=r.mockCartesianAxis(e,t,{_id:"y",domain:v});var F=r.pathSubplot();r.clipPaths.forTraces.select("path").attr("d",F).attr("transform",s(P,z)),n.frontplot.attr("transform",s(M,S)).call(c.setClipUrl,r._hasClipOnAxisFalse?null:r.clipIds.forTraces,r.gd),n.bg.attr("d",F).attr("transform",s(I,L)).call(l.fill,t.bgcolor)},N.mockAxis=function(e,t,r,n){var i=a.extendFlat({},r,n);return p(i,t,e),i},N.mockCartesianAxis=function(e,t,r){var n=this,i=n.isSmith,o=r._id,s=a.extendFlat({type:"linear"},r);f(s,e);var l={x:[0,2],y:[1,3]};return s.setRange=function(){var e=n.sectorBBox,r=l[o],i=n.radialAxis._rl,a=(i[1]-i[0])/(1-n.getHole(t));s.range=[e[r[0]]*a,e[r[1]]*a]},s.isPtWithinRange="x"!==o||i?function(){return!0}:function(e){return n.isPtInside(e)},s.setRange(),s.setScale(),s},N.doAutoRange=function(e,t){var r=this,n=r.gd,i=r.radialAxis,a=r.getRadial(t);d(n,i);var o=i.range;if(a.range=o.slice(),a._input.range=o.slice(),i._rl=[i.r2l(o[0],null,"gregorian"),i.r2l(o[1],null,"gregorian")],void 0!==i.minallowed){var s=i.r2l(i.minallowed);i._rl[0]>i._rl[1]?i._rl[1]=Math.max(i._rl[1],s):i._rl[0]=Math.max(i._rl[0],s)}if(void 0!==i.maxallowed){var l=i.r2l(i.maxallowed);i._rl[0]90&&m<=270&&(g.tickangle=180);var x=v?function(e){var t=z(r,I([e.x,0]));return s(t[0]-f,t[1]-p)}:function(e){return s(g.l2p(e.x)+u,0)},_=v?function(e){return P(r,e.x,-1/0,1/0)}:function(e){return r.pathArc(g.r2p(e.x)+u)},b=U(d);if(r.radialTickLayout!==b&&(i["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=b),y){g.setScale();var w=0,T=v?(g.tickvals||[]).filter((function(e){return e>=0})).map((function(e){return h.tickText(g,e,!0,!1)})):h.calcTicks(g),k=v?T:h.clipEnds(g,T),A=h.getTickSigns(g)[2];v&&(("top"===g.ticks&&"bottom"===g.side||"bottom"===g.ticks&&"top"===g.side)&&(A=-A),"top"===g.ticks&&"top"===g.side&&(w=-g.ticklen),"bottom"===g.ticks&&"bottom"===g.side&&(w=g.ticklen)),h.drawTicks(n,g,{vals:T,layer:i["radial-axis"],path:h.makeTickPath(g,0,A),transFn:x,crisp:!1}),h.drawGrid(n,g,{vals:k,layer:i["radial-grid"],path:_,transFn:a.noop,crisp:!1}),h.drawLabels(n,g,{vals:T,layer:i["radial-axis"],transFn:x,labelFns:h.makeLabelFns(g,w)})}var M=r.radialAxisAngle=r.vangles?B(V(R(d.angle),r.vangles)):d.angle,S=s(f,p),E=S+o(-M);q(i["radial-axis"],y&&(d.showticklabels||d.ticks),{transform:E}),q(i["radial-grid"],y&&d.showgrid,{transform:v?"":S}),q(i["radial-line"].select("line"),y&&d.showline,{x1:v?-c:u,y1:0,x2:c,y2:0,transform:E}).attr("stroke-width",d.linewidth).call(l.stroke,d.linecolor)},N.updateRadialAxisTitle=function(e,t,r){if(!this.isSmith){var n=this,i=n.gd,a=n.radius,o=n.cx,s=n.cy,l=n.getRadial(t),u=n.id+"title",h=0;if(l.title){var f=c.bBox(n.layers["radial-axis"].node()).height,p=l.title.font.size,d=l.side;h="top"===d?p:"counterclockwise"===d?-(f+.4*p):f+.8*p}var m=void 0!==r?r:n.radialAxisAngle,g=R(m),y=Math.cos(g),x=Math.sin(g),_=o+a/2*y+h*x,b=s-a/2*x+h*y;n.layers["radial-axis-title"]=v.draw(i,u,{propContainer:l,propName:n.id+".radialaxis.title.text",placeholder:D(i,"Click to enter radial axis title"),attributes:{x:_,y:b,"text-anchor":"middle"},transform:{rotate:-m}})}},N.updateAngularAxis=function(e,t){var r=this,n=r.gd,i=r.layers,c=r.radius,u=r.innerRadius,f=r.cx,p=r.cy,d=r.getAngular(t),m=r.angularAxis,g=r.isSmith;g||(r.fillViewInitialKey("angularaxis.rotation",d.rotation),m.setGeometry(),m.setScale());var y=g?function(e){var t=z(r,I([0,e.x]));return Math.atan2(t[0]-f,t[1]-p)-Math.PI/2}:function(e){return m.t2g(e.x)};"linear"===m.type&&"radians"===m.thetaunit&&(m.tick0=B(m.tick0),m.dtick=B(m.dtick));var v=function(e){return s(f+c*Math.cos(e),p-c*Math.sin(e))},x=g?function(e){var t=z(r,I([0,e.x]));return s(t[0],t[1])}:function(e){return v(y(e))},_=g?function(e){var t=z(r,I([0,e.x])),n=Math.atan2(t[0]-f,t[1]-p)-Math.PI/2;return s(t[0],t[1])+o(-B(n))}:function(e){var t=y(e);return v(t)+o(-B(t))},b=g?function(e){return L(r,e.x,0,1/0)}:function(e){var t=y(e),r=Math.cos(t),n=Math.sin(t);return"M"+[f+u*r,p-u*n]+"L"+[f+c*r,p-c*n]},w=h.makeLabelFns(m,0).labelStandoff,T={xFn:function(e){var t=y(e);return Math.cos(t)*w},yFn:function(e){var t=y(e),r=Math.sin(t)>0?.2:1;return-Math.sin(t)*(w+e.fontSize*r)+Math.abs(Math.cos(t))*(e.fontSize*M)},anchorFn:function(e){var t=y(e),r=Math.cos(t);return Math.abs(r)<.1?"middle":r>0?"start":"end"},heightFn:function(e,t,r){var n=y(e);return-.5*(1+Math.sin(n))*r}},k=U(d);r.angularTickLayout!==k&&(i["angular-axis"].selectAll("."+m._id+"tick").remove(),r.angularTickLayout=k);var A,S=g?[1/0].concat(m.tickvals||[]).map((function(e){return h.tickText(m,e,!0,!1)})):h.calcTicks(m);if(g&&(S[0].text="∞",S[0].fontSize*=1.75),"linear"===t.gridshape?(A=S.map(y),a.angleDelta(A[0],A[1])<0&&(A=A.slice().reverse())):A=null,r.vangles=A,"category"===m.type&&(S=S.filter((function(e){return a.isAngleInsideSector(y(e),r.sectorInRad)}))),m.visible){var E="inside"===m.ticks?-1:1,C=(m.linewidth||1)/2;h.drawTicks(n,m,{vals:S,layer:i["angular-axis"],path:"M"+E*C+",0h"+E*m.ticklen,transFn:_,crisp:!1}),h.drawGrid(n,m,{vals:S,layer:i["angular-grid"],path:b,transFn:a.noop,crisp:!1}),h.drawLabels(n,m,{vals:S,layer:i["angular-axis"],repositionOnUpdate:!0,transFn:x,labelFns:T})}q(i["angular-line"].select("path"),d.showline,{d:r.pathSubplot(),transform:s(f,p)}).attr("stroke-width",d.linewidth).call(l.stroke,d.linecolor)},N.updateFx=function(e,t){this.gd._context.staticPlot||(!this.isSmith&&(this.updateAngularDrag(e),this.updateRadialDrag(e,t,0),this.updateRadialDrag(e,t,1)),this.updateHoverAndMainDrag(e))},N.updateHoverAndMainDrag=function(e){var t,o,l=this,c=l.isSmith,u=l.gd,h=l.layers,f=e._zoomlayer,p=S.MINZOOM,d=S.OFFEDGE,v=l.radius,b=l.innerRadius,T=l.cx,k=l.cy,A=l.cxx,M=l.cyy,C=l.sectorInRad,I=l.vangles,L=l.radialAxis,P=E.clampTiny,z=E.findXYatLength,D=E.findEnclosingVertexAngles,O=S.cornerHalfWidth,R=S.cornerLen/2,F=m.makeDragger(h,"path","maindrag",!1===e.dragmode?"none":"crosshair");r.select(F).attr("d",l.pathSubplot()).attr("transform",s(T,k)),F.onmousemove=function(e){y.hover(u,e,l.id),u._fullLayout._lasthover=F,u._fullLayout._hoversubplot=l.id},F.onmouseout=function(e){u._dragging||g.unhover(u,e)};var B,j,N,U,V,q,H,G,W,Z={element:F,gd:u,subplot:l.id,plotinfo:{id:l.id,xaxis:l.xaxis,yaxis:l.yaxis},xaxes:[l.xaxis],yaxes:[l.yaxis]};function Y(e,t){return Math.sqrt(e*e+t*t)}function X(e,t){return Y(e-A,t-M)}function $(e,t){return Math.atan2(M-t,e-A)}function K(e,t){return[e*Math.cos(t),e*Math.sin(-t)]}function J(e,t){if(0===e)return l.pathSector(2*O);var r=R/e,n=t-r,i=t+r,a=Math.max(0,Math.min(e,v)),o=a-O,s=a+O;return"M"+K(o,n)+"A"+[o,o]+" 0,0,0 "+K(o,i)+"L"+K(s,i)+"A"+[s,s]+" 0,0,1 "+K(s,n)+"Z"}function Q(e,t,r){if(0===e)return l.pathSector(2*O);var n,i,a=K(e,t),o=K(e,r),s=P((a[0]+o[0])/2),c=P((a[1]+o[1])/2);if(s&&c){var u=c/s,h=-1/u,f=z(O,u,s,c);n=z(R,h,f[0][0],f[0][1]),i=z(R,h,f[1][0],f[1][1])}else{var p,d;c?(p=R,d=O):(p=O,d=R),n=[[s-p,c-d],[s+p,c-d]],i=[[s-p,c+d],[s+p,c+d]]}return"M"+n.join("L")+"L"+i.reverse().join("L")+"Z"}function ee(e,t){return t=Math.max(Math.min(t,v),b),ep?(e-1&&1===e&&_(t,u,[l.xaxis],[l.yaxis],l.id,Z),r.indexOf("event")>-1&&y.click(u,t,l.id)}Z.prepFn=function(e,r,i){var s=u._fullLayout.dragmode,h=F.getBoundingClientRect();u._fullLayout._calcInverseTransform(u);var p=u._fullLayout._invTransform;t=u._fullLayout._invScaleX,o=u._fullLayout._invScaleY;var d=a.apply3DTransform(p)(r-h.left,i-h.top);if(B=d[0],j=d[1],I){var g=E.findPolygonOffset(v,C[0],C[1],I);B+=A+g[0],j+=M+g[1]}switch(s){case"zoom":Z.clickFn=se,c||(Z.moveFn=I?ie:re,Z.doneFn=ae,function(){N=null,U=null,V=l.pathSubplot(),q=!1;var e=u._fullLayout[l.id];H=n(e.bgcolor).getLuminance(),(G=m.makeZoombox(f,H,T,k,V)).attr("fill-rule","evenodd"),W=m.makeCorners(f,T,k),w(u)}());break;case"select":case"lasso":x(e,r,i,Z,s)}},g.init(Z)},N.updateRadialDrag=function(e,t,n){var l=this,c=l.gd,u=l.layers,h=l.radius,f=l.innerRadius,p=l.cx,d=l.cy,y=l.radialAxis,v=S.radialDragBoxSize,x=v/2;if(y.visible){var _,b,T,M=R(l.radialAxisAngle),E=y._rl,C=E[0],I=E[1],L=E[n],P=.75*(E[1]-E[0])/(1-l.getHole(t))/h;n?(_=p+(h+x)*Math.cos(M),b=d-(h+x)*Math.sin(M),T="radialdrag"):(_=p+(f-x)*Math.cos(M),b=d-(f-x)*Math.sin(M),T="radialdrag-inner");var z,D,O,F=m.makeRectDragger(u,T,"crosshair",-x,-x,v,v),j={element:F,gd:c};!1===e.dragmode&&(j.dragmode=!1),q(r.select(F),y.visible&&f0==(n?O>C:O")}}t.exports={hoverPoints:function(e,t,i,a){var o=r(e,t,i,a);if(o&&!1!==o[0].index){var s=o[0];if(void 0===s.index)return o;var l=e.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,n(c,u,l,s),s.hovertemplate=u.hovertemplate,o}},makeHoverPointText:n}}}),ZT=m({"src/traces/scatterpolar/index.js"(e,t){t.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:NT(),categories:["polar","symbols","showLegend","scatter-like"],attributes:UT(),supplyDefaults:VT().supplyDefaults,colorbar:mi(),formatLabels:qT(),calc:HT(),plot:GT(),style:yi().style,styleOnSelect:yi().styleOnSelect,hoverPoints:WT().hoverPoints,selectPoints:_i(),meta:{}}}}),YT=m({"lib/scatterpolar.js"(e,t){t.exports=ZT()}}),XT=m({"src/traces/scatterpolargl/attributes.js"(e,t){var r=UT(),{cliponaxis:n,hoveron:i}=r,a=((e,t)=>{var r={};for(var n in e)l.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&o)for(var n of o(e))t.indexOf(n)<0&&u.call(e,n)&&(r[n]=e[n]);return r})(r,["cliponaxis","hoveron"]),{connectgaps:s,line:{color:c,dash:h,width:d},fill:m,fillcolor:g,marker:y,textfont:v,textposition:x}=Xg();t.exports=p(f({},a),{connectgaps:s,fill:m,fillcolor:g,line:{color:c,dash:h,editType:"calc",width:d},marker:y,textfont:v,textposition:x})}}),$T=m({"src/traces/scatterpolargl/defaults.js"(e,t){var r=ct(),n=Xt(),i=VT().handleRThetaDefaults,a=Yn(),o=Xn(),s=Kn(),l=Jn(),c=wn().PTS_LINESONLY,u=XT();t.exports=function(e,t,h,f){function p(n,i){return r.coerce(e,t,u,n,i)}var d=i(e,t,f,p);d?(p("thetaunit"),p("mode",d=l&&(v.marker.cluster=d.tree),v.marker&&(v.markerSel.positions=v.markerUnsel.positions=v.marker.positions=b),v.line&&b.length>1&&s.extendFlat(v.line,o.linePositions(e,p,b)),v.text&&(s.extendFlat(v.text,{positions:b},o.textPosition(e,p,v.text,v.marker)),s.extendFlat(v.textSel,{positions:b},o.textPosition(e,p,v.text,v.markerSel)),s.extendFlat(v.textUnsel,{positions:b},o.textPosition(e,p,v.text,v.markerUnsel))),v.fill&&!f.fill2d&&(f.fill2d=!0),v.marker&&!f.scatter2d&&(f.scatter2d=!0),v.line&&!f.line2d&&(f.line2d=!0),v.text&&!f.glText&&(f.glText=!0),f.lineOptions.push(v.line),f.fillOptions.push(v.fill),f.markerOptions.push(v.marker),f.markerSelectedOptions.push(v.markerSel),f.markerUnselectedOptions.push(v.markerUnsel),f.textOptions.push(v.text),f.textSelectedOptions.push(v.textSel),f.textUnselectedOptions.push(v.textUnsel),f.selectBatch.push([]),f.unselectBatch.push([]),d.x=w,d.y=T,d.rawx=w,d.rawy=T,d.r=g,d.theta=y,d.positions=b,d._scene=f,d.index=f.count,f.count++}})),i(e,t,c)}},t.exports.reglPrecompiled={}}}),rk=m({"src/traces/scatterpolargl/index.js"(e,t){var r=ek();r.plot=tk(),t.exports=r}}),nk=m({"lib/scatterpolargl.js"(e,t){t.exports=rk()}}),ik=m({"src/traces/barpolar/attributes.js"(e,t){var r,{hovertemplateAttrs:n,templatefallbackAttrs:i}=Fe(),a=B().extendFlat,o=UT(),s=Wa();t.exports={r:o.r,theta:o.theta,r0:o.r0,dr:o.dr,theta0:o.theta0,dtheta:o.dtheta,thetaunit:o.thetaunit,base:a({},s.base,{}),offset:a({},s.offset,{}),width:a({},s.width,{}),text:a({},s.text,{}),hovertext:a({},s.hovertext,{}),marker:(r=a({},s.marker),delete r.cornerradius,r),hoverinfo:o.hoverinfo,hovertemplate:n(),hovertemplatefallback:i(),selected:s.selected,unselected:s.unselected}}}),ak=m({"src/traces/barpolar/layout_attributes.js"(e,t){t.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}}),ok=m({"src/traces/barpolar/defaults.js"(e,t){var r=ct(),n=VT().handleRThetaDefaults,i=Ya(),a=ik();t.exports=function(e,t,o,s){function l(n,i){return r.coerce(e,t,a,n,i)}n(e,t,s,l)?(l("thetaunit"),l("base"),l("offset"),l("width"),l("text"),l("hovertext"),l("hovertemplate"),l("hovertemplatefallback"),i(e,t,l,o,s),r.coerceSelectionMarkerOpacity(t,l)):t.visible=!1}}}),sk=m({"src/traces/barpolar/layout_defaults.js"(e,t){var r=ct(),n=ak();t.exports=function(e,t,i){var a,o={};function s(i,o){return r.coerce(e[a]||{},t[a],n,i,o)}for(var l=0;l0?(c=s,u=l):(c=l,u=s);var h=[o.findEnclosingVertexAngles(c,e.vangles)[0],(c+u)/2,o.findEnclosingVertexAngles(u,e.vangles)[1]];return o.pathPolygonAnnulus(n,a,c,u,h,t,r)}:function(e,n,a,o){return i.pathAnnulus(e,n,a,o,t,r)}}(t),d=t.layers.frontplot.select("g.barlayer");i.makeTraceGroups(d,s,"trace bars").each((function(){var o=r.select(this),s=i.ensureSingle(o,"g","points").selectAll("g.point").data(i.identity);s.enter().append("g").style("vector-effect",l?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),s.exit().remove(),s.each((function(e){var t,a=r.select(this),o=e.rp0=h.c2p(e.s0),s=e.rp1=h.c2p(e.s1),l=e.thetag0=f.c2g(e.p0),d=e.thetag1=f.c2g(e.p1);if(n(o)&&n(s)&&n(l)&&n(d)&&o!==s&&l!==d){var m=h.c2g(e.s1),g=(l+d)/2;e.ct=[c.c2p(m*Math.cos(g)),u.c2p(m*Math.sin(g))],t=p(o,s,l,d)}else t="M0,0Z";i.ensureSingle(a,"path").attr("d",t)})),a.setClipUrl(o,t._hasClipOnAxisFalse?t.clipIds.forTraces:null,e)}))}}}),uk=m({"src/traces/barpolar/hover.js"(e,t){var r=Or(),n=ct(),i=no().getTraceColor,a=n.fillText,o=WT().makeHoverPointText,s=OT().isPtInsidePolygon;t.exports=function(e,t,l){var c=e.cd,u=c[0].trace,h=e.subplot,f=h.radialAxis,p=h.angularAxis,d=h.vangles,m=d?s:n.isPtInsideSector,g=e.maxHoverDistance,y=p._period||2*Math.PI,v=Math.abs(f.g2p(Math.sqrt(t*t+l*l))),x=Math.atan2(l,t);if(f.range[0]>f.range[1]&&(x+=Math.PI),r.getClosest(c,(function(e){return m(v,x,[e.rp0,e.rp1],[e.thetag0,e.thetag1],d)?g+Math.min(1,Math.abs(e.thetag1-e.thetag0)/y)-1+(e.rp1-v)/(e.rp1-e.rp0)-1:1/0}),e),!1!==e.index){var _=c[e.index];e.x0=e.x1=_.ct[0],e.y0=e.y1=_.ct[1];var b=n.extendFlat({},_,{r:_.s,theta:_.p});return a(_,u,e),o(b,u,h,e),e.hovertemplate=u.hovertemplate,e.color=i(u,_),e.xLabelVal=e.yLabelVal=void 0,_.s<0&&(e.idealAlign="left"),[e]}}}}),hk=m({"src/traces/barpolar/index.js"(e,t){t.exports={moduleType:"trace",name:"barpolar",basePlotModule:NT(),categories:["polar","bar","showLegend"],attributes:ik(),layoutAttributes:ak(),supplyDefaults:ok(),supplyLayoutDefaults:sk(),calc:lk().calc,crossTraceCalc:lk().crossTraceCalc,plot:ck(),colorbar:mi(),formatLabels:qT(),style:to().style,styleOnSelect:to().styleOnSelect,hoverPoints:uk(),selectPoints:ao(),meta:{}}}}),fk=m({"lib/barpolar.js"(e,t){t.exports=hk()}}),pk=m({"src/plots/smith/constants.js"(e,t){t.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),dk=m({"src/plots/smith/layout_attributes.js"(e,t){var r=G(),n=Lt(),i=Ma().attributes,a=ct().extendFlat,o=De().overrideAll,s=o({color:n.color,showline:a({},n.showline,{dflt:!0}),linecolor:n.linecolor,linewidth:n.linewidth,showgrid:a({},n.showgrid,{dflt:!0}),gridcolor:n.gridcolor,gridwidth:n.gridwidth,griddash:n.griddash},"plot","from-root"),l=o({ticklen:n.ticklen,tickwidth:a({},n.tickwidth,{dflt:2}),tickcolor:n.tickcolor,showticklabels:n.showticklabels,labelalias:n.labelalias,showtickprefix:n.showtickprefix,tickprefix:n.tickprefix,showticksuffix:n.showticksuffix,ticksuffix:n.ticksuffix,tickfont:n.tickfont,tickformat:n.tickformat,hoverformat:n.hoverformat,layer:n.layer},"plot","from-root"),c=a({visible:a({},n.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:a({},n.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},s,l),u=a({visible:a({},n.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:n.ticks,editType:"calc"},s,l);t.exports={domain:i({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:r.background},realaxis:c,imaginaryaxis:u,editType:"calc"}}}),mk=m({"src/plots/smith/layout_defaults.js"(e,t){var r,n,i,a=ct(),o=W(),s=vt(),l=Gs(),c=Tt().getSubplotData,u=Vt(),h=Ut(),f=ki(),p=rr(),d=dk(),m=pk(),g=m.axisNames,y=(r=function(e){return a.isTypedArray(e)&&(e=Array.from(e)),e.slice().reverse().map((function(e){return-e})).concat([0]).concat(e)},n=String,i={},function(e){var t=n?n(e):e;if(t in i)return i[t];var a=r(e);return i[t]=a,a});function v(e,t,r,n){var i=r("bgcolor");n.bgColor=o.combine(i,n.paper_bgcolor);var l,v=c(n.fullData,m.name,n.id),x=n.layoutOut;function _(e,t){return r(l+"."+e,t)}for(var b=0;b")}}t.exports={hoverPoints:function(e,t,i,a){var o=r(e,t,i,a);if(o&&!1!==o[0].index){var s=o[0];if(void 0===s.index)return o;var l=e.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,n(c,u,l,s),s.hovertemplate=u.hovertemplate,o}},makeHoverPointText:n}}}),Tk=m({"src/traces/scattersmith/index.js"(e,t){t.exports={moduleType:"trace",name:"scattersmith",basePlotModule:gk(),categories:["smith","symbols","showLegend","scatter-like"],attributes:yk(),supplyDefaults:vk(),colorbar:mi(),formatLabels:xk(),calc:_k(),plot:bk(),style:yi().style,styleOnSelect:yi().styleOnSelect,hoverPoints:wk().hoverPoints,selectPoints:_i(),meta:{}}}}),kk=m({"lib/scattersmith.js"(e,t){t.exports=Tk()}}),Ak=m({"node_modules/world-calendars/dist/main.js"(e,t){var r=Ay();function n(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}function i(e,t,r,n){if(this._calendar=e,this._year=t,this._month=r,this._day=n,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(l.local.invalidDate||l.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function a(e,t){return"000000".substring(0,t-(e=""+e).length)+e}function o(){this.shortYearCutoff="+10"}function s(e){this.local=this.regionalOptions[e]||this.regionalOptions[""]}r(n.prototype,{instance:function(e,t){e=(e||"gregorian").toLowerCase(),t=t||"";var r=this._localCals[e+"-"+t];if(!r&&this.calendars[e]&&(r=new this.calendars[e](t),this._localCals[e+"-"+t]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return r},newDate:function(e,t,r,n,i){return(n=(null!=e&&e.year?e.calendar():"string"==typeof n?this.instance(n,i):n)||this.instance()).newDate(e,t,r)},substituteDigits:function(e){return function(t){return(t+"").replace(/[0-9]/g,(function(t){return e[t]}))}},substituteChineseDigits:function(e,t){return function(r){for(var n="",i=0;r>0;){var a=r%10;n=(0===a?"":e[a]+t[i])+n,i++,r=Math.floor(r/10)}return 0===n.indexOf(e[1]+t[1])&&(n=n.substr(1)),n||e[0]}}}),r(i.prototype,{newDate:function(e,t,r){return this._calendar.newDate(e??this,t,r)},year:function(e){return 0===arguments.length?this._year:this.set(e,"y")},month:function(e){return 0===arguments.length?this._month:this.set(e,"m")},day:function(e){return 0===arguments.length?this._day:this.set(e,"d")},date:function(e,t,r){if(!this._calendar.isValid(e,t,r))throw(l.local.invalidDate||l.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=t,this._day=r,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(e,t){return this._calendar.add(this,e,t)},set:function(e,t){return this._calendar.set(this,e,t)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(l.local.differentCalendars||l.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var t=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return 0===t?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(e){return this._calendar.fromJD(e)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(e){return this._calendar.fromJSDate(e)},toString:function(){return(this.year()<0?"-":"")+a(Math.abs(this.year()),4)+"-"+a(this.month(),2)+"-"+a(this.day(),2)}}),r(o.prototype,{_validateLevel:0,newDate:function(e,t,r){return null==e?this.today():(e.year&&(this._validate(e,t,r,l.local.invalidDate||l.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new i(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){return this._validate(e,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+a(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,l.local.invalidMonth||l.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(e,t){var r=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,r,this.minDay,l.local.invalidMonth||l.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var n=this._validate(e,t,r,l.local.invalidDate||l.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,l.local.invalidDate||l.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,l.local.invalidDate||l.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,l.local.invalidDate||l.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,t,r),t,r)},_add:function(e,t,r){if(this._validateLevel++,"d"===r||"w"===r){var n=e.toJD()+t*("w"===r?this.daysInWeek():1),i=e.calendar().fromJD(n);return this._validateLevel--,[i.year(),i.month(),i.day()]}try{var a=e.year()+("y"===r?t:0),o=e.monthOfYear()+("m"===r?t:0);i=e.day(),"y"===r?(e.month()!==this.fromMonthOfYear(a,o)&&(o=this.newDate(a,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(a)),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o)))):"m"===r&&(function(e){for(;ot-1+e.minMonth;)a++,o-=t,t=e.monthsInYear(a)}(this),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o))));var s=[a,this.fromMonthOfYear(a,o),i];return this._validateLevel--,s}catch(e){throw this._validateLevel--,e}},_correctAdd:function(e,t,r,n){if(!(this.hasYearZero||"y"!==n&&"m"!==n||0!==t[0]&&e.year()>0==t[0]>0)){var i={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],a=r<0?-1:1;t=this._add(e,r*i[0]+a*i[1],i[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,r){this._validate(e,this.minMonth,this.minDay,l.local.invalidDate||l.regionalOptions[""].invalidDate);var n="y"===r?t:e.year(),i="m"===r?t:e.month(),a="d"===r?t:e.day();return("y"===r||"m"===r)&&(a=Math.min(a,this.daysInMonth(n,i))),e.date(n,i,a)},isValid:function(e,t,r){this._validateLevel++;var n=this.hasYearZero||0!==e;if(n){var i=this.newDate(e,t,this.minDay);n=t>=this.minMonth&&t-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),c=i-(l>2.5?4716:4715);return c<=0&&c--,this.newDate(c,l,s)},toJSDate:function(e,t,r){var n=this._validate(e,t,r,l.local.invalidDate||l.regionalOptions[""].invalidDate),i=new Date(n.year(),n.month()-1,n.day());return i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0),i.setHours(i.getHours()>12?i.getHours()+2:0),i},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var l=t.exports=new n;l.cdate=i,l.baseCalendar=o,l.calendars.gregorian=s}}),Mk=m({"node_modules/world-calendars/dist/plus.js"(){var e=Ay(),t=Ak();e(t.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),t.local=t.regionalOptions[""],e(t.cdate.prototype,{formatDate:function(e,t){return"string"!=typeof e&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}}),e(t.baseCalendar.prototype,{UNIX_EPOCH:t.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:t.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(e,r,n){if("string"!=typeof e&&(n=r,r=e,e=""),!r)return"";if(r.calendar()!==this)throw t.local.invalidFormat||t.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat;for(var i=(n=n||{}).dayNamesShort||this.local.dayNamesShort,a=n.dayNames||this.local.dayNames,o=n.monthNumbers||this.local.monthNumbers,s=n.monthNamesShort||this.local.monthNamesShort,l=n.monthNames||this.local.monthNames,c=(n.calculateWeek||this.local.calculateWeek,function(t,r){for(var n=1;v+n1}),u=function(e,t,r,n){var i=""+t;if(c(e,n))for(;i.length1},x=function(e,n){var i=v(e,n),a=[2,3,i?4:2,i?4:2,10,11,20]["oyYJ@!".indexOf(e)+1],o=new RegExp("^-?\\d{1,"+a+"}"),s=r.substring(A).match(o);if(!s)throw(t.local.missingNumberAt||t.regionalOptions[""].missingNumberAt).replace(/\{0\}/,A);return A+=s[0].length,parseInt(s[0],10)},_=this,b=function(){if("function"==typeof l){v("m");var e=l.call(_,r.substring(A));return A+=e.length,e}return x("m")},w=function(e,n,i,a){for(var o=v(e,a)?i:n,s=0;s-1){p=1,d=m;for(var E=this.daysInMonth(f,p);d>E;E=this.daysInMonth(f,p))p++,d-=E}return h>-1?this.fromJD(h):this.newDate(f,p,d)},determineDate:function(e,t,r,n,i){r&&"object"!=typeof r&&(i=n,n=r,r=null),"string"!=typeof n&&(i=n,n="");var a=this;return t=t?t.newDate():null,null==e?t:"string"==typeof e?function(e){try{return a.parseDate(n,e,i)}catch{}for(var t=((e=e.toLowerCase()).match(/^c/)&&r?r.newDate():null)||a.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,s=o.exec(e);s;)t.add(parseInt(s[1],10),s[2]||"d"),s=o.exec(e);return t}(e):"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?t:a.today().add(e,"d"):a.newDate(e)}})}}),Sk=m({"node_modules/world-calendars/dist/calendars/chinese.js"(){var e=Ak(),t=Ay(),r=e.instance();function n(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}n.prototype=new e.baseCalendar,t(n.prototype,{name:"Chinese",jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,t){if("string"==typeof e){var r=e.match(a);return r?r[0]:""}var n=this._validateYear(e),i=e.month(),o=""+this.toChineseMonth(n,i);return t&&o.length<2&&(o="0"+o),this.isIntercalaryMonth(n,i)&&(o+="i"),o},monthNames:function(e){if("string"==typeof e){var t=e.match(o);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),i=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(i="闰"+i),i},monthNamesShort:function(e){if("string"==typeof e){var t=e.match(s);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),i=["一","二","三","四","五","六","七","八","九","十","十一","十二"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(i="闰"+i),i},parseMonth:function(e,t){e=this._validateYear(e);var r,n=parseInt(t);if(isNaN(n))"闰"===t[0]&&(r=!0,t=t.substring(1)),"月"===t[t.length-1]&&(t=t.substring(0,t.length-1)),n=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(t);else{var i=t[t.length-1];r="i"===i||"I"===i}return this.toMonthIndex(e,n,r)},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(e,t){if(e.year&&(e=e.year()),"number"!=typeof e||e<1888||e>2111)throw t.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(t,r,n){var i=this.intercalaryMonth(t);if(n&&r!==i||r<1||r>12)throw e.local.invalidMonth.replace(/\{0\}/,this.local.name);return i?!n&&r<=i?r-1:r:r-1},toChineseMonth:function(t,r){t.year&&(r=(t=t.year()).month());var n=this.intercalaryMonth(t);if(r<0||r>(n?12:11))throw e.local.invalidMonth.replace(/\{0\}/,this.local.name);return n?r>13},isIntercalaryMonth:function(e,t){e.year&&(t=(e=e.year()).month());var r=this.intercalaryMonth(e);return!!r&&r===t},leapYear:function(e){return 0!==this.intercalaryMonth(e)},weekOfYear:function(t,n,i){var a,o=this._validateYear(t,e.local.invalidyear),s=c[o-c[0]],l=s>>9&4095,u=s>>5&15,h=31&s;(a=r.newDate(l,u,h)).add(4-(a.dayOfWeek()||7),"d");var f=this.toJD(t,n,i)-a.toJD();return 1+Math.floor(f/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(t,r){t.year&&(r=t.month(),t=t.year()),t=this._validateYear(t);var n=l[t-l[0]];if(r>(n>>13?12:11))throw e.local.invalidMonth.replace(/\{0\}/,this.local.name);return n&1<<12-r?30:29},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(t,n,i){var a=this._validate(t,s,i,e.local.invalidDate);t=this._validateYear(a.year()),n=a.month(),i=a.day();var o=this.isIntercalaryMonth(t,n),s=this.toChineseMonth(t,n),u=function(e,t,r,n){var i,a,o;if("object"==typeof e)a=e,i=t||{};else{var s;if(!("number"==typeof e&&e>=1888&&e<=2111))throw new Error("Lunar year outside range 1888-2111");if(!("number"==typeof t&&t>=1&&t<=12))throw new Error("Lunar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=30))throw new Error("Lunar day outside range 1 - 30");"object"==typeof n?(s=!1,i=n):(s=!!n,i={}),a={year:e,month:t,day:r,isIntercalary:s}}o=a.day-1;var u,h=l[a.year-l[0]],f=h>>13;u=f&&(a.month>f||a.isIntercalary)?a.month:a.month-1;for(var p=0;p>9&4095,(d>>5&15)-1,(31&d)+o);return i.year=m.getFullYear(),i.month=1+m.getMonth(),i.day=m.getDate(),i}(t,s,i,o);return r.toJD(u.year,u.month,u.day)},fromJD:function(e){var t=r.fromJD(e),n=function(e,t,r){var n,i;if("object"==typeof e)n=e,i=t||{};else{if(!("number"==typeof e&&e>=1888&&e<=2111))throw new Error("Solar year outside range 1888-2111");if(!("number"==typeof t&&t>=1&&t<=12))throw new Error("Solar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=31))throw new Error("Solar day outside range 1 - 31");n={year:e,month:t,day:r},i={}}var a=c[n.year-c[0]],o=n.year<<9|n.month<<5|n.day;i.year=o>=a?n.year:n.year-1,a=c[i.year-c[0]];var s,u=new Date(a>>9&4095,(a>>5&15)-1,31&a),h=new Date(n.year,n.month-1,n.day);s=Math.round((h-u)/864e5);var f,p=l[i.year-l[0]];for(f=0;f<13;f++){var d=p&1<<12-f?30:29;if(s>13;return!m||f=2&&n<=6},extraInfo:function(t,r,i){var a=this._validate(t,r,i,e.local.invalidDate);return{century:n[Math.floor((a.year()-1)/100)+1]||""}},toJD:function(t,r,n){var i=this._validate(t,r,n,e.local.invalidDate);return t=i.year()+(i.year()<0?1:0),r=i.month(),(n=i.day())+(r>1?16:0)+(r>2?32*(r-2):0)+400*(t-1)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var t=Math.floor(e/400)+1;e-=400*(t-1),e+=e>15?16:0;var r=Math.floor(e/32)+1,n=e-32*(r-1)+1;return this.newDate(t<=0?t-1:t,r,n)}});var n={20:"Fruitbat",21:"Anchovy"};e.calendars.discworld=r}}),Ik=m({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var e=Ak(),t=Ay();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Ethiopian",jdEpoch:1724220.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return(t=r.year()+(r.year()<0?1:0))%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear||e.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var n=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(13===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(t,r,n){var i=this._validate(t,r,n,e.local.invalidDate);return(t=i.year())<0&&t++,i.day()+30*(i.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,i=t-30*(n-1)+1;return this.newDate(r,n,i)}}),e.calendars.ethiopian=r}}),Lk=m({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var e=Ak(),t=Ay();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function n(e,t){return e-t*Math.floor(e/t)}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return this._leapYear(r.year())},_leapYear:function(e){return n(7*(e=e<0?e+1:e)+1,19)<7},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),this._leapYear(t.year?t.year():t)?13:12},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return t=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year(),this.toJD(-1===t?1:t+1,7,1)-this.toJD(t,7,1)},daysInMonth:function(t,r){return t.year&&(r=t.month(),t=t.year()),this._validate(t,r,this.minDay,e.local.invalidMonth),12===r&&this.leapYear(t)||8===r&&5===n(this.daysInYear(t),10)?30:9===r&&3===n(this.daysInYear(t),10)?29:this.daysPerMonth[r-1]},weekDay:function(e,t,r){return 6!==this.dayOfWeek(e,t,r)},extraInfo:function(t,r,n){var i=this._validate(t,r,n,e.local.invalidDate);return{yearType:(this.leapYear(i)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(i)%10-3]}},toJD:function(t,r,n){var i=this._validate(t,r,n,e.local.invalidDate);t=i.year(),r=i.month(),n=i.day();var a=t<=0?t+1:t,o=this.jdEpoch+this._delay1(a)+this._delay2(a)+n+1;if(r<7){for(var s=7;s<=this.monthsInYear(t);s++)o+=this.daysInMonth(t,s);for(s=1;s=this.toJD(-1===t?1:t+1,7,1);)t++;for(var r=ethis.toJD(t,r,this.daysInMonth(t,r));)r++;var n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}}),e.calendars.hebrew=r}}),Pk=m({"node_modules/world-calendars/dist/calendars/islamic.js"(){var e=Ak(),t=Ay();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Islamic",jdEpoch:1948439.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-khamīs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(t){return(11*this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year()+14)%30<11},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(t,r){var n=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(12===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(t,r,n){var i=this._validate(t,r,n,e.local.invalidDate);return t=i.year(),r=i.month(),t=t<=0?t+1:t,(n=i.day())+Math.ceil(29.5*(r-1))+354*(t-1)+Math.floor((3+11*t)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=Math.floor((30*(e-this.jdEpoch)+10646)/10631);t=t<=0?t-1:t;var r=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}}),e.calendars.islamic=r}}),zk=m({"node_modules/world-calendars/dist/calendars/julian.js"(){var e=Ak(),t=Ay();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Julian",jdEpoch:1721423.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return(t=r.year()<0?r.year()+1:r.year())%4==0},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var n=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(2===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(t,r,n){var i=this._validate(t,r,n,e.local.invalidDate);return t=i.year(),r=i.month(),n=i.day(),t<0&&t++,r<=2&&(t--,r+=12),Math.floor(365.25*(t+4716))+Math.floor(30.6001*(r+1))+n-1524.5},fromJD:function(e){var t=Math.floor(e+.5)+1524,r=Math.floor((t-122.1)/365.25),n=Math.floor(365.25*r),i=Math.floor((t-n)/30.6001),a=i-Math.floor(i<14?1:13),o=r-Math.floor(a>2?4716:4715),s=t-n-Math.floor(30.6001*i);return o<=0&&o--,this.newDate(o,a,s)}}),e.calendars.julian=r}}),Dk=m({"node_modules/world-calendars/dist/calendars/mayan.js"(){var e=Ak(),t=Ay();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function n(e,t){return e-t*Math.floor(e/t)}function i(e,t){return n(e-1,t)+1}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),!1},formatYear:function(t){t=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year();var r=Math.floor(t/400);return t%=400,t+=t<0?400:0,r+"."+Math.floor(t/20)+"."+t%20},forYear:function(e){if((e=e.split(".")).length<3)throw"Invalid Mayan year";for(var t=0,r=0;r19||r>0&&n<0)throw"Invalid Mayan year";t=20*t+n}return t},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),18},weekOfYear:function(t,r,n){return this._validate(t,r,n,e.local.invalidDate),0},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),360},daysInMonth:function(t,r){return this._validate(t,r,this.minDay,e.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(t,r,n){return this._validate(t,r,n,e.local.invalidDate).day()},weekDay:function(t,r,n){return this._validate(t,r,n,e.local.invalidDate),!0},extraInfo:function(t,r,n){var i=this._validate(t,r,n,e.local.invalidDate).toJD(),a=this._toHaab(i),o=this._toTzolkin(i);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(e){var t=n(8+(e-=this.jdEpoch)+340,365);return[Math.floor(t/20)+1,n(t,20)]},_toTzolkin:function(e){return[i(20+(e-=this.jdEpoch),20),i(e+4,13)]},toJD:function(t,r,n){var i=this._validate(t,r,n,e.local.invalidDate);return i.day()+20*i.month()+360*i.year()+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var t=Math.floor(e/360);e%=360,e+=e<0?360:0;var r=Math.floor(e/20),n=e%20;return this.newDate(t,r,n)}}),e.calendars.mayan=r}}),Ok=m({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var e=Ak(),t=Ay();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar;var n=e.instance("gregorian");t(r.prototype,{name:"Nanakshahi",jdEpoch:2257673.5,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear||e.regionalOptions[""].invalidYear);return n.leapYear(r.year()+(r.year()<1?1:0)+1469)},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var n=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(12===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(t,r,i){var a=this._validate(t,r,i,e.local.invalidMonth);(t=a.year())<0&&t++;for(var o=a.day(),s=1;s=this.toJD(t+1,1,1);)t++;for(var r=e-Math.floor(this.toJD(t,1,1)+.5)+1,n=1;r>this.daysInMonth(t,n);)r-=this.daysInMonth(t,n),n++;return this.newDate(t,n,r)}}),e.calendars.nanakshahi=r}}),Rk=m({"node_modules/world-calendars/dist/calendars/nepali.js"(){var e=Ak(),t=Ay();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Nepali",jdEpoch:1700709.5,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){if(t=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year(),typeof this.NEPALI_CALENDAR_DATA[t]>"u")return this.daysPerYear;for(var r=0,n=this.minMonth;n<=12;n++)r+=this.NEPALI_CALENDAR_DATA[t][n];return r},daysInMonth:function(t,r){return t.year&&(r=t.month(),t=t.year()),this._validate(t,r,this.minDay,e.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[t]>"u"?this.daysPerMonth[r-1]:this.NEPALI_CALENDAR_DATA[t][r]},weekDay:function(e,t,r){return 6!==this.dayOfWeek(e,t,r)},toJD:function(t,r,n){var i=this._validate(t,r,n,e.local.invalidDate);t=i.year(),r=i.month(),n=i.day();var a=e.instance(),o=0,s=r,l=t;this._createMissingCalendarData(t);var c=t-(s>9||9===s&&n>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(9!==r&&(o=n,s--);9!==s;)s<=0&&(s=12,l--),o+=this.NEPALI_CALENDAR_DATA[l][s],s--;return 9===r?(o+=n-this.NEPALI_CALENDAR_DATA[l][0])<0&&(o+=a.daysInYear(c)):o+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],a.newDate(c,1,1).add(o,"d").toJD()},fromJD:function(t){var r=e.instance().fromJD(t),n=r.year(),i=r.dayOfYear(),a=n+56;this._createMissingCalendarData(a);for(var o=9,s=this.NEPALI_CALENDAR_DATA[a][0],l=this.NEPALI_CALENDAR_DATA[a][o]-s+1;i>l;)++o>12&&(o=1,a++),l+=this.NEPALI_CALENDAR_DATA[a][o];var c=this.NEPALI_CALENDAR_DATA[a][o]-(l-i);return this.newDate(a,o,c)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var r=e-1;r"u"&&(this.NEPALI_CALENDAR_DATA[r]=t)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),e.calendars.nepali=r}}),Fk=m({"node_modules/world-calendars/dist/calendars/persian.js"(){var e=Ak(),t=Ay();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function n(e){var t=e-475;e<0&&t++;var r=.242197,n=r*t,i=r*(t+1);return n-Math.floor(n)>i-Math.floor(i)}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Persian",jdEpoch:1948320.5,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chahārshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(t){return n(this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year())},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-(n.dayOfWeek()+1)%7,"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var n=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(12===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(t,r,i){var a=this._validate(t,r,i,e.local.invalidDate);t=a.year(),r=a.month(),i=a.day();var o=0;if(t>0)for(var s=1;s0?t-1:t)+o+this.jdEpoch-1},fromJD:function(e){var t=475+((e=Math.floor(e)+.5)-this.toJD(475,1,1))/365.242197,r=Math.floor(t);r<=0&&r--,e>this.toJD(r,12,n(r)?30:29)&&0==++r&&r++;var i=e-this.toJD(r,1,1)+1,a=i<=186?Math.ceil(i/31):Math.ceil((i-6)/30),o=e-this.toJD(r,a,1)+1;return this.newDate(r,a,o)}}),e.calendars.persian=r,e.calendars.jalali=r}}),Bk=m({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var e=Ak(),t=Ay(),r=e.instance();function n(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}n.prototype=new e.baseCalendar,t(n.prototype,{name:"Taiwan",jdEpoch:2419402.5,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(t){var n=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return t=this._t2gYear(n.year()),r.leapYear(t)},weekOfYear:function(t,n,i){var a=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return t=this._t2gYear(a.year()),r.weekOfYear(t,a.month(),a.day())},daysInMonth:function(t,r){var n=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(2===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(t,n,i){var a=this._validate(t,n,i,e.local.invalidDate);return t=this._t2gYear(a.year()),r.toJD(t,a.month(),a.day())},fromJD:function(e){var t=r.fromJD(e),n=this._g2tYear(t.year());return this.newDate(n,t.month(),t.day())},_t2gYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)},_g2tYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)}}),e.calendars.taiwan=n}}),jk=m({"node_modules/world-calendars/dist/calendars/thai.js"(){var e=Ak(),t=Ay(),r=e.instance();function n(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}n.prototype=new e.baseCalendar,t(n.prototype,{name:"Thai",jdEpoch:1523098.5,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var n=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return t=this._t2gYear(n.year()),r.leapYear(t)},weekOfYear:function(t,n,i){var a=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return t=this._t2gYear(a.year()),r.weekOfYear(t,a.month(),a.day())},daysInMonth:function(t,r){var n=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(2===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(t,n,i){var a=this._validate(t,n,i,e.local.invalidDate);return t=this._t2gYear(a.year()),r.toJD(t,a.month(),a.day())},fromJD:function(e){var t=r.fromJD(e),n=this._g2tYear(t.year());return this.newDate(n,t.month(),t.day())},_t2gYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)},_g2tYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)}}),e.calendars.thai=n}}),Nk=m({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var e=Ak(),t=Ay();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thalāthā’","Yawm al-Arba‘ā’","Yawm al-Khamīs","Yawm al-Jum‘a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(t){var r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return 355===this.daysInYear(r.year())},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var t=0,r=1;r<=12;r++)t+=this.daysInMonth(e,r);return t},daysInMonth:function(t,r){for(var i=this._validate(t,r,this.minDay,e.local.invalidMonth).toJD()-24e5+.5,a=0,o=0;oi)return n[a]-n[a-1];a++}return 30},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(t,r,i){var a=this._validate(t,r,i,e.local.invalidDate),o=12*(a.year()-1)+a.month()-15292;return a.day()+n[o-1]-1+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,r=0,i=0;it);i++)r++;var a=r+15292,o=Math.floor((a-1)/12),s=o+1,l=a-12*o,c=t-n[r-1]+1;return this.newDate(s,l,c)},isValid:function(t,r,n){var i=e.baseCalendar.prototype.isValid.apply(this,arguments);return i&&(i=(t=null!=t.year?t.year:t)>=1276&&t<=1500),i},_validate:function(t,r,n,i){var a=e.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw i.replace(/\{0\}/,this.local.name);return a}}),e.calendars.ummalqura=r;var n=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]}}),Uk=m({"src/components/calendars/calendars.js"(e,t){t.exports=Ak(),Mk(),Sk(),Ek(),Ck(),Ik(),Lk(),Pk(),zk(),Dk(),Ok(),Rk(),Fk(),Bk(),jk(),Nk()}}),Vk=m({"src/components/calendars/index.js"(e,t){var r=Uk(),n=ct(),i=S(),a=i.EPOCHJD,o=i.ONEDAY,s={valType:"enumerated",values:n.sortObjectKeys(r.calendars),editType:"calc",dflt:"gregorian"},l=function(e,t,r,i){var a={};return a[r]=s,n.coerce(e,t,a,r,i)},c="##",u={d:{0:"dd","-":"d"},e:{0:"d","-":"d"},a:{0:"D","-":"D"},A:{0:"DD","-":"DD"},j:{0:"oo","-":"o"},W:{0:"ww","-":"w"},m:{0:"mm","-":"m"},b:{0:"M","-":"M"},B:{0:"MM","-":"MM"},y:{0:"yy","-":"yy"},Y:{0:"yyyy","-":"yyyy"},U:c,w:c,c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}},h={};function f(e){var t=h[e];return t||(h[e]=r.instance(e))}function p(e){return n.extendFlat({},s,{description:e})}function d(e){return"Sets the calendar system to use with `"+e+"` date data."}var m={xcalendar:p(d("x"))},g=n.extendFlat({},m,{ycalendar:p(d("y"))}),y=n.extendFlat({},g,{zcalendar:p(d("z"))}),v=p(["Sets the calendar system to use for `range` and `tick0`","if this is a date axis. This does not set the calendar for","interpreting data on this axis, that's specified in the trace","or via the global `layout.calendar`"].join(" "));t.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:g,bar:g,box:g,heatmap:g,contour:g,histogram:g,histogram2d:g,histogram2dcontour:g,scatter3d:y,surface:y,mesh3d:y,scattergl:g,ohlc:m,candlestick:m},layout:{calendar:p(["Sets the default calendar system to use for interpreting and","displaying dates throughout the plot."].join(" "))},subplots:{xaxis:{calendar:v},yaxis:{calendar:v},scene:{xaxis:{calendar:v},yaxis:{calendar:v},zaxis:{calendar:v}},polar:{radialaxis:{calendar:v}}}},layoutAttributes:s,handleDefaults:l,handleTraceDefaults:function(e,t,r,n){for(var i=0;i{n.preventDefault(),n.stopPropagation(),n.clipboardData.setData("text",e),t.removeEventListener("copy",r,!0)};t.addEventListener("copy",r,!0),document.execCommand("copy")},(l=i||(i={})).boxSizing=function(e){let t=window.getComputedStyle(e),r=parseFloat(t.borderTopWidth)||0,n=parseFloat(t.borderLeftWidth)||0,i=parseFloat(t.borderRightWidth)||0,a=parseFloat(t.borderBottomWidth)||0,o=parseFloat(t.paddingTop)||0,s=parseFloat(t.paddingLeft)||0,l=parseFloat(t.paddingRight)||0,c=parseFloat(t.paddingBottom)||0;return{borderTop:r,borderLeft:n,borderRight:i,borderBottom:a,paddingTop:o,paddingLeft:s,paddingRight:l,paddingBottom:c,horizontalSum:n+s+l+i,verticalSum:r+o+c+a}},l.sizeLimits=function(e){let t=window.getComputedStyle(e),r=parseFloat(t.minWidth)||0,n=parseFloat(t.minHeight)||0,i=parseFloat(t.maxWidth)||1/0,a=parseFloat(t.maxHeight)||1/0;return i=Math.max(r,i),a=Math.max(n,a),{minWidth:r,minHeight:n,maxWidth:i,maxHeight:a}},l.hitTest=function(e,t,r){let n=e.getBoundingClientRect();return t>=n.left&&t=n.top&&r=r.bottom)){if(n.topr.bottom&&n.height>=r.height)return void(e.scrollTop-=r.top-n.top);if(n.topr.height)return void(e.scrollTop-=r.bottom-n.bottom);if(n.bottom>r.bottom&&n.height{let e=Element.prototype;return e.matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector||function(e){let t=this,r=t.ownerDocument?t.ownerDocument.querySelectorAll(e):[];return-1!==Array.prototype.indexOf.call(r,t)}})(),e.calculateSingle=function(e){let c=0,u=0,h=0;function f(t){let r=e.match(t);return null!==r&&(e=e.slice(r[0].length),!0)}for(e=(e=e.split(",",1)[0]).replace(l," $1 ");e.length>0;)if(f(t))c++;else if(f(r))u++;else if(f(n))u++;else if(f(a))h++;else if(f(o))u++;else if(f(i))h++;else if(!f(s))return 0;return c=Math.min(c,255),u=Math.min(u,255),h=Math.min(h,255),c<<16|u<<8|h};let t=/^#[^\s\+>~#\.\[:]+/,r=/^\.[^\s\+>~#\.\[:]+/,n=/^\[[^\]]+\]/,i=/^[^\s\+>~#\.\[:]+/,a=/^(::[^\s\+>~#\.\[:]+|:first-line|:first-letter|:before|:after)/,o=/^:[^\s\+>~#\.\[:]+/,s=/^[\s\+>~\*]+/,l=/:not\(([^\)]+)\)/g}(s||(s={}));var T,k=y(v()),A=class{constructor(){this._first=null,this._last=null,this._size=0}get isEmpty(){return 0===this._size}get size(){return this._size}get length(){return this._size}get first(){return this._first?this._first.value:void 0}get last(){return this._last?this._last.value:void 0}get firstNode(){return this._first}get lastNode(){return this._last}*[Symbol.iterator](){let e=this._first;for(;e;)yield e.value,e=e.next}*retro(){let e=this._last;for(;e;)yield e.value,e=e.prev}*nodes(){let e=this._first;for(;e;)yield e,e=e.next}*retroNodes(){let e=this._last;for(;e;)yield e,e=e.prev}assign(e){this.clear();for(let t of e)this.addLast(t)}push(e){this.addLast(e)}pop(){return this.removeLast()}shift(e){this.addFirst(e)}unshift(){return this.removeFirst()}addFirst(e){let t=new T.LinkedListNode(this,e);return this._first?(t.next=this._first,this._first.prev=t,this._first=t):(this._first=t,this._last=t),this._size++,t}addLast(e){let t=new T.LinkedListNode(this,e);return this._last?(t.prev=this._last,this._last.next=t,this._last=t):(this._first=t,this._last=t),this._size++,t}insertBefore(e,t){if(!t||t===this._first)return this.addFirst(e);if(!(t instanceof T.LinkedListNode)||t.list!==this)throw new Error("Reference node is not owned by the list.");let r=new T.LinkedListNode(this,e),n=t,i=n.prev;return r.next=n,r.prev=i,n.prev=r,i.next=r,this._size++,r}insertAfter(e,t){if(!t||t===this._last)return this.addLast(e);if(!(t instanceof T.LinkedListNode)||t.list!==this)throw new Error("Reference node is not owned by the list.");let r=new T.LinkedListNode(this,e),n=t,i=n.next;return r.next=i,r.prev=n,n.next=r,i.prev=r,this._size++,r}removeFirst(){let e=this._first;if(e)return e===this._last?(this._first=null,this._last=null):(this._first=e.next,this._first.prev=null),e.list=null,e.next=null,e.prev=null,this._size--,e.value}removeLast(){let e=this._last;if(e)return e===this._first?(this._first=null,this._last=null):(this._last=e.prev,this._last.next=null),e.list=null,e.next=null,e.prev=null,this._size--,e.value}removeNode(e){if(!(e instanceof T.LinkedListNode)||e.list!==this)throw new Error("Node is not owned by the list.");let t=e;t===this._first&&t===this._last?(this._first=null,this._last=null):t===this._first?(this._first=t.next,this._first.prev=null):t===this._last?(this._last=t.prev,this._last.next=null):(t.next.prev=t.prev,t.prev.next=t.next),t.list=null,t.next=null,t.prev=null,this._size--}clear(){let e=this._first;for(;e;){let t=e.next;e.list=null,e.prev=null,e.next=null,e=t}this._first=null,this._last=null,this._size=0}};!function(e){e.from=function(t){let r=new e;return r.assign(t),r}}(A||(A={})),function(e){e.LinkedListNode=class{constructor(e,t){this.list=null,this.next=null,this.prev=null,this.list=e,this.value=t}}}(T||(T={}));var M,S=class{constructor(e){this.type=e}get isConflatable(){return!1}conflate(e){return!1}},E=class extends S{get isConflatable(){return!0}conflate(e){return!0}};!function(e){let t=null,r=(n=Promise.resolve(),e=>{let t=!1;return n.then((()=>!t&&e())),()=>{t=!0}});var n;function i(e,t){let r=o.get(e);r&&0!==r.length?(0,k.every)((0,k.retro)(r),(r=>!r||function(e,t,r){let n=!0;try{n="function"==typeof e?e(t,r):e.messageHook(t,r)}catch(e){l(e)}return n}(r,e,t)))&&u(e,t):u(e,t)}e.sendMessage=i,e.postMessage=function(e,n){n.isConflatable&&(0,k.some)(a,(t=>!(t.handler!==e||!t.msg||t.msg.type!==n.type||!t.msg.isConflatable)&&t.msg.conflate(n)))||function(e,n){a.addLast({handler:e,msg:n}),null===t&&(t=r(h))}(e,n)},e.installMessageHook=function(e,t){let r=o.get(e);r&&-1!==r.indexOf(t)||(r?r.push(t):o.set(e,[t]))},e.removeMessageHook=function(e,t){let r=o.get(e);if(!r)return;let n=r.indexOf(t);-1!==n&&(r[n]=null,f(r))},e.clearData=function(e){let t=o.get(e);t&&t.length>0&&(k.ArrayExt.fill(t,null),f(t));for(let t of a)t.handler===e&&(t.handler=null,t.msg=null)},e.flush=function(){c||null===t||(t(),t=null,c=!0,h(),c=!1)},e.getExceptionHandler=function(){return l},e.setExceptionHandler=function(e){let t=l;return l=e,t};let a=new A,o=new WeakMap,s=new Set,l=e=>{console.error(e)},c=!1;function u(e,t){try{e.processMessage(t)}catch(e){l(e)}}function h(){if(t=null,a.isEmpty)return;let e={handler:null,msg:null};for(a.addLast(e);;){let t=a.removeFirst();if(t===e)return;t.handler&&t.msg&&i(t.handler,t.msg)}}function f(e){0===s.size&&r(p),s.add(e)}function p(){s.forEach(d),s.clear()}function d(e){k.ArrayExt.removeAllWhere(e,m)}function m(e){return null===e}}(M||(M={}));var C,I=class{constructor(e){this._pid=C.nextPID(),this.name=e.name,this._create=e.create,this._coerce=e.coerce||null,this._compare=e.compare||null,this._changed=e.changed||null}get(e){let t,r=C.ensureMap(e);return t=this._pid in r?r[this._pid]:r[this._pid]=this._createValue(e),t}set(e,t){let r,n=C.ensureMap(e);r=this._pid in n?n[this._pid]:n[this._pid]=this._createValue(e);let i=this._coerceValue(e,t);this._maybeNotify(e,r,n[this._pid]=i)}coerce(e){let t,r=C.ensureMap(e);t=this._pid in r?r[this._pid]:r[this._pid]=this._createValue(e);let n=this._coerceValue(e,t);this._maybeNotify(e,t,r[this._pid]=n)}_createValue(e){return(0,this._create)(e)}_coerceValue(e,t){let r=this._coerce;return r?r(e,t):t}_compareValue(e,t){let r=this._compare;return r?r(e,t):e===t}_maybeNotify(e,t,r){let n=this._changed;n&&!this._compareValue(t,r)&&n(e,t,r)}};!function(e){e.clearData=function(e){C.ownerData.delete(e)}}(I||(I={})),function(e){e.ownerData=new WeakMap,e.nextPID=(()=>{let e=0;return()=>`pid-${`${Math.random()}`.slice(2)}-${e++}`})(),e.ensureMap=function(t){let r=e.ownerData.get(t);return r||(r=Object.create(null),e.ownerData.set(t,r),r)}}(C||(C={}));var L,P=y(v()),z=(y(x()),class{constructor(e){this.sender=e}connect(e,t){return L.connect(this,e,t)}disconnect(e,t){return L.disconnect(this,e,t)}emit(e){L.emit(this,e)}});!function(e){e.disconnectBetween=function(e,t){L.disconnectBetween(e,t)},e.disconnectSender=function(e){L.disconnectSender(e)},e.disconnectReceiver=function(e){L.disconnectReceiver(e)},e.disconnectAll=function(e){L.disconnectAll(e)},e.clearData=function(e){L.disconnectAll(e)},e.getExceptionHandler=function(){return L.exceptionHandler},e.setExceptionHandler=function(e){let t=L.exceptionHandler;return L.exceptionHandler=e,t}}(z||(z={})),function(e){function t(e){let t=n.get(e);if(t&&0!==t.length){for(let e of t){if(!e.signal)continue;let t=e.thisArg||e.slot;e.signal=null,c(i.get(t))}c(t)}}function r(e){let t=i.get(e);if(t&&0!==t.length){for(let e of t){if(!e.signal)continue;let t=e.signal.sender;e.signal=null,c(n.get(t))}c(t)}}e.exceptionHandler=e=>{console.error(e)},e.connect=function(e,t,r){r=r||void 0;let a=n.get(e.sender);if(a||(a=[],n.set(e.sender,a)),s(a,e,t,r))return!1;let o=r||t,l=i.get(o);l||(l=[],i.set(o,l));let c={signal:e,slot:t,thisArg:r};return a.push(c),l.push(c),!0},e.disconnect=function(e,t,r){r=r||void 0;let a=n.get(e.sender);if(!a||0===a.length)return!1;let o=s(a,e,t,r);if(!o)return!1;let l=r||t,u=i.get(l);return o.signal=null,c(a),c(u),!0},e.disconnectBetween=function(e,t){let r=n.get(e);if(!r||0===r.length)return;let a=i.get(t);if(a&&0!==a.length){for(let t of a)t.signal&&t.signal.sender===e&&(t.signal=null);c(r),c(a)}},e.disconnectSender=t,e.disconnectReceiver=r,e.disconnectAll=function(e){t(e),r(e)},e.emit=function(e,t){let r=n.get(e.sender);if(r&&0!==r.length)for(let n=0,i=r.length;ne.signal===t&&e.slot===r&&e.thisArg===n))}function l(t,r){let{signal:n,slot:i,thisArg:a}=t;try{i.call(a,n.sender,r)}catch(t){e.exceptionHandler(t)}}function c(e){0===a.size&&o(u),a.add(e)}function u(){a.forEach(h),a.clear()}function h(e){P.ArrayExt.removeAllWhere(e,f)}function f(e){return null===e.signal}}(L||(L={}));var D=class{constructor(e){this._fn=e}get isDisposed(){return!this._fn}dispose(){if(!this._fn)return;let e=this._fn;this._fn=null,e()}},O=class{constructor(){this._isDisposed=!1,this._items=new Set}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed||(this._isDisposed=!0,this._items.forEach((e=>{e.dispose()})),this._items.clear())}contains(e){return this._items.has(e)}add(e){this._items.add(e)}remove(e){this._items.delete(e)}clear(){this._items.clear()}};!function(e){e.from=function(t){let r=new e;for(let e of t)r.add(e);return r}}(O||(O={}));var R=class extends O{constructor(){super(...arguments),this._disposed=new z(this)}get disposed(){return this._disposed}dispose(){this.isDisposed||(super.dispose(),this._disposed.emit(void 0),z.clearData(this))}};!function(e){e.from=function(t){let r=new e;for(let e of t)r.add(e);return r}}(R||(R={}));var F,B=class e{constructor(e){this._onScrollFrame=()=>{if(!this._scrollTarget)return;let{element:e,edge:t,distance:r}=this._scrollTarget,n=F.SCROLL_EDGE_SIZE-r,i=Math.pow(n/F.SCROLL_EDGE_SIZE,2),a=Math.max(1,Math.round(i*F.SCROLL_EDGE_SIZE));switch(t){case"top":e.scrollTop-=a;break;case"left":e.scrollLeft-=a;break;case"right":e.scrollLeft+=a;break;case"bottom":e.scrollTop+=a}requestAnimationFrame(this._onScrollFrame)},this._disposed=!1,this._dropAction="none",this._override=null,this._currentTarget=null,this._currentElement=null,this._promise=null,this._scrollTarget=null,this._resolve=null,this.document=e.document||document,this.mimeData=e.mimeData,this.dragImage=e.dragImage||null,this.proposedAction=e.proposedAction||"copy",this.supportedActions=e.supportedActions||"all",this.source=e.source||null}dispose(){if(!this._disposed){if(this._disposed=!0,this._currentTarget){let e=new PointerEvent("pointerup",{bubbles:!0,cancelable:!0,clientX:-1,clientY:-1});F.dispatchDragLeave(this,this._currentTarget,null,e)}this._finalize("none")}}get isDisposed(){return this._disposed}start(e,t){if(this._disposed)return Promise.resolve("none");if(this._promise)return this._promise;this._addListeners(),this._attachDragImage(e,t),this._promise=new Promise((e=>{this._resolve=e}));let r=new PointerEvent("pointermove",{bubbles:!0,cancelable:!0,clientX:e,clientY:t});return document.dispatchEvent(r),this._promise}handleEvent(e){switch(e.type){case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"keydown":this._evtKeyDown(e);break;default:e.preventDefault(),e.stopPropagation()}}moveDragImage(e,t){this.dragImage&&(this.dragImage.style.transform=`translate(${e}px, ${t}px)`)}_evtPointerMove(e){e.preventDefault(),e.stopPropagation(),this._updateCurrentTarget(e),this._updateDragScroll(e),this.moveDragImage(e.clientX,e.clientY)}_evtPointerUp(e){if(e.preventDefault(),e.stopPropagation(),0!==e.button)return;if(this._updateCurrentTarget(e),!this._currentTarget)return void this._finalize("none");if("none"===this._dropAction)return F.dispatchDragLeave(this,this._currentTarget,null,e),void this._finalize("none");let t=F.dispatchDrop(this,this._currentTarget,e);this._finalize(t)}_evtKeyDown(e){e.preventDefault(),e.stopPropagation(),27===e.keyCode&&this.dispose()}_addListeners(){document.addEventListener("pointerdown",this,!0),document.addEventListener("pointermove",this,!0),document.addEventListener("pointerup",this,!0),document.addEventListener("pointerenter",this,!0),document.addEventListener("pointerleave",this,!0),document.addEventListener("pointerover",this,!0),document.addEventListener("pointerout",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("keyup",this,!0),document.addEventListener("keypress",this,!0),document.addEventListener("contextmenu",this,!0)}_removeListeners(){document.removeEventListener("pointerdown",this,!0),document.removeEventListener("pointermove",this,!0),document.removeEventListener("pointerup",this,!0),document.removeEventListener("pointerenter",this,!0),document.removeEventListener("pointerleave",this,!0),document.removeEventListener("pointerover",this,!0),document.removeEventListener("pointerout",this,!0),document.removeEventListener("keydown",this,!0),document.removeEventListener("keyup",this,!0),document.removeEventListener("keypress",this,!0),document.removeEventListener("contextmenu",this,!0)}_updateDragScroll(e){let t=F.findScrollTarget(e);!this._scrollTarget&&!t||(this._scrollTarget||setTimeout(this._onScrollFrame,500),this._scrollTarget=t)}_updateCurrentTarget(e){let t=this._currentTarget,r=this._currentTarget,n=this._currentElement,i=F.findElementBehindBackdrop(e,this.document);this._currentElement=i,i!==n&&i!==r&&F.dispatchDragExit(this,r,i,e),i!==n&&i!==r&&(r=F.dispatchDragEnter(this,i,r,e)),r!==t&&(this._currentTarget=r,F.dispatchDragLeave(this,t,r,e));let a=F.dispatchDragOver(this,r,e);this._setDropAction(a)}_attachDragImage(e,t){if(!this.dragImage)return;this.dragImage.classList.add("lm-mod-drag-image");let r=this.dragImage.style;r.pointerEvents="none",r.position="fixed",r.transform=`translate(${e}px, ${t}px)`,(this.document instanceof Document?this.document.body:this.document.firstElementChild).appendChild(this.dragImage)}_detachDragImage(){if(!this.dragImage)return;let e=this.dragImage.parentNode;e&&e.removeChild(this.dragImage)}_setDropAction(t){if(t=F.validateAction(t,this.supportedActions),!this._override||this._dropAction!==t)switch(t){case"none":this._dropAction=t,this._override=e.overrideCursor("no-drop",this.document);break;case"copy":this._dropAction=t,this._override=e.overrideCursor("copy",this.document);break;case"link":this._dropAction=t,this._override=e.overrideCursor("alias",this.document);break;case"move":this._dropAction=t,this._override=e.overrideCursor("move",this.document)}}_finalize(e){let t=this._resolve;this._removeListeners(),this._detachDragImage(),this._override&&(this._override.dispose(),this._override=null),this.mimeData.clear(),this._disposed=!0,this._dropAction="none",this._currentTarget=null,this._currentElement=null,this._scrollTarget=null,this._promise=null,this._resolve=null,t&&t(e)}};!function(e){class t extends DragEvent{constructor(e,t){super(t.type,{bubbles:!0,cancelable:!0,altKey:e.altKey,button:e.button,clientX:e.clientX,clientY:e.clientY,ctrlKey:e.ctrlKey,detail:0,metaKey:e.metaKey,relatedTarget:t.related,screenX:e.screenX,screenY:e.screenY,shiftKey:e.shiftKey,view:window});let{drag:r}=t;this.dropAction="none",this.mimeData=r.mimeData,this.proposedAction=r.proposedAction,this.supportedActions=r.supportedActions,this.source=r.source}}e.Event=t,e.overrideCursor=function(e,t=document){return F.overrideCursor(e,t)}}(B||(B={})),function(e){function t(t,i=document){if(t){if(r&&t==r.event)return r.element;e.cursorBackdrop.style.zIndex="-1000";let n=i.elementFromPoint(t.clientX,t.clientY);return e.cursorBackdrop.style.zIndex="",r={event:t,element:n},n}{let t=e.cursorBackdrop.style.transform;if(n&&t===n.transform)return n.element;let r=e.cursorBackdrop.getBoundingClientRect();e.cursorBackdrop.style.zIndex="-1000";let a=i.elementFromPoint(r.left+r.width/2,r.top+r.height/2);return e.cursorBackdrop.style.zIndex="",n={transform:t,element:a},a}}e.SCROLL_EDGE_SIZE=20,e.validateAction=function(e,t){return i[e]&a[t]?e:"none"},e.findElementBehindBackdrop=t;let r=null,n=null;e.findScrollTarget=function(r){let n=r.clientX,i=r.clientY,a=t(r);for(;a;a=a.parentElement){if(!a.hasAttribute("data-lm-dragscroll"))continue;let t=0,r=0;a===document.body&&(t=window.pageXOffset,r=window.pageYOffset);let o=a.getBoundingClientRect(),s=o.top+r,l=o.left+t,c=l+o.width,u=s+o.height;if(n=c||i=u)continue;let h,f=n-l+1,p=i-s+1,d=c-n,m=u-i,g=Math.min(f,p,d,m);if(g>e.SCROLL_EDGE_SIZE)continue;switch(g){case m:h="bottom";break;case p:h="top";break;case d:h="right";break;case f:h="left";break;default:throw"unreachable"}let y,v=a.scrollWidth-a.clientWidth,x=a.scrollHeight-a.clientHeight;switch(h){case"top":y=x>0&&a.scrollTop>0;break;case"left":y=v>0&&a.scrollLeft>0;break;case"right":y=v>0&&a.scrollLeft0&&a.scrollTop{n===u&&e.cursorBackdrop.isConnected&&(document.removeEventListener("pointermove",o,!0),e.cursorBackdrop.removeEventListener("scroll",s,!0),i.removeChild(e.cursorBackdrop))}))};let c=500,u=0;e.cursorBackdrop=function(){let e=document.createElement("div");return e.classList.add("lm-cursor-backdrop"),e}()}(F||(F={}));var j=y(v()),N=y(x());function U(){return q.keyboardLayout}var V=class e{constructor(t,r,n=[]){this.name=t,this._codes=r,this._keys=e.extractKeys(r),this._modifierKeys=e.convertToKeySet(n)}keys(){return Object.keys(this._keys)}isValidKey(e){return e in this._keys}isModifierKey(e){return e in this._modifierKeys}keyForKeydownEvent(e){return this._codes[e.keyCode]||""}};!function(e){e.extractKeys=function(e){let t=Object.create(null);for(let r in e)t[e[r]]=!0;return t},e.convertToKeySet=function(e){let t=Object(null);for(let r=0,n=e.length;r{this._commands.delete(e),this._commandChanged.emit({id:e,type:"removed"})}))}notifyCommandChanged(e){if(void 0!==e&&!this._commands.has(e))throw new Error(`Command '${e}' is not registered.`);this._commandChanged.emit({id:e,type:e?"changed":"many-changed"})}describedBy(e,t=N.JSONExt.emptyObject){var r;let n=this._commands.get(e);return Promise.resolve(null!==(r=n?.describedBy.call(void 0,t))&&void 0!==r?r:{args:null})}label(e,t=N.JSONExt.emptyObject){var r;let n=this._commands.get(e);return null!==(r=n?.label.call(void 0,t))&&void 0!==r?r:""}mnemonic(e,t=N.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.mnemonic.call(void 0,t):-1}icon(e,t=N.JSONExt.emptyObject){var r;return null===(r=this._commands.get(e))||void 0===r?void 0:r.icon.call(void 0,t)}iconClass(e,t=N.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.iconClass.call(void 0,t):""}iconLabel(e,t=N.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.iconLabel.call(void 0,t):""}caption(e,t=N.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.caption.call(void 0,t):""}usage(e,t=N.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.usage.call(void 0,t):""}className(e,t=N.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.className.call(void 0,t):""}dataset(e,t=N.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.dataset.call(void 0,t):{}}isEnabled(e,t=N.JSONExt.emptyObject){let r=this._commands.get(e);return!!r&&r.isEnabled.call(void 0,t)}isToggled(e,t=N.JSONExt.emptyObject){let r=this._commands.get(e);return!!r&&r.isToggled.call(void 0,t)}isToggleable(e,t=N.JSONExt.emptyObject){let r=this._commands.get(e);return!!r&&r.isToggleable}isVisible(e,t=N.JSONExt.emptyObject){let r=this._commands.get(e);return!!r&&r.isVisible.call(void 0,t)}execute(e,t=N.JSONExt.emptyObject){let r,n=this._commands.get(e);if(!n)return Promise.reject(new Error(`Command '${e}' not registered.`));try{r=n.execute.call(void 0,t)}catch(e){r=Promise.reject(e)}let i=Promise.resolve(r);return this._commandExecuted.emit({id:e,args:t,result:i}),i}addKeyBinding(e){let t=G.createKeyBinding(e);return this._keyBindings.push(t),this._keyBindingChanged.emit({binding:t,type:"added"}),new D((()=>{j.ArrayExt.removeFirstOf(this._keyBindings,t),this._keyBindingChanged.emit({binding:t,type:"removed"})}))}processKeydownEvent(t){if(t.defaultPrevented||this._replaying)return;let r=e.keystrokeForKeydownEvent(t);if(!r)return this._replayKeydownEvents(),void this._clearPendingState();if(e.isModifierKeyPressed(t)){let{exact:e}=G.matchKeyBinding(this._keyBindings,[r],t);return void(e?(t.preventDefault(),t.stopPropagation(),this._startModifierTimer(e)):this._clearModifierTimer())}this._keystrokes.push(r);let{exact:n,partial:i}=G.matchKeyBinding(this._keyBindings,this._keystrokes,t),a=0!==i.length;return n||a?((n?.preventDefault||i.some((e=>e.preventDefault)))&&(t.preventDefault(),t.stopPropagation()),this._keydownEvents.push(t),n&&!a?(this._executeKeyBinding(n),void this._clearPendingState()):(n&&(this._exactKeyMatch=n),void this._startTimer())):(this._replayKeydownEvents(),void this._clearPendingState())}holdKeyBindingExecution(e,t){this._holdKeyBindingPromises.set(e,t)}processKeyupEvent(e){this._clearModifierTimer()}_startModifierTimer(e){this._clearModifierTimer(),this._timerModifierID=window.setTimeout((()=>{this._executeKeyBinding(e)}),G.modifierkeyTimeOut)}_clearModifierTimer(){0!==this._timerModifierID&&(clearTimeout(this._timerModifierID),this._timerModifierID=0)}_startTimer(){this._clearTimer(),this._timerID=window.setTimeout((()=>{this._onPendingTimeout()}),G.CHORD_TIMEOUT)}_clearTimer(){0!==this._timerID&&(clearTimeout(this._timerID),this._timerID=0)}_replayKeydownEvents(){0!==this._keydownEvents.length&&(this._replaying=!0,this._keydownEvents.forEach(G.replayKeyEvent),this._replaying=!1)}async _executeKeyBinding(e){if(0!==this._holdKeyBindingPromises.size){let e=[...this._keydownEvents],t=(await Promise.race([Promise.all(e.map((async e=>{var t;return null!==(t=this._holdKeyBindingPromises.get(e))&&void 0!==t?t:Promise.resolve(!0)}))),new Promise((e=>{setTimeout((()=>e([!1])),G.KEYBINDING_HOLD_TIMEOUT)}))])).every(Boolean);if(this._holdKeyBindingPromises.clear(),!t)return}let{command:t,args:r}=e,n={_luminoEvent:{type:"keybinding",keys:e.keys},...r};if(this.hasCommand(t)&&this.isEnabled(t,n))await this.execute(t,n);else{let r=this.hasCommand(t)?"enabled":"registered",n=`Cannot execute key binding '${e.keys.join(", ")}':`,i=`command '${t}' is not ${r}.`;console.warn(`${n} ${i}`)}}_clearPendingState(){this._clearTimer(),this._clearModifierTimer(),this._exactKeyMatch=null,this._keystrokes.length=0,this._keydownEvents.length=0}_onPendingTimeout(){this._timerID=0,this._exactKeyMatch?this._executeKeyBinding(this._exactKeyMatch):this._replayKeydownEvents(),this._clearPendingState()}};!function(e){function t(e){let t="",r=!1,n=!1,i=!1,o=!1;for(let s of e.split(/\s+/))"Accel"===s?a.IS_MAC?n=!0:i=!0:"Alt"===s?r=!0:"Cmd"===s?n=!0:"Ctrl"===s?i=!0:"Shift"===s?o=!0:s.length>0&&(t=s);return{cmd:n,ctrl:i,alt:r,shift:o,key:t}}function r(e){let r="",n=t(e);return n.ctrl&&(r+="Ctrl "),n.alt&&(r+="Alt "),n.shift&&(r+="Shift "),n.cmd&&a.IS_MAC&&(r+="Cmd "),n.key?r+n.key:r.trim()}e.parseKeystroke=t,e.normalizeKeystroke=r,e.normalizeKeys=function(e){let t;return t=a.IS_WIN?e.winKeys||e.keys:a.IS_MAC?e.macKeys||e.keys:e.linuxKeys||e.keys,t.map(r)},e.formatKeystroke=function(e){return"string"==typeof e?r(e):e.map(r).join(", ");function r(e){let r=[],n=a.IS_MAC?" ":"+",i=t(e);return i.ctrl&&r.push("Ctrl"),i.alt&&r.push("Alt"),i.shift&&r.push("Shift"),a.IS_MAC&&i.cmd&&r.push("Cmd"),r.push(i.key),r.map(G.formatKey).join(n)}},e.isModifierKeyPressed=function(e){let t=U(),r=t.keyForKeydownEvent(e);return t.isModifierKey(r)},e.keystrokeForKeydownEvent=function(e){let t=U(),r=t.keyForKeydownEvent(e),n=[];return e.ctrlKey&&n.push("Ctrl"),e.altKey&&n.push("Alt"),e.shiftKey&&n.push("Shift"),e.metaKey&&a.IS_MAC&&n.push("Cmd"),t.isModifierKey(r)||n.push(r),n.join(" ")}}(W||(W={})),function(e){e.CHORD_TIMEOUT=1e3,e.KEYBINDING_HOLD_TIMEOUT=1e3,e.modifierkeyTimeOut=500,e.createCommand=function(e){return{execute:e.execute,describedBy:h("function"==typeof e.describedBy?e.describedBy:{args:null,...e.describedBy},(()=>({args:null}))),label:h(e.label,n),mnemonic:h(e.mnemonic,i),icon:h(e.icon,u),iconClass:h(e.iconClass,n),iconLabel:h(e.iconLabel,n),caption:h(e.caption,n),usage:h(e.usage,n),className:h(e.className,n),dataset:h(e.dataset,c),isEnabled:e.isEnabled||s,isToggled:e.isToggled||l,isToggleable:e.isToggleable||!!e.isToggled,isVisible:e.isVisible||s}},e.createKeyBinding=function(e){var t;return{keys:W.normalizeKeys(e),selector:f(e),command:e.command,args:e.args||N.JSONExt.emptyObject,preventDefault:null===(t=e.preventDefault)||void 0===t||t}},e.matchKeyBinding=function(e,t,r){let n=null,i=[],a=1/0,s=0;for(let l=0,c=e.length;la)continue;let f=o.calculateSpecificity(c.selector);(!n||h=s)&&(n=c,a=h,s=f)}return{exact:n,partial:i}},e.replayKeyEvent=function(e){e.target.dispatchEvent(function(e){let t=document.createEvent("Event"),r=e.bubbles||!0,n=e.cancelable||!0;return t.initEvent(e.type||"keydown",r,n),t.key=e.key||"",t.keyCode=e.keyCode||0,t.which=e.keyCode||0,t.ctrlKey=e.ctrlKey||!1,t.altKey=e.altKey||!1,t.shiftKey=e.shiftKey||!1,t.metaKey=e.metaKey||!1,t.view=e.view||window,t}(e))},e.formatKey=function(e){return a.IS_MAC?t.hasOwnProperty(e)?t[e]:e:r.hasOwnProperty(e)?r[e]:e};let t={Backspace:"⌫",Tab:"⇥",Enter:"⏎",Shift:"⇧",Ctrl:"⌃",Alt:"⌥",Escape:"⎋",PageUp:"⇞",PageDown:"⇟",End:"↘",Home:"↖",ArrowLeft:"←",ArrowUp:"↑",ArrowRight:"→",ArrowDown:"↓",Delete:"⌦",Cmd:"⌘"},r={Escape:"Esc",PageUp:"Page Up",PageDown:"Page Down",ArrowLeft:"Left",ArrowUp:"Up",ArrowRight:"Right",ArrowDown:"Down",Delete:"Del"},n=()=>"",i=()=>-1,s=()=>!0,l=()=>!1,c=()=>({}),u=()=>{};function h(e,t){return void 0===e?t:"function"==typeof e?e:()=>e}function f(e){if(-1!==e.selector.indexOf(","))throw new Error(`Selector cannot contain commas: ${e.selector}`);if(!o.isValid(e.selector))throw new Error(`Invalid selector: ${e.selector}`);return e.selector}function p(e,t){if(e.lengtht.length?2:1}function d(e,t){let r=t.target,n=t.currentTarget;for(let t=0;null!==r;r=r.parentElement,++t){if(r.hasAttribute("data-lm-suppress-shortcuts"))return-1;if(o.matches(r,e))return t;if(r===n)return-1}return-1}}(G||(G={}));var Z,Y,X=y(v()),$=class{constructor(e){this.type="text",this.content=e}},K=class{constructor(e,t,r,n){this.type="element",this.tag=e,this.attrs=t,this.children=r,this.renderer=n}};function J(e){let t,r={},n=[];for(let e=1,a=arguments.length;e=n;--a){let n=t[a],o=i?e.lastChild:e.childNodes[a];"text"===n.type||(n.renderer&&n.renderer.unrender?n.renderer.unrender(o,{attrs:n.attrs,children:n.children}):r(o,n.children,0,!1)),i&&e.removeChild(o)}}e.hostMap=new WeakMap,e.asContentArray=function(e){return e?e instanceof Array?e:[e]:[]},e.createDOMNode=t,e.updateContent=function e(n,a,o){if(a===o)return;let s=function(e,t){let r=e.firstChild,n=Object.create(null);for(let e of t)"element"===e.type&&e.attrs.key&&(n[e.attrs.key]={vNode:e,element:r}),r=r.nextSibling;return n}(n,a),l=a.slice(),c=n.firstChild,u=o.length;for(let r=0;r=l.length){t(o[r],n);continue}let a=l[r],u=o[r];if(a===u){c=c.nextSibling;continue}if("text"===a.type&&"text"===u.type){c.textContent!==u.content&&(c.textContent=u.content),c=c.nextSibling;continue}if("text"===a.type||"text"===u.type){X.ArrayExt.insert(l,r,u),t(u,n,c);continue}if(!a.renderer!=!u.renderer){X.ArrayExt.insert(l,r,u),t(u,n,c);continue}let h=u.attrs.key;if(h&&h in s){let e=s[h];e.vNode!==a&&(X.ArrayExt.move(l,l.indexOf(e.vNode,r+1),r),n.insertBefore(e.element,c),a=e.vNode,c=e.element)}if(a===u){c=c.nextSibling;continue}let f=a.attrs.key;f&&f!==h?(X.ArrayExt.insert(l,r,u),t(u,n,c)):a.tag===u.tag?(i(c,a.attrs,u.attrs),u.renderer?u.renderer.render(c,{attrs:u.attrs,children:u.children}):e(c,a.children,u.children),c=c.nextSibling):(X.ArrayExt.insert(l,r,u),t(u,n,c))}r(n,l,u,!0)};let n={key:!0,className:!0,htmlFor:!0,dataset:!0,style:!0};function i(e,t,r){if(t===r)return;let i;for(i in t)i in n||i in r||("on"===i.substr(0,2)?e[i]=null:e.removeAttribute(i));for(i in r)i in n||t[i]===r[i]||("on"===i.substr(0,2)?e[i]=r[i]:e.setAttribute(i,r[i]));t.className!==r.className&&(void 0!==r.className?e.setAttribute("class",r.className):e.removeAttribute("class")),t.htmlFor!==r.htmlFor&&(void 0!==r.htmlFor?e.setAttribute("for",r.htmlFor):e.removeAttribute("for")),t.dataset!==r.dataset&&function(e,t,r){for(let n in t)n in r||e.removeAttribute(`data-${n}`);for(let n in r)t[n]!==r[n]&&e.setAttribute(`data-${n}`,r[n])}(e,t.dataset||{},r.dataset||{}),t.style!==r.style&&function(e,t,r){let n,i=e.style;for(n in t)n in r||(i[n]="");for(n in r)t[n]!==r[n]&&(i[n]=r[n])}(e,t.style||{},r.style||{})}}(Y||(Y={}));var Q,ee=class{constructor(){this.sizeHint=0,this.minSize=0,this.maxSize=1/0,this.stretch=1,this.size=0,this.done=!1}};!function(e){e.calc=function(e,t){let r=e.length;if(0===r)return t;let n=0,i=0,a=0,o=0,s=0;for(let t=0;t0&&(o+=r.stretch,s++)}if(t===a)return 0;if(t<=n){for(let t=0;t=i){for(let t=0;t0&&n>l;){let t=n,i=o;for(let a=0;a0&&n>l;){let t=n/c;for(let i=0;i0&&n>l;){let t=n,i=o;for(let a=0;a=r.maxSize?(n-=r.maxSize-r.size,o-=r.stretch,r.size=r.maxSize,r.done=!0,c--,s--):(n-=l,r.size+=l)}}for(;c>0&&n>l;){let t=n/c;for(let i=0;i=r.maxSize?(n-=r.maxSize-r.size,r.size=r.maxSize,r.done=!0,c--):(n-=t,r.size+=t))}}}return 0},e.adjust=function(e,t,r){0===e.length||0===r||(r>0?function(e,t,r){let n=0;for(let r=0;r<=t;++r){let t=e[r];n+=t.maxSize-t.size}let i=0;for(let r=t+1,n=e.length;r=0&&a>0;--r){let t=e[r],n=t.maxSize-t.size;n>=a?(t.sizeHint=t.size+a,a=0):(t.sizeHint=t.size+n,a-=n)}let o=r;for(let r=t+1,n=e.length;r0;++r){let t=e[r],n=t.size-t.minSize;n>=o?(t.sizeHint=t.size-o,o=0):(t.sizeHint=t.size-n,o-=n)}}(e,t,r):function(e,t,r){let n=0;for(let r=t+1,i=e.length;r0;++r){let t=e[r],n=t.maxSize-t.size;n>=a?(t.sizeHint=t.size+a,a=0):(t.sizeHint=t.size+n,a-=n)}let o=r;for(let r=t;r>=0&&o>0;--r){let t=e[r],n=t.size-t.minSize;n>=o?(t.sizeHint=t.size-o,o=0):(t.sizeHint=t.size-n,o-=n)}}(e,t,-r))}}(Q||(Q={}));var te,re=class{constructor(e){this._label="",this._caption="",this._mnemonic=-1,this._icon=void 0,this._iconClass="",this._iconLabel="",this._className="",this._closable=!1,this._changed=new z(this),this._isDisposed=!1,this.owner=e.owner,void 0!==e.label&&(this._label=e.label),void 0!==e.mnemonic&&(this._mnemonic=e.mnemonic),void 0!==e.icon&&(this._icon=e.icon),void 0!==e.iconClass&&(this._iconClass=e.iconClass),void 0!==e.iconLabel&&(this._iconLabel=e.iconLabel),void 0!==e.caption&&(this._caption=e.caption),void 0!==e.className&&(this._className=e.className),void 0!==e.closable&&(this._closable=e.closable),this._dataset=e.dataset||{}}get changed(){return this._changed}get label(){return this._label}set label(e){this._label!==e&&(this._label=e,this._changed.emit(void 0))}get mnemonic(){return this._mnemonic}set mnemonic(e){this._mnemonic!==e&&(this._mnemonic=e,this._changed.emit(void 0))}get icon(){return this._icon}set icon(e){this._icon!==e&&(this._icon=e,this._changed.emit(void 0))}get iconClass(){return this._iconClass}set iconClass(e){this._iconClass!==e&&(this._iconClass=e,this._changed.emit(void 0))}get iconLabel(){return this._iconLabel}set iconLabel(e){this._iconLabel!==e&&(this._iconLabel=e,this._changed.emit(void 0))}get caption(){return this._caption}set caption(e){this._caption!==e&&(this._caption=e,this._changed.emit(void 0))}get className(){return this._className}set className(e){this._className!==e&&(this._className=e,this._changed.emit(void 0))}get closable(){return this._closable}set closable(e){this._closable!==e&&(this._closable=e,this._changed.emit(void 0))}get dataset(){return this._dataset}set dataset(e){this._dataset!==e&&(this._dataset=e,this._changed.emit(void 0))}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,z.clearData(this))}},ne=class e{constructor(t={}){this._flags=0,this._layout=null,this._parent=null,this._disposed=new z(this),this._hiddenMode=e.HiddenMode.Display,this.node=te.createNode(t),this.addClass("lm-Widget")}dispose(){this.isDisposed||(this.setFlag(e.Flag.IsDisposed),this._disposed.emit(void 0),this.parent?this.parent=null:this.isAttached&&e.detach(this),this._layout&&(this._layout.dispose(),this._layout=null),this.title.dispose(),z.clearData(this),M.clearData(this),I.clearData(this))}get disposed(){return this._disposed}get isDisposed(){return this.testFlag(e.Flag.IsDisposed)}get isAttached(){return this.testFlag(e.Flag.IsAttached)}get isHidden(){return this.testFlag(e.Flag.IsHidden)}get isVisible(){return this.testFlag(e.Flag.IsVisible)}get title(){return te.titleProperty.get(this)}get id(){return this.node.id}set id(e){this.node.id=e}get dataset(){return this.node.dataset}get hiddenMode(){return this._hiddenMode}set hiddenMode(t){this._hiddenMode!==t&&(this.isHidden&&this._toggleHidden(!1),t==e.HiddenMode.Scale?this.node.style.willChange="transform":this.node.style.willChange="auto",this._hiddenMode=t,this.isHidden&&this._toggleHidden(!0))}get parent(){return this._parent}set parent(t){if(this._parent!==t){if(t&&this.contains(t))throw new Error("Invalid parent widget.");if(this._parent&&!this._parent.isDisposed){let t=new e.ChildMessage("child-removed",this);M.sendMessage(this._parent,t)}if(this._parent=t,this._parent&&!this._parent.isDisposed){let t=new e.ChildMessage("child-added",this);M.sendMessage(this._parent,t)}this.isDisposed||M.sendMessage(this,e.Msg.ParentChanged)}}get layout(){return this._layout}set layout(t){if(this._layout!==t){if(this.testFlag(e.Flag.DisallowLayout))throw new Error("Cannot set widget layout.");if(this._layout)throw new Error("Cannot change widget layout.");if(t.parent)throw new Error("Cannot change layout parent.");this._layout=t,t.parent=this}}*children(){this._layout&&(yield*this._layout)}contains(e){for(let t=e;t;t=t._parent)if(t===this)return!0;return!1}hasClass(e){return this.node.classList.contains(e)}addClass(e){this.node.classList.add(e)}removeClass(e){this.node.classList.remove(e)}toggleClass(e,t){return!0===t?(this.node.classList.add(e),!0):!1===t?(this.node.classList.remove(e),!1):this.node.classList.toggle(e)}update(){M.postMessage(this,e.Msg.UpdateRequest)}fit(){M.postMessage(this,e.Msg.FitRequest)}activate(){M.postMessage(this,e.Msg.ActivateRequest)}close(){M.sendMessage(this,e.Msg.CloseRequest)}show(){if(this.testFlag(e.Flag.IsHidden)&&(this.isAttached&&(!this.parent||this.parent.isVisible)&&M.sendMessage(this,e.Msg.BeforeShow),this.clearFlag(e.Flag.IsHidden),this._toggleHidden(!1),this.isAttached&&(!this.parent||this.parent.isVisible)&&M.sendMessage(this,e.Msg.AfterShow),this.parent)){let t=new e.ChildMessage("child-shown",this);M.sendMessage(this.parent,t)}}hide(){if(!this.testFlag(e.Flag.IsHidden)&&(this.isAttached&&(!this.parent||this.parent.isVisible)&&M.sendMessage(this,e.Msg.BeforeHide),this.setFlag(e.Flag.IsHidden),this._toggleHidden(!0),this.isAttached&&(!this.parent||this.parent.isVisible)&&M.sendMessage(this,e.Msg.AfterHide),this.parent)){let t=new e.ChildMessage("child-hidden",this);M.sendMessage(this.parent,t)}}setHidden(e){e?this.hide():this.show()}testFlag(e){return!!(this._flags&e)}setFlag(e){this._flags|=e}clearFlag(e){this._flags&=~e}processMessage(t){switch(t.type){case"resize":this.notifyLayout(t),this.onResize(t);break;case"update-request":this.notifyLayout(t),this.onUpdateRequest(t);break;case"fit-request":this.notifyLayout(t),this.onFitRequest(t);break;case"before-show":this.notifyLayout(t),this.onBeforeShow(t);break;case"after-show":this.setFlag(e.Flag.IsVisible),this.notifyLayout(t),this.onAfterShow(t);break;case"before-hide":this.notifyLayout(t),this.onBeforeHide(t);break;case"after-hide":this.clearFlag(e.Flag.IsVisible),this.notifyLayout(t),this.onAfterHide(t);break;case"before-attach":this.notifyLayout(t),this.onBeforeAttach(t);break;case"after-attach":!this.isHidden&&(!this.parent||this.parent.isVisible)&&this.setFlag(e.Flag.IsVisible),this.setFlag(e.Flag.IsAttached),this.notifyLayout(t),this.onAfterAttach(t);break;case"before-detach":this.notifyLayout(t),this.onBeforeDetach(t);break;case"after-detach":this.clearFlag(e.Flag.IsVisible),this.clearFlag(e.Flag.IsAttached),this.notifyLayout(t),this.onAfterDetach(t);break;case"activate-request":this.notifyLayout(t),this.onActivateRequest(t);break;case"close-request":this.notifyLayout(t),this.onCloseRequest(t);break;case"child-added":this.notifyLayout(t),this.onChildAdded(t);break;case"child-removed":this.notifyLayout(t),this.onChildRemoved(t);break;default:this.notifyLayout(t)}}notifyLayout(e){this._layout&&this._layout.processParentMessage(e)}onCloseRequest(t){this.parent?this.parent=null:this.isAttached&&e.detach(this)}onResize(e){}onUpdateRequest(e){}onFitRequest(e){}onActivateRequest(e){}onBeforeShow(e){}onAfterShow(e){}onBeforeHide(e){}onAfterHide(e){}onBeforeAttach(e){}onAfterAttach(e){}onBeforeDetach(e){}onAfterDetach(e){}onChildAdded(e){}onChildRemoved(e){}_toggleHidden(t){if(t)switch(this._hiddenMode){case e.HiddenMode.Display:this.addClass("lm-mod-hidden");break;case e.HiddenMode.Scale:this.node.style.transform="scale(0)",this.node.setAttribute("aria-hidden","true");break;case e.HiddenMode.ContentVisibility:this.node.style.contentVisibility="hidden",this.node.style.zIndex="-1"}else switch(this._hiddenMode){case e.HiddenMode.Display:this.removeClass("lm-mod-hidden");break;case e.HiddenMode.Scale:this.node.style.transform="",this.node.removeAttribute("aria-hidden");break;case e.HiddenMode.ContentVisibility:this.node.style.contentVisibility="",this.node.style.zIndex=""}}};!function(e){var t;(t=e.HiddenMode||(e.HiddenMode={}))[t.Display=0]="Display",t[t.Scale=1]="Scale",t[t.ContentVisibility=2]="ContentVisibility",function(e){e[e.IsDisposed=1]="IsDisposed",e[e.IsAttached=2]="IsAttached",e[e.IsHidden=4]="IsHidden",e[e.IsVisible=8]="IsVisible",e[e.DisallowLayout=16]="DisallowLayout"}(e.Flag||(e.Flag={})),function(e){e.BeforeShow=new S("before-show"),e.AfterShow=new S("after-show"),e.BeforeHide=new S("before-hide"),e.AfterHide=new S("after-hide"),e.BeforeAttach=new S("before-attach"),e.AfterAttach=new S("after-attach"),e.BeforeDetach=new S("before-detach"),e.AfterDetach=new S("after-detach"),e.ParentChanged=new S("parent-changed"),e.UpdateRequest=new E("update-request"),e.FitRequest=new E("fit-request"),e.ActivateRequest=new E("activate-request"),e.CloseRequest=new E("close-request")}(e.Msg||(e.Msg={})),e.ChildMessage=class extends S{constructor(e,t){super(e),this.child=t}};class r extends S{constructor(e,t){super("resize"),this.width=e,this.height=t}}e.ResizeMessage=r,function(e){e.UnknownSize=new e(-1,-1)}(r=e.ResizeMessage||(e.ResizeMessage={})),e.attach=function(t,r,n=null){if(t.parent)throw new Error("Cannot attach a child widget.");if(t.isAttached||t.node.isConnected)throw new Error("Widget is already attached.");if(!r.isConnected)throw new Error("Host is not attached.");M.sendMessage(t,e.Msg.BeforeAttach),r.insertBefore(t.node,n),M.sendMessage(t,e.Msg.AfterAttach)},e.detach=function(t){if(t.parent)throw new Error("Cannot detach a child widget.");if(!t.isAttached||!t.node.isConnected)throw new Error("Widget is not attached.");M.sendMessage(t,e.Msg.BeforeDetach),t.node.parentNode.removeChild(t.node),M.sendMessage(t,e.Msg.AfterDetach)}}(ne||(ne={})),function(e){e.titleProperty=new I({name:"title",create:e=>new re({owner:e})}),e.createNode=function(e){return e.node||document.createElement(e.tag||"div")}}(te||(te={}));var ie=class{constructor(e={}){this._disposed=!1,this._parent=null,this._fitPolicy=e.fitPolicy||"set-min-size"}dispose(){this._parent=null,this._disposed=!0,z.clearData(this),I.clearData(this)}get isDisposed(){return this._disposed}get parent(){return this._parent}set parent(e){if(this._parent!==e){if(this._parent)throw new Error("Cannot change parent widget.");if(e.layout!==this)throw new Error("Invalid parent widget.");this._parent=e,this.init()}}get fitPolicy(){return this._fitPolicy}set fitPolicy(e){if(this._fitPolicy!==e&&(this._fitPolicy=e,this._parent)){let e=this._parent.node.style;e.minWidth="",e.minHeight="",e.maxWidth="",e.maxHeight="",this._parent.fit()}}processParentMessage(e){switch(e.type){case"resize":this.onResize(e);break;case"update-request":this.onUpdateRequest(e);break;case"fit-request":this.onFitRequest(e);break;case"before-show":this.onBeforeShow(e);break;case"after-show":this.onAfterShow(e);break;case"before-hide":this.onBeforeHide(e);break;case"after-hide":this.onAfterHide(e);break;case"before-attach":this.onBeforeAttach(e);break;case"after-attach":this.onAfterAttach(e);break;case"before-detach":this.onBeforeDetach(e);break;case"after-detach":this.onAfterDetach(e);break;case"child-removed":this.onChildRemoved(e);break;case"child-shown":this.onChildShown(e);break;case"child-hidden":this.onChildHidden(e)}}init(){for(let e of this)e.parent=this.parent}onResize(e){for(let e of this)M.sendMessage(e,ne.ResizeMessage.UnknownSize)}onUpdateRequest(e){for(let e of this)M.sendMessage(e,ne.ResizeMessage.UnknownSize)}onBeforeAttach(e){for(let t of this)M.sendMessage(t,e)}onAfterAttach(e){for(let t of this)M.sendMessage(t,e)}onBeforeDetach(e){for(let t of this)M.sendMessage(t,e)}onAfterDetach(e){for(let t of this)M.sendMessage(t,e)}onBeforeShow(e){for(let t of this)t.isHidden||M.sendMessage(t,e)}onAfterShow(e){for(let t of this)t.isHidden||M.sendMessage(t,e)}onBeforeHide(e){for(let t of this)t.isHidden||M.sendMessage(t,e)}onAfterHide(e){for(let t of this)t.isHidden||M.sendMessage(t,e)}onChildRemoved(e){this.removeWidget(e.child)}onFitRequest(e){}onChildShown(e){}onChildHidden(e){}};!function(e){e.getHorizontalAlignment=function(e){return ae.horizontalAlignmentProperty.get(e)},e.setHorizontalAlignment=function(e,t){ae.horizontalAlignmentProperty.set(e,t)},e.getVerticalAlignment=function(e){return ae.verticalAlignmentProperty.get(e)},e.setVerticalAlignment=function(e,t){ae.verticalAlignmentProperty.set(e,t)}}(ie||(ie={}));var ae,oe=class{constructor(e){this._top=NaN,this._left=NaN,this._width=NaN,this._height=NaN,this._minWidth=0,this._minHeight=0,this._maxWidth=1/0,this._maxHeight=1/0,this._disposed=!1,this.widget=e,this.widget.node.style.position="absolute",this.widget.node.style.contain="strict"}dispose(){if(this._disposed)return;this._disposed=!0;let e=this.widget.node.style;e.position="",e.top="",e.left="",e.width="",e.height="",e.contain=""}get minWidth(){return this._minWidth}get minHeight(){return this._minHeight}get maxWidth(){return this._maxWidth}get maxHeight(){return this._maxHeight}get isDisposed(){return this._disposed}get isHidden(){return this.widget.isHidden}get isVisible(){return this.widget.isVisible}get isAttached(){return this.widget.isAttached}fit(){let e=i.sizeLimits(this.widget.node);this._minWidth=e.minWidth,this._minHeight=e.minHeight,this._maxWidth=e.maxWidth,this._maxHeight=e.maxHeight}update(e,t,r,n){let i=Math.max(this._minWidth,Math.min(r,this._maxWidth)),a=Math.max(this._minHeight,Math.min(n,this._maxHeight));if(i"center",changed:t}),e.verticalAlignmentProperty=new I({name:"verticalAlignment",create:()=>"top",changed:t})}(ae||(ae={}));var se,le=class extends ie{constructor(){super(...arguments),this._widgets=[]}dispose(){for(;this._widgets.length>0;)this._widgets.pop().dispose();super.dispose()}get widgets(){return this._widgets}*[Symbol.iterator](){yield*this._widgets}addWidget(e){this.insertWidget(this._widgets.length,e)}insertWidget(e,t){t.parent=this.parent;let r=this._widgets.indexOf(t),n=Math.max(0,Math.min(e,this._widgets.length));if(-1===r)return b.ArrayExt.insert(this._widgets,n,t),void(this.parent&&this.attachWidget(n,t));n===this._widgets.length&&n--,r!==n&&(b.ArrayExt.move(this._widgets,r,n),this.parent&&this.moveWidget(r,n,t))}removeWidget(e){this.removeWidgetAt(this._widgets.indexOf(e))}removeWidgetAt(e){let t=b.ArrayExt.removeAt(this._widgets,e);t&&this.parent&&this.detachWidget(e,t)}init(){super.init();let e=0;for(let t of this)this.attachWidget(e++,t)}attachWidget(e,t){let r=this.parent.node.children[e];this.parent.isAttached&&M.sendMessage(t,ne.Msg.BeforeAttach),this.parent.node.insertBefore(t.node,r),this.parent.isAttached&&M.sendMessage(t,ne.Msg.AfterAttach)}moveWidget(e,t,r){this.parent.isAttached&&M.sendMessage(r,ne.Msg.BeforeDetach),this.parent.node.removeChild(r.node),this.parent.isAttached&&M.sendMessage(r,ne.Msg.AfterDetach);let n=this.parent.node.children[t];this.parent.isAttached&&M.sendMessage(r,ne.Msg.BeforeAttach),this.parent.node.insertBefore(r.node,n),this.parent.isAttached&&M.sendMessage(r,ne.Msg.AfterAttach)}detachWidget(e,t){this.parent.isAttached&&M.sendMessage(t,ne.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&M.sendMessage(t,ne.Msg.AfterDetach)}};!function(e){e.clampDimension=function(e){return Math.max(0,Math.floor(e))}}(se||(se={}));var ce,ue=se,he=class e extends le{constructor(e){super(),this.widgetOffset=0,this._fixed=0,this._spacing=4,this._dirty=!1,this._hasNormedSizes=!1,this._sizers=[],this._items=[],this._handles=[],this._box=null,this._alignment="start",this._orientation="horizontal",this.renderer=e.renderer,void 0!==e.orientation&&(this._orientation=e.orientation),void 0!==e.alignment&&(this._alignment=e.alignment),void 0!==e.spacing&&(this._spacing=se.clampDimension(e.spacing))}dispose(){for(let e of this._items)e.dispose();this._box=null,this._items.length=0,this._sizers.length=0,this._handles.length=0,super.dispose()}get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._orientation=e,this.parent&&(this.parent.dataset.orientation=e,this.parent.fit()))}get alignment(){return this._alignment}set alignment(e){this._alignment!==e&&(this._alignment=e,this.parent&&(this.parent.dataset.alignment=e,this.parent.update()))}get spacing(){return this._spacing}set spacing(e){e=se.clampDimension(e),this._spacing!==e&&(this._spacing=e,this.parent&&this.parent.fit())}get handles(){return this._handles}absoluteSizes(){return this._sizers.map((e=>e.size))}relativeSizes(){return ce.normalize(this._sizers.map((e=>e.size)))}setRelativeSizes(e,t=!0){let r=this._sizers.length,n=e.slice(0,r);for(;n.length0&&(e.sizeHint=e.size);Q.adjust(this._sizers,e,r),this.parent&&this.parent.update()}}init(){this.parent.dataset.orientation=this.orientation,this.parent.dataset.alignment=this.alignment,super.init()}attachWidget(e,t){let r=new oe(t),n=ce.createHandle(this.renderer),i=ce.averageSize(this._sizers),a=ce.createSizer(i);b.ArrayExt.insert(this._items,e,r),b.ArrayExt.insert(this._sizers,e,a),b.ArrayExt.insert(this._handles,e,n),this.parent.isAttached&&M.sendMessage(t,ne.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.node.appendChild(n),this.parent.isAttached&&M.sendMessage(t,ne.Msg.AfterAttach),this.parent.fit()}moveWidget(e,t,r){b.ArrayExt.move(this._items,e,t),b.ArrayExt.move(this._sizers,e,t),b.ArrayExt.move(this._handles,e,t),this.parent.fit()}detachWidget(e,t){let r=b.ArrayExt.removeAt(this._items,e),n=b.ArrayExt.removeAt(this._handles,e);b.ArrayExt.removeAt(this._sizers,e),this.parent.isAttached&&M.sendMessage(t,ne.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.node.removeChild(n),this.parent.isAttached&&M.sendMessage(t,ne.Msg.AfterDetach),r.dispose(),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}updateItemPosition(e,t,r,n,i,a,o){let s=this._items[e];if(s.isHidden)return;let l=this._handles[e].style;t?(r+=this.widgetOffset,s.update(r,n,o,i),r+=o,l.top=`${n}px`,l.left=`${r}px`,l.width=`${this._spacing}px`,l.height=`${i}px`):(n+=this.widgetOffset,s.update(r,n,a,o),n+=o,l.top=`${n}px`,l.left=`${r}px`,l.width=`${a}px`,l.height=`${this._spacing}px`)}_fit(){let t=0,r=-1;for(let e=0,n=this._items.length;e0&&(i.sizeHint=i.size),r.isHidden?(i.minSize=0,i.maxSize=0):(r.fit(),i.stretch=e.getStretch(r.widget),n?(i.minSize=r.minWidth,i.maxSize=r.maxWidth,a+=r.minWidth,o=Math.max(o,r.minHeight)):(i.minSize=r.minHeight,i.maxSize=r.maxHeight,o+=r.minHeight,a=Math.max(a,r.minWidth)))}let s=this._box=i.boxSizing(this.parent.node);a+=s.horizontalSum,o+=s.verticalSum;let l=this.parent.node.style;l.minWidth=`${a}px`,l.minHeight=`${o}px`,this._dirty=!0,this.parent.parent&&M.sendMessage(this.parent.parent,ne.Msg.FitRequest),this._dirty&&M.sendMessage(this.parent,ne.Msg.UpdateRequest)}_update(e,t){this._dirty=!1;let r=0;for(let e=0,t=this._items.length;e0){let e;if(e=u?Math.max(0,o-this._fixed):Math.max(0,s-this._fixed),this._hasNormedSizes){for(let t of this._sizers)t.sizeHint*=e;this._hasNormedSizes=!1}let t=Q.calc(this._sizers,e);if(t>0)switch(this._alignment){case"start":break;case"center":l=0,c=t/2;break;case"end":l=0,c=t;break;case"justify":l=t/r,c=0;break;default:throw"unreachable"}}for(let e=0,t=this._items.length;e0,coerce:(e,t)=>Math.max(0,Math.floor(t)),changed:function(e){e.parent&&e.parent.layout instanceof he&&e.parent.fit()}}),e.createSizer=function(e){let t=new ee;return t.sizeHint=Math.floor(e),t},e.createHandle=function(e){let t=e.createHandle();return t.style.position="absolute",t.style.contain="style",t},e.averageSize=function(e){return e.reduce(((e,t)=>e+t.size),0)/e.length||0},e.normalize=function(e){let t=e.length;if(0===t)return[];let r=e.reduce(((e,t)=>e+Math.abs(t)),0);return 0===r?e.map((e=>1/t)):e.map((e=>e/r))}}(ce||(ce={}));var fe,pe=class extends he{constructor(e){super({...e,orientation:e.orientation||"vertical"}),this._titles=[],this.titleSpace=e.titleSpace||22}get titleSpace(){return this.widgetOffset}set titleSpace(e){e=ue.clampDimension(e),this.widgetOffset!==e&&(this.widgetOffset=e,this.parent&&this.parent.fit())}get titles(){return this._titles}dispose(){this.isDisposed||(this._titles.length=0,super.dispose())}updateTitle(e,t){let r=this._titles[e],n=r.classList.contains("lm-mod-expanded"),i=fe.createTitle(this.renderer,t.title,n);this._titles[e]=i,this.parent.node.replaceChild(i,r)}insertWidget(e,t){t.id||(t.id=`id-${w.UUID.uuid4()}`),super.insertWidget(e,t)}attachWidget(e,t){let r=fe.createTitle(this.renderer,t.title);b.ArrayExt.insert(this._titles,e,r),this.parent.node.appendChild(r),t.node.setAttribute("role","region"),t.node.setAttribute("aria-labelledby",r.id),super.attachWidget(e,t)}moveWidget(e,t,r){b.ArrayExt.move(this._titles,e,t),super.moveWidget(e,t,r)}detachWidget(e,t){let r=b.ArrayExt.removeAt(this._titles,e);this.parent.node.removeChild(r),super.detachWidget(e,t)}updateItemPosition(e,t,r,n,i,a,o){let s=this._titles[e].style;s.top=`${n}px`,s.left=`${r}px`,s.height=`${this.widgetOffset}px`,s.width=t?`${i}px`:`${a}px`,super.updateItemPosition(e,t,r,n,i,a,o)}};!function(e){e.createTitle=function(e,t,r=!0){let n=e.createSectionTitle(t);return n.style.position="absolute",n.style.contain="strict",n.setAttribute("aria-label",`${t.label} Section`),n.setAttribute("aria-expanded",r?"true":"false"),n.setAttribute("aria-controls",t.owner.id),r&&n.classList.add("lm-mod-expanded"),n}}(fe||(fe={}));var de,me=class extends ne{constructor(e={}){super(),this.addClass("lm-Panel"),this.layout=de.createLayout(e)}get widgets(){return this.layout.widgets}addWidget(e){this.layout.addWidget(e)}insertWidget(e,t){this.layout.insertWidget(e,t)}};!function(e){e.createLayout=function(e){return e.layout||new le}}(de||(de={}));var ge,ye=class extends me{constructor(e={}){super({layout:ge.createLayout(e)}),this._handleMoved=new z(this),this._pressData=null,this.addClass("lm-SplitPanel")}dispose(){this._releaseMouse(),super.dispose()}get orientation(){return this.layout.orientation}set orientation(e){this.layout.orientation=e}get alignment(){return this.layout.alignment}set alignment(e){this.layout.alignment=e}get spacing(){return this.layout.spacing}set spacing(e){this.layout.spacing=e}get renderer(){return this.layout.renderer}get handleMoved(){return this._handleMoved}get handles(){return this.layout.handles}relativeSizes(){return this.layout.relativeSizes()}setRelativeSizes(e,t=!0){this.layout.setRelativeSizes(e,t)}handleEvent(e){switch(e.type){case"pointerdown":this._evtPointerDown(e);break;case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"keydown":this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("pointerdown",this)}onAfterDetach(e){this.node.removeEventListener("pointerdown",this),this._releaseMouse()}onChildAdded(e){e.child.addClass("lm-SplitPanel-child"),this._releaseMouse()}onChildRemoved(e){e.child.removeClass("lm-SplitPanel-child"),this._releaseMouse()}_evtKeyDown(e){this._pressData&&(e.preventDefault(),e.stopPropagation()),27===e.keyCode&&this._releaseMouse()}_evtPointerDown(e){if(0!==e.button)return;let t=this.layout,r=b.ArrayExt.findFirstIndex(t.handles,(t=>t.contains(e.target)));if(-1===r)return;e.preventDefault(),e.stopPropagation(),document.addEventListener("pointerup",this,!0),document.addEventListener("pointermove",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("contextmenu",this,!0);let n,i=t.handles[r],a=i.getBoundingClientRect();n="horizontal"===t.orientation?e.clientX-a.left:e.clientY-a.top;let o=window.getComputedStyle(i),s=B.overrideCursor(o.cursor);this._pressData={index:r,delta:n,override:s}}_evtPointerMove(e){e.preventDefault(),e.stopPropagation();let t,r=this.layout,n=this.node.getBoundingClientRect();t="horizontal"===r.orientation?e.clientX-n.left-this._pressData.delta:e.clientY-n.top-this._pressData.delta,r.moveHandle(this._pressData.index,t)}_evtPointerUp(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),this._releaseMouse())}_releaseMouse(){this._pressData&&(this._pressData.override.dispose(),this._pressData=null,this._handleMoved.emit(),document.removeEventListener("keydown",this,!0),document.removeEventListener("pointerup",this,!0),document.removeEventListener("pointermove",this,!0),document.removeEventListener("contextmenu",this,!0))}};!function(e){class t{createHandle(){let e=document.createElement("div");return e.className="lm-SplitPanel-handle",e}}e.Renderer=t,e.defaultRenderer=new t,e.getStretch=function(e){return he.getStretch(e)},e.setStretch=function(e,t){he.setStretch(e,t)}}(ye||(ye={})),function(e){e.createLayout=function(e){return e.layout||new he({renderer:e.renderer||ye.defaultRenderer,orientation:e.orientation,alignment:e.alignment,spacing:e.spacing})}}(ge||(ge={}));var ve,xe=class extends ye{constructor(e={}){super({...e,layout:ve.createLayout(e)}),this._widgetSizesCache=new WeakMap,this._expansionToggled=new z(this),this.addClass("lm-AccordionPanel")}get renderer(){return this.layout.renderer}get titleSpace(){return this.layout.titleSpace}set titleSpace(e){this.layout.titleSpace=e}get titles(){return this.layout.titles}get expansionToggled(){return this._expansionToggled}addWidget(e){super.addWidget(e),e.title.changed.connect(this._onTitleChanged,this)}collapse(e){let t=this.layout.widgets[e];t&&!t.isHidden&&this._toggleExpansion(e)}expand(e){let t=this.layout.widgets[e];t&&t.isHidden&&this._toggleExpansion(e)}insertWidget(e,t){super.insertWidget(e,t),t.title.changed.connect(this._onTitleChanged,this)}handleEvent(e){switch(super.handleEvent(e),e.type){case"click":this._evtClick(e);break;case"keydown":this._eventKeyDown(e)}}onBeforeAttach(e){this.node.addEventListener("click",this),this.node.addEventListener("keydown",this),super.onBeforeAttach(e)}onAfterDetach(e){super.onAfterDetach(e),this.node.removeEventListener("click",this),this.node.removeEventListener("keydown",this)}_onTitleChanged(e){let t=b.ArrayExt.findFirstIndex(this.widgets,(t=>t.contains(e.owner)));t>=0&&(this.layout.updateTitle(t,e.owner),this.update())}_computeWidgetSize(e){let t=this.layout,r=t.widgets[e];if(!r)return;let n=r.isHidden,i=t.absoluteSizes(),a=(n?-1:1)*this.spacing,o=i.reduce(((e,t)=>e+t)),s=[...i];if(n){let t=this._widgetSizesCache.get(r);if(!t)return;s[e]+=t;let n=s.map((e=>e-t>0)).lastIndexOf(!0);-1===n?s.forEach(((r,n)=>{n!==e&&(s[n]-=i[n]/o*(t-a))})):s[n]-=t-a}else{let t=i[e];this._widgetSizesCache.set(r,t),s[e]=0;let n=s.map((e=>e>0)).lastIndexOf(!0);if(-1===n)return;s[n]=i[n]+t+a}return s.map((e=>e/(o+a)))}_evtClick(e){let t=e.target;if(t){let r=b.ArrayExt.findFirstIndex(this.titles,(e=>e.contains(t)));r>=0&&(e.preventDefault(),e.stopPropagation(),this._toggleExpansion(r))}}_eventKeyDown(e){if(e.defaultPrevented)return;let t=e.target,r=!1;if(t){let n=b.ArrayExt.findFirstIndex(this.titles,(e=>e.contains(t)));if(n>=0){let i=e.keyCode.toString();if(e.key.match(/Space|Enter/)||i.match(/13|32/))t.click(),r=!0;else if("horizontal"===this.orientation?e.key.match(/ArrowLeft|ArrowRight/)||i.match(/37|39/):e.key.match(/ArrowUp|ArrowDown/)||i.match(/38|40/)){let t=e.key.match(/ArrowLeft|ArrowUp/)||i.match(/37|38/)?-1:1,a=this.titles.length,o=(n+a+t)%a;this.titles[o].focus(),r=!0}else"End"===e.key||"35"===i?(this.titles[this.titles.length-1].focus(),r=!0):("Home"===e.key||"36"===i)&&(this.titles[0].focus(),r=!0)}r&&e.preventDefault()}}_toggleExpansion(e){let t=this.titles[e],r=this.layout.widgets[e],n=this._computeWidgetSize(e);n&&this.setRelativeSizes(n,!1),r.isHidden?(t.classList.add("lm-mod-expanded"),t.setAttribute("aria-expanded","true"),r.show()):(t.classList.remove("lm-mod-expanded"),t.setAttribute("aria-expanded","false"),r.hide()),this._expansionToggled.emit(e)}};!function(e){class t extends ye.Renderer{constructor(){super(),this.titleClassName="lm-AccordionPanel-title",this._titleID=0,this._titleKeys=new WeakMap,this._uuid=++t._nInstance}createCollapseIcon(e){return document.createElement("span")}createSectionTitle(e){let t=document.createElement("h3");t.setAttribute("tabindex","0"),t.id=this.createTitleKey(e),t.className=this.titleClassName;for(let r in e.dataset)t.dataset[r]=e.dataset[r];t.appendChild(this.createCollapseIcon(e)).className="lm-AccordionPanel-titleCollapser";let r=t.appendChild(document.createElement("span"));return r.className="lm-AccordionPanel-titleLabel",r.textContent=e.label,r.title=e.caption||e.label,t}createTitleKey(e){let t=this._titleKeys.get(e);return void 0===t&&(t=`title-key-${this._uuid}-${this._titleID++}`,this._titleKeys.set(e,t)),t}}t._nInstance=0,e.Renderer=t,e.defaultRenderer=new t}(xe||(xe={})),function(e){e.createLayout=function(e){return e.layout||new pe({renderer:e.renderer||xe.defaultRenderer,orientation:e.orientation,alignment:e.alignment,spacing:e.spacing,titleSpace:e.titleSpace})}}(ve||(ve={}));var _e,be=class e extends le{constructor(e={}){super(),this._fixed=0,this._spacing=4,this._dirty=!1,this._sizers=[],this._items=[],this._box=null,this._alignment="start",this._direction="top-to-bottom",void 0!==e.direction&&(this._direction=e.direction),void 0!==e.alignment&&(this._alignment=e.alignment),void 0!==e.spacing&&(this._spacing=ue.clampDimension(e.spacing))}dispose(){for(let e of this._items)e.dispose();this._box=null,this._items.length=0,this._sizers.length=0,super.dispose()}get direction(){return this._direction}set direction(e){this._direction!==e&&(this._direction=e,this.parent&&(this.parent.dataset.direction=e,this.parent.fit()))}get alignment(){return this._alignment}set alignment(e){this._alignment!==e&&(this._alignment=e,this.parent&&(this.parent.dataset.alignment=e,this.parent.update()))}get spacing(){return this._spacing}set spacing(e){e=ue.clampDimension(e),this._spacing!==e&&(this._spacing=e,this.parent&&this.parent.fit())}init(){this.parent.dataset.direction=this.direction,this.parent.dataset.alignment=this.alignment,super.init()}attachWidget(e,t){b.ArrayExt.insert(this._items,e,new oe(t)),b.ArrayExt.insert(this._sizers,e,new ee),this.parent.isAttached&&M.sendMessage(t,ne.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.isAttached&&M.sendMessage(t,ne.Msg.AfterAttach),this.parent.fit()}moveWidget(e,t,r){b.ArrayExt.move(this._items,e,t),b.ArrayExt.move(this._sizers,e,t),this.parent.update()}detachWidget(e,t){let r=b.ArrayExt.removeAt(this._items,e);b.ArrayExt.removeAt(this._sizers,e),this.parent.isAttached&&M.sendMessage(t,ne.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&M.sendMessage(t,ne.Msg.AfterDetach),r.dispose(),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_fit(){let t=0;for(let e=0,r=this._items.length;e0)switch(this._alignment){case"start":break;case"center":c=0,u=n/2;break;case"end":c=0,u=n;break;case"justify":c=n/r,u=0;break;default:throw"unreachable"}for(let e=0,t=this._items.length;e0,coerce:(e,t)=>Math.max(0,Math.floor(t)),changed:t}),e.sizeBasisProperty=new I({name:"sizeBasis",create:()=>0,coerce:(e,t)=>Math.max(0,Math.floor(t)),changed:t}),e.isHorizontal=function(e){return"left-to-right"===e||"right-to-left"===e},e.clampSpacing=function(e){return Math.max(0,Math.floor(e))}}(_e||(_e={}));var we,Te=class extends me{constructor(e={}){super({layout:we.createLayout(e)}),this.addClass("lm-BoxPanel")}get direction(){return this.layout.direction}set direction(e){this.layout.direction=e}get alignment(){return this.layout.alignment}set alignment(e){this.layout.alignment=e}get spacing(){return this.layout.spacing}set spacing(e){this.layout.spacing=e}onChildAdded(e){e.child.addClass("lm-BoxPanel-child")}onChildRemoved(e){e.child.removeClass("lm-BoxPanel-child")}};!function(e){e.getStretch=function(e){return be.getStretch(e)},e.setStretch=function(e,t){be.setStretch(e,t)},e.getSizeBasis=function(e){return be.getSizeBasis(e)},e.setSizeBasis=function(e,t){be.setSizeBasis(e,t)}}(Te||(Te={})),function(e){e.createLayout=function(e){return e.layout||new be(e)}}(we||(we={}));var ke,Ae=class e extends ne{constructor(t){super({node:ke.createNode()}),this._activeIndex=-1,this._items=[],this._results=null,this.addClass("lm-CommandPalette"),this.setFlag(ne.Flag.DisallowLayout),this.commands=t.commands,this.renderer=t.renderer||e.defaultRenderer,this.commands.commandChanged.connect(this._onGenericChange,this),this.commands.keyBindingChanged.connect(this._onGenericChange,this)}dispose(){this._items.length=0,this._results=null,super.dispose()}get searchNode(){return this.node.getElementsByClassName("lm-CommandPalette-search")[0]}get inputNode(){return this.node.getElementsByClassName("lm-CommandPalette-input")[0]}get contentNode(){return this.node.getElementsByClassName("lm-CommandPalette-content")[0]}get items(){return this._items}addItem(e){let t=ke.createItem(this.commands,e);return this._items.push(t),this.refresh(),t}addItems(e){let t=e.map((e=>ke.createItem(this.commands,e)));return t.forEach((e=>this._items.push(e))),this.refresh(),t}removeItem(e){this.removeItemAt(this._items.indexOf(e))}removeItemAt(e){b.ArrayExt.removeAt(this._items,e)&&this.refresh()}clearItems(){0!==this._items.length&&(this._items.length=0,this.refresh())}refresh(){this._results=null,""!==this.inputNode.value?this.node.getElementsByClassName("lm-close-icon")[0].style.display="inherit":this.node.getElementsByClassName("lm-close-icon")[0].style.display="none",this.update()}handleEvent(e){switch(e.type){case"click":this._evtClick(e);break;case"keydown":this._evtKeyDown(e);break;case"input":this.refresh();break;case"focus":case"blur":this._toggleFocused()}}onBeforeAttach(e){this.node.addEventListener("click",this),this.node.addEventListener("keydown",this),this.node.addEventListener("input",this),this.node.addEventListener("focus",this,!0),this.node.addEventListener("blur",this,!0)}onAfterDetach(e){this.node.removeEventListener("click",this),this.node.removeEventListener("keydown",this),this.node.removeEventListener("input",this),this.node.removeEventListener("focus",this,!0),this.node.removeEventListener("blur",this,!0)}onAfterShow(e){this.update(),super.onAfterShow(e)}onActivateRequest(e){if(this.isAttached){let e=this.inputNode;e.focus(),e.select()}}onUpdateRequest(e){if(this.isHidden)return;let t=this.inputNode.value,r=this.contentNode,n=this._results;if(n||(n=this._results=ke.search(this._items,t),this._activeIndex=t?b.ArrayExt.findFirstIndex(n,ke.canActivate):-1),!t&&0===n.length)return void Z.render(null,r);if(t&&0===n.length){let e=this.renderer.renderEmptyMessage({query:t});return void Z.render(e,r)}let a=this.renderer,o=this._activeIndex,s=new Array(n.length);for(let e=0,t=n.length;e=n.length)r.scrollTop=0;else{let e=r.children[o];i.scrollIntoViewIfNeeded(r,e)}}_evtClick(e){if(0!==e.button)return;if(e.target.classList.contains("lm-close-icon"))return this.inputNode.value="",void this.refresh();let t=b.ArrayExt.findFirstIndex(this.contentNode.children,(t=>t.contains(e.target)));-1!==t&&(e.preventDefault(),e.stopPropagation(),this._execute(t))}_evtKeyDown(e){if(!(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey))switch(e.keyCode){case 13:e.preventDefault(),e.stopPropagation(),this._execute(this._activeIndex);break;case 38:e.preventDefault(),e.stopPropagation(),this._activatePreviousItem();break;case 40:e.preventDefault(),e.stopPropagation(),this._activateNextItem()}}_activateNextItem(){if(!this._results||0===this._results.length)return;let e=this._activeIndex,t=this._results.length,r=ee-t)),c=a.slice(0,l),u=a.slice(l);for(let e=0,t=u.length;er.command===e&&w.JSONExt.deepEqual(r.args,t)))||null}}}(ke||(ke={}));var Me,Se,Ee=class e extends ne{constructor(t){super({node:Me.createNode()}),this._childIndex=-1,this._activeIndex=-1,this._openTimerID=0,this._closeTimerID=0,this._items=[],this._childMenu=null,this._parentMenu=null,this._aboutToClose=new z(this),this._menuRequested=new z(this),this.addClass("lm-Menu"),this.setFlag(ne.Flag.DisallowLayout),this.commands=t.commands,this.renderer=t.renderer||e.defaultRenderer}dispose(){this.close(),this._items.length=0,super.dispose()}get aboutToClose(){return this._aboutToClose}get menuRequested(){return this._menuRequested}get parentMenu(){return this._parentMenu}get childMenu(){return this._childMenu}get rootMenu(){let e=this;for(;e._parentMenu;)e=e._parentMenu;return e}get leafMenu(){let e=this;for(;e._childMenu;)e=e._childMenu;return e}get contentNode(){return this.node.getElementsByClassName("lm-Menu-content")[0]}get activeItem(){return this._items[this._activeIndex]||null}set activeItem(e){this.activeIndex=e?this._items.indexOf(e):-1}get activeIndex(){return this._activeIndex}set activeIndex(e){(e<0||e>=this._items.length)&&(e=-1),-1!==e&&!Me.canActivate(this._items[e])&&(e=-1),this._activeIndex!==e&&(this._activeIndex=e,this._activeIndex>=0&&this.contentNode.childNodes[this._activeIndex]&&this.contentNode.childNodes[this._activeIndex].focus(),this.update())}get items(){return this._items}activateNextItem(){let e=this._items.length,t=this._activeIndex,r=t{this.activeIndex=e}})}Z.render(a,this.contentNode)}onCloseRequest(e){this._cancelOpenTimer(),this._cancelCloseTimer(),this.activeIndex=-1;let t=this._childMenu;t&&(this._childIndex=-1,this._childMenu=null,t._parentMenu=null,t.close());let r=this._parentMenu;r&&(this._parentMenu=null,r._childIndex=-1,r._childMenu=null,r.activate()),this.isAttached&&this._aboutToClose.emit(void 0),super.onCloseRequest(e)}_evtKeyDown(e){e.preventDefault(),e.stopPropagation();let t=e.keyCode;if(13===t)return void this.triggerActiveItem();if(27===t)return void this.close();if(37===t)return void(this._parentMenu?this.close():this._menuRequested.emit("previous"));if(38===t)return void this.activatePreviousItem();if(39===t){let e=this.activeItem;return void(e&&"submenu"===e.type?this.triggerActiveItem():this.rootMenu._menuRequested.emit("next"))}if(40===t)return void this.activateNextItem();let r=U().keyForKeydownEvent(e);if(!r)return;let n=this._activeIndex+1,i=Me.findMnemonic(this._items,r,n);-1===i.index||i.multiple?-1!==i.index?this.activeIndex=i.index:-1!==i.auto&&(this.activeIndex=i.auto):(this.activeIndex=i.index,this.triggerActiveItem())}_evtMouseUp(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),this.triggerActiveItem())}_evtMouseMove(e){let t=b.ArrayExt.findFirstIndex(this.contentNode.children,(t=>i.hitTest(t,e.clientX,e.clientY)));if(t===this._activeIndex)return;if(this.activeIndex=t,t=this.activeIndex,t===this._childIndex)return this._cancelOpenTimer(),void this._cancelCloseTimer();-1!==this._childIndex&&this._startCloseTimer(),this._cancelOpenTimer();let r=this.activeItem;!r||"submenu"!==r.type||!r.submenu||this._startOpenTimer()}_evtMouseEnter(e){for(let e=this._parentMenu;e;e=e._parentMenu)e._cancelOpenTimer(),e._cancelCloseTimer(),e.activeIndex=e._childIndex}_evtMouseLeave(e){if(this._cancelOpenTimer(),!this._childMenu)return void(this.activeIndex=-1);let{clientX:t,clientY:r}=e;i.hitTest(this._childMenu.node,t,r)?this._cancelCloseTimer():(this.activeIndex=-1,this._startCloseTimer())}_evtMouseDown(e){this._parentMenu||(Me.hitTestMenus(this,e.clientX,e.clientY)?(e.preventDefault(),e.stopPropagation()):this.close())}_openChildMenu(t=!1){let r=this.activeItem;if(!r||"submenu"!==r.type||!r.submenu)return void this._closeChildMenu();let n=r.submenu;if(n===this._childMenu)return;e.saveWindowData(),this._closeChildMenu(),this._childMenu=n,this._childIndex=this._activeIndex,n._parentMenu=this,M.sendMessage(this,ne.Msg.UpdateRequest);let i=this.contentNode.children[this._activeIndex];Me.openSubmenu(n,i),t&&(n.activeIndex=-1,n.activateNextItem()),n.activate()}_closeChildMenu(){this._childMenu&&this._childMenu.close()}_startOpenTimer(){0===this._openTimerID&&(this._openTimerID=window.setTimeout((()=>{this._openTimerID=0,this._openChildMenu()}),Me.TIMER_DELAY))}_startCloseTimer(){0===this._closeTimerID&&(this._closeTimerID=window.setTimeout((()=>{this._closeTimerID=0,this._closeChildMenu()}),Me.TIMER_DELAY))}_cancelOpenTimer(){0!==this._openTimerID&&(clearTimeout(this._openTimerID),this._openTimerID=0)}_cancelCloseTimer(){0!==this._closeTimerID&&(clearTimeout(this._closeTimerID),this._closeTimerID=0)}static saveWindowData(){Me.saveWindowData()}};!function(e){class t{renderItem(e){let t=this.createItemClass(e),r=this.createItemDataset(e),n=this.createItemARIA(e);return J.li({className:t,dataset:r,tabindex:"0",onfocus:e.onfocus,...n},this.renderIcon(e),this.renderLabel(e),this.renderShortcut(e),this.renderSubmenu(e))}renderIcon(e){let t=this.createIconClass(e);return J.div({className:t},e.item.icon,e.item.iconLabel)}renderLabel(e){let t=this.formatLabel(e);return J.div({className:"lm-Menu-itemLabel"},t)}renderShortcut(e){let t=this.formatShortcut(e);return J.div({className:"lm-Menu-itemShortcut"},t)}renderSubmenu(e){return J.div({className:"lm-Menu-itemSubmenuIcon"})}createItemClass(e){let t="lm-Menu-item";e.item.isEnabled||(t+=" lm-mod-disabled"),e.item.isToggled&&(t+=" lm-mod-toggled"),e.item.isVisible||(t+=" lm-mod-hidden"),e.active&&(t+=" lm-mod-active"),e.collapsed&&(t+=" lm-mod-collapsed");let r=e.item.className;return r&&(t+=` ${r}`),t}createItemDataset(e){let t,{type:r,command:n,dataset:i}=e.item;return t="command"===r?{...i,type:r,command:n}:{...i,type:r},t}createIconClass(e){let t="lm-Menu-itemIcon",r=e.item.iconClass;return r?`${t} ${r}`:t}createItemARIA(e){let t={};switch(e.item.type){case"separator":t.role="presentation";break;case"submenu":t["aria-haspopup"]="true",e.item.isEnabled||(t["aria-disabled"]="true");break;default:e.item.isEnabled||(t["aria-disabled"]="true"),t.role="menuitem"}return t}formatLabel(e){let{label:t,mnemonic:r}=e.item;if(r<0||r>=t.length)return t;let n=t.slice(0,r),i=t.slice(r+1),a=t[r];return[n,J.span({className:"lm-Menu-itemMnemonic"},a),i]}formatShortcut(e){let t=e.item.keyBinding;return t?W.formatKeystroke(t.keys):null}}e.Renderer=t,e.defaultRenderer=new t}(Ee||(Ee={})),function(e){e.TIMER_DELAY=300,e.SUBMENU_OVERLAP=3;let t=null,r=0;function n(){return r>0?(r--,t):o()}function a(e){return"separator"!==e.type&&e.isEnabled&&e.isVisible}function o(){return{pageXOffset:window.pageXOffset,pageYOffset:window.pageYOffset,clientWidth:document.documentElement.clientWidth,clientHeight:document.documentElement.clientHeight}}e.saveWindowData=function(){t=o(),r++},e.createNode=function(){let e=document.createElement("div"),t=document.createElement("ul");return t.className="lm-Menu-content",e.appendChild(t),t.setAttribute("role","menu"),e.tabIndex=0,e},e.canActivate=a,e.createItem=function(e,t){return new s(e.commands,t)},e.hitTestMenus=function(e,t,r){for(let n=e;n;n=n.childMenu)if(i.hitTest(n.node,t,r))return!0;return!1},e.computeCollapsed=function(e){let t=new Array(e.length);b.ArrayExt.fill(t,!1);let r=0,n=e.length;for(;r=0;--i){let r=e[i];if(r.isVisible){if("separator"!==r.type)break;t[i]=!0}}let a=!1;for(;++rc+h&&(t=c+h-g),!a&&r+y>u+f&&(r>u+f?r=u+f-y:r-=y),m.transform=`translate(${Math.max(0,t)}px, ${Math.max(0,r)}px`,m.opacity="1"},e.openSubmenu=function(t,r){let a=n(),o=a.pageXOffset,s=a.pageYOffset,l=a.clientWidth,c=a.clientHeight;M.sendMessage(t,ne.Msg.UpdateRequest);let u=c,h=t.node,f=h.style;f.opacity="0",f.maxHeight=`${u}px`,ne.attach(t,document.body);let{width:p,height:d}=h.getBoundingClientRect(),m=i.boxSizing(t.node),g=r.getBoundingClientRect(),y=g.right-e.SUBMENU_OVERLAP;y+p>o+l&&(y=g.left+e.SUBMENU_OVERLAP-p);let v=g.top-m.borderTop-m.paddingTop;v+d>s+c&&(v=g.bottom+m.borderBottom+m.paddingBottom-d),f.transform=`translate(${Math.max(0,y)}px, ${Math.max(0,v)}px`,f.opacity="1"},e.findMnemonic=function(e,t,r){let n=-1,i=-1,o=!1,s=t.toUpperCase();for(let t=0,l=e.length;t=0&&fr.command===e&&w.JSONExt.deepEqual(r.args,t)))||null}return null}}}(Me||(Me={})),function(e){function t(e,t){let r=e.rank,n=t.rank;return r!==n?r=this._titles.length)&&(e=-1),this._currentIndex===e)return;let t=this._currentIndex,r=this._titles[t]||null,n=e,i=this._titles[n]||null;this._currentIndex=n,this._previousTitle=r,this.update(),this._currentChanged.emit({previousIndex:t,previousTitle:r,currentIndex:n,currentTitle:i})}get name(){return this._name}set name(e){this._name=e,e?this.contentNode.setAttribute("aria-label",e):this.contentNode.removeAttribute("aria-label")}get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._releaseMouse(),this._orientation=e,this.dataset.orientation=e,this.contentNode.setAttribute("aria-orientation",e))}get addButtonEnabled(){return this._addButtonEnabled}set addButtonEnabled(e){this._addButtonEnabled!==e&&(this._addButtonEnabled=e,e?this.addButtonNode.classList.remove("lm-mod-hidden"):this.addButtonNode.classList.add("lm-mod-hidden"))}get titles(){return this._titles}get contentNode(){return this.node.getElementsByClassName("lm-TabBar-content")[0]}get addButtonNode(){return this.node.getElementsByClassName("lm-TabBar-addButton")[0]}addTab(e){return this.insertTab(this._titles.length,e)}insertTab(e,t){this._releaseMouse();let r=Ce.asTitle(t),n=this._titles.indexOf(r),i=Math.max(0,Math.min(e,this._titles.length));return-1===n?(b.ArrayExt.insert(this._titles,i,r),r.changed.connect(this._onTitleChanged,this),this.update(),this._adjustCurrentForInsert(i,r),r):(i===this._titles.length&&i--,n===i||(b.ArrayExt.move(this._titles,n,i),this.update(),this._adjustCurrentForMove(n,i)),r)}removeTab(e){this.removeTabAt(this._titles.indexOf(e))}removeTabAt(e){this._releaseMouse();let t=b.ArrayExt.removeAt(this._titles,e);t&&(t.changed.disconnect(this._onTitleChanged,this),t===this._previousTitle&&(this._previousTitle=null),this.update(),this._adjustCurrentForRemove(e,t))}clearTabs(){if(0===this._titles.length)return;this._releaseMouse();for(let e of this._titles)e.changed.disconnect(this._onTitleChanged,this);let e=this.currentIndex,t=this.currentTitle;this._currentIndex=-1,this._previousTitle=null,this._titles.length=0,this.update(),-1!==e&&this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:-1,currentTitle:null})}releaseMouse(){this._releaseMouse()}handleEvent(e){switch(e.type){case"pointerdown":this._evtPointerDown(e);break;case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"dblclick":this._evtDblClick(e);break;case"keydown":e.eventPhase===Event.CAPTURING_PHASE?this._evtKeyDownCapturing(e):this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("pointerdown",this),this.node.addEventListener("dblclick",this),this.node.addEventListener("keydown",this)}onAfterDetach(e){this.node.removeEventListener("pointerdown",this),this.node.removeEventListener("dblclick",this),this.node.removeEventListener("keydown",this),this._releaseMouse()}onUpdateRequest(e){var t;let r=this._titles,n=this.renderer,i=this.currentTitle,a=new Array(r.length),o=null!==(t=this._getCurrentTabindex())&&void 0!==t?t:this._currentIndex>-1?this._currentIndex:0;for(let e=0,t=r.length;ei.hitTest(t,e.clientX,e.clientY)));if(-1===r)return;let n=this.titles[r],a=t[r].querySelector(".lm-TabBar-tabLabel");if(a&&a.contains(e.target)){let e=n.label||"",t=a.innerHTML;a.innerHTML="";let r=document.createElement("input");r.classList.add("lm-TabBar-tabInput"),r.value=e,a.appendChild(r);let i=()=>{r.removeEventListener("blur",i),a.innerHTML=t,this.node.addEventListener("keydown",this)};r.addEventListener("dblclick",(e=>e.stopPropagation())),r.addEventListener("blur",i),r.addEventListener("keydown",(e=>{"Enter"===e.key?(""!==r.value&&(n.label=n.caption=r.value),i()):"Escape"===e.key&&i()})),this.node.removeEventListener("keydown",this),r.select(),r.focus(),a.children.length>0&&a.children[0].focus()}}_evtKeyDownCapturing(e){e.eventPhase===Event.CAPTURING_PHASE&&(e.preventDefault(),e.stopPropagation(),"Escape"===e.key&&this._releaseMouse())}_evtKeyDown(e){var t,r,n;if("Tab"!==e.key&&e.eventPhase!==Event.CAPTURING_PHASE)if("Enter"===e.key||"Spacebar"===e.key||" "===e.key){let t=document.activeElement;if(this.addButtonEnabled&&this.addButtonNode.contains(t))e.preventDefault(),e.stopPropagation(),this._addRequested.emit();else{let r=b.ArrayExt.findFirstIndex(this.contentNode.children,(e=>e.contains(t)));r>=0&&(e.preventDefault(),e.stopPropagation(),this.currentIndex=r)}}else if(Ie.includes(e.key)){let i=[...this.contentNode.children];if(this.addButtonEnabled&&i.push(this.addButtonNode),i.length<=1)return;e.preventDefault(),e.stopPropagation();let a,o=i.indexOf(document.activeElement);-1===o&&(o=this._currentIndex),"ArrowRight"===e.key&&"horizontal"===this._orientation||"ArrowDown"===e.key&&"vertical"===this._orientation?a=null!==(t=i[o+1])&&void 0!==t?t:i[0]:"ArrowLeft"===e.key&&"horizontal"===this._orientation||"ArrowUp"===e.key&&"vertical"===this._orientation?a=null!==(r=i[o-1])&&void 0!==r?r:i[i.length-1]:"Home"===e.key?a=i[0]:"End"===e.key&&(a=i[i.length-1]),a&&(null===(n=i[o])||void 0===n||n.setAttribute("tabindex","-1"),a?.setAttribute("tabindex","0"),a.focus())}}_evtPointerDown(e){if(0!==e.button&&1!==e.button||this._dragData||e.target.classList.contains("lm-TabBar-tabInput"))return;let t=this.addButtonEnabled&&this.addButtonNode.contains(e.target),r=this.contentNode.children,n=b.ArrayExt.findFirstIndex(r,(t=>i.hitTest(t,e.clientX,e.clientY)));if(-1===n&&!t||(e.preventDefault(),e.stopPropagation(),this._dragData={tab:r[n],index:n,pressX:e.clientX,pressY:e.clientY,tabPos:-1,tabSize:-1,tabPressPos:-1,targetIndex:-1,tabLayout:null,contentRect:null,override:null,dragActive:!1,dragAborted:!1,detachRequested:!1},this.document.addEventListener("pointerup",this,!0),1===e.button||t))return;let a=r[n].querySelector(this.renderer.closeIconSelector);a&&a.contains(e.target)||(this.tabsMovable&&(this.document.addEventListener("pointermove",this,!0),this.document.addEventListener("keydown",this,!0),this.document.addEventListener("contextmenu",this,!0)),this.allowDeselect&&this.currentIndex===n?this.currentIndex=-1:this.currentIndex=n,-1!==this.currentIndex&&this._tabActivateRequested.emit({index:this.currentIndex,title:this.currentTitle}))}_evtPointerMove(e){let t=this._dragData;if(!t)return;e.preventDefault(),e.stopPropagation();let r=this.contentNode.children;if(t.dragActive||Ce.dragExceeded(t,e)){if(!t.dragActive){let e=t.tab.getBoundingClientRect();"horizontal"===this._orientation?(t.tabPos=t.tab.offsetLeft,t.tabSize=e.width,t.tabPressPos=t.pressX-e.left):(t.tabPos=t.tab.offsetTop,t.tabSize=e.height,t.tabPressPos=t.pressY-e.top),t.tabPressOffset={x:t.pressX-e.left,y:t.pressY-e.top},t.tabLayout=Ce.snapTabLayout(r,this._orientation),t.contentRect=this.contentNode.getBoundingClientRect(),t.override=B.overrideCursor("default"),t.tab.classList.add("lm-mod-dragging"),this.addClass("lm-mod-dragging"),t.dragActive=!0}if(!t.detachRequested&&Ce.detachExceeded(t,e)){t.detachRequested=!0;let n=t.index,i=e.clientX,a=e.clientY,o=r[n],s=this._titles[n];if(this._tabDetachRequested.emit({index:n,title:s,tab:o,clientX:i,clientY:a,offset:t.tabPressOffset}),t.dragAborted)return}Ce.layoutTabs(r,t,e,this._orientation)}}_evtPointerUp(e){if(0!==e.button&&1!==e.button)return;let t=this._dragData;if(!t)return;if(e.preventDefault(),e.stopPropagation(),this.document.removeEventListener("pointermove",this,!0),this.document.removeEventListener("pointerup",this,!0),this.document.removeEventListener("keydown",this,!0),this.document.removeEventListener("contextmenu",this,!0),!t.dragActive){if(this._dragData=null,this.addButtonEnabled&&this.addButtonNode.contains(e.target))return void this._addRequested.emit(void 0);let r=this.contentNode.children,n=b.ArrayExt.findFirstIndex(r,(t=>i.hitTest(t,e.clientX,e.clientY)));if(n!==t.index)return;let a=this._titles[n];if(!a.closable)return;if(1===e.button)return void this._tabCloseRequested.emit({index:n,title:a});let o=r[n].querySelector(this.renderer.closeIconSelector);return o&&o.contains(e.target)?void this._tabCloseRequested.emit({index:n,title:a}):void 0}if(0!==e.button)return;Ce.finalizeTabPosition(t,this._orientation),t.tab.classList.remove("lm-mod-dragging");let r=Ce.parseTransitionDuration(t.tab);setTimeout((()=>{if(t.dragAborted)return;this._dragData=null,Ce.resetTabPositions(this.contentNode.children,this._orientation),t.override.dispose(),this.removeClass("lm-mod-dragging");let e=t.index,r=t.targetIndex;-1===r||e===r||(b.ArrayExt.move(this._titles,e,r),this._adjustCurrentForMove(e,r),this._tabMoved.emit({fromIndex:e,toIndex:r,title:this._titles[r]}),M.sendMessage(this,ne.Msg.UpdateRequest))}),r)}_releaseMouse(){let e=this._dragData;e&&(this._dragData=null,this.document.removeEventListener("pointermove",this,!0),this.document.removeEventListener("pointerup",this,!0),this.document.removeEventListener("keydown",this,!0),this.document.removeEventListener("contextmenu",this,!0),e.dragAborted=!0,e.dragActive&&(Ce.resetTabPositions(this.contentNode.children,this._orientation),e.override.dispose(),e.tab.classList.remove("lm-mod-dragging"),this.removeClass("lm-mod-dragging")))}_adjustCurrentForInsert(e,t){let r=this.currentTitle,n=this._currentIndex,i=this.insertBehavior;if("select-tab"===i||"select-tab-if-needed"===i&&-1===n)return this._currentIndex=e,this._previousTitle=r,void this._currentChanged.emit({previousIndex:n,previousTitle:r,currentIndex:e,currentTitle:t});n>=e&&this._currentIndex++}_adjustCurrentForMove(e,t){this._currentIndex===e?this._currentIndex=t:this._currentIndex=t?this._currentIndex++:this._currentIndex>e&&this._currentIndex<=t&&this._currentIndex--}_adjustCurrentForRemove(e,t){let r=this._currentIndex,n=this.removeBehavior;if(r===e)return 0===this._titles.length?(this._currentIndex=-1,void this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:-1,currentTitle:null})):"select-tab-after"===n?(this._currentIndex=Math.min(e,this._titles.length-1),void this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:this._currentIndex,currentTitle:this.currentTitle})):"select-tab-before"===n?(this._currentIndex=Math.max(0,e-1),void this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:this._currentIndex,currentTitle:this.currentTitle})):"select-previous-tab"===n?(this._previousTitle?(this._currentIndex=this._titles.indexOf(this._previousTitle),this._previousTitle=null):this._currentIndex=Math.min(e,this._titles.length-1),void this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:this._currentIndex,currentTitle:this.currentTitle})):(this._currentIndex=-1,void this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:-1,currentTitle:null}));r>e&&this._currentIndex--}_onTitleChanged(e){this.update()}};!function(e){class t{constructor(){this.closeIconSelector=".lm-TabBar-tabCloseIcon",this._tabID=0,this._tabKeys=new WeakMap,this._uuid=++t._nInstance}renderTab(e){let t=e.title.caption,r=this.createTabKey(e),n=r,i=this.createTabStyle(e),a=this.createTabClass(e),o=this.createTabDataset(e),s=this.createTabARIA(e);return e.title.closable?J.li({id:n,key:r,className:a,title:t,style:i,dataset:o,...s},this.renderIcon(e),this.renderLabel(e),this.renderCloseIcon(e)):J.li({id:n,key:r,className:a,title:t,style:i,dataset:o,...s},this.renderIcon(e),this.renderLabel(e))}renderIcon(e){let{title:t}=e,r=this.createIconClass(e);return J.div({className:r},t.icon,t.iconLabel)}renderLabel(e){return J.div({className:"lm-TabBar-tabLabel"},e.title.label)}renderCloseIcon(e){return J.div({className:"lm-TabBar-tabCloseIcon"})}createTabKey(e){let t=this._tabKeys.get(e.title);return void 0===t&&(t=`tab-key-${this._uuid}-${this._tabID++}`,this._tabKeys.set(e.title,t)),t}createTabStyle(e){return{zIndex:`${e.zIndex}`}}createTabClass(e){let t="lm-TabBar-tab";return e.title.className&&(t+=` ${e.title.className}`),e.title.closable&&(t+=" lm-mod-closable"),e.current&&(t+=" lm-mod-current"),t}createTabDataset(e){return e.title.dataset}createTabARIA(e){var t;return{role:"tab","aria-selected":e.current.toString(),tabindex:`${null!==(t=e.tabIndex)&&void 0!==t?t:"-1"}`}}createIconClass(e){let t="lm-TabBar-tabIcon",r=e.title.iconClass;return r?`${t} ${r}`:t}}t._nInstance=0,e.Renderer=t,e.defaultRenderer=new t,e.addButtonSelector=".lm-TabBar-addButton"}(Le||(Le={})),function(e){e.DRAG_THRESHOLD=5,e.DETACH_THRESHOLD=20,e.createNode=function(){let e=document.createElement("div"),t=document.createElement("ul");t.setAttribute("role","tablist"),t.className="lm-TabBar-content",e.appendChild(t);let r=document.createElement("div");return r.className="lm-TabBar-addButton lm-mod-hidden",r.setAttribute("tabindex","-1"),r.setAttribute("role","button"),e.appendChild(r),e},e.asTitle=function(e){return e instanceof re?e:new re(e)},e.parseTransitionDuration=function(e){let t=window.getComputedStyle(e);return 1e3*(parseFloat(t.transitionDuration)||0)},e.snapTabLayout=function(e,t){let r=new Array(e.length);for(let n=0,i=e.length;n=e.DRAG_THRESHOLD||i>=e.DRAG_THRESHOLD},e.detachExceeded=function(t,r){let n=t.contentRect;return r.clientX=n.right+e.DETACH_THRESHOLD||r.clientY=n.bottom+e.DETACH_THRESHOLD},e.layoutTabs=function(e,t,r,n){let i,a,o,s;"horizontal"===n?(i=t.pressX,a=r.clientX-t.contentRect.left,o=r.clientX,s=t.contentRect.width):(i=t.pressY,a=r.clientY-t.contentRect.top,o=r.clientY,s=t.contentRect.height);let l=t.index,c=a-t.tabPressPos,u=c+t.tabSize;for(let r=0,a=e.length;r>1);if(rt.index&&u>f)a=-t.tabSize-h.margin+"px",l=Math.max(l,r);else if(r===t.index){let e=o-i,r=s-(t.tabPos+t.tabSize);a=`${Math.max(-t.tabPos,Math.min(e,r))}px`}else a="";"horizontal"===n?e[r].style.left=a:e[r].style.top=a}t.targetIndex=l},e.finalizeTabPosition=function(e,t){let r,n;if(r="horizontal"===t?e.contentRect.width:e.contentRect.height,e.targetIndex===e.index)n=0;else if(e.targetIndex>e.index){let t=e.tabLayout[e.targetIndex];n=t.pos+t.size-e.tabSize-e.tabPos}else n=e.tabLayout[e.targetIndex].pos-e.tabPos;let i=r-(e.tabPos+e.tabSize),a=Math.max(-e.tabPos,Math.min(n,i));"horizontal"===t?e.tab.style.left=`${a}px`:e.tab.style.top=`${a}px`},e.resetTabPositions=function(e,t){for(let r of e)"horizontal"===t?r.style.left="":r.style.top=""}}(Ce||(Ce={}));var Pe,ze=class extends ie{constructor(e){super(),this._spacing=4,this._dirty=!1,this._root=null,this._box=null,this._items=new Map,this.renderer=e.renderer,void 0!==e.spacing&&(this._spacing=ue.clampDimension(e.spacing)),this._document=e.document||document,this._hiddenMode=void 0!==e.hiddenMode?e.hiddenMode:ne.HiddenMode.Display}dispose(){let e=this[Symbol.iterator]();this._items.forEach((e=>{e.dispose()})),this._box=null,this._root=null,this._items.clear();for(let t of e)t.dispose();super.dispose()}get hiddenMode(){return this._hiddenMode}set hiddenMode(e){if(this._hiddenMode!==e){this._hiddenMode=e;for(let e of this.tabBars())if(e.titles.length>1)for(let t of e.titles)t.owner.hiddenMode=this._hiddenMode}}get spacing(){return this._spacing}set spacing(e){e=ue.clampDimension(e),this._spacing!==e&&(this._spacing=e,this.parent&&this.parent.fit())}get isEmpty(){return null===this._root}[Symbol.iterator](){return this._root?this._root.iterAllWidgets():(0,b.empty)()}widgets(){return this._root?this._root.iterUserWidgets():(0,b.empty)()}selectedWidgets(){return this._root?this._root.iterSelectedWidgets():(0,b.empty)()}tabBars(){return this._root?this._root.iterTabBars():(0,b.empty)()}handles(){return this._root?this._root.iterHandles():(0,b.empty)()}moveHandle(e,t,r){let n=e.classList.contains("lm-mod-hidden");if(!this._root||n)return;let i,a=this._root.findSplitNode(e);a&&(i="horizontal"===a.node.orientation?t-e.offsetLeft:r-e.offsetTop,0!==i&&(a.node.holdSizes(),Q.adjust(a.node.sizers,a.index,i),this.parent&&this.parent.update()))}saveLayout(){return this._root?(this._root.holdAllSizes(),{main:this._root.createConfig()}):{main:null}}restoreLayout(e){let t,r=new Set;t=e.main?Pe.normalizeAreaConfig(e.main,r):null;let n=this.widgets(),i=this.tabBars(),a=this.handles();this._root=null;for(let e of n)r.has(e)||(e.parent=null);for(let e of i)e.dispose();for(let e of a)e.parentNode&&e.parentNode.removeChild(e);for(let e of r)e.parent=this.parent;this._root=t?Pe.realizeAreaConfig(t,{createTabBar:e=>this._createTabBar(),createHandle:()=>this._createHandle()},this._document):null,this.parent&&(r.forEach((e=>{this.attachWidget(e)})),this.parent.fit())}addWidget(e,t={}){let r=t.ref||null,n=t.mode||"tab-after",i=null;if(this._root&&r&&(i=this._root.findTabNode(r)),r&&!i)throw new Error("Reference widget is not in the layout.");switch(e.parent=this.parent,n){case"tab-after":this._insertTab(e,r,i,!0);break;case"tab-before":this._insertTab(e,r,i,!1);break;case"split-top":this._insertSplit(e,r,i,"vertical",!1);break;case"split-left":this._insertSplit(e,r,i,"horizontal",!1);break;case"split-right":this._insertSplit(e,r,i,"horizontal",!0);break;case"split-bottom":this._insertSplit(e,r,i,"vertical",!0);break;case"merge-top":this._insertSplit(e,r,i,"vertical",!1,!0);break;case"merge-left":this._insertSplit(e,r,i,"horizontal",!1,!0);break;case"merge-right":this._insertSplit(e,r,i,"horizontal",!0,!0);break;case"merge-bottom":this._insertSplit(e,r,i,"vertical",!0,!0)}this.parent&&(this.attachWidget(e),this.parent.fit())}removeWidget(e){this._removeWidget(e),this.parent&&(this.detachWidget(e),this.parent.fit())}hitTestTabAreas(e,t){if(!this._root||!this.parent||!this.parent.isVisible)return null;this._box||(this._box=i.boxSizing(this.parent.node));let r=this.parent.node.getBoundingClientRect(),n=e-r.left-this._box.borderLeft,a=t-r.top-this._box.borderTop,o=this._root.hitTestTabNodes(n,a);if(!o)return null;let{tabBar:s,top:l,left:c,width:u,height:h}=o,f=this._box.borderLeft+this._box.borderRight,p=this._box.borderTop+this._box.borderBottom;return{tabBar:s,x:n,y:a,top:l,left:c,right:r.width-f-(c+u),bottom:r.height-p-(l+h),width:u,height:h}}init(){super.init();for(let e of this)this.attachWidget(e);for(let e of this.handles())this.parent.node.appendChild(e);this.parent.fit()}attachWidget(e){this.parent.node!==e.node.parentNode&&(this._items.set(e,new oe(e)),this.parent.isAttached&&M.sendMessage(e,ne.Msg.BeforeAttach),this.parent.node.appendChild(e.node),this.parent.isAttached&&M.sendMessage(e,ne.Msg.AfterAttach))}detachWidget(e){if(this.parent.node!==e.node.parentNode)return;this.parent.isAttached&&M.sendMessage(e,ne.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.isAttached&&M.sendMessage(e,ne.Msg.AfterDetach);let t=this._items.get(e);t&&(this._items.delete(e),t.dispose())}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_removeWidget(e){if(!this._root)return;let t=this._root.findTabNode(e);if(!t)return;if(Pe.removeAria(e),t.tabBar.titles.length>1)return t.tabBar.removeTab(e.title),void(this._hiddenMode===ne.HiddenMode.Scale&&1==t.tabBar.titles.length&&(t.tabBar.titles[0].owner.hiddenMode=ne.HiddenMode.Display));if(t.tabBar.dispose(),this._root===t)return void(this._root=null);this._root.holdAllSizes();let r=t.parent;t.parent=null;let n=b.ArrayExt.removeFirstOf(r.children,t),i=b.ArrayExt.removeAt(r.handles,n);if(b.ArrayExt.removeAt(r.sizers,n),i.parentNode&&i.parentNode.removeChild(i),r.children.length>1)return void r.syncHandles();let a=r.parent;r.parent=null;let o=r.children[0],s=r.handles[0];if(r.children.length=0,r.handles.length=0,r.sizers.length=0,s.parentNode&&s.parentNode.removeChild(s),this._root===r)return o.parent=null,void(this._root=o);let l=a,c=l.children.indexOf(r);if(o instanceof Pe.TabLayoutNode)return o.parent=l,void(l.children[c]=o);let u=b.ArrayExt.removeAt(l.handles,c);b.ArrayExt.removeAt(l.children,c),b.ArrayExt.removeAt(l.sizers,c),u.parentNode&&u.parentNode.removeChild(u);for(let e=0,t=o.children.length;e=r.length)&&(n=0),{type:"tab-area",widgets:r,currentIndex:n}}(t,r):function(t,r){let n=t.orientation,i=[],a=[];for(let o=0,s=t.children.length;o{let l=i(n,r,a),c=t(e.sizes[s]),u=r.createHandle();o.children.push(l),o.handles.push(u),o.sizers.push(c),l.parent=o})),o.syncHandles(),o.normalizeSizes(),o}(a,o,s),l};class r{constructor(e){this.parent=null,this._top=0,this._left=0,this._width=0,this._height=0;let t=new ee,r=new ee;t.stretch=0,r.stretch=1,this.tabBar=e,this.sizers=[t,r]}get top(){return this._top}get left(){return this._left}get width(){return this._width}get height(){return this._height}*iterAllWidgets(){yield this.tabBar,yield*this.iterUserWidgets()}*iterUserWidgets(){for(let e of this.tabBar.titles)yield e.owner}*iterSelectedWidgets(){let e=this.tabBar.currentTitle;e&&(yield e.owner)}*iterTabBars(){yield this.tabBar}*iterHandles(){}findTabNode(e){return-1!==this.tabBar.titles.indexOf(e.title)?this:null}findSplitNode(e){return null}findFirstTabNode(){return this}hitTestTabNodes(e,t){return e=this._left+this._width||t=this._top+this._height?null:this}createConfig(){return{type:"tab-area",widgets:this.tabBar.titles.map((e=>e.owner)),currentIndex:this.tabBar.currentIndex}}holdAllSizes(){}fit(e,t){let r=0,n=0,i=t.get(this.tabBar),a=this.tabBar.currentTitle,o=a?t.get(a.owner):void 0,[s,l]=this.sizers;return i&&i.fit(),o&&o.fit(),i&&!i.isHidden?(r=Math.max(r,i.minWidth),n+=i.minHeight,s.minSize=i.minHeight,s.maxSize=i.maxHeight):(s.minSize=0,s.maxSize=0),o&&!o.isHidden?(r=Math.max(r,o.minWidth),n+=o.minHeight,l.minSize=o.minHeight,l.maxSize=1/0):(l.minSize=0,l.maxSize=1/0),{minWidth:r,minHeight:n,maxWidth:1/0,maxHeight:1/0}}update(e,t,r,n,i,a){this._top=t,this._left=e,this._width=r,this._height=n;let o=a.get(this.tabBar),s=this.tabBar.currentTitle,l=s?a.get(s.owner):void 0;if(Q.calc(this.sizers,n),o&&!o.isHidden){let n=this.sizers[0].size;o.update(e,t,r,n),t+=n}if(l&&!l.isHidden){let n=this.sizers[1].size;l.update(e,t,r,n)}}}e.TabLayoutNode=r;class n{constructor(e){this.parent=null,this.normalized=!1,this.children=[],this.sizers=[],this.handles=[],this.orientation=e}*iterAllWidgets(){for(let e of this.children)yield*e.iterAllWidgets()}*iterUserWidgets(){for(let e of this.children)yield*e.iterUserWidgets()}*iterSelectedWidgets(){for(let e of this.children)yield*e.iterSelectedWidgets()}*iterTabBars(){for(let e of this.children)yield*e.iterTabBars()}*iterHandles(){yield*this.handles;for(let e of this.children)yield*e.iterHandles()}findTabNode(e){for(let t=0,r=this.children.length;te.createConfig())),sizes:t}}syncHandles(){this.handles.forEach(((e,t)=>{e.setAttribute("data-orientation",this.orientation),t===this.handles.length-1?e.classList.add("lm-mod-hidden"):e.classList.remove("lm-mod-hidden")}))}holdSizes(){for(let e of this.sizers)e.sizeHint=e.size}holdAllSizes(){for(let e of this.children)e.holdAllSizes();this.holdSizes()}normalizeSizes(){let e=this.sizers.length;if(0===e)return;this.holdSizes();let t=this.sizers.reduce(((e,t)=>e+t.sizeHint),0);if(0===t)for(let t of this.sizers)t.size=t.sizeHint=1/e;else for(let e of this.sizers)e.size=e.sizeHint/=t;this.normalized=!0}createNormalizedSizes(){let e=this.sizers.length;if(0===e)return[];let t=this.sizers.map((e=>e.size)),r=t.reduce(((e,t)=>e+t),0);if(0===r)for(let r=t.length-1;r>-1;r--)t[r]=1/e;else for(let e=t.length-1;e>-1;e--)t[e]/=r;return t}fit(e,t){let r="horizontal"===this.orientation,n=Math.max(0,this.children.length-1)*e,i=r?n:0,a=r?0:n;for(let n=0,o=this.children.length;nthis._createTabBar(),createHandle:()=>this._createHandle()};this.layout=new ze({document:this._document,renderer:r,spacing:t.spacing,hiddenMode:t.hiddenMode}),this.overlay=t.overlay||new e.Overlay,this.node.appendChild(this.overlay.node)}dispose(){this._releaseMouse(),this.overlay.hide(0),this._drag&&this._drag.dispose(),super.dispose()}get hiddenMode(){return this.layout.hiddenMode}set hiddenMode(e){this.layout.hiddenMode=e}get layoutModified(){return this._layoutModified}get addRequested(){return this._addRequested}get renderer(){return this.layout.renderer}get spacing(){return this.layout.spacing}set spacing(e){this.layout.spacing=e}get mode(){return this._mode}set mode(e){if(this._mode===e)return;this._mode=e,this.dataset.mode=e;let t=this.layout;switch(e){case"multiple-document":for(let e of t.tabBars())e.show();break;case"single-document":t.restoreLayout(De.createSingleDocumentConfig(this));break;default:throw"unreachable"}M.postMessage(this,De.LayoutModified)}get tabsMovable(){return this._tabsMovable}set tabsMovable(e){this._tabsMovable=e;for(let t of this.tabBars())t.tabsMovable=e}get tabsConstrained(){return this._tabsConstrained}set tabsConstrained(e){this._tabsConstrained=e}get addButtonEnabled(){return this._addButtonEnabled}set addButtonEnabled(e){this._addButtonEnabled=e;for(let t of this.tabBars())t.addButtonEnabled=e}get isEmpty(){return this.layout.isEmpty}*widgets(){yield*this.layout.widgets()}*selectedWidgets(){yield*this.layout.selectedWidgets()}*tabBars(){yield*this.layout.tabBars()}*handles(){yield*this.layout.handles()}selectWidget(e){let t=(0,b.find)(this.tabBars(),(t=>-1!==t.titles.indexOf(e.title)));if(!t)throw new Error("Widget is not contained in the dock panel.");t.currentTitle=e.title}activateWidget(e){this.selectWidget(e),e.activate()}saveLayout(){return this.layout.saveLayout()}restoreLayout(e){this._mode="multiple-document",this.layout.restoreLayout(e),(a.IS_EDGE||a.IS_IE)&&M.flush(),M.postMessage(this,De.LayoutModified)}addWidget(e,t={}){"single-document"===this._mode?this.layout.addWidget(e):this.layout.addWidget(e,t),M.postMessage(this,De.LayoutModified)}processMessage(e){"layout-modified"===e.type?this._layoutModified.emit(void 0):super.processMessage(e)}handleEvent(e){switch(e.type){case"lm-dragenter":this._evtDragEnter(e);break;case"lm-dragleave":this._evtDragLeave(e);break;case"lm-dragover":this._evtDragOver(e);break;case"lm-drop":this._evtDrop(e);break;case"pointerdown":this._evtPointerDown(e);break;case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"keydown":this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("lm-dragenter",this),this.node.addEventListener("lm-dragleave",this),this.node.addEventListener("lm-dragover",this),this.node.addEventListener("lm-drop",this),this.node.addEventListener("pointerdown",this)}onAfterDetach(e){this.node.removeEventListener("lm-dragenter",this),this.node.removeEventListener("lm-dragleave",this),this.node.removeEventListener("lm-dragover",this),this.node.removeEventListener("lm-drop",this),this.node.removeEventListener("pointerdown",this),this._releaseMouse()}onChildAdded(e){De.isGeneratedTabBarProperty.get(e.child)||e.child.addClass("lm-DockPanel-widget")}onChildRemoved(e){De.isGeneratedTabBarProperty.get(e.child)||(e.child.removeClass("lm-DockPanel-widget"),M.postMessage(this,De.LayoutModified))}_evtDragEnter(e){e.mimeData.hasData("application/vnd.lumino.widget-factory")&&(e.preventDefault(),e.stopPropagation())}_evtDragLeave(e){e.preventDefault(),(!this._tabsConstrained||e.source===this)&&(e.stopPropagation(),this.overlay.hide(1))}_evtDragOver(e){e.preventDefault(),this._tabsConstrained&&e.source!==this||"invalid"===this._showOverlay(e.clientX,e.clientY)?e.dropAction="none":(e.stopPropagation(),e.dropAction=e.proposedAction)}_evtDrop(e){if(e.preventDefault(),this.overlay.hide(0),"none"===e.proposedAction)return void(e.dropAction="none");let{clientX:t,clientY:r}=e,{zone:n,target:i}=De.findDropTarget(this,t,r,this._edges);if(this._tabsConstrained&&e.source!==this||"invalid"===n)return void(e.dropAction="none");let a=e.mimeData.getData("application/vnd.lumino.widget-factory");if("function"!=typeof a)return void(e.dropAction="none");let o=a();if(!(o instanceof ne))return void(e.dropAction="none");if(o.contains(this))return void(e.dropAction="none");let s=i?De.getDropRef(i.tabBar):null;switch(n){case"root-all":this.addWidget(o);break;case"root-top":this.addWidget(o,{mode:"split-top"});break;case"root-left":this.addWidget(o,{mode:"split-left"});break;case"root-right":this.addWidget(o,{mode:"split-right"});break;case"root-bottom":this.addWidget(o,{mode:"split-bottom"});break;case"widget-all":case"widget-tab":this.addWidget(o,{mode:"tab-after",ref:s});break;case"widget-top":this.addWidget(o,{mode:"split-top",ref:s});break;case"widget-left":this.addWidget(o,{mode:"split-left",ref:s});break;case"widget-right":this.addWidget(o,{mode:"split-right",ref:s});break;case"widget-bottom":this.addWidget(o,{mode:"split-bottom",ref:s});break;default:throw"unreachable"}e.dropAction=e.proposedAction,e.stopPropagation(),this.activateWidget(o)}_evtKeyDown(e){e.preventDefault(),e.stopPropagation(),27===e.keyCode&&(this._releaseMouse(),M.postMessage(this,De.LayoutModified))}_evtPointerDown(e){if(0!==e.button)return;let t=this.layout,r=e.target,n=(0,b.find)(t.handles(),(e=>e.contains(r)));if(!n)return;e.preventDefault(),e.stopPropagation(),this._document.addEventListener("keydown",this,!0),this._document.addEventListener("pointerup",this,!0),this._document.addEventListener("pointermove",this,!0),this._document.addEventListener("contextmenu",this,!0);let i=n.getBoundingClientRect(),a=e.clientX-i.left,o=e.clientY-i.top,s=window.getComputedStyle(n),l=B.overrideCursor(s.cursor,this._document);this._pressData={handle:n,deltaX:a,deltaY:o,override:l}}_evtPointerMove(e){if(!this._pressData)return;e.preventDefault(),e.stopPropagation();let t=this.node.getBoundingClientRect(),r=e.clientX-t.left-this._pressData.deltaX,n=e.clientY-t.top-this._pressData.deltaY;this.layout.moveHandle(this._pressData.handle,r,n)}_evtPointerUp(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),this._releaseMouse(),M.postMessage(this,De.LayoutModified))}_releaseMouse(){this._pressData&&(this._pressData.override.dispose(),this._pressData=null,this._document.removeEventListener("keydown",this,!0),this._document.removeEventListener("pointerup",this,!0),this._document.removeEventListener("pointermove",this,!0),this._document.removeEventListener("contextmenu",this,!0))}_showOverlay(e,t){let{zone:r,target:n}=De.findDropTarget(this,e,t,this._edges);if("invalid"===r)return this.overlay.hide(100),r;let a,o,s,l,c=i.boxSizing(this.node),u=this.node.getBoundingClientRect();switch(r){case"root-all":a=c.paddingTop,o=c.paddingLeft,s=c.paddingRight,l=c.paddingBottom;break;case"root-top":a=c.paddingTop,o=c.paddingLeft,s=c.paddingRight,l=u.height*De.GOLDEN_RATIO;break;case"root-left":a=c.paddingTop,o=c.paddingLeft,s=u.width*De.GOLDEN_RATIO,l=c.paddingBottom;break;case"root-right":a=c.paddingTop,o=u.width*De.GOLDEN_RATIO,s=c.paddingRight,l=c.paddingBottom;break;case"root-bottom":a=u.height*De.GOLDEN_RATIO,o=c.paddingLeft,s=c.paddingRight,l=c.paddingBottom;break;case"widget-all":a=n.top,o=n.left,s=n.right,l=n.bottom;break;case"widget-top":a=n.top,o=n.left,s=n.right,l=n.bottom+n.height/2;break;case"widget-left":a=n.top,o=n.left,s=n.right+n.width/2,l=n.bottom;break;case"widget-right":a=n.top,o=n.left+n.width/2,s=n.right,l=n.bottom;break;case"widget-bottom":a=n.top+n.height/2,o=n.left,s=n.right,l=n.bottom;break;case"widget-tab":{let e=n.tabBar.node.getBoundingClientRect().height;a=n.top,o=n.left,s=n.right,l=n.bottom+n.height-e;break}default:throw"unreachable"}return this.overlay.show({top:a,left:o,right:s,bottom:l}),r}_createTabBar(){let e=this._renderer.createTabBar(this._document);return De.isGeneratedTabBarProperty.set(e,!0),"single-document"===this._mode&&e.hide(),e.tabsMovable=this._tabsMovable,e.allowDeselect=!1,e.addButtonEnabled=this._addButtonEnabled,e.removeBehavior="select-previous-tab",e.insertBehavior="select-tab-if-needed",e.tabMoved.connect(this._onTabMoved,this),e.currentChanged.connect(this._onCurrentChanged,this),e.tabCloseRequested.connect(this._onTabCloseRequested,this),e.tabDetachRequested.connect(this._onTabDetachRequested,this),e.tabActivateRequested.connect(this._onTabActivateRequested,this),e.addRequested.connect(this._onTabAddRequested,this),e}_createHandle(){return this._renderer.createHandle()}_onTabMoved(){M.postMessage(this,De.LayoutModified)}_onCurrentChanged(e,t){let{previousTitle:r,currentTitle:n}=t;r&&r.owner.hide(),n&&n.owner.show(),(a.IS_EDGE||a.IS_IE)&&M.flush(),M.postMessage(this,De.LayoutModified)}_onTabAddRequested(e){this._addRequested.emit(e)}_onTabActivateRequested(e,t){t.title.owner.activate()}_onTabCloseRequested(e,t){t.title.owner.close()}_onTabDetachRequested(e,t){if(this._drag)return;e.releaseMouse();let{title:r,tab:n,clientX:i,clientY:a,offset:o}=t,s=new w.MimeData;s.setData("application/vnd.lumino.widget-factory",(()=>r.owner));let l=n.cloneNode(!0);o&&(l.style.top=`-${o.y}px`,l.style.left=`-${o.x}px`),this._drag=new B({document:this._document,mimeData:s,dragImage:l,proposedAction:"move",supportedActions:"move",source:this}),n.classList.add("lm-mod-hidden"),this._drag.start(i,a).then((()=>{this._drag=null,n.classList.remove("lm-mod-hidden")}))}};!function(e){e.Overlay=class{constructor(){this._timer=-1,this._hidden=!0,this.node=document.createElement("div"),this.node.classList.add("lm-DockPanel-overlay"),this.node.classList.add("lm-mod-hidden"),this.node.style.position="absolute",this.node.style.contain="strict"}show(e){let t=this.node.style;t.top=`${e.top}px`,t.left=`${e.left}px`,t.right=`${e.right}px`,t.bottom=`${e.bottom}px`,clearTimeout(this._timer),this._timer=-1,this._hidden&&(this._hidden=!1,this.node.classList.remove("lm-mod-hidden"))}hide(e){if(!this._hidden){if(e<=0)return clearTimeout(this._timer),this._timer=-1,this._hidden=!0,void this.node.classList.add("lm-mod-hidden");-1===this._timer&&(this._timer=window.setTimeout((()=>{this._timer=-1,this._hidden=!0,this.node.classList.add("lm-mod-hidden")}),e))}}};class t{createTabBar(e){let t=new Le({document:e});return t.addClass("lm-DockPanel-tabBar"),t}createHandle(){let e=document.createElement("div");return e.className="lm-DockPanel-handle",e}}e.Renderer=t,e.defaultRenderer=new t}(Oe||(Oe={})),function(e){e.GOLDEN_RATIO=.618,e.DEFAULT_EDGES={top:12,right:40,bottom:40,left:40},e.LayoutModified=new E("layout-modified"),e.isGeneratedTabBarProperty=new I({name:"isGeneratedTabBar",create:()=>!1}),e.createSingleDocumentConfig=function(e){if(e.isEmpty)return{main:null};let t=Array.from(e.widgets()),r=e.selectedWidgets().next().value,n=r?t.indexOf(r):-1;return{main:{type:"tab-area",widgets:t,currentIndex:n}}},e.findDropTarget=function(e,t,r,n){if(!i.hitTest(e.node,t,r))return{zone:"invalid",target:null};let a=e.layout;if(a.isEmpty)return{zone:"root-all",target:null};if("multiple-document"===e.mode){let i=e.node.getBoundingClientRect(),a=t-i.left+1,o=r-i.top+1,s=i.right-t,l=i.bottom-r;switch(Math.min(o,s,l,a)){case o:if(of&&c>f&&l>p&&u>p)return{zone:"widget-all",target:o};switch(s/=f,l/=p,c/=f,u/=p,Math.min(s,l,c,u)){case s:h="widget-left";break;case l:h="widget-top";break;case c:h="widget-right";break;case u:h="widget-bottom";break;default:throw"unreachable"}return{zone:h,target:o}},e.getDropRef=function(e){return 0===e.titles.length?null:e.currentTitle?e.currentTitle.owner:e.titles[e.titles.length-1].owner}}(De||(De={}));var Re,Fe=class e extends ie{constructor(e={}){super(e),this._dirty=!1,this._rowSpacing=4,this._columnSpacing=4,this._items=[],this._rowStarts=[],this._columnStarts=[],this._rowSizers=[new ee],this._columnSizers=[new ee],this._box=null,void 0!==e.rowCount&&Re.reallocSizers(this._rowSizers,e.rowCount),void 0!==e.columnCount&&Re.reallocSizers(this._columnSizers,e.columnCount),void 0!==e.rowSpacing&&(this._rowSpacing=Re.clampValue(e.rowSpacing)),void 0!==e.columnSpacing&&(this._columnSpacing=Re.clampValue(e.columnSpacing))}dispose(){for(let e of this._items){let t=e.widget;e.dispose(),t.dispose()}this._box=null,this._items.length=0,this._rowStarts.length=0,this._rowSizers.length=0,this._columnStarts.length=0,this._columnSizers.length=0,super.dispose()}get rowCount(){return this._rowSizers.length}set rowCount(e){e!==this.rowCount&&(Re.reallocSizers(this._rowSizers,e),this.parent&&this.parent.fit())}get columnCount(){return this._columnSizers.length}set columnCount(e){e!==this.columnCount&&(Re.reallocSizers(this._columnSizers,e),this.parent&&this.parent.fit())}get rowSpacing(){return this._rowSpacing}set rowSpacing(e){e=Re.clampValue(e),this._rowSpacing!==e&&(this._rowSpacing=e,this.parent&&this.parent.fit())}get columnSpacing(){return this._columnSpacing}set columnSpacing(e){e=Re.clampValue(e),this._columnSpacing!==e&&(this._columnSpacing=e,this.parent&&this.parent.fit())}rowStretch(e){let t=this._rowSizers[e];return t?t.stretch:-1}setRowStretch(e,t){let r=this._rowSizers[e];r&&(t=Re.clampValue(t),r.stretch!==t&&(r.stretch=t,this.parent&&this.parent.update()))}columnStretch(e){let t=this._columnSizers[e];return t?t.stretch:-1}setColumnStretch(e,t){let r=this._columnSizers[e];r&&(t=Re.clampValue(t),r.stretch!==t&&(r.stretch=t,this.parent&&this.parent.update()))}*[Symbol.iterator](){for(let e of this._items)yield e.widget}addWidget(e){-1===b.ArrayExt.findFirstIndex(this._items,(t=>t.widget===e))&&(this._items.push(new oe(e)),this.parent&&this.attachWidget(e))}removeWidget(e){let t=b.ArrayExt.findFirstIndex(this._items,(t=>t.widget===e));if(-1===t)return;let r=b.ArrayExt.removeAt(this._items,t);this.parent&&this.detachWidget(e),r.dispose()}init(){super.init();for(let e of this)this.attachWidget(e)}attachWidget(e){this.parent.isAttached&&M.sendMessage(e,ne.Msg.BeforeAttach),this.parent.node.appendChild(e.node),this.parent.isAttached&&M.sendMessage(e,ne.Msg.AfterAttach),this.parent.fit()}detachWidget(e){this.parent.isAttached&&M.sendMessage(e,ne.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.isAttached&&M.sendMessage(e,ne.Msg.AfterDetach),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_fit(){for(let e=0,t=this.rowCount;e!e.isHidden));for(let e=0,r=t.length;e({row:0,column:0,rowSpan:1,columnSpan:1}),changed:function(e){e.parent&&e.parent.layout instanceof Fe&&e.parent.fit()}}),e.normalizeConfig=function(e){return{row:Math.max(0,Math.floor(e.row||0)),column:Math.max(0,Math.floor(e.column||0)),rowSpan:Math.max(1,Math.floor(e.rowSpan||0)),columnSpan:Math.max(1,Math.floor(e.columnSpan||0))}},e.clampValue=function(e){return Math.max(0,Math.floor(e))},e.rowSpanCmp=function(t,r){let n=e.cellConfigProperty.get(t.widget),i=e.cellConfigProperty.get(r.widget);return n.rowSpan-i.rowSpan},e.columnSpanCmp=function(t,r){let n=e.cellConfigProperty.get(t.widget),i=e.cellConfigProperty.get(r.widget);return n.columnSpan-i.columnSpan},e.reallocSizers=function(e,t){for(t=Math.max(1,Math.floor(t));e.lengtht&&(e.length=t)},e.distributeMin=function(e,t,r,n){if(r=n)return;let a=(n-i)/(r-t+1);for(let n=t;n<=r;++n)e[n].minSize+=a}}(Re||(Re={}));var Be,je,Ne=class e extends ne{constructor(t={}){super({node:Be.createNode()}),this._activeIndex=-1,this._tabFocusIndex=0,this._menus=[],this._childMenu=null,this._overflowMenu=null,this._menuItemSizes=[],this._overflowIndex=-1,this.addClass("lm-MenuBar"),this.setFlag(ne.Flag.DisallowLayout),this.renderer=t.renderer||e.defaultRenderer,this._forceItemsPosition=t.forceItemsPosition||{forceX:!0,forceY:!0},this._overflowMenuOptions=t.overflowMenuOptions||{isVisible:!0}}dispose(){this._closeChildMenu(),this._menus.length=0,super.dispose()}get childMenu(){return this._childMenu}get overflowIndex(){return this._overflowIndex}get overflowMenu(){return this._overflowMenu}get contentNode(){return this.node.getElementsByClassName("lm-MenuBar-content")[0]}get activeMenu(){return this._menus[this._activeIndex]||null}set activeMenu(e){this.activeIndex=e?this._menus.indexOf(e):-1}get activeIndex(){return this._activeIndex}set activeIndex(e){(e<0||e>=this._menus.length)&&(e=-1),e>-1&&0===this._menus[e].items.length&&(e=-1),this._activeIndex!==e&&(this._activeIndex=e,this.update())}get menus(){return this._menus}openActiveMenu(){-1!==this._activeIndex&&(this._openChildMenu(),this._childMenu&&(this._childMenu.activeIndex=-1,this._childMenu.activateNextItem()))}addMenu(e,t=!0){this.insertMenu(this._menus.length,e,t)}insertMenu(e,t,r=!0){this._closeChildMenu();let n=this._menus.indexOf(t),i=Math.max(0,Math.min(e,this._menus.length));if(-1===n)return b.ArrayExt.insert(this._menus,i,t),t.addClass("lm-MenuBar-menu"),t.aboutToClose.connect(this._onMenuAboutToClose,this),t.menuRequested.connect(this._onMenuMenuRequested,this),t.title.changed.connect(this._onTitleChanged,this),void(r&&this.update());i===this._menus.length&&i--,n!==i&&(b.ArrayExt.move(this._menus,n,i),r&&this.update())}removeMenu(e,t=!0){this.removeMenuAt(this._menus.indexOf(e),t)}removeMenuAt(e,t=!0){this._closeChildMenu();let r=b.ArrayExt.removeAt(this._menus,e);r&&(r.aboutToClose.disconnect(this._onMenuAboutToClose,this),r.menuRequested.disconnect(this._onMenuMenuRequested,this),r.title.changed.disconnect(this._onTitleChanged,this),r.removeClass("lm-MenuBar-menu"),t&&this.update())}clearMenus(){if(0!==this._menus.length){this._closeChildMenu();for(let e of this._menus)e.aboutToClose.disconnect(this._onMenuAboutToClose,this),e.menuRequested.disconnect(this._onMenuMenuRequested,this),e.title.changed.disconnect(this._onTitleChanged,this),e.removeClass("lm-MenuBar-menu");this._menus.length=0,this.update()}}handleEvent(e){switch(e.type){case"keydown":this._evtKeyDown(e);break;case"mousedown":this._evtMouseDown(e);break;case"mousemove":this._evtMouseMove(e);break;case"focusout":this._evtFocusOut(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("keydown",this),this.node.addEventListener("mousedown",this),this.node.addEventListener("mousemove",this),this.node.addEventListener("focusout",this),this.node.addEventListener("contextmenu",this)}onAfterDetach(e){this.node.removeEventListener("keydown",this),this.node.removeEventListener("mousedown",this),this.node.removeEventListener("mousemove",this),this.node.removeEventListener("focusout",this),this.node.removeEventListener("contextmenu",this),this._closeChildMenu()}onActivateRequest(e){this.isAttached&&this._focusItemAt(0)}onResize(e){this.update(),super.onResize(e)}onUpdateRequest(e){var t;let r=this._menus,n=this.renderer,i=this._activeIndex,a=this._tabFocusIndex>=0&&this._tabFocusIndex-1?this._overflowIndex:r.length,s=0,l=!1;o=null!==this._overflowMenu?o-1:o;let c=new Array(o);for(let e=0;e{this._tabFocusIndex=e,this.activeIndex=e}}),s+=this._menuItemSizes[e],r[e].title.label===this._overflowMenuOptions.title&&(l=!0,o--);if(this._overflowMenuOptions.isVisible)if(this._overflowIndex>-1&&!l){if(null===this._overflowMenu){let e=null!==(t=this._overflowMenuOptions.title)&&void 0!==t?t:"...";this._overflowMenu=new Ee({commands:new W}),this._overflowMenu.title.label=e,this._overflowMenu.title.mnemonic=0,this.addMenu(this._overflowMenu,!1)}for(let e=r.length-2;e>=o;e--){let t=this.menus[e];t.title.mnemonic=0,this._overflowMenu.insertItem(0,{type:"submenu",submenu:t}),this.removeMenu(t,!1)}c[o]=n.renderItem({title:this._overflowMenu.title,active:o===i&&0!==r[o].items.length,tabbable:o===a,disabled:0===r[o].items.length,onfocus:()=>{this._tabFocusIndex=o,this.activeIndex=o}}),o++}else if(null!==this._overflowMenu){let e=this._overflowMenu.items,t=this.node.offsetWidth,i=this._overflowMenu.items.length;for(let l=0;lthis._menuItemSizes[i]){let t=e[0].submenu;this._overflowMenu.removeItemAt(0),this.insertMenu(o,t,!1),c[o]=n.renderItem({title:t.title,active:!1,tabbable:o===a,disabled:0===r[o].items.length,onfocus:()=>{this._tabFocusIndex=o,this.activeIndex=o}}),o++}}0===this._overflowMenu.items.length&&(this.removeMenu(this._overflowMenu,!1),c.pop(),this._overflowMenu=null,this._overflowIndex=-1)}Z.render(c,this.contentNode),this._updateOverflowIndex()}_updateOverflowIndex(){if(!this._overflowMenuOptions.isVisible)return;let e=this.contentNode.childNodes,t=this.node.offsetWidth,r=0,n=-1,i=e.length;if(0==this._menuItemSizes.length)for(let a=0;at&&-1===n&&(n=a)}else for(let e=0;et){n=e;break}this._overflowIndex=n}_evtKeyDown(e){let t=e.keyCode;if(9===t)return void(this.activeIndex=-1);if(e.preventDefault(),e.stopPropagation(),13===t||32===t||38===t||40===t){if(this.activeIndex=this._tabFocusIndex,this.activeIndex!==this._tabFocusIndex)return;return void this.openActiveMenu()}if(27===t)return this._closeChildMenu(),void this._focusItemAt(this.activeIndex);if(37===t||39===t){let e=37===t?-1:1,r=this._tabFocusIndex+e,n=this._menus.length;for(let t=0;ti.hitTest(t,e.clientX,e.clientY)));if(-1!==t){if(0===e.button)if(this._childMenu)this._closeChildMenu(),this.activeIndex=t;else{e.preventDefault();let r=this._positionForMenu(t);Ee.saveWindowData(),this.activeIndex=t,this._openChildMenu(r)}}else this._closeChildMenu()}_evtMouseMove(e){let t=b.ArrayExt.findFirstIndex(this.contentNode.children,(t=>i.hitTest(t,e.clientX,e.clientY)));if(t===this._activeIndex||-1===t&&this._childMenu)return;let r=t>=0&&this._childMenu?this._positionForMenu(t):null;Ee.saveWindowData(),this.activeIndex=t,r&&this._openChildMenu(r)}_positionForMenu(e){let t=this.contentNode.children[e],{left:r,bottom:n}=t.getBoundingClientRect();return{top:n,left:r}}_evtFocusOut(e){!this._childMenu&&!this.node.contains(e.relatedTarget)&&(this.activeIndex=-1)}_focusItemAt(e){let t=this.contentNode.childNodes[e];t&&t.focus()}_openChildMenu(e={}){let t=this.activeMenu;if(!t)return void this._closeChildMenu();let r=this._childMenu;if(r===t)return;this._childMenu=t,r?r.close():document.addEventListener("mousedown",this,!0),this._tabFocusIndex=this.activeIndex,M.sendMessage(this,ne.Msg.UpdateRequest);let{left:n,top:i}=e;(typeof n>"u"||typeof i>"u")&&({left:n,top:i}=this._positionForMenu(this._activeIndex)),r||this.addClass("lm-mod-active"),t.items.length>0&&t.open(n,i,this._forceItemsPosition)}_closeChildMenu(){if(!this._childMenu)return;this.removeClass("lm-mod-active"),document.removeEventListener("mousedown",this,!0);let e=this._childMenu;this._childMenu=null,e.close(),this.activeIndex=-1}_onMenuAboutToClose(e){e===this._childMenu&&(this.removeClass("lm-mod-active"),document.removeEventListener("mousedown",this,!0),this._childMenu=null,this.activeIndex=-1)}_onMenuMenuRequested(e,t){if(e!==this._childMenu)return;let r=this._activeIndex,n=this._menus.length;switch(t){case"next":this.activeIndex=r===n-1?0:r+1;break;case"previous":this.activeIndex=0===r?n-1:r-1}this.openActiveMenu()}_onTitleChanged(){this.update()}};!function(e){class t{renderItem(e){let t=this.createItemClass(e),r=this.createItemDataset(e),n=this.createItemARIA(e);return J.li({className:t,dataset:r,...e.disabled?{}:{tabindex:e.tabbable?"0":"-1"},onfocus:e.onfocus,...n},this.renderIcon(e),this.renderLabel(e))}renderIcon(e){let t=this.createIconClass(e);return J.div({className:t},e.title.icon,e.title.iconLabel)}renderLabel(e){let t=this.formatLabel(e);return J.div({className:"lm-MenuBar-itemLabel"},t)}createItemClass(e){let t="lm-MenuBar-item";return e.title.className&&(t+=` ${e.title.className}`),e.active&&!e.disabled&&(t+=" lm-mod-active"),t}createItemDataset(e){return e.title.dataset}createItemARIA(e){return{role:"menuitem","aria-haspopup":"true","aria-disabled":e.disabled?"true":"false"}}createIconClass(e){let t="lm-MenuBar-itemIcon",r=e.title.iconClass;return r?`${t} ${r}`:t}formatLabel(e){let{label:t,mnemonic:r}=e.title;if(r<0||r>=t.length)return t;let n=t.slice(0,r),i=t.slice(r+1),a=t[r];return[n,J.span({className:"lm-MenuBar-itemMnemonic"},a),i]}}e.Renderer=t,e.defaultRenderer=new t}(Ne||(Ne={})),function(e){e.createNode=function(){let e=document.createElement("div"),t=document.createElement("ul");return t.className="lm-MenuBar-content",e.appendChild(t),t.setAttribute("role","menubar"),e},e.findMnemonic=function(e,t,r){let n=-1,i=-1,a=!1,o=t.toUpperCase();for(let t=0,s=e.length;t=0&&u1&&this.widgets.forEach((e=>{e.hiddenMode=this._hiddenMode})))}dispose(){for(let e of this._items)e.dispose();this._box=null,this._items.length=0,super.dispose()}attachWidget(e,t){this._hiddenMode===ne.HiddenMode.Scale&&this._items.length>0?(1===this._items.length&&(this.widgets[0].hiddenMode=ne.HiddenMode.Scale),t.hiddenMode=ne.HiddenMode.Scale):t.hiddenMode=ne.HiddenMode.Display,b.ArrayExt.insert(this._items,e,new oe(t)),this.parent.isAttached&&M.sendMessage(t,ne.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.isAttached&&M.sendMessage(t,ne.Msg.AfterAttach),this.parent.fit()}moveWidget(e,t,r){b.ArrayExt.move(this._items,e,t),this.parent.update()}detachWidget(e,t){let r=b.ArrayExt.removeAt(this._items,e);this.parent.isAttached&&M.sendMessage(t,ne.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&M.sendMessage(t,ne.Msg.AfterDetach),r.widget.node.style.zIndex="",this._hiddenMode===ne.HiddenMode.Scale&&(t.hiddenMode=ne.HiddenMode.Display,1===this._items.length&&(this._items[0].widget.hiddenMode=ne.HiddenMode.Display)),r.dispose(),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_fit(){let e=0,t=0;for(let r=0,n=this._items.length;r{this.createGraph(this._model)}))}renderModel(e){if(this.hasGraphElement())return Promise.resolve();this._model=e;let t=e.data["image/png"];return null!=t?(this.updateImage(t),Promise.resolve()):this.createGraph(e)}hasGraphElement(){return null!==this.node.querySelector(".plot-container")}updateImage(e){this.hideGraph(),this._img_el.src="data:image/png;base64,"+e,this.showImage()}hideGraph(){let e=this.node.querySelector(".plot-container");null!=e&&(e.style.display="none")}showGraph(){let e=this.node.querySelector(".plot-container");null!=e&&(e.style.display="block")}hideImage(){let e=this.node.querySelector(".plot-img");null!=e&&(e.style.display="none")}showImage(){let e=this.node.querySelector(".plot-img");null!=e&&(e.style.display="block")}createGraph(t){let{data:r,layout:n,frames:i,config:a}=t.data[this._mimeType];return n.height||(n.height=360),(async()=>(null===e.Plotly&&(e.Plotly=await Promise.resolve().then((()=>y(_()))),e._resolveLoadingPlotly()),e.loadingPlotly))().then((()=>e.Plotly.react(this.node,r,n,a))).then((r=>{this.showGraph(),this.hideImage(),this.update(),i&&e.Plotly.addFrames(this.node,i),this.node.offsetWidth>0&&this.node.offsetHeight>0&&e.Plotly.toImage(r,{format:"png",width:this.node.offsetWidth,height:this.node.offsetHeight}).then((e=>{let r=e.split(",")[1];t.data["image/png"]!==r&&t.setData({data:{...t.data,"image/png":r}})})),this.node.on("plotly_webglcontextlost",(()=>{let e=t.data["image/png"];if(null!=e)return this.updateImage(e),Promise.resolve()}))}))}onAfterShow(e){this.update()}onResize(e){this.update()}onUpdateRequest(t){e.Plotly&&this.isVisible&&this.hasGraphElement()&&e.Plotly.redraw(this.node).then((()=>{e.Plotly.Plots.resize(this.node)}))}static{this.Plotly=null}static{this.loadingPlotly=new Promise((t=>{e._resolveLoadingPlotly=t}))}},We={safe:!0,mimeTypes:[He],createRenderer:e=>new Ge(e)},Ze=[{id:"@jupyterlab/plotly-extension:factory",rendererFactory:We,rank:2,dataType:"json",fileTypes:[{name:"plotly",mimeTypes:[He],extensions:[".plotly",".plotly.json"],iconClass:"jp-MaterialIcon jp-PlotlyIcon"}],documentWidgetFactoryOptions:{name:"Plotly",primaryFileType:"plotly",fileTypes:["plotly","json"],defaultFor:["plotly"]}}]},e=>{var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var s,l=[],c=!1,u=-1;function h(){c&&s&&(c=!1,s.length?l=s.concat(l):u=-1,l.length&&f())}function f(){if(!c){var e=o(h);c=!0;for(var t=l.length;t;){for(s=l,l=[];++u1)for(var r=1;r{"use strict";var e,r,t=[(e,r,t)=>{var o={"./index":()=>t.e(1).then((()=>()=>t(2))),"./mimeExtension":()=>t.e(1).then((()=>()=>t(2)))},a=(e,r)=>(t.R=r,r=t.o(o,e)?o[e]():Promise.resolve().then((()=>{throw new Error('Module "'+e+'" does not exist in container.')})),t.R=void 0,r),n=(e,r)=>{if(t.S){var o="default",a=t.S[o];if(a&&a!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[o]=e,t.I(o,r)}};t.d(r,{get:()=>a,init:()=>n})}],o={};function a(e){var r=o[e];if(void 0!==r)return r.exports;var n=o[e]={exports:{}};return t[e](n,n.exports,a),n.exports}a.m=t,a.c=o,a.amdO={},a.d=(e,r)=>{for(var t in r)a.o(r,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((r,t)=>(a.f[t](e,r),r)),[])),a.u=e=>e+".f29faa6937f75272d9d5.js?v=f29faa6937f75272d9d5",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="jupyterlab-plotly:",a.l=(t,o,n,i)=>{if(e[t])e[t].push(o);else{var l,u;if(void 0!==n)for(var d=document.getElementsByTagName("script"),p=0;p{l.onerror=l.onload=null,clearTimeout(f);var a=e[t];if(delete e[t],l.parentNode&&l.parentNode.removeChild(l),a&&a.forEach((e=>e(o))),r)return r(o)},f=setTimeout(c.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=c.bind(null,l.onerror),l.onload=c.bind(null,l.onload),u&&document.head.appendChild(l)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{a.S={};var e={},r={};a.I=(t,o)=>{o||(o=[]);var n=r[t];if(n||(n=r[t]={}),!(o.indexOf(n)>=0)){if(o.push(n),e[t])return e[t];a.o(a.S,t)||(a.S[t]={});var i=a.S[t],l="jupyterlab-plotly",u=[];return"default"===t&&((e,r,t,o)=>{var n=i[e]=i[e]||{},u=n[r];(!u||!u.loaded&&(1!=!u.eager?o:l>u.from))&&(n[r]={get:()=>a.e(1).then((()=>()=>a(2))),from:l,eager:!1})})("jupyterlab-plotly","6.6.0"),e[t]=u.length?Promise.all(u).then((()=>e[t]=1)):1}}})(),(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var r=a.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var o=t.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=t[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{var e={0:0};a.f.j=(r,t)=>{var o=a.o(e,r)?e[r]:void 0;if(0!==o)if(o)t.push(o[2]);else{var n=new Promise(((t,a)=>o=e[r]=[t,a]));t.push(o[2]=n);var i=a.p+a.u(r),l=new Error;a.l(i,(t=>{if(a.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var n=t&&("load"===t.type?"missing":t.type),i=t&&t.target&&t.target.src;l.message="Loading chunk "+r+" failed.\n("+n+": "+i+")",l.name="ChunkLoadError",l.type=n,l.request=i,o[1](l)}}),"chunk-"+r,r)}};var r=(r,t)=>{var o,n,[i,l,u]=t,d=0;if(i.some((r=>0!==e[r]))){for(o in l)a.o(l,o)&&(a.m[o]=l[o]);u&&u(a)}for(r&&r(t);d{"use strict";var e,r,t=[(e,r,t)=>{var o={"./index":()=>t.e(1).then((()=>()=>t(2))),"./mimeExtension":()=>t.e(1).then((()=>()=>t(2)))},a=(e,r)=>(t.R=r,r=t.o(o,e)?o[e]():Promise.resolve().then((()=>{throw new Error('Module "'+e+'" does not exist in container.')})),t.R=void 0,r),n=(e,r)=>{if(t.S){var o="default",a=t.S[o];if(a&&a!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[o]=e,t.I(o,r)}};t.d(r,{get:()=>a,init:()=>n})}],o={};function a(e){var r=o[e];if(void 0!==r)return r.exports;var n=o[e]={exports:{}};return t[e](n,n.exports,a),n.exports}a.m=t,a.c=o,a.amdO={},a.d=(e,r)=>{for(var t in r)a.o(r,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((r,t)=>(a.f[t](e,r),r)),[])),a.u=e=>e+".9daa5160b7fc741623bf.js?v=9daa5160b7fc741623bf",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="jupyterlab-plotly:",a.l=(t,o,n,i)=>{if(e[t])e[t].push(o);else{var l,u;if(void 0!==n)for(var p=document.getElementsByTagName("script"),s=0;s{l.onerror=l.onload=null,clearTimeout(f);var a=e[t];if(delete e[t],l.parentNode&&l.parentNode.removeChild(l),a&&a.forEach((e=>e(o))),r)return r(o)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=d.bind(null,l.onerror),l.onload=d.bind(null,l.onload),u&&document.head.appendChild(l)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{a.S={};var e={},r={};a.I=(t,o)=>{o||(o=[]);var n=r[t];if(n||(n=r[t]={}),!(o.indexOf(n)>=0)){if(o.push(n),e[t])return e[t];a.o(a.S,t)||(a.S[t]={});var i=a.S[t],l="jupyterlab-plotly",u=[];return"default"===t&&((e,r,t,o)=>{var n=i[e]=i[e]||{},u=n[r];(!u||!u.loaded&&(1!=!u.eager?o:l>u.from))&&(n[r]={get:()=>a.e(1).then((()=>()=>a(2))),from:l,eager:!1})})("jupyterlab-plotly","6.6.0"),e[t]=u.length?Promise.all(u).then((()=>e[t]=1)):1}}})(),(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var r=a.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var o=t.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=t[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{var e={0:0};a.f.j=(r,t)=>{var o=a.o(e,r)?e[r]:void 0;if(0!==o)if(o)t.push(o[2]);else{var n=new Promise(((t,a)=>o=e[r]=[t,a]));t.push(o[2]=n);var i=a.p+a.u(r),l=new Error;a.l(i,(t=>{if(a.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var n=t&&("load"===t.type?"missing":t.type),i=t&&t.target&&t.target.src;l.message="Loading chunk "+r+" failed.\n("+n+": "+i+")",l.name="ChunkLoadError",l.type=n,l.request=i,o[1](l)}}),"chunk-"+r,r)}};var r=(r,t)=>{var o,n,[i,l,u]=t,p=0;if(i.some((r=>0!==e[r]))){for(o in l)a.o(l,o)&&(a.m[o]=l[o]);u&&u(a)}for(r&&r(t);p